/*! For license information please see 126.0a9c0179f78505a2a5ca.js.LICENSE.txt */
(self.webpackChunk_rio_rio_ui=self.webpackChunk_rio_rio_ui||[]).push([[126],{34553(e,t,i){"use strict";i.d(t,{j:()=>ms});var n=i(5522),s=i(48507),r=i(76253),o=i(62020),a=new n.C("ClientDevice_Browser");var l,c,h,d,u,p,g,f,m,v,y,C,b,S,w,x,E,M,A,T,D,I,R,L,k,P,N,O,_,F,G,V,B,H,z,U,W,j,K,$,Y,q,X,Z,Q,J,ee,te,ie,ne,se,re,oe,ae,le,ce,he,de,ue,pe,ge,fe,me,ve,ye,Ce,be,Se,we,xe,Ee,Me,Ae,Te,De,Ie,Re,Le,ke,Pe,Ne,Oe,_e,Fe,Ge,Ve,Be,He,ze,Ue,We,je,Ke,$e,Ye,qe,Xe,Ze,Qe,Je,et,tt,it,nt,st,rt,ot,at,lt,ct,ht,dt,ut,pt,gt,ft,mt,vt,yt,Ct,bt,St,wt,xt,Et,Mt,At,Tt,Dt,It,Rt,Lt=function(){function e(){}return e.clientInfo=function(){return"undefined"==typeof window?{}:function(){if("undefined"==typeof window)return a.warn("No window object available to get browser client info"),{};var e=window.navigator;if(!e)return a.warn("No navigator object available to get browser client info"),{};var t,i=e.platform,n=e.product,s=e.vendor,r=e.userAgent,o=e.language,l=function(e){var t=/.+(Opera[\s[A-Z]*|OPR[\sA-Z]*)\/([0-9\.]+).*/i.exec(e);if(t)return{type:t[1],version:t[2]};var i=/.+(Trident|Edge)\/([0-9\.]+).*/i.exec(e);if(i)return{type:i[1],version:i[2]};var n=/.+(Chrome|Firefox|FxiOS)\/([0-9\.]+).*/i.exec(e);if(n)return{type:n[1],version:n[2]};var s=/.+(Safari)\/([0-9\.]+).*/i.exec(e);if(s)return{type:s[1],version:s[2]};var r=/.+(AppleWebKit)\/([0-9\.]+).*/i.exec(e);if(r)return{type:r[1],version:r[2]};var o=/.*([A-Z]+)\/([0-9\.]+).*/i.exec(e);return o?{type:o[1],version:o[2]}:{type:"",version:""}}(r),c=(t=/\(([A-Za-z\s].*)\)/.exec((new Date).toString()))&&t[1]||"";return{platform:i,make:n||s,model:l.type,version:l.version,appVersion:[l.type,l.version].join("/"),language:o,timezone:c}}()},e.dimension=function(){return"undefined"==typeof window?(a.warn("No window object available to get browser client info"),{width:320,height:320}):{width:window.innerWidth,height:window.innerHeight}},e}(),kt=i(56059),Pt=i(81504),Nt=i(71481),Ot={clockOffset:0,getDateWithClockOffset:function(){return Ot.clockOffset?new Date((new Date).getTime()+Ot.clockOffset):new Date},getClockOffset:function(){return Ot.clockOffset},getHeaderStringFromDate:function(e){return void 0===e&&(e=Ot.getDateWithClockOffset()),e.toISOString().replace(/[:\-]|\.\d{3}/g,"")},getDateFromHeaderString:function(e){var t=function(e,t){var i="function"==typeof Symbol&&e[Symbol.iterator];if(!i)return e;var n,s,r=i.call(e),o=[];try{for(;(void 0===t||t-- >0)&&!(n=r.next()).done;)o.push(n.value)}catch(e){s={error:e}}finally{try{n&&!n.done&&(i=r.return)&&i.call(r)}finally{if(s)throw s.error}}return o}(e.match(/^(\d{4})(\d{2})(\d{2})T(\d{2})(\d{2})(\d{2}).+/),7),i=t[1],n=t[2],s=t[3],r=t[4],o=t[5],a=t[6];return new Date(Date.UTC(Number(i),Number(n)-1,Number(s),Number(r),Number(o),Number(a)))},isClockSkewed:function(e){return Math.abs(e.getTime()-Ot.getDateWithClockOffset().getTime())>=3e5},isClockSkewError:function(e){if(!e.response||!e.response.headers)return!1;var t=e.response.headers;return Boolean(["BadRequestException","InvalidSignatureException"].includes(t["x-amzn-errortype"])&&(t.date||t.Date))},setClockOffset:function(e){Ot.clockOffset=e}},_t=function(){return _t=Object.assign||function(e){for(var t,i=1,n=arguments.length;i<n;i++)for(var s in t=arguments[i])Object.prototype.hasOwnProperty.call(t,s)&&(e[s]=t[s]);return e},_t.apply(this,arguments)},Ft=new n.C("Signer"),Gt="AWS4-HMAC-SHA256",Vt=function(e,t){var i=new kt.Sha256(e);return i.update(t),i.digestSync()},Bt=function(e){var t=e||"",i=new kt.Sha256;return i.update(t),(0,Pt.n)(i.digestSync())},Ht=function(e){return Object.keys(e).map(function(e){return e.toLowerCase()}).sort().join(";")},zt=function(e){var t,i,n=(0,Nt.parse)(e.url);return[e.method||"/",encodeURIComponent(n.pathname).replace(/%2F/gi,"/"),(i=n.query,i&&0!==i.length?i.split("&").map(function(e){var t=e.split("=");if(1===t.length)return e;var i=t[1].replace(/[!'()*]/g,function(e){return"%"+e.charCodeAt(0).toString(16).toUpperCase()});return t[0]+"="+i}).sort(function(e,t){var i=e.split("=")[0],n=t.split("=")[0];return i===n?e<t?-1:1:i<n?-1:1}).join("&"):""),(t=e.headers,t&&0!==Object.keys(t).length?Object.keys(t).map(function(e){return{key:e.toLowerCase(),value:t[e]?t[e].trim().replace(/\s+/g," "):""}}).sort(function(e,t){return e.key<t.key?-1:1}).map(function(e){return e.key+":"+e.value}).join("\n")+"\n":""),Ht(e.headers),Bt(e.data)].join("\n")},Ut=function(e){var t=((0,Nt.parse)(e.url).host.match(/([^\.]+)\.(?:([^\.]*)\.)?amazonaws\.com$/)||[]).slice(1,3);return"es"===t[1]&&(t=t.reverse()),{service:e.service||t[0],region:e.region||t[1]}},Wt=function(e,t,i){return[e,t,i,"aws4_request"].join("/")},jt=function(e,t,i,n){return[e,i,n,Bt(t)].join("\n")},Kt=function(e,t,i){Ft.debug(i);var n=Vt("AWS4"+e,t),s=Vt(n,i.region),r=Vt(s,i.service);return Vt(r,"aws4_request")},$t=function(e,t){return(0,Pt.n)(Vt(e,t))},Yt=function(){function e(){}return e.sign=function(e,t,i){if(void 0===i&&(i=null),e.headers=e.headers||{},e.body&&!e.data)throw new Error('The attribute "body" was found on the request object. Please use the attribute "data" instead.');var n=Ot.getDateWithClockOffset().toISOString().replace(/[:\-]|\.\d{3}/g,""),s=n.substr(0,8),r=(0,Nt.parse)(e.url);e.headers.host=r.host,e.headers["x-amz-date"]=n,t.session_token&&(e.headers["X-Amz-Security-Token"]=t.session_token);var o=zt(e);Ft.debug(o);var a=i||Ut(e),l=Wt(s,a.region,a.service),c=jt(Gt,o,n,l),h=Kt(t.secret_key,s,a),d=$t(h,c),u=function(e,t,i,n,s){return[e+" Credential="+t+"/"+i,"SignedHeaders="+n,"Signature="+s].join(", ")}(Gt,t.access_key,l,Ht(e.headers),d);return e.headers.Authorization=u,e},e.signUrl=function(e,t,i,n){var s="object"==typeof e?e.url:e,r="object"==typeof e?e.method:"GET",o="object"==typeof e?e.body:void 0,a=Ot.getDateWithClockOffset().toISOString().replace(/[:\-]|\.\d{3}/g,""),l=a.substr(0,8),c=(0,Nt.parse)(s,!0,!0),h=(c.search,function(e,t){var i={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(i[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var s=0;for(n=Object.getOwnPropertySymbols(e);s<n.length;s++)t.indexOf(n[s])<0&&Object.prototype.propertyIsEnumerable.call(e,n[s])&&(i[n[s]]=e[n[s]])}return i}(c,["search"])),d={host:h.host},u=i||Ut({url:(0,Nt.format)(h)}),p=u.region,g=u.service,f=Wt(l,p,g),m=t.session_token&&"iotdevicegateway"!==g,v=_t(_t(_t({"X-Amz-Algorithm":Gt,"X-Amz-Credential":[t.access_key,f].join("/"),"X-Amz-Date":a.substr(0,16)},m?{"X-Amz-Security-Token":""+t.session_token}:{}),n?{"X-Amz-Expires":""+n}:{}),{"X-Amz-SignedHeaders":Object.keys(d).join(",")}),y=zt({method:r,url:(0,Nt.format)(_t(_t({},h),{query:_t(_t({},h.query),v)})),headers:d,data:o}),C=jt(Gt,y,a,f),b=Kt(t.secret_key,l,{region:p,service:g}),S=$t(b,C),w=_t({"X-Amz-Signature":S},t.session_token&&{"X-Amz-Security-Token":t.session_token});return(0,Nt.format)({protocol:h.protocol,slashes:!0,hostname:h.hostname,port:h.port,pathname:h.pathname,query:_t(_t(_t({},h.query),v),w)})},e}(),qt=i(71429),Xt=i(70862),Zt=i(83847),Qt=i(65959);!function(e){e.filterSensitiveLog=function(e){return(0,Qt.__assign)({},e)}}(l||(l={})),function(e){e.filterSensitiveLog=function(e){return(0,Qt.__assign)({},e)}}(c||(c={})),function(e){e.filterSensitiveLog=function(e){return(0,Qt.__assign)({},e)}}(h||(h={})),function(e){e.filterSensitiveLog=function(e){return(0,Qt.__assign)({},e)}}(d||(d={})),function(e){e.filterSensitiveLog=function(e){return(0,Qt.__assign)({},e)}}(u||(u={})),function(e){e.filterSensitiveLog=function(e){return(0,Qt.__assign)({},e)}}(p||(p={})),function(e){e.filterSensitiveLog=function(e){return(0,Qt.__assign)({},e)}}(g||(g={})),function(e){e.filterSensitiveLog=function(e){return(0,Qt.__assign)({},e)}}(f||(f={})),function(e){e.filterSensitiveLog=function(e){return(0,Qt.__assign)({},e)}}(m||(m={})),function(e){e.filterSensitiveLog=function(e){return(0,Qt.__assign)({},e)}}(v||(v={})),function(e){e.filterSensitiveLog=function(e){return(0,Qt.__assign)({},e)}}(y||(y={})),function(e){e.filterSensitiveLog=function(e){return(0,Qt.__assign)({},e)}}(C||(C={})),function(e){e.filterSensitiveLog=function(e){return(0,Qt.__assign)({},e)}}(b||(b={})),function(e){e.filterSensitiveLog=function(e){return(0,Qt.__assign)({},e)}}(S||(S={})),function(e){e.filterSensitiveLog=function(e){return(0,Qt.__assign)({},e)}}(w||(w={})),function(e){e.filterSensitiveLog=function(e){return(0,Qt.__assign)({},e)}}(x||(x={})),function(e){e.filterSensitiveLog=function(e){return(0,Qt.__assign)({},e)}}(E||(E={})),function(e){e.filterSensitiveLog=function(e){return(0,Qt.__assign)({},e)}}(M||(M={})),function(e){e.filterSensitiveLog=function(e){return(0,Qt.__assign)({},e)}}(A||(A={})),function(e){e.filterSensitiveLog=function(e){return(0,Qt.__assign)({},e)}}(T||(T={})),function(e){e.filterSensitiveLog=function(e){return(0,Qt.__assign)({},e)}}(D||(D={})),function(e){e.filterSensitiveLog=function(e){return(0,Qt.__assign)({},e)}}(I||(I={})),function(e){e.filterSensitiveLog=function(e){return(0,Qt.__assign)({},e)}}(R||(R={})),function(e){e.filterSensitiveLog=function(e){return(0,Qt.__assign)({},e)}}(L||(L={})),function(e){e.filterSensitiveLog=function(e){return(0,Qt.__assign)({},e)}}(k||(k={})),function(e){e.filterSensitiveLog=function(e){return(0,Qt.__assign)({},e)}}(P||(P={})),function(e){e.filterSensitiveLog=function(e){return(0,Qt.__assign)({},e)}}(N||(N={})),function(e){e.filterSensitiveLog=function(e){return(0,Qt.__assign)({},e)}}(O||(O={})),function(e){e.filterSensitiveLog=function(e){return(0,Qt.__assign)({},e)}}(_||(_={})),function(e){e.filterSensitiveLog=function(e){return(0,Qt.__assign)({},e)}}(F||(F={})),function(e){e.filterSensitiveLog=function(e){return(0,Qt.__assign)({},e)}}(G||(G={})),function(e){e.filterSensitiveLog=function(e){return(0,Qt.__assign)({},e)}}(V||(V={})),function(e){e.filterSensitiveLog=function(e){return(0,Qt.__assign)({},e)}}(B||(B={})),function(e){e.filterSensitiveLog=function(e){return(0,Qt.__assign)({},e)}}(H||(H={})),function(e){e.filterSensitiveLog=function(e){return(0,Qt.__assign)({},e)}}(z||(z={})),function(e){e.filterSensitiveLog=function(e){return(0,Qt.__assign)({},e)}}(U||(U={})),function(e){e.filterSensitiveLog=function(e){return(0,Qt.__assign)({},e)}}(W||(W={})),function(e){e.filterSensitiveLog=function(e){return(0,Qt.__assign)({},e)}}(j||(j={})),function(e){e.filterSensitiveLog=function(e){return(0,Qt.__assign)({},e)}}(K||(K={})),function(e){e.filterSensitiveLog=function(e){return(0,Qt.__assign)({},e)}}($||($={})),function(e){e.filterSensitiveLog=function(e){return(0,Qt.__assign)({},e)}}(Y||(Y={})),function(e){e.filterSensitiveLog=function(e){return(0,Qt.__assign)({},e)}}(q||(q={})),function(e){e.filterSensitiveLog=function(e){return(0,Qt.__assign)({},e)}}(X||(X={})),function(e){e.filterSensitiveLog=function(e){return(0,Qt.__assign)({},e)}}(Z||(Z={})),function(e){e.filterSensitiveLog=function(e){return(0,Qt.__assign)({},e)}}(Q||(Q={})),function(e){e.filterSensitiveLog=function(e){return(0,Qt.__assign)({},e)}}(J||(J={})),function(e){e.filterSensitiveLog=function(e){return(0,Qt.__assign)({},e)}}(ee||(ee={})),function(e){e.filterSensitiveLog=function(e){return(0,Qt.__assign)({},e)}}(te||(te={})),function(e){e.filterSensitiveLog=function(e){return(0,Qt.__assign)({},e)}}(ie||(ie={})),function(e){e.filterSensitiveLog=function(e){return(0,Qt.__assign)({},e)}}(ne||(ne={})),function(e){e.filterSensitiveLog=function(e){return(0,Qt.__assign)({},e)}}(se||(se={})),function(e){e.filterSensitiveLog=function(e){return(0,Qt.__assign)({},e)}}(re||(re={})),function(e){e.filterSensitiveLog=function(e){return(0,Qt.__assign)({},e)}}(oe||(oe={})),function(e){e.filterSensitiveLog=function(e){return(0,Qt.__assign)({},e)}}(ae||(ae={})),function(e){e.filterSensitiveLog=function(e){return(0,Qt.__assign)({},e)}}(le||(le={})),function(e){e.filterSensitiveLog=function(e){return(0,Qt.__assign)({},e)}}(ce||(ce={})),function(e){e.filterSensitiveLog=function(e){return(0,Qt.__assign)({},e)}}(he||(he={})),function(e){e.filterSensitiveLog=function(e){return(0,Qt.__assign)({},e)}}(de||(de={})),function(e){e.filterSensitiveLog=function(e){return(0,Qt.__assign)({},e)}}(ue||(ue={})),function(e){e.filterSensitiveLog=function(e){return(0,Qt.__assign)({},e)}}(pe||(pe={})),function(e){e.filterSensitiveLog=function(e){return(0,Qt.__assign)({},e)}}(ge||(ge={})),function(e){e.filterSensitiveLog=function(e){return(0,Qt.__assign)({},e)}}(fe||(fe={})),function(e){e.filterSensitiveLog=function(e){return(0,Qt.__assign)({},e)}}(me||(me={})),function(e){e.filterSensitiveLog=function(e){return(0,Qt.__assign)({},e)}}(ve||(ve={})),function(e){e.filterSensitiveLog=function(e){return(0,Qt.__assign)({},e)}}(ye||(ye={})),function(e){e.filterSensitiveLog=function(e){return(0,Qt.__assign)({},e)}}(Ce||(Ce={})),function(e){e.filterSensitiveLog=function(e){return(0,Qt.__assign)({},e)}}(be||(be={})),function(e){e.filterSensitiveLog=function(e){return(0,Qt.__assign)({},e)}}(Se||(Se={})),function(e){e.filterSensitiveLog=function(e){return(0,Qt.__assign)({},e)}}(we||(we={})),function(e){e.filterSensitiveLog=function(e){return(0,Qt.__assign)({},e)}}(xe||(xe={})),function(e){e.filterSensitiveLog=function(e){return(0,Qt.__assign)({},e)}}(Ee||(Ee={})),function(e){e.filterSensitiveLog=function(e){return(0,Qt.__assign)({},e)}}(Me||(Me={})),function(e){e.filterSensitiveLog=function(e){return(0,Qt.__assign)({},e)}}(Ae||(Ae={})),function(e){e.filterSensitiveLog=function(e){return(0,Qt.__assign)({},e)}}(Te||(Te={})),function(e){e.filterSensitiveLog=function(e){return(0,Qt.__assign)({},e)}}(De||(De={})),function(e){e.filterSensitiveLog=function(e){return(0,Qt.__assign)({},e)}}(Ie||(Ie={})),function(e){e.filterSensitiveLog=function(e){return(0,Qt.__assign)({},e)}}(Re||(Re={})),function(e){e.filterSensitiveLog=function(e){return(0,Qt.__assign)({},e)}}(Le||(Le={})),function(e){e.filterSensitiveLog=function(e){return(0,Qt.__assign)({},e)}}(ke||(ke={})),function(e){e.filterSensitiveLog=function(e){return(0,Qt.__assign)({},e)}}(Pe||(Pe={})),function(e){e.filterSensitiveLog=function(e){return(0,Qt.__assign)({},e)}}(Ne||(Ne={})),function(e){e.filterSensitiveLog=function(e){return(0,Qt.__assign)({},e)}}(Oe||(Oe={})),function(e){e.filterSensitiveLog=function(e){return(0,Qt.__assign)({},e)}}(_e||(_e={})),function(e){e.filterSensitiveLog=function(e){return(0,Qt.__assign)({},e)}}(Fe||(Fe={})),function(e){e.filterSensitiveLog=function(e){return(0,Qt.__assign)({},e)}}(Ge||(Ge={})),function(e){e.filterSensitiveLog=function(e){return(0,Qt.__assign)({},e)}}(Ve||(Ve={})),function(e){e.filterSensitiveLog=function(e){return(0,Qt.__assign)({},e)}}(Be||(Be={})),function(e){e.filterSensitiveLog=function(e){return(0,Qt.__assign)({},e)}}(He||(He={})),function(e){e.filterSensitiveLog=function(e){return(0,Qt.__assign)({},e)}}(ze||(ze={})),function(e){e.filterSensitiveLog=function(e){return(0,Qt.__assign)({},e)}}(Ue||(Ue={})),function(e){e.filterSensitiveLog=function(e){return(0,Qt.__assign)({},e)}}(We||(We={})),function(e){e.filterSensitiveLog=function(e){return(0,Qt.__assign)({},e)}}(je||(je={})),function(e){e.filterSensitiveLog=function(e){return(0,Qt.__assign)({},e)}}(Ke||(Ke={})),function(e){e.filterSensitiveLog=function(e){return(0,Qt.__assign)({},e)}}($e||($e={})),function(e){e.filterSensitiveLog=function(e){return(0,Qt.__assign)({},e)}}(Ye||(Ye={})),function(e){e.filterSensitiveLog=function(e){return(0,Qt.__assign)({},e)}}(qe||(qe={})),function(e){e.filterSensitiveLog=function(e){return(0,Qt.__assign)({},e)}}(Xe||(Xe={})),function(e){e.filterSensitiveLog=function(e){return(0,Qt.__assign)({},e)}}(Ze||(Ze={})),function(e){e.filterSensitiveLog=function(e){return(0,Qt.__assign)({},e)}}(Qe||(Qe={})),function(e){e.filterSensitiveLog=function(e){return(0,Qt.__assign)({},e)}}(Je||(Je={})),function(e){e.filterSensitiveLog=function(e){return(0,Qt.__assign)({},e)}}(et||(et={})),function(e){e.filterSensitiveLog=function(e){return(0,Qt.__assign)({},e)}}(tt||(tt={})),function(e){e.filterSensitiveLog=function(e){return(0,Qt.__assign)({},e)}}(it||(it={})),function(e){e.filterSensitiveLog=function(e){return(0,Qt.__assign)({},e)}}(nt||(nt={})),function(e){e.filterSensitiveLog=function(e){return(0,Qt.__assign)({},e)}}(st||(st={})),function(e){e.filterSensitiveLog=function(e){return(0,Qt.__assign)({},e)}}(rt||(rt={})),function(e){e.filterSensitiveLog=function(e){return(0,Qt.__assign)({},e)}}(ot||(ot={})),function(e){e.filterSensitiveLog=function(e){return(0,Qt.__assign)({},e)}}(at||(at={})),function(e){e.filterSensitiveLog=function(e){return(0,Qt.__assign)({},e)}}(lt||(lt={})),function(e){e.filterSensitiveLog=function(e){return(0,Qt.__assign)({},e)}}(ct||(ct={})),function(e){e.filterSensitiveLog=function(e){return(0,Qt.__assign)({},e)}}(ht||(ht={})),function(e){e.filterSensitiveLog=function(e){return(0,Qt.__assign)({},e)}}(dt||(dt={})),function(e){e.filterSensitiveLog=function(e){return(0,Qt.__assign)({},e)}}(ut||(ut={})),function(e){e.filterSensitiveLog=function(e){return(0,Qt.__assign)({},e)}}(pt||(pt={})),function(e){e.filterSensitiveLog=function(e){return(0,Qt.__assign)({},e)}}(gt||(gt={})),function(e){e.filterSensitiveLog=function(e){return(0,Qt.__assign)({},e)}}(ft||(ft={})),function(e){e.filterSensitiveLog=function(e){return(0,Qt.__assign)({},e)}}(mt||(mt={})),function(e){e.filterSensitiveLog=function(e){return(0,Qt.__assign)({},e)}}(vt||(vt={})),function(e){e.filterSensitiveLog=function(e){return(0,Qt.__assign)({},e)}}(yt||(yt={})),function(e){e.filterSensitiveLog=function(e){return(0,Qt.__assign)({},e)}}(Ct||(Ct={})),function(e){e.filterSensitiveLog=function(e){return(0,Qt.__assign)({},e)}}(bt||(bt={})),function(e){e.filterSensitiveLog=function(e){return(0,Qt.__assign)({},e)}}(St||(St={})),function(e){e.filterSensitiveLog=function(e){return(0,Qt.__assign)({},e)}}(wt||(wt={})),function(e){e.filterSensitiveLog=function(e){return(0,Qt.__assign)({},e)}}(xt||(xt={})),function(e){e.filterSensitiveLog=function(e){return(0,Qt.__assign)({},e)}}(Et||(Et={})),function(e){e.filterSensitiveLog=function(e){return(0,Qt.__assign)({},e)}}(Mt||(Mt={})),function(e){e.filterSensitiveLog=function(e){return(0,Qt.__assign)({},e)}}(At||(At={})),function(e){e.filterSensitiveLog=function(e){return(0,Qt.__assign)({},e)}}(Tt||(Tt={})),function(e){e.filterSensitiveLog=function(e){return(0,Qt.__assign)({},e)}}(Dt||(Dt={})),function(e){e.filterSensitiveLog=function(e){return(0,Qt.__assign)({},e)}}(It||(It={})),function(e){e.filterSensitiveLog=function(e){return(0,Qt.__assign)({},e)}}(Rt||(Rt={}));var Jt=i(59027),ei=i(11538),ti=function(e,t){return(0,Qt.__awaiter)(void 0,void 0,void 0,function(){var i,n,s,r,o,a,l,c,h,d,u,p,g,f;return(0,Qt.__generator)(this,function(m){switch(m.label){case 0:return n=[(0,Qt.__assign)({},e)],f={},[4,Ei(e.body,t)];case 1:switch(i=Qt.__assign.apply(void 0,n.concat([(f.body=m.sent(),f)])),r="UnknownError",r=Mi(e,i.body)){case"BadRequestException":case"com.amazonaws.pinpoint#BadRequestException":return[3,2];case"ForbiddenException":case"com.amazonaws.pinpoint#ForbiddenException":return[3,4];case"InternalServerErrorException":case"com.amazonaws.pinpoint#InternalServerErrorException":return[3,6];case"MethodNotAllowedException":case"com.amazonaws.pinpoint#MethodNotAllowedException":return[3,8];case"NotFoundException":case"com.amazonaws.pinpoint#NotFoundException":return[3,10];case"PayloadTooLargeException":case"com.amazonaws.pinpoint#PayloadTooLargeException":return[3,12];case"TooManyRequestsException":case"com.amazonaws.pinpoint#TooManyRequestsException":return[3,14]}return[3,16];case 2:return o=[{}],[4,ni(i,t)];case 3:return s=Qt.__assign.apply(void 0,[Qt.__assign.apply(void 0,o.concat([m.sent()])),{name:r,$metadata:xi(e)}]),[3,17];case 4:return a=[{}],[4,si(i,t)];case 5:return s=Qt.__assign.apply(void 0,[Qt.__assign.apply(void 0,a.concat([m.sent()])),{name:r,$metadata:xi(e)}]),[3,17];case 6:return l=[{}],[4,ri(i,t)];case 7:return s=Qt.__assign.apply(void 0,[Qt.__assign.apply(void 0,l.concat([m.sent()])),{name:r,$metadata:xi(e)}]),[3,17];case 8:return c=[{}],[4,oi(i,t)];case 9:return s=Qt.__assign.apply(void 0,[Qt.__assign.apply(void 0,c.concat([m.sent()])),{name:r,$metadata:xi(e)}]),[3,17];case 10:return h=[{}],[4,ai(i,t)];case 11:return s=Qt.__assign.apply(void 0,[Qt.__assign.apply(void 0,h.concat([m.sent()])),{name:r,$metadata:xi(e)}]),[3,17];case 12:return d=[{}],[4,li(i,t)];case 13:return s=Qt.__assign.apply(void 0,[Qt.__assign.apply(void 0,d.concat([m.sent()])),{name:r,$metadata:xi(e)}]),[3,17];case 14:return u=[{}],[4,ci(i,t)];case 15:return s=Qt.__assign.apply(void 0,[Qt.__assign.apply(void 0,u.concat([m.sent()])),{name:r,$metadata:xi(e)}]),[3,17];case 16:p=i.body,r=p.code||p.Code||r,s=(0,Qt.__assign)((0,Qt.__assign)({},p),{name:""+r,message:p.message||p.Message||r,$fault:"client",$metadata:xi(e)}),m.label=17;case 17:return g=s.message||s.Message||r,s.message=g,delete s.Message,[2,Promise.reject(Object.assign(new Error(g),s))]}})})},ii=function(e,t){return(0,Qt.__awaiter)(void 0,void 0,void 0,function(){var i,n,s,r,o,a,l,c,h,d,u,p,g,f;return(0,Qt.__generator)(this,function(m){switch(m.label){case 0:return n=[(0,Qt.__assign)({},e)],f={},[4,Ei(e.body,t)];case 1:switch(i=Qt.__assign.apply(void 0,n.concat([(f.body=m.sent(),f)])),r="UnknownError",r=Mi(e,i.body)){case"BadRequestException":case"com.amazonaws.pinpoint#BadRequestException":return[3,2];case"ForbiddenException":case"com.amazonaws.pinpoint#ForbiddenException":return[3,4];case"InternalServerErrorException":case"com.amazonaws.pinpoint#InternalServerErrorException":return[3,6];case"MethodNotAllowedException":case"com.amazonaws.pinpoint#MethodNotAllowedException":return[3,8];case"NotFoundException":case"com.amazonaws.pinpoint#NotFoundException":return[3,10];case"PayloadTooLargeException":case"com.amazonaws.pinpoint#PayloadTooLargeException":return[3,12];case"TooManyRequestsException":case"com.amazonaws.pinpoint#TooManyRequestsException":return[3,14]}return[3,16];case 2:return o=[{}],[4,ni(i,t)];case 3:return s=Qt.__assign.apply(void 0,[Qt.__assign.apply(void 0,o.concat([m.sent()])),{name:r,$metadata:xi(e)}]),[3,17];case 4:return a=[{}],[4,si(i,t)];case 5:return s=Qt.__assign.apply(void 0,[Qt.__assign.apply(void 0,a.concat([m.sent()])),{name:r,$metadata:xi(e)}]),[3,17];case 6:return l=[{}],[4,ri(i,t)];case 7:return s=Qt.__assign.apply(void 0,[Qt.__assign.apply(void 0,l.concat([m.sent()])),{name:r,$metadata:xi(e)}]),[3,17];case 8:return c=[{}],[4,oi(i,t)];case 9:return s=Qt.__assign.apply(void 0,[Qt.__assign.apply(void 0,c.concat([m.sent()])),{name:r,$metadata:xi(e)}]),[3,17];case 10:return h=[{}],[4,ai(i,t)];case 11:return s=Qt.__assign.apply(void 0,[Qt.__assign.apply(void 0,h.concat([m.sent()])),{name:r,$metadata:xi(e)}]),[3,17];case 12:return d=[{}],[4,li(i,t)];case 13:return s=Qt.__assign.apply(void 0,[Qt.__assign.apply(void 0,d.concat([m.sent()])),{name:r,$metadata:xi(e)}]),[3,17];case 14:return u=[{}],[4,ci(i,t)];case 15:return s=Qt.__assign.apply(void 0,[Qt.__assign.apply(void 0,u.concat([m.sent()])),{name:r,$metadata:xi(e)}]),[3,17];case 16:p=i.body,r=p.code||p.Code||r,s=(0,Qt.__assign)((0,Qt.__assign)({},p),{name:""+r,message:p.message||p.Message||r,$fault:"client",$metadata:xi(e)}),m.label=17;case 17:return g=s.message||s.Message||r,s.message=g,delete s.Message,[2,Promise.reject(Object.assign(new Error(g),s))]}})})},ni=function(e,t){return(0,Qt.__awaiter)(void 0,void 0,void 0,function(){var t,i;return(0,Qt.__generator)(this,function(n){return t={name:"BadRequestException",$fault:"client",$metadata:xi(e),Message:void 0,RequestID:void 0},void 0!==(i=e.body).Message&&null!==i.Message&&(t.Message=i.Message),void 0!==i.RequestID&&null!==i.RequestID&&(t.RequestID=i.RequestID),[2,t]})})},si=function(e,t){return(0,Qt.__awaiter)(void 0,void 0,void 0,function(){var t,i;return(0,Qt.__generator)(this,function(n){return t={name:"ForbiddenException",$fault:"client",$metadata:xi(e),Message:void 0,RequestID:void 0},void 0!==(i=e.body).Message&&null!==i.Message&&(t.Message=i.Message),void 0!==i.RequestID&&null!==i.RequestID&&(t.RequestID=i.RequestID),[2,t]})})},ri=function(e,t){return(0,Qt.__awaiter)(void 0,void 0,void 0,function(){var t,i;return(0,Qt.__generator)(this,function(n){return t={name:"InternalServerErrorException",$fault:"server",$metadata:xi(e),Message:void 0,RequestID:void 0},void 0!==(i=e.body).Message&&null!==i.Message&&(t.Message=i.Message),void 0!==i.RequestID&&null!==i.RequestID&&(t.RequestID=i.RequestID),[2,t]})})},oi=function(e,t){return(0,Qt.__awaiter)(void 0,void 0,void 0,function(){var t,i;return(0,Qt.__generator)(this,function(n){return t={name:"MethodNotAllowedException",$fault:"client",$metadata:xi(e),Message:void 0,RequestID:void 0},void 0!==(i=e.body).Message&&null!==i.Message&&(t.Message=i.Message),void 0!==i.RequestID&&null!==i.RequestID&&(t.RequestID=i.RequestID),[2,t]})})},ai=function(e,t){return(0,Qt.__awaiter)(void 0,void 0,void 0,function(){var t,i;return(0,Qt.__generator)(this,function(n){return t={name:"NotFoundException",$fault:"client",$metadata:xi(e),Message:void 0,RequestID:void 0},void 0!==(i=e.body).Message&&null!==i.Message&&(t.Message=i.Message),void 0!==i.RequestID&&null!==i.RequestID&&(t.RequestID=i.RequestID),[2,t]})})},li=function(e,t){return(0,Qt.__awaiter)(void 0,void 0,void 0,function(){var t,i;return(0,Qt.__generator)(this,function(n){return t={name:"PayloadTooLargeException",$fault:"client",$metadata:xi(e),Message:void 0,RequestID:void 0},void 0!==(i=e.body).Message&&null!==i.Message&&(t.Message=i.Message),void 0!==i.RequestID&&null!==i.RequestID&&(t.RequestID=i.RequestID),[2,t]})})},ci=function(e,t){return(0,Qt.__awaiter)(void 0,void 0,void 0,function(){var t,i;return(0,Qt.__generator)(this,function(n){return t={name:"TooManyRequestsException",$fault:"client",$metadata:xi(e),Message:void 0,RequestID:void 0},void 0!==(i=e.body).Message&&null!==i.Message&&(t.Message=i.Message),void 0!==i.RequestID&&null!==i.RequestID&&(t.RequestID=i.RequestID),[2,t]})})},hi=function(e,t){return(0,Qt.__assign)((0,Qt.__assign)((0,Qt.__assign)((0,Qt.__assign)((0,Qt.__assign)((0,Qt.__assign)((0,Qt.__assign)((0,Qt.__assign)({},void 0!==e.AppVersion&&null!==e.AppVersion&&{AppVersion:e.AppVersion}),void 0!==e.Locale&&null!==e.Locale&&{Locale:e.Locale}),void 0!==e.Make&&null!==e.Make&&{Make:e.Make}),void 0!==e.Model&&null!==e.Model&&{Model:e.Model}),void 0!==e.ModelVersion&&null!==e.ModelVersion&&{ModelVersion:e.ModelVersion}),void 0!==e.Platform&&null!==e.Platform&&{Platform:e.Platform}),void 0!==e.PlatformVersion&&null!==e.PlatformVersion&&{PlatformVersion:e.PlatformVersion}),void 0!==e.Timezone&&null!==e.Timezone&&{Timezone:e.Timezone})},di=function(e,t){return(0,Qt.__assign)((0,Qt.__assign)((0,Qt.__assign)((0,Qt.__assign)((0,Qt.__assign)((0,Qt.__assign)({},void 0!==e.City&&null!==e.City&&{City:e.City}),void 0!==e.Country&&null!==e.Country&&{Country:e.Country}),void 0!==e.Latitude&&null!==e.Latitude&&{Latitude:e.Latitude}),void 0!==e.Longitude&&null!==e.Longitude&&{Longitude:e.Longitude}),void 0!==e.PostalCode&&null!==e.PostalCode&&{PostalCode:e.PostalCode}),void 0!==e.Region&&null!==e.Region&&{Region:e.Region})},ui=function(e,t){return(0,Qt.__assign)((0,Qt.__assign)({},void 0!==e.UserAttributes&&null!==e.UserAttributes&&{UserAttributes:vi(e.UserAttributes,t)}),void 0!==e.UserId&&null!==e.UserId&&{UserId:e.UserId})},pi=function(e,t){return Object.entries(e).reduce(function(e,t){var i,n=(0,Qt.__read)(t,2),s=n[0],r=n[1];return null===r?e:(0,Qt.__assign)((0,Qt.__assign)({},e),((i={})[s]=r,i))},{})},gi=function(e,t){return Object.entries(e).reduce(function(e,t){var i,n=(0,Qt.__read)(t,2),s=n[0],r=n[1];return null===r?e:(0,Qt.__assign)((0,Qt.__assign)({},e),((i={})[s]=r,i))},{})},fi=function(e,t){return Object.entries(e).reduce(function(e,i){var n,s=(0,Qt.__read)(i,2),r=s[0],o=s[1];return null===o?e:(0,Qt.__assign)((0,Qt.__assign)({},e),((n={})[r]=function(e,t){return(0,Qt.__assign)((0,Qt.__assign)((0,Qt.__assign)((0,Qt.__assign)((0,Qt.__assign)((0,Qt.__assign)((0,Qt.__assign)((0,Qt.__assign)((0,Qt.__assign)((0,Qt.__assign)({},void 0!==e.AppPackageName&&null!==e.AppPackageName&&{AppPackageName:e.AppPackageName}),void 0!==e.AppTitle&&null!==e.AppTitle&&{AppTitle:e.AppTitle}),void 0!==e.AppVersionCode&&null!==e.AppVersionCode&&{AppVersionCode:e.AppVersionCode}),void 0!==e.Attributes&&null!==e.Attributes&&{Attributes:gi(e.Attributes)}),void 0!==e.ClientSdkVersion&&null!==e.ClientSdkVersion&&{ClientSdkVersion:e.ClientSdkVersion}),void 0!==e.EventType&&null!==e.EventType&&{EventType:e.EventType}),void 0!==e.Metrics&&null!==e.Metrics&&{Metrics:pi(e.Metrics,t)}),void 0!==e.SdkName&&null!==e.SdkName&&{SdkName:e.SdkName}),void 0!==e.Session&&null!==e.Session&&{Session:Ci(e.Session,t)}),void 0!==e.Timestamp&&null!==e.Timestamp&&{Timestamp:e.Timestamp})}(o,t),n))},{})},mi=function(e,t){return Object.entries(e).reduce(function(e,i){var n,s=(0,Qt.__read)(i,2),r=s[0],o=s[1];return null===o?e:(0,Qt.__assign)((0,Qt.__assign)({},e),((n={})[r]=function(e,t){return(0,Qt.__assign)((0,Qt.__assign)({},void 0!==e.Endpoint&&null!==e.Endpoint&&{Endpoint:yi(e.Endpoint,t)}),void 0!==e.Events&&null!==e.Events&&{Events:fi(e.Events,t)})}(o,t),n))},{})},vi=function(e,t){return Object.entries(e).reduce(function(e,t){var i,n=(0,Qt.__read)(t,2),s=n[0],r=n[1];return null===r?e:(0,Qt.__assign)((0,Qt.__assign)({},e),((i={})[s]=function(e){return e.filter(function(e){return null!=e}).map(function(e){return null===e?null:e})}(r),i))},{})},yi=function(e,t){return(0,Qt.__assign)((0,Qt.__assign)((0,Qt.__assign)((0,Qt.__assign)((0,Qt.__assign)((0,Qt.__assign)((0,Qt.__assign)((0,Qt.__assign)((0,Qt.__assign)((0,Qt.__assign)((0,Qt.__assign)({},void 0!==e.Address&&null!==e.Address&&{Address:e.Address}),void 0!==e.Attributes&&null!==e.Attributes&&{Attributes:vi(e.Attributes,t)}),void 0!==e.ChannelType&&null!==e.ChannelType&&{ChannelType:e.ChannelType}),void 0!==e.Demographic&&null!==e.Demographic&&{Demographic:hi(e.Demographic)}),void 0!==e.EffectiveDate&&null!==e.EffectiveDate&&{EffectiveDate:e.EffectiveDate}),void 0!==e.EndpointStatus&&null!==e.EndpointStatus&&{EndpointStatus:e.EndpointStatus}),void 0!==e.Location&&null!==e.Location&&{Location:di(e.Location)}),void 0!==e.Metrics&&null!==e.Metrics&&{Metrics:pi(e.Metrics,t)}),void 0!==e.OptOut&&null!==e.OptOut&&{OptOut:e.OptOut}),void 0!==e.RequestId&&null!==e.RequestId&&{RequestId:e.RequestId}),void 0!==e.User&&null!==e.User&&{User:ui(e.User,t)})},Ci=function(e,t){return(0,Qt.__assign)((0,Qt.__assign)((0,Qt.__assign)((0,Qt.__assign)({},void 0!==e.Duration&&null!==e.Duration&&{Duration:e.Duration}),void 0!==e.Id&&null!==e.Id&&{Id:e.Id}),void 0!==e.StartTimestamp&&null!==e.StartTimestamp&&{StartTimestamp:e.StartTimestamp}),void 0!==e.StopTimestamp&&null!==e.StopTimestamp&&{StopTimestamp:e.StopTimestamp})},bi=function(e,t){return{Message:void 0!==e.Message&&null!==e.Message?e.Message:void 0,StatusCode:void 0!==e.StatusCode&&null!==e.StatusCode?e.StatusCode:void 0}},Si=function(e,t){return Object.entries(e).reduce(function(e,t){var i,n=(0,Qt.__read)(t,2),s=n[0],r=n[1];return null===r?e:(0,Qt.__assign)((0,Qt.__assign)({},e),((i={})[s]=function(e){return{Message:void 0!==e.Message&&null!==e.Message?e.Message:void 0,StatusCode:void 0!==e.StatusCode&&null!==e.StatusCode?e.StatusCode:void 0}}(r),i))},{})},wi=function(e,t){return Object.entries(e).reduce(function(e,t){var i,n=(0,Qt.__read)(t,2),s=n[0],r=n[1];return null===r?e:(0,Qt.__assign)((0,Qt.__assign)({},e),((i={})[s]=function(e){return{EndpointItemResponse:void 0!==e.EndpointItemResponse&&null!==e.EndpointItemResponse?bi(e.EndpointItemResponse):void 0,EventsItemResponse:void 0!==e.EventsItemResponse&&null!==e.EventsItemResponse?Si(e.EventsItemResponse):void 0}}(r),i))},{})},xi=function(e){var t;return{httpStatusCode:e.statusCode,requestId:null!==(t=e.headers["x-amzn-requestid"])&&void 0!==t?t:e.headers["x-amzn-request-id"],extendedRequestId:e.headers["x-amz-id-2"],cfId:e.headers["x-amz-cf-id"]}},Ei=function(e,t){return function(e,t){return function(e,t){return void 0===e&&(e=new Uint8Array),e instanceof Uint8Array?Promise.resolve(e):t.streamCollector(e)||Promise.resolve(new Uint8Array)}(e,t).then(function(e){return t.utf8Encoder(e)})}(e,t).then(function(e){return e.length?JSON.parse(e):{}})},Mi=function(e,t){var i,n=function(e){var t=e;return t.indexOf(":")>=0&&(t=t.split(":")[0]),t.indexOf("#")>=0&&(t=t.split("#")[1]),t},s=(i=e.headers,Object.keys(i).find(function(e){return e.toLowerCase()==="x-amzn-errortype".toLowerCase()}));return void 0!==s?n(e.headers[s]):void 0!==t.code?n(t.code):void 0!==t.__type?n(t.__type):""},Ai=i(74052),Ti=function(e){function t(t){var i=e.call(this)||this;return i.input=t,i}return(0,Qt.__extends)(t,e),t.prototype.resolveMiddleware=function(e,t,i){this.middlewareStack.use((0,Ai.TM)(t,this.serialize,this.deserialize));var n=e.concat(this.middlewareStack),s={logger:t.logger,clientName:"PinpointClient",commandName:"PutEventsCommand",inputFilterSensitiveLog:ye.filterSensitiveLog,outputFilterSensitiveLog:Ce.filterSensitiveLog},r=t.requestHandler;return n.resolve(function(e){return r.handle(e.request,i||{})},s)},t.prototype.serialize=function(e,t){return function(e,t){return(0,Qt.__awaiter)(void 0,void 0,void 0,function(){var i,n,s,r,o,a,l,c,h;return(0,Qt.__generator)(this,function(d){switch(d.label){case 0:if(i={"content-type":"application/json"},n="/v1/apps/{ApplicationId}/events",void 0===e.ApplicationId)throw new Error("No value provided for input HTTP label: ApplicationId.");if((s=e.ApplicationId).length<=0)throw new Error("Empty value provided for input HTTP label: ApplicationId.");return n=n.replace("{ApplicationId}",(0,ei.$6)(s)),void 0!==e.EventsRequest&&(r=function(e,t){return(0,Qt.__assign)({},void 0!==e.BatchItem&&null!==e.BatchItem&&{BatchItem:mi(e.BatchItem,t)})}(e.EventsRequest,t)),void 0===r&&(r={}),r=JSON.stringify(r),[4,t.endpoint()];case 1:return o=d.sent(),a=o.hostname,l=o.protocol,c=void 0===l?"https":l,h=o.port,[2,new Jt.Kd({protocol:c,hostname:a,port:h,method:"POST",headers:i,path:n,body:r})]}})})}(e,t)},t.prototype.deserialize=function(e,t){return function(e,t){return(0,Qt.__awaiter)(void 0,void 0,void 0,function(){var i,n;return(0,Qt.__generator)(this,function(s){switch(s.label){case 0:return 202!==e.statusCode&&e.statusCode>=300?[2,ti(e,t)]:(i={$metadata:xi(e),EventsResponse:void 0},[4,Ei(e.body,t)]);case 1:return n=s.sent(),i.EventsResponse=function(e,t){return{Results:void 0!==e.Results&&null!==e.Results?wi(e.Results,t):void 0}}(n,t),[2,Promise.resolve(i)]}})})}(e,t)},t}(ei.uB),Di=function(e){function t(t){var i=e.call(this)||this;return i.input=t,i}return(0,Qt.__extends)(t,e),t.prototype.resolveMiddleware=function(e,t,i){this.middlewareStack.use((0,Ai.TM)(t,this.serialize,this.deserialize));var n=e.concat(this.middlewareStack),s={logger:t.logger,clientName:"PinpointClient",commandName:"UpdateEndpointCommand",inputFilterSensitiveLog:tt.filterSensitiveLog,outputFilterSensitiveLog:it.filterSensitiveLog},r=t.requestHandler;return n.resolve(function(e){return r.handle(e.request,i||{})},s)},t.prototype.serialize=function(e,t){return function(e,t){return(0,Qt.__awaiter)(void 0,void 0,void 0,function(){var i,n,s,r,o,a,l,c,h;return(0,Qt.__generator)(this,function(d){switch(d.label){case 0:if(i={"content-type":"application/json"},n="/v1/apps/{ApplicationId}/endpoints/{EndpointId}",void 0===e.ApplicationId)throw new Error("No value provided for input HTTP label: ApplicationId.");if((s=e.ApplicationId).length<=0)throw new Error("Empty value provided for input HTTP label: ApplicationId.");if(n=n.replace("{ApplicationId}",(0,ei.$6)(s)),void 0===e.EndpointId)throw new Error("No value provided for input HTTP label: EndpointId.");if((s=e.EndpointId).length<=0)throw new Error("Empty value provided for input HTTP label: EndpointId.");return n=n.replace("{EndpointId}",(0,ei.$6)(s)),void 0!==e.EndpointRequest&&(r=function(e,t){return(0,Qt.__assign)((0,Qt.__assign)((0,Qt.__assign)((0,Qt.__assign)((0,Qt.__assign)((0,Qt.__assign)((0,Qt.__assign)((0,Qt.__assign)((0,Qt.__assign)((0,Qt.__assign)((0,Qt.__assign)({},void 0!==e.Address&&null!==e.Address&&{Address:e.Address}),void 0!==e.Attributes&&null!==e.Attributes&&{Attributes:vi(e.Attributes,t)}),void 0!==e.ChannelType&&null!==e.ChannelType&&{ChannelType:e.ChannelType}),void 0!==e.Demographic&&null!==e.Demographic&&{Demographic:hi(e.Demographic)}),void 0!==e.EffectiveDate&&null!==e.EffectiveDate&&{EffectiveDate:e.EffectiveDate}),void 0!==e.EndpointStatus&&null!==e.EndpointStatus&&{EndpointStatus:e.EndpointStatus}),void 0!==e.Location&&null!==e.Location&&{Location:di(e.Location)}),void 0!==e.Metrics&&null!==e.Metrics&&{Metrics:pi(e.Metrics,t)}),void 0!==e.OptOut&&null!==e.OptOut&&{OptOut:e.OptOut}),void 0!==e.RequestId&&null!==e.RequestId&&{RequestId:e.RequestId}),void 0!==e.User&&null!==e.User&&{User:ui(e.User,t)})}(e.EndpointRequest,t)),void 0===r&&(r={}),r=JSON.stringify(r),[4,t.endpoint()];case 1:return o=d.sent(),a=o.hostname,l=o.protocol,c=void 0===l?"https":l,h=o.port,[2,new Jt.Kd({protocol:c,hostname:a,port:h,method:"PUT",headers:i,path:n,body:r})]}})})}(e,t)},t.prototype.deserialize=function(e,t){return function(e,t){return(0,Qt.__awaiter)(void 0,void 0,void 0,function(){var i,n;return(0,Qt.__generator)(this,function(s){switch(s.label){case 0:return 202!==e.statusCode&&e.statusCode>=300?[2,ii(e,t)]:(i={$metadata:xi(e),MessageBody:void 0},[4,Ei(e.body,t)]);case 1:return n=s.sent(),i.MessageBody=function(e){return{Message:void 0!==e.Message&&null!==e.Message?e.Message:void 0,RequestID:void 0!==e.RequestID&&null!==e.RequestID?e.RequestID:void 0}}(n),[2,Promise.resolve(i)]}})})}(e,t)},t}(ei.uB),Ii=i(54218),Ri=i(22292),Li=i(10078),ki=i(89556),Pi=i(68380),Ni=i(93972),Oi=i(39448),_i=i(31643),Fi="pinpoint.{region}.amazonaws.com",Gi=new Set(["af-south-1","ap-east-1","ap-northeast-1","ap-northeast-2","ap-south-1","ap-southeast-1","ap-southeast-2","ca-central-1","eu-central-1","eu-north-1","eu-south-1","eu-west-1","eu-west-2","eu-west-3","me-south-1","sa-east-1","us-east-1","us-east-2","us-west-1","us-west-2"]),Vi=new Set(["cn-north-1","cn-northwest-1"]),Bi=new Set(["us-iso-east-1"]),Hi=new Set(["us-isob-east-1"]),zi=new Set(["us-gov-east-1","us-gov-west-1"]),Ui={apiVersion:"2016-12-01",disableHostPrefix:!1,logger:{},regionInfoProvider:function(e,t){var i=void 0;switch(e){case"ap-northeast-1":i={hostname:"pinpoint.ap-northeast-1.amazonaws.com",partition:"aws",signingService:"mobiletargeting"};break;case"ap-northeast-2":i={hostname:"pinpoint.ap-northeast-2.amazonaws.com",partition:"aws",signingService:"mobiletargeting"};break;case"ap-south-1":i={hostname:"pinpoint.ap-south-1.amazonaws.com",partition:"aws",signingService:"mobiletargeting"};break;case"ap-southeast-1":i={hostname:"pinpoint.ap-southeast-1.amazonaws.com",partition:"aws",signingService:"mobiletargeting"};break;case"ap-southeast-2":i={hostname:"pinpoint.ap-southeast-2.amazonaws.com",partition:"aws",signingService:"mobiletargeting"};break;case"ca-central-1":i={hostname:"pinpoint.ca-central-1.amazonaws.com",partition:"aws",signingService:"mobiletargeting"};break;case"eu-central-1":i={hostname:"pinpoint.eu-central-1.amazonaws.com",partition:"aws",signingService:"mobiletargeting"};break;case"eu-west-1":i={hostname:"pinpoint.eu-west-1.amazonaws.com",partition:"aws",signingService:"mobiletargeting"};break;case"eu-west-2":i={hostname:"pinpoint.eu-west-2.amazonaws.com",partition:"aws",signingService:"mobiletargeting"};break;case"fips-us-east-1":i={hostname:"pinpoint-fips.us-east-1.amazonaws.com",partition:"aws",signingRegion:"us-east-1"};break;case"fips-us-gov-west-1":i={hostname:"pinpoint-fips.us-gov-west-1.amazonaws.com",partition:"aws-us-gov",signingRegion:"us-gov-west-1"};break;case"fips-us-west-2":i={hostname:"pinpoint-fips.us-west-2.amazonaws.com",partition:"aws",signingRegion:"us-west-2"};break;case"us-east-1":i={hostname:"pinpoint.us-east-1.amazonaws.com",partition:"aws",signingRegion:"us-east-1"};break;case"us-gov-west-1":i={hostname:"pinpoint.us-gov-west-1.amazonaws.com",partition:"aws-us-gov",signingRegion:"us-gov-west-1"};break;case"us-west-2":i={hostname:"pinpoint.us-west-2.amazonaws.com",partition:"aws",signingRegion:"us-west-2"};break;default:Gi.has(e)&&(i={hostname:Fi.replace("{region}",e),partition:"aws",signingService:"mobiletargeting"}),Vi.has(e)&&(i={hostname:"pinpoint.{region}.amazonaws.com.cn".replace("{region}",e),partition:"aws-cn"}),Bi.has(e)&&(i={hostname:"pinpoint.{region}.c2s.ic.gov".replace("{region}",e),partition:"aws-iso"}),Hi.has(e)&&(i={hostname:"pinpoint.{region}.sc2s.sgov.gov".replace("{region}",e),partition:"aws-iso-b"}),zi.has(e)&&(i={hostname:"pinpoint.{region}.amazonaws.com".replace("{region}",e),partition:"aws-us-gov",signingService:"mobiletargeting"}),void 0===i&&(i={hostname:Fi.replace("{region}",e),partition:"aws",signingService:"mobiletargeting"})}return Promise.resolve((0,Qt.__assign)({signingService:"mobiletargeting"},i))},serviceId:"Pinpoint",urlParser:i(2049).D},Wi=(0,Qt.__assign)((0,Qt.__assign)({},Ui),{runtime:"browser",base64Decoder:Pi.E,base64Encoder:Pi.n,bodyLengthChecker:Ni.n,credentialDefaultProvider:function(e){return function(){return Promise.reject(new Error("Credential is missing"))}},defaultUserAgentProvider:(0,Oi.m)({serviceId:Ui.serviceId,clientVersion:"3.6.1"}),maxAttempts:ki.Gz,region:(0,Li.B)("Region is missing"),requestHandler:new Ri.N,sha256:Ii.Sha256,streamCollector:Ri.k,utf8Decoder:_i.fromUtf8,utf8Encoder:_i.toUtf8}),ji=i(85775),Ki=i(23788),$i=i(14188),Yi=i(64996),qi=i(88428),Xi=i(44625),Zi=function(e){function t(t){var i=this,n=(0,Qt.__assign)((0,Qt.__assign)({},Wi),t),s=(0,ji.TD)(n),r=(0,ji.vJ)(s),o=(0,qi.k9)(r),a=(0,ki.$z)(o),l=(0,$i.OV)(a),c=(0,Xi.Dc)(l);return(i=e.call(this,c)||this).config=c,i.middlewareStack.use((0,qi.DF)(i.config)),i.middlewareStack.use((0,ki.ey)(i.config)),i.middlewareStack.use((0,Ki.vK)(i.config)),i.middlewareStack.use((0,$i.TC)(i.config)),i.middlewareStack.use((0,Yi.Y7)(i.config)),i.middlewareStack.use((0,Xi.sM)(i.config)),i}return(0,Qt.__extends)(t,e),t.prototype.destroy=function(){e.prototype.destroy.call(this)},t}(ei.Kj),Qi={keyPrefix:"aws-amplify-cache",capacityInBytes:1048576,itemMaxSize:21e4,defaultTTL:2592e5,defaultPriority:5,warningThreshold:.8,storage:(new(i(70870).i1)).getStorage()};function Ji(e){var t=0;t=e.length;for(var i=e.length;i>=0;i-=1){var n=e.charCodeAt(i);n>127&&n<=2047?t+=1:n>2047&&n<=65535&&(t+=2),n>=56320&&n<=57343&&(i-=1)}return t}function en(){return(new Date).getTime()}function tn(e){return Number.isInteger?Number.isInteger(e):function(e){return"number"==typeof e&&isFinite(e)&&Math.floor(e)===e}(e)}var nn,sn={},rn=(function(){function e(){}e.clear=function(){sn={}},e.getItem=function(e){return sn[e]||null},e.setItem=function(e,t){sn[e]=t},e.removeItem=function(e){delete sn[e]}}(),new n.C("StorageCache")),on=function(){function e(e){this.config=Object.assign({},e),this.cacheCurSizeKey=this.config.keyPrefix+"CurSize",this.checkConfig()}return e.prototype.getModuleName=function(){return"Cache"},e.prototype.checkConfig=function(){tn(this.config.capacityInBytes)||(rn.error("Invalid parameter: capacityInBytes. It should be an Integer. Setting back to default."),this.config.capacityInBytes=Qi.capacityInBytes),tn(this.config.itemMaxSize)||(rn.error("Invalid parameter: itemMaxSize. It should be an Integer. Setting back to default."),this.config.itemMaxSize=Qi.itemMaxSize),tn(this.config.defaultTTL)||(rn.error("Invalid parameter: defaultTTL. It should be an Integer. Setting back to default."),this.config.defaultTTL=Qi.defaultTTL),tn(this.config.defaultPriority)||(rn.error("Invalid parameter: defaultPriority. It should be an Integer. Setting back to default."),this.config.defaultPriority=Qi.defaultPriority),this.config.itemMaxSize>this.config.capacityInBytes&&(rn.error("Invalid parameter: itemMaxSize. It should be smaller than capacityInBytes. Setting back to default."),this.config.itemMaxSize=Qi.itemMaxSize),(this.config.defaultPriority>5||this.config.defaultPriority<1)&&(rn.error("Invalid parameter: defaultPriority. It should be between 1 and 5. Setting back to default."),this.config.defaultPriority=Qi.defaultPriority),(Number(this.config.warningThreshold)>1||Number(this.config.warningThreshold)<0)&&(rn.error("Invalid parameter: warningThreshold. It should be between 0 and 1. Setting back to default."),this.config.warningThreshold=Qi.warningThreshold),this.config.capacityInBytes>5242880&&(rn.error("Cache Capacity should be less than 5MB. Setting back to default. Setting back to default."),this.config.capacityInBytes=Qi.capacityInBytes)},e.prototype.fillCacheItem=function(e,t,i){var n={key:e,data:t,timestamp:en(),visitedTime:en(),priority:i.priority,expires:i.expires,type:typeof t,byteSize:0};return n.byteSize=Ji(JSON.stringify(n)),n.byteSize=Ji(JSON.stringify(n)),n},e.prototype.configure=function(e){return e?(e.keyPrefix&&rn.warn("Don't try to configure keyPrefix!"),this.config=Object.assign({},this.config,e,e.Cache),this.checkConfig(),this.config):this.config},e}(),an=(nn=function(e,t){return nn=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])},nn(e,t)},function(e,t){function i(){this.constructor=e}nn(e,t),e.prototype=null===t?Object.create(t):(i.prototype=t.prototype,new i)}),ln=new n.C("Cache"),cn=new(function(e){function t(t){var i=this,n=t?Object.assign({},Qi,t):Qi;return(i=e.call(this,n)||this).config.storage=n.storage,i.getItem=i.getItem.bind(i),i.setItem=i.setItem.bind(i),i.removeItem=i.removeItem.bind(i),i}return an(t,e),t.prototype._decreaseCurSizeInBytes=function(e){var t=this.getCacheCurSize();this.config.storage.setItem(this.cacheCurSizeKey,(t-e).toString())},t.prototype._increaseCurSizeInBytes=function(e){var t=this.getCacheCurSize();this.config.storage.setItem(this.cacheCurSizeKey,(t+e).toString())},t.prototype._refreshItem=function(e,t){return e.visitedTime=en(),this.config.storage.setItem(t,JSON.stringify(e)),e},t.prototype._isExpired=function(e){var t=this.config.storage.getItem(e),i=JSON.parse(t);return en()>=i.expires},t.prototype._removeItem=function(e,t){var i=t||JSON.parse(this.config.storage.getItem(e)).byteSize;this._decreaseCurSizeInBytes(i),this.config.storage.removeItem(e)},t.prototype._setItem=function(e,t){this._increaseCurSizeInBytes(t.byteSize);try{this.config.storage.setItem(e,JSON.stringify(t))}catch(e){this._decreaseCurSizeInBytes(t.byteSize),ln.error("Failed to set item "+e)}},t.prototype._sizeToPop=function(e){var t=this.getCacheCurSize()+e-this.config.capacityInBytes,i=(1-this.config.warningThreshold)*this.config.capacityInBytes;return t>i?t:i},t.prototype._isCacheFull=function(e){return e+this.getCacheCurSize()>this.config.capacityInBytes},t.prototype._findValidKeys=function(){for(var e=[],t=[],i=0;i<this.config.storage.length;i+=1)t.push(this.config.storage.key(i));for(i=0;i<t.length;i+=1){var n=t[i];0===n.indexOf(this.config.keyPrefix)&&n!==this.cacheCurSizeKey&&(this._isExpired(n)?this._removeItem(n):e.push(n))}return e},t.prototype._popOutItems=function(e,t){for(var i=[],n=t,s=0;s<e.length;s+=1){var r=this.config.storage.getItem(e[s]);if(null!=r){var o=JSON.parse(r);i.push(o)}}for(i.sort(function(e,t){return e.priority>t.priority?-1:e.priority<t.priority?1:e.visitedTime<t.visitedTime?-1:1}),s=0;s<i.length;s+=1)if(this._removeItem(i[s].key,i[s].byteSize),(n-=i[s].byteSize)<=0)return},t.prototype.setItem=function(e,t,i){ln.log("Set item: key is "+e+", value is "+t+" with options: "+i);var n=this.config.keyPrefix+e;if(n!==this.config.keyPrefix&&n!==this.cacheCurSizeKey)if(void 0!==t){var s={priority:i&&void 0!==i.priority?i.priority:this.config.defaultPriority,expires:i&&void 0!==i.expires?i.expires:this.config.defaultTTL+en()};if(s.priority<1||s.priority>5)ln.warn("Invalid parameter: priority due to out or range. It should be within 1 and 5.");else{var r=this.fillCacheItem(n,t,s);if(r.byteSize>this.config.itemMaxSize)ln.warn("Item with key: "+e+" you are trying to put into is too big!");else try{var o=this.config.storage.getItem(n);if(o&&this._removeItem(n,JSON.parse(o).byteSize),this._isCacheFull(r.byteSize)){var a=this._findValidKeys();if(this._isCacheFull(r.byteSize)){var l=this._sizeToPop(r.byteSize);this._popOutItems(a,l)}}this._setItem(n,r)}catch(e){ln.warn("setItem failed! "+e)}}}else ln.warn("The value of item should not be undefined!");else ln.warn("Invalid key: should not be empty or 'CurSize'")},t.prototype.getItem=function(e,t){ln.log("Get item: key is "+e+" with options "+t);var i=null,n=this.config.keyPrefix+e;if(n===this.config.keyPrefix||n===this.cacheCurSizeKey)return ln.warn("Invalid key: should not be empty or 'CurSize'"),null;try{if(null!=(i=this.config.storage.getItem(n))){if(!this._isExpired(n)){var s=JSON.parse(i);return(s=this._refreshItem(s,n)).data}this._removeItem(n,JSON.parse(i).byteSize),i=null}if(t&&void 0!==t.callback){var r=t.callback();return null!==r&&this.setItem(e,r,t),r}return null}catch(e){return ln.warn("getItem failed! "+e),null}},t.prototype.removeItem=function(e){ln.log("Remove item: key is "+e);var t=this.config.keyPrefix+e;if(t!==this.config.keyPrefix&&t!==this.cacheCurSizeKey)try{var i=this.config.storage.getItem(t);i&&this._removeItem(t,JSON.parse(i).byteSize)}catch(e){ln.warn("removeItem failed! "+e)}},t.prototype.clear=function(){ln.log("Clear Cache");for(var e=[],t=0;t<this.config.storage.length;t+=1){var i=this.config.storage.key(t);0===i.indexOf(this.config.keyPrefix)&&e.push(i)}try{for(t=0;t<e.length;t+=1)this.config.storage.removeItem(e[t])}catch(e){ln.warn("clear failed! "+e)}},t.prototype.getAllKeys=function(){for(var e=[],t=0;t<this.config.storage.length;t+=1){var i=this.config.storage.key(t);0===i.indexOf(this.config.keyPrefix)&&i!==this.cacheCurSizeKey&&e.push(i.substring(this.config.keyPrefix.length))}return e},t.prototype.getCacheCurSize=function(){var e=this.config.storage.getItem(this.cacheCurSizeKey);return e||(this.config.storage.setItem(this.cacheCurSizeKey,"0"),e="0"),Number(e)},t.prototype.createInstance=function(e){return e.keyPrefix&&e.keyPrefix!==Qi.keyPrefix||(ln.error("invalid keyPrefix, setting keyPrefix with timeStamp"),e.keyPrefix=en.toString()),new t(e)},t}(on));const hn=cn;o.HA.register(cn);var dn=i(16699),un=function(e,t){var i="function"==typeof Symbol&&e[Symbol.iterator];if(!i)return e;var n,s,r=i.call(e),o=[];try{for(;(void 0===t||t-- >0)&&!(n=r.next()).done;)o.push(n.value)}catch(e){s={error:e}}finally{try{n&&!n.done&&(i=r.return)&&i.call(r)}finally{if(s)throw s.error}}return o},pn=new n.C("EventsBuffer"),gn=[429,500],fn=[202];const mn=function(){function e(e,t){this._pause=!1,this._flush=!1,pn.debug("Instantiating buffer with config:",t),this._buffer=[],this._client=e,this._config=t,this._sendBatch=this._sendBatch.bind(this),this._startLoop()}return e.prototype.push=function(e){var t;if(this._buffer.length>=this._config.bufferSize)return pn.debug("Exceeded analytics events buffer size"),e.handlers.reject(new Error("Exceeded the size of analytics events buffer"));var i=((t={})[e.params.event.eventId]=e,t);this._buffer.push(i)},e.prototype.pause=function(){this._pause=!0},e.prototype.resume=function(){this._pause=!1},e.prototype.updateClient=function(e){this._client=e},e.prototype.flush=function(){this._flush=!0},e.prototype._startLoop=function(){this._interval&&clearInterval(this._interval);var e=this._config.flushInterval;this._interval=setInterval(this._sendBatch,e)},e.prototype._sendBatch=function(){var e=this._buffer.length;if(this._flush&&!e&&clearInterval(this._interval),!this._pause&&e){var t=this._config.flushSize,i=Math.min(t,e),n=this._buffer.splice(0,i);this._putEvents(n)}},e.prototype._putEvents=function(e){return t=this,i=void 0,s=function(){var t,i,n,s,r;return function(e,t){var i,n,s,r,o={label:0,sent:function(){if(1&s[0])throw s[1];return s[1]},trys:[],ops:[]};return r={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(r[Symbol.iterator]=function(){return this}),r;function a(r){return function(a){return function(r){if(i)throw new TypeError("Generator is already executing.");for(;o;)try{if(i=1,n&&(s=2&r[0]?n.return:r[0]?n.throw||((s=n.return)&&s.call(n),0):n.next)&&!(s=s.call(n,r[1])).done)return s;switch(n=0,s&&(r=[2&r[0],s.value]),r[0]){case 0:case 1:s=r;break;case 4:return o.label++,{value:r[1],done:!1};case 5:o.label++,n=r[1],r=[0];continue;case 7:r=o.ops.pop(),o.trys.pop();continue;default:if(!((s=(s=o.trys).length>0&&s[s.length-1])||6!==r[0]&&2!==r[0])){o=0;continue}if(3===r[0]&&(!s||r[1]>s[0]&&r[1]<s[3])){o.label=r[1];break}if(6===r[0]&&o.label<s[1]){o.label=s[1],s=r;break}if(s&&o.label<s[2]){o.label=s[2],o.ops.push(r);break}s[2]&&o.ops.pop(),o.trys.pop();continue}r=t.call(e,o)}catch(e){r=[6,e],n=0}finally{i=s=0}if(5&r[0])throw r[1];return{value:r[0]?r[1]:void 0,done:!0}}([r,a])}}}(this,function(o){switch(o.label){case 0:t=this._bufferToMap(e),i=this._generateBatchEventParams(t),o.label=1;case 1:return o.trys.push([1,3,,4]),n=new Ti(i),[4,this._client.send(n)];case 2:return s=o.sent(),this._processPutEventsSuccessResponse(s,t),[3,4];case 3:return r=o.sent(),[2,this._handlePutEventsFailure(r,t)];case 4:return[2]}})},new((n=void 0)||(n=Promise))(function(e,r){function o(e){try{l(s.next(e))}catch(e){r(e)}}function a(e){try{l(s.throw(e))}catch(e){r(e)}}function l(t){var i;t.done?e(t.value):(i=t.value,i instanceof n?i:new n(function(e){e(i)})).then(o,a)}l((s=s.apply(t,i||[])).next())});var t,i,n,s},e.prototype._generateBatchEventParams=function(e){var t={ApplicationId:"",EventsRequest:{BatchItem:{}}};return Object.values(e).forEach(function(e){var i=e.params,n=i.event,s=i.timestamp,r=i.config,o=n.name,a=n.attributes,l=n.metrics,c=n.eventId,h=n.session,d=r.appId,u=r.endpointId,p=t.EventsRequest.BatchItem;t.ApplicationId=t.ApplicationId||d,p[u]||(p[u]={Endpoint:{},Events:{}}),p[u].Events[c]={EventType:o,Timestamp:new Date(s).toISOString(),Attributes:a,Metrics:l,Session:h}}),t},e.prototype._handlePutEventsFailure=function(e,t){pn.debug("_putEvents Failed: ",e);var i=e.$metadata&&e.$metadata.httpStatusCode;if(gn.includes(i)){var n=Object.values(t);this._retry(n)}},e.prototype._processPutEventsSuccessResponse=function(e,t){var i=e.EventsResponse.Results,n=[];Object.entries(i).forEach(function(e){var i=un(e,2),s=i[0],r=i[1].EventsItemResponse;Object.entries(r).forEach(function(e){var i,r,o=un(e,2),a=o[0],l=o[1],c=l.StatusCode,h=l.Message,d=t[a],u={EventsResponse:{Results:(i={},i[s]={EventsItemResponse:(r={},r[a]={StatusCode:c,Message:h},r)},i)}};if(fn.includes(c))d.handlers.resolve(u);else{if(!gn.includes(c)){var p=d.params.event.name;return pn.error("event "+a+" : "+p+" failed with error: "+h),d.handlers.reject(u)}n.push(d)}})}),n.length&&this._retry(n)},e.prototype._retry=function(e){var t,i=[];e.forEach(function(e){var t,n=e.params,s=n.event,r=s.eventId,o=s.name;if(n.resendLimit-- >0)return pn.debug("resending event "+r+" : "+o+" with "+n.resendLimit+" retry attempts remaining"),void i.push((t={},t[r]=e,t));pn.debug("no retry attempts remaining for event "+r+" : "+o)}),(t=this._buffer).unshift.apply(t,function(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(un(arguments[t]));return e}(i))},e.prototype._bufferToMap=function(e){return e.reduce(function(e,t){var i=un(Object.entries(t),1),n=un(i[0],2),s=n[0],r=n[1];return e[s]=r,e},{})},e}();var vn=function(){return vn=Object.assign||function(e){for(var t,i=1,n=arguments.length;i<n;i++)for(var s in t=arguments[i])Object.prototype.hasOwnProperty.call(t,s)&&(e[s]=t[s]);return e},vn.apply(this,arguments)},yn=function(e,t,i,n){return new(i||(i=Promise))(function(s,r){function o(e){try{l(n.next(e))}catch(e){r(e)}}function a(e){try{l(n.throw(e))}catch(e){r(e)}}function l(e){var t;e.done?s(e.value):(t=e.value,t instanceof i?t:new i(function(e){e(t)})).then(o,a)}l((n=n.apply(e,t||[])).next())})},Cn=function(e,t){var i,n,s,r,o={label:0,sent:function(){if(1&s[0])throw s[1];return s[1]},trys:[],ops:[]};return r={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(r[Symbol.iterator]=function(){return this}),r;function a(r){return function(a){return function(r){if(i)throw new TypeError("Generator is already executing.");for(;o;)try{if(i=1,n&&(s=2&r[0]?n.return:r[0]?n.throw||((s=n.return)&&s.call(n),0):n.next)&&!(s=s.call(n,r[1])).done)return s;switch(n=0,s&&(r=[2&r[0],s.value]),r[0]){case 0:case 1:s=r;break;case 4:return o.label++,{value:r[1],done:!1};case 5:o.label++,n=r[1],r=[0];continue;case 7:r=o.ops.pop(),o.trys.pop();continue;default:if(!((s=(s=o.trys).length>0&&s[s.length-1])||6!==r[0]&&2!==r[0])){o=0;continue}if(3===r[0]&&(!s||r[1]>s[0]&&r[1]<s[3])){o.label=r[1];break}if(6===r[0]&&o.label<s[1]){o.label=s[1],s=r;break}if(s&&o.label<s[2]){o.label=s[2],o.ops.push(r);break}s[2]&&o.ops.pop(),o.trys.pop();continue}r=t.call(e,o)}catch(e){r=[6,e],n=0}finally{i=s=0}if(5&r[0])throw r[1];return{value:r[0]?r[1]:void 0,done:!0}}([r,a])}}},bn=function(e,t){var i={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(i[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var s=0;for(n=Object.getOwnPropertySymbols(e);s<n.length;s++)t.indexOf(n[s])<0&&Object.prototype.propertyIsEnumerable.call(e,n[s])&&(i[n[s]]=e[n[s]])}return i},Sn="undefined"!=typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("amplify_default"):"@@amplify_default",wn=function(e,t){s.YZ.dispatch("analytics",{event:e,data:t},"Analytics",Sn)},xn=new n.C("AWSPinpointProvider"),En=[429,500],Mn=[202],An="_update_endpoint",Tn="_session.stop",Dn="undefined"!=typeof navigator&&navigator&&"function"==typeof navigator.sendBeacon,In=function(){function e(e){this._endpointGenerating=!0,this._endpointUpdateInProgress=!1,this._buffer=null,this._endpointBuffer=[],this._config=e||{},this._config.bufferSize=this._config.bufferSize||1e3,this._config.flushSize=this._config.flushSize||100,this._config.flushInterval=this._config.flushInterval||5e3,this._config.resendLimit=this._config.resendLimit||5,this._clientInfo=Lt.clientInfo()}return e.prototype.getCategory=function(){return e.category},e.prototype.getProviderName=function(){return e.providerName},e.prototype.configure=function(e){var t=this;xn.debug("configure Analytics",e);var i=e||{};if(this._config=Object.assign({},this._config,i),this._endpointGenerating=!!e.autoSessionRecord,this._config.appId&&!this._config.disabled)if(this._config.endpointId)wn("pinpointProvider_configured",null);else{var n=this.getProviderName()+"_"+this._config.appId;this._getEndpointId(n).then(function(e){xn.debug("setting endpoint id from the cache",e),t._config.endpointId=e,wn("pinpointProvider_configured",null)}).catch(function(e){xn.debug("Failed to generate endpointId",e)})}else this._flushBuffer();return this._config},e.prototype.record=function(e,t){return yn(this,void 0,void 0,function(){var i,n;return Cn(this,function(s){switch(s.label){case 0:return xn.debug("_public record",e),[4,this._getCredentials()];case 1:return(i=s.sent())&&this._config.appId&&this._config.region?(this._initClients(i),n=(new Date).getTime(),this._generateSession(e),e.event.eventId=(0,dn.v1)(),Object.assign(e,{timestamp:n,config:this._config}),e.event.immediate?[2,this._send(e,t)]:(this._putToBuffer(e,t),[2])):(xn.debug("cannot send events without credentials, applicationId or region"),[2,t.reject(new Error("No credentials, applicationId or region"))])}})})},e.prototype._sendEndpointUpdate=function(e){return yn(this,void 0,void 0,function(){var t;return Cn(this,function(i){switch(i.label){case 0:return this._endpointUpdateInProgress?(this._endpointBuffer.push(e),[2]):(this._endpointUpdateInProgress=!0,[4,this._updateEndpoint(e)]);case 1:return i.sent(),t=this._endpointBuffer.shift(),this._endpointUpdateInProgress=!1,t&&this._sendEndpointUpdate(t),[2]}})})},e.prototype._putToBuffer=function(e,t){e.event.name!==An?this._buffer&&this._buffer.push({params:e,handlers:t}):this._sendEndpointUpdate({params:e,handlers:t})},e.prototype._generateSession=function(e){this._sessionId=this._sessionId||(0,dn.v1)();var t=e.event;switch(t.name){case"_session.start":this._sessionStartTimestamp=(new Date).getTime(),this._sessionId=(0,dn.v1)(),t.session={Id:this._sessionId,StartTimestamp:new Date(this._sessionStartTimestamp).toISOString()};break;case Tn:var i=(new Date).getTime();this._sessionStartTimestamp=this._sessionStartTimestamp||(new Date).getTime(),this._sessionId=this._sessionId||(0,dn.v1)(),t.session={Id:this._sessionId,Duration:i-this._sessionStartTimestamp,StartTimestamp:new Date(this._sessionStartTimestamp).toISOString(),StopTimestamp:new Date(i).toISOString()},this._sessionId=void 0,this._sessionStartTimestamp=void 0;break;default:this._sessionStartTimestamp=this._sessionStartTimestamp||(new Date).getTime(),this._sessionId=this._sessionId||(0,dn.v1)(),t.session={Id:this._sessionId,StartTimestamp:new Date(this._sessionStartTimestamp).toISOString()}}},e.prototype._send=function(e,t){return yn(this,void 0,void 0,function(){return Cn(this,function(i){switch(e.event.name){case An:return[2,this._updateEndpoint({params:e,handlers:t})];case Tn:return[2,this._pinpointSendStopSession(e,t)];default:return[2,this._pinpointPutEvents(e,t)]}return[2]})})},e.prototype._generateBatchItemContext=function(e){var t,i=e.event,n=e.timestamp,s=e.config,r=i.name,o=i.attributes,a=i.metrics,l=i.eventId,c=i.session,h=s.appId,d=s.endpointId,u={ApplicationId:h,EventsRequest:{BatchItem:{}}},p={Endpoint:{}};return p.Events=((t={})[l]={EventType:r,Timestamp:new Date(n).toISOString(),Attributes:o,Metrics:a,Session:c},t),u.EventsRequest.BatchItem[d]=p,u},e.prototype._pinpointPutEvents=function(e,t){return yn(this,void 0,void 0,function(){var i,n,s,r,o,a,l,c,h,d,u;return Cn(this,function(p){switch(p.label){case 0:i=e.event.eventId,n=e.config.endpointId,s=this._generateBatchItemContext(e),r=new Ti(s),p.label=1;case 1:return p.trys.push([1,3,,4]),[4,this.pinpointClient.send(r)];case 2:return o=p.sent(),a=n,l=i,c=o.EventsResponse.Results[a].EventsItemResponse[l],h=c.StatusCode,d=c.Message,Mn.includes(h)?(xn.debug("record event success. ",o),[2,t.resolve(o)]):En.includes(h)?(this._retry(e,t),[3,4]):(xn.error("Event "+i+" is not accepted, the error is "+d),[2,t.reject(o)]);case 3:return u=p.sent(),this._eventError(u),[2,t.reject(u)];case 4:return[2]}})})},e.prototype._pinpointSendStopSession=function(e,t){if(Dn){var i=this._generateBatchItemContext(e),n=this._config.region,s=i.ApplicationId,r=i.EventsRequest,o={secret_key:this._config.credentials.secretAccessKey,access_key:this._config.credentials.accessKeyId,session_token:this._config.credentials.sessionToken},a="https://pinpoint."+n+".amazonaws.com/v1/apps/"+s+"/events/legacy",l=JSON.stringify(r),c={url:a,body:l,method:"POST"},h={region:n,service:"mobiletargeting"},d=Yt.signUrl(c,o,h,null);return navigator.sendBeacon(d,l)?t.resolve("sendBeacon success"):t.reject("sendBeacon failure")}this._pinpointPutEvents(e,t)},e.prototype._retry=function(e,t){var i=e.config.resendLimit;e.resendLimit="number"==typeof e.resendLimit?e.resendLimit:i,e.resendLimit-- >0?(xn.debug("resending event "+e.eventName+" with "+e.resendLimit+" retry times left"),this._pinpointPutEvents(e,t)):xn.debug("retry times used up for event "+e.eventName)},e.prototype._updateEndpoint=function(e){return yn(this,void 0,void 0,function(){var t,i,n,s,r,o,a,l,c,h,d,u;return Cn(this,function(p){switch(p.label){case 0:t=e.params,i=e.handlers,n=t.config,s=t.event,r=n.appId,o=n.endpointId,a=this._endpointRequest(n,qt.JS.transferKeyToLowerCase(s,[],["attributes","userAttributes","Attributes","UserAttributes"])),l={ApplicationId:r,EndpointId:o,EndpointRequest:a},p.label=1;case 1:return p.trys.push([1,3,,4]),c=new Di(l),[4,this.pinpointClient.send(c)];case 2:return h=p.sent(),xn.debug("updateEndpoint success",h),this._endpointGenerating=!1,this._resumeBuffer(),i.resolve(h),[2];case 3:return d=p.sent(),u={err:d,update_params:l,endpointObject:e},[2,this._handleEndpointUpdateFailure(u)];case 4:return[2]}})})},e.prototype._handleEndpointUpdateFailure=function(e){return yn(this,void 0,void 0,function(){var t,i,n;return Cn(this,function(s){return t=e.err,i=e.endpointObject,n=t.$metadata&&t.$metadata.httpStatusCode,xn.debug("updateEndpoint error",t),403===n?[2,this._handleEndpointUpdateForbidden(e)]:En.includes(n)?[2,this._retryEndpointUpdate(i,!0)]:(xn.error("updateEndpoint failed",t),i.handlers.reject(t),[2])})})},e.prototype._handleEndpointUpdateForbidden=function(e){var t=e.err,i=e.endpointObject,n=t.code,s=t.retryable;if("ExpiredTokenException"!==n&&!s)return i.handlers.reject(t);this._retryEndpointUpdate(i)},e.prototype._retryEndpointUpdate=function(e,t){void 0===t&&(t=!1),xn.debug("_retryEndpointUpdate",e);var i=e.params,n=i.config.resendLimit;if(i.resendLimit="number"==typeof i.resendLimit?i.resendLimit:n,i.resendLimit-- >0)return xn.debug("resending endpoint update "+i.event.eventId+" with "+i.resendLimit+" retry attempts remaining"),void(this._endpointBuffer.length?this._endpointBuffer.unshift(e):this._updateEndpoint(e));xn.warn("resending endpoint update "+i.event.eventId+" failed after "+i.config.resendLimit+" attempts"),this._endpointGenerating&&xn.error("Initial endpoint update failed. ")},e.prototype._initClients=function(e){return yn(this,void 0,void 0,function(){var t,i;return Cn(this,function(n){return xn.debug("init clients"),this.pinpointClient&&this._config.credentials&&this._config.credentials.sessionToken===e.sessionToken&&this._config.credentials.identityId===e.identityId?(xn.debug("no change for aws credentials, directly return from init"),[2]):(t=this._config.credentials?this._config.credentials.identityId:null,this._config.credentials=e,i=this._config.region,xn.debug("init clients with credentials",e),this.pinpointClient=new Zi({region:i,credentials:e,customUserAgent:(0,Xt.fE)()}),this.pinpointClient.middlewareStack.addRelativeTo(function(e){return function(t){return delete t.request.headers["amz-sdk-invocation-id"],delete t.request.headers["amz-sdk-request"],e(t)}},{step:"finalizeRequest",relation:"after",toMiddleware:"retryMiddleware"}),this._bufferExists()&&t===e.identityId?this._updateBufferClient():this._initBuffer(),this._customizePinpointClientReq(),[2])})})},e.prototype._bufferExists=function(){return this._buffer&&this._buffer instanceof mn},e.prototype._initBuffer=function(){this._bufferExists()&&this._flushBuffer(),this._buffer=new mn(this.pinpointClient,this._config),this._endpointGenerating&&this._buffer.pause()},e.prototype._updateBufferClient=function(){this._bufferExists()&&this._buffer.updateClient(this.pinpointClient)},e.prototype._flushBuffer=function(){this._bufferExists()&&(this._buffer.flush(),this._buffer=null)},e.prototype._resumeBuffer=function(){this._bufferExists()&&this._buffer.resume()},e.prototype._customizePinpointClientReq=function(){},e.prototype._getEndpointId=function(e){return yn(this,void 0,void 0,function(){var t,i;return Cn(this,function(n){switch(n.label){case 0:return[4,hn.getItem(e)];case 1:return t=n.sent(),xn.debug("endpointId from cache",t,"type",typeof t),t||(t=(0,dn.v1)(),i=(new Date).getTime()+31536e8,hn.setItem(e,t,{expires:i,priority:1})),[2,t]}})})},e.prototype._endpointRequest=function(e,t){var i=e.credentials,n=this._clientInfo||{},s=e.clientContext||{},r=e.endpoint||{},o={appVersion:n.appVersion,make:n.make,model:n.model,modelVersion:n.version,platform:n.platform},a=(s.clientId,s.appTitle,s.appVersionName,s.appVersionCode,s.appPackageName,bn(s,["clientId","appTitle","appVersionName","appVersionCode","appPackageName"])),l=t.address?"android"===n.platform?"GCM":"APNS":void 0,c=vn(vn(vn({channelType:l,requestId:(0,dn.v1)(),effectiveDate:(new Date).toISOString()},r),t),{attributes:vn(vn({},r.attributes),t.attributes),demographic:vn(vn(vn(vn({},o),a),r.demographic),t.demographic),location:vn(vn({},r.location),t.location),metrics:vn(vn({},r.metrics),t.metrics),user:{userId:t.userId||r.userId||i.identityId,userAttributes:vn(vn({},r.userAttributes),t.userAttributes)}}),h=(c.userId,c.userAttributes,c.name,c.session,c.eventId,c.immediate,bn(c,["userId","userAttributes","name","session","eventId","immediate"]));return qt.JS.transferKeyToUpperCase(h,[],["metrics","userAttributes","attributes"])},e.prototype._eventError=function(e){xn.error("record event failed.",e),xn.warn('Please ensure you have updated your Pinpoint IAM Policy with the Action: "mobiletargeting:PutEvents" in order to record events')},e.prototype._getCredentials=function(){return yn(this,void 0,void 0,function(){var e,t;return Cn(this,function(i){switch(i.label){case 0:return i.trys.push([0,2,,3]),[4,Zt.Ji.get()];case 1:return(e=i.sent())?(xn.debug("set credentials for analytics",e),[2,Zt.Ji.shear(e)]):[2,null];case 2:return t=i.sent(),xn.debug("ensure credentials error",t),[2,null];case 3:return[2]}})})},e.category="Analytics",e.providerName="AWSPinpoint",e}(),Rn=function(e,t){var i="function"==typeof Symbol&&e[Symbol.iterator];if(!i)return e;var n,s,r=i.call(e),o=[];try{for(;(void 0===t||t-- >0)&&!(n=r.next()).done;)o.push(n.value)}catch(e){s={error:e}}finally{try{n&&!n.done&&(i=r.return)&&i.call(r)}finally{if(s)throw s.error}}return o},Ln=[],kn=function(){function e(e,t){this.context=e,this.methodName=t,this._originalMethod=e[t].bind(e)}return e.add=function(e,t,i){Pn(e,t).set(i)},e.remove=function(e,t){Pn(e,t).remove()},e.prototype.set=function(e){var t=this;this.context[this.methodName]=function(){for(var i=[],n=0;n<arguments.length;n++)i[n]=arguments[n];return e(t._originalMethod.apply(t,function(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(Rn(arguments[t]));return e}(i)))}},e.prototype.remove=function(){this.context[this.methodName]=this._originalMethod},e}();function Pn(e,t){var i=Ln.filter(function(i){return i.context===e&&i.methodName===t})[0];return i||(i=new kn(e,t),Ln.push(i)),i}var Nn=function(e,t,i,n){return new(i||(i=Promise))(function(s,r){function o(e){try{l(n.next(e))}catch(e){r(e)}}function a(e){try{l(n.throw(e))}catch(e){r(e)}}function l(e){var t;e.done?s(e.value):(t=e.value,t instanceof i?t:new i(function(e){e(t)})).then(o,a)}l((n=n.apply(e,t||[])).next())})},On=function(e,t){var i,n,s,r,o={label:0,sent:function(){if(1&s[0])throw s[1];return s[1]},trys:[],ops:[]};return r={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(r[Symbol.iterator]=function(){return this}),r;function a(r){return function(a){return function(r){if(i)throw new TypeError("Generator is already executing.");for(;o;)try{if(i=1,n&&(s=2&r[0]?n.return:r[0]?n.throw||((s=n.return)&&s.call(n),0):n.next)&&!(s=s.call(n,r[1])).done)return s;switch(n=0,s&&(r=[2&r[0],s.value]),r[0]){case 0:case 1:s=r;break;case 4:return o.label++,{value:r[1],done:!1};case 5:o.label++,n=r[1],r=[0];continue;case 7:r=o.ops.pop(),o.trys.pop();continue;default:if(!((s=(s=o.trys).length>0&&s[s.length-1])||6!==r[0]&&2!==r[0])){o=0;continue}if(3===r[0]&&(!s||r[1]>s[0]&&r[1]<s[3])){o.label=r[1];break}if(6===r[0]&&o.label<s[1]){o.label=s[1],s=r;break}if(s&&o.label<s[2]){o.label=s[2],o.ops.push(r);break}s[2]&&o.ops.pop(),o.trys.pop();continue}r=t.call(e,o)}catch(e){r=[6,e],n=0}finally{i=s=0}if(5&r[0])throw r[1];return{value:r[0]?r[1]:void 0,done:!0}}([r,a])}}},_n=new n.C("PageViewTracker"),Fn="aws-amplify-analytics-prevUrl",Gn={enable:!1,provider:"AWSPinpoint",getUrl:function(){return qt.JS.browserOrNode().isBrowser?window.location.origin+window.location.pathname:""}},Vn=function(){function e(e,t){_n.debug("initialize pageview tracker with opts",t),this._config=Object.assign({},Gn,t),this._tracker=e,this._hasEnabled=!1,this._trackFunc=this._trackFunc.bind(this),"SPA"===this._config.type?this._pageViewTrackSPA():this._pageViewTrackDefault()}return e.prototype.configure=function(e){return Object.assign(this._config,e),"SPA"===this._config.type&&this._pageViewTrackSPA(),this._config},e.prototype._isSameUrl=function(){return sessionStorage.getItem(Fn)===this._config.getUrl()&&(_n.debug("the url is same"),!0)},e.prototype._pageViewTrackDefault=function(){return Nn(this,void 0,void 0,function(){var e,t,i,n;return On(this,function(s){switch(s.label){case 0:return qt.JS.browserOrNode().isBrowser&&window.addEventListener&&window.sessionStorage?(e=this._config.getUrl(),"function"!=typeof this._config.attributes?[3,2]:[4,this._config.attributes()]):(_n.debug("not in the supported web enviroment"),[2]);case 1:return i=s.sent(),[3,3];case 2:i=this._config.attributes,s.label=3;case 3:return t=i,n=Object.assign({url:e},t),this._config.enable&&!this._isSameUrl()&&(this._tracker({name:this._config.eventName||"pageView",attributes:n},this._config.provider).catch(function(e){_n.debug("Failed to record the page view event",e)}),sessionStorage.setItem(Fn,e)),[2]}})})},e.prototype._trackFunc=function(){return Nn(this,void 0,void 0,function(){var e,t,i,n;return On(this,function(s){switch(s.label){case 0:return qt.JS.browserOrNode().isBrowser&&window.addEventListener&&history.pushState&&window.sessionStorage?(e=this._config.getUrl(),"function"!=typeof this._config.attributes?[3,2]:[4,this._config.attributes()]):(_n.debug("not in the supported web enviroment"),[2]);case 1:return i=s.sent(),[3,3];case 2:i=this._config.attributes,s.label=3;case 3:return t=i,n=Object.assign({url:e},t),this._isSameUrl()||(this._tracker({name:this._config.eventName||"pageView",attributes:n},this._config.provider).catch(function(e){_n.debug("Failed to record the page view event",e)}),sessionStorage.setItem(Fn,e)),[2]}})})},e.prototype._pageViewTrackSPA=function(){qt.JS.browserOrNode().isBrowser&&window.addEventListener&&history.pushState?this._config.enable&&!this._hasEnabled?(kn.add(history,"pushState",this._trackFunc),kn.add(history,"replaceState",this._trackFunc),window.addEventListener("popstate",this._trackFunc),this._trackFunc(),this._hasEnabled=!0):(kn.remove(history,"pushState"),kn.remove(history,"replaceState"),window.removeEventListener("popstate",this._trackFunc),this._hasEnabled=!1):_n.debug("not in the supported web enviroment")},e}();const Bn=Vn;var Hn=qt.JS.browserOrNode().isBrowser&&window.Element?window.Element.prototype:null,zn=Hn?Hn.matches||Hn.matchesSelector||Hn.webkitMatchesSelector||Hn.mozMatchesSelector||Hn.msMatchesSelector||Hn.oMatchesSelector:null;function Un(e,t){if(e&&1===e.nodeType&&t){if("string"==typeof t||1===t.nodeType)return e===t||Wn(e,t);if("length"in t)for(var i=0,n=void 0;n=t[i];i++)if(e===n||Wn(e,n))return!0}return!1}function Wn(e,t){if("string"!=typeof t)return!1;if(zn)return zn.call(e,t);for(var i=e.parentNode.querySelectorAll(t),n=0,s=void 0;s=i[n];n++)if(s===e)return!0;return!1}var jn=new n.C("EventTracker"),Kn={enable:!1,events:["click"],selectorPrefix:"data-amplify-analytics-",provider:"AWSPinpoint"};const $n=function(){function e(e,t){qt.JS.browserOrNode().isBrowser&&window.addEventListener?(this._config=Object.assign({},Kn,t),this._tracker=e,this._delegates={},this._trackFunc=this._trackFunc.bind(this),jn.debug("initialize pageview tracker with opts",this._config),this.configure(this._config)):jn.debug("not in the supported web environment")}return e.prototype.configure=function(e){var t=this;if(Object.assign(this._config,e),this._config.enable){if(this._config.enable&&0===Object.keys(this._delegates).length){var i="["+this._config.selectorPrefix+"on]";this._config.events.forEach(function(e){t._delegates[e]=function(e,t,i,n,s){void 0===s&&(s={});var r=function(e){var t;if(s.composed&&"function"==typeof e.composedPath)for(var r=e.composedPath(),o=0,a=void 0;a=r[o];o++)1===a.nodeType&&Un(a,i)&&(t=a);else t=function(e,t,i){if(void 0===i&&(i=!1),e&&1===e.nodeType&&t)for(var n,s=(i?[e]:[]).concat(function(e){for(var t=[],i=e;i&&i.parentNode&&1===i.parentNode.nodeType;)i=i.parentNode,t.push(i);return t}(e)),r=0;n=s[r];r++)if(Un(n,t))return n}(e.target,i,!0);t&&n.call(t,e,t)};return e.addEventListener(t,r,s.useCapture),{destroy:function(){e.removeEventListener(t,r,s.useCapture)}}}(document,e,i,t._trackFunc,{composed:!0,useCapture:!0})})}}else Object.keys(this._delegates).forEach(function(e){"function"==typeof t._delegates[e].destroy&&t._delegates[e].destroy()}),this._delegates={};return this._config},e.prototype._trackFunc=function(e,t){return i=this,n=void 0,r=function(){var i,n,s,r,o,a,l;return function(e,t){var i,n,s,r,o={label:0,sent:function(){if(1&s[0])throw s[1];return s[1]},trys:[],ops:[]};return r={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(r[Symbol.iterator]=function(){return this}),r;function a(r){return function(a){return function(r){if(i)throw new TypeError("Generator is already executing.");for(;o;)try{if(i=1,n&&(s=2&r[0]?n.return:r[0]?n.throw||((s=n.return)&&s.call(n),0):n.next)&&!(s=s.call(n,r[1])).done)return s;switch(n=0,s&&(r=[2&r[0],s.value]),r[0]){case 0:case 1:s=r;break;case 4:return o.label++,{value:r[1],done:!1};case 5:o.label++,n=r[1],r=[0];continue;case 7:r=o.ops.pop(),o.trys.pop();continue;default:if(!((s=(s=o.trys).length>0&&s[s.length-1])||6!==r[0]&&2!==r[0])){o=0;continue}if(3===r[0]&&(!s||r[1]>s[0]&&r[1]<s[3])){o.label=r[1];break}if(6===r[0]&&o.label<s[1]){o.label=s[1],s=r;break}if(s&&o.label<s[2]){o.label=s[2],o.ops.push(r);break}s[2]&&o.ops.pop(),o.trys.pop();continue}r=t.call(e,o)}catch(e){r=[6,e],n=0}finally{i=s=0}if(5&r[0])throw r[1];return{value:r[0]?r[1]:void 0,done:!0}}([r,a])}}}(this,function(c){switch(c.label){case 0:return i={},n=t.getAttribute(this._config.selectorPrefix+"on").split(/\s*,\s*/),s=t.getAttribute(this._config.selectorPrefix+"name"),(r=t.getAttribute(this._config.selectorPrefix+"attrs"))&&r.split(/\s*,\s*/).forEach(function(e){var t=e.trim().split(/\s*:\s*/);i[t[0]]=t[1]}),"function"!=typeof this._config.attributes?[3,2]:[4,this._config.attributes()];case 1:return a=c.sent(),[3,3];case 2:a=this._config.attributes,c.label=3;case 3:return o=a,l=Object.assign({type:e.type,target:e.target.localName+" with id "+e.target.id},o,i),jn.debug("events needed to be recorded",n),jn.debug("attributes needed to be attached",i),n.indexOf(e.type)<0?(jn.debug("event "+e.type+" is not selected to be recorded"),[2]):(this._tracker({name:s||"event",attributes:l},this._config.provider).catch(function(t){jn.debug("Failed to record the "+e.type+" event', "+t)}),[2])}})},new((s=void 0)||(s=Promise))(function(e,t){function o(e){try{l(r.next(e))}catch(e){t(e)}}function a(e){try{l(r.throw(e))}catch(e){t(e)}}function l(t){var i;t.done?e(t.value):(i=t.value,i instanceof s?i:new s(function(e){e(i)})).then(o,a)}l((r=r.apply(i,n||[])).next())});var i,n,s,r},e}();var Yn=function(e,t,i,n){return new(i||(i=Promise))(function(s,r){function o(e){try{l(n.next(e))}catch(e){r(e)}}function a(e){try{l(n.throw(e))}catch(e){r(e)}}function l(e){var t;e.done?s(e.value):(t=e.value,t instanceof i?t:new i(function(e){e(t)})).then(o,a)}l((n=n.apply(e,t||[])).next())})},qn=function(e,t){var i,n,s,r,o={label:0,sent:function(){if(1&s[0])throw s[1];return s[1]},trys:[],ops:[]};return r={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(r[Symbol.iterator]=function(){return this}),r;function a(r){return function(a){return function(r){if(i)throw new TypeError("Generator is already executing.");for(;o;)try{if(i=1,n&&(s=2&r[0]?n.return:r[0]?n.throw||((s=n.return)&&s.call(n),0):n.next)&&!(s=s.call(n,r[1])).done)return s;switch(n=0,s&&(r=[2&r[0],s.value]),r[0]){case 0:case 1:s=r;break;case 4:return o.label++,{value:r[1],done:!1};case 5:o.label++,n=r[1],r=[0];continue;case 7:r=o.ops.pop(),o.trys.pop();continue;default:if(!((s=(s=o.trys).length>0&&s[s.length-1])||6!==r[0]&&2!==r[0])){o=0;continue}if(3===r[0]&&(!s||r[1]>s[0]&&r[1]<s[3])){o.label=r[1];break}if(6===r[0]&&o.label<s[1]){o.label=s[1],s=r;break}if(s&&o.label<s[2]){o.label=s[2],o.ops.push(r);break}s[2]&&o.ops.pop(),o.trys.pop();continue}r=t.call(e,o)}catch(e){r=[6,e],n=0}finally{i=s=0}if(5&r[0])throw r[1];return{value:r[0]?r[1]:void 0,done:!0}}([r,a])}}},Xn=new n.C("SessionTracker"),Zn={enable:!1,provider:"AWSPinpoint"},Qn=!1;const Jn=function(){function e(e,t){this._config=Object.assign({},Zn,t),this._tracker=e,this._hasEnabled=!1,this._trackFunc=this._trackFunc.bind(this),this._trackBeforeUnload=this._trackBeforeUnload.bind(this),this.configure(this._config)}return e.prototype._envCheck=function(){if(!qt.JS.browserOrNode().isBrowser)return!1;if(!document||!document.addEventListener)return Xn.debug("not in the supported web environment"),!1;if(void 0!==document.hidden)this._hidden="hidden",this._visibilityChange="visibilitychange";else if(void 0!==document.msHidden)this._hidden="msHidden",this._visibilityChange="msvisibilitychange";else{if(void 0===document.webkitHidden)return Xn.debug("not in the supported web environment"),!1;this._hidden="webkitHidden",this._visibilityChange="webkitvisibilitychange"}return!0},e.prototype._trackFunc=function(){return Yn(this,void 0,void 0,function(){var e,t,i;return qn(this,function(n){switch(n.label){case 0:return"function"!=typeof this._config.attributes?[3,2]:[4,this._config.attributes()];case 1:return t=n.sent(),[3,3];case 2:t=this._config.attributes,n.label=3;case 3:return e=t,i=Object.assign({},e),document.visibilityState===this._hidden?this._tracker({name:"_session.stop",attributes:i},this._config.provider).catch(function(e){Xn.debug("record session stop event failed.",e)}):this._tracker({name:"_session.start",attributes:i},this._config.provider).catch(function(e){Xn.debug("record session start event failed.",e)}),[2]}})})},e.prototype._trackBeforeUnload=function(e){var t=this;("function"==typeof this._config.attributes?Promise.resolve(this._config.attributes()):Promise.resolve(this._config.attributes)).then(function(e){var i=Object.assign({},e);t._tracker({name:"_session.stop",attributes:i,immediate:!0},t._config.provider).catch(function(e){Xn.debug("record session stop event failed.",e)})})},e.prototype._sendInitialEvent=function(){return Yn(this,void 0,void 0,function(){var e,t,i;return qn(this,function(n){switch(n.label){case 0:return Qn?(Xn.debug("the start session has been sent when the page is loaded"),[2]):(Qn=!0,"function"!=typeof this._config.attributes?[3,2]:[4,this._config.attributes()]);case 1:return t=n.sent(),[3,3];case 2:t=this._config.attributes,n.label=3;case 3:return e=t,i=Object.assign({},e),this._tracker({name:"_session.start",attributes:i},this._config.provider).catch(function(e){Xn.debug("record session start event failed.",e)}),[2]}})})},e.prototype.configure=function(e){return this._envCheck()?(Object.assign(this._config,e),this._config.enable&&!this._hasEnabled?(this._sendInitialEvent(),document.addEventListener(this._visibilityChange,this._trackFunc,!1),window.addEventListener("beforeunload",this._trackBeforeUnload,!1),this._hasEnabled=!0):!this._config.enable&&this._hasEnabled&&(document.removeEventListener(this._visibilityChange,this._trackFunc,!1),window.removeEventListener("beforeunload",this._trackBeforeUnload,!1),this._hasEnabled=!1),this._config):this._config},e}();var es=function(){return es=Object.assign||function(e){for(var t,i=1,n=arguments.length;i<n;i++)for(var s in t=arguments[i])Object.prototype.hasOwnProperty.call(t,s)&&(e[s]=t[s]);return e},es.apply(this,arguments)},ts=function(e,t,i,n){return new(i||(i=Promise))(function(s,r){function o(e){try{l(n.next(e))}catch(e){r(e)}}function a(e){try{l(n.throw(e))}catch(e){r(e)}}function l(e){var t;e.done?s(e.value):(t=e.value,t instanceof i?t:new i(function(e){e(t)})).then(o,a)}l((n=n.apply(e,t||[])).next())})},is=function(e,t){var i,n,s,r,o={label:0,sent:function(){if(1&s[0])throw s[1];return s[1]},trys:[],ops:[]};return r={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(r[Symbol.iterator]=function(){return this}),r;function a(r){return function(a){return function(r){if(i)throw new TypeError("Generator is already executing.");for(;o;)try{if(i=1,n&&(s=2&r[0]?n.return:r[0]?n.throw||((s=n.return)&&s.call(n),0):n.next)&&!(s=s.call(n,r[1])).done)return s;switch(n=0,s&&(r=[2&r[0],s.value]),r[0]){case 0:case 1:s=r;break;case 4:return o.label++,{value:r[1],done:!1};case 5:o.label++,n=r[1],r=[0];continue;case 7:r=o.ops.pop(),o.trys.pop();continue;default:if(!((s=(s=o.trys).length>0&&s[s.length-1])||6!==r[0]&&2!==r[0])){o=0;continue}if(3===r[0]&&(!s||r[1]>s[0]&&r[1]<s[3])){o.label=r[1];break}if(6===r[0]&&o.label<s[1]){o.label=s[1],s=r;break}if(s&&o.label<s[2]){o.label=s[2],o.ops.push(r);break}s[2]&&o.ops.pop(),o.trys.pop();continue}r=t.call(e,o)}catch(e){r=[6,e],n=0}finally{i=s=0}if(5&r[0])throw r[1];return{value:r[0]?r[1]:void 0,done:!0}}([r,a])}}},ns=new n.C("AnalyticsClass"),ss="undefined"!=typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("amplify_default"):"@@amplify_default",rs={pageView:Bn,event:$n,session:Jn},os=null,as=function(){function e(){this._config={},this._pluggables=[],this._disabled=!1,this._trackers={},os=this,this.record=this.record.bind(this),s.YZ.listen("auth",ds),s.YZ.listen("storage",ds),s.YZ.listen("analytics",ds)}return e.prototype.getModuleName=function(){return"Analytics"},e.prototype.configure=function(e){var t=this;if(!e)return this._config;ns.debug("configure Analytics",e);var i=r.iX.parseMobilehubConfig(e);return this._config=Object.assign({},this._config,i.Analytics,e),this._config.disabled&&(this._disabled=!0),void 0===this._config.autoSessionRecord&&(this._config.autoSessionRecord=!0),this._pluggables.forEach(function(e){var i="AWSPinpoint"!==e.getProviderName()||t._config.AWSPinpoint?t._config[e.getProviderName()]:t._config;e.configure(es({disabled:t._config.disabled,autoSessionRecord:t._config.autoSessionRecord},i))}),0===this._pluggables.length&&this.addPluggable(new In),s.YZ.dispatch("analytics",{event:"configured",data:null,message:"The Analytics category has been configured successfully"},"Analytics",ss),ns.debug("current configuration",this._config),this._config},e.prototype.addPluggable=function(e){if(e&&"Analytics"===e.getCategory()){this._pluggables.push(e);var t="AWSPinpoint"!==e.getProviderName()||this._config.AWSPinpoint?this._config[e.getProviderName()]:this._config,i=es({disabled:this._config.disabled},t);return e.configure(i),i}},e.prototype.getPluggable=function(e){for(var t=0;t<this._pluggables.length;t+=1){var i=this._pluggables[t];if(i.getProviderName()===e)return i}return ns.debug("No plugin found with providerName",e),null},e.prototype.removePluggable=function(e){for(var t=0;t<this._pluggables.length&&this._pluggables[t].getProviderName()!==e;)t+=1;return t===this._pluggables.length?void ns.debug("No plugin found with providerName",e):void this._pluggables.splice(t,t+1)},e.prototype.disable=function(){this._disabled=!0},e.prototype.enable=function(){this._disabled=!1},e.prototype.startSession=function(e){return ts(this,void 0,void 0,function(){var t;return is(this,function(i){return t={event:{name:"_session.start"},provider:e},[2,this._sendEvent(t)]})})},e.prototype.stopSession=function(e){return ts(this,void 0,void 0,function(){var t;return is(this,function(i){return t={event:{name:"_session.stop"},provider:e},[2,this._sendEvent(t)]})})},e.prototype.record=function(e,t,i){return ts(this,void 0,void 0,function(){var n;return is(this,function(s){return null,n="string"==typeof e?{event:{name:e,attributes:t,metrics:i},provider:"AWSPinpoint"}:{event:e,provider:t},[2,this._sendEvent(n)]})})},e.prototype.updateEndpoint=function(e,t){return ts(this,void 0,void 0,function(){var i;return is(this,function(n){return i=es(es({},e),{name:"_update_endpoint"}),[2,this.record(i,t)]})})},e.prototype._sendEvent=function(e){var t=this;if(this._disabled)return ns.debug("Analytics has been disabled"),Promise.resolve();var i=e.provider?e.provider:"AWSPinpoint";return new Promise(function(n,s){t._pluggables.forEach(function(t){t.getProviderName()===i&&t.record(e,{resolve:n,reject:s})})})},e.prototype.autoTrack=function(e,t){if(rs[e]){"session"===e&&(this._config.autoSessionRecord=t.enable);var i=this._trackers[e];i?i.configure(t):this._trackers[e]=new rs[e](this.record,t)}else ns.debug("invalid tracker type")},e}(),ls=!1,cs=!1,hs=!1,ds=function(e){var t=e.channel,i=e.payload;switch(ns.debug("on hub capsule "+t,i),t){case"auth":ps(i);break;case"storage":us(i);break;case"analytics":gs(i)}},us=function(e){var t=e.data,i=t.attrs,n=t.metrics;i&&hs&&os.record({name:"Storage",attributes:i,metrics:n}).catch(function(e){ns.debug("Failed to send the storage event automatically",e)})},ps=function(e){var t=e.event;if(t){var i=function(e){return ts(void 0,void 0,void 0,function(){var t;return is(this,function(i){switch(i.label){case 0:if(!cs||!hs)return[3,4];i.label=1;case 1:return i.trys.push([1,3,,4]),[4,os.record({name:"_userauth."+e})];case 2:return[2,i.sent()];case 3:return t=i.sent(),ns.debug("Failed to send the "+e+" event automatically",t),[3,4];case 4:return[2]}})})};switch(t){case"signIn":return i("sign_in");case"signUp":return i("sign_up");case"signOut":return i("sign_out");case"signIn_failure":return i("auth_fail");case"configured":(cs=!0)&&hs&&fs()}}},gs=function(e){var t=e.event;t&&"pinpointProvider_configured"===t&&(hs=!0,cs&&hs&&fs())},fs=function(){var e=os.configure();!ls&&e.autoSessionRecord&&(os.updateEndpoint({immediate:!0}).catch(function(e){ns.debug("Failed to update the endpoint",e)}),ls=!0),os.autoTrack("session",{enable:e.autoSessionRecord})},ms=new as;o.HA.register(ms)},38623(e,t,i){"use strict";var n,s,r;function o(e){return e&&!!["provider"].find(function(t){return e.hasOwnProperty(t)})}function a(e){return void 0!==e.redirectSignIn}i.d(t,{N:()=>Xe}),function(e){e.Cognito="COGNITO",e.Google="Google",e.Facebook="Facebook",e.Amazon="LoginWithAmazon",e.Apple="SignInWithApple"}(n||(n={})),function(e){e.NoConfig="noConfig",e.MissingAuthConfig="missingAuthConfig",e.EmptyUsername="emptyUsername",e.InvalidUsername="invalidUsername",e.EmptyPassword="emptyPassword",e.EmptyCode="emptyCode",e.SignUpError="signUpError",e.NoMFA="noMFA",e.InvalidMFA="invalidMFA",e.EmptyChallengeResponse="emptyChallengeResponse",e.NoUserSession="noUserSession",e.Default="default",e.DeviceConfig="deviceConfig",e.NetworkError="networkError",e.AutoSignInError="autoSignInError"}(s||(s={})),function(e){e.API_KEY="API_KEY",e.AWS_IAM="AWS_IAM",e.OPENID_CONNECT="OPENID_CONNECT",e.AMAZON_COGNITO_USER_POOLS="AMAZON_COGNITO_USER_POOLS",e.AWS_LAMBDA="AWS_LAMBDA"}(r||(r={}));var l,c=i(5522),h=i(48507),d=i(83847),u=i(76253),p=i(12599),g=i(71429),f=(0,g.gy)().isBrowser,m=function(){function e(e){void 0===e&&(e={}),this.cookies=new p.A,this.store=f?window.localStorage:Object.create(null),this.cookies=e.req?new p.A(e.req.headers.cookie):new p.A,Object.assign(this.store,this.cookies.getAll())}return Object.defineProperty(e.prototype,"length",{get:function(){return Object.entries(this.store).length},enumerable:!0,configurable:!0}),e.prototype.clear=function(){var e=this;Array.from(new Array(this.length)).map(function(t,i){return e.key(i)}).forEach(function(t){return e.removeItem(t)})},e.prototype.getItem=function(e){return this.getLocalItem(e)},e.prototype.getLocalItem=function(e){return Object.prototype.hasOwnProperty.call(this.store,e)?this.store[e]:null},e.prototype.getUniversalItem=function(e){return this.cookies.get(e)},e.prototype.key=function(e){return Object.keys(this.store)[e]},e.prototype.removeItem=function(e){this.removeLocalItem(e),this.removeUniversalItem(e)},e.prototype.removeLocalItem=function(e){delete this.store[e]},e.prototype.removeUniversalItem=function(e){this.cookies.remove(e,{path:"/"})},e.prototype.setItem=function(e,t){switch(this.setLocalItem(e,t),e.split(".").pop()){case"LastAuthUser":case"accessToken":case"refreshToken":case"idToken":f?this.setUniversalItem(e,t):this.setLocalItem(e,t)}},e.prototype.setLocalItem=function(e,t){this.store[e]=t},e.prototype.setUniversalItem=function(e,t){this.cookies.set(e,t,{path:"/",sameSite:!0,secure:"localhost"!==window.location.hostname})},e}(),v=i(70870),y=i(62020),C=function(){function e(e){var t=e||{},i=t.ValidationData,n=t.Username,s=t.Password,r=t.AuthParameters,o=t.ClientMetadata;this.validationData=i||{},this.authParameters=r||{},this.clientMetadata=o||{},this.username=n,this.password=s}var t=e.prototype;return t.getUsername=function(){return this.username},t.getPassword=function(){return this.password},t.getValidationData=function(){return this.validationData},t.getAuthParameters=function(){return this.authParameters},t.getClientMetadata=function(){return this.clientMetadata},e}(),b=i(51999),S=i(60095),w=i.n(S),x=(i(74842),i(9331)),E=i.n(x),M=i(31939),A=i.n(M);if("undefined"!=typeof window&&window.crypto&&(l=window.crypto),!l&&"undefined"!=typeof window&&window.msCrypto&&(l=window.msCrypto),!l&&void 0!==i.g&&i.g.crypto&&(l=i.g.crypto),!l)try{l=i(55595)}catch(e){}function T(){if(l){if("function"==typeof l.getRandomValues)try{return l.getRandomValues(new Uint32Array(1))[0]}catch(e){}if("function"==typeof l.randomBytes)try{return l.randomBytes(4).readInt32LE()}catch(e){}}throw new Error("Native crypto module could not be used to get secure random number.")}var D=function(){function e(e,t){e=this.words=e||[],this.sigBytes=null!=t?t:4*e.length}var t=e.prototype;return t.random=function(t){for(var i=[],n=0;n<t;n+=4)i.push(T());return new e(i,t)},t.toString=function(){return function(e){for(var t=e.words,i=e.sigBytes,n=[],s=0;s<i;s++){var r=t[s>>>2]>>>24-s%4*8&255;n.push((r>>>4).toString(16)),n.push((15&r).toString(16))}return n.join("")}(this)},e}();const I=R;function R(e,t){null!=e&&this.fromString(e,t)}function L(){return new R(null)}var k,P="undefined"!=typeof navigator;P&&"Microsoft Internet Explorer"==navigator.appName?(R.prototype.am=function(e,t,i,n,s,r){for(var o=32767&t,a=t>>15;--r>=0;){var l=32767&this[e],c=this[e++]>>15,h=a*l+c*o;s=((l=o*l+((32767&h)<<15)+i[n]+(1073741823&s))>>>30)+(h>>>15)+a*c+(s>>>30),i[n++]=1073741823&l}return s},k=30):P&&"Netscape"!=navigator.appName?(R.prototype.am=function(e,t,i,n,s,r){for(;--r>=0;){var o=t*this[e++]+i[n]+s;s=Math.floor(o/67108864),i[n++]=67108863&o}return s},k=26):(R.prototype.am=function(e,t,i,n,s,r){for(var o=16383&t,a=t>>14;--r>=0;){var l=16383&this[e],c=this[e++]>>14,h=a*l+c*o;s=((l=o*l+((16383&h)<<14)+i[n]+s)>>28)+(h>>14)+a*c,i[n++]=268435455&l}return s},k=28),R.prototype.DB=k,R.prototype.DM=(1<<k)-1,R.prototype.DV=1<<k,R.prototype.FV=Math.pow(2,52),R.prototype.F1=52-k,R.prototype.F2=2*k-52;var N,O,_=new Array;for(N="0".charCodeAt(0),O=0;O<=9;++O)_[N++]=O;for(N="a".charCodeAt(0),O=10;O<36;++O)_[N++]=O;for(N="A".charCodeAt(0),O=10;O<36;++O)_[N++]=O;function F(e){return"0123456789abcdefghijklmnopqrstuvwxyz".charAt(e)}function G(e,t){var i=_[e.charCodeAt(t)];return null==i?-1:i}function V(e){var t=L();return t.fromInt(e),t}function B(e){var t,i=1;return 0!=(t=e>>>16)&&(e=t,i+=16),0!=(t=e>>8)&&(e=t,i+=8),0!=(t=e>>4)&&(e=t,i+=4),0!=(t=e>>2)&&(e=t,i+=2),0!=(t=e>>1)&&(e=t,i+=1),i}function H(e){this.m=e,this.mp=e.invDigit(),this.mpl=32767&this.mp,this.mph=this.mp>>15,this.um=(1<<e.DB-15)-1,this.mt2=2*e.t}function z(e){return b.hp.from((new D).random(e).toString(),"hex")}H.prototype.convert=function(e){var t=L();return e.abs().dlShiftTo(this.m.t,t),t.divRemTo(this.m,null,t),e.s<0&&t.compareTo(R.ZERO)>0&&this.m.subTo(t,t),t},H.prototype.revert=function(e){var t=L();return e.copyTo(t),this.reduce(t),t},H.prototype.reduce=function(e){for(;e.t<=this.mt2;)e[e.t++]=0;for(var t=0;t<this.m.t;++t){var i=32767&e[t],n=i*this.mpl+((i*this.mph+(e[t]>>15)*this.mpl&this.um)<<15)&e.DM;for(e[i=t+this.m.t]+=this.m.am(0,n,e,t,0,this.m.t);e[i]>=e.DV;)e[i]-=e.DV,e[++i]++}e.clamp(),e.drShiftTo(this.m.t,e),e.compareTo(this.m)>=0&&e.subTo(this.m,e)},H.prototype.mulTo=function(e,t,i){e.multiplyTo(t,i),this.reduce(i)},H.prototype.sqrTo=function(e,t){e.squareTo(t),this.reduce(t)},R.prototype.copyTo=function(e){for(var t=this.t-1;t>=0;--t)e[t]=this[t];e.t=this.t,e.s=this.s},R.prototype.fromInt=function(e){this.t=1,this.s=e<0?-1:0,e>0?this[0]=e:e<-1?this[0]=e+this.DV:this.t=0},R.prototype.fromString=function(e,t){var i;if(16==t)i=4;else if(8==t)i=3;else if(2==t)i=1;else if(32==t)i=5;else{if(4!=t)throw new Error("Only radix 2, 4, 8, 16, 32 are supported");i=2}this.t=0,this.s=0;for(var n=e.length,s=!1,r=0;--n>=0;){var o=G(e,n);o<0?"-"==e.charAt(n)&&(s=!0):(s=!1,0==r?this[this.t++]=o:r+i>this.DB?(this[this.t-1]|=(o&(1<<this.DB-r)-1)<<r,this[this.t++]=o>>this.DB-r):this[this.t-1]|=o<<r,(r+=i)>=this.DB&&(r-=this.DB))}this.clamp(),s&&R.ZERO.subTo(this,this)},R.prototype.clamp=function(){for(var e=this.s&this.DM;this.t>0&&this[this.t-1]==e;)--this.t},R.prototype.dlShiftTo=function(e,t){var i;for(i=this.t-1;i>=0;--i)t[i+e]=this[i];for(i=e-1;i>=0;--i)t[i]=0;t.t=this.t+e,t.s=this.s},R.prototype.drShiftTo=function(e,t){for(var i=e;i<this.t;++i)t[i-e]=this[i];t.t=Math.max(this.t-e,0),t.s=this.s},R.prototype.lShiftTo=function(e,t){var i,n=e%this.DB,s=this.DB-n,r=(1<<s)-1,o=Math.floor(e/this.DB),a=this.s<<n&this.DM;for(i=this.t-1;i>=0;--i)t[i+o+1]=this[i]>>s|a,a=(this[i]&r)<<n;for(i=o-1;i>=0;--i)t[i]=0;t[o]=a,t.t=this.t+o+1,t.s=this.s,t.clamp()},R.prototype.rShiftTo=function(e,t){t.s=this.s;var i=Math.floor(e/this.DB);if(i>=this.t)t.t=0;else{var n=e%this.DB,s=this.DB-n,r=(1<<n)-1;t[0]=this[i]>>n;for(var o=i+1;o<this.t;++o)t[o-i-1]|=(this[o]&r)<<s,t[o-i]=this[o]>>n;n>0&&(t[this.t-i-1]|=(this.s&r)<<s),t.t=this.t-i,t.clamp()}},R.prototype.subTo=function(e,t){for(var i=0,n=0,s=Math.min(e.t,this.t);i<s;)n+=this[i]-e[i],t[i++]=n&this.DM,n>>=this.DB;if(e.t<this.t){for(n-=e.s;i<this.t;)n+=this[i],t[i++]=n&this.DM,n>>=this.DB;n+=this.s}else{for(n+=this.s;i<e.t;)n-=e[i],t[i++]=n&this.DM,n>>=this.DB;n-=e.s}t.s=n<0?-1:0,n<-1?t[i++]=this.DV+n:n>0&&(t[i++]=n),t.t=i,t.clamp()},R.prototype.multiplyTo=function(e,t){var i=this.abs(),n=e.abs(),s=i.t;for(t.t=s+n.t;--s>=0;)t[s]=0;for(s=0;s<n.t;++s)t[s+i.t]=i.am(0,n[s],t,s,0,i.t);t.s=0,t.clamp(),this.s!=e.s&&R.ZERO.subTo(t,t)},R.prototype.squareTo=function(e){for(var t=this.abs(),i=e.t=2*t.t;--i>=0;)e[i]=0;for(i=0;i<t.t-1;++i){var n=t.am(i,t[i],e,2*i,0,1);(e[i+t.t]+=t.am(i+1,2*t[i],e,2*i+1,n,t.t-i-1))>=t.DV&&(e[i+t.t]-=t.DV,e[i+t.t+1]=1)}e.t>0&&(e[e.t-1]+=t.am(i,t[i],e,2*i,0,1)),e.s=0,e.clamp()},R.prototype.divRemTo=function(e,t,i){var n=e.abs();if(!(n.t<=0)){var s=this.abs();if(s.t<n.t)return null!=t&&t.fromInt(0),void(null!=i&&this.copyTo(i));null==i&&(i=L());var r=L(),o=this.s,a=e.s,l=this.DB-B(n[n.t-1]);l>0?(n.lShiftTo(l,r),s.lShiftTo(l,i)):(n.copyTo(r),s.copyTo(i));var c=r.t,h=r[c-1];if(0!=h){var d=h*(1<<this.F1)+(c>1?r[c-2]>>this.F2:0),u=this.FV/d,p=(1<<this.F1)/d,g=1<<this.F2,f=i.t,m=f-c,v=null==t?L():t;for(r.dlShiftTo(m,v),i.compareTo(v)>=0&&(i[i.t++]=1,i.subTo(v,i)),R.ONE.dlShiftTo(c,v),v.subTo(r,r);r.t<c;)r[r.t++]=0;for(;--m>=0;){var y=i[--f]==h?this.DM:Math.floor(i[f]*u+(i[f-1]+g)*p);if((i[f]+=r.am(0,y,i,m,0,c))<y)for(r.dlShiftTo(m,v),i.subTo(v,i);i[f]<--y;)i.subTo(v,i)}null!=t&&(i.drShiftTo(c,t),o!=a&&R.ZERO.subTo(t,t)),i.t=c,i.clamp(),l>0&&i.rShiftTo(l,i),o<0&&R.ZERO.subTo(i,i)}}},R.prototype.invDigit=function(){if(this.t<1)return 0;var e=this[0];if(!(1&e))return 0;var t=3&e;return(t=(t=(t=(t=t*(2-(15&e)*t)&15)*(2-(255&e)*t)&255)*(2-((65535&e)*t&65535))&65535)*(2-e*t%this.DV)%this.DV)>0?this.DV-t:-t},R.prototype.addTo=function(e,t){for(var i=0,n=0,s=Math.min(e.t,this.t);i<s;)n+=this[i]+e[i],t[i++]=n&this.DM,n>>=this.DB;if(e.t<this.t){for(n+=e.s;i<this.t;)n+=this[i],t[i++]=n&this.DM,n>>=this.DB;n+=this.s}else{for(n+=this.s;i<e.t;)n+=e[i],t[i++]=n&this.DM,n>>=this.DB;n+=e.s}t.s=n<0?-1:0,n>0?t[i++]=n:n<-1&&(t[i++]=this.DV+n),t.t=i,t.clamp()},R.prototype.toString=function(e){if(this.s<0)return"-"+this.negate().toString(e);var t;if(16==e)t=4;else if(8==e)t=3;else if(2==e)t=1;else if(32==e)t=5;else{if(4!=e)throw new Error("Only radix 2, 4, 8, 16, 32 are supported");t=2}var i,n=(1<<t)-1,s=!1,r="",o=this.t,a=this.DB-o*this.DB%t;if(o-- >0)for(a<this.DB&&(i=this[o]>>a)>0&&(s=!0,r=F(i));o>=0;)a<t?(i=(this[o]&(1<<a)-1)<<t-a,i|=this[--o]>>(a+=this.DB-t)):(i=this[o]>>(a-=t)&n,a<=0&&(a+=this.DB,--o)),i>0&&(s=!0),s&&(r+=F(i));return s?r:"0"},R.prototype.negate=function(){var e=L();return R.ZERO.subTo(this,e),e},R.prototype.abs=function(){return this.s<0?this.negate():this},R.prototype.compareTo=function(e){var t=this.s-e.s;if(0!=t)return t;var i=this.t;if(0!=(t=i-e.t))return this.s<0?-t:t;for(;--i>=0;)if(0!=(t=this[i]-e[i]))return t;return 0},R.prototype.bitLength=function(){return this.t<=0?0:this.DB*(this.t-1)+B(this[this.t-1]^this.s&this.DM)},R.prototype.mod=function(e){var t=L();return this.abs().divRemTo(e,null,t),this.s<0&&t.compareTo(R.ZERO)>0&&e.subTo(t,t),t},R.prototype.equals=function(e){return 0==this.compareTo(e)},R.prototype.add=function(e){var t=L();return this.addTo(e,t),t},R.prototype.subtract=function(e){var t=L();return this.subTo(e,t),t},R.prototype.multiply=function(e){var t=L();return this.multiplyTo(e,t),t},R.prototype.divide=function(e){var t=L();return this.divRemTo(e,t,null),t},R.prototype.modPow=function(e,t,i){var n,s=e.bitLength(),r=V(1),o=new H(t);if(s<=0)return r;n=s<18?1:s<48?3:s<144?4:s<768?5:6;var a=new Array,l=3,c=n-1,h=(1<<n)-1;if(a[1]=o.convert(this),n>1){var d=L();for(o.sqrTo(a[1],d);l<=h;)a[l]=L(),o.mulTo(d,a[l-2],a[l]),l+=2}var u,p,g=e.t-1,f=!0,m=L();for(s=B(e[g])-1;g>=0;){for(s>=c?u=e[g]>>s-c&h:(u=(e[g]&(1<<s+1)-1)<<c-s,g>0&&(u|=e[g-1]>>this.DB+s-c)),l=n;!(1&u);)u>>=1,--l;if((s-=l)<0&&(s+=this.DB,--g),f)a[u].copyTo(r),f=!1;else{for(;l>1;)o.sqrTo(r,m),o.sqrTo(m,r),l-=2;l>0?o.sqrTo(r,m):(p=r,r=m,m=p),o.mulTo(m,a[u],r)}for(;g>=0&&!(e[g]&1<<s);)o.sqrTo(r,m),p=r,r=m,m=p,--s<0&&(s=this.DB-1,--g)}var v=o.revert(r);return i(null,v),v},R.ZERO=V(0),R.ONE=V(1);var U=/^[89a-f]/i,W=function(){function e(e){this.N=new I("FFFFFFFFFFFFFFFFC90FDAA22168C234C4C6628B80DC1CD129024E088A67CC74020BBEA63B139B22514A08798E3404DDEF9519B3CD3A431B302B0A6DF25F14374FE1356D6D51C245E485B576625E7EC6F44C42E9A637ED6B0BFF5CB6F406B7EDEE386BFB5A899FA5AE9F24117C4B1FE649286651ECE45B3DC2007CB8A163BF0598DA48361C55D39A69163FA8FD24CF5F83655D23DCA3AD961C62F356208552BB9ED529077096966D670C354E4ABC9804F1746C08CA18217C32905E462E36CE3BE39E772C180E86039B2783A2EC07A28FB5C55DF06F4C52C9DE2BCBF6955817183995497CEA956AE515D2261898FA051015728E5A8AAAC42DAD33170D04507A33A85521ABDF1CBA64ECFB850458DBEF0A8AEA71575D060C7DB3970F85A6E1E4C7ABF5AE8CDB0933D71E8C94E04A25619DCEE3D2261AD2EE6BF12FFA06D98A0864D87602733EC86A64521F2B18177B200CBBE117577A615D6C770988C0BAD946E208E24FA074E5AB3143DB5BFCE0FD108E4B82D120A93AD2CAFFFFFFFFFFFFFFFF",16),this.g=new I("2",16),this.k=new I(this.hexHash(""+this.padHex(this.N)+this.padHex(this.g)),16),this.smallAValue=this.generateRandomSmallA(),this.getLargeAValue(function(){}),this.infoBits=b.hp.from("Caldera Derived Key","utf8"),this.poolName=e}var t=e.prototype;return t.getSmallAValue=function(){return this.smallAValue},t.getLargeAValue=function(e){var t=this;this.largeAValue?e(null,this.largeAValue):this.calculateA(this.smallAValue,function(i,n){i&&e(i,null),t.largeAValue=n,e(null,t.largeAValue)})},t.generateRandomSmallA=function(){var e=z(128).toString("hex");return new I(e,16)},t.generateRandomString=function(){return z(40).toString("base64")},t.getRandomPassword=function(){return this.randomPassword},t.getSaltDevices=function(){return this.SaltToHashDevices},t.getVerifierDevices=function(){return this.verifierDevices},t.generateHashDevice=function(e,t,i){var n=this;this.randomPassword=this.generateRandomString();var s=""+e+t+":"+this.randomPassword,r=this.hash(s),o=z(16).toString("hex");this.SaltToHashDevices=this.padHex(new I(o,16)),this.g.modPow(new I(this.hexHash(this.SaltToHashDevices+r),16),this.N,function(e,t){e&&i(e,null),n.verifierDevices=n.padHex(t),i(null,null)})},t.calculateA=function(e,t){var i=this;this.g.modPow(e,this.N,function(e,n){e&&t(e,null),n.mod(i.N).equals(I.ZERO)&&t(new Error("Illegal paramater. A mod N cannot be 0."),null),t(null,n)})},t.calculateU=function(e,t){return this.UHexHash=this.hexHash(this.padHex(e)+this.padHex(t)),new I(this.UHexHash,16)},t.hash=function(e){var t=e instanceof b.hp?w().lib.WordArray.create(e):e,i=E()(t).toString();return new Array(64-i.length).join("0")+i},t.hexHash=function(e){return this.hash(b.hp.from(e,"hex"))},t.computehkdf=function(e,t){var i=w().lib.WordArray.create(b.hp.concat([this.infoBits,b.hp.from(String.fromCharCode(1),"utf8")])),n=e instanceof b.hp?w().lib.WordArray.create(e):e,s=t instanceof b.hp?w().lib.WordArray.create(t):t,r=A()(n,s),o=A()(i,r);return b.hp.from(o.toString(),"hex").slice(0,16)},t.getPasswordAuthenticationKey=function(e,t,i,n,s){var r=this;if(i.mod(this.N).equals(I.ZERO))throw new Error("B cannot be zero.");if(this.UValue=this.calculateU(this.largeAValue,i),this.UValue.equals(I.ZERO))throw new Error("U cannot be zero.");var o=""+this.poolName+e+":"+t,a=this.hash(o),l=new I(this.hexHash(this.padHex(n)+a),16);this.calculateS(l,i,function(e,t){e&&s(e,null);var i=r.computehkdf(b.hp.from(r.padHex(t),"hex"),b.hp.from(r.padHex(r.UValue),"hex"));s(null,i)})},t.calculateS=function(e,t,i){var n=this;this.g.modPow(e,this.N,function(s,r){s&&i(s,null),t.subtract(n.k.multiply(r)).modPow(n.smallAValue.add(n.UValue.multiply(e)),n.N,function(e,t){e&&i(e,null),i(null,t.mod(n.N))})})},t.getNewPasswordRequiredChallengeUserAttributePrefix=function(){return"userAttributes."},t.padHex=function(e){if(!(e instanceof I))throw new Error("Not a BigInteger");var t=e.compareTo(I.ZERO)<0,i=e.abs().toString(16);if(i=i.length%2!=0?"0"+i:i,i=U.test(i)?"00"+i:i,t){var n=i.split("").map(function(e){var t=15&~parseInt(e,16);return"0123456789ABCDEF".charAt(t)}).join("");(i=new I(n,16).add(I.ONE).toString(16)).toUpperCase().startsWith("FF8")&&(i=i.substring(2))}return i},e}(),j=function(){function e(e){this.jwtToken=e||"",this.payload=this.decodePayload()}var t=e.prototype;return t.getJwtToken=function(){return this.jwtToken},t.getExpiration=function(){return this.payload.exp},t.getIssuedAt=function(){return this.payload.iat},t.decodePayload=function(){var e=this.jwtToken.split(".")[1];try{return JSON.parse(b.hp.from(e,"base64").toString("utf8"))}catch(e){return{}}},e}();function K(e,t){return K=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},K(e,t)}var $=function(e){var t,i;function n(t){var i=(void 0===t?{}:t).AccessToken;return e.call(this,i||"")||this}return i=e,(t=n).prototype=Object.create(i.prototype),t.prototype.constructor=t,K(t,i),n}(j);function Y(e,t){return Y=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Y(e,t)}var q=function(e){var t,i;function n(t){var i=(void 0===t?{}:t).IdToken;return e.call(this,i||"")||this}return i=e,(t=n).prototype=Object.create(i.prototype),t.prototype.constructor=t,Y(t,i),n}(j),X=function(){function e(e){var t=(void 0===e?{}:e).RefreshToken;this.token=t||""}return e.prototype.getToken=function(){return this.token},e}(),Z=i(81716),Q=i.n(Z),J=function(){function e(e){var t=void 0===e?{}:e,i=t.IdToken,n=t.RefreshToken,s=t.AccessToken,r=t.ClockDrift;if(null==s||null==i)throw new Error("Id token and Access Token must be present.");this.idToken=i,this.refreshToken=n,this.accessToken=s,this.clockDrift=void 0===r?this.calculateClockDrift():r}var t=e.prototype;return t.getIdToken=function(){return this.idToken},t.getRefreshToken=function(){return this.refreshToken},t.getAccessToken=function(){return this.accessToken},t.getClockDrift=function(){return this.clockDrift},t.calculateClockDrift=function(){return Math.floor(new Date/1e3)-Math.min(this.accessToken.getIssuedAt(),this.idToken.getIssuedAt())},t.isValid=function(){var e=Math.floor(new Date/1e3)-this.clockDrift;return e<this.accessToken.getExpiration()&&e<this.idToken.getExpiration()},e}(),ee=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],te=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],ie=function(){function e(){}return e.prototype.getNowString=function(){var e=new Date,t=te[e.getUTCDay()],i=ee[e.getUTCMonth()],n=e.getUTCDate(),s=e.getUTCHours();s<10&&(s="0"+s);var r=e.getUTCMinutes();r<10&&(r="0"+r);var o=e.getUTCSeconds();return o<10&&(o="0"+o),t+" "+i+" "+n+" "+s+":"+r+":"+o+" UTC "+e.getUTCFullYear()},e}(),ne=function(){function e(e){var t=void 0===e?{}:e,i=t.Name,n=t.Value;this.Name=i||"",this.Value=n||""}var t=e.prototype;return t.getValue=function(){return this.Value},t.setValue=function(e){return this.Value=e,this},t.getName=function(){return this.Name},t.setName=function(e){return this.Name=e,this},t.toString=function(){return JSON.stringify(this)},t.toJSON=function(){return{Name:this.Name,Value:this.Value}},e}(),se={},re=function(){function e(){}return e.setItem=function(e,t){return se[e]=t,se[e]},e.getItem=function(e){return Object.prototype.hasOwnProperty.call(se,e)?se[e]:void 0},e.removeItem=function(e){return delete se[e]},e.clear=function(){return se={}},e}(),oe=function(){function e(){try{this.storageWindow=window.localStorage,this.storageWindow.setItem("aws.cognito.test-ls",1),this.storageWindow.removeItem("aws.cognito.test-ls")}catch(e){this.storageWindow=re}}return e.prototype.getStorage=function(){return this.storageWindow},e}(),ae="undefined"!=typeof navigator?navigator.userAgent:"nodejs",le=function(){function e(e){if(null==e||null==e.Username||null==e.Pool)throw new Error("Username and Pool information are required.");this.username=e.Username||"",this.pool=e.Pool,this.Session=null,this.client=e.Pool.client,this.signInUserSession=null,this.authenticationFlowType="USER_SRP_AUTH",this.storage=e.Storage||(new oe).getStorage(),this.keyPrefix="CognitoIdentityServiceProvider."+this.pool.getClientId(),this.userDataKey=this.keyPrefix+"."+this.username+".userData"}var t=e.prototype;return t.setSignInUserSession=function(e){this.clearCachedUserData(),this.signInUserSession=e,this.cacheTokens()},t.getSignInUserSession=function(){return this.signInUserSession},t.getUsername=function(){return this.username},t.getAuthenticationFlowType=function(){return this.authenticationFlowType},t.setAuthenticationFlowType=function(e){this.authenticationFlowType=e},t.initiateAuth=function(e,t){var i=this,n=e.getAuthParameters();n.USERNAME=this.username;var s=0!==Object.keys(e.getValidationData()).length?e.getValidationData():e.getClientMetadata(),r={AuthFlow:"CUSTOM_AUTH",ClientId:this.pool.getClientId(),AuthParameters:n,ClientMetadata:s};this.getUserContextData()&&(r.UserContextData=this.getUserContextData()),this.client.request("InitiateAuth",r,function(e,n){if(e)return t.onFailure(e);var s=n.ChallengeName,r=n.ChallengeParameters;return"CUSTOM_CHALLENGE"===s?(i.Session=n.Session,t.customChallenge(r)):(i.signInUserSession=i.getCognitoUserSession(n.AuthenticationResult),i.cacheTokens(),t.onSuccess(i.signInUserSession))})},t.authenticateUser=function(e,t){return"USER_PASSWORD_AUTH"===this.authenticationFlowType?this.authenticateUserPlainUsernamePassword(e,t):"USER_SRP_AUTH"===this.authenticationFlowType||"CUSTOM_AUTH"===this.authenticationFlowType?this.authenticateUserDefaultAuth(e,t):t.onFailure(new Error("Authentication flow type is invalid."))},t.authenticateUserDefaultAuth=function(e,t){var i,n,s=this,r=new W(this.pool.getUserPoolName()),o=new ie,a={};null!=this.deviceKey&&(a.DEVICE_KEY=this.deviceKey),a.USERNAME=this.username,r.getLargeAValue(function(l,c){l&&t.onFailure(l),a.SRP_A=c.toString(16),"CUSTOM_AUTH"===s.authenticationFlowType&&(a.CHALLENGE_NAME="SRP_A");var h=0!==Object.keys(e.getValidationData()).length?e.getValidationData():e.getClientMetadata(),d={AuthFlow:s.authenticationFlowType,ClientId:s.pool.getClientId(),AuthParameters:a,ClientMetadata:h};s.getUserContextData(s.username)&&(d.UserContextData=s.getUserContextData(s.username)),s.client.request("InitiateAuth",d,function(a,l){if(a)return t.onFailure(a);var c=l.ChallengeParameters;s.username=c.USER_ID_FOR_SRP,s.userDataKey=s.keyPrefix+"."+s.username+".userData",i=new I(c.SRP_B,16),n=new I(c.SALT,16),s.getCachedDeviceKeyAndPassword(),r.getPasswordAuthenticationKey(s.username,e.getPassword(),i,n,function(e,i){e&&t.onFailure(e);var n=o.getNowString(),a=w().lib.WordArray.create(b.hp.concat([b.hp.from(s.pool.getUserPoolName(),"utf8"),b.hp.from(s.username,"utf8"),b.hp.from(c.SECRET_BLOCK,"base64"),b.hp.from(n,"utf8")])),d=w().lib.WordArray.create(i),u=Q().stringify(A()(a,d)),p={};p.USERNAME=s.username,p.PASSWORD_CLAIM_SECRET_BLOCK=c.SECRET_BLOCK,p.TIMESTAMP=n,p.PASSWORD_CLAIM_SIGNATURE=u,null!=s.deviceKey&&(p.DEVICE_KEY=s.deviceKey);var g={ChallengeName:"PASSWORD_VERIFIER",ClientId:s.pool.getClientId(),ChallengeResponses:p,Session:l.Session,ClientMetadata:h};s.getUserContextData()&&(g.UserContextData=s.getUserContextData()),function e(t,i){return s.client.request("RespondToAuthChallenge",t,function(n,r){return n&&"ResourceNotFoundException"===n.code&&-1!==n.message.toLowerCase().indexOf("device")?(p.DEVICE_KEY=null,s.deviceKey=null,s.randomPassword=null,s.deviceGroupKey=null,s.clearCachedDeviceKeyAndPassword(),e(t,i)):i(n,r)})}(g,function(e,i){return e?t.onFailure(e):s.authenticateUserInternal(i,r,t)})})})})},t.authenticateUserPlainUsernamePassword=function(e,t){var i=this,n={};if(n.USERNAME=this.username,n.PASSWORD=e.getPassword(),n.PASSWORD){var s=new W(this.pool.getUserPoolName());this.getCachedDeviceKeyAndPassword(),null!=this.deviceKey&&(n.DEVICE_KEY=this.deviceKey);var r=0!==Object.keys(e.getValidationData()).length?e.getValidationData():e.getClientMetadata(),o={AuthFlow:"USER_PASSWORD_AUTH",ClientId:this.pool.getClientId(),AuthParameters:n,ClientMetadata:r};this.getUserContextData(this.username)&&(o.UserContextData=this.getUserContextData(this.username)),this.client.request("InitiateAuth",o,function(e,n){return e?t.onFailure(e):i.authenticateUserInternal(n,s,t)})}else t.onFailure(new Error("PASSWORD parameter is required"))},t.authenticateUserInternal=function(e,t,i){var n=this,s=e.ChallengeName,r=e.ChallengeParameters;if("SMS_MFA"===s)return this.Session=e.Session,i.mfaRequired(s,r);if("SELECT_MFA_TYPE"===s)return this.Session=e.Session,i.selectMFAType(s,r);if("MFA_SETUP"===s)return this.Session=e.Session,i.mfaSetup(s,r);if("SOFTWARE_TOKEN_MFA"===s)return this.Session=e.Session,i.totpRequired(s,r);if("CUSTOM_CHALLENGE"===s)return this.Session=e.Session,i.customChallenge(r);if("NEW_PASSWORD_REQUIRED"===s){this.Session=e.Session;var o=null,a=null,l=[],c=t.getNewPasswordRequiredChallengeUserAttributePrefix();if(r&&(o=JSON.parse(e.ChallengeParameters.userAttributes),a=JSON.parse(e.ChallengeParameters.requiredAttributes)),a)for(var h=0;h<a.length;h++)l[h]=a[h].substr(c.length);return i.newPasswordRequired(o,l)}if("DEVICE_SRP_AUTH"===s)return this.Session=e.Session,void this.getDeviceResponse(i);this.signInUserSession=this.getCognitoUserSession(e.AuthenticationResult),this.challengeName=s,this.cacheTokens();var d=e.AuthenticationResult.NewDeviceMetadata;if(null==d)return i.onSuccess(this.signInUserSession);t.generateHashDevice(e.AuthenticationResult.NewDeviceMetadata.DeviceGroupKey,e.AuthenticationResult.NewDeviceMetadata.DeviceKey,function(s){if(s)return i.onFailure(s);var r={Salt:b.hp.from(t.getSaltDevices(),"hex").toString("base64"),PasswordVerifier:b.hp.from(t.getVerifierDevices(),"hex").toString("base64")};n.verifierDevices=r.PasswordVerifier,n.deviceGroupKey=d.DeviceGroupKey,n.randomPassword=t.getRandomPassword(),n.client.request("ConfirmDevice",{DeviceKey:d.DeviceKey,AccessToken:n.signInUserSession.getAccessToken().getJwtToken(),DeviceSecretVerifierConfig:r,DeviceName:ae},function(t,s){return t?i.onFailure(t):(n.deviceKey=e.AuthenticationResult.NewDeviceMetadata.DeviceKey,n.cacheDeviceKeyAndPassword(),!0===s.UserConfirmationNecessary?i.onSuccess(n.signInUserSession,s.UserConfirmationNecessary):i.onSuccess(n.signInUserSession))})})},t.completeNewPasswordChallenge=function(e,t,i,n){var s=this;if(!e)return i.onFailure(new Error("New password is required."));var r=new W(this.pool.getUserPoolName()),o=r.getNewPasswordRequiredChallengeUserAttributePrefix(),a={};t&&Object.keys(t).forEach(function(e){a[o+e]=t[e]}),a.NEW_PASSWORD=e,a.USERNAME=this.username;var l={ChallengeName:"NEW_PASSWORD_REQUIRED",ClientId:this.pool.getClientId(),ChallengeResponses:a,Session:this.Session,ClientMetadata:n};this.getUserContextData()&&(l.UserContextData=this.getUserContextData()),this.client.request("RespondToAuthChallenge",l,function(e,t){return e?i.onFailure(e):s.authenticateUserInternal(t,r,i)})},t.getDeviceResponse=function(e,t){var i=this,n=new W(this.deviceGroupKey),s=new ie,r={};r.USERNAME=this.username,r.DEVICE_KEY=this.deviceKey,n.getLargeAValue(function(o,a){o&&e.onFailure(o),r.SRP_A=a.toString(16);var l={ChallengeName:"DEVICE_SRP_AUTH",ClientId:i.pool.getClientId(),ChallengeResponses:r,ClientMetadata:t,Session:i.Session};i.getUserContextData()&&(l.UserContextData=i.getUserContextData()),i.client.request("RespondToAuthChallenge",l,function(t,r){if(t)return e.onFailure(t);var o=r.ChallengeParameters,a=new I(o.SRP_B,16),l=new I(o.SALT,16);n.getPasswordAuthenticationKey(i.deviceKey,i.randomPassword,a,l,function(t,n){if(t)return e.onFailure(t);var a=s.getNowString(),l=w().lib.WordArray.create(b.hp.concat([b.hp.from(i.deviceGroupKey,"utf8"),b.hp.from(i.deviceKey,"utf8"),b.hp.from(o.SECRET_BLOCK,"base64"),b.hp.from(a,"utf8")])),c=w().lib.WordArray.create(n),h=Q().stringify(A()(l,c)),d={};d.USERNAME=i.username,d.PASSWORD_CLAIM_SECRET_BLOCK=o.SECRET_BLOCK,d.TIMESTAMP=a,d.PASSWORD_CLAIM_SIGNATURE=h,d.DEVICE_KEY=i.deviceKey;var u={ChallengeName:"DEVICE_PASSWORD_VERIFIER",ClientId:i.pool.getClientId(),ChallengeResponses:d,Session:r.Session};i.getUserContextData()&&(u.UserContextData=i.getUserContextData()),i.client.request("RespondToAuthChallenge",u,function(t,n){return t?e.onFailure(t):(i.signInUserSession=i.getCognitoUserSession(n.AuthenticationResult),i.cacheTokens(),e.onSuccess(i.signInUserSession))})})})})},t.confirmRegistration=function(e,t,i,n){var s={ClientId:this.pool.getClientId(),ConfirmationCode:e,Username:this.username,ForceAliasCreation:t,ClientMetadata:n};this.getUserContextData()&&(s.UserContextData=this.getUserContextData()),this.client.request("ConfirmSignUp",s,function(e){return e?i(e,null):i(null,"SUCCESS")})},t.sendCustomChallengeAnswer=function(e,t,i){var n=this,s={};s.USERNAME=this.username,s.ANSWER=e;var r=new W(this.pool.getUserPoolName());this.getCachedDeviceKeyAndPassword(),null!=this.deviceKey&&(s.DEVICE_KEY=this.deviceKey);var o={ChallengeName:"CUSTOM_CHALLENGE",ChallengeResponses:s,ClientId:this.pool.getClientId(),Session:this.Session,ClientMetadata:i};this.getUserContextData()&&(o.UserContextData=this.getUserContextData()),this.client.request("RespondToAuthChallenge",o,function(e,i){return e?t.onFailure(e):n.authenticateUserInternal(i,r,t)})},t.sendMFACode=function(e,t,i,n){var s=this,r={};r.USERNAME=this.username,r.SMS_MFA_CODE=e;var o=i||"SMS_MFA";"SOFTWARE_TOKEN_MFA"===o&&(r.SOFTWARE_TOKEN_MFA_CODE=e),null!=this.deviceKey&&(r.DEVICE_KEY=this.deviceKey);var a={ChallengeName:o,ChallengeResponses:r,ClientId:this.pool.getClientId(),Session:this.Session,ClientMetadata:n};this.getUserContextData()&&(a.UserContextData=this.getUserContextData()),this.client.request("RespondToAuthChallenge",a,function(e,i){if(e)return t.onFailure(e);if("DEVICE_SRP_AUTH"!==i.ChallengeName){if(s.signInUserSession=s.getCognitoUserSession(i.AuthenticationResult),s.cacheTokens(),null==i.AuthenticationResult.NewDeviceMetadata)return t.onSuccess(s.signInUserSession);var n=new W(s.pool.getUserPoolName());n.generateHashDevice(i.AuthenticationResult.NewDeviceMetadata.DeviceGroupKey,i.AuthenticationResult.NewDeviceMetadata.DeviceKey,function(e){if(e)return t.onFailure(e);var r={Salt:b.hp.from(n.getSaltDevices(),"hex").toString("base64"),PasswordVerifier:b.hp.from(n.getVerifierDevices(),"hex").toString("base64")};s.verifierDevices=r.PasswordVerifier,s.deviceGroupKey=i.AuthenticationResult.NewDeviceMetadata.DeviceGroupKey,s.randomPassword=n.getRandomPassword(),s.client.request("ConfirmDevice",{DeviceKey:i.AuthenticationResult.NewDeviceMetadata.DeviceKey,AccessToken:s.signInUserSession.getAccessToken().getJwtToken(),DeviceSecretVerifierConfig:r,DeviceName:ae},function(e,n){return e?t.onFailure(e):(s.deviceKey=i.AuthenticationResult.NewDeviceMetadata.DeviceKey,s.cacheDeviceKeyAndPassword(),!0===n.UserConfirmationNecessary?t.onSuccess(s.signInUserSession,n.UserConfirmationNecessary):t.onSuccess(s.signInUserSession))})})}else s.getDeviceResponse(t)})},t.changePassword=function(e,t,i,n){if(null==this.signInUserSession||!this.signInUserSession.isValid())return i(new Error("User is not authenticated"),null);this.client.request("ChangePassword",{PreviousPassword:e,ProposedPassword:t,AccessToken:this.signInUserSession.getAccessToken().getJwtToken(),ClientMetadata:n},function(e){return e?i(e,null):i(null,"SUCCESS")})},t.enableMFA=function(e){if(null==this.signInUserSession||!this.signInUserSession.isValid())return e(new Error("User is not authenticated"),null);var t=[];t.push({DeliveryMedium:"SMS",AttributeName:"phone_number"}),this.client.request("SetUserSettings",{MFAOptions:t,AccessToken:this.signInUserSession.getAccessToken().getJwtToken()},function(t){return t?e(t,null):e(null,"SUCCESS")})},t.setUserMfaPreference=function(e,t,i){if(null==this.signInUserSession||!this.signInUserSession.isValid())return i(new Error("User is not authenticated"),null);this.client.request("SetUserMFAPreference",{SMSMfaSettings:e,SoftwareTokenMfaSettings:t,AccessToken:this.signInUserSession.getAccessToken().getJwtToken()},function(e){return e?i(e,null):i(null,"SUCCESS")})},t.disableMFA=function(e){if(null==this.signInUserSession||!this.signInUserSession.isValid())return e(new Error("User is not authenticated"),null);this.client.request("SetUserSettings",{MFAOptions:[],AccessToken:this.signInUserSession.getAccessToken().getJwtToken()},function(t){return t?e(t,null):e(null,"SUCCESS")})},t.deleteUser=function(e,t){var i=this;if(null==this.signInUserSession||!this.signInUserSession.isValid())return e(new Error("User is not authenticated"),null);this.client.request("DeleteUser",{AccessToken:this.signInUserSession.getAccessToken().getJwtToken(),ClientMetadata:t},function(t){return t?e(t,null):(i.clearCachedUser(),e(null,"SUCCESS"))})},t.updateAttributes=function(e,t,i){var n=this;if(null==this.signInUserSession||!this.signInUserSession.isValid())return t(new Error("User is not authenticated"),null);this.client.request("UpdateUserAttributes",{AccessToken:this.signInUserSession.getAccessToken().getJwtToken(),UserAttributes:e,ClientMetadata:i},function(e){return e?t(e,null):n.getUserData(function(){return t(null,"SUCCESS")},{bypassCache:!0})})},t.getUserAttributes=function(e){if(null==this.signInUserSession||!this.signInUserSession.isValid())return e(new Error("User is not authenticated"),null);this.client.request("GetUser",{AccessToken:this.signInUserSession.getAccessToken().getJwtToken()},function(t,i){if(t)return e(t,null);for(var n=[],s=0;s<i.UserAttributes.length;s++){var r={Name:i.UserAttributes[s].Name,Value:i.UserAttributes[s].Value},o=new ne(r);n.push(o)}return e(null,n)})},t.getMFAOptions=function(e){if(null==this.signInUserSession||!this.signInUserSession.isValid())return e(new Error("User is not authenticated"),null);this.client.request("GetUser",{AccessToken:this.signInUserSession.getAccessToken().getJwtToken()},function(t,i){return t?e(t,null):e(null,i.MFAOptions)})},t.createGetUserRequest=function(){return this.client.promisifyRequest("GetUser",{AccessToken:this.signInUserSession.getAccessToken().getJwtToken()})},t.refreshSessionIfPossible=function(e){var t=this;return void 0===e&&(e={}),new Promise(function(i){var n=t.signInUserSession.getRefreshToken();n&&n.getToken()?t.refreshSession(n,i,e.clientMetadata):i()})},t.getUserData=function(e,t){var i=this;if(null==this.signInUserSession||!this.signInUserSession.isValid())return this.clearCachedUserData(),e(new Error("User is not authenticated"),null);var n=this.getUserDataFromCache();if(n)if(this.isFetchUserDataAndTokenRequired(t))this.fetchUserData().then(function(e){return i.refreshSessionIfPossible(t).then(function(){return e})}).then(function(t){return e(null,t)}).catch(e);else try{return void e(null,JSON.parse(n))}catch(t){return this.clearCachedUserData(),void e(t,null)}else this.fetchUserData().then(function(t){e(null,t)}).catch(e)},t.getUserDataFromCache=function(){return this.storage.getItem(this.userDataKey)},t.isFetchUserDataAndTokenRequired=function(e){var t=(e||{}).bypassCache;return void 0!==t&&t},t.fetchUserData=function(){var e=this;return this.createGetUserRequest().then(function(t){return e.cacheUserData(t),t})},t.deleteAttributes=function(e,t){var i=this;if(null==this.signInUserSession||!this.signInUserSession.isValid())return t(new Error("User is not authenticated"),null);this.client.request("DeleteUserAttributes",{UserAttributeNames:e,AccessToken:this.signInUserSession.getAccessToken().getJwtToken()},function(e){return e?t(e,null):i.getUserData(function(){return t(null,"SUCCESS")},{bypassCache:!0})})},t.resendConfirmationCode=function(e,t){var i={ClientId:this.pool.getClientId(),Username:this.username,ClientMetadata:t};this.client.request("ResendConfirmationCode",i,function(t,i){return t?e(t,null):e(null,i)})},t.getSession=function(e,t){if(void 0===t&&(t={}),null==this.username)return e(new Error("Username is null. Cannot retrieve a new session"),null);if(null!=this.signInUserSession&&this.signInUserSession.isValid())return e(null,this.signInUserSession);var i="CognitoIdentityServiceProvider."+this.pool.getClientId()+"."+this.username,n=i+".idToken",s=i+".accessToken",r=i+".refreshToken",o=i+".clockDrift";if(this.storage.getItem(n)){var a=new q({IdToken:this.storage.getItem(n)}),l=new $({AccessToken:this.storage.getItem(s)}),c=new X({RefreshToken:this.storage.getItem(r)}),h=parseInt(this.storage.getItem(o),0)||0,d=new J({IdToken:a,AccessToken:l,RefreshToken:c,ClockDrift:h});if(d.isValid())return this.signInUserSession=d,e(null,this.signInUserSession);if(!c.getToken())return e(new Error("Cannot retrieve a new session. Please authenticate."),null);this.refreshSession(c,e,t.clientMetadata)}else e(new Error("Local storage is missing an ID Token, Please authenticate"),null)},t.refreshSession=function(e,t,i){var n=this,s=this.pool.wrapRefreshSessionCallback?this.pool.wrapRefreshSessionCallback(t):t,r={};r.REFRESH_TOKEN=e.getToken();var o="CognitoIdentityServiceProvider."+this.pool.getClientId(),a=o+".LastAuthUser";if(this.storage.getItem(a)){this.username=this.storage.getItem(a);var l=o+"."+this.username+".deviceKey";this.deviceKey=this.storage.getItem(l),r.DEVICE_KEY=this.deviceKey}var c={ClientId:this.pool.getClientId(),AuthFlow:"REFRESH_TOKEN_AUTH",AuthParameters:r,ClientMetadata:i};this.getUserContextData()&&(c.UserContextData=this.getUserContextData()),this.client.request("InitiateAuth",c,function(t,i){if(t)return"NotAuthorizedException"===t.code&&n.clearCachedUser(),s(t,null);if(i){var r=i.AuthenticationResult;return Object.prototype.hasOwnProperty.call(r,"RefreshToken")||(r.RefreshToken=e.getToken()),n.signInUserSession=n.getCognitoUserSession(r),n.cacheTokens(),s(null,n.signInUserSession)}})},t.cacheTokens=function(){var e="CognitoIdentityServiceProvider."+this.pool.getClientId(),t=e+"."+this.username+".idToken",i=e+"."+this.username+".accessToken",n=e+"."+this.username+".refreshToken",s=e+"."+this.username+".clockDrift",r=e+".LastAuthUser";this.storage.setItem(t,this.signInUserSession.getIdToken().getJwtToken()),this.storage.setItem(i,this.signInUserSession.getAccessToken().getJwtToken()),this.storage.setItem(n,this.signInUserSession.getRefreshToken().getToken()),this.storage.setItem(s,""+this.signInUserSession.getClockDrift()),this.storage.setItem(r,this.username)},t.cacheUserData=function(e){this.storage.setItem(this.userDataKey,JSON.stringify(e))},t.clearCachedUserData=function(){this.storage.removeItem(this.userDataKey)},t.clearCachedUser=function(){this.clearCachedTokens(),this.clearCachedUserData()},t.cacheDeviceKeyAndPassword=function(){var e="CognitoIdentityServiceProvider."+this.pool.getClientId()+"."+this.username,t=e+".deviceKey",i=e+".randomPasswordKey",n=e+".deviceGroupKey";this.storage.setItem(t,this.deviceKey),this.storage.setItem(i,this.randomPassword),this.storage.setItem(n,this.deviceGroupKey)},t.getCachedDeviceKeyAndPassword=function(){var e="CognitoIdentityServiceProvider."+this.pool.getClientId()+"."+this.username,t=e+".deviceKey",i=e+".randomPasswordKey",n=e+".deviceGroupKey";this.storage.getItem(t)&&(this.deviceKey=this.storage.getItem(t),this.randomPassword=this.storage.getItem(i),this.deviceGroupKey=this.storage.getItem(n))},t.clearCachedDeviceKeyAndPassword=function(){var e="CognitoIdentityServiceProvider."+this.pool.getClientId()+"."+this.username,t=e+".deviceKey",i=e+".randomPasswordKey",n=e+".deviceGroupKey";this.storage.removeItem(t),this.storage.removeItem(i),this.storage.removeItem(n)},t.clearCachedTokens=function(){var e="CognitoIdentityServiceProvider."+this.pool.getClientId(),t=e+"."+this.username+".idToken",i=e+"."+this.username+".accessToken",n=e+"."+this.username+".refreshToken",s=e+".LastAuthUser",r=e+"."+this.username+".clockDrift";this.storage.removeItem(t),this.storage.removeItem(i),this.storage.removeItem(n),this.storage.removeItem(s),this.storage.removeItem(r)},t.getCognitoUserSession=function(e){var t=new q(e),i=new $(e),n=new X(e);return new J({IdToken:t,AccessToken:i,RefreshToken:n})},t.forgotPassword=function(e,t){var i={ClientId:this.pool.getClientId(),Username:this.username,ClientMetadata:t};this.getUserContextData()&&(i.UserContextData=this.getUserContextData()),this.client.request("ForgotPassword",i,function(t,i){return t?e.onFailure(t):"function"==typeof e.inputVerificationCode?e.inputVerificationCode(i):e.onSuccess(i)})},t.confirmPassword=function(e,t,i,n){var s={ClientId:this.pool.getClientId(),Username:this.username,ConfirmationCode:e,Password:t,ClientMetadata:n};this.getUserContextData()&&(s.UserContextData=this.getUserContextData()),this.client.request("ConfirmForgotPassword",s,function(e){return e?i.onFailure(e):i.onSuccess("SUCCESS")})},t.getAttributeVerificationCode=function(e,t,i){if(null==this.signInUserSession||!this.signInUserSession.isValid())return t.onFailure(new Error("User is not authenticated"));this.client.request("GetUserAttributeVerificationCode",{AttributeName:e,AccessToken:this.signInUserSession.getAccessToken().getJwtToken(),ClientMetadata:i},function(e,i){return e?t.onFailure(e):"function"==typeof t.inputVerificationCode?t.inputVerificationCode(i):t.onSuccess("SUCCESS")})},t.verifyAttribute=function(e,t,i){if(null==this.signInUserSession||!this.signInUserSession.isValid())return i.onFailure(new Error("User is not authenticated"));this.client.request("VerifyUserAttribute",{AttributeName:e,Code:t,AccessToken:this.signInUserSession.getAccessToken().getJwtToken()},function(e){return e?i.onFailure(e):i.onSuccess("SUCCESS")})},t.getDevice=function(e){if(null==this.signInUserSession||!this.signInUserSession.isValid())return e.onFailure(new Error("User is not authenticated"));this.client.request("GetDevice",{AccessToken:this.signInUserSession.getAccessToken().getJwtToken(),DeviceKey:this.deviceKey},function(t,i){return t?e.onFailure(t):e.onSuccess(i)})},t.forgetSpecificDevice=function(e,t){if(null==this.signInUserSession||!this.signInUserSession.isValid())return t.onFailure(new Error("User is not authenticated"));this.client.request("ForgetDevice",{AccessToken:this.signInUserSession.getAccessToken().getJwtToken(),DeviceKey:e},function(e){return e?t.onFailure(e):t.onSuccess("SUCCESS")})},t.forgetDevice=function(e){var t=this;this.forgetSpecificDevice(this.deviceKey,{onFailure:e.onFailure,onSuccess:function(i){return t.deviceKey=null,t.deviceGroupKey=null,t.randomPassword=null,t.clearCachedDeviceKeyAndPassword(),e.onSuccess(i)}})},t.setDeviceStatusRemembered=function(e){if(null==this.signInUserSession||!this.signInUserSession.isValid())return e.onFailure(new Error("User is not authenticated"));this.client.request("UpdateDeviceStatus",{AccessToken:this.signInUserSession.getAccessToken().getJwtToken(),DeviceKey:this.deviceKey,DeviceRememberedStatus:"remembered"},function(t){return t?e.onFailure(t):e.onSuccess("SUCCESS")})},t.setDeviceStatusNotRemembered=function(e){if(null==this.signInUserSession||!this.signInUserSession.isValid())return e.onFailure(new Error("User is not authenticated"));this.client.request("UpdateDeviceStatus",{AccessToken:this.signInUserSession.getAccessToken().getJwtToken(),DeviceKey:this.deviceKey,DeviceRememberedStatus:"not_remembered"},function(t){return t?e.onFailure(t):e.onSuccess("SUCCESS")})},t.listDevices=function(e,t,i){if(null==this.signInUserSession||!this.signInUserSession.isValid())return i.onFailure(new Error("User is not authenticated"));var n={AccessToken:this.signInUserSession.getAccessToken().getJwtToken(),Limit:e};t&&(n.PaginationToken=t),this.client.request("ListDevices",n,function(e,t){return e?i.onFailure(e):i.onSuccess(t)})},t.globalSignOut=function(e){var t=this;if(null==this.signInUserSession||!this.signInUserSession.isValid())return e.onFailure(new Error("User is not authenticated"));this.client.request("GlobalSignOut",{AccessToken:this.signInUserSession.getAccessToken().getJwtToken()},function(i){return i?e.onFailure(i):(t.clearCachedUser(),e.onSuccess("SUCCESS"))})},t.signOut=function(e){var t=this;e&&"function"==typeof e?this.getSession(function(i,n){if(i)return e(i);t.revokeTokens(function(i){t.cleanClientData(),e(i)})}):this.cleanClientData()},t.revokeTokens=function(e){if(void 0===e&&(e=function(){}),"function"!=typeof e)throw new Error("Invalid revokeTokenCallback. It should be a function.");if(!this.signInUserSession)return e(new Error("User is not authenticated"));if(!this.signInUserSession.getAccessToken())return e(new Error("No Access token available"));var t=this.signInUserSession.getRefreshToken().getToken(),i=this.signInUserSession.getAccessToken();if(this.isSessionRevocable(i)&&t)return this.revokeToken({token:t,callback:e});e()},t.isSessionRevocable=function(e){if(e&&"function"==typeof e.decodePayload)try{return!!e.decodePayload().origin_jti}catch(e){}return!1},t.cleanClientData=function(){this.signInUserSession=null,this.clearCachedUser()},t.revokeToken=function(e){var t=e.token,i=e.callback;this.client.requestWithRetry("RevokeToken",{Token:t,ClientId:this.pool.getClientId()},function(e){if(e)return i(e);i()})},t.sendMFASelectionAnswer=function(e,t){var i=this,n={};n.USERNAME=this.username,n.ANSWER=e;var s={ChallengeName:"SELECT_MFA_TYPE",ChallengeResponses:n,ClientId:this.pool.getClientId(),Session:this.Session};this.getUserContextData()&&(s.UserContextData=this.getUserContextData()),this.client.request("RespondToAuthChallenge",s,function(n,s){return n?t.onFailure(n):(i.Session=s.Session,"SMS_MFA"===e?t.mfaRequired(s.ChallengeName,s.ChallengeParameters):"SOFTWARE_TOKEN_MFA"===e?t.totpRequired(s.ChallengeName,s.ChallengeParameters):void 0)})},t.getUserContextData=function(){return this.pool.getUserContextData(this.username)},t.associateSoftwareToken=function(e){var t=this;null!=this.signInUserSession&&this.signInUserSession.isValid()?this.client.request("AssociateSoftwareToken",{AccessToken:this.signInUserSession.getAccessToken().getJwtToken()},function(t,i){return t?e.onFailure(t):e.associateSecretCode(i.SecretCode)}):this.client.request("AssociateSoftwareToken",{Session:this.Session},function(i,n){return i?e.onFailure(i):(t.Session=n.Session,e.associateSecretCode(n.SecretCode))})},t.verifySoftwareToken=function(e,t,i){var n=this;null!=this.signInUserSession&&this.signInUserSession.isValid()?this.client.request("VerifySoftwareToken",{AccessToken:this.signInUserSession.getAccessToken().getJwtToken(),UserCode:e,FriendlyDeviceName:t},function(e,t){return e?i.onFailure(e):i.onSuccess(t)}):this.client.request("VerifySoftwareToken",{Session:this.Session,UserCode:e,FriendlyDeviceName:t},function(e,t){if(e)return i.onFailure(e);n.Session=t.Session;var s={};s.USERNAME=n.username;var r={ChallengeName:"MFA_SETUP",ClientId:n.pool.getClientId(),ChallengeResponses:s,Session:n.Session};n.getUserContextData()&&(r.UserContextData=n.getUserContextData()),n.client.request("RespondToAuthChallenge",r,function(e,t){return e?i.onFailure(e):(n.signInUserSession=n.getCognitoUserSession(t.AuthenticationResult),n.cacheTokens(),i.onSuccess(n.signInUserSession))})})},e}(),ce=(i(40061),"aws-amplify/5.0.4"),he={userAgent:ce+" js",product:"",navigator:null,isReactNative:!1};function de(){}"undefined"!=typeof navigator&&navigator.product&&(he.product=navigator.product||"",he.navigator=navigator||null,"ReactNative"===navigator.product?(he.userAgent=ce+" react-native",he.isReactNative=!0):(he.userAgent=ce+" js",he.isReactNative=!1)),de.prototype.userAgent=he.userAgent;const ue=de;function pe(e){var t="function"==typeof Map?new Map:void 0;return pe=function(e){if(null===e||(i=e,-1===Function.toString.call(i).indexOf("[native code]")))return e;var i;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,n)}function n(){return ge(e,arguments,me(this).constructor)}return n.prototype=Object.create(e.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),fe(n,e)},pe(e)}function ge(e,t,i){return ge=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}()?Reflect.construct.bind():function(e,t,i){var n=[null];n.push.apply(n,t);var s=new(Function.bind.apply(e,n));return i&&fe(s,i.prototype),s},ge.apply(null,arguments)}function fe(e,t){return fe=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},fe(e,t)}function me(e){return me=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},me(e)}var ve=function(e){function t(t,i,n,s){var r;return(r=e.call(this,t)||this).code=i,r.name=n,r.statusCode=s,r}return n=e,(i=t).prototype=Object.create(n.prototype),i.prototype.constructor=i,fe(i,n),t;var i,n}(pe(Error)),ye=function(){function e(e,t,i){this.endpoint=t||"https://cognito-idp."+e+".amazonaws.com/";var n=(i||{}).credentials;this.fetchOptions=n?{credentials:n}:{}}var t=e.prototype;return t.promisifyRequest=function(e,t){var i=this;return new Promise(function(n,s){i.request(e,t,function(e,t){e?s(new ve(e.message,e.code,e.name,e.statusCode)):n(t)})})},t.requestWithRetry=function(e,t,i){var n,s,r=this;(n=[t],s=5e3,void 0===s&&(s=3e5),Ce(function(t){return new Promise(function(i,n){r.request(e,t,function(e,t){e?n(e):i(t)})})},n,function(e){return function(t){var i=100*Math.pow(2,t)+100*Math.random();return!(i>e)&&i}}(s))).then(function(e){return i(null,e)}).catch(function(e){return i(e)})},t.request=function(e,t,i){var n,s={"Content-Type":"application/x-amz-json-1.1","X-Amz-Target":"AWSCognitoIdentityProviderService."+e,"X-Amz-User-Agent":ue.prototype.userAgent,"Cache-Control":"no-store"},r=Object.assign({},this.fetchOptions,{headers:s,method:"POST",mode:"cors",body:JSON.stringify(t)});fetch(this.endpoint,r).then(function(e){return n=e,e},function(e){if(e instanceof TypeError)throw new Error("Network error");throw e}).then(function(e){return e.json().catch(function(){return{}})}).then(function(e){if(n.ok)return i(null,e);var t=(e.__type||e.code).split("#").pop(),s=new Error(e.message||e.Message||null);return s.name=t,s.code=t,i(s)}).catch(function(e){if(n&&n.headers&&n.headers.get("x-amzn-errortype"))try{var t=n.headers.get("x-amzn-errortype").split(":")[0],s=new Error(n.status?n.status.toString():null);return s.code=t,s.name=t,s.statusCode=n.status,i(s)}catch(t){return i(e)}else e instanceof Error&&"Network error"===e.message&&(e.code="NetworkError");return i(e)})},e}();function Ce(e,t,i,n){if(void 0===n&&(n=1),"function"!=typeof e)throw Error("functionToRetry must be a function");return e.name,JSON.stringify(t),e.apply(void 0,t).catch(function(s){if(e.name,(r=s)&&r.nonRetryable)throw e.name,s;var r,o=i(n,t,s);if(e.name,!1!==o)return new Promise(function(e){return setTimeout(e,o)}).then(function(){return Ce(e,t,i,n+1)});throw s})}var be=function(){function e(e,t){var i=e||{},n=i.UserPoolId,s=i.ClientId,r=i.endpoint,o=i.fetchOptions,a=i.AdvancedSecurityDataCollectionFlag;if(!n||!s)throw new Error("Both UserPoolId and ClientId are required.");if(n.length>55||!/^[\w-]+_[0-9a-zA-Z]+$/.test(n))throw new Error("Invalid UserPoolId format.");var l=n.split("_")[0];this.userPoolId=n,this.clientId=s,this.client=new ye(l,r,o),this.advancedSecurityDataCollectionFlag=!1!==a,this.storage=e.Storage||(new oe).getStorage(),t&&(this.wrapRefreshSessionCallback=t)}var t=e.prototype;return t.getUserPoolId=function(){return this.userPoolId},t.getUserPoolName=function(){return this.getUserPoolId().split("_")[1]},t.getClientId=function(){return this.clientId},t.signUp=function(e,t,i,n,s,r){var o=this,a={ClientId:this.clientId,Username:e,Password:t,UserAttributes:i,ValidationData:n,ClientMetadata:r};this.getUserContextData(e)&&(a.UserContextData=this.getUserContextData(e)),this.client.request("SignUp",a,function(t,i){if(t)return s(t,null);var n={Username:e,Pool:o,Storage:o.storage},r={user:new le(n),userConfirmed:i.UserConfirmed,userSub:i.UserSub,codeDeliveryDetails:i.CodeDeliveryDetails};return s(null,r)})},t.getCurrentUser=function(){var e="CognitoIdentityServiceProvider."+this.clientId+".LastAuthUser",t=this.storage.getItem(e);if(t){var i={Username:t,Pool:this,Storage:this.storage};return new le(i)}return null},t.getUserContextData=function(e){if("undefined"!=typeof AmazonCognitoAdvancedSecurityData){var t=AmazonCognitoAdvancedSecurityData;if(this.advancedSecurityDataCollectionFlag){var i=t.getData(e,this.userPoolId,this.clientId);if(i)return{EncodedData:i}}return{}}},e}(),Se=i(97351),we=function(){function e(e){if(!e.domain)throw new Error("The domain of cookieStorage can not be undefined.");if(this.domain=e.domain,e.path?this.path=e.path:this.path="/",Object.prototype.hasOwnProperty.call(e,"expires")?this.expires=e.expires:this.expires=365,Object.prototype.hasOwnProperty.call(e,"secure")?this.secure=e.secure:this.secure=!0,Object.prototype.hasOwnProperty.call(e,"sameSite")){if(!["strict","lax","none"].includes(e.sameSite))throw new Error('The sameSite value of cookieStorage must be "lax", "strict" or "none".');if("none"===e.sameSite&&!this.secure)throw new Error("sameSite = None requires the Secure attribute in latest browser versions.");this.sameSite=e.sameSite}else this.sameSite=null}var t=e.prototype;return t.setItem=function(e,t){var i={path:this.path,expires:this.expires,domain:this.domain,secure:this.secure};return this.sameSite&&(i.sameSite=this.sameSite),Se.set(e,t,i),Se.get(e)},t.getItem=function(e){return Se.get(e)},t.removeItem=function(e){var t={path:this.path,expires:this.expires,domain:this.domain,secure:this.secure};return this.sameSite&&(t.sameSite=this.sameSite),Se.remove(e,t)},t.clear=function(){for(var e=Se.get(),t=Object.keys(e).length,i=0;i<t;++i)this.removeItem(Object.keys(e)[i]);return{}},e}(),xe=i(71481),Ee=function(e){var t=window.open(e,"_self");return t?Promise.resolve(t):Promise.reject()},Me=function(){return Me=Object.assign||function(e){for(var t,i=1,n=arguments.length;i<n;i++)for(var s in t=arguments[i])Object.prototype.hasOwnProperty.call(t,s)&&(e[s]=t[s]);return e},Me.apply(this,arguments)},Ae=function(e,t,i,n){return new(i||(i=Promise))(function(s,r){function o(e){try{l(n.next(e))}catch(e){r(e)}}function a(e){try{l(n.throw(e))}catch(e){r(e)}}function l(e){var t;e.done?s(e.value):(t=e.value,t instanceof i?t:new i(function(e){e(t)})).then(o,a)}l((n=n.apply(e,t||[])).next())})},Te=function(e,t){var i,n,s,r,o={label:0,sent:function(){if(1&s[0])throw s[1];return s[1]},trys:[],ops:[]};return r={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(r[Symbol.iterator]=function(){return this}),r;function a(r){return function(a){return function(r){if(i)throw new TypeError("Generator is already executing.");for(;o;)try{if(i=1,n&&(s=2&r[0]?n.return:r[0]?n.throw||((s=n.return)&&s.call(n),0):n.next)&&!(s=s.call(n,r[1])).done)return s;switch(n=0,s&&(r=[2&r[0],s.value]),r[0]){case 0:case 1:s=r;break;case 4:return o.label++,{value:r[1],done:!1};case 5:o.label++,n=r[1],r=[0];continue;case 7:r=o.ops.pop(),o.trys.pop();continue;default:if(!((s=(s=o.trys).length>0&&s[s.length-1])||6!==r[0]&&2!==r[0])){o=0;continue}if(3===r[0]&&(!s||r[1]>s[0]&&r[1]<s[3])){o.label=r[1];break}if(6===r[0]&&o.label<s[1]){o.label=s[1],s=r;break}if(s&&o.label<s[2]){o.label=s[2],o.ops.push(r);break}s[2]&&o.ops.pop(),o.trys.pop();continue}r=t.call(e,o)}catch(e){r=[6,e],n=0}finally{i=s=0}if(5&r[0])throw r[1];return{value:r[0]?r[1]:void 0,done:!0}}([r,a])}}},De=function(e,t){var i="function"==typeof Symbol&&e[Symbol.iterator];if(!i)return e;var n,s,r=i.call(e),o=[];try{for(;(void 0===t||t-- >0)&&!(n=r.next()).done;)o.push(n.value)}catch(e){s={error:e}}finally{try{n&&!n.done&&(i=r.return)&&i.call(r)}finally{if(s)throw s.error}}return o},Ie="undefined"!=typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("amplify_default"):"@@amplify_default",Re=function(e,t,i){h.YZ.dispatch("auth",{event:e,data:t,message:i},"Auth",Ie)},Le=new c.C("OAuth"),ke=function(){function e(e){var t=e.config,i=e.cognitoClientId,n=e.scopes,s=void 0===n?[]:n;if(this._urlOpener=t.urlOpener||Ee,this._config=t,this._cognitoClientId=i,!this.isValidScopes(s))throw Error("scopes must be a String Array");this._scopes=s}return e.prototype.isValidScopes=function(e){return Array.isArray(e)&&e.every(function(e){return"string"==typeof e})},e.prototype.oauthSignIn=function(e,t,i,s,r,o){void 0===e&&(e="code"),void 0===r&&(r=n.Cognito);var a=this._generateState(32),l=o?a+"-"+o.split("").map(function(e){return e.charCodeAt(0).toString(16).padStart(2,"0")}).join(""):a;!function(e){window.sessionStorage.setItem("oauth_state",e)}(l);var c,h=this._generateRandom(128);c=h,window.sessionStorage.setItem("ouath_pkce_key",c);var d=this._generateChallenge(h),u=this._scopes.join(" "),p="https://"+t+"/oauth2/authorize?"+Object.entries(Me(Me({redirect_uri:i,response_type:e,client_id:s,identity_provider:r,scope:u,state:l},"code"===e?{code_challenge:d}:{}),"code"===e?{code_challenge_method:"S256"}:{})).map(function(e){var t=De(e,2),i=t[0],n=t[1];return encodeURIComponent(i)+"="+encodeURIComponent(n)}).join("&");Le.debug("Redirecting to "+p),this._urlOpener(p,i)},e.prototype._handleCodeFlow=function(e){return Ae(this,void 0,void 0,function(){var t,i,n,s,r,o,l,c,h,d,u,p,g,f;return Te(this,function(m){switch(m.label){case 0:return t=((0,xe.parse)(e).query||"").split("&").map(function(e){return e.split("=")}).reduce(function(e,t){var i,n=De(t,2),s=n[0],r=n[1];return Me(Me({},e),((i={})[s]=r,i))},{code:void 0}).code,i=(0,xe.parse)(e).pathname||"/",n=(0,xe.parse)(this._config.redirectSignIn).pathname||"/",t&&i===n?(s="https://"+this._config.domain+"/oauth2/token",Re("codeFlow",{},"Retrieving tokens from "+s),r=a(this._config)?this._cognitoClientId:this._config.clientID,o=a(this._config)?this._config.redirectSignIn:this._config.redirectUri,v=window.sessionStorage.getItem("ouath_pkce_key"),window.sessionStorage.removeItem("ouath_pkce_key"),c=Me({grant_type:"authorization_code",code:t,client_id:r,redirect_uri:o},(l=v)?{code_verifier:l}:{}),Le.debug("Calling token endpoint: "+s+" with",c),h=Object.entries(c).map(function(e){var t=De(e,2),i=t[0],n=t[1];return encodeURIComponent(i)+"="+encodeURIComponent(n)}).join("&"),[4,fetch(s,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded"},body:h})]):[2];case 1:return[4,m.sent().json()];case 2:if(d=m.sent(),u=d.access_token,p=d.refresh_token,g=d.id_token,f=d.error)throw new Error(f);return[2,{accessToken:u,refreshToken:p,idToken:g}]}var v})})},e.prototype._handleImplicitFlow=function(e){return Ae(this,void 0,void 0,function(){var t,i,n;return Te(this,function(s){return t=((0,xe.parse)(e).hash||"#").substr(1).split("&").map(function(e){return e.split("=")}).reduce(function(e,t){var i,n=De(t,2),s=n[0],r=n[1];return Me(Me({},e),((i={})[s]=r,i))},{id_token:void 0,access_token:void 0}),i=t.id_token,n=t.access_token,Re("implicitFlow",{},"Got tokens from "+e),Le.debug("Retrieving implicit tokens from "+e+" with"),[2,{accessToken:n,idToken:i,refreshToken:null}]})})},e.prototype.handleAuthResponse=function(e){return Ae(this,void 0,void 0,function(){var t,i,n,s,r,o,a;return Te(this,function(l){switch(l.label){case 0:if(l.trys.push([0,5,,6]),t=e?Me(Me({},((0,xe.parse)(e).hash||"#").substr(1).split("&").map(function(e){return e.split("=")}).reduce(function(e,t){var i=De(t,2),n=i[0],s=i[1];return e[n]=s,e},{})),((0,xe.parse)(e).query||"").split("&").map(function(e){return e.split("=")}).reduce(function(e,t){var i=De(t,2),n=i[0],s=i[1];return e[n]=s,e},{})):{},i=t.error,n=t.error_description,i)throw new Error(n);return s=this._validateState(t),Le.debug("Starting "+this._config.responseType+" flow with "+e),"code"!==this._config.responseType?[3,2]:(r=[{}],[4,this._handleCodeFlow(e)]);case 1:return[2,Me.apply(void 0,[Me.apply(void 0,r.concat([l.sent()])),{state:s}])];case 2:return o=[{}],[4,this._handleImplicitFlow(e)];case 3:return[2,Me.apply(void 0,[Me.apply(void 0,o.concat([l.sent()])),{state:s}])];case 4:return[3,6];case 5:throw a=l.sent(),Le.error("Error handling auth response.",a),a;case 6:return[2]}})})},e.prototype._validateState=function(e){if(e){var t,i=(t=window.sessionStorage.getItem("oauth_state"),window.sessionStorage.removeItem("oauth_state"),t),n=e.state;if(i&&i!==n)throw new Error("Invalid state in OAuth flow");return n}},e.prototype.signOut=function(){return Ae(this,void 0,void 0,function(){var e,t,i;return Te(this,function(n){return e="https://"+this._config.domain+"/logout?",t=a(this._config)?this._cognitoClientId:this._config.oauth.clientID,i=a(this._config)?this._config.redirectSignOut:this._config.returnTo,e+=Object.entries({client_id:t,logout_uri:encodeURIComponent(i)}).map(function(e){var t=De(e,2);return t[0]+"="+t[1]}).join("&"),Re("oAuthSignOut",{oAuth:"signOut"},"Signing out from "+e),Le.debug("Signing out from "+e),[2,this._urlOpener(e,i)]})})},e.prototype._generateState=function(e){for(var t="",i=e;i>0;--i)t+="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"[Math.round(61*Math.random())];return t},e.prototype._generateChallenge=function(e){return this._base64URL(E()(e))},e.prototype._base64URL=function(e){return e.toString(Q()).replace(/=/g,"").replace(/\+/g,"-").replace(/\//g,"_")},e.prototype._generateRandom=function(e){var t=new Uint8Array(e);if("undefined"!=typeof window&&window.crypto)window.crypto.getRandomValues(t);else for(var i=0;i<e;i+=1)t[i]=66*Math.random()|0;return this._bufferToString(t)},e.prototype._bufferToString=function(e){for(var t=[],i=0;i<e.byteLength;i+=1){var n=e[i]%62;t.push("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789"[n])}return t.join("")},e}();const Pe=ke;var Ne;!function(e){e.DEFAULT_MSG="Authentication Error",e.EMPTY_EMAIL="Email cannot be empty",e.EMPTY_PHONE="Phone number cannot be empty",e.EMPTY_USERNAME="Username cannot be empty",e.INVALID_USERNAME="The username should either be a string or one of the sign in types",e.EMPTY_PASSWORD="Password cannot be empty",e.EMPTY_CODE="Confirmation code cannot be empty",e.SIGN_UP_ERROR="Error creating account",e.NO_MFA="No valid MFA method provided",e.INVALID_MFA="Invalid MFA type",e.EMPTY_CHALLENGE="Challenge response cannot be empty",e.NO_USER_SESSION="Failed to get the session because the user is empty",e.NETWORK_ERROR="Network Error",e.DEVICE_CONFIG="Device tracking has not been configured in this User Pool",e.AUTOSIGNIN_ERROR="Please use your credentials to sign in"}(Ne||(Ne={}));var Oe,_e=(Oe=function(e,t){return Oe=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])},Oe(e,t)},function(e,t){function i(){this.constructor=e}Oe(e,t),e.prototype=null===t?Object.create(t):(i.prototype=t.prototype,new i)}),Fe=new c.C("AuthError"),Ge=function(e){function t(i){var n=this,s=Be[i],r=s.message,o=s.log;return(n=e.call(this,r)||this).constructor=t,Object.setPrototypeOf(n,t.prototype),n.name="AuthError",n.log=o||r,Fe.error(n.log),n}return _e(t,e),t}(Error),Ve=function(e){function t(i){var n=e.call(this,i)||this;return n.constructor=t,Object.setPrototypeOf(n,t.prototype),n.name="NoUserPoolError",n}return _e(t,e),t}(Ge),Be={noConfig:{message:Ne.DEFAULT_MSG,log:"\n            Error: Amplify has not been configured correctly.\n            This error is typically caused by one of the following scenarios:\n\n            1. Make sure you're passing the awsconfig object to Amplify.configure() in your app's entry point\n                See https://aws-amplify.github.io/docs/js/authentication#configure-your-app for more information\n            \n            2. There might be multiple conflicting versions of amplify packages in your node_modules.\n\t\t\t\tRefer to our docs site for help upgrading Amplify packages (https://docs.amplify.aws/lib/troubleshooting/upgrading/q/platform/js)\n        "},missingAuthConfig:{message:Ne.DEFAULT_MSG,log:"\n            Error: Amplify has not been configured correctly. \n            The configuration object is missing required auth properties.\n            This error is typically caused by one of the following scenarios:\n\n            1. Did you run `amplify push` after adding auth via `amplify add auth`?\n                See https://aws-amplify.github.io/docs/js/authentication#amplify-project-setup for more information\n\n            2. This could also be caused by multiple conflicting versions of amplify packages, see (https://docs.amplify.aws/lib/troubleshooting/upgrading/q/platform/js) for help upgrading Amplify packages.\n        "},emptyUsername:{message:Ne.EMPTY_USERNAME},invalidUsername:{message:Ne.INVALID_USERNAME},emptyPassword:{message:Ne.EMPTY_PASSWORD},emptyCode:{message:Ne.EMPTY_CODE},signUpError:{message:Ne.SIGN_UP_ERROR,log:"The first parameter should either be non-null string or object"},noMFA:{message:Ne.NO_MFA},invalidMFA:{message:Ne.INVALID_MFA},emptyChallengeResponse:{message:Ne.EMPTY_CHALLENGE},noUserSession:{message:Ne.NO_USER_SESSION},deviceConfig:{message:Ne.DEVICE_CONFIG},networkError:{message:Ne.NETWORK_ERROR},autoSignInError:{message:Ne.AUTOSIGNIN_ERROR},default:{message:Ne.DEFAULT_MSG}},He=function(){return He=Object.assign||function(e){for(var t,i=1,n=arguments.length;i<n;i++)for(var s in t=arguments[i])Object.prototype.hasOwnProperty.call(t,s)&&(e[s]=t[s]);return e},He.apply(this,arguments)},ze=function(e,t,i,n){return new(i||(i=Promise))(function(s,r){function o(e){try{l(n.next(e))}catch(e){r(e)}}function a(e){try{l(n.throw(e))}catch(e){r(e)}}function l(e){var t;e.done?s(e.value):(t=e.value,t instanceof i?t:new i(function(e){e(t)})).then(o,a)}l((n=n.apply(e,t||[])).next())})},Ue=function(e,t){var i,n,s,r,o={label:0,sent:function(){if(1&s[0])throw s[1];return s[1]},trys:[],ops:[]};return r={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(r[Symbol.iterator]=function(){return this}),r;function a(r){return function(a){return function(r){if(i)throw new TypeError("Generator is already executing.");for(;o;)try{if(i=1,n&&(s=2&r[0]?n.return:r[0]?n.throw||((s=n.return)&&s.call(n),0):n.next)&&!(s=s.call(n,r[1])).done)return s;switch(n=0,s&&(r=[2&r[0],s.value]),r[0]){case 0:case 1:s=r;break;case 4:return o.label++,{value:r[1],done:!1};case 5:o.label++,n=r[1],r=[0];continue;case 7:r=o.ops.pop(),o.trys.pop();continue;default:if(!((s=(s=o.trys).length>0&&s[s.length-1])||6!==r[0]&&2!==r[0])){o=0;continue}if(3===r[0]&&(!s||r[1]>s[0]&&r[1]<s[3])){o.label=r[1];break}if(6===r[0]&&o.label<s[1]){o.label=s[1],s=r;break}if(s&&o.label<s[2]){o.label=s[2],o.ops.push(r);break}s[2]&&o.ops.pop(),o.trys.pop();continue}r=t.call(e,o)}catch(e){r=[6,e],n=0}finally{i=s=0}if(5&r[0])throw r[1];return{value:r[0]?r[1]:void 0,done:!0}}([r,a])}}},We=function(e,t){var i="function"==typeof Symbol&&e[Symbol.iterator];if(!i)return e;var n,s,r=i.call(e),o=[];try{for(;(void 0===t||t-- >0)&&!(n=r.next()).done;)o.push(n.value)}catch(e){s={error:e}}finally{try{n&&!n.done&&(i=r.return)&&i.call(r)}finally{if(s)throw s.error}}return o},je=new c.C("AuthClass"),Ke="aws.cognito.signin.user.admin",$e="undefined"!=typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("amplify_default"):"@@amplify_default",Ye=function(e,t,i){h.YZ.dispatch("auth",{event:e,data:t,message:i},"Auth",$e)},qe=function(){function e(e){var t=this;this.userPool=null,this.user=null,this.oAuthFlowInProgress=!1,this.autoSignInInitiated=!1,this.Credentials=d.Ji,this.wrapRefreshSessionCallback=function(e){return function(t,i){return i?Ye("tokenRefresh",void 0,"New token retrieved"):Ye("tokenRefresh_failure",t,"Failed to retrieve new token"),e(t,i)}},this.configure(e),this.currentCredentials=this.currentCredentials.bind(this),this.currentUserCredentials=this.currentUserCredentials.bind(this),h.YZ.listen("auth",function(e){switch(e.payload.event){case"signIn":t._storage.setItem("amplify-signin-with-hostedUI","false");break;case"signOut":t._storage.removeItem("amplify-signin-with-hostedUI");break;case"cognitoHostedUI":t._storage.setItem("amplify-signin-with-hostedUI","true")}})}return e.prototype.getModuleName=function(){return"Auth"},e.prototype.configure=function(e){var t=this;if(!e)return this._config||{};je.debug("configure Auth");var i=Object.assign({},this._config,u.iX.parseMobilehubConfig(e).Auth,e);this._config=i;var n=this._config,r=n.userPoolId,o=n.userPoolWebClientId,l=n.cookieStorage,c=n.oauth,h=n.region,d=n.identityPoolId,p=n.mandatorySignIn,f=n.refreshHandlers,y=n.identityPoolRegion,C=n.clientMetadata,b=n.endpoint;if(this._config.storage){if(!this._isValidAuthStorage(this._config.storage))throw je.error("The storage in the Auth config is not valid!"),new Error("Empty storage object");this._storage=this._config.storage}else this._storage=l?new we(l):e.ssr?new m:(new v.i1).getStorage();if(this._storageSync=Promise.resolve(),"function"==typeof this._storage.sync&&(this._storageSync=this._storage.sync()),r){var S={UserPoolId:r,ClientId:o,endpoint:b};S.Storage=this._storage,this.userPool=new be(S,this.wrapRefreshSessionCallback)}this.Credentials.configure({mandatorySignIn:p,region:y||h,userPoolId:r,identityPoolId:d,refreshHandlers:f,storage:this._storage});var w=c?a(this._config.oauth)?c:c.awsCognito:void 0;if(w){var x=Object.assign({cognitoClientId:o,UserPoolId:r,domain:w.domain,scopes:w.scope,redirectSignIn:w.redirectSignIn,redirectSignOut:w.redirectSignOut,responseType:w.responseType,Storage:this._storage,urlOpener:w.urlOpener,clientMetadata:C},w.options);this._oAuthHandler=new Pe({scopes:x.scopes,config:x,cognitoClientId:x.cognitoClientId});var E={};!function(){if((0,g.gy)().isBrowser&&window.location)!function(e){var i=e.url;E[i]||(E[i]=!0,t._handleAuthResponse(i))}({url:window.location.href});else if(!(0,g.gy)().isNode)throw new Error("Not supported")}()}return Ye("configured",null,"The Auth category has been configured successfully"),this.autoSignInInitiated||"function"!=typeof this._storage.getItem||(this.isTrueStorageValue("amplify-polling-started")&&(Ye("autoSignIn_failure",null,s.AutoSignInError),this._storage.removeItem("amplify-auto-sign-in")),this._storage.removeItem("amplify-polling-started")),this._config},e.prototype.signUp=function(e){for(var t,i,n,r=this,o=[],a=1;a<arguments.length;a++)o[a-1]=arguments[a];if(!this.userPool)return this.rejectNoUserPool();var l,c=null,h=null,d=[],u=null,p={enabled:!1},g={},f={};if(e&&"string"==typeof e){c=e,h=o?o[0]:null;var m=o?o[1]:null,v=o?o[2]:null;m&&d.push(new ne({Name:"email",Value:m})),v&&d.push(new ne({Name:"phone_number",Value:v}))}else{if(!e||"object"!=typeof e)return this.rejectAuthError(s.SignUpError);c=e.username,h=e.password,e&&e.clientMetadata?l=e.clientMetadata:this._config.clientMetadata&&(l=this._config.clientMetadata);var y=e.attributes;y&&Object.keys(y).map(function(e){d.push(new ne({Name:e,Value:y[e]}))});var C=e.validationData;C&&(u=[],Object.keys(C).map(function(e){u.push(new ne({Name:e,Value:C[e]}))})),(p=null!==(t=e.autoSignIn)&&void 0!==t?t:{enabled:!1}).enabled&&(this._storage.setItem("amplify-auto-sign-in","true"),g=null!==(i=p.validationData)&&void 0!==i?i:{},f=null!==(n=p.clientMetaData)&&void 0!==n?n:{})}return c?h?(je.debug("signUp attrs:",d),je.debug("signUp validation data:",u),new Promise(function(e,t){r.userPool.signUp(c,h,d,u,function(i,n){i?(Ye("signUp_failure",i,c+" failed to signup"),t(i)):(Ye("signUp",n,c+" has signed up successfully"),p.enabled&&r.handleAutoSignIn(c,h,g,f,n),e(n))},l)})):this.rejectAuthError(s.EmptyPassword):this.rejectAuthError(s.EmptyUsername)},e.prototype.handleAutoSignIn=function(e,t,i,n,s){this.autoSignInInitiated=!0;var r=new C({Username:e,Password:t,ValidationData:i,ClientMetadata:n});s.userConfirmed?this.signInAfterUserConfirmed(r):"link"===this._config.signUpVerificationMethod?this.handleLinkAutoSignIn(r):this.handleCodeAutoSignIn(r)},e.prototype.handleCodeAutoSignIn=function(e){var t=this,i=function(n){"confirmSignUp"===n.payload.event&&t.signInAfterUserConfirmed(e,i)};h.YZ.listen("auth",i)},e.prototype.handleLinkAutoSignIn=function(e){var t=this;this._storage.setItem("amplify-polling-started","true");var i=Date.now(),n=setInterval(function(){Date.now()-i>18e4?(clearInterval(n),Ye("autoSignIn_failure",null,"Please confirm your account and use your credentials to sign in."),t._storage.removeItem("amplify-auto-sign-in")):t.signInAfterUserConfirmed(e,null,n)},5e3)},e.prototype.signInAfterUserConfirmed=function(e,t,i){return ze(this,void 0,void 0,function(){var n,s,r=this;return Ue(this,function(o){switch(o.label){case 0:n=this.createCognitoUser(e.getUsername()),o.label=1;case 1:return o.trys.push([1,3,,4]),[4,n.authenticateUser(e,this.authCallbacks(n,function(n){Ye("autoSignIn",n,e.getUsername()+" has signed in successfully"),t&&h.YZ.remove("auth",t),i&&(clearInterval(i),r._storage.removeItem("amplify-polling-started")),r._storage.removeItem("amplify-auto-sign-in")},function(e){je.error(e),r._storage.removeItem("amplify-auto-sign-in")}))];case 2:return o.sent(),[3,4];case 3:return s=o.sent(),je.error(s),[3,4];case 4:return[2]}})})},e.prototype.confirmSignUp=function(e,t,i){var n=this;if(!this.userPool)return this.rejectNoUserPool();if(!e)return this.rejectAuthError(s.EmptyUsername);if(!t)return this.rejectAuthError(s.EmptyCode);var r,o=this.createCognitoUser(e),a=!i||"boolean"!=typeof i.forceAliasCreation||i.forceAliasCreation;return i&&i.clientMetadata?r=i.clientMetadata:this._config.clientMetadata&&(r=this._config.clientMetadata),new Promise(function(i,l){o.confirmRegistration(t,a,function(t,r){t?l(t):(Ye("confirmSignUp",r,e+" has been confirmed successfully"),n.isTrueStorageValue("amplify-auto-sign-in")&&!n.autoSignInInitiated&&(Ye("autoSignIn_failure",null,s.AutoSignInError),n._storage.removeItem("amplify-auto-sign-in")),i(r))},r)})},e.prototype.isTrueStorageValue=function(e){var t=this._storage.getItem(e);return!!t&&"true"===t},e.prototype.resendSignUp=function(e,t){if(void 0===t&&(t=this._config.clientMetadata),!this.userPool)return this.rejectNoUserPool();if(!e)return this.rejectAuthError(s.EmptyUsername);var i=this.createCognitoUser(e);return new Promise(function(e,n){i.resendConfirmationCode(function(t,i){t?n(t):e(i)},t)})},e.prototype.signIn=function(e,t,i){if(void 0===i&&(i=this._config.clientMetadata),!this.userPool)return this.rejectNoUserPool();var n=null,r=null,o={};if("string"==typeof e)n=e,r=t;else{if(!e.username)return this.rejectAuthError(s.InvalidUsername);void 0!==t&&je.warn("The password should be defined under the first parameter object!"),n=e.username,r=e.password,o=e.validationData}if(!n)return this.rejectAuthError(s.EmptyUsername);var a=new C({Username:n,Password:r,ValidationData:o,ClientMetadata:i});return r?this.signInWithPassword(a):this.signInWithoutPassword(a)},e.prototype.authCallbacks=function(e,t,i){var n=this,s=this;return{onSuccess:function(r){return ze(n,void 0,void 0,function(){var n,o,a,l;return Ue(this,function(c){switch(c.label){case 0:je.debug(r),delete e.challengeName,delete e.challengeParam,c.label=1;case 1:return c.trys.push([1,4,5,9]),[4,this.Credentials.clear()];case 2:return c.sent(),[4,this.Credentials.set(r,"session")];case 3:return n=c.sent(),je.debug("succeed to get cognito credentials",n),[3,9];case 4:return o=c.sent(),je.debug("cannot get cognito credentials",o),[3,9];case 5:return c.trys.push([5,7,,8]),[4,this.currentUserPoolUser()];case 6:return a=c.sent(),s.user=a,Ye("signIn",a,"A user "+e.getUsername()+" has been signed in"),t(a),[3,8];case 7:return l=c.sent(),je.error("Failed to get the signed in user",l),i(l),[3,8];case 8:return[7];case 9:return[2]}})})},onFailure:function(t){je.debug("signIn failure",t),Ye("signIn_failure",t,e.getUsername()+" failed to signin"),i(t)},customChallenge:function(i){je.debug("signIn custom challenge answer required"),e.challengeName="CUSTOM_CHALLENGE",e.challengeParam=i,t(e)},mfaRequired:function(i,n){je.debug("signIn MFA required"),e.challengeName=i,e.challengeParam=n,t(e)},mfaSetup:function(i,n){je.debug("signIn mfa setup",i),e.challengeName=i,e.challengeParam=n,t(e)},newPasswordRequired:function(i,n){je.debug("signIn new password"),e.challengeName="NEW_PASSWORD_REQUIRED",e.challengeParam={userAttributes:i,requiredAttributes:n},t(e)},totpRequired:function(i,n){je.debug("signIn totpRequired"),e.challengeName=i,e.challengeParam=n,t(e)},selectMFAType:function(i,n){je.debug("signIn selectMFAType",i),e.challengeName=i,e.challengeParam=n,t(e)}}},e.prototype.signInWithPassword=function(e){var t=this;if(this.pendingSignIn)throw new Error("Pending sign-in attempt already in progress");var i=this.createCognitoUser(e.getUsername());return this.pendingSignIn=new Promise(function(n,s){i.authenticateUser(e,t.authCallbacks(i,function(e){t.pendingSignIn=null,n(e)},function(e){t.pendingSignIn=null,s(e)}))}),this.pendingSignIn},e.prototype.signInWithoutPassword=function(e){var t=this,i=this.createCognitoUser(e.getUsername());return i.setAuthenticationFlowType("CUSTOM_AUTH"),new Promise(function(n,s){i.initiateAuth(e,t.authCallbacks(i,n,s))})},e.prototype.getMFAOptions=function(e){return new Promise(function(t,i){e.getMFAOptions(function(e,n){if(e)return je.debug("get MFA Options failed",e),void i(e);je.debug("get MFA options success",n),t(n)})})},e.prototype.getPreferredMFA=function(e,t){var i=this,n=this;return new Promise(function(s,r){var o=i._config.clientMetadata,a=!!t&&t.bypassCache;e.getUserData(function(t,o){return ze(i,void 0,void 0,function(){var i,a;return Ue(this,function(l){switch(l.label){case 0:if(!t)return[3,5];if(je.debug("getting preferred mfa failed",t),!this.isSessionInvalid(t))return[3,4];l.label=1;case 1:return l.trys.push([1,3,,4]),[4,this.cleanUpInvalidSession(e)];case 2:return l.sent(),[3,4];case 3:return i=l.sent(),r(new Error("Session is invalid due to: "+t.message+" and failed to clean up invalid session: "+i.message)),[2];case 4:return r(t),[2];case 5:return(a=n._getMfaTypeFromUserData(o))?(s(a),[2]):(r("invalid MFA Type"),[2])}})})},{bypassCache:a,clientMetadata:o})})},e.prototype._getMfaTypeFromUserData=function(e){var t=null,i=e.PreferredMfaSetting;if(i)t=i;else{var n=e.UserMFASettingList;n?0===n.length?t="NOMFA":je.debug("invalid case for getPreferredMFA",e):t=e.MFAOptions?"SMS_MFA":"NOMFA"}return t},e.prototype._getUserData=function(e,t){var i=this;return new Promise(function(n,s){e.getUserData(function(t,r){return ze(i,void 0,void 0,function(){var i;return Ue(this,function(o){switch(o.label){case 0:if(!t)return[3,5];if(je.debug("getting user data failed",t),!this.isSessionInvalid(t))return[3,4];o.label=1;case 1:return o.trys.push([1,3,,4]),[4,this.cleanUpInvalidSession(e)];case 2:return o.sent(),[3,4];case 3:return i=o.sent(),s(new Error("Session is invalid due to: "+t.message+" and failed to clean up invalid session: "+i.message)),[2];case 4:return s(t),[2];case 5:n(r),o.label=6;case 6:return[2]}})})},t)})},e.prototype.setPreferredMFA=function(e,t){return ze(this,void 0,void 0,function(){var i,n,r,o,a,l,c=this;return Ue(this,function(h){switch(h.label){case 0:return i=this._config.clientMetadata,[4,this._getUserData(e,{bypassCache:!0,clientMetadata:i})];case 1:switch(n=h.sent(),r=null,o=null,t){case"TOTP":case"SOFTWARE_TOKEN_MFA":return[3,2];case"SMS":case"SMS_MFA":return[3,3];case"NOMFA":return[3,4]}return[3,6];case 2:return o={PreferredMfa:!0,Enabled:!0},[3,7];case 3:return r={PreferredMfa:!0,Enabled:!0},[3,7];case 4:return a=n.UserMFASettingList,[4,this._getMfaTypeFromUserData(n)];case 5:if("NOMFA"===(l=h.sent()))return[2,Promise.resolve("No change for mfa type")];if("SMS_MFA"===l)r={PreferredMfa:!1,Enabled:!1};else{if("SOFTWARE_TOKEN_MFA"!==l)return[2,this.rejectAuthError(s.InvalidMFA)];o={PreferredMfa:!1,Enabled:!1}}return a&&0!==a.length&&a.forEach(function(e){"SMS_MFA"===e?r={PreferredMfa:!1,Enabled:!1}:"SOFTWARE_TOKEN_MFA"===e&&(o={PreferredMfa:!1,Enabled:!1})}),[3,7];case 6:return je.debug("no validmfa method provided"),[2,this.rejectAuthError(s.NoMFA)];case 7:return[2,new Promise(function(t,n){e.setUserMfaPreference(r,o,function(s,r){if(s)return je.debug("Set user mfa preference error",s),n(s);je.debug("Set user mfa success",r),je.debug("Caching the latest user data into local"),e.getUserData(function(i,s){return ze(c,void 0,void 0,function(){var s;return Ue(this,function(o){switch(o.label){case 0:if(!i)return[3,5];if(je.debug("getting user data failed",i),!this.isSessionInvalid(i))return[3,4];o.label=1;case 1:return o.trys.push([1,3,,4]),[4,this.cleanUpInvalidSession(e)];case 2:return o.sent(),[3,4];case 3:return s=o.sent(),n(new Error("Session is invalid due to: "+i.message+" and failed to clean up invalid session: "+s.message)),[2];case 4:return[2,n(i)];case 5:return[2,t(r)]}})})},{bypassCache:!0,clientMetadata:i})})})]}})})},e.prototype.disableSMS=function(e){return new Promise(function(t,i){e.disableMFA(function(e,n){if(e)return je.debug("disable mfa failed",e),void i(e);je.debug("disable mfa succeed",n),t(n)})})},e.prototype.enableSMS=function(e){return new Promise(function(t,i){e.enableMFA(function(e,n){if(e)return je.debug("enable mfa failed",e),void i(e);je.debug("enable mfa succeed",n),t(n)})})},e.prototype.setupTOTP=function(e){return new Promise(function(t,i){e.associateSoftwareToken({onFailure:function(e){je.debug("associateSoftwareToken failed",e),i(e)},associateSecretCode:function(e){je.debug("associateSoftwareToken sucess",e),t(e)}})})},e.prototype.verifyTotpToken=function(e,t){return je.debug("verification totp token",e,t),new Promise(function(i,n){e.verifySoftwareToken(t,"My TOTP device",{onFailure:function(e){je.debug("verifyTotpToken failed",e),n(e)},onSuccess:function(t){Ye("signIn",e,"A user "+e.getUsername()+" has been signed in"),je.debug("verifyTotpToken success",t),i(t)}})})},e.prototype.confirmSignIn=function(e,t,i,n){var r=this;if(void 0===n&&(n=this._config.clientMetadata),!t)return this.rejectAuthError(s.EmptyCode);var o=this;return new Promise(function(s,a){e.sendMFACode(t,{onSuccess:function(t){return ze(r,void 0,void 0,function(){var i,n;return Ue(this,function(r){switch(r.label){case 0:je.debug(t),r.label=1;case 1:return r.trys.push([1,4,5,6]),[4,this.Credentials.clear()];case 2:return r.sent(),[4,this.Credentials.set(t,"session")];case 3:return i=r.sent(),je.debug("succeed to get cognito credentials",i),[3,6];case 4:return n=r.sent(),je.debug("cannot get cognito credentials",n),[3,6];case 5:return o.user=e,Ye("signIn",e,"A user "+e.getUsername()+" has been signed in"),s(e),[7];case 6:return[2]}})})},onFailure:function(e){je.debug("confirm signIn failure",e),a(e)}},i,n)})},e.prototype.completeNewPassword=function(e,t,i,n){var r=this;if(void 0===i&&(i={}),void 0===n&&(n=this._config.clientMetadata),!t)return this.rejectAuthError(s.EmptyPassword);var o=this;return new Promise(function(s,a){e.completeNewPasswordChallenge(t,i,{onSuccess:function(t){return ze(r,void 0,void 0,function(){var i,n;return Ue(this,function(r){switch(r.label){case 0:je.debug(t),r.label=1;case 1:return r.trys.push([1,4,5,6]),[4,this.Credentials.clear()];case 2:return r.sent(),[4,this.Credentials.set(t,"session")];case 3:return i=r.sent(),je.debug("succeed to get cognito credentials",i),[3,6];case 4:return n=r.sent(),je.debug("cannot get cognito credentials",n),[3,6];case 5:return o.user=e,Ye("signIn",e,"A user "+e.getUsername()+" has been signed in"),s(e),[7];case 6:return[2]}})})},onFailure:function(e){je.debug("completeNewPassword failure",e),Ye("completeNewPassword_failure",e,r.user+" failed to complete the new password flow"),a(e)},mfaRequired:function(t,i){je.debug("signIn MFA required"),e.challengeName=t,e.challengeParam=i,s(e)},mfaSetup:function(t,i){je.debug("signIn mfa setup",t),e.challengeName=t,e.challengeParam=i,s(e)},totpRequired:function(t,i){je.debug("signIn mfa setup",t),e.challengeName=t,e.challengeParam=i,s(e)}},n)})},e.prototype.sendCustomChallengeAnswer=function(e,t,i){var n=this;return void 0===i&&(i=this._config.clientMetadata),this.userPool?t?new Promise(function(s,r){e.sendCustomChallengeAnswer(t,n.authCallbacks(e,s,r),i)}):this.rejectAuthError(s.EmptyChallengeResponse):this.rejectNoUserPool()},e.prototype.deleteUserAttributes=function(e,t){var i=this;return new Promise(function(n,s){i.userSession(e).then(function(i){e.deleteAttributes(t,function(e,t){return e?s(e):n(t)})})})},e.prototype.deleteUser=function(){return ze(this,void 0,void 0,function(){var e,t,i=this;return Ue(this,function(n){switch(n.label){case 0:return n.trys.push([0,2,,3]),[4,this._storageSync];case 1:return n.sent(),[3,3];case 2:throw e=n.sent(),je.debug("Failed to sync cache info into memory",e),new Error(e);case 3:return t=this._oAuthHandler&&"true"===this._storage.getItem("amplify-signin-with-hostedUI"),[2,new Promise(function(e,n){return ze(i,void 0,void 0,function(){var i,s=this;return Ue(this,function(r){if(this.userPool){if(!(i=this.userPool.getCurrentUser()))return je.debug("Failed to get user from user pool"),[2,n(new Error("No current user."))];i.getSession(function(r,o){return ze(s,void 0,void 0,function(){var s,o=this;return Ue(this,function(a){switch(a.label){case 0:if(!r)return[3,5];if(je.debug("Failed to get the user session",r),!this.isSessionInvalid(r))return[3,4];a.label=1;case 1:return a.trys.push([1,3,,4]),[4,this.cleanUpInvalidSession(i)];case 2:return a.sent(),[3,4];case 3:return s=a.sent(),n(new Error("Session is invalid due to: "+r.message+" and failed to clean up invalid session: "+s.message)),[2];case 4:return[2,n(r)];case 5:i.deleteUser(function(s,r){if(s)n(s);else{Ye("userDeleted",r,"The authenticated user has been deleted."),i.signOut(),o.user=null;try{o.cleanCachedItems()}catch(e){je.debug("failed to clear cached items")}t?o.oAuthSignOutRedirect(e,n):(Ye("signOut",o.user,"A user has been signed out"),e(r))}}),a.label=6;case 6:return[2]}})})})}else je.debug("no Congito User pool"),n(new Error("Cognito User pool does not exist"));return[2]})})})]}})})},e.prototype.updateUserAttributes=function(e,t,i){void 0===i&&(i=this._config.clientMetadata);var n=[],s=this;return new Promise(function(r,o){s.userSession(e).then(function(s){for(var a in t)if("sub"!==a&&a.indexOf("_verified")<0){var l={Name:a,Value:t[a]};n.push(l)}e.updateAttributes(n,function(e,t){return e?o(e):r(t)},i)})})},e.prototype.userAttributes=function(e){var t=this;return new Promise(function(i,n){t.userSession(e).then(function(t){e.getUserAttributes(function(e,t){e?n(e):i(t)})})})},e.prototype.verifiedContact=function(e){var t=this;return this.userAttributes(e).then(function(e){var i=t.attributesToObject(e),n={},s={};return i.email&&(i.email_verified?s.email=i.email:n.email=i.email),i.phone_number&&(i.phone_number_verified?s.phone_number=i.phone_number:n.phone_number=i.phone_number),{verified:s,unverified:n}})},e.prototype.isErrorWithMessage=function(e){return"object"==typeof e&&Object.prototype.hasOwnProperty.call(e,"message")},e.prototype.isTokenRevokedError=function(e){return this.isErrorWithMessage(e)&&"Access Token has been revoked"===e.message},e.prototype.isRefreshTokenRevokedError=function(e){return this.isErrorWithMessage(e)&&"Refresh Token has been revoked"===e.message},e.prototype.isUserDisabledError=function(e){return this.isErrorWithMessage(e)&&"User is disabled."===e.message},e.prototype.isUserDoesNotExistError=function(e){return this.isErrorWithMessage(e)&&"User does not exist."===e.message},e.prototype.isRefreshTokenExpiredError=function(e){return this.isErrorWithMessage(e)&&"Refresh Token has expired"===e.message},e.prototype.isSignedInHostedUI=function(){return this._oAuthHandler&&"true"===this._storage.getItem("amplify-signin-with-hostedUI")},e.prototype.isSessionInvalid=function(e){return this.isUserDisabledError(e)||this.isUserDoesNotExistError(e)||this.isTokenRevokedError(e)||this.isRefreshTokenRevokedError(e)||this.isRefreshTokenExpiredError(e)},e.prototype.cleanUpInvalidSession=function(e){return ze(this,void 0,void 0,function(){var t=this;return Ue(this,function(i){switch(i.label){case 0:e.signOut(),this.user=null,i.label=1;case 1:return i.trys.push([1,3,,4]),[4,this.cleanCachedItems()];case 2:return i.sent(),[3,4];case 3:return i.sent(),je.debug("failed to clear cached items"),[3,4];case 4:return this.isSignedInHostedUI()?[2,new Promise(function(e,i){t.oAuthSignOutRedirect(e,i)})]:(Ye("signOut",this.user,"A user has been signed out"),[2])}})})},e.prototype.currentUserPoolUser=function(e){var t=this;return this.userPool?new Promise(function(i,n){t._storageSync.then(function(){return ze(t,void 0,void 0,function(){var t,s,r=this;return Ue(this,function(o){switch(o.label){case 0:return this.isOAuthInProgress()?(je.debug("OAuth signIn in progress, waiting for resolution..."),[4,new Promise(function(e){var t=setTimeout(function(){je.debug("OAuth signIn in progress timeout"),h.YZ.remove("auth",i),e()},1e4);function i(n){var s=n.payload.event;"cognitoHostedUI"!==s&&"cognitoHostedUI_failure"!==s||(je.debug("OAuth signIn resolved: "+s),clearTimeout(t),h.YZ.remove("auth",i),e())}h.YZ.listen("auth",i)})]):[3,2];case 1:o.sent(),o.label=2;case 2:return(t=this.userPool.getCurrentUser())?(s=this._config.clientMetadata,t.getSession(function(s,o){return ze(r,void 0,void 0,function(){var r,a,l,c,h=this;return Ue(this,function(d){switch(d.label){case 0:if(!s)return[3,5];if(je.debug("Failed to get the user session",s),!this.isSessionInvalid(s))return[3,4];d.label=1;case 1:return d.trys.push([1,3,,4]),[4,this.cleanUpInvalidSession(t)];case 2:return d.sent(),[3,4];case 3:return r=d.sent(),n(new Error("Session is invalid due to: "+s.message+" and failed to clean up invalid session: "+r.message)),[2];case 4:return n(s),[2];case 5:return(a=!!e&&e.bypassCache)?[4,this.Credentials.clear()]:[3,7];case 6:d.sent(),d.label=7;case 7:return l=this._config.clientMetadata,(void 0===(c=o.getAccessToken().decodePayload().scope)?"":c).split(" ").includes(Ke)?(t.getUserData(function(e,s){return ze(h,void 0,void 0,function(){var r,o,a,l,c,h,d;return Ue(this,function(u){switch(u.label){case 0:if(!e)return[3,7];if(je.debug("getting user data failed",e),!this.isSessionInvalid(e))return[3,5];u.label=1;case 1:return u.trys.push([1,3,,4]),[4,this.cleanUpInvalidSession(t)];case 2:return u.sent(),[3,4];case 3:return r=u.sent(),n(new Error("Session is invalid due to: "+e.message+" and failed to clean up invalid session: "+r.message)),[2];case 4:return n(e),[3,6];case 5:i(t),u.label=6;case 6:return[2];case 7:for(o=s.PreferredMfaSetting||"NOMFA",a=[],l=0;l<s.UserAttributes.length;l++)c={Name:s.UserAttributes[l].Name,Value:s.UserAttributes[l].Value},h=new ne(c),a.push(h);return d=this.attributesToObject(a),Object.assign(t,{attributes:d,preferredMFA:o}),[2,i(t)]}})})},{bypassCache:a,clientMetadata:l}),[2]):(je.debug("Unable to get the user data because the "+Ke+" is not in the scopes of the access token"),[2,i(t)])}})})},{clientMetadata:s}),[2]):(je.debug("Failed to get user from user pool"),n("No current user"),[2])}})})}).catch(function(e){return je.debug("Failed to sync cache info into memory",e),n(e)})}):this.rejectNoUserPool()},e.prototype.isOAuthInProgress=function(){return this.oAuthFlowInProgress},e.prototype.currentAuthenticatedUser=function(e){return ze(this,void 0,void 0,function(){var t,i,n,s,r;return Ue(this,function(o){switch(o.label){case 0:je.debug("getting current authenticated user"),t=null,o.label=1;case 1:return o.trys.push([1,3,,4]),[4,this._storageSync];case 2:return o.sent(),[3,4];case 3:throw i=o.sent(),je.debug("Failed to sync cache info into memory",i),i;case 4:try{(n=JSON.parse(this._storage.getItem("aws-amplify-federatedInfo")))&&(t=He(He({},n.user),{token:n.token}))}catch(e){je.debug("cannot load federated user from auth storage")}return t?(this.user=t,je.debug("get current authenticated federated user",this.user),[2,this.user]):[3,5];case 5:je.debug("get current authenticated userpool user"),s=null,o.label=6;case 6:return o.trys.push([6,8,,9]),[4,this.currentUserPoolUser(e)];case 7:return s=o.sent(),[3,9];case 8:return"No userPool"===(r=o.sent())&&je.error("Cannot get the current user because the user pool is missing. Please make sure the Auth module is configured with a valid Cognito User Pool ID"),je.debug("The user is not authenticated by the error",r),[2,Promise.reject("The user is not authenticated")];case 9:return this.user=s,[2,this.user]}})})},e.prototype.currentSession=function(){var e=this;return je.debug("Getting current session"),this.userPool?new Promise(function(t,i){e.currentUserPoolUser().then(function(n){e.userSession(n).then(function(e){t(e)}).catch(function(e){je.debug("Failed to get the current session",e),i(e)})}).catch(function(e){je.debug("Failed to get the current user",e),i(e)})}):Promise.reject(new Error("No User Pool in the configuration."))},e.prototype.userSession=function(e){var t=this;if(!e)return je.debug("the user is null"),this.rejectAuthError(s.NoUserSession);var i=this._config.clientMetadata;return new Promise(function(n,s){je.debug("Getting the session from this user:",e),e.getSession(function(i,r){return ze(t,void 0,void 0,function(){var t;return Ue(this,function(o){switch(o.label){case 0:if(!i)return[3,5];if(je.debug("Failed to get the session from user",e),!this.isSessionInvalid(i))return[3,4];o.label=1;case 1:return o.trys.push([1,3,,4]),[4,this.cleanUpInvalidSession(e)];case 2:return o.sent(),[3,4];case 3:return t=o.sent(),s(new Error("Session is invalid due to: "+i.message+" and failed to clean up invalid session: "+t.message)),[2];case 4:return s(i),[2];case 5:return je.debug("Succeed to get the user session",r),n(r),[2]}})})},{clientMetadata:i})})},e.prototype.currentUserCredentials=function(){return ze(this,void 0,void 0,function(){var e,t,i=this;return Ue(this,function(n){switch(n.label){case 0:je.debug("Getting current user credentials"),n.label=1;case 1:return n.trys.push([1,3,,4]),[4,this._storageSync];case 2:return n.sent(),[3,4];case 3:throw e=n.sent(),je.debug("Failed to sync cache info into memory",e),e;case 4:t=null;try{t=JSON.parse(this._storage.getItem("aws-amplify-federatedInfo"))}catch(e){je.debug("failed to get or parse item aws-amplify-federatedInfo",e)}return t?[2,this.Credentials.refreshFederatedToken(t)]:[2,this.currentSession().then(function(e){return je.debug("getting session success",e),i.Credentials.set(e,"session")}).catch(function(){return je.debug("getting guest credentials"),i.Credentials.set(null,"guest")})]}})})},e.prototype.currentCredentials=function(){return je.debug("getting current credentials"),this.Credentials.get()},e.prototype.verifyUserAttribute=function(e,t,i){return void 0===i&&(i=this._config.clientMetadata),new Promise(function(n,s){e.getAttributeVerificationCode(t,{onSuccess:function(e){return n(e)},onFailure:function(e){return s(e)}},i)})},e.prototype.verifyUserAttributeSubmit=function(e,t,i){return i?new Promise(function(n,s){e.verifyAttribute(t,i,{onSuccess:function(e){n(e)},onFailure:function(e){s(e)}})}):this.rejectAuthError(s.EmptyCode)},e.prototype.verifyCurrentUserAttribute=function(e){var t=this;return t.currentUserPoolUser().then(function(i){return t.verifyUserAttribute(i,e)})},e.prototype.verifyCurrentUserAttributeSubmit=function(e,t){var i=this;return i.currentUserPoolUser().then(function(n){return i.verifyUserAttributeSubmit(n,e,t)})},e.prototype.cognitoIdentitySignOut=function(e,t){return ze(this,void 0,void 0,function(){var i,n,s=this;return Ue(this,function(r){switch(r.label){case 0:return r.trys.push([0,2,,3]),[4,this._storageSync];case 1:return r.sent(),[3,3];case 2:throw i=r.sent(),je.debug("Failed to sync cache info into memory",i),i;case 3:return n=this._oAuthHandler&&"true"===this._storage.getItem("amplify-signin-with-hostedUI"),[2,new Promise(function(i,r){if(e&&e.global){je.debug("user global sign out",t);var o=s._config.clientMetadata;t.getSession(function(e,o){return ze(s,void 0,void 0,function(){var s,o=this;return Ue(this,function(a){switch(a.label){case 0:if(!e)return[3,5];if(je.debug("failed to get the user session",e),!this.isSessionInvalid(e))return[3,4];a.label=1;case 1:return a.trys.push([1,3,,4]),[4,this.cleanUpInvalidSession(t)];case 2:return a.sent(),[3,4];case 3:return s=a.sent(),r(new Error("Session is invalid due to: "+e.message+" and failed to clean up invalid session: "+s.message)),[2];case 4:return[2,r(e)];case 5:return t.globalSignOut({onSuccess:function(e){if(je.debug("global sign out success"),!n)return i();o.oAuthSignOutRedirect(i,r)},onFailure:function(e){return je.debug("global sign out failed",e),r(e)}}),[2]}})})},{clientMetadata:o})}else je.debug("user sign out",t),t.signOut(function(){if(!n)return i();s.oAuthSignOutRedirect(i,r)})})]}})})},e.prototype.oAuthSignOutRedirect=function(e,t){(0,g.gy)().isBrowser?this.oAuthSignOutRedirectOrReject(t):this.oAuthSignOutAndResolve(e)},e.prototype.oAuthSignOutAndResolve=function(e){this._oAuthHandler.signOut(),e()},e.prototype.oAuthSignOutRedirectOrReject=function(e){this._oAuthHandler.signOut(),setTimeout(function(){return e(Error("Signout timeout fail"))},3e3)},e.prototype.signOut=function(e){return ze(this,void 0,void 0,function(){var t;return Ue(this,function(i){switch(i.label){case 0:return i.trys.push([0,2,,3]),[4,this.cleanCachedItems()];case 1:return i.sent(),[3,3];case 2:return i.sent(),je.debug("failed to clear cached items"),[3,3];case 3:return this.userPool?(t=this.userPool.getCurrentUser())?[4,this.cognitoIdentitySignOut(e,t)]:[3,5]:[3,7];case 4:return i.sent(),[3,6];case 5:je.debug("no current Cognito user"),i.label=6;case 6:return[3,8];case 7:je.debug("no Cognito User pool"),i.label=8;case 8:return Ye("signOut",this.user,"A user has been signed out"),this.user=null,[2]}})})},e.prototype.cleanCachedItems=function(){return ze(this,void 0,void 0,function(){return Ue(this,function(e){switch(e.label){case 0:return[4,this.Credentials.clear()];case 1:return e.sent(),[2]}})})},e.prototype.changePassword=function(e,t,i,n){var s=this;return void 0===n&&(n=this._config.clientMetadata),new Promise(function(r,o){s.userSession(e).then(function(s){e.changePassword(t,i,function(e,t){return e?(je.debug("change password failure",e),o(e)):r(t)},n)})})},e.prototype.forgotPassword=function(e,t){if(void 0===t&&(t=this._config.clientMetadata),!this.userPool)return this.rejectNoUserPool();if(!e)return this.rejectAuthError(s.EmptyUsername);var i=this.createCognitoUser(e);return new Promise(function(n,s){i.forgotPassword({onSuccess:function(){n()},onFailure:function(t){je.debug("forgot password failure",t),Ye("forgotPassword_failure",t,e+" forgotPassword failed"),s(t)},inputVerificationCode:function(t){Ye("forgotPassword",i,e+" has initiated forgot password flow"),n(t)}},t)})},e.prototype.forgotPasswordSubmit=function(e,t,i,n){if(void 0===n&&(n=this._config.clientMetadata),!this.userPool)return this.rejectNoUserPool();if(!e)return this.rejectAuthError(s.EmptyUsername);if(!t)return this.rejectAuthError(s.EmptyCode);if(!i)return this.rejectAuthError(s.EmptyPassword);var r=this.createCognitoUser(e);return new Promise(function(s,o){r.confirmPassword(t,i,{onSuccess:function(t){Ye("forgotPasswordSubmit",r,e+" forgotPasswordSubmit successful"),s(t)},onFailure:function(t){Ye("forgotPasswordSubmit_failure",t,e+" forgotPasswordSubmit failed"),o(t)}},n)})},e.prototype.currentUserInfo=function(){return ze(this,void 0,void 0,function(){var e,t,i,n,s,r,o;return Ue(this,function(a){switch(a.label){case 0:return(e=this.Credentials.getCredSource())&&"aws"!==e&&"userPool"!==e?[3,9]:[4,this.currentUserPoolUser().catch(function(e){return je.error(e)})];case 1:if(!(o=a.sent()))return[2,null];a.label=2;case 2:return a.trys.push([2,8,,9]),[4,this.userAttributes(o)];case 3:t=a.sent(),i=this.attributesToObject(t),n=null,a.label=4;case 4:return a.trys.push([4,6,,7]),[4,this.currentCredentials()];case 5:return n=a.sent(),[3,7];case 6:return s=a.sent(),je.debug("Failed to retrieve credentials while getting current user info",s),[3,7];case 7:return[2,{id:n?n.identityId:void 0,username:o.getUsername(),attributes:i}];case 8:return r=a.sent(),je.error("currentUserInfo error",r),[2,{}];case 9:return"federated"===e?[2,(o=this.user)||{}]:[2]}})})},e.prototype.federatedSignIn=function(e,t,i){return ze(this,void 0,void 0,function(){var s,r,l,c,h,d,u,p,g,f,m;return Ue(this,function(v){switch(v.label){case 0:if(!this._config.identityPoolId&&!this._config.userPoolId)throw new Error("Federation requires either a User Pool or Identity Pool in config");if(void 0===e&&this._config.identityPoolId&&!this._config.userPoolId)throw new Error("Federation with Identity Pools requires tokens passed as arguments");return o(e)||(y=e)&&["customProvider"].find(function(e){return y.hasOwnProperty(e)})||function(e){return e&&!!["customState"].find(function(t){return e.hasOwnProperty(t)})}(e)||void 0===e?(s=e||{provider:n.Cognito},h=o(s)?s.provider:s.customProvider,o(s),r=s.customState,this._config.userPoolId&&(l=a(this._config.oauth)?this._config.userPoolWebClientId:this._config.oauth.clientID,c=a(this._config.oauth)?this._config.oauth.redirectSignIn:this._config.oauth.redirectUri,this._oAuthHandler.oauthSignIn(this._config.oauth.responseType,this._config.oauth.domain,c,l,h,r)),[3,4]):[3,1];case 1:h=e;try{(d=JSON.stringify(JSON.parse(this._storage.getItem("aws-amplify-federatedInfo")).user))&&je.warn("There is already a signed in user: "+d+" in your app.\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tYou should not call Auth.federatedSignIn method again as it may cause unexpected behavior.")}catch(e){}return u=t.token,p=t.identity_id,g=t.expires_at,[4,this.Credentials.set({provider:h,token:u,identity_id:p,user:i,expires_at:g},"federation")];case 2:return f=v.sent(),[4,this.currentAuthenticatedUser()];case 3:return m=v.sent(),Ye("signIn",m,"A user "+m.username+" has been signed in"),je.debug("federated sign in credentials",f),[2,f];case 4:return[2]}var y})})},e.prototype._handleAuthResponse=function(e){return ze(this,void 0,void 0,function(){var t,i,n,s,r,o,a,l,c,h,d,u,p,f;return Ue(this,function(m){switch(m.label){case 0:if(this.oAuthFlowInProgress)return je.debug("Skipping URL "+e+" current flow in progress"),[2];m.label=1;case 1:if(m.trys.push([1,,8,9]),this.oAuthFlowInProgress=!0,!this._config.userPoolId)throw new Error("OAuth responses require a User Pool defined in config");if(Ye("parsingCallbackUrl",{url:e},"The callback url is being parsed"),t=e||((0,g.gy)().isBrowser?window.location.href:""),i=!!((0,xe.parse)(t).query||"").split("&").map(function(e){return e.split("=")}).find(function(e){var t=We(e,1)[0];return"code"===t||"error"===t}),n=!!((0,xe.parse)(t).hash||"#").substr(1).split("&").map(function(e){return e.split("=")}).find(function(e){var t=We(e,1)[0];return"access_token"===t||"error"===t}),!i&&!n)return[3,7];this._storage.setItem("amplify-redirected-from-hosted-ui","true"),m.label=2;case 2:return m.trys.push([2,6,,7]),[4,this._oAuthHandler.handleAuthResponse(t)];case 3:return s=m.sent(),r=s.accessToken,o=s.idToken,a=s.refreshToken,l=s.state,c=new J({IdToken:new q({IdToken:o}),RefreshToken:new X({RefreshToken:a}),AccessToken:new $({AccessToken:r})}),h=void 0,this._config.identityPoolId?[4,this.Credentials.set(c,"session")]:[3,5];case 4:h=m.sent(),je.debug("AWS credentials",h),m.label=5;case 5:return d=/-/.test(l),(u=this.createCognitoUser(c.getIdToken().decodePayload()["cognito:username"])).setSignInUserSession(c),window&&void 0!==window.history&&window.history.replaceState({},null,this._config.oauth.redirectSignIn),Ye("signIn",u,"A user "+u.getUsername()+" has been signed in"),Ye("cognitoHostedUI",u,"A user "+u.getUsername()+" has been signed in via Cognito Hosted UI"),d&&(p=l.split("-").splice(1).join("-"),Ye("customOAuthState",p.match(/.{2}/g).map(function(e){return String.fromCharCode(parseInt(e,16))}).join(""),"State for user "+u.getUsername())),[2,h];case 6:return f=m.sent(),je.debug("Error in cognito hosted auth response",f),window&&void 0!==window.history&&window.history.replaceState({},null,this._config.oauth.redirectSignIn),Ye("signIn_failure",f,"The OAuth response flow failed"),Ye("cognitoHostedUI_failure",f,"A failure occurred when returning to the Cognito Hosted UI"),Ye("customState_failure",f,"A failure occurred when returning state"),[3,7];case 7:return[3,9];case 8:return this.oAuthFlowInProgress=!1,[7];case 9:return[2]}})})},e.prototype.essentialCredentials=function(e){return{accessKeyId:e.accessKeyId,sessionToken:e.sessionToken,secretAccessKey:e.secretAccessKey,identityId:e.identityId,authenticated:e.authenticated}},e.prototype.attributesToObject=function(e){var t=this,i={};return e&&e.map(function(e){"email_verified"===e.Name||"phone_number_verified"===e.Name?i[e.Name]=t.isTruthyString(e.Value)||!0===e.Value:i[e.Name]=e.Value}),i},e.prototype.isTruthyString=function(e){return"function"==typeof e.toLowerCase&&"true"===e.toLowerCase()},e.prototype.createCognitoUser=function(e){var t={Username:e,Pool:this.userPool};t.Storage=this._storage;var i=this._config.authenticationFlowType,n=new le(t);return i&&n.setAuthenticationFlowType(i),n},e.prototype._isValidAuthStorage=function(e){return!!e&&"function"==typeof e.getItem&&"function"==typeof e.setItem&&"function"==typeof e.removeItem&&"function"==typeof e.clear},e.prototype.noUserPoolErrorHandler=function(e){return!e||e.userPoolId&&e.identityPoolId?s.NoConfig:s.MissingAuthConfig},e.prototype.rejectAuthError=function(e){return Promise.reject(new Ge(e))},e.prototype.rejectNoUserPool=function(){var e=this.noUserPoolErrorHandler(this._config);return Promise.reject(new Ve(e))},e.prototype.rememberDevice=function(){return ze(this,void 0,void 0,function(){var e,t;return Ue(this,function(i){switch(i.label){case 0:return i.trys.push([0,2,,3]),[4,this.currentUserPoolUser()];case 1:return e=i.sent(),[3,3];case 2:return t=i.sent(),je.debug("The user is not authenticated by the error",t),[2,Promise.reject("The user is not authenticated")];case 3:return e.getCachedDeviceKeyAndPassword(),[2,new Promise(function(t,i){e.setDeviceStatusRemembered({onSuccess:function(e){t(e)},onFailure:function(e){"InvalidParameterException"===e.code?i(new Ge(s.DeviceConfig)):"NetworkError"===e.code?i(new Ge(s.NetworkError)):i(e)}})})]}})})},e.prototype.forgetDevice=function(){return ze(this,void 0,void 0,function(){var e,t;return Ue(this,function(i){switch(i.label){case 0:return i.trys.push([0,2,,3]),[4,this.currentUserPoolUser()];case 1:return e=i.sent(),[3,3];case 2:return t=i.sent(),je.debug("The user is not authenticated by the error",t),[2,Promise.reject("The user is not authenticated")];case 3:return e.getCachedDeviceKeyAndPassword(),[2,new Promise(function(t,i){e.forgetDevice({onSuccess:function(e){t(e)},onFailure:function(e){"InvalidParameterException"===e.code?i(new Ge(s.DeviceConfig)):"NetworkError"===e.code?i(new Ge(s.NetworkError)):i(e)}})})]}})})},e.prototype.fetchDevices=function(){return ze(this,void 0,void 0,function(){var e,t;return Ue(this,function(i){switch(i.label){case 0:return i.trys.push([0,2,,3]),[4,this.currentUserPoolUser()];case 1:return e=i.sent(),[3,3];case 2:throw t=i.sent(),je.debug("The user is not authenticated by the error",t),new Error("The user is not authenticated");case 3:return e.getCachedDeviceKeyAndPassword(),[2,new Promise(function(t,i){var n={onSuccess:function(e){var i=e.Devices.map(function(e){var t=e.DeviceAttributes.find(function(e){return"device_name"===e.Name})||{};return{id:e.DeviceKey,name:t.Value}});t(i)},onFailure:function(e){"InvalidParameterException"===e.code?i(new Ge(s.DeviceConfig)):"NetworkError"===e.code?i(new Ge(s.NetworkError)):i(e)}};e.listDevices(60,null,n)})]}})})},e}(),Xe=new qe(null);y.HA.register(Xe)},62020(e,t,i){"use strict";i.d(t,{HA:()=>r});var n=i(5522),s=new n.C("Amplify"),r=new(function(){function e(){this._components=[],this._config={},this._modules={},this.Auth=null,this.Analytics=null,this.API=null,this.Credentials=null,this.Storage=null,this.I18n=null,this.Cache=null,this.PubSub=null,this.Interactions=null,this.Pushnotification=null,this.UI=null,this.XR=null,this.Predictions=null,this.DataStore=null,this.Geo=null,this.Logger=n.C,this.ServiceWorker=null}return e.prototype.register=function(e){s.debug("component registered in amplify",e),this._components.push(e),"function"==typeof e.getModuleName?(this._modules[e.getModuleName()]=e,this[e.getModuleName()]=e):s.debug("no getModuleName method for component",e),e.configure(this._config)},e.prototype.configure=function(e){var t=this;return e?(this._config=Object.assign(this._config,e),s.debug("amplify config",this._config),Object.entries(this._modules).forEach(function(e){var i=function(e,t){var i="function"==typeof Symbol&&e[Symbol.iterator];if(!i)return e;var n,s,r=i.call(e),o=[];try{for(;(void 0===t||t-- >0)&&!(n=r.next()).done;)o.push(n.value)}catch(e){s={error:e}}finally{try{n&&!n.done&&(i=r.return)&&i.call(r)}finally{if(s)throw s.error}}return o}(e,2),n=(i[0],i[1]);Object.keys(n).forEach(function(e){t._modules[e]&&(n[e]=t._modules[e])})}),this._components.map(function(e){e.configure(t._config)}),this._config):this._config},e.prototype.addPluggable=function(e){e&&e.getCategory&&"function"==typeof e.getCategory&&this._components.map(function(t){t.addPluggable&&"function"==typeof t.addPluggable&&t.addPluggable(e)})},e}())},83847(e,t,i){"use strict";i.d(t,{Ji:()=>zt});var n,s,r,o,a,l,c,h,d,u,p,g,f,m,v,y,C,b,S,w,x,E,M,A,T,D,I,R,L,k,P,N,O,_,F,G,V,B,H,z,U,W,j,K,$,Y,q,X,Z,Q,J,ee,te,ie,ne,se,re,oe,ae=i(5522),le=i(70870),ce=i(71429),he=(n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])},n(e,t)},function(e,t){function i(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(i.prototype=t.prototype,new i)}),de=function(e,t,i,n){return new(i||(i=Promise))(function(s,r){function o(e){try{l(n.next(e))}catch(e){r(e)}}function a(e){try{l(n.throw(e))}catch(e){r(e)}}function l(e){var t;e.done?s(e.value):(t=e.value,t instanceof i?t:new i(function(e){e(t)})).then(o,a)}l((n=n.apply(e,t||[])).next())})},ue=function(e,t){var i,n,s,r,o={label:0,sent:function(){if(1&s[0])throw s[1];return s[1]},trys:[],ops:[]};return r={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(r[Symbol.iterator]=function(){return this}),r;function a(r){return function(a){return function(r){if(i)throw new TypeError("Generator is already executing.");for(;o;)try{if(i=1,n&&(s=2&r[0]?n.return:r[0]?n.throw||((s=n.return)&&s.call(n),0):n.next)&&!(s=s.call(n,r[1])).done)return s;switch(n=0,s&&(r=[2&r[0],s.value]),r[0]){case 0:case 1:s=r;break;case 4:return o.label++,{value:r[1],done:!1};case 5:o.label++,n=r[1],r=[0];continue;case 7:r=o.ops.pop(),o.trys.pop();continue;default:if(!((s=(s=o.trys).length>0&&s[s.length-1])||6!==r[0]&&2!==r[0])){o=0;continue}if(3===r[0]&&(!s||r[1]>s[0]&&r[1]<s[3])){o.label=r[1];break}if(6===r[0]&&o.label<s[1]){o.label=s[1],s=r;break}if(s&&o.label<s[2]){o.label=s[2],o.ops.push(r);break}s[2]&&o.ops.pop(),o.trys.pop();continue}r=t.call(e,o)}catch(e){r=[6,e],n=0}finally{i=s=0}if(5&r[0])throw r[1];return{value:r[0]?r[1]:void 0,done:!0}}([r,a])}}},pe=function(e,t){var i="function"==typeof Symbol&&e[Symbol.iterator];if(!i)return e;var n,s,r=i.call(e),o=[];try{for(;(void 0===t||t-- >0)&&!(n=r.next()).done;)o.push(n.value)}catch(e){s={error:e}}finally{try{n&&!n.done&&(i=r.return)&&i.call(r)}finally{if(s)throw s.error}}return o},ge=function(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(pe(arguments[t]));return e},fe=new ae.C("Util"),me=function(e){function t(t){var i=e.call(this,t)||this;return i.nonRetryable=!0,i}return he(t,e),t}(Error),ve=3e5,ye=new ae.C("CognitoCredentials"),Ce=new Promise(function(e,t){return(0,ce.gy)().isBrowser?window.gapi&&window.gapi.auth2&&window.gapi.auth2?(ye.debug("google api already loaded"),e()):void setTimeout(function(){return e()},2e3):(ye.debug("not in the browser, directly resolved"),e())}),be=function(){function e(){this.initialized=!1,this.refreshGoogleToken=this.refreshGoogleToken.bind(this),this._refreshGoogleTokenImpl=this._refreshGoogleTokenImpl.bind(this)}return e.prototype.refreshGoogleToken=function(){return e=this,t=void 0,n=function(){return function(e,t){var i,n,s,r,o={label:0,sent:function(){if(1&s[0])throw s[1];return s[1]},trys:[],ops:[]};return r={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(r[Symbol.iterator]=function(){return this}),r;function a(r){return function(a){return function(r){if(i)throw new TypeError("Generator is already executing.");for(;o;)try{if(i=1,n&&(s=2&r[0]?n.return:r[0]?n.throw||((s=n.return)&&s.call(n),0):n.next)&&!(s=s.call(n,r[1])).done)return s;switch(n=0,s&&(r=[2&r[0],s.value]),r[0]){case 0:case 1:s=r;break;case 4:return o.label++,{value:r[1],done:!1};case 5:o.label++,n=r[1],r=[0];continue;case 7:r=o.ops.pop(),o.trys.pop();continue;default:if(!((s=(s=o.trys).length>0&&s[s.length-1])||6!==r[0]&&2!==r[0])){o=0;continue}if(3===r[0]&&(!s||r[1]>s[0]&&r[1]<s[3])){o.label=r[1];break}if(6===r[0]&&o.label<s[1]){o.label=s[1],s=r;break}if(s&&o.label<s[2]){o.label=s[2],o.ops.push(r);break}s[2]&&o.ops.pop(),o.trys.pop();continue}r=t.call(e,o)}catch(e){r=[6,e],n=0}finally{i=s=0}if(5&r[0])throw r[1];return{value:r[0]?r[1]:void 0,done:!0}}([r,a])}}}(this,function(e){switch(e.label){case 0:return this.initialized?[3,2]:(ye.debug("need to wait for the Google SDK loaded"),[4,Ce]);case 1:e.sent(),this.initialized=!0,ye.debug("finish waiting"),e.label=2;case 2:return[2,this._refreshGoogleTokenImpl()]}})},new((i=void 0)||(i=Promise))(function(s,r){function o(e){try{l(n.next(e))}catch(e){r(e)}}function a(e){try{l(n.throw(e))}catch(e){r(e)}}function l(e){var t;e.done?s(e.value):(t=e.value,t instanceof i?t:new i(function(e){e(t)})).then(o,a)}l((n=n.apply(e,t||[])).next())});var e,t,i,n},e.prototype._refreshGoogleTokenImpl=function(){var e=null;return(0,ce.gy)().isBrowser&&(e=window.gapi&&window.gapi.auth2?window.gapi.auth2:null),e?new Promise(function(t,i){e.getAuthInstance().then(function(e){e||(ye.debug("google Auth undefined"),i(new me("google Auth undefined")));var n=e.currentUser.get();n.isSignedIn()?(ye.debug("refreshing the google access token"),n.reloadAuthResponse().then(function(e){var i=e.id_token,n=e.expires_at;t({token:i,expires_at:n})}).catch(function(e){e&&"network_error"===e.error?i("Network error reloading google auth response"):i(new me("Failed to reload google auth response"))})):i(new me("User is not signed in with Google"))}).catch(function(e){ye.debug("Failed to refresh google token",e),i(new me("Failed to refresh google token"))})}):(ye.debug("no gapi auth2 available"),Promise.reject("no gapi auth2 available"))},e}(),Se=new ae.C("CognitoCredentials"),we=new Promise(function(e,t){return(0,ce.gy)().isBrowser?window.FB?(Se.debug("FB SDK already loaded"),e()):void setTimeout(function(){return e()},2e3):(Se.debug("not in the browser, directly resolved"),e())}),xe=function(){function e(){this.initialized=!1,this.refreshFacebookToken=this.refreshFacebookToken.bind(this),this._refreshFacebookTokenImpl=this._refreshFacebookTokenImpl.bind(this)}return e.prototype.refreshFacebookToken=function(){return e=this,t=void 0,n=function(){return function(e,t){var i,n,s,r,o={label:0,sent:function(){if(1&s[0])throw s[1];return s[1]},trys:[],ops:[]};return r={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(r[Symbol.iterator]=function(){return this}),r;function a(r){return function(a){return function(r){if(i)throw new TypeError("Generator is already executing.");for(;o;)try{if(i=1,n&&(s=2&r[0]?n.return:r[0]?n.throw||((s=n.return)&&s.call(n),0):n.next)&&!(s=s.call(n,r[1])).done)return s;switch(n=0,s&&(r=[2&r[0],s.value]),r[0]){case 0:case 1:s=r;break;case 4:return o.label++,{value:r[1],done:!1};case 5:o.label++,n=r[1],r=[0];continue;case 7:r=o.ops.pop(),o.trys.pop();continue;default:if(!((s=(s=o.trys).length>0&&s[s.length-1])||6!==r[0]&&2!==r[0])){o=0;continue}if(3===r[0]&&(!s||r[1]>s[0]&&r[1]<s[3])){o.label=r[1];break}if(6===r[0]&&o.label<s[1]){o.label=s[1],s=r;break}if(s&&o.label<s[2]){o.label=s[2],o.ops.push(r);break}s[2]&&o.ops.pop(),o.trys.pop();continue}r=t.call(e,o)}catch(e){r=[6,e],n=0}finally{i=s=0}if(5&r[0])throw r[1];return{value:r[0]?r[1]:void 0,done:!0}}([r,a])}}}(this,function(e){switch(e.label){case 0:return this.initialized?[3,2]:(Se.debug("need to wait for the Facebook SDK loaded"),[4,we]);case 1:e.sent(),this.initialized=!0,Se.debug("finish waiting"),e.label=2;case 2:return[2,this._refreshFacebookTokenImpl()]}})},new((i=void 0)||(i=Promise))(function(s,r){function o(e){try{l(n.next(e))}catch(e){r(e)}}function a(e){try{l(n.throw(e))}catch(e){r(e)}}function l(e){var t;e.done?s(e.value):(t=e.value,t instanceof i?t:new i(function(e){e(t)})).then(o,a)}l((n=n.apply(e,t||[])).next())});var e,t,i,n},e.prototype._refreshFacebookTokenImpl=function(){var e=null;if((0,ce.gy)().isBrowser&&(e=window.FB),!e){var t="no fb sdk available";return Se.debug(t),Promise.reject(new me(t))}return new Promise(function(t,i){e.getLoginStatus(function(e){if(e&&e.authResponse){var n=e.authResponse,s=n.accessToken,r=1e3*n.expiresIn+(new Date).getTime();s||(o="the jwtToken is undefined",Se.debug(o),i(new me(o))),t({token:s,expires_at:r})}else{var o="no response from facebook when refreshing the jwt token";Se.debug(o),i(new me(o))}},{scope:"public_profile,email"})})},e}(),Ee=new be,Me=new xe,Ae=i(62020),Te=i(65927),De=i(65959);!function(e){e.AUTHENTICATED_ROLE="AuthenticatedRole",e.DENY="Deny"}(s||(s={})),function(e){e.filterSensitiveLog=function(e){return(0,De.__assign)({},e)}}(r||(r={})),function(e){e.filterSensitiveLog=function(e){return(0,De.__assign)({},e)}}(o||(o={})),function(e){e.filterSensitiveLog=function(e){return(0,De.__assign)({},e)}}(a||(a={})),function(e){e.filterSensitiveLog=function(e){return(0,De.__assign)({},e)}}(l||(l={})),function(e){e.filterSensitiveLog=function(e){return(0,De.__assign)({},e)}}(c||(c={})),function(e){e.filterSensitiveLog=function(e){return(0,De.__assign)({},e)}}(h||(h={})),function(e){e.filterSensitiveLog=function(e){return(0,De.__assign)({},e)}}(d||(d={})),function(e){e.filterSensitiveLog=function(e){return(0,De.__assign)({},e)}}(u||(u={})),function(e){e.filterSensitiveLog=function(e){return(0,De.__assign)({},e)}}(p||(p={})),function(e){e.filterSensitiveLog=function(e){return(0,De.__assign)({},e)}}(g||(g={})),function(e){e.ACCESS_DENIED="AccessDenied",e.INTERNAL_SERVER_ERROR="InternalServerError"}(f||(f={})),function(e){e.filterSensitiveLog=function(e){return(0,De.__assign)({},e)}}(m||(m={})),function(e){e.filterSensitiveLog=function(e){return(0,De.__assign)({},e)}}(v||(v={})),function(e){e.filterSensitiveLog=function(e){return(0,De.__assign)({},e)}}(y||(y={})),function(e){e.filterSensitiveLog=function(e){return(0,De.__assign)({},e)}}(C||(C={})),function(e){e.filterSensitiveLog=function(e){return(0,De.__assign)({},e)}}(b||(b={})),function(e){e.filterSensitiveLog=function(e){return(0,De.__assign)({},e)}}(S||(S={})),function(e){e.filterSensitiveLog=function(e){return(0,De.__assign)({},e)}}(w||(w={})),function(e){e.filterSensitiveLog=function(e){return(0,De.__assign)({},e)}}(x||(x={})),function(e){e.filterSensitiveLog=function(e){return(0,De.__assign)({},e)}}(E||(E={})),function(e){e.filterSensitiveLog=function(e){return(0,De.__assign)({},e)}}(M||(M={})),function(e){e.filterSensitiveLog=function(e){return(0,De.__assign)({},e)}}(A||(A={})),function(e){e.filterSensitiveLog=function(e){return(0,De.__assign)({},e)}}(T||(T={})),function(e){e.filterSensitiveLog=function(e){return(0,De.__assign)({},e)}}(D||(D={})),function(e){e.filterSensitiveLog=function(e){return(0,De.__assign)({},e)}}(I||(I={})),function(e){e.filterSensitiveLog=function(e){return(0,De.__assign)({},e)}}(R||(R={})),function(e){e.CONTAINS="Contains",e.EQUALS="Equals",e.NOT_EQUAL="NotEqual",e.STARTS_WITH="StartsWith"}(L||(L={})),function(e){e.filterSensitiveLog=function(e){return(0,De.__assign)({},e)}}(k||(k={})),function(e){e.filterSensitiveLog=function(e){return(0,De.__assign)({},e)}}(P||(P={})),function(e){e.RULES="Rules",e.TOKEN="Token"}(N||(N={})),function(e){e.filterSensitiveLog=function(e){return(0,De.__assign)({},e)}}(O||(O={})),function(e){e.filterSensitiveLog=function(e){return(0,De.__assign)({},e)}}(_||(_={})),function(e){e.filterSensitiveLog=function(e){return(0,De.__assign)({},e)}}(F||(F={})),function(e){e.filterSensitiveLog=function(e){return(0,De.__assign)({},e)}}(G||(G={})),function(e){e.filterSensitiveLog=function(e){return(0,De.__assign)({},e)}}(V||(V={})),function(e){e.filterSensitiveLog=function(e){return(0,De.__assign)({},e)}}(B||(B={})),function(e){e.filterSensitiveLog=function(e){return(0,De.__assign)({},e)}}(H||(H={})),function(e){e.filterSensitiveLog=function(e){return(0,De.__assign)({},e)}}(z||(z={})),function(e){e.filterSensitiveLog=function(e){return(0,De.__assign)({},e)}}(U||(U={})),function(e){e.filterSensitiveLog=function(e){return(0,De.__assign)({},e)}}(W||(W={})),function(e){e.filterSensitiveLog=function(e){return(0,De.__assign)({},e)}}(j||(j={})),function(e){e.filterSensitiveLog=function(e){return(0,De.__assign)({},e)}}(K||(K={})),function(e){e.filterSensitiveLog=function(e){return(0,De.__assign)({},e)}}($||($={})),function(e){e.filterSensitiveLog=function(e){return(0,De.__assign)({},e)}}(Y||(Y={})),function(e){e.filterSensitiveLog=function(e){return(0,De.__assign)({},e)}}(q||(q={})),function(e){e.filterSensitiveLog=function(e){return(0,De.__assign)({},e)}}(X||(X={})),function(e){e.filterSensitiveLog=function(e){return(0,De.__assign)({},e)}}(Z||(Z={})),function(e){e.filterSensitiveLog=function(e){return(0,De.__assign)({},e)}}(Q||(Q={})),function(e){e.filterSensitiveLog=function(e){return(0,De.__assign)({},e)}}(J||(J={})),function(e){e.filterSensitiveLog=function(e){return(0,De.__assign)({},e)}}(ee||(ee={})),function(e){e.filterSensitiveLog=function(e){return(0,De.__assign)({},e)}}(te||(te={})),function(e){e.filterSensitiveLog=function(e){return(0,De.__assign)({},e)}}(ie||(ie={})),function(e){e.filterSensitiveLog=function(e){return(0,De.__assign)({},e)}}(ne||(ne={})),function(e){e.filterSensitiveLog=function(e){return(0,De.__assign)({},e)}}(se||(se={})),function(e){e.filterSensitiveLog=function(e){return(0,De.__assign)({},e)}}(re||(re={})),function(e){e.filterSensitiveLog=function(e){return(0,De.__assign)({},e)}}(oe||(oe={}));var Ie=i(59027),Re=function(e,t){return(0,De.__awaiter)(void 0,void 0,void 0,function(){var i,n,s,r,o,a,l,c,h,d,u,p,g,f,m;return(0,De.__generator)(this,function(v){switch(v.label){case 0:return n=[(0,De.__assign)({},e)],m={},[4,et(e.body,t)];case 1:switch(i=De.__assign.apply(void 0,n.concat([(m.body=v.sent(),m)])),r="UnknownError",r=tt(e,i.body)){case"ExternalServiceException":case"com.amazonaws.cognitoidentity#ExternalServiceException":return[3,2];case"InternalErrorException":case"com.amazonaws.cognitoidentity#InternalErrorException":return[3,4];case"InvalidIdentityPoolConfigurationException":case"com.amazonaws.cognitoidentity#InvalidIdentityPoolConfigurationException":return[3,6];case"InvalidParameterException":case"com.amazonaws.cognitoidentity#InvalidParameterException":return[3,8];case"NotAuthorizedException":case"com.amazonaws.cognitoidentity#NotAuthorizedException":return[3,10];case"ResourceConflictException":case"com.amazonaws.cognitoidentity#ResourceConflictException":return[3,12];case"ResourceNotFoundException":case"com.amazonaws.cognitoidentity#ResourceNotFoundException":return[3,14];case"TooManyRequestsException":case"com.amazonaws.cognitoidentity#TooManyRequestsException":return[3,16]}return[3,18];case 2:return o=[{}],[4,ke(i,t)];case 3:return s=De.__assign.apply(void 0,[De.__assign.apply(void 0,o.concat([v.sent()])),{name:r,$metadata:Qe(e)}]),[3,19];case 4:return a=[{}],[4,Pe(i,t)];case 5:return s=De.__assign.apply(void 0,[De.__assign.apply(void 0,a.concat([v.sent()])),{name:r,$metadata:Qe(e)}]),[3,19];case 6:return l=[{}],[4,Ne(i,t)];case 7:return s=De.__assign.apply(void 0,[De.__assign.apply(void 0,l.concat([v.sent()])),{name:r,$metadata:Qe(e)}]),[3,19];case 8:return c=[{}],[4,Oe(i,t)];case 9:return s=De.__assign.apply(void 0,[De.__assign.apply(void 0,c.concat([v.sent()])),{name:r,$metadata:Qe(e)}]),[3,19];case 10:return h=[{}],[4,Fe(i,t)];case 11:return s=De.__assign.apply(void 0,[De.__assign.apply(void 0,h.concat([v.sent()])),{name:r,$metadata:Qe(e)}]),[3,19];case 12:return d=[{}],[4,Ge(i,t)];case 13:return s=De.__assign.apply(void 0,[De.__assign.apply(void 0,d.concat([v.sent()])),{name:r,$metadata:Qe(e)}]),[3,19];case 14:return u=[{}],[4,Ve(i,t)];case 15:return s=De.__assign.apply(void 0,[De.__assign.apply(void 0,u.concat([v.sent()])),{name:r,$metadata:Qe(e)}]),[3,19];case 16:return p=[{}],[4,Be(i,t)];case 17:return s=De.__assign.apply(void 0,[De.__assign.apply(void 0,p.concat([v.sent()])),{name:r,$metadata:Qe(e)}]),[3,19];case 18:g=i.body,r=g.code||g.Code||r,s=(0,De.__assign)((0,De.__assign)({},g),{name:""+r,message:g.message||g.Message||r,$fault:"client",$metadata:Qe(e)}),v.label=19;case 19:return f=s.message||s.Message||r,s.message=f,delete s.Message,[2,Promise.reject(Object.assign(new Error(f),s))]}})})},Le=function(e,t){return(0,De.__awaiter)(void 0,void 0,void 0,function(){var i,n,s,r,o,a,l,c,h,d,u,p,g,f,m;return(0,De.__generator)(this,function(v){switch(v.label){case 0:return n=[(0,De.__assign)({},e)],m={},[4,et(e.body,t)];case 1:switch(i=De.__assign.apply(void 0,n.concat([(m.body=v.sent(),m)])),r="UnknownError",r=tt(e,i.body)){case"ExternalServiceException":case"com.amazonaws.cognitoidentity#ExternalServiceException":return[3,2];case"InternalErrorException":case"com.amazonaws.cognitoidentity#InternalErrorException":return[3,4];case"InvalidParameterException":case"com.amazonaws.cognitoidentity#InvalidParameterException":return[3,6];case"LimitExceededException":case"com.amazonaws.cognitoidentity#LimitExceededException":return[3,8];case"NotAuthorizedException":case"com.amazonaws.cognitoidentity#NotAuthorizedException":return[3,10];case"ResourceConflictException":case"com.amazonaws.cognitoidentity#ResourceConflictException":return[3,12];case"ResourceNotFoundException":case"com.amazonaws.cognitoidentity#ResourceNotFoundException":return[3,14];case"TooManyRequestsException":case"com.amazonaws.cognitoidentity#TooManyRequestsException":return[3,16]}return[3,18];case 2:return o=[{}],[4,ke(i,t)];case 3:return s=De.__assign.apply(void 0,[De.__assign.apply(void 0,o.concat([v.sent()])),{name:r,$metadata:Qe(e)}]),[3,19];case 4:return a=[{}],[4,Pe(i,t)];case 5:return s=De.__assign.apply(void 0,[De.__assign.apply(void 0,a.concat([v.sent()])),{name:r,$metadata:Qe(e)}]),[3,19];case 6:return l=[{}],[4,Oe(i,t)];case 7:return s=De.__assign.apply(void 0,[De.__assign.apply(void 0,l.concat([v.sent()])),{name:r,$metadata:Qe(e)}]),[3,19];case 8:return c=[{}],[4,_e(i,t)];case 9:return s=De.__assign.apply(void 0,[De.__assign.apply(void 0,c.concat([v.sent()])),{name:r,$metadata:Qe(e)}]),[3,19];case 10:return h=[{}],[4,Fe(i,t)];case 11:return s=De.__assign.apply(void 0,[De.__assign.apply(void 0,h.concat([v.sent()])),{name:r,$metadata:Qe(e)}]),[3,19];case 12:return d=[{}],[4,Ge(i,t)];case 13:return s=De.__assign.apply(void 0,[De.__assign.apply(void 0,d.concat([v.sent()])),{name:r,$metadata:Qe(e)}]),[3,19];case 14:return u=[{}],[4,Ve(i,t)];case 15:return s=De.__assign.apply(void 0,[De.__assign.apply(void 0,u.concat([v.sent()])),{name:r,$metadata:Qe(e)}]),[3,19];case 16:return p=[{}],[4,Be(i,t)];case 17:return s=De.__assign.apply(void 0,[De.__assign.apply(void 0,p.concat([v.sent()])),{name:r,$metadata:Qe(e)}]),[3,19];case 18:g=i.body,r=g.code||g.Code||r,s=(0,De.__assign)((0,De.__assign)({},g),{name:""+r,message:g.message||g.Message||r,$fault:"client",$metadata:Qe(e)}),v.label=19;case 19:return f=s.message||s.Message||r,s.message=f,delete s.Message,[2,Promise.reject(Object.assign(new Error(f),s))]}})})},ke=function(e,t){return(0,De.__awaiter)(void 0,void 0,void 0,function(){var i,n;return(0,De.__generator)(this,function(s){return i=e.body,n=Ue(i,t),[2,(0,De.__assign)({name:"ExternalServiceException",$fault:"client",$metadata:Qe(e)},n)]})})},Pe=function(e,t){return(0,De.__awaiter)(void 0,void 0,void 0,function(){var i,n;return(0,De.__generator)(this,function(s){return i=e.body,n=We(i,t),[2,(0,De.__assign)({name:"InternalErrorException",$fault:"server",$metadata:Qe(e)},n)]})})},Ne=function(e,t){return(0,De.__awaiter)(void 0,void 0,void 0,function(){var i,n;return(0,De.__generator)(this,function(s){return i=e.body,n=je(i,t),[2,(0,De.__assign)({name:"InvalidIdentityPoolConfigurationException",$fault:"client",$metadata:Qe(e)},n)]})})},Oe=function(e,t){return(0,De.__awaiter)(void 0,void 0,void 0,function(){var i,n;return(0,De.__generator)(this,function(s){return i=e.body,n=Ke(i,t),[2,(0,De.__assign)({name:"InvalidParameterException",$fault:"client",$metadata:Qe(e)},n)]})})},_e=function(e,t){return(0,De.__awaiter)(void 0,void 0,void 0,function(){var i,n;return(0,De.__generator)(this,function(s){return i=e.body,n=$e(i,t),[2,(0,De.__assign)({name:"LimitExceededException",$fault:"client",$metadata:Qe(e)},n)]})})},Fe=function(e,t){return(0,De.__awaiter)(void 0,void 0,void 0,function(){var i,n;return(0,De.__generator)(this,function(s){return i=e.body,n=Ye(i,t),[2,(0,De.__assign)({name:"NotAuthorizedException",$fault:"client",$metadata:Qe(e)},n)]})})},Ge=function(e,t){return(0,De.__awaiter)(void 0,void 0,void 0,function(){var i,n;return(0,De.__generator)(this,function(s){return i=e.body,n=qe(i,t),[2,(0,De.__assign)({name:"ResourceConflictException",$fault:"client",$metadata:Qe(e)},n)]})})},Ve=function(e,t){return(0,De.__awaiter)(void 0,void 0,void 0,function(){var i,n;return(0,De.__generator)(this,function(s){return i=e.body,n=Xe(i,t),[2,(0,De.__assign)({name:"ResourceNotFoundException",$fault:"client",$metadata:Qe(e)},n)]})})},Be=function(e,t){return(0,De.__awaiter)(void 0,void 0,void 0,function(){var i,n;return(0,De.__generator)(this,function(s){return i=e.body,n=Ze(i,t),[2,(0,De.__assign)({name:"TooManyRequestsException",$fault:"client",$metadata:Qe(e)},n)]})})},He=function(e,t){return Object.entries(e).reduce(function(e,t){var i,n=(0,De.__read)(t,2),s=n[0],r=n[1];return null===r?e:(0,De.__assign)((0,De.__assign)({},e),((i={})[s]=r,i))},{})},ze=function(e,t){return{AccessKeyId:void 0!==e.AccessKeyId&&null!==e.AccessKeyId?e.AccessKeyId:void 0,Expiration:void 0!==e.Expiration&&null!==e.Expiration?new Date(Math.round(1e3*e.Expiration)):void 0,SecretKey:void 0!==e.SecretKey&&null!==e.SecretKey?e.SecretKey:void 0,SessionToken:void 0!==e.SessionToken&&null!==e.SessionToken?e.SessionToken:void 0}},Ue=function(e,t){return{message:void 0!==e.message&&null!==e.message?e.message:void 0}},We=function(e,t){return{message:void 0!==e.message&&null!==e.message?e.message:void 0}},je=function(e,t){return{message:void 0!==e.message&&null!==e.message?e.message:void 0}},Ke=function(e,t){return{message:void 0!==e.message&&null!==e.message?e.message:void 0}},$e=function(e,t){return{message:void 0!==e.message&&null!==e.message?e.message:void 0}},Ye=function(e,t){return{message:void 0!==e.message&&null!==e.message?e.message:void 0}},qe=function(e,t){return{message:void 0!==e.message&&null!==e.message?e.message:void 0}},Xe=function(e,t){return{message:void 0!==e.message&&null!==e.message?e.message:void 0}},Ze=function(e,t){return{message:void 0!==e.message&&null!==e.message?e.message:void 0}},Qe=function(e){var t;return{httpStatusCode:e.statusCode,requestId:null!==(t=e.headers["x-amzn-requestid"])&&void 0!==t?t:e.headers["x-amzn-request-id"],extendedRequestId:e.headers["x-amz-id-2"],cfId:e.headers["x-amz-cf-id"]}},Je=function(e,t,i,n,s){return(0,De.__awaiter)(void 0,void 0,void 0,function(){var r,o,a,l,c,h;return(0,De.__generator)(this,function(d){switch(d.label){case 0:return[4,e.endpoint()];case 1:return r=d.sent(),o=r.hostname,a=r.protocol,l=void 0===a?"https":a,c=r.port,h={protocol:l,hostname:o,port:c,method:"POST",path:i,headers:t},void 0!==n&&(h.hostname=n),void 0!==s&&(h.body=s),[2,new Ie.Kd(h)]}})})},et=function(e,t){return function(e,t){return function(e,t){return void 0===e&&(e=new Uint8Array),e instanceof Uint8Array?Promise.resolve(e):t.streamCollector(e)||Promise.resolve(new Uint8Array)}(e,t).then(function(e){return t.utf8Encoder(e)})}(e,t).then(function(e){return e.length?JSON.parse(e):{}})},tt=function(e,t){var i,n=function(e){var t=e;return t.indexOf(":")>=0&&(t=t.split(":")[0]),t.indexOf("#")>=0&&(t=t.split("#")[1]),t},s=(i=e.headers,Object.keys(i).find(function(e){return e.toLowerCase()==="x-amzn-errortype".toLowerCase()}));return void 0!==s?n(e.headers[s]):void 0!==t.code?n(t.code):void 0!==t.__type?n(t.__type):""},it=i(74052),nt=i(11538),st=function(e){function t(t){var i=e.call(this)||this;return i.input=t,i}return(0,De.__extends)(t,e),t.prototype.resolveMiddleware=function(e,t,i){this.middlewareStack.use((0,it.TM)(t,this.serialize,this.deserialize));var n=e.concat(this.middlewareStack),s={logger:t.logger,clientName:"CognitoIdentityClient",commandName:"GetCredentialsForIdentityCommand",inputFilterSensitiveLog:E.filterSensitiveLog,outputFilterSensitiveLog:A.filterSensitiveLog},r=t.requestHandler;return n.resolve(function(e){return r.handle(e.request,i||{})},s)},t.prototype.serialize=function(e,t){return function(e,t){return(0,De.__awaiter)(void 0,void 0,void 0,function(){var i,n;return(0,De.__generator)(this,function(s){return i={"content-type":"application/x-amz-json-1.1","x-amz-target":"AWSCognitoIdentityService.GetCredentialsForIdentity"},n=JSON.stringify(function(e,t){return(0,De.__assign)((0,De.__assign)((0,De.__assign)({},void 0!==e.CustomRoleArn&&null!==e.CustomRoleArn&&{CustomRoleArn:e.CustomRoleArn}),void 0!==e.IdentityId&&null!==e.IdentityId&&{IdentityId:e.IdentityId}),void 0!==e.Logins&&null!==e.Logins&&{Logins:He(e.Logins,t)})}(e,t)),[2,Je(t,i,"/",void 0,n)]})})}(e,t)},t.prototype.deserialize=function(e,t){return function(e,t){return(0,De.__awaiter)(void 0,void 0,void 0,function(){var i,n,s;return(0,De.__generator)(this,function(r){switch(r.label){case 0:return e.statusCode>=300?[2,Re(e,t)]:[4,et(e.body,t)];case 1:return i=r.sent(),n=function(e){return{Credentials:void 0!==e.Credentials&&null!==e.Credentials?ze(e.Credentials):void 0,IdentityId:void 0!==e.IdentityId&&null!==e.IdentityId?e.IdentityId:void 0}}(i),s=(0,De.__assign)({$metadata:Qe(e)},n),[2,Promise.resolve(s)]}})})}(e,t)},t}(nt.uB),rt=function(e){function t(t,i){void 0===i&&(i=!0);var n=e.call(this,t)||this;return n.tryNextLink=i,n}return(0,Te.__extends)(t,e),t}(Error);function ot(e){return Promise.all(Object.keys(e).reduce(function(t,i){var n=e[i];return"string"==typeof n?t.push([i,n]):t.push(n().then(function(e){return[i,e]})),t},[])).then(function(e){return e.reduce(function(e,t){var i=(0,Te.__read)(t,2),n=i[0],s=i[1];return e[n]=s,e},{})})}function at(e){var t=this;return function(){return(0,Te.__awaiter)(t,void 0,void 0,function(){var t,i,n,s,r,o,a,l,c,h,d,u,p;return(0,Te.__generator)(this,function(g){switch(g.label){case 0:return h=(c=e.client).send,d=st.bind,p={CustomRoleArn:e.customRoleArn,IdentityId:e.identityId},e.logins?[4,ot(e.logins)]:[3,2];case 1:return u=g.sent(),[3,3];case 2:u=void 0,g.label=3;case 3:return[4,h.apply(c,[new(d.apply(st,[void 0,(p.Logins=u,p)]))])];case 4:return t=g.sent().Credentials,i=void 0===t?function(){throw new rt("Response from Amazon Cognito contained no credentials")}():t,n=i.AccessKeyId,s=void 0===n?function(){throw new rt("Response from Amazon Cognito contained no access key ID")}():n,r=i.Expiration,o=i.SecretKey,a=void 0===o?function(){throw new rt("Response from Amazon Cognito contained no secret key")}():o,l=i.SessionToken,[2,{identityId:e.identityId,accessKeyId:s,secretAccessKey:a,sessionToken:l,expiration:r}]}})})}}var lt=function(e){function t(t){var i=e.call(this)||this;return i.input=t,i}return(0,De.__extends)(t,e),t.prototype.resolveMiddleware=function(e,t,i){this.middlewareStack.use((0,it.TM)(t,this.serialize,this.deserialize));var n=e.concat(this.middlewareStack),s={logger:t.logger,clientName:"CognitoIdentityClient",commandName:"GetIdCommand",inputFilterSensitiveLog:D.filterSensitiveLog,outputFilterSensitiveLog:I.filterSensitiveLog},r=t.requestHandler;return n.resolve(function(e){return r.handle(e.request,i||{})},s)},t.prototype.serialize=function(e,t){return function(e,t){return(0,De.__awaiter)(void 0,void 0,void 0,function(){var i,n;return(0,De.__generator)(this,function(s){return i={"content-type":"application/x-amz-json-1.1","x-amz-target":"AWSCognitoIdentityService.GetId"},n=JSON.stringify(function(e,t){return(0,De.__assign)((0,De.__assign)((0,De.__assign)({},void 0!==e.AccountId&&null!==e.AccountId&&{AccountId:e.AccountId}),void 0!==e.IdentityPoolId&&null!==e.IdentityPoolId&&{IdentityPoolId:e.IdentityPoolId}),void 0!==e.Logins&&null!==e.Logins&&{Logins:He(e.Logins,t)})}(e,t)),[2,Je(t,i,"/",void 0,n)]})})}(e,t)},t.prototype.deserialize=function(e,t){return function(e,t){return(0,De.__awaiter)(void 0,void 0,void 0,function(){var i,n,s;return(0,De.__generator)(this,function(r){switch(r.label){case 0:return e.statusCode>=300?[2,Le(e,t)]:[4,et(e.body,t)];case 1:return i=r.sent(),n=function(e){return{IdentityId:void 0!==e.IdentityId&&null!==e.IdentityId?e.IdentityId:void 0}}(i),s=(0,De.__assign)({$metadata:Qe(e)},n),[2,Promise.resolve(s)]}})})}(e,t)},t}(nt.uB),ct="IdentityIds",ht=function(){function e(e){void 0===e&&(e="aws:cognito-identity-ids"),this.dbName=e}return e.prototype.getItem=function(e){return this.withObjectStore("readonly",function(t){var i=t.get(e);return new Promise(function(e){i.onerror=function(){return e(null)},i.onsuccess=function(){return e(i.result?i.result.value:null)}})}).catch(function(){return null})},e.prototype.removeItem=function(e){return this.withObjectStore("readwrite",function(t){var i=t.delete(e);return new Promise(function(e,t){i.onerror=function(){return t(i.error)},i.onsuccess=function(){return e()}})})},e.prototype.setItem=function(e,t){return this.withObjectStore("readwrite",function(i){var n=i.put({id:e,value:t});return new Promise(function(e,t){n.onerror=function(){return t(n.error)},n.onsuccess=function(){return e()}})})},e.prototype.getDb=function(){var e=self.indexedDB.open(this.dbName,1);return new Promise(function(t,i){e.onsuccess=function(){t(e.result)},e.onerror=function(){i(e.error)},e.onblocked=function(){i(new Error("Unable to access DB"))},e.onupgradeneeded=function(){var t=e.result;t.onerror=function(){i(new Error("Failed to create object store"))},t.createObjectStore(ct,{keyPath:"id"})}})},e.prototype.withObjectStore=function(e,t){return this.getDb().then(function(i){var n=i.transaction(ct,e);return n.oncomplete=function(){return i.close()},new Promise(function(e,i){n.onerror=function(){return i(n.error)},e(t(n.objectStore(ct)))}).catch(function(e){throw i.close(),e})})},e}(),dt=new(function(){function e(e){void 0===e&&(e={}),this.store=e}return e.prototype.getItem=function(e){return e in this.store?this.store[e]:null},e.prototype.removeItem=function(e){delete this.store[e]},e.prototype.setItem=function(e,t){this.store[e]=t},e}());var ut=i(54218),pt=i(22292),gt=i(10078),ft=i(89556),mt=i(68380),vt=i(93972),yt=i(39448),Ct=i(31643),bt="cognito-identity.{region}.amazonaws.com",St=new Set(["af-south-1","ap-east-1","ap-northeast-1","ap-northeast-2","ap-south-1","ap-southeast-1","ap-southeast-2","ca-central-1","eu-central-1","eu-north-1","eu-south-1","eu-west-1","eu-west-2","eu-west-3","me-south-1","sa-east-1","us-east-1","us-east-2","us-west-1","us-west-2"]),wt=new Set(["cn-north-1","cn-northwest-1"]),xt=new Set(["us-iso-east-1"]),Et=new Set(["us-isob-east-1"]),Mt=new Set(["us-gov-east-1","us-gov-west-1"]),At={apiVersion:"2014-06-30",disableHostPrefix:!1,logger:{},regionInfoProvider:function(e,t){var i=void 0;switch(e){case"ap-northeast-1":i={hostname:"cognito-identity.ap-northeast-1.amazonaws.com",partition:"aws"};break;case"ap-northeast-2":i={hostname:"cognito-identity.ap-northeast-2.amazonaws.com",partition:"aws"};break;case"ap-south-1":i={hostname:"cognito-identity.ap-south-1.amazonaws.com",partition:"aws"};break;case"ap-southeast-1":i={hostname:"cognito-identity.ap-southeast-1.amazonaws.com",partition:"aws"};break;case"ap-southeast-2":i={hostname:"cognito-identity.ap-southeast-2.amazonaws.com",partition:"aws"};break;case"ca-central-1":i={hostname:"cognito-identity.ca-central-1.amazonaws.com",partition:"aws"};break;case"cn-north-1":i={hostname:"cognito-identity.cn-north-1.amazonaws.com.cn",partition:"aws-cn"};break;case"eu-central-1":i={hostname:"cognito-identity.eu-central-1.amazonaws.com",partition:"aws"};break;case"eu-north-1":i={hostname:"cognito-identity.eu-north-1.amazonaws.com",partition:"aws"};break;case"eu-west-1":i={hostname:"cognito-identity.eu-west-1.amazonaws.com",partition:"aws"};break;case"eu-west-2":i={hostname:"cognito-identity.eu-west-2.amazonaws.com",partition:"aws"};break;case"eu-west-3":i={hostname:"cognito-identity.eu-west-3.amazonaws.com",partition:"aws"};break;case"fips-us-east-1":i={hostname:"cognito-identity-fips.us-east-1.amazonaws.com",partition:"aws",signingRegion:"us-east-1"};break;case"fips-us-east-2":i={hostname:"cognito-identity-fips.us-east-2.amazonaws.com",partition:"aws",signingRegion:"us-east-2"};break;case"fips-us-gov-west-1":i={hostname:"cognito-identity-fips.us-gov-west-1.amazonaws.com",partition:"aws-us-gov",signingRegion:"us-gov-west-1"};break;case"fips-us-west-2":i={hostname:"cognito-identity-fips.us-west-2.amazonaws.com",partition:"aws",signingRegion:"us-west-2"};break;case"sa-east-1":i={hostname:"cognito-identity.sa-east-1.amazonaws.com",partition:"aws"};break;case"us-east-1":i={hostname:"cognito-identity.us-east-1.amazonaws.com",partition:"aws"};break;case"us-east-2":i={hostname:"cognito-identity.us-east-2.amazonaws.com",partition:"aws"};break;case"us-gov-west-1":i={hostname:"cognito-identity.us-gov-west-1.amazonaws.com",partition:"aws-us-gov"};break;case"us-west-1":i={hostname:"cognito-identity.us-west-1.amazonaws.com",partition:"aws"};break;case"us-west-2":i={hostname:"cognito-identity.us-west-2.amazonaws.com",partition:"aws"};break;default:St.has(e)&&(i={hostname:bt.replace("{region}",e),partition:"aws"}),wt.has(e)&&(i={hostname:"cognito-identity.{region}.amazonaws.com.cn".replace("{region}",e),partition:"aws-cn"}),xt.has(e)&&(i={hostname:"cognito-identity.{region}.c2s.ic.gov".replace("{region}",e),partition:"aws-iso"}),Et.has(e)&&(i={hostname:"cognito-identity.{region}.sc2s.sgov.gov".replace("{region}",e),partition:"aws-iso-b"}),Mt.has(e)&&(i={hostname:"cognito-identity.{region}.amazonaws.com".replace("{region}",e),partition:"aws-us-gov"}),void 0===i&&(i={hostname:bt.replace("{region}",e),partition:"aws"})}return Promise.resolve((0,De.__assign)({signingService:"cognito-identity"},i))},serviceId:"Cognito Identity",urlParser:i(2049).D},Tt=(0,De.__assign)((0,De.__assign)({},At),{runtime:"browser",base64Decoder:mt.E,base64Encoder:mt.n,bodyLengthChecker:vt.n,credentialDefaultProvider:function(e){return function(){return Promise.reject(new Error("Credential is missing"))}},defaultUserAgentProvider:(0,yt.m)({serviceId:At.serviceId,clientVersion:"3.6.1"}),maxAttempts:ft.Gz,region:(0,gt.B)("Region is missing"),requestHandler:new pt.N,sha256:ut.Sha256,streamCollector:pt.k,utf8Decoder:Ct.fromUtf8,utf8Encoder:Ct.toUtf8}),Dt=i(85775),It=i(23788),Rt=i(14188),Lt=i(64996),kt=i(88428),Pt=i(44625),Nt=function(e){function t(t){var i=this,n=(0,De.__assign)((0,De.__assign)({},Tt),t),s=(0,Dt.TD)(n),r=(0,Dt.vJ)(s),o=(0,kt.k9)(r),a=(0,ft.$z)(o),l=(0,Rt.OV)(a),c=(0,Pt.Dc)(l);return(i=e.call(this,c)||this).config=c,i.middlewareStack.use((0,ft.ey)(i.config)),i.middlewareStack.use((0,It.vK)(i.config)),i.middlewareStack.use((0,Rt.TC)(i.config)),i.middlewareStack.use((0,Lt.Y7)(i.config)),i.middlewareStack.use((0,Pt.sM)(i.config)),i}return(0,De.__extends)(t,e),t.prototype.destroy=function(){e.prototype.destroy.call(this)},t}(nt.Kj),Ot=i(70862),_t=function(){return _t=Object.assign||function(e){for(var t,i=1,n=arguments.length;i<n;i++)for(var s in t=arguments[i])Object.prototype.hasOwnProperty.call(t,s)&&(e[s]=t[s]);return e},_t.apply(this,arguments)};function Ft(e){var t=new Nt({region:e.region,customUserAgent:(0,Ot.fE)()});return t.middlewareStack.add(function(e,t){return function(t){return e(function(e){return _t(_t({},e),{request:_t(_t({},e.request),{headers:_t(_t({},e.request.headers),{"cache-control":"no-store"})})})}(t))}},{step:"build",name:"cacheControlMiddleWare"}),t}var Gt=function(){return Gt=Object.assign||function(e){for(var t,i=1,n=arguments.length;i<n;i++)for(var s in t=arguments[i])Object.prototype.hasOwnProperty.call(t,s)&&(e[s]=t[s]);return e},Gt.apply(this,arguments)},Vt=function(e,t,i,n){return new(i||(i=Promise))(function(s,r){function o(e){try{l(n.next(e))}catch(e){r(e)}}function a(e){try{l(n.throw(e))}catch(e){r(e)}}function l(e){var t;e.done?s(e.value):(t=e.value,t instanceof i?t:new i(function(e){e(t)})).then(o,a)}l((n=n.apply(e,t||[])).next())})},Bt=function(e,t){var i,n,s,r,o={label:0,sent:function(){if(1&s[0])throw s[1];return s[1]},trys:[],ops:[]};return r={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(r[Symbol.iterator]=function(){return this}),r;function a(r){return function(a){return function(r){if(i)throw new TypeError("Generator is already executing.");for(;o;)try{if(i=1,n&&(s=2&r[0]?n.return:r[0]?n.throw||((s=n.return)&&s.call(n),0):n.next)&&!(s=s.call(n,r[1])).done)return s;switch(n=0,s&&(r=[2&r[0],s.value]),r[0]){case 0:case 1:s=r;break;case 4:return o.label++,{value:r[1],done:!1};case 5:o.label++,n=r[1],r=[0];continue;case 7:r=o.ops.pop(),o.trys.pop();continue;default:if(!((s=(s=o.trys).length>0&&s[s.length-1])||6!==r[0]&&2!==r[0])){o=0;continue}if(3===r[0]&&(!s||r[1]>s[0]&&r[1]<s[3])){o.label=r[1];break}if(6===r[0]&&o.label<s[1]){o.label=s[1],s=r;break}if(s&&o.label<s[2]){o.label=s[2],o.ops.push(r);break}s[2]&&o.ops.pop(),o.trys.pop();continue}r=t.call(e,o)}catch(e){r=[6,e],n=0}finally{i=s=0}if(5&r[0])throw r[1];return{value:r[0]?r[1]:void 0,done:!0}}([r,a])}}},Ht=new ae.C("Credentials"),zt=new(function(){function e(e){this._gettingCredPromise=null,this._refreshHandlers={},this.Auth=void 0,this.configure(e),this._refreshHandlers.google=Ee.refreshGoogleToken,this._refreshHandlers.facebook=Me.refreshFacebookToken}return e.prototype.getModuleName=function(){return"Credentials"},e.prototype.getCredSource=function(){return this._credentials_source},e.prototype.configure=function(e){if(!e)return this._config||{};this._config=Object.assign({},this._config,e);var t=this._config.refreshHandlers;return t&&(this._refreshHandlers=Gt(Gt({},this._refreshHandlers),t)),this._storage=this._config.storage,this._storage||(this._storage=(new le.i1).getStorage()),this._storageSync=Promise.resolve(),"function"==typeof this._storage.sync&&(this._storageSync=this._storage.sync()),this._config},e.prototype.get=function(){return Ht.debug("getting credentials"),this._pickupCredentials()},e.prototype._getCognitoIdentityIdStorageKey=function(e){return"CognitoIdentityId-"+e},e.prototype._pickupCredentials=function(){return Ht.debug("picking up credentials"),this._gettingCredPromise&&this._gettingCredPromise.isPending()?Ht.debug("getting old cred promise"):(Ht.debug("getting new cred promise"),this._gettingCredPromise=(0,ce.VN)(this._keepAlive())),this._gettingCredPromise},e.prototype._keepAlive=function(){return Vt(this,void 0,void 0,function(){var e,t,i,n,s,r,o;return Bt(this,function(a){switch(a.label){case 0:if(Ht.debug("checking if credentials exists and not expired"),(e=this._credentials)&&!this._isExpired(e)&&!this._isPastTTL())return Ht.debug("credentials not changed and not expired, directly return"),[2,Promise.resolve(e)];if(Ht.debug("need to get a new credential or refresh the existing one"),t=this.Auth,!(i=void 0===t?Ae.HA.Auth:t)||"function"!=typeof i.currentUserCredentials)return[2,Promise.reject("No Auth module registered in Amplify")];if(this._isExpired(e)||!this._isPastTTL())return[3,6];Ht.debug("ttl has passed but token is not yet expired"),a.label=1;case 1:return a.trys.push([1,5,,6]),[4,i.currentUserPoolUser()];case 2:return n=a.sent(),[4,i.currentSession()];case 3:return s=a.sent(),r=s.refreshToken,[4,new Promise(function(e,t){n.refreshSession(r,function(i,n){return i?t(i):e(n)})})];case 4:return a.sent(),[3,6];case 5:return o=a.sent(),Ht.debug("Error attempting to refreshing the session",o),[3,6];case 6:return[2,i.currentUserCredentials()]}})})},e.prototype.refreshFederatedToken=function(e){Ht.debug("Getting federated credentials");var t=e.provider,i=e.user,n=e.token,s=e.identity_id,r=e.expires_at;r=1970===new Date(r).getFullYear()?1e3*r:r;var o=this;return Ht.debug("checking if federated jwt token expired"),r>(new Date).getTime()?(Ht.debug("token not expired"),this._setCredentialsFromFederation({provider:t,token:n,user:i,identity_id:s,expires_at:r})):o._refreshHandlers[t]&&"function"==typeof o._refreshHandlers[t]?(Ht.debug("getting refreshed jwt token from federation provider"),this._providerRefreshWithRetry({refreshHandler:o._refreshHandlers[t],provider:t,user:i})):(Ht.debug("no refresh handler for provider:",t),this.clear(),Promise.reject("no refresh handler for provider"))},e.prototype._providerRefreshWithRetry=function(e){var t,i,n,s,r=this,o=e.refreshHandler,a=e.provider,l=e.user;return(t=o,i=[],n=1e4,void 0===n&&(n=ve),function(e,t,i,n){return de(this,void 0,void 0,function(){var s=this;return ue(this,function(r){if("function"!=typeof e)throw Error("functionToRetry must be a function");return[2,new Promise(function(r,o){return de(s,void 0,void 0,function(){var s,a,l,c,h,d,u;return ue(this,function(p){switch(p.label){case 0:s=0,a=!1,c=function(){},n&&n.then(function(){a=!0,clearTimeout(l),c()}),d=function(){var n,d,u,p;return ue(this,function(g){switch(g.label){case 0:s++,fe.debug(e.name+" attempt #"+s+" with this vars: "+JSON.stringify(t)),g.label=1;case 1:return g.trys.push([1,3,,7]),n={},d=r,[4,e.apply(void 0,ge(t))];case 2:return[2,(n.value=d.apply(void 0,[g.sent()]),n)];case 3:return u=g.sent(),h=u,fe.debug("error on "+e.name,u),(f=u)&&f.nonRetryable?(fe.debug(e.name+" non retryable error",u),[2,{value:o(u)}]):(p=i(s,t,u),fe.debug(e.name+" retrying in "+p+" ms"),!1===p||a?[2,{value:o(u)}]:[3,4]);case 4:return[4,new Promise(function(e){c=e,l=setTimeout(c,p)})];case 5:g.sent(),g.label=6;case 6:return[3,7];case 7:return[2]}var f})},p.label=1;case 1:return a?[3,3]:[5,d()];case 2:return"object"==typeof(u=p.sent())?[2,u.value]:[3,1];case 3:return o(h),[2]}})})})]})})}(t,i,function(e){return void 0===e&&(e=ve),function(t){var i=100*Math.pow(2,t)+100*Math.random();return!(i>e)&&i}}(n),s)).then(function(e){return Ht.debug("refresh federated token sucessfully",e),r._setCredentialsFromFederation({provider:a,token:e.token,user:l,identity_id:e.identity_id,expires_at:e.expires_at})}).catch(function(e){return"string"==typeof e&&0===e.toLowerCase().lastIndexOf("network error",e.length)||r.clear(),Ht.debug("refresh federated token failed",e),Promise.reject("refreshing federation token failed: "+e)})},e.prototype._isExpired=function(e){if(!e)return Ht.debug("no credentials for expiration check"),!0;Ht.debug("are these credentials expired?",e);var t=Date.now();return e.expiration.getTime()<=t},e.prototype._isPastTTL=function(){return this._nextCredentialsRefresh<=Date.now()},e.prototype._setCredentialsForGuest=function(){return Vt(this,void 0,void 0,function(){var e,t,i,n,s,r,o,a,l=this;return Bt(this,function(c){switch(c.label){case 0:return Ht.debug("setting credentials for guest"),e=this._config,t=e.identityPoolId,i=e.region,e.mandatorySignIn?[2,Promise.reject("cannot get guest credentials when mandatory signin enabled")]:t?i?(s=this,[4,this._getGuestIdentityId()]):(Ht.debug("region is not configured for getting the credentials"),[2,Promise.reject("region is not configured for getting the credentials")]):(Ht.debug("No Cognito Identity pool provided for unauthenticated access"),[2,Promise.reject("No Cognito Identity pool provided for unauthenticated access")]);case 1:return n=s._identityId=c.sent(),r=Ft({region:i}),o=void 0,n?o=at({identityId:n,client:r})():(a=function(){return Vt(l,void 0,void 0,function(){var e;return Bt(this,function(i){switch(i.label){case 0:return[4,r.send(new lt({IdentityPoolId:t}))];case 1:return e=i.sent().IdentityId,this._identityId=e,[2,at({client:r,identityId:e})()]}})})},o=a().catch(function(e){return Vt(l,void 0,void 0,function(){return Bt(this,function(t){throw e})})})),[2,this._loadCredentials(o,"guest",!1,null).then(function(e){return e}).catch(function(e){return Vt(l,void 0,void 0,function(){var i,s=this;return Bt(this,function(a){switch(a.label){case 0:return"ResourceNotFoundException"!==e.name||e.message!=="Identity '"+n+"' not found."?[3,2]:(Ht.debug("Failed to load guest credentials"),[4,this._removeGuestIdentityId()]);case 1:return a.sent(),i=function(){return Vt(s,void 0,void 0,function(){var e;return Bt(this,function(i){switch(i.label){case 0:return[4,r.send(new lt({IdentityPoolId:t}))];case 1:return e=i.sent().IdentityId,this._identityId=e,[2,at({client:r,identityId:e})()]}})})},o=i().catch(function(e){return Vt(s,void 0,void 0,function(){return Bt(this,function(t){throw e})})}),[2,this._loadCredentials(o,"guest",!1,null)];case 2:return[2,e]}})})})]}})})},e.prototype._setCredentialsFromFederation=function(e){var t=e.provider,i=e.token,n=e.identity_id,s={google:"accounts.google.com",facebook:"graph.facebook.com",amazon:"www.amazon.com",developer:"cognito-identity.amazonaws.com"}[t]||t;if(!s)return Promise.reject("You must specify a federated provider");var r={};r[s]=i;var o=this._config,a=o.identityPoolId,l=o.region;if(!a)return Ht.debug("No Cognito Federated Identity pool provided"),Promise.reject("No Cognito Federated Identity pool provided");if(!l)return Ht.debug("region is not configured for getting the credentials"),Promise.reject("region is not configured for getting the credentials");var c=Ft({region:l}),h=void 0;return h=n?at({identityId:n,logins:r,client:c})():function(e){var t=this,i=e.accountId,n=e.cache,s=void 0===n?"object"==typeof self&&self.indexedDB?new ht:"object"==typeof window&&window.localStorage?window.localStorage:dt:n,r=e.client,o=e.customRoleArn,a=e.identityPoolId,l=e.logins,c=e.userIdentifier,h=void 0===c?l&&0!==Object.keys(l).length?void 0:"ANONYMOUS":c,d=h?"aws:cognito-identity-credentials:"+a+":"+h:void 0,u=function(){return(0,Te.__awaiter)(t,void 0,void 0,function(){var e,t,n,c,h,p,g,f,m;return(0,Te.__generator)(this,function(v){switch(v.label){case 0:return(t=d)?[4,s.getItem(d)]:[3,2];case 1:t=v.sent(),v.label=2;case 2:return(e=t)?[3,7]:(p=(h=r).send,g=lt.bind,m={AccountId:i,IdentityPoolId:a},l?[4,ot(l)]:[3,4]);case 3:return f=v.sent(),[3,5];case 4:f=void 0,v.label=5;case 5:return[4,p.apply(h,[new(g.apply(lt,[void 0,(m.Logins=f,m)]))])];case 6:n=v.sent().IdentityId,c=void 0===n?function(){throw new rt("Response from Amazon Cognito contained no identity ID")}():n,e=c,d&&Promise.resolve(s.setItem(d,e)).catch(function(){}),v.label=7;case 7:return[2,(u=at({client:r,customRoleArn:o,logins:l,identityId:e}))()]}})})};return function(){return u().catch(function(e){return(0,Te.__awaiter)(t,void 0,void 0,function(){return(0,Te.__generator)(this,function(t){throw d&&Promise.resolve(s.removeItem(d)).catch(function(){}),e})})})}}({logins:r,identityPoolId:a,client:c})(),this._loadCredentials(h,"federated",!0,e)},e.prototype._setCredentialsFromSession=function(e){var t=this;Ht.debug("set credentials from session");var i=e.getIdToken().getJwtToken(),n=this._config,s=n.region,r=n.userPoolId,o=n.identityPoolId;if(!o)return Ht.debug("No Cognito Federated Identity pool provided"),Promise.reject("No Cognito Federated Identity pool provided");if(!s)return Ht.debug("region is not configured for getting the credentials"),Promise.reject("region is not configured for getting the credentials");var a={};a["cognito-idp."+s+".amazonaws.com/"+r]=i;var l=Ft({region:s}),c=Vt(t,void 0,void 0,function(){var e,t,i,n,s,r,c,h,d,u;return Bt(this,function(p){switch(p.label){case 0:return[4,this._getGuestIdentityId()];case 1:return(e=p.sent())?[3,3]:[4,l.send(new lt({IdentityPoolId:o,Logins:a}))];case 2:i=p.sent().IdentityId,t=i,p.label=3;case 3:return[4,l.send(new st({IdentityId:e||t,Logins:a}))];case 4:return n=p.sent(),s=n.Credentials,r=s.AccessKeyId,c=s.Expiration,h=s.SecretKey,d=s.SessionToken,u=n.IdentityId,this._identityId=u,e?(Ht.debug("The guest identity "+e+" has been successfully linked to the logins"),e===u&&Ht.debug("The guest identity "+e+" has become the primary identity"),[4,this._removeGuestIdentityId()]):[3,6];case 5:p.sent(),p.label=6;case 6:return[2,{accessKeyId:r,secretAccessKey:h,sessionToken:d,expiration:c,identityId:u}]}})}).catch(function(e){return Vt(t,void 0,void 0,function(){return Bt(this,function(t){throw e})})});return this._loadCredentials(c,"userPool",!0,null)},e.prototype._loadCredentials=function(e,t,i,n){var s=this,r=this;return new Promise(function(o,a){e.then(function(e){return Vt(s,void 0,void 0,function(){var s,a,l,c,h;return Bt(this,function(d){switch(d.label){case 0:if(Ht.debug("Load credentials successfully",e),this._identityId&&!e.identityId&&(e.identityId=this._identityId),r._credentials=e,r._credentials.authenticated=i,r._credentials_source=t,r._nextCredentialsRefresh=(new Date).getTime()+3e6,"federated"===t){s=Object.assign({id:this._credentials.identityId},n.user),a=n.provider,l=n.token,c=n.expires_at,h=n.identity_id;try{this._storage.setItem("aws-amplify-federatedInfo",JSON.stringify({provider:a,token:l,user:s,expires_at:c,identity_id:h}))}catch(e){Ht.debug("Failed to put federated info into auth storage",e)}}return"guest"!==t?[3,2]:[4,this._setGuestIdentityId(e.identityId)];case 1:d.sent(),d.label=2;case 2:return o(r._credentials),[2]}})})}).catch(function(t){if(t)return Ht.debug("Failed to load credentials",e),Ht.debug("Error loading credentials",t),void a(t)})})},e.prototype.set=function(e,t){return"session"===t?this._setCredentialsFromSession(e):"federation"===t?this._setCredentialsFromFederation(e):"guest"===t?this._setCredentialsForGuest():(Ht.debug("no source specified for setting credentials"),Promise.reject("invalid source"))},e.prototype.clear=function(){return Vt(this,void 0,void 0,function(){return Bt(this,function(e){return this._credentials=null,this._credentials_source=null,Ht.debug("removing aws-amplify-federatedInfo from storage"),this._storage.removeItem("aws-amplify-federatedInfo"),[2]})})},e.prototype._getGuestIdentityId=function(){return Vt(this,void 0,void 0,function(){var e,t;return Bt(this,function(i){switch(i.label){case 0:e=this._config.identityPoolId,i.label=1;case 1:return i.trys.push([1,3,,4]),[4,this._storageSync];case 2:return i.sent(),[2,this._storage.getItem(this._getCognitoIdentityIdStorageKey(e))];case 3:return t=i.sent(),Ht.debug("Failed to get the cached guest identityId",t),[3,4];case 4:return[2]}})})},e.prototype._setGuestIdentityId=function(e){return Vt(this,void 0,void 0,function(){var t,i;return Bt(this,function(n){switch(n.label){case 0:t=this._config.identityPoolId,n.label=1;case 1:return n.trys.push([1,3,,4]),[4,this._storageSync];case 2:return n.sent(),this._storage.setItem(this._getCognitoIdentityIdStorageKey(t),e),[3,4];case 3:return i=n.sent(),Ht.debug("Failed to cache guest identityId",i),[3,4];case 4:return[2]}})})},e.prototype._removeGuestIdentityId=function(){return Vt(this,void 0,void 0,function(){var e;return Bt(this,function(t){return e=this._config.identityPoolId,Ht.debug("removing "+this._getCognitoIdentityIdStorageKey(e)+" from storage"),this._storage.removeItem(this._getCognitoIdentityIdStorageKey(e)),[2]})})},e.prototype.shear=function(e){return{accessKeyId:e.accessKeyId,sessionToken:e.sessionToken,secretAccessKey:e.secretAccessKey,identityId:e.identityId,authenticated:e.authenticated}},e}())(null);Ae.HA.register(zt)},48507(e,t,i){"use strict";i.d(t,{YZ:()=>c});var n=i(5522),s=function(){return s=Object.assign||function(e){for(var t,i=1,n=arguments.length;i<n;i++)for(var s in t=arguments[i])Object.prototype.hasOwnProperty.call(t,s)&&(e[s]=t[s]);return e},s.apply(this,arguments)},r=function(e,t){var i="function"==typeof Symbol&&e[Symbol.iterator];if(!i)return e;var n,s,r=i.call(e),o=[];try{for(;(void 0===t||t-- >0)&&!(n=r.next()).done;)o.push(n.value)}catch(e){s={error:e}}finally{try{n&&!n.done&&(i=r.return)&&i.call(r)}finally{if(s)throw s.error}}return o},o=function(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(r(arguments[t]));return e},a=new n.C("Hub"),l="undefined"!=typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("amplify_default"):"@@amplify_default",c=new(function(){function e(e){this.listeners=[],this.patterns=[],this.protectedChannels=["core","auth","api","analytics","interactions","pubsub","storage","ui","xr"],this.name=e}return e.prototype.remove=function(e,t){if(e instanceof RegExp){var i=this.patterns.find(function(t){return t.pattern.source===e.source});if(!i)return void a.warn("No listeners for "+e);this.patterns=o(this.patterns.filter(function(e){return e!==i}))}else{var n=this.listeners[e];if(!n)return void a.warn("No listeners for "+e);this.listeners[e]=o(n.filter(function(e){return e.callback!==t}))}},e.prototype.dispatch=function(e,t,i,n){void 0===i&&(i=""),this.protectedChannels.indexOf(e)>-1&&(n===l||a.warn("WARNING: "+e+" is protected and dispatching on it can have unintended consequences"));var r={channel:e,payload:s({},t),source:i,patternInfo:[]};try{this._toListeners(r)}catch(e){a.error(e)}},e.prototype.listen=function(e,t,i){var n,s=this;if(void 0===i&&(i="noname"),function(e){return void 0!==e.onHubCapsule}(t))a.warn("WARNING onHubCapsule is Deprecated. Please pass in a callback."),n=t.onHubCapsule.bind(t);else{if("function"!=typeof t)throw new Error("No callback supplied to Hub");n=t}if(e instanceof RegExp)this.patterns.push({pattern:e,callback:n});else{var r=this.listeners[e];r||(r=[],this.listeners[e]=r),r.push({name:i,callback:n})}return function(){s.remove(e,n)}},e.prototype._toListeners=function(e){var t=e.channel,i=e.payload,n=this.listeners[t];if(n&&n.forEach(function(n){a.debug("Dispatching to "+t+" with ",i);try{n.callback(e)}catch(e){a.error(e)}}),this.patterns.length>0){if(!i.message)return void a.warn("Cannot perform pattern matching without a message key");var o=i.message;this.patterns.forEach(function(t){var i=o.match(t.pattern);if(i){var n=r(i).slice(1),l=s(s({},e),{patternInfo:n});try{t.callback(l)}catch(e){a.error(e)}}})}},e}())("__default__")},71429(e,t,i){"use strict";i.d(t,{JS:()=>v,VN:()=>d,gy:()=>p});var n=i(85409),s=[{type:"text/plain",ext:"txt"},{type:"text/html",ext:"html"},{type:"text/javascript",ext:"js"},{type:"text/css",ext:"css"},{type:"text/csv",ext:"csv"},{type:"text/yaml",ext:"yml"},{type:"text/yaml",ext:"yaml"},{type:"text/calendar",ext:"ics"},{type:"text/calendar",ext:"ical"},{type:"image/apng",ext:"apng"},{type:"image/bmp",ext:"bmp"},{type:"image/gif",ext:"gif"},{type:"image/x-icon",ext:"ico"},{type:"image/x-icon",ext:"cur"},{type:"image/jpeg",ext:"jpg"},{type:"image/jpeg",ext:"jpeg"},{type:"image/jpeg",ext:"jfif"},{type:"image/jpeg",ext:"pjp"},{type:"image/jpeg",ext:"pjpeg"},{type:"image/png",ext:"png"},{type:"image/svg+xml",ext:"svg"},{type:"image/tiff",ext:"tif"},{type:"image/tiff",ext:"tiff"},{type:"image/webp",ext:"webp"},{type:"application/json",ext:"json"},{type:"application/xml",ext:"xml"},{type:"application/x-sh",ext:"sh"},{type:"application/zip",ext:"zip"},{type:"application/x-rar-compressed",ext:"rar"},{type:"application/x-tar",ext:"tar"},{type:"application/x-bzip",ext:"bz"},{type:"application/x-bzip2",ext:"bz2"},{type:"application/pdf",ext:"pdf"},{type:"application/java-archive",ext:"jar"},{type:"application/msword",ext:"doc"},{type:"application/vnd.ms-excel",ext:"xls"},{type:"application/vnd.ms-excel",ext:"xlsx"},{type:"message/rfc822",ext:"eml"}],r=function(e){return void 0===e&&(e={}),0===Object.keys(e).length},o=function(e,t,i){if(!e||!e.sort)return!1;var n=i&&"desc"===i?-1:1;return e.sort(function(e,i){var s=e[t],r=i[t];return void 0===r?void 0===s?0:1*n:void 0===s||s<r?-1*n:s>r?1*n:0}),!0},a=function(e,t){var i=Object.assign({},e);return t&&("string"==typeof t?delete i[t]:t.forEach(function(e){delete i[e]})),i},l=function(e,t){void 0===t&&(t="application/octet-stream");var i=e.toLowerCase(),n=s.filter(function(e){return i.endsWith("."+e.ext)});return n.length>0?n[0].type:t},c=function(e){var t=e.toLowerCase();return!!t.startsWith("text/")||"application/json"===t||"application/xml"===t||"application/sh"===t},h=function(){for(var e="",t=32;t>0;t-=1)e+="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"[Math.floor(62*Math.random())];return e},d=function(e){if(e.isResolved)return e;var t=!0,i=!1,n=!1,s=e.then(function(e){return n=!0,t=!1,e},function(e){throw i=!0,t=!1,e});return s.isFullfilled=function(){return n},s.isPending=function(){return t},s.isRejected=function(){return i},s},u=function(){if("undefined"==typeof self)return!1;var e=self;return void 0!==e.WorkerGlobalScope&&self instanceof e.WorkerGlobalScope},p=function(){return{isBrowser:"undefined"!=typeof window&&void 0!==window.document,isNode:void 0!==n&&null!=n.versions&&null!=n.versions.node}},g=function(e,t,i){if(void 0===t&&(t=[]),void 0===i&&(i=[]),!m(e))return e;var n={};for(var s in e)e.hasOwnProperty(s)&&(n[t.includes(s)?s:s[0].toLowerCase()+s.slice(1)]=i.includes(s)?e[s]:g(e[s],t,i));return n},f=function(e,t,i){if(void 0===t&&(t=[]),void 0===i&&(i=[]),!m(e))return e;var n={};for(var s in e)e.hasOwnProperty(s)&&(n[t.includes(s)?s:s[0].toUpperCase()+s.slice(1)]=i.includes(s)?e[s]:f(e[s],t,i));return n},m=function(e){return!(!(e instanceof Object)||e instanceof Array||e instanceof Function||e instanceof Number||e instanceof String||e instanceof Boolean)},v=function(){function e(){}return e.isEmpty=r,e.sortByField=o,e.objectLessAttributes=a,e.filenameToContentType=l,e.isTextFile=c,e.generateRandomString=h,e.makeQuerablePromise=d,e.isWebWorker=u,e.browserOrNode=p,e.transferKeyToLowerCase=g,e.transferKeyToUpperCase=f,e.isStrictObject=m,e}()},5522(e,t,i){"use strict";i.d(t,{C:()=>a});var n,s=function(e,t){var i="function"==typeof Symbol&&e[Symbol.iterator];if(!i)return e;var n,s,r=i.call(e),o=[];try{for(;(void 0===t||t-- >0)&&!(n=r.next()).done;)o.push(n.value)}catch(e){s={error:e}}finally{try{n&&!n.done&&(i=r.return)&&i.call(r)}finally{if(s)throw s.error}}return o},r=function(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(s(arguments[t]));return e},o={VERBOSE:1,DEBUG:2,INFO:3,WARN:4,ERROR:5};!function(e){e.DEBUG="DEBUG",e.ERROR="ERROR",e.INFO="INFO",e.WARN="WARN",e.VERBOSE="VERBOSE"}(n||(n={}));var a=function(){function e(e,t){void 0===t&&(t=n.WARN),this.name=e,this.level=t,this._pluggables=[]}return e.prototype._padding=function(e){return e<10?"0"+e:""+e},e.prototype._ts=function(){var e=new Date;return[this._padding(e.getMinutes()),this._padding(e.getSeconds())].join(":")+"."+e.getMilliseconds()},e.prototype.configure=function(e){return e?(this._config=e,this._config):this._config},e.prototype._log=function(t){for(var i,s,r=[],a=1;a<arguments.length;a++)r[a-1]=arguments[a];var l=this.level;if(e.LOG_LEVEL&&(l=e.LOG_LEVEL),"undefined"!=typeof window&&window.LOG_LEVEL&&(l=window.LOG_LEVEL),o[t]>=o[l]){var c=console.log.bind(console);t===n.ERROR&&console.error&&(c=console.error.bind(console)),t===n.WARN&&console.warn&&(c=console.warn.bind(console));var h="["+t+"] "+this._ts()+" "+this.name,d="";if(1===r.length&&"string"==typeof r[0])c(d=h+" - "+r[0]);else if(1===r.length)d=h+" "+r[0],c(h,r[0]);else if("string"==typeof r[0]){var u=r.slice(1);1===u.length&&(u=u[0]),d=h+" - "+r[0]+" "+u,c(h+" - "+r[0],u)}else d=h+" "+r,c(h,r);try{for(var p=function(e){var t="function"==typeof Symbol&&Symbol.iterator,i=t&&e[t],n=0;if(i)return i.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}(this._pluggables),g=p.next();!g.done;g=p.next()){var f=g.value,m={message:d,timestamp:Date.now()};f.pushLogs([m])}}catch(e){i={error:e}}finally{try{g&&!g.done&&(s=p.return)&&s.call(p)}finally{if(i)throw i.error}}}},e.prototype.log=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this._log.apply(this,r([n.INFO],e))},e.prototype.info=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this._log.apply(this,r([n.INFO],e))},e.prototype.warn=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this._log.apply(this,r([n.WARN],e))},e.prototype.error=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this._log.apply(this,r([n.ERROR],e))},e.prototype.debug=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this._log.apply(this,r([n.DEBUG],e))},e.prototype.verbose=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this._log.apply(this,r([n.VERBOSE],e))},e.prototype.addPluggable=function(e){e&&"Logging"===e.getCategoryName()&&(this._pluggables.push(e),e.configure(this._config))},e.prototype.listPluggables=function(){return this._pluggables},e.LOG_LEVEL=null,e}()},76253(e,t,i){"use strict";i.d(t,{iX:()=>a});var n=i(5522),s=function(){return s=Object.assign||function(e){for(var t,i=1,n=arguments.length;i<n;i++)for(var s in t=arguments[i])Object.prototype.hasOwnProperty.call(t,s)&&(e[s]=t[s]);return e},s.apply(this,arguments)},r=new n.C("Parser"),o=function(e){var t,i={};if(e.aws_mobile_analytics_app_id){var n={AWSPinpoint:{appId:e.aws_mobile_analytics_app_id,region:e.aws_mobile_analytics_app_region}};i.Analytics=n}return(e.aws_cognito_identity_pool_id||e.aws_user_pools_id)&&(i.Auth={userPoolId:e.aws_user_pools_id,userPoolWebClientId:e.aws_user_pools_web_client_id,region:e.aws_cognito_region,identityPoolId:e.aws_cognito_identity_pool_id,identityPoolRegion:e.aws_cognito_region,mandatorySignIn:"enable"===e.aws_mandatory_sign_in,signUpVerificationMethod:e.aws_cognito_sign_up_verification_method||"code"}),t=e.aws_user_files_s3_bucket?{AWSS3:{bucket:e.aws_user_files_s3_bucket,region:e.aws_user_files_s3_bucket_region,dangerouslyConnectToHttpEndpointForTesting:e.aws_user_files_s3_dangerously_connect_to_http_endpoint_for_testing}}:e?e.Storage||e:{},e.Logging&&(i.Logging=s(s({},e.Logging),{region:e.aws_project_region})),e.geo&&(i.Geo=Object.assign({},e.geo),e.geo.amazon_location_service&&(i.Geo={AmazonLocationService:e.geo.amazon_location_service})),i.Analytics=Object.assign({},i.Analytics,e.Analytics),i.Auth=Object.assign({},i.Auth,e.Auth),i.Storage=Object.assign({},t),i.Logging=Object.assign({},i.Logging,e.Logging),r.debug("parse config",e,"to amplifyconfig",i),i},a=function(){function e(){}return e.parseMobilehubConfig=o,e}()},70862(e,t,i){"use strict";i.d(t,{fE:()=>r});var n="aws-amplify/4.7.14",s={userAgent:n+" js",product:"",navigator:null,isReactNative:!1};"undefined"!=typeof navigator&&navigator.product&&(s.product=navigator.product||"",s.navigator=navigator||null,"ReactNative"===navigator.product?(s.userAgent=n+" react-native",s.isReactNative=!0):(s.userAgent=n+" js",s.isReactNative=!1));var r=function(e){return""+s.userAgent+(e||"")}},70870(e,t,i){"use strict";i.d(t,{i1:()=>r});var n={},s=function(){function e(){}return e.setItem=function(e,t){return n[e]=t,n[e]},e.getItem=function(e){return Object.prototype.hasOwnProperty.call(n,e)?n[e]:void 0},e.removeItem=function(e){return delete n[e]},e.clear=function(){return n={}},e}(),r=function(){function e(){try{this.storageWindow=window.localStorage,this.storageWindow.setItem("aws.amplify.test-ls",1),this.storageWindow.removeItem("aws.amplify.test-ls")}catch(e){this.storageWindow=s}}return e.prototype.getStorage=function(){return this.storageWindow},e}()},56692(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},36637(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},21516(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},19840(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},15784(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isMsWindow=void 0;var i=["decrypt","digest","encrypt","exportKey","generateKey","importKey","sign","verify"];t.isMsWindow=function(e){if(function(e){return"MSInputMethodContext"in e&&"msCrypto"in e}(e)&&void 0!==e.msCrypto.subtle){var t=e.msCrypto,n=t.getRandomValues,s=t.subtle;return i.map(function(e){return s[e]}).concat(n).every(function(e){return"function"==typeof e})}return!1}},10098(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=i(65927);n.__exportStar(i(56692),t),n.__exportStar(i(36637),t),n.__exportStar(i(21516),t),n.__exportStar(i(19840),t),n.__exportStar(i(15784),t)},90843(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EMPTY_DATA_SHA_256=t.SHA_256_HMAC_ALGO=t.SHA_256_HASH=void 0,t.SHA_256_HASH={name:"SHA-256"},t.SHA_256_HMAC_ALGO={name:"HMAC",hash:t.SHA_256_HASH},t.EMPTY_DATA_SHA_256=new Uint8Array([227,176,196,66,152,252,28,20,154,251,244,200,153,111,185,36,39,174,65,228,100,155,147,76,164,149,153,27,120,82,184,85])},87098(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Sha256=void 0;var n=i(25515),s=i(22038),r=i(18558),o=i(91014),a=i(10098),l=i(32225),c=function(){function e(e){(0,o.supportsWebCrypto)((0,l.locateWindow)())?this.hash=new s.Sha256(e):(0,a.isMsWindow)((0,l.locateWindow)())?this.hash=new n.Sha256(e):this.hash=new r.Sha256(e)}return e.prototype.update=function(e,t){this.hash.update(e,t)},e.prototype.digest=function(){return this.hash.digest()},e}();t.Sha256=c},25515(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Sha256=void 0;var n=i(27755),s=i(90843),r=i(31643),o=i(32225),a=function(){function e(e){e?(this.operation=function(e){return new Promise(function(t,i){var n=(0,o.locateWindow)().msCrypto.subtle.importKey("raw",l(e),s.SHA_256_HMAC_ALGO,!1,["sign"]);n.oncomplete=function(){n.result&&t(n.result),i(new Error("ImportKey completed without importing key."))},n.onerror=function(){i(new Error("ImportKey failed to import key."))}})}(e).then(function(e){return(0,o.locateWindow)().msCrypto.subtle.sign(s.SHA_256_HMAC_ALGO,e)}),this.operation.catch(function(){})):this.operation=Promise.resolve((0,o.locateWindow)().msCrypto.subtle.digest("SHA-256"))}return e.prototype.update=function(e){var t=this;(0,n.isEmptyData)(e)||(this.operation=this.operation.then(function(i){return i.onerror=function(){t.operation=Promise.reject(new Error("Error encountered updating hash"))},i.process(l(e)),i}),this.operation.catch(function(){}))},e.prototype.digest=function(){return this.operation.then(function(e){return new Promise(function(t,i){e.onerror=function(){i(new Error("Error encountered finalizing hash"))},e.oncomplete=function(){e.result&&t(new Uint8Array(e.result)),i(new Error("Error encountered finalizing hash"))},e.finish()})})},e}();function l(e){return"string"==typeof e?(0,r.fromUtf8)(e):ArrayBuffer.isView(e)?new Uint8Array(e.buffer,e.byteOffset,e.byteLength/Uint8Array.BYTES_PER_ELEMENT):new Uint8Array(e)}t.Sha256=a},54218(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WebCryptoSha256=t.Ie11Sha256=void 0,(0,i(65927).__exportStar)(i(87098),t);var n=i(25515);Object.defineProperty(t,"Ie11Sha256",{enumerable:!0,get:function(){return n.Sha256}});var s=i(22038);Object.defineProperty(t,"WebCryptoSha256",{enumerable:!0,get:function(){return s.Sha256}})},27755(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isEmptyData=void 0,t.isEmptyData=function(e){return"string"==typeof e?0===e.length:0===e.byteLength}},22038(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Sha256=void 0;var n=i(47062),s=i(90843),r=i(32225),o=function(){function e(e){this.toHash=new Uint8Array(0),void 0!==e&&(this.key=new Promise(function(t,i){(0,r.locateWindow)().crypto.subtle.importKey("raw",(0,n.convertToBuffer)(e),s.SHA_256_HMAC_ALGO,!1,["sign"]).then(t,i)}),this.key.catch(function(){}))}return e.prototype.update=function(e){if(!(0,n.isEmptyData)(e)){var t=(0,n.convertToBuffer)(e),i=new Uint8Array(this.toHash.byteLength+t.byteLength);i.set(this.toHash,0),i.set(t,this.toHash.byteLength),this.toHash=i}},e.prototype.digest=function(){var e=this;return this.key?this.key.then(function(t){return(0,r.locateWindow)().crypto.subtle.sign(s.SHA_256_HMAC_ALGO,t,e.toHash).then(function(e){return new Uint8Array(e)})}):(0,n.isEmptyData)(this.toHash)?Promise.resolve(s.EMPTY_DATA_SHA_256):Promise.resolve().then(function(){return(0,r.locateWindow)().crypto.subtle.digest(s.SHA_256_HASH,e.toHash)}).then(function(e){return Promise.resolve(new Uint8Array(e))})},e}();t.Sha256=o},50930(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=i(17214),s=function(){function e(){this.state=Int32Array.from(n.INIT),this.temp=new Int32Array(64),this.buffer=new Uint8Array(64),this.bufferLength=0,this.bytesHashed=0,this.finished=!1}return e.prototype.update=function(e){if(this.finished)throw new Error("Attempted to update an already finished hash.");var t=0,i=e.byteLength;if(this.bytesHashed+=i,8*this.bytesHashed>n.MAX_HASHABLE_LENGTH)throw new Error("Cannot hash more than 2^53 - 1 bits");for(;i>0;)this.buffer[this.bufferLength++]=e[t++],i--,this.bufferLength===n.BLOCK_SIZE&&(this.hashBuffer(),this.bufferLength=0)},e.prototype.digest=function(){if(!this.finished){var e=8*this.bytesHashed,t=new DataView(this.buffer.buffer,this.buffer.byteOffset,this.buffer.byteLength),i=this.bufferLength;if(t.setUint8(this.bufferLength++,128),i%n.BLOCK_SIZE>=n.BLOCK_SIZE-8){for(var s=this.bufferLength;s<n.BLOCK_SIZE;s++)t.setUint8(s,0);this.hashBuffer(),this.bufferLength=0}for(s=this.bufferLength;s<n.BLOCK_SIZE-8;s++)t.setUint8(s,0);t.setUint32(n.BLOCK_SIZE-8,Math.floor(e/4294967296),!0),t.setUint32(n.BLOCK_SIZE-4,e),this.hashBuffer(),this.finished=!0}var r=new Uint8Array(n.DIGEST_LENGTH);for(s=0;s<8;s++)r[4*s]=this.state[s]>>>24&255,r[4*s+1]=this.state[s]>>>16&255,r[4*s+2]=this.state[s]>>>8&255,r[4*s+3]=this.state[s]>>>0&255;return r},e.prototype.hashBuffer=function(){for(var e=this.buffer,t=this.state,i=t[0],s=t[1],r=t[2],o=t[3],a=t[4],l=t[5],c=t[6],h=t[7],d=0;d<n.BLOCK_SIZE;d++){if(d<16)this.temp[d]=(255&e[4*d])<<24|(255&e[4*d+1])<<16|(255&e[4*d+2])<<8|255&e[4*d+3];else{var u=this.temp[d-2],p=(u>>>17|u<<15)^(u>>>19|u<<13)^u>>>10,g=((u=this.temp[d-15])>>>7|u<<25)^(u>>>18|u<<14)^u>>>3;this.temp[d]=(p+this.temp[d-7]|0)+(g+this.temp[d-16]|0)}var f=(((a>>>6|a<<26)^(a>>>11|a<<21)^(a>>>25|a<<7))+(a&l^~a&c)|0)+(h+(n.KEY[d]+this.temp[d]|0)|0)|0,m=((i>>>2|i<<30)^(i>>>13|i<<19)^(i>>>22|i<<10))+(i&s^i&r^s&r)|0;h=c,c=l,l=a,a=o+f|0,o=r,r=s,s=i,i=f+m|0}t[0]+=i,t[1]+=s,t[2]+=r,t[3]+=o,t[4]+=a,t[5]+=l,t[6]+=c,t[7]+=h},e}();t.RawSha256=s},17214(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BLOCK_SIZE=64,t.DIGEST_LENGTH=32,t.KEY=new Uint32Array([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]),t.INIT=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],t.MAX_HASHABLE_LENGTH=Math.pow(2,53)-1},56059(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),i(65927).__exportStar(i(15119),t)},15119(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=i(65927),s=i(17214),r=i(50930),o=i(94518),a=function(){function e(e){if(this.hash=new r.RawSha256,e){this.outer=new r.RawSha256;var t=function(e){var t=l(e);if(t.byteLength>s.BLOCK_SIZE){var i=new r.RawSha256;i.update(t),t=i.digest()}var n=new Uint8Array(s.BLOCK_SIZE);return n.set(t),n}(e),i=new Uint8Array(s.BLOCK_SIZE);i.set(t);for(var n=0;n<s.BLOCK_SIZE;n++)t[n]^=54,i[n]^=92;for(this.hash.update(t),this.outer.update(i),n=0;n<t.byteLength;n++)t[n]=0}}return e.prototype.update=function(e){if(!(t=e,("string"==typeof t?0===t.length:0===t.byteLength)||this.error))try{this.hash.update(l(e))}catch(e){this.error=e}var t},e.prototype.digestSync=function(){if(this.error)throw this.error;return this.outer?(this.outer.finished||this.outer.update(this.hash.digest()),this.outer.digest()):this.hash.digest()},e.prototype.digest=function(){return n.__awaiter(this,void 0,void 0,function(){return n.__generator(this,function(e){return[2,this.digestSync()]})})},e}();function l(e){return"string"==typeof e?o.fromUtf8(e):ArrayBuffer.isView(e)?new Uint8Array(e.buffer,e.byteOffset,e.byteLength/Uint8Array.BYTES_PER_ELEMENT):new Uint8Array(e)}t.Sha256=a},615(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RawSha256=void 0;var n=i(44335),s=function(){function e(){this.state=Int32Array.from(n.INIT),this.temp=new Int32Array(64),this.buffer=new Uint8Array(64),this.bufferLength=0,this.bytesHashed=0,this.finished=!1}return e.prototype.update=function(e){if(this.finished)throw new Error("Attempted to update an already finished hash.");var t=0,i=e.byteLength;if(this.bytesHashed+=i,8*this.bytesHashed>n.MAX_HASHABLE_LENGTH)throw new Error("Cannot hash more than 2^53 - 1 bits");for(;i>0;)this.buffer[this.bufferLength++]=e[t++],i--,this.bufferLength===n.BLOCK_SIZE&&(this.hashBuffer(),this.bufferLength=0)},e.prototype.digest=function(){if(!this.finished){var e=8*this.bytesHashed,t=new DataView(this.buffer.buffer,this.buffer.byteOffset,this.buffer.byteLength),i=this.bufferLength;if(t.setUint8(this.bufferLength++,128),i%n.BLOCK_SIZE>=n.BLOCK_SIZE-8){for(var s=this.bufferLength;s<n.BLOCK_SIZE;s++)t.setUint8(s,0);this.hashBuffer(),this.bufferLength=0}for(s=this.bufferLength;s<n.BLOCK_SIZE-8;s++)t.setUint8(s,0);t.setUint32(n.BLOCK_SIZE-8,Math.floor(e/4294967296),!0),t.setUint32(n.BLOCK_SIZE-4,e),this.hashBuffer(),this.finished=!0}var r=new Uint8Array(n.DIGEST_LENGTH);for(s=0;s<8;s++)r[4*s]=this.state[s]>>>24&255,r[4*s+1]=this.state[s]>>>16&255,r[4*s+2]=this.state[s]>>>8&255,r[4*s+3]=this.state[s]>>>0&255;return r},e.prototype.hashBuffer=function(){for(var e=this.buffer,t=this.state,i=t[0],s=t[1],r=t[2],o=t[3],a=t[4],l=t[5],c=t[6],h=t[7],d=0;d<n.BLOCK_SIZE;d++){if(d<16)this.temp[d]=(255&e[4*d])<<24|(255&e[4*d+1])<<16|(255&e[4*d+2])<<8|255&e[4*d+3];else{var u=this.temp[d-2],p=(u>>>17|u<<15)^(u>>>19|u<<13)^u>>>10,g=((u=this.temp[d-15])>>>7|u<<25)^(u>>>18|u<<14)^u>>>3;this.temp[d]=(p+this.temp[d-7]|0)+(g+this.temp[d-16]|0)}var f=(((a>>>6|a<<26)^(a>>>11|a<<21)^(a>>>25|a<<7))+(a&l^~a&c)|0)+(h+(n.KEY[d]+this.temp[d]|0)|0)|0,m=((i>>>2|i<<30)^(i>>>13|i<<19)^(i>>>22|i<<10))+(i&s^i&r^s&r)|0;h=c,c=l,l=a,a=o+f|0,o=r,r=s,s=i,i=f+m|0}t[0]+=i,t[1]+=s,t[2]+=r,t[3]+=o,t[4]+=a,t[5]+=l,t[6]+=c,t[7]+=h},e}();t.RawSha256=s},44335(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MAX_HASHABLE_LENGTH=t.INIT=t.KEY=t.DIGEST_LENGTH=t.BLOCK_SIZE=void 0,t.BLOCK_SIZE=64,t.DIGEST_LENGTH=32,t.KEY=new Uint32Array([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]),t.INIT=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],t.MAX_HASHABLE_LENGTH=Math.pow(2,53)-1},18558(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),(0,i(65927).__exportStar)(i(21048),t)},21048(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Sha256=void 0;var n=i(65927),s=i(44335),r=i(615),o=i(47062),a=function(){function e(e){if(this.hash=new r.RawSha256,e){this.outer=new r.RawSha256;var t=function(e){var t=(0,o.convertToBuffer)(e);if(t.byteLength>s.BLOCK_SIZE){var i=new r.RawSha256;i.update(t),t=i.digest()}var n=new Uint8Array(s.BLOCK_SIZE);return n.set(t),n}(e),i=new Uint8Array(s.BLOCK_SIZE);i.set(t);for(var n=0;n<s.BLOCK_SIZE;n++)t[n]^=54,i[n]^=92;for(this.hash.update(t),this.outer.update(i),n=0;n<t.byteLength;n++)t[n]=0}}return e.prototype.update=function(e){if(!(0,o.isEmptyData)(e)&&!this.error)try{this.hash.update((0,o.convertToBuffer)(e))}catch(e){this.error=e}},e.prototype.digestSync=function(){if(this.error)throw this.error;return this.outer?(this.outer.finished||this.outer.update(this.hash.digest()),this.outer.digest()):this.hash.digest()},e.prototype.digest=function(){return(0,n.__awaiter)(this,void 0,void 0,function(){return(0,n.__generator)(this,function(e){return[2,this.digestSync()]})})},e}();t.Sha256=a},91014(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),i(65927).__exportStar(i(9301),t)},9301(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.supportsZeroByteGCM=t.supportsSubtleCrypto=t.supportsSecureRandom=t.supportsWebCrypto=void 0;var n=i(65927),s=["decrypt","digest","encrypt","exportKey","generateKey","importKey","sign","verify"];function r(e){return"object"==typeof e&&"object"==typeof e.crypto&&"function"==typeof e.crypto.getRandomValues}function o(e){return e&&s.every(function(t){return"function"==typeof e[t]})}t.supportsWebCrypto=function(e){return!(!r(e)||"object"!=typeof e.crypto.subtle)&&o(e.crypto.subtle)},t.supportsSecureRandom=r,t.supportsSubtleCrypto=o,t.supportsZeroByteGCM=function(e){return n.__awaiter(this,void 0,void 0,function(){var t;return n.__generator(this,function(i){switch(i.label){case 0:if(!o(e))return[2,!1];i.label=1;case 1:return i.trys.push([1,4,,5]),[4,e.generateKey({name:"AES-GCM",length:128},!1,["encrypt"])];case 2:return t=i.sent(),[4,e.encrypt({name:"AES-GCM",iv:new Uint8Array(Array(12)),additionalData:new Uint8Array(Array(16)),tagLength:128},t,new Uint8Array(0))];case 3:return[2,16===i.sent().byteLength];case 4:return i.sent(),[2,!1];case 5:return[2]}})})}},29046(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.convertToBuffer=void 0;var n=i(91486),s="undefined"!=typeof Buffer&&Buffer.from?function(e){return Buffer.from(e,"utf8")}:n.fromUtf8;t.convertToBuffer=function(e){return e instanceof Uint8Array?e:"string"==typeof e?s(e):ArrayBuffer.isView(e)?new Uint8Array(e.buffer,e.byteOffset,e.byteLength/Uint8Array.BYTES_PER_ELEMENT):new Uint8Array(e)}},47062(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.uint32ArrayFrom=t.numToUint8=t.isEmptyData=t.convertToBuffer=void 0;var n=i(29046);Object.defineProperty(t,"convertToBuffer",{enumerable:!0,get:function(){return n.convertToBuffer}});var s=i(69783);Object.defineProperty(t,"isEmptyData",{enumerable:!0,get:function(){return s.isEmptyData}});var r=i(41739);Object.defineProperty(t,"numToUint8",{enumerable:!0,get:function(){return r.numToUint8}});var o=i(77780);Object.defineProperty(t,"uint32ArrayFrom",{enumerable:!0,get:function(){return o.uint32ArrayFrom}})},69783(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isEmptyData=void 0,t.isEmptyData=function(e){return"string"==typeof e?0===e.length:0===e.byteLength}},41739(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.numToUint8=void 0,t.numToUint8=function(e){return new Uint8Array([(4278190080&e)>>24,(16711680&e)>>16,(65280&e)>>8,255&e])}},77780(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.uint32ArrayFrom=void 0,t.uint32ArrayFrom=function(e){if(!Array.from){for(var t=new Uint32Array(e.length);0<e.length;)t[0]=e[0];return t}return Uint32Array.from(e)}},85775(e,t,i){"use strict";i.d(t,{vJ:()=>s,TD:()=>a});var n=i(65927),s=function(e){var t;return(0,n.__assign)((0,n.__assign)({},e),{tls:null===(t=e.tls)||void 0===t||t,endpoint:e.endpoint?r(e):function(){return o(e)},isCustomEndpoint:!!e.endpoint})},r=function(e){var t=e.endpoint,i=e.urlParser;if("string"==typeof t){var n=Promise.resolve(i(t));return function(){return n}}if("object"==typeof t){var s=Promise.resolve(t);return function(){return s}}return t},o=function(e){return(0,n.__awaiter)(void 0,void 0,void 0,function(){var t,i,s,r,o;return(0,n.__generator)(this,function(n){switch(n.label){case 0:return t=e.tls,i=void 0===t||t,[4,e.region()];case 1:if(s=n.sent(),!new RegExp(/^([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9-]{0,61}[a-zA-Z0-9])$/).test(s))throw new Error("Invalid region in client config");return[4,e.regionInfoProvider(s)];case 2:if(!(r=(null!==(o=n.sent())&&void 0!==o?o:{}).hostname))throw new Error("Cannot resolve hostname from client config");return[2,e.urlParser((i?"https:":"http:")+"//"+r)]}})})},a=function(e){if(!e.region)throw new Error("Region is missing");return(0,n.__assign)((0,n.__assign)({},e),{region:l(e.region)})},l=function(e){if("string"==typeof e){var t=Promise.resolve(e);return function(){return t}}return e}},22292(e,t,i){"use strict";i.d(t,{N:()=>o,k:()=>l});var n=i(65927),s=i(59027),r=i(2726),o=function(){function e(e){var t=(void 0===e?{}:e).requestTimeout;this.requestTimeout=t}return e.prototype.destroy=function(){},e.prototype.handle=function(e,t){var i=(void 0===t?{}:t).abortSignal,o=this.requestTimeout;if(null==i?void 0:i.aborted){var a=new Error("Request aborted");return a.name="AbortError",Promise.reject(a)}var l=e.path;if(e.query){var c=function(e){var t,i,s=[];try{for(var o=(0,n.__values)(Object.keys(e).sort()),a=o.next();!a.done;a=o.next()){var l=a.value,c=e[l];if(l=(0,r.o)(l),Array.isArray(c))for(var h=0,d=c.length;h<d;h++)s.push(l+"="+(0,r.o)(c[h]));else{var u=l;(c||"string"==typeof c)&&(u+="="+(0,r.o)(c)),s.push(u)}}}catch(e){t={error:e}}finally{try{a&&!a.done&&(i=o.return)&&i.call(o)}finally{if(t)throw t.error}}return s.join("&")}(e.query);c&&(l+="?"+c)}var h=e.port,d=e.method,u=e.protocol+"//"+e.hostname+(h?":"+h:"")+l,p={body:"GET"===d||"HEAD"===d?void 0:e.body,headers:new Headers(e.headers),method:d};"undefined"!=typeof AbortController&&(p.signal=i);var g,f=new Request(u,p),m=[fetch(f).then(function(e){var t,i,r=e.headers,o={};try{for(var a=(0,n.__values)(r.entries()),l=a.next();!l.done;l=a.next()){var c=l.value;o[c[0]]=c[1]}}catch(e){t={error:e}}finally{try{l&&!l.done&&(i=a.return)&&i.call(a)}finally{if(t)throw t.error}}return void 0!==e.body?{response:new s.cS({headers:o,statusCode:e.status,body:e.body})}:e.blob().then(function(t){return{response:new s.cS({headers:o,statusCode:e.status,body:t})}})}),(g=o,void 0===g&&(g=0),new Promise(function(e,t){g&&setTimeout(function(){var e=new Error("Request did not complete within "+g+" ms");e.name="TimeoutError",t(e)},g)}))];return i&&m.push(new Promise(function(e,t){i.onabort=function(){var e=new Error("Request aborted");e.name="AbortError",t(e)}})),Promise.race(m)},e}(),a=i(68380),l=function(e){return"function"==typeof Blob&&e instanceof Blob?function(e){return(0,n.__awaiter)(this,void 0,void 0,function(){var t,i;return(0,n.__generator)(this,function(n){switch(n.label){case 0:return[4,c(e)];case 1:return t=n.sent(),i=(0,a.E)(t),[2,new Uint8Array(i)]}})})}(e):function(e){return(0,n.__awaiter)(this,void 0,void 0,function(){var t,i,s,r,o,a,l;return(0,n.__generator)(this,function(n){switch(n.label){case 0:t=new Uint8Array(0),i=e.getReader(),s=!1,n.label=1;case 1:return s?[3,3]:[4,i.read()];case 2:return r=n.sent(),o=r.done,(a=r.value)&&(l=t,(t=new Uint8Array(l.length+a.length)).set(l),t.set(a,l.length)),s=o,[3,1];case 3:return[2,t]}})})}(e)};function c(e){return new Promise(function(t,i){var n=new FileReader;n.onloadend=function(){var e;if(2!==n.readyState)return i(new Error("Reader aborted too early"));var s=null!==(e=n.result)&&void 0!==e?e:"",r=s.indexOf(","),o=r>-1?r+1:s.length;t(s.substring(o))},n.onabort=function(){return i(new Error("Read aborted"))},n.onerror=function(){return i(n.error)},n.readAsDataURL(e)})}},10078(e,t,i){"use strict";i.d(t,{B:()=>n});var n=function(e){return function(){return Promise.reject(e)}}},23788(e,t,i){"use strict";i.d(t,{vK:()=>a});var n=i(65927),s=i(59027),r="content-length",o={step:"build",tags:["SET_CONTENT_LENGTH","CONTENT_LENGTH"],name:"contentLengthMiddleware",override:!0},a=function(e){return{applyToStack:function(t){t.add(function(e){var t=this;return function(i){return function(o){return(0,n.__awaiter)(t,void 0,void 0,function(){var t,a,l,c,h;return(0,n.__generator)(this,function(d){return t=o.request,s.Kd.isInstance(t)&&(a=t.body,l=t.headers,a&&-1===Object.keys(l).map(function(e){return e.toLowerCase()}).indexOf(r)&&void 0!==(c=e(a))&&(t.headers=(0,n.__assign)((0,n.__assign)({},t.headers),((h={})[r]=String(c),h)))),[2,i((0,n.__assign)((0,n.__assign)({},o),{request:t}))]})})}}}(e.bodyLengthChecker),o)}}}},14188(e,t,i){"use strict";i.d(t,{OV:()=>r,TC:()=>a});var n=i(65927),s=i(59027);function r(e){return e}var o={name:"hostHeaderMiddleware",step:"build",priority:"low",tags:["HOST"],override:!0},a=function(e){return{applyToStack:function(t){t.add(function(e){return function(t){return function(i){return(0,n.__awaiter)(void 0,void 0,void 0,function(){var r,o;return(0,n.__generator)(this,function(n){return s.Kd.isInstance(i.request)?(r=i.request,(void 0===(o=(e.requestHandler.metadata||{}).handlerProtocol)?"":o).indexOf("h2")>=0&&!r.headers[":authority"]?(delete r.headers.host,r.headers[":authority"]=""):r.headers.host||(r.headers.host=r.hostname),[2,t(i)]):[2,t(i)]})})}}}(e),o)}}}},64996(e,t,i){"use strict";i.d(t,{Y7:()=>r});var n=i(65927),s={name:"loggerMiddleware",tags:["LOGGER"],step:"initialize",override:!0},r=function(e){return{applyToStack:function(e){e.add(function(e,t){return function(i){return(0,n.__awaiter)(void 0,void 0,void 0,function(){var s,r,o,a,l,c,h,d,u;return(0,n.__generator)(this,function(p){switch(p.label){case 0:return s=t.clientName,r=t.commandName,o=t.inputFilterSensitiveLog,a=t.logger,l=t.outputFilterSensitiveLog,[4,e(i)];case 1:return c=p.sent(),a?("function"==typeof a.info&&(h=c.output,d=h.$metadata,u=(0,n.__rest)(h,["$metadata"]),a.info({clientName:s,commandName:r,input:o(i.input),output:l(u),metadata:d})),[2,c]):[2,c]}})})}},s)}}}},89556(e,t,i){"use strict";i.d(t,{Gz:()=>f,ey:()=>r,$z:()=>v});var n=i(65927),s={name:"retryMiddleware",tags:["RETRY"],step:"finalizeRequest",priority:"high",override:!0},r=function(e){return{applyToStack:function(t){t.add(function(e){return function(t,i){return function(s){return(0,n.__awaiter)(void 0,void 0,void 0,function(){var r;return(0,n.__generator)(this,function(o){return(null===(r=null==e?void 0:e.retryStrategy)||void 0===r?void 0:r.mode)&&(i.userAgent=(0,n.__spread)(i.userAgent||[],[["cfg/retry-mode",e.retryStrategy.mode]])),[2,e.retryStrategy.retry(t,s)]})})}}}(e),s)}}},o=i(59027),a=["AuthFailure","InvalidSignatureException","RequestExpired","RequestInTheFuture","RequestTimeTooSkewed","SignatureDoesNotMatch"],l=["BandwidthLimitExceeded","EC2ThrottledException","LimitExceededException","PriorRequestNotComplete","ProvisionedThroughputExceededException","RequestLimitExceeded","RequestThrottled","RequestThrottledException","SlowDown","ThrottledException","Throttling","ThrottlingException","TooManyRequestsException","TransactionInProgressException"],c=["AbortError","TimeoutError","RequestTimeout","RequestTimeoutException"],h=[500,502,503,504],d=function(e){var t,i;return 429===(null===(t=e.$metadata)||void 0===t?void 0:t.httpStatusCode)||l.includes(e.name)||1==(null===(i=e.$retryable)||void 0===i?void 0:i.throttling)},u=i(16699),p=function(e,t){return Math.floor(Math.min(2e4,Math.random()*Math.pow(2,t)*e))},g=function(e){return!!e&&(function(e){return void 0!==e.$retryable}(e)||function(e){return a.includes(e.name)}(e)||d(e)||function(e){var t;return c.includes(e.name)||h.includes((null===(t=e.$metadata)||void 0===t?void 0:t.httpStatusCode)||0)}(e))},f=3,m=function(){function e(e,t){var i,n,s,r,o,a,l;this.maxAttemptsProvider=e,this.mode="standard",this.retryDecider=null!==(i=null==t?void 0:t.retryDecider)&&void 0!==i?i:g,this.delayDecider=null!==(n=null==t?void 0:t.delayDecider)&&void 0!==n?n:p,this.retryQuota=null!==(s=null==t?void 0:t.retryQuota)&&void 0!==s?s:(r=500,o=500,a=function(e){return"TimeoutError"===e.name?10:5},l=function(e){return a(e)<=o},Object.freeze({hasRetryTokens:l,retrieveRetryTokens:function(e){if(!l(e))throw new Error("No retry token available");var t=a(e);return o-=t,t},releaseRetryTokens:function(e){o+=null!=e?e:1,o=Math.min(o,r)}}))}return e.prototype.shouldRetry=function(e,t,i){return t<i&&this.retryDecider(e)&&this.retryQuota.hasRetryTokens(e)},e.prototype.getMaxAttempts=function(){return(0,n.__awaiter)(this,void 0,void 0,function(){var e;return(0,n.__generator)(this,function(t){switch(t.label){case 0:return t.trys.push([0,2,,3]),[4,this.maxAttemptsProvider()];case 1:return e=t.sent(),[3,3];case 2:return t.sent(),e=f,[3,3];case 3:return[2,e]}})})},e.prototype.retry=function(e,t){return(0,n.__awaiter)(this,void 0,void 0,function(){var i,s,r,a,l,c,h,p;return(0,n.__generator)(this,function(g){switch(g.label){case 0:return s=0,r=0,[4,this.getMaxAttempts()];case 1:a=g.sent(),l=t.request,o.Kd.isInstance(l)&&(l.headers["amz-sdk-invocation-id"]=(0,u.v4)()),c=function(){var c,u,p,g,f;return(0,n.__generator)(this,function(n){switch(n.label){case 0:return n.trys.push([0,2,,5]),o.Kd.isInstance(l)&&(l.headers["amz-sdk-request"]="attempt="+(s+1)+"; max="+a),[4,e(t)];case 1:return c=n.sent(),u=c.response,p=c.output,h.retryQuota.releaseRetryTokens(i),p.$metadata.attempts=s+1,p.$metadata.totalRetryDelay=r,[2,{value:{response:u,output:p}}];case 2:return g=n.sent(),s++,h.shouldRetry(g,s,a)?(i=h.retryQuota.retrieveRetryTokens(g),f=h.delayDecider(d(g)?500:100,s),r+=f,[4,new Promise(function(e){return setTimeout(e,f)})]):[3,4];case 3:return n.sent(),[2,"continue"];case 4:throw g.$metadata||(g.$metadata={}),g.$metadata.attempts=s,g.$metadata.totalRetryDelay=r,g;case 5:return[2]}})},h=this,g.label=2;case 2:return[5,c()];case 3:return"object"==typeof(p=g.sent())?[2,p.value]:[3,2];case 4:return[2]}})})},e}(),v=function(e){var t=y(e.maxAttempts);return(0,n.__assign)((0,n.__assign)({},e),{maxAttempts:t,retryStrategy:e.retryStrategy||new m(t)})},y=function(e){if(void 0===e&&(e=f),"number"==typeof e){var t=Promise.resolve(e);return function(){return t}}return e}},74052(e,t,i){"use strict";i.d(t,{TM:()=>o});var n=i(65927),s={name:"deserializerMiddleware",step:"deserialize",tags:["DESERIALIZER"],override:!0},r={name:"serializerMiddleware",step:"serialize",tags:["SERIALIZER"],override:!0};function o(e,t,i){return{applyToStack:function(o){o.add(function(e,t){return function(i,s){return function(s){return(0,n.__awaiter)(void 0,void 0,void 0,function(){var r,o;return(0,n.__generator)(this,function(n){switch(n.label){case 0:return[4,i(s)];case 1:return r=n.sent().response,[4,t(r,e)];case 2:return o=n.sent(),[2,{response:r,output:o}]}})})}}}(e,i),s),o.add(function(e,t){return function(i,s){return function(s){return(0,n.__awaiter)(void 0,void 0,void 0,function(){var r;return(0,n.__generator)(this,function(o){switch(o.label){case 0:return[4,t(s.input,e)];case 1:return r=o.sent(),[2,i((0,n.__assign)((0,n.__assign)({},s),{request:r}))]}})})}}}(e,t),r)}}}},88428(e,t,i){"use strict";i.d(t,{DF:()=>B,k9:()=>O});var n=i(65927),s=i(81504),r="X-Amz-Date",o="X-Amz-Signature",a="X-Amz-Security-Token",l="authorization",c=r.toLowerCase(),h=[l,c,"date"],d=o.toLowerCase(),u="x-amz-content-sha256",p=a.toLowerCase(),g={authorization:!0,"cache-control":!0,connection:!0,expect:!0,from:!0,"keep-alive":!0,"max-forwards":!0,pragma:!0,referer:!0,te:!0,trailer:!0,"transfer-encoding":!0,upgrade:!0,"user-agent":!0,"x-amzn-trace-id":!0},f=/^proxy-/,m=/^sec-/,v="AWS4-HMAC-SHA256",y="AWS4-HMAC-SHA256-PAYLOAD",C="aws4_request",b={},S=[];function w(e,t,i){return e+"/"+t+"/"+i+"/"+C}function x(e,t,i){var n=new e(t);return n.update(i),n.digest()}function E(e,t,i){var s,r,o=e.headers,a={};try{for(var l=(0,n.__values)(Object.keys(o).sort()),c=l.next();!c.done;c=l.next()){var h=c.value,d=h.toLowerCase();(d in g||(null==t?void 0:t.has(d))||f.test(d)||m.test(d))&&(!i||i&&!i.has(d))||(a[d]=o[h].trim().replace(/\s+/g," "))}}catch(e){s={error:e}}finally{try{c&&!c.done&&(r=l.return)&&r.call(l)}finally{if(s)throw s.error}}return a}var M=i(2726);function A(e,t){var i=e.headers,r=e.body;return(0,n.__awaiter)(this,void 0,void 0,function(){var e,o,a,l,c,h,d;return(0,n.__generator)(this,function(p){switch(p.label){case 0:try{for(e=(0,n.__values)(Object.keys(i)),o=e.next();!o.done;o=e.next())if((a=o.value).toLowerCase()===u)return[2,i[a]]}catch(e){h={error:e}}finally{try{o&&!o.done&&(d=e.return)&&d.call(e)}finally{if(h)throw h.error}}return null!=r?[3,1]:[2,"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855"];case 1:return"string"==typeof r||ArrayBuffer.isView(r)||(g=r,"function"==typeof ArrayBuffer&&g instanceof ArrayBuffer||"[object ArrayBuffer]"===Object.prototype.toString.call(g))?((l=new t).update(r),c=s.n,[4,l.digest()]):[3,3];case 2:return[2,c.apply(void 0,[p.sent()])];case 3:return[2,"UNSIGNED-PAYLOAD"]}var g})})}function T(e){var t=e.headers,i=e.query,s=(0,n.__rest)(e,["headers","query"]);return(0,n.__assign)((0,n.__assign)({},s),{headers:(0,n.__assign)({},t),query:i?D(i):void 0})}function D(e){return Object.keys(e).reduce(function(t,i){var s,r=e[i];return(0,n.__assign)((0,n.__assign)({},t),((s={})[i]=Array.isArray(r)?(0,n.__spread)(r):r,s))},{})}function I(e){var t,i;e="function"==typeof e.clone?e.clone():T(e);try{for(var s=(0,n.__values)(Object.keys(e.headers)),r=s.next();!r.done;r=s.next()){var o=r.value;h.indexOf(o.toLowerCase())>-1&&delete e.headers[o]}}catch(e){t={error:e}}finally{try{r&&!r.done&&(i=s.return)&&i.call(s)}finally{if(t)throw t.error}}return e}var R=function(){function e(e){var t=e.applyChecksum,i=e.credentials,n=e.region,s=e.service,r=e.sha256,o=e.uriEscapePath,a=void 0===o||o;this.service=s,this.sha256=r,this.uriEscapePath=a,this.applyChecksum="boolean"!=typeof t||t,this.regionProvider=P(n),this.credentialProvider=N(i)}return e.prototype.presign=function(e,t){return void 0===t&&(t={}),(0,n.__awaiter)(this,void 0,void 0,function(){var i,s,l,c,h,d,u,p,g,f,m,y,C,b,S,x,M,D,R,P,N,O,_,F;return(0,n.__generator)(this,function(G){switch(G.label){case 0:return i=t.signingDate,s=void 0===i?new Date:i,l=t.expiresIn,c=void 0===l?3600:l,h=t.unsignableHeaders,d=t.unhoistableHeaders,u=t.signableHeaders,p=t.signingRegion,g=t.signingService,[4,this.credentialProvider()];case 1:return f=G.sent(),null==p?[3,2]:(y=p,[3,4]);case 2:return[4,this.regionProvider()];case 3:y=G.sent(),G.label=4;case 4:return m=y,C=L(s),b=C.longDate,S=C.shortDate,c>604800?[2,Promise.reject("Signature version 4 presigned URLs must have an expiration date less than one week in the future")]:(x=w(S,m,null!=g?g:this.service),M=function(e,t){var i,s,r;void 0===t&&(t={});var o="function"==typeof e.clone?e.clone():T(e),a=o.headers,l=o.query,c=void 0===l?{}:l;try{for(var h=(0,n.__values)(Object.keys(a)),d=h.next();!d.done;d=h.next()){var u=d.value,p=u.toLowerCase();"x-amz-"!==p.substr(0,6)||(null===(r=t.unhoistableHeaders)||void 0===r?void 0:r.has(p))||(c[u]=a[u],delete a[u])}}catch(e){i={error:e}}finally{try{d&&!d.done&&(s=h.return)&&s.call(h)}finally{if(i)throw i.error}}return(0,n.__assign)((0,n.__assign)({},e),{headers:a,query:c})}(I(e),{unhoistableHeaders:d}),f.sessionToken&&(M.query[a]=f.sessionToken),M.query["X-Amz-Algorithm"]=v,M.query["X-Amz-Credential"]=f.accessKeyId+"/"+x,M.query[r]=b,M.query["X-Amz-Expires"]=c.toString(10),D=E(M,h,u),M.query["X-Amz-SignedHeaders"]=k(D),R=M.query,P=o,N=this.getSignature,O=[b,x,this.getSigningKey(f,m,S,g)],_=this.createCanonicalRequest,F=[M,D],[4,A(e,this.sha256)]);case 5:return[4,N.apply(this,O.concat([_.apply(this,F.concat([G.sent()]))]))];case 6:return R[P]=G.sent(),[2,M]}})})},e.prototype.sign=function(e,t){return(0,n.__awaiter)(this,void 0,void 0,function(){return(0,n.__generator)(this,function(i){return"string"==typeof e?[2,this.signString(e,t)]:e.headers&&e.payload?[2,this.signEvent(e,t)]:[2,this.signRequest(e,t)]})})},e.prototype.signEvent=function(e,t){var i=e.headers,r=e.payload,o=t.signingDate,a=void 0===o?new Date:o,l=t.priorSignature,c=t.signingRegion,h=t.signingService;return(0,n.__awaiter)(this,void 0,void 0,function(){var e,t,o,d,u,p,g,f,m,v,C;return(0,n.__generator)(this,function(n){switch(n.label){case 0:return null==c?[3,1]:(t=c,[3,3]);case 1:return[4,this.regionProvider()];case 2:t=n.sent(),n.label=3;case 3:return e=t,o=L(a),d=o.shortDate,u=o.longDate,p=w(d,e,null!=h?h:this.service),[4,A({headers:{},body:r},this.sha256)];case 4:return g=n.sent(),(f=new this.sha256).update(i),v=s.n,[4,f.digest()];case 5:return m=v.apply(void 0,[n.sent()]),C=[y,u,p,l,m,g].join("\n"),[2,this.signString(C,{signingDate:a,signingRegion:e,signingService:h})]}})})},e.prototype.signString=function(e,t){var i=void 0===t?{}:t,r=i.signingDate,o=void 0===r?new Date:r,a=i.signingRegion,l=i.signingService;return(0,n.__awaiter)(this,void 0,void 0,function(){var t,i,r,c,h,d,u,p;return(0,n.__generator)(this,function(n){switch(n.label){case 0:return[4,this.credentialProvider()];case 1:return t=n.sent(),null==a?[3,2]:(r=a,[3,4]);case 2:return[4,this.regionProvider()];case 3:r=n.sent(),n.label=4;case 4:return i=r,c=L(o).shortDate,u=(d=this.sha256).bind,[4,this.getSigningKey(t,i,c,l)];case 5:return(h=new(u.apply(d,[void 0,n.sent()]))).update(e),p=s.n,[4,h.digest()];case 6:return[2,p.apply(void 0,[n.sent()])]}})})},e.prototype.signRequest=function(e,t){var i=void 0===t?{}:t,s=i.signingDate,r=void 0===s?new Date:s,o=i.signableHeaders,a=i.unsignableHeaders,h=i.signingRegion,d=i.signingService;return(0,n.__awaiter)(this,void 0,void 0,function(){var t,i,s,g,f,m,y,C,b,S,x;return(0,n.__generator)(this,function(M){switch(M.label){case 0:return[4,this.credentialProvider()];case 1:return t=M.sent(),null==h?[3,2]:(s=h,[3,4]);case 2:return[4,this.regionProvider()];case 3:s=M.sent(),M.label=4;case 4:return i=s,g=I(e),f=L(r),m=f.longDate,y=f.shortDate,C=w(y,i,null!=d?d:this.service),g.headers[c]=m,t.sessionToken&&(g.headers[p]=t.sessionToken),[4,A(g,this.sha256)];case 5:return b=M.sent(),!function(e,t){var i,s;e=e.toLowerCase();try{for(var r=(0,n.__values)(Object.keys(t)),o=r.next();!o.done;o=r.next())if(e===o.value.toLowerCase())return!0}catch(e){i={error:e}}finally{try{o&&!o.done&&(s=r.return)&&s.call(r)}finally{if(i)throw i.error}}return!1}(u,g.headers)&&this.applyChecksum&&(g.headers[u]=b),S=E(g,a,o),[4,this.getSignature(m,C,this.getSigningKey(t,i,y,d),this.createCanonicalRequest(g,S,b))];case 6:return x=M.sent(),g.headers[l]=v+" Credential="+t.accessKeyId+"/"+C+", SignedHeaders="+k(S)+", Signature="+x,[2,g]}})})},e.prototype.createCanonicalRequest=function(e,t,i){var s=Object.keys(t).sort();return e.method+"\n"+this.getCanonicalPath(e)+"\n"+function(e){var t,i,s=e.query,r=void 0===s?{}:s,o=[],a={},l=function(e){if(e.toLowerCase()===d)return"continue";o.push(e);var t=r[e];"string"==typeof t?a[e]=(0,M.o)(e)+"="+(0,M.o)(t):Array.isArray(t)&&(a[e]=t.slice(0).sort().reduce(function(t,i){return t.concat([(0,M.o)(e)+"="+(0,M.o)(i)])},[]).join("&"))};try{for(var c=(0,n.__values)(Object.keys(r).sort()),h=c.next();!h.done;h=c.next())l(h.value)}catch(e){t={error:e}}finally{try{h&&!h.done&&(i=c.return)&&i.call(c)}finally{if(t)throw t.error}}return o.map(function(e){return a[e]}).filter(function(e){return e}).join("&")}(e)+"\n"+s.map(function(e){return e+":"+t[e]}).join("\n")+"\n\n"+s.join(";")+"\n"+i},e.prototype.createStringToSign=function(e,t,i){return(0,n.__awaiter)(this,void 0,void 0,function(){var r,o;return(0,n.__generator)(this,function(n){switch(n.label){case 0:return(r=new this.sha256).update(i),[4,r.digest()];case 1:return o=n.sent(),[2,v+"\n"+e+"\n"+t+"\n"+(0,s.n)(o)]}})})},e.prototype.getCanonicalPath=function(e){var t=e.path;return this.uriEscapePath?"/"+encodeURIComponent(t.replace(/^\//,"")).replace(/%2F/g,"/"):t},e.prototype.getSignature=function(e,t,i,r){return(0,n.__awaiter)(this,void 0,void 0,function(){var o,a,l,c,h;return(0,n.__generator)(this,function(n){switch(n.label){case 0:return[4,this.createStringToSign(e,t,r)];case 1:return o=n.sent(),c=(l=this.sha256).bind,[4,i];case 2:return(a=new(c.apply(l,[void 0,n.sent()]))).update(o),h=s.n,[4,a.digest()];case 3:return[2,h.apply(void 0,[n.sent()])]}})})},e.prototype.getSigningKey=function(e,t,i,r){return function(e,t,i,r,o){return(0,n.__awaiter)(void 0,void 0,void 0,function(){var a,l,c,h,d,u,p,g,f;return(0,n.__generator)(this,function(m){switch(m.label){case 0:return[4,x(e,t.secretAccessKey,t.accessKeyId)];case 1:if(a=m.sent(),(l=i+":"+r+":"+o+":"+(0,s.n)(a)+":"+t.sessionToken)in b)return[2,b[l]];for(S.push(l);S.length>50;)delete b[S.shift()];c="AWS4"+t.secretAccessKey,m.label=2;case 2:m.trys.push([2,7,8,9]),h=(0,n.__values)([i,r,o,C]),d=h.next(),m.label=3;case 3:return d.done?[3,6]:(u=d.value,[4,x(e,c,u)]);case 4:c=m.sent(),m.label=5;case 5:return d=h.next(),[3,3];case 6:return[3,9];case 7:return p=m.sent(),g={error:p},[3,9];case 8:try{d&&!d.done&&(f=h.return)&&f.call(h)}finally{if(g)throw g.error}return[7];case 9:return[2,b[l]=c]}})})}(this.sha256,e,i,t,r||this.service)},e}(),L=function(e){var t,i=(t=e,function(e){return"number"==typeof e?new Date(1e3*e):"string"==typeof e?Number(e)?new Date(1e3*Number(e)):new Date(e):e}(t).toISOString().replace(/\.\d{3}Z$/,"Z")).replace(/[\-:]/g,"");return{longDate:i,shortDate:i.substr(0,8)}},k=function(e){return Object.keys(e).sort().join(";")},P=function(e){if("string"==typeof e){var t=Promise.resolve(e);return function(){return t}}return e},N=function(e){if("object"==typeof e){var t=Promise.resolve(e);return function(){return t}}return e};function O(e){var t,i=this,s=_(e.credentials||e.credentialDefaultProvider(e)),r=e.signingEscapePath,o=void 0===r||r,a=e.systemClockOffset,l=void 0===a?e.systemClockOffset||0:a,c=e.sha256;return t=e.signer?_(e.signer):function(){return _(e.region)().then(function(t){return(0,n.__awaiter)(i,void 0,void 0,function(){return(0,n.__generator)(this,function(i){switch(i.label){case 0:return[4,e.regionInfoProvider(t)];case 1:return[2,[i.sent()||{},t]]}})})}).then(function(t){var i=(0,n.__read)(t,2),r=i[0],a=i[1],l=r.signingRegion,h=r.signingService;return e.signingRegion=e.signingRegion||l||a,e.signingName=e.signingName||h||e.serviceId,new R({credentials:s,region:e.signingRegion,service:e.signingName,sha256:c,uriEscapePath:o})})},(0,n.__assign)((0,n.__assign)({},e),{systemClockOffset:l,signingEscapePath:o,credentials:s,signer:t})}function _(e){if("object"==typeof e){var t=Promise.resolve(e);return function(){return t}}return e}var F=i(59027);function G(e){return function(t,i){return function(s){return(0,n.__awaiter)(this,void 0,void 0,function(){var r,o,a,l,c,h,d,u,p;return(0,n.__generator)(this,function(g){switch(g.label){case 0:return F.Kd.isInstance(s.request)?"function"!=typeof e.signer?[3,2]:[4,e.signer()]:[2,t(s)];case 1:return o=g.sent(),[3,3];case 2:o=e.signer,g.label=3;case 3:return r=o,l=t,c=[(0,n.__assign)({},s)],p={},[4,r.sign(s.request,{signingDate:new Date(Date.now()+e.systemClockOffset),signingRegion:i.signing_region,signingService:i.signing_service})];case 4:return[4,l.apply(void 0,[n.__assign.apply(void 0,c.concat([(p.request=g.sent(),p)]))])];case 5:return a=g.sent(),h=a.response.headers,(d=h&&(h.date||h.Date))&&(f=u=Date.parse(d),m=e.systemClockOffset,Math.abs(function(e){return new Date(Date.now()+e)}(m).getTime()-f)>=3e5&&(e.systemClockOffset=u-Date.now())),[2,a]}var f,m})})}}}var V={name:"awsAuthMiddleware",tags:["SIGNATURE","AWSAUTH"],relation:"after",toMiddleware:"retryMiddleware",override:!0},B=function(e){return{applyToStack:function(t){t.addRelativeTo(G(e),V)}}}},44625(e,t,i){"use strict";i.d(t,{sM:()=>h,Dc:()=>s});var n=i(65927);function s(e){return(0,n.__assign)((0,n.__assign)({},e),{customUserAgent:"string"==typeof e.customUserAgent?[[e.customUserAgent]]:e.customUserAgent})}var r=i(59027),o="user-agent",a=/[^\!\#\$\%\&\'\*\+\-\.\^\_\`\|\~\d\w]/g,l=function(e){var t=(0,n.__read)(e,2),i=t[0],s=t[1],r=i.indexOf("/"),o=i.substring(0,r),l=i.substring(r+1);return"api"===o&&(l=l.toLowerCase()),[o,l,s].filter(function(e){return e&&e.length>0}).map(function(e){return null==e?void 0:e.replace(a,"_")}).join("/")},c={name:"getUserAgentMiddleware",step:"build",priority:"low",tags:["SET_USER_AGENT","USER_AGENT"],override:!0},h=function(e){return{applyToStack:function(t){var i;t.add((i=e,function(e,t){return function(s){return(0,n.__awaiter)(void 0,void 0,void 0,function(){var a,c,h,d,u,p,g,f;return(0,n.__generator)(this,function(m){switch(m.label){case 0:return a=s.request,r.Kd.isInstance(a)?(c=a.headers,h=(null===(g=null==t?void 0:t.userAgent)||void 0===g?void 0:g.map(l))||[],[4,i.defaultUserAgentProvider()]):[2,e(s)];case 1:return d=m.sent().map(l),u=(null===(f=null==i?void 0:i.customUserAgent)||void 0===f?void 0:f.map(l))||[],c["x-amz-user-agent"]=(0,n.__spread)(d,h,u).join(" "),p=(0,n.__spread)(d.filter(function(e){return e.startsWith("aws-sdk-")}),u).join(" "),"browser"!==i.runtime&&p&&(c[o]=c[o]?c[o]+" "+p:p),[2,e((0,n.__assign)((0,n.__assign)({},s),{request:a}))]}})})}}),c)}}}},59027(e,t,i){"use strict";i.d(t,{Kd:()=>r,cS:()=>n});var n=function(){function e(e){this.statusCode=e.statusCode,this.headers=e.headers||{},this.body=e.body}return e.isInstance=function(e){if(!e)return!1;var t=e;return"number"==typeof t.statusCode&&"object"==typeof t.headers},e}(),s=i(65927),r=function(){function e(e){this.method=e.method||"GET",this.hostname=e.hostname||"localhost",this.port=e.port,this.query=e.query||{},this.headers=e.headers||{},this.body=e.body,this.protocol=e.protocol?":"!==e.protocol.substr(-1)?e.protocol+":":e.protocol:"https:",this.path=e.path?"/"!==e.path.charAt(0)?"/"+e.path:e.path:"/"}return e.isInstance=function(e){if(!e)return!1;var t=e;return"method"in t&&"protocol"in t&&"hostname"in t&&"path"in t&&"object"==typeof t.query&&"object"==typeof t.headers},e.prototype.clone=function(){var t,i=new e((0,s.__assign)((0,s.__assign)({},this),{headers:(0,s.__assign)({},this.headers)}));return i.query&&(i.query=(t=i.query,Object.keys(t).reduce(function(e,i){var n,r=t[i];return(0,s.__assign)((0,s.__assign)({},e),((n={})[i]=Array.isArray(r)?(0,s.__spread)(r):r,n))},{}))),i},e}()},11538(e,t,i){"use strict";i.d(t,{Kj:()=>a,uB:()=>l,$6:()=>c});var n=i(65927),s=function(){var e=[],t=[],i=new Set,a=function(i){return e.forEach(function(e){i.add(e.middleware,(0,n.__assign)({},e))}),t.forEach(function(e){i.addRelativeTo(e.middleware,(0,n.__assign)({},e))}),i},l=function(e){var t=[];return e.before.forEach(function(e){0===e.before.length&&0===e.after.length?t.push(e):t.push.apply(t,(0,n.__spread)(l(e)))}),t.push(e),e.after.reverse().forEach(function(e){0===e.before.length&&0===e.after.length?t.push(e):t.push.apply(t,(0,n.__spread)(l(e)))}),t},c={add:function(t,s){void 0===s&&(s={});var r=s.name,o=s.override,a=(0,n.__assign)({step:"initialize",priority:"normal",middleware:t},s);if(r){if(i.has(r)){if(!o)throw new Error("Duplicate middleware name '"+r+"'");var l=e.findIndex(function(e){return e.name===r}),c=e[l];if(c.step!==a.step||c.priority!==a.priority)throw new Error('"'+r+'" middleware with '+c.priority+" priority in "+c.step+" step cannot be overridden by same-name middleware with "+a.priority+" priority in "+a.step+" step.");e.splice(l,1)}i.add(r)}e.push(a)},addRelativeTo:function(e,s){var r=s.name,o=s.override,a=(0,n.__assign)({middleware:e},s);if(r){if(i.has(r)){if(!o)throw new Error("Duplicate middleware name '"+r+"'");var l=t.findIndex(function(e){return e.name===r}),c=t[l];if(c.toMiddleware!==a.toMiddleware||c.relation!==a.relation)throw new Error('"'+r+'" middleware '+c.relation+' "'+c.toMiddleware+'" middleware cannot be overridden by same-name middleware '+a.relation+' "'+a.toMiddleware+'" middleware.');t.splice(l,1)}i.add(r)}t.push(a)},clone:function(){return a(s())},use:function(e){e.applyToStack(c)},remove:function(n){return"string"==typeof n?function(n){var s=!1,r=function(e){return!e.name||e.name!==n||(s=!0,i.delete(n),!1)};return e=e.filter(r),t=t.filter(r),s}(n):function(n){var s=!1,r=function(e){return e.middleware!==n||(s=!0,e.name&&i.delete(e.name),!1)};return e=e.filter(r),t=t.filter(r),s}(n)},removeByTag:function(n){var s=!1,r=function(e){var t=e.tags,r=e.name;return!t||!t.includes(n)||(r&&i.delete(r),s=!0,!1)};return e=e.filter(r),t=t.filter(r),s},concat:function(e){var t=a(s());return t.use(e),t},applyToStack:a,resolve:function(i,s){var a,c;try{for(var h=(0,n.__values)(function(){var i,s=[],a=[],c={};return e.forEach(function(e){var t=(0,n.__assign)((0,n.__assign)({},e),{before:[],after:[]});t.name&&(c[t.name]=t),s.push(t)}),t.forEach(function(e){var t=(0,n.__assign)((0,n.__assign)({},e),{before:[],after:[]});t.name&&(c[t.name]=t),a.push(t)}),a.forEach(function(e){if(e.toMiddleware){var t=c[e.toMiddleware];if(void 0===t)throw new Error(e.toMiddleware+" is not found when adding "+(e.name||"anonymous")+" middleware "+e.relation+" "+e.toMiddleware);"after"===e.relation&&t.after.push(e),"before"===e.relation&&t.before.push(e)}}),(i=s,i.sort(function(e,t){return r[t.step]-r[e.step]||o[t.priority||"normal"]-o[e.priority||"normal"]})).map(l).reduce(function(e,t){return e.push.apply(e,(0,n.__spread)(t)),e},[]).map(function(e){return e.middleware})}().reverse()),d=h.next();!d.done;d=h.next())i=(0,d.value)(i,s)}catch(e){a={error:e}}finally{try{d&&!d.done&&(c=h.return)&&c.call(h)}finally{if(a)throw a.error}}return i}};return c},r={initialize:5,serialize:4,build:3,finalizeRequest:2,deserialize:1},o={high:3,normal:2,low:1},a=function(){function e(e){this.middlewareStack=s(),this.config=e}return e.prototype.send=function(e,t,i){var n="function"!=typeof t?t:void 0,s="function"==typeof t?t:i,r=e.resolveMiddleware(this.middlewareStack,this.config,n);if(!s)return r(e).then(function(e){return e.output});r(e).then(function(e){return s(null,e.output)},function(e){return s(e)}).catch(function(){})},e.prototype.destroy=function(){this.config.requestHandler.destroy&&this.config.requestHandler.destroy()},e}(),l=function(){this.middlewareStack=s()};function c(e){return encodeURIComponent(e).replace(/[!'()*]/g,function(e){return"%"+e.charCodeAt(0).toString(16)})}var h=function(){var e=Object.getPrototypeOf(this).constructor,t=new(Function.bind.apply(String,(0,n.__spread)([null],arguments)));return Object.setPrototypeOf(t,e.prototype),t};h.prototype=Object.create(String.prototype,{constructor:{value:h,enumerable:!1,writable:!0,configurable:!0}}),Object.setPrototypeOf(h,String),function(e){function t(){return null!==e&&e.apply(this,arguments)||this}(0,n.__extends)(t,e),t.prototype.deserializeJSON=function(){return JSON.parse(e.prototype.toString.call(this))},t.prototype.toJSON=function(){return e.prototype.toString.call(this)},t.fromObject=function(e){return e instanceof t?e:new t(e instanceof String||"string"==typeof e?e:JSON.stringify(e))}}(h)},2049(e,t,i){"use strict";i.d(t,{D:()=>s});var n=i(65927),s=function(e){var t,i=new URL(e),s=i.hostname,r=i.pathname,o=i.port,a=i.protocol,l=i.search;return l&&(t=function(e){var t,i,s={};if(e=e.replace(/^\?/,""))try{for(var r=(0,n.__values)(e.split("&")),o=r.next();!o.done;o=r.next()){var a=o.value,l=(0,n.__read)(a.split("="),2),c=l[0],h=l[1],d=void 0===h?null:h;c=decodeURIComponent(c),d&&(d=decodeURIComponent(d)),c in s?Array.isArray(s[c])?s[c].push(d):s[c]=[s[c],d]:s[c]=d}}catch(e){t={error:e}}finally{try{o&&!o.done&&(i=r.return)&&i.call(r)}finally{if(t)throw t.error}}return s}(l)),{hostname:s,port:o?parseInt(o):void 0,protocol:a,path:r,query:t}}},68380(e,t,i){"use strict";i.d(t,{E:()=>h,n:()=>d});for(var n={},s=new Array(64),r=0,o="A".charCodeAt(0),a="Z".charCodeAt(0);r+o<=a;r++){var l=String.fromCharCode(r+o);n[l]=r,s[r]=l}for(r=0,o="a".charCodeAt(0),a="z".charCodeAt(0);r+o<=a;r++){l=String.fromCharCode(r+o);var c=r+26;n[l]=c,s[c]=l}for(r=0;r<10;r++)n[r.toString(10)]=r+52,l=r.toString(10),c=r+52,n[l]=c,s[c]=l;function h(e){var t=e.length/4*3;"=="===e.substr(-2)?t-=2:"="===e.substr(-1)&&t--;for(var i=new ArrayBuffer(t),s=new DataView(i),r=0;r<e.length;r+=4){for(var o=0,a=0,l=r,c=r+3;l<=c;l++)"="!==e[l]?(o|=n[e[l]]<<6*(c-l),a+=6):o>>=6;var h=r/4*3;o>>=a%8;for(var d=Math.floor(a/8),u=0;u<d;u++){var p=8*(d-u-1);s.setUint8(h+u,(o&255<<p)>>p)}}return new Uint8Array(i)}function d(e){for(var t="",i=0;i<e.length;i+=3){for(var n=0,r=0,o=i,a=Math.min(i+3,e.length);o<a;o++)n|=e[o]<<8*(a-o-1),r+=8;var l=Math.ceil(r/6);n<<=6*l-r;for(var c=1;c<=l;c++){var h=6*(l-c);t+=s[(n&63<<h)>>h]}t+="==".slice(0,4-l)}return t}n["+"]=62,s[62]="+",n["/"]=63,s[63]="/"},93972(e,t,i){"use strict";function n(e){if("string"==typeof e){for(var t=e.length,i=t-1;i>=0;i--){var n=e.charCodeAt(i);n>127&&n<=2047?t++:n>2047&&n<=65535&&(t+=2)}return t}return"number"==typeof e.byteLength?e.byteLength:"number"==typeof e.size?e.size:void 0}i.d(t,{n:()=>n})},93065(e,t,i){"use strict";i.d(t,{n:()=>n.n});var n=i(67520)},81504(e,t,i){"use strict";i.d(t,{n:()=>a});for(var n={},s={},r=0;r<256;r++){var o=r.toString(16).toLowerCase();1===o.length&&(o="0"+o),n[r]=o,s[o]=r}function a(e){for(var t="",i=0;i<e.byteLength;i++)t+=n[e[i]];return t}},32225(e,t,i){"use strict";i.r(t),i.d(t,{locateWindow:()=>s});const n={};function s(){return"undefined"!=typeof window?window:"undefined"!=typeof self?self:n}},2726(e,t,i){"use strict";i.d(t,{o:()=>n});var n=function(e){return encodeURIComponent(e).replace(/[!'()*]/g,s)},s=function(e){return"%"+e.charCodeAt(0).toString(16).toUpperCase()}},39448(e,t,i){"use strict";i.d(t,{m:()=>o});var n=i(65927),s=i(36621),r=i.n(s),o=function(e){var t=e.serviceId,i=e.clientVersion;return function(){return(0,n.__awaiter)(void 0,void 0,void 0,function(){var e,s,o,a,l,c,h,d,u;return(0,n.__generator)(this,function(n){return e=(null===(o=null===window||void 0===window?void 0:window.navigator)||void 0===o?void 0:o.userAgent)?r().parse(window.navigator.userAgent):void 0,s=[["aws-sdk-js",i],["os/"+((null===(a=null==e?void 0:e.os)||void 0===a?void 0:a.name)||"other"),null===(l=null==e?void 0:e.os)||void 0===l?void 0:l.version],["lang/js"],["md/browser",(null!==(h=null===(c=null==e?void 0:e.browser)||void 0===c?void 0:c.name)&&void 0!==h?h:"unknown")+"_"+(null!==(u=null===(d=null==e?void 0:e.browser)||void 0===d?void 0:d.version)&&void 0!==u?u:"unknown")]],t&&s.push(["api/"+t,i]),[2,s]})})}}},94518(e,t,i){"use strict";i.r(t),i.d(t,{fromUtf8:()=>n,toUtf8:()=>s});var n=function(e){return"function"==typeof TextEncoder?function(e){return(new TextEncoder).encode(e)}(e):function(e){for(var t=[],i=0,n=e.length;i<n;i++){var s=e.charCodeAt(i);if(s<128)t.push(s);else if(s<2048)t.push(s>>6|192,63&s|128);else if(i+1<e.length&&55296==(64512&s)&&56320==(64512&e.charCodeAt(i+1))){var r=65536+((1023&s)<<10)+(1023&e.charCodeAt(++i));t.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}else t.push(s>>12|224,s>>6&63|128,63&s|128)}return Uint8Array.from(t)}(e)},s=function(e){return"function"==typeof TextDecoder?function(e){return new TextDecoder("utf-8").decode(e)}(e):function(e){for(var t="",i=0,n=e.length;i<n;i++){var s=e[i];if(s<128)t+=String.fromCharCode(s);else if(192<=s&&s<224){var r=e[++i];t+=String.fromCharCode((31&s)<<6|63&r)}else if(240<=s&&s<365){var o="%"+[s,e[++i],e[++i],e[++i]].map(function(e){return e.toString(16)}).join("%");t+=decodeURIComponent(o)}else t+=String.fromCharCode((15&s)<<12|(63&e[++i])<<6|63&e[++i])}return t}(e)}},91486(e,t,i){"use strict";i.r(t),i.d(t,{fromUtf8:()=>n,toUtf8:()=>s});const n=e=>"function"==typeof TextEncoder?function(e){return(new TextEncoder).encode(e)}(e):(e=>{const t=[];for(let i=0,n=e.length;i<n;i++){const n=e.charCodeAt(i);if(n<128)t.push(n);else if(n<2048)t.push(n>>6|192,63&n|128);else if(i+1<e.length&&55296==(64512&n)&&56320==(64512&e.charCodeAt(i+1))){const s=65536+((1023&n)<<10)+(1023&e.charCodeAt(++i));t.push(s>>18|240,s>>12&63|128,s>>6&63|128,63&s|128)}else t.push(n>>12|224,n>>6&63|128,63&n|128)}return Uint8Array.from(t)})(e),s=e=>"function"==typeof TextDecoder?function(e){return new TextDecoder("utf-8").decode(e)}(e):(e=>{let t="";for(let i=0,n=e.length;i<n;i++){const n=e[i];if(n<128)t+=String.fromCharCode(n);else if(192<=n&&n<224){const s=e[++i];t+=String.fromCharCode((31&n)<<6|63&s)}else if(240<=n&&n<365){const s="%"+[n,e[++i],e[++i],e[++i]].map(e=>e.toString(16)).join("%");t+=decodeURIComponent(s)}else t+=String.fromCharCode((15&n)<<12|(63&e[++i])<<6|63&e[++i])}return t})(e)},31643(e,t,i){"use strict";i.r(t),i.d(t,{fromUtf8:()=>n,toUtf8:()=>s});var n=function(e){return"function"==typeof TextEncoder?function(e){return(new TextEncoder).encode(e)}(e):function(e){for(var t=[],i=0,n=e.length;i<n;i++){var s=e.charCodeAt(i);if(s<128)t.push(s);else if(s<2048)t.push(s>>6|192,63&s|128);else if(i+1<e.length&&55296==(64512&s)&&56320==(64512&e.charCodeAt(i+1))){var r=65536+((1023&s)<<10)+(1023&e.charCodeAt(++i));t.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}else t.push(s>>12|224,s>>6&63|128,63&s|128)}return Uint8Array.from(t)}(e)},s=function(e){return"function"==typeof TextDecoder?function(e){return new TextDecoder("utf-8").decode(e)}(e):function(e){for(var t="",i=0,n=e.length;i<n;i++){var s=e[i];if(s<128)t+=String.fromCharCode(s);else if(192<=s&&s<224){var r=e[++i];t+=String.fromCharCode((31&s)<<6|63&r)}else if(240<=s&&s<365){var o="%"+[s,e[++i],e[++i],e[++i]].map(function(e){return e.toString(16)}).join("%");t+=decodeURIComponent(o)}else t+=String.fromCharCode((15&s)<<12|(63&e[++i])<<6|63&e[++i])}return t}(e)}},70381(e,t,i){e.exports={graphlib:i(55166),layout:i(79623),debug:i(10698),util:{time:i(82469).time,notime:i(82469).notime},version:i(69741)}},85933(e,t,i){"use strict";let n=i(72046),s=i(82469).uniqueId;e.exports={run:function(e){("greedy"===e.graph().acyclicer?n(e,function(e){return t=>e.edge(t).weight}(e)):function(e){let t=[],i={},n={};return e.nodes().forEach(function s(r){Object.hasOwn(n,r)||(n[r]=!0,i[r]=!0,e.outEdges(r).forEach(e=>{Object.hasOwn(i,e.w)?t.push(e):s(e.w)}),delete i[r])}),t}(e)).forEach(t=>{let i=e.edge(t);e.removeEdge(t),i.forwardName=t.name,i.reversed=!0,e.setEdge(t.w,t.v,i,s("rev"))})},undo:function(e){e.edges().forEach(t=>{let i=e.edge(t);if(i.reversed){e.removeEdge(t);let n=i.forwardName;delete i.reversed,delete i.forwardName,e.setEdge(t.w,t.v,i,n)}})}}},8328(e,t,i){let n=i(82469);function s(e,t,i,s,r,o){let a={width:0,height:0,rank:o,borderType:t},l=r[t][o-1],c=n.addDummyNode(e,"border",a,i);r[t][o]=c,e.setParent(c,s),l&&e.setEdge(l,c,{weight:1})}e.exports=function(e){e.children().forEach(function t(i){let n=e.children(i),r=e.node(i);if(n.length&&n.forEach(t),Object.hasOwn(r,"minRank")){r.borderLeft=[],r.borderRight=[];for(let t=r.minRank,n=r.maxRank+1;t<n;++t)s(e,"borderLeft","_bl",i,r,t),s(e,"borderRight","_br",i,r,t)}})}},29481(e){"use strict";function t(e){e.nodes().forEach(t=>i(e.node(t))),e.edges().forEach(t=>i(e.edge(t)))}function i(e){let t=e.width;e.width=e.height,e.height=t}function n(e){e.y=-e.y}function s(e){let t=e.x;e.x=e.y,e.y=t}e.exports={adjust:function(e){let i=e.graph().rankdir.toLowerCase();"lr"!==i&&"rl"!==i||t(e)},undo:function(e){let i=e.graph().rankdir.toLowerCase();"bt"!==i&&"rl"!==i||function(e){e.nodes().forEach(t=>n(e.node(t))),e.edges().forEach(t=>{let i=e.edge(t);i.points.forEach(n),Object.hasOwn(i,"y")&&n(i)})}(e),"lr"!==i&&"rl"!==i||(function(e){e.nodes().forEach(t=>s(e.node(t))),e.edges().forEach(t=>{let i=e.edge(t);i.points.forEach(s),Object.hasOwn(i,"x")&&s(i)})}(e),t(e))}}},78976(e){function t(e){e._prev._next=e._next,e._next._prev=e._prev,delete e._next,delete e._prev}function i(e,t){if("_next"!==e&&"_prev"!==e)return t}e.exports=class{constructor(){let e={};e._next=e._prev=e,this._sentinel=e}dequeue(){let e=this._sentinel,i=e._prev;if(i!==e)return t(i),i}enqueue(e){let i=this._sentinel;e._prev&&e._next&&t(e),e._next=i._next,i._next._prev=e,i._next=e,e._prev=i}toString(){let e=[],t=this._sentinel,n=t._prev;for(;n!==t;)e.push(JSON.stringify(n,i)),n=n._prev;return"["+e.join(", ")+"]"}}},10698(e,t,i){let n=i(82469),s=i(55166).Graph;e.exports={debugOrdering:function(e){let t=n.buildLayerMatrix(e),i=new s({compound:!0,multigraph:!0}).setGraph({});return e.nodes().forEach(t=>{i.setNode(t,{label:t}),i.setParent(t,"layer"+e.node(t).rank)}),e.edges().forEach(e=>i.setEdge(e.v,e.w,{},e.name)),t.forEach((e,t)=>{let n="layer"+t;i.setNode(n,{rank:"same"}),e.reduce((e,t)=>(i.setEdge(e,t,{style:"invis"}),t))}),i}}},72046(e,t,i){let n=i(55166).Graph,s=i(78976);e.exports=function(e,t){if(e.nodeCount()<=1)return[];let i=function(e,t){let i=new n,r=0,o=0;e.nodes().forEach(e=>{i.setNode(e,{v:e,in:0,out:0})}),e.edges().forEach(e=>{let n=i.edge(e.v,e.w)||0,s=t(e),a=n+s;i.setEdge(e.v,e.w,a),o=Math.max(o,i.node(e.v).out+=s),r=Math.max(r,i.node(e.w).in+=s)});let l=function(e){const t=[];for(let i=0;i<e;i++)t.push(i);return t}(o+r+3).map(()=>new s),c=r+1;return i.nodes().forEach(e=>{a(l,c,i.node(e))}),{graph:i,buckets:l,zeroIdx:c}}(e,t||r);return function(e,t,i){let n,s=[],r=t[t.length-1],a=t[0];for(;e.nodeCount();){for(;n=a.dequeue();)o(e,t,i,n);for(;n=r.dequeue();)o(e,t,i,n);if(e.nodeCount())for(let r=t.length-2;r>0;--r)if(n=t[r].dequeue(),n){s=s.concat(o(e,t,i,n,!0));break}}return s}(i.graph,i.buckets,i.zeroIdx).flatMap(t=>e.outEdges(t.v,t.w))};let r=()=>1;function o(e,t,i,n,s){let r=s?[]:void 0;return e.inEdges(n.v).forEach(n=>{let o=e.edge(n),l=e.node(n.v);s&&r.push({v:n.v,w:n.w}),l.out-=o,a(t,i,l)}),e.outEdges(n.v).forEach(n=>{let s=e.edge(n),r=n.w,o=e.node(r);o.in-=s,a(t,i,o)}),e.removeNode(n.v),r}function a(e,t,i){i.out?i.in?e[i.out-i.in+t].enqueue(i):e[e.length-1].enqueue(i):e[0].enqueue(i)}},79623(e,t,i){"use strict";let n=i(85933),s=i(77798),r=i(83816),o=i(82469).normalizeRanks,a=i(77999),l=i(82469).removeEmptyRanks,c=i(32254),h=i(8328),d=i(29481),u=i(5354),p=i(7489),g=i(82469),f=i(55166).Graph;e.exports=function(e,t){let i=t&&t.debugTiming?g.time:g.notime;i("layout",()=>{let A=i("  buildLayoutGraph",()=>function(e){let t=new f({multigraph:!0,compound:!0}),i=M(e.graph());return t.setGraph(Object.assign({},v,E(i,m),g.pick(i,y))),e.nodes().forEach(i=>{const n=E(M(e.node(i)),C);Object.keys(b).forEach(e=>{void 0===n[e]&&(n[e]=b[e])}),t.setNode(i,n),t.setParent(i,e.parent(i))}),e.edges().forEach(i=>{let n=M(e.edge(i));t.setEdge(i,Object.assign({},w,E(n,S),g.pick(n,x)))}),t}(e));i("  runLayout",()=>function(e,t,i){t("    makeSpaceForEdgeLabels",()=>function(e){let t=e.graph();t.ranksep/=2,e.edges().forEach(i=>{let n=e.edge(i);n.minlen*=2,"c"!==n.labelpos.toLowerCase()&&("TB"===t.rankdir||"BT"===t.rankdir?n.width+=n.labeloffset:n.height+=n.labeloffset)})}(e)),t("    removeSelfEdges",()=>function(e){e.edges().forEach(t=>{if(t.v===t.w){var i=e.node(t.v);i.selfEdges||(i.selfEdges=[]),i.selfEdges.push({e:t,label:e.edge(t)}),e.removeEdge(t)}})}(e)),t("    acyclic",()=>n.run(e)),t("    nestingGraph.run",()=>c.run(e)),t("    rank",()=>r(g.asNonCompoundGraph(e))),t("    injectEdgeLabelProxies",()=>function(e){e.edges().forEach(t=>{let i=e.edge(t);if(i.width&&i.height){let i=e.node(t.v),n={rank:(e.node(t.w).rank-i.rank)/2+i.rank,e:t};g.addDummyNode(e,"edge-proxy",n,"_ep")}})}(e)),t("    removeEmptyRanks",()=>l(e)),t("    nestingGraph.cleanup",()=>c.cleanup(e)),t("    normalizeRanks",()=>o(e)),t("    assignRankMinMax",()=>function(e){let t=0;e.nodes().forEach(i=>{let n=e.node(i);n.borderTop&&(n.minRank=e.node(n.borderTop).rank,n.maxRank=e.node(n.borderBottom).rank,t=Math.max(t,n.maxRank))}),e.graph().maxRank=t}(e)),t("    removeEdgeLabelProxies",()=>function(e){e.nodes().forEach(t=>{let i=e.node(t);"edge-proxy"===i.dummy&&(e.edge(i.e).labelRank=i.rank,e.removeNode(t))})}(e)),t("    normalize.run",()=>s.run(e)),t("    parentDummyChains",()=>a(e)),t("    addBorderSegments",()=>h(e)),t("    order",()=>u(e,i)),t("    insertSelfEdges",()=>function(e){g.buildLayerMatrix(e).forEach(t=>{var i=0;t.forEach((t,n)=>{var s=e.node(t);s.order=n+i,(s.selfEdges||[]).forEach(t=>{g.addDummyNode(e,"selfedge",{width:t.label.width,height:t.label.height,rank:s.rank,order:n+ ++i,e:t.e,label:t.label},"_se")}),delete s.selfEdges})})}(e)),t("    adjustCoordinateSystem",()=>d.adjust(e)),t("    position",()=>p(e)),t("    positionSelfEdges",()=>function(e){e.nodes().forEach(t=>{var i=e.node(t);if("selfedge"===i.dummy){var n=e.node(i.e.v),s=n.x+n.width/2,r=n.y,o=i.x-s,a=n.height/2;e.setEdge(i.e,i.label),e.removeNode(t),i.label.points=[{x:s+2*o/3,y:r-a},{x:s+5*o/6,y:r-a},{x:s+o,y:r},{x:s+5*o/6,y:r+a},{x:s+2*o/3,y:r+a}],i.label.x=i.x,i.label.y=i.y}})}(e)),t("    removeBorderNodes",()=>function(e){e.nodes().forEach(t=>{if(e.children(t).length){let i=e.node(t),n=e.node(i.borderTop),s=e.node(i.borderBottom),r=e.node(i.borderLeft[i.borderLeft.length-1]),o=e.node(i.borderRight[i.borderRight.length-1]);i.width=Math.abs(o.x-r.x),i.height=Math.abs(s.y-n.y),i.x=r.x+i.width/2,i.y=n.y+i.height/2}}),e.nodes().forEach(t=>{"border"===e.node(t).dummy&&e.removeNode(t)})}(e)),t("    normalize.undo",()=>s.undo(e)),t("    fixupEdgeLabelCoords",()=>function(e){e.edges().forEach(t=>{let i=e.edge(t);if(Object.hasOwn(i,"x"))switch("l"!==i.labelpos&&"r"!==i.labelpos||(i.width-=i.labeloffset),i.labelpos){case"l":i.x-=i.width/2+i.labeloffset;break;case"r":i.x+=i.width/2+i.labeloffset}})}(e)),t("    undoCoordinateSystem",()=>d.undo(e)),t("    translateGraph",()=>function(e){let t=Number.POSITIVE_INFINITY,i=0,n=Number.POSITIVE_INFINITY,s=0,r=e.graph(),o=r.marginx||0,a=r.marginy||0;function l(e){let r=e.x,o=e.y,a=e.width,l=e.height;t=Math.min(t,r-a/2),i=Math.max(i,r+a/2),n=Math.min(n,o-l/2),s=Math.max(s,o+l/2)}e.nodes().forEach(t=>l(e.node(t))),e.edges().forEach(t=>{let i=e.edge(t);Object.hasOwn(i,"x")&&l(i)}),t-=o,n-=a,e.nodes().forEach(i=>{let s=e.node(i);s.x-=t,s.y-=n}),e.edges().forEach(i=>{let s=e.edge(i);s.points.forEach(e=>{e.x-=t,e.y-=n}),Object.hasOwn(s,"x")&&(s.x-=t),Object.hasOwn(s,"y")&&(s.y-=n)}),r.width=i-t+o,r.height=s-n+a}(e)),t("    assignNodeIntersects",()=>function(e){e.edges().forEach(t=>{let i,n,s=e.edge(t),r=e.node(t.v),o=e.node(t.w);s.points?(i=s.points[0],n=s.points[s.points.length-1]):(s.points=[],i=o,n=r),s.points.unshift(g.intersectRect(r,i)),s.points.push(g.intersectRect(o,n))})}(e)),t("    reversePoints",()=>function(e){e.edges().forEach(t=>{let i=e.edge(t);i.reversed&&i.points.reverse()})}(e)),t("    acyclic.undo",()=>n.undo(e))}(A,i,t)),i("  updateInputGraph",()=>function(e,t){e.nodes().forEach(i=>{let n=e.node(i),s=t.node(i);n&&(n.x=s.x,n.y=s.y,n.rank=s.rank,t.children(i).length&&(n.width=s.width,n.height=s.height))}),e.edges().forEach(i=>{let n=e.edge(i),s=t.edge(i);n.points=s.points,Object.hasOwn(s,"x")&&(n.x=s.x,n.y=s.y)}),e.graph().width=t.graph().width,e.graph().height=t.graph().height}(e,A))})};let m=["nodesep","edgesep","ranksep","marginx","marginy"],v={ranksep:50,edgesep:20,nodesep:50,rankdir:"tb"},y=["acyclicer","ranker","rankdir","align"],C=["width","height","rank"],b={width:0,height:0},S=["minlen","weight","width","height","labeloffset"],w={minlen:1,weight:1,width:0,height:0,labeloffset:10,labelpos:"r"},x=["labelpos"];function E(e,t){return g.mapValues(g.pick(e,t),Number)}function M(e){var t={};return e&&Object.entries(e).forEach(([e,i])=>{"string"==typeof e&&(e=e.toLowerCase()),t[e]=i}),t}},32254(e,t,i){let n=i(82469);function s(e,t,i,r,o,a,l){let c=e.children(l);if(!c.length)return void(l!==t&&e.setEdge(t,l,{weight:0,minlen:i}));let h=n.addBorderNode(e,"_bt"),d=n.addBorderNode(e,"_bb"),u=e.node(l);e.setParent(h,l),u.borderTop=h,e.setParent(d,l),u.borderBottom=d,c.forEach(n=>{s(e,t,i,r,o,a,n);let c=e.node(n),u=c.borderTop?c.borderTop:n,p=c.borderBottom?c.borderBottom:n,g=c.borderTop?r:2*r,f=u!==p?1:o-a[l]+1;e.setEdge(h,u,{weight:g,minlen:f,nestingEdge:!0}),e.setEdge(p,d,{weight:g,minlen:f,nestingEdge:!0})}),e.parent(l)||e.setEdge(t,h,{weight:0,minlen:o+a[l]})}e.exports={run:function(e){let t=n.addDummyNode(e,"root",{},"_root"),i=function(e){var t={};function i(n,s){var r=e.children(n);r&&r.length&&r.forEach(e=>i(e,s+1)),t[n]=s}return e.children().forEach(e=>i(e,1)),t}(e),r=Object.values(i),o=n.applyWithChunking(Math.max,r)-1,a=2*o+1;e.graph().nestingRoot=t,e.edges().forEach(t=>e.edge(t).minlen*=a);let l=function(e){return e.edges().reduce((t,i)=>t+e.edge(i).weight,0)}(e)+1;e.children().forEach(n=>s(e,t,a,l,o,i,n)),e.graph().nodeRankFactor=a},cleanup:function(e){var t=e.graph();e.removeNode(t.nestingRoot),delete t.nestingRoot,e.edges().forEach(t=>{e.edge(t).nestingEdge&&e.removeEdge(t)})}}},77798(e,t,i){"use strict";let n=i(82469);e.exports={run:function(e){e.graph().dummyChains=[],e.edges().forEach(t=>function(e,t){let i,s,r,o=t.v,a=e.node(o).rank,l=t.w,c=e.node(l).rank,h=t.name,d=e.edge(t),u=d.labelRank;if(c!==a+1){for(e.removeEdge(t),r=0,++a;a<c;++r,++a)d.points=[],s={width:0,height:0,edgeLabel:d,edgeObj:t,rank:a},i=n.addDummyNode(e,"edge",s,"_d"),a===u&&(s.width=d.width,s.height=d.height,s.dummy="edge-label",s.labelpos=d.labelpos),e.setEdge(o,i,{weight:d.weight},h),0===r&&e.graph().dummyChains.push(i),o=i;e.setEdge(o,l,{weight:d.weight},h)}}(e,t))},undo:function(e){e.graph().dummyChains.forEach(t=>{let i,n=e.node(t),s=n.edgeLabel;for(e.setEdge(n.edgeObj,s);n.dummy;)i=e.successors(t)[0],e.removeNode(t),s.points.push({x:n.x,y:n.y}),"edge-label"===n.dummy&&(s.x=n.x,s.y=n.y,s.width=n.width,s.height=n.height),t=i,n=e.node(t)})}}},6281(e){e.exports=function(e,t,i){let n,s={};i.forEach(i=>{let r,o,a=e.parent(i);for(;a;){if(r=e.parent(a),r?(o=s[r],s[r]=a):(o=n,n=a),o&&o!==a)return void t.setEdge(o,a);a=r}})}},21213(e){e.exports=function(e,t=[]){return t.map(t=>{let i=e.inEdges(t);if(i.length){let n=i.reduce((t,i)=>{let n=e.edge(i),s=e.node(i.v);return{sum:t.sum+n.weight*s.order,weight:t.weight+n.weight}},{sum:0,weight:0});return{v:t,barycenter:n.sum/n.weight,weight:n.weight}}return{v:t}})}},96703(e,t,i){let n=i(55166).Graph,s=i(82469);e.exports=function(e,t,i){let r=function(e){for(var t;e.hasNode(t=s.uniqueId("_root")););return t}(e),o=new n({compound:!0}).setGraph({root:r}).setDefaultNodeLabel(t=>e.node(t));return e.nodes().forEach(n=>{let s=e.node(n),a=e.parent(n);(s.rank===t||s.minRank<=t&&t<=s.maxRank)&&(o.setNode(n),o.setParent(n,a||r),e[i](n).forEach(t=>{let i=t.v===n?t.w:t.v,s=o.edge(i,n),r=void 0!==s?s.weight:0;o.setEdge(i,n,{weight:e.edge(t).weight+r})}),Object.hasOwn(s,"minRank")&&o.setNode(n,{borderLeft:s.borderLeft[t],borderRight:s.borderRight[t]}))}),o}},28304(e,t,i){"use strict";let n=i(82469).zipObject;function s(e,t,i){let s=n(i,i.map((e,t)=>t)),r=t.flatMap(t=>e.outEdges(t).map(t=>({pos:s[t.w],weight:e.edge(t).weight})).sort((e,t)=>e.pos-t.pos)),o=1;for(;o<i.length;)o<<=1;let a=2*o-1;o-=1;let l=new Array(a).fill(0),c=0;return r.forEach(e=>{let t=e.pos+o;l[t]+=e.weight;let i=0;for(;t>0;)t%2&&(i+=l[t+1]),t=t-1>>1,l[t]+=e.weight;c+=e.weight*i}),c}e.exports=function(e,t){let i=0;for(let n=1;n<t.length;++n)i+=s(e,t[n-1],t[n]);return i}},5354(e,t,i){"use strict";let n=i(15612),s=i(28304),r=i(93315),o=i(96703),a=i(6281),l=i(55166).Graph,c=i(82469);function h(e,t,i){return t.map(function(t){return o(e,t,i)})}function d(e,t){let i=new l;e.forEach(function(e){let n=e.graph().root,s=r(e,n,i,t);s.vs.forEach((t,i)=>e.node(t).order=i),a(e,i,s.vs)})}function u(e,t){Object.values(t).forEach(t=>t.forEach((t,i)=>e.node(t).order=i))}e.exports=function e(t,i){if(i&&"function"==typeof i.customOrder)return void i.customOrder(t,e);let r=c.maxRank(t),o=h(t,c.range(1,r+1),"inEdges"),a=h(t,c.range(r-1,-1,-1),"outEdges"),l=n(t);if(u(t,l),i&&i.disableOptimalOrderHeuristic)return;let p,g=Number.POSITIVE_INFINITY;for(let e=0,i=0;i<4;++e,++i){d(e%2?o:a,e%4>=2),l=c.buildLayerMatrix(t);let n=s(t,l);n<g&&(i=0,p=Object.assign({},l),g=n)}u(t,p)}},15612(e,t,i){"use strict";let n=i(82469);e.exports=function(e){let t={},i=e.nodes().filter(t=>!e.children(t).length),s=i.map(t=>e.node(t).rank),r=n.applyWithChunking(Math.max,s),o=n.range(r+1).map(()=>[]);return i.sort((t,i)=>e.node(t).rank-e.node(i).rank).forEach(function i(n){if(t[n])return;t[n]=!0;let s=e.node(n);o[s.rank].push(n),e.successors(n).forEach(i)}),o}},7216(e,t,i){"use strict";let n=i(82469);e.exports=function(e,t){let i={};return e.forEach((e,t)=>{let n=i[e.v]={indegree:0,in:[],out:[],vs:[e.v],i:t};void 0!==e.barycenter&&(n.barycenter=e.barycenter,n.weight=e.weight)}),t.edges().forEach(e=>{let t=i[e.v],n=i[e.w];void 0!==t&&void 0!==n&&(n.indegree++,t.out.push(i[e.w]))}),function(e){let t=[];function i(e){return t=>{t.merged||(void 0===t.barycenter||void 0===e.barycenter||t.barycenter>=e.barycenter)&&function(e,t){let i=0,n=0;e.weight&&(i+=e.barycenter*e.weight,n+=e.weight),t.weight&&(i+=t.barycenter*t.weight,n+=t.weight),e.vs=t.vs.concat(e.vs),e.barycenter=i/n,e.weight=n,e.i=Math.min(t.i,e.i),t.merged=!0}(e,t)}}function s(t){return i=>{i.in.push(t),0===--i.indegree&&e.push(i)}}for(;e.length;){let n=e.pop();t.push(n),n.in.reverse().forEach(i(n)),n.out.forEach(s(n))}return t.filter(e=>!e.merged).map(e=>n.pick(e,["vs","i","barycenter","weight"]))}(Object.values(i).filter(e=>!e.indegree))}},93315(e,t,i){let n=i(21213),s=i(7216),r=i(31112);e.exports=function e(t,i,o,a){let l=t.children(i),c=t.node(i),h=c?c.borderLeft:void 0,d=c?c.borderRight:void 0,u={};h&&(l=l.filter(e=>e!==h&&e!==d));let p=n(t,l);p.forEach(i=>{if(t.children(i.v).length){let r=e(t,i.v,o,a);u[i.v]=r,Object.hasOwn(r,"barycenter")&&(s=r,void 0!==(n=i).barycenter?(n.barycenter=(n.barycenter*n.weight+s.barycenter*s.weight)/(n.weight+s.weight),n.weight+=s.weight):(n.barycenter=s.barycenter,n.weight=s.weight))}var n,s});let g=s(p,o);!function(e,t){e.forEach(e=>{e.vs=e.vs.flatMap(e=>t[e]?t[e].vs:e)})}(g,u);let f=r(g,a);if(h&&(f.vs=[h,f.vs,d].flat(!0),t.predecessors(h).length)){let e=t.node(t.predecessors(h)[0]),i=t.node(t.predecessors(d)[0]);Object.hasOwn(f,"barycenter")||(f.barycenter=0,f.weight=0),f.barycenter=(f.barycenter*f.weight+e.order+i.order)/(f.weight+2),f.weight+=2}return f}},31112(e,t,i){let n=i(82469);function s(e,t,i){let n;for(;t.length&&(n=t[t.length-1]).i<=i;)t.pop(),e.push(n.vs),i++;return i}e.exports=function(e,t){let i=n.partition(e,e=>Object.hasOwn(e,"barycenter")),r=i.lhs,o=i.rhs.sort((e,t)=>t.i-e.i),a=[],l=0,c=0,h=0;var d;r.sort((d=!!t,(e,t)=>e.barycenter<t.barycenter?-1:e.barycenter>t.barycenter?1:d?t.i-e.i:e.i-t.i)),h=s(a,o,h),r.forEach(e=>{h+=e.vs.length,a.push(e.vs),l+=e.barycenter*e.weight,c+=e.weight,h=s(a,o,h)});let u={vs:a.flat(!0)};return c&&(u.barycenter=l/c,u.weight=c),u}},77999(e){e.exports=function(e){let t=function(e){let t={},i=0;return e.children().forEach(function n(s){let r=i;e.children(s).forEach(n),t[s]={low:r,lim:i++}}),t}(e);e.graph().dummyChains.forEach(i=>{let n=e.node(i),s=n.edgeObj,r=function(e,t,i,n){let s,r,o=[],a=[],l=Math.min(t[i].low,t[n].low),c=Math.max(t[i].lim,t[n].lim);s=i;do{s=e.parent(s),o.push(s)}while(s&&(t[s].low>l||c>t[s].lim));for(r=s,s=n;(s=e.parent(s))!==r;)a.push(s);return{path:o.concat(a.reverse()),lca:r}}(e,t,s.v,s.w),o=r.path,a=r.lca,l=0,c=o[l],h=!0;for(;i!==s.w;){if(n=e.node(i),h){for(;(c=o[l])!==a&&e.node(c).maxRank<n.rank;)l++;c===a&&(h=!1)}if(!h){for(;l<o.length-1&&e.node(c=o[l+1]).minRank<=n.rank;)l++;c=o[l]}e.setParent(i,c),i=e.successors(i)[0]}})}},95101(e,t,i){"use strict";let n=i(55166).Graph,s=i(82469);function r(e,t){let i={};return t.length&&t.reduce(function(t,n){let s=0,r=0,o=t.length,l=n[n.length-1];return n.forEach((t,c)=>{let h=function(e,t){if(e.node(t).dummy)return e.predecessors(t).find(t=>e.node(t).dummy)}(e,t),d=h?e.node(h).order:o;(h||t===l)&&(n.slice(r,c+1).forEach(t=>{e.predecessors(t).forEach(n=>{let r=e.node(n),o=r.order;!(o<s||d<o)||r.dummy&&e.node(t).dummy||a(i,n,t)})}),r=c+1,s=d)}),n}),i}function o(e,t){let i={};function n(t,n,r,o,l){let c;s.range(n,r).forEach(n=>{c=t[n],e.node(c).dummy&&e.predecessors(c).forEach(t=>{let n=e.node(t);n.dummy&&(n.order<o||n.order>l)&&a(i,t,c)})})}return t.length&&t.reduce(function(t,i){let s,r=-1,o=0;return i.forEach((a,l)=>{if("border"===e.node(a).dummy){let t=e.predecessors(a);t.length&&(s=e.node(t[0]).order,n(i,o,l,r,s),o=l,r=s)}n(i,o,i.length,s,t.length)}),i}),i}function a(e,t,i){if(t>i){let e=t;t=i,i=e}let n=e[t];n||(e[t]=n={}),n[i]=!0}function l(e,t,i){if(t>i){let e=t;t=i,i=e}return!!e[t]&&Object.hasOwn(e[t],i)}function c(e,t,i,n){let s={},r={},o={};return t.forEach(e=>{e.forEach((e,t)=>{s[e]=e,r[e]=e,o[e]=t})}),t.forEach(e=>{let t=-1;e.forEach(e=>{let a=n(e);if(a.length){a=a.sort((e,t)=>o[e]-o[t]);let n=(a.length-1)/2;for(let c=Math.floor(n),h=Math.ceil(n);c<=h;++c){let n=a[c];r[e]===e&&t<o[n]&&!l(i,e,n)&&(r[n]=e,r[e]=s[e]=s[n],t=o[n])}}})}),{root:s,align:r}}function h(e,t,i,s,r){let o={},a=function(e,t,i,s){let r=new n,o=e.graph(),a=function(e,t,i){return(n,s,r)=>{let o,a=n.node(s),l=n.node(r),c=0;if(c+=a.width/2,Object.hasOwn(a,"labelpos"))switch(a.labelpos.toLowerCase()){case"l":o=-a.width/2;break;case"r":o=a.width/2}if(o&&(c+=i?o:-o),o=0,c+=(a.dummy?t:e)/2,c+=(l.dummy?t:e)/2,c+=l.width/2,Object.hasOwn(l,"labelpos"))switch(l.labelpos.toLowerCase()){case"l":o=l.width/2;break;case"r":o=-l.width/2}return o&&(c+=i?o:-o),o=0,c}}(o.nodesep,o.edgesep,s);return t.forEach(t=>{let n;t.forEach(t=>{let s=i[t];if(r.setNode(s),n){var o=i[n],l=r.edge(o,s);r.setEdge(o,s,Math.max(a(e,t,n),l||0))}n=t})}),r}(e,t,i,r),l=r?"borderLeft":"borderRight";function c(e,t){let i=a.nodes(),n=i.pop(),s={};for(;n;)s[n]?e(n):(s[n]=!0,i.push(n),i=i.concat(t(n))),n=i.pop()}return c(function(e){o[e]=a.inEdges(e).reduce((e,t)=>Math.max(e,o[t.v]+a.edge(t)),0)},a.predecessors.bind(a)),c(function(t){let i=a.outEdges(t).reduce((e,t)=>Math.min(e,o[t.w]-a.edge(t)),Number.POSITIVE_INFINITY),n=e.node(t);i!==Number.POSITIVE_INFINITY&&n.borderType!==l&&(o[t]=Math.max(o[t],i))},a.successors.bind(a)),Object.keys(s).forEach(e=>o[e]=o[i[e]]),o}function d(e,t){return Object.values(t).reduce((t,i)=>{let n=Number.NEGATIVE_INFINITY,s=Number.POSITIVE_INFINITY;Object.entries(i).forEach(([t,i])=>{let r=function(e,t){return e.node(t).width}(e,t)/2;n=Math.max(i+r,n),s=Math.min(i-r,s)});const r=n-s;return r<t[0]&&(t=[r,i]),t},[Number.POSITIVE_INFINITY,null])[1]}function u(e,t){let i=Object.values(t),n=s.applyWithChunking(Math.min,i),r=s.applyWithChunking(Math.max,i);["u","d"].forEach(i=>{["l","r"].forEach(o=>{let a=i+o,l=e[a];if(l===t)return;let c=Object.values(l),h=n-s.applyWithChunking(Math.min,c);"l"!==o&&(h=r-s.applyWithChunking(Math.max,c)),h&&(e[a]=s.mapValues(l,e=>e+h))})})}function p(e,t){return s.mapValues(e.ul,(i,n)=>{if(t)return e[t.toLowerCase()][n];{let t=Object.values(e).map(e=>e[n]).sort((e,t)=>e-t);return(t[1]+t[2])/2}})}e.exports={positionX:function(e){let t,i=s.buildLayerMatrix(e),n=Object.assign(r(e,i),o(e,i)),a={};["u","d"].forEach(r=>{t="u"===r?i:Object.values(i).reverse(),["l","r"].forEach(i=>{"r"===i&&(t=t.map(e=>Object.values(e).reverse()));let o=("u"===r?e.predecessors:e.successors).bind(e),l=c(0,t,n,o),d=h(e,t,l.root,l.align,"r"===i);"r"===i&&(d=s.mapValues(d,e=>-e)),a[r+i]=d})});let l=d(e,a);return u(a,l),p(a,e.graph().align)},findType1Conflicts:r,findType2Conflicts:o,addConflict:a,hasConflict:l,verticalAlignment:c,horizontalCompaction:h,alignCoordinates:u,findSmallestWidthAlignment:d,balance:p}},7489(e,t,i){"use strict";let n=i(82469),s=i(95101).positionX;e.exports=function(e){(function(e){let t=n.buildLayerMatrix(e),i=e.graph().ranksep,s=0;t.forEach(t=>{const n=t.reduce((t,i)=>{const n=e.node(i).height;return t>n?t:n},0);t.forEach(t=>e.node(t).y=s+n/2),s+=n+i})})(e=n.asNonCompoundGraph(e)),Object.entries(s(e)).forEach(([t,i])=>e.node(t).x=i)}},66884(e,t,i){"use strict";var n=i(55166).Graph,s=i(74354).slack;function r(e,t){return e.nodes().forEach(function i(n){t.nodeEdges(n).forEach(r=>{var o=r.v,a=n===o?r.w:o;e.hasNode(a)||s(t,r)||(e.setNode(a,{}),e.setEdge(n,a,{}),i(a))})}),e.nodeCount()}function o(e,t){return t.edges().reduce((i,n)=>{let r=Number.POSITIVE_INFINITY;return e.hasNode(n.v)!==e.hasNode(n.w)&&(r=s(t,n)),r<i[0]?[r,n]:i},[Number.POSITIVE_INFINITY,null])[1]}function a(e,t,i){e.nodes().forEach(e=>t.node(e).rank+=i)}e.exports=function(e){var t,i,l=new n({directed:!1}),c=e.nodes()[0],h=e.nodeCount();for(l.setNode(c,{});r(l,e)<h;)t=o(l,e),i=l.hasNode(t.v)?s(e,t):-s(e,t),a(l,e,i);return l}},83816(e,t,i){"use strict";var n=i(74354).longestPath,s=i(66884),r=i(48641);e.exports=function(e){var t=e.graph().ranker;if(t instanceof Function)return t(e);switch(e.graph().ranker){case"network-simplex":default:!function(e){r(e)}(e);break;case"tight-tree":!function(e){n(e),s(e)}(e);break;case"longest-path":o(e);case"none":}};var o=n},48641(e,t,i){"use strict";var n=i(66884),s=i(74354).slack,r=i(74354).longestPath,o=i(55166).alg.preorder,a=i(55166).alg.postorder,l=i(82469).simplify;function c(e){e=l(e),r(e);var t,i=n(e);for(u(i),h(i,e);t=g(i);)m(i,e,t,f(i,e,t))}function h(e,t){var i=a(e,e.nodes());(i=i.slice(0,i.length-1)).forEach(i=>function(e,t,i){var n=e.node(i).parent;e.edge(i,n).cutvalue=d(e,t,i)}(e,t,i))}function d(e,t,i){var n=e.node(i).parent,s=!0,r=t.edge(i,n),o=0;return r||(s=!1,r=t.edge(n,i)),o=r.weight,t.nodeEdges(i).forEach(r=>{var a,l,c=r.v===i,h=c?r.w:r.v;if(h!==n){var d=c===s,u=t.edge(r).weight;if(o+=d?u:-u,a=i,l=h,e.hasEdge(a,l)){var p=e.edge(i,h).cutvalue;o+=d?-p:p}}}),o}function u(e,t){arguments.length<2&&(t=e.nodes()[0]),p(e,{},1,t)}function p(e,t,i,n,s){var r=i,o=e.node(n);return t[n]=!0,e.neighbors(n).forEach(s=>{Object.hasOwn(t,s)||(i=p(e,t,i,s,n))}),o.low=r,o.lim=i++,s?o.parent=s:delete o.parent,i}function g(e){return e.edges().find(t=>e.edge(t).cutvalue<0)}function f(e,t,i){var n=i.v,r=i.w;t.hasEdge(n,r)||(n=i.w,r=i.v);var o=e.node(n),a=e.node(r),l=o,c=!1;o.lim>a.lim&&(l=a,c=!0);var h=t.edges().filter(t=>c===v(0,e.node(t.v),l)&&c!==v(0,e.node(t.w),l));return h.reduce((e,i)=>s(t,i)<s(t,e)?i:e)}function m(e,t,i,n){var s=i.v,r=i.w;e.removeEdge(s,r),e.setEdge(n.v,n.w,{}),u(e),h(e,t),function(e,t){var i=e.nodes().find(e=>!t.node(e).parent),n=o(e,i);(n=n.slice(1)).forEach(i=>{var n=e.node(i).parent,s=t.edge(i,n),r=!1;s||(s=t.edge(n,i),r=!0),t.node(i).rank=t.node(n).rank+(r?s.minlen:-s.minlen)})}(e,t)}function v(e,t,i){return i.low<=t.lim&&t.lim<=i.lim}e.exports=c,c.initLowLimValues=u,c.initCutValues=h,c.calcCutValue=d,c.leaveEdge=g,c.enterEdge=f,c.exchangeEdges=m},74354(e,t,i){"use strict";const{applyWithChunking:n}=i(82469);e.exports={longestPath:function(e){var t={};e.sources().forEach(function i(s){var r=e.node(s);if(Object.hasOwn(t,s))return r.rank;t[s]=!0;let o=e.outEdges(s).map(t=>null==t?Number.POSITIVE_INFINITY:i(t.w)-e.edge(t).minlen);var a=n(Math.min,o);return a===Number.POSITIVE_INFINITY&&(a=0),r.rank=a})},slack:function(e,t){return e.node(t.w).rank-e.node(t.v).rank-e.edge(t).minlen}}},82469(e,t,i){"use strict";let n=i(55166).Graph;function s(e,t,i,n){for(var s=n;e.hasNode(s);)s=l(n);return i.dummy=t,e.setNode(s,i),s}e.exports={addBorderNode:function(e,t,i,n){let r={width:0,height:0};return arguments.length>=4&&(r.rank=i,r.order=n),s(e,"border",r,t)},addDummyNode:s,applyWithChunking:r,asNonCompoundGraph:function(e){let t=new n({multigraph:e.isMultigraph()}).setGraph(e.graph());return e.nodes().forEach(i=>{e.children(i).length||t.setNode(i,e.node(i))}),e.edges().forEach(i=>{t.setEdge(i,e.edge(i))}),t},buildLayerMatrix:function(e){let t=c(o(e)+1).map(()=>[]);return e.nodes().forEach(i=>{let n=e.node(i),s=n.rank;void 0!==s&&(t[s][n.order]=i)}),t},intersectRect:function(e,t){let i,n,s=e.x,r=e.y,o=t.x-s,a=t.y-r,l=e.width/2,c=e.height/2;if(!o&&!a)throw new Error("Not possible to find intersection inside of the rectangle");return Math.abs(a)*l>Math.abs(o)*c?(a<0&&(c=-c),i=c*o/a,n=c):(o<0&&(l=-l),i=l,n=l*a/o),{x:s+i,y:r+n}},mapValues:function(e,t){let i=t;return"string"==typeof t&&(i=e=>e[t]),Object.entries(e).reduce((e,[t,n])=>(e[t]=i(n,t),e),{})},maxRank:o,normalizeRanks:function(e){let t=e.nodes().map(t=>{let i=e.node(t).rank;return void 0===i?Number.MAX_VALUE:i}),i=r(Math.min,t);e.nodes().forEach(t=>{let n=e.node(t);Object.hasOwn(n,"rank")&&(n.rank-=i)})},notime:function(e,t){return t()},partition:function(e,t){let i={lhs:[],rhs:[]};return e.forEach(e=>{t(e)?i.lhs.push(e):i.rhs.push(e)}),i},pick:function(e,t){const i={};for(const n of t)void 0!==e[n]&&(i[n]=e[n]);return i},predecessorWeights:function(e){let t=e.nodes().map(t=>{let i={};return e.inEdges(t).forEach(t=>{i[t.v]=(i[t.v]||0)+e.edge(t).weight}),i});return h(e.nodes(),t)},range:c,removeEmptyRanks:function(e){let t=e.nodes().map(t=>e.node(t).rank),i=r(Math.min,t),n=[];e.nodes().forEach(t=>{let s=e.node(t).rank-i;n[s]||(n[s]=[]),n[s].push(t)});let s=0,o=e.graph().nodeRankFactor;Array.from(n).forEach((t,i)=>{void 0===t&&i%o!==0?--s:void 0!==t&&s&&t.forEach(t=>e.node(t).rank+=s)})},simplify:function(e){let t=(new n).setGraph(e.graph());return e.nodes().forEach(i=>t.setNode(i,e.node(i))),e.edges().forEach(i=>{let n=t.edge(i.v,i.w)||{weight:0,minlen:1},s=e.edge(i);t.setEdge(i.v,i.w,{weight:n.weight+s.weight,minlen:Math.max(n.minlen,s.minlen)})}),t},successorWeights:function(e){let t=e.nodes().map(t=>{let i={};return e.outEdges(t).forEach(t=>{i[t.w]=(i[t.w]||0)+e.edge(t).weight}),i});return h(e.nodes(),t)},time:function(e,t){let i=Date.now();try{return t()}finally{console.log(e+" time: "+(Date.now()-i)+"ms")}},uniqueId:l,zipObject:h};function r(e,t){if(t.length>65535){const i=function(e,t=65535){const i=[];for(let n=0;n<e.length;n+=t){const s=e.slice(n,n+t);i.push(s)}return i}(t);return e.apply(null,i.map(t=>e.apply(null,t)))}return e.apply(null,t)}function o(e){const t=e.nodes().map(t=>{let i=e.node(t).rank;return void 0===i?Number.MIN_VALUE:i});return r(Math.max,t)}let a=0;function l(e){return e+""+ ++a}function c(e,t,i=1){null==t&&(t=e,e=0);let n=e=>e<t;i<0&&(n=e=>t<e);const s=[];for(let t=e;n(t);t+=i)s.push(t);return s}function h(e,t){return e.reduce((e,i,n)=>(e[i]=t[n],e),{})}},69741(e){e.exports="1.1.5"},55166(e,t,i){var n=i(72482);e.exports={Graph:n.Graph,json:i(73082),alg:i(42703),version:n.version}},55783(e){e.exports=function(e){var t,i={},n=[];function s(n){Object.hasOwn(i,n)||(i[n]=!0,t.push(n),e.successors(n).forEach(s),e.predecessors(n).forEach(s))}return e.nodes().forEach(function(e){t=[],s(e),t.length&&n.push(t)}),n}},10400(e){function t(e,t,i,s){for(var r=[[e,!1]];r.length>0;){var o=r.pop();o[1]?s.push(o[0]):Object.hasOwn(i,o[0])||(i[o[0]]=!0,r.push([o[0],!0]),n(t(o[0]),e=>r.push([e,!1])))}}function i(e,t,i,s){for(var r=[e];r.length>0;){var o=r.pop();Object.hasOwn(i,o)||(i[o]=!0,s.push(o),n(t(o),e=>r.push(e)))}}function n(e,t){for(var i=e.length;i--;)t(e[i],i,e);return e}e.exports=function(e,n,s){Array.isArray(n)||(n=[n]);var r=e.isDirected()?t=>e.successors(t):t=>e.neighbors(t),o="post"===s?t:i,a=[],l={};return n.forEach(t=>{if(!e.hasNode(t))throw new Error("Graph does not have node: "+t);o(t,r,l,a)}),a}},32843(e,t,i){var n=i(59349);e.exports=function(e,t,i){return e.nodes().reduce(function(s,r){return s[r]=n(e,r,t,i),s},{})}},59349(e,t,i){var n=i(52821);e.exports=function(e,t,i,r){return function(e,t,i,s){var r,o,a={},l=new n,c=function(e){var t=e.v!==r?e.v:e.w,n=a[t],s=i(e),c=o.distance+s;if(s<0)throw new Error("dijkstra does not allow negative edge weights. Bad edge: "+e+" Weight: "+s);c<n.distance&&(n.distance=c,n.predecessor=r,l.decrease(t,c))};for(e.nodes().forEach(function(e){var i=e===t?0:Number.POSITIVE_INFINITY;a[e]={distance:i},l.add(e,i)});l.size()>0&&(r=l.removeMin(),(o=a[r]).distance!==Number.POSITIVE_INFINITY);)s(r).forEach(c);return a}(e,String(t),i||s,r||function(t){return e.outEdges(t)})};var s=()=>1},57706(e,t,i){var n=i(52495);e.exports=function(e){return n(e).filter(function(t){return t.length>1||1===t.length&&e.hasEdge(t[0],t[0])})}},85298(e){e.exports=function(e,i,n){return function(e,t,i){var n={},s=e.nodes();return s.forEach(function(e){n[e]={},n[e][e]={distance:0},s.forEach(function(t){e!==t&&(n[e][t]={distance:Number.POSITIVE_INFINITY})}),i(e).forEach(function(i){var s=i.v===e?i.w:i.v,r=t(i);n[e][s]={distance:r,predecessor:e}})}),s.forEach(function(e){var t=n[e];s.forEach(function(i){var r=n[i];s.forEach(function(i){var n=r[e],s=t[i],o=r[i],a=n.distance+s.distance;a<o.distance&&(o.distance=a,o.predecessor=s.predecessor)})})}),n}(e,i||t,n||function(t){return e.outEdges(t)})};var t=()=>1},42703(e,t,i){e.exports={components:i(55783),dijkstra:i(59349),dijkstraAll:i(32843),findCycles:i(57706),floydWarshall:i(85298),isAcyclic:i(20574),postorder:i(26385),preorder:i(57484),prim:i(8523),tarjan:i(52495),topsort:i(81412)}},20574(e,t,i){var n=i(81412);e.exports=function(e){try{n(e)}catch(e){if(e instanceof n.CycleException)return!1;throw e}return!0}},26385(e,t,i){var n=i(10400);e.exports=function(e,t){return n(e,t,"post")}},57484(e,t,i){var n=i(10400);e.exports=function(e,t){return n(e,t,"pre")}},8523(e,t,i){var n=i(76234),s=i(52821);e.exports=function(e,t){var i,r=new n,o={},a=new s;function l(e){var n=e.v===i?e.w:e.v,s=a.priority(n);if(void 0!==s){var r=t(e);r<s&&(o[n]=i,a.decrease(n,r))}}if(0===e.nodeCount())return r;e.nodes().forEach(function(e){a.add(e,Number.POSITIVE_INFINITY),r.setNode(e)}),a.decrease(e.nodes()[0],0);for(var c=!1;a.size()>0;){if(i=a.removeMin(),Object.hasOwn(o,i))r.setEdge(i,o[i]);else{if(c)throw new Error("Input graph is not connected: "+e);c=!0}e.nodeEdges(i).forEach(l)}return r}},52495(e){e.exports=function(e){var t=0,i=[],n={},s=[];function r(o){var a=n[o]={onStack:!0,lowlink:t,index:t++};if(i.push(o),e.successors(o).forEach(function(e){Object.hasOwn(n,e)?n[e].onStack&&(a.lowlink=Math.min(a.lowlink,n[e].index)):(r(e),a.lowlink=Math.min(a.lowlink,n[e].lowlink))}),a.lowlink===a.index){var l,c=[];do{l=i.pop(),n[l].onStack=!1,c.push(l)}while(o!==l);s.push(c)}}return e.nodes().forEach(function(e){Object.hasOwn(n,e)||r(e)}),s}},81412(e){function t(e){var t={},n={},s=[];if(e.sinks().forEach(function r(o){if(Object.hasOwn(n,o))throw new i;Object.hasOwn(t,o)||(n[o]=!0,t[o]=!0,e.predecessors(o).forEach(r),delete n[o],s.push(o))}),Object.keys(t).length!==e.nodeCount())throw new i;return s}class i extends Error{constructor(){super(...arguments)}}e.exports=t,t.CycleException=i},52821(e){e.exports=class{_arr=[];_keyIndices={};size(){return this._arr.length}keys(){return this._arr.map(function(e){return e.key})}has(e){return Object.hasOwn(this._keyIndices,e)}priority(e){var t=this._keyIndices[e];if(void 0!==t)return this._arr[t].priority}min(){if(0===this.size())throw new Error("Queue underflow");return this._arr[0].key}add(e,t){var i=this._keyIndices;if(e=String(e),!Object.hasOwn(i,e)){var n=this._arr,s=n.length;return i[e]=s,n.push({key:e,priority:t}),this._decrease(s),!0}return!1}removeMin(){this._swap(0,this._arr.length-1);var e=this._arr.pop();return delete this._keyIndices[e.key],this._heapify(0),e.key}decrease(e,t){var i=this._keyIndices[e];if(t>this._arr[i].priority)throw new Error("New priority is greater than current priority. Key: "+e+" Old: "+this._arr[i].priority+" New: "+t);this._arr[i].priority=t,this._decrease(i)}_heapify(e){var t=this._arr,i=2*e,n=i+1,s=e;i<t.length&&(s=t[i].priority<t[s].priority?i:s,n<t.length&&(s=t[n].priority<t[s].priority?n:s),s!==e&&(this._swap(e,s),this._heapify(s)))}_decrease(e){for(var t,i=this._arr,n=i[e].priority;0!==e&&!(i[t=e>>1].priority<n);)this._swap(e,t),e=t}_swap(e,t){var i=this._arr,n=this._keyIndices,s=i[e],r=i[t];i[e]=r,i[t]=s,n[r.key]=e,n[s.key]=t}}},76234(e){"use strict";var t="\0";function i(e,t){e[t]?e[t]++:e[t]=1}function n(e,t){--e[t]||delete e[t]}function s(e,t,i,n){var s=""+t,r=""+i;if(!e&&s>r){var o=s;s=r,r=o}return s+""+r+""+(void 0===n?"\0":n)}function r(e,t){return s(e,t.v,t.w,t.name)}e.exports=class{_isDirected=!0;_isMultigraph=!1;_isCompound=!1;_label;_defaultNodeLabelFn=()=>{};_defaultEdgeLabelFn=()=>{};_nodes={};_in={};_preds={};_out={};_sucs={};_edgeObjs={};_edgeLabels={};_nodeCount=0;_edgeCount=0;_parent;_children;constructor(e){e&&(this._isDirected=!Object.hasOwn(e,"directed")||e.directed,this._isMultigraph=!!Object.hasOwn(e,"multigraph")&&e.multigraph,this._isCompound=!!Object.hasOwn(e,"compound")&&e.compound),this._isCompound&&(this._parent={},this._children={},this._children[t]={})}isDirected(){return this._isDirected}isMultigraph(){return this._isMultigraph}isCompound(){return this._isCompound}setGraph(e){return this._label=e,this}graph(){return this._label}setDefaultNodeLabel(e){return this._defaultNodeLabelFn=e,"function"!=typeof e&&(this._defaultNodeLabelFn=()=>e),this}nodeCount(){return this._nodeCount}nodes(){return Object.keys(this._nodes)}sources(){var e=this;return this.nodes().filter(t=>0===Object.keys(e._in[t]).length)}sinks(){var e=this;return this.nodes().filter(t=>0===Object.keys(e._out[t]).length)}setNodes(e,t){var i=arguments,n=this;return e.forEach(function(e){i.length>1?n.setNode(e,t):n.setNode(e)}),this}setNode(e,i){return Object.hasOwn(this._nodes,e)?(arguments.length>1&&(this._nodes[e]=i),this):(this._nodes[e]=arguments.length>1?i:this._defaultNodeLabelFn(e),this._isCompound&&(this._parent[e]=t,this._children[e]={},this._children[t][e]=!0),this._in[e]={},this._preds[e]={},this._out[e]={},this._sucs[e]={},++this._nodeCount,this)}node(e){return this._nodes[e]}hasNode(e){return Object.hasOwn(this._nodes,e)}removeNode(e){var t=this;if(Object.hasOwn(this._nodes,e)){var i=e=>t.removeEdge(t._edgeObjs[e]);delete this._nodes[e],this._isCompound&&(this._removeFromParentsChildList(e),delete this._parent[e],this.children(e).forEach(function(e){t.setParent(e)}),delete this._children[e]),Object.keys(this._in[e]).forEach(i),delete this._in[e],delete this._preds[e],Object.keys(this._out[e]).forEach(i),delete this._out[e],delete this._sucs[e],--this._nodeCount}return this}setParent(e,i){if(!this._isCompound)throw new Error("Cannot set parent in a non-compound graph");if(void 0===i)i=t;else{for(var n=i+="";void 0!==n;n=this.parent(n))if(n===e)throw new Error("Setting "+i+" as parent of "+e+" would create a cycle");this.setNode(i)}return this.setNode(e),this._removeFromParentsChildList(e),this._parent[e]=i,this._children[i][e]=!0,this}_removeFromParentsChildList(e){delete this._children[this._parent[e]][e]}parent(e){if(this._isCompound){var i=this._parent[e];if(i!==t)return i}}children(e=t){if(this._isCompound){var i=this._children[e];if(i)return Object.keys(i)}else{if(e===t)return this.nodes();if(this.hasNode(e))return[]}}predecessors(e){var t=this._preds[e];if(t)return Object.keys(t)}successors(e){var t=this._sucs[e];if(t)return Object.keys(t)}neighbors(e){var t=this.predecessors(e);if(t){const n=new Set(t);for(var i of this.successors(e))n.add(i);return Array.from(n.values())}}isLeaf(e){return 0===(this.isDirected()?this.successors(e):this.neighbors(e)).length}filterNodes(e){var t=new this.constructor({directed:this._isDirected,multigraph:this._isMultigraph,compound:this._isCompound});t.setGraph(this.graph());var i=this;Object.entries(this._nodes).forEach(function([i,n]){e(i)&&t.setNode(i,n)}),Object.values(this._edgeObjs).forEach(function(e){t.hasNode(e.v)&&t.hasNode(e.w)&&t.setEdge(e,i.edge(e))});var n={};function s(e){var r=i.parent(e);return void 0===r||t.hasNode(r)?(n[e]=r,r):r in n?n[r]:s(r)}return this._isCompound&&t.nodes().forEach(e=>t.setParent(e,s(e))),t}setDefaultEdgeLabel(e){return this._defaultEdgeLabelFn=e,"function"!=typeof e&&(this._defaultEdgeLabelFn=()=>e),this}edgeCount(){return this._edgeCount}edges(){return Object.values(this._edgeObjs)}setPath(e,t){var i=this,n=arguments;return e.reduce(function(e,s){return n.length>1?i.setEdge(e,s,t):i.setEdge(e,s),s}),this}setEdge(){var e,t,n,r,o=!1,a=arguments[0];"object"==typeof a&&null!==a&&"v"in a?(e=a.v,t=a.w,n=a.name,2===arguments.length&&(r=arguments[1],o=!0)):(e=a,t=arguments[1],n=arguments[3],arguments.length>2&&(r=arguments[2],o=!0)),e=""+e,t=""+t,void 0!==n&&(n=""+n);var l=s(this._isDirected,e,t,n);if(Object.hasOwn(this._edgeLabels,l))return o&&(this._edgeLabels[l]=r),this;if(void 0!==n&&!this._isMultigraph)throw new Error("Cannot set a named edge when isMultigraph = false");this.setNode(e),this.setNode(t),this._edgeLabels[l]=o?r:this._defaultEdgeLabelFn(e,t,n);var c=function(e,t,i,n){var s=""+t,r=""+i;if(!e&&s>r){var o=s;s=r,r=o}var a={v:s,w:r};return n&&(a.name=n),a}(this._isDirected,e,t,n);return e=c.v,t=c.w,Object.freeze(c),this._edgeObjs[l]=c,i(this._preds[t],e),i(this._sucs[e],t),this._in[t][l]=c,this._out[e][l]=c,this._edgeCount++,this}edge(e,t,i){var n=1===arguments.length?r(this._isDirected,arguments[0]):s(this._isDirected,e,t,i);return this._edgeLabels[n]}edgeAsObj(){const e=this.edge(...arguments);return"object"!=typeof e?{label:e}:e}hasEdge(e,t,i){var n=1===arguments.length?r(this._isDirected,arguments[0]):s(this._isDirected,e,t,i);return Object.hasOwn(this._edgeLabels,n)}removeEdge(e,t,i){var o=1===arguments.length?r(this._isDirected,arguments[0]):s(this._isDirected,e,t,i),a=this._edgeObjs[o];return a&&(e=a.v,t=a.w,delete this._edgeLabels[o],delete this._edgeObjs[o],n(this._preds[t],e),n(this._sucs[e],t),delete this._in[t][o],delete this._out[e][o],this._edgeCount--),this}inEdges(e,t){var i=this._in[e];if(i){var n=Object.values(i);return t?n.filter(e=>e.v===t):n}}outEdges(e,t){var i=this._out[e];if(i){var n=Object.values(i);return t?n.filter(e=>e.w===t):n}}nodeEdges(e,t){var i=this.inEdges(e,t);if(i)return i.concat(this.outEdges(e,t))}}},72482(e,t,i){e.exports={Graph:i(76234),version:i(51350)}},73082(e,t,i){var n=i(76234);function s(e){return e.nodes().map(function(t){var i=e.node(t),n=e.parent(t),s={v:t};return void 0!==i&&(s.value=i),void 0!==n&&(s.parent=n),s})}function r(e){return e.edges().map(function(t){var i=e.edge(t),n={v:t.v,w:t.w};return void 0!==t.name&&(n.name=t.name),void 0!==i&&(n.value=i),n})}e.exports={write:function(e){var t={options:{directed:e.isDirected(),multigraph:e.isMultigraph(),compound:e.isCompound()},nodes:s(e),edges:r(e)};return void 0!==e.graph()&&(t.value=structuredClone(e.graph())),t},read:function(e){var t=new n(e.options).setGraph(e.value);return e.nodes.forEach(function(e){t.setNode(e.v,e.value),e.parent&&t.setParent(e.v,e.parent)}),e.edges.forEach(function(e){t.setEdge({v:e.v,w:e.w,name:e.name},e.value)}),t}}},51350(e){e.exports="2.2.4"},85997(e,t,i){"use strict";i.d(t,{A:()=>o});var n=i(5866),s=i.n(n);const r={normalDateWithWeekday:"ddd, MMM D",normalDate:"D MMMM",shortDate:"MMM D",monthAndDate:"MMMM D",dayOfMonth:"D",year:"YYYY",month:"MMMM",monthShort:"MMM",monthAndYear:"MMMM YYYY",weekday:"dddd",weekdayShort:"ddd",minutes:"mm",hours12h:"hh",hours24h:"HH",seconds:"ss",fullTime:"LT",fullTime12h:"hh:mm A",fullTime24h:"HH:mm",fullDate:"ll",fullDateWithWeekday:"dddd, LL",fullDateTime:"lll",fullDateTime12h:"ll hh:mm A",fullDateTime24h:"ll HH:mm",keyboardDate:"L",keyboardDateTime:"L LT",keyboardDateTime12h:"L hh:mm A",keyboardDateTime24h:"L HH:mm"};class o{constructor({locale:e,formats:t,instance:i}={}){this.lib="moment",this.is12HourCycleInCurrentLocale=()=>/A|a/.test(this.moment.localeData(this.getCurrentLocaleCode()).longDateFormat("LT")),this.getFormatHelperText=e=>{var t,i;return null!==(i=null===(t=e.match(/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})|./g))||void 0===t?void 0:t.map(e=>{const t=e[0];return"L"===t||";"===t?this.moment.localeData(this.getCurrentLocaleCode()).longDateFormat(e):e}).join("").replace(/a/gi,"(a|p)m").toLocaleLowerCase())&&void 0!==i?i:e},this.getCurrentLocaleCode=()=>this.locale||this.moment.locale(),this.parseISO=e=>this.moment(e,!0),this.toISO=e=>e.toISOString(),this.parse=(e,t)=>""===e?null:this.locale?this.moment(e,t,this.locale,!0):this.moment(e,t,!0),this.date=e=>{if(null===e)return null;const t=this.moment(e);return this.locale&&t.locale(this.locale),t},this.toJsDate=e=>e.toDate(),this.isValid=e=>this.moment(e).isValid(),this.isNull=e=>null===e,this.getDiff=(e,t,i)=>this.moment(t).isValid()?e.diff(t,i):0,this.isAfter=(e,t)=>e.isAfter(t),this.isBefore=(e,t)=>e.isBefore(t),this.isAfterDay=(e,t)=>e.isAfter(t,"day"),this.isBeforeDay=(e,t)=>e.isBefore(t,"day"),this.isBeforeMonth=(e,t)=>e.isBefore(t,"month"),this.isAfterMonth=(e,t)=>e.isAfter(t,"month"),this.isBeforeYear=(e,t)=>e.isBefore(t,"year"),this.isAfterYear=(e,t)=>e.isAfter(t,"year"),this.startOfDay=e=>e.clone().startOf("day"),this.endOfDay=e=>e.clone().endOf("day"),this.format=(e,t)=>this.formatByString(e,this.formats[t]),this.formatByString=(e,t)=>{const i=e.clone();return this.locale&&i.locale(this.locale),i.format(t)},this.formatNumber=e=>e,this.getHours=e=>e.get("hours"),this.addSeconds=(e,t)=>t<0?e.clone().subtract(Math.abs(t),"seconds"):e.clone().add(t,"seconds"),this.addMinutes=(e,t)=>t<0?e.clone().subtract(Math.abs(t),"minutes"):e.clone().add(t,"minutes"),this.addHours=(e,t)=>t<0?e.clone().subtract(Math.abs(t),"hours"):e.clone().add(t,"hours"),this.addDays=(e,t)=>t<0?e.clone().subtract(Math.abs(t),"days"):e.clone().add(t,"days"),this.addWeeks=(e,t)=>t<0?e.clone().subtract(Math.abs(t),"weeks"):e.clone().add(t,"weeks"),this.addMonths=(e,t)=>t<0?e.clone().subtract(Math.abs(t),"months"):e.clone().add(t,"months"),this.addYears=(e,t)=>t<0?e.clone().subtract(Math.abs(t),"years"):e.clone().add(t,"years"),this.setHours=(e,t)=>e.clone().hours(t),this.getMinutes=e=>e.get("minutes"),this.setMinutes=(e,t)=>e.clone().minutes(t),this.getSeconds=e=>e.get("seconds"),this.setSeconds=(e,t)=>e.clone().seconds(t),this.getMonth=e=>e.get("month"),this.getDaysInMonth=e=>e.daysInMonth(),this.isSameDay=(e,t)=>e.isSame(t,"day"),this.isSameMonth=(e,t)=>e.isSame(t,"month"),this.isSameYear=(e,t)=>e.isSame(t,"year"),this.isSameHour=(e,t)=>e.isSame(t,"hour"),this.setMonth=(e,t)=>e.clone().month(t),this.getMeridiemText=e=>this.is12HourCycleInCurrentLocale()?this.moment.localeData(this.getCurrentLocaleCode()).meridiem("am"===e?0:13,0,!1):"am"===e?"AM":"PM",this.startOfYear=e=>e.clone().startOf("year"),this.endOfYear=e=>e.clone().endOf("year"),this.startOfMonth=e=>e.clone().startOf("month"),this.endOfMonth=e=>e.clone().endOf("month"),this.startOfWeek=e=>e.clone().startOf("week"),this.endOfWeek=e=>e.clone().endOf("week"),this.getNextMonth=e=>e.clone().add(1,"month"),this.getPreviousMonth=e=>e.clone().subtract(1,"month"),this.getMonthArray=e=>{const t=[e.clone().startOf("year")];for(;t.length<12;){const e=t[t.length-1];t.push(this.getNextMonth(e))}return t},this.getYear=e=>e.get("year"),this.setYear=(e,t)=>e.clone().set("year",t),this.getDate=e=>e.get("date"),this.setDate=(e,t)=>e.clone().set("date",t),this.mergeDateAndTime=(e,t)=>e.hour(t.hour()).minute(t.minute()).second(t.second()),this.getWeekdays=()=>this.moment.weekdaysShort(!0),this.isEqual=(e,t)=>null===e&&null===t||this.moment(e).isSame(t),this.getWeekArray=e=>{const t=e.clone().startOf("month").startOf("week"),i=e.clone().endOf("month").endOf("week");let n=0,s=t;const r=[];for(;s.isBefore(i);){const e=Math.floor(n/7);r[e]=r[e]||[],r[e].push(s),s=s.clone().add(1,"day"),n+=1}return r},this.getYearRange=(e,t)=>{const i=this.moment(e).startOf("year"),n=this.moment(t).endOf("year"),s=[];let r=i;for(;r.isBefore(n);)s.push(r),r=r.clone().add(1,"year");return s},this.isWithinRange=(e,[t,i])=>e.isBetween(t,i,null,"[]"),this.moment=i||s(),this.locale=e,this.formats=Object.assign({},r,t)}}},41487(e,t,i){"use strict";i.r(t),i.d(t,{default:()=>m});var n=i(8900),s=i(46903),r=i(75612),o=i(16253),a=i(95093),l=i(3746),c=i(39574),h=function(e,t,i){for(var n=0,s=0;n=s,s=(0,a.se)(),38===n&&12===s&&(t[i]=1),!(0,a.Sh)(s);)(0,a.K2)();return(0,a.di)(e,a.G1)},d=new WeakMap,u=function(e){if("rule"===e.type&&e.parent&&!(e.length<1)){for(var t=e.value,i=e.parent,n=e.column===i.column&&e.line===i.line;"rule"!==i.type;)if(!(i=i.parent))return;if((1!==e.props.length||58===t.charCodeAt(0)||d.get(i))&&!n){d.set(e,!0);for(var s=[],o=function(e,t){return(0,a.VF)(function(e,t){var i=-1,n=44;do{switch((0,a.Sh)(n)){case 0:38===n&&12===(0,a.se)()&&(t[i]=1),e[i]+=h(a.G1-1,t,i);break;case 2:e[i]+=(0,a.Tb)(n);break;case 4:if(44===n){e[++i]=58===(0,a.se)()?"&\f":"",t[i]=e[i].length;break}default:e[i]+=(0,r.HT)(n)}}while(n=(0,a.K2)());return e}((0,a.c4)(e),t))}(t,s),l=i.props,c=0,u=0;c<o.length;c++)for(var p=0;p<l.length;p++,u++)e.props[u]=s[c]?o[c].replace(/&\f/g,l[p]):l[p]+" "+o[c]}}},p=function(e){if("decl"===e.type){var t=e.value;108===t.charCodeAt(0)&&98===t.charCodeAt(2)&&(e.return="",e.value="")}};function g(e,t){switch((0,r.tW)(e,t)){case 5103:return s.j+"print-"+e+e;case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 6391:case 5879:case 5623:case 6135:case 4599:case 4855:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:return s.j+e+e;case 5349:case 4246:case 4810:case 6968:case 2756:return s.j+e+s.vd+e+s.MS+e+e;case 6828:case 4268:return s.j+e+s.MS+e+e;case 6165:return s.j+e+s.MS+"flex-"+e+e;case 5187:return s.j+e+(0,r.HC)(e,/(\w+).+(:[^]+)/,s.j+"box-$1$2"+s.MS+"flex-$1$2")+e;case 5443:return s.j+e+s.MS+"flex-item-"+(0,r.HC)(e,/flex-|-self/,"")+e;case 4675:return s.j+e+s.MS+"flex-line-pack"+(0,r.HC)(e,/align-content|flex-|-self/,"")+e;case 5548:return s.j+e+s.MS+(0,r.HC)(e,"shrink","negative")+e;case 5292:return s.j+e+s.MS+(0,r.HC)(e,"basis","preferred-size")+e;case 6060:return s.j+"box-"+(0,r.HC)(e,"-grow","")+s.j+e+s.MS+(0,r.HC)(e,"grow","positive")+e;case 4554:return s.j+(0,r.HC)(e,/([^-])(transform)/g,"$1"+s.j+"$2")+e;case 6187:return(0,r.HC)((0,r.HC)((0,r.HC)(e,/(zoom-|grab)/,s.j+"$1"),/(image-set)/,s.j+"$1"),e,"")+e;case 5495:case 3959:return(0,r.HC)(e,/(image-set\([^]*)/,s.j+"$1$`$1");case 4968:return(0,r.HC)((0,r.HC)(e,/(.+:)(flex-)?(.*)/,s.j+"box-pack:$3"+s.MS+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+s.j+e+e;case 4095:case 3583:case 4068:case 2532:return(0,r.HC)(e,/(.+)-inline(.+)/,s.j+"$1$2")+e;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if((0,r.b2)(e)-1-t>6)switch((0,r.wN)(e,t+1)){case 109:if(45!==(0,r.wN)(e,t+4))break;case 102:return(0,r.HC)(e,/(.+:)(.+)-([^]+)/,"$1"+s.j+"$2-$3$1"+s.vd+(108==(0,r.wN)(e,t+3)?"$3":"$2-$3"))+e;case 115:return~(0,r.K5)(e,"stretch")?g((0,r.HC)(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(115!==(0,r.wN)(e,t+1))break;case 6444:switch((0,r.wN)(e,(0,r.b2)(e)-3-(~(0,r.K5)(e,"!important")&&10))){case 107:return(0,r.HC)(e,":",":"+s.j)+e;case 101:return(0,r.HC)(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+s.j+(45===(0,r.wN)(e,14)?"inline-":"")+"box$3$1"+s.j+"$2$3$1"+s.MS+"$2box$3")+e}break;case 5936:switch((0,r.wN)(e,t+11)){case 114:return s.j+e+s.MS+(0,r.HC)(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return s.j+e+s.MS+(0,r.HC)(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return s.j+e+s.MS+(0,r.HC)(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return s.j+e+s.MS+e+e}return e}var f=[function(e,t,i,n){if(e.length>-1&&!e.return)switch(e.type){case s.LU:e.return=g(e.value,e.length);break;case s.Sv:return(0,l.l)([(0,a.C)(e,{value:(0,r.HC)(e.value,"@","@"+s.j)})],n);case s.XZ:if(e.length)return(0,r.kg)(e.props,function(t){switch((0,r.YW)(t,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return(0,l.l)([(0,a.C)(e,{props:[(0,r.HC)(t,/:(read-\w+)/,":"+s.vd+"$1")]})],n);case"::placeholder":return(0,l.l)([(0,a.C)(e,{props:[(0,r.HC)(t,/:(plac\w+)/,":"+s.j+"input-$1")]}),(0,a.C)(e,{props:[(0,r.HC)(t,/:(plac\w+)/,":"+s.vd+"$1")]}),(0,a.C)(e,{props:[(0,r.HC)(t,/:(plac\w+)/,s.MS+"input-$1")]})],n)}return""})}}],m=function(e){var t=e.key;if("css"===t){var i=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(i,function(e){-1!==e.getAttribute("data-emotion").indexOf(" ")&&(document.head.appendChild(e),e.setAttribute("data-s",""))})}var s,r,a=e.stylisPlugins||f,h={},d=[];s=e.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+t+' "]'),function(e){for(var t=e.getAttribute("data-emotion").split(" "),i=1;i<t.length;i++)h[t[i]]=!0;d.push(e)});var g,m=[u,p],v=[l.A,(0,c.MY)(function(e){g.insert(e)})],y=(0,c.r1)(m.concat(a,v));r=function(e,t,i,n){var s;g=i,s=e?e+"{"+t.styles+"}":t.styles,(0,l.l)((0,o.wE)(s),y),n&&(C.inserted[t.name]=!0)};var C={key:t,sheet:new n.StyleSheet({key:t,container:s,nonce:e.nonce,speedy:e.speedy,prepend:e.prepend,insertionPoint:e.insertionPoint}),nonce:e.nonce,inserted:h,registered:{},insert:r};return C.sheet.hydrate(d),C}},22066(e,t,i){"use strict";i.r(t),i.d(t,{CacheProvider:()=>R,ClassNames:()=>U,Global:()=>G,ThemeContext:()=>I,createElement:()=>F,css:()=>_,jsx:()=>F,keyframes:()=>B,withEmotionCache:()=>L});var n=i(32252),s=i(22155),r=function(){function e(e){this.isSpeedy=void 0===e.speedy||e.speedy,this.tags=[],this.ctr=0,this.nonce=e.nonce,this.key=e.key,this.container=e.container,this.before=null}var t=e.prototype;return t.insert=function(e){if(this.ctr%(this.isSpeedy?65e3:1)==0){var t,i=function(e){var t=document.createElement("style");return t.setAttribute("data-emotion",e.key),void 0!==e.nonce&&t.setAttribute("nonce",e.nonce),t.appendChild(document.createTextNode("")),t}(this);t=0===this.tags.length?this.before:this.tags[this.tags.length-1].nextSibling,this.container.insertBefore(i,t),this.tags.push(i)}var n=this.tags[this.tags.length-1];if(this.isSpeedy){var s=function(e){if(e.sheet)return e.sheet;for(var t=0;t<document.styleSheets.length;t++)if(document.styleSheets[t].ownerNode===e)return document.styleSheets[t]}(n);try{var r=105===e.charCodeAt(1)&&64===e.charCodeAt(0);s.insertRule(e,r?0:s.cssRules.length)}catch(e){}}else n.appendChild(document.createTextNode(e));this.ctr++},t.flush=function(){this.tags.forEach(function(e){return e.parentNode.removeChild(e)}),this.tags=[],this.ctr=0},e}(),o=i(27903),a="/*|*/",l=a+"}";function c(e){e&&h.current.insert(e+"}")}var h={current:null},d=function(e,t,i,n,s,r,o,d,u,p){switch(e){case 1:switch(t.charCodeAt(0)){case 64:return h.current.insert(t+";"),"";case 108:if(98===t.charCodeAt(2))return""}break;case 2:if(0===d)return t+a;break;case 3:switch(d){case 102:case 112:return h.current.insert(i[0]+t),"";default:return t+(0===p?a:"")}case-2:t.split(l).forEach(c)}};function u(e,t,i){var n="";return i.split(" ").forEach(function(i){void 0!==e[i]?t.push(e[i]):n+=i+" "}),n}var p=function(e,t,i){var n=e.key+"-"+t.name;if(!1===i&&void 0===e.registered[n]&&(e.registered[n]=t.styles),void 0===e.inserted[t.name]){var s=t;do{e.insert("."+n,s,e.sheet,!0),s=s.next}while(void 0!==s)}};const g=function(e){for(var t,i=0,n=0,s=e.length;s>=4;++n,s-=4)t=1540483477*(65535&(t=255&e.charCodeAt(n)|(255&e.charCodeAt(++n))<<8|(255&e.charCodeAt(++n))<<16|(255&e.charCodeAt(++n))<<24))+(59797*(t>>>16)<<16),i=1540483477*(65535&(t^=t>>>24))+(59797*(t>>>16)<<16)^1540483477*(65535&i)+(59797*(i>>>16)<<16);switch(s){case 3:i^=(255&e.charCodeAt(n+2))<<16;case 2:i^=(255&e.charCodeAt(n+1))<<8;case 1:i=1540483477*(65535&(i^=255&e.charCodeAt(n)))+(59797*(i>>>16)<<16)}return(((i=1540483477*(65535&(i^=i>>>13))+(59797*(i>>>16)<<16))^i>>>15)>>>0).toString(36)};var f,m=i(55355),v=/[A-Z]|^ms/g,y=/_EMO_([^_]+?)_([^]*?)_EMO_/g,C=function(e){return 45===e.charCodeAt(1)},b=function(e){return null!=e&&"boolean"!=typeof e},S=(f={},function(e){return void 0===f[e]&&(f[e]=C(t=e)?t:t.replace(v,"-$&").toLowerCase()),f[e];var t}),w=function(e,t){switch(e){case"animation":case"animationName":if("string"==typeof t)return t.replace(y,function(e,t,i){return E={name:t,styles:i,next:E},t})}return 1===m.A[e]||C(e)||"number"!=typeof t||0===t?t:t+"px"};function x(e,t,i,n){if(null==i)return"";if(void 0!==i.__emotion_styles)return i;switch(typeof i){case"boolean":return"";case"object":if(1===i.anim)return E={name:i.name,styles:i.styles,next:E},i.name;if(void 0!==i.styles){var s=i.next;if(void 0!==s)for(;void 0!==s;)E={name:s.name,styles:s.styles,next:E},s=s.next;return i.styles+";"}return function(e,t,i){var n="";if(Array.isArray(i))for(var s=0;s<i.length;s++)n+=x(e,t,i[s],!1);else for(var r in i){var o=i[r];if("object"!=typeof o)null!=t&&void 0!==t[o]?n+=r+"{"+t[o]+"}":b(o)&&(n+=S(r)+":"+w(r,o)+";");else if(!Array.isArray(o)||"string"!=typeof o[0]||null!=t&&void 0!==t[o[0]]){var a=x(e,t,o,!1);switch(r){case"animation":case"animationName":n+=S(r)+":"+a+";";break;default:n+=r+"{"+a+"}"}}else for(var l=0;l<o.length;l++)b(o[l])&&(n+=S(r)+":"+w(r,o[l])+";")}return n}(e,t,i);case"function":if(void 0!==e){var r=E,o=i(e);return E=r,x(e,t,o,n)}}if(null==t)return i;var a=t[i];return void 0===a||n?i:a}var E,M=/label:\s*([^\s;\n{]+)\s*;/g,A=function(e,t,i){if(1===e.length&&"object"==typeof e[0]&&null!==e[0]&&void 0!==e[0].styles)return e[0];var n=!0,s="";E=void 0;var r=e[0];null==r||void 0===r.raw?(n=!1,s+=x(i,t,r,!1)):s+=r[0];for(var o=1;o<e.length;o++)s+=x(i,t,e[o],46===s.charCodeAt(s.length-1)),n&&(s+=r[o]);M.lastIndex=0;for(var a,l="";null!==(a=M.exec(s));)l+="-"+a[1];return{name:g(s)+l,styles:s,next:E}},T=Object.prototype.hasOwnProperty,D=(0,s.createContext)("undefined"!=typeof HTMLElement?function(e){void 0===e&&(e={});var t,i=e.key||"css";void 0!==e.prefix&&(t={prefix:e.prefix});var n,s=new o.A(t),a={};n=e.container||document.head;var l,c=document.querySelectorAll("style[data-emotion-"+i+"]");Array.prototype.forEach.call(c,function(e){e.getAttribute("data-emotion-"+i).split(" ").forEach(function(e){a[e]=!0}),e.parentNode!==n&&n.appendChild(e)}),s.use(e.stylisPlugins)(d),l=function(e,t,i,n){var r=t.name;h.current=i,s(e,t.styles),n&&(u.inserted[r]=!0)};var u={key:i,sheet:new r({key:i,container:n,nonce:e.nonce,speedy:e.speedy}),nonce:e.nonce,inserted:a,registered:{},insert:l};return u}():null),I=(0,s.createContext)({}),R=D.Provider,L=function(e){var t=function(t,i){return(0,s.createElement)(D.Consumer,null,function(n){return e(t,n,i)})};return(0,s.forwardRef)(t)},k="__EMOTION_TYPE_PLEASE_DO_NOT_USE__",P=function(){return null},N=function(e,t,i,n){var r=null===i?t.css:t.css(i);"string"==typeof r&&void 0!==e.registered[r]&&(r=e.registered[r]);var o=t[k],a=[r],l="";"string"==typeof t.className?l=u(e.registered,a,t.className):null!=t.className&&(l=t.className+" ");var c=A(a);p(e,c,"string"==typeof o),l+=e.key+"-"+c.name;var h={};for(var d in t)T.call(t,d)&&"css"!==d&&d!==k&&(h[d]=t[d]);h.ref=n,h.className=l;var g=(0,s.createElement)(o,h),f=(0,s.createElement)(P,null);return(0,s.createElement)(s.Fragment,null,f,g)},O=L(function(e,t,i){return"function"==typeof e.css?(0,s.createElement)(I.Consumer,null,function(n){return N(t,e,n,i)}):N(t,e,null,i)});const _=function(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];return A(t)};var F=function(e,t){var i=arguments;if(null==t||!T.call(t,"css"))return s.createElement.apply(void 0,i);var n=i.length,r=new Array(n);r[0]=O,r[1]=function(e,t){var i={};for(var n in t)T.call(t,n)&&(i[n]=t[n]);return i[k]=e,i}(e,t);for(var o=2;o<n;o++)r[o]=i[o];return s.createElement.apply(null,r)},G=L(function(e,t){var i=e.styles;if("function"==typeof i)return(0,s.createElement)(I.Consumer,null,function(e){var n=A([i(e)]);return(0,s.createElement)(V,{serialized:n,cache:t})});var n=A([i]);return(0,s.createElement)(V,{serialized:n,cache:t})}),V=function(e){function t(t,i,n){return e.call(this,t,i,n)||this}(0,n.A)(t,e);var i=t.prototype;return i.componentDidMount=function(){this.sheet=new r({key:this.props.cache.key+"-global",nonce:this.props.cache.sheet.nonce,container:this.props.cache.sheet.container});var e=document.querySelector("style[data-emotion-"+this.props.cache.key+'="'+this.props.serialized.name+'"]');null!==e&&this.sheet.tags.push(e),this.props.cache.sheet.tags.length&&(this.sheet.before=this.props.cache.sheet.tags[0]),this.insertStyles()},i.componentDidUpdate=function(e){e.serialized.name!==this.props.serialized.name&&this.insertStyles()},i.insertStyles=function(){if(void 0!==this.props.serialized.next&&p(this.props.cache,this.props.serialized.next,!0),this.sheet.tags.length){var e=this.sheet.tags[this.sheet.tags.length-1].nextElementSibling;this.sheet.before=e,this.sheet.flush()}this.props.cache.insert("",this.props.serialized,this.sheet,!1)},i.componentWillUnmount=function(){this.sheet.flush()},i.render=function(){return null},t}(s.Component),B=function(){var e=_.apply(void 0,arguments),t="animation-"+e.name;return{name:t,styles:"@keyframes "+t+"{"+e.styles+"}",anim:1,toString:function(){return"_EMO_"+this.name+"_"+this.styles+"_EMO_"}}},H=function e(t){for(var i=t.length,n=0,s="";n<i;n++){var r=t[n];if(null!=r){var o=void 0;switch(typeof r){case"boolean":break;case"object":if(Array.isArray(r))o=e(r);else for(var a in o="",r)r[a]&&a&&(o&&(o+=" "),o+=a);break;default:o=r}o&&(s&&(s+=" "),s+=o)}}return s},z=function(){return null},U=L(function(e,t){return(0,s.createElement)(I.Consumer,null,function(i){var n=function(){for(var e=arguments.length,i=new Array(e),n=0;n<e;n++)i[n]=arguments[n];var s=A(i,t.registered);return p(t,s,!1),t.key+"-"+s.name},r={css:n,cx:function(){for(var e=arguments.length,i=new Array(e),s=0;s<e;s++)i[s]=arguments[s];return function(e,t,i){var n=[],s=u(e,n,i);return n.length<2?i:s+t(n)}(t.registered,n,H(i))},theme:i},o=e.children(r),a=(0,s.createElement)(z,null);return(0,s.createElement)(s.Fragment,null,a,o)})})},99302(e,t,i){"use strict";i.d(t,{A:()=>r});var n=i(78371),s=/^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|disableRemotePlayback|download|draggable|encType|enterKeyHint|fetchpriority|fetchPriority|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|popover|popoverTarget|popoverTargetAction|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/,r=(0,n.A)(function(e){return s.test(e)||111===e.charCodeAt(0)&&110===e.charCodeAt(1)&&e.charCodeAt(2)<91})},78371(e,t,i){"use strict";function n(e){var t=Object.create(null);return function(i){return void 0===t[i]&&(t[i]=e(i)),t[i]}}i.d(t,{A:()=>n})},95803(e,t,i){"use strict";i.d(t,{C:()=>g,E:()=>A,T:()=>v,_:()=>f,a:()=>b,b:()=>S,c:()=>E,h:()=>w,i:()=>u,u:()=>y,w:()=>m});var n=i(22155),s=i(41487),r=i(67311),o=function(e){var t=new WeakMap;return function(i){if(t.has(i))return t.get(i);var n=e(i);return t.set(i,n),n}},a=i(4674),l=i.n(a),c=i(60966),h=i(22855),d=i(82504),u=!1,p=n.createContext("undefined"!=typeof HTMLElement?(0,s.default)({key:"css"}):null),g=p.Provider,f=function(){return(0,n.useContext)(p)},m=function(e){return(0,n.forwardRef)(function(t,i){var s=(0,n.useContext)(p);return e(t,s,i)})},v=n.createContext({}),y=function(){return n.useContext(v)},C=o(function(e){return o(function(t){return function(e,t){return"function"==typeof t?t(e):(0,r.A)({},e,t)}(e,t)})}),b=function(e){var t=n.useContext(v);return e.theme!==t&&(t=C(t)(e.theme)),n.createElement(v.Provider,{value:t},e.children)};function S(e){var t,i,s=e.displayName||e.name||"Component",o=n.forwardRef(function(t,i){var s=n.useContext(v);return n.createElement(e,(0,r.A)({theme:s,ref:i},t))});return o.displayName="WithTheme("+s+")",t=o,i=e,l()(t,i)}var w={}.hasOwnProperty,x="__EMOTION_TYPE_PLEASE_DO_NOT_USE__",E=function(e,t){var i={};for(var n in t)w.call(t,n)&&(i[n]=t[n]);return i[x]=e,i},M=function(e){var t=e.cache,i=e.serialized,n=e.isStringTag;return(0,c.SF)(t,i,n),(0,d.s)(function(){return(0,c.sk)(t,i,n)}),null},A=m(function(e,t,i){var s=e.css;"string"==typeof s&&void 0!==t.registered[s]&&(s=t.registered[s]);var r=e[x],o=[s],a="";"string"==typeof e.className?a=(0,c.Rk)(t.registered,o,e.className):null!=e.className&&(a=e.className+" ");var l=(0,h.serializeStyles)(o,void 0,n.useContext(v));a+=t.key+"-"+l.name;var d={};for(var p in e)w.call(e,p)&&"css"!==p&&p!==x&&!u&&(d[p]=e[p]);return d.className=a,i&&(d.ref=i),n.createElement(n.Fragment,null,n.createElement(M,{cache:t,serialized:l,isStringTag:"string"==typeof r}),n.createElement(r,d))})},95349(e,t,i){"use strict";i.r(t),i.d(t,{CacheProvider:()=>r.C,ClassNames:()=>m,Global:()=>d,ThemeContext:()=>r.T,ThemeProvider:()=>r.a,__unsafe_useEmotionCache:()=>r._,createElement:()=>h,css:()=>u,jsx:()=>h,keyframes:()=>p,useTheme:()=>r.u,withEmotionCache:()=>r.w,withTheme:()=>r.b});var n,s,r=i(95803),o=i(22155),a=i(60966),l=i(82504),c=i(22855),h=(i(41487),i(4674),function(e,t){var i=arguments;if(null==t||!r.h.call(t,"css"))return o.createElement.apply(void 0,i);var n=i.length,s=new Array(n);s[0]=r.E,s[1]=(0,r.c)(e,t);for(var a=2;a<n;a++)s[a]=i[a];return o.createElement.apply(null,s)});n=h||(h={}),s||(s=n.JSX||(n.JSX={}));var d=(0,r.w)(function(e,t){var i=e.styles,n=(0,c.serializeStyles)([i],void 0,o.useContext(r.T)),s=o.useRef();return(0,l.i)(function(){var e=t.key+"-global",i=new t.sheet.constructor({key:e,nonce:t.sheet.nonce,container:t.sheet.container,speedy:t.sheet.isSpeedy}),r=!1,o=document.querySelector('style[data-emotion="'+e+" "+n.name+'"]');return t.sheet.tags.length&&(i.before=t.sheet.tags[0]),null!==o&&(r=!0,o.setAttribute("data-emotion",e),i.hydrate([o])),s.current=[i,r],function(){i.flush()}},[t]),(0,l.i)(function(){var e=s.current,i=e[0];if(e[1])e[1]=!1;else{if(void 0!==n.next&&(0,a.sk)(t,n.next,!0),i.tags.length){var r=i.tags[i.tags.length-1].nextElementSibling;i.before=r,i.flush()}t.insert("",n,i,!1)}},[t,n.name]),null});function u(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];return(0,c.serializeStyles)(t)}function p(){var e=u.apply(void 0,arguments),t="animation-"+e.name;return{name:t,styles:"@keyframes "+t+"{"+e.styles+"}",anim:1,toString:function(){return"_EMO_"+this.name+"_"+this.styles+"_EMO_"}}}var g=function e(t){for(var i=t.length,n=0,s="";n<i;n++){var r=t[n];if(null!=r){var o=void 0;switch(typeof r){case"boolean":break;case"object":if(Array.isArray(r))o=e(r);else for(var a in o="",r)r[a]&&a&&(o&&(o+=" "),o+=a);break;default:o=r}o&&(s&&(s+=" "),s+=o)}}return s},f=function(e){var t=e.cache,i=e.serializedArr;return(0,l.s)(function(){for(var e=0;e<i.length;e++)(0,a.sk)(t,i[e],!1)}),null},m=(0,r.w)(function(e,t){var i=!1,n=[],s=function(){if(i&&r.i)throw new Error("css can only be used during render");for(var e=arguments.length,s=new Array(e),o=0;o<e;o++)s[o]=arguments[o];var l=(0,c.serializeStyles)(s,t.registered);return n.push(l),(0,a.SF)(t,l,!1),t.key+"-"+l.name},l={css:s,cx:function(){if(i&&r.i)throw new Error("cx can only be used during render");for(var e=arguments.length,n=new Array(e),o=0;o<e;o++)n[o]=arguments[o];return function(e,t,i){var n=[],s=(0,a.Rk)(e,n,i);return n.length<2?i:s+t(n)}(t.registered,s,g(n))},theme:o.useContext(r.T)},h=e.children(l);return i=!0,o.createElement(o.Fragment,null,o.createElement(f,{cache:t,serializedArr:n}),h)})},22855(e,t,i){"use strict";i.r(t),i.d(t,{serializeStyles:()=>g});var n={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,scale:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},s=i(78371),r=/[A-Z]|^ms/g,o=/_EMO_([^_]+?)_([^]*?)_EMO_/g,a=function(e){return 45===e.charCodeAt(1)},l=function(e){return null!=e&&"boolean"!=typeof e},c=(0,s.A)(function(e){return a(e)?e:e.replace(r,"-$&").toLowerCase()}),h=function(e,t){switch(e){case"animation":case"animationName":if("string"==typeof t)return t.replace(o,function(e,t,i){return u={name:t,styles:i,next:u},t})}return 1===n[e]||a(e)||"number"!=typeof t||0===t?t:t+"px"};function d(e,t,i){if(null==i)return"";var n=i;if(void 0!==n.__emotion_styles)return n;switch(typeof i){case"boolean":return"";case"object":var s=i;if(1===s.anim)return u={name:s.name,styles:s.styles,next:u},s.name;var r=i;if(void 0!==r.styles){var o=r.next;if(void 0!==o)for(;void 0!==o;)u={name:o.name,styles:o.styles,next:u},o=o.next;return r.styles+";"}return function(e,t,i){var n="";if(Array.isArray(i))for(var s=0;s<i.length;s++)n+=d(e,t,i[s])+";";else for(var r in i){var o=i[r];if("object"!=typeof o){var a=o;null!=t&&void 0!==t[a]?n+=r+"{"+t[a]+"}":l(a)&&(n+=c(r)+":"+h(r,a)+";")}else if(!Array.isArray(o)||"string"!=typeof o[0]||null!=t&&void 0!==t[o[0]]){var u=d(e,t,o);switch(r){case"animation":case"animationName":n+=c(r)+":"+u+";";break;default:n+=r+"{"+u+"}"}}else for(var p=0;p<o.length;p++)l(o[p])&&(n+=c(r)+":"+h(r,o[p])+";")}return n}(e,t,i);case"function":if(void 0!==e){var a=u,p=i(e);return u=a,d(e,t,p)}}var g=i;if(null==t)return g;var f=t[g];return void 0!==f?f:g}var u,p=/label:\s*([^\s;{]+)\s*(;|$)/g;function g(e,t,i){if(1===e.length&&"object"==typeof e[0]&&null!==e[0]&&void 0!==e[0].styles)return e[0];var n=!0,s="";u=void 0;var r=e[0];null==r||void 0===r.raw?(n=!1,s+=d(i,t,r)):s+=r[0];for(var o=1;o<e.length;o++)s+=d(i,t,e[o]),n&&(s+=r[o]);p.lastIndex=0;for(var a,l="";null!==(a=p.exec(s));)l+="-"+a[1];var c=function(e){for(var t,i=0,n=0,s=e.length;s>=4;++n,s-=4)t=1540483477*(65535&(t=255&e.charCodeAt(n)|(255&e.charCodeAt(++n))<<8|(255&e.charCodeAt(++n))<<16|(255&e.charCodeAt(++n))<<24))+(59797*(t>>>16)<<16),i=1540483477*(65535&(t^=t>>>24))+(59797*(t>>>16)<<16)^1540483477*(65535&i)+(59797*(i>>>16)<<16);switch(s){case 3:i^=(255&e.charCodeAt(n+2))<<16;case 2:i^=(255&e.charCodeAt(n+1))<<8;case 1:i=1540483477*(65535&(i^=255&e.charCodeAt(n)))+(59797*(i>>>16)<<16)}return(((i=1540483477*(65535&(i^=i>>>13))+(59797*(i>>>16)<<16))^i>>>15)>>>0).toString(36)}(s)+l;return{name:c,styles:s,next:u}}},8900(e,t,i){"use strict";i.r(t),i.d(t,{StyleSheet:()=>n});var n=function(){function e(e){var t=this;this._insertTag=function(e){var i;i=0===t.tags.length?t.insertionPoint?t.insertionPoint.nextSibling:t.prepend?t.container.firstChild:t.before:t.tags[t.tags.length-1].nextSibling,t.container.insertBefore(e,i),t.tags.push(e)},this.isSpeedy=void 0===e.speedy||e.speedy,this.tags=[],this.ctr=0,this.nonce=e.nonce,this.key=e.key,this.container=e.container,this.prepend=e.prepend,this.insertionPoint=e.insertionPoint,this.before=null}var t=e.prototype;return t.hydrate=function(e){e.forEach(this._insertTag)},t.insert=function(e){this.ctr%(this.isSpeedy?65e3:1)==0&&this._insertTag(function(e){var t=document.createElement("style");return t.setAttribute("data-emotion",e.key),void 0!==e.nonce&&t.setAttribute("nonce",e.nonce),t.appendChild(document.createTextNode("")),t.setAttribute("data-s",""),t}(this));var t=this.tags[this.tags.length-1];if(this.isSpeedy){var i=function(e){if(e.sheet)return e.sheet;for(var t=0;t<document.styleSheets.length;t++)if(document.styleSheets[t].ownerNode===e)return document.styleSheets[t]}(t);try{i.insertRule(e,i.cssRules.length)}catch(e){}}else t.appendChild(document.createTextNode(e));this.ctr++},t.flush=function(){this.tags.forEach(function(e){var t;return null==(t=e.parentNode)?void 0:t.removeChild(e)}),this.tags=[],this.ctr=0},e}()},41786(e,t,i){"use strict";i.r(t),i.d(t,{default:()=>g});var n=i(67311),s=i(95803),r=i(22855),o=i(82504),a=i(60966),l=i(22155),c=i(99302).A,h=function(e){return"theme"!==e},d=function(e){return"string"==typeof e&&e.charCodeAt(0)>96?c:h},u=function(e,t,i){var n;if(t){var s=t.shouldForwardProp;n=e.__emotion_forwardProp&&s?function(t){return e.__emotion_forwardProp(t)&&s(t)}:s}return"function"!=typeof n&&i&&(n=e.__emotion_forwardProp),n},p=function(e){var t=e.cache,i=e.serialized,n=e.isStringTag;return(0,a.SF)(t,i,n),(0,o.s)(function(){return(0,a.sk)(t,i,n)}),null},g=function e(t,i){var o,c,h=t.__emotion_real===t,g=h&&t.__emotion_base||t;void 0!==i&&(o=i.label,c=i.target);var f=u(t,i,h),m=f||d(g),v=!m("as");return function(){var y=arguments,C=h&&void 0!==t.__emotion_styles?t.__emotion_styles.slice(0):[];if(void 0!==o&&C.push("label:"+o+";"),null==y[0]||void 0===y[0].raw)C.push.apply(C,y);else{var b=y[0];C.push(b[0]);for(var S=y.length,w=1;w<S;w++)C.push(y[w],b[w])}var x=(0,s.w)(function(e,t,i){var n=v&&e.as||g,o="",h=[],u=e;if(null==e.theme){for(var y in u={},e)u[y]=e[y];u.theme=l.useContext(s.T)}"string"==typeof e.className?o=(0,a.Rk)(t.registered,h,e.className):null!=e.className&&(o=e.className+" ");var b=(0,r.serializeStyles)(C.concat(h),t.registered,u);o+=t.key+"-"+b.name,void 0!==c&&(o+=" "+c);var S=v&&void 0===f?d(n):m,w={};for(var x in e)v&&"as"===x||S(x)&&(w[x]=e[x]);return w.className=o,i&&(w.ref=i),l.createElement(l.Fragment,null,l.createElement(p,{cache:t,serialized:b,isStringTag:"string"==typeof n}),l.createElement(n,w))});return x.displayName=void 0!==o?o:"Styled("+("string"==typeof g?g:g.displayName||g.name||"Component")+")",x.defaultProps=t.defaultProps,x.__emotion_real=x,x.__emotion_base=g,x.__emotion_styles=C,x.__emotion_forwardProp=f,Object.defineProperty(x,"toString",{value:function(){return"."+c}}),x.withComponent=function(t,s){return e(t,(0,n.A)({},i,s,{shouldForwardProp:u(x,s,!0)})).apply(void 0,C)},x}}.bind(null);["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","marquee","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","tspan"].forEach(function(e){g[e]=g(e)})},27903(e,t,i){"use strict";i.d(t,{A:()=>n});const n=function(e){function t(e,n,l,c,u){for(var p,g,f,m,b,w=0,x=0,E=0,M=0,A=0,k=0,N=f=p=0,_=0,F=0,G=0,V=0,B=l.length,H=B-1,z="",U="",W="",j="";_<B;){if(g=l.charCodeAt(_),_===H&&0!==x+M+E+w&&(0!==x&&(g=47===x?10:47),M=E=w=0,B++,H++),0===x+M+E+w){if(_===H&&(0<F&&(z=z.replace(d,"")),0<z.trim().length)){switch(g){case 32:case 9:case 59:case 13:case 10:break;default:z+=l.charAt(_)}g=59}switch(g){case 123:for(p=(z=z.trim()).charCodeAt(0),f=1,V=++_;_<B;){switch(g=l.charCodeAt(_)){case 123:f++;break;case 125:f--;break;case 47:switch(g=l.charCodeAt(_+1)){case 42:case 47:e:{for(N=_+1;N<H;++N)switch(l.charCodeAt(N)){case 47:if(42===g&&42===l.charCodeAt(N-1)&&_+2!==N){_=N+1;break e}break;case 10:if(47===g){_=N+1;break e}}_=N}}break;case 91:g++;case 40:g++;case 34:case 39:for(;_++<H&&l.charCodeAt(_)!==g;);}if(0===f)break;_++}if(f=l.substring(V,_),0===p&&(p=(z=z.replace(h,"").trim()).charCodeAt(0)),64===p){switch(0<F&&(z=z.replace(d,"")),g=z.charCodeAt(1)){case 100:case 109:case 115:case 45:F=n;break;default:F=L}if(V=(f=t(n,F,f,g,u+1)).length,0<P&&(b=a(3,f,F=i(L,z,G),n,D,T,V,g,u,c),z=F.join(""),void 0!==b&&0===(V=(f=b.trim()).length)&&(g=0,f="")),0<V)switch(g){case 115:z=z.replace(S,o);case 100:case 109:case 45:f=z+"{"+f+"}";break;case 107:f=(z=z.replace(v,"$1 $2"))+"{"+f+"}",f=1===R||2===R&&r("@"+f,3)?"@-webkit-"+f+"@"+f:"@"+f;break;default:f=z+f,112===c&&(U+=f,f="")}else f=""}else f=t(n,i(n,z,G),f,c,u+1);W+=f,f=G=F=N=p=0,z="",g=l.charCodeAt(++_);break;case 125:case 59:if(1<(V=(z=(0<F?z.replace(d,""):z).trim()).length))switch(0===N&&(p=z.charCodeAt(0),45===p||96<p&&123>p)&&(V=(z=z.replace(" ",":")).length),0<P&&void 0!==(b=a(1,z,n,e,D,T,U.length,c,u,c))&&0===(V=(z=b.trim()).length)&&(z="\0\0"),p=z.charCodeAt(0),g=z.charCodeAt(1),p){case 0:break;case 64:if(105===g||99===g){j+=z+l.charAt(_);break}default:58!==z.charCodeAt(V-1)&&(U+=s(z,p,g,z.charCodeAt(2)))}G=F=N=p=0,z="",g=l.charCodeAt(++_)}}switch(g){case 13:case 10:47===x?x=0:0===1+p&&107!==c&&0<z.length&&(F=1,z+="\0"),0<P*O&&a(0,z,n,e,D,T,U.length,c,u,c),T=1,D++;break;case 59:case 125:if(0===x+M+E+w){T++;break}default:switch(T++,m=l.charAt(_),g){case 9:case 32:if(0===M+w+x)switch(A){case 44:case 58:case 9:case 32:m="";break;default:32!==g&&(m=" ")}break;case 0:m="\\0";break;case 12:m="\\f";break;case 11:m="\\v";break;case 38:0===M+x+w&&(F=G=1,m="\f"+m);break;case 108:if(0===M+x+w+I&&0<N)switch(_-N){case 2:112===A&&58===l.charCodeAt(_-3)&&(I=A);case 8:111===k&&(I=k)}break;case 58:0===M+x+w&&(N=_);break;case 44:0===x+E+M+w&&(F=1,m+="\r");break;case 34:case 39:0===x&&(M=M===g?0:0===M?g:M);break;case 91:0===M+x+E&&w++;break;case 93:0===M+x+E&&w--;break;case 41:0===M+x+w&&E--;break;case 40:0===M+x+w&&(0===p&&(2*A+3*k==533||(p=1)),E++);break;case 64:0===x+E+M+w+N+f&&(f=1);break;case 42:case 47:if(!(0<M+w+E))switch(x){case 0:switch(2*g+3*l.charCodeAt(_+1)){case 235:x=47;break;case 220:V=_,x=42}break;case 42:47===g&&42===A&&V+2!==_&&(33===l.charCodeAt(V+2)&&(U+=l.substring(V,_+1)),m="",x=0)}}0===x&&(z+=m)}k=A,A=g,_++}if(0<(V=U.length)){if(F=n,0<P&&void 0!==(b=a(2,U,F,e,D,T,V,c,u,c))&&0===(U=b).length)return j+U+W;if(U=F.join(",")+"{"+U+"}",0!==R*I){switch(2!==R||r(U,2)||(I=0),I){case 111:U=U.replace(C,":-moz-$1")+U;break;case 112:U=U.replace(y,"::-webkit-input-$1")+U.replace(y,"::-moz-$1")+U.replace(y,":-ms-input-$1")+U}I=0}}return j+U+W}function i(e,t,i){var s=t.trim().split(f);t=s;var r=s.length,o=e.length;switch(o){case 0:case 1:var a=0;for(e=0===o?"":e[0]+" ";a<r;++a)t[a]=n(e,t[a],i).trim();break;default:var l=a=0;for(t=[];a<r;++a)for(var c=0;c<o;++c)t[l++]=n(e[c]+" ",s[a],i).trim()}return t}function n(e,t,i){var n=t.charCodeAt(0);switch(33>n&&(n=(t=t.trim()).charCodeAt(0)),n){case 38:return t.replace(m,"$1"+e.trim());case 58:return e.trim()+t.replace(m,"$1"+e.trim());default:if(0<1*i&&0<t.indexOf("\f"))return t.replace(m,(58===e.charCodeAt(0)?"":"$1")+e.trim())}return e+t}function s(e,t,i,n){var o=e+";",a=2*t+3*i+4*n;if(944===a){e=o.indexOf(":",9)+1;var l=o.substring(e,o.length-1).trim();return l=o.substring(0,e).trim()+l+";",1===R||2===R&&r(l,1)?"-webkit-"+l+l:l}if(0===R||2===R&&!r(o,1))return o;switch(a){case 1015:return 97===o.charCodeAt(10)?"-webkit-"+o+o:o;case 951:return 116===o.charCodeAt(3)?"-webkit-"+o+o:o;case 963:return 110===o.charCodeAt(5)?"-webkit-"+o+o:o;case 1009:if(100!==o.charCodeAt(4))break;case 969:case 942:return"-webkit-"+o+o;case 978:return"-webkit-"+o+"-moz-"+o+o;case 1019:case 983:return"-webkit-"+o+"-moz-"+o+"-ms-"+o+o;case 883:if(45===o.charCodeAt(8))return"-webkit-"+o+o;if(0<o.indexOf("image-set(",11))return o.replace(A,"$1-webkit-$2")+o;break;case 932:if(45===o.charCodeAt(4))switch(o.charCodeAt(5)){case 103:return"-webkit-box-"+o.replace("-grow","")+"-webkit-"+o+"-ms-"+o.replace("grow","positive")+o;case 115:return"-webkit-"+o+"-ms-"+o.replace("shrink","negative")+o;case 98:return"-webkit-"+o+"-ms-"+o.replace("basis","preferred-size")+o}return"-webkit-"+o+"-ms-"+o+o;case 964:return"-webkit-"+o+"-ms-flex-"+o+o;case 1023:if(99!==o.charCodeAt(8))break;return"-webkit-box-pack"+(l=o.substring(o.indexOf(":",15)).replace("flex-","").replace("space-between","justify"))+"-webkit-"+o+"-ms-flex-pack"+l+o;case 1005:return p.test(o)?o.replace(u,":-webkit-")+o.replace(u,":-moz-")+o:o;case 1e3:switch(t=(l=o.substring(13).trim()).indexOf("-")+1,l.charCodeAt(0)+l.charCodeAt(t)){case 226:l=o.replace(b,"tb");break;case 232:l=o.replace(b,"tb-rl");break;case 220:l=o.replace(b,"lr");break;default:return o}return"-webkit-"+o+"-ms-"+l+o;case 1017:if(-1===o.indexOf("sticky",9))break;case 975:switch(t=(o=e).length-10,a=(l=(33===o.charCodeAt(t)?o.substring(0,t):o).substring(e.indexOf(":",7)+1).trim()).charCodeAt(0)+(0|l.charCodeAt(7))){case 203:if(111>l.charCodeAt(8))break;case 115:o=o.replace(l,"-webkit-"+l)+";"+o;break;case 207:case 102:o=o.replace(l,"-webkit-"+(102<a?"inline-":"")+"box")+";"+o.replace(l,"-webkit-"+l)+";"+o.replace(l,"-ms-"+l+"box")+";"+o}return o+";";case 938:if(45===o.charCodeAt(5))switch(o.charCodeAt(6)){case 105:return l=o.replace("-items",""),"-webkit-"+o+"-webkit-box-"+l+"-ms-flex-"+l+o;case 115:return"-webkit-"+o+"-ms-flex-item-"+o.replace(x,"")+o;default:return"-webkit-"+o+"-ms-flex-line-pack"+o.replace("align-content","").replace(x,"")+o}break;case 973:case 989:if(45!==o.charCodeAt(3)||122===o.charCodeAt(4))break;case 931:case 953:if(!0===M.test(e))return 115===(l=e.substring(e.indexOf(":")+1)).charCodeAt(0)?s(e.replace("stretch","fill-available"),t,i,n).replace(":fill-available",":stretch"):o.replace(l,"-webkit-"+l)+o.replace(l,"-moz-"+l.replace("fill-",""))+o;break;case 962:if(o="-webkit-"+o+(102===o.charCodeAt(5)?"-ms-"+o:"")+o,211===i+n&&105===o.charCodeAt(13)&&0<o.indexOf("transform",10))return o.substring(0,o.indexOf(";",27)+1).replace(g,"$1-webkit-$2")+o}return o}function r(e,t){var i=e.indexOf(1===t?":":"{"),n=e.substring(0,3!==t?i:10);return i=e.substring(i+1,e.length-1),N(2!==t?n:n.replace(E,"$1"),i,t)}function o(e,t){var i=s(t,t.charCodeAt(0),t.charCodeAt(1),t.charCodeAt(2));return i!==t+";"?i.replace(w," or ($1)").substring(4):"("+t+")"}function a(e,t,i,n,s,r,o,a,l,h){for(var d,u=0,p=t;u<P;++u)switch(d=k[u].call(c,e,p,i,n,s,r,o,a,l,h)){case void 0:case!1:case!0:case null:break;default:p=d}if(p!==t)return p}function l(e){return void 0!==(e=e.prefix)&&(N=null,e?"function"!=typeof e?R=1:(R=2,N=e):R=0),l}function c(e,i){var n=e;if(33>n.charCodeAt(0)&&(n=n.trim()),n=[n],0<P){var s=a(-1,i,n,n,D,T,0,0,0,0);void 0!==s&&"string"==typeof s&&(i=s)}var r=t(L,n,i,0,0);return 0<P&&void 0!==(s=a(-2,r,n,n,D,T,r.length,0,0,0))&&(r=s),I=0,T=D=1,r}var h=/^\0+/g,d=/[\0\r\f]/g,u=/: */g,p=/zoo|gra/,g=/([,: ])(transform)/g,f=/,\r+?/g,m=/([\t\r\n ])*\f?&/g,v=/@(k\w+)\s*(\S*)\s*/,y=/::(place)/g,C=/:(read-only)/g,b=/[svh]\w+-[tblr]{2}/,S=/\(\s*(.*)\s*\)/g,w=/([\s\S]*?);/g,x=/-self|flex-/g,E=/[^]*?(:[rp][el]a[\w-]+)[^]*/,M=/stretch|:\s*\w+\-(?:conte|avail)/,A=/([^-])(image-set\()/,T=1,D=1,I=0,R=1,L=[],k=[],P=0,N=null,O=0;return c.use=function e(t){switch(t){case void 0:case null:P=k.length=0;break;default:if("function"==typeof t)k[P++]=t;else if("object"==typeof t)for(var i=0,n=t.length;i<n;++i)e(t[i]);else O=0|!!t}return e},c.set=l,void 0!==e&&l(e),c}},55355(e,t,i){"use strict";i.d(t,{A:()=>n});const n={animationIterationCount:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1}},82504(e,t,i){"use strict";var n;i.d(t,{i:()=>a,s:()=>o});var s=i(22155),r=!!(n||(n=i.t(s,2))).useInsertionEffect&&(n||(n=i.t(s,2))).useInsertionEffect,o=r||function(e){return e()},a=r||s.useLayoutEffect},60966(e,t,i){"use strict";function n(e,t,i){var n="";return i.split(" ").forEach(function(i){void 0!==e[i]?t.push(e[i]+";"):i&&(n+=i+" ")}),n}i.d(t,{Rk:()=>n,SF:()=>s,sk:()=>r});var s=function(e,t,i){var n=e.key+"-"+t.name;!1===i&&void 0===e.registered[n]&&(e.registered[n]=t.styles)},r=function(e,t,i){s(e,t,i);var n=e.key+"-"+t.name;if(void 0===e.inserted[t.name]){var r=t;do{e.insert(t===r?"."+n:"",r,e.sheet,!0),r=r.next}while(void 0!==r)}}},25081(e,t,i){"use strict";i.r(t),i.d(t,{Composite:()=>ke,CompositeItem:()=>Pe,FloatingArrow:()=>Ve,FloatingDelayGroup:()=>nt,FloatingFocusManager:()=>kt,FloatingList:()=>ye,FloatingNode:()=>Ke,FloatingOverlay:()=>_t,FloatingPortal:()=>Et,FloatingTree:()=>$e,NextFloatingDelayGroup:()=>ot,arrow:()=>ge,autoPlacement:()=>de,autoUpdate:()=>J.ll,computePosition:()=>J.rD,detectOverflow:()=>J.__,flip:()=>ce,getOverflowAncestors:()=>r.v9,hide:()=>ue,inline:()=>pe,inner:()=>ui,limitShift:()=>le,offset:()=>oe,platform:()=>J.iD,safePolygon:()=>mi,shift:()=>ae,size:()=>he,useClick:()=>Vt,useClientPoint:()=>Ht,useDelayGroup:()=>st,useDelayGroupContext:()=>it,useDismiss:()=>jt,useFloating:()=>$t,useFloatingNodeId:()=>je,useFloatingParentNodeId:()=>Ue,useFloatingPortalNode:()=>xt,useFloatingRootContext:()=>Kt,useFloatingTree:()=>We,useFocus:()=>qt,useHover:()=>Je,useId:()=>Ge,useInnerOffset:()=>pi,useInteractions:()=>Zt,useListItem:()=>Ce,useListNavigation:()=>ni,useMergeRefs:()=>fe,useNextDelayGroup:()=>at,useRole:()=>ri,useTransitionStatus:()=>li,useTransitionStyles:()=>ci,useTypeahead:()=>hi});var n=i(22155),s=i.t(n,2),r=i(28442),o=i(67500),a=i(86668);function l(){const e=navigator.userAgentData;return null!=e&&e.platform?e.platform:navigator.platform}function c(){const e=navigator.userAgentData;return e&&Array.isArray(e.brands)?e.brands.map(e=>{let{brand:t,version:i}=e;return t+"/"+i}).join(" "):navigator.userAgent}function h(){return/apple/i.test(navigator.vendor)}function d(){const e=/android/i;return e.test(l())||e.test(c())}function u(){return c().includes("jsdom/")}const p="data-floating-ui-focusable",g="ArrowLeft",f="ArrowRight";function m(e){let t=e.activeElement;for(;null!=(null==(i=t)||null==(i=i.shadowRoot)?void 0:i.activeElement);){var i;t=t.shadowRoot.activeElement}return t}function v(e,t){if(!e||!t)return!1;const i=null==t.getRootNode?void 0:t.getRootNode();if(e.contains(t))return!0;if(i&&(0,r.Ng)(i)){let i=t;for(;i;){if(e===i)return!0;i=i.parentNode||i.host}}return!1}function y(e){return"composedPath"in e?e.composedPath()[0]:e.target}function C(e,t){if(null==t)return!1;if("composedPath"in e)return e.composedPath().includes(t);const i=e;return null!=i.target&&t.contains(i.target)}function b(e){return(null==e?void 0:e.ownerDocument)||document}function S(e){return(0,r.sb)(e)&&e.matches("input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])")}function w(e){return!!e&&"combobox"===e.getAttribute("role")&&S(e)}function x(e){return e?e.hasAttribute(p)?e:e.querySelector("["+p+"]")||e:null}function E(e,t,i){return void 0===i&&(i=!0),e.filter(e=>{var n;return e.parentId===t&&(!i||(null==(n=e.context)?void 0:n.open))}).flatMap(t=>[t,...E(e,t.id,i)])}function M(e,t){var i;let n=[],s=null==(i=e.find(e=>e.id===t))?void 0:i.parentId;for(;s;){const t=e.find(e=>e.id===s);s=null==t?void 0:t.parentId,t&&(n=n.concat(t))}return n}function A(e){e.preventDefault(),e.stopPropagation()}function T(e){return!(0!==e.mozInputSource||!e.isTrusted)||(d()&&e.pointerType?"click"===e.type&&1===e.buttons:0===e.detail&&!e.pointerType)}function D(e){return!u()&&(!d()&&0===e.width&&0===e.height||d()&&1===e.width&&1===e.height&&0===e.pressure&&0===e.detail&&"mouse"===e.pointerType||e.width<1&&e.height<1&&0===e.pressure&&0===e.detail&&"touch"===e.pointerType)}function I(e,t){const i=["mouse","pen"];return t||i.push("",void 0),i.includes(e)}var R="undefined"!=typeof document?n.useLayoutEffect:function(){};function L(e){const t=n.useRef(e);return R(()=>{t.current=e}),t}const k={...s}.useInsertionEffect||(e=>e());function P(e){const t=n.useRef(()=>{});return k(()=>{t.current=e}),n.useCallback(function(){for(var e=arguments.length,i=new Array(e),n=0;n<e;n++)i[n]=arguments[n];return null==t.current?void 0:t.current(...i)},[])}function N(e,t,i){return Math.floor(e/t)!==i}function O(e,t){return t<0||t>=e.current.length}function _(e,t){return G(e,{disabledIndices:t})}function F(e,t){return G(e,{decrement:!0,startingIndex:e.current.length,disabledIndices:t})}function G(e,t){let{startingIndex:i=-1,decrement:n=!1,disabledIndices:s,amount:r=1}=void 0===t?{}:t,o=i;do{o+=n?-r:r}while(o>=0&&o<=e.current.length-1&&U(e,o,s));return o}function V(e,t){let{event:i,orientation:n,loop:s,rtl:r,cols:a,disabledIndices:l,minIndex:c,maxIndex:h,prevIndex:d,stopEvent:u=!1}=t,p=d;if("ArrowUp"===i.key){if(u&&A(i),-1===d)p=h;else if(p=G(e,{startingIndex:p,amount:a,decrement:!0,disabledIndices:l}),s&&(d-a<c||p<0)){const e=d%a,t=h%a,i=h-(t-e);p=t===e?h:t>e?i:i-a}O(e,p)&&(p=d)}if("ArrowDown"===i.key&&(u&&A(i),-1===d?p=c:(p=G(e,{startingIndex:d,amount:a,disabledIndices:l}),s&&d+a>h&&(p=G(e,{startingIndex:d%a-a,amount:a,disabledIndices:l}))),O(e,p)&&(p=d)),"both"===n){const t=(0,o.RI)(d/a);i.key===(r?g:f)&&(u&&A(i),d%a!==a-1?(p=G(e,{startingIndex:d,disabledIndices:l}),s&&N(p,a,t)&&(p=G(e,{startingIndex:d-d%a-1,disabledIndices:l}))):s&&(p=G(e,{startingIndex:d-d%a-1,disabledIndices:l})),N(p,a,t)&&(p=d)),i.key===(r?f:g)&&(u&&A(i),d%a!==0?(p=G(e,{startingIndex:d,decrement:!0,disabledIndices:l}),s&&N(p,a,t)&&(p=G(e,{startingIndex:d+(a-d%a),decrement:!0,disabledIndices:l}))):s&&(p=G(e,{startingIndex:d+(a-d%a),decrement:!0,disabledIndices:l})),N(p,a,t)&&(p=d));const n=(0,o.RI)(h/a)===t;O(e,p)&&(p=s&&n?i.key===(r?f:g)?h:G(e,{startingIndex:d-d%a-1,disabledIndices:l}):d)}return p}function B(e,t,i){const n=[];let s=0;return e.forEach((e,r)=>{let{width:o,height:a}=e,l=!1;for(i&&(s=0);!l;){const e=[];for(let i=0;i<o;i++)for(let n=0;n<a;n++)e.push(s+i+n*t);s%t+o<=t&&e.every(e=>null==n[e])?(e.forEach(e=>{n[e]=r}),l=!0):s++}}),[...n]}function H(e,t,i,n,s){if(-1===e)return-1;const r=i.indexOf(e),o=t[e];switch(s){case"tl":return r;case"tr":return o?r+o.width-1:r;case"bl":return o?r+(o.height-1)*n:r;case"br":return i.lastIndexOf(e)}}function z(e,t){return t.flatMap((t,i)=>e.includes(t)?[i]:[])}function U(e,t,i){if("function"==typeof i)return i(t);if(i)return i.includes(t);const n=e.current[t];return null==n||n.hasAttribute("disabled")||"true"===n.getAttribute("aria-disabled")}const W=()=>({getShadowRoot:!0,displayCheck:"function"==typeof ResizeObserver&&ResizeObserver.toString().includes("[native code]")?"full":"none"});function j(e,t){const i=(0,a.Kr)(e,W()),n=i.length;if(0===n)return;const s=m(b(e)),r=i.indexOf(s);return i[-1===r?1===t?0:n-1:r+t]}function K(e){return j(b(e).body,1)||e}function $(e){return j(b(e).body,-1)||e}function Y(e,t){const i=t||e.currentTarget,n=e.relatedTarget;return!n||!v(i,n)}function q(e){(0,a.Kr)(e,W()).forEach(e=>{e.dataset.tabindex=e.getAttribute("tabindex")||"",e.setAttribute("tabindex","-1")})}function X(e){e.querySelectorAll("[data-tabindex]").forEach(e=>{const t=e.dataset.tabindex;delete e.dataset.tabindex,t?e.setAttribute("tabindex",t):e.removeAttribute("tabindex")})}var Z=i(65723),Q=i(70316),J=i(97767),ee="undefined"!=typeof document?n.useLayoutEffect:function(){};function te(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if("function"==typeof e&&e.toString()===t.toString())return!0;let i,n,s;if(e&&t&&"object"==typeof e){if(Array.isArray(e)){if(i=e.length,i!==t.length)return!1;for(n=i;0!==n--;)if(!te(e[n],t[n]))return!1;return!0}if(s=Object.keys(e),i=s.length,i!==Object.keys(t).length)return!1;for(n=i;0!==n--;)if(!{}.hasOwnProperty.call(t,s[n]))return!1;for(n=i;0!==n--;){const i=s[n];if(!("_owner"===i&&e.$$typeof||te(e[i],t[i])))return!1}return!0}return e!=e&&t!=t}function ie(e){return"undefined"==typeof window?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function ne(e,t){const i=ie(e);return Math.round(t*i)/i}function se(e){const t=n.useRef(e);return ee(()=>{t.current=e}),t}const re=e=>({name:"arrow",options:e,fn(t){const{element:i,padding:n}="function"==typeof e?e(t):e;return i&&(s=i,{}.hasOwnProperty.call(s,"current"))?null!=i.current?(0,J.UE)({element:i.current,padding:n}).fn(t):{}:i?(0,J.UE)({element:i,padding:n}).fn(t):{};var s}}),oe=(e,t)=>({...(0,J.cY)(e),options:[e,t]}),ae=(e,t)=>({...(0,J.BN)(e),options:[e,t]}),le=(e,t)=>({...(0,J.ER)(e),options:[e,t]}),ce=(e,t)=>({...(0,J.UU)(e),options:[e,t]}),he=(e,t)=>({...(0,J.Ej)(e),options:[e,t]}),de=(e,t)=>({...(0,J.RK)(e),options:[e,t]}),ue=(e,t)=>({...(0,J.jD)(e),options:[e,t]}),pe=(e,t)=>({...(0,J.mG)(e),options:[e,t]}),ge=(e,t)=>({...re(e),options:[e,t]});function fe(e){const t=n.useRef(void 0),i=n.useCallback(t=>{const i=e.map(e=>{if(null!=e){if("function"==typeof e){const i=e,n=i(t);return"function"==typeof n?n:()=>{i(null)}}return e.current=t,()=>{e.current=null}}});return()=>{i.forEach(e=>null==e?void 0:e())}},e);return n.useMemo(()=>e.every(e=>null==e)?null:e=>{t.current&&(t.current(),t.current=void 0),null!=e&&(t.current=i(e))},e)}function me(e,t){const i=e.compareDocumentPosition(t);return i&Node.DOCUMENT_POSITION_FOLLOWING||i&Node.DOCUMENT_POSITION_CONTAINED_BY?-1:i&Node.DOCUMENT_POSITION_PRECEDING||i&Node.DOCUMENT_POSITION_CONTAINS?1:0}const ve=n.createContext({register:()=>{},unregister:()=>{},map:new Map,elementsRef:{current:[]}});function ye(e){const{children:t,elementsRef:i,labelsRef:s}=e,[r,o]=n.useState(()=>new Set),a=n.useCallback(e=>{o(t=>new Set(t).add(e))},[]),l=n.useCallback(e=>{o(t=>{const i=new Set(t);return i.delete(e),i})},[]),c=n.useMemo(()=>{const e=new Map;return Array.from(r.keys()).sort(me).forEach((t,i)=>{e.set(t,i)}),e},[r]);return(0,Z.jsx)(ve.Provider,{value:n.useMemo(()=>({register:a,unregister:l,map:c,elementsRef:i,labelsRef:s}),[a,l,c,i,s]),children:t})}function Ce(e){void 0===e&&(e={});const{label:t}=e,{register:i,unregister:s,map:r,elementsRef:o,labelsRef:a}=n.useContext(ve),[l,c]=n.useState(null),h=n.useRef(null),d=n.useCallback(e=>{if(h.current=e,null!==l&&(o.current[l]=e,a)){var i;const n=void 0!==t;a.current[l]=n?t:null!=(i=null==e?void 0:e.textContent)?i:null}},[l,o,a,t]);return R(()=>{const e=h.current;if(e)return i(e),()=>{s(e)}},[i,s]),R(()=>{const e=h.current?r.get(h.current):null;null!=e&&c(e)},[r]),n.useMemo(()=>({ref:d,index:null==l?-1:l}),[l,d])}const be="data-floating-ui-focusable",Se="active",we="selected",xe="ArrowLeft",Ee="ArrowRight",Me="ArrowUp",Ae="ArrowDown";function Te(e,t){return"function"==typeof e?e(t):e?n.cloneElement(e,t):(0,Z.jsx)("div",{...t})}const De=n.createContext({activeIndex:0,onNavigate:()=>{}}),Ie=[xe,Ee],Re=[Me,Ae],Le=[...Ie,...Re],ke=n.forwardRef(function(e,t){const{render:i,orientation:s="both",loop:r=!0,rtl:o=!1,cols:a=1,disabledIndices:l,activeIndex:c,onNavigate:h,itemSizes:d,dense:u=!1,...p}=e,[g,f]=n.useState(0),m=null!=c?c:g,v=P(null!=h?h:f),y=n.useRef([]),C=i&&"function"!=typeof i?i.props:{},b=n.useMemo(()=>({activeIndex:m,onNavigate:v}),[m,v]),S=a>1,w={...p,...C,ref:t,"aria-orientation":"both"===s?void 0:s,onKeyDown(e){null==p.onKeyDown||p.onKeyDown(e),null==C.onKeyDown||C.onKeyDown(e),function(e){if(!Le.includes(e.key))return;let t=m;const i=_(y,l),n=F(y,l),c=o?xe:Ee,h=o?Ee:xe;if(S){const h=d||Array.from({length:y.current.length},()=>({width:1,height:1})),p=B(h,a,u),g=p.findIndex(e=>null!=e&&!U(y,e,l)),f=p.reduce((e,t,i)=>null==t||U(y,t,l)?e:i,-1),v=p[V({current:p.map(e=>e?y.current[e]:null)},{event:e,orientation:s,loop:r,rtl:o,cols:a,disabledIndices:z([...("function"!=typeof l?l:null)||y.current.map((e,t)=>U(y,t,l)?t:void 0),void 0],p),minIndex:g,maxIndex:f,prevIndex:H(m>n?i:m,h,p,a,e.key===Ae?"bl":e.key===c?"tr":"tl")})];null!=v&&(t=v)}const p={horizontal:[c],vertical:[Ae],both:[c,Ae]}[s],g={horizontal:[h],vertical:[Me],both:[h,Me]}[s],f=S?Le:{horizontal:Ie,vertical:Re,both:Le}[s];var C;t===m&&[...p,...g].includes(e.key)&&(t=r&&t===n&&p.includes(e.key)?i:r&&t===i&&g.includes(e.key)?n:G(y,{startingIndex:t,decrement:g.includes(e.key),disabledIndices:l})),t===m||O(y,t)||(e.stopPropagation(),f.includes(e.key)&&e.preventDefault(),v(t),null==(C=y.current[t])||C.focus())}(e)}};return(0,Z.jsx)(De.Provider,{value:b,children:(0,Z.jsx)(ye,{elementsRef:y,children:Te(i,w)})})}),Pe=n.forwardRef(function(e,t){const{render:i,...s}=e,r=i&&"function"!=typeof i?i.props:{},{activeIndex:o,onNavigate:a}=n.useContext(De),{ref:l,index:c}=Ce(),h=fe([l,t,r.ref]),d=o===c;return Te(i,{...s,...r,ref:h,tabIndex:d?0:-1,"data-active":d?"":void 0,onFocus(e){null==s.onFocus||s.onFocus(e),null==r.onFocus||r.onFocus(e),a(c)}})}),Ne={...s};let Oe=!1,_e=0;const Fe=()=>"floating-ui-"+Math.random().toString(36).slice(2,6)+_e++,Ge=Ne.useId||function(){const[e,t]=n.useState(()=>Oe?Fe():void 0);return R(()=>{null==e&&t(Fe())},[]),n.useEffect(()=>{Oe=!0},[]),e},Ve=n.forwardRef(function(e,t){const{context:{placement:i,elements:{floating:s},middlewareData:{arrow:o,shift:a}},width:l=14,height:c=7,tipRadius:h=0,strokeWidth:d=0,staticOffset:u,stroke:p,d:g,style:{transform:f,...m}={},...v}=e,y=Ge(),[C,b]=n.useState(!1);if(R(()=>{s&&"rtl"===(0,r.L9)(s).direction&&b(!0)},[s]),!s)return null;const[S,w]=i.split("-"),x="top"===S||"bottom"===S;let E=u;(x&&null!=a&&a.x||!x&&null!=a&&a.y)&&(E=null);const M=2*d,A=M/2,T=l/2*(h/-8+1),D=c/2*h/4,I=!!g,L=E&&"end"===w?"bottom":"top";let k=E&&"end"===w?"right":"left";E&&C&&(k="end"===w?"left":"right");const P=null!=(null==o?void 0:o.x)?E||o.x:"",N=null!=(null==o?void 0:o.y)?E||o.y:"",O=g||"M0,0 H"+l+" L"+(l-T)+","+(c-D)+" Q"+l/2+","+c+" "+T+","+(c-D)+" Z",_={top:I?"rotate(180deg)":"",left:I?"rotate(90deg)":"rotate(-90deg)",bottom:I?"":"rotate(180deg)",right:I?"rotate(-90deg)":"rotate(90deg)"}[S];return(0,Z.jsxs)("svg",{...v,"aria-hidden":!0,ref:t,width:I?l:l+M,height:l,viewBox:"0 0 "+l+" "+(c>l?c:l),style:{position:"absolute",pointerEvents:"none",[k]:P,[L]:N,[S]:x||I?"100%":"calc(100% - "+M/2+"px)",transform:[_,f].filter(e=>!!e).join(" "),...m},children:[M>0&&(0,Z.jsx)("path",{clipPath:"url(#"+y+")",fill:"none",stroke:p,strokeWidth:M+(g?0:1),d:O}),(0,Z.jsx)("path",{stroke:M&&!g?v.fill:"none",d:O}),(0,Z.jsx)("clipPath",{id:y,children:(0,Z.jsx)("rect",{x:-A,y:A*(I?-1:1),width:l+M,height:l})})]})});function Be(){const e=new Map;return{emit(t,i){var n;null==(n=e.get(t))||n.forEach(e=>e(i))},on(t,i){e.has(t)||e.set(t,new Set),e.get(t).add(i)},off(t,i){var n;null==(n=e.get(t))||n.delete(i)}}}const He=n.createContext(null),ze=n.createContext(null),Ue=()=>{var e;return(null==(e=n.useContext(He))?void 0:e.id)||null},We=()=>n.useContext(ze);function je(e){const t=Ge(),i=We(),n=Ue(),s=e||n;return R(()=>{if(!t)return;const e={id:t,parentId:s};return null==i||i.addNode(e),()=>{null==i||i.removeNode(e)}},[i,t,s]),t}function Ke(e){const{children:t,id:i}=e,s=Ue();return(0,Z.jsx)(He.Provider,{value:n.useMemo(()=>({id:i,parentId:s}),[i,s]),children:t})}function $e(e){const{children:t}=e,i=n.useRef([]),s=n.useCallback(e=>{i.current=[...i.current,e]},[]),r=n.useCallback(e=>{i.current=i.current.filter(t=>t!==e)},[]),[o]=n.useState(()=>Be());return(0,Z.jsx)(ze.Provider,{value:n.useMemo(()=>({nodesRef:i,addNode:s,removeNode:r,events:o}),[s,r,o]),children:t})}function Ye(e){return"data-floating-ui-"+e}function qe(e){-1!==e.current&&(clearTimeout(e.current),e.current=-1)}const Xe=Ye("safe-polygon");function Ze(e,t,i){if(i&&!I(i))return 0;if("number"==typeof e)return e;if("function"==typeof e){const i=e();return"number"==typeof i?i:null==i?void 0:i[t]}return null==e?void 0:e[t]}function Qe(e){return"function"==typeof e?e():e}function Je(e,t){void 0===t&&(t={});const{open:i,onOpenChange:s,dataRef:o,events:a,elements:l}=e,{enabled:c=!0,delay:h=0,handleClose:d=null,mouseOnly:u=!1,restMs:p=0,move:g=!0}=t,f=We(),m=Ue(),y=L(d),C=L(h),S=L(i),w=L(p),x=n.useRef(),E=n.useRef(-1),M=n.useRef(),A=n.useRef(-1),T=n.useRef(!0),D=n.useRef(!1),k=n.useRef(()=>{}),N=n.useRef(!1),O=P(()=>{var e;const t=null==(e=o.current.openEvent)?void 0:e.type;return(null==t?void 0:t.includes("mouse"))&&"mousedown"!==t});n.useEffect(()=>{if(c)return a.on("openchange",e),()=>{a.off("openchange",e)};function e(e){let{open:t}=e;t||(qe(E),qe(A),T.current=!0,N.current=!1)}},[c,a]),n.useEffect(()=>{if(!c)return;if(!y.current)return;if(!i)return;function e(e){O()&&s(!1,e,"hover")}const t=b(l.floating).documentElement;return t.addEventListener("mouseleave",e),()=>{t.removeEventListener("mouseleave",e)}},[l.floating,i,s,c,y,O]);const _=n.useCallback(function(e,t,i){void 0===t&&(t=!0),void 0===i&&(i="hover");const n=Ze(C.current,"close",x.current);n&&!M.current?(qe(E),E.current=window.setTimeout(()=>s(!1,e,i),n)):t&&(qe(E),s(!1,e,i))},[C,s]),F=P(()=>{k.current(),M.current=void 0}),G=P(()=>{if(D.current){const e=b(l.floating).body;e.style.pointerEvents="",e.removeAttribute(Xe),D.current=!1}}),V=P(()=>!!o.current.openEvent&&["click","mousedown"].includes(o.current.openEvent.type));n.useEffect(()=>{if(c&&(0,r.vq)(l.domReference)){const s=l.domReference,r=l.floating;return i&&s.addEventListener("mouseleave",n),g&&s.addEventListener("mousemove",e,{once:!0}),s.addEventListener("mouseenter",e),s.addEventListener("mouseleave",t),r&&(r.addEventListener("mouseleave",n),r.addEventListener("mouseenter",a),r.addEventListener("mouseleave",h)),()=>{i&&s.removeEventListener("mouseleave",n),g&&s.removeEventListener("mousemove",e),s.removeEventListener("mouseenter",e),s.removeEventListener("mouseleave",t),r&&(r.removeEventListener("mouseleave",n),r.removeEventListener("mouseenter",a),r.removeEventListener("mouseleave",h))}}function e(e){if(qe(E),T.current=!1,u&&!I(x.current)||Qe(w.current)>0&&!Ze(C.current,"open"))return;const t=Ze(C.current,"open",x.current);t?E.current=window.setTimeout(()=>{S.current||s(!0,e,"hover")},t):i||s(!0,e,"hover")}function t(e){if(V())return void G();k.current();const t=b(l.floating);if(qe(A),N.current=!1,y.current&&o.current.floatingContext){i||qe(E),M.current=y.current({...o.current.floatingContext,tree:f,x:e.clientX,y:e.clientY,onClose(){G(),F(),V()||_(e,!0,"safe-polygon")}});const n=M.current;return t.addEventListener("mousemove",n),void(k.current=()=>{t.removeEventListener("mousemove",n)})}("touch"!==x.current||!v(l.floating,e.relatedTarget))&&_(e)}function n(e){V()||o.current.floatingContext&&(null==y.current||y.current({...o.current.floatingContext,tree:f,x:e.clientX,y:e.clientY,onClose(){G(),F(),V()||_(e)}})(e))}function a(){qe(E)}function h(e){V()||_(e,!1)}},[l,c,e,u,g,_,F,G,s,i,S,f,C,y,o,V,w]),R(()=>{var e;if(c&&i&&null!=(e=y.current)&&null!=(e=e.__options)&&e.blockPointerEvents&&O()){D.current=!0;const e=l.floating;if((0,r.vq)(l.domReference)&&e){var t;const i=b(l.floating).body;i.setAttribute(Xe,"");const n=l.domReference,s=null==f||null==(t=f.nodesRef.current.find(e=>e.id===m))||null==(t=t.context)?void 0:t.elements.floating;return s&&(s.style.pointerEvents=""),i.style.pointerEvents="none",n.style.pointerEvents="auto",e.style.pointerEvents="auto",()=>{i.style.pointerEvents="",n.style.pointerEvents="",e.style.pointerEvents=""}}}},[c,i,m,l,f,y,O]),R(()=>{i||(x.current=void 0,N.current=!1,F(),G())},[i,F,G]),n.useEffect(()=>()=>{F(),qe(E),qe(A),G()},[c,l.domReference,F,G]);const B=n.useMemo(()=>{function e(e){x.current=e.pointerType}return{onPointerDown:e,onPointerEnter:e,onMouseMove(e){const{nativeEvent:t}=e;function n(){T.current||S.current||s(!0,t,"hover")}u&&!I(x.current)||i||0===Qe(w.current)||N.current&&e.movementX**2+e.movementY**2<2||(qe(A),"touch"===x.current?n():(N.current=!0,A.current=window.setTimeout(n,Qe(w.current))))}}},[u,s,i,S,w]);return n.useMemo(()=>c?{reference:B}:{},[c,B])}const et=()=>{},tt=n.createContext({delay:0,initialDelay:0,timeoutMs:0,currentId:null,setCurrentId:et,setState:et,isInstantPhase:!1}),it=()=>n.useContext(tt);function nt(e){const{children:t,delay:i,timeoutMs:s=0}=e,[r,o]=n.useReducer((e,t)=>({...e,...t}),{delay:i,timeoutMs:s,initialDelay:i,currentId:null,isInstantPhase:!1}),a=n.useRef(null),l=n.useCallback(e=>{o({currentId:e})},[]);return R(()=>{r.currentId?null===a.current?a.current=r.currentId:r.isInstantPhase||o({isInstantPhase:!0}):(r.isInstantPhase&&o({isInstantPhase:!1}),a.current=null)},[r.currentId,r.isInstantPhase]),(0,Z.jsx)(tt.Provider,{value:n.useMemo(()=>({...r,setState:o,setCurrentId:l}),[r,l]),children:t})}function st(e,t){void 0===t&&(t={});const{open:i,onOpenChange:n,floatingId:s}=e,{id:r,enabled:o=!0}=t,a=null!=r?r:s,l=it(),{currentId:c,setCurrentId:h,initialDelay:d,setState:u,timeoutMs:p}=l;return R(()=>{o&&c&&(u({delay:{open:1,close:Ze(d,"close")}}),c!==a&&n(!1))},[o,a,n,u,c,d]),R(()=>{function e(){n(!1),u({delay:d,currentId:null})}if(o&&c&&!i&&c===a){if(p){const t=window.setTimeout(e,p);return()=>{clearTimeout(t)}}e()}},[o,i,u,c,a,n,d,p]),R(()=>{o&&h!==et&&i&&h(a)},[o,i,h,a]),l}const rt=n.createContext({hasProvider:!1,timeoutMs:0,delayRef:{current:0},initialDelayRef:{current:0},timeoutIdRef:{current:-1},currentIdRef:{current:null},currentContextRef:{current:null}});function ot(e){const{children:t,delay:i,timeoutMs:s=0}=e,r=n.useRef(i),o=n.useRef(i),a=n.useRef(null),l=n.useRef(null),c=n.useRef(-1);return(0,Z.jsx)(rt.Provider,{value:n.useMemo(()=>({hasProvider:!0,delayRef:r,initialDelayRef:o,currentIdRef:a,timeoutMs:s,currentContextRef:l,timeoutIdRef:c}),[s]),children:t})}function at(e,t){void 0===t&&(t={});const{open:i,onOpenChange:s,floatingId:r}=e,{enabled:o=!0}=t,a=n.useContext(rt),{currentIdRef:l,delayRef:c,timeoutMs:h,initialDelayRef:d,currentContextRef:u,hasProvider:p,timeoutIdRef:g}=a,[f,m]=n.useState(!1);return R(()=>{function e(){var e;m(!1),null==(e=u.current)||e.setIsInstantPhase(!1),l.current=null,u.current=null,c.current=d.current}if(o&&l.current&&!i&&l.current===r){if(m(!1),h)return g.current=window.setTimeout(e,h),()=>{clearTimeout(g.current)};e()}},[o,i,r,l,c,h,d,u,g]),R(()=>{if(!o)return;if(!i)return;const e=u.current,t=l.current;u.current={onOpenChange:s,setIsInstantPhase:m},l.current=r,c.current={open:0,close:Ze(d.current,"close")},null!==t&&t!==r?(qe(g),m(!0),null==e||e.setIsInstantPhase(!0),null==e||e.onOpenChange(!1)):(m(!1),null==e||e.setIsInstantPhase(!1))},[o,i,r,s,l,c,h,d,u,g]),R(()=>()=>{u.current=null},[u]),n.useMemo(()=>({hasProvider:p,delayRef:c,isInstantPhase:f}),[p,c,f])}let lt=0;function ct(e,t){void 0===t&&(t={});const{preventScroll:i=!1,cancelPrevious:n=!0,sync:s=!1}=t;n&&cancelAnimationFrame(lt);const r=()=>null==e?void 0:e.focus({preventScroll:i});s?r():lt=requestAnimationFrame(r)}function ht(e,t){if(!e||!t)return!1;const i=null==t.getRootNode?void 0:t.getRootNode();if(e.contains(t))return!0;if(i&&(0,r.Ng)(i)){let i=t;for(;i;){if(e===i)return!0;i=i.parentNode||i.host}}return!1}const dt={inert:new WeakMap,"aria-hidden":new WeakMap,none:new WeakMap};function ut(e){return"inert"===e?dt.inert:"aria-hidden"===e?dt["aria-hidden"]:dt.none}let pt=new WeakSet,gt={},ft=0;const mt=e=>e&&(e.host||mt(e.parentNode));function vt(e,t,i){void 0===t&&(t=!1),void 0===i&&(i=!1);const n=(s=e[0],(null==s?void 0:s.ownerDocument)||document).body;var s;return function(e,t,i,n){const s="data-floating-ui-inert",o=n?"inert":i?"aria-hidden":null,a=(l=t,e.map(e=>{if(l.contains(e))return e;const t=mt(e);return l.contains(t)?t:null}).filter(e=>null!=e));var l;const c=new Set,h=new Set(a),d=[];gt[s]||(gt[s]=new WeakMap);const u=gt[s];return a.forEach(function e(t){t&&!c.has(t)&&(c.add(t),t.parentNode&&e(t.parentNode))}),function e(t){t&&!h.has(t)&&[].forEach.call(t.children,t=>{if("script"!==(0,r.mq)(t))if(c.has(t))e(t);else{const e=o?t.getAttribute(o):null,i=null!==e&&"false"!==e,n=ut(o),r=(n.get(t)||0)+1,a=(u.get(t)||0)+1;n.set(t,r),u.set(t,a),d.push(t),1===r&&i&&pt.add(t),1===a&&t.setAttribute(s,""),!i&&o&&t.setAttribute(o,"inert"===o?"":"true")}})}(t),c.clear(),ft++,()=>{d.forEach(e=>{const t=ut(o),i=(t.get(e)||0)-1,n=(u.get(e)||0)-1;t.set(e,i),u.set(e,n),i||(!pt.has(e)&&o&&e.removeAttribute(o),pt.delete(e)),n||e.removeAttribute(s)}),ft--,ft||(dt.inert=new WeakMap,dt["aria-hidden"]=new WeakMap,dt.none=new WeakMap,pt=new WeakSet,gt={})}}(e.concat(Array.from(n.querySelectorAll('[aria-live],[role="status"],output'))),n,t,i)}const yt={border:0,clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"fixed",whiteSpace:"nowrap",width:"1px",top:0,left:0},Ct=n.forwardRef(function(e,t){const[i,s]=n.useState();R(()=>{h()&&s("button")},[]);const r={ref:t,tabIndex:0,role:i,"aria-hidden":!i||void 0,[Ye("focus-guard")]:"",style:yt};return(0,Z.jsx)("span",{...e,...r})}),bt={clipPath:"inset(50%)",position:"fixed",top:0,left:0},St=n.createContext(null),wt=Ye("portal");function xt(e){void 0===e&&(e={});const{id:t,root:i}=e,s=Ge(),o=Mt(),[a,l]=n.useState(null),c=n.useRef(null);return R(()=>()=>{null==a||a.remove(),queueMicrotask(()=>{c.current=null})},[a]),R(()=>{if(!s)return;if(c.current)return;const e=t?document.getElementById(t):null;if(!e)return;const i=document.createElement("div");i.id=s,i.setAttribute(wt,""),e.appendChild(i),c.current=i,l(i)},[t,s]),R(()=>{if(null===i)return;if(!s)return;if(c.current)return;let e=i||(null==o?void 0:o.portalNode);e&&!(0,r.Ll)(e)&&(e=e.current),e=e||document.body;let n=null;t&&(n=document.createElement("div"),n.id=t,e.appendChild(n));const a=document.createElement("div");a.id=s,a.setAttribute(wt,""),e=n||e,e.appendChild(a),c.current=a,l(a)},[t,i,s,o]),a}function Et(e){const{children:t,id:i,root:s,preserveTabOrder:r=!0}=e,o=xt({id:i,root:s}),[a,l]=n.useState(null),c=n.useRef(null),h=n.useRef(null),d=n.useRef(null),u=n.useRef(null),p=null==a?void 0:a.modal,g=null==a?void 0:a.open,f=!!a&&!a.modal&&a.open&&r&&!(!s&&!o);return n.useEffect(()=>{if(o&&r&&!p)return o.addEventListener("focusin",e,!0),o.addEventListener("focusout",e,!0),()=>{o.removeEventListener("focusin",e,!0),o.removeEventListener("focusout",e,!0)};function e(e){o&&Y(e)&&("focusin"===e.type?X:q)(o)}},[o,r,p]),n.useEffect(()=>{o&&(g||X(o))},[g,o]),(0,Z.jsxs)(St.Provider,{value:n.useMemo(()=>({preserveTabOrder:r,beforeOutsideRef:c,afterOutsideRef:h,beforeInsideRef:d,afterInsideRef:u,portalNode:o,setFocusManagerState:l}),[r,o]),children:[f&&o&&(0,Z.jsx)(Ct,{"data-type":"outside",ref:c,onFocus:e=>{if(Y(e,o)){var t;null==(t=d.current)||t.focus()}else{const e=$(a?a.domReference:null);null==e||e.focus()}}}),f&&o&&(0,Z.jsx)("span",{"aria-owns":o.id,style:bt}),o&&Q.createPortal(t,o),f&&o&&(0,Z.jsx)(Ct,{"data-type":"outside",ref:h,onFocus:e=>{if(Y(e,o)){var t;null==(t=u.current)||t.focus()}else{const t=K(a?a.domReference:null);null==t||t.focus(),(null==a?void 0:a.closeOnFocusOut)&&(null==a||a.onOpenChange(!1,e.nativeEvent,"focus-out"))}}})]})}const Mt=()=>n.useContext(St);function At(e){return n.useMemo(()=>t=>{e.forEach(e=>{e&&(e.current=t)})},e)}let Tt=[];function Dt(){Tt=Tt.filter(e=>{var t;return null==(t=e.deref())?void 0:t.isConnected})}function It(){Dt();const e=Tt[Tt.length-1];return null==e?void 0:e.deref()}function Rt(e,t){var i;if(!(t.current.includes("floating")||null!=(i=e.getAttribute("role"))&&i.includes("dialog")))return;const n=W(),s=(0,a.nq)(e,n).filter(e=>{const t=e.getAttribute("data-tabindex")||"";return(0,a.AO)(e,n)||e.hasAttribute("data-tabindex")&&!t.startsWith("-")}),r=e.getAttribute("tabindex");t.current.includes("floating")||0===s.length?"0"!==r&&e.setAttribute("tabindex","0"):("-1"!==r||e.hasAttribute("data-tabindex")&&"-1"!==e.getAttribute("data-tabindex"))&&(e.setAttribute("tabindex","-1"),e.setAttribute("data-tabindex","-1"))}const Lt=n.forwardRef(function(e,t){return(0,Z.jsx)("button",{...e,type:"button",ref:t,tabIndex:-1,style:yt})});function kt(e){const{context:t,children:i,disabled:s=!1,order:o=["content"],guards:l=!0,initialFocus:c=0,returnFocus:h=!0,restoreFocus:d=!1,modal:u=!0,visuallyHiddenDismiss:p=!1,closeOnFocusOut:g=!0,outsideElementsInert:f=!1,getInsideElements:C=()=>[]}=e,{open:S,onOpenChange:I,events:k,dataRef:N,elements:{domReference:O,floating:_}}=t,F=P(()=>{var e;return null==(e=N.current.floatingContext)?void 0:e.nodeId}),G=P(C),V="number"==typeof c&&c<0,B=w(O)&&V,H="undefined"!=typeof HTMLElement&&"inert"in HTMLElement.prototype,z=!H||l,U=!z||H&&f,j=L(o),q=L(c),X=L(h),Q=We(),J=Mt(),ee=n.useRef(null),te=n.useRef(null),ie=n.useRef(!1),ne=n.useRef(!1),se=n.useRef(-1),re=n.useRef(-1),oe=null!=J,ae=x(_),le=P(function(e){return void 0===e&&(e=ae),e?(0,a.Kr)(e,W()):[]}),ce=P(e=>{const t=le(e);return j.current.map(e=>O&&"reference"===e?O:ae&&"floating"===e?ae:t).filter(Boolean).flat()});n.useEffect(()=>{if(s)return;if(!u)return;function e(e){if("Tab"===e.key){v(ae,m(b(ae)))&&0===le().length&&!B&&A(e);const t=ce(),i=y(e);"reference"===j.current[0]&&i===O&&(A(e),e.shiftKey?ct(t[t.length-1]):ct(t[1])),"floating"===j.current[1]&&i===ae&&e.shiftKey&&(A(e),ct(t[0]))}}const t=b(ae);return t.addEventListener("keydown",e),()=>{t.removeEventListener("keydown",e)}},[s,O,ae,u,j,B,le,ce]),n.useEffect(()=>{if(!s&&_)return _.addEventListener("focusin",e),()=>{_.removeEventListener("focusin",e)};function e(e){const t=y(e),i=le().indexOf(t);-1!==i&&(se.current=i)}},[s,_,le]),n.useEffect(()=>{if(s)return;if(!g)return;function e(){ne.current=!0,setTimeout(()=>{ne.current=!1})}function t(e){const t=e.relatedTarget,i=e.currentTarget,n=y(e);queueMicrotask(()=>{const s=F(),o=!(v(O,t)||v(_,t)||v(t,_)||v(null==J?void 0:J.portalNode,t)||null!=t&&t.hasAttribute(Ye("focus-guard"))||Q&&(E(Q.nodesRef.current,s).find(e=>{var i,n;return v(null==(i=e.context)?void 0:i.elements.floating,t)||v(null==(n=e.context)?void 0:n.elements.domReference,t)})||M(Q.nodesRef.current,s).find(e=>{var i,n,s;return[null==(i=e.context)?void 0:i.elements.floating,x(null==(n=e.context)?void 0:n.elements.floating)].includes(t)||(null==(s=e.context)?void 0:s.elements.domReference)===t})));if(i===O&&ae&&Rt(ae,j),d&&i!==O&&(null==n||!n.isConnected)&&m(b(ae))===b(ae).body){(0,r.sb)(ae)&&ae.focus();const e=se.current,t=le(),i=t[e]||t[t.length-1]||ae;(0,r.sb)(i)&&i.focus()}N.current.insideReactTree?N.current.insideReactTree=!1:!B&&u||!t||!o||ne.current||t===It()||(ie.current=!0,I(!1,e,"focus-out"))})}const i=Boolean(!Q&&J);function n(){qe(re),N.current.insideReactTree=!0,re.current=window.setTimeout(()=>{N.current.insideReactTree=!1})}return _&&(0,r.sb)(O)?(O.addEventListener("focusout",t),O.addEventListener("pointerdown",e),_.addEventListener("focusout",t),i&&_.addEventListener("focusout",n,!0),()=>{O.removeEventListener("focusout",t),O.removeEventListener("pointerdown",e),_.removeEventListener("focusout",t),i&&_.removeEventListener("focusout",n,!0)}):void 0},[s,O,_,ae,u,Q,J,I,g,d,le,B,F,j,N]);const he=n.useRef(null),de=n.useRef(null),ue=At([he,null==J?void 0:J.beforeInsideRef]),pe=At([de,null==J?void 0:J.afterInsideRef]);function ge(e){return!s&&p&&u?(0,Z.jsx)(Lt,{ref:"start"===e?ee:te,onClick:e=>I(!1,e.nativeEvent),children:"string"==typeof p?p:"Dismiss"}):null}n.useEffect(()=>{var e,t;if(s)return;if(!_)return;const i=Array.from((null==J||null==(e=J.portalNode)?void 0:e.querySelectorAll("["+Ye("portal")+"]"))||[]),n=null==(t=(Q?M(Q.nodesRef.current,F()):[]).find(e=>{var t;return w((null==(t=e.context)?void 0:t.elements.domReference)||null)}))||null==(t=t.context)?void 0:t.elements.domReference,r=[_,n,...i,...G(),ee.current,te.current,he.current,de.current,null==J?void 0:J.beforeOutsideRef.current,null==J?void 0:J.afterOutsideRef.current,j.current.includes("reference")||B?O:null].filter(e=>null!=e),o=u||B?vt(r,!U,U):vt(r);return()=>{o()}},[s,O,_,u,j,J,B,z,U,Q,F,G]),R(()=>{if(s||!(0,r.sb)(ae))return;const e=m(b(ae));queueMicrotask(()=>{const t=ce(ae),i=q.current,n=("number"==typeof i?t[i]:i.current)||ae,s=v(ae,e);V||s||!S||ct(n,{preventScroll:n===ae})})},[s,S,ae,V,ce,q]),R(()=>{if(s||!ae)return;const e=b(ae);var t;function i(e){let{reason:t,event:i,nested:n}=e;if(["hover","safe-polygon"].includes(t)&&"mouseleave"===i.type&&(ie.current=!0),"outside-press"===t)if(n)ie.current=!1;else if(T(i)||D(i))ie.current=!1;else{let e=!1;document.createElement("div").focus({get preventScroll(){return e=!0,!1}}),ie.current=!e}}t=m(e),Dt(),t&&"body"!==(0,r.mq)(t)&&(Tt.push(new WeakRef(t)),Tt.length>20&&(Tt=Tt.slice(-20))),k.on("openchange",i);const n=e.createElement("span");return n.setAttribute("tabindex","-1"),n.setAttribute("aria-hidden","true"),Object.assign(n.style,yt),oe&&O&&O.insertAdjacentElement("afterend",n),()=>{k.off("openchange",i);const t=m(e),s=v(_,t)||Q&&E(Q.nodesRef.current,F(),!1).some(e=>{var i;return v(null==(i=e.context)?void 0:i.elements.floating,t)}),o=function(){if("boolean"==typeof X.current){const e=O||It();return e&&e.isConnected?e:n}return X.current.current||n}();queueMicrotask(()=>{const i=function(e){const t=W();return(0,a.AO)(e,t)?e:(0,a.Kr)(e,t)[0]||e}(o);X.current&&!ie.current&&(0,r.sb)(i)&&(i===t||t===e.body||s)&&i.focus({preventScroll:!0}),n.remove()})}},[s,_,ae,X,N,k,Q,oe,O,F]),n.useEffect(()=>(queueMicrotask(()=>{ie.current=!1}),()=>{queueMicrotask(Dt)}),[s]),R(()=>{if(!s&&J)return J.setFocusManagerState({modal:u,closeOnFocusOut:g,open:S,onOpenChange:I,domReference:O}),()=>{J.setFocusManagerState(null)}},[s,J,u,S,I,g,O]),R(()=>{s||ae&&Rt(ae,j)},[s,ae,j]);const fe=!s&&z&&(!u||!B)&&(oe||u);return(0,Z.jsxs)(Z.Fragment,{children:[fe&&(0,Z.jsx)(Ct,{"data-type":"inside",ref:ue,onFocus:e=>{if(u){const e=ce();ct("reference"===o[0]?e[0]:e[e.length-1])}else if(null!=J&&J.preserveTabOrder&&J.portalNode)if(ie.current=!1,Y(e,J.portalNode)){const e=K(O);null==e||e.focus()}else{var t;null==(t=J.beforeOutsideRef.current)||t.focus()}}}),!B&&ge("start"),i,ge("end"),fe&&(0,Z.jsx)(Ct,{"data-type":"inside",ref:pe,onFocus:e=>{if(u)ct(ce()[0]);else if(null!=J&&J.preserveTabOrder&&J.portalNode)if(g&&(ie.current=!0),Y(e,J.portalNode)){const e=$(O);null==e||e.focus()}else{var t;null==(t=J.afterOutsideRef.current)||t.focus()}}})]})}let Pt=0;const Nt="--floating-ui-scrollbar-width";let Ot=()=>{};const _t=n.forwardRef(function(e,t){const{lockScroll:i=!1,...n}=e;return R(()=>{if(i)return Pt++,1===Pt&&(Ot=function(){const e=l(),t=/iP(hone|ad|od)|iOS/.test(e)||"MacIntel"===e&&navigator.maxTouchPoints>1,i=document.body.style,n=Math.round(document.documentElement.getBoundingClientRect().left)+document.documentElement.scrollLeft?"paddingLeft":"paddingRight",s=window.innerWidth-document.documentElement.clientWidth,r=i.left?parseFloat(i.left):window.scrollX,o=i.top?parseFloat(i.top):window.scrollY;if(i.overflow="hidden",i.setProperty(Nt,s+"px"),s&&(i[n]=s+"px"),t){var a,c;const e=(null==(a=window.visualViewport)?void 0:a.offsetLeft)||0,t=(null==(c=window.visualViewport)?void 0:c.offsetTop)||0;Object.assign(i,{position:"fixed",top:-(o-Math.floor(t))+"px",left:-(r-Math.floor(e))+"px",right:"0"})}return()=>{Object.assign(i,{overflow:"",[n]:""}),i.removeProperty(Nt),t&&(Object.assign(i,{position:"",top:"",left:"",right:""}),window.scrollTo(r,o))}}()),()=>{Pt--,0===Pt&&Ot()}},[i]),(0,Z.jsx)("div",{ref:t,...n,style:{position:"fixed",overflow:"auto",top:0,right:0,bottom:0,left:0,...n.style}})});function Ft(e){return(0,r.sb)(e.target)&&"BUTTON"===e.target.tagName}function Gt(e){return S(e)}function Vt(e,t){void 0===t&&(t={});const{open:i,onOpenChange:s,dataRef:o,elements:{domReference:a}}=e,{enabled:l=!0,event:c="click",toggle:h=!0,ignoreMouse:d=!1,keyboardHandlers:u=!0,stickIfOpen:p=!0}=t,g=n.useRef(),f=n.useRef(!1),m=n.useMemo(()=>({onPointerDown(e){g.current=e.pointerType},onMouseDown(e){const t=g.current;0===e.button&&"click"!==c&&(I(t,!0)&&d||(!i||!h||o.current.openEvent&&p&&"mousedown"!==o.current.openEvent.type?(e.preventDefault(),s(!0,e.nativeEvent,"click")):s(!1,e.nativeEvent,"click")))},onClick(e){const t=g.current;"mousedown"===c&&g.current?g.current=void 0:I(t,!0)&&d||(!i||!h||o.current.openEvent&&p&&"click"!==o.current.openEvent.type?s(!0,e.nativeEvent,"click"):s(!1,e.nativeEvent,"click"))},onKeyDown(e){g.current=void 0,e.defaultPrevented||!u||Ft(e)||(" "!==e.key||Gt(a)||(e.preventDefault(),f.current=!0),function(e){return(0,r.sb)(e.target)&&"A"===e.target.tagName}(e)||"Enter"===e.key&&s(!i||!h,e.nativeEvent,"click"))},onKeyUp(e){e.defaultPrevented||!u||Ft(e)||Gt(a)||" "===e.key&&f.current&&(f.current=!1,s(!i||!h,e.nativeEvent,"click"))}}),[o,a,c,d,u,s,i,p,h]);return n.useMemo(()=>l?{reference:m}:{},[l,m])}function Bt(e){return null!=e&&null!=e.clientX}function Ht(e,t){void 0===t&&(t={});const{open:i,dataRef:s,elements:{floating:o,domReference:a},refs:l}=e,{enabled:c=!0,axis:h="both",x:d=null,y:u=null}=t,p=n.useRef(!1),g=n.useRef(null),[f,m]=n.useState(),[C,b]=n.useState([]),S=P((e,t)=>{p.current||s.current.openEvent&&!Bt(s.current.openEvent)||l.setPositionReference(function(e,t){let i=null,n=null,s=!1;return{contextElement:e||void 0,getBoundingClientRect(){var r;const o=(null==e?void 0:e.getBoundingClientRect())||{width:0,height:0,x:0,y:0},a="x"===t.axis||"both"===t.axis,l="y"===t.axis||"both"===t.axis,c=["mouseenter","mousemove"].includes((null==(r=t.dataRef.current.openEvent)?void 0:r.type)||"")&&"touch"!==t.pointerType;let h=o.width,d=o.height,u=o.x,p=o.y;return null==i&&t.x&&a&&(i=o.x-t.x),null==n&&t.y&&l&&(n=o.y-t.y),u-=i||0,p-=n||0,h=0,d=0,!s||c?(h="y"===t.axis?o.width:0,d="x"===t.axis?o.height:0,u=a&&null!=t.x?t.x:u,p=l&&null!=t.y?t.y:p):s&&!c&&(d="x"===t.axis?o.height:d,h="y"===t.axis?o.width:h),s=!0,{width:h,height:d,x:u,y:p,top:p,right:u+h,bottom:p+d,left:u}}}}(a,{x:e,y:t,axis:h,dataRef:s,pointerType:f}))}),w=P(e=>{null==d&&null==u&&(i?g.current||b([]):S(e.clientX,e.clientY))}),x=I(f)?o:i,E=n.useCallback(()=>{if(!x||!c||null!=d||null!=u)return;const e=(0,r.zk)(o);function t(i){const n=y(i);v(o,n)?(e.removeEventListener("mousemove",t),g.current=null):S(i.clientX,i.clientY)}if(!s.current.openEvent||Bt(s.current.openEvent)){e.addEventListener("mousemove",t);const i=()=>{e.removeEventListener("mousemove",t),g.current=null};return g.current=i,i}l.setPositionReference(a)},[x,c,d,u,o,s,l,a,S]);n.useEffect(()=>E(),[E,C]),n.useEffect(()=>{c&&!o&&(p.current=!1)},[c,o]),n.useEffect(()=>{!c&&i&&(p.current=!0)},[c,i]),R(()=>{!c||null==d&&null==u||(p.current=!1,S(d,u))},[c,d,u,S]);const M=n.useMemo(()=>{function e(e){let{pointerType:t}=e;m(t)}return{onPointerDown:e,onPointerEnter:e,onMouseMove:w,onMouseEnter:w}},[w]);return n.useMemo(()=>c?{reference:M}:{},[c,M])}const zt={pointerdown:"onPointerDown",mousedown:"onMouseDown",click:"onClick"},Ut={pointerdown:"onPointerDownCapture",mousedown:"onMouseDownCapture",click:"onClickCapture"},Wt=e=>{var t,i;return{escapeKey:"boolean"==typeof e?e:null!=(t=null==e?void 0:e.escapeKey)&&t,outsidePress:"boolean"==typeof e?e:null==(i=null==e?void 0:e.outsidePress)||i}};function jt(e,t){void 0===t&&(t={});const{open:i,onOpenChange:s,elements:o,dataRef:a}=e,{enabled:l=!0,escapeKey:c=!0,outsidePress:h=!0,outsidePressEvent:d="pointerdown",referencePress:u=!1,referencePressEvent:p="pointerdown",ancestorScroll:g=!1,bubbles:f,capture:m}=t,S=We(),w=P("function"==typeof h?h:()=>!1),x="function"==typeof h?w:h,M=n.useRef(!1),{escapeKey:A,outsidePress:T}=Wt(f),{escapeKey:D,outsidePress:I}=Wt(m),R=n.useRef(!1),L=P(e=>{var t;if(!i||!l||!c||"Escape"!==e.key)return;if(R.current)return;const n=null==(t=a.current.floatingContext)?void 0:t.nodeId,r=S?E(S.nodesRef.current,n):[];if(!A&&(e.stopPropagation(),r.length>0)){let e=!0;if(r.forEach(t=>{var i;null==(i=t.context)||!i.open||t.context.dataRef.current.__escapeKeyBubbles||(e=!1)}),!e)return}s(!1,function(e){return"nativeEvent"in e}(e)?e.nativeEvent:e,"escape-key")}),k=P(e=>{var t;const i=()=>{var t;L(e),null==(t=y(e))||t.removeEventListener("keydown",i)};null==(t=y(e))||t.addEventListener("keydown",i)}),N=P(e=>{var t;const i=a.current.insideReactTree;a.current.insideReactTree=!1;const n=M.current;if(M.current=!1,"click"===d&&n)return;if(i)return;if("function"==typeof x&&!x(e))return;const l=y(e),c="["+Ye("inert")+"]",h=b(o.floating).querySelectorAll(c);let u=(0,r.vq)(l)?l:null;for(;u&&!(0,r.eu)(u);){const e=(0,r.$4)(u);if((0,r.eu)(e)||!(0,r.vq)(e))break;u=e}if(h.length&&(0,r.vq)(l)&&!l.matches("html,body")&&!v(l,o.floating)&&Array.from(h).every(e=>!v(u,e)))return;if((0,r.sb)(l)&&F){const t=(0,r.eu)(l),i=(0,r.L9)(l),n=/auto|scroll/,s=t||n.test(i.overflowX),o=t||n.test(i.overflowY),a=s&&l.clientWidth>0&&l.scrollWidth>l.clientWidth,c=o&&l.clientHeight>0&&l.scrollHeight>l.clientHeight,h="rtl"===i.direction,d=c&&(h?e.offsetX<=l.offsetWidth-l.clientWidth:e.offsetX>l.clientWidth),u=a&&e.offsetY>l.clientHeight;if(d||u)return}const p=null==(t=a.current.floatingContext)?void 0:t.nodeId,g=S&&E(S.nodesRef.current,p).some(t=>{var i;return C(e,null==(i=t.context)?void 0:i.elements.floating)});if(C(e,o.floating)||C(e,o.domReference)||g)return;const f=S?E(S.nodesRef.current,p):[];if(f.length>0){let e=!0;if(f.forEach(t=>{var i;null==(i=t.context)||!i.open||t.context.dataRef.current.__outsidePressBubbles||(e=!1)}),!e)return}s(!1,e,"outside-press")}),O=P(e=>{var t;const i=()=>{var t;N(e),null==(t=y(e))||t.removeEventListener(d,i)};null==(t=y(e))||t.addEventListener(d,i)});n.useEffect(()=>{if(!i||!l)return;a.current.__escapeKeyBubbles=A,a.current.__outsidePressBubbles=T;let e=-1;function t(e){s(!1,e,"ancestor-scroll")}function n(){window.clearTimeout(e),R.current=!0}function h(){e=window.setTimeout(()=>{R.current=!1},(0,r.Tc)()?5:0)}const u=b(o.floating);c&&(u.addEventListener("keydown",D?k:L,D),u.addEventListener("compositionstart",n),u.addEventListener("compositionend",h)),x&&u.addEventListener(d,I?O:N,I);let p=[];return g&&((0,r.vq)(o.domReference)&&(p=(0,r.v9)(o.domReference)),(0,r.vq)(o.floating)&&(p=p.concat((0,r.v9)(o.floating))),!(0,r.vq)(o.reference)&&o.reference&&o.reference.contextElement&&(p=p.concat((0,r.v9)(o.reference.contextElement)))),p=p.filter(e=>{var t;return e!==(null==(t=u.defaultView)?void 0:t.visualViewport)}),p.forEach(e=>{e.addEventListener("scroll",t,{passive:!0})}),()=>{c&&(u.removeEventListener("keydown",D?k:L,D),u.removeEventListener("compositionstart",n),u.removeEventListener("compositionend",h)),x&&u.removeEventListener(d,I?O:N,I),p.forEach(e=>{e.removeEventListener("scroll",t)}),window.clearTimeout(e)}},[a,o,c,x,d,i,s,g,l,A,T,L,D,k,N,I,O]),n.useEffect(()=>{a.current.insideReactTree=!1},[a,x,d]);const _=n.useMemo(()=>({onKeyDown:L,...u&&{[zt[p]]:e=>{s(!1,e.nativeEvent,"reference-press")},..."click"!==p&&{onClick(e){s(!1,e.nativeEvent,"reference-press")}}}}),[L,s,u,p]),F=n.useMemo(()=>({onKeyDown:L,onMouseDown(){M.current=!0},onMouseUp(){M.current=!0},[Ut[d]]:()=>{a.current.insideReactTree=!0}}),[L,d,a]);return n.useMemo(()=>l?{reference:_,floating:F}:{},[l,_,F])}function Kt(e){const{open:t=!1,onOpenChange:i,elements:s}=e,r=Ge(),o=n.useRef({}),[a]=n.useState(()=>Be()),l=null!=Ue(),[c,h]=n.useState(s.reference),d=P((e,t,n)=>{o.current.openEvent=e?t:void 0,a.emit("openchange",{open:e,event:t,reason:n,nested:l}),null==i||i(e,t,n)}),u=n.useMemo(()=>({setPositionReference:h}),[]),p=n.useMemo(()=>({reference:c||s.reference||null,floating:s.floating||null,domReference:s.reference}),[c,s.reference,s.floating]);return n.useMemo(()=>({dataRef:o,open:t,onOpenChange:d,elements:p,events:a,floatingId:r,refs:u}),[t,d,p,a,r,u])}function $t(e){void 0===e&&(e={});const{nodeId:t}=e,i=Kt({...e,elements:{reference:null,floating:null,...e.elements}}),s=e.rootContext||i,o=s.elements,[a,l]=n.useState(null),[c,h]=n.useState(null),d=(null==o?void 0:o.domReference)||a,u=n.useRef(null),p=We();R(()=>{d&&(u.current=d)},[d]);const g=function(e){void 0===e&&(e={});const{placement:t="bottom",strategy:i="absolute",middleware:s=[],platform:r,elements:{reference:o,floating:a}={},transform:l=!0,whileElementsMounted:c,open:h}=e,[d,u]=n.useState({x:0,y:0,strategy:i,placement:t,middlewareData:{},isPositioned:!1}),[p,g]=n.useState(s);te(p,s)||g(s);const[f,m]=n.useState(null),[v,y]=n.useState(null),C=n.useCallback(e=>{e!==x.current&&(x.current=e,m(e))},[]),b=n.useCallback(e=>{e!==E.current&&(E.current=e,y(e))},[]),S=o||f,w=a||v,x=n.useRef(null),E=n.useRef(null),M=n.useRef(d),A=null!=c,T=se(c),D=se(r),I=se(h),R=n.useCallback(()=>{if(!x.current||!E.current)return;const e={placement:t,strategy:i,middleware:p};D.current&&(e.platform=D.current),(0,J.rD)(x.current,E.current,e).then(e=>{const t={...e,isPositioned:!1!==I.current};L.current&&!te(M.current,t)&&(M.current=t,Q.flushSync(()=>{u(t)}))})},[p,t,i,D,I]);ee(()=>{!1===h&&M.current.isPositioned&&(M.current.isPositioned=!1,u(e=>({...e,isPositioned:!1})))},[h]);const L=n.useRef(!1);ee(()=>(L.current=!0,()=>{L.current=!1}),[]),ee(()=>{if(S&&(x.current=S),w&&(E.current=w),S&&w){if(T.current)return T.current(S,w,R);R()}},[S,w,R,T,A]);const k=n.useMemo(()=>({reference:x,floating:E,setReference:C,setFloating:b}),[C,b]),P=n.useMemo(()=>({reference:S,floating:w}),[S,w]),N=n.useMemo(()=>{const e={position:i,left:0,top:0};if(!P.floating)return e;const t=ne(P.floating,d.x),n=ne(P.floating,d.y);return l?{...e,transform:"translate("+t+"px, "+n+"px)",...ie(P.floating)>=1.5&&{willChange:"transform"}}:{position:i,left:t,top:n}},[i,l,P.floating,d.x,d.y]);return n.useMemo(()=>({...d,update:R,refs:k,elements:P,floatingStyles:N}),[d,R,k,P,N])}({...e,elements:{...o,...c&&{reference:c}}}),f=n.useCallback(e=>{const t=(0,r.vq)(e)?{getBoundingClientRect:()=>e.getBoundingClientRect(),getClientRects:()=>e.getClientRects(),contextElement:e}:e;h(t),g.refs.setReference(t)},[g.refs]),m=n.useCallback(e=>{((0,r.vq)(e)||null===e)&&(u.current=e,l(e)),((0,r.vq)(g.refs.reference.current)||null===g.refs.reference.current||null!==e&&!(0,r.vq)(e))&&g.refs.setReference(e)},[g.refs]),v=n.useMemo(()=>({...g.refs,setReference:m,setPositionReference:f,domReference:u}),[g.refs,m,f]),y=n.useMemo(()=>({...g.elements,domReference:d}),[g.elements,d]),C=n.useMemo(()=>({...g,...s,refs:v,elements:y,nodeId:t}),[g,v,y,t,s]);return R(()=>{s.dataRef.current.floatingContext=C;const e=null==p?void 0:p.nodesRef.current.find(e=>e.id===t);e&&(e.context=C)}),n.useMemo(()=>({...g,context:C,refs:v,elements:y}),[g,v,y,C])}function Yt(){return l().toLowerCase().startsWith("mac")&&!navigator.maxTouchPoints&&h()}function qt(e,t){void 0===t&&(t={});const{open:i,onOpenChange:s,events:o,dataRef:a,elements:l}=e,{enabled:c=!0,visibleOnly:h=!0}=t,d=n.useRef(!1),p=n.useRef(-1),g=n.useRef(!0);n.useEffect(()=>{if(!c)return;const e=(0,r.zk)(l.domReference);function t(){!i&&(0,r.sb)(l.domReference)&&l.domReference===m(b(l.domReference))&&(d.current=!0)}function n(){g.current=!0}function s(){g.current=!1}return e.addEventListener("blur",t),Yt()&&(e.addEventListener("keydown",n,!0),e.addEventListener("pointerdown",s,!0)),()=>{e.removeEventListener("blur",t),Yt()&&(e.removeEventListener("keydown",n,!0),e.removeEventListener("pointerdown",s,!0))}},[l.domReference,i,c]),n.useEffect(()=>{if(c)return o.on("openchange",e),()=>{o.off("openchange",e)};function e(e){let{reason:t}=e;"reference-press"!==t&&"escape-key"!==t||(d.current=!0)}},[o,c]),n.useEffect(()=>()=>{qe(p)},[]);const f=n.useMemo(()=>({onMouseLeave(){d.current=!1},onFocus(e){if(d.current)return;const t=y(e.nativeEvent);if(h&&(0,r.vq)(t))if(Yt()&&!e.relatedTarget){if(!g.current&&!S(t))return}else if(!function(e){if(!e||u())return!0;try{return e.matches(":focus-visible")}catch(e){return!0}}(t))return;s(!0,e.nativeEvent,"focus")},onBlur(e){d.current=!1;const t=e.relatedTarget,i=e.nativeEvent,n=(0,r.vq)(t)&&t.hasAttribute(Ye("focus-guard"))&&"outside"===t.getAttribute("data-type");p.current=window.setTimeout(()=>{var e;const r=m(l.domReference?l.domReference.ownerDocument:document);(t||r!==l.domReference)&&(v(null==(e=a.current.floatingContext)?void 0:e.refs.floating.current,r)||v(l.domReference,r)||n||s(!1,i,"focus"))})}}),[a,l.domReference,s,h]);return n.useMemo(()=>c?{reference:f}:{},[c,f])}function Xt(e,t,i){const n=new Map,s="item"===i;let r=e;if(s&&e){const{[Se]:t,[we]:i,...n}=e;r=n}return{..."floating"===i&&{tabIndex:-1,[be]:""},...r,...t.map(t=>{const n=t?t[i]:null;return"function"==typeof n?e?n(e):null:n}).concat(e).reduce((e,t)=>t?(Object.entries(t).forEach(t=>{let[i,r]=t;var o;s&&[Se,we].includes(i)||(0===i.indexOf("on")?(n.has(i)||n.set(i,[]),"function"==typeof r&&(null==(o=n.get(i))||o.push(r),e[i]=function(){for(var e,t=arguments.length,s=new Array(t),r=0;r<t;r++)s[r]=arguments[r];return null==(e=n.get(i))?void 0:e.map(e=>e(...s)).find(e=>void 0!==e)})):e[i]=r)}),e):e,{})}}function Zt(e){void 0===e&&(e=[]);const t=e.map(e=>null==e?void 0:e.reference),i=e.map(e=>null==e?void 0:e.floating),s=e.map(e=>null==e?void 0:e.item),r=n.useCallback(t=>Xt(t,e,"reference"),t),o=n.useCallback(t=>Xt(t,e,"floating"),i),a=n.useCallback(t=>Xt(t,e,"item"),s);return n.useMemo(()=>({getReferenceProps:r,getFloatingProps:o,getItemProps:a}),[r,o,a])}function Qt(e,t,i){switch(e){case"vertical":return t;case"horizontal":return i;default:return t||i}}function Jt(e,t){return Qt(t,e===Me||e===Ae,e===xe||e===Ee)}function ei(e,t,i){return Qt(t,e===Ae,i?e===xe:e===Ee)||"Enter"===e||" "===e||""===e}function ti(e,t,i){return Qt(t,i?e===xe:e===Ee,e===Ae)}function ii(e,t,i,n){return"both"===t||"horizontal"===t&&n&&n>1?"Escape"===e:Qt(t,i?e===Ee:e===xe,e===Me)}function ni(e,t){const{open:i,onOpenChange:s,elements:o,floatingId:a}=e,{listRef:l,activeIndex:c,onNavigate:h=()=>{},enabled:d=!0,selectedIndex:u=null,allowEscape:p=!1,loop:g=!1,nested:f=!1,rtl:y=!1,virtual:C=!1,focusItemOnOpen:S="auto",focusItemOnHover:M=!0,openOnArrowKeyDown:I=!0,disabledIndices:k,orientation:N="vertical",parentOrientation:W,cols:j=1,scrollItemIntoView:K=!0,virtualItemRef:$,itemSizes:Y,dense:q=!1}=t,X=L(x(o.floating)),Z=Ue(),Q=We();R(()=>{e.dataRef.current.orientation=N},[e,N]);const J=P(()=>{h(-1===ie.current?null:ie.current)}),ee=w(o.domReference),te=n.useRef(S),ie=n.useRef(null!=u?u:-1),ne=n.useRef(null),se=n.useRef(!0),re=n.useRef(J),oe=n.useRef(!!o.floating),ae=n.useRef(i),le=n.useRef(!1),ce=n.useRef(!1),he=L(k),de=L(i),ue=L(K),pe=L(u),[ge,fe]=n.useState(),[me,ve]=n.useState(),ye=P(()=>{function e(e){var t;C?(null!=(t=e.id)&&t.endsWith("-fui-option")&&(e.id=a+"-"+Math.random().toString(16).slice(2,10)),fe(e.id),null==Q||Q.events.emit("virtualfocus",e),$&&($.current=e)):ct(e,{sync:le.current,preventScroll:!0})}const t=l.current[ie.current],i=ce.current;t&&e(t),(le.current?e=>e():requestAnimationFrame)(()=>{const n=l.current[ie.current]||t;if(!n)return;t||e(n);const s=ue.current;s&&be&&(i||!se.current)&&(null==n.scrollIntoView||n.scrollIntoView("boolean"==typeof s?{block:"nearest",inline:"nearest"}:s))})});R(()=>{d&&(i&&o.floating?te.current&&null!=u&&(ce.current=!0,ie.current=u,J()):oe.current&&(ie.current=-1,re.current()))},[d,i,o.floating,u,J]),R(()=>{if(d&&i&&o.floating)if(null==c){if(le.current=!1,null!=pe.current)return;if(oe.current&&(ie.current=-1,ye()),(!ae.current||!oe.current)&&te.current&&(null!=ne.current||!0===te.current&&null==ne.current)){let e=0;const t=()=>{null==l.current[0]?(e<2&&(e?requestAnimationFrame:queueMicrotask)(t),e++):(ie.current=null==ne.current||ei(ne.current,N,y)||f?_(l,he.current):F(l,he.current),ne.current=null,J())};t()}}else O(l,c)||(ie.current=c,ye(),ce.current=!1)},[d,i,o.floating,c,pe,f,l,N,y,J,ye,he]),R(()=>{var e;if(!d||o.floating||!Q||C||!oe.current)return;const t=Q.nodesRef.current,i=null==(e=t.find(e=>e.id===Z))||null==(e=e.context)?void 0:e.elements.floating,n=m(b(o.floating)),s=t.some(e=>e.context&&v(e.context.elements.floating,n));i&&!s&&se.current&&i.focus({preventScroll:!0})},[d,o.floating,Q,Z,C]),R(()=>{if(d&&Q&&C&&!Z)return Q.events.on("virtualfocus",e),()=>{Q.events.off("virtualfocus",e)};function e(e){ve(e.id),$&&($.current=e)}},[d,Q,C,Z,$]),R(()=>{re.current=J,ae.current=i,oe.current=!!o.floating}),R(()=>{i||(ne.current=null,te.current=S)},[i,S]);const Ce=null!=c,be=n.useMemo(()=>{function e(e){if(!de.current)return;const t=l.current.indexOf(e);-1!==t&&ie.current!==t&&(ie.current=t,J())}return{onFocus(t){let{currentTarget:i}=t;le.current=!0,e(i)},onClick:e=>{let{currentTarget:t}=e;return t.focus({preventScroll:!0})},onMouseMove(t){let{currentTarget:i}=t;le.current=!0,ce.current=!1,M&&e(i)},onPointerLeave(e){let{pointerType:t}=e;var i;se.current&&"touch"!==t&&(le.current=!0,M&&(ie.current=-1,J(),C||null==(i=X.current)||i.focus({preventScroll:!0})))}}},[de,X,M,l,J,C]),Se=n.useCallback(()=>{var e;return null!=W?W:null==Q||null==(e=Q.nodesRef.current.find(e=>e.id===Z))||null==(e=e.context)||null==(e=e.dataRef)?void 0:e.current.orientation},[Z,Q,W]),we=P(e=>{if(se.current=!1,le.current=!0,229===e.which)return;if(!de.current&&e.currentTarget===X.current)return;if(f&&ii(e.key,N,y,j))return Jt(e.key,Se())||A(e),s(!1,e.nativeEvent,"list-navigation"),void((0,r.sb)(o.domReference)&&(C?null==Q||Q.events.emit("virtualfocus",o.domReference):o.domReference.focus()));const t=ie.current,n=_(l,k),a=F(l,k);if(ee||("Home"===e.key&&(A(e),ie.current=n,J()),"End"===e.key&&(A(e),ie.current=a,J())),j>1){const t=Y||Array.from({length:l.current.length},()=>({width:1,height:1})),i=B(t,j,q),s=i.findIndex(e=>null!=e&&!U(l,e,k)),r=i.reduce((e,t,i)=>null==t||U(l,t,k)?e:i,-1),o=i[V({current:i.map(e=>null!=e?l.current[e]:null)},{event:e,orientation:N,loop:g,rtl:y,cols:j,disabledIndices:z([...("function"!=typeof k?k:null)||l.current.map((e,t)=>U(l,t,k)?t:void 0),void 0],i),minIndex:s,maxIndex:r,prevIndex:H(ie.current>a?n:ie.current,t,i,j,e.key===Ae?"bl":e.key===(y?xe:Ee)?"tr":"tl"),stopEvent:!0})];if(null!=o&&(ie.current=o,J()),"both"===N)return}if(Jt(e.key,N)){if(A(e),i&&!C&&m(e.currentTarget.ownerDocument)===e.currentTarget)return ie.current=ei(e.key,N,y)?n:a,void J();ei(e.key,N,y)?ie.current=g?t>=a?p&&t!==l.current.length?-1:n:G(l,{startingIndex:t,disabledIndices:k}):Math.min(a,G(l,{startingIndex:t,disabledIndices:k})):ie.current=g?t<=n?p&&-1!==t?l.current.length:a:G(l,{startingIndex:t,decrement:!0,disabledIndices:k}):Math.max(n,G(l,{startingIndex:t,decrement:!0,disabledIndices:k})),O(l,ie.current)&&(ie.current=-1),J()}}),Me=n.useMemo(()=>C&&i&&Ce&&{"aria-activedescendant":me||ge},[C,i,Ce,me,ge]),Te=n.useMemo(()=>({"aria-orientation":"both"===N?void 0:N,...ee?{}:Me,onKeyDown:we,onPointerMove(){se.current=!0}}),[Me,we,N,ee]),De=n.useMemo(()=>{function e(e){"auto"===S&&T(e.nativeEvent)&&(te.current=!0)}function t(e){te.current=S,"auto"===S&&D(e.nativeEvent)&&(te.current=!0)}return{...Me,onKeyDown(e){se.current=!1;const t=e.key.startsWith("Arrow"),n=["Home","End"].includes(e.key),r=t||n,o=ti(e.key,N,y),a=ii(e.key,N,y,j),c=ti(e.key,Se(),y),h=Jt(e.key,N),d=(f?c:h)||"Enter"===e.key||""===e.key.trim();if(C&&i){const t=null==Q?void 0:Q.nodesRef.current.find(e=>null==e.parentId),i=Q&&t?function(e,t){let i,n=-1;return function t(s,r){r>n&&(i=s,n=r),E(e,s).forEach(e=>{t(e.id,r+1)})}(t,0),e.find(e=>e.id===i)}(Q.nodesRef.current,t.id):null;if(r&&i&&$){const t=new KeyboardEvent("keydown",{key:e.key,bubbles:!0});if(o||a){var p,g;const n=(null==(p=i.context)?void 0:p.elements.domReference)===e.currentTarget,s=a&&!n?null==(g=i.context)?void 0:g.elements.domReference:o?l.current.find(e=>(null==e?void 0:e.id)===ge):null;s&&(A(e),s.dispatchEvent(t),ve(void 0))}var m;if((h||n)&&i.context&&i.context.open&&i.parentId&&e.currentTarget!==i.context.elements.domReference)return A(e),void(null==(m=i.context.elements.domReference)||m.dispatchEvent(t))}return we(e)}if(i||I||!t){if(d){const t=Jt(e.key,Se());ne.current=f&&t?null:e.key}f?c&&(A(e),i?(ie.current=_(l,he.current),J()):s(!0,e.nativeEvent,"list-navigation")):h&&(null!=u&&(ie.current=u),A(e),!i&&I?s(!0,e.nativeEvent,"list-navigation"):we(e),i&&J())}},onFocus(){i&&!C&&(ie.current=-1,J())},onPointerDown:t,onPointerEnter:t,onMouseDown:e,onClick:e}},[ge,Me,j,we,he,S,l,f,J,s,i,I,N,Se,y,u,Q,C,$]);return n.useMemo(()=>d?{reference:De,floating:Te,item:be}:{},[d,De,Te,be])}const si=new Map([["select","listbox"],["combobox","listbox"],["label",!1]]);function ri(e,t){var i,s;void 0===t&&(t={});const{open:r,elements:o,floatingId:a}=e,{enabled:l=!0,role:c="dialog"}=t,h=Ge(),d=(null==(i=o.domReference)?void 0:i.id)||h,u=n.useMemo(()=>{var e;return(null==(e=x(o.floating))?void 0:e.id)||a},[o.floating,a]),p=null!=(s=si.get(c))?s:c,g=null!=Ue(),f=n.useMemo(()=>"tooltip"===p||"label"===c?{["aria-"+("label"===c?"labelledby":"describedby")]:r?u:void 0}:{"aria-expanded":r?"true":"false","aria-haspopup":"alertdialog"===p?"dialog":p,"aria-controls":r?u:void 0,..."listbox"===p&&{role:"combobox"},..."menu"===p&&{id:d},..."menu"===p&&g&&{role:"menuitem"},..."select"===c&&{"aria-autocomplete":"none"},..."combobox"===c&&{"aria-autocomplete":"list"}},[p,u,g,r,d,c]),m=n.useMemo(()=>{const e={id:u,...p&&{role:p}};return"tooltip"===p||"label"===c?e:{...e,..."menu"===p&&{"aria-labelledby":d}}},[p,u,d,c]),v=n.useCallback(e=>{let{active:t,selected:i}=e;const n={role:"option",...t&&{id:u+"-fui-option"}};switch(c){case"select":case"combobox":return{...n,"aria-selected":i}}return{}},[u,c]);return n.useMemo(()=>l?{reference:f,floating:m,item:v}:{},[l,f,m,v])}const oi=e=>e.replace(/[A-Z]+(?![a-z])|[A-Z]/g,(e,t)=>(t?"-":"")+e.toLowerCase());function ai(e,t){return"function"==typeof e?e(t):e}function li(e,t){void 0===t&&(t={});const{open:i,elements:{floating:s}}=e,{duration:r=250}=t,o=("number"==typeof r?r:r.close)||0,[a,l]=n.useState("unmounted"),c=function(e,t){const[i,s]=n.useState(e);return e&&!i&&s(!0),n.useEffect(()=>{if(!e&&i){const e=setTimeout(()=>s(!1),t);return()=>clearTimeout(e)}},[e,i,t]),i}(i,o);return c||"close"!==a||l("unmounted"),R(()=>{if(s){if(i){l("initial");const e=requestAnimationFrame(()=>{Q.flushSync(()=>{l("open")})});return()=>{cancelAnimationFrame(e)}}l("close")}},[i,s]),{isMounted:c,status:a}}function ci(e,t){void 0===t&&(t={});const{initial:i={opacity:0},open:s,close:r,common:o,duration:a=250}=t,l=e.placement,c=l.split("-")[0],h=n.useMemo(()=>({side:c,placement:l}),[c,l]),d="number"==typeof a,u=(d?a:a.open)||0,p=(d?a:a.close)||0,[g,f]=n.useState(()=>({...ai(o,h),...ai(i,h)})),{isMounted:m,status:v}=li(e,{duration:a}),y=L(i),C=L(s),b=L(r),S=L(o);return R(()=>{const e=ai(y.current,h),t=ai(b.current,h),i=ai(S.current,h),n=ai(C.current,h)||Object.keys(e).reduce((e,t)=>(e[t]="",e),{});if("initial"===v&&f(t=>({transitionProperty:t.transitionProperty,...i,...e})),"open"===v&&f({transitionProperty:Object.keys(n).map(oi).join(","),transitionDuration:u+"ms",...i,...n}),"close"===v){const n=t||e;f({transitionProperty:Object.keys(n).map(oi).join(","),transitionDuration:p+"ms",...i,...n})}},[p,b,y,C,S,u,v,h]),{isMounted:m,styles:g}}function hi(e,t){var i;const{open:s,dataRef:r}=e,{listRef:o,activeIndex:a,onMatch:l,onTypingChange:c,enabled:h=!0,findMatch:d=null,resetMs:u=750,ignoreKeys:p=[],selectedIndex:g=null}=t,f=n.useRef(-1),m=n.useRef(""),v=n.useRef(null!=(i=null!=g?g:a)?i:-1),y=n.useRef(null),C=P(l),b=P(c),S=L(d),w=L(p);R(()=>{s&&(qe(f),y.current=null,m.current="")},[s]),R(()=>{var e;s&&""===m.current&&(v.current=null!=(e=null!=g?g:a)?e:-1)},[s,g,a]);const x=P(e=>{e?r.current.typing||(r.current.typing=e,b(e)):r.current.typing&&(r.current.typing=e,b(e))}),E=P(e=>{function t(e,t,i){const n=S.current?S.current(t,i):t.find(e=>0===(null==e?void 0:e.toLocaleLowerCase().indexOf(i.toLocaleLowerCase())));return n?e.indexOf(n):-1}const i=o.current;if(m.current.length>0&&" "!==m.current[0]&&(-1===t(i,i,m.current)?x(!1):" "===e.key&&A(e)),null==i||w.current.includes(e.key)||1!==e.key.length||e.ctrlKey||e.metaKey||e.altKey)return;s&&" "!==e.key&&(A(e),x(!0)),i.every(e=>{var t,i;return!e||(null==(t=e[0])?void 0:t.toLocaleLowerCase())!==(null==(i=e[1])?void 0:i.toLocaleLowerCase())})&&m.current===e.key&&(m.current="",v.current=y.current),m.current+=e.key,qe(f),f.current=window.setTimeout(()=>{m.current="",v.current=y.current,x(!1)},u);const n=v.current,r=t(i,[...i.slice((n||0)+1),...i.slice(0,(n||0)+1)],m.current);-1!==r?(C(r),y.current=r):" "!==e.key&&(m.current="",x(!1))}),M=n.useMemo(()=>({onKeyDown:E}),[E]),T=n.useMemo(()=>({onKeyDown:E,onKeyUp(e){" "===e.key&&x(!1)}}),[E,x]);return n.useMemo(()=>h?{reference:M,floating:T}:{},[h,M,T])}function di(e,t){return{...e,rects:{...e.rects,floating:{...e.rects.floating,height:t}}}}const ui=e=>({name:"inner",options:e,async fn(t){const{listRef:i,overflowRef:n,onFallbackChange:s,offset:r=0,index:a=0,minItemsVisible:l=4,referenceOverflowThreshold:c=0,scrollRef:h,...d}=(0,o._3)(e,t),{rects:u,platform:p,elements:{floating:g}}=t,f=i.current[a],m=(null==h?void 0:h.current)||g,v=g.clientTop||m.clientTop,y=0!==g.clientTop,C=0!==m.clientTop,b=g===m;if(!f)return{};const S={...t,...await oe(-f.offsetTop-g.clientTop-u.reference.height/2-f.offsetHeight/2-r).fn(t)},w=await p.detectOverflow(di(S,m.scrollHeight+v+g.clientTop),d),x=await p.detectOverflow(S,{...d,elementContext:"reference"}),E=(0,o.T9)(0,w.top),M=S.y+E,A=(m.scrollHeight>m.clientHeight?e=>e:o.LI)((0,o.T9)(0,m.scrollHeight+(y&&b||C?2*v:0)-E-(0,o.T9)(0,w.bottom)));if(m.style.maxHeight=A+"px",m.scrollTop=E,s){const e=m.offsetHeight<f.offsetHeight*(0,o.jk)(l,i.current.length)-1||x.top>=-c||x.bottom>=-c;Q.flushSync(()=>s(e))}return n&&(n.current=await p.detectOverflow(di({...S,y:M},m.offsetHeight+v+g.clientTop),d)),{y:M}}});function pi(e,t){const{open:i,elements:s}=e,{enabled:r=!0,overflowRef:o,scrollRef:a,onChange:l}=t,h=P(l),d=n.useRef(!1),u=n.useRef(null),p=n.useRef(null);n.useEffect(()=>{if(!r)return;function e(e){if(e.ctrlKey||!t||null==o.current)return;const i=e.deltaY,n=o.current.top>=-.5,s=o.current.bottom>=-.5,r=t.scrollHeight-t.clientHeight,a=i<0?-1:1,l=i<0?"max":"min";t.scrollHeight<=t.clientHeight||(!n&&i>0||!s&&i<0?(e.preventDefault(),Q.flushSync(()=>{h(e=>e+Math[l](i,r*a))})):/firefox/i.test(c())&&(t.scrollTop+=i))}const t=(null==a?void 0:a.current)||s.floating;return i&&t?(t.addEventListener("wheel",e),requestAnimationFrame(()=>{u.current=t.scrollTop,null!=o.current&&(p.current={...o.current})}),()=>{u.current=null,p.current=null,t.removeEventListener("wheel",e)}):void 0},[r,i,s.floating,o,a,h]);const g=n.useMemo(()=>({onKeyDown(){d.current=!0},onWheel(){d.current=!1},onPointerMove(){d.current=!1},onScroll(){const e=(null==a?void 0:a.current)||s.floating;if(o.current&&e&&d.current){if(null!==u.current){const t=e.scrollTop-u.current;(o.current.bottom<-.5&&t<-1||o.current.top<-.5&&t>1)&&Q.flushSync(()=>h(e=>e+t))}requestAnimationFrame(()=>{u.current=e.scrollTop})}}}),[s.floating,h,o,a]);return n.useMemo(()=>r?{floating:g}:{},[r,g])}function gi(e,t,i){return void 0===i&&(i=!0),e.filter(e=>{var n;return e.parentId===t&&(!i||(null==(n=e.context)?void 0:n.open))}).flatMap(t=>[t,...gi(e,t.id,i)])}function fi(e,t){const[i,n]=e;let s=!1;const r=t.length;for(let e=0,o=r-1;e<r;o=e++){const[r,a]=t[e]||[0,0],[l,c]=t[o]||[0,0];a>=n!=c>=n&&i<=(l-r)*(n-a)/(c-a)+r&&(s=!s)}return s}function mi(e){void 0===e&&(e={});const{buffer:t=.5,blockPointerEvents:i=!1,requireIntent:n=!0}=e,s={current:-1};let o=!1,a=null,l=null,c="undefined"!=typeof performance?performance.now():0;const h=e=>{let{x:i,y:h,placement:d,elements:u,onClose:p,nodeId:g,tree:f}=e;return function(e){function m(){qe(s),p()}if(qe(s),!u.domReference||!u.floating||null==d||null==i||null==h)return;const{clientX:v,clientY:y}=e,C=[v,y],b=function(e){return"composedPath"in e?e.composedPath()[0]:e.target}(e),S="mouseleave"===e.type,w=ht(u.floating,b),x=ht(u.domReference,b),E=u.domReference.getBoundingClientRect(),M=u.floating.getBoundingClientRect(),A=d.split("-")[0],T=i>M.right-M.width/2,D=h>M.bottom-M.height/2,I=function(e,t){return e[0]>=t.x&&e[0]<=t.x+t.width&&e[1]>=t.y&&e[1]<=t.y+t.height}(C,E),R=M.width>E.width,L=M.height>E.height,k=(R?E:M).left,P=(R?E:M).right,N=(L?E:M).top,O=(L?E:M).bottom;if(w&&(o=!0,!S))return;if(x&&(o=!1),x&&!S)return void(o=!0);if(S&&(0,r.vq)(e.relatedTarget)&&ht(u.floating,e.relatedTarget))return;if(f&&gi(f.nodesRef.current,g).length)return;if("top"===A&&h>=E.bottom-1||"bottom"===A&&h<=E.top+1||"left"===A&&i>=E.right-1||"right"===A&&i<=E.left+1)return m();let _=[];switch(A){case"top":_=[[k,E.top+1],[k,M.bottom-1],[P,M.bottom-1],[P,E.top+1]];break;case"bottom":_=[[k,M.top+1],[k,E.bottom-1],[P,E.bottom-1],[P,M.top+1]];break;case"left":_=[[M.right-1,O],[M.right-1,N],[E.left+1,N],[E.left+1,O]];break;case"right":_=[[E.right-1,O],[E.right-1,N],[M.left+1,N],[M.left+1,O]]}if(!fi([v,y],_)){if(o&&!I)return m();if(!S&&n){const t=function(e,t){const i=performance.now(),n=i-c;if(null===a||null===l||0===n)return a=e,l=t,c=i,null;const s=e-a,r=t-l,o=Math.sqrt(s*s+r*r);return a=e,l=t,c=i,o/n}(e.clientX,e.clientY);if(null!==t&&t<.1)return m()}fi([v,y],function(e){let[i,n]=e;switch(A){case"top":return[[R?i+t/2:T?i+4*t:i-4*t,n+t+1],[R?i-t/2:T?i+4*t:i-4*t,n+t+1],[M.left,T||R?M.bottom-t:M.top],[M.right,T?R?M.bottom-t:M.top:M.bottom-t]];case"bottom":return[[R?i+t/2:T?i+4*t:i-4*t,n-t],[R?i-t/2:T?i+4*t:i-4*t,n-t],[M.left,T||R?M.top+t:M.bottom],[M.right,T?R?M.top+t:M.bottom:M.top+t]];case"left":{const e=[i+t+1,L?n+t/2:D?n+4*t:n-4*t],s=[i+t+1,L?n-t/2:D?n+4*t:n-4*t];return[[D||L?M.right-t:M.left,M.top],[D?L?M.right-t:M.left:M.right-t,M.bottom],e,s]}case"right":return[[i-t,L?n+t/2:D?n+4*t:n-4*t],[i-t,L?n-t/2:D?n+4*t:n-4*t],[D||L?M.left+t:M.right,M.top],[D?L?M.left+t:M.right:M.left+t,M.bottom]]}}([i,h]))?!o&&n&&(s.current=window.setTimeout(m,40)):m()}}};return h.__options={blockPointerEvents:i},h}},14650(e,t,i){"use strict";var n;i.r(t),i.d(t,{activeElement:()=>v,contains:()=>y,createGridCellMap:()=>j,disableFocusInside:()=>ee,enableFocusInside:()=>te,findNonDisabledListIndex:()=>U,getDeepestNode:()=>D,getDocument:()=>w,getFloatingFocusElement:()=>A,getGridCellIndexOfCorner:()=>K,getGridCellIndices:()=>$,getGridNavigatedIndex:()=>W,getMaxListIndex:()=>z,getMinListIndex:()=>H,getNextTabbable:()=>Z,getNodeAncestors:()=>I,getNodeChildren:()=>T,getPlatform:()=>l,getPreviousTabbable:()=>Q,getTabbableOptions:()=>q,getTarget:()=>C,getUserAgent:()=>c,isAndroid:()=>d,isDifferentGridRow:()=>V,isEventTargetWithin:()=>b,isIndexOutOfListBounds:()=>B,isJSDOM:()=>p,isListIndexDisabled:()=>Y,isMac:()=>u,isMouseLikePointerType:()=>N,isOutsideEvent:()=>J,isReactEvent:()=>L,isRootElement:()=>S,isSafari:()=>h,isTypeableCombobox:()=>E,isTypeableElement:()=>x,isVirtualClick:()=>k,isVirtualPointerEvent:()=>P,matchesFocusVisible:()=>M,stopEvent:()=>R,useEffectEvent:()=>G,useLatestRef:()=>_,useModernLayoutEffect:()=>O});var s=i(28442),r=i(22155),o=i(67500),a=i(86668);function l(){const e=navigator.userAgentData;return null!=e&&e.platform?e.platform:navigator.platform}function c(){const e=navigator.userAgentData;return e&&Array.isArray(e.brands)?e.brands.map(e=>{let{brand:t,version:i}=e;return t+"/"+i}).join(" "):navigator.userAgent}function h(){return/apple/i.test(navigator.vendor)}function d(){const e=/android/i;return e.test(l())||e.test(c())}function u(){return l().toLowerCase().startsWith("mac")&&!navigator.maxTouchPoints}function p(){return c().includes("jsdom/")}const g="data-floating-ui-focusable",f="ArrowLeft",m="ArrowRight";function v(e){let t=e.activeElement;for(;null!=(null==(i=t)||null==(i=i.shadowRoot)?void 0:i.activeElement);){var i;t=t.shadowRoot.activeElement}return t}function y(e,t){if(!e||!t)return!1;const i=null==t.getRootNode?void 0:t.getRootNode();if(e.contains(t))return!0;if(i&&(0,s.Ng)(i)){let i=t;for(;i;){if(e===i)return!0;i=i.parentNode||i.host}}return!1}function C(e){return"composedPath"in e?e.composedPath()[0]:e.target}function b(e,t){if(null==t)return!1;if("composedPath"in e)return e.composedPath().includes(t);const i=e;return null!=i.target&&t.contains(i.target)}function S(e){return e.matches("html,body")}function w(e){return(null==e?void 0:e.ownerDocument)||document}function x(e){return(0,s.sb)(e)&&e.matches("input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])")}function E(e){return!!e&&"combobox"===e.getAttribute("role")&&x(e)}function M(e){if(!e||p())return!0;try{return e.matches(":focus-visible")}catch(e){return!0}}function A(e){return e?e.hasAttribute(g)?e:e.querySelector("["+g+"]")||e:null}function T(e,t,i){return void 0===i&&(i=!0),e.filter(e=>{var n;return e.parentId===t&&(!i||(null==(n=e.context)?void 0:n.open))}).flatMap(t=>[t,...T(e,t.id,i)])}function D(e,t){let i,n=-1;return function t(s,r){r>n&&(i=s,n=r),T(e,s).forEach(e=>{t(e.id,r+1)})}(t,0),e.find(e=>e.id===i)}function I(e,t){var i;let n=[],s=null==(i=e.find(e=>e.id===t))?void 0:i.parentId;for(;s;){const t=e.find(e=>e.id===s);s=null==t?void 0:t.parentId,t&&(n=n.concat(t))}return n}function R(e){e.preventDefault(),e.stopPropagation()}function L(e){return"nativeEvent"in e}function k(e){return!(0!==e.mozInputSource||!e.isTrusted)||(d()&&e.pointerType?"click"===e.type&&1===e.buttons:0===e.detail&&!e.pointerType)}function P(e){return!p()&&(!d()&&0===e.width&&0===e.height||d()&&1===e.width&&1===e.height&&0===e.pressure&&0===e.detail&&"mouse"===e.pointerType||e.width<1&&e.height<1&&0===e.pressure&&0===e.detail&&"touch"===e.pointerType)}function N(e,t){const i=["mouse","pen"];return t||i.push("",void 0),i.includes(e)}var O="undefined"!=typeof document?r.useLayoutEffect:function(){};function _(e){const t=r.useRef(e);return O(()=>{t.current=e}),t}const F={...n||(n=i.t(r,2))}.useInsertionEffect||(e=>e());function G(e){const t=r.useRef(()=>{});return F(()=>{t.current=e}),r.useCallback(function(){for(var e=arguments.length,i=new Array(e),n=0;n<e;n++)i[n]=arguments[n];return null==t.current?void 0:t.current(...i)},[])}function V(e,t,i){return Math.floor(e/t)!==i}function B(e,t){return t<0||t>=e.current.length}function H(e,t){return U(e,{disabledIndices:t})}function z(e,t){return U(e,{decrement:!0,startingIndex:e.current.length,disabledIndices:t})}function U(e,t){let{startingIndex:i=-1,decrement:n=!1,disabledIndices:s,amount:r=1}=void 0===t?{}:t,o=i;do{o+=n?-r:r}while(o>=0&&o<=e.current.length-1&&Y(e,o,s));return o}function W(e,t){let{event:i,orientation:n,loop:s,rtl:r,cols:a,disabledIndices:l,minIndex:c,maxIndex:h,prevIndex:d,stopEvent:u=!1}=t,p=d;if("ArrowUp"===i.key){if(u&&R(i),-1===d)p=h;else if(p=U(e,{startingIndex:p,amount:a,decrement:!0,disabledIndices:l}),s&&(d-a<c||p<0)){const e=d%a,t=h%a,i=h-(t-e);p=t===e?h:t>e?i:i-a}B(e,p)&&(p=d)}if("ArrowDown"===i.key&&(u&&R(i),-1===d?p=c:(p=U(e,{startingIndex:d,amount:a,disabledIndices:l}),s&&d+a>h&&(p=U(e,{startingIndex:d%a-a,amount:a,disabledIndices:l}))),B(e,p)&&(p=d)),"both"===n){const t=(0,o.RI)(d/a);i.key===(r?f:m)&&(u&&R(i),d%a!==a-1?(p=U(e,{startingIndex:d,disabledIndices:l}),s&&V(p,a,t)&&(p=U(e,{startingIndex:d-d%a-1,disabledIndices:l}))):s&&(p=U(e,{startingIndex:d-d%a-1,disabledIndices:l})),V(p,a,t)&&(p=d)),i.key===(r?m:f)&&(u&&R(i),d%a!==0?(p=U(e,{startingIndex:d,decrement:!0,disabledIndices:l}),s&&V(p,a,t)&&(p=U(e,{startingIndex:d+(a-d%a),decrement:!0,disabledIndices:l}))):s&&(p=U(e,{startingIndex:d+(a-d%a),decrement:!0,disabledIndices:l})),V(p,a,t)&&(p=d));const n=(0,o.RI)(h/a)===t;B(e,p)&&(p=s&&n?i.key===(r?m:f)?h:U(e,{startingIndex:d-d%a-1,disabledIndices:l}):d)}return p}function j(e,t,i){const n=[];let s=0;return e.forEach((e,r)=>{let{width:o,height:a}=e,l=!1;for(i&&(s=0);!l;){const e=[];for(let i=0;i<o;i++)for(let n=0;n<a;n++)e.push(s+i+n*t);s%t+o<=t&&e.every(e=>null==n[e])?(e.forEach(e=>{n[e]=r}),l=!0):s++}}),[...n]}function K(e,t,i,n,s){if(-1===e)return-1;const r=i.indexOf(e),o=t[e];switch(s){case"tl":return r;case"tr":return o?r+o.width-1:r;case"bl":return o?r+(o.height-1)*n:r;case"br":return i.lastIndexOf(e)}}function $(e,t){return t.flatMap((t,i)=>e.includes(t)?[i]:[])}function Y(e,t,i){if("function"==typeof i)return i(t);if(i)return i.includes(t);const n=e.current[t];return null==n||n.hasAttribute("disabled")||"true"===n.getAttribute("aria-disabled")}const q=()=>({getShadowRoot:!0,displayCheck:"function"==typeof ResizeObserver&&ResizeObserver.toString().includes("[native code]")?"full":"none"});function X(e,t){const i=(0,a.Kr)(e,q()),n=i.length;if(0===n)return;const s=v(w(e)),r=i.indexOf(s);return i[-1===r?1===t?0:n-1:r+t]}function Z(e){return X(w(e).body,1)||e}function Q(e){return X(w(e).body,-1)||e}function J(e,t){const i=t||e.currentTarget,n=e.relatedTarget;return!n||!y(i,n)}function ee(e){(0,a.Kr)(e,q()).forEach(e=>{e.dataset.tabindex=e.getAttribute("tabindex")||"",e.setAttribute("tabindex","-1")})}function te(e){e.querySelectorAll("[data-tabindex]").forEach(e=>{const t=e.dataset.tabindex;delete e.dataset.tabindex,t?e.setAttribute("tabindex",t):e.removeAttribute("tabindex")})}},49065(e,t,i){"use strict";i.r(t),i.d(t,{alignments:()=>s,clamp:()=>p,createCoords:()=>h,evaluate:()=>g,expandPaddingObject:()=>L,floor:()=>c,getAlignment:()=>m,getAlignmentAxis:()=>S,getAlignmentSides:()=>w,getAxisLength:()=>y,getExpandedPlacements:()=>x,getOppositeAlignmentPlacement:()=>E,getOppositeAxis:()=>v,getOppositeAxisPlacements:()=>I,getOppositePlacement:()=>R,getPaddingObject:()=>k,getSide:()=>f,getSideAxis:()=>b,max:()=>a,min:()=>o,placements:()=>r,rectToClientRect:()=>P,round:()=>l,sides:()=>n});const n=["top","right","bottom","left"],s=["start","end"],r=n.reduce((e,t)=>e.concat(t,t+"-"+s[0],t+"-"+s[1]),[]),o=Math.min,a=Math.max,l=Math.round,c=Math.floor,h=e=>({x:e,y:e}),d={left:"right",right:"left",bottom:"top",top:"bottom"},u={start:"end",end:"start"};function p(e,t,i){return a(e,o(t,i))}function g(e,t){return"function"==typeof e?e(t):e}function f(e){return e.split("-")[0]}function m(e){return e.split("-")[1]}function v(e){return"x"===e?"y":"x"}function y(e){return"y"===e?"height":"width"}const C=new Set(["top","bottom"]);function b(e){return C.has(f(e))?"y":"x"}function S(e){return v(b(e))}function w(e,t,i){void 0===i&&(i=!1);const n=m(e),s=S(e),r=y(s);let o="x"===s?n===(i?"end":"start")?"right":"left":"start"===n?"bottom":"top";return t.reference[r]>t.floating[r]&&(o=R(o)),[o,R(o)]}function x(e){const t=R(e);return[E(e),t,E(t)]}function E(e){return e.replace(/start|end/g,e=>u[e])}const M=["left","right"],A=["right","left"],T=["top","bottom"],D=["bottom","top"];function I(e,t,i,n){const s=m(e);let r=function(e,t,i){switch(e){case"top":case"bottom":return i?t?A:M:t?M:A;case"left":case"right":return t?T:D;default:return[]}}(f(e),"start"===i,n);return s&&(r=r.map(e=>e+"-"+s),t&&(r=r.concat(r.map(E)))),r}function R(e){return e.replace(/left|right|bottom|top/g,e=>d[e])}function L(e){return{top:0,right:0,bottom:0,left:0,...e}}function k(e){return"number"!=typeof e?L(e):{top:e,right:e,bottom:e,left:e}}function P(e){const{x:t,y:i,width:n,height:s}=e;return{width:n,height:s,top:i,left:t,right:t+n,bottom:i+s,x:t,y:i}}},3704(e,t,i){"use strict";function n(e,t,i){if(void 0===i&&(i=Error),!e)throw new i(t)}i.d(t,{V1:()=>n})},59556(e,t,i){"use strict";function n(e,t){var i=t&&t.cache?t.cache:h,n=t&&t.serializer?t.serializer:l;return(t&&t.strategy?t.strategy:a)(e,{cache:i,serializer:n})}function s(e,t,i,n){var s,r=null==(s=n)||"number"==typeof s||"boolean"==typeof s?n:i(n),o=t.get(r);return void 0===o&&(o=e.call(this,n),t.set(r,o)),o}function r(e,t,i){var n=Array.prototype.slice.call(arguments,3),s=i(n),r=t.get(s);return void 0===r&&(r=e.apply(this,n),t.set(s,r)),r}function o(e,t,i,n,s){return i.bind(t,e,n,s)}function a(e,t){return o(e,this,1===e.length?s:r,t.cache.create(),t.serializer)}i.d(t,{A:()=>n,W:()=>d});var l=function(){return JSON.stringify(arguments)};function c(){this.cache=Object.create(null)}c.prototype.get=function(e){return this.cache[e]},c.prototype.set=function(e,t){this.cache[e]=t};var h={create:function(){return new c}},d={variadic:function(e,t){return o(e,this,r,t.cache.create(),t.serializer)},monadic:function(e,t){return o(e,this,s,t.cache.create(),t.serializer)}}},9991(e,t,i){"use strict";function n(e,t){var i=t&&t.cache?t.cache:h,n=t&&t.serializer?t.serializer:l;return(t&&t.strategy?t.strategy:a)(e,{cache:i,serializer:n})}function s(e,t,i,n){var s,r=null==(s=n)||"number"==typeof s||"boolean"==typeof s?n:i(n),o=t.get(r);return void 0===o&&(o=e.call(this,n),t.set(r,o)),o}function r(e,t,i){var n=Array.prototype.slice.call(arguments,3),s=i(n),r=t.get(s);return void 0===r&&(r=e.apply(this,n),t.set(s,r)),r}function o(e,t,i,n,s){return i.bind(t,e,n,s)}function a(e,t){return o(e,this,1===e.length?s:r,t.cache.create(),t.serializer)}i.d(t,{B:()=>n,W:()=>d});var l=function(){return JSON.stringify(arguments)},c=function(){function e(){this.cache=Object.create(null)}return e.prototype.get=function(e){return this.cache[e]},e.prototype.set=function(e,t){this.cache[e]=t},e}(),h={create:function(){return new c}},d={variadic:function(e,t){return o(e,this,r,t.cache.create(),t.serializer)},monadic:function(e,t){return o(e,this,s,t.cache.create(),t.serializer)}}},26140(e,t,i){"use strict";i.d(t,{ZE:()=>s,Im:()=>l,tv:()=>h,Tu:()=>v,eW:()=>a,oF:()=>c,N1:()=>m,N6:()=>p,jA:()=>g,Jp:()=>u,xm:()=>f,Qh:()=>d,qg:()=>ae});var n,s,r,o=i(65959);function a(e){return e.type===s.literal}function l(e){return e.type===s.argument}function c(e){return e.type===s.number}function h(e){return e.type===s.date}function d(e){return e.type===s.time}function u(e){return e.type===s.select}function p(e){return e.type===s.plural}function g(e){return e.type===s.pound}function f(e){return e.type===s.tag}function m(e){return!(!e||"object"!=typeof e||e.type!==r.number)}function v(e){return!(!e||"object"!=typeof e||e.type!==r.dateTime)}!function(e){e[e.EXPECT_ARGUMENT_CLOSING_BRACE=1]="EXPECT_ARGUMENT_CLOSING_BRACE",e[e.EMPTY_ARGUMENT=2]="EMPTY_ARGUMENT",e[e.MALFORMED_ARGUMENT=3]="MALFORMED_ARGUMENT",e[e.EXPECT_ARGUMENT_TYPE=4]="EXPECT_ARGUMENT_TYPE",e[e.INVALID_ARGUMENT_TYPE=5]="INVALID_ARGUMENT_TYPE",e[e.EXPECT_ARGUMENT_STYLE=6]="EXPECT_ARGUMENT_STYLE",e[e.INVALID_NUMBER_SKELETON=7]="INVALID_NUMBER_SKELETON",e[e.INVALID_DATE_TIME_SKELETON=8]="INVALID_DATE_TIME_SKELETON",e[e.EXPECT_NUMBER_SKELETON=9]="EXPECT_NUMBER_SKELETON",e[e.EXPECT_DATE_TIME_SKELETON=10]="EXPECT_DATE_TIME_SKELETON",e[e.UNCLOSED_QUOTE_IN_ARGUMENT_STYLE=11]="UNCLOSED_QUOTE_IN_ARGUMENT_STYLE",e[e.EXPECT_SELECT_ARGUMENT_OPTIONS=12]="EXPECT_SELECT_ARGUMENT_OPTIONS",e[e.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE=13]="EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE",e[e.INVALID_PLURAL_ARGUMENT_OFFSET_VALUE=14]="INVALID_PLURAL_ARGUMENT_OFFSET_VALUE",e[e.EXPECT_SELECT_ARGUMENT_SELECTOR=15]="EXPECT_SELECT_ARGUMENT_SELECTOR",e[e.EXPECT_PLURAL_ARGUMENT_SELECTOR=16]="EXPECT_PLURAL_ARGUMENT_SELECTOR",e[e.EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT=17]="EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT",e[e.EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT=18]="EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT",e[e.INVALID_PLURAL_ARGUMENT_SELECTOR=19]="INVALID_PLURAL_ARGUMENT_SELECTOR",e[e.DUPLICATE_PLURAL_ARGUMENT_SELECTOR=20]="DUPLICATE_PLURAL_ARGUMENT_SELECTOR",e[e.DUPLICATE_SELECT_ARGUMENT_SELECTOR=21]="DUPLICATE_SELECT_ARGUMENT_SELECTOR",e[e.MISSING_OTHER_CLAUSE=22]="MISSING_OTHER_CLAUSE",e[e.INVALID_TAG=23]="INVALID_TAG",e[e.INVALID_TAG_NAME=25]="INVALID_TAG_NAME",e[e.UNMATCHED_CLOSING_TAG=26]="UNMATCHED_CLOSING_TAG",e[e.UNCLOSED_TAG=27]="UNCLOSED_TAG"}(n||(n={})),function(e){e[e.literal=0]="literal",e[e.argument=1]="argument",e[e.number=2]="number",e[e.date=3]="date",e[e.time=4]="time",e[e.select=5]="select",e[e.plural=6]="plural",e[e.pound=7]="pound",e[e.tag=8]="tag"}(s||(s={})),function(e){e[e.number=0]="number",e[e.dateTime=1]="dateTime"}(r||(r={}));var y=/[ \xA0\u1680\u2000-\u200A\u202F\u205F\u3000]/,C=/(?:[Eec]{1,6}|G{1,5}|[Qq]{1,5}|(?:[yYur]+|U{1,5})|[ML]{1,5}|d{1,2}|D{1,3}|F{1}|[abB]{1,5}|[hkHK]{1,2}|w{1,2}|W{1}|m{1,2}|s{1,2}|[zZOvVxX]{1,4})(?=([^']*'[^']*')*[^']*$)/g;function b(e){var t={};return e.replace(C,function(e){var i=e.length;switch(e[0]){case"G":t.era=4===i?"long":5===i?"narrow":"short";break;case"y":t.year=2===i?"2-digit":"numeric";break;case"Y":case"u":case"U":case"r":throw new RangeError("`Y/u/U/r` (year) patterns are not supported, use `y` instead");case"q":case"Q":throw new RangeError("`q/Q` (quarter) patterns are not supported");case"M":case"L":t.month=["numeric","2-digit","short","long","narrow"][i-1];break;case"w":case"W":throw new RangeError("`w/W` (week) patterns are not supported");case"d":t.day=["numeric","2-digit"][i-1];break;case"D":case"F":case"g":throw new RangeError("`D/F/g` (day) patterns are not supported, use `d` instead");case"E":t.weekday=4===i?"short":5===i?"narrow":"short";break;case"e":if(i<4)throw new RangeError("`e..eee` (weekday) patterns are not supported");t.weekday=["short","long","narrow","short"][i-4];break;case"c":if(i<4)throw new RangeError("`c..ccc` (weekday) patterns are not supported");t.weekday=["short","long","narrow","short"][i-4];break;case"a":t.hour12=!0;break;case"b":case"B":throw new RangeError("`b/B` (period) patterns are not supported, use `a` instead");case"h":t.hourCycle="h12",t.hour=["numeric","2-digit"][i-1];break;case"H":t.hourCycle="h23",t.hour=["numeric","2-digit"][i-1];break;case"K":t.hourCycle="h11",t.hour=["numeric","2-digit"][i-1];break;case"k":t.hourCycle="h24",t.hour=["numeric","2-digit"][i-1];break;case"j":case"J":case"C":throw new RangeError("`j/J/C` (hour) patterns are not supported, use `h/H/K/k` instead");case"m":t.minute=["numeric","2-digit"][i-1];break;case"s":t.second=["numeric","2-digit"][i-1];break;case"S":case"A":throw new RangeError("`S/A` (second) patterns are not supported, use `s` instead");case"z":t.timeZoneName=i<4?"short":"long";break;case"Z":case"O":case"v":case"V":case"X":case"x":throw new RangeError("`Z/O/v/V/X/x` (timeZone) patterns are not supported, use `z` instead")}return""}),t}var S=/[\t-\r \x85\u200E\u200F\u2028\u2029]/i;function w(e){return e.replace(/^(.*?)-/,"")}var x=/^\.(?:(0+)(\*)?|(#+)|(0+)(#+))$/g,E=/^(@+)?(\+|#+)?[rs]?$/g,M=/(\*)(0+)|(#+)(0+)|(0+)/g,A=/^(0+)$/;function T(e){var t={};return"r"===e[e.length-1]?t.roundingPriority="morePrecision":"s"===e[e.length-1]&&(t.roundingPriority="lessPrecision"),e.replace(E,function(e,i,n){return"string"!=typeof n?(t.minimumSignificantDigits=i.length,t.maximumSignificantDigits=i.length):"+"===n?t.minimumSignificantDigits=i.length:"#"===i[0]?t.maximumSignificantDigits=i.length:(t.minimumSignificantDigits=i.length,t.maximumSignificantDigits=i.length+("string"==typeof n?n.length:0)),""}),t}function D(e){switch(e){case"sign-auto":return{signDisplay:"auto"};case"sign-accounting":case"()":return{currencySign:"accounting"};case"sign-always":case"+!":return{signDisplay:"always"};case"sign-accounting-always":case"()!":return{signDisplay:"always",currencySign:"accounting"};case"sign-except-zero":case"+?":return{signDisplay:"exceptZero"};case"sign-accounting-except-zero":case"()?":return{signDisplay:"exceptZero",currencySign:"accounting"};case"sign-never":case"+_":return{signDisplay:"never"}}}function I(e){var t;if("E"===e[0]&&"E"===e[1]?(t={notation:"engineering"},e=e.slice(2)):"E"===e[0]&&(t={notation:"scientific"},e=e.slice(1)),t){var i=e.slice(0,2);if("+!"===i?(t.signDisplay="always",e=e.slice(2)):"+?"===i&&(t.signDisplay="exceptZero",e=e.slice(2)),!A.test(e))throw new Error("Malformed concise eng/scientific notation");t.minimumIntegerDigits=e.length}return t}function R(e){return D(e)||{}}function L(e){for(var t={},i=0,n=e;i<n.length;i++){var s=n[i];switch(s.stem){case"percent":case"%":t.style="percent";continue;case"%x100":t.style="percent",t.scale=100;continue;case"currency":t.style="currency",t.currency=s.options[0];continue;case"group-off":case",_":t.useGrouping=!1;continue;case"precision-integer":case".":t.maximumFractionDigits=0;continue;case"measure-unit":case"unit":t.style="unit",t.unit=w(s.options[0]);continue;case"compact-short":case"K":t.notation="compact",t.compactDisplay="short";continue;case"compact-long":case"KK":t.notation="compact",t.compactDisplay="long";continue;case"scientific":t=(0,o.__assign)((0,o.__assign)((0,o.__assign)({},t),{notation:"scientific"}),s.options.reduce(function(e,t){return(0,o.__assign)((0,o.__assign)({},e),R(t))},{}));continue;case"engineering":t=(0,o.__assign)((0,o.__assign)((0,o.__assign)({},t),{notation:"engineering"}),s.options.reduce(function(e,t){return(0,o.__assign)((0,o.__assign)({},e),R(t))},{}));continue;case"notation-simple":t.notation="standard";continue;case"unit-width-narrow":t.currencyDisplay="narrowSymbol",t.unitDisplay="narrow";continue;case"unit-width-short":t.currencyDisplay="code",t.unitDisplay="short";continue;case"unit-width-full-name":t.currencyDisplay="name",t.unitDisplay="long";continue;case"unit-width-iso-code":t.currencyDisplay="symbol";continue;case"scale":t.scale=parseFloat(s.options[0]);continue;case"integer-width":if(s.options.length>1)throw new RangeError("integer-width stems only accept a single optional option");s.options[0].replace(M,function(e,i,n,s,r,o){if(i)t.minimumIntegerDigits=n.length;else{if(s&&r)throw new Error("We currently do not support maximum integer digits");if(o)throw new Error("We currently do not support exact integer digits")}return""});continue}if(A.test(s.stem))t.minimumIntegerDigits=s.stem.length;else if(x.test(s.stem)){if(s.options.length>1)throw new RangeError("Fraction-precision stems only accept a single optional option");s.stem.replace(x,function(e,i,n,s,r,o){return"*"===n?t.minimumFractionDigits=i.length:s&&"#"===s[0]?t.maximumFractionDigits=s.length:r&&o?(t.minimumFractionDigits=r.length,t.maximumFractionDigits=r.length+o.length):(t.minimumFractionDigits=i.length,t.maximumFractionDigits=i.length),""});var r=s.options[0];"w"===r?t=(0,o.__assign)((0,o.__assign)({},t),{trailingZeroDisplay:"stripIfInteger"}):r&&(t=(0,o.__assign)((0,o.__assign)({},t),T(r)))}else if(E.test(s.stem))t=(0,o.__assign)((0,o.__assign)({},t),T(s.stem));else{var a=D(s.stem);a&&(t=(0,o.__assign)((0,o.__assign)({},t),a));var l=I(s.stem);l&&(t=(0,o.__assign)((0,o.__assign)({},t),l))}}return t}var k,P={AX:["H"],BQ:["H"],CP:["H"],CZ:["H"],DK:["H"],FI:["H"],ID:["H"],IS:["H"],ML:["H"],NE:["H"],RU:["H"],SE:["H"],SJ:["H"],SK:["H"],AS:["h","H"],BT:["h","H"],DJ:["h","H"],ER:["h","H"],GH:["h","H"],IN:["h","H"],LS:["h","H"],PG:["h","H"],PW:["h","H"],SO:["h","H"],TO:["h","H"],VU:["h","H"],WS:["h","H"],"001":["H","h"],AL:["h","H","hB"],TD:["h","H","hB"],"ca-ES":["H","h","hB"],CF:["H","h","hB"],CM:["H","h","hB"],"fr-CA":["H","h","hB"],"gl-ES":["H","h","hB"],"it-CH":["H","h","hB"],"it-IT":["H","h","hB"],LU:["H","h","hB"],NP:["H","h","hB"],PF:["H","h","hB"],SC:["H","h","hB"],SM:["H","h","hB"],SN:["H","h","hB"],TF:["H","h","hB"],VA:["H","h","hB"],CY:["h","H","hb","hB"],GR:["h","H","hb","hB"],CO:["h","H","hB","hb"],DO:["h","H","hB","hb"],KP:["h","H","hB","hb"],KR:["h","H","hB","hb"],NA:["h","H","hB","hb"],PA:["h","H","hB","hb"],PR:["h","H","hB","hb"],VE:["h","H","hB","hb"],AC:["H","h","hb","hB"],AI:["H","h","hb","hB"],BW:["H","h","hb","hB"],BZ:["H","h","hb","hB"],CC:["H","h","hb","hB"],CK:["H","h","hb","hB"],CX:["H","h","hb","hB"],DG:["H","h","hb","hB"],FK:["H","h","hb","hB"],GB:["H","h","hb","hB"],GG:["H","h","hb","hB"],GI:["H","h","hb","hB"],IE:["H","h","hb","hB"],IM:["H","h","hb","hB"],IO:["H","h","hb","hB"],JE:["H","h","hb","hB"],LT:["H","h","hb","hB"],MK:["H","h","hb","hB"],MN:["H","h","hb","hB"],MS:["H","h","hb","hB"],NF:["H","h","hb","hB"],NG:["H","h","hb","hB"],NR:["H","h","hb","hB"],NU:["H","h","hb","hB"],PN:["H","h","hb","hB"],SH:["H","h","hb","hB"],SX:["H","h","hb","hB"],TA:["H","h","hb","hB"],ZA:["H","h","hb","hB"],"af-ZA":["H","h","hB","hb"],AR:["H","h","hB","hb"],CL:["H","h","hB","hb"],CR:["H","h","hB","hb"],CU:["H","h","hB","hb"],EA:["H","h","hB","hb"],"es-BO":["H","h","hB","hb"],"es-BR":["H","h","hB","hb"],"es-EC":["H","h","hB","hb"],"es-ES":["H","h","hB","hb"],"es-GQ":["H","h","hB","hb"],"es-PE":["H","h","hB","hb"],GT:["H","h","hB","hb"],HN:["H","h","hB","hb"],IC:["H","h","hB","hb"],KG:["H","h","hB","hb"],KM:["H","h","hB","hb"],LK:["H","h","hB","hb"],MA:["H","h","hB","hb"],MX:["H","h","hB","hb"],NI:["H","h","hB","hb"],PY:["H","h","hB","hb"],SV:["H","h","hB","hb"],UY:["H","h","hB","hb"],JP:["H","h","K"],AD:["H","hB"],AM:["H","hB"],AO:["H","hB"],AT:["H","hB"],AW:["H","hB"],BE:["H","hB"],BF:["H","hB"],BJ:["H","hB"],BL:["H","hB"],BR:["H","hB"],CG:["H","hB"],CI:["H","hB"],CV:["H","hB"],DE:["H","hB"],EE:["H","hB"],FR:["H","hB"],GA:["H","hB"],GF:["H","hB"],GN:["H","hB"],GP:["H","hB"],GW:["H","hB"],HR:["H","hB"],IL:["H","hB"],IT:["H","hB"],KZ:["H","hB"],MC:["H","hB"],MD:["H","hB"],MF:["H","hB"],MQ:["H","hB"],MZ:["H","hB"],NC:["H","hB"],NL:["H","hB"],PM:["H","hB"],PT:["H","hB"],RE:["H","hB"],RO:["H","hB"],SI:["H","hB"],SR:["H","hB"],ST:["H","hB"],TG:["H","hB"],TR:["H","hB"],WF:["H","hB"],YT:["H","hB"],BD:["h","hB","H"],PK:["h","hB","H"],AZ:["H","hB","h"],BA:["H","hB","h"],BG:["H","hB","h"],CH:["H","hB","h"],GE:["H","hB","h"],LI:["H","hB","h"],ME:["H","hB","h"],RS:["H","hB","h"],UA:["H","hB","h"],UZ:["H","hB","h"],XK:["H","hB","h"],AG:["h","hb","H","hB"],AU:["h","hb","H","hB"],BB:["h","hb","H","hB"],BM:["h","hb","H","hB"],BS:["h","hb","H","hB"],CA:["h","hb","H","hB"],DM:["h","hb","H","hB"],"en-001":["h","hb","H","hB"],FJ:["h","hb","H","hB"],FM:["h","hb","H","hB"],GD:["h","hb","H","hB"],GM:["h","hb","H","hB"],GU:["h","hb","H","hB"],GY:["h","hb","H","hB"],JM:["h","hb","H","hB"],KI:["h","hb","H","hB"],KN:["h","hb","H","hB"],KY:["h","hb","H","hB"],LC:["h","hb","H","hB"],LR:["h","hb","H","hB"],MH:["h","hb","H","hB"],MP:["h","hb","H","hB"],MW:["h","hb","H","hB"],NZ:["h","hb","H","hB"],SB:["h","hb","H","hB"],SG:["h","hb","H","hB"],SL:["h","hb","H","hB"],SS:["h","hb","H","hB"],SZ:["h","hb","H","hB"],TC:["h","hb","H","hB"],TT:["h","hb","H","hB"],UM:["h","hb","H","hB"],US:["h","hb","H","hB"],VC:["h","hb","H","hB"],VG:["h","hb","H","hB"],VI:["h","hb","H","hB"],ZM:["h","hb","H","hB"],BO:["H","hB","h","hb"],EC:["H","hB","h","hb"],ES:["H","hB","h","hb"],GQ:["H","hB","h","hb"],PE:["H","hB","h","hb"],AE:["h","hB","hb","H"],"ar-001":["h","hB","hb","H"],BH:["h","hB","hb","H"],DZ:["h","hB","hb","H"],EG:["h","hB","hb","H"],EH:["h","hB","hb","H"],HK:["h","hB","hb","H"],IQ:["h","hB","hb","H"],JO:["h","hB","hb","H"],KW:["h","hB","hb","H"],LB:["h","hB","hb","H"],LY:["h","hB","hb","H"],MO:["h","hB","hb","H"],MR:["h","hB","hb","H"],OM:["h","hB","hb","H"],PH:["h","hB","hb","H"],PS:["h","hB","hb","H"],QA:["h","hB","hb","H"],SA:["h","hB","hb","H"],SD:["h","hB","hb","H"],SY:["h","hB","hb","H"],TN:["h","hB","hb","H"],YE:["h","hB","hb","H"],AF:["H","hb","hB","h"],LA:["H","hb","hB","h"],CN:["H","hB","hb","h"],LV:["H","hB","hb","h"],TL:["H","hB","hb","h"],"zu-ZA":["H","hB","hb","h"],CD:["hB","H"],IR:["hB","H"],"hi-IN":["hB","h","H"],"kn-IN":["hB","h","H"],"ml-IN":["hB","h","H"],"te-IN":["hB","h","H"],KH:["hB","h","H","hb"],"ta-IN":["hB","h","hb","H"],BN:["hb","hB","h","H"],MY:["hb","hB","h","H"],ET:["hB","hb","h","H"],"gu-IN":["hB","hb","h","H"],"mr-IN":["hB","hb","h","H"],"pa-IN":["hB","hb","h","H"],TW:["hB","hb","h","H"],KE:["hB","hb","H","h"],MM:["hB","hb","H","h"],TZ:["hB","hb","H","h"],UG:["hB","hb","H","h"]};function N(e){var t=e.hourCycle;if(void 0===t&&e.hourCycles&&e.hourCycles.length&&(t=e.hourCycles[0]),t)switch(t){case"h24":return"k";case"h23":return"H";case"h12":return"h";case"h11":return"K";default:throw new Error("Invalid hourCycle")}var i,n=e.language;return"root"!==n&&(i=e.maximize().region),(P[i||""]||P[n||""]||P["".concat(n,"-001")]||P["001"])[0]}var O=new RegExp("^".concat(y.source,"*")),_=new RegExp("".concat(y.source,"*$"));function F(e,t){return{start:e,end:t}}var G=!!String.prototype.startsWith,V=!!String.fromCodePoint,B=!!Object.fromEntries,H=!!String.prototype.codePointAt,z=!!String.prototype.trimStart,U=!!String.prototype.trimEnd,W=Number.isSafeInteger?Number.isSafeInteger:function(e){return"number"==typeof e&&isFinite(e)&&Math.floor(e)===e&&Math.abs(e)<=9007199254740991},j=!0;try{j="a"===(null===(k=J("([^\\p{White_Space}\\p{Pattern_Syntax}]*)","yu").exec("a"))||void 0===k?void 0:k[0])}catch(e){j=!1}var K,$=G?function(e,t,i){return e.startsWith(t,i)}:function(e,t,i){return e.slice(i,i+t.length)===t},Y=V?String.fromCodePoint:function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];for(var i,n="",s=e.length,r=0;s>r;){if((i=e[r++])>1114111)throw RangeError(i+" is not a valid code point");n+=i<65536?String.fromCharCode(i):String.fromCharCode(55296+((i-=65536)>>10),i%1024+56320)}return n},q=B?Object.fromEntries:function(e){for(var t={},i=0,n=e;i<n.length;i++){var s=n[i],r=s[0],o=s[1];t[r]=o}return t},X=H?function(e,t){return e.codePointAt(t)}:function(e,t){var i=e.length;if(!(t<0||t>=i)){var n,s=e.charCodeAt(t);return s<55296||s>56319||t+1===i||(n=e.charCodeAt(t+1))<56320||n>57343?s:n-56320+(s-55296<<10)+65536}},Z=z?function(e){return e.trimStart()}:function(e){return e.replace(O,"")},Q=U?function(e){return e.trimEnd()}:function(e){return e.replace(_,"")};function J(e,t){return new RegExp(e,t)}if(j){var ee=J("([^\\p{White_Space}\\p{Pattern_Syntax}]*)","yu");K=function(e,t){var i;return ee.lastIndex=t,null!==(i=ee.exec(e)[1])&&void 0!==i?i:""}}else K=function(e,t){for(var i=[];;){var n=X(e,t);if(void 0===n||se(n)||re(n))break;i.push(n),t+=n>=65536?2:1}return Y.apply(void 0,i)};var te=function(){function e(e,t){void 0===t&&(t={}),this.message=e,this.position={offset:0,line:1,column:1},this.ignoreTag=!!t.ignoreTag,this.locale=t.locale,this.requiresOtherClause=!!t.requiresOtherClause,this.shouldParseSkeletons=!!t.shouldParseSkeletons}return e.prototype.parse=function(){if(0!==this.offset())throw Error("parser can only be used once");return this.parseMessage(0,"",!1)},e.prototype.parseMessage=function(e,t,i){for(var r=[];!this.isEOF();){var o=this.char();if(123===o){if((a=this.parseArgument(e,i)).err)return a;r.push(a.val)}else{if(125===o&&e>0)break;if(35!==o||"plural"!==t&&"selectordinal"!==t){if(60===o&&!this.ignoreTag&&47===this.peek()){if(i)break;return this.error(n.UNMATCHED_CLOSING_TAG,F(this.clonePosition(),this.clonePosition()))}if(60===o&&!this.ignoreTag&&ie(this.peek()||0)){if((a=this.parseTag(e,t)).err)return a;r.push(a.val)}else{var a;if((a=this.parseLiteral(e,t)).err)return a;r.push(a.val)}}else{var l=this.clonePosition();this.bump(),r.push({type:s.pound,location:F(l,this.clonePosition())})}}}return{val:r,err:null}},e.prototype.parseTag=function(e,t){var i=this.clonePosition();this.bump();var r=this.parseTagName();if(this.bumpSpace(),this.bumpIf("/>"))return{val:{type:s.literal,value:"<".concat(r,"/>"),location:F(i,this.clonePosition())},err:null};if(this.bumpIf(">")){var o=this.parseMessage(e+1,t,!0);if(o.err)return o;var a=o.val,l=this.clonePosition();if(this.bumpIf("</")){if(this.isEOF()||!ie(this.char()))return this.error(n.INVALID_TAG,F(l,this.clonePosition()));var c=this.clonePosition();return r!==this.parseTagName()?this.error(n.UNMATCHED_CLOSING_TAG,F(c,this.clonePosition())):(this.bumpSpace(),this.bumpIf(">")?{val:{type:s.tag,value:r,children:a,location:F(i,this.clonePosition())},err:null}:this.error(n.INVALID_TAG,F(l,this.clonePosition())))}return this.error(n.UNCLOSED_TAG,F(i,this.clonePosition()))}return this.error(n.INVALID_TAG,F(i,this.clonePosition()))},e.prototype.parseTagName=function(){var e=this.offset();for(this.bump();!this.isEOF()&&ne(this.char());)this.bump();return this.message.slice(e,this.offset())},e.prototype.parseLiteral=function(e,t){for(var i=this.clonePosition(),n="";;){var r=this.tryParseQuote(t);if(r)n+=r;else{var o=this.tryParseUnquoted(e,t);if(o)n+=o;else{var a=this.tryParseLeftAngleBracket();if(!a)break;n+=a}}}var l=F(i,this.clonePosition());return{val:{type:s.literal,value:n,location:l},err:null}},e.prototype.tryParseLeftAngleBracket=function(){return this.isEOF()||60!==this.char()||!this.ignoreTag&&(ie(e=this.peek()||0)||47===e)?null:(this.bump(),"<");var e},e.prototype.tryParseQuote=function(e){if(this.isEOF()||39!==this.char())return null;switch(this.peek()){case 39:return this.bump(),this.bump(),"'";case 123:case 60:case 62:case 125:break;case 35:if("plural"===e||"selectordinal"===e)break;return null;default:return null}this.bump();var t=[this.char()];for(this.bump();!this.isEOF();){var i=this.char();if(39===i){if(39!==this.peek()){this.bump();break}t.push(39),this.bump()}else t.push(i);this.bump()}return Y.apply(void 0,t)},e.prototype.tryParseUnquoted=function(e,t){if(this.isEOF())return null;var i=this.char();return 60===i||123===i||35===i&&("plural"===t||"selectordinal"===t)||125===i&&e>0?null:(this.bump(),Y(i))},e.prototype.parseArgument=function(e,t){var i=this.clonePosition();if(this.bump(),this.bumpSpace(),this.isEOF())return this.error(n.EXPECT_ARGUMENT_CLOSING_BRACE,F(i,this.clonePosition()));if(125===this.char())return this.bump(),this.error(n.EMPTY_ARGUMENT,F(i,this.clonePosition()));var r=this.parseIdentifierIfPossible().value;if(!r)return this.error(n.MALFORMED_ARGUMENT,F(i,this.clonePosition()));if(this.bumpSpace(),this.isEOF())return this.error(n.EXPECT_ARGUMENT_CLOSING_BRACE,F(i,this.clonePosition()));switch(this.char()){case 125:return this.bump(),{val:{type:s.argument,value:r,location:F(i,this.clonePosition())},err:null};case 44:return this.bump(),this.bumpSpace(),this.isEOF()?this.error(n.EXPECT_ARGUMENT_CLOSING_BRACE,F(i,this.clonePosition())):this.parseArgumentOptions(e,t,r,i);default:return this.error(n.MALFORMED_ARGUMENT,F(i,this.clonePosition()))}},e.prototype.parseIdentifierIfPossible=function(){var e=this.clonePosition(),t=this.offset(),i=K(this.message,t),n=t+i.length;return this.bumpTo(n),{value:i,location:F(e,this.clonePosition())}},e.prototype.parseArgumentOptions=function(e,t,i,a){var l,c=this.clonePosition(),h=this.parseIdentifierIfPossible().value,d=this.clonePosition();switch(h){case"":return this.error(n.EXPECT_ARGUMENT_TYPE,F(c,d));case"number":case"date":case"time":this.bumpSpace();var u=null;if(this.bumpIf(",")){this.bumpSpace();var p=this.clonePosition();if((w=this.parseSimpleArgStyleIfPossible()).err)return w;if(0===(v=Q(w.val)).length)return this.error(n.EXPECT_ARGUMENT_STYLE,F(this.clonePosition(),this.clonePosition()));u={style:v,styleLocation:F(p,this.clonePosition())}}if((x=this.tryParseArgumentClose(a)).err)return x;var g=F(a,this.clonePosition());if(u&&$(null==u?void 0:u.style,"::",0)){var f=Z(u.style.slice(2));if("number"===h)return(w=this.parseNumberSkeletonFromString(f,u.styleLocation)).err?w:{val:{type:s.number,value:i,location:g,style:w.val},err:null};if(0===f.length)return this.error(n.EXPECT_DATE_TIME_SKELETON,g);var m=f;this.locale&&(m=function(e,t){for(var i="",n=0;n<e.length;n++){var s=e.charAt(n);if("j"===s){for(var r=0;n+1<e.length&&e.charAt(n+1)===s;)r++,n++;var o=1+(1&r),a=r<2?1:3+(r>>1),l=N(t);for("H"!=l&&"k"!=l||(a=0);a-- >0;)i+="a";for(;o-- >0;)i=l+i}else i+="J"===s?"H":s}return i}(f,this.locale));var v={type:r.dateTime,pattern:m,location:u.styleLocation,parsedOptions:this.shouldParseSkeletons?b(m):{}};return{val:{type:"date"===h?s.date:s.time,value:i,location:g,style:v},err:null}}return{val:{type:"number"===h?s.number:"date"===h?s.date:s.time,value:i,location:g,style:null!==(l=null==u?void 0:u.style)&&void 0!==l?l:null},err:null};case"plural":case"selectordinal":case"select":var y=this.clonePosition();if(this.bumpSpace(),!this.bumpIf(","))return this.error(n.EXPECT_SELECT_ARGUMENT_OPTIONS,F(y,(0,o.__assign)({},y)));this.bumpSpace();var C=this.parseIdentifierIfPossible(),S=0;if("select"!==h&&"offset"===C.value){if(!this.bumpIf(":"))return this.error(n.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE,F(this.clonePosition(),this.clonePosition()));var w;if(this.bumpSpace(),(w=this.tryParseDecimalInteger(n.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE,n.INVALID_PLURAL_ARGUMENT_OFFSET_VALUE)).err)return w;this.bumpSpace(),C=this.parseIdentifierIfPossible(),S=w.val}var x,E=this.tryParsePluralOrSelectOptions(e,h,t,C);if(E.err)return E;if((x=this.tryParseArgumentClose(a)).err)return x;var M=F(a,this.clonePosition());return"select"===h?{val:{type:s.select,value:i,options:q(E.val),location:M},err:null}:{val:{type:s.plural,value:i,options:q(E.val),offset:S,pluralType:"plural"===h?"cardinal":"ordinal",location:M},err:null};default:return this.error(n.INVALID_ARGUMENT_TYPE,F(c,d))}},e.prototype.tryParseArgumentClose=function(e){return this.isEOF()||125!==this.char()?this.error(n.EXPECT_ARGUMENT_CLOSING_BRACE,F(e,this.clonePosition())):(this.bump(),{val:!0,err:null})},e.prototype.parseSimpleArgStyleIfPossible=function(){for(var e=0,t=this.clonePosition();!this.isEOF();)switch(this.char()){case 39:this.bump();var i=this.clonePosition();if(!this.bumpUntil("'"))return this.error(n.UNCLOSED_QUOTE_IN_ARGUMENT_STYLE,F(i,this.clonePosition()));this.bump();break;case 123:e+=1,this.bump();break;case 125:if(!(e>0))return{val:this.message.slice(t.offset,this.offset()),err:null};e-=1;break;default:this.bump()}return{val:this.message.slice(t.offset,this.offset()),err:null}},e.prototype.parseNumberSkeletonFromString=function(e,t){var i=[];try{i=function(e){if(0===e.length)throw new Error("Number skeleton cannot be empty");for(var t=[],i=0,n=e.split(S).filter(function(e){return e.length>0});i<n.length;i++){var s=n[i].split("/");if(0===s.length)throw new Error("Invalid number skeleton");for(var r=s[0],o=s.slice(1),a=0,l=o;a<l.length;a++)if(0===l[a].length)throw new Error("Invalid number skeleton");t.push({stem:r,options:o})}return t}(e)}catch(e){return this.error(n.INVALID_NUMBER_SKELETON,t)}return{val:{type:r.number,tokens:i,location:t,parsedOptions:this.shouldParseSkeletons?L(i):{}},err:null}},e.prototype.tryParsePluralOrSelectOptions=function(e,t,i,s){for(var r,o=!1,a=[],l=new Set,c=s.value,h=s.location;;){if(0===c.length){var d=this.clonePosition();if("select"===t||!this.bumpIf("="))break;var u=this.tryParseDecimalInteger(n.EXPECT_PLURAL_ARGUMENT_SELECTOR,n.INVALID_PLURAL_ARGUMENT_SELECTOR);if(u.err)return u;h=F(d,this.clonePosition()),c=this.message.slice(d.offset,this.offset())}if(l.has(c))return this.error("select"===t?n.DUPLICATE_SELECT_ARGUMENT_SELECTOR:n.DUPLICATE_PLURAL_ARGUMENT_SELECTOR,h);"other"===c&&(o=!0),this.bumpSpace();var p=this.clonePosition();if(!this.bumpIf("{"))return this.error("select"===t?n.EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT:n.EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT,F(this.clonePosition(),this.clonePosition()));var g=this.parseMessage(e+1,t,i);if(g.err)return g;var f=this.tryParseArgumentClose(p);if(f.err)return f;a.push([c,{value:g.val,location:F(p,this.clonePosition())}]),l.add(c),this.bumpSpace(),c=(r=this.parseIdentifierIfPossible()).value,h=r.location}return 0===a.length?this.error("select"===t?n.EXPECT_SELECT_ARGUMENT_SELECTOR:n.EXPECT_PLURAL_ARGUMENT_SELECTOR,F(this.clonePosition(),this.clonePosition())):this.requiresOtherClause&&!o?this.error(n.MISSING_OTHER_CLAUSE,F(this.clonePosition(),this.clonePosition())):{val:a,err:null}},e.prototype.tryParseDecimalInteger=function(e,t){var i=1,n=this.clonePosition();this.bumpIf("+")||this.bumpIf("-")&&(i=-1);for(var s=!1,r=0;!this.isEOF();){var o=this.char();if(!(o>=48&&o<=57))break;s=!0,r=10*r+(o-48),this.bump()}var a=F(n,this.clonePosition());return s?W(r*=i)?{val:r,err:null}:this.error(t,a):this.error(e,a)},e.prototype.offset=function(){return this.position.offset},e.prototype.isEOF=function(){return this.offset()===this.message.length},e.prototype.clonePosition=function(){return{offset:this.position.offset,line:this.position.line,column:this.position.column}},e.prototype.char=function(){var e=this.position.offset;if(e>=this.message.length)throw Error("out of bound");var t=X(this.message,e);if(void 0===t)throw Error("Offset ".concat(e," is at invalid UTF-16 code unit boundary"));return t},e.prototype.error=function(e,t){return{val:null,err:{kind:e,message:this.message,location:t}}},e.prototype.bump=function(){if(!this.isEOF()){var e=this.char();10===e?(this.position.line+=1,this.position.column=1,this.position.offset+=1):(this.position.column+=1,this.position.offset+=e<65536?1:2)}},e.prototype.bumpIf=function(e){if($(this.message,e,this.offset())){for(var t=0;t<e.length;t++)this.bump();return!0}return!1},e.prototype.bumpUntil=function(e){var t=this.offset(),i=this.message.indexOf(e,t);return i>=0?(this.bumpTo(i),!0):(this.bumpTo(this.message.length),!1)},e.prototype.bumpTo=function(e){if(this.offset()>e)throw Error("targetOffset ".concat(e," must be greater than or equal to the current offset ").concat(this.offset()));for(e=Math.min(e,this.message.length);;){var t=this.offset();if(t===e)break;if(t>e)throw Error("targetOffset ".concat(e," is at invalid UTF-16 code unit boundary"));if(this.bump(),this.isEOF())break}},e.prototype.bumpSpace=function(){for(;!this.isEOF()&&se(this.char());)this.bump()},e.prototype.peek=function(){if(this.isEOF())return null;var e=this.char(),t=this.offset(),i=this.message.charCodeAt(t+(e>=65536?2:1));return null!=i?i:null},e}();function ie(e){return e>=97&&e<=122||e>=65&&e<=90}function ne(e){return 45===e||46===e||e>=48&&e<=57||95===e||e>=97&&e<=122||e>=65&&e<=90||183==e||e>=192&&e<=214||e>=216&&e<=246||e>=248&&e<=893||e>=895&&e<=8191||e>=8204&&e<=8205||e>=8255&&e<=8256||e>=8304&&e<=8591||e>=11264&&e<=12271||e>=12289&&e<=55295||e>=63744&&e<=64975||e>=65008&&e<=65533||e>=65536&&e<=983039}function se(e){return e>=9&&e<=13||32===e||133===e||e>=8206&&e<=8207||8232===e||8233===e}function re(e){return e>=33&&e<=35||36===e||e>=37&&e<=39||40===e||41===e||42===e||43===e||44===e||45===e||e>=46&&e<=47||e>=58&&e<=59||e>=60&&e<=62||e>=63&&e<=64||91===e||92===e||93===e||94===e||96===e||123===e||124===e||125===e||126===e||161===e||e>=162&&e<=165||166===e||167===e||169===e||171===e||172===e||174===e||176===e||177===e||182===e||187===e||191===e||215===e||247===e||e>=8208&&e<=8213||e>=8214&&e<=8215||8216===e||8217===e||8218===e||e>=8219&&e<=8220||8221===e||8222===e||8223===e||e>=8224&&e<=8231||e>=8240&&e<=8248||8249===e||8250===e||e>=8251&&e<=8254||e>=8257&&e<=8259||8260===e||8261===e||8262===e||e>=8263&&e<=8273||8274===e||8275===e||e>=8277&&e<=8286||e>=8592&&e<=8596||e>=8597&&e<=8601||e>=8602&&e<=8603||e>=8604&&e<=8607||8608===e||e>=8609&&e<=8610||8611===e||e>=8612&&e<=8613||8614===e||e>=8615&&e<=8621||8622===e||e>=8623&&e<=8653||e>=8654&&e<=8655||e>=8656&&e<=8657||8658===e||8659===e||8660===e||e>=8661&&e<=8691||e>=8692&&e<=8959||e>=8960&&e<=8967||8968===e||8969===e||8970===e||8971===e||e>=8972&&e<=8991||e>=8992&&e<=8993||e>=8994&&e<=9e3||9001===e||9002===e||e>=9003&&e<=9083||9084===e||e>=9085&&e<=9114||e>=9115&&e<=9139||e>=9140&&e<=9179||e>=9180&&e<=9185||e>=9186&&e<=9254||e>=9255&&e<=9279||e>=9280&&e<=9290||e>=9291&&e<=9311||e>=9472&&e<=9654||9655===e||e>=9656&&e<=9664||9665===e||e>=9666&&e<=9719||e>=9720&&e<=9727||e>=9728&&e<=9838||9839===e||e>=9840&&e<=10087||10088===e||10089===e||10090===e||10091===e||10092===e||10093===e||10094===e||10095===e||10096===e||10097===e||10098===e||10099===e||10100===e||10101===e||e>=10132&&e<=10175||e>=10176&&e<=10180||10181===e||10182===e||e>=10183&&e<=10213||10214===e||10215===e||10216===e||10217===e||10218===e||10219===e||10220===e||10221===e||10222===e||10223===e||e>=10224&&e<=10239||e>=10240&&e<=10495||e>=10496&&e<=10626||10627===e||10628===e||10629===e||10630===e||10631===e||10632===e||10633===e||10634===e||10635===e||10636===e||10637===e||10638===e||10639===e||10640===e||10641===e||10642===e||10643===e||10644===e||10645===e||10646===e||10647===e||10648===e||e>=10649&&e<=10711||10712===e||10713===e||10714===e||10715===e||e>=10716&&e<=10747||10748===e||10749===e||e>=10750&&e<=11007||e>=11008&&e<=11055||e>=11056&&e<=11076||e>=11077&&e<=11078||e>=11079&&e<=11084||e>=11085&&e<=11123||e>=11124&&e<=11125||e>=11126&&e<=11157||11158===e||e>=11159&&e<=11263||e>=11776&&e<=11777||11778===e||11779===e||11780===e||11781===e||e>=11782&&e<=11784||11785===e||11786===e||11787===e||11788===e||11789===e||e>=11790&&e<=11798||11799===e||e>=11800&&e<=11801||11802===e||11803===e||11804===e||11805===e||e>=11806&&e<=11807||11808===e||11809===e||11810===e||11811===e||11812===e||11813===e||11814===e||11815===e||11816===e||11817===e||e>=11818&&e<=11822||11823===e||e>=11824&&e<=11833||e>=11834&&e<=11835||e>=11836&&e<=11839||11840===e||11841===e||11842===e||e>=11843&&e<=11855||e>=11856&&e<=11857||11858===e||e>=11859&&e<=11903||e>=12289&&e<=12291||12296===e||12297===e||12298===e||12299===e||12300===e||12301===e||12302===e||12303===e||12304===e||12305===e||e>=12306&&e<=12307||12308===e||12309===e||12310===e||12311===e||12312===e||12313===e||12314===e||12315===e||12316===e||12317===e||e>=12318&&e<=12319||12320===e||12336===e||64830===e||64831===e||e>=65093&&e<=65094}function oe(e){e.forEach(function(e){if(delete e.location,u(e)||p(e))for(var t in e.options)delete e.options[t].location,oe(e.options[t].value);else c(e)&&m(e.style)||(h(e)||d(e))&&v(e.style)?delete e.style.location:f(e)&&oe(e.children)})}function ae(e,t){void 0===t&&(t={}),t=(0,o.__assign)({shouldParseSkeletons:!0,requiresOtherClause:!0},t);var i=new te(e,t).parse();if(i.err){var s=SyntaxError(n[i.err.kind]);throw s.location=i.err.location,s.originalMessage=i.err.message,s}return(null==t?void 0:t.captureLocation)||oe(i.val),i.val}},78582(e,t,i){"use strict";i.d(t,{Im:()=>l,tv:()=>h,Tu:()=>v,eW:()=>a,oF:()=>c,N1:()=>m,N6:()=>p,jA:()=>g,Jp:()=>u,xm:()=>f,Qh:()=>d,qg:()=>ae});var n,s,r,o=i(65959);function a(e){return e.type===s.literal}function l(e){return e.type===s.argument}function c(e){return e.type===s.number}function h(e){return e.type===s.date}function d(e){return e.type===s.time}function u(e){return e.type===s.select}function p(e){return e.type===s.plural}function g(e){return e.type===s.pound}function f(e){return e.type===s.tag}function m(e){return!(!e||"object"!=typeof e||e.type!==r.number)}function v(e){return!(!e||"object"!=typeof e||e.type!==r.dateTime)}!function(e){e[e.EXPECT_ARGUMENT_CLOSING_BRACE=1]="EXPECT_ARGUMENT_CLOSING_BRACE",e[e.EMPTY_ARGUMENT=2]="EMPTY_ARGUMENT",e[e.MALFORMED_ARGUMENT=3]="MALFORMED_ARGUMENT",e[e.EXPECT_ARGUMENT_TYPE=4]="EXPECT_ARGUMENT_TYPE",e[e.INVALID_ARGUMENT_TYPE=5]="INVALID_ARGUMENT_TYPE",e[e.EXPECT_ARGUMENT_STYLE=6]="EXPECT_ARGUMENT_STYLE",e[e.INVALID_NUMBER_SKELETON=7]="INVALID_NUMBER_SKELETON",e[e.INVALID_DATE_TIME_SKELETON=8]="INVALID_DATE_TIME_SKELETON",e[e.EXPECT_NUMBER_SKELETON=9]="EXPECT_NUMBER_SKELETON",e[e.EXPECT_DATE_TIME_SKELETON=10]="EXPECT_DATE_TIME_SKELETON",e[e.UNCLOSED_QUOTE_IN_ARGUMENT_STYLE=11]="UNCLOSED_QUOTE_IN_ARGUMENT_STYLE",e[e.EXPECT_SELECT_ARGUMENT_OPTIONS=12]="EXPECT_SELECT_ARGUMENT_OPTIONS",e[e.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE=13]="EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE",e[e.INVALID_PLURAL_ARGUMENT_OFFSET_VALUE=14]="INVALID_PLURAL_ARGUMENT_OFFSET_VALUE",e[e.EXPECT_SELECT_ARGUMENT_SELECTOR=15]="EXPECT_SELECT_ARGUMENT_SELECTOR",e[e.EXPECT_PLURAL_ARGUMENT_SELECTOR=16]="EXPECT_PLURAL_ARGUMENT_SELECTOR",e[e.EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT=17]="EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT",e[e.EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT=18]="EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT",e[e.INVALID_PLURAL_ARGUMENT_SELECTOR=19]="INVALID_PLURAL_ARGUMENT_SELECTOR",e[e.DUPLICATE_PLURAL_ARGUMENT_SELECTOR=20]="DUPLICATE_PLURAL_ARGUMENT_SELECTOR",e[e.DUPLICATE_SELECT_ARGUMENT_SELECTOR=21]="DUPLICATE_SELECT_ARGUMENT_SELECTOR",e[e.MISSING_OTHER_CLAUSE=22]="MISSING_OTHER_CLAUSE",e[e.INVALID_TAG=23]="INVALID_TAG",e[e.INVALID_TAG_NAME=25]="INVALID_TAG_NAME",e[e.UNMATCHED_CLOSING_TAG=26]="UNMATCHED_CLOSING_TAG",e[e.UNCLOSED_TAG=27]="UNCLOSED_TAG"}(n||(n={})),function(e){e[e.literal=0]="literal",e[e.argument=1]="argument",e[e.number=2]="number",e[e.date=3]="date",e[e.time=4]="time",e[e.select=5]="select",e[e.plural=6]="plural",e[e.pound=7]="pound",e[e.tag=8]="tag"}(s||(s={})),function(e){e[e.number=0]="number",e[e.dateTime=1]="dateTime"}(r||(r={}));var y=/[ \xA0\u1680\u2000-\u200A\u202F\u205F\u3000]/,C=/(?:[Eec]{1,6}|G{1,5}|[Qq]{1,5}|(?:[yYur]+|U{1,5})|[ML]{1,5}|d{1,2}|D{1,3}|F{1}|[abB]{1,5}|[hkHK]{1,2}|w{1,2}|W{1}|m{1,2}|s{1,2}|[zZOvVxX]{1,4})(?=([^']*'[^']*')*[^']*$)/g;function b(e){var t={};return e.replace(C,function(e){var i=e.length;switch(e[0]){case"G":t.era=4===i?"long":5===i?"narrow":"short";break;case"y":t.year=2===i?"2-digit":"numeric";break;case"Y":case"u":case"U":case"r":throw new RangeError("`Y/u/U/r` (year) patterns are not supported, use `y` instead");case"q":case"Q":throw new RangeError("`q/Q` (quarter) patterns are not supported");case"M":case"L":t.month=["numeric","2-digit","short","long","narrow"][i-1];break;case"w":case"W":throw new RangeError("`w/W` (week) patterns are not supported");case"d":t.day=["numeric","2-digit"][i-1];break;case"D":case"F":case"g":throw new RangeError("`D/F/g` (day) patterns are not supported, use `d` instead");case"E":t.weekday=4===i?"long":5===i?"narrow":"short";break;case"e":if(i<4)throw new RangeError("`e..eee` (weekday) patterns are not supported");t.weekday=["short","long","narrow","short"][i-4];break;case"c":if(i<4)throw new RangeError("`c..ccc` (weekday) patterns are not supported");t.weekday=["short","long","narrow","short"][i-4];break;case"a":t.hour12=!0;break;case"b":case"B":throw new RangeError("`b/B` (period) patterns are not supported, use `a` instead");case"h":t.hourCycle="h12",t.hour=["numeric","2-digit"][i-1];break;case"H":t.hourCycle="h23",t.hour=["numeric","2-digit"][i-1];break;case"K":t.hourCycle="h11",t.hour=["numeric","2-digit"][i-1];break;case"k":t.hourCycle="h24",t.hour=["numeric","2-digit"][i-1];break;case"j":case"J":case"C":throw new RangeError("`j/J/C` (hour) patterns are not supported, use `h/H/K/k` instead");case"m":t.minute=["numeric","2-digit"][i-1];break;case"s":t.second=["numeric","2-digit"][i-1];break;case"S":case"A":throw new RangeError("`S/A` (second) patterns are not supported, use `s` instead");case"z":t.timeZoneName=i<4?"short":"long";break;case"Z":case"O":case"v":case"V":case"X":case"x":throw new RangeError("`Z/O/v/V/X/x` (timeZone) patterns are not supported, use `z` instead")}return""}),t}var S=/[\t-\r \x85\u200E\u200F\u2028\u2029]/i;function w(e){return e.replace(/^(.*?)-/,"")}var x=/^\.(?:(0+)(\*)?|(#+)|(0+)(#+))$/g,E=/^(@+)?(\+|#+)?[rs]?$/g,M=/(\*)(0+)|(#+)(0+)|(0+)/g,A=/^(0+)$/;function T(e){var t={};return"r"===e[e.length-1]?t.roundingPriority="morePrecision":"s"===e[e.length-1]&&(t.roundingPriority="lessPrecision"),e.replace(E,function(e,i,n){return"string"!=typeof n?(t.minimumSignificantDigits=i.length,t.maximumSignificantDigits=i.length):"+"===n?t.minimumSignificantDigits=i.length:"#"===i[0]?t.maximumSignificantDigits=i.length:(t.minimumSignificantDigits=i.length,t.maximumSignificantDigits=i.length+("string"==typeof n?n.length:0)),""}),t}function D(e){switch(e){case"sign-auto":return{signDisplay:"auto"};case"sign-accounting":case"()":return{currencySign:"accounting"};case"sign-always":case"+!":return{signDisplay:"always"};case"sign-accounting-always":case"()!":return{signDisplay:"always",currencySign:"accounting"};case"sign-except-zero":case"+?":return{signDisplay:"exceptZero"};case"sign-accounting-except-zero":case"()?":return{signDisplay:"exceptZero",currencySign:"accounting"};case"sign-never":case"+_":return{signDisplay:"never"}}}function I(e){var t;if("E"===e[0]&&"E"===e[1]?(t={notation:"engineering"},e=e.slice(2)):"E"===e[0]&&(t={notation:"scientific"},e=e.slice(1)),t){var i=e.slice(0,2);if("+!"===i?(t.signDisplay="always",e=e.slice(2)):"+?"===i&&(t.signDisplay="exceptZero",e=e.slice(2)),!A.test(e))throw new Error("Malformed concise eng/scientific notation");t.minimumIntegerDigits=e.length}return t}function R(e){return D(e)||{}}function L(e){for(var t={},i=0,n=e;i<n.length;i++){var s=n[i];switch(s.stem){case"percent":case"%":t.style="percent";continue;case"%x100":t.style="percent",t.scale=100;continue;case"currency":t.style="currency",t.currency=s.options[0];continue;case"group-off":case",_":t.useGrouping=!1;continue;case"precision-integer":case".":t.maximumFractionDigits=0;continue;case"measure-unit":case"unit":t.style="unit",t.unit=w(s.options[0]);continue;case"compact-short":case"K":t.notation="compact",t.compactDisplay="short";continue;case"compact-long":case"KK":t.notation="compact",t.compactDisplay="long";continue;case"scientific":t=(0,o.__assign)((0,o.__assign)((0,o.__assign)({},t),{notation:"scientific"}),s.options.reduce(function(e,t){return(0,o.__assign)((0,o.__assign)({},e),R(t))},{}));continue;case"engineering":t=(0,o.__assign)((0,o.__assign)((0,o.__assign)({},t),{notation:"engineering"}),s.options.reduce(function(e,t){return(0,o.__assign)((0,o.__assign)({},e),R(t))},{}));continue;case"notation-simple":t.notation="standard";continue;case"unit-width-narrow":t.currencyDisplay="narrowSymbol",t.unitDisplay="narrow";continue;case"unit-width-short":t.currencyDisplay="code",t.unitDisplay="short";continue;case"unit-width-full-name":t.currencyDisplay="name",t.unitDisplay="long";continue;case"unit-width-iso-code":t.currencyDisplay="symbol";continue;case"scale":t.scale=parseFloat(s.options[0]);continue;case"rounding-mode-floor":t.roundingMode="floor";continue;case"rounding-mode-ceiling":t.roundingMode="ceil";continue;case"rounding-mode-down":t.roundingMode="trunc";continue;case"rounding-mode-up":t.roundingMode="expand";continue;case"rounding-mode-half-even":t.roundingMode="halfEven";continue;case"rounding-mode-half-down":t.roundingMode="halfTrunc";continue;case"rounding-mode-half-up":t.roundingMode="halfExpand";continue;case"integer-width":if(s.options.length>1)throw new RangeError("integer-width stems only accept a single optional option");s.options[0].replace(M,function(e,i,n,s,r,o){if(i)t.minimumIntegerDigits=n.length;else{if(s&&r)throw new Error("We currently do not support maximum integer digits");if(o)throw new Error("We currently do not support exact integer digits")}return""});continue}if(A.test(s.stem))t.minimumIntegerDigits=s.stem.length;else if(x.test(s.stem)){if(s.options.length>1)throw new RangeError("Fraction-precision stems only accept a single optional option");s.stem.replace(x,function(e,i,n,s,r,o){return"*"===n?t.minimumFractionDigits=i.length:s&&"#"===s[0]?t.maximumFractionDigits=s.length:r&&o?(t.minimumFractionDigits=r.length,t.maximumFractionDigits=r.length+o.length):(t.minimumFractionDigits=i.length,t.maximumFractionDigits=i.length),""});var r=s.options[0];"w"===r?t=(0,o.__assign)((0,o.__assign)({},t),{trailingZeroDisplay:"stripIfInteger"}):r&&(t=(0,o.__assign)((0,o.__assign)({},t),T(r)))}else if(E.test(s.stem))t=(0,o.__assign)((0,o.__assign)({},t),T(s.stem));else{var a=D(s.stem);a&&(t=(0,o.__assign)((0,o.__assign)({},t),a));var l=I(s.stem);l&&(t=(0,o.__assign)((0,o.__assign)({},t),l))}}return t}var k,P={"001":["H","h"],419:["h","H","hB","hb"],AC:["H","h","hb","hB"],AD:["H","hB"],AE:["h","hB","hb","H"],AF:["H","hb","hB","h"],AG:["h","hb","H","hB"],AI:["H","h","hb","hB"],AL:["h","H","hB"],AM:["H","hB"],AO:["H","hB"],AR:["h","H","hB","hb"],AS:["h","H"],AT:["H","hB"],AU:["h","hb","H","hB"],AW:["H","hB"],AX:["H"],AZ:["H","hB","h"],BA:["H","hB","h"],BB:["h","hb","H","hB"],BD:["h","hB","H"],BE:["H","hB"],BF:["H","hB"],BG:["H","hB","h"],BH:["h","hB","hb","H"],BI:["H","h"],BJ:["H","hB"],BL:["H","hB"],BM:["h","hb","H","hB"],BN:["hb","hB","h","H"],BO:["h","H","hB","hb"],BQ:["H"],BR:["H","hB"],BS:["h","hb","H","hB"],BT:["h","H"],BW:["H","h","hb","hB"],BY:["H","h"],BZ:["H","h","hb","hB"],CA:["h","hb","H","hB"],CC:["H","h","hb","hB"],CD:["hB","H"],CF:["H","h","hB"],CG:["H","hB"],CH:["H","hB","h"],CI:["H","hB"],CK:["H","h","hb","hB"],CL:["h","H","hB","hb"],CM:["H","h","hB"],CN:["H","hB","hb","h"],CO:["h","H","hB","hb"],CP:["H"],CR:["h","H","hB","hb"],CU:["h","H","hB","hb"],CV:["H","hB"],CW:["H","hB"],CX:["H","h","hb","hB"],CY:["h","H","hb","hB"],CZ:["H"],DE:["H","hB"],DG:["H","h","hb","hB"],DJ:["h","H"],DK:["H"],DM:["h","hb","H","hB"],DO:["h","H","hB","hb"],DZ:["h","hB","hb","H"],EA:["H","h","hB","hb"],EC:["h","H","hB","hb"],EE:["H","hB"],EG:["h","hB","hb","H"],EH:["h","hB","hb","H"],ER:["h","H"],ES:["H","hB","h","hb"],ET:["hB","hb","h","H"],FI:["H"],FJ:["h","hb","H","hB"],FK:["H","h","hb","hB"],FM:["h","hb","H","hB"],FO:["H","h"],FR:["H","hB"],GA:["H","hB"],GB:["H","h","hb","hB"],GD:["h","hb","H","hB"],GE:["H","hB","h"],GF:["H","hB"],GG:["H","h","hb","hB"],GH:["h","H"],GI:["H","h","hb","hB"],GL:["H","h"],GM:["h","hb","H","hB"],GN:["H","hB"],GP:["H","hB"],GQ:["H","hB","h","hb"],GR:["h","H","hb","hB"],GT:["h","H","hB","hb"],GU:["h","hb","H","hB"],GW:["H","hB"],GY:["h","hb","H","hB"],HK:["h","hB","hb","H"],HN:["h","H","hB","hb"],HR:["H","hB"],HU:["H","h"],IC:["H","h","hB","hb"],ID:["H"],IE:["H","h","hb","hB"],IL:["H","hB"],IM:["H","h","hb","hB"],IN:["h","H"],IO:["H","h","hb","hB"],IQ:["h","hB","hb","H"],IR:["hB","H"],IS:["H"],IT:["H","hB"],JE:["H","h","hb","hB"],JM:["h","hb","H","hB"],JO:["h","hB","hb","H"],JP:["H","K","h"],KE:["hB","hb","H","h"],KG:["H","h","hB","hb"],KH:["hB","h","H","hb"],KI:["h","hb","H","hB"],KM:["H","h","hB","hb"],KN:["h","hb","H","hB"],KP:["h","H","hB","hb"],KR:["h","H","hB","hb"],KW:["h","hB","hb","H"],KY:["h","hb","H","hB"],KZ:["H","hB"],LA:["H","hb","hB","h"],LB:["h","hB","hb","H"],LC:["h","hb","H","hB"],LI:["H","hB","h"],LK:["H","h","hB","hb"],LR:["h","hb","H","hB"],LS:["h","H"],LT:["H","h","hb","hB"],LU:["H","h","hB"],LV:["H","hB","hb","h"],LY:["h","hB","hb","H"],MA:["H","h","hB","hb"],MC:["H","hB"],MD:["H","hB"],ME:["H","hB","h"],MF:["H","hB"],MG:["H","h"],MH:["h","hb","H","hB"],MK:["H","h","hb","hB"],ML:["H"],MM:["hB","hb","H","h"],MN:["H","h","hb","hB"],MO:["h","hB","hb","H"],MP:["h","hb","H","hB"],MQ:["H","hB"],MR:["h","hB","hb","H"],MS:["H","h","hb","hB"],MT:["H","h"],MU:["H","h"],MV:["H","h"],MW:["h","hb","H","hB"],MX:["h","H","hB","hb"],MY:["hb","hB","h","H"],MZ:["H","hB"],NA:["h","H","hB","hb"],NC:["H","hB"],NE:["H"],NF:["H","h","hb","hB"],NG:["H","h","hb","hB"],NI:["h","H","hB","hb"],NL:["H","hB"],NO:["H","h"],NP:["H","h","hB"],NR:["H","h","hb","hB"],NU:["H","h","hb","hB"],NZ:["h","hb","H","hB"],OM:["h","hB","hb","H"],PA:["h","H","hB","hb"],PE:["h","H","hB","hb"],PF:["H","h","hB"],PG:["h","H"],PH:["h","hB","hb","H"],PK:["h","hB","H"],PL:["H","h"],PM:["H","hB"],PN:["H","h","hb","hB"],PR:["h","H","hB","hb"],PS:["h","hB","hb","H"],PT:["H","hB"],PW:["h","H"],PY:["h","H","hB","hb"],QA:["h","hB","hb","H"],RE:["H","hB"],RO:["H","hB"],RS:["H","hB","h"],RU:["H"],RW:["H","h"],SA:["h","hB","hb","H"],SB:["h","hb","H","hB"],SC:["H","h","hB"],SD:["h","hB","hb","H"],SE:["H"],SG:["h","hb","H","hB"],SH:["H","h","hb","hB"],SI:["H","hB"],SJ:["H"],SK:["H"],SL:["h","hb","H","hB"],SM:["H","h","hB"],SN:["H","h","hB"],SO:["h","H"],SR:["H","hB"],SS:["h","hb","H","hB"],ST:["H","hB"],SV:["h","H","hB","hb"],SX:["H","h","hb","hB"],SY:["h","hB","hb","H"],SZ:["h","hb","H","hB"],TA:["H","h","hb","hB"],TC:["h","hb","H","hB"],TD:["h","H","hB"],TF:["H","h","hB"],TG:["H","hB"],TH:["H","h"],TJ:["H","h"],TL:["H","hB","hb","h"],TM:["H","h"],TN:["h","hB","hb","H"],TO:["h","H"],TR:["H","hB"],TT:["h","hb","H","hB"],TW:["hB","hb","h","H"],TZ:["hB","hb","H","h"],UA:["H","hB","h"],UG:["hB","hb","H","h"],UM:["h","hb","H","hB"],US:["h","hb","H","hB"],UY:["h","H","hB","hb"],UZ:["H","hB","h"],VA:["H","h","hB"],VC:["h","hb","H","hB"],VE:["h","H","hB","hb"],VG:["h","hb","H","hB"],VI:["h","hb","H","hB"],VN:["H","h"],VU:["h","H"],WF:["H","hB"],WS:["h","H"],XK:["H","hB","h"],YE:["h","hB","hb","H"],YT:["H","hB"],ZA:["H","h","hb","hB"],ZM:["h","hb","H","hB"],ZW:["H","h"],"af-ZA":["H","h","hB","hb"],"ar-001":["h","hB","hb","H"],"ca-ES":["H","h","hB"],"en-001":["h","hb","H","hB"],"en-HK":["h","hb","H","hB"],"en-IL":["H","h","hb","hB"],"en-MY":["h","hb","H","hB"],"es-BR":["H","h","hB","hb"],"es-ES":["H","h","hB","hb"],"es-GQ":["H","h","hB","hb"],"fr-CA":["H","h","hB"],"gl-ES":["H","h","hB"],"gu-IN":["hB","hb","h","H"],"hi-IN":["hB","h","H"],"it-CH":["H","h","hB"],"it-IT":["H","h","hB"],"kn-IN":["hB","h","H"],"ml-IN":["hB","h","H"],"mr-IN":["hB","hb","h","H"],"pa-IN":["hB","hb","h","H"],"ta-IN":["hB","h","hb","H"],"te-IN":["hB","h","H"],"zu-ZA":["H","hB","hb","h"]};function N(e){var t=e.hourCycle;if(void 0===t&&e.hourCycles&&e.hourCycles.length&&(t=e.hourCycles[0]),t)switch(t){case"h24":return"k";case"h23":return"H";case"h12":return"h";case"h11":return"K";default:throw new Error("Invalid hourCycle")}var i,n=e.language;return"root"!==n&&(i=e.maximize().region),(P[i||""]||P[n||""]||P["".concat(n,"-001")]||P["001"])[0]}var O=new RegExp("^".concat(y.source,"*")),_=new RegExp("".concat(y.source,"*$"));function F(e,t){return{start:e,end:t}}var G=!!String.prototype.startsWith&&"_a".startsWith("a",1),V=!!String.fromCodePoint,B=!!Object.fromEntries,H=!!String.prototype.codePointAt,z=!!String.prototype.trimStart,U=!!String.prototype.trimEnd,W=Number.isSafeInteger?Number.isSafeInteger:function(e){return"number"==typeof e&&isFinite(e)&&Math.floor(e)===e&&Math.abs(e)<=9007199254740991},j=!0;try{j="a"===(null===(k=J("([^\\p{White_Space}\\p{Pattern_Syntax}]*)","yu").exec("a"))||void 0===k?void 0:k[0])}catch(e){j=!1}var K,$=G?function(e,t,i){return e.startsWith(t,i)}:function(e,t,i){return e.slice(i,i+t.length)===t},Y=V?String.fromCodePoint:function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];for(var i,n="",s=e.length,r=0;s>r;){if((i=e[r++])>1114111)throw RangeError(i+" is not a valid code point");n+=i<65536?String.fromCharCode(i):String.fromCharCode(55296+((i-=65536)>>10),i%1024+56320)}return n},q=B?Object.fromEntries:function(e){for(var t={},i=0,n=e;i<n.length;i++){var s=n[i],r=s[0],o=s[1];t[r]=o}return t},X=H?function(e,t){return e.codePointAt(t)}:function(e,t){var i=e.length;if(!(t<0||t>=i)){var n,s=e.charCodeAt(t);return s<55296||s>56319||t+1===i||(n=e.charCodeAt(t+1))<56320||n>57343?s:n-56320+(s-55296<<10)+65536}},Z=z?function(e){return e.trimStart()}:function(e){return e.replace(O,"")},Q=U?function(e){return e.trimEnd()}:function(e){return e.replace(_,"")};function J(e,t){return new RegExp(e,t)}if(j){var ee=J("([^\\p{White_Space}\\p{Pattern_Syntax}]*)","yu");K=function(e,t){var i;return ee.lastIndex=t,null!==(i=ee.exec(e)[1])&&void 0!==i?i:""}}else K=function(e,t){for(var i=[];;){var n=X(e,t);if(void 0===n||se(n)||re(n))break;i.push(n),t+=n>=65536?2:1}return Y.apply(void 0,i)};var te=function(){function e(e,t){void 0===t&&(t={}),this.message=e,this.position={offset:0,line:1,column:1},this.ignoreTag=!!t.ignoreTag,this.locale=t.locale,this.requiresOtherClause=!!t.requiresOtherClause,this.shouldParseSkeletons=!!t.shouldParseSkeletons}return e.prototype.parse=function(){if(0!==this.offset())throw Error("parser can only be used once");return this.parseMessage(0,"",!1)},e.prototype.parseMessage=function(e,t,i){for(var r=[];!this.isEOF();){var o=this.char();if(123===o){if((a=this.parseArgument(e,i)).err)return a;r.push(a.val)}else{if(125===o&&e>0)break;if(35!==o||"plural"!==t&&"selectordinal"!==t){if(60===o&&!this.ignoreTag&&47===this.peek()){if(i)break;return this.error(n.UNMATCHED_CLOSING_TAG,F(this.clonePosition(),this.clonePosition()))}if(60===o&&!this.ignoreTag&&ie(this.peek()||0)){if((a=this.parseTag(e,t)).err)return a;r.push(a.val)}else{var a;if((a=this.parseLiteral(e,t)).err)return a;r.push(a.val)}}else{var l=this.clonePosition();this.bump(),r.push({type:s.pound,location:F(l,this.clonePosition())})}}}return{val:r,err:null}},e.prototype.parseTag=function(e,t){var i=this.clonePosition();this.bump();var r=this.parseTagName();if(this.bumpSpace(),this.bumpIf("/>"))return{val:{type:s.literal,value:"<".concat(r,"/>"),location:F(i,this.clonePosition())},err:null};if(this.bumpIf(">")){var o=this.parseMessage(e+1,t,!0);if(o.err)return o;var a=o.val,l=this.clonePosition();if(this.bumpIf("</")){if(this.isEOF()||!ie(this.char()))return this.error(n.INVALID_TAG,F(l,this.clonePosition()));var c=this.clonePosition();return r!==this.parseTagName()?this.error(n.UNMATCHED_CLOSING_TAG,F(c,this.clonePosition())):(this.bumpSpace(),this.bumpIf(">")?{val:{type:s.tag,value:r,children:a,location:F(i,this.clonePosition())},err:null}:this.error(n.INVALID_TAG,F(l,this.clonePosition())))}return this.error(n.UNCLOSED_TAG,F(i,this.clonePosition()))}return this.error(n.INVALID_TAG,F(i,this.clonePosition()))},e.prototype.parseTagName=function(){var e=this.offset();for(this.bump();!this.isEOF()&&ne(this.char());)this.bump();return this.message.slice(e,this.offset())},e.prototype.parseLiteral=function(e,t){for(var i=this.clonePosition(),n="";;){var r=this.tryParseQuote(t);if(r)n+=r;else{var o=this.tryParseUnquoted(e,t);if(o)n+=o;else{var a=this.tryParseLeftAngleBracket();if(!a)break;n+=a}}}var l=F(i,this.clonePosition());return{val:{type:s.literal,value:n,location:l},err:null}},e.prototype.tryParseLeftAngleBracket=function(){return this.isEOF()||60!==this.char()||!this.ignoreTag&&(ie(e=this.peek()||0)||47===e)?null:(this.bump(),"<");var e},e.prototype.tryParseQuote=function(e){if(this.isEOF()||39!==this.char())return null;switch(this.peek()){case 39:return this.bump(),this.bump(),"'";case 123:case 60:case 62:case 125:break;case 35:if("plural"===e||"selectordinal"===e)break;return null;default:return null}this.bump();var t=[this.char()];for(this.bump();!this.isEOF();){var i=this.char();if(39===i){if(39!==this.peek()){this.bump();break}t.push(39),this.bump()}else t.push(i);this.bump()}return Y.apply(void 0,t)},e.prototype.tryParseUnquoted=function(e,t){if(this.isEOF())return null;var i=this.char();return 60===i||123===i||35===i&&("plural"===t||"selectordinal"===t)||125===i&&e>0?null:(this.bump(),Y(i))},e.prototype.parseArgument=function(e,t){var i=this.clonePosition();if(this.bump(),this.bumpSpace(),this.isEOF())return this.error(n.EXPECT_ARGUMENT_CLOSING_BRACE,F(i,this.clonePosition()));if(125===this.char())return this.bump(),this.error(n.EMPTY_ARGUMENT,F(i,this.clonePosition()));var r=this.parseIdentifierIfPossible().value;if(!r)return this.error(n.MALFORMED_ARGUMENT,F(i,this.clonePosition()));if(this.bumpSpace(),this.isEOF())return this.error(n.EXPECT_ARGUMENT_CLOSING_BRACE,F(i,this.clonePosition()));switch(this.char()){case 125:return this.bump(),{val:{type:s.argument,value:r,location:F(i,this.clonePosition())},err:null};case 44:return this.bump(),this.bumpSpace(),this.isEOF()?this.error(n.EXPECT_ARGUMENT_CLOSING_BRACE,F(i,this.clonePosition())):this.parseArgumentOptions(e,t,r,i);default:return this.error(n.MALFORMED_ARGUMENT,F(i,this.clonePosition()))}},e.prototype.parseIdentifierIfPossible=function(){var e=this.clonePosition(),t=this.offset(),i=K(this.message,t),n=t+i.length;return this.bumpTo(n),{value:i,location:F(e,this.clonePosition())}},e.prototype.parseArgumentOptions=function(e,t,i,a){var l,c=this.clonePosition(),h=this.parseIdentifierIfPossible().value,d=this.clonePosition();switch(h){case"":return this.error(n.EXPECT_ARGUMENT_TYPE,F(c,d));case"number":case"date":case"time":this.bumpSpace();var u=null;if(this.bumpIf(",")){this.bumpSpace();var p=this.clonePosition();if((w=this.parseSimpleArgStyleIfPossible()).err)return w;if(0===(v=Q(w.val)).length)return this.error(n.EXPECT_ARGUMENT_STYLE,F(this.clonePosition(),this.clonePosition()));u={style:v,styleLocation:F(p,this.clonePosition())}}if((x=this.tryParseArgumentClose(a)).err)return x;var g=F(a,this.clonePosition());if(u&&$(null==u?void 0:u.style,"::",0)){var f=Z(u.style.slice(2));if("number"===h)return(w=this.parseNumberSkeletonFromString(f,u.styleLocation)).err?w:{val:{type:s.number,value:i,location:g,style:w.val},err:null};if(0===f.length)return this.error(n.EXPECT_DATE_TIME_SKELETON,g);var m=f;this.locale&&(m=function(e,t){for(var i="",n=0;n<e.length;n++){var s=e.charAt(n);if("j"===s){for(var r=0;n+1<e.length&&e.charAt(n+1)===s;)r++,n++;var o=1+(1&r),a=r<2?1:3+(r>>1),l=N(t);for("H"!=l&&"k"!=l||(a=0);a-- >0;)i+="a";for(;o-- >0;)i=l+i}else i+="J"===s?"H":s}return i}(f,this.locale));var v={type:r.dateTime,pattern:m,location:u.styleLocation,parsedOptions:this.shouldParseSkeletons?b(m):{}};return{val:{type:"date"===h?s.date:s.time,value:i,location:g,style:v},err:null}}return{val:{type:"number"===h?s.number:"date"===h?s.date:s.time,value:i,location:g,style:null!==(l=null==u?void 0:u.style)&&void 0!==l?l:null},err:null};case"plural":case"selectordinal":case"select":var y=this.clonePosition();if(this.bumpSpace(),!this.bumpIf(","))return this.error(n.EXPECT_SELECT_ARGUMENT_OPTIONS,F(y,(0,o.__assign)({},y)));this.bumpSpace();var C=this.parseIdentifierIfPossible(),S=0;if("select"!==h&&"offset"===C.value){if(!this.bumpIf(":"))return this.error(n.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE,F(this.clonePosition(),this.clonePosition()));var w;if(this.bumpSpace(),(w=this.tryParseDecimalInteger(n.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE,n.INVALID_PLURAL_ARGUMENT_OFFSET_VALUE)).err)return w;this.bumpSpace(),C=this.parseIdentifierIfPossible(),S=w.val}var x,E=this.tryParsePluralOrSelectOptions(e,h,t,C);if(E.err)return E;if((x=this.tryParseArgumentClose(a)).err)return x;var M=F(a,this.clonePosition());return"select"===h?{val:{type:s.select,value:i,options:q(E.val),location:M},err:null}:{val:{type:s.plural,value:i,options:q(E.val),offset:S,pluralType:"plural"===h?"cardinal":"ordinal",location:M},err:null};default:return this.error(n.INVALID_ARGUMENT_TYPE,F(c,d))}},e.prototype.tryParseArgumentClose=function(e){return this.isEOF()||125!==this.char()?this.error(n.EXPECT_ARGUMENT_CLOSING_BRACE,F(e,this.clonePosition())):(this.bump(),{val:!0,err:null})},e.prototype.parseSimpleArgStyleIfPossible=function(){for(var e=0,t=this.clonePosition();!this.isEOF();)switch(this.char()){case 39:this.bump();var i=this.clonePosition();if(!this.bumpUntil("'"))return this.error(n.UNCLOSED_QUOTE_IN_ARGUMENT_STYLE,F(i,this.clonePosition()));this.bump();break;case 123:e+=1,this.bump();break;case 125:if(!(e>0))return{val:this.message.slice(t.offset,this.offset()),err:null};e-=1;break;default:this.bump()}return{val:this.message.slice(t.offset,this.offset()),err:null}},e.prototype.parseNumberSkeletonFromString=function(e,t){var i=[];try{i=function(e){if(0===e.length)throw new Error("Number skeleton cannot be empty");for(var t=[],i=0,n=e.split(S).filter(function(e){return e.length>0});i<n.length;i++){var s=n[i].split("/");if(0===s.length)throw new Error("Invalid number skeleton");for(var r=s[0],o=s.slice(1),a=0,l=o;a<l.length;a++)if(0===l[a].length)throw new Error("Invalid number skeleton");t.push({stem:r,options:o})}return t}(e)}catch(e){return this.error(n.INVALID_NUMBER_SKELETON,t)}return{val:{type:r.number,tokens:i,location:t,parsedOptions:this.shouldParseSkeletons?L(i):{}},err:null}},e.prototype.tryParsePluralOrSelectOptions=function(e,t,i,s){for(var r,o=!1,a=[],l=new Set,c=s.value,h=s.location;;){if(0===c.length){var d=this.clonePosition();if("select"===t||!this.bumpIf("="))break;var u=this.tryParseDecimalInteger(n.EXPECT_PLURAL_ARGUMENT_SELECTOR,n.INVALID_PLURAL_ARGUMENT_SELECTOR);if(u.err)return u;h=F(d,this.clonePosition()),c=this.message.slice(d.offset,this.offset())}if(l.has(c))return this.error("select"===t?n.DUPLICATE_SELECT_ARGUMENT_SELECTOR:n.DUPLICATE_PLURAL_ARGUMENT_SELECTOR,h);"other"===c&&(o=!0),this.bumpSpace();var p=this.clonePosition();if(!this.bumpIf("{"))return this.error("select"===t?n.EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT:n.EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT,F(this.clonePosition(),this.clonePosition()));var g=this.parseMessage(e+1,t,i);if(g.err)return g;var f=this.tryParseArgumentClose(p);if(f.err)return f;a.push([c,{value:g.val,location:F(p,this.clonePosition())}]),l.add(c),this.bumpSpace(),c=(r=this.parseIdentifierIfPossible()).value,h=r.location}return 0===a.length?this.error("select"===t?n.EXPECT_SELECT_ARGUMENT_SELECTOR:n.EXPECT_PLURAL_ARGUMENT_SELECTOR,F(this.clonePosition(),this.clonePosition())):this.requiresOtherClause&&!o?this.error(n.MISSING_OTHER_CLAUSE,F(this.clonePosition(),this.clonePosition())):{val:a,err:null}},e.prototype.tryParseDecimalInteger=function(e,t){var i=1,n=this.clonePosition();this.bumpIf("+")||this.bumpIf("-")&&(i=-1);for(var s=!1,r=0;!this.isEOF();){var o=this.char();if(!(o>=48&&o<=57))break;s=!0,r=10*r+(o-48),this.bump()}var a=F(n,this.clonePosition());return s?W(r*=i)?{val:r,err:null}:this.error(t,a):this.error(e,a)},e.prototype.offset=function(){return this.position.offset},e.prototype.isEOF=function(){return this.offset()===this.message.length},e.prototype.clonePosition=function(){return{offset:this.position.offset,line:this.position.line,column:this.position.column}},e.prototype.char=function(){var e=this.position.offset;if(e>=this.message.length)throw Error("out of bound");var t=X(this.message,e);if(void 0===t)throw Error("Offset ".concat(e," is at invalid UTF-16 code unit boundary"));return t},e.prototype.error=function(e,t){return{val:null,err:{kind:e,message:this.message,location:t}}},e.prototype.bump=function(){if(!this.isEOF()){var e=this.char();10===e?(this.position.line+=1,this.position.column=1,this.position.offset+=1):(this.position.column+=1,this.position.offset+=e<65536?1:2)}},e.prototype.bumpIf=function(e){if($(this.message,e,this.offset())){for(var t=0;t<e.length;t++)this.bump();return!0}return!1},e.prototype.bumpUntil=function(e){var t=this.offset(),i=this.message.indexOf(e,t);return i>=0?(this.bumpTo(i),!0):(this.bumpTo(this.message.length),!1)},e.prototype.bumpTo=function(e){if(this.offset()>e)throw Error("targetOffset ".concat(e," must be greater than or equal to the current offset ").concat(this.offset()));for(e=Math.min(e,this.message.length);;){var t=this.offset();if(t===e)break;if(t>e)throw Error("targetOffset ".concat(e," is at invalid UTF-16 code unit boundary"));if(this.bump(),this.isEOF())break}},e.prototype.bumpSpace=function(){for(;!this.isEOF()&&se(this.char());)this.bump()},e.prototype.peek=function(){if(this.isEOF())return null;var e=this.char(),t=this.offset(),i=this.message.charCodeAt(t+(e>=65536?2:1));return null!=i?i:null},e}();function ie(e){return e>=97&&e<=122||e>=65&&e<=90}function ne(e){return 45===e||46===e||e>=48&&e<=57||95===e||e>=97&&e<=122||e>=65&&e<=90||183==e||e>=192&&e<=214||e>=216&&e<=246||e>=248&&e<=893||e>=895&&e<=8191||e>=8204&&e<=8205||e>=8255&&e<=8256||e>=8304&&e<=8591||e>=11264&&e<=12271||e>=12289&&e<=55295||e>=63744&&e<=64975||e>=65008&&e<=65533||e>=65536&&e<=983039}function se(e){return e>=9&&e<=13||32===e||133===e||e>=8206&&e<=8207||8232===e||8233===e}function re(e){return e>=33&&e<=35||36===e||e>=37&&e<=39||40===e||41===e||42===e||43===e||44===e||45===e||e>=46&&e<=47||e>=58&&e<=59||e>=60&&e<=62||e>=63&&e<=64||91===e||92===e||93===e||94===e||96===e||123===e||124===e||125===e||126===e||161===e||e>=162&&e<=165||166===e||167===e||169===e||171===e||172===e||174===e||176===e||177===e||182===e||187===e||191===e||215===e||247===e||e>=8208&&e<=8213||e>=8214&&e<=8215||8216===e||8217===e||8218===e||e>=8219&&e<=8220||8221===e||8222===e||8223===e||e>=8224&&e<=8231||e>=8240&&e<=8248||8249===e||8250===e||e>=8251&&e<=8254||e>=8257&&e<=8259||8260===e||8261===e||8262===e||e>=8263&&e<=8273||8274===e||8275===e||e>=8277&&e<=8286||e>=8592&&e<=8596||e>=8597&&e<=8601||e>=8602&&e<=8603||e>=8604&&e<=8607||8608===e||e>=8609&&e<=8610||8611===e||e>=8612&&e<=8613||8614===e||e>=8615&&e<=8621||8622===e||e>=8623&&e<=8653||e>=8654&&e<=8655||e>=8656&&e<=8657||8658===e||8659===e||8660===e||e>=8661&&e<=8691||e>=8692&&e<=8959||e>=8960&&e<=8967||8968===e||8969===e||8970===e||8971===e||e>=8972&&e<=8991||e>=8992&&e<=8993||e>=8994&&e<=9e3||9001===e||9002===e||e>=9003&&e<=9083||9084===e||e>=9085&&e<=9114||e>=9115&&e<=9139||e>=9140&&e<=9179||e>=9180&&e<=9185||e>=9186&&e<=9254||e>=9255&&e<=9279||e>=9280&&e<=9290||e>=9291&&e<=9311||e>=9472&&e<=9654||9655===e||e>=9656&&e<=9664||9665===e||e>=9666&&e<=9719||e>=9720&&e<=9727||e>=9728&&e<=9838||9839===e||e>=9840&&e<=10087||10088===e||10089===e||10090===e||10091===e||10092===e||10093===e||10094===e||10095===e||10096===e||10097===e||10098===e||10099===e||10100===e||10101===e||e>=10132&&e<=10175||e>=10176&&e<=10180||10181===e||10182===e||e>=10183&&e<=10213||10214===e||10215===e||10216===e||10217===e||10218===e||10219===e||10220===e||10221===e||10222===e||10223===e||e>=10224&&e<=10239||e>=10240&&e<=10495||e>=10496&&e<=10626||10627===e||10628===e||10629===e||10630===e||10631===e||10632===e||10633===e||10634===e||10635===e||10636===e||10637===e||10638===e||10639===e||10640===e||10641===e||10642===e||10643===e||10644===e||10645===e||10646===e||10647===e||10648===e||e>=10649&&e<=10711||10712===e||10713===e||10714===e||10715===e||e>=10716&&e<=10747||10748===e||10749===e||e>=10750&&e<=11007||e>=11008&&e<=11055||e>=11056&&e<=11076||e>=11077&&e<=11078||e>=11079&&e<=11084||e>=11085&&e<=11123||e>=11124&&e<=11125||e>=11126&&e<=11157||11158===e||e>=11159&&e<=11263||e>=11776&&e<=11777||11778===e||11779===e||11780===e||11781===e||e>=11782&&e<=11784||11785===e||11786===e||11787===e||11788===e||11789===e||e>=11790&&e<=11798||11799===e||e>=11800&&e<=11801||11802===e||11803===e||11804===e||11805===e||e>=11806&&e<=11807||11808===e||11809===e||11810===e||11811===e||11812===e||11813===e||11814===e||11815===e||11816===e||11817===e||e>=11818&&e<=11822||11823===e||e>=11824&&e<=11833||e>=11834&&e<=11835||e>=11836&&e<=11839||11840===e||11841===e||11842===e||e>=11843&&e<=11855||e>=11856&&e<=11857||11858===e||e>=11859&&e<=11903||e>=12289&&e<=12291||12296===e||12297===e||12298===e||12299===e||12300===e||12301===e||12302===e||12303===e||12304===e||12305===e||e>=12306&&e<=12307||12308===e||12309===e||12310===e||12311===e||12312===e||12313===e||12314===e||12315===e||12316===e||12317===e||e>=12318&&e<=12319||12320===e||12336===e||64830===e||64831===e||e>=65093&&e<=65094}function oe(e){e.forEach(function(e){if(delete e.location,u(e)||p(e))for(var t in e.options)delete e.options[t].location,oe(e.options[t].value);else c(e)&&m(e.style)||(h(e)||d(e))&&v(e.style)?delete e.style.location:f(e)&&oe(e.children)})}function ae(e,t){void 0===t&&(t={}),t=(0,o.__assign)({shouldParseSkeletons:!0,requiresOtherClause:!0},t);var i=new te(e,t).parse();if(i.err){var s=SyntaxError(n[i.err.kind]);throw s.location=i.err.location,s.originalMessage=i.err.message,s}return(null==t?void 0:t.captureLocation)||oe(i.val),i.val}},82607(e,t,i){"use strict";i.d(t,{E:()=>I});var n=i(65959),s=i(14716),r=i(49603),o=["localeMatcher","style","currency","currencyDisplay","unit","unitDisplay","useGrouping","minimumIntegerDigits","minimumFractionDigits","maximumFractionDigits","minimumSignificantDigits","maximumSignificantDigits","compactDisplay","currencyDisplay","currencySign","notation","signDisplay","unit","unitDisplay","numberingSystem"];function a(e,t,i){var n=e.locale,r=e.formats,a=e.onError;void 0===i&&(i={});var l=i.format,c=l&&(0,s.F3)(r,"number",l,a)||{};return t(n,(0,s.J9)(i,o,c))}function l(e,t,i,n){void 0===n&&(n={});try{return a(e,t,n).format(i)}catch(t){e.onError(new r.Ar(r.lo.FORMAT_ERROR,"Error formatting number.",t))}return String(i)}function c(e,t,i,n){void 0===n&&(n={});try{return a(e,t,n).formatToParts(i)}catch(t){e.onError(new r.Ar(r.lo.FORMAT_ERROR,"Error formatting number.",t))}return[]}var h=i(660),d=["numeric","style"];function u(e,t,i,n,o){void 0===o&&(o={}),n||(n="second"),Intl.RelativeTimeFormat||e.onError(new h.IF('Intl.RelativeTimeFormat is not available in this environment.\nTry polyfilling it using "@formatjs/intl-relativetimeformat"\n',h.O4.MISSING_INTL_API));try{return function(e,t,i){var n=e.locale,r=e.formats,o=e.onError;void 0===i&&(i={});var a=i.format,l=!!a&&(0,s.F3)(r,"relative",a,o)||{};return t(n,(0,s.J9)(i,d,l))}(e,t,o).format(i,n)}catch(t){e.onError(new r.pg("Error formatting relative time.",e.locale,t))}return String(i)}var p=["localeMatcher","formatMatcher","timeZone","hour12","weekday","era","year","month","day","hour","minute","second","timeZoneName","hourCycle","dateStyle","timeStyle","calendar","numberingSystem"];function g(e,t,i,r){var o=e.locale,a=e.formats,l=e.onError,c=e.timeZone;void 0===r&&(r={});var h=r.format,d=(0,n.__assign)((0,n.__assign)({},c&&{timeZone:c}),h&&(0,s.F3)(a,t,h,l)),u=(0,s.J9)(r,p,d);return"time"!==t||u.hour||u.minute||u.second||u.timeStyle||u.dateStyle||(u=(0,n.__assign)((0,n.__assign)({},u),{hour:"numeric",minute:"numeric"})),i(o,u)}function f(e,t){for(var i=[],n=2;n<arguments.length;n++)i[n-2]=arguments[n];var s=i[0],o=i[1],a=void 0===o?{}:o,l="string"==typeof s?new Date(s||0):s;try{return g(e,"date",t,a).format(l)}catch(t){e.onError(new r.Ar(r.lo.FORMAT_ERROR,"Error formatting date.",t))}return String(l)}function m(e,t){for(var i=[],n=2;n<arguments.length;n++)i[n-2]=arguments[n];var s=i[0],o=i[1],a=void 0===o?{}:o,l="string"==typeof s?new Date(s||0):s;try{return g(e,"time",t,a).format(l)}catch(t){e.onError(new r.Ar(r.lo.FORMAT_ERROR,"Error formatting time.",t))}return String(l)}function v(e,t){for(var i=[],n=2;n<arguments.length;n++)i[n-2]=arguments[n];var o=i[0],a=i[1],l=i[2],c=void 0===l?{}:l,h=e.timeZone,d=e.locale,u=e.onError,g=(0,s.J9)(c,p,h?{timeZone:h}:{});try{return t(d,g).formatRange(o,a)}catch(e){u(new r.Ar(r.lo.FORMAT_ERROR,"Error formatting date time range.",e))}return String(o)}function y(e,t){for(var i=[],n=2;n<arguments.length;n++)i[n-2]=arguments[n];var s=i[0],o=i[1],a=void 0===o?{}:o,l="string"==typeof s?new Date(s||0):s;try{return g(e,"date",t,a).formatToParts(l)}catch(t){e.onError(new r.Ar(r.lo.FORMAT_ERROR,"Error formatting date.",t))}return[]}function C(e,t){for(var i=[],n=2;n<arguments.length;n++)i[n-2]=arguments[n];var s=i[0],o=i[1],a=void 0===o?{}:o,l="string"==typeof s?new Date(s||0):s;try{return g(e,"time",t,a).formatToParts(l)}catch(t){e.onError(new r.Ar(r.lo.FORMAT_ERROR,"Error formatting time.",t))}return[]}var b=["localeMatcher","type"];function S(e,t,i,n){var o=e.locale,a=e.onError;void 0===n&&(n={}),Intl.PluralRules||a(new h.IF('Intl.PluralRules is not available in this environment.\nTry polyfilling it using "@formatjs/intl-pluralrules"\n',h.O4.MISSING_INTL_API));var l=(0,s.J9)(n,b);try{return t(o,l).select(i)}catch(e){a(new r.pg("Error formatting plural.",o,e))}return"other"}var w=i(62954),x=["localeMatcher","type","style"],E=Date.now();function M(e,t,i,n){void 0===n&&(n={});var s=A(e,t,i,n).reduce(function(e,t){var i=t.value;return"string"!=typeof i?e.push(i):"string"==typeof e[e.length-1]?e[e.length-1]+=i:e.push(i),e},[]);return 1===s.length?s[0]:s}function A(e,t,i,o){var a=e.locale,l=e.onError;void 0===o&&(o={}),Intl.ListFormat||l(new h.IF('Intl.ListFormat is not available in this environment.\nTry polyfilling it using "@formatjs/intl-listformat"\n',h.O4.MISSING_INTL_API));var c=(0,s.J9)(o,x);try{var d={},u=i.map(function(e,t){if("object"==typeof e){var i=function(e){return"".concat(E,"_").concat(e,"_").concat(E)}(t);return d[i]=e,i}return String(e)});return t(a,c).formatToParts(u).map(function(e){return"literal"===e.type?e:(0,n.__assign)((0,n.__assign)({},e),{value:d[e.value]||e.value})})}catch(e){l(new r.Ar(r.lo.FORMAT_ERROR,"Error formatting list.",e))}return i}var T=["localeMatcher","style","type","fallback"];function D(e,t,i,n){var o=e.locale,a=e.onError;Intl.DisplayNames||a(new h.IF('Intl.DisplayNames is not available in this environment.\nTry polyfilling it using "@formatjs/intl-displaynames"\n',h.O4.MISSING_INTL_API));var l=(0,s.J9)(n,T);try{return t(o,l).of(i)}catch(e){a(new r.Ar(r.lo.FORMAT_ERROR,"Error formatting display name.",e))}}function I(e,t){var i=(0,s.GT)(t),o=(0,n.__assign)((0,n.__assign)({},s.JF),e),a=o.locale,h=o.defaultLocale,d=o.onError;return a?!Intl.NumberFormat.supportedLocalesOf(a).length&&d?d(new r.hr('Missing locale data for locale: "'.concat(a,'" in Intl.NumberFormat. Using default locale: "').concat(h,'" as fallback. See https://formatjs.io/docs/react-intl#runtime-requirements for more details'))):!Intl.DateTimeFormat.supportedLocalesOf(a).length&&d&&d(new r.hr('Missing locale data for locale: "'.concat(a,'" in Intl.DateTimeFormat. Using default locale: "').concat(h,'" as fallback. See https://formatjs.io/docs/react-intl#runtime-requirements for more details'))):(d&&d(new r.uo('"locale" was not configured, using "'.concat(h,'" as fallback. See https://formatjs.io/docs/react-intl/api#intlshape for more details'))),o.locale=o.defaultLocale||"en"),function(e){var t;e.onWarn&&e.defaultRichTextElements&&"string"==typeof((t=e.messages||{})?t[Object.keys(t)[0]]:void 0)&&e.onWarn('[@formatjs/intl] "defaultRichTextElements" was specified but "message" was not pre-compiled. \nPlease consider using "@formatjs/cli" to pre-compile your messages for performance.\nFor more details see https://formatjs.io/docs/getting-started/message-distribution')}(o),(0,n.__assign)((0,n.__assign)({},o),{formatters:i,formatNumber:l.bind(null,o,i.getNumberFormat),formatNumberToParts:c.bind(null,o,i.getNumberFormat),formatRelativeTime:u.bind(null,o,i.getRelativeTimeFormat),formatDate:f.bind(null,o,i.getDateTimeFormat),formatDateToParts:y.bind(null,o,i.getDateTimeFormat),formatTime:m.bind(null,o,i.getDateTimeFormat),formatDateTimeRange:v.bind(null,o,i.getDateTimeFormat),formatTimeToParts:C.bind(null,o,i.getDateTimeFormat),formatPlural:S.bind(null,o,i.getPluralRules),formatMessage:w.h.bind(null,o,i),$t:w.h.bind(null,o,i),formatList:M.bind(null,o,i.getListFormat),formatListToParts:A.bind(null,o,i.getListFormat),formatDisplayName:D.bind(null,o,i.getDisplayNames)})}},49603(e,t,i){"use strict";i.d(t,{Ar:()=>r,Ho:()=>h,OC:()=>o,hr:()=>l,lo:()=>n,pg:()=>c,sb:()=>d,uo:()=>a});var n,s=i(65959);!function(e){e.FORMAT_ERROR="FORMAT_ERROR",e.UNSUPPORTED_FORMATTER="UNSUPPORTED_FORMATTER",e.INVALID_CONFIG="INVALID_CONFIG",e.MISSING_DATA="MISSING_DATA",e.MISSING_TRANSLATION="MISSING_TRANSLATION"}(n||(n={}));var r=function(e){function t(i,n,s){var r=this,o=s?s instanceof Error?s:new Error(String(s)):void 0;return(r=e.call(this,"[@formatjs/intl Error ".concat(i,"] ").concat(n," \n").concat(o?"\n".concat(o.message,"\n").concat(o.stack):""))||this).code=i,"function"==typeof Error.captureStackTrace&&Error.captureStackTrace(r,t),r}return(0,s.__extends)(t,e),t}(Error),o=function(e){function t(t,i){return e.call(this,n.UNSUPPORTED_FORMATTER,t,i)||this}return(0,s.__extends)(t,e),t}(r),a=function(e){function t(t,i){return e.call(this,n.INVALID_CONFIG,t,i)||this}return(0,s.__extends)(t,e),t}(r),l=function(e){function t(t,i){return e.call(this,n.MISSING_DATA,t,i)||this}return(0,s.__extends)(t,e),t}(r),c=function(e){function t(t,i,s){return e.call(this,n.FORMAT_ERROR,"".concat(t," \nLocale: ").concat(i,"\n"),s)||this}return(0,s.__extends)(t,e),t}(r),h=function(e){function t(t,i,n,s){var r=e.call(this,"".concat(t," \nMessageID: ").concat(null==n?void 0:n.id,"\nDefault Message: ").concat(null==n?void 0:n.defaultMessage,"\nDescription: ").concat(null==n?void 0:n.description," \n"),i,s)||this;return r.descriptor=n,r}return(0,s.__extends)(t,e),t}(c),d=function(e){function t(t,i){var s=e.call(this,n.MISSING_TRANSLATION,'Missing message: "'.concat(t.id,'" for locale "').concat(i,'", using ').concat(t.defaultMessage?"default message":"id"," as fallback."))||this;return s.descriptor=t,s}return(0,s.__extends)(t,e),t}(r)},62954(e,t,i){"use strict";i.d(t,{h:()=>d});var n=i(65959),s=i(3704),r=i(92859),o=i(49603),a=i(26140);function l(e,t){return Object.keys(e).reduce(function(i,s){return i[s]=(0,n.__assign)({timeZone:t},e[s]),i},{})}function c(e,t){return Object.keys((0,n.__assign)((0,n.__assign)({},e),t)).reduce(function(i,s){return i[s]=(0,n.__assign)((0,n.__assign)({},e[s]||{}),t[s]||{}),i},{})}function h(e,t){if(!t)return e;var i=r.S.formats;return(0,n.__assign)((0,n.__assign)((0,n.__assign)({},i),e),{date:c(l(i.date,t),l(e.date||{},t)),time:c(l(i.time,t),l(e.time||{},t))})}function d(e,t,i,r,l){var c=e.locale,d=e.formats,u=e.messages,p=e.defaultLocale,g=e.defaultFormats,f=e.fallbackOnEmptyString,m=e.onError,v=e.timeZone,y=e.defaultRichTextElements;void 0===i&&(i={id:""});var C=i.id,b=i.defaultMessage;(0,s.V1)(!!C,"[@formatjs/intl] An `id` must be provided to format a message. You can either:\n1. Configure your build toolchain with [babel-plugin-formatjs](https://formatjs.io/docs/tooling/babel-plugin)\nor [@formatjs/ts-transformer](https://formatjs.io/docs/tooling/ts-transformer) OR\n2. Configure your `eslint` config to include [eslint-plugin-formatjs](https://formatjs.io/docs/tooling/linter#enforce-id)\nto autofix this issue");var S=String(C),w=u&&Object.prototype.hasOwnProperty.call(u,S)&&u[S];if(Array.isArray(w)&&1===w.length&&w[0].type===a.ZE.literal)return w[0].value;if(!r&&w&&"string"==typeof w&&!y)return w.replace(/'\{(.*?)\}'/gi,"{$1}");if(r=(0,n.__assign)((0,n.__assign)({},y),r||{}),d=h(d,v),g=h(g,v),!w){if(!1===f&&""===w)return w;if((!b||c&&c.toLowerCase()!==p.toLowerCase())&&m(new o.sb(i,c)),b)try{return t.getMessageFormat(b,p,g,l).format(r)}catch(e){return m(new o.Ho('Error formatting default message for: "'.concat(S,'", rendering default message verbatim'),c,i,e)),"string"==typeof b?b:S}return S}try{return t.getMessageFormat(w,c,d,(0,n.__assign)({formatters:t},l||{})).format(r)}catch(e){m(new o.Ho('Error formatting message: "'.concat(S,'", using ').concat(b?"default message":"id"," as fallback."),c,i,e))}if(b)try{return t.getMessageFormat(b,p,g,l).format(r)}catch(e){m(new o.Ho('Error formatting the default message for: "'.concat(S,'", rendering message verbatim'),c,i,e))}return"string"==typeof w?w:"string"==typeof b?b:S}},14716(e,t,i){"use strict";i.d(t,{F3:()=>u,GT:()=>d,J9:()=>a,JF:()=>l,MT:()=>c});var n=i(65959),s=i(92859),r=i(59556),o=i(49603);function a(e,t,i){return void 0===i&&(i={}),t.reduce(function(t,n){return n in e?t[n]=e[n]:n in i&&(t[n]=i[n]),t},{})}var l={formats:{},messages:{},timeZone:void 0,defaultLocale:"en",defaultFormats:{},fallbackOnEmptyString:!0,onError:function(e){},onWarn:function(e){}};function c(){return{dateTime:{},number:{},message:{},relativeTime:{},pluralRules:{},list:{},displayNames:{}}}function h(e){return{create:function(){return{get:function(t){return e[t]},set:function(t,i){e[t]=i}}}}}function d(e){void 0===e&&(e={dateTime:{},number:{},message:{},relativeTime:{},pluralRules:{},list:{},displayNames:{}});var t=Intl.RelativeTimeFormat,i=Intl.ListFormat,o=Intl.DisplayNames,a=(0,r.A)(function(){for(var e,t=[],i=0;i<arguments.length;i++)t[i]=arguments[i];return new((e=Intl.DateTimeFormat).bind.apply(e,(0,n.__spreadArray)([void 0],t,!1)))},{cache:h(e.dateTime),strategy:r.W.variadic}),l=(0,r.A)(function(){for(var e,t=[],i=0;i<arguments.length;i++)t[i]=arguments[i];return new((e=Intl.NumberFormat).bind.apply(e,(0,n.__spreadArray)([void 0],t,!1)))},{cache:h(e.number),strategy:r.W.variadic}),c=(0,r.A)(function(){for(var e,t=[],i=0;i<arguments.length;i++)t[i]=arguments[i];return new((e=Intl.PluralRules).bind.apply(e,(0,n.__spreadArray)([void 0],t,!1)))},{cache:h(e.pluralRules),strategy:r.W.variadic});return{getDateTimeFormat:a,getNumberFormat:l,getMessageFormat:(0,r.A)(function(e,t,i,r){return new s.S(e,t,i,(0,n.__assign)({formatters:{getNumberFormat:l,getDateTimeFormat:a,getPluralRules:c}},r||{}))},{cache:h(e.message),strategy:r.W.variadic}),getRelativeTimeFormat:(0,r.A)(function(){for(var e=[],i=0;i<arguments.length;i++)e[i]=arguments[i];return new(t.bind.apply(t,(0,n.__spreadArray)([void 0],e,!1)))},{cache:h(e.relativeTime),strategy:r.W.variadic}),getPluralRules:c,getListFormat:(0,r.A)(function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return new(i.bind.apply(i,(0,n.__spreadArray)([void 0],e,!1)))},{cache:h(e.list),strategy:r.W.variadic}),getDisplayNames:(0,r.A)(function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return new(o.bind.apply(o,(0,n.__spreadArray)([void 0],e,!1)))},{cache:h(e.displayNames),strategy:r.W.variadic})}}function u(e,t,i,n){var s,r=e&&e[t];if(r&&(s=r[i]),s)return s;n(new o.OC("No ".concat(t," format named: ").concat(i)))}},5188(e,t,i){"use strict";function n(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),i.push.apply(i,n)}return i}function s(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?n(Object(i),!0).forEach(function(t){a(e,t,i[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):n(Object(i)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))})}return e}function r(e){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r(e)}function o(e,t){for(var i=0;i<t.length;i++){var n=t[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function a(e,t,i){return t in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,e}function l(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var i=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=i){var n,s,r=[],o=!0,a=!1;try{for(i=i.call(e);!(o=(n=i.next()).done)&&(r.push(n.value),!t||r.length!==t);o=!0);}catch(e){a=!0,s=e}finally{try{o||null==i.return||i.return()}finally{if(a)throw s}}return r}}(e,t)||h(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function c(e){return function(e){if(Array.isArray(e))return d(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||h(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function h(e,t){if(e){if("string"==typeof e)return d(e,t);var i=Object.prototype.toString.call(e).slice(8,-1);return"Object"===i&&e.constructor&&(i=e.constructor.name),"Map"===i||"Set"===i?Array.from(e):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?d(e,t):void 0}}function d(e,t){(null==t||t>e.length)&&(t=e.length);for(var i=0,n=new Array(t);i<t;i++)n[i]=e[i];return n}i.r(t),i.d(t,{api:()=>Xe,config:()=>$t,counter:()=>ii,dom:()=>qt,findIconDefinition:()=>Zt,icon:()=>Jt,layer:()=>ei,library:()=>Yt,noAuto:()=>Kt,parse:()=>Xt,text:()=>ti,toHtml:()=>Qt});var u=function(){},p={},g={},f=null,m={mark:u,measure:u};try{"undefined"!=typeof window&&(p=window),"undefined"!=typeof document&&(g=document),"undefined"!=typeof MutationObserver&&(f=MutationObserver),"undefined"!=typeof performance&&(m=performance)}catch(e){}var v=(p.navigator||{}).userAgent,y=void 0===v?"":v,C=p,b=g,S=f,w=m,x=(C.document,!!b.documentElement&&!!b.head&&"function"==typeof b.addEventListener&&"function"==typeof b.createElement),E=~y.indexOf("MSIE")||~y.indexOf("Trident/"),M="___FONT_AWESOME___",A="svg-inline--fa",T="data-fa-i2svg",D="data-fa-pseudo-element",I="data-prefix",R="data-icon",L="fontawesome-i2svg",k=["HTML","HEAD","STYLE","SCRIPT"],P=function(){try{return!0}catch(e){return!1}}(),N={fas:"solid","fa-solid":"solid",far:"regular","fa-regular":"regular",fal:"light","fa-light":"light",fat:"thin","fa-thin":"thin",fad:"duotone","fa-duotone":"duotone",fab:"brands","fa-brands":"brands",fak:"kit","fa-kit":"kit",fa:"solid"},O={solid:"fas",regular:"far",light:"fal",thin:"fat",duotone:"fad",brands:"fab",kit:"fak"},_={fab:"fa-brands",fad:"fa-duotone",fak:"fa-kit",fal:"fa-light",far:"fa-regular",fas:"fa-solid",fat:"fa-thin"},F={"fa-brands":"fab","fa-duotone":"fad","fa-kit":"fak","fa-light":"fal","fa-regular":"far","fa-solid":"fas","fa-thin":"fat"},G=/fa[srltdbk\-\ ]/,V="fa-layers-text",B=/Font ?Awesome ?([56 ]*)(Solid|Regular|Light|Thin|Duotone|Brands|Free|Pro|Kit)?.*/i,H={900:"fas",400:"far",normal:"far",300:"fal",100:"fat"},z=[1,2,3,4,5,6,7,8,9,10],U=z.concat([11,12,13,14,15,16,17,18,19,20]),W=["class","data-prefix","data-icon","data-fa-transform","data-fa-mask"],j="duotone-group",K="primary",$="secondary",Y=[].concat(c(Object.keys(O)),["2xs","xs","sm","lg","xl","2xl","beat","border","fade","beat-fade","bounce","flip-both","flip-horizontal","flip-vertical","flip","fw","inverse","layers-counter","layers-text","layers","li","pull-left","pull-right","pulse","rotate-180","rotate-270","rotate-90","rotate-by","shake","spin-pulse","spin-reverse","spin","stack-1x","stack-2x","stack","ul",j,"swap-opacity",K,$]).concat(z.map(function(e){return"".concat(e,"x")})).concat(U.map(function(e){return"w-".concat(e)})),q=C.FontAwesomeConfig||{};b&&"function"==typeof b.querySelector&&[["data-family-prefix","familyPrefix"],["data-style-default","styleDefault"],["data-replacement-class","replacementClass"],["data-auto-replace-svg","autoReplaceSvg"],["data-auto-add-css","autoAddCss"],["data-auto-a11y","autoA11y"],["data-search-pseudo-elements","searchPseudoElements"],["data-observe-mutations","observeMutations"],["data-mutate-approach","mutateApproach"],["data-keep-original-source","keepOriginalSource"],["data-measure-performance","measurePerformance"],["data-show-missing-icons","showMissingIcons"]].forEach(function(e){var t=l(e,2),i=t[0],n=t[1],s=function(e){return""===e||"false"!==e&&("true"===e||e)}(function(e){var t=b.querySelector("script["+e+"]");if(t)return t.getAttribute(e)}(i));null!=s&&(q[n]=s)});var X=s(s({},{familyPrefix:"fa",styleDefault:"solid",replacementClass:A,autoReplaceSvg:!0,autoAddCss:!0,autoA11y:!0,searchPseudoElements:!1,observeMutations:!0,mutateApproach:"async",keepOriginalSource:!0,measurePerformance:!1,showMissingIcons:!0}),q);X.autoReplaceSvg||(X.observeMutations=!1);var Z={};Object.keys(X).forEach(function(e){Object.defineProperty(Z,e,{enumerable:!0,set:function(t){X[e]=t,Q.forEach(function(e){return e(Z)})},get:function(){return X[e]}})}),C.FontAwesomeConfig=Z;var Q=[],J=16,ee={size:16,x:0,y:0,rotate:0,flipX:!1,flipY:!1};function te(){for(var e=12,t="";e-- >0;)t+="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"[62*Math.random()|0];return t}function ie(e){for(var t=[],i=(e||[]).length>>>0;i--;)t[i]=e[i];return t}function ne(e){return e.classList?ie(e.classList):(e.getAttribute("class")||"").split(" ").filter(function(e){return e})}function se(e){return"".concat(e).replace(/&/g,"&amp;").replace(/"/g,"&quot;").replace(/'/g,"&#39;").replace(/</g,"&lt;").replace(/>/g,"&gt;")}function re(e){return Object.keys(e||{}).reduce(function(t,i){return t+"".concat(i,": ").concat(e[i].trim(),";")},"")}function oe(e){return e.size!==ee.size||e.x!==ee.x||e.y!==ee.y||e.rotate!==ee.rotate||e.flipX||e.flipY}function ae(){var e="fa",t=A,i=Z.familyPrefix,n=Z.replacementClass,s=':root, :host {\n  --fa-font-solid: normal 900 1em/1 "Font Awesome 6 Solid";\n  --fa-font-regular: normal 400 1em/1 "Font Awesome 6 Regular";\n  --fa-font-light: normal 300 1em/1 "Font Awesome 6 Light";\n  --fa-font-thin: normal 100 1em/1 "Font Awesome 6 Thin";\n  --fa-font-duotone: normal 900 1em/1 "Font Awesome 6 Duotone";\n  --fa-font-brands: normal 400 1em/1 "Font Awesome 6 Brands";\n}\n\nsvg:not(:root).svg-inline--fa, svg:not(:host).svg-inline--fa {\n  overflow: visible;\n  box-sizing: content-box;\n}\n\n.svg-inline--fa {\n  display: var(--fa-display, inline-block);\n  height: 1em;\n  overflow: visible;\n  vertical-align: -0.125em;\n}\n.svg-inline--fa.fa-2xs {\n  vertical-align: 0.1em;\n}\n.svg-inline--fa.fa-xs {\n  vertical-align: 0em;\n}\n.svg-inline--fa.fa-sm {\n  vertical-align: -0.0714285705em;\n}\n.svg-inline--fa.fa-lg {\n  vertical-align: -0.2em;\n}\n.svg-inline--fa.fa-xl {\n  vertical-align: -0.25em;\n}\n.svg-inline--fa.fa-2xl {\n  vertical-align: -0.3125em;\n}\n.svg-inline--fa.fa-pull-left {\n  margin-right: var(--fa-pull-margin, 0.3em);\n  width: auto;\n}\n.svg-inline--fa.fa-pull-right {\n  margin-left: var(--fa-pull-margin, 0.3em);\n  width: auto;\n}\n.svg-inline--fa.fa-li {\n  width: var(--fa-li-width, 2em);\n  top: 0.25em;\n}\n.svg-inline--fa.fa-fw {\n  width: var(--fa-fw-width, 1.25em);\n}\n\n.fa-layers svg.svg-inline--fa {\n  bottom: 0;\n  left: 0;\n  margin: auto;\n  position: absolute;\n  right: 0;\n  top: 0;\n}\n\n.fa-layers-counter, .fa-layers-text {\n  display: inline-block;\n  position: absolute;\n  text-align: center;\n}\n\n.fa-layers {\n  display: inline-block;\n  height: 1em;\n  position: relative;\n  text-align: center;\n  vertical-align: -0.125em;\n  width: 1em;\n}\n.fa-layers svg.svg-inline--fa {\n  -webkit-transform-origin: center center;\n          transform-origin: center center;\n}\n\n.fa-layers-text {\n  left: 50%;\n  top: 50%;\n  -webkit-transform: translate(-50%, -50%);\n          transform: translate(-50%, -50%);\n  -webkit-transform-origin: center center;\n          transform-origin: center center;\n}\n\n.fa-layers-counter {\n  background-color: var(--fa-counter-background-color, #ff253a);\n  border-radius: var(--fa-counter-border-radius, 1em);\n  box-sizing: border-box;\n  color: var(--fa-inverse, #fff);\n  line-height: var(--fa-counter-line-height, 1);\n  max-width: var(--fa-counter-max-width, 5em);\n  min-width: var(--fa-counter-min-width, 1.5em);\n  overflow: hidden;\n  padding: var(--fa-counter-padding, 0.25em 0.5em);\n  right: var(--fa-right, 0);\n  text-overflow: ellipsis;\n  top: var(--fa-top, 0);\n  -webkit-transform: scale(var(--fa-counter-scale, 0.25));\n          transform: scale(var(--fa-counter-scale, 0.25));\n  -webkit-transform-origin: top right;\n          transform-origin: top right;\n}\n\n.fa-layers-bottom-right {\n  bottom: var(--fa-bottom, 0);\n  right: var(--fa-right, 0);\n  top: auto;\n  -webkit-transform: scale(var(--fa-layers-scale, 0.25));\n          transform: scale(var(--fa-layers-scale, 0.25));\n  -webkit-transform-origin: bottom right;\n          transform-origin: bottom right;\n}\n\n.fa-layers-bottom-left {\n  bottom: var(--fa-bottom, 0);\n  left: var(--fa-left, 0);\n  right: auto;\n  top: auto;\n  -webkit-transform: scale(var(--fa-layers-scale, 0.25));\n          transform: scale(var(--fa-layers-scale, 0.25));\n  -webkit-transform-origin: bottom left;\n          transform-origin: bottom left;\n}\n\n.fa-layers-top-right {\n  top: var(--fa-top, 0);\n  right: var(--fa-right, 0);\n  -webkit-transform: scale(var(--fa-layers-scale, 0.25));\n          transform: scale(var(--fa-layers-scale, 0.25));\n  -webkit-transform-origin: top right;\n          transform-origin: top right;\n}\n\n.fa-layers-top-left {\n  left: var(--fa-left, 0);\n  right: auto;\n  top: var(--fa-top, 0);\n  -webkit-transform: scale(var(--fa-layers-scale, 0.25));\n          transform: scale(var(--fa-layers-scale, 0.25));\n  -webkit-transform-origin: top left;\n          transform-origin: top left;\n}\n\n.fa-1x {\n  font-size: 1em;\n}\n\n.fa-2x {\n  font-size: 2em;\n}\n\n.fa-3x {\n  font-size: 3em;\n}\n\n.fa-4x {\n  font-size: 4em;\n}\n\n.fa-5x {\n  font-size: 5em;\n}\n\n.fa-6x {\n  font-size: 6em;\n}\n\n.fa-7x {\n  font-size: 7em;\n}\n\n.fa-8x {\n  font-size: 8em;\n}\n\n.fa-9x {\n  font-size: 9em;\n}\n\n.fa-10x {\n  font-size: 10em;\n}\n\n.fa-2xs {\n  font-size: 0.625em;\n  line-height: 0.1em;\n  vertical-align: 0.225em;\n}\n\n.fa-xs {\n  font-size: 0.75em;\n  line-height: 0.0833333337em;\n  vertical-align: 0.125em;\n}\n\n.fa-sm {\n  font-size: 0.875em;\n  line-height: 0.0714285718em;\n  vertical-align: 0.0535714295em;\n}\n\n.fa-lg {\n  font-size: 1.25em;\n  line-height: 0.05em;\n  vertical-align: -0.075em;\n}\n\n.fa-xl {\n  font-size: 1.5em;\n  line-height: 0.0416666682em;\n  vertical-align: -0.125em;\n}\n\n.fa-2xl {\n  font-size: 2em;\n  line-height: 0.03125em;\n  vertical-align: -0.1875em;\n}\n\n.fa-fw {\n  text-align: center;\n  width: 1.25em;\n}\n\n.fa-ul {\n  list-style-type: none;\n  margin-left: var(--fa-li-margin, 2.5em);\n  padding-left: 0;\n}\n.fa-ul > li {\n  position: relative;\n}\n\n.fa-li {\n  left: calc(var(--fa-li-width, 2em) * -1);\n  position: absolute;\n  text-align: center;\n  width: var(--fa-li-width, 2em);\n  line-height: inherit;\n}\n\n.fa-border {\n  border-color: var(--fa-border-color, #eee);\n  border-radius: var(--fa-border-radius, 0.1em);\n  border-style: var(--fa-border-style, solid);\n  border-width: var(--fa-border-width, 0.08em);\n  padding: var(--fa-border-padding, 0.2em 0.25em 0.15em);\n}\n\n.fa-pull-left {\n  float: left;\n  margin-right: var(--fa-pull-margin, 0.3em);\n}\n\n.fa-pull-right {\n  float: right;\n  margin-left: var(--fa-pull-margin, 0.3em);\n}\n\n.fa-beat {\n  -webkit-animation-name: fa-beat;\n          animation-name: fa-beat;\n  -webkit-animation-delay: var(--fa-animation-delay, 0);\n          animation-delay: var(--fa-animation-delay, 0);\n  -webkit-animation-direction: var(--fa-animation-direction, normal);\n          animation-direction: var(--fa-animation-direction, normal);\n  -webkit-animation-duration: var(--fa-animation-duration, 1s);\n          animation-duration: var(--fa-animation-duration, 1s);\n  -webkit-animation-iteration-count: var(--fa-animation-iteration-count, infinite);\n          animation-iteration-count: var(--fa-animation-iteration-count, infinite);\n  -webkit-animation-timing-function: var(--fa-animation-timing, ease-in-out);\n          animation-timing-function: var(--fa-animation-timing, ease-in-out);\n}\n\n.fa-bounce {\n  -webkit-animation-name: fa-bounce;\n          animation-name: fa-bounce;\n  -webkit-animation-delay: var(--fa-animation-delay, 0);\n          animation-delay: var(--fa-animation-delay, 0);\n  -webkit-animation-direction: var(--fa-animation-direction, normal);\n          animation-direction: var(--fa-animation-direction, normal);\n  -webkit-animation-duration: var(--fa-animation-duration, 1s);\n          animation-duration: var(--fa-animation-duration, 1s);\n  -webkit-animation-iteration-count: var(--fa-animation-iteration-count, infinite);\n          animation-iteration-count: var(--fa-animation-iteration-count, infinite);\n  -webkit-animation-timing-function: var(--fa-animation-timing, cubic-bezier(0.28, 0.84, 0.42, 1));\n          animation-timing-function: var(--fa-animation-timing, cubic-bezier(0.28, 0.84, 0.42, 1));\n}\n\n.fa-fade {\n  -webkit-animation-name: fa-fade;\n          animation-name: fa-fade;\n  -webkit-animation-delay: var(--fa-animation-delay, 0);\n          animation-delay: var(--fa-animation-delay, 0);\n  -webkit-animation-direction: var(--fa-animation-direction, normal);\n          animation-direction: var(--fa-animation-direction, normal);\n  -webkit-animation-duration: var(--fa-animation-duration, 1s);\n          animation-duration: var(--fa-animation-duration, 1s);\n  -webkit-animation-iteration-count: var(--fa-animation-iteration-count, infinite);\n          animation-iteration-count: var(--fa-animation-iteration-count, infinite);\n  -webkit-animation-timing-function: var(--fa-animation-timing, cubic-bezier(0.4, 0, 0.6, 1));\n          animation-timing-function: var(--fa-animation-timing, cubic-bezier(0.4, 0, 0.6, 1));\n}\n\n.fa-beat-fade {\n  -webkit-animation-name: fa-beat-fade;\n          animation-name: fa-beat-fade;\n  -webkit-animation-delay: var(--fa-animation-delay, 0);\n          animation-delay: var(--fa-animation-delay, 0);\n  -webkit-animation-direction: var(--fa-animation-direction, normal);\n          animation-direction: var(--fa-animation-direction, normal);\n  -webkit-animation-duration: var(--fa-animation-duration, 1s);\n          animation-duration: var(--fa-animation-duration, 1s);\n  -webkit-animation-iteration-count: var(--fa-animation-iteration-count, infinite);\n          animation-iteration-count: var(--fa-animation-iteration-count, infinite);\n  -webkit-animation-timing-function: var(--fa-animation-timing, cubic-bezier(0.4, 0, 0.6, 1));\n          animation-timing-function: var(--fa-animation-timing, cubic-bezier(0.4, 0, 0.6, 1));\n}\n\n.fa-flip {\n  -webkit-animation-name: fa-flip;\n          animation-name: fa-flip;\n  -webkit-animation-delay: var(--fa-animation-delay, 0);\n          animation-delay: var(--fa-animation-delay, 0);\n  -webkit-animation-direction: var(--fa-animation-direction, normal);\n          animation-direction: var(--fa-animation-direction, normal);\n  -webkit-animation-duration: var(--fa-animation-duration, 1s);\n          animation-duration: var(--fa-animation-duration, 1s);\n  -webkit-animation-iteration-count: var(--fa-animation-iteration-count, infinite);\n          animation-iteration-count: var(--fa-animation-iteration-count, infinite);\n  -webkit-animation-timing-function: var(--fa-animation-timing, ease-in-out);\n          animation-timing-function: var(--fa-animation-timing, ease-in-out);\n}\n\n.fa-shake {\n  -webkit-animation-name: fa-shake;\n          animation-name: fa-shake;\n  -webkit-animation-delay: var(--fa-animation-delay, 0);\n          animation-delay: var(--fa-animation-delay, 0);\n  -webkit-animation-direction: var(--fa-animation-direction, normal);\n          animation-direction: var(--fa-animation-direction, normal);\n  -webkit-animation-duration: var(--fa-animation-duration, 1s);\n          animation-duration: var(--fa-animation-duration, 1s);\n  -webkit-animation-iteration-count: var(--fa-animation-iteration-count, infinite);\n          animation-iteration-count: var(--fa-animation-iteration-count, infinite);\n  -webkit-animation-timing-function: var(--fa-animation-timing, linear);\n          animation-timing-function: var(--fa-animation-timing, linear);\n}\n\n.fa-spin {\n  -webkit-animation-name: fa-spin;\n          animation-name: fa-spin;\n  -webkit-animation-delay: var(--fa-animation-delay, 0);\n          animation-delay: var(--fa-animation-delay, 0);\n  -webkit-animation-direction: var(--fa-animation-direction, normal);\n          animation-direction: var(--fa-animation-direction, normal);\n  -webkit-animation-duration: var(--fa-animation-duration, 2s);\n          animation-duration: var(--fa-animation-duration, 2s);\n  -webkit-animation-iteration-count: var(--fa-animation-iteration-count, infinite);\n          animation-iteration-count: var(--fa-animation-iteration-count, infinite);\n  -webkit-animation-timing-function: var(--fa-animation-timing, linear);\n          animation-timing-function: var(--fa-animation-timing, linear);\n}\n\n.fa-spin-reverse {\n  --fa-animation-direction: reverse;\n}\n\n.fa-pulse,\n.fa-spin-pulse {\n  -webkit-animation-name: fa-spin;\n          animation-name: fa-spin;\n  -webkit-animation-direction: var(--fa-animation-direction, normal);\n          animation-direction: var(--fa-animation-direction, normal);\n  -webkit-animation-duration: var(--fa-animation-duration, 1s);\n          animation-duration: var(--fa-animation-duration, 1s);\n  -webkit-animation-iteration-count: var(--fa-animation-iteration-count, infinite);\n          animation-iteration-count: var(--fa-animation-iteration-count, infinite);\n  -webkit-animation-timing-function: var(--fa-animation-timing, steps(8));\n          animation-timing-function: var(--fa-animation-timing, steps(8));\n}\n\n@media (prefers-reduced-motion: reduce) {\n  .fa-beat,\n.fa-bounce,\n.fa-fade,\n.fa-beat-fade,\n.fa-flip,\n.fa-pulse,\n.fa-shake,\n.fa-spin,\n.fa-spin-pulse {\n    -webkit-animation-delay: -1ms;\n            animation-delay: -1ms;\n    -webkit-animation-duration: 1ms;\n            animation-duration: 1ms;\n    -webkit-animation-iteration-count: 1;\n            animation-iteration-count: 1;\n    transition-delay: 0s;\n    transition-duration: 0s;\n  }\n}\n@-webkit-keyframes fa-beat {\n  0%, 90% {\n    -webkit-transform: scale(1);\n            transform: scale(1);\n  }\n  45% {\n    -webkit-transform: scale(var(--fa-beat-scale, 1.25));\n            transform: scale(var(--fa-beat-scale, 1.25));\n  }\n}\n@keyframes fa-beat {\n  0%, 90% {\n    -webkit-transform: scale(1);\n            transform: scale(1);\n  }\n  45% {\n    -webkit-transform: scale(var(--fa-beat-scale, 1.25));\n            transform: scale(var(--fa-beat-scale, 1.25));\n  }\n}\n@-webkit-keyframes fa-bounce {\n  0% {\n    -webkit-transform: scale(1, 1) translateY(0);\n            transform: scale(1, 1) translateY(0);\n  }\n  10% {\n    -webkit-transform: scale(var(--fa-bounce-start-scale-x, 1.1), var(--fa-bounce-start-scale-y, 0.9)) translateY(0);\n            transform: scale(var(--fa-bounce-start-scale-x, 1.1), var(--fa-bounce-start-scale-y, 0.9)) translateY(0);\n  }\n  30% {\n    -webkit-transform: scale(var(--fa-bounce-jump-scale-x, 0.9), var(--fa-bounce-jump-scale-y, 1.1)) translateY(var(--fa-bounce-height, -0.5em));\n            transform: scale(var(--fa-bounce-jump-scale-x, 0.9), var(--fa-bounce-jump-scale-y, 1.1)) translateY(var(--fa-bounce-height, -0.5em));\n  }\n  50% {\n    -webkit-transform: scale(var(--fa-bounce-land-scale-x, 1.05), var(--fa-bounce-land-scale-y, 0.95)) translateY(0);\n            transform: scale(var(--fa-bounce-land-scale-x, 1.05), var(--fa-bounce-land-scale-y, 0.95)) translateY(0);\n  }\n  57% {\n    -webkit-transform: scale(1, 1) translateY(var(--fa-bounce-rebound, -0.125em));\n            transform: scale(1, 1) translateY(var(--fa-bounce-rebound, -0.125em));\n  }\n  64% {\n    -webkit-transform: scale(1, 1) translateY(0);\n            transform: scale(1, 1) translateY(0);\n  }\n  100% {\n    -webkit-transform: scale(1, 1) translateY(0);\n            transform: scale(1, 1) translateY(0);\n  }\n}\n@keyframes fa-bounce {\n  0% {\n    -webkit-transform: scale(1, 1) translateY(0);\n            transform: scale(1, 1) translateY(0);\n  }\n  10% {\n    -webkit-transform: scale(var(--fa-bounce-start-scale-x, 1.1), var(--fa-bounce-start-scale-y, 0.9)) translateY(0);\n            transform: scale(var(--fa-bounce-start-scale-x, 1.1), var(--fa-bounce-start-scale-y, 0.9)) translateY(0);\n  }\n  30% {\n    -webkit-transform: scale(var(--fa-bounce-jump-scale-x, 0.9), var(--fa-bounce-jump-scale-y, 1.1)) translateY(var(--fa-bounce-height, -0.5em));\n            transform: scale(var(--fa-bounce-jump-scale-x, 0.9), var(--fa-bounce-jump-scale-y, 1.1)) translateY(var(--fa-bounce-height, -0.5em));\n  }\n  50% {\n    -webkit-transform: scale(var(--fa-bounce-land-scale-x, 1.05), var(--fa-bounce-land-scale-y, 0.95)) translateY(0);\n            transform: scale(var(--fa-bounce-land-scale-x, 1.05), var(--fa-bounce-land-scale-y, 0.95)) translateY(0);\n  }\n  57% {\n    -webkit-transform: scale(1, 1) translateY(var(--fa-bounce-rebound, -0.125em));\n            transform: scale(1, 1) translateY(var(--fa-bounce-rebound, -0.125em));\n  }\n  64% {\n    -webkit-transform: scale(1, 1) translateY(0);\n            transform: scale(1, 1) translateY(0);\n  }\n  100% {\n    -webkit-transform: scale(1, 1) translateY(0);\n            transform: scale(1, 1) translateY(0);\n  }\n}\n@-webkit-keyframes fa-fade {\n  50% {\n    opacity: var(--fa-fade-opacity, 0.4);\n  }\n}\n@keyframes fa-fade {\n  50% {\n    opacity: var(--fa-fade-opacity, 0.4);\n  }\n}\n@-webkit-keyframes fa-beat-fade {\n  0%, 100% {\n    opacity: var(--fa-beat-fade-opacity, 0.4);\n    -webkit-transform: scale(1);\n            transform: scale(1);\n  }\n  50% {\n    opacity: 1;\n    -webkit-transform: scale(var(--fa-beat-fade-scale, 1.125));\n            transform: scale(var(--fa-beat-fade-scale, 1.125));\n  }\n}\n@keyframes fa-beat-fade {\n  0%, 100% {\n    opacity: var(--fa-beat-fade-opacity, 0.4);\n    -webkit-transform: scale(1);\n            transform: scale(1);\n  }\n  50% {\n    opacity: 1;\n    -webkit-transform: scale(var(--fa-beat-fade-scale, 1.125));\n            transform: scale(var(--fa-beat-fade-scale, 1.125));\n  }\n}\n@-webkit-keyframes fa-flip {\n  50% {\n    -webkit-transform: rotate3d(var(--fa-flip-x, 0), var(--fa-flip-y, 1), var(--fa-flip-z, 0), var(--fa-flip-angle, -180deg));\n            transform: rotate3d(var(--fa-flip-x, 0), var(--fa-flip-y, 1), var(--fa-flip-z, 0), var(--fa-flip-angle, -180deg));\n  }\n}\n@keyframes fa-flip {\n  50% {\n    -webkit-transform: rotate3d(var(--fa-flip-x, 0), var(--fa-flip-y, 1), var(--fa-flip-z, 0), var(--fa-flip-angle, -180deg));\n            transform: rotate3d(var(--fa-flip-x, 0), var(--fa-flip-y, 1), var(--fa-flip-z, 0), var(--fa-flip-angle, -180deg));\n  }\n}\n@-webkit-keyframes fa-shake {\n  0% {\n    -webkit-transform: rotate(-15deg);\n            transform: rotate(-15deg);\n  }\n  4% {\n    -webkit-transform: rotate(15deg);\n            transform: rotate(15deg);\n  }\n  8%, 24% {\n    -webkit-transform: rotate(-18deg);\n            transform: rotate(-18deg);\n  }\n  12%, 28% {\n    -webkit-transform: rotate(18deg);\n            transform: rotate(18deg);\n  }\n  16% {\n    -webkit-transform: rotate(-22deg);\n            transform: rotate(-22deg);\n  }\n  20% {\n    -webkit-transform: rotate(22deg);\n            transform: rotate(22deg);\n  }\n  32% {\n    -webkit-transform: rotate(-12deg);\n            transform: rotate(-12deg);\n  }\n  36% {\n    -webkit-transform: rotate(12deg);\n            transform: rotate(12deg);\n  }\n  40%, 100% {\n    -webkit-transform: rotate(0deg);\n            transform: rotate(0deg);\n  }\n}\n@keyframes fa-shake {\n  0% {\n    -webkit-transform: rotate(-15deg);\n            transform: rotate(-15deg);\n  }\n  4% {\n    -webkit-transform: rotate(15deg);\n            transform: rotate(15deg);\n  }\n  8%, 24% {\n    -webkit-transform: rotate(-18deg);\n            transform: rotate(-18deg);\n  }\n  12%, 28% {\n    -webkit-transform: rotate(18deg);\n            transform: rotate(18deg);\n  }\n  16% {\n    -webkit-transform: rotate(-22deg);\n            transform: rotate(-22deg);\n  }\n  20% {\n    -webkit-transform: rotate(22deg);\n            transform: rotate(22deg);\n  }\n  32% {\n    -webkit-transform: rotate(-12deg);\n            transform: rotate(-12deg);\n  }\n  36% {\n    -webkit-transform: rotate(12deg);\n            transform: rotate(12deg);\n  }\n  40%, 100% {\n    -webkit-transform: rotate(0deg);\n            transform: rotate(0deg);\n  }\n}\n@-webkit-keyframes fa-spin {\n  0% {\n    -webkit-transform: rotate(0deg);\n            transform: rotate(0deg);\n  }\n  100% {\n    -webkit-transform: rotate(360deg);\n            transform: rotate(360deg);\n  }\n}\n@keyframes fa-spin {\n  0% {\n    -webkit-transform: rotate(0deg);\n            transform: rotate(0deg);\n  }\n  100% {\n    -webkit-transform: rotate(360deg);\n            transform: rotate(360deg);\n  }\n}\n.fa-rotate-90 {\n  -webkit-transform: rotate(90deg);\n          transform: rotate(90deg);\n}\n\n.fa-rotate-180 {\n  -webkit-transform: rotate(180deg);\n          transform: rotate(180deg);\n}\n\n.fa-rotate-270 {\n  -webkit-transform: rotate(270deg);\n          transform: rotate(270deg);\n}\n\n.fa-flip-horizontal {\n  -webkit-transform: scale(-1, 1);\n          transform: scale(-1, 1);\n}\n\n.fa-flip-vertical {\n  -webkit-transform: scale(1, -1);\n          transform: scale(1, -1);\n}\n\n.fa-flip-both,\n.fa-flip-horizontal.fa-flip-vertical {\n  -webkit-transform: scale(-1, -1);\n          transform: scale(-1, -1);\n}\n\n.fa-rotate-by {\n  -webkit-transform: rotate(var(--fa-rotate-angle, none));\n          transform: rotate(var(--fa-rotate-angle, none));\n}\n\n.fa-stack {\n  display: inline-block;\n  vertical-align: middle;\n  height: 2em;\n  position: relative;\n  width: 2.5em;\n}\n\n.fa-stack-1x,\n.fa-stack-2x {\n  bottom: 0;\n  left: 0;\n  margin: auto;\n  position: absolute;\n  right: 0;\n  top: 0;\n  z-index: var(--fa-stack-z-index, auto);\n}\n\n.svg-inline--fa.fa-stack-1x {\n  height: 1em;\n  width: 1.25em;\n}\n.svg-inline--fa.fa-stack-2x {\n  height: 2em;\n  width: 2.5em;\n}\n\n.fa-inverse {\n  color: var(--fa-inverse, #fff);\n}\n\n.sr-only,\n.fa-sr-only {\n  position: absolute;\n  width: 1px;\n  height: 1px;\n  padding: 0;\n  margin: -1px;\n  overflow: hidden;\n  clip: rect(0, 0, 0, 0);\n  white-space: nowrap;\n  border-width: 0;\n}\n\n.sr-only-focusable:not(:focus),\n.fa-sr-only-focusable:not(:focus) {\n  position: absolute;\n  width: 1px;\n  height: 1px;\n  padding: 0;\n  margin: -1px;\n  overflow: hidden;\n  clip: rect(0, 0, 0, 0);\n  white-space: nowrap;\n  border-width: 0;\n}\n\n.svg-inline--fa .fa-primary {\n  fill: var(--fa-primary-color, currentColor);\n  opacity: var(--fa-primary-opacity, 1);\n}\n\n.svg-inline--fa .fa-secondary {\n  fill: var(--fa-secondary-color, currentColor);\n  opacity: var(--fa-secondary-opacity, 0.4);\n}\n\n.svg-inline--fa.fa-swap-opacity .fa-primary {\n  opacity: var(--fa-secondary-opacity, 0.4);\n}\n\n.svg-inline--fa.fa-swap-opacity .fa-secondary {\n  opacity: var(--fa-primary-opacity, 1);\n}\n\n.svg-inline--fa mask .fa-primary,\n.svg-inline--fa mask .fa-secondary {\n  fill: black;\n}\n\n.fad.fa-inverse,\n.fa-duotone.fa-inverse {\n  color: var(--fa-inverse, #fff);\n}';if(i!==e||n!==t){var r=new RegExp("\\.".concat(e,"\\-"),"g"),o=new RegExp("\\--".concat(e,"\\-"),"g"),a=new RegExp("\\.".concat(t),"g");s=s.replace(r,".".concat(i,"-")).replace(o,"--".concat(i,"-")).replace(a,".".concat(n))}return s}var le=!1;function ce(){Z.autoAddCss&&!le&&(function(e){if(e&&x){var t=b.createElement("style");t.setAttribute("type","text/css"),t.innerHTML=e;for(var i=b.head.childNodes,n=null,s=i.length-1;s>-1;s--){var r=i[s],o=(r.tagName||"").toUpperCase();["STYLE","LINK"].indexOf(o)>-1&&(n=r)}b.head.insertBefore(t,n)}}(ae()),le=!0)}var he={mixout:function(){return{dom:{css:ae,insertCss:ce}}},hooks:function(){return{beforeDOMElementCreation:function(){ce()},beforeI2svg:function(){ce()}}}},de=C||{};de[M]||(de[M]={}),de[M].styles||(de[M].styles={}),de[M].hooks||(de[M].hooks={}),de[M].shims||(de[M].shims=[]);var ue=de[M],pe=[],ge=!1;function fe(e){var t=e.tag,i=e.attributes,n=void 0===i?{}:i,s=e.children,r=void 0===s?[]:s;return"string"==typeof e?se(e):"<".concat(t," ").concat(function(e){return Object.keys(e||{}).reduce(function(t,i){return t+"".concat(i,'="').concat(se(e[i]),'" ')},"").trim()}(n),">").concat(r.map(fe).join(""),"</").concat(t,">")}function me(e,t,i){if(e&&e[t]&&e[t][i])return{prefix:t,iconName:i,icon:e[t][i]}}x&&((ge=(b.documentElement.doScroll?/^loaded|^c/:/^loaded|^i|^c/).test(b.readyState))||b.addEventListener("DOMContentLoaded",function e(){b.removeEventListener("DOMContentLoaded",e),ge=1,pe.map(function(e){return e()})}));var ve=function(e,t,i,n){var s,r,o,a=Object.keys(e),l=a.length,c=void 0!==n?function(e,t){return function(i,n,s,r){return e.call(t,i,n,s,r)}}(t,n):t;for(void 0===i?(s=1,o=e[a[0]]):(s=0,o=i);s<l;s++)o=c(o,e[r=a[s]],r,e);return o};function ye(e){var t=function(e){for(var t=[],i=0,n=e.length;i<n;){var s=e.charCodeAt(i++);if(s>=55296&&s<=56319&&i<n){var r=e.charCodeAt(i++);56320==(64512&r)?t.push(((1023&s)<<10)+(1023&r)+65536):(t.push(s),i--)}else t.push(s)}return t}(e);return 1===t.length?t[0].toString(16):null}function Ce(e){return Object.keys(e).reduce(function(t,i){var n=e[i];return n.icon?t[n.iconName]=n.icon:t[i]=n,t},{})}function be(e,t){var i=(arguments.length>2&&void 0!==arguments[2]?arguments[2]:{}).skipHooks,n=void 0!==i&&i,r=Ce(t);"function"!=typeof ue.hooks.addPack||n?ue.styles[e]=s(s({},ue.styles[e]||{}),r):ue.hooks.addPack(e,Ce(t)),"fas"===e&&be("fa",t)}var Se=ue.styles,we=ue.shims,xe=Object.values(_),Ee=null,Me={},Ae={},Te={},De={},Ie={},Re=Object.keys(N);var Le,ke=function(){var e=function(e){return ve(Se,function(t,i,n){return t[n]=ve(i,e,{}),t},{})};Me=e(function(e,t,i){return t[3]&&(e[t[3]]=i),t[2]&&t[2].filter(function(e){return"number"==typeof e}).forEach(function(t){e[t.toString(16)]=i}),e}),Ae=e(function(e,t,i){return e[i]=i,t[2]&&t[2].filter(function(e){return"string"==typeof e}).forEach(function(t){e[t]=i}),e}),Ie=e(function(e,t,i){var n=t[2];return e[i]=i,n.forEach(function(t){e[t]=i}),e});var t="far"in Se||Z.autoFetchSvg,i=ve(we,function(e,i){var n=i[0],s=i[1],r=i[2];return"far"!==s||t||(s="fas"),"string"==typeof n&&(e.names[n]={prefix:s,iconName:r}),"number"==typeof n&&(e.unicodes[n.toString(16)]={prefix:s,iconName:r}),e},{names:{},unicodes:{}});Te=i.names,De=i.unicodes,Ee=Fe(Z.styleDefault)};function Pe(e,t){return(Me[e]||{})[t]}function Ne(e,t){return(Ie[e]||{})[t]}function Oe(e){return Te[e]||{prefix:null,iconName:null}}function _e(){return Ee}function Fe(e){var t=O[e]||O[N[e]],i=e in ue.styles?e:null;return t||i||null}function Ge(e){var t=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).skipLookups,i=void 0!==t&&t,n=null,s=e.reduce(function(e,t){var s=function(e,t){var i,n=t.split("-"),s=n[0],r=n.slice(1).join("-");return s!==e||""===r||(i=r,~Y.indexOf(i))?null:r}(Z.familyPrefix,t);if(Se[t]?(t=xe.includes(t)?F[t]:t,n=t,e.prefix=t):Re.indexOf(t)>-1?(n=t,e.prefix=Fe(t)):s?e.iconName=s:t!==Z.replacementClass&&e.rest.push(t),!i&&e.prefix&&e.iconName){var r="fa"===n?Oe(e.iconName):{},o=Ne(e.prefix,e.iconName);r.prefix&&(n=null),e.iconName=r.iconName||o||e.iconName,e.prefix=r.prefix||e.prefix,"far"!==e.prefix||Se.far||!Se.fas||Z.autoFetchSvg||(e.prefix="fas")}return e},{prefix:null,iconName:null,rest:[]});return"fa"!==s.prefix&&"fa"!==n||(s.prefix=_e()||"fas"),s}Le=function(e){Ee=Fe(e.styleDefault)},Q.push(Le),ke();var Ve=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.definitions={}}var t,i;return t=e,i=[{key:"add",value:function(){for(var e=this,t=arguments.length,i=new Array(t),n=0;n<t;n++)i[n]=arguments[n];var r=i.reduce(this._pullDefinitions,{});Object.keys(r).forEach(function(t){e.definitions[t]=s(s({},e.definitions[t]||{}),r[t]),be(t,r[t]);var i=_[t];i&&be(i,r[t]),ke()})}},{key:"reset",value:function(){this.definitions={}}},{key:"_pullDefinitions",value:function(e,t){var i=t.prefix&&t.iconName&&t.icon?{0:t}:t;return Object.keys(i).map(function(t){var n=i[t],s=n.prefix,r=n.iconName,o=n.icon,a=o[2];e[s]||(e[s]={}),a.length>0&&a.forEach(function(t){"string"==typeof t&&(e[s][t]=o)}),e[s][r]=o}),e}}],i&&o(t.prototype,i),Object.defineProperty(t,"prototype",{writable:!1}),e}(),Be=[],He={},ze={},Ue=Object.keys(ze);function We(e,t){for(var i=arguments.length,n=new Array(i>2?i-2:0),s=2;s<i;s++)n[s-2]=arguments[s];return(He[e]||[]).forEach(function(e){t=e.apply(null,[t].concat(n))}),t}function je(e){for(var t=arguments.length,i=new Array(t>1?t-1:0),n=1;n<t;n++)i[n-1]=arguments[n];(He[e]||[]).forEach(function(e){e.apply(null,i)})}function Ke(){var e=arguments[0],t=Array.prototype.slice.call(arguments,1);return ze[e]?ze[e].apply(null,t):void 0}function $e(e){"fa"===e.prefix&&(e.prefix="fas");var t=e.iconName,i=e.prefix||_e();if(t)return t=Ne(i,t)||t,me(Ye.definitions,i,t)||me(ue.styles,i,t)}var Ye=new Ve,qe={i2svg:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return x?(je("beforeI2svg",e),Ke("pseudoElements2svg",e),Ke("i2svg",e)):Promise.reject("Operation requires a DOM of some kind.")},watch:function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},i=t.autoReplaceSvgRoot;!1===Z.autoReplaceSvg&&(Z.autoReplaceSvg=!0),Z.observeMutations=!0,e=function(){Ze({autoReplaceSvgRoot:i}),je("watch",t)},x&&(ge?setTimeout(e,0):pe.push(e))}},Xe={noAuto:function(){Z.autoReplaceSvg=!1,Z.observeMutations=!1,je("noAuto")},config:Z,dom:qe,parse:{icon:function(e){if(null===e)return null;if("object"===r(e)&&e.prefix&&e.iconName)return{prefix:e.prefix,iconName:Ne(e.prefix,e.iconName)||e.iconName};if(Array.isArray(e)&&2===e.length){var t=0===e[1].indexOf("fa-")?e[1].slice(3):e[1],i=Fe(e[0]);return{prefix:i,iconName:Ne(i,t)||t}}if("string"==typeof e&&(e.indexOf("".concat(Z.familyPrefix,"-"))>-1||e.match(G))){var n=Ge(e.split(" "),{skipLookups:!0});return{prefix:n.prefix||_e(),iconName:Ne(n.prefix,n.iconName)||n.iconName}}if("string"==typeof e){var s=_e();return{prefix:s,iconName:Ne(s,e)||e}}}},library:Ye,findIconDefinition:$e,toHtml:fe},Ze=function(){var e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).autoReplaceSvgRoot,t=void 0===e?b:e;(Object.keys(ue.styles).length>0||Z.autoFetchSvg)&&x&&Z.autoReplaceSvg&&Xe.dom.i2svg({node:t})};function Qe(e,t){return Object.defineProperty(e,"abstract",{get:t}),Object.defineProperty(e,"html",{get:function(){return e.abstract.map(function(e){return fe(e)})}}),Object.defineProperty(e,"node",{get:function(){if(x){var t=b.createElement("div");return t.innerHTML=e.html,t.children}}}),e}function Je(e){var t=e.icons,i=t.main,n=t.mask,r=e.prefix,o=e.iconName,a=e.transform,l=e.symbol,c=e.title,h=e.maskId,d=e.titleId,u=e.extra,p=e.watchable,g=void 0!==p&&p,f=n.found?n:i,m=f.width,v=f.height,y="fak"===r,C=[Z.replacementClass,o?"".concat(Z.familyPrefix,"-").concat(o):""].filter(function(e){return-1===u.classes.indexOf(e)}).filter(function(e){return""!==e||!!e}).concat(u.classes).join(" "),b={children:[],attributes:s(s({},u.attributes),{},{"data-prefix":r,"data-icon":o,class:C,role:u.attributes.role||"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 ".concat(m," ").concat(v)})},S=y&&!~u.classes.indexOf("fa-fw")?{width:"".concat(m/v*16*.0625,"em")}:{};g&&(b.attributes[T]=""),c&&(b.children.push({tag:"title",attributes:{id:b.attributes["aria-labelledby"]||"title-".concat(d||te())},children:[c]}),delete b.attributes.title);var w=s(s({},b),{},{prefix:r,iconName:o,main:i,mask:n,maskId:h,transform:a,symbol:l,styles:s(s({},S),u.styles)}),x=n.found&&i.found?Ke("generateAbstractMask",w)||{children:[],attributes:{}}:Ke("generateAbstractIcon",w)||{children:[],attributes:{}},E=x.children,M=x.attributes;return w.children=E,w.attributes=M,l?function(e){var t=e.prefix,i=e.iconName,n=e.children,r=e.attributes,o=e.symbol,a=!0===o?"".concat(t,"-").concat(Z.familyPrefix,"-").concat(i):o;return[{tag:"svg",attributes:{style:"display: none;"},children:[{tag:"symbol",attributes:s(s({},r),{},{id:a}),children:n}]}]}(w):function(e){var t=e.children,i=e.main,n=e.mask,r=e.attributes,o=e.styles,a=e.transform;if(oe(a)&&i.found&&!n.found){var l={x:i.width/i.height/2,y:.5};r.style=re(s(s({},o),{},{"transform-origin":"".concat(l.x+a.x/16,"em ").concat(l.y+a.y/16,"em")}))}return[{tag:"svg",attributes:r,children:t}]}(w)}function et(e){var t=e.content,i=e.width,n=e.height,r=e.transform,o=e.title,a=e.extra,l=e.watchable,c=void 0!==l&&l,h=s(s(s({},a.attributes),o?{title:o}:{}),{},{class:a.classes.join(" ")});c&&(h[T]="");var d=s({},a.styles);oe(r)&&(d.transform=function(e){var t=e.transform,i=e.width,n=void 0===i?16:i,s=e.height,r=void 0===s?16:s,o=e.startCentered,a=void 0!==o&&o,l="";return l+=a&&E?"translate(".concat(t.x/J-n/2,"em, ").concat(t.y/J-r/2,"em) "):a?"translate(calc(-50% + ".concat(t.x/J,"em), calc(-50% + ").concat(t.y/J,"em)) "):"translate(".concat(t.x/J,"em, ").concat(t.y/J,"em) "),(l+="scale(".concat(t.size/J*(t.flipX?-1:1),", ").concat(t.size/J*(t.flipY?-1:1),") "))+"rotate(".concat(t.rotate,"deg) ")}({transform:r,startCentered:!0,width:i,height:n}),d["-webkit-transform"]=d.transform);var u=re(d);u.length>0&&(h.style=u);var p=[];return p.push({tag:"span",attributes:h,children:[t]}),o&&p.push({tag:"span",attributes:{class:"sr-only"},children:[o]}),p}var tt=ue.styles;function it(e){var t=e[0],i=e[1],n=l(e.slice(4),1)[0];return{found:!0,width:t,height:i,icon:Array.isArray(n)?{tag:"g",attributes:{class:"".concat(Z.familyPrefix,"-").concat(j)},children:[{tag:"path",attributes:{class:"".concat(Z.familyPrefix,"-").concat($),fill:"currentColor",d:n[0]}},{tag:"path",attributes:{class:"".concat(Z.familyPrefix,"-").concat(K),fill:"currentColor",d:n[1]}}]}:{tag:"path",attributes:{fill:"currentColor",d:n}}}}var nt={found:!1,width:512,height:512};function st(e,t){var i=t;return"fa"===t&&null!==Z.styleDefault&&(t=_e()),new Promise(function(n,r){if(Ke("missingIconAbstract"),"fa"===i){var o=Oe(e)||{};e=o.iconName||e,t=o.prefix||t}if(e&&t&&tt[t]&&tt[t][e])return n(it(tt[t][e]));!function(e,t){P||Z.showMissingIcons||!e||console.error('Icon with name "'.concat(e,'" and prefix "').concat(t,'" is missing.'))}(e,t),n(s(s({},nt),{},{icon:Z.showMissingIcons&&e&&Ke("missingIconAbstract")||{}}))})}var rt=function(){},ot=Z.measurePerformance&&w&&w.mark&&w.measure?w:{mark:rt,measure:rt},at='FA "6.0.0"',lt=function(e){return ot.mark("".concat(at," ").concat(e," begins")),function(){return function(e){ot.mark("".concat(at," ").concat(e," ends")),ot.measure("".concat(at," ").concat(e),"".concat(at," ").concat(e," begins"),"".concat(at," ").concat(e," ends"))}(e)}},ct=function(){};function ht(e){return"string"==typeof(e.getAttribute?e.getAttribute(T):null)}function dt(e){return b.createElementNS("http://www.w3.org/2000/svg",e)}function ut(e){return b.createElement(e)}function pt(e){var t=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).ceFn,i=void 0===t?"svg"===e.tag?dt:ut:t;if("string"==typeof e)return b.createTextNode(e);var n=i(e.tag);return Object.keys(e.attributes||[]).forEach(function(t){n.setAttribute(t,e.attributes[t])}),(e.children||[]).forEach(function(e){n.appendChild(pt(e,{ceFn:i}))}),n}var gt={replace:function(e){var t=e[0];if(t.parentNode)if(e[1].forEach(function(e){t.parentNode.insertBefore(pt(e),t)}),null===t.getAttribute(T)&&Z.keepOriginalSource){var i=b.createComment(function(e){var t=" ".concat(e.outerHTML," ");return"".concat(t,"Font Awesome fontawesome.com ")}(t));t.parentNode.replaceChild(i,t)}else t.remove()},nest:function(e){var t=e[0],i=e[1];if(~ne(t).indexOf(Z.replacementClass))return gt.replace(e);var n=new RegExp("".concat(Z.familyPrefix,"-.*"));if(delete i[0].attributes.id,i[0].attributes.class){var s=i[0].attributes.class.split(" ").reduce(function(e,t){return t===Z.replacementClass||t.match(n)?e.toSvg.push(t):e.toNode.push(t),e},{toNode:[],toSvg:[]});i[0].attributes.class=s.toSvg.join(" "),0===s.toNode.length?t.removeAttribute("class"):t.setAttribute("class",s.toNode.join(" "))}var r=i.map(function(e){return fe(e)}).join("\n");t.setAttribute(T,""),t.innerHTML=r}};function ft(e){e()}function mt(e,t){var i="function"==typeof t?t:ct;if(0===e.length)i();else{var n=ft;"async"===Z.mutateApproach&&(n=C.requestAnimationFrame||ft),n(function(){var t=!0===Z.autoReplaceSvg?gt.replace:gt[Z.autoReplaceSvg]||gt.replace,n=lt("mutate");e.map(t),n(),i()})}}var vt=!1;function yt(){vt=!0}function Ct(){vt=!1}var bt=null;function St(e){if(S&&Z.observeMutations){var t=e.treeCallback,i=void 0===t?ct:t,n=e.nodeCallback,s=void 0===n?ct:n,r=e.pseudoElementsCallback,o=void 0===r?ct:r,a=e.observeMutationsRoot,l=void 0===a?b:a;bt=new S(function(e){if(!vt){var t=_e();ie(e).forEach(function(e){if("childList"===e.type&&e.addedNodes.length>0&&!ht(e.addedNodes[0])&&(Z.searchPseudoElements&&o(e.target),i(e.target)),"attributes"===e.type&&e.target.parentNode&&Z.searchPseudoElements&&o(e.target.parentNode),"attributes"===e.type&&ht(e.target)&&~W.indexOf(e.attributeName))if("class"===e.attributeName&&function(e){var t=e.getAttribute?e.getAttribute(I):null,i=e.getAttribute?e.getAttribute(R):null;return t&&i}(e.target)){var n=Ge(ne(e.target)),r=n.prefix,a=n.iconName;e.target.setAttribute(I,r||t),a&&e.target.setAttribute(R,a)}else(l=e.target)&&l.classList&&l.classList.contains&&l.classList.contains(Z.replacementClass)&&s(e.target);var l})}}),x&&bt.observe(l,{childList:!0,attributes:!0,characterData:!0,subtree:!0})}}function wt(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{styleParser:!0},i=function(e){var t,i,n=e.getAttribute("data-prefix"),s=e.getAttribute("data-icon"),r=void 0!==e.innerText?e.innerText.trim():"",o=Ge(ne(e));return o.prefix||(o.prefix=_e()),n&&s&&(o.prefix=n,o.iconName=s),o.iconName&&o.prefix||o.prefix&&r.length>0&&(o.iconName=(t=o.prefix,i=e.innerText,(Ae[t]||{})[i]||Pe(o.prefix,ye(e.innerText)))),o}(e),n=i.iconName,r=i.prefix,o=i.rest,a=function(e){var t=ie(e.attributes).reduce(function(e,t){return"class"!==e.name&&"style"!==e.name&&(e[t.name]=t.value),e},{}),i=e.getAttribute("title"),n=e.getAttribute("data-fa-title-id");return Z.autoA11y&&(i?t["aria-labelledby"]="".concat(Z.replacementClass,"-title-").concat(n||te()):(t["aria-hidden"]="true",t.focusable="false")),t}(e),l=We("parseNodeAttributes",{},e),c=t.styleParser?function(e){var t=e.getAttribute("style"),i=[];return t&&(i=t.split(";").reduce(function(e,t){var i=t.split(":"),n=i[0],s=i.slice(1);return n&&s.length>0&&(e[n]=s.join(":").trim()),e},{})),i}(e):[];return s({iconName:n,title:e.getAttribute("title"),titleId:e.getAttribute("data-fa-title-id"),prefix:r,transform:ee,mask:{iconName:null,prefix:null,rest:[]},maskId:null,symbol:!1,extra:{classes:o,styles:c,attributes:a}},l)}var xt=ue.styles;function Et(e){var t="nest"===Z.autoReplaceSvg?wt(e,{styleParser:!1}):wt(e);return~t.extra.classes.indexOf(V)?Ke("generateLayersText",e,t):Ke("generateSvgReplacementMutation",e,t)}function Mt(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if(!x)return Promise.resolve();var i=b.documentElement.classList,n=function(e){return i.add("".concat(L,"-").concat(e))},s=function(e){return i.remove("".concat(L,"-").concat(e))},r=Z.autoFetchSvg?Object.keys(N):Object.keys(xt),o=[".".concat(V,":not([").concat(T,"])")].concat(r.map(function(e){return".".concat(e,":not([").concat(T,"])")})).join(", ");if(0===o.length)return Promise.resolve();var a=[];try{a=ie(e.querySelectorAll(o))}catch(e){}if(!(a.length>0))return Promise.resolve();n("pending"),s("complete");var l=lt("onTree"),c=a.reduce(function(e,t){try{var i=Et(t);i&&e.push(i)}catch(e){P||"MissingIcon"===e.name&&console.error(e)}return e},[]);return new Promise(function(e,i){Promise.all(c).then(function(i){mt(i,function(){n("active"),n("complete"),s("pending"),"function"==typeof t&&t(),l(),e()})}).catch(function(e){l(),i(e)})})}function At(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;Et(e).then(function(e){e&&mt([e],t)})}var Tt=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=t.transform,n=void 0===i?ee:i,r=t.symbol,o=void 0!==r&&r,a=t.mask,l=void 0===a?null:a,c=t.maskId,h=void 0===c?null:c,d=t.title,u=void 0===d?null:d,p=t.titleId,g=void 0===p?null:p,f=t.classes,m=void 0===f?[]:f,v=t.attributes,y=void 0===v?{}:v,C=t.styles,b=void 0===C?{}:C;if(e){var S=e.prefix,w=e.iconName,x=e.icon;return Qe(s({type:"icon"},e),function(){return je("beforeDOMElementCreation",{iconDefinition:e,params:t}),Z.autoA11y&&(u?y["aria-labelledby"]="".concat(Z.replacementClass,"-title-").concat(g||te()):(y["aria-hidden"]="true",y.focusable="false")),Je({icons:{main:it(x),mask:l?it(l.icon):{found:!1,width:null,height:null,icon:{}}},prefix:S,iconName:w,transform:s(s({},ee),n),symbol:o,title:u,maskId:h,titleId:g,extra:{attributes:y,styles:b,classes:m}})})}},Dt={mixout:function(){return{icon:(e=Tt,function(t){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=(t||{}).icon?t:$e(t||{}),r=i.mask;return r&&(r=(r||{}).icon?r:$e(r||{})),e(n,s(s({},i),{},{mask:r}))})};var e},hooks:function(){return{mutationObserverCallbacks:function(e){return e.treeCallback=Mt,e.nodeCallback=At,e}}},provides:function(e){e.i2svg=function(e){var t=e.node,i=void 0===t?b:t,n=e.callback;return Mt(i,void 0===n?function(){}:n)},e.generateSvgReplacementMutation=function(e,t){var i=t.iconName,n=t.title,s=t.titleId,r=t.prefix,o=t.transform,a=t.symbol,c=t.mask,h=t.maskId,d=t.extra;return new Promise(function(t,u){Promise.all([st(i,r),c.iconName?st(c.iconName,c.prefix):Promise.resolve({found:!1,width:512,height:512,icon:{}})]).then(function(c){var u=l(c,2),p=u[0],g=u[1];t([e,Je({icons:{main:p,mask:g},prefix:r,iconName:i,transform:o,symbol:a,maskId:h,title:n,titleId:s,extra:d,watchable:!0})])}).catch(u)})},e.generateAbstractIcon=function(e){var t,i=e.children,n=e.attributes,s=e.main,r=e.transform,o=re(e.styles);return o.length>0&&(n.style=o),oe(r)&&(t=Ke("generateAbstractTransformGrouping",{main:s,transform:r,containerWidth:s.width,iconWidth:s.width})),i.push(t||s.icon),{children:i,attributes:n}}}},It={mixout:function(){return{layer:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=t.classes,n=void 0===i?[]:i;return Qe({type:"layer"},function(){je("beforeDOMElementCreation",{assembler:e,params:t});var i=[];return e(function(e){Array.isArray(e)?e.map(function(e){i=i.concat(e.abstract)}):i=i.concat(e.abstract)}),[{tag:"span",attributes:{class:["".concat(Z.familyPrefix,"-layers")].concat(c(n)).join(" ")},children:i}]})}}}},Rt={mixout:function(){return{counter:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=t.title,n=void 0===i?null:i,r=t.classes,o=void 0===r?[]:r,a=t.attributes,l=void 0===a?{}:a,h=t.styles,d=void 0===h?{}:h;return Qe({type:"counter",content:e},function(){return je("beforeDOMElementCreation",{content:e,params:t}),function(e){var t=e.content,i=e.title,n=e.extra,r=s(s(s({},n.attributes),i?{title:i}:{}),{},{class:n.classes.join(" ")}),o=re(n.styles);o.length>0&&(r.style=o);var a=[];return a.push({tag:"span",attributes:r,children:[t]}),i&&a.push({tag:"span",attributes:{class:"sr-only"},children:[i]}),a}({content:e.toString(),title:n,extra:{attributes:l,styles:d,classes:["".concat(Z.familyPrefix,"-layers-counter")].concat(c(o))}})})}}}},Lt={mixout:function(){return{text:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=t.transform,n=void 0===i?ee:i,r=t.title,o=void 0===r?null:r,a=t.classes,l=void 0===a?[]:a,h=t.attributes,d=void 0===h?{}:h,u=t.styles,p=void 0===u?{}:u;return Qe({type:"text",content:e},function(){return je("beforeDOMElementCreation",{content:e,params:t}),et({content:e,transform:s(s({},ee),n),title:o,extra:{attributes:d,styles:p,classes:["".concat(Z.familyPrefix,"-layers-text")].concat(c(l))}})})}}},provides:function(e){e.generateLayersText=function(e,t){var i=t.title,n=t.transform,s=t.extra,r=null,o=null;if(E){var a=parseInt(getComputedStyle(e).fontSize,10),l=e.getBoundingClientRect();r=l.width/a,o=l.height/a}return Z.autoA11y&&!i&&(s.attributes["aria-hidden"]="true"),Promise.resolve([e,et({content:e.innerHTML,width:r,height:o,transform:n,title:i,extra:s,watchable:!0})])}}},kt=new RegExp('"',"ug"),Pt=[1105920,1112319];function Nt(e,t){var i="".concat("data-fa-pseudo-element-pending").concat(t.replace(":","-"));return new Promise(function(n,r){if(null!==e.getAttribute(i))return n();var o,a,l,c=ie(e.children).filter(function(e){return e.getAttribute(D)===t})[0],h=C.getComputedStyle(e,t),d=h.getPropertyValue("font-family").match(B),u=h.getPropertyValue("font-weight"),p=h.getPropertyValue("content");if(c&&!d)return e.removeChild(c),n();if(d&&"none"!==p&&""!==p){var g=h.getPropertyValue("content"),f=~["Solid","Regular","Light","Thin","Duotone","Brands","Kit"].indexOf(d[2])?O[d[2].toLowerCase()]:H[u],m=function(e){var t,i,n,s,r=e.replace(kt,""),o=(n=(t=r).length,(s=t.charCodeAt(0))>=55296&&s<=56319&&n>1&&(i=t.charCodeAt(1))>=56320&&i<=57343?1024*(s-55296)+i-56320+65536:s),a=o>=Pt[0]&&o<=Pt[1],l=2===r.length&&r[0]===r[1];return{value:ye(l?r[0]:r),isSecondary:a||l}}(g),v=m.value,y=m.isSecondary,S=d[0].startsWith("FontAwesome"),w=Pe(f,v),x=w;if(S){var E=(a=De[o=v],l=Pe("fas",o),a||(l?{prefix:"fas",iconName:l}:null)||{prefix:null,iconName:null});E.iconName&&E.prefix&&(w=E.iconName,f=E.prefix)}if(!w||y||c&&c.getAttribute(I)===f&&c.getAttribute(R)===x)n();else{e.setAttribute(i,x),c&&e.removeChild(c);var M={iconName:null,title:null,titleId:null,prefix:null,transform:ee,symbol:!1,mask:{iconName:null,prefix:null,rest:[]},maskId:null,extra:{classes:[],styles:{},attributes:{}}},A=M.extra;A.attributes[D]=t,st(w,f).then(function(r){var o=Je(s(s({},M),{},{icons:{main:r,mask:{prefix:null,iconName:null,rest:[]}},prefix:f,iconName:x,extra:A,watchable:!0})),a=b.createElement("svg");"::before"===t?e.insertBefore(a,e.firstChild):e.appendChild(a),a.outerHTML=o.map(function(e){return fe(e)}).join("\n"),e.removeAttribute(i),n()}).catch(r)}}else n()})}function Ot(e){return Promise.all([Nt(e,"::before"),Nt(e,"::after")])}function _t(e){return!(e.parentNode===document.head||~k.indexOf(e.tagName.toUpperCase())||e.getAttribute(D)||e.parentNode&&"svg"===e.parentNode.tagName)}function Ft(e){if(x)return new Promise(function(t,i){var n=ie(e.querySelectorAll("*")).filter(_t).map(Ot),s=lt("searchPseudoElements");yt(),Promise.all(n).then(function(){s(),Ct(),t()}).catch(function(){s(),Ct(),i()})})}var Gt=!1,Vt=function(e){return e.toLowerCase().split(" ").reduce(function(e,t){var i=t.toLowerCase().split("-"),n=i[0],s=i.slice(1).join("-");if(n&&"h"===s)return e.flipX=!0,e;if(n&&"v"===s)return e.flipY=!0,e;if(s=parseFloat(s),isNaN(s))return e;switch(n){case"grow":e.size=e.size+s;break;case"shrink":e.size=e.size-s;break;case"left":e.x=e.x-s;break;case"right":e.x=e.x+s;break;case"up":e.y=e.y-s;break;case"down":e.y=e.y+s;break;case"rotate":e.rotate=e.rotate+s}return e},{size:16,x:0,y:0,flipX:!1,flipY:!1,rotate:0})},Bt={mixout:function(){return{parse:{transform:function(e){return Vt(e)}}}},hooks:function(){return{parseNodeAttributes:function(e,t){var i=t.getAttribute("data-fa-transform");return i&&(e.transform=Vt(i)),e}}},provides:function(e){e.generateAbstractTransformGrouping=function(e){var t=e.main,i=e.transform,n=e.containerWidth,r=e.iconWidth,o={transform:"translate(".concat(n/2," 256)")},a="translate(".concat(32*i.x,", ").concat(32*i.y,") "),l="scale(".concat(i.size/16*(i.flipX?-1:1),", ").concat(i.size/16*(i.flipY?-1:1),") "),c="rotate(".concat(i.rotate," 0 0)"),h={outer:o,inner:{transform:"".concat(a," ").concat(l," ").concat(c)},path:{transform:"translate(".concat(r/2*-1," -256)")}};return{tag:"g",attributes:s({},h.outer),children:[{tag:"g",attributes:s({},h.inner),children:[{tag:t.icon.tag,children:t.icon.children,attributes:s(s({},t.icon.attributes),h.path)}]}]}}}},Ht={x:0,y:0,width:"100%",height:"100%"};function zt(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return e.attributes&&(e.attributes.fill||t)&&(e.attributes.fill="black"),e}var Ut,Wt={hooks:function(){return{parseNodeAttributes:function(e,t){var i=t.getAttribute("data-fa-mask"),n=i?Ge(i.split(" ").map(function(e){return e.trim()})):{prefix:null,iconName:null,rest:[]};return n.prefix||(n.prefix=_e()),e.mask=n,e.maskId=t.getAttribute("data-fa-mask-id"),e}}},provides:function(e){e.generateAbstractMask=function(e){var t,i=e.children,n=e.attributes,r=e.main,o=e.mask,a=e.maskId,l=e.transform,c=r.width,h=r.icon,d=o.width,u=o.icon,p=function(e){var t=e.transform,i=e.iconWidth,n={transform:"translate(".concat(e.containerWidth/2," 256)")},s="translate(".concat(32*t.x,", ").concat(32*t.y,") "),r="scale(".concat(t.size/16*(t.flipX?-1:1),", ").concat(t.size/16*(t.flipY?-1:1),") "),o="rotate(".concat(t.rotate," 0 0)");return{outer:n,inner:{transform:"".concat(s," ").concat(r," ").concat(o)},path:{transform:"translate(".concat(i/2*-1," -256)")}}}({transform:l,containerWidth:d,iconWidth:c}),g={tag:"rect",attributes:s(s({},Ht),{},{fill:"white"})},f=h.children?{children:h.children.map(zt)}:{},m={tag:"g",attributes:s({},p.inner),children:[zt(s({tag:h.tag,attributes:s(s({},h.attributes),p.path)},f))]},v={tag:"g",attributes:s({},p.outer),children:[m]},y="mask-".concat(a||te()),C="clip-".concat(a||te()),b={tag:"mask",attributes:s(s({},Ht),{},{id:y,maskUnits:"userSpaceOnUse",maskContentUnits:"userSpaceOnUse"}),children:[g,v]},S={tag:"defs",children:[{tag:"clipPath",attributes:{id:C},children:(t=u,"g"===t.tag?t.children:[t])},b]};return i.push(S,{tag:"rect",attributes:s({fill:"currentColor","clip-path":"url(#".concat(C,")"),mask:"url(#".concat(y,")")},Ht)}),{children:i,attributes:n}}}},jt={provides:function(e){var t=!1;C.matchMedia&&(t=C.matchMedia("(prefers-reduced-motion: reduce)").matches),e.missingIconAbstract=function(){var e=[],i={fill:"currentColor"},n={attributeType:"XML",repeatCount:"indefinite",dur:"2s"};e.push({tag:"path",attributes:s(s({},i),{},{d:"M156.5,447.7l-12.6,29.5c-18.7-9.5-35.9-21.2-51.5-34.9l22.7-22.7C127.6,430.5,141.5,440,156.5,447.7z M40.6,272H8.5 c1.4,21.2,5.4,41.7,11.7,61.1L50,321.2C45.1,305.5,41.8,289,40.6,272z M40.6,240c1.4-18.8,5.2-37,11.1-54.1l-29.5-12.6 C14.7,194.3,10,216.7,8.5,240H40.6z M64.3,156.5c7.8-14.9,17.2-28.8,28.1-41.5L69.7,92.3c-13.7,15.6-25.5,32.8-34.9,51.5 L64.3,156.5z M397,419.6c-13.9,12-29.4,22.3-46.1,30.4l11.9,29.8c20.7-9.9,39.8-22.6,56.9-37.6L397,419.6z M115,92.4 c13.9-12,29.4-22.3,46.1-30.4l-11.9-29.8c-20.7,9.9-39.8,22.6-56.8,37.6L115,92.4z M447.7,355.5c-7.8,14.9-17.2,28.8-28.1,41.5 l22.7,22.7c13.7-15.6,25.5-32.9,34.9-51.5L447.7,355.5z M471.4,272c-1.4,18.8-5.2,37-11.1,54.1l29.5,12.6 c7.5-21.1,12.2-43.5,13.6-66.8H471.4z M321.2,462c-15.7,5-32.2,8.2-49.2,9.4v32.1c21.2-1.4,41.7-5.4,61.1-11.7L321.2,462z M240,471.4c-18.8-1.4-37-5.2-54.1-11.1l-12.6,29.5c21.1,7.5,43.5,12.2,66.8,13.6V471.4z M462,190.8c5,15.7,8.2,32.2,9.4,49.2h32.1 c-1.4-21.2-5.4-41.7-11.7-61.1L462,190.8z M92.4,397c-12-13.9-22.3-29.4-30.4-46.1l-29.8,11.9c9.9,20.7,22.6,39.8,37.6,56.9 L92.4,397z M272,40.6c18.8,1.4,36.9,5.2,54.1,11.1l12.6-29.5C317.7,14.7,295.3,10,272,8.5V40.6z M190.8,50 c15.7-5,32.2-8.2,49.2-9.4V8.5c-21.2,1.4-41.7,5.4-61.1,11.7L190.8,50z M442.3,92.3L419.6,115c12,13.9,22.3,29.4,30.5,46.1 l29.8-11.9C470,128.5,457.3,109.4,442.3,92.3z M397,92.4l22.7-22.7c-15.6-13.7-32.8-25.5-51.5-34.9l-12.6,29.5 C370.4,72.1,384.4,81.5,397,92.4z"})});var r=s(s({},n),{},{attributeName:"opacity"}),o={tag:"circle",attributes:s(s({},i),{},{cx:"256",cy:"364",r:"28"}),children:[]};return t||o.children.push({tag:"animate",attributes:s(s({},n),{},{attributeName:"r",values:"28;14;28;28;14;28;"})},{tag:"animate",attributes:s(s({},r),{},{values:"1;0;1;1;0;1;"})}),e.push(o),e.push({tag:"path",attributes:s(s({},i),{},{opacity:"1",d:"M263.7,312h-16c-6.6,0-12-5.4-12-12c0-71,77.4-63.9,77.4-107.8c0-20-17.8-40.2-57.4-40.2c-29.1,0-44.3,9.6-59.2,28.7 c-3.9,5-11.1,6-16.2,2.4l-13.1-9.2c-5.6-3.9-6.9-11.8-2.6-17.2c21.2-27.2,46.4-44.7,91.2-44.7c52.3,0,97.4,29.8,97.4,80.2 c0,67.6-77.4,63.5-77.4,107.8C275.7,306.6,270.3,312,263.7,312z"}),children:t?[]:[{tag:"animate",attributes:s(s({},r),{},{values:"1;0;0;0;0;1;"})}]}),t||e.push({tag:"path",attributes:s(s({},i),{},{opacity:"0",d:"M232.5,134.5l7,168c0.3,6.4,5.6,11.5,12,11.5h9c6.4,0,11.7-5.1,12-11.5l7-168c0.3-6.8-5.2-12.5-12-12.5h-23 C237.7,122,232.2,127.7,232.5,134.5z"}),children:[{tag:"animate",attributes:s(s({},r),{},{values:"0;0;1;1;0;0;"})}]}),{tag:"g",attributes:{class:"missing"},children:e}}}};Ut={mixoutsTo:Xe}.mixoutsTo,Be=[he,Dt,It,Rt,Lt,{hooks:function(){return{mutationObserverCallbacks:function(e){return e.pseudoElementsCallback=Ft,e}}},provides:function(e){e.pseudoElements2svg=function(e){var t=e.node,i=void 0===t?b:t;Z.searchPseudoElements&&Ft(i)}}},{mixout:function(){return{dom:{unwatch:function(){yt(),Gt=!0}}}},hooks:function(){return{bootstrap:function(){St(We("mutationObserverCallbacks",{}))},noAuto:function(){bt&&bt.disconnect()},watch:function(e){var t=e.observeMutationsRoot;Gt?Ct():St(We("mutationObserverCallbacks",{observeMutationsRoot:t}))}}}},Bt,Wt,jt,{hooks:function(){return{parseNodeAttributes:function(e,t){var i=t.getAttribute("data-fa-symbol"),n=null!==i&&(""===i||i);return e.symbol=n,e}}}}],He={},Object.keys(ze).forEach(function(e){-1===Ue.indexOf(e)&&delete ze[e]}),Be.forEach(function(e){var t=e.mixout?e.mixout():{};if(Object.keys(t).forEach(function(e){"function"==typeof t[e]&&(Ut[e]=t[e]),"object"===r(t[e])&&Object.keys(t[e]).forEach(function(i){Ut[e]||(Ut[e]={}),Ut[e][i]=t[e][i]})}),e.hooks){var i=e.hooks();Object.keys(i).forEach(function(e){He[e]||(He[e]=[]),He[e].push(i[e])})}e.provides&&e.provides(ze)});var Kt=Xe.noAuto,$t=Xe.config,Yt=Xe.library,qt=Xe.dom,Xt=Xe.parse,Zt=Xe.findIconDefinition,Qt=Xe.toHtml,Jt=Xe.icon,ei=Xe.layer,ti=Xe.text,ii=Xe.counter},659(e,t,i){"use strict";i.r(t),i.d(t,{faAd:()=>s,faAddressBook:()=>r,faAddressCard:()=>o,faAdjust:()=>a,faAirFreshener:()=>l,faAlignCenter:()=>c,faAlignJustify:()=>h,faAlignLeft:()=>d,faAlignRight:()=>u,faAllergies:()=>p,faAmbulance:()=>g,faAmericanSignLanguageInterpreting:()=>f,faAnchor:()=>m,faAngleDoubleDown:()=>v,faAngleDoubleLeft:()=>y,faAngleDoubleRight:()=>C,faAngleDoubleUp:()=>b,faAngleDown:()=>S,faAngleLeft:()=>w,faAngleRight:()=>x,faAngleUp:()=>E,faAngry:()=>M,faAnkh:()=>A,faAppleAlt:()=>T,faArchive:()=>D,faArchway:()=>I,faArrowAltCircleDown:()=>R,faArrowAltCircleLeft:()=>L,faArrowAltCircleRight:()=>k,faArrowAltCircleUp:()=>P,faArrowCircleDown:()=>N,faArrowCircleLeft:()=>O,faArrowCircleRight:()=>_,faArrowCircleUp:()=>F,faArrowDown:()=>G,faArrowLeft:()=>V,faArrowRight:()=>B,faArrowUp:()=>H,faArrowsAlt:()=>z,faArrowsAltH:()=>U,faArrowsAltV:()=>W,faAssistiveListeningSystems:()=>j,faAsterisk:()=>K,faAt:()=>$,faAtlas:()=>Y,faAtom:()=>q,faAudioDescription:()=>X,faAward:()=>Z,faBaby:()=>Q,faBabyCarriage:()=>J,faBackspace:()=>ee,faBackward:()=>te,faBacon:()=>ie,faBacteria:()=>ne,faBacterium:()=>se,faBahai:()=>re,faBalanceScale:()=>oe,faBalanceScaleLeft:()=>ae,faBalanceScaleRight:()=>le,faBan:()=>ce,faBandAid:()=>he,faBarcode:()=>de,faBars:()=>ue,faBaseballBall:()=>pe,faBasketballBall:()=>ge,faBath:()=>fe,faBatteryEmpty:()=>me,faBatteryFull:()=>ve,faBatteryHalf:()=>ye,faBatteryQuarter:()=>Ce,faBatteryThreeQuarters:()=>be,faBed:()=>Se,faBeer:()=>we,faBell:()=>xe,faBellSlash:()=>Ee,faBezierCurve:()=>Me,faBible:()=>Ae,faBicycle:()=>Te,faBiking:()=>De,faBinoculars:()=>Ie,faBiohazard:()=>Re,faBirthdayCake:()=>Le,faBlender:()=>ke,faBlenderPhone:()=>Pe,faBlind:()=>Ne,faBlog:()=>Oe,faBold:()=>_e,faBolt:()=>Fe,faBomb:()=>Ge,faBone:()=>Ve,faBong:()=>Be,faBook:()=>He,faBookDead:()=>ze,faBookMedical:()=>Ue,faBookOpen:()=>We,faBookReader:()=>je,faBookmark:()=>Ke,faBorderAll:()=>$e,faBorderNone:()=>Ye,faBorderStyle:()=>qe,faBowlingBall:()=>Xe,faBox:()=>Ze,faBoxOpen:()=>Qe,faBoxTissue:()=>Je,faBoxes:()=>et,faBraille:()=>tt,faBrain:()=>it,faBreadSlice:()=>nt,faBriefcase:()=>st,faBriefcaseMedical:()=>rt,faBroadcastTower:()=>ot,faBroom:()=>at,faBrush:()=>lt,faBug:()=>ct,faBuilding:()=>ht,faBullhorn:()=>dt,faBullseye:()=>ut,faBurn:()=>pt,faBus:()=>gt,faBusAlt:()=>ft,faBusinessTime:()=>mt,faCalculator:()=>vt,faCalendar:()=>yt,faCalendarAlt:()=>Ct,faCalendarCheck:()=>bt,faCalendarDay:()=>St,faCalendarMinus:()=>wt,faCalendarPlus:()=>xt,faCalendarTimes:()=>Et,faCalendarWeek:()=>Mt,faCamera:()=>At,faCameraRetro:()=>Tt,faCampground:()=>Dt,faCandyCane:()=>It,faCannabis:()=>Rt,faCapsules:()=>Lt,faCar:()=>kt,faCarAlt:()=>Pt,faCarBattery:()=>Nt,faCarCrash:()=>Ot,faCarSide:()=>_t,faCaravan:()=>Ft,faCaretDown:()=>Gt,faCaretLeft:()=>Vt,faCaretRight:()=>Bt,faCaretSquareDown:()=>Ht,faCaretSquareLeft:()=>zt,faCaretSquareRight:()=>Ut,faCaretSquareUp:()=>Wt,faCaretUp:()=>jt,faCarrot:()=>Kt,faCartArrowDown:()=>$t,faCartPlus:()=>Yt,faCashRegister:()=>qt,faCat:()=>Xt,faCertificate:()=>Zt,faChair:()=>Qt,faChalkboard:()=>Jt,faChalkboardTeacher:()=>ei,faChargingStation:()=>ti,faChartArea:()=>ii,faChartBar:()=>ni,faChartLine:()=>si,faChartPie:()=>ri,faCheck:()=>oi,faCheckCircle:()=>ai,faCheckDouble:()=>li,faCheckSquare:()=>ci,faCheese:()=>hi,faChess:()=>di,faChessBishop:()=>ui,faChessBoard:()=>pi,faChessKing:()=>gi,faChessKnight:()=>fi,faChessPawn:()=>mi,faChessQueen:()=>vi,faChessRook:()=>yi,faChevronCircleDown:()=>Ci,faChevronCircleLeft:()=>bi,faChevronCircleRight:()=>Si,faChevronCircleUp:()=>wi,faChevronDown:()=>xi,faChevronLeft:()=>Ei,faChevronRight:()=>Mi,faChevronUp:()=>Ai,faChild:()=>Ti,faChurch:()=>Di,faCircle:()=>Ii,faCircleNotch:()=>Ri,faCity:()=>Li,faClinicMedical:()=>ki,faClipboard:()=>Pi,faClipboardCheck:()=>Ni,faClipboardList:()=>Oi,faClock:()=>_i,faClone:()=>Fi,faClosedCaptioning:()=>Gi,faCloud:()=>Vi,faCloudDownloadAlt:()=>Bi,faCloudMeatball:()=>Hi,faCloudMoon:()=>zi,faCloudMoonRain:()=>Ui,faCloudRain:()=>Wi,faCloudShowersHeavy:()=>ji,faCloudSun:()=>Ki,faCloudSunRain:()=>$i,faCloudUploadAlt:()=>Yi,faCocktail:()=>qi,faCode:()=>Xi,faCodeBranch:()=>Zi,faCoffee:()=>Qi,faCog:()=>Ji,faCogs:()=>en,faCoins:()=>tn,faColumns:()=>nn,faComment:()=>sn,faCommentAlt:()=>rn,faCommentDollar:()=>on,faCommentDots:()=>an,faCommentMedical:()=>ln,faCommentSlash:()=>cn,faComments:()=>hn,faCommentsDollar:()=>dn,faCompactDisc:()=>un,faCompass:()=>pn,faCompress:()=>gn,faCompressAlt:()=>fn,faCompressArrowsAlt:()=>mn,faConciergeBell:()=>vn,faCookie:()=>yn,faCookieBite:()=>Cn,faCopy:()=>bn,faCopyright:()=>Sn,faCouch:()=>wn,faCreditCard:()=>xn,faCrop:()=>En,faCropAlt:()=>Mn,faCross:()=>An,faCrosshairs:()=>Tn,faCrow:()=>Dn,faCrown:()=>In,faCrutch:()=>Rn,faCube:()=>Ln,faCubes:()=>kn,faCut:()=>Pn,faDatabase:()=>Nn,faDeaf:()=>On,faDemocrat:()=>_n,faDesktop:()=>Fn,faDharmachakra:()=>Gn,faDiagnoses:()=>Vn,faDice:()=>Bn,faDiceD20:()=>Hn,faDiceD6:()=>zn,faDiceFive:()=>Un,faDiceFour:()=>Wn,faDiceOne:()=>jn,faDiceSix:()=>Kn,faDiceThree:()=>$n,faDiceTwo:()=>Yn,faDigitalTachograph:()=>qn,faDirections:()=>Xn,faDisease:()=>Zn,faDivide:()=>Qn,faDizzy:()=>Jn,faDna:()=>es,faDog:()=>ts,faDollarSign:()=>is,faDolly:()=>ns,faDollyFlatbed:()=>ss,faDonate:()=>rs,faDoorClosed:()=>os,faDoorOpen:()=>as,faDotCircle:()=>ls,faDove:()=>cs,faDownload:()=>hs,faDraftingCompass:()=>ds,faDragon:()=>us,faDrawPolygon:()=>ps,faDrum:()=>gs,faDrumSteelpan:()=>fs,faDrumstickBite:()=>ms,faDumbbell:()=>vs,faDumpster:()=>ys,faDumpsterFire:()=>Cs,faDungeon:()=>bs,faEdit:()=>Ss,faEgg:()=>ws,faEject:()=>xs,faEllipsisH:()=>Es,faEllipsisV:()=>Ms,faEnvelope:()=>As,faEnvelopeOpen:()=>Ts,faEnvelopeOpenText:()=>Ds,faEnvelopeSquare:()=>Is,faEquals:()=>Rs,faEraser:()=>Ls,faEthernet:()=>ks,faEuroSign:()=>Ps,faExchangeAlt:()=>Ns,faExclamation:()=>Os,faExclamationCircle:()=>_s,faExclamationTriangle:()=>Fs,faExpand:()=>Gs,faExpandAlt:()=>Vs,faExpandArrowsAlt:()=>Bs,faExternalLinkAlt:()=>Hs,faExternalLinkSquareAlt:()=>zs,faEye:()=>Us,faEyeDropper:()=>Ws,faEyeSlash:()=>js,faFan:()=>Ks,faFastBackward:()=>$s,faFastForward:()=>Ys,faFaucet:()=>qs,faFax:()=>Xs,faFeather:()=>Zs,faFeatherAlt:()=>Qs,faFemale:()=>Js,faFighterJet:()=>er,faFile:()=>tr,faFileAlt:()=>ir,faFileArchive:()=>nr,faFileAudio:()=>sr,faFileCode:()=>rr,faFileContract:()=>or,faFileCsv:()=>ar,faFileDownload:()=>lr,faFileExcel:()=>cr,faFileExport:()=>hr,faFileImage:()=>dr,faFileImport:()=>ur,faFileInvoice:()=>pr,faFileInvoiceDollar:()=>gr,faFileMedical:()=>fr,faFileMedicalAlt:()=>mr,faFilePdf:()=>vr,faFilePowerpoint:()=>yr,faFilePrescription:()=>Cr,faFileSignature:()=>br,faFileUpload:()=>Sr,faFileVideo:()=>wr,faFileWord:()=>xr,faFill:()=>Er,faFillDrip:()=>Mr,faFilm:()=>Ar,faFilter:()=>Tr,faFingerprint:()=>Dr,faFire:()=>Ir,faFireAlt:()=>Rr,faFireExtinguisher:()=>Lr,faFirstAid:()=>kr,faFish:()=>Pr,faFistRaised:()=>Nr,faFlag:()=>Or,faFlagCheckered:()=>_r,faFlagUsa:()=>Fr,faFlask:()=>Gr,faFlushed:()=>Vr,faFolder:()=>Br,faFolderMinus:()=>Hr,faFolderOpen:()=>zr,faFolderPlus:()=>Ur,faFont:()=>Wr,faFontAwesomeLogoFull:()=>jr,faFootballBall:()=>Kr,faForward:()=>$r,faFrog:()=>Yr,faFrown:()=>qr,faFrownOpen:()=>Xr,faFunnelDollar:()=>Zr,faFutbol:()=>Qr,faGamepad:()=>Jr,faGasPump:()=>eo,faGavel:()=>to,faGem:()=>io,faGenderless:()=>no,faGhost:()=>so,faGift:()=>ro,faGifts:()=>oo,faGlassCheers:()=>ao,faGlassMartini:()=>lo,faGlassMartiniAlt:()=>co,faGlassWhiskey:()=>ho,faGlasses:()=>uo,faGlobe:()=>po,faGlobeAfrica:()=>go,faGlobeAmericas:()=>fo,faGlobeAsia:()=>mo,faGlobeEurope:()=>vo,faGolfBall:()=>yo,faGopuram:()=>Co,faGraduationCap:()=>bo,faGreaterThan:()=>So,faGreaterThanEqual:()=>wo,faGrimace:()=>xo,faGrin:()=>Eo,faGrinAlt:()=>Mo,faGrinBeam:()=>Ao,faGrinBeamSweat:()=>To,faGrinHearts:()=>Do,faGrinSquint:()=>Io,faGrinSquintTears:()=>Ro,faGrinStars:()=>Lo,faGrinTears:()=>ko,faGrinTongue:()=>Po,faGrinTongueSquint:()=>No,faGrinTongueWink:()=>Oo,faGrinWink:()=>_o,faGripHorizontal:()=>Fo,faGripLines:()=>Go,faGripLinesVertical:()=>Vo,faGripVertical:()=>Bo,faGuitar:()=>Ho,faHSquare:()=>zo,faHamburger:()=>Uo,faHammer:()=>Wo,faHamsa:()=>jo,faHandHolding:()=>Ko,faHandHoldingHeart:()=>$o,faHandHoldingMedical:()=>Yo,faHandHoldingUsd:()=>qo,faHandHoldingWater:()=>Xo,faHandLizard:()=>Zo,faHandMiddleFinger:()=>Qo,faHandPaper:()=>Jo,faHandPeace:()=>ea,faHandPointDown:()=>ta,faHandPointLeft:()=>ia,faHandPointRight:()=>na,faHandPointUp:()=>sa,faHandPointer:()=>ra,faHandRock:()=>oa,faHandScissors:()=>aa,faHandSparkles:()=>la,faHandSpock:()=>ca,faHands:()=>ha,faHandsHelping:()=>da,faHandsWash:()=>ua,faHandshake:()=>pa,faHandshakeAltSlash:()=>ga,faHandshakeSlash:()=>fa,faHanukiah:()=>ma,faHardHat:()=>va,faHashtag:()=>ya,faHatCowboy:()=>Ca,faHatCowboySide:()=>ba,faHatWizard:()=>Sa,faHdd:()=>wa,faHeadSideCough:()=>xa,faHeadSideCoughSlash:()=>Ea,faHeadSideMask:()=>Ma,faHeadSideVirus:()=>Aa,faHeading:()=>Ta,faHeadphones:()=>Da,faHeadphonesAlt:()=>Ia,faHeadset:()=>Ra,faHeart:()=>La,faHeartBroken:()=>ka,faHeartbeat:()=>Pa,faHelicopter:()=>Na,faHighlighter:()=>Oa,faHiking:()=>_a,faHippo:()=>Fa,faHistory:()=>Ga,faHockeyPuck:()=>Va,faHollyBerry:()=>Ba,faHome:()=>Ha,faHorse:()=>za,faHorseHead:()=>Ua,faHospital:()=>Wa,faHospitalAlt:()=>ja,faHospitalSymbol:()=>Ka,faHospitalUser:()=>$a,faHotTub:()=>Ya,faHotdog:()=>qa,faHotel:()=>Xa,faHourglass:()=>Za,faHourglassEnd:()=>Qa,faHourglassHalf:()=>Ja,faHourglassStart:()=>el,faHouseDamage:()=>tl,faHouseUser:()=>il,faHryvnia:()=>nl,faICursor:()=>sl,faIceCream:()=>rl,faIcicles:()=>ol,faIcons:()=>al,faIdBadge:()=>ll,faIdCard:()=>cl,faIdCardAlt:()=>hl,faIgloo:()=>dl,faImage:()=>ul,faImages:()=>pl,faInbox:()=>gl,faIndent:()=>fl,faIndustry:()=>ml,faInfinity:()=>vl,faInfo:()=>yl,faInfoCircle:()=>Cl,faItalic:()=>bl,faJedi:()=>Sl,faJoint:()=>wl,faJournalWhills:()=>xl,faKaaba:()=>El,faKey:()=>Ml,faKeyboard:()=>Al,faKhanda:()=>Tl,faKiss:()=>Dl,faKissBeam:()=>Il,faKissWinkHeart:()=>Rl,faKiwiBird:()=>Ll,faLandmark:()=>kl,faLanguage:()=>Pl,faLaptop:()=>Nl,faLaptopCode:()=>Ol,faLaptopHouse:()=>_l,faLaptopMedical:()=>Fl,faLaugh:()=>Gl,faLaughBeam:()=>Vl,faLaughSquint:()=>Bl,faLaughWink:()=>Hl,faLayerGroup:()=>zl,faLeaf:()=>Ul,faLemon:()=>Wl,faLessThan:()=>jl,faLessThanEqual:()=>Kl,faLevelDownAlt:()=>$l,faLevelUpAlt:()=>Yl,faLifeRing:()=>ql,faLightbulb:()=>Xl,faLink:()=>Zl,faLiraSign:()=>Ql,faList:()=>Jl,faListAlt:()=>ec,faListOl:()=>tc,faListUl:()=>ic,faLocationArrow:()=>nc,faLock:()=>sc,faLockOpen:()=>rc,faLongArrowAltDown:()=>oc,faLongArrowAltLeft:()=>ac,faLongArrowAltRight:()=>lc,faLongArrowAltUp:()=>cc,faLowVision:()=>hc,faLuggageCart:()=>dc,faLungs:()=>uc,faLungsVirus:()=>pc,faMagic:()=>gc,faMagnet:()=>fc,faMailBulk:()=>mc,faMale:()=>vc,faMap:()=>yc,faMapMarked:()=>Cc,faMapMarkedAlt:()=>bc,faMapMarker:()=>Sc,faMapMarkerAlt:()=>wc,faMapPin:()=>xc,faMapSigns:()=>Ec,faMarker:()=>Mc,faMars:()=>Ac,faMarsDouble:()=>Tc,faMarsStroke:()=>Dc,faMarsStrokeH:()=>Ic,faMarsStrokeV:()=>Rc,faMask:()=>Lc,faMedal:()=>kc,faMedkit:()=>Pc,faMeh:()=>Nc,faMehBlank:()=>Oc,faMehRollingEyes:()=>_c,faMemory:()=>Fc,faMenorah:()=>Gc,faMercury:()=>Vc,faMeteor:()=>Bc,faMicrochip:()=>Hc,faMicrophone:()=>zc,faMicrophoneAlt:()=>Uc,faMicrophoneAltSlash:()=>Wc,faMicrophoneSlash:()=>jc,faMicroscope:()=>Kc,faMinus:()=>$c,faMinusCircle:()=>Yc,faMinusSquare:()=>qc,faMitten:()=>Xc,faMobile:()=>Zc,faMobileAlt:()=>Qc,faMoneyBill:()=>Jc,faMoneyBillAlt:()=>eh,faMoneyBillWave:()=>th,faMoneyBillWaveAlt:()=>ih,faMoneyCheck:()=>nh,faMoneyCheckAlt:()=>sh,faMonument:()=>rh,faMoon:()=>oh,faMortarPestle:()=>ah,faMosque:()=>lh,faMotorcycle:()=>ch,faMountain:()=>hh,faMouse:()=>dh,faMousePointer:()=>uh,faMugHot:()=>ph,faMusic:()=>gh,faNetworkWired:()=>fh,faNeuter:()=>mh,faNewspaper:()=>vh,faNotEqual:()=>yh,faNotesMedical:()=>Ch,faObjectGroup:()=>bh,faObjectUngroup:()=>Sh,faOilCan:()=>wh,faOm:()=>xh,faOtter:()=>Eh,faOutdent:()=>Mh,faPager:()=>Ah,faPaintBrush:()=>Th,faPaintRoller:()=>Dh,faPalette:()=>Ih,faPallet:()=>Rh,faPaperPlane:()=>Lh,faPaperclip:()=>kh,faParachuteBox:()=>Ph,faParagraph:()=>Nh,faParking:()=>Oh,faPassport:()=>_h,faPastafarianism:()=>Fh,faPaste:()=>Gh,faPause:()=>Vh,faPauseCircle:()=>Bh,faPaw:()=>Hh,faPeace:()=>zh,faPen:()=>Uh,faPenAlt:()=>Wh,faPenFancy:()=>jh,faPenNib:()=>Kh,faPenSquare:()=>$h,faPencilAlt:()=>Yh,faPencilRuler:()=>qh,faPeopleArrows:()=>Xh,faPeopleCarry:()=>Zh,faPepperHot:()=>Qh,faPercent:()=>Jh,faPercentage:()=>ed,faPersonBooth:()=>td,faPhone:()=>id,faPhoneAlt:()=>nd,faPhoneSlash:()=>sd,faPhoneSquare:()=>rd,faPhoneSquareAlt:()=>od,faPhoneVolume:()=>ad,faPhotoVideo:()=>ld,faPiggyBank:()=>cd,faPills:()=>hd,faPizzaSlice:()=>dd,faPlaceOfWorship:()=>ud,faPlane:()=>pd,faPlaneArrival:()=>gd,faPlaneDeparture:()=>fd,faPlaneSlash:()=>md,faPlay:()=>vd,faPlayCircle:()=>yd,faPlug:()=>Cd,faPlus:()=>bd,faPlusCircle:()=>Sd,faPlusSquare:()=>wd,faPodcast:()=>xd,faPoll:()=>Ed,faPollH:()=>Md,faPoo:()=>Ad,faPooStorm:()=>Td,faPoop:()=>Dd,faPortrait:()=>Id,faPoundSign:()=>Rd,faPowerOff:()=>Ld,faPray:()=>kd,faPrayingHands:()=>Pd,faPrescription:()=>Nd,faPrescriptionBottle:()=>Od,faPrescriptionBottleAlt:()=>_d,faPrint:()=>Fd,faProcedures:()=>Gd,faProjectDiagram:()=>Vd,faPumpMedical:()=>Bd,faPumpSoap:()=>Hd,faPuzzlePiece:()=>zd,faQrcode:()=>Ud,faQuestion:()=>Wd,faQuestionCircle:()=>jd,faQuidditch:()=>Kd,faQuoteLeft:()=>$d,faQuoteRight:()=>Yd,faQuran:()=>qd,faRadiation:()=>Xd,faRadiationAlt:()=>Zd,faRainbow:()=>Qd,faRandom:()=>Jd,faReceipt:()=>eu,faRecordVinyl:()=>tu,faRecycle:()=>iu,faRedo:()=>nu,faRedoAlt:()=>su,faRegistered:()=>ru,faRemoveFormat:()=>ou,faReply:()=>au,faReplyAll:()=>lu,faRepublican:()=>cu,faRestroom:()=>hu,faRetweet:()=>du,faRibbon:()=>uu,faRing:()=>pu,faRoad:()=>gu,faRobot:()=>fu,faRocket:()=>mu,faRoute:()=>vu,faRss:()=>yu,faRssSquare:()=>Cu,faRubleSign:()=>bu,faRuler:()=>Su,faRulerCombined:()=>wu,faRulerHorizontal:()=>xu,faRulerVertical:()=>Eu,faRunning:()=>Mu,faRupeeSign:()=>Au,faSadCry:()=>Tu,faSadTear:()=>Du,faSatellite:()=>Iu,faSatelliteDish:()=>Ru,faSave:()=>Lu,faSchool:()=>ku,faScrewdriver:()=>Pu,faScroll:()=>Nu,faSdCard:()=>Ou,faSearch:()=>_u,faSearchDollar:()=>Fu,faSearchLocation:()=>Gu,faSearchMinus:()=>Vu,faSearchPlus:()=>Bu,faSeedling:()=>Hu,faServer:()=>zu,faShapes:()=>Uu,faShare:()=>Wu,faShareAlt:()=>ju,faShareAltSquare:()=>Ku,faShareSquare:()=>$u,faShekelSign:()=>Yu,faShieldAlt:()=>qu,faShieldVirus:()=>Xu,faShip:()=>Zu,faShippingFast:()=>Qu,faShoePrints:()=>Ju,faShoppingBag:()=>ep,faShoppingBasket:()=>tp,faShoppingCart:()=>ip,faShower:()=>np,faShuttleVan:()=>sp,faSign:()=>rp,faSignInAlt:()=>op,faSignLanguage:()=>ap,faSignOutAlt:()=>lp,faSignal:()=>cp,faSignature:()=>hp,faSimCard:()=>dp,faSink:()=>up,faSitemap:()=>pp,faSkating:()=>gp,faSkiing:()=>fp,faSkiingNordic:()=>mp,faSkull:()=>vp,faSkullCrossbones:()=>yp,faSlash:()=>Cp,faSleigh:()=>bp,faSlidersH:()=>Sp,faSmile:()=>wp,faSmileBeam:()=>xp,faSmileWink:()=>Ep,faSmog:()=>Mp,faSmoking:()=>Ap,faSmokingBan:()=>Tp,faSms:()=>Dp,faSnowboarding:()=>Ip,faSnowflake:()=>Rp,faSnowman:()=>Lp,faSnowplow:()=>kp,faSoap:()=>Pp,faSocks:()=>Np,faSolarPanel:()=>Op,faSort:()=>_p,faSortAlphaDown:()=>Fp,faSortAlphaDownAlt:()=>Gp,faSortAlphaUp:()=>Vp,faSortAlphaUpAlt:()=>Bp,faSortAmountDown:()=>Hp,faSortAmountDownAlt:()=>zp,faSortAmountUp:()=>Up,faSortAmountUpAlt:()=>Wp,faSortDown:()=>jp,faSortNumericDown:()=>Kp,faSortNumericDownAlt:()=>$p,faSortNumericUp:()=>Yp,faSortNumericUpAlt:()=>qp,faSortUp:()=>Xp,faSpa:()=>Zp,faSpaceShuttle:()=>Qp,faSpellCheck:()=>Jp,faSpider:()=>eg,faSpinner:()=>tg,faSplotch:()=>ig,faSprayCan:()=>ng,faSquare:()=>sg,faSquareFull:()=>rg,faSquareRootAlt:()=>og,faStamp:()=>ag,faStar:()=>lg,faStarAndCrescent:()=>cg,faStarHalf:()=>hg,faStarHalfAlt:()=>dg,faStarOfDavid:()=>ug,faStarOfLife:()=>pg,faStepBackward:()=>gg,faStepForward:()=>fg,faStethoscope:()=>mg,faStickyNote:()=>vg,faStop:()=>yg,faStopCircle:()=>Cg,faStopwatch:()=>bg,faStopwatch20:()=>Sg,faStore:()=>wg,faStoreAlt:()=>xg,faStoreAltSlash:()=>Eg,faStoreSlash:()=>Mg,faStream:()=>Ag,faStreetView:()=>Tg,faStrikethrough:()=>Dg,faStroopwafel:()=>Ig,faSubscript:()=>Rg,faSubway:()=>Lg,faSuitcase:()=>kg,faSuitcaseRolling:()=>Pg,faSun:()=>Ng,faSuperscript:()=>Og,faSurprise:()=>_g,faSwatchbook:()=>Fg,faSwimmer:()=>Gg,faSwimmingPool:()=>Vg,faSynagogue:()=>Bg,faSync:()=>Hg,faSyncAlt:()=>zg,faSyringe:()=>Ug,faTable:()=>Wg,faTableTennis:()=>jg,faTablet:()=>Kg,faTabletAlt:()=>$g,faTablets:()=>Yg,faTachometerAlt:()=>qg,faTag:()=>Xg,faTags:()=>Zg,faTape:()=>Qg,faTasks:()=>Jg,faTaxi:()=>ef,faTeeth:()=>tf,faTeethOpen:()=>nf,faTemperatureHigh:()=>sf,faTemperatureLow:()=>rf,faTenge:()=>of,faTerminal:()=>af,faTextHeight:()=>lf,faTextWidth:()=>cf,faTh:()=>hf,faThLarge:()=>df,faThList:()=>uf,faTheaterMasks:()=>pf,faThermometer:()=>gf,faThermometerEmpty:()=>ff,faThermometerFull:()=>mf,faThermometerHalf:()=>vf,faThermometerQuarter:()=>yf,faThermometerThreeQuarters:()=>Cf,faThumbsDown:()=>bf,faThumbsUp:()=>Sf,faThumbtack:()=>wf,faTicketAlt:()=>xf,faTimes:()=>Ef,faTimesCircle:()=>Mf,faTint:()=>Af,faTintSlash:()=>Tf,faTired:()=>Df,faToggleOff:()=>If,faToggleOn:()=>Rf,faToilet:()=>Lf,faToiletPaper:()=>kf,faToiletPaperSlash:()=>Pf,faToolbox:()=>Nf,faTools:()=>Of,faTooth:()=>_f,faTorah:()=>Ff,faToriiGate:()=>Gf,faTractor:()=>Vf,faTrademark:()=>Bf,faTrafficLight:()=>Hf,faTrailer:()=>zf,faTrain:()=>Uf,faTram:()=>Wf,faTransgender:()=>jf,faTransgenderAlt:()=>Kf,faTrash:()=>$f,faTrashAlt:()=>Yf,faTrashRestore:()=>qf,faTrashRestoreAlt:()=>Xf,faTree:()=>Zf,faTrophy:()=>Qf,faTruck:()=>Jf,faTruckLoading:()=>em,faTruckMonster:()=>tm,faTruckMoving:()=>im,faTruckPickup:()=>nm,faTshirt:()=>sm,faTty:()=>rm,faTv:()=>om,faUmbrella:()=>am,faUmbrellaBeach:()=>lm,faUnderline:()=>cm,faUndo:()=>hm,faUndoAlt:()=>dm,faUniversalAccess:()=>um,faUniversity:()=>pm,faUnlink:()=>gm,faUnlock:()=>fm,faUnlockAlt:()=>mm,faUpload:()=>vm,faUser:()=>ym,faUserAlt:()=>Cm,faUserAltSlash:()=>bm,faUserAstronaut:()=>Sm,faUserCheck:()=>wm,faUserCircle:()=>xm,faUserClock:()=>Em,faUserCog:()=>Mm,faUserEdit:()=>Am,faUserFriends:()=>Tm,faUserGraduate:()=>Dm,faUserInjured:()=>Im,faUserLock:()=>Rm,faUserMd:()=>Lm,faUserMinus:()=>km,faUserNinja:()=>Pm,faUserNurse:()=>Nm,faUserPlus:()=>Om,faUserSecret:()=>_m,faUserShield:()=>Fm,faUserSlash:()=>Gm,faUserTag:()=>Vm,faUserTie:()=>Bm,faUserTimes:()=>Hm,faUsers:()=>zm,faUsersCog:()=>Um,faUsersSlash:()=>Wm,faUtensilSpoon:()=>jm,faUtensils:()=>Km,faVectorSquare:()=>$m,faVenus:()=>Ym,faVenusDouble:()=>qm,faVenusMars:()=>Xm,faVest:()=>Zm,faVestPatches:()=>Qm,faVial:()=>Jm,faVials:()=>ev,faVideo:()=>tv,faVideoSlash:()=>iv,faVihara:()=>nv,faVirus:()=>sv,faVirusSlash:()=>rv,faViruses:()=>ov,faVoicemail:()=>av,faVolleyballBall:()=>lv,faVolumeDown:()=>cv,faVolumeMute:()=>hv,faVolumeOff:()=>dv,faVolumeUp:()=>uv,faVoteYea:()=>pv,faVrCardboard:()=>gv,faWalking:()=>fv,faWallet:()=>mv,faWarehouse:()=>vv,faWater:()=>yv,faWaveSquare:()=>Cv,faWeight:()=>bv,faWeightHanging:()=>Sv,faWheelchair:()=>wv,faWifi:()=>xv,faWind:()=>Ev,faWindowClose:()=>Mv,faWindowMaximize:()=>Av,faWindowMinimize:()=>Tv,faWindowRestore:()=>Dv,faWineBottle:()=>Iv,faWineGlass:()=>Rv,faWineGlassAlt:()=>Lv,faWonSign:()=>kv,faWrench:()=>Pv,faXRay:()=>Nv,faYenSign:()=>Ov,faYinYang:()=>_v,fas:()=>Fv,prefix:()=>n});var n="fas",s={prefix:"fas",iconName:"ad",icon:[512,512,[],"f641","M157.52 272h36.96L176 218.78 157.52 272zM352 256c-13.23 0-24 10.77-24 24s10.77 24 24 24 24-10.77 24-24-10.77-24-24-24zM464 64H48C21.5 64 0 85.5 0 112v288c0 26.5 21.5 48 48 48h416c26.5 0 48-21.5 48-48V112c0-26.5-21.5-48-48-48zM250.58 352h-16.94c-6.81 0-12.88-4.32-15.12-10.75L211.15 320h-70.29l-7.38 21.25A16 16 0 0 1 118.36 352h-16.94c-11.01 0-18.73-10.85-15.12-21.25L140 176.12A23.995 23.995 0 0 1 162.67 160h26.66A23.99 23.99 0 0 1 212 176.13l53.69 154.62c3.61 10.4-4.11 21.25-15.11 21.25zM424 336c0 8.84-7.16 16-16 16h-16c-4.85 0-9.04-2.27-11.98-5.68-8.62 3.66-18.09 5.68-28.02 5.68-39.7 0-72-32.3-72-72s32.3-72 72-72c8.46 0 16.46 1.73 24 4.42V176c0-8.84 7.16-16 16-16h16c8.84 0 16 7.16 16 16v160z"]},r={prefix:"fas",iconName:"address-book",icon:[448,512,[],"f2b9","M436 160c6.6 0 12-5.4 12-12v-40c0-6.6-5.4-12-12-12h-20V48c0-26.5-21.5-48-48-48H48C21.5 0 0 21.5 0 48v416c0 26.5 21.5 48 48 48h320c26.5 0 48-21.5 48-48v-48h20c6.6 0 12-5.4 12-12v-40c0-6.6-5.4-12-12-12h-20v-64h20c6.6 0 12-5.4 12-12v-40c0-6.6-5.4-12-12-12h-20v-64h20zm-228-32c35.3 0 64 28.7 64 64s-28.7 64-64 64-64-28.7-64-64 28.7-64 64-64zm112 236.8c0 10.6-10 19.2-22.4 19.2H118.4C106 384 96 375.4 96 364.8v-19.2c0-31.8 30.1-57.6 67.2-57.6h5c12.3 5.1 25.7 8 39.8 8s27.6-2.9 39.8-8h5c37.1 0 67.2 25.8 67.2 57.6v19.2z"]},o={prefix:"fas",iconName:"address-card",icon:[576,512,[],"f2bb","M528 32H48C21.5 32 0 53.5 0 80v352c0 26.5 21.5 48 48 48h480c26.5 0 48-21.5 48-48V80c0-26.5-21.5-48-48-48zm-352 96c35.3 0 64 28.7 64 64s-28.7 64-64 64-64-28.7-64-64 28.7-64 64-64zm112 236.8c0 10.6-10 19.2-22.4 19.2H86.4C74 384 64 375.4 64 364.8v-19.2c0-31.8 30.1-57.6 67.2-57.6h5c12.3 5.1 25.7 8 39.8 8s27.6-2.9 39.8-8h5c37.1 0 67.2 25.8 67.2 57.6v19.2zM512 312c0 4.4-3.6 8-8 8H360c-4.4 0-8-3.6-8-8v-16c0-4.4 3.6-8 8-8h144c4.4 0 8 3.6 8 8v16zm0-64c0 4.4-3.6 8-8 8H360c-4.4 0-8-3.6-8-8v-16c0-4.4 3.6-8 8-8h144c4.4 0 8 3.6 8 8v16zm0-64c0 4.4-3.6 8-8 8H360c-4.4 0-8-3.6-8-8v-16c0-4.4 3.6-8 8-8h144c4.4 0 8 3.6 8 8v16z"]},a={prefix:"fas",iconName:"adjust",icon:[512,512,[],"f042","M8 256c0 136.966 111.033 248 248 248s248-111.034 248-248S392.966 8 256 8 8 119.033 8 256zm248 184V72c101.705 0 184 82.311 184 184 0 101.705-82.311 184-184 184z"]},l={prefix:"fas",iconName:"air-freshener",icon:[512,512,[],"f5d0","M224 160H96C43 160 0 203 0 256V480C0 497.625 14.375 512 32 512H288C305.625 512 320 497.625 320 480V256C320 203 277 160 224 160ZM160 416C115.875 416 80 380.125 80 336S115.875 256 160 256S240 291.875 240 336S204.125 416 160 416ZM224 32C224 14.375 209.625 0 192 0H128C110.375 0 96 14.375 96 32V128H224V32ZM381.781 51.578C383 50.969 384 49.359 384 48C384 46.625 383 45.031 381.781 44.422L352 32L339.562 2.219C338.969 1 337.375 0 336 0S333.031 1 332.406 2.219L320 32L290.219 44.422C289 45.031 288 46.625 288 48C288 49.359 289 50.969 290.219 51.578L320 64L332.406 93.781C333.031 95 334.625 96 336 96S338.969 95 339.562 93.781L352 64L381.781 51.578ZM448 64L460.406 93.781C461.031 95 462.625 96 464 96S466.969 95 467.562 93.781L480 64L509.781 51.578C511 50.969 512 49.359 512 48C512 46.625 511 45.031 509.781 44.422L480 32L467.562 2.219C466.969 1 465.375 0 464 0S461.031 1 460.406 2.219L448 32L418.219 44.422C417 45.031 416 46.625 416 48C416 49.359 417 50.969 418.219 51.578L448 64ZM480 224L467.562 194.219C466.969 193 465.375 192 464 192S461.031 193 460.406 194.219L448 224L418.219 236.422C417 237.031 416 238.625 416 240C416 241.359 417 242.969 418.219 243.578L448 256L460.406 285.781C461.031 287 462.625 288 464 288S466.969 287 467.562 285.781L480 256L509.781 243.578C511 242.969 512 241.359 512 240C512 238.625 511 237.031 509.781 236.422L480 224ZM445.781 147.578C447 146.969 448 145.359 448 144C448 142.625 447 141.031 445.781 140.422L416 128L403.562 98.219C402.969 97 401.375 96 400 96S397.031 97 396.406 98.219L384 128L354.219 140.422C353 141.031 352 142.625 352 144C352 145.359 353 146.969 354.219 147.578L384 160L396.406 189.781C397.031 191 398.625 192 400 192S402.969 191 403.562 189.781L416 160L445.781 147.578Z"]},c={prefix:"fas",iconName:"align-center",icon:[448,512,[],"f037","M432 160H16a16 16 0 0 0-16 16v32a16 16 0 0 0 16 16h416a16 16 0 0 0 16-16v-32a16 16 0 0 0-16-16zm0 256H16a16 16 0 0 0-16 16v32a16 16 0 0 0 16 16h416a16 16 0 0 0 16-16v-32a16 16 0 0 0-16-16zM108.1 96h231.81A12.09 12.09 0 0 0 352 83.9V44.09A12.09 12.09 0 0 0 339.91 32H108.1A12.09 12.09 0 0 0 96 44.09V83.9A12.1 12.1 0 0 0 108.1 96zm231.81 256A12.09 12.09 0 0 0 352 339.9v-39.81A12.09 12.09 0 0 0 339.91 288H108.1A12.09 12.09 0 0 0 96 300.09v39.81a12.1 12.1 0 0 0 12.1 12.1z"]},h={prefix:"fas",iconName:"align-justify",icon:[448,512,[],"f039","M432 416H16a16 16 0 0 0-16 16v32a16 16 0 0 0 16 16h416a16 16 0 0 0 16-16v-32a16 16 0 0 0-16-16zm0-128H16a16 16 0 0 0-16 16v32a16 16 0 0 0 16 16h416a16 16 0 0 0 16-16v-32a16 16 0 0 0-16-16zm0-128H16a16 16 0 0 0-16 16v32a16 16 0 0 0 16 16h416a16 16 0 0 0 16-16v-32a16 16 0 0 0-16-16zm0-128H16A16 16 0 0 0 0 48v32a16 16 0 0 0 16 16h416a16 16 0 0 0 16-16V48a16 16 0 0 0-16-16z"]},d={prefix:"fas",iconName:"align-left",icon:[448,512,[],"f036","M12.83 352h262.34A12.82 12.82 0 0 0 288 339.17v-38.34A12.82 12.82 0 0 0 275.17 288H12.83A12.82 12.82 0 0 0 0 300.83v38.34A12.82 12.82 0 0 0 12.83 352zm0-256h262.34A12.82 12.82 0 0 0 288 83.17V44.83A12.82 12.82 0 0 0 275.17 32H12.83A12.82 12.82 0 0 0 0 44.83v38.34A12.82 12.82 0 0 0 12.83 96zM432 160H16a16 16 0 0 0-16 16v32a16 16 0 0 0 16 16h416a16 16 0 0 0 16-16v-32a16 16 0 0 0-16-16zm0 256H16a16 16 0 0 0-16 16v32a16 16 0 0 0 16 16h416a16 16 0 0 0 16-16v-32a16 16 0 0 0-16-16z"]},u={prefix:"fas",iconName:"align-right",icon:[448,512,[],"f038","M16 224h416a16 16 0 0 0 16-16v-32a16 16 0 0 0-16-16H16a16 16 0 0 0-16 16v32a16 16 0 0 0 16 16zm416 192H16a16 16 0 0 0-16 16v32a16 16 0 0 0 16 16h416a16 16 0 0 0 16-16v-32a16 16 0 0 0-16-16zm3.17-384H172.83A12.82 12.82 0 0 0 160 44.83v38.34A12.82 12.82 0 0 0 172.83 96h262.34A12.82 12.82 0 0 0 448 83.17V44.83A12.82 12.82 0 0 0 435.17 32zm0 256H172.83A12.82 12.82 0 0 0 160 300.83v38.34A12.82 12.82 0 0 0 172.83 352h262.34A12.82 12.82 0 0 0 448 339.17v-38.34A12.82 12.82 0 0 0 435.17 288z"]},p={prefix:"fas",iconName:"allergies",icon:[448,512,[],"f461","M416 112c-17.6 0-32 14.4-32 32v72c0 4.4-3.6 8-8 8h-16c-4.4 0-8-3.6-8-8V64c0-17.6-14.4-32-32-32s-32 14.4-32 32v152c0 4.4-3.6 8-8 8h-16c-4.4 0-8-3.6-8-8V32c0-17.6-14.4-32-32-32s-32 14.4-32 32v184c0 4.4-3.6 8-8 8h-16c-4.4 0-8-3.6-8-8V64c0-17.6-14.4-32-32-32S96 46.4 96 64v241l-23.6-32.5c-13-17.9-38-21.8-55.9-8.8s-21.8 38-8.8 55.9l125.6 172.7c9 12.4 23.5 19.8 38.8 19.8h197.6c22.3 0 41.6-15.3 46.7-37l26.5-112.7c3.2-13.7 4.9-28.3 5.1-42.3V144c0-17.6-14.4-32-32-32zM176 416c-8.8 0-16-7.2-16-16s7.2-16 16-16 16 7.2 16 16-7.2 16-16 16zm0-96c-8.8 0-16-7.2-16-16s7.2-16 16-16 16 7.2 16 16-7.2 16-16 16zm64 128c-8.8 0-16-7.2-16-16s7.2-16 16-16 16 7.2 16 16-7.2 16-16 16zm0-96c-8.8 0-16-7.2-16-16s7.2-16 16-16 16 7.2 16 16-7.2 16-16 16zm64 32c-8.8 0-16-7.2-16-16s7.2-16 16-16 16 7.2 16 16-7.2 16-16 16zm32 64c-8.8 0-16-7.2-16-16s7.2-16 16-16 16 7.2 16 16-7.2 16-16 16zm32-128c-8.8 0-16-7.2-16-16s7.2-16 16-16 16 7.2 16 16-7.2 16-16 16z"]},g={prefix:"fas",iconName:"ambulance",icon:[640,512,[],"f0f9","M624 352h-16V243.9c0-12.7-5.1-24.9-14.1-33.9L494 110.1c-9-9-21.2-14.1-33.9-14.1H416V48c0-26.5-21.5-48-48-48H48C21.5 0 0 21.5 0 48v320c0 26.5 21.5 48 48 48h16c0 53 43 96 96 96s96-43 96-96h128c0 53 43 96 96 96s96-43 96-96h48c8.8 0 16-7.2 16-16v-32c0-8.8-7.2-16-16-16zM160 464c-26.5 0-48-21.5-48-48s21.5-48 48-48 48 21.5 48 48-21.5 48-48 48zm144-248c0 4.4-3.6 8-8 8h-56v56c0 4.4-3.6 8-8 8h-48c-4.4 0-8-3.6-8-8v-56h-56c-4.4 0-8-3.6-8-8v-48c0-4.4 3.6-8 8-8h56v-56c0-4.4 3.6-8 8-8h48c4.4 0 8 3.6 8 8v56h56c4.4 0 8 3.6 8 8v48zm176 248c-26.5 0-48-21.5-48-48s21.5-48 48-48 48 21.5 48 48-21.5 48-48 48zm80-208H416V144h44.1l99.9 99.9V256z"]},f={prefix:"fas",iconName:"american-sign-language-interpreting",icon:[640,512,[],"f2a3","M290.547 189.039c-20.295-10.149-44.147-11.199-64.739-3.89 42.606 0 71.208 20.475 85.578 50.576 8.576 17.899-5.148 38.071-23.617 38.071 18.429 0 32.211 20.136 23.617 38.071-14.725 30.846-46.123 50.854-80.298 50.854-.557 0-94.471-8.615-94.471-8.615l-66.406 33.347c-9.384 4.693-19.815.379-23.895-7.781L1.86 290.747c-4.167-8.615-1.111-18.897 6.946-23.621l58.072-33.069L108 159.861c6.39-57.245 34.731-109.767 79.743-146.726 11.391-9.448 28.341-7.781 37.51 3.613 9.446 11.394 7.78 28.067-3.612 37.516-12.503 10.559-23.618 22.509-32.509 35.57 21.672-14.729 46.679-24.732 74.186-28.067 14.725-1.945 28.063 8.336 29.73 23.065 1.945 14.728-8.336 28.067-23.062 29.734-16.116 1.945-31.12 7.503-44.178 15.284 26.114-5.713 58.712-3.138 88.079 11.115 13.336 6.669 18.893 22.509 12.224 35.848-6.389 13.06-22.504 18.617-35.564 12.226zm-27.229 69.472c-6.112-12.505-18.338-20.286-32.231-20.286a35.46 35.46 0 0 0-35.565 35.57c0 21.428 17.808 35.57 35.565 35.57 13.893 0 26.119-7.781 32.231-20.286 4.446-9.449 13.614-15.006 23.339-15.284-9.725-.277-18.893-5.835-23.339-15.284zm374.821-37.237c4.168 8.615 1.111 18.897-6.946 23.621l-58.071 33.069L532 352.16c-6.39 57.245-34.731 109.767-79.743 146.726-10.932 9.112-27.799 8.144-37.51-3.613-9.446-11.394-7.78-28.067 3.613-37.516 12.503-10.559 23.617-22.509 32.508-35.57-21.672 14.729-46.679 24.732-74.186 28.067-10.021 2.506-27.552-5.643-29.73-23.065-1.945-14.728 8.336-28.067 23.062-29.734 16.116-1.946 31.12-7.503 44.178-15.284-26.114 5.713-58.712 3.138-88.079-11.115-13.336-6.669-18.893-22.509-12.224-35.848 6.389-13.061 22.505-18.619 35.565-12.227 20.295 10.149 44.147 11.199 64.739 3.89-42.606 0-71.208-20.475-85.578-50.576-8.576-17.899 5.148-38.071 23.617-38.071-18.429 0-32.211-20.136-23.617-38.071 14.033-29.396 44.039-50.887 81.966-50.854l92.803 8.615 66.406-33.347c9.408-4.704 19.828-.354 23.894 7.781l44.455 88.926zm-229.227-18.618c-13.893 0-26.119 7.781-32.231 20.286-4.446 9.449-13.614 15.006-23.339 15.284 9.725.278 18.893 5.836 23.339 15.284 6.112 12.505 18.338 20.286 32.231 20.286a35.46 35.46 0 0 0 35.565-35.57c0-21.429-17.808-35.57-35.565-35.57z"]},m={prefix:"fas",iconName:"anchor",icon:[576,512,[],"f13d","M12.971 352h32.394C67.172 454.735 181.944 512 288 512c106.229 0 220.853-57.38 242.635-160h32.394c10.691 0 16.045-12.926 8.485-20.485l-67.029-67.029c-4.686-4.686-12.284-4.686-16.971 0l-67.029 67.029c-7.56 7.56-2.206 20.485 8.485 20.485h35.146c-20.29 54.317-84.963 86.588-144.117 94.015V256h52c6.627 0 12-5.373 12-12v-40c0-6.627-5.373-12-12-12h-52v-5.47c37.281-13.178 63.995-48.725 64-90.518C384.005 43.772 341.605.738 289.37.01 235.723-.739 192 42.525 192 96c0 41.798 26.716 77.35 64 90.53V192h-52c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h52v190.015c-58.936-7.399-123.82-39.679-144.117-94.015h35.146c10.691 0 16.045-12.926 8.485-20.485l-67.029-67.029c-4.686-4.686-12.284-4.686-16.971 0L4.485 331.515C-3.074 339.074 2.28 352 12.971 352zM288 64c17.645 0 32 14.355 32 32s-14.355 32-32 32-32-14.355-32-32 14.355-32 32-32z"]},v={prefix:"fas",iconName:"angle-double-down",icon:[320,512,[],"f103","M143 256.3L7 120.3c-9.4-9.4-9.4-24.6 0-33.9l22.6-22.6c9.4-9.4 24.6-9.4 33.9 0l96.4 96.4 96.4-96.4c9.4-9.4 24.6-9.4 33.9 0L313 86.3c9.4 9.4 9.4 24.6 0 33.9l-136 136c-9.4 9.5-24.6 9.5-34 .1zm34 192l136-136c9.4-9.4 9.4-24.6 0-33.9l-22.6-22.6c-9.4-9.4-24.6-9.4-33.9 0L160 352.1l-96.4-96.4c-9.4-9.4-24.6-9.4-33.9 0L7 278.3c-9.4 9.4-9.4 24.6 0 33.9l136 136c9.4 9.5 24.6 9.5 34 .1z"]},y={prefix:"fas",iconName:"angle-double-left",icon:[448,512,[],"f100","M223.7 239l136-136c9.4-9.4 24.6-9.4 33.9 0l22.6 22.6c9.4 9.4 9.4 24.6 0 33.9L319.9 256l96.4 96.4c9.4 9.4 9.4 24.6 0 33.9L393.7 409c-9.4 9.4-24.6 9.4-33.9 0l-136-136c-9.5-9.4-9.5-24.6-.1-34zm-192 34l136 136c9.4 9.4 24.6 9.4 33.9 0l22.6-22.6c9.4-9.4 9.4-24.6 0-33.9L127.9 256l96.4-96.4c9.4-9.4 9.4-24.6 0-33.9L201.7 103c-9.4-9.4-24.6-9.4-33.9 0l-136 136c-9.5 9.4-9.5 24.6-.1 34z"]},C={prefix:"fas",iconName:"angle-double-right",icon:[448,512,[],"f101","M224.3 273l-136 136c-9.4 9.4-24.6 9.4-33.9 0l-22.6-22.6c-9.4-9.4-9.4-24.6 0-33.9l96.4-96.4-96.4-96.4c-9.4-9.4-9.4-24.6 0-33.9L54.3 103c9.4-9.4 24.6-9.4 33.9 0l136 136c9.5 9.4 9.5 24.6.1 34zm192-34l-136-136c-9.4-9.4-24.6-9.4-33.9 0l-22.6 22.6c-9.4 9.4-9.4 24.6 0 33.9l96.4 96.4-96.4 96.4c-9.4 9.4-9.4 24.6 0 33.9l22.6 22.6c9.4 9.4 24.6 9.4 33.9 0l136-136c9.4-9.2 9.4-24.4 0-33.8z"]},b={prefix:"fas",iconName:"angle-double-up",icon:[320,512,[],"f102","M177 255.7l136 136c9.4 9.4 9.4 24.6 0 33.9l-22.6 22.6c-9.4 9.4-24.6 9.4-33.9 0L160 351.9l-96.4 96.4c-9.4 9.4-24.6 9.4-33.9 0L7 425.7c-9.4-9.4-9.4-24.6 0-33.9l136-136c9.4-9.5 24.6-9.5 34-.1zm-34-192L7 199.7c-9.4 9.4-9.4 24.6 0 33.9l22.6 22.6c9.4 9.4 24.6 9.4 33.9 0l96.4-96.4 96.4 96.4c9.4 9.4 24.6 9.4 33.9 0l22.6-22.6c9.4-9.4 9.4-24.6 0-33.9l-136-136c-9.2-9.4-24.4-9.4-33.8 0z"]},S={prefix:"fas",iconName:"angle-down",icon:[320,512,[],"f107","M143 352.3L7 216.3c-9.4-9.4-9.4-24.6 0-33.9l22.6-22.6c9.4-9.4 24.6-9.4 33.9 0l96.4 96.4 96.4-96.4c9.4-9.4 24.6-9.4 33.9 0l22.6 22.6c9.4 9.4 9.4 24.6 0 33.9l-136 136c-9.2 9.4-24.4 9.4-33.8 0z"]},w={prefix:"fas",iconName:"angle-left",icon:[256,512,[],"f104","M31.7 239l136-136c9.4-9.4 24.6-9.4 33.9 0l22.6 22.6c9.4 9.4 9.4 24.6 0 33.9L127.9 256l96.4 96.4c9.4 9.4 9.4 24.6 0 33.9L201.7 409c-9.4 9.4-24.6 9.4-33.9 0l-136-136c-9.5-9.4-9.5-24.6-.1-34z"]},x={prefix:"fas",iconName:"angle-right",icon:[256,512,[],"f105","M224.3 273l-136 136c-9.4 9.4-24.6 9.4-33.9 0l-22.6-22.6c-9.4-9.4-9.4-24.6 0-33.9l96.4-96.4-96.4-96.4c-9.4-9.4-9.4-24.6 0-33.9L54.3 103c9.4-9.4 24.6-9.4 33.9 0l136 136c9.5 9.4 9.5 24.6.1 34z"]},E={prefix:"fas",iconName:"angle-up",icon:[320,512,[],"f106","M177 159.7l136 136c9.4 9.4 9.4 24.6 0 33.9l-22.6 22.6c-9.4 9.4-24.6 9.4-33.9 0L160 255.9l-96.4 96.4c-9.4 9.4-24.6 9.4-33.9 0L7 329.7c-9.4-9.4-9.4-24.6 0-33.9l136-136c9.4-9.5 24.6-9.5 34-.1z"]},M={prefix:"fas",iconName:"angry",icon:[496,512,[],"f556","M248 8C111 8 0 119 0 256s111 248 248 248 248-111 248-248S385 8 248 8zM136 240c0-9.3 4.1-17.5 10.5-23.4l-31-9.3c-8.5-2.5-13.3-11.5-10.7-19.9 2.5-8.5 11.4-13.2 19.9-10.7l80 24c8.5 2.5 13.3 11.5 10.7 19.9-2.1 6.9-8.4 11.4-15.3 11.4-.5 0-1.1-.2-1.7-.2.7 2.7 1.7 5.3 1.7 8.2 0 17.7-14.3 32-32 32S136 257.7 136 240zm168 154.2c-27.8-33.4-84.2-33.4-112.1 0-13.5 16.3-38.2-4.2-24.6-20.5 20-24 49.4-37.8 80.6-37.8s60.6 13.8 80.6 37.8c13.8 16.5-11.1 36.6-24.5 20.5zm76.6-186.9l-31 9.3c6.3 5.8 10.5 14.1 10.5 23.4 0 17.7-14.3 32-32 32s-32-14.3-32-32c0-2.9.9-5.6 1.7-8.2-.6.1-1.1.2-1.7.2-6.9 0-13.2-4.5-15.3-11.4-2.5-8.5 2.3-17.4 10.7-19.9l80-24c8.4-2.5 17.4 2.3 19.9 10.7 2.5 8.5-2.3 17.4-10.8 19.9z"]},A={prefix:"fas",iconName:"ankh",icon:[320,512,[],"f644","M296 256h-44.62C272.46 222.01 288 181.65 288 144 288 55.63 230.69 0 160 0S32 55.63 32 144c0 37.65 15.54 78.01 36.62 112H24c-13.25 0-24 10.74-24 24v32c0 13.25 10.75 24 24 24h96v152c0 13.25 10.75 24 24 24h32c13.25 0 24-10.75 24-24V336h96c13.25 0 24-10.75 24-24v-32c0-13.26-10.75-24-24-24zM160 80c29.61 0 48 24.52 48 64 0 34.66-27.14 78.14-48 100.87-20.86-22.72-48-66.21-48-100.87 0-39.48 18.39-64 48-64z"]},T={prefix:"fas",iconName:"apple-alt",icon:[448,512,[],"f5d1","M350.85 129c25.97 4.67 47.27 18.67 63.92 42 14.65 20.67 24.64 46.67 29.96 78 4.67 28.67 4.32 57.33-1 86-7.99 47.33-23.97 87-47.94 119-28.64 38.67-64.59 58-107.87 58-10.66 0-22.3-3.33-34.96-10-8.66-5.33-18.31-8-28.97-8s-20.3 2.67-28.97 8c-12.66 6.67-24.3 10-34.96 10-43.28 0-79.23-19.33-107.87-58-23.97-32-39.95-71.67-47.94-119-5.32-28.67-5.67-57.33-1-86 5.32-31.33 15.31-57.33 29.96-78 16.65-23.33 37.95-37.33 63.92-42 15.98-2.67 37.95-.33 65.92 7 23.97 6.67 44.28 14.67 60.93 24 16.65-9.33 36.96-17.33 60.93-24 27.98-7.33 49.96-9.67 65.94-7zm-54.94-41c-9.32 8.67-21.65 15-36.96 19-10.66 3.33-22.3 5-34.96 5l-14.98-1c-1.33-9.33-1.33-20 0-32 2.67-24 10.32-42.33 22.97-55 9.32-8.67 21.65-15 36.96-19 10.66-3.33 22.3-5 34.96-5l14.98 1 1 15c0 12.67-1.67 24.33-4.99 35-3.99 15.33-10.31 27.67-18.98 37z"]},D={prefix:"fas",iconName:"archive",icon:[512,512,[],"f187","M32 448c0 17.7 14.3 32 32 32h384c17.7 0 32-14.3 32-32V160H32v288zm160-212c0-6.6 5.4-12 12-12h104c6.6 0 12 5.4 12 12v8c0 6.6-5.4 12-12 12H204c-6.6 0-12-5.4-12-12v-8zM480 32H32C14.3 32 0 46.3 0 64v48c0 8.8 7.2 16 16 16h480c8.8 0 16-7.2 16-16V64c0-17.7-14.3-32-32-32z"]},I={prefix:"fas",iconName:"archway",icon:[576,512,[],"f557","M560 448h-16V96H32v352H16.02c-8.84 0-16 7.16-16 16v32c0 8.84 7.16 16 16 16H176c8.84 0 16-7.16 16-16V320c0-53.02 42.98-96 96-96s96 42.98 96 96l.02 160v16c0 8.84 7.16 16 16 16H560c8.84 0 16-7.16 16-16v-32c0-8.84-7.16-16-16-16zm0-448H16C7.16 0 0 7.16 0 16v32c0 8.84 7.16 16 16 16h544c8.84 0 16-7.16 16-16V16c0-8.84-7.16-16-16-16z"]},R={prefix:"fas",iconName:"arrow-alt-circle-down",icon:[512,512,[],"f358","M504 256c0 137-111 248-248 248S8 393 8 256 119 8 256 8s248 111 248 248zM212 140v116h-70.9c-10.7 0-16.1 13-8.5 20.5l114.9 114.3c4.7 4.7 12.2 4.7 16.9 0l114.9-114.3c7.6-7.6 2.2-20.5-8.5-20.5H300V140c0-6.6-5.4-12-12-12h-64c-6.6 0-12 5.4-12 12z"]},L={prefix:"fas",iconName:"arrow-alt-circle-left",icon:[512,512,[],"f359","M256 504C119 504 8 393 8 256S119 8 256 8s248 111 248 248-111 248-248 248zm116-292H256v-70.9c0-10.7-13-16.1-20.5-8.5L121.2 247.5c-4.7 4.7-4.7 12.2 0 16.9l114.3 114.9c7.6 7.6 20.5 2.2 20.5-8.5V300h116c6.6 0 12-5.4 12-12v-64c0-6.6-5.4-12-12-12z"]},k={prefix:"fas",iconName:"arrow-alt-circle-right",icon:[512,512,[],"f35a","M256 8c137 0 248 111 248 248S393 504 256 504 8 393 8 256 119 8 256 8zM140 300h116v70.9c0 10.7 13 16.1 20.5 8.5l114.3-114.9c4.7-4.7 4.7-12.2 0-16.9l-114.3-115c-7.6-7.6-20.5-2.2-20.5 8.5V212H140c-6.6 0-12 5.4-12 12v64c0 6.6 5.4 12 12 12z"]},P={prefix:"fas",iconName:"arrow-alt-circle-up",icon:[512,512,[],"f35b","M8 256C8 119 119 8 256 8s248 111 248 248-111 248-248 248S8 393 8 256zm292 116V256h70.9c10.7 0 16.1-13 8.5-20.5L264.5 121.2c-4.7-4.7-12.2-4.7-16.9 0l-115 114.3c-7.6 7.6-2.2 20.5 8.5 20.5H212v116c0 6.6 5.4 12 12 12h64c6.6 0 12-5.4 12-12z"]},N={prefix:"fas",iconName:"arrow-circle-down",icon:[512,512,[],"f0ab","M504 256c0 137-111 248-248 248S8 393 8 256 119 8 256 8s248 111 248 248zm-143.6-28.9L288 302.6V120c0-13.3-10.7-24-24-24h-16c-13.3 0-24 10.7-24 24v182.6l-72.4-75.5c-9.3-9.7-24.8-9.9-34.3-.4l-10.9 11c-9.4 9.4-9.4 24.6 0 33.9L239 404.3c9.4 9.4 24.6 9.4 33.9 0l132.7-132.7c9.4-9.4 9.4-24.6 0-33.9l-10.9-11c-9.5-9.5-25-9.3-34.3.4z"]},O={prefix:"fas",iconName:"arrow-circle-left",icon:[512,512,[],"f0a8","M256 504C119 504 8 393 8 256S119 8 256 8s248 111 248 248-111 248-248 248zm28.9-143.6L209.4 288H392c13.3 0 24-10.7 24-24v-16c0-13.3-10.7-24-24-24H209.4l75.5-72.4c9.7-9.3 9.9-24.8.4-34.3l-11-10.9c-9.4-9.4-24.6-9.4-33.9 0L107.7 239c-9.4 9.4-9.4 24.6 0 33.9l132.7 132.7c9.4 9.4 24.6 9.4 33.9 0l11-10.9c9.5-9.5 9.3-25-.4-34.3z"]},_={prefix:"fas",iconName:"arrow-circle-right",icon:[512,512,[],"f0a9","M256 8c137 0 248 111 248 248S393 504 256 504 8 393 8 256 119 8 256 8zm-28.9 143.6l75.5 72.4H120c-13.3 0-24 10.7-24 24v16c0 13.3 10.7 24 24 24h182.6l-75.5 72.4c-9.7 9.3-9.9 24.8-.4 34.3l11 10.9c9.4 9.4 24.6 9.4 33.9 0L404.3 273c9.4-9.4 9.4-24.6 0-33.9L271.6 106.3c-9.4-9.4-24.6-9.4-33.9 0l-11 10.9c-9.5 9.6-9.3 25.1.4 34.4z"]},F={prefix:"fas",iconName:"arrow-circle-up",icon:[512,512,[],"f0aa","M8 256C8 119 119 8 256 8s248 111 248 248-111 248-248 248S8 393 8 256zm143.6 28.9l72.4-75.5V392c0 13.3 10.7 24 24 24h16c13.3 0 24-10.7 24-24V209.4l72.4 75.5c9.3 9.7 24.8 9.9 34.3.4l10.9-11c9.4-9.4 9.4-24.6 0-33.9L273 107.7c-9.4-9.4-24.6-9.4-33.9 0L106.3 240.4c-9.4 9.4-9.4 24.6 0 33.9l10.9 11c9.6 9.5 25.1 9.3 34.4-.4z"]},G={prefix:"fas",iconName:"arrow-down",icon:[448,512,[],"f063","M413.1 222.5l22.2 22.2c9.4 9.4 9.4 24.6 0 33.9L241 473c-9.4 9.4-24.6 9.4-33.9 0L12.7 278.6c-9.4-9.4-9.4-24.6 0-33.9l22.2-22.2c9.5-9.5 25-9.3 34.3.4L184 343.4V56c0-13.3 10.7-24 24-24h32c13.3 0 24 10.7 24 24v287.4l114.8-120.5c9.3-9.8 24.8-10 34.3-.4z"]},V={prefix:"fas",iconName:"arrow-left",icon:[448,512,[],"f060","M257.5 445.1l-22.2 22.2c-9.4 9.4-24.6 9.4-33.9 0L7 273c-9.4-9.4-9.4-24.6 0-33.9L201.4 44.7c9.4-9.4 24.6-9.4 33.9 0l22.2 22.2c9.5 9.5 9.3 25-.4 34.3L136.6 216H424c13.3 0 24 10.7 24 24v32c0 13.3-10.7 24-24 24H136.6l120.5 114.8c9.8 9.3 10 24.8.4 34.3z"]},B={prefix:"fas",iconName:"arrow-right",icon:[448,512,[],"f061","M190.5 66.9l22.2-22.2c9.4-9.4 24.6-9.4 33.9 0L441 239c9.4 9.4 9.4 24.6 0 33.9L246.6 467.3c-9.4 9.4-24.6 9.4-33.9 0l-22.2-22.2c-9.5-9.5-9.3-25 .4-34.3L311.4 296H24c-13.3 0-24-10.7-24-24v-32c0-13.3 10.7-24 24-24h287.4L190.9 101.2c-9.8-9.3-10-24.8-.4-34.3z"]},H={prefix:"fas",iconName:"arrow-up",icon:[448,512,[],"f062","M34.9 289.5l-22.2-22.2c-9.4-9.4-9.4-24.6 0-33.9L207 39c9.4-9.4 24.6-9.4 33.9 0l194.3 194.3c9.4 9.4 9.4 24.6 0 33.9L413 289.4c-9.5 9.5-25 9.3-34.3-.4L264 168.6V456c0 13.3-10.7 24-24 24h-32c-13.3 0-24-10.7-24-24V168.6L69.2 289.1c-9.3 9.8-24.8 10-34.3.4z"]},z={prefix:"fas",iconName:"arrows-alt",icon:[512,512,[],"f0b2","M352.201 425.775l-79.196 79.196c-9.373 9.373-24.568 9.373-33.941 0l-79.196-79.196c-15.119-15.119-4.411-40.971 16.971-40.97h51.162L228 284H127.196v51.162c0 21.382-25.851 32.09-40.971 16.971L7.029 272.937c-9.373-9.373-9.373-24.569 0-33.941L86.225 159.8c15.119-15.119 40.971-4.411 40.971 16.971V228H228V127.196h-51.23c-21.382 0-32.09-25.851-16.971-40.971l79.196-79.196c9.373-9.373 24.568-9.373 33.941 0l79.196 79.196c15.119 15.119 4.411 40.971-16.971 40.971h-51.162V228h100.804v-51.162c0-21.382 25.851-32.09 40.97-16.971l79.196 79.196c9.373 9.373 9.373 24.569 0 33.941L425.773 352.2c-15.119 15.119-40.971 4.411-40.97-16.971V284H284v100.804h51.23c21.382 0 32.09 25.851 16.971 40.971z"]},U={prefix:"fas",iconName:"arrows-alt-h",icon:[512,512,[],"f337","M377.941 169.941V216H134.059v-46.059c0-21.382-25.851-32.09-40.971-16.971L7.029 239.029c-9.373 9.373-9.373 24.568 0 33.941l86.059 86.059c15.119 15.119 40.971 4.411 40.971-16.971V296h243.882v46.059c0 21.382 25.851 32.09 40.971 16.971l86.059-86.059c9.373-9.373 9.373-24.568 0-33.941l-86.059-86.059c-15.119-15.12-40.971-4.412-40.971 16.97z"]},W={prefix:"fas",iconName:"arrows-alt-v",icon:[256,512,[],"f338","M214.059 377.941H168V134.059h46.059c21.382 0 32.09-25.851 16.971-40.971L144.971 7.029c-9.373-9.373-24.568-9.373-33.941 0L24.971 93.088c-15.119 15.119-4.411 40.971 16.971 40.971H88v243.882H41.941c-21.382 0-32.09 25.851-16.971 40.971l86.059 86.059c9.373 9.373 24.568 9.373 33.941 0l86.059-86.059c15.12-15.119 4.412-40.971-16.97-40.971z"]},j={prefix:"fas",iconName:"assistive-listening-systems",icon:[512,512,[],"f2a2","M216 260c0 15.464-12.536 28-28 28s-28-12.536-28-28c0-44.112 35.888-80 80-80s80 35.888 80 80c0 15.464-12.536 28-28 28s-28-12.536-28-28c0-13.234-10.767-24-24-24s-24 10.766-24 24zm24-176c-97.047 0-176 78.953-176 176 0 15.464 12.536 28 28 28s28-12.536 28-28c0-66.168 53.832-120 120-120s120 53.832 120 120c0 75.164-71.009 70.311-71.997 143.622L288 404c0 28.673-23.327 52-52 52-15.464 0-28 12.536-28 28s12.536 28 28 28c59.475 0 107.876-48.328 108-107.774.595-34.428 72-48.24 72-144.226 0-97.047-78.953-176-176-176zm-80 236c-17.673 0-32 14.327-32 32s14.327 32 32 32 32-14.327 32-32-14.327-32-32-32zM32 448c-17.673 0-32 14.327-32 32s14.327 32 32 32 32-14.327 32-32-14.327-32-32-32zm480-187.993c0-1.518-.012-3.025-.045-4.531C510.076 140.525 436.157 38.47 327.994 1.511c-14.633-4.998-30.549 2.809-35.55 17.442-5 14.633 2.81 30.549 17.442 35.55 85.906 29.354 144.61 110.513 146.077 201.953l.003.188c.026 1.118.033 2.236.033 3.363 0 15.464 12.536 28 28 28s28.001-12.536 28.001-28zM152.971 439.029l-80-80L39.03 392.97l80 80 33.941-33.941z"]},K={prefix:"fas",iconName:"asterisk",icon:[512,512,[],"f069","M478.21 334.093L336 256l142.21-78.093c11.795-6.477 15.961-21.384 9.232-33.037l-19.48-33.741c-6.728-11.653-21.72-15.499-33.227-8.523L296 186.718l3.475-162.204C299.763 11.061 288.937 0 275.48 0h-38.96c-13.456 0-24.283 11.061-23.994 24.514L216 186.718 77.265 102.607c-11.506-6.976-26.499-3.13-33.227 8.523l-19.48 33.741c-6.728 11.653-2.562 26.56 9.233 33.037L176 256 33.79 334.093c-11.795 6.477-15.961 21.384-9.232 33.037l19.48 33.741c6.728 11.653 21.721 15.499 33.227 8.523L216 325.282l-3.475 162.204C212.237 500.939 223.064 512 236.52 512h38.961c13.456 0 24.283-11.061 23.995-24.514L296 325.282l138.735 84.111c11.506 6.976 26.499 3.13 33.227-8.523l19.48-33.741c6.728-11.653 2.563-26.559-9.232-33.036z"]},$={prefix:"fas",iconName:"at",icon:[512,512,[],"f1fa","M256 8C118.941 8 8 118.919 8 256c0 137.059 110.919 248 248 248 48.154 0 95.342-14.14 135.408-40.223 12.005-7.815 14.625-24.288 5.552-35.372l-10.177-12.433c-7.671-9.371-21.179-11.667-31.373-5.129C325.92 429.757 291.314 440 256 440c-101.458 0-184-82.542-184-184S154.542 72 256 72c100.139 0 184 57.619 184 160 0 38.786-21.093 79.742-58.17 83.693-17.349-.454-16.91-12.857-13.476-30.024l23.433-121.11C394.653 149.75 383.308 136 368.225 136h-44.981a13.518 13.518 0 0 0-13.432 11.993l-.01.092c-14.697-17.901-40.448-21.775-59.971-21.775-74.58 0-137.831 62.234-137.831 151.46 0 65.303 36.785 105.87 96 105.87 26.984 0 57.369-15.637 74.991-38.333 9.522 34.104 40.613 34.103 70.71 34.103C462.609 379.41 504 307.798 504 232 504 95.653 394.023 8 256 8zm-21.68 304.43c-22.249 0-36.07-15.623-36.07-40.771 0-44.993 30.779-72.729 58.63-72.729 22.292 0 35.601 15.241 35.601 40.77 0 45.061-33.875 72.73-58.161 72.73z"]},Y={prefix:"fas",iconName:"atlas",icon:[448,512,[],"f558","M318.38 208h-39.09c-1.49 27.03-6.54 51.35-14.21 70.41 27.71-13.24 48.02-39.19 53.3-70.41zm0-32c-5.29-31.22-25.59-57.17-53.3-70.41 7.68 19.06 12.72 43.38 14.21 70.41h39.09zM224 97.31c-7.69 7.45-20.77 34.42-23.43 78.69h46.87c-2.67-44.26-15.75-71.24-23.44-78.69zm-41.08 8.28c-27.71 13.24-48.02 39.19-53.3 70.41h39.09c1.49-27.03 6.53-51.35 14.21-70.41zm0 172.82c-7.68-19.06-12.72-43.38-14.21-70.41h-39.09c5.28 31.22 25.59 57.17 53.3 70.41zM247.43 208h-46.87c2.66 44.26 15.74 71.24 23.43 78.69 7.7-7.45 20.78-34.43 23.44-78.69zM448 358.4V25.6c0-16-9.6-25.6-25.6-25.6H96C41.6 0 0 41.6 0 96v320c0 54.4 41.6 96 96 96h326.4c12.8 0 25.6-9.6 25.6-25.6v-16c0-6.4-3.2-12.8-9.6-19.2-3.2-16-3.2-60.8 0-73.6 6.4-3.2 9.6-9.6 9.6-19.2zM224 64c70.69 0 128 57.31 128 128s-57.31 128-128 128S96 262.69 96 192 153.31 64 224 64zm160 384H96c-19.2 0-32-12.8-32-32s16-32 32-32h288v64z"]},q={prefix:"fas",iconName:"atom",icon:[448,512,[],"f5d2","M223.99908,224a32,32,0,1,0,32.00782,32A32.06431,32.06431,0,0,0,223.99908,224Zm214.172-96c-10.877-19.5-40.50979-50.75-116.27544-41.875C300.39168,34.875,267.63386,0,223.99908,0s-76.39066,34.875-97.89653,86.125C50.3369,77.375,20.706,108.5,9.82907,128-6.54984,157.375-5.17484,201.125,34.958,256-5.17484,310.875-6.54984,354.625,9.82907,384c29.13087,52.375,101.64652,43.625,116.27348,41.875C147.60842,477.125,180.36429,512,223.99908,512s76.3926-34.875,97.89652-86.125c14.62891,1.75,87.14456,10.5,116.27544-41.875C454.55,354.625,453.175,310.875,413.04017,256,453.175,201.125,454.55,157.375,438.171,128ZM63.33886,352c-4-7.25-.125-24.75,15.00391-48.25,6.87695,6.5,14.12891,12.875,21.88087,19.125,1.625,13.75,4,27.125,6.75,40.125C82.34472,363.875,67.09081,358.625,63.33886,352Zm36.88478-162.875c-7.752,6.25-15.00392,12.625-21.88087,19.125-15.12891-23.5-19.00392-41-15.00391-48.25,3.377-6.125,16.37891-11.5,37.88478-11.5,1.75,0,3.875.375,5.75.375C104.09864,162.25,101.84864,175.625,100.22364,189.125ZM223.99908,64c9.50195,0,22.25586,13.5,33.88282,37.25-11.252,3.75-22.50391,8-33.88282,12.875-11.377-4.875-22.62892-9.125-33.88283-12.875C201.74516,77.5,214.49712,64,223.99908,64Zm0,384c-9.502,0-22.25392-13.5-33.88283-37.25,11.25391-3.75,22.50587-8,33.88283-12.875C235.378,402.75,246.62994,407,257.8819,410.75,246.25494,434.5,233.501,448,223.99908,448Zm0-112a80,80,0,1,1,80-80A80.00023,80.00023,0,0,1,223.99908,336ZM384.6593,352c-3.625,6.625-19.00392,11.875-43.63479,11,2.752-13,5.127-26.375,6.752-40.125,7.75195-6.25,15.00391-12.625,21.87891-19.125C384.7843,327.25,388.6593,344.75,384.6593,352ZM369.65538,208.25c-6.875-6.5-14.127-12.875-21.87891-19.125-1.625-13.5-3.875-26.875-6.752-40.25,1.875,0,4.002-.375,5.752-.375,21.50391,0,34.50782,5.375,37.88283,11.5C388.6593,167.25,384.7843,184.75,369.65538,208.25Z"]},X={prefix:"fas",iconName:"audio-description",icon:[512,512,[],"f29e","M162.925 238.709l8.822 30.655h-25.606l9.041-30.652c1.277-4.421 2.651-9.994 3.872-15.245 1.22 5.251 2.594 10.823 3.871 15.242zm166.474-32.099h-14.523v98.781h14.523c29.776 0 46.175-17.678 46.175-49.776 0-32.239-17.49-49.005-46.175-49.005zM512 112v288c0 26.51-21.49 48-48 48H48c-26.51 0-48-21.49-48-48V112c0-26.51 21.49-48 48-48h416c26.51 0 48 21.49 48 48zM245.459 336.139l-57.097-168A12.001 12.001 0 0 0 177 160h-35.894a12.001 12.001 0 0 0-11.362 8.139l-57.097 168C70.003 343.922 75.789 352 84.009 352h29.133a12 12 0 0 0 11.535-8.693l8.574-29.906h51.367l8.793 29.977A12 12 0 0 0 204.926 352h29.172c8.22 0 14.006-8.078 11.361-15.861zm184.701-80.525c0-58.977-37.919-95.614-98.96-95.614h-57.366c-6.627 0-12 5.373-12 12v168c0 6.627 5.373 12 12 12H331.2c61.041 0 98.96-36.933 98.96-96.386z"]},Z={prefix:"fas",iconName:"award",icon:[384,512,[],"f559","M97.12 362.63c-8.69-8.69-4.16-6.24-25.12-11.85-9.51-2.55-17.87-7.45-25.43-13.32L1.2 448.7c-4.39 10.77 3.81 22.47 15.43 22.03l52.69-2.01L105.56 507c8 8.44 22.04 5.81 26.43-4.96l52.05-127.62c-10.84 6.04-22.87 9.58-35.31 9.58-19.5 0-37.82-7.59-51.61-21.37zM382.8 448.7l-45.37-111.24c-7.56 5.88-15.92 10.77-25.43 13.32-21.07 5.64-16.45 3.18-25.12 11.85-13.79 13.78-32.12 21.37-51.62 21.37-12.44 0-24.47-3.55-35.31-9.58L252 502.04c4.39 10.77 18.44 13.4 26.43 4.96l36.25-38.28 52.69 2.01c11.62.44 19.82-11.27 15.43-22.03zM263 340c15.28-15.55 17.03-14.21 38.79-20.14 13.89-3.79 24.75-14.84 28.47-28.98 7.48-28.4 5.54-24.97 25.95-45.75 10.17-10.35 14.14-25.44 10.42-39.58-7.47-28.38-7.48-24.42 0-52.83 3.72-14.14-.25-29.23-10.42-39.58-20.41-20.78-18.47-17.36-25.95-45.75-3.72-14.14-14.58-25.19-28.47-28.98-27.88-7.61-24.52-5.62-44.95-26.41-10.17-10.35-25-14.4-38.89-10.61-27.87 7.6-23.98 7.61-51.9 0-13.89-3.79-28.72.25-38.89 10.61-20.41 20.78-17.05 18.8-44.94 26.41-13.89 3.79-24.75 14.84-28.47 28.98-7.47 28.39-5.54 24.97-25.95 45.75-10.17 10.35-14.15 25.44-10.42 39.58 7.47 28.36 7.48 24.4 0 52.82-3.72 14.14.25 29.23 10.42 39.59 20.41 20.78 18.47 17.35 25.95 45.75 3.72 14.14 14.58 25.19 28.47 28.98C104.6 325.96 106.27 325 121 340c13.23 13.47 33.84 15.88 49.74 5.82a39.676 39.676 0 0 1 42.53 0c15.89 10.06 36.5 7.65 49.73-5.82zM97.66 175.96c0-53.03 42.24-96.02 94.34-96.02s94.34 42.99 94.34 96.02-42.24 96.02-94.34 96.02-94.34-42.99-94.34-96.02z"]},Q={prefix:"fas",iconName:"baby",icon:[384,512,[],"f77c","M192 160c44.2 0 80-35.8 80-80S236.2 0 192 0s-80 35.8-80 80 35.8 80 80 80zm-53.4 248.8l25.6-32-61.5-51.2L56.8 383c-11.4 14.2-11.7 34.4-.8 49l48 64c7.9 10.5 19.9 16 32 16 8.3 0 16.8-2.6 24-8 17.7-13.2 21.2-38.3 8-56l-29.4-39.2zm142.7-83.2l-61.5 51.2 25.6 32L216 448c-13.2 17.7-9.7 42.8 8 56 7.2 5.4 15.6 8 24 8 12.2 0 24.2-5.5 32-16l48-64c10.9-14.6 10.6-34.8-.8-49l-45.9-57.4zM376.7 145c-12.7-18.1-37.6-22.4-55.7-9.8l-40.6 28.5c-52.7 37-124.2 37-176.8 0L63 135.3C44.9 122.6 20 127 7.3 145-5.4 163.1-1 188 17 200.7l40.6 28.5c17 11.9 35.4 20.9 54.4 27.9V288h160v-30.8c19-7 37.4-16 54.4-27.9l40.6-28.5c18.1-12.8 22.4-37.7 9.7-55.8z"]},J={prefix:"fas",iconName:"baby-carriage",icon:[512,512,[],"f77d","M144.8 17c-11.3-17.8-37.2-22.8-54-9.4C35.3 51.9 0 118 0 192h256L144.8 17zM496 96h-48c-35.3 0-64 28.7-64 64v64H0c0 50.6 23 96.4 60.3 130.7C25.7 363.6 0 394.7 0 432c0 44.2 35.8 80 80 80s80-35.8 80-80c0-8.9-1.8-17.2-4.4-25.2 21.6 5.9 44.6 9.2 68.4 9.2s46.9-3.3 68.4-9.2c-2.7 8-4.4 16.3-4.4 25.2 0 44.2 35.8 80 80 80s80-35.8 80-80c0-37.3-25.7-68.4-60.3-77.3C425 320.4 448 274.6 448 224v-64h48c8.8 0 16-7.2 16-16v-32c0-8.8-7.2-16-16-16zM80 464c-17.6 0-32-14.4-32-32s14.4-32 32-32 32 14.4 32 32-14.4 32-32 32zm320-32c0 17.6-14.4 32-32 32s-32-14.4-32-32 14.4-32 32-32 32 14.4 32 32z"]},ee={prefix:"fas",iconName:"backspace",icon:[640,512,[],"f55a","M576 64H205.26A63.97 63.97 0 0 0 160 82.75L9.37 233.37c-12.5 12.5-12.5 32.76 0 45.25L160 429.25c12 12 28.28 18.75 45.25 18.75H576c35.35 0 64-28.65 64-64V128c0-35.35-28.65-64-64-64zm-84.69 254.06c6.25 6.25 6.25 16.38 0 22.63l-22.62 22.62c-6.25 6.25-16.38 6.25-22.63 0L384 301.25l-62.06 62.06c-6.25 6.25-16.38 6.25-22.63 0l-22.62-22.62c-6.25-6.25-6.25-16.38 0-22.63L338.75 256l-62.06-62.06c-6.25-6.25-6.25-16.38 0-22.63l22.62-22.62c6.25-6.25 16.38-6.25 22.63 0L384 210.75l62.06-62.06c6.25-6.25 16.38-6.25 22.63 0l22.62 22.62c6.25 6.25 6.25 16.38 0 22.63L429.25 256l62.06 62.06z"]},te={prefix:"fas",iconName:"backward",icon:[512,512,[],"f04a","M11.5 280.6l192 160c20.6 17.2 52.5 2.8 52.5-24.6V96c0-27.4-31.9-41.8-52.5-24.6l-192 160c-15.3 12.8-15.3 36.4 0 49.2zm256 0l192 160c20.6 17.2 52.5 2.8 52.5-24.6V96c0-27.4-31.9-41.8-52.5-24.6l-192 160c-15.3 12.8-15.3 36.4 0 49.2z"]},ie={prefix:"fas",iconName:"bacon",icon:[576,512,[],"f7e5","M218.92 336.39c34.89-34.89 44.2-59.7 54.05-86 10.61-28.29 21.59-57.54 61.37-97.34s69.05-50.77 97.35-61.38c23.88-9 46.64-17.68 76.79-45.37L470.81 8.91a31 31 0 0 0-40.18-2.83c-13.64 10.1-25.15 14.39-41 20.3C247 79.52 209.26 191.29 200.65 214.1c-29.75 78.83-89.55 94.68-98.72 98.09-24.86 9.26-54.73 20.38-91.07 50.36C-3 374-3.63 395 9.07 407.61l35.76 35.51C80 410.52 107 400.15 133 390.39c26.27-9.84 51.06-19.12 85.92-54zm348-232l-35.75-35.51c-35.19 32.63-62.18 43-88.25 52.79-26.26 9.85-51.06 19.16-85.95 54s-44.19 59.69-54 86C292.33 290 281.34 319.22 241.55 359s-69 50.73-97.3 61.32c-23.86 9-46.61 17.66-76.72 45.33l37.68 37.43a31 31 0 0 0 40.18 2.82c13.6-10.06 25.09-14.34 40.94-20.24 142.2-53 180-164.1 188.94-187.69C405 219.18 464.8 203.3 474 199.86c24.87-9.27 54.74-20.4 91.11-50.41 13.89-11.4 14.52-32.45 1.82-45.05z"]},ne={prefix:"fas",iconName:"bacteria",icon:[640,512,[],"e059","M272.35,226.4A17.71,17.71,0,0,0,281.46,203l-4-9.08a121.29,121.29,0,0,1,12.36-3.08A83.34,83.34,0,0,0,323.57,177l10,9a17.76,17.76,0,1,0,23.92-26.27l-9.72-8.76a83.12,83.12,0,0,0,11.65-48.18l11.85-3.51a17.73,17.73,0,1,0-10.15-34l-11.34,3.36a84,84,0,0,0-36.38-35.57l2.84-10.85a17.8,17.8,0,0,0-34.47-8.93l-2.82,10.78a83.25,83.25,0,0,0-16.74,1.1C250.83,27,240,30.22,229.1,33.39l-3.38-9.46a17.8,17.8,0,0,0-33.56,11.89l3.49,9.8a286.74,286.74,0,0,0-43.94,23.57l-6.32-8.43a17.9,17.9,0,0,0-24.94-3.6A17.69,17.69,0,0,0,116.84,82l6.45,8.61a286.59,286.59,0,0,0-34.95,35.33l-8.82-6.42a17.84,17.84,0,0,0-24.89,3.86,17.66,17.66,0,0,0,3.88,24.77l8.88,6.47a286.6,286.6,0,0,0-23,43.91l-10.48-3.59a17.73,17.73,0,1,0-11.59,33.52L32.67,232c-2.79,10-5.79,19.84-7.52,30.22a83.16,83.16,0,0,0-.82,19l-11.58,3.43a17.73,17.73,0,1,0,10.13,34l11.27-3.33a83.51,83.51,0,0,0,36.39,35.43l-2.88,11.06a17.81,17.81,0,0,0,34.48,8.92l2.87-11c1,0,2.07.26,3.1.26a83.39,83.39,0,0,0,45.65-13.88l8.59,8.8a17.77,17.77,0,0,0,25.56-24.7l-9.14-9.37a83.41,83.41,0,0,0,12.08-31.05,119.08,119.08,0,0,1,3.87-15.53l9,4.22a17.74,17.74,0,1,0,15.15-32.09l-8.8-4.11c.67-1,1.2-2.08,1.9-3.05a119.89,119.89,0,0,1,7.87-9.41,121.73,121.73,0,0,1,11.65-11.4,119.49,119.49,0,0,1,9.94-7.82c1.12-.77,2.32-1.42,3.47-2.15l3.92,8.85a17.86,17.86,0,0,0,16.32,10.58A18.14,18.14,0,0,0,272.35,226.4ZM128,256a32,32,0,1,1,32-32A32,32,0,0,1,128,256Zm80-96a16,16,0,1,1,16-16A16,16,0,0,1,208,160Zm431.26,45.3a17.79,17.79,0,0,0-17.06-12.69,17.55,17.55,0,0,0-5.08.74l-11.27,3.33a83.61,83.61,0,0,0-36.39-35.43l2.88-11.06a17.81,17.81,0,0,0-34.48-8.91l-2.87,11c-1,0-2.07-.26-3.1-.26a83.32,83.32,0,0,0-45.65,13.89l-8.59-8.81a17.77,17.77,0,0,0-25.56,24.7l9.14,9.37a83.28,83.28,0,0,0-12.08,31.06,119.34,119.34,0,0,1-3.87,15.52l-9-4.22a17.74,17.74,0,1,0-15.15,32.09l8.8,4.11c-.67,1-1.2,2.08-1.89,3.05a117.71,117.71,0,0,1-7.94,9.47,119,119,0,0,1-11.57,11.33,121.59,121.59,0,0,1-10,7.83c-1.12.77-2.32,1.42-3.47,2.15l-3.92-8.85a17.86,17.86,0,0,0-16.32-10.58,18.14,18.14,0,0,0-7.18,1.5A17.71,17.71,0,0,0,358.54,309l4,9.08a118.71,118.71,0,0,1-12.36,3.08,83.34,83.34,0,0,0-33.77,13.9l-10-9a17.77,17.77,0,1,0-23.92,26.28l9.72,8.75a83.12,83.12,0,0,0-11.65,48.18l-11.86,3.51a17.73,17.73,0,1,0,10.16,34l11.34-3.36A84,84,0,0,0,326.61,479l-2.84,10.85a17.8,17.8,0,0,0,34.47,8.93L361.06,488a83.3,83.3,0,0,0,16.74-1.1c11.37-1.89,22.24-5.07,33.1-8.24l3.38,9.46a17.8,17.8,0,0,0,33.56-11.89l-3.49-9.79a287.66,287.66,0,0,0,43.94-23.58l6.32,8.43a17.88,17.88,0,0,0,24.93,3.6A17.67,17.67,0,0,0,523.16,430l-6.45-8.61a287.37,287.37,0,0,0,34.95-35.34l8.82,6.42a17.76,17.76,0,1,0,21-28.63l-8.88-6.46a287.17,287.17,0,0,0,23-43.92l10.48,3.59a17.73,17.73,0,1,0,11.59-33.52L607.33,280c2.79-10,5.79-19.84,7.52-30.21a83.27,83.27,0,0,0,.82-19.05l11.58-3.43A17.7,17.7,0,0,0,639.26,205.3ZM416,416a32,32,0,1,1,32-32A32,32,0,0,1,416,416Z"]},se={prefix:"fas",iconName:"bacterium",icon:[512,512,[],"e05a","M511,102.93A23.76,23.76,0,0,0,481.47,87l-15.12,4.48a111.85,111.85,0,0,0-48.5-47.42l3.79-14.47a23.74,23.74,0,0,0-46-11.91l-3.76,14.37a111.94,111.94,0,0,0-22.33,1.47,386.74,386.74,0,0,0-44.33,10.41l-4.3-12a23.74,23.74,0,0,0-44.75,15.85l4.3,12.05a383.4,383.4,0,0,0-58.69,31.83l-8-10.63a23.85,23.85,0,0,0-33.24-4.8,23.57,23.57,0,0,0-4.83,33.09l8,10.63a386.14,386.14,0,0,0-46.7,47.44l-11-8a23.68,23.68,0,1,0-28,38.17l11.09,8.06a383.45,383.45,0,0,0-30.92,58.75l-12.93-4.43a23.65,23.65,0,1,0-15.47,44.69l13,4.48a385.81,385.81,0,0,0-9.3,40.53A111.58,111.58,0,0,0,32.44,375L17,379.56a23.64,23.64,0,0,0,13.51,45.31l15-4.44a111.49,111.49,0,0,0,48.53,47.24l-3.85,14.75a23.66,23.66,0,0,0,17,28.83,24.7,24.7,0,0,0,6,.75,23.73,23.73,0,0,0,23-17.7L140,479.67c1.37.05,2.77.35,4.13.35A111.22,111.22,0,0,0,205,461.5l11.45,11.74a23.7,23.7,0,0,0,34.08-32.93l-12.19-12.5a111,111,0,0,0,16.11-41.4,158.69,158.69,0,0,1,5.16-20.71l12,5.64a23.66,23.66,0,1,0,20.19-42.79l-11.72-5.49c.89-1.32,1.59-2.77,2.52-4.06a157.86,157.86,0,0,1,10.46-12.49,159.5,159.5,0,0,1,15.59-15.28,162.18,162.18,0,0,1,13.23-10.4c1.5-1,3.1-1.89,4.63-2.87l5.23,11.8a23.74,23.74,0,0,0,43.48-19.08l-5.36-12.11a158.87,158.87,0,0,1,16.49-4.1,111,111,0,0,0,45-18.54l13.33,12a23.69,23.69,0,1,0,31.88-35l-12.94-11.67A110.83,110.83,0,0,0,479.21,137L495,132.32A23.61,23.61,0,0,0,511,102.93ZM160,368a48,48,0,1,1,48-48A48,48,0,0,1,160,368Zm80-136a24,24,0,1,1,24-24A24,24,0,0,1,240,232Z"]},re={prefix:"fas",iconName:"bahai",icon:[512,512,[],"f666","M496.25 202.52l-110-15.44 41.82-104.34c6.67-16.64-11.6-32.18-26.59-22.63L307.44 120 273.35 12.82C270.64 4.27 263.32 0 256 0c-7.32 0-14.64 4.27-17.35 12.82l-34.09 107.19-94.04-59.89c-14.99-9.55-33.25 5.99-26.59 22.63l41.82 104.34-110 15.43c-17.54 2.46-21.68 26.27-6.03 34.67l98.16 52.66-74.48 83.54c-10.92 12.25-1.72 30.93 13.29 30.93 1.31 0 2.67-.14 4.07-.45l108.57-23.65-4.11 112.55c-.43 11.65 8.87 19.22 18.41 19.22 5.15 0 10.39-2.21 14.2-7.18l68.18-88.9 68.18 88.9c3.81 4.97 9.04 7.18 14.2 7.18 9.54 0 18.84-7.57 18.41-19.22l-4.11-112.55 108.57 23.65c17.36 3.76 29.21-17.2 17.35-30.49l-74.48-83.54 98.16-52.66c15.64-8.39 11.5-32.2-6.04-34.66zM338.51 311.68l-51.89-11.3 1.97 53.79L256 311.68l-32.59 42.49 1.96-53.79-51.89 11.3 35.6-39.93-46.92-25.17 52.57-7.38-19.99-49.87 44.95 28.62L256 166.72l16.29 51.23 44.95-28.62-19.99 49.87 52.57 7.38-46.92 25.17 35.61 39.93z"]},oe={prefix:"fas",iconName:"balance-scale",icon:[640,512,[],"f24e","M256 336h-.02c0-16.18 1.34-8.73-85.05-181.51-17.65-35.29-68.19-35.36-85.87 0C-2.06 328.75.02 320.33.02 336H0c0 44.18 57.31 80 128 80s128-35.82 128-80zM128 176l72 144H56l72-144zm511.98 160c0-16.18 1.34-8.73-85.05-181.51-17.65-35.29-68.19-35.36-85.87 0-87.12 174.26-85.04 165.84-85.04 181.51H384c0 44.18 57.31 80 128 80s128-35.82 128-80h-.02zM440 320l72-144 72 144H440zm88 128H352V153.25c23.51-10.29 41.16-31.48 46.39-57.25H528c8.84 0 16-7.16 16-16V48c0-8.84-7.16-16-16-16H383.64C369.04 12.68 346.09 0 320 0s-49.04 12.68-63.64 32H112c-8.84 0-16 7.16-16 16v32c0 8.84 7.16 16 16 16h129.61c5.23 25.76 22.87 46.96 46.39 57.25V448H112c-8.84 0-16 7.16-16 16v32c0 8.84 7.16 16 16 16h416c8.84 0 16-7.16 16-16v-32c0-8.84-7.16-16-16-16z"]},ae={prefix:"fas",iconName:"balance-scale-left",icon:[640,512,[],"f515","M528 448H352V153.25c20.42-8.94 36.1-26.22 43.38-47.47l132-44.26c8.38-2.81 12.89-11.88 10.08-20.26l-10.17-30.34C524.48 2.54 515.41-1.97 507.03.84L389.11 40.37C375.3 16.36 349.69 0 320 0c-44.18 0-80 35.82-80 80 0 3.43.59 6.71 1.01 10.03l-128.39 43.05c-8.38 2.81-12.89 11.88-10.08 20.26l10.17 30.34c2.81 8.38 11.88 12.89 20.26 10.08l142.05-47.63c4.07 2.77 8.43 5.12 12.99 7.12V496c0 8.84 7.16 16 16 16h224c8.84 0 16-7.16 16-16v-32c-.01-8.84-7.17-16-16.01-16zm111.98-144c0-16.18 1.34-8.73-85.05-181.51-17.65-35.29-68.19-35.36-85.87 0-87.12 174.26-85.04 165.84-85.04 181.51H384c0 44.18 57.31 80 128 80s128-35.82 128-80h-.02zM440 288l72-144 72 144H440zm-269.07-37.51c-17.65-35.29-68.19-35.36-85.87 0C-2.06 424.75.02 416.33.02 432H0c0 44.18 57.31 80 128 80s128-35.82 128-80h-.02c0-16.18 1.34-8.73-85.05-181.51zM56 416l72-144 72 144H56z"]},le={prefix:"fas",iconName:"balance-scale-right",icon:[640,512,[],"f516","M96 464v32c0 8.84 7.16 16 16 16h224c8.84 0 16-7.16 16-16V153.25c4.56-2 8.92-4.35 12.99-7.12l142.05 47.63c8.38 2.81 17.45-1.71 20.26-10.08l10.17-30.34c2.81-8.38-1.71-17.45-10.08-20.26l-128.4-43.05c.42-3.32 1.01-6.6 1.01-10.03 0-44.18-35.82-80-80-80-29.69 0-55.3 16.36-69.11 40.37L132.96.83c-8.38-2.81-17.45 1.71-20.26 10.08l-10.17 30.34c-2.81 8.38 1.71 17.45 10.08 20.26l132 44.26c7.28 21.25 22.96 38.54 43.38 47.47V448H112c-8.84 0-16 7.16-16 16zM0 304c0 44.18 57.31 80 128 80s128-35.82 128-80h-.02c0-15.67 2.08-7.25-85.05-181.51-17.68-35.36-68.22-35.29-85.87 0C-1.32 295.27.02 287.82.02 304H0zm56-16l72-144 72 144H56zm328.02 144H384c0 44.18 57.31 80 128 80s128-35.82 128-80h-.02c0-15.67 2.08-7.25-85.05-181.51-17.68-35.36-68.22-35.29-85.87 0-86.38 172.78-85.04 165.33-85.04 181.51zM440 416l72-144 72 144H440z"]},ce={prefix:"fas",iconName:"ban",icon:[512,512,[],"f05e","M256 8C119.034 8 8 119.033 8 256s111.034 248 248 248 248-111.034 248-248S392.967 8 256 8zm130.108 117.892c65.448 65.448 70 165.481 20.677 235.637L150.47 105.216c70.204-49.356 170.226-44.735 235.638 20.676zM125.892 386.108c-65.448-65.448-70-165.481-20.677-235.637L361.53 406.784c-70.203 49.356-170.226 44.736-235.638-20.676z"]},he={prefix:"fas",iconName:"band-aid",icon:[640,512,[],"f462","M0 160v192c0 35.3 28.7 64 64 64h96V96H64c-35.3 0-64 28.7-64 64zm576-64h-96v320h96c35.3 0 64-28.7 64-64V160c0-35.3-28.7-64-64-64zM192 416h256V96H192v320zm176-232c13.3 0 24 10.7 24 24s-10.7 24-24 24-24-10.7-24-24 10.7-24 24-24zm0 96c13.3 0 24 10.7 24 24s-10.7 24-24 24-24-10.7-24-24 10.7-24 24-24zm-96-96c13.3 0 24 10.7 24 24s-10.7 24-24 24-24-10.7-24-24 10.7-24 24-24zm0 96c13.3 0 24 10.7 24 24s-10.7 24-24 24-24-10.7-24-24 10.7-24 24-24z"]},de={prefix:"fas",iconName:"barcode",icon:[512,512,[],"f02a","M0 448V64h18v384H0zm26.857-.273V64H36v383.727h-9.143zm27.143 0V64h8.857v383.727H54zm44.857 0V64h8.857v383.727h-8.857zm36 0V64h17.714v383.727h-17.714zm44.857 0V64h8.857v383.727h-8.857zm18 0V64h8.857v383.727h-8.857zm18 0V64h8.857v383.727h-8.857zm35.715 0V64h18v383.727h-18zm44.857 0V64h18v383.727h-18zm35.999 0V64h18.001v383.727h-18.001zm36.001 0V64h18.001v383.727h-18.001zm26.857 0V64h18v383.727h-18zm45.143 0V64h26.857v383.727h-26.857zm35.714 0V64h9.143v383.727H476zm18 .273V64h18v384h-18z"]},ue={prefix:"fas",iconName:"bars",icon:[448,512,[],"f0c9","M16 132h416c8.837 0 16-7.163 16-16V76c0-8.837-7.163-16-16-16H16C7.163 60 0 67.163 0 76v40c0 8.837 7.163 16 16 16zm0 160h416c8.837 0 16-7.163 16-16v-40c0-8.837-7.163-16-16-16H16c-8.837 0-16 7.163-16 16v40c0 8.837 7.163 16 16 16zm0 160h416c8.837 0 16-7.163 16-16v-40c0-8.837-7.163-16-16-16H16c-8.837 0-16 7.163-16 16v40c0 8.837 7.163 16 16 16z"]},pe={prefix:"fas",iconName:"baseball-ball",icon:[496,512,[],"f433","M368.5 363.9l28.8-13.9c11.1 22.9 26 43.2 44.1 60.9 34-42.5 54.5-96.3 54.5-154.9 0-58.5-20.4-112.2-54.2-154.6-17.8 17.3-32.6 37.1-43.6 59.5l-28.7-14.1c12.8-26 30-49 50.8-69C375.6 34.7 315 8 248 8 181.1 8 120.5 34.6 75.9 77.7c20.7 19.9 37.9 42.9 50.7 68.8l-28.7 14.1c-11-22.3-25.7-42.1-43.5-59.4C20.4 143.7 0 197.4 0 256c0 58.6 20.4 112.3 54.4 154.7 18.2-17.7 33.2-38 44.3-61l28.8 13.9c-12.9 26.7-30.3 50.3-51.5 70.7 44.5 43.1 105.1 69.7 172 69.7 66.8 0 127.3-26.5 171.9-69.5-21.1-20.4-38.5-43.9-51.4-70.6zm-228.3-32l-30.5-9.8c14.9-46.4 12.7-93.8-.6-134l30.4-10c15 45.6 18 99.9.7 153.8zm216.3-153.4l30.4 10c-13.2 40.1-15.5 87.5-.6 134l-30.5 9.8c-17.3-54-14.3-108.3.7-153.8z"]},ge={prefix:"fas",iconName:"basketball-ball",icon:[496,512,[],"f434","M212.3 10.3c-43.8 6.3-86.2 24.1-122.2 53.8l77.4 77.4c27.8-35.8 43.3-81.2 44.8-131.2zM248 222L405.9 64.1c-42.4-35-93.6-53.5-145.5-56.1-1.2 63.9-21.5 122.3-58.7 167.7L248 222zM56.1 98.1c-29.7 36-47.5 78.4-53.8 122.2 50-1.5 95.5-17 131.2-44.8L56.1 98.1zm272.2 204.2c45.3-37.1 103.7-57.4 167.7-58.7-2.6-51.9-21.1-103.1-56.1-145.5L282 256l46.3 46.3zM248 290L90.1 447.9c42.4 34.9 93.6 53.5 145.5 56.1 1.3-64 21.6-122.4 58.7-167.7L248 290zm191.9 123.9c29.7-36 47.5-78.4 53.8-122.2-50.1 1.6-95.5 17.1-131.2 44.8l77.4 77.4zM167.7 209.7C122.3 246.9 63.9 267.3 0 268.4c2.6 51.9 21.1 103.1 56.1 145.5L214 256l-46.3-46.3zm116 292c43.8-6.3 86.2-24.1 122.2-53.8l-77.4-77.4c-27.7 35.7-43.2 81.2-44.8 131.2z"]},fe={prefix:"fas",iconName:"bath",icon:[512,512,[],"f2cd","M32,384a95.4,95.4,0,0,0,32,71.09V496a16,16,0,0,0,16,16h32a16,16,0,0,0,16-16V480H384v16a16,16,0,0,0,16,16h32a16,16,0,0,0,16-16V455.09A95.4,95.4,0,0,0,480,384V336H32ZM496,256H80V69.25a21.26,21.26,0,0,1,36.28-15l19.27,19.26c-13.13,29.88-7.61,59.11,8.62,79.73l-.17.17A16,16,0,0,0,144,176l11.31,11.31a16,16,0,0,0,22.63,0L283.31,81.94a16,16,0,0,0,0-22.63L272,48a16,16,0,0,0-22.62,0l-.17.17c-20.62-16.23-49.83-21.75-79.73-8.62L150.22,20.28A69.25,69.25,0,0,0,32,69.25V256H16A16,16,0,0,0,0,272v16a16,16,0,0,0,16,16H496a16,16,0,0,0,16-16V272A16,16,0,0,0,496,256Z"]},me={prefix:"fas",iconName:"battery-empty",icon:[640,512,[],"f244","M544 160v64h32v64h-32v64H64V160h480m16-64H48c-26.51 0-48 21.49-48 48v224c0 26.51 21.49 48 48 48h512c26.51 0 48-21.49 48-48v-16h8c13.255 0 24-10.745 24-24V184c0-13.255-10.745-24-24-24h-8v-16c0-26.51-21.49-48-48-48z"]},ve={prefix:"fas",iconName:"battery-full",icon:[640,512,[],"f240","M544 160v64h32v64h-32v64H64V160h480m16-64H48c-26.51 0-48 21.49-48 48v224c0 26.51 21.49 48 48 48h512c26.51 0 48-21.49 48-48v-16h8c13.255 0 24-10.745 24-24V184c0-13.255-10.745-24-24-24h-8v-16c0-26.51-21.49-48-48-48zm-48 96H96v128h416V192z"]},ye={prefix:"fas",iconName:"battery-half",icon:[640,512,[],"f242","M544 160v64h32v64h-32v64H64V160h480m16-64H48c-26.51 0-48 21.49-48 48v224c0 26.51 21.49 48 48 48h512c26.51 0 48-21.49 48-48v-16h8c13.255 0 24-10.745 24-24V184c0-13.255-10.745-24-24-24h-8v-16c0-26.51-21.49-48-48-48zm-240 96H96v128h224V192z"]},Ce={prefix:"fas",iconName:"battery-quarter",icon:[640,512,[],"f243","M544 160v64h32v64h-32v64H64V160h480m16-64H48c-26.51 0-48 21.49-48 48v224c0 26.51 21.49 48 48 48h512c26.51 0 48-21.49 48-48v-16h8c13.255 0 24-10.745 24-24V184c0-13.255-10.745-24-24-24h-8v-16c0-26.51-21.49-48-48-48zm-336 96H96v128h128V192z"]},be={prefix:"fas",iconName:"battery-three-quarters",icon:[640,512,[],"f241","M544 160v64h32v64h-32v64H64V160h480m16-64H48c-26.51 0-48 21.49-48 48v224c0 26.51 21.49 48 48 48h512c26.51 0 48-21.49 48-48v-16h8c13.255 0 24-10.745 24-24V184c0-13.255-10.745-24-24-24h-8v-16c0-26.51-21.49-48-48-48zm-144 96H96v128h320V192z"]},Se={prefix:"fas",iconName:"bed",icon:[640,512,[],"f236","M176 256c44.11 0 80-35.89 80-80s-35.89-80-80-80-80 35.89-80 80 35.89 80 80 80zm352-128H304c-8.84 0-16 7.16-16 16v144H64V80c0-8.84-7.16-16-16-16H16C7.16 64 0 71.16 0 80v352c0 8.84 7.16 16 16 16h32c8.84 0 16-7.16 16-16v-48h512v48c0 8.84 7.16 16 16 16h32c8.84 0 16-7.16 16-16V240c0-61.86-50.14-112-112-112z"]},we={prefix:"fas",iconName:"beer",icon:[448,512,[],"f0fc","M368 96h-48V56c0-13.255-10.745-24-24-24H24C10.745 32 0 42.745 0 56v400c0 13.255 10.745 24 24 24h272c13.255 0 24-10.745 24-24v-42.11l80.606-35.977C429.396 365.063 448 336.388 448 304.86V176c0-44.112-35.888-80-80-80zm16 208.86a16.018 16.018 0 0 1-9.479 14.611L320 343.805V160h48c8.822 0 16 7.178 16 16v128.86zM208 384c-8.836 0-16-7.164-16-16V144c0-8.836 7.164-16 16-16s16 7.164 16 16v224c0 8.836-7.164 16-16 16zm-96 0c-8.836 0-16-7.164-16-16V144c0-8.836 7.164-16 16-16s16 7.164 16 16v224c0 8.836-7.164 16-16 16z"]},xe={prefix:"fas",iconName:"bell",icon:[448,512,[],"f0f3","M224 512c35.32 0 63.97-28.65 63.97-64H160.03c0 35.35 28.65 64 63.97 64zm215.39-149.71c-19.32-20.76-55.47-51.99-55.47-154.29 0-77.7-54.48-139.9-127.94-155.16V32c0-17.67-14.32-32-31.98-32s-31.98 14.33-31.98 32v20.84C118.56 68.1 64.08 130.3 64.08 208c0 102.3-36.15 133.53-55.47 154.29-6 6.45-8.66 14.16-8.61 21.71.11 16.4 12.98 32 32.1 32h383.8c19.12 0 32-15.6 32.1-32 .05-7.55-2.61-15.27-8.61-21.71z"]},Ee={prefix:"fas",iconName:"bell-slash",icon:[640,512,[],"f1f6","M633.82 458.1l-90.62-70.05c.19-1.38.8-2.66.8-4.06.05-7.55-2.61-15.27-8.61-21.71-19.32-20.76-55.47-51.99-55.47-154.29 0-77.7-54.48-139.9-127.94-155.16V32c0-17.67-14.32-32-31.98-32s-31.98 14.33-31.98 32v20.84c-40.33 8.38-74.66 31.07-97.59 62.57L45.47 3.37C38.49-2.05 28.43-.8 23.01 6.18L3.37 31.45C-2.05 38.42-.8 48.47 6.18 53.9l588.35 454.73c6.98 5.43 17.03 4.17 22.46-2.81l19.64-25.27c5.42-6.97 4.17-17.02-2.81-22.45zM157.23 251.54c-8.61 67.96-36.41 93.33-52.62 110.75-6 6.45-8.66 14.16-8.61 21.71.11 16.4 12.98 32 32.1 32h241.92L157.23 251.54zM320 512c35.32 0 63.97-28.65 63.97-64H256.03c0 35.35 28.65 64 63.97 64z"]},Me={prefix:"fas",iconName:"bezier-curve",icon:[640,512,[],"f55b","M368 32h-96c-17.67 0-32 14.33-32 32v96c0 17.67 14.33 32 32 32h96c17.67 0 32-14.33 32-32V64c0-17.67-14.33-32-32-32zM208 88h-84.75C113.75 64.56 90.84 48 64 48 28.66 48 0 76.65 0 112s28.66 64 64 64c26.84 0 49.75-16.56 59.25-40h79.73c-55.37 32.52-95.86 87.32-109.54 152h49.4c11.3-41.61 36.77-77.21 71.04-101.56-3.7-8.08-5.88-16.99-5.88-26.44V88zm-48 232H64c-17.67 0-32 14.33-32 32v96c0 17.67 14.33 32 32 32h96c17.67 0 32-14.33 32-32v-96c0-17.67-14.33-32-32-32zM576 48c-26.84 0-49.75 16.56-59.25 40H432v72c0 9.45-2.19 18.36-5.88 26.44 34.27 24.35 59.74 59.95 71.04 101.56h49.4c-13.68-64.68-54.17-119.48-109.54-152h79.73c9.5 23.44 32.41 40 59.25 40 35.34 0 64-28.65 64-64s-28.66-64-64-64zm0 272h-96c-17.67 0-32 14.33-32 32v96c0 17.67 14.33 32 32 32h96c17.67 0 32-14.33 32-32v-96c0-17.67-14.33-32-32-32z"]},Ae={prefix:"fas",iconName:"bible",icon:[448,512,[],"f647","M448 358.4V25.6c0-16-9.6-25.6-25.6-25.6H96C41.6 0 0 41.6 0 96v320c0 54.4 41.6 96 96 96h326.4c12.8 0 25.6-9.6 25.6-25.6v-16c0-6.4-3.2-12.8-9.6-19.2-3.2-16-3.2-60.8 0-73.6 6.4-3.2 9.6-9.6 9.6-19.2zM144 144c0-8.84 7.16-16 16-16h48V80c0-8.84 7.16-16 16-16h32c8.84 0 16 7.16 16 16v48h48c8.84 0 16 7.16 16 16v32c0 8.84-7.16 16-16 16h-48v112c0 8.84-7.16 16-16 16h-32c-8.84 0-16-7.16-16-16V192h-48c-8.84 0-16-7.16-16-16v-32zm236.8 304H96c-19.2 0-32-12.8-32-32s16-32 32-32h284.8v64z"]},Te={prefix:"fas",iconName:"bicycle",icon:[640,512,[],"f206","M512.509 192.001c-16.373-.064-32.03 2.955-46.436 8.495l-77.68-125.153A24 24 0 0 0 368.001 64h-64c-8.837 0-16 7.163-16 16v16c0 8.837 7.163 16 16 16h50.649l14.896 24H256.002v-16c0-8.837-7.163-16-16-16h-87.459c-13.441 0-24.777 10.999-24.536 24.437.232 13.044 10.876 23.563 23.995 23.563h48.726l-29.417 47.52c-13.433-4.83-27.904-7.483-42.992-7.52C58.094 191.83.412 249.012.002 319.236-.413 390.279 57.055 448 128.002 448c59.642 0 109.758-40.793 123.967-96h52.033a24 24 0 0 0 20.406-11.367L410.37 201.77l14.938 24.067c-25.455 23.448-41.385 57.081-41.307 94.437.145 68.833 57.899 127.051 126.729 127.719 70.606.685 128.181-55.803 129.255-125.996 1.086-70.941-56.526-129.72-127.476-129.996zM186.75 265.772c9.727 10.529 16.673 23.661 19.642 38.228h-43.306l23.664-38.228zM128.002 400c-44.112 0-80-35.888-80-80s35.888-80 80-80c5.869 0 11.586.653 17.099 1.859l-45.505 73.509C89.715 331.327 101.213 352 120.002 352h81.3c-12.37 28.225-40.562 48-73.3 48zm162.63-96h-35.624c-3.96-31.756-19.556-59.894-42.383-80.026L237.371 184h127.547l-74.286 120zm217.057 95.886c-41.036-2.165-74.049-35.692-75.627-76.755-.812-21.121 6.633-40.518 19.335-55.263l44.433 71.586c4.66 7.508 14.524 9.816 22.032 5.156l13.594-8.437c7.508-4.66 9.817-14.524 5.156-22.032l-44.468-71.643a79.901 79.901 0 0 1 19.858-2.497c44.112 0 80 35.888 80 80-.001 45.54-38.252 82.316-84.313 79.885z"]},De={prefix:"fas",iconName:"biking",icon:[640,512,[],"f84a","M400 96a48 48 0 1 0-48-48 48 48 0 0 0 48 48zm-4 121a31.9 31.9 0 0 0 20 7h64a32 32 0 0 0 0-64h-52.78L356 103a31.94 31.94 0 0 0-40.81.68l-112 96a32 32 0 0 0 3.08 50.92L288 305.12V416a32 32 0 0 0 64 0V288a32 32 0 0 0-14.25-26.62l-41.36-27.57 58.25-49.92zm116 39a128 128 0 1 0 128 128 128 128 0 0 0-128-128zm0 192a64 64 0 1 1 64-64 64 64 0 0 1-64 64zM128 256a128 128 0 1 0 128 128 128 128 0 0 0-128-128zm0 192a64 64 0 1 1 64-64 64 64 0 0 1-64 64z"]},Ie={prefix:"fas",iconName:"binoculars",icon:[512,512,[],"f1e5","M416 48c0-8.84-7.16-16-16-16h-64c-8.84 0-16 7.16-16 16v48h96V48zM63.91 159.99C61.4 253.84 3.46 274.22 0 404v44c0 17.67 14.33 32 32 32h96c17.67 0 32-14.33 32-32V288h32V128H95.84c-17.63 0-31.45 14.37-31.93 31.99zm384.18 0c-.48-17.62-14.3-31.99-31.93-31.99H320v160h32v160c0 17.67 14.33 32 32 32h96c17.67 0 32-14.33 32-32v-44c-3.46-129.78-61.4-150.16-63.91-244.01zM176 32h-64c-8.84 0-16 7.16-16 16v48h96V48c0-8.84-7.16-16-16-16zm48 256h64V128h-64v160z"]},Re={prefix:"fas",iconName:"biohazard",icon:[576,512,[],"f780","M287.9 112c18.6 0 36.2 3.8 52.8 9.6 13.3-10.3 23.6-24.3 29.5-40.7-25.2-10.9-53-17-82.2-17-29.1 0-56.9 6-82.1 16.9 5.9 16.4 16.2 30.4 29.5 40.7 16.5-5.7 34-9.5 52.5-9.5zM163.6 438.7c12-11.8 20.4-26.4 24.5-42.4-32.9-26.4-54.8-65.3-58.9-109.6-8.5-2.8-17.2-4.6-26.4-4.6-7.6 0-15.2 1-22.5 3.1 4.1 62.8 35.8 118 83.3 153.5zm224.2-42.6c4.1 16 12.5 30.7 24.5 42.5 47.4-35.5 79.1-90.7 83-153.5-7.2-2-14.7-3-22.2-3-9.2 0-18 1.9-26.6 4.7-4.1 44.2-26 82.9-58.7 109.3zm113.5-205c-17.6-10.4-36.3-16.6-55.3-19.9 6-17.7 10-36.4 10-56.2 0-41-14.5-80.8-41-112.2-2.5-3-6.6-3.7-10-1.8-3.3 1.9-4.8 6-3.6 9.7 4.5 13.8 6.6 26.3 6.6 38.5 0 67.8-53.8 122.9-120 122.9S168 117 168 49.2c0-12.1 2.2-24.7 6.6-38.5 1.2-3.7-.3-7.8-3.6-9.7-3.4-1.9-7.5-1.2-10 1.8C134.6 34.2 120 74 120 115c0 19.8 3.9 38.5 10 56.2-18.9 3.3-37.7 9.5-55.3 19.9-34.6 20.5-61 53.3-74.3 92.4-1.3 3.7.2 7.7 3.5 9.8 3.3 2 7.5 1.3 10-1.6 9.4-10.8 19-19.1 29.2-25.1 57.3-33.9 130.8-13.7 163.9 45 33.1 58.7 13.4 134-43.9 167.9-10.2 6.1-22 10.4-35.8 13.4-3.7.8-6.4 4.2-6.4 8.1.1 4 2.7 7.3 6.5 8 39.7 7.8 80.6.8 115.2-19.7 18-10.6 32.9-24.5 45.3-40.1 12.4 15.6 27.3 29.5 45.3 40.1 34.6 20.5 75.5 27.5 115.2 19.7 3.8-.7 6.4-4 6.5-8 0-3.9-2.6-7.3-6.4-8.1-13.9-2.9-25.6-7.3-35.8-13.4-57.3-33.9-77-109.2-43.9-167.9s106.6-78.9 163.9-45c10.2 6.1 19.8 14.3 29.2 25.1 2.5 2.9 6.7 3.6 10 1.6s4.8-6.1 3.5-9.8c-13.1-39.1-39.5-72-74.1-92.4zm-213.4 129c-26.5 0-48-21.5-48-48s21.5-48 48-48 48 21.5 48 48-21.5 48-48 48z"]},Le={prefix:"fas",iconName:"birthday-cake",icon:[448,512,[],"f1fd","M448 384c-28.02 0-31.26-32-74.5-32-43.43 0-46.825 32-74.75 32-27.695 0-31.454-32-74.75-32-42.842 0-47.218 32-74.5 32-28.148 0-31.202-32-74.75-32-43.547 0-46.653 32-74.75 32v-80c0-26.5 21.5-48 48-48h16V112h64v144h64V112h64v144h64V112h64v144h16c26.5 0 48 21.5 48 48v80zm0 128H0v-96c43.356 0 46.767-32 74.75-32 27.951 0 31.253 32 74.75 32 42.843 0 47.217-32 74.5-32 28.148 0 31.201 32 74.75 32 43.357 0 46.767-32 74.75-32 27.488 0 31.252 32 74.5 32v96zM96 96c-17.75 0-32-14.25-32-32 0-31 32-23 32-64 12 0 32 29.5 32 56s-14.25 40-32 40zm128 0c-17.75 0-32-14.25-32-32 0-31 32-23 32-64 12 0 32 29.5 32 56s-14.25 40-32 40zm128 0c-17.75 0-32-14.25-32-32 0-31 32-23 32-64 12 0 32 29.5 32 56s-14.25 40-32 40z"]},ke={prefix:"fas",iconName:"blender",icon:[512,512,[],"f517","M416 384H160c-35.35 0-64 28.65-64 64v32c0 17.67 14.33 32 32 32h320c17.67 0 32-14.33 32-32v-32c0-35.35-28.65-64-64-64zm-128 96c-17.67 0-32-14.33-32-32s14.33-32 32-32 32 14.33 32 32-14.33 32-32 32zm40-416h166.54L512 0H48C21.49 0 0 21.49 0 48v160c0 26.51 21.49 48 48 48h103.27l8.73 96h256l17.46-64H328c-4.42 0-8-3.58-8-8v-16c0-4.42 3.58-8 8-8h114.18l17.46-64H328c-4.42 0-8-3.58-8-8v-16c0-4.42 3.58-8 8-8h140.36l17.46-64H328c-4.42 0-8-3.58-8-8V72c0-4.42 3.58-8 8-8zM64 192V64h69.82l11.64 128H64z"]},Pe={prefix:"fas",iconName:"blender-phone",icon:[576,512,[],"f6b6","M392 64h166.54L576 0H192v352h288l17.46-64H392c-4.42 0-8-3.58-8-8v-16c0-4.42 3.58-8 8-8h114.18l17.46-64H392c-4.42 0-8-3.58-8-8v-16c0-4.42 3.58-8 8-8h140.36l17.46-64H392c-4.42 0-8-3.58-8-8V72c0-4.42 3.58-8 8-8zM158.8 335.01l-25.78-63.26c-2.78-6.81-9.8-10.99-17.24-10.26l-45.03 4.42c-17.28-46.94-17.65-99.78 0-147.72l45.03 4.42c7.43.73 14.46-3.46 17.24-10.26l25.78-63.26c3.02-7.39.2-15.85-6.68-20.07l-39.28-24.1C98.51-3.87 80.09-.5 68.95 11.97c-92.57 103.6-92 259.55 2.1 362.49 9.87 10.8 29.12 12.48 41.65 4.8l39.41-24.18c6.89-4.22 9.7-12.67 6.69-20.07zM480 384H192c-35.35 0-64 28.65-64 64v32c0 17.67 14.33 32 32 32h352c17.67 0 32-14.33 32-32v-32c0-35.35-28.65-64-64-64zm-144 96c-17.67 0-32-14.33-32-32s14.33-32 32-32 32 14.33 32 32-14.33 32-32 32z"]},Ne={prefix:"fas",iconName:"blind",icon:[384,512,[],"f29d","M380.15 510.837a8 8 0 0 1-10.989-2.687l-125.33-206.427a31.923 31.923 0 0 0 12.958-9.485l126.048 207.608a8 8 0 0 1-2.687 10.991zM142.803 314.338l-32.54 89.485 36.12 88.285c6.693 16.36 25.377 24.192 41.733 17.501 16.357-6.692 24.193-25.376 17.501-41.734l-62.814-153.537zM96 88c24.301 0 44-19.699 44-44S120.301 0 96 0 52 19.699 52 44s19.699 44 44 44zm154.837 169.128l-120-152c-4.733-5.995-11.75-9.108-18.837-9.112V96H80v.026c-7.146.003-14.217 3.161-18.944 9.24L0 183.766v95.694c0 13.455 11.011 24.791 24.464 24.536C37.505 303.748 48 293.1 48 280v-79.766l16-20.571v140.698L9.927 469.055c-6.04 16.609 2.528 34.969 19.138 41.009 16.602 6.039 34.968-2.524 41.009-19.138L136 309.638V202.441l-31.406-39.816a4 4 0 1 1 6.269-4.971l102.3 129.217c9.145 11.584 24.368 11.339 33.708 3.965 10.41-8.216 12.159-23.334 3.966-33.708z"]},Oe={prefix:"fas",iconName:"blog",icon:[512,512,[],"f781","M172.2 226.8c-14.6-2.9-28.2 8.9-28.2 23.8V301c0 10.2 7.1 18.4 16.7 22 18.2 6.8 31.3 24.4 31.3 45 0 26.5-21.5 48-48 48s-48-21.5-48-48V120c0-13.3-10.7-24-24-24H24c-13.3 0-24 10.7-24 24v248c0 89.5 82.1 160.2 175 140.7 54.4-11.4 98.3-55.4 109.7-109.7 17.4-82.9-37-157.2-112.5-172.2zM209 0c-9.2-.5-17 6.8-17 16v31.6c0 8.5 6.6 15.5 15 15.9 129.4 7 233.4 112 240.9 241.5.5 8.4 7.5 15 15.9 15h32.1c9.2 0 16.5-7.8 16-17C503.4 139.8 372.2 8.6 209 0zm.3 96c-9.3-.7-17.3 6.7-17.3 16.1v32.1c0 8.4 6.5 15.3 14.8 15.9 76.8 6.3 138 68.2 144.9 145.2.8 8.3 7.6 14.7 15.9 14.7h32.2c9.3 0 16.8-8 16.1-17.3-8.4-110.1-96.5-198.2-206.6-206.7z"]},_e={prefix:"fas",iconName:"bold",icon:[384,512,[],"f032","M333.49 238a122 122 0 0 0 27-65.21C367.87 96.49 308 32 233.42 32H34a16 16 0 0 0-16 16v48a16 16 0 0 0 16 16h31.87v288H34a16 16 0 0 0-16 16v48a16 16 0 0 0 16 16h209.32c70.8 0 134.14-51.75 141-122.4 4.74-48.45-16.39-92.06-50.83-119.6zM145.66 112h87.76a48 48 0 0 1 0 96h-87.76zm87.76 288h-87.76V288h87.76a56 56 0 0 1 0 112z"]},Fe={prefix:"fas",iconName:"bolt",icon:[320,512,[],"f0e7","M296 160H180.6l42.6-129.8C227.2 15 215.7 0 200 0H56C44 0 33.8 8.9 32.2 20.8l-32 240C-1.7 275.2 9.5 288 24 288h118.7L96.6 482.5c-3.6 15.2 8 29.5 23.3 29.5 8.4 0 16.4-4.4 20.8-12l176-304c9.3-15.9-2.2-36-20.7-36z"]},Ge={prefix:"fas",iconName:"bomb",icon:[512,512,[],"f1e2","M440.5 88.5l-52 52L415 167c9.4 9.4 9.4 24.6 0 33.9l-17.4 17.4c11.8 26.1 18.4 55.1 18.4 85.6 0 114.9-93.1 208-208 208S0 418.9 0 304 93.1 96 208 96c30.5 0 59.5 6.6 85.6 18.4L311 97c9.4-9.4 24.6-9.4 33.9 0l26.5 26.5 52-52 17.1 17zM500 60h-24c-6.6 0-12 5.4-12 12s5.4 12 12 12h24c6.6 0 12-5.4 12-12s-5.4-12-12-12zM440 0c-6.6 0-12 5.4-12 12v24c0 6.6 5.4 12 12 12s12-5.4 12-12V12c0-6.6-5.4-12-12-12zm33.9 55l17-17c4.7-4.7 4.7-12.3 0-17-4.7-4.7-12.3-4.7-17 0l-17 17c-4.7 4.7-4.7 12.3 0 17 4.8 4.7 12.4 4.7 17 0zm-67.8 0c4.7 4.7 12.3 4.7 17 0 4.7-4.7 4.7-12.3 0-17l-17-17c-4.7-4.7-12.3-4.7-17 0-4.7 4.7-4.7 12.3 0 17l17 17zm67.8 34c-4.7-4.7-12.3-4.7-17 0-4.7 4.7-4.7 12.3 0 17l17 17c4.7 4.7 12.3 4.7 17 0 4.7-4.7 4.7-12.3 0-17l-17-17zM112 272c0-35.3 28.7-64 64-64 8.8 0 16-7.2 16-16s-7.2-16-16-16c-52.9 0-96 43.1-96 96 0 8.8 7.2 16 16 16s16-7.2 16-16z"]},Ve={prefix:"fas",iconName:"bone",icon:[640,512,[],"f5d7","M598.88 244.56c25.2-12.6 41.12-38.36 41.12-66.53v-7.64C640 129.3 606.7 96 565.61 96c-32.02 0-60.44 20.49-70.57 50.86-7.68 23.03-11.6 45.14-38.11 45.14H183.06c-27.38 0-31.58-25.54-38.11-45.14C134.83 116.49 106.4 96 74.39 96 33.3 96 0 129.3 0 170.39v7.64c0 28.17 15.92 53.93 41.12 66.53 9.43 4.71 9.43 18.17 0 22.88C15.92 280.04 0 305.8 0 333.97v7.64C0 382.7 33.3 416 74.38 416c32.02 0 60.44-20.49 70.57-50.86 7.68-23.03 11.6-45.14 38.11-45.14h273.87c27.38 0 31.58 25.54 38.11 45.14C505.17 395.51 533.6 416 565.61 416c41.08 0 74.38-33.3 74.38-74.39v-7.64c0-28.18-15.92-53.93-41.12-66.53-9.42-4.71-9.42-18.17.01-22.88z"]},Be={prefix:"fas",iconName:"bong",icon:[448,512,[],"f55c","M302.5 512c23.18 0 44.43-12.58 56-32.66C374.69 451.26 384 418.75 384 384c0-36.12-10.08-69.81-27.44-98.62L400 241.94l9.38 9.38c6.25 6.25 16.38 6.25 22.63 0l11.3-11.32c6.25-6.25 6.25-16.38 0-22.63l-52.69-52.69c-6.25-6.25-16.38-6.25-22.63 0l-11.31 11.31c-6.25 6.25-6.25 16.38 0 22.63l9.38 9.38-39.41 39.41c-11.56-11.37-24.53-21.33-38.65-29.51V63.74l15.97-.02c8.82-.01 15.97-7.16 15.98-15.98l.04-31.72C320 7.17 312.82-.01 303.97 0L80.03.26c-8.82.01-15.97 7.16-15.98 15.98l-.04 31.73c-.01 8.85 7.17 16.02 16.02 16.01L96 63.96v153.93C38.67 251.1 0 312.97 0 384c0 34.75 9.31 67.27 25.5 95.34C37.08 499.42 58.33 512 81.5 512h221zM120.06 259.43L144 245.56V63.91l96-.11v181.76l23.94 13.87c24.81 14.37 44.12 35.73 56.56 60.57h-257c12.45-24.84 31.75-46.2 56.56-60.57z"]},He={prefix:"fas",iconName:"book",icon:[448,512,[],"f02d","M448 360V24c0-13.3-10.7-24-24-24H96C43 0 0 43 0 96v320c0 53 43 96 96 96h328c13.3 0 24-10.7 24-24v-16c0-7.5-3.5-14.3-8.9-18.7-4.2-15.4-4.2-59.3 0-74.7 5.4-4.3 8.9-11.1 8.9-18.6zM128 134c0-3.3 2.7-6 6-6h212c3.3 0 6 2.7 6 6v20c0 3.3-2.7 6-6 6H134c-3.3 0-6-2.7-6-6v-20zm0 64c0-3.3 2.7-6 6-6h212c3.3 0 6 2.7 6 6v20c0 3.3-2.7 6-6 6H134c-3.3 0-6-2.7-6-6v-20zm253.4 250H96c-17.7 0-32-14.3-32-32 0-17.6 14.4-32 32-32h285.4c-1.9 17.1-1.9 46.9 0 64z"]},ze={prefix:"fas",iconName:"book-dead",icon:[448,512,[],"f6b7","M272 136c8.8 0 16-7.2 16-16s-7.2-16-16-16-16 7.2-16 16 7.2 16 16 16zm176 222.4V25.6c0-16-9.6-25.6-25.6-25.6H96C41.6 0 0 41.6 0 96v320c0 54.4 41.6 96 96 96h326.4c12.8 0 25.6-9.6 25.6-25.6v-16c0-6.4-3.2-12.8-9.6-19.2-3.2-16-3.2-60.8 0-73.6 6.4-3.2 9.6-9.6 9.6-19.2zM240 56c44.2 0 80 28.7 80 64 0 20.9-12.7 39.2-32 50.9V184c0 8.8-7.2 16-16 16h-64c-8.8 0-16-7.2-16-16v-13.1c-19.3-11.7-32-30-32-50.9 0-35.3 35.8-64 80-64zM124.8 223.3l6.3-14.7c1.7-4.1 6.4-5.9 10.5-4.2l98.3 42.1 98.4-42.1c4.1-1.7 8.8.1 10.5 4.2l6.3 14.7c1.7 4.1-.1 8.8-4.2 10.5L280.6 264l70.3 30.1c4.1 1.7 5.9 6.4 4.2 10.5l-6.3 14.7c-1.7 4.1-6.4 5.9-10.5 4.2L240 281.4l-98.3 42.2c-4.1 1.7-8.8-.1-10.5-4.2l-6.3-14.7c-1.7-4.1.1-8.8 4.2-10.5l70.4-30.1-70.5-30.3c-4.1-1.7-5.9-6.4-4.2-10.5zm256 224.7H96c-19.2 0-32-12.8-32-32s16-32 32-32h284.8zM208 136c8.8 0 16-7.2 16-16s-7.2-16-16-16-16 7.2-16 16 7.2 16 16 16z"]},Ue={prefix:"fas",iconName:"book-medical",icon:[448,512,[],"f7e6","M448 358.4V25.6c0-16-9.6-25.6-25.6-25.6H96C41.6 0 0 41.6 0 96v320c0 54.4 41.6 96 96 96h326.4c12.8 0 25.6-9.6 25.6-25.6v-16q0-9.6-9.6-19.2c-3.2-16-3.2-60.8 0-73.6q9.6-4.8 9.6-19.2zM144 168a8 8 0 0 1 8-8h56v-56a8 8 0 0 1 8-8h48a8 8 0 0 1 8 8v56h56a8 8 0 0 1 8 8v48a8 8 0 0 1-8 8h-56v56a8 8 0 0 1-8 8h-48a8 8 0 0 1-8-8v-56h-56a8 8 0 0 1-8-8zm236.8 280H96c-19.2 0-32-12.8-32-32s16-32 32-32h284.8z"]},We={prefix:"fas",iconName:"book-open",icon:[576,512,[],"f518","M542.22 32.05c-54.8 3.11-163.72 14.43-230.96 55.59-4.64 2.84-7.27 7.89-7.27 13.17v363.87c0 11.55 12.63 18.85 23.28 13.49 69.18-34.82 169.23-44.32 218.7-46.92 16.89-.89 30.02-14.43 30.02-30.66V62.75c.01-17.71-15.35-31.74-33.77-30.7zM264.73 87.64C197.5 46.48 88.58 35.17 33.78 32.05 15.36 31.01 0 45.04 0 62.75V400.6c0 16.24 13.13 29.78 30.02 30.66 49.49 2.6 149.59 12.11 218.77 46.95 10.62 5.35 23.21-1.94 23.21-13.46V100.63c0-5.29-2.62-10.14-7.27-12.99z"]},je={prefix:"fas",iconName:"book-reader",icon:[512,512,[],"f5da","M352 96c0-53.02-42.98-96-96-96s-96 42.98-96 96 42.98 96 96 96 96-42.98 96-96zM233.59 241.1c-59.33-36.32-155.43-46.3-203.79-49.05C13.55 191.13 0 203.51 0 219.14v222.8c0 14.33 11.59 26.28 26.49 27.05 43.66 2.29 131.99 10.68 193.04 41.43 9.37 4.72 20.48-1.71 20.48-11.87V252.56c-.01-4.67-2.32-8.95-6.42-11.46zm248.61-49.05c-48.35 2.74-144.46 12.73-203.78 49.05-4.1 2.51-6.41 6.96-6.41 11.63v245.79c0 10.19 11.14 16.63 20.54 11.9 61.04-30.72 149.32-39.11 192.97-41.4 14.9-.78 26.49-12.73 26.49-27.06V219.14c-.01-15.63-13.56-28.01-29.81-27.09z"]},Ke={prefix:"fas",iconName:"bookmark",icon:[384,512,[],"f02e","M0 512V48C0 21.49 21.49 0 48 0h288c26.51 0 48 21.49 48 48v464L192 400 0 512z"]},$e={prefix:"fas",iconName:"border-all",icon:[448,512,[],"f84c","M416 32H32A32 32 0 0 0 0 64v384a32 32 0 0 0 32 32h384a32 32 0 0 0 32-32V64a32 32 0 0 0-32-32zm-32 64v128H256V96zm-192 0v128H64V96zM64 416V288h128v128zm192 0V288h128v128z"]},Ye={prefix:"fas",iconName:"border-none",icon:[448,512,[],"f850","M240 224h-32a16 16 0 0 0-16 16v32a16 16 0 0 0 16 16h32a16 16 0 0 0 16-16v-32a16 16 0 0 0-16-16zm96 0h-32a16 16 0 0 0-16 16v32a16 16 0 0 0 16 16h32a16 16 0 0 0 16-16v-32a16 16 0 0 0-16-16zm96 0h-32a16 16 0 0 0-16 16v32a16 16 0 0 0 16 16h32a16 16 0 0 0 16-16v-32a16 16 0 0 0-16-16zm-288 0h-32a16 16 0 0 0-16 16v32a16 16 0 0 0 16 16h32a16 16 0 0 0 16-16v-32a16 16 0 0 0-16-16zm96 192h-32a16 16 0 0 0-16 16v32a16 16 0 0 0 16 16h32a16 16 0 0 0 16-16v-32a16 16 0 0 0-16-16zm96 0h-32a16 16 0 0 0-16 16v32a16 16 0 0 0 16 16h32a16 16 0 0 0 16-16v-32a16 16 0 0 0-16-16zm96 0h-32a16 16 0 0 0-16 16v32a16 16 0 0 0 16 16h32a16 16 0 0 0 16-16v-32a16 16 0 0 0-16-16zm0-96h-32a16 16 0 0 0-16 16v32a16 16 0 0 0 16 16h32a16 16 0 0 0 16-16v-32a16 16 0 0 0-16-16zm0-192h-32a16 16 0 0 0-16 16v32a16 16 0 0 0 16 16h32a16 16 0 0 0 16-16v-32a16 16 0 0 0-16-16zM240 320h-32a16 16 0 0 0-16 16v32a16 16 0 0 0 16 16h32a16 16 0 0 0 16-16v-32a16 16 0 0 0-16-16zm0-192h-32a16 16 0 0 0-16 16v32a16 16 0 0 0 16 16h32a16 16 0 0 0 16-16v-32a16 16 0 0 0-16-16zm-96 288h-32a16 16 0 0 0-16 16v32a16 16 0 0 0 16 16h32a16 16 0 0 0 16-16v-32a16 16 0 0 0-16-16zm96-384h-32a16 16 0 0 0-16 16v32a16 16 0 0 0 16 16h32a16 16 0 0 0 16-16V48a16 16 0 0 0-16-16zm96 0h-32a16 16 0 0 0-16 16v32a16 16 0 0 0 16 16h32a16 16 0 0 0 16-16V48a16 16 0 0 0-16-16zm96 0h-32a16 16 0 0 0-16 16v32a16 16 0 0 0 16 16h32a16 16 0 0 0 16-16V48a16 16 0 0 0-16-16zM48 224H16a16 16 0 0 0-16 16v32a16 16 0 0 0 16 16h32a16 16 0 0 0 16-16v-32a16 16 0 0 0-16-16zm0 192H16a16 16 0 0 0-16 16v32a16 16 0 0 0 16 16h32a16 16 0 0 0 16-16v-32a16 16 0 0 0-16-16zm0-96H16a16 16 0 0 0-16 16v32a16 16 0 0 0 16 16h32a16 16 0 0 0 16-16v-32a16 16 0 0 0-16-16zm0-192H16a16 16 0 0 0-16 16v32a16 16 0 0 0 16 16h32a16 16 0 0 0 16-16v-32a16 16 0 0 0-16-16zm0-96H16A16 16 0 0 0 0 48v32a16 16 0 0 0 16 16h32a16 16 0 0 0 16-16V48a16 16 0 0 0-16-16zm96 0h-32a16 16 0 0 0-16 16v32a16 16 0 0 0 16 16h32a16 16 0 0 0 16-16V48a16 16 0 0 0-16-16z"]},qe={prefix:"fas",iconName:"border-style",icon:[448,512,[],"f853","M240 416h-32a16 16 0 0 0-16 16v32a16 16 0 0 0 16 16h32a16 16 0 0 0 16-16v-32a16 16 0 0 0-16-16zm-96 0h-32a16 16 0 0 0-16 16v32a16 16 0 0 0 16 16h32a16 16 0 0 0 16-16v-32a16 16 0 0 0-16-16zm192 0h-32a16 16 0 0 0-16 16v32a16 16 0 0 0 16 16h32a16 16 0 0 0 16-16v-32a16 16 0 0 0-16-16zm96-192h-32a16 16 0 0 0-16 16v32a16 16 0 0 0 16 16h32a16 16 0 0 0 16-16v-32a16 16 0 0 0-16-16zm0 96h-32a16 16 0 0 0-16 16v32a16 16 0 0 0 16 16h32a16 16 0 0 0 16-16v-32a16 16 0 0 0-16-16zm0 96h-32a16 16 0 0 0-16 16v32a16 16 0 0 0 16 16h32a16 16 0 0 0 16-16v-32a16 16 0 0 0-16-16zm0-288h-32a16 16 0 0 0-16 16v32a16 16 0 0 0 16 16h32a16 16 0 0 0 16-16v-32a16 16 0 0 0-16-16zm0-96H32A32 32 0 0 0 0 64v400a16 16 0 0 0 16 16h32a16 16 0 0 0 16-16V96h368a16 16 0 0 0 16-16V48a16 16 0 0 0-16-16z"]},Xe={prefix:"fas",iconName:"bowling-ball",icon:[496,512,[],"f436","M248 8C111 8 0 119 0 256s111 248 248 248 248-111 248-248S385 8 248 8zM120 192c-17.7 0-32-14.3-32-32s14.3-32 32-32 32 14.3 32 32-14.3 32-32 32zm64-96c0-17.7 14.3-32 32-32s32 14.3 32 32-14.3 32-32 32-32-14.3-32-32zm48 144c-17.7 0-32-14.3-32-32s14.3-32 32-32 32 14.3 32 32-14.3 32-32 32z"]},Ze={prefix:"fas",iconName:"box",icon:[512,512,[],"f466","M509.5 184.6L458.9 32.8C452.4 13.2 434.1 0 413.4 0H272v192h238.7c-.4-2.5-.4-5-1.2-7.4zM240 0H98.6c-20.7 0-39 13.2-45.5 32.8L2.5 184.6c-.8 2.4-.8 4.9-1.2 7.4H240V0zM0 224v240c0 26.5 21.5 48 48 48h416c26.5 0 48-21.5 48-48V224H0z"]},Qe={prefix:"fas",iconName:"box-open",icon:[640,512,[],"f49e","M425.7 256c-16.9 0-32.8-9-41.4-23.4L320 126l-64.2 106.6c-8.7 14.5-24.6 23.5-41.5 23.5-4.5 0-9-.6-13.3-1.9L64 215v178c0 14.7 10 27.5 24.2 31l216.2 54.1c10.2 2.5 20.9 2.5 31 0L551.8 424c14.2-3.6 24.2-16.4 24.2-31V215l-137 39.1c-4.3 1.3-8.8 1.9-13.3 1.9zm212.6-112.2L586.8 41c-3.1-6.2-9.8-9.8-16.7-8.9L320 64l91.7 152.1c3.8 6.3 11.4 9.3 18.5 7.3l197.9-56.5c9.9-2.9 14.7-13.9 10.2-23.1zM53.2 41L1.7 143.8c-4.6 9.2.3 20.2 10.1 23l197.9 56.5c7.1 2 14.7-1 18.5-7.3L320 64 69.8 32.1c-6.9-.8-13.5 2.7-16.6 8.9z"]},Je={prefix:"fas",iconName:"box-tissue",icon:[512,512,[],"e05b","M383.88,287.82l64-192H338.47a70.2,70.2,0,0,1-66.59-48,70.21,70.21,0,0,0-66.6-48H63.88l64,288Zm-384,192a32,32,0,0,0,32,32h448a32,32,0,0,0,32-32v-64H-.12Zm480-256H438.94l-21.33,64h14.27a16,16,0,0,1,0,32h-352a16,16,0,1,1,0-32H95.09l-14.22-64h-49a32,32,0,0,0-32,32v128h512v-128A32,32,0,0,0,479.88,223.82Z"]},et={prefix:"fas",iconName:"boxes",icon:[576,512,[],"f468","M560 288h-80v96l-32-21.3-32 21.3v-96h-80c-8.8 0-16 7.2-16 16v192c0 8.8 7.2 16 16 16h224c8.8 0 16-7.2 16-16V304c0-8.8-7.2-16-16-16zm-384-64h224c8.8 0 16-7.2 16-16V16c0-8.8-7.2-16-16-16h-80v96l-32-21.3L256 96V0h-80c-8.8 0-16 7.2-16 16v192c0 8.8 7.2 16 16 16zm64 64h-80v96l-32-21.3L96 384v-96H16c-8.8 0-16 7.2-16 16v192c0 8.8 7.2 16 16 16h224c8.8 0 16-7.2 16-16V304c0-8.8-7.2-16-16-16z"]},tt={prefix:"fas",iconName:"braille",icon:[640,512,[],"f2a1","M128 256c0 35.346-28.654 64-64 64S0 291.346 0 256s28.654-64 64-64 64 28.654 64 64zM64 384c-17.673 0-32 14.327-32 32s14.327 32 32 32 32-14.327 32-32-14.327-32-32-32zm0-352C28.654 32 0 60.654 0 96s28.654 64 64 64 64-28.654 64-64-28.654-64-64-64zm160 192c-17.673 0-32 14.327-32 32s14.327 32 32 32 32-14.327 32-32-14.327-32-32-32zm0 160c-17.673 0-32 14.327-32 32s14.327 32 32 32 32-14.327 32-32-14.327-32-32-32zm0-352c-35.346 0-64 28.654-64 64s28.654 64 64 64 64-28.654 64-64-28.654-64-64-64zm224 192c-17.673 0-32 14.327-32 32s14.327 32 32 32 32-14.327 32-32-14.327-32-32-32zm0 160c-17.673 0-32 14.327-32 32s14.327 32 32 32 32-14.327 32-32-14.327-32-32-32zm0-352c-35.346 0-64 28.654-64 64s28.654 64 64 64 64-28.654 64-64-28.654-64-64-64zm160 192c-17.673 0-32 14.327-32 32s14.327 32 32 32 32-14.327 32-32-14.327-32-32-32zm0 160c-17.673 0-32 14.327-32 32s14.327 32 32 32 32-14.327 32-32-14.327-32-32-32zm0-320c-17.673 0-32 14.327-32 32s14.327 32 32 32 32-14.327 32-32-14.327-32-32-32z"]},it={prefix:"fas",iconName:"brain",icon:[576,512,[],"f5dc","M208 0c-29.9 0-54.7 20.5-61.8 48.2-.8 0-1.4-.2-2.2-.2-35.3 0-64 28.7-64 64 0 4.8.6 9.5 1.7 14C52.5 138 32 166.6 32 200c0 12.6 3.2 24.3 8.3 34.9C16.3 248.7 0 274.3 0 304c0 33.3 20.4 61.9 49.4 73.9-.9 4.6-1.4 9.3-1.4 14.1 0 39.8 32.2 72 72 72 4.1 0 8.1-.5 12-1.2 9.6 28.5 36.2 49.2 68 49.2 39.8 0 72-32.2 72-72V64c0-35.3-28.7-64-64-64zm368 304c0-29.7-16.3-55.3-40.3-69.1 5.2-10.6 8.3-22.3 8.3-34.9 0-33.4-20.5-62-49.7-74 1-4.5 1.7-9.2 1.7-14 0-35.3-28.7-64-64-64-.8 0-1.5.2-2.2.2C422.7 20.5 397.9 0 368 0c-35.3 0-64 28.6-64 64v376c0 39.8 32.2 72 72 72 31.8 0 58.4-20.7 68-49.2 3.9.7 7.9 1.2 12 1.2 39.8 0 72-32.2 72-72 0-4.8-.5-9.5-1.4-14.1 29-12 49.4-40.6 49.4-73.9z"]},nt={prefix:"fas",iconName:"bread-slice",icon:[576,512,[],"f7ec","M288 0C108 0 0 93.4 0 169.14 0 199.44 24.24 224 64 224v256c0 17.67 16.12 32 36 32h376c19.88 0 36-14.33 36-32V224c39.76 0 64-24.56 64-54.86C576 93.4 468 0 288 0z"]},st={prefix:"fas",iconName:"briefcase",icon:[512,512,[],"f0b1","M320 336c0 8.84-7.16 16-16 16h-96c-8.84 0-16-7.16-16-16v-48H0v144c0 25.6 22.4 48 48 48h416c25.6 0 48-22.4 48-48V288H320v48zm144-208h-80V80c0-25.6-22.4-48-48-48H176c-25.6 0-48 22.4-48 48v48H48c-25.6 0-48 22.4-48 48v80h512v-80c0-25.6-22.4-48-48-48zm-144 0H192V96h128v32z"]},rt={prefix:"fas",iconName:"briefcase-medical",icon:[512,512,[],"f469","M464 128h-80V80c0-26.5-21.5-48-48-48H176c-26.5 0-48 21.5-48 48v48H48c-26.5 0-48 21.5-48 48v288c0 26.5 21.5 48 48 48h416c26.5 0 48-21.5 48-48V176c0-26.5-21.5-48-48-48zM192 96h128v32H192V96zm160 248c0 4.4-3.6 8-8 8h-56v56c0 4.4-3.6 8-8 8h-48c-4.4 0-8-3.6-8-8v-56h-56c-4.4 0-8-3.6-8-8v-48c0-4.4 3.6-8 8-8h56v-56c0-4.4 3.6-8 8-8h48c4.4 0 8 3.6 8 8v56h56c4.4 0 8 3.6 8 8v48z"]},ot={prefix:"fas",iconName:"broadcast-tower",icon:[640,512,[],"f519","M150.94 192h33.73c11.01 0 18.61-10.83 14.86-21.18-4.93-13.58-7.55-27.98-7.55-42.82s2.62-29.24 7.55-42.82C203.29 74.83 195.68 64 184.67 64h-33.73c-7.01 0-13.46 4.49-15.41 11.23C130.64 92.21 128 109.88 128 128c0 18.12 2.64 35.79 7.54 52.76 1.94 6.74 8.39 11.24 15.4 11.24zM89.92 23.34C95.56 12.72 87.97 0 75.96 0H40.63c-6.27 0-12.14 3.59-14.74 9.31C9.4 45.54 0 85.65 0 128c0 24.75 3.12 68.33 26.69 118.86 2.62 5.63 8.42 9.14 14.61 9.14h34.84c12.02 0 19.61-12.74 13.95-23.37-49.78-93.32-16.71-178.15-.17-209.29zM614.06 9.29C611.46 3.58 605.6 0 599.33 0h-35.42c-11.98 0-19.66 12.66-14.02 23.25 18.27 34.29 48.42 119.42.28 209.23-5.72 10.68 1.8 23.52 13.91 23.52h35.23c6.27 0 12.13-3.58 14.73-9.29C630.57 210.48 640 170.36 640 128s-9.42-82.48-25.94-118.71zM489.06 64h-33.73c-11.01 0-18.61 10.83-14.86 21.18 4.93 13.58 7.55 27.98 7.55 42.82s-2.62 29.24-7.55 42.82c-3.76 10.35 3.85 21.18 14.86 21.18h33.73c7.02 0 13.46-4.49 15.41-11.24 4.9-16.97 7.53-34.64 7.53-52.76 0-18.12-2.64-35.79-7.54-52.76-1.94-6.75-8.39-11.24-15.4-11.24zm-116.3 100.12c7.05-10.29 11.2-22.71 11.2-36.12 0-35.35-28.63-64-63.96-64-35.32 0-63.96 28.65-63.96 64 0 13.41 4.15 25.83 11.2 36.12l-130.5 313.41c-3.4 8.15.46 17.52 8.61 20.92l29.51 12.31c8.15 3.4 17.52-.46 20.91-8.61L244.96 384h150.07l49.2 118.15c3.4 8.16 12.76 12.01 20.91 8.61l29.51-12.31c8.15-3.4 12-12.77 8.61-20.92l-130.5-313.41zM271.62 320L320 203.81 368.38 320h-96.76z"]},at={prefix:"fas",iconName:"broom",icon:[640,512,[],"f51a","M256.47 216.77l86.73 109.18s-16.6 102.36-76.57 150.12C206.66 523.85 0 510.19 0 510.19s3.8-23.14 11-55.43l94.62-112.17c3.97-4.7-.87-11.62-6.65-9.5l-60.4 22.09c14.44-41.66 32.72-80.04 54.6-97.47 59.97-47.76 163.3-40.94 163.3-40.94zM636.53 31.03l-19.86-25c-5.49-6.9-15.52-8.05-22.41-2.56l-232.48 177.8-34.14-42.97c-5.09-6.41-15.14-5.21-18.59 2.21l-25.33 54.55 86.73 109.18 58.8-12.45c8-1.69 11.42-11.2 6.34-17.6l-34.09-42.92 232.48-177.8c6.89-5.48 8.04-15.53 2.55-22.44z"]},lt={prefix:"fas",iconName:"brush",icon:[384,512,[],"f55d","M352 0H32C14.33 0 0 14.33 0 32v224h384V32c0-17.67-14.33-32-32-32zM0 320c0 35.35 28.66 64 64 64h64v64c0 35.35 28.66 64 64 64s64-28.65 64-64v-64h64c35.34 0 64-28.65 64-64v-32H0v32zm192 104c13.25 0 24 10.74 24 24 0 13.25-10.75 24-24 24s-24-10.75-24-24c0-13.26 10.75-24 24-24z"]},ct={prefix:"fas",iconName:"bug",icon:[512,512,[],"f188","M511.988 288.9c-.478 17.43-15.217 31.1-32.653 31.1H424v16c0 21.864-4.882 42.584-13.6 61.145l60.228 60.228c12.496 12.497 12.496 32.758 0 45.255-12.498 12.497-32.759 12.496-45.256 0l-54.736-54.736C345.886 467.965 314.351 480 280 480V236c0-6.627-5.373-12-12-12h-24c-6.627 0-12 5.373-12 12v244c-34.351 0-65.886-12.035-90.636-32.108l-54.736 54.736c-12.498 12.497-32.759 12.496-45.256 0-12.496-12.497-12.496-32.758 0-45.255l60.228-60.228C92.882 378.584 88 357.864 88 336v-16H32.666C15.23 320 .491 306.33.013 288.9-.484 270.816 14.028 256 32 256h56v-58.745l-46.628-46.628c-12.496-12.497-12.496-32.758 0-45.255 12.498-12.497 32.758-12.497 45.256 0L141.255 160h229.489l54.627-54.627c12.498-12.497 32.758-12.497 45.256 0 12.496 12.497 12.496 32.758 0 45.255L424 197.255V256h56c17.972 0 32.484 14.816 31.988 32.9zM257 0c-61.856 0-112 50.144-112 112h224C369 50.144 318.856 0 257 0z"]},ht={prefix:"fas",iconName:"building",icon:[448,512,[],"f1ad","M436 480h-20V24c0-13.255-10.745-24-24-24H56C42.745 0 32 10.745 32 24v456H12c-6.627 0-12 5.373-12 12v20h448v-20c0-6.627-5.373-12-12-12zM128 76c0-6.627 5.373-12 12-12h40c6.627 0 12 5.373 12 12v40c0 6.627-5.373 12-12 12h-40c-6.627 0-12-5.373-12-12V76zm0 96c0-6.627 5.373-12 12-12h40c6.627 0 12 5.373 12 12v40c0 6.627-5.373 12-12 12h-40c-6.627 0-12-5.373-12-12v-40zm52 148h-40c-6.627 0-12-5.373-12-12v-40c0-6.627 5.373-12 12-12h40c6.627 0 12 5.373 12 12v40c0 6.627-5.373 12-12 12zm76 160h-64v-84c0-6.627 5.373-12 12-12h40c6.627 0 12 5.373 12 12v84zm64-172c0 6.627-5.373 12-12 12h-40c-6.627 0-12-5.373-12-12v-40c0-6.627 5.373-12 12-12h40c6.627 0 12 5.373 12 12v40zm0-96c0 6.627-5.373 12-12 12h-40c-6.627 0-12-5.373-12-12v-40c0-6.627 5.373-12 12-12h40c6.627 0 12 5.373 12 12v40zm0-96c0 6.627-5.373 12-12 12h-40c-6.627 0-12-5.373-12-12V76c0-6.627 5.373-12 12-12h40c6.627 0 12 5.373 12 12v40z"]},dt={prefix:"fas",iconName:"bullhorn",icon:[576,512,[],"f0a1","M576 240c0-23.63-12.95-44.04-32-55.12V32.01C544 23.26 537.02 0 512 0c-7.12 0-14.19 2.38-19.98 7.02l-85.03 68.03C364.28 109.19 310.66 128 256 128H64c-35.35 0-64 28.65-64 64v96c0 35.35 28.65 64 64 64h33.7c-1.39 10.48-2.18 21.14-2.18 32 0 39.77 9.26 77.35 25.56 110.94 5.19 10.69 16.52 17.06 28.4 17.06h74.28c26.05 0 41.69-29.84 25.9-50.56-16.4-21.52-26.15-48.36-26.15-77.44 0-11.11 1.62-21.79 4.41-32H256c54.66 0 108.28 18.81 150.98 52.95l85.03 68.03a32.023 32.023 0 0 0 19.98 7.02c24.92 0 32-22.78 32-32V295.13C563.05 284.04 576 263.63 576 240zm-96 141.42l-33.05-26.44C392.95 311.78 325.12 288 256 288v-96c69.12 0 136.95-23.78 190.95-66.98L480 98.58v282.84z"]},ut={prefix:"fas",iconName:"bullseye",icon:[496,512,[],"f140","M248 8C111.03 8 0 119.03 0 256s111.03 248 248 248 248-111.03 248-248S384.97 8 248 8zm0 432c-101.69 0-184-82.29-184-184 0-101.69 82.29-184 184-184 101.69 0 184 82.29 184 184 0 101.69-82.29 184-184 184zm0-312c-70.69 0-128 57.31-128 128s57.31 128 128 128 128-57.31 128-128-57.31-128-128-128zm0 192c-35.29 0-64-28.71-64-64s28.71-64 64-64 64 28.71 64 64-28.71 64-64 64z"]},pt={prefix:"fas",iconName:"burn",icon:[384,512,[],"f46a","M192 0C79.7 101.3 0 220.9 0 300.5 0 425 79 512 192 512s192-87 192-211.5c0-79.9-80.2-199.6-192-300.5zm0 448c-56.5 0-96-39-96-94.8 0-13.5 4.6-61.5 96-161.2 91.4 99.7 96 147.7 96 161.2 0 55.8-39.5 94.8-96 94.8z"]},gt={prefix:"fas",iconName:"bus",icon:[512,512,[],"f207","M488 128h-8V80c0-44.8-99.2-80-224-80S32 35.2 32 80v48h-8c-13.25 0-24 10.74-24 24v80c0 13.25 10.75 24 24 24h8v160c0 17.67 14.33 32 32 32v32c0 17.67 14.33 32 32 32h32c17.67 0 32-14.33 32-32v-32h192v32c0 17.67 14.33 32 32 32h32c17.67 0 32-14.33 32-32v-32h6.4c16 0 25.6-12.8 25.6-25.6V256h8c13.25 0 24-10.75 24-24v-80c0-13.26-10.75-24-24-24zM112 400c-17.67 0-32-14.33-32-32s14.33-32 32-32 32 14.33 32 32-14.33 32-32 32zm16-112c-17.67 0-32-14.33-32-32V128c0-17.67 14.33-32 32-32h256c17.67 0 32 14.33 32 32v128c0 17.67-14.33 32-32 32H128zm272 112c-17.67 0-32-14.33-32-32s14.33-32 32-32 32 14.33 32 32-14.33 32-32 32z"]},ft={prefix:"fas",iconName:"bus-alt",icon:[512,512,[],"f55e","M488 128h-8V80c0-44.8-99.2-80-224-80S32 35.2 32 80v48h-8c-13.25 0-24 10.74-24 24v80c0 13.25 10.75 24 24 24h8v160c0 17.67 14.33 32 32 32v32c0 17.67 14.33 32 32 32h32c17.67 0 32-14.33 32-32v-32h192v32c0 17.67 14.33 32 32 32h32c17.67 0 32-14.33 32-32v-32h6.4c16 0 25.6-12.8 25.6-25.6V256h8c13.25 0 24-10.75 24-24v-80c0-13.26-10.75-24-24-24zM160 72c0-4.42 3.58-8 8-8h176c4.42 0 8 3.58 8 8v16c0 4.42-3.58 8-8 8H168c-4.42 0-8-3.58-8-8V72zm-48 328c-17.67 0-32-14.33-32-32s14.33-32 32-32 32 14.33 32 32-14.33 32-32 32zm128-112H128c-17.67 0-32-14.33-32-32v-96c0-17.67 14.33-32 32-32h112v160zm32 0V128h112c17.67 0 32 14.33 32 32v96c0 17.67-14.33 32-32 32H272zm128 112c-17.67 0-32-14.33-32-32s14.33-32 32-32 32 14.33 32 32-14.33 32-32 32z"]},mt={prefix:"fas",iconName:"business-time",icon:[640,512,[],"f64a","M496 224c-79.59 0-144 64.41-144 144s64.41 144 144 144 144-64.41 144-144-64.41-144-144-144zm64 150.29c0 5.34-4.37 9.71-9.71 9.71h-60.57c-5.34 0-9.71-4.37-9.71-9.71v-76.57c0-5.34 4.37-9.71 9.71-9.71h12.57c5.34 0 9.71 4.37 9.71 9.71V352h38.29c5.34 0 9.71 4.37 9.71 9.71v12.58zM496 192c5.4 0 10.72.33 16 .81V144c0-25.6-22.4-48-48-48h-80V48c0-25.6-22.4-48-48-48H176c-25.6 0-48 22.4-48 48v48H48c-25.6 0-48 22.4-48 48v80h395.12c28.6-20.09 63.35-32 100.88-32zM320 96H192V64h128v32zm6.82 224H208c-8.84 0-16-7.16-16-16v-48H0v144c0 25.6 22.4 48 48 48h291.43C327.1 423.96 320 396.82 320 368c0-16.66 2.48-32.72 6.82-48z"]},vt={prefix:"fas",iconName:"calculator",icon:[448,512,[],"f1ec","M400 0H48C22.4 0 0 22.4 0 48v416c0 25.6 22.4 48 48 48h352c25.6 0 48-22.4 48-48V48c0-25.6-22.4-48-48-48zM128 435.2c0 6.4-6.4 12.8-12.8 12.8H76.8c-6.4 0-12.8-6.4-12.8-12.8v-38.4c0-6.4 6.4-12.8 12.8-12.8h38.4c6.4 0 12.8 6.4 12.8 12.8v38.4zm0-128c0 6.4-6.4 12.8-12.8 12.8H76.8c-6.4 0-12.8-6.4-12.8-12.8v-38.4c0-6.4 6.4-12.8 12.8-12.8h38.4c6.4 0 12.8 6.4 12.8 12.8v38.4zm128 128c0 6.4-6.4 12.8-12.8 12.8h-38.4c-6.4 0-12.8-6.4-12.8-12.8v-38.4c0-6.4 6.4-12.8 12.8-12.8h38.4c6.4 0 12.8 6.4 12.8 12.8v38.4zm0-128c0 6.4-6.4 12.8-12.8 12.8h-38.4c-6.4 0-12.8-6.4-12.8-12.8v-38.4c0-6.4 6.4-12.8 12.8-12.8h38.4c6.4 0 12.8 6.4 12.8 12.8v38.4zm128 128c0 6.4-6.4 12.8-12.8 12.8h-38.4c-6.4 0-12.8-6.4-12.8-12.8V268.8c0-6.4 6.4-12.8 12.8-12.8h38.4c6.4 0 12.8 6.4 12.8 12.8v166.4zm0-256c0 6.4-6.4 12.8-12.8 12.8H76.8c-6.4 0-12.8-6.4-12.8-12.8V76.8C64 70.4 70.4 64 76.8 64h294.4c6.4 0 12.8 6.4 12.8 12.8v102.4z"]},yt={prefix:"fas",iconName:"calendar",icon:[448,512,[],"f133","M12 192h424c6.6 0 12 5.4 12 12v260c0 26.5-21.5 48-48 48H48c-26.5 0-48-21.5-48-48V204c0-6.6 5.4-12 12-12zm436-44v-36c0-26.5-21.5-48-48-48h-48V12c0-6.6-5.4-12-12-12h-40c-6.6 0-12 5.4-12 12v52H160V12c0-6.6-5.4-12-12-12h-40c-6.6 0-12 5.4-12 12v52H48C21.5 64 0 85.5 0 112v36c0 6.6 5.4 12 12 12h424c6.6 0 12-5.4 12-12z"]},Ct={prefix:"fas",iconName:"calendar-alt",icon:[448,512,[],"f073","M0 464c0 26.5 21.5 48 48 48h352c26.5 0 48-21.5 48-48V192H0v272zm320-196c0-6.6 5.4-12 12-12h40c6.6 0 12 5.4 12 12v40c0 6.6-5.4 12-12 12h-40c-6.6 0-12-5.4-12-12v-40zm0 128c0-6.6 5.4-12 12-12h40c6.6 0 12 5.4 12 12v40c0 6.6-5.4 12-12 12h-40c-6.6 0-12-5.4-12-12v-40zM192 268c0-6.6 5.4-12 12-12h40c6.6 0 12 5.4 12 12v40c0 6.6-5.4 12-12 12h-40c-6.6 0-12-5.4-12-12v-40zm0 128c0-6.6 5.4-12 12-12h40c6.6 0 12 5.4 12 12v40c0 6.6-5.4 12-12 12h-40c-6.6 0-12-5.4-12-12v-40zM64 268c0-6.6 5.4-12 12-12h40c6.6 0 12 5.4 12 12v40c0 6.6-5.4 12-12 12H76c-6.6 0-12-5.4-12-12v-40zm0 128c0-6.6 5.4-12 12-12h40c6.6 0 12 5.4 12 12v40c0 6.6-5.4 12-12 12H76c-6.6 0-12-5.4-12-12v-40zM400 64h-48V16c0-8.8-7.2-16-16-16h-32c-8.8 0-16 7.2-16 16v48H160V16c0-8.8-7.2-16-16-16h-32c-8.8 0-16 7.2-16 16v48H48C21.5 64 0 85.5 0 112v48h448v-48c0-26.5-21.5-48-48-48z"]},bt={prefix:"fas",iconName:"calendar-check",icon:[448,512,[],"f274","M436 160H12c-6.627 0-12-5.373-12-12v-36c0-26.51 21.49-48 48-48h48V12c0-6.627 5.373-12 12-12h40c6.627 0 12 5.373 12 12v52h128V12c0-6.627 5.373-12 12-12h40c6.627 0 12 5.373 12 12v52h48c26.51 0 48 21.49 48 48v36c0 6.627-5.373 12-12 12zM12 192h424c6.627 0 12 5.373 12 12v260c0 26.51-21.49 48-48 48H48c-26.51 0-48-21.49-48-48V204c0-6.627 5.373-12 12-12zm333.296 95.947l-28.169-28.398c-4.667-4.705-12.265-4.736-16.97-.068L194.12 364.665l-45.98-46.352c-4.667-4.705-12.266-4.736-16.971-.068l-28.397 28.17c-4.705 4.667-4.736 12.265-.068 16.97l82.601 83.269c4.667 4.705 12.265 4.736 16.97.068l142.953-141.805c4.705-4.667 4.736-12.265.068-16.97z"]},St={prefix:"fas",iconName:"calendar-day",icon:[448,512,[],"f783","M0 464c0 26.5 21.5 48 48 48h352c26.5 0 48-21.5 48-48V192H0v272zm64-192c0-8.8 7.2-16 16-16h96c8.8 0 16 7.2 16 16v96c0 8.8-7.2 16-16 16H80c-8.8 0-16-7.2-16-16v-96zM400 64h-48V16c0-8.8-7.2-16-16-16h-32c-8.8 0-16 7.2-16 16v48H160V16c0-8.8-7.2-16-16-16h-32c-8.8 0-16 7.2-16 16v48H48C21.5 64 0 85.5 0 112v48h448v-48c0-26.5-21.5-48-48-48z"]},wt={prefix:"fas",iconName:"calendar-minus",icon:[448,512,[],"f272","M436 160H12c-6.6 0-12-5.4-12-12v-36c0-26.5 21.5-48 48-48h48V12c0-6.6 5.4-12 12-12h40c6.6 0 12 5.4 12 12v52h128V12c0-6.6 5.4-12 12-12h40c6.6 0 12 5.4 12 12v52h48c26.5 0 48 21.5 48 48v36c0 6.6-5.4 12-12 12zM12 192h424c6.6 0 12 5.4 12 12v260c0 26.5-21.5 48-48 48H48c-26.5 0-48-21.5-48-48V204c0-6.6 5.4-12 12-12zm304 192c6.6 0 12-5.4 12-12v-40c0-6.6-5.4-12-12-12H132c-6.6 0-12 5.4-12 12v40c0 6.6 5.4 12 12 12h184z"]},xt={prefix:"fas",iconName:"calendar-plus",icon:[448,512,[],"f271","M436 160H12c-6.6 0-12-5.4-12-12v-36c0-26.5 21.5-48 48-48h48V12c0-6.6 5.4-12 12-12h40c6.6 0 12 5.4 12 12v52h128V12c0-6.6 5.4-12 12-12h40c6.6 0 12 5.4 12 12v52h48c26.5 0 48 21.5 48 48v36c0 6.6-5.4 12-12 12zM12 192h424c6.6 0 12 5.4 12 12v260c0 26.5-21.5 48-48 48H48c-26.5 0-48-21.5-48-48V204c0-6.6 5.4-12 12-12zm316 140c0-6.6-5.4-12-12-12h-60v-60c0-6.6-5.4-12-12-12h-40c-6.6 0-12 5.4-12 12v60h-60c-6.6 0-12 5.4-12 12v40c0 6.6 5.4 12 12 12h60v60c0 6.6 5.4 12 12 12h40c6.6 0 12-5.4 12-12v-60h60c6.6 0 12-5.4 12-12v-40z"]},Et={prefix:"fas",iconName:"calendar-times",icon:[448,512,[],"f273","M436 160H12c-6.6 0-12-5.4-12-12v-36c0-26.5 21.5-48 48-48h48V12c0-6.6 5.4-12 12-12h40c6.6 0 12 5.4 12 12v52h128V12c0-6.6 5.4-12 12-12h40c6.6 0 12 5.4 12 12v52h48c26.5 0 48 21.5 48 48v36c0 6.6-5.4 12-12 12zM12 192h424c6.6 0 12 5.4 12 12v260c0 26.5-21.5 48-48 48H48c-26.5 0-48-21.5-48-48V204c0-6.6 5.4-12 12-12zm257.3 160l48.1-48.1c4.7-4.7 4.7-12.3 0-17l-28.3-28.3c-4.7-4.7-12.3-4.7-17 0L224 306.7l-48.1-48.1c-4.7-4.7-12.3-4.7-17 0l-28.3 28.3c-4.7 4.7-4.7 12.3 0 17l48.1 48.1-48.1 48.1c-4.7 4.7-4.7 12.3 0 17l28.3 28.3c4.7 4.7 12.3 4.7 17 0l48.1-48.1 48.1 48.1c4.7 4.7 12.3 4.7 17 0l28.3-28.3c4.7-4.7 4.7-12.3 0-17L269.3 352z"]},Mt={prefix:"fas",iconName:"calendar-week",icon:[448,512,[],"f784","M0 464c0 26.5 21.5 48 48 48h352c26.5 0 48-21.5 48-48V192H0v272zm64-192c0-8.8 7.2-16 16-16h288c8.8 0 16 7.2 16 16v64c0 8.8-7.2 16-16 16H80c-8.8 0-16-7.2-16-16v-64zM400 64h-48V16c0-8.8-7.2-16-16-16h-32c-8.8 0-16 7.2-16 16v48H160V16c0-8.8-7.2-16-16-16h-32c-8.8 0-16 7.2-16 16v48H48C21.5 64 0 85.5 0 112v48h448v-48c0-26.5-21.5-48-48-48z"]},At={prefix:"fas",iconName:"camera",icon:[512,512,[],"f030","M512 144v288c0 26.5-21.5 48-48 48H48c-26.5 0-48-21.5-48-48V144c0-26.5 21.5-48 48-48h88l12.3-32.9c7-18.7 24.9-31.1 44.9-31.1h125.5c20 0 37.9 12.4 44.9 31.1L376 96h88c26.5 0 48 21.5 48 48zM376 288c0-66.2-53.8-120-120-120s-120 53.8-120 120 53.8 120 120 120 120-53.8 120-120zm-32 0c0 48.5-39.5 88-88 88s-88-39.5-88-88 39.5-88 88-88 88 39.5 88 88z"]},Tt={prefix:"fas",iconName:"camera-retro",icon:[512,512,[],"f083","M48 32C21.5 32 0 53.5 0 80v352c0 26.5 21.5 48 48 48h416c26.5 0 48-21.5 48-48V80c0-26.5-21.5-48-48-48H48zm0 32h106c3.3 0 6 2.7 6 6v20c0 3.3-2.7 6-6 6H38c-3.3 0-6-2.7-6-6V80c0-8.8 7.2-16 16-16zm426 96H38c-3.3 0-6-2.7-6-6v-36c0-3.3 2.7-6 6-6h138l30.2-45.3c1.1-1.7 3-2.7 5-2.7H464c8.8 0 16 7.2 16 16v74c0 3.3-2.7 6-6 6zM256 424c-66.2 0-120-53.8-120-120s53.8-120 120-120 120 53.8 120 120-53.8 120-120 120zm0-208c-48.5 0-88 39.5-88 88s39.5 88 88 88 88-39.5 88-88-39.5-88-88-88zm-48 104c-8.8 0-16-7.2-16-16 0-35.3 28.7-64 64-64 8.8 0 16 7.2 16 16s-7.2 16-16 16c-17.6 0-32 14.4-32 32 0 8.8-7.2 16-16 16z"]},Dt={prefix:"fas",iconName:"campground",icon:[640,512,[],"f6bb","M624 448h-24.68L359.54 117.75l53.41-73.55c5.19-7.15 3.61-17.16-3.54-22.35l-25.9-18.79c-7.15-5.19-17.15-3.61-22.35 3.55L320 63.3 278.83 6.6c-5.19-7.15-15.2-8.74-22.35-3.55l-25.88 18.8c-7.15 5.19-8.74 15.2-3.54 22.35l53.41 73.55L40.68 448H16c-8.84 0-16 7.16-16 16v32c0 8.84 7.16 16 16 16h608c8.84 0 16-7.16 16-16v-32c0-8.84-7.16-16-16-16zM320 288l116.36 160H203.64L320 288z"]},It={prefix:"fas",iconName:"candy-cane",icon:[512,512,[],"f786","M497.5 92C469.6 33.1 411.8 0 352.4 0c-27.9 0-56.2 7.3-81.8 22.6L243.1 39c-15.2 9.1-20.1 28.7-11 43.9l32.8 54.9c6 10 16.6 15.6 27.5 15.6 5.6 0 11.2-1.5 16.4-4.5l27.5-16.4c5.1-3.1 10.8-4.5 16.4-4.5 10.9 0 21.5 5.6 27.5 15.6 9.1 15.1 4.1 34.8-11 43.9L15.6 397.6c-15.2 9.1-20.1 28.7-11 43.9l32.8 54.9c6 10 16.6 15.6 27.5 15.6 5.6 0 11.2-1.5 16.4-4.5L428.6 301c71.7-42.9 104.6-133.5 68.9-209zm-177.7 13l-2.5 1.5L296.8 45c9.7-4.7 19.8-8.1 30.3-10.2l20.6 61.8c-9.8.8-19.4 3.3-27.9 8.4zM145.9 431.8l-60.5-38.5 30.8-18.3 60.5 38.5-30.8 18.3zm107.5-63.9l-60.5-38.5 30.8-18.3 60.5 38.5-30.8 18.3zM364.3 302l-60.5-38.5 30.8-18.3 60.5 38.5-30.8 18.3zm20.4-197.3l46-46c8.4 6.5 16 14.1 22.6 22.6L407.6 127c-5.7-9.3-13.7-16.9-22.9-22.3zm82.1 107.8l-59.5-19.8c3.2-5.3 5.8-10.9 7.4-17.1 1.1-4.5 1.7-9.1 1.8-13.6l60.4 20.1c-2.1 10.4-5.5 20.6-10.1 30.4z"]},Rt={prefix:"fas",iconName:"cannabis",icon:[512,512,[],"f55f","M503.47 360.25c-1.56-.82-32.39-16.89-76.78-25.81 64.25-75.12 84.05-161.67 84.93-165.64 1.18-5.33-.44-10.9-4.3-14.77-3.03-3.04-7.12-4.7-11.32-4.7-1.14 0-2.29.12-3.44.38-3.88.85-86.54 19.59-160.58 79.76.01-1.46.01-2.93.01-4.4 0-118.79-59.98-213.72-62.53-217.7A15.973 15.973 0 0 0 256 0c-5.45 0-10.53 2.78-13.47 7.37-2.55 3.98-62.53 98.91-62.53 217.7 0 1.47.01 2.94.01 4.4-74.03-60.16-156.69-78.9-160.58-79.76-1.14-.25-2.29-.38-3.44-.38-4.2 0-8.29 1.66-11.32 4.7A15.986 15.986 0 0 0 .38 168.8c.88 3.97 20.68 90.52 84.93 165.64-44.39 8.92-75.21 24.99-76.78 25.81a16.003 16.003 0 0 0-.02 28.29c2.45 1.29 60.76 31.72 133.49 31.72 6.14 0 11.96-.1 17.5-.31-11.37 22.23-16.52 38.31-16.81 39.22-1.8 5.68-.29 11.89 3.91 16.11a16.019 16.019 0 0 0 16.1 3.99c1.83-.57 37.72-11.99 77.3-39.29V504c0 4.42 3.58 8 8 8h16c4.42 0 8-3.58 8-8v-64.01c39.58 27.3 75.47 38.71 77.3 39.29a16.019 16.019 0 0 0 16.1-3.99c4.2-4.22 5.71-10.43 3.91-16.11-.29-.91-5.45-16.99-16.81-39.22 5.54.21 11.37.31 17.5.31 72.72 0 131.04-30.43 133.49-31.72 5.24-2.78 8.52-8.22 8.51-14.15-.01-5.94-3.29-11.39-8.53-14.15z"]},Lt={prefix:"fas",iconName:"capsules",icon:[576,512,[],"f46b","M555.3 300.1L424.2 112.8C401.9 81 366.4 64 330.4 64c-22.6 0-45.5 6.7-65.5 20.7-19.7 13.8-33.7 32.8-41.5 53.8C220.5 79.2 172 32 112 32 50.1 32 0 82.1 0 144v224c0 61.9 50.1 112 112 112s112-50.1 112-112V218.9c3.3 8.6 7.3 17.1 12.8 25L368 431.2c22.2 31.8 57.7 48.8 93.8 48.8 22.7 0 45.5-6.7 65.5-20.7 51.7-36.2 64.2-107.5 28-159.2zM160 256H64V144c0-26.5 21.5-48 48-48s48 21.5 48 48v112zm194.8 44.9l-65.6-93.7c-7.7-11-10.7-24.4-8.3-37.6 2.3-13.2 9.7-24.8 20.7-32.5 8.5-6 18.5-9.1 28.8-9.1 16.5 0 31.9 8 41.3 21.5l65.6 93.7-82.5 57.7z"]},kt={prefix:"fas",iconName:"car",icon:[512,512,[],"f1b9","M499.99 176h-59.87l-16.64-41.6C406.38 91.63 365.57 64 319.5 64h-127c-46.06 0-86.88 27.63-103.99 70.4L71.87 176H12.01C4.2 176-1.53 183.34.37 190.91l6 24C7.7 220.25 12.5 224 18.01 224h20.07C24.65 235.73 16 252.78 16 272v48c0 16.12 6.16 30.67 16 41.93V416c0 17.67 14.33 32 32 32h32c17.67 0 32-14.33 32-32v-32h256v32c0 17.67 14.33 32 32 32h32c17.67 0 32-14.33 32-32v-54.07c9.84-11.25 16-25.8 16-41.93v-48c0-19.22-8.65-36.27-22.07-48H494c5.51 0 10.31-3.75 11.64-9.09l6-24c1.89-7.57-3.84-14.91-11.65-14.91zm-352.06-17.83c7.29-18.22 24.94-30.17 44.57-30.17h127c19.63 0 37.28 11.95 44.57 30.17L384 208H128l19.93-49.83zM96 319.8c-19.2 0-32-12.76-32-31.9S76.8 256 96 256s48 28.71 48 47.85-28.8 15.95-48 15.95zm320 0c-19.2 0-48 3.19-48-15.95S396.8 256 416 256s32 12.76 32 31.9-12.8 31.9-32 31.9z"]},Pt={prefix:"fas",iconName:"car-alt",icon:[480,512,[],"f5de","M438.66 212.33l-11.24-28.1-19.93-49.83C390.38 91.63 349.57 64 303.5 64h-127c-46.06 0-86.88 27.63-103.99 70.4l-19.93 49.83-11.24 28.1C17.22 221.5 0 244.66 0 272v48c0 16.12 6.16 30.67 16 41.93V416c0 17.67 14.33 32 32 32h32c17.67 0 32-14.33 32-32v-32h256v32c0 17.67 14.33 32 32 32h32c17.67 0 32-14.33 32-32v-54.07c9.84-11.25 16-25.8 16-41.93v-48c0-27.34-17.22-50.5-41.34-59.67zm-306.73-54.16c7.29-18.22 24.94-30.17 44.57-30.17h127c19.63 0 37.28 11.95 44.57 30.17L368 208H112l19.93-49.83zM80 319.8c-19.2 0-32-12.76-32-31.9S60.8 256 80 256s48 28.71 48 47.85-28.8 15.95-48 15.95zm320 0c-19.2 0-48 3.19-48-15.95S380.8 256 400 256s32 12.76 32 31.9-12.8 31.9-32 31.9z"]},Nt={prefix:"fas",iconName:"car-battery",icon:[512,512,[],"f5df","M480 128h-32V80c0-8.84-7.16-16-16-16h-96c-8.84 0-16 7.16-16 16v48H192V80c0-8.84-7.16-16-16-16H80c-8.84 0-16 7.16-16 16v48H32c-17.67 0-32 14.33-32 32v256c0 17.67 14.33 32 32 32h448c17.67 0 32-14.33 32-32V160c0-17.67-14.33-32-32-32zM192 264c0 4.42-3.58 8-8 8H72c-4.42 0-8-3.58-8-8v-16c0-4.42 3.58-8 8-8h112c4.42 0 8 3.58 8 8v16zm256 0c0 4.42-3.58 8-8 8h-40v40c0 4.42-3.58 8-8 8h-16c-4.42 0-8-3.58-8-8v-40h-40c-4.42 0-8-3.58-8-8v-16c0-4.42 3.58-8 8-8h40v-40c0-4.42 3.58-8 8-8h16c4.42 0 8 3.58 8 8v40h40c4.42 0 8 3.58 8 8v16z"]},Ot={prefix:"fas",iconName:"car-crash",icon:[640,512,[],"f5e1","M143.25 220.81l-12.42 46.37c-3.01 11.25-3.63 22.89-2.41 34.39l-35.2 28.98c-6.57 5.41-16.31-.43-14.62-8.77l15.44-76.68c1.06-5.26-2.66-10.28-8-10.79l-77.86-7.55c-8.47-.82-11.23-11.83-4.14-16.54l65.15-43.3c4.46-2.97 5.38-9.15 1.98-13.29L21.46 93.22c-5.41-6.57.43-16.3 8.78-14.62l76.68 15.44c5.26 1.06 10.28-2.66 10.8-8l7.55-77.86c.82-8.48 11.83-11.23 16.55-4.14l43.3 65.14c2.97 4.46 9.15 5.38 13.29 1.98l60.4-49.71c6.57-5.41 16.3.43 14.62 8.77L262.1 86.38c-2.71 3.05-5.43 6.09-7.91 9.4l-32.15 42.97-10.71 14.32c-32.73 8.76-59.18 34.53-68.08 67.74zm494.57 132.51l-12.42 46.36c-3.13 11.68-9.38 21.61-17.55 29.36a66.876 66.876 0 0 1-8.76 7l-13.99 52.23c-1.14 4.27-3.1 8.1-5.65 11.38-7.67 9.84-20.74 14.68-33.54 11.25L515 502.62c-17.07-4.57-27.2-22.12-22.63-39.19l8.28-30.91-247.28-66.26-8.28 30.91c-4.57 17.07-22.12 27.2-39.19 22.63l-30.91-8.28c-12.8-3.43-21.7-14.16-23.42-26.51-.57-4.12-.35-8.42.79-12.68l13.99-52.23a66.62 66.62 0 0 1-4.09-10.45c-3.2-10.79-3.65-22.52-.52-34.2l12.42-46.37c5.31-19.8 19.36-34.83 36.89-42.21a64.336 64.336 0 0 1 18.49-4.72l18.13-24.23 32.15-42.97c3.45-4.61 7.19-8.9 11.2-12.84 8-7.89 17.03-14.44 26.74-19.51 4.86-2.54 9.89-4.71 15.05-6.49 10.33-3.58 21.19-5.63 32.24-6.04 11.05-.41 22.31.82 33.43 3.8l122.68 32.87c11.12 2.98 21.48 7.54 30.85 13.43a111.11 111.11 0 0 1 34.69 34.5c8.82 13.88 14.64 29.84 16.68 46.99l6.36 53.29 3.59 30.05a64.49 64.49 0 0 1 22.74 29.93c4.39 11.88 5.29 25.19 1.75 38.39zM255.58 234.34c-18.55-4.97-34.21 4.04-39.17 22.53-4.96 18.49 4.11 34.12 22.65 39.09 18.55 4.97 45.54 15.51 50.49-2.98 4.96-18.49-15.43-53.67-33.97-58.64zm290.61 28.17l-6.36-53.29c-.58-4.87-1.89-9.53-3.82-13.86-5.8-12.99-17.2-23.01-31.42-26.82l-122.68-32.87a48.008 48.008 0 0 0-50.86 17.61l-32.15 42.97 172 46.08 75.29 20.18zm18.49 54.65c-18.55-4.97-53.8 15.31-58.75 33.79-4.95 18.49 23.69 22.86 42.24 27.83 18.55 4.97 34.21-4.04 39.17-22.53 4.95-18.48-4.11-34.12-22.66-39.09z"]},_t={prefix:"fas",iconName:"car-side",icon:[640,512,[],"f5e4","M544 192h-16L419.22 56.02A64.025 64.025 0 0 0 369.24 32H155.33c-26.17 0-49.7 15.93-59.42 40.23L48 194.26C20.44 201.4 0 226.21 0 256v112c0 8.84 7.16 16 16 16h48c0 53.02 42.98 96 96 96s96-42.98 96-96h128c0 53.02 42.98 96 96 96s96-42.98 96-96h48c8.84 0 16-7.16 16-16v-80c0-53.02-42.98-96-96-96zM160 432c-26.47 0-48-21.53-48-48s21.53-48 48-48 48 21.53 48 48-21.53 48-48 48zm72-240H116.93l38.4-96H232v96zm48 0V96h89.24l76.8 96H280zm200 240c-26.47 0-48-21.53-48-48s21.53-48 48-48 48 21.53 48 48-21.53 48-48 48z"]},Ft={prefix:"fas",iconName:"caravan",icon:[640,512,[],"f8ff","M416,208a16,16,0,1,0,16,16A16,16,0,0,0,416,208ZM624,320H576V160A160,160,0,0,0,416,0H64A64,64,0,0,0,0,64V320a64,64,0,0,0,64,64H96a96,96,0,0,0,192,0H624a16,16,0,0,0,16-16V336A16,16,0,0,0,624,320ZM192,432a48,48,0,1,1,48-48A48.05,48.05,0,0,1,192,432Zm64-240a32,32,0,0,1-32,32H96a32,32,0,0,1-32-32V128A32,32,0,0,1,96,96H224a32,32,0,0,1,32,32ZM448,320H320V128a32,32,0,0,1,32-32h64a32,32,0,0,1,32,32Z"]},Gt={prefix:"fas",iconName:"caret-down",icon:[320,512,[],"f0d7","M31.3 192h257.3c17.8 0 26.7 21.5 14.1 34.1L174.1 354.8c-7.8 7.8-20.5 7.8-28.3 0L17.2 226.1C4.6 213.5 13.5 192 31.3 192z"]},Vt={prefix:"fas",iconName:"caret-left",icon:[192,512,[],"f0d9","M192 127.338v257.324c0 17.818-21.543 26.741-34.142 14.142L29.196 270.142c-7.81-7.81-7.81-20.474 0-28.284l128.662-128.662c12.599-12.6 34.142-3.676 34.142 14.142z"]},Bt={prefix:"fas",iconName:"caret-right",icon:[192,512,[],"f0da","M0 384.662V127.338c0-17.818 21.543-26.741 34.142-14.142l128.662 128.662c7.81 7.81 7.81 20.474 0 28.284L34.142 398.804C21.543 411.404 0 402.48 0 384.662z"]},Ht={prefix:"fas",iconName:"caret-square-down",icon:[448,512,[],"f150","M448 80v352c0 26.5-21.5 48-48 48H48c-26.5 0-48-21.5-48-48V80c0-26.5 21.5-48 48-48h352c26.5 0 48 21.5 48 48zM92.5 220.5l123 123c4.7 4.7 12.3 4.7 17 0l123-123c7.6-7.6 2.2-20.5-8.5-20.5H101c-10.7 0-16.1 12.9-8.5 20.5z"]},zt={prefix:"fas",iconName:"caret-square-left",icon:[448,512,[],"f191","M400 480H48c-26.51 0-48-21.49-48-48V80c0-26.51 21.49-48 48-48h352c26.51 0 48 21.49 48 48v352c0 26.51-21.49 48-48 48zM259.515 124.485l-123.03 123.03c-4.686 4.686-4.686 12.284 0 16.971l123.029 123.029c7.56 7.56 20.485 2.206 20.485-8.485V132.971c.001-10.691-12.925-16.045-20.484-8.486z"]},Ut={prefix:"fas",iconName:"caret-square-right",icon:[448,512,[],"f152","M48 32h352c26.51 0 48 21.49 48 48v352c0 26.51-21.49 48-48 48H48c-26.51 0-48-21.49-48-48V80c0-26.51 21.49-48 48-48zm140.485 355.515l123.029-123.029c4.686-4.686 4.686-12.284 0-16.971l-123.029-123.03c-7.56-7.56-20.485-2.206-20.485 8.485v246.059c0 10.691 12.926 16.045 20.485 8.486z"]},Wt={prefix:"fas",iconName:"caret-square-up",icon:[448,512,[],"f151","M0 432V80c0-26.51 21.49-48 48-48h352c26.51 0 48 21.49 48 48v352c0 26.51-21.49 48-48 48H48c-26.51 0-48-21.49-48-48zm355.515-140.485l-123.03-123.03c-4.686-4.686-12.284-4.686-16.971 0L92.485 291.515c-7.56 7.56-2.206 20.485 8.485 20.485h246.059c10.691 0 16.045-12.926 8.486-20.485z"]},jt={prefix:"fas",iconName:"caret-up",icon:[320,512,[],"f0d8","M288.662 352H31.338c-17.818 0-26.741-21.543-14.142-34.142l128.662-128.662c7.81-7.81 20.474-7.81 28.284 0l128.662 128.662c12.6 12.599 3.676 34.142-14.142 34.142z"]},Kt={prefix:"fas",iconName:"carrot",icon:[512,512,[],"f787","M298.2 156.6c-52.7-25.7-114.5-10.5-150.2 32.8l55.2 55.2c6.3 6.3 6.3 16.4 0 22.6-3.1 3.1-7.2 4.7-11.3 4.7s-8.2-1.6-11.3-4.7L130.4 217 2.3 479.7c-2.9 6-3.1 13.3 0 19.7 5.4 11.1 18.9 15.7 30 10.3l133.6-65.2-49.2-49.2c-6.3-6.2-6.3-16.4 0-22.6 6.3-6.2 16.4-6.2 22.6 0l57 57 102-49.8c24-11.7 44.5-31.3 57.1-57.1 30.1-61.7 4.5-136.1-57.2-166.2zm92.1-34.9C409.8 81 399.7 32.9 360 0c-50.3 41.7-52.5 107.5-7.9 151.9l8 8c44.4 44.6 110.3 42.4 151.9-7.9-32.9-39.7-81-49.8-121.7-30.3z"]},$t={prefix:"fas",iconName:"cart-arrow-down",icon:[576,512,[],"f218","M504.717 320H211.572l6.545 32h268.418c15.401 0 26.816 14.301 23.403 29.319l-5.517 24.276C523.112 414.668 536 433.828 536 456c0 31.202-25.519 56.444-56.824 55.994-29.823-.429-54.35-24.631-55.155-54.447-.44-16.287 6.085-31.049 16.803-41.548H231.176C241.553 426.165 248 440.326 248 456c0 31.813-26.528 57.431-58.67 55.938-28.54-1.325-51.751-24.385-53.251-52.917-1.158-22.034 10.436-41.455 28.051-51.586L93.883 64H24C10.745 64 0 53.255 0 40V24C0 10.745 10.745 0 24 0h102.529c11.401 0 21.228 8.021 23.513 19.19L159.208 64H551.99c15.401 0 26.816 14.301 23.403 29.319l-47.273 208C525.637 312.246 515.923 320 504.717 320zM403.029 192H360v-60c0-6.627-5.373-12-12-12h-24c-6.627 0-12 5.373-12 12v60h-43.029c-10.691 0-16.045 12.926-8.485 20.485l67.029 67.029c4.686 4.686 12.284 4.686 16.971 0l67.029-67.029c7.559-7.559 2.205-20.485-8.486-20.485z"]},Yt={prefix:"fas",iconName:"cart-plus",icon:[576,512,[],"f217","M504.717 320H211.572l6.545 32h268.418c15.401 0 26.816 14.301 23.403 29.319l-5.517 24.276C523.112 414.668 536 433.828 536 456c0 31.202-25.519 56.444-56.824 55.994-29.823-.429-54.35-24.631-55.155-54.447-.44-16.287 6.085-31.049 16.803-41.548H231.176C241.553 426.165 248 440.326 248 456c0 31.813-26.528 57.431-58.67 55.938-28.54-1.325-51.751-24.385-53.251-52.917-1.158-22.034 10.436-41.455 28.051-51.586L93.883 64H24C10.745 64 0 53.255 0 40V24C0 10.745 10.745 0 24 0h102.529c11.401 0 21.228 8.021 23.513 19.19L159.208 64H551.99c15.401 0 26.816 14.301 23.403 29.319l-47.273 208C525.637 312.246 515.923 320 504.717 320zM408 168h-48v-40c0-8.837-7.163-16-16-16h-16c-8.837 0-16 7.163-16 16v40h-48c-8.837 0-16 7.163-16 16v16c0 8.837 7.163 16 16 16h48v40c0 8.837 7.163 16 16 16h16c8.837 0 16-7.163 16-16v-40h48c8.837 0 16-7.163 16-16v-16c0-8.837-7.163-16-16-16z"]},qt={prefix:"fas",iconName:"cash-register",icon:[512,512,[],"f788","M511.1 378.8l-26.7-160c-2.6-15.4-15.9-26.7-31.6-26.7H208v-64h96c8.8 0 16-7.2 16-16V16c0-8.8-7.2-16-16-16H48c-8.8 0-16 7.2-16 16v96c0 8.8 7.2 16 16 16h96v64H59.1c-15.6 0-29 11.3-31.6 26.7L.8 378.7c-.6 3.5-.9 7-.9 10.5V480c0 17.7 14.3 32 32 32h448c17.7 0 32-14.3 32-32v-90.7c.1-3.5-.2-7-.8-10.5zM280 248c0-8.8 7.2-16 16-16h16c8.8 0 16 7.2 16 16v16c0 8.8-7.2 16-16 16h-16c-8.8 0-16-7.2-16-16v-16zm-32 64h16c8.8 0 16 7.2 16 16v16c0 8.8-7.2 16-16 16h-16c-8.8 0-16-7.2-16-16v-16c0-8.8 7.2-16 16-16zm-32-80c8.8 0 16 7.2 16 16v16c0 8.8-7.2 16-16 16h-16c-8.8 0-16-7.2-16-16v-16c0-8.8 7.2-16 16-16h16zM80 80V48h192v32H80zm40 200h-16c-8.8 0-16-7.2-16-16v-16c0-8.8 7.2-16 16-16h16c8.8 0 16 7.2 16 16v16c0 8.8-7.2 16-16 16zm16 64v-16c0-8.8 7.2-16 16-16h16c8.8 0 16 7.2 16 16v16c0 8.8-7.2 16-16 16h-16c-8.8 0-16-7.2-16-16zm216 112c0 4.4-3.6 8-8 8H168c-4.4 0-8-3.6-8-8v-16c0-4.4 3.6-8 8-8h176c4.4 0 8 3.6 8 8v16zm24-112c0 8.8-7.2 16-16 16h-16c-8.8 0-16-7.2-16-16v-16c0-8.8 7.2-16 16-16h16c8.8 0 16 7.2 16 16v16zm48-80c0 8.8-7.2 16-16 16h-16c-8.8 0-16-7.2-16-16v-16c0-8.8 7.2-16 16-16h16c8.8 0 16 7.2 16 16v16z"]},Xt={prefix:"fas",iconName:"cat",icon:[512,512,[],"f6be","M290.59 192c-20.18 0-106.82 1.98-162.59 85.95V192c0-52.94-43.06-96-96-96-17.67 0-32 14.33-32 32s14.33 32 32 32c17.64 0 32 14.36 32 32v256c0 35.3 28.7 64 64 64h176c8.84 0 16-7.16 16-16v-16c0-17.67-14.33-32-32-32h-32l128-96v144c0 8.84 7.16 16 16 16h32c8.84 0 16-7.16 16-16V289.86c-10.29 2.67-20.89 4.54-32 4.54-61.81 0-113.52-44.05-125.41-102.4zM448 96h-64l-64-64v134.4c0 53.02 42.98 96 96 96s96-42.98 96-96V32l-64 64zm-72 80c-8.84 0-16-7.16-16-16s7.16-16 16-16 16 7.16 16 16-7.16 16-16 16zm80 0c-8.84 0-16-7.16-16-16s7.16-16 16-16 16 7.16 16 16-7.16 16-16 16z"]},Zt={prefix:"fas",iconName:"certificate",icon:[512,512,[],"f0a3","M458.622 255.92l45.985-45.005c13.708-12.977 7.316-36.039-10.664-40.339l-62.65-15.99 17.661-62.015c4.991-17.838-11.829-34.663-29.661-29.671l-61.994 17.667-15.984-62.671C337.085.197 313.765-6.276 300.99 7.228L256 53.57 211.011 7.229c-12.63-13.351-36.047-7.234-40.325 10.668l-15.984 62.671-61.995-17.667C74.87 57.907 58.056 74.738 63.046 92.572l17.661 62.015-62.65 15.99C.069 174.878-6.31 197.944 7.392 210.915l45.985 45.005-45.985 45.004c-13.708 12.977-7.316 36.039 10.664 40.339l62.65 15.99-17.661 62.015c-4.991 17.838 11.829 34.663 29.661 29.671l61.994-17.667 15.984 62.671c4.439 18.575 27.696 24.018 40.325 10.668L256 458.61l44.989 46.001c12.5 13.488 35.987 7.486 40.325-10.668l15.984-62.671 61.994 17.667c17.836 4.994 34.651-11.837 29.661-29.671l-17.661-62.015 62.65-15.99c17.987-4.302 24.366-27.367 10.664-40.339l-45.984-45.004z"]},Qt={prefix:"fas",iconName:"chair",icon:[448,512,[],"f6c0","M112 128c0-29.5 16.2-55 40-68.9V256h48V48h48v208h48V59.1c23.8 13.9 40 39.4 40 68.9v128h48V128C384 57.3 326.7 0 256 0h-64C121.3 0 64 57.3 64 128v128h48zm334.3 213.9l-10.7-32c-4.4-13.1-16.6-21.9-30.4-21.9H42.7c-13.8 0-26 8.8-30.4 21.9l-10.7 32C-5.2 362.6 10.2 384 32 384v112c0 8.8 7.2 16 16 16h32c8.8 0 16-7.2 16-16V384h256v112c0 8.8 7.2 16 16 16h32c8.8 0 16-7.2 16-16V384c21.8 0 37.2-21.4 30.3-42.1z"]},Jt={prefix:"fas",iconName:"chalkboard",icon:[640,512,[],"f51b","M96 64h448v352h64V40c0-22.06-17.94-40-40-40H72C49.94 0 32 17.94 32 40v376h64V64zm528 384H480v-64H288v64H16c-8.84 0-16 7.16-16 16v32c0 8.84 7.16 16 16 16h608c8.84 0 16-7.16 16-16v-32c0-8.84-7.16-16-16-16z"]},ei={prefix:"fas",iconName:"chalkboard-teacher",icon:[640,512,[],"f51c","M208 352c-2.39 0-4.78.35-7.06 1.09C187.98 357.3 174.35 360 160 360c-14.35 0-27.98-2.7-40.95-6.91-2.28-.74-4.66-1.09-7.05-1.09C49.94 352-.33 402.48 0 464.62.14 490.88 21.73 512 48 512h224c26.27 0 47.86-21.12 48-47.38.33-62.14-49.94-112.62-112-112.62zm-48-32c53.02 0 96-42.98 96-96s-42.98-96-96-96-96 42.98-96 96 42.98 96 96 96zM592 0H208c-26.47 0-48 22.25-48 49.59V96c23.42 0 45.1 6.78 64 17.8V64h352v288h-64v-64H384v64h-76.24c19.1 16.69 33.12 38.73 39.69 64H592c26.47 0 48-22.25 48-49.59V49.59C640 22.25 618.47 0 592 0z"]},ti={prefix:"fas",iconName:"charging-station",icon:[576,512,[],"f5e7","M336 448H16c-8.84 0-16 7.16-16 16v32c0 8.84 7.16 16 16 16h320c8.84 0 16-7.16 16-16v-32c0-8.84-7.16-16-16-16zm208-320V80c0-8.84-7.16-16-16-16s-16 7.16-16 16v48h-32V80c0-8.84-7.16-16-16-16s-16 7.16-16 16v48h-16c-8.84 0-16 7.16-16 16v32c0 35.76 23.62 65.69 56 75.93v118.49c0 13.95-9.5 26.92-23.26 29.19C431.22 402.5 416 388.99 416 372v-28c0-48.6-39.4-88-88-88h-8V64c0-35.35-28.65-64-64-64H96C60.65 0 32 28.65 32 64v352h288V304h8c22.09 0 40 17.91 40 40v24.61c0 39.67 28.92 75.16 68.41 79.01C481.71 452.05 520 416.41 520 372V251.93c32.38-10.24 56-40.17 56-75.93v-32c0-8.84-7.16-16-16-16h-16zm-283.91 47.76l-93.7 139c-2.2 3.33-6.21 5.24-10.39 5.24-7.67 0-13.47-6.28-11.67-12.92L167.35 224H108c-7.25 0-12.85-5.59-11.89-11.89l16-107C112.9 99.9 117.98 96 124 96h68c7.88 0 13.62 6.54 11.6 13.21L192 160h57.7c9.24 0 15.01 8.78 10.39 15.76z"]},ii={prefix:"fas",iconName:"chart-area",icon:[512,512,[],"f1fe","M500 384c6.6 0 12 5.4 12 12v40c0 6.6-5.4 12-12 12H12c-6.6 0-12-5.4-12-12V76c0-6.6 5.4-12 12-12h40c6.6 0 12 5.4 12 12v308h436zM372.7 159.5L288 216l-85.3-113.7c-5.1-6.8-15.5-6.3-19.9 1L96 248v104h384l-89.9-187.8c-3.2-6.5-11.4-8.7-17.4-4.7z"]},ni={prefix:"fas",iconName:"chart-bar",icon:[512,512,[],"f080","M332.8 320h38.4c6.4 0 12.8-6.4 12.8-12.8V172.8c0-6.4-6.4-12.8-12.8-12.8h-38.4c-6.4 0-12.8 6.4-12.8 12.8v134.4c0 6.4 6.4 12.8 12.8 12.8zm96 0h38.4c6.4 0 12.8-6.4 12.8-12.8V76.8c0-6.4-6.4-12.8-12.8-12.8h-38.4c-6.4 0-12.8 6.4-12.8 12.8v230.4c0 6.4 6.4 12.8 12.8 12.8zm-288 0h38.4c6.4 0 12.8-6.4 12.8-12.8v-70.4c0-6.4-6.4-12.8-12.8-12.8h-38.4c-6.4 0-12.8 6.4-12.8 12.8v70.4c0 6.4 6.4 12.8 12.8 12.8zm96 0h38.4c6.4 0 12.8-6.4 12.8-12.8V108.8c0-6.4-6.4-12.8-12.8-12.8h-38.4c-6.4 0-12.8 6.4-12.8 12.8v198.4c0 6.4 6.4 12.8 12.8 12.8zM496 384H64V80c0-8.84-7.16-16-16-16H16C7.16 64 0 71.16 0 80v336c0 17.67 14.33 32 32 32h464c8.84 0 16-7.16 16-16v-32c0-8.84-7.16-16-16-16z"]},si={prefix:"fas",iconName:"chart-line",icon:[512,512,[],"f201","M496 384H64V80c0-8.84-7.16-16-16-16H16C7.16 64 0 71.16 0 80v336c0 17.67 14.33 32 32 32h464c8.84 0 16-7.16 16-16v-32c0-8.84-7.16-16-16-16zM464 96H345.94c-21.38 0-32.09 25.85-16.97 40.97l32.4 32.4L288 242.75l-73.37-73.37c-12.5-12.5-32.76-12.5-45.25 0l-68.69 68.69c-6.25 6.25-6.25 16.38 0 22.63l22.62 22.62c6.25 6.25 16.38 6.25 22.63 0L192 237.25l73.37 73.37c12.5 12.5 32.76 12.5 45.25 0l96-96 32.4 32.4c15.12 15.12 40.97 4.41 40.97-16.97V112c.01-8.84-7.15-16-15.99-16z"]},ri={prefix:"fas",iconName:"chart-pie",icon:[544,512,[],"f200","M527.79 288H290.5l158.03 158.03c6.04 6.04 15.98 6.53 22.19.68 38.7-36.46 65.32-85.61 73.13-140.86 1.34-9.46-6.51-17.85-16.06-17.85zm-15.83-64.8C503.72 103.74 408.26 8.28 288.8.04 279.68-.59 272 7.1 272 16.24V240h223.77c9.14 0 16.82-7.68 16.19-16.8zM224 288V50.71c0-9.55-8.39-17.4-17.84-16.06C86.99 51.49-4.1 155.6.14 280.37 4.5 408.51 114.83 513.59 243.03 511.98c50.4-.63 96.97-16.87 135.26-44.03 7.9-5.6 8.42-17.23 1.57-24.08L224 288z"]},oi={prefix:"fas",iconName:"check",icon:[512,512,[],"f00c","M173.898 439.404l-166.4-166.4c-9.997-9.997-9.997-26.206 0-36.204l36.203-36.204c9.997-9.998 26.207-9.998 36.204 0L192 312.69 432.095 72.596c9.997-9.997 26.207-9.997 36.204 0l36.203 36.204c9.997 9.997 9.997 26.206 0 36.204l-294.4 294.401c-9.998 9.997-26.207 9.997-36.204-.001z"]},ai={prefix:"fas",iconName:"check-circle",icon:[512,512,[],"f058","M504 256c0 136.967-111.033 248-248 248S8 392.967 8 256 119.033 8 256 8s248 111.033 248 248zM227.314 387.314l184-184c6.248-6.248 6.248-16.379 0-22.627l-22.627-22.627c-6.248-6.249-16.379-6.249-22.628 0L216 308.118l-70.059-70.059c-6.248-6.248-16.379-6.248-22.628 0l-22.627 22.627c-6.248 6.248-6.248 16.379 0 22.627l104 104c6.249 6.249 16.379 6.249 22.628.001z"]},li={prefix:"fas",iconName:"check-double",icon:[512,512,[],"f560","M505 174.8l-39.6-39.6c-9.4-9.4-24.6-9.4-33.9 0L192 374.7 80.6 263.2c-9.4-9.4-24.6-9.4-33.9 0L7 302.9c-9.4 9.4-9.4 24.6 0 34L175 505c9.4 9.4 24.6 9.4 33.9 0l296-296.2c9.4-9.5 9.4-24.7.1-34zm-324.3 106c6.2 6.3 16.4 6.3 22.6 0l208-208.2c6.2-6.3 6.2-16.4 0-22.6L366.1 4.7c-6.2-6.3-16.4-6.3-22.6 0L192 156.2l-55.4-55.5c-6.2-6.3-16.4-6.3-22.6 0L68.7 146c-6.2 6.3-6.2 16.4 0 22.6l112 112.2z"]},ci={prefix:"fas",iconName:"check-square",icon:[448,512,[],"f14a","M400 480H48c-26.51 0-48-21.49-48-48V80c0-26.51 21.49-48 48-48h352c26.51 0 48 21.49 48 48v352c0 26.51-21.49 48-48 48zm-204.686-98.059l184-184c6.248-6.248 6.248-16.379 0-22.627l-22.627-22.627c-6.248-6.248-16.379-6.249-22.628 0L184 302.745l-70.059-70.059c-6.248-6.248-16.379-6.248-22.628 0l-22.627 22.627c-6.248 6.248-6.248 16.379 0 22.627l104 104c6.249 6.25 16.379 6.25 22.628.001z"]},hi={prefix:"fas",iconName:"cheese",icon:[512,512,[],"f7ef","M0 288v160a32 32 0 0 0 32 32h448a32 32 0 0 0 32-32V288zM299.83 32a32 32 0 0 0-21.13 7L0 256h512c0-119.89-94-217.8-212.17-224z"]},di={prefix:"fas",iconName:"chess",icon:[512,512,[],"f439","M74 208H64a16 16 0 0 0-16 16v16a16 16 0 0 0 16 16h15.94A535.78 535.78 0 0 1 64 384h128a535.78 535.78 0 0 1-15.94-128H192a16 16 0 0 0 16-16v-16a16 16 0 0 0-16-16h-10l33.89-90.38a16 16 0 0 0-15-21.62H144V64h24a8 8 0 0 0 8-8V40a8 8 0 0 0-8-8h-24V8a8 8 0 0 0-8-8h-16a8 8 0 0 0-8 8v24H88a8 8 0 0 0-8 8v16a8 8 0 0 0 8 8h24v32H55.09a16 16 0 0 0-15 21.62zm173.16 251.58L224 448v-16a16 16 0 0 0-16-16H48a16 16 0 0 0-16 16v16L8.85 459.58A16 16 0 0 0 0 473.89V496a16 16 0 0 0 16 16h224a16 16 0 0 0 16-16v-22.11a16 16 0 0 0-8.84-14.31zm92.77-157.78l-3.29 82.2h126.72l-3.29-82.21 24.6-20.79A32 32 0 0 0 496 256.54V198a6 6 0 0 0-6-6h-26.38a6 6 0 0 0-6 6v26h-24.71v-26a6 6 0 0 0-6-6H373.1a6 6 0 0 0-6 6v26h-24.71v-26a6 6 0 0 0-6-6H310a6 6 0 0 0-6 6v58.6a32 32 0 0 0 11.36 24.4zM384 304a16 16 0 0 1 32 0v32h-32zm119.16 155.58L480 448v-16a16 16 0 0 0-16-16H336a16 16 0 0 0-16 16v16l-23.15 11.58a16 16 0 0 0-8.85 14.31V496a16 16 0 0 0 16 16h192a16 16 0 0 0 16-16v-22.11a16 16 0 0 0-8.84-14.31z"]},ui={prefix:"fas",iconName:"chess-bishop",icon:[320,512,[],"f43a","M8 287.88c0 51.64 22.14 73.83 56 84.6V416h192v-43.52c33.86-10.77 56-33 56-84.6 0-30.61-10.73-67.1-26.69-102.56L185 285.65a8 8 0 0 1-11.31 0l-11.31-11.31a8 8 0 0 1 0-11.31L270.27 155.1c-20.8-37.91-46.47-72.1-70.87-92.59C213.4 59.09 224 47.05 224 32a32 32 0 0 0-32-32h-64a32 32 0 0 0-32 32c0 15 10.6 27.09 24.6 30.51C67.81 106.8 8 214.5 8 287.88zM304 448H16a16 16 0 0 0-16 16v32a16 16 0 0 0 16 16h288a16 16 0 0 0 16-16v-32a16 16 0 0 0-16-16z"]},pi={prefix:"fas",iconName:"chess-board",icon:[512,512,[],"f43c","M255.9.2h-64v64h64zM0 64.17v64h64v-64zM128 .2H64v64h64zm64 255.9v64h64v-64zM0 192.12v64h64v-64zM383.85.2h-64v64h64zm128 0h-64v64h64zM128 256.1H64v64h64zM511.8 448v-64h-64v64zm0-128v-64h-64v64zM383.85 512h64v-64h-64zm128-319.88v-64h-64v64zM128 512h64v-64h-64zM0 512h64v-64H0zm255.9 0h64v-64h-64zM0 320.07v64h64v-64zm319.88-191.92v-64h-64v64zm-64 128h64v-64h-64zm-64 128v64h64v-64zm128-64h64v-64h-64zm0-127.95h64v-64h-64zm0 191.93v64h64v-64zM64 384.05v64h64v-64zm128-255.9v-64h-64v64zm191.92 255.9h64v-64h-64zm-128-191.93v-64h-64v64zm128-127.95v64h64v-64zm-128 255.9v64h64v-64zm-64-127.95H128v64h64zm191.92 64h64v-64h-64zM128 128.15H64v64h64zm0 191.92v64h64v-64z"]},gi={prefix:"fas",iconName:"chess-king",icon:[448,512,[],"f43f","M400 448H48a16 16 0 0 0-16 16v32a16 16 0 0 0 16 16h352a16 16 0 0 0 16-16v-32a16 16 0 0 0-16-16zm16-288H256v-48h40a8 8 0 0 0 8-8V56a8 8 0 0 0-8-8h-40V8a8 8 0 0 0-8-8h-48a8 8 0 0 0-8 8v40h-40a8 8 0 0 0-8 8v48a8 8 0 0 0 8 8h40v48H32a32 32 0 0 0-30.52 41.54L74.56 416h298.88l73.08-214.46A32 32 0 0 0 416 160z"]},fi={prefix:"fas",iconName:"chess-knight",icon:[384,512,[],"f441","M19 272.47l40.63 18.06a32 32 0 0 0 24.88.47l12.78-5.12a32 32 0 0 0 18.76-20.5l9.22-30.65a24 24 0 0 1 12.55-15.65L159.94 208v50.33a48 48 0 0 1-26.53 42.94l-57.22 28.65A80 80 0 0 0 32 401.48V416h319.86V224c0-106-85.92-192-191.92-192H12A12 12 0 0 0 0 44a16.9 16.9 0 0 0 1.79 7.58L16 80l-9 9a24 24 0 0 0-7 17v137.21a32 32 0 0 0 19 29.26zM52 128a20 20 0 1 1-20 20 20 20 0 0 1 20-20zm316 320H16a16 16 0 0 0-16 16v32a16 16 0 0 0 16 16h352a16 16 0 0 0 16-16v-32a16 16 0 0 0-16-16z"]},mi={prefix:"fas",iconName:"chess-pawn",icon:[320,512,[],"f443","M105.1 224H80a16 16 0 0 0-16 16v32a16 16 0 0 0 16 16h16v5.49c0 44-4.14 86.6-24 122.51h176c-19.89-35.91-24-78.51-24-122.51V288h16a16 16 0 0 0 16-16v-32a16 16 0 0 0-16-16h-25.1c29.39-18.38 49.1-50.78 49.1-88a104 104 0 0 0-208 0c0 37.22 19.71 69.62 49.1 88zM304 448H16a16 16 0 0 0-16 16v32a16 16 0 0 0 16 16h288a16 16 0 0 0 16-16v-32a16 16 0 0 0-16-16z"]},vi={prefix:"fas",iconName:"chess-queen",icon:[512,512,[],"f445","M256 112a56 56 0 1 0-56-56 56 56 0 0 0 56 56zm176 336H80a16 16 0 0 0-16 16v32a16 16 0 0 0 16 16h352a16 16 0 0 0 16-16v-32a16 16 0 0 0-16-16zm72.87-263.84l-28.51-15.92c-7.44-5-16.91-2.46-22.29 4.68a47.59 47.59 0 0 1-47.23 18.23C383.7 186.86 368 164.93 368 141.4a13.4 13.4 0 0 0-13.4-13.4h-38.77c-6 0-11.61 4-12.86 9.91a48 48 0 0 1-93.94 0c-1.25-5.92-6.82-9.91-12.86-9.91H157.4a13.4 13.4 0 0 0-13.4 13.4c0 25.69-19 48.75-44.67 50.49a47.5 47.5 0 0 1-41.54-19.15c-5.28-7.09-14.73-9.45-22.09-4.54l-28.57 16a16 16 0 0 0-5.44 20.47L104.24 416h303.52l102.55-211.37a16 16 0 0 0-5.44-20.47z"]},yi={prefix:"fas",iconName:"chess-rook",icon:[384,512,[],"f447","M368 32h-56a16 16 0 0 0-16 16v48h-48V48a16 16 0 0 0-16-16h-80a16 16 0 0 0-16 16v48H88.1V48a16 16 0 0 0-16-16H16A16 16 0 0 0 0 48v176l64 32c0 48.33-1.54 95-13.21 160h282.42C321.54 351 320 303.72 320 256l64-32V48a16 16 0 0 0-16-16zM224 320h-64v-64a32 32 0 0 1 64 0zm144 128H16a16 16 0 0 0-16 16v32a16 16 0 0 0 16 16h352a16 16 0 0 0 16-16v-32a16 16 0 0 0-16-16z"]},Ci={prefix:"fas",iconName:"chevron-circle-down",icon:[512,512,[],"f13a","M504 256c0 137-111 248-248 248S8 393 8 256 119 8 256 8s248 111 248 248zM273 369.9l135.5-135.5c9.4-9.4 9.4-24.6 0-33.9l-17-17c-9.4-9.4-24.6-9.4-33.9 0L256 285.1 154.4 183.5c-9.4-9.4-24.6-9.4-33.9 0l-17 17c-9.4 9.4-9.4 24.6 0 33.9L239 369.9c9.4 9.4 24.6 9.4 34 0z"]},bi={prefix:"fas",iconName:"chevron-circle-left",icon:[512,512,[],"f137","M256 504C119 504 8 393 8 256S119 8 256 8s248 111 248 248-111 248-248 248zM142.1 273l135.5 135.5c9.4 9.4 24.6 9.4 33.9 0l17-17c9.4-9.4 9.4-24.6 0-33.9L226.9 256l101.6-101.6c9.4-9.4 9.4-24.6 0-33.9l-17-17c-9.4-9.4-24.6-9.4-33.9 0L142.1 239c-9.4 9.4-9.4 24.6 0 34z"]},Si={prefix:"fas",iconName:"chevron-circle-right",icon:[512,512,[],"f138","M256 8c137 0 248 111 248 248S393 504 256 504 8 393 8 256 119 8 256 8zm113.9 231L234.4 103.5c-9.4-9.4-24.6-9.4-33.9 0l-17 17c-9.4 9.4-9.4 24.6 0 33.9L285.1 256 183.5 357.6c-9.4 9.4-9.4 24.6 0 33.9l17 17c9.4 9.4 24.6 9.4 33.9 0L369.9 273c9.4-9.4 9.4-24.6 0-34z"]},wi={prefix:"fas",iconName:"chevron-circle-up",icon:[512,512,[],"f139","M8 256C8 119 119 8 256 8s248 111 248 248-111 248-248 248S8 393 8 256zm231-113.9L103.5 277.6c-9.4 9.4-9.4 24.6 0 33.9l17 17c9.4 9.4 24.6 9.4 33.9 0L256 226.9l101.6 101.6c9.4 9.4 24.6 9.4 33.9 0l17-17c9.4-9.4 9.4-24.6 0-33.9L273 142.1c-9.4-9.4-24.6-9.4-34 0z"]},xi={prefix:"fas",iconName:"chevron-down",icon:[448,512,[],"f078","M207.029 381.476L12.686 187.132c-9.373-9.373-9.373-24.569 0-33.941l22.667-22.667c9.357-9.357 24.522-9.375 33.901-.04L224 284.505l154.745-154.021c9.379-9.335 24.544-9.317 33.901.04l22.667 22.667c9.373 9.373 9.373 24.569 0 33.941L240.971 381.476c-9.373 9.372-24.569 9.372-33.942 0z"]},Ei={prefix:"fas",iconName:"chevron-left",icon:[320,512,[],"f053","M34.52 239.03L228.87 44.69c9.37-9.37 24.57-9.37 33.94 0l22.67 22.67c9.36 9.36 9.37 24.52.04 33.9L131.49 256l154.02 154.75c9.34 9.38 9.32 24.54-.04 33.9l-22.67 22.67c-9.37 9.37-24.57 9.37-33.94 0L34.52 272.97c-9.37-9.37-9.37-24.57 0-33.94z"]},Mi={prefix:"fas",iconName:"chevron-right",icon:[320,512,[],"f054","M285.476 272.971L91.132 467.314c-9.373 9.373-24.569 9.373-33.941 0l-22.667-22.667c-9.357-9.357-9.375-24.522-.04-33.901L188.505 256 34.484 101.255c-9.335-9.379-9.317-24.544.04-33.901l22.667-22.667c9.373-9.373 24.569-9.373 33.941 0L285.475 239.03c9.373 9.372 9.373 24.568.001 33.941z"]},Ai={prefix:"fas",iconName:"chevron-up",icon:[448,512,[],"f077","M240.971 130.524l194.343 194.343c9.373 9.373 9.373 24.569 0 33.941l-22.667 22.667c-9.357 9.357-24.522 9.375-33.901.04L224 227.495 69.255 381.516c-9.379 9.335-24.544 9.317-33.901-.04l-22.667-22.667c-9.373-9.373-9.373-24.569 0-33.941L207.03 130.525c9.372-9.373 24.568-9.373 33.941-.001z"]},Ti={prefix:"fas",iconName:"child",icon:[384,512,[],"f1ae","M120 72c0-39.765 32.235-72 72-72s72 32.235 72 72c0 39.764-32.235 72-72 72s-72-32.236-72-72zm254.627 1.373c-12.496-12.497-32.758-12.497-45.254 0L242.745 160H141.254L54.627 73.373c-12.496-12.497-32.758-12.497-45.254 0-12.497 12.497-12.497 32.758 0 45.255L104 213.254V480c0 17.673 14.327 32 32 32h16c17.673 0 32-14.327 32-32V368h16v112c0 17.673 14.327 32 32 32h16c17.673 0 32-14.327 32-32V213.254l94.627-94.627c12.497-12.497 12.497-32.757 0-45.254z"]},Di={prefix:"fas",iconName:"church",icon:[640,512,[],"f51d","M464.46 246.68L352 179.2V128h48c8.84 0 16-7.16 16-16V80c0-8.84-7.16-16-16-16h-48V16c0-8.84-7.16-16-16-16h-32c-8.84 0-16 7.16-16 16v48h-48c-8.84 0-16 7.16-16 16v32c0 8.84 7.16 16 16 16h48v51.2l-112.46 67.48A31.997 31.997 0 0 0 160 274.12V512h96v-96c0-35.35 28.65-64 64-64s64 28.65 64 64v96h96V274.12c0-11.24-5.9-21.66-15.54-27.44zM0 395.96V496c0 8.84 7.16 16 16 16h112V320L19.39 366.54A32.024 32.024 0 0 0 0 395.96zm620.61-29.42L512 320v192h112c8.84 0 16-7.16 16-16V395.96c0-12.8-7.63-24.37-19.39-29.42z"]},Ii={prefix:"fas",iconName:"circle",icon:[512,512,[],"f111","M256 8C119 8 8 119 8 256s111 248 248 248 248-111 248-248S393 8 256 8z"]},Ri={prefix:"fas",iconName:"circle-notch",icon:[512,512,[],"f1ce","M288 39.056v16.659c0 10.804 7.281 20.159 17.686 23.066C383.204 100.434 440 171.518 440 256c0 101.689-82.295 184-184 184-101.689 0-184-82.295-184-184 0-84.47 56.786-155.564 134.312-177.219C216.719 75.874 224 66.517 224 55.712V39.064c0-15.709-14.834-27.153-30.046-23.234C86.603 43.482 7.394 141.206 8.003 257.332c.72 137.052 111.477 246.956 248.531 246.667C393.255 503.711 504 392.788 504 256c0-115.633-79.14-212.779-186.211-240.236C302.678 11.889 288 23.456 288 39.056z"]},Li={prefix:"fas",iconName:"city",icon:[640,512,[],"f64f","M616 192H480V24c0-13.26-10.74-24-24-24H312c-13.26 0-24 10.74-24 24v72h-64V16c0-8.84-7.16-16-16-16h-16c-8.84 0-16 7.16-16 16v80h-64V16c0-8.84-7.16-16-16-16H80c-8.84 0-16 7.16-16 16v80H24c-13.26 0-24 10.74-24 24v360c0 17.67 14.33 32 32 32h576c17.67 0 32-14.33 32-32V216c0-13.26-10.75-24-24-24zM128 404c0 6.63-5.37 12-12 12H76c-6.63 0-12-5.37-12-12v-40c0-6.63 5.37-12 12-12h40c6.63 0 12 5.37 12 12v40zm0-96c0 6.63-5.37 12-12 12H76c-6.63 0-12-5.37-12-12v-40c0-6.63 5.37-12 12-12h40c6.63 0 12 5.37 12 12v40zm0-96c0 6.63-5.37 12-12 12H76c-6.63 0-12-5.37-12-12v-40c0-6.63 5.37-12 12-12h40c6.63 0 12 5.37 12 12v40zm128 192c0 6.63-5.37 12-12 12h-40c-6.63 0-12-5.37-12-12v-40c0-6.63 5.37-12 12-12h40c6.63 0 12 5.37 12 12v40zm0-96c0 6.63-5.37 12-12 12h-40c-6.63 0-12-5.37-12-12v-40c0-6.63 5.37-12 12-12h40c6.63 0 12 5.37 12 12v40zm0-96c0 6.63-5.37 12-12 12h-40c-6.63 0-12-5.37-12-12v-40c0-6.63 5.37-12 12-12h40c6.63 0 12 5.37 12 12v40zm160 96c0 6.63-5.37 12-12 12h-40c-6.63 0-12-5.37-12-12v-40c0-6.63 5.37-12 12-12h40c6.63 0 12 5.37 12 12v40zm0-96c0 6.63-5.37 12-12 12h-40c-6.63 0-12-5.37-12-12v-40c0-6.63 5.37-12 12-12h40c6.63 0 12 5.37 12 12v40zm0-96c0 6.63-5.37 12-12 12h-40c-6.63 0-12-5.37-12-12V76c0-6.63 5.37-12 12-12h40c6.63 0 12 5.37 12 12v40zm160 288c0 6.63-5.37 12-12 12h-40c-6.63 0-12-5.37-12-12v-40c0-6.63 5.37-12 12-12h40c6.63 0 12 5.37 12 12v40zm0-96c0 6.63-5.37 12-12 12h-40c-6.63 0-12-5.37-12-12v-40c0-6.63 5.37-12 12-12h40c6.63 0 12 5.37 12 12v40z"]},ki={prefix:"fas",iconName:"clinic-medical",icon:[576,512,[],"f7f2","M288 115L69.47 307.71c-1.62 1.46-3.69 2.14-5.47 3.35V496a16 16 0 0 0 16 16h416a16 16 0 0 0 16-16V311.1c-1.7-1.16-3.72-1.82-5.26-3.2zm96 261a8 8 0 0 1-8 8h-56v56a8 8 0 0 1-8 8h-48a8 8 0 0 1-8-8v-56h-56a8 8 0 0 1-8-8v-48a8 8 0 0 1 8-8h56v-56a8 8 0 0 1 8-8h48a8 8 0 0 1 8 8v56h56a8 8 0 0 1 8 8zm186.69-139.72l-255.94-226a39.85 39.85 0 0 0-53.45 0l-256 226a16 16 0 0 0-1.21 22.6L25.5 282.7a16 16 0 0 0 22.6 1.21L277.42 81.63a16 16 0 0 1 21.17 0L527.91 283.9a16 16 0 0 0 22.6-1.21l21.4-23.82a16 16 0 0 0-1.22-22.59z"]},Pi={prefix:"fas",iconName:"clipboard",icon:[384,512,[],"f328","M384 112v352c0 26.51-21.49 48-48 48H48c-26.51 0-48-21.49-48-48V112c0-26.51 21.49-48 48-48h80c0-35.29 28.71-64 64-64s64 28.71 64 64h80c26.51 0 48 21.49 48 48zM192 40c-13.255 0-24 10.745-24 24s10.745 24 24 24 24-10.745 24-24-10.745-24-24-24m96 114v-20a6 6 0 0 0-6-6H102a6 6 0 0 0-6 6v20a6 6 0 0 0 6 6h180a6 6 0 0 0 6-6z"]},Ni={prefix:"fas",iconName:"clipboard-check",icon:[384,512,[],"f46c","M336 64h-80c0-35.3-28.7-64-64-64s-64 28.7-64 64H48C21.5 64 0 85.5 0 112v352c0 26.5 21.5 48 48 48h288c26.5 0 48-21.5 48-48V112c0-26.5-21.5-48-48-48zM192 40c13.3 0 24 10.7 24 24s-10.7 24-24 24-24-10.7-24-24 10.7-24 24-24zm121.2 231.8l-143 141.8c-4.7 4.7-12.3 4.6-17-.1l-82.6-83.3c-4.7-4.7-4.6-12.3.1-17L99.1 285c4.7-4.7 12.3-4.6 17 .1l46 46.4 106-105.2c4.7-4.7 12.3-4.6 17 .1l28.2 28.4c4.7 4.8 4.6 12.3-.1 17z"]},Oi={prefix:"fas",iconName:"clipboard-list",icon:[384,512,[],"f46d","M336 64h-80c0-35.3-28.7-64-64-64s-64 28.7-64 64H48C21.5 64 0 85.5 0 112v352c0 26.5 21.5 48 48 48h288c26.5 0 48-21.5 48-48V112c0-26.5-21.5-48-48-48zM96 424c-13.3 0-24-10.7-24-24s10.7-24 24-24 24 10.7 24 24-10.7 24-24 24zm0-96c-13.3 0-24-10.7-24-24s10.7-24 24-24 24 10.7 24 24-10.7 24-24 24zm0-96c-13.3 0-24-10.7-24-24s10.7-24 24-24 24 10.7 24 24-10.7 24-24 24zm96-192c13.3 0 24 10.7 24 24s-10.7 24-24 24-24-10.7-24-24 10.7-24 24-24zm128 368c0 4.4-3.6 8-8 8H168c-4.4 0-8-3.6-8-8v-16c0-4.4 3.6-8 8-8h144c4.4 0 8 3.6 8 8v16zm0-96c0 4.4-3.6 8-8 8H168c-4.4 0-8-3.6-8-8v-16c0-4.4 3.6-8 8-8h144c4.4 0 8 3.6 8 8v16zm0-96c0 4.4-3.6 8-8 8H168c-4.4 0-8-3.6-8-8v-16c0-4.4 3.6-8 8-8h144c4.4 0 8 3.6 8 8v16z"]},_i={prefix:"fas",iconName:"clock",icon:[512,512,[],"f017","M256,8C119,8,8,119,8,256S119,504,256,504,504,393,504,256,393,8,256,8Zm92.49,313h0l-20,25a16,16,0,0,1-22.49,2.5h0l-67-49.72a40,40,0,0,1-15-31.23V112a16,16,0,0,1,16-16h32a16,16,0,0,1,16,16V256l58,42.5A16,16,0,0,1,348.49,321Z"]},Fi={prefix:"fas",iconName:"clone",icon:[512,512,[],"f24d","M464 0c26.51 0 48 21.49 48 48v288c0 26.51-21.49 48-48 48H176c-26.51 0-48-21.49-48-48V48c0-26.51 21.49-48 48-48h288M176 416c-44.112 0-80-35.888-80-80V128H48c-26.51 0-48 21.49-48 48v288c0 26.51 21.49 48 48 48h288c26.51 0 48-21.49 48-48v-48H176z"]},Gi={prefix:"fas",iconName:"closed-captioning",icon:[512,512,[],"f20a","M464 64H48C21.5 64 0 85.5 0 112v288c0 26.5 21.5 48 48 48h416c26.5 0 48-21.5 48-48V112c0-26.5-21.5-48-48-48zM218.1 287.7c2.8-2.5 7.1-2.1 9.2.9l19.5 27.7c1.7 2.4 1.5 5.6-.5 7.7-53.6 56.8-172.8 32.1-172.8-67.9 0-97.3 121.7-119.5 172.5-70.1 2.1 2 2.5 3.2 1 5.7l-17.5 30.5c-1.9 3.1-6.2 4-9.1 1.7-40.8-32-94.6-14.9-94.6 31.2.1 48 51.1 70.5 92.3 32.6zm190.4 0c2.8-2.5 7.1-2.1 9.2.9l19.5 27.7c1.7 2.4 1.5 5.6-.5 7.7-53.5 56.9-172.7 32.1-172.7-67.9 0-97.3 121.7-119.5 172.5-70.1 2.1 2 2.5 3.2 1 5.7L420 222.2c-1.9 3.1-6.2 4-9.1 1.7-40.8-32-94.6-14.9-94.6 31.2 0 48 51 70.5 92.2 32.6z"]},Vi={prefix:"fas",iconName:"cloud",icon:[640,512,[],"f0c2","M537.6 226.6c4.1-10.7 6.4-22.4 6.4-34.6 0-53-43-96-96-96-19.7 0-38.1 6-53.3 16.2C367 64.2 315.3 32 256 32c-88.4 0-160 71.6-160 160 0 2.7.1 5.4.2 8.1C40.2 219.8 0 273.2 0 336c0 79.5 64.5 144 144 144h368c70.7 0 128-57.3 128-128 0-61.9-44-113.6-102.4-125.4z"]},Bi={prefix:"fas",iconName:"cloud-download-alt",icon:[640,512,[],"f381","M537.6 226.6c4.1-10.7 6.4-22.4 6.4-34.6 0-53-43-96-96-96-19.7 0-38.1 6-53.3 16.2C367 64.2 315.3 32 256 32c-88.4 0-160 71.6-160 160 0 2.7.1 5.4.2 8.1C40.2 219.8 0 273.2 0 336c0 79.5 64.5 144 144 144h368c70.7 0 128-57.3 128-128 0-61.9-44-113.6-102.4-125.4zm-132.9 88.7L299.3 420.7c-6.2 6.2-16.4 6.2-22.6 0L171.3 315.3c-10.1-10.1-2.9-27.3 11.3-27.3H248V176c0-8.8 7.2-16 16-16h48c8.8 0 16 7.2 16 16v112h65.4c14.2 0 21.4 17.2 11.3 27.3z"]},Hi={prefix:"fas",iconName:"cloud-meatball",icon:[512,512,[],"f73b","M48 352c-26.5 0-48 21.5-48 48s21.5 48 48 48 48-21.5 48-48-21.5-48-48-48zm416 0c-26.5 0-48 21.5-48 48s21.5 48 48 48 48-21.5 48-48-21.5-48-48-48zm-119 11.1c4.6-14.5 1.6-30.8-9.8-42.3-11.5-11.5-27.8-14.4-42.3-9.9-7-13.5-20.7-23-36.9-23s-29.9 9.5-36.9 23c-14.5-4.6-30.8-1.6-42.3 9.9-11.5 11.5-14.4 27.8-9.9 42.3-13.5 7-23 20.7-23 36.9s9.5 29.9 23 36.9c-4.6 14.5-1.6 30.8 9.9 42.3 8.2 8.2 18.9 12.3 29.7 12.3 4.3 0 8.5-1.1 12.6-2.5 7 13.5 20.7 23 36.9 23s29.9-9.5 36.9-23c4.1 1.3 8.3 2.5 12.6 2.5 10.8 0 21.5-4.1 29.7-12.3 11.5-11.5 14.4-27.8 9.8-42.3 13.5-7 23-20.7 23-36.9s-9.5-29.9-23-36.9zM512 224c0-53-43-96-96-96-.6 0-1.1.2-1.6.2 1.1-5.2 1.6-10.6 1.6-16.2 0-44.2-35.8-80-80-80-24.6 0-46.3 11.3-61 28.8C256.4 24.8 219.3 0 176 0 114.1 0 64 50.1 64 112c0 7.3.8 14.3 2.1 21.2C27.8 145.8 0 181.5 0 224c0 53 43 96 96 96h43.4c3.6-8 8.4-15.4 14.8-21.8 13.5-13.5 31.5-21.1 50.8-21.3 13.5-13.2 31.7-20.9 51-20.9s37.5 7.7 51 20.9c19.3.2 37.3 7.8 50.8 21.3 6.4 6.4 11.3 13.8 14.8 21.8H416c53 0 96-43 96-96z"]},zi={prefix:"fas",iconName:"cloud-moon",icon:[576,512,[],"f6c3","M342.8 352.7c5.7-9.6 9.2-20.7 9.2-32.7 0-35.3-28.7-64-64-64-17.2 0-32.8 6.9-44.3 17.9-16.3-29.6-47.5-49.9-83.7-49.9-53 0-96 43-96 96 0 2 .5 3.8.6 5.7C27.1 338.8 0 374.1 0 416c0 53 43 96 96 96h240c44.2 0 80-35.8 80-80 0-41.9-32.3-75.8-73.2-79.3zm222.5-54.3c-93.1 17.7-178.5-53.7-178.5-147.7 0-54.2 29-104 76.1-130.8 7.3-4.1 5.4-15.1-2.8-16.7C448.4 1.1 436.7 0 425 0 319.1 0 233.1 85.9 233.1 192c0 8.5.7 16.8 1.8 25 5.9 4.3 11.6 8.9 16.7 14.2 11.4-4.7 23.7-7.2 36.4-7.2 52.9 0 96 43.1 96 96 0 3.6-.2 7.2-.6 10.7 23.6 10.8 42.4 29.5 53.5 52.6 54.4-3.4 103.7-29.3 137.1-70.4 5.3-6.5-.5-16.1-8.7-14.5z"]},Ui={prefix:"fas",iconName:"cloud-moon-rain",icon:[576,512,[],"f73c","M350.5 225.5c-6.9-37.2-39.3-65.5-78.5-65.5-12.3 0-23.9 3-34.3 8-17.4-24.1-45.6-40-77.7-40-53 0-96 43-96 96 0 .5.2 1.1.2 1.6C27.6 232.9 0 265.2 0 304c0 44.2 35.8 80 80 80h256c44.2 0 80-35.8 80-80 0-39.2-28.2-71.7-65.5-78.5zm217.4-1.7c-70.4 13.3-135-40.3-135-110.8 0-40.6 21.9-78 57.5-98.1 5.5-3.1 4.1-11.4-2.1-12.5C479.6.8 470.7 0 461.8 0c-77.9 0-141.1 61.2-144.4 137.9 26.7 11.9 48.2 33.8 58.9 61.7 37.1 14.3 64 47.4 70.2 86.8 5.1.5 10 1.5 15.2 1.5 44.7 0 85.6-20.2 112.6-53.3 4.2-4.8-.2-12-6.4-10.8zM364.5 418.1c-7.6-4.3-17.4-1.8-21.8 6l-36.6 64c-4.4 7.7-1.7 17.4 6 21.8 2.5 1.4 5.2 2.1 7.9 2.1 5.5 0 10.9-2.9 13.9-8.1l36.6-64c4.3-7.7 1.7-17.4-6-21.8zm-96 0c-7.6-4.3-17.4-1.8-21.8 6l-36.6 64c-4.4 7.7-1.7 17.4 6 21.8 2.5 1.4 5.2 2.1 7.9 2.1 5.5 0 10.9-2.9 13.9-8.1l36.6-64c4.3-7.7 1.7-17.4-6-21.8zm-96 0c-7.6-4.3-17.4-1.8-21.8 6l-36.6 64c-4.4 7.7-1.7 17.4 6 21.8 2.5 1.4 5.2 2.1 7.9 2.1 5.5 0 10.9-2.9 13.9-8.1l36.6-64c4.3-7.7 1.7-17.4-6-21.8zm-96 0c-7.6-4.3-17.4-1.8-21.8 6l-36.6 64c-4.4 7.7-1.7 17.4 6 21.8 2.5 1.4 5.2 2.1 7.9 2.1 5.5 0 10.9-2.9 13.9-8.1l36.6-64c4.3-7.7 1.7-17.4-6-21.8z"]},Wi={prefix:"fas",iconName:"cloud-rain",icon:[512,512,[],"f73d","M416 128c-.6 0-1.1.2-1.6.2 1.1-5.2 1.6-10.6 1.6-16.2 0-44.2-35.8-80-80-80-24.6 0-46.3 11.3-61 28.8C256.4 24.8 219.3 0 176 0 114.1 0 64 50.1 64 112c0 7.3.8 14.3 2.1 21.2C27.8 145.8 0 181.5 0 224c0 53 43 96 96 96h320c53 0 96-43 96-96s-43-96-96-96zM88 374.2c-12.8 44.4-40 56.4-40 87.7 0 27.7 21.5 50.1 48 50.1s48-22.4 48-50.1c0-31.4-27.2-43.1-40-87.7-2.2-8.1-13.5-8.5-16 0zm160 0c-12.8 44.4-40 56.4-40 87.7 0 27.7 21.5 50.1 48 50.1s48-22.4 48-50.1c0-31.4-27.2-43.1-40-87.7-2.2-8.1-13.5-8.5-16 0zm160 0c-12.8 44.4-40 56.4-40 87.7 0 27.7 21.5 50.1 48 50.1s48-22.4 48-50.1c0-31.4-27.2-43.1-40-87.7-2.2-8.1-13.5-8.5-16 0z"]},ji={prefix:"fas",iconName:"cloud-showers-heavy",icon:[512,512,[],"f740","M183.9 370.1c-7.6-4.4-17.4-1.8-21.8 6l-64 112c-4.4 7.7-1.7 17.5 6 21.8 2.5 1.4 5.2 2.1 7.9 2.1 5.5 0 10.9-2.9 13.9-8.1l64-112c4.4-7.6 1.7-17.4-6-21.8zm96 0c-7.6-4.4-17.4-1.8-21.8 6l-64 112c-4.4 7.7-1.7 17.5 6 21.8 2.5 1.4 5.2 2.1 7.9 2.1 5.5 0 10.9-2.9 13.9-8.1l64-112c4.4-7.6 1.7-17.4-6-21.8zm-192 0c-7.6-4.4-17.4-1.8-21.8 6l-64 112c-4.4 7.7-1.7 17.5 6 21.8 2.5 1.4 5.2 2.1 7.9 2.1 5.5 0 10.9-2.9 13.9-8.1l64-112c4.4-7.6 1.7-17.4-6-21.8zm384 0c-7.6-4.4-17.4-1.8-21.8 6l-64 112c-4.4 7.7-1.7 17.5 6 21.8 2.5 1.4 5.2 2.1 7.9 2.1 5.5 0 10.9-2.9 13.9-8.1l64-112c4.4-7.6 1.7-17.4-6-21.8zm-96 0c-7.6-4.4-17.4-1.8-21.8 6l-64 112c-4.4 7.7-1.7 17.5 6 21.8 2.5 1.4 5.2 2.1 7.9 2.1 5.5 0 10.9-2.9 13.9-8.1l64-112c4.4-7.6 1.7-17.4-6-21.8zM416 128c-.6 0-1.1.2-1.6.2 1.1-5.2 1.6-10.6 1.6-16.2 0-44.2-35.8-80-80-80-24.6 0-46.3 11.3-61 28.8C256.4 24.8 219.3 0 176 0 114.2 0 64 50.1 64 112c0 7.3.8 14.3 2.1 21.2C27.8 145.8 0 181.5 0 224c0 53 43 96 96 96h320c53 0 96-43 96-96s-43-96-96-96z"]},Ki={prefix:"fas",iconName:"cloud-sun",icon:[640,512,[],"f6c4","M575.2 325.7c.2-1.9.8-3.7.8-5.6 0-35.3-28.7-64-64-64-12.6 0-24.2 3.8-34.1 10-17.6-38.8-56.5-66-101.9-66-61.8 0-112 50.1-112 112 0 3 .7 5.8.9 8.7-49.6 3.7-88.9 44.7-88.9 95.3 0 53 43 96 96 96h272c53 0 96-43 96-96 0-42.1-27.2-77.4-64.8-90.4zm-430.4-22.6c-43.7-43.7-43.7-114.7 0-158.3 43.7-43.7 114.7-43.7 158.4 0 9.7 9.7 16.9 20.9 22.3 32.7 9.8-3.7 20.1-6 30.7-7.5L386 81.1c4-11.9-7.3-23.1-19.2-19.2L279 91.2 237.5 8.4C232-2.8 216-2.8 210.4 8.4L169 91.2 81.1 61.9C69.3 58 58 69.3 61.9 81.1l29.3 87.8-82.8 41.5c-11.2 5.6-11.2 21.5 0 27.1l82.8 41.4-29.3 87.8c-4 11.9 7.3 23.1 19.2 19.2l76.1-25.3c6.1-12.4 14-23.7 23.6-33.5-13.1-5.4-25.4-13.4-36-24zm-4.8-79.2c0 40.8 29.3 74.8 67.9 82.3 8-4.7 16.3-8.8 25.2-11.7 5.4-44.3 31-82.5 67.4-105C287.3 160.4 258 140 224 140c-46.3 0-84 37.6-84 83.9z"]},$i={prefix:"fas",iconName:"cloud-sun-rain",icon:[576,512,[],"f743","M510.5 225.5c-6.9-37.2-39.3-65.5-78.5-65.5-12.3 0-23.9 3-34.3 8-17.4-24.1-45.6-40-77.7-40-53 0-96 43-96 96 0 .5.2 1.1.2 1.6C187.6 233 160 265.2 160 304c0 44.2 35.8 80 80 80h256c44.2 0 80-35.8 80-80 0-39.2-28.2-71.7-65.5-78.5zm-386.4 34.4c-37.4-37.4-37.4-98.3 0-135.8 34.6-34.6 89.1-36.8 126.7-7.4 20-12.9 43.6-20.7 69.2-20.7.7 0 1.3.2 2 .2l8.9-26.7c3.4-10.2-6.3-19.8-16.5-16.4l-75.3 25.1-35.5-71c-4.8-9.6-18.5-9.6-23.3 0l-35.5 71-75.3-25.1c-10.2-3.4-19.8 6.3-16.4 16.5l25.1 75.3-71 35.5c-9.6 4.8-9.6 18.5 0 23.3l71 35.5-25.1 75.3c-3.4 10.2 6.3 19.8 16.5 16.5l59.2-19.7c-.2-2.4-.7-4.7-.7-7.2 0-12.5 2.3-24.5 6.2-35.9-3.6-2.7-7.1-5.2-10.2-8.3zm69.8-58c4.3-24.5 15.8-46.4 31.9-64-9.8-6.2-21.4-9.9-33.8-9.9-35.3 0-64 28.7-64 64 0 18.7 8.2 35.4 21.1 47.1 11.3-15.9 26.6-28.9 44.8-37.2zm330.6 216.2c-7.6-4.3-17.4-1.8-21.8 6l-36.6 64c-4.4 7.7-1.7 17.4 6 21.8 2.5 1.4 5.2 2.1 7.9 2.1 5.5 0 10.9-2.9 13.9-8.1l36.6-64c4.3-7.7 1.7-17.4-6-21.8zm-96 0c-7.6-4.3-17.4-1.8-21.8 6l-36.6 64c-4.4 7.7-1.7 17.4 6 21.8 2.5 1.4 5.2 2.1 7.9 2.1 5.5 0 10.9-2.9 13.9-8.1l36.6-64c4.3-7.7 1.7-17.4-6-21.8zm-96 0c-7.6-4.3-17.4-1.8-21.8 6l-36.6 64c-4.4 7.7-1.7 17.4 6 21.8 2.5 1.4 5.2 2.1 7.9 2.1 5.5 0 10.9-2.9 13.9-8.1l36.6-64c4.3-7.7 1.7-17.4-6-21.8zm-96 0c-7.6-4.3-17.4-1.8-21.8 6l-36.6 64c-4.4 7.7-1.7 17.4 6 21.8 2.5 1.4 5.2 2.1 7.9 2.1 5.5 0 10.9-2.9 13.9-8.1l36.6-64c4.3-7.7 1.7-17.4-6-21.8z"]},Yi={prefix:"fas",iconName:"cloud-upload-alt",icon:[640,512,[],"f382","M537.6 226.6c4.1-10.7 6.4-22.4 6.4-34.6 0-53-43-96-96-96-19.7 0-38.1 6-53.3 16.2C367 64.2 315.3 32 256 32c-88.4 0-160 71.6-160 160 0 2.7.1 5.4.2 8.1C40.2 219.8 0 273.2 0 336c0 79.5 64.5 144 144 144h368c70.7 0 128-57.3 128-128 0-61.9-44-113.6-102.4-125.4zM393.4 288H328v112c0 8.8-7.2 16-16 16h-48c-8.8 0-16-7.2-16-16V288h-65.4c-14.3 0-21.4-17.2-11.3-27.3l105.4-105.4c6.2-6.2 16.4-6.2 22.6 0l105.4 105.4c10.1 10.1 2.9 27.3-11.3 27.3z"]},qi={prefix:"fas",iconName:"cocktail",icon:[576,512,[],"f561","M296 464h-56V338.78l168.74-168.73c15.52-15.52 4.53-42.05-17.42-42.05H24.68c-21.95 0-32.94 26.53-17.42 42.05L176 338.78V464h-56c-22.09 0-40 17.91-40 40 0 4.42 3.58 8 8 8h240c4.42 0 8-3.58 8-8 0-22.09-17.91-40-40-40zM432 0c-62.61 0-115.35 40.2-135.18 96h52.54c16.65-28.55 47.27-48 82.64-48 52.93 0 96 43.06 96 96s-43.07 96-96 96c-14.04 0-27.29-3.2-39.32-8.64l-35.26 35.26C379.23 279.92 404.59 288 432 288c79.53 0 144-64.47 144-144S511.53 0 432 0z"]},Xi={prefix:"fas",iconName:"code",icon:[640,512,[],"f121","M278.9 511.5l-61-17.7c-6.4-1.8-10-8.5-8.2-14.9L346.2 8.7c1.8-6.4 8.5-10 14.9-8.2l61 17.7c6.4 1.8 10 8.5 8.2 14.9L293.8 503.3c-1.9 6.4-8.5 10.1-14.9 8.2zm-114-112.2l43.5-46.4c4.6-4.9 4.3-12.7-.8-17.2L117 256l90.6-79.7c5.1-4.5 5.5-12.3.8-17.2l-43.5-46.4c-4.5-4.8-12.1-5.1-17-.5L3.8 247.2c-5.1 4.7-5.1 12.8 0 17.5l144.1 135.1c4.9 4.6 12.5 4.4 17-.5zm327.2.6l144.1-135.1c5.1-4.7 5.1-12.8 0-17.5L492.1 112.1c-4.8-4.5-12.4-4.3-17 .5L431.6 159c-4.6 4.9-4.3 12.7.8 17.2L523 256l-90.6 79.7c-5.1 4.5-5.5 12.3-.8 17.2l43.5 46.4c4.5 4.9 12.1 5.1 17 .6z"]},Zi={prefix:"fas",iconName:"code-branch",icon:[384,512,[],"f126","M384 144c0-44.2-35.8-80-80-80s-80 35.8-80 80c0 36.4 24.3 67.1 57.5 76.8-.6 16.1-4.2 28.5-11 36.9-15.4 19.2-49.3 22.4-85.2 25.7-28.2 2.6-57.4 5.4-81.3 16.9v-144c32.5-10.2 56-40.5 56-76.3 0-44.2-35.8-80-80-80S0 35.8 0 80c0 35.8 23.5 66.1 56 76.3v199.3C23.5 365.9 0 396.2 0 432c0 44.2 35.8 80 80 80s80-35.8 80-80c0-34-21.2-63.1-51.2-74.6 3.1-5.2 7.8-9.8 14.9-13.4 16.2-8.2 40.4-10.4 66.1-12.8 42.2-3.9 90-8.4 118.2-43.4 14-17.4 21.1-39.8 21.6-67.9 31.6-10.8 54.4-40.7 54.4-75.9zM80 64c8.8 0 16 7.2 16 16s-7.2 16-16 16-16-7.2-16-16 7.2-16 16-16zm0 384c-8.8 0-16-7.2-16-16s7.2-16 16-16 16 7.2 16 16-7.2 16-16 16zm224-320c8.8 0 16 7.2 16 16s-7.2 16-16 16-16-7.2-16-16 7.2-16 16-16z"]},Qi={prefix:"fas",iconName:"coffee",icon:[640,512,[],"f0f4","M192 384h192c53 0 96-43 96-96h32c70.6 0 128-57.4 128-128S582.6 32 512 32H120c-13.3 0-24 10.7-24 24v232c0 53 43 96 96 96zM512 96c35.3 0 64 28.7 64 64s-28.7 64-64 64h-32V96h32zm47.7 384H48.3c-47.6 0-61-64-36-64h583.3c25 0 11.8 64-35.9 64z"]},Ji={prefix:"fas",iconName:"cog",icon:[512,512,[],"f013","M487.4 315.7l-42.6-24.6c4.3-23.2 4.3-47 0-70.2l42.6-24.6c4.9-2.8 7.1-8.6 5.5-14-11.1-35.6-30-67.8-54.7-94.6-3.8-4.1-10-5.1-14.8-2.3L380.8 110c-17.9-15.4-38.5-27.3-60.8-35.1V25.8c0-5.6-3.9-10.5-9.4-11.7-36.7-8.2-74.3-7.8-109.2 0-5.5 1.2-9.4 6.1-9.4 11.7V75c-22.2 7.9-42.8 19.8-60.8 35.1L88.7 85.5c-4.9-2.8-11-1.9-14.8 2.3-24.7 26.7-43.6 58.9-54.7 94.6-1.7 5.4.6 11.2 5.5 14L67.3 221c-4.3 23.2-4.3 47 0 70.2l-42.6 24.6c-4.9 2.8-7.1 8.6-5.5 14 11.1 35.6 30 67.8 54.7 94.6 3.8 4.1 10 5.1 14.8 2.3l42.6-24.6c17.9 15.4 38.5 27.3 60.8 35.1v49.2c0 5.6 3.9 10.5 9.4 11.7 36.7 8.2 74.3 7.8 109.2 0 5.5-1.2 9.4-6.1 9.4-11.7v-49.2c22.2-7.9 42.8-19.8 60.8-35.1l42.6 24.6c4.9 2.8 11 1.9 14.8-2.3 24.7-26.7 43.6-58.9 54.7-94.6 1.5-5.5-.7-11.3-5.6-14.1zM256 336c-44.1 0-80-35.9-80-80s35.9-80 80-80 80 35.9 80 80-35.9 80-80 80z"]},en={prefix:"fas",iconName:"cogs",icon:[640,512,[],"f085","M512.1 191l-8.2 14.3c-3 5.3-9.4 7.5-15.1 5.4-11.8-4.4-22.6-10.7-32.1-18.6-4.6-3.8-5.8-10.5-2.8-15.7l8.2-14.3c-6.9-8-12.3-17.3-15.9-27.4h-16.5c-6 0-11.2-4.3-12.2-10.3-2-12-2.1-24.6 0-37.1 1-6 6.2-10.4 12.2-10.4h16.5c3.6-10.1 9-19.4 15.9-27.4l-8.2-14.3c-3-5.2-1.9-11.9 2.8-15.7 9.5-7.9 20.4-14.2 32.1-18.6 5.7-2.1 12.1.1 15.1 5.4l8.2 14.3c10.5-1.9 21.2-1.9 31.7 0L552 6.3c3-5.3 9.4-7.5 15.1-5.4 11.8 4.4 22.6 10.7 32.1 18.6 4.6 3.8 5.8 10.5 2.8 15.7l-8.2 14.3c6.9 8 12.3 17.3 15.9 27.4h16.5c6 0 11.2 4.3 12.2 10.3 2 12 2.1 24.6 0 37.1-1 6-6.2 10.4-12.2 10.4h-16.5c-3.6 10.1-9 19.4-15.9 27.4l8.2 14.3c3 5.2 1.9 11.9-2.8 15.7-9.5 7.9-20.4 14.2-32.1 18.6-5.7 2.1-12.1-.1-15.1-5.4l-8.2-14.3c-10.4 1.9-21.2 1.9-31.7 0zm-10.5-58.8c38.5 29.6 82.4-14.3 52.8-52.8-38.5-29.7-82.4 14.3-52.8 52.8zM386.3 286.1l33.7 16.8c10.1 5.8 14.5 18.1 10.5 29.1-8.9 24.2-26.4 46.4-42.6 65.8-7.4 8.9-20.2 11.1-30.3 5.3l-29.1-16.8c-16 13.7-34.6 24.6-54.9 31.7v33.6c0 11.6-8.3 21.6-19.7 23.6-24.6 4.2-50.4 4.4-75.9 0-11.5-2-20-11.9-20-23.6V418c-20.3-7.2-38.9-18-54.9-31.7L74 403c-10 5.8-22.9 3.6-30.3-5.3-16.2-19.4-33.3-41.6-42.2-65.7-4-10.9.4-23.2 10.5-29.1l33.3-16.8c-3.9-20.9-3.9-42.4 0-63.4L12 205.8c-10.1-5.8-14.6-18.1-10.5-29 8.9-24.2 26-46.4 42.2-65.8 7.4-8.9 20.2-11.1 30.3-5.3l29.1 16.8c16-13.7 34.6-24.6 54.9-31.7V57.1c0-11.5 8.2-21.5 19.6-23.5 24.6-4.2 50.5-4.4 76-.1 11.5 2 20 11.9 20 23.6v33.6c20.3 7.2 38.9 18 54.9 31.7l29.1-16.8c10-5.8 22.9-3.6 30.3 5.3 16.2 19.4 33.2 41.6 42.1 65.8 4 10.9.1 23.2-10 29.1l-33.7 16.8c3.9 21 3.9 42.5 0 63.5zm-117.6 21.1c59.2-77-28.7-164.9-105.7-105.7-59.2 77 28.7 164.9 105.7 105.7zm243.4 182.7l-8.2 14.3c-3 5.3-9.4 7.5-15.1 5.4-11.8-4.4-22.6-10.7-32.1-18.6-4.6-3.8-5.8-10.5-2.8-15.7l8.2-14.3c-6.9-8-12.3-17.3-15.9-27.4h-16.5c-6 0-11.2-4.3-12.2-10.3-2-12-2.1-24.6 0-37.1 1-6 6.2-10.4 12.2-10.4h16.5c3.6-10.1 9-19.4 15.9-27.4l-8.2-14.3c-3-5.2-1.9-11.9 2.8-15.7 9.5-7.9 20.4-14.2 32.1-18.6 5.7-2.1 12.1.1 15.1 5.4l8.2 14.3c10.5-1.9 21.2-1.9 31.7 0l8.2-14.3c3-5.3 9.4-7.5 15.1-5.4 11.8 4.4 22.6 10.7 32.1 18.6 4.6 3.8 5.8 10.5 2.8 15.7l-8.2 14.3c6.9 8 12.3 17.3 15.9 27.4h16.5c6 0 11.2 4.3 12.2 10.3 2 12 2.1 24.6 0 37.1-1 6-6.2 10.4-12.2 10.4h-16.5c-3.6 10.1-9 19.4-15.9 27.4l8.2 14.3c3 5.2 1.9 11.9-2.8 15.7-9.5 7.9-20.4 14.2-32.1 18.6-5.7 2.1-12.1-.1-15.1-5.4l-8.2-14.3c-10.4 1.9-21.2 1.9-31.7 0zM501.6 431c38.5 29.6 82.4-14.3 52.8-52.8-38.5-29.6-82.4 14.3-52.8 52.8z"]},tn={prefix:"fas",iconName:"coins",icon:[512,512,[],"f51e","M0 405.3V448c0 35.3 86 64 192 64s192-28.7 192-64v-42.7C342.7 434.4 267.2 448 192 448S41.3 434.4 0 405.3zM320 128c106 0 192-28.7 192-64S426 0 320 0 128 28.7 128 64s86 64 192 64zM0 300.4V352c0 35.3 86 64 192 64s192-28.7 192-64v-51.6c-41.3 34-116.9 51.6-192 51.6S41.3 334.4 0 300.4zm416 11c57.3-11.1 96-31.7 96-55.4v-42.7c-23.2 16.4-57.3 27.6-96 34.5v63.6zM192 160C86 160 0 195.8 0 240s86 80 192 80 192-35.8 192-80-86-80-192-80zm219.3 56.3c60-10.8 100.7-32 100.7-56.3v-42.7c-35.5 25.1-96.5 38.6-160.7 41.8 29.5 14.3 51.2 33.5 60 57.2z"]},nn={prefix:"fas",iconName:"columns",icon:[512,512,[],"f0db","M464 32H48C21.49 32 0 53.49 0 80v352c0 26.51 21.49 48 48 48h416c26.51 0 48-21.49 48-48V80c0-26.51-21.49-48-48-48zM224 416H64V160h160v256zm224 0H288V160h160v256z"]},sn={prefix:"fas",iconName:"comment",icon:[512,512,[],"f075","M256 32C114.6 32 0 125.1 0 240c0 49.6 21.4 95 57 130.7C44.5 421.1 2.7 466 2.2 466.5c-2.2 2.3-2.8 5.7-1.5 8.7S4.8 480 8 480c66.3 0 116-31.8 140.6-51.4 32.7 12.3 69 19.4 107.4 19.4 141.4 0 256-93.1 256-208S397.4 32 256 32z"]},rn={prefix:"fas",iconName:"comment-alt",icon:[512,512,[],"f27a","M448 0H64C28.7 0 0 28.7 0 64v288c0 35.3 28.7 64 64 64h96v84c0 9.8 11.2 15.5 19.1 9.7L304 416h144c35.3 0 64-28.7 64-64V64c0-35.3-28.7-64-64-64z"]},on={prefix:"fas",iconName:"comment-dollar",icon:[512,512,[],"f651","M256 32C114.62 32 0 125.12 0 240c0 49.56 21.41 95.01 57.02 130.74C44.46 421.05 2.7 465.97 2.2 466.5A7.995 7.995 0 0 0 8 480c66.26 0 115.99-31.75 140.6-51.38C181.29 440.93 217.59 448 256 448c141.38 0 256-93.12 256-208S397.38 32 256 32zm24 302.44V352c0 8.84-7.16 16-16 16h-16c-8.84 0-16-7.16-16-16v-17.73c-11.42-1.35-22.28-5.19-31.78-11.46-6.22-4.11-6.82-13.11-1.55-18.38l17.52-17.52c3.74-3.74 9.31-4.24 14.11-2.03 3.18 1.46 6.66 2.22 10.26 2.22h32.78c4.66 0 8.44-3.78 8.44-8.42 0-3.75-2.52-7.08-6.12-8.11l-50.07-14.3c-22.25-6.35-40.01-24.71-42.91-47.67-4.05-32.07 19.03-59.43 49.32-63.05V128c0-8.84 7.16-16 16-16h16c8.84 0 16 7.16 16 16v17.73c11.42 1.35 22.28 5.19 31.78 11.46 6.22 4.11 6.82 13.11 1.55 18.38l-17.52 17.52c-3.74 3.74-9.31 4.24-14.11 2.03a24.516 24.516 0 0 0-10.26-2.22h-32.78c-4.66 0-8.44 3.78-8.44 8.42 0 3.75 2.52 7.08 6.12 8.11l50.07 14.3c22.25 6.36 40.01 24.71 42.91 47.67 4.05 32.06-19.03 59.42-49.32 63.04z"]},an={prefix:"fas",iconName:"comment-dots",icon:[512,512,[],"f4ad","M256 32C114.6 32 0 125.1 0 240c0 49.6 21.4 95 57 130.7C44.5 421.1 2.7 466 2.2 466.5c-2.2 2.3-2.8 5.7-1.5 8.7S4.8 480 8 480c66.3 0 116-31.8 140.6-51.4 32.7 12.3 69 19.4 107.4 19.4 141.4 0 256-93.1 256-208S397.4 32 256 32zM128 272c-17.7 0-32-14.3-32-32s14.3-32 32-32 32 14.3 32 32-14.3 32-32 32zm128 0c-17.7 0-32-14.3-32-32s14.3-32 32-32 32 14.3 32 32-14.3 32-32 32zm128 0c-17.7 0-32-14.3-32-32s14.3-32 32-32 32 14.3 32 32-14.3 32-32 32z"]},ln={prefix:"fas",iconName:"comment-medical",icon:[512,512,[],"f7f5","M256 32C114.62 32 0 125.12 0 240c0 49.56 21.41 95 57 130.74C44.46 421.05 2.7 466 2.2 466.5A8 8 0 0 0 8 480c66.26 0 116-31.75 140.6-51.38A304.66 304.66 0 0 0 256 448c141.39 0 256-93.12 256-208S397.39 32 256 32zm96 232a8 8 0 0 1-8 8h-56v56a8 8 0 0 1-8 8h-48a8 8 0 0 1-8-8v-56h-56a8 8 0 0 1-8-8v-48a8 8 0 0 1 8-8h56v-56a8 8 0 0 1 8-8h48a8 8 0 0 1 8 8v56h56a8 8 0 0 1 8 8z"]},cn={prefix:"fas",iconName:"comment-slash",icon:[640,512,[],"f4b3","M64 240c0 49.6 21.4 95 57 130.7-12.6 50.3-54.3 95.2-54.8 95.8-2.2 2.3-2.8 5.7-1.5 8.7 1.3 2.9 4.1 4.8 7.3 4.8 66.3 0 116-31.8 140.6-51.4 32.7 12.3 69 19.4 107.4 19.4 27.4 0 53.7-3.6 78.4-10L72.9 186.4c-5.6 17.1-8.9 35-8.9 53.6zm569.8 218.1l-114.4-88.4C554.6 334.1 576 289.2 576 240c0-114.9-114.6-208-256-208-65.1 0-124.2 20.1-169.4 52.7L45.5 3.4C38.5-2 28.5-.8 23 6.2L3.4 31.4c-5.4 7-4.2 17 2.8 22.4l588.4 454.7c7 5.4 17 4.2 22.5-2.8l19.6-25.3c5.4-6.8 4.1-16.9-2.9-22.3z"]},hn={prefix:"fas",iconName:"comments",icon:[576,512,[],"f086","M416 192c0-88.4-93.1-160-208-160S0 103.6 0 192c0 34.3 14.1 65.9 38 92-13.4 30.2-35.5 54.2-35.8 54.5-2.2 2.3-2.8 5.7-1.5 8.7S4.8 352 8 352c36.6 0 66.9-12.3 88.7-25 32.2 15.7 70.3 25 111.3 25 114.9 0 208-71.6 208-160zm122 220c23.9-26 38-57.7 38-92 0-66.9-53.5-124.2-129.3-148.1.9 6.6 1.3 13.3 1.3 20.1 0 105.9-107.7 192-240 192-10.8 0-21.3-.8-31.7-1.9C207.8 439.6 281.8 480 368 480c41 0 79.1-9.2 111.3-25 21.8 12.7 52.1 25 88.7 25 3.2 0 6.1-1.9 7.3-4.8 1.3-2.9.7-6.3-1.5-8.7-.3-.3-22.4-24.2-35.8-54.5z"]},dn={prefix:"fas",iconName:"comments-dollar",icon:[576,512,[],"f653","M416 192c0-88.37-93.12-160-208-160S0 103.63 0 192c0 34.27 14.13 65.95 37.97 91.98C24.61 314.22 2.52 338.16 2.2 338.5A7.995 7.995 0 0 0 8 352c36.58 0 66.93-12.25 88.73-24.98C128.93 342.76 167.02 352 208 352c114.88 0 208-71.63 208-160zm-224 96v-16.29c-11.29-.58-22.27-4.52-31.37-11.35-3.9-2.93-4.1-8.77-.57-12.14l11.75-11.21c2.77-2.64 6.89-2.76 10.13-.73 3.87 2.42 8.26 3.72 12.82 3.72h28.11c6.5 0 11.8-5.92 11.8-13.19 0-5.95-3.61-11.19-8.77-12.73l-45-13.5c-18.59-5.58-31.58-23.42-31.58-43.39 0-24.52 19.05-44.44 42.67-45.07V96c0-4.42 3.58-8 8-8h16c4.42 0 8 3.58 8 8v16.29c11.29.58 22.27 4.51 31.37 11.35 3.9 2.93 4.1 8.77.57 12.14l-11.75 11.21c-2.77 2.64-6.89 2.76-10.13.73-3.87-2.43-8.26-3.72-12.82-3.72h-28.11c-6.5 0-11.8 5.92-11.8 13.19 0 5.95 3.61 11.19 8.77 12.73l45 13.5c18.59 5.58 31.58 23.42 31.58 43.39 0 24.53-19.05 44.44-42.67 45.07V288c0 4.42-3.58 8-8 8h-16c-4.42 0-8-3.58-8-8zm346.01 123.99C561.87 385.96 576 354.27 576 320c0-66.94-53.49-124.2-129.33-148.07.86 6.6 1.33 13.29 1.33 20.07 0 105.87-107.66 192-240 192-10.78 0-21.32-.77-31.73-1.88C207.8 439.63 281.77 480 368 480c40.98 0 79.07-9.24 111.27-24.98C501.07 467.75 531.42 480 568 480c3.2 0 6.09-1.91 7.34-4.84 1.27-2.94.66-6.34-1.55-8.67-.31-.33-22.42-24.24-35.78-54.5z"]},un={prefix:"fas",iconName:"compact-disc",icon:[496,512,[],"f51f","M248 8C111 8 0 119 0 256s111 248 248 248 248-111 248-248S385 8 248 8zM88 256H56c0-105.9 86.1-192 192-192v32c-88.2 0-160 71.8-160 160zm160 96c-53 0-96-43-96-96s43-96 96-96 96 43 96 96-43 96-96 96zm0-128c-17.7 0-32 14.3-32 32s14.3 32 32 32 32-14.3 32-32-14.3-32-32-32z"]},pn={prefix:"fas",iconName:"compass",icon:[496,512,[],"f14e","M225.38 233.37c-12.5 12.5-12.5 32.76 0 45.25 12.49 12.5 32.76 12.5 45.25 0 12.5-12.5 12.5-32.76 0-45.25-12.5-12.49-32.76-12.49-45.25 0zM248 8C111.03 8 0 119.03 0 256s111.03 248 248 248 248-111.03 248-248S384.97 8 248 8zm126.14 148.05L308.17 300.4a31.938 31.938 0 0 1-15.77 15.77l-144.34 65.97c-16.65 7.61-33.81-9.55-26.2-26.2l65.98-144.35a31.938 31.938 0 0 1 15.77-15.77l144.34-65.97c16.65-7.6 33.8 9.55 26.19 26.2z"]},gn={prefix:"fas",iconName:"compress",icon:[448,512,[],"f066","M436 192H312c-13.3 0-24-10.7-24-24V44c0-6.6 5.4-12 12-12h40c6.6 0 12 5.4 12 12v84h84c6.6 0 12 5.4 12 12v40c0 6.6-5.4 12-12 12zm-276-24V44c0-6.6-5.4-12-12-12h-40c-6.6 0-12 5.4-12 12v84H12c-6.6 0-12 5.4-12 12v40c0 6.6 5.4 12 12 12h124c13.3 0 24-10.7 24-24zm0 300V344c0-13.3-10.7-24-24-24H12c-6.6 0-12 5.4-12 12v40c0 6.6 5.4 12 12 12h84v84c0 6.6 5.4 12 12 12h40c6.6 0 12-5.4 12-12zm192 0v-84h84c6.6 0 12-5.4 12-12v-40c0-6.6-5.4-12-12-12H312c-13.3 0-24 10.7-24 24v124c0 6.6 5.4 12 12 12h40c6.6 0 12-5.4 12-12z"]},fn={prefix:"fas",iconName:"compress-alt",icon:[448,512,[],"f422","M4.686 427.314L104 328l-32.922-31.029C55.958 281.851 66.666 256 88.048 256h112C213.303 256 224 266.745 224 280v112c0 21.382-25.803 32.09-40.922 16.971L152 376l-99.314 99.314c-6.248 6.248-16.379 6.248-22.627 0L4.686 449.941c-6.248-6.248-6.248-16.379 0-22.627zM443.314 84.686L344 184l32.922 31.029c15.12 15.12 4.412 40.971-16.97 40.971h-112C234.697 256 224 245.255 224 232V120c0-21.382 25.803-32.09 40.922-16.971L296 136l99.314-99.314c6.248-6.248 16.379-6.248 22.627 0l25.373 25.373c6.248 6.248 6.248 16.379 0 22.627z"]},mn={prefix:"fas",iconName:"compress-arrows-alt",icon:[512,512,[],"f78c","M200 288H88c-21.4 0-32.1 25.8-17 41l32.9 31-99.2 99.3c-6.2 6.2-6.2 16.4 0 22.6l25.4 25.4c6.2 6.2 16.4 6.2 22.6 0L152 408l31.1 33c15.1 15.1 40.9 4.4 40.9-17V312c0-13.3-10.7-24-24-24zm112-64h112c21.4 0 32.1-25.9 17-41l-33-31 99.3-99.3c6.2-6.2 6.2-16.4 0-22.6L481.9 4.7c-6.2-6.2-16.4-6.2-22.6 0L360 104l-31.1-33C313.8 55.9 288 66.6 288 88v112c0 13.3 10.7 24 24 24zm96 136l33-31.1c15.1-15.1 4.4-40.9-17-40.9H312c-13.3 0-24 10.7-24 24v112c0 21.4 25.9 32.1 41 17l31-32.9 99.3 99.3c6.2 6.2 16.4 6.2 22.6 0l25.4-25.4c6.2-6.2 6.2-16.4 0-22.6L408 360zM183 71.1L152 104 52.7 4.7c-6.2-6.2-16.4-6.2-22.6 0L4.7 30.1c-6.2 6.2-6.2 16.4 0 22.6L104 152l-33 31.1C55.9 198.2 66.6 224 88 224h112c13.3 0 24-10.7 24-24V88c0-21.3-25.9-32-41-16.9z"]},vn={prefix:"fas",iconName:"concierge-bell",icon:[512,512,[],"f562","M288 130.54V112h16c8.84 0 16-7.16 16-16V80c0-8.84-7.16-16-16-16h-96c-8.84 0-16 7.16-16 16v16c0 8.84 7.16 16 16 16h16v18.54C115.49 146.11 32 239.18 32 352h448c0-112.82-83.49-205.89-192-221.46zM496 384H16c-8.84 0-16 7.16-16 16v32c0 8.84 7.16 16 16 16h480c8.84 0 16-7.16 16-16v-32c0-8.84-7.16-16-16-16z"]},yn={prefix:"fas",iconName:"cookie",icon:[512,512,[],"f563","M510.37 254.79l-12.08-76.26a132.493 132.493 0 0 0-37.16-72.95l-54.76-54.75c-19.73-19.72-45.18-32.7-72.71-37.05l-76.7-12.15c-27.51-4.36-55.69.11-80.52 12.76L107.32 49.6a132.25 132.25 0 0 0-57.79 57.8l-35.1 68.88a132.602 132.602 0 0 0-12.82 80.94l12.08 76.27a132.493 132.493 0 0 0 37.16 72.95l54.76 54.75a132.087 132.087 0 0 0 72.71 37.05l76.7 12.14c27.51 4.36 55.69-.11 80.52-12.75l69.12-35.21a132.302 132.302 0 0 0 57.79-57.8l35.1-68.87c12.71-24.96 17.2-53.3 12.82-80.96zM176 368c-17.67 0-32-14.33-32-32s14.33-32 32-32 32 14.33 32 32-14.33 32-32 32zm32-160c-17.67 0-32-14.33-32-32s14.33-32 32-32 32 14.33 32 32-14.33 32-32 32zm160 128c-17.67 0-32-14.33-32-32s14.33-32 32-32 32 14.33 32 32-14.33 32-32 32z"]},Cn={prefix:"fas",iconName:"cookie-bite",icon:[512,512,[],"f564","M510.52 255.82c-69.97-.85-126.47-57.69-126.47-127.86-70.17 0-127-56.49-127.86-126.45-27.26-4.14-55.13.3-79.72 12.82l-69.13 35.22a132.221 132.221 0 0 0-57.79 57.81l-35.1 68.88a132.645 132.645 0 0 0-12.82 80.95l12.08 76.27a132.521 132.521 0 0 0 37.16 72.96l54.77 54.76a132.036 132.036 0 0 0 72.71 37.06l76.71 12.15c27.51 4.36 55.7-.11 80.53-12.76l69.13-35.21a132.273 132.273 0 0 0 57.79-57.81l35.1-68.88c12.56-24.64 17.01-52.58 12.91-79.91zM176 368c-17.67 0-32-14.33-32-32s14.33-32 32-32 32 14.33 32 32-14.33 32-32 32zm32-160c-17.67 0-32-14.33-32-32s14.33-32 32-32 32 14.33 32 32-14.33 32-32 32zm160 128c-17.67 0-32-14.33-32-32s14.33-32 32-32 32 14.33 32 32-14.33 32-32 32z"]},bn={prefix:"fas",iconName:"copy",icon:[448,512,[],"f0c5","M320 448v40c0 13.255-10.745 24-24 24H24c-13.255 0-24-10.745-24-24V120c0-13.255 10.745-24 24-24h72v296c0 30.879 25.121 56 56 56h168zm0-344V0H152c-13.255 0-24 10.745-24 24v368c0 13.255 10.745 24 24 24h272c13.255 0 24-10.745 24-24V128H344c-13.2 0-24-10.8-24-24zm120.971-31.029L375.029 7.029A24 24 0 0 0 358.059 0H352v96h96v-6.059a24 24 0 0 0-7.029-16.97z"]},Sn={prefix:"fas",iconName:"copyright",icon:[512,512,[],"f1f9","M256 8C119.033 8 8 119.033 8 256s111.033 248 248 248 248-111.033 248-248S392.967 8 256 8zm117.134 346.753c-1.592 1.867-39.776 45.731-109.851 45.731-84.692 0-144.484-63.26-144.484-145.567 0-81.303 62.004-143.401 143.762-143.401 66.957 0 101.965 37.315 103.422 38.904a12 12 0 0 1 1.238 14.623l-22.38 34.655c-4.049 6.267-12.774 7.351-18.234 2.295-.233-.214-26.529-23.88-61.88-23.88-46.116 0-73.916 33.575-73.916 76.082 0 39.602 25.514 79.692 74.277 79.692 38.697 0 65.28-28.338 65.544-28.625 5.132-5.565 14.059-5.033 18.508 1.053l24.547 33.572a12.001 12.001 0 0 1-.553 14.866z"]},wn={prefix:"fas",iconName:"couch",icon:[640,512,[],"f4b8","M160 224v64h320v-64c0-35.3 28.7-64 64-64h32c0-53-43-96-96-96H160c-53 0-96 43-96 96h32c35.3 0 64 28.7 64 64zm416-32h-32c-17.7 0-32 14.3-32 32v96H128v-96c0-17.7-14.3-32-32-32H64c-35.3 0-64 28.7-64 64 0 23.6 13 44 32 55.1V432c0 8.8 7.2 16 16 16h64c8.8 0 16-7.2 16-16v-16h384v16c0 8.8 7.2 16 16 16h64c8.8 0 16-7.2 16-16V311.1c19-11.1 32-31.5 32-55.1 0-35.3-28.7-64-64-64z"]},xn={prefix:"fas",iconName:"credit-card",icon:[576,512,[],"f09d","M0 432c0 26.5 21.5 48 48 48h480c26.5 0 48-21.5 48-48V256H0v176zm192-68c0-6.6 5.4-12 12-12h136c6.6 0 12 5.4 12 12v40c0 6.6-5.4 12-12 12H204c-6.6 0-12-5.4-12-12v-40zm-128 0c0-6.6 5.4-12 12-12h72c6.6 0 12 5.4 12 12v40c0 6.6-5.4 12-12 12H76c-6.6 0-12-5.4-12-12v-40zM576 80v48H0V80c0-26.5 21.5-48 48-48h480c26.5 0 48 21.5 48 48z"]},En={prefix:"fas",iconName:"crop",icon:[512,512,[],"f125","M488 352h-40V109.25l59.31-59.31c6.25-6.25 6.25-16.38 0-22.63L484.69 4.69c-6.25-6.25-16.38-6.25-22.63 0L402.75 64H192v96h114.75L160 306.75V24c0-13.26-10.75-24-24-24H88C74.75 0 64 10.74 64 24v40H24C10.75 64 0 74.74 0 88v48c0 13.25 10.75 24 24 24h40v264c0 13.25 10.75 24 24 24h232v-96H205.25L352 205.25V488c0 13.25 10.75 24 24 24h48c13.25 0 24-10.75 24-24v-40h40c13.25 0 24-10.75 24-24v-48c0-13.26-10.75-24-24-24z"]},Mn={prefix:"fas",iconName:"crop-alt",icon:[512,512,[],"f565","M488 352h-40V96c0-17.67-14.33-32-32-32H192v96h160v328c0 13.25 10.75 24 24 24h48c13.25 0 24-10.75 24-24v-40h40c13.25 0 24-10.75 24-24v-48c0-13.26-10.75-24-24-24zM160 24c0-13.26-10.75-24-24-24H88C74.75 0 64 10.74 64 24v40H24C10.75 64 0 74.74 0 88v48c0 13.25 10.75 24 24 24h40v256c0 17.67 14.33 32 32 32h224v-96H160V24z"]},An={prefix:"fas",iconName:"cross",icon:[384,512,[],"f654","M352 128h-96V32c0-17.67-14.33-32-32-32h-64c-17.67 0-32 14.33-32 32v96H32c-17.67 0-32 14.33-32 32v64c0 17.67 14.33 32 32 32h96v224c0 17.67 14.33 32 32 32h64c17.67 0 32-14.33 32-32V256h96c17.67 0 32-14.33 32-32v-64c0-17.67-14.33-32-32-32z"]},Tn={prefix:"fas",iconName:"crosshairs",icon:[512,512,[],"f05b","M500 224h-30.364C455.724 130.325 381.675 56.276 288 42.364V12c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v30.364C130.325 56.276 56.276 130.325 42.364 224H12c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h30.364C56.276 381.675 130.325 455.724 224 469.636V500c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12v-30.364C381.675 455.724 455.724 381.675 469.636 288H500c6.627 0 12-5.373 12-12v-40c0-6.627-5.373-12-12-12zM288 404.634V364c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40.634C165.826 392.232 119.783 346.243 107.366 288H148c6.627 0 12-5.373 12-12v-40c0-6.627-5.373-12-12-12h-40.634C119.768 165.826 165.757 119.783 224 107.366V148c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12v-40.634C346.174 119.768 392.217 165.757 404.634 224H364c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40.634C392.232 346.174 346.243 392.217 288 404.634zM288 256c0 17.673-14.327 32-32 32s-32-14.327-32-32c0-17.673 14.327-32 32-32s32 14.327 32 32z"]},Dn={prefix:"fas",iconName:"crow",icon:[640,512,[],"f520","M544 32h-16.36C513.04 12.68 490.09 0 464 0c-44.18 0-80 35.82-80 80v20.98L12.09 393.57A30.216 30.216 0 0 0 0 417.74c0 22.46 23.64 37.07 43.73 27.03L165.27 384h96.49l44.41 120.1c2.27 6.23 9.15 9.44 15.38 7.17l22.55-8.21c6.23-2.27 9.44-9.15 7.17-15.38L312.94 384H352c1.91 0 3.76-.23 5.66-.29l44.51 120.38c2.27 6.23 9.15 9.44 15.38 7.17l22.55-8.21c6.23-2.27 9.44-9.15 7.17-15.38l-41.24-111.53C485.74 352.8 544 279.26 544 192v-80l96-16c0-35.35-42.98-64-96-64zm-80 72c-13.25 0-24-10.75-24-24 0-13.26 10.75-24 24-24s24 10.74 24 24c0 13.25-10.75 24-24 24z"]},In={prefix:"fas",iconName:"crown",icon:[640,512,[],"f521","M528 448H112c-8.8 0-16 7.2-16 16v32c0 8.8 7.2 16 16 16h416c8.8 0 16-7.2 16-16v-32c0-8.8-7.2-16-16-16zm64-320c-26.5 0-48 21.5-48 48 0 7.1 1.6 13.7 4.4 19.8L476 239.2c-15.4 9.2-35.3 4-44.2-11.6L350.3 85C361 76.2 368 63 368 48c0-26.5-21.5-48-48-48s-48 21.5-48 48c0 15 7 28.2 17.7 37l-81.5 142.6c-8.9 15.6-28.9 20.8-44.2 11.6l-72.3-43.4c2.7-6 4.4-12.7 4.4-19.8 0-26.5-21.5-48-48-48S0 149.5 0 176s21.5 48 48 48c2.6 0 5.2-.4 7.7-.8L128 416h384l72.3-192.8c2.5.4 5.1.8 7.7.8 26.5 0 48-21.5 48-48s-21.5-48-48-48z"]},Rn={prefix:"fas",iconName:"crutch",icon:[512,512,[],"f7f7","M507.31 185.71l-181-181a16 16 0 0 0-22.62 0L281 27.31a16 16 0 0 0 0 22.63l181 181a16 16 0 0 0 22.63 0l22.62-22.63a16 16 0 0 0 .06-22.6zm-179.54 66.41l-67.89-67.89 55.1-55.1-45.25-45.25-109.67 109.67a96.08 96.08 0 0 0-25.67 46.29L106.65 360.1l-102 102a16 16 0 0 0 0 22.63l22.62 22.62a16 16 0 0 0 22.63 0l102-102 120.25-27.75a95.88 95.88 0 0 0 46.29-25.65l109.68-109.68L382.87 197zm-54.57 54.57a32 32 0 0 1-15.45 8.54l-79.3 18.32 18.3-79.3a32.22 32.22 0 0 1 8.56-15.45l9.31-9.31 67.89 67.89z"]},Ln={prefix:"fas",iconName:"cube",icon:[512,512,[],"f1b2","M239.1 6.3l-208 78c-18.7 7-31.1 25-31.1 45v225.1c0 18.2 10.3 34.8 26.5 42.9l208 104c13.5 6.8 29.4 6.8 42.9 0l208-104c16.3-8.1 26.5-24.8 26.5-42.9V129.3c0-20-12.4-37.9-31.1-44.9l-208-78C262 2.2 250 2.2 239.1 6.3zM256 68.4l192 72v1.1l-192 78-192-78v-1.1l192-72zm32 356V275.5l160-65v133.9l-160 80z"]},kn={prefix:"fas",iconName:"cubes",icon:[512,512,[],"f1b3","M488.6 250.2L392 214V105.5c0-15-9.3-28.4-23.4-33.7l-100-37.5c-8.1-3.1-17.1-3.1-25.3 0l-100 37.5c-14.1 5.3-23.4 18.7-23.4 33.7V214l-96.6 36.2C9.3 255.5 0 268.9 0 283.9V394c0 13.6 7.7 26.1 19.9 32.2l100 50c10.1 5.1 22.1 5.1 32.2 0l103.9-52 103.9 52c10.1 5.1 22.1 5.1 32.2 0l100-50c12.2-6.1 19.9-18.6 19.9-32.2V283.9c0-15-9.3-28.4-23.4-33.7zM358 214.8l-85 31.9v-68.2l85-37v73.3zM154 104.1l102-38.2 102 38.2v.6l-102 41.4-102-41.4v-.6zm84 291.1l-85 42.5v-79.1l85-38.8v75.4zm0-112l-102 41.4-102-41.4v-.6l102-38.2 102 38.2v.6zm240 112l-85 42.5v-79.1l85-38.8v75.4zm0-112l-102 41.4-102-41.4v-.6l102-38.2 102 38.2v.6z"]},Pn={prefix:"fas",iconName:"cut",icon:[448,512,[],"f0c4","M278.06 256L444.48 89.57c4.69-4.69 4.69-12.29 0-16.97-32.8-32.8-85.99-32.8-118.79 0L210.18 188.12l-24.86-24.86c4.31-10.92 6.68-22.81 6.68-35.26 0-53.02-42.98-96-96-96S0 74.98 0 128s42.98 96 96 96c4.54 0 8.99-.32 13.36-.93L142.29 256l-32.93 32.93c-4.37-.61-8.83-.93-13.36-.93-53.02 0-96 42.98-96 96s42.98 96 96 96 96-42.98 96-96c0-12.45-2.37-24.34-6.68-35.26l24.86-24.86L325.69 439.4c32.8 32.8 85.99 32.8 118.79 0 4.69-4.68 4.69-12.28 0-16.97L278.06 256zM96 160c-17.64 0-32-14.36-32-32s14.36-32 32-32 32 14.36 32 32-14.36 32-32 32zm0 256c-17.64 0-32-14.36-32-32s14.36-32 32-32 32 14.36 32 32-14.36 32-32 32z"]},Nn={prefix:"fas",iconName:"database",icon:[448,512,[],"f1c0","M448 73.143v45.714C448 159.143 347.667 192 224 192S0 159.143 0 118.857V73.143C0 32.857 100.333 0 224 0s224 32.857 224 73.143zM448 176v102.857C448 319.143 347.667 352 224 352S0 319.143 0 278.857V176c48.125 33.143 136.208 48.572 224 48.572S399.874 209.143 448 176zm0 160v102.857C448 479.143 347.667 512 224 512S0 479.143 0 438.857V336c48.125 33.143 136.208 48.572 224 48.572S399.874 369.143 448 336z"]},On={prefix:"fas",iconName:"deaf",icon:[512,512,[],"f2a4","M216 260c0 15.464-12.536 28-28 28s-28-12.536-28-28c0-44.112 35.888-80 80-80s80 35.888 80 80c0 15.464-12.536 28-28 28s-28-12.536-28-28c0-13.234-10.767-24-24-24s-24 10.766-24 24zm24-176c-97.047 0-176 78.953-176 176 0 15.464 12.536 28 28 28s28-12.536 28-28c0-66.168 53.832-120 120-120s120 53.832 120 120c0 75.164-71.009 70.311-71.997 143.622L288 404c0 28.673-23.327 52-52 52-15.464 0-28 12.536-28 28s12.536 28 28 28c59.475 0 107.876-48.328 108-107.774.595-34.428 72-48.24 72-144.226 0-97.047-78.953-176-176-176zm268.485-52.201L480.2 3.515c-4.687-4.686-12.284-4.686-16.971 0L376.2 90.544c-4.686 4.686-4.686 12.284 0 16.971l28.285 28.285c4.686 4.686 12.284 4.686 16.97 0l87.03-87.029c4.687-4.688 4.687-12.286 0-16.972zM168.97 314.745c-4.686-4.686-12.284-4.686-16.97 0L3.515 463.23c-4.686 4.686-4.686 12.284 0 16.971L31.8 508.485c4.687 4.686 12.284 4.686 16.971 0L197.256 360c4.686-4.686 4.686-12.284 0-16.971l-28.286-28.284z"]},_n={prefix:"fas",iconName:"democrat",icon:[640,512,[],"f747","M637.3 256.9l-19.6-29.4c-28.2-42.3-75.3-67.5-126.1-67.5H256l-81.2-81.2c20.1-20.1 22.6-51.1 7.5-73.9-3.4-5.2-10.8-5.9-15.2-1.5l-41.8 41.8L82.4 2.4c-3.6-3.6-9.6-3-12.4 1.2-12.3 18.6-10.3 44 6.1 60.4 3.3 3.3 7.3 5.3 11.3 7.5-2.2 1.7-4.7 3.1-6.4 5.4L6.4 176.2c-7.3 9.7-8.4 22.7-3 33.5l14.3 28.6c5.4 10.8 16.5 17.7 28.6 17.7h31c8.5 0 16.6-3.4 22.6-9.4L138 212l54 108h352v-77.8c16.2 12.2 18.3 17.6 40.1 50.3 4.9 7.4 14.8 9.3 22.2 4.4l26.6-17.7c7.3-5 9.3-14.9 4.4-22.3zm-341.1-13.6l-16.5 16.1 3.9 22.7c.7 4.1-3.6 7.2-7.2 5.3L256 276.7l-20.4 10.7c-3.6 1.9-7.9-1.2-7.2-5.3l3.9-22.7-16.5-16.1c-3-2.9-1.3-7.9 2.8-8.5l22.8-3.3 10.2-20.7c1.8-3.7 7.1-3.7 9 0l10.2 20.7 22.8 3.3c4 .6 5.6 5.6 2.6 8.5zm112 0l-16.5 16.1 3.9 22.7c.7 4.1-3.6 7.2-7.2 5.3L368 276.7l-20.4 10.7c-3.6 1.9-7.9-1.2-7.2-5.3l3.9-22.7-16.5-16.1c-3-2.9-1.3-7.9 2.8-8.5l22.8-3.3 10.2-20.7c1.8-3.7 7.1-3.7 9 0l10.2 20.7 22.8 3.3c4 .6 5.6 5.6 2.6 8.5zm112 0l-16.5 16.1 3.9 22.7c.7 4.1-3.6 7.2-7.2 5.3L480 276.7l-20.4 10.7c-3.6 1.9-7.9-1.2-7.2-5.3l3.9-22.7-16.5-16.1c-3-2.9-1.3-7.9 2.8-8.5l22.8-3.3 10.2-20.7c1.8-3.7 7.1-3.7 9 0l10.2 20.7 22.8 3.3c4 .6 5.6 5.6 2.6 8.5zM192 496c0 8.8 7.2 16 16 16h64c8.8 0 16-7.2 16-16v-80h160v80c0 8.8 7.2 16 16 16h64c8.8 0 16-7.2 16-16V352H192v144z"]},Fn={prefix:"fas",iconName:"desktop",icon:[576,512,[],"f108","M528 0H48C21.5 0 0 21.5 0 48v320c0 26.5 21.5 48 48 48h192l-16 48h-72c-13.3 0-24 10.7-24 24s10.7 24 24 24h272c13.3 0 24-10.7 24-24s-10.7-24-24-24h-72l-16-48h192c26.5 0 48-21.5 48-48V48c0-26.5-21.5-48-48-48zm-16 352H64V64h448v288z"]},Gn={prefix:"fas",iconName:"dharmachakra",icon:[512,512,[],"f655","M495 225.06l-17.22 1.08c-5.27-39.49-20.79-75.64-43.86-105.84l12.95-11.43c6.92-6.11 7.25-16.79.73-23.31L426.44 64.4c-6.53-6.53-17.21-6.19-23.31.73L391.7 78.07c-30.2-23.06-66.35-38.58-105.83-43.86L286.94 17c.58-9.21-6.74-17-15.97-17h-29.94c-9.23 0-16.54 7.79-15.97 17l1.08 17.22c-39.49 5.27-75.64 20.79-105.83 43.86l-11.43-12.95c-6.11-6.92-16.79-7.25-23.31-.73L64.4 85.56c-6.53 6.53-6.19 17.21.73 23.31l12.95 11.43c-23.06 30.2-38.58 66.35-43.86 105.84L17 225.06c-9.21-.58-17 6.74-17 15.97v29.94c0 9.23 7.79 16.54 17 15.97l17.22-1.08c5.27 39.49 20.79 75.64 43.86 105.83l-12.95 11.43c-6.92 6.11-7.25 16.79-.73 23.31l21.17 21.17c6.53 6.53 17.21 6.19 23.31-.73l11.43-12.95c30.2 23.06 66.35 38.58 105.84 43.86L225.06 495c-.58 9.21 6.74 17 15.97 17h29.94c9.23 0 16.54-7.79 15.97-17l-1.08-17.22c39.49-5.27 75.64-20.79 105.84-43.86l11.43 12.95c6.11 6.92 16.79 7.25 23.31.73l21.17-21.17c6.53-6.53 6.19-17.21-.73-23.31l-12.95-11.43c23.06-30.2 38.58-66.35 43.86-105.83l17.22 1.08c9.21.58 17-6.74 17-15.97v-29.94c-.01-9.23-7.8-16.54-17.01-15.97zM281.84 98.61c24.81 4.07 47.63 13.66 67.23 27.78l-42.62 48.29c-8.73-5.44-18.32-9.54-28.62-11.95l4.01-64.12zm-51.68 0l4.01 64.12c-10.29 2.41-19.89 6.52-28.62 11.95l-42.62-48.29c19.6-14.12 42.42-23.71 67.23-27.78zm-103.77 64.33l48.3 42.61c-5.44 8.73-9.54 18.33-11.96 28.62l-64.12-4.01c4.07-24.81 13.66-47.62 27.78-67.22zm-27.78 118.9l64.12-4.01c2.41 10.29 6.52 19.89 11.95 28.62l-48.29 42.62c-14.12-19.6-23.71-42.42-27.78-67.23zm131.55 131.55c-24.81-4.07-47.63-13.66-67.23-27.78l42.61-48.3c8.73 5.44 18.33 9.54 28.62 11.96l-4 64.12zM256 288c-17.67 0-32-14.33-32-32s14.33-32 32-32 32 14.33 32 32-14.33 32-32 32zm25.84 125.39l-4.01-64.12c10.29-2.41 19.89-6.52 28.62-11.96l42.61 48.3c-19.6 14.12-42.41 23.71-67.22 27.78zm103.77-64.33l-48.29-42.62c5.44-8.73 9.54-18.32 11.95-28.62l64.12 4.01c-4.07 24.82-13.66 47.64-27.78 67.23zm-36.34-114.89c-2.41-10.29-6.52-19.89-11.96-28.62l48.3-42.61c14.12 19.6 23.71 42.42 27.78 67.23l-64.12 4z"]},Vn={prefix:"fas",iconName:"diagnoses",icon:[640,512,[],"f470","M496 256c8.8 0 16-7.2 16-16s-7.2-16-16-16-16 7.2-16 16 7.2 16 16 16zm-176-80c48.5 0 88-39.5 88-88S368.5 0 320 0s-88 39.5-88 88 39.5 88 88 88zM59.8 364c10.2 15.3 29.3 17.8 42.9 9.8 16.2-9.6 56.2-31.7 105.3-48.6V416h224v-90.7c49.1 16.8 89.1 39 105.3 48.6 13.6 8 32.7 5.3 42.9-9.8l17.8-26.7c8.8-13.2 7.6-34.6-10-45.1-11.9-7.1-29.7-17-51.1-27.4-28.1 46.1-99.4 17.8-87.7-35.1C409.3 217.2 365.1 208 320 208c-57 0-112.9 14.5-160 32.2-.2 40.2-47.6 63.3-79.2 36-11.2 6-21.3 11.6-28.7 16-17.6 10.5-18.8 31.8-10 45.1L59.8 364zM368 344c13.3 0 24 10.7 24 24s-10.7 24-24 24-24-10.7-24-24 10.7-24 24-24zm-96-96c13.3 0 24 10.7 24 24s-10.7 24-24 24-24-10.7-24-24 10.7-24 24-24zm-160 8c8.8 0 16-7.2 16-16s-7.2-16-16-16-16 7.2-16 16 7.2 16 16 16zm512 192H16c-8.8 0-16 7.2-16 16v32c0 8.8 7.2 16 16 16h608c8.8 0 16-7.2 16-16v-32c0-8.8-7.2-16-16-16z"]},Bn={prefix:"fas",iconName:"dice",icon:[640,512,[],"f522","M592 192H473.26c12.69 29.59 7.12 65.2-17 89.32L320 417.58V464c0 26.51 21.49 48 48 48h224c26.51 0 48-21.49 48-48V240c0-26.51-21.49-48-48-48zM480 376c-13.25 0-24-10.75-24-24 0-13.26 10.75-24 24-24s24 10.74 24 24c0 13.25-10.75 24-24 24zm-46.37-186.7L258.7 14.37c-19.16-19.16-50.23-19.16-69.39 0L14.37 189.3c-19.16 19.16-19.16 50.23 0 69.39L189.3 433.63c19.16 19.16 50.23 19.16 69.39 0L433.63 258.7c19.16-19.17 19.16-50.24 0-69.4zM96 248c-13.25 0-24-10.75-24-24 0-13.26 10.75-24 24-24s24 10.74 24 24c0 13.25-10.75 24-24 24zm128 128c-13.25 0-24-10.75-24-24 0-13.26 10.75-24 24-24s24 10.74 24 24c0 13.25-10.75 24-24 24zm0-128c-13.25 0-24-10.75-24-24 0-13.26 10.75-24 24-24s24 10.74 24 24c0 13.25-10.75 24-24 24zm0-128c-13.25 0-24-10.75-24-24 0-13.26 10.75-24 24-24s24 10.74 24 24c0 13.25-10.75 24-24 24zm128 128c-13.25 0-24-10.75-24-24 0-13.26 10.75-24 24-24s24 10.74 24 24c0 13.25-10.75 24-24 24z"]},Hn={prefix:"fas",iconName:"dice-d20",icon:[480,512,[],"f6cf","M106.75 215.06L1.2 370.95c-3.08 5 .1 11.5 5.93 12.14l208.26 22.07-108.64-190.1zM7.41 315.43L82.7 193.08 6.06 147.1c-2.67-1.6-6.06.32-6.06 3.43v162.81c0 4.03 5.29 5.53 7.41 2.09zM18.25 423.6l194.4 87.66c5.3 2.45 11.35-1.43 11.35-7.26v-65.67l-203.55-22.3c-4.45-.5-6.23 5.59-2.2 7.57zm81.22-257.78L179.4 22.88c4.34-7.06-3.59-15.25-10.78-11.14L17.81 110.35c-2.47 1.62-2.39 5.26.13 6.78l81.53 48.69zM240 176h109.21L253.63 7.62C250.5 2.54 245.25 0 240 0s-10.5 2.54-13.63 7.62L130.79 176H240zm233.94-28.9l-76.64 45.99 75.29 122.35c2.11 3.44 7.41 1.94 7.41-2.1V150.53c0-3.11-3.39-5.03-6.06-3.43zm-93.41 18.72l81.53-48.7c2.53-1.52 2.6-5.16.13-6.78l-150.81-98.6c-7.19-4.11-15.12 4.08-10.78 11.14l79.93 142.94zm79.02 250.21L256 438.32v65.67c0 5.84 6.05 9.71 11.35 7.26l194.4-87.66c4.03-1.97 2.25-8.06-2.2-7.56zm-86.3-200.97l-108.63 190.1 208.26-22.07c5.83-.65 9.01-7.14 5.93-12.14L373.25 215.06zM240 208H139.57L240 383.75 340.43 208H240z"]},zn={prefix:"fas",iconName:"dice-d6",icon:[448,512,[],"f6d1","M422.19 109.95L256.21 9.07c-19.91-12.1-44.52-12.1-64.43 0L25.81 109.95c-5.32 3.23-5.29 11.27.06 14.46L224 242.55l198.14-118.14c5.35-3.19 5.38-11.22.05-14.46zm13.84 44.63L240 271.46v223.82c0 12.88 13.39 20.91 24.05 14.43l152.16-92.48c19.68-11.96 31.79-33.94 31.79-57.7v-197.7c0-6.41-6.64-10.43-11.97-7.25zM0 161.83v197.7c0 23.77 12.11 45.74 31.79 57.7l152.16 92.47c10.67 6.48 24.05-1.54 24.05-14.43V271.46L11.97 154.58C6.64 151.4 0 155.42 0 161.83z"]},Un={prefix:"fas",iconName:"dice-five",icon:[448,512,[],"f523","M384 32H64C28.65 32 0 60.65 0 96v320c0 35.35 28.65 64 64 64h320c35.35 0 64-28.65 64-64V96c0-35.35-28.65-64-64-64zM128 384c-17.67 0-32-14.33-32-32s14.33-32 32-32 32 14.33 32 32-14.33 32-32 32zm0-192c-17.67 0-32-14.33-32-32s14.33-32 32-32 32 14.33 32 32-14.33 32-32 32zm96 96c-17.67 0-32-14.33-32-32s14.33-32 32-32 32 14.33 32 32-14.33 32-32 32zm96 96c-17.67 0-32-14.33-32-32s14.33-32 32-32 32 14.33 32 32-14.33 32-32 32zm0-192c-17.67 0-32-14.33-32-32s14.33-32 32-32 32 14.33 32 32-14.33 32-32 32z"]},Wn={prefix:"fas",iconName:"dice-four",icon:[448,512,[],"f524","M384 32H64C28.65 32 0 60.65 0 96v320c0 35.35 28.65 64 64 64h320c35.35 0 64-28.65 64-64V96c0-35.35-28.65-64-64-64zM128 384c-17.67 0-32-14.33-32-32s14.33-32 32-32 32 14.33 32 32-14.33 32-32 32zm0-192c-17.67 0-32-14.33-32-32s14.33-32 32-32 32 14.33 32 32-14.33 32-32 32zm192 192c-17.67 0-32-14.33-32-32s14.33-32 32-32 32 14.33 32 32-14.33 32-32 32zm0-192c-17.67 0-32-14.33-32-32s14.33-32 32-32 32 14.33 32 32-14.33 32-32 32z"]},jn={prefix:"fas",iconName:"dice-one",icon:[448,512,[],"f525","M384 32H64C28.65 32 0 60.65 0 96v320c0 35.35 28.65 64 64 64h320c35.35 0 64-28.65 64-64V96c0-35.35-28.65-64-64-64zM224 288c-17.67 0-32-14.33-32-32s14.33-32 32-32 32 14.33 32 32-14.33 32-32 32z"]},Kn={prefix:"fas",iconName:"dice-six",icon:[448,512,[],"f526","M384 32H64C28.65 32 0 60.65 0 96v320c0 35.35 28.65 64 64 64h320c35.35 0 64-28.65 64-64V96c0-35.35-28.65-64-64-64zM128 384c-17.67 0-32-14.33-32-32s14.33-32 32-32 32 14.33 32 32-14.33 32-32 32zm0-96c-17.67 0-32-14.33-32-32s14.33-32 32-32 32 14.33 32 32-14.33 32-32 32zm0-96c-17.67 0-32-14.33-32-32s14.33-32 32-32 32 14.33 32 32-14.33 32-32 32zm192 192c-17.67 0-32-14.33-32-32s14.33-32 32-32 32 14.33 32 32-14.33 32-32 32zm0-96c-17.67 0-32-14.33-32-32s14.33-32 32-32 32 14.33 32 32-14.33 32-32 32zm0-96c-17.67 0-32-14.33-32-32s14.33-32 32-32 32 14.33 32 32-14.33 32-32 32z"]},$n={prefix:"fas",iconName:"dice-three",icon:[448,512,[],"f527","M384 32H64C28.65 32 0 60.65 0 96v320c0 35.35 28.65 64 64 64h320c35.35 0 64-28.65 64-64V96c0-35.35-28.65-64-64-64zM128 192c-17.67 0-32-14.33-32-32s14.33-32 32-32 32 14.33 32 32-14.33 32-32 32zm96 96c-17.67 0-32-14.33-32-32s14.33-32 32-32 32 14.33 32 32-14.33 32-32 32zm96 96c-17.67 0-32-14.33-32-32s14.33-32 32-32 32 14.33 32 32-14.33 32-32 32z"]},Yn={prefix:"fas",iconName:"dice-two",icon:[448,512,[],"f528","M384 32H64C28.65 32 0 60.65 0 96v320c0 35.35 28.65 64 64 64h320c35.35 0 64-28.65 64-64V96c0-35.35-28.65-64-64-64zM128 192c-17.67 0-32-14.33-32-32s14.33-32 32-32 32 14.33 32 32-14.33 32-32 32zm192 192c-17.67 0-32-14.33-32-32s14.33-32 32-32 32 14.33 32 32-14.33 32-32 32z"]},qn={prefix:"fas",iconName:"digital-tachograph",icon:[640,512,[],"f566","M608 96H32c-17.67 0-32 14.33-32 32v256c0 17.67 14.33 32 32 32h576c17.67 0 32-14.33 32-32V128c0-17.67-14.33-32-32-32zM304 352c0 4.42-3.58 8-8 8H72c-4.42 0-8-3.58-8-8v-8c0-4.42 3.58-8 8-8h224c4.42 0 8 3.58 8 8v8zM72 288v-16c0-4.42 3.58-8 8-8h16c4.42 0 8 3.58 8 8v16c0 4.42-3.58 8-8 8H80c-4.42 0-8-3.58-8-8zm64 0v-16c0-4.42 3.58-8 8-8h16c4.42 0 8 3.58 8 8v16c0 4.42-3.58 8-8 8h-16c-4.42 0-8-3.58-8-8zm64 0v-16c0-4.42 3.58-8 8-8h16c4.42 0 8 3.58 8 8v16c0 4.42-3.58 8-8 8h-16c-4.42 0-8-3.58-8-8zm64 0v-16c0-4.42 3.58-8 8-8h16c4.42 0 8 3.58 8 8v16c0 4.42-3.58 8-8 8h-16c-4.42 0-8-3.58-8-8zm40-64c0 8.84-7.16 16-16 16H80c-8.84 0-16-7.16-16-16v-48c0-8.84 7.16-16 16-16h208c8.84 0 16 7.16 16 16v48zm272 128c0 4.42-3.58 8-8 8H344c-4.42 0-8-3.58-8-8v-8c0-4.42 3.58-8 8-8h224c4.42 0 8 3.58 8 8v8z"]},Xn={prefix:"fas",iconName:"directions",icon:[512,512,[],"f5eb","M502.61 233.32L278.68 9.39c-12.52-12.52-32.83-12.52-45.36 0L9.39 233.32c-12.52 12.53-12.52 32.83 0 45.36l223.93 223.93c12.52 12.53 32.83 12.53 45.36 0l223.93-223.93c12.52-12.53 12.52-32.83 0-45.36zm-100.98 12.56l-84.21 77.73c-5.12 4.73-13.43 1.1-13.43-5.88V264h-96v64c0 4.42-3.58 8-8 8h-32c-4.42 0-8-3.58-8-8v-80c0-17.67 14.33-32 32-32h112v-53.73c0-6.97 8.3-10.61 13.43-5.88l84.21 77.73c3.43 3.17 3.43 8.59 0 11.76z"]},Zn={prefix:"fas",iconName:"disease",icon:[512,512,[],"f7fa","M472.29 195.9l-67.06-23c-19.28-6.6-33.54-20.92-38.14-38.31l-16-60.45c-11.58-43.77-76.57-57.13-110-22.62L195 99.24c-13.26 13.71-33.54 20.93-54.2 19.31l-71.9-5.62c-52-4.07-86.93 44.89-59 82.84l38.54 52.42c11.08 15.07 12.82 33.86 4.64 50.24l-28.43 57C4 396.67 47.46 440.29 98.11 429.23l70-15.28c20.11-4.39 41.45 0 57.07 11.73l54.32 40.83c39.32 29.56 101 7.57 104.45-37.22l4.7-61.86c1.35-17.8 12.8-33.87 30.63-43l62-31.74c44.84-22.96 39.55-80.17-8.99-96.79zM160 256a32 32 0 1 1 32-32 32 32 0 0 1-32 32zm128 96a32 32 0 1 1 32-32 32 32 0 0 1-32 32zm16-128a16 16 0 1 1 16-16 16 16 0 0 1-16 16z"]},Qn={prefix:"fas",iconName:"divide",icon:[448,512,[],"f529","M224 352c-35.35 0-64 28.65-64 64s28.65 64 64 64 64-28.65 64-64-28.65-64-64-64zm0-192c35.35 0 64-28.65 64-64s-28.65-64-64-64-64 28.65-64 64 28.65 64 64 64zm192 48H32c-17.67 0-32 14.33-32 32v32c0 17.67 14.33 32 32 32h384c17.67 0 32-14.33 32-32v-32c0-17.67-14.33-32-32-32z"]},Jn={prefix:"fas",iconName:"dizzy",icon:[496,512,[],"f567","M248 8C111 8 0 119 0 256s111 248 248 248 248-111 248-248S385 8 248 8zm-96 206.6l-28.7 28.7c-14.8 14.8-37.8-7.5-22.6-22.6l28.7-28.7-28.7-28.7c-15-15 7.7-37.6 22.6-22.6l28.7 28.7 28.7-28.7c15-15 37.6 7.7 22.6 22.6L174.6 192l28.7 28.7c15.2 15.2-7.9 37.4-22.6 22.6L152 214.6zM248 416c-35.3 0-64-28.7-64-64s28.7-64 64-64 64 28.7 64 64-28.7 64-64 64zm147.3-195.3c15.2 15.2-7.9 37.4-22.6 22.6L344 214.6l-28.7 28.7c-14.8 14.8-37.8-7.5-22.6-22.6l28.7-28.7-28.7-28.7c-15-15 7.7-37.6 22.6-22.6l28.7 28.7 28.7-28.7c15-15 37.6 7.7 22.6 22.6L366.6 192l28.7 28.7z"]},es={prefix:"fas",iconName:"dna",icon:[448,512,[],"f471","M.1 494.1c-1.1 9.5 6.3 17.8 15.9 17.8l32.3.1c8.1 0 14.9-5.9 16-13.9.7-4.9 1.8-11.1 3.4-18.1H380c1.6 6.9 2.9 13.2 3.5 18.1 1.1 8 7.9 14 16 13.9l32.3-.1c9.6 0 17.1-8.3 15.9-17.8-4.6-37.9-25.6-129-118.9-207.7-17.6 12.4-37.1 24.2-58.5 35.4 6.2 4.6 11.4 9.4 17 14.2H159.7c21.3-18.1 47-35.6 78.7-51.4C410.5 199.1 442.1 65.8 447.9 17.9 449 8.4 441.6.1 432 .1L399.6 0c-8.1 0-14.9 5.9-16 13.9-.7 4.9-1.8 11.1-3.4 18.1H67.8c-1.6-7-2.7-13.1-3.4-18.1-1.1-8-7.9-14-16-13.9L16.1.1C6.5.1-1 8.4.1 17.9 5.3 60.8 31.4 171.8 160 256 31.5 340.2 5.3 451.2.1 494.1zM224 219.6c-25.1-13.7-46.4-28.4-64.3-43.6h128.5c-17.8 15.2-39.1 30-64.2 43.6zM355.1 96c-5.8 10.4-12.8 21.1-21 32H114c-8.3-10.9-15.3-21.6-21-32h262.1zM92.9 416c5.8-10.4 12.8-21.1 21-32h219.4c8.3 10.9 15.4 21.6 21.2 32H92.9z"]},ts={prefix:"fas",iconName:"dog",icon:[576,512,[],"f6d3","M298.06,224,448,277.55V496a16,16,0,0,1-16,16H368a16,16,0,0,1-16-16V384H192V496a16,16,0,0,1-16,16H112a16,16,0,0,1-16-16V282.09C58.84,268.84,32,233.66,32,192a32,32,0,0,1,64,0,32.06,32.06,0,0,0,32,32ZM544,112v32a64,64,0,0,1-64,64H448v35.58L320,197.87V48c0-14.25,17.22-21.39,27.31-11.31L374.59,64h53.63c10.91,0,23.75,7.92,28.62,17.69L464,96h64A16,16,0,0,1,544,112Zm-112,0a16,16,0,1,0-16,16A16,16,0,0,0,432,112Z"]},is={prefix:"fas",iconName:"dollar-sign",icon:[288,512,[],"f155","M209.2 233.4l-108-31.6C88.7 198.2 80 186.5 80 173.5c0-16.3 13.2-29.5 29.5-29.5h66.3c12.2 0 24.2 3.7 34.2 10.5 6.1 4.1 14.3 3.1 19.5-2l34.8-34c7.1-6.9 6.1-18.4-1.8-24.5C238 74.8 207.4 64.1 176 64V16c0-8.8-7.2-16-16-16h-32c-8.8 0-16 7.2-16 16v48h-2.5C45.8 64-5.4 118.7.5 183.6c4.2 46.1 39.4 83.6 83.8 96.6l102.5 30c12.5 3.7 21.2 15.3 21.2 28.3 0 16.3-13.2 29.5-29.5 29.5h-66.3C100 368 88 364.3 78 357.5c-6.1-4.1-14.3-3.1-19.5 2l-34.8 34c-7.1 6.9-6.1 18.4 1.8 24.5 24.5 19.2 55.1 29.9 86.5 30v48c0 8.8 7.2 16 16 16h32c8.8 0 16-7.2 16-16v-48.2c46.6-.9 90.3-28.6 105.7-72.7 21.5-61.6-14.6-124.8-72.5-141.7z"]},ns={prefix:"fas",iconName:"dolly",icon:[576,512,[],"f472","M294.2 277.7c18 5 34.7 13.4 49.5 24.7l161.5-53.8c8.4-2.8 12.9-11.9 10.1-20.2L454.9 47.2c-2.8-8.4-11.9-12.9-20.2-10.1l-61.1 20.4 33.1 99.4L346 177l-33.1-99.4-61.6 20.5c-8.4 2.8-12.9 11.9-10.1 20.2l53 159.4zm281 48.7L565 296c-2.8-8.4-11.9-12.9-20.2-10.1l-213.5 71.2c-17.2-22-43.6-36.4-73.5-37L158.4 21.9C154 8.8 141.8 0 128 0H16C7.2 0 0 7.2 0 16v32c0 8.8 7.2 16 16 16h88.9l92.2 276.7c-26.1 20.4-41.7 53.6-36 90.5 6.1 39.4 37.9 72.3 77.3 79.2 60.2 10.7 112.3-34.8 113.4-92.6l213.3-71.2c8.3-2.8 12.9-11.8 10.1-20.2zM256 464c-26.5 0-48-21.5-48-48s21.5-48 48-48 48 21.5 48 48-21.5 48-48 48z"]},ss={prefix:"fas",iconName:"dolly-flatbed",icon:[640,512,[],"f474","M208 320h384c8.8 0 16-7.2 16-16V48c0-8.8-7.2-16-16-16H448v128l-48-32-48 32V32H208c-8.8 0-16 7.2-16 16v256c0 8.8 7.2 16 16 16zm416 64H128V16c0-8.8-7.2-16-16-16H16C7.2 0 0 7.2 0 16v32c0 8.8 7.2 16 16 16h48v368c0 8.8 7.2 16 16 16h82.9c-1.8 5-2.9 10.4-2.9 16 0 26.5 21.5 48 48 48s48-21.5 48-48c0-5.6-1.2-11-2.9-16H451c-1.8 5-2.9 10.4-2.9 16 0 26.5 21.5 48 48 48s48-21.5 48-48c0-5.6-1.2-11-2.9-16H624c8.8 0 16-7.2 16-16v-32c0-8.8-7.2-16-16-16z"]},rs={prefix:"fas",iconName:"donate",icon:[512,512,[],"f4b9","M256 416c114.9 0 208-93.1 208-208S370.9 0 256 0 48 93.1 48 208s93.1 208 208 208zM233.8 97.4V80.6c0-9.2 7.4-16.6 16.6-16.6h11.1c9.2 0 16.6 7.4 16.6 16.6v17c15.5.8 30.5 6.1 43 15.4 5.6 4.1 6.2 12.3 1.2 17.1L306 145.6c-3.8 3.7-9.5 3.8-14 1-5.4-3.4-11.4-5.1-17.8-5.1h-38.9c-9 0-16.3 8.2-16.3 18.3 0 8.2 5 15.5 12.1 17.6l62.3 18.7c25.7 7.7 43.7 32.4 43.7 60.1 0 34-26.4 61.5-59.1 62.4v16.8c0 9.2-7.4 16.6-16.6 16.6h-11.1c-9.2 0-16.6-7.4-16.6-16.6v-17c-15.5-.8-30.5-6.1-43-15.4-5.6-4.1-6.2-12.3-1.2-17.1l16.3-15.5c3.8-3.7 9.5-3.8 14-1 5.4 3.4 11.4 5.1 17.8 5.1h38.9c9 0 16.3-8.2 16.3-18.3 0-8.2-5-15.5-12.1-17.6l-62.3-18.7c-25.7-7.7-43.7-32.4-43.7-60.1.1-34 26.4-61.5 59.1-62.4zM480 352h-32.5c-19.6 26-44.6 47.7-73 64h63.8c5.3 0 9.6 3.6 9.6 8v16c0 4.4-4.3 8-9.6 8H73.6c-5.3 0-9.6-3.6-9.6-8v-16c0-4.4 4.3-8 9.6-8h63.8c-28.4-16.3-53.3-38-73-64H32c-17.7 0-32 14.3-32 32v96c0 17.7 14.3 32 32 32h448c17.7 0 32-14.3 32-32v-96c0-17.7-14.3-32-32-32z"]},os={prefix:"fas",iconName:"door-closed",icon:[640,512,[],"f52a","M624 448H512V50.8C512 22.78 490.47 0 464 0H175.99c-26.47 0-48 22.78-48 50.8V448H16c-8.84 0-16 7.16-16 16v32c0 8.84 7.16 16 16 16h608c8.84 0 16-7.16 16-16v-32c0-8.84-7.16-16-16-16zM415.99 288c-17.67 0-32-14.33-32-32s14.33-32 32-32 32 14.33 32 32c.01 17.67-14.32 32-32 32z"]},as={prefix:"fas",iconName:"door-open",icon:[640,512,[],"f52b","M624 448h-80V113.45C544 86.19 522.47 64 496 64H384v64h96v384h144c8.84 0 16-7.16 16-16v-32c0-8.84-7.16-16-16-16zM312.24 1.01l-192 49.74C105.99 54.44 96 67.7 96 82.92V448H16c-8.84 0-16 7.16-16 16v32c0 8.84 7.16 16 16 16h336V33.18c0-21.58-19.56-37.41-39.76-32.17zM264 288c-13.25 0-24-14.33-24-32s10.75-32 24-32 24 14.33 24 32-10.75 32-24 32z"]},ls={prefix:"fas",iconName:"dot-circle",icon:[512,512,[],"f192","M256 8C119.033 8 8 119.033 8 256s111.033 248 248 248 248-111.033 248-248S392.967 8 256 8zm80 248c0 44.112-35.888 80-80 80s-80-35.888-80-80 35.888-80 80-80 80 35.888 80 80z"]},cs={prefix:"fas",iconName:"dove",icon:[512,512,[],"f4ba","M288 167.2v-28.1c-28.2-36.3-47.1-79.3-54.1-125.2-2.1-13.5-19-18.8-27.8-8.3-21.1 24.9-37.7 54.1-48.9 86.5 34.2 38.3 80 64.6 130.8 75.1zM400 64c-44.2 0-80 35.9-80 80.1v59.4C215.6 197.3 127 133 87 41.8c-5.5-12.5-23.2-13.2-29-.9C41.4 76 32 115.2 32 156.6c0 70.8 34.1 136.9 85.1 185.9 13.2 12.7 26.1 23.2 38.9 32.8l-143.9 36C1.4 414-3.4 426.4 2.6 435.7 20 462.6 63 508.2 155.8 512c8 .3 16-2.6 22.1-7.9l65.2-56.1H320c88.4 0 160-71.5 160-159.9V128l32-64H400zm0 96.1c-8.8 0-16-7.2-16-16s7.2-16 16-16 16 7.2 16 16-7.2 16-16 16z"]},hs={prefix:"fas",iconName:"download",icon:[512,512,[],"f019","M216 0h80c13.3 0 24 10.7 24 24v168h87.7c17.8 0 26.7 21.5 14.1 34.1L269.7 378.3c-7.5 7.5-19.8 7.5-27.3 0L90.1 226.1c-12.6-12.6-3.7-34.1 14.1-34.1H192V24c0-13.3 10.7-24 24-24zm296 376v112c0 13.3-10.7 24-24 24H24c-13.3 0-24-10.7-24-24V376c0-13.3 10.7-24 24-24h146.7l49 49c20.1 20.1 52.5 20.1 72.6 0l49-49H488c13.3 0 24 10.7 24 24zm-124 88c0-11-9-20-20-20s-20 9-20 20 9 20 20 20 20-9 20-20zm64 0c0-11-9-20-20-20s-20 9-20 20 9 20 20 20 20-9 20-20z"]},ds={prefix:"fas",iconName:"drafting-compass",icon:[512,512,[],"f568","M457.01 344.42c-25.05 20.33-52.63 37.18-82.54 49.05l54.38 94.19 53.95 23.04c9.81 4.19 20.89-2.21 22.17-12.8l7.02-58.25-54.98-95.23zm42.49-94.56c4.86-7.67 1.89-17.99-6.05-22.39l-28.07-15.57c-7.48-4.15-16.61-1.46-21.26 5.72C403.01 281.15 332.25 320 256 320c-23.93 0-47.23-4.25-69.41-11.53l67.36-116.68c.7.02 1.34.21 2.04.21s1.35-.19 2.04-.21l51.09 88.5c31.23-8.96 59.56-25.75 82.61-48.92l-51.79-89.71C347.39 128.03 352 112.63 352 96c0-53.02-42.98-96-96-96s-96 42.98-96 96c0 16.63 4.61 32.03 12.05 45.66l-68.3 118.31c-12.55-11.61-23.96-24.59-33.68-39-4.79-7.1-13.97-9.62-21.38-5.33l-27.75 16.07c-7.85 4.54-10.63 14.9-5.64 22.47 15.57 23.64 34.69 44.21 55.98 62.02L0 439.66l7.02 58.25c1.28 10.59 12.36 16.99 22.17 12.8l53.95-23.04 70.8-122.63C186.13 377.28 220.62 384 256 384c99.05 0 190.88-51.01 243.5-134.14zM256 64c17.67 0 32 14.33 32 32s-14.33 32-32 32-32-14.33-32-32 14.33-32 32-32z"]},us={prefix:"fas",iconName:"dragon",icon:[640,512,[],"f6d5","M18.32 255.78L192 223.96l-91.28 68.69c-10.08 10.08-2.94 27.31 11.31 27.31h222.7c-9.44-26.4-14.73-54.47-14.73-83.38v-42.27l-119.73-87.6c-23.82-15.88-55.29-14.01-77.06 4.59L5.81 227.64c-12.38 10.33-3.45 30.42 12.51 28.14zm556.87 34.1l-100.66-50.31A47.992 47.992 0 0 1 448 196.65v-36.69h64l28.09 22.63c6 6 14.14 9.37 22.63 9.37h30.97a32 32 0 0 0 28.62-17.69l14.31-28.62a32.005 32.005 0 0 0-3.02-33.51l-74.53-99.38C553.02 4.7 543.54 0 533.47 0H296.02c-7.13 0-10.7 8.57-5.66 13.61L352 63.96 292.42 88.8c-5.9 2.95-5.9 11.36 0 14.31L352 127.96v108.62c0 72.08 36.03 139.39 96 179.38-195.59 6.81-344.56 41.01-434.1 60.91C5.78 478.67 0 485.88 0 494.2 0 504 7.95 512 17.76 512h499.08c63.29.01 119.61-47.56 122.99-110.76 2.52-47.28-22.73-90.4-64.64-111.36zM489.18 66.25l45.65 11.41c-2.75 10.91-12.47 18.89-24.13 18.26-12.96-.71-25.85-12.53-21.52-29.67z"]},ps={prefix:"fas",iconName:"draw-polygon",icon:[448,512,[],"f5ee","M384 352c-.35 0-.67.1-1.02.1l-39.2-65.32c5.07-9.17 8.22-19.56 8.22-30.78s-3.14-21.61-8.22-30.78l39.2-65.32c.35.01.67.1 1.02.1 35.35 0 64-28.65 64-64s-28.65-64-64-64c-23.63 0-44.04 12.95-55.12 32H119.12C108.04 44.95 87.63 32 64 32 28.65 32 0 60.65 0 96c0 23.63 12.95 44.04 32 55.12v209.75C12.95 371.96 0 392.37 0 416c0 35.35 28.65 64 64 64 23.63 0 44.04-12.95 55.12-32h209.75c11.09 19.05 31.49 32 55.12 32 35.35 0 64-28.65 64-64 .01-35.35-28.64-64-63.99-64zm-288 8.88V151.12A63.825 63.825 0 0 0 119.12 128h208.36l-38.46 64.1c-.35-.01-.67-.1-1.02-.1-35.35 0-64 28.65-64 64s28.65 64 64 64c.35 0 .67-.1 1.02-.1l38.46 64.1H119.12A63.748 63.748 0 0 0 96 360.88zM272 256c0-8.82 7.18-16 16-16s16 7.18 16 16-7.18 16-16 16-16-7.18-16-16zM400 96c0 8.82-7.18 16-16 16s-16-7.18-16-16 7.18-16 16-16 16 7.18 16 16zM64 80c8.82 0 16 7.18 16 16s-7.18 16-16 16-16-7.18-16-16 7.18-16 16-16zM48 416c0-8.82 7.18-16 16-16s16 7.18 16 16-7.18 16-16 16-16-7.18-16-16zm336 16c-8.82 0-16-7.18-16-16s7.18-16 16-16 16 7.18 16 16-7.18 16-16 16z"]},gs={prefix:"fas",iconName:"drum",icon:[512,512,[],"f569","M431.34 122.05l73.53-47.42a16 16 0 0 0 4.44-22.19l-8.87-13.31a16 16 0 0 0-22.19-4.44l-110.06 71C318.43 96.91 271.22 96 256 96 219.55 96 0 100.55 0 208.15v160.23c0 30.27 27.5 57.68 72 77.86v-101.9a24 24 0 1 1 48 0v118.93c33.05 9.11 71.07 15.06 112 16.73V376.39a24 24 0 1 1 48 0V480c40.93-1.67 78.95-7.62 112-16.73V344.34a24 24 0 1 1 48 0v101.9c44.5-20.18 72-47.59 72-77.86V208.15c0-43.32-35.76-69.76-80.66-86.1zM256 272.24c-114.88 0-208-28.69-208-64.09s93.12-64.08 208-64.08c17.15 0 33.73.71 49.68 1.91l-72.81 47a16 16 0 0 0-4.43 22.19l8.87 13.31a16 16 0 0 0 22.19 4.44l118.64-76.52C430.09 168 464 186.84 464 208.15c0 35.4-93.13 64.09-208 64.09z"]},fs={prefix:"fas",iconName:"drum-steelpan",icon:[576,512,[],"f56a","M288 32C128.94 32 0 89.31 0 160v192c0 70.69 128.94 128 288 128s288-57.31 288-128V160c0-70.69-128.94-128-288-128zm-82.99 158.36c-4.45 16.61-14.54 30.57-28.31 40.48C100.23 217.46 48 190.78 48 160c0-30.16 50.11-56.39 124.04-70.03l25.6 44.34c9.86 17.09 12.48 36.99 7.37 56.05zM288 240c-21.08 0-41.41-1-60.89-2.7 8.06-26.13 32.15-45.3 60.89-45.3s52.83 19.17 60.89 45.3C329.41 239 309.08 240 288 240zm64-144c0 35.29-28.71 64-64 64s-64-28.71-64-64V82.96c20.4-1.88 41.8-2.96 64-2.96s43.6 1.08 64 2.96V96zm46.93 134.9c-13.81-9.91-23.94-23.9-28.4-40.54-5.11-19.06-2.49-38.96 7.38-56.04l25.65-44.42C477.72 103.5 528 129.79 528 160c0 30.83-52.4 57.54-129.07 70.9z"]},ms={prefix:"fas",iconName:"drumstick-bite",icon:[512,512,[],"f6d7","M462.8 49.57a169.44 169.44 0 0 0-239.5 0C187.82 85 160.13 128 160.13 192v85.83l-40.62 40.59c-9.7 9.69-24 11.07-36.78 6a60.33 60.33 0 0 0-65 98.72C33 438.39 54.24 442.7 73.85 438.21c-4.5 19.6-.18 40.83 15.1 56.1a60.35 60.35 0 0 0 98.8-65c-5.09-12.73-3.72-27 6-36.75L234.36 352h85.89a187.87 187.87 0 0 0 61.89-10c-39.64-43.89-39.83-110.23 1.05-151.07 34.38-34.36 86.76-39.46 128.74-16.8 1.3-44.96-14.81-90.28-49.13-124.56z"]},vs={prefix:"fas",iconName:"dumbbell",icon:[640,512,[],"f44b","M104 96H56c-13.3 0-24 10.7-24 24v104H8c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8h24v104c0 13.3 10.7 24 24 24h48c13.3 0 24-10.7 24-24V120c0-13.3-10.7-24-24-24zm528 128h-24V120c0-13.3-10.7-24-24-24h-48c-13.3 0-24 10.7-24 24v272c0 13.3 10.7 24 24 24h48c13.3 0 24-10.7 24-24V288h24c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8zM456 32h-48c-13.3 0-24 10.7-24 24v168H256V56c0-13.3-10.7-24-24-24h-48c-13.3 0-24 10.7-24 24v400c0 13.3 10.7 24 24 24h48c13.3 0 24-10.7 24-24V288h128v168c0 13.3 10.7 24 24 24h48c13.3 0 24-10.7 24-24V56c0-13.3-10.7-24-24-24z"]},ys={prefix:"fas",iconName:"dumpster",icon:[576,512,[],"f793","M560 160c10.4 0 18-9.8 15.5-19.9l-24-96C549.7 37 543.3 32 536 32h-98.9l25.6 128H560zM272 32H171.5l-25.6 128H272V32zm132.5 0H304v128h126.1L404.5 32zM16 160h97.3l25.6-128H40c-7.3 0-13.7 5-15.5 12.1l-24 96C-2 150.2 5.6 160 16 160zm544 64h-20l4-32H32l4 32H16c-8.8 0-16 7.2-16 16v32c0 8.8 7.2 16 16 16h28l20 160v16c0 8.8 7.2 16 16 16h32c8.8 0 16-7.2 16-16v-16h320v16c0 8.8 7.2 16 16 16h32c8.8 0 16-7.2 16-16v-16l20-160h28c8.8 0 16-7.2 16-16v-32c0-8.8-7.2-16-16-16z"]},Cs={prefix:"fas",iconName:"dumpster-fire",icon:[640,512,[],"f794","M418.7 104.1l.2-.2-14.4-72H304v128h60.8c16.2-19.3 34.2-38.2 53.9-55.8zM272 32H171.5l-25.6 128H272V32zm189.3 72.1c18.2 16.3 35.5 33.7 51.1 51.5 5.7-5.6 11.4-11.1 17.3-16.3l21.3-19 21.3 19c1.1.9 2.1 2.1 3.1 3.1-.1-.8.2-1.5 0-2.3l-24-96C549.7 37 543.3 32 536 32h-98.9l12.3 61.5 11.9 10.6zM16 160h97.3l25.6-128H40c-7.3 0-13.7 5-15.5 12.1l-24 96C-2 150.2 5.6 160 16 160zm324.6 32H32l4 32H16c-8.8 0-16 7.2-16 16v32c0 8.8 7.2 16 16 16h28l20 160v16c0 8.8 7.2 16 16 16h32c8.8 0 16-7.2 16-16v-16h208.8c-30.2-33.7-48.8-77.9-48.8-126.4 0-35.9 19.9-82.9 52.6-129.6zm210.5-28.8c-14.9 13.3-28.3 27.2-40.2 41.2-19.5-25.8-43.6-52-71-76.4-70.2 62.7-120 144.3-120 193.6 0 87.5 71.6 158.4 160 158.4s160-70.9 160-158.4c.1-36.6-37-112.2-88.8-158.4zm-18.6 229.4c-14.7 10.7-32.9 17-52.5 17-49 0-88.9-33.5-88.9-88 0-27.1 16.5-51 49.4-91.9 4.7 5.6 67.1 88.1 67.1 88.1l39.8-47c2.8 4.8 5.4 9.5 7.7 14 18.6 36.7 10.8 83.6-22.6 107.8z"]},bs={prefix:"fas",iconName:"dungeon",icon:[512,512,[],"f6d9","M128.73 195.32l-82.81-51.76c-8.04-5.02-18.99-2.17-22.93 6.45A254.19 254.19 0 0 0 .54 239.28C-.05 248.37 7.59 256 16.69 256h97.13c7.96 0 14.08-6.25 15.01-14.16 1.09-9.33 3.24-18.33 6.24-26.94 2.56-7.34.25-15.46-6.34-19.58zM319.03 8C298.86 2.82 277.77 0 256 0s-42.86 2.82-63.03 8c-9.17 2.35-13.91 12.6-10.39 21.39l37.47 104.03A16.003 16.003 0 0 0 235.1 144h41.8c6.75 0 12.77-4.23 15.05-10.58l37.47-104.03c3.52-8.79-1.22-19.03-10.39-21.39zM112 288H16c-8.84 0-16 7.16-16 16v64c0 8.84 7.16 16 16 16h96c8.84 0 16-7.16 16-16v-64c0-8.84-7.16-16-16-16zm0 128H16c-8.84 0-16 7.16-16 16v64c0 8.84 7.16 16 16 16h96c8.84 0 16-7.16 16-16v-64c0-8.84-7.16-16-16-16zm77.31-283.67l-36.32-90.8c-3.53-8.83-14.13-12.99-22.42-8.31a257.308 257.308 0 0 0-71.61 59.89c-6.06 7.32-3.85 18.48 4.22 23.52l82.93 51.83c6.51 4.07 14.66 2.62 20.11-2.79 5.18-5.15 10.79-9.85 16.79-14.05 6.28-4.41 9.15-12.17 6.3-19.29zM398.18 256h97.13c9.1 0 16.74-7.63 16.15-16.72a254.135 254.135 0 0 0-22.45-89.27c-3.94-8.62-14.89-11.47-22.93-6.45l-82.81 51.76c-6.59 4.12-8.9 12.24-6.34 19.58 3.01 8.61 5.15 17.62 6.24 26.94.93 7.91 7.05 14.16 15.01 14.16zm54.85-162.89a257.308 257.308 0 0 0-71.61-59.89c-8.28-4.68-18.88-.52-22.42 8.31l-36.32 90.8c-2.85 7.12.02 14.88 6.3 19.28 6 4.2 11.61 8.9 16.79 14.05 5.44 5.41 13.6 6.86 20.11 2.79l82.93-51.83c8.07-5.03 10.29-16.19 4.22-23.51zM496 288h-96c-8.84 0-16 7.16-16 16v64c0 8.84 7.16 16 16 16h96c8.84 0 16-7.16 16-16v-64c0-8.84-7.16-16-16-16zm0 128h-96c-8.84 0-16 7.16-16 16v64c0 8.84 7.16 16 16 16h96c8.84 0 16-7.16 16-16v-64c0-8.84-7.16-16-16-16zM240 177.62V472c0 4.42 3.58 8 8 8h16c4.42 0 8-3.58 8-8V177.62c-5.23-.89-10.52-1.62-16-1.62s-10.77.73-16 1.62zm-64 41.51V472c0 4.42 3.58 8 8 8h16c4.42 0 8-3.58 8-8V189.36c-12.78 7.45-23.84 17.47-32 29.77zm128-29.77V472c0 4.42 3.58 8 8 8h16c4.42 0 8-3.58 8-8V219.13c-8.16-12.3-19.22-22.32-32-29.77z"]},Ss={prefix:"fas",iconName:"edit",icon:[576,512,[],"f044","M402.6 83.2l90.2 90.2c3.8 3.8 3.8 10 0 13.8L274.4 405.6l-92.8 10.3c-12.4 1.4-22.9-9.1-21.5-21.5l10.3-92.8L388.8 83.2c3.8-3.8 10-3.8 13.8 0zm162-22.9l-48.8-48.8c-15.2-15.2-39.9-15.2-55.2 0l-35.4 35.4c-3.8 3.8-3.8 10 0 13.8l90.2 90.2c3.8 3.8 10 3.8 13.8 0l35.4-35.4c15.2-15.3 15.2-40 0-55.2zM384 346.2V448H64V128h229.8c3.2 0 6.2-1.3 8.5-3.5l40-40c7.6-7.6 2.2-20.5-8.5-20.5H48C21.5 64 0 85.5 0 112v352c0 26.5 21.5 48 48 48h352c26.5 0 48-21.5 48-48V306.2c0-10.7-12.9-16-20.5-8.5l-40 40c-2.2 2.3-3.5 5.3-3.5 8.5z"]},ws={prefix:"fas",iconName:"egg",icon:[384,512,[],"f7fb","M192 0C86 0 0 214 0 320s86 192 192 192 192-86 192-192S298 0 192 0z"]},xs={prefix:"fas",iconName:"eject",icon:[448,512,[],"f052","M448 384v64c0 17.673-14.327 32-32 32H32c-17.673 0-32-14.327-32-32v-64c0-17.673 14.327-32 32-32h384c17.673 0 32 14.327 32 32zM48.053 320h351.886c41.651 0 63.581-49.674 35.383-80.435L259.383 47.558c-19.014-20.743-51.751-20.744-70.767 0L12.67 239.565C-15.475 270.268 6.324 320 48.053 320z"]},Es={prefix:"fas",iconName:"ellipsis-h",icon:[512,512,[],"f141","M328 256c0 39.8-32.2 72-72 72s-72-32.2-72-72 32.2-72 72-72 72 32.2 72 72zm104-72c-39.8 0-72 32.2-72 72s32.2 72 72 72 72-32.2 72-72-32.2-72-72-72zm-352 0c-39.8 0-72 32.2-72 72s32.2 72 72 72 72-32.2 72-72-32.2-72-72-72z"]},Ms={prefix:"fas",iconName:"ellipsis-v",icon:[192,512,[],"f142","M96 184c39.8 0 72 32.2 72 72s-32.2 72-72 72-72-32.2-72-72 32.2-72 72-72zM24 80c0 39.8 32.2 72 72 72s72-32.2 72-72S135.8 8 96 8 24 40.2 24 80zm0 352c0 39.8 32.2 72 72 72s72-32.2 72-72-32.2-72-72-72-72 32.2-72 72z"]},As={prefix:"fas",iconName:"envelope",icon:[512,512,[],"f0e0","M502.3 190.8c3.9-3.1 9.7-.2 9.7 4.7V400c0 26.5-21.5 48-48 48H48c-26.5 0-48-21.5-48-48V195.6c0-5 5.7-7.8 9.7-4.7 22.4 17.4 52.1 39.5 154.1 113.6 21.1 15.4 56.7 47.8 92.2 47.6 35.7.3 72-32.8 92.3-47.6 102-74.1 131.6-96.3 154-113.7zM256 320c23.2.4 56.6-29.2 73.4-41.4 132.7-96.3 142.8-104.7 173.4-128.7 5.8-4.5 9.2-11.5 9.2-18.9v-19c0-26.5-21.5-48-48-48H48C21.5 64 0 85.5 0 112v19c0 7.4 3.4 14.3 9.2 18.9 30.6 23.9 40.7 32.4 173.4 128.7 16.8 12.2 50.2 41.8 73.4 41.4z"]},Ts={prefix:"fas",iconName:"envelope-open",icon:[512,512,[],"f2b6","M512 464c0 26.51-21.49 48-48 48H48c-26.51 0-48-21.49-48-48V200.724a48 48 0 0 1 18.387-37.776c24.913-19.529 45.501-35.365 164.2-121.511C199.412 29.17 232.797-.347 256 .003c23.198-.354 56.596 29.172 73.413 41.433 118.687 86.137 139.303 101.995 164.2 121.512A48 48 0 0 1 512 200.724V464zm-65.666-196.605c-2.563-3.728-7.7-4.595-11.339-1.907-22.845 16.873-55.462 40.705-105.582 77.079-16.825 12.266-50.21 41.781-73.413 41.43-23.211.344-56.559-29.143-73.413-41.43-50.114-36.37-82.734-60.204-105.582-77.079-3.639-2.688-8.776-1.821-11.339 1.907l-9.072 13.196a7.998 7.998 0 0 0 1.839 10.967c22.887 16.899 55.454 40.69 105.303 76.868 20.274 14.781 56.524 47.813 92.264 47.573 35.724.242 71.961-32.771 92.263-47.573 49.85-36.179 82.418-59.97 105.303-76.868a7.998 7.998 0 0 0 1.839-10.967l-9.071-13.196z"]},Ds={prefix:"fas",iconName:"envelope-open-text",icon:[512,512,[],"f658","M176 216h160c8.84 0 16-7.16 16-16v-16c0-8.84-7.16-16-16-16H176c-8.84 0-16 7.16-16 16v16c0 8.84 7.16 16 16 16zm-16 80c0 8.84 7.16 16 16 16h160c8.84 0 16-7.16 16-16v-16c0-8.84-7.16-16-16-16H176c-8.84 0-16 7.16-16 16v16zm96 121.13c-16.42 0-32.84-5.06-46.86-15.19L0 250.86V464c0 26.51 21.49 48 48 48h416c26.51 0 48-21.49 48-48V250.86L302.86 401.94c-14.02 10.12-30.44 15.19-46.86 15.19zm237.61-254.18c-8.85-6.94-17.24-13.47-29.61-22.81V96c0-26.51-21.49-48-48-48h-77.55c-3.04-2.2-5.87-4.26-9.04-6.56C312.6 29.17 279.2-.35 256 0c-23.2-.35-56.59 29.17-73.41 41.44-3.17 2.3-6 4.36-9.04 6.56H96c-26.51 0-48 21.49-48 48v44.14c-12.37 9.33-20.76 15.87-29.61 22.81A47.995 47.995 0 0 0 0 200.72v10.65l96 69.35V96h320v184.72l96-69.35v-10.65c0-14.74-6.78-28.67-18.39-37.77z"]},Is={prefix:"fas",iconName:"envelope-square",icon:[448,512,[],"f199","M400 32H48C21.49 32 0 53.49 0 80v352c0 26.51 21.49 48 48 48h352c26.51 0 48-21.49 48-48V80c0-26.51-21.49-48-48-48zM178.117 262.104C87.429 196.287 88.353 196.121 64 177.167V152c0-13.255 10.745-24 24-24h272c13.255 0 24 10.745 24 24v25.167c-24.371 18.969-23.434 19.124-114.117 84.938-10.5 7.655-31.392 26.12-45.883 25.894-14.503.218-35.367-18.227-45.883-25.895zM384 217.775V360c0 13.255-10.745 24-24 24H88c-13.255 0-24-10.745-24-24V217.775c13.958 10.794 33.329 25.236 95.303 70.214 14.162 10.341 37.975 32.145 64.694 32.01 26.887.134 51.037-22.041 64.72-32.025 61.958-44.965 81.325-59.406 95.283-70.199z"]},Rs={prefix:"fas",iconName:"equals",icon:[448,512,[],"f52c","M416 304H32c-17.67 0-32 14.33-32 32v32c0 17.67 14.33 32 32 32h384c17.67 0 32-14.33 32-32v-32c0-17.67-14.33-32-32-32zm0-192H32c-17.67 0-32 14.33-32 32v32c0 17.67 14.33 32 32 32h384c17.67 0 32-14.33 32-32v-32c0-17.67-14.33-32-32-32z"]},Ls={prefix:"fas",iconName:"eraser",icon:[512,512,[],"f12d","M497.941 273.941c18.745-18.745 18.745-49.137 0-67.882l-160-160c-18.745-18.745-49.136-18.746-67.883 0l-256 256c-18.745 18.745-18.745 49.137 0 67.882l96 96A48.004 48.004 0 0 0 144 480h356c6.627 0 12-5.373 12-12v-40c0-6.627-5.373-12-12-12H355.883l142.058-142.059zm-302.627-62.627l137.373 137.373L265.373 416H150.628l-80-80 124.686-124.686z"]},ks={prefix:"fas",iconName:"ethernet",icon:[512,512,[],"f796","M496 192h-48v-48c0-8.8-7.2-16-16-16h-48V80c0-8.8-7.2-16-16-16H144c-8.8 0-16 7.2-16 16v48H80c-8.8 0-16 7.2-16 16v48H16c-8.8 0-16 7.2-16 16v224c0 8.8 7.2 16 16 16h80V320h32v128h64V320h32v128h64V320h32v128h64V320h32v128h80c8.8 0 16-7.2 16-16V208c0-8.8-7.2-16-16-16z"]},Ps={prefix:"fas",iconName:"euro-sign",icon:[320,512,[],"f153","M310.706 413.765c-1.314-6.63-7.835-10.872-14.424-9.369-10.692 2.439-27.422 5.413-45.426 5.413-56.763 0-101.929-34.79-121.461-85.449h113.689a12 12 0 0 0 11.708-9.369l6.373-28.36c1.686-7.502-4.019-14.631-11.708-14.631H115.22c-1.21-14.328-1.414-28.287.137-42.245H261.95a12 12 0 0 0 11.723-9.434l6.512-29.755c1.638-7.484-4.061-14.566-11.723-14.566H130.184c20.633-44.991 62.69-75.03 117.619-75.03 14.486 0 28.564 2.25 37.851 4.145 6.216 1.268 12.347-2.498 14.002-8.623l11.991-44.368c1.822-6.741-2.465-13.616-9.326-14.917C290.217 34.912 270.71 32 249.635 32 152.451 32 74.03 92.252 45.075 176H12c-6.627 0-12 5.373-12 12v29.755c0 6.627 5.373 12 12 12h21.569c-1.009 13.607-1.181 29.287-.181 42.245H12c-6.627 0-12 5.373-12 12v28.36c0 6.627 5.373 12 12 12h30.114C67.139 414.692 145.264 480 249.635 480c26.301 0 48.562-4.544 61.101-7.788 6.167-1.595 10.027-7.708 8.788-13.957l-8.818-44.49z"]},Ns={prefix:"fas",iconName:"exchange-alt",icon:[512,512,[],"f362","M0 168v-16c0-13.255 10.745-24 24-24h360V80c0-21.367 25.899-32.042 40.971-16.971l80 80c9.372 9.373 9.372 24.569 0 33.941l-80 80C409.956 271.982 384 261.456 384 240v-48H24c-13.255 0-24-10.745-24-24zm488 152H128v-48c0-21.314-25.862-32.08-40.971-16.971l-80 80c-9.372 9.373-9.372 24.569 0 33.941l80 80C102.057 463.997 128 453.437 128 432v-48h360c13.255 0 24-10.745 24-24v-16c0-13.255-10.745-24-24-24z"]},Os={prefix:"fas",iconName:"exclamation",icon:[192,512,[],"f12a","M176 432c0 44.112-35.888 80-80 80s-80-35.888-80-80 35.888-80 80-80 80 35.888 80 80zM25.26 25.199l13.6 272C39.499 309.972 50.041 320 62.83 320h66.34c12.789 0 23.331-10.028 23.97-22.801l13.6-272C167.425 11.49 156.496 0 142.77 0H49.23C35.504 0 24.575 11.49 25.26 25.199z"]},_s={prefix:"fas",iconName:"exclamation-circle",icon:[512,512,[],"f06a","M504 256c0 136.997-111.043 248-248 248S8 392.997 8 256C8 119.083 119.043 8 256 8s248 111.083 248 248zm-248 50c-25.405 0-46 20.595-46 46s20.595 46 46 46 46-20.595 46-46-20.595-46-46-46zm-43.673-165.346l7.418 136c.347 6.364 5.609 11.346 11.982 11.346h48.546c6.373 0 11.635-4.982 11.982-11.346l7.418-136c.375-6.874-5.098-12.654-11.982-12.654h-63.383c-6.884 0-12.356 5.78-11.981 12.654z"]},Fs={prefix:"fas",iconName:"exclamation-triangle",icon:[576,512,[],"f071","M569.517 440.013C587.975 472.007 564.806 512 527.94 512H48.054c-36.937 0-59.999-40.055-41.577-71.987L246.423 23.985c18.467-32.009 64.72-31.951 83.154 0l239.94 416.028zM288 354c-25.405 0-46 20.595-46 46s20.595 46 46 46 46-20.595 46-46-20.595-46-46-46zm-43.673-165.346l7.418 136c.347 6.364 5.609 11.346 11.982 11.346h48.546c6.373 0 11.635-4.982 11.982-11.346l7.418-136c.375-6.874-5.098-12.654-11.982-12.654h-63.383c-6.884 0-12.356 5.78-11.981 12.654z"]},Gs={prefix:"fas",iconName:"expand",icon:[448,512,[],"f065","M0 180V56c0-13.3 10.7-24 24-24h124c6.6 0 12 5.4 12 12v40c0 6.6-5.4 12-12 12H64v84c0 6.6-5.4 12-12 12H12c-6.6 0-12-5.4-12-12zM288 44v40c0 6.6 5.4 12 12 12h84v84c0 6.6 5.4 12 12 12h40c6.6 0 12-5.4 12-12V56c0-13.3-10.7-24-24-24H300c-6.6 0-12 5.4-12 12zm148 276h-40c-6.6 0-12 5.4-12 12v84h-84c-6.6 0-12 5.4-12 12v40c0 6.6 5.4 12 12 12h124c13.3 0 24-10.7 24-24V332c0-6.6-5.4-12-12-12zM160 468v-40c0-6.6-5.4-12-12-12H64v-84c0-6.6-5.4-12-12-12H12c-6.6 0-12 5.4-12 12v124c0 13.3 10.7 24 24 24h124c6.6 0 12-5.4 12-12z"]},Vs={prefix:"fas",iconName:"expand-alt",icon:[448,512,[],"f424","M212.686 315.314L120 408l32.922 31.029c15.12 15.12 4.412 40.971-16.97 40.971h-112C10.697 480 0 469.255 0 456V344c0-21.382 25.803-32.09 40.922-16.971L72 360l92.686-92.686c6.248-6.248 16.379-6.248 22.627 0l25.373 25.373c6.249 6.248 6.249 16.378 0 22.627zm22.628-118.628L328 104l-32.922-31.029C279.958 57.851 290.666 32 312.048 32h112C437.303 32 448 42.745 448 56v112c0 21.382-25.803 32.09-40.922 16.971L376 152l-92.686 92.686c-6.248 6.248-16.379 6.248-22.627 0l-25.373-25.373c-6.249-6.248-6.249-16.378 0-22.627z"]},Bs={prefix:"fas",iconName:"expand-arrows-alt",icon:[448,512,[],"f31e","M448 344v112a23.94 23.94 0 0 1-24 24H312c-21.39 0-32.09-25.9-17-41l36.2-36.2L224 295.6 116.77 402.9 153 439c15.09 15.1 4.39 41-17 41H24a23.94 23.94 0 0 1-24-24V344c0-21.4 25.89-32.1 41-17l36.19 36.2L184.46 256 77.18 148.7 41 185c-15.1 15.1-41 4.4-41-17V56a23.94 23.94 0 0 1 24-24h112c21.39 0 32.09 25.9 17 41l-36.2 36.2L224 216.4l107.23-107.3L295 73c-15.09-15.1-4.39-41 17-41h112a23.94 23.94 0 0 1 24 24v112c0 21.4-25.89 32.1-41 17l-36.19-36.2L263.54 256l107.28 107.3L407 327.1c15.1-15.2 41-4.5 41 16.9z"]},Hs={prefix:"fas",iconName:"external-link-alt",icon:[512,512,[],"f35d","M432,320H400a16,16,0,0,0-16,16V448H64V128H208a16,16,0,0,0,16-16V80a16,16,0,0,0-16-16H48A48,48,0,0,0,0,112V464a48,48,0,0,0,48,48H400a48,48,0,0,0,48-48V336A16,16,0,0,0,432,320ZM488,0h-128c-21.37,0-32.05,25.91-17,41l35.73,35.73L135,320.37a24,24,0,0,0,0,34L157.67,377a24,24,0,0,0,34,0L435.28,133.32,471,169c15,15,41,4.5,41-17V24A24,24,0,0,0,488,0Z"]},zs={prefix:"fas",iconName:"external-link-square-alt",icon:[448,512,[],"f360","M448 80v352c0 26.51-21.49 48-48 48H48c-26.51 0-48-21.49-48-48V80c0-26.51 21.49-48 48-48h352c26.51 0 48 21.49 48 48zm-88 16H248.029c-21.313 0-32.08 25.861-16.971 40.971l31.984 31.987L67.515 364.485c-4.686 4.686-4.686 12.284 0 16.971l31.029 31.029c4.687 4.686 12.285 4.686 16.971 0l195.526-195.526 31.988 31.991C358.058 263.977 384 253.425 384 231.979V120c0-13.255-10.745-24-24-24z"]},Us={prefix:"fas",iconName:"eye",icon:[576,512,[],"f06e","M572.52 241.4C518.29 135.59 410.93 64 288 64S57.68 135.64 3.48 241.41a32.35 32.35 0 0 0 0 29.19C57.71 376.41 165.07 448 288 448s230.32-71.64 284.52-177.41a32.35 32.35 0 0 0 0-29.19zM288 400a144 144 0 1 1 144-144 143.93 143.93 0 0 1-144 144zm0-240a95.31 95.31 0 0 0-25.31 3.79 47.85 47.85 0 0 1-66.9 66.9A95.78 95.78 0 1 0 288 160z"]},Ws={prefix:"fas",iconName:"eye-dropper",icon:[512,512,[],"f1fb","M50.75 333.25c-12 12-18.75 28.28-18.75 45.26V424L0 480l32 32 56-32h45.49c16.97 0 33.25-6.74 45.25-18.74l126.64-126.62-128-128L50.75 333.25zM483.88 28.12c-37.47-37.5-98.28-37.5-135.75 0l-77.09 77.09-13.1-13.1c-9.44-9.44-24.65-9.31-33.94 0l-40.97 40.97c-9.37 9.37-9.37 24.57 0 33.94l161.94 161.94c9.44 9.44 24.65 9.31 33.94 0L419.88 288c9.37-9.37 9.37-24.57 0-33.94l-13.1-13.1 77.09-77.09c37.51-37.48 37.51-98.26.01-135.75z"]},js={prefix:"fas",iconName:"eye-slash",icon:[640,512,[],"f070","M320 400c-75.85 0-137.25-58.71-142.9-133.11L72.2 185.82c-13.79 17.3-26.48 35.59-36.72 55.59a32.35 32.35 0 0 0 0 29.19C89.71 376.41 197.07 448 320 448c26.91 0 52.87-4 77.89-10.46L346 397.39a144.13 144.13 0 0 1-26 2.61zm313.82 58.1l-110.55-85.44a331.25 331.25 0 0 0 81.25-102.07 32.35 32.35 0 0 0 0-29.19C550.29 135.59 442.93 64 320 64a308.15 308.15 0 0 0-147.32 37.7L45.46 3.37A16 16 0 0 0 23 6.18L3.37 31.45A16 16 0 0 0 6.18 53.9l588.36 454.73a16 16 0 0 0 22.46-2.81l19.64-25.27a16 16 0 0 0-2.82-22.45zm-183.72-142l-39.3-30.38A94.75 94.75 0 0 0 416 256a94.76 94.76 0 0 0-121.31-92.21A47.65 47.65 0 0 1 304 192a46.64 46.64 0 0 1-1.54 10l-73.61-56.89A142.31 142.31 0 0 1 320 112a143.92 143.92 0 0 1 144 144c0 21.63-5.29 41.79-13.9 60.11z"]},Ks={prefix:"fas",iconName:"fan",icon:[512,512,[],"f863","M352.57 128c-28.09 0-54.09 4.52-77.06 12.86l12.41-123.11C289 7.31 279.81-1.18 269.33.13 189.63 10.13 128 77.64 128 159.43c0 28.09 4.52 54.09 12.86 77.06L17.75 224.08C7.31 223-1.18 232.19.13 242.67c10 79.7 77.51 141.33 159.3 141.33 28.09 0 54.09-4.52 77.06-12.86l-12.41 123.11c-1.05 10.43 8.11 18.93 18.59 17.62 79.7-10 141.33-77.51 141.33-159.3 0-28.09-4.52-54.09-12.86-77.06l123.11 12.41c10.44 1.05 18.93-8.11 17.62-18.59-10-79.7-77.51-141.33-159.3-141.33zM256 288a32 32 0 1 1 32-32 32 32 0 0 1-32 32z"]},$s={prefix:"fas",iconName:"fast-backward",icon:[512,512,[],"f049","M0 436V76c0-6.6 5.4-12 12-12h40c6.6 0 12 5.4 12 12v151.9L235.5 71.4C256.1 54.3 288 68.6 288 96v131.9L459.5 71.4C480.1 54.3 512 68.6 512 96v320c0 27.4-31.9 41.7-52.5 24.6L288 285.3V416c0 27.4-31.9 41.7-52.5 24.6L64 285.3V436c0 6.6-5.4 12-12 12H12c-6.6 0-12-5.4-12-12z"]},Ys={prefix:"fas",iconName:"fast-forward",icon:[512,512,[],"f050","M512 76v360c0 6.6-5.4 12-12 12h-40c-6.6 0-12-5.4-12-12V284.1L276.5 440.6c-20.6 17.2-52.5 2.8-52.5-24.6V284.1L52.5 440.6C31.9 457.8 0 443.4 0 416V96c0-27.4 31.9-41.7 52.5-24.6L224 226.8V96c0-27.4 31.9-41.7 52.5-24.6L448 226.8V76c0-6.6 5.4-12 12-12h40c6.6 0 12 5.4 12 12z"]},qs={prefix:"fas",iconName:"faucet",icon:[512,512,[],"e005","M352,256H313.39c-15.71-13.44-35.46-23.07-57.39-28V180.44l-32-3.38-32,3.38V228c-21.93,5-41.68,14.6-57.39,28H16A16,16,0,0,0,0,272v96a16,16,0,0,0,16,16h92.79C129.38,421.73,173,448,224,448s94.62-26.27,115.21-64H352a32,32,0,0,1,32,32,32,32,0,0,0,32,32h64a32,32,0,0,0,32-32A160,160,0,0,0,352,256ZM81.59,159.91l142.41-15,142.41,15c9.42,1,17.59-6.81,17.59-16.8V112.89c0-10-8.17-17.8-17.59-16.81L256,107.74V80a16,16,0,0,0-16-16H208a16,16,0,0,0-16,16v27.74L81.59,96.08C72.17,95.09,64,102.9,64,112.89v30.22C64,153.1,72.17,160.91,81.59,159.91Z"]},Xs={prefix:"fas",iconName:"fax",icon:[512,512,[],"f1ac","M480 160V77.25a32 32 0 0 0-9.38-22.63L425.37 9.37A32 32 0 0 0 402.75 0H160a32 32 0 0 0-32 32v448a32 32 0 0 0 32 32h320a32 32 0 0 0 32-32V192a32 32 0 0 0-32-32zM288 432a16 16 0 0 1-16 16h-32a16 16 0 0 1-16-16v-32a16 16 0 0 1 16-16h32a16 16 0 0 1 16 16zm0-128a16 16 0 0 1-16 16h-32a16 16 0 0 1-16-16v-32a16 16 0 0 1 16-16h32a16 16 0 0 1 16 16zm128 128a16 16 0 0 1-16 16h-32a16 16 0 0 1-16-16v-32a16 16 0 0 1 16-16h32a16 16 0 0 1 16 16zm0-128a16 16 0 0 1-16 16h-32a16 16 0 0 1-16-16v-32a16 16 0 0 1 16-16h32a16 16 0 0 1 16 16zm0-112H192V64h160v48a16 16 0 0 0 16 16h48zM64 128H32a32 32 0 0 0-32 32v320a32 32 0 0 0 32 32h32a32 32 0 0 0 32-32V160a32 32 0 0 0-32-32z"]},Zs={prefix:"fas",iconName:"feather",icon:[512,512,[],"f52d","M467.14 44.84c-62.55-62.48-161.67-64.78-252.28 25.73-78.61 78.52-60.98 60.92-85.75 85.66-60.46 60.39-70.39 150.83-63.64 211.17l178.44-178.25c6.26-6.25 16.4-6.25 22.65 0s6.25 16.38 0 22.63L7.04 471.03c-9.38 9.37-9.38 24.57 0 33.94 9.38 9.37 24.6 9.37 33.98 0l66.1-66.03C159.42 454.65 279 457.11 353.95 384h-98.19l147.57-49.14c49.99-49.93 36.38-36.18 46.31-46.86h-97.78l131.54-43.8c45.44-74.46 34.31-148.84-16.26-199.36z"]},Qs={prefix:"fas",iconName:"feather-alt",icon:[512,512,[],"f56b","M512 0C460.22 3.56 96.44 38.2 71.01 287.61c-3.09 26.66-4.84 53.44-5.99 80.24l178.87-178.69c6.25-6.25 16.4-6.25 22.65 0s6.25 16.38 0 22.63L7.04 471.03c-9.38 9.37-9.38 24.57 0 33.94 9.38 9.37 24.59 9.37 33.98 0l57.13-57.07c42.09-.14 84.15-2.53 125.96-7.36 53.48-5.44 97.02-26.47 132.58-56.54H255.74l146.79-48.88c11.25-14.89 21.37-30.71 30.45-47.12h-81.14l106.54-53.21C500.29 132.86 510.19 26.26 512 0z"]},Js={prefix:"fas",iconName:"female",icon:[256,512,[],"f182","M128 0c35.346 0 64 28.654 64 64s-28.654 64-64 64c-35.346 0-64-28.654-64-64S92.654 0 128 0m119.283 354.179l-48-192A24 24 0 0 0 176 144h-11.36c-22.711 10.443-49.59 10.894-73.28 0H80a24 24 0 0 0-23.283 18.179l-48 192C4.935 369.305 16.383 384 32 384h56v104c0 13.255 10.745 24 24 24h32c13.255 0 24-10.745 24-24V384h56c15.591 0 27.071-14.671 23.283-29.821z"]},er={prefix:"fas",iconName:"fighter-jet",icon:[640,512,[],"f0fb","M544 224l-128-16-48-16h-24L227.158 44h39.509C278.333 44 288 41.375 288 38s-9.667-6-21.333-6H152v12h16v164h-48l-66.667-80H18.667L8 138.667V208h8v16h48v2.666l-64 8v42.667l64 8V288H16v16H8v69.333L18.667 384h34.667L120 304h48v164h-16v12h114.667c11.667 0 21.333-2.625 21.333-6s-9.667-6-21.333-6h-39.509L344 320h24l48-16 128-16c96-21.333 96-26.583 96-32 0-5.417 0-10.667-96-32z"]},tr={prefix:"fas",iconName:"file",icon:[384,512,[],"f15b","M224 136V0H24C10.7 0 0 10.7 0 24v464c0 13.3 10.7 24 24 24h336c13.3 0 24-10.7 24-24V160H248c-13.2 0-24-10.8-24-24zm160-14.1v6.1H256V0h6.1c6.4 0 12.5 2.5 17 7l97.9 98c4.5 4.5 7 10.6 7 16.9z"]},ir={prefix:"fas",iconName:"file-alt",icon:[384,512,[],"f15c","M224 136V0H24C10.7 0 0 10.7 0 24v464c0 13.3 10.7 24 24 24h336c13.3 0 24-10.7 24-24V160H248c-13.2 0-24-10.8-24-24zm64 236c0 6.6-5.4 12-12 12H108c-6.6 0-12-5.4-12-12v-8c0-6.6 5.4-12 12-12h168c6.6 0 12 5.4 12 12v8zm0-64c0 6.6-5.4 12-12 12H108c-6.6 0-12-5.4-12-12v-8c0-6.6 5.4-12 12-12h168c6.6 0 12 5.4 12 12v8zm0-72v8c0 6.6-5.4 12-12 12H108c-6.6 0-12-5.4-12-12v-8c0-6.6 5.4-12 12-12h168c6.6 0 12 5.4 12 12zm96-114.1v6.1H256V0h6.1c6.4 0 12.5 2.5 17 7l97.9 98c4.5 4.5 7 10.6 7 16.9z"]},nr={prefix:"fas",iconName:"file-archive",icon:[384,512,[],"f1c6","M377 105L279.1 7c-4.5-4.5-10.6-7-17-7H256v128h128v-6.1c0-6.3-2.5-12.4-7-16.9zM128.4 336c-17.9 0-32.4 12.1-32.4 27 0 15 14.6 27 32.5 27s32.4-12.1 32.4-27-14.6-27-32.5-27zM224 136V0h-63.6v32h-32V0H24C10.7 0 0 10.7 0 24v464c0 13.3 10.7 24 24 24h336c13.3 0 24-10.7 24-24V160H248c-13.2 0-24-10.8-24-24zM95.9 32h32v32h-32zm32.3 384c-33.2 0-58-30.4-51.4-62.9L96.4 256v-32h32v-32h-32v-32h32v-32h-32V96h32V64h32v32h-32v32h32v32h-32v32h32v32h-32v32h22.1c5.7 0 10.7 4.1 11.8 9.7l17.3 87.7c6.4 32.4-18.4 62.6-51.4 62.6z"]},sr={prefix:"fas",iconName:"file-audio",icon:[384,512,[],"f1c7","M224 136V0H24C10.7 0 0 10.7 0 24v464c0 13.3 10.7 24 24 24h336c13.3 0 24-10.7 24-24V160H248c-13.2 0-24-10.8-24-24zm-64 268c0 10.7-12.9 16-20.5 8.5L104 376H76c-6.6 0-12-5.4-12-12v-56c0-6.6 5.4-12 12-12h28l35.5-36.5c7.6-7.6 20.5-2.2 20.5 8.5v136zm33.2-47.6c9.1-9.3 9.1-24.1 0-33.4-22.1-22.8 12.2-56.2 34.4-33.5 27.2 27.9 27.2 72.4 0 100.4-21.8 22.3-56.9-10.4-34.4-33.5zm86-117.1c54.4 55.9 54.4 144.8 0 200.8-21.8 22.4-57-10.3-34.4-33.5 36.2-37.2 36.3-96.5 0-133.8-22.1-22.8 12.3-56.3 34.4-33.5zM384 121.9v6.1H256V0h6.1c6.4 0 12.5 2.5 17 7l97.9 98c4.5 4.5 7 10.6 7 16.9z"]},rr={prefix:"fas",iconName:"file-code",icon:[384,512,[],"f1c9","M384 121.941V128H256V0h6.059c6.365 0 12.47 2.529 16.971 7.029l97.941 97.941A24.005 24.005 0 0 1 384 121.941zM248 160c-13.2 0-24-10.8-24-24V0H24C10.745 0 0 10.745 0 24v464c0 13.255 10.745 24 24 24h336c13.255 0 24-10.745 24-24V160H248zM123.206 400.505a5.4 5.4 0 0 1-7.633.246l-64.866-60.812a5.4 5.4 0 0 1 0-7.879l64.866-60.812a5.4 5.4 0 0 1 7.633.246l19.579 20.885a5.4 5.4 0 0 1-.372 7.747L101.65 336l40.763 35.874a5.4 5.4 0 0 1 .372 7.747l-19.579 20.884zm51.295 50.479l-27.453-7.97a5.402 5.402 0 0 1-3.681-6.692l61.44-211.626a5.402 5.402 0 0 1 6.692-3.681l27.452 7.97a5.4 5.4 0 0 1 3.68 6.692l-61.44 211.626a5.397 5.397 0 0 1-6.69 3.681zm160.792-111.045l-64.866 60.812a5.4 5.4 0 0 1-7.633-.246l-19.58-20.885a5.4 5.4 0 0 1 .372-7.747L284.35 336l-40.763-35.874a5.4 5.4 0 0 1-.372-7.747l19.58-20.885a5.4 5.4 0 0 1 7.633-.246l64.866 60.812a5.4 5.4 0 0 1-.001 7.879z"]},or={prefix:"fas",iconName:"file-contract",icon:[384,512,[],"f56c","M224 136V0H24C10.7 0 0 10.7 0 24v464c0 13.3 10.7 24 24 24h336c13.3 0 24-10.7 24-24V160H248c-13.2 0-24-10.8-24-24zM64 72c0-4.42 3.58-8 8-8h80c4.42 0 8 3.58 8 8v16c0 4.42-3.58 8-8 8H72c-4.42 0-8-3.58-8-8V72zm0 64c0-4.42 3.58-8 8-8h80c4.42 0 8 3.58 8 8v16c0 4.42-3.58 8-8 8H72c-4.42 0-8-3.58-8-8v-16zm192.81 248H304c8.84 0 16 7.16 16 16s-7.16 16-16 16h-47.19c-16.45 0-31.27-9.14-38.64-23.86-2.95-5.92-8.09-6.52-10.17-6.52s-7.22.59-10.02 6.19l-7.67 15.34a15.986 15.986 0 0 1-14.31 8.84c-.38 0-.75-.02-1.14-.05-6.45-.45-12-4.75-14.03-10.89L144 354.59l-10.61 31.88c-5.89 17.66-22.38 29.53-41 29.53H80c-8.84 0-16-7.16-16-16s7.16-16 16-16h12.39c4.83 0 9.11-3.08 10.64-7.66l18.19-54.64c3.3-9.81 12.44-16.41 22.78-16.41s19.48 6.59 22.77 16.41l13.88 41.64c19.77-16.19 54.05-9.7 66 14.16 2.02 4.06 5.96 6.5 10.16 6.5zM377 105L279.1 7c-4.5-4.5-10.6-7-17-7H256v128h128v-6.1c0-6.3-2.5-12.4-7-16.9z"]},ar={prefix:"fas",iconName:"file-csv",icon:[384,512,[],"f6dd","M224 136V0H24C10.7 0 0 10.7 0 24v464c0 13.3 10.7 24 24 24h336c13.3 0 24-10.7 24-24V160H248c-13.2 0-24-10.8-24-24zm-96 144c0 4.42-3.58 8-8 8h-8c-8.84 0-16 7.16-16 16v32c0 8.84 7.16 16 16 16h8c4.42 0 8 3.58 8 8v16c0 4.42-3.58 8-8 8h-8c-26.51 0-48-21.49-48-48v-32c0-26.51 21.49-48 48-48h8c4.42 0 8 3.58 8 8v16zm44.27 104H160c-4.42 0-8-3.58-8-8v-16c0-4.42 3.58-8 8-8h12.27c5.95 0 10.41-3.5 10.41-6.62 0-1.3-.75-2.66-2.12-3.84l-21.89-18.77c-8.47-7.22-13.33-17.48-13.33-28.14 0-21.3 19.02-38.62 42.41-38.62H200c4.42 0 8 3.58 8 8v16c0 4.42-3.58 8-8 8h-12.27c-5.95 0-10.41 3.5-10.41 6.62 0 1.3.75 2.66 2.12 3.84l21.89 18.77c8.47 7.22 13.33 17.48 13.33 28.14.01 21.29-19 38.62-42.39 38.62zM256 264v20.8c0 20.27 5.7 40.17 16 56.88 10.3-16.7 16-36.61 16-56.88V264c0-4.42 3.58-8 8-8h16c4.42 0 8 3.58 8 8v20.8c0 35.48-12.88 68.89-36.28 94.09-3.02 3.25-7.27 5.11-11.72 5.11s-8.7-1.86-11.72-5.11c-23.4-25.2-36.28-58.61-36.28-94.09V264c0-4.42 3.58-8 8-8h16c4.42 0 8 3.58 8 8zm121-159L279.1 7c-4.5-4.5-10.6-7-17-7H256v128h128v-6.1c0-6.3-2.5-12.4-7-16.9z"]},lr={prefix:"fas",iconName:"file-download",icon:[384,512,[],"f56d","M224 136V0H24C10.7 0 0 10.7 0 24v464c0 13.3 10.7 24 24 24h336c13.3 0 24-10.7 24-24V160H248c-13.2 0-24-10.8-24-24zm76.45 211.36l-96.42 95.7c-6.65 6.61-17.39 6.61-24.04 0l-96.42-95.7C73.42 337.29 80.54 320 94.82 320H160v-80c0-8.84 7.16-16 16-16h32c8.84 0 16 7.16 16 16v80h65.18c14.28 0 21.4 17.29 11.27 27.36zM377 105L279.1 7c-4.5-4.5-10.6-7-17-7H256v128h128v-6.1c0-6.3-2.5-12.4-7-16.9z"]},cr={prefix:"fas",iconName:"file-excel",icon:[384,512,[],"f1c3","M224 136V0H24C10.7 0 0 10.7 0 24v464c0 13.3 10.7 24 24 24h336c13.3 0 24-10.7 24-24V160H248c-13.2 0-24-10.8-24-24zm60.1 106.5L224 336l60.1 93.5c5.1 8-.6 18.5-10.1 18.5h-34.9c-4.4 0-8.5-2.4-10.6-6.3C208.9 405.5 192 373 192 373c-6.4 14.8-10 20-36.6 68.8-2.1 3.9-6.1 6.3-10.5 6.3H110c-9.5 0-15.2-10.5-10.1-18.5l60.3-93.5-60.3-93.5c-5.2-8 .6-18.5 10.1-18.5h34.8c4.4 0 8.5 2.4 10.6 6.3 26.1 48.8 20 33.6 36.6 68.5 0 0 6.1-11.7 36.6-68.5 2.1-3.9 6.2-6.3 10.6-6.3H274c9.5-.1 15.2 10.4 10.1 18.4zM384 121.9v6.1H256V0h6.1c6.4 0 12.5 2.5 17 7l97.9 98c4.5 4.5 7 10.6 7 16.9z"]},hr={prefix:"fas",iconName:"file-export",icon:[576,512,[],"f56e","M384 121.9c0-6.3-2.5-12.4-7-16.9L279.1 7c-4.5-4.5-10.6-7-17-7H256v128h128zM571 308l-95.7-96.4c-10.1-10.1-27.4-3-27.4 11.3V288h-64v64h64v65.2c0 14.3 17.3 21.4 27.4 11.3L571 332c6.6-6.6 6.6-17.4 0-24zm-379 28v-32c0-8.8 7.2-16 16-16h176V160H248c-13.2 0-24-10.8-24-24V0H24C10.7 0 0 10.7 0 24v464c0 13.3 10.7 24 24 24h336c13.3 0 24-10.7 24-24V352H208c-8.8 0-16-7.2-16-16z"]},dr={prefix:"fas",iconName:"file-image",icon:[384,512,[],"f1c5","M384 121.941V128H256V0h6.059a24 24 0 0 1 16.97 7.029l97.941 97.941a24.002 24.002 0 0 1 7.03 16.971zM248 160c-13.2 0-24-10.8-24-24V0H24C10.745 0 0 10.745 0 24v464c0 13.255 10.745 24 24 24h336c13.255 0 24-10.745 24-24V160H248zm-135.455 16c26.51 0 48 21.49 48 48s-21.49 48-48 48-48-21.49-48-48 21.491-48 48-48zm208 240h-256l.485-48.485L104.545 328c4.686-4.686 11.799-4.201 16.485.485L160.545 368 264.06 264.485c4.686-4.686 12.284-4.686 16.971 0L320.545 304v112z"]},ur={prefix:"fas",iconName:"file-import",icon:[512,512,[],"f56f","M16 288c-8.8 0-16 7.2-16 16v32c0 8.8 7.2 16 16 16h112v-64zm489-183L407.1 7c-4.5-4.5-10.6-7-17-7H384v128h128v-6.1c0-6.3-2.5-12.4-7-16.9zm-153 31V0H152c-13.3 0-24 10.7-24 24v264h128v-65.2c0-14.3 17.3-21.4 27.4-11.3L379 308c6.6 6.7 6.6 17.4 0 24l-95.7 96.4c-10.1 10.1-27.4 3-27.4-11.3V352H128v136c0 13.3 10.7 24 24 24h336c13.3 0 24-10.7 24-24V160H376c-13.2 0-24-10.8-24-24z"]},pr={prefix:"fas",iconName:"file-invoice",icon:[384,512,[],"f570","M288 256H96v64h192v-64zm89-151L279.1 7c-4.5-4.5-10.6-7-17-7H256v128h128v-6.1c0-6.3-2.5-12.4-7-16.9zm-153 31V0H24C10.7 0 0 10.7 0 24v464c0 13.3 10.7 24 24 24h336c13.3 0 24-10.7 24-24V160H248c-13.2 0-24-10.8-24-24zM64 72c0-4.42 3.58-8 8-8h80c4.42 0 8 3.58 8 8v16c0 4.42-3.58 8-8 8H72c-4.42 0-8-3.58-8-8V72zm0 64c0-4.42 3.58-8 8-8h80c4.42 0 8 3.58 8 8v16c0 4.42-3.58 8-8 8H72c-4.42 0-8-3.58-8-8v-16zm256 304c0 4.42-3.58 8-8 8h-80c-4.42 0-8-3.58-8-8v-16c0-4.42 3.58-8 8-8h80c4.42 0 8 3.58 8 8v16zm0-200v96c0 8.84-7.16 16-16 16H80c-8.84 0-16-7.16-16-16v-96c0-8.84 7.16-16 16-16h224c8.84 0 16 7.16 16 16z"]},gr={prefix:"fas",iconName:"file-invoice-dollar",icon:[384,512,[],"f571","M377 105L279.1 7c-4.5-4.5-10.6-7-17-7H256v128h128v-6.1c0-6.3-2.5-12.4-7-16.9zm-153 31V0H24C10.7 0 0 10.7 0 24v464c0 13.3 10.7 24 24 24h336c13.3 0 24-10.7 24-24V160H248c-13.2 0-24-10.8-24-24zM64 72c0-4.42 3.58-8 8-8h80c4.42 0 8 3.58 8 8v16c0 4.42-3.58 8-8 8H72c-4.42 0-8-3.58-8-8V72zm0 80v-16c0-4.42 3.58-8 8-8h80c4.42 0 8 3.58 8 8v16c0 4.42-3.58 8-8 8H72c-4.42 0-8-3.58-8-8zm144 263.88V440c0 4.42-3.58 8-8 8h-16c-4.42 0-8-3.58-8-8v-24.29c-11.29-.58-22.27-4.52-31.37-11.35-3.9-2.93-4.1-8.77-.57-12.14l11.75-11.21c2.77-2.64 6.89-2.76 10.13-.73 3.87 2.42 8.26 3.72 12.82 3.72h28.11c6.5 0 11.8-5.92 11.8-13.19 0-5.95-3.61-11.19-8.77-12.73l-45-13.5c-18.59-5.58-31.58-23.42-31.58-43.39 0-24.52 19.05-44.44 42.67-45.07V232c0-4.42 3.58-8 8-8h16c4.42 0 8 3.58 8 8v24.29c11.29.58 22.27 4.51 31.37 11.35 3.9 2.93 4.1 8.77.57 12.14l-11.75 11.21c-2.77 2.64-6.89 2.76-10.13.73-3.87-2.43-8.26-3.72-12.82-3.72h-28.11c-6.5 0-11.8 5.92-11.8 13.19 0 5.95 3.61 11.19 8.77 12.73l45 13.5c18.59 5.58 31.58 23.42 31.58 43.39 0 24.53-19.05 44.44-42.67 45.07z"]},fr={prefix:"fas",iconName:"file-medical",icon:[384,512,[],"f477","M377 105L279.1 7c-4.5-4.5-10.6-7-17-7H256v128h128v-6.1c0-6.3-2.5-12.4-7-16.9zm-153 31V0H24C10.7 0 0 10.7 0 24v464c0 13.3 10.7 24 24 24h336c13.3 0 24-10.7 24-24V160H248c-13.2 0-24-10.8-24-24zm64 160v48c0 4.4-3.6 8-8 8h-56v56c0 4.4-3.6 8-8 8h-48c-4.4 0-8-3.6-8-8v-56h-56c-4.4 0-8-3.6-8-8v-48c0-4.4 3.6-8 8-8h56v-56c0-4.4 3.6-8 8-8h48c4.4 0 8 3.6 8 8v56h56c4.4 0 8 3.6 8 8z"]},mr={prefix:"fas",iconName:"file-medical-alt",icon:[448,512,[],"f478","M288 136V0H88C74.7 0 64 10.7 64 24v232H8c-4.4 0-8 3.6-8 8v16c0 4.4 3.6 8 8 8h140.9c3 0 5.8 1.7 7.2 4.4l19.9 39.8 56.8-113.7c2.9-5.9 11.4-5.9 14.3 0l34.7 69.5H352c8.8 0 16 7.2 16 16s-7.2 16-16 16h-89.9L240 275.8l-56.8 113.7c-2.9 5.9-11.4 5.9-14.3 0L134.1 320H64v168c0 13.3 10.7 24 24 24h336c13.3 0 24-10.7 24-24V160H312c-13.2 0-24-10.8-24-24zm153-31L343.1 7c-4.5-4.5-10.6-7-17-7H320v128h128v-6.1c0-6.3-2.5-12.4-7-16.9z"]},vr={prefix:"fas",iconName:"file-pdf",icon:[384,512,[],"f1c1","M181.9 256.1c-5-16-4.9-46.9-2-46.9 8.4 0 7.6 36.9 2 46.9zm-1.7 47.2c-7.7 20.2-17.3 43.3-28.4 62.7 18.3-7 39-17.2 62.9-21.9-12.7-9.6-24.9-23.4-34.5-40.8zM86.1 428.1c0 .8 13.2-5.4 34.9-40.2-6.7 6.3-29.1 24.5-34.9 40.2zM248 160h136v328c0 13.3-10.7 24-24 24H24c-13.3 0-24-10.7-24-24V24C0 10.7 10.7 0 24 0h200v136c0 13.2 10.8 24 24 24zm-8 171.8c-20-12.2-33.3-29-42.7-53.8 4.5-18.5 11.6-46.6 6.2-64.2-4.7-29.4-42.4-26.5-47.8-6.8-5 18.3-.4 44.1 8.1 77-11.6 27.6-28.7 64.6-40.8 85.8-.1 0-.1.1-.2.1-27.1 13.9-73.6 44.5-54.5 68 5.6 6.9 16 10 21.5 10 17.9 0 35.7-18 61.1-61.8 25.8-8.5 54.1-19.1 79-23.2 21.7 11.8 47.1 19.5 64 19.5 29.2 0 31.2-32 19.7-43.4-13.9-13.6-54.3-9.7-73.6-7.2zM377 105L279 7c-4.5-4.5-10.6-7-17-7h-6v128h128v-6.1c0-6.3-2.5-12.4-7-16.9zm-74.1 255.3c4.1-2.7-2.5-11.9-42.8-9 37.1 15.8 42.8 9 42.8 9z"]},yr={prefix:"fas",iconName:"file-powerpoint",icon:[384,512,[],"f1c4","M193.7 271.2c8.8 0 15.5 2.7 20.3 8.1 9.6 10.9 9.8 32.7-.2 44.1-4.9 5.6-11.9 8.5-21.1 8.5h-26.9v-60.7h27.9zM377 105L279 7c-4.5-4.5-10.6-7-17-7h-6v128h128v-6.1c0-6.3-2.5-12.4-7-16.9zm-153 31V0H24C10.7 0 0 10.7 0 24v464c0 13.3 10.7 24 24 24h336c13.3 0 24-10.7 24-24V160H248c-13.2 0-24-10.8-24-24zm53 165.2c0 90.3-88.8 77.6-111.1 77.6V436c0 6.6-5.4 12-12 12h-30.8c-6.6 0-12-5.4-12-12V236.2c0-6.6 5.4-12 12-12h81c44.5 0 72.9 32.8 72.9 77z"]},Cr={prefix:"fas",iconName:"file-prescription",icon:[384,512,[],"f572","M224 136V0H24C10.7 0 0 10.7 0 24v464c0 13.3 10.7 24 24 24h336c13.3 0 24-10.7 24-24V160H248c-13.2 0-24-10.8-24-24zm68.53 179.48l11.31 11.31c6.25 6.25 6.25 16.38 0 22.63l-29.9 29.9L304 409.38c6.25 6.25 6.25 16.38 0 22.63l-11.31 11.31c-6.25 6.25-16.38 6.25-22.63 0L240 413.25l-30.06 30.06c-6.25 6.25-16.38 6.25-22.63 0L176 432c-6.25-6.25-6.25-16.38 0-22.63l30.06-30.06L146.74 320H128v48c0 8.84-7.16 16-16 16H96c-8.84 0-16-7.16-16-16V208c0-8.84 7.16-16 16-16h80c35.35 0 64 28.65 64 64 0 24.22-13.62 45.05-33.46 55.92L240 345.38l29.9-29.9c6.25-6.25 16.38-6.25 22.63 0zM176 272h-48v-32h48c8.82 0 16 7.18 16 16s-7.18 16-16 16zm208-150.1v6.1H256V0h6.1c6.4 0 12.5 2.5 17 7l97.9 98c4.5 4.5 7 10.6 7 16.9z"]},br={prefix:"fas",iconName:"file-signature",icon:[576,512,[],"f573","M218.17 424.14c-2.95-5.92-8.09-6.52-10.17-6.52s-7.22.59-10.02 6.19l-7.67 15.34c-6.37 12.78-25.03 11.37-29.48-2.09L144 386.59l-10.61 31.88c-5.89 17.66-22.38 29.53-41 29.53H80c-8.84 0-16-7.16-16-16s7.16-16 16-16h12.39c4.83 0 9.11-3.08 10.64-7.66l18.19-54.64c3.3-9.81 12.44-16.41 22.78-16.41s19.48 6.59 22.77 16.41l13.88 41.64c19.75-16.19 54.06-9.7 66 14.16 1.89 3.78 5.49 5.95 9.36 6.26v-82.12l128-127.09V160H248c-13.2 0-24-10.8-24-24V0H24C10.7 0 0 10.7 0 24v464c0 13.3 10.7 24 24 24h336c13.3 0 24-10.7 24-24v-40l-128-.11c-16.12-.31-30.58-9.28-37.83-23.75zM384 121.9c0-6.3-2.5-12.4-7-16.9L279.1 7c-4.5-4.5-10.6-7-17-7H256v128h128v-6.1zm-96 225.06V416h68.99l161.68-162.78-67.88-67.88L288 346.96zm280.54-179.63l-31.87-31.87c-9.94-9.94-26.07-9.94-36.01 0l-27.25 27.25 67.88 67.88 27.25-27.25c9.95-9.94 9.95-26.07 0-36.01z"]},Sr={prefix:"fas",iconName:"file-upload",icon:[384,512,[],"f574","M224 136V0H24C10.7 0 0 10.7 0 24v464c0 13.3 10.7 24 24 24h336c13.3 0 24-10.7 24-24V160H248c-13.2 0-24-10.8-24-24zm65.18 216.01H224v80c0 8.84-7.16 16-16 16h-32c-8.84 0-16-7.16-16-16v-80H94.82c-14.28 0-21.41-17.29-11.27-27.36l96.42-95.7c6.65-6.61 17.39-6.61 24.04 0l96.42 95.7c10.15 10.07 3.03 27.36-11.25 27.36zM377 105L279.1 7c-4.5-4.5-10.6-7-17-7H256v128h128v-6.1c0-6.3-2.5-12.4-7-16.9z"]},wr={prefix:"fas",iconName:"file-video",icon:[384,512,[],"f1c8","M384 121.941V128H256V0h6.059c6.365 0 12.47 2.529 16.971 7.029l97.941 97.941A24.005 24.005 0 0 1 384 121.941zM224 136V0H24C10.745 0 0 10.745 0 24v464c0 13.255 10.745 24 24 24h336c13.255 0 24-10.745 24-24V160H248c-13.2 0-24-10.8-24-24zm96 144.016v111.963c0 21.445-25.943 31.998-40.971 16.971L224 353.941V392c0 13.255-10.745 24-24 24H88c-13.255 0-24-10.745-24-24V280c0-13.255 10.745-24 24-24h112c13.255 0 24 10.745 24 24v38.059l55.029-55.013c15.011-15.01 40.971-4.491 40.971 16.97z"]},xr={prefix:"fas",iconName:"file-word",icon:[384,512,[],"f1c2","M224 136V0H24C10.7 0 0 10.7 0 24v464c0 13.3 10.7 24 24 24h336c13.3 0 24-10.7 24-24V160H248c-13.2 0-24-10.8-24-24zm57.1 120H305c7.7 0 13.4 7.1 11.7 14.7l-38 168c-1.2 5.5-6.1 9.3-11.7 9.3h-38c-5.5 0-10.3-3.8-11.6-9.1-25.8-103.5-20.8-81.2-25.6-110.5h-.5c-1.1 14.3-2.4 17.4-25.6 110.5-1.3 5.3-6.1 9.1-11.6 9.1H117c-5.6 0-10.5-3.9-11.7-9.4l-37.8-168c-1.7-7.5 4-14.6 11.7-14.6h24.5c5.7 0 10.7 4 11.8 9.7 15.6 78 20.1 109.5 21 122.2 1.6-10.2 7.3-32.7 29.4-122.7 1.3-5.4 6.1-9.1 11.7-9.1h29.1c5.6 0 10.4 3.8 11.7 9.2 24 100.4 28.8 124 29.6 129.4-.2-11.2-2.6-17.8 21.6-129.2 1-5.6 5.9-9.5 11.5-9.5zM384 121.9v6.1H256V0h6.1c6.4 0 12.5 2.5 17 7l97.9 98c4.5 4.5 7 10.6 7 16.9z"]},Er={prefix:"fas",iconName:"fill",icon:[512,512,[],"f575","M502.63 217.06L294.94 9.37C288.69 3.12 280.5 0 272.31 0s-16.38 3.12-22.62 9.37l-81.58 81.58L81.93 4.77c-6.24-6.25-16.38-6.25-22.62 0L36.69 27.38c-6.24 6.25-6.24 16.38 0 22.63l86.19 86.18-94.76 94.76c-37.49 37.49-37.49 98.26 0 135.75l117.19 117.19c18.75 18.74 43.31 28.12 67.87 28.12 24.57 0 49.13-9.37 67.88-28.12l221.57-221.57c12.49-12.5 12.49-32.76 0-45.26zm-116.22 70.97H65.93c1.36-3.84 3.57-7.98 7.43-11.83l13.15-13.15 81.61-81.61 58.61 58.6c12.49 12.49 32.75 12.49 45.24 0 12.49-12.49 12.49-32.75 0-45.24l-58.61-58.6 58.95-58.95 162.45 162.44-48.35 48.34z"]},Mr={prefix:"fas",iconName:"fill-drip",icon:[576,512,[],"f576","M512 320s-64 92.65-64 128c0 35.35 28.66 64 64 64s64-28.65 64-64-64-128-64-128zm-9.37-102.94L294.94 9.37C288.69 3.12 280.5 0 272.31 0s-16.38 3.12-22.62 9.37l-81.58 81.58L81.93 4.76c-6.25-6.25-16.38-6.25-22.62 0L36.69 27.38c-6.24 6.25-6.24 16.38 0 22.62l86.19 86.18-94.76 94.76c-37.49 37.48-37.49 98.26 0 135.75l117.19 117.19c18.74 18.74 43.31 28.12 67.87 28.12 24.57 0 49.13-9.37 67.87-28.12l221.57-221.57c12.5-12.5 12.5-32.75.01-45.25zm-116.22 70.97H65.93c1.36-3.84 3.57-7.98 7.43-11.83l13.15-13.15 81.61-81.61 58.6 58.6c12.49 12.49 32.75 12.49 45.24 0s12.49-32.75 0-45.24l-58.6-58.6 58.95-58.95 162.44 162.44-48.34 48.34z"]},Ar={prefix:"fas",iconName:"film",icon:[512,512,[],"f008","M488 64h-8v20c0 6.6-5.4 12-12 12h-40c-6.6 0-12-5.4-12-12V64H96v20c0 6.6-5.4 12-12 12H44c-6.6 0-12-5.4-12-12V64h-8C10.7 64 0 74.7 0 88v336c0 13.3 10.7 24 24 24h8v-20c0-6.6 5.4-12 12-12h40c6.6 0 12 5.4 12 12v20h320v-20c0-6.6 5.4-12 12-12h40c6.6 0 12 5.4 12 12v20h8c13.3 0 24-10.7 24-24V88c0-13.3-10.7-24-24-24zM96 372c0 6.6-5.4 12-12 12H44c-6.6 0-12-5.4-12-12v-40c0-6.6 5.4-12 12-12h40c6.6 0 12 5.4 12 12v40zm0-96c0 6.6-5.4 12-12 12H44c-6.6 0-12-5.4-12-12v-40c0-6.6 5.4-12 12-12h40c6.6 0 12 5.4 12 12v40zm0-96c0 6.6-5.4 12-12 12H44c-6.6 0-12-5.4-12-12v-40c0-6.6 5.4-12 12-12h40c6.6 0 12 5.4 12 12v40zm272 208c0 6.6-5.4 12-12 12H156c-6.6 0-12-5.4-12-12v-96c0-6.6 5.4-12 12-12h200c6.6 0 12 5.4 12 12v96zm0-168c0 6.6-5.4 12-12 12H156c-6.6 0-12-5.4-12-12v-96c0-6.6 5.4-12 12-12h200c6.6 0 12 5.4 12 12v96zm112 152c0 6.6-5.4 12-12 12h-40c-6.6 0-12-5.4-12-12v-40c0-6.6 5.4-12 12-12h40c6.6 0 12 5.4 12 12v40zm0-96c0 6.6-5.4 12-12 12h-40c-6.6 0-12-5.4-12-12v-40c0-6.6 5.4-12 12-12h40c6.6 0 12 5.4 12 12v40zm0-96c0 6.6-5.4 12-12 12h-40c-6.6 0-12-5.4-12-12v-40c0-6.6 5.4-12 12-12h40c6.6 0 12 5.4 12 12v40z"]},Tr={prefix:"fas",iconName:"filter",icon:[512,512,[],"f0b0","M487.976 0H24.028C2.71 0-8.047 25.866 7.058 40.971L192 225.941V432c0 7.831 3.821 15.17 10.237 19.662l80 55.98C298.02 518.69 320 507.493 320 487.98V225.941l184.947-184.97C520.021 25.896 509.338 0 487.976 0z"]},Dr={prefix:"fas",iconName:"fingerprint",icon:[512,512,[],"f577","M256.12 245.96c-13.25 0-24 10.74-24 24 1.14 72.25-8.14 141.9-27.7 211.55-2.73 9.72 2.15 30.49 23.12 30.49 10.48 0 20.11-6.92 23.09-17.52 13.53-47.91 31.04-125.41 29.48-224.52.01-13.25-10.73-24-23.99-24zm-.86-81.73C194 164.16 151.25 211.3 152.1 265.32c.75 47.94-3.75 95.91-13.37 142.55-2.69 12.98 5.67 25.69 18.64 28.36 13.05 2.67 25.67-5.66 28.36-18.64 10.34-50.09 15.17-101.58 14.37-153.02-.41-25.95 19.92-52.49 54.45-52.34 31.31.47 57.15 25.34 57.62 55.47.77 48.05-2.81 96.33-10.61 143.55-2.17 13.06 6.69 25.42 19.76 27.58 19.97 3.33 26.81-15.1 27.58-19.77 8.28-50.03 12.06-101.21 11.27-152.11-.88-55.8-47.94-101.88-104.91-102.72zm-110.69-19.78c-10.3-8.34-25.37-6.8-33.76 3.48-25.62 31.5-39.39 71.28-38.75 112 .59 37.58-2.47 75.27-9.11 112.05-2.34 13.05 6.31 25.53 19.36 27.89 20.11 3.5 27.07-14.81 27.89-19.36 7.19-39.84 10.5-80.66 9.86-121.33-.47-29.88 9.2-57.88 28-80.97 8.35-10.28 6.79-25.39-3.49-33.76zm109.47-62.33c-15.41-.41-30.87 1.44-45.78 4.97-12.89 3.06-20.87 15.98-17.83 28.89 3.06 12.89 16 20.83 28.89 17.83 11.05-2.61 22.47-3.77 34-3.69 75.43 1.13 137.73 61.5 138.88 134.58.59 37.88-1.28 76.11-5.58 113.63-1.5 13.17 7.95 25.08 21.11 26.58 16.72 1.95 25.51-11.88 26.58-21.11a929.06 929.06 0 0 0 5.89-119.85c-1.56-98.75-85.07-180.33-186.16-181.83zm252.07 121.45c-2.86-12.92-15.51-21.2-28.61-18.27-12.94 2.86-21.12 15.66-18.26 28.61 4.71 21.41 4.91 37.41 4.7 61.6-.11 13.27 10.55 24.09 23.8 24.2h.2c13.17 0 23.89-10.61 24-23.8.18-22.18.4-44.11-5.83-72.34zm-40.12-90.72C417.29 43.46 337.6 1.29 252.81.02 183.02-.82 118.47 24.91 70.46 72.94 24.09 119.37-.9 181.04.14 246.65l-.12 21.47c-.39 13.25 10.03 24.31 23.28 24.69.23.02.48.02.72.02 12.92 0 23.59-10.3 23.97-23.3l.16-23.64c-.83-52.5 19.16-101.86 56.28-139 38.76-38.8 91.34-59.67 147.68-58.86 69.45 1.03 134.73 35.56 174.62 92.39 7.61 10.86 22.56 13.45 33.42 5.86 10.84-7.62 13.46-22.59 5.84-33.43z"]},Ir={prefix:"fas",iconName:"fire",icon:[384,512,[],"f06d","M216 23.86c0-23.8-30.65-32.77-44.15-13.04C48 191.85 224 200 224 288c0 35.63-29.11 64.46-64.85 63.99-35.17-.45-63.15-29.77-63.15-64.94v-85.51c0-21.7-26.47-32.23-41.43-16.5C27.8 213.16 0 261.33 0 320c0 105.87 86.13 192 192 192s192-86.13 192-192c0-170.29-168-193-168-296.14z"]},Rr={prefix:"fas",iconName:"fire-alt",icon:[448,512,[],"f7e4","M323.56 51.2c-20.8 19.3-39.58 39.59-56.22 59.97C240.08 73.62 206.28 35.53 168 0 69.74 91.17 0 209.96 0 281.6 0 408.85 100.29 512 224 512s224-103.15 224-230.4c0-53.27-51.98-163.14-124.44-230.4zm-19.47 340.65C282.43 407.01 255.72 416 226.86 416 154.71 416 96 368.26 96 290.75c0-38.61 24.31-72.63 72.79-130.75 6.93 7.98 98.83 125.34 98.83 125.34l58.63-66.88c4.14 6.85 7.91 13.55 11.27 19.97 27.35 52.19 15.81 118.97-33.43 153.42z"]},Lr={prefix:"fas",iconName:"fire-extinguisher",icon:[448,512,[],"f134","M434.027 26.329l-168 28C254.693 56.218 256 67.8 256 72h-58.332C208.353 36.108 181.446 0 144 0c-39.435 0-66.368 39.676-52.228 76.203-52.039 13.051-75.381 54.213-90.049 90.884-4.923 12.307 1.063 26.274 13.37 31.197 12.317 4.926 26.279-1.075 31.196-13.37C75.058 112.99 106.964 120 168 120v27.076c-41.543 10.862-72 49.235-72 94.129V488c0 13.255 10.745 24 24 24h144c13.255 0 24-10.745 24-24V240c0-44.731-30.596-82.312-72-92.97V120h40c0 2.974-1.703 15.716 10.027 17.671l168 28C441.342 166.89 448 161.25 448 153.834V38.166c0-7.416-6.658-13.056-13.973-11.837zM144 72c-8.822 0-16-7.178-16-16s7.178-16 16-16 16 7.178 16 16-7.178 16-16 16z"]},kr={prefix:"fas",iconName:"first-aid",icon:[576,512,[],"f479","M0 80v352c0 26.5 21.5 48 48 48h48V32H48C21.5 32 0 53.5 0 80zm128 400h320V32H128v448zm64-248c0-4.4 3.6-8 8-8h56v-56c0-4.4 3.6-8 8-8h48c4.4 0 8 3.6 8 8v56h56c4.4 0 8 3.6 8 8v48c0 4.4-3.6 8-8 8h-56v56c0 4.4-3.6 8-8 8h-48c-4.4 0-8-3.6-8-8v-56h-56c-4.4 0-8-3.6-8-8v-48zM528 32h-48v448h48c26.5 0 48-21.5 48-48V80c0-26.5-21.5-48-48-48z"]},Pr={prefix:"fas",iconName:"fish",icon:[576,512,[],"f578","M327.1 96c-89.97 0-168.54 54.77-212.27 101.63L27.5 131.58c-12.13-9.18-30.24.6-27.14 14.66L24.54 256 .35 365.77c-3.1 14.06 15.01 23.83 27.14 14.66l87.33-66.05C158.55 361.23 237.13 416 327.1 416 464.56 416 576 288 576 256S464.56 96 327.1 96zm87.43 184c-13.25 0-24-10.75-24-24 0-13.26 10.75-24 24-24 13.26 0 24 10.74 24 24 0 13.25-10.75 24-24 24z"]},Nr={prefix:"fas",iconName:"fist-raised",icon:[384,512,[],"f6de","M255.98 160V16c0-8.84-7.16-16-16-16h-32c-8.84 0-16 7.16-16 16v146.93c5.02-1.78 10.34-2.93 15.97-2.93h48.03zm128 95.99c-.01-35.34-28.66-63.99-63.99-63.99H207.85c-8.78 0-15.9 7.07-15.9 15.85v.56c0 26.27 21.3 47.59 47.57 47.59h35.26c9.68 0 13.2 3.58 13.2 8v16.2c0 4.29-3.59 7.78-7.88 8-44.52 2.28-64.16 24.71-96.05 72.55l-6.31 9.47a7.994 7.994 0 0 1-11.09 2.22l-13.31-8.88a7.994 7.994 0 0 1-2.22-11.09l6.31-9.47c15.73-23.6 30.2-43.26 47.31-58.08-17.27-5.51-31.4-18.12-38.87-34.45-6.59 3.41-13.96 5.52-21.87 5.52h-32c-12.34 0-23.49-4.81-32-12.48C71.48 251.19 60.33 256 48 256H16c-5.64 0-10.97-1.15-16-2.95v77.93c0 33.95 13.48 66.5 37.49 90.51L63.99 448v64h255.98v-63.96l35.91-35.92A96.035 96.035 0 0 0 384 344.21l-.02-88.22zm-32.01-90.09V48c0-8.84-7.16-16-16-16h-32c-8.84 0-16 7.16-16 16v112h32c11.28 0 21.94 2.31 32 5.9zM16 224h32c8.84 0 16-7.16 16-16V80c0-8.84-7.16-16-16-16H16C7.16 64 0 71.16 0 80v128c0 8.84 7.16 16 16 16zm95.99 0h32c8.84 0 16-7.16 16-16V48c0-8.84-7.16-16-16-16h-32c-8.84 0-16 7.16-16 16v160c0 8.84 7.16 16 16 16z"]},Or={prefix:"fas",iconName:"flag",icon:[512,512,[],"f024","M349.565 98.783C295.978 98.783 251.721 64 184.348 64c-24.955 0-47.309 4.384-68.045 12.013a55.947 55.947 0 0 0 3.586-23.562C118.117 24.015 94.806 1.206 66.338.048 34.345-1.254 8 24.296 8 56c0 19.026 9.497 35.825 24 45.945V488c0 13.255 10.745 24 24 24h16c13.255 0 24-10.745 24-24v-94.4c28.311-12.064 63.582-22.122 114.435-22.122 53.588 0 97.844 34.783 165.217 34.783 48.169 0 86.667-16.294 122.505-40.858C506.84 359.452 512 349.571 512 339.045v-243.1c0-23.393-24.269-38.87-45.485-29.016-34.338 15.948-76.454 31.854-116.95 31.854z"]},_r={prefix:"fas",iconName:"flag-checkered",icon:[512,512,[],"f11e","M243.2 189.9V258c26.1 5.9 49.3 15.6 73.6 22.3v-68.2c-26-5.8-49.4-15.5-73.6-22.2zm223.3-123c-34.3 15.9-76.5 31.9-117 31.9C296 98.8 251.7 64 184.3 64c-25 0-47.3 4.4-68 12 2.8-7.3 4.1-15.2 3.6-23.6C118.1 24 94.8 1.2 66.3 0 34.3-1.3 8 24.3 8 56c0 19 9.5 35.8 24 45.9V488c0 13.3 10.7 24 24 24h16c13.3 0 24-10.7 24-24v-94.4c28.3-12.1 63.6-22.1 114.4-22.1 53.6 0 97.8 34.8 165.2 34.8 48.2 0 86.7-16.3 122.5-40.9 8.7-6 13.8-15.8 13.8-26.4V95.9c.1-23.3-24.2-38.8-45.4-29zM169.6 325.5c-25.8 2.7-50 8.2-73.6 16.6v-70.5c26.2-9.3 47.5-15 73.6-17.4zM464 191c-23.6 9.8-46.3 19.5-73.6 23.9V286c24.8-3.4 51.4-11.8 73.6-26v70.5c-25.1 16.1-48.5 24.7-73.6 27.1V286c-27 3.7-47.9 1.5-73.6-5.6v67.4c-23.9-7.4-47.3-16.7-73.6-21.3V258c-19.7-4.4-40.8-6.8-73.6-3.8v-70c-22.4 3.1-44.6 10.2-73.6 20.9v-70.5c33.2-12.2 50.1-19.8 73.6-22v71.6c27-3.7 48.4-1.3 73.6 5.7v-67.4c23.7 7.4 47.2 16.7 73.6 21.3v68.4c23.7 5.3 47.6 6.9 73.6 2.7V143c27-4.8 52.3-13.6 73.6-22.5z"]},Fr={prefix:"fas",iconName:"flag-usa",icon:[512,512,[],"f74d","M32 0C14.3 0 0 14.3 0 32v464c0 8.8 7.2 16 16 16h32c8.8 0 16-7.2 16-16V32C64 14.3 49.7 0 32 0zm267.9 303.6c-57.2-15.1-111.7-28.8-203.9 11.1V384c185.7-92.2 221.7 53.3 397.5-23.1 11.4-5 18.5-16.5 18.5-28.8v-36c-43.6 17.3-80.2 24.1-112.1 24.1-37.4-.1-68.9-8.4-100-16.6zm0-96c-57.2-15.1-111.7-28.8-203.9 11.1v61.5c94.8-37.6 154.6-22.7 212.1-7.6 57.2 15.1 111.7 28.8 203.9-11.1V200c-43.6 17.3-80.2 24.1-112.1 24.1-37.4 0-68.9-8.3-100-16.5zm9.5-125.9c51.8 15.6 97.4 29 202.6-20.1V30.8c0-25.1-26.8-38.1-49.4-26.6C291.3 91.5 305.4-62.2 96 32.4v151.9c94.8-37.5 154.6-22.7 212.1-7.6 57.2 15 111.7 28.7 203.9-11.1V96.7c-53.6 23.5-93.3 31.4-126.1 31.4s-59-7.8-85.7-15.9c-4-1.2-8.1-2.4-12.1-3.5V75.5c7.2 2 14.3 4.1 21.3 6.2zM160 128.1c-8.8 0-16-7.1-16-16 0-8.8 7.2-16 16-16s16 7.1 16 16-7.2 16-16 16zm0-55.8c-8.8 0-16-7.1-16-16 0-8.8 7.2-16 16-16s16 7.1 16 16c0 8.8-7.2 16-16 16zm64 47.9c-8.8 0-16-7.1-16-16 0-8.8 7.2-16 16-16s16 7.1 16 16c0 8.8-7.2 16-16 16zm0-55.9c-8.8 0-16-7.1-16-16 0-8.8 7.2-16 16-16s16 7.1 16 16c0 8.8-7.2 16-16 16z"]},Gr={prefix:"fas",iconName:"flask",icon:[448,512,[],"f0c3","M437.2 403.5L320 215V64h8c13.3 0 24-10.7 24-24V24c0-13.3-10.7-24-24-24H120c-13.3 0-24 10.7-24 24v16c0 13.3 10.7 24 24 24h8v151L10.8 403.5C-18.5 450.6 15.3 512 70.9 512h306.2c55.7 0 89.4-61.5 60.1-108.5zM137.9 320l48.2-77.6c3.7-5.2 5.8-11.6 5.8-18.4V64h64v160c0 6.9 2.2 13.2 5.8 18.4l48.2 77.6h-172z"]},Vr={prefix:"fas",iconName:"flushed",icon:[496,512,[],"f579","M344 200c-13.3 0-24 10.7-24 24s10.7 24 24 24 24-10.7 24-24-10.7-24-24-24zm-192 0c-13.3 0-24 10.7-24 24s10.7 24 24 24 24-10.7 24-24-10.7-24-24-24zM248 8C111 8 0 119 0 256s111 248 248 248 248-111 248-248S385 8 248 8zM80 224c0-39.8 32.2-72 72-72s72 32.2 72 72-32.2 72-72 72-72-32.2-72-72zm232 176H184c-21.2 0-21.2-32 0-32h128c21.2 0 21.2 32 0 32zm32-104c-39.8 0-72-32.2-72-72s32.2-72 72-72 72 32.2 72 72-32.2 72-72 72z"]},Br={prefix:"fas",iconName:"folder",icon:[512,512,[],"f07b","M464 128H272l-64-64H48C21.49 64 0 85.49 0 112v288c0 26.51 21.49 48 48 48h416c26.51 0 48-21.49 48-48V176c0-26.51-21.49-48-48-48z"]},Hr={prefix:"fas",iconName:"folder-minus",icon:[512,512,[],"f65d","M464 128H272l-64-64H48C21.49 64 0 85.49 0 112v288c0 26.51 21.49 48 48 48h416c26.51 0 48-21.49 48-48V176c0-26.51-21.49-48-48-48zm-96 168c0 8.84-7.16 16-16 16H160c-8.84 0-16-7.16-16-16v-16c0-8.84 7.16-16 16-16h192c8.84 0 16 7.16 16 16v16z"]},zr={prefix:"fas",iconName:"folder-open",icon:[576,512,[],"f07c","M572.694 292.093L500.27 416.248A63.997 63.997 0 0 1 444.989 448H45.025c-18.523 0-30.064-20.093-20.731-36.093l72.424-124.155A64 64 0 0 1 152 256h399.964c18.523 0 30.064 20.093 20.73 36.093zM152 224h328v-48c0-26.51-21.49-48-48-48H272l-64-64H48C21.49 64 0 85.49 0 112v278.046l69.077-118.418C86.214 242.25 117.989 224 152 224z"]},Ur={prefix:"fas",iconName:"folder-plus",icon:[512,512,[],"f65e","M464,128H272L208,64H48A48,48,0,0,0,0,112V400a48,48,0,0,0,48,48H464a48,48,0,0,0,48-48V176A48,48,0,0,0,464,128ZM359.5,296a16,16,0,0,1-16,16h-64v64a16,16,0,0,1-16,16h-16a16,16,0,0,1-16-16V312h-64a16,16,0,0,1-16-16V280a16,16,0,0,1,16-16h64V200a16,16,0,0,1,16-16h16a16,16,0,0,1,16,16v64h64a16,16,0,0,1,16,16Z"]},Wr={prefix:"fas",iconName:"font",icon:[448,512,[],"f031","M432 416h-23.41L277.88 53.69A32 32 0 0 0 247.58 32h-47.16a32 32 0 0 0-30.3 21.69L39.41 416H16a16 16 0 0 0-16 16v32a16 16 0 0 0 16 16h128a16 16 0 0 0 16-16v-32a16 16 0 0 0-16-16h-19.58l23.3-64h152.56l23.3 64H304a16 16 0 0 0-16 16v32a16 16 0 0 0 16 16h128a16 16 0 0 0 16-16v-32a16 16 0 0 0-16-16zM176.85 272L224 142.51 271.15 272z"]},jr={prefix:"fas",iconName:"font-awesome-logo-full",icon:[3992,512,["Font Awesome"],"f4e6","M454.6 0H57.4C25.9 0 0 25.9 0 57.4v397.3C0 486.1 25.9 512 57.4 512h397.3c31.4 0 57.4-25.9 57.4-57.4V57.4C512 25.9 486.1 0 454.6 0zm-58.9 324.9c0 4.8-4.1 6.9-8.9 8.9-19.2 8.1-39.7 15.7-61.5 15.7-40.5 0-68.7-44.8-163.2 2.5v51.8c0 30.3-45.7 30.2-45.7 0v-250c-9-7-15-17.9-15-30.3 0-21 17.1-38.2 38.2-38.2 21 0 38.2 17.1 38.2 38.2 0 12.2-5.8 23.2-14.9 30.2v21c37.1-12 65.5-34.4 146.1-3.4 26.6 11.4 68.7-15.7 76.5-15.7 5.5 0 10.3 4.1 10.3 8.9v160.4zm432.9-174.2h-137v70.1H825c39.8 0 40.4 62.2 0 62.2H691.6v105.6c0 45.5-70.7 46.4-70.7 0V128.3c0-22 18-39.8 39.8-39.8h167.8c39.6 0 40.5 62.2.1 62.2zm191.1 23.4c-169.3 0-169.1 252.4 0 252.4 169.9 0 169.9-252.4 0-252.4zm0 196.1c-81.6 0-82.1-139.8 0-139.8 82.5 0 82.4 139.8 0 139.8zm372.4 53.4c-17.5 0-31.4-13.9-31.4-31.4v-117c0-62.4-72.6-52.5-99.1-16.4v133.4c0 41.5-63.3 41.8-63.3 0V208c0-40 63.1-41.6 63.1 0v3.4c43.3-51.6 162.4-60.4 162.4 39.3v141.5c.3 30.4-31.5 31.4-31.7 31.4zm179.7 2.9c-44.3 0-68.3-22.9-68.3-65.8V235.2H1488c-35.6 0-36.7-55.3 0-55.3h15.5v-37.3c0-41.3 63.8-42.1 63.8 0v37.5h24.9c35.4 0 35.7 55.3 0 55.3h-24.9v108.5c0 29.6 26.1 26.3 27.4 26.3 31.4 0 52.6 56.3-22.9 56.3zM1992 123c-19.5-50.2-95.5-50-114.5 0-107.3 275.7-99.5 252.7-99.5 262.8 0 42.8 58.3 51.2 72.1 14.4l13.5-35.9H2006l13 35.9c14.2 37.7 72.1 27.2 72.1-14.4 0-10.1 5.3 6.8-99.1-262.8zm-108.9 179.1l51.7-142.9 51.8 142.9h-103.5zm591.3-85.6l-53.7 176.3c-12.4 41.2-72 41-84 0l-42.3-135.9-42.3 135.9c-12.4 40.9-72 41.2-84.5 0l-54.2-176.3c-12.5-39.4 49.8-56.1 60.2-16.9L2213 342l45.3-139.5c10.9-32.7 59.6-34.7 71.2 0l45.3 139.5 39.3-142.4c10.3-38.3 72.6-23.8 60.3 16.9zm275.4 75.1c0-42.4-33.9-117.5-119.5-117.5-73.2 0-124.4 56.3-124.4 126 0 77.2 55.3 126.4 128.5 126.4 31.7 0 93-11.5 93-39.8 0-18.3-21.1-31.5-39.3-22.4-49.4 26.2-109 8.4-115.9-43.8h148.3c16.3 0 29.3-13.4 29.3-28.9zM2571 277.7c9.5-73.4 113.9-68.6 118.6 0H2571zm316.7 148.8c-31.4 0-81.6-10.5-96.6-31.9-12.4-17 2.5-39.8 21.8-39.8 16.3 0 36.8 22.9 77.7 22.9 27.4 0 40.4-11 40.4-25.8 0-39.8-142.9-7.4-142.9-102 0-40.4 35.3-75.7 98.6-75.7 31.4 0 74.1 9.9 87.6 29.4 10.8 14.8-1.4 36.2-20.9 36.2-15.1 0-26.7-17.3-66.2-17.3-22.9 0-37.8 10.5-37.8 23.8 0 35.9 142.4 6 142.4 103.1-.1 43.7-37.4 77.1-104.1 77.1zm266.8-252.4c-169.3 0-169.1 252.4 0 252.4 170.1 0 169.6-252.4 0-252.4zm0 196.1c-81.8 0-82-139.8 0-139.8 82.5 0 82.4 139.8 0 139.8zm476.9 22V268.7c0-53.8-61.4-45.8-85.7-10.5v134c0 41.3-63.8 42.1-63.8 0V268.7c0-52.1-59.5-47.4-85.7-10.1v133.6c0 41.5-63.3 41.8-63.3 0V208c0-40 63.1-41.6 63.1 0v3.4c9.9-14.4 41.8-37.3 78.6-37.3 35.3 0 57.7 16.4 66.7 43.8 13.9-21.8 45.8-43.8 82.6-43.8 44.3 0 70.7 23.4 70.7 72.7v145.3c.5 17.3-13.5 31.4-31.9 31.4 3.5.1-31.3 1.1-31.3-31.3zM3992 291.6c0-42.4-32.4-117.5-117.9-117.5-73.2 0-127.5 56.3-127.5 126 0 77.2 58.3 126.4 131.6 126.4 31.7 0 91.5-11.5 91.5-39.8 0-18.3-21.1-31.5-39.3-22.4-49.4 26.2-110.5 8.4-117.5-43.8h149.8c16.3 0 29.1-13.4 29.3-28.9zm-180.5-13.9c9.7-74.4 115.9-68.3 120.1 0h-120.1z"]},Kr={prefix:"fas",iconName:"football-ball",icon:[496,512,[],"f44e","M481.5 60.3c-4.8-18.2-19.1-32.5-37.3-37.4C420.3 16.5 383 8.9 339.4 8L496 164.8c-.8-43.5-8.2-80.6-14.5-104.5zm-467 391.4c4.8 18.2 19.1 32.5 37.3 37.4 23.9 6.4 61.2 14 104.8 14.9L0 347.2c.8 43.5 8.2 80.6 14.5 104.5zM4.2 283.4L220.4 500c132.5-19.4 248.8-118.7 271.5-271.4L275.6 12C143.1 31.4 26.8 130.7 4.2 283.4zm317.3-123.6c3.1-3.1 8.2-3.1 11.3 0l11.3 11.3c3.1 3.1 3.1 8.2 0 11.3l-28.3 28.3 28.3 28.3c3.1 3.1 3.1 8.2 0 11.3l-11.3 11.3c-3.1 3.1-8.2 3.1-11.3 0l-28.3-28.3-22.6 22.7 28.3 28.3c3.1 3.1 3.1 8.2 0 11.3l-11.3 11.3c-3.1 3.1-8.2 3.1-11.3 0L248 278.6l-22.6 22.6 28.3 28.3c3.1 3.1 3.1 8.2 0 11.3l-11.3 11.3c-3.1 3.1-8.2 3.1-11.3 0l-28.3-28.3-28.3 28.3c-3.1 3.1-8.2 3.1-11.3 0l-11.3-11.3c-3.1-3.1-3.1-8.2 0-11.3l28.3-28.3-28.3-28.2c-3.1-3.1-3.1-8.2 0-11.3l11.3-11.3c3.1-3.1 8.2-3.1 11.3 0l28.3 28.3 22.6-22.6-28.3-28.3c-3.1-3.1-3.1-8.2 0-11.3l11.3-11.3c3.1-3.1 8.2-3.1 11.3 0l28.3 28.3 22.6-22.6-28.3-28.3c-3.1-3.1-3.1-8.2 0-11.3l11.3-11.3c3.1-3.1 8.2-3.1 11.3 0l28.3 28.3 28.3-28.5z"]},$r={prefix:"fas",iconName:"forward",icon:[512,512,[],"f04e","M500.5 231.4l-192-160C287.9 54.3 256 68.6 256 96v320c0 27.4 31.9 41.8 52.5 24.6l192-160c15.3-12.8 15.3-36.4 0-49.2zm-256 0l-192-160C31.9 54.3 0 68.6 0 96v320c0 27.4 31.9 41.8 52.5 24.6l192-160c15.3-12.8 15.3-36.4 0-49.2z"]},Yr={prefix:"fas",iconName:"frog",icon:[576,512,[],"f52e","M446.53 97.43C439.67 60.23 407.19 32 368 32c-39.23 0-71.72 28.29-78.54 65.54C126.75 112.96-.5 250.12 0 416.98.11 451.9 29.08 480 64 480h304c8.84 0 16-7.16 16-16 0-17.67-14.33-32-32-32h-79.49l35.8-48.33c24.14-36.23 10.35-88.28-33.71-106.6-23.89-9.93-51.55-4.65-72.24 10.88l-32.76 24.59c-7.06 5.31-17.09 3.91-22.41-3.19-5.3-7.08-3.88-17.11 3.19-22.41l34.78-26.09c36.84-27.66 88.28-27.62 125.13 0 10.87 8.15 45.87 39.06 40.8 93.21L469.62 480H560c8.84 0 16-7.16 16-16 0-17.67-14.33-32-32-32h-53.63l-98.52-104.68 154.44-86.65A58.16 58.16 0 0 0 576 189.94c0-21.4-11.72-40.95-30.48-51.23-40.56-22.22-98.99-41.28-98.99-41.28zM368 136c-13.26 0-24-10.75-24-24 0-13.26 10.74-24 24-24 13.25 0 24 10.74 24 24 0 13.25-10.75 24-24 24z"]},qr={prefix:"fas",iconName:"frown",icon:[496,512,[],"f119","M248 8C111 8 0 119 0 256s111 248 248 248 248-111 248-248S385 8 248 8zm80 168c17.7 0 32 14.3 32 32s-14.3 32-32 32-32-14.3-32-32 14.3-32 32-32zm-160 0c17.7 0 32 14.3 32 32s-14.3 32-32 32-32-14.3-32-32 14.3-32 32-32zm170.2 218.2C315.8 367.4 282.9 352 248 352s-67.8 15.4-90.2 42.2c-13.5 16.3-38.1-4.2-24.6-20.5C161.7 339.6 203.6 320 248 320s86.3 19.6 114.7 53.8c13.6 16.2-11 36.7-24.5 20.4z"]},Xr={prefix:"fas",iconName:"frown-open",icon:[496,512,[],"f57a","M248 8C111 8 0 119 0 256s111 248 248 248 248-111 248-248S385 8 248 8zM136 208c0-17.7 14.3-32 32-32s32 14.3 32 32-14.3 32-32 32-32-14.3-32-32zm187.3 183.3c-31.2-9.6-59.4-15.3-75.3-15.3s-44.1 5.7-75.3 15.3c-11.5 3.5-22.5-6.3-20.5-18.1 7-40 60.1-61.2 95.8-61.2s88.8 21.3 95.8 61.2c2 11.9-9.1 21.6-20.5 18.1zM328 240c-17.7 0-32-14.3-32-32s14.3-32 32-32 32 14.3 32 32-14.3 32-32 32z"]},Zr={prefix:"fas",iconName:"funnel-dollar",icon:[640,512,[],"f662","M433.46 165.94l101.2-111.87C554.61 34.12 540.48 0 512.26 0H31.74C3.52 0-10.61 34.12 9.34 54.07L192 256v155.92c0 12.59 5.93 24.44 16 32l79.99 60c20.86 15.64 48.47 6.97 59.22-13.57C310.8 455.38 288 406.35 288 352c0-89.79 62.05-165.17 145.46-186.06zM480 192c-88.37 0-160 71.63-160 160s71.63 160 160 160 160-71.63 160-160-71.63-160-160-160zm16 239.88V448c0 4.42-3.58 8-8 8h-16c-4.42 0-8-3.58-8-8v-16.29c-11.29-.58-22.27-4.52-31.37-11.35-3.9-2.93-4.1-8.77-.57-12.14l11.75-11.21c2.77-2.64 6.89-2.76 10.13-.73 3.87 2.42 8.26 3.72 12.82 3.72h28.11c6.5 0 11.8-5.92 11.8-13.19 0-5.95-3.61-11.19-8.77-12.73l-45-13.5c-18.59-5.58-31.58-23.42-31.58-43.39 0-24.52 19.05-44.44 42.67-45.07V256c0-4.42 3.58-8 8-8h16c4.42 0 8 3.58 8 8v16.29c11.29.58 22.27 4.51 31.37 11.35 3.9 2.93 4.1 8.77.57 12.14l-11.75 11.21c-2.77 2.64-6.89 2.76-10.13.73-3.87-2.43-8.26-3.72-12.82-3.72h-28.11c-6.5 0-11.8 5.92-11.8 13.19 0 5.95 3.61 11.19 8.77 12.73l45 13.5c18.59 5.58 31.58 23.42 31.58 43.39 0 24.53-19.04 44.44-42.67 45.07z"]},Qr={prefix:"fas",iconName:"futbol",icon:[512,512,[],"f1e3","M504 256c0 136.967-111.033 248-248 248S8 392.967 8 256 119.033 8 256 8s248 111.033 248 248zm-48 0l-.003-.282-26.064 22.741-62.679-58.5 16.454-84.355 34.303 3.072c-24.889-34.216-60.004-60.089-100.709-73.141l13.651 31.939L256 139l-74.953-41.525 13.651-31.939c-40.631 13.028-75.78 38.87-100.709 73.141l34.565-3.073 16.192 84.355-62.678 58.5-26.064-22.741-.003.282c0 43.015 13.497 83.952 38.472 117.991l7.704-33.897 85.138 10.447 36.301 77.826-29.902 17.786c40.202 13.122 84.29 13.148 124.572 0l-29.902-17.786 36.301-77.826 85.138-10.447 7.704 33.897C442.503 339.952 456 299.015 456 256zm-248.102 69.571l-29.894-91.312L256 177.732l77.996 56.527-29.622 91.312h-96.476z"]},Jr={prefix:"fas",iconName:"gamepad",icon:[640,512,[],"f11b","M480.07 96H160a160 160 0 1 0 114.24 272h91.52A160 160 0 1 0 480.07 96zM248 268a12 12 0 0 1-12 12h-52v52a12 12 0 0 1-12 12h-24a12 12 0 0 1-12-12v-52H84a12 12 0 0 1-12-12v-24a12 12 0 0 1 12-12h52v-52a12 12 0 0 1 12-12h24a12 12 0 0 1 12 12v52h52a12 12 0 0 1 12 12zm216 76a40 40 0 1 1 40-40 40 40 0 0 1-40 40zm64-96a40 40 0 1 1 40-40 40 40 0 0 1-40 40z"]},eo={prefix:"fas",iconName:"gas-pump",icon:[512,512,[],"f52f","M336 448H16c-8.8 0-16 7.2-16 16v32c0 8.8 7.2 16 16 16h320c8.8 0 16-7.2 16-16v-32c0-8.8-7.2-16-16-16zm157.2-340.7l-81-81c-6.2-6.2-16.4-6.2-22.6 0l-11.3 11.3c-6.2 6.2-6.2 16.4 0 22.6L416 97.9V160c0 28.1 20.9 51.3 48 55.2V376c0 13.2-10.8 24-24 24s-24-10.8-24-24v-32c0-48.6-39.4-88-88-88h-8V64c0-35.3-28.7-64-64-64H96C60.7 0 32 28.7 32 64v352h288V304h8c22.1 0 40 17.9 40 40v27.8c0 37.7 27 72 64.5 75.9 43 4.3 79.5-29.5 79.5-71.7V152.6c0-17-6.8-33.3-18.8-45.3zM256 192H96V64h160v128z"]},to={prefix:"fas",iconName:"gavel",icon:[512,512,[],"f0e3","M504.971 199.362l-22.627-22.627c-9.373-9.373-24.569-9.373-33.941 0l-5.657 5.657L329.608 69.255l5.657-5.657c9.373-9.373 9.373-24.569 0-33.941L312.638 7.029c-9.373-9.373-24.569-9.373-33.941 0L154.246 131.48c-9.373 9.373-9.373 24.569 0 33.941l22.627 22.627c9.373 9.373 24.569 9.373 33.941 0l5.657-5.657 39.598 39.598-81.04 81.04-5.657-5.657c-12.497-12.497-32.758-12.497-45.255 0L9.373 412.118c-12.497 12.497-12.497 32.758 0 45.255l45.255 45.255c12.497 12.497 32.758 12.497 45.255 0l114.745-114.745c12.497-12.497 12.497-32.758 0-45.255l-5.657-5.657 81.04-81.04 39.598 39.598-5.657 5.657c-9.373 9.373-9.373 24.569 0 33.941l22.627 22.627c9.373 9.373 24.569 9.373 33.941 0l124.451-124.451c9.372-9.372 9.372-24.568 0-33.941z"]},io={prefix:"fas",iconName:"gem",icon:[576,512,[],"f3a5","M485.5 0L576 160H474.9L405.7 0h79.8zm-128 0l69.2 160H149.3L218.5 0h139zm-267 0h79.8l-69.2 160H0L90.5 0zM0 192h100.7l123 251.7c1.5 3.1-2.7 5.9-5 3.3L0 192zm148.2 0h279.6l-137 318.2c-1 2.4-4.5 2.4-5.5 0L148.2 192zm204.1 251.7l123-251.7H576L357.3 446.9c-2.3 2.7-6.5-.1-5-3.2z"]},no={prefix:"fas",iconName:"genderless",icon:[288,512,[],"f22d","M144 176c44.1 0 80 35.9 80 80s-35.9 80-80 80-80-35.9-80-80 35.9-80 80-80m0-64C64.5 112 0 176.5 0 256s64.5 144 144 144 144-64.5 144-144-64.5-144-144-144z"]},so={prefix:"fas",iconName:"ghost",icon:[384,512,[],"f6e2","M186.1.09C81.01 3.24 0 94.92 0 200.05v263.92c0 14.26 17.23 21.39 27.31 11.31l24.92-18.53c6.66-4.95 16-3.99 21.51 2.21l42.95 48.35c6.25 6.25 16.38 6.25 22.63 0l40.72-45.85c6.37-7.17 17.56-7.17 23.92 0l40.72 45.85c6.25 6.25 16.38 6.25 22.63 0l42.95-48.35c5.51-6.2 14.85-7.17 21.51-2.21l24.92 18.53c10.08 10.08 27.31 2.94 27.31-11.31V192C384 84 294.83-3.17 186.1.09zM128 224c-17.67 0-32-14.33-32-32s14.33-32 32-32 32 14.33 32 32-14.33 32-32 32zm128 0c-17.67 0-32-14.33-32-32s14.33-32 32-32 32 14.33 32 32-14.33 32-32 32z"]},ro={prefix:"fas",iconName:"gift",icon:[512,512,[],"f06b","M32 448c0 17.7 14.3 32 32 32h160V320H32v128zm256 32h160c17.7 0 32-14.3 32-32V320H288v160zm192-320h-42.1c6.2-12.1 10.1-25.5 10.1-40 0-48.5-39.5-88-88-88-41.6 0-68.5 21.3-103 68.3-34.5-47-61.4-68.3-103-68.3-48.5 0-88 39.5-88 88 0 14.5 3.8 27.9 10.1 40H32c-17.7 0-32 14.3-32 32v80c0 8.8 7.2 16 16 16h480c8.8 0 16-7.2 16-16v-80c0-17.7-14.3-32-32-32zm-326.1 0c-22.1 0-40-17.9-40-40s17.9-40 40-40c19.9 0 34.6 3.3 86.1 80h-86.1zm206.1 0h-86.1c51.4-76.5 65.7-80 86.1-80 22.1 0 40 17.9 40 40s-17.9 40-40 40z"]},oo={prefix:"fas",iconName:"gifts",icon:[640,512,[],"f79c","M240.6 194.1c1.9-30.8 17.3-61.2 44-79.8C279.4 103.5 268.7 96 256 96h-29.4l30.7-22c7.2-5.1 8.9-15.1 3.7-22.3l-9.3-13c-5.1-7.2-15.1-8.9-22.3-3.7l-32 22.9 11.5-30.6c3.1-8.3-1.1-17.5-9.4-20.6l-15-5.6c-8.3-3.1-17.5 1.1-20.6 9.4l-19.9 53-19.9-53.1C121 2.1 111.8-2.1 103.5 1l-15 5.6C80.2 9.7 76 19 79.2 27.2l11.5 30.6L58.6 35c-7.2-5.1-17.2-3.5-22.3 3.7l-9.3 13c-5.1 7.2-3.5 17.2 3.7 22.3l30.7 22H32c-17.7 0-32 14.3-32 32v352c0 17.7 14.3 32 32 32h168.9c-5.5-9.5-8.9-20.3-8.9-32V256c0-29.9 20.8-55 48.6-61.9zM224 480c0 17.7 14.3 32 32 32h160V384H224v96zm224 32h160c17.7 0 32-14.3 32-32v-96H448v128zm160-288h-20.4c2.6-7.6 4.4-15.5 4.4-23.8 0-35.5-27-72.2-72.1-72.2-48.1 0-75.9 47.7-87.9 75.3-12.1-27.6-39.9-75.3-87.9-75.3-45.1 0-72.1 36.7-72.1 72.2 0 8.3 1.7 16.2 4.4 23.8H256c-17.7 0-32 14.3-32 32v96h192V224h15.3l.7-.2.7.2H448v128h192v-96c0-17.7-14.3-32-32-32zm-272 0c-2.7-1.4-5.1-3-7.2-4.8-7.3-6.4-8.8-13.8-8.8-19 0-9.7 6.4-24.2 24.1-24.2 18.7 0 35.6 27.4 44.5 48H336zm199.2-4.8c-2.1 1.8-4.5 3.4-7.2 4.8h-52.6c8.8-20.3 25.8-48 44.5-48 17.7 0 24.1 14.5 24.1 24.2 0 5.2-1.5 12.6-8.8 19z"]},ao={prefix:"fas",iconName:"glass-cheers",icon:[640,512,[],"f79f","M639.4 433.6c-8.4-20.4-31.8-30.1-52.2-21.6l-22.1 9.2-38.7-101.9c47.9-35 64.8-100.3 34.5-152.8L474.3 16c-8-13.9-25.1-19.7-40-13.6L320 49.8 205.7 2.4c-14.9-6.2-32-.3-40 13.6L79.1 166.5C48.9 219 65.7 284.3 113.6 319.2L74.9 421.1l-22.1-9.2c-20.4-8.5-43.7 1.2-52.2 21.6-1.7 4.1.2 8.8 4.3 10.5l162.3 67.4c4.1 1.7 8.7-.2 10.4-4.3 8.4-20.4-1.2-43.8-21.6-52.3l-22.1-9.2L173.3 342c4.4.5 8.8 1.3 13.1 1.3 51.7 0 99.4-33.1 113.4-85.3l20.2-75.4 20.2 75.4c14 52.2 61.7 85.3 113.4 85.3 4.3 0 8.7-.8 13.1-1.3L506 445.6l-22.1 9.2c-20.4 8.5-30.1 31.9-21.6 52.3 1.7 4.1 6.4 6 10.4 4.3L635.1 444c4-1.7 6-6.3 4.3-10.4zM275.9 162.1l-112.1-46.5 36.5-63.4 94.5 39.2-18.9 70.7zm88.2 0l-18.9-70.7 94.5-39.2 36.5 63.4-112.1 46.5z"]},lo={prefix:"fas",iconName:"glass-martini",icon:[512,512,[],"f000","M502.05 57.6C523.3 36.34 508.25 0 478.2 0H33.8C3.75 0-11.3 36.34 9.95 57.6L224 271.64V464h-56c-22.09 0-40 17.91-40 40 0 4.42 3.58 8 8 8h240c4.42 0 8-3.58 8-8 0-22.09-17.91-40-40-40h-56V271.64L502.05 57.6z"]},co={prefix:"fas",iconName:"glass-martini-alt",icon:[512,512,[],"f57b","M502.05 57.6C523.3 36.34 508.25 0 478.2 0H33.8C3.75 0-11.3 36.34 9.95 57.6L224 271.64V464h-56c-22.09 0-40 17.91-40 40 0 4.42 3.58 8 8 8h240c4.42 0 8-3.58 8-8 0-22.09-17.91-40-40-40h-56V271.64L502.05 57.6zM443.77 48l-48 48H116.24l-48-48h375.53z"]},ho={prefix:"fas",iconName:"glass-whiskey",icon:[512,512,[],"f7a0","M480 32H32C12.5 32-2.4 49.2.3 68.5l56 356.5c4.5 31.5 31.5 54.9 63.4 54.9h273c31.8 0 58.9-23.4 63.4-54.9l55.6-356.5C514.4 49.2 499.5 32 480 32zm-37.4 64l-30 192h-313L69.4 96h373.2z"]},uo={prefix:"fas",iconName:"glasses",icon:[576,512,[],"f530","M574.1 280.37L528.75 98.66c-5.91-23.7-21.59-44.05-43-55.81-21.44-11.73-46.97-14.11-70.19-6.33l-15.25 5.08c-8.39 2.79-12.92 11.86-10.12 20.24l5.06 15.18c2.79 8.38 11.85 12.91 20.23 10.12l13.18-4.39c10.87-3.62 23-3.57 33.16 1.73 10.29 5.37 17.57 14.56 20.37 25.82l38.46 153.82c-22.19-6.81-49.79-12.46-81.2-12.46-34.77 0-73.98 7.02-114.85 26.74h-73.18c-40.87-19.74-80.08-26.75-114.86-26.75-31.42 0-59.02 5.65-81.21 12.46l38.46-153.83c2.79-11.25 10.09-20.45 20.38-25.81 10.16-5.3 22.28-5.35 33.15-1.73l13.17 4.39c8.38 2.79 17.44-1.74 20.23-10.12l5.06-15.18c2.8-8.38-1.73-17.45-10.12-20.24l-15.25-5.08c-23.22-7.78-48.75-5.41-70.19 6.33-21.41 11.77-37.09 32.11-43 55.8L1.9 280.37A64.218 64.218 0 0 0 0 295.86v70.25C0 429.01 51.58 480 115.2 480h37.12c60.28 0 110.37-45.94 114.88-105.37l2.93-38.63h35.75l2.93 38.63C313.31 434.06 363.4 480 423.68 480h37.12c63.62 0 115.2-50.99 115.2-113.88v-70.25c0-5.23-.64-10.43-1.9-15.5zm-370.72 89.42c-1.97 25.91-24.4 46.21-51.06 46.21H115.2C86.97 416 64 393.62 64 366.11v-37.54c18.12-6.49 43.42-12.92 72.58-12.92 23.86 0 47.26 4.33 69.93 12.92l-3.13 41.22zM512 366.12c0 27.51-22.97 49.88-51.2 49.88h-37.12c-26.67 0-49.1-20.3-51.06-46.21l-3.13-41.22c22.67-8.59 46.08-12.92 69.95-12.92 29.12 0 54.43 6.44 72.55 12.93v37.54z"]},po={prefix:"fas",iconName:"globe",icon:[496,512,[],"f0ac","M336.5 160C322 70.7 287.8 8 248 8s-74 62.7-88.5 152h177zM152 256c0 22.2 1.2 43.5 3.3 64h185.3c2.1-20.5 3.3-41.8 3.3-64s-1.2-43.5-3.3-64H155.3c-2.1 20.5-3.3 41.8-3.3 64zm324.7-96c-28.6-67.9-86.5-120.4-158-141.6 24.4 33.8 41.2 84.7 50 141.6h108zM177.2 18.4C105.8 39.6 47.8 92.1 19.3 160h108c8.7-56.9 25.5-107.8 49.9-141.6zM487.4 192H372.7c2.1 21 3.3 42.5 3.3 64s-1.2 43-3.3 64h114.6c5.5-20.5 8.6-41.8 8.6-64s-3.1-43.5-8.5-64zM120 256c0-21.5 1.2-43 3.3-64H8.6C3.2 212.5 0 233.8 0 256s3.2 43.5 8.6 64h114.6c-2-21-3.2-42.5-3.2-64zm39.5 96c14.5 89.3 48.7 152 88.5 152s74-62.7 88.5-152h-177zm159.3 141.6c71.4-21.2 129.4-73.7 158-141.6h-108c-8.8 56.9-25.6 107.8-50 141.6zM19.3 352c28.6 67.9 86.5 120.4 158 141.6-24.4-33.8-41.2-84.7-50-141.6h-108z"]},go={prefix:"fas",iconName:"globe-africa",icon:[496,512,[],"f57c","M248 8C111.03 8 0 119.03 0 256s111.03 248 248 248 248-111.03 248-248S384.97 8 248 8zm160 215.5v6.93c0 5.87-3.32 11.24-8.57 13.86l-15.39 7.7a15.485 15.485 0 0 1-15.53-.97l-18.21-12.14a15.52 15.52 0 0 0-13.5-1.81l-2.65.88c-9.7 3.23-13.66 14.79-7.99 23.3l13.24 19.86c2.87 4.31 7.71 6.9 12.89 6.9h8.21c8.56 0 15.5 6.94 15.5 15.5v11.34c0 3.35-1.09 6.62-3.1 9.3l-18.74 24.98c-1.42 1.9-2.39 4.1-2.83 6.43l-4.3 22.83c-.62 3.29-2.29 6.29-4.76 8.56a159.608 159.608 0 0 0-25 29.16l-13.03 19.55a27.756 27.756 0 0 1-23.09 12.36c-10.51 0-20.12-5.94-24.82-15.34a78.902 78.902 0 0 1-8.33-35.29V367.5c0-8.56-6.94-15.5-15.5-15.5h-25.88c-14.49 0-28.38-5.76-38.63-16a54.659 54.659 0 0 1-16-38.63v-14.06c0-17.19 8.1-33.38 21.85-43.7l27.58-20.69a54.663 54.663 0 0 1 32.78-10.93h.89c8.48 0 16.85 1.97 24.43 5.77l14.72 7.36c3.68 1.84 7.93 2.14 11.83.84l47.31-15.77c6.33-2.11 10.6-8.03 10.6-14.7 0-8.56-6.94-15.5-15.5-15.5h-10.09c-4.11 0-8.05-1.63-10.96-4.54l-6.92-6.92a15.493 15.493 0 0 0-10.96-4.54H199.5c-8.56 0-15.5-6.94-15.5-15.5v-4.4c0-7.11 4.84-13.31 11.74-15.04l14.45-3.61c3.74-.94 7-3.23 9.14-6.44l8.08-12.11c2.87-4.31 7.71-6.9 12.89-6.9h24.21c8.56 0 15.5-6.94 15.5-15.5v-21.7C359.23 71.63 422.86 131.02 441.93 208H423.5c-8.56 0-15.5 6.94-15.5 15.5z"]},fo={prefix:"fas",iconName:"globe-americas",icon:[496,512,[],"f57d","M248 8C111.03 8 0 119.03 0 256s111.03 248 248 248 248-111.03 248-248S384.97 8 248 8zm82.29 357.6c-3.9 3.88-7.99 7.95-11.31 11.28-2.99 3-5.1 6.7-6.17 10.71-1.51 5.66-2.73 11.38-4.77 16.87l-17.39 46.85c-13.76 3-28 4.69-42.65 4.69v-27.38c1.69-12.62-7.64-36.26-22.63-51.25-6-6-9.37-14.14-9.37-22.63v-32.01c0-11.64-6.27-22.34-16.46-27.97-14.37-7.95-34.81-19.06-48.81-26.11-11.48-5.78-22.1-13.14-31.65-21.75l-.8-.72a114.792 114.792 0 0 1-18.06-20.74c-9.38-13.77-24.66-36.42-34.59-51.14 20.47-45.5 57.36-82.04 103.2-101.89l24.01 12.01C203.48 89.74 216 82.01 216 70.11v-11.3c7.99-1.29 16.12-2.11 24.39-2.42l28.3 28.3c6.25 6.25 6.25 16.38 0 22.63L264 112l-10.34 10.34c-3.12 3.12-3.12 8.19 0 11.31l4.69 4.69c3.12 3.12 3.12 8.19 0 11.31l-8 8a8.008 8.008 0 0 1-5.66 2.34h-8.99c-2.08 0-4.08.81-5.58 2.27l-9.92 9.65a8.008 8.008 0 0 0-1.58 9.31l15.59 31.19c2.66 5.32-1.21 11.58-7.15 11.58h-5.64c-1.93 0-3.79-.7-5.24-1.96l-9.28-8.06a16.017 16.017 0 0 0-15.55-3.1l-31.17 10.39a11.95 11.95 0 0 0-8.17 11.34c0 4.53 2.56 8.66 6.61 10.69l11.08 5.54c9.41 4.71 19.79 7.16 30.31 7.16s22.59 27.29 32 32h66.75c8.49 0 16.62 3.37 22.63 9.37l13.69 13.69a30.503 30.503 0 0 1 8.93 21.57 46.536 46.536 0 0 1-13.72 32.98zM417 274.25c-5.79-1.45-10.84-5-14.15-9.97l-17.98-26.97a23.97 23.97 0 0 1 0-26.62l19.59-29.38c2.32-3.47 5.5-6.29 9.24-8.15l12.98-6.49C440.2 193.59 448 223.87 448 256c0 8.67-.74 17.16-1.82 25.54L417 274.25z"]},mo={prefix:"fas",iconName:"globe-asia",icon:[496,512,[],"f57e","M248 8C111.03 8 0 119.03 0 256s111.03 248 248 248 248-111.03 248-248S384.97 8 248 8zm-11.34 240.23c-2.89 4.82-8.1 7.77-13.72 7.77h-.31c-4.24 0-8.31 1.69-11.31 4.69l-5.66 5.66c-3.12 3.12-3.12 8.19 0 11.31l5.66 5.66c3 3 4.69 7.07 4.69 11.31V304c0 8.84-7.16 16-16 16h-6.11c-6.06 0-11.6-3.42-14.31-8.85l-22.62-45.23c-2.44-4.88-8.95-5.94-12.81-2.08l-19.47 19.46c-3 3-7.07 4.69-11.31 4.69H50.81C49.12 277.55 48 266.92 48 256c0-110.28 89.72-200 200-200 21.51 0 42.2 3.51 61.63 9.82l-50.16 38.53c-5.11 3.41-4.63 11.06.86 13.81l10.83 5.41c5.42 2.71 8.84 8.25 8.84 14.31V216c0 4.42-3.58 8-8 8h-3.06c-3.03 0-5.8-1.71-7.15-4.42-1.56-3.12-5.96-3.29-7.76-.3l-17.37 28.95zM408 358.43c0 4.24-1.69 8.31-4.69 11.31l-9.57 9.57c-3 3-7.07 4.69-11.31 4.69h-15.16c-4.24 0-8.31-1.69-11.31-4.69l-13.01-13.01a26.767 26.767 0 0 0-25.42-7.04l-21.27 5.32c-1.27.32-2.57.48-3.88.48h-10.34c-4.24 0-8.31-1.69-11.31-4.69l-11.91-11.91a8.008 8.008 0 0 1-2.34-5.66v-10.2c0-3.27 1.99-6.21 5.03-7.43l39.34-15.74c1.98-.79 3.86-1.82 5.59-3.05l23.71-16.89a7.978 7.978 0 0 1 4.64-1.48h12.09c3.23 0 6.15 1.94 7.39 4.93l5.35 12.85a4 4 0 0 0 3.69 2.46h3.8c1.78 0 3.35-1.18 3.84-2.88l4.2-14.47c.5-1.71 2.06-2.88 3.84-2.88h6.06c2.21 0 4 1.79 4 4v12.93c0 2.12.84 4.16 2.34 5.66l11.91 11.91c3 3 4.69 7.07 4.69 11.31v24.6z"]},vo={prefix:"fas",iconName:"globe-europe",icon:[496,512,[],"f7a2","M248 8C111 8 0 119 0 256s111 248 248 248 248-111 248-248S385 8 248 8zm200 248c0 22.5-3.9 44.2-10.8 64.4h-20.3c-4.3 0-8.4-1.7-11.4-4.8l-32-32.6c-4.5-4.6-4.5-12.1.1-16.7l12.5-12.5v-8.7c0-3-1.2-5.9-3.3-8l-9.4-9.4c-2.1-2.1-5-3.3-8-3.3h-16c-6.2 0-11.3-5.1-11.3-11.3 0-3 1.2-5.9 3.3-8l9.4-9.4c2.1-2.1 5-3.3 8-3.3h32c6.2 0 11.3-5.1 11.3-11.3v-9.4c0-6.2-5.1-11.3-11.3-11.3h-36.7c-8.8 0-16 7.2-16 16v4.5c0 6.9-4.4 13-10.9 15.2l-31.6 10.5c-3.3 1.1-5.5 4.1-5.5 7.6v2.2c0 4.4-3.6 8-8 8h-16c-4.4 0-8-3.6-8-8s-3.6-8-8-8H247c-3 0-5.8 1.7-7.2 4.4l-9.4 18.7c-2.7 5.4-8.2 8.8-14.3 8.8H194c-8.8 0-16-7.2-16-16V199c0-4.2 1.7-8.3 4.7-11.3l20.1-20.1c4.6-4.6 7.2-10.9 7.2-17.5 0-3.4 2.2-6.5 5.5-7.6l40-13.3c1.7-.6 3.2-1.5 4.4-2.7l26.8-26.8c2.1-2.1 3.3-5 3.3-8 0-6.2-5.1-11.3-11.3-11.3H258l-16 16v8c0 4.4-3.6 8-8 8h-16c-4.4 0-8-3.6-8-8v-20c0-2.5 1.2-4.9 3.2-6.4l28.9-21.7c1.9-.1 3.8-.3 5.7-.3C358.3 56 448 145.7 448 256zM130.1 149.1c0-3 1.2-5.9 3.3-8l25.4-25.4c2.1-2.1 5-3.3 8-3.3 6.2 0 11.3 5.1 11.3 11.3v16c0 3-1.2 5.9-3.3 8l-9.4 9.4c-2.1 2.1-5 3.3-8 3.3h-16c-6.2 0-11.3-5.1-11.3-11.3zm128 306.4v-7.1c0-8.8-7.2-16-16-16h-20.2c-10.8 0-26.7-5.3-35.4-11.8l-22.2-16.7c-11.5-8.6-18.2-22.1-18.2-36.4v-23.9c0-16 8.4-30.8 22.1-39l42.9-25.7c7.1-4.2 15.2-6.5 23.4-6.5h31.2c10.9 0 21.4 3.9 29.6 10.9l43.2 37.1h18.3c8.5 0 16.6 3.4 22.6 9.4l17.3 17.3c3.4 3.4 8.1 5.3 12.9 5.3H423c-32.4 58.9-93.8 99.5-164.9 103.1z"]},yo={prefix:"fas",iconName:"golf-ball",icon:[416,512,[],"f450","M96 416h224c0 17.7-14.3 32-32 32h-16c-17.7 0-32 14.3-32 32v20c0 6.6-5.4 12-12 12h-40c-6.6 0-12-5.4-12-12v-20c0-17.7-14.3-32-32-32h-16c-17.7 0-32-14.3-32-32zm320-208c0 74.2-39 139.2-97.5 176h-221C39 347.2 0 282.2 0 208 0 93.1 93.1 0 208 0s208 93.1 208 208zm-180.1 43.9c18.3 0 33.1-14.8 33.1-33.1 0-14.4-9.3-26.3-22.1-30.9 9.6 26.8-15.6 51.3-41.9 41.9 4.6 12.8 16.5 22.1 30.9 22.1zm49.1 46.9c0-14.4-9.3-26.3-22.1-30.9 9.6 26.8-15.6 51.3-41.9 41.9 4.6 12.8 16.5 22.1 30.9 22.1 18.3 0 33.1-14.9 33.1-33.1zm64-64c0-14.4-9.3-26.3-22.1-30.9 9.6 26.8-15.6 51.3-41.9 41.9 4.6 12.8 16.5 22.1 30.9 22.1 18.3 0 33.1-14.9 33.1-33.1z"]},Co={prefix:"fas",iconName:"gopuram",icon:[512,512,[],"f664","M496 352h-16V240c0-8.8-7.2-16-16-16h-16v-80c0-8.8-7.2-16-16-16h-16V16c0-8.8-7.2-16-16-16s-16 7.2-16 16v16h-64V16c0-8.8-7.2-16-16-16s-16 7.2-16 16v16h-64V16c0-8.8-7.2-16-16-16s-16 7.2-16 16v16h-64V16c0-8.8-7.2-16-16-16S96 7.2 96 16v112H80c-8.8 0-16 7.2-16 16v80H48c-8.8 0-16 7.2-16 16v112H16c-8.8 0-16 7.2-16 16v128c0 8.8 7.2 16 16 16h80V352h32V224h32v-96h32v96h-32v128h-32v160h80v-80c0-8.8 7.2-16 16-16h64c8.8 0 16 7.2 16 16v80h80V352h-32V224h-32v-96h32v96h32v128h32v160h80c8.8 0 16-7.2 16-16V368c0-8.8-7.2-16-16-16zM232 176c0-8.8 7.2-16 16-16h16c8.8 0 16 7.2 16 16v48h-48zm56 176h-64v-64c0-8.8 7.2-16 16-16h32c8.8 0 16 7.2 16 16z"]},bo={prefix:"fas",iconName:"graduation-cap",icon:[640,512,[],"f19d","M622.34 153.2L343.4 67.5c-15.2-4.67-31.6-4.67-46.79 0L17.66 153.2c-23.54 7.23-23.54 38.36 0 45.59l48.63 14.94c-10.67 13.19-17.23 29.28-17.88 46.9C38.78 266.15 32 276.11 32 288c0 10.78 5.68 19.85 13.86 25.65L20.33 428.53C18.11 438.52 25.71 448 35.94 448h56.11c10.24 0 17.84-9.48 15.62-19.47L82.14 313.65C90.32 307.85 96 298.78 96 288c0-11.57-6.47-21.25-15.66-26.87.76-15.02 8.44-28.3 20.69-36.72L296.6 284.5c9.06 2.78 26.44 6.25 46.79 0l278.95-85.7c23.55-7.24 23.55-38.36 0-45.6zM352.79 315.09c-28.53 8.76-52.84 3.92-65.59 0l-145.02-44.55L128 384c0 35.35 85.96 64 192 64s192-28.65 192-64l-14.18-113.47-145.03 44.56z"]},So={prefix:"fas",iconName:"greater-than",icon:[384,512,[],"f531","M365.52 209.85L59.22 67.01c-16.06-7.49-35.15-.54-42.64 15.52L3.01 111.61c-7.49 16.06-.54 35.15 15.52 42.64L236.96 256.1 18.49 357.99C2.47 365.46-4.46 384.5 3.01 400.52l13.52 29C24 445.54 43.04 452.47 59.06 445l306.47-142.91a32.003 32.003 0 0 0 18.48-29v-34.23c-.01-12.45-7.21-23.76-18.49-29.01z"]},wo={prefix:"fas",iconName:"greater-than-equal",icon:[448,512,[],"f532","M55.22 107.69l175.56 68.09-175.44 68.05c-18.39 6.03-27.88 24.39-21.2 41l12.09 30.08c6.68 16.61 26.99 25.19 45.38 19.15L393.02 214.2c13.77-4.52 22.98-16.61 22.98-30.17v-15.96c0-13.56-9.21-25.65-22.98-30.17L91.3 17.92c-18.29-6-38.51 2.53-45.15 19.06L34.12 66.9c-6.64 16.53 2.81 34.79 21.1 40.79zM424 400H24c-13.25 0-24 10.74-24 24v48c0 13.25 10.75 24 24 24h400c13.25 0 24-10.75 24-24v-48c0-13.26-10.75-24-24-24z"]},xo={prefix:"fas",iconName:"grimace",icon:[496,512,[],"f57f","M248 8C111 8 0 119 0 256s111 248 248 248 248-111 248-248S385 8 248 8zM144 400h-8c-17.7 0-32-14.3-32-32v-8h40v40zm0-56h-40v-8c0-17.7 14.3-32 32-32h8v40zm-8-136c0-17.7 14.3-32 32-32s32 14.3 32 32-14.3 32-32 32-32-14.3-32-32zm72 192h-48v-40h48v40zm0-56h-48v-40h48v40zm64 56h-48v-40h48v40zm0-56h-48v-40h48v40zm64 56h-48v-40h48v40zm0-56h-48v-40h48v40zm-8-104c-17.7 0-32-14.3-32-32s14.3-32 32-32 32 14.3 32 32-14.3 32-32 32zm64 128c0 17.7-14.3 32-32 32h-8v-40h40v8zm0-24h-40v-40h8c17.7 0 32 14.3 32 32v8z"]},Eo={prefix:"fas",iconName:"grin",icon:[496,512,[],"f580","M248 8C111 8 0 119 0 256s111 248 248 248 248-111 248-248S385 8 248 8zm80 168c17.7 0 32 14.3 32 32s-14.3 32-32 32-32-14.3-32-32 14.3-32 32-32zm-160 0c17.7 0 32 14.3 32 32s-14.3 32-32 32-32-14.3-32-32 14.3-32 32-32zm80 256c-60.6 0-134.5-38.3-143.8-93.3-2-11.8 9.3-21.6 20.7-17.9C155.1 330.5 200 336 248 336s92.9-5.5 123.1-15.2c11.3-3.7 22.6 6.1 20.7 17.9-9.3 55-83.2 93.3-143.8 93.3z"]},Mo={prefix:"fas",iconName:"grin-alt",icon:[496,512,[],"f581","M248 8C111 8 0 119 0 256s111 248 248 248 248-111 248-248S385 8 248 8zm63.7 128.7c7.6-11.4 24.7-11.7 32.7 0 12.4 18.4 15.1 36.9 15.7 55.3-.5 18.4-3.3 36.9-15.7 55.3-7.6 11.4-24.7 11.7-32.7 0-12.4-18.4-15.1-36.9-15.7-55.3.5-18.4 3.3-36.9 15.7-55.3zm-160 0c7.6-11.4 24.7-11.7 32.7 0 12.4 18.4 15.1 36.9 15.7 55.3-.5 18.4-3.3 36.9-15.7 55.3-7.6 11.4-24.7 11.7-32.7 0-12.4-18.4-15.1-36.9-15.7-55.3.5-18.4 3.3-36.9 15.7-55.3zM248 432c-60.6 0-134.5-38.3-143.8-93.3-2-11.8 9.3-21.6 20.7-17.9C155.1 330.5 200 336 248 336s92.9-5.5 123.1-15.2c11.4-3.7 22.6 6.1 20.7 17.9-9.3 55-83.2 93.3-143.8 93.3z"]},Ao={prefix:"fas",iconName:"grin-beam",icon:[496,512,[],"f582","M248 8C111 8 0 119 0 256s111 248 248 248 248-111 248-248S385 8 248 8zm80 144c23.8 0 52.7 29.3 56 71.4.7 8.6-10.8 11.9-14.9 4.5l-9.5-17c-7.7-13.7-19.2-21.6-31.5-21.6s-23.8 7.9-31.5 21.6l-9.5 17c-4.1 7.3-15.6 4-14.9-4.5 3.1-42.1 32-71.4 55.8-71.4zm-160 0c23.8 0 52.7 29.3 56 71.4.7 8.6-10.8 11.9-14.9 4.5l-9.5-17c-7.7-13.7-19.2-21.6-31.5-21.6s-23.8 7.9-31.5 21.6l-9.5 17c-4.2 7.4-15.6 4-14.9-4.5 3.1-42.1 32-71.4 55.8-71.4zm80 280c-60.6 0-134.5-38.3-143.8-93.3-2-11.9 9.4-21.6 20.7-17.9C155.1 330.5 200 336 248 336s92.9-5.5 123.1-15.2c11.4-3.7 22.6 6.1 20.7 17.9-9.3 55-83.2 93.3-143.8 93.3z"]},To={prefix:"fas",iconName:"grin-beam-sweat",icon:[504,512,[],"f583","M456 128c26.5 0 48-21 48-47 0-20-28.5-60.4-41.6-77.8-3.2-4.3-9.6-4.3-12.8 0C436.5 20.6 408 61 408 81c0 26 21.5 47 48 47zm0 32c-44.1 0-80-35.4-80-79 0-4.4.3-14.2 8.1-32.2C345 23.1 298.3 8 248 8 111 8 0 119 0 256s111 248 248 248 248-111 248-248c0-35.1-7.4-68.4-20.5-98.6-6.3 1.5-12.7 2.6-19.5 2.6zm-128-8c23.8 0 52.7 29.3 56 71.4.7 8.6-10.8 12-14.9 4.5l-9.5-17c-7.7-13.7-19.2-21.6-31.5-21.6s-23.8 7.9-31.5 21.6l-9.5 17c-4.1 7.4-15.6 4-14.9-4.5 3.1-42.1 32-71.4 55.8-71.4zm-160 0c23.8 0 52.7 29.3 56 71.4.7 8.6-10.8 12-14.9 4.5l-9.5-17c-7.7-13.7-19.2-21.6-31.5-21.6s-23.8 7.9-31.5 21.6l-9.5 17c-4.2 7.4-15.6 4-14.9-4.5 3.1-42.1 32-71.4 55.8-71.4zm80 280c-60.6 0-134.5-38.3-143.8-93.3-2-11.8 9.3-21.6 20.7-17.9C155.1 330.5 200 336 248 336s92.9-5.5 123.1-15.2c11.5-3.7 22.6 6.2 20.7 17.9-9.3 55-83.2 93.3-143.8 93.3z"]},Do={prefix:"fas",iconName:"grin-hearts",icon:[496,512,[],"f584","M248 8C111 8 0 119 0 256s111 248 248 248 248-111 248-248S385 8 248 8zM90.4 183.6c6.7-17.6 26.7-26.7 44.9-21.9l7.1 1.9 2-7.1c5-18.1 22.8-30.9 41.5-27.9 21.4 3.4 34.4 24.2 28.8 44.5L195.3 243c-1.2 4.5-5.9 7.2-10.5 6l-70.2-18.2c-20.4-5.4-31.9-27-24.2-47.2zM248 432c-60.6 0-134.5-38.3-143.8-93.3-2-11.8 9.2-21.5 20.7-17.9C155.1 330.5 200 336 248 336s92.9-5.5 123.1-15.2c11.4-3.6 22.6 6.1 20.7 17.9-9.3 55-83.2 93.3-143.8 93.3zm133.4-201.3l-70.2 18.2c-4.5 1.2-9.2-1.5-10.5-6L281.3 173c-5.6-20.3 7.4-41.1 28.8-44.5 18.6-3 36.4 9.8 41.5 27.9l2 7.1 7.1-1.9c18.2-4.7 38.2 4.3 44.9 21.9 7.7 20.3-3.8 41.9-24.2 47.2z"]},Io={prefix:"fas",iconName:"grin-squint",icon:[496,512,[],"f585","M248 8C111 8 0 119 0 256s111 248 248 248 248-111 248-248S385 8 248 8zm33.8 189.7l80-48c11.6-6.9 24 7.7 15.4 18L343.6 208l33.6 40.3c8.7 10.4-3.9 24.8-15.4 18l-80-48c-7.7-4.7-7.7-15.9 0-20.6zm-163-30c-8.6-10.3 3.8-24.9 15.4-18l80 48c7.8 4.7 7.8 15.9 0 20.6l-80 48c-11.5 6.8-24-7.6-15.4-18l33.6-40.3-33.6-40.3zM248 432c-60.6 0-134.5-38.3-143.8-93.3-2-11.9 9.4-21.6 20.7-17.9C155.1 330.5 200 336 248 336s92.9-5.5 123.1-15.2c11.5-3.7 22.6 6.2 20.7 17.9-9.3 55-83.2 93.3-143.8 93.3z"]},Ro={prefix:"fas",iconName:"grin-squint-tears",icon:[512,512,[],"f586","M409.6 111.9c22.6-3.2 73.5-12 88.3-26.8 19.2-19.2 18.9-50.6-.7-70.2S446-5 426.9 14.2c-14.8 14.8-23.5 65.7-26.8 88.3-.8 5.5 3.9 10.2 9.5 9.4zM102.4 400.1c-22.6 3.2-73.5 12-88.3 26.8-19.1 19.1-18.8 50.6.8 70.2s51 19.9 70.2.7c14.8-14.8 23.5-65.7 26.8-88.3.8-5.5-3.9-10.2-9.5-9.4zm311.7-256.5c-33 3.9-48.6-25.1-45.7-45.7 3.4-24 7.4-42.1 11.5-56.5C285.1-13.4 161.8-.5 80.6 80.6-.5 161.7-13.4 285 41.4 379.9c14.4-4.1 32.4-8 56.5-11.5 33.2-3.9 48.6 25.2 45.7 45.7-3.4 24-7.4 42.1-11.5 56.5 94.8 54.8 218.1 41.9 299.3-39.2s94-204.4 39.2-299.3c-14.4 4.1-32.5 8-56.5 11.5zM255.7 106c3.3-13.2 22.4-11.5 23.6 1.8l4.8 52.3 52.3 4.8c13.4 1.2 14.9 20.3 1.8 23.6l-90.5 22.6c-8.9 2.2-16.7-5.9-14.5-14.5l22.5-90.6zm-90.9 230.3L160 284l-52.3-4.8c-13.4-1.2-14.9-20.3-1.8-23.6l90.5-22.6c8.8-2.2 16.7 5.8 14.5 14.5L188.3 338c-3.1 13.2-22.2 11.7-23.5-1.7zm215.7 44.2c-29.3 29.3-75.7 50.4-116.7 50.4-18.9 0-36.6-4.5-51-14.7-9.8-6.9-8.7-21.8 2-27.2 28.3-14.6 63.9-42.4 97.8-76.3s61.7-69.6 76.3-97.8c5.4-10.5 20.2-11.9 27.3-2 32.3 45.3 7.1 124.7-35.7 167.6z"]},Lo={prefix:"fas",iconName:"grin-stars",icon:[496,512,[],"f587","M248 8C111 8 0 119 0 256s111 248 248 248 248-111 248-248S385 8 248 8zM94.6 168.9l34.9-5 15.5-31.6c2.9-5.8 11-5.8 13.9 0l15.5 31.6 34.9 5c6.2 1 8.9 8.6 4.3 13.2l-25.4 24.6 6 34.9c1 6.2-5.3 11-11 7.9L152 233.3l-31.3 16.3c-5.7 3.1-12-1.7-11-7.9l6-34.9-25.4-24.6c-4.6-4.7-1.9-12.3 4.3-13.3zM248 432c-60.6 0-134.5-38.3-143.8-93.3-2-11.8 9.3-21.5 20.7-17.9C155.1 330.5 200 336 248 336s92.9-5.5 123.1-15.2c11.5-3.7 22.6 6.1 20.7 17.9-9.3 55-83.2 93.3-143.8 93.3zm157.7-249.9l-25.4 24.6 6 34.9c1 6.2-5.3 11-11 7.9L344 233.3l-31.3 16.3c-5.7 3.1-12-1.7-11-7.9l6-34.9-25.4-24.6c-4.5-4.6-1.9-12.2 4.3-13.2l34.9-5 15.5-31.6c2.9-5.8 11-5.8 13.9 0l15.5 31.6 34.9 5c6.3.9 9 8.5 4.4 13.1z"]},ko={prefix:"fas",iconName:"grin-tears",icon:[640,512,[],"f588","M102.4 256.1c-22.6 3.2-73.5 12-88.3 26.8-19.1 19.1-18.8 50.6.8 70.2s51 19.9 70.2.7c14.8-14.8 23.5-65.7 26.8-88.3.8-5.5-3.9-10.2-9.5-9.4zm523.4 26.8c-14.8-14.8-65.7-23.5-88.3-26.8-5.5-.8-10.3 3.9-9.5 9.5 3.2 22.6 12 73.5 26.8 88.3 19.2 19.2 50.6 18.9 70.2-.7s20-51.2.8-70.3zm-129.4-12.8c-3.8-26.6 19.1-49.5 45.7-45.7 8.9 1.3 16.8 2.7 24.3 4.1C552.7 104.5 447.7 8 320 8S87.3 104.5 73.6 228.5c7.5-1.4 15.4-2.8 24.3-4.1 33.2-3.9 48.6 25.3 45.7 45.7-11.8 82.3-29.9 100.4-35.8 106.4-.9.9-2 1.6-3 2.5 42.7 74.6 123 125 215.2 125s172.5-50.4 215.2-125.1c-1-.9-2.1-1.5-3-2.5-5.9-5.9-24-24-35.8-106.3zM400 152c23.8 0 52.7 29.3 56 71.4.7 8.6-10.8 12-14.9 4.5l-9.5-17c-7.7-13.7-19.2-21.6-31.5-21.6s-23.8 7.9-31.5 21.6l-9.5 17c-4.2 7.4-15.6 4-14.9-4.5 3.1-42.1 32-71.4 55.8-71.4zm-160 0c23.8 0 52.7 29.3 56 71.4.7 8.6-10.8 12-14.9 4.5l-9.5-17c-7.7-13.7-19.2-21.6-31.5-21.6s-23.8 7.9-31.5 21.6l-9.5 17c-4.2 7.4-15.6 4-14.9-4.5 3.1-42.1 32-71.4 55.8-71.4zm80 280c-60.6 0-134.5-38.3-143.8-93.3-2-11.7 9.2-21.6 20.7-17.9C227.1 330.5 272 336 320 336s92.9-5.5 123.1-15.2c11.4-3.7 22.6 6.1 20.7 17.9-9.3 55-83.2 93.3-143.8 93.3z"]},Po={prefix:"fas",iconName:"grin-tongue",icon:[496,512,[],"f589","M248 8C111 8 0 119 0 256c0 106.3 67 196.7 161 232-5.6-12.2-9-25.7-9-40v-45.5c-24.7-16.2-43.5-38.1-47.8-63.8-2-11.8 9.3-21.5 20.7-17.9C155.1 330.5 200 336 248 336s92.9-5.5 123.1-15.2c11.4-3.6 22.6 6.1 20.7 17.9-4.3 25.7-23.1 47.6-47.8 63.8V448c0 14.3-3.4 27.8-9 40 94-35.3 161-125.7 161-232C496 119 385 8 248 8zm-80 232c-17.7 0-32-14.3-32-32s14.3-32 32-32 32 14.3 32 32-14.3 32-32 32zm160 0c-17.7 0-32-14.3-32-32s14.3-32 32-32 32 14.3 32 32-14.3 32-32 32zm-34.9 134.6c-14.4-6.5-31.1 2.2-34.6 17.6l-1.8 7.8c-2.1 9.2-15.2 9.2-17.3 0l-1.8-7.8c-3.5-15.4-20.2-24.1-34.6-17.6-.9.4.3-.2-18.9 9.4v63c0 35.2 28 64.5 63.1 64.9 35.7.5 64.9-28.4 64.9-64v-64c-19.5-9.6-18.2-8.9-19-9.3z"]},No={prefix:"fas",iconName:"grin-tongue-squint",icon:[496,512,[],"f58a","M293.1 374.6c-14.4-6.5-31.1 2.2-34.6 17.6l-1.8 7.8c-2.1 9.2-15.2 9.2-17.3 0l-1.8-7.8c-3.5-15.4-20.2-24.1-34.6-17.6-.9.4.3-.2-18.9 9.4v63c0 35.2 28 64.5 63.1 64.9 35.7.5 64.9-28.4 64.9-64v-64c-19.5-9.6-18.2-8.9-19-9.3zM248 8C111 8 0 119 0 256c0 106.3 67 196.7 161 232-5.6-12.2-9-25.7-9-40v-45.5c-24.7-16.2-43.5-38.1-47.8-63.8-2-11.8 9.2-21.5 20.7-17.9C155.1 330.5 200 336 248 336s92.9-5.5 123.1-15.2c11.4-3.7 22.6 6.1 20.7 17.9-4.3 25.7-23.1 47.6-47.8 63.8V448c0 14.3-3.4 27.8-9 40 94-35.3 161-125.7 161-232C496 119 385 8 248 8zm-33.8 210.3l-80 48c-11.5 6.8-24-7.6-15.4-18l33.6-40.3-33.6-40.3c-8.6-10.3 3.8-24.9 15.4-18l80 48c7.7 4.7 7.7 15.9 0 20.6zm163 30c8.7 10.4-3.9 24.8-15.4 18l-80-48c-7.8-4.7-7.8-15.9 0-20.6l80-48c11.7-6.9 23.9 7.7 15.4 18L343.6 208l33.6 40.3z"]},Oo={prefix:"fas",iconName:"grin-tongue-wink",icon:[496,512,[],"f58b","M344 184c-13.3 0-24 10.7-24 24s10.7 24 24 24 24-10.7 24-24-10.7-24-24-24zM248 8C111 8 0 119 0 256c0 106.3 67 196.7 161 232-5.6-12.2-9-25.7-9-40v-45.5c-24.7-16.2-43.5-38.1-47.8-63.8-2-11.8 9.3-21.5 20.7-17.9C155.1 330.5 200 336 248 336s92.9-5.5 123.1-15.2c11.5-3.7 22.6 6.1 20.7 17.9-4.3 25.7-23.1 47.6-47.8 63.8V448c0 14.3-3.4 27.8-9 40 94-35.3 161-125.7 161-232C496 119 385 8 248 8zm-56 225l-9.5-8.5c-14.8-13.2-46.2-13.2-61 0L112 233c-8.5 7.4-21.6.3-19.8-10.8 4-25.2 34.2-42.1 59.9-42.1S208 197 212 222.2c1.6 11.1-11.6 18.2-20 10.8zm152 39c-35.3 0-64-28.7-64-64s28.7-64 64-64 64 28.7 64 64-28.7 64-64 64zm-50.9 102.6c-14.4-6.5-31.1 2.2-34.6 17.6l-1.8 7.8c-2.1 9.2-15.2 9.2-17.3 0l-1.8-7.8c-3.5-15.4-20.2-24.1-34.6-17.6-.9.4.3-.2-18.9 9.4v63c0 35.2 28 64.5 63.1 64.9 35.7.5 64.9-28.4 64.9-64v-64c-19.5-9.6-18.2-8.9-19-9.3z"]},_o={prefix:"fas",iconName:"grin-wink",icon:[496,512,[],"f58c","M0 256c0 137 111 248 248 248s248-111 248-248S385 8 248 8 0 119 0 256zm200-48c0 17.7-14.3 32-32 32s-32-14.3-32-32 14.3-32 32-32 32 14.3 32 32zm168 25l-9.5-8.5c-14.8-13.2-46.2-13.2-61 0L288 233c-8.3 7.4-21.6.4-19.8-10.8 4-25.2 34.2-42.1 59.9-42.1S384 197 388 222.2c1.6 11-11.5 18.2-20 10.8zm-243.1 87.8C155.1 330.5 200 336 248 336s92.9-5.5 123.1-15.2c11.3-3.7 22.6 6 20.7 17.9-9.2 55-83.2 93.3-143.8 93.3s-134.5-38.3-143.8-93.3c-2-11.9 9.3-21.6 20.7-17.9z"]},Fo={prefix:"fas",iconName:"grip-horizontal",icon:[448,512,[],"f58d","M96 288H32c-17.67 0-32 14.33-32 32v64c0 17.67 14.33 32 32 32h64c17.67 0 32-14.33 32-32v-64c0-17.67-14.33-32-32-32zm160 0h-64c-17.67 0-32 14.33-32 32v64c0 17.67 14.33 32 32 32h64c17.67 0 32-14.33 32-32v-64c0-17.67-14.33-32-32-32zm160 0h-64c-17.67 0-32 14.33-32 32v64c0 17.67 14.33 32 32 32h64c17.67 0 32-14.33 32-32v-64c0-17.67-14.33-32-32-32zM96 96H32c-17.67 0-32 14.33-32 32v64c0 17.67 14.33 32 32 32h64c17.67 0 32-14.33 32-32v-64c0-17.67-14.33-32-32-32zm160 0h-64c-17.67 0-32 14.33-32 32v64c0 17.67 14.33 32 32 32h64c17.67 0 32-14.33 32-32v-64c0-17.67-14.33-32-32-32zm160 0h-64c-17.67 0-32 14.33-32 32v64c0 17.67 14.33 32 32 32h64c17.67 0 32-14.33 32-32v-64c0-17.67-14.33-32-32-32z"]},Go={prefix:"fas",iconName:"grip-lines",icon:[512,512,[],"f7a4","M496 288H16c-8.8 0-16 7.2-16 16v32c0 8.8 7.2 16 16 16h480c8.8 0 16-7.2 16-16v-32c0-8.8-7.2-16-16-16zm0-128H16c-8.8 0-16 7.2-16 16v32c0 8.8 7.2 16 16 16h480c8.8 0 16-7.2 16-16v-32c0-8.8-7.2-16-16-16z"]},Vo={prefix:"fas",iconName:"grip-lines-vertical",icon:[256,512,[],"f7a5","M96 496V16c0-8.8-7.2-16-16-16H48c-8.8 0-16 7.2-16 16v480c0 8.8 7.2 16 16 16h32c8.8 0 16-7.2 16-16zm128 0V16c0-8.8-7.2-16-16-16h-32c-8.8 0-16 7.2-16 16v480c0 8.8 7.2 16 16 16h32c8.8 0 16-7.2 16-16z"]},Bo={prefix:"fas",iconName:"grip-vertical",icon:[320,512,[],"f58e","M96 32H32C14.33 32 0 46.33 0 64v64c0 17.67 14.33 32 32 32h64c17.67 0 32-14.33 32-32V64c0-17.67-14.33-32-32-32zm0 160H32c-17.67 0-32 14.33-32 32v64c0 17.67 14.33 32 32 32h64c17.67 0 32-14.33 32-32v-64c0-17.67-14.33-32-32-32zm0 160H32c-17.67 0-32 14.33-32 32v64c0 17.67 14.33 32 32 32h64c17.67 0 32-14.33 32-32v-64c0-17.67-14.33-32-32-32zM288 32h-64c-17.67 0-32 14.33-32 32v64c0 17.67 14.33 32 32 32h64c17.67 0 32-14.33 32-32V64c0-17.67-14.33-32-32-32zm0 160h-64c-17.67 0-32 14.33-32 32v64c0 17.67 14.33 32 32 32h64c17.67 0 32-14.33 32-32v-64c0-17.67-14.33-32-32-32zm0 160h-64c-17.67 0-32 14.33-32 32v64c0 17.67 14.33 32 32 32h64c17.67 0 32-14.33 32-32v-64c0-17.67-14.33-32-32-32z"]},Ho={prefix:"fas",iconName:"guitar",icon:[512,512,[],"f7a6","M502.63 39L473 9.37a32 32 0 0 0-45.26 0L381.46 55.7a35.14 35.14 0 0 0-8.53 13.79L360.77 106l-76.26 76.26c-12.16-8.76-25.5-15.74-40.1-19.14-33.45-7.78-67-.88-89.88 22a82.45 82.45 0 0 0-20.24 33.47c-6 18.56-23.21 32.69-42.15 34.46-23.7 2.27-45.73 11.45-62.61 28.44C-16.11 327-7.9 409 47.58 464.45S185 528 230.56 482.52c17-16.88 26.16-38.9 28.45-62.71 1.76-18.85 15.89-36.13 34.43-42.14a82.6 82.6 0 0 0 33.48-20.25c22.87-22.88 29.74-56.36 22-89.75-3.39-14.64-10.37-28-19.16-40.2L406 151.23l36.48-12.16a35.14 35.14 0 0 0 13.79-8.53l46.33-46.32a32 32 0 0 0 .03-45.22zM208 352a48 48 0 1 1 48-48 48 48 0 0 1-48 48z"]},zo={prefix:"fas",iconName:"h-square",icon:[448,512,[],"f0fd","M448 80v352c0 26.51-21.49 48-48 48H48c-26.51 0-48-21.49-48-48V80c0-26.51 21.49-48 48-48h352c26.51 0 48 21.49 48 48zm-112 48h-32c-8.837 0-16 7.163-16 16v80H160v-80c0-8.837-7.163-16-16-16h-32c-8.837 0-16 7.163-16 16v224c0 8.837 7.163 16 16 16h32c8.837 0 16-7.163 16-16v-80h128v80c0 8.837 7.163 16 16 16h32c8.837 0 16-7.163 16-16V144c0-8.837-7.163-16-16-16z"]},Uo={prefix:"fas",iconName:"hamburger",icon:[512,512,[],"f805","M464 256H48a48 48 0 0 0 0 96h416a48 48 0 0 0 0-96zm16 128H32a16 16 0 0 0-16 16v16a64 64 0 0 0 64 64h352a64 64 0 0 0 64-64v-16a16 16 0 0 0-16-16zM58.64 224h394.72c34.57 0 54.62-43.9 34.82-75.88C448 83.2 359.55 32.1 256 32c-103.54.1-192 51.2-232.18 116.11C4 180.09 24.07 224 58.64 224zM384 112a16 16 0 1 1-16 16 16 16 0 0 1 16-16zM256 80a16 16 0 1 1-16 16 16 16 0 0 1 16-16zm-128 32a16 16 0 1 1-16 16 16 16 0 0 1 16-16z"]},Wo={prefix:"fas",iconName:"hammer",icon:[576,512,[],"f6e3","M571.31 193.94l-22.63-22.63c-6.25-6.25-16.38-6.25-22.63 0l-11.31 11.31-28.9-28.9c5.63-21.31.36-44.9-16.35-61.61l-45.25-45.25c-62.48-62.48-163.79-62.48-226.28 0l90.51 45.25v18.75c0 16.97 6.74 33.25 18.75 45.25l49.14 49.14c16.71 16.71 40.3 21.98 61.61 16.35l28.9 28.9-11.31 11.31c-6.25 6.25-6.25 16.38 0 22.63l22.63 22.63c6.25 6.25 16.38 6.25 22.63 0l90.51-90.51c6.23-6.24 6.23-16.37-.02-22.62zm-286.72-15.2c-3.7-3.7-6.84-7.79-9.85-11.95L19.64 404.96c-25.57 23.88-26.26 64.19-1.53 88.93s65.05 24.05 88.93-1.53l238.13-255.07c-3.96-2.91-7.9-5.87-11.44-9.41l-49.14-49.14z"]},jo={prefix:"fas",iconName:"hamsa",icon:[512,512,[],"f665","M509.34 307.25C504.28 295.56 492.75 288 480 288h-64V80c0-22-18-40-40-40s-40 18-40 40v134c0 5.52-4.48 10-10 10h-20c-5.52 0-10-4.48-10-10V40c0-22-18-40-40-40s-40 18-40 40v174c0 5.52-4.48 10-10 10h-20c-5.52 0-10-4.48-10-10V80c0-22-18-40-40-40S96 58 96 80v208H32c-12.75 0-24.28 7.56-29.34 19.25a31.966 31.966 0 0 0 5.94 34.58l102.69 110.03C146.97 490.08 199.69 512 256 512s109.03-21.92 144.72-60.14L503.4 341.83a31.966 31.966 0 0 0 5.94-34.58zM256 416c-53.02 0-96-64-96-64s42.98-64 96-64 96 64 96 64-42.98 64-96 64zm0-96c-17.67 0-32 14.33-32 32s14.33 32 32 32 32-14.33 32-32-14.33-32-32-32z"]},Ko={prefix:"fas",iconName:"hand-holding",icon:[576,512,[],"f4bd","M565.3 328.1c-11.8-10.7-30.2-10-42.6 0L430.3 402c-11.3 9.1-25.4 14-40 14H272c-8.8 0-16-7.2-16-16s7.2-16 16-16h78.3c15.9 0 30.7-10.9 33.3-26.6 3.3-20-12.1-37.4-31.6-37.4H192c-27 0-53.1 9.3-74.1 26.3L71.4 384H16c-8.8 0-16 7.2-16 16v96c0 8.8 7.2 16 16 16h356.8c14.5 0 28.6-4.9 40-14L564 377c15.2-12.1 16.4-35.3 1.3-48.9z"]},$o={prefix:"fas",iconName:"hand-holding-heart",icon:[576,512,[],"f4be","M275.3 250.5c7 7.4 18.4 7.4 25.5 0l108.9-114.2c31.6-33.2 29.8-88.2-5.6-118.8-30.8-26.7-76.7-21.9-104.9 7.7L288 36.9l-11.1-11.6C248.7-4.4 202.8-9.2 172 17.5c-35.3 30.6-37.2 85.6-5.6 118.8l108.9 114.2zm290 77.6c-11.8-10.7-30.2-10-42.6 0L430.3 402c-11.3 9.1-25.4 14-40 14H272c-8.8 0-16-7.2-16-16s7.2-16 16-16h78.3c15.9 0 30.7-10.9 33.3-26.6 3.3-20-12.1-37.4-31.6-37.4H192c-27 0-53.1 9.3-74.1 26.3L71.4 384H16c-8.8 0-16 7.2-16 16v96c0 8.8 7.2 16 16 16h356.8c14.5 0 28.6-4.9 40-14L564 377c15.2-12.1 16.4-35.3 1.3-48.9z"]},Yo={prefix:"fas",iconName:"hand-holding-medical",icon:[576,512,[],"e05c","M159.88,175.82h64v64a16,16,0,0,0,16,16h64a16,16,0,0,0,16-16v-64h64a16,16,0,0,0,16-16v-64a16,16,0,0,0-16-16h-64v-64a16,16,0,0,0-16-16h-64a16,16,0,0,0-16,16v64h-64a16,16,0,0,0-16,16v64A16,16,0,0,0,159.88,175.82ZM568.07,336.13a39.91,39.91,0,0,0-55.93-8.47L392.47,415.84H271.86a16,16,0,0,1,0-32H350.1c16,0,30.75-10.87,33.37-26.61a32.06,32.06,0,0,0-31.62-37.38h-160a117.7,117.7,0,0,0-74.12,26.25l-46.5,37.74H15.87a16.11,16.11,0,0,0-16,16v96a16.11,16.11,0,0,0,16,16h347a104.8,104.8,0,0,0,61.7-20.27L559.6,392A40,40,0,0,0,568.07,336.13Z"]},qo={prefix:"fas",iconName:"hand-holding-usd",icon:[576,512,[],"f4c0","M271.06,144.3l54.27,14.3a8.59,8.59,0,0,1,6.63,8.1c0,4.6-4.09,8.4-9.12,8.4h-35.6a30,30,0,0,1-11.19-2.2c-5.24-2.2-11.28-1.7-15.3,2l-19,17.5a11.68,11.68,0,0,0-2.25,2.66,11.42,11.42,0,0,0,3.88,15.74,83.77,83.77,0,0,0,34.51,11.5V240c0,8.8,7.83,16,17.37,16h17.37c9.55,0,17.38-7.2,17.38-16V222.4c32.93-3.6,57.84-31,53.5-63-3.15-23-22.46-41.3-46.56-47.7L282.68,97.4a8.59,8.59,0,0,1-6.63-8.1c0-4.6,4.09-8.4,9.12-8.4h35.6A30,30,0,0,1,332,83.1c5.23,2.2,11.28,1.7,15.3-2l19-17.5A11.31,11.31,0,0,0,368.47,61a11.43,11.43,0,0,0-3.84-15.78,83.82,83.82,0,0,0-34.52-11.5V16c0-8.8-7.82-16-17.37-16H295.37C285.82,0,278,7.2,278,16V33.6c-32.89,3.6-57.85,31-53.51,63C227.63,119.6,247,137.9,271.06,144.3ZM565.27,328.1c-11.8-10.7-30.2-10-42.6,0L430.27,402a63.64,63.64,0,0,1-40,14H272a16,16,0,0,1,0-32h78.29c15.9,0,30.71-10.9,33.25-26.6a31.2,31.2,0,0,0,.46-5.46A32,32,0,0,0,352,320H192a117.66,117.66,0,0,0-74.1,26.29L71.4,384H16A16,16,0,0,0,0,400v96a16,16,0,0,0,16,16H372.77a64,64,0,0,0,40-14L564,377a32,32,0,0,0,1.28-48.9Z"]},Xo={prefix:"fas",iconName:"hand-holding-water",icon:[576,512,[],"f4c1","M288 256c53 0 96-42.1 96-94 0-40-57.1-120.7-83.2-155.6-6.4-8.5-19.2-8.5-25.6 0C249.1 41.3 192 122 192 162c0 51.9 43 94 96 94zm277.3 72.1c-11.8-10.7-30.2-10-42.6 0L430.3 402c-11.3 9.1-25.4 14-40 14H272c-8.8 0-16-7.2-16-16s7.2-16 16-16h78.3c15.9 0 30.7-10.9 33.3-26.6 3.3-20-12.1-37.4-31.6-37.4H192c-27 0-53.1 9.3-74.1 26.3L71.4 384H16c-8.8 0-16 7.2-16 16v96c0 8.8 7.2 16 16 16h356.8c14.5 0 28.6-4.9 40-14L564 377c15.2-12.1 16.4-35.3 1.3-48.9z"]},Zo={prefix:"fas",iconName:"hand-lizard",icon:[576,512,[],"f258","M384 480h192V363.778a95.998 95.998 0 0 0-14.833-51.263L398.127 54.368A48 48 0 0 0 357.544 32H24C10.745 32 0 42.745 0 56v16c0 30.928 25.072 56 56 56h229.981c12.844 0 21.556 13.067 16.615 24.923l-21.41 51.385A32 32 0 0 1 251.648 224H128c-35.346 0-64 28.654-64 64v8c0 13.255 10.745 24 24 24h147.406a47.995 47.995 0 0 1 25.692 7.455l111.748 70.811A24.001 24.001 0 0 1 384 418.539V480z"]},Qo={prefix:"fas",iconName:"hand-middle-finger",icon:[512,512,[],"f806","M479.93 317.12a37.33 37.33 0 0 0-28.28-36.19L416 272v-49.59c0-11.44-9.69-21.29-23.15-23.54l-38.4-6.4C336.63 189.5 320 200.86 320 216v32a8 8 0 0 1-16 0V50c0-26.28-20.25-49.2-46.52-50A48 48 0 0 0 208 48v200a8 8 0 0 1-16 0v-32c0-15.15-16.63-26.51-34.45-23.54l-30.68 5.12c-18 3-30.87 16.12-30.87 31.38V376a8 8 0 0 1-16 0v-76l-27.36 15A37.34 37.34 0 0 0 32 348.4v73.47a37.31 37.31 0 0 0 10.93 26.39l30.93 30.93A112 112 0 0 0 153.05 512h215A112 112 0 0 0 480 400z"]},Jo={prefix:"fas",iconName:"hand-paper",icon:[448,512,[],"f256","M408.781 128.007C386.356 127.578 368 146.36 368 168.79V256h-8V79.79c0-22.43-18.356-41.212-40.781-40.783C297.488 39.423 280 57.169 280 79v177h-8V40.79C272 18.36 253.644-.422 231.219.007 209.488.423 192 18.169 192 40v216h-8V80.79c0-22.43-18.356-41.212-40.781-40.783C121.488 40.423 104 58.169 104 80v235.992l-31.648-43.519c-12.993-17.866-38.009-21.817-55.877-8.823-17.865 12.994-21.815 38.01-8.822 55.877l125.601 172.705A48 48 0 0 0 172.073 512h197.59c22.274 0 41.622-15.324 46.724-37.006l26.508-112.66a192.011 192.011 0 0 0 5.104-43.975V168c.001-21.831-17.487-39.577-39.218-39.993z"]},ea={prefix:"fas",iconName:"hand-peace",icon:[448,512,[],"f25b","M408 216c-22.092 0-40 17.909-40 40h-8v-32c0-22.091-17.908-40-40-40s-40 17.909-40 40v32h-8V48c0-26.51-21.49-48-48-48s-48 21.49-48 48v208h-13.572L92.688 78.449C82.994 53.774 55.134 41.63 30.461 51.324 5.787 61.017-6.356 88.877 3.337 113.551l74.765 190.342-31.09 24.872c-15.381 12.306-19.515 33.978-9.741 51.081l64 112A39.998 39.998 0 0 0 136 512h240c18.562 0 34.686-12.77 38.937-30.838l32-136A39.97 39.97 0 0 0 448 336v-80c0-22.091-17.908-40-40-40z"]},ta={prefix:"fas",iconName:"hand-point-down",icon:[384,512,[],"f0a7","M91.826 467.2V317.966c-8.248 5.841-16.558 10.57-24.918 14.153C35.098 345.752-.014 322.222 0 288c.008-18.616 10.897-32.203 29.092-40 28.286-12.122 64.329-78.648 77.323-107.534 7.956-17.857 25.479-28.453 43.845-28.464l.001-.002h171.526c11.812 0 21.897 8.596 23.703 20.269 7.25 46.837 38.483 61.76 38.315 123.731-.007 2.724.195 13.254.195 16 0 50.654-22.122 81.574-71.263 72.6-9.297 18.597-39.486 30.738-62.315 16.45-21.177 24.645-53.896 22.639-70.944 6.299V467.2c0 24.15-20.201 44.8-43.826 44.8-23.283 0-43.826-21.35-43.826-44.8zM112 72V24c0-13.255 10.745-24 24-24h192c13.255 0 24 10.745 24 24v48c0 13.255-10.745 24-24 24H136c-13.255 0-24-10.745-24-24zm212-24c0-11.046-8.954-20-20-20s-20 8.954-20 20 8.954 20 20 20 20-8.954 20-20z"]},ia={prefix:"fas",iconName:"hand-point-left",icon:[512,512,[],"f0a5","M44.8 155.826h149.234c-5.841-8.248-10.57-16.558-14.153-24.918C166.248 99.098 189.778 63.986 224 64c18.616.008 32.203 10.897 40 29.092 12.122 28.286 78.648 64.329 107.534 77.323 17.857 7.956 28.453 25.479 28.464 43.845l.002.001v171.526c0 11.812-8.596 21.897-20.269 23.703-46.837 7.25-61.76 38.483-123.731 38.315-2.724-.007-13.254.195-16 .195-50.654 0-81.574-22.122-72.6-71.263-18.597-9.297-30.738-39.486-16.45-62.315-24.645-21.177-22.639-53.896-6.299-70.944H44.8c-24.15 0-44.8-20.201-44.8-43.826 0-23.283 21.35-43.826 44.8-43.826zM440 176h48c13.255 0 24 10.745 24 24v192c0 13.255-10.745 24-24 24h-48c-13.255 0-24-10.745-24-24V200c0-13.255 10.745-24 24-24zm24 212c11.046 0 20-8.954 20-20s-8.954-20-20-20-20 8.954-20 20 8.954 20 20 20z"]},na={prefix:"fas",iconName:"hand-point-right",icon:[512,512,[],"f0a4","M512 199.652c0 23.625-20.65 43.826-44.8 43.826h-99.851c16.34 17.048 18.346 49.766-6.299 70.944 14.288 22.829 2.147 53.017-16.45 62.315C353.574 425.878 322.654 448 272 448c-2.746 0-13.276-.203-16-.195-61.971.168-76.894-31.065-123.731-38.315C120.596 407.683 112 397.599 112 385.786V214.261l.002-.001c.011-18.366 10.607-35.889 28.464-43.845 28.886-12.994 95.413-49.038 107.534-77.323 7.797-18.194 21.384-29.084 40-29.092 34.222-.014 57.752 35.098 44.119 66.908-3.583 8.359-8.312 16.67-14.153 24.918H467.2c23.45 0 44.8 20.543 44.8 43.826zM96 200v192c0 13.255-10.745 24-24 24H24c-13.255 0-24-10.745-24-24V200c0-13.255 10.745-24 24-24h48c13.255 0 24 10.745 24 24zM68 368c0-11.046-8.954-20-20-20s-20 8.954-20 20 8.954 20 20 20 20-8.954 20-20z"]},sa={prefix:"fas",iconName:"hand-point-up",icon:[384,512,[],"f0a6","M135.652 0c23.625 0 43.826 20.65 43.826 44.8v99.851c17.048-16.34 49.766-18.346 70.944 6.299 22.829-14.288 53.017-2.147 62.315 16.45C361.878 158.426 384 189.346 384 240c0 2.746-.203 13.276-.195 16 .168 61.971-31.065 76.894-38.315 123.731C343.683 391.404 333.599 400 321.786 400H150.261l-.001-.002c-18.366-.011-35.889-10.607-43.845-28.464C93.421 342.648 57.377 276.122 29.092 264 10.897 256.203.008 242.616 0 224c-.014-34.222 35.098-57.752 66.908-44.119 8.359 3.583 16.67 8.312 24.918 14.153V44.8c0-23.45 20.543-44.8 43.826-44.8zM136 416h192c13.255 0 24 10.745 24 24v48c0 13.255-10.745 24-24 24H136c-13.255 0-24-10.745-24-24v-48c0-13.255 10.745-24 24-24zm168 28c-11.046 0-20 8.954-20 20s8.954 20 20 20 20-8.954 20-20-8.954-20-20-20z"]},ra={prefix:"fas",iconName:"hand-pointer",icon:[448,512,[],"f25a","M448 240v96c0 3.084-.356 6.159-1.063 9.162l-32 136C410.686 499.23 394.562 512 376 512H168a40.004 40.004 0 0 1-32.35-16.473l-127.997-176c-12.993-17.866-9.043-42.883 8.822-55.876 17.867-12.994 42.884-9.043 55.877 8.823L104 315.992V40c0-22.091 17.908-40 40-40s40 17.909 40 40v200h8v-40c0-22.091 17.908-40 40-40s40 17.909 40 40v40h8v-24c0-22.091 17.908-40 40-40s40 17.909 40 40v24h8c0-22.091 17.908-40 40-40s40 17.909 40 40zm-256 80h-8v96h8v-96zm88 0h-8v96h8v-96zm88 0h-8v96h8v-96z"]},oa={prefix:"fas",iconName:"hand-rock",icon:[512,512,[],"f255","M464.8 80c-26.9-.4-48.8 21.2-48.8 48h-8V96.8c0-26.3-20.9-48.3-47.2-48.8-26.9-.4-48.8 21.2-48.8 48v32h-8V80.8c0-26.3-20.9-48.3-47.2-48.8-26.9-.4-48.8 21.2-48.8 48v48h-8V96.8c0-26.3-20.9-48.3-47.2-48.8-26.9-.4-48.8 21.2-48.8 48v136l-8-7.1v-48.1c0-26.3-20.9-48.3-47.2-48.8C21.9 127.6 0 149.2 0 176v66.4c0 27.4 11.7 53.5 32.2 71.8l111.7 99.3c10.2 9.1 16.1 22.2 16.1 35.9v6.7c0 13.3 10.7 24 24 24h240c13.3 0 24-10.7 24-24v-2.9c0-12.8 2.6-25.5 7.5-37.3l49-116.3c5-11.8 7.5-24.5 7.5-37.3V128.8c0-26.3-20.9-48.4-47.2-48.8z"]},aa={prefix:"fas",iconName:"hand-scissors",icon:[512,512,[],"f257","M216 440c0-22.092 17.909-40 40-40v-8h-32c-22.091 0-40-17.908-40-40s17.909-40 40-40h32v-8H48c-26.51 0-48-21.49-48-48s21.49-48 48-48h208v-13.572l-177.551-69.74c-24.674-9.694-36.818-37.555-27.125-62.228 9.693-24.674 37.554-36.817 62.228-27.124l190.342 74.765 24.872-31.09c12.306-15.381 33.978-19.515 51.081-9.741l112 64A40.002 40.002 0 0 1 512 168v240c0 18.562-12.77 34.686-30.838 38.937l-136 32A39.982 39.982 0 0 1 336 480h-80c-22.091 0-40-17.908-40-40z"]},la={prefix:"fas",iconName:"hand-sparkles",icon:[640,512,[],"e05d","M106.66,170.64l.09,0,49.55-20.65a7.32,7.32,0,0,0,3.68-6h0a7.29,7.29,0,0,0-3.68-6l-49.57-20.67-.07,0L86,67.68a6.66,6.66,0,0,0-11.92,0l-20.7,49.63-.05,0L3.7,138A7.29,7.29,0,0,0,0,144H0a7.32,7.32,0,0,0,3.68,6L53.27,170.6l.07,0L74,220.26a6.65,6.65,0,0,0,11.92,0l20.69-49.62ZM471.38,467.41l-1-.42-1-.5a38.67,38.67,0,0,1,0-69.14l1-.49,1-.43,37.49-15.63,15.63-37.48.41-1,.47-.95c3.85-7.74,10.58-13.63,18.35-17.34,0-1.33.25-2.69.27-4V144a32,32,0,0,0-64,0v72a8,8,0,0,1-8,8H456a8,8,0,0,1-8-8V64a32,32,0,0,0-64,0V216a8,8,0,0,1-8,8H360a8,8,0,0,1-8-8V32a32,32,0,0,0-64,0V216a8,8,0,0,1-8,8H264a8,8,0,0,1-8-8V64a32,32,0,0,0-64,0v241l-23.59-32.49a40,40,0,0,0-64.71,47.09L229.3,492.21A48.07,48.07,0,0,0,268.09,512H465.7c19.24,0,35.65-11.73,43.24-28.79l-.07-.17ZM349.79,339.52,320,351.93l-12.42,29.78a4,4,0,0,1-7.15,0L288,351.93l-29.79-12.41a4,4,0,0,1,0-7.16L288,319.94l12.42-29.78a4,4,0,0,1,7.15,0L320,319.94l29.79,12.42a4,4,0,0,1,0,7.16ZM640,431.91a7.28,7.28,0,0,0-3.68-6l-49.57-20.67-.07,0L566,355.63a6.66,6.66,0,0,0-11.92,0l-20.7,49.63-.05,0L483.7,426a7.28,7.28,0,0,0-3.68,6h0a7.29,7.29,0,0,0,3.68,5.95l49.57,20.67.07,0L554,508.21a6.65,6.65,0,0,0,11.92,0l20.69-49.62h0l.09,0,49.55-20.66a7.29,7.29,0,0,0,3.68-5.95h0Z"]},ca={prefix:"fas",iconName:"hand-spock",icon:[512,512,[],"f259","M510.9005,145.27027,442.604,432.09391A103.99507,103.99507,0,0,1,341.43745,512H214.074a135.96968,135.96968,0,0,1-93.18489-36.95291L12.59072,373.12723a39.992,39.992,0,0,1,54.8122-58.24988l60.59342,57.02528v0a283.24849,283.24849,0,0,0-11.6703-80.46734L73.63726,147.36011a40.00575,40.00575,0,1,1,76.71833-22.7187l37.15458,125.39477a8.33113,8.33113,0,0,0,16.05656-4.4414L153.26183,49.95406A39.99638,39.99638,0,1,1,230.73015,30.0166l56.09491,218.15825a10.42047,10.42047,0,0,0,20.30018-.501L344.80766,63.96966a40.052,40.052,0,0,1,51.30245-30.0893c19.86073,6.2998,30.86262,27.67378,26.67564,48.08487l-33.83869,164.966a7.55172,7.55172,0,0,0,14.74406,3.2666l29.3973-123.45874a39.99414,39.99414,0,1,1,77.81208,18.53121Z"]},ha={prefix:"fas",iconName:"hands",icon:[640,512,[],"f4c2","M204.8 230.4c-10.6-14.1-30.7-17-44.8-6.4-14.1 10.6-17 30.7-6.4 44.8l38.1 50.8c4.8 6.4 4.1 15.3-1.5 20.9l-12.8 12.8c-6.7 6.7-17.6 6.2-23.6-1.1L64 244.4V96c0-17.7-14.3-32-32-32S0 78.3 0 96v218.4c0 10.9 3.7 21.5 10.5 30l104.1 134.3c5 6.5 8.4 13.9 10.4 21.7 1.8 6.9 8.1 11.6 15.3 11.6H272c8.8 0 16-7.2 16-16V384c0-27.7-9-54.6-25.6-76.8l-57.6-76.8zM608 64c-17.7 0-32 14.3-32 32v148.4l-89.8 107.8c-6 7.2-17 7.7-23.6 1.1l-12.8-12.8c-5.6-5.6-6.3-14.5-1.5-20.9l38.1-50.8c10.6-14.1 7.7-34.2-6.4-44.8-14.1-10.6-34.2-7.7-44.8 6.4l-57.6 76.8C361 329.4 352 356.3 352 384v112c0 8.8 7.2 16 16 16h131.7c7.1 0 13.5-4.7 15.3-11.6 2-7.8 5.4-15.2 10.4-21.7l104.1-134.3c6.8-8.5 10.5-19.1 10.5-30V96c0-17.7-14.3-32-32-32z"]},da={prefix:"fas",iconName:"hands-helping",icon:[640,512,[],"f4c4","M488 192H336v56c0 39.7-32.3 72-72 72s-72-32.3-72-72V126.4l-64.9 39C107.8 176.9 96 197.8 96 220.2v47.3l-80 46.2C.7 322.5-4.6 342.1 4.3 357.4l80 138.6c8.8 15.3 28.4 20.5 43.7 11.7L231.4 448H368c35.3 0 64-28.7 64-64h16c17.7 0 32-14.3 32-32v-64h8c13.3 0 24-10.7 24-24v-48c0-13.3-10.7-24-24-24zm147.7-37.4L555.7 16C546.9.7 527.3-4.5 512 4.3L408.6 64H306.4c-12 0-23.7 3.4-33.9 9.7L239 94.6c-9.4 5.8-15 16.1-15 27.1V248c0 22.1 17.9 40 40 40s40-17.9 40-40v-88h184c30.9 0 56 25.1 56 56v28.5l80-46.2c15.3-8.9 20.5-28.4 11.7-43.7z"]},ua={prefix:"fas",iconName:"hands-wash",icon:[576,512,[],"e05e","M496,224a48,48,0,1,0-48-48A48,48,0,0,0,496,224ZM311.47,178.45A56.77,56.77,0,0,1,328,176a56,56,0,0,1,19,3.49l15.35-48.61A24,24,0,0,0,342,99.74c-11.53-1.35-22.21,6.44-25.71,17.51l-20.9,66.17ZM93.65,386.33c.8-.19,1.54-.54,2.35-.71V359.93a156,156,0,0,1,107.06-148l73.7-22.76L310.92,81.05a24,24,0,0,0-20.33-31.11c-11.53-1.34-22.22,6.45-25.72,17.52L231.42,173.88a8,8,0,0,1-15.26-4.83L259.53,31.26A24,24,0,0,0,239.2.15C227.67-1.19,217,6.6,213.49,17.66L165.56,169.37a8,8,0,1,1-15.26-4.82l38.56-122a24,24,0,0,0-20.33-31.11C157,10,146.32,17.83,142.82,28.9l-60,189.85L80.76,168.7A24,24,0,0,0,56.9,144.55c-13.23-.05-24.72,10.54-24.9,23.86V281.14A123.69,123.69,0,0,0,93.65,386.33ZM519.1,336H360a8,8,0,0,1,0-16H488a24,24,0,0,0,23.54-28.76C509.35,279.84,498.71,272,487.1,272H288l47.09-17.06a24,24,0,0,0-14.18-45.88L213.19,242.31A123.88,123.88,0,0,0,128,360v25.65a79.78,79.78,0,0,1,58,108.63A118.9,118.9,0,0,0,248,512H456a24,24,0,0,0,23.54-28.76C477.35,471.84,466.71,464,455.1,464H360a8,8,0,0,1,0-16H488a24,24,0,0,0,23.54-28.76C509.35,407.84,498.71,400,487.1,400H360a8,8,0,0,1,0-16H520a24,24,0,0,0,23.54-28.76C541.35,343.84,530.71,336,519.1,336ZM416,64a32,32,0,1,0-32-32A32,32,0,0,0,416,64ZM112,416a48,48,0,1,0,48,48A48,48,0,0,0,112,416Z"]},pa={prefix:"fas",iconName:"handshake",icon:[640,512,[],"f2b5","M434.7 64h-85.9c-8 0-15.7 3-21.6 8.4l-98.3 90c-.1.1-.2.3-.3.4-16.6 15.6-16.3 40.5-2.1 56 12.7 13.9 39.4 17.6 56.1 2.7.1-.1.3-.1.4-.2l79.9-73.2c6.5-5.9 16.7-5.5 22.6 1 6 6.5 5.5 16.6-1 22.6l-26.1 23.9L504 313.8c2.9 2.4 5.5 5 7.9 7.7V128l-54.6-54.6c-5.9-6-14.1-9.4-22.6-9.4zM544 128.2v223.9c0 17.7 14.3 32 32 32h64V128.2h-96zm48 223.9c-8.8 0-16-7.2-16-16s7.2-16 16-16 16 7.2 16 16-7.2 16-16 16zM0 384h64c17.7 0 32-14.3 32-32V128.2H0V384zm48-63.9c8.8 0 16 7.2 16 16s-7.2 16-16 16-16-7.2-16-16c0-8.9 7.2-16 16-16zm435.9 18.6L334.6 217.5l-30 27.5c-29.7 27.1-75.2 24.5-101.7-4.4-26.9-29.4-24.8-74.9 4.4-101.7L289.1 64h-83.8c-8.5 0-16.6 3.4-22.6 9.4L128 128v223.9h18.3l90.5 81.9c27.4 22.3 67.7 18.1 90-9.3l.2-.2 17.9 15.5c15.9 13 39.4 10.5 52.3-5.4l31.4-38.6 5.4 4.4c13.7 11.1 33.9 9.1 45-4.7l9.5-11.7c11.2-13.8 9.1-33.9-4.6-45.1z"]},ga={prefix:"fas",iconName:"handshake-alt-slash",icon:[640,512,[],"e05f","M358.59,195.6,504.2,313.8a63.4,63.4,0,0,1,22.21,37.91H624a16.05,16.05,0,0,0,16-16V143.91A16,16,0,0,0,624,128H512L457.41,73.41A32,32,0,0,0,434.8,64H348.91a32,32,0,0,0-21.61,8.41l-88.12,80.68-25.69-19.85L289.09,64H205.3a32,32,0,0,0-22.6,9.41l-20.34,20.3L45.47,3.38A16,16,0,0,0,23,6.19L3.38,31.46A16,16,0,0,0,6.19,53.91L594.54,508.63A16,16,0,0,0,617,505.82l19.64-25.27a16,16,0,0,0-2.81-22.45L303.4,202.72l32.69-29.92,27-24.7a16,16,0,0,1,21.61,23.61ZM16,128A16.05,16.05,0,0,0,0,144V335.91a16,16,0,0,0,16,16H146.3l90.5,81.89a64,64,0,0,0,90-9.3l.2-.2,17.91,15.5a37.16,37.16,0,0,0,52.29-5.39l8.8-10.82L23.56,128Z"]},fa={prefix:"fas",iconName:"handshake-slash",icon:[640,512,[],"e060","M0,128.21V384H64a32,32,0,0,0,32-32V184L23.83,128.21ZM48,320.1a16,16,0,1,1-16,16A16,16,0,0,1,48,320.1Zm80,31.81h18.3l90.5,81.89a64,64,0,0,0,90-9.3l.2-.2,17.91,15.5a37.16,37.16,0,0,0,52.29-5.39l8.8-10.82L128,208.72Zm416-223.7V352.1a32,32,0,0,0,32,32h64V128.21ZM592,352.1a16,16,0,1,1,16-16A16,16,0,0,1,592,352.1ZM303.33,202.67l59.58-54.57a16,16,0,0,1,21.59,23.61L358.41,195.6,504,313.8a73.08,73.08,0,0,1,7.91,7.7V128L457.3,73.41A31.76,31.76,0,0,0,434.7,64H348.8a31.93,31.93,0,0,0-21.6,8.41l-88.07,80.64-25.64-19.81L289.09,64H205.3a32,32,0,0,0-22.6,9.41L162.36,93.72,45.47,3.38A16,16,0,0,0,23,6.19L3.38,31.46A16,16,0,0,0,6.19,53.91L594.53,508.63A16,16,0,0,0,617,505.82l19.65-25.27a16,16,0,0,0-2.82-22.45Z"]},ma={prefix:"fas",iconName:"hanukiah",icon:[640,512,[],"f6e6","M232 160c-4.42 0-8 3.58-8 8v120h32V168c0-4.42-3.58-8-8-8h-16zm-64 0c-4.42 0-8 3.58-8 8v120h32V168c0-4.42-3.58-8-8-8h-16zm224 0c-4.42 0-8 3.58-8 8v120h32V168c0-4.42-3.58-8-8-8h-16zm64 0c-4.42 0-8 3.58-8 8v120h32V168c0-4.42-3.58-8-8-8h-16zm88 8c0-4.42-3.58-8-8-8h-16c-4.42 0-8 3.58-8 8v120h32V168zm-440-8c-4.42 0-8 3.58-8 8v120h32V168c0-4.42-3.58-8-8-8h-16zm520 0h-32c-8.84 0-16 7.16-16 16v112c0 17.67-14.33 32-32 32H352V128c0-8.84-7.16-16-16-16h-32c-8.84 0-16 7.16-16 16v192H96c-17.67 0-32-14.33-32-32V176c0-8.84-7.16-16-16-16H16c-8.84 0-16 7.16-16 16v112c0 53.02 42.98 96 96 96h192v64H112c-8.84 0-16 7.16-16 16v32c0 8.84 7.16 16 16 16h416c8.84 0 16-7.16 16-16v-32c0-8.84-7.16-16-16-16H352v-64h192c53.02 0 96-42.98 96-96V176c0-8.84-7.16-16-16-16zm-16-32c13.25 0 24-11.94 24-26.67S608 48 608 48s-24 38.61-24 53.33S594.75 128 608 128zm-576 0c13.25 0 24-11.94 24-26.67S32 48 32 48 8 86.61 8 101.33 18.75 128 32 128zm288-48c13.25 0 24-11.94 24-26.67S320 0 320 0s-24 38.61-24 53.33S306.75 80 320 80zm-208 48c13.25 0 24-11.94 24-26.67S112 48 112 48s-24 38.61-24 53.33S98.75 128 112 128zm64 0c13.25 0 24-11.94 24-26.67S176 48 176 48s-24 38.61-24 53.33S162.75 128 176 128zm64 0c13.25 0 24-11.94 24-26.67S240 48 240 48s-24 38.61-24 53.33S226.75 128 240 128zm160 0c13.25 0 24-11.94 24-26.67S400 48 400 48s-24 38.61-24 53.33S386.75 128 400 128zm64 0c13.25 0 24-11.94 24-26.67S464 48 464 48s-24 38.61-24 53.33S450.75 128 464 128zm64 0c13.25 0 24-11.94 24-26.67S528 48 528 48s-24 38.61-24 53.33S514.75 128 528 128z"]},va={prefix:"fas",iconName:"hard-hat",icon:[512,512,[],"f807","M480 288c0-80.25-49.28-148.92-119.19-177.62L320 192V80a16 16 0 0 0-16-16h-96a16 16 0 0 0-16 16v112l-40.81-81.62C81.28 139.08 32 207.75 32 288v64h448zm16 96H16a16 16 0 0 0-16 16v32a16 16 0 0 0 16 16h480a16 16 0 0 0 16-16v-32a16 16 0 0 0-16-16z"]},ya={prefix:"fas",iconName:"hashtag",icon:[448,512,[],"f292","M440.667 182.109l7.143-40c1.313-7.355-4.342-14.109-11.813-14.109h-74.81l14.623-81.891C377.123 38.754 371.468 32 363.997 32h-40.632a12 12 0 0 0-11.813 9.891L296.175 128H197.54l14.623-81.891C213.477 38.754 207.822 32 200.35 32h-40.632a12 12 0 0 0-11.813 9.891L132.528 128H53.432a12 12 0 0 0-11.813 9.891l-7.143 40C33.163 185.246 38.818 192 46.289 192h74.81L98.242 320H19.146a12 12 0 0 0-11.813 9.891l-7.143 40C-1.123 377.246 4.532 384 12.003 384h74.81L72.19 465.891C70.877 473.246 76.532 480 84.003 480h40.632a12 12 0 0 0 11.813-9.891L151.826 384h98.634l-14.623 81.891C234.523 473.246 240.178 480 247.65 480h40.632a12 12 0 0 0 11.813-9.891L315.472 384h79.096a12 12 0 0 0 11.813-9.891l7.143-40c1.313-7.355-4.342-14.109-11.813-14.109h-74.81l22.857-128h79.096a12 12 0 0 0 11.813-9.891zM261.889 320h-98.634l22.857-128h98.634l-22.857 128z"]},Ca={prefix:"fas",iconName:"hat-cowboy",icon:[640,512,[],"f8c0","M490 296.9C480.51 239.51 450.51 64 392.3 64c-14 0-26.49 5.93-37 14a58.21 58.21 0 0 1-70.58 0c-10.51-8-23-14-37-14-58.2 0-88.2 175.47-97.71 232.88C188.81 309.47 243.73 320 320 320s131.23-10.51 170-23.1zm142.9-37.18a16 16 0 0 0-19.75 1.5c-1 .9-101.27 90.78-293.16 90.78-190.82 0-292.22-89.94-293.24-90.84A16 16 0 0 0 1 278.53C1.73 280.55 78.32 480 320 480s318.27-199.45 319-201.47a16 16 0 0 0-6.09-18.81z"]},ba={prefix:"fas",iconName:"hat-cowboy-side",icon:[640,512,[],"f8c1","M260.8 291.06c-28.63-22.94-62-35.06-96.4-35.06C87 256 21.47 318.72 1.43 412.06c-3.55 16.6-.43 33.83 8.57 47.3C18.75 472.47 31.83 480 45.88 480H592c-103.21 0-155-37.07-233.19-104.46zm234.65-18.29L468.4 116.2A64 64 0 0 0 392 64.41L200.85 105a64 64 0 0 0-50.35 55.79L143.61 226c6.9-.83 13.7-2 20.79-2 41.79 0 82 14.55 117.29 42.82l98 84.48C450.76 412.54 494.9 448 592 448a48 48 0 0 0 48-48c0-25.39-29.6-119.33-144.55-127.23z"]},Sa={prefix:"fas",iconName:"hat-wizard",icon:[512,512,[],"f6e8","M496 448H16c-8.84 0-16 7.16-16 16v32c0 8.84 7.16 16 16 16h480c8.84 0 16-7.16 16-16v-32c0-8.84-7.16-16-16-16zm-304-64l-64-32 64-32 32-64 32 64 64 32-64 32-16 32h208l-86.41-201.63a63.955 63.955 0 0 1-1.89-45.45L416 0 228.42 107.19a127.989 127.989 0 0 0-53.46 59.15L64 416h144l-16-32zm64-224l16-32 16 32 32 16-32 16-16 32-16-32-32-16 32-16z"]},wa={prefix:"fas",iconName:"hdd",icon:[576,512,[],"f0a0","M576 304v96c0 26.51-21.49 48-48 48H48c-26.51 0-48-21.49-48-48v-96c0-26.51 21.49-48 48-48h480c26.51 0 48 21.49 48 48zm-48-80a79.557 79.557 0 0 1 30.777 6.165L462.25 85.374A48.003 48.003 0 0 0 422.311 64H153.689a48 48 0 0 0-39.938 21.374L17.223 230.165A79.557 79.557 0 0 1 48 224h480zm-48 96c-17.673 0-32 14.327-32 32s14.327 32 32 32 32-14.327 32-32-14.327-32-32-32zm-96 0c-17.673 0-32 14.327-32 32s14.327 32 32 32 32-14.327 32-32-14.327-32-32-32z"]},xa={prefix:"fas",iconName:"head-side-cough",icon:[640,512,[],"e061","M616,304a24,24,0,1,0-24-24A24,24,0,0,0,616,304ZM552,416a24,24,0,1,0,24,24A24,24,0,0,0,552,416Zm-64-56a24,24,0,1,0,24,24A24,24,0,0,0,488,360ZM616,464a24,24,0,1,0,24,24A24,24,0,0,0,616,464Zm0-104a24,24,0,1,0,24,24A24,24,0,0,0,616,360Zm-64-40a24,24,0,1,0,24,24A24,24,0,0,0,552,320Zm-74.78-45c-21-47.12-48.5-151.75-73.12-186.75A208.13,208.13,0,0,0,234.1,0H192C86,0,0,86,0,192c0,56.75,24.75,107.62,64,142.88V512H288V480h64a64,64,0,0,0,64-64H320a32,32,0,0,1,0-64h96V320h32A32,32,0,0,0,477.22,275ZM288,224a32,32,0,1,1,32-32A32.07,32.07,0,0,1,288,224Z"]},Ea={prefix:"fas",iconName:"head-side-cough-slash",icon:[640,512,[],"e062","M454.11,319.21c19.56-3.81,31.62-25,23.11-44.21-21-47.12-48.5-151.75-73.12-186.75A208.13,208.13,0,0,0,234.1,0H192A190.64,190.64,0,0,0,84.18,33.3L45.46,3.38A16,16,0,0,0,23,6.19L3.37,31.46A16,16,0,0,0,6.18,53.91L594.53,508.63A16,16,0,0,0,617,505.82l19.64-25.27a16,16,0,0,0-2.81-22.45ZM313.39,210.45,263.61,172c5.88-7.14,14.43-12,24.36-12a32.06,32.06,0,0,1,32,32C320,199,317.24,205.17,313.39,210.45ZM616,304a24,24,0,1,0-24-24A24,24,0,0,0,616,304Zm-64,64a24,24,0,1,0-24-24A24,24,0,0,0,552,368ZM288,384a32,32,0,0,1,32-32h19.54L20.73,105.59A190.86,190.86,0,0,0,0,192c0,56.75,24.75,107.62,64,142.88V512H288V480h64a64,64,0,0,0,64-64H320A32,32,0,0,1,288,384Zm328-24a24,24,0,1,0,24,24A24,24,0,0,0,616,360Z"]},Ma={prefix:"fas",iconName:"head-side-mask",icon:[512,512,[],"e063","M.15,184.42C-2.17,244.21,23,298.06,64,334.88V512H224V316.51L3.67,156.25A182.28,182.28,0,0,0,.15,184.42ZM509.22,275c-21-47.12-48.5-151.75-73.12-186.75A208.11,208.11,0,0,0,266.11,0H200C117,0,42.48,50.57,13.25,123.65L239.21,288H511.76A31.35,31.35,0,0,0,509.22,275ZM320,224a32,32,0,1,1,32-32A32.07,32.07,0,0,1,320,224Zm16,144H496l16-48H256V512H401.88a64,64,0,0,0,60.71-43.76L464,464H336a16,16,0,0,1,0-32H474.67l10.67-32H336a16,16,0,0,1,0-32Z"]},Aa={prefix:"fas",iconName:"head-side-virus",icon:[512,512,[],"e064","M272,240a16,16,0,1,0,16,16A16,16,0,0,0,272,240Zm-64-64a16,16,0,1,0,16,16A16,16,0,0,0,208,176Zm301.2,99c-20.93-47.12-48.43-151.73-73.07-186.75A207.9,207.9,0,0,0,266.09,0H192C86,0,0,86,0,192A191.23,191.23,0,0,0,64,334.81V512H320V448h64a64,64,0,0,0,64-64V320H480A32,32,0,0,0,509.2,275ZM368,240H355.88c-28.51,0-42.79,34.47-22.63,54.63l8.58,8.57a16,16,0,1,1-22.63,22.63l-8.57-8.58C290.47,297.09,256,311.37,256,339.88V352a16,16,0,0,1-32,0V339.88c0-28.51-34.47-42.79-54.63-22.63l-8.57,8.58a16,16,0,0,1-22.63-22.63l8.58-8.57c20.16-20.16,5.88-54.63-22.63-54.63H112a16,16,0,0,1,0-32h12.12c28.51,0,42.79-34.47,22.63-54.63l-8.58-8.57a16,16,0,0,1,22.63-22.63l8.57,8.58c20.16,20.16,54.63,5.88,54.63-22.63V96a16,16,0,0,1,32,0v12.12c0,28.51,34.47,42.79,54.63,22.63l8.57-8.58a16,16,0,0,1,22.63,22.63l-8.58,8.57C313.09,173.53,327.37,208,355.88,208H368a16,16,0,0,1,0,32Z"]},Ta={prefix:"fas",iconName:"heading",icon:[512,512,[],"f1dc","M448 96v320h32a16 16 0 0 1 16 16v32a16 16 0 0 1-16 16H320a16 16 0 0 1-16-16v-32a16 16 0 0 1 16-16h32V288H160v128h32a16 16 0 0 1 16 16v32a16 16 0 0 1-16 16H32a16 16 0 0 1-16-16v-32a16 16 0 0 1 16-16h32V96H32a16 16 0 0 1-16-16V48a16 16 0 0 1 16-16h160a16 16 0 0 1 16 16v32a16 16 0 0 1-16 16h-32v128h192V96h-32a16 16 0 0 1-16-16V48a16 16 0 0 1 16-16h160a16 16 0 0 1 16 16v32a16 16 0 0 1-16 16z"]},Da={prefix:"fas",iconName:"headphones",icon:[512,512,[],"f025","M256 32C114.52 32 0 146.496 0 288v48a32 32 0 0 0 17.689 28.622l14.383 7.191C34.083 431.903 83.421 480 144 480h24c13.255 0 24-10.745 24-24V280c0-13.255-10.745-24-24-24h-24c-31.342 0-59.671 12.879-80 33.627V288c0-105.869 86.131-192 192-192s192 86.131 192 192v1.627C427.671 268.879 399.342 256 368 256h-24c-13.255 0-24 10.745-24 24v176c0 13.255 10.745 24 24 24h24c60.579 0 109.917-48.098 111.928-108.187l14.382-7.191A32 32 0 0 0 512 336v-48c0-141.479-114.496-256-256-256z"]},Ia={prefix:"fas",iconName:"headphones-alt",icon:[512,512,[],"f58f","M160 288h-16c-35.35 0-64 28.7-64 64.12v63.76c0 35.41 28.65 64.12 64 64.12h16c17.67 0 32-14.36 32-32.06V320.06c0-17.71-14.33-32.06-32-32.06zm208 0h-16c-17.67 0-32 14.35-32 32.06v127.88c0 17.7 14.33 32.06 32 32.06h16c35.35 0 64-28.71 64-64.12v-63.76c0-35.41-28.65-64.12-64-64.12zM256 32C112.91 32 4.57 151.13 0 288v112c0 8.84 7.16 16 16 16h16c8.84 0 16-7.16 16-16V288c0-114.67 93.33-207.8 208-207.82 114.67.02 208 93.15 208 207.82v112c0 8.84 7.16 16 16 16h16c8.84 0 16-7.16 16-16V288C507.43 151.13 399.09 32 256 32z"]},Ra={prefix:"fas",iconName:"headset",icon:[512,512,[],"f590","M192 208c0-17.67-14.33-32-32-32h-16c-35.35 0-64 28.65-64 64v48c0 35.35 28.65 64 64 64h16c17.67 0 32-14.33 32-32V208zm176 144c35.35 0 64-28.65 64-64v-48c0-35.35-28.65-64-64-64h-16c-17.67 0-32 14.33-32 32v112c0 17.67 14.33 32 32 32h16zM256 0C113.18 0 4.58 118.83 0 256v16c0 8.84 7.16 16 16 16h16c8.84 0 16-7.16 16-16v-16c0-114.69 93.31-208 208-208s208 93.31 208 208h-.12c.08 2.43.12 165.72.12 165.72 0 23.35-18.93 42.28-42.28 42.28H320c0-26.51-21.49-48-48-48h-32c-26.51 0-48 21.49-48 48s21.49 48 48 48h181.72c49.86 0 90.28-40.42 90.28-90.28V256C507.42 118.83 398.82 0 256 0z"]},La={prefix:"fas",iconName:"heart",icon:[512,512,[],"f004","M462.3 62.6C407.5 15.9 326 24.3 275.7 76.2L256 96.5l-19.7-20.3C186.1 24.3 104.5 15.9 49.7 62.6c-62.8 53.6-66.1 149.8-9.9 207.9l193.5 199.8c12.5 12.9 32.8 12.9 45.3 0l193.5-199.8c56.3-58.1 53-154.3-9.8-207.9z"]},ka={prefix:"fas",iconName:"heart-broken",icon:[512,512,[],"f7a9","M473.7 73.8l-2.4-2.5c-46-47-118-51.7-169.6-14.8L336 159.9l-96 64 48 128-144-144 96-64-28.6-86.5C159.7 19.6 87 24 40.7 71.4l-2.4 2.4C-10.4 123.6-12.5 202.9 31 256l212.1 218.6c7.1 7.3 18.6 7.3 25.7 0L481 255.9c43.5-53 41.4-132.3-7.3-182.1z"]},Pa={prefix:"fas",iconName:"heartbeat",icon:[512,512,[],"f21e","M320.2 243.8l-49.7 99.4c-6 12.1-23.4 11.7-28.9-.6l-56.9-126.3-30 71.7H60.6l182.5 186.5c7.1 7.3 18.6 7.3 25.7 0L451.4 288H342.3l-22.1-44.2zM473.7 73.9l-2.4-2.5c-51.5-52.6-135.8-52.6-187.4 0L256 100l-27.9-28.5c-51.5-52.7-135.9-52.7-187.4 0l-2.4 2.4C-10.4 123.7-12.5 203 31 256h102.4l35.9-86.2c5.4-12.9 23.6-13.2 29.4-.4l58.2 129.3 49-97.9c5.9-11.8 22.7-11.8 28.6 0l27.6 55.2H481c43.5-53 41.4-132.3-7.3-182.1z"]},Na={prefix:"fas",iconName:"helicopter",icon:[640,512,[],"f533","M304 384h272c17.67 0 32-14.33 32-32 0-123.71-100.29-224-224-224V64h176c8.84 0 16-7.16 16-16V16c0-8.84-7.16-16-16-16H144c-8.84 0-16 7.16-16 16v32c0 8.84 7.16 16 16 16h176v64H112L68.8 70.4C65.78 66.37 61.03 64 56 64H16.01C5.6 64-2.04 73.78.49 83.88L32 192l160 64 86.4 115.2A31.992 31.992 0 0 0 304 384zm112-188.49C478.55 208.3 528.03 257.44 540.79 320H416V195.51zm219.37 263.3l-22.15-22.2c-6.25-6.26-16.24-6.1-22.64.01-7.09 6.77-13.84 11.25-24.64 11.25H240c-8.84 0-16 7.18-16 16.03v32.06c0 8.85 7.16 16.03 16 16.03h325.94c14.88 0 35.3-.47 68.45-29.52 7.02-6.14 7.57-17.05.98-23.66z"]},Oa={prefix:"fas",iconName:"highlighter",icon:[544,512,[],"f591","M0 479.98L99.92 512l35.45-35.45-67.04-67.04L0 479.98zm124.61-240.01a36.592 36.592 0 0 0-10.79 38.1l13.05 42.83-50.93 50.94 96.23 96.23 50.86-50.86 42.74 13.08c13.73 4.2 28.65-.01 38.15-10.78l35.55-41.64-173.34-173.34-41.52 35.44zm403.31-160.7l-63.2-63.2c-20.49-20.49-53.38-21.52-75.12-2.35L190.55 183.68l169.77 169.78L530.27 154.4c19.18-21.74 18.15-54.63-2.35-75.13z"]},_a={prefix:"fas",iconName:"hiking",icon:[384,512,[],"f6ec","M80.95 472.23c-4.28 17.16 6.14 34.53 23.28 38.81 2.61.66 5.22.95 7.8.95 14.33 0 27.37-9.7 31.02-24.23l25.24-100.97-52.78-52.78-34.56 138.22zm14.89-196.12L137 117c2.19-8.42-3.14-16.95-11.92-19.06-43.88-10.52-88.35 15.07-99.32 57.17L.49 253.24c-2.19 8.42 3.14 16.95 11.92 19.06l63.56 15.25c8.79 2.1 17.68-3.02 19.87-11.44zM368 160h-16c-8.84 0-16 7.16-16 16v16h-34.75l-46.78-46.78C243.38 134.11 228.61 128 212.91 128c-27.02 0-50.47 18.3-57.03 44.52l-26.92 107.72a32.012 32.012 0 0 0 8.42 30.39L224 397.25V480c0 17.67 14.33 32 32 32s32-14.33 32-32v-82.75c0-17.09-6.66-33.16-18.75-45.25l-46.82-46.82c.15-.5.49-.89.62-1.41l19.89-79.57 22.43 22.43c6 6 14.14 9.38 22.62 9.38h48v240c0 8.84 7.16 16 16 16h16c8.84 0 16-7.16 16-16V176c.01-8.84-7.15-16-15.99-16zM240 96c26.51 0 48-21.49 48-48S266.51 0 240 0s-48 21.49-48 48 21.49 48 48 48z"]},Fa={prefix:"fas",iconName:"hippo",icon:[640,512,[],"f6ed","M581.12 96.2c-27.67-.15-52.5 17.58-76.6 26.62C489.98 88.27 455.83 64 416 64c-11.28 0-21.95 2.3-32 5.88V56c0-13.26-10.75-24-24-24h-16c-13.25 0-24 10.74-24 24v48.98C286.01 79.58 241.24 64 192 64 85.96 64 0 135.64 0 224v240c0 8.84 7.16 16 16 16h64c8.84 0 16-7.16 16-16v-70.79C128.35 407.57 166.72 416 208 416s79.65-8.43 112-22.79V464c0 8.84 7.16 16 16 16h64c8.84 0 16-7.16 16-16V288h128v32c0 8.84 7.16 16 16 16h32c8.84 0 16-7.16 16-16v-32c17.67 0 32-14.33 32-32v-92.02c0-34.09-24.79-67.59-58.88-67.78zM448 176c-8.84 0-16-7.16-16-16s7.16-16 16-16 16 7.16 16 16-7.16 16-16 16z"]},Ga={prefix:"fas",iconName:"history",icon:[512,512,[],"f1da","M504 255.531c.253 136.64-111.18 248.372-247.82 248.468-59.015.042-113.223-20.53-155.822-54.911-11.077-8.94-11.905-25.541-1.839-35.607l11.267-11.267c8.609-8.609 22.353-9.551 31.891-1.984C173.062 425.135 212.781 440 256 440c101.705 0 184-82.311 184-184 0-101.705-82.311-184-184-184-48.814 0-93.149 18.969-126.068 49.932l50.754 50.754c10.08 10.08 2.941 27.314-11.313 27.314H24c-8.837 0-16-7.163-16-16V38.627c0-14.254 17.234-21.393 27.314-11.314l49.372 49.372C129.209 34.136 189.552 8 256 8c136.81 0 247.747 110.78 248 247.531zm-180.912 78.784l9.823-12.63c8.138-10.463 6.253-25.542-4.21-33.679L288 256.349V152c0-13.255-10.745-24-24-24h-16c-13.255 0-24 10.745-24 24v135.651l65.409 50.874c10.463 8.137 25.541 6.253 33.679-4.21z"]},Va={prefix:"fas",iconName:"hockey-puck",icon:[512,512,[],"f453","M0 160c0-53 114.6-96 256-96s256 43 256 96-114.6 96-256 96S0 213 0 160zm0 82.2V352c0 53 114.6 96 256 96s256-43 256-96V242.2c-113.4 82.3-398.5 82.4-512 0z"]},Ba={prefix:"fas",iconName:"holly-berry",icon:[448,512,[],"f7aa","M144 192c26.5 0 48-21.5 48-48s-21.5-48-48-48-48 21.5-48 48 21.5 48 48 48zm112-48c0 26.5 21.5 48 48 48s48-21.5 48-48-21.5-48-48-48-48 21.5-48 48zm-32-48c26.5 0 48-21.5 48-48S250.5 0 224 0s-48 21.5-48 48 21.5 48 48 48zm-16.2 139.1c.1-12.4-13.1-20.1-23.8-13.7-34.3 20.3-71.4 32.7-108.7 36.2-9.7.9-15.6 11.3-11.6 20.2 6.2 13.9 11.1 28.6 14.7 43.8 3.6 15.2-5.3 30.6-20.2 35.1-14.9 4.5-30.1 7.6-45.3 9.1-9.7 1-15.7 11.3-11.7 20.2 15 32.8 22.9 69.5 23 107.7.1 14.4 15.2 23.1 27.6 16 33.2-19 68.9-30.5 104.8-33.9 9.7-.9 15.6-11.3 11.6-20.2-6.2-13.9-11.1-28.6-14.7-43.8-3.6-15.2 5.3-30.6 20.2-35.1 14.9-4.5 30.1-7.6 45.3-9.1 9.7-1 15.7-11.3 11.7-20.2-15.5-34.2-23.3-72.5-22.9-112.3zM435 365.6c-15.2-1.6-30.3-4.7-45.3-9.1-14.9-4.5-23.8-19.9-20.2-35.1 3.6-15.2 8.5-29.8 14.7-43.8 4-8.9-1.9-19.3-11.6-20.2-37.3-3.5-74.4-15.9-108.7-36.2-10.7-6.3-23.9 1.4-23.8 13.7 0 1.6-.2 3.2-.2 4.9.2 33.3 7 65.7 19.9 94 5.7 12.4 5.2 26.6-.6 38.9 4.9 1.2 9.9 2.2 14.8 3.7 14.9 4.5 23.8 19.9 20.2 35.1-3.6 15.2-8.5 29.8-14.7 43.8-4 8.9 1.9 19.3 11.6 20.2 35.9 3.4 71.6 14.9 104.8 33.9 12.5 7.1 27.6-1.6 27.6-16 .2-38.2 8-75 23-107.7 4.3-8.7-1.8-19.1-11.5-20.1z"]},Ha={prefix:"fas",iconName:"home",icon:[576,512,[],"f015","M280.37 148.26L96 300.11V464a16 16 0 0 0 16 16l112.06-.29a16 16 0 0 0 15.92-16V368a16 16 0 0 1 16-16h64a16 16 0 0 1 16 16v95.64a16 16 0 0 0 16 16.05L464 480a16 16 0 0 0 16-16V300L295.67 148.26a12.19 12.19 0 0 0-15.3 0zM571.6 251.47L488 182.56V44.05a12 12 0 0 0-12-12h-56a12 12 0 0 0-12 12v72.61L318.47 43a48 48 0 0 0-61 0L4.34 251.47a12 12 0 0 0-1.6 16.9l25.5 31A12 12 0 0 0 45.15 301l235.22-193.74a12.19 12.19 0 0 1 15.3 0L530.9 301a12 12 0 0 0 16.9-1.6l25.5-31a12 12 0 0 0-1.7-16.93z"]},za={prefix:"fas",iconName:"horse",icon:[576,512,[],"f6f0","M575.92 76.6c-.01-8.13-3.02-15.87-8.58-21.8-3.78-4.03-8.58-9.12-13.69-14.5 11.06-6.84 19.5-17.49 22.18-30.66C576.85 4.68 572.96 0 567.9 0H447.92c-70.69 0-128 57.31-128 128H160c-28.84 0-54.4 12.98-72 33.11V160c-48.53 0-88 39.47-88 88v56c0 8.84 7.16 16 16 16h16c8.84 0 16-7.16 16-16v-56c0-13.22 6.87-24.39 16.78-31.68-.21 2.58-.78 5.05-.78 7.68 0 27.64 11.84 52.36 30.54 69.88l-25.72 68.6a63.945 63.945 0 0 0-2.16 37.99l24.85 99.41A15.982 15.982 0 0 0 107.02 512h65.96c10.41 0 18.05-9.78 15.52-19.88l-26.31-105.26 23.84-63.59L320 345.6V496c0 8.84 7.16 16 16 16h64c8.84 0 16-7.16 16-16V318.22c19.74-20.19 32-47.75 32-78.22 0-.22-.07-.42-.08-.64V136.89l16 7.11 18.9 37.7c7.45 14.87 25.05 21.55 40.49 15.37l32.55-13.02a31.997 31.997 0 0 0 20.12-29.74l-.06-77.71zm-64 19.4c-8.84 0-16-7.16-16-16s7.16-16 16-16 16 7.16 16 16-7.16 16-16 16z"]},Ua={prefix:"fas",iconName:"horse-head",icon:[512,512,[],"f7ab","M509.8 332.5l-69.9-164.3c-14.9-41.2-50.4-71-93-79.2 18-10.6 46.3-35.9 34.2-82.3-1.3-5-7.1-7.9-12-6.1L166.9 76.3C35.9 123.4 0 238.9 0 398.8V480c0 17.7 14.3 32 32 32h236.2c23.8 0 39.3-25 28.6-46.3L256 384v-.7c-45.6-3.5-84.6-30.7-104.3-69.6-1.6-3.1-.9-6.9 1.6-9.3l12.1-12.1c3.9-3.9 10.6-2.7 12.9 2.4 14.8 33.7 48.2 57.4 87.4 57.4 17.2 0 33-5.1 46.8-13.2l46 63.9c6 8.4 15.7 13.3 26 13.3h50.3c8.5 0 16.6-3.4 22.6-9.4l45.3-39.8c8.9-9.1 11.7-22.6 7.1-34.4zM328 224c-13.3 0-24-10.7-24-24s10.7-24 24-24 24 10.7 24 24-10.7 24-24 24z"]},Wa={prefix:"fas",iconName:"hospital",icon:[448,512,[],"f0f8","M448 492v20H0v-20c0-6.627 5.373-12 12-12h20V120c0-13.255 10.745-24 24-24h88V24c0-13.255 10.745-24 24-24h112c13.255 0 24 10.745 24 24v72h88c13.255 0 24 10.745 24 24v360h20c6.627 0 12 5.373 12 12zM308 192h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12v-40c0-6.627-5.373-12-12-12zm-168 64h40c6.627 0 12-5.373 12-12v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12zm104 128h-40c-6.627 0-12 5.373-12 12v84h64v-84c0-6.627-5.373-12-12-12zm64-96h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12v-40c0-6.627-5.373-12-12-12zm-116 12c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12v-40zM182 96h26v26a6 6 0 0 0 6 6h20a6 6 0 0 0 6-6V96h26a6 6 0 0 0 6-6V70a6 6 0 0 0-6-6h-26V38a6 6 0 0 0-6-6h-20a6 6 0 0 0-6 6v26h-26a6 6 0 0 0-6 6v20a6 6 0 0 0 6 6z"]},ja={prefix:"fas",iconName:"hospital-alt",icon:[576,512,[],"f47d","M544 96H416V32c0-17.7-14.3-32-32-32H192c-17.7 0-32 14.3-32 32v64H32c-17.7 0-32 14.3-32 32v368c0 8.8 7.2 16 16 16h544c8.8 0 16-7.2 16-16V128c0-17.7-14.3-32-32-32zM160 436c0 6.6-5.4 12-12 12h-40c-6.6 0-12-5.4-12-12v-40c0-6.6 5.4-12 12-12h40c6.6 0 12 5.4 12 12v40zm0-128c0 6.6-5.4 12-12 12h-40c-6.6 0-12-5.4-12-12v-40c0-6.6 5.4-12 12-12h40c6.6 0 12 5.4 12 12v40zm160 128c0 6.6-5.4 12-12 12h-40c-6.6 0-12-5.4-12-12v-40c0-6.6 5.4-12 12-12h40c6.6 0 12 5.4 12 12v40zm0-128c0 6.6-5.4 12-12 12h-40c-6.6 0-12-5.4-12-12v-40c0-6.6 5.4-12 12-12h40c6.6 0 12 5.4 12 12v40zm16-170c0 3.3-2.7 6-6 6h-26v26c0 3.3-2.7 6-6 6h-20c-3.3 0-6-2.7-6-6v-26h-26c-3.3 0-6-2.7-6-6v-20c0-3.3 2.7-6 6-6h26V86c0-3.3 2.7-6 6-6h20c3.3 0 6 2.7 6 6v26h26c3.3 0 6 2.7 6 6v20zm144 298c0 6.6-5.4 12-12 12h-40c-6.6 0-12-5.4-12-12v-40c0-6.6 5.4-12 12-12h40c6.6 0 12 5.4 12 12v40zm0-128c0 6.6-5.4 12-12 12h-40c-6.6 0-12-5.4-12-12v-40c0-6.6 5.4-12 12-12h40c6.6 0 12 5.4 12 12v40z"]},Ka={prefix:"fas",iconName:"hospital-symbol",icon:[512,512,[],"f47e","M256 0C114.6 0 0 114.6 0 256s114.6 256 256 256 256-114.6 256-256S397.4 0 256 0zm112 376c0 4.4-3.6 8-8 8h-48c-4.4 0-8-3.6-8-8v-88h-96v88c0 4.4-3.6 8-8 8h-48c-4.4 0-8-3.6-8-8V136c0-4.4 3.6-8 8-8h48c4.4 0 8 3.6 8 8v88h96v-88c0-4.4 3.6-8 8-8h48c4.4 0 8 3.6 8 8v240z"]},$a={prefix:"fas",iconName:"hospital-user",icon:[640,512,[],"f80d","M480 320a96 96 0 1 0-96-96 96 96 0 0 0 96 96zm48 32a22.88 22.88 0 0 0-7.06 1.09 124.76 124.76 0 0 1-81.89 0A22.82 22.82 0 0 0 432 352a112 112 0 0 0-112 112.62c.14 26.26 21.73 47.38 48 47.38h224c26.27 0 47.86-21.12 48-47.38A112 112 0 0 0 528 352zm-198.09 10.45A145.19 145.19 0 0 1 352 344.62V128a32 32 0 0 0-32-32h-32V32a32 32 0 0 0-32-32H96a32 32 0 0 0-32 32v64H32a32 32 0 0 0-32 32v368a16 16 0 0 0 16 16h288.31A78.62 78.62 0 0 1 288 464.79a143.06 143.06 0 0 1 41.91-102.34zM144 404a12 12 0 0 1-12 12H92a12 12 0 0 1-12-12v-40a12 12 0 0 1 12-12h40a12 12 0 0 1 12 12zm0-128a12 12 0 0 1-12 12H92a12 12 0 0 1-12-12v-40a12 12 0 0 1 12-12h40a12 12 0 0 1 12 12zm48-122a6 6 0 0 1-6 6h-20a6 6 0 0 1-6-6v-26h-26a6 6 0 0 1-6-6v-20a6 6 0 0 1 6-6h26V70a6 6 0 0 1 6-6h20a6 6 0 0 1 6 6v26h26a6 6 0 0 1 6 6v20a6 6 0 0 1-6 6h-26zm80 250a12 12 0 0 1-12 12h-40a12 12 0 0 1-12-12v-40a12 12 0 0 1 12-12h40a12 12 0 0 1 12 12zm0-128a12 12 0 0 1-12 12h-40a12 12 0 0 1-12-12v-40a12 12 0 0 1 12-12h40a12 12 0 0 1 12 12z"]},Ya={prefix:"fas",iconName:"hot-tub",icon:[512,512,[],"f593","M414.21 177.65c1.02 8.21 7.75 14.35 15.75 14.35h16.12c9.51 0 17.08-8.57 16-18.35-4.34-39.11-22.4-74.53-50.13-97.16-17.37-14.17-28.82-36.75-31.98-62.15C378.96 6.14 372.22 0 364.23 0h-16.12c-9.51 0-17.09 8.57-16 18.35 4.34 39.11 22.4 74.53 50.13 97.16 17.36 14.17 28.82 36.75 31.97 62.14zm-108 0c1.02 8.21 7.75 14.35 15.75 14.35h16.12c9.51 0 17.08-8.57 16-18.35-4.34-39.11-22.4-74.53-50.13-97.16-17.37-14.17-28.82-36.75-31.98-62.15C270.96 6.14 264.22 0 256.23 0h-16.12c-9.51 0-17.09 8.57-16 18.35 4.34 39.11 22.4 74.53 50.13 97.16 17.36 14.17 28.82 36.75 31.97 62.14zM480 256H256l-110.93-83.2a63.99 63.99 0 0 0-38.4-12.8H64c-35.35 0-64 28.65-64 64v224c0 35.35 28.65 64 64 64h384c35.35 0 64-28.65 64-64V288c0-17.67-14.33-32-32-32zM128 440c0 4.42-3.58 8-8 8h-16c-4.42 0-8-3.58-8-8V328c0-4.42 3.58-8 8-8h16c4.42 0 8 3.58 8 8v112zm96 0c0 4.42-3.58 8-8 8h-16c-4.42 0-8-3.58-8-8V328c0-4.42 3.58-8 8-8h16c4.42 0 8 3.58 8 8v112zm96 0c0 4.42-3.58 8-8 8h-16c-4.42 0-8-3.58-8-8V328c0-4.42 3.58-8 8-8h16c4.42 0 8 3.58 8 8v112zm96 0c0 4.42-3.58 8-8 8h-16c-4.42 0-8-3.58-8-8V328c0-4.42 3.58-8 8-8h16c4.42 0 8 3.58 8 8v112zM64 128c35.35 0 64-28.65 64-64S99.35 0 64 0 0 28.65 0 64s28.65 64 64 64z"]},qa={prefix:"fas",iconName:"hotdog",icon:[512,512,[],"f80f","M488.56 23.44a80 80 0 0 0-113.12 0l-352 352a80 80 0 1 0 113.12 113.12l352-352a80 80 0 0 0 0-113.12zm-49.93 95.19c-19.6 19.59-37.52 22.67-51.93 25.14C373.76 146 364.4 147.6 352 160s-14 21.76-16.23 34.71c-2.48 14.4-5.55 32.33-25.15 51.92s-37.52 22.67-51.92 25.15C245.75 274 236.4 275.6 224 288s-14 21.75-16.23 34.7c-2.47 14.4-5.54 32.33-25.14 51.92s-37.53 22.68-51.93 25.15C117.76 402 108.4 403.6 96 416a16 16 0 0 1-22.63-22.63c19.6-19.59 37.52-22.67 51.92-25.14 13-2.22 22.3-3.82 34.71-16.23s14-21.75 16.22-34.7c2.48-14.4 5.55-32.33 25.15-51.92s37.52-22.67 51.92-25.14c13-2.22 22.3-3.83 34.7-16.23s14-21.76 16.24-34.71c2.47-14.4 5.54-32.33 25.14-51.92s37.52-22.68 51.92-25.15C394.24 110 403.59 108.41 416 96a16 16 0 0 1 22.63 22.63zM31.44 322.18L322.18 31.44l-11.54-11.55c-25-25-63.85-26.66-86.79-3.72L16.17 223.85c-22.94 22.94-21.27 61.79 3.72 86.78zm449.12-132.36L189.82 480.56l11.54 11.55c25 25 63.85 26.66 86.79 3.72l207.68-207.68c22.94-22.94 21.27-61.79-3.72-86.79z"]},Xa={prefix:"fas",iconName:"hotel",icon:[576,512,[],"f594","M560 64c8.84 0 16-7.16 16-16V16c0-8.84-7.16-16-16-16H16C7.16 0 0 7.16 0 16v32c0 8.84 7.16 16 16 16h15.98v384H16c-8.84 0-16 7.16-16 16v32c0 8.84 7.16 16 16 16h240v-80c0-8.8 7.2-16 16-16h32c8.8 0 16 7.2 16 16v80h240c8.84 0 16-7.16 16-16v-32c0-8.84-7.16-16-16-16h-16V64h16zm-304 44.8c0-6.4 6.4-12.8 12.8-12.8h38.4c6.4 0 12.8 6.4 12.8 12.8v38.4c0 6.4-6.4 12.8-12.8 12.8h-38.4c-6.4 0-12.8-6.4-12.8-12.8v-38.4zm0 96c0-6.4 6.4-12.8 12.8-12.8h38.4c6.4 0 12.8 6.4 12.8 12.8v38.4c0 6.4-6.4 12.8-12.8 12.8h-38.4c-6.4 0-12.8-6.4-12.8-12.8v-38.4zm-128-96c0-6.4 6.4-12.8 12.8-12.8h38.4c6.4 0 12.8 6.4 12.8 12.8v38.4c0 6.4-6.4 12.8-12.8 12.8h-38.4c-6.4 0-12.8-6.4-12.8-12.8v-38.4zM179.2 256h-38.4c-6.4 0-12.8-6.4-12.8-12.8v-38.4c0-6.4 6.4-12.8 12.8-12.8h38.4c6.4 0 12.8 6.4 12.8 12.8v38.4c0 6.4-6.4 12.8-12.8 12.8zM192 384c0-53.02 42.98-96 96-96s96 42.98 96 96H192zm256-140.8c0 6.4-6.4 12.8-12.8 12.8h-38.4c-6.4 0-12.8-6.4-12.8-12.8v-38.4c0-6.4 6.4-12.8 12.8-12.8h38.4c6.4 0 12.8 6.4 12.8 12.8v38.4zm0-96c0 6.4-6.4 12.8-12.8 12.8h-38.4c-6.4 0-12.8-6.4-12.8-12.8v-38.4c0-6.4 6.4-12.8 12.8-12.8h38.4c6.4 0 12.8 6.4 12.8 12.8v38.4z"]},Za={prefix:"fas",iconName:"hourglass",icon:[384,512,[],"f254","M360 64c13.255 0 24-10.745 24-24V24c0-13.255-10.745-24-24-24H24C10.745 0 0 10.745 0 24v16c0 13.255 10.745 24 24 24 0 90.965 51.016 167.734 120.842 192C75.016 280.266 24 357.035 24 448c-13.255 0-24 10.745-24 24v16c0 13.255 10.745 24 24 24h336c13.255 0 24-10.745 24-24v-16c0-13.255-10.745-24-24-24 0-90.965-51.016-167.734-120.842-192C308.984 231.734 360 154.965 360 64z"]},Qa={prefix:"fas",iconName:"hourglass-end",icon:[384,512,[],"f253","M360 64c13.255 0 24-10.745 24-24V24c0-13.255-10.745-24-24-24H24C10.745 0 0 10.745 0 24v16c0 13.255 10.745 24 24 24 0 90.965 51.016 167.734 120.842 192C75.016 280.266 24 357.035 24 448c-13.255 0-24 10.745-24 24v16c0 13.255 10.745 24 24 24h336c13.255 0 24-10.745 24-24v-16c0-13.255-10.745-24-24-24 0-90.965-51.016-167.734-120.842-192C308.984 231.734 360 154.965 360 64zM192 208c-57.787 0-104-66.518-104-144h208c0 77.945-46.51 144-104 144z"]},Ja={prefix:"fas",iconName:"hourglass-half",icon:[384,512,[],"f252","M360 0H24C10.745 0 0 10.745 0 24v16c0 13.255 10.745 24 24 24 0 90.965 51.016 167.734 120.842 192C75.016 280.266 24 357.035 24 448c-13.255 0-24 10.745-24 24v16c0 13.255 10.745 24 24 24h336c13.255 0 24-10.745 24-24v-16c0-13.255-10.745-24-24-24 0-90.965-51.016-167.734-120.842-192C308.984 231.734 360 154.965 360 64c13.255 0 24-10.745 24-24V24c0-13.255-10.745-24-24-24zm-75.078 384H99.08c17.059-46.797 52.096-80 92.92-80 40.821 0 75.862 33.196 92.922 80zm.019-256H99.078C91.988 108.548 88 86.748 88 64h208c0 22.805-3.987 44.587-11.059 64z"]},el={prefix:"fas",iconName:"hourglass-start",icon:[384,512,[],"f251","M360 0H24C10.745 0 0 10.745 0 24v16c0 13.255 10.745 24 24 24 0 90.965 51.016 167.734 120.842 192C75.016 280.266 24 357.035 24 448c-13.255 0-24 10.745-24 24v16c0 13.255 10.745 24 24 24h336c13.255 0 24-10.745 24-24v-16c0-13.255-10.745-24-24-24 0-90.965-51.016-167.734-120.842-192C308.984 231.734 360 154.965 360 64c13.255 0 24-10.745 24-24V24c0-13.255-10.745-24-24-24zm-64 448H88c0-77.458 46.204-144 104-144 57.786 0 104 66.517 104 144z"]},tl={prefix:"fas",iconName:"house-damage",icon:[576,512,[],"f6f1","M288 114.96L69.47 307.71c-1.62 1.46-3.69 2.14-5.47 3.35V496c0 8.84 7.16 16 16 16h149.23L192 439.19l104.11-64-60.16-119.22L384 392.75l-104.11 64L319.81 512H496c8.84 0 16-7.16 16-16V311.1c-1.7-1.16-3.72-1.82-5.26-3.2L288 114.96zm282.69 121.32L512 184.45V48c0-8.84-7.16-16-16-16h-64c-8.84 0-16 7.16-16 16v51.69L314.75 10.31C307.12 3.45 297.56.01 288 0s-19.1 3.41-26.7 10.27L5.31 236.28c-6.57 5.91-7.12 16.02-1.21 22.6l21.4 23.82c5.9 6.57 16.02 7.12 22.6 1.21L277.42 81.63c6.05-5.33 15.12-5.33 21.17 0L527.91 283.9c6.57 5.9 16.69 5.36 22.6-1.21l21.4-23.82c5.9-6.57 5.36-16.69-1.22-22.59z"]},il={prefix:"fas",iconName:"house-user",icon:[576,512,[],"e065","M570.69,236.27,512,184.44V48a16,16,0,0,0-16-16H432a16,16,0,0,0-16,16V99.67L314.78,10.3C308.5,4.61,296.53,0,288,0s-20.46,4.61-26.74,10.3l-256,226A18.27,18.27,0,0,0,0,248.2a18.64,18.64,0,0,0,4.09,10.71L25.5,282.7a21.14,21.14,0,0,0,12,5.3,21.67,21.67,0,0,0,10.69-4.11l15.9-14V480a32,32,0,0,0,32,32H480a32,32,0,0,0,32-32V269.88l15.91,14A21.94,21.94,0,0,0,538.63,288a20.89,20.89,0,0,0,11.87-5.31l21.41-23.81A21.64,21.64,0,0,0,576,248.19,21,21,0,0,0,570.69,236.27ZM288,176a64,64,0,1,1-64,64A64,64,0,0,1,288,176ZM400,448H176a16,16,0,0,1-16-16,96,96,0,0,1,96-96h64a96,96,0,0,1,96,96A16,16,0,0,1,400,448Z"]},nl={prefix:"fas",iconName:"hryvnia",icon:[384,512,[],"f6f2","M368 240c8.84 0 16-7.16 16-16v-32c0-8.84-7.16-16-16-16h-41.86c13.41-28.63 13.74-63.33-4.13-94.05C303.34 49.84 267.1 32 229.96 32h-78.82c-24.32 0-47.86 8.53-66.54 24.09L72.83 65.9c-10.18 8.49-11.56 23.62-3.07 33.8l20.49 24.59c8.49 10.19 23.62 11.56 33.81 3.07l11.73-9.78c4.32-3.6 9.77-5.57 15.39-5.57h83.62c11.69 0 21.2 9.52 21.2 21.2 0 5.91-2.48 11.58-6.81 15.58L219.7 176H16c-8.84 0-16 7.16-16 16v32c0 8.84 7.16 16 16 16h134.37l-34.67 32H16c-8.84 0-16 7.16-16 16v32c0 8.84 7.16 16 16 16h41.86c-13.41 28.63-13.74 63.33 4.13 94.05C80.66 462.15 116.9 480 154.04 480h78.82c24.32 0 47.86-8.53 66.54-24.09l11.77-9.81c10.18-8.49 11.56-23.62 3.07-33.8l-20.49-24.59c-8.49-10.19-23.62-11.56-33.81-3.07l-11.75 9.8a23.992 23.992 0 0 1-15.36 5.56H149.2c-11.69 0-21.2-9.52-21.2-21.2 0-5.91 2.48-11.58 6.81-15.58L164.3 336H368c8.84 0 16-7.16 16-16v-32c0-8.84-7.16-16-16-16H233.63l34.67-32H368z"]},sl={prefix:"fas",iconName:"i-cursor",icon:[256,512,[],"f246","M256 52.048V12.065C256 5.496 250.726.148 244.158.066 211.621-.344 166.469.011 128 37.959 90.266.736 46.979-.114 11.913.114 5.318.157 0 5.519 0 12.114v39.645c0 6.687 5.458 12.078 12.145 11.998C38.111 63.447 96 67.243 96 112.182V224H60c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h36v112c0 44.932-56.075 48.031-83.95 47.959C5.404 447.942 0 453.306 0 459.952v39.983c0 6.569 5.274 11.917 11.842 11.999 32.537.409 77.689.054 116.158-37.894 37.734 37.223 81.021 38.073 116.087 37.845 6.595-.043 11.913-5.405 11.913-12V460.24c0-6.687-5.458-12.078-12.145-11.998C217.889 448.553 160 444.939 160 400V288h36c6.627 0 12-5.373 12-12v-40c0-6.627-5.373-12-12-12h-36V112.182c0-44.932 56.075-48.213 83.95-48.142 6.646.018 12.05-5.346 12.05-11.992z"]},rl={prefix:"fas",iconName:"ice-cream",icon:[448,512,[],"f810","M368 160h-.94a144 144 0 1 0-286.12 0H80a48 48 0 0 0 0 96h288a48 48 0 0 0 0-96zM195.38 493.69a31.52 31.52 0 0 0 57.24 0L352 288H96z"]},ol={prefix:"fas",iconName:"icicles",icon:[512,512,[],"f7ad","M511.4 37.9C515.1 18.2 500 0 480 0H32C10.6 0-4.8 20.7 1.4 41.2l87.1 273.4c2.5 7.2 12.7 7.2 15.1 0L140 190.5l44.2 187.3c1.9 8.3 13.7 8.3 15.6 0l46.5-196.9 34.1 133.4c2.3 7.6 13 7.6 15.3 0l45.8-172.5 66.7 363.8c1.7 8.6 14 8.6 15.7 0l87.5-467.7z"]},al={prefix:"fas",iconName:"icons",icon:[512,512,[],"f86d","M116.65 219.35a15.68 15.68 0 0 0 22.65 0l96.75-99.83c28.15-29 26.5-77.1-4.91-103.88C203.75-7.7 163-3.5 137.86 22.44L128 32.58l-9.85-10.14C93.05-3.5 52.25-7.7 24.86 15.64c-31.41 26.78-33 74.85-5 103.88zm143.92 100.49h-48l-7.08-14.24a27.39 27.39 0 0 0-25.66-17.78h-71.71a27.39 27.39 0 0 0-25.66 17.78l-7 14.24h-48A27.45 27.45 0 0 0 0 347.3v137.25A27.44 27.44 0 0 0 27.43 512h233.14A27.45 27.45 0 0 0 288 484.55V347.3a27.45 27.45 0 0 0-27.43-27.46zM144 468a52 52 0 1 1 52-52 52 52 0 0 1-52 52zm355.4-115.9h-60.58l22.36-50.75c2.1-6.65-3.93-13.21-12.18-13.21h-75.59c-6.3 0-11.66 3.9-12.5 9.1l-16.8 106.93c-1 6.3 4.88 11.89 12.5 11.89h62.31l-24.2 83c-1.89 6.65 4.2 12.9 12.23 12.9a13.26 13.26 0 0 0 10.92-5.25l92.4-138.91c4.88-6.91-1.16-15.7-10.87-15.7zM478.08.33L329.51 23.17C314.87 25.42 304 38.92 304 54.83V161.6a83.25 83.25 0 0 0-16-1.7c-35.35 0-64 21.48-64 48s28.65 48 64 48c35.2 0 63.73-21.32 64-47.66V99.66l112-17.22v47.18a83.25 83.25 0 0 0-16-1.7c-35.35 0-64 21.48-64 48s28.65 48 64 48c35.2 0 63.73-21.32 64-47.66V32c0-19.48-16-34.42-33.92-31.67z"]},ll={prefix:"fas",iconName:"id-badge",icon:[384,512,[],"f2c1","M336 0H48C21.5 0 0 21.5 0 48v416c0 26.5 21.5 48 48 48h288c26.5 0 48-21.5 48-48V48c0-26.5-21.5-48-48-48zM144 32h96c8.8 0 16 7.2 16 16s-7.2 16-16 16h-96c-8.8 0-16-7.2-16-16s7.2-16 16-16zm48 128c35.3 0 64 28.7 64 64s-28.7 64-64 64-64-28.7-64-64 28.7-64 64-64zm112 236.8c0 10.6-10 19.2-22.4 19.2H102.4C90 416 80 407.4 80 396.8v-19.2c0-31.8 30.1-57.6 67.2-57.6h5c12.3 5.1 25.7 8 39.8 8s27.6-2.9 39.8-8h5c37.1 0 67.2 25.8 67.2 57.6v19.2z"]},cl={prefix:"fas",iconName:"id-card",icon:[576,512,[],"f2c2","M528 32H48C21.5 32 0 53.5 0 80v16h576V80c0-26.5-21.5-48-48-48zM0 432c0 26.5 21.5 48 48 48h480c26.5 0 48-21.5 48-48V128H0v304zm352-232c0-4.4 3.6-8 8-8h144c4.4 0 8 3.6 8 8v16c0 4.4-3.6 8-8 8H360c-4.4 0-8-3.6-8-8v-16zm0 64c0-4.4 3.6-8 8-8h144c4.4 0 8 3.6 8 8v16c0 4.4-3.6 8-8 8H360c-4.4 0-8-3.6-8-8v-16zm0 64c0-4.4 3.6-8 8-8h144c4.4 0 8 3.6 8 8v16c0 4.4-3.6 8-8 8H360c-4.4 0-8-3.6-8-8v-16zM176 192c35.3 0 64 28.7 64 64s-28.7 64-64 64-64-28.7-64-64 28.7-64 64-64zM67.1 396.2C75.5 370.5 99.6 352 128 352h8.2c12.3 5.1 25.7 8 39.8 8s27.6-2.9 39.8-8h8.2c28.4 0 52.5 18.5 60.9 44.2 3.2 9.9-5.2 19.8-15.6 19.8H82.7c-10.4 0-18.8-10-15.6-19.8z"]},hl={prefix:"fas",iconName:"id-card-alt",icon:[576,512,[],"f47f","M528 64H384v96H192V64H48C21.5 64 0 85.5 0 112v352c0 26.5 21.5 48 48 48h480c26.5 0 48-21.5 48-48V112c0-26.5-21.5-48-48-48zM288 224c35.3 0 64 28.7 64 64s-28.7 64-64 64-64-28.7-64-64 28.7-64 64-64zm93.3 224H194.7c-10.4 0-18.8-10-15.6-19.8 8.3-25.6 32.4-44.2 60.9-44.2h8.2c12.3 5.1 25.7 8 39.8 8s27.6-2.9 39.8-8h8.2c28.4 0 52.5 18.5 60.9 44.2 3.2 9.8-5.2 19.8-15.6 19.8zM352 32c0-17.7-14.3-32-32-32h-64c-17.7 0-32 14.3-32 32v96h128V32z"]},dl={prefix:"fas",iconName:"igloo",icon:[576,512,[],"f7ae","M320 33.9c-10.5-1.2-21.2-1.9-32-1.9-99.8 0-187.8 50.8-239.4 128H320V33.9zM96 192H30.3C11.1 230.6 0 274 0 320h96V192zM352 39.4V160h175.4C487.2 99.9 424.8 55.9 352 39.4zM480 320h96c0-46-11.1-89.4-30.3-128H480v128zm-64 64v96h128c17.7 0 32-14.3 32-32v-96H411.5c2.6 10.3 4.5 20.9 4.5 32zm32-192H128v128h49.8c22.2-38.1 63-64 110.2-64s88 25.9 110.2 64H448V192zM0 448c0 17.7 14.3 32 32 32h128v-96c0-11.1 1.9-21.7 4.5-32H0v96zm288-160c-53 0-96 43-96 96v96h192v-96c0-53-43-96-96-96z"]},ul={prefix:"fas",iconName:"image",icon:[512,512,[],"f03e","M464 448H48c-26.51 0-48-21.49-48-48V112c0-26.51 21.49-48 48-48h416c26.51 0 48 21.49 48 48v288c0 26.51-21.49 48-48 48zM112 120c-30.928 0-56 25.072-56 56s25.072 56 56 56 56-25.072 56-56-25.072-56-56-56zM64 384h384V272l-87.515-87.515c-4.686-4.686-12.284-4.686-16.971 0L208 320l-55.515-55.515c-4.686-4.686-12.284-4.686-16.971 0L64 336v48z"]},pl={prefix:"fas",iconName:"images",icon:[576,512,[],"f302","M480 416v16c0 26.51-21.49 48-48 48H48c-26.51 0-48-21.49-48-48V176c0-26.51 21.49-48 48-48h16v208c0 44.112 35.888 80 80 80h336zm96-80V80c0-26.51-21.49-48-48-48H144c-26.51 0-48 21.49-48 48v256c0 26.51 21.49 48 48 48h384c26.51 0 48-21.49 48-48zM256 128c0 26.51-21.49 48-48 48s-48-21.49-48-48 21.49-48 48-48 48 21.49 48 48zm-96 144l55.515-55.515c4.686-4.686 12.284-4.686 16.971 0L272 256l135.515-135.515c4.686-4.686 12.284-4.686 16.971 0L512 208v112H160v-48z"]},gl={prefix:"fas",iconName:"inbox",icon:[576,512,[],"f01c","M567.938 243.908L462.25 85.374A48.003 48.003 0 0 0 422.311 64H153.689a48 48 0 0 0-39.938 21.374L8.062 243.908A47.994 47.994 0 0 0 0 270.533V400c0 26.51 21.49 48 48 48h480c26.51 0 48-21.49 48-48V270.533a47.994 47.994 0 0 0-8.062-26.625zM162.252 128h251.497l85.333 128H376l-32 64H232l-32-64H76.918l85.334-128z"]},fl={prefix:"fas",iconName:"indent",icon:[448,512,[],"f03c","M27.31 363.3l96-96a16 16 0 0 0 0-22.62l-96-96C17.27 138.66 0 145.78 0 160v192c0 14.31 17.33 21.3 27.31 11.3zM432 416H16a16 16 0 0 0-16 16v32a16 16 0 0 0 16 16h416a16 16 0 0 0 16-16v-32a16 16 0 0 0-16-16zm3.17-128H204.83A12.82 12.82 0 0 0 192 300.83v38.34A12.82 12.82 0 0 0 204.83 352h230.34A12.82 12.82 0 0 0 448 339.17v-38.34A12.82 12.82 0 0 0 435.17 288zm0-128H204.83A12.82 12.82 0 0 0 192 172.83v38.34A12.82 12.82 0 0 0 204.83 224h230.34A12.82 12.82 0 0 0 448 211.17v-38.34A12.82 12.82 0 0 0 435.17 160zM432 32H16A16 16 0 0 0 0 48v32a16 16 0 0 0 16 16h416a16 16 0 0 0 16-16V48a16 16 0 0 0-16-16z"]},ml={prefix:"fas",iconName:"industry",icon:[512,512,[],"f275","M475.115 163.781L336 252.309v-68.28c0-18.916-20.931-30.399-36.885-20.248L160 252.309V56c0-13.255-10.745-24-24-24H24C10.745 32 0 42.745 0 56v400c0 13.255 10.745 24 24 24h464c13.255 0 24-10.745 24-24V184.029c0-18.917-20.931-30.399-36.885-20.248z"]},vl={prefix:"fas",iconName:"infinity",icon:[640,512,[],"f534","M471.1 96C405 96 353.3 137.3 320 174.6 286.7 137.3 235 96 168.9 96 75.8 96 0 167.8 0 256s75.8 160 168.9 160c66.1 0 117.8-41.3 151.1-78.6 33.3 37.3 85 78.6 151.1 78.6 93.1 0 168.9-71.8 168.9-160S564.2 96 471.1 96zM168.9 320c-40.2 0-72.9-28.7-72.9-64s32.7-64 72.9-64c38.2 0 73.4 36.1 94 64-20.4 27.6-55.9 64-94 64zm302.2 0c-38.2 0-73.4-36.1-94-64 20.4-27.6 55.9-64 94-64 40.2 0 72.9 28.7 72.9 64s-32.7 64-72.9 64z"]},yl={prefix:"fas",iconName:"info",icon:[192,512,[],"f129","M20 424.229h20V279.771H20c-11.046 0-20-8.954-20-20V212c0-11.046 8.954-20 20-20h112c11.046 0 20 8.954 20 20v212.229h20c11.046 0 20 8.954 20 20V492c0 11.046-8.954 20-20 20H20c-11.046 0-20-8.954-20-20v-47.771c0-11.046 8.954-20 20-20zM96 0C56.235 0 24 32.235 24 72s32.235 72 72 72 72-32.235 72-72S135.764 0 96 0z"]},Cl={prefix:"fas",iconName:"info-circle",icon:[512,512,[],"f05a","M256 8C119.043 8 8 119.083 8 256c0 136.997 111.043 248 248 248s248-111.003 248-248C504 119.083 392.957 8 256 8zm0 110c23.196 0 42 18.804 42 42s-18.804 42-42 42-42-18.804-42-42 18.804-42 42-42zm56 254c0 6.627-5.373 12-12 12h-88c-6.627 0-12-5.373-12-12v-24c0-6.627 5.373-12 12-12h12v-64h-12c-6.627 0-12-5.373-12-12v-24c0-6.627 5.373-12 12-12h64c6.627 0 12 5.373 12 12v100h12c6.627 0 12 5.373 12 12v24z"]},bl={prefix:"fas",iconName:"italic",icon:[320,512,[],"f033","M320 48v32a16 16 0 0 1-16 16h-62.76l-80 320H208a16 16 0 0 1 16 16v32a16 16 0 0 1-16 16H16a16 16 0 0 1-16-16v-32a16 16 0 0 1 16-16h62.76l80-320H112a16 16 0 0 1-16-16V48a16 16 0 0 1 16-16h192a16 16 0 0 1 16 16z"]},Sl={prefix:"fas",iconName:"jedi",icon:[576,512,[],"f669","M535.95308,352c-42.64069,94.17188-137.64086,160-247.9848,160q-6.39844,0-12.84377-.29688C171.15558,506.9375,81.26481,442.23438,40.01474,352H79.93668L21.3272,293.40625a264.82522,264.82522,0,0,1-5.10938-39.42187,273.6653,273.6653,0,0,1,.5-29.98438H63.93665L22.546,182.625A269.79782,269.79782,0,0,1,130.51489,20.54688a16.06393,16.06393,0,0,1,9.28127-3,16.36332,16.36332,0,0,1,13.5,7.25,16.02739,16.02739,0,0,1,1.625,15.09374,138.387,138.387,0,0,0-9.84376,51.26563c0,45.10937,21.04691,86.57813,57.71884,113.73437a16.29989,16.29989,0,0,1,1.20313,25.39063c-26.54692,23.98437-41.17194,56.5-41.17194,91.57813,0,60.03124,42.95319,110.28124,99.89079,121.92187l2.5-65.26563L238.062,397a8.33911,8.33911,0,0,1-10-.75,8.025,8.025,0,0,1-1.39063-9.9375l20.125-33.76562-42.06257-8.73438a7.9898,7.9898,0,0,1,0-15.65625l42.06257-8.71875-20.10941-33.73438a7.99122,7.99122,0,0,1,11.35939-10.71874L268.437,295.64062,279.95265,7.67188a7.97138,7.97138,0,0,1,8-7.67188h.04687a8.02064,8.02064,0,0,1,7.95314,7.70312L307.48394,295.625l30.39068-20.67188a8.08327,8.08327,0,0,1,10,.8125,7.99866,7.99866,0,0,1,1.39062,9.90626L329.12461,319.4375l42.07819,8.73438a7.99373,7.99373,0,0,1,0,15.65624l-42.07819,8.71876,20.1094,33.73437a7.97791,7.97791,0,0,1-1.32812,9.92187A8.25739,8.25739,0,0,1,337.87462,397L310.7027,378.53125l2.5,65.34375c48.48446-9.40625,87.57828-48.15625,97.31267-96.5A123.52652,123.52652,0,0,0,371.9528,230.29688a16.30634,16.30634,0,0,1,1.20313-25.42188c36.65631-27.17188,57.6876-68.60938,57.6876-113.73438a138.01689,138.01689,0,0,0-9.85939-51.3125,15.98132,15.98132,0,0,1,1.60937-15.09374,16.36914,16.36914,0,0,1,13.5-7.23438,16.02453,16.02453,0,0,1,9.25,2.98438A271.26947,271.26947,0,0,1,553.25,182.76562L511.99992,224h46.9532C559.3125,229.76562,560,235.45312,560,241.26562a270.092,270.092,0,0,1-5.125,51.85938L495.98427,352Z"]},wl={prefix:"fas",iconName:"joint",icon:[640,512,[],"f595","M444.34 181.1c22.38 15.68 35.66 41.16 35.66 68.59V280c0 4.42 3.58 8 8 8h48c4.42 0 8-3.58 8-8v-30.31c0-43.24-21.01-83.41-56.34-108.06C463.85 125.02 448 99.34 448 70.31V8c0-4.42-3.58-8-8-8h-48c-4.42 0-8 3.58-8 8v66.4c0 43.69 24.56 81.63 60.34 106.7zM194.97 358.98C126.03 370.07 59.69 394.69 0 432c83.65 52.28 180.3 80 278.94 80h88.57L254.79 380.49c-14.74-17.2-37.45-25.11-59.82-21.51zM553.28 87.09c-5.67-3.8-9.28-9.96-9.28-16.78V8c0-4.42-3.58-8-8-8h-48c-4.42 0-8 3.58-8 8v62.31c0 22.02 10.17 43.41 28.64 55.39C550.79 153.04 576 199.54 576 249.69V280c0 4.42 3.58 8 8 8h48c4.42 0 8-3.58 8-8v-30.31c0-65.44-32.41-126.19-86.72-162.6zM360.89 352.05c-34.4.06-86.81.15-88.21.17l117.8 137.43A63.987 63.987 0 0 0 439.07 512h88.45L409.57 374.4a63.955 63.955 0 0 0-48.68-22.35zM616 352H432l117.99 137.65A63.987 63.987 0 0 0 598.58 512H616c13.25 0 24-10.75 24-24V376c0-13.26-10.75-24-24-24z"]},xl={prefix:"fas",iconName:"journal-whills",icon:[448,512,[],"f66a","M438.40625,377.59375c-3.20313,12.8125-3.20313,57.60937,0,73.60937Q447.9922,460.78907,448,470.40625v16c0,16-12.79688,25.59375-25.59375,25.59375H96c-54.40625,0-96-41.59375-96-96V96C0,41.59375,41.59375,0,96,0H422.40625C438.40625,0,448,9.59375,448,25.59375v332.8125Q448,372.79688,438.40625,377.59375ZM380.79688,384H96c-16,0-32,12.79688-32,32s12.79688,32,32,32H380.79688ZM128.01562,176.01562c0,.51563.14063.98438.14063,1.5l37.10937,32.46876A7.99954,7.99954,0,0,1,160,224h-.01562a9.17678,9.17678,0,0,1-5.25-1.98438L131.14062,201.375C142.6875,250.95312,186.90625,288,240,288s97.3125-37.04688,108.875-86.625l-23.59375,20.64062a8.02516,8.02516,0,0,1-5.26563,1.96876H320a9.14641,9.14641,0,0,1-6.01562-2.71876A9.26508,9.26508,0,0,1,312,216a9.097,9.097,0,0,1,2.73438-6.01562l37.10937-32.46876c.01563-.53124.15625-1,.15625-1.51562,0-11.04688-2.09375-21.51562-5.06251-31.59375l-21.26562,21.25a8.00467,8.00467,0,0,1-11.32812-11.3125l26.42187-26.40625a111.81517,111.81517,0,0,0-46.35937-49.26562,63.02336,63.02336,0,0,1-14.0625,82.64062A55.83846,55.83846,0,0,1,251.625,254.73438l-1.42188-34.28126,12.67188,8.625a3.967,3.967,0,0,0,2.25.6875,3.98059,3.98059,0,0,0,3.43749-6.03124l-8.53124-14.3125,17.90625-3.71876a4.00647,4.00647,0,0,0,0-7.84374l-17.90625-3.71876,8.53124-14.3125a3.98059,3.98059,0,0,0-3.43749-6.03124,4.726,4.726,0,0,0-2.25.67187L248.6875,184.125,244,71.82812a4.00386,4.00386,0,0,0-8,0l-4.625,110.8125-12-8.15624a4.003,4.003,0,0,0-5.68751,5.35937l8.53126,14.3125L204.3125,197.875a3.99686,3.99686,0,0,0,0,7.82812l17.90625,3.73438-8.53126,14.29688a4.72469,4.72469,0,0,0-.56249,2.04687,4.59547,4.59547,0,0,0,1.25,2.90625,4.01059,4.01059,0,0,0,2.75,1.09375,4.09016,4.09016,0,0,0,2.25-.6875l10.35937-7.04687L228.375,254.76562a55.86414,55.86414,0,0,1-28.71875-93.45312,63.01119,63.01119,0,0,1-14.04688-82.65625,111.93158,111.93158,0,0,0-46.375,49.26563l26.42187,26.42187a7.99917,7.99917,0,0,1-11.3125,11.3125l-21.26563-21.26563C130.09375,154.48438,128,164.95312,128.01562,176.01562Z"]},El={prefix:"fas",iconName:"kaaba",icon:[576,512,[],"f66b","M554.12 83.51L318.36 4.93a95.962 95.962 0 0 0-60.71 0L21.88 83.51A32.006 32.006 0 0 0 0 113.87v49.01l265.02-79.51c15.03-4.5 30.92-4.5 45.98 0l265 79.51v-49.01c0-13.77-8.81-26-21.88-30.36zm-279.9 30.52L0 196.3v228.38c0 15 10.42 27.98 25.06 31.24l242.12 53.8a95.937 95.937 0 0 0 41.65 0l242.12-53.8c14.64-3.25 25.06-16.24 25.06-31.24V196.29l-274.2-82.26c-9.04-2.72-18.59-2.72-27.59 0zM128 230.11c0 3.61-2.41 6.77-5.89 7.72l-80 21.82C37.02 261.03 32 257.2 32 251.93v-16.58c0-3.61 2.41-6.77 5.89-7.72l80-21.82c5.09-1.39 10.11 2.44 10.11 7.72v16.58zm144-39.28c0 3.61-2.41 6.77-5.89 7.72l-96 26.18c-5.09 1.39-10.11-2.44-10.11-7.72v-16.58c0-3.61 2.41-6.77 5.89-7.72l96-26.18c5.09-1.39 10.11 2.44 10.11 7.72v16.58zm176 22.7c0-5.28 5.02-9.11 10.11-7.72l80 21.82c3.48.95 5.89 4.11 5.89 7.72v16.58c0 5.28-5.02 9.11-10.11 7.72l-80-21.82a7.997 7.997 0 0 1-5.89-7.72v-16.58zm-144-39.27c0-5.28 5.02-9.11 10.11-7.72l96 26.18c3.48.95 5.89 4.11 5.89 7.72v16.58c0 5.28-5.02 9.11-10.11 7.72l-96-26.18a7.997 7.997 0 0 1-5.89-7.72v-16.58z"]},Ml={prefix:"fas",iconName:"key",icon:[512,512,[],"f084","M512 176.001C512 273.203 433.202 352 336 352c-11.22 0-22.19-1.062-32.827-3.069l-24.012 27.014A23.999 23.999 0 0 1 261.223 384H224v40c0 13.255-10.745 24-24 24h-40v40c0 13.255-10.745 24-24 24H24c-13.255 0-24-10.745-24-24v-78.059c0-6.365 2.529-12.47 7.029-16.971l161.802-161.802C163.108 213.814 160 195.271 160 176 160 78.798 238.797.001 335.999 0 433.488-.001 512 78.511 512 176.001zM336 128c0 26.51 21.49 48 48 48s48-21.49 48-48-21.49-48-48-48-48 21.49-48 48z"]},Al={prefix:"fas",iconName:"keyboard",icon:[576,512,[],"f11c","M528 448H48c-26.51 0-48-21.49-48-48V112c0-26.51 21.49-48 48-48h480c26.51 0 48 21.49 48 48v288c0 26.51-21.49 48-48 48zM128 180v-40c0-6.627-5.373-12-12-12H76c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm96 0v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm96 0v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm96 0v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm96 0v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm-336 96v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm96 0v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm96 0v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm96 0v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm-336 96v-40c0-6.627-5.373-12-12-12H76c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm288 0v-40c0-6.627-5.373-12-12-12H172c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h232c6.627 0 12-5.373 12-12zm96 0v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12z"]},Tl={prefix:"fas",iconName:"khanda",icon:[512,512,[],"f66d","M415.81 66c-6.37-3.5-14.37-2.33-19.36 3.02a15.974 15.974 0 0 0-1.91 19.52c16.49 26.16 25.2 56.39 25.2 87.41-.19 53.25-26.77 102.69-71.27 132.41l-76.63 53.35v-20.1l44.05-36.09c3.92-4.2 5-10.09 2.81-15.28L310.85 273c33.84-19.26 56.94-55.25 56.94-96.99 0-40.79-22.02-76.13-54.59-95.71l5.22-11.44c2.34-5.53.93-11.83-3.57-16.04L255.86 0l-58.99 52.81c-4.5 4.21-5.9 10.51-3.57 16.04l5.22 11.44c-32.57 19.58-54.59 54.93-54.59 95.72 0 41.75 23.09 77.73 56.94 96.99l-7.85 17.24c-2.19 5.18-1.1 11.07 2.81 15.28l44.05 36.09v19.9l-76.59-53.33C119.02 278.62 92.44 229.19 92.26 176c0-31.08 8.71-61.31 25.2-87.47 3.87-6.16 2.4-13.77-2.59-19.08-5-5.34-13.68-6.2-20.02-2.7C16.32 109.6-22.3 205.3 13.36 295.99c7.07 17.99 17.89 34.38 30.46 49.06l55.97 65.36c4.87 5.69 13.04 7.24 19.65 3.72l79.35-42.23L228 392.23l-47.08 32.78c-1.67-.37-3.23-1.01-5.01-1.01-13.25 0-23.99 10.74-23.99 24 0 13.25 10.74 24 23.99 24 12.1 0 21.69-9.11 23.33-20.76l40.63-28.28v29.95c-9.39 5.57-15.99 15.38-15.99 27.1 0 17.67 14.32 32 31.98 32s31.98-14.33 31.98-32c0-11.71-6.61-21.52-15.99-27.1v-30.15l40.91 28.48C314.41 462.89 324 472 336.09 472c13.25 0 23.99-10.75 23.99-24 0-13.26-10.74-24-23.99-24-1.78 0-3.34.64-5.01 1.01L284 392.23l29.21-20.34 79.35 42.23c6.61 3.52 14.78 1.97 19.65-3.71l52.51-61.31c18.87-22.02 34-47.5 41.25-75.59 21.62-83.66-16.45-167.27-90.16-207.51zm-95.99 110c0 22.3-11.49 41.92-28.83 53.38l-5.65-12.41c-8.75-24.52-8.75-51.04 0-75.56l7.83-17.18c16.07 11.65 26.65 30.45 26.65 51.77zm-127.93 0c0-21.32 10.58-40.12 26.66-51.76l7.83 17.18c8.75 24.52 8.75 51.03 0 75.56l-5.65 12.41c-17.34-11.46-28.84-31.09-28.84-53.39z"]},Dl={prefix:"fas",iconName:"kiss",icon:[496,512,[],"f596","M248 8C111 8 0 119 0 256s111 248 248 248 248-111 248-248S385 8 248 8zm-80 232c-17.7 0-32-14.3-32-32s14.3-32 32-32 32 14.3 32 32-14.3 32-32 32zm136 156c0 19.2-28.7 41.5-71.5 44-8.5.8-12.1-11.8-3.6-15.4l17-7.2c13-5.5 20.8-13.5 20.8-21.5s-7.8-16-20.8-21.5l-17-7.2c-6-2.5-6.1-12.2 0-14.8l17-7.2c13-5.5 20.8-13.5 20.8-21.5s-7.8-16-20.8-21.5l-17-7.2c-8.6-3.6-4.8-16.5 3.6-15.4 42.8 2.5 71.5 24.8 71.5 44 0 13-13.4 27.3-35.2 36C290.6 368.7 304 383 304 396zm24-156c-17.7 0-32-14.3-32-32s14.3-32 32-32 32 14.3 32 32-14.3 32-32 32z"]},Il={prefix:"fas",iconName:"kiss-beam",icon:[496,512,[],"f597","M248 8C111 8 0 119 0 256s111 248 248 248 248-111 248-248S385 8 248 8zm-39 219.9l-9.5-17c-7.7-13.7-19.2-21.6-31.5-21.6s-23.8 7.9-31.5 21.6l-9.5 17c-4.2 7.4-15.6 4-14.9-4.5 3.3-42.1 32.2-71.4 56-71.4s52.7 29.3 56 71.4c.5 8.5-10.9 12-15.1 4.5zM304 396c0 19.2-28.7 41.5-71.5 44-8.5.8-12.1-11.8-3.6-15.4l17-7.2c13-5.5 20.8-13.5 20.8-21.5s-7.8-16-20.8-21.5l-17-7.2c-6-2.5-6.1-12.2 0-14.8l17-7.2c13-5.5 20.8-13.5 20.8-21.5s-7.8-16-20.8-21.5l-17-7.2c-8.6-3.6-4.8-16.5 3.6-15.4 42.8 2.5 71.5 24.8 71.5 44 0 13-13.4 27.3-35.2 36C290.6 368.7 304 383 304 396zm65-168.1l-9.5-17c-7.7-13.7-19.2-21.6-31.5-21.6s-23.8 7.9-31.5 21.6l-9.5 17c-4.1 7.3-15.6 4-14.9-4.5 3.3-42.1 32.2-71.4 56-71.4s52.7 29.3 56 71.4c.5 8.5-10.9 12-15.1 4.5z"]},Rl={prefix:"fas",iconName:"kiss-wink-heart",icon:[504,512,[],"f598","M501.1 402.5c-8-20.8-31.5-31.5-53.1-25.9l-8.4 2.2-2.3-8.4c-5.9-21.4-27-36.5-49-33-25.2 4-40.6 28.6-34 52.6l22.9 82.6c1.5 5.3 7 8.5 12.4 7.1l83-21.5c24.1-6.3 37.7-31.8 28.5-55.7zm-177.6-4c-5.6-20.3-2.3-42 9-59.7 29.7-46.3 98.7-45.5 127.8 4.3 6.4.1 12.6 1.4 18.6 2.9 10.9-27.9 17.1-58.2 17.1-90C496 119 385 8 248 8S0 119 0 256s111 248 248 248c35.4 0 68.9-7.5 99.4-20.9-.3-.7-23.9-84.6-23.9-84.6zM168 240c-17.7 0-32-14.3-32-32s14.3-32 32-32 32 14.3 32 32-14.3 32-32 32zm120 156c0 19.2-28.7 41.5-71.5 44-8.5.8-12.1-11.8-3.6-15.4l17-7.2c13-5.5 20.8-13.5 20.8-21.5s-7.8-16-20.8-21.5l-17-7.2c-6-2.5-5.7-12.3 0-14.8l17-7.2c13-5.5 20.8-13.5 20.8-21.5s-7.8-16-20.8-21.5l-17-7.2c-8.8-3.7-4.6-16.6 3.6-15.4 42.8 2.5 71.5 24.8 71.5 44 0 13-13.4 27.3-35.2 36C274.6 368.7 288 383 288 396zm16-179c-8.3 7.4-21.6.4-19.8-10.8 4-25.2 34.2-42.1 59.9-42.1S400 181 404 206.2c1.7 11.1-11.3 18.3-19.8 10.8l-9.5-8.5c-14.8-13.2-46.2-13.2-61 0L304 217z"]},Ll={prefix:"fas",iconName:"kiwi-bird",icon:[576,512,[],"f535","M575.81 217.98C572.64 157.41 518.28 112 457.63 112h-9.37c-52.82 0-104.25-16.25-147.74-46.24-41.99-28.96-96.04-41.62-153.21-28.7C129.3 41.12-.08 78.24 0 224c.04 70.95 38.68 132.8 95.99 166.01V464c0 8.84 7.16 16 16 16h16c8.84 0 16-7.16 16-16v-54.26c15.36 3.96 31.4 6.26 48 6.26 5.44 0 10.68-.73 16-1.18V464c0 8.84 7.16 16 16 16h16c8.84 0 16-7.16 16-16v-59.43c14.24-5.06 27.88-11.39 40.34-19.51C342.07 355.25 393.86 336 448.46 336c25.48 0 16.01-.31 23.05-.78l74.41 136.44c2.86 5.23 8.3 8.34 14.05 8.34 1.31 0 2.64-.16 3.95-.5 7.09-1.8 12.05-8.19 12.05-15.5 0 0 .14-240.24-.16-246.02zM463.97 248c-13.25 0-24-10.75-24-24 0-13.26 10.75-24 24-24s24 10.74 24 24c0 13.25-10.75 24-24 24zm80 153.25l-39.86-73.08c15.12-5.83 28.73-14.6 39.86-25.98v99.06z"]},kl={prefix:"fas",iconName:"landmark",icon:[512,512,[],"f66f","M501.62 92.11L267.24 2.04a31.958 31.958 0 0 0-22.47 0L10.38 92.11A16.001 16.001 0 0 0 0 107.09V144c0 8.84 7.16 16 16 16h480c8.84 0 16-7.16 16-16v-36.91c0-6.67-4.14-12.64-10.38-14.98zM64 192v160H48c-8.84 0-16 7.16-16 16v48h448v-48c0-8.84-7.16-16-16-16h-16V192h-64v160h-96V192h-64v160h-96V192H64zm432 256H16c-8.84 0-16 7.16-16 16v32c0 8.84 7.16 16 16 16h480c8.84 0 16-7.16 16-16v-32c0-8.84-7.16-16-16-16z"]},Pl={prefix:"fas",iconName:"language",icon:[640,512,[],"f1ab","M152.1 236.2c-3.5-12.1-7.8-33.2-7.8-33.2h-.5s-4.3 21.1-7.8 33.2l-11.1 37.5H163zM616 96H336v320h280c13.3 0 24-10.7 24-24V120c0-13.3-10.7-24-24-24zm-24 120c0 6.6-5.4 12-12 12h-11.4c-6.9 23.6-21.7 47.4-42.7 69.9 8.4 6.4 17.1 12.5 26.1 18 5.5 3.4 7.3 10.5 4.1 16.2l-7.9 13.9c-3.4 5.9-10.9 7.8-16.7 4.3-12.6-7.8-24.5-16.1-35.4-24.9-10.9 8.7-22.7 17.1-35.4 24.9-5.8 3.5-13.3 1.6-16.7-4.3l-7.9-13.9c-3.2-5.6-1.4-12.8 4.2-16.2 9.3-5.7 18-11.7 26.1-18-7.9-8.4-14.9-17-21-25.7-4-5.7-2.2-13.6 3.7-17.1l6.5-3.9 7.3-4.3c5.4-3.2 12.4-1.7 16 3.4 5 7 10.8 14 17.4 20.9 13.5-14.2 23.8-28.9 30-43.2H412c-6.6 0-12-5.4-12-12v-16c0-6.6 5.4-12 12-12h64v-16c0-6.6 5.4-12 12-12h16c6.6 0 12 5.4 12 12v16h64c6.6 0 12 5.4 12 12zM0 120v272c0 13.3 10.7 24 24 24h280V96H24c-13.3 0-24 10.7-24 24zm58.9 216.1L116.4 167c1.7-4.9 6.2-8.1 11.4-8.1h32.5c5.1 0 9.7 3.3 11.4 8.1l57.5 169.1c2.6 7.8-3.1 15.9-11.4 15.9h-22.9a12 12 0 0 1-11.5-8.6l-9.4-31.9h-60.2l-9.1 31.8c-1.5 5.1-6.2 8.7-11.5 8.7H70.3c-8.2 0-14-8.1-11.4-15.9z"]},Nl={prefix:"fas",iconName:"laptop",icon:[640,512,[],"f109","M624 416H381.54c-.74 19.81-14.71 32-32.74 32H288c-18.69 0-33.02-17.47-32.77-32H16c-8.8 0-16 7.2-16 16v16c0 35.2 28.8 64 64 64h512c35.2 0 64-28.8 64-64v-16c0-8.8-7.2-16-16-16zM576 48c0-26.4-21.6-48-48-48H112C85.6 0 64 21.6 64 48v336h512V48zm-64 272H128V64h384v256z"]},Ol={prefix:"fas",iconName:"laptop-code",icon:[640,512,[],"f5fc","M255.03 261.65c6.25 6.25 16.38 6.25 22.63 0l11.31-11.31c6.25-6.25 6.25-16.38 0-22.63L253.25 192l35.71-35.72c6.25-6.25 6.25-16.38 0-22.63l-11.31-11.31c-6.25-6.25-16.38-6.25-22.63 0l-58.34 58.34c-6.25 6.25-6.25 16.38 0 22.63l58.35 58.34zm96.01-11.3l11.31 11.31c6.25 6.25 16.38 6.25 22.63 0l58.34-58.34c6.25-6.25 6.25-16.38 0-22.63l-58.34-58.34c-6.25-6.25-16.38-6.25-22.63 0l-11.31 11.31c-6.25 6.25-6.25 16.38 0 22.63L386.75 192l-35.71 35.72c-6.25 6.25-6.25 16.38 0 22.63zM624 416H381.54c-.74 19.81-14.71 32-32.74 32H288c-18.69 0-33.02-17.47-32.77-32H16c-8.8 0-16 7.2-16 16v16c0 35.2 28.8 64 64 64h512c35.2 0 64-28.8 64-64v-16c0-8.8-7.2-16-16-16zM576 48c0-26.4-21.6-48-48-48H112C85.6 0 64 21.6 64 48v336h512V48zm-64 272H128V64h384v256z"]},_l={prefix:"fas",iconName:"laptop-house",icon:[640,512,[],"e066","M272,288H208a16,16,0,0,1-16-16V208a16,16,0,0,1,16-16h64a16,16,0,0,1,16,16v37.12C299.11,232.24,315,224,332.8,224H469.74l6.65-7.53A16.51,16.51,0,0,0,480,207a16.31,16.31,0,0,0-4.75-10.61L416,144V48a16,16,0,0,0-16-16H368a16,16,0,0,0-16,16V87.3L263.5,8.92C258,4,247.45,0,240.05,0s-17.93,4-23.47,8.92L4.78,196.42A16.15,16.15,0,0,0,0,207a16.4,16.4,0,0,0,3.55,9.39L22.34,237.7A16.22,16.22,0,0,0,33,242.48,16.51,16.51,0,0,0,42.34,239L64,219.88V384a32,32,0,0,0,32,32H272ZM629.33,448H592V288c0-17.67-12.89-32-28.8-32H332.8c-15.91,0-28.8,14.33-28.8,32V448H266.67A10.67,10.67,0,0,0,256,458.67v10.66A42.82,42.82,0,0,0,298.6,512H597.4A42.82,42.82,0,0,0,640,469.33V458.67A10.67,10.67,0,0,0,629.33,448ZM544,448H352V304H544Z"]},Fl={prefix:"fas",iconName:"laptop-medical",icon:[640,512,[],"f812","M232 224h56v56a8 8 0 0 0 8 8h48a8 8 0 0 0 8-8v-56h56a8 8 0 0 0 8-8v-48a8 8 0 0 0-8-8h-56v-56a8 8 0 0 0-8-8h-48a8 8 0 0 0-8 8v56h-56a8 8 0 0 0-8 8v48a8 8 0 0 0 8 8zM576 48a48.14 48.14 0 0 0-48-48H112a48.14 48.14 0 0 0-48 48v336h512zm-64 272H128V64h384zm112 96H381.54c-.74 19.81-14.71 32-32.74 32H288c-18.69 0-33-17.47-32.77-32H16a16 16 0 0 0-16 16v16a64.19 64.19 0 0 0 64 64h512a64.19 64.19 0 0 0 64-64v-16a16 16 0 0 0-16-16z"]},Gl={prefix:"fas",iconName:"laugh",icon:[496,512,[],"f599","M248 8C111 8 0 119 0 256s111 248 248 248 248-111 248-248S385 8 248 8zm80 152c17.7 0 32 14.3 32 32s-14.3 32-32 32-32-14.3-32-32 14.3-32 32-32zm-160 0c17.7 0 32 14.3 32 32s-14.3 32-32 32-32-14.3-32-32 14.3-32 32-32zm88 272h-16c-73.4 0-134-55-142.9-126-1.2-9.5 6.3-18 15.9-18h270c9.6 0 17.1 8.4 15.9 18-8.9 71-69.5 126-142.9 126z"]},Vl={prefix:"fas",iconName:"laugh-beam",icon:[496,512,[],"f59a","M248 8C111 8 0 119 0 256s111 248 248 248 248-111 248-248S385 8 248 8zm24 199.4c3.3-42.1 32.2-71.4 56-71.4s52.7 29.3 56 71.4c.7 8.6-10.8 11.9-14.9 4.5l-9.5-17c-7.7-13.7-19.2-21.6-31.5-21.6s-23.8 7.9-31.5 21.6l-9.5 17c-4.2 7.4-15.8 4.1-15.1-4.5zm-160 0c3.3-42.1 32.2-71.4 56-71.4s52.7 29.3 56 71.4c.7 8.6-10.8 11.9-14.9 4.5l-9.5-17c-7.7-13.7-19.2-21.6-31.5-21.6s-23.8 7.9-31.5 21.6l-9.5 17c-4.3 7.4-15.8 4-15.1-4.5zM398.9 306C390 377 329.4 432 256 432h-16c-73.4 0-134-55-142.9-126-1.2-9.5 6.3-18 15.9-18h270c9.6 0 17.1 8.4 15.9 18z"]},Bl={prefix:"fas",iconName:"laugh-squint",icon:[496,512,[],"f59b","M248 8C111 8 0 119 0 256s111 248 248 248 248-111 248-248S385 8 248 8zm33.8 161.7l80-48c11.6-6.9 24 7.7 15.4 18L343.6 180l33.6 40.3c8.7 10.4-3.9 24.8-15.4 18l-80-48c-7.7-4.7-7.7-15.9 0-20.6zm-163-30c-8.6-10.3 3.8-24.9 15.4-18l80 48c7.8 4.7 7.8 15.9 0 20.6l-80 48c-11.5 6.8-24-7.6-15.4-18l33.6-40.3-33.6-40.3zM398.9 306C390 377 329.4 432 256 432h-16c-73.4 0-134-55-142.9-126-1.2-9.5 6.3-18 15.9-18h270c9.6 0 17.1 8.4 15.9 18z"]},Hl={prefix:"fas",iconName:"laugh-wink",icon:[496,512,[],"f59c","M248 8C111 8 0 119 0 256s111 248 248 248 248-111 248-248S385 8 248 8zm20.1 198.1c4-25.2 34.2-42.1 59.9-42.1s55.9 16.9 59.9 42.1c1.7 11.1-11.4 18.3-19.8 10.8l-9.5-8.5c-14.8-13.2-46.2-13.2-61 0L288 217c-8.4 7.4-21.6.3-19.9-10.9zM168 160c17.7 0 32 14.3 32 32s-14.3 32-32 32-32-14.3-32-32 14.3-32 32-32zm230.9 146C390 377 329.4 432 256 432h-16c-73.4 0-134-55-142.9-126-1.2-9.5 6.3-18 15.9-18h270c9.6 0 17.1 8.4 15.9 18z"]},zl={prefix:"fas",iconName:"layer-group",icon:[512,512,[],"f5fd","M12.41 148.02l232.94 105.67c6.8 3.09 14.49 3.09 21.29 0l232.94-105.67c16.55-7.51 16.55-32.52 0-40.03L266.65 2.31a25.607 25.607 0 0 0-21.29 0L12.41 107.98c-16.55 7.51-16.55 32.53 0 40.04zm487.18 88.28l-58.09-26.33-161.64 73.27c-7.56 3.43-15.59 5.17-23.86 5.17s-16.29-1.74-23.86-5.17L70.51 209.97l-58.1 26.33c-16.55 7.5-16.55 32.5 0 40l232.94 105.59c6.8 3.08 14.49 3.08 21.29 0L499.59 276.3c16.55-7.5 16.55-32.5 0-40zm0 127.8l-57.87-26.23-161.86 73.37c-7.56 3.43-15.59 5.17-23.86 5.17s-16.29-1.74-23.86-5.17L70.29 337.87 12.41 364.1c-16.55 7.5-16.55 32.5 0 40l232.94 105.59c6.8 3.08 14.49 3.08 21.29 0L499.59 404.1c16.55-7.5 16.55-32.5 0-40z"]},Ul={prefix:"fas",iconName:"leaf",icon:[576,512,[],"f06c","M546.2 9.7c-5.6-12.5-21.6-13-28.3-1.2C486.9 62.4 431.4 96 368 96h-80C182 96 96 182 96 288c0 7 .8 13.7 1.5 20.5C161.3 262.8 253.4 224 384 224c8.8 0 16 7.2 16 16s-7.2 16-16 16C132.6 256 26 410.1 2.4 468c-6.6 16.3 1.2 34.9 17.5 41.6 16.4 6.8 35-1.1 41.8-17.3 1.5-3.6 20.9-47.9 71.9-90.6 32.4 43.9 94 85.8 174.9 77.2C465.5 467.5 576 326.7 576 154.3c0-50.2-10.8-102.2-29.8-144.6z"]},Wl={prefix:"fas",iconName:"lemon",icon:[512,512,[],"f094","M489.038 22.963C465.944-.13 434.648-5.93 413.947 6.129c-58.906 34.312-181.25-53.077-321.073 86.746S40.441 355.041 6.129 413.945c-12.059 20.702-6.26 51.999 16.833 75.093 23.095 23.095 54.392 28.891 75.095 16.832 58.901-34.31 181.246 53.079 321.068-86.743S471.56 156.96 505.871 98.056c12.059-20.702 6.261-51.999-16.833-75.093zM243.881 95.522c-58.189 14.547-133.808 90.155-148.358 148.358-1.817 7.27-8.342 12.124-15.511 12.124-1.284 0-2.59-.156-3.893-.481-8.572-2.144-13.784-10.83-11.642-19.403C81.901 166.427 166.316 81.93 236.119 64.478c8.575-2.143 17.261 3.069 19.403 11.642s-3.069 17.259-11.641 19.402z"]},jl={prefix:"fas",iconName:"less-than",icon:[384,512,[],"f536","M365.46 357.74L147.04 255.89l218.47-101.88c16.02-7.47 22.95-26.51 15.48-42.53l-13.52-29C360 66.46 340.96 59.53 324.94 67L18.48 209.91a32.014 32.014 0 0 0-18.48 29v34.24c0 12.44 7.21 23.75 18.48 29l306.31 142.83c16.06 7.49 35.15.54 42.64-15.52l13.56-29.08c7.49-16.06.54-35.15-15.53-42.64z"]},Kl={prefix:"fas",iconName:"less-than-equal",icon:[448,512,[],"f537","M54.98 214.2l301.41 119.87c18.39 6.03 38.71-2.54 45.38-19.15l12.09-30.08c6.68-16.61-2.82-34.97-21.21-41l-175.44-68.05 175.56-68.09c18.29-6 27.74-24.27 21.1-40.79l-12.03-29.92c-6.64-16.53-26.86-25.06-45.15-19.06L54.98 137.89C41.21 142.41 32 154.5 32 168.07v15.96c0 13.56 9.21 25.65 22.98 30.17zM424 400H24c-13.25 0-24 10.74-24 24v48c0 13.25 10.75 24 24 24h400c13.25 0 24-10.75 24-24v-48c0-13.26-10.75-24-24-24z"]},$l={prefix:"fas",iconName:"level-down-alt",icon:[320,512,[],"f3be","M313.553 392.331L209.587 504.334c-9.485 10.214-25.676 10.229-35.174 0L70.438 392.331C56.232 377.031 67.062 352 88.025 352H152V80H68.024a11.996 11.996 0 0 1-8.485-3.515l-56-56C-4.021 12.926 1.333 0 12.024 0H208c13.255 0 24 10.745 24 24v328h63.966c20.878 0 31.851 24.969 17.587 40.331z"]},Yl={prefix:"fas",iconName:"level-up-alt",icon:[320,512,[],"f3bf","M313.553 119.669L209.587 7.666c-9.485-10.214-25.676-10.229-35.174 0L70.438 119.669C56.232 134.969 67.062 160 88.025 160H152v272H68.024a11.996 11.996 0 0 0-8.485 3.515l-56 56C-4.021 499.074 1.333 512 12.024 512H208c13.255 0 24-10.745 24-24V160h63.966c20.878 0 31.851-24.969 17.587-40.331z"]},ql={prefix:"fas",iconName:"life-ring",icon:[512,512,[],"f1cd","M256 8C119.033 8 8 119.033 8 256s111.033 248 248 248 248-111.033 248-248S392.967 8 256 8zm173.696 119.559l-63.399 63.399c-10.987-18.559-26.67-34.252-45.255-45.255l63.399-63.399a218.396 218.396 0 0 1 45.255 45.255zM256 352c-53.019 0-96-42.981-96-96s42.981-96 96-96 96 42.981 96 96-42.981 96-96 96zM127.559 82.304l63.399 63.399c-18.559 10.987-34.252 26.67-45.255 45.255l-63.399-63.399a218.372 218.372 0 0 1 45.255-45.255zM82.304 384.441l63.399-63.399c10.987 18.559 26.67 34.252 45.255 45.255l-63.399 63.399a218.396 218.396 0 0 1-45.255-45.255zm302.137 45.255l-63.399-63.399c18.559-10.987 34.252-26.67 45.255-45.255l63.399 63.399a218.403 218.403 0 0 1-45.255 45.255z"]},Xl={prefix:"fas",iconName:"lightbulb",icon:[352,512,[],"f0eb","M96.06 454.35c.01 6.29 1.87 12.45 5.36 17.69l17.09 25.69a31.99 31.99 0 0 0 26.64 14.28h61.71a31.99 31.99 0 0 0 26.64-14.28l17.09-25.69a31.989 31.989 0 0 0 5.36-17.69l.04-38.35H96.01l.05 38.35zM0 176c0 44.37 16.45 84.85 43.56 115.78 16.52 18.85 42.36 58.23 52.21 91.45.04.26.07.52.11.78h160.24c.04-.26.07-.51.11-.78 9.85-33.22 35.69-72.6 52.21-91.45C335.55 260.85 352 220.37 352 176 352 78.61 272.91-.3 175.45 0 73.44.31 0 82.97 0 176zm176-80c-44.11 0-80 35.89-80 80 0 8.84-7.16 16-16 16s-16-7.16-16-16c0-61.76 50.24-112 112-112 8.84 0 16 7.16 16 16s-7.16 16-16 16z"]},Zl={prefix:"fas",iconName:"link",icon:[512,512,[],"f0c1","M326.612 185.391c59.747 59.809 58.927 155.698.36 214.59-.11.12-.24.25-.36.37l-67.2 67.2c-59.27 59.27-155.699 59.262-214.96 0-59.27-59.26-59.27-155.7 0-214.96l37.106-37.106c9.84-9.84 26.786-3.3 27.294 10.606.648 17.722 3.826 35.527 9.69 52.721 1.986 5.822.567 12.262-3.783 16.612l-13.087 13.087c-28.026 28.026-28.905 73.66-1.155 101.96 28.024 28.579 74.086 28.749 102.325.51l67.2-67.19c28.191-28.191 28.073-73.757 0-101.83-3.701-3.694-7.429-6.564-10.341-8.569a16.037 16.037 0 0 1-6.947-12.606c-.396-10.567 3.348-21.456 11.698-29.806l21.054-21.055c5.521-5.521 14.182-6.199 20.584-1.731a152.482 152.482 0 0 1 20.522 17.197zM467.547 44.449c-59.261-59.262-155.69-59.27-214.96 0l-67.2 67.2c-.12.12-.25.25-.36.37-58.566 58.892-59.387 154.781.36 214.59a152.454 152.454 0 0 0 20.521 17.196c6.402 4.468 15.064 3.789 20.584-1.731l21.054-21.055c8.35-8.35 12.094-19.239 11.698-29.806a16.037 16.037 0 0 0-6.947-12.606c-2.912-2.005-6.64-4.875-10.341-8.569-28.073-28.073-28.191-73.639 0-101.83l67.2-67.19c28.239-28.239 74.3-28.069 102.325.51 27.75 28.3 26.872 73.934-1.155 101.96l-13.087 13.087c-4.35 4.35-5.769 10.79-3.783 16.612 5.864 17.194 9.042 34.999 9.69 52.721.509 13.906 17.454 20.446 27.294 10.606l37.106-37.106c59.271-59.259 59.271-155.699.001-214.959z"]},Ql={prefix:"fas",iconName:"lira-sign",icon:[384,512,[],"f195","M371.994 256h-48.019C317.64 256 312 260.912 312 267.246 312 368 230.179 416 144 416V256.781l134.603-29.912A12 12 0 0 0 288 215.155v-40.976c0-7.677-7.109-13.38-14.603-11.714L144 191.219V160.78l134.603-29.912A12 12 0 0 0 288 119.154V78.179c0-7.677-7.109-13.38-14.603-11.714L144 95.219V44c0-6.627-5.373-12-12-12H76c-6.627 0-12 5.373-12 12v68.997L9.397 125.131A12 12 0 0 0 0 136.845v40.976c0 7.677 7.109 13.38 14.603 11.714L64 178.558v30.439L9.397 221.131A12 12 0 0 0 0 232.845v40.976c0 7.677 7.109 13.38 14.603 11.714L64 274.558V468c0 6.627 5.373 12 12 12h79.583c134.091 0 223.255-77.834 228.408-211.592.261-6.782-5.211-12.408-11.997-12.408z"]},Jl={prefix:"fas",iconName:"list",icon:[512,512,[],"f03a","M80 368H16a16 16 0 0 0-16 16v64a16 16 0 0 0 16 16h64a16 16 0 0 0 16-16v-64a16 16 0 0 0-16-16zm0-320H16A16 16 0 0 0 0 64v64a16 16 0 0 0 16 16h64a16 16 0 0 0 16-16V64a16 16 0 0 0-16-16zm0 160H16a16 16 0 0 0-16 16v64a16 16 0 0 0 16 16h64a16 16 0 0 0 16-16v-64a16 16 0 0 0-16-16zm416 176H176a16 16 0 0 0-16 16v32a16 16 0 0 0 16 16h320a16 16 0 0 0 16-16v-32a16 16 0 0 0-16-16zm0-320H176a16 16 0 0 0-16 16v32a16 16 0 0 0 16 16h320a16 16 0 0 0 16-16V80a16 16 0 0 0-16-16zm0 160H176a16 16 0 0 0-16 16v32a16 16 0 0 0 16 16h320a16 16 0 0 0 16-16v-32a16 16 0 0 0-16-16z"]},ec={prefix:"fas",iconName:"list-alt",icon:[512,512,[],"f022","M464 480H48c-26.51 0-48-21.49-48-48V80c0-26.51 21.49-48 48-48h416c26.51 0 48 21.49 48 48v352c0 26.51-21.49 48-48 48zM128 120c-22.091 0-40 17.909-40 40s17.909 40 40 40 40-17.909 40-40-17.909-40-40-40zm0 96c-22.091 0-40 17.909-40 40s17.909 40 40 40 40-17.909 40-40-17.909-40-40-40zm0 96c-22.091 0-40 17.909-40 40s17.909 40 40 40 40-17.909 40-40-17.909-40-40-40zm288-136v-32c0-6.627-5.373-12-12-12H204c-6.627 0-12 5.373-12 12v32c0 6.627 5.373 12 12 12h200c6.627 0 12-5.373 12-12zm0 96v-32c0-6.627-5.373-12-12-12H204c-6.627 0-12 5.373-12 12v32c0 6.627 5.373 12 12 12h200c6.627 0 12-5.373 12-12zm0 96v-32c0-6.627-5.373-12-12-12H204c-6.627 0-12 5.373-12 12v32c0 6.627 5.373 12 12 12h200c6.627 0 12-5.373 12-12z"]},tc={prefix:"fas",iconName:"list-ol",icon:[512,512,[],"f0cb","M61.77 401l17.5-20.15a19.92 19.92 0 0 0 5.07-14.19v-3.31C84.34 356 80.5 352 73 352H16a8 8 0 0 0-8 8v16a8 8 0 0 0 8 8h22.83a157.41 157.41 0 0 0-11 12.31l-5.61 7c-4 5.07-5.25 10.13-2.8 14.88l1.05 1.93c3 5.76 6.29 7.88 12.25 7.88h4.73c10.33 0 15.94 2.44 15.94 9.09 0 4.72-4.2 8.22-14.36 8.22a41.54 41.54 0 0 1-15.47-3.12c-6.49-3.88-11.74-3.5-15.6 3.12l-5.59 9.31c-3.72 6.13-3.19 11.72 2.63 15.94 7.71 4.69 20.38 9.44 37 9.44 34.16 0 48.5-22.75 48.5-44.12-.03-14.38-9.12-29.76-28.73-34.88zM496 224H176a16 16 0 0 0-16 16v32a16 16 0 0 0 16 16h320a16 16 0 0 0 16-16v-32a16 16 0 0 0-16-16zm0-160H176a16 16 0 0 0-16 16v32a16 16 0 0 0 16 16h320a16 16 0 0 0 16-16V80a16 16 0 0 0-16-16zm0 320H176a16 16 0 0 0-16 16v32a16 16 0 0 0 16 16h320a16 16 0 0 0 16-16v-32a16 16 0 0 0-16-16zM16 160h64a8 8 0 0 0 8-8v-16a8 8 0 0 0-8-8H64V40a8 8 0 0 0-8-8H32a8 8 0 0 0-7.14 4.42l-8 16A8 8 0 0 0 24 64h8v64H16a8 8 0 0 0-8 8v16a8 8 0 0 0 8 8zm-3.91 160H80a8 8 0 0 0 8-8v-16a8 8 0 0 0-8-8H41.32c3.29-10.29 48.34-18.68 48.34-56.44 0-29.06-25-39.56-44.47-39.56-21.36 0-33.8 10-40.46 18.75-4.37 5.59-3 10.84 2.8 15.37l8.58 6.88c5.61 4.56 11 2.47 16.12-2.44a13.44 13.44 0 0 1 9.46-3.84c3.33 0 9.28 1.56 9.28 8.75C51 248.19 0 257.31 0 304.59v4C0 316 5.08 320 12.09 320z"]},ic={prefix:"fas",iconName:"list-ul",icon:[512,512,[],"f0ca","M48 48a48 48 0 1 0 48 48 48 48 0 0 0-48-48zm0 160a48 48 0 1 0 48 48 48 48 0 0 0-48-48zm0 160a48 48 0 1 0 48 48 48 48 0 0 0-48-48zm448 16H176a16 16 0 0 0-16 16v32a16 16 0 0 0 16 16h320a16 16 0 0 0 16-16v-32a16 16 0 0 0-16-16zm0-320H176a16 16 0 0 0-16 16v32a16 16 0 0 0 16 16h320a16 16 0 0 0 16-16V80a16 16 0 0 0-16-16zm0 160H176a16 16 0 0 0-16 16v32a16 16 0 0 0 16 16h320a16 16 0 0 0 16-16v-32a16 16 0 0 0-16-16z"]},nc={prefix:"fas",iconName:"location-arrow",icon:[512,512,[],"f124","M444.52 3.52L28.74 195.42c-47.97 22.39-31.98 92.75 19.19 92.75h175.91v175.91c0 51.17 70.36 67.17 92.75 19.19l191.9-415.78c15.99-38.39-25.59-79.97-63.97-63.97z"]},sc={prefix:"fas",iconName:"lock",icon:[448,512,[],"f023","M400 224h-24v-72C376 68.2 307.8 0 224 0S72 68.2 72 152v72H48c-26.5 0-48 21.5-48 48v192c0 26.5 21.5 48 48 48h352c26.5 0 48-21.5 48-48V272c0-26.5-21.5-48-48-48zm-104 0H152v-72c0-39.7 32.3-72 72-72s72 32.3 72 72v72z"]},rc={prefix:"fas",iconName:"lock-open",icon:[576,512,[],"f3c1","M423.5 0C339.5.3 272 69.5 272 153.5V224H48c-26.5 0-48 21.5-48 48v192c0 26.5 21.5 48 48 48h352c26.5 0 48-21.5 48-48V272c0-26.5-21.5-48-48-48h-48v-71.1c0-39.6 31.7-72.5 71.3-72.9 40-.4 72.7 32.1 72.7 72v80c0 13.3 10.7 24 24 24h32c13.3 0 24-10.7 24-24v-80C576 68 507.5-.3 423.5 0z"]},oc={prefix:"fas",iconName:"long-arrow-alt-down",icon:[256,512,[],"f309","M168 345.941V44c0-6.627-5.373-12-12-12h-56c-6.627 0-12 5.373-12 12v301.941H41.941c-21.382 0-32.09 25.851-16.971 40.971l86.059 86.059c9.373 9.373 24.569 9.373 33.941 0l86.059-86.059c15.119-15.119 4.411-40.971-16.971-40.971H168z"]},ac={prefix:"fas",iconName:"long-arrow-alt-left",icon:[448,512,[],"f30a","M134.059 296H436c6.627 0 12-5.373 12-12v-56c0-6.627-5.373-12-12-12H134.059v-46.059c0-21.382-25.851-32.09-40.971-16.971L7.029 239.029c-9.373 9.373-9.373 24.569 0 33.941l86.059 86.059c15.119 15.119 40.971 4.411 40.971-16.971V296z"]},lc={prefix:"fas",iconName:"long-arrow-alt-right",icon:[448,512,[],"f30b","M313.941 216H12c-6.627 0-12 5.373-12 12v56c0 6.627 5.373 12 12 12h301.941v46.059c0 21.382 25.851 32.09 40.971 16.971l86.059-86.059c9.373-9.373 9.373-24.569 0-33.941l-86.059-86.059c-15.119-15.119-40.971-4.411-40.971 16.971V216z"]},cc={prefix:"fas",iconName:"long-arrow-alt-up",icon:[256,512,[],"f30c","M88 166.059V468c0 6.627 5.373 12 12 12h56c6.627 0 12-5.373 12-12V166.059h46.059c21.382 0 32.09-25.851 16.971-40.971l-86.059-86.059c-9.373-9.373-24.569-9.373-33.941 0l-86.059 86.059c-15.119 15.119-4.411 40.971 16.971 40.971H88z"]},hc={prefix:"fas",iconName:"low-vision",icon:[576,512,[],"f2a8","M569.344 231.631C512.96 135.949 407.81 72 288 72c-28.468 0-56.102 3.619-82.451 10.409L152.778 10.24c-7.601-10.858-22.564-13.5-33.423-5.9l-13.114 9.178c-10.86 7.601-13.502 22.566-5.9 33.426l43.131 58.395C89.449 131.73 40.228 174.683 6.682 231.581c-.01.017-.023.033-.034.05-8.765 14.875-8.964 33.528 0 48.739 38.5 65.332 99.742 115.862 172.859 141.349L55.316 244.302A272.194 272.194 0 0 1 83.61 208.39l119.4 170.58h.01l40.63 58.04a330.055 330.055 0 0 0 78.94 1.17l-189.98-271.4a277.628 277.628 0 0 1 38.777-21.563l251.836 356.544c7.601 10.858 22.564 13.499 33.423 5.9l13.114-9.178c10.86-7.601 13.502-22.567 5.9-33.426l-43.12-58.377-.007-.009c57.161-27.978 104.835-72.04 136.81-126.301a47.938 47.938 0 0 0 .001-48.739zM390.026 345.94l-19.066-27.23c24.682-32.567 27.711-76.353 8.8-111.68v.03c0 23.65-19.17 42.82-42.82 42.82-23.828 0-42.82-19.349-42.82-42.82 0-23.65 19.17-42.82 42.82-42.82h.03c-24.75-13.249-53.522-15.643-79.51-7.68l-19.068-27.237C253.758 123.306 270.488 120 288 120c75.162 0 136 60.826 136 136 0 34.504-12.833 65.975-33.974 89.94z"]},dc={prefix:"fas",iconName:"luggage-cart",icon:[640,512,[],"f59d","M224 320h32V96h-32c-17.67 0-32 14.33-32 32v160c0 17.67 14.33 32 32 32zm352-32V128c0-17.67-14.33-32-32-32h-32v224h32c17.67 0 32-14.33 32-32zm48 96H128V16c0-8.84-7.16-16-16-16H16C7.16 0 0 7.16 0 16v32c0 8.84 7.16 16 16 16h48v368c0 8.84 7.16 16 16 16h82.94c-1.79 5.03-2.94 10.36-2.94 16 0 26.51 21.49 48 48 48s48-21.49 48-48c0-5.64-1.15-10.97-2.94-16h197.88c-1.79 5.03-2.94 10.36-2.94 16 0 26.51 21.49 48 48 48s48-21.49 48-48c0-5.64-1.15-10.97-2.94-16H624c8.84 0 16-7.16 16-16v-32c0-8.84-7.16-16-16-16zM480 96V48c0-26.51-21.49-48-48-48h-96c-26.51 0-48 21.49-48 48v272h192V96zm-48 0h-96V48h96v48z"]},uc={prefix:"fas",iconName:"lungs",icon:[640,512,[],"f604","M636.11 390.15C614.44 308.85 580.07 231 534.1 159.13 511.98 124.56 498.03 96 454.05 96 415.36 96 384 125.42 384 161.71v60.11l-32.88-21.92a15.996 15.996 0 0 1-7.12-13.31V16c0-8.84-7.16-16-16-16h-16c-8.84 0-16 7.16-16 16v170.59c0 5.35-2.67 10.34-7.12 13.31L256 221.82v-60.11C256 125.42 224.64 96 185.95 96c-43.98 0-57.93 28.56-80.05 63.13C59.93 231 25.56 308.85 3.89 390.15 1.3 399.84 0 409.79 0 419.78c0 61.23 62.48 105.44 125.24 88.62l59.5-15.95c42.18-11.3 71.26-47.47 71.26-88.62v-87.49l-85.84 57.23a7.992 7.992 0 0 1-11.09-2.22l-8.88-13.31a7.992 7.992 0 0 1 2.22-11.09L320 235.23l167.59 111.72a7.994 7.994 0 0 1 2.22 11.09l-8.88 13.31a7.994 7.994 0 0 1-11.09 2.22L384 316.34v87.49c0 41.15 29.08 77.31 71.26 88.62l59.5 15.95C577.52 525.22 640 481.01 640 419.78c0-9.99-1.3-19.94-3.89-29.63z"]},pc={prefix:"fas",iconName:"lungs-virus",icon:[640,512,[],"e067","M344,150.68V16A16,16,0,0,0,328,0H312a16,16,0,0,0-16,16V150.68a46.45,46.45,0,0,1,48,0ZM195.54,444.46a48.06,48.06,0,0,1,0-67.88l8.58-8.58H192a48,48,0,0,1,0-96h12.12l-8.58-8.57a48,48,0,0,1,60.46-74V161.75C256,125.38,224.62,96,186,96c-44,0-58,28.5-80.12,63.13a819.52,819.52,0,0,0-102,231A113.16,113.16,0,0,0,0,419.75C0,481,62.5,525.26,125.25,508.38l59.5-15.87a98.51,98.51,0,0,0,52.5-34.75,46.49,46.49,0,0,1-41.71-13.3Zm226.29-22.63a16,16,0,0,0,0-22.62l-8.58-8.58C393.09,370.47,407.37,336,435.88,336H448a16,16,0,0,0,0-32H435.88c-28.51,0-42.79-34.47-22.63-54.62l8.58-8.58a16,16,0,0,0-22.63-22.63l-8.57,8.58C370.47,246.91,336,232.63,336,204.12V192a16,16,0,0,0-32,0v12.12c0,28.51-34.47,42.79-54.63,22.63l-8.57-8.58a16,16,0,0,0-22.63,22.63l8.58,8.58c20.16,20.15,5.88,54.62-22.63,54.62H192a16,16,0,0,0,0,32h12.12c28.51,0,42.79,34.47,22.63,54.63l-8.58,8.58a16,16,0,1,0,22.63,22.62l8.57-8.57C269.53,393.1,304,407.38,304,435.88V448a16,16,0,0,0,32,0V435.88c0-28.5,34.47-42.78,54.63-22.62l8.57,8.57a16,16,0,0,0,22.63,0ZM288,304a16,16,0,1,1,16-16A16,16,0,0,1,288,304Zm64,64a16,16,0,1,1,16-16A16,16,0,0,1,352,368Zm284.12,22.13a819.52,819.52,0,0,0-102-231C512,124.5,498,96,454,96c-38.62,0-70,29.38-70,65.75v27.72a48,48,0,0,1,60.46,74L435.88,272H448a48,48,0,0,1,0,96H435.88l8.58,8.58a47.7,47.7,0,0,1-41.71,81.18,98.51,98.51,0,0,0,52.5,34.75l59.5,15.87C577.5,525.26,640,481,640,419.75A113.16,113.16,0,0,0,636.12,390.13Z"]},gc={prefix:"fas",iconName:"magic",icon:[512,512,[],"f0d0","M224 96l16-32 32-16-32-16-16-32-16 32-32 16 32 16 16 32zM80 160l26.66-53.33L160 80l-53.34-26.67L80 0 53.34 53.33 0 80l53.34 26.67L80 160zm352 128l-26.66 53.33L352 368l53.34 26.67L432 448l26.66-53.33L512 368l-53.34-26.67L432 288zm70.62-193.77L417.77 9.38C411.53 3.12 403.34 0 395.15 0c-8.19 0-16.38 3.12-22.63 9.38L9.38 372.52c-12.5 12.5-12.5 32.76 0 45.25l84.85 84.85c6.25 6.25 14.44 9.37 22.62 9.37 8.19 0 16.38-3.12 22.63-9.37l363.14-363.15c12.5-12.48 12.5-32.75 0-45.24zM359.45 203.46l-50.91-50.91 86.6-86.6 50.91 50.91-86.6 86.6z"]},fc={prefix:"fas",iconName:"magnet",icon:[512,512,[],"f076","M164.07 148.1H12a12 12 0 0 1-12-12v-80a36 36 0 0 1 36-36h104a36 36 0 0 1 36 36v80a11.89 11.89 0 0 1-11.93 12zm347.93-12V56a36 36 0 0 0-36-36H372a36 36 0 0 0-36 36v80a12 12 0 0 0 12 12h152a11.89 11.89 0 0 0 12-11.9zm-164 44a12 12 0 0 0-12 12v52c0 128.1-160 127.9-160 0v-52a12 12 0 0 0-12-12H12.1a12 12 0 0 0-12 12.1c.1 21.4.6 40.3 0 53.3 0 150.6 136.17 246.6 256.75 246.6s255-96 255-246.7c-.6-12.8-.2-33 0-53.2a12 12 0 0 0-12-12.1z"]},mc={prefix:"fas",iconName:"mail-bulk",icon:[576,512,[],"f674","M160 448c-25.6 0-51.2-22.4-64-32-64-44.8-83.2-60.8-96-70.4V480c0 17.67 14.33 32 32 32h256c17.67 0 32-14.33 32-32V345.6c-12.8 9.6-32 25.6-96 70.4-12.8 9.6-38.4 32-64 32zm128-192H32c-17.67 0-32 14.33-32 32v16c25.6 19.2 22.4 19.2 115.2 86.4 9.6 6.4 28.8 25.6 44.8 25.6s35.2-19.2 44.8-22.4c92.8-67.2 89.6-67.2 115.2-86.4V288c0-17.67-14.33-32-32-32zm256-96H224c-17.67 0-32 14.33-32 32v32h96c33.21 0 60.59 25.42 63.71 57.82l.29-.22V416h192c17.67 0 32-14.33 32-32V192c0-17.67-14.33-32-32-32zm-32 128h-64v-64h64v64zm-352-96c0-35.29 28.71-64 64-64h224V32c0-17.67-14.33-32-32-32H96C78.33 0 64 14.33 64 32v192h96v-32z"]},vc={prefix:"fas",iconName:"male",icon:[192,512,[],"f183","M96 0c35.346 0 64 28.654 64 64s-28.654 64-64 64-64-28.654-64-64S60.654 0 96 0m48 144h-11.36c-22.711 10.443-49.59 10.894-73.28 0H48c-26.51 0-48 21.49-48 48v136c0 13.255 10.745 24 24 24h16v136c0 13.255 10.745 24 24 24h64c13.255 0 24-10.745 24-24V352h16c13.255 0 24-10.745 24-24V192c0-26.51-21.49-48-48-48z"]},yc={prefix:"fas",iconName:"map",icon:[576,512,[],"f279","M0 117.66v346.32c0 11.32 11.43 19.06 21.94 14.86L160 416V32L20.12 87.95A32.006 32.006 0 0 0 0 117.66zM192 416l192 64V96L192 32v384zM554.06 33.16L416 96v384l139.88-55.95A31.996 31.996 0 0 0 576 394.34V48.02c0-11.32-11.43-19.06-21.94-14.86z"]},Cc={prefix:"fas",iconName:"map-marked",icon:[576,512,[],"f59f","M288 0c-69.59 0-126 56.41-126 126 0 56.26 82.35 158.8 113.9 196.02 6.39 7.54 17.82 7.54 24.2 0C331.65 284.8 414 182.26 414 126 414 56.41 357.59 0 288 0zM20.12 215.95A32.006 32.006 0 0 0 0 245.66v250.32c0 11.32 11.43 19.06 21.94 14.86L160 448V214.92c-8.84-15.98-16.07-31.54-21.25-46.42L20.12 215.95zM288 359.67c-14.07 0-27.38-6.18-36.51-16.96-19.66-23.2-40.57-49.62-59.49-76.72v182l192 64V266c-18.92 27.09-39.82 53.52-59.49 76.72-9.13 10.77-22.44 16.95-36.51 16.95zm266.06-198.51L416 224v288l139.88-55.95A31.996 31.996 0 0 0 576 426.34V176.02c0-11.32-11.43-19.06-21.94-14.86z"]},bc={prefix:"fas",iconName:"map-marked-alt",icon:[576,512,[],"f5a0","M288 0c-69.59 0-126 56.41-126 126 0 56.26 82.35 158.8 113.9 196.02 6.39 7.54 17.82 7.54 24.2 0C331.65 284.8 414 182.26 414 126 414 56.41 357.59 0 288 0zm0 168c-23.2 0-42-18.8-42-42s18.8-42 42-42 42 18.8 42 42-18.8 42-42 42zM20.12 215.95A32.006 32.006 0 0 0 0 245.66v250.32c0 11.32 11.43 19.06 21.94 14.86L160 448V214.92c-8.84-15.98-16.07-31.54-21.25-46.42L20.12 215.95zM288 359.67c-14.07 0-27.38-6.18-36.51-16.96-19.66-23.2-40.57-49.62-59.49-76.72v182l192 64V266c-18.92 27.09-39.82 53.52-59.49 76.72-9.13 10.77-22.44 16.95-36.51 16.95zm266.06-198.51L416 224v288l139.88-55.95A31.996 31.996 0 0 0 576 426.34V176.02c0-11.32-11.43-19.06-21.94-14.86z"]},Sc={prefix:"fas",iconName:"map-marker",icon:[384,512,[],"f041","M172.268 501.67C26.97 291.031 0 269.413 0 192 0 85.961 85.961 0 192 0s192 85.961 192 192c0 77.413-26.97 99.031-172.268 309.67-9.535 13.774-29.93 13.773-39.464 0z"]},wc={prefix:"fas",iconName:"map-marker-alt",icon:[384,512,[],"f3c5","M172.268 501.67C26.97 291.031 0 269.413 0 192 0 85.961 85.961 0 192 0s192 85.961 192 192c0 77.413-26.97 99.031-172.268 309.67-9.535 13.774-29.93 13.773-39.464 0zM192 272c44.183 0 80-35.817 80-80s-35.817-80-80-80-80 35.817-80 80 35.817 80 80 80z"]},xc={prefix:"fas",iconName:"map-pin",icon:[288,512,[],"f276","M112 316.94v156.69l22.02 33.02c4.75 7.12 15.22 7.12 19.97 0L176 473.63V316.94c-10.39 1.92-21.06 3.06-32 3.06s-21.61-1.14-32-3.06zM144 0C64.47 0 0 64.47 0 144s64.47 144 144 144 144-64.47 144-144S223.53 0 144 0zm0 76c-37.5 0-68 30.5-68 68 0 6.62-5.38 12-12 12s-12-5.38-12-12c0-50.73 41.28-92 92-92 6.62 0 12 5.38 12 12s-5.38 12-12 12z"]},Ec={prefix:"fas",iconName:"map-signs",icon:[512,512,[],"f277","M507.31 84.69L464 41.37c-6-6-14.14-9.37-22.63-9.37H288V16c0-8.84-7.16-16-16-16h-32c-8.84 0-16 7.16-16 16v16H56c-13.25 0-24 10.75-24 24v80c0 13.25 10.75 24 24 24h385.37c8.49 0 16.62-3.37 22.63-9.37l43.31-43.31c6.25-6.26 6.25-16.38 0-22.63zM224 496c0 8.84 7.16 16 16 16h32c8.84 0 16-7.16 16-16V384h-64v112zm232-272H288v-32h-64v32H70.63c-8.49 0-16.62 3.37-22.63 9.37L4.69 276.69c-6.25 6.25-6.25 16.38 0 22.63L48 342.63c6 6 14.14 9.37 22.63 9.37H456c13.25 0 24-10.75 24-24v-80c0-13.25-10.75-24-24-24z"]},Mc={prefix:"fas",iconName:"marker",icon:[512,512,[],"f5a1","M93.95 290.03A327.038 327.038 0 0 0 .17 485.11l-.03.23c-1.7 15.28 11.21 28.2 26.49 26.51a327.02 327.02 0 0 0 195.34-93.8l75.4-75.4-128.02-128.02-75.4 75.4zM485.49 26.51c-35.35-35.35-92.67-35.35-128.02 0l-21.76 21.76-36.56-36.55c-15.62-15.62-40.95-15.62-56.56 0L138.47 115.84c-6.25 6.25-6.25 16.38 0 22.63l22.62 22.62c6.25 6.25 16.38 6.25 22.63 0l87.15-87.15 19.59 19.59L191.98 192 320 320.02l165.49-165.49c35.35-35.35 35.35-92.66 0-128.02z"]},Ac={prefix:"fas",iconName:"mars",icon:[384,512,[],"f222","M372 64h-79c-10.7 0-16 12.9-8.5 20.5l16.9 16.9-80.7 80.7c-22.2-14-48.5-22.1-76.7-22.1C64.5 160 0 224.5 0 304s64.5 144 144 144 144-64.5 144-144c0-28.2-8.1-54.5-22.1-76.7l80.7-80.7 16.9 16.9c7.6 7.6 20.5 2.2 20.5-8.5V76c0-6.6-5.4-12-12-12zM144 384c-44.1 0-80-35.9-80-80s35.9-80 80-80 80 35.9 80 80-35.9 80-80 80z"]},Tc={prefix:"fas",iconName:"mars-double",icon:[512,512,[],"f227","M340 0h-79c-10.7 0-16 12.9-8.5 20.5l16.9 16.9-48.7 48.7C198.5 72.1 172.2 64 144 64 64.5 64 0 128.5 0 208s64.5 144 144 144 144-64.5 144-144c0-28.2-8.1-54.5-22.1-76.7l48.7-48.7 16.9 16.9c2.4 2.4 5.5 3.5 8.4 3.5 6.2 0 12.1-4.8 12.1-12V12c0-6.6-5.4-12-12-12zM144 288c-44.1 0-80-35.9-80-80s35.9-80 80-80 80 35.9 80 80-35.9 80-80 80zm356-128.1h-79c-10.7 0-16 12.9-8.5 20.5l16.9 16.9-48.7 48.7c-18.2-11.4-39-18.9-61.5-21.3-2.1 21.8-8.2 43.3-18.4 63.3 1.1 0 2.2-.1 3.2-.1 44.1 0 80 35.9 80 80s-35.9 80-80 80-80-35.9-80-80c0-1.1 0-2.2.1-3.2-20 10.2-41.5 16.4-63.3 18.4C168.4 455.6 229.6 512 304 512c79.5 0 144-64.5 144-144 0-28.2-8.1-54.5-22.1-76.7l48.7-48.7 16.9 16.9c2.4 2.4 5.4 3.5 8.4 3.5 6.2 0 12.1-4.8 12.1-12v-79c0-6.7-5.4-12.1-12-12.1z"]},Dc={prefix:"fas",iconName:"mars-stroke",icon:[384,512,[],"f229","M372 64h-79c-10.7 0-16 12.9-8.5 20.5l16.9 16.9-17.5 17.5-14.1-14.1c-4.7-4.7-12.3-4.7-17 0L224.5 133c-4.7 4.7-4.7 12.3 0 17l14.1 14.1-18 18c-22.2-14-48.5-22.1-76.7-22.1C64.5 160 0 224.5 0 304s64.5 144 144 144 144-64.5 144-144c0-28.2-8.1-54.5-22.1-76.7l18-18 14.1 14.1c4.7 4.7 12.3 4.7 17 0l28.3-28.3c4.7-4.7 4.7-12.3 0-17L329.2 164l17.5-17.5 16.9 16.9c7.6 7.6 20.5 2.2 20.5-8.5V76c-.1-6.6-5.5-12-12.1-12zM144 384c-44.1 0-80-35.9-80-80s35.9-80 80-80 80 35.9 80 80-35.9 80-80 80z"]},Ic={prefix:"fas",iconName:"mars-stroke-h",icon:[480,512,[],"f22b","M476.2 247.5l-55.9-55.9c-7.6-7.6-20.5-2.2-20.5 8.5V224H376v-20c0-6.6-5.4-12-12-12h-40c-6.6 0-12 5.4-12 12v20h-27.6c-5.8-25.6-18.7-49.9-38.6-69.8C189.6 98 98.4 98 42.2 154.2c-56.2 56.2-56.2 147.4 0 203.6 56.2 56.2 147.4 56.2 203.6 0 19.9-19.9 32.8-44.2 38.6-69.8H312v20c0 6.6 5.4 12 12 12h40c6.6 0 12-5.4 12-12v-20h23.9v23.9c0 10.7 12.9 16 20.5 8.5l55.9-55.9c4.6-4.7 4.6-12.3-.1-17zm-275.6 65.1c-31.2 31.2-81.9 31.2-113.1 0-31.2-31.2-31.2-81.9 0-113.1 31.2-31.2 81.9-31.2 113.1 0 31.2 31.1 31.2 81.9 0 113.1z"]},Rc={prefix:"fas",iconName:"mars-stroke-v",icon:[288,512,[],"f22a","M245.8 234.2c-19.9-19.9-44.2-32.8-69.8-38.6v-25.4h20c6.6 0 12-5.4 12-12v-40c0-6.6-5.4-12-12-12h-20V81.4h23.9c10.7 0 16-12.9 8.5-20.5L152.5 5.1c-4.7-4.7-12.3-4.7-17 0L79.6 61c-7.6 7.6-2.2 20.5 8.5 20.5H112v24.7H92c-6.6 0-12 5.4-12 12v40c0 6.6 5.4 12 12 12h20v25.4c-25.6 5.8-49.9 18.7-69.8 38.6-56.2 56.2-56.2 147.4 0 203.6 56.2 56.2 147.4 56.2 203.6 0 56.3-56.2 56.3-147.4 0-203.6zm-45.2 158.4c-31.2 31.2-81.9 31.2-113.1 0-31.2-31.2-31.2-81.9 0-113.1 31.2-31.2 81.9-31.2 113.1 0 31.2 31.1 31.2 81.9 0 113.1z"]},Lc={prefix:"fas",iconName:"mask",icon:[640,512,[],"f6fa","M320.67 64c-442.6 0-357.57 384-158.46 384 39.9 0 77.47-20.69 101.42-55.86l25.73-37.79c15.66-22.99 46.97-22.99 62.63 0l25.73 37.79C401.66 427.31 439.23 448 479.13 448c189.86 0 290.63-384-158.46-384zM184 308.36c-41.06 0-67.76-25.66-80.08-41.05-5.23-6.53-5.23-16.09 0-22.63 12.32-15.4 39.01-41.05 80.08-41.05s67.76 25.66 80.08 41.05c5.23 6.53 5.23 16.09 0 22.63-12.32 15.4-39.02 41.05-80.08 41.05zm272 0c-41.06 0-67.76-25.66-80.08-41.05-5.23-6.53-5.23-16.09 0-22.63 12.32-15.4 39.01-41.05 80.08-41.05s67.76 25.66 80.08 41.05c5.23 6.53 5.23 16.09 0 22.63-12.32 15.4-39.02 41.05-80.08 41.05z"]},kc={prefix:"fas",iconName:"medal",icon:[512,512,[],"f5a2","M223.75 130.75L154.62 15.54A31.997 31.997 0 0 0 127.18 0H16.03C3.08 0-4.5 14.57 2.92 25.18l111.27 158.96c29.72-27.77 67.52-46.83 109.56-53.39zM495.97 0H384.82c-11.24 0-21.66 5.9-27.44 15.54l-69.13 115.21c42.04 6.56 79.84 25.62 109.56 53.38L509.08 25.18C516.5 14.57 508.92 0 495.97 0zM256 160c-97.2 0-176 78.8-176 176s78.8 176 176 176 176-78.8 176-176-78.8-176-176-176zm92.52 157.26l-37.93 36.96 8.97 52.22c1.6 9.36-8.26 16.51-16.65 12.09L256 393.88l-46.9 24.65c-8.4 4.45-18.25-2.74-16.65-12.09l8.97-52.22-37.93-36.96c-6.82-6.64-3.05-18.23 6.35-19.59l52.43-7.64 23.43-47.52c2.11-4.28 6.19-6.39 10.28-6.39 4.11 0 8.22 2.14 10.33 6.39l23.43 47.52 52.43 7.64c9.4 1.36 13.17 12.95 6.35 19.59z"]},Pc={prefix:"fas",iconName:"medkit",icon:[512,512,[],"f0fa","M96 480h320V128h-32V80c0-26.51-21.49-48-48-48H176c-26.51 0-48 21.49-48 48v48H96v352zm96-384h128v32H192V96zm320 80v256c0 26.51-21.49 48-48 48h-16V128h16c26.51 0 48 21.49 48 48zM64 480H48c-26.51 0-48-21.49-48-48V176c0-26.51 21.49-48 48-48h16v352zm288-208v32c0 8.837-7.163 16-16 16h-48v48c0 8.837-7.163 16-16 16h-32c-8.837 0-16-7.163-16-16v-48h-48c-8.837 0-16-7.163-16-16v-32c0-8.837 7.163-16 16-16h48v-48c0-8.837 7.163-16 16-16h32c8.837 0 16 7.163 16 16v48h48c8.837 0 16 7.163 16 16z"]},Nc={prefix:"fas",iconName:"meh",icon:[496,512,[],"f11a","M248 8C111 8 0 119 0 256s111 248 248 248 248-111 248-248S385 8 248 8zm-80 168c17.7 0 32 14.3 32 32s-14.3 32-32 32-32-14.3-32-32 14.3-32 32-32zm176 192H152c-21.2 0-21.2-32 0-32h192c21.2 0 21.2 32 0 32zm-16-128c-17.7 0-32-14.3-32-32s14.3-32 32-32 32 14.3 32 32-14.3 32-32 32z"]},Oc={prefix:"fas",iconName:"meh-blank",icon:[496,512,[],"f5a4","M248 8C111 8 0 119 0 256s111 248 248 248 248-111 248-248S385 8 248 8zm-80 232c-17.7 0-32-14.3-32-32s14.3-32 32-32 32 14.3 32 32-14.3 32-32 32zm160 0c-17.7 0-32-14.3-32-32s14.3-32 32-32 32 14.3 32 32-14.3 32-32 32z"]},_c={prefix:"fas",iconName:"meh-rolling-eyes",icon:[496,512,[],"f5a5","M248 8C111 8 0 119 0 256s111 248 248 248 248-111 248-248S385 8 248 8zM88 224c0-24.3 13.7-45.2 33.6-56-.7 2.6-1.6 5.2-1.6 8 0 17.7 14.3 32 32 32s32-14.3 32-32c0-2.8-.9-5.4-1.6-8 19.9 10.8 33.6 31.7 33.6 56 0 35.3-28.7 64-64 64s-64-28.7-64-64zm224 176H184c-21.2 0-21.2-32 0-32h128c21.2 0 21.2 32 0 32zm32-112c-35.3 0-64-28.7-64-64 0-24.3 13.7-45.2 33.6-56-.7 2.6-1.6 5.2-1.6 8 0 17.7 14.3 32 32 32s32-14.3 32-32c0-2.8-.9-5.4-1.6-8 19.9 10.8 33.6 31.7 33.6 56 0 35.3-28.7 64-64 64z"]},Fc={prefix:"fas",iconName:"memory",icon:[640,512,[],"f538","M640 130.94V96c0-17.67-14.33-32-32-32H32C14.33 64 0 78.33 0 96v34.94c18.6 6.61 32 24.19 32 45.06s-13.4 38.45-32 45.06V320h640v-98.94c-18.6-6.61-32-24.19-32-45.06s13.4-38.45 32-45.06zM224 256h-64V128h64v128zm128 0h-64V128h64v128zm128 0h-64V128h64v128zM0 448h64v-26.67c0-8.84 7.16-16 16-16s16 7.16 16 16V448h128v-26.67c0-8.84 7.16-16 16-16s16 7.16 16 16V448h128v-26.67c0-8.84 7.16-16 16-16s16 7.16 16 16V448h128v-26.67c0-8.84 7.16-16 16-16s16 7.16 16 16V448h64v-96H0v96z"]},Gc={prefix:"fas",iconName:"menorah",icon:[640,512,[],"f676","M144 128h-32c-8.84 0-16 7.16-16 16v144h64V144c0-8.84-7.16-16-16-16zm96 0h-32c-8.84 0-16 7.16-16 16v144h64V144c0-8.84-7.16-16-16-16zm192 0h-32c-8.84 0-16 7.16-16 16v144h64V144c0-8.84-7.16-16-16-16zm96 0h-32c-8.84 0-16 7.16-16 16v144h64V144c0-8.84-7.16-16-16-16zm80-32c17.67 0 32-14.33 32-32S608 0 608 0s-32 46.33-32 64 14.33 32 32 32zm-96 0c17.67 0 32-14.33 32-32S512 0 512 0s-32 46.33-32 64 14.33 32 32 32zm-96 0c17.67 0 32-14.33 32-32S416 0 416 0s-32 46.33-32 64 14.33 32 32 32zm-96 0c17.67 0 32-14.33 32-32S320 0 320 0s-32 46.33-32 64 14.33 32 32 32zm-96 0c17.67 0 32-14.33 32-32S224 0 224 0s-32 46.33-32 64 14.33 32 32 32zm-96 0c17.67 0 32-14.33 32-32S128 0 128 0 96 46.33 96 64s14.33 32 32 32zm-96 0c17.67 0 32-14.33 32-32S32 0 32 0 0 46.33 0 64s14.33 32 32 32zm544 192c0 17.67-14.33 32-32 32H352V144c0-8.84-7.16-16-16-16h-32c-8.84 0-16 7.16-16 16v176H96c-17.67 0-32-14.33-32-32V144c0-8.84-7.16-16-16-16H16c-8.84 0-16 7.16-16 16v144c0 53.02 42.98 96 96 96h192v64H112c-8.84 0-16 7.16-16 16v32c0 8.84 7.16 16 16 16h416c8.84 0 16-7.16 16-16v-32c0-8.84-7.16-16-16-16H352v-64h192c53.02 0 96-42.98 96-96V144c0-8.84-7.16-16-16-16h-32c-8.84 0-16 7.16-16 16v144z"]},Vc={prefix:"fas",iconName:"mercury",icon:[288,512,[],"f223","M288 208c0-44.2-19.9-83.7-51.2-110.1 2.5-1.8 4.9-3.8 7.2-5.8 24.7-21.2 39.8-48.8 43.2-78.8.9-7.1-4.7-13.3-11.9-13.3h-40.5C229 0 224.1 4.1 223 9.8c-2.4 12.5-9.6 24.3-20.7 33.8C187 56.8 166.3 64 144 64s-43-7.2-58.4-20.4C74.5 34.1 67.4 22.3 64.9 9.8 63.8 4.1 58.9 0 53.2 0H12.7C5.5 0-.1 6.2.8 13.3 4.2 43.4 19.2 71 44 92.2c2.3 2 4.7 3.9 7.2 5.8C19.9 124.3 0 163.8 0 208c0 68.5 47.9 125.9 112 140.4V400H76c-6.6 0-12 5.4-12 12v40c0 6.6 5.4 12 12 12h36v36c0 6.6 5.4 12 12 12h40c6.6 0 12-5.4 12-12v-36h36c6.6 0 12-5.4 12-12v-40c0-6.6-5.4-12-12-12h-36v-51.6c64.1-14.5 112-71.9 112-140.4zm-224 0c0-44.1 35.9-80 80-80s80 35.9 80 80-35.9 80-80 80-80-35.9-80-80z"]},Bc={prefix:"fas",iconName:"meteor",icon:[512,512,[],"f753","M511.328,20.8027c-11.60759,38.70264-34.30724,111.70173-61.30311,187.70077,6.99893,2.09372,13.4042,4,18.60653,5.59368a16.06158,16.06158,0,0,1,9.49854,22.906c-22.106,42.29635-82.69047,152.795-142.47819,214.40356-.99984,1.09373-1.99969,2.5-2.99954,3.49995A194.83046,194.83046,0,1,1,57.085,179.41009c.99985-1,2.40588-2,3.49947-3,61.59994-59.90549,171.97367-120.40473,214.37343-142.4982a16.058,16.058,0,0,1,22.90274,9.49988c1.59351,5.09368,3.49947,11.5936,5.5929,18.59351C379.34818,35.00565,452.43074,12.30281,491.12794.70921A16.18325,16.18325,0,0,1,511.328,20.8027ZM319.951,320.00207A127.98041,127.98041,0,1,0,191.97061,448.00046,127.97573,127.97573,0,0,0,319.951,320.00207Zm-127.98041-31.9996a31.9951,31.9951,0,1,1-31.9951-31.9996A31.959,31.959,0,0,1,191.97061,288.00247Zm31.9951,79.999a15.99755,15.99755,0,1,1-15.99755-15.9998A16.04975,16.04975,0,0,1,223.96571,368.00147Z"]},Hc={prefix:"fas",iconName:"microchip",icon:[512,512,[],"f2db","M416 48v416c0 26.51-21.49 48-48 48H144c-26.51 0-48-21.49-48-48V48c0-26.51 21.49-48 48-48h224c26.51 0 48 21.49 48 48zm96 58v12a6 6 0 0 1-6 6h-18v6a6 6 0 0 1-6 6h-42V88h42a6 6 0 0 1 6 6v6h18a6 6 0 0 1 6 6zm0 96v12a6 6 0 0 1-6 6h-18v6a6 6 0 0 1-6 6h-42v-48h42a6 6 0 0 1 6 6v6h18a6 6 0 0 1 6 6zm0 96v12a6 6 0 0 1-6 6h-18v6a6 6 0 0 1-6 6h-42v-48h42a6 6 0 0 1 6 6v6h18a6 6 0 0 1 6 6zm0 96v12a6 6 0 0 1-6 6h-18v6a6 6 0 0 1-6 6h-42v-48h42a6 6 0 0 1 6 6v6h18a6 6 0 0 1 6 6zM30 376h42v48H30a6 6 0 0 1-6-6v-6H6a6 6 0 0 1-6-6v-12a6 6 0 0 1 6-6h18v-6a6 6 0 0 1 6-6zm0-96h42v48H30a6 6 0 0 1-6-6v-6H6a6 6 0 0 1-6-6v-12a6 6 0 0 1 6-6h18v-6a6 6 0 0 1 6-6zm0-96h42v48H30a6 6 0 0 1-6-6v-6H6a6 6 0 0 1-6-6v-12a6 6 0 0 1 6-6h18v-6a6 6 0 0 1 6-6zm0-96h42v48H30a6 6 0 0 1-6-6v-6H6a6 6 0 0 1-6-6v-12a6 6 0 0 1 6-6h18v-6a6 6 0 0 1 6-6z"]},zc={prefix:"fas",iconName:"microphone",icon:[352,512,[],"f130","M176 352c53.02 0 96-42.98 96-96V96c0-53.02-42.98-96-96-96S80 42.98 80 96v160c0 53.02 42.98 96 96 96zm160-160h-16c-8.84 0-16 7.16-16 16v48c0 74.8-64.49 134.82-140.79 127.38C96.71 376.89 48 317.11 48 250.3V208c0-8.84-7.16-16-16-16H16c-8.84 0-16 7.16-16 16v40.16c0 89.64 63.97 169.55 152 181.69V464H96c-8.84 0-16 7.16-16 16v16c0 8.84 7.16 16 16 16h160c8.84 0 16-7.16 16-16v-16c0-8.84-7.16-16-16-16h-56v-33.77C285.71 418.47 352 344.9 352 256v-48c0-8.84-7.16-16-16-16z"]},Uc={prefix:"fas",iconName:"microphone-alt",icon:[352,512,[],"f3c9","M336 192h-16c-8.84 0-16 7.16-16 16v48c0 74.8-64.49 134.82-140.79 127.38C96.71 376.89 48 317.11 48 250.3V208c0-8.84-7.16-16-16-16H16c-8.84 0-16 7.16-16 16v40.16c0 89.64 63.97 169.55 152 181.69V464H96c-8.84 0-16 7.16-16 16v16c0 8.84 7.16 16 16 16h160c8.84 0 16-7.16 16-16v-16c0-8.84-7.16-16-16-16h-56v-33.77C285.71 418.47 352 344.9 352 256v-48c0-8.84-7.16-16-16-16zM176 352c53.02 0 96-42.98 96-96h-85.33c-5.89 0-10.67-3.58-10.67-8v-16c0-4.42 4.78-8 10.67-8H272v-32h-85.33c-5.89 0-10.67-3.58-10.67-8v-16c0-4.42 4.78-8 10.67-8H272v-32h-85.33c-5.89 0-10.67-3.58-10.67-8v-16c0-4.42 4.78-8 10.67-8H272c0-53.02-42.98-96-96-96S80 42.98 80 96v160c0 53.02 42.98 96 96 96z"]},Wc={prefix:"fas",iconName:"microphone-alt-slash",icon:[640,512,[],"f539","M633.82 458.1L476.26 336.33C488.74 312.21 496 284.98 496 256v-48c0-8.84-7.16-16-16-16h-16c-8.84 0-16 7.16-16 16v48c0 17.92-3.96 34.8-10.72 50.2l-26.55-20.52c3.1-9.4 5.28-19.22 5.28-29.67h-43.67l-41.4-32H416v-32h-85.33c-5.89 0-10.67-3.58-10.67-8v-16c0-4.42 4.78-8 10.67-8H416v-32h-85.33c-5.89 0-10.67-3.58-10.67-8v-16c0-4.42 4.78-8 10.67-8H416c0-53.02-42.98-96-96-96s-96 42.98-96 96v45.36L45.47 3.37C38.49-2.05 28.43-.8 23.01 6.18L3.37 31.45C-2.05 38.42-.8 48.47 6.18 53.9l588.36 454.73c6.98 5.43 17.03 4.17 22.46-2.81l19.64-25.27c5.41-6.97 4.16-17.02-2.82-22.45zM400 464h-56v-33.78c11.71-1.62 23.1-4.28 33.96-8.08l-50.4-38.96c-6.71.4-13.41.87-20.35.2-55.85-5.45-98.74-48.63-111.18-101.85L144 241.31v6.85c0 89.64 63.97 169.55 152 181.69V464h-56c-8.84 0-16 7.16-16 16v16c0 8.84 7.16 16 16 16h160c8.84 0 16-7.16 16-16v-16c0-8.84-7.16-16-16-16z"]},jc={prefix:"fas",iconName:"microphone-slash",icon:[640,512,[],"f131","M633.82 458.1l-157.8-121.96C488.61 312.13 496 285.01 496 256v-48c0-8.84-7.16-16-16-16h-16c-8.84 0-16 7.16-16 16v48c0 17.92-3.96 34.8-10.72 50.2l-26.55-20.52c3.1-9.4 5.28-19.22 5.28-29.67V96c0-53.02-42.98-96-96-96s-96 42.98-96 96v45.36L45.47 3.37C38.49-2.05 28.43-.8 23.01 6.18L3.37 31.45C-2.05 38.42-.8 48.47 6.18 53.9l588.36 454.73c6.98 5.43 17.03 4.17 22.46-2.81l19.64-25.27c5.41-6.97 4.16-17.02-2.82-22.45zM400 464h-56v-33.77c11.66-1.6 22.85-4.54 33.67-8.31l-50.11-38.73c-6.71.4-13.41.87-20.35.2-55.85-5.45-98.74-48.63-111.18-101.85L144 241.31v6.85c0 89.64 63.97 169.55 152 181.69V464h-56c-8.84 0-16 7.16-16 16v16c0 8.84 7.16 16 16 16h160c8.84 0 16-7.16 16-16v-16c0-8.84-7.16-16-16-16z"]},Kc={prefix:"fas",iconName:"microscope",icon:[512,512,[],"f610","M160 320h12v16c0 8.84 7.16 16 16 16h40c8.84 0 16-7.16 16-16v-16h12c17.67 0 32-14.33 32-32V64c0-17.67-14.33-32-32-32V16c0-8.84-7.16-16-16-16h-64c-8.84 0-16 7.16-16 16v16c-17.67 0-32 14.33-32 32v224c0 17.67 14.33 32 32 32zm304 128h-1.29C493.24 413.99 512 369.2 512 320c0-105.88-86.12-192-192-192v64c70.58 0 128 57.42 128 128s-57.42 128-128 128H48c-26.51 0-48 21.49-48 48 0 8.84 7.16 16 16 16h480c8.84 0 16-7.16 16-16 0-26.51-21.49-48-48-48zm-360-32h208c4.42 0 8-3.58 8-8v-16c0-4.42-3.58-8-8-8H104c-4.42 0-8 3.58-8 8v16c0 4.42 3.58 8 8 8z"]},$c={prefix:"fas",iconName:"minus",icon:[448,512,[],"f068","M416 208H32c-17.67 0-32 14.33-32 32v32c0 17.67 14.33 32 32 32h384c17.67 0 32-14.33 32-32v-32c0-17.67-14.33-32-32-32z"]},Yc={prefix:"fas",iconName:"minus-circle",icon:[512,512,[],"f056","M256 8C119 8 8 119 8 256s111 248 248 248 248-111 248-248S393 8 256 8zM124 296c-6.6 0-12-5.4-12-12v-56c0-6.6 5.4-12 12-12h264c6.6 0 12 5.4 12 12v56c0 6.6-5.4 12-12 12H124z"]},qc={prefix:"fas",iconName:"minus-square",icon:[448,512,[],"f146","M400 32H48C21.5 32 0 53.5 0 80v352c0 26.5 21.5 48 48 48h352c26.5 0 48-21.5 48-48V80c0-26.5-21.5-48-48-48zM92 296c-6.6 0-12-5.4-12-12v-56c0-6.6 5.4-12 12-12h264c6.6 0 12 5.4 12 12v56c0 6.6-5.4 12-12 12H92z"]},Xc={prefix:"fas",iconName:"mitten",icon:[448,512,[],"f7b5","M368 416H48c-8.8 0-16 7.2-16 16v64c0 8.8 7.2 16 16 16h320c8.8 0 16-7.2 16-16v-64c0-8.8-7.2-16-16-16zm57-209.1c-27.2-22.6-67.5-19-90.1 8.2l-20.9 25-29.6-128.4c-18-77.5-95.4-125.9-172.8-108C34.2 21.6-14.2 98.9 3.7 176.4L51.6 384h309l72.5-87c22.7-27.2 19-67.5-8.1-90.1z"]},Zc={prefix:"fas",iconName:"mobile",icon:[320,512,[],"f10b","M272 0H48C21.5 0 0 21.5 0 48v416c0 26.5 21.5 48 48 48h224c26.5 0 48-21.5 48-48V48c0-26.5-21.5-48-48-48zM160 480c-17.7 0-32-14.3-32-32s14.3-32 32-32 32 14.3 32 32-14.3 32-32 32z"]},Qc={prefix:"fas",iconName:"mobile-alt",icon:[320,512,[],"f3cd","M272 0H48C21.5 0 0 21.5 0 48v416c0 26.5 21.5 48 48 48h224c26.5 0 48-21.5 48-48V48c0-26.5-21.5-48-48-48zM160 480c-17.7 0-32-14.3-32-32s14.3-32 32-32 32 14.3 32 32-14.3 32-32 32zm112-108c0 6.6-5.4 12-12 12H60c-6.6 0-12-5.4-12-12V60c0-6.6 5.4-12 12-12h200c6.6 0 12 5.4 12 12v312z"]},Jc={prefix:"fas",iconName:"money-bill",icon:[640,512,[],"f0d6","M608 64H32C14.33 64 0 78.33 0 96v320c0 17.67 14.33 32 32 32h576c17.67 0 32-14.33 32-32V96c0-17.67-14.33-32-32-32zM48 400v-64c35.35 0 64 28.65 64 64H48zm0-224v-64h64c0 35.35-28.65 64-64 64zm272 176c-44.19 0-80-42.99-80-96 0-53.02 35.82-96 80-96s80 42.98 80 96c0 53.03-35.83 96-80 96zm272 48h-64c0-35.35 28.65-64 64-64v64zm0-224c-35.35 0-64-28.65-64-64h64v64z"]},eh={prefix:"fas",iconName:"money-bill-alt",icon:[640,512,[],"f3d1","M352 288h-16v-88c0-4.42-3.58-8-8-8h-13.58c-4.74 0-9.37 1.4-13.31 4.03l-15.33 10.22a7.994 7.994 0 0 0-2.22 11.09l8.88 13.31a7.994 7.994 0 0 0 11.09 2.22l.47-.31V288h-16c-4.42 0-8 3.58-8 8v16c0 4.42 3.58 8 8 8h64c4.42 0 8-3.58 8-8v-16c0-4.42-3.58-8-8-8zM608 64H32C14.33 64 0 78.33 0 96v320c0 17.67 14.33 32 32 32h576c17.67 0 32-14.33 32-32V96c0-17.67-14.33-32-32-32zM48 400v-64c35.35 0 64 28.65 64 64H48zm0-224v-64h64c0 35.35-28.65 64-64 64zm272 192c-53.02 0-96-50.15-96-112 0-61.86 42.98-112 96-112s96 50.14 96 112c0 61.87-43 112-96 112zm272 32h-64c0-35.35 28.65-64 64-64v64zm0-224c-35.35 0-64-28.65-64-64h64v64z"]},th={prefix:"fas",iconName:"money-bill-wave",icon:[640,512,[],"f53a","M621.16 54.46C582.37 38.19 543.55 32 504.75 32c-123.17-.01-246.33 62.34-369.5 62.34-30.89 0-61.76-3.92-92.65-13.72-3.47-1.1-6.95-1.62-10.35-1.62C15.04 79 0 92.32 0 110.81v317.26c0 12.63 7.23 24.6 18.84 29.46C57.63 473.81 96.45 480 135.25 480c123.17 0 246.34-62.35 369.51-62.35 30.89 0 61.76 3.92 92.65 13.72 3.47 1.1 6.95 1.62 10.35 1.62 17.21 0 32.25-13.32 32.25-31.81V83.93c-.01-12.64-7.24-24.6-18.85-29.47zM48 132.22c20.12 5.04 41.12 7.57 62.72 8.93C104.84 170.54 79 192.69 48 192.69v-60.47zm0 285v-47.78c34.37 0 62.18 27.27 63.71 61.4-22.53-1.81-43.59-6.31-63.71-13.62zM320 352c-44.19 0-80-42.99-80-96 0-53.02 35.82-96 80-96s80 42.98 80 96c0 53.03-35.83 96-80 96zm272 27.78c-17.52-4.39-35.71-6.85-54.32-8.44 5.87-26.08 27.5-45.88 54.32-49.28v57.72zm0-236.11c-30.89-3.91-54.86-29.7-55.81-61.55 19.54 2.17 38.09 6.23 55.81 12.66v48.89z"]},ih={prefix:"fas",iconName:"money-bill-wave-alt",icon:[640,512,[],"f53b","M621.16 54.46C582.37 38.19 543.55 32 504.75 32c-123.17-.01-246.33 62.34-369.5 62.34-30.89 0-61.76-3.92-92.65-13.72-3.47-1.1-6.95-1.62-10.35-1.62C15.04 79 0 92.32 0 110.81v317.26c0 12.63 7.23 24.6 18.84 29.46C57.63 473.81 96.45 480 135.25 480c123.17 0 246.34-62.35 369.51-62.35 30.89 0 61.76 3.92 92.65 13.72 3.47 1.1 6.95 1.62 10.35 1.62 17.21 0 32.25-13.32 32.25-31.81V83.93c-.01-12.64-7.24-24.6-18.85-29.47zM320 352c-44.19 0-80-42.99-80-96 0-53.02 35.82-96 80-96s80 42.98 80 96c0 53.03-35.83 96-80 96z"]},nh={prefix:"fas",iconName:"money-check",icon:[640,512,[],"f53c","M0 448c0 17.67 14.33 32 32 32h576c17.67 0 32-14.33 32-32V128H0v320zm448-208c0-8.84 7.16-16 16-16h96c8.84 0 16 7.16 16 16v32c0 8.84-7.16 16-16 16h-96c-8.84 0-16-7.16-16-16v-32zm0 120c0-4.42 3.58-8 8-8h112c4.42 0 8 3.58 8 8v16c0 4.42-3.58 8-8 8H456c-4.42 0-8-3.58-8-8v-16zM64 264c0-4.42 3.58-8 8-8h304c4.42 0 8 3.58 8 8v16c0 4.42-3.58 8-8 8H72c-4.42 0-8-3.58-8-8v-16zm0 96c0-4.42 3.58-8 8-8h176c4.42 0 8 3.58 8 8v16c0 4.42-3.58 8-8 8H72c-4.42 0-8-3.58-8-8v-16zM624 32H16C7.16 32 0 39.16 0 48v48h640V48c0-8.84-7.16-16-16-16z"]},sh={prefix:"fas",iconName:"money-check-alt",icon:[640,512,[],"f53d","M608 32H32C14.33 32 0 46.33 0 64v384c0 17.67 14.33 32 32 32h576c17.67 0 32-14.33 32-32V64c0-17.67-14.33-32-32-32zM176 327.88V344c0 4.42-3.58 8-8 8h-16c-4.42 0-8-3.58-8-8v-16.29c-11.29-.58-22.27-4.52-31.37-11.35-3.9-2.93-4.1-8.77-.57-12.14l11.75-11.21c2.77-2.64 6.89-2.76 10.13-.73 3.87 2.42 8.26 3.72 12.82 3.72h28.11c6.5 0 11.8-5.92 11.8-13.19 0-5.95-3.61-11.19-8.77-12.73l-45-13.5c-18.59-5.58-31.58-23.42-31.58-43.39 0-24.52 19.05-44.44 42.67-45.07V152c0-4.42 3.58-8 8-8h16c4.42 0 8 3.58 8 8v16.29c11.29.58 22.27 4.51 31.37 11.35 3.9 2.93 4.1 8.77.57 12.14l-11.75 11.21c-2.77 2.64-6.89 2.76-10.13.73-3.87-2.43-8.26-3.72-12.82-3.72h-28.11c-6.5 0-11.8 5.92-11.8 13.19 0 5.95 3.61 11.19 8.77 12.73l45 13.5c18.59 5.58 31.58 23.42 31.58 43.39 0 24.53-19.05 44.44-42.67 45.07zM416 312c0 4.42-3.58 8-8 8H296c-4.42 0-8-3.58-8-8v-16c0-4.42 3.58-8 8-8h112c4.42 0 8 3.58 8 8v16zm160 0c0 4.42-3.58 8-8 8h-80c-4.42 0-8-3.58-8-8v-16c0-4.42 3.58-8 8-8h80c4.42 0 8 3.58 8 8v16zm0-96c0 4.42-3.58 8-8 8H296c-4.42 0-8-3.58-8-8v-16c0-4.42 3.58-8 8-8h272c4.42 0 8 3.58 8 8v16z"]},rh={prefix:"fas",iconName:"monument",icon:[384,512,[],"f5a6","M368 448H16c-8.84 0-16 7.16-16 16v32c0 8.84 7.16 16 16 16h352c8.84 0 16-7.16 16-16v-32c0-8.84-7.16-16-16-16zm-78.86-347.26a31.97 31.97 0 0 0-9.21-19.44L203.31 4.69c-6.25-6.25-16.38-6.25-22.63 0l-76.6 76.61a31.97 31.97 0 0 0-9.21 19.44L64 416h256l-30.86-315.26zM240 307.2c0 6.4-6.4 12.8-12.8 12.8h-70.4c-6.4 0-12.8-6.4-12.8-12.8v-38.4c0-6.4 6.4-12.8 12.8-12.8h70.4c6.4 0 12.8 6.4 12.8 12.8v38.4z"]},oh={prefix:"fas",iconName:"moon",icon:[512,512,[],"f186","M283.211 512c78.962 0 151.079-35.925 198.857-94.792 7.068-8.708-.639-21.43-11.562-19.35-124.203 23.654-238.262-71.576-238.262-196.954 0-72.222 38.662-138.635 101.498-174.394 9.686-5.512 7.25-20.197-3.756-22.23A258.156 258.156 0 0 0 283.211 0c-141.309 0-256 114.511-256 256 0 141.309 114.511 256 256 256z"]},ah={prefix:"fas",iconName:"mortar-pestle",icon:[512,512,[],"f5a7","M501.54 60.91c17.22-17.22 12.51-46.25-9.27-57.14a35.696 35.696 0 0 0-37.37 3.37L251.09 160h151.37l99.08-99.09zM496 192H16c-8.84 0-16 7.16-16 16v32c0 8.84 7.16 16 16 16h16c0 80.98 50.2 150.11 121.13 178.32-12.76 16.87-21.72 36.8-24.95 58.69-1.46 9.92 6.04 18.98 16.07 18.98h223.5c10.03 0 17.53-9.06 16.07-18.98-3.22-21.89-12.18-41.82-24.95-58.69C429.8 406.11 480 336.98 480 256h16c8.84 0 16-7.16 16-16v-32c0-8.84-7.16-16-16-16z"]},lh={prefix:"fas",iconName:"mosque",icon:[640,512,[],"f678","M0 480c0 17.67 14.33 32 32 32h64c17.67 0 32-14.33 32-32V160H0v320zm579.16-192c17.86-17.39 28.84-37.34 28.84-58.91 0-52.86-41.79-93.79-87.92-122.9-41.94-26.47-80.63-57.77-111.96-96.22L400 0l-8.12 9.97c-31.33 38.45-70.01 69.76-111.96 96.22C233.79 135.3 192 176.23 192 229.09c0 21.57 10.98 41.52 28.84 58.91h358.32zM608 320H192c-17.67 0-32 14.33-32 32v128c0 17.67 14.33 32 32 32h32v-64c0-17.67 14.33-32 32-32s32 14.33 32 32v64h64v-72c0-48 48-72 48-72s48 24 48 72v72h64v-64c0-17.67 14.33-32 32-32s32 14.33 32 32v64h32c17.67 0 32-14.33 32-32V352c0-17.67-14.33-32-32-32zM64 0S0 32 0 96v32h128V96c0-64-64-96-64-96z"]},ch={prefix:"fas",iconName:"motorcycle",icon:[640,512,[],"f21c","M512.9 192c-14.9-.1-29.1 2.3-42.4 6.9L437.6 144H520c13.3 0 24-10.7 24-24V88c0-13.3-10.7-24-24-24h-45.3c-6.8 0-13.3 2.9-17.8 7.9l-37.5 41.7-22.8-38C392.2 68.4 384.4 64 376 64h-80c-8.8 0-16 7.2-16 16v16c0 8.8 7.2 16 16 16h66.4l19.2 32H227.9c-17.7-23.1-44.9-40-99.9-40H72.5C59 104 47.7 115 48 128.5c.2 13 10.9 23.5 24 23.5h56c24.5 0 38.7 10.9 47.8 24.8l-11.3 20.5c-13-3.9-26.9-5.7-41.3-5.2C55.9 194.5 1.6 249.6 0 317c-1.6 72.1 56.3 131 128 131 59.6 0 109.7-40.8 124-96h84.2c13.7 0 24.6-11.4 24-25.1-2.1-47.1 17.5-93.7 56.2-125l12.5 20.8c-27.6 23.7-45.1 58.9-44.8 98.2.5 69.6 57.2 126.5 126.8 127.1 71.6.7 129.8-57.5 129.2-129.1-.7-69.6-57.6-126.4-127.2-126.9zM128 400c-44.1 0-80-35.9-80-80s35.9-80 80-80c4.2 0 8.4.3 12.5 1L99 316.4c-8.8 16 2.8 35.6 21 35.6h81.3c-12.4 28.2-40.6 48-73.3 48zm463.9-75.6c-2.2 40.6-35 73.4-75.5 75.5-46.1 2.5-84.4-34.3-84.4-79.9 0-21.4 8.4-40.8 22.1-55.1l49.4 82.4c4.5 7.6 14.4 10 22 5.5l13.7-8.2c7.6-4.5 10-14.4 5.5-22l-48.6-80.9c5.2-1.1 10.5-1.6 15.9-1.6 45.6-.1 82.3 38.2 79.9 84.3z"]},hh={prefix:"fas",iconName:"mountain",icon:[640,512,[],"f6fc","M634.92 462.7l-288-448C341.03 5.54 330.89 0 320 0s-21.03 5.54-26.92 14.7l-288 448a32.001 32.001 0 0 0-1.17 32.64A32.004 32.004 0 0 0 32 512h576c11.71 0 22.48-6.39 28.09-16.67a31.983 31.983 0 0 0-1.17-32.63zM320 91.18L405.39 224H320l-64 64-38.06-38.06L320 91.18z"]},dh={prefix:"fas",iconName:"mouse",icon:[384,512,[],"f8cc","M0 352a160 160 0 0 0 160 160h64a160 160 0 0 0 160-160V224H0zM176 0h-16A160 160 0 0 0 0 160v32h176zm48 0h-16v192h176v-32A160 160 0 0 0 224 0z"]},uh={prefix:"fas",iconName:"mouse-pointer",icon:[320,512,[],"f245","M302.189 329.126H196.105l55.831 135.993c3.889 9.428-.555 19.999-9.444 23.999l-49.165 21.427c-9.165 4-19.443-.571-23.332-9.714l-53.053-129.136-86.664 89.138C18.729 472.71 0 463.554 0 447.977V18.299C0 1.899 19.921-6.096 30.277 5.443l284.412 292.542c11.472 11.179 3.007 31.141-12.5 31.141z"]},ph={prefix:"fas",iconName:"mug-hot",icon:[512,512,[],"f7b6","M127.1 146.5c1.3 7.7 8 13.5 16 13.5h16.5c9.8 0 17.6-8.5 16.3-18-3.8-28.2-16.4-54.2-36.6-74.7-14.4-14.7-23.6-33.3-26.4-53.5C111.8 5.9 105 0 96.8 0H80.4C70.6 0 63 8.5 64.1 18c3.9 31.9 18 61.3 40.6 84.4 12 12.2 19.7 27.5 22.4 44.1zm112 0c1.3 7.7 8 13.5 16 13.5h16.5c9.8 0 17.6-8.5 16.3-18-3.8-28.2-16.4-54.2-36.6-74.7-14.4-14.7-23.6-33.3-26.4-53.5C223.8 5.9 217 0 208.8 0h-16.4c-9.8 0-17.5 8.5-16.3 18 3.9 31.9 18 61.3 40.6 84.4 12 12.2 19.7 27.5 22.4 44.1zM400 192H32c-17.7 0-32 14.3-32 32v192c0 53 43 96 96 96h192c53 0 96-43 96-96h16c61.8 0 112-50.2 112-112s-50.2-112-112-112zm0 160h-16v-96h16c26.5 0 48 21.5 48 48s-21.5 48-48 48z"]},gh={prefix:"fas",iconName:"music",icon:[512,512,[],"f001","M470.38 1.51L150.41 96A32 32 0 0 0 128 126.51v261.41A139 139 0 0 0 96 384c-53 0-96 28.66-96 64s43 64 96 64 96-28.66 96-64V214.32l256-75v184.61a138.4 138.4 0 0 0-32-3.93c-53 0-96 28.66-96 64s43 64 96 64 96-28.65 96-64V32a32 32 0 0 0-41.62-30.49z"]},fh={prefix:"fas",iconName:"network-wired",icon:[640,512,[],"f6ff","M640 264v-16c0-8.84-7.16-16-16-16H344v-40h72c17.67 0 32-14.33 32-32V32c0-17.67-14.33-32-32-32H224c-17.67 0-32 14.33-32 32v128c0 17.67 14.33 32 32 32h72v40H16c-8.84 0-16 7.16-16 16v16c0 8.84 7.16 16 16 16h104v40H64c-17.67 0-32 14.33-32 32v128c0 17.67 14.33 32 32 32h160c17.67 0 32-14.33 32-32V352c0-17.67-14.33-32-32-32h-56v-40h304v40h-56c-17.67 0-32 14.33-32 32v128c0 17.67 14.33 32 32 32h160c17.67 0 32-14.33 32-32V352c0-17.67-14.33-32-32-32h-56v-40h104c8.84 0 16-7.16 16-16zM256 128V64h128v64H256zm-64 320H96v-64h96v64zm352 0h-96v-64h96v64z"]},mh={prefix:"fas",iconName:"neuter",icon:[288,512,[],"f22c","M288 176c0-79.5-64.5-144-144-144S0 96.5 0 176c0 68.5 47.9 125.9 112 140.4V468c0 6.6 5.4 12 12 12h40c6.6 0 12-5.4 12-12V316.4c64.1-14.5 112-71.9 112-140.4zm-144 80c-44.1 0-80-35.9-80-80s35.9-80 80-80 80 35.9 80 80-35.9 80-80 80z"]},vh={prefix:"fas",iconName:"newspaper",icon:[576,512,[],"f1ea","M552 64H88c-13.255 0-24 10.745-24 24v8H24c-13.255 0-24 10.745-24 24v272c0 30.928 25.072 56 56 56h472c26.51 0 48-21.49 48-48V88c0-13.255-10.745-24-24-24zM56 400a8 8 0 0 1-8-8V144h16v248a8 8 0 0 1-8 8zm236-16H140c-6.627 0-12-5.373-12-12v-8c0-6.627 5.373-12 12-12h152c6.627 0 12 5.373 12 12v8c0 6.627-5.373 12-12 12zm208 0H348c-6.627 0-12-5.373-12-12v-8c0-6.627 5.373-12 12-12h152c6.627 0 12 5.373 12 12v8c0 6.627-5.373 12-12 12zm-208-96H140c-6.627 0-12-5.373-12-12v-8c0-6.627 5.373-12 12-12h152c6.627 0 12 5.373 12 12v8c0 6.627-5.373 12-12 12zm208 0H348c-6.627 0-12-5.373-12-12v-8c0-6.627 5.373-12 12-12h152c6.627 0 12 5.373 12 12v8c0 6.627-5.373 12-12 12zm0-96H140c-6.627 0-12-5.373-12-12v-40c0-6.627 5.373-12 12-12h360c6.627 0 12 5.373 12 12v40c0 6.627-5.373 12-12 12z"]},yh={prefix:"fas",iconName:"not-equal",icon:[448,512,[],"f53e","M416 208c17.67 0 32-14.33 32-32v-32c0-17.67-14.33-32-32-32h-23.88l51.87-66.81c5.37-7.02 4.04-17.06-2.97-22.43L415.61 3.3c-7.02-5.38-17.06-4.04-22.44 2.97L311.09 112H32c-17.67 0-32 14.33-32 32v32c0 17.67 14.33 32 32 32h204.56l-74.53 96H32c-17.67 0-32 14.33-32 32v32c0 17.67 14.33 32 32 32h55.49l-51.87 66.81c-5.37 7.01-4.04 17.05 2.97 22.43L64 508.7c7.02 5.38 17.06 4.04 22.43-2.97L168.52 400H416c17.67 0 32-14.33 32-32v-32c0-17.67-14.33-32-32-32H243.05l74.53-96H416z"]},Ch={prefix:"fas",iconName:"notes-medical",icon:[384,512,[],"f481","M336 64h-80c0-35.3-28.7-64-64-64s-64 28.7-64 64H48C21.5 64 0 85.5 0 112v352c0 26.5 21.5 48 48 48h288c26.5 0 48-21.5 48-48V112c0-26.5-21.5-48-48-48zM192 40c13.3 0 24 10.7 24 24s-10.7 24-24 24-24-10.7-24-24 10.7-24 24-24zm96 304c0 4.4-3.6 8-8 8h-56v56c0 4.4-3.6 8-8 8h-48c-4.4 0-8-3.6-8-8v-56h-56c-4.4 0-8-3.6-8-8v-48c0-4.4 3.6-8 8-8h56v-56c0-4.4 3.6-8 8-8h48c4.4 0 8 3.6 8 8v56h56c4.4 0 8 3.6 8 8v48zm0-192c0 4.4-3.6 8-8 8H104c-4.4 0-8-3.6-8-8v-16c0-4.4 3.6-8 8-8h176c4.4 0 8 3.6 8 8v16z"]},bh={prefix:"fas",iconName:"object-group",icon:[512,512,[],"f247","M480 128V96h20c6.627 0 12-5.373 12-12V44c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v20H64V44c0-6.627-5.373-12-12-12H12C5.373 32 0 37.373 0 44v40c0 6.627 5.373 12 12 12h20v320H12c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12v-20h384v20c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12v-40c0-6.627-5.373-12-12-12h-20V128zM96 276V140c0-6.627 5.373-12 12-12h168c6.627 0 12 5.373 12 12v136c0 6.627-5.373 12-12 12H108c-6.627 0-12-5.373-12-12zm320 96c0 6.627-5.373 12-12 12H236c-6.627 0-12-5.373-12-12v-52h72c13.255 0 24-10.745 24-24v-72h84c6.627 0 12 5.373 12 12v136z"]},Sh={prefix:"fas",iconName:"object-ungroup",icon:[576,512,[],"f248","M64 320v26a6 6 0 0 1-6 6H6a6 6 0 0 1-6-6v-52a6 6 0 0 1 6-6h26V96H6a6 6 0 0 1-6-6V38a6 6 0 0 1 6-6h52a6 6 0 0 1 6 6v26h288V38a6 6 0 0 1 6-6h52a6 6 0 0 1 6 6v52a6 6 0 0 1-6 6h-26v192h26a6 6 0 0 1 6 6v52a6 6 0 0 1-6 6h-52a6 6 0 0 1-6-6v-26H64zm480-64v-32h26a6 6 0 0 0 6-6v-52a6 6 0 0 0-6-6h-52a6 6 0 0 0-6 6v26H408v72h8c13.255 0 24 10.745 24 24v64c0 13.255-10.745 24-24 24h-64c-13.255 0-24-10.745-24-24v-8H192v72h-26a6 6 0 0 0-6 6v52a6 6 0 0 0 6 6h52a6 6 0 0 0 6-6v-26h288v26a6 6 0 0 0 6 6h52a6 6 0 0 0 6-6v-52a6 6 0 0 0-6-6h-26V256z"]},wh={prefix:"fas",iconName:"oil-can",icon:[640,512,[],"f613","M629.8 160.31L416 224l-50.49-25.24a64.07 64.07 0 0 0-28.62-6.76H280v-48h56c8.84 0 16-7.16 16-16v-16c0-8.84-7.16-16-16-16H176c-8.84 0-16 7.16-16 16v16c0 8.84 7.16 16 16 16h56v48h-56L37.72 166.86a31.9 31.9 0 0 0-5.79-.53C14.67 166.33 0 180.36 0 198.34v94.95c0 15.46 11.06 28.72 26.28 31.48L96 337.46V384c0 17.67 14.33 32 32 32h274.63c8.55 0 16.75-3.42 22.76-9.51l212.26-214.75c1.5-1.5 2.34-3.54 2.34-5.66V168c.01-5.31-5.08-9.15-10.19-7.69zM96 288.67l-48-8.73v-62.43l48 8.73v62.43zm453.33 84.66c0 23.56 19.1 42.67 42.67 42.67s42.67-19.1 42.67-42.67S592 288 592 288s-42.67 61.77-42.67 85.33z"]},xh={prefix:"fas",iconName:"om",icon:[512,512,[],"f679","M360.6 60.94a10.43 10.43 0 0 0 14.76 0l21.57-21.56a10.43 10.43 0 0 0 0-14.76L375.35 3.06c-4.08-4.07-10.68-4.07-14.76 0l-21.57 21.56a10.43 10.43 0 0 0 0 14.76l21.58 21.56zM412.11 192c-26.69 0-51.77 10.39-70.64 29.25l-24.25 24.25c-6.78 6.77-15.78 10.5-25.38 10.5H245c10.54-22.1 14.17-48.11 7.73-75.23-10.1-42.55-46.36-76.11-89.52-83.19-36.15-5.93-70.9 5.04-96.01 28.78-7.36 6.96-6.97 18.85 1.12 24.93l26.15 19.63c5.72 4.3 13.66 4.32 19.2-.21 8.45-6.9 19.02-10.71 30.27-10.71 26.47 0 48.01 21.53 48.01 48s-21.54 48-48.01 48h-31.9c-11.96 0-19.74 12.58-14.39 23.28l16.09 32.17c2.53 5.06 7.6 8.1 13.17 8.55h33.03c35.3 0 64.01 28.7 64.01 64s-28.71 64-64.01 64c-96.02 0-122.35-54.02-145.15-92.03-4.53-7.55-14.77-3.58-14.79 5.22C-.09 416 41.13 512 159.94 512c70.59 0 128.02-57.42 128.02-128 0-23.42-6.78-45.1-17.81-64h21.69c26.69 0 51.77-10.39 70.64-29.25l24.25-24.25c6.78-6.77 15.78-10.5 25.38-10.5 19.78 0 35.88 16.09 35.88 35.88V392c0 13.23-18.77 24-32.01 24-39.4 0-66.67-24.24-81.82-42.89-4.77-5.87-14.2-2.54-14.2 5.02V416s0 64 96.02 64c48.54 0 96.02-39.47 96.02-88V291.88c0-55.08-44.8-99.88-99.89-99.88zm42.18-124.73c-85.55 65.12-169.05 2.75-172.58.05-6.02-4.62-14.44-4.38-20.14.55-5.74 4.92-7.27 13.17-3.66 19.8 1.61 2.95 40.37 72.34 118.8 72.34 79.92 0 98.78-31.36 101.75-37.66 1.02-2.12 1.53-4.47 1.53-6.83V80c0-13.22-15.14-20.69-25.7-12.73z"]},Eh={prefix:"fas",iconName:"otter",icon:[640,512,[],"f700","M608 32h-32l-13.25-13.25A63.97 63.97 0 0 0 517.49 0H497c-11.14 0-22.08 2.91-31.75 8.43L312 96h-56C149.96 96 64 181.96 64 288v1.61c0 32.75-16 62.14-39.56 84.89-18.19 17.58-28.1 43.68-23.19 71.8 6.76 38.8 42.9 65.7 82.28 65.7H192c17.67 0 32-14.33 32-32s-14.33-32-32-32H80c-8.83 0-16-7.17-16-16s7.17-16 16-16h224c8.84 0 16-7.16 16-16v-16c0-17.67-14.33-32-32-32h-64l149.49-80.5L448 416h80c8.84 0 16-7.16 16-16v-16c0-17.67-14.33-32-32-32h-28.22l-55.11-110.21L521.14 192H544c53.02 0 96-42.98 96-96V64c0-17.67-14.33-32-32-32zm-96 16c8.84 0 16 7.16 16 16s-7.16 16-16 16-16-7.16-16-16 7.16-16 16-16zm32 96h-34.96L407.2 198.84l-13.77-27.55L512 112h77.05c-6.62 18.58-24.22 32-45.05 32z"]},Mh={prefix:"fas",iconName:"outdent",icon:[448,512,[],"f03b","M100.69 363.29c10 10 27.31 2.93 27.31-11.31V160c0-14.32-17.33-21.31-27.31-11.31l-96 96a16 16 0 0 0 0 22.62zM432 416H16a16 16 0 0 0-16 16v32a16 16 0 0 0 16 16h416a16 16 0 0 0 16-16v-32a16 16 0 0 0-16-16zm3.17-128H204.83A12.82 12.82 0 0 0 192 300.83v38.34A12.82 12.82 0 0 0 204.83 352h230.34A12.82 12.82 0 0 0 448 339.17v-38.34A12.82 12.82 0 0 0 435.17 288zm0-128H204.83A12.82 12.82 0 0 0 192 172.83v38.34A12.82 12.82 0 0 0 204.83 224h230.34A12.82 12.82 0 0 0 448 211.17v-38.34A12.82 12.82 0 0 0 435.17 160zM432 32H16A16 16 0 0 0 0 48v32a16 16 0 0 0 16 16h416a16 16 0 0 0 16-16V48a16 16 0 0 0-16-16z"]},Ah={prefix:"fas",iconName:"pager",icon:[512,512,[],"f815","M448 64H64a64 64 0 0 0-64 64v256a64 64 0 0 0 64 64h384a64 64 0 0 0 64-64V128a64 64 0 0 0-64-64zM160 368H80a16 16 0 0 1-16-16v-16a16 16 0 0 1 16-16h80zm128-16a16 16 0 0 1-16 16h-80v-48h80a16 16 0 0 1 16 16zm160-128a32 32 0 0 1-32 32H96a32 32 0 0 1-32-32v-64a32 32 0 0 1 32-32h320a32 32 0 0 1 32 32z"]},Th={prefix:"fas",iconName:"paint-brush",icon:[512,512,[],"f1fc","M167.02 309.34c-40.12 2.58-76.53 17.86-97.19 72.3-2.35 6.21-8 9.98-14.59 9.98-11.11 0-45.46-27.67-55.25-34.35C0 439.62 37.93 512 128 512c75.86 0 128-43.77 128-120.19 0-3.11-.65-6.08-.97-9.13l-88.01-73.34zM457.89 0c-15.16 0-29.37 6.71-40.21 16.45C213.27 199.05 192 203.34 192 257.09c0 13.7 3.25 26.76 8.73 38.7l63.82 53.18c7.21 1.8 14.64 3.03 22.39 3.03 62.11 0 98.11-45.47 211.16-256.46 7.38-14.35 13.9-29.85 13.9-45.99C512 20.64 486 0 457.89 0z"]},Dh={prefix:"fas",iconName:"paint-roller",icon:[512,512,[],"f5aa","M416 128V32c0-17.67-14.33-32-32-32H32C14.33 0 0 14.33 0 32v96c0 17.67 14.33 32 32 32h352c17.67 0 32-14.33 32-32zm32-64v128c0 17.67-14.33 32-32 32H256c-35.35 0-64 28.65-64 64v32c-17.67 0-32 14.33-32 32v128c0 17.67 14.33 32 32 32h64c17.67 0 32-14.33 32-32V352c0-17.67-14.33-32-32-32v-32h160c53.02 0 96-42.98 96-96v-64c0-35.35-28.65-64-64-64z"]},Ih={prefix:"fas",iconName:"palette",icon:[512,512,[],"f53f","M204.3 5C104.9 24.4 24.8 104.3 5.2 203.4c-37 187 131.7 326.4 258.8 306.7 41.2-6.4 61.4-54.6 42.5-91.7-23.1-45.4 9.9-98.4 60.9-98.4h79.7c35.8 0 64.8-29.6 64.9-65.3C511.5 97.1 368.1-26.9 204.3 5zM96 320c-17.7 0-32-14.3-32-32s14.3-32 32-32 32 14.3 32 32-14.3 32-32 32zm32-128c-17.7 0-32-14.3-32-32s14.3-32 32-32 32 14.3 32 32-14.3 32-32 32zm128-64c-17.7 0-32-14.3-32-32s14.3-32 32-32 32 14.3 32 32-14.3 32-32 32zm128 64c-17.7 0-32-14.3-32-32s14.3-32 32-32 32 14.3 32 32-14.3 32-32 32z"]},Rh={prefix:"fas",iconName:"pallet",icon:[640,512,[],"f482","M144 256h352c8.8 0 16-7.2 16-16V16c0-8.8-7.2-16-16-16H384v128l-64-32-64 32V0H144c-8.8 0-16 7.2-16 16v224c0 8.8 7.2 16 16 16zm480 128c8.8 0 16-7.2 16-16v-32c0-8.8-7.2-16-16-16H16c-8.8 0-16 7.2-16 16v32c0 8.8 7.2 16 16 16h48v64H16c-8.8 0-16 7.2-16 16v32c0 8.8 7.2 16 16 16h608c8.8 0 16-7.2 16-16v-32c0-8.8-7.2-16-16-16h-48v-64h48zm-336 64H128v-64h160v64zm224 0H352v-64h160v64z"]},Lh={prefix:"fas",iconName:"paper-plane",icon:[512,512,[],"f1d8","M476 3.2L12.5 270.6c-18.1 10.4-15.8 35.6 2.2 43.2L121 358.4l287.3-253.2c5.5-4.9 13.3 2.6 8.6 8.3L176 407v80.5c0 23.6 28.5 32.9 42.5 15.8L282 426l124.6 52.2c14.2 6 30.4-2.9 33-18.2l72-432C515 7.8 493.3-6.8 476 3.2z"]},kh={prefix:"fas",iconName:"paperclip",icon:[448,512,[],"f0c6","M43.246 466.142c-58.43-60.289-57.341-157.511 1.386-217.581L254.392 34c44.316-45.332 116.351-45.336 160.671 0 43.89 44.894 43.943 117.329 0 162.276L232.214 383.128c-29.855 30.537-78.633 30.111-107.982-.998-28.275-29.97-27.368-77.473 1.452-106.953l143.743-146.835c6.182-6.314 16.312-6.422 22.626-.241l22.861 22.379c6.315 6.182 6.422 16.312.241 22.626L171.427 319.927c-4.932 5.045-5.236 13.428-.648 18.292 4.372 4.634 11.245 4.711 15.688.165l182.849-186.851c19.613-20.062 19.613-52.725-.011-72.798-19.189-19.627-49.957-19.637-69.154 0L90.39 293.295c-34.763 35.56-35.299 93.12-1.191 128.313 34.01 35.093 88.985 35.137 123.058.286l172.06-175.999c6.177-6.319 16.307-6.433 22.626-.256l22.877 22.364c6.319 6.177 6.434 16.307.256 22.626l-172.06 175.998c-59.576 60.938-155.943 60.216-214.77-.485z"]},Ph={prefix:"fas",iconName:"parachute-box",icon:[512,512,[],"f4cd","M511.9 175c-9.1-75.6-78.4-132.4-158.3-158.7C390 55.7 416 116.9 416 192h28.1L327.5 321.5c-2.5-.6-4.8-1.5-7.5-1.5h-48V192h112C384 76.8 315.1 0 256 0S128 76.8 128 192h112v128h-48c-2.7 0-5 .9-7.5 1.5L67.9 192H96c0-75.1 26-136.3 62.4-175.7C78.5 42.7 9.2 99.5.1 175c-1.1 9.1 6.8 17 16 17h8.7l136.7 151.9c-.7 2.6-1.6 5.2-1.6 8.1v128c0 17.7 14.3 32 32 32h128c17.7 0 32-14.3 32-32V352c0-2.9-.9-5.4-1.6-8.1L487.1 192h8.7c9.3 0 17.2-7.8 16.1-17z"]},Nh={prefix:"fas",iconName:"paragraph",icon:[448,512,[],"f1dd","M448 48v32a16 16 0 0 1-16 16h-48v368a16 16 0 0 1-16 16h-32a16 16 0 0 1-16-16V96h-32v368a16 16 0 0 1-16 16h-32a16 16 0 0 1-16-16V352h-32a160 160 0 0 1 0-320h240a16 16 0 0 1 16 16z"]},Oh={prefix:"fas",iconName:"parking",icon:[448,512,[],"f540","M400 32H48C21.5 32 0 53.5 0 80v352c0 26.5 21.5 48 48 48h352c26.5 0 48-21.5 48-48V80c0-26.5-21.5-48-48-48zM240 320h-48v48c0 8.8-7.2 16-16 16h-32c-8.8 0-16-7.2-16-16V144c0-8.8 7.2-16 16-16h96c52.9 0 96 43.1 96 96s-43.1 96-96 96zm0-128h-48v64h48c17.6 0 32-14.4 32-32s-14.4-32-32-32z"]},_h={prefix:"fas",iconName:"passport",icon:[448,512,[],"f5ab","M129.62 176h39.09c1.49-27.03 6.54-51.35 14.21-70.41-27.71 13.24-48.02 39.19-53.3 70.41zm0 32c5.29 31.22 25.59 57.17 53.3 70.41-7.68-19.06-12.72-43.38-14.21-70.41h-39.09zM224 286.69c7.69-7.45 20.77-34.42 23.43-78.69h-46.87c2.67 44.26 15.75 71.24 23.44 78.69zM200.57 176h46.87c-2.66-44.26-15.74-71.24-23.43-78.69-7.7 7.45-20.78 34.43-23.44 78.69zm64.51 102.41c27.71-13.24 48.02-39.19 53.3-70.41h-39.09c-1.49 27.03-6.53 51.35-14.21 70.41zM416 0H64C28.65 0 0 28.65 0 64v384c0 35.35 28.65 64 64 64h352c17.67 0 32-14.33 32-32V32c0-17.67-14.33-32-32-32zm-80 416H112c-8.8 0-16-7.2-16-16s7.2-16 16-16h224c8.8 0 16 7.2 16 16s-7.2 16-16 16zm-112-96c-70.69 0-128-57.31-128-128S153.31 64 224 64s128 57.31 128 128-57.31 128-128 128zm41.08-214.41c7.68 19.06 12.72 43.38 14.21 70.41h39.09c-5.28-31.22-25.59-57.17-53.3-70.41z"]},Fh={prefix:"fas",iconName:"pastafarianism",icon:[640,512,[],"f67b","M624.54 347.67c-32.7-12.52-57.36 4.25-75.37 16.45-17.06 11.53-23.25 14.42-31.41 11.36-8.12-3.09-10.83-9.38-15.89-29.38-3.33-13.15-7.44-29.32-17.95-42.65 2.24-2.91 4.43-5.79 6.38-8.57C500.47 304.45 513.71 312 532 312c33.95 0 50.87-25.78 62.06-42.83 10.59-16.14 15-21.17 21.94-21.17 13.25 0 24-10.75 24-24s-10.75-24-24-24c-33.95 0-50.87 25.78-62.06 42.83-10.6 16.14-15 21.17-21.94 21.17-17.31 0-37.48-61.43-97.26-101.91l17.25-34.5C485.43 125.5 512 97.98 512 64c0-35.35-28.65-64-64-64s-64 28.65-64 64c0 13.02 3.94 25.1 10.62 35.21l-18.15 36.3c-16.98-4.6-35.6-7.51-56.46-7.51s-39.49 2.91-56.46 7.51l-18.15-36.3C252.06 89.1 256 77.02 256 64c0-35.35-28.65-64-64-64s-64 28.65-64 64c0 33.98 26.56 61.5 60.02 63.6l17.25 34.5C145.68 202.44 125.15 264 108 264c-6.94 0-11.34-5.03-21.94-21.17C74.88 225.78 57.96 200 24 200c-13.25 0-24 10.75-24 24s10.75 24 24 24c6.94 0 11.34 5.03 21.94 21.17C57.13 286.22 74.05 312 108 312c18.29 0 31.53-7.55 41.7-17.11 1.95 2.79 4.14 5.66 6.38 8.57-10.51 13.33-14.62 29.5-17.95 42.65-5.06 20-7.77 26.28-15.89 29.38-8.11 3.06-14.33.17-31.41-11.36-18.03-12.2-42.72-28.92-75.37-16.45-12.39 4.72-18.59 18.58-13.87 30.97 4.72 12.41 18.61 18.61 30.97 13.88 8.16-3.09 14.34-.19 31.39 11.36 13.55 9.16 30.83 20.86 52.42 20.84 7.17 0 14.83-1.28 22.97-4.39 32.66-12.44 39.98-41.33 45.33-62.44 2.21-8.72 3.99-14.49 5.95-18.87 16.62 13.61 36.95 25.88 61.64 34.17-9.96 37-32.18 90.8-60.26 90.8-13.25 0-24 10.75-24 24s10.75 24 24 24c66.74 0 97.05-88.63 107.42-129.14 6.69.6 13.42 1.14 20.58 1.14s13.89-.54 20.58-1.14C350.95 423.37 381.26 512 448 512c13.25 0 24-10.75 24-24s-10.75-24-24-24c-27.94 0-50.21-53.81-60.22-90.81 24.69-8.29 45-20.56 61.62-34.16 1.96 4.38 3.74 10.15 5.95 18.87 5.34 21.11 12.67 50 45.33 62.44 8.14 3.11 15.8 4.39 22.97 4.39 21.59 0 38.87-11.69 52.42-20.84 17.05-11.55 23.28-14.45 31.39-11.36 12.39 4.75 26.27-1.47 30.97-13.88 4.71-12.4-1.49-26.26-13.89-30.98zM448 48c8.82 0 16 7.18 16 16s-7.18 16-16 16-16-7.18-16-16 7.18-16 16-16zm-256 0c8.82 0 16 7.18 16 16s-7.18 16-16 16-16-7.18-16-16 7.18-16 16-16z"]},Gh={prefix:"fas",iconName:"paste",icon:[448,512,[],"f0ea","M128 184c0-30.879 25.122-56 56-56h136V56c0-13.255-10.745-24-24-24h-80.61C204.306 12.89 183.637 0 160 0s-44.306 12.89-55.39 32H24C10.745 32 0 42.745 0 56v336c0 13.255 10.745 24 24 24h104V184zm32-144c13.255 0 24 10.745 24 24s-10.745 24-24 24-24-10.745-24-24 10.745-24 24-24zm184 248h104v200c0 13.255-10.745 24-24 24H184c-13.255 0-24-10.745-24-24V184c0-13.255 10.745-24 24-24h136v104c0 13.2 10.8 24 24 24zm104-38.059V256h-96v-96h6.059a24 24 0 0 1 16.97 7.029l65.941 65.941a24.002 24.002 0 0 1 7.03 16.971z"]},Vh={prefix:"fas",iconName:"pause",icon:[448,512,[],"f04c","M144 479H48c-26.5 0-48-21.5-48-48V79c0-26.5 21.5-48 48-48h96c26.5 0 48 21.5 48 48v352c0 26.5-21.5 48-48 48zm304-48V79c0-26.5-21.5-48-48-48h-96c-26.5 0-48 21.5-48 48v352c0 26.5 21.5 48 48 48h96c26.5 0 48-21.5 48-48z"]},Bh={prefix:"fas",iconName:"pause-circle",icon:[512,512,[],"f28b","M256 8C119 8 8 119 8 256s111 248 248 248 248-111 248-248S393 8 256 8zm-16 328c0 8.8-7.2 16-16 16h-48c-8.8 0-16-7.2-16-16V176c0-8.8 7.2-16 16-16h48c8.8 0 16 7.2 16 16v160zm112 0c0 8.8-7.2 16-16 16h-48c-8.8 0-16-7.2-16-16V176c0-8.8 7.2-16 16-16h48c8.8 0 16 7.2 16 16v160z"]},Hh={prefix:"fas",iconName:"paw",icon:[512,512,[],"f1b0","M256 224c-79.41 0-192 122.76-192 200.25 0 34.9 26.81 55.75 71.74 55.75 48.84 0 81.09-25.08 120.26-25.08 39.51 0 71.85 25.08 120.26 25.08 44.93 0 71.74-20.85 71.74-55.75C448 346.76 335.41 224 256 224zm-147.28-12.61c-10.4-34.65-42.44-57.09-71.56-50.13-29.12 6.96-44.29 40.69-33.89 75.34 10.4 34.65 42.44 57.09 71.56 50.13 29.12-6.96 44.29-40.69 33.89-75.34zm84.72-20.78c30.94-8.14 46.42-49.94 34.58-93.36s-46.52-72.01-77.46-63.87-46.42 49.94-34.58 93.36c11.84 43.42 46.53 72.02 77.46 63.87zm281.39-29.34c-29.12-6.96-61.15 15.48-71.56 50.13-10.4 34.65 4.77 68.38 33.89 75.34 29.12 6.96 61.15-15.48 71.56-50.13 10.4-34.65-4.77-68.38-33.89-75.34zm-156.27 29.34c30.94 8.14 65.62-20.45 77.46-63.87 11.84-43.42-3.64-85.21-34.58-93.36s-65.62 20.45-77.46 63.87c-11.84 43.42 3.64 85.22 34.58 93.36z"]},zh={prefix:"fas",iconName:"peace",icon:[496,512,[],"f67c","M248 8C111.03 8 0 119.03 0 256s111.03 248 248 248 248-111.03 248-248S384.97 8 248 8zm184 248c0 31.93-8.2 61.97-22.57 88.17L280 240.63V74.97c86.23 15.21 152 90.5 152 181.03zM216 437.03c-33.86-5.97-64.49-21.2-89.29-43.02L216 322.57v114.46zm64-114.46L369.29 394c-24.8 21.82-55.43 37.05-89.29 43.02V322.57zm-64-247.6v165.66L86.57 344.17C72.2 317.97 64 287.93 64 256c0-90.53 65.77-165.82 152-181.03z"]},Uh={prefix:"fas",iconName:"pen",icon:[512,512,[],"f304","M290.74 93.24l128.02 128.02-277.99 277.99-114.14 12.6C11.35 513.54-1.56 500.62.14 485.34l12.7-114.22 277.9-277.88zm207.2-19.06l-60.11-60.11c-18.75-18.75-49.16-18.75-67.91 0l-56.55 56.55 128.02 128.02 56.55-56.55c18.75-18.76 18.75-49.16 0-67.91z"]},Wh={prefix:"fas",iconName:"pen-alt",icon:[512,512,[],"f305","M497.94 74.17l-60.11-60.11c-18.75-18.75-49.16-18.75-67.91 0l-56.55 56.55 128.02 128.02 56.55-56.55c18.75-18.75 18.75-49.15 0-67.91zm-246.8-20.53c-15.62-15.62-40.94-15.62-56.56 0L75.8 172.43c-6.25 6.25-6.25 16.38 0 22.62l22.63 22.63c6.25 6.25 16.38 6.25 22.63 0l101.82-101.82 22.63 22.62L93.95 290.03A327.038 327.038 0 0 0 .17 485.11l-.03.23c-1.7 15.28 11.21 28.2 26.49 26.51a327.02 327.02 0 0 0 195.34-93.8l196.79-196.79-82.77-82.77-84.85-84.85z"]},jh={prefix:"fas",iconName:"pen-fancy",icon:[512,512,[],"f5ac","M79.18 282.94a32.005 32.005 0 0 0-20.24 20.24L0 480l4.69 4.69 92.89-92.89c-.66-2.56-1.57-5.03-1.57-7.8 0-17.67 14.33-32 32-32s32 14.33 32 32-14.33 32-32 32c-2.77 0-5.24-.91-7.8-1.57l-92.89 92.89L32 512l176.82-58.94a31.983 31.983 0 0 0 20.24-20.24l33.07-84.07-98.88-98.88-84.07 33.07zM369.25 28.32L186.14 227.81l97.85 97.85 199.49-183.11C568.4 67.48 443.73-55.94 369.25 28.32z"]},Kh={prefix:"fas",iconName:"pen-nib",icon:[512,512,[],"f5ad","M136.6 138.79a64.003 64.003 0 0 0-43.31 41.35L0 460l14.69 14.69L164.8 324.58c-2.99-6.26-4.8-13.18-4.8-20.58 0-26.51 21.49-48 48-48s48 21.49 48 48-21.49 48-48 48c-7.4 0-14.32-1.81-20.58-4.8L37.31 497.31 52 512l279.86-93.29a64.003 64.003 0 0 0 41.35-43.31L416 224 288 96l-151.4 42.79zm361.34-64.62l-60.11-60.11c-18.75-18.75-49.16-18.75-67.91 0l-56.55 56.55 128.02 128.02 56.55-56.55c18.75-18.75 18.75-49.15 0-67.91z"]},$h={prefix:"fas",iconName:"pen-square",icon:[448,512,[],"f14b","M400 480H48c-26.5 0-48-21.5-48-48V80c0-26.5 21.5-48 48-48h352c26.5 0 48 21.5 48 48v352c0 26.5-21.5 48-48 48zM238.1 177.9L102.4 313.6l-6.3 57.1c-.8 7.6 5.6 14.1 13.3 13.3l57.1-6.3L302.2 242c2.3-2.3 2.3-6.1 0-8.5L246.7 178c-2.5-2.4-6.3-2.4-8.6-.1zM345 165.1L314.9 135c-9.4-9.4-24.6-9.4-33.9 0l-23.1 23.1c-2.3 2.3-2.3 6.1 0 8.5l55.5 55.5c2.3 2.3 6.1 2.3 8.5 0L345 199c9.3-9.3 9.3-24.5 0-33.9z"]},Yh={prefix:"fas",iconName:"pencil-alt",icon:[512,512,[],"f303","M497.9 142.1l-46.1 46.1c-4.7 4.7-12.3 4.7-17 0l-111-111c-4.7-4.7-4.7-12.3 0-17l46.1-46.1c18.7-18.7 49.1-18.7 67.9 0l60.1 60.1c18.8 18.7 18.8 49.1 0 67.9zM284.2 99.8L21.6 362.4.4 483.9c-2.9 16.4 11.4 30.6 27.8 27.8l121.5-21.3 262.6-262.6c4.7-4.7 4.7-12.3 0-17l-111-111c-4.8-4.7-12.4-4.7-17.1 0zM124.1 339.9c-5.5-5.5-5.5-14.3 0-19.8l154-154c5.5-5.5 14.3-5.5 19.8 0s5.5 14.3 0 19.8l-154 154c-5.5 5.5-14.3 5.5-19.8 0zM88 424h48v36.3l-64.5 11.3-31.1-31.1L51.7 376H88v48z"]},qh={prefix:"fas",iconName:"pencil-ruler",icon:[512,512,[],"f5ae","M109.46 244.04l134.58-134.56-44.12-44.12-61.68 61.68a7.919 7.919 0 0 1-11.21 0l-11.21-11.21c-3.1-3.1-3.1-8.12 0-11.21l61.68-61.68-33.64-33.65C131.47-3.1 111.39-3.1 99 9.29L9.29 99c-12.38 12.39-12.39 32.47 0 44.86l100.17 100.18zm388.47-116.8c18.76-18.76 18.75-49.17 0-67.93l-45.25-45.25c-18.76-18.76-49.18-18.76-67.95 0l-46.02 46.01 113.2 113.2 46.02-46.03zM316.08 82.71l-297 296.96L.32 487.11c-2.53 14.49 10.09 27.11 24.59 24.56l107.45-18.84L429.28 195.9 316.08 82.71zm186.63 285.43l-33.64-33.64-61.68 61.68c-3.1 3.1-8.12 3.1-11.21 0l-11.21-11.21c-3.09-3.1-3.09-8.12 0-11.21l61.68-61.68-44.14-44.14L267.93 402.5l100.21 100.2c12.39 12.39 32.47 12.39 44.86 0l89.71-89.7c12.39-12.39 12.39-32.47 0-44.86z"]},Xh={prefix:"fas",iconName:"people-arrows",icon:[576,512,[],"e068","M96,128A64,64,0,1,0,32,64,64,64,0,0,0,96,128Zm0,176.08a44.11,44.11,0,0,1,13.64-32L181.77,204c1.65-1.55,3.77-2.31,5.61-3.57A63.91,63.91,0,0,0,128,160H64A64,64,0,0,0,0,224v96a32,32,0,0,0,32,32V480a32,32,0,0,0,32,32h64a32,32,0,0,0,32-32V383.61l-50.36-47.53A44.08,44.08,0,0,1,96,304.08ZM480,128a64,64,0,1,0-64-64A64,64,0,0,0,480,128Zm32,32H448a63.91,63.91,0,0,0-59.38,40.42c1.84,1.27,4,2,5.62,3.59l72.12,68.06a44.37,44.37,0,0,1,0,64L416,383.62V480a32,32,0,0,0,32,32h64a32,32,0,0,0,32-32V352a32,32,0,0,0,32-32V224A64,64,0,0,0,512,160ZM444.4,295.34l-72.12-68.06A12,12,0,0,0,352,236v36H224V236a12,12,0,0,0-20.28-8.73L131.6,295.34a12.4,12.4,0,0,0,0,17.47l72.12,68.07A12,12,0,0,0,224,372.14V336H352v36.14a12,12,0,0,0,20.28,8.74l72.12-68.07A12.4,12.4,0,0,0,444.4,295.34Z"]},Zh={prefix:"fas",iconName:"people-carry",icon:[640,512,[],"f4ce","M128 96c26.5 0 48-21.5 48-48S154.5 0 128 0 80 21.5 80 48s21.5 48 48 48zm384 0c26.5 0 48-21.5 48-48S538.5 0 512 0s-48 21.5-48 48 21.5 48 48 48zm125.7 372.1l-44-110-41.1 46.4-2 18.2 27.7 69.2c5 12.5 17 20.1 29.7 20.1 4 0 8-.7 11.9-2.3 16.4-6.6 24.4-25.2 17.8-41.6zm-34.2-209.8L585 178.1c-4.6-20-18.6-36.8-37.5-44.9-18.5-8-39-6.7-56.1 3.3-22.7 13.4-39.7 34.5-48.1 59.4L432 229.8 416 240v-96c0-8.8-7.2-16-16-16H240c-8.8 0-16 7.2-16 16v96l-16.1-10.2-11.3-33.9c-8.3-25-25.4-46-48.1-59.4-17.2-10-37.6-11.3-56.1-3.3-18.9 8.1-32.9 24.9-37.5 44.9l-18.4 80.2c-4.6 20 .7 41.2 14.4 56.7l67.2 75.9 10.1 92.6C130 499.8 143.8 512 160 512c1.2 0 2.3-.1 3.5-.2 17.6-1.9 30.2-17.7 28.3-35.3l-10.1-92.8c-1.5-13-6.9-25.1-15.6-35l-43.3-49 17.6-70.3 6.8 20.4c4.1 12.5 11.9 23.4 24.5 32.6l51.1 32.5c4.6 2.9 12.1 4.6 17.2 5h160c5.1-.4 12.6-2.1 17.2-5l51.1-32.5c12.6-9.2 20.4-20 24.5-32.6l6.8-20.4 17.6 70.3-43.3 49c-8.7 9.9-14.1 22-15.6 35l-10.1 92.8c-1.9 17.6 10.8 33.4 28.3 35.3 1.2.1 2.3.2 3.5.2 16.1 0 30-12.1 31.8-28.5l10.1-92.6 67.2-75.9c13.6-15.5 19-36.7 14.4-56.7zM46.3 358.1l-44 110c-6.6 16.4 1.4 35 17.8 41.6 16.8 6.6 35.1-1.7 41.6-17.8l27.7-69.2-2-18.2-41.1-46.4z"]},Qh={prefix:"fas",iconName:"pepper-hot",icon:[512,512,[],"f816","M330.67 263.12V173.4l-52.75-24.22C219.44 218.76 197.58 400 56 400a56 56 0 0 0 0 112c212.64 0 370.65-122.87 419.18-210.34l-37.05-38.54zm131.09-128.37C493.92 74.91 477.18 26.48 458.62 3a8 8 0 0 0-11.93-.59l-22.9 23a8.06 8.06 0 0 0-.89 10.23c6.86 10.36 17.05 35.1-1.4 72.32A142.85 142.85 0 0 0 364.34 96c-28 0-54 8.54-76.34 22.59l74.67 34.29v78.24h89.09L506.44 288c3.26-12.62 5.56-25.63 5.56-39.31a154 154 0 0 0-50.24-113.94z"]},Jh={prefix:"fas",iconName:"percent",icon:[448,512,[],"f295","M112 224c61.9 0 112-50.1 112-112S173.9 0 112 0 0 50.1 0 112s50.1 112 112 112zm0-160c26.5 0 48 21.5 48 48s-21.5 48-48 48-48-21.5-48-48 21.5-48 48-48zm224 224c-61.9 0-112 50.1-112 112s50.1 112 112 112 112-50.1 112-112-50.1-112-112-112zm0 160c-26.5 0-48-21.5-48-48s21.5-48 48-48 48 21.5 48 48-21.5 48-48 48zM392.3.2l31.6-.1c19.4-.1 30.9 21.8 19.7 37.8L77.4 501.6a23.95 23.95 0 0 1-19.6 10.2l-33.4.1c-19.5 0-30.9-21.9-19.7-37.8l368-463.7C377.2 4 384.5.2 392.3.2z"]},ed={prefix:"fas",iconName:"percentage",icon:[384,512,[],"f541","M109.25 173.25c24.99-24.99 24.99-65.52 0-90.51-24.99-24.99-65.52-24.99-90.51 0-24.99 24.99-24.99 65.52 0 90.51 25 25 65.52 25 90.51 0zm256 165.49c-24.99-24.99-65.52-24.99-90.51 0-24.99 24.99-24.99 65.52 0 90.51 24.99 24.99 65.52 24.99 90.51 0 25-24.99 25-65.51 0-90.51zm-1.94-231.43l-22.62-22.62c-12.5-12.5-32.76-12.5-45.25 0L20.69 359.44c-12.5 12.5-12.5 32.76 0 45.25l22.62 22.62c12.5 12.5 32.76 12.5 45.25 0l274.75-274.75c12.5-12.49 12.5-32.75 0-45.25z"]},td={prefix:"fas",iconName:"person-booth",icon:[576,512,[],"f756","M192 496c0 8.8 7.2 16 16 16h32c8.8 0 16-7.2 16-16V320h-64v176zm32-272h-50.9l-45.2-45.3C115.8 166.6 99.7 160 82.7 160H64c-17.1 0-33.2 6.7-45.3 18.8C6.7 190.9 0 207 0 224.1L.2 320 0 480c0 17.7 14.3 32 31.9 32 17.6 0 32-14.3 32-32l.1-100.7c.9.5 1.6 1.3 2.5 1.7l29.1 43v56c0 17.7 14.3 32 32 32s32-14.3 32-32v-56.5c0-9.9-2.3-19.8-6.7-28.6l-41.2-61.3V253l20.9 20.9c9.1 9.1 21.1 14.1 33.9 14.1H224c17.7 0 32-14.3 32-32s-14.3-32-32-32zM64 128c26.5 0 48-21.5 48-48S90.5 32 64 32 16 53.5 16 80s21.5 48 48 48zm224-96l31.5 223.1-30.9 154.6c-4.3 21.6 13 38.3 31.4 38.3 15.2 0 28-9.1 32.3-30.4.9 16.9 14.6 30.4 31.7 30.4 17.7 0 32-14.3 32-32 0 17.7 14.3 32 32 32s32-14.3 32-32V0H288v32zm-96 0v160h64V0h-32c-17.7 0-32 14.3-32 32zM544 0h-32v496c0 8.8 7.2 16 16 16h32c8.8 0 16-7.2 16-16V32c0-17.7-14.3-32-32-32z"]},id={prefix:"fas",iconName:"phone",icon:[512,512,[],"f095","M493.4 24.6l-104-24c-11.3-2.6-22.9 3.3-27.5 13.9l-48 112c-4.2 9.8-1.4 21.3 6.9 28l60.6 49.6c-36 76.7-98.9 140.5-177.2 177.2l-49.6-60.6c-6.8-8.3-18.2-11.1-28-6.9l-112 48C3.9 366.5-2 378.1.6 389.4l24 104C27.1 504.2 36.7 512 48 512c256.1 0 464-207.5 464-464 0-11.2-7.7-20.9-18.6-23.4z"]},nd={prefix:"fas",iconName:"phone-alt",icon:[512,512,[],"f879","M497.39 361.8l-112-48a24 24 0 0 0-28 6.9l-49.6 60.6A370.66 370.66 0 0 1 130.6 204.11l60.6-49.6a23.94 23.94 0 0 0 6.9-28l-48-112A24.16 24.16 0 0 0 122.6.61l-104 24A24 24 0 0 0 0 48c0 256.5 207.9 464 464 464a24 24 0 0 0 23.4-18.6l24-104a24.29 24.29 0 0 0-14.01-27.6z"]},sd={prefix:"fas",iconName:"phone-slash",icon:[640,512,[],"f3dd","M268.2 381.4l-49.6-60.6c-6.8-8.3-18.2-11.1-28-6.9l-112 48c-10.7 4.6-16.5 16.1-13.9 27.5l24 104c2.5 10.8 12.1 18.6 23.4 18.6 100.7 0 193.7-32.4 269.7-86.9l-80-61.8c-10.9 6.5-22.1 12.7-33.6 18.1zm365.6 76.7L475.1 335.5C537.9 256.4 576 156.9 576 48c0-11.2-7.7-20.9-18.6-23.4l-104-24c-11.3-2.6-22.9 3.3-27.5 13.9l-48 112c-4.2 9.8-1.4 21.3 6.9 28l60.6 49.6c-12.2 26.1-27.9 50.3-46 72.8L45.5 3.4C38.5-2 28.5-.8 23 6.2L3.4 31.4c-5.4 7-4.2 17 2.8 22.4l588.4 454.7c7 5.4 17 4.2 22.5-2.8l19.6-25.3c5.4-6.8 4.1-16.9-2.9-22.3z"]},rd={prefix:"fas",iconName:"phone-square",icon:[448,512,[],"f098","M400 32H48C21.49 32 0 53.49 0 80v352c0 26.51 21.49 48 48 48h352c26.51 0 48-21.49 48-48V80c0-26.51-21.49-48-48-48zM94 416c-7.033 0-13.057-4.873-14.616-11.627l-14.998-65a15 15 0 0 1 8.707-17.16l69.998-29.999a15 15 0 0 1 17.518 4.289l30.997 37.885c48.944-22.963 88.297-62.858 110.781-110.78l-37.886-30.997a15.001 15.001 0 0 1-4.289-17.518l30-69.998a15 15 0 0 1 17.16-8.707l65 14.998A14.997 14.997 0 0 1 384 126c0 160.292-129.945 290-290 290z"]},od={prefix:"fas",iconName:"phone-square-alt",icon:[448,512,[],"f87b","M400 32H48A48 48 0 0 0 0 80v352a48 48 0 0 0 48 48h352a48 48 0 0 0 48-48V80a48 48 0 0 0-48-48zm-16.39 307.37l-15 65A15 15 0 0 1 354 416C194 416 64 286.29 64 126a15.7 15.7 0 0 1 11.63-14.61l65-15A18.23 18.23 0 0 1 144 96a16.27 16.27 0 0 1 13.79 9.09l30 70A17.9 17.9 0 0 1 189 181a17 17 0 0 1-5.5 11.61l-37.89 31a231.91 231.91 0 0 0 110.78 110.78l31-37.89A17 17 0 0 1 299 291a17.85 17.85 0 0 1 5.91 1.21l70 30A16.25 16.25 0 0 1 384 336a17.41 17.41 0 0 1-.39 3.37z"]},ad={prefix:"fas",iconName:"phone-volume",icon:[384,512,[],"f2a0","M97.333 506.966c-129.874-129.874-129.681-340.252 0-469.933 5.698-5.698 14.527-6.632 21.263-2.422l64.817 40.513a17.187 17.187 0 0 1 6.849 20.958l-32.408 81.021a17.188 17.188 0 0 1-17.669 10.719l-55.81-5.58c-21.051 58.261-20.612 122.471 0 179.515l55.811-5.581a17.188 17.188 0 0 1 17.669 10.719l32.408 81.022a17.188 17.188 0 0 1-6.849 20.958l-64.817 40.513a17.19 17.19 0 0 1-21.264-2.422zM247.126 95.473c11.832 20.047 11.832 45.008 0 65.055-3.95 6.693-13.108 7.959-18.718 2.581l-5.975-5.726c-3.911-3.748-4.793-9.622-2.261-14.41a32.063 32.063 0 0 0 0-29.945c-2.533-4.788-1.65-10.662 2.261-14.41l5.975-5.726c5.61-5.378 14.768-4.112 18.718 2.581zm91.787-91.187c60.14 71.604 60.092 175.882 0 247.428-4.474 5.327-12.53 5.746-17.552.933l-5.798-5.557c-4.56-4.371-4.977-11.529-.93-16.379 49.687-59.538 49.646-145.933 0-205.422-4.047-4.85-3.631-12.008.93-16.379l5.798-5.557c5.022-4.813 13.078-4.394 17.552.933zm-45.972 44.941c36.05 46.322 36.108 111.149 0 157.546-4.39 5.641-12.697 6.251-17.856 1.304l-5.818-5.579c-4.4-4.219-4.998-11.095-1.285-15.931 26.536-34.564 26.534-82.572 0-117.134-3.713-4.836-3.115-11.711 1.285-15.931l5.818-5.579c5.159-4.947 13.466-4.337 17.856 1.304z"]},ld={prefix:"fas",iconName:"photo-video",icon:[640,512,[],"f87c","M608 0H160a32 32 0 0 0-32 32v96h160V64h192v320h128a32 32 0 0 0 32-32V32a32 32 0 0 0-32-32zM232 103a9 9 0 0 1-9 9h-30a9 9 0 0 1-9-9V73a9 9 0 0 1 9-9h30a9 9 0 0 1 9 9zm352 208a9 9 0 0 1-9 9h-30a9 9 0 0 1-9-9v-30a9 9 0 0 1 9-9h30a9 9 0 0 1 9 9zm0-104a9 9 0 0 1-9 9h-30a9 9 0 0 1-9-9v-30a9 9 0 0 1 9-9h30a9 9 0 0 1 9 9zm0-104a9 9 0 0 1-9 9h-30a9 9 0 0 1-9-9V73a9 9 0 0 1 9-9h30a9 9 0 0 1 9 9zm-168 57H32a32 32 0 0 0-32 32v288a32 32 0 0 0 32 32h384a32 32 0 0 0 32-32V192a32 32 0 0 0-32-32zM96 224a32 32 0 1 1-32 32 32 32 0 0 1 32-32zm288 224H64v-32l64-64 32 32 128-128 96 96z"]},cd={prefix:"fas",iconName:"piggy-bank",icon:[576,512,[],"f4d3","M560 224h-29.5c-8.8-20-21.6-37.7-37.4-52.5L512 96h-32c-29.4 0-55.4 13.5-73 34.3-7.6-1.1-15.1-2.3-23-2.3H256c-77.4 0-141.9 55-156.8 128H56c-14.8 0-26.5-13.5-23.5-28.8C34.7 215.8 45.4 208 57 208h1c3.3 0 6-2.7 6-6v-20c0-3.3-2.7-6-6-6-28.5 0-53.9 20.4-57.5 48.6C-3.9 258.8 22.7 288 56 288h40c0 52.2 25.4 98.1 64 127.3V496c0 8.8 7.2 16 16 16h64c8.8 0 16-7.2 16-16v-48h128v48c0 8.8 7.2 16 16 16h64c8.8 0 16-7.2 16-16v-80.7c11.8-8.9 22.3-19.4 31.3-31.3H560c8.8 0 16-7.2 16-16V240c0-8.8-7.2-16-16-16zm-128 64c-8.8 0-16-7.2-16-16s7.2-16 16-16 16 7.2 16 16-7.2 16-16 16zM256 96h128c5.4 0 10.7.4 15.9.8 0-.3.1-.5.1-.8 0-53-43-96-96-96s-96 43-96 96c0 2.1.5 4.1.6 6.2 15.2-3.9 31-6.2 47.4-6.2z"]},hd={prefix:"fas",iconName:"pills",icon:[576,512,[],"f484","M112 32C50.1 32 0 82.1 0 144v224c0 61.9 50.1 112 112 112s112-50.1 112-112V144c0-61.9-50.1-112-112-112zm48 224H64V144c0-26.5 21.5-48 48-48s48 21.5 48 48v112zm139.7-29.7c-3.5-3.5-9.4-3.1-12.3.8-45.3 62.5-40.4 150.1 15.9 206.4 56.3 56.3 143.9 61.2 206.4 15.9 4-2.9 4.3-8.8.8-12.3L299.7 226.3zm229.8-19c-56.3-56.3-143.9-61.2-206.4-15.9-4 2.9-4.3 8.8-.8 12.3l210.8 210.8c3.5 3.5 9.4 3.1 12.3-.8 45.3-62.6 40.5-150.1-15.9-206.4z"]},dd={prefix:"fas",iconName:"pizza-slice",icon:[512,512,[],"f818","M158.87.15c-16.16-1.52-31.2 8.42-35.33 24.12l-14.81 56.27c187.62 5.49 314.54 130.61 322.48 317l56.94-15.78c15.72-4.36 25.49-19.68 23.62-35.9C490.89 165.08 340.78 17.32 158.87.15zm-58.47 112L.55 491.64a16.21 16.21 0 0 0 20 19.75l379-105.1c-4.27-174.89-123.08-292.14-299.15-294.1zM128 416a32 32 0 1 1 32-32 32 32 0 0 1-32 32zm48-152a32 32 0 1 1 32-32 32 32 0 0 1-32 32zm104 104a32 32 0 1 1 32-32 32 32 0 0 1-32 32z"]},ud={prefix:"fas",iconName:"place-of-worship",icon:[640,512,[],"f67f","M620.61 366.55L512 320v192h112c8.84 0 16-7.16 16-16V395.96a32 32 0 0 0-19.39-29.41zM0 395.96V496c0 8.84 7.16 16 16 16h112V320L19.39 366.55A32 32 0 0 0 0 395.96zm464.46-149.28L416 217.6V102.63c0-8.49-3.37-16.62-9.38-22.63L331.31 4.69c-6.25-6.25-16.38-6.25-22.62 0L233.38 80c-6 6-9.38 14.14-9.38 22.63V217.6l-48.46 29.08A31.997 31.997 0 0 0 160 274.12V512h96v-96c0-35.35 28.66-64 64-64s64 28.65 64 64v96h96V274.12c0-11.24-5.9-21.66-15.54-27.44z"]},pd={prefix:"fas",iconName:"plane",icon:[576,512,[],"f072","M480 192H365.71L260.61 8.06A16.014 16.014 0 0 0 246.71 0h-65.5c-10.63 0-18.3 10.17-15.38 20.39L214.86 192H112l-43.2-57.6c-3.02-4.03-7.77-6.4-12.8-6.4H16.01C5.6 128-2.04 137.78.49 147.88L32 256 .49 364.12C-2.04 374.22 5.6 384 16.01 384H56c5.04 0 9.78-2.37 12.8-6.4L112 320h102.86l-49.03 171.6c-2.92 10.22 4.75 20.4 15.38 20.4h65.5c5.74 0 11.04-3.08 13.89-8.06L365.71 320H480c35.35 0 96-28.65 96-64s-60.65-64-96-64z"]},gd={prefix:"fas",iconName:"plane-arrival",icon:[640,512,[],"f5af","M624 448H16c-8.84 0-16 7.16-16 16v32c0 8.84 7.16 16 16 16h608c8.84 0 16-7.16 16-16v-32c0-8.84-7.16-16-16-16zM44.81 205.66l88.74 80a62.607 62.607 0 0 0 25.47 13.93l287.6 78.35c26.48 7.21 54.56 8.72 81 1.36 29.67-8.27 43.44-21.21 47.25-35.71 3.83-14.5-1.73-32.71-23.37-54.96-19.28-19.82-44.35-32.79-70.83-40l-97.51-26.56L282.8 30.22c-1.51-5.81-5.95-10.35-11.66-11.91L206.05.58c-10.56-2.88-20.9 5.32-20.71 16.44l47.92 164.21-102.2-27.84-27.59-67.88c-1.93-4.89-6.01-8.57-11.02-9.93L52.72 64.75c-10.34-2.82-20.53 5-20.72 15.88l.23 101.78c.19 8.91 6.03 17.34 12.58 23.25z"]},fd={prefix:"fas",iconName:"plane-departure",icon:[640,512,[],"f5b0","M624 448H16c-8.84 0-16 7.16-16 16v32c0 8.84 7.16 16 16 16h608c8.84 0 16-7.16 16-16v-32c0-8.84-7.16-16-16-16zM80.55 341.27c6.28 6.84 15.1 10.72 24.33 10.71l130.54-.18a65.62 65.62 0 0 0 29.64-7.12l290.96-147.65c26.74-13.57 50.71-32.94 67.02-58.31 18.31-28.48 20.3-49.09 13.07-63.65-7.21-14.57-24.74-25.27-58.25-27.45-29.85-1.94-59.54 5.92-86.28 19.48l-98.51 49.99-218.7-82.06a17.799 17.799 0 0 0-18-1.11L90.62 67.29c-10.67 5.41-13.25 19.65-5.17 28.53l156.22 98.1-103.21 52.38-72.35-36.47a17.804 17.804 0 0 0-16.07.02L9.91 230.22c-10.44 5.3-13.19 19.12-5.57 28.08l76.21 82.97z"]},md={prefix:"fas",iconName:"plane-slash",icon:[640,512,[],"e069","M32.48,147.88,64,256,32.48,364.13A16,16,0,0,0,48,384H88a16,16,0,0,0,12.8-6.41L144,320H246.85l-49,171.59A16,16,0,0,0,213.2,512h65.5a16,16,0,0,0,13.89-8.06l66.6-116.54L34.35,136.34A15.47,15.47,0,0,0,32.48,147.88ZM633.82,458.09,455.14,320H512c35.34,0,96-28.66,96-64s-60.66-64-96-64H397.7L292.61,8.06C290.06,3.61,283.84,0,278.71,0H213.2a16,16,0,0,0-15.38,20.39l36.94,129.29L45.46,3.38A16,16,0,0,0,23,6.19L3.37,31.45A16,16,0,0,0,6.18,53.91L594.54,508.63A16,16,0,0,0,617,505.81l19.64-25.26A16,16,0,0,0,633.82,458.09Z"]},vd={prefix:"fas",iconName:"play",icon:[448,512,[],"f04b","M424.4 214.7L72.4 6.6C43.8-10.3 0 6.1 0 47.9V464c0 37.5 40.7 60.1 72.4 41.3l352-208c31.4-18.5 31.5-64.1 0-82.6z"]},yd={prefix:"fas",iconName:"play-circle",icon:[512,512,[],"f144","M256 8C119 8 8 119 8 256s111 248 248 248 248-111 248-248S393 8 256 8zm115.7 272l-176 101c-15.8 8.8-35.7-2.5-35.7-21V152c0-18.4 19.8-29.8 35.7-21l176 107c16.4 9.2 16.4 32.9 0 42z"]},Cd={prefix:"fas",iconName:"plug",icon:[384,512,[],"f1e6","M320,32a32,32,0,0,0-64,0v96h64Zm48,128H16A16,16,0,0,0,0,176v32a16,16,0,0,0,16,16H32v32A160.07,160.07,0,0,0,160,412.8V512h64V412.8A160.07,160.07,0,0,0,352,256V224h16a16,16,0,0,0,16-16V176A16,16,0,0,0,368,160ZM128,32a32,32,0,0,0-64,0v96h64Z"]},bd={prefix:"fas",iconName:"plus",icon:[448,512,[],"f067","M416 208H272V64c0-17.67-14.33-32-32-32h-32c-17.67 0-32 14.33-32 32v144H32c-17.67 0-32 14.33-32 32v32c0 17.67 14.33 32 32 32h144v144c0 17.67 14.33 32 32 32h32c17.67 0 32-14.33 32-32V304h144c17.67 0 32-14.33 32-32v-32c0-17.67-14.33-32-32-32z"]},Sd={prefix:"fas",iconName:"plus-circle",icon:[512,512,[],"f055","M256 8C119 8 8 119 8 256s111 248 248 248 248-111 248-248S393 8 256 8zm144 276c0 6.6-5.4 12-12 12h-92v92c0 6.6-5.4 12-12 12h-56c-6.6 0-12-5.4-12-12v-92h-92c-6.6 0-12-5.4-12-12v-56c0-6.6 5.4-12 12-12h92v-92c0-6.6 5.4-12 12-12h56c6.6 0 12 5.4 12 12v92h92c6.6 0 12 5.4 12 12v56z"]},wd={prefix:"fas",iconName:"plus-square",icon:[448,512,[],"f0fe","M400 32H48C21.5 32 0 53.5 0 80v352c0 26.5 21.5 48 48 48h352c26.5 0 48-21.5 48-48V80c0-26.5-21.5-48-48-48zm-32 252c0 6.6-5.4 12-12 12h-92v92c0 6.6-5.4 12-12 12h-56c-6.6 0-12-5.4-12-12v-92H92c-6.6 0-12-5.4-12-12v-56c0-6.6 5.4-12 12-12h92v-92c0-6.6 5.4-12 12-12h56c6.6 0 12 5.4 12 12v92h92c6.6 0 12 5.4 12 12v56z"]},xd={prefix:"fas",iconName:"podcast",icon:[448,512,[],"f2ce","M267.429 488.563C262.286 507.573 242.858 512 224 512c-18.857 0-38.286-4.427-43.428-23.437C172.927 460.134 160 388.898 160 355.75c0-35.156 31.142-43.75 64-43.75s64 8.594 64 43.75c0 32.949-12.871 104.179-20.571 132.813zM156.867 288.554c-18.693-18.308-29.958-44.173-28.784-72.599 2.054-49.724 42.395-89.956 92.124-91.881C274.862 121.958 320 165.807 320 220c0 26.827-11.064 51.116-28.866 68.552-2.675 2.62-2.401 6.986.628 9.187 9.312 6.765 16.46 15.343 21.234 25.363 1.741 3.654 6.497 4.66 9.449 1.891 28.826-27.043 46.553-65.783 45.511-108.565-1.855-76.206-63.595-138.208-139.793-140.369C146.869 73.753 80 139.215 80 220c0 41.361 17.532 78.7 45.55 104.989 2.953 2.771 7.711 1.77 9.453-1.887 4.774-10.021 11.923-18.598 21.235-25.363 3.029-2.2 3.304-6.566.629-9.185zM224 0C100.204 0 0 100.185 0 224c0 89.992 52.602 165.647 125.739 201.408 4.333 2.118 9.267-1.544 8.535-6.31-2.382-15.512-4.342-30.946-5.406-44.339-.146-1.836-1.149-3.486-2.678-4.512-47.4-31.806-78.564-86.016-78.187-147.347.592-96.237 79.29-174.648 175.529-174.899C320.793 47.747 400 126.797 400 224c0 61.932-32.158 116.49-80.65 147.867-.999 14.037-3.069 30.588-5.624 47.23-.732 4.767 4.203 8.429 8.535 6.31C395.227 389.727 448 314.187 448 224 448 100.205 347.815 0 224 0zm0 160c-35.346 0-64 28.654-64 64s28.654 64 64 64 64-28.654 64-64-28.654-64-64-64z"]},Ed={prefix:"fas",iconName:"poll",icon:[448,512,[],"f681","M400 32H48C21.5 32 0 53.5 0 80v352c0 26.5 21.5 48 48 48h352c26.5 0 48-21.5 48-48V80c0-26.5-21.5-48-48-48zM160 368c0 8.84-7.16 16-16 16h-32c-8.84 0-16-7.16-16-16V240c0-8.84 7.16-16 16-16h32c8.84 0 16 7.16 16 16v128zm96 0c0 8.84-7.16 16-16 16h-32c-8.84 0-16-7.16-16-16V144c0-8.84 7.16-16 16-16h32c8.84 0 16 7.16 16 16v224zm96 0c0 8.84-7.16 16-16 16h-32c-8.84 0-16-7.16-16-16v-64c0-8.84 7.16-16 16-16h32c8.84 0 16 7.16 16 16v64z"]},Md={prefix:"fas",iconName:"poll-h",icon:[448,512,[],"f682","M448 432V80c0-26.5-21.5-48-48-48H48C21.5 32 0 53.5 0 80v352c0 26.5 21.5 48 48 48h352c26.5 0 48-21.5 48-48zM112 192c-8.84 0-16-7.16-16-16v-32c0-8.84 7.16-16 16-16h128c8.84 0 16 7.16 16 16v32c0 8.84-7.16 16-16 16H112zm0 96c-8.84 0-16-7.16-16-16v-32c0-8.84 7.16-16 16-16h224c8.84 0 16 7.16 16 16v32c0 8.84-7.16 16-16 16H112zm0 96c-8.84 0-16-7.16-16-16v-32c0-8.84 7.16-16 16-16h64c8.84 0 16 7.16 16 16v32c0 8.84-7.16 16-16 16h-64z"]},Ad={prefix:"fas",iconName:"poo",icon:[512,512,[],"f2fe","M451.4 369.1C468.7 356 480 335.4 480 312c0-39.8-32.2-72-72-72h-14.1c13.4-11.7 22.1-28.8 22.1-48 0-35.3-28.7-64-64-64h-5.9c3.6-10.1 5.9-20.7 5.9-32 0-53-43-96-96-96-5.2 0-10.2.7-15.1 1.5C250.3 14.6 256 30.6 256 48c0 44.2-35.8 80-80 80h-16c-35.3 0-64 28.7-64 64 0 19.2 8.7 36.3 22.1 48H104c-39.8 0-72 32.2-72 72 0 23.4 11.3 44 28.6 57.1C26.3 374.6 0 404.1 0 440c0 39.8 32.2 72 72 72h368c39.8 0 72-32.2 72-72 0-35.9-26.3-65.4-60.6-70.9zM192 256c17.7 0 32 14.3 32 32s-14.3 32-32 32-32-14.3-32-32 14.3-32 32-32zm159.5 139C341 422.9 293 448 256 448s-85-25.1-95.5-53c-2-5.3 2-11 7.8-11h175.4c5.8 0 9.8 5.7 7.8 11zM320 320c-17.7 0-32-14.3-32-32s14.3-32 32-32 32 14.3 32 32-14.3 32-32 32z"]},Td={prefix:"fas",iconName:"poo-storm",icon:[448,512,[],"f75a","M308 336h-57.7l17.3-64.9c2-7.6-3.7-15.1-11.6-15.1h-68c-6 0-11.1 4.5-11.9 10.4l-16 120c-1 7.2 4.6 13.6 11.9 13.6h59.3l-23 97.2c-1.8 7.6 4 14.8 11.7 14.8 4.2 0 8.2-2.2 10.4-6l88-152c4.6-8-1.2-18-10.4-18zm66.4-111.3c5.9-9.6 9.6-20.6 9.6-32.7 0-35.3-28.7-64-64-64h-5.9c3.6-10.1 5.9-20.7 5.9-32 0-53-43-96-96-96-5.2 0-10.2.7-15.1 1.5C218.3 14.6 224 30.6 224 48c0 44.2-35.8 80-80 80h-16c-35.3 0-64 28.7-64 64 0 12.1 3.7 23.1 9.6 32.7C32.6 228 0 262.2 0 304c0 44 36 80 80 80h48.3c.1-.6 0-1.2 0-1.8l16-120c3-21.8 21.7-38.2 43.7-38.2h68c13.8 0 26.5 6.3 34.9 17.2s11.2 24.8 7.6 38.1l-6.6 24.7h16c15.7 0 30.3 8.4 38.1 22 7.8 13.6 7.8 30.5 0 44l-8.1 14h30c44 0 80-36 80-80 .1-41.8-32.5-76-73.5-79.3z"]},Dd={prefix:"fas",iconName:"poop",icon:[512,512,[],"f619","M451.36 369.14C468.66 355.99 480 335.41 480 312c0-39.77-32.24-72-72-72h-14.07c13.42-11.73 22.07-28.78 22.07-48 0-35.35-28.65-64-64-64h-5.88c3.57-10.05 5.88-20.72 5.88-32 0-53.02-42.98-96-96-96-5.17 0-10.15.74-15.11 1.52C250.31 14.64 256 30.62 256 48c0 44.18-35.82 80-80 80h-16c-35.35 0-64 28.65-64 64 0 19.22 8.65 36.27 22.07 48H104c-39.76 0-72 32.23-72 72 0 23.41 11.34 43.99 28.64 57.14C26.31 374.62 0 404.12 0 440c0 39.76 32.24 72 72 72h368c39.76 0 72-32.24 72-72 0-35.88-26.31-65.38-60.64-70.86z"]},Id={prefix:"fas",iconName:"portrait",icon:[384,512,[],"f3e0","M336 0H48C21.5 0 0 21.5 0 48v416c0 26.5 21.5 48 48 48h288c26.5 0 48-21.5 48-48V48c0-26.5-21.5-48-48-48zM192 128c35.3 0 64 28.7 64 64s-28.7 64-64 64-64-28.7-64-64 28.7-64 64-64zm112 236.8c0 10.6-10 19.2-22.4 19.2H102.4C90 384 80 375.4 80 364.8v-19.2c0-31.8 30.1-57.6 67.2-57.6h5c12.3 5.1 25.7 8 39.8 8s27.6-2.9 39.8-8h5c37.1 0 67.2 25.8 67.2 57.6v19.2z"]},Rd={prefix:"fas",iconName:"pound-sign",icon:[320,512,[],"f154","M308 352h-45.495c-6.627 0-12 5.373-12 12v50.848H128V288h84c6.627 0 12-5.373 12-12v-40c0-6.627-5.373-12-12-12h-84v-63.556c0-32.266 24.562-57.086 61.792-57.086 23.658 0 45.878 11.505 57.652 18.849 5.151 3.213 11.888 2.051 15.688-2.685l28.493-35.513c4.233-5.276 3.279-13.005-2.119-17.081C273.124 54.56 236.576 32 187.931 32 106.026 32 48 84.742 48 157.961V224H20c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h28v128H12c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h296c6.627 0 12-5.373 12-12V364c0-6.627-5.373-12-12-12z"]},Ld={prefix:"fas",iconName:"power-off",icon:[512,512,[],"f011","M400 54.1c63 45 104 118.6 104 201.9 0 136.8-110.8 247.7-247.5 248C120 504.3 8.2 393 8 256.4 7.9 173.1 48.9 99.3 111.8 54.2c11.7-8.3 28-4.8 35 7.7L162.6 90c5.9 10.5 3.1 23.8-6.6 31-41.5 30.8-68 79.6-68 134.9-.1 92.3 74.5 168.1 168 168.1 91.6 0 168.6-74.2 168-169.1-.3-51.8-24.7-101.8-68.1-134-9.7-7.2-12.4-20.5-6.5-30.9l15.8-28.1c7-12.4 23.2-16.1 34.8-7.8zM296 264V24c0-13.3-10.7-24-24-24h-32c-13.3 0-24 10.7-24 24v240c0 13.3 10.7 24 24 24h32c13.3 0 24-10.7 24-24z"]},kd={prefix:"fas",iconName:"pray",icon:[384,512,[],"f683","M256 128c35.35 0 64-28.65 64-64S291.35 0 256 0s-64 28.65-64 64 28.65 64 64 64zm-30.63 169.75c14.06 16.72 39 19.09 55.97 5.22l88-72.02c17.09-13.98 19.59-39.19 5.62-56.28-13.97-17.11-39.19-19.59-56.31-5.62l-57.44 47-38.91-46.31c-15.44-18.39-39.22-27.92-64-25.33-24.19 2.48-45.25 16.27-56.37 36.92l-49.37 92.03c-23.4 43.64-8.69 96.37 34.19 123.75L131.56 432H40c-22.09 0-40 17.91-40 40s17.91 40 40 40h208c34.08 0 53.77-42.79 28.28-68.28L166.42 333.86l34.8-64.87 24.15 28.76z"]},Pd={prefix:"fas",iconName:"praying-hands",icon:[640,512,[],"f684","M272 191.91c-17.6 0-32 14.4-32 32v80c0 8.84-7.16 16-16 16s-16-7.16-16-16v-76.55c0-17.39 4.72-34.47 13.69-49.39l77.75-129.59c9.09-15.16 4.19-34.81-10.97-43.91-14.45-8.67-32.72-4.3-42.3 9.21-.2.23-.62.21-.79.48l-117.26 175.9C117.56 205.9 112 224.31 112 243.29v80.23l-90.12 30.04A31.974 31.974 0 0 0 0 383.91v96c0 10.82 8.52 32 32 32 2.69 0 5.41-.34 8.06-1.03l179.19-46.62C269.16 449.99 304 403.8 304 351.91v-128c0-17.6-14.4-32-32-32zm346.12 161.73L528 323.6v-80.23c0-18.98-5.56-37.39-16.12-53.23L394.62 14.25c-.18-.27-.59-.24-.79-.48-9.58-13.51-27.85-17.88-42.3-9.21-15.16 9.09-20.06 28.75-10.97 43.91l77.75 129.59c8.97 14.92 13.69 32 13.69 49.39V304c0 8.84-7.16 16-16 16s-16-7.16-16-16v-80c0-17.6-14.4-32-32-32s-32 14.4-32 32v128c0 51.89 34.84 98.08 84.75 112.34l179.19 46.62c2.66.69 5.38 1.03 8.06 1.03 23.48 0 32-21.18 32-32v-96c0-13.77-8.81-25.99-21.88-30.35z"]},Nd={prefix:"fas",iconName:"prescription",icon:[384,512,[],"f5b1","M301.26 352l78.06-78.06c6.25-6.25 6.25-16.38 0-22.63l-22.63-22.63c-6.25-6.25-16.38-6.25-22.63 0L256 306.74l-83.96-83.96C219.31 216.8 256 176.89 256 128c0-53.02-42.98-96-96-96H16C7.16 32 0 39.16 0 48v256c0 8.84 7.16 16 16 16h32c8.84 0 16-7.16 16-16v-80h18.75l128 128-78.06 78.06c-6.25 6.25-6.25 16.38 0 22.63l22.63 22.63c6.25 6.25 16.38 6.25 22.63 0L256 397.25l78.06 78.06c6.25 6.25 16.38 6.25 22.63 0l22.63-22.63c6.25-6.25 6.25-16.38 0-22.63L301.26 352zM64 96h96c17.64 0 32 14.36 32 32s-14.36 32-32 32H64V96z"]},Od={prefix:"fas",iconName:"prescription-bottle",icon:[384,512,[],"f485","M32 192h120c4.4 0 8 3.6 8 8v16c0 4.4-3.6 8-8 8H32v64h120c4.4 0 8 3.6 8 8v16c0 4.4-3.6 8-8 8H32v64h120c4.4 0 8 3.6 8 8v16c0 4.4-3.6 8-8 8H32v64c0 17.6 14.4 32 32 32h256c17.6 0 32-14.4 32-32V128H32v64zM360 0H24C10.8 0 0 10.8 0 24v48c0 13.2 10.8 24 24 24h336c13.2 0 24-10.8 24-24V24c0-13.2-10.8-24-24-24z"]},_d={prefix:"fas",iconName:"prescription-bottle-alt",icon:[384,512,[],"f486","M360 0H24C10.8 0 0 10.8 0 24v48c0 13.2 10.8 24 24 24h336c13.2 0 24-10.8 24-24V24c0-13.2-10.8-24-24-24zM32 480c0 17.6 14.4 32 32 32h256c17.6 0 32-14.4 32-32V128H32v352zm64-184c0-4.4 3.6-8 8-8h56v-56c0-4.4 3.6-8 8-8h48c4.4 0 8 3.6 8 8v56h56c4.4 0 8 3.6 8 8v48c0 4.4-3.6 8-8 8h-56v56c0 4.4-3.6 8-8 8h-48c-4.4 0-8-3.6-8-8v-56h-56c-4.4 0-8-3.6-8-8v-48z"]},Fd={prefix:"fas",iconName:"print",icon:[512,512,[],"f02f","M448 192V77.25c0-8.49-3.37-16.62-9.37-22.63L393.37 9.37c-6-6-14.14-9.37-22.63-9.37H96C78.33 0 64 14.33 64 32v160c-35.35 0-64 28.65-64 64v112c0 8.84 7.16 16 16 16h48v96c0 17.67 14.33 32 32 32h320c17.67 0 32-14.33 32-32v-96h48c8.84 0 16-7.16 16-16V256c0-35.35-28.65-64-64-64zm-64 256H128v-96h256v96zm0-224H128V64h192v48c0 8.84 7.16 16 16 16h48v96zm48 72c-13.25 0-24-10.75-24-24 0-13.26 10.75-24 24-24s24 10.74 24 24c0 13.25-10.75 24-24 24z"]},Gd={prefix:"fas",iconName:"procedures",icon:[640,512,[],"f487","M528 224H272c-8.8 0-16 7.2-16 16v144H64V144c0-8.8-7.2-16-16-16H16c-8.8 0-16 7.2-16 16v352c0 8.8 7.2 16 16 16h32c8.8 0 16-7.2 16-16v-48h512v48c0 8.8 7.2 16 16 16h32c8.8 0 16-7.2 16-16V336c0-61.9-50.1-112-112-112zM136 96h126.1l27.6 55.2c5.9 11.8 22.7 11.8 28.6 0L368 51.8 390.1 96H512c8.8 0 16-7.2 16-16s-7.2-16-16-16H409.9L382.3 8.8C376.4-3 359.6-3 353.7 8.8L304 108.2l-19.9-39.8c-1.4-2.7-4.1-4.4-7.2-4.4H136c-4.4 0-8 3.6-8 8v16c0 4.4 3.6 8 8 8zm24 256c35.3 0 64-28.7 64-64s-28.7-64-64-64-64 28.7-64 64 28.7 64 64 64z"]},Vd={prefix:"fas",iconName:"project-diagram",icon:[640,512,[],"f542","M384 320H256c-17.67 0-32 14.33-32 32v128c0 17.67 14.33 32 32 32h128c17.67 0 32-14.33 32-32V352c0-17.67-14.33-32-32-32zM192 32c0-17.67-14.33-32-32-32H32C14.33 0 0 14.33 0 32v128c0 17.67 14.33 32 32 32h95.72l73.16 128.04C211.98 300.98 232.4 288 256 288h.28L192 175.51V128h224V64H192V32zM608 0H480c-17.67 0-32 14.33-32 32v128c0 17.67 14.33 32 32 32h128c17.67 0 32-14.33 32-32V32c0-17.67-14.33-32-32-32z"]},Bd={prefix:"fas",iconName:"pump-medical",icon:[384,512,[],"e06a","M235.51,159.82H84.24A64,64,0,0,0,20.51,218L.14,442a64,64,0,0,0,63.74,69.8h192A64,64,0,0,0,319.61,442L299.24,218A64,64,0,0,0,235.51,159.82Zm4.37,173.33a13.35,13.35,0,0,1-13.34,13.34h-40v40a13.33,13.33,0,0,1-13.33,13.33H146.54a13.33,13.33,0,0,1-13.33-13.33v-40h-40a13.34,13.34,0,0,1-13.33-13.34V306.49a13.33,13.33,0,0,1,13.33-13.34h40v-40a13.33,13.33,0,0,1,13.33-13.33h26.67a13.33,13.33,0,0,1,13.33,13.33v40h40a13.34,13.34,0,0,1,13.34,13.34ZM379.19,93.88,335.87,50.56a64,64,0,0,0-45.24-18.74H223.88a32,32,0,0,0-32-32h-64a32,32,0,0,0-32,32v96h128v-32h66.75l43.31,43.31a16,16,0,0,0,22.63,0l22.62-22.62A16,16,0,0,0,379.19,93.88Z"]},Hd={prefix:"fas",iconName:"pump-soap",icon:[384,512,[],"e06b","M235.63,160H84.37a64,64,0,0,0-63.74,58.21L.27,442.21A64,64,0,0,0,64,512H256a64,64,0,0,0,63.74-69.79l-20.36-224A64,64,0,0,0,235.63,160ZM160,416c-33.12,0-60-26.33-60-58.75,0-25,35.7-75.47,52-97.27A10,10,0,0,1,168,260c16.33,21.8,52,72.27,52,97.27C220,389.67,193.12,416,160,416ZM379.31,94.06,336,50.74A64,64,0,0,0,290.75,32H224A32,32,0,0,0,192,0H128A32,32,0,0,0,96,32v96H224V96h66.75l43.31,43.31a16,16,0,0,0,22.63,0l22.62-22.62A16,16,0,0,0,379.31,94.06Z"]},zd={prefix:"fas",iconName:"puzzle-piece",icon:[576,512,[],"f12e","M519.442 288.651c-41.519 0-59.5 31.593-82.058 31.593C377.409 320.244 432 144 432 144s-196.288 80-196.288-3.297c0-35.827 36.288-46.25 36.288-85.985C272 19.216 243.885 0 210.539 0c-34.654 0-66.366 18.891-66.366 56.346 0 41.364 31.711 59.277 31.711 81.75C175.885 207.719 0 166.758 0 166.758v333.237s178.635 41.047 178.635-28.662c0-22.473-40-40.107-40-81.471 0-37.456 29.25-56.346 63.577-56.346 33.673 0 61.788 19.216 61.788 54.717 0 39.735-36.288 50.158-36.288 85.985 0 60.803 129.675 25.73 181.23 25.73 0 0-34.725-120.101 25.827-120.101 35.962 0 46.423 36.152 86.308 36.152C556.712 416 576 387.99 576 354.443c0-34.199-18.962-65.792-56.558-65.792z"]},Ud={prefix:"fas",iconName:"qrcode",icon:[448,512,[],"f029","M0 224h192V32H0v192zM64 96h64v64H64V96zm192-64v192h192V32H256zm128 128h-64V96h64v64zM0 480h192V288H0v192zm64-128h64v64H64v-64zm352-64h32v128h-96v-32h-32v96h-64V288h96v32h64v-32zm0 160h32v32h-32v-32zm-64 0h32v32h-32v-32z"]},Wd={prefix:"fas",iconName:"question",icon:[384,512,[],"f128","M202.021 0C122.202 0 70.503 32.703 29.914 91.026c-7.363 10.58-5.093 25.086 5.178 32.874l43.138 32.709c10.373 7.865 25.132 6.026 33.253-4.148 25.049-31.381 43.63-49.449 82.757-49.449 30.764 0 68.816 19.799 68.816 49.631 0 22.552-18.617 34.134-48.993 51.164-35.423 19.86-82.299 44.576-82.299 106.405V320c0 13.255 10.745 24 24 24h72.471c13.255 0 24-10.745 24-24v-5.773c0-42.86 125.268-44.645 125.268-160.627C377.504 66.256 286.902 0 202.021 0zM192 373.459c-38.196 0-69.271 31.075-69.271 69.271 0 38.195 31.075 69.27 69.271 69.27s69.271-31.075 69.271-69.271-31.075-69.27-69.271-69.27z"]},jd={prefix:"fas",iconName:"question-circle",icon:[512,512,[],"f059","M504 256c0 136.997-111.043 248-248 248S8 392.997 8 256C8 119.083 119.043 8 256 8s248 111.083 248 248zM262.655 90c-54.497 0-89.255 22.957-116.549 63.758-3.536 5.286-2.353 12.415 2.715 16.258l34.699 26.31c5.205 3.947 12.621 3.008 16.665-2.122 17.864-22.658 30.113-35.797 57.303-35.797 20.429 0 45.698 13.148 45.698 32.958 0 14.976-12.363 22.667-32.534 33.976C247.128 238.528 216 254.941 216 296v4c0 6.627 5.373 12 12 12h56c6.627 0 12-5.373 12-12v-1.333c0-28.462 83.186-29.647 83.186-106.667 0-58.002-60.165-102-116.531-102zM256 338c-25.365 0-46 20.635-46 46 0 25.364 20.635 46 46 46s46-20.636 46-46c0-25.365-20.635-46-46-46z"]},Kd={prefix:"fas",iconName:"quidditch",icon:[640,512,[],"f458","M256.5 216.8L343.2 326s-16.6 102.4-76.6 150.1C206.7 523.8 0 510.2 0 510.2s3.8-23.1 11-55.4l94.6-112.2c4-4.7-.9-11.6-6.6-9.5l-60.4 22.1c14.4-41.7 32.7-80 54.6-97.5 59.9-47.8 163.3-40.9 163.3-40.9zm238 135c-44 0-79.8 35.8-79.8 79.9 0 44.1 35.7 79.9 79.8 79.9 44.1 0 79.8-35.8 79.8-79.9 0-44.2-35.8-79.9-79.8-79.9zM636.5 31L616.7 6c-5.5-6.9-15.5-8-22.4-2.6L361.8 181.3l-34.1-43c-5.1-6.4-15.1-5.2-18.6 2.2l-25.3 54.6 86.7 109.2 58.8-12.4c8-1.7 11.4-11.2 6.3-17.6l-34.1-42.9L634 53.5c6.9-5.5 8-15.6 2.5-22.5z"]},$d={prefix:"fas",iconName:"quote-left",icon:[512,512,[],"f10d","M464 256h-80v-64c0-35.3 28.7-64 64-64h8c13.3 0 24-10.7 24-24V56c0-13.3-10.7-24-24-24h-8c-88.4 0-160 71.6-160 160v240c0 26.5 21.5 48 48 48h128c26.5 0 48-21.5 48-48V304c0-26.5-21.5-48-48-48zm-288 0H96v-64c0-35.3 28.7-64 64-64h8c13.3 0 24-10.7 24-24V56c0-13.3-10.7-24-24-24h-8C71.6 32 0 103.6 0 192v240c0 26.5 21.5 48 48 48h128c26.5 0 48-21.5 48-48V304c0-26.5-21.5-48-48-48z"]},Yd={prefix:"fas",iconName:"quote-right",icon:[512,512,[],"f10e","M464 32H336c-26.5 0-48 21.5-48 48v128c0 26.5 21.5 48 48 48h80v64c0 35.3-28.7 64-64 64h-8c-13.3 0-24 10.7-24 24v48c0 13.3 10.7 24 24 24h8c88.4 0 160-71.6 160-160V80c0-26.5-21.5-48-48-48zm-288 0H48C21.5 32 0 53.5 0 80v128c0 26.5 21.5 48 48 48h80v64c0 35.3-28.7 64-64 64h-8c-13.3 0-24 10.7-24 24v48c0 13.3 10.7 24 24 24h8c88.4 0 160-71.6 160-160V80c0-26.5-21.5-48-48-48z"]},qd={prefix:"fas",iconName:"quran",icon:[448,512,[],"f687","M448 358.4V25.6c0-16-9.6-25.6-25.6-25.6H96C41.6 0 0 41.6 0 96v320c0 54.4 41.6 96 96 96h326.4c12.8 0 25.6-9.6 25.6-25.6v-16c0-6.4-3.2-12.8-9.6-19.2-3.2-16-3.2-60.8 0-73.6 6.4-3.2 9.6-9.6 9.6-19.2zM301.08 145.82c.6-1.21 1.76-1.82 2.92-1.82s2.32.61 2.92 1.82l11.18 22.65 25 3.63c2.67.39 3.74 3.67 1.81 5.56l-18.09 17.63 4.27 24.89c.36 2.11-1.31 3.82-3.21 3.82-.5 0-1.02-.12-1.52-.38L304 211.87l-22.36 11.75c-.5.26-1.02.38-1.52.38-1.9 0-3.57-1.71-3.21-3.82l4.27-24.89-18.09-17.63c-1.94-1.89-.87-5.17 1.81-5.56l24.99-3.63 11.19-22.65zm-57.89-69.01c13.67 0 27.26 2.49 40.38 7.41a6.775 6.775 0 1 1-2.38 13.12c-.67 0-3.09-.21-4.13-.21-52.31 0-94.86 42.55-94.86 94.86 0 52.3 42.55 94.86 94.86 94.86 1.03 0 3.48-.21 4.13-.21 3.93 0 6.8 3.14 6.8 6.78 0 2.98-1.94 5.51-4.62 6.42-13.07 4.87-26.59 7.34-40.19 7.34C179.67 307.19 128 255.51 128 192c0-63.52 51.67-115.19 115.19-115.19zM380.8 448H96c-19.2 0-32-12.8-32-32s16-32 32-32h284.8v64z"]},Xd={prefix:"fas",iconName:"radiation",icon:[496,512,[],"f7b9","M328.2 255.8h151.6c9.1 0 16.8-7.7 16.2-16.8-5.1-75.8-44.4-142.2-102.5-184.2-7.4-5.3-17.9-2.9-22.7 4.8L290.4 188c22.6 14.3 37.8 39.2 37.8 67.8zm-37.8 67.7c-12.3 7.7-26.8 12.4-42.4 12.4-15.6 0-30-4.7-42.4-12.4L125.2 452c-4.8 7.7-2.4 18.1 5.6 22.4C165.7 493.2 205.6 504 248 504s82.3-10.8 117.2-29.6c8-4.3 10.4-14.8 5.6-22.4l-80.4-128.5zM248 303.8c26.5 0 48-21.5 48-48s-21.5-48-48-48-48 21.5-48 48 21.5 48 48 48zm-231.8-48h151.6c0-28.6 15.2-53.5 37.8-67.7L125.2 59.7c-4.8-7.7-15.3-10.2-22.7-4.8C44.4 96.9 5.1 163.3 0 239.1c-.6 9 7.1 16.7 16.2 16.7z"]},Zd={prefix:"fas",iconName:"radiation-alt",icon:[496,512,[],"f7ba","M312 256h79.1c9.2 0 16.9-7.7 16-16.8-4.6-43.6-27-81.8-59.5-107.8-7.6-6.1-18.8-4.5-24 3.8L281.9 202c18 11.2 30.1 31.2 30.1 54zm-97.8 54.1L172.4 377c-4.9 7.8-2.4 18.4 5.8 22.5 21.1 10.4 44.7 16.5 69.8 16.5s48.7-6.1 69.9-16.5c8.2-4.1 10.6-14.7 5.8-22.5l-41.8-66.9c-9.8 6.2-21.4 9.9-33.8 9.9s-24.1-3.7-33.9-9.9zM104.9 256H184c0-22.8 12.1-42.8 30.2-54.1l-41.7-66.8c-5.2-8.3-16.4-9.9-24-3.8-32.6 26-54.9 64.2-59.5 107.8-1.1 9.2 6.7 16.9 15.9 16.9zM248 504c137 0 248-111 248-248S385 8 248 8 0 119 0 256s111 248 248 248zm0-432c101.5 0 184 82.5 184 184s-82.5 184-184 184S64 357.5 64 256 146.5 72 248 72zm0 216c17.7 0 32-14.3 32-32s-14.3-32-32-32-32 14.3-32 32 14.3 32 32 32z"]},Qd={prefix:"fas",iconName:"rainbow",icon:[576,512,[],"f75b","M268.3 32.7C115.4 42.9 0 176.9 0 330.2V464c0 8.8 7.2 16 16 16h32c8.8 0 16-7.2 16-16V320C64 186.8 180.9 80.3 317.5 97.9 430.4 112.4 512 214 512 327.8V464c0 8.8 7.2 16 16 16h32c8.8 0 16-7.2 16-16V320c0-165.3-140-298.6-307.7-287.3zm-5.6 96.9C166 142 96 229.1 96 326.7V464c0 8.8 7.2 16 16 16h32c8.8 0 16-7.2 16-16V320c0-74.8 64.5-134.8 140.8-127.4 66.5 6.5 115.2 66.2 115.2 133.1V464c0 8.8 7.2 16 16 16h32c8.8 0 16-7.2 16-16V320c0-114.2-100.2-205.4-217.3-190.4zm6.2 96.3c-45.6 8.9-76.9 51.5-76.9 97.9V464c0 8.8 7.2 16 16 16h32c8.8 0 16-7.2 16-16V320c0-17.6 14.3-32 32-32s32 14.4 32 32v144c0 8.8 7.2 16 16 16h32c8.8 0 16-7.2 16-16V320c0-59.2-53.8-106-115.1-94.1z"]},Jd={prefix:"fas",iconName:"random",icon:[512,512,[],"f074","M504.971 359.029c9.373 9.373 9.373 24.569 0 33.941l-80 79.984c-15.01 15.01-40.971 4.49-40.971-16.971V416h-58.785a12.004 12.004 0 0 1-8.773-3.812l-70.556-75.596 53.333-57.143L352 336h32v-39.981c0-21.438 25.943-31.998 40.971-16.971l80 79.981zM12 176h84l52.781 56.551 53.333-57.143-70.556-75.596A11.999 11.999 0 0 0 122.785 96H12c-6.627 0-12 5.373-12 12v56c0 6.627 5.373 12 12 12zm372 0v39.984c0 21.46 25.961 31.98 40.971 16.971l80-79.984c9.373-9.373 9.373-24.569 0-33.941l-80-79.981C409.943 24.021 384 34.582 384 56.019V96h-58.785a12.004 12.004 0 0 0-8.773 3.812L96 336H12c-6.627 0-12 5.373-12 12v56c0 6.627 5.373 12 12 12h110.785c3.326 0 6.503-1.381 8.773-3.812L352 176h32z"]},eu={prefix:"fas",iconName:"receipt",icon:[384,512,[],"f543","M358.4 3.2L320 48 265.6 3.2a15.9 15.9 0 0 0-19.2 0L192 48 137.6 3.2a15.9 15.9 0 0 0-19.2 0L64 48 25.6 3.2C15-4.7 0 2.8 0 16v480c0 13.2 15 20.7 25.6 12.8L64 464l54.4 44.8a15.9 15.9 0 0 0 19.2 0L192 464l54.4 44.8a15.9 15.9 0 0 0 19.2 0L320 464l38.4 44.8c10.5 7.9 25.6.4 25.6-12.8V16c0-13.2-15-20.7-25.6-12.8zM320 360c0 4.4-3.6 8-8 8H72c-4.4 0-8-3.6-8-8v-16c0-4.4 3.6-8 8-8h240c4.4 0 8 3.6 8 8v16zm0-96c0 4.4-3.6 8-8 8H72c-4.4 0-8-3.6-8-8v-16c0-4.4 3.6-8 8-8h240c4.4 0 8 3.6 8 8v16zm0-96c0 4.4-3.6 8-8 8H72c-4.4 0-8-3.6-8-8v-16c0-4.4 3.6-8 8-8h240c4.4 0 8 3.6 8 8v16z"]},tu={prefix:"fas",iconName:"record-vinyl",icon:[512,512,[],"f8d9","M256 152a104 104 0 1 0 104 104 104 104 0 0 0-104-104zm0 128a24 24 0 1 1 24-24 24 24 0 0 1-24 24zm0-272C119 8 8 119 8 256s111 248 248 248 248-111 248-248S393 8 256 8zm0 376a128 128 0 1 1 128-128 128 128 0 0 1-128 128z"]},iu={prefix:"fas",iconName:"recycle",icon:[512,512,[],"f1b8","M184.561 261.903c3.232 13.997-12.123 24.635-24.068 17.168l-40.736-25.455-50.867 81.402C55.606 356.273 70.96 384 96.012 384H148c6.627 0 12 5.373 12 12v40c0 6.627-5.373 12-12 12H96.115c-75.334 0-121.302-83.048-81.408-146.88l50.822-81.388-40.725-25.448c-12.081-7.547-8.966-25.961 4.879-29.158l110.237-25.45c8.611-1.988 17.201 3.381 19.189 11.99l25.452 110.237zm98.561-182.915l41.289 66.076-40.74 25.457c-12.051 7.528-9 25.953 4.879 29.158l110.237 25.45c8.672 1.999 17.215-3.438 19.189-11.99l25.45-110.237c3.197-13.844-11.99-24.719-24.068-17.168l-40.687 25.424-41.263-66.082c-37.521-60.033-125.209-60.171-162.816 0l-17.963 28.766c-3.51 5.62-1.8 13.021 3.82 16.533l33.919 21.195c5.62 3.512 13.024 1.803 16.536-3.817l17.961-28.743c12.712-20.341 41.973-19.676 54.257-.022zM497.288 301.12l-27.515-44.065c-3.511-5.623-10.916-7.334-16.538-3.821l-33.861 21.159c-5.62 3.512-7.33 10.915-3.818 16.536l27.564 44.112c13.257 21.211-2.057 48.96-27.136 48.96H320V336.02c0-14.213-17.242-21.383-27.313-11.313l-80 79.981c-6.249 6.248-6.249 16.379 0 22.627l80 79.989C302.689 517.308 320 510.3 320 495.989V448h95.88c75.274 0 121.335-82.997 81.408-146.88z"]},nu={prefix:"fas",iconName:"redo",icon:[512,512,[],"f01e","M500.33 0h-47.41a12 12 0 0 0-12 12.57l4 82.76A247.42 247.42 0 0 0 256 8C119.34 8 7.9 119.53 8 256.19 8.1 393.07 119.1 504 256 504a247.1 247.1 0 0 0 166.18-63.91 12 12 0 0 0 .48-17.43l-34-34a12 12 0 0 0-16.38-.55A176 176 0 1 1 402.1 157.8l-101.53-4.87a12 12 0 0 0-12.57 12v47.41a12 12 0 0 0 12 12h200.33a12 12 0 0 0 12-12V12a12 12 0 0 0-12-12z"]},su={prefix:"fas",iconName:"redo-alt",icon:[512,512,[],"f2f9","M256.455 8c66.269.119 126.437 26.233 170.859 68.685l35.715-35.715C478.149 25.851 504 36.559 504 57.941V192c0 13.255-10.745 24-24 24H345.941c-21.382 0-32.09-25.851-16.971-40.971l41.75-41.75c-30.864-28.899-70.801-44.907-113.23-45.273-92.398-.798-170.283 73.977-169.484 169.442C88.764 348.009 162.184 424 256 424c41.127 0 79.997-14.678 110.629-41.556 4.743-4.161 11.906-3.908 16.368.553l39.662 39.662c4.872 4.872 4.631 12.815-.482 17.433C378.202 479.813 319.926 504 256 504 119.034 504 8.001 392.967 8 256.002 7.999 119.193 119.646 7.755 256.455 8z"]},ru={prefix:"fas",iconName:"registered",icon:[512,512,[],"f25d","M285.363 207.475c0 18.6-9.831 28.431-28.431 28.431h-29.876v-56.14h23.378c28.668 0 34.929 8.773 34.929 27.709zM504 256c0 136.967-111.033 248-248 248S8 392.967 8 256 119.033 8 256 8s248 111.033 248 248zM363.411 360.414c-46.729-84.825-43.299-78.636-44.702-80.98 23.432-15.172 37.945-42.979 37.945-74.486 0-54.244-31.5-89.252-105.498-89.252h-70.667c-13.255 0-24 10.745-24 24V372c0 13.255 10.745 24 24 24h22.567c13.255 0 24-10.745 24-24v-71.663h25.556l44.129 82.937a24.001 24.001 0 0 0 21.188 12.727h24.464c18.261-.001 29.829-19.591 21.018-35.587z"]},ou={prefix:"fas",iconName:"remove-format",icon:[640,512,[],"f87d","M336 416h-11.17l9.26-27.77L267 336.4 240.49 416H208a16 16 0 0 0-16 16v32a16 16 0 0 0 16 16h128a16 16 0 0 0 16-16v-32a16 16 0 0 0-16-16zm297.82 42.1L377 259.59 426.17 112H544v32a16 16 0 0 0 16 16h32a16 16 0 0 0 16-16V48a16 16 0 0 0-16-16H176a16 16 0 0 0-16 16v43.9L45.46 3.38A16 16 0 0 0 23 6.19L3.37 31.46a16 16 0 0 0 2.81 22.45l588.36 454.72a16 16 0 0 0 22.46-2.81l19.64-25.27a16 16 0 0 0-2.82-22.45zM309.91 207.76L224 141.36V112h117.83z"]},au={prefix:"fas",iconName:"reply",icon:[512,512,[],"f3e5","M8.309 189.836L184.313 37.851C199.719 24.546 224 35.347 224 56.015v80.053c160.629 1.839 288 34.032 288 186.258 0 61.441-39.581 122.309-83.333 154.132-13.653 9.931-33.111-2.533-28.077-18.631 45.344-145.012-21.507-183.51-176.59-185.742V360c0 20.7-24.3 31.453-39.687 18.164l-176.004-152c-11.071-9.562-11.086-26.753 0-36.328z"]},lu={prefix:"fas",iconName:"reply-all",icon:[576,512,[],"f122","M136.309 189.836L312.313 37.851C327.72 24.546 352 35.348 352 56.015v82.763c129.182 10.231 224 52.212 224 183.548 0 61.441-39.582 122.309-83.333 154.132-13.653 9.931-33.111-2.533-28.077-18.631 38.512-123.162-3.922-169.482-112.59-182.015v84.175c0 20.701-24.3 31.453-39.687 18.164L136.309 226.164c-11.071-9.561-11.086-26.753 0-36.328zm-128 36.328L184.313 378.15C199.7 391.439 224 380.687 224 359.986v-15.818l-108.606-93.785A55.96 55.96 0 0 1 96 207.998a55.953 55.953 0 0 1 19.393-42.38L224 71.832V56.015c0-20.667-24.28-31.469-39.687-18.164L8.309 189.836c-11.086 9.575-11.071 26.767 0 36.328z"]},cu={prefix:"fas",iconName:"republican",icon:[640,512,[],"f75e","M544 192c0-88.4-71.6-160-160-160H160C71.6 32 0 103.6 0 192v64h544v-64zm-367.7-21.6l-19.8 19.3 4.7 27.3c.8 4.9-4.3 8.6-8.7 6.3L128 210.4l-24.5 12.9c-4.3 2.3-9.5-1.4-8.7-6.3l4.7-27.3-19.8-19.3c-3.6-3.5-1.6-9.5 3.3-10.2l27.4-4 12.2-24.8c2.2-4.5 8.6-4.4 10.7 0l12.2 24.8 27.4 4c5 .7 6.9 6.7 3.4 10.2zm144 0l-19.8 19.3 4.7 27.3c.8 4.9-4.3 8.6-8.7 6.3L272 210.4l-24.5 12.9c-4.3 2.3-9.5-1.4-8.7-6.3l4.7-27.3-19.8-19.3c-3.6-3.5-1.6-9.5 3.3-10.2l27.4-4 12.2-24.8c2.2-4.5 8.6-4.4 10.7 0l12.2 24.8 27.4 4c5 .7 6.9 6.7 3.4 10.2zm144 0l-19.8 19.3 4.7 27.3c.8 4.9-4.3 8.6-8.7 6.3L416 210.4l-24.5 12.9c-4.3 2.3-9.5-1.4-8.7-6.3l4.7-27.3-19.8-19.3c-3.6-3.5-1.6-9.5 3.3-10.2l27.4-4 12.2-24.8c2.2-4.5 8.6-4.4 10.7 0l12.2 24.8 27.4 4c5 .7 6.9 6.7 3.4 10.2zM624 320h-32c-8.8 0-16 7.2-16 16v64c0 8.8-7.2 16-16 16s-16-7.2-16-16V288H0v176c0 8.8 7.2 16 16 16h96c8.8 0 16-7.2 16-16v-80h192v80c0 8.8 7.2 16 16 16h96c8.8 0 16-7.2 16-16V352h32v43.3c0 41.8 30 80.1 71.6 84.3 47.8 4.9 88.4-32.7 88.4-79.6v-64c0-8.8-7.2-16-16-16z"]},hu={prefix:"fas",iconName:"restroom",icon:[640,512,[],"f7bd","M128 128c35.3 0 64-28.7 64-64S163.3 0 128 0 64 28.7 64 64s28.7 64 64 64zm384 0c35.3 0 64-28.7 64-64S547.3 0 512 0s-64 28.7-64 64 28.7 64 64 64zm127.3 226.5l-45.6-185.8c-3.3-13.5-15.5-23-29.8-24.2-15 9.7-32.8 15.5-52 15.5-19.2 0-37-5.8-52-15.5-14.3 1.2-26.5 10.7-29.8 24.2l-45.6 185.8C381 369.6 393 384 409.2 384H464v104c0 13.3 10.7 24 24 24h48c13.3 0 24-10.7 24-24V384h54.8c16.2 0 28.2-14.4 24.5-29.5zM336 0h-32c-8.8 0-16 7.2-16 16v480c0 8.8 7.2 16 16 16h32c8.8 0 16-7.2 16-16V16c0-8.8-7.2-16-16-16zM180.1 144.4c-15 9.8-32.9 15.6-52.1 15.6-19.2 0-37.1-5.8-52.1-15.6C51.3 146.5 32 166.9 32 192v136c0 13.3 10.7 24 24 24h8v136c0 13.3 10.7 24 24 24h80c13.3 0 24-10.7 24-24V352h8c13.3 0 24-10.7 24-24V192c0-25.1-19.3-45.5-43.9-47.6z"]},du={prefix:"fas",iconName:"retweet",icon:[640,512,[],"f079","M629.657 343.598L528.971 444.284c-9.373 9.372-24.568 9.372-33.941 0L394.343 343.598c-9.373-9.373-9.373-24.569 0-33.941l10.823-10.823c9.562-9.562 25.133-9.34 34.419.492L480 342.118V160H292.451a24.005 24.005 0 0 1-16.971-7.029l-16-16C244.361 121.851 255.069 96 276.451 96H520c13.255 0 24 10.745 24 24v222.118l40.416-42.792c9.285-9.831 24.856-10.054 34.419-.492l10.823 10.823c9.372 9.372 9.372 24.569-.001 33.941zm-265.138 15.431A23.999 23.999 0 0 0 347.548 352H160V169.881l40.416 42.792c9.286 9.831 24.856 10.054 34.419.491l10.822-10.822c9.373-9.373 9.373-24.569 0-33.941L144.971 67.716c-9.373-9.373-24.569-9.373-33.941 0L10.343 168.402c-9.373 9.373-9.373 24.569 0 33.941l10.822 10.822c9.562 9.562 25.133 9.34 34.419-.491L96 169.881V392c0 13.255 10.745 24 24 24h243.549c21.382 0 32.09-25.851 16.971-40.971l-16.001-16z"]},uu={prefix:"fas",iconName:"ribbon",icon:[448,512,[],"f4d6","M6.1 444.3c-9.6 10.8-7.5 27.6 4.5 35.7l68.8 27.9c9.9 6.7 23.3 5 31.3-3.8l91.8-101.9-79.2-87.9-117.2 130zm435.8 0s-292-324.6-295.4-330.1c15.4-8.4 40.2-17.9 77.5-17.9s62.1 9.5 77.5 17.9c-3.3 5.6-56 64.6-56 64.6l79.1 87.7 34.2-38c28.7-31.9 33.3-78.6 11.4-115.5l-43.7-73.5c-4.3-7.2-9.9-13.3-16.8-18-40.7-27.6-127.4-29.7-171.4 0-6.9 4.7-12.5 10.8-16.8 18l-43.6 73.2c-1.5 2.5-37.1 62.2 11.5 116L337.5 504c8 8.9 21.4 10.5 31.3 3.8l68.8-27.9c11.9-8 14-24.8 4.3-35.6z"]},pu={prefix:"fas",iconName:"ring",icon:[512,512,[],"f70b","M256 64C110.06 64 0 125.91 0 208v98.13C0 384.48 114.62 448 256 448s256-63.52 256-141.87V208c0-82.09-110.06-144-256-144zm0 64c106.04 0 192 35.82 192 80 0 9.26-3.97 18.12-10.91 26.39C392.15 208.21 328.23 192 256 192s-136.15 16.21-181.09 42.39C67.97 226.12 64 217.26 64 208c0-44.18 85.96-80 192-80zM120.43 264.64C155.04 249.93 201.64 240 256 240s100.96 9.93 135.57 24.64C356.84 279.07 308.93 288 256 288s-100.84-8.93-135.57-23.36z"]},gu={prefix:"fas",iconName:"road",icon:[576,512,[],"f018","M573.19 402.67l-139.79-320C428.43 71.29 417.6 64 405.68 64h-97.59l2.45 23.16c.5 4.72-3.21 8.84-7.96 8.84h-29.16c-4.75 0-8.46-4.12-7.96-8.84L267.91 64h-97.59c-11.93 0-22.76 7.29-27.73 18.67L2.8 402.67C-6.45 423.86 8.31 448 30.54 448h196.84l10.31-97.68c.86-8.14 7.72-14.32 15.91-14.32h68.8c8.19 0 15.05 6.18 15.91 14.32L348.62 448h196.84c22.23 0 36.99-24.14 27.73-45.33zM260.4 135.16a8 8 0 0 1 7.96-7.16h39.29c4.09 0 7.53 3.09 7.96 7.16l4.6 43.58c.75 7.09-4.81 13.26-11.93 13.26h-40.54c-7.13 0-12.68-6.17-11.93-13.26l4.59-43.58zM315.64 304h-55.29c-9.5 0-16.91-8.23-15.91-17.68l5.07-48c.86-8.14 7.72-14.32 15.91-14.32h45.15c8.19 0 15.05 6.18 15.91 14.32l5.07 48c1 9.45-6.41 17.68-15.91 17.68z"]},fu={prefix:"fas",iconName:"robot",icon:[640,512,[],"f544","M32,224H64V416H32A31.96166,31.96166,0,0,1,0,384V256A31.96166,31.96166,0,0,1,32,224Zm512-48V448a64.06328,64.06328,0,0,1-64,64H160a64.06328,64.06328,0,0,1-64-64V176a79.974,79.974,0,0,1,80-80H288V32a32,32,0,0,1,64,0V96H464A79.974,79.974,0,0,1,544,176ZM264,256a40,40,0,1,0-40,40A39.997,39.997,0,0,0,264,256Zm-8,128H192v32h64Zm96,0H288v32h64ZM456,256a40,40,0,1,0-40,40A39.997,39.997,0,0,0,456,256Zm-8,128H384v32h64ZM640,256V384a31.96166,31.96166,0,0,1-32,32H576V224h32A31.96166,31.96166,0,0,1,640,256Z"]},mu={prefix:"fas",iconName:"rocket",icon:[512,512,[],"f135","M505.12019,19.09375c-1.18945-5.53125-6.65819-11-12.207-12.1875C460.716,0,435.507,0,410.40747,0,307.17523,0,245.26909,55.20312,199.05238,128H94.83772c-16.34763.01562-35.55658,11.875-42.88664,26.48438L2.51562,253.29688A28.4,28.4,0,0,0,0,264a24.00867,24.00867,0,0,0,24.00582,24H127.81618l-22.47457,22.46875c-11.36521,11.36133-12.99607,32.25781,0,45.25L156.24582,406.625c11.15623,11.1875,32.15619,13.15625,45.27726,0l22.47457-22.46875V488a24.00867,24.00867,0,0,0,24.00581,24,28.55934,28.55934,0,0,0,10.707-2.51562l98.72834-49.39063c14.62888-7.29687,26.50776-26.5,26.50776-42.85937V312.79688c72.59753-46.3125,128.03493-108.40626,128.03493-211.09376C512.07526,76.5,512.07526,51.29688,505.12019,19.09375ZM384.04033,168A40,40,0,1,1,424.05,128,40.02322,40.02322,0,0,1,384.04033,168Z"]},vu={prefix:"fas",iconName:"route",icon:[512,512,[],"f4d7","M416 320h-96c-17.6 0-32-14.4-32-32s14.4-32 32-32h96s96-107 96-160-43-96-96-96-96 43-96 96c0 25.5 22.2 63.4 45.3 96H320c-52.9 0-96 43.1-96 96s43.1 96 96 96h96c17.6 0 32 14.4 32 32s-14.4 32-32 32H185.5c-16 24.8-33.8 47.7-47.3 64H416c52.9 0 96-43.1 96-96s-43.1-96-96-96zm0-256c17.7 0 32 14.3 32 32s-14.3 32-32 32-32-14.3-32-32 14.3-32 32-32zM96 256c-53 0-96 43-96 96s96 160 96 160 96-107 96-160-43-96-96-96zm0 128c-17.7 0-32-14.3-32-32s14.3-32 32-32 32 14.3 32 32-14.3 32-32 32z"]},yu={prefix:"fas",iconName:"rss",icon:[448,512,[],"f09e","M128.081 415.959c0 35.369-28.672 64.041-64.041 64.041S0 451.328 0 415.959s28.672-64.041 64.041-64.041 64.04 28.673 64.04 64.041zm175.66 47.25c-8.354-154.6-132.185-278.587-286.95-286.95C7.656 175.765 0 183.105 0 192.253v48.069c0 8.415 6.49 15.472 14.887 16.018 111.832 7.284 201.473 96.702 208.772 208.772.547 8.397 7.604 14.887 16.018 14.887h48.069c9.149.001 16.489-7.655 15.995-16.79zm144.249.288C439.596 229.677 251.465 40.445 16.503 32.01 7.473 31.686 0 38.981 0 48.016v48.068c0 8.625 6.835 15.645 15.453 15.999 191.179 7.839 344.627 161.316 352.465 352.465.353 8.618 7.373 15.453 15.999 15.453h48.068c9.034-.001 16.329-7.474 16.005-16.504z"]},Cu={prefix:"fas",iconName:"rss-square",icon:[448,512,[],"f143","M400 32H48C21.49 32 0 53.49 0 80v352c0 26.51 21.49 48 48 48h352c26.51 0 48-21.49 48-48V80c0-26.51-21.49-48-48-48zM112 416c-26.51 0-48-21.49-48-48s21.49-48 48-48 48 21.49 48 48-21.49 48-48 48zm157.533 0h-34.335c-6.011 0-11.051-4.636-11.442-10.634-5.214-80.05-69.243-143.92-149.123-149.123-5.997-.39-10.633-5.431-10.633-11.441v-34.335c0-6.535 5.468-11.777 11.994-11.425 110.546 5.974 198.997 94.536 204.964 204.964.352 6.526-4.89 11.994-11.425 11.994zm103.027 0h-34.334c-6.161 0-11.175-4.882-11.427-11.038-5.598-136.535-115.204-246.161-251.76-251.76C68.882 152.949 64 147.935 64 141.774V107.44c0-6.454 5.338-11.664 11.787-11.432 167.83 6.025 302.21 141.191 308.205 308.205.232 6.449-4.978 11.787-11.432 11.787z"]},bu={prefix:"fas",iconName:"ruble-sign",icon:[384,512,[],"f158","M239.36 320C324.48 320 384 260.542 384 175.071S324.48 32 239.36 32H76c-6.627 0-12 5.373-12 12v206.632H12c-6.627 0-12 5.373-12 12V308c0 6.627 5.373 12 12 12h52v32H12c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h52v52c0 6.627 5.373 12 12 12h58.56c6.627 0 12-5.373 12-12v-52H308c6.627 0 12-5.373 12-12v-40c0-6.627-5.373-12-12-12H146.56v-32h92.8zm-92.8-219.252h78.72c46.72 0 74.88 29.11 74.88 74.323 0 45.832-28.16 75.561-76.16 75.561h-77.44V100.748z"]},Su={prefix:"fas",iconName:"ruler",icon:[640,512,[],"f545","M635.7 167.2L556.1 31.7c-8.8-15-28.3-20.1-43.5-11.5l-69 39.1L503.3 161c2.2 3.8.9 8.5-2.9 10.7l-13.8 7.8c-3.8 2.2-8.7.9-10.9-2.9L416 75l-55.2 31.3 27.9 47.4c2.2 3.8.9 8.5-2.9 10.7l-13.8 7.8c-3.8 2.2-8.7.9-10.9-2.9L333.2 122 278 153.3 337.8 255c2.2 3.7.9 8.5-2.9 10.7l-13.8 7.8c-3.8 2.2-8.7.9-10.9-2.9l-59.7-101.7-55.2 31.3 27.9 47.4c2.2 3.8.9 8.5-2.9 10.7l-13.8 7.8c-3.8 2.2-8.7.9-10.9-2.9l-27.9-47.5-55.2 31.3 59.7 101.7c2.2 3.7.9 8.5-2.9 10.7l-13.8 7.8c-3.8 2.2-8.7.9-10.9-2.9L84.9 262.9l-69 39.1C.7 310.7-4.6 329.8 4.2 344.8l79.6 135.6c8.8 15 28.3 20.1 43.5 11.5L624.1 210c15.2-8.6 20.4-27.8 11.6-42.8z"]},wu={prefix:"fas",iconName:"ruler-combined",icon:[512,512,[],"f546","M160 288h-56c-4.42 0-8-3.58-8-8v-16c0-4.42 3.58-8 8-8h56v-64h-56c-4.42 0-8-3.58-8-8v-16c0-4.42 3.58-8 8-8h56V96h-56c-4.42 0-8-3.58-8-8V72c0-4.42 3.58-8 8-8h56V32c0-17.67-14.33-32-32-32H32C14.33 0 0 14.33 0 32v448c0 2.77.91 5.24 1.57 7.8L160 329.38V288zm320 64h-32v56c0 4.42-3.58 8-8 8h-16c-4.42 0-8-3.58-8-8v-56h-64v56c0 4.42-3.58 8-8 8h-16c-4.42 0-8-3.58-8-8v-56h-64v56c0 4.42-3.58 8-8 8h-16c-4.42 0-8-3.58-8-8v-56h-41.37L24.2 510.43c2.56.66 5.04 1.57 7.8 1.57h448c17.67 0 32-14.33 32-32v-96c0-17.67-14.33-32-32-32z"]},xu={prefix:"fas",iconName:"ruler-horizontal",icon:[576,512,[],"f547","M544 128h-48v88c0 4.42-3.58 8-8 8h-16c-4.42 0-8-3.58-8-8v-88h-64v88c0 4.42-3.58 8-8 8h-16c-4.42 0-8-3.58-8-8v-88h-64v88c0 4.42-3.58 8-8 8h-16c-4.42 0-8-3.58-8-8v-88h-64v88c0 4.42-3.58 8-8 8h-16c-4.42 0-8-3.58-8-8v-88h-64v88c0 4.42-3.58 8-8 8H88c-4.42 0-8-3.58-8-8v-88H32c-17.67 0-32 14.33-32 32v192c0 17.67 14.33 32 32 32h512c17.67 0 32-14.33 32-32V160c0-17.67-14.33-32-32-32z"]},Eu={prefix:"fas",iconName:"ruler-vertical",icon:[256,512,[],"f548","M168 416c-4.42 0-8-3.58-8-8v-16c0-4.42 3.58-8 8-8h88v-64h-88c-4.42 0-8-3.58-8-8v-16c0-4.42 3.58-8 8-8h88v-64h-88c-4.42 0-8-3.58-8-8v-16c0-4.42 3.58-8 8-8h88v-64h-88c-4.42 0-8-3.58-8-8v-16c0-4.42 3.58-8 8-8h88V32c0-17.67-14.33-32-32-32H32C14.33 0 0 14.33 0 32v448c0 17.67 14.33 32 32 32h192c17.67 0 32-14.33 32-32v-64h-88z"]},Mu={prefix:"fas",iconName:"running",icon:[416,512,[],"f70c","M272 96c26.51 0 48-21.49 48-48S298.51 0 272 0s-48 21.49-48 48 21.49 48 48 48zM113.69 317.47l-14.8 34.52H32c-17.67 0-32 14.33-32 32s14.33 32 32 32h77.45c19.25 0 36.58-11.44 44.11-29.09l8.79-20.52-10.67-6.3c-17.32-10.23-30.06-25.37-37.99-42.61zM384 223.99h-44.03l-26.06-53.25c-12.5-25.55-35.45-44.23-61.78-50.94l-71.08-21.14c-28.3-6.8-57.77-.55-80.84 17.14l-39.67 30.41c-14.03 10.75-16.69 30.83-5.92 44.86s30.84 16.66 44.86 5.92l39.69-30.41c7.67-5.89 17.44-8 25.27-6.14l14.7 4.37-37.46 87.39c-12.62 29.48-1.31 64.01 26.3 80.31l84.98 50.17-27.47 87.73c-5.28 16.86 4.11 34.81 20.97 40.09 3.19 1 6.41 1.48 9.58 1.48 13.61 0 26.23-8.77 30.52-22.45l31.64-101.06c5.91-20.77-2.89-43.08-21.64-54.39l-61.24-36.14 31.31-78.28 20.27 41.43c8 16.34 24.92 26.89 43.11 26.89H384c17.67 0 32-14.33 32-32s-14.33-31.99-32-31.99z"]},Au={prefix:"fas",iconName:"rupee-sign",icon:[320,512,[],"f156","M308 96c6.627 0 12-5.373 12-12V44c0-6.627-5.373-12-12-12H12C5.373 32 0 37.373 0 44v44.748c0 6.627 5.373 12 12 12h85.28c27.308 0 48.261 9.958 60.97 27.252H12c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h158.757c-6.217 36.086-32.961 58.632-74.757 58.632H12c-6.627 0-12 5.373-12 12v53.012c0 3.349 1.4 6.546 3.861 8.818l165.052 152.356a12.001 12.001 0 0 0 8.139 3.182h82.562c10.924 0 16.166-13.408 8.139-20.818L116.871 319.906c76.499-2.34 131.144-53.395 138.318-127.906H308c6.627 0 12-5.373 12-12v-40c0-6.627-5.373-12-12-12h-58.69c-3.486-11.541-8.28-22.246-14.252-32H308z"]},Tu={prefix:"fas",iconName:"sad-cry",icon:[496,512,[],"f5b3","M248 8C111 8 0 119 0 256c0 90.1 48.2 168.7 120 212.1V288c0-8.8 7.2-16 16-16s16 7.2 16 16v196.7c29.5 12.4 62 19.3 96 19.3s66.5-6.9 96-19.3V288c0-8.8 7.2-16 16-16s16 7.2 16 16v180.1C447.8 424.7 496 346 496 256 496 119 385 8 248 8zm-65.5 216.5c-14.8-13.2-46.2-13.2-61 0L112 233c-3.8 3.3-9.3 4-13.7 1.6-4.4-2.4-6.9-7.4-6.1-12.4 4-25.2 34.2-42.1 59.9-42.1S208 197 212 222.2c.8 5-1.7 10-6.1 12.4-5.8 3.1-11.2.7-13.7-1.6l-9.7-8.5zM248 416c-26.5 0-48-28.7-48-64s21.5-64 48-64 48 28.7 48 64-21.5 64-48 64zm149.8-181.5c-5.8 3.1-11.2.7-13.7-1.6l-9.5-8.5c-14.8-13.2-46.2-13.2-61 0L304 233c-3.8 3.3-9.3 4-13.7 1.6-4.4-2.4-6.9-7.4-6.1-12.4 4-25.2 34.2-42.1 59.9-42.1S400 197 404 222.2c.6 4.9-1.8 9.9-6.2 12.3z"]},Du={prefix:"fas",iconName:"sad-tear",icon:[496,512,[],"f5b4","M248 8C111 8 0 119 0 256s111 248 248 248 248-111 248-248S385 8 248 8zm80 168c17.7 0 32 14.3 32 32s-14.3 32-32 32-32-14.3-32-32 14.3-32 32-32zM152 416c-26.5 0-48-21-48-47 0-20 28.5-60.4 41.6-77.8 3.2-4.3 9.6-4.3 12.8 0C171.5 308.6 200 349 200 369c0 26-21.5 47-48 47zm16-176c-17.7 0-32-14.3-32-32s14.3-32 32-32 32 14.3 32 32-14.3 32-32 32zm170.2 154.2C315.8 367.4 282.9 352 248 352c-21.2 0-21.2-32 0-32 44.4 0 86.3 19.6 114.7 53.8 13.8 16.4-11.2 36.5-24.5 20.4z"]},Iu={prefix:"fas",iconName:"satellite",icon:[512,512,[],"f7bf","M502.60969,310.04206l-96.70393,96.71625a31.88151,31.88151,0,0,1-45.00765,0L280.572,326.34115l-9.89231,9.90759a190.56343,190.56343,0,0,1-5.40716,168.52287c-4.50077,8.50115-16.39342,9.59505-23.20707,2.79725L134.54715,400.05428l-17.7999,17.79929c.70324,2.60972,1.60965,5.00067,1.60965,7.79793a32.00544,32.00544,0,1,1-32.00544-32.00434c2.79735,0,5.18838.90637,7.7982,1.60959l17.7999-17.79929L4.43129,269.94287c-6.798-6.81342-5.70409-18.6119,2.79735-23.20627a190.58161,190.58161,0,0,1,168.52864-5.407l9.79854-9.79821-80.31053-80.41716a32.002,32.002,0,0,1,0-45.09987L201.96474,9.29814A31.62639,31.62639,0,0,1,224.46868,0a31.99951,31.99951,0,0,1,22.59759,9.29814l80.32615,80.30777,47.805-47.89713a33.6075,33.6075,0,0,1,47.50808,0l47.50807,47.50645a33.63308,33.63308,0,0,1,0,47.50644l-47.805,47.89713L502.71908,265.036A31.78938,31.78938,0,0,1,502.60969,310.04206ZM219.56159,197.433l73.82505-73.82252-68.918-68.9-73.80942,73.80689Zm237.74352,90.106-68.90233-68.9156-73.825,73.82252,68.918,68.9Z"]},Ru={prefix:"fas",iconName:"satellite-dish",icon:[512,512,[],"f7c0","M305.44954,462.59c7.39157,7.29792,6.18829,20.09661-3.00038,25.00356-77.713,41.80281-176.72559,29.9105-242.34331-35.7082C-5.49624,386.28227-17.404,287.362,24.41381,209.554c4.89125-9.095,17.68975-10.29834,25.00318-3.00043L166.22872,323.36708l27.39411-27.39452c-.68759-2.60974-1.594-5.00071-1.594-7.81361a32.00407,32.00407,0,1,1,32.00407,32.00455c-2.79723,0-5.20378-.89075-7.79786-1.594l-27.40974,27.41015ZM511.9758,303.06732a16.10336,16.10336,0,0,1-16.002,17.00242H463.86031a15.96956,15.96956,0,0,1-15.89265-15.00213C440.46671,175.5492,336.45348,70.53427,207.03078,63.53328a15.84486,15.84486,0,0,1-15.00191-15.90852V16.02652A16.09389,16.09389,0,0,1,209.031.02425C372.25491,8.61922,503.47472,139.841,511.9758,303.06732Zm-96.01221-.29692a16.21093,16.21093,0,0,1-16.11142,17.29934H367.645a16.06862,16.06862,0,0,1-15.89265-14.70522c-6.90712-77.01094-68.118-138.91037-144.92467-145.22376a15.94,15.94,0,0,1-14.79876-15.89289V112.13393a16.134,16.134,0,0,1,17.29908-16.096C319.45132,104.5391,407.55627,192.64538,415.96359,302.7704Z"]},Lu={prefix:"fas",iconName:"save",icon:[448,512,[],"f0c7","M433.941 129.941l-83.882-83.882A48 48 0 0 0 316.118 32H48C21.49 32 0 53.49 0 80v352c0 26.51 21.49 48 48 48h352c26.51 0 48-21.49 48-48V163.882a48 48 0 0 0-14.059-33.941zM224 416c-35.346 0-64-28.654-64-64 0-35.346 28.654-64 64-64s64 28.654 64 64c0 35.346-28.654 64-64 64zm96-304.52V212c0 6.627-5.373 12-12 12H76c-6.627 0-12-5.373-12-12V108c0-6.627 5.373-12 12-12h228.52c3.183 0 6.235 1.264 8.485 3.515l3.48 3.48A11.996 11.996 0 0 1 320 111.48z"]},ku={prefix:"fas",iconName:"school",icon:[640,512,[],"f549","M0 224v272c0 8.84 7.16 16 16 16h80V192H32c-17.67 0-32 14.33-32 32zm360-48h-24v-40c0-4.42-3.58-8-8-8h-16c-4.42 0-8 3.58-8 8v64c0 4.42 3.58 8 8 8h48c4.42 0 8-3.58 8-8v-16c0-4.42-3.58-8-8-8zm137.75-63.96l-160-106.67a32.02 32.02 0 0 0-35.5 0l-160 106.67A32.002 32.002 0 0 0 128 138.66V512h128V368c0-8.84 7.16-16 16-16h96c8.84 0 16 7.16 16 16v144h128V138.67c0-10.7-5.35-20.7-14.25-26.63zM320 256c-44.18 0-80-35.82-80-80s35.82-80 80-80 80 35.82 80 80-35.82 80-80 80zm288-64h-64v320h80c8.84 0 16-7.16 16-16V224c0-17.67-14.33-32-32-32z"]},Pu={prefix:"fas",iconName:"screwdriver",icon:[512,512,[],"f54a","M448 0L320 96v62.06l-83.03 83.03c6.79 4.25 13.27 9.06 19.07 14.87 5.8 5.8 10.62 12.28 14.87 19.07L353.94 192H416l96-128-64-64zM128 278.59L10.92 395.67c-14.55 14.55-14.55 38.15 0 52.71l52.7 52.7c14.56 14.56 38.15 14.56 52.71 0L233.41 384c29.11-29.11 29.11-76.3 0-105.41s-76.3-29.11-105.41 0z"]},Nu={prefix:"fas",iconName:"scroll",icon:[640,512,[],"f70e","M48 0C21.53 0 0 21.53 0 48v64c0 8.84 7.16 16 16 16h80V48C96 21.53 74.47 0 48 0zm208 412.57V352h288V96c0-52.94-43.06-96-96-96H111.59C121.74 13.41 128 29.92 128 48v368c0 38.87 34.65 69.65 74.75 63.12C234.22 474 256 444.46 256 412.57zM288 384v32c0 52.93-43.06 96-96 96h336c61.86 0 112-50.14 112-112 0-8.84-7.16-16-16-16H288z"]},Ou={prefix:"fas",iconName:"sd-card",icon:[384,512,[],"f7c2","M320 0H128L0 128v320c0 35.3 28.7 64 64 64h256c35.3 0 64-28.7 64-64V64c0-35.3-28.7-64-64-64zM160 160h-48V64h48v96zm80 0h-48V64h48v96zm80 0h-48V64h48v96z"]},_u={prefix:"fas",iconName:"search",icon:[512,512,[],"f002","M505 442.7L405.3 343c-4.5-4.5-10.6-7-17-7H372c27.6-35.3 44-79.7 44-128C416 93.1 322.9 0 208 0S0 93.1 0 208s93.1 208 208 208c48.3 0 92.7-16.4 128-44v16.3c0 6.4 2.5 12.5 7 17l99.7 99.7c9.4 9.4 24.6 9.4 33.9 0l28.3-28.3c9.4-9.4 9.4-24.6.1-34zM208 336c-70.7 0-128-57.2-128-128 0-70.7 57.2-128 128-128 70.7 0 128 57.2 128 128 0 70.7-57.2 128-128 128z"]},Fu={prefix:"fas",iconName:"search-dollar",icon:[512,512,[],"f688","M505.04 442.66l-99.71-99.69c-4.5-4.5-10.6-7-17-7h-16.3c27.6-35.3 44-79.69 44-127.99C416.03 93.09 322.92 0 208.02 0S0 93.09 0 207.98s93.11 207.98 208.02 207.98c48.3 0 92.71-16.4 128.01-44v16.3c0 6.4 2.5 12.5 7 17l99.71 99.69c9.4 9.4 24.6 9.4 33.9 0l28.3-28.3c9.4-9.4 9.4-24.59.1-33.99zm-297.02-90.7c-79.54 0-144-64.34-144-143.98 0-79.53 64.35-143.98 144-143.98 79.54 0 144 64.34 144 143.98 0 79.53-64.35 143.98-144 143.98zm27.11-152.54l-45.01-13.5c-5.16-1.55-8.77-6.78-8.77-12.73 0-7.27 5.3-13.19 11.8-13.19h28.11c4.56 0 8.96 1.29 12.82 3.72 3.24 2.03 7.36 1.91 10.13-.73l11.75-11.21c3.53-3.37 3.33-9.21-.57-12.14-9.1-6.83-20.08-10.77-31.37-11.35V112c0-4.42-3.58-8-8-8h-16c-4.42 0-8 3.58-8 8v16.12c-23.63.63-42.68 20.55-42.68 45.07 0 19.97 12.99 37.81 31.58 43.39l45.01 13.5c5.16 1.55 8.77 6.78 8.77 12.73 0 7.27-5.3 13.19-11.8 13.19h-28.1c-4.56 0-8.96-1.29-12.82-3.72-3.24-2.03-7.36-1.91-10.13.73l-11.75 11.21c-3.53 3.37-3.33 9.21.57 12.14 9.1 6.83 20.08 10.77 31.37 11.35V304c0 4.42 3.58 8 8 8h16c4.42 0 8-3.58 8-8v-16.12c23.63-.63 42.68-20.54 42.68-45.07 0-19.97-12.99-37.81-31.59-43.39z"]},Gu={prefix:"fas",iconName:"search-location",icon:[512,512,[],"f689","M505.04 442.66l-99.71-99.69c-4.5-4.5-10.6-7-17-7h-16.3c27.6-35.3 44-79.69 44-127.99C416.03 93.09 322.92 0 208.02 0S0 93.09 0 207.98s93.11 207.98 208.02 207.98c48.3 0 92.71-16.4 128.01-44v16.3c0 6.4 2.5 12.5 7 17l99.71 99.69c9.4 9.4 24.6 9.4 33.9 0l28.3-28.3c9.4-9.4 9.4-24.59.1-33.99zm-297.02-90.7c-79.54 0-144-64.34-144-143.98 0-79.53 64.35-143.98 144-143.98 79.54 0 144 64.34 144 143.98 0 79.53-64.35 143.98-144 143.98zm.02-239.96c-40.78 0-73.84 33.05-73.84 73.83 0 32.96 48.26 93.05 66.75 114.86a9.24 9.24 0 0 0 14.18 0c18.49-21.81 66.75-81.89 66.75-114.86 0-40.78-33.06-73.83-73.84-73.83zm0 96c-13.26 0-24-10.75-24-24 0-13.26 10.75-24 24-24s24 10.74 24 24c0 13.25-10.75 24-24 24z"]},Vu={prefix:"fas",iconName:"search-minus",icon:[512,512,[],"f010","M304 192v32c0 6.6-5.4 12-12 12H124c-6.6 0-12-5.4-12-12v-32c0-6.6 5.4-12 12-12h168c6.6 0 12 5.4 12 12zm201 284.7L476.7 505c-9.4 9.4-24.6 9.4-33.9 0L343 405.3c-4.5-4.5-7-10.6-7-17V372c-35.3 27.6-79.7 44-128 44C93.1 416 0 322.9 0 208S93.1 0 208 0s208 93.1 208 208c0 48.3-16.4 92.7-44 128h16.3c6.4 0 12.5 2.5 17 7l99.7 99.7c9.3 9.4 9.3 24.6 0 34zM344 208c0-75.2-60.8-136-136-136S72 132.8 72 208s60.8 136 136 136 136-60.8 136-136z"]},Bu={prefix:"fas",iconName:"search-plus",icon:[512,512,[],"f00e","M304 192v32c0 6.6-5.4 12-12 12h-56v56c0 6.6-5.4 12-12 12h-32c-6.6 0-12-5.4-12-12v-56h-56c-6.6 0-12-5.4-12-12v-32c0-6.6 5.4-12 12-12h56v-56c0-6.6 5.4-12 12-12h32c6.6 0 12 5.4 12 12v56h56c6.6 0 12 5.4 12 12zm201 284.7L476.7 505c-9.4 9.4-24.6 9.4-33.9 0L343 405.3c-4.5-4.5-7-10.6-7-17V372c-35.3 27.6-79.7 44-128 44C93.1 416 0 322.9 0 208S93.1 0 208 0s208 93.1 208 208c0 48.3-16.4 92.7-44 128h16.3c6.4 0 12.5 2.5 17 7l99.7 99.7c9.3 9.4 9.3 24.6 0 34zM344 208c0-75.2-60.8-136-136-136S72 132.8 72 208s60.8 136 136 136 136-60.8 136-136z"]},Hu={prefix:"fas",iconName:"seedling",icon:[512,512,[],"f4d8","M64 96H0c0 123.7 100.3 224 224 224v144c0 8.8 7.2 16 16 16h32c8.8 0 16-7.2 16-16V320C288 196.3 187.7 96 64 96zm384-64c-84.2 0-157.4 46.5-195.7 115.2 27.7 30.2 48.2 66.9 59 107.6C424 243.1 512 147.9 512 32h-64z"]},zu={prefix:"fas",iconName:"server",icon:[512,512,[],"f233","M480 160H32c-17.673 0-32-14.327-32-32V64c0-17.673 14.327-32 32-32h448c17.673 0 32 14.327 32 32v64c0 17.673-14.327 32-32 32zm-48-88c-13.255 0-24 10.745-24 24s10.745 24 24 24 24-10.745 24-24-10.745-24-24-24zm-64 0c-13.255 0-24 10.745-24 24s10.745 24 24 24 24-10.745 24-24-10.745-24-24-24zm112 248H32c-17.673 0-32-14.327-32-32v-64c0-17.673 14.327-32 32-32h448c17.673 0 32 14.327 32 32v64c0 17.673-14.327 32-32 32zm-48-88c-13.255 0-24 10.745-24 24s10.745 24 24 24 24-10.745 24-24-10.745-24-24-24zm-64 0c-13.255 0-24 10.745-24 24s10.745 24 24 24 24-10.745 24-24-10.745-24-24-24zm112 248H32c-17.673 0-32-14.327-32-32v-64c0-17.673 14.327-32 32-32h448c17.673 0 32 14.327 32 32v64c0 17.673-14.327 32-32 32zm-48-88c-13.255 0-24 10.745-24 24s10.745 24 24 24 24-10.745 24-24-10.745-24-24-24zm-64 0c-13.255 0-24 10.745-24 24s10.745 24 24 24 24-10.745 24-24-10.745-24-24-24z"]},Uu={prefix:"fas",iconName:"shapes",icon:[512,512,[],"f61f","M128,256A128,128,0,1,0,256,384,128,128,0,0,0,128,256Zm379-54.86L400.07,18.29a37.26,37.26,0,0,0-64.14,0L229,201.14C214.76,225.52,232.58,256,261.09,256H474.91C503.42,256,521.24,225.52,507,201.14ZM480,288H320a32,32,0,0,0-32,32V480a32,32,0,0,0,32,32H480a32,32,0,0,0,32-32V320A32,32,0,0,0,480,288Z"]},Wu={prefix:"fas",iconName:"share",icon:[512,512,[],"f064","M503.691 189.836L327.687 37.851C312.281 24.546 288 35.347 288 56.015v80.053C127.371 137.907 0 170.1 0 322.326c0 61.441 39.581 122.309 83.333 154.132 13.653 9.931 33.111-2.533 28.077-18.631C66.066 312.814 132.917 274.316 288 272.085V360c0 20.7 24.3 31.453 39.687 18.164l176.004-152c11.071-9.562 11.086-26.753 0-36.328z"]},ju={prefix:"fas",iconName:"share-alt",icon:[448,512,[],"f1e0","M352 320c-22.608 0-43.387 7.819-59.79 20.895l-102.486-64.054a96.551 96.551 0 0 0 0-41.683l102.486-64.054C308.613 184.181 329.392 192 352 192c53.019 0 96-42.981 96-96S405.019 0 352 0s-96 42.981-96 96c0 7.158.79 14.13 2.276 20.841L155.79 180.895C139.387 167.819 118.608 160 96 160c-53.019 0-96 42.981-96 96s42.981 96 96 96c22.608 0 43.387-7.819 59.79-20.895l102.486 64.054A96.301 96.301 0 0 0 256 416c0 53.019 42.981 96 96 96s96-42.981 96-96-42.981-96-96-96z"]},Ku={prefix:"fas",iconName:"share-alt-square",icon:[448,512,[],"f1e1","M448 80v352c0 26.51-21.49 48-48 48H48c-26.51 0-48-21.49-48-48V80c0-26.51 21.49-48 48-48h352c26.51 0 48 21.49 48 48zM304 296c-14.562 0-27.823 5.561-37.783 14.671l-67.958-40.775a56.339 56.339 0 0 0 0-27.793l67.958-40.775C276.177 210.439 289.438 216 304 216c30.928 0 56-25.072 56-56s-25.072-56-56-56-56 25.072-56 56c0 4.797.605 9.453 1.74 13.897l-67.958 40.775C171.823 205.561 158.562 200 144 200c-30.928 0-56 25.072-56 56s25.072 56 56 56c14.562 0 27.823-5.561 37.783-14.671l67.958 40.775a56.088 56.088 0 0 0-1.74 13.897c0 30.928 25.072 56 56 56s56-25.072 56-56C360 321.072 334.928 296 304 296z"]},$u={prefix:"fas",iconName:"share-square",icon:[576,512,[],"f14d","M568.482 177.448L424.479 313.433C409.3 327.768 384 317.14 384 295.985v-71.963c-144.575.97-205.566 35.113-164.775 171.353 4.483 14.973-12.846 26.567-25.006 17.33C155.252 383.105 120 326.488 120 269.339c0-143.937 117.599-172.5 264-173.312V24.012c0-21.174 25.317-31.768 40.479-17.448l144.003 135.988c10.02 9.463 10.028 25.425 0 34.896zM384 379.128V448H64V128h50.916a11.99 11.99 0 0 0 8.648-3.693c14.953-15.568 32.237-27.89 51.014-37.676C185.708 80.83 181.584 64 169.033 64H48C21.49 64 0 85.49 0 112v352c0 26.51 21.49 48 48 48h352c26.51 0 48-21.49 48-48v-88.806c0-8.288-8.197-14.066-16.011-11.302a71.83 71.83 0 0 1-34.189 3.377c-7.27-1.046-13.8 4.514-13.8 11.859z"]},Yu={prefix:"fas",iconName:"shekel-sign",icon:[448,512,[],"f20b","M248 168v168c0 8.84 7.16 16 16 16h48c8.84 0 16-7.16 16-16V168c0-75.11-60.89-136-136-136H24C10.75 32 0 42.74 0 56v408c0 8.84 7.16 16 16 16h48c8.84 0 16-7.16 16-16V112h112c30.93 0 56 25.07 56 56zM432 32h-48c-8.84 0-16 7.16-16 16v296c0 30.93-25.07 56-56 56H200V176c0-8.84-7.16-16-16-16h-48c-8.84 0-16 7.16-16 16v280c0 13.25 10.75 24 24 24h168c75.11 0 136-60.89 136-136V48c0-8.84-7.16-16-16-16z"]},qu={prefix:"fas",iconName:"shield-alt",icon:[512,512,[],"f3ed","M466.5 83.7l-192-80a48.15 48.15 0 0 0-36.9 0l-192 80C27.7 91.1 16 108.6 16 128c0 198.5 114.5 335.7 221.5 380.3 11.8 4.9 25.1 4.9 36.9 0C360.1 472.6 496 349.3 496 128c0-19.4-11.7-36.9-29.5-44.3zM256.1 446.3l-.1-381 175.9 73.3c-3.3 151.4-82.1 261.1-175.8 307.7z"]},Xu={prefix:"fas",iconName:"shield-virus",icon:[512,512,[],"e06c","M224,192a16,16,0,1,0,16,16A16,16,0,0,0,224,192ZM466.5,83.68l-192-80A57.4,57.4,0,0,0,256.05,0a57.4,57.4,0,0,0-18.46,3.67l-192,80A47.93,47.93,0,0,0,16,128C16,326.5,130.5,463.72,237.5,508.32a48.09,48.09,0,0,0,36.91,0C360.09,472.61,496,349.3,496,128A48,48,0,0,0,466.5,83.68ZM384,256H371.88c-28.51,0-42.79,34.47-22.63,54.63l8.58,8.57a16,16,0,1,1-22.63,22.63l-8.57-8.58C306.47,313.09,272,327.37,272,355.88V368a16,16,0,0,1-32,0V355.88c0-28.51-34.47-42.79-54.63-22.63l-8.57,8.58a16,16,0,0,1-22.63-22.63l8.58-8.57c20.16-20.16,5.88-54.63-22.63-54.63H128a16,16,0,0,1,0-32h12.12c28.51,0,42.79-34.47,22.63-54.63l-8.58-8.57a16,16,0,0,1,22.63-22.63l8.57,8.58c20.16,20.16,54.63,5.88,54.63-22.63V112a16,16,0,0,1,32,0v12.12c0,28.51,34.47,42.79,54.63,22.63l8.57-8.58a16,16,0,0,1,22.63,22.63l-8.58,8.57C329.09,189.53,343.37,224,371.88,224H384a16,16,0,0,1,0,32Zm-96,0a16,16,0,1,0,16,16A16,16,0,0,0,288,256Z"]},Zu={prefix:"fas",iconName:"ship",icon:[640,512,[],"f21a","M496.616 372.639l70.012-70.012c16.899-16.9 9.942-45.771-12.836-53.092L512 236.102V96c0-17.673-14.327-32-32-32h-64V24c0-13.255-10.745-24-24-24H248c-13.255 0-24 10.745-24 24v40h-64c-17.673 0-32 14.327-32 32v140.102l-41.792 13.433c-22.753 7.313-29.754 36.173-12.836 53.092l70.012 70.012C125.828 416.287 85.587 448 24 448c-13.255 0-24 10.745-24 24v16c0 13.255 10.745 24 24 24 61.023 0 107.499-20.61 143.258-59.396C181.677 487.432 216.021 512 256 512h128c39.979 0 74.323-24.568 88.742-59.396C508.495 491.384 554.968 512 616 512c13.255 0 24-10.745 24-24v-16c0-13.255-10.745-24-24-24-60.817 0-101.542-31.001-119.384-75.361zM192 128h256v87.531l-118.208-37.995a31.995 31.995 0 0 0-19.584 0L192 215.531V128z"]},Qu={prefix:"fas",iconName:"shipping-fast",icon:[640,512,[],"f48b","M624 352h-16V243.9c0-12.7-5.1-24.9-14.1-33.9L494 110.1c-9-9-21.2-14.1-33.9-14.1H416V48c0-26.5-21.5-48-48-48H112C85.5 0 64 21.5 64 48v48H8c-4.4 0-8 3.6-8 8v16c0 4.4 3.6 8 8 8h272c4.4 0 8 3.6 8 8v16c0 4.4-3.6 8-8 8H40c-4.4 0-8 3.6-8 8v16c0 4.4 3.6 8 8 8h208c4.4 0 8 3.6 8 8v16c0 4.4-3.6 8-8 8H8c-4.4 0-8 3.6-8 8v16c0 4.4 3.6 8 8 8h208c4.4 0 8 3.6 8 8v16c0 4.4-3.6 8-8 8H64v128c0 53 43 96 96 96s96-43 96-96h128c0 53 43 96 96 96s96-43 96-96h48c8.8 0 16-7.2 16-16v-32c0-8.8-7.2-16-16-16zM160 464c-26.5 0-48-21.5-48-48s21.5-48 48-48 48 21.5 48 48-21.5 48-48 48zm320 0c-26.5 0-48-21.5-48-48s21.5-48 48-48 48 21.5 48 48-21.5 48-48 48zm80-208H416V144h44.1l99.9 99.9V256z"]},Ju={prefix:"fas",iconName:"shoe-prints",icon:[640,512,[],"f54b","M192 160h32V32h-32c-35.35 0-64 28.65-64 64s28.65 64 64 64zM0 416c0 35.35 28.65 64 64 64h32V352H64c-35.35 0-64 28.65-64 64zm337.46-128c-34.91 0-76.16 13.12-104.73 32-24.79 16.38-44.52 32-104.73 32v128l57.53 15.97c26.21 7.28 53.01 13.12 80.31 15.05 32.69 2.31 65.6.67 97.58-6.2C472.9 481.3 512 429.22 512 384c0-64-84.18-96-174.54-96zM491.42 7.19C459.44.32 426.53-1.33 393.84.99c-27.3 1.93-54.1 7.77-80.31 15.04L256 32v128c60.2 0 79.94 15.62 104.73 32 28.57 18.88 69.82 32 104.73 32C555.82 224 640 192 640 128c0-45.22-39.1-97.3-148.58-120.81z"]},ep={prefix:"fas",iconName:"shopping-bag",icon:[448,512,[],"f290","M352 160v-32C352 57.42 294.579 0 224 0 153.42 0 96 57.42 96 128v32H0v272c0 44.183 35.817 80 80 80h288c44.183 0 80-35.817 80-80V160h-96zm-192-32c0-35.29 28.71-64 64-64s64 28.71 64 64v32H160v-32zm160 120c-13.255 0-24-10.745-24-24s10.745-24 24-24 24 10.745 24 24-10.745 24-24 24zm-192 0c-13.255 0-24-10.745-24-24s10.745-24 24-24 24 10.745 24 24-10.745 24-24 24z"]},tp={prefix:"fas",iconName:"shopping-basket",icon:[576,512,[],"f291","M576 216v16c0 13.255-10.745 24-24 24h-8l-26.113 182.788C514.509 462.435 494.257 480 470.37 480H105.63c-23.887 0-44.139-17.565-47.518-41.212L32 256h-8c-13.255 0-24-10.745-24-24v-16c0-13.255 10.745-24 24-24h67.341l106.78-146.821c10.395-14.292 30.407-17.453 44.701-7.058 14.293 10.395 17.453 30.408 7.058 44.701L170.477 192h235.046L326.12 82.821c-10.395-14.292-7.234-34.306 7.059-44.701 14.291-10.395 34.306-7.235 44.701 7.058L484.659 192H552c13.255 0 24 10.745 24 24zM312 392V280c0-13.255-10.745-24-24-24s-24 10.745-24 24v112c0 13.255 10.745 24 24 24s24-10.745 24-24zm112 0V280c0-13.255-10.745-24-24-24s-24 10.745-24 24v112c0 13.255 10.745 24 24 24s24-10.745 24-24zm-224 0V280c0-13.255-10.745-24-24-24s-24 10.745-24 24v112c0 13.255 10.745 24 24 24s24-10.745 24-24z"]},ip={prefix:"fas",iconName:"shopping-cart",icon:[576,512,[],"f07a","M528.12 301.319l47.273-208C578.806 78.301 567.391 64 551.99 64H159.208l-9.166-44.81C147.758 8.021 137.93 0 126.529 0H24C10.745 0 0 10.745 0 24v16c0 13.255 10.745 24 24 24h69.883l70.248 343.435C147.325 417.1 136 435.222 136 456c0 30.928 25.072 56 56 56s56-25.072 56-56c0-15.674-6.447-29.835-16.824-40h209.647C430.447 426.165 424 440.326 424 456c0 30.928 25.072 56 56 56s56-25.072 56-56c0-22.172-12.888-41.332-31.579-50.405l5.517-24.276c3.413-15.018-8.002-29.319-23.403-29.319H218.117l-6.545-32h293.145c11.206 0 20.92-7.754 23.403-18.681z"]},np={prefix:"fas",iconName:"shower",icon:[512,512,[],"f2cc","M304,320a16,16,0,1,0,16,16A16,16,0,0,0,304,320Zm32-96a16,16,0,1,0,16,16A16,16,0,0,0,336,224Zm32,64a16,16,0,1,0-16-16A16,16,0,0,0,368,288Zm-32,32a16,16,0,1,0-16-16A16,16,0,0,0,336,320Zm-32-64a16,16,0,1,0,16,16A16,16,0,0,0,304,256Zm128-32a16,16,0,1,0-16-16A16,16,0,0,0,432,224Zm-48,16a16,16,0,1,0,16-16A16,16,0,0,0,384,240Zm-16-48a16,16,0,1,0,16,16A16,16,0,0,0,368,192Zm96,32a16,16,0,1,0,16,16A16,16,0,0,0,464,224Zm32-32a16,16,0,1,0,16,16A16,16,0,0,0,496,192Zm-64,64a16,16,0,1,0,16,16A16,16,0,0,0,432,256Zm-32,32a16,16,0,1,0,16,16A16,16,0,0,0,400,288Zm-64,64a16,16,0,1,0,16,16A16,16,0,0,0,336,352Zm-32,32a16,16,0,1,0,16,16A16,16,0,0,0,304,384Zm64-64a16,16,0,1,0,16,16A16,16,0,0,0,368,320Zm21.65-218.35-11.3-11.31a16,16,0,0,0-22.63,0L350.05,96A111.19,111.19,0,0,0,272,64c-19.24,0-37.08,5.3-52.9,13.85l-10-10A121.72,121.72,0,0,0,123.44,32C55.49,31.5,0,92.91,0,160.85V464a16,16,0,0,0,16,16H48a16,16,0,0,0,16-16V158.4c0-30.15,21-58.2,51-61.93a58.38,58.38,0,0,1,48.93,16.67l10,10C165.3,138.92,160,156.76,160,176a111.23,111.23,0,0,0,32,78.05l-5.66,5.67a16,16,0,0,0,0,22.62l11.3,11.31a16,16,0,0,0,22.63,0L389.65,124.28A16,16,0,0,0,389.65,101.65Z"]},sp={prefix:"fas",iconName:"shuttle-van",icon:[640,512,[],"f5b6","M628.88 210.65L494.39 49.27A48.01 48.01 0 0 0 457.52 32H32C14.33 32 0 46.33 0 64v288c0 17.67 14.33 32 32 32h32c0 53.02 42.98 96 96 96s96-42.98 96-96h128c0 53.02 42.98 96 96 96s96-42.98 96-96h32c17.67 0 32-14.33 32-32V241.38c0-11.23-3.94-22.1-11.12-30.73zM64 192V96h96v96H64zm96 240c-26.51 0-48-21.49-48-48s21.49-48 48-48 48 21.49 48 48-21.49 48-48 48zm160-240h-96V96h96v96zm160 240c-26.51 0-48-21.49-48-48s21.49-48 48-48 48 21.49 48 48-21.49 48-48 48zm-96-240V96h66.02l80 96H384z"]},rp={prefix:"fas",iconName:"sign",icon:[512,512,[],"f4d9","M496 64H128V16c0-8.8-7.2-16-16-16H80c-8.8 0-16 7.2-16 16v48H16C7.2 64 0 71.2 0 80v32c0 8.8 7.2 16 16 16h48v368c0 8.8 7.2 16 16 16h32c8.8 0 16-7.2 16-16V128h368c8.8 0 16-7.2 16-16V80c0-8.8-7.2-16-16-16zM160 384h320V160H160v224z"]},op={prefix:"fas",iconName:"sign-in-alt",icon:[512,512,[],"f2f6","M416 448h-84c-6.6 0-12-5.4-12-12v-40c0-6.6 5.4-12 12-12h84c17.7 0 32-14.3 32-32V160c0-17.7-14.3-32-32-32h-84c-6.6 0-12-5.4-12-12V76c0-6.6 5.4-12 12-12h84c53 0 96 43 96 96v192c0 53-43 96-96 96zm-47-201L201 79c-15-15-41-4.5-41 17v96H24c-13.3 0-24 10.7-24 24v96c0 13.3 10.7 24 24 24h136v96c0 21.5 26 32 41 17l168-168c9.3-9.4 9.3-24.6 0-34z"]},ap={prefix:"fas",iconName:"sign-language",icon:[448,512,[],"f2a7","M91.434 483.987c-.307-16.018 13.109-29.129 29.13-29.129h62.293v-5.714H56.993c-16.021 0-29.437-13.111-29.13-29.129C28.16 404.491 40.835 392 56.428 392h126.429v-5.714H29.136c-16.021 0-29.437-13.111-29.13-29.129.297-15.522 12.973-28.013 28.566-28.013h154.286v-5.714H57.707c-16.021 0-29.437-13.111-29.13-29.129.297-15.522 12.973-28.013 28.566-28.013h168.566l-31.085-22.606c-12.762-9.281-15.583-27.149-6.302-39.912 9.281-12.761 27.15-15.582 39.912-6.302l123.361 89.715a34.287 34.287 0 0 1 14.12 27.728v141.136c0 15.91-10.946 29.73-26.433 33.374l-80.471 18.934a137.16 137.16 0 0 1-31.411 3.646H120c-15.593-.001-28.269-12.492-28.566-28.014zm73.249-225.701h36.423l-11.187-8.136c-18.579-13.511-20.313-40.887-3.17-56.536l-13.004-16.7c-9.843-12.641-28.43-15.171-40.88-5.088-12.065 9.771-14.133 27.447-4.553 39.75l36.371 46.71zm283.298-2.103l-5.003-152.452c-.518-15.771-13.722-28.136-29.493-27.619-15.773.518-28.137 13.722-27.619 29.493l1.262 38.415L283.565 11.019c-9.58-12.303-27.223-14.63-39.653-5.328-12.827 9.599-14.929 28.24-5.086 40.881l76.889 98.745-4.509 3.511-94.79-121.734c-9.58-12.303-27.223-14.63-39.653-5.328-12.827 9.599-14.929 28.24-5.086 40.881l94.443 121.288-4.509 3.511-77.675-99.754c-9.58-12.303-27.223-14.63-39.653-5.328-12.827 9.599-14.929 28.24-5.086 40.881l52.053 66.849c12.497-8.257 29.055-8.285 41.69.904l123.36 89.714c10.904 7.93 17.415 20.715 17.415 34.198v16.999l61.064-47.549a34.285 34.285 0 0 0 13.202-28.177z"]},lp={prefix:"fas",iconName:"sign-out-alt",icon:[512,512,[],"f2f5","M497 273L329 441c-15 15-41 4.5-41-17v-96H152c-13.3 0-24-10.7-24-24v-96c0-13.3 10.7-24 24-24h136V88c0-21.4 25.9-32 41-17l168 168c9.3 9.4 9.3 24.6 0 34zM192 436v-40c0-6.6-5.4-12-12-12H96c-17.7 0-32-14.3-32-32V160c0-17.7 14.3-32 32-32h84c6.6 0 12-5.4 12-12V76c0-6.6-5.4-12-12-12H96c-53 0-96 43-96 96v192c0 53 43 96 96 96h84c6.6 0 12-5.4 12-12z"]},cp={prefix:"fas",iconName:"signal",icon:[640,512,[],"f012","M216 288h-48c-8.84 0-16 7.16-16 16v192c0 8.84 7.16 16 16 16h48c8.84 0 16-7.16 16-16V304c0-8.84-7.16-16-16-16zM88 384H40c-8.84 0-16 7.16-16 16v96c0 8.84 7.16 16 16 16h48c8.84 0 16-7.16 16-16v-96c0-8.84-7.16-16-16-16zm256-192h-48c-8.84 0-16 7.16-16 16v288c0 8.84 7.16 16 16 16h48c8.84 0 16-7.16 16-16V208c0-8.84-7.16-16-16-16zm128-96h-48c-8.84 0-16 7.16-16 16v384c0 8.84 7.16 16 16 16h48c8.84 0 16-7.16 16-16V112c0-8.84-7.16-16-16-16zM600 0h-48c-8.84 0-16 7.16-16 16v480c0 8.84 7.16 16 16 16h48c8.84 0 16-7.16 16-16V16c0-8.84-7.16-16-16-16z"]},hp={prefix:"fas",iconName:"signature",icon:[640,512,[],"f5b7","M623.2 192c-51.8 3.5-125.7 54.7-163.1 71.5-29.1 13.1-54.2 24.4-76.1 24.4-22.6 0-26-16.2-21.3-51.9 1.1-8 11.7-79.2-42.7-76.1-25.1 1.5-64.3 24.8-169.5 126L192 182.2c30.4-75.9-53.2-151.5-129.7-102.8L7.4 116.3C0 121-2.2 130.9 2.5 138.4l17.2 27c4.7 7.5 14.6 9.7 22.1 4.9l58-38.9c18.4-11.7 40.7 7.2 32.7 27.1L34.3 404.1C27.5 421 37 448 64 448c8.3 0 16.5-3.2 22.6-9.4 42.2-42.2 154.7-150.7 211.2-195.8-2.2 28.5-2.1 58.9 20.6 83.8 15.3 16.8 37.3 25.3 65.5 25.3 35.6 0 68-14.6 102.3-30 33-14.8 99-62.6 138.4-65.8 8.5-.7 15.2-7.3 15.2-15.8v-32.1c.2-9.1-7.5-16.8-16.6-16.2z"]},dp={prefix:"fas",iconName:"sim-card",icon:[384,512,[],"f7c4","M0 64v384c0 35.3 28.7 64 64 64h256c35.3 0 64-28.7 64-64V128L256 0H64C28.7 0 0 28.7 0 64zm224 192h-64v-64h64v64zm96 0h-64v-64h32c17.7 0 32 14.3 32 32v32zm-64 128h64v32c0 17.7-14.3 32-32 32h-32v-64zm-96 0h64v64h-64v-64zm-96 0h64v64H96c-17.7 0-32-14.3-32-32v-32zm0-96h256v64H64v-64zm0-64c0-17.7 14.3-32 32-32h32v64H64v-32z"]},up={prefix:"fas",iconName:"sink",icon:[512,512,[],"e06d","M32,416a96,96,0,0,0,96,96H384a96,96,0,0,0,96-96V384H32ZM496,288H400V256h64a16,16,0,0,0,16-16V224a16,16,0,0,0-16-16H384a32,32,0,0,0-32,32v48H288V96a32,32,0,0,1,64,0v16a16,16,0,0,0,16,16h32a16,16,0,0,0,16-16V96A96.16,96.16,0,0,0,300.87,1.86C255.29,10.71,224,53.36,224,99.79V288H160V240a32,32,0,0,0-32-32H48a16,16,0,0,0-16,16v16a16,16,0,0,0,16,16h64v32H16A16,16,0,0,0,0,304v32a16,16,0,0,0,16,16H496a16,16,0,0,0,16-16V304A16,16,0,0,0,496,288Z"]},pp={prefix:"fas",iconName:"sitemap",icon:[640,512,[],"f0e8","M128 352H32c-17.67 0-32 14.33-32 32v96c0 17.67 14.33 32 32 32h96c17.67 0 32-14.33 32-32v-96c0-17.67-14.33-32-32-32zm-24-80h192v48h48v-48h192v48h48v-57.59c0-21.17-17.23-38.41-38.41-38.41H344v-64h40c17.67 0 32-14.33 32-32V32c0-17.67-14.33-32-32-32H256c-17.67 0-32 14.33-32 32v96c0 17.67 14.33 32 32 32h40v64H94.41C73.23 224 56 241.23 56 262.41V320h48v-48zm264 80h-96c-17.67 0-32 14.33-32 32v96c0 17.67 14.33 32 32 32h96c17.67 0 32-14.33 32-32v-96c0-17.67-14.33-32-32-32zm240 0h-96c-17.67 0-32 14.33-32 32v96c0 17.67 14.33 32 32 32h96c17.67 0 32-14.33 32-32v-96c0-17.67-14.33-32-32-32z"]},gp={prefix:"fas",iconName:"skating",icon:[448,512,[],"f7c5","M400 0c-26.5 0-48 21.5-48 48s21.5 48 48 48 48-21.5 48-48-21.5-48-48-48zm0 448c-8.8 0-16 7.2-16 16s-7.2 16-16 16h-96c-8.8 0-16 7.2-16 16s7.2 16 16 16h96c26.5 0 48-21.5 48-48 0-8.8-7.2-16-16-16zm-282.2 8.6c-6.2 6.2-16.4 6.3-22.6 0l-67.9-67.9c-6.2-6.2-16.4-6.2-22.6 0s-6.2 16.4 0 22.6l67.9 67.9c9.4 9.4 21.7 14 34 14s24.6-4.7 33.9-14c6.2-6.2 6.2-16.4 0-22.6s-16.4-6.3-22.7 0zm56.1-179.8l-93.7 93.7c-12.5 12.5-12.5 32.8 0 45.2 6.2 6.2 14.4 9.4 22.6 9.4s16.4-3.1 22.6-9.4l91.9-91.9-30.2-30.2c-5-5-9.4-10.7-13.2-16.8zM128 160h105.5l-20.1 17.2c-13.5 11.5-21.6 28.4-22.3 46.1-.7 17.8 6.1 35.2 18.7 47.7l78.2 78.2V432c0 17.7 14.3 32 32 32s32-14.3 32-32v-89.4c0-12.6-5.1-25-14.1-33.9l-61-61c.5-.4 1.2-.6 1.7-1.1l82.3-82.3c11.5-11.5 14.9-28.6 8.7-43.6-6.2-15-20.7-24.7-37-24.7H128c-17.7 0-32 14.3-32 32s14.3 32 32 32z"]},fp={prefix:"fas",iconName:"skiing",icon:[512,512,[],"f7c9","M432 96c26.5 0 48-21.5 48-48S458.5 0 432 0s-48 21.5-48 48 21.5 48 48 48zm73 356.1c-9.4-9.4-24.6-9.4-33.9 0-12.1 12.1-30.5 15.4-45.1 8.7l-135.8-70.2 49.2-73.8c12.7-19 10.2-44.5-6-60.6L293 215.7l-107-53.1c-2.9 19.9 3.4 40 17.7 54.4l75.1 75.2-45.9 68.8L35 258.7c-11.7-6-26.2-1.5-32.3 10.3-6.1 11.8-1.5 26.3 10.3 32.3l391.9 202.5c11.9 5.5 24.5 8.1 37.1 8.1 23.2 0 46-9 63-26 9.3-9.3 9.3-24.5 0-33.8zM120 91.6l-11.5 22.5c14.4 7.3 31.2 4.9 42.8-4.8l47.2 23.4c-.1.1-.1.2-.2.3l114.5 56.8 32.4-13 6.4 19.1c4 12.1 12.6 22 24 27.7l58.1 29c15.9 7.9 35 1.5 42.9-14.3 7.9-15.8 1.5-35-14.3-42.9l-52.1-26.1-17.1-51.2c-8.1-24.2-40.9-56.6-84.5-39.2l-81.2 32.5-62.5-31c.3-14.5-7.2-28.6-20.9-35.6l-11.1 21.7h-.2l-34.4-7c-1.8-.4-3.7.2-5 1.7-1.9 2.2-1.7 5.5.5 7.4l26.2 23z"]},mp={prefix:"fas",iconName:"skiing-nordic",icon:[576,512,[],"f7ca","M336 96c26.5 0 48-21.5 48-48S362.5 0 336 0s-48 21.5-48 48 21.5 48 48 48zm216 320c-13.2 0-24 10.7-24 24 0 13.2-10.8 24-24 24h-69.5L460 285.6c11.7-4.7 20.1-16.2 20.1-29.6 0-17.7-14.3-32-32-32h-44L378 170.8c-12.5-25.5-35.5-44.2-61.8-50.9L245 98.7c-28.3-6.8-57.8-.5-80.8 17.1l-39.7 30.4c-14 10.7-16.7 30.8-5.9 44.9.7.9 1.7 1.3 2.4 2.1L66.9 464H24c-13.2 0-24 10.7-24 24s10.8 24 24 24h480c39.7 0 72-32.3 72-72 0-13.2-10.8-24-24-24zm-260.5 48h-96.9l43.1-91-22-13c-12.1-7.2-21.9-16.9-29.5-27.8L123.7 464H99.5l52.3-261.4c4.1-1 8.1-2.9 11.7-5.6l39.7-30.4c7.7-5.9 17.4-8 25.3-6.1l14.7 4.4-37.5 87.4c-12.6 29.5-1.3 64 26.3 80.3l85 50.2-25.5 81.2zm110.6 0h-43.6l23.6-75.5c5.9-20.8-2.9-43.1-21.6-54.4L299.3 298l31.3-78.3 20.3 41.4c8 16.3 24.9 26.9 43.1 26.9h33.3l-25.2 176z"]},vp={prefix:"fas",iconName:"skull",icon:[512,512,[],"f54c","M256 0C114.6 0 0 100.3 0 224c0 70.1 36.9 132.6 94.5 173.7 9.6 6.9 15.2 18.1 13.5 29.9l-9.4 66.2c-1.4 9.6 6 18.2 15.7 18.2H192v-56c0-4.4 3.6-8 8-8h16c4.4 0 8 3.6 8 8v56h64v-56c0-4.4 3.6-8 8-8h16c4.4 0 8 3.6 8 8v56h77.7c9.7 0 17.1-8.6 15.7-18.2l-9.4-66.2c-1.7-11.7 3.8-23 13.5-29.9C475.1 356.6 512 294.1 512 224 512 100.3 397.4 0 256 0zm-96 320c-35.3 0-64-28.7-64-64s28.7-64 64-64 64 28.7 64 64-28.7 64-64 64zm192 0c-35.3 0-64-28.7-64-64s28.7-64 64-64 64 28.7 64 64-28.7 64-64 64z"]},yp={prefix:"fas",iconName:"skull-crossbones",icon:[448,512,[],"f714","M439.15 453.06L297.17 384l141.99-69.06c7.9-3.95 11.11-13.56 7.15-21.46L432 264.85c-3.95-7.9-13.56-11.11-21.47-7.16L224 348.41 37.47 257.69c-7.9-3.95-17.51-.75-21.47 7.16L1.69 293.48c-3.95 7.9-.75 17.51 7.15 21.46L150.83 384 8.85 453.06c-7.9 3.95-11.11 13.56-7.15 21.47l14.31 28.63c3.95 7.9 13.56 11.11 21.47 7.15L224 419.59l186.53 90.72c7.9 3.95 17.51.75 21.47-7.15l14.31-28.63c3.95-7.91.74-17.52-7.16-21.47zM150 237.28l-5.48 25.87c-2.67 12.62 5.42 24.85 16.45 24.85h126.08c11.03 0 19.12-12.23 16.45-24.85l-5.5-25.87c41.78-22.41 70-62.75 70-109.28C368 57.31 303.53 0 224 0S80 57.31 80 128c0 46.53 28.22 86.87 70 109.28zM280 112c17.65 0 32 14.35 32 32s-14.35 32-32 32-32-14.35-32-32 14.35-32 32-32zm-112 0c17.65 0 32 14.35 32 32s-14.35 32-32 32-32-14.35-32-32 14.35-32 32-32z"]},Cp={prefix:"fas",iconName:"slash",icon:[640,512,[],"f715","M594.53 508.63L6.18 53.9c-6.97-5.42-8.23-15.47-2.81-22.45L23.01 6.18C28.43-.8 38.49-2.06 45.47 3.37L633.82 458.1c6.97 5.42 8.23 15.47 2.81 22.45l-19.64 25.27c-5.42 6.98-15.48 8.23-22.46 2.81z"]},bp={prefix:"fas",iconName:"sleigh",icon:[640,512,[],"f7cc","M612.7 350.7l-9.3-7.4c-6.9-5.5-17-4.4-22.5 2.5l-10 12.5c-5.5 6.9-4.4 17 2.5 22.5l9.3 7.4c5.9 4.7 9.2 11.7 9.2 19.2 0 13.6-11 24.6-24.6 24.6H48c-8.8 0-16 7.2-16 16v16c0 8.8 7.2 16 16 16h516c39 0 73.7-29.3 75.9-68.3 1.4-23.8-8.7-46.3-27.2-61zM32 224c0 59.6 40.9 109.2 96 123.5V400h64v-48h192v48h64v-48c53 0 96-43 96-96v-96c17.7 0 32-14.3 32-32s-14.3-32-32-32h-96v64c0 35.3-28.7 64-64 64h-20.7c-65.8 0-125.9-37.2-155.3-96-29.4-58.8-89.6-96-155.3-96H32C14.3 32 0 46.3 0 64s14.3 32 32 32v128z"]},Sp={prefix:"fas",iconName:"sliders-h",icon:[512,512,[],"f1de","M496 384H160v-16c0-8.8-7.2-16-16-16h-32c-8.8 0-16 7.2-16 16v16H16c-8.8 0-16 7.2-16 16v32c0 8.8 7.2 16 16 16h80v16c0 8.8 7.2 16 16 16h32c8.8 0 16-7.2 16-16v-16h336c8.8 0 16-7.2 16-16v-32c0-8.8-7.2-16-16-16zm0-160h-80v-16c0-8.8-7.2-16-16-16h-32c-8.8 0-16 7.2-16 16v16H16c-8.8 0-16 7.2-16 16v32c0 8.8 7.2 16 16 16h336v16c0 8.8 7.2 16 16 16h32c8.8 0 16-7.2 16-16v-16h80c8.8 0 16-7.2 16-16v-32c0-8.8-7.2-16-16-16zm0-160H288V48c0-8.8-7.2-16-16-16h-32c-8.8 0-16 7.2-16 16v16H16C7.2 64 0 71.2 0 80v32c0 8.8 7.2 16 16 16h208v16c0 8.8 7.2 16 16 16h32c8.8 0 16-7.2 16-16v-16h208c8.8 0 16-7.2 16-16V80c0-8.8-7.2-16-16-16z"]},wp={prefix:"fas",iconName:"smile",icon:[496,512,[],"f118","M248 8C111 8 0 119 0 256s111 248 248 248 248-111 248-248S385 8 248 8zm80 168c17.7 0 32 14.3 32 32s-14.3 32-32 32-32-14.3-32-32 14.3-32 32-32zm-160 0c17.7 0 32 14.3 32 32s-14.3 32-32 32-32-14.3-32-32 14.3-32 32-32zm194.8 170.2C334.3 380.4 292.5 400 248 400s-86.3-19.6-114.8-53.8c-13.6-16.3 11-36.7 24.6-20.5 22.4 26.9 55.2 42.2 90.2 42.2s67.8-15.4 90.2-42.2c13.4-16.2 38.1 4.2 24.6 20.5z"]},xp={prefix:"fas",iconName:"smile-beam",icon:[496,512,[],"f5b8","M248 8C111 8 0 119 0 256s111 248 248 248 248-111 248-248S385 8 248 8zM112 223.4c3.3-42.1 32.2-71.4 56-71.4s52.7 29.3 56 71.4c.7 8.6-10.8 11.9-14.9 4.5l-9.5-17c-7.7-13.7-19.2-21.6-31.5-21.6s-23.8 7.9-31.5 21.6l-9.5 17c-4.3 7.4-15.8 4-15.1-4.5zm250.8 122.8C334.3 380.4 292.5 400 248 400s-86.3-19.6-114.8-53.8c-13.5-16.3 11-36.7 24.6-20.5 22.4 26.9 55.2 42.2 90.2 42.2s67.8-15.4 90.2-42.2c13.6-16.2 38.1 4.3 24.6 20.5zm6.2-118.3l-9.5-17c-7.7-13.7-19.2-21.6-31.5-21.6s-23.8 7.9-31.5 21.6l-9.5 17c-4.1 7.3-15.6 4-14.9-4.5 3.3-42.1 32.2-71.4 56-71.4s52.7 29.3 56 71.4c.6 8.6-11 11.9-15.1 4.5z"]},Ep={prefix:"fas",iconName:"smile-wink",icon:[496,512,[],"f4da","M0 256c0 137 111 248 248 248s248-111 248-248S385 8 248 8 0 119 0 256zm200-48c0 17.7-14.3 32-32 32s-32-14.3-32-32 14.3-32 32-32 32 14.3 32 32zm158.5 16.5c-14.8-13.2-46.2-13.2-61 0L288 233c-8.3 7.4-21.6.4-19.8-10.8 4-25.2 34.2-42.1 59.9-42.1S384 197 388 222.2c1.7 11.1-11.4 18.3-19.8 10.8l-9.7-8.5zM157.8 325.8C180.2 352.7 213 368 248 368s67.8-15.4 90.2-42.2c13.6-16.2 38.1 4.2 24.6 20.5C334.3 380.4 292.5 400 248 400s-86.3-19.6-114.8-53.8c-13.5-16.3 11.2-36.7 24.6-20.4z"]},Mp={prefix:"fas",iconName:"smog",icon:[640,512,[],"f75f","M624 368H80c-8.8 0-16 7.2-16 16v16c0 8.8 7.2 16 16 16h544c8.8 0 16-7.2 16-16v-16c0-8.8-7.2-16-16-16zm-480 96H16c-8.8 0-16 7.2-16 16v16c0 8.8 7.2 16 16 16h128c8.8 0 16-7.2 16-16v-16c0-8.8-7.2-16-16-16zm416 0H224c-8.8 0-16 7.2-16 16v16c0 8.8 7.2 16 16 16h336c8.8 0 16-7.2 16-16v-16c0-8.8-7.2-16-16-16zM144 288h156.1c22.5 19.7 51.6 32 83.9 32s61.3-12.3 83.9-32H528c61.9 0 112-50.1 112-112S589.9 64 528 64c-18 0-34.7 4.6-49.7 12.1C454 31 406.8 0 352 0c-41 0-77.8 17.3-104 44.8C221.8 17.3 185 0 144 0 64.5 0 0 64.5 0 144s64.5 144 144 144z"]},Ap={prefix:"fas",iconName:"smoking",icon:[640,512,[],"f48d","M632 352h-48c-4.4 0-8 3.6-8 8v144c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V360c0-4.4-3.6-8-8-8zM553.3 87.1c-5.7-3.8-9.3-10-9.3-16.8V8c0-4.4-3.6-8-8-8h-48c-4.4 0-8 3.6-8 8v62.3c0 22 10.2 43.4 28.6 55.4 42.2 27.3 67.4 73.8 67.4 124V280c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8v-30.3c0-65.5-32.4-126.2-86.7-162.6zM432 352H48c-26.5 0-48 21.5-48 48v64c0 26.5 21.5 48 48 48h384c8.8 0 16-7.2 16-16V368c0-8.8-7.2-16-16-16zm-32 112H224v-64h176v64zm87.7-322.4C463.8 125 448 99.3 448 70.3V8c0-4.4-3.6-8-8-8h-48c-4.4 0-8 3.6-8 8v66.4c0 43.7 24.6 81.6 60.3 106.7 22.4 15.7 35.7 41.2 35.7 68.6V280c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8v-30.3c0-43.3-21-83.4-56.3-108.1zM536 352h-48c-4.4 0-8 3.6-8 8v144c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V360c0-4.4-3.6-8-8-8z"]},Tp={prefix:"fas",iconName:"smoking-ban",icon:[512,512,[],"f54d","M96 304c0 8.8 7.2 16 16 16h117.5l-96-96H112c-8.8 0-16 7.2-16 16v64zM256 0C114.6 0 0 114.6 0 256s114.6 256 256 256 256-114.6 256-256S397.4 0 256 0zm0 448c-105.9 0-192-86.1-192-192 0-41.4 13.3-79.7 35.7-111.1l267.4 267.4C335.7 434.7 297.4 448 256 448zm45.2-192H384v32h-50.8l-32-32zm111.1 111.1L365.2 320H400c8.8 0 16-7.2 16-16v-64c0-8.8-7.2-16-16-16H269.2L144.9 99.7C176.3 77.3 214.6 64 256 64c105.9 0 192 86.1 192 192 0 41.4-13.3 79.7-35.7 111.1zM320.6 128c-15.6 0-28.6-11.2-31.4-25.9-.7-3.6-4-6.1-7.7-6.1h-16.2c-5 0-8.7 4.5-8 9.4 4.6 30.9 31.2 54.6 63.3 54.6 15.6 0 28.6 11.2 31.4 25.9.7 3.6 4 6.1 7.7 6.1h16.2c5 0 8.7-4.5 8-9.4-4.6-30.9-31.2-54.6-63.3-54.6z"]},Dp={prefix:"fas",iconName:"sms",icon:[512,512,[],"f7cd","M256 32C114.6 32 0 125.1 0 240c0 49.6 21.4 95 57 130.7C44.5 421.1 2.7 466 2.2 466.5c-2.2 2.3-2.8 5.7-1.5 8.7 1.3 3 4.1 4.8 7.3 4.8 66.3 0 116-31.8 140.6-51.4 32.7 12.3 69 19.4 107.4 19.4 141.4 0 256-93.1 256-208S397.4 32 256 32zM128.2 304H116c-4.4 0-8-3.6-8-8v-16c0-4.4 3.6-8 8-8h12.3c6 0 10.4-3.5 10.4-6.6 0-1.3-.8-2.7-2.1-3.8l-21.9-18.8c-8.5-7.2-13.3-17.5-13.3-28.1 0-21.3 19-38.6 42.4-38.6H156c4.4 0 8 3.6 8 8v16c0 4.4-3.6 8-8 8h-12.3c-6 0-10.4 3.5-10.4 6.6 0 1.3.8 2.7 2.1 3.8l21.9 18.8c8.5 7.2 13.3 17.5 13.3 28.1.1 21.3-19 38.6-42.4 38.6zm191.8-8c0 4.4-3.6 8-8 8h-16c-4.4 0-8-3.6-8-8v-68.2l-24.8 55.8c-2.9 5.9-11.4 5.9-14.3 0L224 227.8V296c0 4.4-3.6 8-8 8h-16c-4.4 0-8-3.6-8-8V192c0-8.8 7.2-16 16-16h16c6.1 0 11.6 3.4 14.3 8.8l17.7 35.4 17.7-35.4c2.7-5.4 8.3-8.8 14.3-8.8h16c8.8 0 16 7.2 16 16v104zm48.3 8H356c-4.4 0-8-3.6-8-8v-16c0-4.4 3.6-8 8-8h12.3c6 0 10.4-3.5 10.4-6.6 0-1.3-.8-2.7-2.1-3.8l-21.9-18.8c-8.5-7.2-13.3-17.5-13.3-28.1 0-21.3 19-38.6 42.4-38.6H396c4.4 0 8 3.6 8 8v16c0 4.4-3.6 8-8 8h-12.3c-6 0-10.4 3.5-10.4 6.6 0 1.3.8 2.7 2.1 3.8l21.9 18.8c8.5 7.2 13.3 17.5 13.3 28.1.1 21.3-18.9 38.6-42.3 38.6z"]},Ip={prefix:"fas",iconName:"snowboarding",icon:[512,512,[],"f7ce","M432 96c26.5 0 48-21.5 48-48S458.5 0 432 0s-48 21.5-48 48 21.5 48 48 48zm28.8 153.6c5.8 4.3 12.5 6.4 19.2 6.4 9.7 0 19.3-4.4 25.6-12.8 10.6-14.1 7.8-34.2-6.4-44.8l-111.4-83.5c-13.8-10.3-29.1-18.4-45.4-23.8l-63.7-21.2-26.1-52.1C244.7 2 225.5-4.4 209.7 3.5c-15.8 7.9-22.2 27.1-14.3 42.9l29.1 58.1c5.7 11.4 15.6 19.9 27.7 24l16.4 5.5-41.2 20.6c-21.8 10.9-35.4 32.8-35.4 57.2v53.1l-74.1 24.7c-16.8 5.6-25.8 23.7-20.2 40.5 1.7 5.2 4.9 9.4 8.7 12.9l-38.7-14.1c-9.7-3.5-17.4-10.6-21.8-20-5.6-12-19.9-17.2-31.9-11.6s-17.2 19.9-11.6 31.9c9.8 21 27.1 36.9 48.9 44.8l364.8 132.7c9.7 3.5 19.7 5.3 29.7 5.3 12.5 0 24.9-2.7 36.5-8.2 12-5.6 17.2-19.9 11.6-31.9S474 454.7 462 460.3c-9.3 4.4-19.8 4.8-29.5 1.3l-90.8-33.1c8.7-4.1 15.6-11.8 17.8-21.9l21.9-102c3.9-18.2-3.2-37.2-18.1-48.4l-52-39 66-30.5 83.5 62.9zm-144.4 51.7l-19.7 92c-1.5 7.1-.1 13.9 2.8 20l-169.4-61.6c2.7-.2 5.4-.4 8-1.3l85-28.4c19.6-6.5 32.8-24.8 32.8-45.5V256l60.5 45.3z"]},Rp={prefix:"fas",iconName:"snowflake",icon:[448,512,[],"f2dc","M440.3 345.2l-33.8-19.5 26-7c8.2-2.2 13.1-10.7 10.9-18.9l-4-14.9c-2.2-8.2-10.7-13.1-18.9-10.9l-70.8 19-63.9-37 63.8-36.9 70.8 19c8.2 2.2 16.7-2.7 18.9-10.9l4-14.9c2.2-8.2-2.7-16.7-10.9-18.9l-26-7 33.8-19.5c7.4-4.3 9.9-13.7 5.7-21.1L430.4 119c-4.3-7.4-13.7-9.9-21.1-5.7l-33.8 19.5 7-26c2.2-8.2-2.7-16.7-10.9-18.9l-14.9-4c-8.2-2.2-16.7 2.7-18.9 10.9l-19 70.8-62.8 36.2v-77.5l53.7-53.7c6.2-6.2 6.2-16.4 0-22.6l-11.3-11.3c-6.2-6.2-16.4-6.2-22.6 0L256 56.4V16c0-8.8-7.2-16-16-16h-32c-8.8 0-16 7.2-16 16v40.4l-19.7-19.7c-6.2-6.2-16.4-6.2-22.6 0L138.3 48c-6.3 6.2-6.3 16.4 0 22.6l53.7 53.7v77.5l-62.8-36.2-19-70.8c-2.2-8.2-10.7-13.1-18.9-10.9l-14.9 4c-8.2 2.2-13.1 10.7-10.9 18.9l7 26-33.8-19.5c-7.4-4.3-16.8-1.7-21.1 5.7L2.1 145.7c-4.3 7.4-1.7 16.8 5.7 21.1l33.8 19.5-26 7c-8.3 2.2-13.2 10.7-11 19l4 14.9c2.2 8.2 10.7 13.1 18.9 10.9l70.8-19 63.8 36.9-63.8 36.9-70.8-19c-8.2-2.2-16.7 2.7-18.9 10.9l-4 14.9c-2.2 8.2 2.7 16.7 10.9 18.9l26 7-33.8 19.6c-7.4 4.3-9.9 13.7-5.7 21.1l15.5 26.8c4.3 7.4 13.7 9.9 21.1 5.7l33.8-19.5-7 26c-2.2 8.2 2.7 16.7 10.9 18.9l14.9 4c8.2 2.2 16.7-2.7 18.9-10.9l19-70.8 62.8-36.2v77.5l-53.7 53.7c-6.3 6.2-6.3 16.4 0 22.6l11.3 11.3c6.2 6.2 16.4 6.2 22.6 0l19.7-19.7V496c0 8.8 7.2 16 16 16h32c8.8 0 16-7.2 16-16v-40.4l19.7 19.7c6.2 6.2 16.4 6.2 22.6 0l11.3-11.3c6.2-6.2 6.2-16.4 0-22.6L256 387.7v-77.5l62.8 36.2 19 70.8c2.2 8.2 10.7 13.1 18.9 10.9l14.9-4c8.2-2.2 13.1-10.7 10.9-18.9l-7-26 33.8 19.5c7.4 4.3 16.8 1.7 21.1-5.7l15.5-26.8c4.3-7.3 1.8-16.8-5.6-21z"]},Lp={prefix:"fas",iconName:"snowman",icon:[512,512,[],"f7d0","M510.9 152.3l-5.9-14.5c-3.3-8-12.6-11.9-20.8-8.7L456 140.6v-29c0-8.6-7.2-15.6-16-15.6h-16c-8.8 0-16 7-16 15.6v46.9c0 .5.3 1 .3 1.5l-56.4 23c-5.9-10-13.3-18.9-22-26.6 13.6-16.6 22-37.4 22-60.5 0-53-43-96-96-96s-96 43-96 96c0 23.1 8.5 43.9 22 60.5-8.7 7.7-16 16.6-22 26.6l-56.4-23c.1-.5.3-1 .3-1.5v-46.9C104 103 96.8 96 88 96H72c-8.8 0-16 7-16 15.6v29l-28.1-11.5c-8.2-3.2-17.5.7-20.8 8.7l-5.9 14.5c-3.3 8 .7 17.1 8.9 20.3l135.2 55.2c-.4 4-1.2 8-1.2 12.2 0 10.1 1.7 19.6 4.2 28.9C120.9 296.4 104 334.2 104 376c0 54 28.4 100.9 70.8 127.8 9.3 5.9 20.3 8.2 31.3 8.2h99.2c13.3 0 26.3-4.1 37.2-11.7 46.5-32.3 74.4-89.4 62.9-152.6-5.5-30.2-20.5-57.6-41.6-79 2.5-9.2 4.2-18.7 4.2-28.7 0-4.2-.8-8.1-1.2-12.2L502 172.6c8.1-3.1 12.1-12.2 8.9-20.3zM224 96c-8.8 0-16-7.2-16-16s7.2-16 16-16 16 7.2 16 16-7.2 16-16 16zm32 272c-8.8 0-16-7.2-16-16s7.2-16 16-16 16 7.2 16 16-7.2 16-16 16zm0-64c-8.8 0-16-7.2-16-16s7.2-16 16-16 16 7.2 16 16-7.2 16-16 16zm0-64c-8.8 0-16-7.2-16-16s7.2-16 16-16 16 7.2 16 16-7.2 16-16 16zm0-88s-16-23.2-16-32 7.2-16 16-16 16 7.2 16 16-16 32-16 32zm32-56c-8.8 0-16-7.2-16-16s7.2-16 16-16 16 7.2 16 16-7.2 16-16 16z"]},kp={prefix:"fas",iconName:"snowplow",icon:[640,512,[],"f7d2","M120 376c-13.3 0-24 10.7-24 24s10.7 24 24 24 24-10.7 24-24-10.7-24-24-24zm80 0c-13.3 0-24 10.7-24 24s10.7 24 24 24 24-10.7 24-24-10.7-24-24-24zm80 0c-13.3 0-24 10.7-24 24s10.7 24 24 24 24-10.7 24-24-10.7-24-24-24zm80 0c-13.3 0-24 10.7-24 24s10.7 24 24 24 24-10.7 24-24-10.7-24-24-24zm238.6 49.4c-14.5-14.5-22.6-34.1-22.6-54.6V269.2c0-20.5 8.1-40.1 22.6-54.6l36.7-36.7c6.2-6.2 6.2-16.4 0-22.6l-22.6-22.6c-6.2-6.2-16.4-6.2-22.6 0l-36.7 36.7c-26.5 26.5-41.4 62.4-41.4 99.9V288h-64v-50.9c0-8.7-1.8-17.2-5.2-25.2L364.5 29.1C356.9 11.4 339.6 0 320.3 0H176c-26.5 0-48 21.5-48 48v112h-16c-26.5 0-48 21.5-48 48v91.2C26.3 317.2 0 355.4 0 400c0 61.9 50.1 112 112 112h256c61.9 0 112-50.1 112-112 0-17.3-4.2-33.4-11.2-48H512v18.7c0 37.5 14.9 73.4 41.4 99.9l36.7 36.7c6.2 6.2 16.4 6.2 22.6 0l22.6-22.6c6.2-6.2 6.2-16.4 0-22.6l-36.7-36.7zM192 64h117.8l68.6 160H256l-64-64V64zm176 384H112c-26.5 0-48-21.5-48-48s21.5-48 48-48h256c26.5 0 48 21.5 48 48s-21.5 48-48 48z"]},Pp={prefix:"fas",iconName:"soap",icon:[512,512,[],"e06e","M416,192a95.42,95.42,0,0,1-30.94,70.21A95.8,95.8,0,0,1,352,448H160a96,96,0,0,1,0-192h88.91A95.3,95.3,0,0,1,224,192H96A96,96,0,0,0,0,288V416a96,96,0,0,0,96,96H416a96,96,0,0,0,96-96V288A96,96,0,0,0,416,192Zm-96,64a64,64,0,1,0-64-64A64,64,0,0,0,320,256ZM208,96a48,48,0,1,0-48-48A48,48,0,0,0,208,96ZM384,64a32,32,0,1,0-32-32A32,32,0,0,0,384,64ZM160,288a64,64,0,0,0,0,128H352a64,64,0,0,0,0-128Z"]},Np={prefix:"fas",iconName:"socks",icon:[512,512,[],"f696","M214.66 311.01L288 256V96H128v176l-86.65 64.61c-39.4 29.56-53.86 84.42-29.21 127.06C30.39 495.25 63.27 512 96.08 512c20.03 0 40.25-6.25 57.52-19.2l21.86-16.39c-29.85-55.38-13.54-125.84 39.2-165.4zM288 32c0-11.05 3.07-21.3 8.02-30.38C293.4.92 290.85 0 288 0H160c-17.67 0-32 14.33-32 32v32h160V32zM480 0H352c-17.67 0-32 14.33-32 32v32h192V32c0-17.67-14.33-32-32-32zM320 272l-86.13 64.61c-39.4 29.56-53.86 84.42-29.21 127.06 18.25 31.58 50.61 48.33 83.42 48.33 20.03 0 40.25-6.25 57.52-19.2l115.2-86.4A127.997 127.997 0 0 0 512 304V96H320v176z"]},Op={prefix:"fas",iconName:"solar-panel",icon:[640,512,[],"f5ba","M431.98 448.01l-47.97.05V416h-128v32.21l-47.98.05c-8.82.01-15.97 7.16-15.98 15.99l-.05 31.73c-.01 8.85 7.17 16.03 16.02 16.02l223.96-.26c8.82-.01 15.97-7.16 15.98-15.98l.04-31.73c.01-8.85-7.17-16.03-16.02-16.02zM585.2 26.74C582.58 11.31 568.99 0 553.06 0H86.93C71 0 57.41 11.31 54.79 26.74-3.32 369.16.04 348.08.03 352c-.03 17.32 14.29 32 32.6 32h574.74c18.23 0 32.51-14.56 32.59-31.79.02-4.08 3.35 16.95-54.76-325.47zM259.83 64h120.33l9.77 96H250.06l9.77-96zm-75.17 256H71.09L90.1 208h105.97l-11.41 112zm16.29-160H98.24l16.29-96h96.19l-9.77 96zm32.82 160l11.4-112h149.65l11.4 112H233.77zm195.5-256h96.19l16.29 96H439.04l-9.77-96zm26.06 256l-11.4-112H549.9l19.01 112H455.33z"]},_p={prefix:"fas",iconName:"sort",icon:[320,512,[],"f0dc","M41 288h238c21.4 0 32.1 25.9 17 41L177 448c-9.4 9.4-24.6 9.4-33.9 0L24 329c-15.1-15.1-4.4-41 17-41zm255-105L177 64c-9.4-9.4-24.6-9.4-33.9 0L24 183c-15.1 15.1-4.4 41 17 41h238c21.4 0 32.1-25.9 17-41z"]},Fp={prefix:"fas",iconName:"sort-alpha-down",icon:[448,512,[],"f15d","M176 352h-48V48a16 16 0 0 0-16-16H80a16 16 0 0 0-16 16v304H16c-14.19 0-21.36 17.24-11.29 27.31l80 96a16 16 0 0 0 22.62 0l80-96C197.35 369.26 190.22 352 176 352zm240-64H288a16 16 0 0 0-16 16v32a16 16 0 0 0 16 16h56l-61.26 70.45A32 32 0 0 0 272 446.37V464a16 16 0 0 0 16 16h128a16 16 0 0 0 16-16v-32a16 16 0 0 0-16-16h-56l61.26-70.45A32 32 0 0 0 432 321.63V304a16 16 0 0 0-16-16zm31.06-85.38l-59.27-160A16 16 0 0 0 372.72 32h-41.44a16 16 0 0 0-15.07 10.62l-59.27 160A16 16 0 0 0 272 224h24.83a16 16 0 0 0 15.23-11.08l4.42-12.92h71l4.41 12.92A16 16 0 0 0 407.16 224H432a16 16 0 0 0 15.06-21.38zM335.61 144L352 96l16.39 48z"]},Gp={prefix:"fas",iconName:"sort-alpha-down-alt",icon:[448,512,[],"f881","M176 352h-48V48a16 16 0 0 0-16-16H80a16 16 0 0 0-16 16v304H16c-14.19 0-21.36 17.24-11.29 27.31l80 96a16 16 0 0 0 22.62 0l80-96C197.35 369.26 190.22 352 176 352zm112-128h128a16 16 0 0 0 16-16v-32a16 16 0 0 0-16-16h-56l61.26-70.45A32 32 0 0 0 432 65.63V48a16 16 0 0 0-16-16H288a16 16 0 0 0-16 16v32a16 16 0 0 0 16 16h56l-61.26 70.45A32 32 0 0 0 272 190.37V208a16 16 0 0 0 16 16zm159.06 234.62l-59.27-160A16 16 0 0 0 372.72 288h-41.44a16 16 0 0 0-15.07 10.62l-59.27 160A16 16 0 0 0 272 480h24.83a16 16 0 0 0 15.23-11.08l4.42-12.92h71l4.41 12.92A16 16 0 0 0 407.16 480H432a16 16 0 0 0 15.06-21.38zM335.61 400L352 352l16.39 48z"]},Vp={prefix:"fas",iconName:"sort-alpha-up",icon:[448,512,[],"f15e","M16 160h48v304a16 16 0 0 0 16 16h32a16 16 0 0 0 16-16V160h48c14.21 0 21.38-17.24 11.31-27.31l-80-96a16 16 0 0 0-22.62 0l-80 96C-5.35 142.74 1.78 160 16 160zm400 128H288a16 16 0 0 0-16 16v32a16 16 0 0 0 16 16h56l-61.26 70.45A32 32 0 0 0 272 446.37V464a16 16 0 0 0 16 16h128a16 16 0 0 0 16-16v-32a16 16 0 0 0-16-16h-56l61.26-70.45A32 32 0 0 0 432 321.63V304a16 16 0 0 0-16-16zm31.06-85.38l-59.27-160A16 16 0 0 0 372.72 32h-41.44a16 16 0 0 0-15.07 10.62l-59.27 160A16 16 0 0 0 272 224h24.83a16 16 0 0 0 15.23-11.08l4.42-12.92h71l4.41 12.92A16 16 0 0 0 407.16 224H432a16 16 0 0 0 15.06-21.38zM335.61 144L352 96l16.39 48z"]},Bp={prefix:"fas",iconName:"sort-alpha-up-alt",icon:[448,512,[],"f882","M16 160h48v304a16 16 0 0 0 16 16h32a16 16 0 0 0 16-16V160h48c14.21 0 21.38-17.24 11.31-27.31l-80-96a16 16 0 0 0-22.62 0l-80 96C-5.35 142.74 1.78 160 16 160zm272 64h128a16 16 0 0 0 16-16v-32a16 16 0 0 0-16-16h-56l61.26-70.45A32 32 0 0 0 432 65.63V48a16 16 0 0 0-16-16H288a16 16 0 0 0-16 16v32a16 16 0 0 0 16 16h56l-61.26 70.45A32 32 0 0 0 272 190.37V208a16 16 0 0 0 16 16zm159.06 234.62l-59.27-160A16 16 0 0 0 372.72 288h-41.44a16 16 0 0 0-15.07 10.62l-59.27 160A16 16 0 0 0 272 480h24.83a16 16 0 0 0 15.23-11.08l4.42-12.92h71l4.41 12.92A16 16 0 0 0 407.16 480H432a16 16 0 0 0 15.06-21.38zM335.61 400L352 352l16.39 48z"]},Hp={prefix:"fas",iconName:"sort-amount-down",icon:[512,512,[],"f160","M304 416h-64a16 16 0 0 0-16 16v32a16 16 0 0 0 16 16h64a16 16 0 0 0 16-16v-32a16 16 0 0 0-16-16zm-128-64h-48V48a16 16 0 0 0-16-16H80a16 16 0 0 0-16 16v304H16c-14.19 0-21.37 17.24-11.29 27.31l80 96a16 16 0 0 0 22.62 0l80-96C197.35 369.26 190.22 352 176 352zm256-192H240a16 16 0 0 0-16 16v32a16 16 0 0 0 16 16h192a16 16 0 0 0 16-16v-32a16 16 0 0 0-16-16zm-64 128H240a16 16 0 0 0-16 16v32a16 16 0 0 0 16 16h128a16 16 0 0 0 16-16v-32a16 16 0 0 0-16-16zM496 32H240a16 16 0 0 0-16 16v32a16 16 0 0 0 16 16h256a16 16 0 0 0 16-16V48a16 16 0 0 0-16-16z"]},zp={prefix:"fas",iconName:"sort-amount-down-alt",icon:[512,512,[],"f884","M240 96h64a16 16 0 0 0 16-16V48a16 16 0 0 0-16-16h-64a16 16 0 0 0-16 16v32a16 16 0 0 0 16 16zm0 128h128a16 16 0 0 0 16-16v-32a16 16 0 0 0-16-16H240a16 16 0 0 0-16 16v32a16 16 0 0 0 16 16zm256 192H240a16 16 0 0 0-16 16v32a16 16 0 0 0 16 16h256a16 16 0 0 0 16-16v-32a16 16 0 0 0-16-16zm-256-64h192a16 16 0 0 0 16-16v-32a16 16 0 0 0-16-16H240a16 16 0 0 0-16 16v32a16 16 0 0 0 16 16zm-64 0h-48V48a16 16 0 0 0-16-16H80a16 16 0 0 0-16 16v304H16c-14.19 0-21.37 17.24-11.29 27.31l80 96a16 16 0 0 0 22.62 0l80-96C197.35 369.26 190.22 352 176 352z"]},Up={prefix:"fas",iconName:"sort-amount-up",icon:[512,512,[],"f161","M304 416h-64a16 16 0 0 0-16 16v32a16 16 0 0 0 16 16h64a16 16 0 0 0 16-16v-32a16 16 0 0 0-16-16zM16 160h48v304a16 16 0 0 0 16 16h32a16 16 0 0 0 16-16V160h48c14.21 0 21.38-17.24 11.31-27.31l-80-96a16 16 0 0 0-22.62 0l-80 96C-5.35 142.74 1.77 160 16 160zm416 0H240a16 16 0 0 0-16 16v32a16 16 0 0 0 16 16h192a16 16 0 0 0 16-16v-32a16 16 0 0 0-16-16zm-64 128H240a16 16 0 0 0-16 16v32a16 16 0 0 0 16 16h128a16 16 0 0 0 16-16v-32a16 16 0 0 0-16-16zM496 32H240a16 16 0 0 0-16 16v32a16 16 0 0 0 16 16h256a16 16 0 0 0 16-16V48a16 16 0 0 0-16-16z"]},Wp={prefix:"fas",iconName:"sort-amount-up-alt",icon:[512,512,[],"f885","M240 96h64a16 16 0 0 0 16-16V48a16 16 0 0 0-16-16h-64a16 16 0 0 0-16 16v32a16 16 0 0 0 16 16zm0 128h128a16 16 0 0 0 16-16v-32a16 16 0 0 0-16-16H240a16 16 0 0 0-16 16v32a16 16 0 0 0 16 16zm256 192H240a16 16 0 0 0-16 16v32a16 16 0 0 0 16 16h256a16 16 0 0 0 16-16v-32a16 16 0 0 0-16-16zm-256-64h192a16 16 0 0 0 16-16v-32a16 16 0 0 0-16-16H240a16 16 0 0 0-16 16v32a16 16 0 0 0 16 16zM16 160h48v304a16 16 0 0 0 16 16h32a16 16 0 0 0 16-16V160h48c14.21 0 21.39-17.24 11.31-27.31l-80-96a16 16 0 0 0-22.62 0l-80 96C-5.35 142.74 1.78 160 16 160z"]},jp={prefix:"fas",iconName:"sort-down",icon:[320,512,[],"f0dd","M41 288h238c21.4 0 32.1 25.9 17 41L177 448c-9.4 9.4-24.6 9.4-33.9 0L24 329c-15.1-15.1-4.4-41 17-41z"]},Kp={prefix:"fas",iconName:"sort-numeric-down",icon:[448,512,[],"f162","M304 96h16v64h-16a16 16 0 0 0-16 16v32a16 16 0 0 0 16 16h96a16 16 0 0 0 16-16v-32a16 16 0 0 0-16-16h-16V48a16 16 0 0 0-16-16h-48a16 16 0 0 0-14.29 8.83l-16 32A16 16 0 0 0 304 96zm26.15 162.91a79 79 0 0 0-55 54.17c-14.25 51.05 21.21 97.77 68.85 102.53a84.07 84.07 0 0 1-20.85 12.91c-7.57 3.4-10.8 12.47-8.18 20.34l9.9 20c2.87 8.63 12.53 13.49 20.9 9.91 58-24.76 86.25-61.61 86.25-132V336c-.02-51.21-48.4-91.34-101.85-77.09zM352 356a20 20 0 1 1 20-20 20 20 0 0 1-20 20zm-176-4h-48V48a16 16 0 0 0-16-16H80a16 16 0 0 0-16 16v304H16c-14.19 0-21.36 17.24-11.29 27.31l80 96a16 16 0 0 0 22.62 0l80-96C197.35 369.26 190.22 352 176 352z"]},$p={prefix:"fas",iconName:"sort-numeric-down-alt",icon:[448,512,[],"f886","M176 352h-48V48a16 16 0 0 0-16-16H80a16 16 0 0 0-16 16v304H16c-14.19 0-21.36 17.24-11.29 27.31l80 96a16 16 0 0 0 22.62 0l80-96C197.35 369.26 190.22 352 176 352zm224 64h-16V304a16 16 0 0 0-16-16h-48a16 16 0 0 0-14.29 8.83l-16 32A16 16 0 0 0 304 352h16v64h-16a16 16 0 0 0-16 16v32a16 16 0 0 0 16 16h96a16 16 0 0 0 16-16v-32a16 16 0 0 0-16-16zM330.17 34.91a79 79 0 0 0-55 54.17c-14.27 51.05 21.19 97.77 68.83 102.53a84.07 84.07 0 0 1-20.85 12.91c-7.57 3.4-10.8 12.47-8.18 20.34l9.9 20c2.87 8.63 12.53 13.49 20.9 9.91 58-24.77 86.25-61.61 86.25-132V112c-.02-51.21-48.4-91.34-101.85-77.09zM352 132a20 20 0 1 1 20-20 20 20 0 0 1-20 20z"]},Yp={prefix:"fas",iconName:"sort-numeric-up",icon:[448,512,[],"f163","M330.17 258.91a79 79 0 0 0-55 54.17c-14.27 51.05 21.19 97.77 68.83 102.53a84.07 84.07 0 0 1-20.85 12.91c-7.57 3.4-10.8 12.47-8.18 20.34l9.9 20c2.87 8.63 12.53 13.49 20.9 9.91 58-24.76 86.25-61.61 86.25-132V336c-.02-51.21-48.4-91.34-101.85-77.09zM352 356a20 20 0 1 1 20-20 20 20 0 0 1-20 20zM304 96h16v64h-16a16 16 0 0 0-16 16v32a16 16 0 0 0 16 16h96a16 16 0 0 0 16-16v-32a16 16 0 0 0-16-16h-16V48a16 16 0 0 0-16-16h-48a16 16 0 0 0-14.29 8.83l-16 32A16 16 0 0 0 304 96zM107.31 36.69a16 16 0 0 0-22.62 0l-80 96C-5.35 142.74 1.78 160 16 160h48v304a16 16 0 0 0 16 16h32a16 16 0 0 0 16-16V160h48c14.21 0 21.38-17.24 11.31-27.31z"]},qp={prefix:"fas",iconName:"sort-numeric-up-alt",icon:[448,512,[],"f887","M107.31 36.69a16 16 0 0 0-22.62 0l-80 96C-5.35 142.74 1.78 160 16 160h48v304a16 16 0 0 0 16 16h32a16 16 0 0 0 16-16V160h48c14.21 0 21.38-17.24 11.31-27.31zM400 416h-16V304a16 16 0 0 0-16-16h-48a16 16 0 0 0-14.29 8.83l-16 32A16 16 0 0 0 304 352h16v64h-16a16 16 0 0 0-16 16v32a16 16 0 0 0 16 16h96a16 16 0 0 0 16-16v-32a16 16 0 0 0-16-16zM330.17 34.91a79 79 0 0 0-55 54.17c-14.27 51.05 21.19 97.77 68.83 102.53a84.07 84.07 0 0 1-20.85 12.91c-7.57 3.4-10.8 12.47-8.18 20.34l9.9 20c2.87 8.63 12.53 13.49 20.9 9.91 58-24.77 86.25-61.61 86.25-132V112c-.02-51.21-48.4-91.34-101.85-77.09zM352 132a20 20 0 1 1 20-20 20 20 0 0 1-20 20z"]},Xp={prefix:"fas",iconName:"sort-up",icon:[320,512,[],"f0de","M279 224H41c-21.4 0-32.1-25.9-17-41L143 64c9.4-9.4 24.6-9.4 33.9 0l119 119c15.2 15.1 4.5 41-16.9 41z"]},Zp={prefix:"fas",iconName:"spa",icon:[576,512,[],"f5bb","M568.25 192c-29.04.13-135.01 6.16-213.84 83-33.12 29.63-53.36 63.3-66.41 94.86-13.05-31.56-33.29-65.23-66.41-94.86-78.83-76.84-184.8-82.87-213.84-83-4.41-.02-7.79 3.4-7.75 7.82.23 27.92 7.14 126.14 88.77 199.3C172.79 480.94 256 480 288 480s115.19.95 199.23-80.88c81.64-73.17 88.54-171.38 88.77-199.3.04-4.42-3.34-7.84-7.75-7.82zM287.98 302.6c12.82-18.85 27.6-35.78 44.09-50.52 19.09-18.61 39.58-33.3 60.26-45.18-16.44-70.5-51.72-133.05-96.73-172.22-4.11-3.58-11.02-3.58-15.14 0-44.99 39.14-80.27 101.63-96.74 172.07 20.37 11.7 40.5 26.14 59.22 44.39a282.768 282.768 0 0 1 45.04 51.46z"]},Qp={prefix:"fas",iconName:"space-shuttle",icon:[640,512,[],"f197","M592.604 208.244C559.735 192.836 515.777 184 472 184H186.327c-4.952-6.555-10.585-11.978-16.72-16H376C229.157 137.747 219.403 32 96.003 32H96v128H80V32c-26.51 0-48 28.654-48 64v64c-23.197 0-32 10.032-32 24v40c0 13.983 8.819 24 32 24v16c-23.197 0-32 10.032-32 24v40c0 13.983 8.819 24 32 24v64c0 35.346 21.49 64 48 64V352h16v128h.003c123.4 0 133.154-105.747 279.997-136H169.606c6.135-4.022 11.768-9.445 16.72-16H472c43.777 0 87.735-8.836 120.604-24.244C622.282 289.845 640 271.992 640 256s-17.718-33.845-47.396-47.756zM488 296a8 8 0 0 1-8-8v-64a8 8 0 0 1 8-8c31.909 0 31.942 80 0 80z"]},Jp={prefix:"fas",iconName:"spell-check",icon:[576,512,[],"f891","M272 256h91.36c43.2 0 82-32.2 84.51-75.34a79.82 79.82 0 0 0-25.26-63.07 79.81 79.81 0 0 0 9.06-44.91C427.9 30.57 389.3 0 347 0h-75a16 16 0 0 0-16 16v224a16 16 0 0 0 16 16zm40-200h40a24 24 0 0 1 0 48h-40zm0 96h56a24 24 0 0 1 0 48h-56zM155.12 22.25A32 32 0 0 0 124.64 0H99.36a32 32 0 0 0-30.48 22.25L.59 235.73A16 16 0 0 0 16 256h24.93a16 16 0 0 0 15.42-11.73L68.29 208h87.42l11.94 36.27A16 16 0 0 0 183.07 256H208a16 16 0 0 0 15.42-20.27zM89.37 144L112 75.3l22.63 68.7zm482 132.48l-45.21-45.3a15.88 15.88 0 0 0-22.59 0l-151.5 151.5-55.41-55.5a15.88 15.88 0 0 0-22.59 0l-45.3 45.3a16 16 0 0 0 0 22.59l112 112.21a15.89 15.89 0 0 0 22.6 0l208-208.21a16 16 0 0 0-.02-22.59z"]},eg={prefix:"fas",iconName:"spider",icon:[576,512,[],"f717","M151.17 167.35L177.1 176h4.67l5.22-26.12c.72-3.58 1.8-7.58 3.21-11.79l-20.29-40.58 23.8-71.39c2.79-8.38-1.73-17.44-10.12-20.24L168.42.82c-8.38-2.8-17.45 1.73-20.24 10.12l-25.89 77.68a32.04 32.04 0 0 0 1.73 24.43l27.15 54.3zm422.14 182.03l-52.75-79.12a32.002 32.002 0 0 0-26.62-14.25H416l68.99-24.36a32.03 32.03 0 0 0 16.51-12.61l53.6-80.41c4.9-7.35 2.91-17.29-4.44-22.19l-13.31-8.88c-7.35-4.9-17.29-2.91-22.19 4.44l-50.56 75.83L404.1 208H368l-10.37-51.85C355.44 145.18 340.26 96 288 96c-52.26 0-67.44 49.18-69.63 60.15L208 208h-36.1l-60.49-20.17L60.84 112c-4.9-7.35-14.83-9.34-22.19-4.44l-13.31 8.88c-7.35 4.9-9.34 14.83-4.44 22.19l53.6 80.41a32.03 32.03 0 0 0 16.51 12.61L160 256H82.06a32.02 32.02 0 0 0-26.63 14.25L2.69 349.38c-4.9 7.35-2.92 17.29 4.44 22.19l13.31 8.88c7.35 4.9 17.29 2.91 22.19-4.44l48-72h47.06l-60.83 97.33A31.988 31.988 0 0 0 72 418.3V496c0 8.84 7.16 16 16 16h16c8.84 0 16-7.16 16-16v-73.11l74.08-118.53c-1.01 14.05-2.08 28.11-2.08 42.21C192 399.64 232.76 448 288 448s96-48.36 96-101.43c0-14.1-1.08-28.16-2.08-42.21L456 422.89V496c0 8.84 7.16 16 16 16h16c8.84 0 16-7.16 16-16v-77.71c0-6-1.69-11.88-4.86-16.96L438.31 304h47.06l48 72c4.9 7.35 14.84 9.34 22.19 4.44l13.31-8.88c7.36-4.9 9.34-14.83 4.44-22.18zM406.09 97.51l-20.29 40.58c1.41 4.21 2.49 8.21 3.21 11.79l5.22 26.12h4.67l25.93-8.65 27.15-54.3a31.995 31.995 0 0 0 1.73-24.43l-25.89-77.68C425.03 2.56 415.96-1.98 407.58.82l-15.17 5.06c-8.38 2.8-12.91 11.86-10.12 20.24l23.8 71.39z"]},tg={prefix:"fas",iconName:"spinner",icon:[512,512,[],"f110","M304 48c0 26.51-21.49 48-48 48s-48-21.49-48-48 21.49-48 48-48 48 21.49 48 48zm-48 368c-26.51 0-48 21.49-48 48s21.49 48 48 48 48-21.49 48-48-21.49-48-48-48zm208-208c-26.51 0-48 21.49-48 48s21.49 48 48 48 48-21.49 48-48-21.49-48-48-48zM96 256c0-26.51-21.49-48-48-48S0 229.49 0 256s21.49 48 48 48 48-21.49 48-48zm12.922 99.078c-26.51 0-48 21.49-48 48s21.49 48 48 48 48-21.49 48-48c0-26.509-21.491-48-48-48zm294.156 0c-26.51 0-48 21.49-48 48s21.49 48 48 48 48-21.49 48-48c0-26.509-21.49-48-48-48zM108.922 60.922c-26.51 0-48 21.49-48 48s21.49 48 48 48 48-21.49 48-48-21.491-48-48-48z"]},ig={prefix:"fas",iconName:"splotch",icon:[512,512,[],"f5bc","M472.29 195.89l-67.06-22.95c-19.28-6.6-33.54-20.92-38.14-38.3L351.1 74.19c-11.58-43.77-76.57-57.13-109.98-22.62l-46.14 47.67c-13.26 13.71-33.54 20.93-54.2 19.31l-71.88-5.62c-52.05-4.07-86.93 44.88-59.03 82.83l38.54 52.42c11.08 15.07 12.82 33.86 4.64 50.24L24.62 355.4c-20.59 41.25 22.84 84.87 73.49 73.81l69.96-15.28c20.11-4.39 41.45 0 57.07 11.73l54.32 40.83c39.32 29.56 101.04 7.57 104.45-37.22l4.7-61.86c1.35-17.79 12.8-33.86 30.63-42.99l62-31.74c44.88-22.96 39.59-80.17-8.95-96.79z"]},ng={prefix:"fas",iconName:"spray-can",icon:[512,512,[],"f5bd","M224 32c0-17.67-14.33-32-32-32h-64c-17.67 0-32 14.33-32 32v96h128V32zm256 96c-17.67 0-32 14.33-32 32s14.33 32 32 32 32-14.33 32-32-14.33-32-32-32zm-256 32H96c-53.02 0-96 42.98-96 96v224c0 17.67 14.33 32 32 32h256c17.67 0 32-14.33 32-32V256c0-53.02-42.98-96-96-96zm-64 256c-44.18 0-80-35.82-80-80s35.82-80 80-80 80 35.82 80 80-35.82 80-80 80zM480 96c17.67 0 32-14.33 32-32s-14.33-32-32-32-32 14.33-32 32 14.33 32 32 32zm-96 32c-17.67 0-32 14.33-32 32s14.33 32 32 32 32-14.33 32-32-14.33-32-32-32zm-96-96c-17.67 0-32 14.33-32 32s14.33 32 32 32 32-14.33 32-32-14.33-32-32-32zm96 0c-17.67 0-32 14.33-32 32s14.33 32 32 32 32-14.33 32-32-14.33-32-32-32zm96 192c-17.67 0-32 14.33-32 32s14.33 32 32 32 32-14.33 32-32-14.33-32-32-32z"]},sg={prefix:"fas",iconName:"square",icon:[448,512,[],"f0c8","M400 32H48C21.5 32 0 53.5 0 80v352c0 26.5 21.5 48 48 48h352c26.5 0 48-21.5 48-48V80c0-26.5-21.5-48-48-48z"]},rg={prefix:"fas",iconName:"square-full",icon:[512,512,[],"f45c","M512 512H0V0h512v512z"]},og={prefix:"fas",iconName:"square-root-alt",icon:[576,512,[],"f698","M571.31 251.31l-22.62-22.62c-6.25-6.25-16.38-6.25-22.63 0L480 274.75l-46.06-46.06c-6.25-6.25-16.38-6.25-22.63 0l-22.62 22.62c-6.25 6.25-6.25 16.38 0 22.63L434.75 320l-46.06 46.06c-6.25 6.25-6.25 16.38 0 22.63l22.62 22.62c6.25 6.25 16.38 6.25 22.63 0L480 365.25l46.06 46.06c6.25 6.25 16.38 6.25 22.63 0l22.62-22.62c6.25-6.25 6.25-16.38 0-22.63L525.25 320l46.06-46.06c6.25-6.25 6.25-16.38 0-22.63zM552 0H307.65c-14.54 0-27.26 9.8-30.95 23.87l-84.79 322.8-58.41-106.1A32.008 32.008 0 0 0 105.47 224H24c-13.25 0-24 10.74-24 24v48c0 13.25 10.75 24 24 24h43.62l88.88 163.73C168.99 503.5 186.3 512 204.94 512c17.27 0 44.44-9 54.28-41.48L357.03 96H552c13.25 0 24-10.75 24-24V24c0-13.26-10.75-24-24-24z"]},ag={prefix:"fas",iconName:"stamp",icon:[512,512,[],"f5bf","M32 512h448v-64H32v64zm384-256h-66.56c-16.26 0-29.44-13.18-29.44-29.44v-9.46c0-27.37 8.88-53.41 21.46-77.72 9.11-17.61 12.9-38.39 9.05-60.42-6.77-38.78-38.47-70.7-77.26-77.45C212.62-9.04 160 37.33 160 96c0 14.16 3.12 27.54 8.69 39.58C182.02 164.43 192 194.7 192 226.49v.07c0 16.26-13.18 29.44-29.44 29.44H96c-53.02 0-96 42.98-96 96v32c0 17.67 14.33 32 32 32h448c17.67 0 32-14.33 32-32v-32c0-53.02-42.98-96-96-96z"]},lg={prefix:"fas",iconName:"star",icon:[576,512,[],"f005","M259.3 17.8L194 150.2 47.9 171.5c-26.2 3.8-36.7 36.1-17.7 54.6l105.7 103-25 145.5c-4.5 26.3 23.2 46 46.4 33.7L288 439.6l130.7 68.7c23.2 12.2 50.9-7.4 46.4-33.7l-25-145.5 105.7-103c19-18.5 8.5-50.8-17.7-54.6L382 150.2 316.7 17.8c-11.7-23.6-45.6-23.9-57.4 0z"]},cg={prefix:"fas",iconName:"star-and-crescent",icon:[512,512,[],"f699","M340.47 466.36c-1.45 0-6.89.46-9.18.46-116.25 0-210.82-94.57-210.82-210.82S215.04 45.18 331.29 45.18c2.32 0 7.7.46 9.18.46 7.13 0 13.33-5.03 14.75-12.07 1.46-7.25-2.55-14.49-9.47-17.09C316.58 5.54 286.39 0 256 0 114.84 0 0 114.84 0 256s114.84 256 256 256c30.23 0 60.28-5.49 89.32-16.32 5.96-2.02 10.28-7.64 10.28-14.26 0-8.09-6.39-15.06-15.13-15.06zm162.99-252.5l-76.38-11.1-34.16-69.21c-1.83-3.7-5.38-5.55-8.93-5.55s-7.1 1.85-8.93 5.55l-34.16 69.21-76.38 11.1c-8.17 1.18-11.43 11.22-5.52 16.99l55.27 53.87-13.05 76.07c-1.11 6.44 4.01 11.66 9.81 11.66 1.53 0 3.11-.36 4.64-1.17L384 335.37l68.31 35.91c1.53.8 3.11 1.17 4.64 1.17 5.8 0 10.92-5.23 9.81-11.66l-13.05-76.07 55.27-53.87c5.91-5.77 2.65-15.81-5.52-16.99z"]},hg={prefix:"fas",iconName:"star-half",icon:[576,512,[],"f089","M288 0c-11.4 0-22.8 5.9-28.7 17.8L194 150.2 47.9 171.4c-26.2 3.8-36.7 36.1-17.7 54.6l105.7 103-25 145.5c-4.5 26.1 23 46 46.4 33.7L288 439.6V0z"]},dg={prefix:"fas",iconName:"star-half-alt",icon:[536,512,[],"f5c0","M508.55 171.51L362.18 150.2 296.77 17.81C290.89 5.98 279.42 0 267.95 0c-11.4 0-22.79 5.9-28.69 17.81l-65.43 132.38-146.38 21.29c-26.25 3.8-36.77 36.09-17.74 54.59l105.89 103-25.06 145.48C86.98 495.33 103.57 512 122.15 512c4.93 0 10-1.17 14.87-3.75l130.95-68.68 130.94 68.7c4.86 2.55 9.92 3.71 14.83 3.71 18.6 0 35.22-16.61 31.66-37.4l-25.03-145.49 105.91-102.98c19.04-18.5 8.52-50.8-17.73-54.6zm-121.74 123.2l-18.12 17.62 4.28 24.88 19.52 113.45-102.13-53.59-22.38-11.74.03-317.19 51.03 103.29 11.18 22.63 25.01 3.64 114.23 16.63-82.65 80.38z"]},ug={prefix:"fas",iconName:"star-of-david",icon:[464,512,[],"f69a","M405.68 256l53.21-89.39C473.3 142.4 455.48 112 426.88 112H319.96l-55.95-93.98C256.86 6.01 244.43 0 232 0s-24.86 6.01-32.01 18.02L144.04 112H37.11c-28.6 0-46.42 30.4-32.01 54.61L58.32 256 5.1 345.39C-9.31 369.6 8.51 400 37.11 400h106.93l55.95 93.98C207.14 505.99 219.57 512 232 512s24.86-6.01 32.01-18.02L319.96 400h106.93c28.6 0 46.42-30.4 32.01-54.61L405.68 256zm-12.78-88l-19.8 33.26L353.3 168h39.6zm-52.39 88l-52.39 88H175.88l-52.39-88 52.38-88h112.25l52.39 88zM232 73.72L254.79 112h-45.57L232 73.72zM71.1 168h39.6l-19.8 33.26L71.1 168zm0 176l19.8-33.26L110.7 344H71.1zM232 438.28L209.21 400h45.57L232 438.28zM353.29 344l19.8-33.26L392.9 344h-39.61z"]},pg={prefix:"fas",iconName:"star-of-life",icon:[480,512,[],"f621","M471.99 334.43L336.06 256l135.93-78.43c7.66-4.42 10.28-14.2 5.86-21.86l-32.02-55.43c-4.42-7.65-14.21-10.28-21.87-5.86l-135.93 78.43V16c0-8.84-7.17-16-16.01-16h-64.04c-8.84 0-16.01 7.16-16.01 16v156.86L56.04 94.43c-7.66-4.42-17.45-1.79-21.87 5.86L2.15 155.71c-4.42 7.65-1.8 17.44 5.86 21.86L143.94 256 8.01 334.43c-7.66 4.42-10.28 14.21-5.86 21.86l32.02 55.43c4.42 7.65 14.21 10.27 21.87 5.86l135.93-78.43V496c0 8.84 7.17 16 16.01 16h64.04c8.84 0 16.01-7.16 16.01-16V339.14l135.93 78.43c7.66 4.42 17.45 1.8 21.87-5.86l32.02-55.43c4.42-7.65 1.8-17.43-5.86-21.85z"]},gg={prefix:"fas",iconName:"step-backward",icon:[448,512,[],"f048","M64 468V44c0-6.6 5.4-12 12-12h48c6.6 0 12 5.4 12 12v176.4l195.5-181C352.1 22.3 384 36.6 384 64v384c0 27.4-31.9 41.7-52.5 24.6L136 292.7V468c0 6.6-5.4 12-12 12H76c-6.6 0-12-5.4-12-12z"]},fg={prefix:"fas",iconName:"step-forward",icon:[448,512,[],"f051","M384 44v424c0 6.6-5.4 12-12 12h-48c-6.6 0-12-5.4-12-12V291.6l-195.5 181C95.9 489.7 64 475.4 64 448V64c0-27.4 31.9-41.7 52.5-24.6L312 219.3V44c0-6.6 5.4-12 12-12h48c6.6 0 12 5.4 12 12z"]},mg={prefix:"fas",iconName:"stethoscope",icon:[512,512,[],"f0f1","M447.1 112c-34.2.5-62.3 28.4-63 62.6-.5 24.3 12.5 45.6 32 56.8V344c0 57.3-50.2 104-112 104-60 0-109.2-44.1-111.9-99.2C265 333.8 320 269.2 320 192V36.6c0-11.4-8.1-21.3-19.3-23.5L237.8.5c-13-2.6-25.6 5.8-28.2 18.8L206.4 35c-2.6 13 5.8 25.6 18.8 28.2l30.7 6.1v121.4c0 52.9-42.2 96.7-95.1 97.2-53.4.5-96.9-42.7-96.9-96V69.4l30.7-6.1c13-2.6 21.4-15.2 18.8-28.2l-3.1-15.7C107.7 6.4 95.1-2 82.1.6L19.3 13C8.1 15.3 0 25.1 0 36.6V192c0 77.3 55.1 142 128.1 156.8C130.7 439.2 208.6 512 304 512c97 0 176-75.4 176-168V231.4c19.1-11.1 32-31.7 32-55.4 0-35.7-29.2-64.5-64.9-64zm.9 80c-8.8 0-16-7.2-16-16s7.2-16 16-16 16 7.2 16 16-7.2 16-16 16z"]},vg={prefix:"fas",iconName:"sticky-note",icon:[448,512,[],"f249","M312 320h136V56c0-13.3-10.7-24-24-24H24C10.7 32 0 42.7 0 56v400c0 13.3 10.7 24 24 24h264V344c0-13.2 10.8-24 24-24zm129 55l-98 98c-4.5 4.5-10.6 7-17 7h-6V352h128v6.1c0 6.3-2.5 12.4-7 16.9z"]},yg={prefix:"fas",iconName:"stop",icon:[448,512,[],"f04d","M400 32H48C21.5 32 0 53.5 0 80v352c0 26.5 21.5 48 48 48h352c26.5 0 48-21.5 48-48V80c0-26.5-21.5-48-48-48z"]},Cg={prefix:"fas",iconName:"stop-circle",icon:[512,512,[],"f28d","M256 8C119 8 8 119 8 256s111 248 248 248 248-111 248-248S393 8 256 8zm96 328c0 8.8-7.2 16-16 16H176c-8.8 0-16-7.2-16-16V176c0-8.8 7.2-16 16-16h160c8.8 0 16 7.2 16 16v160z"]},bg={prefix:"fas",iconName:"stopwatch",icon:[448,512,[],"f2f2","M432 304c0 114.9-93.1 208-208 208S16 418.9 16 304c0-104 76.3-190.2 176-205.5V64h-28c-6.6 0-12-5.4-12-12V12c0-6.6 5.4-12 12-12h120c6.6 0 12 5.4 12 12v40c0 6.6-5.4 12-12 12h-28v34.5c37.5 5.8 71.7 21.6 99.7 44.6l27.5-27.5c4.7-4.7 12.3-4.7 17 0l28.3 28.3c4.7 4.7 4.7 12.3 0 17l-29.4 29.4-.6.6C419.7 223.3 432 262.2 432 304zm-176 36V188.5c0-6.6-5.4-12-12-12h-40c-6.6 0-12 5.4-12 12V340c0 6.6 5.4 12 12 12h40c6.6 0 12-5.4 12-12z"]},Sg={prefix:"fas",iconName:"stopwatch-20",icon:[448,512,[],"e06f","M398.5,190.91l.59-.61,26.59-26.58a16,16,0,0,0,0-22.63L403,118.41a16,16,0,0,0-22.63,0l-24.68,24.68A206.68,206.68,0,0,0,256,98.5V64h32a16,16,0,0,0,16-16V16A16,16,0,0,0,288,0H160a16.05,16.05,0,0,0-16,16V48a16.05,16.05,0,0,0,16,16h32V98.5A207.92,207.92,0,0,0,16.09,297.57C12.64,411.5,106.76,510.22,220.72,512,337.13,513.77,432,420,432,304A206,206,0,0,0,398.5,190.91ZM204.37,377.55a8.2,8.2,0,0,1,8.32,8.07v22.31a8.2,8.2,0,0,1-8.32,8.07H121.52a16.46,16.46,0,0,1-16.61-17.62c2.78-35.22,14.67-57.41,38.45-91.37,20.42-29.19,27.1-37.32,27.1-62.34,0-16.92-1.79-24.27-12.21-24.27-9.39,0-12.69,7.4-12.69,22.68v5.23a8.2,8.2,0,0,1-8.33,8.07h-24.9a8.2,8.2,0,0,1-8.33-8.07v-4.07c0-27.3,8.48-60.24,56.43-60.24,43,0,55.57,25.85,55.57,61,0,35.58-12.44,51.21-34.35,81.31-11.56,15-24.61,35.57-26.41,51.2ZM344,352.32c0,35.16-12.3,63.68-57.23,63.68C243.19,416,232,386.48,232,352.55V247.22c0-40.73,19.58-63.22,56.2-63.22C325,184,344,206.64,344,245.3ZM287.87,221.73c-9.41,0-13.23,7.5-13.23,20V357.68c0,13.11,3.59,20.59,13.23,20.59s13-8,13-21.27V241.06C300.89,229.79,297.88,221.73,287.87,221.73Z"]},wg={prefix:"fas",iconName:"store",icon:[616,512,[],"f54e","M602 118.6L537.1 15C531.3 5.7 521 0 510 0H106C95 0 84.7 5.7 78.9 15L14 118.6c-33.5 53.5-3.8 127.9 58.8 136.4 4.5.6 9.1.9 13.7.9 29.6 0 55.8-13 73.8-33.1 18 20.1 44.3 33.1 73.8 33.1 29.6 0 55.8-13 73.8-33.1 18 20.1 44.3 33.1 73.8 33.1 29.6 0 55.8-13 73.8-33.1 18.1 20.1 44.3 33.1 73.8 33.1 4.7 0 9.2-.3 13.7-.9 62.8-8.4 92.6-82.8 59-136.4zM529.5 288c-10 0-19.9-1.5-29.5-3.8V384H116v-99.8c-9.6 2.2-19.5 3.8-29.5 3.8-6 0-12.1-.4-18-1.2-5.6-.8-11.1-2.1-16.4-3.6V480c0 17.7 14.3 32 32 32h448c17.7 0 32-14.3 32-32V283.2c-5.4 1.6-10.8 2.9-16.4 3.6-6.1.8-12.1 1.2-18.2 1.2z"]},xg={prefix:"fas",iconName:"store-alt",icon:[640,512,[],"f54f","M320 384H128V224H64v256c0 17.7 14.3 32 32 32h256c17.7 0 32-14.3 32-32V224h-64v160zm314.6-241.8l-85.3-128c-6-8.9-16-14.2-26.7-14.2H117.4c-10.7 0-20.7 5.3-26.6 14.2l-85.3 128c-14.2 21.3 1 49.8 26.6 49.8H608c25.5 0 40.7-28.5 26.6-49.8zM512 496c0 8.8 7.2 16 16 16h32c8.8 0 16-7.2 16-16V224h-64v272z"]},Eg={prefix:"fas",iconName:"store-alt-slash",icon:[640,512,[],"e070","M17.89,123.62,5.51,142.2c-14.2,21.3,1,49.8,26.59,49.8h74.26ZM576,413.42V224H512V364L384,265V224H330.92l-41.4-32H608c25.5,0,40.7-28.5,26.59-49.8l-85.29-128A32.18,32.18,0,0,0,522.6,0H117.42A31.87,31.87,0,0,0,90.81,14.2l-10.66,16L45.46,3.38A16,16,0,0,0,23,6.19L3.37,31.46A16,16,0,0,0,6.18,53.91L594.53,508.63A16,16,0,0,0,617,505.81l19.64-25.26a16,16,0,0,0-2.81-22.45ZM320,384H128V224H64V480a32,32,0,0,0,32,32H352a32,32,0,0,0,32-32V406.59l-64-49.47Z"]},Mg={prefix:"fas",iconName:"store-slash",icon:[640,512,[],"e071","M121.51,384V284.2a119.43,119.43,0,0,1-28,3.8,123.46,123.46,0,0,1-17.1-1.2,114.88,114.88,0,0,1-15.58-3.6V480c0,17.7,13.59,32,30.4,32H505.75L348.42,384Zm-28-128.09c25.1,0,47.29-10.72,64-27.24L24,120.05c-30.52,53.39-2.45,126.53,56.49,135A95.68,95.68,0,0,0,93.48,255.91ZM602.13,458.09,547.2,413.41V283.2a93.5,93.5,0,0,1-15.57,3.6,127.31,127.31,0,0,1-17.29,1.2,114.89,114.89,0,0,1-28-3.8v79.68L348.52,251.77a88.06,88.06,0,0,0,25.41,4.14c28.11,0,53-13,70.11-33.11,17.19,20.11,42.08,33.11,70.11,33.11a94.31,94.31,0,0,0,13-.91c59.66-8.41,88-82.8,56.06-136.4L521.55,15A30.1,30.1,0,0,0,495.81,0H112A30.11,30.11,0,0,0,86.27,15L76.88,30.78,43.19,3.38A14.68,14.68,0,0,0,21.86,6.19L3.2,31.45A16.58,16.58,0,0,0,5.87,53.91L564.81,508.63a14.69,14.69,0,0,0,21.33-2.82l18.66-25.26A16.58,16.58,0,0,0,602.13,458.09Z"]},Ag={prefix:"fas",iconName:"stream",icon:[512,512,[],"f550","M16 128h416c8.84 0 16-7.16 16-16V48c0-8.84-7.16-16-16-16H16C7.16 32 0 39.16 0 48v64c0 8.84 7.16 16 16 16zm480 80H80c-8.84 0-16 7.16-16 16v64c0 8.84 7.16 16 16 16h416c8.84 0 16-7.16 16-16v-64c0-8.84-7.16-16-16-16zm-64 176H16c-8.84 0-16 7.16-16 16v64c0 8.84 7.16 16 16 16h416c8.84 0 16-7.16 16-16v-64c0-8.84-7.16-16-16-16z"]},Tg={prefix:"fas",iconName:"street-view",icon:[512,512,[],"f21d","M367.9 329.76c-4.62 5.3-9.78 10.1-15.9 13.65v22.94c66.52 9.34 112 28.05 112 49.65 0 30.93-93.12 56-208 56S48 446.93 48 416c0-21.6 45.48-40.3 112-49.65v-22.94c-6.12-3.55-11.28-8.35-15.9-13.65C58.87 345.34 0 378.05 0 416c0 53.02 114.62 96 256 96s256-42.98 256-96c0-37.95-58.87-70.66-144.1-86.24zM256 128c35.35 0 64-28.65 64-64S291.35 0 256 0s-64 28.65-64 64 28.65 64 64 64zm-64 192v96c0 17.67 14.33 32 32 32h64c17.67 0 32-14.33 32-32v-96c17.67 0 32-14.33 32-32v-96c0-26.51-21.49-48-48-48h-11.8c-11.07 5.03-23.26 8-36.2 8s-25.13-2.97-36.2-8H208c-26.51 0-48 21.49-48 48v96c0 17.67 14.33 32 32 32z"]},Dg={prefix:"fas",iconName:"strikethrough",icon:[512,512,[],"f0cc","M496 224H293.9l-87.17-26.83A43.55 43.55 0 0 1 219.55 112h66.79A49.89 49.89 0 0 1 331 139.58a16 16 0 0 0 21.46 7.15l42.94-21.47a16 16 0 0 0 7.16-21.46l-.53-1A128 128 0 0 0 287.51 32h-68a123.68 123.68 0 0 0-123 135.64c2 20.89 10.1 39.83 21.78 56.36H16a16 16 0 0 0-16 16v32a16 16 0 0 0 16 16h480a16 16 0 0 0 16-16v-32a16 16 0 0 0-16-16zm-180.24 96A43 43 0 0 1 336 356.45 43.59 43.59 0 0 1 292.45 400h-66.79A49.89 49.89 0 0 1 181 372.42a16 16 0 0 0-21.46-7.15l-42.94 21.47a16 16 0 0 0-7.16 21.46l.53 1A128 128 0 0 0 224.49 480h68a123.68 123.68 0 0 0 123-135.64 114.25 114.25 0 0 0-5.34-24.36z"]},Ig={prefix:"fas",iconName:"stroopwafel",icon:[512,512,[],"f551","M188.12 210.74L142.86 256l45.25 45.25L233.37 256l-45.25-45.26zm113.13-22.62L256 142.86l-45.25 45.25L256 233.37l45.25-45.25zm-90.5 135.76L256 369.14l45.26-45.26L256 278.63l-45.25 45.25zM256 0C114.62 0 0 114.62 0 256s114.62 256 256 256 256-114.62 256-256S397.38 0 256 0zm186.68 295.6l-11.31 11.31c-3.12 3.12-8.19 3.12-11.31 0l-28.29-28.29-45.25 45.25 33.94 33.94 16.97-16.97c3.12-3.12 8.19-3.12 11.31 0l11.31 11.31c3.12 3.12 3.12 8.19 0 11.31l-16.97 16.97 16.97 16.97c3.12 3.12 3.12 8.19 0 11.31l-11.31 11.31c-3.12 3.12-8.19 3.12-11.31 0l-16.97-16.97-16.97 16.97c-3.12 3.12-8.19 3.12-11.31 0l-11.31-11.31c-3.12-3.12-3.12-8.19 0-11.31l16.97-16.97-33.94-33.94-45.26 45.26 28.29 28.29c3.12 3.12 3.12 8.19 0 11.31l-11.31 11.31c-3.12 3.12-8.19 3.12-11.31 0L256 414.39l-28.29 28.29c-3.12 3.12-8.19 3.12-11.31 0l-11.31-11.31c-3.12-3.12-3.12-8.19 0-11.31l28.29-28.29-45.25-45.26-33.94 33.94 16.97 16.97c3.12 3.12 3.12 8.19 0 11.31l-11.31 11.31c-3.12 3.12-8.19 3.12-11.31 0l-16.97-16.97-16.97 16.97c-3.12 3.12-8.19 3.12-11.31 0l-11.31-11.31c-3.12-3.12-3.12-8.19 0-11.31l16.97-16.97-16.97-16.97c-3.12-3.12-3.12-8.19 0-11.31l11.31-11.31c3.12-3.12 8.19-3.12 11.31 0l16.97 16.97 33.94-33.94-45.25-45.25-28.29 28.29c-3.12 3.12-8.19 3.12-11.31 0L69.32 295.6c-3.12-3.12-3.12-8.19 0-11.31L97.61 256l-28.29-28.29c-3.12-3.12-3.12-8.19 0-11.31l11.31-11.31c3.12-3.12 8.19-3.12 11.31 0l28.29 28.29 45.25-45.26-33.94-33.94-16.97 16.97c-3.12 3.12-8.19 3.12-11.31 0l-11.31-11.31c-3.12-3.12-3.12-8.19 0-11.31l16.97-16.97-16.97-16.97c-3.12-3.12-3.12-8.19 0-11.31l11.31-11.31c3.12-3.12 8.19-3.12 11.31 0l16.97 16.97 16.97-16.97c3.12-3.12 8.19-3.12 11.31 0l11.31 11.31c3.12 3.12 3.12 8.19 0 11.31l-16.97 16.97 33.94 33.94 45.26-45.25-28.29-28.29c-3.12-3.12-3.12-8.19 0-11.31l11.31-11.31c3.12-3.12 8.19-3.12 11.31 0L256 97.61l28.29-28.29c3.12-3.12 8.19-3.12 11.31 0l11.31 11.31c3.12 3.12 3.12 8.19 0 11.31l-28.29 28.29 45.26 45.25 33.94-33.94-16.97-16.97c-3.12-3.12-3.12-8.19 0-11.31l11.31-11.31c3.12-3.12 8.19-3.12 11.31 0l16.97 16.97 16.97-16.97c3.12-3.12 8.19-3.12 11.31 0l11.31 11.31c3.12 3.12 3.12 8.19 0 11.31l-16.97 16.97 16.97 16.97c3.12 3.12 3.12 8.19 0 11.31l-11.31 11.31c-3.12 3.12-8.19 3.12-11.31 0l-16.97-16.97-33.94 33.94 45.25 45.26 28.29-28.29c3.12-3.12 8.19-3.12 11.31 0l11.31 11.31c3.12 3.12 3.12 8.19 0 11.31L414.39 256l28.29 28.28a8.015 8.015 0 0 1 0 11.32zM278.63 256l45.26 45.25L369.14 256l-45.25-45.26L278.63 256z"]},Rg={prefix:"fas",iconName:"subscript",icon:[512,512,[],"f12c","M496 448h-16V304a16 16 0 0 0-16-16h-48a16 16 0 0 0-14.29 8.83l-16 32A16 16 0 0 0 400 352h16v96h-16a16 16 0 0 0-16 16v32a16 16 0 0 0 16 16h96a16 16 0 0 0 16-16v-32a16 16 0 0 0-16-16zM336 64h-67a16 16 0 0 0-13.14 6.87l-79.9 115-79.9-115A16 16 0 0 0 83 64H16A16 16 0 0 0 0 80v48a16 16 0 0 0 16 16h33.48l77.81 112-77.81 112H16a16 16 0 0 0-16 16v48a16 16 0 0 0 16 16h67a16 16 0 0 0 13.14-6.87l79.9-115 79.9 115A16 16 0 0 0 269 448h67a16 16 0 0 0 16-16v-48a16 16 0 0 0-16-16h-33.48l-77.81-112 77.81-112H336a16 16 0 0 0 16-16V80a16 16 0 0 0-16-16z"]},Lg={prefix:"fas",iconName:"subway",icon:[448,512,[],"f239","M448 96v256c0 51.815-61.624 96-130.022 96l62.98 49.721C386.905 502.417 383.562 512 376 512H72c-7.578 0-10.892-9.594-4.957-14.279L130.022 448C61.82 448 0 403.954 0 352V96C0 42.981 64 0 128 0h192c65 0 128 42.981 128 96zM200 232V120c0-13.255-10.745-24-24-24H72c-13.255 0-24 10.745-24 24v112c0 13.255 10.745 24 24 24h104c13.255 0 24-10.745 24-24zm200 0V120c0-13.255-10.745-24-24-24H272c-13.255 0-24 10.745-24 24v112c0 13.255 10.745 24 24 24h104c13.255 0 24-10.745 24-24zm-48 56c-26.51 0-48 21.49-48 48s21.49 48 48 48 48-21.49 48-48-21.49-48-48-48zm-256 0c-26.51 0-48 21.49-48 48s21.49 48 48 48 48-21.49 48-48-21.49-48-48-48z"]},kg={prefix:"fas",iconName:"suitcase",icon:[512,512,[],"f0f2","M128 480h256V80c0-26.5-21.5-48-48-48H176c-26.5 0-48 21.5-48 48v400zm64-384h128v32H192V96zm320 80v256c0 26.5-21.5 48-48 48h-48V128h48c26.5 0 48 21.5 48 48zM96 480H48c-26.5 0-48-21.5-48-48V176c0-26.5 21.5-48 48-48h48v352z"]},Pg={prefix:"fas",iconName:"suitcase-rolling",icon:[384,512,[],"f5c1","M336 160H48c-26.51 0-48 21.49-48 48v224c0 26.51 21.49 48 48 48h16v16c0 8.84 7.16 16 16 16h32c8.84 0 16-7.16 16-16v-16h128v16c0 8.84 7.16 16 16 16h32c8.84 0 16-7.16 16-16v-16h16c26.51 0 48-21.49 48-48V208c0-26.51-21.49-48-48-48zm-16 216c0 4.42-3.58 8-8 8H72c-4.42 0-8-3.58-8-8v-16c0-4.42 3.58-8 8-8h240c4.42 0 8 3.58 8 8v16zm0-96c0 4.42-3.58 8-8 8H72c-4.42 0-8-3.58-8-8v-16c0-4.42 3.58-8 8-8h240c4.42 0 8 3.58 8 8v16zM144 48h96v80h48V48c0-26.51-21.49-48-48-48h-96c-26.51 0-48 21.49-48 48v80h48V48z"]},Ng={prefix:"fas",iconName:"sun",icon:[512,512,[],"f185","M256 160c-52.9 0-96 43.1-96 96s43.1 96 96 96 96-43.1 96-96-43.1-96-96-96zm246.4 80.5l-94.7-47.3 33.5-100.4c4.5-13.6-8.4-26.5-21.9-21.9l-100.4 33.5-47.4-94.8c-6.4-12.8-24.6-12.8-31 0l-47.3 94.7L92.7 70.8c-13.6-4.5-26.5 8.4-21.9 21.9l33.5 100.4-94.7 47.4c-12.8 6.4-12.8 24.6 0 31l94.7 47.3-33.5 100.5c-4.5 13.6 8.4 26.5 21.9 21.9l100.4-33.5 47.3 94.7c6.4 12.8 24.6 12.8 31 0l47.3-94.7 100.4 33.5c13.6 4.5 26.5-8.4 21.9-21.9l-33.5-100.4 94.7-47.3c13-6.5 13-24.7.2-31.1zm-155.9 106c-49.9 49.9-131.1 49.9-181 0-49.9-49.9-49.9-131.1 0-181 49.9-49.9 131.1-49.9 181 0 49.9 49.9 49.9 131.1 0 181z"]},Og={prefix:"fas",iconName:"superscript",icon:[512,512,[],"f12b","M496 160h-16V16a16 16 0 0 0-16-16h-48a16 16 0 0 0-14.29 8.83l-16 32A16 16 0 0 0 400 64h16v96h-16a16 16 0 0 0-16 16v32a16 16 0 0 0 16 16h96a16 16 0 0 0 16-16v-32a16 16 0 0 0-16-16zM336 64h-67a16 16 0 0 0-13.14 6.87l-79.9 115-79.9-115A16 16 0 0 0 83 64H16A16 16 0 0 0 0 80v48a16 16 0 0 0 16 16h33.48l77.81 112-77.81 112H16a16 16 0 0 0-16 16v48a16 16 0 0 0 16 16h67a16 16 0 0 0 13.14-6.87l79.9-115 79.9 115A16 16 0 0 0 269 448h67a16 16 0 0 0 16-16v-48a16 16 0 0 0-16-16h-33.48l-77.81-112 77.81-112H336a16 16 0 0 0 16-16V80a16 16 0 0 0-16-16z"]},_g={prefix:"fas",iconName:"surprise",icon:[496,512,[],"f5c2","M248 8C111 8 0 119 0 256s111 248 248 248 248-111 248-248S385 8 248 8zM136 208c0-17.7 14.3-32 32-32s32 14.3 32 32-14.3 32-32 32-32-14.3-32-32zm112 208c-35.3 0-64-28.7-64-64s28.7-64 64-64 64 28.7 64 64-28.7 64-64 64zm80-176c-17.7 0-32-14.3-32-32s14.3-32 32-32 32 14.3 32 32-14.3 32-32 32z"]},Fg={prefix:"fas",iconName:"swatchbook",icon:[512,512,[],"f5c3","M434.66,167.71h0L344.5,77.36a31.83,31.83,0,0,0-45-.07h0l-.07.07L224,152.88V424L434.66,212.9A32,32,0,0,0,434.66,167.71ZM480,320H373.09L186.68,506.51c-2.06,2.07-4.5,3.58-6.68,5.49H480a32,32,0,0,0,32-32V352A32,32,0,0,0,480,320ZM192,32A32,32,0,0,0,160,0H32A32,32,0,0,0,0,32V416a96,96,0,0,0,192,0ZM96,440a24,24,0,1,1,24-24A24,24,0,0,1,96,440Zm32-184H64V192h64Zm0-128H64V64h64Z"]},Gg={prefix:"fas",iconName:"swimmer",icon:[640,512,[],"f5c4","M189.61 310.58c3.54 3.26 15.27 9.42 34.39 9.42s30.86-6.16 34.39-9.42c16.02-14.77 34.5-22.58 53.46-22.58h16.3c18.96 0 37.45 7.81 53.46 22.58 3.54 3.26 15.27 9.42 34.39 9.42s30.86-6.16 34.39-9.42c14.86-13.71 31.88-21.12 49.39-22.16l-112.84-80.6 18-12.86c3.64-2.58 8.28-3.52 12.62-2.61l100.35 21.53c25.91 5.53 51.44-10.97 57-36.88 5.55-25.92-10.95-51.44-36.88-57L437.68 98.47c-30.73-6.58-63.02.12-88.56 18.38l-80.02 57.17c-10.38 7.39-19.36 16.44-26.72 26.94L173.75 299c5.47 3.23 10.82 6.93 15.86 11.58zM624 352h-16c-26.04 0-45.8-8.42-56.09-17.9-8.9-8.21-19.66-14.1-31.77-14.1h-16.3c-12.11 0-22.87 5.89-31.77 14.1C461.8 343.58 442.04 352 416 352s-45.8-8.42-56.09-17.9c-8.9-8.21-19.66-14.1-31.77-14.1h-16.3c-12.11 0-22.87 5.89-31.77 14.1C269.8 343.58 250.04 352 224 352s-45.8-8.42-56.09-17.9c-8.9-8.21-19.66-14.1-31.77-14.1h-16.3c-12.11 0-22.87 5.89-31.77 14.1C77.8 343.58 58.04 352 32 352H16c-8.84 0-16 7.16-16 16v32c0 8.84 7.16 16 16 16h16c38.62 0 72.72-12.19 96-31.84 23.28 19.66 57.38 31.84 96 31.84s72.72-12.19 96-31.84c23.28 19.66 57.38 31.84 96 31.84s72.72-12.19 96-31.84c23.28 19.66 57.38 31.84 96 31.84h16c8.84 0 16-7.16 16-16v-32c0-8.84-7.16-16-16-16zm-512-96c44.18 0 80-35.82 80-80s-35.82-80-80-80-80 35.82-80 80 35.82 80 80 80z"]},Vg={prefix:"fas",iconName:"swimming-pool",icon:[640,512,[],"f5c5","M624 416h-16c-26.04 0-45.8-8.42-56.09-17.9-8.9-8.21-19.66-14.1-31.77-14.1h-16.3c-12.11 0-22.87 5.89-31.77 14.1C461.8 407.58 442.04 416 416 416s-45.8-8.42-56.09-17.9c-8.9-8.21-19.66-14.1-31.77-14.1h-16.3c-12.11 0-22.87 5.89-31.77 14.1C269.8 407.58 250.04 416 224 416s-45.8-8.42-56.09-17.9c-8.9-8.21-19.66-14.1-31.77-14.1h-16.3c-12.11 0-22.87 5.89-31.77 14.1C77.8 407.58 58.04 416 32 416H16c-8.84 0-16 7.16-16 16v32c0 8.84 7.16 16 16 16h16c38.62 0 72.72-12.19 96-31.84 23.28 19.66 57.38 31.84 96 31.84s72.72-12.19 96-31.84c23.28 19.66 57.38 31.84 96 31.84s72.72-12.19 96-31.84c23.28 19.66 57.38 31.84 96 31.84h16c8.84 0 16-7.16 16-16v-32c0-8.84-7.16-16-16-16zm-400-32v-96h192v96c19.12 0 30.86-6.16 34.39-9.42 9.17-8.46 19.2-14.34 29.61-18.07V128c0-17.64 14.36-32 32-32s32 14.36 32 32v16c0 8.84 7.16 16 16 16h32c8.84 0 16-7.16 16-16v-16c0-52.94-43.06-96-96-96s-96 43.06-96 96v96H224v-96c0-17.64 14.36-32 32-32s32 14.36 32 32v16c0 8.84 7.16 16 16 16h32c8.84 0 16-7.16 16-16v-16c0-52.94-43.06-96-96-96s-96 43.06-96 96v228.5c10.41 3.73 20.44 9.62 29.61 18.07 3.53 3.27 15.27 9.43 34.39 9.43z"]},Bg={prefix:"fas",iconName:"synagogue",icon:[640,512,[],"f69b","M70 196.51L6.67 268.29A26.643 26.643 0 0 0 0 285.93V512h128V239.58l-38-43.07c-5.31-6.01-14.69-6.01-20 0zm563.33 71.78L570 196.51c-5.31-6.02-14.69-6.02-20 0l-38 43.07V512h128V285.93c0-6.5-2.37-12.77-6.67-17.64zM339.99 7.01c-11.69-9.35-28.29-9.35-39.98 0l-128 102.4A32.005 32.005 0 0 0 160 134.4V512h96v-92.57c0-31.88 21.78-61.43 53.25-66.55C349.34 346.35 384 377.13 384 416v96h96V134.4c0-9.72-4.42-18.92-12.01-24.99l-128-102.4zm52.07 215.55c1.98 3.15-.29 7.24-4 7.24h-38.94L324 269.79c-1.85 2.95-6.15 2.95-8 0l-25.12-39.98h-38.94c-3.72 0-5.98-4.09-4-7.24l19.2-30.56-19.2-30.56c-1.98-3.15.29-7.24 4-7.24h38.94l25.12-40c1.85-2.95 6.15-2.95 8 0l25.12 39.98h38.95c3.71 0 5.98 4.09 4 7.24L372.87 192l19.19 30.56z"]},Hg={prefix:"fas",iconName:"sync",icon:[512,512,[],"f021","M440.65 12.57l4 82.77A247.16 247.16 0 0 0 255.83 8C134.73 8 33.91 94.92 12.29 209.82A12 12 0 0 0 24.09 224h49.05a12 12 0 0 0 11.67-9.26 175.91 175.91 0 0 1 317-56.94l-101.46-4.86a12 12 0 0 0-12.57 12v47.41a12 12 0 0 0 12 12H500a12 12 0 0 0 12-12V12a12 12 0 0 0-12-12h-47.37a12 12 0 0 0-11.98 12.57zM255.83 432a175.61 175.61 0 0 1-146-77.8l101.8 4.87a12 12 0 0 0 12.57-12v-47.4a12 12 0 0 0-12-12H12a12 12 0 0 0-12 12V500a12 12 0 0 0 12 12h47.35a12 12 0 0 0 12-12.6l-4.15-82.57A247.17 247.17 0 0 0 255.83 504c121.11 0 221.93-86.92 243.55-201.82a12 12 0 0 0-11.8-14.18h-49.05a12 12 0 0 0-11.67 9.26A175.86 175.86 0 0 1 255.83 432z"]},zg={prefix:"fas",iconName:"sync-alt",icon:[512,512,[],"f2f1","M370.72 133.28C339.458 104.008 298.888 87.962 255.848 88c-77.458.068-144.328 53.178-162.791 126.85-1.344 5.363-6.122 9.15-11.651 9.15H24.103c-7.498 0-13.194-6.807-11.807-14.176C33.933 94.924 134.813 8 256 8c66.448 0 126.791 26.136 171.315 68.685L463.03 40.97C478.149 25.851 504 36.559 504 57.941V192c0 13.255-10.745 24-24 24H345.941c-21.382 0-32.09-25.851-16.971-40.971l41.75-41.749zM32 296h134.059c21.382 0 32.09 25.851 16.971 40.971l-41.75 41.75c31.262 29.273 71.835 45.319 114.876 45.28 77.418-.07 144.315-53.144 162.787-126.849 1.344-5.363 6.122-9.15 11.651-9.15h57.304c7.498 0 13.194 6.807 11.807 14.176C478.067 417.076 377.187 504 256 504c-66.448 0-126.791-26.136-171.315-68.685L48.97 471.03C33.851 486.149 8 475.441 8 454.059V320c0-13.255 10.745-24 24-24z"]},Ug={prefix:"fas",iconName:"syringe",icon:[512,512,[],"f48e","M201.5 174.8l55.7 55.8c3.1 3.1 3.1 8.2 0 11.3l-11.3 11.3c-3.1 3.1-8.2 3.1-11.3 0l-55.7-55.8-45.3 45.3 55.8 55.8c3.1 3.1 3.1 8.2 0 11.3l-11.3 11.3c-3.1 3.1-8.2 3.1-11.3 0L111 265.2l-26.4 26.4c-17.3 17.3-25.6 41.1-23 65.4l7.1 63.6L2.3 487c-3.1 3.1-3.1 8.2 0 11.3l11.3 11.3c3.1 3.1 8.2 3.1 11.3 0l66.3-66.3 63.6 7.1c23.9 2.6 47.9-5.4 65.4-23l181.9-181.9-135.7-135.7-64.9 65zm308.2-93.3L430.5 2.3c-3.1-3.1-8.2-3.1-11.3 0l-11.3 11.3c-3.1 3.1-3.1 8.2 0 11.3l28.3 28.3-45.3 45.3-56.6-56.6-17-17c-3.1-3.1-8.2-3.1-11.3 0l-33.9 33.9c-3.1 3.1-3.1 8.2 0 11.3l17 17L424.8 223l17 17c3.1 3.1 8.2 3.1 11.3 0l33.9-34c3.1-3.1 3.1-8.2 0-11.3l-73.5-73.5 45.3-45.3 28.3 28.3c3.1 3.1 8.2 3.1 11.3 0l11.3-11.3c3.1-3.2 3.1-8.2 0-11.4z"]},Wg={prefix:"fas",iconName:"table",icon:[512,512,[],"f0ce","M464 32H48C21.49 32 0 53.49 0 80v352c0 26.51 21.49 48 48 48h416c26.51 0 48-21.49 48-48V80c0-26.51-21.49-48-48-48zM224 416H64v-96h160v96zm0-160H64v-96h160v96zm224 160H288v-96h160v96zm0-160H288v-96h160v96z"]},jg={prefix:"fas",iconName:"table-tennis",icon:[512,512,[],"f45d","M496.2 296.5C527.7 218.7 512 126.2 449 63.1 365.1-21 229-21 145.1 63.1l-56 56.1 211.5 211.5c46.1-62.1 131.5-77.4 195.6-34.2zm-217.9 79.7L57.9 155.9c-27.3 45.3-21.7 105 17.3 144.1l34.5 34.6L6.7 424c-8.6 7.5-9.1 20.7-1 28.8l53.4 53.5c8 8.1 21.2 7.6 28.7-1L177.1 402l35.7 35.7c19.7 19.7 44.6 30.5 70.3 33.3-7.1-17-11-35.6-11-55.1-.1-13.8 2.5-27 6.2-39.7zM416 320c-53 0-96 43-96 96s43 96 96 96 96-43 96-96-43-96-96-96z"]},Kg={prefix:"fas",iconName:"tablet",icon:[448,512,[],"f10a","M400 0H48C21.5 0 0 21.5 0 48v416c0 26.5 21.5 48 48 48h352c26.5 0 48-21.5 48-48V48c0-26.5-21.5-48-48-48zM224 480c-17.7 0-32-14.3-32-32s14.3-32 32-32 32 14.3 32 32-14.3 32-32 32z"]},$g={prefix:"fas",iconName:"tablet-alt",icon:[448,512,[],"f3fa","M400 0H48C21.5 0 0 21.5 0 48v416c0 26.5 21.5 48 48 48h352c26.5 0 48-21.5 48-48V48c0-26.5-21.5-48-48-48zM224 480c-17.7 0-32-14.3-32-32s14.3-32 32-32 32 14.3 32 32-14.3 32-32 32zm176-108c0 6.6-5.4 12-12 12H60c-6.6 0-12-5.4-12-12V60c0-6.6 5.4-12 12-12h328c6.6 0 12 5.4 12 12v312z"]},Yg={prefix:"fas",iconName:"tablets",icon:[640,512,[],"f490","M160 192C78.9 192 12.5 250.5.1 326.7c-.8 4.8 3.3 9.3 8.3 9.3h303.3c5 0 9.1-4.5 8.3-9.3C307.5 250.5 241.1 192 160 192zm151.6 176H8.4c-5 0-9.1 4.5-8.3 9.3C12.5 453.5 78.9 512 160 512s147.5-58.5 159.9-134.7c.8-4.8-3.3-9.3-8.3-9.3zM593.4 46.6c-56.5-56.5-144.2-61.4-206.9-16-4 2.9-4.3 8.9-.8 12.3L597 254.3c3.5 3.5 9.5 3.2 12.3-.8 45.5-62.7 40.6-150.4-15.9-206.9zM363 65.7c-3.5-3.5-9.5-3.2-12.3.8-45.4 62.7-40.5 150.4 15.9 206.9 56.5 56.5 144.2 61.4 206.9 15.9 4-2.9 4.3-8.9.8-12.3L363 65.7z"]},qg={prefix:"fas",iconName:"tachometer-alt",icon:[576,512,[],"f3fd","M288 32C128.94 32 0 160.94 0 320c0 52.8 14.25 102.26 39.06 144.8 5.61 9.62 16.3 15.2 27.44 15.2h443c11.14 0 21.83-5.58 27.44-15.2C561.75 422.26 576 372.8 576 320c0-159.06-128.94-288-288-288zm0 64c14.71 0 26.58 10.13 30.32 23.65-1.11 2.26-2.64 4.23-3.45 6.67l-9.22 27.67c-5.13 3.49-10.97 6.01-17.64 6.01-17.67 0-32-14.33-32-32S270.33 96 288 96zM96 384c-17.67 0-32-14.33-32-32s14.33-32 32-32 32 14.33 32 32-14.33 32-32 32zm48-160c-17.67 0-32-14.33-32-32s14.33-32 32-32 32 14.33 32 32-14.33 32-32 32zm246.77-72.41l-61.33 184C343.13 347.33 352 364.54 352 384c0 11.72-3.38 22.55-8.88 32H232.88c-5.5-9.45-8.88-20.28-8.88-32 0-33.94 26.5-61.43 59.9-63.59l61.34-184.01c4.17-12.56 17.73-19.45 30.36-15.17 12.57 4.19 19.35 17.79 15.17 30.36zm14.66 57.2l15.52-46.55c3.47-1.29 7.13-2.23 11.05-2.23 17.67 0 32 14.33 32 32s-14.33 32-32 32c-11.38-.01-20.89-6.28-26.57-15.22zM480 384c-17.67 0-32-14.33-32-32s14.33-32 32-32 32 14.33 32 32-14.33 32-32 32z"]},Xg={prefix:"fas",iconName:"tag",icon:[512,512,[],"f02b","M0 252.118V48C0 21.49 21.49 0 48 0h204.118a48 48 0 0 1 33.941 14.059l211.882 211.882c18.745 18.745 18.745 49.137 0 67.882L293.823 497.941c-18.745 18.745-49.137 18.745-67.882 0L14.059 286.059A48 48 0 0 1 0 252.118zM112 64c-26.51 0-48 21.49-48 48s21.49 48 48 48 48-21.49 48-48-21.49-48-48-48z"]},Zg={prefix:"fas",iconName:"tags",icon:[640,512,[],"f02c","M497.941 225.941L286.059 14.059A48 48 0 0 0 252.118 0H48C21.49 0 0 21.49 0 48v204.118a48 48 0 0 0 14.059 33.941l211.882 211.882c18.744 18.745 49.136 18.746 67.882 0l204.118-204.118c18.745-18.745 18.745-49.137 0-67.882zM112 160c-26.51 0-48-21.49-48-48s21.49-48 48-48 48 21.49 48 48-21.49 48-48 48zm513.941 133.823L421.823 497.941c-18.745 18.745-49.137 18.745-67.882 0l-.36-.36L527.64 323.522c16.999-16.999 26.36-39.6 26.36-63.64s-9.362-46.641-26.36-63.64L331.397 0h48.721a48 48 0 0 1 33.941 14.059l211.882 211.882c18.745 18.745 18.745 49.137 0 67.882z"]},Qg={prefix:"fas",iconName:"tape",icon:[640,512,[],"f4db","M224 192c-35.3 0-64 28.7-64 64s28.7 64 64 64 64-28.7 64-64-28.7-64-64-64zm400 224H380.6c41.5-40.7 67.4-97.3 67.4-160 0-123.7-100.3-224-224-224S0 132.3 0 256s100.3 224 224 224h400c8.8 0 16-7.2 16-16v-32c0-8.8-7.2-16-16-16zm-400-64c-53 0-96-43-96-96s43-96 96-96 96 43 96 96-43 96-96 96z"]},Jg={prefix:"fas",iconName:"tasks",icon:[512,512,[],"f0ae","M139.61 35.5a12 12 0 0 0-17 0L58.93 98.81l-22.7-22.12a12 12 0 0 0-17 0L3.53 92.41a12 12 0 0 0 0 17l47.59 47.4a12.78 12.78 0 0 0 17.61 0l15.59-15.62L156.52 69a12.09 12.09 0 0 0 .09-17zm0 159.19a12 12 0 0 0-17 0l-63.68 63.72-22.7-22.1a12 12 0 0 0-17 0L3.53 252a12 12 0 0 0 0 17L51 316.5a12.77 12.77 0 0 0 17.6 0l15.7-15.69 72.2-72.22a12 12 0 0 0 .09-16.9zM64 368c-26.49 0-48.59 21.5-48.59 48S37.53 464 64 464a48 48 0 0 0 0-96zm432 16H208a16 16 0 0 0-16 16v32a16 16 0 0 0 16 16h288a16 16 0 0 0 16-16v-32a16 16 0 0 0-16-16zm0-320H208a16 16 0 0 0-16 16v32a16 16 0 0 0 16 16h288a16 16 0 0 0 16-16V80a16 16 0 0 0-16-16zm0 160H208a16 16 0 0 0-16 16v32a16 16 0 0 0 16 16h288a16 16 0 0 0 16-16v-32a16 16 0 0 0-16-16z"]},ef={prefix:"fas",iconName:"taxi",icon:[512,512,[],"f1ba","M462 241.64l-22-84.84c-9.6-35.2-41.6-60.8-76.8-60.8H352V64c0-17.67-14.33-32-32-32H192c-17.67 0-32 14.33-32 32v32h-11.2c-35.2 0-67.2 25.6-76.8 60.8l-22 84.84C21.41 248.04 0 273.47 0 304v48c0 23.63 12.95 44.04 32 55.12V448c0 17.67 14.33 32 32 32h32c17.67 0 32-14.33 32-32v-32h256v32c0 17.67 14.33 32 32 32h32c17.67 0 32-14.33 32-32v-40.88c19.05-11.09 32-31.5 32-55.12v-48c0-30.53-21.41-55.96-50-62.36zM96 352c-17.67 0-32-14.33-32-32s14.33-32 32-32 32 14.33 32 32-14.33 32-32 32zm20.55-112l17.2-66.36c2.23-8.16 9.59-13.64 15.06-13.64h214.4c5.47 0 12.83 5.48 14.85 12.86L395.45 240h-278.9zM416 352c-17.67 0-32-14.33-32-32s14.33-32 32-32 32 14.33 32 32-14.33 32-32 32z"]},tf={prefix:"fas",iconName:"teeth",icon:[640,512,[],"f62e","M544 0H96C42.98 0 0 42.98 0 96v320c0 53.02 42.98 96 96 96h448c53.02 0 96-42.98 96-96V96c0-53.02-42.98-96-96-96zM160 368c0 26.51-21.49 48-48 48s-48-21.49-48-48v-64c0-8.84 7.16-16 16-16h64c8.84 0 16 7.16 16 16v64zm0-128c0 8.84-7.16 16-16 16H80c-8.84 0-16-7.16-16-16v-64c0-26.51 21.49-48 48-48s48 21.49 48 48v64zm144 120c0 30.93-25.07 56-56 56s-56-25.07-56-56v-56c0-8.84 7.16-16 16-16h80c8.84 0 16 7.16 16 16v56zm0-120c0 8.84-7.16 16-16 16h-80c-8.84 0-16-7.16-16-16v-88c0-30.93 25.07-56 56-56s56 25.07 56 56v88zm144 120c0 30.93-25.07 56-56 56s-56-25.07-56-56v-56c0-8.84 7.16-16 16-16h80c8.84 0 16 7.16 16 16v56zm0-120c0 8.84-7.16 16-16 16h-80c-8.84 0-16-7.16-16-16v-88c0-30.93 25.07-56 56-56s56 25.07 56 56v88zm128 128c0 26.51-21.49 48-48 48s-48-21.49-48-48v-64c0-8.84 7.16-16 16-16h64c8.84 0 16 7.16 16 16v64zm0-128c0 8.84-7.16 16-16 16h-64c-8.84 0-16-7.16-16-16v-64c0-26.51 21.49-48 48-48s48 21.49 48 48v64z"]},nf={prefix:"fas",iconName:"teeth-open",icon:[640,512,[],"f62f","M544 0H96C42.98 0 0 42.98 0 96v64c0 35.35 28.66 64 64 64h512c35.34 0 64-28.65 64-64V96c0-53.02-42.98-96-96-96zM160 176c0 8.84-7.16 16-16 16H80c-8.84 0-16-7.16-16-16v-32c0-26.51 21.49-48 48-48s48 21.49 48 48v32zm144 0c0 8.84-7.16 16-16 16h-80c-8.84 0-16-7.16-16-16v-56c0-30.93 25.07-56 56-56s56 25.07 56 56v56zm144 0c0 8.84-7.16 16-16 16h-80c-8.84 0-16-7.16-16-16v-56c0-30.93 25.07-56 56-56s56 25.07 56 56v56zm128 0c0 8.84-7.16 16-16 16h-64c-8.84 0-16-7.16-16-16v-32c0-26.51 21.49-48 48-48s48 21.49 48 48v32zm0 144H64c-35.34 0-64 28.65-64 64v32c0 53.02 42.98 96 96 96h448c53.02 0 96-42.98 96-96v-32c0-35.35-28.66-64-64-64zm-416 80c0 26.51-21.49 48-48 48s-48-21.49-48-48v-32c0-8.84 7.16-16 16-16h64c8.84 0 16 7.16 16 16v32zm144-8c0 30.93-25.07 56-56 56s-56-25.07-56-56v-24c0-8.84 7.16-16 16-16h80c8.84 0 16 7.16 16 16v24zm144 0c0 30.93-25.07 56-56 56s-56-25.07-56-56v-24c0-8.84 7.16-16 16-16h80c8.84 0 16 7.16 16 16v24zm128 8c0 26.51-21.49 48-48 48s-48-21.49-48-48v-32c0-8.84 7.16-16 16-16h64c8.84 0 16 7.16 16 16v32z"]},sf={prefix:"fas",iconName:"temperature-high",icon:[512,512,[],"f769","M416 0c-52.9 0-96 43.1-96 96s43.1 96 96 96 96-43.1 96-96-43.1-96-96-96zm0 128c-17.7 0-32-14.3-32-32s14.3-32 32-32 32 14.3 32 32-14.3 32-32 32zm-160-16C256 50.1 205.9 0 144 0S32 50.1 32 112v166.5C12.3 303.2 0 334 0 368c0 79.5 64.5 144 144 144s144-64.5 144-144c0-34-12.3-64.9-32-89.5V112zM144 448c-44.1 0-80-35.9-80-80 0-25.5 12.2-48.9 32-63.8V112c0-26.5 21.5-48 48-48s48 21.5 48 48v192.2c19.8 14.8 32 38.3 32 63.8 0 44.1-35.9 80-80 80zm16-125.1V112c0-8.8-7.2-16-16-16s-16 7.2-16 16v210.9c-18.6 6.6-32 24.2-32 45.1 0 26.5 21.5 48 48 48s48-21.5 48-48c0-20.9-13.4-38.5-32-45.1z"]},rf={prefix:"fas",iconName:"temperature-low",icon:[512,512,[],"f76b","M416 0c-52.9 0-96 43.1-96 96s43.1 96 96 96 96-43.1 96-96-43.1-96-96-96zm0 128c-17.7 0-32-14.3-32-32s14.3-32 32-32 32 14.3 32 32-14.3 32-32 32zm-160-16C256 50.1 205.9 0 144 0S32 50.1 32 112v166.5C12.3 303.2 0 334 0 368c0 79.5 64.5 144 144 144s144-64.5 144-144c0-34-12.3-64.9-32-89.5V112zM144 448c-44.1 0-80-35.9-80-80 0-25.5 12.2-48.9 32-63.8V112c0-26.5 21.5-48 48-48s48 21.5 48 48v192.2c19.8 14.8 32 38.3 32 63.8 0 44.1-35.9 80-80 80zm16-125.1V304c0-8.8-7.2-16-16-16s-16 7.2-16 16v18.9c-18.6 6.6-32 24.2-32 45.1 0 26.5 21.5 48 48 48s48-21.5 48-48c0-20.9-13.4-38.5-32-45.1z"]},of={prefix:"fas",iconName:"tenge",icon:[384,512,[],"f7d7","M372 160H12c-6.6 0-12 5.4-12 12v56c0 6.6 5.4 12 12 12h140v228c0 6.6 5.4 12 12 12h56c6.6 0 12-5.4 12-12V240h140c6.6 0 12-5.4 12-12v-56c0-6.6-5.4-12-12-12zm0-128H12C5.4 32 0 37.4 0 44v56c0 6.6 5.4 12 12 12h360c6.6 0 12-5.4 12-12V44c0-6.6-5.4-12-12-12z"]},af={prefix:"fas",iconName:"terminal",icon:[640,512,[],"f120","M257.981 272.971L63.638 467.314c-9.373 9.373-24.569 9.373-33.941 0L7.029 444.647c-9.357-9.357-9.375-24.522-.04-33.901L161.011 256 6.99 101.255c-9.335-9.379-9.317-24.544.04-33.901l22.667-22.667c9.373-9.373 24.569-9.373 33.941 0L257.981 239.03c9.373 9.372 9.373 24.568 0 33.941zM640 456v-32c0-13.255-10.745-24-24-24H312c-13.255 0-24 10.745-24 24v32c0 13.255 10.745 24 24 24h304c13.255 0 24-10.745 24-24z"]},lf={prefix:"fas",iconName:"text-height",icon:[576,512,[],"f034","M304 32H16A16 16 0 0 0 0 48v96a16 16 0 0 0 16 16h32a16 16 0 0 0 16-16v-32h56v304H80a16 16 0 0 0-16 16v32a16 16 0 0 0 16 16h160a16 16 0 0 0 16-16v-32a16 16 0 0 0-16-16h-40V112h56v32a16 16 0 0 0 16 16h32a16 16 0 0 0 16-16V48a16 16 0 0 0-16-16zm256 336h-48V144h48c14.31 0 21.33-17.31 11.31-27.31l-80-80a16 16 0 0 0-22.62 0l-80 80C379.36 126 384.36 144 400 144h48v224h-48c-14.31 0-21.32 17.31-11.31 27.31l80 80a16 16 0 0 0 22.62 0l80-80C580.64 386 575.64 368 560 368z"]},cf={prefix:"fas",iconName:"text-width",icon:[448,512,[],"f035","M432 32H16A16 16 0 0 0 0 48v80a16 16 0 0 0 16 16h32a16 16 0 0 0 16-16v-16h120v112h-24a16 16 0 0 0-16 16v32a16 16 0 0 0 16 16h128a16 16 0 0 0 16-16v-32a16 16 0 0 0-16-16h-24V112h120v16a16 16 0 0 0 16 16h32a16 16 0 0 0 16-16V48a16 16 0 0 0-16-16zm-68.69 260.69C354 283.36 336 288.36 336 304v48H112v-48c0-14.31-17.31-21.32-27.31-11.31l-80 80a16 16 0 0 0 0 22.62l80 80C94 484.64 112 479.64 112 464v-48h224v48c0 14.31 17.31 21.33 27.31 11.31l80-80a16 16 0 0 0 0-22.62z"]},hf={prefix:"fas",iconName:"th",icon:[512,512,[],"f00a","M149.333 56v80c0 13.255-10.745 24-24 24H24c-13.255 0-24-10.745-24-24V56c0-13.255 10.745-24 24-24h101.333c13.255 0 24 10.745 24 24zm181.334 240v-80c0-13.255-10.745-24-24-24H205.333c-13.255 0-24 10.745-24 24v80c0 13.255 10.745 24 24 24h101.333c13.256 0 24.001-10.745 24.001-24zm32-240v80c0 13.255 10.745 24 24 24H488c13.255 0 24-10.745 24-24V56c0-13.255-10.745-24-24-24H386.667c-13.255 0-24 10.745-24 24zm-32 80V56c0-13.255-10.745-24-24-24H205.333c-13.255 0-24 10.745-24 24v80c0 13.255 10.745 24 24 24h101.333c13.256 0 24.001-10.745 24.001-24zm-205.334 56H24c-13.255 0-24 10.745-24 24v80c0 13.255 10.745 24 24 24h101.333c13.255 0 24-10.745 24-24v-80c0-13.255-10.745-24-24-24zM0 376v80c0 13.255 10.745 24 24 24h101.333c13.255 0 24-10.745 24-24v-80c0-13.255-10.745-24-24-24H24c-13.255 0-24 10.745-24 24zm386.667-56H488c13.255 0 24-10.745 24-24v-80c0-13.255-10.745-24-24-24H386.667c-13.255 0-24 10.745-24 24v80c0 13.255 10.745 24 24 24zm0 160H488c13.255 0 24-10.745 24-24v-80c0-13.255-10.745-24-24-24H386.667c-13.255 0-24 10.745-24 24v80c0 13.255 10.745 24 24 24zM181.333 376v80c0 13.255 10.745 24 24 24h101.333c13.255 0 24-10.745 24-24v-80c0-13.255-10.745-24-24-24H205.333c-13.255 0-24 10.745-24 24z"]},df={prefix:"fas",iconName:"th-large",icon:[512,512,[],"f009","M296 32h192c13.255 0 24 10.745 24 24v160c0 13.255-10.745 24-24 24H296c-13.255 0-24-10.745-24-24V56c0-13.255 10.745-24 24-24zm-80 0H24C10.745 32 0 42.745 0 56v160c0 13.255 10.745 24 24 24h192c13.255 0 24-10.745 24-24V56c0-13.255-10.745-24-24-24zM0 296v160c0 13.255 10.745 24 24 24h192c13.255 0 24-10.745 24-24V296c0-13.255-10.745-24-24-24H24c-13.255 0-24 10.745-24 24zm296 184h192c13.255 0 24-10.745 24-24V296c0-13.255-10.745-24-24-24H296c-13.255 0-24 10.745-24 24v160c0 13.255 10.745 24 24 24z"]},uf={prefix:"fas",iconName:"th-list",icon:[512,512,[],"f00b","M149.333 216v80c0 13.255-10.745 24-24 24H24c-13.255 0-24-10.745-24-24v-80c0-13.255 10.745-24 24-24h101.333c13.255 0 24 10.745 24 24zM0 376v80c0 13.255 10.745 24 24 24h101.333c13.255 0 24-10.745 24-24v-80c0-13.255-10.745-24-24-24H24c-13.255 0-24 10.745-24 24zM125.333 32H24C10.745 32 0 42.745 0 56v80c0 13.255 10.745 24 24 24h101.333c13.255 0 24-10.745 24-24V56c0-13.255-10.745-24-24-24zm80 448H488c13.255 0 24-10.745 24-24v-80c0-13.255-10.745-24-24-24H205.333c-13.255 0-24 10.745-24 24v80c0 13.255 10.745 24 24 24zm-24-424v80c0 13.255 10.745 24 24 24H488c13.255 0 24-10.745 24-24V56c0-13.255-10.745-24-24-24H205.333c-13.255 0-24 10.745-24 24zm24 264H488c13.255 0 24-10.745 24-24v-80c0-13.255-10.745-24-24-24H205.333c-13.255 0-24 10.745-24 24v80c0 13.255 10.745 24 24 24z"]},pf={prefix:"fas",iconName:"theater-masks",icon:[640,512,[],"f630","M206.86 245.15c-35.88 10.45-59.95 41.2-57.53 74.1 11.4-12.72 28.81-23.7 49.9-30.92l7.63-43.18zM95.81 295L64.08 115.49c-.29-1.62.28-2.62.24-2.65 57.76-32.06 123.12-49.01 189.01-49.01 1.61 0 3.23.17 4.85.19 13.95-13.47 31.73-22.83 51.59-26 18.89-3.02 38.05-4.55 57.18-5.32-9.99-13.95-24.48-24.23-41.77-27C301.27 1.89 277.24 0 253.32 0 176.66 0 101.02 19.42 33.2 57.06 9.03 70.48-3.92 98.48 1.05 126.58l31.73 179.51c14.23 80.52 136.33 142.08 204.45 142.08 3.59 0 6.75-.46 10.01-.8-13.52-17.08-28.94-40.48-39.5-67.58-47.61-12.98-106.06-51.62-111.93-84.79zm97.55-137.46c-.73-4.12-2.23-7.87-4.07-11.4-8.25 8.91-20.67 15.75-35.32 18.32-14.65 2.58-28.67.4-39.48-5.17-.52 3.94-.64 7.98.09 12.1 3.84 21.7 24.58 36.19 46.34 32.37 21.75-3.82 36.28-24.52 32.44-46.22zM606.8 120.9c-88.98-49.38-191.43-67.41-291.98-51.35-27.31 4.36-49.08 26.26-54.04 54.36l-31.73 179.51c-15.39 87.05 95.28 196.27 158.31 207.35 63.03 11.09 204.47-53.79 219.86-140.84l31.73-179.51c4.97-28.11-7.98-56.11-32.15-69.52zm-273.24 96.8c3.84-21.7 24.58-36.19 46.34-32.36 21.76 3.83 36.28 24.52 32.45 46.22-.73 4.12-2.23 7.87-4.07 11.4-8.25-8.91-20.67-15.75-35.32-18.32-14.65-2.58-28.67-.4-39.48 5.17-.53-3.95-.65-7.99.08-12.11zm70.47 198.76c-55.68-9.79-93.52-59.27-89.04-112.9 20.6 25.54 56.21 46.17 99.49 53.78 43.28 7.61 83.82.37 111.93-16.6-14.18 51.94-66.71 85.51-122.38 75.72zm130.3-151.34c-8.25-8.91-20.68-15.75-35.33-18.32-14.65-2.58-28.67-.4-39.48 5.17-.52-3.94-.64-7.98.09-12.1 3.84-21.7 24.58-36.19 46.34-32.37 21.75 3.83 36.28 24.52 32.45 46.22-.73 4.13-2.23 7.88-4.07 11.4z"]},gf={prefix:"fas",iconName:"thermometer",icon:[512,512,[],"f491","M476.8 20.4c-37.5-30.7-95.5-26.3-131.9 10.2l-45.7 46 50.5 50.5c3.1 3.1 3.1 8.2 0 11.3l-11.3 11.3c-3.1 3.1-8.2 3.1-11.3 0l-50.4-50.5-45.1 45.4 50.3 50.4c3.1 3.1 3.1 8.2 0 11.3l-11.3 11.3c-3.1 3.1-8.2 3.1-11.3 0L209 167.4l-45.1 45.4L214 263c3.1 3.1 3.1 8.2 0 11.3l-11.3 11.3c-3.1 3.1-8.2 3.1-11.3 0l-50.1-50.2L96 281.1V382L7 471c-9.4 9.4-9.4 24.6 0 33.9 9.4 9.4 24.6 9.4 33.9 0l89-89h99.9L484 162.6c34.9-34.9 42.2-101.5-7.2-142.2z"]},ff={prefix:"fas",iconName:"thermometer-empty",icon:[256,512,[],"f2cb","M192 384c0 35.346-28.654 64-64 64s-64-28.654-64-64c0-35.346 28.654-64 64-64s64 28.654 64 64zm32-84.653c19.912 22.563 32 52.194 32 84.653 0 70.696-57.303 128-128 128-.299 0-.609-.001-.909-.003C56.789 511.509-.357 453.636.002 383.333.166 351.135 12.225 321.755 32 299.347V96c0-53.019 42.981-96 96-96s96 42.981 96 96v203.347zM208 384c0-34.339-19.37-52.19-32-66.502V96c0-26.467-21.533-48-48-48S80 69.533 80 96v221.498c-12.732 14.428-31.825 32.1-31.999 66.08-.224 43.876 35.563 80.116 79.423 80.42L128 464c44.112 0 80-35.888 80-80z"]},mf={prefix:"fas",iconName:"thermometer-full",icon:[256,512,[],"f2c7","M224 96c0-53.019-42.981-96-96-96S32 42.981 32 96v203.347C12.225 321.756.166 351.136.002 383.333c-.359 70.303 56.787 128.176 127.089 128.664.299.002.61.003.909.003 70.698 0 128-57.304 128-128 0-32.459-12.088-62.09-32-84.653V96zm-96 368l-.576-.002c-43.86-.304-79.647-36.544-79.423-80.42.173-33.98 19.266-51.652 31.999-66.08V96c0-26.467 21.533-48 48-48s48 21.533 48 48v221.498c12.63 14.312 32 32.164 32 66.502 0 44.112-35.888 80-80 80zm64-80c0 35.346-28.654 64-64 64s-64-28.654-64-64c0-23.685 12.876-44.349 32-55.417V96c0-17.673 14.327-32 32-32s32 14.327 32 32v232.583c19.124 11.068 32 31.732 32 55.417z"]},vf={prefix:"fas",iconName:"thermometer-half",icon:[256,512,[],"f2c9","M192 384c0 35.346-28.654 64-64 64s-64-28.654-64-64c0-23.685 12.876-44.349 32-55.417V224c0-17.673 14.327-32 32-32s32 14.327 32 32v104.583c19.124 11.068 32 31.732 32 55.417zm32-84.653c19.912 22.563 32 52.194 32 84.653 0 70.696-57.303 128-128 128-.299 0-.609-.001-.909-.003C56.789 511.509-.357 453.636.002 383.333.166 351.135 12.225 321.755 32 299.347V96c0-53.019 42.981-96 96-96s96 42.981 96 96v203.347zM208 384c0-34.339-19.37-52.19-32-66.502V96c0-26.467-21.533-48-48-48S80 69.533 80 96v221.498c-12.732 14.428-31.825 32.1-31.999 66.08-.224 43.876 35.563 80.116 79.423 80.42L128 464c44.112 0 80-35.888 80-80z"]},yf={prefix:"fas",iconName:"thermometer-quarter",icon:[256,512,[],"f2ca","M192 384c0 35.346-28.654 64-64 64s-64-28.654-64-64c0-23.685 12.876-44.349 32-55.417V288c0-17.673 14.327-32 32-32s32 14.327 32 32v40.583c19.124 11.068 32 31.732 32 55.417zm32-84.653c19.912 22.563 32 52.194 32 84.653 0 70.696-57.303 128-128 128-.299 0-.609-.001-.909-.003C56.789 511.509-.357 453.636.002 383.333.166 351.135 12.225 321.755 32 299.347V96c0-53.019 42.981-96 96-96s96 42.981 96 96v203.347zM208 384c0-34.339-19.37-52.19-32-66.502V96c0-26.467-21.533-48-48-48S80 69.533 80 96v221.498c-12.732 14.428-31.825 32.1-31.999 66.08-.224 43.876 35.563 80.116 79.423 80.42L128 464c44.112 0 80-35.888 80-80z"]},Cf={prefix:"fas",iconName:"thermometer-three-quarters",icon:[256,512,[],"f2c8","M192 384c0 35.346-28.654 64-64 64-35.346 0-64-28.654-64-64 0-23.685 12.876-44.349 32-55.417V160c0-17.673 14.327-32 32-32s32 14.327 32 32v168.583c19.124 11.068 32 31.732 32 55.417zm32-84.653c19.912 22.563 32 52.194 32 84.653 0 70.696-57.303 128-128 128-.299 0-.609-.001-.909-.003C56.789 511.509-.357 453.636.002 383.333.166 351.135 12.225 321.755 32 299.347V96c0-53.019 42.981-96 96-96s96 42.981 96 96v203.347zM208 384c0-34.339-19.37-52.19-32-66.502V96c0-26.467-21.533-48-48-48S80 69.533 80 96v221.498c-12.732 14.428-31.825 32.1-31.999 66.08-.224 43.876 35.563 80.116 79.423 80.42L128 464c44.112 0 80-35.888 80-80z"]},bf={prefix:"fas",iconName:"thumbs-down",icon:[512,512,[],"f165","M0 56v240c0 13.255 10.745 24 24 24h80c13.255 0 24-10.745 24-24V56c0-13.255-10.745-24-24-24H24C10.745 32 0 42.745 0 56zm40 200c0-13.255 10.745-24 24-24s24 10.745 24 24-10.745 24-24 24-24-10.745-24-24zm272 256c-20.183 0-29.485-39.293-33.931-57.795-5.206-21.666-10.589-44.07-25.393-58.902-32.469-32.524-49.503-73.967-89.117-113.111a11.98 11.98 0 0 1-3.558-8.521V59.901c0-6.541 5.243-11.878 11.783-11.998 15.831-.29 36.694-9.079 52.651-16.178C256.189 17.598 295.709.017 343.995 0h2.844c42.777 0 93.363.413 113.774 29.737 8.392 12.057 10.446 27.034 6.148 44.632 16.312 17.053 25.063 48.863 16.382 74.757 17.544 23.432 19.143 56.132 9.308 79.469l.11.11c11.893 11.949 19.523 31.259 19.439 49.197-.156 30.352-26.157 58.098-59.553 58.098H350.723C358.03 364.34 384 388.132 384 430.548 384 504 336 512 312 512z"]},Sf={prefix:"fas",iconName:"thumbs-up",icon:[512,512,[],"f164","M104 224H24c-13.255 0-24 10.745-24 24v240c0 13.255 10.745 24 24 24h80c13.255 0 24-10.745 24-24V248c0-13.255-10.745-24-24-24zM64 472c-13.255 0-24-10.745-24-24s10.745-24 24-24 24 10.745 24 24-10.745 24-24 24zM384 81.452c0 42.416-25.97 66.208-33.277 94.548h101.723c33.397 0 59.397 27.746 59.553 58.098.084 17.938-7.546 37.249-19.439 49.197l-.11.11c9.836 23.337 8.237 56.037-9.308 79.469 8.681 25.895-.069 57.704-16.382 74.757 4.298 17.598 2.244 32.575-6.148 44.632C440.202 511.587 389.616 512 346.839 512l-2.845-.001c-48.287-.017-87.806-17.598-119.56-31.725-15.957-7.099-36.821-15.887-52.651-16.178-6.54-.12-11.783-5.457-11.783-11.998v-213.77c0-3.2 1.282-6.271 3.558-8.521 39.614-39.144 56.648-80.587 89.117-113.111 14.804-14.832 20.188-37.236 25.393-58.902C282.515 39.293 291.817 0 312 0c24 0 72 8 72 81.452z"]},wf={prefix:"fas",iconName:"thumbtack",icon:[384,512,[],"f08d","M298.028 214.267L285.793 96H328c13.255 0 24-10.745 24-24V24c0-13.255-10.745-24-24-24H56C42.745 0 32 10.745 32 24v48c0 13.255 10.745 24 24 24h42.207L85.972 214.267C37.465 236.82 0 277.261 0 328c0 13.255 10.745 24 24 24h136v104.007c0 1.242.289 2.467.845 3.578l24 48c2.941 5.882 11.364 5.893 14.311 0l24-48a8.008 8.008 0 0 0 .845-3.578V352h136c13.255 0 24-10.745 24-24-.001-51.183-37.983-91.42-85.973-113.733z"]},xf={prefix:"fas",iconName:"ticket-alt",icon:[576,512,[],"f3ff","M128 160h320v192H128V160zm400 96c0 26.51 21.49 48 48 48v96c0 26.51-21.49 48-48 48H48c-26.51 0-48-21.49-48-48v-96c26.51 0 48-21.49 48-48s-21.49-48-48-48v-96c0-26.51 21.49-48 48-48h480c26.51 0 48 21.49 48 48v96c-26.51 0-48 21.49-48 48zm-48-104c0-13.255-10.745-24-24-24H120c-13.255 0-24 10.745-24 24v208c0 13.255 10.745 24 24 24h336c13.255 0 24-10.745 24-24V152z"]},Ef={prefix:"fas",iconName:"times",icon:[352,512,[],"f00d","M242.72 256l100.07-100.07c12.28-12.28 12.28-32.19 0-44.48l-22.24-22.24c-12.28-12.28-32.19-12.28-44.48 0L176 189.28 75.93 89.21c-12.28-12.28-32.19-12.28-44.48 0L9.21 111.45c-12.28 12.28-12.28 32.19 0 44.48L109.28 256 9.21 356.07c-12.28 12.28-12.28 32.19 0 44.48l22.24 22.24c12.28 12.28 32.2 12.28 44.48 0L176 322.72l100.07 100.07c12.28 12.28 32.2 12.28 44.48 0l22.24-22.24c12.28-12.28 12.28-32.19 0-44.48L242.72 256z"]},Mf={prefix:"fas",iconName:"times-circle",icon:[512,512,[],"f057","M256 8C119 8 8 119 8 256s111 248 248 248 248-111 248-248S393 8 256 8zm121.6 313.1c4.7 4.7 4.7 12.3 0 17L338 377.6c-4.7 4.7-12.3 4.7-17 0L256 312l-65.1 65.6c-4.7 4.7-12.3 4.7-17 0L134.4 338c-4.7-4.7-4.7-12.3 0-17l65.6-65-65.6-65.1c-4.7-4.7-4.7-12.3 0-17l39.6-39.6c4.7-4.7 12.3-4.7 17 0l65 65.7 65.1-65.6c4.7-4.7 12.3-4.7 17 0l39.6 39.6c4.7 4.7 4.7 12.3 0 17L312 256l65.6 65.1z"]},Af={prefix:"fas",iconName:"tint",icon:[352,512,[],"f043","M205.22 22.09c-7.94-28.78-49.44-30.12-58.44 0C100.01 179.85 0 222.72 0 333.91 0 432.35 78.72 512 176 512s176-79.65 176-178.09c0-111.75-99.79-153.34-146.78-311.82zM176 448c-61.75 0-112-50.25-112-112 0-8.84 7.16-16 16-16s16 7.16 16 16c0 44.11 35.89 80 80 80 8.84 0 16 7.16 16 16s-7.16 16-16 16z"]},Tf={prefix:"fas",iconName:"tint-slash",icon:[640,512,[],"f5c7","M633.82 458.1L494.97 350.78c.52-5.57 1.03-11.16 1.03-16.87 0-111.76-99.79-153.34-146.78-311.82-7.94-28.78-49.44-30.12-58.44 0-15.52 52.34-36.87 91.96-58.49 125.68L45.47 3.37C38.49-2.05 28.43-.8 23.01 6.18L3.37 31.45C-2.05 38.42-.8 48.47 6.18 53.9l588.36 454.73c6.98 5.43 17.03 4.17 22.46-2.81l19.64-25.27c5.41-6.97 4.16-17.02-2.82-22.45zM144 333.91C144 432.35 222.72 512 320 512c44.71 0 85.37-16.96 116.4-44.7L162.72 255.78c-11.41 23.5-18.72 48.35-18.72 78.13z"]},Df={prefix:"fas",iconName:"tired",icon:[496,512,[],"f5c8","M248 8C111 8 0 119 0 256s111 248 248 248 248-111 248-248S385 8 248 8zm33.8 189.7l80-48c11.6-6.9 24 7.7 15.4 18L343.6 208l33.6 40.3c8.7 10.4-3.9 24.8-15.4 18l-80-48c-7.7-4.7-7.7-15.9 0-20.6zm-163-30c-8.6-10.3 3.8-24.9 15.4-18l80 48c7.8 4.7 7.8 15.9 0 20.6l-80 48c-11.5 6.8-24-7.6-15.4-18l33.6-40.3-33.6-40.3zM248 288c51.9 0 115.3 43.8 123.2 106.7 1.7 13.6-8 24.6-17.7 20.4-25.9-11.1-64.4-17.4-105.5-17.4s-79.6 6.3-105.5 17.4c-9.8 4.2-19.4-7-17.7-20.4C132.7 331.8 196.1 288 248 288z"]},If={prefix:"fas",iconName:"toggle-off",icon:[576,512,[],"f204","M384 64H192C85.961 64 0 149.961 0 256s85.961 192 192 192h192c106.039 0 192-85.961 192-192S490.039 64 384 64zM64 256c0-70.741 57.249-128 128-128 70.741 0 128 57.249 128 128 0 70.741-57.249 128-128 128-70.741 0-128-57.249-128-128zm320 128h-48.905c65.217-72.858 65.236-183.12 0-256H384c70.741 0 128 57.249 128 128 0 70.74-57.249 128-128 128z"]},Rf={prefix:"fas",iconName:"toggle-on",icon:[576,512,[],"f205","M384 64H192C86 64 0 150 0 256s86 192 192 192h192c106 0 192-86 192-192S490 64 384 64zm0 320c-70.8 0-128-57.3-128-128 0-70.8 57.3-128 128-128 70.8 0 128 57.3 128 128 0 70.8-57.3 128-128 128z"]},Lf={prefix:"fas",iconName:"toilet",icon:[384,512,[],"f7d8","M368 48c8.8 0 16-7.2 16-16V16c0-8.8-7.2-16-16-16H16C7.2 0 0 7.2 0 16v16c0 8.8 7.2 16 16 16h16v156.7C11.8 214.8 0 226.9 0 240c0 67.2 34.6 126.2 86.8 160.5l-21.4 70.2C59.1 491.2 74.5 512 96 512h192c21.5 0 36.9-20.8 30.6-41.3l-21.4-70.2C349.4 366.2 384 307.2 384 240c0-13.1-11.8-25.2-32-35.3V48h16zM80 72c0-4.4 3.6-8 8-8h48c4.4 0 8 3.6 8 8v16c0 4.4-3.6 8-8 8H88c-4.4 0-8-3.6-8-8V72zm112 200c-77.1 0-139.6-14.3-139.6-32s62.5-32 139.6-32 139.6 14.3 139.6 32-62.5 32-139.6 32z"]},kf={prefix:"fas",iconName:"toilet-paper",icon:[576,512,[],"f71e","M128 0C74.98 0 32 85.96 32 192v172.07c0 41.12-9.8 62.77-31.17 126.87C-2.62 501.3 5.09 512 16.01 512h280.92c13.77 0 26-8.81 30.36-21.88 12.83-38.48 24.71-72.4 24.71-126.05V192c0-83.6 23.67-153.52 60.44-192H128zM96 224c-8.84 0-16-7.16-16-16s7.16-16 16-16 16 7.16 16 16-7.16 16-16 16zm64 0c-8.84 0-16-7.16-16-16s7.16-16 16-16 16 7.16 16 16-7.16 16-16 16zm64 0c-8.84 0-16-7.16-16-16s7.16-16 16-16 16 7.16 16 16-7.16 16-16 16zm64 0c-8.84 0-16-7.16-16-16s7.16-16 16-16 16 7.16 16 16-7.16 16-16 16zM480 0c-53.02 0-96 85.96-96 192s42.98 192 96 192 96-85.96 96-192S533.02 0 480 0zm0 256c-17.67 0-32-28.65-32-64s14.33-64 32-64 32 28.65 32 64-14.33 64-32 64z"]},Pf={prefix:"fas",iconName:"toilet-paper-slash",icon:[640,512,[],"e072","M64,192V364.13c0,41.12-9.75,62.75-31.12,126.87A16,16,0,0,0,48,512H328.86a31.87,31.87,0,0,0,30.38-21.87c9.31-27.83,18-53.35,22.18-85.55l-316-244.25C64.53,170.66,64,181.19,64,192ZM633.82,458.09l-102-78.81C575.28,360.91,608,284.32,608,192,608,86,565,0,512,0s-96,86-96,192c0,42,7,80.4,18.43,112L384,265V192c0-83.62,23.63-153.5,60.5-192H160c-23.33,0-44.63,16.83-61.26,44.53L45.46,3.38A16,16,0,0,0,23,6.19L3.37,31.45A16,16,0,0,0,6.18,53.91L594.54,508.63A16,16,0,0,0,617,505.81l19.64-25.26A16,16,0,0,0,633.82,458.09ZM512,256c-17.63,0-32-28.62-32-64s14.37-64,32-64,32,28.63,32,64S529.62,256,512,256Z"]},Nf={prefix:"fas",iconName:"toolbox",icon:[512,512,[],"f552","M502.63 214.63l-45.25-45.25c-6-6-14.14-9.37-22.63-9.37H384V80c0-26.51-21.49-48-48-48H176c-26.51 0-48 21.49-48 48v80H77.25c-8.49 0-16.62 3.37-22.63 9.37L9.37 214.63c-6 6-9.37 14.14-9.37 22.63V320h128v-16c0-8.84 7.16-16 16-16h32c8.84 0 16 7.16 16 16v16h128v-16c0-8.84 7.16-16 16-16h32c8.84 0 16 7.16 16 16v16h128v-82.75c0-8.48-3.37-16.62-9.37-22.62zM320 160H192V96h128v64zm64 208c0 8.84-7.16 16-16 16h-32c-8.84 0-16-7.16-16-16v-16H192v16c0 8.84-7.16 16-16 16h-32c-8.84 0-16-7.16-16-16v-16H0v96c0 17.67 14.33 32 32 32h448c17.67 0 32-14.33 32-32v-96H384v16z"]},Of={prefix:"fas",iconName:"tools",icon:[512,512,[],"f7d9","M501.1 395.7L384 278.6c-23.1-23.1-57.6-27.6-85.4-13.9L192 158.1V96L64 0 0 64l96 128h62.1l106.6 106.6c-13.6 27.8-9.2 62.3 13.9 85.4l117.1 117.1c14.6 14.6 38.2 14.6 52.7 0l52.7-52.7c14.5-14.6 14.5-38.2 0-52.7zM331.7 225c28.3 0 54.9 11 74.9 31l19.4 19.4c15.8-6.9 30.8-16.5 43.8-29.5 37.1-37.1 49.7-89.3 37.9-136.7-2.2-9-13.5-12.1-20.1-5.5l-74.4 74.4-67.9-11.3L334 98.9l74.4-74.4c6.6-6.6 3.4-17.9-5.7-20.2-47.4-11.7-99.6.9-136.6 37.9-28.5 28.5-41.9 66.1-41.2 103.6l82.1 82.1c8.1-1.9 16.5-2.9 24.7-2.9zm-103.9 82l-56.7-56.7L18.7 402.8c-25 25-25 65.5 0 90.5s65.5 25 90.5 0l123.6-123.6c-7.6-19.9-9.9-41.6-5-62.7zM64 472c-13.2 0-24-10.8-24-24 0-13.3 10.7-24 24-24s24 10.7 24 24c0 13.2-10.7 24-24 24z"]},_f={prefix:"fas",iconName:"tooth",icon:[448,512,[],"f5c9","M443.98 96.25c-11.01-45.22-47.11-82.06-92.01-93.72-32.19-8.36-63 5.1-89.14 24.33-3.25 2.39-6.96 3.73-10.5 5.48l28.32 18.21c7.42 4.77 9.58 14.67 4.8 22.11-4.46 6.95-14.27 9.86-22.11 4.8L162.83 12.84c-20.7-10.85-43.38-16.4-66.81-10.31-44.9 11.67-81 48.5-92.01 93.72-10.13 41.62-.42 80.81 21.5 110.43 23.36 31.57 32.68 68.66 36.29 107.35 4.4 47.16 10.33 94.16 20.94 140.32l7.8 33.95c3.19 13.87 15.49 23.7 29.67 23.7 13.97 0 26.15-9.55 29.54-23.16l34.47-138.42c4.56-18.32 20.96-31.16 39.76-31.16s35.2 12.85 39.76 31.16l34.47 138.42c3.39 13.61 15.57 23.16 29.54 23.16 14.18 0 26.48-9.83 29.67-23.7l7.8-33.95c10.61-46.15 16.53-93.16 20.94-140.32 3.61-38.7 12.93-75.78 36.29-107.35 21.95-29.61 31.66-68.8 21.53-110.43z"]},Ff={prefix:"fas",iconName:"torah",icon:[640,512,[],"f6a0","M320.05 366.48l17.72-29.64h-35.46zm99.21-166H382.4l18.46 30.82zM48 0C21.49 0 0 14.33 0 32v448c0 17.67 21.49 32 48 32s48-14.33 48-32V32C96 14.33 74.51 0 48 0zm172.74 311.5h36.85l-18.46-30.82zm161.71 0h36.86l-18.45-30.8zM128 464h384V48H128zm66.77-278.13a21.22 21.22 0 0 1 18.48-10.71h59.45l29.13-48.71a21.13 21.13 0 0 1 18.22-10.37A20.76 20.76 0 0 1 338 126.29l29.25 48.86h59.52a21.12 21.12 0 0 1 18.1 32L415.63 256 445 305a20.69 20.69 0 0 1 .24 21.12 21.25 21.25 0 0 1-18.48 10.72h-59.47l-29.13 48.7a21.13 21.13 0 0 1-18.16 10.4 20.79 20.79 0 0 1-18-10.22l-29.25-48.88h-59.5a21.11 21.11 0 0 1-18.1-32L224.36 256 195 207a20.7 20.7 0 0 1-.23-21.13zM592 0c-26.51 0-48 14.33-48 32v448c0 17.67 21.49 32 48 32s48-14.33 48-32V32c0-17.67-21.49-32-48-32zM320 145.53l-17.78 29.62h35.46zm-62.45 55h-36.81l18.44 30.8zm29.58 111h65.79L386.09 256l-33.23-55.52h-65.79L253.9 256z"]},Gf={prefix:"fas",iconName:"torii-gate",icon:[512,512,[],"f6a1","M376.45 32h-240.9A303.17 303.17 0 0 1 0 0v96c0 17.67 14.33 32 32 32h32v64H16c-8.84 0-16 7.16-16 16v32c0 8.84 7.16 16 16 16h48v240c0 8.84 7.16 16 16 16h32c8.84 0 16-7.16 16-16V256h256v240c0 8.84 7.16 16 16 16h32c8.84 0 16-7.16 16-16V256h48c8.84 0 16-7.16 16-16v-32c0-8.84-7.16-16-16-16h-48v-64h32c17.67 0 32-14.33 32-32V0a303.17 303.17 0 0 1-135.55 32zM128 128h96v64h-96v-64zm256 64h-96v-64h96v64z"]},Vf={prefix:"fas",iconName:"tractor",icon:[640,512,[],"f722","M528 336c-48.6 0-88 39.4-88 88s39.4 88 88 88 88-39.4 88-88-39.4-88-88-88zm0 112c-13.23 0-24-10.77-24-24s10.77-24 24-24 24 10.77 24 24-10.77 24-24 24zm80-288h-64v-40.2c0-14.12 4.7-27.76 13.15-38.84 4.42-5.8 3.55-14.06-1.32-19.49L534.2 37.3c-6.66-7.45-18.32-6.92-24.7.78C490.58 60.9 480 89.81 480 119.8V160H377.67L321.58 29.14A47.914 47.914 0 0 0 277.45 0H144c-26.47 0-48 21.53-48 48v146.52c-8.63-6.73-20.96-6.46-28.89 1.47L36 227.1c-8.59 8.59-8.59 22.52 0 31.11l5.06 5.06c-4.99 9.26-8.96 18.82-11.91 28.72H22c-12.15 0-22 9.85-22 22v44c0 12.15 9.85 22 22 22h7.14c2.96 9.91 6.92 19.46 11.91 28.73l-5.06 5.06c-8.59 8.59-8.59 22.52 0 31.11L67.1 476c8.59 8.59 22.52 8.59 31.11 0l5.06-5.06c9.26 4.99 18.82 8.96 28.72 11.91V490c0 12.15 9.85 22 22 22h44c12.15 0 22-9.85 22-22v-7.14c9.9-2.95 19.46-6.92 28.72-11.91l5.06 5.06c8.59 8.59 22.52 8.59 31.11 0l31.11-31.11c8.59-8.59 8.59-22.52 0-31.11l-5.06-5.06c4.99-9.26 8.96-18.82 11.91-28.72H330c12.15 0 22-9.85 22-22v-6h80.54c21.91-28.99 56.32-48 95.46-48 18.64 0 36.07 4.61 51.8 12.2l50.82-50.82c6-6 9.37-14.14 9.37-22.63V192c.01-17.67-14.32-32-31.99-32zM176 416c-44.18 0-80-35.82-80-80s35.82-80 80-80 80 35.82 80 80-35.82 80-80 80zm22-256h-38V64h106.89l41.15 96H198z"]},Bf={prefix:"fas",iconName:"trademark",icon:[640,512,[],"f25c","M260.6 96H12c-6.6 0-12 5.4-12 12v43.1c0 6.6 5.4 12 12 12h85.1V404c0 6.6 5.4 12 12 12h54.3c6.6 0 12-5.4 12-12V163.1h85.1c6.6 0 12-5.4 12-12V108c.1-6.6-5.3-12-11.9-12zM640 403l-24-296c-.5-6.2-5.7-11-12-11h-65.4c-5.1 0-9.7 3.3-11.3 8.1l-43.8 127.1c-7.2 20.6-16.1 52.8-16.1 52.8h-.9s-8.9-32.2-16.1-52.8l-43.8-127.1c-1.7-4.8-6.2-8.1-11.3-8.1h-65.4c-6.2 0-11.4 4.8-12 11l-24.4 296c-.6 7 4.9 13 12 13H360c6.3 0 11.5-4.9 12-11.2l9.1-132.9c1.8-24.2 0-53.7 0-53.7h.9s10.7 33.6 17.9 53.7l30.7 84.7c1.7 4.7 6.2 7.9 11.3 7.9h50.3c5.1 0 9.6-3.2 11.3-7.9l30.7-84.7c7.2-20.1 17.9-53.7 17.9-53.7h.9s-1.8 29.5 0 53.7l9.1 132.9c.4 6.3 5.7 11.2 12 11.2H628c7 0 12.5-6 12-13z"]},Hf={prefix:"fas",iconName:"traffic-light",icon:[384,512,[],"f637","M384 192h-64v-37.88c37.2-13.22 64-48.38 64-90.12h-64V32c0-17.67-14.33-32-32-32H96C78.33 0 64 14.33 64 32v32H0c0 41.74 26.8 76.9 64 90.12V192H0c0 41.74 26.8 76.9 64 90.12V320H0c0 42.84 28.25 78.69 66.99 91.05C79.42 468.72 130.6 512 192 512s112.58-43.28 125.01-100.95C355.75 398.69 384 362.84 384 320h-64v-37.88c37.2-13.22 64-48.38 64-90.12zM192 416c-26.51 0-48-21.49-48-48s21.49-48 48-48 48 21.49 48 48-21.49 48-48 48zm0-128c-26.51 0-48-21.49-48-48s21.49-48 48-48 48 21.49 48 48-21.49 48-48 48zm0-128c-26.51 0-48-21.49-48-48s21.49-48 48-48 48 21.49 48 48-21.49 48-48 48z"]},zf={prefix:"fas",iconName:"trailer",icon:[640,512,[],"e041","M624,320H544V80a16,16,0,0,0-16-16H16A16,16,0,0,0,0,80V368a16,16,0,0,0,16,16H65.61c7.83-54.21,54-96,110.39-96s102.56,41.79,110.39,96H624a16,16,0,0,0,16-16V336A16,16,0,0,0,624,320ZM96,243.68a176.29,176.29,0,0,0-32,20.71V136a8,8,0,0,1,8-8H88a8,8,0,0,1,8,8Zm96-18.54c-5.31-.49-10.57-1.14-16-1.14s-10.69.65-16,1.14V136a8,8,0,0,1,8-8h16a8,8,0,0,1,8,8Zm96,39.25a176.29,176.29,0,0,0-32-20.71V136a8,8,0,0,1,8-8h16a8,8,0,0,1,8,8ZM384,320H352V136a8,8,0,0,1,8-8h16a8,8,0,0,1,8,8Zm96,0H448V136a8,8,0,0,1,8-8h16a8,8,0,0,1,8,8Zm-304,0a80,80,0,1,0,80,80A80,80,0,0,0,176,320Zm0,112a32,32,0,1,1,32-32A32,32,0,0,1,176,432Z"]},Uf={prefix:"fas",iconName:"train",icon:[448,512,[],"f238","M448 96v256c0 51.815-61.624 96-130.022 96l62.98 49.721C386.905 502.417 383.562 512 376 512H72c-7.578 0-10.892-9.594-4.957-14.279L130.022 448C61.82 448 0 403.954 0 352V96C0 42.981 64 0 128 0h192c65 0 128 42.981 128 96zm-48 136V120c0-13.255-10.745-24-24-24H72c-13.255 0-24 10.745-24 24v112c0 13.255 10.745 24 24 24h304c13.255 0 24-10.745 24-24zm-176 64c-30.928 0-56 25.072-56 56s25.072 56 56 56 56-25.072 56-56-25.072-56-56-56z"]},Wf={prefix:"fas",iconName:"tram",icon:[512,512,[],"f7da","M288 64c17.7 0 32-14.3 32-32S305.7 0 288 0s-32 14.3-32 32 14.3 32 32 32zm223.5-12.1c-2.3-8.6-11-13.6-19.6-11.3l-480 128c-8.5 2.3-13.6 11-11.3 19.6C2.5 195.3 8.9 200 16 200c1.4 0 2.8-.2 4.1-.5L240 140.8V224H64c-17.7 0-32 14.3-32 32v224c0 17.7 14.3 32 32 32h384c17.7 0 32-14.3 32-32V256c0-17.7-14.3-32-32-32H272v-91.7l228.1-60.8c8.6-2.3 13.6-11.1 11.4-19.6zM176 384H80v-96h96v96zm160-96h96v96h-96v-96zm-32 0v96h-96v-96h96zM192 96c17.7 0 32-14.3 32-32s-14.3-32-32-32-32 14.3-32 32 14.3 32 32 32z"]},jf={prefix:"fas",iconName:"transgender",icon:[384,512,[],"f224","M372 0h-79c-10.7 0-16 12.9-8.5 20.5l16.9 16.9-80.7 80.7C198.5 104.1 172.2 96 144 96 64.5 96 0 160.5 0 240c0 68.5 47.9 125.9 112 140.4V408H76c-6.6 0-12 5.4-12 12v40c0 6.6 5.4 12 12 12h36v28c0 6.6 5.4 12 12 12h40c6.6 0 12-5.4 12-12v-28h36c6.6 0 12-5.4 12-12v-40c0-6.6-5.4-12-12-12h-36v-27.6c64.1-14.6 112-71.9 112-140.4 0-28.2-8.1-54.5-22.1-76.7l80.7-80.7 16.9 16.9c7.6 7.6 20.5 2.2 20.5-8.5V12c0-6.6-5.4-12-12-12zM144 320c-44.1 0-80-35.9-80-80s35.9-80 80-80 80 35.9 80 80-35.9 80-80 80z"]},Kf={prefix:"fas",iconName:"transgender-alt",icon:[480,512,[],"f225","M468 0h-79c-10.7 0-16 12.9-8.5 20.5l16.9 16.9-80.7 80.7C294.5 104.1 268.2 96 240 96c-28.2 0-54.5 8.1-76.7 22.1l-16.5-16.5 19.8-19.8c4.7-4.7 4.7-12.3 0-17l-28.3-28.3c-4.7-4.7-12.3-4.7-17 0l-19.8 19.8-19-19 16.9-16.9C107.1 12.9 101.7 0 91 0H12C5.4 0 0 5.4 0 12v79c0 10.7 12.9 16 20.5 8.5l16.9-16.9 19 19-19.8 19.8c-4.7 4.7-4.7 12.3 0 17l28.3 28.3c4.7 4.7 12.3 4.7 17 0l19.8-19.8 16.5 16.5C104.1 185.5 96 211.8 96 240c0 68.5 47.9 125.9 112 140.4V408h-36c-6.6 0-12 5.4-12 12v40c0 6.6 5.4 12 12 12h36v28c0 6.6 5.4 12 12 12h40c6.6 0 12-5.4 12-12v-28h36c6.6 0 12-5.4 12-12v-40c0-6.6-5.4-12-12-12h-36v-27.6c64.1-14.6 112-71.9 112-140.4 0-28.2-8.1-54.5-22.1-76.7l80.7-80.7 16.9 16.9c7.6 7.6 20.5 2.2 20.5-8.5V12c0-6.6-5.4-12-12-12zM240 320c-44.1 0-80-35.9-80-80s35.9-80 80-80 80 35.9 80 80-35.9 80-80 80z"]},$f={prefix:"fas",iconName:"trash",icon:[448,512,[],"f1f8","M432 32H312l-9.4-18.7A24 24 0 0 0 281.1 0H166.8a23.72 23.72 0 0 0-21.4 13.3L136 32H16A16 16 0 0 0 0 48v32a16 16 0 0 0 16 16h416a16 16 0 0 0 16-16V48a16 16 0 0 0-16-16zM53.2 467a48 48 0 0 0 47.9 45h245.8a48 48 0 0 0 47.9-45L416 128H32z"]},Yf={prefix:"fas",iconName:"trash-alt",icon:[448,512,[],"f2ed","M32 464a48 48 0 0 0 48 48h288a48 48 0 0 0 48-48V128H32zm272-256a16 16 0 0 1 32 0v224a16 16 0 0 1-32 0zm-96 0a16 16 0 0 1 32 0v224a16 16 0 0 1-32 0zm-96 0a16 16 0 0 1 32 0v224a16 16 0 0 1-32 0zM432 32H312l-9.4-18.7A24 24 0 0 0 281.1 0H166.8a23.72 23.72 0 0 0-21.4 13.3L136 32H16A16 16 0 0 0 0 48v32a16 16 0 0 0 16 16h416a16 16 0 0 0 16-16V48a16 16 0 0 0-16-16z"]},qf={prefix:"fas",iconName:"trash-restore",icon:[448,512,[],"f829","M53.2 467a48 48 0 0 0 47.9 45h245.8a48 48 0 0 0 47.9-45L416 128H32zm70.11-175.8l89.38-94.26a15.41 15.41 0 0 1 22.62 0l89.38 94.26c10.08 10.62 2.94 28.8-11.32 28.8H256v112a16 16 0 0 1-16 16h-32a16 16 0 0 1-16-16V320h-57.37c-14.26 0-21.4-18.18-11.32-28.8zM432 32H312l-9.4-18.7A24 24 0 0 0 281.1 0H166.8a23.72 23.72 0 0 0-21.4 13.3L136 32H16A16 16 0 0 0 0 48v32a16 16 0 0 0 16 16h416a16 16 0 0 0 16-16V48a16 16 0 0 0-16-16z"]},Xf={prefix:"fas",iconName:"trash-restore-alt",icon:[448,512,[],"f82a","M32 464a48 48 0 0 0 48 48h288a48 48 0 0 0 48-48V128H32zm91.31-172.8l89.38-94.26a15.41 15.41 0 0 1 22.62 0l89.38 94.26c10.08 10.62 2.94 28.8-11.32 28.8H256v112a16 16 0 0 1-16 16h-32a16 16 0 0 1-16-16V320h-57.37c-14.26 0-21.4-18.18-11.32-28.8zM432 32H312l-9.4-18.7A24 24 0 0 0 281.1 0H166.8a23.72 23.72 0 0 0-21.4 13.3L136 32H16A16 16 0 0 0 0 48v32a16 16 0 0 0 16 16h416a16 16 0 0 0 16-16V48a16 16 0 0 0-16-16z"]},Zf={prefix:"fas",iconName:"tree",icon:[384,512,[],"f1bb","M378.31 378.49L298.42 288h30.63c9.01 0 16.98-5 20.78-13.06 3.8-8.04 2.55-17.26-3.28-24.05L268.42 160h28.89c9.1 0 17.3-5.35 20.86-13.61 3.52-8.13 1.86-17.59-4.24-24.08L203.66 4.83c-6.03-6.45-17.28-6.45-23.32 0L70.06 122.31c-6.1 6.49-7.75 15.95-4.24 24.08C69.38 154.65 77.59 160 86.69 160h28.89l-78.14 90.91c-5.81 6.78-7.06 15.99-3.27 24.04C37.97 283 45.93 288 54.95 288h30.63L5.69 378.49c-6 6.79-7.36 16.09-3.56 24.26 3.75 8.05 12 13.25 21.01 13.25H160v24.45l-30.29 48.4c-5.32 10.64 2.42 23.16 14.31 23.16h95.96c11.89 0 19.63-12.52 14.31-23.16L224 440.45V416h136.86c9.01 0 17.26-5.2 21.01-13.25 3.8-8.17 2.44-17.47-3.56-24.26z"]},Qf={prefix:"fas",iconName:"trophy",icon:[576,512,[],"f091","M552 64H448V24c0-13.3-10.7-24-24-24H152c-13.3 0-24 10.7-24 24v40H24C10.7 64 0 74.7 0 88v56c0 35.7 22.5 72.4 61.9 100.7 31.5 22.7 69.8 37.1 110 41.7C203.3 338.5 240 360 240 360v72h-48c-35.3 0-64 20.7-64 56v12c0 6.6 5.4 12 12 12h296c6.6 0 12-5.4 12-12v-12c0-35.3-28.7-56-64-56h-48v-72s36.7-21.5 68.1-73.6c40.3-4.6 78.6-19 110-41.7 39.3-28.3 61.9-65 61.9-100.7V88c0-13.3-10.7-24-24-24zM99.3 192.8C74.9 175.2 64 155.6 64 144v-16h64.2c1 32.6 5.8 61.2 12.8 86.2-15.1-5.2-29.2-12.4-41.7-21.4zM512 144c0 16.1-17.7 36.1-35.3 48.8-12.5 9-26.7 16.2-41.8 21.4 7-25 11.8-53.6 12.8-86.2H512v16z"]},Jf={prefix:"fas",iconName:"truck",icon:[640,512,[],"f0d1","M624 352h-16V243.9c0-12.7-5.1-24.9-14.1-33.9L494 110.1c-9-9-21.2-14.1-33.9-14.1H416V48c0-26.5-21.5-48-48-48H48C21.5 0 0 21.5 0 48v320c0 26.5 21.5 48 48 48h16c0 53 43 96 96 96s96-43 96-96h128c0 53 43 96 96 96s96-43 96-96h48c8.8 0 16-7.2 16-16v-32c0-8.8-7.2-16-16-16zM160 464c-26.5 0-48-21.5-48-48s21.5-48 48-48 48 21.5 48 48-21.5 48-48 48zm320 0c-26.5 0-48-21.5-48-48s21.5-48 48-48 48 21.5 48 48-21.5 48-48 48zm80-208H416V144h44.1l99.9 99.9V256z"]},em={prefix:"fas",iconName:"truck-loading",icon:[640,512,[],"f4de","M50.2 375.6c2.3 8.5 11.1 13.6 19.6 11.3l216.4-58c8.5-2.3 13.6-11.1 11.3-19.6l-49.7-185.5c-2.3-8.5-11.1-13.6-19.6-11.3L151 133.3l24.8 92.7-61.8 16.5-24.8-92.7-77.3 20.7C3.4 172.8-1.7 181.6.6 190.1l49.6 185.5zM384 0c-17.7 0-32 14.3-32 32v323.6L5.9 450c-4.3 1.2-6.8 5.6-5.6 9.8l12.6 46.3c1.2 4.3 5.6 6.8 9.8 5.6l393.7-107.4C418.8 464.1 467.6 512 528 512c61.9 0 112-50.1 112-112V0H384zm144 448c-26.5 0-48-21.5-48-48s21.5-48 48-48 48 21.5 48 48-21.5 48-48 48z"]},tm={prefix:"fas",iconName:"truck-monster",icon:[640,512,[],"f63b","M624 224h-16v-64c0-17.67-14.33-32-32-32h-73.6L419.22 24.02A64.025 64.025 0 0 0 369.24 0H256c-17.67 0-32 14.33-32 32v96H48c-8.84 0-16 7.16-16 16v80H16c-8.84 0-16 7.16-16 16v32c0 8.84 7.16 16 16 16h16.72c29.21-38.65 75.1-64 127.28-64s98.07 25.35 127.28 64h65.45c29.21-38.65 75.1-64 127.28-64s98.07 25.35 127.28 64H624c8.84 0 16-7.16 16-16v-32c0-8.84-7.16-16-16-16zm-336-96V64h81.24l51.2 64H288zm304 224h-5.2c-2.2-7.33-5.07-14.28-8.65-20.89l3.67-3.67c6.25-6.25 6.25-16.38 0-22.63l-22.63-22.63c-6.25-6.25-16.38-6.25-22.63 0l-3.67 3.67A110.85 110.85 0 0 0 512 277.2V272c0-8.84-7.16-16-16-16h-32c-8.84 0-16 7.16-16 16v5.2c-7.33 2.2-14.28 5.07-20.89 8.65l-3.67-3.67c-6.25-6.25-16.38-6.25-22.63 0l-22.63 22.63c-6.25 6.25-6.25 16.38 0 22.63l3.67 3.67A110.85 110.85 0 0 0 373.2 352H368c-8.84 0-16 7.16-16 16v32c0 8.84 7.16 16 16 16h5.2c2.2 7.33 5.07 14.28 8.65 20.89l-3.67 3.67c-6.25 6.25-6.25 16.38 0 22.63l22.63 22.63c6.25 6.25 16.38 6.25 22.63 0l3.67-3.67c6.61 3.57 13.57 6.45 20.9 8.65v5.2c0 8.84 7.16 16 16 16h32c8.84 0 16-7.16 16-16v-5.2c7.33-2.2 14.28-5.07 20.9-8.65l3.67 3.67c6.25 6.25 16.38 6.25 22.63 0l22.63-22.63c6.25-6.25 6.25-16.38 0-22.63l-3.67-3.67a110.85 110.85 0 0 0 8.65-20.89h5.2c8.84 0 16-7.16 16-16v-32c-.02-8.84-7.18-16-16.02-16zm-112 80c-26.51 0-48-21.49-48-48s21.49-48 48-48 48 21.49 48 48-21.49 48-48 48zm-208-80h-5.2c-2.2-7.33-5.07-14.28-8.65-20.89l3.67-3.67c6.25-6.25 6.25-16.38 0-22.63l-22.63-22.63c-6.25-6.25-16.38-6.25-22.63 0l-3.67 3.67A110.85 110.85 0 0 0 192 277.2V272c0-8.84-7.16-16-16-16h-32c-8.84 0-16 7.16-16 16v5.2c-7.33 2.2-14.28 5.07-20.89 8.65l-3.67-3.67c-6.25-6.25-16.38-6.25-22.63 0L58.18 304.8c-6.25 6.25-6.25 16.38 0 22.63l3.67 3.67a110.85 110.85 0 0 0-8.65 20.89H48c-8.84 0-16 7.16-16 16v32c0 8.84 7.16 16 16 16h5.2c2.2 7.33 5.07 14.28 8.65 20.89l-3.67 3.67c-6.25 6.25-6.25 16.38 0 22.63l22.63 22.63c6.25 6.25 16.38 6.25 22.63 0l3.67-3.67c6.61 3.57 13.57 6.45 20.9 8.65v5.2c0 8.84 7.16 16 16 16h32c8.84 0 16-7.16 16-16v-5.2c7.33-2.2 14.28-5.07 20.9-8.65l3.67 3.67c6.25 6.25 16.38 6.25 22.63 0l22.63-22.63c6.25-6.25 6.25-16.38 0-22.63l-3.67-3.67a110.85 110.85 0 0 0 8.65-20.89h5.2c8.84 0 16-7.16 16-16v-32C288 359.16 280.84 352 272 352zm-112 80c-26.51 0-48-21.49-48-48s21.49-48 48-48 48 21.49 48 48-21.49 48-48 48z"]},im={prefix:"fas",iconName:"truck-moving",icon:[640,512,[],"f4df","M621.3 237.3l-58.5-58.5c-12-12-28.3-18.7-45.3-18.7H480V64c0-17.7-14.3-32-32-32H32C14.3 32 0 46.3 0 64v336c0 44.2 35.8 80 80 80 26.3 0 49.4-12.9 64-32.4 14.6 19.6 37.7 32.4 64 32.4 44.2 0 80-35.8 80-80 0-5.5-.6-10.8-1.6-16h163.2c-1.1 5.2-1.6 10.5-1.6 16 0 44.2 35.8 80 80 80s80-35.8 80-80c0-5.5-.6-10.8-1.6-16H624c8.8 0 16-7.2 16-16v-85.5c0-17-6.7-33.2-18.7-45.2zM80 432c-17.6 0-32-14.4-32-32s14.4-32 32-32 32 14.4 32 32-14.4 32-32 32zm128 0c-17.6 0-32-14.4-32-32s14.4-32 32-32 32 14.4 32 32-14.4 32-32 32zm272-224h37.5c4.3 0 8.3 1.7 11.3 4.7l43.3 43.3H480v-48zm48 224c-17.6 0-32-14.4-32-32s14.4-32 32-32 32 14.4 32 32-14.4 32-32 32z"]},nm={prefix:"fas",iconName:"truck-pickup",icon:[640,512,[],"f63c","M624 288h-16v-64c0-17.67-14.33-32-32-32h-48L419.22 56.02A64.025 64.025 0 0 0 369.24 32H256c-17.67 0-32 14.33-32 32v128H64c-17.67 0-32 14.33-32 32v64H16c-8.84 0-16 7.16-16 16v32c0 8.84 7.16 16 16 16h49.61c-.76 5.27-1.61 10.52-1.61 16 0 61.86 50.14 112 112 112s112-50.14 112-112c0-5.48-.85-10.73-1.61-16h67.23c-.76 5.27-1.61 10.52-1.61 16 0 61.86 50.14 112 112 112s112-50.14 112-112c0-5.48-.85-10.73-1.61-16H624c8.84 0 16-7.16 16-16v-32c0-8.84-7.16-16-16-16zM288 96h81.24l76.8 96H288V96zM176 416c-26.47 0-48-21.53-48-48s21.53-48 48-48 48 21.53 48 48-21.53 48-48 48zm288 0c-26.47 0-48-21.53-48-48s21.53-48 48-48 48 21.53 48 48-21.53 48-48 48z"]},sm={prefix:"fas",iconName:"tshirt",icon:[640,512,[],"f553","M631.2 96.5L436.5 0C416.4 27.8 371.9 47.2 320 47.2S223.6 27.8 203.5 0L8.8 96.5c-7.9 4-11.1 13.6-7.2 21.5l57.2 114.5c4 7.9 13.6 11.1 21.5 7.2l56.6-27.7c10.6-5.2 23 2.5 23 14.4V480c0 17.7 14.3 32 32 32h256c17.7 0 32-14.3 32-32V226.3c0-11.8 12.4-19.6 23-14.4l56.6 27.7c7.9 4 17.5.8 21.5-7.2L638.3 118c4-7.9.8-17.6-7.1-21.5z"]},rm={prefix:"fas",iconName:"tty",icon:[512,512,[],"f1e4","M5.37 103.822c138.532-138.532 362.936-138.326 501.262 0 6.078 6.078 7.074 15.496 2.583 22.681l-43.214 69.138a18.332 18.332 0 0 1-22.356 7.305l-86.422-34.569a18.335 18.335 0 0 1-11.434-18.846L351.741 90c-62.145-22.454-130.636-21.986-191.483 0l5.953 59.532a18.331 18.331 0 0 1-11.434 18.846l-86.423 34.568a18.334 18.334 0 0 1-22.356-7.305L2.787 126.502a18.333 18.333 0 0 1 2.583-22.68zM96 308v-40c0-6.627-5.373-12-12-12H44c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm96 0v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm96 0v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm96 0v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm96 0v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm-336 96v-40c0-6.627-5.373-12-12-12H92c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm96 0v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm96 0v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm96 0v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zM96 500v-40c0-6.627-5.373-12-12-12H44c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm288 0v-40c0-6.627-5.373-12-12-12H140c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h232c6.627 0 12-5.373 12-12zm96 0v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12z"]},om={prefix:"fas",iconName:"tv",icon:[640,512,[],"f26c","M592 0H48A48 48 0 0 0 0 48v320a48 48 0 0 0 48 48h240v32H112a16 16 0 0 0-16 16v32a16 16 0 0 0 16 16h416a16 16 0 0 0 16-16v-32a16 16 0 0 0-16-16H352v-32h240a48 48 0 0 0 48-48V48a48 48 0 0 0-48-48zm-16 352H64V64h512z"]},am={prefix:"fas",iconName:"umbrella",icon:[576,512,[],"f0e9","M575.7 280.8C547.1 144.5 437.3 62.6 320 49.9V32c0-17.7-14.3-32-32-32s-32 14.3-32 32v17.9C138.3 62.6 29.5 144.5.3 280.8c-2.2 10.1 8.5 21.3 18.7 11.4 52-55 107.7-52.4 158.6 37 5.3 9.5 14.9 8.6 19.7 0 20.2-35.4 44.9-73.2 90.7-73.2 58.5 0 88.2 68.8 90.7 73.2 4.8 8.6 14.4 9.5 19.7 0 51-89.5 107.1-91.4 158.6-37 10.3 10 20.9-1.3 18.7-11.4zM256 301.7V432c0 8.8-7.2 16-16 16-7.8 0-13.2-5.3-15.1-10.7-5.9-16.7-24.1-25.4-40.8-19.5-16.7 5.9-25.4 24.2-19.5 40.8 11.2 31.9 41.6 53.3 75.4 53.3 44.1 0 80-35.9 80-80V301.6c-9.1-7.9-19.8-13.6-32-13.6-12.3.1-22.4 4.8-32 13.7z"]},lm={prefix:"fas",iconName:"umbrella-beach",icon:[640,512,[],"f5ca","M115.38 136.9l102.11 37.18c35.19-81.54 86.21-144.29 139-173.7-95.88-4.89-188.78 36.96-248.53 111.8-6.69 8.4-2.66 21.05 7.42 24.72zm132.25 48.16l238.48 86.83c35.76-121.38 18.7-231.66-42.63-253.98-7.4-2.7-15.13-4-23.09-4-58.02.01-128.27 69.17-172.76 171.15zM521.48 60.5c6.22 16.3 10.83 34.6 13.2 55.19 5.74 49.89-1.42 108.23-18.95 166.98l102.62 37.36c10.09 3.67 21.31-3.43 21.57-14.17 2.32-95.69-41.91-187.44-118.44-245.36zM560 447.98H321.06L386 269.5l-60.14-21.9-72.9 200.37H16c-8.84 0-16 7.16-16 16.01v32.01C0 504.83 7.16 512 16 512h544c8.84 0 16-7.17 16-16.01v-32.01c0-8.84-7.16-16-16-16z"]},cm={prefix:"fas",iconName:"underline",icon:[448,512,[],"f0cd","M32 64h32v160c0 88.22 71.78 160 160 160s160-71.78 160-160V64h32a16 16 0 0 0 16-16V16a16 16 0 0 0-16-16H272a16 16 0 0 0-16 16v32a16 16 0 0 0 16 16h32v160a80 80 0 0 1-160 0V64h32a16 16 0 0 0 16-16V16a16 16 0 0 0-16-16H32a16 16 0 0 0-16 16v32a16 16 0 0 0 16 16zm400 384H16a16 16 0 0 0-16 16v32a16 16 0 0 0 16 16h416a16 16 0 0 0 16-16v-32a16 16 0 0 0-16-16z"]},hm={prefix:"fas",iconName:"undo",icon:[512,512,[],"f0e2","M212.333 224.333H12c-6.627 0-12-5.373-12-12V12C0 5.373 5.373 0 12 0h48c6.627 0 12 5.373 12 12v78.112C117.773 39.279 184.26 7.47 258.175 8.007c136.906.994 246.448 111.623 246.157 248.532C504.041 393.258 393.12 504 256.333 504c-64.089 0-122.496-24.313-166.51-64.215-5.099-4.622-5.334-12.554-.467-17.42l33.967-33.967c4.474-4.474 11.662-4.717 16.401-.525C170.76 415.336 211.58 432 256.333 432c97.268 0 176-78.716 176-176 0-97.267-78.716-176-176-176-58.496 0-110.28 28.476-142.274 72.333h98.274c6.627 0 12 5.373 12 12v48c0 6.627-5.373 12-12 12z"]},dm={prefix:"fas",iconName:"undo-alt",icon:[512,512,[],"f2ea","M255.545 8c-66.269.119-126.438 26.233-170.86 68.685L48.971 40.971C33.851 25.851 8 36.559 8 57.941V192c0 13.255 10.745 24 24 24h134.059c21.382 0 32.09-25.851 16.971-40.971l-41.75-41.75c30.864-28.899 70.801-44.907 113.23-45.273 92.398-.798 170.283 73.977 169.484 169.442C423.236 348.009 349.816 424 256 424c-41.127 0-79.997-14.678-110.63-41.556-4.743-4.161-11.906-3.908-16.368.553L89.34 422.659c-4.872 4.872-4.631 12.815.482 17.433C133.798 479.813 192.074 504 256 504c136.966 0 247.999-111.033 248-247.998C504.001 119.193 392.354 7.755 255.545 8z"]},um={prefix:"fas",iconName:"universal-access",icon:[512,512,[],"f29a","M256 48c114.953 0 208 93.029 208 208 0 114.953-93.029 208-208 208-114.953 0-208-93.029-208-208 0-114.953 93.029-208 208-208m0-40C119.033 8 8 119.033 8 256s111.033 248 248 248 248-111.033 248-248S392.967 8 256 8zm0 56C149.961 64 64 149.961 64 256s85.961 192 192 192 192-85.961 192-192S362.039 64 256 64zm0 44c19.882 0 36 16.118 36 36s-16.118 36-36 36-36-16.118-36-36 16.118-36 36-36zm117.741 98.023c-28.712 6.779-55.511 12.748-82.14 15.807.851 101.023 12.306 123.052 25.037 155.621 3.617 9.26-.957 19.698-10.217 23.315-9.261 3.617-19.699-.957-23.316-10.217-8.705-22.308-17.086-40.636-22.261-78.549h-9.686c-5.167 37.851-13.534 56.208-22.262 78.549-3.615 9.255-14.05 13.836-23.315 10.217-9.26-3.617-13.834-14.056-10.217-23.315 12.713-32.541 24.185-54.541 25.037-155.621-26.629-3.058-53.428-9.027-82.141-15.807-8.6-2.031-13.926-10.648-11.895-19.249s10.647-13.926 19.249-11.895c96.686 22.829 124.283 22.783 220.775 0 8.599-2.03 17.218 3.294 19.249 11.895 2.029 8.601-3.297 17.219-11.897 19.249z"]},pm={prefix:"fas",iconName:"university",icon:[512,512,[],"f19c","M496 128v16a8 8 0 0 1-8 8h-24v12c0 6.627-5.373 12-12 12H60c-6.627 0-12-5.373-12-12v-12H24a8 8 0 0 1-8-8v-16a8 8 0 0 1 4.941-7.392l232-88a7.996 7.996 0 0 1 6.118 0l232 88A8 8 0 0 1 496 128zm-24 304H40c-13.255 0-24 10.745-24 24v16a8 8 0 0 0 8 8h464a8 8 0 0 0 8-8v-16c0-13.255-10.745-24-24-24zM96 192v192H60c-6.627 0-12 5.373-12 12v20h416v-20c0-6.627-5.373-12-12-12h-36V192h-64v192h-64V192h-64v192h-64V192H96z"]},gm={prefix:"fas",iconName:"unlink",icon:[512,512,[],"f127","M304.083 405.907c4.686 4.686 4.686 12.284 0 16.971l-44.674 44.674c-59.263 59.262-155.693 59.266-214.961 0-59.264-59.265-59.264-155.696 0-214.96l44.675-44.675c4.686-4.686 12.284-4.686 16.971 0l39.598 39.598c4.686 4.686 4.686 12.284 0 16.971l-44.675 44.674c-28.072 28.073-28.072 73.75 0 101.823 28.072 28.072 73.75 28.073 101.824 0l44.674-44.674c4.686-4.686 12.284-4.686 16.971 0l39.597 39.598zm-56.568-260.216c4.686 4.686 12.284 4.686 16.971 0l44.674-44.674c28.072-28.075 73.75-28.073 101.824 0 28.072 28.073 28.072 73.75 0 101.823l-44.675 44.674c-4.686 4.686-4.686 12.284 0 16.971l39.598 39.598c4.686 4.686 12.284 4.686 16.971 0l44.675-44.675c59.265-59.265 59.265-155.695 0-214.96-59.266-59.264-155.695-59.264-214.961 0l-44.674 44.674c-4.686 4.686-4.686 12.284 0 16.971l39.597 39.598zm234.828 359.28l22.627-22.627c9.373-9.373 9.373-24.569 0-33.941L63.598 7.029c-9.373-9.373-24.569-9.373-33.941 0L7.029 29.657c-9.373 9.373-9.373 24.569 0 33.941l441.373 441.373c9.373 9.372 24.569 9.372 33.941 0z"]},fm={prefix:"fas",iconName:"unlock",icon:[448,512,[],"f09c","M400 256H152V152.9c0-39.6 31.7-72.5 71.3-72.9 40-.4 72.7 32.1 72.7 72v16c0 13.3 10.7 24 24 24h32c13.3 0 24-10.7 24-24v-16C376 68 307.5-.3 223.5 0 139.5.3 72 69.5 72 153.5V256H48c-26.5 0-48 21.5-48 48v160c0 26.5 21.5 48 48 48h352c26.5 0 48-21.5 48-48V304c0-26.5-21.5-48-48-48z"]},mm={prefix:"fas",iconName:"unlock-alt",icon:[448,512,[],"f13e","M400 256H152V152.9c0-39.6 31.7-72.5 71.3-72.9 40-.4 72.7 32.1 72.7 72v16c0 13.3 10.7 24 24 24h32c13.3 0 24-10.7 24-24v-16C376 68 307.5-.3 223.5 0 139.5.3 72 69.5 72 153.5V256H48c-26.5 0-48 21.5-48 48v160c0 26.5 21.5 48 48 48h352c26.5 0 48-21.5 48-48V304c0-26.5-21.5-48-48-48zM264 408c0 22.1-17.9 40-40 40s-40-17.9-40-40v-48c0-22.1 17.9-40 40-40s40 17.9 40 40v48z"]},vm={prefix:"fas",iconName:"upload",icon:[512,512,[],"f093","M296 384h-80c-13.3 0-24-10.7-24-24V192h-87.7c-17.8 0-26.7-21.5-14.1-34.1L242.3 5.7c7.5-7.5 19.8-7.5 27.3 0l152.2 152.2c12.6 12.6 3.7 34.1-14.1 34.1H320v168c0 13.3-10.7 24-24 24zm216-8v112c0 13.3-10.7 24-24 24H24c-13.3 0-24-10.7-24-24V376c0-13.3 10.7-24 24-24h136v8c0 30.9 25.1 56 56 56h80c30.9 0 56-25.1 56-56v-8h136c13.3 0 24 10.7 24 24zm-124 88c0-11-9-20-20-20s-20 9-20 20 9 20 20 20 20-9 20-20zm64 0c0-11-9-20-20-20s-20 9-20 20 9 20 20 20 20-9 20-20z"]},ym={prefix:"fas",iconName:"user",icon:[448,512,[],"f007","M224 256c70.7 0 128-57.3 128-128S294.7 0 224 0 96 57.3 96 128s57.3 128 128 128zm89.6 32h-16.7c-22.2 10.2-46.9 16-72.9 16s-50.6-5.8-72.9-16h-16.7C60.2 288 0 348.2 0 422.4V464c0 26.5 21.5 48 48 48h352c26.5 0 48-21.5 48-48v-41.6c0-74.2-60.2-134.4-134.4-134.4z"]},Cm={prefix:"fas",iconName:"user-alt",icon:[512,512,[],"f406","M256 288c79.5 0 144-64.5 144-144S335.5 0 256 0 112 64.5 112 144s64.5 144 144 144zm128 32h-55.1c-22.2 10.2-46.9 16-72.9 16s-50.6-5.8-72.9-16H128C57.3 320 0 377.3 0 448v16c0 26.5 21.5 48 48 48h416c26.5 0 48-21.5 48-48v-16c0-70.7-57.3-128-128-128z"]},bm={prefix:"fas",iconName:"user-alt-slash",icon:[640,512,[],"f4fa","M633.8 458.1L389.6 269.3C433.8 244.7 464 198.1 464 144 464 64.5 399.5 0 320 0c-67.1 0-123 46.1-139 108.2L45.5 3.4C38.5-2 28.5-.8 23 6.2L3.4 31.4c-5.4 7-4.2 17 2.8 22.4l588.4 454.7c7 5.4 17 4.2 22.5-2.8l19.6-25.3c5.4-6.8 4.1-16.9-2.9-22.3zM198.4 320C124.2 320 64 380.2 64 454.4v9.6c0 26.5 21.5 48 48 48h382.2L245.8 320h-47.4z"]},Sm={prefix:"fas",iconName:"user-astronaut",icon:[448,512,[],"f4fb","M64 224h13.5c24.7 56.5 80.9 96 146.5 96s121.8-39.5 146.5-96H384c8.8 0 16-7.2 16-16v-96c0-8.8-7.2-16-16-16h-13.5C345.8 39.5 289.6 0 224 0S102.2 39.5 77.5 96H64c-8.8 0-16 7.2-16 16v96c0 8.8 7.2 16 16 16zm40-88c0-22.1 21.5-40 48-40h144c26.5 0 48 17.9 48 40v24c0 53-43 96-96 96h-48c-53 0-96-43-96-96v-24zm72 72l12-36 36-12-36-12-12-36-12 36-36 12 36 12 12 36zm151.6 113.4C297.7 340.7 262.2 352 224 352s-73.7-11.3-103.6-30.6C52.9 328.5 0 385 0 454.4v9.6c0 26.5 21.5 48 48 48h80v-64c0-17.7 14.3-32 32-32h128c17.7 0 32 14.3 32 32v64h80c26.5 0 48-21.5 48-48v-9.6c0-69.4-52.9-125.9-120.4-133zM272 448c-8.8 0-16 7.2-16 16s7.2 16 16 16 16-7.2 16-16-7.2-16-16-16zm-96 0c-8.8 0-16 7.2-16 16v48h32v-48c0-8.8-7.2-16-16-16z"]},wm={prefix:"fas",iconName:"user-check",icon:[640,512,[],"f4fc","M224 256c70.7 0 128-57.3 128-128S294.7 0 224 0 96 57.3 96 128s57.3 128 128 128zm89.6 32h-16.7c-22.2 10.2-46.9 16-72.9 16s-50.6-5.8-72.9-16h-16.7C60.2 288 0 348.2 0 422.4V464c0 26.5 21.5 48 48 48h352c26.5 0 48-21.5 48-48v-41.6c0-74.2-60.2-134.4-134.4-134.4zm323-128.4l-27.8-28.1c-4.6-4.7-12.1-4.7-16.8-.1l-104.8 104-45.5-45.8c-4.6-4.7-12.1-4.7-16.8-.1l-28.1 27.9c-4.7 4.6-4.7 12.1-.1 16.8l81.7 82.3c4.6 4.7 12.1 4.7 16.8.1l141.3-140.2c4.6-4.7 4.7-12.2.1-16.8z"]},xm={prefix:"fas",iconName:"user-circle",icon:[496,512,[],"f2bd","M248 8C111 8 0 119 0 256s111 248 248 248 248-111 248-248S385 8 248 8zm0 96c48.6 0 88 39.4 88 88s-39.4 88-88 88-88-39.4-88-88 39.4-88 88-88zm0 344c-58.7 0-111.3-26.6-146.5-68.2 18.8-35.4 55.6-59.8 98.5-59.8 2.4 0 4.8.4 7.1 1.1 13 4.2 26.6 6.9 40.9 6.9 14.3 0 28-2.7 40.9-6.9 2.3-.7 4.7-1.1 7.1-1.1 42.9 0 79.7 24.4 98.5 59.8C359.3 421.4 306.7 448 248 448z"]},Em={prefix:"fas",iconName:"user-clock",icon:[640,512,[],"f4fd","M496 224c-79.6 0-144 64.4-144 144s64.4 144 144 144 144-64.4 144-144-64.4-144-144-144zm64 150.3c0 5.3-4.4 9.7-9.7 9.7h-60.6c-5.3 0-9.7-4.4-9.7-9.7v-76.6c0-5.3 4.4-9.7 9.7-9.7h12.6c5.3 0 9.7 4.4 9.7 9.7V352h38.3c5.3 0 9.7 4.4 9.7 9.7v12.6zM320 368c0-27.8 6.7-54.1 18.2-77.5-8-1.5-16.2-2.5-24.6-2.5h-16.7c-22.2 10.2-46.9 16-72.9 16s-50.6-5.8-72.9-16h-16.7C60.2 288 0 348.2 0 422.4V464c0 26.5 21.5 48 48 48h347.1c-45.3-31.9-75.1-84.5-75.1-144zm-96-112c70.7 0 128-57.3 128-128S294.7 0 224 0 96 57.3 96 128s57.3 128 128 128z"]},Mm={prefix:"fas",iconName:"user-cog",icon:[640,512,[],"f4fe","M610.5 373.3c2.6-14.1 2.6-28.5 0-42.6l25.8-14.9c3-1.7 4.3-5.2 3.3-8.5-6.7-21.6-18.2-41.2-33.2-57.4-2.3-2.5-6-3.1-9-1.4l-25.8 14.9c-10.9-9.3-23.4-16.5-36.9-21.3v-29.8c0-3.4-2.4-6.4-5.7-7.1-22.3-5-45-4.8-66.2 0-3.3.7-5.7 3.7-5.7 7.1v29.8c-13.5 4.8-26 12-36.9 21.3l-25.8-14.9c-2.9-1.7-6.7-1.1-9 1.4-15 16.2-26.5 35.8-33.2 57.4-1 3.3.4 6.8 3.3 8.5l25.8 14.9c-2.6 14.1-2.6 28.5 0 42.6l-25.8 14.9c-3 1.7-4.3 5.2-3.3 8.5 6.7 21.6 18.2 41.1 33.2 57.4 2.3 2.5 6 3.1 9 1.4l25.8-14.9c10.9 9.3 23.4 16.5 36.9 21.3v29.8c0 3.4 2.4 6.4 5.7 7.1 22.3 5 45 4.8 66.2 0 3.3-.7 5.7-3.7 5.7-7.1v-29.8c13.5-4.8 26-12 36.9-21.3l25.8 14.9c2.9 1.7 6.7 1.1 9-1.4 15-16.2 26.5-35.8 33.2-57.4 1-3.3-.4-6.8-3.3-8.5l-25.8-14.9zM496 400.5c-26.8 0-48.5-21.8-48.5-48.5s21.8-48.5 48.5-48.5 48.5 21.8 48.5 48.5-21.7 48.5-48.5 48.5zM224 256c70.7 0 128-57.3 128-128S294.7 0 224 0 96 57.3 96 128s57.3 128 128 128zm201.2 226.5c-2.3-1.2-4.6-2.6-6.8-3.9l-7.9 4.6c-6 3.4-12.8 5.3-19.6 5.3-10.9 0-21.4-4.6-28.9-12.6-18.3-19.8-32.3-43.9-40.2-69.6-5.5-17.7 1.9-36.4 17.9-45.7l7.9-4.6c-.1-2.6-.1-5.2 0-7.8l-7.9-4.6c-16-9.2-23.4-28-17.9-45.7.9-2.9 2.2-5.8 3.2-8.7-3.8-.3-7.5-1.2-11.4-1.2h-16.7c-22.2 10.2-46.9 16-72.9 16s-50.6-5.8-72.9-16h-16.7C60.2 288 0 348.2 0 422.4V464c0 26.5 21.5 48 48 48h352c10.1 0 19.5-3.2 27.2-8.5-1.2-3.8-2-7.7-2-11.8v-9.2z"]},Am={prefix:"fas",iconName:"user-edit",icon:[640,512,[],"f4ff","M224 256c70.7 0 128-57.3 128-128S294.7 0 224 0 96 57.3 96 128s57.3 128 128 128zm89.6 32h-16.7c-22.2 10.2-46.9 16-72.9 16s-50.6-5.8-72.9-16h-16.7C60.2 288 0 348.2 0 422.4V464c0 26.5 21.5 48 48 48h274.9c-2.4-6.8-3.4-14-2.6-21.3l6.8-60.9 1.2-11.1 7.9-7.9 77.3-77.3c-24.5-27.7-60-45.5-99.9-45.5zm45.3 145.3l-6.8 61c-1.1 10.2 7.5 18.8 17.6 17.6l60.9-6.8 137.9-137.9-71.7-71.7-137.9 137.8zM633 268.9L595.1 231c-9.3-9.3-24.5-9.3-33.8 0l-37.8 37.8-4.1 4.1 71.8 71.7 41.8-41.8c9.3-9.4 9.3-24.5 0-33.9z"]},Tm={prefix:"fas",iconName:"user-friends",icon:[640,512,[],"f500","M192 256c61.9 0 112-50.1 112-112S253.9 32 192 32 80 82.1 80 144s50.1 112 112 112zm76.8 32h-8.3c-20.8 10-43.9 16-68.5 16s-47.6-6-68.5-16h-8.3C51.6 288 0 339.6 0 403.2V432c0 26.5 21.5 48 48 48h288c26.5 0 48-21.5 48-48v-28.8c0-63.6-51.6-115.2-115.2-115.2zM480 256c53 0 96-43 96-96s-43-96-96-96-96 43-96 96 43 96 96 96zm48 32h-3.8c-13.9 4.8-28.6 8-44.2 8s-30.3-3.2-44.2-8H432c-20.4 0-39.2 5.9-55.7 15.4 24.4 26.3 39.7 61.2 39.7 99.8v38.4c0 2.2-.5 4.3-.6 6.4H592c26.5 0 48-21.5 48-48 0-61.9-50.1-112-112-112z"]},Dm={prefix:"fas",iconName:"user-graduate",icon:[448,512,[],"f501","M319.4 320.6L224 416l-95.4-95.4C57.1 323.7 0 382.2 0 454.4v9.6c0 26.5 21.5 48 48 48h352c26.5 0 48-21.5 48-48v-9.6c0-72.2-57.1-130.7-128.6-133.8zM13.6 79.8l6.4 1.5v58.4c-7 4.2-12 11.5-12 20.3 0 8.4 4.6 15.4 11.1 19.7L3.5 242c-1.7 6.9 2.1 14 7.6 14h41.8c5.5 0 9.3-7.1 7.6-14l-15.6-62.3C51.4 175.4 56 168.4 56 160c0-8.8-5-16.1-12-20.3V87.1l66 15.9c-8.6 17.2-14 36.4-14 57 0 70.7 57.3 128 128 128s128-57.3 128-128c0-20.6-5.3-39.8-14-57l96.3-23.2c18.2-4.4 18.2-27.1 0-31.5l-190.4-46c-13-3.1-26.7-3.1-39.7 0L13.6 48.2c-18.1 4.4-18.1 27.2 0 31.6z"]},Im={prefix:"fas",iconName:"user-injured",icon:[448,512,[],"f728","M277.37 11.98C261.08 4.47 243.11 0 224 0c-53.69 0-99.5 33.13-118.51 80h81.19l90.69-68.02zM342.51 80c-7.9-19.47-20.67-36.2-36.49-49.52L239.99 80h102.52zM224 256c70.69 0 128-57.31 128-128 0-5.48-.95-10.7-1.61-16H97.61c-.67 5.3-1.61 10.52-1.61 16 0 70.69 57.31 128 128 128zM80 299.7V512h128.26l-98.45-221.52A132.835 132.835 0 0 0 80 299.7zM0 464c0 26.51 21.49 48 48 48V320.24C18.88 344.89 0 381.26 0 422.4V464zm256-48h-55.38l42.67 96H256c26.47 0 48-21.53 48-48s-21.53-48-48-48zm57.6-128h-16.71c-22.24 10.18-46.88 16-72.89 16s-50.65-5.82-72.89-16h-7.37l42.67 96H256c44.11 0 80 35.89 80 80 0 18.08-6.26 34.59-16.41 48H400c26.51 0 48-21.49 48-48v-41.6c0-74.23-60.17-134.4-134.4-134.4z"]},Rm={prefix:"fas",iconName:"user-lock",icon:[640,512,[],"f502","M224 256A128 128 0 1 0 96 128a128 128 0 0 0 128 128zm96 64a63.08 63.08 0 0 1 8.1-30.5c-4.8-.5-9.5-1.5-14.5-1.5h-16.7a174.08 174.08 0 0 1-145.8 0h-16.7A134.43 134.43 0 0 0 0 422.4V464a48 48 0 0 0 48 48h280.9a63.54 63.54 0 0 1-8.9-32zm288-32h-32v-80a80 80 0 0 0-160 0v80h-32a32 32 0 0 0-32 32v160a32 32 0 0 0 32 32h224a32 32 0 0 0 32-32V320a32 32 0 0 0-32-32zM496 432a32 32 0 1 1 32-32 32 32 0 0 1-32 32zm32-144h-64v-80a32 32 0 0 1 64 0z"]},Lm={prefix:"fas",iconName:"user-md",icon:[448,512,[],"f0f0","M224 256c70.7 0 128-57.3 128-128S294.7 0 224 0 96 57.3 96 128s57.3 128 128 128zM104 424c0 13.3 10.7 24 24 24s24-10.7 24-24-10.7-24-24-24-24 10.7-24 24zm216-135.4v49c36.5 7.4 64 39.8 64 78.4v41.7c0 7.6-5.4 14.2-12.9 15.7l-32.2 6.4c-4.3.9-8.5-1.9-9.4-6.3l-3.1-15.7c-.9-4.3 1.9-8.6 6.3-9.4l19.3-3.9V416c0-62.8-96-65.1-96 1.9v26.7l19.3 3.9c4.3.9 7.1 5.1 6.3 9.4l-3.1 15.7c-.9 4.3-5.1 7.1-9.4 6.3l-31.2-4.2c-7.9-1.1-13.8-7.8-13.8-15.9V416c0-38.6 27.5-70.9 64-78.4v-45.2c-2.2.7-4.4 1.1-6.6 1.9-18 6.3-37.3 9.8-57.4 9.8s-39.4-3.5-57.4-9.8c-7.4-2.6-14.9-4.2-22.6-5.2v81.6c23.1 6.9 40 28.1 40 53.4 0 30.9-25.1 56-56 56s-56-25.1-56-56c0-25.3 16.9-46.5 40-53.4v-80.4C48.5 301 0 355.8 0 422.4v44.8C0 491.9 20.1 512 44.8 512h358.4c24.7 0 44.8-20.1 44.8-44.8v-44.8c0-72-56.8-130.3-128-133.8z"]},km={prefix:"fas",iconName:"user-minus",icon:[640,512,[],"f503","M624 208H432c-8.8 0-16 7.2-16 16v32c0 8.8 7.2 16 16 16h192c8.8 0 16-7.2 16-16v-32c0-8.8-7.2-16-16-16zm-400 48c70.7 0 128-57.3 128-128S294.7 0 224 0 96 57.3 96 128s57.3 128 128 128zm89.6 32h-16.7c-22.2 10.2-46.9 16-72.9 16s-50.6-5.8-72.9-16h-16.7C60.2 288 0 348.2 0 422.4V464c0 26.5 21.5 48 48 48h352c26.5 0 48-21.5 48-48v-41.6c0-74.2-60.2-134.4-134.4-134.4z"]},Pm={prefix:"fas",iconName:"user-ninja",icon:[448,512,[],"f504","M325.4 289.2L224 390.6 122.6 289.2C54 295.3 0 352.2 0 422.4V464c0 26.5 21.5 48 48 48h352c26.5 0 48-21.5 48-48v-41.6c0-70.2-54-127.1-122.6-133.2zM32 192c27.3 0 51.8-11.5 69.2-29.7 15.1 53.9 64 93.7 122.8 93.7 70.7 0 128-57.3 128-128S294.7 0 224 0c-50.4 0-93.6 29.4-114.5 71.8C92.1 47.8 64 32 32 32c0 33.4 17.1 62.8 43.1 80-26 17.2-43.1 46.6-43.1 80zm144-96h96c17.7 0 32 14.3 32 32H144c0-17.7 14.3-32 32-32z"]},Nm={prefix:"fas",iconName:"user-nurse",icon:[448,512,[],"f82f","M319.41,320,224,415.39,128.59,320C57.1,323.1,0,381.6,0,453.79A58.21,58.21,0,0,0,58.21,512H389.79A58.21,58.21,0,0,0,448,453.79C448,381.6,390.9,323.1,319.41,320ZM224,304A128,128,0,0,0,352,176V65.82a32,32,0,0,0-20.76-30L246.47,4.07a64,64,0,0,0-44.94,0L116.76,35.86A32,32,0,0,0,96,65.82V176A128,128,0,0,0,224,304ZM184,71.67a5,5,0,0,1,5-5h21.67V45a5,5,0,0,1,5-5h16.66a5,5,0,0,1,5,5V66.67H259a5,5,0,0,1,5,5V88.33a5,5,0,0,1-5,5H237.33V115a5,5,0,0,1-5,5H215.67a5,5,0,0,1-5-5V93.33H189a5,5,0,0,1-5-5ZM144,160H304v16a80,80,0,0,1-160,0Z"]},Om={prefix:"fas",iconName:"user-plus",icon:[640,512,[],"f234","M624 208h-64v-64c0-8.8-7.2-16-16-16h-32c-8.8 0-16 7.2-16 16v64h-64c-8.8 0-16 7.2-16 16v32c0 8.8 7.2 16 16 16h64v64c0 8.8 7.2 16 16 16h32c8.8 0 16-7.2 16-16v-64h64c8.8 0 16-7.2 16-16v-32c0-8.8-7.2-16-16-16zm-400 48c70.7 0 128-57.3 128-128S294.7 0 224 0 96 57.3 96 128s57.3 128 128 128zm89.6 32h-16.7c-22.2 10.2-46.9 16-72.9 16s-50.6-5.8-72.9-16h-16.7C60.2 288 0 348.2 0 422.4V464c0 26.5 21.5 48 48 48h352c26.5 0 48-21.5 48-48v-41.6c0-74.2-60.2-134.4-134.4-134.4z"]},_m={prefix:"fas",iconName:"user-secret",icon:[448,512,[],"f21b","M383.9 308.3l23.9-62.6c4-10.5-3.7-21.7-15-21.7h-58.5c11-18.9 17.8-40.6 17.8-64v-.3c39.2-7.8 64-19.1 64-31.7 0-13.3-27.3-25.1-70.1-33-9.2-32.8-27-65.8-40.6-82.8-9.5-11.9-25.9-15.6-39.5-8.8l-27.6 13.8c-9 4.5-19.6 4.5-28.6 0L182.1 3.4c-13.6-6.8-30-3.1-39.5 8.8-13.5 17-31.4 50-40.6 82.8-42.7 7.9-70 19.7-70 33 0 12.6 24.8 23.9 64 31.7v.3c0 23.4 6.8 45.1 17.8 64H56.3c-11.5 0-19.2 11.7-14.7 22.3l25.8 60.2C27.3 329.8 0 372.7 0 422.4v44.8C0 491.9 20.1 512 44.8 512h358.4c24.7 0 44.8-20.1 44.8-44.8v-44.8c0-48.4-25.8-90.4-64.1-114.1zM176 480l-41.6-192 49.6 32 24 40-32 120zm96 0l-32-120 24-40 49.6-32L272 480zm41.7-298.5c-3.9 11.9-7 24.6-16.5 33.4-10.1 9.3-48 22.4-64-25-2.8-8.4-15.4-8.4-18.3 0-17 50.2-56 32.4-64 25-9.5-8.8-12.7-21.5-16.5-33.4-.8-2.5-6.3-5.7-6.3-5.8v-10.8c28.3 3.6 61 5.8 96 5.8s67.7-2.1 96-5.8v10.8c-.1.1-5.6 3.2-6.4 5.8z"]},Fm={prefix:"fas",iconName:"user-shield",icon:[640,512,[],"f505","M622.3 271.1l-115.2-45c-4.1-1.6-12.6-3.7-22.2 0l-115.2 45c-10.7 4.2-17.7 14-17.7 24.9 0 111.6 68.7 188.8 132.9 213.9 9.6 3.7 18 1.6 22.2 0C558.4 489.9 640 420.5 640 296c0-10.9-7-20.7-17.7-24.9zM496 462.4V273.3l95.5 37.3c-5.6 87.1-60.9 135.4-95.5 151.8zM224 256c70.7 0 128-57.3 128-128S294.7 0 224 0 96 57.3 96 128s57.3 128 128 128zm96 40c0-2.5.8-4.8 1.1-7.2-2.5-.1-4.9-.8-7.5-.8h-16.7c-22.2 10.2-46.9 16-72.9 16s-50.6-5.8-72.9-16h-16.7C60.2 288 0 348.2 0 422.4V464c0 26.5 21.5 48 48 48h352c6.8 0 13.3-1.5 19.2-4-54-42.9-99.2-116.7-99.2-212z"]},Gm={prefix:"fas",iconName:"user-slash",icon:[640,512,[],"f506","M633.8 458.1L362.3 248.3C412.1 230.7 448 183.8 448 128 448 57.3 390.7 0 320 0c-67.1 0-121.5 51.8-126.9 117.4L45.5 3.4C38.5-2 28.5-.8 23 6.2L3.4 31.4c-5.4 7-4.2 17 2.8 22.4l588.4 454.7c7 5.4 17 4.2 22.5-2.8l19.6-25.3c5.4-6.8 4.1-16.9-2.9-22.3zM96 422.4V464c0 26.5 21.5 48 48 48h350.2L207.4 290.3C144.2 301.3 96 356 96 422.4z"]},Vm={prefix:"fas",iconName:"user-tag",icon:[640,512,[],"f507","M630.6 364.9l-90.3-90.2c-12-12-28.3-18.7-45.3-18.7h-79.3c-17.7 0-32 14.3-32 32v79.2c0 17 6.7 33.2 18.7 45.2l90.3 90.2c12.5 12.5 32.8 12.5 45.3 0l92.5-92.5c12.6-12.5 12.6-32.7.1-45.2zm-182.8-21c-13.3 0-24-10.7-24-24s10.7-24 24-24 24 10.7 24 24c0 13.2-10.7 24-24 24zm-223.8-88c70.7 0 128-57.3 128-128C352 57.3 294.7 0 224 0S96 57.3 96 128c0 70.6 57.3 127.9 128 127.9zm127.8 111.2V294c-12.2-3.6-24.9-6.2-38.2-6.2h-16.7c-22.2 10.2-46.9 16-72.9 16s-50.6-5.8-72.9-16h-16.7C60.2 287.9 0 348.1 0 422.3v41.6c0 26.5 21.5 48 48 48h352c15.5 0 29.1-7.5 37.9-18.9l-58-58c-18.1-18.1-28.1-42.2-28.1-67.9z"]},Bm={prefix:"fas",iconName:"user-tie",icon:[448,512,[],"f508","M224 256c70.7 0 128-57.3 128-128S294.7 0 224 0 96 57.3 96 128s57.3 128 128 128zm95.8 32.6L272 480l-32-136 32-56h-96l32 56-32 136-47.8-191.4C56.9 292 0 350.3 0 422.4V464c0 26.5 21.5 48 48 48h352c26.5 0 48-21.5 48-48v-41.6c0-72.1-56.9-130.4-128.2-133.8z"]},Hm={prefix:"fas",iconName:"user-times",icon:[640,512,[],"f235","M589.6 240l45.6-45.6c6.3-6.3 6.3-16.5 0-22.8l-22.8-22.8c-6.3-6.3-16.5-6.3-22.8 0L544 194.4l-45.6-45.6c-6.3-6.3-16.5-6.3-22.8 0l-22.8 22.8c-6.3 6.3-6.3 16.5 0 22.8l45.6 45.6-45.6 45.6c-6.3 6.3-6.3 16.5 0 22.8l22.8 22.8c6.3 6.3 16.5 6.3 22.8 0l45.6-45.6 45.6 45.6c6.3 6.3 16.5 6.3 22.8 0l22.8-22.8c6.3-6.3 6.3-16.5 0-22.8L589.6 240zM224 256c70.7 0 128-57.3 128-128S294.7 0 224 0 96 57.3 96 128s57.3 128 128 128zm89.6 32h-16.7c-22.2 10.2-46.9 16-72.9 16s-50.6-5.8-72.9-16h-16.7C60.2 288 0 348.2 0 422.4V464c0 26.5 21.5 48 48 48h352c26.5 0 48-21.5 48-48v-41.6c0-74.2-60.2-134.4-134.4-134.4z"]},zm={prefix:"fas",iconName:"users",icon:[640,512,[],"f0c0","M96 224c35.3 0 64-28.7 64-64s-28.7-64-64-64-64 28.7-64 64 28.7 64 64 64zm448 0c35.3 0 64-28.7 64-64s-28.7-64-64-64-64 28.7-64 64 28.7 64 64 64zm32 32h-64c-17.6 0-33.5 7.1-45.1 18.6 40.3 22.1 68.9 62 75.1 109.4h66c17.7 0 32-14.3 32-32v-32c0-35.3-28.7-64-64-64zm-256 0c61.9 0 112-50.1 112-112S381.9 32 320 32 208 82.1 208 144s50.1 112 112 112zm76.8 32h-8.3c-20.8 10-43.9 16-68.5 16s-47.6-6-68.5-16h-8.3C179.6 288 128 339.6 128 403.2V432c0 26.5 21.5 48 48 48h288c26.5 0 48-21.5 48-48v-28.8c0-63.6-51.6-115.2-115.2-115.2zm-223.7-13.4C161.5 263.1 145.6 256 128 256H64c-35.3 0-64 28.7-64 64v32c0 17.7 14.3 32 32 32h65.9c6.3-47.4 34.9-87.3 75.2-109.4z"]},Um={prefix:"fas",iconName:"users-cog",icon:[640,512,[],"f509","M610.5 341.3c2.6-14.1 2.6-28.5 0-42.6l25.8-14.9c3-1.7 4.3-5.2 3.3-8.5-6.7-21.6-18.2-41.2-33.2-57.4-2.3-2.5-6-3.1-9-1.4l-25.8 14.9c-10.9-9.3-23.4-16.5-36.9-21.3v-29.8c0-3.4-2.4-6.4-5.7-7.1-22.3-5-45-4.8-66.2 0-3.3.7-5.7 3.7-5.7 7.1v29.8c-13.5 4.8-26 12-36.9 21.3l-25.8-14.9c-2.9-1.7-6.7-1.1-9 1.4-15 16.2-26.5 35.8-33.2 57.4-1 3.3.4 6.8 3.3 8.5l25.8 14.9c-2.6 14.1-2.6 28.5 0 42.6l-25.8 14.9c-3 1.7-4.3 5.2-3.3 8.5 6.7 21.6 18.2 41.1 33.2 57.4 2.3 2.5 6 3.1 9 1.4l25.8-14.9c10.9 9.3 23.4 16.5 36.9 21.3v29.8c0 3.4 2.4 6.4 5.7 7.1 22.3 5 45 4.8 66.2 0 3.3-.7 5.7-3.7 5.7-7.1v-29.8c13.5-4.8 26-12 36.9-21.3l25.8 14.9c2.9 1.7 6.7 1.1 9-1.4 15-16.2 26.5-35.8 33.2-57.4 1-3.3-.4-6.8-3.3-8.5l-25.8-14.9zM496 368.5c-26.8 0-48.5-21.8-48.5-48.5s21.8-48.5 48.5-48.5 48.5 21.8 48.5 48.5-21.7 48.5-48.5 48.5zM96 224c35.3 0 64-28.7 64-64s-28.7-64-64-64-64 28.7-64 64 28.7 64 64 64zm224 32c1.9 0 3.7-.5 5.6-.6 8.3-21.7 20.5-42.1 36.3-59.2 7.4-8 17.9-12.6 28.9-12.6 6.9 0 13.7 1.8 19.6 5.3l7.9 4.6c.8-.5 1.6-.9 2.4-1.4 7-14.6 11.2-30.8 11.2-48 0-61.9-50.1-112-112-112S208 82.1 208 144c0 61.9 50.1 112 112 112zm105.2 194.5c-2.3-1.2-4.6-2.6-6.8-3.9-8.2 4.8-15.3 9.8-27.5 9.8-10.9 0-21.4-4.6-28.9-12.6-18.3-19.8-32.3-43.9-40.2-69.6-10.7-34.5 24.9-49.7 25.8-50.3-.1-2.6-.1-5.2 0-7.8l-7.9-4.6c-3.8-2.2-7-5-9.8-8.1-3.3.2-6.5.6-9.8.6-24.6 0-47.6-6-68.5-16h-8.3C179.6 288 128 339.6 128 403.2V432c0 26.5 21.5 48 48 48h255.4c-3.7-6-6.2-12.8-6.2-20.3v-9.2zM173.1 274.6C161.5 263.1 145.6 256 128 256H64c-35.3 0-64 28.7-64 64v32c0 17.7 14.3 32 32 32h65.9c6.3-47.4 34.9-87.3 75.2-109.4z"]},Wm={prefix:"fas",iconName:"users-slash",icon:[640,512,[],"e073","M132.65,212.32,36.21,137.78A63.4,63.4,0,0,0,32,160a63.84,63.84,0,0,0,100.65,52.32Zm40.44,62.28A63.79,63.79,0,0,0,128,256H64A64.06,64.06,0,0,0,0,320v32a32,32,0,0,0,32,32H97.91A146.62,146.62,0,0,1,173.09,274.6ZM544,224a64,64,0,1,0-64-64A64.06,64.06,0,0,0,544,224ZM500.56,355.11a114.24,114.24,0,0,0-84.47-65.28L361,247.23c41.46-16.3,71-55.92,71-103.23A111.93,111.93,0,0,0,320,32c-57.14,0-103.69,42.83-110.6,98.08L45.46,3.38A16,16,0,0,0,23,6.19L3.37,31.46A16,16,0,0,0,6.18,53.91L594.53,508.63A16,16,0,0,0,617,505.82l19.64-25.27a16,16,0,0,0-2.81-22.45ZM128,403.21V432a48,48,0,0,0,48,48H464a47.45,47.45,0,0,0,12.57-1.87L232,289.13C173.74,294.83,128,343.42,128,403.21ZM576,256H512a63.79,63.79,0,0,0-45.09,18.6A146.29,146.29,0,0,1,542,384h66a32,32,0,0,0,32-32V320A64.06,64.06,0,0,0,576,256Z"]},jm={prefix:"fas",iconName:"utensil-spoon",icon:[512,512,[],"f2e5","M480.1 31.9c-55-55.1-164.9-34.5-227.8 28.5-49.3 49.3-55.1 110-28.8 160.4L9 413.2c-11.6 10.5-12.1 28.5-1 39.5L59.3 504c11 11 29.1 10.5 39.5-1.1l192.4-214.4c50.4 26.3 111.1 20.5 160.4-28.8 63-62.9 83.6-172.8 28.5-227.8z"]},Km={prefix:"fas",iconName:"utensils",icon:[416,512,[],"f2e7","M207.9 15.2c.8 4.7 16.1 94.5 16.1 128.8 0 52.3-27.8 89.6-68.9 104.6L168 486.7c.7 13.7-10.2 25.3-24 25.3H80c-13.7 0-24.7-11.5-24-25.3l12.9-238.1C27.7 233.6 0 196.2 0 144 0 109.6 15.3 19.9 16.1 15.2 19.3-5.1 61.4-5.4 64 16.3v141.2c1.3 3.4 15.1 3.2 16 0 1.4-25.3 7.9-139.2 8-141.8 3.3-20.8 44.7-20.8 47.9 0 .2 2.7 6.6 116.5 8 141.8.9 3.2 14.8 3.4 16 0V16.3c2.6-21.6 44.8-21.4 48-1.1zm119.2 285.7l-15 185.1c-1.2 14 9.9 26 23.9 26h56c13.3 0 24-10.7 24-24V24c0-13.2-10.7-24-24-24-82.5 0-221.4 178.5-64.9 300.9z"]},$m={prefix:"fas",iconName:"vector-square",icon:[512,512,[],"f5cb","M512 128V32c0-17.67-14.33-32-32-32h-96c-17.67 0-32 14.33-32 32H160c0-17.67-14.33-32-32-32H32C14.33 0 0 14.33 0 32v96c0 17.67 14.33 32 32 32v192c-17.67 0-32 14.33-32 32v96c0 17.67 14.33 32 32 32h96c17.67 0 32-14.33 32-32h192c0 17.67 14.33 32 32 32h96c17.67 0 32-14.33 32-32v-96c0-17.67-14.33-32-32-32V160c17.67 0 32-14.33 32-32zm-96-64h32v32h-32V64zM64 64h32v32H64V64zm32 384H64v-32h32v32zm352 0h-32v-32h32v32zm-32-96h-32c-17.67 0-32 14.33-32 32v32H160v-32c0-17.67-14.33-32-32-32H96V160h32c17.67 0 32-14.33 32-32V96h192v32c0 17.67 14.33 32 32 32h32v192z"]},Ym={prefix:"fas",iconName:"venus",icon:[288,512,[],"f221","M288 176c0-79.5-64.5-144-144-144S0 96.5 0 176c0 68.5 47.9 125.9 112 140.4V368H76c-6.6 0-12 5.4-12 12v40c0 6.6 5.4 12 12 12h36v36c0 6.6 5.4 12 12 12h40c6.6 0 12-5.4 12-12v-36h36c6.6 0 12-5.4 12-12v-40c0-6.6-5.4-12-12-12h-36v-51.6c64.1-14.5 112-71.9 112-140.4zm-224 0c0-44.1 35.9-80 80-80s80 35.9 80 80-35.9 80-80 80-80-35.9-80-80z"]},qm={prefix:"fas",iconName:"venus-double",icon:[512,512,[],"f226","M288 176c0-79.5-64.5-144-144-144S0 96.5 0 176c0 68.5 47.9 125.9 112 140.4V368H76c-6.6 0-12 5.4-12 12v40c0 6.6 5.4 12 12 12h36v36c0 6.6 5.4 12 12 12h40c6.6 0 12-5.4 12-12v-36h36c6.6 0 12-5.4 12-12v-40c0-6.6-5.4-12-12-12h-36v-51.6c64.1-14.5 112-71.9 112-140.4zm-224 0c0-44.1 35.9-80 80-80s80 35.9 80 80-35.9 80-80 80-80-35.9-80-80zm336 140.4V368h36c6.6 0 12 5.4 12 12v40c0 6.6-5.4 12-12 12h-36v36c0 6.6-5.4 12-12 12h-40c-6.6 0-12-5.4-12-12v-36h-36c-6.6 0-12-5.4-12-12v-40c0-6.6 5.4-12 12-12h36v-51.6c-21.2-4.8-40.6-14.3-57.2-27.3 14-16.7 25-36 32.1-57.1 14.5 14.8 34.7 24 57.1 24 44.1 0 80-35.9 80-80s-35.9-80-80-80c-22.3 0-42.6 9.2-57.1 24-7.1-21.1-18-40.4-32.1-57.1C303.4 43.6 334.3 32 368 32c79.5 0 144 64.5 144 144 0 68.5-47.9 125.9-112 140.4z"]},Xm={prefix:"fas",iconName:"venus-mars",icon:[576,512,[],"f228","M564 0h-79c-10.7 0-16 12.9-8.5 20.5l16.9 16.9-48.7 48.7C422.5 72.1 396.2 64 368 64c-33.7 0-64.6 11.6-89.2 30.9 14 16.7 25 36 32.1 57.1 14.5-14.8 34.7-24 57.1-24 44.1 0 80 35.9 80 80s-35.9 80-80 80c-22.3 0-42.6-9.2-57.1-24-7.1 21.1-18 40.4-32.1 57.1 24.5 19.4 55.5 30.9 89.2 30.9 79.5 0 144-64.5 144-144 0-28.2-8.1-54.5-22.1-76.7l48.7-48.7 16.9 16.9c2.4 2.4 5.4 3.5 8.4 3.5 6.2 0 12.1-4.8 12.1-12V12c0-6.6-5.4-12-12-12zM144 64C64.5 64 0 128.5 0 208c0 68.5 47.9 125.9 112 140.4V400H76c-6.6 0-12 5.4-12 12v40c0 6.6 5.4 12 12 12h36v36c0 6.6 5.4 12 12 12h40c6.6 0 12-5.4 12-12v-36h36c6.6 0 12-5.4 12-12v-40c0-6.6-5.4-12-12-12h-36v-51.6c64.1-14.6 112-71.9 112-140.4 0-79.5-64.5-144-144-144zm0 224c-44.1 0-80-35.9-80-80s35.9-80 80-80 80 35.9 80 80-35.9 80-80 80z"]},Zm={prefix:"fas",iconName:"vest",icon:[448,512,[],"e085","M437.252,239.877,384,160V32A32,32,0,0,0,352,0H320a24.021,24.021,0,0,0-13.312,4.031l-25,16.672a103.794,103.794,0,0,1-115.376,0l-25-16.672A24.021,24.021,0,0,0,128,0H96A32,32,0,0,0,64,32V160L10.748,239.877A64,64,0,0,0,0,275.377V480a32,32,0,0,0,32,32H192V288a31.987,31.987,0,0,1,1.643-10.119L207.135,237.4,150.188,66.564A151.518,151.518,0,0,0,224,86.234a151.55,151.55,0,0,0,73.812-19.672L224,288V512H416a32,32,0,0,0,32-32V275.377A64,64,0,0,0,437.252,239.877ZM131.312,371.312l-48,48a16,16,0,0,1-22.624-22.624l48-48a16,16,0,0,1,22.624,22.624Zm256,48a15.992,15.992,0,0,1-22.624,0l-48-48a16,16,0,0,1,22.624-22.624l48,48A15.993,15.993,0,0,1,387.312,419.312Z"]},Qm={prefix:"fas",iconName:"vest-patches",icon:[448,512,[],"e086","M437.252,239.877,384,160V32A32,32,0,0,0,352,0H320a23.982,23.982,0,0,0-13.312,4.031l-25,16.672a103.794,103.794,0,0,1-115.376,0l-25-16.672A23.982,23.982,0,0,0,128,0H96A32,32,0,0,0,64,32V160L10.748,239.877A64,64,0,0,0,0,275.377V480a32,32,0,0,0,32,32H192V288a31.987,31.987,0,0,1,1.643-10.119L207.135,237.4,150.188,66.561A151.579,151.579,0,0,0,224,86.234a151.565,151.565,0,0,0,73.811-19.668L224,288V512H416a32,32,0,0,0,32-32V275.377A64,64,0,0,0,437.252,239.877ZM63.5,272.484a12.01,12.01,0,0,1,17-16.968l15.5,15.5,15.5-15.5a12.01,12.01,0,0,1,17,16.968L112.984,288,128.5,303.516a12.01,12.01,0,0,1-17,16.968L96,304.984l-15.5,15.5a12.01,12.01,0,0,1-17-16.968L79.016,288ZM96,456a40,40,0,1,1,40-40A40,40,0,0,1,96,456ZM359.227,335.785,310.7,336a6.671,6.671,0,0,1-6.7-6.7l.215-48.574A24.987,24.987,0,0,1,331.43,256.1c12.789,1.162,22.129,12.619,22.056,25.419l-.037,5.057,5.051-.037c12.826-.035,24.236,9.275,25.4,22.076A24.948,24.948,0,0,1,359.227,335.785Z"]},Jm={prefix:"fas",iconName:"vial",icon:[480,512,[],"f492","M477.7 186.1L309.5 18.3c-3.1-3.1-8.2-3.1-11.3 0l-34 33.9c-3.1 3.1-3.1 8.2 0 11.3l11.2 11.1L33 316.5c-38.8 38.7-45.1 102-9.4 143.5 20.6 24 49.5 36 78.4 35.9 26.4 0 52.8-10 72.9-30.1l246.3-245.7 11.2 11.1c3.1 3.1 8.2 3.1 11.3 0l34-33.9c3.1-3 3.1-8.1 0-11.2zM318 256H161l148-147.7 78.5 78.3L318 256z"]},ev={prefix:"fas",iconName:"vials",icon:[640,512,[],"f493","M72 64h24v240c0 44.1 35.9 80 80 80s80-35.9 80-80V64h24c4.4 0 8-3.6 8-8V8c0-4.4-3.6-8-8-8H72c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8zm72 0h64v96h-64V64zm480 384H16c-8.8 0-16 7.2-16 16v32c0 8.8 7.2 16 16 16h608c8.8 0 16-7.2 16-16v-32c0-8.8-7.2-16-16-16zM360 64h24v240c0 44.1 35.9 80 80 80s80-35.9 80-80V64h24c4.4 0 8-3.6 8-8V8c0-4.4-3.6-8-8-8H360c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8zm72 0h64v96h-64V64z"]},tv={prefix:"fas",iconName:"video",icon:[576,512,[],"f03d","M336.2 64H47.8C21.4 64 0 85.4 0 111.8v288.4C0 426.6 21.4 448 47.8 448h288.4c26.4 0 47.8-21.4 47.8-47.8V111.8c0-26.4-21.4-47.8-47.8-47.8zm189.4 37.7L416 177.3v157.4l109.6 75.5c21.2 14.6 50.4-.3 50.4-25.8V127.5c0-25.4-29.1-40.4-50.4-25.8z"]},iv={prefix:"fas",iconName:"video-slash",icon:[640,512,[],"f4e2","M633.8 458.1l-55-42.5c15.4-1.4 29.2-13.7 29.2-31.1v-257c0-25.5-29.1-40.4-50.4-25.8L448 177.3v137.2l-32-24.7v-178c0-26.4-21.4-47.8-47.8-47.8H123.9L45.5 3.4C38.5-2 28.5-.8 23 6.2L3.4 31.4c-5.4 7-4.2 17 2.8 22.4L42.7 82 416 370.6l178.5 138c7 5.4 17 4.2 22.5-2.8l19.6-25.3c5.5-6.9 4.2-17-2.8-22.4zM32 400.2c0 26.4 21.4 47.8 47.8 47.8h288.4c11.2 0 21.4-4 29.6-10.5L32 154.7v245.5z"]},nv={prefix:"fas",iconName:"vihara",icon:[640,512,[],"f6a7","M632.88 400.71L544 352v-64l55.16-17.69c11.79-5.9 11.79-22.72 0-28.62L480 192v-64l27.31-16.3c7.72-7.72 5.61-20.74-4.16-25.62L320 0 136.85 86.07c-9.77 4.88-11.88 17.9-4.16 25.62L160 128v64L40.84 241.69c-11.79 5.9-11.79 22.72 0 28.62L96 288v64L7.12 400.71c-5.42 3.62-7.7 9.63-7 15.29.62 5.01 3.57 9.75 8.72 12.33L64 448v48c0 8.84 7.16 16 16 16h32c8.84 0 16-7.16 16-16v-48h160v48c0 8.84 7.16 16 16 16h32c8.84 0 16-7.16 16-16v-48h160v48c0 8.84 7.16 16 16 16h32c8.84 0 16-7.16 16-16v-48l55.15-19.67c5.16-2.58 8.1-7.32 8.72-12.33.71-5.67-1.57-11.68-6.99-15.29zM224 128h192v64H224v-64zm-64 224v-64h320v64H160z"]},sv={prefix:"fas",iconName:"virus",icon:[512,512,[],"e074","M483.55,227.55H462c-50.68,0-76.07-61.27-40.23-97.11L437,115.19A28.44,28.44,0,0,0,396.8,75L381.56,90.22c-35.84,35.83-97.11,10.45-97.11-40.23V28.44a28.45,28.45,0,0,0-56.9,0V50c0,50.68-61.27,76.06-97.11,40.23L115.2,75A28.44,28.44,0,0,0,75,115.19l15.25,15.25c35.84,35.84,10.45,97.11-40.23,97.11H28.45a28.45,28.45,0,1,0,0,56.89H50c50.68,0,76.07,61.28,40.23,97.12L75,396.8A28.45,28.45,0,0,0,115.2,437l15.24-15.25c35.84-35.84,97.11-10.45,97.11,40.23v21.54a28.45,28.45,0,0,0,56.9,0V462c0-50.68,61.27-76.07,97.11-40.23L396.8,437A28.45,28.45,0,0,0,437,396.8l-15.25-15.24c-35.84-35.84-10.45-97.12,40.23-97.12h21.54a28.45,28.45,0,1,0,0-56.89ZM224,272a48,48,0,1,1,48-48A48,48,0,0,1,224,272Zm80,56a24,24,0,1,1,24-24A24,24,0,0,1,304,328Z"]},rv={prefix:"fas",iconName:"virus-slash",icon:[640,512,[],"e075","M114,227.6H92.4C76.7,227.6,64,240.3,64,256s12.7,28.4,28.4,28.4H114c50.7,0,76.1,61.3,40.2,97.1L139,396.8 c-11.5,10.7-12.2,28.7-1.6,40.2s28.7,12.2,40.2,1.6c0.5-0.5,1.1-1,1.6-1.6l15.2-15.2c35.8-35.8,97.1-10.5,97.1,40.2v21.5 c0,15.7,12.8,28.4,28.5,28.4c15.7,0,28.4-12.7,28.4-28.4V462c0-26.6,17-45.9,38.2-53.4l-244.5-189 C133.7,224.7,123.9,227.5,114,227.6z M617,505.8l19.6-25.3c5.4-7,4.2-17-2.8-22.5L470.6,332c4.2-25.4,24.9-47.5,55.4-47.5h21.5 c15.7,0,28.4-12.7,28.4-28.4s-12.7-28.4-28.4-28.4H526c-50.7,0-76.1-61.3-40.2-97.1l15.2-15.3c10.7-11.5,10-29.5-1.6-40.2 c-10.9-10.1-27.7-10.1-38.6,0l-15.2,15.2c-35.8,35.8-97.1,10.5-97.1-40.2V28.5C348.4,12.7,335.7,0,320,0 c-15.7,0-28.4,12.7-28.4,28.4V50c0,50.7-61.3,76.1-97.1,40.2L179.2,75c-11.1-11.1-29.4-10.6-40.5,0.5L45.5,3.4 c-7-5.4-17-4.2-22.5,2.8L3.4,31.5c-5.4,7-4.2,17,2.8,22.5l588.4,454.7C601.5,514.1,611.6,512.8,617,505.8z M335.4,227.5l-62.9-48.6 c4.9-1.8,10.2-2.8,15.4-2.9c26.5,0,48,21.5,48,48C336,225.2,335.5,226.3,335.4,227.5z"]},ov={prefix:"fas",iconName:"viruses",icon:[640,512,[],"e076","M624,352H611.88c-28.51,0-42.79-34.47-22.63-54.63l8.58-8.57a16,16,0,1,0-22.63-22.63l-8.57,8.58C546.47,294.91,512,280.63,512,252.12V240a16,16,0,0,0-32,0v12.12c0,28.51-34.47,42.79-54.63,22.63l-8.57-8.58a16,16,0,0,0-22.63,22.63l8.58,8.57c20.16,20.16,5.88,54.63-22.63,54.63H368a16,16,0,0,0,0,32h12.12c28.51,0,42.79,34.47,22.63,54.63l-8.58,8.57a16,16,0,1,0,22.63,22.63l8.57-8.58c20.16-20.16,54.63-5.88,54.63,22.63V496a16,16,0,0,0,32,0V483.88c0-28.51,34.47-42.79,54.63-22.63l8.57,8.58a16,16,0,1,0,22.63-22.63l-8.58-8.57C569.09,418.47,583.37,384,611.88,384H624a16,16,0,0,0,0-32ZM480,384a32,32,0,1,1,32-32A32,32,0,0,1,480,384ZM346.51,213.33h16.16a21.33,21.33,0,0,0,0-42.66H346.51c-38,0-57.05-46-30.17-72.84l11.43-11.44A21.33,21.33,0,0,0,297.6,56.23L286.17,67.66c-26.88,26.88-72.84,7.85-72.84-30.17V21.33a21.33,21.33,0,0,0-42.66,0V37.49c0,38-46,57.05-72.84,30.17L86.4,56.23A21.33,21.33,0,0,0,56.23,86.39L67.66,97.83c26.88,26.88,7.85,72.84-30.17,72.84H21.33a21.33,21.33,0,0,0,0,42.66H37.49c38,0,57.05,46,30.17,72.84L56.23,297.6A21.33,21.33,0,1,0,86.4,327.77l11.43-11.43c26.88-26.88,72.84-7.85,72.84,30.17v16.16a21.33,21.33,0,0,0,42.66,0V346.51c0-38,46-57.05,72.84-30.17l11.43,11.43a21.33,21.33,0,0,0,30.17-30.17l-11.43-11.43C289.46,259.29,308.49,213.33,346.51,213.33ZM160,192a32,32,0,1,1,32-32A32,32,0,0,1,160,192Zm80,32a16,16,0,1,1,16-16A16,16,0,0,1,240,224Z"]},av={prefix:"fas",iconName:"voicemail",icon:[640,512,[],"f897","M496 128a144 144 0 0 0-119.74 224H263.74A144 144 0 1 0 144 416h352a144 144 0 0 0 0-288zM64 272a80 80 0 1 1 80 80 80 80 0 0 1-80-80zm432 80a80 80 0 1 1 80-80 80 80 0 0 1-80 80z"]},lv={prefix:"fas",iconName:"volleyball-ball",icon:[512,512,[],"f45f","M231.39 243.48a285.56 285.56 0 0 0-22.7-105.7c-90.8 42.4-157.5 122.4-180.3 216.8a249 249 0 0 0 56.9 81.1 333.87 333.87 0 0 1 146.1-192.2zm-36.9-134.4a284.23 284.23 0 0 0-57.4-70.7c-91 49.8-144.8 152.9-125 262.2 33.4-83.1 98.4-152 182.4-191.5zm187.6 165.1c8.6-99.8-27.3-197.5-97.5-264.4-14.7-1.7-51.6-5.5-98.9 8.5A333.87 333.87 0 0 1 279.19 241a285 285 0 0 0 102.9 33.18zm-124.7 9.5a286.33 286.33 0 0 0-80.2 72.6c82 57.3 184.5 75.1 277.5 47.8a247.15 247.15 0 0 0 42.2-89.9 336.1 336.1 0 0 1-80.9 10.4c-54.6-.1-108.9-14.1-158.6-40.9zm-98.3 99.7c-15.2 26-25.7 54.4-32.1 84.2a247.07 247.07 0 0 0 289-22.1c-112.9 16.1-203.3-24.8-256.9-62.1zm180.3-360.6c55.3 70.4 82.5 161.2 74.6 253.6a286.59 286.59 0 0 0 89.7-14.2c0-2 .3-4 .3-6 0-107.8-68.7-199.1-164.6-233.4z"]},cv={prefix:"fas",iconName:"volume-down",icon:[384,512,[],"f027","M215.03 72.04L126.06 161H24c-13.26 0-24 10.74-24 24v144c0 13.25 10.74 24 24 24h102.06l88.97 88.95c15.03 15.03 40.97 4.47 40.97-16.97V89.02c0-21.47-25.96-31.98-40.97-16.98zm123.2 108.08c-11.58-6.33-26.19-2.16-32.61 9.45-6.39 11.61-2.16 26.2 9.45 32.61C327.98 229.28 336 242.62 336 257c0 14.38-8.02 27.72-20.92 34.81-11.61 6.41-15.84 21-9.45 32.61 6.43 11.66 21.05 15.8 32.61 9.45 28.23-15.55 45.77-45 45.77-76.88s-17.54-61.32-45.78-76.87z"]},hv={prefix:"fas",iconName:"volume-mute",icon:[512,512,[],"f6a9","M215.03 71.05L126.06 160H24c-13.26 0-24 10.74-24 24v144c0 13.25 10.74 24 24 24h102.06l88.97 88.95c15.03 15.03 40.97 4.47 40.97-16.97V88.02c0-21.46-25.96-31.98-40.97-16.97zM461.64 256l45.64-45.64c6.3-6.3 6.3-16.52 0-22.82l-22.82-22.82c-6.3-6.3-16.52-6.3-22.82 0L416 210.36l-45.64-45.64c-6.3-6.3-16.52-6.3-22.82 0l-22.82 22.82c-6.3 6.3-6.3 16.52 0 22.82L370.36 256l-45.63 45.63c-6.3 6.3-6.3 16.52 0 22.82l22.82 22.82c6.3 6.3 16.52 6.3 22.82 0L416 301.64l45.64 45.64c6.3 6.3 16.52 6.3 22.82 0l22.82-22.82c6.3-6.3 6.3-16.52 0-22.82L461.64 256z"]},dv={prefix:"fas",iconName:"volume-off",icon:[256,512,[],"f026","M215 71l-89 89H24a24 24 0 0 0-24 24v144a24 24 0 0 0 24 24h102.06L215 441c15 15 41 4.47 41-17V88c0-21.47-26-32-41-17z"]},uv={prefix:"fas",iconName:"volume-up",icon:[576,512,[],"f028","M215.03 71.05L126.06 160H24c-13.26 0-24 10.74-24 24v144c0 13.25 10.74 24 24 24h102.06l88.97 88.95c15.03 15.03 40.97 4.47 40.97-16.97V88.02c0-21.46-25.96-31.98-40.97-16.97zm233.32-51.08c-11.17-7.33-26.18-4.24-33.51 6.95-7.34 11.17-4.22 26.18 6.95 33.51 66.27 43.49 105.82 116.6 105.82 195.58 0 78.98-39.55 152.09-105.82 195.58-11.17 7.32-14.29 22.34-6.95 33.5 7.04 10.71 21.93 14.56 33.51 6.95C528.27 439.58 576 351.33 576 256S528.27 72.43 448.35 19.97zM480 256c0-63.53-32.06-121.94-85.77-156.24-11.19-7.14-26.03-3.82-33.12 7.46s-3.78 26.21 7.41 33.36C408.27 165.97 432 209.11 432 256s-23.73 90.03-63.48 115.42c-11.19 7.14-14.5 22.07-7.41 33.36 6.51 10.36 21.12 15.14 33.12 7.46C447.94 377.94 480 319.54 480 256zm-141.77-76.87c-11.58-6.33-26.19-2.16-32.61 9.45-6.39 11.61-2.16 26.2 9.45 32.61C327.98 228.28 336 241.63 336 256c0 14.38-8.02 27.72-20.92 34.81-11.61 6.41-15.84 21-9.45 32.61 6.43 11.66 21.05 15.8 32.61 9.45 28.23-15.55 45.77-45 45.77-76.88s-17.54-61.32-45.78-76.86z"]},pv={prefix:"fas",iconName:"vote-yea",icon:[640,512,[],"f772","M608 320h-64v64h22.4c5.3 0 9.6 3.6 9.6 8v16c0 4.4-4.3 8-9.6 8H73.6c-5.3 0-9.6-3.6-9.6-8v-16c0-4.4 4.3-8 9.6-8H96v-64H32c-17.7 0-32 14.3-32 32v96c0 17.7 14.3 32 32 32h576c17.7 0 32-14.3 32-32v-96c0-17.7-14.3-32-32-32zm-96 64V64.3c0-17.9-14.5-32.3-32.3-32.3H160.4C142.5 32 128 46.5 128 64.3V384h384zM211.2 202l25.5-25.3c4.2-4.2 11-4.2 15.2.1l41.3 41.6 95.2-94.4c4.2-4.2 11-4.2 15.2.1l25.3 25.5c4.2 4.2 4.2 11-.1 15.2L300.5 292c-4.2 4.2-11 4.2-15.2-.1l-74.1-74.7c-4.3-4.2-4.2-11 0-15.2z"]},gv={prefix:"fas",iconName:"vr-cardboard",icon:[640,512,[],"f729","M608 64H32C14.33 64 0 78.33 0 96v320c0 17.67 14.33 32 32 32h160.22c25.19 0 48.03-14.77 58.36-37.74l27.74-61.64C286.21 331.08 302.35 320 320 320s33.79 11.08 41.68 28.62l27.74 61.64C399.75 433.23 422.6 448 447.78 448H608c17.67 0 32-14.33 32-32V96c0-17.67-14.33-32-32-32zM160 304c-35.35 0-64-28.65-64-64s28.65-64 64-64 64 28.65 64 64-28.65 64-64 64zm320 0c-35.35 0-64-28.65-64-64s28.65-64 64-64 64 28.65 64 64-28.65 64-64 64z"]},fv={prefix:"fas",iconName:"walking",icon:[320,512,[],"f554","M208 96c26.5 0 48-21.5 48-48S234.5 0 208 0s-48 21.5-48 48 21.5 48 48 48zm94.5 149.1l-23.3-11.8-9.7-29.4c-14.7-44.6-55.7-75.8-102.2-75.9-36-.1-55.9 10.1-93.3 25.2-21.6 8.7-39.3 25.2-49.7 46.2L17.6 213c-7.8 15.8-1.5 35 14.2 42.9 15.6 7.9 34.6 1.5 42.5-14.3L81 228c3.5-7 9.3-12.5 16.5-15.4l26.8-10.8-15.2 60.7c-5.2 20.8.4 42.9 14.9 58.8l59.9 65.4c7.2 7.9 12.3 17.4 14.9 27.7l18.3 73.3c4.3 17.1 21.7 27.6 38.8 23.3 17.1-4.3 27.6-21.7 23.3-38.8l-22.2-89c-2.6-10.3-7.7-19.9-14.9-27.7l-45.5-49.7 17.2-68.7 5.5 16.5c5.3 16.1 16.7 29.4 31.7 37l23.3 11.8c15.6 7.9 34.6 1.5 42.5-14.3 7.7-15.7 1.4-35.1-14.3-43zM73.6 385.8c-3.2 8.1-8 15.4-14.2 21.5l-50 50.1c-12.5 12.5-12.5 32.8 0 45.3s32.7 12.5 45.2 0l59.4-59.4c6.1-6.1 10.9-13.4 14.2-21.5l13.5-33.8c-55.3-60.3-38.7-41.8-47.4-53.7l-20.7 51.5z"]},mv={prefix:"fas",iconName:"wallet",icon:[512,512,[],"f555","M461.2 128H80c-8.84 0-16-7.16-16-16s7.16-16 16-16h384c8.84 0 16-7.16 16-16 0-26.51-21.49-48-48-48H64C28.65 32 0 60.65 0 96v320c0 35.35 28.65 64 64 64h397.2c28.02 0 50.8-21.53 50.8-48V176c0-26.47-22.78-48-50.8-48zM416 336c-17.67 0-32-14.33-32-32s14.33-32 32-32 32 14.33 32 32-14.33 32-32 32z"]},vv={prefix:"fas",iconName:"warehouse",icon:[640,512,[],"f494","M504 352H136.4c-4.4 0-8 3.6-8 8l-.1 48c0 4.4 3.6 8 8 8H504c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8zm0 96H136.1c-4.4 0-8 3.6-8 8l-.1 48c0 4.4 3.6 8 8 8h368c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8zm0-192H136.6c-4.4 0-8 3.6-8 8l-.1 48c0 4.4 3.6 8 8 8H504c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8zm106.5-139L338.4 3.7a48.15 48.15 0 0 0-36.9 0L29.5 117C11.7 124.5 0 141.9 0 161.3V504c0 4.4 3.6 8 8 8h80c4.4 0 8-3.6 8-8V256c0-17.6 14.6-32 32.6-32h382.8c18 0 32.6 14.4 32.6 32v248c0 4.4 3.6 8 8 8h80c4.4 0 8-3.6 8-8V161.3c0-19.4-11.7-36.8-29.5-44.3z"]},yv={prefix:"fas",iconName:"water",icon:[576,512,[],"f773","M562.1 383.9c-21.5-2.4-42.1-10.5-57.9-22.9-14.1-11.1-34.2-11.3-48.2 0-37.9 30.4-107.2 30.4-145.7-1.5-13.5-11.2-33-9.1-46.7 1.8-38 30.1-106.9 30-145.2-1.7-13.5-11.2-33.3-8.9-47.1 2-15.5 12.2-36 20.1-57.7 22.4-7.9.8-13.6 7.8-13.6 15.7v32.2c0 9.1 7.6 16.8 16.7 16 28.8-2.5 56.1-11.4 79.4-25.9 56.5 34.6 137 34.1 192 0 56.5 34.6 137 34.1 192 0 23.3 14.2 50.9 23.3 79.1 25.8 9.1.8 16.7-6.9 16.7-16v-31.6c.1-8-5.7-15.4-13.8-16.3zm0-144c-21.5-2.4-42.1-10.5-57.9-22.9-14.1-11.1-34.2-11.3-48.2 0-37.9 30.4-107.2 30.4-145.7-1.5-13.5-11.2-33-9.1-46.7 1.8-38 30.1-106.9 30-145.2-1.7-13.5-11.2-33.3-8.9-47.1 2-15.5 12.2-36 20.1-57.7 22.4-7.9.8-13.6 7.8-13.6 15.7v32.2c0 9.1 7.6 16.8 16.7 16 28.8-2.5 56.1-11.4 79.4-25.9 56.5 34.6 137 34.1 192 0 56.5 34.6 137 34.1 192 0 23.3 14.2 50.9 23.3 79.1 25.8 9.1.8 16.7-6.9 16.7-16v-31.6c.1-8-5.7-15.4-13.8-16.3zm0-144C540.6 93.4 520 85.4 504.2 73 490.1 61.9 470 61.7 456 73c-37.9 30.4-107.2 30.4-145.7-1.5-13.5-11.2-33-9.1-46.7 1.8-38 30.1-106.9 30-145.2-1.7-13.5-11.2-33.3-8.9-47.1 2-15.5 12.2-36 20.1-57.7 22.4-7.9.8-13.6 7.8-13.6 15.7v32.2c0 9.1 7.6 16.8 16.7 16 28.8-2.5 56.1-11.4 79.4-25.9 56.5 34.6 137 34.1 192 0 56.5 34.6 137 34.1 192 0 23.3 14.2 50.9 23.3 79.1 25.8 9.1.8 16.7-6.9 16.7-16v-31.6c.1-8-5.7-15.4-13.8-16.3z"]},Cv={prefix:"fas",iconName:"wave-square",icon:[640,512,[],"f83e","M476 480H324a36 36 0 0 1-36-36V96h-96v156a36 36 0 0 1-36 36H16a16 16 0 0 1-16-16v-32a16 16 0 0 1 16-16h112V68a36 36 0 0 1 36-36h152a36 36 0 0 1 36 36v348h96V260a36 36 0 0 1 36-36h140a16 16 0 0 1 16 16v32a16 16 0 0 1-16 16H512v156a36 36 0 0 1-36 36z"]},bv={prefix:"fas",iconName:"weight",icon:[512,512,[],"f496","M448 64h-25.98C438.44 92.28 448 125.01 448 160c0 105.87-86.13 192-192 192S64 265.87 64 160c0-34.99 9.56-67.72 25.98-96H64C28.71 64 0 92.71 0 128v320c0 35.29 28.71 64 64 64h384c35.29 0 64-28.71 64-64V128c0-35.29-28.71-64-64-64zM256 320c88.37 0 160-71.63 160-160S344.37 0 256 0 96 71.63 96 160s71.63 160 160 160zm-.3-151.94l33.58-78.36c3.5-8.17 12.94-11.92 21.03-8.41 8.12 3.48 11.88 12.89 8.41 21l-33.67 78.55C291.73 188 296 197.45 296 208c0 22.09-17.91 40-40 40s-40-17.91-40-40c0-21.98 17.76-39.77 39.7-39.94z"]},Sv={prefix:"fas",iconName:"weight-hanging",icon:[512,512,[],"f5cd","M510.28 445.86l-73.03-292.13c-3.8-15.19-16.44-25.72-30.87-25.72h-60.25c3.57-10.05 5.88-20.72 5.88-32 0-53.02-42.98-96-96-96s-96 42.98-96 96c0 11.28 2.3 21.95 5.88 32h-60.25c-14.43 0-27.08 10.54-30.87 25.72L1.72 445.86C-6.61 479.17 16.38 512 48.03 512h415.95c31.64 0 54.63-32.83 46.3-66.14zM256 128c-17.64 0-32-14.36-32-32s14.36-32 32-32 32 14.36 32 32-14.36 32-32 32z"]},wv={prefix:"fas",iconName:"wheelchair",icon:[512,512,[],"f193","M496.101 385.669l14.227 28.663c3.929 7.915.697 17.516-7.218 21.445l-65.465 32.886c-16.049 7.967-35.556 1.194-43.189-15.055L331.679 320H192c-15.925 0-29.426-11.71-31.679-27.475C126.433 55.308 128.38 70.044 128 64c0-36.358 30.318-65.635 67.052-63.929 33.271 1.545 60.048 28.905 60.925 62.201.868 32.933-23.152 60.423-54.608 65.039l4.67 32.69H336c8.837 0 16 7.163 16 16v32c0 8.837-7.163 16-16 16H215.182l4.572 32H352a32 32 0 0 1 28.962 18.392L438.477 396.8l36.178-18.349c7.915-3.929 17.517-.697 21.446 7.218zM311.358 352h-24.506c-7.788 54.204-54.528 96-110.852 96-61.757 0-112-50.243-112-112 0-41.505 22.694-77.809 56.324-97.156-3.712-25.965-6.844-47.86-9.488-66.333C45.956 198.464 0 261.963 0 336c0 97.047 78.953 176 176 176 71.87 0 133.806-43.308 161.11-105.192L311.358 352z"]},xv={prefix:"fas",iconName:"wifi",icon:[640,512,[],"f1eb","M634.91 154.88C457.74-8.99 182.19-8.93 5.09 154.88c-6.66 6.16-6.79 16.59-.35 22.98l34.24 33.97c6.14 6.1 16.02 6.23 22.4.38 145.92-133.68 371.3-133.71 517.25 0 6.38 5.85 16.26 5.71 22.4-.38l34.24-33.97c6.43-6.39 6.3-16.82-.36-22.98zM320 352c-35.35 0-64 28.65-64 64s28.65 64 64 64 64-28.65 64-64-28.65-64-64-64zm202.67-83.59c-115.26-101.93-290.21-101.82-405.34 0-6.9 6.1-7.12 16.69-.57 23.15l34.44 33.99c6 5.92 15.66 6.32 22.05.8 83.95-72.57 209.74-72.41 293.49 0 6.39 5.52 16.05 5.13 22.05-.8l34.44-33.99c6.56-6.46 6.33-17.06-.56-23.15z"]},Ev={prefix:"fas",iconName:"wind",icon:[512,512,[],"f72e","M156.7 256H16c-8.8 0-16 7.2-16 16v32c0 8.8 7.2 16 16 16h142.2c15.9 0 30.8 10.9 33.4 26.6 3.3 20-12.1 37.4-31.6 37.4-14.1 0-26.1-9.2-30.4-21.9-2.1-6.3-8.6-10.1-15.2-10.1H81.6c-9.8 0-17.7 8.8-15.9 18.4 8.6 44.1 47.6 77.6 94.2 77.6 57.1 0 102.7-50.1 95.2-108.6C249 291 205.4 256 156.7 256zM16 224h336c59.7 0 106.8-54.8 93.8-116.7-7.6-36.2-36.9-65.5-73.1-73.1-55.4-11.6-105.1 24.9-114.9 75.5-1.9 9.6 6.1 18.3 15.8 18.3h32.8c6.7 0 13.1-3.8 15.2-10.1C325.9 105.2 337.9 96 352 96c19.4 0 34.9 17.4 31.6 37.4-2.6 15.7-17.4 26.6-33.4 26.6H16c-8.8 0-16 7.2-16 16v32c0 8.8 7.2 16 16 16zm384 32H243.7c19.3 16.6 33.2 38.8 39.8 64H400c26.5 0 48 21.5 48 48s-21.5 48-48 48c-17.9 0-33.3-9.9-41.6-24.4-2.9-5-8.7-7.6-14.5-7.6h-33.8c-10.9 0-19 10.8-15.3 21.1 17.8 50.6 70.5 84.8 129.4 72.3 41.2-8.7 75.1-41.6 84.7-82.7C526 321.5 470.5 256 400 256z"]},Mv={prefix:"fas",iconName:"window-close",icon:[512,512,[],"f410","M464 32H48C21.5 32 0 53.5 0 80v352c0 26.5 21.5 48 48 48h416c26.5 0 48-21.5 48-48V80c0-26.5-21.5-48-48-48zm-83.6 290.5c4.8 4.8 4.8 12.6 0 17.4l-40.5 40.5c-4.8 4.8-12.6 4.8-17.4 0L256 313.3l-66.5 67.1c-4.8 4.8-12.6 4.8-17.4 0l-40.5-40.5c-4.8-4.8-4.8-12.6 0-17.4l67.1-66.5-67.1-66.5c-4.8-4.8-4.8-12.6 0-17.4l40.5-40.5c4.8-4.8 12.6-4.8 17.4 0l66.5 67.1 66.5-67.1c4.8-4.8 12.6-4.8 17.4 0l40.5 40.5c4.8 4.8 4.8 12.6 0 17.4L313.3 256l67.1 66.5z"]},Av={prefix:"fas",iconName:"window-maximize",icon:[512,512,[],"f2d0","M464 32H48C21.5 32 0 53.5 0 80v352c0 26.5 21.5 48 48 48h416c26.5 0 48-21.5 48-48V80c0-26.5-21.5-48-48-48zm-16 160H64v-84c0-6.6 5.4-12 12-12h360c6.6 0 12 5.4 12 12v84z"]},Tv={prefix:"fas",iconName:"window-minimize",icon:[512,512,[],"f2d1","M464 352H48c-26.5 0-48 21.5-48 48v32c0 26.5 21.5 48 48 48h416c26.5 0 48-21.5 48-48v-32c0-26.5-21.5-48-48-48z"]},Dv={prefix:"fas",iconName:"window-restore",icon:[512,512,[],"f2d2","M512 48v288c0 26.5-21.5 48-48 48h-48V176c0-44.1-35.9-80-80-80H128V48c0-26.5 21.5-48 48-48h288c26.5 0 48 21.5 48 48zM384 176v288c0 26.5-21.5 48-48 48H48c-26.5 0-48-21.5-48-48V176c0-26.5 21.5-48 48-48h288c26.5 0 48 21.5 48 48zm-68 28c0-6.6-5.4-12-12-12H76c-6.6 0-12 5.4-12 12v52h252v-52z"]},Iv={prefix:"fas",iconName:"wine-bottle",icon:[512,512,[],"f72f","M507.31 72.57L439.43 4.69c-6.25-6.25-16.38-6.25-22.63 0l-22.63 22.63c-6.25 6.25-6.25 16.38 0 22.63l-76.67 76.67c-46.58-19.7-102.4-10.73-140.37 27.23L18.75 312.23c-24.99 24.99-24.99 65.52 0 90.51l90.51 90.51c24.99 24.99 65.52 24.99 90.51 0l158.39-158.39c37.96-37.96 46.93-93.79 27.23-140.37l76.67-76.67c6.25 6.25 16.38 6.25 22.63 0l22.63-22.63c6.24-6.24 6.24-16.37-.01-22.62zM179.22 423.29l-90.51-90.51 122.04-122.04 90.51 90.51-122.04 122.04z"]},Rv={prefix:"fas",iconName:"wine-glass",icon:[288,512,[],"f4e3","M216 464h-40V346.81c68.47-15.89 118.05-79.91 111.4-154.16l-15.95-178.1C270.71 6.31 263.9 0 255.74 0H32.26c-8.15 0-14.97 6.31-15.7 14.55L.6 192.66C-6.05 266.91 43.53 330.93 112 346.82V464H72c-22.09 0-40 17.91-40 40 0 4.42 3.58 8 8 8h208c4.42 0 8-3.58 8-8 0-22.09-17.91-40-40-40z"]},Lv={prefix:"fas",iconName:"wine-glass-alt",icon:[288,512,[],"f5ce","M216 464h-40V346.81c68.47-15.89 118.05-79.91 111.4-154.16l-15.95-178.1C270.71 6.31 263.9 0 255.74 0H32.26c-8.15 0-14.97 6.31-15.7 14.55L.6 192.66C-6.05 266.91 43.53 330.93 112 346.82V464H72c-22.09 0-40 17.91-40 40 0 4.42 3.58 8 8 8h208c4.42 0 8-3.58 8-8 0-22.09-17.91-40-40-40zM61.75 48h164.5l7.17 80H54.58l7.17-80z"]},kv={prefix:"fas",iconName:"won-sign",icon:[576,512,[],"f159","M564 192c6.6 0 12-5.4 12-12v-40c0-6.6-5.4-12-12-12h-48l18.6-80.6c1.7-7.5-4-14.7-11.7-14.7h-46.1c-5.7 0-10.6 4-11.7 9.5L450.7 128H340.8l-19.7-86c-1.3-5.5-6.1-9.3-11.7-9.3h-44c-5.6 0-10.4 3.8-11.7 9.3l-20 86H125l-17.5-85.7c-1.1-5.6-6.1-9.6-11.8-9.6H53.6c-7.7 0-13.4 7.1-11.7 14.6L60 128H12c-6.6 0-12 5.4-12 12v40c0 6.6 5.4 12 12 12h62.3l7.2 32H12c-6.6 0-12 5.4-12 12v40c0 6.6 5.4 12 12 12h83.9l40.9 182.6c1.2 5.5 6.1 9.4 11.7 9.4h56.8c5.6 0 10.4-3.9 11.7-9.3L259.3 288h55.1l42.4 182.7c1.3 5.4 6.1 9.3 11.7 9.3h56.8c5.6 0 10.4-3.9 11.7-9.3L479.1 288H564c6.6 0 12-5.4 12-12v-40c0-6.6-5.4-12-12-12h-70.1l7.4-32zM183.8 342c-6.2 25.8-6.8 47.2-7.3 47.2h-1.1s-1.7-22-6.8-47.2l-11-54h38.8zm27.5-118h-66.8l-6.5-32h80.8zm62.9 0l2-8.6c1.9-8 3.5-16 4.8-23.4h11.8c1.3 7.4 2.9 15.4 4.8 23.4l2 8.6zm130.9 118c-5.1 25.2-6.8 47.2-6.8 47.2h-1.1c-.6 0-1.1-21.4-7.3-47.2l-12.4-54h39.1zm25.2-118h-67.4l-7.3-32h81.6z"]},Pv={prefix:"fas",iconName:"wrench",icon:[512,512,[],"f0ad","M507.73 109.1c-2.24-9.03-13.54-12.09-20.12-5.51l-74.36 74.36-67.88-11.31-11.31-67.88 74.36-74.36c6.62-6.62 3.43-17.9-5.66-20.16-47.38-11.74-99.55.91-136.58 37.93-39.64 39.64-50.55 97.1-34.05 147.2L18.74 402.76c-24.99 24.99-24.99 65.51 0 90.5 24.99 24.99 65.51 24.99 90.5 0l213.21-213.21c50.12 16.71 107.47 5.68 147.37-34.22 37.07-37.07 49.7-89.32 37.91-136.73zM64 472c-13.25 0-24-10.75-24-24 0-13.26 10.75-24 24-24s24 10.74 24 24c0 13.25-10.75 24-24 24z"]},Nv={prefix:"fas",iconName:"x-ray",icon:[640,512,[],"f497","M240 384c-8.8 0-16 7.2-16 16s7.2 16 16 16 16-7.2 16-16-7.2-16-16-16zm160 32c8.8 0 16-7.2 16-16s-7.2-16-16-16-16 7.2-16 16 7.2 16 16 16zM624 0H16C7.2 0 0 7.2 0 16v32c0 8.8 7.2 16 16 16h608c8.8 0 16-7.2 16-16V16c0-8.8-7.2-16-16-16zm0 448h-48V96H64v352H16c-8.8 0-16 7.2-16 16v32c0 8.8 7.2 16 16 16h608c8.8 0 16-7.2 16-16v-32c0-8.8-7.2-16-16-16zM480 248c0 4.4-3.6 8-8 8H336v32h104c4.4 0 8 3.6 8 8v16c0 4.4-3.6 8-8 8H336v32h64c26.5 0 48 21.5 48 48s-21.5 48-48 48-48-21.5-48-48v-16h-64v16c0 26.5-21.5 48-48 48s-48-21.5-48-48 21.5-48 48-48h64v-32H200c-4.4 0-8-3.6-8-8v-16c0-4.4 3.6-8 8-8h104v-32H168c-4.4 0-8-3.6-8-8v-16c0-4.4 3.6-8 8-8h136v-32H200c-4.4 0-8-3.6-8-8v-16c0-4.4 3.6-8 8-8h104v-24c0-4.4 3.6-8 8-8h16c4.4 0 8 3.6 8 8v24h104c4.4 0 8 3.6 8 8v16c0 4.4-3.6 8-8 8H336v32h136c4.4 0 8 3.6 8 8v16z"]},Ov={prefix:"fas",iconName:"yen-sign",icon:[384,512,[],"f157","M351.2 32h-65.3c-4.6 0-8.8 2.6-10.8 6.7l-55.4 113.2c-14.5 34.7-27.1 71.9-27.1 71.9h-1.3s-12.6-37.2-27.1-71.9L108.8 38.7c-2-4.1-6.2-6.7-10.8-6.7H32.8c-9.1 0-14.8 9.7-10.6 17.6L102.3 200H44c-6.6 0-12 5.4-12 12v32c0 6.6 5.4 12 12 12h88.2l19.8 37.2V320H44c-6.6 0-12 5.4-12 12v32c0 6.6 5.4 12 12 12h108v92c0 6.6 5.4 12 12 12h56c6.6 0 12-5.4 12-12v-92h108c6.6 0 12-5.4 12-12v-32c0-6.6-5.4-12-12-12H232v-26.8l19.8-37.2H340c6.6 0 12-5.4 12-12v-32c0-6.6-5.4-12-12-12h-58.3l80.1-150.4c4.3-7.9-1.5-17.6-10.6-17.6z"]},_v={prefix:"fas",iconName:"yin-yang",icon:[496,512,[],"f6ad","M248 8C111.03 8 0 119.03 0 256s111.03 248 248 248 248-111.03 248-248S384.97 8 248 8zm0 376c-17.67 0-32-14.33-32-32s14.33-32 32-32 32 14.33 32 32-14.33 32-32 32zm0-128c-53.02 0-96 42.98-96 96s42.98 96 96 96c-106.04 0-192-85.96-192-192S141.96 64 248 64c53.02 0 96 42.98 96 96s-42.98 96-96 96zm0-128c-17.67 0-32 14.33-32 32s14.33 32 32 32 32-14.33 32-32-14.33-32-32-32z"]},Fv={faAd:s,faAddressBook:r,faAddressCard:o,faAdjust:a,faAirFreshener:l,faAlignCenter:c,faAlignJustify:h,faAlignLeft:d,faAlignRight:u,faAllergies:p,faAmbulance:g,faAmericanSignLanguageInterpreting:f,faAnchor:m,faAngleDoubleDown:v,faAngleDoubleLeft:y,faAngleDoubleRight:C,faAngleDoubleUp:b,faAngleDown:S,faAngleLeft:w,faAngleRight:x,faAngleUp:E,faAngry:M,faAnkh:A,faAppleAlt:T,faArchive:D,faArchway:I,faArrowAltCircleDown:R,faArrowAltCircleLeft:L,faArrowAltCircleRight:k,faArrowAltCircleUp:P,faArrowCircleDown:N,faArrowCircleLeft:O,faArrowCircleRight:_,faArrowCircleUp:F,faArrowDown:G,faArrowLeft:V,faArrowRight:B,faArrowUp:H,faArrowsAlt:z,faArrowsAltH:U,faArrowsAltV:W,faAssistiveListeningSystems:j,faAsterisk:K,faAt:$,faAtlas:Y,faAtom:q,faAudioDescription:X,faAward:Z,faBaby:Q,faBabyCarriage:J,faBackspace:ee,faBackward:te,faBacon:ie,faBacteria:ne,faBacterium:se,faBahai:re,faBalanceScale:oe,faBalanceScaleLeft:ae,faBalanceScaleRight:le,faBan:ce,faBandAid:he,faBarcode:de,faBars:ue,faBaseballBall:pe,faBasketballBall:ge,faBath:fe,faBatteryEmpty:me,faBatteryFull:ve,faBatteryHalf:ye,faBatteryQuarter:Ce,faBatteryThreeQuarters:be,faBed:Se,faBeer:we,faBell:xe,faBellSlash:Ee,faBezierCurve:Me,faBible:Ae,faBicycle:Te,faBiking:De,faBinoculars:Ie,faBiohazard:Re,faBirthdayCake:Le,faBlender:ke,faBlenderPhone:Pe,faBlind:Ne,faBlog:Oe,faBold:_e,faBolt:Fe,faBomb:Ge,faBone:Ve,faBong:Be,faBook:He,faBookDead:ze,faBookMedical:Ue,faBookOpen:We,faBookReader:je,faBookmark:Ke,faBorderAll:$e,faBorderNone:Ye,faBorderStyle:qe,faBowlingBall:Xe,faBox:Ze,faBoxOpen:Qe,faBoxTissue:Je,faBoxes:et,faBraille:tt,faBrain:it,faBreadSlice:nt,faBriefcase:st,faBriefcaseMedical:rt,faBroadcastTower:ot,faBroom:at,faBrush:lt,faBug:ct,faBuilding:ht,faBullhorn:dt,faBullseye:ut,faBurn:pt,faBus:gt,faBusAlt:ft,faBusinessTime:mt,faCalculator:vt,faCalendar:yt,faCalendarAlt:Ct,faCalendarCheck:bt,faCalendarDay:St,faCalendarMinus:wt,faCalendarPlus:xt,faCalendarTimes:Et,faCalendarWeek:Mt,faCamera:At,faCameraRetro:Tt,faCampground:Dt,faCandyCane:It,faCannabis:Rt,faCapsules:Lt,faCar:kt,faCarAlt:Pt,faCarBattery:Nt,faCarCrash:Ot,faCarSide:_t,faCaravan:Ft,faCaretDown:Gt,faCaretLeft:Vt,faCaretRight:Bt,faCaretSquareDown:Ht,faCaretSquareLeft:zt,faCaretSquareRight:Ut,faCaretSquareUp:Wt,faCaretUp:jt,faCarrot:Kt,faCartArrowDown:$t,faCartPlus:Yt,faCashRegister:qt,faCat:Xt,faCertificate:Zt,faChair:Qt,faChalkboard:Jt,faChalkboardTeacher:ei,faChargingStation:ti,faChartArea:ii,faChartBar:ni,faChartLine:si,faChartPie:ri,faCheck:oi,faCheckCircle:ai,faCheckDouble:li,faCheckSquare:ci,faCheese:hi,faChess:di,faChessBishop:ui,faChessBoard:pi,faChessKing:gi,faChessKnight:fi,faChessPawn:mi,faChessQueen:vi,faChessRook:yi,faChevronCircleDown:Ci,faChevronCircleLeft:bi,faChevronCircleRight:Si,faChevronCircleUp:wi,faChevronDown:xi,faChevronLeft:Ei,faChevronRight:Mi,faChevronUp:Ai,faChild:Ti,faChurch:Di,faCircle:Ii,faCircleNotch:Ri,faCity:Li,faClinicMedical:ki,faClipboard:Pi,faClipboardCheck:Ni,faClipboardList:Oi,faClock:_i,faClone:Fi,faClosedCaptioning:Gi,faCloud:Vi,faCloudDownloadAlt:Bi,faCloudMeatball:Hi,faCloudMoon:zi,faCloudMoonRain:Ui,faCloudRain:Wi,faCloudShowersHeavy:ji,faCloudSun:Ki,faCloudSunRain:$i,faCloudUploadAlt:Yi,faCocktail:qi,faCode:Xi,faCodeBranch:Zi,faCoffee:Qi,faCog:Ji,faCogs:en,faCoins:tn,faColumns:nn,faComment:sn,faCommentAlt:rn,faCommentDollar:on,faCommentDots:an,faCommentMedical:ln,faCommentSlash:cn,faComments:hn,faCommentsDollar:dn,faCompactDisc:un,faCompass:pn,faCompress:gn,faCompressAlt:fn,faCompressArrowsAlt:mn,faConciergeBell:vn,faCookie:yn,faCookieBite:Cn,faCopy:bn,faCopyright:Sn,faCouch:wn,faCreditCard:xn,faCrop:En,faCropAlt:Mn,faCross:An,faCrosshairs:Tn,faCrow:Dn,faCrown:In,faCrutch:Rn,faCube:Ln,faCubes:kn,faCut:Pn,faDatabase:Nn,faDeaf:On,faDemocrat:_n,faDesktop:Fn,faDharmachakra:Gn,faDiagnoses:Vn,faDice:Bn,faDiceD20:Hn,faDiceD6:zn,faDiceFive:Un,faDiceFour:Wn,faDiceOne:jn,faDiceSix:Kn,faDiceThree:$n,faDiceTwo:Yn,faDigitalTachograph:qn,faDirections:Xn,faDisease:Zn,faDivide:Qn,faDizzy:Jn,faDna:es,faDog:ts,faDollarSign:is,faDolly:ns,faDollyFlatbed:ss,faDonate:rs,faDoorClosed:os,faDoorOpen:as,faDotCircle:ls,faDove:cs,faDownload:hs,faDraftingCompass:ds,faDragon:us,faDrawPolygon:ps,faDrum:gs,faDrumSteelpan:fs,faDrumstickBite:ms,faDumbbell:vs,faDumpster:ys,faDumpsterFire:Cs,faDungeon:bs,faEdit:Ss,faEgg:ws,faEject:xs,faEllipsisH:Es,faEllipsisV:Ms,faEnvelope:As,faEnvelopeOpen:Ts,faEnvelopeOpenText:Ds,faEnvelopeSquare:Is,faEquals:Rs,faEraser:Ls,faEthernet:ks,faEuroSign:Ps,faExchangeAlt:Ns,faExclamation:Os,faExclamationCircle:_s,faExclamationTriangle:Fs,faExpand:Gs,faExpandAlt:Vs,faExpandArrowsAlt:Bs,faExternalLinkAlt:Hs,faExternalLinkSquareAlt:zs,faEye:Us,faEyeDropper:Ws,faEyeSlash:js,faFan:Ks,faFastBackward:$s,faFastForward:Ys,faFaucet:qs,faFax:Xs,faFeather:Zs,faFeatherAlt:Qs,faFemale:Js,faFighterJet:er,faFile:tr,faFileAlt:ir,faFileArchive:nr,faFileAudio:sr,faFileCode:rr,faFileContract:or,faFileCsv:ar,faFileDownload:lr,faFileExcel:cr,faFileExport:hr,faFileImage:dr,faFileImport:ur,faFileInvoice:pr,faFileInvoiceDollar:gr,faFileMedical:fr,faFileMedicalAlt:mr,faFilePdf:vr,faFilePowerpoint:yr,faFilePrescription:Cr,faFileSignature:br,faFileUpload:Sr,faFileVideo:wr,faFileWord:xr,faFill:Er,faFillDrip:Mr,faFilm:Ar,faFilter:Tr,faFingerprint:Dr,faFire:Ir,faFireAlt:Rr,faFireExtinguisher:Lr,faFirstAid:kr,faFish:Pr,faFistRaised:Nr,faFlag:Or,faFlagCheckered:_r,faFlagUsa:Fr,faFlask:Gr,faFlushed:Vr,faFolder:Br,faFolderMinus:Hr,faFolderOpen:zr,faFolderPlus:Ur,faFont:Wr,faFontAwesomeLogoFull:jr,faFootballBall:Kr,faForward:$r,faFrog:Yr,faFrown:qr,faFrownOpen:Xr,faFunnelDollar:Zr,faFutbol:Qr,faGamepad:Jr,faGasPump:eo,faGavel:to,faGem:io,faGenderless:no,faGhost:so,faGift:ro,faGifts:oo,faGlassCheers:ao,faGlassMartini:lo,faGlassMartiniAlt:co,faGlassWhiskey:ho,faGlasses:uo,faGlobe:po,faGlobeAfrica:go,faGlobeAmericas:fo,faGlobeAsia:mo,faGlobeEurope:vo,faGolfBall:yo,faGopuram:Co,faGraduationCap:bo,faGreaterThan:So,faGreaterThanEqual:wo,faGrimace:xo,faGrin:Eo,faGrinAlt:Mo,faGrinBeam:Ao,faGrinBeamSweat:To,faGrinHearts:Do,faGrinSquint:Io,faGrinSquintTears:Ro,faGrinStars:Lo,faGrinTears:ko,faGrinTongue:Po,faGrinTongueSquint:No,faGrinTongueWink:Oo,faGrinWink:_o,faGripHorizontal:Fo,faGripLines:Go,faGripLinesVertical:Vo,faGripVertical:Bo,faGuitar:Ho,faHSquare:zo,faHamburger:Uo,faHammer:Wo,faHamsa:jo,faHandHolding:Ko,faHandHoldingHeart:$o,faHandHoldingMedical:Yo,faHandHoldingUsd:qo,faHandHoldingWater:Xo,faHandLizard:Zo,faHandMiddleFinger:Qo,faHandPaper:Jo,faHandPeace:ea,faHandPointDown:ta,faHandPointLeft:ia,faHandPointRight:na,faHandPointUp:sa,faHandPointer:ra,faHandRock:oa,faHandScissors:aa,faHandSparkles:la,faHandSpock:ca,faHands:ha,faHandsHelping:da,faHandsWash:ua,faHandshake:pa,faHandshakeAltSlash:ga,faHandshakeSlash:fa,faHanukiah:ma,faHardHat:va,faHashtag:ya,faHatCowboy:Ca,faHatCowboySide:ba,faHatWizard:Sa,faHdd:wa,faHeadSideCough:xa,faHeadSideCoughSlash:Ea,faHeadSideMask:Ma,faHeadSideVirus:Aa,faHeading:Ta,faHeadphones:Da,faHeadphonesAlt:Ia,faHeadset:Ra,faHeart:La,faHeartBroken:ka,faHeartbeat:Pa,faHelicopter:Na,faHighlighter:Oa,faHiking:_a,faHippo:Fa,faHistory:Ga,faHockeyPuck:Va,faHollyBerry:Ba,faHome:Ha,faHorse:za,faHorseHead:Ua,faHospital:Wa,faHospitalAlt:ja,faHospitalSymbol:Ka,faHospitalUser:$a,faHotTub:Ya,faHotdog:qa,faHotel:Xa,faHourglass:Za,faHourglassEnd:Qa,faHourglassHalf:Ja,faHourglassStart:el,faHouseDamage:tl,faHouseUser:il,faHryvnia:nl,faICursor:sl,faIceCream:rl,faIcicles:ol,faIcons:al,faIdBadge:ll,faIdCard:cl,faIdCardAlt:hl,faIgloo:dl,faImage:ul,faImages:pl,faInbox:gl,faIndent:fl,faIndustry:ml,faInfinity:vl,faInfo:yl,faInfoCircle:Cl,faItalic:bl,faJedi:Sl,faJoint:wl,faJournalWhills:xl,faKaaba:El,faKey:Ml,faKeyboard:Al,faKhanda:Tl,faKiss:Dl,faKissBeam:Il,faKissWinkHeart:Rl,faKiwiBird:Ll,faLandmark:kl,faLanguage:Pl,faLaptop:Nl,faLaptopCode:Ol,faLaptopHouse:_l,faLaptopMedical:Fl,faLaugh:Gl,faLaughBeam:Vl,faLaughSquint:Bl,faLaughWink:Hl,faLayerGroup:zl,faLeaf:Ul,faLemon:Wl,faLessThan:jl,faLessThanEqual:Kl,faLevelDownAlt:$l,faLevelUpAlt:Yl,faLifeRing:ql,faLightbulb:Xl,faLink:Zl,faLiraSign:Ql,faList:Jl,faListAlt:ec,faListOl:tc,faListUl:ic,faLocationArrow:nc,faLock:sc,faLockOpen:rc,faLongArrowAltDown:oc,faLongArrowAltLeft:ac,faLongArrowAltRight:lc,faLongArrowAltUp:cc,faLowVision:hc,faLuggageCart:dc,faLungs:uc,faLungsVirus:pc,faMagic:gc,faMagnet:fc,faMailBulk:mc,faMale:vc,faMap:yc,faMapMarked:Cc,faMapMarkedAlt:bc,faMapMarker:Sc,faMapMarkerAlt:wc,faMapPin:xc,faMapSigns:Ec,faMarker:Mc,faMars:Ac,faMarsDouble:Tc,faMarsStroke:Dc,faMarsStrokeH:Ic,faMarsStrokeV:Rc,faMask:Lc,faMedal:kc,faMedkit:Pc,faMeh:Nc,faMehBlank:Oc,faMehRollingEyes:_c,faMemory:Fc,faMenorah:Gc,faMercury:Vc,faMeteor:Bc,faMicrochip:Hc,faMicrophone:zc,faMicrophoneAlt:Uc,faMicrophoneAltSlash:Wc,faMicrophoneSlash:jc,faMicroscope:Kc,faMinus:$c,faMinusCircle:Yc,faMinusSquare:qc,faMitten:Xc,faMobile:Zc,faMobileAlt:Qc,faMoneyBill:Jc,faMoneyBillAlt:eh,faMoneyBillWave:th,faMoneyBillWaveAlt:ih,faMoneyCheck:nh,faMoneyCheckAlt:sh,faMonument:rh,faMoon:oh,faMortarPestle:ah,faMosque:lh,faMotorcycle:ch,faMountain:hh,faMouse:dh,faMousePointer:uh,faMugHot:ph,faMusic:gh,faNetworkWired:fh,faNeuter:mh,faNewspaper:vh,faNotEqual:yh,faNotesMedical:Ch,faObjectGroup:bh,faObjectUngroup:Sh,faOilCan:wh,faOm:xh,faOtter:Eh,faOutdent:Mh,faPager:Ah,faPaintBrush:Th,faPaintRoller:Dh,faPalette:Ih,faPallet:Rh,faPaperPlane:Lh,faPaperclip:kh,faParachuteBox:Ph,faParagraph:Nh,faParking:Oh,faPassport:_h,faPastafarianism:Fh,faPaste:Gh,faPause:Vh,faPauseCircle:Bh,faPaw:Hh,faPeace:zh,faPen:Uh,faPenAlt:Wh,faPenFancy:jh,faPenNib:Kh,faPenSquare:$h,faPencilAlt:Yh,faPencilRuler:qh,faPeopleArrows:Xh,faPeopleCarry:Zh,faPepperHot:Qh,faPercent:Jh,faPercentage:ed,faPersonBooth:td,faPhone:id,faPhoneAlt:nd,faPhoneSlash:sd,faPhoneSquare:rd,faPhoneSquareAlt:od,faPhoneVolume:ad,faPhotoVideo:ld,faPiggyBank:cd,faPills:hd,faPizzaSlice:dd,faPlaceOfWorship:ud,faPlane:pd,faPlaneArrival:gd,faPlaneDeparture:fd,faPlaneSlash:md,faPlay:vd,faPlayCircle:yd,faPlug:Cd,faPlus:bd,faPlusCircle:Sd,faPlusSquare:wd,faPodcast:xd,faPoll:Ed,faPollH:Md,faPoo:Ad,faPooStorm:Td,faPoop:Dd,faPortrait:Id,faPoundSign:Rd,faPowerOff:Ld,faPray:kd,faPrayingHands:Pd,faPrescription:Nd,faPrescriptionBottle:Od,faPrescriptionBottleAlt:_d,faPrint:Fd,faProcedures:Gd,faProjectDiagram:Vd,faPumpMedical:Bd,faPumpSoap:Hd,faPuzzlePiece:zd,faQrcode:Ud,faQuestion:Wd,faQuestionCircle:jd,faQuidditch:Kd,faQuoteLeft:$d,faQuoteRight:Yd,faQuran:qd,faRadiation:Xd,faRadiationAlt:Zd,faRainbow:Qd,faRandom:Jd,faReceipt:eu,faRecordVinyl:tu,faRecycle:iu,faRedo:nu,faRedoAlt:su,faRegistered:ru,faRemoveFormat:ou,faReply:au,faReplyAll:lu,faRepublican:cu,faRestroom:hu,faRetweet:du,faRibbon:uu,faRing:pu,faRoad:gu,faRobot:fu,faRocket:mu,faRoute:vu,faRss:yu,faRssSquare:Cu,faRubleSign:bu,faRuler:Su,faRulerCombined:wu,faRulerHorizontal:xu,faRulerVertical:Eu,faRunning:Mu,faRupeeSign:Au,faSadCry:Tu,faSadTear:Du,faSatellite:Iu,faSatelliteDish:Ru,faSave:Lu,faSchool:ku,faScrewdriver:Pu,faScroll:Nu,faSdCard:Ou,faSearch:_u,faSearchDollar:Fu,faSearchLocation:Gu,faSearchMinus:Vu,faSearchPlus:Bu,faSeedling:Hu,faServer:zu,faShapes:Uu,faShare:Wu,faShareAlt:ju,faShareAltSquare:Ku,faShareSquare:$u,faShekelSign:Yu,faShieldAlt:qu,faShieldVirus:Xu,faShip:Zu,faShippingFast:Qu,faShoePrints:Ju,faShoppingBag:ep,faShoppingBasket:tp,faShoppingCart:ip,faShower:np,faShuttleVan:sp,faSign:rp,faSignInAlt:op,faSignLanguage:ap,faSignOutAlt:lp,faSignal:cp,faSignature:hp,faSimCard:dp,faSink:up,faSitemap:pp,faSkating:gp,faSkiing:fp,faSkiingNordic:mp,faSkull:vp,faSkullCrossbones:yp,faSlash:Cp,faSleigh:bp,faSlidersH:Sp,faSmile:wp,faSmileBeam:xp,faSmileWink:Ep,faSmog:Mp,faSmoking:Ap,faSmokingBan:Tp,faSms:Dp,faSnowboarding:Ip,faSnowflake:Rp,faSnowman:Lp,faSnowplow:kp,faSoap:Pp,faSocks:Np,faSolarPanel:Op,faSort:_p,faSortAlphaDown:Fp,faSortAlphaDownAlt:Gp,faSortAlphaUp:Vp,faSortAlphaUpAlt:Bp,faSortAmountDown:Hp,faSortAmountDownAlt:zp,faSortAmountUp:Up,faSortAmountUpAlt:Wp,faSortDown:jp,faSortNumericDown:Kp,faSortNumericDownAlt:$p,faSortNumericUp:Yp,faSortNumericUpAlt:qp,faSortUp:Xp,faSpa:Zp,faSpaceShuttle:Qp,faSpellCheck:Jp,faSpider:eg,faSpinner:tg,faSplotch:ig,faSprayCan:ng,faSquare:sg,faSquareFull:rg,faSquareRootAlt:og,faStamp:ag,faStar:lg,faStarAndCrescent:cg,faStarHalf:hg,faStarHalfAlt:dg,faStarOfDavid:ug,faStarOfLife:pg,faStepBackward:gg,faStepForward:fg,faStethoscope:mg,faStickyNote:vg,faStop:yg,faStopCircle:Cg,faStopwatch:bg,faStopwatch20:Sg,faStore:wg,faStoreAlt:xg,faStoreAltSlash:Eg,faStoreSlash:Mg,faStream:Ag,faStreetView:Tg,faStrikethrough:Dg,faStroopwafel:Ig,faSubscript:Rg,faSubway:Lg,faSuitcase:kg,faSuitcaseRolling:Pg,faSun:Ng,faSuperscript:Og,faSurprise:_g,faSwatchbook:Fg,faSwimmer:Gg,faSwimmingPool:Vg,faSynagogue:Bg,faSync:Hg,faSyncAlt:zg,faSyringe:Ug,faTable:Wg,faTableTennis:jg,faTablet:Kg,faTabletAlt:$g,faTablets:Yg,faTachometerAlt:qg,faTag:Xg,faTags:Zg,faTape:Qg,faTasks:Jg,faTaxi:ef,faTeeth:tf,faTeethOpen:nf,faTemperatureHigh:sf,faTemperatureLow:rf,faTenge:of,faTerminal:af,faTextHeight:lf,faTextWidth:cf,faTh:hf,faThLarge:df,faThList:uf,faTheaterMasks:pf,faThermometer:gf,faThermometerEmpty:ff,faThermometerFull:mf,faThermometerHalf:vf,faThermometerQuarter:yf,faThermometerThreeQuarters:Cf,faThumbsDown:bf,faThumbsUp:Sf,faThumbtack:wf,faTicketAlt:xf,faTimes:Ef,faTimesCircle:Mf,faTint:Af,faTintSlash:Tf,faTired:Df,faToggleOff:If,faToggleOn:Rf,faToilet:Lf,faToiletPaper:kf,faToiletPaperSlash:Pf,faToolbox:Nf,faTools:Of,faTooth:_f,faTorah:Ff,faToriiGate:Gf,faTractor:Vf,faTrademark:Bf,faTrafficLight:Hf,faTrailer:zf,faTrain:Uf,faTram:Wf,faTransgender:jf,faTransgenderAlt:Kf,faTrash:$f,faTrashAlt:Yf,faTrashRestore:qf,faTrashRestoreAlt:Xf,faTree:Zf,faTrophy:Qf,faTruck:Jf,faTruckLoading:em,faTruckMonster:tm,faTruckMoving:im,faTruckPickup:nm,faTshirt:sm,faTty:rm,faTv:om,faUmbrella:am,faUmbrellaBeach:lm,faUnderline:cm,faUndo:hm,faUndoAlt:dm,faUniversalAccess:um,faUniversity:pm,faUnlink:gm,faUnlock:fm,faUnlockAlt:mm,faUpload:vm,faUser:ym,faUserAlt:Cm,faUserAltSlash:bm,faUserAstronaut:Sm,faUserCheck:wm,faUserCircle:xm,faUserClock:Em,faUserCog:Mm,faUserEdit:Am,faUserFriends:Tm,faUserGraduate:Dm,faUserInjured:Im,faUserLock:Rm,faUserMd:Lm,faUserMinus:km,faUserNinja:Pm,faUserNurse:Nm,faUserPlus:Om,faUserSecret:_m,faUserShield:Fm,faUserSlash:Gm,faUserTag:Vm,faUserTie:Bm,faUserTimes:Hm,faUsers:zm,faUsersCog:Um,faUsersSlash:Wm,faUtensilSpoon:jm,faUtensils:Km,faVectorSquare:$m,faVenus:Ym,faVenusDouble:qm,faVenusMars:Xm,faVest:Zm,faVestPatches:Qm,faVial:Jm,faVials:ev,faVideo:tv,faVideoSlash:iv,faVihara:nv,faVirus:sv,faVirusSlash:rv,faViruses:ov,faVoicemail:av,faVolleyballBall:lv,faVolumeDown:cv,faVolumeMute:hv,faVolumeOff:dv,faVolumeUp:uv,faVoteYea:pv,faVrCardboard:gv,faWalking:fv,faWallet:mv,faWarehouse:vv,faWater:yv,faWaveSquare:Cv,faWeight:bv,faWeightHanging:Sv,faWheelchair:wv,faWifi:xv,faWind:Ev,faWindowClose:Mv,faWindowMaximize:Av,faWindowMinimize:Tv,faWindowRestore:Dv,faWineBottle:Iv,faWineGlass:Rv,faWineGlassAlt:Lv,faWonSign:kv,faWrench:Pv,faXRay:Nv,faYenSign:Ov,faYinYang:_v}},92845(e,t,i){"use strict";i.r(t),i.d(t,{FontAwesomeIcon:()=>b});var n=i(5188),s=i(5821),r=i.n(s),o=i(22155);function a(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),i.push.apply(i,n)}return i}function l(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?a(Object(i),!0).forEach(function(t){h(e,t,i[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):a(Object(i)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))})}return e}function c(e){return c="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},c(e)}function h(e,t,i){return t in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,e}function d(e,t){if(null==e)return{};var i,n,s=function(e,t){if(null==e)return{};var i,n,s={},r=Object.keys(e);for(n=0;n<r.length;n++)i=r[n],t.indexOf(i)>=0||(s[i]=e[i]);return s}(e,t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);for(n=0;n<r.length;n++)i=r[n],t.indexOf(i)>=0||Object.prototype.propertyIsEnumerable.call(e,i)&&(s[i]=e[i])}return s}function u(e){return function(e){if(Array.isArray(e))return p(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return p(e,t);var i=Object.prototype.toString.call(e).slice(8,-1);return"Object"===i&&e.constructor&&(i=e.constructor.name),"Map"===i||"Set"===i?Array.from(e):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?p(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function p(e,t){(null==t||t>e.length)&&(t=e.length);for(var i=0,n=new Array(t);i<t;i++)n[i]=e[i];return n}function g(e){return t=e,(t-=0)==t?e:(e=e.replace(/[\-_\s]+(.)?/g,function(e,t){return t?t.toUpperCase():""})).substr(0,1).toLowerCase()+e.substr(1);var t}var f=["style"],m=!1;try{m=!0}catch(e){}function v(e){return e&&"object"===c(e)&&e.prefix&&e.iconName&&e.icon?e:n.parse.icon?n.parse.icon(e):null===e?null:e&&"object"===c(e)&&e.prefix&&e.iconName?e:Array.isArray(e)&&2===e.length?{prefix:e[0],iconName:e[1]}:"string"==typeof e?{prefix:"fas",iconName:e}:void 0}function y(e,t){return Array.isArray(t)&&t.length>0||!Array.isArray(t)&&t?h({},e,t):{}}var C=["forwardedRef"];function b(e){var t=e.forwardedRef,i=d(e,C),s=i.icon,r=i.mask,o=i.symbol,a=i.className,c=i.title,p=i.titleId,g=i.maskId,f=v(s),w=y("classes",[].concat(u(function(e){var t,i=e.beat,n=e.fade,s=e.beatFade,r=e.bounce,o=e.shake,a=e.flash,l=e.spin,c=e.spinPulse,d=e.spinReverse,u=e.pulse,p=e.fixedWidth,g=e.inverse,f=e.border,m=e.listItem,v=e.flip,y=e.size,C=e.rotation,b=e.pull,S=(h(t={"fa-beat":i,"fa-fade":n,"fa-beat-fade":s,"fa-bounce":r,"fa-shake":o,"fa-flash":a,"fa-spin":l,"fa-spin-reverse":d,"fa-spin-pulse":c,"fa-pulse":u,"fa-fw":p,"fa-inverse":g,"fa-border":f,"fa-li":m,"fa-flip":!0===v,"fa-flip-horizontal":"horizontal"===v||"both"===v,"fa-flip-vertical":"vertical"===v||"both"===v},"fa-".concat(y),null!=y),h(t,"fa-rotate-".concat(C),null!=C&&0!==C),h(t,"fa-pull-".concat(b),null!=b),h(t,"fa-swap-opacity",e.swapOpacity),t);return Object.keys(S).map(function(e){return S[e]?e:null}).filter(function(e){return e})}(i)),u(a.split(" ")))),x=y("transform","string"==typeof i.transform?n.parse.transform(i.transform):i.transform),E=y("mask",v(r)),M=(0,n.icon)(f,l(l(l(l({},w),x),E),{},{symbol:o,title:c,titleId:p,maskId:g}));if(!M)return function(){var e;!m&&console&&"function"==typeof console.error&&(e=console).error.apply(e,arguments)}("Could not find icon",f),null;var A=M.abstract,T={ref:t};return Object.keys(i).forEach(function(e){b.defaultProps.hasOwnProperty(e)||(T[e]=i[e])}),S(A[0],T)}b.displayName="FontAwesomeIcon",b.propTypes={beat:r().bool,border:r().bool,beatFade:r().bool,bounce:r().bool,className:r().string,fade:r().bool,flash:r().bool,mask:r().oneOfType([r().object,r().array,r().string]),maskId:r().string,fixedWidth:r().bool,inverse:r().bool,flip:r().oneOf([!0,!1,"horizontal","vertical","both"]),icon:r().oneOfType([r().object,r().array,r().string]),listItem:r().bool,pull:r().oneOf(["right","left"]),pulse:r().bool,rotation:r().oneOf([0,90,180,270]),shake:r().bool,size:r().oneOf(["2xs","xs","sm","lg","xl","2xl","1x","2x","3x","4x","5x","6x","7x","8x","9x","10x"]),spin:r().bool,spinPulse:r().bool,spinReverse:r().bool,symbol:r().oneOfType([r().bool,r().string]),title:r().string,titleId:r().string,transform:r().oneOfType([r().string,r().object]),swapOpacity:r().bool},b.defaultProps={border:!1,className:"",mask:null,maskId:null,fixedWidth:!1,inverse:!1,flip:!1,icon:null,listItem:!1,pull:null,pulse:!1,rotation:null,size:null,spin:!1,spinPulse:!1,spinReverse:!1,beat:!1,fade:!1,beatFade:!1,bounce:!1,shake:!1,symbol:!1,title:"",titleId:null,transform:null,swapOpacity:!1};var S=function e(t,i){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if("string"==typeof i)return i;var s=(i.children||[]).map(function(i){return e(t,i)}),r=Object.keys(i.attributes||{}).reduce(function(e,t){var n=i.attributes[t];switch(t){case"class":e.attrs.className=n,delete i.attributes.class;break;case"style":e.attrs.style=n.split(";").map(function(e){return e.trim()}).filter(function(e){return e}).reduce(function(e,t){var i,n=t.indexOf(":"),s=g(t.slice(0,n)),r=t.slice(n+1).trim();return s.startsWith("webkit")?e[(i=s,i.charAt(0).toUpperCase()+i.slice(1))]=r:e[s]=r,e},{});break;default:0===t.indexOf("aria-")||0===t.indexOf("data-")?e.attrs[t.toLowerCase()]=n:e.attrs[g(t)]=n}return e},{attrs:{}}),o=n.style,a=void 0===o?{}:o,c=d(n,f);return r.attrs.style=l(l({},r.attrs.style),a),t.apply(void 0,[i.tag,l(l({},r.attrs),c)].concat(u(s)))}.bind(null,o.createElement)},72168(e,t){!function(){var i={version:"0.4.1",settings:{currency:{symbol:"$",format:"%s%v",decimal:".",thousand:",",precision:2,grouping:3},number:{precision:0,grouping:3,thousand:",",decimal:"."}}},n=Array.prototype.map,s=Array.isArray,r=Object.prototype.toString;function o(e){return!!(""===e||e&&e.charCodeAt&&e.substr)}function a(e){return s?s(e):"[object Array]"===r.call(e)}function l(e){return e&&"[object Object]"===r.call(e)}function c(e,t){var i;for(i in e=e||{},t=t||{})t.hasOwnProperty(i)&&null==e[i]&&(e[i]=t[i]);return e}function h(e,t,i){var s,r,o=[];if(!e)return o;if(n&&e.map===n)return e.map(t,i);for(s=0,r=e.length;s<r;s++)o[s]=t.call(i,e[s],s,e);return o}function d(e,t){return e=Math.round(Math.abs(e)),isNaN(e)?t:e}function u(e){var t=i.settings.currency.format;return"function"==typeof e&&(e=e()),o(e)&&e.match("%v")?{pos:e,neg:e.replace("-","").replace("%v","-%v"),zero:e}:e&&e.pos&&e.pos.match("%v")?e:o(t)?i.settings.currency.format={pos:t,neg:t.replace("%v","-%v"),zero:t}:t}var p=i.unformat=i.parse=function(e,t){if(a(e))return h(e,function(e){return p(e,t)});if("number"==typeof(e=e||0))return e;t=t||i.settings.number.decimal;var n=new RegExp("[^0-9-"+t+"]",["g"]),s=parseFloat((""+e).replace(/\((.*)\)/,"-$1").replace(n,"").replace(t,"."));return isNaN(s)?0:s},g=i.toFixed=function(e,t){t=d(t,i.settings.number.precision);var n=Math.pow(10,t);return(Math.round(i.unformat(e)*n)/n).toFixed(t)},f=i.formatNumber=i.format=function(e,t,n,s){if(a(e))return h(e,function(e){return f(e,t,n,s)});e=p(e);var r=c(l(t)?t:{precision:t,thousand:n,decimal:s},i.settings.number),o=d(r.precision),u=e<0?"-":"",m=parseInt(g(Math.abs(e||0),o),10)+"",v=m.length>3?m.length%3:0;return u+(v?m.substr(0,v)+r.thousand:"")+m.substr(v).replace(/(\d{3})(?=\d)/g,"$1"+r.thousand)+(o?r.decimal+g(Math.abs(e),o).split(".")[1]:"")},m=i.formatMoney=function(e,t,n,s,r,o){if(a(e))return h(e,function(e){return m(e,t,n,s,r,o)});e=p(e);var g=c(l(t)?t:{symbol:t,precision:n,thousand:s,decimal:r,format:o},i.settings.currency),v=u(g.format);return(e>0?v.pos:e<0?v.neg:v.zero).replace("%s",g.symbol).replace("%v",f(Math.abs(e),d(g.precision),g.thousand,g.decimal))};i.formatColumn=function(e,t,n,s,r,g){if(!e)return[];var m=c(l(t)?t:{symbol:t,precision:n,thousand:s,decimal:r,format:g},i.settings.currency),v=u(m.format),y=v.pos.indexOf("%s")<v.pos.indexOf("%v"),C=0,b=h(e,function(e,t){if(a(e))return i.formatColumn(e,m);var n=((e=p(e))>0?v.pos:e<0?v.neg:v.zero).replace("%s",m.symbol).replace("%v",f(Math.abs(e),d(m.precision),m.thousand,m.decimal));return n.length>C&&(C=n.length),n});return h(b,function(e,t){return o(e)&&e.length<C?y?e.replace(m.symbol,m.symbol+new Array(C-e.length+1).join(" ")):new Array(C-e.length+1).join(" ")+e:e})},e.exports&&(t=e.exports=i),t.accounting=i}()},21371(e,t,i){"use strict";var n,s=Object.defineProperty,r=Object.defineProperties,o=Object.getOwnPropertyDescriptor,a=Object.getOwnPropertyDescriptors,l=Object.getOwnPropertyNames,c=Object.getOwnPropertySymbols,h=Object.getPrototypeOf,d=Object.prototype.hasOwnProperty,u=Object.prototype.propertyIsEnumerable,p=Reflect.get,g=(e,t)=>(t=Symbol[e])?t:Symbol.for("Symbol."+e),f=Math.pow,m=(e,t,i)=>t in e?s(e,t,{enumerable:!0,configurable:!0,writable:!0,value:i}):e[t]=i,v=(e,t)=>{for(var i in t||(t={}))d.call(t,i)&&m(e,i,t[i]);if(c)for(var i of c(t))u.call(t,i)&&m(e,i,t[i]);return e},y=(e,t)=>r(e,a(t)),C=(e,t)=>{var i={};for(var n in e)d.call(e,n)&&t.indexOf(n)<0&&(i[n]=e[n]);if(null!=e&&c)for(var n of c(e))t.indexOf(n)<0&&u.call(e,n)&&(i[n]=e[n]);return i},b=(e,t)=>{for(var i in t)s(e,i,{get:t[i],enumerable:!0})},S=(e,t,i,n)=>{for(var r,a=n>1?void 0:n?o(t,i):t,l=e.length-1;l>=0;l--)(r=e[l])&&(a=(n?r(t,i,a):r(a))||a);return n&&a&&s(t,i,a),a},w=(e,t,i)=>p(h(e),i,t),x=(e,t,i)=>new Promise((n,s)=>{var r=e=>{try{a(i.next(e))}catch(e){s(e)}},o=e=>{try{a(i.throw(e))}catch(e){s(e)}},a=e=>e.done?n(e.value):Promise.resolve(e.value).then(r,o);a((i=i.apply(e,t)).next())}),E=function(e,t){this[0]=e,this[1]=t},M=e=>{var t,i=e[g("asyncIterator")],n=!1,s={};return null==i?(i=e[g("iterator")](),t=e=>s[e]=t=>i[e](t)):(i=i.call(e),t=e=>s[e]=t=>{if(n){if(n=!1,"throw"===e)throw t;return t}return n=!0,{done:!1,value:new E(new Promise(n=>{var s=i[e](t);if(!(s instanceof Object))throw TypeError("Object expected");n(s)}),1)}}),s[g("iterator")]=()=>s,t("next"),"throw"in i?t("throw"):s.throw=e=>{throw e},"return"in i&&t("return"),s},A={};b(A,{AgChart:()=>If,AgCharts:()=>Df,AgErrorBarSupportedSeriesTypes:()=>T,AgTooltipPositionType:()=>D,Marker:()=>yd,VERSION:()=>kf,_ModuleSupport:()=>Kf,_Scale:()=>Uf,_Scene:()=>Pf,_Theme:()=>Hf,_Util:()=>Wf,__FORCE_MODULE_DETECTION:()=>I,time:()=>R}),e.exports=(n=A,((e,t,i,n)=>{if(t&&"object"==typeof t||"function"==typeof t)for(let i of l(t))d.call(e,i)||void 0===i||s(e,i,{get:()=>t[i],enumerable:!(n=o(t,i))||n.enumerable});return e})(s({},"__esModule",{value:!0}),n));var T=["bar","line","scatter"],D=(e=>(e.POINTER="pointer",e.NODE="node",e.TOP="top",e.RIGHT="right",e.BOTTOM="bottom",e.LEFT="left",e.TOP_LEFT="top-left",e.TOP_RIGHT="top-right",e.BOTTOM_RIGHT="bottom-right",e.BOTTOM_LEFT="bottom-left",e))(D||{}),I=0,R={};b(R,{day:()=>ie,friday:()=>he,hour:()=>ee,millisecond:()=>V,minute:()=>Z,monday:()=>oe,month:()=>pe,saturday:()=>de,second:()=>Y,sunday:()=>re,thursday:()=>ce,tuesday:()=>ae,utcDay:()=>Ce,utcHour:()=>ye,utcMinute:()=>ve,utcMonth:()=>be,utcYear:()=>Se,wednesday:()=>le,year:()=>fe});var L=new Map;function k(e,t){L.has(t)||(L.set(t,!0),e())}function P(e){return e}function*N(...e){for(const t of e)yield*M(t)}function O(e,t=0,i){const{leading:n=!0,trailing:s=!0}=null!=i?i:{};let r,o,a=!1;function l(){s&&o?(r=setTimeout(l,t),e(...o)):a=!1,o=null}return Object.assign(function(...i){a?o=i:(a=!0,r=setTimeout(l,t),n?e(...i):o=i)},{cancel(){clearTimeout(r),a=!1,o=null}})}k.clear=()=>L.clear();var _={log(...e){console.log(...e)},warn(e,...t){console.warn(`AG Charts - ${e}`,...t)},error(e,...t){"object"==typeof e?console.error("AG Charts error",e,...t):console.error(`AG Charts - ${e}`,...t)},table(...e){console.table(...e)},warnOnce(e,...t){k(()=>_.warn(e,...t),`Logger.warn: ${e}`)},errorOnce(e,...t){k(()=>_.error(e,...t),`Logger.error: ${e}`)}},F=class{constructor(e,t,i){this._encode=e,this._decode=t,this._rangeCallback=i}floor(e){const t=new Date(e),i=this._encode(t);return this._decode(i)}ceil(e){const t=new Date(Number(e)-1),i=this._encode(t);return this._decode(i+1)}range(e,t,i){var n;const s=null==(n=this._rangeCallback)?void 0:n.call(this,e,t),r=this._encode(i?this.floor(e):this.ceil(e)),o=this._encode(i?this.ceil(t):this.floor(t));if(o<r)return[];const a=[];for(let e=r;e<=o;e++){const t=this._decode(e);a.push(t)}return null==s||s(),a}},G=class extends F{getOffset(e,t){const i="number"==typeof e||e instanceof Date?this._encode(new Date(e)):0;return Math.floor(i)%t}every(e,t){let i,n=0;const s=e;s!==(e=Math.max(1,Math.round(e)))&&_.warnOnce(`interval step of [${s}] rounded to [${e}].`);const{snapTo:r="start"}=null!=t?t:{};if("string"==typeof r){const t=n;i=(i,s)=>{const o="start"===r?i:s;return n=this.getOffset(o,e),()=>n=t}}else"number"==typeof r?n=this.getOffset(new Date(r),e):r instanceof Date&&(n=this.getOffset(r,e));return new F(t=>{const i=this._encode(t);return Math.floor((i-n)/e)},t=>this._decode(t*e+n),i)}},V=new G(function(e){return e.getTime()},function(e){return new Date(e)}),B=V,H=(new Date(0).getFullYear(),1e3),z=6e4,U=36e5,W=864e5,j=6048e5,K=31536e6,$=(new Date).getTimezoneOffset()*z,Y=new G(function(e){return Math.floor((e.getTime()-$)/H)},function(e){return new Date($+e*H)}),q=Y,X=(new Date).getTimezoneOffset()*z,Z=new G(function(e){return Math.floor((e.getTime()-X)/z)},function(e){return new Date(X+e*z)}),Q=Z,J=(new Date).getTimezoneOffset()*z,ee=new G(function(e){return Math.floor((e.getTime()-J)/U)},function(e){return new Date(J+e*U)}),te=ee,ie=new G(function(e){const t=e.getTimezoneOffset()*z;return Math.floor((e.getTime()-t)/W)},function(e){const t=new Date(1970,0,1);return t.setDate(t.getDate()+e),t}),ne=ie;function se(e){const t=(7+e-4)%7;return new G(function(e){const i=e.getTimezoneOffset()*z;return Math.floor((e.getTime()-i)/j-t/7)},function(e){const i=new Date(1970,0,1);return i.setDate(i.getDate()+7*e+t),i})}var re=se(0),oe=se(1),ae=se(2),le=se(3),ce=se(4),he=se(5),de=se(6),ue=re,pe=new G(function(e){return 12*e.getFullYear()+e.getMonth()},function(e){const t=Math.floor(e/12);return new Date(t,e-12*t,1)}),ge=pe,fe=new G(function(e){return e.getFullYear()},function(e){const t=new Date;return t.setFullYear(e),t.setMonth(0,1),t.setHours(0,0,0,0),t}),me=fe,ve=new G(function(e){return Math.floor(e.getTime()/z)},function(e){return new Date(e*z)}),ye=new G(function(e){return Math.floor(e.getTime()/U)},function(e){return new Date(e*U)}),Ce=new G(function(e){return Math.floor(e.getTime()/W)},function(e){const t=new Date(0);return t.setUTCDate(t.getUTCDate()+e),t.setUTCHours(0,0,0,0),t}),be=new G(function(e){return 12*e.getUTCFullYear()+e.getUTCMonth()},function(e){const t=Math.floor(e/12),i=e-12*t;return new Date(Date.UTC(t,i,1))}),Se=new G(function(e){return e.getUTCFullYear()},function(e){const t=new Date;return t.setUTCFullYear(e),t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0),t}),we={isEnterprise:!1},xe=class{constructor(){this.destroyFns=[]}destroy(){for(const e of this.destroyFns)e()}},Ee=new class{constructor(){this.modules=[],this.dependencies=new Set,this.dependents=new Set}register(...e){for(const t of e){this.registerDependencies(t);const e=this.modules.find(e=>t.type===e.type&&t.optionsKey===e.optionsKey&&t.identifier===e.identifier);if(e){if("enterprise"===t.packageType&&"community"===e.packageType){const i=this.modules.indexOf(e);this.modules.splice(i,1,t)}}else this.modules.push(t)}}hasEnterpriseModules(){return this.modules.some(e=>"enterprise"===e.packageType)}*byType(...e){for(const t of this.modules)e.includes(t.type)&&this.dependencies.has(t.optionsKey)&&(yield t);for(const t of this.modules)!e.includes(t.type)||this.dependencies.has(t.optionsKey)||this.dependents.has(t.optionsKey)||(yield t);for(const t of this.modules)e.includes(t.type)&&this.dependents.has(t.optionsKey)&&(yield t)}registerDependencies(e){if(null!=e.dependencies&&0!==e.dependencies.length){if(this.dependencies.has(e.optionsKey))throw new Error(`Module [${e.optionsKey}] can not both be depended upon by any module and have dependencies of [${e.dependencies}].`);for(const t of e.dependencies){if(this.dependents.has(t))throw new Error(`Module [${t}] can not both be depended upon by any module and have dependencies of [${e.optionsKey}].`);this.dependencies.add(t)}this.dependents.add(e.optionsKey)}}},Me=new class{constructor(){this.axesMap=new Map,this.hidden=new Set,this.themeTemplates=new Map}register(e,t){this.axesMap.set(e,t.instanceConstructor),t.themeTemplate&&this.setThemeTemplate(e,t.themeTemplate),t.hidden&&this.hidden.add(e)}create(e,t){const i=this.axesMap.get(e);if(i)return new i(t);throw new Error(`AG Charts - unknown axis type: ${e}`)}has(e){return this.axesMap.has(e)}keys(){return this.axesMap.keys()}publicKeys(){return[...this.keys()].filter(e=>!this.hidden.has(e))}setThemeTemplate(e,t){return this.themeTemplates.set(e,t),this}getThemeTemplate(e){return this.themeTemplates.get(e)}},Ae=Symbol("BREAK"),Te="__decorator_config";function De(e,t){null==Object.getOwnPropertyDescriptor(e,Te)&&Object.defineProperty(e,Te,{value:{}});const i=e[Te],n=t.toString();if(void 0!==i[n])return i[n];const s=new WeakMap;i[n]={setters:[],getters:[],observers:[],valuesMap:s};const r=Object.getOwnPropertyDescriptor(e,t),o=null==r?void 0:r.set,a=null==r?void 0:r.get;return Object.defineProperty(e,t,{set:function(e){const{setters:r,observers:l}=i[n];let c;r.some(e=>e.length>2)&&(c=a?a.call(this):s.get(this));for(const i of r)if((e=i(this,t,e,c))===Ae)return;o?o.call(this,e):s.set(this,e);for(const t of l)t(this,e,c)},get:function(){let e=a?a.call(this):s.get(this);for(const s of i[n].getters)if(e=s(this,t,e),e===Ae)return;return e},enumerable:!0,configurable:!1}),i[n]}function Ie(e,t,i){return(n,s)=>{const r=De(n,s);r.setters.push(e),t&&r.getters.unshift(t),i&&Object.assign(r,i)}}function Re(e){return void 0!==e&&Te in e}function Le(e){const t=new Set;for(;Re(e);)t.add(null==e?void 0:e[Te]),e=Object.getPrototypeOf(e);return Array.from(t).flatMap(e=>Object.keys(e))}function ke(e){return Le(e).reduce((t,i)=>{var n;return t[i]=null!=(n=e[i])?n:null,t},{})}function Pe(e){return null!=e}function Ne(e){return Array.isArray(e)}function Oe(e){return"boolean"==typeof e}function _e(e){return e instanceof Date}function Fe(e){return _e(e)&&!isNaN(Number(e))}function Ge(e){return e instanceof RegExp}function Ve(e){return"function"==typeof e}function Be(e){return"object"==typeof e&&null!==e&&!Ne(e)}function He(e){return Ne(e)||ze(e)}function ze(e){return"object"==typeof e&&null!==e&&e.constructor===Object}function Ue(e){return"string"==typeof e}function We(e){return"number"==typeof e}function je(e){return We(e)&&Number.isFinite(e)}function Ke(e){return"undefined"!=typeof window&&e instanceof HTMLElement}function $e(e,t){return Ue(t)&&Object.keys(e).includes(t)}function Ye(e,t){return Object.values(e).includes(t)}function qe(e){return"symbol"==typeof e}function Xe(...e){return Ze(...e.reverse())}function Ze(...e){const t={};for(const i of e){if(!Be(i))continue;const e=Re(i)?Le(i):Object.keys(i);for(const n of e)ze(t[n])&&ze(i[n])?t[n]=Ze(t[n],i[n]):null!=t[n]||(t[n]=i[n])}return t}function Qe(e,...t){return t&&Ne(e)?e.map(e=>Ze(e,...t)):e}function Je(e,t){return Object.entries(e).reduce((i,[n,s])=>(i[n]=t(s,n,e),i),{})}function et(e,t){const i=v({},e);for(const e of t)delete i[e];return i}function tt(e,t){return(Ne(t)?t:t.split(".")).reduce((e,t)=>e[t],e)}var it=new Set(["__proto__","constructor","prototype"]);function nt(e,t,i){const n=Ne(t)?t.slice():t.split("."),s=n.pop();n.some(e=>it.has(e))||(n.reduce((e,t)=>e[t],e)[s]=i)}function st(e,t,i){if(void 0===i)return t;for(const n of e){const e=i[n];void 0!==e&&(t[n]=e)}return t}var rt=class extends Map{get(e){var t;return null!=(t=super.get(e))?t:"unknown"}isCartesian(e){return"cartesian"===this.get(e)}isPolar(e){return"polar"===this.get(e)}isHierarchy(e){return"hierarchy"===this.get(e)}isTopology(e){return"topology"===this.get(e)}get seriesTypes(){return Array.from(this.keys())}get cartesianTypes(){return this.seriesTypes.filter(e=>this.isCartesian(e))}get polarTypes(){return this.seriesTypes.filter(e=>this.isPolar(e))}get hierarchyTypes(){return this.seriesTypes.filter(e=>this.isHierarchy(e))}get topologyTypes(){return this.seriesTypes.filter(e=>this.isTopology(e))}},ot=class extends Map{set(e,t){return super.set(e,Ze(t,this.get(e)))}},at=new rt,lt=new rt,ct=new ot,ht=[{type:"root",optionsKey:"animation",chartTypes:["cartesian","polar","hierarchy","topology"]},{type:"root",optionsKey:"annotations",chartTypes:["cartesian"]},{type:"root",optionsKey:"background",chartTypes:["cartesian","polar","hierarchy","topology"],optionsInnerKey:"image"},{type:"root",optionsKey:"contextMenu",chartTypes:["cartesian","polar","hierarchy","topology"]},{type:"root",optionsKey:"dataSource",chartTypes:["cartesian","polar","hierarchy","topology"]},{type:"root",optionsKey:"sync",chartTypes:["cartesian"]},{type:"root",optionsKey:"zoom",chartTypes:["cartesian","topology"]},{type:"legend",optionsKey:"gradientLegend",chartTypes:["cartesian","polar","hierarchy","topology"],identifier:"gradient"},{type:"root",optionsKey:"navigator",chartTypes:["cartesian"],optionsInnerKey:"miniChart"},{type:"axis",optionsKey:"axes[]",chartTypes:["polar"],identifier:"angle-category"},{type:"axis",optionsKey:"axes[]",chartTypes:["polar"],identifier:"angle-number"},{type:"axis",optionsKey:"axes[]",chartTypes:["polar"],identifier:"radius-category"},{type:"axis",optionsKey:"axes[]",chartTypes:["polar"],identifier:"radius-number"},{type:"axis",optionsKey:"axes[]",chartTypes:["cartesian"],identifier:"ordinal-time"},{type:"axis-option",optionsKey:"crosshair",chartTypes:["cartesian"]},{type:"series",optionsKey:"series[]",chartTypes:["cartesian"],identifier:"box-plot"},{type:"series",optionsKey:"series[]",chartTypes:["cartesian"],identifier:"candlestick"},{type:"series",optionsKey:"series[]",chartTypes:["cartesian"],identifier:"ohlc"},{type:"series",optionsKey:"series[]",chartTypes:["cartesian"],identifier:"bullet"},{type:"series",optionsKey:"series[]",chartTypes:["cartesian"],identifier:"heatmap"},{type:"series",optionsKey:"series[]",chartTypes:["cartesian"],identifier:"range-area"},{type:"series",optionsKey:"series[]",chartTypes:["cartesian"],identifier:"range-bar"},{type:"series",optionsKey:"series[]",chartTypes:["cartesian"],identifier:"waterfall"},{type:"series",optionsKey:"series[]",chartTypes:["polar"],identifier:"nightingale"},{type:"series",optionsKey:"series[]",chartTypes:["polar"],identifier:"radar-area"},{type:"series",optionsKey:"series[]",chartTypes:["polar"],identifier:"radar-line"},{type:"series",optionsKey:"series[]",chartTypes:["polar"],identifier:"radial-bar"},{type:"series",optionsKey:"series[]",chartTypes:["polar"],identifier:"radial-column"},{type:"series",optionsKey:"series[]",chartTypes:["hierarchy"],identifier:"sunburst"},{type:"series",optionsKey:"series[]",chartTypes:["hierarchy"],identifier:"treemap"},{type:"series",optionsKey:"series[]",chartTypes:["topology"],identifier:"map-shape"},{type:"series",optionsKey:"series[]",chartTypes:["topology"],identifier:"map-line"},{type:"series",optionsKey:"series[]",chartTypes:["topology"],identifier:"map-marker"},{type:"series",optionsKey:"series[]",chartTypes:["topology"],identifier:"map-shape-background"},{type:"series",optionsKey:"series[]",chartTypes:["topology"],identifier:"map-line-background"},{type:"series-option",optionsKey:"errorBar",chartTypes:["cartesian"],identifier:"error-bars"}];function dt(e){var t;return null==(t=ht.find(t=>"series"===t.type&&t.identifier===e))?void 0:t.chartTypes}function ut(e){if(!function(e){return"enterprise"===e.packageType}(e))throw new Error("AG Charts - internal configuration error, only enterprise modules need verification.");const t=ht.find(t=>t.type===e.type&&t.optionsKey===e.optionsKey&&t.identifier===e.identifier&&e.chartTypes.every(e=>t.chartTypes.includes(e)));return t&&(null!=t.useCount||(t.useCount=0),t.useCount++),null!=t}function pt(e){var t,i,n;return null!=(n=null==(i=null==(t=e.series)?void 0:t[0])?void 0:i.type)?n:"line"}function gt(e){const t=pt(e);return null==t||("cartesian"===t?(_.warnOnce(`type '${t}' is deprecated, use a series type instead`),!0):at.isCartesian(t)||"cartesian"===(null==(i=dt(t))?void 0:i.find(e=>"cartesian"===e)));var i}function ft(e){const t=pt(e);return null!=t&&("polar"===t?(_.warnOnce(`type '${t}' is deprecated, use a series type instead`),!0):at.isPolar(t)||"polar"===(null==(i=dt(t))?void 0:i.find(e=>"polar"===e)));var i}function mt(e){const t=pt(e);return null!=t&&("hierarchy"===t?(_.warnOnce(`type '${t}' is deprecated, use a series type instead`),!0):at.isHierarchy(t)||"hierarchy"===(null==(i=dt(t))?void 0:i.find(e=>"hierarchy"===e)));var i}function vt(e){const t=pt(e);return null!=t&&("topology"===t?(_.warnOnce(`type '${t}' is deprecated, use a series type instead`),!0):at.isTopology(t)||"topology"===(null==(i=dt(t))?void 0:i.find(e=>"topology"===e)));var i}function yt(e){return null!=e&&Me.has(e)}var Ct=class{set(e){const{className:t=this.constructor.name}=this.constructor;if("object"!=typeof e)return _.warn(`unable to set ${t} - expecting a properties object`),this;const i=new Set(Object.keys(e));for(const t of Le(this))if(i.has(t)){const n=e[t],s=this;St(s[t])?s[t]=s[t]instanceof bt?s[t].reset(n):s[t].set(n):s[t]=n,i.delete(t)}for(const e of i)_.warn(`unable to set [${e}] in ${t} - property is unknown`);return this}isValid(){return Le(this).every(e=>{const{optional:t}=function(e,t){const i=t.toString();for(;Re(e);){const t=e[Te];if(Object.hasOwn(t,i))return t[i];e=Object.getPrototypeOf(e)}}(this,e),i=t||void 0!==this[e];return i||_.warnOnce(`[${e}] is required.`),i})}toJson(){return Le(this).reduce((e,t)=>{const i=this[t];return e[t]=St(i)?i.toJson():i,e},{})}},bt=class e extends Array{constructor(e,...t){super(t.length),Object.defineProperty(this,"itemFactory",{value:e,enumerable:!1,configurable:!1}),this.set(t)}set(e){if(Ne(e)){this.length=e.length;for(let t=0;t<e.length;t++)this[t]=(new this.itemFactory).set(e[t])}return this}reset(t){return new e(this.itemFactory,...t)}toJson(){return this.map(e=>{var t,i;return null!=(i=null==(t=null==e?void 0:e.toJson)?void 0:t.call(e))?i:e})}};function St(e){return e instanceof Ct||e instanceof bt}var wt="class-instance";function xt(e,t,i){if(Ne(t)){if(!Ne(e)||e.length!==t.length||t.some((t,i)=>null!=xt(e[i],t)))return t}else{if(ze(t)){if(!ze(e))return t;const n={},s=new Set([...Object.keys(e),...Object.keys(t)]);for(const r of s)if(e[r]!==t[r]&&!(null==i?void 0:i.includes(r)))if(typeof e[r]==typeof t[r]){const i=xt(e[r],t[r]);null!==i&&(n[r]=i)}else n[r]=t[r];return Object.keys(n).length?n:null}if(e!==t)return t}return null}function Et(e,t){return Ne(e)?e.map(e=>Et(e,t)):ze(e)?Je(e,(e,i)=>{var n;return(null==(n=null==t?void 0:t.shallow)?void 0:n.includes(i))?Mt(e):Et(e,t)}):Mt(e)}function Mt(e){return Ne(e)?[...e]:ze(e)?v({},e):_e(e)?new Date(e):Ge(e)?new RegExp(e.source,e.flags):e}function At(e,t,i,...n){var s;if(Ne(e))t(e,...n),e.forEach((e,s)=>{At(e,t,i,...Dt(n,s))});else if(ze(e)){t(e,...n);for(const r of Object.keys(e)){if(null==(s=null==i?void 0:i.skip)?void 0:s.includes(r))continue;const o=e[r];(Ne(o)||ze(o))&&At(o,t,i,...Dt(n,r))}}}function Tt(e,t,i={}){const{path:n,constructedArrays:s,matcherPath:r=(null==n?void 0:n.replace(/(\[[0-9+]+])/i,"[]")),skip:o=[]}=i;if(null==e)throw new Error(`AG Charts - target is uninitialised: ${null!=n?n:"<root>"}`);if(null==t)return e;if(St(e))return e.set(t);const a=e,l=It(e);for(const c in t){if(it.has(c))continue;const h=`${r?r+".":""}${c}`;if(o.includes(h))continue;const d=t[c],u=`${n?n+".":""}${c}`,p=a.constructor,g=a[c];let f;try{const t=It(g),n=It(d);if(l===wt&&!(c in e)){_.warn(`unable to set [${u}] in ${null==p?void 0:p.name} - property is unknown`);continue}if(null!=t&&null!=n&&n!==t&&(t!==wt||"object"!==n)){_.warn(`unable to set [${u}] in ${null==p?void 0:p.name} - can't apply type of [${n}], allowed types are: [${t}]`);continue}if(St(g))a[c].set(d);else if("array"===n)if(null!=f||(f=null==s?void 0:s.get(g)),null==f)a[c]=d;else{const e=d;a[c]=e.map(e=>Tt(new f,e,y(v({},i),{path:u,matcherPath:h+"[]"})))}else n===wt?a[c]=d:"object"===n?null!=g?Tt(g,d,y(v({},i),{path:u,matcherPath:h})):null==f?(a[c]={},Tt(a[c],d,y(v({},i),{path:u,matcherPath:h}))):a[c]=Tt(new f,d,y(v({},i),{path:u,matcherPath:h})):a[c]=d}catch(e){_.warn(`unable to set [${u}] in [${null==p?void 0:p.name}]; nested error is: ${e.message}`)}}return e}function Dt(e,t){return e.map(e=>null==e?void 0:e[t])}function It(e){return null==e?null:Ke(e)||_e(e)?"primitive":Ne(e)?"array":Be(e)?ze(e)?"object":wt:Ve(e)?"function":"primitive"}var Rt=new class{constructor(){this.seriesMap=new Map,this.themeTemplates=new Map}register(e,{chartTypes:[t],instanceConstructor:i,defaultAxes:n,themeTemplate:s,enterpriseThemeTemplate:r,paletteFactory:o,solo:a,stackable:l,groupable:c,stackedByDefault:h,swapDefaultAxesCondition:d,hidden:u}){this.setThemeTemplate(e,s,r),this.seriesMap.set(e,{instanceConstructor:i,defaultAxes:n,paletteFactory:o,solo:a,stackable:l,groupable:c,stackedByDefault:h,swapDefaultAxesCondition:d}),at.set(e,t),u||lt.set(e,t)}create(e,t){var i;const n=null==(i=this.seriesMap.get(e))?void 0:i.instanceConstructor;if(n)return new n(t);throw new Error(`AG Charts - unknown series type: ${e}`)}cloneDefaultAxes(e){var t;const i=null==(t=this.seriesMap.get(e))?void 0:t.defaultAxes;return i?{axes:Et(i)}:null}setThemeTemplate(e,t,i={}){const n=this.themeTemplates.get(e);this.themeTemplates.set(e,{community:Ze(t,null==n?void 0:n.community),enterprise:Ze(i,t,null==n?void 0:n.community)})}getThemeTemplate(e){const t=this.themeTemplates.get(e);return we.isEnterprise?null==t?void 0:t.enterprise:null==t?void 0:t.community}getPaletteFactory(e){var t;return null==(t=this.seriesMap.get(e))?void 0:t.paletteFactory}isSolo(e){var t,i;return null!=(i=null==(t=this.seriesMap.get(e))?void 0:t.solo)&&i}isGroupable(e){var t,i;return null!=(i=null==(t=this.seriesMap.get(e))?void 0:t.groupable)&&i}isStackable(e){var t,i;return null!=(i=null==(t=this.seriesMap.get(e))?void 0:t.stackable)&&i}isStackedByDefault(e){var t,i;return null!=(i=null==(t=this.seriesMap.get(e))?void 0:t.stackedByDefault)&&i}isDefaultAxisSwapNeeded(e){var t,i,n;let s;for(const r of null!=(t=e.series)?t:[]){const{type:e="line"}=r,t=null==(n=null==(i=this.seriesMap.get(e))?void 0:i.swapDefaultAxesCondition)?void 0:n.call(i,r);if(null!=t){if(null!=s&&s!=t)throw new Error("AG Charts - The provided series have incompatible directions");s=t}}return s}},Lt=new class{constructor(){this.legendMap=new Map,this.themeTemplates=new Map}register(e,{optionsKey:t,instanceConstructor:i,themeTemplate:n}){this.legendMap.set(e,{optionsKey:t,instanceConstructor:i}),this.themeTemplates.set(t,n)}create(e,t){var i;const n=null==(i=this.legendMap.get(e))?void 0:i.instanceConstructor;if(n)return new n(t);throw new Error(`AG Charts - unknown legend type: ${e}`)}getThemeTemplates(){return Object.fromEntries(this.themeTemplates)}getKeys(){return Array.from(this.legendMap.entries()).reduce((e,[t,i])=>(e[t]=i.optionsKey,e),{})}},kt=(e=>(e[e.SMALL=12]="SMALL",e[e.MEDIUM=13]="MEDIUM",e[e.LARGE=17]="LARGE",e))(kt||{}),Pt=(e=>(e.NORMAL="normal",e.BOLD="bold",e.BOLDER="bolder",e.LIGHTER="lighter",e))(Pt||{}),Nt=(e=>(e.TOP="top",e.RIGHT="right",e.BOTTOM="bottom",e.LEFT="left",e))(Nt||{}),Ot=(e=>(e.CATEGORY="category",e.ORDINAL_TIME="ordinal-time",e.NUMBER="number",e.TIME="time",e.LOG="log",e))(Ot||{}),_t=(e=>(e.ANGLE_CATEGORY="angle-category",e.ANGLE_NUMBER="angle-number",e.RADIUS_CATEGORY="radius-category",e.RADIUS_NUMBER="radius-number",e))(_t||{}),Ft=(e=>(e.CIRCLE="circle",e.POLYGON="polygon",e))(Ft||{}),Gt={BLUE:"#5090dc",ORANGE:"#ffa03a",GREEN:"#459d55",CYAN:"#34bfe1",YELLOW:"#e1cc00",VIOLET:"#9669cb",GRAY:"#b5b5b5",MAGENTA:"#bd5aa7",BROWN:"#8a6224",RED:"#ef5452"},Vt={BLUE:"#2b5c95",ORANGE:"#cc6f10",GREEN:"#1e652e",CYAN:"#18859e",YELLOW:"#a69400",VIOLET:"#603c88",GRAY:"#575757",MAGENTA:"#7d2f6d",BROWN:"#4f3508",RED:"#a82529"},Bt=Symbol("is-dark-theme"),Ht=Symbol("extends-axes-defaults"),zt=Symbol("extends-axes-line-defaults"),Ut=Symbol("extends-axes-tick-defaults"),Wt=Symbol("extends-axes-grid-line-defaults"),jt=Symbol("extends-series-defaults"),Kt=Symbol("extends-cartesian-marker-defaults"),$t=Symbol("default-font"),Yt=Symbol("default-label-colour"),qt=Symbol("default-inverted-label-colour"),Xt=Symbol("default-inside-series-label-colour"),Zt=Symbol("default-muted-label-colour"),Qt=Symbol("default-axis-grid-colour"),Jt=Symbol("default-axis-line-colour"),ei=Symbol("default-cross-lines-colour"),ti=Symbol("default-background-colour"),ii=Symbol("default-shadow-colour"),ni=Symbol("default-colours"),si=Symbol("default-waterfall-series-positive-colors"),ri=Symbol("default-waterfall-series-negative-colors"),oi=Symbol("default-waterfall-series-total-colors"),ai=Symbol("default-waterfall-series-connector-line-stroke"),li=Symbol("default-polar-series-stroke"),ci=Symbol("default-diverging-series-colour-range"),hi=Symbol("default-hierarchy-fills"),di=Symbol("default-hierarchy-strokes"),ui=Symbol("default-annotation-stroke"),pi=Symbol("default-annotation-background-fill"),gi=Symbol("default-annotation-handle-fill"),fi="white",mi={fills:Object.values(Gt),strokes:Object.values(Vt)},vi={get cartesian(){return{seriesTypes:at.cartesianTypes,commonOptions:["zoom","navigator"]}},get polar(){return{seriesTypes:at.polarTypes,commonOptions:[]}},get hierarchy(){return{seriesTypes:at.hierarchyTypes,commonOptions:[]}},get topology(){return{seriesTypes:at.topologyTypes,commonOptions:[]}}},yi=Object.values(vi).reduce((e,{commonOptions:t})=>e.concat(t),[]),Ci=class e{getPalette(){return mi}static getAxisDefaults(e){return Ze(e,{title:{enabled:!1,text:"Axis Title",spacing:25,fontWeight:"normal",fontSize:13,fontFamily:$t,color:Yt},label:{fontSize:12,fontFamily:$t,padding:5,color:Yt,avoidCollisions:!0},line:{enabled:!0,width:1,color:Jt},tick:{enabled:!1,width:1,color:Jt},gridLine:{enabled:!0,style:[{stroke:Qt,lineDash:[]}]},crossLines:{enabled:!1,fill:ei,stroke:ei,fillOpacity:.1,strokeWidth:1,label:{enabled:!1,fontSize:12,fontFamily:$t,padding:5,color:Yt}}})}static getSeriesDefaults(){return{visible:!0,showInLegend:!0,highlightStyle:{item:{fill:"#ffffff54",stroke:"#0006",strokeWidth:2},series:{dimOpacity:1}},nodeClickRange:"exact",tooltip:{enabled:!0}}}static getCartesianSeriesMarkerDefaults(){return{enabled:!0,shape:"circle",size:7,strokeWidth:1}}static getChartDefaults(){return{background:{visible:!0,fill:ti},padding:{top:20,right:20,bottom:20,left:20},keyboard:{enabled:!0},title:{enabled:!1,text:"Title",fontWeight:"normal",fontSize:17,fontFamily:$t,color:Yt,wrapping:"hyphenate"},subtitle:{enabled:!1,text:"Subtitle",spacing:20,fontSize:13,fontFamily:$t,color:Zt,wrapping:"hyphenate"},footnote:{enabled:!1,text:"Footnote",spacing:20,fontSize:13,fontFamily:$t,color:"rgb(140, 140, 140)",wrapping:"hyphenate"},legend:{position:"bottom",spacing:30,listeners:{},item:{paddingX:16,paddingY:8,marker:{size:15,padding:8},toggleSeriesVisible:!0,label:{color:Yt,fontSize:12,fontFamily:$t}},reverseOrder:!1,pagination:{marker:{size:12},activeStyle:{fill:Yt},inactiveStyle:{fill:Zt},highlightStyle:{fill:Yt},label:{color:Yt}}},tooltip:{enabled:!0,darkTheme:Bt,range:"nearest",delay:0},overlays:{loading:{darkTheme:Bt},noData:{darkTheme:Bt},noVisibleSeries:{darkTheme:Bt}},listeners:{}}}constructor(e={}){const{overrides:t,palette:i}=Et(e),n=this.createChartConfigPerChartType(this.getDefaults());t&&this.mergeOverrides(n,t),this.config=Object.freeze(this.templateTheme(n)),this.palette=Ze(i,this.getPalette())}mergeOverrides(e,t){for(const{seriesTypes:i,commonOptions:n}of Object.values(vi)){const s=v({},t.common);for(const e of yi)n.includes(e)||delete s[e];if(s)for(const t of i){const i=t;e[i]=Ze(s,e[i])}}at.seriesTypes.forEach(i=>{const n=i;t[n]&&(e[n]=Ze(t[n],e[n]))})}createChartConfigPerChartType(e){for(const[t,{seriesTypes:i}]of Object.entries(vi)){const n=ct.get(t);for(const t of i)e[t]||(e[t]=Et(n))}return e}getDefaults(){const t=(t,i)=>{var n;const s={},r=v(v(v({axes:{}},Lt.getThemeTemplates()),e.getChartDefaults()),ct.get(t));for(const o of i){s[o]=Ze(Rt.getThemeTemplate(o),null!=(n=s[o])?n:Et(r));const{axes:i}=s[o];for(const n of Me.keys())i[n]=Ze(i[n],Me.getThemeTemplate(n),"cartesian"===t&&e.cartesianAxisDefault[n])}return s};return Ze(t("cartesian",at.cartesianTypes),t("polar",at.polarTypes),t("hierarchy",at.hierarchyTypes),t("topology",at.topologyTypes))}templateTheme(e){const t=Et(e),{extensions:i,properties:n}=this.getTemplateParameters();return At(t,e=>{if(e.__extends__){const t=e.__extends__,n=i.get(t);if(null==n)throw new Error(`AG Charts - no template variable provided for: ${t}`);Object.keys(n).forEach(t=>{t in e?Be(e[t])&&(e[t]=Ze(e[t],n[t])):e[t]=n[t]}),delete e.__extends__}if(Ne(e))for(let t=0;t<e.length;t++){const i=e[t];n.has(i)&&(e[t]=n.get(i))}else for(const[t,i]of Object.entries(e))n.has(i)&&(e[t]=n.get(i))}),Et(t)}static getDefaultColors(){return{fills:Gt,strokes:Vt}}static getWaterfallSeriesDefaultPositiveColors(){return{fill:Gt.BLUE,stroke:Vt.BLUE,label:{color:Yt}}}static getWaterfallSeriesDefaultNegativeColors(){return{fill:Gt.ORANGE,stroke:Vt.ORANGE,label:{color:Yt}}}static getWaterfallSeriesDefaultTotalColors(){return{fill:Gt.GRAY,stroke:Vt.GRAY,label:{color:Yt}}}getTemplateParameters(){const t=new Map;t.set(Ht,e.getAxisDefaults()),t.set(zt,e.getAxisDefaults().line),t.set(Ut,e.getAxisDefaults().tick),t.set(Wt,e.getAxisDefaults().gridLine),t.set(jt,e.getSeriesDefaults()),t.set(Kt,e.getCartesianSeriesMarkerDefaults());const i=new Map;return i.set(Bt,!1),i.set($t,"Verdana, sans-serif"),i.set(Yt,"rgb(70, 70, 70)"),i.set(qt,"white"),i.set(Zt,"rgb(140, 140, 140)"),i.set(Qt,"rgb(224,234,241)"),i.set(Jt,"rgb(195, 195, 195)"),i.set(ei,"rgb(70, 70, 70)"),i.set(Xt,fi),i.set(ti,fi),i.set(ii,"rgba(0, 0, 0, 0.5)"),i.set(ci,[Gt.ORANGE,Gt.YELLOW,Gt.GREEN]),i.set(hi,["#ffffff","#e0e5ea","#c1ccd5","#a3b4c1","#859cad"]),i.set(di,["#ffffff","#c5cbd1","#a4b1bd","#8498a9","#648096"]),i.set(li,fi),i.set(ni,e.getDefaultColors()),i.set(si,e.getWaterfallSeriesDefaultPositiveColors()),i.set(ri,e.getWaterfallSeriesDefaultNegativeColors()),i.set(oi,e.getWaterfallSeriesDefaultTotalColors()),i.set(ai,e.getWaterfallSeriesDefaultTotalColors().stroke),i.set(ui,Vt.BLUE),i.set(pi,Gt.BLUE),i.set(gi,fi),{extensions:t,properties:i}}};Ci.cartesianAxisDefault={number:Ci.getAxisDefaults({line:{enabled:!1}}),log:Ci.getAxisDefaults({base:10,line:{enabled:!1}}),category:Ci.getAxisDefaults({groupPaddingInner:.1,label:{autoRotate:!0},gridLine:{enabled:!1}}),time:Ci.getAxisDefaults({gridLine:{enabled:!1}}),"grouped-category":Ci.getAxisDefaults()};var bi=Ci,Si="#192232",wi={BLUE:"#5090dc",ORANGE:"#ffa03a",GREEN:"#459d55",CYAN:"#34bfe1",YELLOW:"#e1cc00",VIOLET:"#9669cb",GRAY:"#b5b5b5",MAGENTA:"#bd5aa7",BROWN:"#8a6224",RED:"#ef5452"},xi={BLUE:"#74a8e6",ORANGE:"#ffbe70",GREEN:"#6cb176",CYAN:"#75d4ef",YELLOW:"#f6e559",VIOLET:"#aa86d8",GRAY:"#a1a1a1",MAGENTA:"#ce7ab9",BROWN:"#997b52",RED:"#ff7872"},Ei={fills:Object.values(wi),strokes:Object.values(xi)},Mi=class e extends bi{static getDefaultColors(){return{fills:wi,strokes:xi}}static getWaterfallSeriesDefaultPositiveColors(){return{fill:wi.BLUE,stroke:xi.BLUE,label:{color:"white"}}}static getWaterfallSeriesDefaultNegativeColors(){return{fill:wi.ORANGE,stroke:xi.ORANGE,label:{color:"white"}}}static getWaterfallSeriesDefaultTotalColors(){return{fill:wi.GRAY,stroke:xi.GRAY,label:{color:"white"}}}getTemplateParameters(){const t=super.getTemplateParameters();return t.properties.set(Bt,!0),t.properties.set(ni,e.getDefaultColors()),t.properties.set(si,e.getWaterfallSeriesDefaultPositiveColors()),t.properties.set(ri,e.getWaterfallSeriesDefaultNegativeColors()),t.properties.set(oi,e.getWaterfallSeriesDefaultTotalColors()),t.properties.set(ai,e.getWaterfallSeriesDefaultTotalColors().stroke),t.properties.set(li,Si),t.properties.set(Yt,"white"),t.properties.set(Zt,"#7D91A0"),t.properties.set(Qt,"#545A6E"),t.properties.set(ei,"white"),t.properties.set(ci,[wi.ORANGE,wi.YELLOW,wi.GREEN]),t.properties.set(hi,["#192834","#253746","#324859","#3f596c","#4d6a80"]),t.properties.set(di,["#192834","#3b5164","#496275","#577287","#668399"]),t.properties.set(ti,Si),t.properties.set(Xt,Si),t.properties.set(ui,xi.BLUE),t.properties.set(pi,wi.BLUE),t.properties.set(gi,Si),t}getPalette(){return Ei}constructor(e){super(e)}},Ai={BLUE:"#2196F3",ORANGE:"#FF9800",GREEN:"#4CAF50",CYAN:"#00BCD4",YELLOW:"#FFEB3B",VIOLET:"#7E57C2",GRAY:"#9E9E9E",MAGENTA:"#F06292",BROWN:"#795548",RED:"#F44336"},Ti={BLUE:"#90CAF9",ORANGE:"#FFCC80",GREEN:"#A5D6A7",CYAN:"#80DEEA",YELLOW:"#FFF9C4",VIOLET:"#B39DDB",GRAY:"#E0E0E0",MAGENTA:"#F48FB1",BROWN:"#A1887F",RED:"#EF9A9A"},Di={fills:Object.values(Ai),strokes:Object.values(Ti)},Ii=class e extends Mi{static getDefaultColors(){return{fills:Ai,strokes:Ti}}static getWaterfallSeriesDefaultPositiveColors(){return{fill:Ai.BLUE,stroke:Ti.BLUE,label:{color:"white"}}}static getWaterfallSeriesDefaultNegativeColors(){return{fill:Ai.RED,stroke:Ti.RED,label:{color:"white"}}}static getWaterfallSeriesDefaultTotalColors(){return{fill:Ai.GRAY,stroke:Ti.GRAY,label:{color:"white"}}}getTemplateParameters(){const t=super.getTemplateParameters();return t.properties.set(ni,e.getDefaultColors()),t.properties.set(si,e.getWaterfallSeriesDefaultPositiveColors()),t.properties.set(ri,e.getWaterfallSeriesDefaultNegativeColors()),t.properties.set(oi,e.getWaterfallSeriesDefaultTotalColors()),t.properties.set(ci,[Ai.ORANGE,Ai.YELLOW,Ai.GREEN]),t.properties.set(ai,e.getWaterfallSeriesDefaultTotalColors().stroke),t.properties.set(ui,Ti.BLUE),t.properties.set(pi,Ai.BLUE),t}getPalette(){return Di}},Ri={BLUE:"#2196F3",ORANGE:"#FF9800",GREEN:"#4CAF50",CYAN:"#00BCD4",YELLOW:"#FFEB3B",VIOLET:"#7E57C2",GRAY:"#9E9E9E",MAGENTA:"#F06292",BROWN:"#795548",RED:"#F44336"},Li={BLUE:"#1565C0",ORANGE:"#E65100",GREEN:"#2E7D32",CYAN:"#00838F",YELLOW:"#F9A825",VIOLET:"#4527A0",GRAY:"#616161",MAGENTA:"#C2185B",BROWN:"#4E342E",RED:"#B71C1C"},ki={fills:Object.values(Ri),strokes:Object.values(Li)},Pi=class e extends bi{static getDefaultColors(){return{fills:Ri,strokes:Li}}static getWaterfallSeriesDefaultPositiveColors(){return{fill:Ri.BLUE,stroke:Li.BLUE,label:{color:Yt}}}static getWaterfallSeriesDefaultNegativeColors(){return{fill:Ri.RED,stroke:Li.RED,label:{color:Yt}}}static getWaterfallSeriesDefaultTotalColors(){return{fill:Ri.GRAY,stroke:Li.GRAY,label:{color:Yt}}}getTemplateParameters(){const t=super.getTemplateParameters();return t.properties.set(ni,e.getDefaultColors()),t.properties.set(si,e.getWaterfallSeriesDefaultPositiveColors()),t.properties.set(ri,e.getWaterfallSeriesDefaultNegativeColors()),t.properties.set(oi,e.getWaterfallSeriesDefaultTotalColors()),t.properties.set(ci,[Ri.ORANGE,Ri.YELLOW,Ri.GREEN]),t.properties.set(ai,e.getWaterfallSeriesDefaultTotalColors().stroke),t.properties.set(ui,Li.BLUE),t.properties.set(pi,Ri.BLUE),t}getPalette(){return ki}},Ni={BLUE:"#436ff4",PURPLE:"#9a7bff",MAGENTA:"#d165d2",PINK:"#f0598b",RED:"#f47348",ORANGE:"#f2a602",YELLOW:"#e9e201",GREEN:"#21b448",CYAN:"#00b9a2",MODERATE_BLUE:"#00aee4"},Oi={BLUE:"#6698ff",PURPLE:"#c0a3ff",MAGENTA:"#fc8dfc",PINK:"#ff82b1",RED:"#ff9b70",ORANGE:"#ffcf4e",YELLOW:"#ffff58",GREEN:"#58dd70",CYAN:"#51e2c9",MODERATE_BLUE:"#4fd7ff"},_i={fills:Object.values(Ni),strokes:Object.values(Oi)},Fi=class e extends Mi{static getDefaultColors(){return{fills:Ni,strokes:Oi}}static getWaterfallSeriesDefaultPositiveColors(){return{fill:Ni.BLUE,stroke:Oi.BLUE,label:{color:"white"}}}static getWaterfallSeriesDefaultNegativeColors(){return{fill:Ni.RED,stroke:Oi.RED,label:{color:"white"}}}static getWaterfallSeriesDefaultTotalColors(){return{fill:"#bbbbbb",stroke:"#eeeeee",label:{color:"white"}}}getTemplateParameters(){const t=super.getTemplateParameters();return t.properties.set(ni,e.getDefaultColors()),t.properties.set(si,e.getWaterfallSeriesDefaultPositiveColors()),t.properties.set(ri,e.getWaterfallSeriesDefaultNegativeColors()),t.properties.set(oi,e.getWaterfallSeriesDefaultTotalColors()),t.properties.set(ci,[Ni.BLUE,Ni.RED]),t.properties.set(ai,e.getWaterfallSeriesDefaultTotalColors().stroke),t.properties.set(ui,Oi.BLUE),t.properties.set(pi,Ni.BLUE),t}getPalette(){return _i}},Gi={BLUE:"#436ff4",PURPLE:"#9a7bff",MAGENTA:"#d165d2",PINK:"#f0598b",RED:"#f47348",ORANGE:"#f2a602",YELLOW:"#e9e201",GREEN:"#21b448",CYAN:"#00b9a2",MODERATE_BLUE:"#00aee4"},Vi={BLUE:"#2346c9",PURPLE:"#7653d4",MAGENTA:"#a73da9",PINK:"#c32d66",RED:"#c84b1c",ORANGE:"#c87f00",YELLOW:"#c1b900",GREEN:"#008c1c",CYAN:"#00927c",MODERATE_BLUE:"#0087bb"},Bi={fills:Object.values(Gi),strokes:Object.values(Vi)},Hi=class e extends bi{static getDefaultColors(){return{fills:Gi,strokes:Vi}}static getWaterfallSeriesDefaultPositiveColors(){return{fill:Gi.BLUE,stroke:Vi.BLUE,label:{color:Yt}}}static getWaterfallSeriesDefaultNegativeColors(){return{fill:Gi.RED,stroke:Vi.RED,label:{color:Yt}}}static getWaterfallSeriesDefaultTotalColors(){return{fill:"#bbbbbb",stroke:"#888888",label:{color:Yt}}}getTemplateParameters(){const t=super.getTemplateParameters();return t.properties.set(ni,e.getDefaultColors()),t.properties.set(si,e.getWaterfallSeriesDefaultPositiveColors()),t.properties.set(ri,e.getWaterfallSeriesDefaultNegativeColors()),t.properties.set(oi,e.getWaterfallSeriesDefaultTotalColors()),t.properties.set(ci,[Gi.BLUE,Gi.RED]),t.properties.set(ai,e.getWaterfallSeriesDefaultTotalColors().stroke),t.properties.set(ui,Vi.BLUE),t.properties.set(pi,Gi.BLUE),t}getPalette(){return Bi}},zi={BLUE:"#4472C4",ORANGE:"#ED7D31",GRAY:"#A5A5A5",YELLOW:"#FFC000",MODERATE_BLUE:"#5B9BD5",GREEN:"#70AD47",DARK_GRAY:"#7B7B7B",DARK_BLUE:"#264478",VERY_DARK_GRAY:"#636363",DARK_YELLOW:"#997300"},Ui={BLUE:"#6899ee",ORANGE:"#ffa55d",GRAY:"#cdcdcd",YELLOW:"#ffea53",MODERATE_BLUE:"#82c3ff",GREEN:"#96d56f",DARK_GRAY:"#a1a1a1",DARK_BLUE:"#47689f",VERY_DARK_GRAY:"#878787",DARK_YELLOW:"#c0993d"},Wi={fills:Object.values(zi),strokes:Object.values(Ui)},ji=class e extends Mi{static getDefaultColors(){return{fills:y(v({},zi),{RED:zi.ORANGE}),strokes:y(v({},Ui),{RED:Ui.ORANGE})}}static getWaterfallSeriesDefaultPositiveColors(){return{fill:zi.BLUE,stroke:Ui.BLUE,label:{color:"white"}}}static getWaterfallSeriesDefaultNegativeColors(){return{fill:zi.ORANGE,stroke:Ui.ORANGE,label:{color:"white"}}}static getWaterfallSeriesDefaultTotalColors(){return{fill:zi.GRAY,stroke:Ui.GRAY,label:{color:"white"}}}getTemplateParameters(){const t=super.getTemplateParameters();return t.properties.set(ni,e.getDefaultColors()),t.properties.set(si,e.getWaterfallSeriesDefaultPositiveColors()),t.properties.set(ri,e.getWaterfallSeriesDefaultNegativeColors()),t.properties.set(oi,e.getWaterfallSeriesDefaultTotalColors()),t.properties.set(ci,[zi.ORANGE,zi.YELLOW,zi.GREEN]),t.properties.set(ai,e.getWaterfallSeriesDefaultTotalColors().stroke),t.properties.set(ui,Ui.BLUE),t.properties.set(pi,zi.BLUE),t}getPalette(){return Wi}},Ki={BLUE:"#5281d5",ORANGE:"#ff8d44",GRAY:"#b5b5b5",YELLOW:"#ffd02f",MODERATE_BLUE:"#6aabe6",GREEN:"#7fbd57",DARK_GRAY:"#8a8a8a",DARK_BLUE:"#335287",VERY_DARK_GRAY:"#717171",DARK_YELLOW:"#a98220"},$i={BLUE:"#214d9b",ORANGE:"#c25600",GRAY:"#7f7f7f",YELLOW:"#d59800",MODERATE_BLUE:"#3575ac",GREEN:"#4b861a",DARK_GRAY:"#575757",DARK_BLUE:"#062253",VERY_DARK_GRAY:"#414141",DARK_YELLOW:"#734f00"},Yi={fills:Object.values(Ki),strokes:Object.values($i)},qi=class e extends bi{static getDefaultColors(){return{fills:y(v({},Ki),{RED:Ki.ORANGE}),strokes:y(v({},$i),{RED:$i.ORANGE})}}static getWaterfallSeriesDefaultPositiveColors(){return{fill:Ki.BLUE,stroke:$i.BLUE,label:{color:Yt}}}static getWaterfallSeriesDefaultNegativeColors(){return{fill:Ki.ORANGE,stroke:$i.ORANGE,label:{color:Yt}}}static getWaterfallSeriesDefaultTotalColors(){return{fill:Ki.GRAY,stroke:$i.GRAY,label:{color:Yt}}}getTemplateParameters(){const t=super.getTemplateParameters();return t.properties.set(ni,e.getDefaultColors()),t.properties.set(si,e.getWaterfallSeriesDefaultPositiveColors()),t.properties.set(ri,e.getWaterfallSeriesDefaultNegativeColors()),t.properties.set(oi,e.getWaterfallSeriesDefaultTotalColors()),t.properties.set(ci,[Ki.ORANGE,Ki.YELLOW,Ki.GREEN]),t.properties.set(ai,e.getWaterfallSeriesDefaultTotalColors().stroke),t.properties.set(ui,$i.BLUE),t.properties.set(pi,Ki.BLUE),t}getPalette(){return Yi}},Xi={BLUE:"#0083ff",ORANGE:"#ff6600",GREEN:"#00af00",CYAN:"#00ccff",YELLOW:"#f7c700",VIOLET:"#ac26ff",GRAY:"#a7a7b7",MAGENTA:"#e800c5",BROWN:"#b54300",RED:"#ff0000"},Zi={BLUE:"#67b7ff",ORANGE:"#ffc24d",GREEN:"#5cc86f",CYAN:"#54ebff",VIOLET:"#c18aff",YELLOW:"#fff653",GRAY:"#aeaeae",MAGENTA:"#f078d4",BROWN:"#ba8438",RED:"#ff726e"},Qi={fills:Object.values(Xi),strokes:Object.values(Zi)},Ji=class e extends Mi{static getDefaultColors(){return{fills:Xi,strokes:Zi}}static getWaterfallSeriesDefaultPositiveColors(){return{fill:Xi.BLUE,stroke:Zi.BLUE,label:{color:"white"}}}static getWaterfallSeriesDefaultNegativeColors(){return{fill:Xi.ORANGE,stroke:Zi.ORANGE,label:{color:"white"}}}static getWaterfallSeriesDefaultTotalColors(){return{fill:Xi.GRAY,stroke:Zi.GRAY,label:{color:"white"}}}getTemplateParameters(){const t=super.getTemplateParameters();return t.properties.set(ni,e.getDefaultColors()),t.properties.set(si,e.getWaterfallSeriesDefaultPositiveColors()),t.properties.set(ri,e.getWaterfallSeriesDefaultNegativeColors()),t.properties.set(oi,e.getWaterfallSeriesDefaultTotalColors()),t.properties.set(ci,[Xi.ORANGE,Xi.YELLOW,Xi.GREEN]),t.properties.set(ai,e.getWaterfallSeriesDefaultTotalColors().stroke),t.properties.set(ui,Zi.BLUE),t.properties.set(pi,Xi.BLUE),t}getPalette(){return Qi}},en={BLUE:"#0083ff",ORANGE:"#ff6600",GREEN:"#00af00",CYAN:"#00ccff",YELLOW:"#f7c700",VIOLET:"#ac26ff",GRAY:"#a7a7b7",MAGENTA:"#e800c5",BROWN:"#b54300",RED:"#ff0000"},tn={BLUE:"#0f68c0",ORANGE:"#d47100",GREEN:"#007922",CYAN:"#009ac2",VIOLET:"#bca400",YELLOW:"#753cac",GRAY:"#646464",MAGENTA:"#9b2685",BROWN:"#6c3b00",RED:"#cb0021"},nn={fills:Object.values(en),strokes:Object.values(tn)},sn=class e extends bi{static getDefaultColors(){return{fills:en,strokes:tn}}static getWaterfallSeriesDefaultPositiveColors(){return{fill:en.BLUE,stroke:tn.BLUE,label:{color:Yt}}}static getWaterfallSeriesDefaultNegativeColors(){return{fill:en.ORANGE,stroke:tn.ORANGE,label:{color:Yt}}}static getWaterfallSeriesDefaultTotalColors(){return{fill:en.GRAY,stroke:tn.GRAY,label:{color:Yt}}}getTemplateParameters(){const t=super.getTemplateParameters();return t.properties.set(ni,e.getDefaultColors()),t.properties.set(si,e.getWaterfallSeriesDefaultPositiveColors()),t.properties.set(ri,e.getWaterfallSeriesDefaultNegativeColors()),t.properties.set(oi,e.getWaterfallSeriesDefaultTotalColors()),t.properties.set(ci,[en.ORANGE,en.YELLOW,en.GREEN]),t.properties.set(ai,e.getWaterfallSeriesDefaultTotalColors().stroke),t.properties.set(ui,tn.BLUE),t.properties.set(pi,en.BLUE),t}getPalette(){return nn}},rn=()=>new bi,on=()=>new Mi,an={undefined:rn,null:rn,"ag-default":rn,"ag-sheets":()=>new qi,"ag-polychroma":()=>new Hi,"ag-vivid":()=>new sn,"ag-material":()=>new Pi},ln=v(v({},{undefined:on,null:on,"ag-default-dark":on,"ag-sheets-dark":()=>new ji,"ag-polychroma-dark":()=>new Fi,"ag-vivid-dark":()=>new Ji,"ag-material-dark":()=>new Ii}),an);function cn(e){let t=function(e){return void 0===e||"string"==typeof e||e instanceof bi?e:"object"==typeof e?function(e){if(null===e)return;let t=!0;const{baseTheme:i,palette:n,overrides:s}=e;if(void 0!==i&&"string"!=typeof i&&"object"!=typeof i&&(_.warn(`invalid theme.baseTheme type ${typeof i}, expected (string | object).`),t=!1),void 0!==s&&"object"!=typeof s&&(_.warn(`invalid theme.overrides type ${typeof s}, expected object.`),t=!1),"object"==typeof n){if(null!==n){const{fills:e,strokes:i}=n;void 0===e||Array.isArray(e)||(_.warn("theme.overrides.fills must be undefined or an array"),t=!1),void 0===i||Array.isArray(i)||(_.warn("theme.overrides.strokes must be undefined or an array"),t=!1)}}else void 0!==n&&(_.warn(`invalid theme.palette type ${typeof n}, expected object.`),t=!1);return t?e:void 0}(e):void _.warn(`invalid theme value type ${typeof e}, expected object or string.`)}(e);if(t instanceof bi)return t;if(null==t||"string"==typeof t){const e=ln[t];return e?e():(_.warnOnce(`the theme [${t}] is invalid, using [ag-default] instead.`),rn())}const i=[];let n;for(;"object"==typeof t;)i.push(t.overrides),null!=n||(n=t.palette),t=t.baseTheme;const s={baseTheme:t,overrides:Ze(...i),palette:n};return new((s.baseTheme?cn(s.baseTheme):rn()).constructor)(s)}function hn(e){if(0===e.length)return;let t=1/0,i=-1/0;for(let n of e)n instanceof Date&&(n=n.getTime()),"number"==typeof n&&(n<t&&(t=n),n>i&&(i=n));const n=[t,i];return n.every(isFinite)?n:void 0}function dn(e,t,i){return un(e,t,i).extent}function un(e,t,i){var n;let s=!1;return e.length>2&&(e=null!=(n=hn(e))?n:[NaN,NaN]),isNaN(t)||(s||(s=t>e[0]),e=[t,e[1]]),isNaN(i)||(s||(s=i<e[1]),e=[e[0],i]),e[0]>e[1]&&(e=[]),{extent:e,clipped:s}}function pn(e,t){if(null==e||null==t||e.length!==t.length)return!1;for(let i=0;i<e.length;i++)if(Array.isArray(e[i])&&Array.isArray(t[i])){if(!pn(e[i],t[i]))return!1}else if(e[i]!==t[i])return!1;return!0}function gn(e){return void 0===e?[]:Array.isArray(e)?e:[e]}function fn(e){return Array.from(new Set(e))}function mn(e,t){return e.reduce((e,i)=>{const n=t(i);return null!=e[n]||(e[n]=[]),e[n].push(i),e},{})}function vn(e,t,i=0){if(0===e.length)return[];const n=[];for(let s=0;s<t;s++)n.push(e.at((s+i)%e.length));return n}function yn(e,t){return t.reduce(([t,i],n)=>e(n)?[[...t,n],i]:[t,[...i,n]],[[],[]])}function*Cn(e,t){for(const i of e)yield t(i)}function bn(e,t){return!t.some(t=>!function(e,t){return function(e,t){return e.includes(t)}(e,t)}(e,t))}var Sn={},wn=new WeakMap;function xn(e){var t;return e?null==(t=Sn.document)?void 0:t[e]:Sn.document}function En(e){var t;return e?null==(t=Sn.window)?void 0:t[e]:Sn.window}function Mn(e,t,i){const n=xn().createElement(e);return"object"==typeof t&&(i=t,t=void 0),t&&n.classList.add(t),i&&Object.assign(n.style,i),n}function An(e,t){const{body:i}=xn(),n=Mn("a",{display:"none"});n.href=e,n.download=t,i.appendChild(n),n.click(),setTimeout(()=>i.removeChild(n))}function Tn(e,t){var i,n;const s=xn();if(t&&(null==(i=wn.get(s))?void 0:i.has(t)))return;const r=Mn("style");r.innerHTML=e,s.head.insertBefore(r,s.head.querySelector("style")),t&&!wn.has(s)?wn.set(s,new Set([t])):t&&(null==(n=wn.get(s))||n.add(t))}function Dn(e){Sn.document=e}function In(e){Sn.window=e}"undefined"!=typeof window?Sn.window=window:void 0!==i.g&&(Sn.window=i.g.window),"undefined"!=typeof document?Sn.document=document:void 0!==i.g&&(Sn.document=i.g.document);var Rn=Date.now(),Ln={create:(...e)=>Object.assign((...t)=>{Ln.check(...e)&&("function"==typeof t[0]&&(t=gn(t[0]())),(()=>{const e=Date.now()-Rn;if(e>2e3){const t=(Math.floor(e/100)/10).toFixed(1);_.log(`**** ${t}s since last log message ****`)}Rn=Date.now()})(),_.log(...t))},{check:()=>Ln.check(...e)}),check:(...e)=>(0===e.length&&e.push(!0),gn(En("agChartsDebug")).some(t=>e.includes(t)))},kn=new Set(["map-shape-background","map-line-background"]),Pn=class{constructor(e,t){var i,n;const s={shallow:["data"]},r=Et(e,s),o=this.optionsType(r);this.sanityCheckAndCleanup(r),this.userOptions=r,this.activeTheme=cn(r.theme),this.defaultAxes=this.getDefaultAxes(r),this.specialOverrides=this.specialOverridesDefaults(v({},t));const a=this.getSeriesThemeConfig(o),{axes:l={},annotations:c={},series:h}=a,d=C(a,["axes","annotations","series"]);this.processedOptions=Et(Ze(this.userOptions,d,this.defaultAxes),s),this.processAxesOptions(this.processedOptions,l),this.processSeriesOptions(this.processedOptions),this.processMiniChartSeriesOptions(this.processedOptions),this.processAnnotationsOptions(this.processedOptions,c),(gt(this.processedOptions)||function(e){const t=pt(e);return ft(e)&&"pie"!==t&&"donut"!==t}(this.processedOptions))&&null==(null==(i=this.processedOptions.legend)?void 0:i.enabled)&&(null!=(n=this.processedOptions).legend||(n.legend={}),this.processedOptions.legend.enabled=this.processedOptions.series.length>1),this.enableConfiguredOptions(this.processedOptions),we.isEnterprise||function(e){var t,i,n,s;const r=[],o=at.get(pt(e));for(const{type:a,chartTypes:l,optionsKey:c,optionsInnerKey:h,identifier:d}of ht)if("unknown"===o||l.includes(o))if("root"===a||"legend"===a){const t=e[c];if(null==t)continue;h?t[h]&&(r.push(`${c}.${h}`),delete t[h]):(r.push(c),delete e[c])}else if("axis"===a){if(!("axes"in e)||!(null==(t=e.axes)?void 0:t.some(e=>e.type===d)))continue;r.push(`axis[type=${d}]`),e.axes=e.axes.filter(e=>e.type!==d)}else if("axis-option"===a){if(!("axes"in e)||!(null==(i=e.axes)?void 0:i.some(e=>e[c])))continue;r.push(`axis.${c}`),e.axes.forEach(e=>{e[c]&&delete e[c]})}else if("series"===a){if(!(null==(n=e.series)?void 0:n.some(e=>e.type===d)))continue;r.push(`series[type=${d}]`),e.series=e.series.filter(e=>e.type!==d)}else if("series-option"===a){if(!(null==(s=e.series)?void 0:s.some(e=>e[c])))continue;r.push(`series.${c}`),e.series.forEach(e=>{e[c]&&delete e[c]})}if(r.length){let t="ag-charts-enterprise",i="https://charts.ag-grid.com/javascript/installation/";"integrated"===e.mode&&(t="ag-grid-charts-enterprise' or 'ag-grid-enterprise/charts-enterprise",i="https://www.ag-grid.com/javascript-data-grid/integrated-charts-installation/"),_.warnOnce([`unable to use these enterprise features as '${t}' has not been loaded:`,"",...r,"",`See: ${i}`].join("\n"))}}(this.processedOptions)}getOptions(){var e;return null!=(e=this.processedOptions)?e:{}}diffOptions(e){return xt(e,this.processedOptions)}getSeriesThemeConfig(e){var t,i;return Et(null!=(i=null==(t=this.activeTheme)?void 0:t.config[e])?i:{})}getDefaultAxes(e){const t=this.optionsType(e),i=Rt.cloneDefaultAxes(t);return Rt.isDefaultAxisSwapNeeded(e)&&this.swapAxesPosition(i),i}optionsType(e){var t,i,n;return null!=(n=null==(i=null==(t=e.series)?void 0:t[0])?void 0:i.type)?n:"line"}sanityCheckAndCleanup(e){var t;this.deprecationWarnings(e),this.axesTypeIntegrity(e),this.seriesTypeIntegrity(e),this.soloSeriesIntegrity(e),this.removeDisabledOptions(e),this.removeLeftoverSymbols(e),(null==(t=e.series)?void 0:t.some(e=>"bullet"===e.type))&&null!=e.sync&&!1!==e.sync.enabled&&(_.warnOnce("bullet series cannot be synced, disabling synchronization."),delete e.sync)}swapAxesPosition(e){var t;if(gt(e)){const[i,n]=null!=(t=e.axes)?t:[];e.axes=[y(v({},i),{position:n.position}),y(v({},n),{position:i.position})]}}processAxesOptions(e,t){"axes"in e&&(e.axes=e.axes.map(e=>{var i,n,s;const r=Ze(null==(i=t[e.type])?void 0:i[e.position],t[e.type]),{crossLines:o}=r,a=C(r,["crossLines"]);e.crossLines&&(e.crossLines=Qe(e.crossLines,o));const l=null==(n=a.gridLine)?void 0:n.style;(null==(s=e.gridLine)?void 0:s.style)&&(null==l?void 0:l.length)&&(e.gridLine.style=e.gridLine.style.map((e,t)=>null!=e.stroke||null!=e.lineDash?Ze(e,l.at(t%l.length)):e));const c=Ze(e,a),{top:h,right:d,bottom:u,left:p}=c;return C(c,["top","right","bottom","left"])}))}processSeriesOptions(e){const t=this.getDefaultSeriesType(e),i=this.getTooltipPositionDefaults(e),n=Boolean(Be(e.theme)&&e.theme.palette),s={colourIndex:0,userPalette:n},r=e.series.map(e=>{var r;null!=e.type||(e.type=t);const o=null!=(r=this.getSeriesThemeConfig(e.type).series)?r:{},{innerLabels:a}=o,l=C(o,["innerLabels"]),c=kn.has(e.type)?{colourIndex:0,userPalette:n}:s,h=this.getSeriesPalette(e.type,c),d=Ze(this.getSeriesGroupingOptions(e),e,i,l,h);return d.innerLabels&&(d.innerLabels=Qe(d.innerLabels,a)),this.activeTheme.templateTheme(d)});e.series=this.setSeriesGroupingOptions(r)}processMiniChartSeriesOptions(e){var t,i;let n=null==(i=null==(t=e.navigator)?void 0:t.miniChart)?void 0:i.series;if(null==n)return;const s={colourIndex:0,userPalette:Boolean(Be(e.theme)&&e.theme.palette)};n=n.map(e=>{var t;null!=e.type||(e.type="line");const i=null!=(t=this.getSeriesThemeConfig(e.type).series)?t:{},{innerLabels:n}=i,r=C(i,["innerLabels"]),o=Ze(this.getSeriesGroupingOptions(e),e,r,this.getSeriesPalette(e.type,s));return this.activeTheme.templateTheme(o)}),e.navigator.miniChart.series=this.setSeriesGroupingOptions(n)}processAnnotationsOptions(e,t){gt(e)}getSeriesPalette(e,t){const i=Rt.getPaletteFactory(e),{colourIndex:n,userPalette:s}=t,{fills:r=[],strokes:o=[]}=this.activeTheme.palette;return null==i?void 0:i({userPalette:s,colorsCount:Math.max(r.length,o.length),themeTemplateParameters:this.activeTheme.getTemplateParameters(),takeColors:e=>(t.colourIndex+=e,{fills:vn(r,e,n),strokes:vn(o,e,n)})})}getSeriesGroupingOptions(e){const t=Rt.isGroupable(e.type),i=Rt.isStackable(e.type),n=Rt.isStackedByDefault(e.type);e.grouped&&!t&&_.warnOnce(`unsupported grouping of series type "${e.type}".`),!e.stacked&&!e.stackGroup||i||_.warnOnce(`unsupported stacking of series type "${e.type}".`);let{grouped:s,stacked:r}=e;return null!=r||(r=(n||null!=e.stackGroup)&&!(t&&s)),null!=s||(s=!0),{stacked:i&&r,grouped:t&&s&&!(i&&r)}}setSeriesGroupingOptions(e){const t=this.getSeriesGrouping(e);Ln.create(!0,"opts")("setSeriesGroupingOptions() - series grouping: ",t);const i={},n=t.reduce((e,t)=>{var i;return"default"===t.groupType||(null!=e[i=t.seriesType]||(e[i]=0),e[t.seriesType]+="stack"===t.groupType?1:t.series.length),e},{});return t.flatMap(e=>{var t;switch(null!=i[t=e.seriesType]||(i[t]=0),e.groupType){case"stack":const t=i[e.seriesType]++;return e.series.map((i,s)=>Object.assign(i,{seriesGrouping:{groupIndex:t,groupCount:n[e.seriesType],stackIndex:s,stackCount:e.series.length}}));case"group":return e.series.map(t=>Object.assign(t,{seriesGrouping:{groupIndex:i[e.seriesType]++,groupCount:n[e.seriesType],stackIndex:0,stackCount:0}}))}return e.series}).map(e=>{var t=e,{stacked:i,grouped:n}=t;return C(t,["stacked","grouped"])})}getSeriesGroupId(e){var t;return[e.type,e.xKey,e.stacked?null!=(t=e.stackGroup)?t:"stacked":"grouped"].filter(Boolean).join("-")}getSeriesGrouping(e){const t=new Map;return e.reduce((e,i)=>{const n=i.type;if(i.stacked||i.grouped){const s=this.getSeriesGroupId(i);if(!t.has(s)){const r={groupType:i.stacked?"stack":"group",seriesType:n,series:[]};t.set(s,r),e.push(r)}t.get(s).series.push(i)}else e.push({groupType:"default",seriesType:n,series:[i]});return e},[])}getDefaultSeriesType(e){if(gt(e))return"line";if(ft(e))return"pie";if(mt(e))return"treemap";if(vt(e))return"map-shape";throw new Error("Invalid chart options type detected.")}getTooltipPositionDefaults(e){var t;const i=null==(t=e.tooltip)?void 0:t.position;if(!ze(i))return;const{type:n,xOffset:s,yOffset:r}=i,o={};return Ue(n)&&Ye(D,n)&&(o.type=n),je(s)&&(o.xOffset=s),je(r)&&(o.yOffset=r),{tooltip:{position:o}}}deprecationWarnings(e){Object.entries({yKeys:"yKey",yNames:"yName"}).forEach(([t,i])=>{var n;(null==(n=e.series)?void 0:n.some(e=>null!=e[t]))&&_.warnOnce(`Property [series.${t}] is deprecated, please use [series.${i}] and multiple series instead.`)})}axesTypeIntegrity(e){var t;if("axes"in e){const i=null!=(t=e.axes)?t:[];for(const{type:t}of i)if(!yt(t)){delete e.axes;const i=Array.from(Me.publicKeys()).join(", ");_.warnOnce(`unknown axis type: ${t}; expected one of: ${i}`)}}}seriesTypeIntegrity(e){var t;const i=null!=(t=e.series)?t:[];e.series=i.filter(({type:e})=>{if(null==e||null!=(t=e)&&at.has(t)||function(e){return ht.some(t=>"series"===t.type&&t.identifier===e)}(e))return!0;var t;_.warnOnce(`unknown series type: ${e}; expected one of: ${lt.seriesTypes.join(", ")}`)})}soloSeriesIntegrity(e){const t=e.series;if(t&&t.length>1&&t.some(e=>Rt.isSolo(e.type))){const i=this.optionsType(e);if(Rt.isSolo(i))_.warn(`series[0] of type '${i}' is incompatible with other series types. Only processing series[0]`),e.series=t.slice(0,1);else{const{solo:i,nonSolo:n}=mn(t,e=>Rt.isSolo(e.type)?"solo":"nonSolo"),s=fn(i.map(e=>e.type)).join(", ");_.warn(`Unable to mix these series types with the lead series type: ${s}`),e.series=n}}}enableConfiguredOptions(e){At(this.userOptions,(e,t)=>{t&&"enabled"in t&&!t._enabledFromTheme&&null==e.enabled&&(t.enabled=!0)},{skip:["data","theme"]},e),At(e,e=>{null!=e._enabledFromTheme&&delete e._enabledFromTheme},{skip:["data","theme"]})}removeDisabledOptions(e){At(e,e=>{"enabled"in e&&!1===e.enabled&&Object.keys(e).forEach(t=>{"enabled"!==t&&delete e[t]})},{skip:["data","theme"]})}removeLeftoverSymbols(e){At(e,e=>{if(e&&Be(e))for(const[t,i]of Object.entries(e))qe(i)&&delete e[t]},{skip:["data"]})}specialOverridesDefaults(e){if(null!=e.window?In(e.window):"undefined"!=typeof window?e.window=window:void 0!==i.g&&(e.window=i.g.window),null!=e.document?Dn(e.document):"undefined"!=typeof document?e.document=document:void 0!==i.g&&(e.document=i.g.document),null==e.window)throw new Error("AG Charts - unable to resolve global window");if(null==e.document)throw new Error("AG Charts - unable to resolve global document");return e}};function Nn(){return(e,t)=>{const i=[`Property [${e}] is deprecated.`,t].filter(Boolean).join(" ");_.warnOnce(i)}}function On(e,t){const i=Nn(),n=null==t?void 0:t.default;return Ie((t,s,r)=>(r!==n&&i(s.toString(),e),r))}function _n(e,t){const i=Nn();return Ie((n,s,r)=>(r!==n[e]&&(i(s.toString(),`Use [${e}] instead.`),nt(n,e,t?t(r):r)),Ae),(t,n)=>(i(n.toString(),`Use [${e}] instead.`),tt(t,e)))}var Fn={};b(Fn,{NODE_UPDATE_STATE_TO_PHASE_MAPPING:()=>Ls,fromToMotion:()=>ks,staticFromToMotion:()=>Ps});var Gn=new Map;function Vn(){Gn.clear()}function Bn(e){var t;const i=e.constructor,n=Object.hasOwn(i,"className")?i.className:i.name;if(!n)throw new Error(`The ${i} is missing the 'className' property.`);const s=(null!=(t=Gn.get(n))?t:0)+1;return Gn.set(n,s),`${n}-${s}`}var Hn="$interpolate",zn=e=>null!=e[Hn];function Un(e,t,i){return Math.min(i,Math.max(e,t))}function Wn(e,t){const[i,n]=jn(t);return Un(i,e,n)}function jn(e){return e.length?[Math.min(...e),Math.max(...e)]:[]}function Kn(e){const[t,i]=jn(e);return i-t}function $n(e,t,i=1e-10){return Math.abs(e-t)<i}function Yn(e){return-1===Math.sign(e)||Object.is(e,-0)}function qn(e,t=2){const i=f(10,t);return Math.round(e*i)/i}function Xn(e,t=2){const i=Math.floor(Math.log(Math.abs(e))/Math.LN10);return i>=0||!isFinite(i)?e.toFixed(t):e.toFixed(Math.abs(i)-1+t)}function Zn(e,t){return Math.floor(e%t+(e<0?t:0))}function Qn(e,t=10){const[,i=""]=(Math.abs(e)%1).toLocaleString("en-GB",{minimumFractionDigits:0,maximumFractionDigits:t}).split(".");return i.length}function Jn(e,t,i,n=1/0){const s={nearest:void 0,distanceSquared:n};for(const n of i){const i=n.distanceSquared(e,t);if(0===i)return{nearest:n,distanceSquared:0};i<s.distanceSquared&&(s.nearest=n,s.distanceSquared=i)}return s}function es(e,t,i,n=1/0){const{x:s,y:r}=i.transformPoint(e,t),o={nearest:void 0,distanceSquared:n};for(const e of i.children){const{nearest:t,distanceSquared:i}=e.nearestSquared(s,r,o.distanceSquared);if(0===i)return{nearest:t,distanceSquared:i};i<o.distanceSquared&&(o.nearest=t,o.distanceSquared=i)}return o}var ts=class e{constructor(e,t,i,n){this.x=e,this.y=t,this.width=i,this.height=n}clone(){const{x:t,y:i,width:n,height:s}=this;return new e(t,i,n,s)}equals(e){return this.x===e.x&&this.y===e.y&&this.width===e.width&&this.height===e.height}containsPoint(e,t){return e>=this.x&&e<=this.x+this.width&&t>=this.y&&t<=this.y+this.height}collidesBBox(e){return this.x<e.x+e.width&&this.x+this.width>e.x&&this.y<e.y+e.height&&this.y+this.height>e.y}computeCenter(){return{x:this.x+this.width/2,y:this.y+this.height/2}}isFinite(){return Number.isFinite(this.x)&&Number.isFinite(this.y)&&Number.isFinite(this.width)&&Number.isFinite(this.height)}distanceSquared(e,t){if(this.containsPoint(e,t))return 0;const i=e-Un(this.x,e,this.x+this.width),n=t-Un(this.y,t,this.y+this.height);return i*i+n*n}static nearestBox(e,t,i){return Jn(e,t,i)}clip(e){if(void 0===e)return this;const t=Math.max(this.x,e.x),i=Math.max(this.y,e.y),n=Math.min(this.x+this.width,e.x+e.width),s=Math.min(this.y+this.height,e.y+e.height);return this.x=t,this.y=i,this.width=Math.max(0,n-t),this.height=Math.max(0,s-i),this}shrink(e,t){const i=(e,t)=>{switch(e){case"top":this.y+=t;case"bottom":this.height-=t;break;case"left":this.x+=t;case"right":this.width-=t;break;case"vertical":this.y+=t,this.height-=2*t;break;case"horizontal":this.x+=t,this.width-=2*t;break;case void 0:this.x+=t,this.width-=2*t,this.y+=t,this.height-=2*t}};return"number"==typeof e?i(t,e):"object"==typeof e&&Object.entries(e).forEach(([e,t])=>i(e,t)),this}grow(e,t){if("number"==typeof e)this.shrink(-e,t);else{const t=v({},e);for(const e in t)t[e]*=-1;this.shrink(t)}return this}combine(e){const{x:t,y:i,width:n,height:s}=this;this.x=Math.min(t,e.x),this.y=Math.min(i,e.y),this.width=Math.max(t+n,e.x+e.width)-this.x,this.height=Math.max(i+s,e.y+e.height)-this.y}static merge(t){let i=1/0,n=1/0,s=-1/0,r=-1/0;for(const e of t)e.x<i&&(i=e.x),e.y<n&&(n=e.y),e.x+e.width>s&&(s=e.x+e.width),e.y+e.height>r&&(r=e.y+e.height);return new e(i,n,s-i,r-n)}[Hn](t,i){return new e(this.x*(1-i)+t.x*i,this.y*(1-i)+t.y*i,this.width*(1-i)+t.width*i,this.height*(1-i)+t.height*i)}};ts.zero=new ts(0,0,0,0),ts.NaN=new ts(NaN,NaN,NaN,NaN);var is=ts,ns=(e=>(e[e.NONE=0]="NONE",e[e.TRIVIAL=1]="TRIVIAL",e[e.MINOR=2]="MINOR",e[e.MAJOR=3]="MAJOR",e))(ns||{}),ss=function(){try{return new Function("return true"),!0}catch(e){return!1}}();function rs(e){const{changeCb:t,convertor:i}=null!=e?e:{};return function(n,s){const r=`__${s}`;n[s]||(ss&&null==t&&null==i?function(e,t,i,n){const{redraw:s=1,type:r="normal",checkDirtyOnAssignment:o=!1}=null!=n?n:{},a=new Function("value",`\n        const oldValue = this.${i};\n        if (value !== oldValue) {\n            this.${i} = value;\n            ${"normal"===r?`this.markDirty(this, ${s});`:""}\n            ${"transform"===r?`this.markDirtyTransform(${s});`:""}\n            ${"path"===r?`if (!this._dirtyPath) { this._dirtyPath = true; this.markDirty(this, ${s}); }`:""}\n            ${"font"===r?`if (!this._dirtyFont) { this._dirtyFont = true; this.markDirty(this, ${s}); }`:""}\n        }\n        ${o?"if (value != null && value._dirty > 0) { this.markDirty(value, value._dirty); }":""}\n`),l=new Function(`return this.${i};`);Object.defineProperty(e,t,{set:a,get:l,enumerable:!0,configurable:!0})}(n,s,r,e):function(e,t,i,n){const{redraw:s=1,type:r="normal",changeCb:o,convertor:a,checkDirtyOnAssignment:l=!1}=null!=n?n:{};Object.defineProperty(e,t,{set:function(e){const t=this[i];(e=a?a(e):e)!==t&&(this[i]=e,"normal"===r&&this.markDirty(this,s),"transform"===r&&this.markDirtyTransform(s),"path"!==r||this._dirtyPath||(this._dirtyPath=!0,this.markDirty(this,s)),"font"!==r||this._dirtyFont||(this._dirtyFont=!0,this.markDirty(this,s)),null==o||o(this)),l&&null!=e&&e._dirty>0&&this.markDirty(e,e._dirty)},get:function(){return this[i]},enumerable:!0,configurable:!0})}(n,s,r,e))}}var os=class{constructor(){this._dirty=3}markDirty(e,t=1){this._dirty<t&&(this._dirty=t)}markClean(e){this._dirty=0}isDirty(){return this._dirty>0}},as=class e{get e(){return[...this.elements]}constructor(e=[1,0,0,1,0,0]){this.elements=e}setElements(e){const t=this.elements;return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],this}get identity(){const e=this.elements;return 1===e[0]&&0===e[1]&&0===e[2]&&1===e[3]&&0===e[4]&&0===e[5]}AxB(e,t,i){const n=e[0]*t[0]+e[2]*t[1],s=e[1]*t[0]+e[3]*t[1],r=e[0]*t[2]+e[2]*t[3],o=e[1]*t[2]+e[3]*t[3],a=e[0]*t[4]+e[2]*t[5]+e[4],l=e[1]*t[4]+e[3]*t[5]+e[5];(i=null!=i?i:e)[0]=n,i[1]=s,i[2]=r,i[3]=o,i[4]=a,i[5]=l}multiplySelf(e){return this.AxB(this.elements,e.elements),this}multiply(t){const i=new Array(6);return this.AxB(this.elements,t.elements,i),new e(i)}preMultiplySelf(e){return this.AxB(e.elements,this.elements,this.elements),this}inverse(){const t=this.elements;let i=t[0],n=t[1],s=t[2],r=t[3];const o=t[4],a=t[5],l=1/(i*r-n*s);return i*=l,n*=l,s*=l,r*=l,new e([r,-n,-s,i,s*a-r*o,n*o-i*a])}inverseTo(e){const t=this.elements;let i=t[0],n=t[1],s=t[2],r=t[3];const o=t[4],a=t[5],l=1/(i*r-n*s);return i*=l,n*=l,s*=l,r*=l,e.setElements([r,-n,-s,i,s*a-r*o,n*o-i*a]),this}invertSelf(){const e=this.elements;let t=e[0],i=e[1],n=e[2],s=e[3];const r=e[4],o=e[5],a=1/(t*s-i*n);return t*=a,i*=a,n*=a,s*=a,e[0]=s,e[1]=-i,e[2]=-n,e[3]=t,e[4]=n*o-s*r,e[5]=i*r-t*o,this}transformPoint(e,t){const i=this.elements;return{x:e*i[0]+t*i[2]+i[4],y:e*i[1]+t*i[3]+i[5]}}transformBBox(e,t){const i=this.elements,n=i[0],s=i[1],r=i[2],o=i[3],a=.5*e.width,l=.5*e.height,c=e.x+a,h=e.y+l,d=Math.abs(a*n)+Math.abs(l*r),u=Math.abs(a*s)+Math.abs(l*o);return t||(t=new is(0,0,0,0)),t.x=c*n+h*r+i[4]-d,t.y=c*s+h*o+i[5]-u,t.width=d+d,t.height=u+u,t}toContext(e){if(this.identity)return;const t=this.elements;e.transform(t[0],t[1],t[2],t[3],t[4],t[5])}static flyweight(t){return e.instance.setElements(t.elements)}static updateTransformMatrix(e,t,i,n,s,r,o){const[a,l]=[0,0],c=t,h=i;let d,u;1===c&&1===h?(d=0,u=0):(d=null==(null==o?void 0:o.scalingCenterX)?a:null==o?void 0:o.scalingCenterX,u=null==(null==o?void 0:o.scalingCenterY)?l:null==o?void 0:o.scalingCenterY);const p=n,g=Math.cos(p),f=Math.sin(p);let m,v;0===p?(m=0,v=0):(m=null==(null==o?void 0:o.rotationCenterX)?a:null==o?void 0:o.rotationCenterX,v=null==(null==o?void 0:o.rotationCenterY)?l:null==o?void 0:o.rotationCenterY);const y=s,C=r,b=d*(1-c)-m,S=u*(1-h)-v;return e.setElements([g*c,f*c,-f*h,g*h,g*b-f*S+m+y,f*b+g*S+v+C]),e}static fromContext(t){const i=t.getTransform();return new e([i.a,i.b,i.c,i.d,i.e,i.f])}};as.instance=new as;var ls=as,cs=(e=>(e[e.All=0]="All",e[e.None=1]="None",e))(cs||{}),hs=class e extends os{constructor({isVirtual:t,tag:i,zIndex:n}={}){super(),this.serialNumber=e._nextSerialNumber++,this.id=Bn(this),this.isContainerNode=!1,this._virtualChildren=[],this._children=[],this.childSet={},this.matrix=new ls,this.dirtyTransform=!1,this.scalingX=1,this.scalingY=1,this.scalingCenterX=null,this.scalingCenterY=null,this.rotationCenterX=null,this.rotationCenterY=null,this.rotation=0,this.translationX=0,this.translationY=0,this._childNodeCounts={groups:0,nonGroups:0},this.visible=!0,this.dirtyZIndex=!1,this.zIndex=0,this.zIndexSubOrder=void 0,this.pointerEvents=0,this.isVirtual=null!=t&&t,this.tag=null!=i?i:NaN,this.zIndex=null!=n?n:0}get datum(){var e,t;return null!=(t=this._datum)?t:null==(e=this._parent)?void 0:e.datum}get previousDatum(){return this._previousDatum}set datum(e){this._datum!==e&&(this._previousDatum=this._datum),this._datum=e}_setLayerManager(e){this._layerManager=e,this._debug=null==e?void 0:e.debug;for(const t of this._children)t._setLayerManager(e);for(const t of this._virtualChildren)t._setLayerManager(e)}get layerManager(){return this._layerManager}*ancestors(){let e=this;for(;e=e.parent;)yield e}*traverseUp(){yield this,yield*M(this.ancestors())}get parent(){return this._parent}get children(){return this._virtualChildren.length?this._children.concat(this._virtualChildren.flatMap(e=>e.children)):this._children}get virtualChildren(){return this._virtualChildren}hasVirtualChildren(){return this._virtualChildren.length>0}setProperties(e,t){const i=null!=t?t:Object.keys(e);for(const t of i)this[t]=e[t];return this}append(e){Array.isArray(e)||(e=[e]);for(const t of e){if(t.parent)throw new Error(`${t} already belongs to another parent: ${t.parent}.`);if(t.layerManager)throw new Error(`${t} already belongs to a scene: ${t.layerManager}.`);if(this.childSet[t.id])throw new Error(`Duplicate ${t.constructor.name} node: ${t}`);t.isVirtual?this._virtualChildren.push(t):this._children.push(t),this.childSet[t.id]=!0,t._parent=this,t._setLayerManager(this.layerManager)}this.dirtyZIndex=!0,this.markDirty(this,3)}appendChild(e){return this.append(e),e}removeChild(e){const t=()=>{throw new Error("The node to be removed is not a child of this node.")};if(e.parent!==this&&t(),e.isVirtual){const i=this._virtualChildren.indexOf(e);i<0&&t(),this._virtualChildren.splice(i,1)}else{const i=this._children.indexOf(e);i<0&&t(),this._children.splice(i,1)}return delete this.childSet[e.id],e._parent=void 0,e._setLayerManager(),this.dirtyZIndex=!0,this.markDirty(e,3),e}calculateCumulativeMatrix(){this.computeTransformMatrix();const e=ls.flyweight(this.matrix);for(const t of this.ancestors())t.computeTransformMatrix(),e.preMultiplySelf(t.matrix);return e}transformPoint(e,t){return this.calculateCumulativeMatrix().invertSelf().transformPoint(e,t)}inverseTransformPoint(e,t){return this.calculateCumulativeMatrix().transformPoint(e,t)}transformBBox(e){return this.calculateCumulativeMatrix().invertSelf().transformBBox(e)}inverseTransformBBox(e){return this.calculateCumulativeMatrix().transformBBox(e)}markDirtyTransform(){this.dirtyTransform=!0,this.markDirty(this,3)}containsPoint(e,t){return!1}pickNode(e,t){var i;if(!this.visible||1===this.pointerEvents||!this.containsPoint(e,t))return;const{children:n}=this;if(n.length>1e3)for(let s=n.length-1;s>=0;s--){const r=n[s],o=(null==(i=r.computeTransformedBBox())?void 0:i.containsPoint(e,t))?r.pickNode(e,t):void 0;if(o)return o}else if(n.length)for(let i=n.length-1;i>=0;i--){const s=n[i].pickNode(e,t);if(s)return s}else if(!this.isContainerNode)return this}getCachedBBox(){var e;return null!=(e=this.cachedBBox)?e:is.zero}computeBBox(){}computeTransformedBBox(){const e=this.computeBBox();if(!e)return;this.computeTransformMatrix();const t=ls.flyweight(this.matrix);for(const e of this.ancestors())e.computeTransformMatrix(),t.preMultiplySelf(e.matrix);return t.transformBBox(e,e),e}computeTransformMatrix(){if(!this.dirtyTransform)return;const{matrix:e,scalingX:t,scalingY:i,rotation:n,translationX:s,translationY:r,scalingCenterX:o,scalingCenterY:a,rotationCenterX:l,rotationCenterY:c}=this;ls.updateTransformMatrix(e,t,i,n,s,r,{scalingCenterX:o,scalingCenterY:a,rotationCenterX:l,rotationCenterY:c}),this.dirtyTransform=!1}preRender(){this._childNodeCounts.groups=0,this._childNodeCounts.nonGroups=1;for(const e of this.children){const t=e.preRender();this._childNodeCounts.groups+=t.groups,this._childNodeCounts.nonGroups+=t.nonGroups}return this._childNodeCounts}render(e){const{stats:t}=e;this._dirty=0,this.cachedBBox=this.computeBBox(),t&&t.nodesRendered++}markDirty(e,t=1,i=t){this._dirty>t||this._dirty===t&&t===i||(this._dirty=t,this.parent?this.parent.markDirty(this,i):this.layerManager&&this.layerManager.markDirty())}get dirty(){return this._dirty}markClean(e){const{force:t=!1,recursive:i=!0}=null!=e?e:{};if(0!==this._dirty||t){if(this._dirty=0,!1!==i)for(const e of this._virtualChildren)e.markClean({force:t});if(!0===i)for(const e of this._children)e.markClean({force:t})}}onVisibleChange(){}get nodeCount(){let e=1,t=this._dirty>=0||this.dirtyTransform?1:0,i=this.visible?1:0;const n=n=>{const{count:s,visibleCount:r,dirtyCount:o}=n.nodeCount;e+=s,i+=r,t+=o};for(const e of this._children)n(e);for(const e of this._virtualChildren)n(e);return{count:e,visibleCount:i,dirtyCount:t}}onZIndexChange(){this.parent&&(this.parent.dirtyZIndex=!0)}};hs._nextSerialNumber=0,S([rs({type:"transform"})],hs.prototype,"scalingX",2),S([rs({type:"transform"})],hs.prototype,"scalingY",2),S([rs({type:"transform"})],hs.prototype,"scalingCenterX",2),S([rs({type:"transform"})],hs.prototype,"scalingCenterY",2),S([rs({type:"transform"})],hs.prototype,"rotationCenterX",2),S([rs({type:"transform"})],hs.prototype,"rotationCenterY",2),S([rs({type:"transform"})],hs.prototype,"rotation",2),S([rs({type:"transform"})],hs.prototype,"translationX",2),S([rs({type:"transform"})],hs.prototype,"translationY",2),S([rs({redraw:3,changeCb:e=>e.onVisibleChange()})],hs.prototype,"visible",2),S([rs({redraw:1,changeCb:e=>e.onZIndexChange()})],hs.prototype,"zIndex",2),S([rs({redraw:1,changeCb:e=>e.onZIndexChange()})],hs.prototype,"zIndexSubOrder",2);var ds=hs,us=e=>{const t=e<0?-1:1,i=Math.abs(e);return i<=.04045?e/12.92:t*f((i+.055)/1.055,2.4)},ps=e=>{const t=e<0?-1:1,i=Math.abs(e);return i>.0031308?t*(1.055*f(i,1/2.4)-.055):12.92*e},gs=class e{constructor(e,t,i,n=1){this.r=Un(0,e||0,1),this.g=Un(0,t||0,1),this.b=Un(0,i||0,1),this.a=Un(0,n||0,1)}static validColorString(t){return t.indexOf("#")>=0?!!e.parseHex(t):t.indexOf("rgb")>=0?!!e.stringToRgba(t):!!e.nameToHex[t.toLowerCase()]}static fromString(t){if(t.indexOf("#")>=0)return e.fromHexString(t);const i=e.nameToHex[t.toLowerCase()];if(i)return e.fromHexString(i);if(t.indexOf("rgb")>=0)return e.fromRgbaString(t);throw new Error(`Invalid color string: '${t}'`)}static tryParseFromString(t){try{return e.fromString(t)}catch(i){return _.warnOnce(`invalid color string: '${t}'.`),e.fromArray([0,0,0])}}static parseHex(e){let t;switch((e=e.replace(/ /g,"").slice(1)).length){case 6:case 8:t=[];for(let i=0;i<e.length;i+=2)t.push(parseInt(`${e[i]}${e[i+1]}`,16));break;case 3:case 4:t=e.split("").map(e=>parseInt(e,16)).map(e=>e+16*e)}if((null==t?void 0:t.length)>=3&&t.every(e=>e>=0))return 3===t.length&&t.push(255),t}static fromHexString(t){const i=e.parseHex(t);if(i){const[t,n,s,r]=i;return new e(t/255,n/255,s/255,r/255)}throw new Error(`Malformed hexadecimal color string: '${t}'`)}static stringToRgba(e){let[t,i]=[NaN,NaN];for(let n=0;n<e.length;n++){const s=e[n];if(t||"("!==s){if(")"===s){i=n;break}}else t=n}const n=t&&i&&e.substring(t+1,i);if(!n)return;const s=n.split(","),r=[];for(let e=0;e<s.length;e++){const t=s[e];let i=parseFloat(t);if(isNaN(i))return;t.indexOf("%")>=0?(i=Un(0,i,100),i/=100):3===e?i=Un(0,i,1):(i=Un(0,i,255),i/=255),r.push(i)}return r}static fromRgbaString(t){const i=e.stringToRgba(t);if(i){if(3===i.length)return new e(i[0],i[1],i[2]);if(4===i.length)return new e(i[0],i[1],i[2],i[3])}throw new Error(`Malformed rgb/rgba color string: '${t}'`)}static fromArray(t){if(4===t.length)return new e(t[0],t[1],t[2],t[3]);if(3===t.length)return new e(t[0],t[1],t[2]);throw new Error("The given array should contain 3 or 4 color components (numbers).")}static fromHSB(t,i,n,s=1){const r=e.HSBtoRGB(t,i,n);return new e(r[0],r[1],r[2],s)}static fromHSL(t,i,n,s=1){const r=e.HSLtoRGB(t,i,n);return new e(r[0],r[1],r[2],s)}static fromOKLCH(t,i,n,s=1){const r=e.OKLCHtoRGB(t,i,n);return new e(r[0],r[1],r[2],s)}static padHex(e){return 1===e.length?"0"+e:e}toHexString(){let t="#"+e.padHex(Math.round(255*this.r).toString(16))+e.padHex(Math.round(255*this.g).toString(16))+e.padHex(Math.round(255*this.b).toString(16));return this.a<1&&(t+=e.padHex(Math.round(255*this.a).toString(16))),t}toRgbaString(e=3){const t=[Math.round(255*this.r),Math.round(255*this.g),Math.round(255*this.b)],i=Math.pow(10,e);return 1!==this.a?(t.push(Math.round(this.a*i)/i),`rgba(${t.join(", ")})`):`rgb(${t.join(", ")})`}toString(){return 1===this.a?this.toHexString():this.toRgbaString()}toHSB(){return e.RGBtoHSB(this.r,this.g,this.b)}static RGBtoOKLCH(e,t,i){const n=us(e),s=us(t),r=us(i),o=Math.cbrt(.4122214708*n+.5363325363*s+.0514459929*r),a=Math.cbrt(.2119034982*n+.6806995451*s+.1073969566*r),l=Math.cbrt(.0883024619*n+.2817188376*s+.6299787005*r),c=.2104542553*o+.793617785*a-.0040720468*l,h=1.9779984951*o-2.428592205*a+.4505937099*l,d=.0259040371*o+.7827717662*a-.808675766*l,u=180*Math.atan2(d,h)/Math.PI;return[c,Math.hypot(h,d),u>=0?u:u+360]}static OKLCHtoRGB(e,t,i){const n=e,s=t*Math.cos(i*Math.PI/180),r=t*Math.sin(i*Math.PI/180),o=f(n+.3963377774*s+.2158037573*r,3),a=f(n-.1055613458*s-.0638541728*r,3),l=f(n-.0894841775*s-1.291485548*r,3),c=-1.2684380046*o+2.6097574011*a-.3413193965*l,h=-.0041960863*o-.7034186147*a+1.707614701*l;return[ps(4.0767416621*o-3.3077115913*a+.2309699292*l),ps(c),ps(h)]}static RGBtoHSL(e,t,i){const n=Math.min(e,t,i),s=Math.max(e,t,i),r=(s+n)/2;let o,a;if(s===n)o=NaN,a=0;else{const l=s-n;a=r>.5?l/(2-s-n):l/(s+n),o=s===e?(t-i)/l+(t<i?6:0):s===t?(i-e)/l+2:(e-t)/l+4,o*=60}return[o,a,r]}static HSLtoRGB(e,t,i){if(0===t)return[i,i,i];const n=i<.5?i*(1+t):i+t-i*t,s=2*i-n;function r(e){return e<0&&(e+=1),e>1&&(e-=1),e<1/6?s+6*(n-s)*e:e<.5?n:e<2/3?s+(n-s)*(2/3-e)*6:s}return[r(e/360+1/3),r(e/360),r(e/360-1/3)]}static RGBtoHSB(e,t,i){const n=Math.min(e,t,i),s=Math.max(e,t,i);let r=NaN;if(n!==s){const o=s-n,a=(s-e)/o,l=(s-t)/o,c=(s-i)/o;r=e===s?c-l:t===s?2+a-c:4+l-a,r/=6,r<0&&(r+=1)}return[360*r,0===s?0:(s-n)/s,s]}static HSBtoRGB(e,t,i){isNaN(e)&&(e=0),e=(e%360+360)%360/360;let n=0,s=0,r=0;if(0===t)n=s=r=i;else{const o=6*(e-Math.floor(e)),a=o-Math.floor(o),l=i*(1-t),c=i*(1-t*a),h=i*(1-t*(1-a));switch(0|o){case 0:n=i,s=h,r=l;break;case 1:n=c,s=i,r=l;break;case 2:n=l,s=i,r=h;break;case 3:n=l,s=c,r=i;break;case 4:n=h,s=l,r=i;break;case 5:n=i,s=l,r=c}}return[n,s,r]}derive(t,i,n,s){const r=e.RGBtoHSB(this.r,this.g,this.b);let o=r[2];0==o&&n>1&&(o=.05);const a=((r[0]+t)%360+360)%360,l=Un(0,r[1]*i,1);o=Un(0,o*n,1);const c=Un(0,this.a*s,1),h=e.HSBtoRGB(a,l,o);return h.push(c),e.fromArray(h)}brighter(){return this.derive(0,1,1/.7,1)}darker(){return this.derive(0,1,.7,1)}static interpolate(t,i){const n=e.tryParseFromString(t),s=e.tryParseFromString(i);return t=>{const i=(e,i)=>e*(1-t)+i*t;return new e(i(n.r,s.r),i(n.g,s.g),i(n.b,s.b),i(n.a,s.a)).toString()}}};gs.didDebug=!1,gs.nameToHex=Object.freeze({aliceblue:"#F0F8FF",antiquewhite:"#FAEBD7",aqua:"#00FFFF",aquamarine:"#7FFFD4",azure:"#F0FFFF",beige:"#F5F5DC",bisque:"#FFE4C4",black:"#000000",blanchedalmond:"#FFEBCD",blue:"#0000FF",blueviolet:"#8A2BE2",brown:"#A52A2A",burlywood:"#DEB887",cadetblue:"#5F9EA0",chartreuse:"#7FFF00",chocolate:"#D2691E",coral:"#FF7F50",cornflowerblue:"#6495ED",cornsilk:"#FFF8DC",crimson:"#DC143C",cyan:"#00FFFF",darkblue:"#00008B",darkcyan:"#008B8B",darkgoldenrod:"#B8860B",darkgray:"#A9A9A9",darkgreen:"#006400",darkgrey:"#A9A9A9",darkkhaki:"#BDB76B",darkmagenta:"#8B008B",darkolivegreen:"#556B2F",darkorange:"#FF8C00",darkorchid:"#9932CC",darkred:"#8B0000",darksalmon:"#E9967A",darkseagreen:"#8FBC8F",darkslateblue:"#483D8B",darkslategray:"#2F4F4F",darkslategrey:"#2F4F4F",darkturquoise:"#00CED1",darkviolet:"#9400D3",deeppink:"#FF1493",deepskyblue:"#00BFFF",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1E90FF",firebrick:"#B22222",floralwhite:"#FFFAF0",forestgreen:"#228B22",fuchsia:"#FF00FF",gainsboro:"#DCDCDC",ghostwhite:"#F8F8FF",gold:"#FFD700",goldenrod:"#DAA520",gray:"#808080",green:"#008000",greenyellow:"#ADFF2F",grey:"#808080",honeydew:"#F0FFF0",hotpink:"#FF69B4",indianred:"#CD5C5C",indigo:"#4B0082",ivory:"#FFFFF0",khaki:"#F0E68C",lavender:"#E6E6FA",lavenderblush:"#FFF0F5",lawngreen:"#7CFC00",lemonchiffon:"#FFFACD",lightblue:"#ADD8E6",lightcoral:"#F08080",lightcyan:"#E0FFFF",lightgoldenrodyellow:"#FAFAD2",lightgray:"#D3D3D3",lightgreen:"#90EE90",lightgrey:"#D3D3D3",lightpink:"#FFB6C1",lightsalmon:"#FFA07A",lightseagreen:"#20B2AA",lightskyblue:"#87CEFA",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#B0C4DE",lightyellow:"#FFFFE0",lime:"#00FF00",limegreen:"#32CD32",linen:"#FAF0E6",magenta:"#FF00FF",maroon:"#800000",mediumaquamarine:"#66CDAA",mediumblue:"#0000CD",mediumorchid:"#BA55D3",mediumpurple:"#9370DB",mediumseagreen:"#3CB371",mediumslateblue:"#7B68EE",mediumspringgreen:"#00FA9A",mediumturquoise:"#48D1CC",mediumvioletred:"#C71585",midnightblue:"#191970",mintcream:"#F5FFFA",mistyrose:"#FFE4E1",moccasin:"#FFE4B5",navajowhite:"#FFDEAD",navy:"#000080",oldlace:"#FDF5E6",olive:"#808000",olivedrab:"#6B8E23",orange:"#FFA500",orangered:"#FF4500",orchid:"#DA70D6",palegoldenrod:"#EEE8AA",palegreen:"#98FB98",paleturquoise:"#AFEEEE",palevioletred:"#DB7093",papayawhip:"#FFEFD5",peachpuff:"#FFDAB9",peru:"#CD853F",pink:"#FFC0CB",plum:"#DDA0DD",powderblue:"#B0E0E6",purple:"#800080",rebeccapurple:"#663399",red:"#FF0000",rosybrown:"#BC8F8F",royalblue:"#4169E1",saddlebrown:"#8B4513",salmon:"#FA8072",sandybrown:"#F4A460",seagreen:"#2E8B57",seashell:"#FFF5EE",sienna:"#A0522D",silver:"#C0C0C0",skyblue:"#87CEEB",slateblue:"#6A5ACD",slategray:"#708090",slategrey:"#708090",snow:"#FFFAFA",springgreen:"#00FF7F",steelblue:"#4682B4",tan:"#D2B48C",teal:"#008080",thistle:"#D8BFD8",tomato:"#FF6347",transparent:"#00000000",turquoise:"#40E0D0",violet:"#EE82EE",wheat:"#F5DEB3",white:"#FFFFFF",whitesmoke:"#F5F5F5",yellow:"#FFFF00",yellowgreen:"#9ACD32"});var fs=gs;function ms(e,t){return i=>Number(e)*(1-i)+Number(t)*i}var vs={};b(vs,{easeIn:()=>Cs,easeInOut:()=>Ss,easeInOutQuad:()=>Es,easeInQuad:()=>ws,easeOut:()=>bs,easeOutQuad:()=>xs,inverseEaseOut:()=>Ms,linear:()=>ys});var ys=e=>e,Cs=e=>1-Math.cos(e*Math.PI/2),bs=e=>Math.sin(e*Math.PI/2),Ss=e=>-(Math.cos(e*Math.PI)-1)/2,ws=e=>e*e,xs=e=>1-f(1-e,2),Es=e=>e<.5?2*e*e:1-f(-2*e+2,2)/2,Ms=e=>2*Math.asin(e)/Math.PI,As=["initial","remove","update","add","trailing","end","none"],Ts={initial:{animationDuration:1,animationDelay:0},add:{animationDuration:.25,animationDelay:.75},remove:{animationDuration:.25,animationDelay:0},update:{animationDuration:.5,animationDelay:.25},trailing:{animationDuration:.2,animationDelay:1,skipIfNoEarlierAnimations:!0},end:{animationDelay:1.2,animationDuration:0,skipIfNoEarlierAnimations:!0},none:{animationDuration:0,animationDelay:0}},Ds=(e=>(e.Loop="loop",e.Reverse="reverse",e))(Ds||{});function Is(e){return e.every(e=>e instanceof ds)?{nodes:e,selections:[]}:{nodes:[],selections:e}}var Rs=class{constructor(e){var t,i,n,s,r,o,a;this.isComplete=!1,this.elapsed=0,this.iteration=0,this.isPlaying=!1,this.isReverse=!1,this.id=e.id,this.groupId=e.groupId,this.autoplay=null==(t=e.autoplay)||t,this.ease=null!=(i=e.ease)?i:ys,this.phase=e.phase;const l=null!=(n=e.duration)?n:Ts[this.phase].animationDuration;this.duration=l*e.defaultDuration,this.delay=(null!=(s=e.delay)?s:0)*e.defaultDuration,this.onComplete=e.onComplete,this.onPlay=e.onPlay,this.onStop=e.onStop,this.onUpdate=e.onUpdate,this.interpolate=this.createInterpolator(e.from,e.to),this.from=e.from,!0===e.skip&&(null==(r=this.onUpdate)||r.call(this,e.to,!1,this),null==(o=this.onStop)||o.call(this,this),null==(a=this.onComplete)||a.call(this,this),this.isComplete=!0),!1!==e.collapsable&&(this.duration=this.checkCollapse(e,this.duration))}checkCollapse(e,t){return e.from===e.to?0:"object"==typeof e.from&&xt(e.from,e.to)?t:0}play(e=!1){var t,i;this.isPlaying||this.isComplete||(this.isPlaying=!0,null==(t=this.onPlay)||t.call(this,this),this.autoplay&&(this.autoplay=!1,e&&(null==(i=this.onUpdate)||i.call(this,this.from,!0,this))))}pause(){this.isPlaying=!1}stop(){var e;this.isPlaying=!1,this.isComplete||(this.isComplete=!0,null==(e=this.onStop)||e.call(this,this))}update(e){var t,i;if(this.isComplete)return e;!this.isPlaying&&this.autoplay&&this.play(!0);const n=this.elapsed;if(this.elapsed+=e,this.delay>this.elapsed)return 0;const s=this.interpolate(this.isReverse?1-this.delta:this.delta);null==(t=this.onUpdate)||t.call(this,s,!1,this);const r=this.delay+this.duration;return this.elapsed>=r?(this.stop(),this.isComplete=!0,null==(i=this.onComplete)||i.call(this,this),e-(r-n)):0}get delta(){return this.ease(Un(0,(this.elapsed-this.delay)/this.duration,1))}createInterpolator(e,t){if("object"!=typeof t||zn(t))return this.interpolateValue(e,t);const i=[];for(const n in t){const s=this.interpolateValue(e[n],t[n]);null!=s&&i.push([n,s])}return e=>{const t={};for(const[n,s]of i)t[n]=s(e);return t}}interpolateValue(e,t){if(void 0!==e&&void 0!==t){if(zn(e))return i=>e[Hn](t,i);try{switch(typeof e){case"number":return ms(e,t);case"string":return function(e,t){if("string"==typeof e)try{e=fs.fromString(e)}catch(t){e=fs.fromArray([0,0,0])}if("string"==typeof t)try{t=fs.fromString(t)}catch(e){t=fs.fromArray([0,0,0])}const i=ms(e.r,t.r),n=ms(e.g,t.g),s=ms(e.b,t.b),r=ms(e.a,t.a);return e=>fs.fromArray([i(e),n(e),s(e),r(e)]).toRgbaString()}(e,t);case"boolean":if(e===t)return()=>e}}catch(e){}throw new Error(`Unable to interpolate values: ${e}, ${t}`)}}},Ls={added:"add",updated:"update",removed:"remove",unknown:"initial","no-op":"none"};function ks(e,t,i,n,s,r,o){const{fromFn:a,toFn:l,intermediateFn:c}=s,{nodes:h,selections:d}=Is(n),u=(n,s)=>{var h;let d,u=0,p=0;for(const g of s){const f=n[u]===g,m={last:p>=s.length-1,lastLive:u>=n.length-1,prev:s[p-1],prevFromProps:d,prevLive:n[u-1],next:s[p+1],nextLive:n[u+(f?1:0)]},y=`${e}_${t}_${g.id}`;i.stopByAnimationId(y);let b="unknown";f?r&&o&&(b=Ns(g,g.datum,r,o)):b="removed";const S=a(g,g.datum,b,m),{phase:w,start:x,finish:E,delay:M,duration:A}=S,T=C(S,["phase","start","finish","delay","duration"]),D=l(g,g.datum,b,m),{phase:I,start:R,finish:L,delay:k,duration:P}=D,N=C(D,["phase","start","finish","delay","duration"]),O=null==E&&null==L;i.animate({id:y,groupId:e,phase:null!=(h=null!=w?w:I)?h:"update",duration:null!=A?A:P,delay:null!=M?M:k,from:T,to:N,ease:bs,collapsable:O,onPlay:()=>{g.setProperties(v(v({},x),R))},onUpdate(e){g.setProperties(e),c&&g.setProperties(c(g,g.datum,b,m))},onStop:()=>{g.setProperties(v(v(v(v(v(v({},x),R),T),N),E),L))}}),f&&u++,p++,d=T}};let p=0;for(const n of d){const s=n.nodes();u(s.filter(e=>!n.isGarbage(e)),s),i.animate({id:`${e}_${t}_selection_${p}`,groupId:e,phase:"end",from:0,to:1,ease:bs,onStop(){n.cleanup()}}),p++}u(h,h)}function Ps(e,t,i,n,s,r,o){const{nodes:a,selections:l}=Is(n),{start:c,finish:h,phase:d}=o,u=null==h;i.animate({id:`${e}_${t}`,groupId:e,phase:null!=d?d:"update",from:s,to:r,ease:bs,collapsable:u,onPlay:()=>{if(c){for(const e of a)e.setProperties(c);for(const e of l)for(const t of e.nodes())t.setProperties(c)}},onUpdate(e){for(const t of a)t.setProperties(e);for(const t of l)for(const i of t.nodes())i.setProperties(e)},onStop:()=>{for(const e of a)e.setProperties(v(v({},r),h));for(const e of l)for(const t of e.nodes())t.setProperties(v(v({},r),h))}})}function Ns(e,t,i,n){const s=i(e,t);return n.added.has(s)?"added":n.removed.has(s)?"removed":"updated"}var Os=2*Math.PI;function _s(e){return e%=Os,(e+=Os)%Os}function Fs(e){return e%=Os,(e+=Os)!==Os&&(e%=Os),e}function Gs(e){return(e%=Os)<-Math.PI?e+=Os:e>=Math.PI&&(e-=Os),e}function Vs(e,t,i){const n=_s(e),s=_s(t),r=Fs(i);return s<=r?s<=n&&n<=r:s<=n||n<=r}function Bs(e){return e/180*Math.PI}function Hs(e){return e/Math.PI*180}function zs(e,t){return e=_s(e),(t=_s(t))-e+(e>t?2*Math.PI:0)}function Us(e,t,i,n){return{x:e+i*Math.cos(n),y:t+i*Math.sin(n)}}var Ws=(e,t)=>{const i=Symbol(String(t));e[i]=void 0,Object.defineProperty(e,t,{get(){return this[i]},set(e){this[i]!==e&&(this[i]=e,this.invalid=!0)},enumerable:!0,configurable:!1})},js=class e{constructor(){this.type="band",this.invalid=!0,this.interval=void 0,this.index=new Map,this.ordinalRange=[],this._domain=[],this.range=[0,1],this._bandwidth=1,this._step=1,this._rawBandwidth=1,this._paddingInner=0,this._paddingOuter=0,this.round=!1}static is(t){return t instanceof e}refresh(){this.invalid&&(this.invalid=!1,this.update(),this.invalid&&_.warnOnce("Expected update to not invalidate scale"))}set domain(e){this.invalid=!0;const t=[];this.index=new Map;const i=this.index;e.forEach(e=>{void 0===this.getIndex(e)&&i.set(e,t.push(e)-1)}),this._domain=t}get domain(){return this._domain}ticks(){this.refresh();let{interval:e=1}=this;"number"!=typeof e&&(e=Number(e));const t=Math.abs(Math.round(e));return this._domain.filter((e,i)=>i%t===0)}convert(e){this.refresh();const t=this.getIndex(e);if(void 0===t)return NaN;const i=this.ordinalRange[t];return void 0===i?NaN:i}invert(e){this.refresh();const t=this.ordinalRange.findIndex(t=>t===e);return this.domain[t]}invertNearest(e){var t;this.refresh();let i=-1,n=1/0;const s=this.ordinalRange.findIndex((t,s)=>{if(t===e)return!0;const r=Math.abs(e-t);return r<n&&(n=r,i=s),!1});return null!=(t=this.domain[s])?t:this.domain[i]}get bandwidth(){return this.refresh(),this._bandwidth}get step(){return this.refresh(),this._step}get rawBandwidth(){return this.refresh(),this._rawBandwidth}set padding(e){e=Un(0,e,1),this._paddingInner=e,this._paddingOuter=e}get padding(){return this._paddingInner}set paddingInner(e){this._paddingInner=Un(0,e,1)}get paddingInner(){return this._paddingInner}set paddingOuter(e){this._paddingOuter=Un(0,e,1)}get paddingOuter(){return this._paddingOuter}update(){const e=this._domain.length;if(0===e)return;const t=this.round,i=this._paddingInner,n=this._paddingOuter,[s,r]=this.range,o=r-s,a=o/Math.max(1,e+2*n-i),l=t?Math.floor(a):a,c=s+(o-l*(e-i))/2,h=t?Math.round(c):c,d=l*(1-i),u=t?Math.round(d):d,p=a*(1-i),g=[];for(let t=0;t<e;t++)g.push(h+l*t);this._bandwidth=u,this._rawBandwidth=p,this._step=l,this.ordinalRange=g}getIndex(e){if(!(e instanceof Date))return this.index.get(e);const t=e.valueOf();let i=0;for(const e of this.index.keys()){if(e instanceof Date&&e.valueOf()===t)return i;i++}}};S([Ws],js.prototype,"interval",2),S([Ws],js.prototype,"range",2),S([Ws],js.prototype,"round",2);var Ks=js;function $s(e,t=[void 0]){return Ie((i,n,s)=>t.includes(s)?Ve(e)?e(s):e:s)}function Ys(e,t={}){const{optional:i=!1,property:n}=t;return Ie((s,r,o)=>{var a;const l=y(v({},t),{target:s,property:r});if(i&&void 0===o||e(o,l))return St(s[r])&&!St(o)?(s[r].set(o),s[r]):o;const c=null!=n?n:String(r).replace(/^_*/,""),h=null!=(a=s.constructor.className)?a:s.constructor.name.replace(/Properties$/,"");let d=Wr(o);if(null!=d&&d.length>50){const e=d.length-50;d=d.slice(0,50)+`... (+${e} characters)`}return _.warn(`Property [${c}] of [${h}] cannot be set to [${d}]${e.message?`; expecting ${zr(e,l)}`:""}, ignoring.`),Ae},void 0,{optional:i})}var qs,Xs=(...e)=>{const t=[];return Hr((i,n)=>(t.length=0,e.every(e=>{const s=e(i,n);return s||t.push(zr(e,n)),s})),()=>t.filter(Boolean).join(" AND "))},Zs=(...e)=>Hr((t,i)=>e.some(e=>e(t,i)),t=>e.map(function(e){return t=>zr(t,e)}(t)).filter(Boolean).join(" OR ")),Qs=Ur(Hr((e,t)=>St(e)||Be(e)&&St(t.target[t.property]),"a properties object")),Js=Ur(Hr(e=>Be(e),"an object")),er=Hr(Oe,"a boolean"),tr=Hr(Ve,"a function"),ir=Hr(Ue,"a string"),nr=(qs=Hr(je,"a number"),Object.assign(qs,{restrict({min:e,max:t}={}){const i=["a number"],n=We(e),s=We(t);return n&&s?i.push(`between ${e} and ${t} inclusive`):n?i.push(`greater than or equal to ${e}`):s&&i.push(`less than or equal to ${t}`),Hr(i=>je(i)&&(!n||i>=e)&&(!s||i<=t),i.join(" "))}})),sr=Hr(e=>We(e)&&isNaN(e),"NaN"),rr=nr.restrict({min:0}),or=nr.restrict({min:0,max:1}),ar=nr.restrict({min:-360,max:360}),lr=Zs(nr,sr),cr=function(e){return Object.assign(e,{restrict({length:e,minLength:t}={}){let i="an array";return We(t)&&t>0?i="a non-empty array":We(e)&&(i=`an array of length ${e}`),Hr(i=>Ne(i)&&(!We(e)||i.length===e)&&(!We(t)||i.length>=t),i)}})}(Hr(Ne,"an array")),hr=(e,t)=>Hr((t,i)=>Ne(t)&&t.every(t=>e(t,i)),e=>{var i;const n=null!=(i=zr(cr,e))?i:"";return t?`${n} of ${t}`:n}),dr=e=>je(e)||Fe(e),ur=e=>Hr((t,i)=>!dr(t)||!dr(i.target[e])||t<i.target[e],`to be less than ${e}`),pr=e=>Hr((t,i)=>!dr(t)||!dr(i.target[e])||t>i.target[e],`to be greater than ${e}`),gr=Hr(Fe,"Date object"),fr=Zs(gr,rr),mr="A color string can be in one of the following formats to be valid: #rgb, #rrggbb, rgb(r, g, b), rgba(r, g, b, a) or a CSS color name such as 'white', 'orange', 'cyan', etc",vr=Hr(e=>Ue(e)&&fs.validColorString(e),`color String. ${mr}`),yr=Hr(hr(vr),`color strings. ${mr}`),Cr=hr(er,"boolean values"),br=hr(nr,"numbers"),Sr=hr(ir,"strings"),wr=Hr(hr(gr),"Date objects"),xr=Hr(hr(Qs),"objects"),Er=Gr(["butt","round","square"],"a line cap"),Mr=Gr(["round","bevel","miter"],"a line join"),Ar=Hr(hr(rr),"numbers specifying the length in pixels of alternating dashes and gaps, for example, [6, 3] means dashes with a length of 6 pixels with gaps between of 3 pixels."),Tr=Gr(["top","right","bottom","left"],"a position"),Dr=Gr(["normal","italic","oblique"],"a font style"),Ir=Zs(Gr(["normal","bold","bolder","lighter"],"a font weight"),nr.restrict({min:1,max:1e3})),Rr=Gr(["never","always","hyphenate","on-space"],"a text wrap strategy"),Lr=Gr(["left","center","right"],"a text align"),kr=Gr(["top","middle","bottom"],"a vertical align"),Pr=Gr(["ellipsis","hide"],"an overflow strategy"),Nr=Gr(["horizontal","vertical"],"a direction"),Or=Gr(["inside","outside"],"a placement"),_r=Zs(Gr(["exact","nearest"],"interaction range"),nr),Fr=Gr(["top","bottom","left","right"]);function Gr(e,t="a"){return Hr(t=>e.includes(t),`${t} keyword such as ${function(e){const t=e.map(e=>`'${e}'`);if(1===t.length)return t[0];const i=t.pop();return`${t.join(", ")} or ${i}`}(e)}`)}var Vr=Zs(Xs(nr.restrict({min:1}),ur("maxSpacing")),sr),Br=Zs(Xs(nr.restrict({min:1}),pr("minSpacing")),sr);function Hr(e,t){return e.message=t,e}function zr(e,t){return Ve(e.message)?e.message(t):e.message}function Ur(e){return Object.assign(e,{restrict:t=>Hr(e=>e instanceof t,i=>{var n;return null!=(n=zr(e,i))?n:`an instance of ${t.name}`})})}function Wr(e){if("number"==typeof e){if(isNaN(e))return"NaN";if(e===1/0)return"Infinity";if(e===-1/0)return"-Infinity"}return JSON.stringify(e)}var jr=Hr(e=>je(e)&&e>0||e instanceof F,"a non-zero positive Number value or, for a time axis, a Time Interval such as 'agCharts.time.month'"),Kr=class extends Ct{constructor(){super(...arguments),this.enabled=!0,this.width=1,this.size=6,this.color=void 0,this.interval=void 0,this.values=void 0}};S([Ys(er)],Kr.prototype,"enabled",2),S([Ys(rr)],Kr.prototype,"width",2),S([Ys(rr)],Kr.prototype,"size",2),S([Ys(vr,{optional:!0})],Kr.prototype,"color",2),S([Ys(jr,{optional:!0})],Kr.prototype,"interval",2),S([Ys(cr,{optional:!0})],Kr.prototype,"values",2);var $r=(e=>(e.X="x",e.Y="y",e))($r||{}),Yr={constructedArrays:new WeakMap};function qr(e,t){var i;null==(i=Yr.constructedArrays)||i.set(e,t)}var Xr=class e{constructor(t,i){this.invalid=!0,this.nice=!1,this.interval=void 0,this.tickCount=e.defaultTickCount,this.minTickCount=0,this.maxTickCount=1/0,this.niceDomain=[],this.defaultClampMode="raw",this.domain=t,this.range=i}static is(t){return t instanceof e}transform(e){return e}transformInvert(e){return e}calcBandwidth(e=1){const{range:t}=this,i=this.getDomain(),n=Math.abs(t[1]-t[0]),s=Math.abs(i[1]-i[0])/e+1,r=Math.floor(n),o=Math.min(s,r);return n/Math.max(1,o)}getDomain(){return this.nice&&(this.refresh(),this.niceDomain.length)?this.niceDomain:this.domain}convert(e,t){var i;const n=null!=(i=null==t?void 0:t.clampMode)?i:this.defaultClampMode;if(!this.domain||this.domain.length<2)return NaN;this.refresh();const s=this.getDomain().map(e=>this.transform(e)),[r,o]=s,{range:a}=this,[l,c]=a;if(e=this.transform(e),"clamped"===n){const[t,i]=jn(s.map(Number));if(Number(e)<t)return l;if(Number(e)>i)return c}return r===o?(l+c)/2:e===r?l:e===o?c:l+(Number(e)-Number(r))/(Number(o)-Number(r))*(c-l)}invert(e){this.refresh();const t=this.getDomain().map(e=>this.transform(e)),[i,n]=t,{range:s}=this,[r,o]=s,a=r>o;let l;return e<(a?o:r)?a?n:i:e>(a?r:o)?a?i:n:(l=r===o?this.toDomain((Number(i)+Number(n))/2):this.toDomain(Number(i)+(e-r)/(o-r)*(Number(n)-Number(i))),this.transformInvert(l))}refresh(){this.invalid&&(this.invalid=!1,this.update(),this.invalid&&_.warnOnce("Expected update to not invalidate scale"))}getPixelRange(){const[e,t]=this.range;return Math.abs(t-e)}};Xr.defaultTickCount=5,Xr.defaultMaxTickCount=6,S([Ws],Xr.prototype,"domain",2),S([Ws],Xr.prototype,"range",2),S([Ws],Xr.prototype,"nice",2),S([Ws],Xr.prototype,"interval",2),S([Ws],Xr.prototype,"tickCount",2),S([Ws],Xr.prototype,"minTickCount",2),S([Ws],Xr.prototype,"maxTickCount",2);var Zr=Xr,Qr={periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]};function Jr(e,t=new Date(e.getFullYear(),0,1)){const i=e.getTimezoneOffset()-t.getTimezoneOffset(),n=e.getTime()-t.getTime()+6e4*i;return Math.floor(n/864e5)}function eo(e,t){const i=(t-new Date(e.getFullYear(),0,1).getDay()+7)%7,n=new Date(e.getFullYear(),0,i+1);return n<=e?Math.floor(Jr(e,n)/7)+1:0}function to(e,t=e.getFullYear()){const i=new Date(t,0,1).getDay(),n=new Date(t,0,(4-i+7)%7-3+1);return n<=e?Math.floor(Jr(e,n)/7)+1:to(e,t-1)}var io={a:e=>Qr.shortDays[e.getDay()],A:e=>Qr.days[e.getDay()],b:e=>Qr.shortMonths[e.getMonth()],B:e=>Qr.months[e.getMonth()],c:"%x, %X",d:(e,t)=>so(e.getDate(),2,null!=t?t:"0"),e:"%_d",f:(e,t)=>so(1e3*e.getMilliseconds(),6,null!=t?t:"0"),H:(e,t)=>so(e.getHours(),2,null!=t?t:"0"),I:(e,t)=>{const i=e.getHours()%12;return 0===i?"12":so(i,2,null!=t?t:"0")},j:(e,t)=>so(Jr(e)+1,3,null!=t?t:"0"),m:(e,t)=>so(e.getMonth()+1,2,null!=t?t:"0"),M:(e,t)=>so(e.getMinutes(),2,null!=t?t:"0"),L:(e,t)=>so(e.getMilliseconds(),3,null!=t?t:"0"),p:e=>e.getHours()<12?"AM":"PM",Q:e=>String(e.getTime()),s:e=>String(Math.floor(e.getTime()/1e3)),S:(e,t)=>so(e.getSeconds(),2,null!=t?t:"0"),u:e=>{let t=e.getDay();return t<1&&(t+=7),String(t%7)},U:(e,t)=>so(eo(e,0),2,null!=t?t:"0"),V:(e,t)=>so(to(e),2,null!=t?t:"0"),w:(e,t)=>so(e.getDay(),2,null!=t?t:"0"),W:(e,t)=>so(eo(e,1),2,null!=t?t:"0"),x:"%-m/%-d/%Y",X:"%-I:%M:%S %p",y:(e,t)=>so(e.getFullYear()%100,2,null!=t?t:"0"),Y:(e,t)=>so(e.getFullYear(),4,null!=t?t:"0"),Z:e=>function(e){const t=e.getTimezoneOffset(),i=Math.abs(t);return`${t>0?"-":"+"}${so(Math.floor(i/60),2,"0")}${so(Math.floor(i%60),2,"0")}`}(e),"%":()=>"%"},no={_:" ",0:"0","-":""};function so(e,t,i){const n=String(Math.floor(e));return n.length>=t?n:`${i.repeat(t-n.length)}${n}`}function ro(e){const t=[];for(;e.length>0;){let i=e.indexOf("%");if(0!==i){const n=i>0?e.substring(0,i):e;t.push(n)}if(i<0)break;const n=e[i+1],s=no[n];null!=s&&i++;const r=e[i+1],o=io[r];if("function"==typeof o)t.push([o,s]);else if("string"==typeof o){const e=ro(o);t.push([e,s])}else t.push(`${null!=s?s:""}${r}`);e=e.substring(i+2)}return e=>{const i="number"==typeof e?new Date(e):e;return t.map(e=>"string"==typeof e?e:e[0](i,e[1])).join("")}}function oo(e){return e instanceof Date?e.getTime():e}function ao(e,t){const i=lo(e,t);return e=>ro(i)(e)}function lo(e=[],t=e){let i=8;const n=e=>{e<i&&(i=e)};for(const t of e)n(co(t));const s=oo(t[0]),r=oo(t.at(-1)),o=new Date(s).getFullYear(),a=new Date(r).getFullYear();return function(e,t,i){const n=oo(i[0]),s=oo(i.at(-1)),r=Math.abs(s-n),o=[["hour",216e5,12096e5,3,"%I %p"],["hour",z,216e5,3,"%I:%M"],["second",1e3,216e5,1,":%S"],["ms",0,216e5,0,".%L"],["am/pm",z,216e5,3,"%p"]," ",["day",W,6048e5,4,"%a"],["month",0===r?0:j,314496e5,5,"%b %d"],["month",3024e6,31536e7,6,"%B"]," ",["year",t||8===e?0:K,1/0,8,"%Y"]].filter(t=>{if("string"==typeof t)return!0;const[i,n,s,o]=t;return o>=e&&n<=r&&r<s}).reduce((e,t)=>("string"==typeof t?e.result.push(t):e.used.has(t[0])||(e.result.push(t),e.used.add(t[0])),e),{result:[],used:new Set}).result,a=o.findIndex(e=>"string"!=typeof e),l=o.length-[...o].reverse().findIndex(e=>"string"!=typeof e);return o.slice(a,l).map(e=>"string"==typeof e?e:e[4]).join("").replaceAll(/\s+/g," ").trim()}(i,a-o>0,e)}function co(e){return q.floor(e)<e?0:Q.floor(e)<e?1:te.floor(e)<e?2:ne.floor(e)<e?3:ge.floor(e)<e?ue.floor(e)<e?4:5:me.floor(e)<e?6:8}var ho=(e,t=[])=>Object.assign(t,{fractionDigits:e});function uo(e,t,i,n,s){if(i<2)return fo(e,t,t-e);const r=go(e,t,i,n,s);return isNaN(r)?ho(0):fo(e=Math.ceil(e/r)*r,t=Math.floor(t/r)*r,r)}var po=[1,2,5,10];function go(e,t,i,n=0,s=1/0){const r=Math.abs(t-e),o=r/i,a=Math.floor(Math.log10(o)),l=Math.pow(10,a),c=po.map(e=>{const t=e*l,o=Math.ceil(r/t);return{multiplier:e,isWithinBounds:o>=n&&o<=s,diffCount:Math.abs(o-i)}}).sort((e,t)=>e.isWithinBounds!==t.isWithinBounds?e.isWithinBounds?-1:1:e.diffCount-t.diffCount)[0].multiplier;return!c||isNaN(c)?NaN:c*l}function fo(e,t,i){const n=Math.min(e,t),s=Math.max(e,t),r=Qn(i),o=Math.pow(10,r),a=Math.ceil((s-n)/i),l=ho(r);for(let e=0;e<=a;e++){const t=n+i*e;l.push(Math.round(t*o)/o)}return l}function mo({start:e,stop:t,interval:i,count:n,availableRange:s}){return null!=n||(n=(t-e)/("number"==typeof i?i:1)),n>=s&&(_.warnOnce("the configured interval results in more than 1 item per pixel, ignoring. Supply a larger interval or omit this configuration"),!0)}var vo=class e extends Zr{constructor(){super([],[0,1]),this.type="time"}toDomain(e){return new Date(e)}static getTickInterval({start:t,stop:i,count:n,minCount:s,maxCount:r,target:o}){let a,l;const c=null!=n?n:Zr.defaultTickCount,h=null!=o?o:Math.abs(i-t)/Math.max(c,1),d=e.getIntervalIndex(h);if(0===d)l=Math.max(go(t,i,c,s,r),1),a=B;else if(d===e.tickIntervals.length)l=void 0===o?go(t/K,i/K,c,s,r):1,a=me;else{const t=h-e.tickIntervals[d-1][2]<e.tickIntervals[d][2]-h?d-1:d;[a,l]=e.tickIntervals[t]}return a.every(l)}static getIntervalIndex(t){let i=0;for(;i<e.tickIntervals.length&&t>e.tickIntervals[i][2];)i++;return i}invert(e){return new Date(super.invert(e))}ticks(){if(!this.domain||this.domain.length<2)return[];this.refresh();const[t,i]=this.getDomain().map(oo),n=Math.min(t,i),s=Math.max(t,i),{interval:r,nice:o,tickCount:a,minTickCount:l,maxTickCount:c}=this;if(void 0!==r){const t=this.getPixelRange(),i=e.getTicksForInterval({start:n,stop:s,interval:r,availableRange:t});return null!=i?i:e.getDefaultTicks({start:n,stop:s,tickCount:a,minTickCount:l,maxTickCount:c})}if(o){if(2===a)return this.niceDomain;if(1===a)return this.niceDomain.slice(0,1)}return e.getDefaultTicks({start:n,stop:s,tickCount:a,minTickCount:l,maxTickCount:c})}static getDefaultTicks({start:t,stop:i,tickCount:n,minTickCount:s,maxTickCount:r}){const o=e.getTickInterval({start:t,stop:i,count:n,minCount:s,maxCount:r});return o?o.range(new Date(t),new Date(i)):[]}static getTicksForInterval({start:t,stop:i,interval:n,availableRange:s}){if(!n)return[];if(n instanceof F){const e=n.range(new Date(t),new Date(i));if(mo({start:t,stop:i,interval:n,count:e.length,availableRange:s}))return;return e}const r=Math.abs(n);if(mo({start:t,stop:i,interval:r,availableRange:s}))return;const o=[...e.tickIntervals];o.reverse();const a=o.find(e=>r%e[2]===0);if(a)return a[0].every(r/(a[2]/a[1])).range(new Date(t),new Date(i));let l=new Date(t);const c=new Date(i),h=[];for(;l<=c;)h.push(l),l=new Date(l),l.setMilliseconds(l.getMilliseconds()+r);return h}tickFormat({ticks:e,domain:t,specifier:i}){return null==i?ao(e,t):ro(i)}update(){!this.domain||this.domain.length<2||this.nice&&this.updateNiceDomain()}updateNiceDomain(){let[e,t]=this.domain;for(let i=0;i<4;i++){this.updateNiceDomainIteration(e,t);const[i,n]=this.niceDomain;if(oo(e)===oo(i)&&oo(t)===oo(n))break;e=i,t=n}}updateNiceDomainIteration(t,i){const n=Math.min(oo(t),oo(i)),s=Math.max(oo(t),oo(i)),r=t>i,{interval:o}=this;let a;if(o instanceof F)a=o;else{const t="number"==typeof o?(s-n)/Math.max(o,1):this.tickCount;a=e.getTickInterval({start:n,stop:s,count:t,minCount:this.minTickCount,maxCount:this.maxTickCount})}if(a){const e=a.range(new Date(n),new Date(s),!0),t=r?[...e].reverse():e,i=t[0],o=t.at(-1);this.niceDomain=[i,o]}}};vo.tickIntervals=[[q,1,H],[q,5,5e3],[q,15,15e3],[q,30,3e4],[Q,1,z],[Q,5,3e5],[Q,15,9e5],[Q,30,18e5],[te,1,U],[te,3,108e5],[te,6,216e5],[te,12,432e5],[ne,1,W],[ne,2,1728e5],[ue,1,j],[ue,2,12096e5],[ue,3,18144e5],[ge,1,2592e6],[ge,2,5184e6],[ge,3,7776e6],[ge,4,10368e6],[ge,6,15552e6],[me,1,K]];var yo=vo,Co=class e extends Ks{constructor(){super(...arguments),this.type="ordinal-time",this.tickCount=Zr.defaultTickCount,this.minTickCount=0,this.maxTickCount=1/0,this.interval=void 0,this.index=new Map,this._domain=[]}static is(t){return t instanceof e}toDomain(e){return new Date(e)}set domain(e){if(this.invalid=!0,0===e.length)return void(this._domain=[]);const t=this.updateIndex(e);this._domain=t}get domain(){return this._domain}updateIndex(e){this.index=new Map;const{index:t}=this,i=[],n=[],s=e[0]>e.at(-1),r=s?0:1;e.forEach((o,a)=>{const l=e[a+1],c=s?o:this.toDomain(oo(o)+1),h=s?this.toDomain(oo(l)+1):l,d=s?[h,c]:[c,h];i.push(o),void 0!==l&&void 0===t.get(d)&&(n.push(Math.abs(oo(h)-oo(c))),t.set(d,a+r))}),n.sort((e,t)=>e-t);const o=n.length,a=Math.floor(o/2);this.medianInterval=o>2&&o%2==0?(n[a-1]+n[a+1])/2:n[a];const l=Math.max(0,yo.getIntervalIndex(this.medianInterval)-1),[c,h]=yo.tickIntervals[l],d=c.every(h),u=s?e.length-1:0,p=e[u],g=[d.floor(e[u]),p];return t.set(g,u),i}ticks(){if(!this.domain)return[];this.refresh();const[e,t]=[oo(this.domain[0]),oo(this.domain.at(-1))],i=Math.min(e,t),n=Math.max(e,t),s=e>t;let r;void 0!==this.interval&&(r=this.getTicksForInterval({start:i,stop:n,interval:this.interval}));const o=this.domain.length,{maxTickCount:a,tickCount:l}=this;let c,{minTickCount:h}=this;isFinite(a)&&o<=a&&(h=Math.max(1,o),c=this.medianInterval),null!=r||(r=this.getDefaultTicks({start:i,stop:n,tickCount:l,minTickCount:h,maxTickCount:a,isReversed:s,interval:c}));const d=new Set;return r.filter(e=>{const t=this.convert(e);return!isNaN(t)&&!d.has(t)&&(d.add(t),!0)})}getDefaultTicks({start:e,stop:t,tickCount:i,minTickCount:n,maxTickCount:s,isReversed:r,interval:o}){const a=yo.getTickInterval({start:e,stop:t,count:i,minCount:n,maxCount:s,target:o});if(!a)return[];const l=Math.ceil(this.domain.length/s),c=[];for(const[e,t]of this.index.entries()){if(t%l>0)continue;const i=r?a.ceil(e[0]):a.floor(e[1]);c.splice(t,0,i)}return c}getTicksForInterval({start:e,stop:t,interval:i}){var n;const[s,r]=this.range,o=Math.abs(r-s);return null!=(n=yo.getTicksForInterval({start:e,stop:t,interval:i,availableRange:o}))?n:[]}convert(e){if("number"==typeof e&&(e=new Date(e)),!(e instanceof Date))return NaN;let t;this.refresh();for(const[i,n]of this.index.entries())if(e>=i[0]&&e<=i[1]){t=n;break}if(void 0===t)return NaN;const i=this.ordinalRange[t];return void 0===i?NaN:i}tickFormat({ticks:e,domain:t,specifier:i}){return null==i?ao(e,t):ro(i)}invert(e){return new Date(super.invert(e))}invertNearest(e){return new Date(super.invertNearest(e))}};S([Ws],Co.prototype,"tickCount",2),S([Ws],Co.prototype,"minTickCount",2),S([Ws],Co.prototype,"maxTickCount",2),S([Ws],Co.prototype,"interval",2);var bo=Co;function So(e,t){return"number"==typeof e&&"number"==typeof t?e-t:"string"==typeof e&&"string"==typeof t?e.localeCompare(t):null==e&&null==t?0:null==e?-1:null==t?1:String(e).localeCompare(String(t))}function wo(e){return"function"==typeof e?e():e}function xo(e,t,i){for(const n in e){const s=i(wo(e[n]),wo(t[n]));if(0!==s)return s}return 0}var Eo=class e extends ds{constructor(e){var t;super({isVirtual:null==e?void 0:e.isVirtual}),this.opts=e,this.opacity=1,this.lastBBox=void 0;const{zIndex:i,zIndexSubOrder:n}=null!=e?e:{};this.isContainerNode=!0,void 0!==i&&(this.zIndex=i),void 0!==n&&(this.zIndexSubOrder=n),this.name=null==(t=this.opts)?void 0:t.name}static is(t){return t instanceof e}onZIndexChange(){var e;super.onZIndexChange(),this.layer&&(null==(e=this._layerManager)||e.moveLayer(this.layer,this.zIndex,this.zIndexSubOrder))}isLayer(){return null!=this.layer}_setLayerManager(e){if(this._layerManager&&this.layer&&(this._layerManager.removeLayer(this.layer),this.layer=void 0),this.layer)throw new Error("AG Charts - unable to deregister scene rendering layer!");super._setLayerManager(e)}initialiseLayer(){var e;this.layer||this._layerManager&&!0===(null==(e=this.opts)?void 0:e.layer)&&(this.layer=this._layerManager.addLayer({name:this.name,zIndex:this.zIndex,zIndexSubOrder:this.zIndexSubOrder,getComputedOpacity:()=>this.getComputedOpacity(),getVisibility:()=>this.getVisibility()}))}getComputedOpacity(){let t=1;for(const i of this.traverseUp())i instanceof e&&(t*=i.opacity);return t}getVisibility(){for(const e of this.traverseUp())if(!e.visible)return!1;return!0}onVisibleChange(){this.layer&&(this.layer.enabled=this.visible)}markDirty(e,t=1){if(this.isVirtual)return void super.markDirty(e,t);let i=t;(t<2||null!=this.layer)&&(i=1),super.markDirty(e,t,i)}containsPoint(e,t){return!0}computeBBox(){return this.computeTransformMatrix(),e.computeBBox(this.children)}computeTransformedBBox(){return this.computeBBox()}preRender(){var e,t;const i=super.preRender();return i.groups+=1,i.nonGroups-=1,!0!==(null==(e=this.opts)?void 0:e.layer)||null!=this.layer||(i.nonGroups>0&&this.initialiseLayer(),(null==(t=this.opts)?void 0:t.nonEmptyChildDerivedZIndex)&&i.nonGroups>0&&this.deriveZIndexFromChildren()),i}deriveZIndexFromChildren(){var e;const t=this.children.filter(e=>e._childNodeCounts.nonGroups>0);this.sortChildren(t);const i=t.at(-1);this.zIndex=null!=(e=null==i?void 0:i.zIndex)?e:-1/0,this.zIndexSubOrder=null==i?void 0:i.zIndexSubOrder}render(e){var t,i;const{opts:{name:n}={},_debug:s}=this,{dirty:r,dirtyZIndex:o,layer:a,children:l,clipRect:c,dirtyTransform:h}=this;let{ctx:d,forceRender:u,clipBBox:p}=e;const{resized:g,stats:f}=e,m=d.getTransform(),C=r>=2||o||g;let b=C,S=!1;for(const e of l)if(b||(b=null==e.layerManager&&e.dirty>=1),S||(S=null!=e.layerManager&&e.dirty>=1),b)break;if(n&&(null==s||s({name:n,group:this,isDirty:C,isChildDirty:b,dirtyTransform:h,renderCtx:e,forceRender:u})),h)u="dirtyTransform";else if(a){const e=this.computeBBox();void 0!==this.lastBBox&&this.lastBBox.equals(e)||(u="dirtyTransform",this.lastBBox=e)}if(!(C||b||S||u))return n&&f&&(null==s||s({name:n,result:"skipping",renderCtx:e,counts:this.nodeCount,group:this})),a&&f&&(f.layersSkipped++,f.nodesSkipped+=this.nodeCount.count),void this.markClean({recursive:!1});const w=this.visible;if(a){if(d=a.context,d.save(),d.setTransform(a.pixelRatio,0,0,a.pixelRatio,0,0),"dirtyTransform"!==u&&(u=b||o),u&&a.clear(),p){const{width:t,height:i,x:r,y:o}=p;null==s||s(()=>({name:n,clipBBox:p,ctxTransform:d.getTransform(),renderCtx:e,group:this})),d.beginPath(),d.rect(r,o,t,i),d.clip()}d.setTransform(m)}else d.globalAlpha*=this.opacity;if(this.computeTransformMatrix(),this.matrix.toContext(d),c){const{x:t,y:i,width:r,height:o}=c;d.save(),null==s||s(()=>({name:n,clipRect:c,ctxTransform:d.getTransform(),renderCtx:e,group:this})),d.beginPath(),d.rect(t,i,r,o),d.clip(),p=this.matrix.transformBBox(c)}const x=this.hasVirtualChildren();o?(this.sortChildren(l),"dirtyTransform"!==u&&(u=!0)):x&&this.sortChildren(l);const E=u!==e.forceRender||p!==e.clipBBox||d!==e.ctx?y(v({},e),{ctx:d,forceRender:u,clipBBox:p}):e;let M=0;for(const e of l)e.visible&&w?u||0!==e.dirty?(d.save(),e.render(E),d.restore()):f&&(M+=e.nodeCount.count):(e.markClean(),f&&(M+=e.nodeCount.count));if(f&&(f.nodesSkipped+=M),super.render(e),c&&d.restore(),x)for(const e of this.virtualChildren)e.markClean({recursive:"virtual"});a&&(f&&f.layersRendered++,d.restore(),u&&a.snapshot(),null==(i=(t=a.context).verifyDepthZero)||i.call(t)),n&&f&&(null==s||s({name:n,result:"rendered",skipped:M,renderCtx:e,counts:this.nodeCount,group:this}))}sortChildren(e){this.dirtyZIndex=!1,e.sort((e,t)=>{var i,n;return xo([e.zIndex,...null!=(i=e.zIndexSubOrder)?i:[void 0,void 0],e.serialNumber],[t.zIndex,...null!=(n=t.zIndexSubOrder)?n:[void 0,void 0],t.serialNumber],So)})}static computeBBox(e){let t=1/0,i=-1/0,n=1/0,s=-1/0;for(const r of e){if(!r.visible)continue;const e=r.computeTransformedBBox();if(!e)continue;const{x:o,y:a,width:l,height:c}=e;o<t&&(t=o),a<n&&(n=a),o+l>i&&(i=o+l),a+c>s&&(s=a+c)}return new is(t,n,i-t,s-n)}setClipRectInGroupCoordinateSpace(e){this.clipRect=e?this.transformBBox(e):void 0}};Eo.className="Group",S([rs({redraw:3,convertor:e=>Un(0,e,1)})],Eo.prototype,"opacity",2);var Mo=Eo,Ao=class{constructor(e=[]){this.stops=e}},To=class extends Ao{constructor(e,t=0){super(e),this.angle=t}createGradient(e,t){const{stops:i,angle:n}=this,s=_s(Bs(n+90)),r=Math.cos(s),o=Math.sin(s),a=t.width,l=t.height,c=t.x+.5*a,h=t.y+.5*l;if(a>0&&l>0){const t=Math.sqrt(l*l+a*a)/2,n=Math.atan2(l,a);let d;d=s<Math.PI/2?s:s<Math.PI?Math.PI-s:s<1.5*Math.PI?s-Math.PI:2*Math.PI-s;const u=t*Math.abs(Math.cos(d-n)),p=e.createLinearGradient(c+r*u,h+o*u,c-r*u,h-o*u);for(const e of i)p.addColorStop(e.offset,e.color);return p}return"black"}},Do=/^linear-gradient\((.*?)deg,\s*(.*?)\s*\)$/i,Io=class e extends ds{constructor(){super(...arguments),this.fillOpacity=1,this.strokeOpacity=1,this.fill=e.defaultStyles.fill,this.stroke=e.defaultStyles.stroke,this.strokeWidth=e.defaultStyles.strokeWidth,this.lineDash=e.defaultStyles.lineDash,this.lineDashOffset=e.defaultStyles.lineDashOffset,this.lineCap=e.defaultStyles.lineCap,this.lineJoin=e.defaultStyles.lineJoin,this.opacity=e.defaultStyles.opacity,this.fillShadow=e.defaultStyles.fillShadow}restoreOwnStyles(){const{defaultStyles:e}=this.constructor;Object.assign(this,e)}onFillChange(){const{fill:e}=this;let t;if((null==e?void 0:e.startsWith("linear-gradient"))&&(t=Do.exec(e))){const e=parseFloat(t[1]),i=[],n=t[2],s=/(#[0-9a-f]+)|(rgba?\(.+?\))|([a-z]+)/gi;let r;for(;r=s.exec(n);)i.push(r[0]);this.gradient=new To(i.map((e,t)=>({color:e,offset:t/(i.length-1)})),e)}else this.gradient=void 0}align(e,t){var i,n,s;const r=null!=(s=null==(n=null==(i=this.layerManager)?void 0:i.canvas)?void 0:n.pixelRatio)?s:1,o=Math.round(e*r)/r;return null==t?o:0===t?0:t<1?Math.ceil(t*r)/r:Math.round((t+e)*r)/r-o}fillStroke(e,t){this.renderFill(e,t),this.renderStroke(e,t)}renderFill(e,t){if(this.fill){const{globalAlpha:i}=e;this.applyFill(e),this.applyFillAlpha(e),this.applyShadow(e),this.executeFill(e,t),e.globalAlpha=i}e.shadowColor="rgba(0, 0, 0, 0)"}executeFill(e,t){t?e.fill(t):e.fill()}applyFill(e){var t,i;e.fillStyle=null!=(i=null==(t=this.gradient)?void 0:t.createGradient(e,this.computeBBox()))?i:this.fill}applyFillAlpha(e){e.globalAlpha*=this.opacity*this.fillOpacity}applyShadow(e){var t,i;const n=null!=(i=null==(t=this.layerManager)?void 0:t.canvas.pixelRatio)?i:1,s=this.fillShadow;(null==s?void 0:s.enabled)&&(e.shadowColor=s.color,e.shadowOffsetX=s.xOffset*n,e.shadowOffsetY=s.yOffset*n,e.shadowBlur=s.blur*n)}renderStroke(e,t){if(this.stroke&&this.strokeWidth){const{globalAlpha:i}=e;e.strokeStyle=this.stroke,e.globalAlpha*=this.opacity*this.strokeOpacity,e.lineWidth=this.strokeWidth,this.lineDash&&e.setLineDash(this.lineDash),this.lineDashOffset&&(e.lineDashOffset=this.lineDashOffset),this.lineCap&&(e.lineCap=this.lineCap),this.lineJoin&&(e.lineJoin=this.lineJoin),this.executeStroke(e,t),e.globalAlpha=i}}executeStroke(e,t){t?e.stroke(t):e.stroke()}containsPoint(e,t){return this.isPointInPath(e,t)}};Io.defaultStyles={fill:"black",stroke:void 0,strokeWidth:0,lineDash:void 0,lineDashOffset:0,lineCap:void 0,lineJoin:void 0,opacity:1,fillShadow:void 0},S([rs({redraw:2})],Io.prototype,"fillOpacity",2),S([rs({redraw:2})],Io.prototype,"strokeOpacity",2),S([rs({redraw:2,changeCb:e=>e.onFillChange()})],Io.prototype,"fill",2),S([rs({redraw:2})],Io.prototype,"stroke",2),S([rs({redraw:2})],Io.prototype,"strokeWidth",2),S([rs({redraw:2})],Io.prototype,"lineDash",2),S([rs({redraw:2})],Io.prototype,"lineDashOffset",2),S([rs({redraw:2})],Io.prototype,"lineCap",2),S([rs({redraw:2})],Io.prototype,"lineJoin",2),S([rs({redraw:2,convertor:e=>Un(0,e,1)})],Io.prototype,"opacity",2),S([rs({redraw:2,checkDirtyOnAssignment:!0})],Io.prototype,"fillShadow",2);var Ro=Io,Lo=class extends Ro{constructor(e={}){super(e),this.x1=0,this.y1=0,this.x2=0,this.y2=0,this.startLine=!1,this.endLine=!1,this.isRange=!1,this.restoreOwnStyles()}computeBBox(){return new is(this.x1,this.y1,this.x2-this.x1,this.y2-this.y1)}isPointInPath(e,t){return!1}render(e){var t;const{ctx:i,forceRender:n,stats:s}=e;if(0===this.dirty&&!n)return void(s&&(s.nodesSkipped+=this.nodeCount.count));this.computeTransformMatrix(),this.matrix.toContext(i);let{x1:r,y1:o,x2:a,y2:l}=this;r=this.align(r),o=this.align(o),a=this.align(a),l=this.align(l);const{fill:c,opacity:h,isRange:d}=this;if(d&&c){const{fillOpacity:e}=this;i.fillStyle=c,i.globalAlpha=h*e,i.beginPath(),i.moveTo(r,o),i.lineTo(a,o),i.lineTo(a,l),i.lineTo(r,l),i.closePath(),i.fill()}const{stroke:u,strokeWidth:p,startLine:g,endLine:f}=this;if((g||f)&&u&&p){const{strokeOpacity:e,lineDash:t,lineDashOffset:n,lineCap:s,lineJoin:c}=this;i.strokeStyle=u,i.globalAlpha=h*e,i.lineWidth=p,t&&i.setLineDash(t),n&&(i.lineDashOffset=n),s&&(i.lineCap=s),c&&(i.lineJoin=c),i.beginPath(),g&&(i.moveTo(r,o),i.lineTo(a,o)),f&&(i.moveTo(a,l),i.lineTo(r,l)),i.stroke()}null==(t=this.fillShadow)||t.markClean(),super.render(e)}};Lo.className="Range",Lo.defaultStyles=y(v({},Ro.defaultStyles),{strokeWidth:1}),S([rs({redraw:2})],Lo.prototype,"x1",2),S([rs({redraw:2})],Lo.prototype,"y1",2),S([rs({redraw:2})],Lo.prototype,"x2",2),S([rs({redraw:2})],Lo.prototype,"y2",2),S([rs({redraw:2})],Lo.prototype,"startLine",2),S([rs({redraw:2})],Lo.prototype,"endLine",2),S([rs({redraw:2})],Lo.prototype,"isRange",2);var ko=new WeakMap,Po=new WeakMap;function No(e,t){var i,n,s;const r=JSON.stringify(e,null,0);return ko.has(t)||ko.set(t,new Map),(null==(i=ko.get(t))?void 0:i.has(r))||null==(n=ko.get(t))||n.set(r,t(e)),null==(s=ko.get(t))?void 0:s.get(r)}function Oo(e){return(t,...i)=>{var n,s,r;const o=JSON.stringify(t,null,0);return Po.has(e)||Po.set(e,new Map),(null==(n=Po.get(e))?void 0:n.has(o))||null==(s=Po.get(e))||s.set(o,e(t,...i)),null==(r=Po.get(e))?void 0:r.get(o)}}function _o(e){const{redraw:t=3,changeCb:i}=null!=e?e:{};return rs({redraw:t,type:"font",changeCb:i})}var Fo=class e extends Ro{constructor(){super(...arguments),this.x=0,this.y=0,this.lines=[],this.text=void 0,this._dirtyFont=!0,this.fontSize=10,this.fontFamily="sans-serif",this.textAlign=e.defaultStyles.textAlign,this.textBaseline=e.defaultStyles.textBaseline}onTextChange(){var e,t;this.lines=null!=(t=null==(e=this.text)?void 0:e.split("\n").map(e=>e.trim()))?t:[]}get font(){return(null==this._font||this._dirtyFont)&&(this._dirtyFont=!1,this._font=Bo(this)),this._font}computeBBox(){const{x:t,y:i,lines:n,lineHeight:s,textBaseline:r,textAlign:o}=this,{top:a,left:l,width:c,height:h}=e.getTextSizeMultiline(n,Bo(this),r,o,s);return new is(t-l,i-a,c,h)}getLineHeight(t){var i,n;if(this.lineHeight)return this.lineHeight;const s=e.measureText(t,this.font,this.textBaseline,this.textAlign);return(null!=(i=s.fontBoundingBoxAscent)?i:s.emHeightAscent)+(null!=(n=s.fontBoundingBoxDescent)?n:s.emHeightDescent)}isPointInPath(e,t){const i=this.transformPoint(e,t),n=this.computeBBox();return!!n&&n.containsPoint(i.x,i.y)}render(e){const{ctx:t,forceRender:i,stats:n}=e;if(0===this.dirty&&!i)return void(n&&(n.nodesSkipped+=this.nodeCount.count));if(!this.lines.length||!this.layerManager)return void(n&&(n.nodesSkipped+=this.nodeCount.count));this.computeTransformMatrix(),this.matrix.toContext(t);const{fill:s,stroke:r,strokeWidth:o}=this;t.font=this.font,t.textAlign=this.textAlign,t.textBaseline=this.textBaseline;const a=this.layerManager.canvas.pixelRatio||1,{globalAlpha:l}=t;if(s){t.fillStyle=s,t.globalAlpha=l*this.opacity*this.fillOpacity;const{fillShadow:e}=this;(null==e?void 0:e.enabled)&&(t.shadowColor=e.color,t.shadowOffsetX=e.xOffset*a,t.shadowOffsetY=e.yOffset*a,t.shadowBlur=e.blur*a),this.renderLines((e,i,n)=>t.fillText(e,i,n))}if(r&&o){t.strokeStyle=r,t.lineWidth=o,t.globalAlpha=l*this.opacity*this.strokeOpacity;const{lineDash:e,lineDashOffset:i,lineCap:n,lineJoin:s}=this;e&&t.setLineDash(e),i&&(t.lineDashOffset=i),n&&(t.lineCap=n),s&&(t.lineJoin=s),this.renderLines((e,i,n)=>t.strokeText(e,i,n))}super.render(e)}renderLines(t){const{lines:i,x:n,y:s}=this,r=i.map(e=>this.getLineHeight(e)),o=r.reduce((e,t)=>e+t,0);let a=(r[0]-o)*e.getVerticalModifier(this.textBaseline);for(let e=0;e<i.length;e++)t(i[e],n,s+a),a+=r[e]}static wrapLines(t,i,n,s,r,o){const a="hide"!==o,l=new Vo(s),c=t.split(/\r?\n/g);if(0===c.length)return{lines:void 0,truncated:!1};if("never"===r){const{text:t,truncated:n}=e.truncateLine(c[0],i,l,a?"auto":"never");return{lines:null!=t?[t]:void 0,truncated:n}}const h=[];let d=0,u=!1;for(const t of c){const o=e.wrapLine(t,i,n,l,s,r,d,a);if(null==o)return{lines:void 0,truncated:!1};if(h.push(...o.result),d=o.cumulativeHeight,o.truncated){u=!0;break}}return{lines:h,truncated:u}}static wrap(t,i,n,s,r,o="ellipsis"){var a;const{lines:l,truncated:c}=e.wrapLines(t,i,n,s,r,o);return{text:null!=(a=null==l?void 0:l.join("\n").trim())?a:"",truncated:c}}static wrapLine(t,i,n,s,r,o,a,l){if(!(t=t.trim()))return{result:[],truncated:!1,cumulativeHeight:a};const c=s.size(t);if(c.width<=i)return{result:[t],truncated:!1,cumulativeHeight:a+c.height};if(c.height>n||s.width("W")>i)return l?{result:[],truncated:!0,cumulativeHeight:a}:void 0;const h=t.split(/\s+/g),d=e.wrapLineSequentially(h,i,n,s,r,o,a,l);if(null==d)return;a=d.cumulativeHeight;let{lines:u}=d;if(!d.wordsBrokenOrTruncated&&!d.linesTruncated){const t=d.lines.length,n=e.wrapLineBalanced(h,i,s,t);n.length===u.length&&(u=n)}return{result:u.map(e=>e.join(" ")),truncated:d.linesTruncated,cumulativeHeight:a}}static breakWord(t,i,n,s,r){const o=i=>e.punctuationMarks.includes(t[i]),a=s?r.width("-"):0,l=[];let c=0,h=0;for(let e=0;e<t.length;e++){const s=t[e],o=r.width(s);c+o+a>(0===h?i:n)&&(l.push(e),c=0,h++),c+=o}const d=[];let u=0;for(const e of l){let i=t.substring(u,e);s&&i.length>0&&!o(e-1)&&!o(e)&&(i+="-"),d.push(i),u=e}return d.push(t.substring(u)),d}static truncateLine(e,t,i,n){e=e.trimEnd();const s=i.width(e);if(s>t&&"never"===n)return{text:void 0,truncated:!1};if(s<=t&&"force"!==n)return{text:e,truncated:!1};const r=i.width("…");let o=e,a=s;for(;o.length>0&&a+r>t;)o=o.slice(0,-1).trimEnd(),a=i.width(o);return a+r<=t?{text:`${o}…`,truncated:!0}:{text:void 0,truncated:!1}}static wrapLineSequentially(t,i,n,s,r,o,a,l){const{fontSize:c=0,lineHeight:h=c*e.defaultLineHeightRatio}=r,d="always"===o||"hyphenate"===o,u="hyphenate"===o,p=s.width(" ");let g=!1,f=!1;const m=[];let v=[],y=0;const C=()=>({lines:m,linesTruncated:f,wordsBrokenOrTruncated:g,cumulativeHeight:a}),b=()=>{if(!l)return;const t=v.join(" "),{text:n}=e.truncateLine(t,i,s,"force");return null!=n?(v.splice(0,v.length,n),f=!0,C()):void 0},S=()=>{const e=a+h;return!(e>=n||(v=[],y=0,a=e,m.push(v),0))};if(!S())return b();for(let n=0;n<t.length;n++){const r=t[n],o=s.width(r),a=0===v.length?0:p,c=y+a+o;if(c<=i)v.push(r),y=c;else if(o<=i){if(!S())return b();v.push(r),y=o}else{if(g=!0,!d){if(l){if(!S())return b();const{text:o}=e.truncateLine(r,i,s,"force");if(null==o)return;v.push(o),n<t.length-1&&(f=!0);break}return}{const t=i-y-a,n=e.breakWord(r,t,i,u,s);for(let e=0;e<n.length;e++){const t=n[e];if(t&&v.push(t),e===n.length-1)y=s.width(t);else if(!S())return b()}}}}return C()}static wrapLineBalanced(e,t,i,n){const s=e.reduce((e,t)=>e+i.width(t),0),r=i.width(" "),o=(s+r*(e.length-n-2))/n,a=[];let l=[],c=i.width(e[0]),h=!0;for(const n of e){const e=i.width(n);if(h){l=[],l.push(n),c=e,h=!1,a.push(l);continue}const s=c+r+e;s<=o?(l.push(n),c=s):s<=t?(l.push(n),h=!0):(l=[n],c=e,a.push(l))}return a}setFont(e){this.fontFamily=e.fontFamily,this.fontSize=e.fontSize,this.fontStyle=e.fontStyle,this.fontWeight=e.fontWeight}setAlign(e){this.textAlign=e.textAlign,this.textBaseline=e.textBaseline}static getVerticalModifier(e){switch(e){case"top":case"hanging":return 0;case"bottom":case"alphabetic":case"ideographic":return 1;case"middle":return.5}}static get textContext(){if(!this._textContext){const e=Mn("canvas");e.width=0,e.height=0,this._textContext=e.getContext("2d")}return this._textContext}static measureText(e,t,i,n){return this._measureText({text:e,font:t,textBaseline:i,textAlign:n})}static getTextSize(e,t){return this._getTextSize({text:e,font:t})}static getTextSizeMultiline(t,i,n=e.defaultStyles.textBaseline,s=e.defaultStyles.textAlign,r){var o,a;let l=0,c=0,h=0,d=0,u=0;for(const[e,r]of t.entries()){const p=this._measureText({text:r,font:i,textBaseline:n,textAlign:s});c=Math.max(c,p.actualBoundingBoxLeft),h=Math.max(h,p.width),0==e?(l+=p.actualBoundingBoxAscent,d+=p.actualBoundingBoxAscent):u+=null!=(o=p.fontBoundingBoxAscent)?o:p.emHeightAscent,e==t.length-1?d+=p.actualBoundingBoxDescent:u+=null!=(a=p.fontBoundingBoxDescent)?a:p.emHeightDescent}return null!=r&&(u=(t.length-1)*r),d+=u,l+=u*e.getVerticalModifier(n),{top:l,left:c,width:h,height:d}}};Fo.className="Text",Fo.defaultLineHeightRatio=1.15,Fo.defaultStyles=Object.assign({},Ro.defaultStyles,{textAlign:"start",fontStyle:void 0,fontWeight:void 0,fontSize:10,fontFamily:"sans-serif",textBaseline:"alphabetic"}),Fo.ellipsis="…",Fo.punctuationMarks=[".",",","-",":",";","!","?","'",'"',"(",")"],Fo._measureText=Oo(({text:e,font:t,textBaseline:i,textAlign:n})=>{const s=Fo.textContext;return s.font!==t&&(s.font=t),s.textBaseline!==i&&(s.textBaseline=i),s.textAlign!==n&&(s.textAlign=n),s.measureText(e)}),Fo._getTextSize=Oo(({text:e,font:t})=>{const i=Fo.textContext;i.font!==t&&(i.font=t);const n=i.measureText(e);return{width:n.width,height:n.actualBoundingBoxAscent+n.actualBoundingBoxDescent}}),S([rs({redraw:3})],Fo.prototype,"x",2),S([rs({redraw:3})],Fo.prototype,"y",2),S([rs({redraw:3,changeCb:e=>e.onTextChange()})],Fo.prototype,"text",2),S([_o()],Fo.prototype,"fontStyle",2),S([_o()],Fo.prototype,"fontWeight",2),S([_o()],Fo.prototype,"fontSize",2),S([_o()],Fo.prototype,"fontFamily",2),S([rs({redraw:3})],Fo.prototype,"textAlign",2),S([rs({redraw:3})],Fo.prototype,"textBaseline",2),S([rs({redraw:3})],Fo.prototype,"lineHeight",2);var Go=Fo,Vo=class{constructor(e){this.font=Ue(e)?e:Bo(e)}size(e){return e.includes("\n")?Go.getTextSizeMultiline(e.split("\n").map(e=>e.trim()),this.font):Go.getTextSize(e,this.font)}width(e){const{width:t}=this.size(e);return t}};function Bo(e){const{fontFamily:t,fontSize:i,fontStyle:n,fontWeight:s}=e;return[null!=n?n:"",null!=s?s:"",i+"px",t].join(" ").trim()}var Ho=class extends Ct{constructor(){super(...arguments),this.enabled=!0,this.fontSize=12,this.fontFamily="Verdana, sans-serif"}getFont(){return Bo(this)}};function zo(e){const{parallelFlipRotation:t=0,regularFlipRotation:i=0}=e,n=e.rotation?_s(Bs(e.rotation)):0,s=!n&&t>=0&&t<=Math.PI?-1:1,r=!n&&i>=0&&i<=Math.PI?-1:1;let o=0;return e.parallel?o=s*Math.PI/2:-1===r&&(o=Math.PI),{configuredRotation:n,defaultRotation:o,parallelFlipFlag:s,regularFlipFlag:r}}function Uo(e,t,i,n,s){const r=t>0&&t<=Math.PI,o=i>0&&i<=Math.PI;if(e){if(!t&&!i)return"center";if(n*(r||o?-1:1)==-1)return"end"}else if(n*s===-1)return"end";return"start"}function Wo(e,t,i,n,s){const{width:r,height:o}=t,a=new is(i,n,0,0);s.transformBBox(a,t);const{x:l,y:c}=t;return t.width=r,t.height=o,{point:{x:l,y:c},label:{text:e,width:r,height:o}}}S([Ys(er)],Ho.prototype,"enabled",2),S([Ys(vr,{optional:!0})],Ho.prototype,"color",2),S([Ys(Dr,{optional:!0})],Ho.prototype,"fontStyle",2),S([Ys(Ir,{optional:!0})],Ho.prototype,"fontWeight",2),S([Ys(rr)],Ho.prototype,"fontSize",2),S([Ys(ir)],Ho.prototype,"fontFamily",2),S([Ys(tr,{optional:!0})],Ho.prototype,"formatter",2);var jo=(e=>(e[e.SERIES_BACKGROUND_ZINDEX=0]="SERIES_BACKGROUND_ZINDEX",e[e.AXIS_GRID_ZINDEX=1]="AXIS_GRID_ZINDEX",e[e.AXIS_ZINDEX=2]="AXIS_ZINDEX",e[e.SERIES_CROSSLINE_RANGE_ZINDEX=3]="SERIES_CROSSLINE_RANGE_ZINDEX",e[e.SERIES_LAYER_ZINDEX=4]="SERIES_LAYER_ZINDEX",e[e.SERIES_HIGHLIGHT_ZINDEX=5]="SERIES_HIGHLIGHT_ZINDEX",e[e.AXIS_FOREGROUND_ZINDEX=6]="AXIS_FOREGROUND_ZINDEX",e[e.SERIES_CROSSHAIR_ZINDEX=7]="SERIES_CROSSHAIR_ZINDEX",e[e.SERIES_LABEL_ZINDEX=8]="SERIES_LABEL_ZINDEX",e[e.SERIES_CROSSLINE_LINE_ZINDEX=9]="SERIES_CROSSLINE_LINE_ZINDEX",e[e.SERIES_ANNOTATION_ZINDEX=10]="SERIES_ANNOTATION_ZINDEX",e[e.LEGEND_ZINDEX=11]="LEGEND_ZINDEX",e[e.NAVIGATOR_ZINDEX=12]="NAVIGATOR_ZINDEX",e))(jo||{});function Ko(e){return null!=e&&Object.hasOwn(e,"toString")&&Ue(e.toString())}function $o(e){return null!=e&&Object.hasOwn(e,"valueOf")&&je(e.valueOf())}function Yo(e){return je(e)||Fe(e)||$o(e)}function qo(e,t){return null!=e&&(!t||Yo(e))}function Xo(e){return Ko(e)&&Object.hasOwn(e,"id")?e.id:e}var Zo=e=>"value"===e?Hr((e,t)=>"line"===t.target.type,e=>"range"===e.target.type?"crossLine type 'range' to have a 'range' property instead of 'value'":"crossLine property 'type' to be 'line'"):Hr((e,t)=>"range"===t.target.type,e=>"line"===e.target.type?"crossLine type 'line' to have a 'value' property instead of 'range'":"crossLine property 'type' to be 'range'"),Qo=(e,t,i,n)=>{const s="line"===e&&void 0!==t,r="range"===e&&void 0!==i;if(!s&&!r)return!0;const[o,a]=null!=i?i:[t,void 0],l=Zr.is(n)||bo.is(n),c=qo(o,l)&&!isNaN(n.convert(o)),h=qo(a,l)&&!isNaN(n.convert(a));if(s&&c||r&&c&&h)return!0;const d=["Expecting crossLine"];return r?(c||d.push(`range start ${Wr(o)}`),h||d.push(`${c?"":"and "}range end ${Wr(a)}`)):d.push(`value ${Wr(o)}`),d.push("to match the axis scale domain."),_.warnOnce(d.join(" ")),!1},Jo={top:{xTranslationDirection:0,yTranslationDirection:-1},bottom:{xTranslationDirection:0,yTranslationDirection:1},left:{xTranslationDirection:-1,yTranslationDirection:0},right:{xTranslationDirection:1,yTranslationDirection:0},topLeft:{xTranslationDirection:1,yTranslationDirection:-1},topRight:{xTranslationDirection:-1,yTranslationDirection:-1},bottomLeft:{xTranslationDirection:1,yTranslationDirection:1},bottomRight:{xTranslationDirection:-1,yTranslationDirection:1},inside:{xTranslationDirection:0,yTranslationDirection:0},insideLeft:{xTranslationDirection:1,yTranslationDirection:0},insideRight:{xTranslationDirection:-1,yTranslationDirection:0},insideTop:{xTranslationDirection:0,yTranslationDirection:1},insideBottom:{xTranslationDirection:0,yTranslationDirection:-1},insideTopLeft:{xTranslationDirection:1,yTranslationDirection:1},insideBottomLeft:{xTranslationDirection:1,yTranslationDirection:-1},insideTopRight:{xTranslationDirection:-1,yTranslationDirection:1},insideBottomRight:{xTranslationDirection:-1,yTranslationDirection:-1}},ea={top:{xTranslationDirection:1,yTranslationDirection:0},bottom:{xTranslationDirection:-1,yTranslationDirection:0},left:{xTranslationDirection:0,yTranslationDirection:-1},right:{xTranslationDirection:0,yTranslationDirection:1},topLeft:{xTranslationDirection:-1,yTranslationDirection:-1},topRight:{xTranslationDirection:-1,yTranslationDirection:1},bottomLeft:{xTranslationDirection:1,yTranslationDirection:-1},bottomRight:{xTranslationDirection:1,yTranslationDirection:1},inside:{xTranslationDirection:0,yTranslationDirection:0},insideLeft:{xTranslationDirection:0,yTranslationDirection:1},insideRight:{xTranslationDirection:0,yTranslationDirection:-1},insideTop:{xTranslationDirection:-1,yTranslationDirection:0},insideBottom:{xTranslationDirection:1,yTranslationDirection:0},insideTopLeft:{xTranslationDirection:-1,yTranslationDirection:1},insideBottomLeft:{xTranslationDirection:1,yTranslationDirection:1},insideTopRight:{xTranslationDirection:-1,yTranslationDirection:-1},insideBottomRight:{xTranslationDirection:1,yTranslationDirection:-1}};function ta({yDirection:e,padding:t=0,position:i="top",bbox:n}){const s=e?Jo:ea,{xTranslationDirection:r,yTranslationDirection:o}=s[i];return{xTranslation:r*(t+(e?n.width:n.height)/2),yTranslation:o*(t+(e?n.height:n.width)/2)}}var ia=({yDirection:e,xEnd:t,yStart:i,yEnd:n})=>e?{x:t/2,y:i}:{x:t,y:isNaN(n)?i:(i+n)/2},na=({yDirection:e,xStart:t,xEnd:i,yStart:n,yEnd:s})=>e?{x:t,y:isNaN(s)?n:(n+s)/2}:{x:i/2,y:n},sa=({yDirection:e,xEnd:t,yStart:i,yEnd:n})=>e?{x:t,y:isNaN(n)?i:(i+n)/2}:{x:t/2,y:isNaN(n)?i:n},ra=({yDirection:e,xStart:t,xEnd:i,yStart:n,yEnd:s})=>e?{x:i/2,y:isNaN(s)?n:s}:{x:t,y:isNaN(s)?n:(n+s)/2},oa=({yDirection:e,xStart:t,xEnd:i,yStart:n})=>e?{x:t/2,y:n}:{x:i,y:n},aa=({yDirection:e,xStart:t,yStart:i,yEnd:n})=>e?{x:t,y:isNaN(n)?i:n}:{x:t,y:i},la=({yDirection:e,xEnd:t,yStart:i,yEnd:n})=>e?{x:t,y:i}:{x:t,y:isNaN(n)?i:n},ca=({yDirection:e,xStart:t,xEnd:i,yStart:n,yEnd:s})=>e?{x:i,y:isNaN(s)?n:s}:{x:t,y:isNaN(s)?n:s},ha={top:{c:ia},bottom:{c:ra},left:{c:na},right:{c:sa},topLeft:{c:oa},topRight:{c:la},bottomLeft:{c:aa},bottomRight:{c:ca},inside:{c:({xEnd:e,yStart:t,yEnd:i})=>({x:e/2,y:isNaN(i)?t:(t+i)/2})},insideLeft:{c:na},insideRight:{c:sa},insideTop:{c:ia},insideBottom:{c:ra},insideTopLeft:{c:oa},insideBottomLeft:{c:aa},insideTopRight:{c:la},insideBottomRight:{c:ca}},da=Gr(["top","left","right","bottom","topLeft","topRight","bottomLeft","bottomRight","inside","insideLeft","insideRight","insideTop","insideBottom","insideTopLeft","insideBottomLeft","insideTopRight","insideBottomRight"],"crossLine label position"),ua=class{constructor(){this.enabled=void 0,this.text=void 0,this.fontStyle=void 0,this.fontWeight=void 0,this.fontSize=14,this.fontFamily="Verdana, sans-serif",this.padding=5,this.color="rgba(87, 87, 87, 1)",this.position=void 0,this.rotation=void 0,this.parallel=void 0}};S([Ys(er,{optional:!0})],ua.prototype,"enabled",2),S([Ys(ir,{optional:!0})],ua.prototype,"text",2),S([Ys(Dr,{optional:!0})],ua.prototype,"fontStyle",2),S([Ys(Ir,{optional:!0})],ua.prototype,"fontWeight",2),S([Ys(rr)],ua.prototype,"fontSize",2),S([Ys(ir)],ua.prototype,"fontFamily",2),S([Ys(nr)],ua.prototype,"padding",2),S([Ys(vr,{optional:!0})],ua.prototype,"color",2),S([Ys(da,{optional:!0})],ua.prototype,"position",2),S([Ys(ar,{optional:!0})],ua.prototype,"rotation",2),S([Ys(er,{optional:!0})],ua.prototype,"parallel",2);var pa=class e{constructor(){this.id=Bn(this),this.enabled=void 0,this.type=void 0,this.range=void 0,this.value=void 0,this.fill=void 0,this.fillOpacity=void 0,this.stroke=void 0,this.strokeWidth=void 0,this.strokeOpacity=void 0,this.lineDash=void 0,this.label=new ua,this.scale=void 0,this.clippedRange=[-1/0,1/0],this.gridLength=0,this.sideFlag=-1,this.parallelFlipRotation=0,this.regularFlipRotation=0,this.direction="x",this.group=new Mo({name:`${this.id}`,layer:!0,zIndex:e.LINE_LAYER_ZINDEX}),this.labelGroup=new Mo({name:`${this.id}`,layer:!0,zIndex:e.LABEL_LAYER_ZINDEX}),this.crossLineRange=new Lo,this.crossLineLabel=new Go,this.labelPoint=void 0,this.data=[],this.startLine=!1,this.endLine=!1,this.isRange=!1;const{group:t,labelGroup:i,crossLineRange:n,crossLineLabel:s}=this;t.append(n),i.append(s),n.pointerEvents=1}update(e){const{enabled:t,data:i,type:n,value:s,range:r,scale:o}=this;if(!(n&&o&&t&&e&&Qo(n,s,r,o)&&0!==i.length))return this.group.visible=!1,void(this.labelGroup.visible=!1);this.group.visible=e,this.labelGroup.visible=e,this.group.zIndex=this.getZIndex(this.isRange),this.updateNodes()}calculateLayout(e,t){if(!e)return;if(!this.createNodeData(t))return;const{sideFlag:i,gridLength:n,data:s}=this,r=[],o=i*n,a=s[0],l=s[1],c=new is(Math.min(0,o),Math.min(a,l),Math.abs(0-o),Math.abs(a-l));r.push(c);const h=this.computeLabelBBox();return h&&r.push(h),is.merge(r)}updateNodes(){this.updateRangeNode(),this.label.enabled&&(this.updateLabel(),this.positionLabel())}createNodeData(e){var t,i,n;const{scale:s,gridLength:r,sideFlag:o,direction:a,label:{position:l="top"},clippedRange:c,strokeWidth:h=0}=this;if(this.data=[],!s)return!1;const d=null!=(t=s.bandwidth)?t:0,u=null!=(i=s.step)?i:0,p=(e?-1:1)*(s instanceof Ks?(u-d)/2:0),[g,f]=[0,o*r];let[m,v]=this.getRange();const y=void 0===v&&bo.is(s)?d/2+p:0;let[C,b]=[Number(s.convert(m,{clampMode:"clamped"}))-p+y,s.convert(v,{clampMode:"clamped"})+d+p];C=Wn(C,c),b=Wn(b,c),[m,v]=[Number(s.convert(m))+y,s.convert(v)+d];const S=(m===C||v===b||C!==b)&&Math.abs(b-C)>0;if(S&&C>b&&([C,b]=[b,C],[m,v]=[v,m]),m-p>=C&&(m-=p),v+p<=b&&(v+=p),this.isRange=S,this.startLine=h>0&&m>=C&&m<=C+p,this.endLine=h>0&&v>=b-d-p&&v<=b,!S&&!this.startLine&&!this.endLine)return!1;if(this.data=[C,b],this.label.enabled){const e="y"===a,{c:t=ia}=null!=(n=ha[l])?n:{},{x:i,y:s}=t({yDirection:e,xStart:g,xEnd:f,yStart:C,yEnd:b});this.labelPoint={x:i,y:s}}return!0}updateRangeNode(){var e;const{crossLineRange:t,sideFlag:i,gridLength:n,data:s,startLine:r,endLine:o,isRange:a,fill:l,fillOpacity:c,stroke:h,strokeWidth:d,lineDash:u}=this;t.x1=0,t.x2=i*n,t.y1=s[0],t.y2=s[1],t.startLine=r,t.endLine=o,t.isRange=a,t.fill=l,t.fillOpacity=null!=c?c:1,t.stroke=h,t.strokeWidth=null!=d?d:1,t.strokeOpacity=null!=(e=this.strokeOpacity)?e:1,t.lineDash=u}updateLabel(){const{crossLineLabel:e,label:t}=this;t.text&&(e.fontStyle=t.fontStyle,e.fontWeight=t.fontWeight,e.fontSize=t.fontSize,e.fontFamily=t.fontFamily,e.fill=t.color,e.text=t.text)}positionLabel(){const{crossLineLabel:e,labelPoint:{x:t,y:i}={},label:{parallel:n,rotation:s,position:r="top",padding:o=0},direction:a,parallelFlipRotation:l,regularFlipRotation:c}=this;if(void 0===t||void 0===i)return;const{defaultRotation:h,configuredRotation:d}=zo({rotation:s,parallel:n,regularFlipRotation:c,parallelFlipRotation:l});e.rotation=h+d,e.textBaseline="middle",e.textAlign="center";const u=e.computeTransformedBBox();if(!u)return;const p="y"===a,{xTranslation:g,yTranslation:f}=ta({yDirection:p,padding:o,position:r,bbox:u});e.translationX=t+g,e.translationY=i+f}getZIndex(t=!1){return t?e.RANGE_LAYER_ZINDEX:e.LINE_LAYER_ZINDEX}getRange(){var e;const{value:t,range:i,scale:n}=this,s=Zr.is(n)||bo.is(n),r=null!=(e=null==i?void 0:i[0])?e:t;let o=null==i?void 0:i[1];return s||void 0!==o||(o=r),s&&r===o&&(o=void 0),[r,o]}computeLabelBBox(){const{label:e}=this;if(!e.enabled)return;const t=new Go;t.fontFamily=e.fontFamily,t.fontSize=e.fontSize,t.fontStyle=e.fontStyle,t.fontWeight=e.fontWeight,t.text=e.text;const{labelPoint:{x:i,y:n}={},label:{parallel:s,rotation:r,position:o="top",padding:a=0},direction:l,parallelFlipRotation:c,regularFlipRotation:h}=this;if(void 0===i||void 0===n)return;const{configuredRotation:d}=zo({rotation:r,parallel:s,regularFlipRotation:h,parallelFlipRotation:c});t.rotation=d,t.textBaseline="middle",t.textAlign="center";const u=t.computeTransformedBBox();if(!u)return;const p="y"===l,{xTranslation:g,yTranslation:f}=ta({yDirection:p,padding:a,position:o,bbox:u});return t.translationX=i+g,t.translationY=n+f,t.computeTransformedBBox()}calculatePadding(e){var t,i,n,s,r,o,a,l;const{isRange:c,startLine:h,endLine:d,direction:u,label:{padding:p=0,position:g="top"}}=this;if(!c&&!h&&!d)return;const f=this.computeLabelBBox();if(null==(null==f?void 0:f.x)||null==(null==f?void 0:f.y))return;const m=function({yDirection:e,bbox:t,padding:i=0,position:n="top"}){const s={};return n.startsWith("inside")||("top"!==n||e?"bottom"!==n||e?"left"===n&&e?s.left=i+t.width:"right"===n&&e&&(s.right=i+t.width):s.bottom=i+t.height:s.top=i+t.height),s}({yDirection:"y"===u,padding:p,position:g,bbox:f});e.left=Math.max(null!=(t=e.left)?t:0,null!=(i=m.left)?i:0),e.right=Math.max(null!=(n=e.right)?n:0,null!=(s=m.right)?s:0),e.top=Math.max(null!=(r=e.top)?r:0,null!=(o=m.top)?o:0),e.bottom=Math.max(null!=(a=e.bottom)?a:0,null!=(l=m.bottom)?l:0)}};pa.LINE_LAYER_ZINDEX=9,pa.RANGE_LAYER_ZINDEX=3,pa.LABEL_LAYER_ZINDEX=8,pa.className="CrossLine",S([Ys(er,{optional:!0})],pa.prototype,"enabled",2),S([Ys(Gr(["range","line"],"a crossLine type"),{optional:!0})],pa.prototype,"type",2),S([Ys(Xs(Zo("range"),cr.restrict({length:2})),{optional:!0})],pa.prototype,"range",2),S([Ys(Zo("value"),{optional:!0})],pa.prototype,"value",2),S([Ys(vr,{optional:!0})],pa.prototype,"fill",2),S([Ys(or,{optional:!0})],pa.prototype,"fillOpacity",2),S([Ys(vr,{optional:!0})],pa.prototype,"stroke",2),S([Ys(nr,{optional:!0})],pa.prototype,"strokeWidth",2),S([Ys(or,{optional:!0})],pa.prototype,"strokeOpacity",2),S([Ys(Ar,{optional:!0})],pa.prototype,"lineDash",2);var ga=pa,fa=class{constructor(){this.moduleMap=new Map}*modules(){for(const e of this.moduleMap.values())yield e.moduleInstance}addModule(e,t){if(this.moduleMap.has(e.optionsKey))throw new Error(`AG Charts - module already initialised: ${e.optionsKey}`);this.moduleMap.set(e.optionsKey,{module:e,moduleInstance:t(e)})}removeModule(e){var t;const i=Ue(e)?e:e.optionsKey;null==(t=this.moduleMap.get(i))||t.moduleInstance.destroy(),this.moduleMap.delete(i)}getModule(e){var t;return null==(t=this.moduleMap.get(Ue(e)?e:e.optionsKey))?void 0:t.moduleInstance}isEnabled(e){return this.moduleMap.has(Ue(e)?e:e.optionsKey)}mapModules(e){return Array.from(this.moduleMap.values(),(t,i)=>e(t.moduleInstance,i))}destroy(){var e;for(const t of this.moduleMap.keys())null==(e=this.moduleMap.get(t))||e.moduleInstance.destroy();this.moduleMap.clear()}},ma={};function va(e,t){const{nodes:i,selections:n}=Is(e);for(const e of n){for(const i of e.nodes()){const e=t(i,i.datum);i.setProperties(e)}e.cleanup()}for(const e of i){const i=t(e,e.datum);e.setProperties(i)}}b(ma,{resetMotion:()=>va});var ya=class{constructor(e,t,i){this.states=t,this.preTransitionCb=i,this.debug=Ln.create(!0,"animation"),this.state=e,this.debug(`%c${this.constructor.name} | init -> ${e}`,"color: green")}transition(e,t){var i,n;const s=this.states[this.state],r=null==s?void 0:s[e];if(!r)return void this.debug(`%c${this.constructor.name} | ${this.state} -> ${e} -> ${this.state}`,"color: grey");let o=this.state;return"string"==typeof r?o=r:"object"==typeof r&&(o=r.target),this.debug(`%c${this.constructor.name} | ${this.state} -> ${e} -> ${o}`,"color: green"),null==(i=this.preTransitionCb)||i.call(this,this.state,o),this.state=o,"function"==typeof r?r(t):"object"==typeof r&&(null==(n=r.action)||n.call(r,t)),this.state}},Ca=e=>`(${e})`,ba=e=>`${Ca(e)}?`,Sa=e=>ba(`?:${e}`),wa=new RegExp(["^",Sa(`${ba(".")}${Ca("[<>=^]")}`),ba("[+\\-( ]"),ba("[$€£¥₣₹#]"),ba("0"),ba("\\d+"),ba(","),Sa(`\\.${Ca("\\d+")}`),ba("~"),ba("[%a-z]"),"$"].join(""),"i"),xa=new RegExp(["^",Ca(".*?"),`#\\{${Ca(".+?")}\\}`,Ca(".*?"),"$"].join(""));function Ea(e){let t,i;const n=xa.exec(e);n&&([,t,e,i]=n);const s=wa.exec(e);if(!s)throw new Error(`The number formatter is invalid: ${e}`);const[,r,o,a,l,c,h,d,u,p,g]=s;return{fill:r,align:o,sign:a,symbol:l,zero:c,width:parseInt(h),comma:d,precision:parseInt(u),trim:Boolean(p),type:g,prefix:t,suffix:i}}function Ma(e){const t="string"==typeof e?Ea(e):e,{fill:i,align:n,sign:s="-",symbol:r,zero:o,width:a,comma:l,type:c,prefix:h="",suffix:d="",precision:u}=t;let{trim:p}=t;const g=void 0===u||isNaN(u);let f,m;if(c)if(c in Da&&c in Ta)f=g?Ta[c]:Da[c];else if(c in Da)f=Da[c];else{if(!(c in Ta))throw new Error(`The number formatter type is invalid: ${c}`);f=Ta[c]}else f=Da.g,p=!0;return m=null==u||g?c?6:12:u,e=>{let t=f(e,m);return p&&(t=t.replace(/\.0+$/,"").replace(/(\.[1-9])0+$/,"$1")),l&&(t=function(e,t){let i=e.indexOf(".");i<0&&(i=e.length);const n=e.substring(0,i).split(""),s=e.substring(i);for(let e=n.length-3;e>0;e-=3)n.splice(e,0,t);return`${n.join("")}${s}`}(t,l)),t=function(e,t,i=""){if("("===i)return e>=0?t:`(${t})`;return`${e>=0?"+"===i?"+":"":"−"}${t}`}(e,t,s),r&&"#"!==r&&(t=`${r}${t}`),"#"===r&&"x"===c&&(t=`0x${t}`),"s"===c&&(t=`${t}${function(e){return ka[Ia(e)]}(e)}`),"%"!==c&&"p"!==c||(t=`${t}%`),null==a||isNaN(a)||(t=function(e,t,i=" ",n=">"){let s=e;if(">"!==n&&n){if("<"===n)s=s.padEnd(t,i);else if("^"===n){const e=Math.max(0,t-s.length),n=Math.ceil(e/2),r=Math.floor(e/2);s=s.padStart(n+s.length,i),s=s.padEnd(r+s.length,i)}}else s=s.padStart(t,i);return s}(t,a,null!=i?i:o,n)),t=`${h}${t}${d}`,t}}var Aa=e=>Math.floor(Math.abs(e)),Ta={b:e=>Aa(e).toString(2),c:e=>String.fromCharCode(e),d:e=>Math.round(Math.abs(e)).toFixed(0),o:e=>Aa(e).toString(8),x:e=>Aa(e).toString(16),X:e=>Ta.x(e).toUpperCase(),n:e=>Ta.d(e),"%":e=>`${Aa(100*e).toFixed(0)}`},Da={e:(e,t)=>Math.abs(e).toExponential(t),E:(e,t)=>Da.e(e,t).toUpperCase(),f:(e,t)=>Math.abs(e).toFixed(t),F:(e,t)=>Da.f(e,t).toUpperCase(),g:(e,t)=>{if(0===e)return"0";const i=Math.abs(e),n=Math.floor(Math.log10(i));return n>=-4&&n<t?i.toFixed(t-1-n):i.toExponential(t-1)},G:(e,t)=>Da.g(e,t).toUpperCase(),n:(e,t)=>Da.g(e,t),p:(e,t)=>Da.r(100*e,t),r:(e,t)=>{if(0===e)return"0";const i=Math.abs(e),n=Math.floor(Math.log10(i))-(t-1);if(n<=0)return i.toFixed(-n);const s=Math.pow(10,n);return(Math.round(i/s)*s).toFixed()},s:(e,t)=>{const i=Ia(e);return Da.r(e/Math.pow(10,i),t)},"%":(e,t)=>Da.f(100*e,t)};function Ia(e){return Un(Ra,e?3*Math.floor(Math.log10(Math.abs(e))/3):0,La)}var Ra=-24,La=24,ka={[Ra]:"y",[-21]:"z",[-18]:"a",[-15]:"f",[-12]:"p",[-9]:"n",[-6]:"µ",[-3]:"m",0:"",3:"k",6:"M",9:"G",12:"T",15:"P",18:"E",21:"Z",[La]:"Y"};function Pa(e,t){const i=Ea(null!=t?t:",f"),{precision:n}=i;(null==n||isNaN(n))&&("f"===i.type||"%"===i.type?i.precision=Math.max(...e.map(e=>{if("number"!=typeof e||0===e)return 0;const t=Math.floor(Math.log10(Math.abs(e))),n=i.type?6:12,s=e.toExponential(n-1).replace(/\.?0+e/,"e"),r=s.indexOf(".");if(r<0)return t>=0?0:-t;const o=s.indexOf("e")-r;return Math.max(0,o-t-1)})):i.type&&!(i.type in Da)||(i.precision=Math.max(...e.map(e=>{if("number"!=typeof e)return 0;const t=e.toExponential((i.type?6:12)-1).replace(/\.?0+e/,"e");return t.substring(0,t.indexOf("e")).replace(".","").length}))));const s=Ma(i);return e=>s(Number(e))}var Na=class e extends Zr{constructor(){super([1,10],[0,1]),this.type="log",this.base=10,this.baseLog=P,this.basePow=P,this.log=e=>Math.min(...this.domain)>=0?this.baseLog(e):-this.baseLog(-e),this.pow=e=>Math.min(...this.domain)>=0?this.basePow(e):-this.basePow(-e),this.defaultClampMode="clamped"}toDomain(e){return e}transform(e){return Math.min(...this.domain)>=0?Math.log(e):-Math.log(-e)}transformInvert(e){return Math.min(...this.domain)>=0?Math.exp(e):-Math.exp(-e)}refresh(){this.base<=0&&(this.base=0,_.warnOnce("expecting a finite Number greater than to 0")),super.refresh()}update(){!this.domain||this.domain.length<2||(this.baseLog=e.getBaseLogMethod(this.base),this.basePow=e.getBasePowerMethod(this.base),this.nice&&this.updateNiceDomain())}updateNiceDomain(){const[e,t]=this.domain,i=e>t?Math.ceil:Math.floor,n=e>t?Math.floor:Math.ceil,s=this.pow(i(this.log(e))),r=this.pow(n(this.log(t)));this.niceDomain=[s,r]}ticks(){var e;const t=null!=(e=this.tickCount)?e:10;if(!this.domain||this.domain.length<2||t<1)return[];this.refresh();const i=this.base,[n,s]=this.getDomain(),r=Math.min(n,s),o=Math.max(n,s);let a=this.log(r),l=this.log(o);if(this.interval){const e=Math.abs(this.interval),t=Math.abs(l-a);let i=fo(a,l,Math.min(t,e));i=ho(i.fractionDigits,i.map(e=>this.pow(e)).filter(e=>e>=r&&e<=o));const n=this.getPixelRange();if(!mo({start:r,stop:o,interval:e,count:i.length,availableRange:n}))return i}if(i%1!=0||l-a>=t){let e=uo(a,l,Math.min(l-a,t));return e=ho(e.fractionDigits,e.map(e=>this.pow(e))),e}const c=[],h=r>0;a=Math.floor(a)-1,l=Math.round(l)+1;const d=Kn(this.range)/t;let u=1/0;for(let e=a;e<=l;e++){const t=this.convert(this.pow(e+1));for(let n=1;n<i;n++){const s=h?n:i-n+1,a=this.pow(e)*s,l=this.convert(a),p=Math.abs(u-l),g=Math.abs(l-t);a>=r&&a<=o&&(1===n||p>=d&&g>=d||0===c.length)&&(c.push(a),u=l)}}return c}tickFormat({count:e,ticks:t,specifier:i}){return e!==1/0&&null==t&&this.ticks(),null!=i||(i=10===this.base?".0e":","),Ue(i)?Ma(i):i}static getBaseLogMethod(e){switch(e){case 10:return Math.log10;case Math.E:return Math.log;case 2:return Math.log2;default:const t=Math.log(e);return e=>Math.log(e)/t}}static getBasePowerMethod(e){switch(e){case 10:return e=>e>=0?f(10,e):1/f(10,-e);case Math.E:return Math.exp;default:return t=>f(e,t)}}};S([Ws],Na.prototype,"base",2);var Oa=Na,_a=class e{constructor(e,t,i=!0){this.parentNode=e,this.autoCleanup=i,this.garbageBin=new Set,this._nodesMap=new Map,this._nodes=[],this.data=[],this.debug=Ln.create(!0,"scene","scene:selections"),this.nodeFactory=Object.prototype.isPrototypeOf.call(ds,t)?()=>new t:t}static select(t,i,n=!0){return new e(t,i,n)}static selectAll(e,t){const i=[],n=e=>{t(e)&&i.push(e),e.children.forEach(n)};return n(e),i}static selectByClass(t,i,...n){return e.selectAll(t,e=>e instanceof i||n.some(t=>e instanceof t))}static selectByTag(t,i){return e.selectAll(t,e=>e.tag===i)}createNode(e,t,i){const n=this.nodeFactory(e);return n.datum=e,null==t||t(n),null==i?this._nodes.push(n):this._nodes.splice(i,0,n),this.parentNode.appendChild(n),n}update(e,t,i){if(this.garbageBin.size>0&&this.debug(`Selection - update() called with pending garbage: ${e}`),i){const n=new Map(e.map((e,t)=>[i(e),[e,t]]));for(const[e,t]of this._nodesMap.entries())if(n.has(t)){const[i]=n.get(t);e.datum=i,this.garbageBin.delete(e),n.delete(t)}else this.garbageBin.add(e);for(const[e,[i,s]]of n.entries())this._nodesMap.set(this.createNode(i,t,s),e)}else{const i=Math.max(e.length,this.data.length);for(let n=0;n<i;n++)n>=e.length?this.garbageBin.add(this._nodes[n]):n>=this._nodes.length?this.createNode(e[n],t):(this._nodes[n].datum=e[n],this.garbageBin.delete(this._nodes[n]))}return this.data=e.slice(),this.autoCleanup&&this.cleanup(),this}cleanup(){return 0===this.garbageBin.size||(this._nodes=this._nodes.filter(e=>!this.garbageBin.has(e)||(this._nodesMap.delete(e),this.garbageBin.delete(e),this.parentNode.removeChild(e),!1))),this}clear(){return this.update([]),this}isGarbage(e){return this.garbageBin.has(e)}hasGarbage(){return this.garbageBin.size>0}each(e){for(const t of this._nodes.entries())e(t[1],t[1].datum,t[0]);return this}*[Symbol.iterator](){for(let e=0;e<this._nodes.length;e++){const t=this._nodes[e],i=this._nodes[e].datum;yield{node:t,datum:i,index:e}}}select(t){return e.selectAll(this.parentNode,t)}selectByClass(t){return e.selectByClass(this.parentNode,t)}selectByTag(t){return e.selectByTag(this.parentNode,t)}nodes(){return this._nodes}};function Fa(e,t,i,n){const s=e-i,r=t-n;return s*s+r*r}function Ga(e,t,i,n,s,r,o){if(i===s&&n===r)return Math.min(o,Fa(e,t,i,n));const a=s-i,l=r-n,c=Math.max(0,Math.min(1,((e-i)*a+(t-n)*l)/(a*a+l*l))),h=i+c*a,d=n+c*l;return Math.min(o,Fa(e,t,h,d))}function Va(e,t,i,n,s,r,o,a,l){if(a&&([o,r]=[r,o]),!Vs(Math.atan2(t-n,e-i),r,o)){const o=i+Math.cos(r)*s,a=n+Math.sin(r)*s,c=i+Math.cos(r)*s,h=n+Math.sin(r)*s;return Math.min(l,Fa(e,t,o,a),Fa(e,t,c,h))}const c=s-Math.sqrt(Fa(e,t,i,n));return Math.min(l,c*c)}var Ba=class extends Ro{constructor(e={}){super(e),this.x1=0,this.y1=0,this.x2=0,this.y2=0,this.restoreOwnStyles()}set x(e){this.x1=e,this.x2=e}set y(e){this.y1=e,this.y2=e}computeBBox(){return new is(Math.min(this.x1,this.x2),Math.min(this.y1,this.y2),Math.abs(this.x2-this.x1),Math.abs(this.y2-this.y1))}isPointInPath(e,t){if(this.x1===this.x2||this.y1===this.y2){const{x:i,y:n}=this.transformPoint(e,t);return this.computeBBox().grow(this.strokeWidth/2).containsPoint(i,n)}return!1}distanceSquared(e,t){const{x1:i,y1:n,x2:s,y2:r}=this;return Ga(e,t,i,n,s,r,1/0)}render(e){var t;const{ctx:i,forceRender:n,stats:s,devicePixelRatio:r}=e;if(0===this.dirty&&!n)return void(s&&(s.nodesSkipped+=this.nodeCount.count));this.computeTransformMatrix(),this.matrix.toContext(i);let{x1:o,y1:a,x2:l,y2:c}=this;if(o===l){const{strokeWidth:e}=this,t=Math.round(o*r)/r+Math.trunc(e*r)%2/(2*r);o=t,l=t}else if(a===c){const{strokeWidth:e}=this,t=Math.round(a*r)/r+Math.trunc(e*r)%2/(2*r);a=t,c=t}i.beginPath(),i.moveTo(o,a),i.lineTo(l,c),this.fillStroke(i),null==(t=this.fillShadow)||t.markClean(),super.render(e)}};function Ha(e,t,i,n,s,r){if(0===e.size)return!1;let o=e.x,a=e.y;null!=t&&(o-=(t.x-.5)*e.size,a-=(t.y-.5)*e.size);let l=o;o<i?l=i:o>i+s&&(l=i+s);let c=a;a<n?c=n:a>n+r&&(c=n+r);const h=o-l,d=a-c;return Math.sqrt(h*h+d*d)<=.5*e.size}function za(e,t,i,n,s){const r=e.x+e.width>t&&e.x<t+n,o=e.y+e.height>i&&e.y<i+s;return r&&o}function Ua(e,t,i,n,s){return t+n<e.x+e.width&&t>e.x&&i>e.y&&i+s<e.y+e.height}function Wa(e){return null!=e&&"object"==typeof e.point&&"object"==typeof e.label}Ba.className="Line",Ba.defaultStyles=Object.assign({},Ro.defaultStyles,{fill:void 0,strokeWidth:1}),S([rs({redraw:3})],Ba.prototype,"x1",2),S([rs({redraw:3})],Ba.prototype,"y1",2),S([rs({redraw:3})],Ba.prototype,"x2",2),S([rs({redraw:3})],Ba.prototype,"y2",2);var ja={top:{x:0,y:-1},bottom:{x:0,y:1},left:{x:-1,y:0},right:{x:1,y:0}};function Ka(e,t){return e.length===t.length&&e.every((e,i)=>{const n=t[i];return Array.isArray(e)&&Array.isArray(n)?Ka(e,n):e===n})}function $a(e,t){return e.length===t.length&&e.every((e,i)=>Number(e)===Number(t[i]))}function Ya(e){const t=Ne(e)?e:e.split(".");if(1===t.length){const[e]=t;return Ie((t,i,n)=>t[e]=n,t=>t[e])}return Ie((e,i,n)=>nt(e,t,n),e=>tt(e,t))}function qa(e){return Ie((t,i,n)=>t[e]=n)}function Xa(e,t){return Ie((i,n,s)=>i[e][null!=t?t:n]=s)}function Za(e){const{newValue:t,oldValue:i,changeValue:n}=e;return Ie((e,s,r,o)=>(r!==o&&(void 0!==o&&(null==i||i.call(e,o)),void 0!==r&&(null==t||t.call(e,r)),null==n||n.call(e,r,o)),r))}function Qa(e){return t=e,(e,i)=>{De(e,i).observers.push(t)};var t}function Ja(e,t,i){void 0===i||""===i?null==e||e.removeAttribute(t):null==e||e.setAttribute(t,i.toString())}function el(e,t,i,n,s){let{top:r,right:o,bottom:a,left:l,width:c,height:h}=s;return null!=l?null!=c?o=i-l+c:null!=o&&(c=i-l-o):null!=o&&null!=c&&(l=i-o-c),null!=r?null!=h?a=n-r-h:null!=a&&(h=n-a-r):null!=a&&null!=h&&(r=n-a-h),null==c?null==h?(c=e,h=t):c=Math.ceil(e*h/t):null==h&&(h=Math.ceil(t*c/e)),null==l&&(l=null==o?Math.floor((i-c)/2):i-o-c),null==r&&(r=null==a?Math.floor((n-h)/2):n-h-a),{x:l,y:r,width:c,height:h}}var tl="ag-chart-tooltip",il="ag-chart-dark-tooltip",nl={html:"",ariaLabel:""};function sl(e){const t=(e,t,i)=>0===t||"."!==i[t-1]?". ":" ";return e.replace(/<br\s*\/?>/g,t).replace(/<\/p\s+>/g,t).replace(/<\/li\s*\/>/g,t).replace(/<[^>]+>/g,"")}function rl(e,t){var i,n,s;if("string"==typeof e)return{html:e,ariaLabel:e};const{content:r=(null!=(i=null==t?void 0:t.content)?i:""),title:o=(null==t?void 0:t.title),color:a=(null!=(n=null==t?void 0:t.color)?n:"white"),backgroundColor:l=(null!=(s=null==t?void 0:t.backgroundColor)?s:"#888")}=e;return{html:`${o?`<div class="${tl}-title"\n        style="color: ${a}; background-color: ${l}">${o}</div>`:""}${r?`<div class="${tl}-content">${r}</div>`:""}`,ariaLabel:sl(`${o?`${o}: `:""}${r}`)}}var ol=class extends Ct{constructor(){super(...arguments),this.type="pointer",this.xOffset=0,this.yOffset=0}};S([Ys(Gr(["pointer","node","top","right","bottom","left","top-left","top-right","bottom-right","bottom-left"],"a position type"))],ol.prototype,"type",2),S([Ys(nr)],ol.prototype,"xOffset",2),S([Ys(nr)],ol.prototype,"yOffset",2);var al=class extends Ct{constructor(){super(),this.enabled=!0,this.delay=0,this.range="nearest",this.wrapping="hyphenate",this.position=new ol,this.darkTheme=!1,this.enableInteraction=!1,this.lastVisibilityChange=Date.now(),this.wrapTypes=["always","hyphenate","on-space","never"],this.showTimeout=0,this._showArrow=!0,this.element=Mn("div",tl),Ja(this.element,"aria-hidden",!0),this.root=xn("body"),this.root.appendChild(this.element)}destroy(){this.element.remove()}isVisible(){return!this.element.classList.contains(tl+"-hidden")}show(e,t,i,n=!1){var s,r,o,a,l,c,h,d,u;const{element:p}=this;if(null!=i)p.innerHTML=i.html;else if(!p.innerHTML)return void this.toggle(!1);const g=null!=(r=null==(s=t.position)?void 0:s.type)?r:this.position.type,f=null!=(a=null==(o=t.position)?void 0:o.xOffset)?a:0,m=null!=(c=null==(l=t.position)?void 0:l.yOffset)?c:0,v=this.getTooltipBounds({positionType:g,meta:t,yOffset:m,xOffset:f,canvasRect:e}),y=this.getWindowSize(),C=el(p.clientWidth,p.clientHeight,e.width,e.height,v);C.x+=e.x,C.y+=e.y;const b=Un(0,C.x,y.width-p.clientWidth-1),S=Un(0,C.y,y.height-p.clientHeight),w=b!==C.x||S!==C.y,x=!("node"!==g&&"pointer"!==g||w||f||m),E=null!=(d=null!=(h=t.showArrow)?h:this.showArrow)?d:x;this.updateShowArrow(E),p.style.transform=`translate(${Math.round(b)}px, ${Math.round(S)}px)`,this.enableInteraction=null!=(u=t.enableInteraction)&&u,this.delay>0&&!n?(this.toggle(!1),this.showTimeout=setTimeout(()=>{this.toggle(!0)},this.delay)):this.toggle(!0)}getWindowSize(){const{innerWidth:e,innerHeight:t}=En();return{width:e,height:t}}toggle(e){const{classList:t}=this.element,i=(e,i)=>t.toggle(`${tl}-${e}`,i),n=this.isVisible();let s=1/0;if(e||clearTimeout(this.showTimeout),n!==e){const e=Date.now();s=e-this.lastVisibilityChange,this.lastVisibilityChange=e}s>5&&i("no-animation",!n&&e&&s>100),i("no-interaction",!this.enableInteraction),i("hidden",!e),i("arrow",this._showArrow),t.toggle(il,this.darkTheme);for(const e of this.wrapTypes)t.toggle(`${tl}-wrap-${e}`,e===this.wrapping)}pointerLeftOntoTooltip(e){var t;if(!this.enableInteraction)return!1;const i=null==(t=e.sourceEvent.relatedTarget)?void 0:t.classList,n=Boolean(["","-title","-content"].filter(e=>null==i?void 0:i.contains(`${tl}${e}`)));return void 0!==i&&n}updateShowArrow(e){this._showArrow=e}getTooltipBounds({positionType:e,meta:t,yOffset:i,xOffset:n,canvasRect:s}){const{clientWidth:r,clientHeight:o}=this.element,a={width:r,height:o};switch(e){case"node":case"pointer":return a.top=t.offsetY+i-o-8,a.left=t.offsetX+n-r/2,a;case"top":return a.top=i,a.left=s.width/2-r/2+n,a;case"right":return a.top=s.height/2-o/2+i,a.left=s.width-r/2+n,a;case"left":return a.top=s.height/2-o/2+i,a.left=n,a;case"bottom":return a.top=s.height-o+i,a.left=s.width/2-r/2+n,a;case"top-left":return a.top=i,a.left=n,a;case"top-right":return a.top=i,a.left=s.width-r+n,a;case"bottom-right":return a.top=s.height-o+i,a.left=s.width-r+n,a;case"bottom-left":return a.top=s.height-o+i,a.left=n,a}}};S([Ys(er)],al.prototype,"enabled",2),S([Ys(er,{optional:!0})],al.prototype,"showArrow",2),S([Qa((e,t,i)=>{t&&e.element.classList.add(t),i&&e.element.classList.remove(i)}),Ys(ir,{optional:!0})],al.prototype,"class",2),S([Ys(rr)],al.prototype,"delay",2),S([Ys(_r)],al.prototype,"range",2),S([Ys(Rr)],al.prototype,"wrapping",2),S([Ys(Qs)],al.prototype,"position",2),S([Ys(er)],al.prototype,"darkTheme",2);var ll=class extends Ct{constructor(){super(...arguments),this.id=Bn(this),this.node=new Go({zIndex:1}).setProperties({textAlign:"center",pointerEvents:1}),this.enabled=!1,this.textAlign="center",this.fontSize=10,this.fontFamily="sans-serif",this.wrapping="always",this.truncated=!1}getOrAddRegion(e,t){return"root"===t?e.regionManager.getRegion("root"):e.regionManager.addRegionFromProperties({name:t,bboxproviders:[this.node],canInteraction:()=>this.enabled&&this.node.visible})}registerInteraction(e,t){const i=this.getOrAddRegion(e,t);return function(...e){return()=>{for(const t of e)t()}}(i.addListener("hover",t=>this.handleMouseMove(e,t)),i.addListener("leave",t=>this.handleMouseLeave(e,t)))}computeTextWrap(e,t){var i,n;const{text:s,wrapping:r}=this,o=Math.min(null!=(i=this.maxWidth)?i:1/0,e),a=null!=(n=this.maxHeight)?n:t;if(!isFinite(o)&&!isFinite(a))return void(this.node.text=s);const{text:l,truncated:c}=Go.wrap(null!=s?s:"",o,a,this,r);this.node.text=l,this.truncated=c}updateTooltip(e,t){if(void 0!==t&&this.enabled&&this.node.visible&&this.truncated){const{offsetX:i,offsetY:n}=t;return e.tooltipManager.updateTooltip(this.id,{offsetX:i,offsetY:n,lastPointerEvent:t,showArrow:!1},rl({content:this.text})),!0}return!1}handleMouseMove(e,t){this.updateTooltip(e,t)&&t.consume()}handleMouseLeave(e,t){e.tooltipManager.removeTooltip(this.id)}};ll.SMALL_PADDING=10,ll.LARGE_PADDING=20,S([Ys(er)],ll.prototype,"enabled",2),S([Ys(ir,{optional:!0}),Xa("node")],ll.prototype,"text",2),S([Ys(Lr,{optional:!0}),Xa("node")],ll.prototype,"textAlign",2),S([Ys(Dr,{optional:!0}),Xa("node")],ll.prototype,"fontStyle",2),S([Ys(Ir,{optional:!0}),Xa("node")],ll.prototype,"fontWeight",2),S([Ys(rr),Xa("node")],ll.prototype,"fontSize",2),S([Ys(ir),Xa("node")],ll.prototype,"fontFamily",2),S([Ys(vr,{optional:!0}),Xa("node","fill")],ll.prototype,"color",2),S([Ys(rr,{optional:!0})],ll.prototype,"spacing",2),S([Ys(rr,{optional:!0})],ll.prototype,"lineHeight",2),S([Ys(rr,{optional:!0})],ll.prototype,"maxWidth",2),S([Ys(rr,{optional:!0})],ll.prototype,"maxHeight",2),S([Ys(Rr)],ll.prototype,"wrapping",2);var cl=["stroke","lineDash"],hl=hr(e=>Be(e)&&Object.keys(e).every(e=>cl.includes(e)),"objects with gridline style properties such as 'stroke' or 'lineDash'"),dl=class{constructor(){this.enabled=!0,this.width=1,this.style=[{stroke:void 0,lineDash:[]}]}};S([Ys(er)],dl.prototype,"enabled",2),S([Ys(rr)],dl.prototype,"width",2),S([Ys(hl)],dl.prototype,"style",2);var ul=class extends Ct{constructor(){super(...arguments),this.enabled=!0,this.autoWrap=!1,this.fontSize=12,this.fontFamily="Verdana, sans-serif",this.padding=5,this.minSpacing=NaN,this.color="rgba(87, 87, 87, 1)",this.avoidCollisions=!0,this.mirrored=!1,this.parallel=!1}getSideFlag(){return this.mirrored?1:-1}};S([Ys(er)],ul.prototype,"enabled",2),S([Ys(er,{optional:!0})],ul.prototype,"autoWrap",2),S([Ys(rr,{optional:!0})],ul.prototype,"maxWidth",2),S([Ys(rr,{optional:!0})],ul.prototype,"maxHeight",2),S([Ys(Dr,{optional:!0})],ul.prototype,"fontStyle",2),S([Ys(Ir,{optional:!0})],ul.prototype,"fontWeight",2),S([Ys(nr.restrict({min:1}))],ul.prototype,"fontSize",2),S([Ys(ir)],ul.prototype,"fontFamily",2),S([Ys(rr)],ul.prototype,"padding",2),S([Ys(lr),$s(NaN)],ul.prototype,"minSpacing",2),S([Ys(vr,{optional:!0})],ul.prototype,"color",2),S([Ys(ar,{optional:!0})],ul.prototype,"rotation",2),S([Ys(er)],ul.prototype,"avoidCollisions",2),S([Ys(er)],ul.prototype,"mirrored",2),S([Ys(er)],ul.prototype,"parallel",2),S([Ys(tr,{optional:!0})],ul.prototype,"formatter",2),S([Ys(ir,{optional:!0})],ul.prototype,"format",2);var pl=class{constructor(){this.enabled=!0,this.width=1,this.color=void 0}};S([Ys(er)],pl.prototype,"enabled",2),S([Ys(rr)],pl.prototype,"width",2),S([Ys(vr,{optional:!0})],pl.prototype,"color",2);var gl=class extends Ct{constructor(){super(...arguments),this.enabled=!1,this.spacing=ll.SMALL_PADDING,this.fontSize=10,this.fontFamily="sans-serif",this.wrapping="always"}};function fl(e){const[t,i]=jn(e.range),n=Math.floor(t),s=Math.ceil(i);return{min:n,max:s,visible:n!==s}}S([Ys(er)],gl.prototype,"enabled",2),S([Ys(ir,{optional:!0})],gl.prototype,"text",2),S([Ys(rr,{optional:!0})],gl.prototype,"spacing",2),S([Ys(Dr,{optional:!0})],gl.prototype,"fontStyle",2),S([Ys(Ir,{optional:!0})],gl.prototype,"fontWeight",2),S([Ys(rr)],gl.prototype,"fontSize",2),S([Ys(ir)],gl.prototype,"fontFamily",2),S([Ys(vr,{optional:!0})],gl.prototype,"color",2),S([Ys(Rr)],gl.prototype,"wrapping",2),S([Ys(tr,{optional:!0})],gl.prototype,"formatter",2);var ml=2*Math.PI,vl=ml/2;function yl(e){const t=(t,i)=>{const[n=e.min,s=e.max]=jn(null!=i?i:[]);return t<n||t>s},i={fromFn(e,i,n){let s=e.y1+e.translationY,r=e.opacity;return("added"===n||t(e.datum.translationY,e.datum.range))&&(s=i.translationY,r=0),{y:0,translationY:s,opacity:r,phase:Ls[n]}},toFn(e,t,i){const n=t.translationY;let s=1;return"removed"===i&&(s=0),{y:0,translationY:n,opacity:s,finish:{y:n,translationY:0}}},intermediateFn:(e,i,n)=>({visible:!t(e.y)})},n={fromFn(e,i,n){var s;const r=null!=(s=e.previousDatum)?s:i,o=r.x,a=r.y,l=r.rotationCenterX;let c=Math.round(e.translationY),h=r.rotation,d=e.opacity;return"removed"===n||t(r.y,r.range)?h=i.rotation:("added"===n||t(e.datum.y,e.datum.range))&&(c=Math.round(r.translationY),d=0,h=i.rotation),{x:o,y:a,rotationCenterX:l,translationY:c,rotation:h,opacity:d,phase:Ls[n]}},toFn(e,t,i){var n,s;const r=t.x,o=t.y,a=t.rotationCenterX,l=Math.round(t.translationY);let c=0,h=1;var d,u;return"added"===i?(h=1,c=t.rotation):"removed"===i?(h=0,c=t.rotation):(d=null!=(s=null==(n=e.previousDatum)?void 0:n.rotation)?s:t.rotation,u=t.rotation,c=Math.abs(u-d)<vl?u:d>u?u+ml:u-ml),{x:r,y:o,rotationCenterX:a,translationY:l,rotation:c,opacity:h,finish:{rotation:t.rotation}}}};return{tick:i,line:{fromFn(e,t){var i;return y(v({},null!=(i=e.previousDatum)?i:t),{phase:Ls.updated})},toFn:(e,t)=>v({},t)},label:n,group:{fromFn(e,t){const{rotation:i,translationX:n,translationY:s}=e;return{rotation:i,translationX:n,translationY:s,phase:Ls.updated}},toFn(e,t){const{rotation:i,translationX:n,translationY:s}=t;return{rotation:i,translationX:n,translationY:s}}}}}function Cl(){return(e,t)=>({rotation:t.rotation,rotationCenterX:t.rotationCenterX,rotationCenterY:t.rotationCenterY,translationX:t.translationX,translationY:t.translationY})}function bl(e){const{visible:t,min:i,max:n}=e;return(e,s)=>{const r=s.translationY;return{y:r,translationY:0,opacity:1,visible:t&&r>=i&&r<=n}}}function Sl(){return(e,t)=>({x:t.x,y:t.y,translationY:t.translationY,rotation:t.rotation,rotationCenterX:t.rotationCenterX})}function wl(){return(e,t)=>v({},t)}var xl=class e{constructor(t,i,n){let s;this.moduleCtx=t,this.scale=i,this.id=Bn(this),this.nice=!0,this.reverse=!1,this.keys=[],this.dataDomain={domain:[],clipped:!1},this.boundSeries=[],this.includeInvisibleDomains=!1,this.interactionEnabled=!0,this.axisGroup=new Mo({name:`${this.id}-axis`,zIndex:2}),this.lineNode=this.axisGroup.appendChild(new Ba),this.tickLineGroup=this.axisGroup.appendChild(new Mo({name:`${this.id}-Axis-tick-lines`,zIndex:2})),this.tickLabelGroup=this.axisGroup.appendChild(new Mo({name:`${this.id}-Axis-tick-labels`,zIndex:2})),this.crossLineGroup=new Mo({name:`${this.id}-CrossLines`}),this.gridGroup=new Mo({name:`${this.id}-Axis-grid`}),this.gridLineGroup=this.gridGroup.appendChild(new Mo({name:`${this.id}-gridLines`,zIndex:1})),this.tickLineGroupSelection=_a.select(this.tickLineGroup,Ba,!1),this.tickLabelGroupSelection=_a.select(this.tickLabelGroup,Go,!1),this.gridLineGroupSelection=_a.select(this.gridLineGroup,Ba,!1),this.line=new pl,this.tick=this.createTick(),this.gridLine=new dl,this.label=this.createLabel(),this.defaultTickMinSpacing=e.defaultTickMinSpacing,this.translation={x:0,y:0},this.rotation=0,this.layout={label:{fractionDigits:0,padding:this.label.padding,format:this.label.format}},this.destroyFns=[],this.range=[0,1],this.visibleRange=[0,1],this.title=new gl,this._titleCaption=new ll,this.gridLength=0,this.fractionDigits=0,this.gridPadding=0,this.seriesAreaPadding=0,this.tickGenerationResult=void 0,this.maxThickness=1/0,this.moduleMap=new fa,this.refreshScale(),this.destroyFns.push(this._titleCaption.registerInteraction(this.moduleCtx,"root")),this._titleCaption.node.rotation=-Math.PI/2,this.axisGroup.appendChild(this._titleCaption.node),this.destroyFns.push(t.regionManager.getRegion("series").addListener("hover",e=>this.checkAxisHover(e))),this.animationManager=t.animationManager,this.animationState=new ya("empty",{empty:{update:{target:"ready",action:()=>this.resetSelectionNodes()},reset:"empty"},ready:{update:e=>this.animateReadyUpdate(e),resize:()=>this.resetSelectionNodes(),reset:"empty"}}),this._crossLines=[],this.assignCrossLineArrayConstructor(this._crossLines),this.destroyFns.push(t.layoutService.addListener("layout-complete",e=>{null!=s&&null!=xt(e.chart,s)&&this.animationState.transition("resize"),s=v({},e.chart)})),!1!==(null==n?void 0:n.respondsToZoom)&&this.destroyFns.push(t.updateService.addListener("update-complete",e=>{this.minRect=e.minRect}))}get type(){var e;return null!=(e=this.constructor.type)?e:""}set crossLines(e){var t,i;null==(t=this._crossLines)||t.forEach(e=>this.detachCrossLine(e)),e&&this.assignCrossLineArrayConstructor(e),this._crossLines=e,null==(i=this._crossLines)||i.forEach(e=>{this.attachCrossLine(e),this.initCrossLine(e)})}get crossLines(){return this._crossLines}resetAnimation(e){"initial"===e&&this.animationState.transition("reset")}attachCrossLine(e){this.crossLineGroup.appendChild(e.group),this.crossLineGroup.appendChild(e.labelGroup)}detachCrossLine(e){this.crossLineGroup.removeChild(e.group),this.crossLineGroup.removeChild(e.labelGroup)}destroy(){this.moduleMap.destroy(),this.destroyFns.forEach(e=>e())}refreshScale(){var e;this.range=this.scale.range.slice(),null==(e=this.crossLines)||e.forEach(this.initCrossLine,this)}updateRange(){var e;const{range:t,visibleRange:i,scale:n}=this,s=(t[1]-t[0])/(i[1]-i[0]),r=s*i[0],o=t[0]-r;n.range=[o,o+s],null==(e=this.crossLines)||e.forEach(e=>{e.clippedRange=[t[0],t[1]]})}setCrossLinesVisible(e){this.crossLineGroup.visible=e}attachAxis(e,t){t.appendChild(this.gridGroup),e.appendChild(this.axisGroup),e.appendChild(this.crossLineGroup)}detachAxis(e,t){t.removeChild(this.gridGroup),e.removeChild(this.axisGroup),e.removeChild(this.crossLineGroup)}inRange(e,t=0,i=0){const[n,s]=jn(this.range);return e+t>=n-i&&e<=s+i}onLabelFormatChange(e,t,i){const{scale:n,fractionDigits:s}=this,r=!(n instanceof Oa)&&s>0?e=>"number"==typeof e?e.toFixed(s):String(e):e=>String(e);if(i&&n&&n.tickFormat)try{this.labelFormatter=n.tickFormat({ticks:e,specifier:i})}catch(e){this.labelFormatter=r,_.warnOnce(`the axis label format string ${i} is invalid. No formatting will be applied`)}else this.labelFormatter=r}setTickInterval(e){var t;this.scale.interval=null!=(t=this.tick.interval)?t:e}setTickCount(e,t,i){const{scale:n}=this,s=Zr.is(n)||bo.is(n);if(e&&s)return"number"==typeof e?(n.tickCount=e,n.minTickCount=null!=t?t:0,void(n.maxTickCount=null!=i?i:1/0)):void(n instanceof yo&&this.setTickInterval(e))}onGridLengthChange(e,t){var i;(t&&!e||!t&&e)&&this.onGridVisibilityChange(),null==(i=this.crossLines)||i.forEach(this.initCrossLine,this)}onGridVisibilityChange(){this.gridLineGroupSelection.clear()}createLabel(){return new ul}checkAxisHover(e){this.interactionEnabled&&this.computeBBox().containsPoint(e.offsetX,e.offsetY)&&this.moduleCtx.chartEventManager.axisHover(this.id,this.direction)}update(e=0,t=!0){if(!this.tickGenerationResult)return;const{rotation:i,parallelFlipRotation:n,regularFlipRotation:s}=this.calculateRotations(),r=this.label.getSideFlag();this.updatePosition();const o=this.getAxisLineCoordinates(),{tickData:a,combinedRotation:l,textBaseline:c,textAlign:h,primaryTickCount:d}=this.tickGenerationResult,u=this.tickLabelGroupSelection.nodes().map(e=>e.datum.tickId);if(this.updateSelections(o,a.ticks,{combinedRotation:l,textAlign:h,textBaseline:c,range:this.scale.range}),!t||this.animationManager.isSkipped())this.resetSelectionNodes();else{const e=this.calculateUpdateDiff(u,a);this.animationState.transition("update",e)}return this.updateAxisLine(),this.updateLabels(),this.updateVisibility(),this.updateGridLines(r),this.updateTickLines(),this.updateTitle({anyTickVisible:a.ticks.length>0}),this.updateCrossLines({rotation:i,parallelFlipRotation:n,regularFlipRotation:s}),this.updateLayoutState(),d}getAxisLineCoordinates(){const[e,t]=jn(this.range);return{x:0,y1:e,y2:t}}getTickLineCoordinates(e){const t=this.label.getSideFlag()*this.getTickSize(),i=Math.min(0,t);return{x1:i,x2:i+Math.abs(t),y:e.translationY}}getTickLabelProps(e,t){const{label:i}=this,{combinedRotation:n,textBaseline:s,textAlign:r,range:o}=t,a=e.tickLabel,l=i.getSideFlag()*(this.getTickSize()+i.padding+this.seriesAreaPadding),c=""!==a&&null!=a;return{tickId:e.tickId,translationY:e.translationY,fill:i.color,fontFamily:i.fontFamily,fontSize:i.fontSize,fontStyle:i.fontStyle,fontWeight:i.fontWeight,rotation:n,rotationCenterX:l,text:a,textAlign:r,textBaseline:s,visible:c,x:l,y:0,range:o}}getTickSize(){return this.tick.enabled?this.tick.size:this.createTick().size}setTitleProps(e,t){var i;const{title:n}=this;if(n.enabled){if(e.color=n.color,e.fontFamily=n.fontFamily,e.fontSize=n.fontSize,e.fontStyle=n.fontStyle,e.fontWeight=n.fontWeight,e.enabled=n.enabled,e.wrapping=n.wrapping,n.enabled){const s=e.node,r=(null!=(i=n.spacing)?i:0)+t.spacing,o=this.label.getSideFlag(),a=_s(this.rotation),l=-1===o&&a>Math.PI&&a<2*Math.PI?-1:1,c=l*o*Math.PI/2,h=1===l?"bottom":"top",{range:d}=this,u=Math.floor(l*o*(d[0]+d[1])/2),p=-1===o?Math.floor(l*-r):Math.floor(-r),{callbackCache:g}=this.moduleCtx,{formatter:f=e=>e.defaultValue}=n,m=g.call(f,this.getTitleFormatterParams());s.setProperties({rotation:c,text:m,textBaseline:h,visible:!0,x:u,y:p})}}else e.enabled=!1}calculateLayout(e){var t,i;const{rotation:n,parallelFlipRotation:s,regularFlipRotation:r}=this.calculateRotations(),o=this.label.getSideFlag(),a=o*(this.getTickSize()+this.label.padding+this.seriesAreaPadding);this.updateScale(),this.tickGenerationResult=this.generateTicks({primaryTickCount:e,parallelFlipRotation:s,regularFlipRotation:r,labelX:a,sideFlag:o}),this.updateLayoutState();const l=this.tickGenerationResult,{tickData:c,combinedRotation:h,textBaseline:d,textAlign:u}=l,p=C(l,["tickData","combinedRotation","textBaseline","textAlign"]),g=[],{x:f,y1:m,y2:b}=this.getAxisLineCoordinates(),S=new is(f+Math.min(o*this.seriesAreaPadding,0),m,this.seriesAreaPadding,b-m);if(g.push(S),this.tick.enabled&&c.ticks.forEach(e=>{const{x1:t,x2:i,y:n}=this.getTickLineCoordinates(e),s=new is(t,n,i-t,0);g.push(s)}),this.label.enabled){const e=new Go;c.ticks.forEach(t=>{const i=this.getTickLabelProps(t,{combinedRotation:h,textAlign:u,textBaseline:d,range:this.scale.range});if(!i.visible)return;e.setProperties(y(v({},i),{translationY:Math.round(t.translationY)}));const n=e.computeTransformedBBox();n&&g.push(n)})}if(null==(t=this.title)?void 0:t.enabled){const e=new ll,t=is.merge(g).width;this.setTitleProps(e,{spacing:t});const i=e.node.computeTransformedBBox();i&&g.push(i)}const w=(e=>{const t=new ls,{rotation:i,translationX:n,translationY:s,rotationCenterX:r,rotationCenterY:o}=this.getAxisTransform();return ls.updateTransformMatrix(t,1,1,i,n,s,{scalingCenterX:0,scalingCenterY:0,rotationCenterX:r,rotationCenterY:o}),t.transformBBox(e)})(is.merge(g)),x=this.isAnySeriesActive();return null==(i=this.crossLines)||i.forEach(e=>{var t;e.sideFlag=-o,e.direction=n===-Math.PI/2?"x":"y",e instanceof ga&&(e.label.parallel=null!=(t=e.label.parallel)?t:this.label.parallel),e.parallelFlipRotation=s,e.regularFlipRotation=r,e.calculateLayout(x,this.reverse)}),{primaryTickCount:e=p.primaryTickCount,bbox:w}}updateLayoutState(){this.layout.label={fractionDigits:this.fractionDigits,padding:this.label.padding,format:this.label.format}}setDomain(e){this.dataDomain=this.normaliseDataDomain(e),this.reverse&&this.dataDomain.domain.reverse(),this.scale.domain=this.dataDomain.domain}updateScale(){this.updateRange(),this.calculateDomain(),this.setTickInterval(this.tick.interval);const{scale:e,nice:t}=this;Zr.is(e)&&(e.nice=t,e.update())}calculateRotations(){const e=Bs(this.rotation);return{rotation:e,parallelFlipRotation:_s(e),regularFlipRotation:_s(e-Math.PI/2)}}generateTicks({primaryTickCount:e,parallelFlipRotation:t,regularFlipRotation:i,labelX:n,sideFlag:s}){var r;const{scale:o,tick:a,label:{parallel:l,rotation:c,fontFamily:h,fontSize:d,fontStyle:u,fontWeight:p}}=this,g=void 0!==e,{defaultRotation:f,configuredRotation:m,parallelFlipFlag:C,regularFlipFlag:b}=zo({rotation:c,parallel:l,regularFlipRotation:i,parallelFlipRotation:t}),S=m+f,w=new ls,{maxTickCount:x}=this.estimateTickCount({minSpacing:a.minSpacing,maxSpacing:null!=(r=a.maxSpacing)?r:NaN}),E=!Zr.is(o)&&!bo.is(o)||isNaN(x)?10:x;let M=Uo(l,m,0,s,b);const A=function(e,t,i,n){return e&&!t?i*n===-1?"hanging":"bottom":"middle"}(l,m,s,C),T={fontFamily:h,fontSize:d,fontStyle:u,fontWeight:p,textBaseline:A,textAlign:M};let D={rawTicks:[],ticks:[],labelCount:0},I=0,R=0,L=!0,k=!1;for(;L&&I<=E&&!k;){R=0,M=Uo(l,m,0,s,b);const t=this.getTickStrategies({secondaryAxis:g,index:I});for(const i of t){({tickData:D,index:I,autoRotation:R,terminate:k}=i({index:I,tickData:D,textProps:T,labelOverlap:L,terminate:k,primaryTickCount:e}));const t=0!==m||0!==R,r=S+R;M=Uo(l,m,R,s,b),L=!!this.label.avoidCollisions&&this.checkLabelOverlap(r,t,w,D.ticks,n,y(v({},T),{textAlign:M}))}}const P=f+m+R;return!g&&D.rawTicks.length>0&&(e=D.rawTicks.length),{tickData:D,primaryTickCount:e,combinedRotation:P,textBaseline:A,textAlign:M}}getTickStrategies({index:e,secondaryAxis:t}){const{scale:i,label:n,tick:s}=this,r=Zr.is(i)||bo.is(i),o=n.enabled&&n.avoidCollisions,a=!r&&0!==e&&o,l=!0===n.autoRotate&&void 0===n.rotation,c=[];let h;if(h=this.tick.values?3:t?1:a?2:0,c.push(({index:e,tickData:t,primaryTickCount:i,terminate:n})=>this.createTickData(h,e,t,n,i)),!r&&!isNaN(s.minSpacing)){const e=({index:e,tickData:t,primaryTickCount:i,terminate:n})=>this.createTickData(2,e,t,n,i);c.push(e)}if(!o)return c;if(n.autoWrap){const e=({index:e,tickData:t,textProps:i})=>this.wrapLabels(t,e,i);c.push(e)}else if(l){const e=({index:e,tickData:t,labelOverlap:i,terminate:n})=>({index:e,tickData:t,autoRotation:this.getAutoRotation(i),terminate:n});c.push(e)}return c}createTickData(e,t,i,n,s){var r;const{scale:o,tick:a}=this,{maxTickCount:l,minTickCount:c,defaultTickCount:h}=this.estimateTickCount({minSpacing:a.minSpacing,maxSpacing:null!=(r=a.maxSpacing)?r:NaN}),d=Zr.is(o)||bo.is(o),u=!d||isNaN(l)?10:l;let p=d?Math.max(h-t,c):l;const g=void 0===a.interval&&void 0===a.values&&p>c&&(d||2===e);let f=!0;for(;f&&t<=u;){const n=i.rawTicks;p=d?Math.max(h-t,c):l;const{rawTicks:r,ticks:o,labelCount:a}=this.getTicks({tickGenerationType:e,previousTicks:n,tickCount:p,minTickCount:c,maxTickCount:l,primaryTickCount:s});i.rawTicks=r,i.ticks=o,i.labelCount=a,f=!!g&&$a(r,n),t++}const m=void 0!==a.interval||void 0!==a.values;return n||(n=m),{tickData:i,index:t,autoRotation:0,terminate:n}}checkLabelOverlap(e,t,i,n,s,r){ls.updateTransformMatrix(i,1,1,e,0,0);const o=this.createLabelData(n,s,r,i),a=function(e,t){return isNaN(e)?t?0:10:e}(this.label.minSpacing,t);return function(e,t){const i=[];for(let n=0;n<e.length;n++){const s=e[n],{point:{x:r,y:o},label:{text:a}}=s;let{label:{width:l,height:c}}=s;if(l+=null!=t?t:0,c+=null!=t?t:0,i.some(e=>za(e,r,o,l,c)))return!0;i.push({index:n,text:a,x:r,y:o,width:l,height:c,datum:s})}return!1}(o,a)}createLabelData(e,t,i,n){const s=[],r=new Vo(i);for(const{tickLabel:i,translationY:o}of e){if(""===i||null==i)continue;const{width:e,height:a}=r.size(i),l=Wo(i,new is(t,o,e,a),t,o,n);s.push(l)}return s}getAutoRotation(e){var t;return e?_s(Bs(null!=(t=this.label.autoRotateAngle)?t:0)):0}getTicks({tickGenerationType:e,previousTicks:t,tickCount:i,minTickCount:n,maxTickCount:s,primaryTickCount:r}){var o;const{range:a,scale:l,visibleRange:c}=this;let h;switch(e){case 3:if(Zr.is(l)){const[e,t]=jn(l.getDomain().map(Number));h=this.tick.values.filter(i=>i>=e&&i<=t).sort((e,t)=>e-t)}else h=this.tick.values;break;case 1:h=Zr.is(l)?this.updateSecondaryAxisTicks(r):this.createTicks(i,n,s);break;case 2:h=this.filterTicks(t,i);break;default:h=this.createTicks(i,n,s)}this.fractionDigits=h.fractionDigits>=0?h.fractionDigits:0;const d=(null!=(o=l.bandwidth)?o:0)/2,u=[];let p=0;const g=new Map,f=Math.max(0,Math.floor(c[0]*h.length)),m=Math.min(h.length,Math.ceil(c[1]*h.length)),v=h.slice(f,m);this.onLabelFormatChange(v,h,this.label.format);for(let e=0;e<v.length;e++){const t=v[e],i=l.convert(t)+d;if(a.length>0&&!this.inRange(i,0,.001))continue;const n=this.formatTick(t,f+e);let s=n;if(g.has(s)){const e=g.get(s);g.set(s,e+1),s=`${s}_${e}`}else g.set(s,1);u.push({tick:t,tickId:s,tickLabel:n,translationY:Math.floor(i)}),""!==n&&null!=n&&p++}return{rawTicks:h,ticks:u,labelCount:p}}filterTicks(e,t){var i;const n=isNaN(this.tick.minSpacing)&&isNaN(null!=(i=this.tick.maxSpacing)?i:NaN)?2:Math.ceil(e.length/t);return e.filter((e,t)=>t%n===0)}createTicks(e,t,i){var n,s,r;return this.setTickCount(e,t,i),null!=(r=null==(s=(n=this.scale).ticks)?void 0:s.call(n))?r:[]}estimateTickCount({minSpacing:e,maxSpacing:t}){const{minRect:i,label:{avoidCollisions:n}}=this;if(!n)return{minTickCount:Zr.defaultMaxTickCount,maxTickCount:Zr.defaultMaxTickCount,defaultTickCount:Zr.defaultMaxTickCount};const s=this.calculateRangeWithBleed(),r=Math.max(this.defaultTickMinSpacing,s/Zr.defaultMaxTickCount);let o=!isNaN(t);isNaN(e)&&(e=r),isNaN(t)&&(t=s),e>t&&(e===r?e=t:t=e);let a=1;i&&(a="x"===this.direction?i.width:i.height),o&&(o=a<r);const l=Un(1,Math.floor(s/e),o?Math.min(Math.floor(s/a),100):100),c=Math.min(l,Math.ceil(s/t));return{minTickCount:c,maxTickCount:l,defaultTickCount:Un(c,Zr.defaultTickCount,l)}}updateVisibility(){this.moduleCtx.animationManager.isSkipped()&&this.resetSelectionNodes(),this.tickLineGroup.visible=this.tick.enabled,this.gridLineGroup.visible=this.gridLine.enabled,this.tickLabelGroup.visible=this.label.enabled}updateCrossLines({rotation:e,parallelFlipRotation:t,regularFlipRotation:i}){var n;const s=this.label.getSideFlag(),r=this.isAnySeriesActive();null==(n=this.crossLines)||n.forEach(n=>{var o;n.sideFlag=-s,n.direction=e===-Math.PI/2?"x":"y",n instanceof ga&&(n.label.parallel=null!=(o=n.label.parallel)?o:this.label.parallel),n.parallelFlipRotation=t,n.regularFlipRotation=i,n.update(r)})}updateTickLines(){const{tick:e,label:t}=this,i=t.getSideFlag();this.tickLineGroupSelection.each(t=>{t.strokeWidth=e.width,t.stroke=e.color,t.x1=i*this.getTickSize(),t.x2=0})}calculateAvailableRange(){return Kn(this.range)}calculateRangeWithBleed(){const e=1/Kn(this.visibleRange);return qn(this.calculateAvailableRange()*e,2)}calculateDomain(){const e=this.boundSeries.filter(e=>this.includeInvisibleDomains||e.isEnabled()).flatMap(e=>e.getDomain(this.direction));this.setDomain(e)}getAxisTransform(){return{rotation:Bs(this.rotation),rotationCenterX:0,rotationCenterY:0,translationX:Math.floor(this.translation.x),translationY:Math.floor(this.translation.y)}}updatePosition(){const{crossLineGroup:e,axisGroup:t,gridGroup:i,translation:n,gridLineGroupSelection:s,gridPadding:r,gridLength:o}=this,{rotation:a}=this.calculateRotations(),l=this.label.getSideFlag(),c=Math.floor(n.x),h=Math.floor(n.y);e.setProperties({rotation:a,translationX:c,translationY:h}),i.setProperties({rotation:a,translationX:c,translationY:h}),t.datum=this.getAxisTransform(),s.each(e=>{e.x1=r,e.x2=-l*o+r})}updateSecondaryAxisTicks(e){throw new Error("AG Charts - unexpected call to updateSecondaryAxisTicks() - check axes configuration.")}updateSelections(e,t,i){this.lineNode.datum=e,this.gridLineGroupSelection.update(this.gridLength?t:[],e=>e.append(new Ba),e=>e.tickId),this.tickLineGroupSelection.update(t,e=>e.appendChild(new Ba),e=>e.tickId),this.tickLabelGroupSelection.update(t.map(e=>this.getTickLabelProps(e,i)),e=>e.appendChild(new Go),e=>e.tickId)}updateAxisLine(){const{line:e}=this,t=e.enabled?e.width:0;this.lineNode.setProperties({stroke:e.color,strokeWidth:t})}updateGridLines(e){const{gridLine:{style:t,width:i},gridPadding:n,gridLength:s}=this;0!==s&&0!==t.length&&this.gridLineGroupSelection.each((r,o,a)=>{const{stroke:l,lineDash:c}=t[a%t.length];r.setProperties({x1:n,x2:-e*s+n,fill:void 0,stroke:l,strokeWidth:i,lineDash:c})})}updateLabels(){const{label:e}=this;e.enabled&&this.tickLabelGroupSelection.each((e,t)=>{e.setProperties(t,["fill","fontFamily","fontSize","fontStyle","fontWeight","text","textAlign","textBaseline"])})}wrapLabels(e,t,i){const{parallel:n,maxWidth:s,maxHeight:r}=this.label;let o=this.maxThickness,a=Math.round(this.calculateAvailableRange()/e.labelCount);return n&&([o,a]=[a,o]),e.ticks.forEach(e=>{const{text:t}=Go.wrap(e.tickLabel,null!=s?s:o,null!=r?r:a,i,"hyphenate");e.tickLabel=t}),{tickData:e,index:t,autoRotation:0,terminate:!0}}updateTitle(e){const{rotation:t,title:i,_titleCaption:n,lineNode:s,tickLineGroup:r,tickLabelGroup:o}=this;if(!i)return void(n.enabled=!1);let a=0;if(i.enabled&&e.anyTickVisible){const e=Mo.computeBBox([r,o,s]);a+=(0===t?e.width:e.height)+(this.tickLabelGroup.visible?0:this.seriesAreaPadding)}this.setTitleProps(n,{spacing:a})}formatTick(e,t){return this.datumFormatter(t)(e)}formatDatum(e){return String(e)}datumFormatter(e=0){const{label:t,labelFormatter:i,fractionDigits:n,moduleCtx:{callbackCache:s}}=this;return t.formatter?r=>{var o;return null!=(o=s.call(t.formatter,{value:n>0?r:String(r),index:e,fractionDigits:n,formatter:i}))?o:r}:i?e=>{var t;return null!=(t=s.call(i,e))?t:String(e)}:e=>String(e)}computeBBox(){return this.axisGroup.computeBBox()}initCrossLine(e){e.scale=this.scale,e.gridLength=this.gridLength}isAnySeriesActive(){return this.boundSeries.some(e=>this.includeInvisibleDomains||e.isEnabled())}clipTickLines(e,t,i,n){this.tickLineGroup.setClipRectInGroupCoordinateSpace(new is(e,t,i,n))}clipGrid(e,t,i,n){this.gridGroup.setClipRectInGroupCoordinateSpace(new is(e,t,i,n))}calculatePadding(e,t){const i=.01*Math.abs(this.reverse?t:e);return[i,i]}getTitleFormatterParams(){var e;const t=this.boundSeries.reduce((e,t)=>{const i=t.getKeys(this.direction),n=t.getNames(this.direction);for(let t=0;t<i.length;t++)e.push({key:i[t],name:n[t]});return e},[]);return{direction:this.direction,boundSeries:t,defaultValue:null==(e=this.title)?void 0:e.text}}normaliseDataDomain(e){return{domain:[...e],clipped:!1}}getLayoutState(){return v({rect:this.computeBBox(),gridPadding:this.gridPadding,seriesAreaPadding:this.seriesAreaPadding,tickSize:this.getTickSize(),direction:this.direction,domain:this.dataDomain.domain,scale:this.scale},this.layout)}getModuleMap(){return this.moduleMap}createModuleContext(){return null!=this.axisContext||(this.axisContext=this.createAxisContext()),y(v({},this.moduleCtx),{parent:this.axisContext})}createAxisContext(){return{axisId:this.id,direction:this.direction,continuous:Zr.is(this.scale),keys:()=>this.boundSeries.flatMap(e=>e.getKeys(this.direction)),seriesKeyProperties:()=>this.boundSeries.reduce((e,t)=>(t.getKeyProperties(this.direction).forEach(t=>{e.indexOf(t)<0&&e.push(t)}),e),[]),scaleValueFormatter:e=>{var t,i;return e?null==(i=(t=this.scale).tickFormat)?void 0:i.call(t,{specifier:e}):this.formatDatum},scaleBandwidth:()=>{var e;return null!=(e=this.scale.bandwidth)?e:0},scaleConvert:e=>this.scale.convert(e),scaleInvert:e=>{var t,i;return null==(i=(t=this.scale).invert)?void 0:i.call(t,e)}}}animateReadyUpdate(e){const{animationManager:t}=this.moduleCtx,i=yl(fl(this));ks(this.id,"axis-group",t,[this.axisGroup],i.group),ks(this.id,"line",t,[this.lineNode],i.line),ks(this.id,"line-paths",t,[this.gridLineGroupSelection,this.tickLineGroupSelection],i.tick,(e,t)=>t.tickId,e),ks(this.id,"tick-labels",t,[this.tickLabelGroupSelection],i.label,(e,t)=>t.tickId,e)}resetSelectionNodes(){const{gridLineGroupSelection:e,tickLineGroupSelection:t,tickLabelGroupSelection:i,lineNode:n}=this,s=fl(this);va([this.axisGroup],(e,t)=>({rotation:t.rotation,rotationCenterX:t.rotationCenterX,rotationCenterY:t.rotationCenterY,translationX:t.translationX,translationY:t.translationY})),va([e,t],bl(s)),va([i],(e,t)=>({x:t.x,y:t.y,translationY:t.translationY,rotation:t.rotation,rotationCenterX:t.rotationCenterX})),va([n],wl())}calculateUpdateDiff(e,t){const i=new Set,n=new Set,s={},r=Math.max(e.length,t.ticks.length);for(let o=0;o<r;o++){const r=t.ticks[o],a=e[o],l=null==r?void 0:r.tickId;s[null!=l?l:a]=r,a!==l&&(n.has(l)?n.delete(l):l&&i.add(l),i.has(a)?i.delete(a):a&&n.add(a))}return{changed:i.size>0||n.size>0,added:i,removed:n}}isReversed(){return this.reverse}};xl.defaultTickMinSpacing=50,S([Ys(er)],xl.prototype,"nice",2),S([Ys(er)],xl.prototype,"reverse",2),S([Ys(Sr)],xl.prototype,"keys",2),S([Ys(Qs,{optional:!0})],xl.prototype,"title",2),S([Qa((e,t,i)=>e.onGridLengthChange(t,i))],xl.prototype,"gridLength",2);var El=xl,Ml=class extends ul{constructor(){super(...arguments),this.autoRotateAngle=335}};S([Ys(er,{optional:!0})],Ml.prototype,"autoRotate",2),S([Ys(ar)],Ml.prototype,"autoRotateAngle",2);var Al=class e extends El{constructor(){super(...arguments),this.thickness=0,this.position="left"}static is(t){return t instanceof e}get direction(){return["top","bottom"].includes(this.position)?"x":"y"}updateDirection(){switch(this.position){case"top":this.rotation=-90,this.label.mirrored=!0,this.label.parallel=!0;break;case"right":this.rotation=0,this.label.mirrored=!0,this.label.parallel=!1;break;case"bottom":this.rotation=-90,this.label.mirrored=!1,this.label.parallel=!0;break;case"left":this.rotation=0,this.label.mirrored=!1,this.label.parallel=!1}this.axisContext&&(this.axisContext.position=this.position,this.axisContext.direction=this.direction)}update(e,t){return this.updateDirection(),super.update(e,t)}calculateLayout(e){return this.updateDirection(),super.calculateLayout(e)}createAxisContext(){return y(v({},super.createAxisContext()),{position:this.position})}assignCrossLineArrayConstructor(e){qr(e,ga)}createLabel(){return new Ml}};S([Ys(rr)],Al.prototype,"thickness",2),S([Ys(Tr)],Al.prototype,"position",2);var Tl=Al,Dl=class extends Kr{constructor(){super(...arguments),this.minSpacing=NaN}};S([Ys(Vr),$s(NaN)],Dl.prototype,"minSpacing",2);var Il=class extends Tl{constructor(e,t=new Ks){super(e,t),this._paddingOverrideEnabled=!1,this.groupPaddingInner=.1,this.includeInvisibleDomains=!0}set paddingInner(e){this._paddingOverrideEnabled=!0,this.scale.paddingInner=e}get paddingInner(){return this._paddingOverrideEnabled=!0,this.scale.paddingInner}set paddingOuter(e){this.scale.paddingOuter=e}get paddingOuter(){return this.scale.paddingOuter}createTick(){return new Dl}normaliseDataDomain(e){const t=[],i=new Set;for(const n of e){const e=n instanceof Date?n.getTime():n;i.has(e)||(i.add(e),t.push(n))}return{domain:t,clipped:!1}}calculateDomain(){if(!this._paddingOverrideEnabled){const e=this.boundSeries.map(e=>{var t;return null==(t=e.getBandScalePadding)?void 0:t.call(e)}).filter(e=>null!=e);e.length>0&&(this.scale.paddingInner=Math.min(...e.map(e=>e.inner)),this.scale.paddingOuter=Math.max(...e.map(e=>e.outer)))}return super.calculateDomain()}};Il.className="CategoryAxis",Il.type="category",S([Ys(or)],Il.prototype,"groupPaddingInner",2);var Rl=class{constructor(e="",t,i=0){this.x=0,this.y=0,this.subtreeLeft=NaN,this.subtreeRight=NaN,this.screenX=0,this.screenY=0,this.children=[],this.leafCount=0,this.prelim=0,this.mod=0,this.ancestor=this,this.change=0,this.shift=0,this.label=e,this.parent=t,this.depth=t?t.depth+1:0,this.number=i}getLeftSibling(){return this.number>0&&this.parent?this.parent.children[this.number-1]:void 0}getLeftmostSibling(){return this.number>0&&this.parent?this.parent.children[0]:void 0}nextLeft(){return this.children?this.children[0]:this.thread}nextRight(){return this.children?this.children[this.children.length-1]:this.thread}getSiblings(){return this.parent?this.parent.children.filter((e,t)=>t!==this.number):[]}};function Ll(e,t,i){const n=i/(t.number-e.number);t.change-=n,t.shift+=i,e.change+=n,t.prelim+=i,t.mod+=i}function kl(e,t,i){return t.getSiblings().indexOf(e.ancestor)>=0?e.ancestor:i}function Pl(e,t){const i=e.children;if(i.length){let n=i[0];i.forEach(e=>{Pl(e,t),n=function(e,t,i){const n=e.getLeftSibling();if(n){let s=e,r=e,o=n,a=r.getLeftmostSibling(),l=r.mod,c=s.mod,h=o.mod,d=a.mod;for(;o.nextRight()&&r.nextLeft();){o=o.nextRight(),r=r.nextLeft(),a=a.nextLeft(),s=s.nextRight(),s.ancestor=e;const n=o.prelim+h-(r.prelim+l)+i;n>0&&(Ll(kl(o,e,t),e,n),l+=n,c+=n),h+=o.mod,l+=r.mod,d+=a.mod,c+=s.mod}o.nextRight()&&!s.nextRight()?(s.thread=o.nextRight(),s.mod+=h-c):(r.nextLeft()&&!a.nextLeft()&&(a.thread=r.nextLeft(),a.mod+=l-d),t=e)}return t}(e,n,t)}),function(e){const t=e.children;if(t){let e=0,i=0;for(let n=t.length-1;n>=0;n--){const s=t[n];s.prelim+=e,s.mod+=e,i+=s.change,e+=s.shift+i}}}(e);const s=(i[0].prelim+i.at(-1).prelim)/2,r=e.getLeftSibling();r?(e.prelim=r.prelim+t,e.mod=e.prelim-s):e.prelim=s}else{const i=e.getLeftSibling();e.prelim=i?i.prelim+t:0}}var Nl=class{constructor(){this.top=1/0,this.right=-1/0,this.bottom=-1/0,this.left=1/0}update(e,t){const{x:i,y:n}=t(e);i>this.right&&(this.right=i),i<this.left&&(this.left=i),n>this.bottom&&(this.bottom=n),n<this.top&&(this.top=n)}};function Ol(e,t,i){e.x=e.prelim+t,e.y=e.depth,i.update(e),e.children.forEach(n=>Ol(n,t+e.mod,i))}function _l(e){const t=e.children;let i=0;t.forEach(e=>{_l(e),e.children.length?i+=e.leafCount:i++}),e.leafCount=i,t.length?(e.subtreeLeft=t[0].subtreeLeft,e.subtreeRight=t[e.children.length-1].subtreeRight,e.x=(e.subtreeLeft+e.subtreeRight)/2):(e.subtreeLeft=e.x,e.subtreeRight=e.x)}function Fl(e){const t=new Gl;return Pl(e,1),Ol(e,-e.prelim,t),_l(e),t}var Gl=class{constructor(){this.dimensions=new Nl,this.leafCount=0,this.nodes=[],this.leafNodes=[],this.nonLeafNodes=[],this.depth=0}update(e){this.dimensions.update(e,e=>({x:e.x,y:e.y})),e.children.length?this.nonLeafNodes.push(e):(this.leafCount++,this.leafNodes.push(e)),e.depth>this.depth&&(this.depth=e.depth),this.nodes.push(e)}resize(e,t,i=0,n=0,s=!1){const r=this.leafCount-1,o=this.depth,a=this.dimensions;let l=1,c=1;if(e>0&&r){const t=(a.right-a.left)/r;l=e/r/t,s&&(l=-l)}if(t>0&&o){const e=(a.bottom-a.top)/o;c=t/o/e}const h=new Nl;this.nodes.forEach(e=>{e.screenX=e.x*l,e.screenY=e.y*c,h.update(e,e=>({x:e.screenX,y:e.screenY}))});const d=-h.left,u=-h.top;this.nodes.forEach(e=>{e.screenX+=d+i,e.screenY+=u+n})}},Vl=class extends ul{constructor(){super(...arguments),this.grid=!1}};S([Ys(er)],Vl.prototype,"grid",2);var Bl=class extends Tl{constructor(e){super(e,new Ks),this.tickScale=new Ks,this.line=new pl,this.label=new Vl,this.labelColor="rgba(87, 87, 87, 1)",this.includeInvisibleDomains=!0;const{tickLineGroup:t,tickLabelGroup:i,gridLineGroup:n,tickScale:s,scale:r}=this;r.paddingOuter=.1,r.paddingInner=2*r.paddingOuter,this.refreshScale(),s.paddingInner=1,s.paddingOuter=0,this.gridLineSelection=_a.select(n,Ba),this.axisLineSelection=_a.select(t,Ba),this.separatorSelection=_a.select(t,Ba),this.labelSelection=_a.select(i,Go)}updateRange(){const{range:e,visibleRange:t,scale:i}=this,n=(e[1]-e[0])/(t[1]-t[0]),s=n*t[0],r=e[0]-s;this.tickScale.range=i.range=[r,r+n],this.resizeTickTree()}resizeTickTree(){var e;const t=this.scale,i=t.domain.length?[t.convert(t.domain[0]),t.convert(t.domain[t.domain.length-1])]:t.range,n=this.tickTreeLayout,s=this.lineHeight;n&&n.resize(Math.abs(i[1]-i[0]),n.depth*s,(Math.min(i[0],i[1])||0)+(null!=(e=t.bandwidth)?e:0)/2,-n.depth*s,i[1]-i[0]<0)}get lineHeight(){return 1.5*this.label.fontSize}onGridVisibilityChange(){this.gridLineSelection.clear(),this.labelSelection.clear()}createTick(){return new Dl}calculateDomain(){var e;const{direction:t}=this;let i=null;const n=this.boundSeries.filter(e=>e.visible).flatMap(e=>{if("y"===t||i)return e.getDomain(t);if(null===i){const n=e.getDomain(t);return i=We(n[0]),n}return[]});this.setDomain(null!=(e=hn(n))?e:fn(n));const{domain:s}=this.dataDomain;this.tickTreeLayout=Fl(function(e,t=!0){const i=new Rl;let n=0;return t&&e.forEach(e=>n=Math.max(n,e.labels.length)),e.forEach(e=>{if(t)for(;e.labels.length<n;)e.labels.unshift("");!function(e,t){const i=t.labels.slice().reverse(),n=i.length-1;i.forEach((t,i)=>{const s=e.children,r=s.find(e=>e.label===t),o=i!==n;if(r&&o)e=r;else{const i=new Rl(t,e);i.number=s.length,s.push(i),o&&(e=i)}})}(i,e)}),i}(s)),this.tickScale.domain=s.concat(""),this.resizeTickTree()}update(){this.computedLayout&&(this.updatePosition(),this.updateTitleCaption(),this.updateCategoryLabels(),this.updateSeparators(),this.updateAxisLines(),this.updateCategoryGridLines(),this.resetSelectionNodes())}updateTitleCaption(){const{_titleCaption:e}=this;e.node.visible=!1}updateCategoryLabels(){if(!this.computedLayout)return;const{tickLabelLayout:e}=this.computedLayout;this.labelSelection.update(e).each((e,t)=>{e.setProperties(t)})}updateSeparators(){if(!this.computedLayout)return;const{separatorLayout:e}=this.computedLayout,{range:t}=this;this.separatorSelection.update(e).each((e,i)=>{e.x1=i.x1,e.x2=i.x2,e.y1=i.y,e.y2=i.y,e.visible=i.y>=t[0]-1e-7&&i.y<=t[1]+1e-7,e.stroke=this.tick.color,e.fill=void 0,e.strokeWidth=1})}updateAxisLines(){if(!this.computedLayout)return;const{axisLineLayout:e}=this.computedLayout;this.axisLineSelection.update(e).each((e,t)=>{e.setProperties(y(v({},t),{stroke:this.line.color,strokeWidth:this.line.width})),e.x1=t.x,e.x2=t.x,e.y1=t.y1,e.y2=t.y2,e.strokeWidth=this.line.width,e.stroke=this.line.color})}updateCategoryGridLines(){const{gridLength:e,gridLine:t,label:i,range:n,tickScale:s}=this,r=s.ticks(),o=i.getSideFlag(),a=this.gridLineSelection.update(e?r:[]);if(e){const{width:i,style:r}=t,l=r.length;a.each((t,a,c)=>{const h=Math.round(s.convert(a));t.x1=0,t.x2=-o*e,t.y1=h,t.y2=h,t.visible=h>=n[0]&&h<=n[1];const{stroke:d,lineDash:u}=r[c%l];t.stroke=d,t.strokeWidth=i,t.lineDash=u,t.fill=void 0})}}computeLayout(){this.updateDirection(),this.calculateDomain(),this.updateRange();const{scale:e,label:t,label:{parallel:i},moduleCtx:{callbackCache:n},range:s,title:r,title:{formatter:o=e=>e.defaultValue}={}}=this,a=e.range[0],l=e.range[1],c=Math.abs(l-a)/e.domain.length||0,h=Math.ceil(t.fontSize/c),d=Bs(this.rotation),u=Math.abs(Math.cos(d))<1e-8,p=t.getSideFlag(),g=this.lineHeight,f=this.tickTreeLayout,m=e.ticks(),C=f?f.nodes:[],b=!!f&&f.depth>1,{defaultRotation:S,configuredRotation:w,parallelFlipFlag:x}=zo({rotation:t.rotation,parallel:i,regularFlipRotation:_s(d-Math.PI/2),parallelFlipRotation:_s(d)}),E=[],M=new Map;let A=0;const T=new Go,D=(e,i)=>{var a;if(T.setProperties({fill:t.color,fontFamily:t.fontFamily,fontSize:t.fontSize,fontStyle:t.fontStyle,fontWeight:t.fontWeight,textAlign:"center",textBaseline:-1===x?"bottom":"hanging",translationX:e.screenY-.25*t.fontSize,translationY:e.screenX}),0===i){if(!((null==r?void 0:r.enabled)&&m.length>0))return!1;const i=n.call(o,this.getTitleFormatterParams());T.setProperties({fill:r.color,fontFamily:r.fontFamily,fontSize:r.fontSize,fontStyle:r.fontStyle,fontWeight:r.fontWeight,text:i,textBaseline:"hanging",translationX:e.screenY-.25*t.fontSize,translationY:e.screenX})}else{if(i%h!==0)return!1;if(!(e.screenX>=s[0]&&e.screenX<=s[1]))return!1;t.formatter?T.text=null!=(a=n.call(t.formatter,{value:String(e.label),index:i}))?a:String(e.label):T.text=String(e.label)}return!0};C.forEach((e,t)=>{if(!D(e,t))return;const i=T.computeTransformedBBox();i&&(M.set(t,i),!e.children.length&&i.width>A&&(A=i.width))});const I=p*t.padding,R=this.label.grid,L=[];C.forEach((e,t)=>{let i=D(e,t);const n=t;T.x=I,T.rotationCenterX=I;const s=!e.children.length;if(s)T.rotation=w,T.textAlign="end",T.textBaseline="middle";else{T.translationX-=A-g+this.label.padding;const t=e.leafCount*c,s=M.get(n);s&&s.width>t?(i=!1,M.delete(n)):T.rotation=u?S:-Math.PI/2}if(e.parent&&b){const t=s?e.screenX-c/2:e.screenX-e.leafCount*c/2;if(s)(e.number!==e.children.length-1||R)&&L.push({y:t,x1:0,x2:-A-2*this.label.padding});else{const i=-A-2*this.label.padding+e.screenY;L.push({y:t,x1:i+g,x2:i})}}let r;if(i){const e=T.computeTransformedBBox();e&&M.set(t,e),r=y(v({},{fill:(o=T).fill,fontFamily:o.fontFamily,fontSize:o.fontSize,fontStyle:o.fontStyle,fontWeight:o.fontWeight,rotation:o.rotation,rotationCenterX:o.rotationCenterX,rotationCenterY:o.rotationCenterY,text:o.text,textAlign:o.textAlign,textBaseline:o.textBaseline,translationX:o.translationX,translationY:o.translationY,visible:o.visible,x:o.x,y:o.y}),{visible:i})}else M.delete(t),r={visible:i};var o;E.push(r)});let k=0;L.forEach(e=>k=Math.min(k,e.x2)),L.push({y:Math.max(a,l),x1:0,x2:k});const P=[],N=[];L.forEach(e=>{if(e.y>=s[0]-1e-7&&e.y<=s[1]+1e-7){const{x1:t,x2:i,y:n}=e,s=new is(Math.min(t,i),n,Math.abs(t-i),0);N.push(s),P.push({x1:t,x2:i,y:n})}});const O=[],_=[],F=f?f.depth+1:1;for(let e=0;e<F;e++){const t=m.length>0&&(0===e||R&&b),i=e>0?-A-2*this.label.padding-(e-1)*g:0,n=new is(i,Math.min(...s),0,Math.abs(s[1]-s[0]));_.push(n),O.push({x:i,y1:s[0],y2:s[1],visible:t})}return{bbox:(e=>{const t=new ls,{rotation:i,translationX:n,translationY:s,rotationCenterX:r,rotationCenterY:o}=this.getAxisTransform();return ls.updateTransformMatrix(t,1,1,i,n,s,{scalingCenterX:0,scalingCenterY:0,rotationCenterX:r,rotationCenterY:o}),t.transformBBox(e)})(is.merge([...M.values(),...N,..._])),tickLabelLayout:E,separatorLayout:P,axisLineLayout:O}}calculateLayout(){const{axisLineLayout:e,separatorLayout:t,tickLabelLayout:i,bbox:n}=this.computeLayout();return this.computedLayout={axisLineLayout:e,separatorLayout:t,tickLabelLayout:i},{bbox:n,primaryTickCount:void 0}}};Bl.className="GroupedCategoryAxis",Bl.type="grouped-category",S([Ys(vr,{optional:!0})],Bl.prototype,"labelColor",2);var Hl=class e{constructor(t){this.enabled=!0,this.width=600,this.height=300;const{width:i,height:n,pixelRatio:s,position:r,insertAsFirstChild:o}=t;this.insertAsFirstChild=null!=o&&o,this.pixelRatio=function(){if("undefined"==typeof navigator)return!1;const e=navigator.userAgent.match(/\(iPhone; CPU iPhone OS (\d+_\d+_\d+) like Mac OS X\)/);if(null==e)return!1;const[t,i]=e[1].split("_").map(Number);return t<16||16===t&&i<6}()?1:null!=s?s:En("devicePixelRatio"),this.element=Mn("canvas"),this.element.width=Math.round((null!=i?i:this.width)*this.pixelRatio),this.element.height=Math.round((null!=n?n:this.height)*this.pixelRatio),r&&(this.element.style.position=r),this.context=this.element.getContext("2d"),this.onEnabledChange(),this.resize(null!=i?i:0,null!=n?n:0),e.debugContext(this.context)}static is(t){return t instanceof e}drawImage(e,t=0,i=0){return e.drawImage(this.context.canvas,t,i)}toDataURL(e){return this.element.toDataURL(e)}resize(e,t){if(!(e>0&&t>0))return;const{element:i,context:n,pixelRatio:s}=this;i.width=Math.round(e*s),i.height=Math.round(t*s),n.setTransform(s,0,0,s,0,0),i.style.width=e+"px",i.style.height=t+"px",this.width=e,this.height=t}snapshot(){}clear(){this.context.save(),this.context.setTransform(this.pixelRatio,0,0,this.pixelRatio,0,0),this.context.clearRect(0,0,this.width,this.height),this.context.restore()}destroy(){this.element.remove(),this.element.width=0,this.element.height=0,this.context.clearRect(0,0,0,0),Object.freeze(this)}onContainerChange(e,t){var i,n,s,r;e!==t&&(null==(i=this.element.parentNode)||i.removeChild(this.element),this.insertAsFirstChild&&(null==(n=this.container)?void 0:n.firstChild)?null==(s=this.container)||s.insertBefore(this.element,this.container.firstChild):null==(r=this.container)||r.appendChild(this.element))}onEnabledChange(){this.element&&(this.element.style.display=this.enabled?"block":"none")}static debugContext(e){if(Ln.check("canvas")){const t=e.save.bind(e),i=e.restore.bind(e);let n=0;Object.assign(e,{save(){t(),n++},restore(){if(0===n)throw new Error("AG Charts - Unable to restore() past depth 0");i(),n--},verifyDepthZero(){if(0!==n)throw new Error(`AG Charts - Save/restore depth is non-zero: ${n}`)}})}}};S([Qa(e=>e.onEnabledChange())],Hl.prototype,"enabled",2),S([Qa((e,t,i)=>e.onContainerChange(t,i))],Hl.prototype,"container",2);var zl=Hl,Ul=class e{constructor(e,t){this.canvas=e,this.markDirty=t,this.debug=Ln.create(!0,"scene"),this.layersMap=new Map,this.nextZIndex=0,this.nextLayerId=0}static sortLayers(e,t){var i,n;return xo([e.zIndex,...null!=(i=e.zIndexSubOrder)?i:[void 0,void 0],e.id],[t.zIndex,...null!=(n=t.zIndexSubOrder)?n:[void 0,void 0],t.id],So)}get size(){return this.layersMap.size}forEach(t){Array.from(this.layersMap.values()).sort(e.sortLayers).forEach(t)}resize(e,t){this.canvas.resize(e,t),this.layersMap.forEach(({canvas:i})=>i.resize(e,t))}addLayer(e){const{width:t,height:i,pixelRatio:n}=this.canvas,{zIndex:s=this.nextZIndex++,name:r,zIndexSubOrder:o,getComputedOpacity:a,getVisibility:l}=e,c=new zl({width:t,height:i,pixelRatio:n,position:"absolute"}),h={id:this.nextLayerId++,name:r,canvas:c,zIndex:s,zIndexSubOrder:o,getComputedOpacity:a,getVisibility:l};return s>=this.nextZIndex&&(this.nextZIndex=s+1),this.layersMap.set(c,h),this.debug("Scene.addLayer() - layers",this.layersMap),h.canvas}removeLayer(e){this.layersMap.has(e)&&(this.layersMap.delete(e),e.destroy(),this.markDirty(),this.debug("Scene.removeLayer() -  layers",this.layersMap))}moveLayer(e,t,i){const n=this.layersMap.get(e);n&&(n.zIndex=t,n.zIndexSubOrder=i,this.markDirty(),this.debug("Scene.moveLayer() -  layers",this.layersMap))}clear(){this.layersMap.clear()}};function Wl(e,t,i,n,s={}){if(!Ln.check("scene:stats","scene:stats:verbose"))return;const{layersRendered:r=0,layersSkipped:o=0,nodesRendered:a=0,nodesSkipped:l=0}=null!=n?n:{},c=performance.now(),h=t,{start:d}=h,u=C(h,["start"]),p=Object.entries(u).map(([e,t])=>Yl(e,t)).filter(e=>null!=e).join(" + "),g=Object.entries(s).map(([e,t])=>`${e}: ${t}`).join(" ; "),f=Ln.check("scene:stats:verbose"),m=[`${Yl("⏱️",d,c)} (${p})`,`${g}`,`Layers: ${f?$l(r,o):e.size}`,f?`Nodes: ${$l(a,l)}`:null].filter(Ue),v=new Map(m.map(e=>[e,Go.getTextSize(e,i.font)])),y=Math.max(...Array.from(v.values(),e=>e.width)),b=function(e,t){let i=0;for(const n of e)i+=t(n);return i}(v.values(),e=>e.height);i.save(),i.fillStyle="white",i.fillRect(0,0,y,b),i.fillStyle="black";let S=0;for(const[e,t]of v.entries())S+=t.height,i.fillText(e,2,S);i.restore()}function jl(e){var t,i;return Ln.check(!0,"scene")?v(v({node:e,name:null!=(t=e instanceof Mo?e.name:null)?t:e.id,dirty:ns[e.dirty]},(null==(i=e.parent)?void 0:i.isVirtual)?{virtualParentDirty:ns[e.parent.dirty],virtualParent:e.parent}:{}),e.children.map(e=>jl(e)).reduce((e,t)=>{let{name:i}=t;const{node:{visible:n,opacity:s,zIndex:r,zIndexSubOrder:o},node:a,virtualParent:l}=t;(!n||s<=0)&&(i=`(${i})`),a instanceof Mo&&a.isLayer()&&(i=`*${i}*`);const c=[`${null!=i?i:"<unknown>"}`,`z: ${r}`,o&&`zo: ${o.map(e=>"function"==typeof e?`${e()} (fn)`:e).join(" / ")}`,l&&"(virtual parent)"].filter(e=>!!e).join(" ");let h=c,d=1;for(;null!=e[h]&&d<100;)h=`${c} (${d++})`;return e[h]=t,e},{})):{}}function Kl(e){var t;if(0===e.dirty)return{dirtyTree:{},paths:[]};const i=e.children.map(e=>Kl(e)).filter(e=>e.paths.length>0),n=Mo.is(e)&&null!=(t=e.name)?t:e.id,s=i.length?i.flatMap(e=>e.paths).map(e=>`${n}.${e}`):[n];return{dirtyTree:v({name:n,node:e,dirty:ns[e.dirty]},i.map(e=>e.dirtyTree).filter(e=>null!=e.dirty).reduce((e,t)=>{var i;return e[null!=(i=t.name)?i:"<unknown>"]=t,e},{})),paths:s}}function $l(e,t){const i=e+t;return`${e} / ${i} (${Math.round(100*e/i)}%)`}function Yl(e,t,i){const n=null!=i?i-t:t;return`${e}: ${Math.round(100*n)/100}ms`}var ql=class{constructor({width:e,height:t,pixelRatio:i,canvasPosition:n}){this.debug=Ln.create(!0,"scene"),this.id=Bn(this),this.root=null,this.isDirty=!1,this.canvas=new zl({width:e,height:t,pixelRatio:i,position:n,insertAsFirstChild:"absolute"===n}),this.layersManager=new Ul(this.canvas,()=>{this.isDirty=!0})}get width(){var e,t;return null!=(t=null==(e=this.pendingSize)?void 0:e[0])?t:this.canvas.width}get height(){var e,t;return null!=(t=null==(e=this.pendingSize)?void 0:e[1])?t:this.canvas.height}setContainer(e){return this.canvas.container=e,this}setRoot(e){var t;return this.root===e||(this.isDirty=!0,null==(t=this.root)||t._setLayerManager(),this.root=e,e&&(e.visible=!0,e._setLayerManager(this.layersManager))),this}attachNode(e){var t;return null==(t=this.root)||t.appendChild(e),()=>this.removeChild(e)}appendChild(e){var t;return null==(t=this.root)||t.appendChild(e),this}removeChild(e){var t;return null==(t=this.root)||t.removeChild(e),this}download(e,t){var i;An(this.canvas.toDataURL(t),null!=(i=null==e?void 0:e.trim())?i:"image")}getDataURL(e){return this.canvas.toDataURL(e)}resize(e,t){return e=Math.round(e),t=Math.round(t),e>0&&t>0&&(e!==this.width||t!==this.height)&&(this.pendingSize=[e,t],this.isDirty=!0,!0)}render(e){return x(this,null,function*(){var t,i;const{debugSplitTimes:n={start:performance.now()},extraDebugStats:s}=null!=e?e:{},{canvas:r,canvas:{context:o}={},root:a,pendingSize:l}=this;if(!o)return;const c=performance.now();if(l&&(this.layersManager.resize(...l),this.pendingSize=void 0),a&&!a.visible)return void(this.isDirty=!1);if(a&&!this.isDirty)return this.debug.check()&&this.debug("Scene.render() - no-op",{redrawType:ns[a.dirty],tree:jl(a)}),void Wl(this.layersManager,n,o,void 0,s);const h={ctx:o,devicePixelRatio:null!=(t=this.canvas.pixelRatio)?t:1,forceRender:!0,resized:Boolean(l),debugNodes:{}};Ln.check("scene:stats:verbose")&&(h.stats={layersRendered:0,layersSkipped:0,nodesRendered:0,nodesSkipped:0});let d=!1;if((!a||a.dirty>=1)&&(d=!0,r.clear()),a&&Ln.check("scene:dirtyTree")){const{dirtyTree:e,paths:t}=Kl(a);Ln.create("scene:dirtyTree")("Scene.render() - dirtyTree",{dirtyTree:e,paths:t})}if(a&&d&&(this.debug("Scene.render() - before",{redrawType:ns[a.dirty],canvasCleared:d,tree:jl(a)}),a.visible&&(a.preRender(),o.save(),a.render(h),o.restore())),n["✍️"]=performance.now()-c,this.layersManager.size&&d){const e=performance.now();o.save(),o.resetTransform(),this.layersManager.forEach(e=>{e.canvas.enabled&&e.getVisibility()&&(o.globalAlpha=e.getComputedOpacity(),e.canvas.drawImage(o))}),o.restore(),n["⛙"]=performance.now()-e}null==(i=o.verifyDepthZero)||i.call(o),this.isDirty=!1,Wl(this.layersManager,n,o,h.stats,s),function(e,t){e.save();for(const[i,n]of Object.entries(t)){const t=n.computeTransformedBBox();t?(e.globalAlpha=.8,e.strokeStyle="red",e.lineWidth=1,e.strokeRect(t.x,t.y,t.width,t.height),e.fillStyle="red",e.strokeStyle="white",e.font="16px sans-serif",e.textBaseline="top",e.textAlign="left",e.lineWidth=2,e.strokeText(i,t.x,t.y,t.width),e.fillText(i,t.x,t.y,t.width)):_.log(`Scene.render() - no bbox for debugged node [${i}].`)}e.restore()}(o,h.debugNodes),a&&this.debug.check()&&this.debug("Scene.render() - after",{redrawType:ns[a.dirty],tree:jl(a),canvasCleared:d})})}strip(){const{context:e,pixelRatio:t}=this.canvas;e.setTransform(t,0,0,t,0,0),this.layersManager.clear(),this.setRoot(null),this.isDirty=!1}destroy(){this.canvas.container=void 0,this.strip(),this.canvas.destroy(),Object.assign(this,{canvas:void 0})}};function Xl(e){return new Promise(t=>{setTimeout(()=>t(void 0),e)})}ql.className="Scene";var Zl=class{constructor(){this.available=!0,this.acquireQueue=[]}acquire(e){return new Promise(t=>{this.acquireQueue.push([e,t]),this.available&&this.dispatchNext().catch(e=>_.errorOnce(e))})}acquireImmediately(e){return x(this,null,function*(){return!!this.available&&(yield this.acquire(e),!0)})}waitForClearAcquireQueue(){return x(this,null,function*(){return this.acquire(()=>x(this,null,function*(){}))})}dispatchNext(){return x(this,null,function*(){var e,t;this.available=!1;let[i,n]=null!=(e=this.acquireQueue.shift())?e:[];for(;i;){try{yield i(),null==n||n()}catch(e){_.error("mutex callback error",e),null==n||n()}[i,n]=null!=(t=this.acquireQueue.shift())?t:[]}this.available=!0})}},Ql=class{constructor(){this.eventListeners=new Map}addEventListener(e,t){if("function"!=typeof t)throw new Error("AG Charts - listener must be a Function");const i=this.eventListeners.get(e);i?i.add(t):this.eventListeners.set(e,new Set([t]))}removeEventListener(e,t){var i;null==(i=this.eventListeners.get(e))||i.delete(t),0===this.eventListeners.size&&this.eventListeners.delete(e)}hasEventListener(e){return this.eventListeners.has(e)}clearEventListeners(){this.eventListeners.clear()}fireEvent(e){var t;null==(t=this.eventListeners.get(e.type))||t.forEach(t=>t(e))}},Jl=class extends Ct{constructor(e=0,t=e,i=e,n=t){super(),this.top=e,this.right=t,this.bottom=i,this.left=n}clear(){this.top=this.right=this.bottom=this.left=0}};function ec(e,t){let i,n,s=0,r=!1;const o=()=>r,a=()=>{r=!1,null==n||n(),n=void 0,i=void 0,s>0&&e(l)},l=()=>{const e=s;s=0,r=!0;const i=t({count:e});i?i.then(a,a):a()};return{schedule(t){0!==s||o()||e(l,t),s++},await(){return x(this,null,function*(){if(o())for(null==i&&(i=new Promise(e=>{n=e}));o();)yield i})}}}S([Ys(rr)],Jl.prototype,"top",2),S([Ys(rr)],Jl.prototype,"right",2),S([Ys(rr)],Jl.prototype,"bottom",2),S([Ys(rr)],Jl.prototype,"left",2);var tc=class{constructor(){var e;this.elements=new Map,this.documentReady=!1,this.queuedObserveRequests=[],this.onLoad=()=>{this.documentReady=!0,this.queuedObserveRequests.forEach(([e,t])=>this.observe(e,t)),this.queuedObserveRequests=[]},"undefined"!=typeof ResizeObserver&&(this.resizeObserver=new ResizeObserver(e=>{for(const{target:t,contentRect:i}of e){const{width:e,height:n}=i;this.checkSize(this.elements.get(t),t,e,n)}}),this.documentReady="complete"===xn("readyState"),this.documentReady||null==(e=En())||e.addEventListener("load",this.onLoad))}destroy(){var e,t;null==(e=En())||e.removeEventListener("load",this.onLoad),null==(t=this.resizeObserver)||t.disconnect(),this.resizeObserver=null}checkSize(e,t,i,n){var s,r;e&&(i===(null==(s=e.size)?void 0:s.width)&&n===(null==(r=e.size)?void 0:r.height)||(e.size={width:i,height:n},e.cb(e.size,t)))}observe(e,t){var i;this.documentReady?(this.elements.has(e)?this.removeFromQueue(e):null==(i=this.resizeObserver)||i.observe(e),this.elements.set(e,{cb:t})):this.queuedObserveRequests.push([e,t])}unobserve(e){var t;null==(t=this.resizeObserver)||t.unobserve(e),this.elements.delete(e),this.removeFromQueue(e),this.elements.size||this.destroy()}removeFromQueue(e){this.queuedObserveRequests=this.queuedObserveRequests.filter(([t])=>t!==e)}},ic=class{constructor(){this.cache=new WeakMap}call(e,...t){let i,n=this.cache.get(e);const s=()=>{try{const s=e(...t);return n&&null!=i&&n.set(i,s),s}catch(e){return void _.warnOnce("User callback errored, ignoring",e)}};try{i=JSON.stringify(t)}catch(e){return s()}return null==n&&(n=new Map,this.cache.set(e,n)),n.has(i)?n.get(i):s()}invalidateCache(){this.cache=new WeakMap}},nc=class{constructor(e){this.annotationRoot=e}attachNode(e){return this.annotationRoot.append(e),()=>{var t;return null==(t=this.annotationRoot)||t.removeChild(e),this}}setAnnotationStyles(e){this.styles=e}getAnnotationTypeStyles(e){var t;return null==(t=this.styles)?void 0:t[e]}},sc=class{constructor(){this.registeredListeners=new Map}addListener(e,t){const i={symbol:Symbol(e),handler:t};return this.registeredListeners.has(e)?this.registeredListeners.get(e).push(i):this.registeredListeners.set(e,[i]),()=>this.removeListener(i.symbol)}removeListener(e){for(const[t,i]of this.registeredListeners.entries()){const n=i.findIndex(t=>t.symbol===e);if(n>=0){i.splice(n,1),0===i.length&&this.registeredListeners.delete(t);break}}}dispatch(e,...t){for(const i of this.getListenersByType(e))try{i.handler(...t)}catch(e){_.errorOnce(e)}}dispatchWrapHandlers(e,t,...i){for(const n of this.getListenersByType(e))try{t(n.handler,...i)}catch(e){_.errorOnce(e)}}getListenersByType(e){var t;return null!=(t=this.registeredListeners.get(e))?t:[]}destroy(){this.registeredListeners.clear()}},rc=class extends sc{constructor(e){super(),this.animationManager=e,this.dispatchOnlyLatest=!0,this.dispatchThrottle=0,this.requestThrottle=300,this.isLoadingInitialData=!1,this.isLoadingData=!1,this.freshRequests=[],this.requestCounter=0,this.debug=Ln.create(!0,"data-model","data-source"),this.throttledFetch=this.createThrottledFetch(this.requestThrottle),this.throttledDispatch=this.createThrottledDispatch(this.dispatchThrottle)}updateCallback(e){"function"==typeof e&&(this.debug("DataService - updated data source callback"),this.dataSourceCallback=e,this.isLoadingInitialData=!0,this.animationManager.skip(),this.dispatch("data-source-change"))}clearCallback(){this.dataSourceCallback=void 0}load(e){this.isLoadingData=!0,this.throttledFetch(e)}isLazy(){return null!=this.dataSourceCallback}isLoading(){return this.isLazy()&&(this.isLoadingInitialData||this.isLoadingData)}createThrottledFetch(e){return O(e=>this.fetch(e),e,{leading:!1,trailing:!0})}createThrottledDispatch(e){return O((e,t)=>{this.debug(`DataService - dispatching 'data-load' | ${e}`),this.dispatch("data-load",{type:"data-load",data:t})},e,{leading:!0,trailing:!0})}fetch(e){return x(this,null,function*(){if(!this.dataSourceCallback)throw new Error("DataService - [dataSource.getData] callback not initialised");const t=performance.now(),i=this.requestCounter++;let n;this.debug(`DataService - requesting | ${i}`),this.freshRequests.push(i);try{n=yield this.dataSourceCallback(e),this.debug(`DataService - response | ${performance.now()-t}ms | ${i}`)}catch(e){this.debug(`DataService - request failed | ${i}`),_.errorOnce(`DataService - request failed | [${e}]`)}this.isLoadingInitialData=!1;const s=this.freshRequests.findIndex(e=>e===i);-1===s||this.dispatchOnlyLatest&&s!==this.freshRequests.length-1?this.debug(`DataService - discarding stale request | ${i}`):(this.freshRequests=this.freshRequests.slice(s+1),0===this.freshRequests.length&&(this.isLoadingData=!1),Array.isArray(n)?this.throttledDispatch(i,n):this.dispatch("data-error"))})}};S([Za({newValue(e){this.throttledDispatch=this.createThrottledDispatch(e)}})],rc.prototype,"dispatchThrottle",2),S([Za({newValue(e){this.throttledFetch=this.createThrottledFetch(e)}})],rc.prototype,"requestThrottle",2);var oc=class{constructor(e){this.maxAnimationTime=e,this.debug=Ln.create(!0,"animation"),this.controllers=new Map,this.stoppedCbs=new Set,this.currentPhase=0,this.phases=new Map(As.map(e=>[e,[]])),this.skipAnimations=!1,this.animationTimeConsumed=0,this.isReady=!1}get size(){return this.controllers.size}get consumedTimeMs(){return this.animationTimeConsumed}isActive(){return this.controllers.size>0}getActiveControllers(){var e;return null!=(e=this.phases.get(As[this.currentPhase]))?e:[]}checkOverlappingId(e){null!=e&&this.controllers.has(e)&&(this.controllers.get(e).stop(),this.debug(`Skipping animation batch due to update of existing animation: ${e}`),this.skip())}addAnimation(e){var t;if(!e.isComplete)return As.indexOf(e.phase)<this.currentPhase?(this.debug("Skipping animation due to being for an earlier phase",e.id),void e.stop()):(this.controllers.set(e.id,e),void(null==(t=this.phases.get(e.phase))||t.push(e)))}removeAnimation(e){this.controllers.delete(e.id);const t=this.phases.get(e.phase),i=null==t?void 0:t.indexOf(e);null!=i&&i>=0&&(null==t||t.splice(i,1))}progress(e){if(!this.isReady)return;let t=0===e?.01:e;const i=()=>{const e=As[this.currentPhase];return{phaseControllers:[...this.getActiveControllers()],phase:e,phaseMeta:Ts[e]}};let{phase:n,phaseControllers:s,phaseMeta:r}=i();const o=()=>null==As[this.currentPhase],a=()=>{for(({phase:n,phaseControllers:s,phaseMeta:r}=i());!o()&&0===s.length;)this.currentPhase++,({phase:n,phaseControllers:s,phaseMeta:r}=i()),this.debug(`AnimationBatch - phase changing to ${n}`,{unusedTime:t},s)},l=this.controllers.size;this.debug(`AnimationBatch - ${e}ms; phase ${n} with ${null==s?void 0:s.length} of ${l}`);do{const e=t,i=r.skipIfNoEarlierAnimations&&0===this.animationTimeConsumed;let n=0;for(const r of s)i?r.stop():t=Math.min(r.update(e),t),r.isComplete&&(n++,this.removeAnimation(r));this.animationTimeConsumed+=e-t,this.debug(`AnimationBatch - updated ${s.length} controllers; ${n} completed`),this.debug(`AnimationBatch - animationTimeConsumed: ${this.animationTimeConsumed}`),a()}while(t>0&&!o());this.animationTimeConsumed>this.maxAnimationTime&&(_.warnOnce("Animation batch exceeded max animation time, skipping.",new Map(this.controllers.entries())),this.stop())}ready(){if(this.isReady)return;this.isReady=!0,this.debug(`AnimationBatch - ready; skipped: ${this.skipAnimations}`,[...this.controllers]);let e=!0;for(const[,t]of this.controllers)if(t.duration>0&&!0!==Ts[t.phase].skipIfNoEarlierAnimations){e=!1;break}if(!e)for(const[,e]of this.controllers)e.autoplay&&e.play(!0)}skip(e=!0){if(!1===this.skipAnimations&&!0===e){for(const e of this.controllers.values())e.stop();this.controllers.clear()}this.skipAnimations=e}play(){for(const e of this.controllers.values())e.play()}pause(){for(const e of this.controllers.values())e.pause()}stop(){for(const e of this.controllers.values())try{e.stop(),this.removeAnimation(e)}catch(e){_.error("Error during animation stop",e)}this.dispatchStopped()}stopByAnimationId(e){if(null!=e&&this.controllers.has(e)){const t=this.controllers.get(e);t&&(t.stop(),this.removeAnimation(t))}}stopByAnimationGroupId(e){for(const t of this.controllers.values())t.groupId===e&&this.stopByAnimationId(t.id)}dispatchStopped(){this.stoppedCbs.forEach(e=>e()),this.stoppedCbs.clear()}isSkipped(){return this.skipAnimations}destroy(){this.stop(),this.controllers.clear()}},ac=class{constructor(){this.listeners=new sc,this.destroyFns=[]}addListener(e,t){return this.listeners.addListener(e,t)}removeListener(e){this.listeners.removeListener(e)}destroy(){this.listeners.destroy(),this.destroyFns.forEach(e=>e())}};function lc(e){const t=y(v({},e),{consumed:!1,consume(){var i,n;t.consumed=!0,e.sourceEvent instanceof Event?null==(i=e.sourceEvent)||i.preventDefault():null==(n=e.sourceEvent)||n.consume()}});return t}function cc(e,t,i){e.dispatchWrapHandlers(t,(e,t)=>{t.consumed||e(t)},i)}var hc=["click","dblclick","contextmenu","hover","drag-start","drag","drag-end","leave","enter","page-left","wheel"],dc=["blur","focus"],uc=["keydown","keyup"],pc=["pagehide","mousemove","mouseup"],gc=["click","dblclick","contextmenu","mousedown","mouseout","mouseenter","touchstart","touchmove","touchend","touchcancel","wheel","blur","focus","keydown","keyup"],fc=(e=>(e[e.Default=16]="Default",e[e.ZoomDrag=8]="ZoomDrag",e[e.Annotations=4]="Annotations",e[e.ContextMenu=2]="ContextMenu",e[e.Animation=1]="Animation",e[e.All=31]="All",e))(fc||{}),mc=class e extends ac{constructor(e,t){super(),this.keyboardOptions=e,this.debug=Ln.create(!0,"interaction"),this.eventHandler=e=>this.processEvent(e),this.mouseDown=!1,this.touchDown=!1,this.clickHistory=[{offsetX:NaN,offsetY:NaN,type:"mousedown"}],this.dblclickHistory=[{offsetX:NaN,offsetY:NaN,type:"mousedown"},{offsetX:NaN,offsetY:NaN,type:"mouseup"},{offsetX:NaN,offsetY:NaN,type:"mousedown"}],this.stateQueue=17,this.rootElement=xn("body"),this.element=t;for(const e of gc)e.startsWith("touch")?t.addEventListener(e,this.eventHandler,{passive:!0}):"wheel"===e?t.addEventListener(e,this.eventHandler,{passive:!1}):t.addEventListener(e,this.eventHandler);for(const e of pc)En().addEventListener(e,this.eventHandler);Tn("\n.ag-chart-wrapper {\n    touch-action: none;\n}\n","interactionManager")}destroy(){super.destroy();for(const e of pc)En().removeEventListener(e,this.eventHandler);for(const e of gc)this.element.removeEventListener(e,this.eventHandler)}addListener(e,t,i=16){return super.addListener(e,e=>{this.getState()&i&&t(e)})}pushState(e){this.stateQueue|=e}popState(e){this.stateQueue&=~e}getState(){return this.stateQueue&-this.stateQueue}processEvent(e){const t=this.decideInteractionEventTypes(e);t.length>0&&this.dispatchEvent(e,t).catch(e=>_.errorOnce(e))}dispatchEvent(e,t){return x(this,null,function*(){if(bn(hc,t))this.dispatchPointerEvent(e,t);else if(bn(dc,t))for(const i of t)cc(this.listeners,i,lc({type:i,sourceEvent:e}));else if(bn(uc,t))for(const i of t)cc(this.listeners,i,lc({type:i,sourceEvent:e}))})}dispatchPointerEvent(e,t){const i=this.calculateCoordinates(e);if(null!=i)for(const n of t)cc(this.listeners,n,this.buildPointerEvent(v({type:n,event:e},i)))}recordDown(e){e instanceof MouseEvent&&(st(["offsetX","offsetY"],this.clickHistory[0],e),st(["offsetX","offsetY"],this.dblclickHistory[2],this.dblclickHistory[0]),st(["offsetX","offsetY"],this.dblclickHistory[0],e)),this.dragStartElement=e.target}recordUp(e){e instanceof MouseEvent&&st(["offsetX","offsetY"],this.dblclickHistory[1],e),this.dragStartElement=void 0}decideInteractionEventTypes(e){const t="drag-start";switch(e.type){case"blur":case"focus":case"keydown":case"keyup":return this.keyboardOptions.enabled?[e.type]:[];case"click":case"dblclick":case"contextmenu":case"wheel":return[e.type];case"mousedown":return this.isEventOverElement(e)?(this.mouseDown=!0,this.recordDown(e),[t]):[];case"touchstart":return this.isEventOverElement(e)?(this.touchDown=!0,this.recordDown(e),[t]):[];case"touchmove":case"mousemove":return this.mouseDown||this.touchDown||this.isEventOverElement(e)?this.mouseDown||this.touchDown?["drag"]:["hover"]:[];case"mouseup":return this.mouseDown||this.isEventOverElement(e)?(this.mouseDown=!1,this.recordUp(e),["drag-end"]):[];case"touchend":return this.touchDown||this.isEventOverElement(e)?(this.touchDown=!1,this.recordUp(e),["drag-end"]):[];case"mouseout":case"touchcancel":return["leave"];case"mouseenter":const i=e instanceof MouseEvent&&!(1&~e.buttons);return this.mouseDown!==i?(this.mouseDown=i,[i?t:"drag-end"]):["enter"];case"pagehide":return["page-left"]}return[]}isEventOverElement(e){var t,i,n;return e.target===this.element||(null==(t=e.target)?void 0:t.parentElement)===this.element||(null==(n=null==(i=e.target)?void 0:i.parentElement)?void 0:n.parentElement)===this.element}calculateCoordinates(t){var i;if(t instanceof MouseEvent)return this.getMouseEventCoords(t);if("undefined"!=typeof TouchEvent&&t instanceof TouchEvent){const n=null!=(i=t.touches[0])?i:t.changedTouches[0],{clientX:s,clientY:r,pageX:o,pageY:a}=n;return y(v({},e.NULL_COORDS),{clientX:s,clientY:r,pageX:o,pageY:a})}if(t instanceof PageTransitionEvent){if(t.persisted)return;return e.NULL_COORDS}}getMouseEventCoords(e){const{clientX:t,clientY:i,pageX:n,pageY:s}=e;let{offsetX:r,offsetY:o}=e;const a=e=>{let t=0,i=0;for(;e;)t+=e.offsetLeft,i+=e.offsetTop,e=e.offsetParent;return{x:t,y:i}};if(null!=this.dragStartElement&&e.target!==this.dragStartElement){const t=a(this.dragStartElement),i=a(e.target);r-=t.x-i.x,o-=t.y-i.y}return{clientX:t,clientY:i,pageX:n,pageY:s,offsetX:r,offsetY:o}}isWheelEvent(e){return"wheel"===e.type}buildPointerEvent(e){const{type:t,event:i,clientX:n,clientY:s}=e;let{offsetX:r,offsetY:o,pageX:a,pageY:l}=e;if(!je(r)||!je(o)){const e=this.element.getBoundingClientRect();r=n-e.left,o=s-e.top}if(!je(a)||!je(l)){const e=this.rootElement.getBoundingClientRect();a=n-e.left,l=s-e.top}let[c,h]=[NaN,NaN];if(this.isWheelEvent(i)){const e=0===i.deltaMode?.01:1;c=i.deltaX*e,h=i.deltaY*e}let d=[];"click"===i.type?d=this.clickHistory:"dblclick"===i.type&&(d=this.dblclickHistory);const u=lc({type:t,offsetX:r,offsetY:o,pageX:a,pageY:l,deltaX:c,deltaY:h,pointerHistory:d,sourceEvent:i});return this.debug("InteractionManager - builtEvent: ",u),u}};mc.NULL_COORDS={clientX:-1/0,clientY:-1/0,pageX:-1/0,pageY:-1/0,offsetX:-1/0,offsetY:-1/0};var vc=mc;function yc(e){return null==e||!isNaN(e)&&e>=0&&e<=2}var Cc=class extends ac{constructor(e,t){super(),this.interactionManager=e,this.chartUpdateMutex=t,this.defaultDuration=1e3,this.batch=new oc(1.5*this.defaultDuration),this.debug=Ln.create(!0,"animation"),this.rafAvailable="undefined"!=typeof requestAnimationFrame,this.isPlaying=!1,this.requestId=null,this.skipAnimations=!1}animate(e){var t,i=C(e,[]);const n=this.batch;try{n.checkOverlappingId(i.id)}catch(e){return void this.failsafeOnError(e)}const s=null!=(t=i.id)?t:Math.random().toString(),r=this.isSkipped()||"none"===i.phase;r&&this.debug("AnimationManager - skipping animation");const{delay:o,duration:a}=i;if(!yc(o))throw new Error(`Animation delay of ${o} is unsupported (${s})`);if(!yc(a))throw new Error(`Animation duration of ${a} is unsupported (${s})`);const l=new Rs(y(v({},i),{id:s,skip:r,autoplay:!!this.isPlaying&&i.autoplay,phase:i.phase,defaultDuration:this.defaultDuration}));if(!this.forceTimeJump(l,this.defaultDuration))return this.batch.addAnimation(l),l}play(){if(!this.isPlaying){this.isPlaying=!0,this.debug("AnimationManager.play()");try{this.batch.play()}catch(e){this.failsafeOnError(e)}this.requestAnimation()}}pause(){if(this.isPlaying){this.isPlaying=!1,this.cancelAnimation(),this.debug("AnimationManager.pause()");try{this.batch.pause()}catch(e){this.failsafeOnError(e)}}}stop(){this.isPlaying=!1,this.cancelAnimation(),this.debug("AnimationManager.stop()"),this.batch.stop()}stopByAnimationId(e){try{this.batch.stopByAnimationId(e)}catch(e){this.failsafeOnError(e)}}stopByAnimationGroupId(e){try{this.batch.stopByAnimationGroupId(e)}catch(e){this.failsafeOnError(e)}}reset(){this.isPlaying?(this.stop(),this.play()):this.stop()}skip(e=!0){this.skipAnimations=e}isSkipped(){return!this.rafAvailable||this.skipAnimations||this.batch.isSkipped()}isActive(){return this.isPlaying&&this.batch.isActive()}skipCurrentBatch(){this.debug.check()&&this.debug("AnimationManager - skipCurrentBatch()",{stack:(new Error).stack}),this.batch.skip()}isSkippingFrames(){return!0}scheduleAnimationFrame(e){this.requestId=requestAnimationFrame(e)}forceTimeJump(e,t){return!1}requestAnimation(){if(!this.rafAvailable)return;if(!this.batch.isActive()||null!==this.requestId)return;let e;const t=i=>x(this,null,function*(){const n=()=>x(this,null,function*(){const t=i-(null!=e?e:i);e=i,this.debug("AnimationManager - onAnimationFrame()",{controllersCount:this.batch.size,deltaTime:t}),this.interactionManager.pushState(1);try{this.batch.progress(t)}catch(e){this.failsafeOnError(e)}this.listeners.dispatch("animation-frame",{type:"animation-frame",deltaMs:t})});this.isSkippingFrames()?yield this.chartUpdateMutex.acquireImmediately(n):yield this.chartUpdateMutex.acquire(n),this.batch.isActive()?this.scheduleAnimationFrame(t):(this.batch.stop(),this.listeners.dispatch("animation-stop",{type:"animation-stop",deltaMs:this.batch.consumedTimeMs}))});this.listeners.dispatch("animation-start",{type:"animation-start",deltaMs:0}),this.scheduleAnimationFrame(t)}cancelAnimation(){null!==this.requestId&&(cancelAnimationFrame(this.requestId),this.requestId=null,this.startBatch())}failsafeOnError(e,t=!0){_.error("Error during animation, skipping animations",e),t&&this.cancelAnimation()}startBatch(e){this.debug(`AnimationManager - startBatch() with skipAnimations=${e}.`),this.reset(),this.batch.stop(),this.batch.destroy(),this.batch=new oc(1.5*this.defaultDuration),!0===e&&this.batch.skip()}endBatch(){this.batch.isActive()?(this.batch.ready(),this.requestAnimation()):(this.interactionManager.popState(1),this.batch.isSkipped()&&this.batch.skip(!1))}onBatchStop(e){this.batch.stoppedCbs.add(e)}},bc=class e{constructor(t){this.canvas=t,this.debug=Ln.create(!0,"aria"),this.canvas.appendChild(this.liveElem=e.createAnnouncer())}static createAnnouncer(){const e=xn().createElement("div");return e.classList.add("ag-charts-aria-announcer"),Ja(e,"role","status"),Ja(e,"aria-live","assertive"),e}destroy(){this.canvas.removeChild(this.liveElem)}announceValue(e){this.debug(`AriaAnnouncementService - announceValue: ${e}`),this.liveElem.textContent=e}},Sc=class extends ac{legendItemClick(e,t,i,n){const s={type:"legend-item-click",series:e,itemId:t,enabled:i,legendItemName:n};this.listeners.dispatch("legend-item-click",s)}legendItemDoubleClick(e,t,i,n,s){const r={type:"legend-item-double-click",series:e,itemId:t,enabled:i,legendItemName:s,numVisibleItems:n};this.listeners.dispatch("legend-item-double-click",r)}axisHover(e,t){const i={type:"axis-hover",axisId:e,direction:t};this.listeners.dispatch("axis-hover",i)}},wc=class{constructor(){this.defaultActions=[],this.disabledActions=new Set}copyDefaultActions(){return[...this.defaultActions]}registerDefaultAction(e){e.id&&this.defaultActions.find(({id:t})=>t===e.id)||this.defaultActions.push(e)}enableAction(e){this.disabledActions.delete(e)}disableAction(e){this.disabledActions.add(e)}isDisabled(e){return this.disabledActions.has(e)}},xc=class extends Map{constructor(e,t){super(),this.defaultValue=e,this.defaultState=t}set(e,t){return this.delete(e),void 0!==t&&super.set(e,t),this}stateId(){var e;return null!=(e=Array.from(this.keys()).pop())?e:this.defaultState}stateValue(){var e;return null!=(e=Array.from(this.values()).pop())?e:this.defaultValue}},Ec=class{constructor(e){this.element=e,this.stateTracker=new xc("default")}updateCursor(e,t){this.stateTracker.set(e,t),this.element.style.cursor=this.stateTracker.stateValue()}getCursor(){return this.element.style.cursor}};function Mc(e,t){return Math.sqrt(function(e,t){const i=e.screenX-t.screenX,n=e.screenY-t.screenY;return i*i+n*n}(e,t))}var Ac=class extends ac{constructor(e){super(),this.touchstart=e=>this.onTouchStart(e),this.touchmove=e=>this.onTouchMove(e),this.touchend=e=>this.onTouchEnd(e),this.touchcancel=e=>this.onTouchCancel(e),this.pinch={finger1:{identifier:NaN,screenX:NaN,screenY:NaN},finger2:{identifier:NaN,screenX:NaN,screenY:NaN},origin:{x:NaN,y:NaN},distance:NaN,status:0},this.element=e,e.addEventListener("touchstart",this.touchstart,{passive:!0}),e.addEventListener("touchmove",this.touchmove,{passive:!0}),e.addEventListener("touchend",this.touchend),e.addEventListener("touchcancel",this.touchcancel)}destroy(){const{element:e}=this;e.removeEventListener("touchstart",this.touchstart),e.removeEventListener("touchmove",this.touchmove),e.removeEventListener("touchend",this.touchend),e.removeEventListener("touchcancel",this.touchcancel)}findPinchTouches(e){const{touches:t}=e,{finger1:i,finger2:n}=this.pinch;if(0!==this.pinch.status&&2===t.length){if(t[0].identifier===i.identifier&&t[1].identifier===n.identifier)return[t[0],t[1]];if(t[0].identifier===n.identifier&&t[1].identifier===i.identifier)return[t[1],t[0]]}}copyTouchData(e){const t=["identifier","screenX","screenY"];st(t,this.pinch.finger1,e.touches[0]),st(t,this.pinch.finger2,e.touches[1]),this.pinch.distance=Mc(this.pinch.finger1,this.pinch.finger2)}dispatchPinchEvent(e,t){const{finger1:i,finger2:n,origin:s}=this.pinch,r={type:e,finger1:i,finger2:n,deltaDistance:t,origin:s};this.listeners.dispatch(e,r)}onTouchStart(e){this.stopPinchTracking();const{pinch:t}=this;2===e.touches.length&&(t.status=1,this.copyTouchData(e),t.origin.x=(e.touches[0].clientX+e.touches[1].clientX)/2,t.origin.y=(e.touches[0].clientY+e.touches[1].clientY)/2)}onTouchMove(e){const t=this.findPinchTouches(e);if(void 0!==t){const[i,n]=t,{pinch:s}=this,r=Mc(i,n),o=r-s.distance;1===s.status?Math.abs(o)>1&&(s.status=2,this.copyTouchData(e),this.dispatchPinchEvent("pinch-start",0)):2===s.status?(s.distance=r,this.copyTouchData(e),this.dispatchPinchEvent("pinch-move",o)):_.error(`unexpected pinch.status: ${s.status}`)}}onTouchEnd(e){this.stopPinchTracking()}onTouchCancel(e){this.stopPinchTracking()}stopPinchTracking(){const{pinch:e}=this;2===e.status&&this.dispatchPinchEvent("pinch-end",0),this.pinch.status=0}},Tc=class extends ac{constructor(){super(...arguments),this.highlightStates=new xc,this.pickedStates=new xc}updateHighlight(e,t){const{activeHighlight:i}=this;this.highlightStates.set(e,t),this.activeHighlight=this.highlightStates.stateValue(),this.isEqual(this.activeHighlight,i)||this.listeners.dispatch("highlight-change",{type:"highlight-change",currentHighlight:this.activeHighlight,previousHighlight:i})}getActiveHighlight(){return this.activeHighlight}updatePicked(e,t){this.pickedStates.set(e,t),this.activePicked=this.pickedStates.stateValue()}getActivePicked(){return this.activePicked}isEqual(e,t){return e===t||(null==e?void 0:e.series)===(null==t?void 0:t.series)&&(null==e?void 0:e.itemId)===(null==t?void 0:t.itemId)&&(null==e?void 0:e.datum)===(null==t?void 0:t.datum)}},Dc=class extends ac{constructor(e){super(),this.hasBrowserFocus=!1,this.isMouseBlurred=!1,this.isClicking=!1,this.destroyFns.push(e.addListener("drag-start",e=>this.onClickStart(e),31),e.addListener("click",e=>this.onClickStop(e),31),e.addListener("drag-end",e=>this.onClickStop(e),31),e.addListener("wheel",e=>this.mouseBlur(e)),e.addListener("hover",e=>this.mouseBlur(e)),e.addListener("drag",e=>this.mouseBlur(e)),e.addListener("blur",e=>this.onBlur(e),31),e.addListener("focus",e=>this.onFocus(e),31),e.addListener("keydown",e=>this.onKeyDown(e),31))}destroy(){super.destroy()}onClickStart(e){this.isClicking=!0,this.mouseBlur(e)}onClickStop(e){this.isClicking=!1,this.mouseBlur(e)}mouseBlur(e){this.hasBrowserFocus&&(this.isMouseBlurred||(this.dispatch("blur",0,e),this.isMouseBlurred=!0))}onBlur(e){this.hasBrowserFocus=!1,this.isMouseBlurred=!1,this.dispatch("blur",0,e)}onFocus(e){this.hasBrowserFocus=!0,this.isClicking?this.isMouseBlurred=!0:(this.dispatch("browserfocus",1,e),this.dispatch("tab",0,e))}onKeyDown(e){if(this.hasBrowserFocus&&!this.isClicking)switch(this.isMouseBlurred=!1,e.sourceEvent.code){case"Tab":return e.sourceEvent.shiftKey?this.dispatch("tab",-1,e):this.dispatch("tab",1,e);case"ArrowDown":return this.dispatch("nav-vert",1,e);case"ArrowUp":return this.dispatch("nav-vert",-1,e);case"ArrowLeft":return this.dispatch("nav-hori",-1,e);case"ArrowRight":return this.dispatch("nav-hori",1,e);case"Space":case"Enter":return this.dispatch("submit",0,e)}}dispatch(e,t,i){const n=lc({type:e,delta:t,sourceEvent:i});cc(this.listeners,e,n)}},Ic={};b(Ic,{block:()=>Rc,css:()=>Pc,elements:()=>Lc,modifiers:()=>kc});var Rc="ag-charts-focus",Lc={wrapper:`${Rc}__wrapper`,indicator:`${Rc}__indicator`},kc={hidden:`${Rc}--hidden`},Pc=`\n.${Rc}.${Lc.wrapper} {\n    position: relative;\n    display: block;\n    pointer-events: none;\n    user-select: none;\n    overflow: hidden;\n    top: 0;\n    left: 0;\n}\n\n.${Rc}.${Lc.indicator} {\n    position: absolute;\n    display: block;\n    pointer-events: none;\n    user-select: none;\n    border: var(--ag-charts-focus-border);\n    box-shadow: var(--ag-charts-focus-border-shadow);\n}\n\n.${kc.hidden} {\n    visibility: hidden;\n}\n`,Nc=["series","legend"],Oc=class extends sc{},_c=class{constructor(e,t,i,n){this.interactionManager=e,this.keyNavManager=t,this.canvasElement=i,this.currentTabIndex=0,this.isDragging=!1,this.leftCanvas=!1,this.regions=new Map,this.destroyFns=[],this.destroyFns.push(...hc.map(t=>e.addListener(t,this.processPointerEvent.bind(this),31)),this.keyNavManager.addListener("blur",this.onNav.bind(this)),this.keyNavManager.addListener("browserfocus",this.onFocus.bind(this)),this.keyNavManager.addListener("tab",this.onTab.bind(this)),this.keyNavManager.addListener("nav-vert",this.onNav.bind(this)),this.keyNavManager.addListener("nav-hori",this.onNav.bind(this)),this.keyNavManager.addListener("submit",this.onNav.bind(this))),Tn(Pc,Rc),this.focusWrapper=xn().createElement("div"),this.focusIndicator=xn().createElement("div"),this.focusWrapper.appendChild(this.focusIndicator),n.appendChild(this.focusWrapper);const{block:s,elements:r,modifiers:o}=Ic;this.focusWrapper.classList.add(s,r.wrapper),this.focusIndicator.classList.add(s,r.indicator,o.hidden)}destroy(){this.destroyFns.forEach(e=>e()),this.currentRegion=void 0;for(const e of this.regions.values())e.listeners.destroy();this.focusWrapper.remove(),this.regions.clear()}addRegionFromProperties(e){const t={properties:e,listeners:new Oc};return this.regions.set(e.name,t),this.makeObserver(t)}addRegion(e,t,...i){return this.addRegionFromProperties({name:e,bboxproviders:[t,...i],canInteraction:()=>!0})}getRegion(e){return this.makeObserver(this.regions.get(e))}find(e,t){const i=[];for(const[n,s]of this.regions.entries())for(const n of s.properties.bboxproviders){const r=n.getCachedBBox();r.containsPoint(e,t)&&i.push([s,r.width*r.height])}return i.sort((e,t)=>e[1]-t[1]).map(e=>e[0])}makeObserver(e){const{interactionManager:t}=this;return new class{addListener(i,n,s=16){var r;return null!=(r=null==e?void 0:e.listeners.addListener(i,e=>{e.consumed||t.getState()&s&&n(e)}))?r:()=>{}}}}checkPointerHistory(e,t){for(const i of t.pointerHistory){const t=this.pickRegion(i.offsetX,i.offsetY);if(e.properties.name!==(null==t?void 0:t.properties.name))return!1}return!0}dispatch(e,t){null==e||e.listeners.dispatch(t.type,t)}handleDragging(e){const{currentRegion:t}=this;switch(e.type){case"drag-start":this.isDragging=!0,this.leftCanvas=!1;break;case"leave":return this.leftCanvas=!0,this.isDragging;case"enter":return this.leftCanvas=!1,this.isDragging;case"drag":if(this.isDragging)return this.dispatch(t,e),!0;break;case"drag-end":if(this.isDragging)return this.isDragging=!1,this.dispatch(t,e),this.leftCanvas&&this.dispatch(t,y(v({},e),{type:"leave"})),!0}return!1}processPointerEvent(e){if(this.handleDragging(e))return;const{currentRegion:t}=this,i=this.pickRegion(e.offsetX,e.offsetY);void 0!==t&&(null==i?void 0:i.properties.name)!==t.properties.name&&this.dispatch(t,y(v({},e),{type:"leave"})),void 0!==i&&i.properties.name!==(null==t?void 0:t.properties.name)&&this.dispatch(i,y(v({},e),{type:"enter"})),void 0!==i&&this.checkPointerHistory(i,e)&&this.dispatch(i,e),this.currentRegion=i}pickRegion(e,t){const i=this.find(e,t);return i.length>0?i[0]:void 0}getTabRegion(e){if(void 0!==e&&e>=0&&e<Nc.length)return this.regions.get(Nc[e])}dispatchTabStart(e){const{delta:t,sourceEvent:i}=e,n=lc({type:"tab-start",delta:t,sourceEvent:i}),s=this.getTabRegion(this.currentTabIndex);return this.dispatch(s,n),!!n.consumed}getNextInteractableTabIndex(e,t){const i=t<0?-1:1;let n=e;for(;0!==t;){const e=this.getTabRegion(n+i);if(void 0===e)return;e.properties.canInteraction()&&(t-=i),n+=i}return n}validateCurrentTabIndex(){var e;const t=this.getTabRegion(this.currentTabIndex);void 0===t||t.properties.canInteraction()||(this.currentTabIndex=null!=(e=this.getNextInteractableTabIndex(-1,1))?e:0)}onFocus(e){const{delta:t,sourceEvent:i}=e,n=t>0?this.getNextInteractableTabIndex(-1,1):this.getNextInteractableTabIndex(Nc.length,-1);this.currentTabIndex=null!=n?n:0;const s=this.getTabRegion(this.currentTabIndex);s&&this.dispatch(s,lc({type:"tab",delta:t,sourceEvent:i}))}onTab(e){if(this.dispatchTabStart(e))return;this.validateCurrentTabIndex();const t=this.getNextInteractableTabIndex(this.currentTabIndex,e.delta),i=this.getTabRegion(t),n=this.getTabRegion(this.currentTabIndex);if(void 0!==t&&(this.currentTabIndex=t),void 0!==n&&(null==i?void 0:i.properties.name)!==n.properties.name){const{delta:t,sourceEvent:i}=e,s=lc({type:"blur",delta:t,sourceEvent:i});this.dispatch(n,s)}void 0!==i&&i.properties.canInteraction()?this.dispatch(i,e):this.updateFocusIndicatorRect(void 0)}onNav(e){const t=this.getTabRegion(this.currentTabIndex);this.dispatch(t,e)}updateFocusWrapperRect(){this.focusWrapper.style.width=this.canvasElement.style.width,this.focusWrapper.style.height=this.canvasElement.style.height}updateFocusIndicatorRect(e){null!=e?(this.updateFocusWrapperRect(),this.focusIndicator.classList.remove(kc.hidden),this.focusIndicator.style.width=`${e.width}px`,this.focusIndicator.style.height=`${e.height}px`,this.focusIndicator.style.left=`${e.x}px`,this.focusIndicator.style.top=`${e.y}px`):this.focusIndicator.classList.add(kc.hidden)}},Fc=class extends ac{constructor(e){super(),this.element=e}static isGroup(e,t){return t.group===e}pressButton(e,t){this.listeners.dispatch("button-pressed",{type:"button-pressed",group:e,value:t})}toggleGroup(e,t){this.listeners.dispatch("group-toggled",{type:"group-toggled",group:e,visible:t})}toggleButton(e,t,i){this.listeners.dispatch("button-toggled",{type:"button-toggled",group:e,value:t,enabled:i})}proxyGroupOptions(e,t){this.listeners.dispatch("proxy-group-options",{type:"proxy-group-options",group:e,options:t})}},Gc=`\n.${tl} {\n    transition: transform 0.1s ease;\n    max-width: 100%;\n    position: fixed;\n    left: 0px;\n    top: 0px;\n    z-index: 99999;\n    font: 12px Verdana, sans-serif;\n    color: rgb(70, 70, 70);\n    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.08);\n}\n\n.${tl}-wrap-always {\n    overflow-wrap: break-word;\n    word-break: break-word;\n    hyphens: none;\n}\n\n.${tl}-wrap-hyphenate {\n    overflow-wrap: break-word;\n    word-break: break-word;\n    hyphens: auto;\n}\n\n.${tl}-wrap-on-space {\n    overflow-wrap: normal;\n    word-break: normal;\n}\n\n.${tl}-wrap-never {\n    white-space: pre;\n    text-overflow: ellipsis;\n}\n\n.${tl}-no-interaction {\n    pointer-events: none;\n    user-select: none;\n}\n\n.${tl}-no-animation {\n    transition: none !important;\n}\n\n.${tl}-hidden {\n    visibility: hidden;\n}\n\n.${tl}-title {\n    overflow: hidden;\n    position: relative;\n    padding: 8px 14px;\n    border-top-left-radius: 2px;\n    border-top-right-radius: 2px;\n    color: white;\n    background-color: #888888;\n    z-index: 1;\n    text-overflow: inherit;\n}\n\n.${tl}-title:only-child {\n    border-bottom-left-radius: 2px;\n    border-bottom-right-radius: 2px;\n}\n\n.${tl}-content {\n    overflow: hidden;\n    padding: 6px 14px;\n    line-height: 1.7em;\n    background: white;\n    border-bottom-left-radius: 2px;\n    border-bottom-right-radius: 2px;\n    border: 1px solid rgba(0, 0, 0, 0.15);\n    overflow: hidden;\n    text-overflow: inherit;\n}\n\n.${tl}-arrow::before {\n    content: "";\n\n    position: absolute;\n    top: 100%;\n    left: 50%;\n    transform: translateX(-50%);\n\n    border: 5px solid #d9d9d9;\n\n    border-left-color: transparent;\n    border-right-color: transparent;\n    border-bottom-color: transparent;\n\n    width: 0;\n    height: 0;\n\n    margin: 0 auto;\n}\n\n.${tl}-arrow::after {\n    content: "";\n\n    position: absolute;\n    top: calc(100% - 1px);\n    left: 50%;\n    transform: translateX(-50%);\n\n    border: 5px solid white;\n\n    border-left-color: transparent;\n    border-right-color: transparent;\n    border-bottom-color: transparent;\n\n    width: 0;\n    height: 0;\n\n    margin: 0 auto;\n}\n\n.ag-chart-wrapper {\n    box-sizing: border-box;\n    overflow: hidden;\n}\n`,Vc=class{constructor(e,t){if(this.canvasElement=e,this.tooltip=t,this.stateTracker=new xc,this.appliedState=null,"undefined"!=typeof IntersectionObserver){const e=new IntersectionObserver(e=>{for(const t of e)t.target===this.canvasElement&&0===t.intersectionRatio&&this.tooltip.toggle(!1)},{root:this.tooltip.root});e.observe(this.canvasElement),this.observer=e}Tn(Gc,"tooltip")}updateTooltip(e,t,i){var n;this.tooltip.enabled&&(null!=i||(i=null==(n=this.stateTracker.get(e))?void 0:n.content),this.stateTracker.set(e,{content:i,meta:t}),this.applyStates())}removeTooltip(e){this.tooltip.enabled&&(this.stateTracker.delete(e),this.applyStates())}getTooltipMeta(e){var t;return null==(t=this.stateTracker.get(e))?void 0:t.meta}destroy(){var e;null==(e=this.observer)||e.unobserve(this.canvasElement)}applyStates(){var e;const t=this.stateTracker.stateId(),i=t?this.stateTracker.get(t):null;if(null==(null==i?void 0:i.meta)||null==(null==i?void 0:i.content))return this.appliedState=null,void this.tooltip.toggle(!1);const n=this.canvasElement.getBoundingClientRect();if((null==(e=this.appliedState)?void 0:e.content)===(null==i?void 0:i.content)){const e=this.tooltip.isVisible();this.tooltip.show(n,null==i?void 0:i.meta,null,e)}else this.tooltip.show(n,null==i?void 0:i.meta,null==i?void 0:i.content);this.appliedState=i}static makeTooltipMeta(e,t){var i,n,s,r,o,a,l;const{offsetX:c,offsetY:h}=e,{tooltip:d}=t.series.properties,u={offsetX:c,offsetY:h,enableInteraction:null!=(n=null==(i=d.interaction)?void 0:i.enabled)&&n,lastPointerEvent:{type:e.type,offsetX:c,offsetY:h},showArrow:d.showArrow,position:{type:d.position.type,xOffset:d.position.xOffset,yOffset:d.position.yOffset}},p=null!=(l=null!=(r=null==(s=t.yBar)?void 0:s.upperPoint)?r:t.midPoint)?l:null==(a=(o=t.series).datumMidPoint)?void 0:a.call(o,t);if("node"===d.position.type&&p){const{x:e,y:i}=p,n=t.series.contentGroup.inverseTransformPoint(e,i);return y(v({},u),{offsetX:Math.round(n.x),offsetY:Math.round(n.y)})}return u}},Bc=class extends sc{constructor(){super(...arguments),this.layoutComplete="layout-complete"}addListener(e,t){if(this.isLayoutStage(e)||this.isLayoutComplete(e))return super.addListener(e,t);throw new Error(`AG Charts - unsupported listener type: ${e}`)}dispatchPerformLayout(e,t){return this.isLayoutStage(e)?this.getListenersByType(e).reduce((e,t)=>{try{return t.handler(e)}catch(t){return _.errorOnce(t),e}},t):t}dispatchLayoutComplete(e){this.dispatch(this.layoutComplete,e)}isLayoutStage(e){return e!==this.layoutComplete}isLayoutComplete(e){return e===this.layoutComplete}},Hc=class{constructor(){this.groups={}}registerSeries({id:e,seriesGrouping:t,visible:i,type:n}){var s;t&&(null!=(s=this.groups)[n]||(s[n]={}),this.groups[n][e]={grouping:t,visible:i})}deregisterSeries({id:e,type:t}){this.groups[t]&&delete this.groups[t][e],this.groups[t]&&0===Object.keys(this.groups[t]).length&&delete this.groups[t]}getVisiblePeerGroupIndex({type:e,seriesGrouping:t,visible:i}){var n;if(!t)return{visibleGroupCount:i?1:0,visibleSameStackCount:i?1:0,index:0};const s=new Set,r=new Set;for(const i of Object.values(null!=(n=this.groups[e])?n:{}))i.visible&&(s.add(i.grouping.groupIndex),i.grouping.groupIndex===t.groupIndex&&r.add(i.grouping.stackIndex));const o=Array.from(s);return o.sort((e,t)=>e-t),{visibleGroupCount:o.length,visibleSameStackCount:r.size,index:o.indexOf(t.groupIndex)}}},zc=(e=>(e[e.FULL=0]="FULL",e[e.UPDATE_DATA=1]="UPDATE_DATA",e[e.PROCESS_DATA=2]="PROCESS_DATA",e[e.PERFORM_LAYOUT=3]="PERFORM_LAYOUT",e[e.SERIES_UPDATE=4]="SERIES_UPDATE",e[e.TOOLTIP_RECALCULATION=5]="TOOLTIP_RECALCULATION",e[e.SCENE_RENDER=6]="SCENE_RENDER",e[e.NONE=7]="NONE",e))(zc||{}),Uc=class extends sc{constructor(e){super(),this.updateCallback=e}update(e=0,t){this.updateCallback(e,t)}dispatchUpdateComplete(e){this.dispatch("update-complete",{type:"update-complete",minRect:null==e?void 0:e.minRect,minVisibleRect:null==e?void 0:e.minVisibleRect})}},Wc=class{constructor(e,t){const{scene:i,syncManager:n,element:s,updateCallback:r,updateMutex:o}=t;this.chartService=e,this.scene=i,this.syncManager=n,this.zoomManager=e.zoomManager,this.annotationManager=new nc(e.annotationRoot),this.ariaAnnouncementService=new bc(i.canvas.element),this.chartEventManager=new Sc,this.contextMenuRegistry=new wc,this.cursorManager=new Ec(s),this.highlightManager=new Tc,this.interactionManager=new vc(e.keyboard,s),this.keyNavManager=new Dc(this.interactionManager),this.regionManager=new _c(this.interactionManager,this.keyNavManager,this.scene.canvas.element,s),this.toolbarManager=new Fc(s),this.gestureDetector=new Ac(s),this.layoutService=new Bc,this.updateService=new Uc(r),this.seriesStateManager=new Hc,this.callbackCache=new ic,this.animationManager=new Cc(this.interactionManager,o),this.animationManager.skip(),this.animationManager.play(),this.dataService=new rc(this.animationManager),this.tooltipManager=new Vc(this.scene.canvas.element,e.tooltip)}destroy(){this.tooltipManager.destroy(),this.regionManager.destroy(),this.keyNavManager.destroy(),this.interactionManager.destroy(),this.animationManager.stop(),this.animationManager.destroy(),this.ariaAnnouncementService.destroy(),this.chartEventManager.destroy(),this.highlightManager.destroy(),this.callbackCache.invalidateCache(),this.animationManager.reset(),this.syncManager.destroy()}},jc=class extends Ct{constructor(){super(...arguments),this.range="tooltip"}};S([Ys(Gr(["tooltip","node"],"a range"))],jc.prototype,"range",2);var Kc=class e{constructor(){this.domain=new Set}static is(t){return t instanceof e}extend(e){this.domain.add(e)}getDomain(){return Array.from(this.domain)}},$c=class e{constructor(){this.domain=[1/0,-1/0]}static is(t){return t instanceof e}static extendDomain(e,t=[1/0,-1/0]){for(const i of e)"number"==typeof i&&(t[0]>i&&(t[0]=i),t[1]<i&&(t[1]=i));return t}extend(e){this.domain[0]>e&&(this.domain[0]=e),this.domain[1]<e&&(this.domain[1]=e)}getDomain(){return[...this.domain]}};function Yc(e){return e.map(e=>Be(e)?JSON.stringify(e):e).join("-")}function qc(e){const t=1e4;return Number.isInteger(e)?e:Math.abs(e)>t?Math.trunc(e):Math.round(e*t)/t}function Xc(e,t){var i;const n=function(e){if(null==e)return[];let[t,i]=e.map(Number);return 0===t&&0===i?[0,1]:t===1/0&&i===-1/0?[]:(t===1/0?t=0:i===-1/0&&(i=0),je(t)&&je(i)?[t,i]:[])}(e);if(0===n.length)return n;let[s,r]=n;if(s===r){const[e,n]=null!=(i=null==t?void 0:t.calculatePadding(s,r))?i:[1,1];s-=e,r+=n}return[s,r]}function Zc(e,t){var i;return null!=(i=null==t?void 0:t.get(e.id))?i:0}var Qc=Symbol("invalid"),Jc=class{constructor(e,t="standalone"){this.opts=e,this.mode=t,this.debug=Ln.create(!0,"data-model"),this.scopeCache=new Map,this.keys=[],this.values=[],this.aggregates=[],this.groupProcessors=[],this.propertyProcessors=[],this.reducers=[],this.processors=[];let i=!0;for(const t of e.props){if("key"===t.type&&!i)throw new Error("AG Charts - internal config error: keys must come before values.");"value"===t.type&&i&&(i=!1)}const n=({matchGroupIds:e=[]})=>{for(const t of e)if(this.values.every(e=>e.groupId!==t))throw new Error(`AG Charts - internal config error: matchGroupIds properties must match defined groups (${t}).`)};for(const t of e.props)switch(t.type){case"key":this.keys.push(y(v({},t),{index:this.keys.length,missing:new Map}));break;case"value":if(null==t.property)throw new Error(`AG Charts - internal config error: no properties specified for value definitions: ${JSON.stringify(t)}`);this.values.push(y(v({},t),{index:this.values.length,missing:new Map}));break;case"aggregate":n(t),this.aggregates.push(y(v({},t),{index:this.aggregates.length}));break;case"group-value-processor":n(t),this.groupProcessors.push(y(v({},t),{index:this.groupProcessors.length}));break;case"property-value-processor":this.propertyProcessors.push(y(v({},t),{index:this.propertyProcessors.length}));break;case"reducer":this.reducers.push(y(v({},t),{index:this.reducers.length}));break;case"processor":this.processors.push(y(v({},t),{index:this.processors.length}))}}resolveProcessedDataDefById(e,t){var i;const n=null==(i=this.scopeCache.get(e.id))?void 0:i.get(t);if(!n)throw new Error(`AG Charts - didn't find property definition for [${t}, ${e.id}]`);return{index:n.index,def:n}}resolveProcessedDataIndexById(e,t){return this.resolveProcessedDataDefById(e,t).index}resolveProcessedDataDefsByIds(e,t){return t.map(t=>[t,this.resolveProcessedDataDefById(e,t)])}resolveProcessedDataDefsValues(e,{keys:t,values:i}){const n={};for(const[s,{index:r,def:o}]of e){const e="key"===o.type?t:i;n[s]=e[r]}return n}getDomain(e,t,i="value",n){var s;const r=this.getDomainsByType(i,n);return null!=(s=null==r?void 0:r[this.resolveProcessedDataIndexById(e,t)])?s:[]}getDomainsByType(e,t){switch(e){case"key":return t.domain.keys;case"value":return t.domain.values;case"aggregate":return t.domain.aggValues;case"group-value-processor":return t.domain.groups;default:return null}}processData(e,t){var i;const{opts:{groupByKeys:n,groupByFn:s},aggregates:r,groupProcessors:o,reducers:a,processors:l,propertyProcessors:c}=this,h=performance.now();if(n&&0===this.keys.length)return;let d=this.extractData(e,t);if(n?d=this.groupData(d):s&&(d=this.groupData(d,s(d))),o.length>0&&this.postProcessGroups(d),r.length>0&&this.aggregateData(d),c.length>0&&this.postProcessProperties(d),a.length>0&&this.reduceData(d),l.length>0&&this.postProcessData(d),e.length>0)for(const t of N(this.keys,this.values))for(const[i,n]of t.missing)if(n>=e.length){const e=null==i?"":` for ${i}`;_.warnOnce(`the key '${t.property}' was not found in any data element${e}.`)}const u=performance.now();d.time=u-h,this.debug.check()&&function(e){var t,i;const n=(e,t)=>{t.length>0&&(_.log(`DataModel.processData() - ${e}`),_.table(t))};_.log("DataModel.processData() - processedData",e),n("Key Domains",e.domain.keys),n("Group Domains",null!=(t=e.domain.groups)?t:[]),n("Value Domains",e.domain.values),n("Aggregate Domains",null!=(i=e.domain.aggValues)?i:[]),"grouped"===e.type?n("Values",e.data.reduce((e,t)=>{var i,n;const s=null!=(i=t.keys)?i:[],r=null!=(n=t.aggValues)?n:[],o=t.keys.map(()=>{}),a=null==r?void 0:r.map(()=>{});return e.push(...t.values.map((e,t)=>[...0===t?s:o,...null!=e?e:[],...0==t?r:a])),e},[])):n("Values",e.data.reduce((e,t)=>{var i;const n=null!=(i=t.aggValues)?i:[];return e.push([...t.keys,...t.values,...n]),e},[]))}(d),this.scopeCache.clear();for(const e of N(this.keys,this.values,this.aggregates))if(e.idsMap)for(const[t,n]of e.idsMap)for(const s of n)if(this.scopeCache.has(t)){if(null==(i=this.scopeCache.get(t))?void 0:i.has(s))throw new Error("duplicate definition ids on the same scope are not allowed.");this.scopeCache.get(t).set(s,e)}else this.scopeCache.set(t,new Map([[s,e]]));return d}valueGroupIdxLookup({matchGroupIds:e}){const t=[];for(const[i,n]of this.values.entries())(!e||n.groupId&&e.includes(n.groupId))&&t.push(i);return t}valueIdxLookup(e,t){const i=null==e||0===e.length,n="string"==typeof t?t:t.id,s=this.values.findIndex(t=>(null==t.scopes||i&&!t.scopes.length||t.scopes.some(t=>null==e?void 0:e.includes(t)))&&(t.property===n||t.id===n||(t=>{if(t.idsMap)for(const[i,s]of t.idsMap)if((null==e?void 0:e.includes(i))&&s.has(n))return!0;return!1})(t)));if(-1===s)throw new Error(`AG Charts - configuration error, unknown property ${JSON.stringify(t)} in scope(s) ${JSON.stringify(e)}`);return s}extractData(e,t){var i,n,s;const{dataDomain:r,processValue:o,scopes:a,allScopesHaveSameDefs:l}=this.initDataDomainProcessor(),c=new Map(null==t?void 0:t.map(e=>[e.id,e])),{keys:h,values:d}=this,u=new Array(e.length);let p=0,g=0;for(const[t,r]of e.entries()){const e={},f=a.size>0?new Set(a):void 0,m=new Array(h.length);let y,C=0;for(const e of h){if(y=o(e,r,y),y===Qc)break;m&&(m[C++]=y)}if(y===Qc)continue;const b=d.length>0?new Array(d.length):void 0;let S;for(const[h,u]of d.entries()){for(const s of null!=(i=u.scopes)?i:a){const i=c.get(s);if(S=o(u,null!=(n=null==i?void 0:i.data[t])?n:r,S,s),S!==Qc&&b){if(null!=i&&!1!==u.includeProperty){const t=u.includeProperty&&null!=u.id?u.id:u.property;null!=e[s]||(e[s]={}),e[s][t]=S}b[h]=S}}if(S===Qc){if(l)break;for(const e of null!=(s=u.scopes)?s:a)null==f||f.delete(e);if(0===(null==f?void 0:f.size))break}}if(S===Qc&&l)continue;if(0===(null==f?void 0:f.size))continue;const w={datum:v(v({},r),e),keys:m,values:b};!l&&f&&f.size<a.size&&(g++,w.validScopes=new Set(f)),u[p++]=w}u.length=p;const f=e=>{const t=r.get(e),i=t.getDomain();return $c.is(t)&&i[0]>i[1]?[]:i};return{type:"ungrouped",input:{count:e.length},data:u,domain:{keys:h.map(f),values:d.map(f)},defs:{allScopesHaveSameDefs:l,keys:h,values:d},partialValidDataCount:g,time:0}}groupData(e,t){var i;const n=new Map;for(const s of e.data){const{keys:e,values:r,datum:o,validScopes:a}=s,l=null!=(i=null==t?void 0:t(s))?i:e,c=Yc(l);if(n.has(c)){const e=n.get(c);if(e.values.push(r),e.datum.push(o),null!=a&&null!=e.validScopes)for(const t of e.validScopes)a.has(t)||e.validScopes.delete(t)}else n.set(c,{keys:l,values:[r],datum:[o],validScopes:a})}const s=new Array(n.size),r=new Array(n.size);let o=0;for(const{keys:e,values:t,datum:i,validScopes:a}of n.values())0!==(null==a?void 0:a.size)&&(r[o]=e,s[o++]={keys:e,values:t,datum:i,validScopes:a});return y(v({},e),{type:"grouped",data:s,domain:y(v({},e.domain),{groups:r})})}aggregateData(e){var t,i,n,s,r,o;const a="ungrouped"===e.type;e.domain.aggValues=[];for(const[l,c]of this.aggregates.entries()){const h=this.valueGroupIdxLookup(c),d=[1/0,-1/0];for(const u of e.data){if(null!=u.aggValues||(u.aggValues=new Array(this.aggregates.length)),u.validScopes)continue;const e=a?[u.values]:u.values;let p=null!=(i=null==(t=c.groupAggregateFunction)?void 0:t.call(c))?i:[1/0,-1/0];for(const t of e){const e=h.map(e=>t[e]),i=c.aggregateFunction(e,u.keys);i&&(p=null!=(s=null==(n=c.groupAggregateFunction)?void 0:n.call(c,i,p))?s:$c.extendDomain(i,p))}const g=(null!=(o=null==(r=c.finalFunction)?void 0:r.call(c,p))?o:p).map(e=>qc(e));u.aggValues[l]=g,$c.extendDomain(g,d)}e.domain.aggValues.push(d)}}postProcessGroups(e){var t,i;const{groupProcessors:n}=this,s=new Set,r=new Map,o=new Map,a=new Map;for(const e of n){const t=this.valueGroupIdxLookup(e);o.set(e,t),a.set(e,e.adjust());for(const e of t){const t="category"===this.values[e].valueType;s.add(e),r.set(e,t?new Kc:new $c)}}const l=e=>{var t;for(const i of s)null==(t=r.get(i))||t.extend(e[i])};for(const s of e.data){for(const r of n){if(s.validScopes)continue;const n=null!=(t=o.get(r))?t:[],l=null==(i=a.get(r))?void 0:i();if(l)if("grouped"===e.type)for(const e of s.values)e&&l(e,n);else s.values&&l(s.values,n)}if("grouped"===e.type)for(const e of s.values)l(e);else l(s.values)}for(const[t,i]of r)e.domain.values[t]=i.getDomain()}postProcessProperties(e){for(const{adjust:t,property:i,scopes:n}of this.propertyProcessors)t()(e,this.valueIdxLookup(n,i))}reduceData(e){var t;null!=e.reduced||(e.reduced={});for(const i of this.reducers){const n=i.reducer();let s=i.initialValue;for(const r of e.data)r.validScopes&&!(null==(t=i.scopes)?void 0:t.some(e=>{var t;return null==(t=r.validScopes)?void 0:t.has(e)}))||(s=n(s,r));e.reduced[i.property]=s}}postProcessData(e){null!=e.reduced||(e.reduced={});for(const t of this.processors)e.reduced[t.property]=t.calculate(e)}initDataDomainProcessor(){const{keys:e,values:t}=this,i=new Set;for(const e of t)if(e.scopes)for(const t of e.scopes)i.add(t);const n=new Map,s=new Map;let r=!0;const o=()=>{var s;for(const o of N(e,t))"category"===o.valueType?n.set(o,new Kc):(n.set(o,new $c),r&&(r=(null!=(s=o.scopes)?s:[]).length===i.size))};o();const a=this.buildAccessors(N(e,t));return{dataDomain:n,processValue:(e,t,i,r)=>{var l,c,h,d,u;let p,g;if(a.has(e.property)){try{g=a.get(e.property)(t)}catch(e){}p=null!=g}else p=e.property in t,g=p?t[e.property]:e.missingValue;if(null!=e.forceValue&&(g=p&&Yn(g)?-1*e.forceValue:e.forceValue,p=!0),!p&&!("missingValue"in e)){const t=null!=(l=e.missing.get(r))?l:0;e.missing.set(r,t+1)}if(n.has(e)||o(),p&&null!=(h=null==(c=e.validation)?void 0:c.call(e,g,t))&&!h){if(!("invalidValue"in e))return"integrated"!==this.mode&&_.warnOnce(`invalid value of type [${typeof g}] ignored:`,`[${g}]`),Qc;g=e.invalidValue}return e.processor&&(s.has(e)||s.set(e,e.processor()),g=null==(d=s.get(e))?void 0:d(g,i===Qc?void 0:i)),null==(u=n.get(e))||u.extend(g),g},initDataDomain:o,scopes:i,allScopesHaveSameDefs:r}}buildAccessors(e){const t=new Map;if("integrated"===this.mode)return t;for(const i of e){if(!i.property.includes(".")&&!i.property.includes("["))continue;let e;e=i.property.startsWith("[")?`return datum${i.property};`:`return datum.${i.property};`,t.set(i.property,new Function("datum",e))}return t}},eh=class e{constructor(e){this.mode=e,this.debug=Ln.create(!0,"data-model"),this.requested=[],this.status="setup"}request(e,t,i){return x(this,null,function*(){if("setup"!==this.status)throw new Error("AG Charts - data request after data setup phase.");return new Promise((n,s)=>{this.requested.push({id:e,opts:i,data:t,resolve:n,reject:s})})})}execute(){if("setup"!==this.status)throw new Error("AG Charts - data request after data setup phase.");this.status="executed",this.debug("DataController.execute() - requested",this.requested);const e=this.validateRequests(this.requested);this.debug("DataController.execute() - validated",e);const t=this.mergeRequested(e);this.debug("DataController.execute() - merged",t),this.debug.check()&&(En().processedData=[]);const i=this.requested.map(({id:e})=>e),n=this.hasMultipleDataSources(e);for(const{opts:s,data:r,resolves:o,rejects:a,ids:l}of t)try{const t=new Jc(s,this.mode),c=t.processData(r,e);this.debug.check()&&En("processedData").push(c),0===(null==c?void 0:c.partialValidDataCount)?o.forEach((e,s)=>e({dataModel:t,processedData:this.processScopedData(l[s],c,i,n)})):c?this.splitResult(t,c,l,o):a.forEach(e=>e(new Error("AG Charts - no processed data generated")))}catch(e){a.forEach(t=>t(e))}}hasMultipleDataSources(e){if(e.length){const[{data:t},...i]=e;return i.some(e=>t!==e.data)}return!1}processScopedData(e,t,i,n){const s=t=>{if(Array.isArray(t))return t.map(s);const r=n?v(v({},t),t[e]):t;for(const e of i)delete r[e];return r},r=t=>{var i;return Array.isArray(t)?t.map(r):null!=(i=null==t?void 0:t[e])?i:t};return y(v({},t),{data:t.data.map(e=>{var t;return y(v({},e),{datum:s(e.datum),values:n?null==(t=e.values)?void 0:t.map(r):e.values})})})}validateRequests(e){const t=[];for(const[i,n]of e.entries())i>0&&n.data.length!==e[0].data.length&&!1===n.opts.groupByData?n.reject(new Error("all series[].data arrays must be of the same length and have matching keys.")):t.push(n);return t}mergeRequested(t){const i=[];for(const n of t){const t=i.find(e.groupMatch(n));t?t.push(n):i.push([n])}return i.map(e.mergeRequests)}splitResult(e,t,i,n){for(let s=0;s<i.length;s++){const r=i[s];(0,n[s])({dataModel:e,processedData:y(v({},t),{data:t.data.filter(({validScopes:e})=>{var t;return null==(t=null==e?void 0:e.has(r))||t})})})}}static groupMatch({data:e,opts:t}){function i(e){return e.filter(e=>"key"===e.type).map(e=>e.property).join(";")}return([n])=>(!1===t.groupByData||n.data===e)&&n.opts.groupByKeys===t.groupByKeys&&n.opts.groupByFn===t.groupByFn&&i(n.opts.props)===i(t.props)}static mergeRequests(t){return t.reduce((t,i)=>{var n,s,{id:r,data:o,resolve:a,reject:l,opts:c}=i,h=c,{props:d}=h,u=C(h,["props"]);t.ids.push(r),t.rejects.push(l),t.resolves.push(a),null!=t.data||(t.data=o),null!=t.opts||(t.opts=y(v({},u),{props:[]}));for(const i of d){const o=y(v({},i),{scopes:[r]});e.createIdsMap(r,o);const a=t.opts.props.find(t=>t.type===o.type&&e.deepEqual(t,o));a?(null!=a.scopes||(a.scopes=[]),a.scopes.push(...null!=(n=o.scopes)?n:[]),"key"!==a.type&&"value"!==a.type||!(null==(s=o.idsMap)?void 0:s.size)||e.mergeIdsMap(o.idsMap,a.idsMap)):t.opts.props.push(o)}return t},{ids:[],rejects:[],resolves:[],data:null,opts:null})}static mergeIdsMap(e,t){for(const[i,n]of e)if(t.has(i))for(const e of n)t.get(i).add(e);else t.set(i,new Set(n))}static createIdsMap(e,t){null!=t.id&&(null!=t.idsMap||(t.idsMap=new Map),t.idsMap.has(e)?t.idsMap.get(e).add(t.id):t.idsMap.set(e,new Set([t.id])))}static deepEqual(t,i){if(t===i)return!0;if(t&&i&&"object"==typeof t&&"object"==typeof i){if(t.constructor!==i.constructor)return!1;let n,s;if(Array.isArray(t)){if(s=t.length,s!==i.length)return!1;for(n=s-1;n>=0;n--)if(!e.deepEqual(t[n],i[n]))return!1;return!0}const r=Object.keys(t);if(s=r.length,s!==Object.keys(i).length)return!1;for(n=s-1;n>=0;n--){const s=r[n];if(!(e.skipKeys.has(s)||Object.hasOwn(i,s)&&e.deepEqual(t[s],i[s])))return!1}return!0}return!1}};eh.skipKeys=new Set(["id","idsMap","type","scopes"]);var th=eh,ih=class e extends ac{constructor(e){super(),this.chart=e}subscribe(t=e.DEFAULT_GROUP){let i=this.get(t);return i||(i=new Set,e.chartsGroups.set(t,i)),i.add(this.chart),this}unsubscribe(t=e.DEFAULT_GROUP){var i;return null==(i=this.get(t))||i.delete(this.chart),this}getChart(){return this.chart}getGroup(t=e.DEFAULT_GROUP){const i=this.get(t);return i?Array.from(i):[]}getGroupSiblings(t=e.DEFAULT_GROUP){return this.getGroup(t).filter(e=>e!==this.chart)}get(t){return e.chartsGroups.get(t)}};ih.chartsGroups=new Map,ih.DEFAULT_GROUP=Symbol("sync-group-default");var nh=ih,sh=class extends ac{constructor(){super(...arguments),this.axisZoomManagers=new Map,this.state=new xc(void 0,"initial"),this.rejectCallbacks=new Map}updateAxes(e){var t;const i=new Map(e.map(e=>[e.id,this.axisZoomManagers.get(e.id)]));this.axisZoomManagers.clear();for(const n of e)this.axisZoomManagers.set(n.id,null!=(t=i.get(n.id))?t:new rh(n));this.state.size>0&&e.length>0&&this.updateZoom(this.state.stateId(),this.state.stateValue())}updateZoom(e,t,i=!0,n){var s;if(n&&this.rejectCallbacks.set(e,n),0===this.axisZoomManagers.size){const r=this.state.stateId();return void("initial"===r||r===e||i?(this.state.set(e,t),r!==e&&(null==(s=this.rejectCallbacks.get(r))||s(e))):null==n||n(r))}this.state.set(e,t),this.axisZoomManagers.forEach(i=>{i.updateZoom(e,null==t?void 0:t[i.getDirection()])}),this.applyChanges(e)}updateAxisZoom(e,t,i){var n;null==(n=this.axisZoomManagers.get(t))||n.updateZoom(e,i),this.applyChanges(e)}fireZoomPanStartEvent(e){this.listeners.dispatch("zoom-pan-start",{type:"zoom-pan-start",callerId:e})}getZoom(){let e,t;if(this.axisZoomManagers.forEach(i=>{"x"===i.getDirection()?null!=e||(e=i.getZoom()):"y"===i.getDirection()&&(null!=t||(t=i.getZoom()))}),e||t)return{x:e,y:t}}getAxisZoom(e){var t,i;return null!=(i=null==(t=this.axisZoomManagers.get(e))?void 0:t.getZoom())?i:{min:0,max:1}}getAxisZooms(){const e={};for(const[t,i]of this.axisZoomManagers.entries())e[t]={direction:i.getDirection(),zoom:i.getZoom()};return e}applyChanges(e){if(!Array.from(this.axisZoomManagers.values(),e=>e.applyChanges()).some(Boolean))return;const t={};for(const[e,i]of this.axisZoomManagers.entries())t[e]=i.getZoom();this.listeners.dispatch("zoom-change",y(v({type:"zoom-change"},this.getZoom()),{axes:t,callerId:e}))}},rh=class{constructor(e){this.axis=e;const[t=0,i=1]=e.visibleRange;this.state=new xc({min:t,max:i}),this.currentZoom=this.state.stateValue()}getDirection(){return this.axis.direction}updateZoom(e,t){this.state.set(e,t)}getZoom(){return Et(this.state.stateValue())}applyChanges(){const e=this.currentZoom;return this.currentZoom=this.state.stateValue(),e.min!==this.currentZoom.min||e.max!==this.currentZoom.max}},oh=class extends Ct{constructor(){super(...arguments),this.enabled=!1}};function ah(e,t){const{bbox:i,showFocusBox:n}=t;if(n&&e.updateFocusIndicatorRect(t.bbox),void 0!==i){const{x:e,y:t}=i.computeCenter();return{type:"keyboard",offsetX:e,offsetY:t}}}S([Ys(er)],oh.prototype,"enabled",2),S([Ys(nr)],oh.prototype,"tabIndex",2);var lh=["top","right","bottom","left"],ch=["category","grouped-category","ordinal-time","number","log","time"],hh=class{constructor(){this.result=[],this.valid=[],this.invalid=[]}push(e,t){const{result:i,valid:n,invalid:s}=this;var r;(function(e){return ch.includes(e.type)})(t)&&("string"==typeof(r=t.position)&&lh.includes(r)?n.push(e):s.push(e)),i.push(e)}guessInvalidPositions(){const e=this.valid.filter(e=>ch.includes(e.type)).map(e=>e.position).filter(e=>void 0!==e),t=["top","right","bottom","left"];for(const i of this.invalid){let n=t.pop();for(;e.includes(n)&&void 0!==n;)n=t.pop();if(void 0===n)break;i.position=n}return this.result}},dh=["direction","xKey","yKey","sizeKey","angleKey","radiusKey","normalizedTo","stacked","grouped","stackGroup"],uh=class extends fa{applyOptions(e){for(const t of this.moduleMap.values())t.module.optionsKey in e&&St(t.moduleInstance)&&t.moduleInstance.set(e[t.module.optionsKey])}*legends(){for(const{module:e,moduleInstance:t}of this.moduleMap.values())"legend"===e.type&&(yield{legendType:e.identifier,legend:t})}},ph="ag-chart-overlay",gh="ag-chart-dark-overlay",fh=class extends Ct{constructor(e,t){super(),this.className=e,this.defaultText=t,this.darkTheme=!1}getText(){var e;return null!=(e=this.text)?e:this.defaultText}getElement(e,t){null!=this.element||(this.element=Mn("div",ph,{position:"absolute"})),this.element.classList.toggle(gh,this.darkTheme),this.focusBox=t;const i=this.element;if(i.style.left=`${t.x}px`,i.style.top=`${t.y}px`,i.style.width=`${t.width}px`,i.style.height=`${t.height}px`,this.renderer){const e=this.renderer();e instanceof HTMLElement?i.replaceChildren(e):i.innerHTML=e}else{const t=Mn("div",{display:"flex",alignItems:"center",justifyContent:"center",boxSizing:"border-box",height:"100%",margin:"8px",font:"12px Verdana, sans-serif"});t.innerText=this.getText(),i.replaceChildren(t),null==e||e.animate({from:0,to:1,id:"overlay",phase:"add",groupId:"opacity",onUpdate(e){i.style.opacity=String(e)},onStop(){i.style.opacity="1"}})}return this.element}removeElement(e){if(this.element){if(e){const{element:t}=this;e.animate({from:1,to:0,phase:"remove",id:"overlay",groupId:"opacity",onUpdate(e){t.style.opacity=String(e)},onStop(){t.remove()}})}else this.element.remove();this.element=void 0,this.focusBox=void 0}}};S([Ys(ir,{optional:!0})],fh.prototype,"text",2),S([Ys(tr,{optional:!0})],fh.prototype,"renderer",2),S([Ys(er)],fh.prototype,"darkTheme",2);var mh=class extends Ct{constructor(){super(...arguments),this.loading=new fh("ag-chart-loading-overlay","Loading data..."),this.noData=new fh("ag-chart-no-data-overlay","No data to display"),this.noVisibleSeries=new fh("ag-chart-no-visible-series","No visible series")}getFocusInfo(){for(const e of[this.loading,this.noData,this.noVisibleSeries])if(void 0!==e.focusBox)return{text:e.getText(),rect:e.focusBox}}destroy(){this.loading.removeElement(),this.noData.removeElement(),this.noVisibleSeries.removeElement()}};S([Ys(Qs)],mh.prototype,"loading",2),S([Ys(Qs)],mh.prototype,"noData",2),S([Ys(Qs)],mh.prototype,"noVisibleSeries",2);var vh=`\n.${ph} {\n    color: #181d1f;\n}\n\n.${ph}.${gh} {\n    color: #ffffff;\n}\n\n.${ph}--loading {\n    color: rgb(140, 140, 140); /* DEFAULT_MUTED_LABEL_COLOUR */\n}\n\n.${ph}__loading-background {\n    background: white; /* DEFAULT_BACKGROUND_FILL */\n}\n\n.${ph}.${gh} .${ph}__loading-background {\n    background: #192232; /* DEFAULT_DARK_BACKGROUND_FILL */\n}\n`;function yh(e,t=[0,0]){for(const i of e)"number"==typeof i&&(i<0&&(t[0]+=i),i>0&&(t[1]+=i));return t}function Ch(e,t){return{id:e,matchGroupIds:[t],type:"aggregate",aggregateFunction:e=>yh(e)}}function bh(e,t){return{id:e,type:"aggregate",matchGroupIds:t?[t]:void 0,aggregateFunction:e=>yh(e),groupAggregateFunction:(e,t=[0,0])=>{var i,n;return t[0]+=null!=(i=null==e?void 0:e[0])?i:0,t[1]+=null!=(n=null==e?void 0:e[1])?n:0,t}}}function Sh(e,t){return{id:e,matchGroupIds:[t],type:"aggregate",aggregateFunction:e=>$c.extendDomain(e)}}function wh(e){return{id:e,type:"aggregate",aggregateFunction:()=>[0,1],groupAggregateFunction:(e,t=[0,0])=>{var i,n;return t[0]+=null!=(i=null==e?void 0:e[0])?i:0,t[1]+=null!=(n=null==e?void 0:e[1])?n:0,t}}}function xh(e,t){return{id:e,matchGroupIds:t?[t]:void 0,type:"aggregate",aggregateFunction:e=>yh(e),groupAggregateFunction:(e,t=[0,0,-1])=>{var i,n;return t[0]+=null!=(i=null==e?void 0:e[0])?i:0,t[1]+=null!=(n=null==e?void 0:e[1])?n:0,t[2]++,t},finalFunction:(e=[0,0,0])=>{const t=e[0]+e[1];return t>=0?[0,t/e[2]]:[t/e[2],0]}}}function Eh(e,t,i){const n={id:e,matchGroupIds:i?[i]:void 0,type:"aggregate",aggregateFunction:(e,i=[])=>{const n=i[1]-i[0];return t.aggregateFunction(e).map(e=>e/n)}};return t.groupAggregateFunction&&(n.groupAggregateFunction=t.groupAggregateFunction),n}function Mh(e){return()=>{let t=0;return i=>je(i)?(t+=e?Math.max(0,i):i,t):i}}function Ah(){return()=>{let e=0;return t=>{if(!je(t))return t;const i=e;return e+=t,i}}}var Th={type:"reducer",property:"smallestKeyInterval",initialValue:1/0,reducer:()=>{let e=NaN;return(t=1/0,i)=>{const n=i.keys[0],s=Math.abs(n-e);return e=n,!isNaN(s)&&s>0&&s<t?s:t}}},Dh={type:"processor",property:"sortedGroupDomain",calculate:({domain:{groups:e}})=>null==e?void 0:e.slice().sort((e,t)=>{for(let i=0;i<e.length;i++){const n=e[i]-t[i];if(0!==n)return n}return 0})};function Ih({normaliseTo:e,mode:t}){const i=(t,i)=>{const n=t*e/i;return n>=0?Math.min(e,n):Math.max(-e,n)};return()=>()=>(e,n)=>{const s=[0,0];for(const i of n){const n=e[i],r=n<0?0:1;"sum"===t?s[r]+=n:s[r]=0===r?Math.min(s[r],n):Math.max(s[r],n)}const r=Math.max(Math.abs(s[0]),s[1]);for(const t of n)e[t]=i(e[t],r)}}function Rh(e,t,i="sum"){return{type:"group-value-processor",matchGroupIds:e,adjust:No({normaliseTo:t,mode:i},Ih)}}function Lh({normaliseTo:e,zeroDomain:t,rangeMin:i,rangeMax:n}){const s=e[1]-e[0],r=(i,n,r)=>{const o=e[0]+(i-n)/r*s;return 0===r?t:o>=e[1]?e[1]:o<e[0]?e[0]:o};return()=>(t,s)=>{let[o,a]=t.domain.values[s];null!=i&&(o=i),null!=n&&(a=n);const l=a-o;t.domain.values[s]=[e[0],e[1]];for(const e of t.data){let i=e.values;"ungrouped"===t.type&&(i=[i]);for(const e of i)e[s]=r(e[s],o,l)}}}function kh(e,t,i,n,s){return{type:"property-value-processor",property:e,adjust:No({normaliseTo:t,rangeMin:n,rangeMax:s,zeroDomain:i},Lh)}}function Ph(e){return{type:"processor",property:"animationValidation",calculate(t){const{keys:i,values:n}=t.defs,{input:s,data:r}=t;let o=!0,a=!0;const l=[];for(let t=0;t<n.length;t++)(null==e?void 0:e.includes(n[t].id))&&l.push([t,n[t]]);const c=(e,i,n)=>{var l;if("category"===i.valueType){const i=t.domain[n][e];return void(o&&(o=i.length===s.count))}let c=null==(l=r[0])?void 0:l[n][e];for(let t=1;(o||a)&&t<r.length;t++){const i=r[t][n][e];a&&(a=c<=i),o&&(o=c!==i),c=i}};for(let e=0;(o||a)&&e<i.length;e++)c(e,i[e],"keys");for(let e=0;(o||a)&&e<l.length;e++){const[t,i]=l[e];c(t,i,"values")}return{uniqueKeys:o,orderedKeys:a}}}}function Nh({mode:e,separateNegative:t}){return()=>()=>(i,n)=>{const s=[0,0];for(const r of n){const n=i[r],o=Yn(n)&&t?0:1;je(n)&&("normal"===e&&(s[o]+=n),i[r]=s[o],"trailing"===e&&(s[o]+=n))}}}function Oh({mode:e,sum:t}){return()=>{const i=[];let n=!0;return()=>(s,r)=>{let o=0;for(const a of r){const r=s[a],l=n&&"current"===t?0:i[a];i[a]=r;const c="current"===t?r:l;je(r)&&je(l)?("normal"===e&&(o+=c),s[a]=o,"trailing"===e&&(o+=c)):s[a]=o}n=!1}}}function _h(e,t,i,n=!1){let s;return s=t.startsWith("window")?No({mode:t.endsWith("-trailing")?"trailing":"normal",sum:i},Oh):No({mode:t,separateNegative:n},Nh),{type:"group-value-processor",matchGroupIds:[e],adjust:s}}function Fh(e,t=!0){return{type:"processor",property:"diff",calculate:i=>{const n=new Map,s=new Map,r=new Map,o=new Map,a=Math.max(e.data.length,i.data.length);for(let l=0;l<a;l++){const a=e.data[l],c=i.data[l],h=a?Gh(a.keys):"",d=c?Gh(c.keys):"";c&&a&&h===d?pn(a.values,c.values)||r.set(d,c):(o.has(d)?(!t&&pn(o.get(d).values,c.values)||(r.set(d,c),n.set(d,c)),o.delete(d)):c&&s.set(d,c),s.has(h)?(!t&&pn(s.get(h).values,a.values)||(r.set(h,a),n.set(h,a)),s.delete(h)):a&&(r.delete(h),o.set(h,a)))}return{changed:s.size>0||r.size>0||o.size>0,added:s,updated:r,removed:o,moved:n}}}}function Gh(e,...t){let i;return i=Ne(e)?e.map(e=>Xo(e)).join("___"):Xo(e),("string"==typeof i||"number"==typeof i||i instanceof Date)&&t.length>0&&(i+=`___${t.join("___")}`),i}var Vh=(e=>(e[e.EXACT_SHAPE_MATCH=0]="EXACT_SHAPE_MATCH",e[e.NEAREST_BY_MAIN_AXIS_FIRST=1]="NEAREST_BY_MAIN_AXIS_FIRST",e[e.NEAREST_BY_MAIN_CATEGORY_AXIS_FIRST=2]="NEAREST_BY_MAIN_CATEGORY_AXIS_FIRST",e[e.NEAREST_NODE=3]="NEAREST_NODE",e))(Vh||{});function Bh(e){return null!=e&&Yo(e)}function Hh(e){return null!=e}function zh(e){switch(e){case"number":case"log":case"ordinal-time":case"time":case"color":return Bh;default:return Hh}}function Uh(e){switch(e){case"number":case"log":case"time":case"color":return"range";default:return"category"}}function Wh(e,t,i={}){return v({property:e,type:"key",valueType:Uh(t),validation:zh(t)},i)}function jh(e,t,i={}){return v({property:e,type:"value",valueType:Uh(t),validation:zh(t)},i)}function Kh(e,t={}){const i=t,{min:n=-1/0,max:s=1/0}=i,r=C(i,["min","max"]);return v({type:"value",property:e,valueType:"range",validation:Bh,processor:()=>e=>je(e)?Un(n,e,s):e},r)}function $h(e,t,i={}){const n=i,{onlyPositive:s}=n,r=C(n,["onlyPositive"]);return y(v({},jh(e,t,r)),{processor:Mh(s)})}function Yh(e,t,i={}){return y(v({},jh(e,t,i)),{processor:Ah()})}function qh(e,t,i="current",n,s){return[jh(e,s,n),_h(n.groupId,t,i,n.separateNegative),...null!=n.rangeId?[Sh(n.rangeId,n.groupId)]:[]]}var Xh=class{constructor(e,t,{datum:i},n){this.type=e,this.event=t,this.datum=i,this.seriesId=n.id}},Zh=class{constructor(e,t,i){this.series=e,this.seriesGrouping=t,this.oldGrouping=i,this.type="groupingChanged"}},Qh=class extends Ql{constructor(e){super(),this.destroyFns=[],this.seriesGrouping=void 0,this.NodeEvent=Xh,this.internalId=Bn(this),this.rootGroup=new Mo({name:"seriesRoot",isVirtual:!0}),this.axes={x:void 0,y:void 0},this.directions=["x","y"],this.nodeDataRefresh=!0,this.moduleMap=new fa,this._declarationOrder=-1,this.seriesListeners=new sc;const{moduleCtx:t,pickModes:i=[1],directionKeys:n={},directionNames:s={},contentGroupVirtual:r=!0,canHaveAxes:o=!1}=e;this.ctx=t,this.directionKeys=n,this.directionNames=s,this.canHaveAxes=o,this.contentGroup=this.rootGroup.appendChild(new Mo({name:`${this.internalId}-content`,isVirtual:r,zIndex:4,zIndexSubOrder:this.getGroupZIndexSubOrder("data")})),this.highlightGroup=new Mo({name:`${this.internalId}-highlight`,isVirtual:r,zIndex:4,zIndexSubOrder:this.getGroupZIndexSubOrder("highlight")}),this.highlightNode=this.highlightGroup.appendChild(new Mo({name:"highlightNode",zIndex:0})),this.highlightLabel=this.highlightGroup.appendChild(new Mo({name:"highlightLabel",zIndex:10})),this.pickModes=i,this.labelGroup=this.rootGroup.appendChild(new Mo({name:`${this.internalId}-series-labels`,zIndex:8})),this.annotationGroup=new Mo({name:`${this.id}-annotation`,isVirtual:r,zIndex:4,zIndexSubOrder:this.getGroupZIndexSubOrder("annotation")})}get id(){var e,t;return null!=(t=null==(e=this.properties)?void 0:e.id)?t:this.internalId}get type(){var e;return null!=(e=this.constructor.type)?e:""}get data(){var e;return null!=(e=this._data)?e:this._chartData}set visible(e){this.properties.visible=e,this.visibleChanged()}get visible(){return this.properties.visible}get hasData(){return null!=this.data&&this.data.length>0}get tooltipEnabled(){var e,t;return null!=(t=null==(e=this.properties.tooltip)?void 0:e.enabled)&&t}onDataChange(){this.nodeDataRefresh=!0}setOptionsData(e){this._data=e,this.onDataChange()}setChartData(e){this._chartData=e,this.data===e&&this.onDataChange()}onSeriesGroupingChange(e,t){const{internalId:i,type:n,visible:s}=this;e&&this.ctx.seriesStateManager.deregisterSeries({id:i,type:n}),t&&this.ctx.seriesStateManager.registerSeries({id:i,type:n,visible:s,seriesGrouping:t}),this.fireEvent(new Zh(this,t,e))}getBandScalePadding(){return{inner:1,outer:0}}getGroupZIndexSubOrder(e,t=0){let i=0;switch(e){case"data":case"paths":break;case"labels":i+=2e4;break;case"marker":i+=1e4;break;case"highlight":t+=15e3;break;case"annotation":i+=15e3}return[()=>this._declarationOrder+i,t]}addListener(e,t){return this.seriesListeners.addListener(e,t)}dispatch(e,t){this.seriesListeners.dispatch(e,t)}addChartEventListeners(){}destroy(){this.destroyFns.forEach(e=>e()),this.destroyFns=[],this.ctx.seriesStateManager.deregisterSeries(this)}getDirectionValues(e,t){const i=this.resolveKeyDirection(e),n=null==t?void 0:t[i],s=[];if(!n)return s;const r=(...e)=>{for(const t of e)Array.isArray(t)?r(...t):"object"==typeof t?r(...Object.values(t)):s.push(t)};return r(...n.map(e=>this.properties[e])),s}getKeys(e){return this.getDirectionValues(e,this.directionKeys)}getKeyProperties(e){var t;return null!=(t=this.directionKeys[this.resolveKeyDirection(e)])?t:[]}getNames(e){return this.getDirectionValues(e,this.directionNames)}resolveKeyDirection(e){return e}getDomain(e){const t=this.getSeriesDomain(e),i=this.moduleMap.mapModules(t=>t.getDomain(e));return t.concat(i.flat())}markNodeDataDirty(){this.nodeDataRefresh=!0}visibleChanged(){this.ctx.seriesStateManager.registerSeries(this)}getOpacity(){const{dimOpacity:e=1,enabled:t=!0}=this.properties.highlightStyle.series;if(!t||1===e)return 1;switch(this.isItemIdHighlighted()){case 0:case 1:return 1;default:return e}}getStrokeWidth(e){const{strokeWidth:t,enabled:i=!0}=this.properties.highlightStyle.series;if(!i||void 0===t)return e;switch(this.isItemIdHighlighted()){case 1:return t;case 0:case 2:return e}}isItemIdHighlighted(){var e,t;const i=null==(t=null==(e=this.ctx.highlightManager)?void 0:e.getActiveHighlight())?void 0:t.series;return null==i?0:i!==this?2:1}getModuleTooltipParams(){return this.moduleMap.mapModules(e=>e.getTooltipParams()).reduce((e,t)=>Object.assign(e,t),{})}pickNode(e,t){const{pickModes:i,visible:n,rootGroup:s}=this;if(n&&s.visible)for(const n of i){if(t&&!t.includes(n))continue;let i;switch(n){case 0:i=this.pickNodeExactShape(e);break;case 1:case 2:i=this.pickNodeMainAxisFirst(e,2===n);break;case 3:i=this.pickNodeClosestDatum(e)}if(i)return{pickMode:n,match:i.datum,distance:i.distance}}}pickNodeExactShape(e){const t=this.contentGroup.pickNode(e.x,e.y);if(t&&!0!==t.datum.missing)return{datum:t.datum,distance:0}}pickNodeClosestDatum(e){throw new Error("AG Charts - Series.pickNodeClosestDatum() not implemented")}pickNodeNearestDistantObject(e,t){const i=Jn(e.x,e.y,t);if(void 0!==i.nearest&&!0!==i.nearest.datum.missing)return{datum:i.nearest.datum,distance:Math.sqrt(i.distanceSquared)}}pickNodeMainAxisFirst(e,t){throw new Error("AG Charts - Series.pickNodeMainAxisFirst() not implemented")}fireNodeClickEvent(e,t){this.fireEvent(new this.NodeEvent("nodeClick",e,t,this))}fireNodeDoubleClickEvent(e,t){this.fireEvent(new this.NodeEvent("nodeDoubleClick",e,t,this))}createNodeContextMenuActionEvent(e,t){return new this.NodeEvent("nodeContextMenuAction",e,t,this)}toggleSeriesItem(e,t){this.visible=t,this.nodeDataRefresh=!0,this.dispatch("visibility-changed",{itemId:e,enabled:t})}isEnabled(){return this.visible}getModuleMap(){return this.moduleMap}createModuleContext(){return y(v({},this.ctx),{series:this})}getLabelText(e,t,i=String){var n;return e.formatter&&null!=(n=this.ctx.callbackCache.call(e.formatter,v({seriesId:this.id},t)))?n:i(t.value)}getMarkerStyle(e,t,i=e.getStyle()){var n,s;const r=Ze({size:null!=(s=null==(n=t.datum.point)?void 0:n.size)?s:0},i);return e.formatter?Ze(this.ctx.callbackCache.call(e.formatter,y(v(v({seriesId:this.id},r),t),{datum:t.datum.datum})),r):r}updateMarkerStyle(e,t,i,n=t.getStyle(),{applyTranslation:s=!0}={}){const{point:r}=i.datum,o=this.getMarkerStyle(t,i,n),a=this.visible&&o.size>0&&r&&!isNaN(r.x)&&!isNaN(r.y);s?e.setProperties(y(v({visible:a},o),{translationX:null==r?void 0:r.x,translationY:null==r?void 0:r.y})):e.setProperties(v({visible:a},o)),"function"!=typeof t.shape||e.dirtyPath||(e.path.clear(!0),e.updatePath(),e.checkPathDirty())}getMinRects(e,t){}get nodeDataDependencies(){var e;return null!=(e=this._nodeDataDependencies)?e:{seriesRectWidth:NaN,seriesRectHeight:NaN}}checkResize(e){const{width:t,height:i}=null!=e?e:{width:NaN,height:NaN},n=e?{seriesRectWidth:t,seriesRectHeight:i}:void 0,s=null!=xt(this.nodeDataDependencies,n);return s&&(this._nodeDataDependencies=n,this.markNodeDataDirty()),s}pickFocus(e){}};Qh.highlightedZIndex=1e12,S([Za({changeValue:function(e,t){this.onSeriesGroupingChange(t,e)}})],Qh.prototype,"seriesGrouping",2);var Jh=class{constructor(e,t,i){this.seriesRoot=e,this.highlightRoot=t,this.annotationRoot=i,this.groups={},this.series={},this.expectedSeriesCount=1,this.mode="normal"}setSeriesCount(e){this.expectedSeriesCount=e}requestGroup(e){var t,i,n;const{internalId:s,type:r,rootGroup:o,highlightGroup:a,annotationGroup:l,seriesGrouping:c}=e,{groupIndex:h=s}=null!=c?c:{};if(null!=this.series[s])throw new Error(`AG Charts - series already has an allocated layer: ${this.series[s]}`);0===Object.keys(this.series).length&&(this.mode=this.expectedSeriesCount>=30?"aggressive-grouping":"normal"),null!=(t=this.groups)[r]||(t[r]={});const d=this.lookupIdx(h);let u=this.groups[r][d];return u||(u=null!=(n=(i=this.groups[r])[d])?n:i[d]={seriesIds:[],group:this.seriesRoot.appendChild(new Mo({name:`${r}-content`,layer:!0,zIndex:4,zIndexSubOrder:e.getGroupZIndexSubOrder("data")})),highlight:this.highlightRoot.appendChild(new Mo({name:`${r}-highlight`,zIndex:4,zIndexSubOrder:e.getGroupZIndexSubOrder("highlight")})),annotation:this.annotationRoot.appendChild(new Mo({name:`${r}-annotation`,zIndex:4,zIndexSubOrder:e.getGroupZIndexSubOrder("annotation")}))}),this.series[s]={layerState:u,seriesConfig:e},u.seriesIds.push(s),u.group.appendChild(o),u.highlight.appendChild(a),u.annotation.appendChild(l),u.group}changeGroup(e){var t,i;const{internalId:n,seriesGrouping:s,type:r,rootGroup:o,highlightGroup:a,annotationGroup:l,oldGrouping:c}=e,{groupIndex:h=n}=null!=s?s:{};(null==(i=null==(t=this.groups[r])?void 0:t[h])?void 0:i.seriesIds.includes(n))||(null!=this.series[n]&&this.releaseGroup({internalId:n,seriesGrouping:c,type:r,rootGroup:o,highlightGroup:a,annotationGroup:l}),this.requestGroup(e))}releaseGroup(e){var t,i,n,s,r;const{internalId:o,seriesGrouping:a,rootGroup:l,highlightGroup:c,annotationGroup:h,type:d}=e,{groupIndex:u=o}=null!=a?a:{};if(null==this.series[o])throw new Error(`AG Charts - series doesn't have an allocated layer: ${o}`);const p=this.lookupIdx(u),g=null!=(n=null==(t=this.groups[d])?void 0:t[p])?n:null==(i=this.series[o])?void 0:i.layerState;if(g&&(g.seriesIds=g.seriesIds.filter(e=>e!==o),g.group.removeChild(l),g.highlight.removeChild(c),g.annotation.removeChild(h)),0===(null==g?void 0:g.seriesIds.length))this.seriesRoot.removeChild(g.group),this.highlightRoot.removeChild(g.highlight),this.annotationRoot.removeChild(g.annotation),delete this.groups[d][p],delete this.groups[d][o];else if((null==g?void 0:g.seriesIds.length)>0){const e=null==(r=this.series[null==(s=null==g?void 0:g.seriesIds)?void 0:s[0]])?void 0:r.seriesConfig;g.group.zIndexSubOrder=null==e?void 0:e.getGroupZIndexSubOrder("data"),g.highlight.zIndexSubOrder=null==e?void 0:e.getGroupZIndexSubOrder("highlight"),g.annotation.zIndexSubOrder=null==e?void 0:e.getGroupZIndexSubOrder("annotation")}delete this.series[o]}lookupIdx(e){return"normal"===this.mode?e:"string"!=typeof e||(e=Number(e.split("-").slice(-1)[0]))?Math.floor(30*Un(0,e/this.expectedSeriesCount,1)):0}destroy(){for(const e of Object.values(this.groups))for(const t of Object.values(e))this.seriesRoot.removeChild(t.group),this.highlightRoot.removeChild(t.highlight),this.annotationRoot.removeChild(t.annotation);this.groups={},this.series={}}},ed=class{constructor(e,t){this.chartLike=e,this.layoutService=t,this.destroyFns=[],this.destroyFns.push(this.layoutService.addListener("start-layout",e=>this.positionPadding(e.shrinkRect)),this.layoutService.addListener("start-layout",e=>this.positionCaptions(e.shrinkRect)))}destroy(){this.destroyFns.forEach(e=>e())}positionPadding(e){const{padding:t}=this.chartLike;return e.shrink(t.left,"left"),e.shrink(t.top,"top"),e.shrink(t.right,"right"),e.shrink(t.bottom,"bottom"),{shrinkRect:e}}positionCaptions(e){var t,i;const{title:n,subtitle:s,footnote:r}=this.chartLike,o=e.clone(),a=t=>{var i;const n=e.height/10,s=null!=(i=t.lineHeight)?i:t.fontSize*Go.defaultLineHeightRatio,r=e.width,o=Math.max(s,n);t.computeTextWrap(r,o)},l=e=>"left"===e?o.x:"right"===e?o.x+o.width:("center"!==e&&_.error(`invalid textAlign value: ${e}`),o.x+o.width/2),c=(e,t)=>{const i=o.y;e.node.x=l(e.textAlign),e.node.y=i,e.node.textBaseline="top",a(e);const n=e.node.computeBBox(),s=Math.ceil(n.y-i+n.height+t);o.shrink(s,"top")};if(n.node.visible=n.enabled,s.node.visible=s.enabled,r.node.visible=r.enabled,n.enabled){const{spacing:e=(s.enabled?ll.SMALL_PADDING:ll.LARGE_PADDING)}=n;c(n,e)}return s.enabled&&c(s,null!=(t=s.spacing)?t:0),r.enabled&&((e,t)=>{const i=o.y+o.height;e.node.x=l(e.textAlign),e.node.y=i,e.node.textBaseline="bottom",a(e);const n=e.node.computeBBox(),s=Math.ceil(i-n.y+t);o.shrink(s,"bottom")})(r,null!=(i=r.spacing)?i:0),{shrinkRect:o}}},td=class{constructor(e,t,i,n){this.chart=e,this.dataService=t,this.updateService=i,this.zoomManager=n,this.dirtyZoom=!1,this.dirtyDataSource=!1,this.lastAxisZooms=new Map,this.destroyFns=[],this.destroyFns.push(this.dataService.addListener("data-source-change",()=>this.onDataSourceChange()),this.dataService.addListener("data-load",()=>this.onDataLoad()),this.dataService.addListener("data-error",()=>this.onDataError()),this.updateService.addListener("update-complete",()=>this.onUpdateComplete()),this.zoomManager.addListener("zoom-change",()=>this.onZoomChange()))}destroy(){this.destroyFns.forEach(e=>e())}onDataLoad(){this.updateService.update(1)}onDataError(){this.updateService.update(3)}onDataSourceChange(){this.dirtyDataSource=!0}onUpdateComplete(){(this.dirtyZoom||this.dirtyDataSource)&&this.updateWindow().catch(e=>_.errorOnce(e))}onZoomChange(){this.dirtyZoom=!0}updateWindow(){return x(this,null,function*(){if(!this.dataService.isLazy())return;const e=this.getValidAxis();let t,i=!0;if(e){const n=this.zoomManager.getAxisZoom(e.id);t=this.getAxisWindow(e,n),i=this.shouldRefresh(e,n)}this.dirtyZoom=!1,this.dirtyDataSource=!1,i&&this.dataService.load({windowStart:null==t?void 0:t.min,windowEnd:null==t?void 0:t.max})})}getValidAxis(){return this.chart.axes.find(e=>"time"===e.type)}shouldRefresh(e,t){if(this.dirtyDataSource)return!0;if(!this.dirtyZoom)return!1;const i=this.lastAxisZooms.get(e.id);return!(i&&t.min===i.min&&t.max===i.max||(this.lastAxisZooms.set(e.id,t),0))}getAxisWindow(e,t){var i,n;const s=null==(n=(i=e.scale).getDomain)?void 0:n.call(i);if(!t||!s||0===s.length||isNaN(Number(s[0])))return;const r=Number(s[1])-Number(s[0]);return{min:new Date(Number(s[0])+r*t.min),max:new Date(Number(s[0])+r*t.max)}}},id=class{constructor(e,t,i,n,s){this.chartLike=e,this.overlays=t,this.dataService=i,this.layoutService=n,this.animationManager=s,this.destroyFns=[],this.destroyFns.push(this.layoutService.addListener("layout-complete",e=>this.onLayoutComplete(e)))}destroy(){this.destroyFns.forEach(e=>e())}onLayoutComplete({series:{rect:e}}){const t=this.dataService.isLoading(),i=this.chartLike.series.some(e=>e.hasData),n=this.chartLike.series.some(e=>e.visible);this.toggleOverlay(this.overlays.loading,e,t),this.toggleOverlay(this.overlays.noData,e,!t&&!i),this.toggleOverlay(this.overlays.noVisibleSeries,e,i&&!n)}toggleOverlay(e,t,i){if(i){const i=e.getElement(this.animationManager,t);this.chartLike.element.append(i)}else e.removeElement(this.animationManager)}},nd=Ln.create(!0,"opts"),sd=class extends Ct{constructor(){super(...arguments),this.padding=new Jl(0)}};S([Ys(er,{optional:!0})],sd.prototype,"clip",2),S([Ys(Qs)],sd.prototype,"padding",2);var rd=class e extends Ql{constructor(e,t){var i,n;super(),this.id=Bn(this),this.seriesRoot=new Mo({name:`${this.id}-series-root`}),this.highlightRoot=new Mo({name:`${this.id}-highlight-root`,layer:!0,zIndex:5,nonEmptyChildDerivedZIndex:!0}),this.annotationRoot=new Mo({name:`${this.id}-annotation-root`,layer:!0,zIndex:10}),this.debug=Ln.create(),this.extraDebugStats={},this.data=[],this._firstAutoSize=!0,this.padding=new Jl(20),this.seriesArea=new sd,this.title=new ll,this.subtitle=new ll,this.footnote=new ll,this.keyboard=new oh,this.mode="standalone",this.destroyed=!1,this._skipSync=!1,this._destroyFns=[],this.chartAnimationPhase="initial",this.modulesManager=new uh,this.zoomManager=new sh,this.processors=[],this.processedOptions={},this.userOptions={},this.queuedUserOptions=[],this._pendingFactoryUpdatesCount=0,this._performUpdateNoRenderCount=0,this._performUpdateSkipAnimations=!1,this.performUpdateType=7,this.updateShortcutCount=0,this.seriesToUpdate=new Set,this.updateMutex=new Zl,this.updateRequestors={},this.performUpdateTrigger=ec((e,t=0)=>setTimeout(e,t),e=>x(this,[e],function*({count:e}){this.destroyed||this.updateMutex.acquire(()=>x(this,null,function*(){try{yield this.performUpdate(e)}catch(e){_.error("update error",e)}})).catch(e=>_.errorOnce(e))})),this._performUpdateSplits={},this.axes=[],this.series=[],this.focus={hasFocus:!1,series:void 0,seriesIndex:0,datumIndex:0,datum:void 0},this.pointerScheduler=ec((e,t)=>requestAnimationFrame(e),()=>{this.lastInteractionEvent&&(this.performUpdateType<=4?this.pointerScheduler.schedule():(this.handlePointer(this.lastInteractionEvent,!1),this.lastInteractionEvent=void 0))}),this.onSeriesNodeClick=e=>{const t=y(v({},e),{type:"seriesNodeClick"});Object.defineProperty(t,"series",{enumerable:!1,get:()=>e.series}),this.fireEvent(t)},this.onSeriesNodeDoubleClick=e=>{const t=y(v({},e),{type:"seriesNodeDoubleClick"});this.fireEvent(t)},this.seriesGroupingChanged=e=>{if(!(e instanceof Zh))return;const{series:t,seriesGrouping:i,oldGrouping:n}=e;null!=t.rootGroup.parent&&this.seriesLayerManager.changeGroup({internalId:t.internalId,type:t.type,rootGroup:t.rootGroup,highlightGroup:t.highlightGroup,annotationGroup:t.annotationGroup,getGroupZIndexSubOrder:e=>t.getGroupZIndexSubOrder(e),seriesGrouping:i,oldGrouping:n})},this.dataProcessListeners=new Set,this.chartOptions=e;let s=null==t?void 0:t.scene;const r=null!=(i=null==t?void 0:t.element)?i:Mn("div","ag-chart-wrapper",{position:"relative",userSelect:"none"}),o=null==t?void 0:t.container;this.element=r;const a=new Mo({name:"root"});a.visible=!1,a.append(this.seriesRoot),a.append(this.highlightRoot),a.append(this.annotationRoot),this.axisGridGroup=new Mo({name:"Axes-Grids",layer:!0,zIndex:1}),a.appendChild(this.axisGridGroup),this.axisGroup=new Mo({name:"Axes",layer:!0,zIndex:2}),a.appendChild(this.axisGroup),this.sizeMonitor=new tc,this.sizeMonitor.observe(this.element,e=>this.rawResize(e));const{overrideDevicePixelRatio:l}=e.specialOverrides;null!=s||(s=new ql({pixelRatio:l,canvasPosition:"absolute"})),s.setRoot(a).setContainer(r),this.autoSize=!0,this.tooltip=new al,this.seriesLayerManager=new Jh(this.seriesRoot,this.highlightRoot,this.annotationRoot);const c=this.ctx=new Wc(this,{scene:s,syncManager:new nh(this),element:r,updateCallback:(e=0,t)=>this.update(e,t),updateMutex:this.updateMutex});this.overlays=new mh,null!=(n=this.overlays.loading).renderer||(n.renderer=()=>function(e,t){const{animationDuration:i}=Ts.add,n=Mn("div",`${ph}--loading`,{display:"flex",alignItems:"center",justifyContent:"center",flexDirection:"column",height:"100%",boxSizing:"border-box",font:"13px Verdana, sans-serif",userSelect:"none",animation:`ag-charts-loading ${i*t}ms linear 50ms both`}),s=Mn("span",{width:"45px",height:"40px",backgroundImage:["linear-gradient(#0000 calc(1 * 100% / 6), #ccc 0 calc(3 * 100% / 6), #0000 0), ","linear-gradient(#0000 calc(2 * 100% / 6), #ccc 0 calc(4 * 100% / 6), #0000 0), ","linear-gradient(#0000 calc(3 * 100% / 6), #ccc 0 calc(5 * 100% / 6), #0000 0)"].join(""),backgroundSize:"10px 400%",backgroundRepeat:"no-repeat",animation:"ag-charts-loading-matrix 1s infinite linear"}),r=Mn("p",{marginTop:"1em"});r.innerText=e;const o=Mn("div",`${ph}__loading-background`,{position:"absolute",inset:"0",opacity:"0.5",zIndex:"-1"}),a=Mn("style");return a.innerText=["@keyframes ag-charts-loading { from { opacity: 0 } to { opacity: 1 } }","@keyframes ag-charts-loading-matrix {","0% { background-position: 0% 0%, 50% 0%, 100% 0%; }","100% { background-position: 0% 100%, 50% 100%, 100% 100%; }","}"].join(" "),n.replaceChildren(a,s,r,o),Tn(vh,"chartOverlays"),n}(this.overlays.loading.getText(),c.animationManager.defaultDuration)),this.processors=[new ed(this,c.layoutService),new td(this,c.dataService,c.updateService,c.zoomManager),new id(this,this.overlays,c.dataService,c.layoutService,c.animationManager)],this.highlight=new jc,this.container=o;const{All:h}=fc,d=this.getModuleContext(),u=c.regionManager.addRegion("series",this.seriesRoot,this.axisGroup);c.regionManager.addRegion("root",a),this._destroyFns.push(c.dataService.addListener("data-load",e=>{this.data=e.data}),c.scene.attachNode(this.title.node),c.scene.attachNode(this.subtitle.node),c.scene.attachNode(this.footnote.node),this.title.registerInteraction(d,"title"),this.subtitle.registerInteraction(d,"subtitle"),this.footnote.registerInteraction(d,"footnote"),c.interactionManager.addListener("click",e=>this.onClick(e)),c.interactionManager.addListener("dblclick",e=>this.onDoubleClick(e)),u.addListener("hover",e=>this.onMouseMove(e)),u.addListener("leave",e=>this.onLeave(e)),u.addListener("blur",()=>this.onBlur()),u.addListener("tab",e=>this.onTab(e)),u.addListener("nav-vert",e=>this.onNavVert(e)),u.addListener("nav-hori",e=>this.onNavHori(e)),u.addListener("submit",e=>this.onSubmit(e)),c.keyNavManager.addListener("browserfocus",e=>this.onBrowserFocus(e)),c.interactionManager.addListener("page-left",()=>this.destroy()),c.interactionManager.addListener("contextmenu",e=>this.onContextMenu(e),h),c.animationManager.addListener("animation-start",()=>this.onAnimationStart()),c.animationManager.addListener("animation-frame",()=>{this.update(6)}),c.highlightManager.addListener("highlight-change",e=>this.changeHighlightDatum(e)),c.zoomManager.addListener("zoom-pan-start",()=>this.resetPointer()),c.zoomManager.addListener("zoom-change",()=>{this.resetPointer(),this.series.map(e=>{var t;return null==(t=e.animationState)?void 0:t.transition("updateData")});const e="initial"!==this.chartAnimationPhase;this.update(3,{forceNodeDataRefresh:!0,skipAnimations:e})}))}static getInstance(t){return e.chartsInstances.get(t)}get canvasElement(){return this.ctx.scene.canvas.element}getCanvasDataURL(e){return this.ctx.scene.getDataURL(e)}onAutoSizeChange(e){const{style:t}=this.element;if(e){if(t.display="block",t.width="100%",t.height="100%",!this._lastAutoSize)return;this.resize(void 0,void 0,"autoSize option")}else t.display="inline-block",t.width="auto",t.height="auto"}download(e,t){this.ctx.scene.download(e,t)}getOptions(){var e;return null!=(e=this.queuedUserOptions.at(-1))?e:this.userOptions}getModuleContext(){return this.ctx}getAriaLabel(){var e;const t=[this.title,this.subtitle,this.footnote].filter(e=>e.enabled&&e.text).map(e=>e.text).join(". ");return`chart, ${null!=(e=this.series.length)?e:0} series, ${t}`}resetAnimations(){this.chartAnimationPhase="initial";for(const e of this.series)e.resetAnimation(this.chartAnimationPhase);for(const e of this.axes)e.resetAnimation(this.chartAnimationPhase);this.animationRect=void 0,this.ctx.animationManager.reset()}skipAnimations(){this.ctx.animationManager.skipCurrentBatch(),this._performUpdateSkipAnimations=!0}destroy(e){if(this.destroyed)return;const t=null==e?void 0:e.keepTransferableResources;let i;return this.performUpdateType=7,this._destroyFns.forEach(e=>e()),this.processors.forEach(e=>e.destroy()),this.tooltip.destroy(),this.overlays.destroy(),this.sizeMonitor.unobserve(this.element),this.modulesManager.destroy(),t?(this.ctx.scene.strip(),i={container:this.container,scene:this.ctx.scene,element:this.element}):(this.ctx.scene.destroy(),this.container=void 0),this.destroySeries(this.series),this.seriesLayerManager.destroy(),this.axes.forEach(e=>e.destroy()),this.axes=[],this.animationRect=void 0,this.ctx.destroy(),this.zoomManager.destroy(),this.destroyed=!0,Object.freeze(this),i}resetPointer(e=!1){e||this.ctx.tooltipManager.removeTooltip(this.id),this.ctx.highlightManager.updateHighlight(this.id),this.lastInteractionEvent=void 0}requestFactoryUpdate(e){this.destroyed||(this._pendingFactoryUpdatesCount++,this.updateMutex.acquire(()=>x(this,null,function*(){this.destroyed||(yield e(this),this.destroyed||this._pendingFactoryUpdatesCount--)})).catch(e=>_.errorOnce(e)))}update(e=0,t){var i,n;const{forceNodeDataRefresh:s=!1,skipAnimations:r,seriesToUpdate:o=this.series,newAnimationBatch:a}=null!=t?t:{};s&&this.series.forEach(e=>e.markNodeDataDirty());for(const e of o)this.seriesToUpdate.add(e);if(r&&(this.ctx.animationManager.skipCurrentBatch(),this._performUpdateSkipAnimations=!0),a&&this.ctx.animationManager.isActive()&&(this._performUpdateSkipAnimations=!0),this._skipSync=null!=(i=null==t?void 0:t.skipSync)&&i,this.debug.check()){let t=null!=(n=(new Error).stack)?n:"<unknown>";t=t.replace(/\([^)]*/g,""),this.updateRequestors[t]=e}e<this.performUpdateType&&(this.performUpdateType=e,this.performUpdateTrigger.schedule(null==t?void 0:t.backOffMs))}performUpdate(e){return x(this,null,function*(){const{performUpdateType:t,extraDebugStats:i,_performUpdateSplits:n,ctx:s}=this,r=[...this.seriesToUpdate];this.performUpdateType=7,this.seriesToUpdate.clear(),0===this.updateShortcutCount&&t<6&&(s.animationManager.startBatch(this._performUpdateSkipAnimations),s.animationManager.onBatchStop(()=>this.chartAnimationPhase="ready")),this.debug("Chart.performUpdate() - start",zc[t]);let o=performance.now();null!=n.start||(n.start=o);const a=e=>{null!=n[e]||(n[e]=0),n[e]+=performance.now()-o,o=performance.now()};let l=!1;switch(t){case 0:this.updateDOM();case 1:yield this.updateData(),a("⬇️");case 2:yield this.processData(),this.resetPointer(!0),a("🏭");case 3:if(this.checkUpdateShortcut(3))break;if(!this.checkFirstAutoSize(r)){l=!0;break}yield this.processLayout(),a("⌖");case 4:if(this.checkUpdateShortcut(4))break;const{seriesRect:e}=this;yield Promise.all(r.map(t=>t.update({seriesRect:e}))),a("🤔");case 5:if(this.checkUpdateShortcut(5))break;const o=s.tooltipManager.getTooltipMeta(this.id);t<=4&&null!=(null==o?void 0:o.lastPointerEvent)&&this.handlePointer(o.lastPointerEvent,!0),a("↖");case 6:if(this.checkUpdateShortcut(6))break;s.animationManager.endBatch(),i.updateShortcutCount=this.updateShortcutCount,yield s.scene.render({debugSplitTimes:n,extraDebugStats:i}),this.ctx.regionManager.updateFocusWrapperRect(),this.extraDebugStats={};for(const e in n)delete n[e];case 7:this.updateShortcutCount=0,this.updateRequestors={},this._performUpdateSkipAnimations=!1,s.animationManager.endBatch()}l||s.updateService.dispatchUpdateComplete(this.getMinRects());const c=performance.now();this.debug("Chart.performUpdate() - end",{chart:this,durationMs:Math.round(100*(c-n.start))/100,count:e,performUpdateType:zc[t]})})}updateThemeClassName(){const{element:e,processedOptions:{theme:t}}=this,i="ag-charts-theme-",n=[`${i}default`,`${i}default-dark`];let s=n[0],r=!1;"string"==typeof t?(s=t.replace("ag-",i),r=t.includes("-dark")):"string"==typeof(null==t?void 0:t.baseTheme)&&(s=t.baseTheme.replace("ag-",i),r=t.baseTheme.includes("-dark")),n.includes(s)||(s=r?n[1]:n[0]),e.classList.forEach(t=>{t.startsWith(i)&&t!==s&&e.classList.remove(t)}),e.classList.add(s)}updateDOM(){this.updateThemeClassName();const{enabled:e,tabIndex:t}=this.keyboard;this.element.tabIndex=e?null!=t?t:0:-1,Ja(this.ctx.scene.canvas.element,"role","figure"),Ja(this.ctx.scene.canvas.element,"aria-label",this.getAriaLabel())}checkUpdateShortcut(e){return this.updateShortcutCount>3?(_.warn("exceeded the maximum number of simultaneous updates (4), discarding changes and rendering",this.updateRequestors),!1):this.performUpdateType<=e&&(this.updateShortcutCount++,!0)}checkFirstAutoSize(e){if(this.autoSize&&!this._lastAutoSize){const t=this._performUpdateNoRenderCount++,i=40*f(t+1,2);if(t<8)return this.update(3,{seriesToUpdate:e,backOffMs:i}),this.debug("Chart.checkFirstAutoSize() - backing off until first size update",i),!1;this.debug("Chart.checkFirstAutoSize() - timeout for first size update.")}return this._performUpdateNoRenderCount=0,!0}onAxisChange(e,t=[]){for(const i of t)e.includes(i)||(i.detachAxis(this.axisGroup,this.axisGridGroup),i.destroy());for(const i of e)(null==t?void 0:t.includes(i))||i.attachAxis(this.axisGroup,this.axisGridGroup)}onSeriesChange(e,t){var i,n;const s=null!=(i=null==t?void 0:t.filter(t=>!e.includes(t)))?i:[];this.destroySeries(s),null==(n=this.seriesLayerManager)||n.setSeriesCount(e.length);for(const i of e){if(null==t?void 0:t.includes(i))continue;null==i.rootGroup.parent&&this.seriesLayerManager.requestGroup(i);const e=this;i.chart={get mode(){return e.mode},get isMiniChart(){return!1},get seriesRect(){return e.seriesRect},placeLabels:()=>e.placeLabels()},i.resetAnimation(this.chartAnimationPhase),this.addSeriesListeners(i),i.addChartEventListeners()}}destroySeries(e){null==e||e.forEach(e=>{e.removeEventListener("nodeClick",this.onSeriesNodeClick),e.removeEventListener("nodeDoubleClick",this.onSeriesNodeDoubleClick),e.removeEventListener("groupingChanged",this.seriesGroupingChanged),e.destroy(),this.seriesLayerManager.releaseGroup(e),e.chart=void 0})}addSeriesListeners(e){this.hasEventListener("seriesNodeClick")&&e.addEventListener("nodeClick",this.onSeriesNodeClick),this.hasEventListener("seriesNodeDoubleClick")&&e.addEventListener("nodeDoubleClick",this.onSeriesNodeDoubleClick),e.addEventListener("groupingChanged",this.seriesGroupingChanged)}updateAllSeriesListeners(){this.series.forEach(e=>{e.removeEventListener("nodeClick",this.onSeriesNodeClick),e.removeEventListener("nodeDoubleClick",this.onSeriesNodeDoubleClick),this.addSeriesListeners(e)})}assignSeriesToAxes(){this.axes.forEach(e=>{e.boundSeries=this.series.filter(t=>t.axes[e.direction]===e)})}assignAxesToSeries(){const e=mn(this.axes,e=>e.direction);this.series.forEach(t=>{t.directions.forEach(i=>{const n=e[i];if(!n)return void _.warnOnce(`no available axis for direction [${i}]; check series and axes configuration.`);const s=t.getKeys(i),r=n.find(e=>!e.keys.length||s.some(t=>e.keys.includes(t)));r?t.axes[i]=r:_.warnOnce(`no matching axis for direction [${i}] and keys [${s}]; check series and axes configuration.`)})})}rawResize({width:e,height:t}){var i;if(!this.autoSize)return;if(e=Math.floor(e),t=Math.floor(t),0===e&&0===t)return;const[n=0,s=0]=null!=(i=this._lastAutoSize)?i:[];n===e&&s===t||(this._lastAutoSize=[e,t],this.resize(void 0,void 0,"SizeMonitor"))}resize(e,t,i){var n,s,r,o;const{scene:a,animationManager:l}=this.ctx;if(null!=e||(e=null!=(s=this.width)?s:this.autoSize?null==(n=this._lastAutoSize)?void 0:n[0]:a.canvas.width),null!=t||(t=null!=(o=this.height)?o:this.autoSize?null==(r=this._lastAutoSize)?void 0:r[1]:a.canvas.height),this.debug(`Chart.resize() from ${i}`,{width:e,height:t,stack:(new Error).stack}),e&&t&&je(e)&&je(t)&&a.resize(e,t)){this.resetPointer(),l.reset();let e=!0;this.autoSize&&this._firstAutoSize&&(e=!1,this._firstAutoSize=!1),this.update(3,{forceNodeDataRefresh:!0,skipAnimations:e})}}updateData(){return x(this,null,function*(){this.series.forEach(e=>e.setChartData(this.data));const e=this.modulesManager.mapModules(e=>{var t;return null==(t=e.updateData)?void 0:t.call(e,{data:this.data})});yield Promise.all(e)})}processData(){return x(this,null,function*(){if(this.series.some(e=>e.canHaveAxes)){this.assignAxesToSeries();const e=this.modulesManager.getModule("sync");(null==e?void 0:e.enabled)?e.syncAxes(this._skipSync):this.assignSeriesToAxes()}const e=new th(this.mode),t=this.series.map(t=>t.processData(e)),i=this.modulesManager.mapModules(t=>{var i;return null==(i=t.processData)?void 0:i.call(t,{dataController:e})});e.execute(),yield Promise.all([...t,...i]);for(const{legendType:e,legend:t}of this.modulesManager.legends())t.data=this.getLegendData(e,"integrated"!==this.mode);this.dataProcessListeners.forEach(e=>e()),this.dataProcessListeners.clear()})}placeLabels(){const e=[],t=[];for(const i of this.series){if(!i.visible)continue;const n=i.getLabelData();Wa(null==n?void 0:n[0])&&(t.push(n),e.push(i))}const{seriesRect:i}=this,{top:n,right:s,bottom:r,left:o}=this.seriesArea.padding,a=i&&t.length>0?function(e,t,i=5){var n,s;const r=[];e=e.map(e=>e.slice().sort((e,t)=>t.point.size-e.point.size));for(let o=0;o<e.length;o++){const a=r[o]=[],l=e[o];if((null==l?void 0:l.length)&&l[0].label)for(let o=0,c=l.length;o<c;o++){const c=l[o],{point:h,label:d,marker:u}=c,{text:p,width:g,height:f}=d,m=.5*h.size;let v=0,y=0;if(m>0&&null!=c.placement){const e=ja[c.placement];v=(.5*g+m+i)*e.x,y=(.5*f+m+i)*e.y}const C=h.x-.5*g+v-((null!=(n=null==u?void 0:u.center.x)?n:.5)-.5)*h.size,b=h.y-.5*f+y-((null!=(s=null==u?void 0:u.center.y)?s:.5)-.5)*h.size;t&&!Ua(t,C,b,g,f)||e.some(e=>e.some(e=>{var t;return Ha(e.point,null==(t=e.marker)?void 0:t.center,C,b,g,f)}))||r.some(e=>e.some(e=>za(e,C,b,g,f)))||a.push({index:o,text:p,x:C,y:b,width:g,height:f,datum:c})}}return r}(t,{x:-o,y:-n,width:i.width+o+s,height:i.height+n+r}):[];return new Map(a.map((t,i)=>[e[i],t]))}getLegendData(e,t){var i,n;const s=this.series.filter(e=>e.properties.showInLegend).flatMap(t=>t.getLegendData(e));if(t&&s.every(e=>"category"===e.legendType)){const e={},t=new Map(this.series.map(e=>[e.id,e.type]));for(const{seriesId:r,marker:o,label:a}of s){if(null==o.fill)continue;const s=t.get(r),l=null!=(i=e[s])?i:e[s]={};null!=l[n=a.text]||(l[n]=o.fill),l[a.text]!==o.fill&&_.warnOnce(`legend item '${a.text}' has multiple fill colors, this may cause unexpected behaviour.`)}}return s}processLayout(){return x(this,null,function*(){var e;const t=this.animationRect;yield this.performLayout(),t&&!(null==(e=this.animationRect)?void 0:e.equals(t))&&this.ctx.animationManager.skipCurrentBatch(),this.debug("Chart.performUpdate() - seriesRect",this.seriesRect)})}performLayout(){return x(this,null,function*(){const{width:e,height:t}=this.ctx.scene;let i={shrinkRect:new is(0,0,e,t)};i=this.ctx.layoutService.dispatchPerformLayout("start-layout",i),i=this.ctx.layoutService.dispatchPerformLayout("before-series",i);const n=this.modulesManager.mapModules(e=>x(this,null,function*(){null!=e.performLayout&&(i=yield e.performLayout(i))}));return yield Promise.all(n),i.shrinkRect})}pickSeriesNode(e,t,i){var n,s;const r=performance.now(),o=t?[0]:void 0,a=[...this.series].reverse();let l;for(const t of a){if(!t.visible||!t.rootGroup.visible)continue;const{match:s,distance:r}=null!=(n=t.pickNode(e,o))?n:{};if(s&&null!=r&&((!l||l.distance>r)&&r<=(null!=i?i:1/0)&&(l={series:t,distance:r,datum:s}),0===r))break}return this.extraDebugStats.pickSeriesNode=Math.round((null!=(s=this.extraDebugStats.pickSeriesNode)?s:0)+(performance.now()-r)),l}onMouseMove(e){this.lastInteractionEvent=e,this.pointerScheduler.schedule(),this.extraDebugStats.mouseX=e.offsetX,this.extraDebugStats.mouseY=e.offsetY,this.update(6)}onLeave(e){this.tooltip.pointerLeftOntoTooltip(e)||(this.resetPointer(),this.update(6),this.ctx.cursorManager.updateCursor("chart"))}onBrowserFocus(e){e.delta>0?(this.focus.datum=void 0,this.focus.series=void 0,this.focus.datumIndex=0,this.focus.seriesIndex=0):(this.focus.datum=void 0,this.focus.series=void 0,this.focus.datumIndex=1/0,this.focus.seriesIndex=1/0)}onAnimationStart(){this.focus.hasFocus&&this.onBlur()}onBlur(){this.ctx.regionManager.updateFocusIndicatorRect(void 0),this.resetPointer(),this.focus.hasFocus=!1}onTab(e){this.handleFocus(),e.consume(),this.focus.hasFocus=!0}onNavVert(e){this.focus.seriesIndex+=e.delta,this.handleFocus(),e.consume()}onNavHori(e){this.focus.datumIndex+=e.delta,this.handleFocus(e.delta),e.consume()}onSubmit(e){const{series:t,datum:i}=this.focus,n=e.sourceEvent.sourceEvent;void 0!==t&&void 0!==i?t.fireNodeClickEvent(n,i):this.fireEvent({type:"click",event:n})}onContextMenu(e){this.ctx.tooltipManager.removeTooltip(this.id);const{Default:t,ContextMenu:i}=fc;this.ctx.interactionManager.getState()&(t|i)&&this.checkSeriesNodeRange(e,()=>{this.ctx.highlightManager.updateHighlight(this.id)})}handleFocus(e){this.focus.hasFocus=!0;const t=this.overlays.getFocusInfo();null==t?this.handleSeriesFocus(null!=e?e:0):(this.ctx.regionManager.updateFocusIndicatorRect(t.rect),this.ctx.ariaAnnouncementService.announceValue(t.text))}handleSeriesFocus(e){const{series:t,seriesRect:i,focus:n}=this,s=t.filter(e=>e.visible);if(0===s.length)return;n.seriesIndex=Un(0,n.seriesIndex,s.length-1),n.series=s[n.seriesIndex];const r=n.series.pickFocus({datumIndex:n.datumIndex,datumIndexDelta:e,seriesRect:i});if(void 0===r)return;const{datum:o,datumIndex:a}=r;n.datumIndex=a,n.datum=o;const l=ah(this.ctx.regionManager,r);if(void 0!==l){this.lastInteractionEvent=l;const e=n.series.getTooltipHtml(o),t=Vc.makeTooltipMeta(this.lastInteractionEvent,o);this.ctx.highlightManager.updateHighlight(this.id,o),this.ctx.tooltipManager.updateTooltip(this.id,t,e),this.ctx.ariaAnnouncementService.announceValue(e.ariaLabel)}}static isHoverEvent(e){return void 0!==e&&"hover"===e.type}handlePointer(t,i){if(16!==this.ctx.interactionManager.getState()||!e.isHoverEvent(t))return;const{lastPick:n,hoverRect:s}=this,{offsetX:r,offsetY:o}=t,a=(e=!1)=>{n&&this.resetPointer(e)};(i?!this.ctx.animationManager.isActive():null==s?void 0:s.containsPoint(r,o))?(this.handlePointerTooltip(t,a),this.handlePointerNode(t)):a()}handlePointerTooltip(e,t){const{lastPick:i,tooltip:n}=this,{range:s}=n,{offsetX:r,offsetY:o}=e;let a;je(s)&&(a=s);const l=this.pickSeriesNode({x:r,y:o},"exact"===s,a);if(!l)return this.ctx.tooltipManager.removeTooltip(this.id),void("tooltip"===this.highlight.range&&t(!0));const c="node"===this.highlight.range||!i||i!==l.datum;let h;c&&(h=l.series.getTooltipHtml(l.datum),"tooltip"===this.highlight.range&&this.ctx.highlightManager.updateHighlight(this.id,l.datum));const d=null!=a,u=this.tooltip.enabled&&l.series.tooltipEnabled,p="exact"===s&&0===l.distance,g=u&&("nearest"===s||d||p)&&(!c||void 0!==h),f=Vc.makeTooltipMeta(e,l.datum);g&&this.ctx.tooltipManager.updateTooltip(this.id,f,h)}handlePointerNode(e){this.checkSeriesNodeRange(e,(e,t)=>{(e.hasEventListener("nodeClick")||e.hasEventListener("nodeDoubleClick"))&&this.ctx.cursorManager.updateCursor("chart","pointer"),"node"===this.highlight.range&&this.ctx.highlightManager.updateHighlight(this.id,t)})||(this.ctx.cursorManager.updateCursor("chart"),"node"===this.highlight.range&&this.ctx.highlightManager.updateHighlight(this.id))}onClick(e){this.checkSeriesNodeClick(e)?this.update(4):this.fireEvent({type:"click",event:e.sourceEvent})}onDoubleClick(e){this.checkSeriesNodeDoubleClick(e)?this.update(4):this.fireEvent({type:"doubleClick",event:e.sourceEvent})}checkSeriesNodeClick(e){return this.checkSeriesNodeRange(e,(t,i)=>t.fireNodeClickEvent(e.sourceEvent,i))}checkSeriesNodeDoubleClick(e){return this.checkSeriesNodeRange(e,(t,i)=>t.fireNodeDoubleClickEvent(e.sourceEvent,i))}checkSeriesNodeRange(e,t){var i;const n=this.pickSeriesNode({x:e.offsetX,y:e.offsetY},!1),s=null==n?void 0:n.datum,r=null==s?void 0:s.series.properties.nodeClickRange;let o;je(r)&&(o=r);let a=this.pickSeriesNode({x:e.offsetX,y:e.offsetY},!0);if(a?this.ctx.highlightManager.updatePicked(this.id,a.datum):this.ctx.highlightManager.updatePicked(this.id),s&&"nearest"===r)return t(s.series,s),!0;if("exact"!==r&&(a=this.pickSeriesNode({x:e.offsetX,y:e.offsetY},!1,o)),!a)return!1;const l=null!=o,c="exact"===r&&0===a.distance;return!(!l&&!c||void 0!==e.pointerHistory&&!(null==(i=e.pointerHistory)?void 0:i.every(e=>{const t={x:e.offsetX,y:e.offsetY},i=this.pickSeriesNode(t,!1,o);return(null==i?void 0:i.datum)===(null==a?void 0:a.datum)})))&&(t(a.series,a.datum),!0)}changeHighlightDatum(e){var t,i;const n=new Set,{series:s,datum:r}=null!=(t=e.currentHighlight)?t:{},{series:o,datum:a}=null!=(i=e.previousHighlight)?i:{};o&&n.add(o),s&&n.add(s),(null==o?void 0:o.properties.cursor)&&a&&this.ctx.cursorManager.updateCursor(o.id),(null==s?void 0:s.properties.cursor)&&r&&this.ctx.cursorManager.updateCursor(s.id,s.properties.cursor),this.lastPick=e.currentHighlight,null==s||null==o?this.update(4):this.update(4,{seriesToUpdate:n})}waitForUpdate(e=1e4,t=!1){return x(this,null,function*(){const i=performance.now();for(this._pendingFactoryUpdatesCount>0&&(yield this.updateMutex.waitForClearAcquireQueue());7!==this.performUpdateType;){if(performance.now()-i>e){const i=`Chart.waitForUpdate() timeout of ${e} reached - first chart update taking too long.`;if(t)throw new Error(i);_.warnOnce(i)}yield Xl(50)}yield this.updateMutex.waitForClearAcquireQueue()})}waitForDataProcess(e){return new Promise(t=>{this.dataProcessListeners.add(t),We(e)&&setTimeout(()=>{this.dataProcessListeners.has(t)&&(this.dataProcessListeners.delete(t),t())},e)})}getMinRects(){const{width:e,height:t}=this.ctx.scene,i=this.series.map(i=>i.getMinRects(e,t)).filter(Pe);if(0===i.length)return;let n=0,s=0,r=0,o=0;for(const{minRect:e,minVisibleRect:t}of i)n=Math.max(n,e.width),s=Math.max(s,e.height),r=Math.max(r,t.width),o=Math.max(o,t.height);const a=new is(0,0,n,s);let l=a.clone();return r>0&&o>0&&(l=new is(0,0,r,o)),{minRect:a,minVisibleRect:l}}filterMiniChartSeries(e){return null==e?void 0:e.filter(e=>!1!==e.showInMiniChart)}applyOptions(e){var t,i,n,s,r;const o=this.processedOptions,a=e.diffOptions(o),l=e.userOptions;if(null==a)return;nd("AgChartV2.updateDelta() - applying delta",a);const c=Ze(a,o),h=this.applyModules(c);a.listeners&&this.registerListeners(this,a.listeners),Tt(this,a,{skip:["type","data","series","listeners","theme","legend.listeners","navigator.miniChart.series","navigator.miniChart.label","axes","topology"]});let d=!1,u="no-op";(null==(t=a.series)?void 0:t.length)&&(u=this.applySeries(this,a.series,null==o?void 0:o.series),d=!0),"replaced"===u&&this.resetAnimations(),this.applyAxes(this,c,o,u)&&(d=!0),a.data&&(this.data=a.data),(null==(i=a.legend)?void 0:i.listeners)&&this.modulesManager.isEnabled("legend")&&Object.assign(this.legend.listeners,a.legend.listeners),a.listeners&&this.updateAllSeriesListeners(),this.chartOptions=e,this.processedOptions=c,this.userOptions=Ze(l,this.userOptions);const p=this.modulesManager.getModule("navigator"),g=this.modulesManager.getModule("zoom");(null==p?void 0:p.enabled)||(null==g?void 0:g.enabled)||this.ctx.zoomManager.updateZoom("chart");const f=null==p?void 0:p.miniChart,m=null!=(r=null==(s=null==(n=c.navigator)?void 0:n.miniChart)?void 0:s.series)?r:c.series;!0===(null==f?void 0:f.enabled)&&null!=m?this.applyMiniChartOptions(f,m,c,o):!1===(null==f?void 0:f.enabled)&&(f.series=[],f.axes=[]),Tn("\n/* Reset */\n\n[class^='ag-charts'],\n[class^='ag-charts']:focus,\n[class^='ag-charts']:after,\n[class^='ag-charts']:before {\n    box-sizing: border-box;\n    outline: none;\n}\n\nbutton[class^='ag-charts'] {\n    background: none;\n    border: 0;\n}\n\n\n\n/* Icons */\n\n[class^='ag-charts-icon'] {\n    display: block;\n    /* speak: none; */\n    mask-size: contain;\n    mask-repeat: no-repeat;\n    background-color: currentColor;\n}\n\n.ag-charts-icon-zoom-in {\n    mask-image: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0IiBmaWxsPSJub25lIiBzdHJva2U9ImN1cnJlbnRDb2xvciIgc3Ryb2tlLXdpZHRoPSIyIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiIGNsYXNzPSJsdWNpZGUgbHVjaWRlLXpvb20taW4iPjxjaXJjbGUgY3g9IjExIiBjeT0iMTEiIHI9IjgiLz48bGluZSB4MT0iMjEiIHgyPSIxNi42NSIgeTE9IjIxIiB5Mj0iMTYuNjUiLz48bGluZSB4MT0iMTEiIHgyPSIxMSIgeTE9IjgiIHkyPSIxNCIvPjxsaW5lIHgxPSI4IiB4Mj0iMTQiIHkxPSIxMSIgeTI9IjExIi8+PC9zdmc+);\n}\n\n.ag-charts-icon-zoom-out {\n    mask-image: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0IiBmaWxsPSJub25lIiBzdHJva2U9ImN1cnJlbnRDb2xvciIgc3Ryb2tlLXdpZHRoPSIyIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiIGNsYXNzPSJsdWNpZGUgbHVjaWRlLXpvb20tb3V0Ij48Y2lyY2xlIGN4PSIxMSIgY3k9IjExIiByPSI4Ii8+PGxpbmUgeDE9IjIxIiB4Mj0iMTYuNjUiIHkxPSIyMSIgeTI9IjE2LjY1Ii8+PGxpbmUgeDE9IjgiIHgyPSIxNCIgeTE9IjExIiB5Mj0iMTEiLz48L3N2Zz4=);\n}\n\n.ag-charts-icon-reset {\n    mask-image: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0IiBmaWxsPSJub25lIiBzdHJva2U9ImN1cnJlbnRDb2xvciIgc3Ryb2tlLXdpZHRoPSIyIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiIGNsYXNzPSJsdWNpZGUgbHVjaWRlLXJvdGF0ZS1jY3ciPjxwYXRoIGQ9Ik0zIDEyYTkgOSAwIDEgMCA5LTkgOS43NSA5Ljc1IDAgMCAwLTYuNzQgMi43NEwzIDgiLz48cGF0aCBkPSJNMyAzdjVoNSIvPjwvc3ZnPg==);\n}\n\n.ag-charts-icon-pan-left {\n    mask-image: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0IiBmaWxsPSJub25lIiBzdHJva2U9ImN1cnJlbnRDb2xvciIgc3Ryb2tlLXdpZHRoPSIyIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiIGNsYXNzPSJsdWNpZGUgbHVjaWRlLWNoZXZyb24tbGVmdCI+PHBhdGggZD0ibTE1IDE4LTYtNiA2LTYiLz48L3N2Zz4=);\n}\n\n.ag-charts-icon-pan-right {\n    mask-image: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0IiBmaWxsPSJub25lIiBzdHJva2U9ImN1cnJlbnRDb2xvciIgc3Ryb2tlLXdpZHRoPSIyIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiIGNsYXNzPSJsdWNpZGUgbHVjaWRlLWNoZXZyb24tcmlnaHQiPjxwYXRoIGQ9Im05IDE4IDYtNi02LTYiLz48L3N2Zz4=);\n}\n\n.ag-charts-icon-pan-start {\n    mask-image: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0IiBmaWxsPSJub25lIiBzdHJva2U9ImN1cnJlbnRDb2xvciIgc3Ryb2tlLXdpZHRoPSIyIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiIGNsYXNzPSJsdWNpZGUgbHVjaWRlLWNoZXZyb24tZmlyc3QiPjxwYXRoIGQ9Im0xNyAxOC02LTYgNi02Ii8+PHBhdGggZD0iTTcgNnYxMiIvPjwvc3ZnPg==);\n}\n\n.ag-charts-icon-pan-end {\n    mask-image: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0IiBmaWxsPSJub25lIiBzdHJva2U9ImN1cnJlbnRDb2xvciIgc3Ryb2tlLXdpZHRoPSIyIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiIGNsYXNzPSJsdWNpZGUgbHVjaWRlLWNoZXZyb24tbGFzdCI+PHBhdGggZD0ibTcgMTggNi02LTYtNiIvPjxwYXRoIGQ9Ik0xNyA2djEyIi8+PC9zdmc+);\n}\n\n\n\n/* AG Charts Theme Default */\n\n.ag-charts-theme-default,\n.ag-charts-theme-default-dark {\n    /* Colors */\n    --ag-charts-active-color: var(--ag-active-color, #2196f3);\n    --ag-charts-background-color: var(--ag-background-color, #fff);\n    --ag-charts-foreground-color: var(--ag-foreground-color, #181d1f);\n    --ag-charts-border-color: var(--ag-border-color, #dddddd);\n\n    /* Sizing */\n    --ag-charts-font-size: var(--ag-font-size, 14px);\n    --ag-charts-size: var(--ag-grid-size, 8px);\n\n    /* Borders */\n    --ag-charts-border: var(--ag-borders, solid 1px);\n    --ag-charts-border-critical: var(--ag-borders-critical, solid 1px);\n\n    /* Toolbar */\n    --ag-charts-toolbar-foreground-color: var(--ag-header-foreground-color, var(--ag-charts-foreground-color));\n    --ag-charts-toolbar-background-color: var(\n        --ag-header-background-color,\n        color-mix(in srgb, var(--ag-charts-background-color), var(--ag-charts-foreground-color) 2%)\n    );\n    --ag-charts-toolbar-size: var(--ag-header-height, 48px);\n    --ag-charts-toolbar-padding: calc(var(--ag-charts-size) * 2);\n    --ag-charts-toolbar-border: var(--ag-charts-border, solid 1px) var(--ag-charts-border-color);\n    --ag-charts-toolbar-border-critical: var(--ag-charts-border-critical, solid 1px) var(--ag-charts-border-color);\n    --ag-charts-toolbar-hover-color: color-mix(in srgb, var(--ag-charts-background-color), var(--ag-charts-active-color) 12%);\n    --ag-charts-toolbar-disabled-foreground-color: var(\n        --ag-disabled-foreground-color,\n        color-mix(in srgb, transparent, var(--ag-charts-toolbar-foreground-color) 50%)\n    );\n    --ag-charts-toolbar-disabled-background-color: var(\n        --ag-input-disabled-background-color,\n        color-mix(in srgb, var(--ag-charts-toolbar-background-color), var(--ag-charts-toolbar-foreground-color) 6%)\n    );\n    --ag-charts-toolbar-gap: var(--ag-charts-size);\n\n    /* Buttons */\n    --ag-charts-button-padding: var(--ag-charts-size);\n    --ag-charts-button-radius: var(--ag-border-radius, 4px);\n\n    /* Focus Indicator */\n    --ag-charts-focus-border: solid 2px var(--ag-input-focus-border-color, var(--ag-charts-active-color));\n    --ag-charts-focus-border-shadow: var(--ag-input-focus-box-shadow, 0 0 0 3px color-mix(in srgb, transparent, var(--ag-charts-focus-border) 47%));\n\n    /* Icons */\n    --ag-charts-icon-font-family: 'agChartsDefault';\n    --ag-charts-icon-font-weight: normal;\n    --ag-charts-icon-font-color: color-mix(in srgb, transparent, var(--ag-charts-foreground-color), 90%);\n}\n\n\n\n/* AG Charts Theme Default Dark */\n\n.ag-charts-theme-default-dark {\n    /* Colors */\n    --ag-charts-background-color: var(--ag-background-color, color-mix(in srgb, #fff, #182230 97%));\n    --ag-charts-foreground-color: var(--ag-foreground-color, #fff);\n    --ag-charts-border-color: var(--ag-border-color, rgba(255, 255, 255, 0.16));\n    --ag-charts-hover-color: var(\n        --ag-row-hover-color,\n        color-mix(in srgb, transparent, var(--ag-charts-active-color) 20%)\n    );\n\n    /* Toolbar */\n    --ag-charts-toolbar-background-color: var(--ag-header-background-color, color-mix(in srgb, #fff, #182230 93%));\n}\n\n\n","chart"),this.ctx.annotationManager.setAnnotationStyles(e.annotationThemes),d||(d=this.shouldForceNodeDataRefresh(a,u));const v=d||h?0:3;this.maybeResetAnimations(u),nd("AgChartV2.applyChartOptions() - update type",zc[v],{seriesStatus:u,forceNodeDataRefresh:d}),this.update(v,{forceNodeDataRefresh:d,newAnimationBatch:!0})}maybeResetAnimations(e){if("standalone"===this.mode)switch(e){case"series-grouping-change":case"replaced":this.resetAnimations()}}shouldForceNodeDataRefresh(e,t){const i=!!e.data||"data-change"===t||"replaced"===t,n=Lt.getKeys(),s=Object.values(n).some(t=>null!=e[t]),r=null!=e.title&&null!=e.subtitle;return i||s||r}applyMiniChartOptions(e,t,i,n){var s,r,o,a,l;const c=null!=(o=null==(r=null==(s=null==n?void 0:n.navigator)?void 0:s.miniChart)?void 0:r.series)?o:null==n?void 0:n.series,h=this.applySeries(e,this.filterMiniChartSeries(t),this.filterMiniChartSeries(c));this.applyAxes(e,i,n,h,["axes[].tick","axes[].thickness","axes[].title","axes[].crosshair","axes[].gridLine","axes[].label"]);const d=e.axes,u=d.find(e=>"x"===e.direction);for(const e of d)e.gridLine.enabled=!1,e.label.enabled=e===u,e.tick.enabled=!1,e.interactionEnabled=!1;if(null!=u){const e=null==(a=i.navigator)?void 0:a.miniChart,t=null==e?void 0:e.label,n=null==(l=null==e?void 0:e.label)?void 0:l.interval;u.line.enabled=!1,u.label.set(et(t,["interval","rotation","minSpacing","autoRotate","autoRotateAngle"])),u.tick.set(et(n,["enabled","width","size","color","interval","step"]));const s=null==n?void 0:n.step;null!=s&&(u.tick.interval=s)}}applyModules(e){var t;const{type:i}=this.constructor;let n=!1;for(const s of Ee.byType("root","legend")){const r=null!=e[s.optionsKey]&&s.chartTypes.includes(i);r!==this.modulesManager.isEnabled(s)&&(r?(this.modulesManager.addModule(s,e=>new e.instanceConstructor(this.getModuleContext())),"legend"===s.type&&(null==(t=this.modulesManager.getModule(s))||t.attachLegend(this.ctx.scene)),this[s.optionsKey]=this.modulesManager.getModule(s)):(this.modulesManager.removeModule(s),delete this[s.optionsKey]),n=!0)}return n}applySeries(e,t,i){var n;if(!t)return"no-change";const s=function(e,t,i){var n,s,r,o;const a=(e,t)=>{const i=[e];for(const e of dh)e in t&&null!=t[e]&&i.push(`${e}=${t[e]}`);return i.join(";")},l=new Map;let c=0;for(const t of e){const e=a(t.type,t.properties);l.has(e)||l.set(e,[]),null==(n=l.get(e))||n.push([t,c++])}const h=new Map;for(const e of t){const t=a(e.type,e);h.has(t)||h.set(t,[]),null==(s=h.get(t))||s.push(e)}if(![...l.keys()].some(e=>h.has(e)))return{status:"no-overlap",oldKeys:l.keys(),newKeys:h.keys()};const d=[];let u=-1;for(const[e,t]of h.entries())for(const n of t){u++;const t=l.get(e);if(null==t||t.length<1){d.push({opts:n,idx:u,status:"add"}),l.delete(e);continue}const[s,a]=t.shift(),c=xt(null!=(r=null==i?void 0:i[a])?r:{},null!=n?n:{}),{groupIndex:h,stackIndex:p}=null!=(o=null==c?void 0:c.seriesGrouping)?o:{};null!=h||null!=p?d.push({opts:n,series:s,diff:c,idx:a,status:"series-grouping"}):c?d.push({opts:n,series:s,diff:c,idx:a,status:"update"}):d.push({opts:n,series:s,idx:a,status:"no-op"}),0===t.length&&l.delete(e)}for(const e of l.values())for(const[t,i]of e)d.push({series:t,idx:i,status:"remove"});return{status:"overlap",changes:d}}(e.series,t,i);if("no-overlap"===s.status)return nd(`AgChartV2.applySeries() - creating new series instances, status: ${s.status}`,s),e.series=t.map(e=>this.createSeries(e)),"replaced";nd("AgChartV2.applySeries() - matchResult",s);const r=[];let o=!1,a=!1,l=!1;for(const e of s.changes)switch(a||(a="series-grouping"===e.status),o||(o=null!=(null==(n=e.diff)?void 0:n.data)),l||(l="no-op"!==e.status),e.status){case"add":const t=this.createSeries(e.opts);r.push(t),nd("AgChartV2.applySeries() - created new series",t);break;case"remove":nd(`AgChartV2.applySeries() - removing series at previous idx ${e.idx}`,e.series);break;case"no-op":r.push(e.series),nd(`AgChartV2.applySeries() - no change to series at previous idx ${e.idx}`,e.series);break;default:const{series:i,diff:n,idx:s}=e;nd(`AgChartV2.applySeries() - applying series diff previous idx ${s}`,n,i),this.applySeriesValues(i,n),i.markNodeDataDirty(),r.push(i)}for(let e=0;e<r.length;e++)r[e]._declarationOrder=e;return nd("AgChartV2.applySeries() - final series instances",r),e.series=r,a?"series-grouping-change":o?"data-change":l?"updated":"no-op"}applyAxes(e,t,i,n,s=[]){if(!("axes"in t)||!t.axes)return!1;s=["axes[].type",...s];const{axes:r}=t;return"replaced"!==n&&e.axes.length===r.length&&e.axes.every((e,t)=>e.type===r[t].type)&&gt(i)?(e.axes.forEach((e,t)=>{var n,o;const a=xt(null!=(o=null==(n=i.axes)?void 0:n[t])?o:{},r[t]);nd(`AgChartV2.applyAxes() - applying axis diff idx ${t}`,a);const l=`axes[${t}]`;Tt(e,a,y(v({},Yr),{path:l,skip:s}))}),!0):(nd(`AgChartV2.applyAxes() - creating new axes instances; seriesStatus: ${n}`),e.axes=this.createAxis(r,s),!0)}createSeries(e){const t=Rt.create(e.type,this.getModuleContext());return this.applySeriesOptionModules(t,e),this.applySeriesValues(t,e),t}applySeriesOptionModules(e,t){const i=e.createModuleContext(),n=e.getModuleMap();for(const s of Ee.byType("series-option"))s.optionsKey in t&&s.seriesTypes.includes(e.type)&&n.addModule(s,e=>new e.instanceConstructor(i))}applySeriesValues(e,t){const i=e.getModuleMap(),n=t,{type:s,data:r,listeners:o,seriesGrouping:a,showInMiniChart:l}=n,c=C(n,["type","data","listeners","seriesGrouping","showInMiniChart"]);for(const e of ht)if("series-option"===e.type&&e.optionsKey in c){const t=i.getModule(e.optionsKey),n=c[e.optionsKey];delete c[e.optionsKey],t.properties.set(n)}e.properties.set(c),"data"in t&&e.setOptionsData(r),o&&this.registerListeners(e,o),"seriesGrouping"in t&&(e.seriesGrouping=null==a?void 0:v(v({},e.seriesGrouping),a))}createAxis(e,t){const i=new hh,n=this.getModuleContext();for(let s=0;s<e.length;s++){const r=e[s],o=Me.create(r.type,n);this.applyAxisModules(o,r),Tt(o,r,y(v({},Yr),{path:`axes[${s}]`,skip:t})),i.push(o,r)}return i.guessInvalidPositions()}applyAxisModules(e,t){const i=e.createModuleContext(),n=e.getModuleMap();for(const s of Ee.byType("axis-option")){const r=null!=t[s.optionsKey];r!==n.isEnabled(s)&&(r?(n.addModule(s,e=>new e.instanceConstructor(i)),e[s.optionsKey]=n.getModule(s)):(n.removeModule(s),delete e[s.optionsKey]))}}registerListeners(e,t){e.clearEventListeners();for(const[i,n]of Object.entries(t))Ve(n)&&e.addEventListener(i,n)}};rd.chartsInstances=new WeakMap,S([Za({newValue(e){this.destroyed||(e.setAttribute("data-ag-charts",""),e.appendChild(this.element),rd.chartsInstances.set(e,this))},oldValue(e){e.removeAttribute("data-ag-charts"),e.removeChild(this.element),rd.chartsInstances.delete(e)}})],rd.prototype,"container",2),S([Za({newValue(e){this.resize(e,void 0,"width option")}})],rd.prototype,"width",2),S([Za({newValue(e){this.resize(void 0,e,"height option")}})],rd.prototype,"height",2),S([Za({newValue(e){this.onAutoSizeChange(e)}}),Ys(er)],rd.prototype,"autoSize",2),S([Ys(Qs)],rd.prototype,"padding",2),S([Ys(Qs)],rd.prototype,"seriesArea",2),S([Ys(Qs)],rd.prototype,"title",2),S([Ys(Qs)],rd.prototype,"subtitle",2),S([Ys(Qs)],rd.prototype,"footnote",2),S([Ys(Qs)],rd.prototype,"keyboard",2),S([Ys(Gr(["standalone","integrated"],"a chart mode"))],rd.prototype,"mode",2),S([Za({changeValue(e,t){this.onAxisChange(e,t)}})],rd.prototype,"axes",2),S([Za({changeValue(e,t){this.onSeriesChange(e,t)}})],rd.prototype,"series",2);var od=rd;function ad(e,t,i,n,s,r,o,a){const l=(i-e)*(a-r)-(n-t)*(o-s);if(0===l)return 0;const c=((o-s)*(t-r)-(e-s)*(a-r))/l,h=((i-e)*(t-r)-(n-t)*(e-s))/l;return c>=0&&c<=1&&h>=0&&h<=1?1:0}function ld(e,t,i,n,s,r,o,a,l,c,h,d){let u=0;const p=c-d,g=h-l,f=l*(d-c)-c*(h-l),m=cd(e,i,s,o),v=cd(t,n,r,a),y=function(e,t,i,n){if(0===e)return function(e,t,i){if(0===e)return function(e,t){const i=-t/e;return 0!==e&&i>=0&&i<=1?[i]:[]}(t,i);const n=t*t-4*e*i,s=[];if(0===n){const i=-t/(2*e);i>=0&&i<=1&&s.push(i)}else if(n>0){const i=Math.sqrt(n),r=(-t-i)/(2*e),o=(-t+i)/(2*e);r>=0&&r<=1&&s.push(r),o>=0&&o<=1&&s.push(o)}return s}(t,i,n);const s=t/e,r=i/e,o=(3*r-s*s)/9,a=(9*s*r-n/e*27-2*s*s*s)/54,l=o*o*o+a*a,c=1/3,h=[];if(l>=0){const e=Math.sqrt(l),t=Math.sign(a+e)*Math.pow(Math.abs(a+e),c),i=Math.sign(a-e)*Math.pow(Math.abs(a-e),c),n=Math.abs(Math.sqrt(3)*(t-i)/2),r=-c*s+(t+i);if(r>=0&&r<=1&&h.push(r),0===n){const e=-c*s-(t+i)/2;e>=0&&e<=1&&h.push(e)}}else{const e=Math.acos(a/Math.sqrt(-o*o*o)),t=c*s,i=2*Math.sqrt(-o),n=i*Math.cos(c*e)-t,r=i*Math.cos(c*(e+2*Math.PI))-t,l=i*Math.cos(c*(e+4*Math.PI))-t;n>=0&&n<=1&&h.push(n),r>=0&&r<=1&&h.push(r),l>=0&&l<=1&&h.push(l)}return h}(p*m[0]+g*v[0],p*m[1]+g*v[1],p*m[2]+g*v[2],p*m[3]+g*v[3]+f);for(const e of y){const t=e*e,i=e*t,n=m[0]*i+m[1]*t+m[2]*e+m[3],s=v[0]*i+v[1]*t+v[2]*e+v[3];let r;r=l===h?(s-c)/(d-c):(n-l)/(h-l),r>=0&&r<=1&&u++}return u}function cd(e,t,i,n){return[3*t-e-3*i+n,3*e-6*t+3*i,-3*e+3*t,e]}function hd(e,t,i,n,s,r,o,a,l,c){if(isNaN(e)||isNaN(t))return 0;r&&([s,n]=[n,s]);const h=(c-a)/(l-o),d=a-h*o,u=Math.pow(h,2)+1,p=2*(h*(d-t)-e),g=Math.pow(e,2)+Math.pow(d-t,2)-Math.pow(i,2),f=Math.pow(p,2)-4*u*g;if(f<0)return 0;const m=(-p+Math.sqrt(f))/2/u,v=(-p-Math.sqrt(f))/2/u;let y=0;return[m,v].forEach(i=>{if(!(i>=Math.min(o,l)&&i<=Math.max(o,l)))return;const r=i-e,a=h*i+d-t;Vs(Math.atan2(a,r),n,s)&&y++}),y}var dd=class{constructor(){this.path2d=new Path2D,this.previousCommands=[],this.previousParams=[],this.previousClosedPath=!1,this.commands=[],this.params=[],this.openedPath=!1,this.closedPath=!1}isDirty(){return this.closedPath!==this.previousClosedPath||this.previousCommands.length!==this.commands.length||this.previousParams.length!==this.params.length||this.previousCommands.toString()!==this.commands.toString()||this.previousParams.toString()!==this.params.toString()}getPath2D(){return this.path2d}moveTo(e,t){this.openedPath=!0,this.path2d.moveTo(e,t),this.commands.push(0),this.params.push(e,t)}lineTo(e,t){this.openedPath?(this.path2d.lineTo(e,t),this.commands.push(1),this.params.push(e,t)):this.moveTo(e,t)}rect(e,t,i,n){this.moveTo(e,t),this.lineTo(e+i,t),this.lineTo(e+i,t+n),this.lineTo(e,t+n),this.closePath()}roundRect(e,t,i,n,s){s=Math.min(s,i/2,n/2),this.moveTo(e,t+s),this.arc(e+s,t+s,s,Math.PI,1.5*Math.PI),this.lineTo(e+s,t),this.lineTo(e+i-s,t),this.arc(e+i-s,t+s,s,1.5*Math.PI,2*Math.PI),this.lineTo(e+i,t+s),this.lineTo(e+i,t+n-s),this.arc(e+i-s,t+n-s,s,0,Math.PI/2),this.lineTo(e+i-s,t+n),this.lineTo(e+s,t+n),this.arc(e+ +s,t+n-s,s,Math.PI/2,Math.PI),this.lineTo(e,t+n-s),this.closePath()}arc(e,t,i,n,s,r){this.openedPath=!0,this.path2d.arc(e,t,i,n,s,r),this.commands.push(2),this.params.push(e,t,i,n,s,r?1:0)}cubicCurveTo(e,t,i,n,s,r){this.openedPath||this.moveTo(e,t),this.path2d.bezierCurveTo(e,t,i,n,s,r),this.commands.push(3),this.params.push(e,t,i,n,s,r)}closePath(){this.openedPath&&(this.path2d.closePath(),this.commands.push(4),this.openedPath=!1,this.closedPath=!0)}clear(e){e&&(this.previousCommands=this.commands,this.previousParams=this.params,this.previousClosedPath=this.closedPath),this.path2d=new Path2D,this.openedPath=!1,this.closedPath=!1,this.commands=[],this.params=[]}isPointInPath(e,t){const i=this.commands,n=this.params,s=i.length,r=-1e4,o=-1e4;let a=NaN,l=NaN,c=0,h=0,d=0;for(let u=0,p=0;u<s;u++)switch(i[u]){case 0:d+=ad(a,l,c,h,r,o,e,t),c=n[p++],a=c,h=n[p++],l=h;break;case 1:d+=ad(c,h,n[p++],n[p++],r,o,e,t),c=n[p-2],h=n[p-1];break;case 3:d+=ld(c,h,n[p++],n[p++],n[p++],n[p++],n[p++],n[p++],r,o,e,t),c=n[p-2],h=n[p-1];break;case 2:const i=n[p++],s=n[p++],u=n[p++],g=n[p++],f=n[p++];d+=hd(i,s,u,g,f,Boolean(n[p++]),r,o,e,t),isNaN(a)||(d+=ad(c,h,i+Math.cos(g)*u,s+Math.sin(g)*u,r,o,e,t)),c=i+Math.cos(f)*u,h=s+Math.sin(f)*u;break;case 4:d+=ad(a,l,c,h,r,o,e,t)}return d%2==1}distanceSquared(e,t){let i=1/0;const n=this.commands,s=this.params,r=n.length;let o=NaN,a=NaN,l=0,c=0;for(let h=0,d=0;h<r;h++)switch(n[h]){case 0:l=o=s[d++],c=a=s[d++];break;case 1:i=Ga(e,t,l,c,s[d++],s[d++],i);break;case 3:_.error("Command.Curve distanceSquare not implemented");break;case 2:{const n=s[d++],r=s[d++],o=s[d++],a=s[d++],h=s[d++],u=n+Math.cos(a)*o,p=r+Math.sin(a)*o,g=Boolean(s[d++]);i=Ga(e,t,l,c,u,p,i),i=Va(e,t,n,r,o,a,h,g,i),l=n+Math.cos(h)*o,c=r+Math.sin(h)*o;break}case 4:i=Ga(e,t,l,c,o,a,i)}return i}getPoints(){const{commands:e,params:t}=this,i=[];let n=0;for(let s=0;s<e.length;s++)switch(e[s]){case 0:case 1:i.push({x:t[n++],y:t[n++]});break;case 3:n+=4,i.push({x:t[n++],y:t[n++]});break;case 2:i.push({x:t[n++],y:t[n++]}),n+=4}return i}};function ud(e){const{redraw:t=3,changeCb:i,convertor:n}=null!=e?e:{};return rs({redraw:t,type:"path",convertor:n,changeCb:i})}var pd=class extends Ro{constructor(){super(...arguments),this.path=new dd,this._clipX=NaN,this._clipY=NaN,this._dirtyPath=!0}set clipX(e){this._clipX=e,this.dirtyPath=!0}set clipY(e){this._clipY=e,this.dirtyPath=!0}set dirtyPath(e){this._dirtyPath!==e&&(this._dirtyPath=e,e&&this.markDirty(this,3))}get dirtyPath(){return this._dirtyPath}checkPathDirty(){var e,t,i,n;this._dirtyPath||(this.dirtyPath=this.path.isDirty()||null!=(t=null==(e=this.fillShadow)?void 0:e.isDirty())&&t||null!=(n=null==(i=this._clipPath)?void 0:i.isDirty())&&n)}isPointInPath(e,t){const i=this.transformPoint(e,t);return this.path.closedPath&&this.path.isPointInPath(i.x,i.y)}distanceSquared(e,t){const i=this.transformPoint(e,t);return this.path.distanceSquared(i.x,i.y)}isDirtyPath(){return!1}updatePath(){}render(e){var t,i,n,s;const{ctx:r,forceRender:o,stats:a}=e;if(0!==this.dirty||o){if(this.computeTransformMatrix(),this.matrix.toContext(r),(this.dirtyPath||this.isDirtyPath())&&(this.updatePath(),this.dirtyPath=!1),isNaN(this._clipX)||isNaN(this._clipY)||null==this.clipMode)this.drawPath(r);else{r.save();const e=this.strokeWidth/2;if(null!=this._clipPath||(this._clipPath=new dd),this._clipPath.clear(),this._clipPath.rect(-e,-e,this._clipX+e,this._clipY+e+e),"normal"===this.clipMode&&r.clip(null==(t=this._clipPath)?void 0:t.getPath2D()),this._clipX>0&&this._clipY>0&&this.drawPath(r),"punch-out"===this.clipMode){r.clip(null==(i=this._clipPath)?void 0:i.getPath2D());const{x:e=-1e4,y:t=-1e4,width:s=2e4,height:o=2e4}=null!=(n=this.computeBBox())?n:{};r.clearRect(e,t,s,o)}r.restore()}null==(s=this.fillShadow)||s.markClean(),super.render(e)}else a&&(a.nodesSkipped+=this.nodeCount.count)}drawPath(e){this.fillStroke(e,this.path.getPath2D())}};pd.className="Path",S([ud()],pd.prototype,"clipMode",2),S([ud()],pd.prototype,"clipX",1),S([ud()],pd.prototype,"clipY",1);var gd=class{constructor(e,t,i){this.root=new vd(e,t,i)}clear(e){this.root.clear(e)}addValue(e,t){const i={hitTester:e,value:t,distanceSquared:(t,i)=>e.distanceSquared(t,i)};this.root.addElem(i)}find(e,t){const i={best:{nearest:void 0,distanceSquared:1/0}};return this.root.find(e,t,i),i.best}},fd=class{constructor(e,t,i,n){this.nw=e,this.ne=t,this.sw=i,this.se=n}addElem(e){this.nw.addElem(e),this.ne.addElem(e),this.sw.addElem(e),this.se.addElem(e)}find(e,t,i){this.nw.find(e,t,i),this.ne.find(e,t,i),this.sw.find(e,t,i),this.se.find(e,t,i)}},md=class{constructor(e,t,i){this.capacity=e,this.maxdepth=t,this.boundary=null!=i?i:is.NaN,this.elems=[],this.subdivisions=void 0}clear(e){this.elems.length=0,this.boundary=e,this.subdivisions=void 0}addElem(e){this.addCondition(e)&&(void 0===this.subdivisions?0===this.maxdepth||this.elems.length<this.capacity?this.elems.push(e):this.subdivide(e):this.subdivisions.addElem(e))}find(e,t,i){this.findCondition(e,t,i)&&(void 0===this.subdivisions?this.findAction(e,t,i):this.subdivisions.find(e,t,i))}subdivide(e){this.subdivisions=this.makeSubdivisions();for(const e of this.elems)this.subdivisions.addElem(e);this.subdivisions.addElem(e),this.elems.length=0}makeSubdivisions(){const{x:e,y:t,width:i,height:n}=this.boundary,{capacity:s}=this,r=this.maxdepth-1,o=i/2,a=n/2,l=new is(e,t,o,a),c=new is(e+o,t,o,a),h=new is(e,t+a,o,a),d=new is(e+o,t+a,o,a);return new fd(this.child(s,r,l),this.child(s,r,c),this.child(s,r,h),this.child(s,r,d))}},vd=class e extends md{addCondition(e){const{x:t,y:i}=e.hitTester.midPoint;return this.boundary.containsPoint(t,i)}findCondition(e,t,i){const{best:n}=i;return 0!==n.distanceSquared&&this.boundary.distanceSquared(e,t)<n.distanceSquared}findAction(e,t,i){const n=Jn(e,t,this.elems,i.best.distanceSquared);void 0!==n.nearest&&n.distanceSquared<i.best.distanceSquared&&(i.best=n)}child(t,i,n){return new e(t,i,n)}},yd=class extends pd{constructor(){super(...arguments),this.x=0,this.y=0,this.size=12}computeBBox(){const{x:e,y:t,size:i}=this,{center:n}=this.constructor;return new is(e-i*n.x,t-i*n.y,i,i)}applyPath(e,t){const{path:i}=this;let{x:n,y:s}=this;null!=this.repeat&&(n=0,s=0),i.clear();for(const{x:r,y:o,t:a}of t)n+=r*e,s+=o*e,"move"===a?i.moveTo(n,s):i.lineTo(n,s);i.closePath()}executeFill(e,t){if(!t)return;if(null==this.repeat)return super.executeFill(e,t);e.save();let i=this.translationX,n=this.translationY;for(const s of this.repeat)e.translate(s.x-i,s.y-n),e.fill(t),i=s.x,n=s.y;e.restore()}executeStroke(e,t){if(!t)return;if(null==this.repeat)return super.executeStroke(e,t);e.save();let i=this.translationX,n=this.translationY;for(const s of this.repeat)e.translate(s.x-i,s.y-n),e.stroke(t),i=s.x,n=s.y;e.restore()}};yd.center={x:.5,y:.5},S([ud()],yd.prototype,"x",2),S([ud()],yd.prototype,"y",2),S([ud({convertor:Math.abs})],yd.prototype,"size",2),S([ud()],yd.prototype,"repeat",2);var Cd=class extends yd{updatePath(){const{x:e,y:t,path:i,size:n}=this,s=n/2;i.clear(),i.arc(e,t,s,0,2*Math.PI),i.closePath()}};Cd.className="Circle";var bd=class e extends yd{updatePath(){const t=this.size/4.2;super.applyPath(t,e.moves)}};bd.className="Cross",bd.moves=[{x:-1,y:0,t:"move"},{x:-1,y:-1},{x:1,y:-1},{x:1,y:1},{x:1,y:-1},{x:1,y:1},{x:-1,y:1},{x:1,y:1},{x:-1,y:1},{x:-1,y:-1},{x:-1,y:1},{x:-1,y:-1}];var Sd=bd,wd=class e extends yd{updatePath(){const t=this.size/2;super.applyPath(t,e.moves)}};wd.className="Diamond",wd.moves=[{x:0,y:-1,t:"move"},{x:1,y:1},{x:-1,y:1},{x:-1,y:-1},{x:1,y:-1}];var xd=wd,Ed=class extends yd{rad(e){return e/180*Math.PI}updatePath(){const{x:e,path:t,size:i,rad:n}=this,s=i/4,r=this.y+s/2;t.clear(),t.arc(e-s,r-s,s,n(130),n(330)),t.arc(e+s,r-s,s,n(220),n(50)),t.lineTo(e,r+s),t.closePath()}};Ed.className="Heart";var Md=class extends yd{updatePath(){const{path:e,x:t,y:i}=this,n=this.size,s=.5;e.clear(),e.moveTo(t+-.34375*n,i+-.65625*n),e.cubicCurveTo(t+-.34375*n,i+-.848509*n,t+-.192259*n,i+-1*n,t+0*n,i+-1*n),e.cubicCurveTo(t+(.692259-s)*n,i+-1*n,t+.34375*n,i+-.848509*n,t+.34375*n,i+-.65625*n),e.cubicCurveTo(t+.34375*n,i+-.506176*n,t+.284625*n,i+(.600181-1)*n,t+(.716461-s)*n,i+(.695393-1)*n),e.cubicCurveTo(t+.199009*n,i+-.280231*n,t+(.681271-s)*n,i+-.256896*n,t+(.663785-s)*n,i+(.766105-1)*n),e.cubicCurveTo(t+(.611893-s)*n,i+(.834367-1)*n,t+(.562228-s)*n,i+(.899699-1)*n,t+(.528896-s)*n,i+(.980648-1)*n),e.cubicCurveTo(t+(.524075-s)*n,i+(.992358-1)*n,t+(.512663-s)*n,i+0*n,t+0*n,i+0*n),e.cubicCurveTo(t+(.487337-s)*n,i+0*n,t+(.475925-s)*n,i+(.992358-1)*n,t+(.471104-s)*n,i+(.980648-1)*n),e.cubicCurveTo(t+(.487337-s)*n,i+0*n,t+(.475925-s)*n,i+(.992358-1)*n,t+(.471104-s)*n,i+(.980648-1)*n),e.cubicCurveTo(t+(.437772-s)*n,i+(.899699-1)*n,t+(.388107-s)*n,i+(.834367-1)*n,t+(.336215-s)*n,i+(.766105-1)*n),e.cubicCurveTo(t+(.318729-s)*n,i+-.256896*n,t+-.199009*n,i+-.280231*n,t+(.283539-s)*n,i+(.695393-1)*n),e.cubicCurveTo(t+-.284625*n,i+(.600181-1)*n,t+-.34375*n,i+-.506176*n,t+-.34375*n,i+-.65625*n),e.closePath()}};Md.className="MapPin",Md.center={x:.5,y:1};var Ad=class e extends yd{updatePath(){const t=this.size/3;super.applyPath(t,e.moves)}};Ad.className="Plus",Ad.moves=[{x:-.5,y:-.5,t:"move"},{x:0,y:-1},{x:1,y:0},{x:0,y:1},{x:1,y:0},{x:0,y:1},{x:-1,y:0},{x:0,y:1},{x:-1,y:0},{x:0,y:-1},{x:-1,y:0},{x:0,y:-1}];var Td=Ad,Dd=class extends yd{updatePath(){const{path:e,x:t,y:i}=this,n=this.size/2;e.clear(),e.moveTo(this.align(t-n),this.align(i-n)),e.lineTo(this.align(t+n),this.align(i-n)),e.lineTo(this.align(t+n),this.align(i+n)),e.lineTo(this.align(t-n),this.align(i+n)),e.closePath()}};Dd.className="Square";var Id=class extends yd{updatePath(){const{x:e,y:t,path:i,size:n}=this,s=n/2,r=Math.PI/2;i.clear();for(let o=0;o<10;o++){const a=o%2==0?n:s,l=o*Math.PI/5-r,c=e+Math.cos(l)*a,h=t+Math.sin(l)*a;i.lineTo(c,h)}i.closePath()}};Id.className="Star";var Rd=class e extends yd{updatePath(){const t=1.1*this.size;super.applyPath(t,e.moves)}};Rd.className="Triangle",Rd.moves=[{x:0,y:-.48,t:"move"},{x:.5,y:.87},{x:-1,y:0}];var Ld=Rd,kd={circle:Cd,cross:Sd,diamond:xd,heart:Ed,pin:Md,plus:Td,square:Dd,star:Id,triangle:Ld},Pd=Object.keys(kd);function Nd(e){return"string"==typeof e&&Pd.includes(e)}function Od(e=Dd){return Nd(e)?kd[e]:"function"==typeof e?e:Dd}var _d=class extends Qh{constructor(){super(...arguments),this.showFocusBox=!0}getScaleInformation({xScale:e,yScale:t}){return{isContinuousX:Zr.is(e),isContinuousY:Zr.is(t),xScaleType:null==e?void 0:e.type,yScaleType:null==t?void 0:t.type}}getModulePropertyDefinitions(){var e,t;const i=null==(e=this.axes.x)?void 0:e.scale,n=null==(t=this.axes.y)?void 0:t.scale;return this.moduleMap.mapModules(e=>e.getPropertyDefinitions(this.getScaleInformation({xScale:i,yScale:n}))).flat()}requestDataModel(e,t,i){return x(this,null,function*(){i.props.push(...this.getModulePropertyDefinitions());const{dataModel:n,processedData:s}=yield e.request(this.id,null!=t?t:[],i);return this.dataModel=n,this.processedData=s,this.dispatch("data-processed",{dataModel:n,processedData:s}),{dataModel:n,processedData:s}})}isProcessedDataAnimatable(){var e,t;const i=null==(t=null==(e=this.processedData)?void 0:e.reduced)?void 0:t.animationValidation;if(!i)return!0;const{orderedKeys:n,uniqueKeys:s}=i;return n&&s}checkProcessedDataAnimatable(){this.isProcessedDataAnimatable()||this.ctx.animationManager.skipCurrentBatch()}pickFocus(e){return this.doPickFocus(e,this)}doPickFocus(e,t){const i=this.getNodeData();if(void 0===i||0===i.length)return;const{datumIndexDelta:n,seriesRect:s}=e,r=this.computeFocusDatumIndex(e,i,t.seriesItemEnabled);if(void 0===r)return;const{showFocusBox:o}=this,a=i[r],l=this.computeFocusBounds({datumIndex:r,datumIndexDelta:n,seriesRect:s});return void 0!==l?{bbox:l,showFocusBox:o,datum:a,datumIndex:r}:void 0}computeFocusDatumIndex(e,t,i){i&&t.length!==i.length&&_.error(`invalid state: nodeData.length (${t.length} !== seriesItemEnabled.length (${null==i?void 0:i.length})`);const n=e=>{const n=t[e];return(void 0===n.missing||!1===n.missing)&&(void 0===i||i[e])},s=e=>{for(;e>=0&&!n(e);)e--;return-1===e?void 0:e},r=e=>{for(;e<t.length&&!n(e);)e++;return e===t.length?void 0:e};let o;const a=Un(0,e.datumIndex,t.length-1);return e.datumIndexDelta<0?o=s(a):e.datumIndexDelta>0?o=r(a):(null!=o||(o=r(a)),null!=o||(o=s(a))),void 0===o?0===e.datumIndexDelta?void 0:e.datumIndex-e.datumIndexDelta:o}},Fd=class extends Ct{constructor(){super(...arguments),this.fill="rgba(255,255,255, 0.33)",this.stroke="rgba(0, 0, 0, 0.4)",this.strokeWidth=2}};S([Ys(vr,{optional:!0})],Fd.prototype,"fill",2),S([Ys(or,{optional:!0})],Fd.prototype,"fillOpacity",2),S([Ys(vr,{optional:!0})],Fd.prototype,"stroke",2),S([Ys(rr,{optional:!0})],Fd.prototype,"strokeWidth",2),S([Ys(or,{optional:!0})],Fd.prototype,"strokeOpacity",2),S([Ys(Ar,{optional:!0})],Fd.prototype,"lineDash",2),S([Ys(rr,{optional:!0})],Fd.prototype,"lineDashOffset",2);var Gd=class extends Ct{};S([Ys(rr,{optional:!0})],Gd.prototype,"strokeWidth",2),S([Ys(or,{optional:!0})],Gd.prototype,"dimOpacity",2),S([Ys(er,{optional:!0})],Gd.prototype,"enabled",2);var Vd=class extends Ct{constructor(){super(...arguments),this.color="black"}};S([Ys(vr,{optional:!0})],Vd.prototype,"color",2);var Bd=class extends Ct{constructor(){super(...arguments),this.item=new Fd,this.series=new Gd,this.text=new Vd}};S([Ys(Qs)],Bd.prototype,"item",2),S([Ys(Qs)],Bd.prototype,"series",2),S([Ys(Qs)],Bd.prototype,"text",2);var Hd=class extends Ct{constructor(){super(...arguments),this.visible=!0,this.showInLegend=!0,this.cursor="default",this.nodeClickRange="exact",this.highlightStyle=new Bd}};S([Ys(ir,{optional:!0})],Hd.prototype,"id",2),S([Ys(er)],Hd.prototype,"visible",2),S([Ys(er)],Hd.prototype,"showInLegend",2),S([Ys(ir)],Hd.prototype,"cursor",2),S([Ys(_r)],Hd.prototype,"nodeClickRange",2),S([Ys(Qs)],Hd.prototype,"highlightStyle",2);var zd={x:["xKey"],y:["yKey"]},Ud={x:["xName"],y:["yName"]},Wd=class extends Xh{constructor(e,t,i,n){super(e,t,i,n),this.xKey=n.properties.xKey,this.yKey=n.properties.yKey}},jd=class extends Hd{};S([Ys(ir,{optional:!0})],jd.prototype,"legendItemName",2);var Kd=class extends _d{constructor(e){var t=e,{pathsPerSeries:i=1,hasMarkers:n=!1,hasHighlightedLabels:s=!1,pathsZIndexSubOrderOffset:r=[],datumSelectionGarbageCollection:o=!0,markerSelectionGarbageCollection:a=!0,animationAlwaysUpdateSelections:l=!1,animationResetFns:c,directionKeys:h,directionNames:d}=t,u=C(t,["pathsPerSeries","hasMarkers","hasHighlightedLabels","pathsZIndexSubOrderOffset","datumSelectionGarbageCollection","markerSelectionGarbageCollection","animationAlwaysUpdateSelections","animationResetFns","directionKeys","directionNames"]);if(super(v({directionKeys:h,directionNames:d,canHaveAxes:!0},u)),this.NodeEvent=Wd,this.dataNodeGroup=this.contentGroup.appendChild(new Mo({name:`${this.id}-series-dataNodes`,zIndex:4,zIndexSubOrder:this.getGroupZIndexSubOrder("data")})),this.markerGroup=this.contentGroup.appendChild(new Mo({name:`${this.id}-series-markers`,zIndex:4,zIndexSubOrder:this.getGroupZIndexSubOrder("marker")})),this.labelGroup=this.contentGroup.appendChild(new Mo({name:`${this.id}-series-labels`,zIndex:8,zIndexSubOrder:this.getGroupZIndexSubOrder("labels")})),this.labelSelection=_a.select(this.labelGroup,Go),this.highlightSelection=_a.select(this.highlightNode,()=>this.opts.hasMarkers?this.markerFactory():this.nodeFactory()),this.highlightLabelSelection=_a.select(this.highlightLabel,Go),this.annotationSelections=new Set,this.minRectsCache={dirtyNodeData:!0},this.debug=Ln.create(),!h||!d)throw new Error(`Unable to initialise series type ${this.type}`);this.opts={pathsPerSeries:i,hasMarkers:n,hasHighlightedLabels:s,pathsZIndexSubOrderOffset:r,directionKeys:h,directionNames:d,animationResetFns:c,animationAlwaysUpdateSelections:l,datumSelectionGarbageCollection:o,markerSelectionGarbageCollection:a},this.paths=[];for(let e=0;e<i;e++)this.paths[e]=new pd,this.paths[e].zIndex=4,this.paths[e].zIndexSubOrder=this.getGroupZIndexSubOrder("paths",e),this.contentGroup.appendChild(this.paths[e]);this.datumSelection=_a.select(this.dataNodeGroup,()=>this.nodeFactory(),o),this.markerSelection=_a.select(this.markerGroup,()=>this.markerFactory(),a),this.animationState=new ya("empty",{empty:{update:{target:"ready",action:e=>this.animateEmptyUpdateReady(e)},reset:"empty",skip:"ready",disable:"disabled"},ready:{updateData:"waiting",clear:"clearing",highlight:e=>this.animateReadyHighlight(e),highlightMarkers:e=>this.animateReadyHighlightMarkers(e),resize:e=>this.animateReadyResize(e),reset:"empty",skip:"ready",disable:"disabled"},waiting:{update:{target:"ready",action:e=>this.animateWaitingUpdateReady(e)},reset:"empty",skip:"ready",disable:"disabled"},disabled:{update:e=>this.resetAllAnimation(e),reset:"empty"},clearing:{update:{target:"empty",action:e=>this.animateClearingUpdateEmpty(e)},reset:"empty",skip:"ready"}},()=>this.checkProcessedDataAnimatable())}get contextNodeData(){return this._contextNodeData}getNodeData(){var e;return null==(e=this.contextNodeData)?void 0:e.nodeData}resetAnimation(e){"initial"===e?this.animationState.transition("reset"):"ready"===e?this.animationState.transition("skip"):"disabled"===e&&this.animationState.transition("disable")}addChartEventListeners(){this.destroyFns.push(this.ctx.chartEventManager.addListener("legend-item-click",e=>this.onLegendItemClick(e)),this.ctx.chartEventManager.addListener("legend-item-double-click",e=>this.onLegendItemDoubleClick(e)))}destroy(){super.destroy(),this._contextNodeData=void 0}update(e){return x(this,arguments,function*({seriesRect:e}){var t,i;const{visible:n,_contextNodeData:s}=this,r=(null==(i=null==(t=this.ctx.highlightManager)?void 0:t.getActiveHighlight())?void 0:i.series)===this,o=this.checkResize(e),a=yield this.updateHighlightSelection(r);yield this.updateSelections(n),yield this.updateNodes(a,r,n);const l=this.getAnimationData(e,s);l&&(o&&this.animationState.transition("resize",l),this.animationState.transition("update",l))})}updateSelections(e){return x(this,null,function*(){var t;const i=!this.opts.animationAlwaysUpdateSelections&&this.ctx.animationManager.isSkipped();if((e||!i)&&(this.nodeDataRefresh||this.isPathOrSelectionDirty())){if(this.nodeDataRefresh){this.nodeDataRefresh=!1,this.debug("CartesianSeries.updateSelections() - calling createNodeData() for",this.id),this.markQuadtreeDirty(),this._contextNodeData=yield this.createNodeData();const e=this.isProcessedDataAnimatable();this._contextNodeData&&(null!=(t=this._contextNodeData).animationValid||(t.animationValid=e)),this.minRectsCache.dirtyNodeData=!0;const{dataModel:i,processedData:n}=this;void 0!==i&&void 0!==n&&this.dispatch("data-update",{dataModel:i,processedData:n})}yield this.updateSeriesSelections()}})}updateSeriesSelections(e){return x(this,null,function*(){const{datumSelection:t,labelSelection:i,markerSelection:n,paths:s}=this,r=this._contextNodeData;if(!r)return;const{nodeData:o,labelData:a,itemId:l}=r;yield this.updatePaths({seriesHighlighted:e,itemId:l,contextData:r,paths:s}),this.datumSelection=yield this.updateDatumSelection({nodeData:o,datumSelection:t}),this.labelSelection=yield this.updateLabelSelection({labelData:a,labelSelection:i}),this.opts.hasMarkers&&(this.markerSelection=yield this.updateMarkerSelection({nodeData:o,markerSelection:n}))})}markerFactory(){return new(Od())}getGroupZIndexSubOrder(e,t=0){var i;const n=super.getGroupZIndexSubOrder(e,t);if("paths"===e){const[e]=n,s=null!=(i=this.opts.pathsZIndexSubOrderOffset[t])?i:0;n[0]=Ve(e)?()=>Number(e())+s:Number(e)+s}return n}updateNodes(e,t,i){return x(this,null,function*(){var n;const{highlightSelection:s,highlightLabelSelection:r,opts:{hasMarkers:o,hasHighlightedLabels:a}}=this,l=!this.ctx.animationManager.isSkipped(),c=this.visible&&null!=this._contextNodeData&&i;this.rootGroup.visible=l||c,this.contentGroup.visible=l||c,this.highlightGroup.visible=(l||c)&&t;const h=this.getOpacity();o?(yield this.updateMarkerNodes({markerSelection:s,isHighlight:!0}),this.animationState.transition("highlightMarkers",s)):(yield this.updateDatumNodes({datumSelection:s,isHighlight:!0}),this.animationState.transition("highlight",s)),a&&(yield this.updateLabelNodes({labelSelection:r}));const{dataNodeGroup:d,markerGroup:u,datumSelection:p,labelSelection:g,markerSelection:f,paths:m,labelGroup:v}=this,{itemId:y}=null!=(n=this.contextNodeData)?n:{};d.opacity=h,d.visible=l||c,v.visible=c,o&&(u.opacity=h,u.zIndex=d.zIndex>=4?d.zIndex:d.zIndex+1,u.visible=c),v&&(v.opacity=h),yield this.updatePathNodes({seriesHighlighted:t,itemId:y,paths:m,opacity:h,visible:c,animationEnabled:l}),d.visible&&(yield this.updateDatumNodes({datumSelection:p,highlightedItems:e,isHighlight:!1}),yield this.updateLabelNodes({labelSelection:g}),o&&(yield this.updateMarkerNodes({markerSelection:f,isHighlight:!1})))})}getHighlightLabelData(e,t){const i=e.filter(e=>e.datum===t.datum&&e.itemId===t.itemId);return 0===i.length?void 0:i}getHighlightData(e,t){return t?[t]:void 0}updateHighlightSelection(e){return x(this,null,function*(){var t;const{highlightSelection:i,highlightLabelSelection:n,_contextNodeData:s}=this;if(!s)return;const r=null==(t=this.ctx.highlightManager)?void 0:t.getActiveHighlight(),o=e&&(null==r?void 0:r.datum)?r:void 0;let a,l;if(null!=o){const e=this.isLabelEnabled(),{labelData:t,nodeData:i}=s;l=this.getHighlightData(i,o),a=e?this.getHighlightLabelData(t,o):void 0}return this.highlightSelection=yield this.updateHighlightSelectionItem({items:l,highlightSelection:i}),this.highlightLabelSelection=yield this.updateHighlightSelectionLabel({items:a,highlightLabelSelection:n}),l})}markQuadtreeDirty(){this.quadtree=void 0}*datumNodesIter(){for(const{node:e}of this.datumSelection)!0!==e.datum.missing&&(yield e)}getQuadTree(){if(void 0===this.quadtree){const{width:e,height:t}=this.ctx.scene.canvas,i=new is(0,0,e,t);this.quadtree=new gd(100,10,i),this.initQuadTree(this.quadtree)}return this.quadtree}initQuadTree(e){}pickNodeExactShape(e){var t;const i=super.pickNodeExactShape(e);if(i)return i;const{x:n,y:s}=e,{opts:{hasMarkers:r}}=this;let o;const{dataNodeGroup:a,markerGroup:l}=this;if(o=a.pickNode(n,s),!o&&r&&(o=null==l?void 0:l.pickNode(n,s)),o&&!0!==o.datum.missing)return{datum:o.datum,distance:0};for(const i of this.moduleMap.modules()){const{datum:n}=null!=(t=i.pickNodeExact(e))?t:{};if(null!=n&&!0!==(null==n?void 0:n.missing))return{datum:n,distance:0}}}pickNodeClosestDatum(e){var t,i;const{x:n,y:s}=e,{axes:r,rootGroup:o,_contextNodeData:a}=this;if(!a)return;const l=r.x,c=r.y,h=o.transformPoint(n,s);let d,u=1/0;for(const e of a.nodeData){const{point:{x:t=NaN,y:i=NaN}={}}=e;if(isNaN(t)||isNaN(i))continue;if(!(null==l?void 0:l.inRange(t))||!(null==c?void 0:c.inRange(i)))continue;const n=Math.max(f(h.x-t,2)+f(h.y-i,2),0);n<u&&(u=n,d=e)}for(const t of this.moduleMap.modules()){const i=t.pickNodeNearest(e);if(void 0!==i&&i.distanceSquared<u){u=i.distanceSquared,d=i.datum;break}}return d?{datum:d,distance:Math.max(Math.sqrt(u)-(null!=(i=null==(t=d.point)?void 0:t.size)?i:0),0)}:void 0}pickNodeMainAxisFirst(e,t){var i,n,s,r;const{x:o,y:a}=e,{axes:l,rootGroup:c,_contextNodeData:h}=this;if(!h)return;const d=l.x,u=l.y,p=[d,u].filter(e=>e instanceof Il).map(e=>e.direction);if(t&&0===p.length)return;const[g="x"]=p,m=c.transformPoint(o,a),v="x"===g?[m.x,m.y]:[m.y,m.x],y=[1/0,1/0];let C;for(const e of h.nodeData){const{x:t=NaN,y:s=NaN}=null!=(n=null!=(i=e.point)?i:e.midPoint)?n:{};if(isNaN(t)||isNaN(s)||!0===e.missing)continue;if(!(null==d?void 0:d.inRange(t))||!(null==u?void 0:u.inRange(s)))continue;const r="x"===g?[t,s]:[s,t];let o=!0;for(let e=0;e<r.length;e++){const t=Math.abs(r[e]-v[e]);if(t>y[e]){o=!1;break}t<y[e]&&(y[e]=t,y.fill(1/0,e+1,y.length))}o&&(C=e)}if(C){let t=Math.max(f(y[0],2)+f(y[1],2)-(null!=(r=null==(s=C.point)?void 0:s.size)?r:0),0);for(const i of this.moduleMap.modules()){const n=i.pickNodeMainAxisFirst(e);if(void 0!==n&&n.distanceSquared<t){C=n.datum,t=n.distanceSquared;break}}return{datum:C,distance:Math.sqrt(t)}}}onLegendItemClick(e){const{legendItemName:t}=this.properties,{enabled:i,itemId:n,series:s}=e,r=null!=t&&t===e.legendItemName;(s.id===this.id||r)&&this.toggleSeriesItem(n,i)}onLegendItemDoubleClick(e){const{enabled:t,itemId:i,series:n,numVisibleItems:s}=e,{legendItemName:r}=this.properties,o=null!=r&&r===e.legendItemName;n.id===this.id||o||t&&1===s?this.toggleSeriesItem(i,!0):this.toggleSeriesItem(i,!1)}isPathOrSelectionDirty(){return!1}getLabelData(){return[]}shouldFlipXY(){return!1}getMinRects(e,t){const{dirtyNodeData:i,sizeCache:n,minRect:s,minVisibleRect:r}=this.minRectsCache,o=JSON.stringify({width:e,height:t});if(o===n&&!i&&s&&r)return{minRect:s,minVisibleRect:r};const a=this.computeMinRects(e,t);return this.minRectsCache={dirtyNodeData:!1,sizeCache:o,minRect:null==a?void 0:a.minRect,minVisibleRect:null==a?void 0:a.minVisibleRect},a}computeMinRects(e,t){var i,n;const s=this._contextNodeData;if(!(null==s?void 0:s.nodeData.length))return;const{nodeData:r}=s,o=Array(r.length),a=Array(r.length);for(const[e,{midPoint:t}]of r.entries())o[e]=null!=(i=null==t?void 0:t.x)?i:0,a[e]=null!=(n=null==t?void 0:t.y)?n:0;let l,c,h,d;o.sort((e,t)=>e-t),a.sort((e,t)=>e-t);let u=0,p=0;for(let i=1;i<r.length;i++)o[i]>=0&&(null!=l||(l=i)),o[i]>e&&(null!=c||(c=i)),a[i]>=0&&(null!=h||(h=i)),a[i]>t&&(null!=d||(d=i)),u=Math.max(u,o[i]-o[i-1]),p=Math.max(p,a[i]-a[i-1]);null!=c||(c=r.length),null!=d||(d=r.length);const g=null!=l&&null!=c?o.slice(l,c):[],f=null!=h&&null!=d?a.slice(h,d):[];let m=0,v=0;for(let e=1;e<Math.max(g.length,f.length);e++){const t=g[e],i=g[e-1],n=f[e],s=f[e-1];null!=t&&null!=i&&(m=Math.max(m,t-i)),null!=n&&null!=s&&(v=Math.max(v,n-s))}return{minRect:new is(0,0,u,p),minVisibleRect:new is(0,0,m,v)}}updateHighlightSelectionItem(e){const{opts:{hasMarkers:t}}=this,{items:i,highlightSelection:n}=e,s=null!=i?i:[];if(t){const e=n;return this.updateMarkerSelection({nodeData:s,markerSelection:e})}return this.updateDatumSelection({nodeData:s,datumSelection:n})}updateHighlightSelectionLabel(e){var t;return this.updateLabelSelection({labelData:null!=(t=e.items)?t:[],labelSelection:e.highlightLabelSelection})}updateDatumSelection(e){return x(this,null,function*(){return e.datumSelection})}updateDatumNodes(e){return x(this,null,function*(){})}updateMarkerSelection(e){return x(this,null,function*(){return e.markerSelection})}updateMarkerNodes(e){return x(this,null,function*(){})}updatePaths(e){return x(this,null,function*(){e.paths.forEach(e=>e.visible=!1)})}updatePathNodes(e){return x(this,null,function*(){const{paths:t,opacity:i,visible:n}=e;for(const e of t)e.opacity=i,e.visible=n})}resetAllAnimation(e){var t,i,n;const{path:s,datum:r,label:o,marker:a}=null!=(i=null==(t=this.opts)?void 0:t.animationResetFns)?i:{};this.ctx.animationManager.stopByAnimationGroupId(this.id),s&&e.paths.forEach(e=>{va([e],s)}),r&&va([e.datumSelection],r),o&&va([e.labelSelection],o),a&&this.opts.hasMarkers&&va([e.markerSelection],a),!1===(null==(n=e.contextData)?void 0:n.animationValid)&&this.ctx.animationManager.skipCurrentBatch()}animateEmptyUpdateReady(e){this.ctx.animationManager.skipCurrentBatch(),this.resetAllAnimation(e)}animateWaitingUpdateReady(e){this.ctx.animationManager.skipCurrentBatch(),this.resetAllAnimation(e)}animateReadyHighlight(e){var t,i;const{datum:n}=null!=(i=null==(t=this.opts)?void 0:t.animationResetFns)?i:{};n&&va([e],n)}animateReadyHighlightMarkers(e){var t,i;const{marker:n}=null!=(i=null==(t=this.opts)?void 0:t.animationResetFns)?i:{};n&&va([e],n)}animateReadyResize(e){this.resetAllAnimation(e)}animateClearingUpdateEmpty(e){this.ctx.animationManager.skipCurrentBatch(),this.resetAllAnimation(e)}animationTransitionClear(){const e=this.getAnimationData();e&&this.animationState.transition("clear",e)}getAnimationData(e,t){const{_contextNodeData:i}=this;if(i)return{datumSelection:this.datumSelection,markerSelection:this.markerSelection,labelSelection:this.labelSelection,annotationSelections:[...this.annotationSelections],contextData:i,previousContextData:t,paths:this.paths,seriesRect:e}}calculateScaling(){const e={};for(const t of Object.values($r)){const i=this.axes[t];if(i)if(i.scale instanceof Oa){const{range:n,domain:s}=i.scale;e[t]={type:"log",convert:e=>i.scale.convert(e),domain:[s[0],s[1]],range:[n[0],n[1]]}}else if(i.scale instanceof Zr){const{range:n}=i.scale,s=i.scale.getDomain();e[t]={type:"continuous",domain:[s[0],s[1]],range:[n[0],n[1]]}}else if(i.scale){const{domain:n}=i.scale;e[t]={type:"category",domain:n,range:n.map(e=>i.scale.convert(e))}}}return e}},$d=["top","right","bottom","left"],Yd=class e extends od{constructor(e,t){super(e,t),this.paired=!0,this.firstSeriesTranslation=!0,this._lastCrossLineIds=void 0,this._lastAxisWidths={top:0,bottom:0,left:0,right:0},this._lastClipSeries=!1,this._lastVisibility={crossLines:!0,series:!0}}onAxisChange(e,t){super.onAxisChange(e,t),this.zoomManager.updateAxes(e)}destroySeries(e){super.destroySeries(e),this.firstSeriesTranslation=!0}performLayout(){return x(this,null,function*(){const t=yield w(e.prototype,this,"performLayout").call(this),{firstSeriesTranslation:i,seriesRoot:n,annotationRoot:s,highlightRoot:r}=this,{animationRect:o,seriesRect:a,visibility:l,clipSeries:c}=this.updateAxes(t);this.seriesRoot.visible=l.series,this.seriesRect=a,this.animationRect=o;const{x:h,y:d}=a;if(i){for(const e of[n,s,r])e.translationX=Math.floor(h),e.translationY=Math.floor(d);this.firstSeriesTranslation=!1}else{const{translationX:e,translationY:t}=n;Ps(this.id,"seriesRect",this.ctx.animationManager,[n,r,s],{translationX:e,translationY:t},{translationX:Math.floor(h),translationY:Math.floor(d)},{phase:"update"})}const u=a.clone().grow(this.seriesArea.padding);this.hoverRect=u;const p=this.seriesArea.clip||c?u:void 0;n.setClipRectInGroupCoordinateSpace(p),r.setClipRectInGroupCoordinateSpace(p),s.setClipRectInGroupCoordinateSpace(p),this.ctx.layoutService.dispatchLayoutComplete({type:"layout-complete",chart:{width:this.ctx.scene.width,height:this.ctx.scene.height},clipSeries:c,series:{rect:a,paddedRect:u,visible:l.series,shouldFlipXY:this.shouldFlipXY()},axes:this.axes.map(e=>v({id:e.id},e.getLayoutState()))});const g=this.modulesManager.mapModules(e=>{var t;return null==(t=e.performCartesianLayout)?void 0:t.call(e,{seriesRect:a})});return yield Promise.all(g),t})}updateAxes(e){var t;const i=this.axes.flatMap(e=>{var t;return null!=(t=e.crossLines)?t:[]}).map(e=>e.id);let n,s,r;null!=this._lastCrossLineIds&&this._lastCrossLineIds.length===i.length&&this._lastCrossLineIds.every((e,t)=>i[t]===e)?(n=v({},this._lastAxisWidths),s=this._lastClipSeries,r=v({},this._lastVisibility)):(n={top:0,bottom:0,left:0,right:0},s=!1,r={crossLines:!0,series:!0},this._lastCrossLineIds=i);const o=new Set(this.axes.map(e=>e.position));for(const e of Object.keys(n))o.has(e)||delete n[e];const a=(e,t,i)=>!Object.keys(e).some(e=>null==n[e])&&r.crossLines===i.crossLines&&r.series===i.series&&Object.entries(n).every(([t,i])=>{const n=e[t];return null==i&&null==n||i===n})&&s===t,l=e=>Je(e,e=>e&&Math.abs(e)===1/0?0:null!=e?Math.ceil(e):e);let c={},h={},d=!1,u=null==(t=this.seriesRect)?void 0:t.clone(),p=0,g={};do{Object.assign(n,c),s=d,Object.assign(r,h);const t=this.updateAxesPass(n,e.clone(),u);if(c=l(t.axisWidths),h=t.visibility,d=t.clipSeries,u=t.seriesRect,g=t.primaryTickCounts,p++>10){_.warn("unable to find stable axis layout.");break}}while(!a(c,d,h));return this.axes.forEach(e=>{e.update(g[e.direction])}),this.axes.forEach(t=>{if(t.setCrossLinesVisible(r.crossLines),u)switch(t.clipGrid(u.x,u.y,u.width+5,u.height+5),t.position){case"left":case"right":t.clipTickLines(e.x,u.y,e.width+5,u.height+5);break;case"top":case"bottom":t.clipTickLines(u.x,e.y,u.width+5,e.height+5)}}),this._lastAxisWidths=n,this._lastVisibility=r,{seriesRect:u,animationRect:e,visibility:r,clipSeries:s}}updateAxesPass(e,t,i){const n={},s={},r={series:!0,crossLines:!0};let o=!1;const a={},l=this.applySeriesPadding(t),c=i?this.buildCrossLinePadding(e):{},h=this.buildAxisBound(l,e,c,r),d=this.buildSeriesRect(h,e);return this.axes.forEach(t=>{var i,r;const{position:c="left"}=t,{clipSeries:u,axisThickness:p,axisOffset:g}=this.calculateAxisDimensions({axis:t,seriesRect:d,paddedBounds:l,axisWidths:e,newAxisWidths:s,primaryTickCounts:a,clipSeries:o,addInterAxisPadding:(null!=(i=n[c])?i:0)>0});n[c]=(null!=(r=n[c])?r:0)+1,o=o||u,this.positionAxis({axis:t,axisBound:h,axisOffset:g,axisThickness:p,axisWidths:e,primaryTickCounts:a,seriesRect:d})}),{clipSeries:o,seriesRect:d,axisWidths:s,visibility:r,primaryTickCounts:a}}buildCrossLinePadding(e){var t;const i={};this.axes.forEach(e=>{e.crossLines&&e.crossLines.forEach(e=>{var t;null==(t=e.calculatePadding)||t.call(e,i)})});for(const[n,s=0]of Object.entries(i))i[n]=Math.max(s-(null!=(t=e[n])?t:0),0);return i}applySeriesPadding(e){const t=e.clone(),i=this.axes.slice().reverse();return $d.forEach(e=>{const n=this.seriesArea.padding[e],s=i.find(t=>t.position===e);s?s.seriesAreaPadding=n:t.shrink(n,e)}),t}buildAxisBound(e,t,i,n){var s,r,o,a;const l=e.clone(),{top:c=0,right:h=0,bottom:d=0,left:u=0}=i,p=u+h,g=c+d,f=(null!=(s=t.left)?s:0)+(null!=(r=t.right)?r:0)+p,m=(null!=(o=t.top)?o:0)+(null!=(a=t.bottom)?a:0)+g;return l.width<=f||l.height<=m?(n.crossLines=!1,n.series=!1,l):(l.x+=u,l.y+=c,l.width-=p,l.height-=g,l)}buildSeriesRect(e,t){const i=e.clone(),{top:n,bottom:s,left:r,right:o}=t;return i.x+=null!=r?r:0,i.y+=null!=n?n:0,i.width-=(null!=r?r:0)+(null!=o?o:0),i.height-=(null!=n?n:0)+(null!=s?s:0),i.width=Math.max(0,i.width),i.height=Math.max(0,i.height),i}clampToOutsideSeriesRect(e,t,i,n){const{x:s,y:r,width:o,height:a}=e,l=[s,r,s+o,r+a][("x"===i?0:1)+(1===n?0:2)];return(1===n?Math.min:Math.max)(t,l)}calculateAxisDimensions(e){var t,i,n;const{axis:s,seriesRect:r,paddedBounds:o,axisWidths:a,newAxisWidths:l,primaryTickCounts:c,addInterAxisPadding:h}=e;let{clipSeries:d}=e;const{position:u="left",direction:p}=s,g=s instanceof Il||s instanceof Bl,f="left"===u||"right"===u,m=null!=(t=l[u])?t:0,{min:v,max:y}=this.ctx.zoomManager.getAxisZoom(s.id);f?(g?(s.range=[0,r.height],s.visibleRange=[1-y,1-v]):(s.range=[r.height,0],s.visibleRange=[v,y]),s.gridLength=r.width):(s.range=[0,r.width],s.visibleRange=[v,y],s.gridLength=r.height);let C=s.nice?c[p]:void 0;const b="y"===p;s.thickness?s.maxThickness=s.thickness:s.maxThickness=.3*(b?o.width:o.height);const S=s.calculateLayout(C);let w;if(C=S.primaryTickCount,null!=c[p]||(c[p]=C),d||(d=s.dataDomain.clipped||s.visibleRange[0]>0||s.visibleRange[1]<1),null!=s.thickness&&s.thickness>0)w=s.thickness;else{const{bbox:e}=S;w=b?e.width:e.height}return h&&(w+=15),w=Math.ceil(w),l[u]=(null!=(i=l[u])?i:0)+w,s.gridPadding=(null!=(n=a[u])?n:0)-l[u],{clipSeries:d,axisThickness:w,axisOffset:m,primaryTickCount:C}}positionAxis(e){var t,i,n,s;const{axis:r,axisBound:o,axisWidths:a,seriesRect:l,axisOffset:c,axisThickness:h}=e,{position:d}=r;switch(d){case"top":r.translation.x=o.x+(null!=(t=a.left)?t:0),r.translation.y=this.clampToOutsideSeriesRect(l,o.y+1+c+h,"y",1);break;case"bottom":r.translation.x=o.x+(null!=(i=a.left)?i:0),r.translation.y=this.clampToOutsideSeriesRect(l,o.y+o.height+1-h-c,"y",-1);break;case"left":r.translation.y=o.y+(null!=(n=a.top)?n:0),r.translation.x=this.clampToOutsideSeriesRect(l,o.x+c+h,"x",1);break;case"right":r.translation.y=o.y+(null!=(s=a.top)?s:0),r.translation.x=this.clampToOutsideSeriesRect(l,o.x+o.width-h-c,"x",-1)}r.updatePosition({rotation:Bs(r.rotation),sideFlag:r.label.getSideFlag()})}shouldFlipXY(){return!this.series.some(e=>!(e instanceof Kd&&e.shouldFlipXY()))}};Yd.className="CartesianChart",Yd.type="cartesian";var qd=Yd,Xd=class e{static isInstance(t){var i;return t instanceof e||"AgChartInstanceProxy"===(null==(i=t.constructor)?void 0:i.name)&&null!=t.chart||null!=t.chart&&this.validateImplementation(t)}static validateImplementation(e){var t;const i=Object.keys(null!=(t=Object.getPrototypeOf(e))?t:{});return["getOptions","destroy"].every(e=>i.includes(e))}constructor(e){this.chart=e}getOptions(){return Et(this.chart.getOptions())}resetAnimations(){this.chart.resetAnimations()}skipAnimations(){this.chart.skipAnimations()}destroy(){this.chart.destroy()}};Xd.chartInstances=new WeakMap,S([Za({oldValue(e){Xd.chartInstances.delete(e)},newValue(e){Xd.chartInstances.set(e,this)}})],Xd.prototype,"chart",2);var Zd=Xd,Qd=class extends Zr{constructor(){super([0,1],[0,1]),this.type="number"}toDomain(e){return e}ticks(){var e;const t=null!=(e=this.tickCount)?e:Zr.defaultTickCount;if(!this.domain||this.domain.length<2||t<1||this.domain.some(e=>!isFinite(e)))return[];this.refresh();const[i,n]=this.getDomain(),{interval:s}=this;if(s){const e=Math.abs(s);if(!mo({start:i,stop:n,interval:e,availableRange:this.getPixelRange()}))return fo(i,n,e)}return uo(i,n,t,this.minTickCount,this.maxTickCount)}update(){!this.domain||this.domain.length<2||this.nice&&this.updateNiceDomain()}getTickStep(e,t){var i,n;const s=null!=(i=this.tickCount)?i:Zr.defaultTickCount;return null!=(n=this.interval)?n:go(e,t,s,this.minTickCount,this.maxTickCount)}updateNiceDomain(){var e;const t=null!=(e=this.tickCount)?e:Zr.defaultTickCount;if(t<1)return void(this.niceDomain=[...this.domain]);let[i,n]=this.domain;if(1===t)[i,n]=function(e,t){const i=Math.abs(t-e),n=Math.floor(Math.log10(i)),s=Math.pow(10,n),r=e>t?Math.ceil:Math.floor,o=t<e?Math.floor:Math.ceil;return po.map(n=>{const a=n*s,l=r(e/a)*a,c=o(t/a)*a;return{error:1-i/Math.abs(c-l),domain:[l,c]}}).sort((e,t)=>e.error-t.error)[0].domain}(i,n);else{const e=i>n?Math.ceil:Math.floor,t=n<i?Math.floor:Math.ceil,s=4;for(let r=0;r<s;r++){const s=i,r=n,o=this.getTickStep(i,n),[a,l]=this.domain;if(o>=1)i=e(a/o)*o,n=t(l/o)*o;else{const s=1/o;i=e(a*s)/s,n=t(l*s)/s}if(i===s&&n===r)break}}this.niceDomain=[i,n]}tickFormat({ticks:e,specifier:t}){return Pa(null!=e?e:this.ticks(),t)}};var Jd=class extends Kr{constructor(){super(...arguments),this.minSpacing=NaN,this.maxSpacing=NaN}};S([Ys(Vr),$s(NaN)],Jd.prototype,"minSpacing",2),S([Ys(Br),$s(NaN)],Jd.prototype,"maxSpacing",2);var eu=class extends Tl{constructor(e,t=new Qd){super(e,t),this.min=NaN,this.max=NaN}normaliseDataDomain(e){const{min:t,max:i}=this,{extent:n,clipped:s}=un(e,t,i);return{domain:n,clipped:s}}createTick(){return new Jd}updateSecondaryAxisTicks(e){if(null==this.dataDomain)throw new Error("AG Charts - dataDomain not calculated, cannot perform tick calculation.");if(0===this.dataDomain.domain.length)return[];const[t,i]=function(e,t,i){let[n,s]=jn(e);n=function(e,t,i){const n=Math.abs(t-e)/(i-1),s=Math.floor(Math.log10(n)),r=Math.pow(10,s);return Math.floor(e/r)*r}(Math.floor(n),s,t);const r=function(e,t,i){return function(e){const t=Math.floor(Math.log10(e)),i=Math.pow(10,t),n=e/i*10;return n>0&&n<=1?i/10:n>1&&n<=2?2*i/10:n>1&&n<=5?5*i/10:n>5&&n<=10?10*i/10:n>10&&n<=20?20*i/10:n>20&&n<=40?40*i/10:n>40&&n<=50?50*i/10:n>50&&n<=100?100*i/10:n}((t-e)/(i-1))}(n,s,t);s=n+(t-1)*r;const o=i?[s,n]:[n,s],a=function(e,t,i){const n=Math.floor(Math.log10(t)),s=t>0&&t<1?Math.abs(n):0,r=Math.pow(10,s),o=ho(s);for(let n=0;n<i;n++){const i=e+t*n;o[n]=Math.round(i*r)/r}return o}(n,r,t);return[o,a]}(this.dataDomain.domain,null!=e?e:0,this.reverse);return this.scale.nice=!1,this.scale.domain=t,this.scale.update(),i}formatDatum(e){return"number"==typeof e?e.toFixed(2):String(e)}};eu.className="NumberAxis",eu.type="number",S([Ys(Xs(lr,ur("max"))),$s(NaN)],eu.prototype,"min",2),S([Ys(Xs(lr,pr("min"))),$s(NaN)],eu.prototype,"max",2);var tu=Hr(e=>We(e)&&0!==e,"a non-zero number"),iu=class extends eu{constructor(e){super(e,new Oa),this.min=NaN,this.max=NaN}normaliseDataDomain(e){const{min:t,max:i}=this,{extent:n,clipped:s}=un(e,t,i),r=n[0]>n[1],o=n[0]<0&&n[1]>0,a=0===n[0]&&0===n[1];return(r||o||a)&&(o?_.warn("the data domain crosses zero, the chart data cannot be rendered. See log axis documentation for more information."):a&&_.warn("the data domain has 0 extent, no data is rendered.")),0===n[0]&&(n[0]=1),0===n[1]&&(n[1]=-1),{domain:n,clipped:s}}set base(e){this.scale.base=e}get base(){return this.scale.base}};iu.className="LogAxis",iu.type="log",S([Ys(Xs(lr,tu,ur("max"))),$s(NaN)],iu.prototype,"min",2),S([Ys(Xs(lr,tu,pr("min"))),$s(NaN)],iu.prototype,"max",2);var nu=class extends Kr{constructor(){super(...arguments),this.minSpacing=NaN,this.maxSpacing=NaN}};S([Ys(Vr),$s(NaN)],nu.prototype,"minSpacing",2),S([Ys(Br),$s(NaN)],nu.prototype,"maxSpacing",2);var su=class extends Tl{constructor(e){super(e,new yo),this.min=void 0,this.max=void 0,this.refreshScale()}normaliseDataDomain(e){var t;let{min:i,max:n}=this,s=!1;return"number"==typeof i&&(i=new Date(i)),"number"==typeof n&&(n=new Date(n)),e.length>2&&(e=(null!=(t=hn(e))?t:[0,1e3]).map(e=>new Date(e))),i instanceof Date&&(s||(s=i>e[0]),e=[i,e[1]]),n instanceof Date&&(s||(s=n<e[1]),e=[e[0],n]),e[0]>e[1]&&(e=[]),{domain:e,clipped:s}}createTick(){return new nu}onLabelFormatChange(e,t,i){i?super.onLabelFormatChange(e,t,i):this.labelFormatter=this.scale.tickFormat({ticks:e,domain:t})}calculatePadding(){return[0,0]}formatDatum(e){var t;const i=this.scale.tickFormat({specifier:"%m/%d/%y, %H:%M:%S"});return null!=(t=this.moduleCtx.callbackCache.call(i,e))?t:String(e)}};su.className="TimeAxis",su.type="time",S([Ys(Xs(fr,ur("max")),{optional:!0})],su.prototype,"min",2),S([Ys(Xs(fr,pr("min")),{optional:!0})],su.prototype,"max",2);var ru=1e-6,ou=(e,t,i,n,s)=>{let r=!1,o=!1,a=n-Math.sqrt(Math.max(f(s,2)-f(i,2),0)),l=0,c=0,h=i-Math.sqrt(Math.max(f(s,2)-f(n,2),0));return a>e?(r=!0,a=e,l=i-Math.sqrt(Math.max(f(s,2)-f(n-e,2)))):a<ru&&(a=0),h>t?(o=!0,c=n-Math.sqrt(Math.max(f(s,2)-f(i-t,2))),h=t):h<ru&&(h=0),{leading0:a,leading1:l,trailing0:c,trailing1:h,leadingClipped:r,trailingClipped:o}},au=(e,{x0:t,y0:i,x1:n,y1:s,cx:r,cy:o},a,l)=>{if(l&&e.moveTo(t,i),t!==n||i!==s){const l=Math.atan2(i-o,t-r),c=Math.atan2(s-o,n-r);e.arc(r,o,a,l,c)}else e.lineTo(t,i)},lu=(e,t,i,n,s,r,o)=>{let{topLeft:a,topRight:l,bottomRight:c,bottomLeft:h}=r;const d=Math.max(a+h,l+c),u=Math.max(a+l,h+c);if(d<=0&&u<=0)return void(null==o?e.rect(t,i,n,s):e.rect(o.x,o.y,o.width,o.height));if(null==o&&a===l&&a===c&&a===h)return void e.roundRect(t,i,n,s,a);if(n<0&&(t+=n,n=Math.abs(n)),s<0&&(i+=s,s=Math.abs(s)),n<=0||s<=0)return;if(null==o)o=new is(t,i,n,s);else{const e=Math.max(t,o.x),r=Math.min(t+n,o.x+o.width),a=Math.max(i,o.y),l=Math.min(i+s,o.y+o.height);o=new is(e,a,r-e,l-a)}const p=Math.max(d/s,u/n,1);p>1&&(a/=p,l/=p,c/=p,h/=p);let g,f,m,v,y=!0,C=!0,b=!0,S=!0;if(y){const e=ou(o.height,o.width,Math.max(t+a-o.x,0),Math.max(i+a-o.y,0),a);e.leadingClipped&&(S=!1),e.trailingClipped&&(C=!1),g={x0:Math.max(o.x+e.leading1,o.x),y0:Math.max(o.y+e.leading0,o.y),x1:Math.max(o.x+e.trailing1,o.x),y1:Math.max(o.y+e.trailing0,o.y),cx:t+a,cy:i+a}}if(C){const e=ou(o.width,o.height,Math.max(i+l-o.y,0),Math.max(o.x+o.width-(t+n-l),0),l);e.leadingClipped&&(y=!1),e.trailingClipped&&(b=!1),f={x0:Math.min(o.x+o.width-e.leading0,o.x+o.width),y0:Math.max(o.y+e.leading1,o.y),x1:Math.min(o.x+o.width-e.trailing0,o.x+o.width),y1:Math.max(o.y+e.trailing1,o.y),cx:t+n-l,cy:i+l}}if(b){const e=ou(o.height,o.width,Math.max(o.x+o.width-(t+n-c),0),Math.max(o.y+o.height-(i+s-c),0),c);e.leadingClipped&&(C=!1),e.trailingClipped&&(S=!1),m={x0:Math.min(o.x+o.width-e.leading1,o.x+o.width),y0:Math.min(o.y+o.height-e.leading0,o.y+o.height),x1:Math.min(o.x+o.width-e.trailing1,o.x+o.width),y1:Math.min(o.y+o.height-e.trailing0,o.y+o.height),cx:t+n-c,cy:i+s-c}}if(S){const e=ou(o.width,o.height,Math.max(o.y+o.height-(i+s-h),0),Math.max(t+h-o.x,0),h);e.leadingClipped&&(b=!1),e.trailingClipped&&(y=!1),v={x0:Math.max(o.x+e.leading0,o.x),y0:Math.min(o.y+o.height-e.leading1,o.y+o.height),x1:Math.max(o.x+e.trailing0,o.x),y1:Math.min(o.y+o.height-e.trailing1,o.y+o.height),cx:t+h,cy:i+s-h}}let w=!1;y&&null!=g&&(au(e,g,a,!w),w||(w=!0)),C&&null!=f&&(au(e,f,l,!w),w||(w=!0)),b&&null!=m&&(au(e,m,c,!w),w||(w=!0)),S&&null!=v&&(au(e,v,h,!w),w||(w=!0)),e.closePath()},cu=class extends pd{constructor(){super(...arguments),this.borderPath=new dd,this.x=0,this.y=0,this.width=10,this.height=10,this.topLeftCornerRadius=0,this.topRightCornerRadius=0,this.bottomRightCornerRadius=0,this.bottomLeftCornerRadius=0,this.clipBBox=void 0,this.crisp=!1,this.lastUpdatePathStrokeWidth=Ro.defaultStyles.strokeWidth,this.effectiveStrokeWidth=Ro.defaultStyles.strokeWidth,this.hittester=super.isPointInPath,this.distanceCalculator=super.distanceSquared,this.microPixelEffectOpacity=1}set cornerRadius(e){this.topLeftCornerRadius=e,this.topRightCornerRadius=e,this.bottomRightCornerRadius=e,this.bottomLeftCornerRadius=e}isDirtyPath(){return this.lastUpdatePathStrokeWidth!==this.strokeWidth||Boolean(this.path.isDirty()||this.borderPath.isDirty())}updatePath(){var e,t,i;const{path:n,borderPath:s,crisp:r,topLeftCornerRadius:o,topRightCornerRadius:a,bottomRightCornerRadius:l,bottomLeftCornerRadius:c}=this;let{x:h,y:d,width:u,height:p,strokeWidth:g,clipBBox:f}=this;const m=1/(null!=(t=null==(e=this.layerManager)?void 0:e.canvas.pixelRatio)?t:1);let v=1;if(n.clear(!0),s.clear(!0),r&&(u<=m&&(v*=u/m),p<=m&&(v*=p/m),u=this.align(h,u),p=this.align(d,p),h=this.align(h),d=this.align(d),f=null!=f?new is(this.align(f.x),this.align(f.y),this.align(f.x,f.width),this.align(f.y,f.height)):void 0),g)if(u<m){const e=h+m/2;s.moveTo(e,d),s.lineTo(e,d+p),g=m,this.borderClipPath=void 0}else if(p<m){const e=d+m/2;s.moveTo(h,e),s.lineTo(h+u,e),g=m,this.borderClipPath=void 0}else if(g<u&&g<p){const e=g/2;h+=e,d+=e,u-=g,p-=g;const t=null==f?void 0:f.clone().shrink(e),i={topLeft:o>0?o-g:0,topRight:a>0?a-g:0,bottomRight:l>0?l-g:0,bottomLeft:c>0?c-g:0};this.borderClipPath=void 0,u>0&&p>0&&(null==t||(null==t?void 0:t.width)>0&&(null==t?void 0:t.height)>0)&&(lu(n,h,d,u,p,i,t),lu(s,h,d,u,p,i,t))}else this.borderClipPath=null!=(i=this.borderClipPath)?i:new dd,this.borderClipPath.clear(!0),this.borderClipPath.rect(h,d,u,p),s.rect(h,d,u,p);else{const e={topLeft:o,topRight:a,bottomRight:l,bottomLeft:c};this.borderClipPath=void 0,lu(n,h,d,u,p,e,f)}[o,a,l,c].every(e=>0===e)?(this.hittester=(e,t)=>{const i=this.transformPoint(e,t);return this.getCachedBBox().containsPoint(i.x,i.y)},this.distanceSquared=(e,t)=>this.getCachedBBox().distanceSquared(e,t)):(this.hittester=super.isPointInPath,this.distanceCalculator=super.distanceSquared),this.effectiveStrokeWidth=g,this.lastUpdatePathStrokeWidth=g,this.microPixelEffectOpacity=v}computeBBox(){var e;const{x:t,y:i,width:n,height:s,clipBBox:r}=this;return null!=(e=null==r?void 0:r.clone())?e:new is(t,i,n,s)}isPointInPath(e,t){return this.hittester(e,t)}get midPoint(){return{x:this.x+this.width/2,y:this.y+this.height/2}}distanceSquared(e,t){return this.distanceCalculator(e,t)}applyFillAlpha(e){const{fillOpacity:t,microPixelEffectOpacity:i,opacity:n}=this;e.globalAlpha*=n*t*i}renderStroke(e){const{stroke:t,effectiveStrokeWidth:i}=this;if(t&&i){const{globalAlpha:n}=e,{strokeOpacity:s,lineDash:r,lineDashOffset:o,lineCap:a,lineJoin:l,borderPath:c,borderClipPath:h,opacity:d,microPixelEffectOpacity:u}=this;h&&e.clip(h.getPath2D()),e.strokeStyle=t,e.globalAlpha*=d*s*u,e.lineWidth=i,r&&e.setLineDash(r),o&&(e.lineDashOffset=o),a&&(e.lineCap=a),l&&(e.lineJoin=l),e.stroke(c.getPath2D()),e.globalAlpha=n}}};cu.className="Rect",S([ud()],cu.prototype,"x",2),S([ud()],cu.prototype,"y",2),S([ud()],cu.prototype,"width",2),S([ud()],cu.prototype,"height",2),S([ud()],cu.prototype,"topLeftCornerRadius",2),S([ud()],cu.prototype,"topRightCornerRadius",2),S([ud()],cu.prototype,"bottomRightCornerRadius",2),S([ud()],cu.prototype,"bottomLeftCornerRadius",2),S([ud()],cu.prototype,"clipBBox",2),S([ud()],cu.prototype,"crisp",2);var hu=class extends xe{constructor(e){super(),this.node=new Mo({name:"background",zIndex:0}),this.rectNode=new cu,this.visible=!0,this.fill="white",this.node.appendChild(this.rectNode),this.destroyFns.push(e.scene.attachNode(this.node),e.layoutService.addListener("layout-complete",e=>this.onLayoutComplete(e)))}onLayoutComplete(e){const{width:t,height:i}=e.chart;this.rectNode.width=t,this.rectNode.height=i}};S([Ys(er),Xa("node","visible")],hu.prototype,"visible",2),S([Ys(vr,{optional:!0}),Xa("rectNode","fill")],hu.prototype,"fill",2),S([Ys(Qs,{optional:!0})],hu.prototype,"image",2);var du={type:"root",optionsKey:"background",packageType:"community",chartTypes:["cartesian","polar","hierarchy","topology"],instanceConstructor:hu};function uu({orientation:e,bboxes:t,maxHeight:i,maxWidth:n,itemPaddingY:s=0,itemPaddingX:r=0,forceResult:o=!1}){const a="horizontal"===e,l={max:a?n:i,fn:a?e=>e.width:e=>e.height,padding:a?r:s},c={max:a?i:n,fn:a?e=>e.height:e=>e.width,padding:a?s:r};let h=0;const d=[];for(;h<t.length;){const e=pu(t.slice(h),h,l,c,o);if(!e)return;h+=e.processedBBoxCount,d.push(e.pageIndices)}return function(e,t,i,n,s){let r=0,o=0;return{pages:e.map(e=>{"horizontal"===t&&(e=function(e){const t=[];for(const i of e[0])t.push([]);return e.forEach((e,i)=>{e.forEach((e,n)=>{t[n][i]=e})}),t}(e));let a=0;const l=e.map(e=>{const t=e.map(e=>(a=Math.max(e,a),i[e]));let r=0,o=0;return t.forEach(e=>{r+=e.height+n,o=Math.max(o,e.width+s)}),{indices:e,bboxes:t,columnHeight:Math.ceil(r),columnWidth:Math.ceil(o)}});let c=0,h=0;return l.forEach(e=>{c+=e.columnWidth,h=Math.max(h,e.columnHeight)}),r=Math.max(c,r),o=Math.max(h,o),{columns:l,startIndex:e[0][0],endIndex:a,pageWidth:c,pageHeight:h}}),maxPageWidth:r,maxPageHeight:o}}(d,e,t,s,r)}function pu(e,t,i,n,s){let r=function(e,t){const i=e.length;let n=0;for(let s=0;s<i;s++)if(n+=t.fn(e[s])+t.padding,n>t.max)return i/s<2?Math.ceil(i/2):s;return i}(e,i);if(r<1){if(!s)return;r=1}let o=r;for(;o>=1;){const r=gu(e,t,o,i,n,s);if(null==r&&o<=1)return;if(null!=r){if("number"!=typeof r)return{processedBBoxCount:r.length*r[0].length,pageIndices:r};if(r<=1)return;o=r<o&&r>1?r:o,o--}else o--}}function gu(e,t,i,n,s,r){var o;const a=[];let l=0,c=0,h=[];const d=[];for(let u=0;u<e.length;u++){const p=(u+i)%i;0===p&&(l+=c,c=0,h.length>0&&a.push(h),h=[]);const g=n.fn(e[u])+n.padding;d[p]=Math.max(null!=(o=d[p])?o:0,g),c=Math.max(c,s.fn(e[u])+s.padding);const f=l+c,m=!r||a.length>0;if(f>s.max&&m){h=[];break}if(d.reduce((e,t)=>e+t,0)>n.max&&!r)return d.length<i?d.length:void 0;h.push(u+t)}return h.length>0&&a.push(h),a.length>0?a:void 0}var fu=class extends Mo{constructor(){super({name:"markerLabelGroup"}),this.label=new Go,this.line=new Ba,this._marker=new Dd,this._markerSize=15,this._spacing=8;const{marker:e,label:t,line:i}=this;t.textBaseline="middle",t.fontSize=12,t.fontFamily="Verdana, sans-serif",t.fill="black",t.y=1,this.append([i,e,t]),this.update()}set marker(e){this._marker!==e&&(this.removeChild(this._marker),this._marker=e,this.appendChild(e),this.update())}get marker(){return this._marker}set markerSize(e){this._markerSize!==e&&(this._markerSize=e,this.update())}get markerSize(){return this._markerSize}set spacing(e){this._spacing!==e&&(this._spacing=e,this.update())}get spacing(){return this._spacing}setSeriesStrokeOffset(e){const t=this.marker.size/2+e;this.line.x1=-t,this.line.x2=t,this.line.y1=0,this.line.y2=0,this.line.markDirtyTransform(),this.update()}update(){const{markerSize:e}=this,t=this.marker.constructor.center;this.marker.size=e,this.marker.x=(t.x-.5)*e,this.marker.y=(t.y-.5)*e;const i=this.line.visible?this.line.x2:-1/0,n=e/2;this.label.x=Math.max(i,n)+this.spacing}render(e){this.marker.opacity=this.opacity,this.label.opacity=this.opacity,this.line.opacity=this.opacity,super.render(e)}};fu.className="MarkerLabel",S([Xa("label")],fu.prototype,"text",2),S([Xa("label")],fu.prototype,"fontStyle",2),S([Xa("label")],fu.prototype,"fontWeight",2),S([Xa("label")],fu.prototype,"fontSize",2),S([Xa("label")],fu.prototype,"fontFamily",2),S([Xa("label","fill")],fu.prototype,"color",2),S([Xa("marker","fill")],fu.prototype,"markerFill",2),S([Xa("marker","stroke")],fu.prototype,"markerStroke",2),S([Xa("marker","strokeWidth")],fu.prototype,"markerStrokeWidth",2),S([Xa("marker","fillOpacity")],fu.prototype,"markerFillOpacity",2),S([Xa("marker","strokeOpacity")],fu.prototype,"markerStrokeOpacity",2),S([Xa("marker","visible")],fu.prototype,"markerVisible",2),S([Xa("line","stroke")],fu.prototype,"lineStroke",2),S([Xa("line","strokeWidth")],fu.prototype,"lineStrokeWidth",2),S([Xa("line","strokeOpacity")],fu.prototype,"lineStrokeOpacity",2),S([Xa("line","lineDash")],fu.prototype,"lineLineDash",2),S([Xa("line","visible")],fu.prototype,"lineVisible",2);var mu=class extends Ct{constructor(){super(...arguments),this.color="black",this.fontStyle=void 0,this.fontWeight=void 0,this.fontSize=12,this.fontFamily="Verdana, sans-serif"}};S([Ys(vr)],mu.prototype,"color",2),S([Ys(Dr,{optional:!0})],mu.prototype,"fontStyle",2),S([Ys(Ir,{optional:!0})],mu.prototype,"fontWeight",2),S([Ys(rr)],mu.prototype,"fontSize",2),S([Ys(ir)],mu.prototype,"fontFamily",2);var vu=class extends Ct{constructor(){super(...arguments),this.size=15,this.fill=void 0,this.fillOpacity=void 0,this.stroke=void 0,this.strokeWidth=1,this.strokeOpacity=1}};S([Ys(rr)],vu.prototype,"size",2),S([Ys(vr,{optional:!0})],vu.prototype,"fill",2),S([Ys(or,{optional:!0})],vu.prototype,"fillOpacity",2),S([Ys(vr,{optional:!0})],vu.prototype,"stroke",2),S([Ys(rr)],vu.prototype,"strokeWidth",2),S([Ys(or)],vu.prototype,"strokeOpacity",2);var yu=class extends Ct{constructor(e){super(),this.parent=e,this.shape=Ld,this.size=15,this.padding=8}};S([Za({changeValue(){this.parent.marker===this&&this.parent.onMarkerShapeChange()}})],yu.prototype,"shape",2),S([Ys(rr)],yu.prototype,"size",2),S([Ys(rr)],yu.prototype,"padding",2);var Cu=class extends Ct{constructor(e,t,i,n){super(),this.chartUpdateCallback=e,this.pageUpdateCallback=t,this.regionManager=i,this.cursorManager=n,this.id=Bn(this),this.marker=new yu(this),this.activeStyle=new vu,this.inactiveStyle=new vu,this.highlightStyle=new vu,this.label=new mu,this.group=new Mo({name:"pagination"}),this.labelNode=new Go,this.destroyFns=[],this.totalPages=0,this.currentPage=0,this.translationX=0,this.translationY=0,this.nextButtonDisabled=!1,this.previousButtonDisabled=!1,this._visible=!0,this._enabled=!0,this._orientation="vertical",this._nextButton=new Ld,this._previousButton=new Ld,this.labelNode.setProperties({textBaseline:"middle",fontSize:12,fontFamily:"Verdana, sans-serif",fill:"black",y:1}),this.group.append([this.nextButton,this.previousButton,this.labelNode]);const s=this.regionManager.addRegion("pagination",this.group);this.destroyFns.push(s.addListener("click",e=>this.onPaginationClick(e)),s.addListener("hover",e=>this.onPaginationMouseMove(e))),this.update(),this.updateMarkers()}destroy(){this.destroyFns.forEach(e=>e())}set visible(e){this._visible=e,this.updateGroupVisibility()}get visible(){return this._visible}set enabled(e){this._enabled=e,this.updateGroupVisibility()}get enabled(){return this._enabled}updateGroupVisibility(){this.group.visible=this.enabled&&this.visible}set orientation(e){this._orientation=e,"horizontal"===e?(this.previousButton.rotation=-Math.PI/2,this.nextButton.rotation=Math.PI/2):(this.previousButton.rotation=0,this.nextButton.rotation=Math.PI)}get orientation(){return this._orientation}set nextButton(e){this._nextButton!==e&&(this.group.removeChild(this._nextButton),this._nextButton=e,this.group.appendChild(e))}get nextButton(){return this._nextButton}set previousButton(e){this._previousButton!==e&&(this.group.removeChild(this._previousButton),this._previousButton=e,this.group.appendChild(e))}get previousButton(){return this._previousButton}update(){this.updateLabel(),this.updatePositions(),this.enableOrDisableButtons()}updatePositions(){this.group.translationX=this.translationX,this.group.translationY=this.translationY,this.updateLabelPosition(),this.updateNextButtonPosition()}updateLabelPosition(){const{size:e,padding:t}=this.marker;this.nextButton.size=e,this.previousButton.size=e,this.labelNode.x=e/2+t}updateNextButtonPosition(){const e=this.labelNode.computeBBox();this.nextButton.translationX=e.x+e.width+this.marker.size/2+this.marker.padding}updateLabel(){const{currentPage:e,totalPages:t,labelNode:i,label:{color:n,fontStyle:s,fontWeight:r,fontSize:o,fontFamily:a}}=this;i.text=`${e+1} / ${t}`,i.fill=n,i.fontStyle=s,i.fontWeight=r,i.fontSize=o,i.fontFamily=a}updateMarkers(){const{nextButton:e,previousButton:t,nextButtonDisabled:i,previousButtonDisabled:n,activeStyle:s,inactiveStyle:r,highlightStyle:o,highlightActive:a}=this,l=(e,t)=>t?r:e===a?o:s;this.updateMarker(e,l("next",i)),this.updateMarker(t,l("previous",n))}updateMarker(e,t){var i;const{size:n}=this.marker;e.size=n,e.fill=t.fill,e.fillOpacity=null!=(i=t.fillOpacity)?i:1,e.stroke=t.stroke,e.strokeWidth=t.strokeWidth,e.strokeOpacity=t.strokeOpacity}enableOrDisableButtons(){const{currentPage:e,totalPages:t}=this,i=0===t,n=e===t-1,s=0===e;this.nextButtonDisabled=n||i,this.previousButtonDisabled=s||i}nextButtonContainsPoint(e,t){return!this.nextButtonDisabled&&this.nextButton.containsPoint(e,t)}previousButtonContainsPoint(e,t){return!this.previousButtonDisabled&&this.previousButton.containsPoint(e,t)}clickNext(){this.incrementPage(),this.onPaginationChanged()}clickPrevious(){this.decrementPage(),this.onPaginationChanged()}setPage(e){e=Un(0,e,this.totalPages-1),this.currentPage!==e&&(this.currentPage=e,this.onPaginationChanged())}onPaginationClick(e){const{offsetX:t,offsetY:i}=e;this.nextButtonContainsPoint(t,i)?(this.clickNext(),e.consume()):this.previousButtonContainsPoint(t,i)&&(this.clickPrevious(),e.consume())}onPaginationMouseMove(e){const{offsetX:t,offsetY:i}=e;this.nextButtonContainsPoint(t,i)?(this.cursorManager.updateCursor(this.id,"pointer"),this.highlightActive="next"):this.previousButtonContainsPoint(t,i)?(this.cursorManager.updateCursor(this.id,"pointer"),this.highlightActive="previous"):(this.cursorManager.updateCursor(this.id),this.highlightActive=void 0),this.updateMarkers(),this.chartUpdateCallback(6)}onPaginationChanged(){this.pageUpdateCallback(this.currentPage)}incrementPage(){this.currentPage=Math.min(this.currentPage+1,this.totalPages-1)}decrementPage(){this.currentPage=Math.max(this.currentPage-1,0)}onMarkerShapeChange(){const e=Od(this.marker.shape||Ld);this.previousButton=new e,this.nextButton=new e,this.updatePositions(),this.updateMarkers(),this.chartUpdateCallback(6)}attachPagination(e){e.append(this.group)}computeBBox(){return this.group.computeBBox()}};Cu.className="Pagination",S([Ys(Qs)],Cu.prototype,"marker",2),S([Ys(Qs)],Cu.prototype,"activeStyle",2),S([Ys(Qs)],Cu.prototype,"inactiveStyle",2),S([Ys(Qs)],Cu.prototype,"highlightStyle",2),S([Ys(Qs)],Cu.prototype,"label",2);var bu=class extends Ct{constructor(){super(...arguments),this.maxLength=void 0,this.color="black",this.fontStyle=void 0,this.fontWeight=void 0,this.fontSize=12,this.fontFamily="Verdana, sans-serif",this.formatter=void 0}};S([Ys(rr,{optional:!0})],bu.prototype,"maxLength",2),S([Ys(vr)],bu.prototype,"color",2),S([Ys(Dr,{optional:!0})],bu.prototype,"fontStyle",2),S([Ys(Ir,{optional:!0})],bu.prototype,"fontWeight",2),S([Ys(rr)],bu.prototype,"fontSize",2),S([Ys(ir)],bu.prototype,"fontFamily",2),S([Ys(tr,{optional:!0})],bu.prototype,"formatter",2);var Su=class extends Ct{constructor(){super(...arguments),this.size=15,this.padding=8,this.enabled=!0}};S([Qa(e=>{var t;return null==(t=e.parent)?void 0:t.onMarkerShapeChange()})],Su.prototype,"shape",2),S([Ys(rr)],Su.prototype,"size",2),S([Ys(rr)],Su.prototype,"padding",2),S([Ys(rr,{optional:!0})],Su.prototype,"strokeWidth",2),S([Ys(er)],Su.prototype,"enabled",2);var wu=class extends Ct{};S([Ys(rr,{optional:!0})],wu.prototype,"strokeWidth",2),S([Ys(rr,{optional:!0})],wu.prototype,"length",2);var xu=class extends Ct{constructor(){super(...arguments),this.paddingX=16,this.paddingY=8,this.toggleSeriesVisible=!0,this.showSeriesStroke=!1,this.marker=new Su,this.label=new bu,this.line=new wu}};S([Ys(rr,{optional:!0})],xu.prototype,"maxWidth",2),S([Ys(rr)],xu.prototype,"paddingX",2),S([Ys(rr)],xu.prototype,"paddingY",2),S([Ys(er)],xu.prototype,"toggleSeriesVisible",2),S([Ys(er)],xu.prototype,"showSeriesStroke",2),S([Ys(Qs)],xu.prototype,"marker",2),S([Ys(Qs)],xu.prototype,"label",2),S([Ys(Qs)],xu.prototype,"line",2);var Eu=class extends Ct{};S([Ys(tr,{optional:!0})],Eu.prototype,"legendItemClick",2),S([Ys(tr,{optional:!0})],Eu.prototype,"legendItemDoubleClick",2);var Mu=class extends Ct{constructor(e){super(),this.ctx=e,this.id=Bn(this),this.group=new Mo({name:"legend",layer:!0,zIndex:11}),this.itemSelection=_a.select(this.group,fu),this.oldSize=[0,0],this.pages=[],this.maxPageSize=[0,0],this.paginationTrackingIndex=0,this.truncatedItems=new Set,this._data=[],this.item=new xu,this.listeners=new Eu,this.enabled=!0,this.position="bottom",this.spacing=20,this.characterWidths=new Map,this.destroyFns=[],this.size=[0,0],this._visible=!0,this.focus={mode:"item",index:0},this.item.marker.parent=this,this.pagination=new Cu(t=>e.updateService.update(t),e=>this.updatePageNumber(e),e.regionManager,e.cursorManager),this.pagination.attachPagination(this.group),this.item.marker.parent=this;const t=e.regionManager.addRegionFromProperties({name:"legend",bboxproviders:[this.group],canInteraction:()=>this.enabled&&this.group.visible});this.destroyFns.push(t.addListener("click",e=>this.checkLegendClick(e),17),t.addListener("dblclick",e=>this.checkLegendDoubleClick(e),17),t.addListener("hover",e=>this.handleLegendMouseMove(e)),t.addListener("leave",e=>this.handleLegendMouseExit(e),17),t.addListener("enter",e=>this.handleLegendMouseEnter(e),17),t.addListener("blur",e=>this.onBlur(e)),t.addListener("tab",e=>this.onTab(e)),t.addListener("tab-start",e=>this.onTabStart(e)),t.addListener("nav-vert",e=>this.onNav(e)),t.addListener("nav-hori",e=>this.onNav(e)),t.addListener("submit",e=>this.onSubmit(e)),e.layoutService.addListener("start-layout",e=>this.positionLegend(e.shrinkRect)),()=>this.detachLegend())}set data(e){this._data=e,this.updateGroupVisibility()}get data(){return this._data}destroy(){this.destroyFns.forEach(e=>e()),this.pagination.destroy()}onMarkerShapeChange(){this.itemSelection.clear(),this.group.markDirty(this.group,2)}getOrientation(){if(void 0!==this.orientation)return this.orientation;switch(this.position){case"right":case"left":return"vertical";case"bottom":case"top":return"horizontal"}}getCharacterWidths(e){const{characterWidths:t}=this;if(t.has(e))return t.get(e);const i={"...":Go.getTextSize("...",e).width};return t.set(e,i),i}set visible(e){this._visible=e,this.updateGroupVisibility()}get visible(){return this._visible}updateGroupVisibility(){this.group.visible=this.enabled&&this.visible&&this.data.length>0}attachLegend(e){e.appendChild(this.group)}detachLegend(){var e;null==(e=this.group.parent)||e.removeChild(this.group)}getItemLabel(e){const{ctx:{callbackCache:t}}=this,{formatter:i}=this.item.label;return i?t.call(i,{itemId:e.itemId,value:e.label.text,seriesId:e.seriesId}):e.label.text}calcLayout(e,t){const{paddingX:i,paddingY:n,label:s,maxWidth:r,marker:{size:o,padding:a,shape:l},label:{maxLength:c=1/0,fontStyle:h,fontWeight:d,fontSize:u,fontFamily:p},line:g,showSeriesStroke:f}=this.item,m=[...this.data];this.reverseOrder&&m.reverse(),this.itemSelection.update(m);const v=[],y=Bo(s),C=null!=r?r:.8*e,b=o+a+i;if(this.itemSelection.each((e,t)=>{var i,n,s;const r=Od(null!=l?l:t.marker.shape),m=null!=(i=t.marker.enabled)?i:this.item.marker.enabled;e.marker&&e.marker instanceof r||(e.marker=new r),e.markerSize=o,e.spacing=a,e.fontStyle=h,e.fontWeight=d,e.fontSize=u,e.fontFamily=p;const S=null!=(n=t.itemId)?n:t.id,w=this.getItemLabel(t),x=(null!=w?w:"<unknown>").replace(/\r?\n/g," ");e.text=this.truncate(x,c,C,b,y,S),f&&void 0!==t.line?(e.lineVisible=!0,e.markerVisible=m,e.setSeriesStrokeOffset(null!=(s=g.length)?s:5)):(e.lineVisible=!1,e.markerVisible=!0),v.push(e.computeBBox())}),e=Math.max(1,e),t=Math.max(1,t),!isFinite(e))return!1;const S=this.size,w=this.oldSize;S[0]=e,S[1]=t,S[0]===w[0]&&S[1]===w[1]||(w[0]=S[0],w[1]=S[1]);const{pages:x,maxPageHeight:E,maxPageWidth:M}=this.updatePagination(v,e,t);this.pages=x,this.maxPageSize=[M-i,E-n];const A=this.pagination.currentPage,T=this.pages[A];this.pages.length<1||!T?this.visible=!1:(this.visible=!0,this.updatePositions(A),this.update())}truncate(e,t,i,n,s,r){const o=e.split("");let a=!1;if(e.length>t&&(e=`${e.substring(0,t)}`,a=!0),Math.floor(n+Go.getTextSize(e,s).width)>i){let t="";const r=this.getCharacterWidths(s);let l=n+r["..."];for(const e of o){if(r[e]||(r[e]=Go.getTextSize(e,s).width),l+=r[e],l>i)break;t+=e}e=t,a=!0}return a?(e+="...",this.truncatedItems.add(r)):this.truncatedItems.delete(r),e}updatePagination(e,t,i){const n=this.getOrientation(),s=Math.min(this.paginationTrackingIndex,e.length);this.pagination.orientation=n,this.pagination.translationX=0,this.pagination.translationY=0;const{pages:r,maxPageHeight:o,maxPageWidth:a,paginationBBox:l,paginationVertical:c}=this.calculatePagination(e,t,i),h=r.findIndex(e=>e.endIndex>=s);this.pagination.currentPage=Un(0,h,r.length-1);const{paddingX:d,paddingY:u}=this.item,p=a-d,g=o-u;let f=0,m=-l.y-this.item.marker.size/2;return c?m+=g+8:(f+=-l.x+p+8,m+=(g-l.height)/2),this.pagination.translationX=f,this.pagination.translationY=m,this.pagination.update(),this.pagination.updateMarkers(),{maxPageHeight:o,maxPageWidth:a,pages:r}}calculatePagination(e,t,i){var n,s,r;const{paddingX:o,paddingY:a}=this.item,l=this.getOrientation(),c=["left","right"].includes(this.position);let h=this.pagination.computeBBox(),d=new is(0,0,0,0),u=[],p=0,g=0,f=0;const m=e=>e.width===h.width&&e.height===h.height,v=void 0!==this.maxWidth&&void 0!==this.maxHeight;do{if(f++>10){_.warn("unable to find stable legend layout.");break}h=d;const m=t-(c?0:h.width),y=uu({orientation:l,bboxes:e,maxHeight:i-(c?h.height:0),maxWidth:m,itemPaddingY:a,itemPaddingX:o,forceResult:v});u=null!=(n=null==y?void 0:y.pages)?n:[],p=null!=(s=null==y?void 0:y.maxPageWidth)?s:0,g=null!=(r=null==y?void 0:y.maxPageHeight)?r:0;const C=u.length;if(this.pagination.visible=C>1,this.pagination.totalPages=C,this.pagination.update(),d=this.pagination.computeBBox(),!this.pagination.visible)break}while(!m(d));return{maxPageWidth:p,maxPageHeight:g,pages:u,paginationBBox:h,paginationVertical:c}}getPageItemCount(e){let t=0;for(const i of this.pages[e].columns)t+=i.indices.length;return t}getNodeIndexFromFocusIndex(){const{index:e}=this.focus,t=this.pages[this.pagination.currentPage];let i=0;for(const n of t.columns){if(e<i+n.indices.length)return n.indices[e-i];i+=n.indices.length}return-1}updatePositions(e=0){const{item:{paddingY:t},itemSelection:i,pages:n}=this;if(n.length<1||!n[e])return;const{columns:s,startIndex:r,endIndex:o}=n[e];let a=0,l=0;const c=s.length,h=s[0].indices.length,d="horizontal"===this.getOrientation(),u=s[0].bboxes[0].height+t,p=[];i.each((e,t,i)=>{var n,g;if(i<r||i>o)return void(e.visible=!1);const f=i-r;let m=0,v=0;d?(m=f%c,v=Math.floor(f/c)):(m=Math.floor(f/h),v=f%h),e.visible=!0;const y=s[m];y&&(l=u*v,a=null!=(n=p[v])?n:0,p[v]=(null!=(g=p[v])?g:0)+y.columnWidth,e.translationX=Math.floor(a),e.translationY=Math.floor(l))})}updatePageNumber(e){const{pages:t}=this,{startIndex:i,endIndex:n}=t[e];0===i?this.paginationTrackingIndex=0:e===t.length-1?this.paginationTrackingIndex=n:this.paginationTrackingIndex=Math.floor((i+n)/2),this.pagination.update(),this.pagination.updateMarkers(),this.updatePositions(e),this.ctx.updateService.update(6)}update(){const{label:{color:e},marker:t,line:i,showSeriesStroke:n}=this.item;this.itemSelection.each((s,r)=>{var o,a;const l=r.marker;s.markerFill=l.fill,s.markerStroke=l.stroke,s.markerStrokeWidth=null!=(o=t.strokeWidth)?o:Math.min(2,l.strokeWidth),s.markerFillOpacity=l.fillOpacity,s.markerStrokeOpacity=l.strokeOpacity,s.opacity=r.enabled?1:.5,s.color=e;const{line:c}=r;n&&void 0!==c&&(s.lineStroke=c.stroke,s.lineStrokeOpacity=c.strokeOpacity,s.lineStrokeWidth=null!=(a=i.strokeWidth)?a:Math.min(2,c.strokeWidth),s.lineLineDash=c.lineDash)})}getDatumForPoint(e,t){const i=[],n={dist:1/0,datum:void 0};for(const s of this.group.children){if(!s.visible)continue;if(!(s instanceof fu))continue;const r=s.computeBBox();if(r.grow(this.item.paddingX/2,"horizontal"),r.grow(this.item.paddingY/2,"vertical"),r.containsPoint(e,t))return s.datum;const o=e-r.x-this.item.paddingX/2,a=t-r.y-this.item.paddingY/2,l=f(o,2)+f(a,2);o>=0&&a>=0&&l<n.dist&&(n.dist=l,n.datum=s.datum),i.push(r)}if(is.merge(i).containsPoint(e,t))return n.datum}computePagedBBox(){const e=this.group.computeBBox();if(this.pages.length<=1)return e;const[t,i]=this.maxPageSize;return e.height=Math.max(i,e.height),e.width=Math.max(t,e.width),e}checkLegendClick(e){const t=this.getDatumForPoint(e.offsetX,e.offsetY);this.doClick(t)&&e.consume()}doClick(e){const{listeners:{legendItemClick:t},ctx:{chartService:i,highlightManager:n},item:{toggleSeriesVisible:s},preventHidingAll:r}=this;if(!e)return!1;const{id:o,itemId:a,enabled:l}=e,c=i.series.find(e=>e.id===o);if(!c)return!1;let h=l;if(s){h=!l,r&&!h&&i.series.flatMap(e=>e.getLegendData("category")).filter(e=>e.enabled).length<2&&(h=!0);const t=h?"visible":"hidden";this.ctx.ariaAnnouncementService.announceValue(`${t}`),this.ctx.chartEventManager.legendItemClick(c,a,h,e.legendItemName)}return h?n.updateHighlight(this.id,{series:c,itemId:a,datum:void 0}):n.updateHighlight(this.id),this.ctx.updateService.update(2,{forceNodeDataRefresh:!0}),null==t||t({type:"click",enabled:h,itemId:a,seriesId:c.id}),!0}checkLegendDoubleClick(e){var t;const{listeners:{legendItemDoubleClick:i},ctx:{chartService:n},item:{toggleSeriesVisible:s}}=this;if("integrated"===n.mode)return;const r=this.getDatumForPoint(e.offsetX,e.offsetY);if(!r)return;const{id:o,itemId:a,seriesId:l}=r,c=n.series.find(e=>e.id===o);if(c){if(e.consume(),s){const e=n.series.flatMap(e=>e.getLegendData("category")),i=e.filter(e=>e.enabled).length,s=e.find(e=>e.itemId===a&&e.seriesId===l);this.ctx.chartEventManager.legendItemDoubleClick(c,a,null!=(t=null==s?void 0:s.enabled)&&t,i,null==s?void 0:s.legendItemName)}this.ctx.updateService.update(2,{forceNodeDataRefresh:!0}),null==i||i({type:"dblclick",enabled:!0,itemId:a,seriesId:c.id})}}handleLegendMouseMove(e){if(!this.enabled)return;const{offsetX:t,offsetY:i}=e;e.consume();const n=this.getDatumForPoint(t,i);this.doHover(e,n)}doHover(e,t){var i;const{item:{toggleSeriesVisible:n},listeners:s}=this;if(void 0===e||void 0===t)return this.ctx.cursorManager.updateCursor(this.id),void this.ctx.highlightManager.updateHighlight(this.id);const r=t?this.ctx.chartService.series.find(e=>e.id===(null==t?void 0:t.id)):void 0;if(t&&this.truncatedItems.has(null!=(i=t.itemId)?i:t.id)){const{offsetX:i,offsetY:n}=e;this.ctx.tooltipManager.updateTooltip(this.id,{offsetX:i,offsetY:n,lastPointerEvent:e,showArrow:!1},rl({content:this.getItemLabel(t)}))}else this.ctx.tooltipManager.removeTooltip(this.id);(n||null!=s.legendItemClick||null!=s.legendItemDoubleClick)&&this.ctx.cursorManager.updateCursor(this.id,"pointer"),(null==t?void 0:t.enabled)&&r?this.ctx.highlightManager.updateHighlight(this.id,{series:r,itemId:null==t?void 0:t.itemId,datum:void 0}):this.ctx.highlightManager.updateHighlight(this.id)}handleLegendMouseExit(e){this.doMouseExit()}doMouseExit(){this.ctx.cursorManager.updateCursor(this.id),this.ctx.tooltipManager.removeTooltip(this.id),16===this.ctx.interactionManager.getState()&&this.ctx.highlightManager.updateHighlight(this.id)}handleLegendMouseEnter(e){const{enabled:t,item:{toggleSeriesVisible:i},listeners:{legendItemClick:n,legendItemDoubleClick:s}}=this,r=this.getDatumForPoint(e.offsetX,e.offsetY);t&&void 0!==r&&(i||null!=n||null!=s)&&this.ctx.cursorManager.updateCursor(this.id,"pointer")}onBlur(e){this.doMouseExit(),this.focus.mode="item",this.ctx.regionManager.updateFocusIndicatorRect(void 0)}onTab(e){this.updateFocus(),e.consume()}onTabStart(e){if(!this.pagination.visible||!this.pagination.enabled)return;const t=t=>{this.focus.mode=t,this.updateFocus(),e.consume()};"item"===this.focus.mode&&1===e.delta?(this.focus.index=0===this.pagination.currentPage?1:0,t("page")):"page"===this.focus.mode&&-1===e.delta&&(this.focus.index=0,t("item"))}onNav(e){if("item"===this.focus.mode){const t=this.focus.index+e.delta,i=this.getPageItemCount(this.pagination.currentPage);this.focus.index=Un(-1,t,i),this.updateFocus(),e.consume()}else"page"===this.focus.mode&&(e.delta<0&&(this.focus.index=0),e.delta>0&&(this.focus.index=1),this.updateFocus(),e.consume())}onSubmit(e){"item"===this.focus.mode?this.doClick(this.getFocusedItem().datum):"page"===this.focus.mode&&(0===this.focus.index&&this.pagination.clickPrevious(),1===this.focus.index&&this.pagination.clickNext(),this.ctx.ariaAnnouncementService.announceValue(`Legend page ${this.pagination.currentPage+1} of ${this.pages.length}`))}maybeChangeFocusPage(){const e=this.pagination.currentPage,t=this.getPageItemCount(e);if(-1===this.focus.index)this.pagination.setPage(e-1);else{if(this.focus.index!==t)return;this.pagination.setPage(e+1)}const{currentPage:i}=this.pagination;e===i?this.focus.index=Un(0,this.focus.index,t-1):-1===this.focus.index?this.focus.index=this.getPageItemCount(i)-1:this.focus.index=0}getFocusedItem(){if("item"!==this.focus.mode)return _.error("getFocusedItem() should be called only when focus.mode is 'item'"),{nodeIndex:-1,node:void 0,datum:void 0};this.maybeChangeFocusPage();const e=this.getNodeIndexFromFocusIndex();if(e<0)return _.error(`Cannot access negative nodeIndex ${e}`),{nodeIndex:-1,node:void 0,datum:void 0};const t=this.itemSelection.nodes()[e];let i;return e<this.data.length?i=this.data[e]:_.error(`Cannot access datum[${e}]`),{nodeIndex:e,node:t,datum:i}}updateFocus(){const{focus:e,pagination:t}=this;if("item"===e.mode){const{nodeIndex:e,node:t,datum:i}=this.getFocusedItem();if(void 0===i)return;const n=null==t?void 0:t.computeTransformedBBox();this.doHover(ah(this.ctx.regionManager,{bbox:n,showFocusBox:!0}),i);const s=i&&this.getItemLabel(i);if(s){const t=i.enabled?"visible":"hidden";this.ctx.ariaAnnouncementService.announceValue(`Legend item ${e+1} of ${this.data.length}, ${s}, ${t}`)}}else if("page"===e.mode){const i=0===e.index?t.previousButton:t.nextButton;this.ctx.regionManager.updateFocusIndicatorRect(i.computeTransformedBBox());const n=["Previous legend page","Next legend page"][e.index];this.ctx.ariaAnnouncementService.announceValue(`${n}, button`)}}positionLegend(e){const t=e.clone();if(!this.enabled||!this.data.length)return{shrinkRect:t};const[i,n]=this.calculateLegendDimensions(e);this.group.translationX=0,this.group.translationY=0,this.calcLayout(i,n);const s=this.computePagedBBox(),r=()=>{switch(this.position){case"top":case"left":return 0;case"bottom":return e.height-s.height;default:return e.width-s.width}};if(this.visible){let i,n;switch(this.position){case"top":case"bottom":i=(e.width-s.width)/2,n=r(),t.shrink(s.height,this.position);break;default:i=r(),n=(e.height-s.height)/2,t.shrink(s.width,this.position)}this.group.translationX=Math.floor(-s.x+e.x+i),this.group.translationY=Math.floor(-s.y+e.y+n)}if(this.visible&&this.enabled&&this.data.length){const e=this.spacing;t.shrink(e,this.position);const i=s.clone();i.x+=this.group.translationX,i.y+=this.group.translationY}return{shrinkRect:t}}calculateLegendDimensions(e){const{width:t,height:i}=e,n=t/i;let s,r;switch(this.position){case"top":case"bottom":const e=n<1?Math.min(.5,1/n*.2):.2;s=this.maxWidth?Math.min(this.maxWidth,t):t,r=this.maxHeight?Math.min(this.maxHeight,i):Math.round(i*e);break;default:const o=n>1?Math.min(.5,.25*n):.25;s=this.maxWidth?Math.min(this.maxWidth,t):Math.round(t*o),r=this.maxHeight?Math.min(this.maxHeight,i):i}return[s,r]}};Mu.className="Legend",S([Ys(Qs)],Mu.prototype,"pagination",2),S([Ys(Qs)],Mu.prototype,"item",2),S([Ys(Qs)],Mu.prototype,"listeners",2),S([Qa(e=>e.updateGroupVisibility()),Ys(er)],Mu.prototype,"enabled",2),S([Ys(Tr)],Mu.prototype,"position",2),S([Ys(rr,{optional:!0})],Mu.prototype,"maxWidth",2),S([Ys(rr,{optional:!0})],Mu.prototype,"maxHeight",2),S([Ys(er,{optional:!0})],Mu.prototype,"reverseOrder",2),S([Ys(Gr(["horizontal","vertical"],"an orientation"),{optional:!0})],Mu.prototype,"orientation",2),S([Ys(er,{optional:!0})],Mu.prototype,"preventHidingAll",2),S([Ys(rr)],Mu.prototype,"spacing",2);var Au={type:"legend",optionsKey:"legend",identifier:"category",chartTypes:["cartesian","polar","hierarchy","topology"],instanceConstructor:Mu,packageType:"community"},Tu=class extends pd{constructor(){super(...arguments),this.zIndex=3,this._fill="#f2f2f2",this._stroke="#999999",this._strokeWidth=1,this._lineCap="square",this._centerX=0,this._centerY=0,this._width=8,this._gripLineGap=2,this._gripLineLength=8,this._height=16}set centerX(e){this._centerX!==e&&(this._centerX=e,this.dirtyPath=!0)}get centerX(){return this._centerX}set centerY(e){this._centerY!==e&&(this._centerY=e,this.dirtyPath=!0)}get centerY(){return this._centerY}set width(e){this._width!==e&&(this._width=e,this.dirtyPath=!0)}get width(){return this._width}set gripLineGap(e){this._gripLineGap!==e&&(this._gripLineGap=e,this.dirtyPath=!0)}get gripLineGap(){return this._gripLineGap}set gripLineLength(e){this._gripLineLength!==e&&(this._gripLineLength=e,this.dirtyPath=!0)}get gripLineLength(){return this._gripLineLength}set height(e){this._height!==e&&(this._height=e,this.dirtyPath=!0)}get height(){return this._height}layout(e,t){this.centerX=e,this.centerY=t}static align(e,t,i,n,s,r,o,a){const l=e.strokeWidth/2,c=e.align(i+s*o)+l,h=c+e.align(i+s*o,s*(a-o))-2*l,d=e.align(n+r/2)+l;e.layout(c,d),t.layout(h,d)}computeBBox(){const{centerX:e,centerY:t,width:i,height:n}=this;return new is(e-i/2,t-n/2,i,n)}isPointInPath(e,t){const i=this.transformPoint(e,t);return this.computeBBox().containsPoint(i.x,i.y)}updatePath(){var e,t,i;const{centerX:n,centerY:s,path:r,strokeWidth:o,gripLineGap:a,gripLineLength:l}=this,c=null!=(i=null==(t=null==(e=this.layerManager)?void 0:e.canvas)?void 0:t.pixelRatio)?i:1;r.clear();const h=Math.floor(this.width/2*c)/c,d=Math.floor(this.height/2*c)/c;r.moveTo(n-h,s-d),r.lineTo(n+h,s-d),r.lineTo(n+h,s+d),r.lineTo(n-h,s+d),r.closePath();const u=Math.floor((a+o)/2*c)/c,p=Math.floor(l/2*c)/c;r.moveTo(n-u,s-p),r.lineTo(n-u,s+p),r.moveTo(n+u,s-p),r.lineTo(n+u,s+p)}};Tu.className="RangeHandle",S([Ys(vr)],Tu.prototype,"_fill",2),S([Ys(vr)],Tu.prototype,"_stroke",2),S([Ys(rr)],Tu.prototype,"_strokeWidth",2),S([Ys(Er)],Tu.prototype,"_lineCap",2),S([Ys(rr)],Tu.prototype,"_width",2),S([Ys(rr)],Tu.prototype,"_gripLineGap",2),S([Ys(rr)],Tu.prototype,"_gripLineLength",2),S([Ys(rr)],Tu.prototype,"_height",2);var Du=class extends pd{constructor(){super(...arguments),this.zIndex=2,this.x=0,this.y=0,this.width=200,this.height=30,this.min=0,this.max=1}layout(e,t,i,n){this.x=e,this.y=t,this.width=i,this.height=n,this.dirtyPath=!0}update(e,t){this.min=isNaN(e)?this.min:e,this.max=isNaN(t)?this.max:t,this.dirtyPath=!0}computeBBox(){const{x:e,y:t,width:i,height:n}=this;return new is(e,t,i,n)}computeVisibleRangeBBox(){const{x:e,y:t,width:i,height:n,min:s,max:r}=this,o=e+i*s;return new is(o,t,e+i*r-o,n)}updatePath(){const{path:e,x:t,y:i,width:n,height:s,min:r,max:o,strokeWidth:a}=this,l=a/2;e.clear();const c=this.align(t)+l,h=this.align(i)+l,d=c+this.align(t,n)-2*l,u=h+this.align(i,s)-2*l;e.moveTo(c,h),e.lineTo(d,h),e.lineTo(d,u),e.lineTo(c,u),e.closePath();const p=this.align(t+n*r)+l,g=p+this.align(t+n*r,n*(o-r))-2*l;e.moveTo(p,h),e.lineTo(p,u),e.lineTo(g,u),e.lineTo(g,h),e.closePath()}};Du.className="RangeMask";var Iu=class extends Mo{constructor(e){super({name:"rangeSelectorGroup",layer:!0,zIndex:12}),this.x=0,this.y=0,this.width=200,this.height=30,this.lOffset=0,this.rOffset=0,this.isContainerNode=!0,this.background=new Mo({name:"navigator-background"}),this.background.zIndex=1,this.appendChild(this.background),this.append(e)}layout(e,t,i,n,s,r){this.x=e,this.y=t,this.width=i,this.height=n,this.lOffset=s,this.rOffset=r,this.background.translationX=e,this.background.translationY=t}updateBackground(e,t){null!=e&&this.background.removeChild(e),null!=t&&this.background.appendChild(t)}computeBBox(){const{x:e,y:t,width:i,height:n,lOffset:s,rOffset:r}=this;return new is(e-s,t,i+(s+r),n)}},Ru=class extends xe{constructor(e){super(),this.ctx=e,this.miniChart=void 0,this.enabled=!1,this.mask=new Du,this.minHandle=new Tu,this.maxHandle=new Tu,this.height=30,this.margin=10,this.x=0,this.y=0,this.width=0,this.rangeSelector=new Iu([this.mask,this.minHandle,this.maxHandle]),this._min=0,this._max=1,this.minRange=.001;const t=e.regionManager.addRegion("navigator",this.rangeSelector);this.destroyFns.push(e.scene.attachNode(this.rangeSelector),t.addListener("hover",e=>this.onHover(e),25),t.addListener("drag-start",e=>this.onDragStart(e),25),t.addListener("drag",e=>this.onDrag(e),25),t.addListener("drag-end",()=>this.onDragEnd(),25),t.addListener("leave",e=>this.onLeave(e),25),e.zoomManager.addListener("zoom-change",e=>this.onZoomChange(e))),this.updateGroupVisibility()}updateBackground(e,t){var i;null==(i=this.rangeSelector)||i.updateBackground(e,t)}updateGroupVisibility(){const{enabled:e}=this;null!=this.rangeSelector&&e!==this.rangeSelector.visible&&(this.rangeSelector.visible=e,e?this.updateZoom():this.ctx.zoomManager.updateZoom("navigator"))}performLayout(e){return x(this,arguments,function*({shrinkRect:e}){if(this.enabled){const t=this.height+this.margin;e.shrink(t,"bottom"),this.y=e.y+e.height+this.margin}else this.y=0;return{shrinkRect:e}})}performCartesianLayout(e){return x(this,null,function*(){const{x:t,width:i}=e.seriesRect;if(this.enabled){const{y:e,height:n}=this;this.layoutNodes(t,e,i,n)}this.x=t,this.width=i})}onHover(e){if(!this.enabled)return;const{mask:t,minHandle:i,maxHandle:n}=this,{offsetX:s,offsetY:r}=e;i.containsPoint(s,r)||n.containsPoint(s,r)?this.ctx.cursorManager.updateCursor("navigator","ew-resize"):t.computeVisibleRangeBBox().containsPoint(s,r)?this.ctx.cursorManager.updateCursor("navigator","grab"):this.ctx.cursorManager.updateCursor("navigator")}onDragStart(e){if(!this.enabled)return;const{mask:t,minHandle:i,maxHandle:n,x:s,width:r,_min:o}=this,{offsetX:a,offsetY:l}=e;i.zIndex<n.zIndex?n.containsPoint(a,l)?this.dragging="max":i.containsPoint(a,l)&&(this.dragging="min"):i.containsPoint(a,l)?this.dragging="min":n.containsPoint(a,l)&&(this.dragging="max"),null==this.dragging&&t.computeVisibleRangeBBox().containsPoint(a,l)&&(this.dragging="pan",this.panStart=(a-s)/r-o),null!=this.dragging&&this.ctx.zoomManager.fireZoomPanStartEvent("navigator")}onDrag(e){if(!this.enabled||null==this.dragging)return;const{dragging:t,minRange:i,panStart:n,x:s,width:r}=this;let{_min:o,_max:a}=this;const{offsetX:l}=e,c=(l-s)/r;if("min"===t)o=Un(0,c,a-i);else if("max"===t)a=Un(o+i,c,1);else if("pan"===t&&null!=n){const e=a-o;o=Un(0,c-n,1-e),a=o+e}this._min=o,this._max=a,this.updateZoom()}onDragEnd(){this.dragging=void 0}onLeave(e){this.ctx.cursorManager.updateCursor("navigator")}onZoomChange(e){const{x:t}=e;t&&(this._min=t.min,this._max=t.max,this.updateNodes(t.min,t.max))}layoutNodes(e,t,i,n){const{rangeSelector:s,mask:r,minHandle:o,maxHandle:a,_min:l,_max:c}=this;s.layout(e,t,i,n,o.width/2,a.width/2),r.layout(e,t,i,n),Tu.align(o,a,e,t,i,n,l,c),l+(c-l)/2<.5?(o.zIndex=3,a.zIndex=4):(o.zIndex=4,a.zIndex=3)}updateNodes(e,t){this.mask.update(e,t)}updateZoom(){if(!this.enabled)return;const{_min:e,_max:t}=this,i=this.ctx.zoomManager.getZoom();return null!=e&&null!=t?this.ctx.zoomManager.updateZoom("navigator",{x:{min:e,max:t},y:null==i?void 0:i.y},!1,e=>{null==this.min&&null==this.max||_.warnOnce(`Could not apply [navigator.min] or [navigator.max] as [${e}] has modified the initial zoom state.`)}):void 0}};S([Ys(Qs,{optional:!0})],Ru.prototype,"miniChart",2),S([Ys(er),Qa(e=>e.updateGroupVisibility())],Ru.prototype,"enabled",2),S([Ys(rr)],Ru.prototype,"height",2),S([Ys(rr)],Ru.prototype,"margin",2),S([Za({newValue(e){this._min=e,this.updateZoom()}}),Ys(Xs(or,ur("max")),{optional:!0})],Ru.prototype,"min",2),S([Za({newValue(e){this._max=e,this.updateZoom()}}),Ys(Xs(or,pr("min")),{optional:!0})],Ru.prototype,"max",2);var Lu={type:"root",optionsKey:"navigator",packageType:"community",chartTypes:["cartesian"],instanceConstructor:Ru,themeTemplate:{navigator:{enabled:!1,height:30,mask:{fill:"#999999",stroke:"#999999",strokeWidth:1,fillOpacity:.2},minHandle:{fill:"#f2f2f2",stroke:"#999999",strokeWidth:1,width:9,height:16,gripLineGap:1,gripLineLength:8},maxHandle:{fill:"#f2f2f2",stroke:"#999999",strokeWidth:1,width:9,height:16,gripLineGap:1,gripLineLength:8}}}},ku=({takeColors:e})=>{const{fills:[t],strokes:[i]}=e(1);return{fill:t,stroke:i}},Pu=e=>{const{fill:t,stroke:i}=ku(e);return{marker:{fill:t,stroke:i}}};function Nu(e,t,i,n,s){const{addPhaseFn:r,updatePhaseFn:o,removePhaseFn:a}=s,l=(n,s,r)=>{i.animate({id:`${e}_${t}_${s.id}_${n}`,groupId:e,from:0,to:1,ease:bs,collapsable:!1,onUpdate(e,t){t&&"removed"!==n||(s.path.clear(!0),r(e,s),s.checkPathDirty())},onStop(){"added"===n&&(s.path.clear(!0),r(1,s),s.checkPathDirty())},phase:Ls[n]})};for(const e of n)i.isSkipped()||(l("removed",e,a),l("updated",e,o)),l("added",e,r)}var Ou=null;function _u(e){if(null!=e)return""===e?"":(null!=Ou||(Ou=Mn("div")),Ou.textContent=String(e),Ou.innerHTML)}function Fu({id:e},t,i,...n){Ps(e,t,i,n,{opacity:0},{opacity:1},{phase:"trailing"})}function Gu({id:e},t,i,...n){Ps(e,t,i,n,{opacity:1},{opacity:0},{phase:"remove"})}function Vu(e){return{opacity:1}}var Bu=class extends Ct{constructor(){super(...arguments),this._dirty=3}markDirty(e,t=1){this._dirty<t&&(this._dirty=t)}markClean(e){this._dirty=0}isDirty(){return this._dirty>0}},Hu=class extends Bu{constructor(){super(...arguments),this.enabled=!0,this.color="rgba(0, 0, 0, 0.5)",this.xOffset=0,this.yOffset=0,this.blur=5}};S([Ys(er),rs({redraw:3})],Hu.prototype,"enabled",2),S([Ys(vr),rs({redraw:3})],Hu.prototype,"color",2),S([Ys(nr),rs({redraw:3})],Hu.prototype,"xOffset",2),S([Ys(nr),rs({redraw:3})],Hu.prototype,"yOffset",2),S([Ys(rr),rs({redraw:3})],Hu.prototype,"blur",2);var zu=Hr(e=>Nd(e)||"function"==typeof yd&&Object.create(e.prototype)instanceof yd,"a marker shape keyword such as 'circle', 'diamond' or 'square' or an object extending the Marker class"),Uu=class extends Bu{constructor(){super(...arguments),this.enabled=!0,this.shape=Cd,this.size=6,this.fillOpacity=1,this.strokeWidth=1,this.strokeOpacity=1}getStyle(){const{size:e,fill:t,fillOpacity:i,stroke:n,strokeWidth:s,strokeOpacity:r}=this;return{size:e,fill:t,fillOpacity:i,stroke:n,strokeWidth:s,strokeOpacity:r}}getDiameter(){return this.size+this.strokeWidth}};S([Ys(er),rs({redraw:3})],Uu.prototype,"enabled",2),S([Ys(zu),rs({redraw:3})],Uu.prototype,"shape",2),S([Ys(rr),rs({redraw:3})],Uu.prototype,"size",2),S([Ys(vr,{optional:!0}),rs({redraw:3})],Uu.prototype,"fill",2),S([Ys(or),rs({redraw:3})],Uu.prototype,"fillOpacity",2),S([Ys(vr,{optional:!0}),rs({redraw:3})],Uu.prototype,"stroke",2),S([Ys(rr),rs({redraw:3})],Uu.prototype,"strokeWidth",2),S([Ys(or),rs({redraw:3})],Uu.prototype,"strokeOpacity",2),S([Ys(tr,{optional:!0}),rs({redraw:3})],Uu.prototype,"formatter",2);var Wu=class extends Ct{constructor(){super(...arguments),this.enabled=!1}};S([Ys(er)],Wu.prototype,"enabled",2);var ju=class extends Ct{constructor(){super(...arguments),this.enabled=!0,this.interaction=new Wu,this.position=new ol}toTooltipHtml(e,t){return this.renderer?rl(this.renderer(t),e):rl(e)}};S([Ys(er)],ju.prototype,"enabled",2),S([Ys(er,{optional:!0})],ju.prototype,"showArrow",2),S([Ys(tr,{optional:!0})],ju.prototype,"renderer",2),S([Ys(Qs)],ju.prototype,"interaction",2),S([Ys(Qs)],ju.prototype,"position",2);var Ku=class extends jd{constructor(){super(...arguments),this.xName=void 0,this.fill="#c16068",this.fillOpacity=1,this.stroke="#874349",this.strokeWidth=2,this.strokeOpacity=1,this.lineDash=[0],this.lineDashOffset=0,this.shadow=new Hu,this.marker=new Uu,this.label=new Ho,this.tooltip=new ju,this.connectMissingData=!1}};function $u({id:e},t,i,...n){Ps(e,"markers",t,n,{opacity:0},{opacity:1},{phase:i?Ls[i]:"trailing"}),n.forEach(e=>e.cleanup())}function Yu({id:e},t,...i){Ps(e,"markers",t,i,{scalingX:0,scalingY:0},{scalingX:1,scalingY:1},{phase:"initial"}),i.forEach(e=>e.cleanup())}function qu({id:e,nodeDataDependencies:t},i,...n){const s=t.seriesRectWidth;ks(e,"markers",i,n,{fromFn:(e,t)=>{var i,n;const r=null!=(n=null==(i=t.midPoint)?void 0:i.x)?n:s;let o=Un(0,Ms(r/s),1);return isNaN(o)&&(o=0),{scalingX:0,scalingY:0,delay:o,duration:.2,phase:"initial"}},toFn:()=>({scalingX:1,scalingY:1})})}function Xu(e){return{opacity:1,scalingX:1,scalingY:1}}function Zu(e,t){var i,n,s,r;return{translationX:null!=(n=null==(i=t.point)?void 0:i.x)?n:NaN,translationY:null!=(r=null==(s=t.point)?void 0:s.y)?r:NaN}}function Qu(e,t){const i=(t,i)=>{const n=e[i][t];return Array.isArray(n)?n[0]:n},n=t=>{const{xValue:n}=t;return e.moved[n]?{point:i(n,"moved"),status:"updated"}:e.removed[n]?{point:i(n,"removed"),status:"removed"}:e.added[n]?{point:i(n,"added"),status:"added"}:{status:"unknown"}};return{fromFn:(e,i)=>{var s,r,o,a,l,c;const{status:h,point:d}=n(i);if("unknown"===h)return{opacity:0};const u={translationX:null!=(r=null==(s=null==d?void 0:d.from)?void 0:s.x)?r:e.translationX,translationY:null!=(a=null==(o=null==d?void 0:d.from)?void 0:o.y)?a:e.translationY,opacity:e.opacity,phase:Ls[h]};return"added"===t?y(v({},u),{opacity:0,translationX:null==(l=null==d?void 0:d.to)?void 0:l.x,translationY:null==(c=null==d?void 0:d.to)?void 0:c.y,phase:Ls.added}):("added"===h&&(u.opacity=0),u)},toFn:(e,i)=>{var s,r;const{status:o,point:a}=n(i);if("unknown"===o)return{opacity:0};const l={translationX:i.point.x,translationY:i.point.y,opacity:1,phase:Ls[o]};return"removed"===o||"removed"===t?y(v({},l),{translationX:null==(s=null==a?void 0:a.to)?void 0:s.x,translationY:null==(r=null==a?void 0:a.to)?void 0:r.y,opacity:0,phase:Ls.removed}):l}}}function Ju(e,{datumIndex:t}){const i=e.getNodeData();if(void 0===i)return;const n=i[t];if(void 0===n||void 0===n.point)return;const s=e.getFormattedMarkerStyle(n).size,r=s/2,{x:o,y:a}=e.contentGroup.inverseTransformPoint(n.point.x-r,n.point.y-r);return new is(o,a,s,s)}function ep(e){return e.reduce(({min:e,max:t},i)=>((null==e||e.point.x>i.point.x)&&(e=i),(null==t||t.point.x<i.point.x)&&(t=i),{min:e,max:t}),{})}function tp(e,t,i){const n=(t.y-e.y)/(t.x-e.x);return{x:i,y:(i-e.x)*n+e.y}}function ip(e,t,i,n){let s=-1,r=0;const o=[];for(;r<e.length;)e[r].change!==t?e[r].change!==i?(o.length>0&&(n(o,s,r),o.length=0),s=r,r++):r++:(o.push(e[r]),r++);o.length>0&&n(o,s,r)}function np(e,t){ip(e,"out","in",(i,n,s)=>{var r,o;-1===n&&e[s]?i.forEach(t=>t.to=e[s].from):s===e.length&&e[n]?i.forEach(t=>t.to=e[n].from):"intersect"===t&&(null==(r=e[n])?void 0:r.from)&&(null==(o=e[s])?void 0:o.from)?i.forEach(t=>t.to=tp(e[n].from,e[s].from,t.from.x)):i.forEach(e=>e.to=e.from)}),ip(e,"in","out",(i,n,s)=>{var r,o;-1===n&&e[s]?i.forEach(t=>t.from=e[s].to):s===e.length&&e[n]?i.forEach(t=>t.from=e[n].to):"intersect"===t&&(null==(r=e[n])?void 0:r.to)&&(null==(o=e[s])?void 0:o.to)?i.forEach(t=>t.from=tp(e[n].to,e[s].to,t.to.x)):i.forEach(e=>e.from=e.to)})}function sp(e,t,i){const n=isNaN(e.x)?t.x:e.x,s=isNaN(e.y)?t.y:e.y,r=t.x-e.x,o=t.y-e.y;return{x:n+(isNaN(r)?0:r*i),y:s+(isNaN(o)?0:o*i)}}function rp(e,t,i){const{path:n}=i;let s;for(const i of e){const{from:e,to:r}=i,o=t[i.change];if(null==o||null==e||null==r)continue;const{x:a,y:l}=sp(e,r,o);if(!1===i.moveTo)n.lineTo(a,l);else if(!0!==i.moveTo&&s){if(s){const e="in"===i.moveTo?o:1-o,{x:t,y:r}=sp(s,{x:a,y:l},e);n.lineTo(t,r),n.moveTo(a,l)}}else n.moveTo(a,l);s={x:a,y:l}}}function op({id:e,visible:t,nodeDataDependencies:i},n,...s){const{seriesRectWidth:r,seriesRectHeight:o}=i;Ps(e,"path_properties",n,s,{clipX:0},{clipX:r},{phase:"initial",start:{clipMode:"normal",clipY:o,visible:t},finish:{clipMode:void 0,visible:t}})}function ap({id:e},t,i,n="add",...s){Ps(e,t,i,s,{opacity:0},{opacity:1},{phase:n})}function lp({id:e},t,i,...n){Ps(e,t,i,n,{opacity:1},{opacity:0},{phase:"remove"})}function cp(e){return t=>({opacity:e.getOpacity(),clipScalingX:1,clipMode:void 0})}function hp({nodeDataDependencies:e},t){const i=e=>isFinite(e)?e:0;t.clipX=i(e.seriesRectWidth),t.clipY=i(e.seriesRectHeight)}function dp(e){return"continuous"===e.type||"log"===e.type}function up(e){return"category"===e.type}function pp(e,t){return e.domain.length===t.domain.length&&e.range.length===t.range.length&&e.domain.every((e,i)=>e===t.domain[i])&&e.range.every((e,i)=>e===t.range[i])}function gp(e,t){return void 0===e||void 0===t?void 0!==e||void 0!==t:dp(e)&&dp(t)?e.type===t.type&&pp(e,t):!(!up(e)||!up(t))&&pp(e,t)}function fp(e,t){if(!t)return NaN;if(e instanceof Date&&(e=e.getTime()),"continuous"===t.type&&"number"==typeof e)return(e-t.domain[0])/(t.domain[1]-t.domain[0])*(t.range[1]-t.range[0])+t.range[0];if("log"===t.type&&"number"==typeof e)return t.convert(e);const i=t.domain.findIndex(t=>t===e);return i>=0?t.range[i]:NaN}function mp(e,t){const i=Number(e),n=Number(t);return isNaN(i)||isNaN(n)?e===t:Math.abs(n-i)<.25}function vp(e=!1,t=!1){return e===t?Boolean(e):e?"in":"out"}function yp(e,t,i={}){var n,s,r,o;const{backfillSplitMode:a="intersect"}=i,l=t=>{var i,n;return{x:fp(null!=(i=t.xValue)?i:NaN,e.scales.x),y:fp(null!=(n=t.yValue)?n:NaN,e.scales.y)}},c=e=>{var i,n;return{x:fp(null!=(i=e.xValue)?i:NaN,t.scales.x),y:fp(null!=(n=e.yValue)?n:NaN,t.scales.y)}},h=[],d={added:{},moved:{},removed:{}},u=(e,t,i,n="move")=>{e&&(isNaN(e.point.x)||isNaN(e.point.y))&&(e=t);const s={from:null==e?void 0:e.point,to:null==t?void 0:t.point,moveTo:vp(null==e?void 0:e.point.moveTo,null==t?void 0:t.point.moveTo),change:n};"move"===n?(d.moved[i]=s,v++,y++):"in"===n?(d.added[i]=s,y++):"out"===n&&(d.removed[i]=s,v++),h.push(s)},{min:p,max:g}=ep(t.nodeData),{min:f,max:m}=ep(e.nodeData);let v=0,y=0;for(;v<t.nodeData.length||y<e.nodeData.length;){const i=t.nodeData[v],a=e.nodeData[y],h=i?l(i):void 0,d=a?c(a):void 0,C=void 0;if(h&&mp(h.x,null==a?void 0:a.point.x))u(i,a,a.xValue,"move");else if(h&&h.x<(null!=(n=null==f?void 0:f.point.x)?n:-1/0))u(i,C,i.xValue,"out");else if(h&&h.x>(null!=(s=null==m?void 0:m.point.x)?s:1/0))u(i,C,i.xValue,"out");else if(d&&d.x<(null!=(r=null==p?void 0:p.point.x)?r:-1/0))u(C,a,a.xValue,"in");else if(d&&d.x>(null!=(o=null==g?void 0:g.point.x)?o:1/0))u(C,a,a.xValue,"in");else if(h&&h.x<(null==a?void 0:a.point.x))u(i,C,i.xValue,"out");else if(d&&d.x<(null==i?void 0:i.point.x))u(C,a,a.xValue,"in");else if(i)u(i,C,i.xValue,"out");else{if(!a)throw new Error("Unable to process points");u(C,a,a.xValue,"in")}}return np(h,a),{result:h,resultMap:d}}function Cp(e,t,i,n={}){var s,r,o;const{backfillSplitMode:a="intersect",multiDatum:l=!1}=n,c=[],h={added:{},moved:{},removed:{}},d={added:{},moved:{},removed:{}},u={in:"added",move:"moved",out:"removed"};let p,g;const f=(e,t)=>{var i;const n=u[t.change];l?(null!=(i=d[n])[e]||(i[e]=[]),d[n][e].push(t)):h[n][e]=t,p=t,g=Xo(e)};let m=0,y=0,C=!1;for(;m<t.nodeData.length||y<e.nodeData.length;){const n=t.nodeData[m],a=e.nodeData[y],h=Xo(null==n?void 0:n.xValue),d=Xo(null==a?void 0:a.xValue);let u;if(h===d)u={change:"move",moveTo:vp(null!=(s=n.point.moveTo)&&s,a.point.moveTo),from:n.point,to:a.point},f(null==n?void 0:n.xValue,u),m++,y++;else if(null==i?void 0:i.removed.has(String(h)))u={change:"out",moveTo:null!=(r=n.point.moveTo)&&r,from:n.point},f(null==n?void 0:n.xValue,u),m++;else if(null==i?void 0:i.added.has(String(d)))u={change:"in",moveTo:null!=(o=a.point.moveTo)&&o,to:a.point},f(null==a?void 0:a.xValue,u),y++;else if(l&&p&&g===h)u=v({},p),f(null==n?void 0:n.xValue,u),m++;else{if(!l||!p||g!==d){C=!0;break}u=v({},p),f(null==a?void 0:a.xValue,u),y++}c.push(u)}let b=-1/0;return C||(C=c.some(e=>{const{change:t,to:{x:i=-1/0}={}}=e;if("out"===t)return;const n=i<b;return b=i,n})),C?{result:void 0,resultMap:void 0}:(np(c,a),{result:c,resultMap:l?d:h})}function bp(e,t,i){var n,s,r,o;let a="updated";const l=e=>e.visible;if(!l(t)&&l(e))a="added";else if(l(t)&&!l(e))a="removed";else for(let e=0;e<i.length&&"move"===i[e].change&&(null==(n=i[e].from)?void 0:n.x)===(null==(s=i[e].to)?void 0:s.x)&&(null==(r=i[e].from)?void 0:r.y)===(null==(o=i[e].to)?void 0:o.y);e++)if(e===i.length-1)return"no-op";return a}function Sp(e,t,i,n,s){const r=bp(e,t,i),o=function(e,t){const i="none"===t?"updated":e,n={fromFn:t=>{let n;return n="removed"===e?{finish:{visible:!1}}:"added"===e?{start:{visible:!0}}:{},v({phase:Ls[i]},n)},toFn:e=>({phase:Ls[i]})};return"fade"===t?{fromFn:t=>{const i="added"===e?0:t.opacity;return v({opacity:i},n.fromFn(t))},toFn:t=>v({opacity:"removed"===e?0:1},n.toFn(t))}:n}(r,n);return{status:r,path:{addPhaseFn:(e,t)=>{s(i,{move:1,in:e},t)},updatePhaseFn:(e,t)=>{s(i,{move:e},t)},removePhaseFn:(e,t)=>{s(i,{move:0,out:e},t)}},pathProperties:o}}function wp(e,t,i){var n,s,r;const o="category"===(null==(n=e.scales.x)?void 0:n.type);if(o!==("category"===(null==(s=t.scales.x)?void 0:s.type)))return;const{result:a,resultMap:l}=o?Cp(e,t,i):yp(e,t);let c="updated";if(t.visible&&!e.visible?c="removed":!t.visible&&e.visible&&(c="added"),void 0===a||void 0===l)return;const h=null==(r=null==i?void 0:i.changed)||r||function(e,t){return!gp(e.scales.x,t.scales.x)||!gp(e.scales.y,t.scales.y)}(e,t)||"updated"!==c,d=Sp(e,t,a,"fade",rp),u=Qu(l,c);return y(v({},d),{marker:u,hasMotion:h})}S([Ys(ir)],Ku.prototype,"xKey",2),S([Ys(ir,{optional:!0})],Ku.prototype,"xName",2),S([Ys(ir)],Ku.prototype,"yKey",2),S([Ys(ir,{optional:!0})],Ku.prototype,"yName",2),S([Ys(rr,{optional:!0})],Ku.prototype,"normalizedTo",2),S([Ys(vr)],Ku.prototype,"fill",2),S([Ys(or)],Ku.prototype,"fillOpacity",2),S([Ys(vr)],Ku.prototype,"stroke",2),S([Ys(rr)],Ku.prototype,"strokeWidth",2),S([Ys(or)],Ku.prototype,"strokeOpacity",2),S([Ys(Ar)],Ku.prototype,"lineDash",2),S([Ys(rr)],Ku.prototype,"lineDashOffset",2),S([Ys(Qs)],Ku.prototype,"shadow",2),S([Ys(Qs)],Ku.prototype,"marker",2),S([Ys(Qs)],Ku.prototype,"label",2),S([Ys(Qs)],Ku.prototype,"tooltip",2),S([Ys(er)],Ku.prototype,"connectMissingData",2);var xp=(e=>(e[e.Fill=0]="Fill",e[e.Stroke=1]="Stroke",e[e.Marker=2]="Marker",e[e.Label=3]="Label",e))(xp||{});function Ep(e){const{points:t,phantomPoints:i}=e.fillData;return{top:t,bottom:i}}function Mp(e,t,i){return{scales:t.scales,nodeData:i[e],visible:t.visible}}function Ap(e,t,i){var n,s;const r="category"===(null==(n=e.scales.x)?void 0:n.type);if(r!==("category"===(null==(s=t.scales.x)?void 0:s.type)))return;let o="updated";t.visible&&!e.visible?o="removed":!t.visible&&e.visible&&(o="added");const{resultMap:a}=r?Cp(e,t,i,{backfillSplitMode:"static",multiDatum:!0}):yp(e,t,{backfillSplitMode:"static"}),{top:l,bottom:c}=r?function(e,t,i){const n=Ep(t),s=Ep(e),r={multiDatum:!0};return{top:Cp(Mp("top",e,s),Mp("top",t,n),i,r),bottom:Cp(Mp("bottom",e,s),Mp("bottom",t,n),i,r)}}(e,t,i):function(e,t){const i=Ep(t),n=Ep(e);return{top:yp(Mp("top",e,n),Mp("top",t,i)),bottom:yp(Mp("bottom",e,n),Mp("bottom",t,i))}}(e,t);if(void 0===a||void 0===l.result||void 0===c.result)return;const h=Sp(e,t,[...l.result,...c.result.reverse()],!!t.stackVisible&&e.stackVisible?"none":"fade",rp),d=Qu(a,o);return{status:h.status,fill:h,marker:d}}var Tp=class extends Kd{constructor(e){super({moduleCtx:e,directionKeys:zd,directionNames:Ud,pathsPerSeries:2,pathsZIndexSubOrderOffset:[0,1e3],hasMarkers:!0,markerSelectionGarbageCollection:!1,pickModes:[1,0],animationResetFns:{path:cp({getOpacity:()=>this.getOpacity()}),label:Vu,marker:(e,t)=>v(v({},{opacity:1,scalingX:1,scalingY:1}),Zu(0,t))}}),this.properties=new Ku}processData(e){return x(this,null,function*(){var t,i;if(null==this.data||!this.properties.isValid())return;const{data:n,visible:s,seriesGrouping:{groupIndex:r=this.id,stackCount:o=1}={}}=this,{xKey:a,yKey:l,connectMissingData:c,normalizedTo:h}=this.properties,d=!this.ctx.animationManager.isSkipped(),u=null==(t=this.axes.x)?void 0:t.scale,p=null==(i=this.axes.y)?void 0:i.scale,{isContinuousX:g,xScaleType:f,yScaleType:m}=this.getScaleInformation({xScale:u,yScale:p}),C=[`area-stack-${r}-yValues`,`area-stack-${r}-yValues-trailing`,`area-stack-${r}-yValues-prev`,`area-stack-${r}-yValues-trailing-prev`,`area-stack-${r}-yValues-marker`],b=[];Pe(h)&&(b.push(Rh([C[0],C[1],C[4]],h,"range")),b.push(Rh([C[2],C[3]],h,"range"))),!g&&d&&this.processedData&&b.push(Fh(this.processedData)),d&&b.push(Ph());const S={invalidValue:null};c&&o>1&&(S.invalidValue=0),s||(S.forceValue=0),yield this.requestDataModel(e,n,{props:[Wh(a,f,{id:"xValue"}),jh(l,m,v({id:"yValueRaw"},S)),...qh(l,"window","current",y(v({id:"yValueEnd"},S),{groupId:C[0]}),m),...qh(l,"window-trailing","current",y(v({id:"yValueStart"},S),{groupId:C[1]}),m),...qh(l,"window","last",y(v({id:"yValuePreviousEnd"},S),{groupId:C[2]}),m),...qh(l,"window-trailing","last",y(v({id:"yValuePreviousStart"},S),{groupId:C[3]}),m),...qh(l,"normal","current",y(v({id:"yValueCumulative"},S),{groupId:C[4]}),m),...b],groupByKeys:!0,groupByData:!1}),this.animationState.transition("updateData")})}getSeriesDomain(e){const{processedData:t,dataModel:i,axes:n}=this;if(!t||!i||0===t.data.length)return[];const s=n.x,r=n.y,o=i.resolveProcessedDataDefById(this,"xValue"),a=i.getDomain(this,"xValue","key",t),l=i.getDomain(this,"yValueEnd","value",t);return"x"===e?"key"===(null==o?void 0:o.def.type)&&"category"===o.def.valueType?a:Xc(hn(a),s):Xc(r instanceof iu||r instanceof su?l:[l[0]>0?0:l[0],l[1]<0?0:l[1]],r)}createNodeData(){return x(this,null,function*(){var e;const{axes:t,data:i,processedData:{data:n}={},dataModel:s}=this,r=t.x,o=t.y;if(!(r&&o&&i&&s&&this.properties.isValid()))return;const{yKey:a,xKey:l,marker:c,label:h,fill:d,stroke:u,connectMissingData:p}=this.properties,{scale:g}=r,{scale:f}=o,{isContinuousY:m}=this.getScaleInformation({xScale:g,yScale:f}),C=(null!=(e=g.bandwidth)?e:0)/2,b=s.resolveProcessedDataDefsByIds(this,["yValueStart","yValueEnd","yValueRaw","yValuePreviousStart","yValuePreviousEnd","yValueCumulative"]),S=e=>y(v({},e),{point:y(v({},e.point),{moveTo:!0})}),w=(e,t,i)=>{const n=g.convert(e)+C,s=f.convert(t);return[{point:{x:n,y:f.convert(i)},yValue:i,xValue:e},{point:{x:n,y:s},yValue:t,xValue:e}]},x=(e,t,i)=>{let n;return(Pe(this.properties.normalizedTo)?m&&Yo(i):!isNaN(i))&&(n=t),{x:g.convert(e)+C,y:f.convert(n),size:c.size}},E=a,M=[],A=[],{visibleSameStackCount:T}=this.ctx.seriesStateManager.getVisiblePeerGroupIndex(this),D={itemId:E,fillData:{itemId:E,points:[],phantomPoints:[]},strokeData:{itemId:E,points:[]},labelData:M,nodeData:A,scales:this.calculateScaling(),visible:this.visible,stackVisible:T>0},I=D.fillData.points,R=D.fillData.phantomPoints,L=D.strokeData.points;let k,P=-1,N=-1/0;return null==n||n.forEach(e=>{const{keys:t,keys:[i],datum:n,values:r}=e;r.forEach((e,r)=>{var o,g,f;P++;const m=n[r],v=s.resolveProcessedDataDefsValues(b,{keys:t,values:e}),{yValueRaw:y,yValueCumulative:C}=v;let{yValueStart:T,yValueEnd:D,yValuePreviousStart:O,yValuePreviousEnd:_}=v;const F=null!=y,G=x(i,+C,y);if(F&&c&&A.push({index:P,series:this,itemId:E,datum:m,midPoint:{x:G.x,y:G.y},cumulativeValue:D,yValue:y,xValue:i,yKey:a,xKey:l,point:G,fill:null!=(o=c.fill)?o:d,stroke:null!=(g=c.stroke)?g:u,strokeWidth:null!=(f=c.strokeWidth)?f:this.getStrokeWidth(this.properties.strokeWidth)}),F&&h){const e=this.getLabelText(h,{value:y,datum:m,xKey:l,yKey:a,xName:this.properties.xName,yName:this.properties.yName},e=>je(e)?e.toFixed(2):String(e));M.push({index:P,series:this,itemId:a,datum:m,x:G.x,y:G.y,label:e?{text:e,fontStyle:h.fontStyle,fontWeight:h.fontWeight,fontSize:h.fontSize,fontFamily:h.fontFamily,textAlign:"center",textBaseline:"bottom",fill:h.color}:void 0})}const V=null!=k&&null!=i,B=null!=N&&F;B||(T=null!=T?T:0,D=null!=T?T:0,O=null!=O?O:0,_=null!=O?O:0);const[H,z]=w(k,O,_),[U,W]=w(i,T,D);!V||p&&!B||(I.push(H,U),R.push(z,W)),B&&P>0&&L.push(S(H),U),k=i,N=y})}),L.length>0&&(L[0]=S(L[0])),D})}isPathOrSelectionDirty(){return this.properties.marker.isDirty()}markerFactory(){const{shape:e}=this.properties.marker;return new(Od(e))}updatePathNodes(e){return x(this,null,function*(){const{opacity:t,visible:i,animationEnabled:n}=e,[s,r]=e.paths,o=this.getStrokeWidth(this.properties.strokeWidth);r.setProperties({tag:1,fill:void 0,lineJoin:r.lineCap="round",pointerEvents:1,stroke:this.properties.stroke,strokeWidth:o,strokeOpacity:this.properties.strokeOpacity,lineDash:this.properties.lineDash,lineDashOffset:this.properties.lineDashOffset,opacity:t,visible:i}),s.setProperties({tag:0,stroke:void 0,lineJoin:"round",pointerEvents:1,fill:this.properties.fill,fillOpacity:this.properties.fillOpacity,lineDash:this.properties.lineDash,lineDashOffset:this.properties.lineDashOffset,strokeOpacity:this.properties.strokeOpacity,fillShadow:this.properties.shadow,opacity:t,visible:i||n,strokeWidth:o}),hp(this,r),hp(this,s)})}updatePaths(e){return x(this,null,function*(){this.updateAreaPaths(e.paths,e.contextData)})}updateAreaPaths(e,t){this.updateFillPath(e,t),this.updateStrokePath(e,t)}updateFillPath(e,t){const{fillData:i}=t,[n]=e,{path:s}=n;let r;s.clear(!0);for(const{point:e}of N(i.points,function*(e){for(let t=e.length-1;t>=0;t--)yield e[t]}(i.phantomPoints)))e.moveTo?s.moveTo(e.x,e.y):(null==r?void 0:r.y)!==e.y&&(r&&s.lineTo(r.x,r.y),s.lineTo(e.x,e.y)),r=e;r&&s.lineTo(r.x,r.y),s.closePath(),n.checkPathDirty()}updateStrokePath(e,t){const{strokeData:i}=t,[,n]=e,{path:s}=n;s.clear(!0);for(const{point:e}of i.points)e.moveTo?s.moveTo(e.x,e.y):s.lineTo(e.x,e.y);n.checkPathDirty()}updateMarkerSelection(e){return x(this,null,function*(){const{nodeData:t,markerSelection:i}=e;return this.properties.marker.isDirty()&&(i.clear(),i.cleanup()),i.update(this.properties.marker.enabled?t:[])})}updateMarkerNodes(e){return x(this,null,function*(){const{markerSelection:t,isHighlight:i}=e,{xKey:n,yKey:s,marker:r,fill:o,stroke:a,strokeWidth:l,fillOpacity:c,strokeOpacity:h,highlightStyle:d}=this.properties,u=Ze(i&&d.item,r.getStyle(),{fill:o,stroke:a,strokeWidth:l,fillOpacity:c,strokeOpacity:h});t.each((e,t)=>{this.updateMarkerStyle(e,r,{datum:t,highlighted:i,xKey:n,yKey:s},u)}),i||this.properties.marker.markClean()})}updateLabelSelection(e){return x(this,null,function*(){const{labelData:t,labelSelection:i}=e;return i.update(t,e=>{e.tag=3})})}updateLabelNodes(e){return x(this,null,function*(){const{labelSelection:t}=e,{enabled:i,fontStyle:n,fontWeight:s,fontSize:r,fontFamily:o,color:a}=this.properties.label;t.each((e,t)=>{const{x:l,y:c,label:h}=t;h&&i&&this.visible?(e.fontStyle=n,e.fontWeight=s,e.fontSize=r,e.fontFamily=o,e.textAlign=h.textAlign,e.textBaseline=h.textBaseline,e.text=h.text,e.x=l,e.y=c-10,e.fill=a,e.visible=!0):e.visible=!1})})}getTooltipHtml(e){const{id:t,axes:i,dataModel:n}=this,{xKey:s,xName:r,yName:o,tooltip:a,marker:l}=this.properties,{yKey:c,xValue:h,yValue:d,datum:u,itemId:p}=e,g=i.x,f=i.y;if(!this.properties.isValid()||!(g&&f&&je(d))||!n)return nl;const m=g.formatDatum(h),v=f.formatDatum(d),y=_u(o),C=_u(m+": "+v),b=Ze({fill:this.properties.fill},l.getStyle(),{stroke:this.properties.stroke,strokeWidth:this.properties.strokeWidth}),{fill:S}=this.getMarkerStyle(l,{datum:e,xKey:s,yKey:c,highlighted:!1},b);return a.toTooltipHtml({title:y,content:C,backgroundColor:S},{datum:u,itemId:p,xKey:s,xName:r,yKey:c,yName:o,color:S,title:y,seriesId:t})}getLegendData(e){var t,i,n,s;if(!(null==(t=this.data)?void 0:t.length)||!this.properties.isValid()||"category"!==e)return[];const{yKey:r,yName:o,fill:a,stroke:l,fillOpacity:c,strokeOpacity:h,strokeWidth:d,lineDash:u,marker:p,visible:g}=this.properties,f=!p.enabled||void 0===p.fill;return[{legendType:e,id:this.id,itemId:r,seriesId:this.id,enabled:g,label:{text:null!=o?o:r},marker:{shape:p.shape,fill:f?a:p.fill,fillOpacity:f?c:p.fillOpacity,stroke:null!=(i=p.stroke)?i:l,strokeOpacity:null!=(n=p.strokeOpacity)?n:h,strokeWidth:null!=(s=p.strokeWidth)?s:0,enabled:p.enabled||d<=0},line:{stroke:l,strokeOpacity:h,strokeWidth:d,lineDash:u}}]}animateEmptyUpdateReady(e){const{markerSelection:t,labelSelection:i,contextData:n,paths:s}=e,{animationManager:r}=this.ctx;this.updateAreaPaths(s,n),op(this,r,...s),va([t],Zu),qu(this,r,t),Fu(this,"labels",r,i)}animateReadyResize(e){const{contextData:t,paths:i}=e;this.updateAreaPaths(i,t),super.animateReadyResize(e)}animateWaitingUpdateReady(e){var t,i;const{animationManager:n}=this.ctx,{markerSelection:s,labelSelection:r,contextData:o,paths:a,previousContextData:l}=e,[c,h]=a;if(null==c&&null==h)return;super.resetAllAnimation(e);const d=()=>{this.updateAreaPaths(a,o),this.updateStrokePath(a,o)};if(null==o||null==l)return d(),$u(this,n,"added",s),ap(this,"fill_path_properties",n,"add",c),ap(this,"stroke",n,"trailing",h),void Fu(this,"labels",n,r);const u=Ap(o,l,null==(i=null==(t=this.processedData)?void 0:t.reduced)?void 0:i.diff);if(void 0===u)return n.skipCurrentBatch(),void d();"no-op"!==u.status&&($u(this,n,void 0,s),ks(this.id,"fill_path_properties",n,[c],u.fill.pathProperties),Nu(this.id,"fill_path_update",n,[c],u.fill.path),this.updateStrokePath(a,o),ap(this,"stroke",n,"trailing",h),Fu(this,"labels",n,r))}isLabelEnabled(){return this.properties.label.enabled}nodeFactory(){return new Mo}getFormattedMarkerStyle(e){const{xKey:t,yKey:i}=e;return this.getMarkerStyle(this.properties.marker,{datum:e,xKey:t,yKey:i,highlighted:!0})}computeFocusBounds(e){return Ju(this,e)}};Tp.className="AreaSeries",Tp.type="area";var Dp={type:"series",optionsKey:"series[]",packageType:"community",chartTypes:["cartesian"],identifier:"area",instanceConstructor:Tp,stackable:!0,defaultAxes:[{type:"number",position:"left"},{type:"category",position:"bottom"}],themeTemplate:{series:{__extends__:jt,nodeClickRange:"nearest",tooltip:{position:{type:"node"}},fillOpacity:.8,strokeOpacity:1,strokeWidth:0,lineDash:[0],lineDashOffset:0,shadow:{enabled:!1,color:ii,xOffset:3,yOffset:3,blur:5},marker:{__extends__:Kt,enabled:!1,fillOpacity:1,strokeOpacity:1,strokeWidth:0},label:{enabled:!1,fontSize:12,fontFamily:$t,color:Yt}}},paletteFactory:e=>{const{marker:t}=Pu(e);return{fill:t.fill,stroke:t.stroke,marker:t}}};function*Ip(e){for(const t of e.children)yield t}function Rp(e,t){for(const i of t){const t=i.datum;void 0===t?_.error("undefined datum"):e.addValue(i,t)}}function Lp(e,t){const{x:i,y:n}=e.contentGroup.transformPoint(t.x,t.y),{nearest:s,distanceSquared:r}=e.getQuadTree().find(i,n);if(void 0!==s)return{datum:s.value,distance:Math.sqrt(r)}}var kp=class extends jd{constructor(){super(...arguments),this.direction="vertical"}};S([Ys(Nr)],kp.prototype,"direction",2);var Pp=class extends Kd{constructor(){super(...arguments),this.groupScale=new Ks,this.smallestDataInterval=void 0}getBandScalePadding(){return{inner:.2,outer:.1}}shouldFlipXY(){return!this.isVertical()}isVertical(){return"vertical"===this.properties.direction}getBarDirection(){return this.shouldFlipXY()?"x":"y"}getCategoryDirection(){return this.shouldFlipXY()?"y":"x"}getValueAxis(){const e=this.getBarDirection();return this.axes[e]}getCategoryAxis(){const e=this.getCategoryDirection();return this.axes[e]}updateGroupScale(e){const{groupScale:t,smallestDataInterval:i,ctx:{seriesStateManager:n}}=this,s=e.scale,r=Zr.is(s)?s.calcBandwidth(i):s.bandwidth,o=[],{index:a,visibleGroupCount:l}=n.getVisiblePeerGroupIndex(this);for(let e=0;e<l;e++)o.push(String(e));return t.domain=o,t.range=[0,null!=r?r:0],e instanceof Il?t.paddingInner=e.groupPaddingInner:t.padding=e instanceof Bl?.1:0,t.round=0!==t.padding,{barWidth:t.bandwidth>=1?t.bandwidth:t.rawBandwidth,groupIndex:a}}resolveKeyDirection(e){return"x"===this.getBarDirection()?"x"===e?"y":"x":e}initQuadTree(e){Rp(e,this.datumNodesIter())}pickNodeClosestDatum(e){return Lp(this,e)}},Np=class extends Ho{constructor(){super(...arguments),this.placement="inside"}};S([Ys(Or)],Np.prototype,"placement",2);var Op=class extends kp{constructor(){super(...arguments),this.fill="#c16068",this.fillOpacity=1,this.stroke="#874349",this.strokeWidth=1,this.strokeOpacity=1,this.lineDash=[0],this.lineDashOffset=0,this.cornerRadius=0,this.shadow=new Hu,this.label=new Np,this.tooltip=new ju}};function _p({rect:e,config:t}){const{crisp:i=!0,fill:n,stroke:s,strokeWidth:r,fillOpacity:o,strokeOpacity:a,lineDash:l,lineDashOffset:c,fillShadow:h,cornerRadius:d=0,topLeftCornerRadius:u=!0,topRightCornerRadius:p=!0,bottomRightCornerRadius:g=!0,bottomLeftCornerRadius:f=!0,visible:m=!0}=t;e.crisp=i,e.fill=n,e.stroke=s,e.strokeWidth=r,e.fillOpacity=o,e.strokeOpacity=a,e.lineDash=l,e.lineDashOffset=c,e.fillShadow=h,e.topLeftCornerRadius=u?d:0,e.topRightCornerRadius=p?d:0,e.bottomRightCornerRadius=g?d:0,e.bottomLeftCornerRadius=f?d:0,e.visible=m}function Fp(e){var t,i,n,s,r,o,a=e,{datum:l,isHighlighted:c,style:h,highlightStyle:d,formatter:u,seriesId:p,ctx:{callbackCache:g}}=a,f=C(a,["datum","isHighlighted","style","highlightStyle","formatter","seriesId","ctx"]);const{fill:m,fillOpacity:y,stroke:b,strokeWidth:S}=Ze(c&&d,h),{strokeOpacity:w,fillShadow:x,lineDash:E,lineDashOffset:M,cornerRadius:A=0,topLeftCornerRadius:T=!0,topRightCornerRadius:D=!0,bottomRightCornerRadius:I=!0,bottomLeftCornerRadius:R=!0}=h;let L;return u&&(L=g.call(u,v({datum:l.datum,xKey:l.xKey,fill:m,stroke:b,strokeWidth:S,cornerRadius:A,highlighted:c,seriesId:p},f))),{fill:null!=(t=null==L?void 0:L.fill)?t:m,stroke:null!=(i=null==L?void 0:L.stroke)?i:b,strokeWidth:null!=(n=null==L?void 0:L.strokeWidth)?n:S,fillOpacity:null!=(s=null==L?void 0:L.fillOpacity)?s:y,strokeOpacity:null!=(r=null==L?void 0:L.strokeOpacity)?r:w,lineDash:E,lineDashOffset:M,fillShadow:x,cornerRadius:null!=(o=null==L?void 0:L.cornerRadius)?o:A,topLeftCornerRadius:T,topRightCornerRadius:D,bottomRightCornerRadius:I,bottomLeftCornerRadius:R}}function Gp(e=[]){const[t,i]=e;return!(0!==t||1!==i)}S([Ys(ir)],Op.prototype,"xKey",2),S([Ys(ir,{optional:!0})],Op.prototype,"xName",2),S([Ys(ir)],Op.prototype,"yKey",2),S([Ys(ir,{optional:!0})],Op.prototype,"yName",2),S([Ys(ir,{optional:!0})],Op.prototype,"stackGroup",2),S([Ys(nr,{optional:!0})],Op.prototype,"normalizedTo",2),S([Ys(vr)],Op.prototype,"fill",2),S([Ys(or)],Op.prototype,"fillOpacity",2),S([Ys(vr)],Op.prototype,"stroke",2),S([Ys(rr)],Op.prototype,"strokeWidth",2),S([Ys(or)],Op.prototype,"strokeOpacity",2),S([Ys(Ar)],Op.prototype,"lineDash",2),S([Ys(rr)],Op.prototype,"lineDashOffset",2),S([Ys(rr)],Op.prototype,"cornerRadius",2),S([Ys(tr,{optional:!0})],Op.prototype,"formatter",2),S([Ys(Qs,{optional:!0})],Op.prototype,"shadow",2),S([Ys(Qs)],Op.prototype,"label",2),S([Ys(Qs)],Op.prototype,"tooltip",2);var Vp=e=>{var t;return Yn(null!=(t=e.yValue)?t:0)};function Bp(e,t,i){const{startingX:n,startingY:s}=function(e,t){const i=t[e?"y":"x"];let n=1/0,s=0;return i?(e?s=i.scale.convert(Zr.is(i.scale)?0:Math.max(...i.range)):n=i.scale.convert(Zr.is(i.scale)?0:Math.min(...i.range)),{startingX:n,startingY:s}):{startingX:n,startingY:s}}(e,t);return{isVertical:e,calculate:(t,i)=>{let r=e?t.x:n,o=e?s:t.y,a=e?t.width:0,l=e?0:t.height;const{opacity:c}=t;let h;return i&&(isNaN(r)||isNaN(o))&&(({x:r,y:o}=i),a=e?i.width:0,l=e?0:i.height,e&&!Vp(i)?o+=i.height:!e&&Vp(i)&&(r+=i.width)),h=null==t.clipBBox?void 0:Vp(t)?e?new is(r,o-l,a,l):new is(r-a,o,a,l):new is(r,o,a,l),{x:r,y:o,width:a,height:l,clipBBox:h,opacity:c}},mode:i}}function Hp(e,t){return{isVertical:e,calculate:t=>({x:e?t.x:t.x+t.width/2,y:e?t.y+t.height/2:t.y,width:e?t.width:0,height:e?0:t.height,clipBBox:t.clipBBox,opacity:t.opacity}),mode:t}}function zp(e){const t=e=>null==e||isNaN(e.x)||isNaN(e.y);return{toFn:(i,n,s)=>{let r;return r="removed"===s&&null==i.datum&&"fade"===e.mode?y(v({},Up(0,n)),{opacity:0}):"removed"===s||t(n)?e.calculate(n,i.previousDatum):{x:n.x,y:n.y,width:n.width,height:n.height,clipBBox:n.clipBBox,opacity:n.opacity},r},fromFn:(i,n,s)=>{let r;"updated"===s&&t(n)?s="removed":"updated"===s&&t(i.previousDatum)&&(s="added"),r="added"===s&&null==i.previousDatum&&"fade"===e.mode?y(v({},Up(0,n)),{opacity:0}):"unknown"===s||"added"===s?e.calculate(n,i.previousDatum):{x:i.x,y:i.y,width:i.width,height:i.height,clipBBox:i.clipBBox,opacity:i.opacity};const o=Ls[s];return y(v({},r),{phase:o})}}}function Up(e,{x:t,y:i,width:n,height:s,clipBBox:r,opacity:o}){return{x:t,y:i,width:n,height:s,clipBBox:r,opacity:o}}function Wp(e,t,i){if(void 0===e)return;const{x:n,y:s,width:r,height:o}=e;return t.inverseTransformBBox(new is(n,s,r,o)).clip(i)}function jp(e,t,i){if(t.enabled&&i){const{x:n,y:s,text:r,textAlign:o,textBaseline:a}=i,{color:l,fontStyle:c,fontWeight:h,fontSize:d,fontFamily:u}=t;e.setProperties({visible:!0,x:n,y:s,text:r,fill:l,fontStyle:c,fontWeight:h,fontSize:d,fontFamily:u,textAlign:o,textBaseline:a})}else e.visible=!1}function Kp({isPositive:e,isVertical:t,placement:i,padding:n=0,rect:s}){let r=s.x+s.width/2,o=s.y+s.height/2,a="center",l="middle";switch(i){case"start":t?(o=e?s.y+s.height+n:s.y-n,l=e?"top":"bottom"):(r=e?s.x-n:s.x+s.width+n,a=e?"start":"end");break;case"outside":case"end":t?(o=e?s.y-n:s.y+s.height+n,l=e?"bottom":"top"):(r=e?s.x+s.width+n:s.x-n,a=e?"start":"end")}return{x:r,y:o,textAlign:a,textBaseline:l}}var $p=class extends Pp{constructor(e){super({moduleCtx:e,directionKeys:zd,directionNames:Ud,pickModes:[0],pathsPerSeries:0,hasHighlightedLabels:!0,datumSelectionGarbageCollection:!1,animationAlwaysUpdateSelections:!0,animationResetFns:{datum:Up,label:Vu}}),this.properties=new Op}processData(e){return x(this,null,function*(){var t,i,n;if(!this.properties.isValid()||!this.data)return;const{seriesGrouping:{groupIndex:s=this.id}={},data:r=[]}=this,{xKey:o,yKey:a,normalizedTo:l}=this.properties,c=!this.ctx.animationManager.isSkipped(),h=null==(t=this.getCategoryAxis())?void 0:t.scale,d=null==(i=this.getValueAxis())?void 0:i.scale,{isContinuousX:u,xScaleType:p,yScaleType:g}=this.getScaleInformation({xScale:h,yScale:d}),f=`bar-stack-${s}-yValues`,m=`${f}-trailing`,y=[];je(l)&&y.push(Rh([f,m],Math.abs(l),"range")),c&&this.processedData&&y.push(Fh(this.processedData)),c&&y.push(Ph());const C=this.visible?{}:{forceValue:0},{processedData:b}=yield this.requestDataModel(e,r,{props:[Wh(o,p,{id:"xValue"}),jh(a,g,v({id:"yValue-raw",invalidValue:null},C)),...qh(a,"normal","current",v({id:"yValue-end",rangeId:"yValue-range",invalidValue:null,missingValue:0,groupId:f,separateNegative:!0},C),g),...qh(a,"trailing","current",v({id:"yValue-start",invalidValue:null,missingValue:0,groupId:m,separateNegative:!0},C),g),...u?[Th]:[],...y],groupByKeys:!0,groupByData:!1});this.smallestDataInterval=null==(n=b.reduced)?void 0:n.smallestKeyInterval,this.animationState.transition("updateData")})}getSeriesDomain(e){var t;const{processedData:i,dataModel:n,smallestDataInterval:s}=this;if(!i||!n||0===i.data.length)return[];const r=this.getCategoryAxis(),o=this.getValueAxis(),a=n.resolveProcessedDataDefById(this,"xValue"),l=n.getDomain(this,"xValue","key",i),c=n.getDomain(this,"yValue-end","value",i);if(e===this.getCategoryDirection()){if("key"===(null==a?void 0:a.def.type)&&"category"===a.def.valueType)return l;const e=je(s)?.5*s:0,i=null!=(t=hn(l))?t:[NaN,NaN];return Xc([i[0]+-e,i[1]+e],r)}return this.getValueAxis()instanceof iu?Xc(c,o):Xc([Math.min(0,c[0]),Math.max(0,c[1])],o)}createNodeData(){return x(this,null,function*(){const{dataModel:e}=this,t=this.getCategoryAxis(),i=this.getValueAxis();if(!(e&&t&&i&&this.properties.isValid()))return;const n=t.scale,s=i.scale,{xKey:r,yKey:o,xName:a,yName:l,fill:c,stroke:h,strokeWidth:d,cornerRadius:u,legendItemName:p,label:g}=this.properties,f=i.isReversed(),{barWidth:m,groupIndex:y}=this.updateGroupScale(t),C=Zr.is(n)?-.5*m:0,b=e.resolveProcessedDataIndexById(this,"xValue"),S=e.resolveProcessedDataIndexById(this,"yValue-raw"),w=e.resolveProcessedDataIndexById(this,"yValue-start"),x=e.resolveProcessedDataIndexById(this,"yValue-end"),E=e.resolveProcessedDataIndexById(this,"yValue-range"),M=!this.ctx.animationManager.isSkipped(),A={itemId:o,nodeData:[],labelData:[],scales:this.calculateScaling(),visible:this.visible||M},{groupScale:T,processedData:D}=this;return null==D||D.data.forEach(({keys:e,datum:t,values:i,aggValues:M})=>{i.forEach((i,D)=>{var I;const R=e[b],L=n.convert(R),k=+i[x],P=+i[w],N=i[S],O=N>=0&&!Object.is(N,-0),_=O!==f,F=null!=(I=null==M?void 0:M[E][O?1:0])?I:0,G=L+T.convert(String(y))+C;if(isNaN(k))return;const V=s.convert(k),B=s.convert(P),H="x"===this.getBarDirection(),z=s.convert(F),U=s.convert(0),W={x:H?Math.min(V,B):G,y:H?G:Math.min(V,B),width:H?Math.abs(B-V):m,height:H?m:Math.abs(B-V)},j=new is(W.x,W.y,W.width,W.height),K={x:H?Math.min(U,z):G,y:H?G:Math.min(U,z),width:H?Math.abs(U-z):m,height:H?m:Math.abs(U-z),clipBBox:j},{fontStyle:$,fontWeight:Y,fontSize:q,fontFamily:X,color:Z,placement:Q}=g,J=this.getLabelText(this.properties.label,{datum:t[D],value:N,xKey:r,yKey:o,xName:a,yName:l,legendItemName:p},e=>je(e)?e.toFixed(2):String(e)),ee=J?v({text:J,fill:Z,fontStyle:$,fontWeight:Y,fontSize:q,fontFamily:X},Kp({isPositive:O,isVertical:!H,placement:Q,rect:W})):void 0,te=this.shouldFlipXY()?W.height:W.width,ie={series:this,itemId:o,datum:t[D],valueIndex:D,cumulativeValue:k,xValue:R,yValue:N,yKey:o,xKey:r,capDefaults:{lengthRatioMultiplier:te,lengthMax:te},x:K.x,y:K.y,width:K.width,height:K.height,midPoint:{x:W.x+W.width/2,y:W.y+W.height/2},fill:c,stroke:h,opacity:1,strokeWidth:d,cornerRadius:u,topLeftCornerRadius:H!==_,topRightCornerRadius:_,bottomRightCornerRadius:H===_,bottomLeftCornerRadius:!_,clipBBox:j,label:ee,missing:null==N};A.nodeData.push(ie),A.labelData.push(ie)})}),A})}nodeFactory(){return new cu}updateDatumSelection(e){return x(this,null,function*(){return e.datumSelection.update(e.nodeData,e=>{e.tag=0},e=>Gh(e.xValue,e.valueIndex))})}updateDatumNodes(e){return x(this,null,function*(){if(!this.properties.isValid())return;const{yKey:t,stackGroup:i,fill:n,fillOpacity:s,stroke:r,strokeWidth:o,strokeOpacity:a,lineDash:l,lineDashOffset:c,formatter:h,shadow:d,highlightStyle:{item:u}}=this.properties,p=this.axes.x,g=Gp(null==p?void 0:p.visibleRange),f="x"===this.getCategoryDirection();e.datumSelection.each((p,m)=>{var v,y,C,b;const S={fill:n,stroke:r,fillOpacity:s,strokeOpacity:a,lineDash:l,lineDashOffset:c,fillShadow:d,strokeWidth:this.getStrokeWidth(o),cornerRadius:m.cornerRadius,topLeftCornerRadius:m.topLeftCornerRadius,topRightCornerRadius:m.topRightCornerRadius,bottomRightCornerRadius:m.bottomRightCornerRadius,bottomLeftCornerRadius:m.bottomLeftCornerRadius},w=f?(null!=(y=null==(v=m.clipBBox)?void 0:v.width)?y:m.width)>0:(null!=(b=null==(C=m.clipBBox)?void 0:C.height)?b:m.height)>0,x=Fp({datum:m,ctx:this.ctx,seriesId:this.id,isHighlighted:e.isHighlight,highlightStyle:u,yKey:t,style:S,formatter:h,stackGroup:i});x.crisp=g,x.visible=w,_p({rect:p,config:x})})})}updateLabelSelection(e){return x(this,null,function*(){const t=this.isLabelEnabled()?e.labelData:[];return e.labelSelection.update(t,e=>{e.tag=1,e.pointerEvents=1})})}updateLabelNodes(e){return x(this,null,function*(){e.labelSelection.each((e,t)=>{jp(e,this.properties.label,t.label)})})}getTooltipHtml(e){var t;const{id:i,processedData:n,ctx:{callbackCache:s}}=this,r=this.getCategoryAxis(),o=this.getValueAxis();if(!(n&&this.properties.isValid()&&r&&o))return nl;const{xKey:a,yKey:l,xName:c,yName:h,fill:d,stroke:u,strokeWidth:p,tooltip:g,formatter:f,stackGroup:m,legendItemName:y}=this.properties,{xValue:C,yValue:b,datum:S,itemId:w}=e,x=r.formatDatum(C),E=o.formatDatum(b),M=_u(h),A=_u(x+": "+E);let T;f&&(T=s.call(f,{seriesId:i,datum:S,xKey:a,yKey:l,stackGroup:m,fill:d,stroke:u,strokeWidth:this.getStrokeWidth(p),highlighted:!1}));const D=null!=(t=null==T?void 0:T.fill)?t:d;return g.toTooltipHtml({title:M,content:A,backgroundColor:D},v({seriesId:i,itemId:w,datum:S,xKey:a,yKey:l,xName:c,yName:h,stackGroup:m,title:M,color:D,legendItemName:y},this.getModuleTooltipParams()))}getLegendData(e){var t,i;const{showInLegend:n}=this.properties;if("category"!==e||!(null==(t=this.data)?void 0:t.length)||!this.properties.isValid()||!n)return[];const{yKey:s,yName:r,fill:o,stroke:a,strokeWidth:l,fillOpacity:c,strokeOpacity:h,legendItemName:d,visible:u}=this.properties;return[{legendType:"category",id:this.id,itemId:s,seriesId:this.id,enabled:u,label:{text:null!=(i=null!=d?d:r)?i:s},marker:{fill:o,fillOpacity:c,stroke:a,strokeWidth:l,strokeOpacity:h},legendItemName:d}]}animateEmptyUpdateReady({datumSelection:e,labelSelection:t,annotationSelections:i}){const n=zp(Bp(this.isVertical(),this.axes,"normal"));ks(this.id,"nodes",this.ctx.animationManager,[e],n),Fu(this,"labels",this.ctx.animationManager,t),Fu(this,"annotations",this.ctx.animationManager,...i)}animateWaitingUpdateReady(e){var t,i,n;const{datumSelection:s,labelSelection:r,annotationSelections:o,previousContextData:a}=e;this.ctx.animationManager.stopByAnimationGroupId(this.id);const l=null==(i=null==(t=this.processedData)?void 0:t.reduced)?void 0:i.diff,c=null==a?"fade":"normal",h=zp(Bp(this.isVertical(),this.axes,c));ks(this.id,"nodes",this.ctx.animationManager,[s],h,(e,t)=>Gh(t.xValue,t.valueIndex),l),(null==(n=null==l?void 0:l.changed)||n)&&(Fu(this,"labels",this.ctx.animationManager,r),Fu(this,"annotations",this.ctx.animationManager,...o))}isLabelEnabled(){return this.properties.label.enabled}computeFocusBounds({datumIndex:e,seriesRect:t}){var i;return Wp(null==(i=this.contextNodeData)?void 0:i.nodeData[e].clipBBox,this.contentGroup,t)}};$p.className="BarSeries",$p.type="bar";var Yp={type:"series",optionsKey:"series[]",packageType:"community",chartTypes:["cartesian"],identifier:"bar",instanceConstructor:$p,stackable:!0,groupable:!0,defaultAxes:[{type:"number",position:"left"},{type:"category",position:"bottom"}],swapDefaultAxesCondition:e=>"horizontal"===(null==e?void 0:e.direction),themeTemplate:{series:{__extends__:jt,direction:"vertical",fillOpacity:1,strokeWidth:0,lineDash:[0],lineDashOffset:0,label:{enabled:!1,fontWeight:"normal",fontSize:12,fontFamily:$t,color:Xt,placement:"inside"},shadow:{enabled:!1,color:ii,xOffset:3,yOffset:3,blur:5}}},enterpriseThemeTemplate:{series:{errorBar:{cap:{lengthRatio:.3}}}},paletteFactory:ku},qp=e=>{const t=fs.fromString(e),[i,n,s]=fs.RGBtoOKLCH(t.r,t.g,t.b);return{l:i,c:n,h:s,a:t.a}},Xp=class{constructor(){this.type="color",this.invalid=!0,this.domain=[0,1],this.range=["red","blue"],this.parsedRange=this.range.map(qp)}update(){const{domain:e,range:t}=this;e.length<2&&(_.warnOnce("`colorDomain` should have at least 2 values."),0===e.length?e.push(0,1):1===e.length&&e.push(e[0]+1));for(let t=1;t<e.length;t++)if(e[t-1]>=e[t]){_.warnOnce("`colorDomain` values should be supplied in ascending order."),e.sort((e,t)=>e-t);break}if(t.length<e.length)for(let i=t.length;i<e.length;i++)t.push(t.length>0?t[0]:"black");this.parsedRange=this.range.map(qp)}convert(e){this.refresh();const{domain:t,range:i,parsedRange:n}=this,s=t[0],r=t.at(-1),o=i[0],a=i[i.length-1];if(e<=s)return o;if(e>=r)return a;let l,c;if(2===t.length){const t=(e-s)/(r-s),n=1/(i.length-1);l=i.length<=2?0:Math.min(Math.floor(t*(i.length-1)),i.length-2),c=(t-l*n)/n}else{for(l=0;l<t.length-2&&!(e<t[l+1]);l++);const i=t[l];c=(e-i)/(t[l+1]-i)}return((e,t,i)=>{let n,s;if(i=Un(0,i,1),Number.isNaN(e.h)&&Number.isNaN(t.h))n=0,s=0;else if(Number.isNaN(e.h))n=t.h,s=t.c;else if(Number.isNaN(t.h))n=e.h,s=e.c;else{const r=e.h;let o=t.h;const a=t.h-e.h;a>180?o-=360:a<-180&&(o+=360),n=r*(1-i)+o*i,s=e.c*(1-i)+t.c*i}const r=e.l*(1-i)+t.l*i,o=e.a*(1-i)+t.a*i;return fs.fromOKLCH(r,s,n,o)})(n[l],n[l+1],c).toRgbaString()}refresh(){this.invalid&&(this.invalid=!1,this.update(),this.invalid&&_.warnOnce("Expected update to not invalidate scale"))}};S([Ws],Xp.prototype,"domain",2),S([Ws],Xp.prototype,"range",2);var Zp=class extends Uu{constructor(){super(...arguments),this.maxSize=30}};S([Ys(rr),rs({redraw:3})],Zp.prototype,"maxSize",2),S([Ys(br,{optional:!0}),rs({redraw:3})],Zp.prototype,"domain",2);var Qp=class extends Ho{constructor(){super(...arguments),this.placement="top"}};S([Ys(Fr)],Qp.prototype,"placement",2);var Jp=class extends jd{constructor(){super(...arguments),this.colorRange=["#ffff00","#00ff00","#0000ff"],this.marker=new Zp,this.label=new Qp,this.tooltip=new ju}};S([Ys(ir)],Jp.prototype,"xKey",2),S([Ys(ir)],Jp.prototype,"yKey",2),S([Ys(ir)],Jp.prototype,"sizeKey",2),S([Ys(ir,{optional:!0})],Jp.prototype,"labelKey",2),S([Ys(ir,{optional:!0})],Jp.prototype,"colorKey",2),S([Ys(ir,{optional:!0})],Jp.prototype,"xName",2),S([Ys(ir,{optional:!0})],Jp.prototype,"yName",2),S([Ys(ir,{optional:!0})],Jp.prototype,"sizeName",2),S([Ys(ir,{optional:!0})],Jp.prototype,"labelName",2),S([Ys(ir,{optional:!0})],Jp.prototype,"colorName",2),S([Ys(br,{optional:!0})],Jp.prototype,"colorDomain",2),S([Ys(yr)],Jp.prototype,"colorRange",2),S([Ys(ir,{optional:!0})],Jp.prototype,"title",2),S([Ys(Qs)],Jp.prototype,"marker",2),S([Ys(Qs)],Jp.prototype,"label",2),S([Ys(Qs)],Jp.prototype,"tooltip",2);var eg=class extends Wd{constructor(e,t,i,n){super(e,t,i,n),this.sizeKey=n.properties.sizeKey}},tg=class extends Kd{constructor(e){super({moduleCtx:e,directionKeys:zd,directionNames:Ud,pickModes:[2,3,0],pathsPerSeries:0,hasMarkers:!0,markerSelectionGarbageCollection:!1,animationResetFns:{label:Vu,marker:Xu}}),this.NodeEvent=eg,this.properties=new Jp,this.sizeScale=new Qd,this.colorScale=new Xp}processData(e){return x(this,null,function*(){var t,i,n,s;if(!this.properties.isValid()||null==this.data||!this.visible)return;const r=null==(t=this.axes.x)?void 0:t.scale,o=null==(i=this.axes.y)?void 0:i.scale,{xScaleType:a,yScaleType:l}=this.getScaleInformation({xScale:r,yScale:o}),c=this.colorScale.type,h=this.sizeScale.type,{xKey:d,yKey:u,sizeKey:p,labelKey:g,colorDomain:f,colorRange:m,colorKey:v,marker:y}=this.properties,{dataModel:C,processedData:b}=yield this.requestDataModel(e,this.data,{props:[Wh(d,a,{id:"xKey-raw"}),Wh(u,l,{id:"yKey-raw"}),...g?[Wh(g,"band",{id:"labelKey-raw"})]:[],jh(d,a,{id:"xValue"}),jh(u,l,{id:"yValue"}),jh(p,h,{id:"sizeValue"}),...v?[jh(v,c,{id:"colorValue"})]:[],...g?[jh(g,"band",{id:"labelValue"})]:[]]}),S=C.resolveProcessedDataIndexById(this,"sizeValue"),w=null!=(n=b.domain.values[S])?n:[];if(this.sizeScale.domain=y.domain?y.domain:w,v){const e=C.resolveProcessedDataIndexById(this,"colorValue");this.colorScale.domain=null!=(s=null!=f?f:b.domain.values[e])?s:[],this.colorScale.range=m,this.colorScale.update()}this.animationState.transition("updateData")})}getSeriesDomain(e){const{dataModel:t,processedData:i}=this;if(!i||!t)return[];const n="x"===e?"xValue":"yValue",s=t.resolveProcessedDataDefById(this,n),r=t.getDomain(this,n,"value",i);if("value"===(null==s?void 0:s.def.type)&&"category"===(null==s?void 0:s.def.valueType))return r;const o=this.axes[e];return Xc(hn(r),o)}createNodeData(){return x(this,null,function*(){var e,t,i;const{axes:n,dataModel:s,processedData:r,colorScale:o,sizeScale:a}=this,{xKey:l,yKey:c,sizeKey:h,labelKey:d,xName:u,yName:p,sizeName:g,labelName:f,label:m,colorKey:y,marker:C,visible:b}=this.properties,S=Od(C.shape),{placement:w}=m,x=n.x,E=n.y;if(!(s&&r&&b&&x&&E))return;const M=s.resolveProcessedDataIndexById(this,"xValue"),A=s.resolveProcessedDataIndexById(this,"yValue"),T=h?s.resolveProcessedDataIndexById(this,"sizeValue"):-1,D=y?s.resolveProcessedDataIndexById(this,"colorValue"):-1,I=d?s.resolveProcessedDataIndexById(this,"labelValue"):-1,R=x.scale,L=E.scale,k=(null!=(e=R.bandwidth)?e:0)/2,P=(null!=(t=L.bandwidth)?t:0)/2,N=[];a.range=[C.size,C.maxSize];const O=m.getFont();for(const{values:e,datum:t}of null!=(i=r.data)?i:[]){const i=e[M],n=e[A],s=R.convert(i)+k,r=L.convert(n)+P,b=this.getLabelText(m,{value:d?e[I]:n,datum:t,xKey:l,yKey:c,sizeKey:h,labelKey:d,xName:u,yName:p,sizeName:g,labelName:f}),x=Go.getTextSize(String(b),O),E=h?a.convert(e[T]):C.size,_=y?o.convert(e[D]):void 0;N.push({series:this,itemId:c,yKey:c,xKey:l,datum:t,xValue:i,yValue:n,sizeValue:e[T],point:{x:s,y:r,size:E},midPoint:{x:s,y:r},fill:_,label:v({text:b},x),marker:S,placement:w})}return{itemId:c,nodeData:N,labelData:N,scales:this.calculateScaling(),visible:this.visible}})}isPathOrSelectionDirty(){return this.properties.marker.isDirty()}getLabelData(){var e,t;return null!=(t=null==(e=this.contextNodeData)?void 0:e.labelData)?t:[]}markerFactory(){const{shape:e}=this.properties.marker;return new(Od(e))}updateMarkerSelection(e){return x(this,null,function*(){const{nodeData:t,markerSelection:i}=e;this.properties.marker.isDirty()&&(i.clear(),i.cleanup());const n=this.properties.marker.enabled?t:[];return i.update(n,void 0,e=>Gh([e.xValue,e.yValue,e.label.text]))})}updateMarkerNodes(e){return x(this,null,function*(){const{markerSelection:t,isHighlight:i}=e,{xKey:n,yKey:s,sizeKey:r,labelKey:o,marker:a}=this.properties,l=Ze(i&&this.properties.highlightStyle.item,a.getStyle());this.sizeScale.range=[a.size,a.maxSize],t.each((e,t)=>{this.updateMarkerStyle(e,a,{datum:t,highlighted:i,xKey:n,yKey:s,sizeKey:r,labelKey:o},l)}),i||this.properties.marker.markClean()})}updateLabelSelection(e){return x(this,null,function*(){var t,i;const n=this.properties.label.enabled&&null!=(i=null==(t=this.chart)?void 0:t.placeLabels().get(this))?i:[];return e.labelSelection.update(n.map(e=>y(v({},e.datum),{point:{x:e.x,y:e.y,size:e.datum.point.size}})))})}updateLabelNodes(e){return x(this,null,function*(){const{label:t}=this.properties;e.labelSelection.each((e,i)=>{var n,s,r,o;e.text=i.label.text,e.fill=t.color,e.x=null!=(s=null==(n=i.point)?void 0:n.x)?s:0,e.y=null!=(o=null==(r=i.point)?void 0:r.y)?o:0,e.fontStyle=t.fontStyle,e.fontWeight=t.fontWeight,e.fontSize=t.fontSize,e.fontFamily=t.fontFamily,e.textAlign="left",e.textBaseline="top"})})}getTooltipHtml(e){var t;const i=this.axes.x,n=this.axes.y;if(!this.properties.isValid()||!i||!n)return nl;const{xKey:s,yKey:r,sizeKey:o,labelKey:a,xName:l,yName:c,sizeName:h,labelName:d,marker:u,tooltip:p}=this.properties,g=null!=(t=this.properties.title)?t:c,f=Ze({fill:e.fill,strokeWidth:this.getStrokeWidth(u.strokeWidth)},u.getStyle()),{fill:m="gray"}=this.getMarkerStyle(u,{datum:e,highlighted:!1,xKey:s,yKey:r,sizeKey:o,labelKey:a},f),{datum:v,xValue:y,yValue:C,sizeValue:b,label:{text:S},itemId:w}=e,x=_u(i.formatDatum(y)),E=_u(n.formatDatum(C));let M=`<b>${_u(null!=l?l:s)}</b>: ${x}<br><b>${_u(null!=c?c:r)}</b>: ${E}`;return o&&(M+=`<br><b>${_u(null!=h?h:o)}</b>: ${_u(String(b))}`),a&&(M=`<b>${_u(null!=d?d:a)}</b>: ${_u(S)}<br>`+M),p.toTooltipHtml({title:g,content:M,backgroundColor:m},{datum:v,itemId:w,xKey:s,xName:l,yKey:r,yName:c,sizeKey:o,sizeName:h,labelKey:a,labelName:d,title:g,color:m,seriesId:this.id})}getLegendData(){var e,t;if(!(null==(e=this.data)?void 0:e.length)||!this.properties.isValid())return[];const{yKey:i,yName:n,title:s,marker:r,visible:o}=this.properties,{shape:a,fill:l,stroke:c,fillOpacity:h,strokeOpacity:d,strokeWidth:u}=r;return[{legendType:"category",id:this.id,itemId:i,seriesId:this.id,enabled:o,label:{text:null!=(t=null!=s?s:n)?t:i},marker:{shape:a,fill:null!=l?l:"rgba(0, 0, 0, 0)",stroke:null!=c?c:"rgba(0, 0, 0, 0)",fillOpacity:null!=h?h:1,strokeOpacity:null!=d?d:1,strokeWidth:null!=u?u:0}}]}animateEmptyUpdateReady({markerSelection:e,labelSelection:t}){Yu(this,this.ctx.animationManager,e),Fu(this,"labels",this.ctx.animationManager,t)}isLabelEnabled(){return this.properties.label.enabled}nodeFactory(){return new Mo}getFormattedMarkerStyle(e){const{xKey:t,yKey:i,sizeKey:n,labelKey:s}=this.properties;return this.getMarkerStyle(this.properties.marker,{datum:e,xKey:t,yKey:i,sizeKey:n,labelKey:s,highlighted:!1})}computeFocusBounds(e){return Ju(this,e)}};tg.className="BubbleSeries",tg.type="bubble";var ig={type:"series",optionsKey:"series[]",packageType:"community",chartTypes:["cartesian"],identifier:"bubble",instanceConstructor:tg,defaultAxes:[{type:"number",position:"bottom"},{type:"number",position:"left"}],themeTemplate:{series:{__extends__:jt,tooltip:{position:{type:"node"}},marker:{__extends__:Kt,maxSize:30,fillOpacity:.8},label:{enabled:!1,fontSize:12,fontFamily:$t,color:Yt}}},paletteFactory:Pu},ng=class extends jd{constructor(){super(...arguments),this.fillOpacity=1,this.strokeWidth=1,this.strokeOpacity=1,this.lineDash=[0],this.lineDashOffset=0,this.cornerRadius=0,this.areaPlot=!1,this.aggregation="sum",this.shadow=new Hu,this.label=new Ho,this.tooltip=new ju}};S([Ys(ir)],ng.prototype,"xKey",2),S([Ys(ir,{optional:!0})],ng.prototype,"yKey",2),S([Ys(ir,{optional:!0})],ng.prototype,"xName",2),S([Ys(ir,{optional:!0})],ng.prototype,"yName",2),S([Ys(vr,{optional:!0})],ng.prototype,"fill",2),S([Ys(or)],ng.prototype,"fillOpacity",2),S([Ys(vr,{optional:!0})],ng.prototype,"stroke",2),S([Ys(rr)],ng.prototype,"strokeWidth",2),S([Ys(or)],ng.prototype,"strokeOpacity",2),S([Ys(Ar)],ng.prototype,"lineDash",2),S([Ys(rr)],ng.prototype,"lineDashOffset",2),S([Ys(rr)],ng.prototype,"cornerRadius",2),S([Ys(er)],ng.prototype,"areaPlot",2),S([Ys(cr,{optional:!0})],ng.prototype,"bins",2),S([Ys(Gr(["count","sum","mean"],"a histogram aggregation"))],ng.prototype,"aggregation",2),S([Ys(rr,{optional:!0})],ng.prototype,"binCount",2),S([Ys(Qs)],ng.prototype,"shadow",2),S([Ys(Qs)],ng.prototype,"label",2),S([Ys(Qs)],ng.prototype,"tooltip",2);var sg=class extends Kd{constructor(e){super({moduleCtx:e,directionKeys:zd,directionNames:Ud,pickModes:[0],datumSelectionGarbageCollection:!1,animationResetFns:{datum:Up,label:Vu}}),this.properties=new ng,this.calculatedBins=[]}deriveBins(e){const t=uo(e[0],e[1],10),i=go(e[0],e[1],10),[n]=t;return[[n-i,n],...t.map(e=>[e,e+i])]}calculateNiceBins(e,t){const i=Math.floor(e[0]),n=e[1],s=t||1,{start:r,binSize:o}=this.calculateNiceStart(i,n,s);return this.getBins(r,n,o,s)}getBins(e,t,i,n){const s=[],r=this.calculatePrecision(i);for(let o=0;o<n;o++){const a=Math.round((e+o*i)*r)/r;let l=Math.round((e+(o+1)*i)*r)/r;o===n-1&&(l=Math.max(l,t)),s[o]=[a,l]}return s}calculatePrecision(e){let t=10;if(isFinite(e)&&e>0)for(;e<1;)t*=10,e*=10;return t}calculateNiceStart(e,t,i){const n=Math.abs(t-e)/i,s=Math.floor(Math.log10(n)),r=Math.pow(10,s);return{start:Math.floor(e/r)*r,binSize:n}}processData(e){return x(this,null,function*(){var t,i;this.visible||(this.processedData=void 0,this.animationState.transition("updateData"));const{xKey:n,yKey:s,areaPlot:r,aggregation:o}=this.properties,a=null==(t=this.axes.x)?void 0:t.scale,l=null==(i=this.axes.y)?void 0:i.scale,{xScaleType:c,yScaleType:h}=this.getScaleInformation({yScale:l,xScale:a}),d=[Wh(n,c),Dh];if(s){let e=wh("groupAgg");"count"===o||("sum"===o?e=bh("groupAgg"):"mean"===o&&(e=xh("groupAgg"))),r&&(e=Eh("groupAgg",e)),d.push(jh(s,h,{invalidValue:void 0}),e)}else{let e=wh("groupAgg");r&&(e=Eh("groupAgg",e)),d.push(e)}!this.ctx.animationManager.isSkipped()&&this.processedData&&d.push(Fh(this.processedData,!1)),yield this.requestDataModel(e,this.data,{props:d,groupByFn:e=>{var t;const i=Xc(e.domain.keys[0]);if(0===i.length)return e.domain.groups=[],()=>[];const n=We(this.properties.binCount)?this.calculateNiceBins(i,this.properties.binCount):null!=(t=this.properties.bins)?t:this.deriveBins(i),s=n.length;return this.calculatedBins=[...n],e=>{const t=e.keys[0];for(let e=0;e<s;e++){const i=n[e];if(t>=i[0]&&t<i[1])return i;if(e===s-1&&t<=i[1])return i}return[]}}}),this.animationState.transition("updateData")})}getSeriesDomain(e){var t,i,n,s;const{processedData:r,dataModel:o}=this;if(!r||!o||!this.calculatedBins.length)return[];const a=o.getDomain(this,"groupAgg","aggregate",r),l=null==(t=this.calculatedBins)?void 0:t[0][0],c=null==(s=this.calculatedBins)?void 0:s[(null!=(n=null==(i=this.calculatedBins)?void 0:i.length)?n:0)-1][1];return Xc("x"===e?[l,c]:a)}createNodeData(){return x(this,null,function*(){var e;const{id:t,axes:i,processedData:n,ctx:{callbackCache:s}}=this,r=i.x,o=i.y;if(!r||!o)return;const{scale:a}=r,{scale:l}=o,{xKey:c,yKey:h,xName:d,yName:u,fill:p,stroke:g,strokeWidth:f,cornerRadius:m}=this.properties,{formatter:v=e=>String(e.value),fontStyle:y,fontWeight:C,fontSize:b,fontFamily:S,color:w}=this.properties.label,x=[],E={itemId:null!=(e=this.properties.yKey)?e:this.id,nodeData:x,labelData:x,scales:this.calculateScaling(),animationValid:!0,visible:this.visible};return this.visible&&n&&"grouped"===n.type?(n.data.forEach(e=>{var i;const{aggValues:[[n,r]]=[[0,0]],datum:E,datum:{length:M},keys:A,keys:[T,D]}=e,I=a.convert(T),R=a.convert(D),L=n+r,k=l.convert(0),P=l.convert(L),N=Math.abs(R-I),O=Math.abs(P-k),_=Math.min(I,R),F=Math.min(k,P);let G;0!==L&&(G={text:null!=(i=s.call(v,{value:L,datum:E,seriesId:t,xKey:c,yKey:h,xName:d,yName:u}))?i:String(L),fontStyle:y,fontWeight:C,fontSize:b,fontFamily:S,fill:w,x:_+N/2,y:F+O/2});const V={x:_+N/2,y:F+O/2},B=o.isReversed();x.push({series:this,datum:E,aggregatedValue:L,frequency:M,domain:A,yKey:h,xKey:c,x:_,y:F,xValue:I,yValue:P,width:N,height:O,midPoint:V,fill:p,stroke:g,cornerRadius:m,topLeftCornerRadius:!B,topRightCornerRadius:!B,bottomRightCornerRadius:B,bottomLeftCornerRadius:B,opacity:1,strokeWidth:f,label:G})}),x.sort((e,t)=>e.x-t.x),E):E})}nodeFactory(){return new cu}updateDatumSelection(e){return x(this,null,function*(){const{nodeData:t,datumSelection:i}=e;return i.update(t,e=>{e.tag=0,e.crisp=!0},e=>e.domain.join("_"))})}updateDatumNodes(e){return x(this,null,function*(){const{isHighlight:t}=e,{fillOpacity:i,strokeOpacity:n,lineDash:s,lineDashOffset:r,shadow:o,highlightStyle:{item:{fill:a,fillOpacity:l=i,stroke:c,strokeWidth:h}}}=this.properties;e.datumSelection.each((e,d,u)=>{var p,g;const{cornerRadius:f,topLeftCornerRadius:m,topRightCornerRadius:v,bottomRightCornerRadius:y,bottomLeftCornerRadius:C}=d,b=t&&void 0!==h?h:d.strokeWidth,S=t?l:i;e.fill=null!=(p=t?a:void 0)?p:d.fill,e.stroke=null!=(g=t?c:void 0)?g:d.stroke,e.fillOpacity=S,e.strokeOpacity=n,e.strokeWidth=b,e.lineDash=s,e.lineDashOffset=r,e.topLeftCornerRadius=m?f:0,e.topRightCornerRadius=v?f:0,e.bottomRightCornerRadius=y?f:0,e.bottomLeftCornerRadius=C?f:0,e.fillShadow=o,e.zIndex=t?Qh.highlightedZIndex:u,e.visible=d.height>0})})}updateLabelSelection(e){return x(this,null,function*(){const{labelData:t,labelSelection:i}=e;return i.update(t,e=>{e.tag=1,e.pointerEvents=1,e.textAlign="center",e.textBaseline="middle"})})}updateLabelNodes(e){return x(this,null,function*(){const t=this.isLabelEnabled();e.labelSelection.each((e,i)=>{const n=i.label;n&&t?(e.text=n.text,e.x=n.x,e.y=n.y,e.fontStyle=n.fontStyle,e.fontWeight=n.fontWeight,e.fontSize=n.fontSize,e.fontFamily=n.fontFamily,e.fill=n.fill,e.visible=!0):e.visible=!1})})}initQuadTree(e){Rp(e,Ip(this.contentGroup.children[0]))}pickNodeClosestDatum(e){return Lp(this,e)}getTooltipHtml(e){const t=this.axes.x,i=this.axes.y;if(!this.properties.isValid()||!t||!i)return nl;const{xKey:n,yKey:s,xName:r,yName:o,fill:a,aggregation:l,tooltip:c}=this.properties,{aggregatedValue:h,frequency:d,domain:[u,p],itemId:g}=e,f=`${_u(null!=r?r:n)}: ${t.formatDatum(u)} - ${t.formatDatum(p)}`;let m=s?`<b>${_u(null!=o?o:s)} (${l})</b>: ${i.formatDatum(h)}<br>`:"";m+=`<b>Frequency</b>: ${d}`;const v={title:f,backgroundColor:a,content:m};return c.toTooltipHtml(v,{datum:{data:e.datum,aggregatedValue:e.aggregatedValue,domain:e.domain,frequency:e.frequency},itemId:g,xKey:n,xName:r,yKey:s,yName:o,color:a,title:f,seriesId:this.id})}getLegendData(e){var t,i;if(!(null==(t=this.data)?void 0:t.length)||"category"!==e)return[];const{xKey:n,yName:s,fill:r,fillOpacity:o,stroke:a,strokeWidth:l,strokeOpacity:c,visible:h}=this.properties;return[{legendType:"category",id:this.id,itemId:n,seriesId:this.id,enabled:h,label:{text:null!=(i=null!=s?s:n)?i:"Frequency"},marker:{fill:null!=r?r:"rgba(0, 0, 0, 0)",stroke:null!=a?a:"rgba(0, 0, 0, 0)",fillOpacity:o,strokeOpacity:c,strokeWidth:l}}]}animateEmptyUpdateReady({datumSelection:e,labelSelection:t}){const i=zp(Bp(!0,this.axes,"normal"));ks(this.id,"datums",this.ctx.animationManager,[e],i),Fu(this,"labels",this.ctx.animationManager,t)}animateWaitingUpdateReady(e){var t,i;const n=null==(i=null==(t=this.processedData)?void 0:t.reduced)?void 0:i.diff,s=zp(Bp(!0,this.axes,"normal"));ks(this.id,"datums",this.ctx.animationManager,[e.datumSelection],s,(e,t)=>Gh(t.domain),n),Fu(this,"labels",this.ctx.animationManager,e.labelSelection)}isLabelEnabled(){return this.properties.label.enabled}computeFocusBounds({datumIndex:e,seriesRect:t}){var i;return Wp(null==(i=this.contextNodeData)?void 0:i.nodeData[e],this.contentGroup,t)}};sg.className="HistogramSeries",sg.type="histogram";var rg={type:"series",optionsKey:"series[]",packageType:"community",chartTypes:["cartesian"],identifier:"histogram",instanceConstructor:sg,defaultAxes:[{type:"number",position:"bottom"},{type:"number",position:"left"}],themeTemplate:{series:{__extends__:jt,strokeWidth:1,fillOpacity:1,strokeOpacity:1,lineDash:[0],lineDashOffset:0,label:{enabled:!1,fontSize:12,fontFamily:$t,color:Xt},shadow:{enabled:!1,color:ii,xOffset:3,yOffset:3,blur:5}}},paletteFactory:({takeColors:e})=>{const{fills:[t],strokes:[i]}=e(1);return{fill:t,stroke:i}}},og=class extends jd{constructor(){super(...arguments),this.stroke="#874349",this.strokeWidth=2,this.strokeOpacity=1,this.lineDash=[0],this.lineDashOffset=0,this.marker=new Uu,this.label=new Ho,this.tooltip=new ju,this.connectMissingData=!1}};S([Ys(ir)],og.prototype,"xKey",2),S([Ys(ir)],og.prototype,"yKey",2),S([Ys(ir,{optional:!0})],og.prototype,"xName",2),S([Ys(ir,{optional:!0})],og.prototype,"yName",2),S([Ys(ir,{optional:!0})],og.prototype,"title",2),S([Ys(vr)],og.prototype,"stroke",2),S([Ys(rr)],og.prototype,"strokeWidth",2),S([Ys(or)],og.prototype,"strokeOpacity",2),S([Ys(Ar)],og.prototype,"lineDash",2),S([Ys(rr)],og.prototype,"lineDashOffset",2),S([Ys(Qs)],og.prototype,"marker",2),S([Ys(Qs)],og.prototype,"label",2),S([Ys(Qs)],og.prototype,"tooltip",2),S([Ys(er)],og.prototype,"connectMissingData",2);var ag=class extends Kd{constructor(e){super({moduleCtx:e,directionKeys:zd,directionNames:Ud,hasMarkers:!0,pickModes:[2,3,0],markerSelectionGarbageCollection:!1,animationResetFns:{path:cp({getOpacity:()=>this.getOpacity()}),label:Vu,marker:(e,t)=>v(v({},{opacity:1,scalingX:1,scalingY:1}),Zu(0,t))}}),this.properties=new og}processData(e){return x(this,null,function*(){var t,i;if(!this.properties.isValid()||null==this.data)return;const{xKey:n,yKey:s}=this.properties,r=!this.ctx.animationManager.isSkipped(),o=null==(t=this.axes.x)?void 0:t.scale,a=null==(i=this.axes.y)?void 0:i.scale,{isContinuousX:l,xScaleType:c,yScaleType:h}=this.getScaleInformation({xScale:o,yScale:a}),d=[];l||d.push(Wh(n,c,{id:"xKey"})),r&&(d.push(Ph(l?["xValue"]:void 0)),this.processedData&&d.push(Fh(this.processedData))),d.push(jh(n,c,{id:"xValue"}),jh(s,h,{id:"yValue",invalidValue:void 0})),yield this.requestDataModel(e,this.data,{props:d}),this.animationState.transition("updateData")})}getSeriesDomain(e){const{axes:t,dataModel:i,processedData:n}=this;if(!n||!i)return[];const s=t.x,r=t.y,o=i.resolveProcessedDataDefById(this,"xValue");if("x"===e){const e=i.getDomain(this,"xValue","value",n);return"value"===(null==o?void 0:o.def.type)&&"category"===o.def.valueType?e:Xc(hn(e),s)}return Xc(i.getDomain(this,"yValue","value",n),r)}createNodeData(){return x(this,null,function*(){var e,t,i;const{processedData:n,dataModel:s,axes:r}=this,o=r.x,a=r.y;if(!(n&&s&&o&&a))return;const{xKey:l,yKey:c,xName:h,yName:d,marker:u,label:p,connectMissingData:g,legendItemName:f}=this.properties,m=o.scale,v=a.scale,y=(null!=(e=m.bandwidth)?e:0)/2,C=(null!=(t=v.bandwidth)?t:0)/2,b=[],S=u.enabled?u.size:0,w=s.resolveProcessedDataIndexById(this,"xValue"),x=s.resolveProcessedDataIndexById(this,"yValue");let E,M=!0;for(let e=0;e<n.data.length;e++){const{datum:t,values:s}=null!=E?E:n.data[e],r=s[w],o=s[x];if(void 0===o)M=!g;else{const s=m.convert(r)+y;if(isNaN(s)){M=!g,E=void 0;continue}E=void 0===(null==(i=n.data[e+1])?void 0:i.values[x])?void 0:n.data[e+1];const a=v.convert(o)+C,u=this.getLabelText(p,{value:o,datum:t,xKey:l,yKey:c,xName:h,yName:d,legendItemName:f},e=>je(e)?e.toFixed(2):String(e));b.push({series:this,datum:t,yKey:c,xKey:l,point:{x:s,y:a,moveTo:M,size:S},midPoint:{x:s,y:a},yValue:o,xValue:r,capDefaults:{lengthRatioMultiplier:this.properties.marker.getDiameter(),lengthMax:1/0},label:u?{text:u,fontStyle:p.fontStyle,fontWeight:p.fontWeight,fontSize:p.fontSize,fontFamily:p.fontFamily,textAlign:"center",textBaseline:"bottom",fill:p.color}:void 0}),M=!1}}return{itemId:c,nodeData:b,labelData:b,scales:this.calculateScaling(),visible:this.visible}})}isPathOrSelectionDirty(){return this.properties.marker.isDirty()}markerFactory(){const{shape:e}=this.properties.marker;return new(Od(e))}updatePathNodes(e){return x(this,null,function*(){const{paths:[t],opacity:i,visible:n,animationEnabled:s}=e;t.setProperties({fill:void 0,lineJoin:"round",pointerEvents:1,opacity:i,stroke:this.properties.stroke,strokeWidth:this.getStrokeWidth(this.properties.strokeWidth),strokeOpacity:this.properties.strokeOpacity,lineDash:this.properties.lineDash,lineDashOffset:this.properties.lineDashOffset}),s||(t.visible=n),hp(this,t)})}updateMarkerSelection(e){return x(this,null,function*(){let{nodeData:t}=e;const{markerSelection:i}=e,{shape:n,enabled:s}=this.properties.marker;return t=n&&s?t:[],this.properties.marker.isDirty()&&(i.clear(),i.cleanup()),i.update(t,void 0,e=>Gh(e.xValue))})}updateMarkerNodes(e){return x(this,null,function*(){const{markerSelection:t,isHighlight:i}=e,{xKey:n,yKey:s,stroke:r,strokeWidth:o,strokeOpacity:a,marker:l,highlightStyle:c}=this.properties,h=Ze(i&&c.item,l.getStyle(),{stroke:r,strokeWidth:o,strokeOpacity:a}),d=this.ctx.animationManager.isSkipped();t.each((e,t)=>{this.updateMarkerStyle(e,l,{datum:t,highlighted:i,xKey:n,yKey:s},h,{applyTranslation:d})}),i||l.markClean()})}updateLabelSelection(e){return x(this,null,function*(){return e.labelSelection.update(this.isLabelEnabled()?e.labelData:[])})}updateLabelNodes(e){return x(this,null,function*(){const{enabled:t,fontStyle:i,fontWeight:n,fontSize:s,fontFamily:r,color:o}=this.properties.label;e.labelSelection.each((e,a)=>{const{point:l,label:c}=a;a&&c&&t?(e.fontStyle=i,e.fontWeight=n,e.fontSize=s,e.fontFamily=r,e.textAlign=c.textAlign,e.textBaseline=c.textBaseline,e.text=c.text,e.x=l.x,e.y=l.y-10,e.fill=o,e.visible=!0):e.visible=!1})})}getTooltipHtml(e){var t;const i=this.axes.x,n=this.axes.y;if(!this.properties.isValid()||!i||!n)return nl;const{xKey:s,yKey:r,xName:o,yName:a,strokeWidth:l,marker:c,tooltip:h}=this.properties,{datum:d,xValue:u,yValue:p,itemId:g}=e,f=i.formatDatum(u),m=n.formatDatum(p),y=_u(null!=(t=this.properties.title)?t:a),C=_u(f+": "+m),b=Ze({fill:c.stroke},c.getStyle(),{strokeWidth:l}),{fill:S}=this.getMarkerStyle(c,{datum:e,xKey:s,yKey:r,highlighted:!1},b);return h.toTooltipHtml({title:y,content:C,backgroundColor:S},v({datum:d,itemId:g,xKey:s,xName:o,yKey:r,yName:a,title:y,color:S,seriesId:this.id},this.getModuleTooltipParams()))}getLegendData(e){var t,i,n,s,r,o,a,l,c,h;if(!(null==(t=this.data)?void 0:t.length)||!this.properties.isValid()||"category"!==e)return[];const{yKey:d,yName:u,stroke:p,strokeOpacity:g,strokeWidth:f,lineDash:m,title:v,marker:y,visible:C,legendItemName:b}=this.properties,S="rgba(0, 0, 0, 0)";return[{legendType:"category",id:this.id,itemId:d,legendItemName:b,seriesId:this.id,enabled:C,label:{text:null!=(n=null!=(i=null!=b?b:v)?i:u)?n:d},marker:{shape:y.shape,fill:null!=(s=y.fill)?s:S,stroke:null!=(o=null!=(r=y.stroke)?r:p)?o:S,fillOpacity:null!=(a=y.fillOpacity)?a:1,strokeOpacity:null!=(c=null!=(l=y.strokeOpacity)?l:g)?c:1,strokeWidth:null!=(h=y.strokeWidth)?h:0,enabled:y.enabled},line:{stroke:null!=p?p:S,strokeOpacity:g,strokeWidth:f,lineDash:m}}]}updatePaths(e){return x(this,null,function*(){this.updateLinePaths(e.paths,e.contextData)})}updateLinePaths(e,t){const{nodeData:i}=t,[n]=e,{path:s}=n;s.clear(!0);for(const e of i)e.point.moveTo?s.moveTo(e.point.x,e.point.y):s.lineTo(e.point.x,e.point.y);n.checkPathDirty()}animateEmptyUpdateReady(e){const{markerSelection:t,labelSelection:i,annotationSelections:n,contextData:s,paths:r}=e,{animationManager:o}=this.ctx;this.updateLinePaths(r,s),op(this,o,...r),va([t],Zu),qu(this,o,t),Fu(this,"labels",o,i),Fu(this,"annotations",o,...n)}animateReadyResize(e){const{contextData:t,paths:i}=e;this.updateLinePaths(i,t),super.animateReadyResize(e)}animateWaitingUpdateReady(e){var t,i;const{animationManager:n}=this.ctx,{markerSelection:s,labelSelection:r,annotationSelections:o,contextData:a,paths:l,previousContextData:c}=e,[h]=l;super.resetAllAnimation(e);const d=()=>{this.updateLinePaths(l,a)};if(null==a||null==c)return d(),$u(this,n,"added",s),ap(this,"path_properties",n,"add",h),Fu(this,"labels",n,r),void Fu(this,"annotations",n,...o);const u=wp(a,c,null==(i=null==(t=this.processedData)?void 0:t.reduced)?void 0:i.diff);if(void 0===u)return n.skipCurrentBatch(),void d();"no-op"!==u.status&&($u(this,n,void 0,s),ks(this.id,"path_properties",n,[h],u.pathProperties),Nu(this.id,"path_update",n,[h],u.path),u.hasMotion&&(Fu(this,"labels",n,r),Fu(this,"annotations",n,...o)))}isLabelEnabled(){return this.properties.label.enabled}getBandScalePadding(){return{inner:1,outer:.1}}nodeFactory(){return new Mo}getFormattedMarkerStyle(e){const{xKey:t,yKey:i}=this.properties;return this.getMarkerStyle(this.properties.marker,{datum:e,xKey:t,yKey:i,highlighted:!0})}computeFocusBounds(e){return Ju(this,e)}};ag.className="LineSeries",ag.type="line";var lg={type:"series",optionsKey:"series[]",packageType:"community",chartTypes:["cartesian"],identifier:"line",instanceConstructor:ag,defaultAxes:[{type:"number",position:"left"},{type:"category",position:"bottom"}],themeTemplate:{series:{__extends__:jt,tooltip:{position:{type:"node"}},strokeWidth:2,strokeOpacity:1,lineDash:[0],lineDashOffset:0,marker:{__extends__:Kt,fillOpacity:1,strokeOpacity:1,strokeWidth:0},label:{enabled:!1,fontSize:12,fontFamily:$t,color:Yt}}},enterpriseThemeTemplate:{series:{errorBar:{cap:{lengthRatio:1}}}},paletteFactory:e=>{const{marker:t}=Pu(e);return{stroke:t.fill,marker:t}}},cg=class extends Ho{constructor(){super(...arguments),this.placement="top"}};S([Ys(Fr)],cg.prototype,"placement",2);var hg=class extends jd{constructor(){super(...arguments),this.colorRange=["#ffff00","#00ff00","#0000ff"],this.marker=new Uu,this.label=new cg,this.tooltip=new ju}};S([Ys(ir)],hg.prototype,"xKey",2),S([Ys(ir)],hg.prototype,"yKey",2),S([Ys(ir,{optional:!0})],hg.prototype,"labelKey",2),S([Ys(ir,{optional:!0})],hg.prototype,"colorKey",2),S([Ys(ir,{optional:!0})],hg.prototype,"xName",2),S([Ys(ir,{optional:!0})],hg.prototype,"yName",2),S([Ys(ir,{optional:!0})],hg.prototype,"labelName",2),S([Ys(ir,{optional:!0})],hg.prototype,"colorName",2),S([Ys(br,{optional:!0})],hg.prototype,"colorDomain",2),S([Ys(yr)],hg.prototype,"colorRange",2),S([Ys(ir,{optional:!0})],hg.prototype,"title",2),S([Ys(Qs)],hg.prototype,"marker",2),S([Ys(Qs)],hg.prototype,"label",2),S([Ys(Qs)],hg.prototype,"tooltip",2);var dg=class extends Kd{constructor(e){super({moduleCtx:e,directionKeys:zd,directionNames:Ud,pickModes:[2,3,0],pathsPerSeries:0,hasMarkers:!0,markerSelectionGarbageCollection:!1,animationResetFns:{marker:Xu,label:Vu}}),this.properties=new hg,this.colorScale=new Xp}processData(e){return x(this,null,function*(){var t,i,n;if(!this.properties.isValid()||null==this.data||!this.visible)return;const s=null==(t=this.axes.x)?void 0:t.scale,r=null==(i=this.axes.y)?void 0:i.scale,{xScaleType:o,yScaleType:a}=this.getScaleInformation({xScale:s,yScale:r}),l=this.colorScale.type,{xKey:c,yKey:h,labelKey:d,colorKey:u,colorDomain:p,colorRange:g}=this.properties,{dataModel:f,processedData:m}=yield this.requestDataModel(e,this.data,{props:[Wh(c,o,{id:"xKey-raw"}),Wh(h,a,{id:"yKey-raw"}),...d?[Wh(d,"band",{id:"labelKey-raw"})]:[],jh(c,o,{id:"xValue"}),jh(h,a,{id:"yValue"}),...u?[jh(u,l,{id:"colorValue"})]:[],...d?[jh(d,"band",{id:"labelValue"})]:[]]});if(u){const e=f.resolveProcessedDataIndexById(this,"colorValue");this.colorScale.domain=null!=(n=null!=p?p:m.domain.values[e])?n:[],this.colorScale.range=g,this.colorScale.update()}this.animationState.transition("updateData")})}getSeriesDomain(e){const{dataModel:t,processedData:i}=this;if(!i||!t)return[];const n="x"===e?"xValue":"yValue",s=t.resolveProcessedDataDefById(this,n),r=t.getDomain(this,n,"value",i);if("value"===(null==s?void 0:s.def.type)&&"category"===(null==s?void 0:s.def.valueType))return r;const o=this.axes[e];return Xc(hn(r),o)}createNodeData(){return x(this,null,function*(){var e,t,i;const{axes:n,dataModel:s,processedData:r,colorScale:o}=this,{xKey:a,yKey:l,labelKey:c,colorKey:h,xName:d,yName:u,labelName:p,marker:g,label:f,visible:m}=this.properties,{placement:y}=f,C=Od(g.shape),b=n.x,S=n.y;if(!(s&&r&&m&&b&&S))return;const w=s.resolveProcessedDataIndexById(this,"xValue"),x=s.resolveProcessedDataIndexById(this,"yValue"),E=h?s.resolveProcessedDataIndexById(this,"colorValue"):-1,M=c?s.resolveProcessedDataIndexById(this,"labelValue"):-1,A=b.scale,T=S.scale,D=(null!=(e=A.bandwidth)?e:0)/2,I=(null!=(t=T.bandwidth)?t:0)/2,R=[],L=f.getFont();for(const{values:e,datum:t}of null!=(i=r.data)?i:[]){const i=e[w],n=e[x],s=A.convert(i)+D,r=T.convert(n)+I,m=this.getLabelText(f,{value:c?e[M]:n,datum:t,xKey:a,yKey:l,labelKey:c,xName:d,yName:u,labelName:p}),b=Go.getTextSize(m,L),S=h?o.convert(e[E]):void 0;R.push({series:this,itemId:l,yKey:l,xKey:a,datum:t,xValue:i,yValue:n,capDefaults:{lengthRatioMultiplier:g.getDiameter(),lengthMax:1/0},point:{x:s,y:r,size:g.size},midPoint:{x:s,y:r},fill:S,label:v({text:m},b),marker:C,placement:y})}return{itemId:l,nodeData:R,labelData:R,scales:this.calculateScaling(),visible:this.visible}})}isPathOrSelectionDirty(){return this.properties.marker.isDirty()}getLabelData(){var e,t;return null!=(t=null==(e=this.contextNodeData)?void 0:e.labelData)?t:[]}markerFactory(){const{shape:e}=this.properties.marker;return new(Od(e))}updateMarkerSelection(e){return x(this,null,function*(){const{nodeData:t,markerSelection:i}=e;return this.properties.marker.isDirty()&&(i.clear(),i.cleanup()),i.update(this.properties.marker.enabled?t:[])})}updateMarkerNodes(e){return x(this,null,function*(){const{markerSelection:t,isHighlight:i}=e,{xKey:n,yKey:s,labelKey:r,marker:o,highlightStyle:a}=this.properties,l=Ze(i&&a.item,o.getStyle());t.each((e,t)=>{this.updateMarkerStyle(e,o,{datum:t,highlighted:i,xKey:n,yKey:s,labelKey:r},l)}),i||o.markClean()})}updateLabelSelection(e){return x(this,null,function*(){var t,i;const n=this.isLabelEnabled()&&null!=(i=null==(t=this.chart)?void 0:t.placeLabels().get(this))?i:[];return e.labelSelection.update(n.map(({datum:e,x:t,y:i})=>y(v({},e),{point:{x:t,y:i,size:e.point.size},placement:"top"})),e=>{e.pointerEvents=1})})}updateLabelNodes(e){return x(this,null,function*(){const{label:t}=this.properties;e.labelSelection.each((e,i)=>{var n,s,r,o;e.text=i.label.text,e.fill=t.color,e.x=null!=(s=null==(n=i.point)?void 0:n.x)?s:0,e.y=null!=(o=null==(r=i.point)?void 0:r.y)?o:0,e.fontStyle=t.fontStyle,e.fontWeight=t.fontWeight,e.fontSize=t.fontSize,e.fontFamily=t.fontFamily,e.textAlign="left",e.textBaseline="top"})})}getTooltipHtml(e){const t=this.axes.x,i=this.axes.y;if(!this.properties.isValid()||!t||!i)return nl;const{xKey:n,yKey:s,labelKey:r,xName:o,yName:a,labelName:l,title:c=a,marker:h,tooltip:d}=this.properties,{datum:u,xValue:p,yValue:g,label:f,itemId:m}=e,y=Ze({fill:e.fill,strokeWidth:this.getStrokeWidth(h.strokeWidth)},h.getStyle()),{fill:C="gray"}=this.getMarkerStyle(h,{datum:e,highlighted:!1,xKey:n,yKey:s,labelKey:r},y),b=_u(t.formatDatum(p)),S=_u(i.formatDatum(g));let w=`<b>${_u(null!=o?o:n)}</b>: ${b}<br><b>${_u(null!=a?a:s)}</b>: ${S}`;return r&&(w=`<b>${_u(null!=l?l:r)}</b>: ${_u(f.text)}<br>`+w),d.toTooltipHtml({title:c,content:w,backgroundColor:C},v({datum:u,itemId:m,xKey:n,xName:o,yKey:s,yName:a,labelKey:r,labelName:l,title:c,color:C,seriesId:this.id},this.getModuleTooltipParams()))}getLegendData(e){var t,i,n,s,r,o;const{yKey:a,yName:l,title:c,marker:h,visible:d}=this.properties,{fill:u,stroke:p,fillOpacity:g,strokeOpacity:f,strokeWidth:m}=h;return(null==(t=this.data)?void 0:t.length)&&this.properties.isValid()&&"category"===e?[{legendType:"category",id:this.id,itemId:a,seriesId:this.id,enabled:d,label:{text:null!=(i=null!=c?c:l)?i:a},marker:{shape:h.shape,fill:null!=(s=null!=(n=h.fill)?n:u)?s:"rgba(0, 0, 0, 0)",stroke:null!=(o=null!=(r=h.stroke)?r:p)?o:"rgba(0, 0, 0, 0)",fillOpacity:null!=g?g:1,strokeOpacity:null!=f?f:1,strokeWidth:null!=m?m:0}}]:[]}animateEmptyUpdateReady(e){const{markerSelection:t,labelSelection:i,annotationSelections:n}=e;Yu(this,this.ctx.animationManager,t),Fu(this,"labels",this.ctx.animationManager,i),Fu(this,"annotations",this.ctx.animationManager,...n)}isLabelEnabled(){return this.properties.label.enabled}nodeFactory(){return new Mo}getFormattedMarkerStyle(e){const{xKey:t,yKey:i,labelKey:n}=this.properties;return this.getMarkerStyle(this.properties.marker,{datum:e,xKey:t,yKey:i,labelKey:n,highlighted:!0})}computeFocusBounds(e){return Ju(this,e)}};dg.className="ScatterSeries",dg.type="scatter";var ug={type:"series",optionsKey:"series[]",packageType:"community",chartTypes:["cartesian"],identifier:"scatter",instanceConstructor:dg,defaultAxes:[{type:"number",position:"bottom"},{type:"number",position:"left"}],themeTemplate:{series:{__extends__:jt,tooltip:{position:{type:"node"}},marker:{__extends__:Kt,fillOpacity:.8},label:{enabled:!1,fontSize:12,fontFamily:$t,color:Yt}}},enterpriseThemeTemplate:{series:{errorBar:{cap:{lengthRatio:1}}}},paletteFactory:Pu},pg=class e{constructor(e,t,i,n){this.startAngle=e,this.endAngle=t,this.innerRadius=i,this.outerRadius=n}clone(){const{startAngle:t,endAngle:i,innerRadius:n,outerRadius:s}=this;return new e(t,i,n,s)}[Hn](t,i){return new e(this.startAngle*(1-i)+t.startAngle*i,this.endAngle*(1-i)+t.endAngle*i,this.innerRadius*(1-i)+t.innerRadius*i,this.outerRadius*(1-i)+t.outerRadius*i)}};function gg(e,t,i){const n=Math.sqrt(Math.pow(e,2)+Math.pow(t,2)),{innerRadius:s,outerRadius:r}=i;if(i.startAngle===i.endAngle||n<Math.min(s,r)||n>Math.max(s,r))return!1;const o=Gs(i.startAngle),a=Gs(i.endAngle),l=Math.atan2(t,e);return o<a?l<=a&&l>=o:l<=a&&l>=-Math.PI||l>=o&&l<=Math.PI}function fg(e,t){const{startAngle:i,endAngle:n,innerRadius:s,outerRadius:r}=t,o={x:r*Math.cos(i),y:r*Math.sin(i)},a={x:r*Math.cos(n),y:r*Math.sin(n)},l=0===s?{x:0,y:0}:{x:s*Math.cos(i),y:s*Math.sin(i)},c=0===s?{x:0,y:0}:{x:s*Math.cos(n),y:s*Math.sin(n)};return ad(e.start.x,e.start.y,e.end.x,e.end.y,o.x,o.y,l.x,l.y)||ad(e.start.x,e.start.y,e.end.x,e.end.y,a.x,a.y,c.x,c.y)||hd(0,0,r,i,n,!0,e.start.x,e.start.y,e.end.x,e.end.y)}function mg(e,t){const i={x:e.x,y:e.y},n={x:e.x+e.width,y:e.y},s={x:e.x,y:e.y+e.height},r={x:e.x+e.width,y:e.y+e.height};return fg({start:i,end:n},t)||fg({start:s,end:r},t)}function vg(e,t,i,n){if(0===i&&0===n)return 0;if(Math.asin(Math.abs(1*i)/(e+1*i))+Math.asin(Math.abs(1*n)/(e+1*n))-t<0)return 1;let s=0,r=1;for(let o=0;o<8;o+=1){const o=(s+r)/2;Math.asin(Math.abs(o*i)/(e+o*i))+Math.asin(Math.abs(o*n)/(e+o*n))-t<0?s=o:r=o}return s}function yg(e,t){return zs(e,t)<1e-6?t:_s(e-t)+t}function Cg(e,t,i=0){const n=Math.abs(t-e)>=2*Math.PI?2*Math.PI:_s(t-e);return{startAngle:e=yg(e,i),endAngle:t=e+n}}function bg(e,t,i,n,s,r){const o=Math.sin(r),a=Math.cos(r),l=f(e,2)+f(t,2)-f(i,2);let c=NaN,h=NaN,d=NaN,u=NaN;if(a>.5){const i=o/a,n=1+f(i,2),s=-2*(e+t*i),r=f(s,2)-4*n*l;if(r<0)return;const p=(-s+Math.sqrt(r))/(2*n),g=(-s-Math.sqrt(r))/(2*n);c=p,h=p*i,d=g,u=g*i}else{const i=a/o,n=1+f(i,2),s=-2*(t+e*i),r=f(s,2)-4*n*l;if(r<0)return;const p=(-s+Math.sqrt(r))/(2*n),g=(-s-Math.sqrt(r))/(2*n);c=p*i,h=p,d=g*i,u=g}const p=d*a+u*o,g=c*a+h*o>0?yg(Math.atan2(h-t,c-e),n):NaN,m=p>0?yg(Math.atan2(u-t,d-e),n):NaN;return g>=n&&g<=s?g:m>=n&&m<=s?m:void 0}function Sg(e,t,i,n,s,r){const o=Math.hypot(e,t),a=o-(f(o,2)-f(i,2)+f(r,2))/(2*o),l=Math.atan2(t,e),c=Math.acos(-a/i),h=yg(l+c,n),d=yg(l-c,n);return h>=n&&h<=s?h:d>=n&&d<=s?d:void 0}var wg=class{constructor(e,t,i,n,s){this.cx=e,this.cy=t,this.r=i,this.a0=n,this.a1=s,this.a0>=this.a1&&(this.a0=NaN,this.a1=NaN)}isValid(){return Number.isFinite(this.a0)&&Number.isFinite(this.a1)}pointAt(e){return{x:this.cx+this.r*Math.cos(e),y:this.cy+this.r*Math.sin(e)}}clipStart(e){null==e||!this.isValid()||e<this.a0||(this.a0=e,(Number.isNaN(e)||this.a0>=this.a1)&&(this.a0=NaN,this.a1=NaN))}clipEnd(e){null==e||!this.isValid()||e>this.a1||(this.a1=e,(Number.isNaN(e)||this.a0>=this.a1)&&(this.a0=NaN,this.a1=NaN))}},xg=class extends pd{constructor(){super(...arguments),this.centerX=0,this.centerY=0,this.innerRadius=10,this.outerRadius=20,this.startAngle=0,this.endAngle=2*Math.PI,this.clipSector=void 0,this.concentricEdgeInset=0,this.radialEdgeInset=0,this.startOuterCornerRadius=0,this.endOuterCornerRadius=0,this.startInnerCornerRadius=0,this.endInnerCornerRadius=0}set inset(e){this.concentricEdgeInset=e,this.radialEdgeInset=e}set cornerRadius(e){this.startOuterCornerRadius=e,this.endOuterCornerRadius=e,this.startInnerCornerRadius=e,this.endInnerCornerRadius=e}computeBBox(){const e=this.outerRadius;return new is(this.centerX-e,this.centerY-e,2*e,2*e)}normalizedRadii(){const{concentricEdgeInset:e}=this;return{innerRadius:Math.max(Math.min(this.innerRadius,this.outerRadius)+e,0),outerRadius:Math.max(Math.max(this.innerRadius,this.outerRadius)-e,0)}}normalizedClipSector(){const{clipSector:e}=this;if(null==e)return;const{startAngle:t,endAngle:i}=Cg(this.startAngle,this.endAngle),{innerRadius:n,outerRadius:s}=this.normalizedRadii(),r=Cg(e.startAngle,e.endAngle,t);return new pg(Math.max(t,r.startAngle),Math.min(i,r.endAngle),Math.max(n,e.innerRadius),Math.min(s,e.outerRadius))}getAngleOffset(e){return e>0?this.radialEdgeInset/e:0}arc(e,t,i,n,s,r,o,a){if(e<=0)return;const{startAngle:l,endAngle:c}=Cg(this.startAngle,this.endAngle),{innerRadius:h,outerRadius:d}=this.normalizedRadii(),u=this.normalizedClipSector();if(a&&h<=0)return;const p=this.getAngleOffset(h),g=this.getAngleOffset(d),f=a?this.getAngleOffset(h+e):this.getAngleOffset(d-e),m=o?l+f+t:c-f-t,v=a?h+e:d-e,y=v*Math.cos(m),C=v*Math.sin(m);if(null!=u){const e=1e-6;if(!(o||m>=l-e&&m<=u.endAngle-e))return;if(o&&!(m>=u.startAngle+e&&m<=c-e))return;if(a&&!(v>=u.innerRadius-e))return;if(!(a||v<=u.outerRadius+e))return}const b=new wg(y,C,e,i,n);if(null!=u){let t,c;if(a?(b.clipStart(bg(y,C,e,i,n,u.endAngle-p)),b.clipEnd(bg(y,C,e,i,n,u.startAngle+p))):(b.clipStart(bg(y,C,e,i,n,u.startAngle+g)),b.clipEnd(bg(y,C,e,i,n,u.endAngle-g))),o?(t=Sg(y,C,e,i,n,u.innerRadius),c=Sg(y,C,e,i,n,u.outerRadius)):(t=Sg(y,C,e,i,n,u.outerRadius),c=Sg(y,C,e,i,n,u.innerRadius)),b.clipStart(t),b.clipEnd(c),null!=t){const{x:e,y:i}=b.pointAt(t),n=yg(Math.atan2(i,e),l);o?null==r||r.clipStart(n):s.clipEnd(n)}if(null!=c){const{x:e,y:t}=b.pointAt(c),i=yg(Math.atan2(t,e),l);o?s.clipStart(i):null==r||r.clipEnd(i)}}if(null!=u){const{x:e,y:t}=b.pointAt((b.a0+b.a1)/2);if(!gg(e,t,u))return}const{x:S,y:w}=b.pointAt(o===a?b.a0:b.a1),x=yg(Math.atan2(w,S),l),E=a?r:s;return o?null==E||E.clipStart(x):null==E||E.clipEnd(x),b}updatePath(){var e,t,i,n,s;const{path:r,centerX:o,centerY:a,concentricEdgeInset:l,radialEdgeInset:c}=this;let{startOuterCornerRadius:h,endOuterCornerRadius:d,startInnerCornerRadius:u,endInnerCornerRadius:p}=this;const{startAngle:g,endAngle:f}=Cg(this.startAngle,this.endAngle),{innerRadius:m,outerRadius:v}=this.normalizedRadii(),y=this.normalizedClipSector(),C=f-g,b=C>=2*Math.PI-1e-6;if(r.clear(),(null!=(e=null==y?void 0:y.startAngle)?e:g)===(null!=(t=null==y?void 0:y.endAngle)?t:f))return;if(b&&null==this.clipSector&&0===h&&0===d&&0===u&&0===p)return r.moveTo(o+v*Math.cos(g),a+v*Math.sin(g)),r.arc(o,a,v,g,f),m>l&&(r.moveTo(o+m*Math.cos(f),a+m*Math.sin(f)),r.arc(o,a,m,f,g,!0)),void r.closePath();const S=this.getAngleOffset(m),w=this.getAngleOffset(v);if(C<2*w)return;const x=(null!=(i=null==y?void 0:y.innerRadius)?i:m)>l,E=m<l||C<2*S,M=v-m,A=Math.max(h,u,d,p),T=A>0?Math.min(M/A,1):1;h*=T,d*=T,u*=T,p*=T;const D=vg(v,C-2*w,-h,-d);if(h*=D,d*=D,!E&&x){const e=vg(m,C-2*S,u,p);u*=e,p*=e}else u=0,p=0;const I=Math.max(h+u,d+p),R=I>0?Math.min(M/I,1):1;h*=R,d*=R,u*=R,p*=R;let L=0,k=0;const P=h/(v-h),N=d/(v-d);if(P>=0&&P<.999999)L=Math.asin(P);else{L=C/2;const e=v/(1/Math.sin(L)+1);h=Math.min(e,h)}if(N>=0&&N<.999999)k=Math.asin(N);else{k=C/2;const e=v/(1/Math.sin(k)+1);d=Math.min(e,d)}const O=Math.asin(u/(m+u)),_=Math.asin(p/(m+p)),F=null!=(n=null==y?void 0:y.outerRadius)?n:v,G=this.getAngleOffset(F),V=new wg(0,0,F,g+G,f-G),B=null!=(s=null==y?void 0:y.innerRadius)?s:m,H=this.getAngleOffset(B),z=x?new wg(0,0,B,g+H,f-H):void 0;null!=y&&(V.clipStart(y.startAngle),V.clipEnd(y.endAngle),null==z||z.clipStart(y.startAngle),null==z||z.clipEnd(y.endAngle));const U=this.arc(h,L,g-.5*Math.PI,g+L,V,z,!0,!1),W=this.arc(d,k,f-k,f+.5*Math.PI,V,z,!1,!1),j=this.arc(p,_,f+.5*Math.PI,f+Math.PI-_,V,z,!1,!0),K=this.arc(u,O,g+Math.PI+O,g+1.5*Math.PI,V,z,!0,!0);if(E){const e=C<.5*Math.PI?c*(1+Math.cos(C))/Math.sin(C):NaN;let t;t=e>0&&e<v?Math.max(Math.hypot(c,e),m):m;const i=g+.5*C;r.moveTo(o+t*Math.cos(i),a+t*Math.sin(i))}else if(!0===(null==K?void 0:K.isValid())){const{x:e,y:t}=K.pointAt(K.a1);r.moveTo(o+e,a+t)}else if(!0===(null==z?void 0:z.isValid())){const{x:e,y:t}=z.pointAt(z.a0);r.moveTo(o+e,a+t)}else{const e=g+C/2,t=m*Math.cos(e),i=m*Math.sin(e);r.moveTo(o+t,a+i)}if(!0===(null==U?void 0:U.isValid())){const{cx:e,cy:t,r:i,a0:n,a1:s}=U;r.arc(o+e,a+t,i,n,s)}if(V.isValid()){const{r:e,a0:t,a1:i}=V;r.arc(o,a,e,t,i)}if(!0===(null==W?void 0:W.isValid())){const{cx:e,cy:t,r:i,a0:n,a1:s}=W;r.arc(o+e,a+t,i,n,s)}if(!E){if(!0===(null==j?void 0:j.isValid())){const{cx:e,cy:t,r:i,a0:n,a1:s}=j;r.arc(o+e,a+t,i,n,s)}if(!0===(null==z?void 0:z.isValid())){const{r:e,a0:t,a1:i}=z;r.arc(o,a,e,i,t,!0)}if(!0===(null==K?void 0:K.isValid())){const{cx:e,cy:t,r:i,a0:n,a1:s}=K;r.arc(o+e,a+t,i,n,s)}}r.closePath()}isPointInPath(e,t){var i;const n=this.transformPoint(e,t),{startAngle:s,endAngle:r,innerRadius:o,outerRadius:a}=null!=(i=this.clipSector)?i:this;return gg(n.x,n.y,{startAngle:s,endAngle:r,innerRadius:Math.min(o,a),outerRadius:Math.max(o,a)})}};xg.className="Sector",S([ud()],xg.prototype,"centerX",2),S([ud()],xg.prototype,"centerY",2),S([ud()],xg.prototype,"innerRadius",2),S([ud()],xg.prototype,"outerRadius",2),S([ud()],xg.prototype,"startAngle",2),S([ud()],xg.prototype,"endAngle",2),S([ud()],xg.prototype,"clipSector",2),S([ud()],xg.prototype,"concentricEdgeInset",2),S([ud()],xg.prototype,"radialEdgeInset",2),S([ud()],xg.prototype,"startOuterCornerRadius",2),S([ud()],xg.prototype,"endOuterCornerRadius",2),S([ud()],xg.prototype,"startInnerCornerRadius",2),S([ud()],xg.prototype,"endInnerCornerRadius",2);var Eg=class extends ll{constructor(){super(...arguments),this.showInLegend=!1}};S([Ys(er)],Eg.prototype,"showInLegend",2);var Mg=class extends Ho{constructor(){super(...arguments),this.margin=2}set(e,t){return super.set(e)}};S([Ys(ir)],Mg.prototype,"text",2),S([Ys(nr)],Mg.prototype,"margin",2);var Ag=class extends Ct{constructor(){super(...arguments),this.fill="transparent",this.fillOpacity=1}};S([Ys(vr)],Ag.prototype,"fill",2),S([Ys(or)],Ag.prototype,"fillOpacity",2);var Tg=class extends Ho{constructor(){super(...arguments),this.offset=3,this.minAngle=0,this.minSpacing=4,this.maxCollisionOffset=50,this.avoidCollisions=!0}};S([Ys(rr)],Tg.prototype,"offset",2),S([Ys(ar)],Tg.prototype,"minAngle",2),S([Ys(rr)],Tg.prototype,"minSpacing",2),S([Ys(rr)],Tg.prototype,"maxCollisionOffset",2),S([Ys(er)],Tg.prototype,"avoidCollisions",2);var Dg=class extends Ho{constructor(){super(...arguments),this.positionOffset=0,this.positionRatio=.5}};S([Ys(nr)],Dg.prototype,"positionOffset",2),S([Ys(or)],Dg.prototype,"positionRatio",2);var Ig=class extends Ct{constructor(){super(...arguments),this.length=10,this.strokeWidth=1}};S([Ys(yr,{optional:!0})],Ig.prototype,"colors",2),S([Ys(rr)],Ig.prototype,"length",2),S([Ys(rr)],Ig.prototype,"strokeWidth",2);var Rg=class extends Hd{constructor(){super(...arguments),this.fills=Object.values(Gt),this.strokes=Object.values(Vt),this.fillOpacity=1,this.strokeOpacity=1,this.lineDash=[0],this.lineDashOffset=0,this.cornerRadius=0,this.rotation=0,this.outerRadiusOffset=0,this.outerRadiusRatio=1,this.strokeWidth=1,this.sectorSpacing=void 0,this.innerLabels=new bt(Mg),this.title=new Eg,this.innerCircle=new Ag,this.shadow=new Hu,this.calloutLabel=new Tg,this.sectorLabel=new Dg,this.calloutLine=new Ig,this.tooltip=new ju,this.__BACKGROUND_COLOR_DO_NOT_USE=void 0}isValid(){const e=super.isValid();return null==this.innerRadiusRatio&&null==this.innerRadiusOffset?(_.warnOnce("Either an [innerRadiusRatio] or an [innerRadiusOffset] must be set to render a donut series."),!1):e}};function Lg(e,t,i,n){const s=[i.convert(0),i.convert(1)],r=[n.convert(0),n.convert(1)],o=Math.PI/-2+Bs(t),a=e?"initial":"update";return{nodes:{toFn:(e,t,i,{prevLive:n})=>{var r,a;let{startAngle:l,endAngle:c,innerRadius:h,outerRadius:d}=t;const{stroke:u,fill:p}=t.sectorFormat;if("removed"===i&&n?(l=null==(r=n.datum)?void 0:r.endAngle,c=null==(a=n.datum)?void 0:a.endAngle):"removed"!==i||n||(l=o,c=o),"removed"===i){const e=(({radius:e})=>({innerRadius:s[0],outerRadius:s[0]+(s[1]-s[0])*e}))(t);h=e.innerRadius,d=e.outerRadius}return{startAngle:l,endAngle:c,outerRadius:d,innerRadius:h,stroke:u,fill:p}},fromFn:(t,i,n,{prevFromProps:s})=>{var l,c,h,d,u,p;let{startAngle:g,endAngle:f,innerRadius:m,outerRadius:v}=t,{fill:y,stroke:C}=i.sectorFormat;if("unknown"===n||"added"===n&&!s?(g=o,f=o,m=i.innerRadius,v=i.outerRadius):"added"===n&&s&&(g=null!=(l=s.endAngle)?l:o,f=null!=(c=s.endAngle)?c:o,m=null!=(h=s.innerRadius)?h:i.innerRadius,v=null!=(d=s.outerRadius)?d:i.outerRadius),"added"===n&&!e){const e=(({radius:e})=>({innerRadius:r[0],outerRadius:r[0]+(r[1]-r[0])*e}))(i);m=e.innerRadius,v=e.outerRadius}return"updated"===n&&(y=null!=(u=t.fill)?u:y,C=null!=(p=t.stroke)?p:C),{startAngle:g,endAngle:f,innerRadius:m,outerRadius:v,fill:y,stroke:C,phase:a}}},innerCircle:{fromFn:(e,t)=>{var i,n,s;return{size:null!=(s=null!=(n=null==(i=e.previousDatum)?void 0:i.radius)?n:e.size)?s:0,phase:a}},toFn:(e,t)=>{var i;return{size:null!=(i=t.radius)?i:0}}}}}function kg(e,t){return{startAngle:t.startAngle,endAngle:t.endAngle,innerRadius:t.innerRadius,outerRadius:t.outerRadius,fill:t.sectorFormat.fill,stroke:t.sectorFormat.stroke}}function Pg(e,t){const i=t.y-e.centerY,n=t.x-e.centerX,s=Math.atan2(i,n),r=e.getItemNodes();for(const e of r)if(!0!==e.datum.missing&&Vs(s,e.startAngle,e.endAngle)){const t=Math.sqrt(n*n+i*i);let s=0;return t<e.innerRadius?s=e.innerRadius-t:t>e.outerRadius&&(s=t-e.outerRadius),{datum:e.datum,distance:s}}}function Ng(e,t){const i=e.getNodeData();if(void 0===i)return;const{centerX:n,centerY:s}=e,r=i[t.datumIndex],o=[{radius:r.innerRadius,angle:r.startAngle},{radius:r.innerRadius,angle:r.endAngle},{radius:r.outerRadius,angle:r.startAngle},{radius:r.outerRadius,angle:r.endAngle}],a=[0,Math.PI/2,Math.PI,3*Math.PI/2];for(const e of a)Vs(e,r.startAngle,r.endAngle)&&o.push({radius:r.outerRadius,angle:e});const l=o.map(({radius:e,angle:t})=>Us(n,s,e,t)),c=l.map(e=>e.x),h=l.map(e=>e.y),d=Math.min(...c),u=Math.min(...h),p=Math.max(...c)-d,g=Math.max(...h)-u;return new is(d,u,p,g)}S([Ys(ir)],Rg.prototype,"angleKey",2),S([Ys(ir,{optional:!0})],Rg.prototype,"angleName",2),S([Ys(ir,{optional:!0})],Rg.prototype,"radiusKey",2),S([Ys(ir,{optional:!0})],Rg.prototype,"radiusName",2),S([Ys(rr,{optional:!0})],Rg.prototype,"radiusMin",2),S([Ys(rr,{optional:!0})],Rg.prototype,"radiusMax",2),S([Ys(ir,{optional:!0})],Rg.prototype,"calloutLabelKey",2),S([Ys(ir,{optional:!0})],Rg.prototype,"calloutLabelName",2),S([Ys(ir,{optional:!0})],Rg.prototype,"sectorLabelKey",2),S([Ys(ir,{optional:!0})],Rg.prototype,"sectorLabelName",2),S([Ys(ir,{optional:!0})],Rg.prototype,"legendItemKey",2),S([Ys(yr)],Rg.prototype,"fills",2),S([Ys(yr)],Rg.prototype,"strokes",2),S([Ys(or)],Rg.prototype,"fillOpacity",2),S([Ys(or)],Rg.prototype,"strokeOpacity",2),S([Ys(Ar)],Rg.prototype,"lineDash",2),S([Ys(rr)],Rg.prototype,"lineDashOffset",2),S([Ys(rr)],Rg.prototype,"cornerRadius",2),S([Ys(tr,{optional:!0})],Rg.prototype,"formatter",2),S([Ys(ar)],Rg.prototype,"rotation",2),S([Ys(nr)],Rg.prototype,"outerRadiusOffset",2),S([Ys(or)],Rg.prototype,"outerRadiusRatio",2),S([Ys(nr,{optional:!0})],Rg.prototype,"innerRadiusOffset",2),S([Ys(or,{optional:!0})],Rg.prototype,"innerRadiusRatio",2),S([Ys(rr)],Rg.prototype,"strokeWidth",2),S([Ys(rr,{optional:!0})],Rg.prototype,"sectorSpacing",2),S([Ys(xr)],Rg.prototype,"innerLabels",2),S([Ys(Qs)],Rg.prototype,"title",2),S([Ys(Qs)],Rg.prototype,"innerCircle",2),S([Ys(Qs)],Rg.prototype,"shadow",2),S([Ys(Qs)],Rg.prototype,"calloutLabel",2),S([Ys(Qs)],Rg.prototype,"sectorLabel",2),S([Ys(Qs)],Rg.prototype,"calloutLine",2),S([Ys(Qs)],Rg.prototype,"tooltip",2),S([Ys(ir,{optional:!0})],Rg.prototype,"__BACKGROUND_COLOR_DO_NOT_USE",2);var Og=class extends _d{constructor(e){var t=e,{useLabelLayer:i=!1,pickModes:n=[0],canHaveAxes:s=!1,animationResetFns:r}=t,o=C(t,["useLabelLayer","pickModes","canHaveAxes","animationResetFns"]);super(y(v({},o),{useLabelLayer:i,pickModes:n,contentGroupVirtual:!1,directionKeys:{x:["angleKey"],y:["radiusKey"]},directionNames:{x:["angleName"],y:["radiusName"]},canHaveAxes:s})),this.itemGroup=this.contentGroup.appendChild(new Mo),this.nodeData=[],this.itemSelection=_a.select(this.itemGroup,()=>this.nodeFactory(),!1),this.labelSelection=_a.select(this.labelGroup,Go,!1),this.highlightSelection=_a.select(this.highlightGroup,()=>this.nodeFactory()),this.centerX=0,this.centerY=0,this.radius=0,this.showFocusBox=!1,this.itemGroup.zIndexSubOrder=[()=>this._declarationOrder,1],this.animationResetFns=r,this.animationState=new ya("empty",{empty:{update:{target:"ready",action:e=>this.animateEmptyUpdateReady(e)},reset:"empty",skip:"ready"},ready:{updateData:"waiting",clear:"clearing",highlight:e=>this.animateReadyHighlight(e),highlightMarkers:e=>this.animateReadyHighlightMarkers(e),resize:e=>this.animateReadyResize(e),reset:"empty",skip:"ready"},waiting:{update:{target:"ready",action:e=>this.animateWaitingUpdateReady(e)},reset:"empty",skip:"ready"},clearing:{update:{target:"empty",action:e=>this.animateClearingUpdateEmpty(e)},reset:"empty",skip:"ready"}},()=>this.checkProcessedDataAnimatable())}getItemNodes(){return this.itemGroup.children}getNodeData(){return this.nodeData}resetAnimation(e){"initial"===e?this.animationState.transition("reset"):"ready"===e&&this.animationState.transition("skip")}getLabelData(){return[]}computeLabelsBBox(e,t){return null}resetAllAnimation(){var e;const{item:t,label:i}=null!=(e=this.animationResetFns)?e:{};this.ctx.animationManager.stopByAnimationGroupId(this.id),t&&va([this.itemSelection,this.highlightSelection],t),i&&va([this.labelSelection],i),this.itemSelection.cleanup(),this.labelSelection.cleanup(),this.highlightSelection.cleanup()}animateEmptyUpdateReady(e){this.ctx.animationManager.skipCurrentBatch(),this.resetAllAnimation()}animateWaitingUpdateReady(e){this.ctx.animationManager.skipCurrentBatch(),this.resetAllAnimation()}animateReadyHighlight(e){var t;const{item:i}=null!=(t=this.animationResetFns)?t:{};i&&va([this.highlightSelection],i)}animateReadyHighlightMarkers(e){}animateReadyResize(e){this.resetAllAnimation()}animateClearingUpdateEmpty(e){this.ctx.animationManager.skipCurrentBatch(),this.resetAllAnimation()}animationTransitionClear(){this.animationState.transition("clear",this.getAnimationData())}getAnimationData(e){return{seriesRect:e}}},_g=class extends Xh{constructor(e,t,i,n){super(e,t,i,n),this.angleKey=n.properties.angleKey,this.radiusKey=n.properties.radiusKey,this.calloutLabelKey=n.properties.calloutLabelKey,this.sectorLabelKey=n.properties.sectorLabelKey}},Fg=class extends Og{constructor(e){super({moduleCtx:e,pickModes:[0],useLabelLayer:!0,animationResetFns:{item:kg,label:Vu}}),this.properties=new Rg,this.previousRadiusScale=new Qd,this.radiusScale=new Qd,this.backgroundGroup=this.rootGroup.appendChild(new Mo({name:`${this.id}-background`,layer:!0,zIndex:0})),this.zerosumRingsGroup=this.backgroundGroup.appendChild(new Mo({name:`${this.id}-zerosumRings`})),this.zerosumOuterRing=this.zerosumRingsGroup.appendChild(new Cd),this.zerosumInnerRing=this.zerosumRingsGroup.appendChild(new Cd),this.innerCircleGroup=this.backgroundGroup.appendChild(new Mo({name:`${this.id}-innerCircle`})),this.seriesItemEnabled=[],this.surroundingRadius=void 0,this.NodeEvent=_g,this.angleScale=new Qd,this.angleScale.domain=[0,1],this.angleScale.range=[-Math.PI,Math.PI].map(e=>e+Math.PI/2);const t=new Mo({name:"pieCalloutLabels"}),i=new Mo({name:"pieSectorLabels"}),n=new Mo({name:"innerLabels"});this.labelGroup.append(t),this.labelGroup.append(i),this.labelGroup.append(n),this.calloutLabelSelection=_a.select(t,Mo),this.sectorLabelSelection=_a.select(i,Go),this.innerLabelsSelection=_a.select(n,Go),this.innerCircleSelection=_a.select(this.innerCircleGroup,Cd)}addChartEventListeners(){var e;this.destroyFns.push(null==(e=this.ctx.chartEventManager)?void 0:e.addListener("legend-item-click",e=>this.onLegendItemClick(e)))}get visible(){return super.visible&&(0===this.seriesItemEnabled.length||this.seriesItemEnabled.some(e=>e))}nodeFactory(){return new xg}getSeriesDomain(e){return"x"===e?this.angleScale.domain:this.radiusScale.domain}processData(e){return x(this,null,function*(){var t,i,n,s,r;if(null==this.data||!this.properties.isValid())return;let{data:o}=this;const{visible:a,seriesItemEnabled:l}=this,{angleKey:c,radiusKey:h,calloutLabelKey:d,sectorLabelKey:u,legendItemKey:p}=this.properties,g=!this.ctx.animationManager.isSkipped(),f=[],m=[];p?f.push(Wh(p,"band",{id:"legendItemKey"})):d?f.push(Wh(d,"band",{id:"calloutLabelKey"})):u&&f.push(Wh(u,"band",{id:"sectorLabelKey"}));const C=this.radiusScale.type,b=this.radiusScale.type;h&&m.push(Kh(h,{id:"radiusValue",min:null!=(t=this.properties.radiusMin)?t:0,max:this.properties.radiusMax}),jh(h,C,{id:"radiusRaw"}),kh({id:"radiusValue"},[0,1],1,null!=(i=this.properties.radiusMin)?i:0,this.properties.radiusMax)),d&&m.push(jh(d,"band",{id:"calloutLabelValue"})),u&&m.push(jh(u,"band",{id:"sectorLabelValue"})),p&&m.push(jh(p,"band",{id:"legendItemValue"})),g&&this.processedData&&f.length>0&&m.push(Fh(this.processedData)),m.push(Ph()),o=o.map((e,t)=>a&&l[t]?e:y(v({},e),{[c]:0})),yield this.requestDataModel(e,o,{props:[...f,$h(c,b,{id:"angleValue",onlyPositive:!0}),jh(c,b,{id:"angleRaw"}),kh({id:"angleValue"},[0,1],0,0),...m]});for(const e of null!=(r=null==(s=null==(n=this.processedData)?void 0:n.defs)?void 0:s.values)?r:[]){const{id:t,missing:i,property:n}=e,s=Zc(this,i);"angleRaw"!==t&&s>0&&_.warnOnce(`no value was found for the key '${String(n)}' on ${s} data element${s>1?"s":""}`)}this.animationState.transition("updateData")})}maybeRefreshNodeData(){return x(this,null,function*(){var e;if(!this.nodeDataRefresh)return;const{nodeData:t=[]}=null!=(e=yield this.createNodeData())?e:{};this.nodeData=t,this.nodeDataRefresh=!1})}getProcessedDataIndexes(e){return{angleIdx:e.resolveProcessedDataIndexById(this,"angleValue"),radiusIdx:this.properties.radiusKey?e.resolveProcessedDataIndexById(this,"radiusValue"):-1,calloutLabelIdx:this.properties.calloutLabelKey?e.resolveProcessedDataIndexById(this,"calloutLabelValue"):-1,sectorLabelIdx:this.properties.sectorLabelKey?e.resolveProcessedDataIndexById(this,"sectorLabelValue"):-1,legendItemIdx:this.properties.legendItemKey?e.resolveProcessedDataIndexById(this,"legendItemValue"):-1}}createNodeData(){return x(this,null,function*(){const{id:e,processedData:t,dataModel:i,angleScale:n}=this,{rotation:s,innerRadiusRatio:r}=this.properties;if(!this.properties.isValid())return this.zerosumOuterRing.visible=!0,this.zerosumInnerRing.visible=!0,{itemId:e,nodeData:[],labelData:[]};if(!t||!i||"ungrouped"!==t.type)return;const{angleIdx:o,radiusIdx:a,calloutLabelIdx:l,sectorLabelIdx:c,legendItemIdx:h}=this.getProcessedDataIndexes(i);let d=0,u=0;const p=t.data.map((e,t)=>{var i;const{datum:r,values:p}=e,g=p[o],f=n.convert(d)+Bs(s);d=g,u+=g;const m=n.convert(d)+Bs(s),y=Math.abs(m-f),C=f+y/2,b=p[o+1],S=a>=0&&null!=(i=p[a])?i:1,w=a>=0?p[a+1]:void 0,x=h>=0?p[h]:void 0,E=this.getLabels(r,C,y,!0,p[l],p[c],x),M=this.getSectorFormat(r,t,!1);return v({itemId:t,series:this,datum:r,index:t,angleValue:b,midAngle:C,midCos:Math.cos(C),midSin:Math.sin(C),startAngle:f,endAngle:m,sectorFormat:M,radiusValue:w,radius:S,innerRadius:Math.max(this.radiusScale.convert(0),0),outerRadius:Math.max(this.radiusScale.convert(S),0),legendItemValue:x},E)});return this.zerosumOuterRing.visible=0===u,this.zerosumInnerRing.visible=0===u&&null!=r&&1!==r&&r>0,{itemId:e,nodeData:p,labelData:p}})}getLabels(e,t,i,n,s,r,o){const{calloutLabel:a,sectorLabel:l,legendItemKey:c}=this.properties,h=!n||a.enabled?this.properties.calloutLabelKey:void 0,d=!n||l.enabled?this.properties.sectorLabelKey:void 0;if(!h&&!d&&!c)return{};const u={datum:e,angleKey:this.properties.angleKey,angleName:this.properties.angleName,radiusKey:this.properties.radiusKey,radiusName:this.properties.radiusName,calloutLabelKey:this.properties.calloutLabelKey,calloutLabelName:this.properties.calloutLabelName,sectorLabelKey:this.properties.sectorLabelKey,sectorLabelName:this.properties.sectorLabelName,legendItemKey:this.properties.legendItemKey},p={};return h&&i>Bs(a.minAngle)&&(p.calloutLabel=y(v({},this.getTextAlignment(t)),{text:this.getLabelText(a,y(v({},u),{value:s})),hidden:!1,collisionTextAlign:void 0,collisionOffsetY:0,box:void 0})),d&&(p.sectorLabel={text:this.getLabelText(l,y(v({},u),{value:r}))}),null!=c&&null!=o&&(p.legendItem={key:c,text:o}),p}getTextAlignment(e){const t=[{textAlign:"center",textBaseline:"bottom"},{textAlign:"left",textBaseline:"middle"},{textAlign:"center",textBaseline:"hanging"},{textAlign:"right",textBaseline:"middle"}],i=Gs(e)- -.75*Math.PI;return t[Zn(Math.floor(i/(Math.PI/2)),t.length)]}getSectorFormat(e,t,i){var n,s,r,o,a;const{callbackCache:l,highlightManager:c}=this.ctx,{angleKey:h,radiusKey:d,fills:u,strokes:p,formatter:g,sectorSpacing:f,__BACKGROUND_COLOR_DO_NOT_USE:m}=this.properties,v=c.getActiveHighlight(),y=i&&(null==v?void 0:v.series)===this&&t===v.itemId;let C=p[t%p.length];null==f&&null==C&&(C=m);const{fill:b,fillOpacity:S,stroke:w,strokeWidth:x,strokeOpacity:E}=Ze(y&&this.properties.highlightStyle.item,{fill:u.length>0?u[t%u.length]:void 0,fillOpacity:this.properties.fillOpacity,stroke:C,strokeWidth:this.getStrokeWidth(this.properties.strokeWidth),strokeOpacity:this.getOpacity()});let M;return g&&(M=l.call(g,{datum:e,angleKey:h,radiusKey:d,fill:b,stroke:w,fills:u,strokes:p,strokeWidth:x,highlighted:y,seriesId:this.id})),{fill:null!=(n=null==M?void 0:M.fill)?n:b,fillOpacity:null!=(s=null==M?void 0:M.fillOpacity)?s:S,stroke:null!=(r=null==M?void 0:M.stroke)?r:w,strokeWidth:null!=(o=null==M?void 0:M.strokeWidth)?o:x,strokeOpacity:null!=(a=null==M?void 0:M.strokeOpacity)?a:E}}getInnerRadius(){const{radius:e}=this,{innerRadiusRatio:t=1,innerRadiusOffset:i=0}=this.properties,n=e*t+i;return n===e||n<0?0:n}getOuterRadius(){const{outerRadiusRatio:e,outerRadiusOffset:t}=this.properties;return Math.max(this.radius*e+t,0)}updateRadiusScale(e){const t=[this.getInnerRadius(),this.getOuterRadius()];this.radiusScale.range=t,e&&(this.previousRadiusScale.range=t),this.nodeData=this.nodeData.map(e=>{var t=e,{radius:i}=t,n=C(t,["radius"]);return y(v({},n),{radius:i,innerRadius:Math.max(this.radiusScale.convert(0),0),outerRadius:Math.max(this.radiusScale.convert(i),0)})})}getTitleTranslationY(){var e,t;const i=Math.max(0,this.radiusScale.range[1]);return 0===i?NaN:-i-(2+(null!=(t=null==(e=this.properties.title)?void 0:e.spacing)?t:0))-Math.max(0,-i)}update(e){return x(this,arguments,function*({seriesRect:e}){const{title:t}=this.properties,i={seriesRectWidth:null==e?void 0:e.width,seriesRectHeight:null==e?void 0:e.height},n=null!=xt(this.nodeDataDependencies,i);if(n&&(this._nodeDataDependencies=i),yield this.maybeRefreshNodeData(),this.updateTitleNodes(),this.updateRadiusScale(n),this.contentGroup.translationX=this.centerX,this.contentGroup.translationY=this.centerY,this.highlightGroup.translationX=this.centerX,this.highlightGroup.translationY=this.centerY,this.backgroundGroup.translationX=this.centerX,this.backgroundGroup.translationY=this.centerY,this.labelGroup&&(this.labelGroup.translationX=this.centerX,this.labelGroup.translationY=this.centerY),t){const e=this.getTitleTranslationY(),i=t.node.computeBBox();t.node.visible=t.enabled&&isFinite(e)&&!this.bboxIntersectsSurroundingSeries(i,0,e),t.node.translationY=isFinite(e)?e:0}for(const e of[this.zerosumInnerRing,this.zerosumOuterRing])e.fillOpacity=0,e.stroke=this.properties.calloutLabel.color,e.strokeWidth=1,e.strokeOpacity=1;this.updateNodeMidPoint(),yield this.updateSelections(),yield this.updateNodes(e)})}updateTitleNodes(){var e,t;const{oldTitle:i}=this,{title:n}=this.properties;i!==n&&(i&&(null==(e=this.labelGroup)||e.removeChild(i.node)),n&&(n.node.textBaseline="bottom",null==(t=this.labelGroup)||t.appendChild(n.node)),this.oldTitle=n)}updateNodeMidPoint(){this.nodeData.forEach(e=>{const t=e.innerRadius+(e.outerRadius-e.innerRadius)/2;e.midPoint={x:e.midCos*Math.max(0,t),y:e.midSin*Math.max(0,t)}})}updateSelections(){return x(this,null,function*(){yield this.updateGroupSelection(),this.updateInnerCircleSelection()})}updateGroupSelection(){return x(this,null,function*(){const{itemSelection:e,highlightSelection:t,calloutLabelSelection:i,sectorLabelSelection:n,innerLabelsSelection:s}=this,r=(e,t)=>{let i=this.nodeData;t&&(i=i.map(e=>y(v({},e),{sectorFormat:v({},e.sectorFormat)}))),e.update(i,void 0,e=>this.getDatumId(e)),this.ctx.animationManager.isSkipped()&&e.cleanup()};r(e,!1),r(t,!0),i.update(this.nodeData,e=>{const t=new Ba;t.tag=0,t.pointerEvents=1,e.appendChild(t);const i=new Go;i.tag=1,i.pointerEvents=1,e.appendChild(i)}),n.update(this.nodeData,e=>{e.pointerEvents=1}),s.update(this.properties.innerLabels,e=>{e.pointerEvents=1})})}updateInnerCircleSelection(){const{innerCircle:e}=this.properties;let t=0;const i=this.getInnerRadius();if(i>0){const e=Math.min(i,this.getOuterRadius()),n=1;t=Math.ceil(2*e+n)}const n=e?[{radius:t}]:[];this.innerCircleSelection.update(n)}updateNodes(e){return x(this,null,function*(){const t=this.ctx.highlightManager.getActiveHighlight(),i=this.visible&&this.seriesItemEnabled.indexOf(!0)>=0;this.rootGroup.visible=i,this.backgroundGroup.visible=i,this.contentGroup.visible=i,this.highlightGroup.visible=i&&(null==t?void 0:t.series)===this,this.labelGroup&&(this.labelGroup.visible=i),this.contentGroup.opacity=this.getOpacity(),this.innerCircleSelection.each((e,{radius:t})=>{var i,n;e.setProperties({fill:null==(i=this.properties.innerCircle)?void 0:i.fill,opacity:null==(n=this.properties.innerCircle)?void 0:n.fillOpacity,size:t})});const n=(e,t,i,n)=>{const s=this.getSectorFormat(t.datum,t.itemId,n);t.sectorFormat.fill=s.fill,t.sectorFormat.stroke=s.stroke;const r=this.ctx.animationManager.isSkipped();r&&(e.startAngle=t.startAngle,e.endAngle=t.endAngle,e.innerRadius=t.innerRadius,e.outerRadius=t.outerRadius),(n||r)&&(e.fill=s.fill,e.stroke=s.stroke),e.strokeWidth=s.strokeWidth,e.fillOpacity=s.fillOpacity,e.strokeOpacity=this.properties.strokeOpacity,e.lineDash=this.properties.lineDash,e.lineDashOffset=this.properties.lineDashOffset,e.fillShadow=this.properties.shadow,e.cornerRadius=this.properties.cornerRadius,e.inset=null!=this.properties.sectorSpacing?(this.properties.sectorSpacing+(null!=s.stroke?s.strokeWidth:0))/2:0,e.lineJoin=null!=this.properties.sectorSpacing?"miter":"round"};this.itemSelection.each((e,t,i)=>n(e,t,0,!1)),this.highlightSelection.each((e,i,s)=>{const r=(null==t?void 0:t.series)===this&&e.datum.itemId===t.itemId;n(e,i,0,!0),e.visible=r}),this.updateCalloutLineNodes(),this.updateCalloutLabelNodes(e),this.updateSectorLabelNodes(),this.updateInnerLabelNodes(),this.updateZerosumRings(),this.animationState.transition("update")})}updateCalloutLineNodes(){var e;const{calloutLine:t}=this.properties,i=t.length,n=t.strokeWidth,s=null!=(e=t.colors)?e:this.properties.strokes,{offset:r}=this.properties.calloutLabel;this.calloutLabelSelection.selectByTag(0).forEach((e,t)=>{var o;const a=e.datum,{calloutLabel:l,outerRadius:c}=a;if((null==l?void 0:l.text)&&!l.hidden&&0!==c){e.visible=!0,e.strokeWidth=n,e.stroke=s[t%s.length],e.fill=void 0;const h=a.midCos*c,d=a.midSin*c;let u=a.midCos*(c+i),p=a.midSin*(c+i);if((null!=(o=l.collisionTextAlign)?o:0!==l.collisionOffsetY)&&null!=l.box){const e=l.box;let t=u,i=p;u<e.x?t=e.x:u>e.x+e.width&&(t=e.x+e.width),p<e.y?i=e.y:p>e.y+e.height&&(i=e.y+e.height);const n=t-u,s=i-p,o=Math.sqrt(Math.pow(n,2)+Math.pow(s,2)),a=o-r;a>0&&(u+=n*a/o,p+=s*a/o)}e.x1=h,e.y1=d,e.x2=u,e.y2=p}else e.visible=!1})}getLabelOverflow(e,t,i){const n=i.x-this.centerX,s=i.x+i.width-this.centerX,r=i.y-this.centerY,o=i.y+i.height-this.centerY;let a=1;t.x+1<n?a=(t.x+t.width-n)/t.width:t.x+t.width-1>s&&(a=(s-t.x)/t.width);const l=t.y+1<r||t.y+t.height-1>o;return{textLength:1===a?e.length:Math.floor(e.length*a)-1,hasVerticalOverflow:l,hasSurroundingSeriesOverflow:this.bboxIntersectsSurroundingSeries(t)}}bboxIntersectsSurroundingSeries(e,t=0,i=0){const{surroundingRadius:n}=this;if(null==n)return!1;const s=[{x:e.x+t,y:e.y+i},{x:e.x+e.width+t,y:e.y+i},{x:e.x+e.width+t,y:e.y+e.height+i},{x:e.x+t,y:e.y+e.height+i}],r=f(n,2);return s.some(e=>f(e.x,2)+f(e.y,2)>r)}computeCalloutLabelCollisionOffsets(){const{radiusScale:e}=this,{calloutLabel:t,calloutLine:i}=this.properties,{offset:n,minSpacing:s}=t,r=e.convert(0),o=this.nodeData,a=this.nodeData.filter(e=>{return!(!(t=e).calloutLabel||0===t.outerRadius);var t});if(a.forEach(e=>{const t=e.calloutLabel;null!=t&&(t.hidden=!1,t.collisionTextAlign=void 0,t.collisionOffsetY=0)}),a.length<=1)return;const l=a.filter(e=>e.midCos<0).sort((e,t)=>e.midSin-t.midSin),c=a.filter(e=>e.midCos>=0).sort((e,t)=>e.midSin-t.midSin),h=a.filter(e=>{var t;return e.midSin<0&&"center"===(null==(t=e.calloutLabel)?void 0:t.textAlign)}).sort((e,t)=>e.midCos-t.midCos),d=a.filter(e=>{var t;return e.midSin>=0&&"center"===(null==(t=e.calloutLabel)?void 0:t.textAlign)}).sort((e,t)=>e.midCos-t.midCos),u=new Go,p=e=>{var t;const s=e.calloutLabel;if(null==s)return new is(0,0,0,0);const r=e.outerRadius+i.length+n,o=e.midCos*r,a=e.midSin*r+s.collisionOffsetY;return u.text=s.text,u.x=o,u.y=a,u.setFont(this.properties.calloutLabel),u.setAlign({textAlign:null!=(t=s.collisionTextAlign)?t:s.textAlign,textBaseline:s.textBaseline}),u.computeBBox()},g=(e,t,i)=>{const n=p(e).grow(s/2),r=p(t).grow(s/2);if(n.x<r.x+r.width&&n.x+n.width>r.x&&("to-top"===i?n.y<r.y+r.height:n.y+n.height>r.y)){const e="to-top"===i?n.y-r.y-r.height:n.y+n.height-r.y;t.calloutLabel.collisionOffsetY=e}},f=e=>{const t=e.slice().sort((e,t)=>Math.abs(e.midSin)-Math.abs(t.midSin))[0],i=e.indexOf(t);for(let t=i-1;t>=0;t--){const i=e[t+1],n=e[t];g(i,n,"to-top")}for(let t=i+1;t<e.length;t++){const i=e[t-1],n=e[t];g(i,n,"to-bottom")}},m=e=>{const t=a.some(e=>0!==e.calloutLabel.collisionOffsetY),i=e.map(e=>p(e)),n=i.map(e=>e.clone().grow(s/2));let l=!1;for(let t=0;t<n.length&&!l;t++){const i=n[t];for(let s=t+1;s<e.length;s++){const e=n[s];if(i.collidesBBox(e)){l=!0;break}}}const c=o.map(e=>{const{startAngle:t,endAngle:i,outerRadius:n}=e;return{startAngle:t,endAngle:i,innerRadius:r,outerRadius:n}}),h=i.some(e=>c.some(t=>mg(e,t)));(l||t||h)&&e.filter(e=>"center"===e.calloutLabel.textAlign).forEach(e=>{const t=e.calloutLabel;e.midCos<0?t.collisionTextAlign="right":e.midCos>0?t.collisionTextAlign="left":t.collisionTextAlign="center"})};f(l),f(c),m(h),m(d)}updateCalloutLabelNodes(e){const{radiusScale:t}=this,{calloutLabel:i,calloutLine:n}=this.properties,s=n.length,{offset:r,color:o}=i,a=new Go;this.calloutLabelSelection.selectByTag(1).forEach(n=>{var l;const{datum:c}=n,h=c.calloutLabel,d=t.convert(c.radius),u=Math.max(0,d);if(!(null==h?void 0:h.text)||0===u||h.hidden)return void(n.visible=!1);const p=u+s+r,g=c.midCos*p,f=c.midSin*p+h.collisionOffsetY,m={textAlign:null!=(l=h.collisionTextAlign)?l:h.textAlign,textBaseline:h.textBaseline};a.text=h.text,a.x=g,a.y=f,a.setFont(this.properties.calloutLabel),a.setAlign(m);const v=a.computeBBox();let y=h.text,C=!0;if(i.avoidCollisions){const{textLength:t,hasVerticalOverflow:i}=this.getLabelOverflow(h.text,v,e);y=h.text.length===t?h.text:`${h.text.substring(0,t)}…`,C=!i}n.text=y,n.x=g,n.y=f,n.setFont(this.properties.calloutLabel),n.setAlign(m),n.fill=o,n.visible=C})}computeLabelsBBox(e,t){return x(this,null,function*(){const{calloutLabel:i,calloutLine:n}=this.properties,s=n.length,{offset:r,maxCollisionOffset:o,minSpacing:a}=i;if(!i.avoidCollisions)return null;yield this.maybeRefreshNodeData(),this.updateRadiusScale(!1),this.computeCalloutLabelCollisionOffsets();const l=[],c=new Go;let h;const{title:d}=this.properties;if((null==d?void 0:d.text)&&d.enabled){const e=this.getTitleTranslationY();isFinite(e)&&(c.text=d.text,c.x=0,c.y=e,c.setFont(d),c.setAlign({textBaseline:"bottom",textAlign:"center"}),h=c.computeBBox(),l.push(h))}return this.nodeData.forEach(i=>{var n;const d=i.calloutLabel;if(!d||0===i.outerRadius)return null;const u=i.outerRadius+s+r,p=i.midCos*u,g=i.midSin*u+d.collisionOffsetY;c.text=d.text,c.x=p,c.y=g,c.setFont(this.properties.calloutLabel),c.setAlign({textAlign:null!=(n=d.collisionTextAlign)?n:d.textAlign,textBaseline:d.textBaseline});const f=c.computeBBox();if(d.box=f,Math.abs(d.collisionOffsetY)>o)d.hidden=!0;else{if(h){const e=t.y-this.centerY,i=new is(h.x-a,e,h.width+2*a,h.y+h.height+a-e);if(f.collidesBBox(i))return void(d.hidden=!0)}if(e.hideWhenNecessary){const{textLength:e,hasVerticalOverflow:i,hasSurroundingSeriesOverflow:n}=this.getLabelOverflow(d.text,f,t),s=d.text.length>2&&e<2;if(i||s||n)return void(d.hidden=!0)}d.hidden=!1,l.push(f)}}),0===l.length?null:is.merge(l)})}updateSectorLabelNodes(){const{radiusScale:e}=this,t=e.convert(0),{fontSize:i,fontStyle:n,fontWeight:s,fontFamily:r,positionOffset:o,positionRatio:a,color:l}=this.properties.sectorLabel;this.sectorLabelSelection.each((e,c)=>{const{sectorLabel:h,outerRadius:d}=c;let u=!1;if(h&&0!==d){const p=t*(1-a)+d*a+o;e.fill=l,e.fontStyle=n,e.fontWeight=s,e.fontSize=i,e.fontFamily=r,e.text=h.text,e.x=c.midCos*p,e.y=c.midSin*p,e.textAlign="center",e.textBaseline="middle";const g=e.computeBBox(),f=[[g.x,g.y],[g.x+g.width,g.y],[g.x+g.width,g.y+g.height],[g.x,g.y+g.height]],{startAngle:m,endAngle:v}=c,y={startAngle:m,endAngle:v,innerRadius:t,outerRadius:d};f.every(([e,t])=>gg(e,t,y))&&(u=!0)}e.visible=u})}updateInnerLabelNodes(){const e=[],t=[];this.innerLabelsSelection.each((i,n)=>{const{fontStyle:s,fontWeight:r,fontSize:o,fontFamily:a,color:l}=n;i.fontStyle=s,i.fontWeight=r,i.fontSize=o,i.fontFamily=a,i.text=n.text,i.x=0,i.y=0,i.fill=l,i.textAlign="center",i.textBaseline="alphabetic",e.push(i.computeBBox()),t.push(n.margin)});const i=e=>0===e?0:t[e],n=e=>e===t.length-1?0:t[e],s=e.reduce((e,t,s)=>e+t.height+i(s)+n(s),0),r=Math.max(...e.map(e=>e.width)),o=this.getInnerRadius(),a=Math.sqrt(Math.pow(r/2,2)+Math.pow(s/2,2))<=(o>0?o:this.getOuterRadius()),l=[];for(let t=0,r=-s/2;t<e.length;t++){const s=e[t].height+r+i(t);l.push(s),r=s+n(t)}this.innerLabelsSelection.each((e,t,i)=>{e.y=l[i],e.visible=a})}updateZerosumRings(){this.zerosumOuterRing.size=2*this.getOuterRadius(),this.zerosumInnerRing.size=2*this.getInnerRadius()}getDatumLegendName(e){const{angleKey:t,calloutLabelKey:i,sectorLabelKey:n,legendItemKey:s}=this.properties,{sectorLabel:r,calloutLabel:o,legendItem:a}=e;return s&&void 0!==a?a.text:i&&i!==t&&void 0!==(null==o?void 0:o.text)?o.text:n&&n!==t&&void 0!==(null==r?void 0:r.text)?r.text:void 0}pickNodeClosestDatum(e){return Pg(this,e)}getTooltipHtml(e){var t;if(!this.properties.isValid())return nl;const{datum:i,angleValue:n,sectorFormat:{fill:s},itemId:r}=e,o=_u(null==(t=this.properties.title)?void 0:t.text),a=je(n)?Xn(n):String(n),l=this.getDatumLegendName(e);return this.properties.tooltip.toTooltipHtml({title:null!=o?o:l,content:o&&l?`${l}: ${a}`:a,backgroundColor:s},{datum:i,itemId:r,title:o,color:s,seriesId:this.id,angleKey:this.properties.angleKey,angleName:this.properties.angleName,radiusKey:this.properties.radiusKey,radiusName:this.properties.radiusName,calloutLabelKey:this.properties.calloutLabelKey,calloutLabelName:this.properties.calloutLabelName,sectorLabelKey:this.properties.sectorLabelKey,sectorLabelName:this.properties.sectorLabelName,legendItemKey:this.properties.legendItemKey})}getLegendData(e){var t,i,n,s,r;const{visible:o,processedData:a,dataModel:l}=this;if(!l||!(null==a?void 0:a.data.length)||!this.properties.isValid()||"category"!==e)return[];const{angleKey:c,calloutLabelKey:h,sectorLabelKey:d,legendItemKey:u}=this.properties;if(!(u||h&&h!==c||d&&d!==c))return[];const{calloutLabelIdx:p,sectorLabelIdx:g,legendItemIdx:f}=this.getProcessedDataIndexes(l),m=(null==(t=this.properties.title)?void 0:t.showInLegend)&&this.properties.title.text,v=[];for(let e=0;e<a.data.length;e++){const{datum:t,values:l}=a.data[e],y=[];m&&y.push(m);const C=this.getLabels(t,2*Math.PI,2*Math.PI,!1,l[p],l[g],l[f]);if(u&&void 0!==C.legendItem?y.push(C.legendItem.text):h&&h!==c&&void 0!==(null==(i=C.calloutLabel)?void 0:i.text)?y.push(null==(n=C.calloutLabel)?void 0:n.text):d&&d!==c&&void 0!==(null==(s=C.sectorLabel)?void 0:s.text)&&y.push(null==(r=C.sectorLabel)?void 0:r.text),0===y.length)continue;const b=this.getSectorFormat(t,e,!1);v.push({legendType:"category",id:this.id,itemId:e,seriesId:this.id,enabled:o&&this.seriesItemEnabled[e],label:{text:y.join(" - ")},marker:{fill:b.fill,stroke:b.stroke,fillOpacity:this.properties.fillOpacity,strokeOpacity:this.properties.strokeOpacity,strokeWidth:this.properties.strokeWidth},legendItemName:null!=u?t[u]:void 0})}return v}onLegendItemClick(e){const{enabled:t,itemId:i,series:n,legendItemName:s}=e;n.id===this.id?this.toggleSeriesItem(i,t):null!=s&&this.toggleOtherSeriesItems(s,t)}toggleSeriesItem(e,t){this.seriesItemEnabled[e]=t,this.nodeDataRefresh=!0}toggleOtherSeriesItems(e,t){var i;if(!this.properties.legendItemKey||!this.dataModel)return;const n=this.dataModel.resolveProcessedDataIndexById(this,"legendItemValue");null==(i=this.processedData)||i.data.forEach(({values:i},s)=>{i[n]===e&&this.toggleSeriesItem(s,t)})}animateEmptyUpdateReady(e){const{animationManager:t}=this.ctx,i=Lg(!0,this.properties.rotation,this.radiusScale,this.previousRadiusScale);ks(this.id,"nodes",t,[this.itemSelection,this.highlightSelection],i.nodes),ks(this.id,"innerCircle",t,[this.innerCircleSelection],i.innerCircle),Fu(this,"callout",t,this.calloutLabelSelection),Fu(this,"sector",t,this.sectorLabelSelection),Fu(this,"inner",t,this.innerLabelsSelection),this.previousRadiusScale.range=this.radiusScale.range}animateWaitingUpdateReady(){var e,t,i,n,s,r;const{itemSelection:o,highlightSelection:a,processedData:l,radiusScale:c,previousRadiusScale:h}=this,{animationManager:d}=this.ctx,u=null==(e=null==l?void 0:l.reduced)?void 0:e.diff;this.ctx.animationManager.stopByAnimationGroupId(this.id);const p=0===(null!=(t=null==u?void 0:u.moved.size)?t:0),g=(null!=(i=null==l?void 0:l.defs.keys.length)?i:0)>0,f=null==(r=null==(s=null==(n=null==l?void 0:l.reduced)?void 0:n.animationValidation)?void 0:s.uniqueKeys)||r;p&&g&&f||this.ctx.animationManager.skipCurrentBatch();const m=Lg(!1,this.properties.rotation,c,h);ks(this.id,"nodes",d,[o,a],m.nodes,(e,t)=>this.getDatumId(t),u),ks(this.id,"innerCircle",d,[this.innerCircleSelection],m.innerCircle),Fu(this,"callout",this.ctx.animationManager,this.calloutLabelSelection),Fu(this,"sector",this.ctx.animationManager,this.sectorLabelSelection),Fu(this,"inner",this.ctx.animationManager,this.innerLabelsSelection),this.previousRadiusScale.range=this.radiusScale.range}animateClearingUpdateEmpty(){const{itemSelection:e,highlightSelection:t,radiusScale:i,previousRadiusScale:n}=this,{animationManager:s}=this.ctx,r=Lg(!1,this.properties.rotation,i,n);ks(this.id,"nodes",s,[e,t],r.nodes),ks(this.id,"innerCircle",s,[this.innerCircleSelection],r.innerCircle),Gu(this,"callout",this.ctx.animationManager,this.calloutLabelSelection),Gu(this,"sector",this.ctx.animationManager,this.sectorLabelSelection),Gu(this,"inner",this.ctx.animationManager,this.innerLabelsSelection),this.previousRadiusScale.range=this.radiusScale.range}getDatumIdFromData(e){var t,i,n;const{calloutLabelKey:s,sectorLabelKey:r,legendItemKey:o}=this.properties;if(null==(n=null==(i=null==(t=this.processedData)?void 0:t.reduced)?void 0:i.animationValidation)?void 0:n.uniqueKeys)return o?e[o]:s?e[s]:r?e[r]:void 0}getDatumId(e){const{index:t}=e,i=this.getDatumIdFromData(e.datum);return null!=i?String(i):`${t}`}onDataChange(){var e;const{data:t,seriesItemEnabled:i}=this;this.seriesItemEnabled=null!=(e=null==t?void 0:t.map((e,t)=>{var n;return null==(n=i[t])||n}))?e:[]}computeFocusBounds(e){return Ng(this,e)}};Fg.className="DonutSeries",Fg.type="donut";var Gg={series:{__extends__:jt,title:{enabled:!0,fontStyle:void 0,fontWeight:"normal",fontSize:14,fontFamily:$t,color:Zt,spacing:5},calloutLabel:{enabled:!0,fontStyle:void 0,fontWeight:void 0,fontSize:12,fontFamily:$t,color:Yt,offset:3,minAngle:0},sectorLabel:{enabled:!0,fontStyle:void 0,fontWeight:"normal",fontSize:12,fontFamily:$t,color:Xt,positionOffset:0,positionRatio:.5},calloutLine:{length:10,strokeWidth:2},fillOpacity:1,strokeOpacity:1,strokeWidth:1,lineDash:[0],lineDashOffset:0,rotation:0,shadow:{enabled:!1,color:ii,xOffset:3,yOffset:3,blur:5},innerLabels:{fontStyle:void 0,fontWeight:void 0,fontSize:12,fontFamily:$t,color:Yt,margin:2},__BACKGROUND_COLOR_DO_NOT_USE:ti}},Vg=({takeColors:e,colorsCount:t,userPalette:i})=>{const{fills:n,strokes:s}=e(t);return{fills:n,strokes:i?s:[],calloutLine:{colors:s}}},Bg={type:"series",optionsKey:"series[]",packageType:"community",chartTypes:["polar"],identifier:"donut",instanceConstructor:Fg,themeTemplate:Gg,paletteFactory:Vg},Hg=class extends ll{constructor(){super(...arguments),this.showInLegend=!1}};S([Ys(er)],Hg.prototype,"showInLegend",2);var zg=class extends Ho{set(e,t){return super.set(e)}};S([On("Use a Donut Series instead"),Ys(ir,{optional:!0})],zg.prototype,"text",2),S([On("Use a Donut Series instead"),Ys(nr,{optional:!0})],zg.prototype,"margin",2);var Ug=class extends Ct{};S([On("Use a Donut Series instead"),Ys(vr,{optional:!0})],Ug.prototype,"fill",2),S([On("Use a Donut Series instead"),Ys(or,{optional:!0})],Ug.prototype,"fillOpacity",2);var Wg=class extends Ho{constructor(){super(...arguments),this.offset=3,this.minAngle=0,this.minSpacing=4,this.maxCollisionOffset=50,this.avoidCollisions=!0}};S([Ys(rr)],Wg.prototype,"offset",2),S([Ys(ar)],Wg.prototype,"minAngle",2),S([Ys(rr)],Wg.prototype,"minSpacing",2),S([Ys(rr)],Wg.prototype,"maxCollisionOffset",2),S([Ys(er)],Wg.prototype,"avoidCollisions",2);var jg=class extends Ho{constructor(){super(...arguments),this.positionOffset=0,this.positionRatio=.5}};S([Ys(nr)],jg.prototype,"positionOffset",2),S([Ys(or)],jg.prototype,"positionRatio",2);var Kg=class extends Ct{constructor(){super(...arguments),this.length=10,this.strokeWidth=1}};S([Ys(yr,{optional:!0})],Kg.prototype,"colors",2),S([Ys(rr)],Kg.prototype,"length",2),S([Ys(rr)],Kg.prototype,"strokeWidth",2);var $g=class extends Hd{constructor(){super(...arguments),this.fills=Object.values(Gt),this.strokes=Object.values(Vt),this.fillOpacity=1,this.strokeOpacity=1,this.lineDash=[0],this.lineDashOffset=0,this.cornerRadius=0,this.rotation=0,this.outerRadiusOffset=0,this.outerRadiusRatio=1,this.strokeWidth=1,this.sectorSpacing=void 0,this.innerLabels=new bt(zg),this.title=new Hg,this.innerCircle=new Ug,this.shadow=new Hu,this.calloutLabel=new Wg,this.sectorLabel=new jg,this.calloutLine=new Kg,this.tooltip=new ju,this.__BACKGROUND_COLOR_DO_NOT_USE=void 0}};S([Ys(ir)],$g.prototype,"angleKey",2),S([Ys(ir,{optional:!0})],$g.prototype,"angleName",2),S([Ys(ir,{optional:!0})],$g.prototype,"radiusKey",2),S([Ys(ir,{optional:!0})],$g.prototype,"radiusName",2),S([Ys(rr,{optional:!0})],$g.prototype,"radiusMin",2),S([Ys(rr,{optional:!0})],$g.prototype,"radiusMax",2),S([Ys(ir,{optional:!0})],$g.prototype,"calloutLabelKey",2),S([Ys(ir,{optional:!0})],$g.prototype,"calloutLabelName",2),S([Ys(ir,{optional:!0})],$g.prototype,"sectorLabelKey",2),S([Ys(ir,{optional:!0})],$g.prototype,"sectorLabelName",2),S([Ys(ir,{optional:!0})],$g.prototype,"legendItemKey",2),S([Ys(yr)],$g.prototype,"fills",2),S([Ys(yr)],$g.prototype,"strokes",2),S([Ys(or)],$g.prototype,"fillOpacity",2),S([Ys(or)],$g.prototype,"strokeOpacity",2),S([Ys(Ar)],$g.prototype,"lineDash",2),S([Ys(rr)],$g.prototype,"lineDashOffset",2),S([Ys(rr)],$g.prototype,"cornerRadius",2),S([Ys(tr,{optional:!0})],$g.prototype,"formatter",2),S([Ys(ar)],$g.prototype,"rotation",2),S([Ys(nr)],$g.prototype,"outerRadiusOffset",2),S([Ys(or)],$g.prototype,"outerRadiusRatio",2),S([On("Use a Donut Series instead"),Ys(nr,{optional:!0})],$g.prototype,"innerRadiusOffset",2),S([On("Use a Donut Series instead"),Ys(or,{optional:!0})],$g.prototype,"innerRadiusRatio",2),S([Ys(rr)],$g.prototype,"strokeWidth",2),S([Ys(rr,{optional:!0})],$g.prototype,"sectorSpacing",2),S([Ys(xr)],$g.prototype,"innerLabels",2),S([Ys(Qs)],$g.prototype,"title",2),S([Ys(Qs)],$g.prototype,"innerCircle",2),S([Ys(Qs)],$g.prototype,"shadow",2),S([Ys(Qs)],$g.prototype,"calloutLabel",2),S([Ys(Qs)],$g.prototype,"sectorLabel",2),S([Ys(Qs)],$g.prototype,"calloutLine",2),S([Ys(Qs)],$g.prototype,"tooltip",2),S([Ys(ir,{optional:!0})],$g.prototype,"__BACKGROUND_COLOR_DO_NOT_USE",2);var Yg=class extends Xh{constructor(e,t,i,n){super(e,t,i,n),this.angleKey=n.properties.angleKey,this.radiusKey=n.properties.radiusKey,this.calloutLabelKey=n.properties.calloutLabelKey,this.sectorLabelKey=n.properties.sectorLabelKey}},qg=class extends Og{constructor(e){super({moduleCtx:e,pickModes:[0],useLabelLayer:!0,animationResetFns:{item:kg,label:Vu}}),this.properties=new $g,this.previousRadiusScale=new Qd,this.radiusScale=new Qd,this.backgroundGroup=this.rootGroup.appendChild(new Mo({name:`${this.id}-background`,layer:!0,zIndex:0})),this.zerosumRingsGroup=this.backgroundGroup.appendChild(new Mo({name:`${this.id}-zerosumRings`})),this.zerosumOuterRing=this.zerosumRingsGroup.appendChild(new Cd),this.zerosumInnerRing=this.zerosumRingsGroup.appendChild(new Cd),this.innerCircleGroup=this.backgroundGroup.appendChild(new Mo({name:`${this.id}-innerCircle`})),this.seriesItemEnabled=[],this.surroundingRadius=void 0,this.NodeEvent=Yg,this.angleScale=new Qd,this.angleScale.domain=[0,1],this.angleScale.range=[-Math.PI,Math.PI].map(e=>e+Math.PI/2);const t=new Mo({name:"pieCalloutLabels"}),i=new Mo({name:"pieSectorLabels"}),n=new Mo({name:"innerLabels"});this.labelGroup.append(t),this.labelGroup.append(i),this.labelGroup.append(n),this.calloutLabelSelection=_a.select(t,Mo),this.sectorLabelSelection=_a.select(i,Go),this.innerLabelsSelection=_a.select(n,Go),this.innerCircleSelection=_a.select(this.innerCircleGroup,Cd)}addChartEventListeners(){var e;this.destroyFns.push(null==(e=this.ctx.chartEventManager)?void 0:e.addListener("legend-item-click",e=>this.onLegendItemClick(e)))}get visible(){return super.visible&&(0===this.seriesItemEnabled.length||this.seriesItemEnabled.some(e=>e))}nodeFactory(){return new xg}getSeriesDomain(e){return"x"===e?this.angleScale.domain:this.radiusScale.domain}processData(e){return x(this,null,function*(){var t,i,n,s,r;if(null==this.data||!this.properties.isValid())return;let{data:o}=this;const{visible:a,seriesItemEnabled:l}=this,{angleKey:c,radiusKey:h,calloutLabelKey:d,sectorLabelKey:u,legendItemKey:p}=this.properties,g=!this.ctx.animationManager.isSkipped(),f=[],m=[];p?f.push(Wh(p,"band",{id:"legendItemKey"})):d?f.push(Wh(d,"band",{id:"calloutLabelKey"})):u&&f.push(Wh(u,"band",{id:"sectorLabelKey"}));const C=this.radiusScale.type,b=this.radiusScale.type;h&&m.push(Kh(h,{id:"radiusValue",min:null!=(t=this.properties.radiusMin)?t:0,max:this.properties.radiusMax}),jh(h,C,{id:"radiusRaw"}),kh({id:"radiusValue"},[0,1],1,null!=(i=this.properties.radiusMin)?i:0,this.properties.radiusMax)),d&&m.push(jh(d,"band",{id:"calloutLabelValue"})),u&&m.push(jh(u,"band",{id:"sectorLabelValue"})),p&&m.push(jh(p,"band",{id:"legendItemValue"})),g&&this.processedData&&f.length>0&&m.push(Fh(this.processedData)),m.push(Ph()),o=o.map((e,t)=>a&&l[t]?e:y(v({},e),{[c]:0})),yield this.requestDataModel(e,o,{props:[...f,$h(c,b,{id:"angleValue",onlyPositive:!0}),jh(c,b,{id:"angleRaw"}),kh({id:"angleValue"},[0,1],0,0),...m]});for(const e of null!=(r=null==(s=null==(n=this.processedData)?void 0:n.defs)?void 0:s.values)?r:[]){const{id:t,missing:i,property:n}=e,s=Zc(this,i);"angleRaw"!==t&&s>0&&_.warnOnce(`no value was found for the key '${String(n)}' on ${s} data element${s>1?"s":""}`)}this.animationState.transition("updateData")})}maybeRefreshNodeData(){return x(this,null,function*(){var e;if(!this.nodeDataRefresh)return;const{nodeData:t=[]}=null!=(e=yield this.createNodeData())?e:{};this.nodeData=t,this.nodeDataRefresh=!1})}getProcessedDataIndexes(e){return{angleIdx:e.resolveProcessedDataIndexById(this,"angleValue"),radiusIdx:this.properties.radiusKey?e.resolveProcessedDataIndexById(this,"radiusValue"):-1,calloutLabelIdx:this.properties.calloutLabelKey?e.resolveProcessedDataIndexById(this,"calloutLabelValue"):-1,sectorLabelIdx:this.properties.sectorLabelKey?e.resolveProcessedDataIndexById(this,"sectorLabelValue"):-1,legendItemIdx:this.properties.legendItemKey?e.resolveProcessedDataIndexById(this,"legendItemValue"):-1}}createNodeData(){return x(this,null,function*(){const{id:e,processedData:t,dataModel:i,angleScale:n}=this,{rotation:s}=this.properties;if(!t||!i||"ungrouped"!==t.type)return;const{angleIdx:r,radiusIdx:o,calloutLabelIdx:a,sectorLabelIdx:l,legendItemIdx:c}=this.getProcessedDataIndexes(i);let h=0,d=0;const u=t.data.map((e,t)=>{var i;const{datum:u,values:p}=e,g=p[r],f=n.convert(h)+Bs(s);h=g,d+=g;const m=n.convert(h)+Bs(s),y=Math.abs(m-f),C=f+y/2,b=p[r+1],S=o>=0&&null!=(i=p[o])?i:1,w=o>=0?p[o+1]:void 0,x=c>=0?p[c]:void 0,E=this.getLabels(u,C,y,!0,p[a],p[l],x),M=this.getSectorFormat(u,t,!1);return v({itemId:t,series:this,datum:u,index:t,angleValue:b,midAngle:C,midCos:Math.cos(C),midSin:Math.sin(C),startAngle:f,endAngle:m,sectorFormat:M,radiusValue:w,radius:S,innerRadius:Math.max(this.radiusScale.convert(0),0),outerRadius:Math.max(this.radiusScale.convert(S),0),legendItemValue:x},E)});this.zerosumOuterRing.visible=0===d;const{innerRadiusRatio:p=1}=this.properties;return this.zerosumInnerRing.visible=0===d&&1!==p&&p>0,{itemId:e,nodeData:u,labelData:u}})}getLabels(e,t,i,n,s,r,o){const{calloutLabel:a,sectorLabel:l,legendItemKey:c}=this.properties,h=!n||a.enabled?this.properties.calloutLabelKey:void 0,d=!n||l.enabled?this.properties.sectorLabelKey:void 0;if(!h&&!d&&!c)return{};const u={datum:e,angleKey:this.properties.angleKey,angleName:this.properties.angleName,radiusKey:this.properties.radiusKey,radiusName:this.properties.radiusName,calloutLabelKey:this.properties.calloutLabelKey,calloutLabelName:this.properties.calloutLabelName,sectorLabelKey:this.properties.sectorLabelKey,sectorLabelName:this.properties.sectorLabelName,legendItemKey:this.properties.legendItemKey},p={};return h&&i>Bs(a.minAngle)&&(p.calloutLabel=y(v({},this.getTextAlignment(t)),{text:this.getLabelText(a,y(v({},u),{value:s})),hidden:!1,collisionTextAlign:void 0,collisionOffsetY:0,box:void 0})),d&&(p.sectorLabel={text:this.getLabelText(l,y(v({},u),{value:r}))}),null!=c&&null!=o&&(p.legendItem={key:c,text:o}),p}getTextAlignment(e){const t=[{textAlign:"center",textBaseline:"bottom"},{textAlign:"left",textBaseline:"middle"},{textAlign:"center",textBaseline:"hanging"},{textAlign:"right",textBaseline:"middle"}],i=Gs(e)- -.75*Math.PI;return t[Zn(Math.floor(i/(Math.PI/2)),t.length)]}getSectorFormat(e,t,i){var n,s,r,o,a;const{callbackCache:l,highlightManager:c}=this.ctx,{angleKey:h,radiusKey:d,fills:u,strokes:p,formatter:g,sectorSpacing:f,__BACKGROUND_COLOR_DO_NOT_USE:m}=this.properties,v=c.getActiveHighlight(),y=i&&(null==v?void 0:v.series)===this&&t===v.itemId;let C=p[t%p.length];null!=f&&(null!=C||(C=m));const{fill:b,fillOpacity:S,stroke:w,strokeWidth:x,strokeOpacity:E}=Ze(y&&this.properties.highlightStyle.item,{fill:u.length>0?u[t%u.length]:void 0,fillOpacity:this.properties.fillOpacity,stroke:C,strokeWidth:this.getStrokeWidth(this.properties.strokeWidth),strokeOpacity:this.getOpacity()});let M;return g&&(M=l.call(g,{datum:e,angleKey:h,radiusKey:d,fill:b,stroke:w,fills:u,strokes:p,strokeWidth:x,highlighted:y,seriesId:this.id})),{fill:null!=(n=null==M?void 0:M.fill)?n:b,fillOpacity:null!=(s=null==M?void 0:M.fillOpacity)?s:S,stroke:null!=(r=null==M?void 0:M.stroke)?r:w,strokeWidth:null!=(o=null==M?void 0:M.strokeWidth)?o:x,strokeOpacity:null!=(a=null==M?void 0:M.strokeOpacity)?a:E}}getInnerRadius(){const{radius:e}=this,{innerRadiusRatio:t=1,innerRadiusOffset:i=0}=this.properties,n=e*t+i;return n===e||n<0?0:n}getOuterRadius(){return Math.max(this.radius*this.properties.outerRadiusRatio+this.properties.outerRadiusOffset,0)}updateRadiusScale(e){const t=[this.getInnerRadius(),this.getOuterRadius()];this.radiusScale.range=t,e&&(this.previousRadiusScale.range=t),this.nodeData=this.nodeData.map(e=>{var t=e,{radius:i}=t,n=C(t,["radius"]);return y(v({},n),{radius:i,innerRadius:Math.max(this.radiusScale.convert(0),0),outerRadius:Math.max(this.radiusScale.convert(i),0)})})}getTitleTranslationY(){var e,t;const i=Math.max(0,this.radiusScale.range[1]);return 0===i?NaN:-i-(2+(null!=(t=null==(e=this.properties.title)?void 0:e.spacing)?t:0))-Math.max(0,-i)}update(e){return x(this,arguments,function*({seriesRect:e}){const{title:t}=this.properties,i={seriesRectWidth:null==e?void 0:e.width,seriesRectHeight:null==e?void 0:e.height},n=null!=xt(this.nodeDataDependencies,i);if(n&&(this._nodeDataDependencies=i),yield this.maybeRefreshNodeData(),this.updateTitleNodes(),this.updateRadiusScale(n),this.contentGroup.translationX=this.centerX,this.contentGroup.translationY=this.centerY,this.highlightGroup.translationX=this.centerX,this.highlightGroup.translationY=this.centerY,this.backgroundGroup.translationX=this.centerX,this.backgroundGroup.translationY=this.centerY,this.labelGroup&&(this.labelGroup.translationX=this.centerX,this.labelGroup.translationY=this.centerY),t){const e=this.getTitleTranslationY(),i=t.node.computeBBox();t.node.visible=t.enabled&&isFinite(e)&&!this.bboxIntersectsSurroundingSeries(i,0,e),t.node.translationY=isFinite(e)?e:0}for(const e of[this.zerosumInnerRing,this.zerosumOuterRing])e.fillOpacity=0,e.stroke=this.properties.calloutLabel.color,e.strokeWidth=1,e.strokeOpacity=1;this.updateNodeMidPoint(),yield this.updateSelections(),yield this.updateNodes(e)})}updateTitleNodes(){var e,t;const{oldTitle:i}=this,{title:n}=this.properties;i!==n&&(i&&(null==(e=this.labelGroup)||e.removeChild(i.node)),n&&(n.node.textBaseline="bottom",null==(t=this.labelGroup)||t.appendChild(n.node)),this.oldTitle=n)}updateNodeMidPoint(){this.nodeData.forEach(e=>{const t=e.innerRadius+(e.outerRadius-e.innerRadius)/2;e.midPoint={x:e.midCos*Math.max(0,t),y:e.midSin*Math.max(0,t)}})}updateSelections(){return x(this,null,function*(){yield this.updateGroupSelection(),this.updateInnerCircleSelection()})}updateGroupSelection(){return x(this,null,function*(){const{itemSelection:e,highlightSelection:t,calloutLabelSelection:i,sectorLabelSelection:n,innerLabelsSelection:s}=this,r=(e,t)=>{let i=this.nodeData;t&&(i=i.map(e=>y(v({},e),{sectorFormat:v({},e.sectorFormat)}))),e.update(i,void 0,e=>this.getDatumId(e)),this.ctx.animationManager.isSkipped()&&e.cleanup()};r(e,!1),r(t,!0),i.update(this.nodeData,e=>{const t=new Ba;t.tag=0,t.pointerEvents=1,e.appendChild(t);const i=new Go;i.tag=1,i.pointerEvents=1,e.appendChild(i)}),n.update(this.nodeData,e=>{e.pointerEvents=1}),s.update(this.properties.innerLabels,e=>{e.pointerEvents=1})})}updateInnerCircleSelection(){const{innerCircle:e}=this.properties;let t=0;const i=this.getInnerRadius();if(i>0){const e=Math.min(i,this.getOuterRadius()),n=1;t=Math.ceil(2*e+n)}const n=e?[{radius:t}]:[];this.innerCircleSelection.update(n)}updateNodes(e){return x(this,null,function*(){const t=this.ctx.highlightManager.getActiveHighlight(),i=this.visible&&this.seriesItemEnabled.indexOf(!0)>=0;this.rootGroup.visible=i,this.backgroundGroup.visible=i,this.contentGroup.visible=i,this.highlightGroup.visible=i&&(null==t?void 0:t.series)===this,this.labelGroup&&(this.labelGroup.visible=i),this.contentGroup.opacity=this.getOpacity(),this.innerCircleSelection.each((e,{radius:t})=>{var i,n;e.setProperties({fill:null==(i=this.properties.innerCircle)?void 0:i.fill,opacity:null==(n=this.properties.innerCircle)?void 0:n.fillOpacity,size:t})});const n=(e,t,i,n)=>{const s=this.getSectorFormat(t.datum,t.itemId,n);t.sectorFormat.fill=s.fill,t.sectorFormat.stroke=s.stroke;const r=this.ctx.animationManager.isSkipped();r&&(e.startAngle=t.startAngle,e.endAngle=t.endAngle,e.innerRadius=t.innerRadius,e.outerRadius=t.outerRadius),(n||r)&&(e.fill=s.fill,e.stroke=s.stroke),e.strokeWidth=s.strokeWidth,e.fillOpacity=s.fillOpacity,e.strokeOpacity=this.properties.strokeOpacity,e.lineDash=this.properties.lineDash,e.lineDashOffset=this.properties.lineDashOffset,e.fillShadow=this.properties.shadow,e.cornerRadius=this.properties.cornerRadius,e.inset=null!=this.properties.sectorSpacing?(this.properties.sectorSpacing+(null!=s.stroke?s.strokeWidth:0))/2:0,e.lineJoin=null!=this.properties.sectorSpacing?"miter":"round"};this.itemSelection.each((e,t,i)=>n(e,t,0,!1)),this.highlightSelection.each((e,i,s)=>{const r=(null==t?void 0:t.series)===this&&e.datum.itemId===t.itemId;n(e,i,0,!0),e.visible=r}),this.updateCalloutLineNodes(),this.updateCalloutLabelNodes(e),this.updateSectorLabelNodes(),this.updateInnerLabelNodes(),this.updateZerosumRings(),this.animationState.transition("update")})}updateCalloutLineNodes(){var e;const{calloutLine:t}=this.properties,i=t.length,n=t.strokeWidth,s=null!=(e=t.colors)?e:this.properties.strokes,{offset:r}=this.properties.calloutLabel;this.calloutLabelSelection.selectByTag(0).forEach((e,t)=>{var o;const a=e.datum,{calloutLabel:l,outerRadius:c}=a;if((null==l?void 0:l.text)&&!l.hidden&&0!==c){e.visible=!0,e.strokeWidth=n,e.stroke=s[t%s.length],e.fill=void 0;const h=a.midCos*c,d=a.midSin*c;let u=a.midCos*(c+i),p=a.midSin*(c+i);if((null!=(o=l.collisionTextAlign)?o:0!==l.collisionOffsetY)&&null!=l.box){const e=l.box;let t=u,i=p;u<e.x?t=e.x:u>e.x+e.width&&(t=e.x+e.width),p<e.y?i=e.y:p>e.y+e.height&&(i=e.y+e.height);const n=t-u,s=i-p,o=Math.sqrt(Math.pow(n,2)+Math.pow(s,2)),a=o-r;a>0&&(u+=n*a/o,p+=s*a/o)}e.x1=h,e.y1=d,e.x2=u,e.y2=p}else e.visible=!1})}getLabelOverflow(e,t,i){const n=i.x-this.centerX,s=i.x+i.width-this.centerX,r=i.y-this.centerY,o=i.y+i.height-this.centerY;let a=1;t.x+1<n?a=(t.x+t.width-n)/t.width:t.x+t.width-1>s&&(a=(s-t.x)/t.width);const l=t.y+1<r||t.y+t.height-1>o;return{textLength:1===a?e.length:Math.floor(e.length*a)-1,hasVerticalOverflow:l,hasSurroundingSeriesOverflow:this.bboxIntersectsSurroundingSeries(t)}}bboxIntersectsSurroundingSeries(e,t=0,i=0){const{surroundingRadius:n}=this;if(null==n)return!1;const s=[{x:e.x+t,y:e.y+i},{x:e.x+e.width+t,y:e.y+i},{x:e.x+e.width+t,y:e.y+e.height+i},{x:e.x+t,y:e.y+e.height+i}],r=f(n,2);return s.some(e=>f(e.x,2)+f(e.y,2)>r)}computeCalloutLabelCollisionOffsets(){const{radiusScale:e}=this,{calloutLabel:t,calloutLine:i}=this.properties,{offset:n,minSpacing:s}=t,r=e.convert(0),o=this.nodeData,a=this.nodeData.filter(e=>{return!(!(t=e).calloutLabel||0===t.outerRadius);var t});if(a.forEach(e=>{const t=e.calloutLabel;null!=t&&(t.hidden=!1,t.collisionTextAlign=void 0,t.collisionOffsetY=0)}),a.length<=1)return;const l=a.filter(e=>e.midCos<0).sort((e,t)=>e.midSin-t.midSin),c=a.filter(e=>e.midCos>=0).sort((e,t)=>e.midSin-t.midSin),h=a.filter(e=>{var t;return e.midSin<0&&"center"===(null==(t=e.calloutLabel)?void 0:t.textAlign)}).sort((e,t)=>e.midCos-t.midCos),d=a.filter(e=>{var t;return e.midSin>=0&&"center"===(null==(t=e.calloutLabel)?void 0:t.textAlign)}).sort((e,t)=>e.midCos-t.midCos),u=new Go,p=e=>{var t;const s=e.calloutLabel;if(null==s)return new is(0,0,0,0);const r=e.outerRadius+i.length+n,o=e.midCos*r,a=e.midSin*r+s.collisionOffsetY;return u.text=s.text,u.x=o,u.y=a,u.setFont(this.properties.calloutLabel),u.setAlign({textAlign:null!=(t=s.collisionTextAlign)?t:s.textAlign,textBaseline:s.textBaseline}),u.computeBBox()},g=(e,t,i)=>{const n=p(e).grow(s/2),r=p(t).grow(s/2);if(n.x<r.x+r.width&&n.x+n.width>r.x&&("to-top"===i?n.y<r.y+r.height:n.y+n.height>r.y)){const e="to-top"===i?n.y-r.y-r.height:n.y+n.height-r.y;t.calloutLabel.collisionOffsetY=e}},f=e=>{const t=e.slice().sort((e,t)=>Math.abs(e.midSin)-Math.abs(t.midSin))[0],i=e.indexOf(t);for(let t=i-1;t>=0;t--){const i=e[t+1],n=e[t];g(i,n,"to-top")}for(let t=i+1;t<e.length;t++){const i=e[t-1],n=e[t];g(i,n,"to-bottom")}},m=e=>{const t=a.some(e=>0!==e.calloutLabel.collisionOffsetY),i=e.map(e=>p(e)),n=i.map(e=>e.clone().grow(s/2));let l=!1;for(let t=0;t<n.length&&!l;t++){const i=n[t];for(let s=t+1;s<e.length;s++){const e=n[s];if(i.collidesBBox(e)){l=!0;break}}}const c=o.map(e=>{const{startAngle:t,endAngle:i,outerRadius:n}=e;return{startAngle:t,endAngle:i,innerRadius:r,outerRadius:n}}),h=i.some(e=>c.some(t=>mg(e,t)));(l||t||h)&&e.filter(e=>"center"===e.calloutLabel.textAlign).forEach(e=>{const t=e.calloutLabel;e.midCos<0?t.collisionTextAlign="right":e.midCos>0?t.collisionTextAlign="left":t.collisionTextAlign="center"})};f(l),f(c),m(h),m(d)}updateCalloutLabelNodes(e){const{radiusScale:t}=this,{calloutLabel:i,calloutLine:n}=this.properties,s=n.length,{offset:r,color:o}=i,a=new Go;this.calloutLabelSelection.selectByTag(1).forEach(n=>{var l;const{datum:c}=n,h=c.calloutLabel,d=t.convert(c.radius),u=Math.max(0,d);if(!(null==h?void 0:h.text)||0===u||h.hidden)return void(n.visible=!1);const p=u+s+r,g=c.midCos*p,f=c.midSin*p+h.collisionOffsetY,m={textAlign:null!=(l=h.collisionTextAlign)?l:h.textAlign,textBaseline:h.textBaseline};a.text=h.text,a.x=g,a.y=f,a.setFont(this.properties.calloutLabel),a.setAlign(m);const v=a.computeBBox();let y=h.text,C=!0;if(i.avoidCollisions){const{textLength:t,hasVerticalOverflow:i}=this.getLabelOverflow(h.text,v,e);y=h.text.length===t?h.text:`${h.text.substring(0,t)}…`,C=!i}n.text=y,n.x=g,n.y=f,n.setFont(this.properties.calloutLabel),n.setAlign(m),n.fill=o,n.visible=C})}computeLabelsBBox(e,t){return x(this,null,function*(){const{calloutLabel:i,calloutLine:n}=this.properties,s=n.length,{offset:r,maxCollisionOffset:o,minSpacing:a}=i;if(!i.avoidCollisions)return null;yield this.maybeRefreshNodeData(),this.updateRadiusScale(!1),this.computeCalloutLabelCollisionOffsets();const l=[],c=new Go;let h;const{title:d}=this.properties;if((null==d?void 0:d.text)&&d.enabled){const e=this.getTitleTranslationY();isFinite(e)&&(c.text=d.text,c.x=0,c.y=e,c.setFont(d),c.setAlign({textBaseline:"bottom",textAlign:"center"}),h=c.computeBBox(),l.push(h))}return this.nodeData.forEach(i=>{var n;const d=i.calloutLabel;if(!d||0===i.outerRadius)return null;const u=i.outerRadius+s+r,p=i.midCos*u,g=i.midSin*u+d.collisionOffsetY;c.text=d.text,c.x=p,c.y=g,c.setFont(this.properties.calloutLabel),c.setAlign({textAlign:null!=(n=d.collisionTextAlign)?n:d.textAlign,textBaseline:d.textBaseline});const f=c.computeBBox();if(d.box=f,Math.abs(d.collisionOffsetY)>o)d.hidden=!0;else{if(h){const e=t.y-this.centerY,i=new is(h.x-a,e,h.width+2*a,h.y+h.height+a-e);if(f.collidesBBox(i))return void(d.hidden=!0)}if(e.hideWhenNecessary){const{textLength:e,hasVerticalOverflow:i,hasSurroundingSeriesOverflow:n}=this.getLabelOverflow(d.text,f,t),s=d.text.length>2&&e<2;if(i||s||n)return void(d.hidden=!0)}d.hidden=!1,l.push(f)}}),0===l.length?null:is.merge(l)})}updateSectorLabelNodes(){const{radiusScale:e}=this,t=e.convert(0),{fontSize:i,fontStyle:n,fontWeight:s,fontFamily:r,positionOffset:o,positionRatio:a,color:l}=this.properties.sectorLabel,c=t>0,h=1===this.seriesItemEnabled.filter(Boolean).length;this.sectorLabelSelection.each((e,d)=>{const{sectorLabel:u,outerRadius:p}=d;let g=!1;if(u&&0!==p){const f=t*(1-a)+p*a+o;e.fill=l,e.fontStyle=n,e.fontWeight=s,e.fontSize=i,e.fontFamily=r,e.text=u.text,!c&&h?(e.x=0,e.y=0):(e.x=d.midCos*f,e.y=d.midSin*f),e.textAlign="center",e.textBaseline="middle";const m=e.computeBBox(),v=[[m.x,m.y],[m.x+m.width,m.y],[m.x+m.width,m.y+m.height],[m.x,m.y+m.height]],{startAngle:y,endAngle:C}=d,b={startAngle:y,endAngle:C,innerRadius:t,outerRadius:p};v.every(([e,t])=>gg(e,t,b))&&(g=!0)}e.visible=g})}updateInnerLabelNodes(){const e=[],t=[];this.innerLabelsSelection.each((i,n)=>{const{fontStyle:s,fontWeight:r,fontSize:o,fontFamily:a,color:l,margin:c=2}=n;i.fontStyle=s,i.fontWeight=r,i.fontSize=o,i.fontFamily=a,i.text=n.text,i.x=0,i.y=0,i.fill=l,i.textAlign="center",i.textBaseline="alphabetic",e.push(i.computeBBox()),t.push(c)});const i=e=>0===e?0:t[e],n=e=>e===t.length-1?0:t[e],s=e.reduce((e,t,s)=>e+t.height+i(s)+n(s),0),r=Math.max(...e.map(e=>e.width)),o=this.getInnerRadius(),a=Math.sqrt(Math.pow(r/2,2)+Math.pow(s/2,2))<=(o>0?o:this.getOuterRadius()),l=[];for(let t=0,r=-s/2;t<e.length;t++){const s=e[t].height+r+i(t);l.push(s),r=s+n(t)}this.innerLabelsSelection.each((e,t,i)=>{e.y=l[i],e.visible=a})}updateZerosumRings(){this.zerosumOuterRing.size=2*this.getOuterRadius(),this.zerosumInnerRing.size=2*this.getInnerRadius()}getDatumLegendName(e){const{angleKey:t,calloutLabelKey:i,sectorLabelKey:n,legendItemKey:s}=this.properties,{sectorLabel:r,calloutLabel:o,legendItem:a}=e;return s&&void 0!==a?a.text:i&&i!==t&&void 0!==(null==o?void 0:o.text)?o.text:n&&n!==t&&void 0!==(null==r?void 0:r.text)?r.text:void 0}pickNodeClosestDatum(e){return Pg(this,e)}getTooltipHtml(e){var t;if(!this.properties.isValid())return nl;const{datum:i,angleValue:n,sectorFormat:{fill:s},itemId:r}=e,o=_u(null==(t=this.properties.title)?void 0:t.text),a=je(n)?Xn(n):String(n),l=this.getDatumLegendName(e);return this.properties.tooltip.toTooltipHtml({title:null!=o?o:l,content:o&&l?`${l}: ${a}`:a,backgroundColor:s},{datum:i,itemId:r,title:o,color:s,seriesId:this.id,angleKey:this.properties.angleKey,angleName:this.properties.angleName,radiusKey:this.properties.radiusKey,radiusName:this.properties.radiusName,calloutLabelKey:this.properties.calloutLabelKey,calloutLabelName:this.properties.calloutLabelName,sectorLabelKey:this.properties.sectorLabelKey,sectorLabelName:this.properties.sectorLabelName,legendItemKey:this.properties.legendItemKey})}getLegendData(e){var t,i,n,s,r;const{visible:o,processedData:a,dataModel:l}=this;if(!l||!(null==a?void 0:a.data.length)||"category"!==e)return[];const{angleKey:c,calloutLabelKey:h,sectorLabelKey:d,legendItemKey:u}=this.properties;if(!(u||h&&h!==c||d&&d!==c))return[];const{calloutLabelIdx:p,sectorLabelIdx:g,legendItemIdx:f}=this.getProcessedDataIndexes(l),m=(null==(t=this.properties.title)?void 0:t.showInLegend)&&this.properties.title.text,v=[];for(let e=0;e<a.data.length;e++){const{datum:t,values:l}=a.data[e],y=[];m&&y.push(m);const C=this.getLabels(t,2*Math.PI,2*Math.PI,!1,l[p],l[g],l[f]);if(u&&void 0!==C.legendItem?y.push(C.legendItem.text):h&&h!==c&&void 0!==(null==(i=C.calloutLabel)?void 0:i.text)?y.push(null==(n=C.calloutLabel)?void 0:n.text):d&&d!==c&&void 0!==(null==(s=C.sectorLabel)?void 0:s.text)&&y.push(null==(r=C.sectorLabel)?void 0:r.text),0===y.length)continue;const b=this.getSectorFormat(t,e,!1);v.push({legendType:"category",id:this.id,itemId:e,seriesId:this.id,enabled:o&&this.seriesItemEnabled[e],label:{text:y.join(" - ")},marker:{fill:b.fill,stroke:b.stroke,fillOpacity:this.properties.fillOpacity,strokeOpacity:this.properties.strokeOpacity,strokeWidth:this.properties.strokeWidth},legendItemName:null!=u?t[u]:void 0})}return v}onLegendItemClick(e){const{enabled:t,itemId:i,series:n,legendItemName:s}=e;n.id===this.id?this.toggleSeriesItem(i,t):null!=s&&this.toggleOtherSeriesItems(s,t)}toggleSeriesItem(e,t){this.seriesItemEnabled[e]=t,this.nodeDataRefresh=!0}toggleOtherSeriesItems(e,t){var i;if(!this.properties.legendItemKey||!this.dataModel)return;const n=this.dataModel.resolveProcessedDataIndexById(this,"legendItemValue");null==(i=this.processedData)||i.data.forEach(({values:i},s)=>{i[n]===e&&this.toggleSeriesItem(s,t)})}animateEmptyUpdateReady(e){const{animationManager:t}=this.ctx,i=Lg(!0,this.properties.rotation,this.radiusScale,this.previousRadiusScale);ks(this.id,"nodes",t,[this.itemSelection,this.highlightSelection],i.nodes),ks(this.id,"innerCircle",t,[this.innerCircleSelection],i.innerCircle),Fu(this,"callout",t,this.calloutLabelSelection),Fu(this,"sector",t,this.sectorLabelSelection),Fu(this,"inner",t,this.innerLabelsSelection),this.previousRadiusScale.range=this.radiusScale.range}animateWaitingUpdateReady(){var e,t,i,n,s,r;const{itemSelection:o,highlightSelection:a,processedData:l,radiusScale:c,previousRadiusScale:h}=this,{animationManager:d}=this.ctx,u=null==(e=null==l?void 0:l.reduced)?void 0:e.diff;this.ctx.animationManager.stopByAnimationGroupId(this.id);const p=0===(null!=(t=null==u?void 0:u.moved.size)?t:0),g=(null!=(i=null==l?void 0:l.defs.keys.length)?i:0)>0,f=null==(r=null==(s=null==(n=null==l?void 0:l.reduced)?void 0:n.animationValidation)?void 0:s.uniqueKeys)||r;p&&g&&f||this.ctx.animationManager.skipCurrentBatch();const m=Lg(!1,this.properties.rotation,c,h);ks(this.id,"nodes",d,[o,a],m.nodes,(e,t)=>this.getDatumId(t),u),ks(this.id,"innerCircle",d,[this.innerCircleSelection],m.innerCircle),Fu(this,"callout",this.ctx.animationManager,this.calloutLabelSelection),Fu(this,"sector",this.ctx.animationManager,this.sectorLabelSelection),Fu(this,"inner",this.ctx.animationManager,this.innerLabelsSelection),this.previousRadiusScale.range=this.radiusScale.range}animateClearingUpdateEmpty(){const{itemSelection:e,highlightSelection:t,radiusScale:i,previousRadiusScale:n}=this,{animationManager:s}=this.ctx,r=Lg(!1,this.properties.rotation,i,n);ks(this.id,"nodes",s,[e,t],r.nodes),ks(this.id,"innerCircle",s,[this.innerCircleSelection],r.innerCircle),Gu(this,"callout",this.ctx.animationManager,this.calloutLabelSelection),Gu(this,"sector",this.ctx.animationManager,this.sectorLabelSelection),Gu(this,"inner",this.ctx.animationManager,this.innerLabelsSelection),this.previousRadiusScale.range=this.radiusScale.range}getDatumIdFromData(e){var t,i,n;const{calloutLabelKey:s,sectorLabelKey:r,legendItemKey:o}=this.properties;if(null==(n=null==(i=null==(t=this.processedData)?void 0:t.reduced)?void 0:i.animationValidation)?void 0:n.uniqueKeys)return o?e[o]:s?e[s]:r?e[r]:void 0}getDatumId(e){const{index:t}=e,i=this.getDatumIdFromData(e.datum);return null!=i?String(i):`${t}`}onDataChange(){var e;const{data:t,seriesItemEnabled:i}=this;this.seriesItemEnabled=null!=(e=null==t?void 0:t.map((e,t)=>{var n;return null==(n=i[t])||n}))?e:[]}computeFocusBounds(e){return Ng(this,e)}};qg.className="PieSeries",qg.type="pie";var Xg={type:"series",optionsKey:"series[]",packageType:"community",chartTypes:["polar"],identifier:"pie",instanceConstructor:qg,themeTemplate:Gg,paletteFactory:Vg},Zg=["start","center","end"],Qg=["annotations","ranges","zoom"],Jg=(e=>(e.Top="top",e.Right="right",e.Bottom="bottom",e.Left="left",e.FloatingTop="floating-top",e.FloatingBottom="floating-bottom",e))(Jg||{}),ef=Object.values(Jg),tf=class extends Ct{constructor(e,t){super(),this.onChange=e,this.onButtonsChange=t,this.align="start",this.position="top"}};S([Qa(e=>{e.onChange(e.enabled)}),Ys(er)],tf.prototype,"enabled",2),S([Qa(e=>{e.onChange(e.enabled)}),Ys(Gr(["start","center","end"]),{optional:!0})],tf.prototype,"align",2),S([Qa(e=>{e.onChange(e.enabled)}),Ys(Gr(["top","right","bottom","left","floating-top","floating-bottom"]),{optional:!0})],tf.prototype,"position",2),S([Qa(e=>{e.onButtonsChange(e.buttons)}),Ys(cr,{optional:!0})],tf.prototype,"buttons",2);var nf="ag-charts-toolbar",sf={align:`${nf}__align`,button:`${nf}__button`,icon:`${nf}__icon`,label:`${nf}__label`},rf={top:`${nf}--top`,right:`${nf}--right`,bottom:`${nf}--bottom`,left:`${nf}--left`,"floating-top":`${nf}--floating-top`,"floating-bottom":`${nf}--floating-bottom`,hidden:`${nf}--hidden`,preventFlash:`${nf}--prevent-flash`,floatingHidden:`${nf}--floating-hidden`,align:{start:`${sf.align}--start`,center:`${sf.align}--center`,end:`${sf.align}--end`},button:{hidden:`${sf.button}--hidden`}},of=`\n.${nf} {\n    align-items: center;\n    background: var(--ag-charts-toolbar-background-color);\n    border-bottom: var(--ag-charts-toolbar-border-critical);\n    border-top: var(--ag-charts-toolbar-border-critical);\n    border-left: var(--ag-charts-toolbar-border);\n    border-right: var(--ag-charts-toolbar-border);\n    display: flex;\n    flex-wrap: nowrap;\n    opacity: 1;\n    position: absolute;\n    transform: translateY(0);\n    transition: opacity 0.2s ease-in-out, transform 0.2s ease-in-out;\n}\n\n.${rf.hidden},\n.${rf.preventFlash} {\n    visibility: hidden;\n}\n\n.${rf.floatingHidden} {\n    opacity: 0;\n    transition: opacity 0.4s ease-in-out;\n}\n\n.${rf.top},\n.${rf.bottom} {\n    flex-direction: row;\n    height: var(--ag-charts-toolbar-size);\n    padding: 0 var(--ag-charts-toolbar-padding);\n    width: 100%;\n}\n\n.${rf.left},\n.${rf.right} {\n    flex-direction: column;\n    padding: var(--ag-charts-toolbar-padding) 0;\n    width: var(--ag-charts-toolbar-size);\n}\n\n.${rf["floating-top"]},\n.${rf["floating-bottom"]} {\n    background: none;\n    border: none;\n    flex-direction: row;\n    height: var(--ag-charts-toolbar-size);\n    overflow: hidden;\n    padding: 0 var(--ag-charts-toolbar-padding);\n    pointer-events: none;\n    width: 100%;\n}\n\n.${sf.align} {\n    display: flex;\n    flex-direction: inherit;\n    flex-wrap: inherit;\n    max-width: 100%;\n}\n\n.${rf.align.center},\n.${rf.align.end} {\n    margin-left: auto;\n}\n\n.${rf.left} .${rf.align.center},\n.${rf.left} .${rf.align.end},\n.${rf.right} .${rf.align.center},\n.${rf.right} .${rf.align.end} {\n    margin-left: 0;\n    margin-top: auto;\n}\n\n.${rf["floating-top"]} .${sf.align},\n.${rf["floating-bottom"]} .${sf.align} {\n    gap: var(--ag-charts-toolbar-gap);\n    transition: transform 0.4s ease-in-out;\n}\n\n.${sf.button} {\n    align-items: center;\n    border-radius: var(--ag-charts-button-radius);\n    color: var(--ag-charts-toolbar-foreground-color);\n    display: flex;\n    font-size: 14px;\n    font-weight: 500;\n    justify-content: center;\n    margin: 0;\n    padding: var(--ag-charts-button-padding);\n    pointer-events: all;\n    transition: background-color .25s ease-in-out;\n}\n\n.${rf.left} .${sf.button},\n.${rf.right} .${sf.button} {\n    height: var(--ag-charts-toolbar-size);\n    max-width: 100%;\n    overflow: hidden;\n}\n\n.${rf["floating-top"]} .${sf.button},\n.${rf["floating-bottom"]} .${sf.button} {\n    background: var(--ag-charts-toolbar-background-color);\n    border: var(--ag-charts-toolbar-border-critical);\n}\n\n.${rf.button.hidden} {\n    display: none;\n}\n\n.${sf.button}:hover {\n    background: var(--ag-charts-toolbar-hover-color);\n}\n\n.${sf.button}:disabled {\n    background: var(--ag-charts-toolbar-disabled-background-color);\n    color: var(--ag-charts-toolbar-disabled-foreground-color);\n}\n\n.${sf.button}:not([disabled]) {\n    cursor: pointer;\n}\n\n.${sf.icon} {\n    height: 1.2em;\n    width: 1.2em;\n}\n\n.${sf.icon} + .${sf.label} {\n    margin-left: var(--ag-charts-size);\n}\n\n.${sf.icon},\n.${sf.label} {\n    pointer-events: none;\n}\n\n`,af=class extends xe{constructor(e){super(),this.ctx=e,this.enabled=!0,this.annotations=new tf(this.onGroupChanged.bind(this,"annotations"),this.onGroupButtonsChanged.bind(this,"annotations")),this.ranges=new tf(this.onGroupChanged.bind(this,"ranges"),this.onGroupButtonsChanged.bind(this,"ranges")),this.zoom=new tf(this.onGroupChanged.bind(this,"zoom"),this.onGroupButtonsChanged.bind(this,"zoom")),this.margin=10,this.floatingDetectionRange=28,this.positions={top:new Set,right:new Set,bottom:new Set,left:new Set,"floating-top":new Set,"floating-bottom":new Set},this.positionAlignments={top:{},right:{},bottom:{},left:{},"floating-top":{},"floating-bottom":{}},this.groupCallers={annotations:0,ranges:0,zoom:0},this.groupButtons={annotations:[],ranges:[],zoom:[]},this.pendingButtonToggledEvents=[],this.groupProxied=new Set,this.container=e.toolbarManager.element,this.elements={top:this.container.appendChild(Mn("div")),right:this.container.appendChild(Mn("div")),bottom:this.container.appendChild(Mn("div")),left:this.container.appendChild(Mn("div")),"floating-top":this.container.appendChild(Mn("div")),"floating-bottom":this.container.appendChild(Mn("div"))},Tn(of,nf),this.renderToolbar("top"),this.renderToolbar("right"),this.renderToolbar("bottom"),this.renderToolbar("left"),this.renderToolbar("floating-top"),this.renderToolbar("floating-bottom"),this.toggleVisibilities(),this.destroyFns.push(e.interactionManager.addListener("hover",this.onHover.bind(this),31),e.interactionManager.addListener("leave",this.onLeave.bind(this),31),e.toolbarManager.addListener("button-toggled",this.onButtonToggled.bind(this)),e.toolbarManager.addListener("group-toggled",this.onGroupToggled.bind(this)),e.toolbarManager.addListener("proxy-group-options",this.onProxyGroupOptions.bind(this)),e.layoutService.addListener("layout-complete",this.onLayoutComplete.bind(this)),()=>this.destroyElements())}destroyElements(){for(const e of Object.values(this.elements))e.remove()}onHover(e){const{enabled:t,elements:i,floatingDetectionRange:n,ctx:{scene:s}}=this,{offsetY:r,sourceEvent:{target:o}}=e,{FloatingBottom:a,FloatingTop:l}=Jg;if(!t)return;const c=i[a],h=i[l],d=r>c.offsetTop-n&&r<s.canvas.element.offsetHeight||o===c,u=h.offsetTop+h.offsetHeight+n,p=r>0&&r<u||o===h;c.classList.toggle(rf.floatingHidden,!d),h.classList.toggle(rf.floatingHidden,!p),this.translateFloatingElements(a,d),this.translateFloatingElements(l,p)}onLeave(e){const{enabled:t,elements:i,ctx:{scene:n}}=this,{relatedTarget:s,target:r}=e.sourceEvent,{FloatingBottom:o,FloatingTop:a}=Jg;t&&r===n.canvas.element&&(Qg.some(e=>this.groupButtons[e].some(e=>e===s))||(i[o].classList.add(rf.floatingHidden),i[a].classList.add(rf.floatingHidden),this.translateFloatingElements(o,!1),this.translateFloatingElements(a,!1)))}onGroupChanged(e){null==this[e]||this.groupProxied.has(e)||(this.createGroup(e),this.toggleVisibilities())}onGroupButtonsChanged(e,t){this.enabled&&!this.groupProxied.has(e)&&(this.createGroupButtons(e,t),this.toggleVisibilities())}onLayoutComplete(){for(const e of ef)this.elements[e].classList.remove(rf.preventFlash)}onButtonToggled(e){const{group:t,value:i,enabled:n}=e;if(0!==this.groupButtons[t].length)for(const e of this.groupButtons[t])e.dataset.toolbarValue===`${i}`&&(e.disabled=!n);else this.pendingButtonToggledEvents.push(e)}onGroupToggled(e){const{group:t,visible:i}=e;this.toggleGroup(t,i),this.toggleVisibilities()}onProxyGroupOptions(e){const{group:t,options:i}=e;this.groupProxied.add(t),this.createGroup(t,i.enabled,i.position),this.createGroupButtons(t,i.buttons),this.toggleGroup(t,i.enabled),this[t].set(i)}createGroup(e,t,i){null!=t||(t=this[e].enabled),null!=i||(i=this[e].position);for(const n of ef)t&&i===n?this.positions[n].add(e):this.positions[n].delete(e)}createGroupButtons(e,t){var i,n;for(const t of this.groupButtons[e])t.remove();this.groupButtons[e]=[];const s=null!=(i=this[e].align)?i:"start",r=null!=(n=this[e].position)?n:"top",o=this.positionAlignments[r][s];for(const i of null!=t?t:[]){const t=this.createButtonElement(e,i);null==o||o.appendChild(t),this.groupButtons[e].push(t)}}toggleGroup(e,t){t?this.groupCallers[e]+=1:this.groupCallers[e]=Math.max(0,this.groupCallers[e]-1)}processPendingEvents(){var e;const t=(null!=(e=this.pendingButtonToggledEvents)?e:[]).slice();for(const e of t)this.onButtonToggled(e);this.pendingButtonToggledEvents=[]}performLayout(e){return x(this,arguments,function*({shrinkRect:e}){const{elements:t,margin:i}=this;return t.top.classList.contains(rf.hidden)||e.shrink(t.top.offsetHeight+2*i,"top"),t.right.classList.contains(rf.hidden)||e.shrink(t.right.offsetWidth+i,"right"),t.bottom.classList.contains(rf.hidden)||e.shrink(t.bottom.offsetHeight+2*i,"bottom"),t.left.classList.contains(rf.hidden)||e.shrink(t.left.offsetWidth+i,"left"),{shrinkRect:e}})}performCartesianLayout(e){return x(this,null,function*(){const{elements:t,margin:i}=this,{seriesRect:n}=e,{FloatingBottom:s,FloatingTop:r}=Jg;t.top.style.top=n.y-t.top.offsetHeight-2*i+"px",t.top.style.left=`${i}px`,t.top.style.width=`calc(100% - ${2*i}px)`,t.right.style.top=`${n.y+i}px`,t.right.style.right=`${i}px`,t.right.style.height=`calc(100% - ${n.y+2*i}px)`,t.bottom.style.bottom=`${i}px`,t.bottom.style.left=`${i}px`,t.bottom.style.width=`calc(100% - ${2*i}px)`,t.left.style.top=`${n.y}px`,t.left.style.left=`${i}px`,t.left.style.height=`calc(100% - ${n.y+2*i}px)`,t[r].style.top=`${n.y}px`,t[r].style.paddingTop=`${i}px`,t[s].style.top=n.y+n.height-t[s].offsetHeight+"px",t[s].style.paddingBottom=`${i}px`})}toggleVisibilities(){var e;if(null==this.elements)return;const t=e=>this[e].enabled&&this.groupCallers[e]>0,i=e=>t=>"string"!=typeof t.value&&"number"!=typeof t.value||`${t.value}`===e.dataset.toolbarValue;for(const e of ef){const i=this.enabled&&Array.from(this.positions[e].values()).some(t);this.elements[e].classList.toggle(rf.hidden,!i)}for(const n of Qg){if(null==this[n])continue;const s=t(n);for(const t of this.groupButtons[n]){const r=s&&(null==(e=this[n].buttons)?void 0:e.some(i(t)));t.classList.toggle(rf.button.hidden,!r)}}}translateFloatingElements(e,t){const{elements:i,margin:n,positionAlignments:s}=this,r=i[e],o=Object.values(s[e]);for(const e of o)e.style.transform=t&&""!==e.style.transform?"translateY(0)":`translateY(${r.offsetHeight+n}px)`}renderToolbar(e="top"){const t=this.elements[e];t.classList.add(nf,rf[e],rf.preventFlash),"floating-top"!==e&&"floating-bottom"!==e||t.classList.add(rf.floatingHidden);for(const i of Zg){const n=Mn("div");n.classList.add(sf.align,rf.align[i]),t.appendChild(n),this.positionAlignments[e][i]=n}}createButtonElement(e,t){const i=Mn("button");i.classList.add(sf.button),i.dataset.toolbarGroup=e,i.tabIndex=-1,"string"!=typeof t.value&&"number"!=typeof t.value||(i.dataset.toolbarValue=`${t.value}`),t.tooltip&&(i.title=t.tooltip);let n="";return null!=t.icon&&(n=`<span class="ag-charts-icon-${t.icon} ${sf.icon}"></span>`),null!=t.label&&(n=`${n}<span class="${sf.label}">${t.label}</span>`),i.innerHTML=n,i.onclick=this.onButtonPress.bind(this,e,t.value),this.destroyFns.push(()=>i.remove()),i}onButtonPress(e,t){this.ctx.toolbarManager.pressButton(e,t)}};S([Qa(e=>{e.processPendingEvents(),e.toggleVisibilities()}),Ys(er)],af.prototype,"enabled",2);var lf=864e5,cf=30*lf,hf={type:"root",optionsKey:"toolbar",packageType:"community",chartTypes:["cartesian"],instanceConstructor:af,themeTemplate:{toolbar:{enabled:!0,annotations:{enabled:!1,position:"left",align:"start",buttons:[{label:"Li",value:"line"},{label:"PCh",value:"parallel-channel"}]},ranges:{enabled:!1,position:"top",align:"start",buttons:[{label:"1m",value:cf},{label:"3m",value:3*cf},{label:"6m",value:6*cf},{label:"YTD",value:(e,t)=>[new Date(`${new Date(t).getFullYear()}-01-01`).getTime(),t]},{label:"1y",value:365*lf},{label:"All",value:(e,t)=>[e,t]}]},zoom:{enabled:!1,position:"top",align:"end",buttons:[{icon:"zoom-out",tooltip:"Zoom out",value:"zoom-out"},{icon:"zoom-in",tooltip:"Zoom in",value:"zoom-in"},{icon:"pan-left",tooltip:"Pan left",value:"pan-left"},{icon:"pan-right",tooltip:"Pan right",value:"pan-right"},{icon:"pan-start",tooltip:"Pan to the start",value:"pan-start"},{icon:"pan-end",tooltip:"Pan to the end",value:"pan-end"},{icon:"reset",tooltip:"Reset the zoom",value:"reset"}]}}}};var df=class e extends od{constructor(e,t){super(e,t)}performLayout(){return x(this,null,function*(){const t=yield w(e.prototype,this,"performLayout").call(this),{seriesArea:{padding:i},seriesRoot:n,annotationRoot:s,highlightRoot:r}=this,o=t.clone();t.shrink(i.left,"left"),t.shrink(i.top,"top"),t.shrink(i.right,"right"),t.shrink(i.bottom,"bottom"),this.seriesRect=t,this.animationRect=t,this.hoverRect=t;for(const e of[n,s,r])e.translationX=Math.floor(t.x),e.translationY=Math.floor(t.y);return yield Promise.all(this.series.map(e=>x(this,null,function*(){yield e.update({seriesRect:t})}))),n.visible=this.series[0].visible,n.setClipRectInGroupCoordinateSpace(new is(t.x,t.y,t.width,t.height)),this.ctx.layoutService.dispatchLayoutComplete({type:"layout-complete",chart:{width:this.ctx.scene.width,height:this.ctx.scene.height},clipSeries:!1,series:{rect:o,paddedRect:t,visible:!0},axes:[]}),t})}};df.className="HierarchyChart",df.type="hierarchy";var uf=df,pf=class extends El{constructor(){super(...arguments),this.shape="polygon",this.innerRadiusRatio=0,this.defaultTickMinSpacing=20}computeLabelsBBox(e,t){return null}};S([Ys(Gr(["polygon","circle"],"a polar axis shape"))],pf.prototype,"shape",2),S([Ys(or)],pf.prototype,"innerRadiusRatio",2);var gf=class e extends od{constructor(e,t){super(e,t),this.padding=new Jl(40),this.axisGroup.zIndex=6}performLayout(){return x(this,null,function*(){const t=yield w(e.prototype,this,"performLayout").call(this),i=t.clone();return this.computeSeriesRect(t),yield this.computeCircle(t),this.axes.forEach(e=>e.update()),this.hoverRect=t,this.ctx.layoutService.dispatchLayoutComplete({type:"layout-complete",chart:{width:this.ctx.scene.width,height:this.ctx.scene.height},clipSeries:!1,series:{rect:i,paddedRect:t,visible:!0},axes:[]}),t})}updateAxes(e,t,i){var n,s;const r=this.axes.find(e=>"x"===e.direction),o=this.axes.find(e=>"y"===e.direction);if(!(r instanceof pf&&o instanceof pf))return;const a=r.scale,l=null==(n=a.ticks)?void 0:n.call(a).map(e=>a.convert(e)),c=o.innerRadiusRatio;r.innerRadiusRatio=c,null==(s=r.computeRange)||s.call(r),r.gridLength=i,o.gridAngles=l,o.gridRange=r.range,o.range=[i,i*c],[r,o].forEach(i=>{i.translation.x=e,i.translation.y=t,i.calculateLayout()})}computeSeriesRect(e){const{seriesArea:{padding:t}}=this;e.shrink(t.left,"left"),e.shrink(t.top,"top"),e.shrink(t.right,"right"),e.shrink(t.bottom,"bottom"),this.seriesRect=e,this.animationRect=e}computeCircle(e){return x(this,null,function*(){const t=this.series.filter(e=>e instanceof Og),i=this.axes.filter(e=>e instanceof pf),n=(e,i,n)=>{this.updateAxes(e,i,n),t.forEach(t=>{t.centerX=e,t.centerY=i,t.radius=n});const s=t.filter(e=>e instanceof qg||e instanceof Fg);if(s.length>1){const e=s.map(e=>{const t=e.getInnerRadius();return{series:e,innerRadius:t}}).sort((e,t)=>e.innerRadius-t.innerRadius);e.at(-1).series.surroundingRadius=void 0;for(let t=0;t<e.length-1;t++)e[t].series.surroundingRadius=e[t+1].innerRadius}},s=e.x+e.width/2,r=e.y+e.height/2,o=Math.max(0,Math.min(e.width,e.height)/2);let a=o;n(s,r,a);const l=(...l)=>x(this,[...l],function*({hideWhenNecessary:l=!1}={}){const c=[];for(const n of[...i,...t]){const t=yield n.computeLabelsBBox({hideWhenNecessary:l},e);t&&c.push(t)}if(0===c.length)return void n(s,r,o);const h=is.merge(c),d=this.refineCircle(h,a,e);n(d.centerX,d.centerY,d.radius),d.radius!==a&&(a=d.radius)});return yield l(),yield l(),yield l(),yield l({hideWhenNecessary:!0}),yield l({hideWhenNecessary:!0}),{radius:a,centerX:s,centerY:r}})}refineCircle(e,t,i){const n=-t,s=-t,r=t,o=t;let a=Math.max(0,n-e.x),l=Math.max(0,s-e.y),c=Math.max(0,e.x+e.width-r),h=Math.max(0,e.y+e.height-o);a=c=Math.max(a,c),l=h=Math.max(l,h);const d=i.width-a-c,u=i.height-l-h;let p=Math.min(d,u)/2;const g=.5*i.width/2,f=.5*i.height/2,m=Math.min(g,f);if(p<m){p=m;const e=a+c;if(2*p+(l+h)>i.height){const e=i.height-2*p;2*Math.min(l,h)>e?(l=e/2,h=e/2):l>h?l=e-h:h=e-l}if(2*p+e>i.width){const e=i.width-2*p;2*Math.min(a,c)>e?(a=e/2,c=e/2):a>c?a=e-c:c=e-a}}const v=a+2*p+c,y=l+2*p+h;return{centerX:i.x+(i.width-v)/2+a+p,centerY:i.y+(i.height-y)/2+l+p,radius:p}}};gf.className="PolarChart",gf.type="polar";var ff=gf,mf=Math.PI/180,vf=e=>e*mf,yf=e=>-Math.log(Math.tan(.25*Math.PI+e*mf*.5)),Cf=e=>e/mf,bf=e=>(Math.atan(Math.exp(-e))-.25*Math.PI)/(.5*mf),Sf=class e{constructor(t,i){this.domain=t,this.range=i,this.type="mercator",this.bounds=e.bounds(t)}static bounds(e){const[[t,i],[n,s]]=e,r=vf(t),o=yf(i),a=vf(n),l=yf(s);return new is(Math.min(r,a),Math.min(o,l),Math.abs(a-r),Math.abs(l-o))}static fixedScale(){return new e([[Cf(0),bf(0)],[Cf(1),bf(1)]],[[0,0],[1,1]])}convert([e,t]){const[[i,n],[s,r]]=this.range,o=(s-i)/this.bounds.width,a=(r-n)/this.bounds.height;return[(vf(e)-this.bounds.x)*o+i,(yf(t)-this.bounds.y)*a+n]}invert([e,t]){const[[i,n],[s,r]]=this.range,o=(s-i)/this.bounds.width,a=(r-n)/this.bounds.height;return[Cf((e-i)/o+this.bounds.x),bf((t-n)/a+this.bounds.y)]}};function wf(e){return"map-shape"===e.type||"map-line"===e.type||"map-marker"===e.type||"map-shape-background"===e.type||"map-line-background"===e.type}var xf=class e extends od{constructor(e,t){super(e,t),this.xAxis=new eu(this.getModuleContext()),this.xAxis.position="bottom",this.yAxis=new eu(this.getModuleContext()),this.yAxis.position="left",this.ctx.zoomManager.updateAxes([this.xAxis,this.yAxis])}updateData(){return x(this,null,function*(){yield w(e.prototype,this,"updateData").call(this);const{topology:t}=this.getOptions();this.series.forEach(e=>{wf(e)&&e.setChartTopology(t)})})}performLayout(){return x(this,null,function*(){const t=yield w(e.prototype,this,"performLayout").call(this),{seriesArea:{padding:i},seriesRoot:n,annotationRoot:s,highlightRoot:r}=this,o=t.clone();t.shrink(i.left,"left"),t.shrink(i.top,"top"),t.shrink(i.right,"right"),t.shrink(i.bottom,"bottom"),this.seriesRect=t,this.animationRect=t,this.hoverRect=t;const a=this.series.filter(wf),l=a.reduce((e,t)=>{if(!t.visible)return e;const i=t.topologyBounds;return null==i?e:null==e?i:(e.merge(i),e)},void 0);let c;if(null!=l){const{lon0:e,lat0:i,lon1:n,lat1:s}=l,r=[[e,i],[n,s]],o=Sf.bounds(r),{width:a,height:h}=t,d=Math.min(a/o.width,h/o.height),u=o.width*d,p=o.height*d,g=(a-u)/2,f=(h-p)/2,m=g,v=f,y=g+u,C=f+p,b=this.ctx.zoomManager.getAxisZoom(this.xAxis.id),S=this.ctx.zoomManager.getAxisZoom(this.yAxis.id),w=(y-m)/(b.max-b.min),x=m-w*b.min,E=(C-v)/(1-S.min-(1-S.max)),M=v-E*(1-S.max);c=new Sf(r,[[x,M],[x+w,M+E]])}a.forEach(e=>{e.scale=c});const h=this.series.some(e=>e.visible);n.visible=h;for(const e of[n,s,r])e.translationX=Math.floor(t.x),e.translationY=Math.floor(t.y),e.setClipRectInGroupCoordinateSpace(new is(t.x,t.y,t.width,t.height));return this.ctx.layoutService.dispatchLayoutComplete({type:"layout-complete",chart:{width:this.ctx.scene.width,height:this.ctx.scene.height},clipSeries:!1,series:{rect:o,paddedRect:t,visible:h},axes:[]}),t})}};xf.className="TopologyChart",xf.type="topology";var Ef=xf,Mf=Ln.create(!0,"opts");function Af(e){if(gt(e))return"cartesian";if(ft(e))return"polar";if(mt(e))return"hierarchy";if(vt(e))return"topology";throw new Error(`AG Chart - unknown type of chart for options with type: ${e.type}`)}var Tf=class e{static licenseCheck(e){var t,i,n,s;this.licenseChecked||(this.licenseManager=null==(i=(t=we).licenseManager)?void 0:i.call(t,e),null==(n=this.licenseManager)||n.setLicenseKey(this.licenseKey,this.gridContext),null==(s=this.licenseManager)||s.validateLicense(),this.licenseChecked=!0)}static setLicenseKey(e){this.licenseKey=e}static setGridContext(e){this.gridContext=e}static getLicenseDetails(e){var t,i;return null==(i=(t=we).licenseManager)?void 0:i.call(t,{}).getLicenseDetails(e)}static getInstance(e){return Lf.getInstance(e)}static create(e){var t,i,n;this.licenseCheck(e);const s=Lf.createOrUpdate(e);return(null==(t=this.licenseManager)?void 0:t.isDisplayWatermark())&&(null==(n=(i=we).injectWatermark)||n.call(i,s.chart.element,this.licenseManager.getWatermarkMessage())),s}static update(t,i){if(!Zd.isInstance(t))throw new Error(e.INVALID_CHART_REF_MESSAGE);Lf.createOrUpdate(i,t)}static updateDelta(t,i){if(!Zd.isInstance(t))throw new Error(e.INVALID_CHART_REF_MESSAGE);Lf.updateUserDelta(t,i)}static download(t,i){if(!(t instanceof Zd))throw new Error(e.INVALID_CHART_REF_MESSAGE);Lf.download(t,i).catch(e=>_.errorOnce(e))}static getImageDataURL(t,i){if(!(t instanceof Zd))throw new Error(e.INVALID_CHART_REF_MESSAGE);return Lf.getImageDataURL(t,i)}};Tf.INVALID_CHART_REF_MESSAGE="AG Charts - invalid chart reference passed",Tf.licenseChecked=!1,Tf.gridContext=!1;var Df=Tf,If=class{static warnDeprecated(e){Nn()(`AgChart.${e}`,`Use AgCharts.${e} instead`)}static create(e){return this.warnDeprecated("create"),Df.create(e)}static update(e,t){return this.warnDeprecated("update"),Df.update(e,t)}static updateDelta(e,t){return this.warnDeprecated("updateDelta"),Df.updateDelta(e,t)}static download(e,t){return this.warnDeprecated("download"),Df.download(e,t)}static getImageDataURL(e,t){return this.warnDeprecated("getImageDataURL"),Df.getImageDataURL(e,t)}},Rf=class e{static getInstance(e){const t=od.getInstance(e);return t?Zd.chartInstances.get(t):void 0}static initialiseModules(){e.initialised||(function(){Ee.register(du,Au,Lu,hf,Dp,Yp,ig,lg,ug,Bg,Xg,rg);for(const e of[eu,Il,su,Bl,iu])Me.register(e.type,{instanceConstructor:e,hidden:e===Bl})}(),function(){for(const e of Ee.modules){if("enterprise"!==e.packageType||ut(e)||_.errorOnce("Unexpected enterprise module registered: "+e.identifier),"root"===e.type&&e.themeTemplate)for(const t of e.chartTypes)ct.set(t,e.themeTemplate);if("series"===e.type){if(e.chartTypes.length>1)throw new Error(`AG Charts - Module definition error: ${e.identifier}`);Rt.register(e.identifier,e)}if("series-option"===e.type&&e.themeTemplate)for(const t of e.seriesTypes)Rt.setThemeTemplate(t,e.themeTemplate);if("axis-option"===e.type&&e.themeTemplate)for(const t of e.axisTypes){const i=e.themeTemplate[t],n=v(v({},e.themeTemplate),i);for(const t of e.axisTypes)delete n[t];Me.setThemeTemplate(t,n)}"axis"===e.type&&Me.register(e.identifier,e),"legend"===e.type&&Lt.register(e.identifier,e)}if(Ee.hasEnterpriseModules()){const e=ht.filter(({useCount:e})=>null==e||0===e);e.length>0&&_.errorOnce("Enterprise modules expected but not registered: ",e)}}(),e.initialised=!0)}static createOrUpdate(t,i){e.initialiseModules(),Mf(">>> AgChartV2.createOrUpdate() user options",t);const n=t,{overrideDevicePixelRatio:s,document:r,window:o}=n,a=C(n,["overrideDevicePixelRatio","document","window"]),l=new Pn(a,{overrideDevicePixelRatio:s,document:r,window:o});let c=null==i?void 0:i.chart;return null!=c&&Af(a)===Af(c.processedOptions)||(c=e.createChartInstance(l,c)),null==i?i=new Zd(c):i.chart=c,Mf.check()&&"undefined"!=typeof window&&(null!=window.agChartInstances||(window.agChartInstances={}),window.agChartInstances[c.id]=c),c.queuedUserOptions.push(a),c.requestFactoryUpdate(e=>{e.applyOptions(l),e.queuedUserOptions.splice(0,e.queuedUserOptions.indexOf(a))}),i}static updateUserDelta(t,i){At(i=Et(i,{shallow:["data"]}),e=>{if("object"==typeof e)for(const[t,i]of Object.entries(e))void 0===i&&Object.assign(e,{[t]:Symbol("UNSET")})},{skip:["data"]});const{chart:n}=t,s=n.getOptions(),r=Ze(i,s);Mf(">>> AgChartV2.updateUserDelta() user delta",i),Mf("AgChartV2.updateUserDelta() - base options",s),e.createOrUpdate(r,t)}static download(t,i){return x(this,null,function*(){try{const n=yield e.prepareResizedChart(t,i);n.chart.ctx.scene.download(null==i?void 0:i.fileName,null==i?void 0:i.fileFormat),n.destroy()}catch(e){_.errorOnce(e)}})}static getImageDataURL(t,i){return x(this,null,function*(){const n=yield e.prepareResizedChart(t,i),s=n.chart.ctx.scene.getDataURL(null==i?void 0:i.fileFormat);return n.destroy(),s})}static prepareResizedChart(t){return x(this,arguments,function*({chart:t},i={}){var n,s,r,o;const a=null!=(s=null!=(n=i.width)?n:t.width)?s:t.ctx.scene.canvas.width,l=null!=(o=null!=(r=i.height)?r:t.height)?o:t.ctx.scene.canvas.height,c=Ze({container:document.createElement("div"),overrideDevicePixelRatio:1,autoSize:!1,width:a,height:l},Ee.hasEnterpriseModules()&&{animation:{enabled:!1}},t.userOptions),h=e.createOrUpdate(c);return h.chart.ctx.zoomManager.updateZoom("agChartV2",t.ctx.zoomManager.getZoom()),t.series.forEach((e,t)=>{e.visible||(h.chart.series[t].visible=!1)}),t.update(0,{forceNodeDataRefresh:!0}),yield h.chart.waitForUpdate(),h})}static createChartInstance(t,i){const n=null==i?void 0:i.destroy({keepTransferableResources:!0});return new(e.getChartByOptions(t.processedOptions))(t,n)}static getChartByOptions(e){if(gt(e))return qd;if(mt(e))return uf;if(ft(e))return ff;if(vt(e))return Ef;throw new Error("AG Charts - couldn't apply configuration, check options are correctly structured and series types are specified")}};Rf.initialised=!1;var Lf=Rf,kf="9.3.2",Pf={};b(Pf,{Arc:()=>Nf,BBox:()=>is,BandScale:()=>Ks,Caption:()=>ll,ChangeDetectableProperties:()=>Bu,Circle:()=>Cd,ContinuousScale:()=>Zr,Diamond:()=>xd,DropShadow:()=>Hu,ExtendedPath2D:()=>dd,Group:()=>Mo,HdpiCanvas:()=>zl,Image:()=>Vf,Label:()=>Ho,Line:()=>Ba,LinearGradientFill:()=>Of,LinearScale:()=>Qd,Marker:()=>yd,Node:()=>ds,OrdinalTimeScale:()=>bo,Path:()=>pd,PointerEvents:()=>cs,RadialColumnShape:()=>Ff,Rect:()=>cu,RedrawType:()=>ns,Scene:()=>ql,SceneChangeDetection:()=>rs,ScenePathChangeDetection:()=>ud,Sector:()=>xg,SectorBox:()=>pg,Selection:()=>_a,Shape:()=>Ro,Square:()=>Dd,Text:()=>Go,Tooltip:()=>al,Triangle:()=>Ld,easing:()=>vs,getFont:()=>Bo,getMarker:()=>Od,getRadialColumnWidth:()=>Gf,motion:()=>Bf,nearestSquared:()=>Jn,nearestSquaredInContainer:()=>es,toRadians:()=>Bs,toTooltipHtml:()=>rl});var Nf=class extends pd{constructor(){super(),this.centerX=0,this.centerY=0,this.radius=10,this.startAngle=0,this.endAngle=2*Math.PI,this.counterClockwise=!1,this.type=0,this.restoreOwnStyles()}get fullPie(){return $n(_s(this.startAngle),_s(this.endAngle))}updatePath(){const e=this.path;e.clear(),e.arc(this.centerX,this.centerY,this.radius,this.startAngle,this.endAngle,this.counterClockwise),1===this.type?e.closePath():2!==this.type||this.fullPie||(e.lineTo(this.centerX,this.centerY),e.closePath())}computeBBox(){return new is(this.centerX-this.radius,this.centerY-this.radius,2*this.radius,2*this.radius)}isPointInPath(e,t){const i=this.transformPoint(e,t),n=this.computeBBox();return 0!==this.type&&n.containsPoint(i.x,i.y)&&this.path.isPointInPath(i.x,i.y)}};Nf.className="Arc",Nf.defaultStyles=Object.assign({},Ro.defaultStyles,{lineWidth:1,fillStyle:null}),S([ud()],Nf.prototype,"centerX",2),S([ud()],Nf.prototype,"centerY",2),S([ud()],Nf.prototype,"radius",2),S([ud()],Nf.prototype,"startAngle",2),S([ud()],Nf.prototype,"endAngle",2),S([ud()],Nf.prototype,"counterClockwise",2),S([ud()],Nf.prototype,"type",2);var Of=class extends Ro{constructor(){super(...arguments),this.direction="to-right",this.stops=void 0,this._mask=void 0}get mask(){return this._mask}set mask(e){null!=this._mask&&this.removeChild(this._mask),null!=e&&this.appendChild(e),this._mask=e}isPointInPath(e,t){var i,n;return null!=(n=null==(i=this.mask)?void 0:i.isPointInPath(e,t))&&n}computeBBox(){var e;return null==(e=this.mask)?void 0:e.computeBBox()}render(e){const{mask:t,stops:i}=this,{ctx:n,devicePixelRatio:s}=e,r=1/s,o=null==t?void 0:t.computeTransformedBBox();if(null==t||null==i||null==o)return;t.dirtyPath&&(t.updatePath(),t.dirtyPath=!1),n.save(),n.clip(t.path.getPath2D()),n.setTransform(s,0,0,s,0,0);const a=Math.floor(o.x),l=Math.ceil(o.x+o.width),c=Math.floor(o.y),h=Math.ceil(o.y+o.height),d=new Xp,[u,p]="to-right"===this.direction?[a,l]:[c,h];if(d.domain=i.map((e,t)=>u+(p-u)*t/(i.length-1)),d.range=i,d.update(),"to-right"===this.direction){const e=h-c;for(let t=a;t<=l;t+=r)n.fillStyle=d.convert(t),n.fillRect(t,c,r,e)}else{const e=l-a;for(let t=c;t<=h;t+=r)n.fillStyle=d.convert(t),n.fillRect(a,t,e,r)}n.restore()}};function _f(e,t,i){const n=Math.sqrt(f(e,2)+f(t,2)),s=Math.atan2(t,e)+i;return{x:Math.cos(s)*n,y:Math.sin(s)*n}}S([rs({redraw:3})],Of.prototype,"direction",2),S([rs({redraw:3})],Of.prototype,"stops",2),S([rs({redraw:3})],Of.prototype,"_mask",2);var Ff=class extends pd{constructor(){super(...arguments),this.borderPath=new dd,this.isBeveled=!0,this.columnWidth=0,this.startAngle=0,this.endAngle=0,this.outerRadius=0,this.innerRadius=0,this.axisInnerRadius=0,this.axisOuterRadius=0,this.isRadiusAxisReversed=!1}getRotation(){const{startAngle:e,endAngle:t}=this;return _s(e+zs(e,t)/2+Math.PI/2)}updatePath(){const{isBeveled:e}=this;e?this.updateBeveledPath():this.updateRectangularPath(),this.checkPathDirty()}updateRectangularPath(){const{columnWidth:e,innerRadius:t,outerRadius:i,path:n}=this,s=-e/2,r=e/2,o=-i,a=-t,l=this.getRotation(),c=[[s,a],[s,o],[r,o],[r,a],[s,a]].map(([e,t])=>_f(e,t,l));n.clear(!0),n.moveTo(c[0].x,c[0].y),n.lineTo(c[1].x,c[1].y),n.lineTo(c[2].x,c[2].y),n.lineTo(c[3].x,c[3].y),n.lineTo(c[0].x,c[0].y),n.closePath()}updateBeveledPath(){const{columnWidth:e,path:t,outerRadius:i,innerRadius:n,axisInnerRadius:s,axisOuterRadius:r,isRadiusAxisReversed:o}=this,a=$n(n,s),l=Math.asin(e/2/n),c=this.getRotation(),h=(e,t)=>_f(e,t,c),d=(e,t)=>Math.sqrt(f(e,2)+f(t,2)),u=(e,t)=>t>e?0:Math.sqrt(f(e,2)-f(t,2)),p=(e,t,i)=>i?e<t:e>t,g=a&&!isNaN(l)&&l<Math.PI/6;let m=-e/2,v=e/2;const y=-i,C=-n*(g?Math.cos(l):1),b=p(r,d(n,e/2),!o);if(b){const e=u(r,n);m=-e,v=e}t.clear(!0);const S=h(m,C);t.moveTo(S.x,S.y);const w=$n(n,i),x=p(r,d(i,e/2),!o);if(w&&g)t.arc(0,0,n,_s(-l-Math.PI/2)+c,_s(l-Math.PI/2)+c,!1);else if(x){const n=-u(r,e/2),s=u(r,i);if(!b){const e=h(m,n);t.lineTo(e.x,e.y)}if(t.arc(0,0,r,Math.atan2(n,m)+c,Math.atan2(y,-s)+c,!1),!$n(s,0)){const e=h(s,y);t.lineTo(e.x,e.y)}t.arc(0,0,r,Math.atan2(y,s)+c,Math.atan2(n,v)+c,!1)}else{const e=h(m,y),i=h(v,y);t.lineTo(e.x,e.y),t.lineTo(i.x,i.y)}const E=h(v,C);if(t.lineTo(E.x,E.y),g)t.arc(0,0,n,_s(l-Math.PI/2)+c,_s(-l-Math.PI/2)+c,!0);else{const e=h(m,C);t.lineTo(e.x,e.y)}t.closePath()}};function Gf(e,t,i,n,s){const r=zs(e,t),o=r*(1-n)/2;if(e+=o,t-=o,r<.001)return 2*i*s;if(r>=2*Math.PI){const i=e+r/2;e=i-Math.PI,t=i+Math.PI}const a=i*Math.cos(e),l=i*Math.sin(e),c=i*Math.cos(t),h=i*Math.sin(t),d=Math.floor(Math.sqrt(f(a-c,2)+f(l-h,2))),u=2*i*s;return Math.max(1,Math.min(u,d))}Ff.className="RadialColumnShape",S([ud()],Ff.prototype,"isBeveled",2),S([ud()],Ff.prototype,"columnWidth",2),S([ud()],Ff.prototype,"startAngle",2),S([ud()],Ff.prototype,"endAngle",2),S([ud()],Ff.prototype,"outerRadius",2),S([ud()],Ff.prototype,"innerRadius",2),S([ud()],Ff.prototype,"axisInnerRadius",2),S([ud()],Ff.prototype,"axisOuterRadius",2),S([ud()],Ff.prototype,"isRadiusAxisReversed",2);var Vf=class extends ds{constructor(e){super(),this.x=0,this.y=0,this.width=0,this.height=0,this.opacity=1,this.sourceImage=e}render(e){const{ctx:t,forceRender:i,stats:n}=e;if(0===this.dirty&&!i)return void(n&&n.nodesSkipped++);this.computeTransformMatrix(),this.matrix.toContext(t);const s=this.sourceImage;t.globalAlpha=this.opacity,t.drawImage(s,0,0,s.width,s.height,this.x,this.y,this.width,this.height),super.render(e)}};S([rs({redraw:3})],Vf.prototype,"x",2),S([rs({redraw:3})],Vf.prototype,"y",2),S([rs({redraw:3})],Vf.prototype,"width",2),S([rs({redraw:3})],Vf.prototype,"height",2),S([rs({redraw:3})],Vf.prototype,"opacity",2);var Bf=v(v({},Fn),ma),Hf={};b(Hf,{CARTESIAN_AXIS_TYPE:()=>Ot,ChartTheme:()=>bi,DEFAULT_ANNOTATION_BACKGROUND_FILL:()=>pi,DEFAULT_ANNOTATION_HANDLE_FILL:()=>gi,DEFAULT_ANNOTATION_STROKE:()=>ui,DEFAULT_AXIS_GRID_COLOUR:()=>Qt,DEFAULT_AXIS_LINE_COLOUR:()=>Jt,DEFAULT_BACKGROUND_COLOUR:()=>ti,DEFAULT_COLOURS:()=>ni,DEFAULT_CROSS_LINES_COLOUR:()=>ei,DEFAULT_DIVERGING_SERIES_COLOUR_RANGE:()=>ci,DEFAULT_FONT_FAMILY:()=>$t,DEFAULT_HIERARCHY_FILLS:()=>hi,DEFAULT_HIERARCHY_STROKES:()=>di,DEFAULT_INSIDE_SERIES_LABEL_COLOUR:()=>Xt,DEFAULT_INVERTED_LABEL_COLOUR:()=>qt,DEFAULT_LABEL_COLOUR:()=>Yt,DEFAULT_MUTED_LABEL_COLOUR:()=>Zt,DEFAULT_POLAR_SERIES_STROKE:()=>li,DEFAULT_SHADOW_COLOUR:()=>ii,DEFAULT_WATERFALL_SERIES_CONNECTOR_LINE_STROKE:()=>ai,DEFAULT_WATERFALL_SERIES_NEGATIVE_COLOURS:()=>ri,DEFAULT_WATERFALL_SERIES_POSITIVE_COLOURS:()=>si,DEFAULT_WATERFALL_SERIES_TOTAL_COLOURS:()=>oi,EXTENDS_AXES_DEFAULTS:()=>Ht,EXTENDS_AXES_GRID_LINE_DEFAULTS:()=>Wt,EXTENDS_AXES_LINE_DEFAULTS:()=>zt,EXTENDS_AXES_TICK_DEFAULTS:()=>Ut,EXTENDS_CARTESIAN_MARKER_DEFAULTS:()=>Kt,EXTENDS_SERIES_DEFAULTS:()=>jt,FONT_SIZE:()=>kt,FONT_WEIGHT:()=>Pt,IS_DARK_THEME:()=>Bt,POLAR_AXIS_SHAPE:()=>Ft,POLAR_AXIS_TYPE:()=>_t,POSITION:()=>Nt,getChartTheme:()=>cn,markerPaletteFactory:()=>Pu,singleSeriesPaletteFactory:()=>ku,themes:()=>zf});var zf=Je(ln,e=>null==e?void 0:e()),Uf={};b(Uf,{BandScale:()=>Ks,ColorScale:()=>Xp,ContinuousScale:()=>Zr,Invalidating:()=>Ws,LinearScale:()=>Qd,OrdinalTimeScale:()=>bo,TimeScale:()=>yo});var Wf={};function jf(e,t){const i={};if(Array.isArray(t))for(let n=0;n<e.length;n++)i[`${e[n]}`]=t[n];else for(let n=0;n<e.length;n++)i[`${e[n]}`]=t;return i}b(Wf,{Color:()=>fs,Logger:()=>_,Padding:()=>Jl,angleBetween:()=>zs,areArrayItemsStrictlyEqual:()=>Ka,areArrayNumbersEqual:()=>$a,bifurcate:()=>yn,checkDatum:()=>qo,clamp:()=>Un,clampArray:()=>Wn,countFractionDigits:()=>Qn,createId:()=>Bn,deepClone:()=>Et,displacePointFromVector:()=>Us,extent:()=>hn,findMinMax:()=>jn,findRangeExtent:()=>Kn,isBetweenAngles:()=>Vs,isContinuous:()=>Yo,isDate:()=>Fe,isDenseInterval:()=>mo,isEqual:()=>$n,isNegative:()=>Yn,isNumber:()=>je,isNumberEqual:()=>$n,isNumberObject:()=>$o,isString:()=>Ue,isStringObject:()=>Ko,jsonApply:()=>Tt,jsonDiff:()=>xt,jsonWalk:()=>At,mod:()=>Zn,normalisedExtent:()=>dn,normalisedExtentWithMetadata:()=>un,normalizeAngle180:()=>Gs,normalizeAngle360:()=>_s,normalizeAngle360Inclusive:()=>Fs,range:()=>fo,resetIds:()=>Vn,round:()=>qn,sanitizeHtml:()=>_u,setAttribute:()=>Ja,shallowClone:()=>Mt,tickFormat:()=>Pa,tickStep:()=>go,ticks:()=>uo,toDegrees:()=>Hs,toFixed:()=>Xn,toRadians:()=>Bs,transformIntegratedCategoryValue:()=>Xo,zipObject:()=>jf});var Kf={};function $f({defs:e,values:t,xAxis:i,yAxis:n}){if(!i||!n)throw new Error("Axes must be defined");const s={};for(const[r,{def:o}]of e)if(Object.hasOwn(t,r)){const{scale:e}="key"===o.type?i:n;s[r]=Math.round(e.convert(t[r]))}return s}b(Kf,{AND:()=>Xs,ARRAY:()=>cr,ARRAY_OF:()=>hr,AbstractBarSeries:()=>Pp,AbstractBarSeriesProperties:()=>kp,ActionOnSet:()=>Za,Animation:()=>Rs,AnimationManager:()=>Cc,AreaSeriesTag:()=>xp,Axis:()=>El,AxisLabel:()=>ul,AxisTick:()=>Kr,BOOLEAN:()=>er,BOOLEAN_ARRAY:()=>Cr,Background:()=>hu,BackgroundModule:()=>du,BaseModuleInstance:()=>xe,BaseProperties:()=>Ct,COLOR_STRING:()=>vr,COLOR_STRING_ARRAY:()=>yr,CartesianAxis:()=>Tl,CartesianSeries:()=>Kd,CartesianSeriesNodeEvent:()=>Wd,CartesianSeriesProperties:()=>jd,CategoryAxis:()=>Il,CategoryAxisTick:()=>Dl,ChartAxisDirection:()=>$r,ChartEventManager:()=>Sc,ChartOptions:()=>Pn,ChartUpdateType:()=>zc,ContextMenuRegistry:()=>wc,CursorManager:()=>Ec,DATE:()=>gr,DATE_ARRAY:()=>wr,DATE_OR_DATETIME_MS:()=>fr,DEFAULT_CARTESIAN_DIRECTION_KEYS:()=>zd,DEFAULT_CARTESIAN_DIRECTION_NAMES:()=>Ud,DEFAULT_TOOLTIP_CLASS:()=>tl,DEFAULT_TOOLTIP_DARK_CLASS:()=>il,DEGREE:()=>ar,DIRECTION:()=>Nr,DataController:()=>th,DataModel:()=>Jc,DataModelSeries:()=>_d,DataService:()=>rc,Default:()=>$s,Deprecated:()=>On,DeprecatedAndRenamedTo:()=>_n,EMPTY_TOOLTIP_CONTENT:()=>nl,FONT_STYLE:()=>Dr,FONT_WEIGHT:()=>Ir,FUNCTION:()=>tr,GREATER_THAN:()=>pr,GestureDetector:()=>Ac,GroupedCategoryAxis:()=>Bl,HierarchyNode:()=>qf,HierarchySeries:()=>Xf,HierarchySeriesProperties:()=>Zf,HighlightManager:()=>Tc,HighlightStyle:()=>Bd,INTERACTION_RANGE:()=>_r,InteractionManager:()=>vc,InteractionState:()=>fc,LABEL_PLACEMENT:()=>Fr,LESS_THAN:()=>ur,LINE_CAP:()=>Er,LINE_DASH:()=>Ar,LINE_JOIN:()=>Mr,Layers:()=>jo,LayoutService:()=>Bc,LonLatBBox:()=>Qf,MARKER_SHAPE:()=>zu,MATCHING_CROSSLINE_TYPE:()=>Zo,MAX_SPACING:()=>Br,MIN_SPACING:()=>Vr,MercatorScale:()=>Sf,Motion:()=>vs,NAN:()=>sr,NODE_UPDATE_STATE_TO_PHASE_MAPPING:()=>Ls,NUMBER:()=>nr,NUMBER_ARRAY:()=>br,NUMBER_OR_NAN:()=>lr,Navigator:()=>Ru,NavigatorModule:()=>Lu,OBJECT:()=>Qs,OBJECT_ARRAY:()=>xr,OR:()=>Zs,OVERFLOW_STRATEGY:()=>Pr,ObserveChanges:()=>Qa,PHASE_METADATA:()=>Ts,PHASE_ORDER:()=>As,PLACEMENT:()=>Or,PLAIN_OBJECT:()=>Js,POINTER_INTERACTION_TYPES:()=>hc,POSITION:()=>Tr,POSITIVE_NUMBER:()=>rr,PolarAxis:()=>pf,PolarSeries:()=>Og,PropertiesArray:()=>bt,ProxyOnWrite:()=>qa,ProxyProperty:()=>Ya,ProxyPropertyOnWrite:()=>Xa,QUICK_TRANSITION:()=>.2,RATIO:()=>or,RepeatType:()=>Ds,SKIP_JS_BUILTINS:()=>it,SMALLEST_KEY_INTERVAL:()=>Th,SORT_DOMAIN_GROUPS:()=>Dh,STRING:()=>ir,STRING_ARRAY:()=>Sr,Series:()=>Qh,SeriesGroupingChangedEvent:()=>Zh,SeriesItemHighlightStyle:()=>Fd,SeriesMarker:()=>Uu,SeriesNodeEvent:()=>Xh,SeriesNodePickMode:()=>Vh,SeriesProperties:()=>Hd,SeriesTooltip:()=>ju,StateMachine:()=>ya,TEXT_ALIGN:()=>Lr,TEXT_WRAP:()=>Rr,ToolbarManager:()=>Fc,Tooltip:()=>al,TooltipManager:()=>Vc,TooltipPosition:()=>ol,UNION:()=>Gr,UpdateService:()=>Uc,VERTICAL_ALIGN:()=>kr,Validate:()=>Ys,ZoomManager:()=>sh,__FORCE_MODULE_DETECTION:()=>Jf,accumulateGroup:()=>_h,accumulatedValue:()=>Mh,accumulativeValueProperty:()=>$h,addHitTestersToQuadtree:()=>Rp,adjustLabelPlacement:()=>Kp,allInStringUnion:()=>bn,animationValidation:()=>Ph,area:()=>Eh,arraysEqual:()=>pn,assignJsonApplyConstructedArray:()=>qr,backfillPathPointData:()=>np,basicContinuousCheckDatumValidation:()=>Bh,bifurcate:()=>yn,buildFormatter:()=>ro,buildResetPathFn:()=>cp,calculateDefaultTimeTickFormat:()=>lo,calculatePlacement:()=>el,checkCrisp:()=>Gp,childrenIter:()=>Ip,circularSliceArray:()=>vn,clamp:()=>Un,clampArray:()=>Wn,collapsedStartingBarPosition:()=>Bp,computeBarFocusBounds:()=>Wp,computeMarkerFocusBounds:()=>Ju,computeSectorFocusBounds:()=>Ng,convertValuesToScaleByDefs:()=>$f,countFractionDigits:()=>Qn,createDatumId:()=>Gh,createDeprecationWarning:()=>Nn,createElement:()=>Mn,dateToNumber:()=>oo,deconstructSelectionsOrNodes:()=>Is,deepClone:()=>Et,deepMerge:()=>Xe,defaultTimeTickFormat:()=>ao,determinePathStatus:()=>bp,diff:()=>Fh,downloadUrl:()=>An,enterpriseModule:()=>we,extent:()=>hn,extractDecoratedProperties:()=>ke,findMinMax:()=>jn,findQuadtreeMatch:()=>Lp,findRangeExtent:()=>Kn,fixNumericExtent:()=>Xc,fromToMotion:()=>ks,getDocument:()=>xn,getMissCount:()=>Zc,getPath:()=>tt,getRectConfig:()=>Fp,getWindow:()=>En,groupAccumulativeValueProperty:()=>qh,groupAverage:()=>xh,groupBy:()=>mn,groupCount:()=>wh,groupSum:()=>bh,injectStyle:()=>Tn,isArray:()=>Ne,isBoolean:()=>Oe,isDate:()=>_e,isDecoratedObject:()=>Re,isDefined:()=>Pe,isEnumKey:()=>$e,isEnumValue:()=>Ye,isEqual:()=>$n,isFiniteNumber:()=>je,isFunction:()=>Ve,isHtmlElement:()=>Ke,isNegative:()=>Yn,isNumber:()=>We,isObject:()=>Be,isObjectLike:()=>He,isPlainObject:()=>ze,isProperties:()=>St,isRegExp:()=>Ge,isString:()=>Ue,isSymbol:()=>qe,isValidDate:()=>Fe,jsonApply:()=>Tt,jsonDiff:()=>xt,jsonWalk:()=>At,keyProperty:()=>Wh,listDecoratedProperties:()=>Le,mapIterable:()=>Cn,mapValues:()=>Je,markerFadeInAnimation:()=>$u,markerPaletteFactory:()=>Pu,markerScaleInAnimation:()=>Yu,markerSwipeScaleInAnimation:()=>qu,mergeArrayDefaults:()=>Qe,mergeDefaults:()=>Ze,midpointStartingBarPosition:()=>Hp,minMax:()=>ep,mod:()=>Zn,moduleRegistry:()=>Ee,normaliseGroupTo:()=>Rh,normalisePropertyTo:()=>kh,normalisedExtent:()=>dn,normalisedExtentWithMetadata:()=>un,pairCategoryData:()=>Cp,pairContinuousData:()=>yp,partialAssign:()=>st,pathFadeInAnimation:()=>ap,pathFadeOutAnimation:()=>lp,pathSwipeInAnimation:()=>op,pickByMatchingAngle:()=>Pg,predicateWithMessage:()=>Hr,prepareAreaPathAnimation:()=>Ap,prepareAxisAnimationContext:()=>fl,prepareAxisAnimationFunctions:()=>yl,prepareBarAnimationFunctions:()=>zp,prepareLinePathAnimation:()=>wp,prepareLinePathAnimationFns:()=>Sp,prepareMarkerAnimation:()=>Qu,preparePieSeriesAnimationFunctions:()=>Lg,range:()=>Sh,rangedValueProperty:()=>Kh,renderPartialPath:()=>rp,resetAxisGroupFn:()=>Cl,resetAxisLabelSelectionFn:()=>Sl,resetAxisLineSelectionFn:()=>wl,resetAxisSelectionFn:()=>bl,resetBarSelectionsFn:()=>Up,resetIds:()=>Vn,resetLabelFn:()=>Vu,resetMarkerFn:()=>Xu,resetMarkerPositionFn:()=>Zu,resetMotion:()=>va,resetPieSelectionsFn:()=>kg,round:()=>qn,seriesLabelFadeInAnimation:()=>Fu,seriesLabelFadeOutAnimation:()=>Gu,setDocument:()=>Dn,setPath:()=>nt,setWindow:()=>In,shallowClone:()=>Mt,singleSeriesPaletteFactory:()=>ku,staticFromToMotion:()=>Ps,stringify:()=>Wr,sum:()=>Ch,sumValues:()=>yh,toArray:()=>gn,toFixed:()=>Xn,toTooltipHtml:()=>rl,trailingAccumulatedValue:()=>Ah,trailingAccumulatedValueProperty:()=>Yh,unique:()=>fn,updateClipPath:()=>hp,updateLabelNode:()=>jp,updateRect:()=>_p,validateCrossLineValues:()=>Qo,valueProperty:()=>jh,without:()=>et});var Yf=class e{constructor(e,t,i,n,s,r,o,a,l,c,h){this.series=e,this.index=t,this.datum=i,this.size=n,this.colorValue=s,this.fill=r,this.stroke=o,this.sumSize=a,this.depth=l,this.parent=c,this.children=h,this.midPoint={x:0,y:0}}contains(e){let t=e;for(;null!=t&&t.index>=this.index;){if(t===this)return!0;t=t.parent}return!1}walk(t,i=e.Walk.PreOrder){i===e.Walk.PreOrder&&t(this),this.children.forEach(e=>{e.walk(t,i)}),i===e.Walk.PostOrder&&t(this)}*[Symbol.iterator](){yield this;for(const e of this.children)yield*M(e)}};Yf.Walk={PreOrder:0,PostOrder:1};var qf=Yf,Xf=class extends Qh{constructor(e){super({moduleCtx:e,pickModes:[0],contentGroupVirtual:!1}),this.rootNode=new qf(this,0,void 0,0,void 0,void 0,void 0,0,void 0,void 0,[]),this.colorDomain=[0,0],this.maxDepth=0,this.animationState=new ya("empty",{empty:{update:{target:"ready",action:e=>this.animateEmptyUpdateReady(e)},reset:"empty",skip:"ready"},ready:{updateData:"waiting",clear:"clearing",highlight:e=>this.animateReadyHighlight(e),resize:e=>this.animateReadyResize(e),reset:"empty",skip:"ready"},waiting:{update:{target:"ready",action:e=>this.animateWaitingUpdateReady(e)},reset:"empty",skip:"ready"},clearing:{update:{target:"empty",action:e=>this.animateClearingUpdateEmpty(e)},reset:"empty",skip:"ready"}},()=>this.checkProcessedDataAnimatable())}resetAnimation(e){"initial"===e?this.animationState.transition("reset"):"ready"===e&&this.animationState.transition("skip")}processData(){return x(this,null,function*(){var e,t;const{childrenKey:i,sizeKey:n,colorKey:s,fills:r,strokes:o,colorRange:a}=this.properties;let l=0,c=0,h=1/0,d=-1/0;const u=new Array((null!=(t=null==(e=this.data)?void 0:e.length)?t:0)+1).fill(void 0),p=(e,t)=>{const r=(l+=1,l),o=null!=t.depth?t.depth+1:0,a=null!=i?e[i]:void 0,p=null==a||0===a.length;let f=null!=n?e[n]:void 0;f=Number.isFinite(f)?Math.max(f,0):p?1:0;const m=f;c=Math.max(c,o);const v=null!=s?e[s]:void 0;return"number"==typeof v&&(u[r]=v,h=Math.min(h,v),d=Math.max(d,v)),g(new qf(this,r,e,f,v,void 0,void 0,m,o,t,[]),a)},g=(e,t)=>(null==t||t.forEach(t=>{const i=p(t,e);e.children.push(i),e.sumSize+=i.sumSize}),e),f=g(new qf(this,0,void 0,0,void 0,void 0,void 0,0,void 0,void 0,[]),this.data),m=[h,d];let v;null!=a&&Number.isFinite(h)&&Number.isFinite(d)&&(v=new Xp,v.domain=m,v.range=a,v.update()),f.children.forEach((e,t)=>{e.walk(e=>{let i;const n=u[e.index];null!=n&&(i=null==v?void 0:v.convert(n)),null!=i||(i=null==r?void 0:r[t%r.length]),e.fill=i,e.stroke=null==v?null==o?void 0:o[t%o.length]:"rgba(0, 0, 0, 0.2)"})}),this.rootNode=f,this.maxDepth=c,this.colorDomain=m})}update(e){return x(this,arguments,function*({seriesRect:e}){yield this.updateSelections(),yield this.updateNodes();const t=this.getAnimationData();this.checkResize(e)&&this.animationState.transition("resize",t),this.animationState.transition("update",t)})}resetAllAnimation(e){var t;const i=null==(t=this.animationResetFns)?void 0:t.datum;this.ctx.animationManager.stopByAnimationGroupId(this.id),null!=i&&va(e.datumSelections,i)}animateEmptyUpdateReady(e){this.ctx.animationManager.skipCurrentBatch(),this.resetAllAnimation(e)}animateWaitingUpdateReady(e){this.ctx.animationManager.skipCurrentBatch(),this.resetAllAnimation(e)}animateReadyHighlight(e){var t;const i=null==(t=this.animationResetFns)?void 0:t.datum;null!=i&&va([e],i)}animateReadyResize(e){this.resetAllAnimation(e)}animateClearingUpdateEmpty(e){this.ctx.animationManager.skipCurrentBatch(),this.resetAllAnimation(e)}animationTransitionClear(){this.animationState.transition("clear",this.getAnimationData())}getAnimationData(){return{datumSelections:[this.groupSelection]}}isProcessedDataAnimatable(){return!0}checkProcessedDataAnimatable(){this.isProcessedDataAnimatable()||this.ctx.animationManager.skipCurrentBatch()}getLabelData(){return[]}getSeriesDomain(){return[NaN,NaN]}getLegendData(e){const{colorKey:t,colorName:i,colorRange:n,visible:s}=this.properties;return"gradient"===e&&null!=t&&null!=n?[{legendType:"gradient",enabled:s,seriesId:this.id,colorName:i,colorRange:n,colorDomain:this.colorDomain}]:[]}getDatumIdFromData(e){return`${e.index}`}getDatumId(e){return this.getDatumIdFromData(e)}},Zf=class extends Hd{constructor(){super(...arguments),this.childrenKey="children",this.fills=Object.values(Gt),this.strokes=Object.values(Vt)}};S([Ys(ir)],Zf.prototype,"childrenKey",2),S([Ys(ir,{optional:!0})],Zf.prototype,"sizeKey",2),S([Ys(ir,{optional:!0})],Zf.prototype,"colorKey",2),S([Ys(ir,{optional:!0})],Zf.prototype,"colorName",2),S([Ys(yr)],Zf.prototype,"fills",2),S([Ys(yr)],Zf.prototype,"strokes",2),S([Ys(yr,{optional:!0})],Zf.prototype,"colorRange",2);var Qf=class{constructor(e,t,i,n){this.lon0=e,this.lat0=t,this.lon1=i,this.lat1=n}merge(e){this.lon0=Math.min(this.lon0,e.lon0),this.lat0=Math.min(this.lat0,e.lat0),this.lon1=Math.max(this.lon1,e.lon1),this.lat1=Math.max(this.lat1,e.lat1)}},Jf=0},98092(e,t,i){var n,s=Object.defineProperty,r=Object.defineProperties,o=Object.getOwnPropertyDescriptor,a=Object.getOwnPropertyDescriptors,l=Object.getOwnPropertyNames,c=Object.getOwnPropertySymbols,h=Object.prototype.hasOwnProperty,d=Object.prototype.propertyIsEnumerable,u=(e,t,i)=>t in e?s(e,t,{enumerable:!0,configurable:!0,writable:!0,value:i}):e[t]=i,p=(e,t)=>{for(var i in t||(t={}))h.call(t,i)&&u(e,i,t[i]);if(c)for(var i of c(t))d.call(t,i)&&u(e,i,t[i]);return e},g=(e,t)=>r(e,a(t)),f=(e,t)=>{for(var i in t)s(e,i,{get:t[i],enumerable:!0})},m=(e,t,i,n)=>{for(var r,a=n>1?void 0:n?o(t,i):t,l=e.length-1;l>=0;l--)(r=e[l])&&(a=(n?r(t,i,a):r(a))||a);return n&&a&&s(t,i,a),a},v=(e,t)=>(i,n)=>t(i,n,e),y={};f(y,{ALWAYS_SYNC_GLOBAL_EVENTS:()=>ut,AbstractHeaderCellCtrl:()=>il,AgAbstractField:()=>Gs,AgAbstractLabel:()=>Fs,AgAutocomplete:()=>bc,AgCheckbox:()=>js,AgDialog:()=>pc,AgGroupComponent:()=>nc,AgInputDateField:()=>Yl,AgInputNumberField:()=>rr,AgInputRange:()=>ql,AgInputTextArea:()=>$l,AgInputTextField:()=>sr,AgMenuItemComponent:()=>hc,AgMenuItemRenderer:()=>go,AgMenuList:()=>ac,AgMenuPanel:()=>lc,AgPanel:()=>uc,AgPickerField:()=>Vs,AgPromise:()=>gs,AgPromiseStatus:()=>ps,AgRadioButton:()=>Ks,AgRichSelect:()=>Jl,AgSelect:()=>Us,AgSlider:()=>tc,AgStackComponentsRegistry:()=>Ft,AgToggleButton:()=>Kl,AlignedGridsService:()=>Dc,AnimateShowChangeCellRenderer:()=>Pr,AnimateSlideCellRenderer:()=>Nr,AnimationFrameService:()=>Rl,AutoScrollService:()=>Vo,AutoWidthCalculator:()=>Nl,Autowired:()=>pe,BarColumnLabelPlacement:()=>Kh,BaseComponentWrapper:()=>Wh,BaseCreator:()=>Md,BaseGridSerializingSession:()=>Ad,Bean:()=>ue,BeanStub:()=>ot,Beans:()=>ha,BodyDropPivotTarget:()=>Wa,BodyDropTarget:()=>$a,CellComp:()=>Ha,CellCtrl:()=>va,CellNavigationService:()=>Tc,CellPositionUtils:()=>th,CellRangeType:()=>ra,ChangedPath:()=>Bl,ChartMappings:()=>jh,CheckboxCellEditor:()=>po,CheckboxCellRenderer:()=>uo,CheckboxSelectionComponent:()=>Fr,ClientSideRowModelModule:()=>nd,ClientSideRowModelSteps:()=>Ll,Column:()=>Ee,ColumnApi:()=>Rc,ColumnFactory:()=>at,ColumnGroup:()=>ht,ColumnKeyCreator:()=>L,ColumnModel:()=>Dt,Component:()=>ws,ComponentUtil:()=>_t,Context:()=>le,CssClassApplier:()=>ga,CssClassManager:()=>ms,CsvCreator:()=>Id,CsvExportModule:()=>kd,CtrlsService:()=>dh,DataTypeService:()=>Rh,DateCellEditor:()=>ao,DateFilter:()=>er,DateStringCellEditor:()=>co,DisplayedGroupCreator:()=>Lt,Downloader:()=>Td,DragAndDropService:()=>Hr,DragService:()=>Ho,DragSourceType:()=>Br,Environment:()=>Yc,EventService:()=>ye,Events:()=>dt,ExcelFactoryMode:()=>Fo,ExpansionService:()=>kl,ExpressionService:()=>kc,FilterManager:()=>$o,FilterWrapperComp:()=>Yo,FloatingFilterMapper:()=>Oo,FocusService:()=>Gc,GROUP_AUTO_COLUMN_ID:()=>gt,Grid:()=>Hh,GridApi:()=>jo,GridBodyComp:()=>Oa,GridBodyCtrl:()=>na,GridComp:()=>_c,GridCoreCreator:()=>Uh,GridCtrl:()=>Oc,GridHeaderComp:()=>Sl,GridHeaderCtrl:()=>Cl,GridOptionsService:()=>Eh,GridSerializer:()=>Ld,GroupCellRenderer:()=>Yr,GroupCellRendererCtrl:()=>Kr,GroupInstanceIdCreator:()=>pt,HeaderCellCtrl:()=>ll,HeaderFilterCellComp:()=>Zo,HeaderFilterCellCtrl:()=>rl,HeaderGroupCellCtrl:()=>dl,HeaderNavigationDirection:()=>vl,HeaderNavigationService:()=>yl,HeaderPositionUtils:()=>ah,HeaderRowComp:()=>Ja,HeaderRowContainerComp:()=>ml,HeaderRowContainerCtrl:()=>gl,HeaderRowCtrl:()=>pl,HeaderRowType:()=>Qa,HorizontalDirection:()=>Vr,HorizontalResizeService:()=>wl,InfiniteRowModelModule:()=>ud,KeyCode:()=>Jn,LargeTextCellEditor:()=>Dr,LayoutCssClasses:()=>Qo,LocaleService:()=>Mh,Logger:()=>Nc,LoggerFactory:()=>Pc,ManagedFocusFeature:()=>Ls,MenuService:()=>Pl,ModuleNames:()=>re,ModuleRegistry:()=>ae,MouseEventService:()=>Fa,MoveColumnFeature:()=>Ka,NavigationService:()=>Ga,NumberCellEditor:()=>ro,NumberFilter:()=>cr,NumberSequence:()=>us,Optional:()=>ge,PaginationProxy:()=>Wl,PillDragComp:()=>wc,PillDropZonePanel:()=>Ec,PinnedRowModel:()=>Gl,PopupComponent:()=>Ar,PopupEditorWrapper:()=>Ba,PopupService:()=>fc,PositionableFeature:()=>Ns,PostConstruct:()=>he,PreConstruct:()=>ce,PreDestroy:()=>de,PropertyKeys:()=>Nt,ProvidedColumnGroup:()=>Ae,ProvidedFilter:()=>_s,Qualifier:()=>me,QuerySelector:()=>xs,RefSelector:()=>Es,ResizeObserverService:()=>Il,RowAnimationCssClasses:()=>ta,RowContainerComp:()=>Ua,RowContainerCtrl:()=>Na,RowContainerName:()=>Da,RowContainerType:()=>Ia,RowCtrl:()=>ba,RowHighlightPosition:()=>Go,RowNode:()=>_r,RowNodeBlock:()=>zl,RowNodeBlockLoader:()=>Ul,RowNodeSorter:()=>hh,RowPositionUtils:()=>eh,RowRenderer:()=>_l,RowType:()=>Rd,ScalarFilter:()=>Xs,ScrollVisibleService:()=>_a,SelectCellEditor:()=>Ir,SelectableService:()=>Xc,SelectionHandleType:()=>sa,ServerSideTransactionResultStatus:()=>Vl,SetLeftFeature:()=>nl,SimpleFilter:()=>qs,SortController:()=>Fc,SortIndicatorComp:()=>Sr,StandardMenuFactory:()=>xl,StylingService:()=>jl,TabGuardClassNames:()=>El,TabGuardComp:()=>Al,TabGuardCtrl:()=>Ml,TabbedLayout:()=>Dl,TextCellEditor:()=>kr,TextFilter:()=>ur,TextFloatingFilter:()=>vr,Timer:()=>fs,TooltipFeature:()=>Cs,TooltipStateManager:()=>ys,TouchListener:()=>Cr,UserComponentFactory:()=>_o,UserComponentRegistry:()=>fo,ValueCache:()=>zc,ValueService:()=>Lc,VanillaFrameworkOverrides:()=>Ac,VerticalDirection:()=>Gr,VirtualList:()=>Ql,VirtualListDragFeature:()=>Uo,XmlFactory:()=>Nd,ZipContainer:()=>Ud,_:()=>ds,createGrid:()=>Bh,getRowContainerTypeForName:()=>Ra,provideGlobalGridOptions:()=>Vh}),e.exports=(n=y,((e,t,i,n)=>{if(t&&"object"==typeof t||"function"==typeof t)for(let i of l(t))h.call(e,i)||void 0===i||s(e,i,{get:()=>t[i],enumerable:!(n=o(t,i))||n.enumerable});return e})(s({},"__esModule",{value:!0}),n));var C={};function b(e){return null==e||""===e?null:e}function S(e,t=!1){return null!=e&&(""!==e||t)}function w(e){return!S(e)}function x(e){return null==e||0===e.length}function E(e){return null!=e&&"function"==typeof e.toString?e.toString():null}function M(e){if(void 0===e)return;if(null===e||""===e)return null;if("number"==typeof e)return isNaN(e)?void 0:e;const t=parseInt(e,10);return isNaN(t)?void 0:t}function A(e){if(void 0!==e)return null!==e&&""!==e&&("boolean"==typeof e?e:/true/i.test(e))}function T(e){if(null!=e&&""!==e)return e}function D(e,t){return(e?JSON.stringify(e):null)===(t?JSON.stringify(t):null)}function I(e,t,i=!1){const n=null==e,s=null==t;if(e&&e.toNumber&&(e=e.toNumber()),t&&t.toNumber&&(t=t.toNumber()),n&&s)return 0;if(n)return-1;if(s)return 1;function r(e,t){return e>t?1:e<t?-1:0}if("string"!=typeof e)return r(e,t);if(!i)return r(e,t);try{return e.localeCompare(t)}catch(i){return r(e,t)}}function R(e){if(e instanceof Set||e instanceof Map){const t=[];return e.forEach(e=>t.push(e)),t}return Object.values(e)}f(C,{attrToBoolean:()=>A,attrToNumber:()=>M,attrToString:()=>T,defaultComparator:()=>I,exists:()=>S,jsonEquals:()=>D,makeNull:()=>b,missing:()=>w,missingOrEmpty:()=>x,toStringOrNull:()=>E,values:()=>R});var L=class{constructor(){this.existingKeys={}}addExistingKeys(e){for(let t=0;t<e.length;t++)this.existingKeys[e[t]]=!0}getUniqueKey(e,t){e=E(e);let i=0;for(;;){let n;if(e?(n=e,0!==i&&(n+="_"+i)):t?(n=t,0!==i&&(n+="_"+i)):n=i,!this.existingKeys[n])return this.existingKeys[n]=!0,String(n);i++}}},k={};f(k,{SKIP_JS_BUILTINS:()=>P,cloneObject:()=>O,deepCloneDefinition:()=>_,getAllValuesInObject:()=>F,getValueUsingField:()=>V,isNonNullObject:()=>H,iterateObject:()=>N,mergeDeep:()=>G,removeAllReferences:()=>B});var P=new Set(["__proto__","constructor","prototype"]);function N(e,t){if(null!=e)if(Array.isArray(e))for(let i=0;i<e.length;i++)t(i.toString(),e[i]);else for(const[i,n]of Object.entries(e))t(i,n)}function O(e){const t={},i=Object.keys(e);for(let n=0;n<i.length;n++){if(P.has(i[n]))continue;const s=i[n],r=e[s];t[s]=r}return t}function _(e,t){if(!e)return;const i=e,n={};return Object.keys(i).forEach(e=>{if(t&&t.indexOf(e)>=0||P.has(e))return;const s=i[e],r=H(s)&&s.constructor===Object;n[e]=r?_(s):s}),n}function F(e){if(!e)return[];const t=Object;if("function"==typeof t.values)return t.values(e);const i=[];for(const t in e)e.hasOwnProperty(t)&&e.propertyIsEnumerable(t)&&i.push(e[t]);return i}function G(e,t,i=!0,n=!1){S(t)&&N(t,(t,s)=>{if(P.has(t))return;let r=e[t];r!==s&&(n&&null==r&&null!=s&&"object"==typeof s&&s.constructor===Object&&(r={},e[t]=r),H(s)&&H(r)&&!Array.isArray(r)?G(r,s,i,n):(i||void 0!==s)&&(e[t]=s))})}function V(e,t,i){if(!t||!e)return;if(!i)return e[t];const n=t.split(".");let s=e;for(let e=0;e<n.length;e++){if(null==s)return;s=s[n[e]]}return s}function B(e,t=[],i){Object.keys(e).forEach(i=>{"object"!=typeof e[i]||t.includes(i)||(e[i]=void 0)});const n=Object.getPrototypeOf(e),s={};Object.getOwnPropertyNames(n).forEach(e=>{if("function"==typeof n[e]&&!t.includes(e)){const t=()=>{console.warn((e=>`AG Grid: Grid API function ${e}() cannot be called as the grid has been destroyed.\n    It is recommended to remove local references to the grid api. Alternatively, check gridApi.isDestroyed() to avoid calling methods against a destroyed grid.\n    To run logic when the grid is about to be destroyed use the gridPreDestroy event. See: ${i}`)(e))};s[e]={value:t,writable:!0}}}),Object.defineProperties(e,s)}function H(e){return"object"==typeof e&&null!==e}var z={};f(z,{compose:()=>ne,debounce:()=>ee,doOnce:()=>W,errorOnce:()=>K,executeAfter:()=>J,executeInAWhile:()=>q,executeNextVMTurn:()=>Q,getFunctionName:()=>$,isFunction:()=>Y,noop:()=>se,throttle:()=>te,waitUntil:()=>ie,warnOnce:()=>j});var U={};function W(e,t){U[t]||(e(),U[t]=!0)}function j(e){W(()=>console.warn("AG Grid: "+e),e)}function K(e){W(()=>console.error("AG Grid: "+e),e)}function $(e){if(e.name)return e.name;const t=/function\s+([^\(]+)/.exec(e.toString());return t&&2===t.length?t[1].trim():null}function Y(e){return!!(e&&e.constructor&&e.call&&e.apply)}function q(e){J(e,400)}var X=[],Z=!1;function Q(e){X.push(e),Z||(Z=!0,window.setTimeout(()=>{const e=X.slice();X.length=0,Z=!1,e.forEach(e=>e())},0))}function J(e,t=0){e.length>0&&window.setTimeout(()=>e.forEach(e=>e()),t)}function ee(e,t){let i;return function(...n){const s=this;window.clearTimeout(i),i=window.setTimeout(function(){e.apply(s,n)},t)}}function te(e,t){let i=0;return function(...n){const s=(new Date).getTime();s-i<t||(i=s,e.apply(this,n))}}function ie(e,t,i=100,n){const s=(new Date).getTime();let r=null,o=!1;const a=()=>{const a=(new Date).getTime()-s>i;(e()||a)&&(t(),o=!0,null!=r&&(window.clearInterval(r),r=null),a&&n&&console.warn(n))};a(),o||(r=window.setInterval(a,10))}function ne(...e){return t=>e.reduce((e,t)=>t(e),t)}var se=()=>{},re=(e=>(e.CommunityCoreModule="@ag-grid-community/core",e.InfiniteRowModelModule="@ag-grid-community/infinite-row-model",e.ClientSideRowModelModule="@ag-grid-community/client-side-row-model",e.CsvExportModule="@ag-grid-community/csv-export",e.EnterpriseCoreModule="@ag-grid-enterprise/core",e.RowGroupingModule="@ag-grid-enterprise/row-grouping",e.ColumnsToolPanelModule="@ag-grid-enterprise/column-tool-panel",e.FiltersToolPanelModule="@ag-grid-enterprise/filter-tool-panel",e.MenuModule="@ag-grid-enterprise/menu",e.SetFilterModule="@ag-grid-enterprise/set-filter",e.MultiFilterModule="@ag-grid-enterprise/multi-filter",e.StatusBarModule="@ag-grid-enterprise/status-bar",e.SideBarModule="@ag-grid-enterprise/side-bar",e.RangeSelectionModule="@ag-grid-enterprise/range-selection",e.MasterDetailModule="@ag-grid-enterprise/master-detail",e.RichSelectModule="@ag-grid-enterprise/rich-select",e.GridChartsModule="@ag-grid-enterprise/charts",e.ViewportRowModelModule="@ag-grid-enterprise/viewport-row-model",e.ServerSideRowModelModule="@ag-grid-enterprise/server-side-row-model",e.ExcelExportModule="@ag-grid-enterprise/excel-export",e.ClipboardModule="@ag-grid-enterprise/clipboard",e.SparklinesModule="@ag-grid-enterprise/sparklines",e.AdvancedFilterModule="@ag-grid-enterprise/advanced-filter",e.AngularModule="@ag-grid-community/angular",e.ReactModule="@ag-grid-community/react",e.VueModule="@ag-grid-community/vue",e))(re||{}),oe=class e{static register(t){e.__register(t,!0,void 0)}static registerModules(t){e.__registerModules(t,!0,void 0)}static __register(t,i,n){e.runVersionChecks(t),void 0!==n?(e.areGridScopedModules=!0,void 0===e.gridModulesMap[n]&&(e.gridModulesMap[n]={}),e.gridModulesMap[n][t.moduleName]=t):e.globalModulesMap[t.moduleName]=t,e.setModuleBased(i)}static __unRegisterGridModules(t){delete e.gridModulesMap[t]}static __registerModules(t,i,n){e.setModuleBased(i),t&&t.forEach(t=>e.__register(t,i,n))}static isValidModuleVersion(t){const[i,n]=t.version.split(".")||[],[s,r]=e.currentModuleVersion.split(".")||[];return i===s&&n===r}static runVersionChecks(t){if(e.currentModuleVersion||(e.currentModuleVersion=t.version),t.version?e.isValidModuleVersion(t)||console.error(`AG Grid: You are using incompatible versions of AG Grid modules. Major and minor versions should always match across modules. '${t.moduleName}' is version ${t.version} but the other modules are version ${this.currentModuleVersion}. Please update all modules to the same version.`):console.error(`AG Grid: You are using incompatible versions of AG Grid modules. Major and minor versions should always match across modules. '${t.moduleName}' is incompatible. Please update all modules to the same version.`),t.validate){const e=t.validate();if(!e.isValid){const t=e;console.error(`AG Grid: ${t.message}`)}}}static setModuleBased(t){void 0===e.moduleBased?e.moduleBased=t:e.moduleBased!==t&&W(()=>{console.warn("AG Grid: You are mixing modules (i.e. @ag-grid-community/core) and packages (ag-grid-community) - you can only use one or the other of these mechanisms."),console.warn("Please see https://www.ag-grid.com/javascript-grid/modules/ for more information.")},"ModulePackageCheck")}static __setIsBundled(){e.isBundled=!0}static __assertRegistered(t,i,n){var s;if(this.__isRegistered(t,n))return!0;const r=i+t;let o;if(e.isBundled)o=`AG Grid: unable to use ${i} as 'ag-grid-enterprise' has not been loaded. Check you are using the Enterprise bundle:\n        \n        <script src="https://cdn.jsdelivr.net/npm/ag-grid-enterprise@AG_GRID_VERSION/dist/ag-grid-enterprise.min.js"><\/script>\n        \nFor more info see: https://ag-grid.com/javascript-data-grid/getting-started/#getting-started-with-ag-grid-enterprise`;else if(e.moduleBased||void 0===e.moduleBased){let r=null==(s=Object.entries(re).find(([e,i])=>i===t))?void 0:s[0];o=`AG Grid: unable to use ${i} as the ${r} is not registered${e.areGridScopedModules?` for gridId: ${n}`:""}. Check if you have registered the module:\n           \n    import { ModuleRegistry } from '@ag-grid-community/core';\n    import { ${r} } from '${t}';\n    \n    ModuleRegistry.registerModules([ ${r} ]);\n\nFor more info see: https://www.ag-grid.com/javascript-grid/modules/`}else o=`AG Grid: unable to use ${i} as package 'ag-grid-enterprise' has not been imported. Check that you have imported the package:\n            \n    import 'ag-grid-enterprise';`;return W(()=>{console.warn(o)},r),!1}static __isRegistered(t,i){var n;return!!e.globalModulesMap[t]||!!(null==(n=e.gridModulesMap[i])?void 0:n[t])}static __getRegisteredModules(t){return[...R(e.globalModulesMap),...R(e.gridModulesMap[t]||{})]}static __getGridRegisteredModules(t){var i;return R(null!=(i=e.gridModulesMap[t])?i:{})||[]}static __isPackageBased(){return!e.moduleBased}};oe.globalModulesMap={},oe.gridModulesMap={},oe.areGridScopedModules=!1;var ae=oe,le=class{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 R(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"),S(t)&&e.forEach(t),this.callLifeCycleMethods(e,"postConstructMethods")}createBeans(){this.contextParams.beanClasses.forEach(this.createBeanWrapper.bind(this)),N(this.beanWrappers,(e,t)=>{let i;t.bean.__agBeanMetaData&&t.bean.__agBeanMetaData.autowireMethods&&t.bean.__agBeanMetaData.autowireMethods.agConstructor&&(i=t.bean.__agBeanMetaData.autowireMethods.agConstructor);const n=this.getBeansForParameters(i,t.bean.name),s=new(t.bean.bind.apply(t.bean,[null,...n]));t.beanInstance=s});const e=Object.keys(this.beanWrappers).join(", ");this.logger.log(`created beans: ${e}`)}createBeanWrapper(e){const t=e.__agBeanMetaData;if(!t){let t;return t=e.prototype.constructor?$(e.prototype.constructor):""+e,void console.error(`Context item ${t} is not a bean`)}const i={bean:e,beanInstance:null,beanName:t.beanName};this.beanWrappers[t.beanName]=i}autoWireBeans(e){e.forEach(e=>{this.forEachMetaDataInHierarchy(e,(t,i)=>{const n=t.agClassAttributes;n&&n.forEach(t=>{const n=this.lookupBeanInstance(i,t.beanName,t.optional);e[t.attributeName]=n})})})}methodWireBeans(e){e.forEach(e=>{this.forEachMetaDataInHierarchy(e,(t,i)=>{N(t.autowireMethods,(t,n)=>{if("agConstructor"===t)return;const s=this.getBeansForParameters(n,i);e[t].apply(e,s)})})})}forEachMetaDataInHierarchy(e,t){let i=Object.getPrototypeOf(e);for(;null!=i;){const e=i.constructor;e.hasOwnProperty("__agBeanMetaData")&&t(e.__agBeanMetaData,this.getBeanName(e)),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&&N(e,(e,n)=>{const s=this.lookupBeanInstance(t,n);i[Number(e)]=s}),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("context"===t)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(e=>this.callLifeCycleMethodsOnBean(e,t))}callLifeCycleMethodsOnBean(e,t,i){const n={};this.forEachMetaDataInHierarchy(e,e=>{const s=e[t];s&&s.forEach(e=>{e!=i&&(n[e]=!0)})}),Object.keys(n).forEach(t=>e[t]())}getBean(e){return this.lookupBeanInstance("getBean",e,!0)}destroy(){if(this.destroyed)return;this.destroyed=!0,this.logger.log(">> Shutting down ag-Application Context");const e=this.getBeanInstances();this.destroyBeans(e),this.contextParams.providedBeanInstances=null,ae.__unRegisterGridModules(this.contextParams.gridId),this.logger.log(">> ag-Application Context shut down - component is dead")}destroyBean(e){e&&this.destroyBeans([e])}destroyBeans(e){return e?(e.forEach(e=>{this.callLifeCycleMethodsOnBean(e,"preDestroyMethods","destroy");const t=e;"function"==typeof t.destroy&&t.destroy()}),[]):[]}isDestroyed(){return this.destroyed}getGridId(){return this.contextParams.gridId}};function ce(e,t,i){const n=ve(e.constructor);n.preConstructMethods||(n.preConstructMethods=[]),n.preConstructMethods.push(t)}function he(e,t,i){const n=ve(e.constructor);n.postConstructMethods||(n.postConstructMethods=[]),n.postConstructMethods.push(t)}function de(e,t,i){const n=ve(e.constructor);n.preDestroyMethods||(n.preDestroyMethods=[]),n.preDestroyMethods.push(t)}function ue(e){return t=>{ve(t).beanName=e}}function pe(e){return(t,i,n)=>{fe(t,e,!1,0,i,null)}}function ge(e){return(t,i,n)=>{fe(t,e,!0,0,i,null)}}function fe(e,t,i,n,s,r){if(null===t)return void console.error("AG Grid: Autowired name should not be null");if("number"==typeof r)return void console.error("AG Grid: Autowired should be on an attribute");const o=ve(e.constructor);o.agClassAttributes||(o.agClassAttributes=[]),o.agClassAttributes.push({attributeName:s,beanName:t,optional:i})}function me(e){return(t,i,n)=>{const s="function"==typeof t?t:t.constructor;let r;if("number"==typeof n){let t;i?(r=ve(s),t=i):(r=ve(s),t="agConstructor"),r.autowireMethods||(r.autowireMethods={}),r.autowireMethods[t]||(r.autowireMethods[t]={}),r.autowireMethods[t][n]=e}}}function ve(e){return e.hasOwnProperty("__agBeanMetaData")||(e.__agBeanMetaData={}),e.__agBeanMetaData}var ye=class{constructor(){this.allSyncListeners=new Map,this.allAsyncListeners=new Map,this.globalSyncListeners=new Set,this.globalAsyncListeners=new Set,this.asyncFunctionsQueue=[],this.scheduled=!1,this.firedEvents={}}setBeans(e,t,i=null,n=null){if(this.frameworkOverrides=t,this.gos=e,i){const t=e.useAsyncEvents();this.addGlobalListener(i,t)}n&&this.addGlobalListener(n,!1)}setFrameworkOverrides(e){this.frameworkOverrides=e}getListeners(e,t,i){const n=t?this.allAsyncListeners:this.allSyncListeners;let s=n.get(e);return!s&&i&&(s=new Set,n.set(e,s)),s}noRegisteredListenersExist(){return 0===this.allSyncListeners.size&&0===this.allAsyncListeners.size&&0===this.globalSyncListeners.size&&0===this.globalAsyncListeners.size}addEventListener(e,t,i=!1){this.getListeners(e,i,!0).add(t)}removeEventListener(e,t,i=!1){const n=this.getListeners(e,i,!1);n&&(n.delete(t),0===n.size)&&(i?this.allAsyncListeners:this.allSyncListeners).delete(e)}addGlobalListener(e,t=!1){(t?this.globalAsyncListeners:this.globalSyncListeners).add(e)}removeGlobalListener(e,t=!1){(t?this.globalAsyncListeners:this.globalSyncListeners).delete(e)}dispatchEvent(e){let t=e;this.gos&&this.gos.addGridCommonParams(t),this.dispatchToListeners(t,!0),this.dispatchToListeners(t,!1),this.firedEvents[t.type]=!0}dispatchEventOnce(e){this.firedEvents[e.type]||this.dispatchEvent(e)}dispatchToListeners(e,t){var i;const n=e.type;if(t&&"event"in e){const t=e.event;t instanceof Event&&(e.eventPath=t.composedPath())}const s=null!=(i=this.getListeners(n,t,!1))?i:new Set,r=new Set(s);r.size>0&&((i,n)=>{i.forEach(i=>{if(!n.has(i))return;const s=this.frameworkOverrides?()=>this.frameworkOverrides.wrapIncoming(()=>i(e)):()=>i(e);t?this.dispatchAsync(s):s()})})(r,s),new Set(t?this.globalAsyncListeners:this.globalSyncListeners).forEach(i=>{const s=this.frameworkOverrides?()=>this.frameworkOverrides.wrapIncoming(()=>i(n,e)):()=>i(n,e);t?this.dispatchAsync(s):s()})}dispatchAsync(e){this.asyncFunctionsQueue.push(e),this.scheduled||(this.frameworkOverrides.wrapIncoming(()=>{window.setTimeout(this.flushAsyncQueue.bind(this),0)}),this.scheduled=!0)}flushAsyncQueue(){this.scheduled=!1;const e=this.asyncFunctionsQueue.slice();this.asyncFunctionsQueue=[],e.forEach(e=>e())}};m([v(0,me("gridOptionsService")),v(1,me("frameworkOverrides")),v(2,me("globalEventListener")),v(3,me("globalSyncEventListener"))],ye.prototype,"setBeans",1),ye=m([ue("eventService")],ye);var Ce=class{constructor(e){this.frameworkOverrides=e,this.wrappedListeners=new Map,this.wrappedGlobalListeners=new Map}wrap(e){let t=e;return this.frameworkOverrides.shouldWrapOutgoing&&(t=t=>{this.frameworkOverrides.wrapOutgoing(()=>e(t))},this.wrappedListeners.set(e,t)),t}wrapGlobal(e){let t=e;return this.frameworkOverrides.shouldWrapOutgoing&&(t=(t,i)=>{this.frameworkOverrides.wrapOutgoing(()=>e(t,i))},this.wrappedGlobalListeners.set(e,t)),t}unwrap(e){var t;return null!=(t=this.wrappedListeners.get(e))?t:e}unwrapGlobal(e){var t;return null!=(t=this.wrappedGlobalListeners.get(e))?t:e}},be={resizable:!0,sortable:!0},Se=0;function we(){return Se++}var xe=class e{constructor(e,t,i,n){this.instanceId=we(),this.autoHeaderHeight=null,this.moving=!1,this.menuVisible=!1,this.lastLeftPinned=!1,this.firstRightPinned=!1,this.filterActive=!1,this.eventService=new ye,this.tooltipEnabled=!1,this.rowGroupActive=!1,this.pivotActive=!1,this.aggregationActive=!1,this.colDef=e,this.userProvidedColDef=t,this.colId=i,this.primary=n,this.setState(e)}getInstanceId(){return this.instanceId}setState(e){void 0!==e.sort?"asc"!==e.sort&&"desc"!==e.sort||(this.sort=e.sort):"asc"!==e.initialSort&&"desc"!==e.initialSort||(this.sort=e.initialSort);const t=e.sortIndex,i=e.initialSortIndex;void 0!==t?null!==t&&(this.sortIndex=t):null!==i&&(this.sortIndex=i);const n=e.hide,s=e.initialHide;this.visible=void 0!==n?!n:!s,void 0!==e.pinned?this.setPinned(e.pinned):this.setPinned(e.initialPinned);const r=e.flex,o=e.initialFlex;void 0!==r?this.flex=r:void 0!==o&&(this.flex=o)}setColDef(e,t,i){this.colDef=e,this.userProvidedColDef=t,this.initMinAndMaxWidths(),this.initDotNotation(),this.initTooltip(),this.eventService.dispatchEvent(this.createColumnEvent("colDefChanged",i))}getUserProvidedColDef(){return this.userProvidedColDef}setParent(e){this.parent=e}getParent(){return this.parent}setOriginalParent(e){this.originalParent=e}getOriginalParent(){return this.originalParent}initialise(){this.initMinAndMaxWidths(),this.resetActualWidth("gridInitializing"),this.initDotNotation(),this.initTooltip()}initDotNotation(){const e=this.gos.get("suppressFieldDotNotation");this.fieldContainsDots=S(this.colDef.field)&&this.colDef.field.indexOf(".")>=0&&!e,this.tooltipFieldContainsDots=S(this.colDef.tooltipField)&&this.colDef.tooltipField.indexOf(".")>=0&&!e}initMinAndMaxWidths(){var e,t;const i=this.colDef;this.minWidth=null!=(e=i.minWidth)?e:this.environment.getMinColWidth(),this.maxWidth=null!=(t=i.maxWidth)?t:Number.MAX_SAFE_INTEGER}initTooltip(){this.tooltipEnabled=S(this.colDef.tooltipField)||S(this.colDef.tooltipValueGetter)||S(this.colDef.tooltipComponent)}resetActualWidth(e){const t=this.calculateColInitialWidth(this.colDef);this.setActualWidth(t,e,!0)}calculateColInitialWidth(e){var t,i;const n=null!=(t=e.minWidth)?t:this.environment.getMinColWidth(),s=null!=(i=e.maxWidth)?i:Number.MAX_SAFE_INTEGER;let r;const o=M(e.width),a=M(e.initialWidth);return r=null!=o?o:null!=a?a:200,Math.max(Math.min(r,s),n)}isEmptyGroup(){return!1}isRowGroupDisplayed(e){if(w(this.colDef)||w(this.colDef.showRowGroup))return!1;const t=!0===this.colDef.showRowGroup,i=this.colDef.showRowGroup===e;return t||i}isPrimary(){return this.primary}isFilterAllowed(){return!!this.colDef.filter}isFieldContainsDots(){return this.fieldContainsDots}isTooltipEnabled(){return this.tooltipEnabled}isTooltipFieldContainsDots(){return this.tooltipFieldContainsDots}addEventListener(e,t){var i,n;this.frameworkOverrides.shouldWrapOutgoing&&!this.frameworkEventListenerService&&(this.eventService.setFrameworkOverrides(this.frameworkOverrides),this.frameworkEventListenerService=new Ce(this.frameworkOverrides));const s=null!=(n=null==(i=this.frameworkEventListenerService)?void 0:i.wrap(t))?n:t;this.eventService.addEventListener(e,s)}removeEventListener(e,t){var i,n;const s=null!=(n=null==(i=this.frameworkEventListenerService)?void 0:i.unwrap(t))?n:t;this.eventService.removeEventListener(e,s)}createColumnFunctionCallbackParams(e){return this.gos.addGridCommonParams({node:e,data:e.data,column:this,colDef:this.colDef})}isSuppressNavigable(e){if("boolean"==typeof this.colDef.suppressNavigable)return this.colDef.suppressNavigable;if("function"==typeof this.colDef.suppressNavigable){const t=this.createColumnFunctionCallbackParams(e);return(0,this.colDef.suppressNavigable)(t)}return!1}isCellEditable(e){return!(e.group&&!this.gos.get("enableGroupEdit"))&&this.isColumnFunc(e,this.colDef.editable)}isSuppressFillHandle(){return!!this.colDef.suppressFillHandle}isAutoHeight(){return!!this.colDef.autoHeight}isAutoHeaderHeight(){return!!this.colDef.autoHeaderHeight}isRowDrag(e){return this.isColumnFunc(e,this.colDef.rowDrag)}isDndSource(e){return this.isColumnFunc(e,this.colDef.dndSource)}isCellCheckboxSelection(e){return this.isColumnFunc(e,this.colDef.checkboxSelection)}isSuppressPaste(e){return this.isColumnFunc(e,this.colDef?this.colDef.suppressPaste:null)}isResizable(){return!!this.getColDefValue("resizable")}getColDefValue(e){var t;return null!=(t=this.colDef[e])?t:be[e]}isColumnFunc(e,t){return"boolean"==typeof t?t:"function"==typeof t&&t(this.createColumnFunctionCallbackParams(e))}setMoving(e,t){this.moving=e,this.eventService.dispatchEvent(this.createColumnEvent("movingChanged",t))}createColumnEvent(e,t){return this.gos.addGridCommonParams({type:e,column:this,columns:[this],source:t})}isMoving(){return this.moving}getSort(){return this.sort}setSort(e,t){this.sort!==e&&(this.sort=e,this.eventService.dispatchEvent(this.createColumnEvent("sortChanged",t))),this.dispatchStateUpdatedEvent("sort")}setMenuVisible(e,t){this.menuVisible!==e&&(this.menuVisible=e,this.eventService.dispatchEvent(this.createColumnEvent("menuVisibleChanged",t)))}isMenuVisible(){return this.menuVisible}isSortable(){return!!this.getColDefValue("sortable")}isSortAscending(){return"asc"===this.sort}isSortDescending(){return"desc"===this.sort}isSortNone(){return w(this.sort)}isSorting(){return S(this.sort)}getSortIndex(){return this.sortIndex}setSortIndex(e){this.sortIndex=e,this.dispatchStateUpdatedEvent("sortIndex")}setAggFunc(e){this.aggFunc=e,this.dispatchStateUpdatedEvent("aggFunc")}getAggFunc(){return this.aggFunc}getLeft(){return this.left}getOldLeft(){return this.oldLeft}getRight(){return this.left+this.actualWidth}setLeft(e,t){this.oldLeft=this.left,this.left!==e&&(this.left=e,this.eventService.dispatchEvent(this.createColumnEvent("leftChanged",t)))}isFilterActive(){return this.filterActive}setFilterActive(e,t,i){this.filterActive!==e&&(this.filterActive=e,this.eventService.dispatchEvent(this.createColumnEvent("filterActiveChanged",t)));const n=this.createColumnEvent("filterChanged",t);i&&G(n,i),this.eventService.dispatchEvent(n)}isHovered(){return this.columnHoverService.isHovered(this)}setPinned(e){this.pinned=!0===e||"left"===e?"left":"right"===e?"right":null,this.dispatchStateUpdatedEvent("pinned")}setFirstRightPinned(e,t){this.firstRightPinned!==e&&(this.firstRightPinned=e,this.eventService.dispatchEvent(this.createColumnEvent("firstRightPinnedChanged",t)))}setLastLeftPinned(e,t){this.lastLeftPinned!==e&&(this.lastLeftPinned=e,this.eventService.dispatchEvent(this.createColumnEvent("lastLeftPinnedChanged",t)))}isFirstRightPinned(){return this.firstRightPinned}isLastLeftPinned(){return this.lastLeftPinned}isPinned(){return"left"===this.pinned||"right"===this.pinned}isPinnedLeft(){return"left"===this.pinned}isPinnedRight(){return"right"===this.pinned}getPinned(){return this.pinned}setVisible(e,t){const i=!0===e;this.visible!==i&&(this.visible=i,this.eventService.dispatchEvent(this.createColumnEvent("visibleChanged",t))),this.dispatchStateUpdatedEvent("hide")}isVisible(){return this.visible}isSpanHeaderHeight(){const e=this.getColDef();return!e.suppressSpanHeaderHeight&&!e.autoHeaderHeight}getColumnGroupPaddingInfo(){let e=this.getParent();if(!e||!e.isPadding())return{numberOfParents:0,isSpanningTotal:!1};const t=e.getPaddingLevel()+1;let i=!0;for(;e;){if(!e.isPadding()){i=!1;break}e=e.getParent()}return{numberOfParents:t,isSpanningTotal:i}}getColDef(){return this.colDef}getColumnGroupShow(){return this.colDef.columnGroupShow}getColId(){return this.colId}getId(){return this.colId}getUniqueId(){return this.colId}getDefinition(){return this.colDef}getActualWidth(){return this.actualWidth}getAutoHeaderHeight(){return this.autoHeaderHeight}setAutoHeaderHeight(e){const t=e!==this.autoHeaderHeight;return this.autoHeaderHeight=e,t}createBaseColDefParams(e){return this.gos.addGridCommonParams({node:e,data:e.data,colDef:this.colDef,column:this})}getColSpan(e){if(w(this.colDef.colSpan))return 1;const t=this.createBaseColDefParams(e),i=this.colDef.colSpan(t);return Math.max(i,1)}getRowSpan(e){if(w(this.colDef.rowSpan))return 1;const t=this.createBaseColDefParams(e),i=this.colDef.rowSpan(t);return Math.max(i,1)}setActualWidth(e,t,i=!1){null!=this.minWidth&&(e=Math.max(e,this.minWidth)),null!=this.maxWidth&&(e=Math.min(e,this.maxWidth)),this.actualWidth!==e&&(this.actualWidth=e,this.flex&&"flex"!==t&&"gridInitializing"!==t&&(this.flex=null),i||this.fireColumnWidthChangedEvent(t)),this.dispatchStateUpdatedEvent("width")}fireColumnWidthChangedEvent(e){this.eventService.dispatchEvent(this.createColumnEvent("widthChanged",e))}isGreaterThanMax(e){return null!=this.maxWidth&&e>this.maxWidth}getMinWidth(){return this.minWidth}getMaxWidth(){return this.maxWidth}getFlex(){return this.flex||0}setFlex(e){this.flex!==e&&(this.flex=e),this.dispatchStateUpdatedEvent("flex")}setMinimum(e){S(this.minWidth)&&this.setActualWidth(this.minWidth,e)}setRowGroupActive(e,t){this.rowGroupActive!==e&&(this.rowGroupActive=e,this.eventService.dispatchEvent(this.createColumnEvent("columnRowGroupChanged",t))),this.dispatchStateUpdatedEvent("rowGroup")}isRowGroupActive(){return this.rowGroupActive}setPivotActive(e,t){this.pivotActive!==e&&(this.pivotActive=e,this.eventService.dispatchEvent(this.createColumnEvent("columnPivotChanged",t))),this.dispatchStateUpdatedEvent("pivot")}isPivotActive(){return this.pivotActive}isAnyFunctionActive(){return this.isPivotActive()||this.isRowGroupActive()||this.isValueActive()}isAnyFunctionAllowed(){return this.isAllowPivot()||this.isAllowRowGroup()||this.isAllowValue()}setValueActive(e,t){this.aggregationActive!==e&&(this.aggregationActive=e,this.eventService.dispatchEvent(this.createColumnEvent("columnValueChanged",t)))}isValueActive(){return this.aggregationActive}isAllowPivot(){return!0===this.colDef.enablePivot}isAllowValue(){return!0===this.colDef.enableValue}isAllowRowGroup(){return!0===this.colDef.enableRowGroup}getMenuTabs(e){j("As of v31.1, 'getMenuTabs' is deprecated. Use 'getColDef().menuTabs ?? defaultValues' instead.");let t=this.getColDef().menuTabs;return null==t&&(t=e),t}dispatchStateUpdatedEvent(t){this.eventService.dispatchEvent({type:e.EVENT_STATE_UPDATED,key:t})}};xe.EVENT_MOVING_CHANGED="movingChanged",xe.EVENT_LEFT_CHANGED="leftChanged",xe.EVENT_WIDTH_CHANGED="widthChanged",xe.EVENT_LAST_LEFT_PINNED_CHANGED="lastLeftPinnedChanged",xe.EVENT_FIRST_RIGHT_PINNED_CHANGED="firstRightPinnedChanged",xe.EVENT_VISIBLE_CHANGED="visibleChanged",xe.EVENT_FILTER_CHANGED="filterChanged",xe.EVENT_FILTER_ACTIVE_CHANGED="filterActiveChanged",xe.EVENT_SORT_CHANGED="sortChanged",xe.EVENT_COL_DEF_CHANGED="colDefChanged",xe.EVENT_MENU_VISIBLE_CHANGED="menuVisibleChanged",xe.EVENT_ROW_GROUP_CHANGED="columnRowGroupChanged",xe.EVENT_PIVOT_CHANGED="columnPivotChanged",xe.EVENT_VALUE_CHANGED="columnValueChanged",xe.EVENT_STATE_UPDATED="columnStateUpdated",m([pe("gridOptionsService")],xe.prototype,"gos",2),m([pe("environment")],xe.prototype,"environment",2),m([pe("columnHoverService")],xe.prototype,"columnHoverService",2),m([pe("frameworkOverrides")],xe.prototype,"frameworkOverrides",2),m([he],xe.prototype,"initialise",1);var Ee=xe,Me=class e{constructor(e,t,i,n){this.localEventService=new ye,this.expandable=!1,this.instanceId=we(),this.expandableListenerRemoveCallback=null,this.colGroupDef=e,this.groupId=t,this.expanded=!!e&&!!e.openByDefault,this.padding=i,this.level=n}destroy(){this.expandableListenerRemoveCallback&&this.reset(null,void 0)}reset(e,t){this.colGroupDef=e,this.level=t,this.originalParent=null,this.expandableListenerRemoveCallback&&this.expandableListenerRemoveCallback(),this.children=void 0,this.expandable=void 0}getInstanceId(){return this.instanceId}setOriginalParent(e){this.originalParent=e}getOriginalParent(){return this.originalParent}getLevel(){return this.level}isVisible(){return!!this.children&&this.children.some(e=>e.isVisible())}isPadding(){return this.padding}setExpanded(t){this.expanded=void 0!==t&&t;const i={type:e.EVENT_EXPANDED_CHANGED};this.localEventService.dispatchEvent(i)}isExpandable(){return this.expandable}isExpanded(){return this.expanded}getGroupId(){return this.groupId}getId(){return this.getGroupId()}setChildren(e){this.children=e}getChildren(){return this.children}getColGroupDef(){return this.colGroupDef}getLeafColumns(){const e=[];return this.addLeafColumns(e),e}addLeafColumns(t){this.children&&this.children.forEach(i=>{i instanceof Ee?t.push(i):i instanceof e&&i.addLeafColumns(t)})}getColumnGroupShow(){const e=this.colGroupDef;if(e)return e.columnGroupShow}setupExpandable(){this.setExpandable(),this.expandableListenerRemoveCallback&&this.expandableListenerRemoveCallback();const e=this.onColumnVisibilityChanged.bind(this);this.getLeafColumns().forEach(t=>t.addEventListener("visibleChanged",e)),this.expandableListenerRemoveCallback=()=>{this.getLeafColumns().forEach(t=>t.removeEventListener("visibleChanged",e)),this.expandableListenerRemoveCallback=null}}setExpandable(){if(this.isPadding())return;let t=!1,i=!1,n=!1;const s=this.findChildrenRemovingPadding();for(let e=0,r=s.length;e<r;e++){const r=s[e];if(!r.isVisible())continue;const o=r.getColumnGroupShow();"open"===o?(t=!0,n=!0):"closed"===o?(i=!0,n=!0):(t=!0,i=!0)}const r=t&&i&&n;if(this.expandable!==r){this.expandable=r;const t={type:e.EVENT_EXPANDABLE_CHANGED};this.localEventService.dispatchEvent(t)}}findChildrenRemovingPadding(){const t=[],i=n=>{n.forEach(n=>{n instanceof e&&n.isPadding()?i(n.children):t.push(n)})};return i(this.children),t}onColumnVisibilityChanged(){this.setExpandable()}addEventListener(e,t){this.localEventService.addEventListener(e,t)}removeEventListener(e,t){this.localEventService.removeEventListener(e,t)}};Me.EVENT_EXPANDED_CHANGED="expandedChanged",Me.EVENT_EXPANDABLE_CHANGED="expandableChanged",m([de],Me.prototype,"destroy",1);var Ae=Me,Te={numericColumn:{headerClass:"ag-right-aligned-header",cellClass:"ag-right-aligned-cell"},rightAligned:{headerClass:"ag-right-aligned-header",cellClass:"ag-right-aligned-cell"}},De={};f(De,{addSafePassiveEventListener:()=>st,createEventPath:()=>it,getCtrlForEventTarget:()=>et,getEventPath:()=>nt,isElementInEventPath:()=>tt,isEventSupported:()=>Je,isStopPropagationForAgGrid:()=>Qe,stopPropagationForAgGrid:()=>Ze});var Ie={};function Re(e){return null!=e&&e.length>0}function Le(e){if(e&&e.length)return e[e.length-1]}function ke(e,t,i){return null==e&&null==t||null!=e&&null!=t&&e.length===t.length&&e.every((e,n)=>i?i(e,t[n]):t[n]===e)}function Pe(e,t){return ke(e,t)}function Ne(e){return e.sort((e,t)=>e-t)}function Oe(e,t){if(e)for(let i=e.length-2;i>=0;i--){const n=e[i]===t,s=e[i+1]===t;n&&s&&e.splice(i+1,1)}}function _e(e,t){const i=e.indexOf(t);i>=0&&(e[i]=e[e.length-1],e.pop())}function Fe(e,t){const i=e.indexOf(t);i>=0&&e.splice(i,1)}function Ge(e,t){for(let i=0;i<t.length;i++)_e(e,t[i])}function Ve(e,t){for(let i=0;i<t.length;i++)Fe(e,t[i])}function Be(e,t,i){e.splice(i,0,t)}function He(e,t,i){if(null!=e&&null!=t)for(let n=t.length-1;n>=0;n--)Be(e,t[n],i)}function ze(e,t,i){Ve(e,t),t.slice().reverse().forEach(t=>Be(e,t,i))}function Ue(e,t){return e.indexOf(t)>-1}function We(e){return[].concat.apply([],e)}function je(e,t){null!=t&&null!=e&&t.forEach(t=>e.push(t))}function Ke(e){return e.map(E)}function $e(e,t){if(null!=e)for(let i=e.length-1;i>=0;i--)t(e[i],i)}f(Ie,{areEqual:()=>ke,existsAndNotEmpty:()=>Re,flatten:()=>We,forEachReverse:()=>$e,includes:()=>Ue,insertArrayIntoArray:()=>He,insertIntoArray:()=>Be,last:()=>Le,moveInArray:()=>ze,pushAll:()=>je,removeAllFromArray:()=>Ve,removeAllFromUnorderedArray:()=>Ge,removeFromArray:()=>Fe,removeFromUnorderedArray:()=>_e,removeRepeatsFromArray:()=>Oe,shallowCompare:()=>Pe,sortNumerically:()=>Ne,toStrings:()=>Ke});var Ye="__ag_Grid_Stop_Propagation",qe=["touchstart","touchend","touchmove","touchcancel","scroll"],Xe={};function Ze(e){e[Ye]=!0}function Qe(e){return!0===e[Ye]}var Je=(()=>{const e={select:"input",change:"input",submit:"form",reset:"form",error:"img",load:"img",abort:"img"};return t=>{if("boolean"==typeof Xe[t])return Xe[t];const i=document.createElement(e[t]||"div");return Xe[t="on"+t]=t in i}})();function et(e,t,i){let n=t;for(;n;){const t=e.getDomData(n,i);if(t)return t;n=n.parentElement}return null}function tt(e,t){return!(!t||!e)&&nt(t).indexOf(e)>=0}function it(e){const t=[];let i=e.target;for(;i;)t.push(i),i=i.parentElement;return t}function nt(e){const t=e;return t.path?t.path:t.composedPath?t.composedPath():it(t)}function st(e,t,i,n){const s=Ue(qe,i)?{passive:!0}:void 0;e&&e.addEventListener&&e.addEventListener(t,i,n,s)}var rt=class e{constructor(){this.destroyFunctions=[],this.destroyed=!1,this.__v_skip=!0,this.lastChangeSetIdLookup={},this.propertyListenerId=0,this.isAlive=()=>!this.destroyed}getFrameworkOverrides(){return this.frameworkOverrides}getContext(){return this.context}destroy(){for(let e=0;e<this.destroyFunctions.length;e++)this.destroyFunctions[e]();this.destroyFunctions.length=0,this.destroyed=!0,this.dispatchEvent({type:e.EVENT_DESTROYED})}addEventListener(e,t){this.localEventService||(this.localEventService=new ye),this.localEventService.addEventListener(e,t)}removeEventListener(e,t){this.localEventService&&this.localEventService.removeEventListener(e,t)}dispatchEvent(e){this.localEventService&&this.localEventService.dispatchEvent(e)}addManagedListener(e,t,i){if(this.destroyed)return;e instanceof HTMLElement?st(this.getFrameworkOverrides(),e,t,i):e.addEventListener(t,i);const n=()=>(e.removeEventListener(t,i),null);return this.destroyFunctions.push(n),()=>(n(),this.destroyFunctions=this.destroyFunctions.filter(e=>e!==n),null)}setupGridOptionListener(e,t){this.gos.addEventListener(e,t);const i=()=>(this.gos.removeEventListener(e,t),null);return this.destroyFunctions.push(i),()=>(i(),this.destroyFunctions=this.destroyFunctions.filter(e=>e!==i),null)}addManagedPropertyListener(e,t){return this.destroyed?()=>null:this.setupGridOptionListener(e,t)}addManagedPropertyListeners(e,t){if(this.destroyed)return;const i=e.join("-")+this.propertyListenerId++,n=e=>{if(e.changeSet){if(e.changeSet&&e.changeSet.id===this.lastChangeSetIdLookup[i])return;this.lastChangeSetIdLookup[i]=e.changeSet.id}const n={type:"gridPropertyChanged",changeSet:e.changeSet,source:e.source};t(n)};e.forEach(e=>this.setupGridOptionListener(e,n))}addDestroyFunc(e){this.isAlive()?this.destroyFunctions.push(e):e()}createManagedBean(e,t){const i=this.createBean(e,t);return this.addDestroyFunc(this.destroyBean.bind(this,e,t)),i}createBean(e,t,i){return(t||this.getContext()).createBean(e,i)}destroyBean(e,t){return(t||this.getContext()).destroyBean(e)}destroyBeans(e,t){if(e)for(let i=0;i<e.length;i++)this.destroyBean(e[i],t);return[]}};rt.EVENT_DESTROYED="destroyed",m([pe("frameworkOverrides")],rt.prototype,"frameworkOverrides",2),m([pe("context")],rt.prototype,"context",2),m([pe("eventService")],rt.prototype,"eventService",2),m([pe("gridOptionsService")],rt.prototype,"gos",2),m([pe("localeService")],rt.prototype,"localeService",2),m([pe("environment")],rt.prototype,"environment",2),m([de],rt.prototype,"destroy",1);var ot=rt,at=class extends ot{setBeans(e){this.logger=e.create("ColumnFactory")}createColumnTree(e,t,i,n){const s=new L,{existingCols:r,existingGroups:o,existingColKeys:a}=this.extractExistingTreeData(i);s.addExistingKeys(a);const l=this.recursivelyCreateColumns(e,0,t,r,s,o,n),c=this.findMaxDept(l,0);this.logger.log("Number of levels for grouped columns is "+c);const h=this.balanceColumnTree(l,0,c,s);return lt(null,h,(e,t)=>{e instanceof Ae&&e.setupExpandable(),e.setOriginalParent(t)}),{columnTree:h,treeDept:c}}extractExistingTreeData(e){const t=[],i=[],n=[];return e&&lt(null,e,e=>{if(e instanceof Ae){const t=e;i.push(t)}else{const i=e;n.push(i.getId()),t.push(i)}}),{existingCols:t,existingGroups:i,existingColKeys:n}}createForAutoGroups(e,t){return e.map(e=>this.createAutoGroupTreeItem(t,e))}createAutoGroupTreeItem(e,t){const i=this.findDepth(e);let n=t;for(let e=i-1;e>=0;e--){const i=new Ae(null,`FAKE_PATH_${t.getId()}}_${e}`,!0,e);this.createBean(i),i.setChildren([n]),n.setOriginalParent(i),n=i}return 0===i&&t.setOriginalParent(null),n}findDepth(e){let t=0,i=e;for(;i&&i[0]&&i[0]instanceof Ae;)t++,i=i[0].getChildren();return t}balanceColumnTree(e,t,i,n){const s=[];for(let r=0;r<e.length;r++){const o=e[r];if(o instanceof Ae){const e=o,r=this.balanceColumnTree(e.getChildren(),t+1,i,n);e.setChildren(r),s.push(e)}else{let r,a;for(let e=i-1;e>=t;e--){const e=n.getUniqueKey(null,null),i=this.createMergedColGroupDef(null),s=new Ae(i,e,!0,t);this.createBean(s),a&&a.setChildren([s]),a=s,r||(r=a)}if(r&&a){if(s.push(r),e.some(e=>e instanceof Ae)){a.setChildren([o]);continue}a.setChildren(e);break}s.push(o)}}return s}findMaxDept(e,t){let i=t;for(let n=0;n<e.length;n++){const s=e[n];if(s instanceof Ae){const e=s,n=this.findMaxDept(e.getChildren(),t+1);i<n&&(i=n)}}return i}recursivelyCreateColumns(e,t,i,n,s,r,o){if(!e)return[];const a=new Array(e.length);for(let l=0;l<a.length;l++){const c=e[l];this.isColumnGroup(c)?a[l]=this.createColumnGroup(i,c,t,n,s,r,o):a[l]=this.createColumn(i,c,n,s,o)}return a}createColumnGroup(e,t,i,n,s,r,o){const a=this.createMergedColGroupDef(t),l=s.getUniqueKey(a.groupId||null,null),c=new Ae(a,l,!1,i);this.createBean(c);const h=this.findExistingGroup(t,r);h&&r.splice(h.idx,1);let d=null==h?void 0:h.group;d&&c.setExpanded(d.isExpanded());const u=this.recursivelyCreateColumns(a.children,i+1,e,n,s,r,o);return c.setChildren(u),c}createMergedColGroupDef(e){const t={};return Object.assign(t,this.gos.get("defaultColGroupDef")),Object.assign(t,e),t}createColumn(e,t,i,n,s){const r=this.findExistingColumn(t,i);r&&(null==i||i.splice(r.idx,1));let o=null==r?void 0:r.column;if(o){const e=this.addColumnDefaultAndTypes(t,o.getColId());o.setColDef(e,t,s),this.applyColumnState(o,e,s)}else{const i=n.getUniqueKey(t.colId,t.field),s=this.addColumnDefaultAndTypes(t,i);o=new Ee(s,t,i,e),this.context.createBean(o)}return this.dataTypeService.addColumnListeners(o),o}applyColumnState(e,t,i){const n=M(t.flex);if(void 0!==n&&e.setFlex(n),e.getFlex()<=0){const n=M(t.width);if(null!=n)e.setActualWidth(n,i);else{const t=e.getActualWidth();e.setActualWidth(t,i)}}void 0!==t.sort&&("asc"==t.sort||"desc"==t.sort?e.setSort(t.sort,i):e.setSort(void 0,i));const s=M(t.sortIndex);void 0!==s&&e.setSortIndex(s);const r=A(t.hide);void 0!==r&&e.setVisible(!r,i),void 0!==t.pinned&&e.setPinned(t.pinned)}findExistingColumn(e,t){if(t)for(let i=0;i<t.length;i++){const n=t[i].getUserProvidedColDef();if(n)if(null==e.colId){if(null!=e.field){if(n.field===e.field)return{idx:i,column:t[i]}}else if(n===e)return{idx:i,column:t[i]}}else if(t[i].getId()===e.colId)return{idx:i,column:t[i]}}}findExistingGroup(e,t){if(null!=e.groupId)for(let i=0;i<t.length;i++){const n=t[i];if(n.getColGroupDef()&&n.getId()===e.groupId)return{idx:i,group:n}}}addColumnDefaultAndTypes(e,t){const i={};G(i,this.gos.get("defaultColDef"),!1,!0);const n=this.dataTypeService.updateColDefAndGetColumnType(i,e,t);n&&this.assignColumnTypes(n,i),G(i,e,!1,!0);const s=this.gos.get("autoGroupColumnDef"),r=this.gos.isColumnsSortingCoupledToGroup();return e.rowGroup&&s&&r&&G(i,{sort:s.sort,initialSort:s.initialSort},!1,!0),this.dataTypeService.validateColDef(i),i}assignColumnTypes(e,t){if(!e.length)return;const i=Object.assign({},Te);N(this.gos.get("columnTypes")||{},(e,t)=>{e in i?console.warn(`AG Grid: the column type '${e}' is a default column type and cannot be overridden.`):(t.type&&j("Column type definitions 'columnTypes' with a 'type' attribute are not supported because a column type cannot refer to another column type. Only column definitions 'columnDefs' can use the 'type' attribute to refer to a column type."),i[e]=t)}),e.forEach(e=>{const n=i[e.trim()];n?G(t,n,!1,!0):console.warn("AG Grid: colDef.type '"+e+"' does not correspond to defined gridOptions.columnTypes")})}isColumnGroup(e){return void 0!==e.children}};function lt(e,t,i){if(t)for(let n=0;n<t.length;n++){const s=t[n];s instanceof Ae&&lt(s,s.getChildren(),i),i(s,e)}}m([pe("dataTypeService")],at.prototype,"dataTypeService",2),m([v(0,me("loggerFactory"))],at.prototype,"setBeans",1),at=m([ue("columnFactory")],at);var ct=class e{constructor(e,t,i,n){this.displayedChildren=[],this.localEventService=new ye,this.groupId=t,this.partId=i,this.providedColumnGroup=e,this.pinned=n}static createUniqueId(e,t){return e+"_"+t}reset(){this.parent=null,this.children=null,this.displayedChildren=null}getParent(){return this.parent}setParent(e){this.parent=e}getUniqueId(){return e.createUniqueId(this.groupId,this.partId)}isEmptyGroup(){return 0===this.displayedChildren.length}isMoving(){const e=this.getProvidedColumnGroup().getLeafColumns();return!(!e||0===e.length)&&e.every(e=>e.isMoving())}checkLeft(){if(this.displayedChildren.forEach(t=>{t instanceof e&&t.checkLeft()}),this.displayedChildren.length>0)if(this.gos.get("enableRtl")){const e=Le(this.displayedChildren).getLeft();this.setLeft(e)}else{const e=this.displayedChildren[0].getLeft();this.setLeft(e)}else this.setLeft(null)}getLeft(){return this.left}getOldLeft(){return this.oldLeft}setLeft(t){this.oldLeft=this.left,this.left!==t&&(this.left=t,this.localEventService.dispatchEvent(this.createAgEvent(e.EVENT_LEFT_CHANGED)))}getPinned(){return this.pinned}createAgEvent(e){return{type:e}}addEventListener(e,t){this.localEventService.addEventListener(e,t)}removeEventListener(e,t){this.localEventService.removeEventListener(e,t)}getGroupId(){return this.groupId}getPartId(){return this.partId}isChildInThisGroupDeepSearch(t){let i=!1;return this.children.forEach(n=>{t===n&&(i=!0),n instanceof e&&n.isChildInThisGroupDeepSearch(t)&&(i=!0)}),i}getActualWidth(){let e=0;return this.displayedChildren&&this.displayedChildren.forEach(t=>{e+=t.getActualWidth()}),e}isResizable(){if(!this.displayedChildren)return!1;let e=!1;return this.displayedChildren.forEach(t=>{t.isResizable()&&(e=!0)}),e}getMinWidth(){let e=0;return this.displayedChildren.forEach(t=>{e+=t.getMinWidth()||0}),e}addChild(e){this.children||(this.children=[]),this.children.push(e)}getDisplayedChildren(){return this.displayedChildren}getLeafColumns(){const e=[];return this.addLeafColumns(e),e}getDisplayedLeafColumns(){const e=[];return this.addDisplayedLeafColumns(e),e}getDefinition(){return this.providedColumnGroup.getColGroupDef()}getColGroupDef(){return this.providedColumnGroup.getColGroupDef()}isPadding(){return this.providedColumnGroup.isPadding()}isExpandable(){return this.providedColumnGroup.isExpandable()}isExpanded(){return this.providedColumnGroup.isExpanded()}setExpanded(e){this.providedColumnGroup.setExpanded(e)}addDisplayedLeafColumns(t){this.displayedChildren.forEach(i=>{i instanceof Ee?t.push(i):i instanceof e&&i.addDisplayedLeafColumns(t)})}addLeafColumns(t){this.children.forEach(i=>{i instanceof Ee?t.push(i):i instanceof e&&i.addLeafColumns(t)})}getChildren(){return this.children}getColumnGroupShow(){return this.providedColumnGroup.getColumnGroupShow()}getProvidedColumnGroup(){return this.providedColumnGroup}getPaddingLevel(){const e=this.getParent();return this.isPadding()&&e&&e.isPadding()?1+e.getPaddingLevel():0}calculateDisplayedColumns(){this.displayedChildren=[];let t=this;for(;null!=t&&t.isPadding();)t=t.getParent();if(!t||!t.providedColumnGroup.isExpandable())return this.displayedChildren=this.children,void this.localEventService.dispatchEvent(this.createAgEvent(e.EVENT_DISPLAYED_CHILDREN_CHANGED));this.children.forEach(i=>{if(!(i instanceof e)||i.displayedChildren&&i.displayedChildren.length)switch(i.getColumnGroupShow()){case"open":t.providedColumnGroup.isExpanded()&&this.displayedChildren.push(i);break;case"closed":t.providedColumnGroup.isExpanded()||this.displayedChildren.push(i);break;default:this.displayedChildren.push(i)}}),this.localEventService.dispatchEvent(this.createAgEvent(e.EVENT_DISPLAYED_CHILDREN_CHANGED))}};ct.EVENT_LEFT_CHANGED="leftChanged",ct.EVENT_DISPLAYED_CHILDREN_CHANGED="displayedChildrenChanged",m([pe("gridOptionsService")],ct.prototype,"gos",2);var ht=ct,dt=class{};dt.EVENT_COLUMN_EVERYTHING_CHANGED="columnEverythingChanged",dt.EVENT_NEW_COLUMNS_LOADED="newColumnsLoaded",dt.EVENT_COLUMN_PIVOT_MODE_CHANGED="columnPivotModeChanged",dt.EVENT_PIVOT_MAX_COLUMNS_EXCEEDED="pivotMaxColumnsExceeded",dt.EVENT_COLUMN_ROW_GROUP_CHANGED="columnRowGroupChanged",dt.EVENT_EXPAND_COLLAPSE_ALL="expandOrCollapseAll",dt.EVENT_COLUMN_PIVOT_CHANGED="columnPivotChanged",dt.EVENT_GRID_COLUMNS_CHANGED="gridColumnsChanged",dt.EVENT_COLUMN_VALUE_CHANGED="columnValueChanged",dt.EVENT_COLUMN_MOVED="columnMoved",dt.EVENT_COLUMN_VISIBLE="columnVisible",dt.EVENT_COLUMN_PINNED="columnPinned",dt.EVENT_COLUMN_GROUP_OPENED="columnGroupOpened",dt.EVENT_COLUMN_RESIZED="columnResized",dt.EVENT_DISPLAYED_COLUMNS_CHANGED="displayedColumnsChanged",dt.EVENT_SUPPRESS_COLUMN_MOVE_CHANGED="suppressMovableColumns",dt.EVENT_SUPPRESS_MENU_HIDE_CHANGED="suppressMenuHide",dt.EVENT_SUPPRESS_FIELD_DOT_NOTATION="suppressFieldDotNotation",dt.EVENT_VIRTUAL_COLUMNS_CHANGED="virtualColumnsChanged",dt.EVENT_COLUMN_HEADER_MOUSE_OVER="columnHeaderMouseOver",dt.EVENT_COLUMN_HEADER_MOUSE_LEAVE="columnHeaderMouseLeave",dt.EVENT_COLUMN_HEADER_CLICKED="columnHeaderClicked",dt.EVENT_COLUMN_HEADER_CONTEXT_MENU="columnHeaderContextMenu",dt.EVENT_ASYNC_TRANSACTIONS_FLUSHED="asyncTransactionsFlushed",dt.EVENT_ROW_GROUP_OPENED="rowGroupOpened",dt.EVENT_ROW_DATA_UPDATED="rowDataUpdated",dt.EVENT_PINNED_ROW_DATA_CHANGED="pinnedRowDataChanged",dt.EVENT_RANGE_SELECTION_CHANGED="rangeSelectionChanged",dt.EVENT_CHART_CREATED="chartCreated",dt.EVENT_CHART_RANGE_SELECTION_CHANGED="chartRangeSelectionChanged",dt.EVENT_CHART_OPTIONS_CHANGED="chartOptionsChanged",dt.EVENT_CHART_DESTROYED="chartDestroyed",dt.EVENT_TOOL_PANEL_VISIBLE_CHANGED="toolPanelVisibleChanged",dt.EVENT_TOOL_PANEL_SIZE_CHANGED="toolPanelSizeChanged",dt.EVENT_COLUMN_PANEL_ITEM_DRAG_START="columnPanelItemDragStart",dt.EVENT_COLUMN_PANEL_ITEM_DRAG_END="columnPanelItemDragEnd",dt.EVENT_MODEL_UPDATED="modelUpdated",dt.EVENT_CUT_START="cutStart",dt.EVENT_CUT_END="cutEnd",dt.EVENT_PASTE_START="pasteStart",dt.EVENT_PASTE_END="pasteEnd",dt.EVENT_FILL_START="fillStart",dt.EVENT_FILL_END="fillEnd",dt.EVENT_RANGE_DELETE_START="rangeDeleteStart",dt.EVENT_RANGE_DELETE_END="rangeDeleteEnd",dt.EVENT_UNDO_STARTED="undoStarted",dt.EVENT_UNDO_ENDED="undoEnded",dt.EVENT_REDO_STARTED="redoStarted",dt.EVENT_REDO_ENDED="redoEnded",dt.EVENT_KEY_SHORTCUT_CHANGED_CELL_START="keyShortcutChangedCellStart",dt.EVENT_KEY_SHORTCUT_CHANGED_CELL_END="keyShortcutChangedCellEnd",dt.EVENT_CELL_CLICKED="cellClicked",dt.EVENT_CELL_DOUBLE_CLICKED="cellDoubleClicked",dt.EVENT_CELL_MOUSE_DOWN="cellMouseDown",dt.EVENT_CELL_CONTEXT_MENU="cellContextMenu",dt.EVENT_CELL_VALUE_CHANGED="cellValueChanged",dt.EVENT_CELL_EDIT_REQUEST="cellEditRequest",dt.EVENT_ROW_VALUE_CHANGED="rowValueChanged",dt.EVENT_CELL_FOCUSED="cellFocused",dt.EVENT_CELL_FOCUS_CLEARED="cellFocusCleared",dt.EVENT_FULL_WIDTH_ROW_FOCUSED="fullWidthRowFocused",dt.EVENT_ROW_SELECTED="rowSelected",dt.EVENT_SELECTION_CHANGED="selectionChanged",dt.EVENT_TOOLTIP_SHOW="tooltipShow",dt.EVENT_TOOLTIP_HIDE="tooltipHide",dt.EVENT_CELL_KEY_DOWN="cellKeyDown",dt.EVENT_CELL_MOUSE_OVER="cellMouseOver",dt.EVENT_CELL_MOUSE_OUT="cellMouseOut",dt.EVENT_FILTER_CHANGED="filterChanged",dt.EVENT_FILTER_MODIFIED="filterModified",dt.EVENT_FILTER_OPENED="filterOpened",dt.EVENT_ADVANCED_FILTER_BUILDER_VISIBLE_CHANGED="advancedFilterBuilderVisibleChanged",dt.EVENT_SORT_CHANGED="sortChanged",dt.EVENT_VIRTUAL_ROW_REMOVED="virtualRowRemoved",dt.EVENT_ROW_CLICKED="rowClicked",dt.EVENT_ROW_DOUBLE_CLICKED="rowDoubleClicked",dt.EVENT_GRID_READY="gridReady",dt.EVENT_GRID_PRE_DESTROYED="gridPreDestroyed",dt.EVENT_GRID_SIZE_CHANGED="gridSizeChanged",dt.EVENT_VIEWPORT_CHANGED="viewportChanged",dt.EVENT_SCROLLBAR_WIDTH_CHANGED="scrollbarWidthChanged",dt.EVENT_FIRST_DATA_RENDERED="firstDataRendered",dt.EVENT_DRAG_STARTED="dragStarted",dt.EVENT_DRAG_STOPPED="dragStopped",dt.EVENT_CHECKBOX_CHANGED="checkboxChanged",dt.EVENT_ROW_EDITING_STARTED="rowEditingStarted",dt.EVENT_ROW_EDITING_STOPPED="rowEditingStopped",dt.EVENT_CELL_EDITING_STARTED="cellEditingStarted",dt.EVENT_CELL_EDITING_STOPPED="cellEditingStopped",dt.EVENT_BODY_SCROLL="bodyScroll",dt.EVENT_BODY_SCROLL_END="bodyScrollEnd",dt.EVENT_HEIGHT_SCALE_CHANGED="heightScaleChanged",dt.EVENT_PAGINATION_CHANGED="paginationChanged",dt.EVENT_COMPONENT_STATE_CHANGED="componentStateChanged",dt.EVENT_STORE_REFRESHED="storeRefreshed",dt.EVENT_STATE_UPDATED="stateUpdated",dt.EVENT_COLUMN_MENU_VISIBLE_CHANGED="columnMenuVisibleChanged",dt.EVENT_CONTEXT_MENU_VISIBLE_CHANGED="contextMenuVisibleChanged",dt.EVENT_BODY_HEIGHT_CHANGED="bodyHeightChanged",dt.EVENT_COLUMN_CONTAINER_WIDTH_CHANGED="columnContainerWidthChanged",dt.EVENT_DISPLAYED_COLUMNS_WIDTH_CHANGED="displayedColumnsWidthChanged",dt.EVENT_SCROLL_VISIBILITY_CHANGED="scrollVisibilityChanged",dt.EVENT_COLUMN_HOVER_CHANGED="columnHoverChanged",dt.EVENT_FLASH_CELLS="flashCells",dt.EVENT_PAGINATION_PIXEL_OFFSET_CHANGED="paginationPixelOffsetChanged",dt.EVENT_DISPLAYED_ROWS_CHANGED="displayedRowsChanged",dt.EVENT_LEFT_PINNED_WIDTH_CHANGED="leftPinnedWidthChanged",dt.EVENT_RIGHT_PINNED_WIDTH_CHANGED="rightPinnedWidthChanged",dt.EVENT_ROW_CONTAINER_HEIGHT_CHANGED="rowContainerHeightChanged",dt.EVENT_HEADER_HEIGHT_CHANGED="headerHeightChanged",dt.EVENT_COLUMN_HEADER_HEIGHT_CHANGED="columnHeaderHeightChanged",dt.EVENT_ROW_DRAG_ENTER="rowDragEnter",dt.EVENT_ROW_DRAG_MOVE="rowDragMove",dt.EVENT_ROW_DRAG_LEAVE="rowDragLeave",dt.EVENT_ROW_DRAG_END="rowDragEnd",dt.EVENT_GRID_STYLES_CHANGED="gridStylesChanged",dt.EVENT_COLUMN_ROW_GROUP_CHANGE_REQUEST="columnRowGroupChangeRequest",dt.EVENT_COLUMN_PIVOT_CHANGE_REQUEST="columnPivotChangeRequest",dt.EVENT_COLUMN_VALUE_CHANGE_REQUEST="columnValueChangeRequest",dt.EVENT_COLUMN_AGG_FUNC_CHANGE_REQUEST="columnAggFuncChangeRequest",dt.EVENT_STORE_UPDATED="storeUpdated",dt.EVENT_FILTER_DESTROYED="filterDestroyed",dt.EVENT_ROW_DATA_UPDATE_STARTED="rowDataUpdateStarted",dt.EVENT_ROW_COUNT_READY="rowCountReady",dt.EVENT_ADVANCED_FILTER_ENABLED_CHANGED="advancedFilterEnabledChanged",dt.EVENT_DATA_TYPES_INFERRED="dataTypesInferred",dt.EVENT_FIELD_VALUE_CHANGED="fieldValueChanged",dt.EVENT_FIELD_PICKER_VALUE_SELECTED="fieldPickerValueSelected",dt.EVENT_SIDE_BAR_UPDATED="sideBarUpdated";var ut=new Set([dt.EVENT_GRID_PRE_DESTROYED,dt.EVENT_FILL_START]),pt=class{constructor(){this.existingIds={}}getInstanceIdForKey(e){const t=this.existingIds[e];let i;return i="number"!=typeof t?0:t+1,this.existingIds[e]=i,i}},gt="ag-Grid-AutoColumn",ft=class extends ot{createAutoGroupColumns(e){const t=[],i=this.gos.get("treeData");let n=this.gos.isGroupMultiAutoColumn();return i&&n&&(console.warn('AG Grid: you cannot mix groupDisplayType = "multipleColumns" with treeData, only one column can be used to display groups when doing tree data'),n=!1),n?e.forEach((e,i)=>{t.push(this.createOneAutoGroupColumn(e,i))}):t.push(this.createOneAutoGroupColumn()),t}updateAutoGroupColumns(e,t){e.forEach((e,i)=>this.updateOneAutoGroupColumn(e,i,t))}createOneAutoGroupColumn(e,t){let i;i=e?`${gt}-${e.getId()}`:gt;const n=this.createAutoGroupColDef(i,e,t);n.colId=i;const s=new Ee(n,null,i,!0);return this.context.createBean(s),s}updateOneAutoGroupColumn(e,t,i){const n=e.getColDef(),s="string"==typeof n.showRowGroup?n.showRowGroup:void 0,r=null!=s?this.columnModel.getPrimaryColumn(s):void 0,o=this.createAutoGroupColDef(e.getId(),null!=r?r:void 0,t);e.setColDef(o,null,i),this.columnFactory.applyColumnState(e,o,i)}createAutoGroupColDef(e,t,i){let n=this.createBaseColDef(t);G(n,this.gos.get("autoGroupColumnDef")),n=this.columnFactory.addColumnDefaultAndTypes(n,e),this.gos.get("treeData")||w(n.field)&&w(n.valueGetter)&&w(n.filterValueGetter)&&"agGroupColumnFilter"!==n.filter&&(n.filter=!1),i&&i>0&&(n.headerCheckboxSelection=!1);const s=this.gos.isColumnsSortingCoupledToGroup(),r=n.valueGetter||null!=n.field;return s&&!r&&(n.sortIndex=void 0,n.initialSort=void 0),n}createBaseColDef(e){const t=this.gos.get("autoGroupColumnDef"),i={headerName:this.localeService.getLocaleTextFunc()("group","Group")};if(t&&(t.cellRenderer||t.cellRendererSelector)||(i.cellRenderer="agGroupCellRenderer"),e){const t=e.getColDef();Object.assign(i,{headerName:this.columnModel.getDisplayNameForColumn(e,"header"),headerValueGetter:t.headerValueGetter}),t.cellRenderer&&Object.assign(i,{cellRendererParams:{innerRenderer:t.cellRenderer,innerRendererParams:t.cellRendererParams}}),i.showRowGroup=e.getColId()}else i.showRowGroup=!0;return i}};m([pe("columnModel")],ft.prototype,"columnModel",2),m([pe("columnFactory")],ft.prototype,"columnFactory",2),ft=m([ue("autoGroupColService")],ft);var mt={};f(mt,{camelCaseToHumanText:()=>wt,camelCaseToHyphenated:()=>xt,capitalise:()=>bt,escapeString:()=>St,utf8_encode:()=>Ct});var vt=/[&<>"']/g,yt={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"};function Ct(e){const t=String.fromCharCode;function i(e,i){return t(e>>i&63|128)}function n(e){if(e>=0&&e<=31&&10!==e)return`_x${e.toString(16).toUpperCase().padStart(4,"0")}_`;if(!(4294967168&e))return t(e);let n="";return 4294965248&e?4294901760&e?4292870144&e||(n=t(e>>18&7|240),n+=i(e,12),n+=i(e,6)):(function(e){if(e>=55296&&e<=57343)throw Error("Lone surrogate U+"+e.toString(16).toUpperCase()+" is not a scalar value")}(e),n=t(e>>12&15|224),n+=i(e,6)):n=t(e>>6&31|192),n+=t(63&e|128),n}const s=function(e){const t=[];if(!e)return[];const i=e.length;let n,s,r=0;for(;r<i;)n=e.charCodeAt(r++),n>=55296&&n<=56319&&r<i?(s=e.charCodeAt(r++),56320==(64512&s)?t.push(((1023&n)<<10)+(1023&s)+65536):(t.push(n),r--)):t.push(n);return t}(e),r=s.length;let o,a=-1,l="";for(;++a<r;)o=s[a],l+=n(o);return l}function bt(e){return e[0].toUpperCase()+e.substring(1).toLowerCase()}function St(e,t){if(null==e)return null;const i=e.toString().toString();return t?i:i.replace(vt,e=>yt[e])}function wt(e){return e&&null!=e?e.replace(/([a-z])([A-Z])/g,"$1 $2").replace(/([A-Z]+)([A-Z])([a-z])/g,"$1 $2$3").replace(/\./g," ").split(" ").map(e=>e.substring(0,1).toUpperCase()+(e.length>1?e.substring(1,e.length):"")).join(" "):null}function xt(e){return e.replace(/[A-Z]/g,e=>`-${e.toLocaleLowerCase()}`)}var Et={};function Mt(e){const t=new Map;return e.forEach(e=>t.set(e[0],e[1])),t}function At(e,t){const i=new Map;return e.forEach(e=>i.set(t(e),e)),i}function Tt(e){const t=[];return e.forEach((e,i)=>t.push(i)),t}f(Et,{convertToMap:()=>Mt,keys:()=>Tt,mapById:()=>At});var Dt=class extends ot{constructor(){super(...arguments),this.primaryHeaderRowCount=0,this.secondaryHeaderRowCount=0,this.gridHeaderRowCount=0,this.displayedColumnsLeft=[],this.displayedColumnsRight=[],this.displayedColumnsCenter=[],this.displayedColumns=[],this.displayedColumnsAndGroupsMap={},this.viewportColumns=[],this.viewportColumnsHash="",this.headerViewportColumns=[],this.viewportColumnsCenter=[],this.headerViewportColumnsCenter=[],this.viewportRowLeft={},this.viewportRowRight={},this.viewportRowCenter={},this.autoHeightActiveAtLeastOnce=!1,this.rowGroupColumns=[],this.valueColumns=[],this.pivotColumns=[],this.ready=!1,this.changeEventsDispatching=!1,this.autoGroupsNeedBuilding=!1,this.forceRecreateAutoGroups=!1,this.pivotMode=!1,this.bodyWidth=0,this.leftWidth=0,this.rightWidth=0,this.bodyWidthDirty=!0,this.shouldQueueResizeOperations=!1,this.resizeOperationQueue=[]}init(){this.suppressColumnVirtualisation=this.gos.get("suppressColumnVirtualisation");const e=this.gos.get("pivotMode");this.isPivotSettingAllowed(e)&&(this.pivotMode=e),this.addManagedPropertyListeners(["groupDisplayType","treeData","treeDataDisplayType","groupHideOpenParents"],e=>this.buildAutoGroupColumns(It(e.source))),this.addManagedPropertyListener("autoGroupColumnDef",e=>this.onAutoGroupColumnDefChanged(It(e.source))),this.addManagedPropertyListeners(["defaultColDef","columnTypes","suppressFieldDotNotation"],e=>this.onSharedColDefChanged(It(e.source))),this.addManagedPropertyListener("pivotMode",e=>this.setPivotMode(this.gos.get("pivotMode"),It(e.source))),this.addManagedListener(this.eventService,dt.EVENT_FIRST_DATA_RENDERED,()=>this.onFirstDataRendered())}buildAutoGroupColumns(e){this.columnDefs&&(this.autoGroupsNeedBuilding=!0,this.forceRecreateAutoGroups=!0,this.updateGridColumns(),this.updateDisplayedColumns(e))}onAutoGroupColumnDefChanged(e){this.groupAutoColumns&&this.autoGroupColService.updateAutoGroupColumns(this.groupAutoColumns,e)}onSharedColDefChanged(e){this.gridColumns&&(this.groupAutoColumns&&this.autoGroupColService.updateAutoGroupColumns(this.groupAutoColumns,e),this.createColumnsFromColumnDefs(!0,e))}setColumnDefs(e,t){const i=!!this.columnDefs;this.columnDefs=e,this.createColumnsFromColumnDefs(i,t)}recreateColumnDefs(e){this.onSharedColDefChanged(e)}destroyOldColumns(e,t){const i={};if(!e)return;lt(null,e,e=>{i[e.getInstanceId()]=e}),t&&lt(null,t,e=>{i[e.getInstanceId()]=null});const n=Object.values(i).filter(e=>null!=e);this.destroyBeans(n)}destroyColumns(){this.destroyOldColumns(this.primaryColumnTree),this.destroyOldColumns(this.secondaryBalancedTree),this.destroyOldColumns(this.groupAutoColsBalancedTree)}createColumnsFromColumnDefs(e,t){const i=e?this.compareColumnStatesAndDispatchEvents(t):void 0;this.valueCache.expire(),this.autoGroupsNeedBuilding=!0;const n=this.primaryColumns,s=this.primaryColumnTree,r=this.columnFactory.createColumnTree(this.columnDefs,!0,s,t);this.destroyOldColumns(this.primaryColumnTree,r.columnTree),this.primaryColumnTree=r.columnTree,this.primaryHeaderRowCount=r.treeDept+1,this.primaryColumns=this.getColumnsFromTree(this.primaryColumnTree),this.primaryColumnsMap={},this.primaryColumns.forEach(e=>this.primaryColumnsMap[e.getId()]=e),this.extractRowGroupColumns(t,n),this.extractPivotColumns(t,n),this.extractValueColumns(t,n),this.ready=!0;const o=void 0===this.gridColsArePrimary;(this.gridColsArePrimary||o||this.autoGroupsNeedBuilding)&&(this.updateGridColumns(),e&&this.gridColsArePrimary&&!this.gos.get("maintainColumnOrder")&&this.orderGridColumnsLikePrimary(),this.updateDisplayedColumns(t),this.checkViewportColumns()),this.dispatchEverythingChanged(t),this.changeEventsDispatching=!0,i&&i(),this.changeEventsDispatching=!1,this.dispatchNewColumnsLoaded(t)}shouldRowModelIgnoreRefresh(){return this.changeEventsDispatching}dispatchNewColumnsLoaded(e){const t={type:dt.EVENT_NEW_COLUMNS_LOADED,source:e};this.eventService.dispatchEvent(t),"gridInitializing"===e&&this.onColumnsReady()}dispatchEverythingChanged(e){const t={type:dt.EVENT_COLUMN_EVERYTHING_CHANGED,source:e};this.eventService.dispatchEvent(t)}orderGridColumnsLikePrimary(){const e=this.primaryColumns;if(!e)return;const t=e.filter(e=>this.gridColumns.indexOf(e)>=0),i=this.gridColumns.filter(e=>t.indexOf(e)<0);this.gridColumns=[...i,...t],this.gridColumns=this.placeLockedColumns(this.gridColumns)}getAllDisplayedAutoHeightCols(){return this.displayedAutoHeightCols}setViewport(){this.gos.get("enableRtl")?(this.viewportLeft=this.bodyWidth-this.scrollPosition-this.scrollWidth,this.viewportRight=this.bodyWidth-this.scrollPosition):(this.viewportLeft=this.scrollPosition,this.viewportRight=this.scrollWidth+this.scrollPosition)}checkViewportColumns(e=!1){if(null==this.displayedColumnsCenter)return;if(!this.extractViewport())return;const t={type:dt.EVENT_VIRTUAL_COLUMNS_CHANGED,afterScroll:e};this.eventService.dispatchEvent(t)}setViewportPosition(e,t,i=!1){(e!==this.scrollWidth||t!==this.scrollPosition||this.bodyWidthDirty)&&(this.scrollWidth=e,this.scrollPosition=t,this.bodyWidthDirty=!0,this.setViewport(),this.ready&&this.checkViewportColumns(i))}isPivotMode(){return this.pivotMode}isPivotSettingAllowed(e){return!e||!this.gos.get("treeData")||(j("Pivot mode not available with treeData."),!1)}setPivotMode(e,t){if(e===this.pivotMode||!this.isPivotSettingAllowed(this.pivotMode))return;if(this.pivotMode=e,!this.gridColumns)return;this.autoGroupsNeedBuilding=!0,this.updateGridColumns(),this.updateDisplayedColumns(t);const i={type:dt.EVENT_COLUMN_PIVOT_MODE_CHANGED};this.eventService.dispatchEvent(i)}getSecondaryPivotColumn(e,t){if(w(this.secondaryColumns))return null;const i=this.getPrimaryColumn(t);let n=null;return this.secondaryColumns.forEach(t=>{const s=t.getColDef().pivotKeys,r=t.getColDef().pivotValueColumn;ke(s,e)&&r===i&&(n=t)}),n}setBeans(e){this.logger=e.create("columnModel")}setFirstRightAndLastLeftPinned(e){let t,i;this.gos.get("enableRtl")?(t=this.displayedColumnsLeft?this.displayedColumnsLeft[0]:null,i=this.displayedColumnsRight?Le(this.displayedColumnsRight):null):(t=this.displayedColumnsLeft?Le(this.displayedColumnsLeft):null,i=this.displayedColumnsRight?this.displayedColumnsRight[0]:null),this.gridColumns.forEach(n=>{n.setLastLeftPinned(n===t,e),n.setFirstRightPinned(n===i,e)})}autoSizeColumns(e){if(this.shouldQueueResizeOperations)return void this.resizeOperationQueue.push(()=>this.autoSizeColumns(e));const{columns:t,skipHeader:i,skipHeaderGroups:n,stopAtGroup:s,source:r="api"}=e;this.animationFrameService.flushAllFrames();const o=[];let a=-1;const l=null!=i?i:this.gos.get("skipHeaderOnAutoSize"),c=null!=n?n:l;for(;0!==a;)a=0,this.actionOnGridColumns(t,e=>{if(o.indexOf(e)>=0)return!1;const t=this.autoWidthCalculator.getPreferredWidthForColumn(e,l);if(t>0){const i=this.normaliseColumnWidth(e,t);e.setActualWidth(i,r),o.push(e),a++}return!0},r);c||this.autoSizeColumnGroupsByColumns(t,r,s),this.dispatchColumnResizedEvent(o,!0,"autosizeColumns")}dispatchColumnResizedEvent(e,t,i,n=null){if(e&&e.length){const s={type:dt.EVENT_COLUMN_RESIZED,columns:e,column:1===e.length?e[0]:null,flexColumns:n,finished:t,source:i};this.eventService.dispatchEvent(s)}}dispatchColumnChangedEvent(e,t,i){const n={type:e,columns:t,column:t&&1==t.length?t[0]:null,source:i};this.eventService.dispatchEvent(n)}dispatchColumnMovedEvent(e){const{movedColumns:t,source:i,toIndex:n,finished:s}=e,r={type:dt.EVENT_COLUMN_MOVED,columns:t,column:t&&1===t.length?t[0]:null,toIndex:n,finished:s,source:i};this.eventService.dispatchEvent(r)}dispatchColumnPinnedEvent(e,t){if(!e.length)return;const i=1===e.length?e[0]:null,n=this.getCommonValue(e,e=>e.getPinned()),s={type:dt.EVENT_COLUMN_PINNED,pinned:null!=n?n:null,columns:e,column:i,source:t};this.eventService.dispatchEvent(s)}dispatchColumnVisibleEvent(e,t){if(!e.length)return;const i=1===e.length?e[0]:null,n=this.getCommonValue(e,e=>e.isVisible()),s={type:dt.EVENT_COLUMN_VISIBLE,visible:n,columns:e,column:i,source:t};this.eventService.dispatchEvent(s)}autoSizeColumn(e,t,i){e&&this.autoSizeColumns({columns:[e],skipHeader:i,skipHeaderGroups:!0,source:t})}autoSizeColumnGroupsByColumns(e,t,i){const n=new Set;let s;this.getGridColumns(e).forEach(e=>{let t=e.getParent();for(;t&&t!=i;)t.isPadding()||n.add(t),t=t.getParent()});for(const e of n){for(const t of this.ctrlsService.getHeaderRowContainerCtrls())if(s=t.getHeaderCtrlForColumn(e),s)break;s&&s.resizeLeafColumnsToFit(t)}return[]}autoSizeAllColumns(e,t){if(this.shouldQueueResizeOperations)return void this.resizeOperationQueue.push(()=>this.autoSizeAllColumns(e,t));const i=this.getAllDisplayedColumns();this.autoSizeColumns({columns:i,skipHeader:t,source:e})}getColumnsFromTree(e){const t=[],i=e=>{for(let n=0;n<e.length;n++){const s=e[n];s instanceof Ee?t.push(s):s instanceof Ae&&i(s.getChildren())}};return i(e),t}getAllDisplayedTrees(){return this.displayedTreeLeft&&this.displayedTreeRight&&this.displayedTreeCentre?this.displayedTreeLeft.concat(this.displayedTreeCentre).concat(this.displayedTreeRight):null}getPrimaryColumnTree(){return this.primaryColumnTree}getHeaderRowCount(){return this.gridHeaderRowCount}getDisplayedTreeLeft(){return this.displayedTreeLeft}getDisplayedTreeRight(){return this.displayedTreeRight}getDisplayedTreeCentre(){return this.displayedTreeCentre}isColumnDisplayed(e){return this.getAllDisplayedColumns().indexOf(e)>=0}getAllDisplayedColumns(){return this.displayedColumns}getViewportColumns(){return this.viewportColumns}getDisplayedLeftColumnsForRow(e){return this.colSpanActive?this.getDisplayedColumnsForRow(e,this.displayedColumnsLeft):this.displayedColumnsLeft}getDisplayedRightColumnsForRow(e){return this.colSpanActive?this.getDisplayedColumnsForRow(e,this.displayedColumnsRight):this.displayedColumnsRight}isColSpanActive(){return this.colSpanActive}getDisplayedColumnsForRow(e,t,i,n){const s=[];let r=null;for(let o=0;o<t.length;o++){const a=t[o],l=t.length-o,c=Math.min(a.getColSpan(e),l),h=[a];if(c>1){const e=c-1;for(let i=1;i<=e;i++)h.push(t[o+i]);o+=e}let d;i?(d=!1,h.forEach(e=>{i(e)&&(d=!0)})):d=!0,d&&(0===s.length&&r&&n&&n(a)&&s.push(r),s.push(a)),r=a}return s}getViewportCenterColumnsForRow(e){if(!this.colSpanActive)return this.viewportColumnsCenter;const t=this.isColumnVirtualisationSuppressed()?null:this.isColumnInRowViewport.bind(this);return this.getDisplayedColumnsForRow(e,this.displayedColumnsCenter,t,e=>{const t=e.getLeft();return S(t)&&t>this.viewportLeft})}isColumnAtEdge(e,t){const i=this.getAllDisplayedColumns();if(!i.length)return!1;const n="first"===t;let s;if(e instanceof ht){const t=e.getDisplayedLeafColumns();if(!t.length)return!1;s=n?t[0]:Le(t)}else s=e;return(n?i[0]:Le(i))===s}getAriaColumnIndex(e){let t;return t=e instanceof ht?e.getLeafColumns()[0]:e,this.ariaOrderColumns.indexOf(t)+1}isColumnInHeaderViewport(e){return!!e.isAutoHeaderHeight()||this.isColumnInRowViewport(e)}isColumnInRowViewport(e){if(e.isAutoHeight())return!0;const t=e.getLeft()||0,i=t+e.getActualWidth(),n=this.viewportLeft-200,s=this.viewportRight+200;return!(t<n&&i<n||t>s&&i>s)}getDisplayedColumnsLeftWidth(){return this.getWidthOfColsInList(this.displayedColumnsLeft)}getDisplayedColumnsRightWidth(){return this.getWidthOfColsInList(this.displayedColumnsRight)}updatePrimaryColumnList(e,t,i,n,s,r){if(!e||x(e))return;let o=!1;if(e.forEach(e=>{if(!e)return;const s=this.getPrimaryColumn(e);if(s){if(i){if(t.indexOf(s)>=0)return;t.push(s)}else{if(t.indexOf(s)<0)return;Fe(t,s)}n(s),o=!0}}),!o)return;this.autoGroupsNeedBuilding&&this.updateGridColumns(),this.updateDisplayedColumns(r);const a={type:s,columns:t,column:1===t.length?t[0]:null,source:r};this.eventService.dispatchEvent(a)}setRowGroupColumns(e,t){this.autoGroupsNeedBuilding=!0,this.setPrimaryColumnList(e,this.rowGroupColumns,dt.EVENT_COLUMN_ROW_GROUP_CHANGED,!0,this.setRowGroupActive.bind(this),t)}setRowGroupActive(e,t,i){e!==t.isRowGroupActive()&&(t.setRowGroupActive(e,i),e&&!this.gos.get("suppressRowGroupHidesColumns")&&this.setColumnsVisible([t],!1,i),e||this.gos.get("suppressMakeColumnVisibleAfterUnGroup")||this.setColumnsVisible([t],!0,i))}addRowGroupColumns(e,t){this.autoGroupsNeedBuilding=!0,this.updatePrimaryColumnList(e,this.rowGroupColumns,!0,this.setRowGroupActive.bind(this,!0),dt.EVENT_COLUMN_ROW_GROUP_CHANGED,t)}removeRowGroupColumns(e,t){this.autoGroupsNeedBuilding=!0,this.updatePrimaryColumnList(e,this.rowGroupColumns,!1,this.setRowGroupActive.bind(this,!1),dt.EVENT_COLUMN_ROW_GROUP_CHANGED,t)}addPivotColumns(e,t){this.updatePrimaryColumnList(e,this.pivotColumns,!0,e=>e.setPivotActive(!0,t),dt.EVENT_COLUMN_PIVOT_CHANGED,t)}setPivotColumns(e,t){this.setPrimaryColumnList(e,this.pivotColumns,dt.EVENT_COLUMN_PIVOT_CHANGED,!0,(e,i)=>{i.setPivotActive(e,t)},t)}removePivotColumns(e,t){this.updatePrimaryColumnList(e,this.pivotColumns,!1,e=>e.setPivotActive(!1,t),dt.EVENT_COLUMN_PIVOT_CHANGED,t)}setPrimaryColumnList(e,t,i,n,s,r){if(!this.gridColumns)return;const o=new Map;t.forEach((e,t)=>o.set(e,t)),t.length=0,S(e)&&e.forEach(e=>{const i=this.getPrimaryColumn(e);i&&t.push(i)}),t.forEach((e,t)=>{const i=o.get(e);void 0!==i?n&&i!==t||o.delete(e):o.set(e,0)}),(this.primaryColumns||[]).forEach(e=>{const i=t.indexOf(e)>=0;s(i,e)}),this.autoGroupsNeedBuilding&&this.updateGridColumns(),this.updateDisplayedColumns(r),this.dispatchColumnChangedEvent(i,[...o.keys()],r)}setValueColumns(e,t){this.setPrimaryColumnList(e,this.valueColumns,dt.EVENT_COLUMN_VALUE_CHANGED,!1,this.setValueActive.bind(this),t)}setValueActive(e,t,i){if(e!==t.isValueActive()&&(t.setValueActive(e,i),e&&!t.getAggFunc()&&this.aggFuncService)){const e=this.aggFuncService.getDefaultAggFunc(t);t.setAggFunc(e)}}addValueColumns(e,t){this.updatePrimaryColumnList(e,this.valueColumns,!0,this.setValueActive.bind(this,!0),dt.EVENT_COLUMN_VALUE_CHANGED,t)}removeValueColumns(e,t){this.updatePrimaryColumnList(e,this.valueColumns,!1,this.setValueActive.bind(this,!1),dt.EVENT_COLUMN_VALUE_CHANGED,t)}normaliseColumnWidth(e,t){const i=e.getMinWidth();S(i)&&t<i&&(t=i);const n=e.getMaxWidth();return S(n)&&e.isGreaterThanMax(t)&&(t=n),t}getPrimaryOrGridColumn(e){return this.getPrimaryColumn(e)||this.getGridColumn(e)}setColumnWidths(e,t,i,n){const s=[];e.forEach(e=>{const i=this.getPrimaryOrGridColumn(e.key);if(i&&(s.push({width:e.newWidth,ratios:[1],columns:[i]}),"shift"===this.gos.get("colResizeDefault")&&(t=!t),t)){const t=this.getDisplayedColAfter(i);if(!t)return;const n=i.getActualWidth()-e.newWidth,r=t.getActualWidth()+n;s.push({width:r,ratios:[1],columns:[t]})}}),0!==s.length&&this.resizeColumnSets({resizeSets:s,finished:i,source:n})}checkMinAndMaxWidthsForSet(e){const{columns:t,width:i}=e;let n=0,s=0,r=!0;return t.forEach(e=>{const t=e.getMinWidth();n+=t||0;const i=e.getMaxWidth();S(i)&&i>0?s+=i:r=!1}),i>=n&&(!r||i<=s)}resizeColumnSets(e){const{resizeSets:t,finished:i,source:n}=e;if(t&&!t.every(e=>this.checkMinAndMaxWidthsForSet(e))){if(i){const e=t&&t.length>0?t[0].columns:null;this.dispatchColumnResizedEvent(e,i,n)}return}const s=[],r=[];t.forEach(e=>{const{width:t,columns:i,ratios:o}=e,a={},l={};i.forEach(e=>r.push(e));let c=!0,h=0;for(;c;){if(h++,h>1e3){console.error("AG Grid: infinite loop in resizeColumnSets");break}c=!1;const e=[];let n=0,s=t;i.forEach((t,i)=>{if(l[t.getId()])s-=a[t.getId()];else{e.push(t);const s=o[i];n+=s}});const r=1/n;e.forEach((i,n)=>{let h;n===e.length-1?h=s:(h=Math.round(o[n]*t*r),s-=h);const d=i.getMinWidth(),u=i.getMaxWidth();S(d)&&h<d?(h=d,l[i.getId()]=!0,c=!0):S(u)&&u>0&&h>u&&(h=u,l[i.getId()]=!0,c=!0),a[i.getId()]=h})}i.forEach(e=>{const t=a[e.getId()];e.getActualWidth()!==t&&(e.setActualWidth(t,n),s.push(e))})});const o=s.length>0;let a=[];o&&(a=this.refreshFlexedColumns({resizingCols:r,skipSetLeft:!0}),this.setLeftValues(n),this.updateBodyWidths(),this.checkViewportColumns());const l=r.concat(a);(o||i)&&this.dispatchColumnResizedEvent(l,i,n,a)}setColumnAggFunc(e,t,i){if(!e)return;const n=this.getPrimaryColumn(e);n&&(n.setAggFunc(t),this.dispatchColumnChangedEvent(dt.EVENT_COLUMN_VALUE_CHANGED,[n],i))}moveRowGroupColumn(e,t,i){if(this.isRowGroupEmpty())return;const n=this.rowGroupColumns[e],s=this.rowGroupColumns.slice(e,t);this.rowGroupColumns.splice(e,1),this.rowGroupColumns.splice(t,0,n);const r={type:dt.EVENT_COLUMN_ROW_GROUP_CHANGED,columns:s,column:1===s.length?s[0]:null,source:i};this.eventService.dispatchEvent(r)}moveColumns(e,t,i,n=!0){if(!this.gridColumns)return;if(this.columnAnimationService.start(),t>this.gridColumns.length-e.length)return console.warn("AG Grid: tried to insert columns in invalid location, toIndex = "+t),void console.warn("AG Grid: remember that you should not count the moving columns when calculating the new index");const s=this.getGridColumns(e);!this.doesMovePassRules(s,t)||(ze(this.gridColumns,s,t),this.updateDisplayedColumns(i),this.dispatchColumnMovedEvent({movedColumns:s,source:i,toIndex:t,finished:n}),this.columnAnimationService.finish())}doesMovePassRules(e,t){const i=this.getProposedColumnOrder(e,t);return this.doesOrderPassRules(i)}doesOrderPassRules(e){return!!this.doesMovePassMarryChildren(e)&&!!this.doesMovePassLockedPositions(e)}getProposedColumnOrder(e,t){const i=this.gridColumns.slice();return ze(i,e,t),i}sortColumnsLikeGridColumns(e){!e||e.length<=1||e.filter(e=>this.gridColumns.indexOf(e)<0).length>0||e.sort((e,t)=>this.gridColumns.indexOf(e)-this.gridColumns.indexOf(t))}doesMovePassLockedPositions(e){let t=0,i=!0;return e.forEach(e=>{const n=(s=e.getColDef().lockPosition)?!0===s||"left"===s?0:2:1;var s;n<t&&(i=!1),t=n}),i}doesMovePassMarryChildren(e){let t=!0;return lt(null,this.gridBalancedTree,i=>{if(!(i instanceof Ae))return;const n=i,s=n.getColGroupDef();if(!s||!s.marryChildren)return;const r=[];n.getLeafColumns().forEach(t=>{const i=e.indexOf(t);r.push(i)}),Math.max.apply(Math,r)-Math.min.apply(Math,r)>n.getLeafColumns().length-1&&(t=!1)}),t}moveColumnByIndex(e,t,i){if(!this.gridColumns)return;const n=this.gridColumns[e];this.moveColumns([n],t,i)}getColumnDefs(){if(!this.primaryColumns)return;const e=this.primaryColumns.slice();return this.gridColsArePrimary?e.sort((e,t)=>this.gridColumns.indexOf(e)-this.gridColumns.indexOf(t)):this.lastPrimaryOrder&&e.sort((e,t)=>this.lastPrimaryOrder.indexOf(e)-this.lastPrimaryOrder.indexOf(t)),this.columnDefFactory.buildColumnDefs(e,this.rowGroupColumns,this.pivotColumns)}getBodyContainerWidth(){return this.bodyWidth}getContainerWidth(e){switch(e){case"left":return this.leftWidth;case"right":return this.rightWidth;default:return this.bodyWidth}}updateBodyWidths(){const e=this.getWidthOfColsInList(this.displayedColumnsCenter),t=this.getWidthOfColsInList(this.displayedColumnsLeft),i=this.getWidthOfColsInList(this.displayedColumnsRight);if(this.bodyWidthDirty=this.bodyWidth!==e,this.bodyWidth!==e||this.leftWidth!==t||this.rightWidth!==i){this.bodyWidth=e,this.leftWidth=t,this.rightWidth=i;const n={type:dt.EVENT_COLUMN_CONTAINER_WIDTH_CHANGED};this.eventService.dispatchEvent(n);const s={type:dt.EVENT_DISPLAYED_COLUMNS_WIDTH_CHANGED};this.eventService.dispatchEvent(s)}}getValueColumns(){return this.valueColumns?this.valueColumns:[]}getPivotColumns(){return this.pivotColumns?this.pivotColumns:[]}isPivotActive(){return this.pivotColumns&&this.pivotColumns.length>0&&this.pivotMode}getRowGroupColumns(){return this.rowGroupColumns?this.rowGroupColumns:[]}getDisplayedCenterColumns(){return this.displayedColumnsCenter}getDisplayedLeftColumns(){return this.displayedColumnsLeft}getDisplayedRightColumns(){return this.displayedColumnsRight}getAllPrimaryColumns(){return this.primaryColumns?this.primaryColumns:null}getSecondaryColumns(){return this.secondaryColumns?this.secondaryColumns:null}getAllColumnsForQuickFilter(){return this.columnsForQuickFilter}getAllGridColumns(){var e;return null!=(e=this.gridColumns)?e:[]}isRowGroupEmpty(){return x(this.rowGroupColumns)}setColumnsVisible(e,t=!1,i){this.applyColumnState({state:e.map(e=>({colId:"string"==typeof e?e:e.getColId(),hide:!t}))},i)}setColumnsPinned(e,t,i){if(!this.gridColumns)return;if(this.gos.isDomLayout("print"))return void console.warn("AG Grid: Changing the column pinning status is not allowed with domLayout='print'");let n;this.columnAnimationService.start(),n=!0===t||"left"===t?"left":"right"===t?"right":null,this.actionOnGridColumns(e,e=>e.getPinned()!==n&&(e.setPinned(n),!0),i,()=>({type:dt.EVENT_COLUMN_PINNED,pinned:n,column:null,columns:null,source:i})),this.columnAnimationService.finish()}actionOnGridColumns(e,t,i,n){if(x(e))return;const s=[];if(e.forEach(e=>{if(!e)return;const i=this.getGridColumn(e);i&&!1!==t(i)&&s.push(i)}),s.length&&(this.updateDisplayedColumns(i),S(n)&&n)){const e=n();e.columns=s,e.column=1===s.length?s[0]:null,this.eventService.dispatchEvent(e)}}getDisplayedColBefore(e){const t=this.getAllDisplayedColumns(),i=t.indexOf(e);return i>0?t[i-1]:null}getDisplayedColAfter(e){const t=this.getAllDisplayedColumns(),i=t.indexOf(e);return i<t.length-1?t[i+1]:null}getDisplayedGroupAtDirection(e,t){const i=e.getProvidedColumnGroup().getLevel()+e.getPaddingLevel(),n=e.getDisplayedLeafColumns(),s="After"===t?Le(n):n[0],r=`getDisplayedCol${t}`;for(;;){const t=this[r](s);if(!t)return null;const n=this.getColumnGroupAtLevel(t,i);if(n!==e)return n}}getColumnGroupAtLevel(e,t){let i,n,s=e.getParent();for(;i=s.getProvidedColumnGroup().getLevel(),n=s.getPaddingLevel(),!(i+n<=t);)s=s.getParent();return s}isPinningLeft(){return this.displayedColumnsLeft.length>0}isPinningRight(){return this.displayedColumnsRight.length>0}getPrimaryAndSecondaryAndAutoColumns(){return[].concat(this.primaryColumns||[],this.groupAutoColumns||[],this.secondaryColumns||[])}createStateItemFromColumn(e){const t=e.isRowGroupActive()?this.rowGroupColumns.indexOf(e):null,i=e.isPivotActive()?this.pivotColumns.indexOf(e):null,n=e.isValueActive()?e.getAggFunc():null,s=null!=e.getSort()?e.getSort():null,r=null!=e.getSortIndex()?e.getSortIndex():null,o=null!=e.getFlex()&&e.getFlex()>0?e.getFlex():null;return{colId:e.getColId(),width:e.getActualWidth(),hide:!e.isVisible(),pinned:e.getPinned(),sort:s,sortIndex:r,aggFunc:n,rowGroup:e.isRowGroupActive(),rowGroupIndex:t,pivot:e.isPivotActive(),pivotIndex:i,flex:o}}getColumnState(){if(w(this.primaryColumns)||!this.isAlive())return[];const e=this.getPrimaryAndSecondaryAndAutoColumns().map(this.createStateItemFromColumn.bind(this));return this.orderColumnStateList(e),e}orderColumnStateList(e){const t=Mt(this.gridColumns.map((e,t)=>[e.getColId(),t]));e.sort((e,i)=>(t.has(e.colId)?t.get(e.colId):-1)-(t.has(i.colId)?t.get(i.colId):-1))}resetColumnState(e){if(x(this.primaryColumns))return;const t=this.getColumnsFromTree(this.primaryColumnTree),i=[];let n=1e3,s=1e3,r=[];this.groupAutoColumns&&(r=r.concat(this.groupAutoColumns)),t&&(r=r.concat(t)),r.forEach(e=>{const t=this.getColumnStateFromColDef(e);w(t.rowGroupIndex)&&t.rowGroup&&(t.rowGroupIndex=n++),w(t.pivotIndex)&&t.pivot&&(t.pivotIndex=s++),i.push(t)}),this.applyColumnState({state:i,applyOrder:!0},e)}getColumnStateFromColDef(e){const t=(e,t)=>null!=e?e:null!=t?t:null,i=e.getColDef(),n=t(i.sort,i.initialSort),s=t(i.sortIndex,i.initialSortIndex),r=t(i.hide,i.initialHide),o=t(i.pinned,i.initialPinned),a=t(i.width,i.initialWidth),l=t(i.flex,i.initialFlex);let c=t(i.rowGroupIndex,i.initialRowGroupIndex),h=t(i.rowGroup,i.initialRowGroup);null!=c||null!=h&&0!=h||(c=null,h=null);let d=t(i.pivotIndex,i.initialPivotIndex),u=t(i.pivot,i.initialPivot);null!=d||null!=u&&0!=u||(d=null,u=null);const p=t(i.aggFunc,i.initialAggFunc);return{colId:e.getColId(),sort:n,sortIndex:s,hide:r,pinned:o,width:a,flex:l,rowGroup:h,rowGroupIndex:c,pivot:u,pivotIndex:d,aggFunc:p}}applyColumnState(e,t){if(x(this.primaryColumns))return!1;if(e&&e.state&&!e.state.forEach)return console.warn("AG Grid: applyColumnState() - the state attribute should be an array, however an array was not found. Please provide an array of items (one for each col you want to change) for state."),!1;const i=(i,n,s)=>{const r=this.compareColumnStatesAndDispatchEvents(t);this.autoGroupsNeedBuilding=!0;const o=n.slice(),a={},l={},c=[],h=[];let d=0;const u=this.rowGroupColumns.slice(),p=this.pivotColumns.slice();i.forEach(i=>{const n=i.colId||"";if(n.startsWith(gt))return c.push(i),void h.push(i);const r=s(n);r?(this.syncColumnWithStateItem(r,i,e.defaultState,a,l,!1,t),Fe(o,r)):(h.push(i),d+=1)});const g=i=>this.syncColumnWithStateItem(i,null,e.defaultState,a,l,!1,t);o.forEach(g);const f=(e,t,i,n)=>{const s=e[i.getId()],r=e[n.getId()],o=null!=s,a=null!=r;if(o&&a)return s-r;if(o)return-1;if(a)return 1;const l=t.indexOf(i),c=t.indexOf(n),h=l>=0;return h&&c>=0?l-c:h?-1:1};this.rowGroupColumns.sort(f.bind(this,a,u)),this.pivotColumns.sort(f.bind(this,l,p)),this.updateGridColumns();const m=this.groupAutoColumns?this.groupAutoColumns.slice():[];return c.forEach(i=>{const n=this.getAutoColumn(i.colId);Fe(m,n),this.syncColumnWithStateItem(n,i,e.defaultState,null,null,!0,t)}),m.forEach(g),this.applyOrderAfterApplyState(e),this.updateDisplayedColumns(t),this.dispatchEverythingChanged(t),r(),{unmatchedAndAutoStates:h,unmatchedCount:d}};this.columnAnimationService.start();let{unmatchedAndAutoStates:n,unmatchedCount:s}=i(e.state||[],this.primaryColumns||[],e=>this.getPrimaryColumn(e));return(n.length>0||S(e.defaultState))&&(s=i(n,this.secondaryColumns||[],e=>this.getSecondaryColumn(e)).unmatchedCount),this.columnAnimationService.finish(),0===s}applyOrderAfterApplyState(e){if(!e.applyOrder||!e.state)return;let t=[];const i={};e.state.forEach(e=>{if(!e.colId||i[e.colId])return;const n=this.gridColumnsMap[e.colId];n&&(t.push(n),i[e.colId]=!0)});let n=0;this.gridColumns.forEach(e=>{const s=e.getColId();null==i[s]&&(s.startsWith(gt)?Be(t,e,n++):t.push(e))}),t=this.placeLockedColumns(t),this.doesMovePassMarryChildren(t)?this.gridColumns=t:console.warn("AG Grid: Applying column order broke a group where columns should be married together. Applying new order has been discarded.")}compareColumnStatesAndDispatchEvents(e){const t={rowGroupColumns:this.rowGroupColumns.slice(),pivotColumns:this.pivotColumns.slice(),valueColumns:this.valueColumns.slice()},i=this.getColumnState(),n={};return i.forEach(e=>{n[e.colId]=e}),()=>{const s=this.getPrimaryAndSecondaryAndAutoColumns(),r=(t,i,n,s)=>{if(ke(i.map(s),n.map(s)))return;const r=new Set(i);n.forEach(e=>{r.delete(e)||r.add(e)});const o=[...r],a={type:t,columns:o,column:1===o.length?o[0]:null,source:e};this.eventService.dispatchEvent(a)},o=e=>{const t=[];return s.forEach(i=>{const s=n[i.getColId()];s&&e(s,i)&&t.push(i)}),t},a=e=>e.getColId();r(dt.EVENT_COLUMN_ROW_GROUP_CHANGED,t.rowGroupColumns,this.rowGroupColumns,a),r(dt.EVENT_COLUMN_PIVOT_CHANGED,t.pivotColumns,this.pivotColumns,a);const l=o((e,t)=>{const i=null!=e.aggFunc,n=i!=t.isValueActive(),s=i&&e.aggFunc!=t.getAggFunc();return n||s});l.length>0&&this.dispatchColumnChangedEvent(dt.EVENT_COLUMN_VALUE_CHANGED,l,e),this.dispatchColumnResizedEvent(o((e,t)=>e.width!=t.getActualWidth()),!0,e),this.dispatchColumnPinnedEvent(o((e,t)=>e.pinned!=t.getPinned()),e),this.dispatchColumnVisibleEvent(o((e,t)=>e.hide==t.isVisible()),e);const c=o((e,t)=>e.sort!=t.getSort()||e.sortIndex!=t.getSortIndex());c.length>0&&this.sortController.dispatchSortChangedEvents(e,c),this.normaliseColumnMovedEventForColumnState(i,e)}}getCommonValue(e,t){if(!e||0==e.length)return;const i=t(e[0]);for(let n=1;n<e.length;n++)if(i!==t(e[n]))return;return i}normaliseColumnMovedEventForColumnState(e,t){const i=this.getColumnState(),n={};i.forEach(e=>n[e.colId]=e);const s={};e.forEach(e=>{n[e.colId]&&(s[e.colId]=!0)});const r=e.filter(e=>s[e.colId]),o=i.filter(e=>s[e.colId]),a=[];o.forEach((e,t)=>{const i=r&&r[t];if(i&&i.colId!==e.colId){const e=this.getGridColumn(i.colId);e&&a.push(e)}}),a.length&&this.dispatchColumnMovedEvent({movedColumns:a,source:t,finished:!0})}syncColumnWithStateItem(e,t,i,n,s,r,o){var a;if(!e)return;const l=(e,n)=>{const s={value1:void 0,value2:void 0};let r=!1;return t&&(void 0!==t[e]&&(s.value1=t[e],r=!0),S(n)&&void 0!==t[n]&&(s.value2=t[n],r=!0)),!r&&i&&(void 0!==i[e]&&(s.value1=i[e]),S(n)&&void 0!==i[n]&&(s.value2=i[n])),s},c=l("hide").value1;void 0!==c&&e.setVisible(!c,o);const h=l("pinned").value1;void 0!==h&&e.setPinned(h);const d=null!=(a=e.getColDef().minWidth)?a:this.environment.getMinColWidth(),u=l("flex").value1;if(void 0!==u&&e.setFlex(u),null==u){const t=l("width").value1;null!=t&&null!=d&&t>=d&&e.setActualWidth(t,o)}const p=l("sort").value1;void 0!==p&&("desc"===p||"asc"===p?e.setSort(p,o):e.setSort(void 0,o));const g=l("sortIndex").value1;if(void 0!==g&&e.setSortIndex(g),r||!e.isPrimary())return;const f=l("aggFunc").value1;void 0!==f&&("string"==typeof f?(e.setAggFunc(f),e.isValueActive()||(e.setValueActive(!0,o),this.valueColumns.push(e))):(S(f)&&console.warn("AG Grid: stateItem.aggFunc must be a string. if using your own aggregation functions, register the functions first before using them in get/set state. This is because it is intended for the column state to be stored and retrieved as simple JSON."),e.isValueActive()&&(e.setValueActive(!1,o),Fe(this.valueColumns,e))));const{value1:m,value2:v}=l("rowGroup","rowGroupIndex");void 0===m&&void 0===v||("number"==typeof v||m?(e.isRowGroupActive()||(e.setRowGroupActive(!0,o),this.rowGroupColumns.push(e)),n&&"number"==typeof v&&(n[e.getId()]=v)):e.isRowGroupActive()&&(e.setRowGroupActive(!1,o),Fe(this.rowGroupColumns,e)));const{value1:y,value2:C}=l("pivot","pivotIndex");void 0===y&&void 0===C||("number"==typeof C||y?(e.isPivotActive()||(e.setPivotActive(!0,o),this.pivotColumns.push(e)),s&&"number"==typeof C&&(s[e.getId()]=C)):e.isPivotActive()&&(e.setPivotActive(!1,o),Fe(this.pivotColumns,e)))}getGridColumns(e){return this.getColumns(e,this.getGridColumn.bind(this))}getColumns(e,t){const i=[];return e&&e.forEach(e=>{const n=t(e);n&&i.push(n)}),i}getColumnWithValidation(e){if(null==e)return null;const t=this.getGridColumn(e);return t||console.warn("AG Grid: could not find column "+e),t}getPrimaryColumn(e){return this.primaryColumns?this.getColumn(e,this.primaryColumns,this.primaryColumnsMap):null}getGridColumn(e){return this.getColumn(e,this.gridColumns,this.gridColumnsMap)}lookupGridColumn(e){return this.gridColumnsMap[e]}getSecondaryColumn(e){return this.secondaryColumns?this.getColumn(e,this.secondaryColumns,this.secondaryColumnsMap):null}getColumn(e,t,i){if(!e||!i)return null;if("string"==typeof e&&i[e])return i[e];for(let i=0;i<t.length;i++)if(this.columnsMatch(t[i],e))return t[i];return this.getAutoColumn(e)}getSourceColumnsForGroupColumn(e){const t=e.getColDef().showRowGroup;if(!t)return null;if(!0===t)return this.rowGroupColumns.slice(0);const i=this.getPrimaryColumn(t);return i?[i]:null}getAutoColumn(e){return this.groupAutoColumns&&S(this.groupAutoColumns)&&!w(this.groupAutoColumns)&&this.groupAutoColumns.find(t=>this.columnsMatch(t,e))||null}columnsMatch(e,t){const i=e===t,n=e.getColDef()===t,s=e.getColId()==t;return i||n||s}getDisplayNameForColumn(e,t,i=!1){if(!e)return null;const n=this.getHeaderName(e.getColDef(),e,null,null,t);return i?this.wrapHeaderNameWithAggFunc(e,n):n}getDisplayNameForProvidedColumnGroup(e,t,i){const n=t?t.getColGroupDef():null;return n?this.getHeaderName(n,null,e,t,i):null}getDisplayNameForColumnGroup(e,t){return this.getDisplayNameForProvidedColumnGroup(e,e.getProvidedColumnGroup(),t)}getHeaderName(e,t,i,n,s){const r=e.headerValueGetter;if(r){const o=this.gos.addGridCommonParams({colDef:e,column:t,columnGroup:i,providedColumnGroup:n,location:s});return"function"==typeof r?r(o):"string"==typeof r?this.expressionService.evaluate(r,o):(console.warn("AG Grid: headerValueGetter must be a function or a string"),"")}return null!=e.headerName?e.headerName:e.field?wt(e.field):""}wrapHeaderNameWithAggFunc(e,t){if(this.gos.get("suppressAggFuncInHeader"))return t;const i=e.getColDef().pivotValueColumn;let n,s=null;if(S(i)){const r=this.gos.get("removePivotHeaderRowWhenSingleValueColumn")&&1===this.valueColumns.length,o=void 0!==e.getColDef().pivotTotalColumnIds;if(r&&!o)return t;s=i?i.getAggFunc():null,n=!0}else{const t=e.isValueActive(),i=this.pivotMode||!this.isRowGroupEmpty();t&&i?(s=e.getAggFunc(),n=!0):n=!1}if(n){const e="string"==typeof s?s:"func";return`${this.localeService.getLocaleTextFunc()(e,e)}(${t})`}return t}getColumnGroup(e,t){if(!e)return null;if(e instanceof ht)return e;const i=this.getAllDisplayedTrees(),n="number"==typeof t;let s=null;return Rt(i,!1,i=>{if(i instanceof ht){const r=i;let o;o=n?e===r.getGroupId()&&t===r.getPartId():e===r.getGroupId(),o&&(s=r)}}),s}isReady(){return this.ready}extractValueColumns(e,t){this.valueColumns=this.extractColumns(t,this.valueColumns,(t,i)=>t.setValueActive(i,e),()=>{},()=>{},e=>{const t=e.aggFunc;return null===t||""===t?null:void 0!==t?!!t:void 0},e=>null!=e.initialAggFunc&&""!=e.initialAggFunc),this.valueColumns.forEach(e=>{const t=e.getColDef();null!=t.aggFunc&&""!=t.aggFunc?e.setAggFunc(t.aggFunc):e.getAggFunc()||e.setAggFunc(t.initialAggFunc)})}extractRowGroupColumns(e,t){this.rowGroupColumns=this.extractColumns(t,this.rowGroupColumns,(t,i)=>t.setRowGroupActive(i,e),e=>e.rowGroupIndex,e=>e.initialRowGroupIndex,e=>e.rowGroup,e=>e.initialRowGroup)}extractColumns(e=[],t=[],i,n,s,r,o){const a=[],l=[];(this.primaryColumns||[]).forEach(i=>{const c=e.indexOf(i)<0,h=i.getColDef(),d=A(r(h)),u=A(o(h)),p=M(n(h)),g=M(s(h));let f;f=void 0!==d?d:void 0!==p?null!==p&&p>=0:c?void 0!==u?u:!(void 0===g)&&null!=g&&g>=0:t.indexOf(i)>=0,f&&((c?null!=p||null!=g:null!=p)?a.push(i):l.push(i))});const c=e=>{const t=n(e.getColDef()),i=s(e.getColDef());return null!=t?t:i};a.sort((e,t)=>{const i=c(e),n=c(t);return i===n?0:i<n?-1:1});const h=[].concat(a);return t.forEach(e=>{l.indexOf(e)>=0&&h.push(e)}),l.forEach(e=>{h.indexOf(e)<0&&h.push(e)}),t.forEach(e=>{h.indexOf(e)<0&&i(e,!1)}),h.forEach(e=>{t.indexOf(e)<0&&i(e,!0)}),h}extractPivotColumns(e,t){this.pivotColumns=this.extractColumns(t,this.pivotColumns,(t,i)=>t.setPivotActive(i,e),e=>e.pivotIndex,e=>e.initialPivotIndex,e=>e.pivot,e=>e.initialPivot)}resetColumnGroupState(e){if(!this.primaryColumnTree)return;const t=[];lt(null,this.primaryColumnTree,e=>{if(e instanceof Ae){const i=e.getColGroupDef(),n={groupId:e.getGroupId(),open:i?i.openByDefault:void 0};t.push(n)}}),this.setColumnGroupState(t,e)}getColumnGroupState(){const e=[];return lt(null,this.gridBalancedTree,t=>{t instanceof Ae&&e.push({groupId:t.getGroupId(),open:t.isExpanded()})}),e}setColumnGroupState(e,t){if(!this.gridBalancedTree)return;this.columnAnimationService.start();const i=[];if(e.forEach(e=>{const t=e.groupId,n=e.open,s=this.getProvidedColumnGroup(t);s&&s.isExpanded()!==n&&(this.logger.log("columnGroupOpened("+s.getGroupId()+","+n+")"),s.setExpanded(n),i.push(s))}),this.updateGroupsAndDisplayedColumns(t),this.setFirstRightAndLastLeftPinned(t),i.length){const e={type:dt.EVENT_COLUMN_GROUP_OPENED,columnGroup:1===Ae.length?i[0]:void 0,columnGroups:i};this.eventService.dispatchEvent(e)}this.columnAnimationService.finish()}setColumnGroupOpened(e,t,i){let n;n=e instanceof Ae?e.getId():e||"",this.setColumnGroupState([{groupId:n,open:t}],i)}getProvidedColumnGroup(e){"string"!=typeof e&&console.error("AG Grid: group key must be a string");let t=null;return lt(null,this.gridBalancedTree,i=>{i instanceof Ae&&i.getId()===e&&(t=i)}),t}calculateColumnsForDisplay(){let e;return e=this.pivotMode&&w(this.secondaryColumns)?this.gridColumns.filter(e=>{const t=this.groupAutoColumns&&Ue(this.groupAutoColumns,e),i=this.valueColumns&&Ue(this.valueColumns,e);return t||i}):this.gridColumns.filter(e=>this.groupAutoColumns&&Ue(this.groupAutoColumns,e)||e.isVisible()),e}checkColSpanActiveInCols(e){let t=!1;return e.forEach(e=>{S(e.getColDef().colSpan)&&(t=!0)}),t}calculateColumnsForGroupDisplay(){this.groupDisplayColumns=[],this.groupDisplayColumnsMap={},this.gridColumns.forEach(e=>{const t=e.getColDef(),i=t.showRowGroup;t&&S(i)&&(this.groupDisplayColumns.push(e),"string"==typeof i?this.groupDisplayColumnsMap[i]=e:!0===i&&this.getRowGroupColumns().forEach(t=>{this.groupDisplayColumnsMap[t.getId()]=e}))})}getGroupDisplayColumns(){return this.groupDisplayColumns}getGroupDisplayColumnForGroup(e){return this.groupDisplayColumnsMap[e]}updateDisplayedColumns(e){const t=this.calculateColumnsForDisplay();this.buildDisplayedTrees(t),this.updateGroupsAndDisplayedColumns(e),this.setFirstRightAndLastLeftPinned(e)}isSecondaryColumnsPresent(){return S(this.secondaryColumns)}setSecondaryColumns(e,t){if(!this.gridColumns)return;const i=e;if(i||!w(this.secondaryColumns)){if(i){this.processSecondaryColumnDefinitions(e);const i=this.columnFactory.createColumnTree(e,!1,this.secondaryBalancedTree||this.previousSecondaryColumns||void 0,t);this.destroyOldColumns(this.secondaryBalancedTree,i.columnTree),this.secondaryBalancedTree=i.columnTree,this.secondaryHeaderRowCount=i.treeDept+1,this.secondaryColumns=this.getColumnsFromTree(this.secondaryBalancedTree),this.secondaryColumnsMap={},this.secondaryColumns.forEach(e=>this.secondaryColumnsMap[e.getId()]=e),this.previousSecondaryColumns=null}else this.previousSecondaryColumns=this.secondaryBalancedTree,this.secondaryBalancedTree=null,this.secondaryHeaderRowCount=-1,this.secondaryColumns=null,this.secondaryColumnsMap={};this.updateGridColumns(),this.updateDisplayedColumns(t)}}processSecondaryColumnDefinitions(e){const t=this.gos.get("processPivotResultColDef"),i=this.gos.get("processPivotResultColGroupDef");if(!t&&!i)return;const n=e=>{e.forEach(e=>{if(S(e.children)){const t=e;i&&i(t),n(t.children)}else t&&t(e)})};e&&n(e)}updateGridColumns(){const e=this.gridBalancedTree;if(this.gridColsArePrimary?this.lastPrimaryOrder=this.gridColumns:this.lastSecondaryOrder=this.gridColumns,this.createGroupAutoColumnsIfNeeded()){const e=Mt(this.groupAutoColumns.map(e=>[e,!0]));this.lastPrimaryOrder&&(this.lastPrimaryOrder=this.lastPrimaryOrder.filter(t=>!e.has(t)),this.lastPrimaryOrder=[...this.groupAutoColumns,...this.lastPrimaryOrder]),this.lastSecondaryOrder&&(this.lastSecondaryOrder=this.lastSecondaryOrder.filter(t=>!e.has(t)),this.lastSecondaryOrder=[...this.groupAutoColumns,...this.lastSecondaryOrder])}let t;if(this.secondaryColumns&&this.secondaryBalancedTree){const e=this.secondaryColumns.some(e=>void 0!==this.gridColumnsMap[e.getColId()]);this.gridBalancedTree=this.secondaryBalancedTree.slice(),this.gridHeaderRowCount=this.secondaryHeaderRowCount,this.gridColumns=this.secondaryColumns.slice(),this.gridColsArePrimary=!1,e&&(t=this.lastSecondaryOrder)}else this.primaryColumns&&(this.gridBalancedTree=this.primaryColumnTree.slice(),this.gridHeaderRowCount=this.primaryHeaderRowCount,this.gridColumns=this.primaryColumns.slice(),this.gridColsArePrimary=!0,t=this.lastPrimaryOrder);if(this.addAutoGroupToGridColumns(),this.orderGridColsLike(t),this.gridColumns=this.placeLockedColumns(this.gridColumns),this.calculateColumnsForGroupDisplay(),this.refreshQuickFilterColumns(),this.clearDisplayedAndViewportColumns(),this.colSpanActive=this.checkColSpanActiveInCols(this.gridColumns),this.gridColumnsMap={},this.gridColumns.forEach(e=>this.gridColumnsMap[e.getId()]=e),this.setAutoHeightActive(),!ke(e,this.gridBalancedTree)){const e={type:dt.EVENT_GRID_COLUMNS_CHANGED};this.eventService.dispatchEvent(e)}}setAutoHeightActive(){this.autoHeightActive=this.gridColumns.filter(e=>e.isAutoHeight()).length>0,this.autoHeightActive&&(this.autoHeightActiveAtLeastOnce=!0,this.gos.isRowModelType("clientSide")||this.gos.isRowModelType("serverSide")||j("autoHeight columns only work with Client Side Row Model and Server Side Row Model."))}orderGridColsLike(e){if(w(e))return;const t=Mt(e.map((e,t)=>[e,t]));let i=!0;if(this.gridColumns.forEach(e=>{t.has(e)&&(i=!1)}),i)return;const n=Mt(this.gridColumns.map(e=>[e,!0])),s=e.filter(e=>n.has(e)),r=Mt(s.map(e=>[e,!0])),o=this.gridColumns.filter(e=>!r.has(e)),a=s.slice();o.forEach(e=>{let t=e.getOriginalParent();if(!t)return void a.push(e);const i=[];for(;!i.length&&t;)t.getLeafColumns().forEach(e=>{const t=a.indexOf(e)>=0,n=i.indexOf(e)<0;t&&n&&i.push(e)}),t=t.getOriginalParent();if(!i.length)return void a.push(e);const n=i.map(e=>a.indexOf(e)),s=Math.max(...n);Be(a,e,s+1)}),this.gridColumns=a}isPrimaryColumnGroupsPresent(){return this.primaryHeaderRowCount>1}refreshQuickFilterColumns(){var e;let t=null!=(e=this.isPivotMode()&&!this.gos.get("applyQuickFilterBeforePivotOrAgg")?this.secondaryColumns:this.primaryColumns)?e:[];this.groupAutoColumns&&(t=t.concat(this.groupAutoColumns)),this.columnsForQuickFilter=this.gos.get("includeHiddenColumnsInQuickFilter")?t:t.filter(e=>e.isVisible()||e.isRowGroupActive())}placeLockedColumns(e){const t=[],i=[],n=[];return e.forEach(e=>{const s=e.getColDef().lockPosition;"right"===s?n.push(e):"left"===s||!0===s?t.push(e):i.push(e)}),[...t,...i,...n]}addAutoGroupToGridColumns(){if(w(this.groupAutoColumns))return this.destroyOldColumns(this.groupAutoColsBalancedTree),void(this.groupAutoColsBalancedTree=null);this.gridColumns=this.groupAutoColumns?this.groupAutoColumns.concat(this.gridColumns):this.gridColumns;const e=this.columnFactory.createForAutoGroups(this.groupAutoColumns,this.gridBalancedTree);this.destroyOldColumns(this.groupAutoColsBalancedTree,e),this.groupAutoColsBalancedTree=e,this.gridBalancedTree=e.concat(this.gridBalancedTree)}clearDisplayedAndViewportColumns(){this.viewportRowLeft={},this.viewportRowRight={},this.viewportRowCenter={},this.displayedColumnsLeft=[],this.displayedColumnsRight=[],this.displayedColumnsCenter=[],this.displayedColumns=[],this.ariaOrderColumns=[],this.viewportColumns=[],this.headerViewportColumns=[],this.viewportColumnsHash=""}updateGroupsAndDisplayedColumns(e){this.updateOpenClosedVisibilityInColumnGroups(),this.deriveDisplayedColumns(e),this.refreshFlexedColumns(),this.extractViewport(),this.updateBodyWidths();const t={type:dt.EVENT_DISPLAYED_COLUMNS_CHANGED};this.eventService.dispatchEvent(t)}deriveDisplayedColumns(e){this.derivedDisplayedColumnsFromDisplayedTree(this.displayedTreeLeft,this.displayedColumnsLeft),this.derivedDisplayedColumnsFromDisplayedTree(this.displayedTreeCentre,this.displayedColumnsCenter),this.derivedDisplayedColumnsFromDisplayedTree(this.displayedTreeRight,this.displayedColumnsRight),this.joinColumnsAriaOrder(),this.joinDisplayedColumns(),this.setLeftValues(e),this.displayedAutoHeightCols=this.displayedColumns.filter(e=>e.isAutoHeight())}isAutoRowHeightActive(){return this.autoHeightActive}wasAutoRowHeightEverActive(){return this.autoHeightActiveAtLeastOnce}joinColumnsAriaOrder(){const e=this.getAllGridColumns(),t=[],i=[],n=[];for(const s of e){const e=s.getPinned();e?!0===e||"left"===e?t.push(s):n.push(s):i.push(s)}this.ariaOrderColumns=t.concat(i).concat(n)}joinDisplayedColumns(){this.gos.get("enableRtl")?this.displayedColumns=this.displayedColumnsRight.concat(this.displayedColumnsCenter).concat(this.displayedColumnsLeft):this.displayedColumns=this.displayedColumnsLeft.concat(this.displayedColumnsCenter).concat(this.displayedColumnsRight)}setLeftValues(e){this.setLeftValuesOfColumns(e),this.setLeftValuesOfGroups()}setLeftValuesOfColumns(e){if(!this.primaryColumns)return;const t=this.getPrimaryAndSecondaryAndAutoColumns().slice(0),i=this.gos.get("enableRtl");[this.displayedColumnsLeft,this.displayedColumnsRight,this.displayedColumnsCenter].forEach(n=>{if(i){let t=this.getWidthOfColsInList(n);n.forEach(i=>{t-=i.getActualWidth(),i.setLeft(t,e)})}else{let t=0;n.forEach(i=>{i.setLeft(t,e),t+=i.getActualWidth()})}Ge(t,n)}),t.forEach(t=>{t.setLeft(null,e)})}setLeftValuesOfGroups(){[this.displayedTreeLeft,this.displayedTreeRight,this.displayedTreeCentre].forEach(e=>{e.forEach(e=>{e instanceof ht&&e.checkLeft()})})}derivedDisplayedColumnsFromDisplayedTree(e,t){t.length=0,Rt(e,!0,e=>{e instanceof Ee&&t.push(e)})}isColumnVirtualisationSuppressed(){return this.suppressColumnVirtualisation||0===this.viewportRight}extractViewportColumns(){this.isColumnVirtualisationSuppressed()?(this.viewportColumnsCenter=this.displayedColumnsCenter,this.headerViewportColumnsCenter=this.displayedColumnsCenter):(this.viewportColumnsCenter=this.displayedColumnsCenter.filter(this.isColumnInRowViewport.bind(this)),this.headerViewportColumnsCenter=this.displayedColumnsCenter.filter(this.isColumnInHeaderViewport.bind(this))),this.viewportColumns=this.viewportColumnsCenter.concat(this.displayedColumnsLeft).concat(this.displayedColumnsRight),this.headerViewportColumns=this.headerViewportColumnsCenter.concat(this.displayedColumnsLeft).concat(this.displayedColumnsRight)}getVirtualHeaderGroupRow(e,t){let i;switch(e){case"left":i=this.viewportRowLeft[t];break;case"right":i=this.viewportRowRight[t];break;default:i=this.viewportRowCenter[t]}return w(i)&&(i=[]),i}calculateHeaderRows(){this.viewportRowLeft={},this.viewportRowRight={},this.viewportRowCenter={};const e={};this.headerViewportColumns.forEach(t=>e[t.getId()]=!0);const t=(i,n,s)=>{let r=!1;for(let o=0;o<i.length;o++){const a=i[o];let l=!1;if(a instanceof Ee)l=!0===e[a.getId()];else{const e=a.getDisplayedChildren();e&&(l=t(e,n,s+1))}l&&(r=!0,n[s]||(n[s]=[]),n[s].push(a))}return r};t(this.displayedTreeLeft,this.viewportRowLeft,0),t(this.displayedTreeRight,this.viewportRowRight,0),t(this.displayedTreeCentre,this.viewportRowCenter,0)}extractViewport(){this.extractViewportColumns();const e=this.viewportColumns.map(e=>`${e.getId()}-${e.getPinned()||"normal"}`).join("#"),t=this.viewportColumnsHash!==e;return t&&(this.viewportColumnsHash=e,this.calculateHeaderRows()),t}refreshFlexedColumns(e={}){var t;const i=e.source?e.source:"flex";if(null!=e.viewportWidth&&(this.flexViewportWidth=e.viewportWidth),!this.flexViewportWidth)return[];let n=-1;if(e.resizingCols){const t=new Set(e.resizingCols);let i=this.displayedColumnsCenter;for(let e=i.length-1;e>=0;e--)if(t.has(i[e])){n=e;break}}let s=0,r=[],o=0,a=0;for(let e=0;e<this.displayedColumnsCenter.length;e++)this.displayedColumnsCenter[e].getFlex()&&e>n?(r.push(this.displayedColumnsCenter[e]),a+=this.displayedColumnsCenter[e].getFlex(),o+=null!=(t=this.displayedColumnsCenter[e].getMinWidth())?t:0):s+=this.displayedColumnsCenter[e].getActualWidth();if(!r.length)return[];let l=[];s+o>this.flexViewportWidth&&(r.forEach(e=>{var t;return e.setActualWidth(null!=(t=e.getMinWidth())?t:0,i)}),l=r,r=[]);const c=[];let h;e:for(;;){h=this.flexViewportWidth-s;const e=h/a;for(let t=0;t<r.length;t++){const n=r[t],o=e*n.getFlex();let h=0;const d=n.getMinWidth(),u=n.getMaxWidth();if(S(d)&&o<d?h=d:S(u)&&o>u&&(h=u),h){n.setActualWidth(h,i),_e(r,n),a-=n.getFlex(),l.push(n),s+=n.getActualWidth();continue e}c[t]=Math.round(o)}break}let d=h;return r.forEach((e,t)=>{e.setActualWidth(Math.min(c[t],d),i),l.push(e),d-=c[t]}),e.skipSetLeft||this.setLeftValues(i),e.updateBodyWidths&&this.updateBodyWidths(),e.fireResizedEvent&&this.dispatchColumnResizedEvent(l,!0,i,r),r}sizeColumnsToFit(e,t="sizeColumnsToFit",i,n){var s,r,o,a,l;if(this.shouldQueueResizeOperations)return void this.resizeOperationQueue.push(()=>this.sizeColumnsToFit(e,t,i,n));const u={};n&&(null==(s=null==n?void 0:n.columnLimits)||s.forEach(e=>{var t=e,{key:i}=t,n=((e,t)=>{var i={};for(var n in e)h.call(e,n)&&t.indexOf(n)<0&&(i[n]=e[n]);if(null!=e&&c)for(var n of c(e))t.indexOf(n)<0&&d.call(e,n)&&(i[n]=e[n]);return i})(t,["key"]);u["string"==typeof i?i:i.getColId()]=n}));const p=this.getAllDisplayedColumns(),g=e===this.getWidthOfColsInList(p);if(e<=0||!p.length||g)return;const f=[],m=[];p.forEach(e=>{!0===e.getColDef().suppressSizeToFit?m.push(e):f.push(e)});const v=f.slice(0);let y=!1;const C=e=>{Fe(f,e),m.push(e)};for(f.forEach(e=>{var i,s;e.resetActualWidth(t);const r=null==u?void 0:u[e.getId()],o=null!=(i=null==r?void 0:r.minWidth)?i:null==n?void 0:n.defaultMinWidth,a=null!=(s=null==r?void 0:r.maxWidth)?s:null==n?void 0:n.defaultMaxWidth,l=e.getActualWidth();"number"==typeof o&&l<o?e.setActualWidth(o,t,!0):"number"==typeof a&&l>a&&e.setActualWidth(a,t,!0)});!y;){y=!0;const i=e-this.getWidthOfColsInList(m);if(i<=0)f.forEach(e=>{var i,s;const r=null!=(s=null==(i=null==u?void 0:u[e.getId()])?void 0:i.minWidth)?s:null==n?void 0:n.defaultMinWidth;"number"!=typeof r?e.setMinimum(t):e.setActualWidth(r,t,!0)});else{const e=i/this.getWidthOfColsInList(f);let s=i;for(let i=f.length-1;i>=0;i--){const c=f[i],h=null==u?void 0:u[c.getId()],d=null!=(r=null==h?void 0:h.minWidth)?r:null==n?void 0:n.defaultMinWidth,p=null!=(o=null==h?void 0:h.maxWidth)?o:null==n?void 0:n.defaultMaxWidth,g=null!=(a=c.getMinWidth())?a:0,m=null!=(l=c.getMaxWidth())?l:Number.MAX_VALUE,v="number"==typeof d&&d>g?d:c.getMinWidth(),b="number"==typeof p&&p<m?p:c.getMaxWidth();let w=Math.round(c.getActualWidth()*e);S(v)&&w<v?(w=v,C(c),y=!1):S(b)&&w>b?(w=b,C(c),y=!1):0===i&&(w=s),c.setActualWidth(w,t,!0),s-=w}}}v.forEach(e=>{e.fireColumnWidthChangedEvent(t)}),this.setLeftValues(t),this.updateBodyWidths(),i||this.dispatchColumnResizedEvent(v,!0,t)}buildDisplayedTrees(e){const t=[],i=[],n=[];e.forEach(e=>{switch(e.getPinned()){case"left":t.push(e);break;case"right":i.push(e);break;default:n.push(e)}});const s=new pt;this.displayedTreeLeft=this.displayedGroupCreator.createDisplayedGroups(t,s,"left",this.displayedTreeLeft),this.displayedTreeRight=this.displayedGroupCreator.createDisplayedGroups(i,s,"right",this.displayedTreeRight),this.displayedTreeCentre=this.displayedGroupCreator.createDisplayedGroups(n,s,null,this.displayedTreeCentre),this.updateDisplayedMap()}updateDisplayedMap(){this.displayedColumnsAndGroupsMap={};const e=e=>{this.displayedColumnsAndGroupsMap[e.getUniqueId()]=e};Rt(this.displayedTreeCentre,!1,e),Rt(this.displayedTreeLeft,!1,e),Rt(this.displayedTreeRight,!1,e)}isDisplayed(e){return this.displayedColumnsAndGroupsMap[e.getUniqueId()]===e}updateOpenClosedVisibilityInColumnGroups(){Rt(this.getAllDisplayedTrees(),!1,e=>{e instanceof ht&&e.calculateDisplayedColumns()})}getGroupAutoColumns(){return this.groupAutoColumns}createGroupAutoColumnsIfNeeded(){const e=this.forceRecreateAutoGroups;if(this.forceRecreateAutoGroups=!1,!this.autoGroupsNeedBuilding)return!1;this.autoGroupsNeedBuilding=!1;const t=this.gos.isGroupUseEntireRow(this.pivotMode),i=this.pivotMode?this.gos.get("pivotSuppressAutoColumn"):this.isGroupSuppressAutoColumn();if(!(this.rowGroupColumns.length>0||this.gos.get("treeData"))||i||t)this.groupAutoColumns=null;else{const t=this.autoGroupColService.createAutoGroupColumns(this.rowGroupColumns);if(!this.autoColsEqual(t,this.groupAutoColumns)||e)return this.groupAutoColumns=t,!0}return!1}isGroupSuppressAutoColumn(){return"custom"===this.gos.get("groupDisplayType")||"custom"===this.gos.get("treeDataDisplayType")}autoColsEqual(e,t){return ke(e,t,(e,t)=>e.getColId()===t.getColId())}getWidthOfColsInList(e){return e.reduce((e,t)=>e+t.getActualWidth(),0)}getFirstDisplayedColumn(){const e=this.gos.get("enableRtl"),t=["getDisplayedLeftColumns","getDisplayedCenterColumns","getDisplayedRightColumns"];e&&t.reverse();for(let i=0;i<t.length;i++){const n=this[t[i]]();if(n.length)return e?Le(n):n[0]}return null}setColumnHeaderHeight(e,t){if(e.setAutoHeaderHeight(t)){const t={type:dt.EVENT_COLUMN_HEADER_HEIGHT_CHANGED,column:e,columns:[e],source:"autosizeColumnHeaderHeight"};this.eventService.dispatchEvent(t)}}getColumnGroupHeaderRowHeight(){return this.isPivotMode()?this.getPivotGroupHeaderHeight():this.getGroupHeaderHeight()}getColumnHeaderRowHeight(){const e=this.isPivotMode()?this.getPivotHeaderHeight():this.getHeaderHeight(),t=this.getAllDisplayedColumns().filter(e=>e.isAutoHeaderHeight()).map(e=>e.getAutoHeaderHeight()||0);return Math.max(e,...t)}getHeaderHeight(){var e;return null!=(e=this.gos.get("headerHeight"))?e:this.environment.getFromTheme(25,"headerHeight")}getFloatingFiltersHeight(){var e;return null!=(e=this.gos.get("floatingFiltersHeight"))?e:this.getHeaderHeight()}getGroupHeaderHeight(){var e;return null!=(e=this.gos.get("groupHeaderHeight"))?e:this.getHeaderHeight()}getPivotHeaderHeight(){var e;return null!=(e=this.gos.get("pivotHeaderHeight"))?e:this.getHeaderHeight()}getPivotGroupHeaderHeight(){var e;return null!=(e=this.gos.get("pivotGroupHeaderHeight"))?e:this.getGroupHeaderHeight()}queueResizeOperations(){this.shouldQueueResizeOperations=!0}processResizeOperations(){this.shouldQueueResizeOperations=!1,this.resizeOperationQueue.forEach(e=>e()),this.resizeOperationQueue=[]}resetColumnDefIntoColumn(e,t){const i=e.getUserProvidedColDef();if(!i)return!1;const n=this.columnFactory.addColumnDefaultAndTypes(i,e.getColId());return e.setColDef(n,i,t),!0}isColumnGroupingLocked(e){const t=this.gos.get("groupLockGroupColumns");return!(!e.isRowGroupActive()||0===t)&&(-1===t||t>this.rowGroupColumns.findIndex(t=>t.getColId()===e.getColId()))}generateColumnStateForRowGroupAndPivotIndexes(e,t){let i={};const n=(e,t,n,s,r,o)=>{if(!t.length||!this.primaryColumns)return[];const a=Object.keys(e),l=new Set(a),c=new Set(a),h=new Set(t.map(e=>{const t=e.getColId();return c.delete(t),t}).concat(a)),d=[],u={};let p=0;for(let e=0;e<this.primaryColumns.length;e++){const t=this.primaryColumns[e].getColId();h.has(t)&&(d.push(t),u[t]=p++)}let g=1e3,f=!1,m=0;const v=t=>{const i=u[t];for(let t=m;t<i;t++){const i=d[t];c.has(i)&&(e[i][r]=g++,c.delete(i))}m=i};t.forEach(t=>{const a=t.getColId();if(l.has(a))v(a),e[a][r]=g++;else{const l=t.getColDef();(null===l[r]||void 0===l[r]&&null==l[o])&&(f||(l[n]||void 0===l[n]&&l[s]?v(a):(c.forEach(t=>{e[t][r]=g+u[t]}),g+=d.length,f=!0)),i[a]||(i[a]={colId:a}),i[a][r]=g++)}})};return n(e,this.rowGroupColumns,"rowGroup","initialRowGroup","rowGroupIndex","initialRowGroupIndex"),n(t,this.pivotColumns,"pivot","initialPivot","pivotIndex","initialPivotIndex"),Object.values(i)}onColumnsReady(){const e=this.gos.get("autoSizeStrategy");if(!e)return;const{type:t}=e;setTimeout(()=>{if("fitGridWidth"===t){const{columnLimits:t,defaultMinWidth:i,defaultMaxWidth:n}=e,s=null==t?void 0:t.map(({colId:e,minWidth:t,maxWidth:i})=>({key:e,minWidth:t,maxWidth:i}));this.ctrlsService.getGridBodyCtrl().sizeColumnsToFit({defaultMinWidth:i,defaultMaxWidth:n,columnLimits:s})}else"fitProvidedWidth"===t&&this.sizeColumnsToFit(e.width,"sizeColumnsToFit")})}onFirstDataRendered(){const e=this.gos.get("autoSizeStrategy");if("fitCellContents"!==(null==e?void 0:e.type))return;const{colIds:t,skipHeader:i}=e;setTimeout(()=>{t?this.autoSizeColumns({columns:t,skipHeader:i,source:"autosizeColumns"}):this.autoSizeAllColumns("autosizeColumns",i)})}};function It(e){return"gridOptionsUpdated"===e?"gridOptionsChanged":e}function Rt(e,t,i){if(e)for(let n=0;n<e.length;n++){const s=e[n];s instanceof ht&&Rt(t?s.getDisplayedChildren():s.getChildren(),t,i),i(s)}}m([pe("expressionService")],Dt.prototype,"expressionService",2),m([pe("columnFactory")],Dt.prototype,"columnFactory",2),m([pe("displayedGroupCreator")],Dt.prototype,"displayedGroupCreator",2),m([pe("ctrlsService")],Dt.prototype,"ctrlsService",2),m([pe("autoWidthCalculator")],Dt.prototype,"autoWidthCalculator",2),m([pe("columnAnimationService")],Dt.prototype,"columnAnimationService",2),m([pe("autoGroupColService")],Dt.prototype,"autoGroupColService",2),m([pe("valueCache")],Dt.prototype,"valueCache",2),m([pe("animationFrameService")],Dt.prototype,"animationFrameService",2),m([pe("sortController")],Dt.prototype,"sortController",2),m([pe("columnDefFactory")],Dt.prototype,"columnDefFactory",2),m([ge("aggFuncService")],Dt.prototype,"aggFuncService",2),m([he],Dt.prototype,"init",1),m([de],Dt.prototype,"destroyColumns",1),m([v(0,me("loggerFactory"))],Dt.prototype,"setBeans",1),Dt=m([ue("columnModel")],Dt);var Lt=class extends ot{createDisplayedGroups(e,t,i,n){const s=this.mapOldGroupsById(n),r=[];let o=e;for(;o.length;){const e=o;o=[];let n=0;const a=a=>{const l=n;n=a;const c=e[l],h=(c instanceof ht?c.getProvidedColumnGroup():c).getOriginalParent();if(null==h){for(let t=l;t<a;t++)r.push(e[t]);return}const d=this.createColumnGroup(h,t,s,i);for(let t=l;t<a;t++)d.addChild(e[t]);o.push(d)};for(let t=1;t<e.length;t++){const i=e[t],s=(i instanceof ht?i.getProvidedColumnGroup():i).getOriginalParent(),r=e[n];s!==(r instanceof ht?r.getProvidedColumnGroup():r).getOriginalParent()&&a(t)}n<e.length&&a(e.length)}return this.setupParentsIntoColumns(r,null),r}createColumnGroup(e,t,i,n){const s=e.getGroupId(),r=t.getInstanceIdForKey(s);let o=i[ht.createUniqueId(s,r)];return o&&o.getProvidedColumnGroup()!==e&&(o=null),S(o)?o.reset():(o=new ht(e,s,r,n),this.context.createBean(o)),o}mapOldGroupsById(e){const t={},i=e=>{e.forEach(e=>{if(e instanceof ht){const n=e;t[e.getUniqueId()]=n,i(n.getChildren())}})};return e&&i(e),t}setupParentsIntoColumns(e,t){e.forEach(e=>{if(e.setParent(t),e instanceof ht){const t=e;this.setupParentsIntoColumns(t.getChildren(),t)}})}};Lt=m([ue("displayedGroupCreator")],Lt);var kt={enableBrowserTooltips:!0,tooltipTrigger:!0,tooltipMouseTrack:!0,tooltipShowMode:!0,tooltipInteraction:!0,defaultColGroupDef:!0,suppressAutoSize:!0,skipHeaderOnAutoSize:!0,autoSizeStrategy:!0,components:!0,stopEditingWhenCellsLoseFocus:!0,undoRedoCellEditing:!0,undoRedoCellEditingLimit:!0,excelStyles:!0,cacheQuickFilter:!0,excludeHiddenColumnsFromQuickFilter:!0,advancedFilterModel:!0,customChartThemes:!0,chartThemeOverrides:!0,enableChartToolPanelsButton:!0,suppressChartToolPanelsButton:!0,chartToolPanelsDef:!0,loadingCellRendererSelector:!0,localeText:!0,keepDetailRows:!0,keepDetailRowsCount:!0,detailRowHeight:!0,detailRowAutoHeight:!0,tabIndex:!0,valueCache:!0,valueCacheNeverExpires:!0,enableCellExpressions:!0,suppressParentsInRowNodes:!0,suppressTouch:!0,suppressAsyncEvents:!0,suppressBrowserResizeObserver:!0,suppressPropertyNamesCheck:!0,debug:!0,loadingOverlayComponent:!0,suppressLoadingOverlay:!0,noRowsOverlayComponent:!0,paginationPageSizeSelector:!0,paginateChildRows:!0,pivotPanelShow:!0,pivotSuppressAutoColumn:!0,suppressExpandablePivotGroups:!0,aggFuncs:!0,suppressAggFuncInHeader:!0,suppressAggAtRootLevel:!0,removePivotHeaderRowWhenSingleValueColumn:!0,allowShowChangeAfterFilter:!0,ensureDomOrder:!0,enableRtl:!0,suppressColumnVirtualisation:!0,suppressMaxRenderedRowRestriction:!0,suppressRowVirtualisation:!0,rowDragText:!0,suppressGroupMaintainValueType:!0,groupLockGroupColumns:!0,rowGroupPanelSuppressSort:!0,suppressGroupRowsSticky:!0,rowModelType:!0,cacheOverflowSize:!0,infiniteInitialRowCount:!0,serverSideInitialRowCount:!0,suppressServerSideInfiniteScroll:!0,maxBlocksInCache:!0,maxConcurrentDatasourceRequests:!0,blockLoadDebounceMillis:!0,serverSideOnlyRefreshFilteredGroups:!0,serverSidePivotResultFieldSeparator:!0,viewportRowModelPageSize:!0,viewportRowModelBufferSize:!0,debounceVerticalScrollbar:!0,suppressAnimationFrame:!0,suppressPreventDefaultOnMouseWheel:!0,scrollbarWidth:!0,icons:!0,suppressRowTransform:!0,gridId:!0,functionsPassive:!0,enableGroupEdit:!0,initialState:!0,processUnpinnedColumns:!0,createChartContainer:!0,getLocaleText:!0,getRowId:!0,reactiveCustomComponents:!0,columnMenu:!0},Pt=class{};Pt.STRING_PROPERTIES=["rowSelection","overlayLoadingTemplate","overlayNoRowsTemplate","gridId","quickFilterText","rowModelType","editType","domLayout","clipboardDelimiter","rowGroupPanelShow","multiSortKey","pivotColumnGroupTotals","pivotRowTotals","pivotPanelShow","fillHandleDirection","groupDisplayType","treeDataDisplayType","colResizeDefault","tooltipTrigger","serverSidePivotResultFieldSeparator","columnMenu","tooltipShowMode","grandTotalRow"],Pt.OBJECT_PROPERTIES=["components","rowStyle","context","autoGroupColumnDef","localeText","icons","datasource","serverSideDatasource","viewportDatasource","groupRowRendererParams","aggFuncs","fullWidthCellRendererParams","defaultColGroupDef","defaultColDef","defaultCsvExportParams","defaultExcelExportParams","columnTypes","rowClassRules","detailCellRendererParams","loadingCellRendererParams","loadingOverlayComponentParams","noRowsOverlayComponentParams","popupParent","statusBar","sideBar","chartThemeOverrides","customChartThemes","chartToolPanelsDef","dataTypeDefinitions","advancedFilterModel","advancedFilterParent","advancedFilterBuilderParams","initialState","autoSizeStrategy"],Pt.ARRAY_PROPERTIES=["sortingOrder","alignedGrids","rowData","columnDefs","excelStyles","pinnedTopRowData","pinnedBottomRowData","chartThemes","rowClass","paginationPageSizeSelector"],Pt.NUMBER_PROPERTIES=["rowHeight","detailRowHeight","rowBuffer","headerHeight","groupHeaderHeight","groupLockGroupColumns","floatingFiltersHeight","pivotHeaderHeight","pivotGroupHeaderHeight","groupDefaultExpanded","pivotDefaultExpanded","viewportRowModelPageSize","viewportRowModelBufferSize","autoSizePadding","maxBlocksInCache","maxConcurrentDatasourceRequests","tooltipShowDelay","tooltipHideDelay","cacheOverflowSize","paginationPageSize","cacheBlockSize","infiniteInitialRowCount","serverSideInitialRowCount","scrollbarWidth","asyncTransactionWaitMillis","blockLoadDebounceMillis","keepDetailRowsCount","undoRedoCellEditingLimit","cellFlashDelay","cellFadeDelay","cellFlashDuration","cellFadeDuration","tabIndex","pivotMaxGeneratedColumns"],Pt.BOOLEAN_PROPERTIES=["suppressMakeColumnVisibleAfterUnGroup","suppressRowClickSelection","suppressCellFocus","suppressHeaderFocus","suppressHorizontalScroll","groupSelectsChildren","alwaysShowHorizontalScroll","alwaysShowVerticalScroll","debug","enableBrowserTooltips","enableCellExpressions","groupIncludeTotalFooter","groupSuppressBlankHeader","suppressMenuHide","suppressRowDeselection","unSortIcon","suppressMultiSort","alwaysMultiSort","singleClickEdit","suppressLoadingOverlay","suppressNoRowsOverlay","suppressAutoSize","skipHeaderOnAutoSize","suppressParentsInRowNodes","suppressColumnMoveAnimation","suppressMovableColumns","suppressFieldDotNotation","enableRangeSelection","enableRangeHandle","enableFillHandle","suppressClearOnFillReduction","deltaSort","suppressTouch","suppressAsyncEvents","allowContextMenuWithControlKey","suppressContextMenu","enableCellChangeFlash","suppressDragLeaveHidesColumns","suppressRowGroupHidesColumns","suppressMiddleClickScrolls","suppressPreventDefaultOnMouseWheel","suppressCopyRowsToClipboard","copyHeadersToClipboard","copyGroupHeadersToClipboard","pivotMode","suppressAggFuncInHeader","suppressColumnVirtualisation","alwaysAggregateAtRootLevel","suppressAggAtRootLevel","suppressFocusAfterRefresh","functionsPassive","functionsReadOnly","animateRows","groupSelectsFiltered","groupRemoveSingleChildren","groupRemoveLowestSingleChildren","enableRtl","suppressClickEdit","rowDragEntireRow","rowDragManaged","suppressRowDrag","suppressMoveWhenRowDragging","rowDragMultiRow","enableGroupEdit","embedFullWidthRows","suppressPaginationPanel","groupHideOpenParents","groupAllowUnbalanced","pagination","paginationAutoPageSize","suppressScrollOnNewData","suppressScrollWhenPopupsAreOpen","purgeClosedRowNodes","cacheQuickFilter","includeHiddenColumnsInQuickFilter","excludeHiddenColumnsFromQuickFilter","ensureDomOrder","accentedSort","suppressChangeDetection","valueCache","valueCacheNeverExpires","aggregateOnlyChangedColumns","suppressAnimationFrame","suppressExcelExport","suppressCsvExport","includeHiddenColumnsInAdvancedFilter","suppressMultiRangeSelection","enterMovesDown","enterMovesDownAfterEdit","enterNavigatesVerticallyAfterEdit","enterNavigatesVertically","suppressPropertyNamesCheck","rowMultiSelectWithClick","suppressRowHoverHighlight","suppressRowTransform","suppressClipboardPaste","suppressLastEmptyLineOnPaste","enableCharts","enableChartToolPanelsButton","suppressChartToolPanelsButton","suppressMaintainUnsortedOrder","enableCellTextSelection","suppressBrowserResizeObserver","suppressMaxRenderedRowRestriction","excludeChildrenWhenTreeDataFiltering","tooltipMouseTrack","tooltipInteraction","keepDetailRows","paginateChildRows","preventDefaultOnContextMenu","undoRedoCellEditing","allowDragFromColumnsToolPanel","pivotSuppressAutoColumn","suppressExpandablePivotGroups","debounceVerticalScrollbar","detailRowAutoHeight","serverSideFilterAllLevels","serverSideSortAllLevels","serverSideEnableClientSideSort","serverSideOnlyRefreshFilteredGroups","serverSideSortOnServer","serverSideFilterOnServer","suppressAggFilteredOnly","showOpenedGroup","suppressClipboardApi","suppressModelUpdateAfterUpdateTransaction","stopEditingWhenCellsLoseFocus","maintainColumnOrder","groupMaintainOrder","columnHoverHighlight","readOnlyEdit","suppressRowVirtualisation","enableCellEditingOnBackspace","resetRowDataOnUpdate","removePivotHeaderRowWhenSingleValueColumn","suppressCopySingleCellRanges","suppressGroupRowsSticky","suppressCutToClipboard","suppressServerSideInfiniteScroll","rowGroupPanelSuppressSort","allowShowChangeAfterFilter","enableAdvancedFilter","masterDetail","treeData","suppressGroupMaintainValueType","reactiveCustomComponents","applyQuickFilterBeforePivotOrAgg","suppressServerSideFullWidthLoadingRow","suppressAdvancedFilterEval"],Pt.OTHER_PROPERTIES=["suppressStickyTotalRow"],Pt.FUNCTIONAL_PROPERTIES=["doesExternalFilterPass","processPivotResultColDef","processPivotResultColGroupDef","getBusinessKeyForNode","isRowSelectable","rowDragText","groupRowRenderer","fullWidthCellRenderer","loadingCellRenderer","loadingOverlayComponent","noRowsOverlayComponent","detailCellRenderer","quickFilterParser","quickFilterMatcher"],Pt.CALLBACK_PROPERTIES=["getLocaleText","isExternalFilterPresent","getRowHeight","getRowClass","getRowStyle","getContextMenuItems","getMainMenuItems","processRowPostCreate","processCellForClipboard","getGroupRowAgg","isFullWidthRow","sendToClipboard","navigateToNextHeader","tabToNextHeader","navigateToNextCell","tabToNextCell","processCellFromClipboard","getDocument","postProcessPopup","getChildCount","getDataPath","isRowMaster","postSortRows","processHeaderForClipboard","processUnpinnedColumns","processGroupHeaderForClipboard","paginationNumberFormatter","processDataFromClipboard","getServerSideGroupKey","isServerSideGroup","createChartContainer","getChartToolbarItems","fillOperation","isApplyServerSideTransaction","getServerSideGroupLevelParams","isServerSideGroupOpenByDefault","isGroupOpenByDefault","initialGroupOrderComparator","groupIncludeFooter","loadingCellRendererSelector","getRowId","groupAggFiltering","chartMenuItems","groupTotalRow"],Pt.FUNCTION_PROPERTIES=[...Pt.FUNCTIONAL_PROPERTIES,...Pt.CALLBACK_PROPERTIES],Pt.ALL_PROPERTIES=[...Pt.ARRAY_PROPERTIES,...Pt.OBJECT_PROPERTIES,...Pt.STRING_PROPERTIES,...Pt.NUMBER_PROPERTIES,...Pt.FUNCTION_PROPERTIES,...Pt.BOOLEAN_PROPERTIES,...Pt.OTHER_PROPERTIES];var Nt=Pt,Ot=class e{static getCallbackForEvent(e){return!e||e.length<2?e:"on"+e[0].toUpperCase()+e.substring(1)}static getGridOptionKeys(){return this.ALL_PROPERTIES_AND_CALLBACKS}static combineAttributesAndGridOptions(t,i){"object"!=typeof t&&(t={});const n=p({},t);return e.getGridOptionKeys().forEach(t=>{const s=i[t];void 0!==s&&s!==e.VUE_OMITTED_PROPERTY&&(n[t]=s)}),n}static processOnChange(t,i,n){if(!t)return;const s={};let r=!1;if(Object.keys(t).filter(t=>e.ALL_PROPERTIES_AND_CALLBACKS_SET.has(t)).forEach(e=>{s[e]=t[e],r=!0}),!r)return;i.__internalUpdateGridOptions(s,!0);const o={type:dt.EVENT_COMPONENT_STATE_CHANGED};N(s,(e,t)=>{o[e]=t}),i.dispatchEvent(o)}};Ot.EVENTS=R(dt),Ot.VUE_OMITTED_PROPERTY="AG-VUE-OMITTED-PROPERTY",Ot.EXCLUDED_INTERNAL_EVENTS=[dt.EVENT_SCROLLBAR_WIDTH_CHANGED,dt.EVENT_CHECKBOX_CHANGED,dt.EVENT_HEIGHT_SCALE_CHANGED,dt.EVENT_BODY_HEIGHT_CHANGED,dt.EVENT_COLUMN_CONTAINER_WIDTH_CHANGED,dt.EVENT_DISPLAYED_COLUMNS_WIDTH_CHANGED,dt.EVENT_SCROLL_VISIBILITY_CHANGED,dt.EVENT_COLUMN_HOVER_CHANGED,dt.EVENT_FLASH_CELLS,dt.EVENT_PAGINATION_PIXEL_OFFSET_CHANGED,dt.EVENT_DISPLAYED_ROWS_CHANGED,dt.EVENT_LEFT_PINNED_WIDTH_CHANGED,dt.EVENT_RIGHT_PINNED_WIDTH_CHANGED,dt.EVENT_ROW_CONTAINER_HEIGHT_CHANGED,dt.EVENT_STORE_UPDATED,dt.EVENT_COLUMN_PANEL_ITEM_DRAG_START,dt.EVENT_COLUMN_PANEL_ITEM_DRAG_END,dt.EVENT_KEY_SHORTCUT_CHANGED_CELL_START,dt.EVENT_KEY_SHORTCUT_CHANGED_CELL_END,dt.EVENT_FULL_WIDTH_ROW_FOCUSED,dt.EVENT_HEADER_HEIGHT_CHANGED,dt.EVENT_COLUMN_HEADER_HEIGHT_CHANGED,dt.EVENT_CELL_FOCUS_CLEARED,dt.EVENT_GRID_STYLES_CHANGED,dt.EVENT_FILTER_DESTROYED,dt.EVENT_ROW_DATA_UPDATE_STARTED,dt.EVENT_ADVANCED_FILTER_ENABLED_CHANGED,dt.EVENT_DATA_TYPES_INFERRED,dt.EVENT_FIELD_VALUE_CHANGED,dt.EVENT_FIELD_PICKER_VALUE_SELECTED,dt.EVENT_SUPPRESS_COLUMN_MOVE_CHANGED,dt.EVENT_SUPPRESS_MENU_HIDE_CHANGED,dt.EVENT_SUPPRESS_FIELD_DOT_NOTATION,dt.EVENT_ROW_COUNT_READY,dt.EVENT_SIDE_BAR_UPDATED],Ot.PUBLIC_EVENTS=Ot.EVENTS.filter(e=>!Ue(Ot.EXCLUDED_INTERNAL_EVENTS,e)),Ot.EVENT_CALLBACKS=Ot.EVENTS.map(e=>Ot.getCallbackForEvent(e)),Ot.BOOLEAN_PROPERTIES=Nt.BOOLEAN_PROPERTIES,Ot.ALL_PROPERTIES=Nt.ALL_PROPERTIES,Ot.ALL_PROPERTIES_AND_CALLBACKS=[...Ot.ALL_PROPERTIES,...Ot.EVENT_CALLBACKS],Ot.ALL_PROPERTIES_AND_CALLBACKS_SET=new Set(Ot.ALL_PROPERTIES_AND_CALLBACKS);var _t=Ot,Ft=class extends ot{constructor(){super(...arguments),this.componentsMappedByName={}}setupComponents(e){e&&e.forEach(e=>this.addComponent(e))}addComponent(e){const t=e.componentName.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase().toUpperCase();this.componentsMappedByName[t]=e.componentClass}getComponentClass(e){return this.componentsMappedByName[e]}};Ft=m([ue("agStackComponentsRegistry")],Ft);var Gt={};function Vt(e,t,i){null==i||"string"==typeof i&&""==i?Ht(e,t):Bt(e,t,i)}function Bt(e,t,i){e.setAttribute(zt(t),i.toString())}function Ht(e,t){e.removeAttribute(zt(t))}function zt(e){return`aria-${e}`}function Ut(e,t){t?e.setAttribute("role",t):e.removeAttribute("role")}function Wt(e){let t;return t="asc"===e?"ascending":"desc"===e?"descending":"mixed"===e?"other":"none",t}function jt(e){return parseInt(e.getAttribute("aria-level"),10)}function Kt(e){return parseInt(e.getAttribute("aria-posinset"),10)}function $t(e){return e.getAttribute("aria-label")}function Yt(e,t){Vt(e,"label",t)}function qt(e,t){Vt(e,"labelledby",t)}function Xt(e,t){Vt(e,"describedby",t)}function Zt(e,t){Vt(e,"live",t)}function Qt(e,t){Vt(e,"atomic",t)}function Jt(e,t){Vt(e,"relevant",t)}function ei(e,t){Vt(e,"level",t)}function ti(e,t){Vt(e,"disabled",t)}function ii(e,t){Vt(e,"hidden",t)}function ni(e,t){Vt(e,"activedescendant",t)}function si(e,t){Bt(e,"expanded",t)}function ri(e){Ht(e,"expanded")}function oi(e,t){Bt(e,"setsize",t)}function ai(e,t){Bt(e,"posinset",t)}function li(e,t){Bt(e,"multiselectable",t)}function ci(e,t){Bt(e,"rowcount",t)}function hi(e,t){Bt(e,"rowindex",t)}function di(e,t){Bt(e,"colcount",t)}function ui(e,t){Bt(e,"colindex",t)}function pi(e,t){Bt(e,"colspan",t)}function gi(e,t){Bt(e,"sort",t)}function fi(e){Ht(e,"sort")}function mi(e,t){Vt(e,"selected",t)}function vi(e,t){Bt(e,"checked",void 0===t?"mixed":t)}function yi(e,t){Vt(e,"controls",t.id),qt(t,e.id)}function Ci(e,t){return void 0===t?e("ariaIndeterminate","indeterminate"):!0===t?e("ariaChecked","checked"):e("ariaUnchecked","unchecked")}f(Gt,{getAriaCheckboxStateName:()=>Ci,getAriaLabel:()=>$t,getAriaLevel:()=>jt,getAriaPosInSet:()=>Kt,getAriaSortState:()=>Wt,removeAriaExpanded:()=>ri,removeAriaSort:()=>fi,setAriaActiveDescendant:()=>ni,setAriaAtomic:()=>Qt,setAriaChecked:()=>vi,setAriaColCount:()=>di,setAriaColIndex:()=>ui,setAriaColSpan:()=>pi,setAriaControls:()=>yi,setAriaDescribedBy:()=>Xt,setAriaDisabled:()=>ti,setAriaExpanded:()=>si,setAriaHidden:()=>ii,setAriaLabel:()=>Yt,setAriaLabelledBy:()=>qt,setAriaLevel:()=>ei,setAriaLive:()=>Zt,setAriaMultiSelectable:()=>li,setAriaPosInSet:()=>ai,setAriaRelevant:()=>Jt,setAriaRole:()=>Ut,setAriaRowCount:()=>ci,setAriaRowIndex:()=>hi,setAriaSelected:()=>mi,setAriaSetSize:()=>oi,setAriaSort:()=>gi});var bi,Si,wi,xi,Ei,Mi,Ai,Ti,Di={};function Ii(){return void 0===bi&&(bi=/^((?!chrome|android).)*safari/i.test(navigator.userAgent)),bi}function Ri(){if(void 0===Si)if(Ii()){const e=navigator.userAgent.match(/version\/(\d+)/i);e&&(Si=null!=e[1]?parseFloat(e[1]):0)}else Si=0;return Si}function Li(){if(void 0===wi){const e=window;wi=!!e.chrome&&(!!e.chrome.webstore||!!e.chrome.runtime)||/Chrome/.test(navigator.userAgent)&&/Google Inc/.test(navigator.vendor)}return wi}function ki(){return void 0===xi&&(xi=/(firefox)/i.test(navigator.userAgent)),xi}function Pi(){return void 0===Ei&&(Ei=/(Mac|iPhone|iPod|iPad)/i.test(navigator.platform)),Ei}function Ni(){return void 0===Mi&&(Mi=/iPad|iPhone|iPod/.test(navigator.platform)||"MacIntel"===navigator.platform&&navigator.maxTouchPoints>1),Mi}function Oi(){return!Ii()||Ri()>=15}function _i(e){if(!e)return null;const t=e.tabIndex,i=e.getAttribute("tabIndex");return-1!==t||null!==i&&(""!==i||ki())?t.toString():null}function Fi(){if(!document.body)return-1;let e=1e6;const t=navigator.userAgent.toLowerCase().match(/firefox/)?6e6:1e9,i=document.createElement("div");for(document.body.appendChild(i);;){const n=2*e;if(i.style.height=n+"px",n>t||i.clientHeight!==n)break;e=n}return document.body.removeChild(i),e}function Gi(){var e,t,i;return null!=(i=null==(e=document.body)?void 0:e.clientWidth)?i:window.innerHeight||(null==(t=document.documentElement)?void 0:t.clientWidth)||-1}function Vi(){var e,t,i;return null!=(i=null==(e=document.body)?void 0:e.clientHeight)?i:window.innerHeight||(null==(t=document.documentElement)?void 0:t.clientHeight)||-1}function Bi(){return null==Ti&&Hi(),Ti}function Hi(){const e=document.body,t=document.createElement("div");t.style.width=t.style.height="100px",t.style.opacity="0",t.style.overflow="scroll",t.style.msOverflowStyle="scrollbar",t.style.position="absolute",e.appendChild(t);let i=t.offsetWidth-t.clientWidth;0===i&&0===t.clientWidth&&(i=null),t.parentNode&&t.parentNode.removeChild(t),null!=i&&(Ti=i,Ai=0===i)}function zi(){return null==Ai&&Hi(),Ai}f(Di,{browserSupportsPreventScroll:()=>Oi,getBodyHeight:()=>Vi,getBodyWidth:()=>Gi,getMaxDivHeight:()=>Fi,getSafariVersion:()=>Ri,getScrollbarWidth:()=>Bi,getTabIndex:()=>_i,isBrowserChrome:()=>Li,isBrowserFirefox:()=>ki,isBrowserSafari:()=>Ii,isIOSUserAgent:()=>Ni,isInvisibleScrollbar:()=>zi,isMacOsUserAgent:()=>Pi});var Ui={};f(Ui,{dateToFormattedString:()=>en,parseDateTimeFromString:()=>tn,serialiseDate:()=>Qi});var Wi={};function ji(e,t){return e.toString().padStart(t,"0")}function Ki(e,t){const i=[];for(let n=e;n<=t;n++)i.push(n);return i}function $i(e){return"string"==typeof e&&(e=parseInt(e,10)),"number"==typeof e?Math.floor(e):null}function Yi(e,t){let i="";for(let n=0;n<t;n++)i+=String.fromCharCode(255&e),e>>>=8;return i}function qi(e,t,i){return"number"!=typeof e?"":Xi(Math.round(100*e)/100,t,i)}function Xi(e,t,i){return"number"!=typeof e?"":e.toString().replace(".",i).replace(/(\d)(?=(\d{3})+(?!\d))/g,`$1${t}`)}function Zi(e){return null==e?null:e.reduce((e,t)=>e+t,0)}function Qi(e,t=!0,i="-"){if(!e)return null;let n=[e.getFullYear(),e.getMonth()+1,e.getDate()].map(e=>ji(e,2)).join(i);return t&&(n+=" "+[e.getHours(),e.getMinutes(),e.getSeconds()].map(e=>ji(e,2)).join(":")),n}f(Wi,{cleanNumber:()=>$i,createArrayOfNumbers:()=>Ki,decToHex:()=>Yi,formatNumberCommas:()=>Xi,formatNumberTwoDecimalPlacesAndCommas:()=>qi,padStartWidthZeros:()=>ji,sum:()=>Zi});var Ji=e=>{if(e>3&&e<21)return"th";switch(e%10){case 1:return"st";case 2:return"nd";case 3:return"rd"}return"th"};function en(e,t="YYYY-MM-DD"){const i=ji(e.getFullYear(),4),n=["January","February","March","April","May","June","July","August","September","October","November","December"],s=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],r={YYYY:()=>i.slice(i.length-4,i.length),YY:()=>i.slice(i.length-2,i.length),Y:()=>`${e.getFullYear()}`,MMMM:()=>n[e.getMonth()],MMM:()=>n[e.getMonth()].slice(0,3),MM:()=>ji(e.getMonth()+1,2),Mo:()=>`${e.getMonth()+1}${Ji(e.getMonth()+1)}`,M:()=>`${e.getMonth()+1}`,Do:()=>`${e.getDate()}${Ji(e.getDate())}`,DD:()=>ji(e.getDate(),2),D:()=>`${e.getDate()}`,dddd:()=>s[e.getDay()],ddd:()=>s[e.getDay()].slice(0,3),dd:()=>s[e.getDay()].slice(0,2),do:()=>`${e.getDay()}${Ji(e.getDay())}`,d:()=>`${e.getDay()}`},o=new RegExp(Object.keys(r).join("|"),"g");return t.replace(o,e=>e in r?r[e]():e)}function tn(e){if(!e)return null;const[t,i]=e.split(" ");if(!t)return null;const n=t.split("-").map(e=>parseInt(e,10));if(3!==n.filter(e=>!isNaN(e)).length)return null;const[s,r,o]=n,a=new Date(s,r-1,o);if(a.getFullYear()!==s||a.getMonth()!==r-1||a.getDate()!==o)return null;if(!i||"00:00:00"===i)return a;const[l,c,h]=i.split(":").map(e=>parseInt(e,10));return l>=0&&l<24&&a.setHours(l),c>=0&&c<60&&a.setMinutes(c),h>=0&&h<60&&a.setSeconds(h),a}var nn,sn={};function rn(e,t,i){const n=e.parentElement;let s=n&&n.firstChild;for(;s;)t&&s.classList.toggle(t,s===e),i&&s.classList.toggle(i,s!==e),s=s.nextSibling}f(sn,{FOCUSABLE_EXCLUDE:()=>an,FOCUSABLE_SELECTOR:()=>on,addOrRemoveAttribute:()=>Hn,addStylesToElement:()=>Rn,bindCellRendererToHtmlElement:()=>Un,clearElement:()=>wn,copyNodeList:()=>Vn,ensureDomOrder:()=>Tn,formatSize:()=>Fn,getAbsoluteHeight:()=>mn,getAbsoluteWidth:()=>vn,getElementRectWithOffset:()=>yn,getElementSize:()=>pn,getInnerHeight:()=>gn,getInnerWidth:()=>fn,getScrollLeft:()=>bn,insertWithDomOrder:()=>In,isElementChildOfClass:()=>un,isFocusableFormField:()=>ln,isHorizontalScrollShowing:()=>Ln,isInDOM:()=>En,isNodeOrElement:()=>Gn,isRtlNegativeScroll:()=>Cn,isVerticalScrollShowing:()=>kn,isVisible:()=>Mn,iterateNamedNodeMap:()=>Bn,loadTemplate:()=>An,nodeListForEach:()=>zn,radioCssClass:()=>rn,removeFromParent:()=>xn,setDisabled:()=>dn,setDisplayed:()=>cn,setDomChildOrder:()=>Dn,setElementHeight:()=>On,setElementWidth:()=>Pn,setFixedHeight:()=>_n,setFixedWidth:()=>Nn,setScrollLeft:()=>Sn,setVisible:()=>hn});var on="[tabindex], input, select, button, textarea, [href]",an="[disabled], .ag-disabled:not(.ag-button), .ag-disabled *";function ln(e){const t=Element.prototype.matches||Element.prototype.msMatchesSelector,i=t.call(e,"input, select, button, textarea"),n=t.call(e,an),s=Mn(e);return i&&!n&&s}function cn(e,t,i={}){const{skipAriaHidden:n}=i;e.classList.toggle("ag-hidden",!t),n||ii(e,!t)}function hn(e,t,i={}){const{skipAriaHidden:n}=i;e.classList.toggle("ag-invisible",!t),n||ii(e,!t)}function dn(e,t){const i="disabled",n=t?e=>e.setAttribute(i,""):e=>e.removeAttribute(i);n(e),zn(e.querySelectorAll("input"),e=>n(e))}function un(e,t,i){let n=0;for(;e;){if(e.classList.contains(t))return!0;if(e=e.parentElement,"number"==typeof i){if(++n>i)break}else if(e===i)break}return!1}function pn(e){const{height:t,width:i,borderTopWidth:n,borderRightWidth:s,borderBottomWidth:r,borderLeftWidth:o,paddingTop:a,paddingRight:l,paddingBottom:c,paddingLeft:h,marginTop:d,marginRight:u,marginBottom:p,marginLeft:g,boxSizing:f}=window.getComputedStyle(e);return{height:parseFloat(t||"0"),width:parseFloat(i||"0"),borderTopWidth:parseFloat(n||"0"),borderRightWidth:parseFloat(s||"0"),borderBottomWidth:parseFloat(r||"0"),borderLeftWidth:parseFloat(o||"0"),paddingTop:parseFloat(a||"0"),paddingRight:parseFloat(l||"0"),paddingBottom:parseFloat(c||"0"),paddingLeft:parseFloat(h||"0"),marginTop:parseFloat(d||"0"),marginRight:parseFloat(u||"0"),marginBottom:parseFloat(p||"0"),marginLeft:parseFloat(g||"0"),boxSizing:f}}function gn(e){const t=pn(e);return"border-box"===t.boxSizing?t.height-t.paddingTop-t.paddingBottom:t.height}function fn(e){const t=pn(e);return"border-box"===t.boxSizing?t.width-t.paddingLeft-t.paddingRight:t.width}function mn(e){const t=pn(e),i=t.marginBottom+t.marginTop;return Math.ceil(e.offsetHeight+i)}function vn(e){const t=pn(e),i=t.marginLeft+t.marginRight;return Math.ceil(e.offsetWidth+i)}function yn(e){const t=e.getBoundingClientRect(),{borderTopWidth:i,borderLeftWidth:n,borderRightWidth:s,borderBottomWidth:r}=pn(e);return{top:t.top+(i||0),left:t.left+(n||0),right:t.right+(s||0),bottom:t.bottom+(r||0)}}function Cn(){if("boolean"==typeof nn)return nn;const e=document.createElement("div");return e.style.direction="rtl",e.style.width="1px",e.style.height="1px",e.style.position="fixed",e.style.top="0px",e.style.overflow="hidden",e.dir="rtl",e.innerHTML='<div style="width: 2px">\n            <span style="display: inline-block; width: 1px"></span>\n            <span style="display: inline-block; width: 1px"></span>\n        </div>',document.body.appendChild(e),e.scrollLeft=1,nn=0===Math.floor(e.scrollLeft),document.body.removeChild(e),nn}function bn(e,t){let i=e.scrollLeft;return t&&(i=Math.abs(i),Li()&&!Cn()&&(i=e.scrollWidth-e.clientWidth-i)),i}function Sn(e,t,i){i&&(Cn()?t*=-1:(Ii()||Li())&&(t=e.scrollWidth-e.clientWidth-t)),e.scrollLeft=t}function wn(e){for(;e&&e.firstChild;)e.removeChild(e.firstChild)}function xn(e){e&&e.parentNode&&e.parentNode.removeChild(e)}function En(e){return!!e.offsetParent}function Mn(e){const t=e;return t.checkVisibility?t.checkVisibility({checkVisibilityCSS:!0}):!(!En(e)||"visible"!==window.getComputedStyle(e).visibility)}function An(e){const t=document.createElement("div");return t.innerHTML=(e||"").trim(),t.firstChild}function Tn(e,t,i){i&&i.nextSibling===t||(i?i.nextSibling?e.insertBefore(t,i.nextSibling):e.appendChild(t):e.firstChild&&e.firstChild!==t&&e.insertAdjacentElement("afterbegin",t))}function Dn(e,t){for(let i=0;i<t.length;i++){const n=t[i],s=e.children[i];s!==n&&e.insertBefore(n,s)}}function In(e,t,i){i?i.insertAdjacentElement("afterend",t):e.firstChild?e.insertAdjacentElement("afterbegin",t):e.appendChild(t)}function Rn(e,t){if(t)for(const[i,n]of Object.entries(t)){if(!i||!i.length||null==n)continue;const t=xt(i),s=n.toString(),r=s.replace(/\s*!important/g,""),o=r.length!=s.length?"important":void 0;e.style.setProperty(t,r,o)}}function Ln(e){return e.clientWidth<e.scrollWidth}function kn(e){return e.clientHeight<e.scrollHeight}function Pn(e,t){"flex"===t?(e.style.removeProperty("width"),e.style.removeProperty("minWidth"),e.style.removeProperty("maxWidth"),e.style.flex="1 1 auto"):Nn(e,t)}function Nn(e,t){t=Fn(t),e.style.width=t.toString(),e.style.maxWidth=t.toString(),e.style.minWidth=t.toString()}function On(e,t){"flex"===t?(e.style.removeProperty("height"),e.style.removeProperty("minHeight"),e.style.removeProperty("maxHeight"),e.style.flex="1 1 auto"):_n(e,t)}function _n(e,t){t=Fn(t),e.style.height=t.toString(),e.style.maxHeight=t.toString(),e.style.minHeight=t.toString()}function Fn(e){return"number"==typeof e?`${e}px`:e}function Gn(e){return e instanceof Node||e instanceof HTMLElement}function Vn(e){if(null==e)return[];const t=[];return zn(e,e=>t.push(e)),t}function Bn(e,t){if(e)for(let i=0;i<e.length;i++){const n=e[i];t(n.name,n.value)}}function Hn(e,t,i){null==i?e.removeAttribute(t):e.setAttribute(t,i.toString())}function zn(e,t){if(null!=e)for(let i=0;i<e.length;i++)t(e[i])}function Un(e,t){e.then(e=>{const i=e.getGui();null!=i&&("object"==typeof i?t.appendChild(i):t.innerHTML=i)})}var Wn={};function jn(e,t,i){const n={},s=e.filter(e=>!t.some(t=>t===e));return s.length>0&&s.forEach(e=>n[e]=Kn(e,i).values),n}function Kn(e,t,i,n){let s=t.map((t,i)=>({value:t,relevance:$n(e.toLowerCase(),t.toLocaleLowerCase()),idx:i}));if(s.sort((e,t)=>t.relevance-e.relevance),i&&(s=s.filter(e=>0!==e.relevance)),s.length>0&&n&&n>0){const e=s[0].relevance*n;s=s.filter(t=>e-t.relevance<0)}const r=[],o=[];for(const e of s)r.push(e.value),o.push(e.idx);return{values:r,indices:o}}function $n(e,t){const i=e.replace(/\s/g,""),n=t.replace(/\s/g,"");let s=0,r=-1;for(let e=0;e<i.length;e++){const t=n.indexOf(i[e],r+1);-1!==t&&(r=t,s+=100-100*r/1e4*100)}return s}f(Wn,{fuzzyCheckStrings:()=>jn,fuzzySuggestions:()=>Kn});var Yn={};f(Yn,{createIcon:()=>Xn,createIconNoSpan:()=>Zn,iconNameClassMap:()=>qn});var qn={columnGroupOpened:"expanded",columnGroupClosed:"contracted",columnSelectClosed:"tree-closed",columnSelectOpen:"tree-open",columnSelectIndeterminate:"tree-indeterminate",columnMovePin:"pin",columnMoveHide:"eye-slash",columnMoveMove:"arrows",columnMoveLeft:"left",columnMoveRight:"right",columnMoveGroup:"group",columnMoveValue:"aggregation",columnMovePivot:"pivot",dropNotAllowed:"not-allowed",groupContracted:"tree-closed",groupExpanded:"tree-open",setFilterGroupClosed:"tree-closed",setFilterGroupOpen:"tree-open",setFilterGroupIndeterminate:"tree-indeterminate",chart:"chart",close:"cross",cancel:"cancel",check:"tick",first:"first",previous:"previous",next:"next",last:"last",linked:"linked",unlinked:"unlinked",colorPicker:"color-picker",groupLoading:"loading",menu:"menu",menuAlt:"menu-alt",filter:"filter",columns:"columns",maximize:"maximize",minimize:"minimize",menuPin:"pin",menuValue:"aggregation",menuAddRowGroup:"group",menuRemoveRowGroup:"group",clipboardCopy:"copy",clipboardCut:"cut",clipboardPaste:"paste",pivotPanel:"pivot",rowGroupPanel:"group",valuePanel:"aggregation",columnDrag:"grip",rowDrag:"grip",save:"save",csvExport:"csv",excelExport:"excel",smallDown:"small-down",smallLeft:"small-left",smallRight:"small-right",smallUp:"small-up",sortAscending:"asc",sortDescending:"desc",sortUnSort:"none",advancedFilterBuilder:"group",advancedFilterBuilderDrag:"grip",advancedFilterBuilderInvalid:"not-allowed",advancedFilterBuilderMoveUp:"up",advancedFilterBuilderMoveDown:"down",advancedFilterBuilderAdd:"plus",advancedFilterBuilderRemove:"minus",chartsMenuEdit:"chart",chartsMenuAdvancedSettings:"settings",chartsMenuAdd:"plus"};function Xn(e,t,i){const n=Zn(e,t,i);if(n){const{className:e}=n;if("string"==typeof e&&e.indexOf("ag-icon")>-1||"object"==typeof e&&e["ag-icon"])return n}const s=document.createElement("span");return s.appendChild(n),s}function Zn(e,t,i,n){let s=null;const r=i&&i.getColDef().icons;if(r&&(s=r[e]),t&&!s){const i=t.get("icons");i&&(s=i[e])}if(!s){const t=document.createElement("span");let i=qn[e];return i||(n?i=e:(console.warn(`AG Grid: Did not find icon ${e}`),i="")),t.setAttribute("class",`ag-icon ag-icon-${i}`),t.setAttribute("unselectable","on"),Ut(t,"presentation"),t}{let e;if("function"==typeof s)e=s();else{if("string"!=typeof s)throw new Error("icon from grid options needs to be a string or a function");e=s}if("string"==typeof e)return An(e);if(Gn(e))return e;console.warn("AG Grid: iconRenderer should return back a string or a dom object")}}var Qn={};f(Qn,{isDeleteKey:()=>ss,isEventFromPrintableCharacter:()=>es,isUserSuppressingHeaderKeyboardEvent:()=>is,isUserSuppressingKeyboardEvent:()=>ts,normaliseQwertyAzerty:()=>ns});var Jn=class{};function es(e){return!(e.altKey||e.ctrlKey||e.metaKey)&&1===e.key.length}function ts(e,t,i,n,s){const r=n?n.getColDef().suppressKeyboardEvent:void 0;if(!r)return!1;const o=e.addGridCommonParams({event:t,editing:s,column:n,node:i,data:i.data,colDef:n.getColDef()});return!(!r||!r(o))}function is(e,t,i,n){const s=n.getDefinition(),r=s&&s.suppressHeaderKeyboardEvent;return!!S(r)&&!!r(e.addGridCommonParams({colDef:s,column:n,headerRowIndex:i,event:t}))}function ns(e){const{keyCode:t}=e;let i;switch(t){case 65:i=Jn.A;break;case 67:i=Jn.C;break;case 86:i=Jn.V;break;case 68:i=Jn.D;break;case 90:i=Jn.Z;break;case 89:i=Jn.Y;break;default:i=e.code}return i}function ss(e,t=!1){return e===Jn.DELETE||!t&&e===Jn.BACKSPACE&&Pi()}Jn.BACKSPACE="Backspace",Jn.TAB="Tab",Jn.ENTER="Enter",Jn.ESCAPE="Escape",Jn.SPACE=" ",Jn.LEFT="ArrowLeft",Jn.UP="ArrowUp",Jn.RIGHT="ArrowRight",Jn.DOWN="ArrowDown",Jn.DELETE="Delete",Jn.F2="F2",Jn.PAGE_UP="PageUp",Jn.PAGE_DOWN="PageDown",Jn.PAGE_HOME="Home",Jn.PAGE_END="End",Jn.A="KeyA",Jn.C="KeyC",Jn.D="KeyD",Jn.V="KeyV",Jn.X="KeyX",Jn.Y="KeyY",Jn.Z="KeyZ";var rs={};function os(e,t,i){if(0===i)return!1;const n=Math.abs(e.clientX-t.clientX),s=Math.abs(e.clientY-t.clientY);return Math.max(n,s)<=i}f(rs,{areEventsNear:()=>os});var as={};function ls(e,t){if(!e)return!1;const i=(e,i)=>{const n=t[e.id],s=t[i.id],r=void 0!==n,o=void 0!==s;return r&&o?n-s:r||o?r?1:-1:e.__objectId-i.__objectId};let n,s,r=!1;for(let t=0;t<e.length-1;t++)if(n=e[t],s=e[t+1],i(n,s)>0){r=!0;break}return!!r&&(e.sort(i),!0)}f(as,{sortRowNodesByOrder:()=>ls});var cs={};function hs(e){const t=new Set;return e.forEach(e=>t.add(e)),t}f(cs,{convertToSet:()=>hs});var ds=p(p(p(p(p(p(p(p(p(p(p(p(p(p(p(p(p(p({},Gt),Ie),Di),Ui),sn),De),z),Wn),C),Yn),Qn),Et),rs),Wi),k),as),cs),mt),us=class{constructor(e=0,t=1){this.nextValue=e,this.step=t}next(){const e=this.nextValue;return this.nextValue+=this.step,e}peek(){return this.nextValue}skip(e){this.nextValue+=e}},ps=(e=>(e[e.IN_PROGRESS=0]="IN_PROGRESS",e[e.RESOLVED=1]="RESOLVED",e))(ps||{}),gs=class e{constructor(e){this.status=0,this.resolution=null,this.waiters=[],e(e=>this.onDone(e),e=>this.onReject(e))}static all(t){return new e(e=>{let i=t.length;const n=new Array(i);t.forEach((t,s)=>{t.then(t=>{n[s]=t,i--,0===i&&e(n)})})})}static resolve(t=null){return new e(e=>e(t))}then(t){return new e(e=>{1===this.status?e(t(this.resolution)):this.waiters.push(i=>e(t(i)))})}resolveNow(e,t){return 1===this.status?t(this.resolution):e}onDone(e){this.status=1,this.resolution=e,this.waiters.forEach(t=>t(e))}onReject(e){console.warn("TBI")}},fs=class{constructor(){this.timestamp=(new Date).getTime()}print(e){const t=(new Date).getTime()-this.timestamp;console.info(`${e} = ${t}`),this.timestamp=(new Date).getTime()}},ms=class{constructor(e){this.cssClassStates={},this.getGui=e}addCssClass(e){const t=(e||"").split(" ");if(t.length>1)t.forEach(e=>this.addCssClass(e));else if(!0!==this.cssClassStates[e]&&e.length){const t=this.getGui();t&&t.classList.add(e),this.cssClassStates[e]=!0}}removeCssClass(e){const t=(e||"").split(" ");if(t.length>1)t.forEach(e=>this.removeCssClass(e));else if(!1!==this.cssClassStates[e]&&e.length){const t=this.getGui();t&&t.classList.remove(e),this.cssClassStates[e]=!1}}containsCssClass(e){const t=this.getGui();return!!t&&t.classList.contains(e)}addOrRemoveCssClass(e,t){if(e){if(e.indexOf(" ")>=0){const i=(e||"").split(" ");if(i.length>1)return void i.forEach(e=>this.addOrRemoveCssClass(e,t))}if(this.cssClassStates[e]!==t&&e.length){const i=this.getGui();i&&i.classList.toggle(e,t),this.cssClassStates[e]=t}}}},vs=class e extends ot{constructor(e,t,i,n){super(),this.parentComp=e,this.tooltipShowDelayOverride=t,this.tooltipHideDelayOverride=i,this.shouldDisplayTooltip=n,this.SHOW_QUICK_TOOLTIP_DIFF=1e3,this.FADE_OUT_TOOLTIP_TIMEOUT=1e3,this.INTERACTIVE_HIDE_DELAY=100,this.interactionEnabled=!1,this.isInteractingWithTooltip=!1,this.state=0,this.tooltipInstanceCount=0,this.tooltipMouseTrack=!1}postConstruct(){this.gos.get("tooltipInteraction")&&(this.interactionEnabled=!0),this.tooltipTrigger=this.getTooltipTrigger(),this.tooltipMouseTrack=this.gos.get("tooltipMouseTrack");const e=this.parentComp.getGui();0===this.tooltipTrigger&&(this.addManagedListener(e,"mouseenter",this.onMouseEnter.bind(this)),this.addManagedListener(e,"mouseleave",this.onMouseLeave.bind(this))),1===this.tooltipTrigger&&(this.addManagedListener(e,"focusin",this.onFocusIn.bind(this)),this.addManagedListener(e,"focusout",this.onFocusOut.bind(this))),this.addManagedListener(e,"mousemove",this.onMouseMove.bind(this)),this.interactionEnabled||(this.addManagedListener(e,"mousedown",this.onMouseDown.bind(this)),this.addManagedListener(e,"keydown",this.onKeyDown.bind(this)))}getGridOptionsTooltipDelay(e){const t=this.gos.get(e);return t<0&&j(`${e} should not be lower than 0`),Math.max(200,t)}getTooltipDelay(e){var t,i;return"show"===e?null!=(t=this.tooltipShowDelayOverride)?t:this.getGridOptionsTooltipDelay("tooltipShowDelay"):null!=(i=this.tooltipHideDelayOverride)?i:this.getGridOptionsTooltipDelay("tooltipHideDelay")}destroy(){this.setToDoNothing(),super.destroy()}getTooltipTrigger(){const e=this.gos.get("tooltipTrigger");return e&&"hover"!==e?1:0}onMouseEnter(t){this.interactionEnabled&&this.interactiveTooltipTimeoutId&&(this.unlockService(),this.startHideTimeout()),Ni()||(e.isLocked?this.showTooltipTimeoutId=window.setTimeout(()=>{this.prepareToShowTooltip(t)},this.INTERACTIVE_HIDE_DELAY):this.prepareToShowTooltip(t))}onMouseMove(e){this.lastMouseEvent&&(this.lastMouseEvent=e),this.tooltipMouseTrack&&2===this.state&&this.tooltipComp&&this.positionTooltip()}onMouseDown(){this.setToDoNothing()}onMouseLeave(){this.interactionEnabled?this.lockService():this.setToDoNothing()}onFocusIn(){this.prepareToShowTooltip()}onFocusOut(e){var t;const i=e.relatedTarget,n=this.parentComp.getGui(),s=null==(t=this.tooltipComp)?void 0:t.getGui();this.isInteractingWithTooltip||n.contains(i)||this.interactionEnabled&&(null==s?void 0:s.contains(i))||this.setToDoNothing()}onKeyDown(){this.setToDoNothing()}prepareToShowTooltip(t){if(0!=this.state||e.isLocked)return;let i=0;t&&(i=this.isLastTooltipHiddenRecently()?200:this.getTooltipDelay("show")),this.lastMouseEvent=t||null,this.showTooltipTimeoutId=window.setTimeout(this.showTooltip.bind(this),i),this.state=1}isLastTooltipHiddenRecently(){return(new Date).getTime()-e.lastTooltipHideTime<this.SHOW_QUICK_TOOLTIP_DIFF}setToDoNothing(){2===this.state&&this.hideTooltip(),this.onBodyScrollEventCallback&&(this.onBodyScrollEventCallback(),this.onBodyScrollEventCallback=void 0),this.onColumnMovedEventCallback&&(this.onColumnMovedEventCallback(),this.onColumnMovedEventCallback=void 0),this.clearTimeouts(),this.state=0,this.lastMouseEvent=null}showTooltip(){const e=p({},this.parentComp.getTooltipParams());if(!S(e.value)||this.shouldDisplayTooltip&&!this.shouldDisplayTooltip())return void this.setToDoNothing();this.state=2,this.tooltipInstanceCount++;const t=this.newTooltipComponentCallback.bind(this,this.tooltipInstanceCount);this.userComponentFactory.getTooltipCompDetails(e).newAgStackInstance().then(t)}hideTooltip(t){if(!t&&this.isInteractingWithTooltip)return;this.tooltipComp&&(this.destroyTooltipComp(),e.lastTooltipHideTime=(new Date).getTime());const i={type:dt.EVENT_TOOLTIP_HIDE,parentGui:this.parentComp.getGui()};this.eventService.dispatchEvent(i),this.state=0}newTooltipComponentCallback(e,t){if(2!==this.state||this.tooltipInstanceCount!==e)return void this.getContext().destroyBean(t);const i=t.getGui();this.tooltipComp=t,i.classList.contains("ag-tooltip")||i.classList.add("ag-tooltip-custom"),0===this.tooltipTrigger&&i.classList.add("ag-tooltip-animate"),this.interactionEnabled&&i.classList.add("ag-tooltip-interactive");const n=this.localeService.getLocaleTextFunc(),s=this.popupService.addPopup({eChild:i,ariaLabel:n("ariaLabelTooltip","Tooltip")});s&&(this.tooltipPopupDestroyFunc=s.hideFunc),this.positionTooltip(),1===this.tooltipTrigger&&(this.onBodyScrollEventCallback=this.addManagedListener(this.eventService,dt.EVENT_BODY_SCROLL,this.setToDoNothing.bind(this)),this.onColumnMovedEventCallback=this.addManagedListener(this.eventService,dt.EVENT_COLUMN_MOVED,this.setToDoNothing.bind(this))),this.interactionEnabled&&(0===this.tooltipTrigger?(this.tooltipMouseEnterListener=this.addManagedListener(i,"mouseenter",this.onTooltipMouseEnter.bind(this))||null,this.tooltipMouseLeaveListener=this.addManagedListener(i,"mouseleave",this.onTooltipMouseLeave.bind(this))||null):(this.tooltipFocusInListener=this.addManagedListener(i,"focusin",this.onTooltipFocusIn.bind(this))||null,this.tooltipFocusOutListener=this.addManagedListener(i,"focusout",this.onTooltipFocusOut.bind(this))||null));const r={type:dt.EVENT_TOOLTIP_SHOW,tooltipGui:i,parentGui:this.parentComp.getGui()};this.eventService.dispatchEvent(r),this.startHideTimeout()}onTooltipMouseEnter(){this.isInteractingWithTooltip=!0,this.unlockService()}onTooltipMouseLeave(){this.isInteractingWithTooltip=!1,this.lockService()}onTooltipFocusIn(){this.isInteractingWithTooltip=!0}onTooltipFocusOut(e){var t;const i=this.parentComp.getGui(),n=null==(t=this.tooltipComp)?void 0:t.getGui(),s=e.relatedTarget;(null==n?void 0:n.contains(s))||(this.isInteractingWithTooltip=!1,i.contains(s)?this.startHideTimeout():this.hideTooltip())}positionTooltip(){const e={type:"tooltip",ePopup:this.tooltipComp.getGui(),nudgeY:18,skipObserver:this.tooltipMouseTrack};this.lastMouseEvent?this.popupService.positionPopupUnderMouseEvent(g(p({},e),{mouseEvent:this.lastMouseEvent})):this.popupService.positionPopupByComponent(g(p({},e),{eventSource:this.parentComp.getGui(),position:"under",keepWithinBounds:!0,nudgeY:5}))}destroyTooltipComp(){this.tooltipComp.getGui().classList.add("ag-tooltip-hiding");const e=this.tooltipPopupDestroyFunc,t=this.tooltipComp,i=0===this.tooltipTrigger?this.FADE_OUT_TOOLTIP_TIMEOUT:0;window.setTimeout(()=>{e(),this.getContext().destroyBean(t)},i),this.clearTooltipListeners(),this.tooltipPopupDestroyFunc=void 0,this.tooltipComp=void 0}clearTooltipListeners(){[this.tooltipMouseEnterListener,this.tooltipMouseLeaveListener,this.tooltipFocusInListener,this.tooltipFocusOutListener].forEach(e=>{e&&e()}),this.tooltipMouseEnterListener=this.tooltipMouseLeaveListener=this.tooltipFocusInListener=this.tooltipFocusOutListener=null}lockService(){e.isLocked=!0,this.interactiveTooltipTimeoutId=window.setTimeout(()=>{this.unlockService(),this.setToDoNothing()},this.INTERACTIVE_HIDE_DELAY)}unlockService(){e.isLocked=!1,this.clearInteractiveTimeout()}startHideTimeout(){this.clearHideTimeout(),this.hideTooltipTimeoutId=window.setTimeout(this.hideTooltip.bind(this),this.getTooltipDelay("hide"))}clearShowTimeout(){this.showTooltipTimeoutId&&(window.clearTimeout(this.showTooltipTimeoutId),this.showTooltipTimeoutId=void 0)}clearHideTimeout(){this.hideTooltipTimeoutId&&(window.clearTimeout(this.hideTooltipTimeoutId),this.hideTooltipTimeoutId=void 0)}clearInteractiveTimeout(){this.interactiveTooltipTimeoutId&&(window.clearTimeout(this.interactiveTooltipTimeoutId),this.interactiveTooltipTimeoutId=void 0)}clearTimeouts(){this.clearShowTimeout(),this.clearHideTimeout(),this.clearInteractiveTimeout()}};vs.isLocked=!1,m([pe("popupService")],vs.prototype,"popupService",2),m([pe("userComponentFactory")],vs.prototype,"userComponentFactory",2),m([he],vs.prototype,"postConstruct",1);var ys=vs,Cs=class extends ot{constructor(e,t){super(),this.ctrl=e,t&&(this.beans=t)}postConstruct(){this.refreshToolTip()}setBrowserTooltip(e){const t="title",i=this.ctrl.getGui();i&&(null!=e&&""!=e?i.setAttribute(t,e):i.removeAttribute(t))}updateTooltipText(){this.tooltip=this.ctrl.getTooltipValue()}createTooltipFeatureIfNeeded(){var e,t,i,n;if(null!=this.tooltipManager)return;const s={getTooltipParams:()=>this.getTooltipParams(),getGui:()=>this.ctrl.getGui()};this.tooltipManager=this.createBean(new ys(s,null==(t=(e=this.ctrl).getTooltipShowDelayOverride)?void 0:t.call(e),null==(n=(i=this.ctrl).getTooltipHideDelayOverride)?void 0:n.call(i),this.ctrl.shouldDisplayTooltip),this.beans.context)}refreshToolTip(){this.browserTooltips=this.beans.gos.get("enableBrowserTooltips"),this.updateTooltipText(),this.browserTooltips?(this.setBrowserTooltip(this.tooltip),this.tooltipManager&&(this.tooltipManager=this.destroyBean(this.tooltipManager,this.beans.context))):(this.setBrowserTooltip(null),this.createTooltipFeatureIfNeeded())}getTooltipParams(){const e=this.ctrl,t=e.getColumn?e.getColumn():void 0,i=e.getColDef?e.getColDef():void 0,n=e.getRowNode?e.getRowNode():void 0;return{location:e.getLocation(),colDef:i,column:t,rowIndex:e.getRowIndex?e.getRowIndex():void 0,node:n,data:n?n.data:void 0,value:this.getTooltipText(),valueFormatted:e.getValueFormatted?e.getValueFormatted():void 0,hideTooltipCallback:()=>{var e;return null==(e=this.tooltipManager)?void 0:e.hideTooltip(!0)}}}getTooltipText(){return this.tooltip}destroy(){this.tooltipManager&&(this.tooltipManager=this.destroyBean(this.tooltipManager,this.beans.context)),super.destroy()}};m([pe("beans")],Cs.prototype,"beans",2),m([he],Cs.prototype,"postConstruct",1);var bs=new us,Ss=class e extends ot{constructor(e){super(),this.displayed=!0,this.visible=!0,this.compId=bs.next(),this.cssClassManager=new ms(()=>this.eGui),e&&this.setTemplate(e)}preConstructOnComponent(){this.usingBrowserTooltips=this.gos.get("enableBrowserTooltips")}getCompId(){return this.compId}getTooltipParams(){return{value:this.tooltipText,location:"UNKNOWN"}}setTooltip(e){const{newTooltipText:t,showDelayOverride:i,hideDelayOverride:n,location:s,shouldDisplayTooltip:r}=e||{};this.tooltipFeature&&(this.tooltipFeature=this.destroyBean(this.tooltipFeature)),this.tooltipText!==t&&(this.tooltipText=t);null!=t&&(this.tooltipFeature=this.createBean(new Cs({getTooltipValue:()=>this.tooltipText,getGui:()=>this.getGui(),getLocation:()=>null!=s?s:"UNKNOWN",getColDef:null==e?void 0:e.getColDef,getColumn:null==e?void 0:e.getColumn,getTooltipShowDelayOverride:null!=i?()=>i:void 0,getTooltipHideDelayOverride:null!=n?()=>n:void 0,shouldDisplayTooltip:r})))}createChildComponentsFromTags(e,t){Vn(e.childNodes).forEach(i=>{if(!(i instanceof HTMLElement))return;const n=this.createComponentFromElement(i,e=>{e.getGui()&&this.copyAttributesFromNode(i,e.getGui())},t);if(n){if(n.addItems&&i.children.length){this.createChildComponentsFromTags(i,t);const e=Array.prototype.slice.call(i.children);n.addItems(e)}this.swapComponentForNode(n,e,i)}else i.childNodes&&this.createChildComponentsFromTags(i,t)})}createComponentFromElement(t,i,n){const s=t.nodeName,r=n?n[t.getAttribute("ref")]:void 0,o=this.agStackComponentsRegistry.getComponentClass(s);if(o){e.elementGettingCreated=t;const n=new o(r);return n.setParentComponent(this),this.createBean(n,null,i),n}return null}copyAttributesFromNode(e,t){Bn(e.attributes,(e,i)=>t.setAttribute(e,i))}swapComponentForNode(e,t,i){const n=e.getGui();t.replaceChild(n,i),t.insertBefore(document.createComment(i.nodeName),n),this.addDestroyFunc(this.destroyBean.bind(this,e)),this.swapInComponentForQuerySelectors(e,i)}swapInComponentForQuerySelectors(e,t){const i=this;this.iterateOverQuerySelectors(n=>{i[n.attributeName]===t&&(i[n.attributeName]=e)})}iterateOverQuerySelectors(e){let t=Object.getPrototypeOf(this);for(;null!=t;){const i=t.__agComponentMetaData,n=$(t.constructor);i&&i[n]&&i[n].querySelectors&&i[n].querySelectors.forEach(t=>e(t)),t=Object.getPrototypeOf(t)}}activateTabIndex(e){const t=this.gos.get("tabIndex");e||(e=[]),e.length||e.push(this.getGui()),e.forEach(e=>e.setAttribute("tabindex",t.toString()))}setTemplate(e,t){const i=An(e);this.setTemplateFromElement(i,t)}setTemplateFromElement(e,t){this.eGui=e,this.eGui.__agComponent=this,this.wireQuerySelectors(),this.getContext()&&this.createChildComponentsFromTags(this.getGui(),t)}createChildComponentsPreConstruct(){this.getGui()&&this.createChildComponentsFromTags(this.getGui())}wireQuerySelectors(){if(!this.eGui)return;const e=this;this.iterateOverQuerySelectors(t=>{const i=i=>e[t.attributeName]=i;if(t.refSelector&&this.getAttribute("ref")===t.refSelector)i(this.eGui);else{const e=this.eGui.querySelector(t.querySelector);e&&i(e.__agComponent||e)}})}getGui(){return this.eGui}getFocusableElement(){return this.eGui}getAriaElement(){return this.getFocusableElement()}setParentComponent(e){this.parentComponent=e}getParentComponent(){return this.parentComponent}setGui(e){this.eGui=e}queryForHtmlElement(e){return this.eGui.querySelector(e)}queryForHtmlInputElement(e){return this.eGui.querySelector(e)}appendChild(e,t){if(null!=e)if(t||(t=this.eGui),Gn(e))t.appendChild(e);else{const i=e;t.appendChild(i.getGui())}}isDisplayed(){return this.displayed}setVisible(e,t={}){if(e!==this.visible){this.visible=e;const{skipAriaHidden:i}=t;hn(this.eGui,e,{skipAriaHidden:i})}}setDisplayed(t,i={}){if(t!==this.displayed){this.displayed=t;const{skipAriaHidden:n}=i;cn(this.eGui,t,{skipAriaHidden:n});const s={type:e.EVENT_DISPLAYED_CHANGED,visible:this.displayed};this.dispatchEvent(s)}}destroy(){this.parentComponent&&(this.parentComponent=void 0),this.tooltipFeature&&(this.tooltipFeature=this.destroyBean(this.tooltipFeature));const e=this.eGui;e&&e.__agComponent&&(e.__agComponent=void 0),super.destroy()}addGuiEventListener(e,t,i){this.eGui.addEventListener(e,t,i),this.addDestroyFunc(()=>this.eGui.removeEventListener(e,t))}addCssClass(e){this.cssClassManager.addCssClass(e)}removeCssClass(e){this.cssClassManager.removeCssClass(e)}containsCssClass(e){return this.cssClassManager.containsCssClass(e)}addOrRemoveCssClass(e,t){this.cssClassManager.addOrRemoveCssClass(e,t)}getAttribute(e){const{eGui:t}=this;return t?t.getAttribute(e):null}getRefElement(e){return this.queryForHtmlElement(`[ref="${e}"]`)}};Ss.EVENT_DISPLAYED_CHANGED="displayedChanged",m([pe("agStackComponentsRegistry")],Ss.prototype,"agStackComponentsRegistry",2),m([ce],Ss.prototype,"preConstructOnComponent",1),m([ce],Ss.prototype,"createChildComponentsPreConstruct",1);var ws=Ss;function xs(e){return Ms.bind(this,e,void 0)}function Es(e){return Ms.bind(this,`[ref=${e}]`,e)}function Ms(e,t,i,n,s){null!==e?"number"!=typeof s?function(e,t,i){const n=function(e,t){return e.__agComponentMetaData||(e.__agComponentMetaData={}),e.__agComponentMetaData[t]||(e.__agComponentMetaData[t]={}),e.__agComponentMetaData[t]}(e,$(e.constructor));n[t]||(n[t]=[]),n[t].push(i)}(i,"querySelectors",{attributeName:n,querySelector:e,refSelector:t}):console.error("AG Grid: QuerySelector should be on an attribute"):console.error("AG Grid: QuerySelector selector should not be null")}var As=class extends ws{constructor(){super('\n            <div class="ag-floating-filter-input" role="presentation">\n                <ag-input-text-field ref="eFloatingFilterText"></ag-input-text-field>\n            </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){null!=e?this.params.parentFilterInstance(t=>{if(t.getModelAsString){const i=t.getModelAsString(e);this.eFloatingFilterText.setValue(i)}}):this.eFloatingFilterText.setValue("")}onParamsUpdated(e){this.refresh(e)}refresh(e){this.init(e)}};m([Es("eFloatingFilterText")],As.prototype,"eFloatingFilterText",2),m([pe("columnModel")],As.prototype,"columnModel",2);var Ts=class{constructor(e,t,i,n,s){this.alive=!0,this.context=e,this.eParent=n,t.getDateCompDetails(i).newAgStackInstance().then(t=>{this.alive?(this.dateComp=t,t&&(n.appendChild(t.getGui()),t.afterGuiAttached&&t.afterGuiAttached(),this.tempValue&&t.setDate(this.tempValue),null!=this.disabled&&this.setDateCompDisabled(this.disabled),null==s||s(this))):e.destroyBean(t)})}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){cn(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&&"function"==typeof this.dateComp.afterGuiAttached&&this.dateComp.afterGuiAttached(e)}updateParams(e){var t,i;let n=!1;(null==(t=this.dateComp)?void 0:t.refresh)&&"function"==typeof this.dateComp.refresh&&null!==this.dateComp.refresh(e)&&(n=!0),!n&&(null==(i=this.dateComp)?void 0:i.onParamsUpdated)&&"function"==typeof this.dateComp.onParamsUpdated&&null!==this.dateComp.onParamsUpdated(e)&&j("Custom date component method 'onParamsUpdated' is deprecated. Use 'refresh' instead.")}setDateCompDisabled(e){null!=this.dateComp&&null!=this.dateComp.setDisabled&&this.dateComp.setDisabled(e)}},Ds=class{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=>{"string"!=typeof e&&([["displayKey"],["displayName"],["predicate","test"]].every(t=>!!t.some(t=>null!=e[t])||(console.warn(`AG Grid: ignoring FilterOptionDef as it doesn't contain one of '${t}'`),!1))?this.customFilterOptions[e.displayKey]=e:this.filterOptions=this.filterOptions.filter(t=>t===e)||[])})}selectDefaultItem(e){if(e.defaultOption)this.defaultOption=e.defaultOption;else if(this.filterOptions.length>=1){const e=this.filterOptions[0];"string"==typeof e?this.defaultOption=e:e.displayKey?this.defaultOption=e.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]}},Is={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",orCondition:"OR",dateFormatOoo:"yyyy-mm-dd"},Rs=class e extends ot{constructor(e,t={}){super(),this.eFocusableElement=e,this.callbacks=t,this.callbacks=p({shouldStopEventPropagation:()=>!1,onTabKeyDown:e=>{if(e.defaultPrevented)return;const t=this.focusService.findNextFocusableElement(this.eFocusableElement,!1,e.shiftKey);t&&(t.focus(),e.preventDefault())}},t)}postConstruct(){this.eFocusableElement.classList.add(e.FOCUS_MANAGED_CLASS),this.addKeyDownListeners(this.eFocusableElement),this.callbacks.onFocusIn&&this.addManagedListener(this.eFocusableElement,"focusin",this.callbacks.onFocusIn),this.callbacks.onFocusOut&&this.addManagedListener(this.eFocusableElement,"focusout",this.callbacks.onFocusOut)}addKeyDownListeners(e){this.addManagedListener(e,"keydown",e=>{e.defaultPrevented||Qe(e)||(this.callbacks.shouldStopEventPropagation(e)?Ze(e):e.key===Jn.TAB?this.callbacks.onTabKeyDown(e):this.callbacks.handleKeyDown&&this.callbacks.handleKeyDown(e))})}};Rs.FOCUS_MANAGED_CLASS="ag-focus-managed",m([pe("focusService")],Rs.prototype,"focusService",2),m([he],Rs.prototype,"postConstruct",1);var Ls=Rs,ks="ag-resizer-wrapper",Ps=`<div class="${ks}">\n        <div ref="eTopLeftResizer" class="ag-resizer ag-resizer-topLeft"></div>\n        <div ref="eTopResizer" class="ag-resizer ag-resizer-top"></div>\n        <div ref="eTopRightResizer" class="ag-resizer ag-resizer-topRight"></div>\n        <div ref="eRightResizer" class="ag-resizer ag-resizer-right"></div>\n        <div ref="eBottomRightResizer" class="ag-resizer ag-resizer-bottomRight"></div>\n        <div ref="eBottomResizer" class="ag-resizer ag-resizer-bottom"></div>\n        <div ref="eBottomLeftResizer" class="ag-resizer ag-resizer-bottomLeft"></div>\n        <div ref="eLeftResizer" class="ag-resizer ag-resizer-left"></div>\n    </div>`,Ns=class extends ot{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:s,height:r,x:o,y:a}=this.config;this.offsetParent||this.setOffsetParent();let l=0,c=0;const h=Mn(this.element);if(h){const e=this.findBoundaryElement(),t=window.getComputedStyle(e);if(null!=t.minWidth){const i=e.offsetWidth-this.element.offsetWidth;c=parseInt(t.minWidth,10)-i}if(null!=t.minHeight){const i=e.offsetHeight-this.element.offsetHeight;l=parseInt(t.minHeight,10)-i}}if(this.minHeight=s||l,this.minWidth=i||c,n&&this.setWidth(n),r&&this.setHeight(r),n&&r||this.refreshSize(),e)this.center();else if(o||a)this.offsetElement(o,a);else if(h&&t){let e=this.boundaryEl,t=!0;if(e||(e=this.findBoundaryElement(),t=!1),e){const i=parseFloat(e.style.top),n=parseFloat(e.style.left);t?this.offsetElement(isNaN(n)?0:n,isNaN(i)?0:i):this.setPosition(n,i)}}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(),"boolean"==typeof e){if(!1===e)return;e={topLeft:e,top:e,topRight:e,right:e,bottomRight:e,bottom:e,bottomLeft:e,left:e}}Object.keys(e).forEach(t=>{const i=!!e[t],n=this.getResizerElement(t),s={dragStartPixels:0,eElement:n,onDragStart:e=>this.onResizeStart(e,t),onDragging:this.onResize.bind(this),onDragStop:e=>this.onResizeEnd(e,t)};(i||!this.isAlive()&&!i)&&(i?(this.dragService.addDragSource(s),this.resizeListeners.push(s),n.style.pointerEvents="all"):n.style.pointerEvents="none",this.resizable[t]=i)})}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;-1!==t&&(this.element.style.width=`${t}px`),-1!==e&&(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("string"==typeof e&&-1!==e.indexOf("%"))_n(i,e),e=mn(i),n=!0;else if(e=Math.max(this.minHeight,e),this.positioned){const t=this.getAvailableHeight();t&&e>t&&(e=t)}this.getHeight()!==e&&(n?(i.style.maxHeight="unset",i.style.minHeight="unset"):t?_n(i,e):(i.style.height=`${e}px`,i.style.flex="0 0 auto",this.lastSize.height="number"==typeof e?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(),s=this.offsetParent.getBoundingClientRect(),r=e?this.position.y:n.top,o=e?0:s.top;let a=0;if(t){const e=this.element.parentElement;if(e){const{bottom:t}=e.getBoundingClientRect();a=t-n.bottom}}return i+o-r-a}getWidth(){return this.element.offsetWidth}setWidth(e){const t=this.element,{popup:i}=this.config;let n=!1;if("string"==typeof e&&-1!==e.indexOf("%"))Nn(t,e),e=vn(t),n=!0;else if(this.positioned){e=Math.max(this.minWidth,e);const{clientWidth:t}=this.offsetParent,n=i?this.position.x:this.element.getBoundingClientRect().left;t&&e+n>t&&(e=t-n)}this.getWidth()!==e&&(n?(t.style.maxWidth="unset",t.style.minWidth="unset"):this.config.popup?Nn(t,e):(t.style.width=`${e}px`,t.style.flex=" unset",this.lastSize.width="number"==typeof e?e:parseFloat(e)))}offsetElement(e=0,t=0){const{forcePopupParentAsOffsetParent:i}=this.config,n=i?this.boundaryEl:this.element;n&&(this.popupService.positionPopup({ePopup:n,keepWithinBounds:!0,skipObserver:this.movable||this.isResizable(),updatePosition:()=>({x:e,y:t})}),this.setPosition(parseFloat(n.style.left),parseFloat(n.style.top)))}constrainSizeToAvailableHeight(e){if(!this.config.forcePopupParentAsOffsetParent)return;e?this.resizeObserverSubscriber=this.resizeObserverService.observeResize(this.popupService.getPopupParent(),()=>{const e=this.getAvailableHeight();this.element.style.setProperty("max-height",`${e}px`)}):(this.element.style.removeProperty("max-height"),this.resizeObserverSubscriber&&(this.resizeObserverSubscriber(),this.resizeObserverSubscriber=void 0))}setPosition(e,t){this.position.x=e,this.position.y=t}updateDragStartPosition(e,t){this.dragStartPosition={x:e,y:t}}calculateMouseMovement(e){const{e:t,isLeft:i,isTop:n,anywhereWithin:s,topBuffer:r}=e,o=t.clientX-this.dragStartPosition.x,a=t.clientY-this.dragStartPosition.y;return{movementX:this.shouldSkipX(t,!!i,!!s,o)?0:o,movementY:this.shouldSkipY(t,!!n,r,a)?0:a}}shouldSkipX(e,t,i,n){const s=this.element.getBoundingClientRect(),r=this.offsetParent.getBoundingClientRect(),o=this.boundaryEl.getBoundingClientRect(),a=this.config.popup?this.position.x:s.left;let l=a<=0&&r.left>=e.clientX||r.right<=e.clientX&&r.right<=o.right;return!!l||(l=t?n<0&&e.clientX>a+r.left||n>0&&e.clientX<a+r.left:i?n<0&&e.clientX>o.right||n>0&&e.clientX<a+r.left:n<0&&e.clientX>o.right||n>0&&e.clientX<o.right,l)}shouldSkipY(e,t,i=0,n){const s=this.element.getBoundingClientRect(),r=this.offsetParent.getBoundingClientRect(),o=this.boundaryEl.getBoundingClientRect(),a=this.config.popup?this.position.y:s.top;let l=a<=0&&r.top>=e.clientY||r.bottom<=e.clientY&&r.bottom<=o.bottom;return!!l||(l=t?n<0&&e.clientY>a+r.top+i||n>0&&e.clientY<a+r.top:n<0&&e.clientY>o.bottom||n>0&&e.clientY<o.bottom,l)}createResizeMap(){const e=this.element;this.resizerMap={topLeft:{element:e.querySelector("[ref=eTopLeftResizer]")},top:{element:e.querySelector("[ref=eTopResizer]")},topRight:{element:e.querySelector("[ref=eTopRightResizer]")},right:{element:e.querySelector("[ref=eRightResizer]")},bottomRight:{element:e.querySelector("[ref=eBottomRightResizer]")},bottom:{element:e.querySelector("[ref=eBottomResizer]")},bottomLeft:{element:e.querySelector("[ref=eBottomLeftResizer]")},left:{element:e.querySelector("[ref=eLeftResizer]")}}}addResizers(){if(this.resizersAdded)return;const e=this.element;if(!e)return;const t=(new DOMParser).parseFromString(Ps,"text/html").body;e.appendChild(t.firstChild),this.createResizeMap(),this.resizersAdded=!0}removeResizers(){this.resizerMap=void 0;const e=this.element.querySelector(`.${ks}`);e&&this.element.removeChild(e),this.resizersAdded=!1}getResizerElement(e){return this.resizerMap[e].element}onResizeStart(e,t){this.boundaryEl=this.findBoundaryElement(),this.positioned||this.initialisePosition(),this.currentResizer={isTop:!!t.match(/top/i),isRight:!!t.match(/right/i),isBottom:!!t.match(/bottom/i),isLeft:!!t.match(/left/i)},this.element.classList.add("ag-resizing"),this.resizerMap[t].element.classList.add("ag-active");const{popup:i,forcePopupParentAsOffsetParent:n}=this.config;i||n||this.applySizeToSiblings(this.currentResizer.isBottom||this.currentResizer.isTop),this.isResizing=!0,this.updateDragStartPosition(e.clientX,e.clientY)}getSiblings(){const e=this.element.parentElement;return e?Array.prototype.slice.call(e.children).filter(e=>!e.classList.contains("ag-hidden")):null}getMinSizeOfSiblings(){const e=this.getSiblings()||[];let t=0,i=0;for(let n=0;n<e.length;n++){const s=e[n],r=!!s.style.flex&&"0 0 auto"!==s.style.flex;if(s===this.element)continue;let o=this.minHeight||0,a=this.minWidth||0;if(r){const e=window.getComputedStyle(s);e.minHeight&&(o=parseInt(e.minHeight,10)),e.minWidth&&(a=parseInt(e.minWidth,10))}else o=s.offsetHeight,a=s.offsetWidth;t+=o,i+=a}return{height:t,width:i}}applySizeToSiblings(e){let t=null;const i=this.getSiblings();if(i){for(let n=0;n<i.length;n++){const s=i[n];s!==t&&(e?s.style.height=`${s.offsetHeight}px`:s.style.width=`${s.offsetWidth}px`,s.style.flex="0 0 auto",s===this.element&&(t=i[n+1]))}t&&(t.style.removeProperty("height"),t.style.removeProperty("min-height"),t.style.removeProperty("max-height"),t.style.flex="1 1 auto")}}isResizable(){return Object.values(this.resizable).some(e=>e)}onResize(e){if(!this.isResizing||!this.currentResizer)return;const{popup:t,forcePopupParentAsOffsetParent:i}=this.config,{isTop:n,isRight:s,isBottom:r,isLeft:o}=this.currentResizer,a=s||o,l=r||n,{movementX:c,movementY:h}=this.calculateMouseMovement({e,isLeft:o,isTop:n}),d=this.position.x,u=this.position.y;let p=0,g=0;if(a&&c){const e=o?-1:1,t=this.getWidth(),i=t+c*e;let n=!1;o&&(p=t-i,(d+p<=0||i<=this.minWidth)&&(n=!0,p=0)),n||this.setWidth(i)}if(l&&h){const e=n?-1:1,t=this.getHeight(),i=t+h*e;let s=!1;n?(g=t-i,(u+g<=0||i<=this.minHeight)&&(s=!0,g=0)):!this.config.popup&&!this.config.forcePopupParentAsOffsetParent&&t<i&&this.getMinSizeOfSiblings().height+i>this.element.parentElement.offsetHeight&&(s=!0),s||this.setHeight(i)}this.updateDragStartPosition(e.clientX,e.clientY),((t||i)&&p||g)&&this.offsetElement(d+p,u+g)}onResizeEnd(e,t){this.isResizing=!1,this.currentResizer=null,this.boundaryEl=null,this.element.classList.remove("ag-resizing"),this.resizerMap[t].element.classList.remove("ag-active"),this.dispatchEvent({type:"resize"})}refreshSize(){const e=this.element;this.config.popup&&(this.config.width||this.setWidth(e.offsetWidth),this.config.height||this.setHeight(e.offsetHeight))}onMoveStart(e){this.boundaryEl=this.findBoundaryElement(),this.positioned||this.initialisePosition(),this.isMoving=!0,this.element.classList.add("ag-moving"),this.updateDragStartPosition(e.clientX,e.clientY)}onMove(e){if(!this.isMoving)return;const{x:t,y:i}=this.position;let n;this.config.calculateTopBuffer&&(n=this.config.calculateTopBuffer());const{movementX:s,movementY:r}=this.calculateMouseMovement({e,isTop:!0,anywhereWithin:!0,topBuffer:n});this.offsetElement(t+s,i+r),this.updateDragStartPosition(e.clientX,e.clientY)}onMoveEnd(){this.isMoving=!1,this.boundaryEl=null,this.element.classList.remove("ag-moving")}setOffsetParent(){this.config.forcePopupParentAsOffsetParent?this.offsetParent=this.popupService.getPopupParent():this.offsetParent=this.element.offsetParent}findBoundaryElement(){let e=this.element;for(;e;){if("static"!==window.getComputedStyle(e).position)return e;e=e.parentElement}return this.element}clearResizeListeners(){for(;this.resizeListeners.length;){const e=this.resizeListeners.pop();this.dragService.removeDragSource(e)}}destroy(){super.destroy(),this.moveElementDragListener&&this.dragService.removeDragSource(this.moveElementDragListener),this.constrainSizeToAvailableHeight(!1),this.clearResizeListeners(),this.removeResizers()}};m([pe("popupService")],Ns.prototype,"popupService",2),m([pe("resizeObserverService")],Ns.prototype,"resizeObserverService",2),m([pe("dragService")],Ns.prototype,"dragService",2);var Os=class e extends ws{constructor(e){super(),this.filterNameKey=e,this.applyActive=!1,this.hidePopup=null,this.debouncePending=!1,this.appliedModel=null,this.buttonListeners=[]}postConstruct(){this.resetTemplate(),this.createManagedBean(new Ls(this.getFocusableElement(),{handleKeyDown:this.handleKeyDown.bind(this)})),this.positionableFeature=new Ns(this.getPositionableElement(),{forcePopupParentAsOffsetParent:!0}),this.createBean(this.positionableFeature)}handleKeyDown(e){}getFilterTitle(){return this.translate(this.filterNameKey)}isFilterActive(){return!!this.appliedModel}resetTemplate(e){let t=this.getGui();t&&t.removeEventListener("submit",this.onFormSubmit);const i=`\n            <form class="ag-filter-wrapper">\n                <div class="ag-filter-body-wrapper ag-${this.getCssIdentifier()}-body-wrapper" ref="eFilterBody">\n                    ${this.createBodyTemplate()}\n                </div>\n            </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(t){this.providedFilterParams=t,this.applyActive=e.isUseApplyButton(t),this.resetButtonsPanel()}updateParams(t){this.providedFilterParams=t,this.applyActive=e.isUseApplyButton(t),this.resetUiToActiveModel(this.getModel(),()=>{this.updateUiVisibility(),this.setupOnBtApplyDebounce()})}resetButtonsPanel(){const{buttons:e}=this.providedFilterParams,t=e&&e.length>0&&!this.isReadOnly();if(this.eButtonsPanel?(wn(this.eButtonsPanel),this.buttonListeners.forEach(e=>null==e?void 0:e()),this.buttonListeners=[]):t&&(this.eButtonsPanel=document.createElement("div"),this.eButtonsPanel.classList.add("ag-filter-apply-panel")),!t)return void(this.eButtonsPanel&&xn(this.eButtonsPanel));const i=document.createDocumentFragment(),n=e=>{let t,n;switch(e){case"apply":t=this.translate("applyFilter"),n=e=>this.onBtApply(!1,!1,e);break;case"clear":t=this.translate("clearFilter"),n=()=>this.onBtClear();break;case"reset":t=this.translate("resetFilter"),n=()=>this.onBtReset();break;case"cancel":t=this.translate("cancelFilter"),n=e=>{this.onBtCancel(e)};break;default:return void console.warn("AG Grid: Unknown button type specified")}const s=An(`<button\n                    type="${"apply"===e?"submit":"button"}"\n                    ref="${e}FilterButton"\n                    class="ag-button ag-standard-button ag-filter-apply-panel-button"\n                >${t}\n                </button>`);this.buttonListeners.push(this.addManagedListener(s,"click",n)),i.append(s)};hs(e).forEach(e=>n(e)),this.eButtonsPanel.append(i),this.getGui().appendChild(this.eButtonsPanel)}getDefaultDebounceMs(){return 0}setupOnBtApplyDebounce(){const t=e.getDebounceMs(this.providedFilterParams,this.getDefaultDebounceMs()),i=ee(this.checkApplyDebounce.bind(this),t);this.onBtApplyDebounce=()=>{this.debouncePending=!0,i()}}checkApplyDebounce(){this.debouncePending&&(this.debouncePending=!1,this.onBtApply())}getModel(){return this.appliedModel?this.appliedModel:null}setModel(e){return(null!=e?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"),null==t||t()};null!=e?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 i="columnFilter";this.providedFilterParams.filterChangedCallback({afterFloatingFilter:e,afterDataChange:t,source:i})}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;"Enter"!==i&&"Space"!==i||(n={keyboardEvent:t}),this.hidePopup(n),this.hidePopup=null}onUiChanged(e=!1,t){if(this.updateUiVisibility(),this.providedFilterParams.filterModifiedCallback(),this.applyActive&&!this.isReadOnly()){const e=this.isModelValid(this.getModelFromUi()),t=this.getRefElement("applyFilterButton");t&&dn(t,!e)}e&&!t||"immediately"===t?this.onBtApply(e):(this.applyActive||t)&&"debounce"!==t||this.onBtApplyDebounce()}afterGuiAttached(e){e&&(this.hidePopup=e.hidePopup),this.refreshFilterResizer(null==e?void 0:e.container)}refreshFilterResizer(e){if(!this.positionableFeature||"toolPanel"===e)return;const t="floatingFilter"===e||"columnFilter"===e,{positionableFeature:i,gos: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(t,i){return e.isUseApplyButton(t)?(null!=t.debounceMs&&console.warn("AG Grid: debounceMs is ignored when apply button is present"),0):null!=t.debounceMs?t.debounceMs:i}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,Is[e])}getCellValue(e){return this.providedFilterParams.getValue(e)}getPositionableElement(){return this.eFilterBody}};m([pe("rowModel")],Os.prototype,"rowModel",2),m([Es("eFilterBody")],Os.prototype,"eFilterBody",2),m([he],Os.prototype,"postConstruct",1);var _s=Os,Fs=class extends ws{constructor(e,t){super(t),this.labelSeparator="",this.labelAlignment="left",this.disabled=!1,this.label="",this.config=e||{}}postConstruct(){this.addCssClass("ag-labeled"),this.eLabel.classList.add("ag-label");const{labelSeparator:e,label:t,labelWidth:i,labelAlignment:n,disabled:s}=this.config;null!=s&&this.setDisabled(s),null!=e&&this.setLabelSeparator(e),null!=t&&this.setLabel(t),null!=i&&this.setLabelWidth(i),this.setLabelAlignment(n||this.labelAlignment),this.refreshLabel()}refreshLabel(){wn(this.eLabel),"string"==typeof this.label?this.eLabel.innerText=this.label+this.labelSeparator:this.label&&this.eLabel.appendChild(this.label),""===this.label?(cn(this.eLabel,!1),Ut(this.eLabel,"presentation")):(cn(this.eLabel,!0),Ut(this.eLabel,null))}setLabelSeparator(e){return this.labelSeparator===e||(this.labelSeparator=e,null!=this.label&&this.refreshLabel()),this}getLabelId(){return this.eLabel.id=this.eLabel.id||`ag-${this.getCompId()}-label`,this.eLabel.id}getLabel(){return this.label}setLabel(e){return this.label===e||(this.label=e,this.refreshLabel()),this}setLabelAlignment(e){const t=this.getGui().classList;return t.toggle("ag-label-align-left","left"===e),t.toggle("ag-label-align-right","right"===e),t.toggle("ag-label-align-top","top"===e),this}setLabelEllipsis(e){return this.eLabel.classList.toggle("ag-label-ellipsis",e),this}setLabelWidth(e){return null==this.label||Pn(this.eLabel,e),this}setDisabled(e){e=!!e;const t=this.getGui();return dn(t,e),t.classList.toggle("ag-disabled",e),this.disabled=e,this}isDisabled(){return!!this.disabled}};m([he],Fs.prototype,"postConstruct",1);var Gs=class extends Fs{constructor(e,t,i){super(e,t),this.className=i}postConstruct(){super.postConstruct();const{width:e,value:t,onValueChange:i}=this.config;null!=e&&this.setWidth(e),null!=t&&this.setValue(t),null!=i&&this.onValueChange(i),this.className&&this.addCssClass(this.className),this.refreshAriaLabelledBy()}refreshAriaLabelledBy(){const e=this.getAriaElement(),t=this.getLabelId();null!==$t(e)?qt(e,""):qt(e,null!=t?t:"")}setAriaLabel(e){return Yt(this.getAriaElement(),e),this.refreshAriaLabelledBy(),this}onValueChange(e){return this.addManagedListener(this,dt.EVENT_FIELD_VALUE_CHANGED,()=>e(this.getValue())),this}getWidth(){return this.getGui().clientWidth}setWidth(e){return Nn(this.getGui(),e),this}getPreviousValue(){return this.previousValue}getValue(){return this.value}setValue(e,t){return this.value===e||(this.previousValue=this.value,this.value=e,t||this.dispatchEvent({type:dt.EVENT_FIELD_VALUE_CHANGED})),this}},Vs=class extends Gs{constructor(e){if(super(e,(null==e?void 0:e.template)||'\n    <div class="ag-picker-field" role="presentation">\n        <div ref="eLabel"></div>\n            <div ref="eWrapper" class="ag-wrapper ag-picker-field-wrapper ag-picker-collapsed">\n            <div ref="eDisplayField" class="ag-picker-field-display"></div>\n            <div ref="eIcon" class="ag-picker-field-icon" aria-hidden="true"></div>\n        </div>\n    </div>',null==e?void 0:e.className),this.isPickerDisplayed=!1,this.skipClick=!1,this.pickerGap=4,this.hideCurrentPicker=null,this.ariaRole=null==e?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:s,maxPickerWidth:r}=e;null!=t&&(this.pickerGap=t),this.variableWidth=!!n,null!=i&&this.setPickerMaxHeight(i),null!=s&&this.setPickerMinWidth(s),null!=r&&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,inputWidth:n}=this.config;if(i){const e=Zn(i,this.gos);e&&this.eIcon.appendChild(e)}null!=n&&this.setInputWidth(n)}setupAria(){const e=this.getAriaElement();e.setAttribute("tabindex",this.gos.get("tabIndex").toString()),si(e,!1),this.ariaRole&&Ut(e,this.ariaRole)}onLabelOrWrapperMouseDown(e){if(e){const t=this.getFocusableElement();if(t!==this.eWrapper&&(null==e?void 0:e.target)===t)return;e.preventDefault(),this.getFocusableElement().focus()}this.skipClick?this.skipClick=!1:this.isDisabled()||(this.isPickerDisplayed?this.hidePicker():this.showPicker())}onKeyDown(e){switch(e.key){case Jn.UP:case Jn.DOWN:case Jn.ENTER:case Jn.SPACE:e.preventDefault(),this.onLabelOrWrapperMouseDown();break;case Jn.ESCAPE:this.isPickerDisplayed&&(e.preventDefault(),e.stopPropagation(),this.hideCurrentPicker&&this.hideCurrentPicker())}}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.gos.getDocument(),t=this.pickerComponent.getGui();this.gos.get("suppressScrollWhenPopupsAreOpen")||(this.destroyMouseWheelFunc=this.addManagedListener(this.eventService,dt.EVENT_BODY_SCROLL,()=>{this.hidePicker()}));const i=this.localeService.getLocaleTextFunc(),{pickerAriaLabelKey:n,pickerAriaLabelValue:s,modalPicker:r=!0}=this.config,o={modal:r,eChild:t,closeOnEsc:!0,closedCallback:()=>{const t=this.gos.getActiveDomElement(),i=!t||t===e.body;this.beforeHidePicker(),i&&this.isAlive()&&this.getFocusableElement().focus()},ariaLabel:i(n,s)},a=this.popupService.addPopup(o),{maxPickerHeight:l,minPickerWidth:c,maxPickerWidth:h,variableWidth:d}=this;d?(c&&(t.style.minWidth=c),t.style.width=Fn(vn(this.eWrapper)),h&&(t.style.maxWidth=h)):Pn(t,null!=h?h:vn(this.eWrapper));const u=null!=l?l:`${gn(this.popupService.getPopupParent())}px`;return t.style.setProperty("max-height",u),t.style.position="absolute",this.alignPickerToComponent(),a.hideFunc}alignPickerToComponent(){if(!this.pickerComponent)return;const{pickerType:e}=this.config,{pickerGap:t}=this,i=this.gos.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){this.isAlive()&&(si(this.getAriaElement(),e),this.eWrapper.classList.toggle("ag-picker-expanded",e),this.eWrapper.classList.toggle("ag-picker-collapsed",!e))}onPickerFocusIn(){this.togglePickerHasFocus(!0)}onPickerFocusOut(e){var t;(null==(t=this.pickerComponent)?void 0:t.getGui().contains(e.relatedTarget))||this.togglePickerHasFocus(!1)}togglePickerHasFocus(e){this.pickerComponent&&this.eWrapper.classList.toggle("ag-picker-has-focus",e)}hidePicker(){this.hideCurrentPicker&&this.hideCurrentPicker()}setInputWidth(e){return Pn(this.eWrapper,e),this}getFocusableElement(){return this.eWrapper}setPickerGap(e){return this.pickerGap=e,this}setPickerMinWidth(e){return"number"==typeof e&&(e=`${e}px`),this.minPickerWidth=null==e?void 0:e,this}setPickerMaxWidth(e){return"number"==typeof e&&(e=`${e}px`),this.maxPickerWidth=null==e?void 0:e,this}setPickerMaxHeight(e){return"number"==typeof e&&(e=`${e}px`),this.maxPickerHeight=null==e?void 0:e,this}destroy(){this.hidePicker(),super.destroy()}};m([pe("popupService")],Vs.prototype,"popupService",2),m([Es("eLabel")],Vs.prototype,"eLabel",2),m([Es("eWrapper")],Vs.prototype,"eWrapper",2),m([Es("eDisplayField")],Vs.prototype,"eDisplayField",2),m([Es("eIcon")],Vs.prototype,"eIcon",2);var Bs=class e extends ws{constructor(e="default",t=!1){super(`<div class="ag-list ag-${e}-list" role="listbox"></div>`),this.cssIdentifier=e,this.unFocusable=t,this.options=[],this.itemEls=[]}init(){const e=this.getGui();this.addManagedListener(e,"mouseleave",()=>this.clearHighlighted()),this.unFocusable||this.addManagedListener(e,"keydown",this.handleKeyDown.bind(this))}handleKeyDown(e){const t=e.key;switch(t){case Jn.ENTER:if(this.highlightedEl){const e=this.itemEls.indexOf(this.highlightedEl);this.setValueByIndex(e)}else this.setValue(this.getValue());break;case Jn.DOWN:case Jn.UP:e.preventDefault(),this.navigate(t);break;case Jn.PAGE_DOWN:case Jn.PAGE_UP:case Jn.PAGE_HOME:case Jn.PAGE_END:e.preventDefault(),this.navigateToPage(t)}}navigate(e){const t=e===Jn.DOWN;let i;if(this.highlightedEl){let e=this.itemEls.indexOf(this.highlightedEl)+(t?1:-1);e=Math.min(Math.max(e,0),this.itemEls.length-1),i=this.itemEls[e]}else i=this.itemEls[t?0:this.itemEls.length-1];this.highlightItem(i)}navigateToPage(e){if(!this.highlightedEl||0===this.itemEls.length)return;const t=this.itemEls.indexOf(this.highlightedEl),i=this.options.length-1,n=this.itemEls[0].clientHeight,s=Math.floor(this.getGui().clientHeight/n);let r=-1;e===Jn.PAGE_HOME?r=0:e===Jn.PAGE_END?r=i:e===Jn.PAGE_DOWN?r=Math.min(t+s,i):e===Jn.PAGE_UP&&(r=Math.max(t-s,0)),-1!==r&&this.highlightItem(this.itemEls[r])}addOptions(e){return e.forEach(e=>this.addOption(e)),this}addOption(e){const{value:t,text:i}=e,n=i||t;return this.options.push({value:t,text:n}),this.renderOption(t,n),this.updateIndices(),this}clearOptions(){this.options=[],this.reset(!0),this.itemEls.forEach(e=>{xn(e)}),this.itemEls=[]}updateIndices(){const e=this.getGui().querySelectorAll(".ag-list-item");e.forEach((t,i)=>{ai(t,i+1),oi(t,e.length)})}renderOption(e,t){const i=this.gos.getDocument(),n=i.createElement("div");Ut(n,"option"),n.classList.add("ag-list-item",`ag-${this.cssIdentifier}-list-item`);const s=i.createElement("span");n.appendChild(s),s.textContent=t,this.unFocusable||(n.tabIndex=-1),this.itemEls.push(n),this.addManagedListener(n,"mousemove",()=>this.highlightItem(n)),this.addManagedListener(n,"mousedown",t=>{t.preventDefault(),this.setValue(e)}),this.createManagedBean(new Cs({getTooltipValue:()=>t,getGui:()=>n,getLocation:()=>"UNKNOWN",shouldDisplayTooltip:()=>s.scrollWidth>s.clientWidth})),this.getGui().appendChild(n)}setValue(e,t){if(this.value===e)return this.fireItemSelected(),this;if(null==e)return this.reset(t),this;const i=this.options.findIndex(t=>t.value===e);if(-1!==i){const e=this.options[i];this.value=e.value,this.displayValue=e.text,this.highlightItem(this.itemEls[i]),t||this.fireChangeEvent()}return this}setValueByIndex(e){return this.setValue(this.options[e].value)}getValue(){return this.value}getDisplayValue(){return this.displayValue}refreshHighlighted(){this.clearHighlighted();const e=this.options.findIndex(e=>e.value===this.value);-1!==e&&this.highlightItem(this.itemEls[e])}reset(e){this.value=null,this.displayValue=null,this.clearHighlighted(),e||this.fireChangeEvent()}highlightItem(t){if(!Mn(t))return;this.clearHighlighted(),this.highlightedEl=t,this.highlightedEl.classList.add(e.ACTIVE_CLASS),mi(this.highlightedEl,!0);const i=this.getGui(),{scrollTop:n,clientHeight:s}=i,{offsetTop:r,offsetHeight:o}=t;(r+o>n+s||r<n)&&this.highlightedEl.scrollIntoView({block:"nearest"}),this.unFocusable||this.highlightedEl.focus()}clearHighlighted(){this.highlightedEl&&Mn(this.highlightedEl)&&(this.highlightedEl.classList.remove(e.ACTIVE_CLASS),mi(this.highlightedEl,!1),this.highlightedEl=null)}fireChangeEvent(){this.dispatchEvent({type:dt.EVENT_FIELD_VALUE_CHANGED}),this.fireItemSelected()}fireItemSelected(){this.dispatchEvent({type:e.EVENT_ITEM_SELECTED})}};Bs.EVENT_ITEM_SELECTED="selectedItem",Bs.ACTIVE_CLASS="ag-active-item",m([he],Bs.prototype,"init",1);var Hs=Bs,zs=class e extends Vs{constructor(e){super(p({pickerAriaLabelKey:"ariaLabelSelectField",pickerAriaLabelValue:"Select Field",pickerType:"ag-list",className:"ag-select",pickerIcon:"smallDown",ariaRole:"combobox"},e))}postConstruct(){super.postConstruct(),this.createListComponent(),this.eWrapper.tabIndex=this.gos.get("tabIndex");const{options:e,value:t,placeholder:i}=this.config;null!=e&&this.addOptions(e),null!=t&&this.setValue(t,!0),i&&null==t&&(this.eDisplayField.textContent=i),this.addManagedListener(this.eWrapper,"focusout",this.onWrapperFocusOut.bind(this))}onWrapperFocusOut(e){this.eWrapper.contains(e.relatedTarget)||this.hidePicker()}createListComponent(){this.listComponent=this.createBean(new Hs("select",!0)),this.listComponent.setParentComponent(this);const t=this.listComponent.getAriaElement(),i=`ag-select-list-${this.listComponent.getCompId()}`;t.setAttribute("id",i),yi(this.getAriaElement(),t),this.listComponent.addManagedListener(this.listComponent,Hs.EVENT_ITEM_SELECTED,()=>{this.hidePicker(),this.dispatchEvent({type:e.EVENT_ITEM_SELECTED})}),this.listComponent.addManagedListener(this.listComponent,dt.EVENT_FIELD_VALUE_CHANGED,()=>{this.listComponent&&(this.setValue(this.listComponent.getValue(),!1,!0),this.hidePicker())})}createPickerComponent(){return this.listComponent}onKeyDown(e){var t;const{key:i}=e;switch(i===Jn.TAB&&this.hidePicker(),i){case Jn.ENTER:case Jn.UP:case Jn.DOWN:case Jn.PAGE_UP:case Jn.PAGE_DOWN:case Jn.PAGE_HOME:case Jn.PAGE_END:e.preventDefault(),this.isPickerDisplayed?null==(t=this.listComponent)||t.handleKeyDown(e):super.onKeyDown(e);break;case Jn.ESCAPE:super.onKeyDown(e)}}showPicker(){this.listComponent&&(super.showPicker(),this.listComponent.refreshHighlighted())}addOptions(e){return e.forEach(e=>this.addOption(e)),this}addOption(e){return this.listComponent.addOption(e),this}clearOptions(){var e;return null==(e=this.listComponent)||e.clearOptions(),this}setValue(e,t,i){if(this.value===e||!this.listComponent)return this;if(i||this.listComponent.setValue(e,!0),this.listComponent.getValue()===this.getValue())return this;let n=this.listComponent.getDisplayValue();return null==n&&this.config.placeholder&&(n=this.config.placeholder),this.eDisplayField.textContent=n,this.setTooltip({newTooltipText:null!=n?n:null,shouldDisplayTooltip:()=>this.eDisplayField.scrollWidth>this.eDisplayField.clientWidth}),super.setValue(e,t)}destroy(){this.listComponent&&(this.destroyBean(this.listComponent),this.listComponent=void 0),super.destroy()}};zs.EVENT_ITEM_SELECTED="selectedItem";var Us=zs,Ws=class extends Gs{constructor(e,t,i="text",n="input"){super(e,`\n            <div role="presentation">\n                <div ref="eLabel" class="ag-input-field-label"></div>\n                <div ref="eWrapper" class="ag-wrapper ag-input-wrapper" role="presentation">\n                    <${n} ref="eInput" class="ag-input-field-input"></${n}>\n                </div>\n            </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{inputName:e,inputWidth:t}=this.config;null!=e&&this.setInputName(e),null!=t&&this.setInputWidth(t),this.addInputListeners(),this.activateTabIndex([this.eInput])}addInputListeners(){this.addManagedListener(this.eInput,"input",e=>this.setValue(e.target.value))}setInputType(){"input"===this.displayFieldTag&&this.eInput.setAttribute("type",this.inputType)}getInputElement(){return this.eInput}setInputWidth(e){return Pn(this.eWrapper,e),this}setInputName(e){return this.getInputElement().setAttribute("name",e),this}getFocusableElement(){return this.eInput}setMaxLength(e){return this.eInput.maxLength=e,this}setInputPlaceholder(e){return Hn(this.eInput,"placeholder",e),this}setInputAriaLabel(e){return Yt(this.eInput,e),this.refreshAriaLabelledBy(),this}setDisabled(e){return dn(this.eInput,e),super.setDisabled(e)}setAutoComplete(e){if(!0===e)Hn(this.eInput,"autocomplete",null);else{const t="string"==typeof e?e:"off";Hn(this.eInput,"autocomplete",t)}return this}};m([Es("eLabel")],Ws.prototype,"eLabel",2),m([Es("eWrapper")],Ws.prototype,"eWrapper",2),m([Es("eInput")],Ws.prototype,"eInput",2);var js=class extends Ws{constructor(e,t="ag-checkbox",i="checkbox"){super(e,t,i),this.labelAlignment="right",this.selected=!1,this.readOnly=!1,this.passive=!1}postConstruct(){super.postConstruct();const{readOnly:e,passive:t}=this.config;"boolean"==typeof e&&this.setReadOnly(e),"boolean"==typeof t&&this.setPassive(t)}addInputListeners(){this.addManagedListener(this.eInput,"click",this.onCheckboxClick.bind(this)),this.addManagedListener(this.eLabel,"click",this.toggle.bind(this))}getNextValue(){return void 0===this.selected||!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){return this.getInputElement().name=e,this}isSelected(){return this.selected}setSelected(e,t){this.isSelected()!==e&&(this.previousValue=this.isSelected(),e=this.selected="boolean"==typeof e?e:void 0,this.eInput.checked=e,this.eInput.indeterminate=void 0===e,t||this.dispatchChange(this.selected,this.previousValue))}dispatchChange(e,t,i){this.dispatchEvent({type:dt.EVENT_FIELD_VALUE_CHANGED,selected:e,previousValue:t,event:i});const n=this.getInputElement(),s={type:dt.EVENT_CHECKBOX_CHANGED,id:n.id,name:n.name,selected:e,previousValue:t};this.eventService.dispatchEvent(s)}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",!0===e),this.eWrapper.classList.toggle("ag-indeterminate",null==e)}},Ks=class extends js{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,dt.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)}},$s=class{constructor(e,t,i){this.localeService=e,this.optionsFactory=t,this.valueFormatter=i}getModelAsString(e){if(!e)return null;const t=null!=e.operator,i=this.localeService.getLocaleTextFunc();if(t){const t=e;let{conditions:n}=t;if(!n){const{condition1:e,condition2:i}=t;n=[e,i]}const s=n.map(e=>this.getModelAsString(e)),r="AND"===t.operator?"andCondition":"orCondition";return s.join(` ${i(r,Is[r])} `)}if(e.type===qs.BLANK||e.type===qs.NOT_BLANK)return i(e.type,e.type);{const t=e,n=this.optionsFactory.getCustomOption(t.type),{displayKey:s,displayName:r,numberOfInputs:o}=n||{};return s&&r&&0===o?(i(s,r),r):this.conditionToString(t,n)}}updateParams(e){this.optionsFactory=e.optionsFactory}formatValue(e){var t;return this.valueFormatter?null!=(t=this.valueFormatter(null!=e?e:null))?t:"":String(e)}},Ys=class e extends _s{constructor(){super(...arguments),this.eTypes=[],this.eJoinOperatorPanels=[],this.eJoinOperatorsAnd=[],this.eJoinOperatorsOr=[],this.eConditionBodies=[],this.listener=()=>this.onUiChanged(),this.lastUiCompletePosition=null,this.joinOperatorId=0}getNumberOfInputs(t){const i=this.optionsFactory.getCustomOption(t);if(i){const{numberOfInputs:e}=i;return null!=e?e:1}const n=[e.EMPTY,e.NOT_BLANK,e.BLANK];return t&&n.indexOf(t)>=0?0:t===e.IN_RANGE?2:1}onFloatingFilterChanged(e,t){this.setTypeFromFloatingFilter(e),this.setValueFromFloatingFilter(t),this.onUiChanged(!0)}setTypeFromFloatingFilter(e){this.eTypes.forEach((t,i)=>{0===i?t.setValue(e,!0):t.setValue(this.optionsFactory.getDefaultOption(),!0)})}getModelFromUi(){const e=this.getUiCompleteConditions();return 0===e.length?null:this.maxNumConditions>1&&e.length>1?{filterType:this.getFilterType(),operator:this.getJoinOperator(),condition1:e[0],condition2:e[1],conditions:e}:e[0]}getConditionTypes(){return this.eTypes.map(e=>e.getValue())}getConditionType(e){return this.eTypes[e].getValue()}getJoinOperator(){return 0===this.eJoinOperatorsOr.length?this.defaultJoinOperator:!0===this.eJoinOperatorsOr[0].getValue()?"OR":"AND"}areModelsEqual(e,t){if(!e&&!t)return!0;if(!e&&t||e&&!t)return!1;const i=!e.operator,n=!t.operator;if(!i&&n||i&&!n)return!1;let s;if(i){const i=e,n=t;s=this.areSimpleModelsEqual(i,n)}else{const i=e,n=t;s=i.operator===n.operator&&ke(i.conditions,n.conditions,(e,t)=>this.areSimpleModelsEqual(e,t))}return s}shouldRefresh(e){var t,i,n;const s=this.getModel(),r=s?null!=(t=s.conditions)?t:[s]:null,o=null!=(n=null==(i=e.filterOptions)?void 0:i.map(e=>"string"==typeof e?e:e.displayKey))?n:this.getDefaultFilterOptions();return!(r&&!r.every(e=>void 0!==o.find(t=>t===e.type))||"number"==typeof e.maxNumConditions&&r&&r.length>e.maxNumConditions)}refresh(e){return!!this.shouldRefresh(e)&&(!!super.refresh(e)&&(this.setParams(e),this.removeConditionsAndOperators(0),this.createOption(),this.setModel(this.getModel()),!0))}setModelIntoUi(e){if(e.operator){let t=e;t.conditions||(t.conditions=[t.condition1,t.condition2]);const i=this.validateAndUpdateConditions(t.conditions),n=this.getNumConditions();if(i<n)this.removeConditionsAndOperators(i);else if(i>n)for(let e=n;e<i;e++)this.createJoinOperatorPanel(),this.createOption();const s="OR"===t.operator;this.eJoinOperatorsAnd.forEach(e=>e.setValue(!s,!0)),this.eJoinOperatorsOr.forEach(e=>e.setValue(s,!0)),t.conditions.forEach((e,t)=>{this.eTypes[t].setValue(e.type,!0),this.setConditionIntoUi(e,t)})}else{const t=e;this.getNumConditions()>1&&this.removeConditionsAndOperators(1),this.eTypes[0].setValue(t.type,!0),this.setConditionIntoUi(t,0)}return this.lastUiCompletePosition=this.getNumConditions()-1,this.createMissingConditionsAndOperators(),this.onUiChanged(),gs.resolve()}validateAndUpdateConditions(e){let t=e.length;return t>this.maxNumConditions&&(e.splice(this.maxNumConditions),j('Filter Model contains more conditions than "filterParams.maxNumConditions". Additional conditions have been ignored.'),t=this.maxNumConditions),t}doesFilterPass(e){var t;const i=this.getModel();if(null==i)return!0;const{operator:n}=i,s=[];if(n){const e=i;s.push(...null!=(t=e.conditions)?t:[])}else s.push(i);return s[n&&"OR"===n?"some":"every"](t=>this.individualConditionPasses(e,t))}setParams(e){super.setParams(e),this.setNumConditions(e),this.defaultJoinOperator=this.getDefaultJoinOperator(e.defaultJoinOperator),this.filterPlaceholder=e.filterPlaceholder,this.optionsFactory=new Ds,this.optionsFactory.init(e,this.getDefaultFilterOptions()),this.createFilterListOptions(),this.createOption(),this.createMissingConditionsAndOperators(),this.isReadOnly()&&this.eFilterBody.setAttribute("tabindex","-1")}setNumConditions(e){var t,i;null!=e.suppressAndOrCondition&&j('Since v29.2 "filterParams.suppressAndOrCondition" is deprecated. Use "filterParams.maxNumConditions = 1" instead.'),null!=e.alwaysShowBothConditions&&j('Since v29.2 "filterParams.alwaysShowBothConditions" is deprecated. Use "filterParams.numAlwaysVisibleConditions = 2" instead.'),this.maxNumConditions=null!=(t=e.maxNumConditions)?t:e.suppressAndOrCondition?1:2,this.maxNumConditions<1&&(j('"filterParams.maxNumConditions" must be greater than or equal to zero.'),this.maxNumConditions=1),this.numAlwaysVisibleConditions=null!=(i=e.numAlwaysVisibleConditions)?i:e.alwaysShowBothConditions?2:1,this.numAlwaysVisibleConditions<1&&(j('"filterParams.numAlwaysVisibleConditions" must be greater than or equal to zero.'),this.numAlwaysVisibleConditions=1),this.numAlwaysVisibleConditions>this.maxNumConditions&&(j('"filterParams.numAlwaysVisibleConditions" cannot be greater than "filterParams.maxNumConditions".'),this.numAlwaysVisibleConditions=this.maxNumConditions)}createOption(){const e=this.createManagedBean(new Us);this.eTypes.push(e),e.addCssClass("ag-filter-select"),this.eFilterBody.appendChild(e.getGui());const t=this.createValueElement();this.eConditionBodies.push(t),this.eFilterBody.appendChild(t),this.putOptionsIntoDropdown(e),this.resetType(e);const i=this.getNumConditions()-1;this.forEachPositionInput(i,e=>this.resetInput(e)),this.addChangedListeners(e,i)}createJoinOperatorPanel(){const e=document.createElement("div");this.eJoinOperatorPanels.push(e),e.classList.add("ag-filter-condition");const t=this.createJoinOperator(this.eJoinOperatorsAnd,e,"and"),i=this.createJoinOperator(this.eJoinOperatorsOr,e,"or");this.eFilterBody.appendChild(e);const n=this.eJoinOperatorPanels.length-1,s=this.joinOperatorId++;this.resetJoinOperatorAnd(t,n,s),this.resetJoinOperatorOr(i,n,s),this.isReadOnly()||(t.onValueChange(this.listener),i.onValueChange(this.listener))}createJoinOperator(e,t,i){const n=this.createManagedBean(new Ks);return e.push(n),n.addCssClass("ag-filter-condition-operator"),n.addCssClass(`ag-filter-condition-operator-${i}`),t.appendChild(n.getGui()),n}getDefaultJoinOperator(e){return"AND"===e||"OR"===e?e:"AND"}createFilterListOptions(){const e=this.optionsFactory.getFilterOptions();this.filterListOptions=e.map(e=>"string"==typeof e?this.createBoilerplateListOption(e):this.createCustomListOption(e))}putOptionsIntoDropdown(e){this.filterListOptions.forEach(t=>{e.addOption(t)}),e.setDisabled(this.filterListOptions.length<=1)}createBoilerplateListOption(e){return{value:e,text:this.translate(e)}}createCustomListOption(e){const{displayKey:t}=e,i=this.optionsFactory.getCustomOption(e.displayKey);return{value:t,text:i?this.localeService.getLocaleTextFunc()(i.displayKey,i.displayName):this.translate(t)}}isAllowTwoConditions(){return this.maxNumConditions>=2}createBodyTemplate(){return""}getCssIdentifier(){return"simple-filter"}updateUiVisibility(){const e=this.getJoinOperator();this.updateNumConditions(),this.updateConditionStatusesAndValues(this.lastUiCompletePosition,e)}updateNumConditions(){var e;let t=-1,i=!0;for(let e=0;e<this.getNumConditions();e++)this.isConditionUiComplete(e)?t=e:i=!1;if(this.shouldAddNewConditionAtEnd(i))this.createJoinOperatorPanel(),this.createOption();else{const i=null!=(e=this.lastUiCompletePosition)?e:this.getNumConditions()-2;if(t<i){this.removeConditionsAndOperators(i+1);const e=t+1,n=i-e;n>0&&this.removeConditionsAndOperators(e,n),this.createMissingConditionsAndOperators()}}this.lastUiCompletePosition=t}updateConditionStatusesAndValues(e,t){this.eTypes.forEach((t,i)=>{const n=this.isConditionDisabled(i,e);t.setDisabled(n||this.filterListOptions.length<=1),1===i&&(dn(this.eJoinOperatorPanels[0],n),this.eJoinOperatorsAnd[0].setDisabled(n),this.eJoinOperatorsOr[0].setDisabled(n))}),this.eConditionBodies.forEach((e,t)=>{cn(e,this.isConditionBodyVisible(t))});const i="OR"===(null!=t?t:this.getJoinOperator());this.eJoinOperatorsAnd.forEach((e,t)=>{e.setValue(!i,!0)}),this.eJoinOperatorsOr.forEach((e,t)=>{e.setValue(i,!0)}),this.forEachInput((t,i,n,s)=>{this.setElementDisplayed(t,i<s),this.setElementDisabled(t,this.isConditionDisabled(n,e))}),this.resetPlaceholder()}shouldAddNewConditionAtEnd(e){return e&&this.getNumConditions()<this.maxNumConditions&&!this.isReadOnly()}removeConditionsAndOperators(e,t){if(e>=this.getNumConditions())return;this.removeComponents(this.eTypes,e,t),this.removeElements(this.eConditionBodies,e,t),this.removeValueElements(e,t);const i=Math.max(e-1,0);this.removeElements(this.eJoinOperatorPanels,i,t),this.removeComponents(this.eJoinOperatorsAnd,i,t),this.removeComponents(this.eJoinOperatorsOr,i,t)}removeElements(e,t,i){this.removeItems(e,t,i).forEach(e=>xn(e))}removeComponents(e,t,i){this.removeItems(e,t,i).forEach(e=>{xn(e.getGui()),this.destroyBean(e)})}removeItems(e,t,i){return null==i?e.splice(t):e.splice(t,i)}afterGuiAttached(e){if(super.afterGuiAttached(e),this.resetPlaceholder(),!(null==e?void 0:e.suppressFocus))if(this.isReadOnly())this.eFilterBody.focus();else{const e=this.getInputs(0)[0];if(!e)return;e instanceof Ws&&e.getInputElement().focus()}}afterGuiDetached(){super.afterGuiDetached();const e=this.getModel();this.resetUiToActiveModel(e);let t=-1,i=-1,n=!1;const s=this.getJoinOperator();for(let e=this.getNumConditions()-1;e>=0;e--)if(this.isConditionUiComplete(e))-1===t&&(t=e,i=e);else{const s=e<t;(e>=this.numAlwaysVisibleConditions&&!this.isConditionUiComplete(e-1)||s)&&(this.removeConditionsAndOperators(e,1),n=!0,s&&i--)}let r=!1;this.getNumConditions()<this.numAlwaysVisibleConditions&&(this.createMissingConditionsAndOperators(),r=!0),this.shouldAddNewConditionAtEnd(i===this.getNumConditions()-1)&&(this.createJoinOperatorPanel(),this.createOption(),r=!0),r&&this.updateConditionStatusesAndValues(i,s),n&&this.updateJoinOperatorsDisabled(),this.lastUiCompletePosition=i}getPlaceholderText(e,t){let i=this.translate(e);if(Y(this.filterPlaceholder)){const e=this.filterPlaceholder,n=this.eTypes[t].getValue();i=e({filterOptionKey:n,filterOption:this.translate(n),placeholder:i})}else"string"==typeof this.filterPlaceholder&&(i=this.filterPlaceholder);return i}resetPlaceholder(){const e=this.localeService.getLocaleTextFunc();this.forEachInput((t,i,n,s)=>{if(!(t instanceof Ws))return;const r=0===i&&s>1?"inRangeStart":0===i?"filterOoo":"inRangeEnd",o=0===i&&s>1?e("ariaFilterFromValue","Filter from value"):0===i?e("ariaFilterValue","Filter Value"):e("ariaFilterToValue","Filter to Value");t.setInputPlaceholder(this.getPlaceholderText(r,n)),t.setInputAriaLabel(o)})}setElementValue(e,t,i){e instanceof Ws&&e.setValue(null!=t?String(t):null,!0)}setElementDisplayed(e,t){e instanceof ws&&cn(e.getGui(),t)}setElementDisabled(e,t){e instanceof ws&&dn(e.getGui(),t)}attachElementOnChange(e,t){e instanceof Ws&&e.onValueChange(t)}forEachInput(e){this.getConditionTypes().forEach((t,i)=>{this.forEachPositionTypeInput(i,t,e)})}forEachPositionInput(e,t){const i=this.getConditionType(e);this.forEachPositionTypeInput(e,i,t)}forEachPositionTypeInput(e,t,i){const n=this.getNumberOfInputs(t),s=this.getInputs(e);for(let t=0;t<s.length;t++){const r=s[t];null!=r&&i(r,t,e,n)}}isConditionDisabled(e,t){return!!this.isReadOnly()||0!==e&&e>t+1}isConditionBodyVisible(e){const t=this.getConditionType(e);return this.getNumberOfInputs(t)>0}isConditionUiComplete(t){return!(t>=this.getNumConditions())&&(this.getConditionType(t)!==e.EMPTY&&!this.getValues(t).some(e=>null==e))}getNumConditions(){return this.eTypes.length}getUiCompleteConditions(){const e=[];for(let t=0;t<this.getNumConditions();t++)this.isConditionUiComplete(t)&&e.push(this.createCondition(t));return e}createMissingConditionsAndOperators(){if(!this.isReadOnly())for(let e=this.getNumConditions();e<this.numAlwaysVisibleConditions;e++)this.createJoinOperatorPanel(),this.createOption()}resetUiToDefaults(e){return this.removeConditionsAndOperators(this.isReadOnly()?1:this.numAlwaysVisibleConditions),this.eTypes.forEach(e=>this.resetType(e)),this.eJoinOperatorsAnd.forEach((e,t)=>this.resetJoinOperatorAnd(e,t,this.joinOperatorId+t)),this.eJoinOperatorsOr.forEach((e,t)=>this.resetJoinOperatorOr(e,t,this.joinOperatorId+t)),this.joinOperatorId++,this.forEachInput(e=>this.resetInput(e)),this.resetPlaceholder(),this.createMissingConditionsAndOperators(),this.lastUiCompletePosition=null,e||this.onUiChanged(),gs.resolve()}resetType(e){const t=this.localeService.getLocaleTextFunc()("ariaFilteringOperator","Filtering operator");e.setValue(this.optionsFactory.getDefaultOption(),!0).setAriaLabel(t).setDisabled(this.isReadOnly()||this.filterListOptions.length<=1)}resetJoinOperatorAnd(e,t,i){this.resetJoinOperator(e,t,this.isDefaultOperator("AND"),this.translate("andCondition"),i)}resetJoinOperatorOr(e,t,i){this.resetJoinOperator(e,t,this.isDefaultOperator("OR"),this.translate("orCondition"),i)}resetJoinOperator(e,t,i,n,s){this.updateJoinOperatorDisabled(e.setValue(i,!0).setName(`ag-simple-filter-and-or-${this.getCompId()}-${s}`).setLabel(n),t)}updateJoinOperatorsDisabled(){this.eJoinOperatorsAnd.forEach((e,t)=>this.updateJoinOperatorDisabled(e,t)),this.eJoinOperatorsOr.forEach((e,t)=>this.updateJoinOperatorDisabled(e,t))}updateJoinOperatorDisabled(e,t){e.setDisabled(this.isReadOnly()||t>0)}resetInput(e){this.setElementValue(e,null),this.setElementDisabled(e,this.isReadOnly())}setConditionIntoUi(e,t){const i=this.mapValuesFromModel(e);this.forEachInput((e,n,s,r)=>{s===t&&this.setElementValue(e,null!=i[n]?i[n]:null)})}setValueFromFloatingFilter(e){this.forEachInput((t,i,n,s)=>{this.setElementValue(t,0===i&&0===n?e:null,!0)})}isDefaultOperator(e){return e===this.defaultJoinOperator}addChangedListeners(e,t){this.isReadOnly()||(e.onValueChange(this.listener),this.forEachPositionInput(t,e=>{this.attachElementOnChange(e,this.listener)}))}individualConditionPasses(e,t){const i=this.getCellValue(e.node),n=this.mapValuesFromModel(t),s=this.optionsFactory.getCustomOption(t.type),r=this.evaluateCustomFilter(s,n,i);return null!=r?r:null==i?this.evaluateNullValue(t.type):this.evaluateNonNullValue(n,i,t,e)}evaluateCustomFilter(e,t,i){if(null==e)return;const{predicate:n}=e;return null==n||t.some(e=>null==e)?void 0:n(t,i)}isBlank(e){return null==e||"string"==typeof e&&0===e.trim().length}hasInvalidInputs(){return!1}};Ys.EMPTY="empty",Ys.BLANK="blank",Ys.NOT_BLANK="notBlank",Ys.EQUALS="equals",Ys.NOT_EQUAL="notEqual",Ys.LESS_THAN="lessThan",Ys.LESS_THAN_OR_EQUAL="lessThanOrEqual",Ys.GREATER_THAN="greaterThan",Ys.GREATER_THAN_OR_EQUAL="greaterThanOrEqual",Ys.IN_RANGE="inRange",Ys.CONTAINS="contains",Ys.NOT_CONTAINS="notContains",Ys.STARTS_WITH="startsWith",Ys.ENDS_WITH="endsWith";var qs=Ys,Xs=class e extends qs{setParams(e){super.setParams(e),this.scalarFilterParams=e}evaluateNullValue(t){switch(t){case e.EQUALS:case e.NOT_EQUAL:if(this.scalarFilterParams.includeBlanksInEquals)return!0;break;case e.GREATER_THAN:case e.GREATER_THAN_OR_EQUAL:if(this.scalarFilterParams.includeBlanksInGreaterThan)return!0;break;case e.LESS_THAN:case e.LESS_THAN_OR_EQUAL:if(this.scalarFilterParams.includeBlanksInLessThan)return!0;break;case e.IN_RANGE:if(this.scalarFilterParams.includeBlanksInRange)return!0;break;case e.BLANK:return!0;case e.NOT_BLANK:return!1}return!1}evaluateNonNullValue(t,i,n){const s=this.comparator(),r=null!=t[0]?s(t[0],i):0;switch(n.type){case e.EQUALS:return 0===r;case e.NOT_EQUAL:return 0!==r;case e.GREATER_THAN:return r>0;case e.GREATER_THAN_OR_EQUAL:return r>=0;case e.LESS_THAN:return r<0;case e.LESS_THAN_OR_EQUAL:return r<=0;case e.IN_RANGE:{const e=s(t[1],i);return this.scalarFilterParams.inRangeInclusive?r>=0&&e<=0:r>0&&e<0}case e.BLANK:return this.isBlank(i);case e.NOT_BLANK:return!this.isBlank(i);default:return console.warn('AG Grid: Unexpected type of filter "'+n.type+'", it looks like the filter was configured with incorrect Filter Options'),!0}}},Zs=1/0,Qs=class extends $s{constructor(e,t,i){super(t,i),this.dateFilterParams=e}conditionToString(e,t){const{type:i}=e,{numberOfInputs:n}=t||{},s=i==qs.IN_RANGE||2===n,r=tn(e.dateFrom),o=tn(e.dateTo),a=this.dateFilterParams.inRangeFloatingFilterDateFormat;return s?`${null!==r?en(r,a):"null"}-${null!==o?en(o,a):"null"}`:null!=r?en(r,a):`${i}`}updateParams(e){super.updateParams(e),this.dateFilterParams=e.dateFilterParams}},Js=class e extends Xs{constructor(){super("dateFilter"),this.eConditionPanelsFrom=[],this.eConditionPanelsTo=[],this.dateConditionFromComps=[],this.dateConditionToComps=[],this.minValidYear=1e3,this.maxValidYear=Zs,this.minValidDate=null,this.maxValidDate=null}afterGuiAttached(e){super.afterGuiAttached(e),this.dateConditionFromComps[0].afterGuiAttached(e)}mapValuesFromModel(e){const{dateFrom:t,dateTo:i,type:n}=e||{};return[t&&tn(t)||null,i&&tn(i)||null].slice(0,this.getNumberOfInputs(n))}comparator(){return this.dateFilterParams.comparator?this.dateFilterParams.comparator:this.defaultComparator.bind(this)}defaultComparator(e,t){return null==t||t<e?-1:t>e?1:0}setParams(e){this.dateFilterParams=e,super.setParams(e);const t=(t,i)=>{if(null!=e[t]){if(!isNaN(e[t]))return null==e[t]?i:Number(e[t]);console.warn(`AG Grid: DateFilter ${t} is not a number`)}return i};this.minValidYear=t("minValidYear",1e3),this.maxValidYear=t("maxValidYear",Zs),this.minValidYear>this.maxValidYear&&console.warn("AG Grid: DateFilter minValidYear should be <= maxValidYear"),e.minValidDate?this.minValidDate=e.minValidDate instanceof Date?e.minValidDate:tn(e.minValidDate):this.minValidDate=null,e.maxValidDate?this.maxValidDate=e.maxValidDate instanceof Date?e.maxValidDate:tn(e.maxValidDate):this.maxValidDate=null,this.minValidDate&&this.maxValidDate&&this.minValidDate>this.maxValidDate&&console.warn("AG Grid: DateFilter minValidDate should be <= maxValidDate"),this.filterModelFormatter=new Qs(this.dateFilterParams,this.localeService,this.optionsFactory)}createDateCompWrapper(e){const t=new Ts(this.getContext(),this.userComponentFactory,{onDateChanged:()=>this.onUiChanged(),filterParams:this.dateFilterParams},e);return this.addDestroyFunc(()=>t.destroy()),t}setElementValue(e,t){e.setDate(t)}setElementDisplayed(e,t){e.setDisplayed(t)}setElementDisabled(e,t){e.setDisabled(t)}getDefaultFilterOptions(){return e.DEFAULT_FILTER_OPTIONS}createValueElement(){const e=this.gos.getDocument().createElement("div");return e.classList.add("ag-filter-body"),this.createFromToElement(e,this.eConditionPanelsFrom,this.dateConditionFromComps,"from"),this.createFromToElement(e,this.eConditionPanelsTo,this.dateConditionToComps,"to"),e}createFromToElement(e,t,i,n){const s=this.gos.getDocument().createElement("div");s.classList.add(`ag-filter-${n}`),s.classList.add(`ag-filter-date-${n}`),t.push(s),e.appendChild(s),i.push(this.createDateCompWrapper(s))}removeValueElements(e,t){this.removeDateComps(this.dateConditionFromComps,e,t),this.removeDateComps(this.dateConditionToComps,e,t),this.removeItems(this.eConditionPanelsFrom,e,t),this.removeItems(this.eConditionPanelsTo,e,t)}removeDateComps(e,t,i){this.removeItems(e,t,i).forEach(e=>e.destroy())}isValidDateValue(e){if(null===e)return!1;if(this.minValidDate){if(e<this.minValidDate)return!1}else if(e.getUTCFullYear()<this.minValidYear)return!1;if(this.maxValidDate){if(e>this.maxValidDate)return!1}else if(e.getUTCFullYear()>this.maxValidYear)return!1;return!0}isConditionUiComplete(e){if(!super.isConditionUiComplete(e))return!1;let t=!0;return this.forEachInput((i,n,s,r)=>{s!==e||!t||n>=r||(t=t&&this.isValidDateValue(i.getDate()))}),t}areSimpleModelsEqual(e,t){return e.dateFrom===t.dateFrom&&e.dateTo===t.dateTo&&e.type===t.type}getFilterType(){return"date"}createCondition(e){const t=this.getConditionType(e),i={},n=this.getValues(e);return n.length>0&&(i.dateFrom=Qi(n[0])),n.length>1&&(i.dateTo=Qi(n[1])),p({dateFrom:null,dateTo:null,filterType:this.getFilterType(),type:t},i)}resetPlaceholder(){const e=this.localeService.getLocaleTextFunc(),t=this.translate("dateFormatOoo"),i=e("ariaFilterValue","Filter Value");this.forEachInput(e=>{e.setInputPlaceholder(t),e.setInputAriaLabel(i)})}getInputs(e){return e>=this.dateConditionFromComps.length?[null,null]:[this.dateConditionFromComps[e],this.dateConditionToComps[e]]}getValues(e){const t=[];return this.forEachPositionInput(e,(e,i,n,s)=>{i<s&&t.push(e.getDate())}),t}translate(e){return e===Xs.LESS_THAN?super.translate("before"):e===Xs.GREATER_THAN?super.translate("after"):super.translate(e)}getModelAsString(e){var t;return null!=(t=this.filterModelFormatter.getModelAsString(e))?t:""}};Js.DEFAULT_FILTER_OPTIONS=[Xs.EQUALS,Xs.NOT_EQUAL,Xs.LESS_THAN,Xs.GREATER_THAN,Xs.IN_RANGE,Xs.BLANK,Xs.NOT_BLANK],m([pe("userComponentFactory")],Js.prototype,"userComponentFactory",2);var er=Js,tr=class extends ws{getDefaultDebounceMs(){return 0}destroy(){super.destroy()}isEventFromFloatingFilter(e){return e&&e.afterFloatingFilter}isEventFromDataChange(e){return null==e?void 0:e.afterDataChange}getLastType(){return this.lastType}isReadOnly(){return this.readOnly}setLastTypeFromModel(e){if(!e)return void(this.lastType=this.optionsFactory.getDefaultOption());let t;t=e.operator?e.conditions[0]:e,this.lastType=t.type}canWeEditAfterModelFromParentFilter(e){if(!e)return this.isTypeEditable(this.lastType);if(e.operator)return!1;const t=e;return this.isTypeEditable(t.type)}init(e){this.setSimpleParams(e,!1)}setSimpleParams(e,t=!0){this.optionsFactory=new Ds,this.optionsFactory.init(e.filterParams,this.getDefaultFilterOptions()),t||(this.lastType=this.optionsFactory.getDefaultOption()),this.readOnly=!!e.filterParams.readOnly;const i=this.isTypeEditable(this.optionsFactory.getDefaultOption());this.setEditable(i)}onParamsUpdated(e){this.refresh(e)}refresh(e){this.setSimpleParams(e)}doesFilterHaveSingleInput(e){const t=this.optionsFactory.getCustomOption(e),{numberOfInputs:i}=t||{};return null==i||1==i}isTypeEditable(e){const t=[qs.IN_RANGE,qs.EMPTY,qs.BLANK,qs.NOT_BLANK];return!!e&&!this.isReadOnly()&&this.doesFilterHaveSingleInput(e)&&t.indexOf(e)<0}getAriaLabel(e){return`${this.columnModel.getDisplayNameForColumn(e.column,"header",!0)} ${this.localeService.getLocaleTextFunc()("ariaFilterInput","Filter Input")}`}};m([pe("columnModel")],tr.prototype,"columnModel",2);var ir=class extends tr{constructor(){super('\n            <div class="ag-floating-filter-input" role="presentation">\n                <ag-input-text-field ref="eReadOnlyText"></ag-input-text-field>\n                <div ref="eDateWrapper" style="display: flex;"></div>\n            </div>')}getDefaultFilterOptions(){return er.DEFAULT_FILTER_OPTIONS}init(e){super.init(e),this.params=e,this.filterParams=e.filterParams,this.createDateComponent(),this.filterModelFormatter=new Qs(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 t=e;this.dateComp.setDate(tn(t.dateFrom))}else this.dateComp.setDate(null);this.eReadOnlyText.setValue("")}else this.eReadOnlyText.setValue(this.filterModelFormatter.getModelAsString(e)),this.dateComp.setDate(null)}setEditable(e){cn(this.eDateWrapper,e),cn(this.eReadOnlyText.getGui(),!e)}onParentModelChanged(e,t){this.isEventFromFloatingFilter(t)||this.isEventFromDataChange(t)||(super.setLastTypeFromModel(e),this.updateCompOnModelChange(e))}onDateChanged(){const e=Qi(this.dateComp.getDate());this.params.parentFilterInstance(t=>{if(t){const i=tn(e);t.onFloatingFilterChanged(this.getLastType()||null,i)}})}getDateComponentParams(){const e=_s.getDebounceMs(this.params.filterParams,this.getDefaultDebounceMs());return{onDateChanged:ee(this.onDateChanged.bind(this),e),filterParams:this.params.column.getColDef().filterParams}}createDateComponent(){this.dateComp=new Ts(this.getContext(),this.userComponentFactory,this.getDateComponentParams(),this.eDateWrapper,e=>{e.setInputAriaLabel(this.getAriaLabel(this.params))}),this.addDestroyFunc(()=>this.dateComp.destroy())}updateDateComponent(){const e=this.gos.addGridCommonParams(this.getDateComponentParams());this.dateComp.updateParams(e)}getFilterModelFormatter(){return this.filterModelFormatter}};m([pe("userComponentFactory")],ir.prototype,"userComponentFactory",2),m([Es("eReadOnlyText")],ir.prototype,"eReadOnlyText",2),m([Es("eDateWrapper")],ir.prototype,"eDateWrapper",2);var nr=class extends ws{constructor(){super('\n            <div class="ag-filter-filter">\n                <ag-input-text-field class="ag-date-filter" ref="eDateInput"></ag-input-text-field>\n            </div>')}destroy(){super.destroy()}init(e){this.params=e,this.setParams(e);const t=this.eDateInput.getInputElement();this.addManagedListener(t,"mousedown",()=>{this.eDateInput.isDisabled()||this.usingSafariDatePicker||t.focus()}),this.addManagedListener(t,"input",e=>{e.target===this.gos.getActiveDomElement()&&(this.eDateInput.isDisabled()||this.params.onDateChanged())})}setParams(e){const t=this.eDateInput.getInputElement(),i=this.shouldUseBrowserDatePicker(e);this.usingSafariDatePicker=i&&Ii(),t.type=i?"date":"text";const{minValidYear:n,maxValidYear:s,minValidDate:r,maxValidDate:o}=e.filterParams||{};if(r&&n&&j("DateFilter should not have both minValidDate and minValidYear parameters set at the same time! minValidYear will be ignored."),o&&s&&j("DateFilter should not have both maxValidDate and maxValidYear parameters set at the same time! maxValidYear will be ignored."),r&&o){const[e,t]=[r,o].map(e=>e instanceof Date?e:tn(e));e&&t&&e.getTime()>t.getTime()&&j("DateFilter parameter minValidDate should always be lower than or equal to parameter maxValidDate.")}r?r instanceof Date?t.min=en(r):t.min=r:n&&(t.min=`${n}-01-01`),o?o instanceof Date?t.max=en(o):t.max=o:s&&(t.max=`${s}-12-31`)}onParamsUpdated(e){this.refresh(e)}refresh(e){this.params=e,this.setParams(e)}getDate(){return tn(this.eDateInput.getValue())}setDate(e){this.eDateInput.setValue(Qi(e,!1))}setInputPlaceholder(e){this.eDateInput.setInputPlaceholder(e)}setInputAriaLabel(e){this.eDateInput.setAriaLabel(e)}setDisabled(e){this.eDateInput.setDisabled(e)}afterGuiAttached(e){e&&e.suppressFocus||this.eDateInput.getInputElement().focus()}shouldUseBrowserDatePicker(e){return e.filterParams&&null!=e.filterParams.browserDatePicker?e.filterParams.browserDatePicker:Li()||ki()||Ii()&&Ri()>=14.1}};m([Es("eDateInput")],nr.prototype,"eDateInput",2);var sr=class extends Ws{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=S(e)?e:""),super.setValue(e,t)}setStartValue(e){this.setValue(e,!0)}preventDisallowedCharacters(){const e=new RegExp(`[${this.config.allowedCharPattern}]`);this.addManagedListener(this.eInput,"keydown",t=>{es(t)&&t.key&&!e.test(t.key)&&t.preventDefault()}),this.addManagedListener(this.eInput,"paste",t=>{var i;const n=null==(i=t.clipboardData)?void 0:i.getData("text");n&&n.split("").some(t=>!e.test(t))&&t.preventDefault()})}},rr=class extends sr{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";const{precision:e,min:t,max:i,step:n}=this.config;"number"==typeof e&&this.setPrecision(e),"number"==typeof t&&this.setMin(t),"number"==typeof i&&this.setMax(i),"number"==typeof n&&this.setStep(n)}onWheel(e){this.gos.getActiveDomElement()===this.eInput&&e.preventDefault()}normalizeValue(e){if(""===e)return"";null!=this.precision&&(e=this.adjustPrecision(e));const t=parseFloat(e);return null!=this.min&&t<this.min?e=this.min.toString():null!=this.max&&t>this.max&&(e=this.max.toString()),e}adjustPrecision(e,t){if(null==this.precision)return e;if(t){const t=parseFloat(e).toFixed(this.precision);return parseFloat(t).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.min=e,Hn(this.eInput,"min",e)),this}setMax(e){return this.max===e||(this.max=e,Hn(this.eInput,"max",e)),this}setPrecision(e){return this.precision=e,this}setStep(e){return this.step===e||(this.step=e,Hn(this.eInput,"step",e)),this}setValue(e,t){return this.setValueOrInputValue(e=>super.setValue(e,t),()=>this,e)}setStartValue(e){return this.setValueOrInputValue(e=>super.setValue(e,!0),e=>{this.eInput.value=e},e)}setValueOrInputValue(e,t,i){if(S(i)){let n=this.isScientificNotation(i);if(n&&this.eInput.validity.valid)return e(i);if(n||(n=(i=this.adjustPrecision(i))!=this.normalizeValue(i)),n)return t(i)}return e(i)}getValue(){if(!this.eInput.validity.valid)return;const e=this.eInput.value;return this.isScientificNotation(e)?this.adjustPrecision(e,!0):super.getValue()}isScientificNotation(e){return"string"==typeof e&&e.includes("e")}},or=class extends $s{conditionToString(e,t){const{numberOfInputs:i}=t||{};return e.type==qs.IN_RANGE||2===i?`${this.formatValue(e.filter)}-${this.formatValue(e.filterTo)}`:null!=e.filter?this.formatValue(e.filter):`${e.type}`}};function ar(e){const{allowedCharPattern:t}=null!=e?e:{};return null!=t?t:null}var lr=class e extends Xs{constructor(){super("numberFilter"),this.eValuesFrom=[],this.eValuesTo=[]}refresh(e){return this.numberFilterParams.allowedCharPattern===e.allowedCharPattern&&super.refresh(e)}mapValuesFromModel(e){const{filter:t,filterTo:i,type:n}=e||{};return[this.processValue(t),this.processValue(i)].slice(0,this.getNumberOfInputs(n))}getDefaultDebounceMs(){return 500}comparator(){return(e,t)=>e===t?0:e<t?1:-1}setParams(e){this.numberFilterParams=e,super.setParams(e),this.filterModelFormatter=new or(this.localeService,this.optionsFactory,this.numberFilterParams.numberFormatter)}getDefaultFilterOptions(){return e.DEFAULT_FILTER_OPTIONS}setElementValue(e,t,i){const n=!i&&this.numberFilterParams.numberFormatter?this.numberFilterParams.numberFormatter(null!=t?t:null):t;super.setElementValue(e,n)}createValueElement(){const e=ar(this.numberFilterParams),t=document.createElement("div");return t.classList.add("ag-filter-body"),Ut(t,"presentation"),this.createFromToElement(t,this.eValuesFrom,"from",e),this.createFromToElement(t,this.eValuesTo,"to",e),t}createFromToElement(e,t,i,n){const s=this.createManagedBean(n?new sr({allowedCharPattern:n}):new rr);s.addCssClass(`ag-filter-${i}`),s.addCssClass("ag-filter-filter"),t.push(s),e.appendChild(s.getGui())}removeValueElements(e,t){this.removeComponents(this.eValuesFrom,e,t),this.removeComponents(this.eValuesTo,e,t)}getValues(e){const t=[];return this.forEachPositionInput(e,(e,i,n,s)=>{i<s&&t.push(this.processValue(this.stringToFloat(e.getValue())))}),t}areSimpleModelsEqual(e,t){return e.filter===t.filter&&e.filterTo===t.filterTo&&e.type===t.type}getFilterType(){return"number"}processValue(e){return null==e||isNaN(e)?null:e}stringToFloat(e){if("number"==typeof e)return e;let t=b(e);return null!=t&&""===t.trim()&&(t=null),this.numberFilterParams.numberParser?this.numberFilterParams.numberParser(t):null==t||"-"===t.trim()?null:parseFloat(t)}createCondition(e){const t=this.getConditionType(e),i={filterType:this.getFilterType(),type:t},n=this.getValues(e);return n.length>0&&(i.filter=n[0]),n.length>1&&(i.filterTo=n[1]),i}getInputs(e){return e>=this.eValuesFrom.length?[null,null]:[this.eValuesFrom[e],this.eValuesTo[e]]}getModelAsString(e){var t;return null!=(t=this.filterModelFormatter.getModelAsString(e))?t:""}hasInvalidInputs(){let e=!1;return this.forEachInput(t=>{t.getInputElement().validity.valid||(e=!0)}),e}};lr.DEFAULT_FILTER_OPTIONS=[Xs.EQUALS,Xs.NOT_EQUAL,Xs.GREATER_THAN,Xs.GREATER_THAN_OR_EQUAL,Xs.LESS_THAN,Xs.LESS_THAN_OR_EQUAL,Xs.IN_RANGE,Xs.BLANK,Xs.NOT_BLANK];var cr=lr,hr=class extends $s{conditionToString(e,t){const{numberOfInputs:i}=t||{};return e.type==qs.IN_RANGE||2===i?`${e.filter}-${e.filterTo}`:null!=e.filter?`${e.filter}`:`${e.type}`}},dr=class e extends qs{constructor(){super("textFilter"),this.eValuesFrom=[],this.eValuesTo=[]}static trimInput(e){const t=e&&e.trim();return""===t?e:t}getDefaultDebounceMs(){return 500}setParams(t){this.textFilterParams=t,super.setParams(t),this.matcher=this.getTextMatcher(),this.formatter=this.textFilterParams.textFormatter||(this.textFilterParams.caseSensitive?e.DEFAULT_FORMATTER:e.DEFAULT_LOWERCASE_FORMATTER),this.filterModelFormatter=new hr(this.localeService,this.optionsFactory)}getTextMatcher(){const t=this.textFilterParams.textCustomComparator;return t?(ds.warnOnce("textCustomComparator is deprecated, use textMatcher instead."),({filterOption:e,value:i,filterText:n})=>t(e,i,n)):this.textFilterParams.textMatcher||e.DEFAULT_MATCHER}createCondition(e){const t=this.getConditionType(e),i={filterType:this.getFilterType(),type:t},n=this.getValuesWithSideEffects(e,!0);return n.length>0&&(i.filter=n[0]),n.length>1&&(i.filterTo=n[1]),i}getFilterType(){return"text"}areSimpleModelsEqual(e,t){return e.filter===t.filter&&e.filterTo===t.filterTo&&e.type===t.type}getInputs(e){return e>=this.eValuesFrom.length?[null,null]:[this.eValuesFrom[e],this.eValuesTo[e]]}getValues(e){return this.getValuesWithSideEffects(e,!1)}getValuesWithSideEffects(t,i){const n=[];return this.forEachPositionInput(t,(t,s,r,o)=>{var a;if(s<o){let s=b(t.getValue());i&&this.textFilterParams.trimInput&&(s=null!=(a=e.trimInput(s))?a:null,t.setValue(s,!0)),n.push(s)}}),n}getDefaultFilterOptions(){return e.DEFAULT_FILTER_OPTIONS}createValueElement(){const e=document.createElement("div");return e.classList.add("ag-filter-body"),Ut(e,"presentation"),this.createFromToElement(e,this.eValuesFrom,"from"),this.createFromToElement(e,this.eValuesTo,"to"),e}createFromToElement(e,t,i){const n=this.createManagedBean(new sr);n.addCssClass(`ag-filter-${i}`),n.addCssClass("ag-filter-filter"),t.push(n),e.appendChild(n.getGui())}removeValueElements(e,t){this.removeComponents(this.eValuesFrom,e,t),this.removeComponents(this.eValuesTo,e,t)}mapValuesFromModel(e){const{filter:t,filterTo:i,type:n}=e||{};return[t||null,i||null].slice(0,this.getNumberOfInputs(n))}evaluateNullValue(e){const t=[qs.NOT_EQUAL,qs.NOT_CONTAINS,qs.BLANK];return!!e&&t.indexOf(e)>=0}evaluateNonNullValue(e,t,i,n){const s=e.map(e=>this.formatter(e))||[],r=this.formatter(t),{api:o,colDef:a,column:l,columnApi:c,context:h,textFormatter:d}=this.textFilterParams;if(i.type===qs.BLANK)return this.isBlank(t);if(i.type===qs.NOT_BLANK)return!this.isBlank(t);const u={api:o,colDef:a,column:l,columnApi:c,context:h,node:n.node,data:n.data,filterOption:i.type,value:r,textFormatter:d};return s.some(e=>this.matcher(g(p({},u),{filterText:e})))}getModelAsString(e){var t;return null!=(t=this.filterModelFormatter.getModelAsString(e))?t:""}};dr.DEFAULT_FILTER_OPTIONS=[qs.CONTAINS,qs.NOT_CONTAINS,qs.EQUALS,qs.NOT_EQUAL,qs.STARTS_WITH,qs.ENDS_WITH,qs.BLANK,qs.NOT_BLANK],dr.DEFAULT_FORMATTER=e=>e,dr.DEFAULT_LOWERCASE_FORMATTER=e=>null==e?null:e.toString().toLowerCase(),dr.DEFAULT_MATCHER=({filterOption:e,value:t,filterText:i})=>{if(null==i)return!1;switch(e){case dr.CONTAINS:return t.indexOf(i)>=0;case dr.NOT_CONTAINS:return t.indexOf(i)<0;case dr.EQUALS:return t===i;case dr.NOT_EQUAL:return t!=i;case dr.STARTS_WITH:return 0===t.indexOf(i);case dr.ENDS_WITH:const e=t.lastIndexOf(i);return e>=0&&e===t.length-i.length;default:return!1}};var ur=dr,pr=class extends ot{constructor(e){super(),this.params=e,this.valueChangedListener=()=>{}}setupGui(e){var t;this.eFloatingFilterTextInput=this.createManagedBean(new sr(null==(t=this.params)?void 0:t.config));const i=this.eFloatingFilterTextInput.getGui();e.appendChild(i),this.addManagedListener(i,"input",e=>this.valueChangedListener(e)),this.addManagedListener(i,"keydown",e=>this.valueChangedListener(e))}setEditable(e){this.eFloatingFilterTextInput.setDisabled(!e)}setAutoComplete(e){this.eFloatingFilterTextInput.setAutoComplete(e)}getValue(){return this.eFloatingFilterTextInput.getValue()}setValue(e,t){this.eFloatingFilterTextInput.setValue(e,t)}setValueChangedListener(e){this.valueChangedListener=e}setParams(e){this.setAriaLabel(e.ariaLabel),void 0!==e.autoComplete&&this.setAutoComplete(e.autoComplete)}setAriaLabel(e){this.eFloatingFilterTextInput.setInputAriaLabel(e)}},gr=class extends tr{postConstruct(){this.setTemplate('\n            <div class="ag-floating-filter-input" role="presentation" ref="eFloatingFilterInputContainer"></div>\n        ')}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=null!=(t=e.browserAutoComplete)&&t;if(this.floatingFilterInputService.setParams({ariaLabel:this.getAriaLabel(e),autoComplete:i}),this.applyActive=_s.isUseApplyButton(this.params.filterParams),!this.isReadOnly()){const e=_s.getDebounceMs(this.params.filterParams,this.getDefaultDebounceMs()),t=ee(this.syncUpWithParentFilter.bind(this),e);this.floatingFilterInputService.setValueChangedListener(t)}}onParamsUpdated(e){this.refresh(e)}refresh(e){super.refresh(e),this.setTextInputParams(e)}recreateFloatingFilterInputService(e){const t=this.floatingFilterInputService.getValue();wn(this.eFloatingFilterInputContainer),this.destroyBean(this.floatingFilterInputService),this.setupFloatingFilterInputService(e),this.floatingFilterInputService.setValue(t,!0)}syncUpWithParentFilter(e){const t=e.key===Jn.ENTER;if(this.applyActive&&!t)return;let i=this.floatingFilterInputService.getValue();this.params.filterParams.trimInput&&(i=ur.trimInput(i),this.floatingFilterInputService.setValue(i,!0)),this.params.parentFilterInstance(e=>{e&&e.onFloatingFilterChanged(this.getLastType()||null,i||null)})}setEditable(e){this.floatingFilterInputService.setEditable(e)}};m([Es("eFloatingFilterInputContainer")],gr.prototype,"eFloatingFilterInputContainer",2),m([he],gr.prototype,"postConstruct",1);var fr=class extends ot{constructor(){super(...arguments),this.valueChangedListener=()=>{},this.numberInputActive=!0}setupGui(e){this.eFloatingFilterNumberInput=this.createManagedBean(new rr),this.eFloatingFilterTextInput=this.createManagedBean(new sr),this.eFloatingFilterTextInput.setDisabled(!0);const t=this.eFloatingFilterNumberInput.getGui(),i=this.eFloatingFilterTextInput.getGui();e.appendChild(t),e.appendChild(i),this.setupListeners(t,e=>this.valueChangedListener(e)),this.setupListeners(i,e=>this.valueChangedListener(e))}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),void 0!==e.autoComplete&&this.setAutoComplete(e.autoComplete)}setAriaLabel(e){this.eFloatingFilterNumberInput.setInputAriaLabel(e),this.eFloatingFilterTextInput.setInputAriaLabel(e)}},mr=class extends gr{init(e){var t;super.init(e),this.filterModelFormatter=new or(this.localeService,this.optionsFactory,null==(t=e.filterParams)?void 0:t.numberFormatter)}onParamsUpdated(e){this.refresh(e)}refresh(e){ar(e.filterParams)!==this.allowedCharPattern&&this.recreateFloatingFilterInputService(e),super.refresh(e),this.filterModelFormatter.updateParams({optionsFactory:this.optionsFactory})}getDefaultFilterOptions(){return cr.DEFAULT_FILTER_OPTIONS}getFilterModelFormatter(){return this.filterModelFormatter}createFloatingFilterInputService(e){return this.allowedCharPattern=ar(e.filterParams),this.allowedCharPattern?this.createManagedBean(new pr({config:{allowedCharPattern:this.allowedCharPattern}})):this.createManagedBean(new fr)}},vr=class extends gr{init(e){super.init(e),this.filterModelFormatter=new hr(this.localeService,this.optionsFactory)}onParamsUpdated(e){this.refresh(e)}refresh(e){super.refresh(e),this.filterModelFormatter.updateParams({optionsFactory:this.optionsFactory})}getDefaultFilterOptions(){return ur.DEFAULT_FILTER_OPTIONS}getFilterModelFormatter(){return this.filterModelFormatter}createFloatingFilterInputService(){return this.createManagedBean(new pr)}},yr=class e{constructor(e,t=!1){this.destroyFuncs=[],this.touching=!1,this.eventService=new ye,this.eElement=e,this.preventMouseClick=t;const i=this.onTouchStart.bind(this),n=this.onTouchMove.bind(this),s=this.onTouchEnd.bind(this);this.eElement.addEventListener("touchstart",i,{passive:!0}),this.eElement.addEventListener("touchmove",n,{passive:!0}),this.eElement.addEventListener("touchend",s,{passive:!1}),this.destroyFuncs.push(()=>{this.eElement.removeEventListener("touchstart",i,{passive:!0}),this.eElement.removeEventListener("touchmove",n,{passive:!0}),this.eElement.removeEventListener("touchend",s,{passive:!1})})}getActiveTouch(e){for(let t=0;t<e.length;t++)if(e[t].identifier===this.touchStart.identifier)return e[t];return null}addEventListener(e,t){this.eventService.addEventListener(e,t)}removeEventListener(e,t){this.eventService.removeEventListener(e,t)}onTouchStart(t){if(this.touching)return;this.touchStart=t.touches[0],this.touching=!0,this.moved=!1;const i=this.touchStart;window.setTimeout(()=>{const n=this.touchStart===i;if(this.touching&&n&&!this.moved){this.moved=!0;const i={type:e.EVENT_LONG_TAP,touchStart:this.touchStart,touchEvent:t};this.eventService.dispatchEvent(i)}},500)}onTouchMove(e){if(!this.touching)return;const t=this.getActiveTouch(e.touches);t&&!os(t,this.touchStart,4)&&(this.moved=!0)}onTouchEnd(t){if(this.touching){if(!this.moved){const t={type:e.EVENT_TAP,touchStart:this.touchStart};this.eventService.dispatchEvent(t),this.checkForDoubleTap()}this.preventMouseClick&&t.cancelable&&t.preventDefault(),this.touching=!1}}checkForDoubleTap(){const t=(new Date).getTime();if(this.lastTapTime&&this.lastTapTime>0)if(t-this.lastTapTime>e.DOUBLE_TAP_MILLIS){const t={type:e.EVENT_DOUBLE_TAP,touchStart:this.touchStart};this.eventService.dispatchEvent(t),this.lastTapTime=null}else this.lastTapTime=t;else this.lastTapTime=t}destroy(){this.destroyFuncs.forEach(e=>e())}};yr.EVENT_TAP="tap",yr.EVENT_DOUBLE_TAP="doubleTap",yr.EVENT_LONG_TAP="longTap",yr.DOUBLE_TAP_MILLIS=500;var Cr=yr,br=class e extends ws{constructor(t){super(),t||this.setTemplate(e.TEMPLATE)}attachCustomElements(e,t,i,n,s){this.eSortOrder=e,this.eSortAsc=t,this.eSortDesc=i,this.eSortMixed=n,this.eSortNone=s}setupSort(e,t=!1){this.column=e,this.suppressOrder=t,this.setupMultiSortIndicator(),(this.column.isSortable()||this.column.getColDef().showRowGroup)&&(this.addInIcon("sortAscending",this.eSortAsc,e),this.addInIcon("sortDescending",this.eSortDesc,e),this.addInIcon("sortUnSort",this.eSortNone,e),this.addManagedPropertyListener("unSortIcon",()=>this.updateIcons()),this.addManagedListener(this.eventService,dt.EVENT_NEW_COLUMNS_LOADED,()=>this.updateIcons()),this.addManagedListener(this.eventService,dt.EVENT_SORT_CHANGED,()=>this.onSortChanged()),this.addManagedListener(this.eventService,dt.EVENT_COLUMN_ROW_GROUP_CHANGED,()=>this.onSortChanged()),this.onSortChanged())}addInIcon(e,t,i){if(null==t)return;const n=Zn(e,this.gos,i);n&&t.appendChild(n)}onSortChanged(){this.updateIcons(),this.suppressOrder||this.updateSortOrder()}updateIcons(){const e=this.sortController.getDisplaySortForColumn(this.column);if(this.eSortAsc){const t="asc"===e;cn(this.eSortAsc,t,{skipAriaHidden:!0})}if(this.eSortDesc){const t="desc"===e;cn(this.eSortDesc,t,{skipAriaHidden:!0})}if(this.eSortNone){const t=!this.column.getColDef().unSortIcon&&!this.gos.get("unSortIcon"),i=null==e;cn(this.eSortNone,!t&&i,{skipAriaHidden:!0})}}setupMultiSortIndicator(){this.addInIcon("sortUnSort",this.eSortMixed,this.column);const e=this.column.getColDef().showRowGroup;this.gos.isColumnsSortingCoupledToGroup()&&e&&(this.addManagedListener(this.eventService,dt.EVENT_SORT_CHANGED,()=>this.updateMultiSortIndicator()),this.addManagedListener(this.eventService,dt.EVENT_COLUMN_ROW_GROUP_CHANGED,()=>this.updateMultiSortIndicator()),this.updateMultiSortIndicator())}updateMultiSortIndicator(){if(this.eSortMixed){const e="mixed"===this.sortController.getDisplaySortForColumn(this.column);cn(this.eSortMixed,e,{skipAriaHidden:!0})}}updateSortOrder(){var e;if(!this.eSortOrder)return;const t=this.sortController.getColumnsWithSortingOrdered(),i=null!=(e=this.sortController.getDisplaySortIndexForColumn(this.column))?e:-1,n=t.some(e=>{var t;return null!=(t=this.sortController.getDisplaySortIndexForColumn(e))&&t}),s=i>=0&&n;cn(this.eSortOrder,s,{skipAriaHidden:!0}),i>=0?this.eSortOrder.textContent=(i+1).toString():wn(this.eSortOrder)}};br.TEMPLATE='<span class="ag-sort-indicator-container">\n            <span ref="eSortOrder" class="ag-sort-indicator-icon ag-sort-order ag-hidden" aria-hidden="true"></span>\n            <span ref="eSortAsc" class="ag-sort-indicator-icon ag-sort-ascending-icon ag-hidden" aria-hidden="true"></span>\n            <span ref="eSortDesc" class="ag-sort-indicator-icon ag-sort-descending-icon ag-hidden" aria-hidden="true"></span>\n            <span ref="eSortMixed" class="ag-sort-indicator-icon ag-sort-mixed-icon ag-hidden" aria-hidden="true"></span>\n            <span ref="eSortNone" class="ag-sort-indicator-icon ag-sort-none-icon ag-hidden" aria-hidden="true"></span>\n        </span>',m([Es("eSortOrder")],br.prototype,"eSortOrder",2),m([Es("eSortAsc")],br.prototype,"eSortAsc",2),m([Es("eSortDesc")],br.prototype,"eSortDesc",2),m([Es("eSortMixed")],br.prototype,"eSortMixed",2),m([Es("eSortNone")],br.prototype,"eSortNone",2),m([pe("columnModel")],br.prototype,"columnModel",2),m([pe("sortController")],br.prototype,"sortController",2);var Sr=br,wr=class e extends ws{constructor(){super(...arguments),this.lastMovingChanged=0}destroy(){super.destroy()}refresh(e){const t=this.params;return this.params=e,this.workOutTemplate()==this.currentTemplate&&this.workOutShowMenu()==this.currentShowMenu&&this.workOutSort()==this.currentSort&&this.shouldSuppressMenuHide()==this.currentSuppressMenuHide&&t.enableFilterButton==e.enableFilterButton&&t.enableFilterIcon==e.enableFilterIcon&&(this.setDisplayName(e),!0)}workOutTemplate(){var t;let i=null!=(t=this.params.template)?t:e.TEMPLATE;return i=i&&i.trim?i.trim():i,i}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=St(this.currentDisplayName,!0);this.eText&&(this.eText.textContent=t)}}addInIcon(e,t,i){if(null==t)return;const n=Zn(e,this.gos,i);n&&t.appendChild(n)}setupTap(){const{gos:e}=this;if(e.get("suppressTouch"))return;const t=new Cr(this.getGui(),!0),i=this.shouldSuppressMenuHide(),n=i&&S(this.eMenu),s=n?new Cr(this.eMenu,!0):t;if(this.params.enableMenu){const e=n?"EVENT_TAP":"EVENT_LONG_TAP",t=e=>this.params.showColumnMenuAfterMouseClick(e.touchStart);this.addManagedListener(s,Cr[e],t)}if(this.params.enableSorting){const e=e=>{var t,n;const s=e.touchStart.target;i&&((null==(t=this.eMenu)?void 0:t.contains(s))||(null==(n=this.eFilterButton)?void 0:n.contains(s)))||this.sortController.progressSort(this.params.column,!1,"uiColumnSorted")};this.addManagedListener(t,Cr.EVENT_TAP,e)}if(this.params.enableFilterButton){const e=new Cr(this.eFilterButton,!0);this.addManagedListener(e,"tap",()=>this.params.showFilter(this.eFilterButton)),this.addDestroyFunc(()=>e.destroy())}this.addDestroyFunc(()=>t.destroy()),n&&this.addDestroyFunc(()=>s.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)return xn(this.eMenu),void(this.eMenu=void 0);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,s;const{column:r}=this.params,o=this.menuService.isLegacyMenuEnabled();if(e&&!o){if(this.menuService.isFilterMenuInHeaderEnabled(r))return this.params.showFilter(null!=(i=null!=(t=this.eFilterButton)?t:this.eMenu)?i:this.getGui()),!0}else if(this.params.enableMenu)return this.params.showColumnMenu(null!=(s=null!=(n=this.eMenu)?n:this.eFilterButton)?s:this.getGui()),!0;return!1}workOutSort(){return this.params.enableSorting}setupSort(){if(this.currentSort=this.params.enableSorting,this.eSortIndicator||(this.eSortIndicator=this.context.createBean(new Sr(!0)),this.eSortIndicator.attachCustomElements(this.eSortOrder,this.eSortAsc,this.eSortDesc,this.eSortMixed,this.eSortNone)),this.eSortIndicator.setupSort(this.params.column),!this.currentSort)return;this.addManagedListener(this.params.column,Ee.EVENT_MOVING_CHANGED,()=>{this.lastMovingChanged=(new Date).getTime()}),this.eLabel&&this.addManagedListener(this.eLabel,"click",e=>{const t=this.params.column.isMoving(),i=(new Date).getTime()-this.lastMovingChanged<50;if(!t&&!i){const t="ctrl"===this.gos.get("multiSortKey")?e.ctrlKey||e.metaKey:e.shiftKey;this.params.progressSort(t)}});const e=()=>{if(this.addOrRemoveCssClass("ag-header-cell-sorted-asc",this.params.column.isSortAscending()),this.addOrRemoveCssClass("ag-header-cell-sorted-desc",this.params.column.isSortDescending()),this.addOrRemoveCssClass("ag-header-cell-sorted-none",this.params.column.isSortNone()),this.params.column.getColDef().showRowGroup){const e=this.columnModel.getSourceColumnsForGroupColumn(this.params.column),t=!(null==e?void 0:e.every(e=>this.params.column.getSort()==e.getSort()));this.addOrRemoveCssClass("ag-header-cell-sorted-mixed",t)}};this.addManagedListener(this.eventService,dt.EVENT_SORT_CHANGED,e),this.addManagedListener(this.eventService,dt.EVENT_COLUMN_ROW_GROUP_CHANGED,e)}setupFilterIcon(){this.eFilter&&this.configureFilter(this.params.enableFilterIcon,this.eFilter,this.onFilterChangedIcon.bind(this))}setupFilterButton(){this.eFilterButton&&(this.configureFilter(this.params.enableFilterButton,this.eFilterButton,this.onFilterChangedButton.bind(this))?this.addManagedListener(this.eFilterButton,"click",()=>this.params.showFilter(this.eFilterButton)):this.eFilterButton=void 0)}configureFilter(e,t,i){if(!e)return xn(t),!1;const{column:n}=this.params;return this.addInIcon("filter",t,n),this.addManagedListener(n,Ee.EVENT_FILTER_CHANGED,i),i(),!0}onFilterChangedIcon(){const e=this.params.column.isFilterActive();cn(this.eFilter,e,{skipAriaHidden:!0})}onFilterChangedButton(){const e=this.params.column.isFilterActive();this.eFilterButton.classList.toggle("ag-filter-active",e)}getAnchorElementForMenu(e){var t,i,n,s;return e?null!=(i=null!=(t=this.eFilterButton)?t:this.eMenu)?i:this.getGui():null!=(s=null!=(n=this.eMenu)?n:this.eFilterButton)?s:this.getGui()}};wr.TEMPLATE='<div class="ag-cell-label-container" role="presentation">\n            <span ref="eMenu" class="ag-header-icon ag-header-cell-menu-button" aria-hidden="true"></span>\n            <span ref="eFilterButton" class="ag-header-icon ag-header-cell-filter-button" aria-hidden="true"></span>\n            <div ref="eLabel" class="ag-header-cell-label" role="presentation">\n                <span ref="eText" class="ag-header-cell-text"></span>\n                <span ref="eFilter" class="ag-header-icon ag-header-label-icon ag-filter-icon" aria-hidden="true"></span>\n                <ag-sort-indicator ref="eSortIndicator"></ag-sort-indicator>\n            </div>\n        </div>',m([pe("sortController")],wr.prototype,"sortController",2),m([pe("menuService")],wr.prototype,"menuService",2),m([pe("columnModel")],wr.prototype,"columnModel",2),m([Es("eFilter")],wr.prototype,"eFilter",2),m([Es("eFilterButton")],wr.prototype,"eFilterButton",2),m([Es("eSortIndicator")],wr.prototype,"eSortIndicator",2),m([Es("eMenu")],wr.prototype,"eMenu",2),m([Es("eLabel")],wr.prototype,"eLabel",2),m([Es("eText")],wr.prototype,"eText",2),m([Es("eSortOrder")],wr.prototype,"eSortOrder",2),m([Es("eSortAsc")],wr.prototype,"eSortAsc",2),m([Es("eSortDesc")],wr.prototype,"eSortDesc",2),m([Es("eSortMixed")],wr.prototype,"eSortMixed",2),m([Es("eSortNone")],wr.prototype,"eSortNone",2);var xr=wr,Er=class e extends ws{constructor(){super(e.TEMPLATE)}destroy(){super.destroy()}init(e){this.params=e,this.checkWarnings(),this.setupLabel(),this.addGroupExpandIcon(),this.setupExpandIcons()}checkWarnings(){this.params.template&&j("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=e=>{if(Qe(e))return;const t=!this.params.columnGroup.isExpanded();this.columnModel.setColumnGroupOpened(this.params.columnGroup.getProvidedColumnGroup(),t,"uiColumnExpanded")};this.addTouchAndClickListeners(this.eCloseIcon,e),this.addTouchAndClickListeners(this.eOpenIcon,e);const t=e=>{Ze(e)};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,Ae.EVENT_EXPANDED_CHANGED,this.updateIconVisibility.bind(this)),this.addManagedListener(i,Ae.EVENT_EXPANDABLE_CHANGED,this.updateIconVisibility.bind(this))}addTouchAndClickListeners(e,t){const i=new Cr(e,!0);this.addManagedListener(i,Cr.EVENT_TAP,t),this.addDestroyFunc(()=>i.destroy()),this.addManagedListener(e,"click",t)}updateIconVisibility(){if(this.params.columnGroup.isExpandable()){const e=this.params.columnGroup.isExpanded();cn(this.eOpenIcon,e),cn(this.eCloseIcon,!e)}else cn(this.eOpenIcon,!1),cn(this.eCloseIcon,!1)}addInIcon(e,t){const i=Zn(e,this.gos,null);i&&this.getRefElement(t).appendChild(i)}addGroupExpandIcon(){if(!this.params.columnGroup.isExpandable())return cn(this.eOpenIcon,!1),void cn(this.eCloseIcon,!1)}setupLabel(){var e;const{displayName:t,columnGroup:i}=this.params;if(S(t)){const e=St(t,!0);this.getRefElement("agLabel").textContent=e}this.addOrRemoveCssClass("ag-sticky-label",!(null==(e=i.getColGroupDef())?void 0:e.suppressStickyLabel))}};Er.TEMPLATE='<div class="ag-header-group-cell-label" ref="agContainer" role="presentation">\n            <span ref="agLabel" class="ag-header-group-text" role="presentation"></span>\n            <span ref="agOpened" class="ag-header-icon ag-header-expand-icon ag-header-expand-icon-expanded"></span>\n            <span ref="agClosed" class="ag-header-icon ag-header-expand-icon ag-header-expand-icon-collapsed"></span>\n        </div>',m([pe("columnModel")],Er.prototype,"columnModel",2),m([Es("agOpened")],Er.prototype,"eOpenIcon",2),m([Es("agClosed")],Er.prototype,"eCloseIcon",2);var Mr=Er,Ar=class extends ws{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()}},Tr=class e extends Ar{constructor(){super(e.TEMPLATE)}init(e){this.params=e,this.focusAfterAttached=e.cellStartedEdit,this.eTextArea.setMaxLength(e.maxLength||200).setCols(e.cols||60).setRows(e.rows||10),S(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===Jn.LEFT||t===Jn.UP||t===Jn.RIGHT||t===Jn.DOWN||e.shiftKey&&t===Jn.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 S(e)||S(this.params.value)?this.params.parseValue(e):this.params.value}};Tr.TEMPLATE='<div class="ag-large-text">\n            <ag-input-text-area ref="eTextArea" class="ag-large-text-input"></ag-input-text-area>\n        </div>',m([Es("eTextArea")],Tr.prototype,"eTextArea",2);var Dr=Tr,Ir=class extends Ar{constructor(){super('<div class="ag-cell-edit-wrapper">\n                <ag-select class="ag-cell-editor" ref="eSelect"></ag-select>\n            </div>'),this.startedByEnter=!1}init(e){this.focusAfterAttached=e.cellStartedEdit;const{eSelect:t,valueService:i,gos:n}=this,{values:s,value:r,eventKey:o}=e;if(w(s))return void console.warn("AG Grid: no values found for select cellEditor");this.startedByEnter=null!=o&&o===Jn.ENTER;let a=!1;s.forEach(n=>{const s={value:n},o=i.formatValue(e.column,null,n),l=null!=o;s.text=l?o:n,t.addOption(s),a=a||r===n}),a?t.setValue(e.value,!0):e.values.length&&t.setValue(e.values[0],!0);const{valueListGap:l,valueListMaxWidth:c,valueListMaxHeight:h}=e;null!=l&&t.setPickerGap(l),null!=h&&t.setPickerMaxHeight(h),null!=c&&t.setPickerMaxWidth(c),"fullRow"!==n.get("editType")&&this.addManagedListener(this.eSelect,Us.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}};m([pe("valueService")],Ir.prototype,"valueService",2),m([Es("eSelect")],Ir.prototype,"eSelect",2);var Rr=class extends Ar{constructor(e){super(`\n            <div class="ag-cell-edit-wrapper">\n                ${e.getTemplate()}\n            </div>`),this.cellEditorInput=e}init(e){this.params=e;const t=this.eInput;let i;if(this.cellEditorInput.init(t,e),e.cellStartedEdit){this.focusAfterAttached=!0;const t=e.eventKey;t===Jn.BACKSPACE||e.eventKey===Jn.DELETE?i="":t&&1===t.length?i=t:(i=this.cellEditorInput.getStartValue(),t!==Jn.F2&&(this.highlightAllOnFocus=!0))}else this.focusAfterAttached=!1,i=this.cellEditorInput.getStartValue();null!=i&&t.setStartValue(i),this.addManagedListener(t.getGui(),"keydown",e=>{const{key:t}=e;t!==Jn.PAGE_UP&&t!==Jn.PAGE_DOWN||e.preventDefault()})}afterGuiAttached(){var e,t;const i=this.localeService.getLocaleTextFunc(),n=this.eInput;if(n.setInputAriaLabel(i("ariaInputEditor","Input Editor")),!this.focusAfterAttached)return;Ii()||n.getFocusableElement().focus();const s=n.getInputElement();this.highlightAllOnFocus?s.select():null==(t=(e=this.cellEditorInput).setCaret)||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}};m([Es("eInput")],Rr.prototype,"eInput",2);var Lr=class{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,null!=t.maxLength&&e.setMaxLength(t.maxLength)}getValue(){const e=this.eInput.getValue();return S(e)||S(this.params.value)?this.params.parseValue(e):this.params.value}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=S(e)&&e.length||0;t&&this.eInput.getInputElement().setSelectionRange(t,t)}},kr=class extends Rr{constructor(){super(new Lr)}},Pr=class extends ws{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),s=S(n)?n:i,r=t>=0;this.eDelta.textContent=r?"↑"+s:"↓"+s,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"),wn(this.eDelta)}refresh(e,t=!1){const i=e.value;if(i===this.lastValue)return!1;if(S(e.valueFormatted)?this.eValue.textContent=e.valueFormatted:S(e.value)?this.eValue.textContent=i:wn(this.eValue),this.filterManager.isSuppressFlashingCellsBecauseFiltering())return!1;if("number"==typeof i&&"number"==typeof this.lastValue){const t=i-this.lastValue;this.showDelta(e,t)}return this.lastValue&&this.eValue.classList.add("ag-value-change-value-highlight"),t||this.setTimerToRemoveDelta(),this.lastValue=i,!0}};m([pe("filterManager")],Pr.prototype,"filterManager",2);var Nr=class extends ws{constructor(){super(),this.refreshCount=0;const e=document.createElement("span"),t=document.createElement("span");t.setAttribute("class","ag-value-slide-current"),e.appendChild(t),this.setTemplateFromElement(e),this.eCurrent=this.queryForHtmlElement(".ag-value-slide-current")}init(e){this.refresh(e,!0)}addSlideAnimation(){this.refreshCount++;const e=this.refreshCount;this.ePrevious&&this.getGui().removeChild(this.ePrevious);const t=document.createElement("span");t.setAttribute("class","ag-value-slide-previous ag-value-slide-out"),this.ePrevious=t,this.ePrevious.textContent=this.eCurrent.textContent,this.getGui().insertBefore(this.ePrevious,this.eCurrent),this.getFrameworkOverrides().wrapIncoming(()=>{window.setTimeout(()=>{e===this.refreshCount&&this.ePrevious.classList.add("ag-value-slide-out-end")},50),window.setTimeout(()=>{e===this.refreshCount&&(this.getGui().removeChild(this.ePrevious),this.ePrevious=null)},3e3)})}refresh(e,t=!1){let i=e.value;return w(i)&&(i=""),i!==this.lastValue&&!this.filterManager.isSuppressFlashingCellsBecauseFiltering()&&(t||this.addSlideAnimation(),this.lastValue=i,S(e.valueFormatted)?this.eCurrent.textContent=e.valueFormatted:S(e.value)?this.eCurrent.textContent=i:wn(this.eCurrent),!0)}};m([pe("filterManager")],Nr.prototype,"filterManager",2);var Or=class e{constructor(t){this.rowIndex=null,this.key=null,this.childrenMapped={},this.displayed=!1,this.rowTop=null,this.oldRowTop=null,this.selectable=!0,this.__objectId=e.OBJECT_ID_SEQUENCE++,this.__autoHeights={},this.alreadyRendered=!1,this.highlighted=null,this.hovered=!1,this.selected=!1,this.beans=t}setData(e){this.setDataCommon(e,!1)}updateData(e){this.setDataCommon(e,!0)}setDataCommon(e,t){const i=this.data;this.data=e,this.beans.valueCache.onDataChanged(),this.updateDataOnDetailNode(),this.checkRowSelectable(),this.resetQuickFilterAggregateText();const n=this.createDataChangedEvent(e,i,t);this.dispatchLocalEvent(n)}updateDataOnDetailNode(){this.detailNode&&(this.detailNode.data=this.data)}createDataChangedEvent(t,i,n){return{type:e.EVENT_DATA_CHANGED,node:this,oldData:i,newData:t,update:n}}createLocalRowEvent(e){return{type:e,node:this}}getRowIndexString(){return"top"===this.rowPinned?"t-"+this.rowIndex:"bottom"===this.rowPinned?"b-"+this.rowIndex:this.rowIndex.toString()}createDaemonNode(){const t=new e(this.beans);return t.id=this.id,t.data=this.data,t.__daemon=!0,t.selected=this.selected,t.level=this.level,t}setDataAndId(e,t){const i=S(this.id)?this.createDaemonNode():null,n=this.data;this.data=e,this.updateDataOnDetailNode(),this.setId(t),this.checkRowSelectable(),this.beans.selectionService.syncInRowNode(this,i);const s=this.createDataChangedEvent(e,n,!1);this.dispatchLocalEvent(s)}checkRowSelectable(){const e=this.beans.gos.get("isRowSelectable");this.setRowSelectable(!e||e(this))}setRowSelectable(t,i){if(this.selectable!==t){if(this.selectable=t,this.eventService&&this.eventService.dispatchEvent(this.createLocalRowEvent(e.EVENT_SELECTABLE_CHANGED)),i)return;if(this.beans.gos.get("groupSelectsChildren")){const e=this.calculateSelectedFromChildren();return void this.setSelectedParams({newValue:null!=e&&e,source:"selectableChanged"})}this.isSelected()&&!this.selectable&&this.setSelectedParams({newValue:!1,source:"selectableChanged"})}}setId(t){const i=this.beans.gos.getCallback("getRowId");if(i)if(this.data){const t=this.getGroupKeys(!0);this.id=i({data:this.data,parentKeys:t.length>0?t:void 0,level:this.level}),null!==this.id&&"string"==typeof this.id&&this.id.startsWith(e.ID_PREFIX_ROW_GROUP)&&console.error(`AG Grid: Row IDs cannot start with ${e.ID_PREFIX_ROW_GROUP}, this is a reserved prefix for AG Grid's row grouping feature.`),null!==this.id&&"string"!=typeof this.id&&(this.id=""+this.id)}else this.id=void 0;else this.id=t}getGroupKeys(e=!1){const t=[];let i=this;for(e&&(i=i.parent);i&&i.level>=0;)t.push(i.key),i=i.parent;return t.reverse(),t}isPixelInRange(e){return!(!S(this.rowTop)||!S(this.rowHeight))&&e>=this.rowTop&&e<this.rowTop+this.rowHeight}setFirstChild(t){this.firstChild!==t&&(this.firstChild=t,this.eventService&&this.eventService.dispatchEvent(this.createLocalRowEvent(e.EVENT_FIRST_CHILD_CHANGED)))}setLastChild(t){this.lastChild!==t&&(this.lastChild=t,this.eventService&&this.eventService.dispatchEvent(this.createLocalRowEvent(e.EVENT_LAST_CHILD_CHANGED)))}setChildIndex(t){this.childIndex!==t&&(this.childIndex=t,this.eventService&&this.eventService.dispatchEvent(this.createLocalRowEvent(e.EVENT_CHILD_INDEX_CHANGED)))}setRowTop(t){this.oldRowTop=this.rowTop,this.rowTop!==t&&(this.rowTop=t,this.eventService&&this.eventService.dispatchEvent(this.createLocalRowEvent(e.EVENT_TOP_CHANGED)),this.setDisplayed(null!==t))}clearRowTopAndRowIndex(){this.oldRowTop=null,this.setRowTop(null),this.setRowIndex(null)}setDisplayed(t){this.displayed!==t&&(this.displayed=t,this.eventService&&this.eventService.dispatchEvent(this.createLocalRowEvent(e.EVENT_DISPLAYED_CHANGED)))}setDragging(t){this.dragging!==t&&(this.dragging=t,this.eventService&&this.eventService.dispatchEvent(this.createLocalRowEvent(e.EVENT_DRAGGING_CHANGED)))}setHighlighted(t){t!==this.highlighted&&(this.highlighted=t,this.eventService&&this.eventService.dispatchEvent(this.createLocalRowEvent(e.EVENT_HIGHLIGHT_CHANGED)))}setHovered(e){this.hovered!==e&&(this.hovered=e)}isHovered(){return this.hovered}setAllChildrenCount(t){this.allChildrenCount!==t&&(this.allChildrenCount=t,this.eventService&&this.eventService.dispatchEvent(this.createLocalRowEvent(e.EVENT_ALL_CHILDREN_COUNT_CHANGED)))}setMaster(t){this.master!==t&&(this.master&&!t&&(this.expanded=!1),this.master=t,this.eventService&&this.eventService.dispatchEvent(this.createLocalRowEvent(e.EVENT_MASTER_CHANGED)))}setGroup(t){this.group!==t&&(this.group&&!t&&(this.expanded=!1),this.group=t,this.updateHasChildren(),this.eventService&&this.eventService.dispatchEvent(this.createLocalRowEvent(e.EVENT_GROUP_CHANGED)))}setRowHeight(t,i=!1){this.rowHeight=t,this.rowHeightEstimated=i,this.eventService&&this.eventService.dispatchEvent(this.createLocalRowEvent(e.EVENT_HEIGHT_CHANGED))}setRowAutoHeight(e,t){this.__autoHeights||(this.__autoHeights={}),this.__autoHeights[t.getId()]=e,null!=e&&(null==this.checkAutoHeightsDebounced&&(this.checkAutoHeightsDebounced=ee(this.checkAutoHeights.bind(this),1)),this.checkAutoHeightsDebounced())}checkAutoHeights(){let e=!1,t=!0,i=0;const n=this.__autoHeights;if(null==n)return;if(this.beans.columnModel.getAllDisplayedAutoHeightCols().forEach(s=>{let r=n[s.getId()];if(null==r){if(!this.beans.columnModel.isColSpanActive())return void(e=!0);{let t=[];switch(s.getPinned()){case"left":t=this.beans.columnModel.getDisplayedLeftColumnsForRow(this);break;case"right":t=this.beans.columnModel.getDisplayedRightColumnsForRow(this);break;case null:t=this.beans.columnModel.getViewportCenterColumnsForRow(this)}if(t.includes(s))return void(e=!0);r=-1}}else t=!1;r>i&&(i=r)}),e)return;if((t||i<10)&&(i=this.beans.gos.getRowHeightForNode(this).height),i==this.rowHeight)return;this.setRowHeight(i);const s=this.beans.rowModel;s.onRowHeightChangedDebounced&&s.onRowHeightChangedDebounced()}setRowIndex(t){this.rowIndex!==t&&(this.rowIndex=t,this.eventService&&this.eventService.dispatchEvent(this.createLocalRowEvent(e.EVENT_ROW_INDEX_CHANGED)))}setUiLevel(t){this.uiLevel!==t&&(this.uiLevel=t,this.eventService&&this.eventService.dispatchEvent(this.createLocalRowEvent(e.EVENT_UI_LEVEL_CHANGED)))}setExpanded(t,i,n){if(this.expanded===t)return;this.expanded=t,this.eventService&&this.eventService.dispatchEvent(this.createLocalRowEvent(e.EVENT_EXPANDED_CHANGED));const s=Object.assign({},this.createGlobalRowEvent(dt.EVENT_ROW_GROUP_OPENED),{expanded:t,event:i||null});this.beans.rowNodeEventThrottle.dispatchExpanded(s,n),this.beans.rowRenderer.refreshCells({rowNodes:[this]})}createGlobalRowEvent(e){return this.beans.gos.addGridCommonParams({type:e,node:this,data:this.data,rowIndex:this.rowIndex,rowPinned:this.rowPinned})}dispatchLocalEvent(e){this.eventService&&this.eventService.dispatchEvent(e)}setDataValue(e,t,i){const n=(()=>{var t;return"string"!=typeof e?e:null!=(t=this.beans.columnModel.getGridColumn(e))?t:this.beans.columnModel.getPrimaryColumn(e)})(),s=this.getValueFromValueService(n);if(this.beans.gos.get("readOnlyEdit"))return this.dispatchEventForSaveValueReadOnly(n,s,t,i),!1;const r=this.beans.valueService.setValue(this,n,t,i);return this.dispatchCellChangedEvent(n,t,s),this.checkRowSelectable(),r}getValueFromValueService(e){var t,i;const n=this.leafGroup&&this.beans.columnModel.isPivotMode(),s=this.group&&this.expanded&&!this.footer&&!n;let r=!1;const o=null!=(t=this.beans.gos.get("groupTotalRow"))?t:this.beans.gos.get("groupIncludeFooter");r="function"!=typeof o?!!o:!!(null!=(i=this.beans.gos.getCallback("groupTotalRow"))?i:this.beans.gos.getCallback("groupIncludeFooter"))({node:this});const a=this.beans.gos.get("groupSuppressBlankHeader"),l=s&&r&&!a;return this.beans.valueService.getValue(e,this,!1,l)}dispatchEventForSaveValueReadOnly(e,t,i,n){const s=this.beans.gos.addGridCommonParams({type:dt.EVENT_CELL_EDIT_REQUEST,event:null,rowIndex:this.rowIndex,rowPinned:this.rowPinned,column:e,colDef:e.getColDef(),data:this.data,node:this,oldValue:t,newValue:i,value:i,source:n});this.beans.eventService.dispatchEvent(s)}setGroupValue(e,t){const i=this.beans.columnModel.getGridColumn(e);w(this.groupData)&&(this.groupData={});const n=i.getColId(),s=this.groupData[n];s!==t&&(this.groupData[n]=t,this.dispatchCellChangedEvent(i,t,s))}setAggData(e){const t=this.aggData;if(this.aggData=e,this.eventService){const i=e=>{const i=this.aggData?this.aggData[e]:void 0,n=t?t[e]:void 0;if(i===n)return;const s=this.beans.columnModel.lookupGridColumn(e);s&&this.dispatchCellChangedEvent(s,i,n)};for(const e in this.aggData)i(e);for(const t in e)t in this.aggData||i(t)}}updateHasChildren(){let t=this.group&&!this.footer||this.childrenAfterGroup&&this.childrenAfterGroup.length>0;if(this.beans.gos.isRowModelType("serverSide")){const e=this.beans.gos.get("treeData"),i=this.beans.gos.get("isServerSideGroup");t=!this.stub&&!this.footer&&(e?!!i&&i(this.data):!!this.group)}t!==this.__hasChildren&&(this.__hasChildren=!!t,this.eventService&&this.eventService.dispatchEvent(this.createLocalRowEvent(e.EVENT_HAS_CHILDREN_CHANGED)))}hasChildren(){return null==this.__hasChildren&&this.updateHasChildren(),this.__hasChildren}isEmptyRowGroupNode(){return this.group&&x(this.childrenAfterGroup)}dispatchCellChangedEvent(t,i,n){const s={type:e.EVENT_CELL_CHANGED,node:this,column:t,newValue:i,oldValue:n};this.dispatchLocalEvent(s)}resetQuickFilterAggregateText(){this.quickFilterAggregateText=null}isExpandable(){return!this.footer&&(this.beans.columnModel.isPivotMode()?this.hasChildren()&&!this.leafGroup:this.hasChildren()||!!this.master)}isSelected(){return this.footer?this.sibling.isSelected():this.selected}depthFirstSearch(e){this.childrenAfterGroup&&this.childrenAfterGroup.forEach(t=>t.depthFirstSearch(e)),e(this)}calculateSelectedFromChildren(){var e;let t=!1,i=!1,n=!1;if(!(null==(e=this.childrenAfterGroup)?void 0:e.length))return this.selectable?this.selected:null;for(let e=0;e<this.childrenAfterGroup.length;e++){const s=this.childrenAfterGroup[e];let r=s.isSelected();if(!s.selectable){const e=s.calculateSelectedFromChildren();if(null===e)continue;r=e}switch(r){case!0:t=!0;break;case!1:i=!0;break;default:n=!0}}return n||t&&i?void 0:!!t||!i&&(this.selectable?this.selected:null)}setSelectedInitialValue(e){this.selected=e}selectThisNode(t,i,n="api"){const s=!this.selectable&&t,r=this.selected===t;if(s||r)return!1;this.selected=t,this.eventService&&this.dispatchLocalEvent(this.createLocalRowEvent(e.EVENT_ROW_SELECTED));const o=this.sibling;o&&o.footer&&o.eventService&&o.dispatchLocalEvent(o.createLocalRowEvent(e.EVENT_ROW_SELECTED));const a=g(p({},this.createGlobalRowEvent(dt.EVENT_ROW_SELECTED)),{event:i||null,source:n});return this.beans.eventService.dispatchEvent(a),!0}setSelected(e,t=!1,i="api"){"boolean"!=typeof i?this.setSelectedParams({newValue:e,clearSelection:t,rangeSelect:!1,source:i}):console.warn("AG Grid: since version v30, rowNode.setSelected() property `suppressFinishActions` has been removed, please use `gridApi.setNodesSelected()` for bulk actions, and the event `source` property for ignoring events instead.")}setSelectedParams(e){return this.rowPinned?(console.warn("AG Grid: cannot select pinned rows"),0):void 0===this.id?(console.warn("AG Grid: cannot select node until id for node is known"),0):this.beans.selectionService.setNodesSelected(g(p({},e),{nodes:[this.footer?this.sibling:this]}))}isRowPinned(){return"top"===this.rowPinned||"bottom"===this.rowPinned}isParentOfNode(e){let t=this.parent;for(;t;){if(t===e)return!0;t=t.parent}return!1}addEventListener(e,t){var i,n;this.eventService||(this.eventService=new ye),this.beans.frameworkOverrides.shouldWrapOutgoing&&!this.frameworkEventListenerService&&(this.eventService.setFrameworkOverrides(this.beans.frameworkOverrides),this.frameworkEventListenerService=new Ce(this.beans.frameworkOverrides));const s=null!=(n=null==(i=this.frameworkEventListenerService)?void 0:i.wrap(t))?n:t;this.eventService.addEventListener(e,s)}removeEventListener(e,t){var i,n;if(!this.eventService)return;const s=null!=(n=null==(i=this.frameworkEventListenerService)?void 0:i.unwrap(t))?n:t;this.eventService.removeEventListener(e,s),this.eventService.noRegisteredListenersExist()&&(this.eventService=null)}onMouseEnter(){this.dispatchLocalEvent(this.createLocalRowEvent(e.EVENT_MOUSE_ENTER))}onMouseLeave(){this.dispatchLocalEvent(this.createLocalRowEvent(e.EVENT_MOUSE_LEAVE))}getFirstChildOfFirstChild(e){let t=this,i=!0,n=!1,s=null;for(;i&&!n;){const r=t.parent;S(r)&&t.firstChild?r.rowGroupColumn===e&&(n=!0,s=r):i=!1,t=r}return n?s:null}isFullWidthCell(){if(this.detail)return!0;const e=this.beans.gos.getCallback("isFullWidthRow");return!!e&&e({rowNode:this})}getRoute(){if(null==this.key)return;const e=[];let t=this;for(;null!=t.key;)e.push(t.key),t=t.parent;return e.reverse()}createFooter(){if(this.sibling)return;const t=new Set(["eventService","__objectId","sticky"]),i=new e(this.beans);Object.keys(this).forEach(e=>{t.has(e)||(i[e]=this[e])}),i.footer=!0,i.setRowTop(null),i.setRowIndex(null),i.oldRowTop=null,i.id="rowGroupFooter_"+this.id,i.sibling=this,this.sibling=i}destroyFooter(){this.sibling&&(this.sibling.setRowTop(null),this.sibling.setRowIndex(null),this.sibling=void 0)}};Or.ID_PREFIX_ROW_GROUP="row-group-",Or.ID_PREFIX_TOP_PINNED="t-",Or.ID_PREFIX_BOTTOM_PINNED="b-",Or.OBJECT_ID_SEQUENCE=0,Or.EVENT_ROW_SELECTED="rowSelected",Or.EVENT_DATA_CHANGED="dataChanged",Or.EVENT_CELL_CHANGED="cellChanged",Or.EVENT_ALL_CHILDREN_COUNT_CHANGED="allChildrenCountChanged",Or.EVENT_MASTER_CHANGED="masterChanged",Or.EVENT_GROUP_CHANGED="groupChanged",Or.EVENT_MOUSE_ENTER="mouseEnter",Or.EVENT_MOUSE_LEAVE="mouseLeave",Or.EVENT_HEIGHT_CHANGED="heightChanged",Or.EVENT_TOP_CHANGED="topChanged",Or.EVENT_DISPLAYED_CHANGED="displayedChanged",Or.EVENT_FIRST_CHILD_CHANGED="firstChildChanged",Or.EVENT_LAST_CHILD_CHANGED="lastChildChanged",Or.EVENT_CHILD_INDEX_CHANGED="childIndexChanged",Or.EVENT_ROW_INDEX_CHANGED="rowIndexChanged",Or.EVENT_EXPANDED_CHANGED="expandedChanged",Or.EVENT_HAS_CHILDREN_CHANGED="hasChildrenChanged",Or.EVENT_SELECTABLE_CHANGED="selectableChanged",Or.EVENT_UI_LEVEL_CHANGED="uiLevelChanged",Or.EVENT_HIGHLIGHT_CHANGED="rowHighlightChanged",Or.EVENT_DRAGGING_CHANGED="draggingChanged";var _r=Or,Fr=class extends ws{constructor(){super('\n            <div class="ag-selection-checkbox" role="presentation">\n                <ag-checkbox role="presentation" ref="eCheckbox"></ag-checkbox>\n            </div>')}postConstruct(){this.eCheckbox.setPassive(!0)}getCheckboxId(){return this.eCheckbox.getInputElement().id}onDataChanged(){this.onSelectionChanged()}onSelectableChanged(){this.showOrHideSelect()}onSelectionChanged(){const e=this.localeService.getLocaleTextFunc(),t=this.rowNode.isSelected(),i=Ci(e,t),[n,s]=this.rowNode.selectable?["ariaRowToggleSelection","Press Space to toggle row selection"]:["ariaRowSelectionDisabled","Row Selection is disabled for this row"],r=e(n,s);this.eCheckbox.setValue(t,!0),this.eCheckbox.setInputAriaLabel(`${r} (${i})`)}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",e=>{Ze(e)}),this.addManagedListener(this.eCheckbox.getInputElement(),"click",e=>{Ze(e);const t=this.gos.get("groupSelectsFiltered"),i=this.eCheckbox.getValue();this.shouldHandleIndeterminateState(i,t)?0===this.onClicked(!0,t,e||{})&&this.onClicked(!1,t,e):i?this.onClicked(!1,t,e):this.onClicked(!0,t,e||{})}),this.addManagedListener(this.rowNode,_r.EVENT_ROW_SELECTED,this.onSelectionChanged.bind(this)),this.addManagedListener(this.rowNode,_r.EVENT_DATA_CHANGED,this.onDataChanged.bind(this)),this.addManagedListener(this.rowNode,_r.EVENT_SELECTABLE_CHANGED,this.onSelectableChanged.bind(this)),this.gos.get("isRowSelectable")||"function"==typeof this.getIsVisible()){const e=this.showOrHideSelect.bind(this);this.addManagedListener(this.eventService,dt.EVENT_DISPLAYED_COLUMNS_CHANGED,e),this.addManagedListener(this.rowNode,_r.EVENT_DATA_CHANGED,e),this.addManagedListener(this.rowNode,_r.EVENT_CELL_CHANGED,e),this.showOrHideSelect()}this.eCheckbox.getInputElement().setAttribute("tabindex","-1")}shouldHandleIndeterminateState(e,t){return t&&(void 0===this.eCheckbox.getPreviousValue()||void 0===e)&&this.gos.isRowModelType("clientSide")}showOrHideSelect(){var e,t,i;let n=this.rowNode.selectable;const s=this.getIsVisible();if(n)if("function"==typeof s){const t=null==(e=this.overrides)?void 0:e.callbackParams;if(this.column){const e=this.column.createColumnFunctionCallbackParams(this.rowNode);n=s(p(p({},t),e))}else n=s(g(p({},t),{node:this.rowNode,data:this.rowNode.data}))}else n=null!=s&&s;if(null==(t=this.column)?void 0:t.getColDef().showDisabledCheckboxes)return this.eCheckbox.setDisabled(!n),this.setVisible(!0),void this.setDisplayed(!0);(null==(i=this.overrides)?void 0:i.removeHidden)?this.setDisplayed(n):this.setVisible(n)}getIsVisible(){var e,t;return this.overrides?this.overrides.isVisible:null==(t=null==(e=this.column)?void 0:e.getColDef())?void 0:t.checkboxSelection}};m([Es("eCheckbox")],Fr.prototype,"eCheckbox",2),m([he],Fr.prototype,"postConstruct",1);var Gr=(e=>(e[e.Up=0]="Up",e[e.Down=1]="Down",e))(Gr||{}),Vr=(e=>(e[e.Left=0]="Left",e[e.Right=1]="Right",e))(Vr||{}),Br=(e=>(e[e.ToolPanel=0]="ToolPanel",e[e.HeaderCell=1]="HeaderCell",e[e.RowDrag=2]="RowDrag",e[e.ChartPanel=3]="ChartPanel",e[e.AdvancedFilterBuilder=4]="AdvancedFilterBuilder",e))(Br||{}),Hr=class extends ot{constructor(){super(...arguments),this.dragSourceAndParamsList=[],this.dropTargets=[]}init(){this.ePinnedIcon=Xn("columnMovePin",this.gos,null),this.eHideIcon=Xn("columnMoveHide",this.gos,null),this.eMoveIcon=Xn("columnMoveMove",this.gos,null),this.eLeftIcon=Xn("columnMoveLeft",this.gos,null),this.eRightIcon=Xn("columnMoveRight",this.gos,null),this.eGroupIcon=Xn("columnMoveGroup",this.gos,null),this.eAggregateIcon=Xn("columnMoveValue",this.gos,null),this.ePivotIcon=Xn("columnMovePivot",this.gos,null),this.eDropNotAllowedIcon=Xn("dropNotAllowed",this.gos,null)}addDragSource(e,t=!1){const i={eElement:e.eElement,dragStartPixels:e.dragStartPixels,onDragStart:this.onDragStart.bind(this,e),onDragStop:this.onDragStop.bind(this),onDragging:this.onDragging.bind(this),includeTouch:t};this.dragSourceAndParamsList.push({params:i,dragSource:e}),this.dragService.addDragSource(i)}removeDragSource(e){const t=this.dragSourceAndParamsList.find(t=>t.dragSource===e);t&&(this.dragService.removeDragSource(t.params),Fe(this.dragSourceAndParamsList,t))}clearDragSourceParamsList(){this.dragSourceAndParamsList.forEach(e=>this.dragService.removeDragSource(e.params)),this.dragSourceAndParamsList.length=0,this.dropTargets.length=0}nudge(){this.dragging&&this.onDragging(this.eventLastTime,!0)}onDragStart(e,t){this.dragging=!0,this.dragSource=e,this.eventLastTime=t,this.dragItem=this.dragSource.getDragItem(),this.lastDropTarget=void 0,this.dragSource.onDragStarted&&this.dragSource.onDragStarted(),this.createGhost()}onDragStop(e){if(this.eventLastTime=null,this.dragging=!1,this.dragSource.onDragStopped&&this.dragSource.onDragStopped(),this.lastDropTarget&&this.lastDropTarget.onDragStop){const t=this.createDropTargetEvent(this.lastDropTarget,e,null,null,!1);this.lastDropTarget.onDragStop(t)}this.lastDropTarget=null,this.dragItem=null,this.removeGhost()}onDragging(e,t){var i,n,s,r;const o=this.getHorizontalDirection(e),a=this.getVerticalDirection(e);this.eventLastTime=e,this.positionGhost(e);const l=this.dropTargets.filter(t=>this.isMouseOnDropTarget(e,t)),c=this.findCurrentDropTarget(e,l);if(c!==this.lastDropTarget)this.leaveLastTargetIfExists(e,o,a,t),null!==this.lastDropTarget&&null===c&&(null==(n=(i=this.dragSource).onGridExit)||n.call(i,this.dragItem)),null===this.lastDropTarget&&null!==c&&(null==(r=(s=this.dragSource).onGridEnter)||r.call(s,this.dragItem)),this.enterDragTargetIfExists(c,e,o,a,t),this.lastDropTarget=c;else if(c&&c.onDragging){const i=this.createDropTargetEvent(c,e,o,a,t);c.onDragging(i)}}getAllContainersFromDropTarget(e){const t=e.getSecondaryContainers?e.getSecondaryContainers():null,i=[[e.getContainer()]];return t?i.concat(t):i}allContainersIntersect(e,t){for(const i of t){const t=i.getBoundingClientRect();if(0===t.width||0===t.height)return!1;const n=e.clientX>=t.left&&e.clientX<t.right,s=e.clientY>=t.top&&e.clientY<t.bottom;if(!n||!s)return!1}return!0}isMouseOnDropTarget(e,t){const i=this.getAllContainersFromDropTarget(t);let n=!1;for(const t of i)if(this.allContainersIntersect(e,t)){n=!0;break}return!(t.targetContainsSource&&!t.getContainer().contains(this.dragSource.eElement))&&n&&t.isInterestedIn(this.dragSource.type,this.dragSource.eElement)}findCurrentDropTarget(e,t){const i=t.length;if(0===i)return null;if(1===i)return t[0];const n=this.gos.getRootNode().elementsFromPoint(e.clientX,e.clientY);for(const e of n)for(const i of t)if(-1!==We(this.getAllContainersFromDropTarget(i)).indexOf(e))return i;return null}enterDragTargetIfExists(e,t,i,n,s){if(e){if(e.onDragEnter){const r=this.createDropTargetEvent(e,t,i,n,s);e.onDragEnter(r)}this.setGhostIcon(e.getIconName?e.getIconName():null)}}leaveLastTargetIfExists(e,t,i,n){if(this.lastDropTarget){if(this.lastDropTarget.onDragLeave){const s=this.createDropTargetEvent(this.lastDropTarget,e,t,i,n);this.lastDropTarget.onDragLeave(s)}this.setGhostIcon(null)}}addDropTarget(e){this.dropTargets.push(e)}removeDropTarget(e){this.dropTargets=this.dropTargets.filter(t=>t.getContainer()!==e.getContainer())}hasExternalDropZones(){return this.dropTargets.some(e=>e.external)}findExternalZone(e){return this.dropTargets.filter(e=>e.external).find(t=>t.getContainer()===e.getContainer())||null}getHorizontalDirection(e){const t=this.eventLastTime&&this.eventLastTime.clientX,i=e.clientX;return t===i?null:t>i?0:1}getVerticalDirection(e){const t=this.eventLastTime&&this.eventLastTime.clientY,i=e.clientY;return t===i?null:t>i?0:1}createDropTargetEvent(e,t,i,n,s){const r=e.getContainer(),o=r.getBoundingClientRect(),{gridApi:a,columnApi:l,dragItem:c,dragSource:h}=this;return{event:t,x:t.clientX-o.left,y:t.clientY-o.top,vDirection:n,hDirection:i,dragSource:h,fromNudge:s,dragItem:c,api:a,columnApi:l,dropZoneTarget:r}}positionGhost(e){const t=this.eGhost;if(!t)return;const i=t.getBoundingClientRect().height,n=Gi()-2,s=Vi()-2,r=yn(t.offsetParent),{clientY:o,clientX:a}=e;let l=o-r.top-i/2,c=a-r.left-10;const h=this.gos.getDocument(),d=h.defaultView||window,u=d.pageYOffset||h.documentElement.scrollTop,p=d.pageXOffset||h.documentElement.scrollLeft;n>0&&c+t.clientWidth>n+p&&(c=n+p-t.clientWidth),c<0&&(c=0),s>0&&l+t.clientHeight>s+u&&(l=s+u-t.clientHeight),l<0&&(l=0),t.style.left=`${c}px`,t.style.top=`${l}px`}removeGhost(){this.eGhost&&this.eGhostParent&&this.eGhostParent.removeChild(this.eGhost),this.eGhost=null}createGhost(){this.eGhost=An(Hr.GHOST_TEMPLATE),this.mouseEventService.stampTopLevelGridCompWithGridInstance(this.eGhost);const{theme:e}=this.environment.getTheme();e&&this.eGhost.classList.add(e),this.eGhostIcon=this.eGhost.querySelector(".ag-dnd-ghost-icon"),this.setGhostIcon(null);const t=this.eGhost.querySelector(".ag-dnd-ghost-label");let i=this.dragSource.dragItemName;Y(i)&&(i=i()),t.innerHTML=St(i)||"",this.eGhost.style.height="25px",this.eGhost.style.top="20px",this.eGhost.style.left="20px";const n=this.gos.getDocument();let s=null,r=null;try{s=n.fullscreenElement}catch(e){}finally{s||(s=this.gos.getRootNode());r=s.querySelector("body")||(s instanceof ShadowRoot?s:s instanceof Document?null==s?void 0:s.documentElement:s)}this.eGhostParent=r,this.eGhostParent?this.eGhostParent.appendChild(this.eGhost):console.warn("AG Grid: could not find document body, it is needed for dragging columns")}setGhostIcon(e,t=!1){wn(this.eGhostIcon);let i=null;switch(e||(e=this.dragSource.getDefaultIconName?this.dragSource.getDefaultIconName():Hr.ICON_NOT_ALLOWED),e){case Hr.ICON_PINNED:i=this.ePinnedIcon;break;case Hr.ICON_MOVE:i=this.eMoveIcon;break;case Hr.ICON_LEFT:i=this.eLeftIcon;break;case Hr.ICON_RIGHT:i=this.eRightIcon;break;case Hr.ICON_GROUP:i=this.eGroupIcon;break;case Hr.ICON_AGGREGATE:i=this.eAggregateIcon;break;case Hr.ICON_PIVOT:i=this.ePivotIcon;break;case Hr.ICON_NOT_ALLOWED:i=this.eDropNotAllowedIcon;break;case Hr.ICON_HIDE:i=this.eHideIcon}this.eGhostIcon.classList.toggle("ag-shake-left-to-right",t),i===this.eHideIcon&&this.gos.get("suppressDragLeaveHidesColumns")||i&&this.eGhostIcon.appendChild(i)}};Hr.ICON_PINNED="pinned",Hr.ICON_MOVE="move",Hr.ICON_LEFT="left",Hr.ICON_RIGHT="right",Hr.ICON_GROUP="group",Hr.ICON_AGGREGATE="aggregate",Hr.ICON_PIVOT="pivot",Hr.ICON_NOT_ALLOWED="notAllowed",Hr.ICON_HIDE="hide",Hr.GHOST_TEMPLATE='<div class="ag-dnd-ghost ag-unselectable">\n            <span class="ag-dnd-ghost-icon ag-shake-left-to-right"></span>\n            <div class="ag-dnd-ghost-label"></div>\n        </div>',m([pe("dragService")],Hr.prototype,"dragService",2),m([pe("mouseEventService")],Hr.prototype,"mouseEventService",2),m([pe("columnApi")],Hr.prototype,"columnApi",2),m([pe("gridApi")],Hr.prototype,"gridApi",2),m([he],Hr.prototype,"init",1),m([de],Hr.prototype,"clearDragSourceParamsList",1),Hr=m([ue("dragAndDropService")],Hr);var zr=class extends ws{constructor(e,t,i,n,s,r){super(),this.cellValueFn=e,this.rowNode=t,this.column=i,this.customGui=n,this.dragStartPixels=s,this.suppressVisibilityChange=r,this.dragSource=null}isCustomGui(){return null!=this.customGui}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(Zn("rowDrag",this.gos,null)),this.addDragSource()),this.checkCompatibility(),!this.suppressVisibilityChange){const e=this.gos.get("rowDragManaged")?new jr(this,this.beans,this.rowNode,this.column):new Wr(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.gos.get("rowDragMultiRow"))return[this.rowNode];const e=this.beans.selectionService.getSelectedNodes();return-1!==e.indexOf(this.rowNode)?e:[this.rowNode]}checkCompatibility(){const e=this.gos.get("rowDragManaged");this.gos.get("treeData")&&e&&j("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.gos.get("rowDragText")}addDragSource(e=4){this.dragSource&&this.removeDragSource();const t=this.localeService.getLocaleTextFunc();this.dragSource={type:2,eElement:this.getGui(),dragItemName:()=>{var e;const i=this.getDragItem(),n=(null==(e=i.rowNodes)?void 0:e.length)||1,s=this.getRowDragText(this.column);return s?s(i,n):1===n?this.cellValueFn():`${n} ${t("rowDragRows","rows")}`},getDragItem:()=>this.getDragItem(),dragStartPixels:e,dragSourceDomDataKey:this.gos.getDomDataKey()},this.beans.dragAndDropService.addDragSource(this.dragSource,!0)}removeDragSource(){this.dragSource&&this.beans.dragAndDropService.removeDragSource(this.dragSource),this.dragSource=null}};m([pe("beans")],zr.prototype,"beans",2),m([he],zr.prototype,"postConstruct",1),m([de],zr.prototype,"removeDragSource",1);var Ur=class extends ot{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 e=!0,i=!1;this.column&&(e=this.column.isRowDrag(this.rowNode)||this.parent.isCustomGui(),i=Y(this.column.getColDef().rowDrag)),i?(this.parent.setDisplayed(!0,t),this.parent.setVisible(e,t)):(this.parent.setDisplayed(e,t),this.parent.setVisible(!0,t))}}},Wr=class extends Ur{constructor(e,t,i,n){super(e,i,n),this.beans=t}postConstruct(){this.addManagedPropertyListener("suppressRowDrag",this.onSuppressRowDrag.bind(this)),this.addManagedListener(this.rowNode,_r.EVENT_DATA_CHANGED,this.workOutVisibility.bind(this)),this.addManagedListener(this.rowNode,_r.EVENT_CELL_CHANGED,this.workOutVisibility.bind(this)),this.addManagedListener(this.rowNode,_r.EVENT_CELL_CHANGED,this.workOutVisibility.bind(this)),this.addManagedListener(this.beans.eventService,dt.EVENT_NEW_COLUMNS_LOADED,this.workOutVisibility.bind(this)),this.workOutVisibility()}onSuppressRowDrag(){this.workOutVisibility()}workOutVisibility(){const e=this.gos.get("suppressRowDrag");this.setDisplayedOrVisible(e)}};m([he],Wr.prototype,"postConstruct",1);var jr=class extends Ur{constructor(e,t,i,n){super(e,i,n),this.beans=t}postConstruct(){this.addManagedListener(this.beans.eventService,dt.EVENT_SORT_CHANGED,this.workOutVisibility.bind(this)),this.addManagedListener(this.beans.eventService,dt.EVENT_FILTER_CHANGED,this.workOutVisibility.bind(this)),this.addManagedListener(this.beans.eventService,dt.EVENT_COLUMN_ROW_GROUP_CHANGED,this.workOutVisibility.bind(this)),this.addManagedListener(this.beans.eventService,dt.EVENT_NEW_COLUMNS_LOADED,this.workOutVisibility.bind(this)),this.addManagedListener(this.rowNode,_r.EVENT_DATA_CHANGED,this.workOutVisibility.bind(this)),this.addManagedListener(this.rowNode,_r.EVENT_CELL_CHANGED,this.workOutVisibility.bind(this)),this.addManagedPropertyListener("suppressRowDrag",this.onSuppressRowDrag.bind(this)),this.workOutVisibility()}onSuppressRowDrag(){this.workOutVisibility()}workOutVisibility(){const e=this.beans.ctrlsService.getGridBodyCtrl().getRowDragFeature(),t=e&&e.shouldPreventRowMove(),i=this.gos.get("suppressRowDrag"),n=this.beans.dragAndDropService.hasExternalDropZones(),s=t&&!n||i;this.setDisplayedOrVisible(s)}};m([he],jr.prototype,"postConstruct",1);var Kr=class extends ot{init(e,t,i,n,s,r,o){var a,l,c,h;this.params=o,this.eGui=t,this.eCheckbox=i,this.eExpanded=n,this.eContracted=s,this.comp=e,this.compClass=r;const{node:d,value:u,colDef:p}=o,g=this.isTopLevelFooter();if(!g){if(this.isEmbeddedRowMismatch())return;if(d.footer&&this.gos.get("groupHideOpenParents")&&(p&&p.showRowGroup)!==(d.rowGroupColumn&&d.rowGroupColumn.getColId()))return}if(this.setupShowingValueForOpenedParent(),this.findDisplayedGroupNode(),!g){const e=o.node.footer&&o.node.rowGroupIndex===this.columnModel.getRowGroupColumns().findIndex(e=>{var t;return e.getColId()===(null==(t=o.colDef)?void 0:t.showRowGroup)}),t="multipleColumns"!=this.gos.get("groupDisplayType")||this.gos.get("treeData")||this.gos.get("showOpenedGroup")&&!o.node.footer&&(!o.node.group||null!=o.node.rowGroupIndex&&o.node.rowGroupIndex>this.columnModel.getRowGroupColumns().findIndex(e=>{var t;return e.getColId()===(null==(t=o.colDef)?void 0:t.showRowGroup)})),i=!d.group&&((null==(a=this.params.colDef)?void 0:a.field)||(null==(l=this.params.colDef)?void 0:l.valueGetter)),n=this.isExpandable(),s=this.columnModel.isPivotMode()&&d.leafGroup&&(null==(c=d.rowGroupColumn)?void 0:c.getColId())===(null==(h=o.column)?void 0:h.getColDef().showRowGroup);if(!(this.showingValueForOpenedParent||n||i||t||e||s))return}this.addExpandAndContract(),this.addFullWidthRowDraggerIfNeeded(),this.addCheckboxIfNeeded(),this.addValueElement(),this.setupIndent(),this.refreshAriaExpanded()}getCellAriaRole(){var e,t;const i=null==(e=this.params.colDef)?void 0:e.cellAriaRole,n=null==(t=this.params.column)?void 0:t.getColDef().cellAriaRole;return i||n||"gridcell"}destroy(){super.destroy(),this.expandListener=null}refreshAriaExpanded(){const{node:e,eGridCell:t}=this.params;if(this.expandListener&&(this.expandListener=this.expandListener()),!this.isExpandable())return void ri(t);const i=()=>{si(t,!!e.expanded)};this.expandListener=this.addManagedListener(e,_r.EVENT_EXPANDED_CHANGED,i)||null,i()}isTopLevelFooter(){if(!this.gos.getGrandTotalRow())return!1;if(null!=this.params.value||-1!=this.params.node.level)return!1;const e=this.params.colDef;if(null==e)return!0;if(!0===e.showRowGroup)return!0;const t=this.columnModel.getRowGroupColumns();return!t||0===t.length||t[0].getId()===e.showRowGroup}isEmbeddedRowMismatch(){if(!this.params.fullWidth||!this.gos.get("embedFullWidthRows"))return!1;const e="left"===this.params.pinned,t="right"===this.params.pinned,i=!e&&!t;return this.gos.get("enableRtl")?this.columnModel.isPinningLeft()?!t:!i:this.columnModel.isPinningLeft()?!e:!i}findDisplayedGroupNode(){const e=this.params.column,t=this.params.node;if(this.showingValueForOpenedParent){let i=t.parent;for(;null!=i;){if(i.rowGroupColumn&&e.isRowGroupDisplayed(i.rowGroupColumn.getId())){this.displayedGroupNode=i;break}i=i.parent}}w(this.displayedGroupNode)&&(this.displayedGroupNode=t)}setupShowingValueForOpenedParent(){const e=this.params.node,t=this.params.column;if(!this.gos.get("groupHideOpenParents"))return void(this.showingValueForOpenedParent=!1);if(!e.groupData)return void(this.showingValueForOpenedParent=!1);if(null!=e.rowGroupColumn){const i=e.rowGroupColumn.getId();if(t.isRowGroupDisplayed(i))return void(this.showingValueForOpenedParent=!1)}const i=null!=e.groupData[t.getId()];this.showingValueForOpenedParent=i}addValueElement(){this.displayedGroupNode.footer?this.addFooterValue():(this.addGroupValue(),this.addChildCount())}addGroupValue(){var e;const t=this.adjustParamsWithDetailsFromRelatedColumn(),i=this.getInnerCompDetails(t),{valueFormatted:n,value:s}=t;let r=n;if(null==r){const t=this.displayedGroupNode.rowGroupColumn&&(null==(e=this.params.column)?void 0:e.isRowGroupDisplayed(this.displayedGroupNode.rowGroupColumn.getId()));r=""===this.displayedGroupNode.key&&this.displayedGroupNode.group&&t?this.localeService.getLocaleTextFunc()("blanks","(Blanks)"):null!=s?s:null}this.comp.setInnerRenderer(i,r)}adjustParamsWithDetailsFromRelatedColumn(){const e=this.displayedGroupNode.rowGroupColumn,t=this.params.column;if(!e)return this.params;if(null!=t&&!t.isRowGroupDisplayed(e.getId()))return this.params;const i=this.params,{value:n,node:s}=this.params,r=this.valueService.formatValue(e,s,n);return g(p({},i),{valueFormatted:r})}addFooterValue(){let e=this.params.totalValueGetter;if(!e){const t=this.params.footerValueGetter;t&&(e=t,j("As of v31.3, footerValueGetter is deprecated. Use `totalValueGetter` instead."))}let t="";if(e){const i=O(this.params);i.value=this.params.value,"function"==typeof e?t=e(i):"string"==typeof e?t=this.expressionService.evaluate(e,i):console.warn("AG Grid: footerValueGetter should be either a function or a string (expression)")}else t=this.localeService.getLocaleTextFunc()("footerTotal","Total")+" "+(null!=this.params.value?this.params.value:"");const i=this.getInnerCompDetails(this.params);this.comp.setInnerRenderer(i,t)}getInnerCompDetails(e){if(e.fullWidth)return this.userComponentFactory.getFullWidthGroupRowInnerCellRenderer(this.gos.get("groupRowRendererParams"),e);const t=this.userComponentFactory.getInnerRendererDetails(e,e),i=e=>e&&e.componentClass==this.compClass;if(t&&!i(t))return t;const n=this.displayedGroupNode.rowGroupColumn,s=n?n.getColDef():void 0;if(!s)return;const r=this.userComponentFactory.getCellRendererDetails(s,e);return r&&!i(r)?r:i(r)&&s.cellRendererParams&&s.cellRendererParams.innerRenderer?this.userComponentFactory.getInnerRendererDetails(s.cellRendererParams,e):void 0}addChildCount(){this.params.suppressCount||(this.addManagedListener(this.displayedGroupNode,_r.EVENT_ALL_CHILDREN_COUNT_CHANGED,this.updateChildCount.bind(this)),this.updateChildCount())}updateChildCount(){const e=this.displayedGroupNode.allChildrenCount,t=this.isShowRowGroupForThisRow()&&null!=e&&e>=0?`(${e})`:"";this.comp.setChildCount(t)}isShowRowGroupForThisRow(){if(this.gos.get("treeData"))return!0;const e=this.displayedGroupNode.rowGroupColumn;if(!e)return!1;const t=this.params.column;return null==t||t.isRowGroupDisplayed(e.getId())}addExpandAndContract(){var e;const t=this.params,i=Zn("groupExpanded",this.gos,null),n=Zn("groupContracted",this.gos,null);i&&this.eExpanded.appendChild(i),n&&this.eContracted.appendChild(n);const s=t.eGridCell;(null==(e=this.params.column)?void 0:e.isCellEditable(t.node))&&this.gos.get("enableGroupEdit")||!this.isExpandable()||t.suppressDoubleClickExpand||this.addManagedListener(s,"dblclick",this.onCellDblClicked.bind(this)),this.addManagedListener(this.eExpanded,"click",this.onExpandClicked.bind(this)),this.addManagedListener(this.eContracted,"click",this.onExpandClicked.bind(this)),this.addManagedListener(s,"keydown",this.onKeyDown.bind(this)),this.addManagedListener(t.node,_r.EVENT_EXPANDED_CHANGED,this.showExpandAndContractIcons.bind(this)),this.showExpandAndContractIcons();const r=this.onRowNodeIsExpandableChanged.bind(this);this.addManagedListener(this.displayedGroupNode,_r.EVENT_ALL_CHILDREN_COUNT_CHANGED,r),this.addManagedListener(this.displayedGroupNode,_r.EVENT_MASTER_CHANGED,r),this.addManagedListener(this.displayedGroupNode,_r.EVENT_GROUP_CHANGED,r),this.addManagedListener(this.displayedGroupNode,_r.EVENT_HAS_CHILDREN_CHANGED,r)}onExpandClicked(e){Qe(e)||(Ze(e),this.onExpandOrContract(e))}onExpandOrContract(e){const t=this.displayedGroupNode,i=!t.expanded;!i&&t.sticky&&this.scrollToStickyNode(t),t.setExpanded(i,e)}scrollToStickyNode(e){this.ctrlsService.getGridBodyCtrl().getScrollFeature().setVerticalScrollPosition(e.rowTop-e.stickyRowTop)}isExpandable(){if(this.showingValueForOpenedParent)return!0;const e=this.displayedGroupNode,t=this.columnModel.isPivotMode()&&e.leafGroup;if(!e.isExpandable()||e.footer||t)return!1;const i=this.params.column;return null==i||"string"!=typeof i.getColDef().showRowGroup||this.isShowRowGroupForThisRow()}showExpandAndContractIcons(){const{params:e,displayedGroupNode:t,columnModel:i}=this,{node:n}=e,s=this.isExpandable();if(s){const e=!!this.showingValueForOpenedParent||n.expanded;this.comp.setExpandedDisplayed(e),this.comp.setContractedDisplayed(!e)}else this.comp.setExpandedDisplayed(!1),this.comp.setContractedDisplayed(!1);const r=i.isPivotMode(),o=r&&t.leafGroup,a=s&&!o,l=n.footer&&-1===n.level;this.comp.addOrRemoveCssClass("ag-cell-expandable",a),this.comp.addOrRemoveCssClass("ag-row-group",a),r?this.comp.addOrRemoveCssClass("ag-pivot-leaf-group",o):l||this.comp.addOrRemoveCssClass("ag-row-group-leaf-indent",!a)}onRowNodeIsExpandableChanged(){this.showExpandAndContractIcons(),this.setIndent(),this.refreshAriaExpanded()}setupIndent(){const e=this.params.node;this.params.suppressPadding||(this.addManagedListener(e,_r.EVENT_UI_LEVEL_CHANGED,this.setIndent.bind(this)),this.setIndent())}setIndent(){if(this.gos.get("groupHideOpenParents"))return;const e=this.params,t=e.node,i=!!e.colDef,n=this.gos.get("treeData"),s=!i||n||!0===e.colDef.showRowGroup?t.uiLevel:0;this.indentClass&&this.comp.addOrRemoveCssClass(this.indentClass,!1),this.indentClass="ag-row-group-indent-"+s,this.comp.addOrRemoveCssClass(this.indentClass,!0)}addFullWidthRowDraggerIfNeeded(){if(!this.params.fullWidth||!this.params.rowDrag)return;const e=new zr(()=>this.params.value,this.params.node);this.createManagedBean(e,this.context),this.eGui.insertAdjacentElement("afterbegin",e.getGui())}isUserWantsSelected(){const e=this.params.checkbox;return"function"==typeof e||!0===e}addCheckboxIfNeeded(){const e=this.displayedGroupNode,t=this.isUserWantsSelected()&&!e.footer&&!e.rowPinned&&!e.detail;if(t){const e=new Fr;this.getContext().createBean(e),e.init({rowNode:this.params.node,column:this.params.column,overrides:{isVisible:this.params.checkbox,callbackParams:this.params,removeHidden:!0}}),this.eCheckbox.appendChild(e.getGui()),this.addDestroyFunc(()=>this.getContext().destroyBean(e))}this.comp.setCheckboxVisible(t)}onKeyDown(e){e.key!==Jn.ENTER||this.params.suppressEnterExpand||this.params.column&&this.params.column.isCellEditable(this.params.node)||this.onExpandOrContract(e)}onCellDblClicked(e){Qe(e)||tt(this.eExpanded,e)||tt(this.eContracted,e)||this.onExpandOrContract(e)}};m([pe("expressionService")],Kr.prototype,"expressionService",2),m([pe("valueService")],Kr.prototype,"valueService",2),m([pe("columnModel")],Kr.prototype,"columnModel",2),m([pe("userComponentFactory")],Kr.prototype,"userComponentFactory",2),m([pe("ctrlsService")],Kr.prototype,"ctrlsService",2);var $r=class e extends ws{constructor(){super(e.TEMPLATE)}init(e){const t={setInnerRenderer:(e,t)=>this.setRenderDetails(e,t),setChildCount:e=>this.eChildCount.textContent=e,addOrRemoveCssClass:(e,t)=>this.addOrRemoveCssClass(e,t),setContractedDisplayed:e=>cn(this.eContracted,e),setExpandedDisplayed:e=>cn(this.eExpanded,e),setCheckboxVisible:e=>this.eCheckbox.classList.toggle("ag-invisible",!e)},i=this.createManagedBean(new Kr),n=!e.colDef,s=this.getGui();i.init(t,s,this.eCheckbox,this.eExpanded,this.eContracted,this.constructor,e),n&&Ut(s,i.getCellAriaRole())}setRenderDetails(e,t){if(e){const t=e.newAgStackInstance();if(!t)return;t.then(e=>{if(!e)return;const t=()=>this.context.destroyBean(e);this.isAlive()?(this.eValue.appendChild(e.getGui()),this.addDestroyFunc(t)):t()})}else this.eValue.innerText=t}destroy(){this.getContext().destroyBean(this.innerCellRenderer),super.destroy()}refresh(){return!1}};$r.TEMPLATE='<span class="ag-cell-wrapper">\n            <span class="ag-group-expanded" ref="eExpanded"></span>\n            <span class="ag-group-contracted" ref="eContracted"></span>\n            <span class="ag-group-checkbox ag-invisible" ref="eCheckbox"></span>\n            <span class="ag-group-value" ref="eValue"></span>\n            <span class="ag-group-child-count" ref="eChildCount"></span>\n        </span>',m([Es("eExpanded")],$r.prototype,"eExpanded",2),m([Es("eContracted")],$r.prototype,"eContracted",2),m([Es("eCheckbox")],$r.prototype,"eCheckbox",2),m([Es("eValue")],$r.prototype,"eValue",2),m([Es("eChildCount")],$r.prototype,"eChildCount",2);var Yr=$r,qr=class e extends ws{constructor(){super(e.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=Zn("groupLoading",this.gos,null);e&&this.eLoadingIcon.appendChild(e);const t=this.localeService.getLocaleTextFunc();this.eLoadingText.innerText=t("loadingOoo","Loading")}refresh(e){return!1}destroy(){super.destroy()}};qr.TEMPLATE='<div class="ag-loading">\n            <span class="ag-loading-icon" ref="eLoadingIcon"></span>\n            <span class="ag-loading-text" ref="eLoadingText"></span>\n        </div>',m([Es("eLoadingIcon")],qr.prototype,"eLoadingIcon",2),m([Es("eLoadingText")],qr.prototype,"eLoadingText",2);var Xr=qr,Zr=class e extends ws{constructor(){super(e.TEMPLATE)}init(e){const t=`ag-cell-skeleton-renderer-${this.getCompId()}`;this.getGui().setAttribute("id",t),this.addDestroyFunc(()=>qt(e.eParentOfValue)),qt(e.eParentOfValue,t),e.node.failedLoad?this.setupFailed():this.setupLoading()}setupFailed(){const e=this.localeService.getLocaleTextFunc();this.getGui().innerText=e("loadingError","ERR");const t=e("ariaSkeletonCellLoadingFailed","Row failed to load");Yt(this.getGui(),t)}setupLoading(){const e=this.gos.getDocument().createElement("div");e.classList.add("ag-skeleton-effect"),this.getGui().appendChild(e);const t=this.localeService.getLocaleTextFunc()("ariaSkeletonCellLoading","Row data is loading");Yt(this.getGui(),t)}refresh(e){return!1}destroy(){super.destroy()}};Zr.TEMPLATE='<div class="ag-skeleton-container"></div>';var Qr=Zr,Jr=class e extends ws{constructor(){super()}destroy(){super.destroy()}init(t){const i=this.gos.get("overlayLoadingTemplate");if(this.setTemplate(null!=i?i:e.DEFAULT_LOADING_OVERLAY_TEMPLATE),!i){const e=this.localeService.getLocaleTextFunc();setTimeout(()=>{this.getGui().textContent=e("loadingOoo","Loading...")})}}};Jr.DEFAULT_LOADING_OVERLAY_TEMPLATE='<span aria-live="polite" aria-atomic="true" class="ag-overlay-loading-center"></span>';var eo=Jr,to=class e extends ws{constructor(){super()}destroy(){super.destroy()}init(t){const i=this.gos.get("overlayNoRowsTemplate");if(this.setTemplate(null!=i?i:e.DEFAULT_NO_ROWS_TEMPLATE),!i){const e=this.localeService.getLocaleTextFunc();setTimeout(()=>{this.getGui().textContent=e("noRowsToShow","No Rows To Show")})}}};to.DEFAULT_NO_ROWS_TEMPLATE='<span class="ag-overlay-no-rows-center"></span>';var io=to,no=class extends Ar{constructor(){super('<div class="ag-tooltip"></div>')}init(e){const{value:t}=e;this.getGui().textContent=St(t,!0)}},so=class{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,null!=t.max&&e.setMax(t.max),null!=t.min&&e.setMin(t.min),null!=t.precision&&e.setPrecision(t.precision),null!=t.step&&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!==Jn.UP&&e.key!==Jn.DOWN||e.preventDefault()}getValue(){const e=this.eInput.getValue();if(!S(e)&&!S(this.params.value))return this.params.value;let t=this.params.parseValue(e);if(null==t)return t;if("string"==typeof t){if(""===t)return null;t=Number(t)}return isNaN(t)?null:t}getStartValue(){return this.params.value}},ro=class extends Rr{constructor(){super(new so)}},oo=class{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,null!=t.min&&e.setMin(t.min),null!=t.max&&e.setMax(t.max),null!=t.step&&e.setStep(t.step)}getValue(){const e=this.eInput.getDate();return S(e)||S(this.params.value)?null!=e?e:null:this.params.value}getStartValue(){const{value:e}=this.params;if(e instanceof Date)return Qi(e,!1)}},ao=class extends Rr{constructor(){super(new oo)}},lo=class{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,null!=t.min&&e.setMin(t.min),null!=t.max&&e.setMax(t.max),null!=t.step&&e.setStep(t.step)}getValue(){const e=this.formatDate(this.eInput.getDate());return S(e)||S(this.params.value)?this.params.parseValue(null!=e?e:""):this.params.value}getStartValue(){var e,t;return Qi(null!=(t=this.parseDate(null!=(e=this.params.value)?e: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)}},co=class extends Rr{constructor(){super(new lo(()=>this.dataTypeService))}};m([pe("dataTypeService")],co.prototype,"dataTypeService",2);var ho=class e extends ws{constructor(){super(e.TEMPLATE)}init(e){this.params=e,this.updateCheckbox(e);const t=this.eCheckbox.getInputElement();t.setAttribute("tabindex","-1"),Zt(t,"polite"),this.addManagedListener(t,"click",e=>{if(Ze(e),this.eCheckbox.isDisabled())return;const t=this.eCheckbox.getValue();this.onCheckboxChanged(t)}),this.addManagedListener(t,"dblclick",e=>{Ze(e)}),this.addManagedListener(this.params.eGridCell,"keydown",e=>{if(e.key===Jn.SPACE&&!this.eCheckbox.isDisabled()){this.params.eGridCell===this.gos.getActiveDomElement()&&this.eCheckbox.toggle();const t=this.eCheckbox.getValue();this.onCheckboxChanged(t),e.preventDefault()}})}refresh(e){return this.params=e,this.updateCheckbox(e),!0}updateCheckbox(e){var t,i,n;let s,r=!0;if(e.node.group&&e.column){const i=e.column.getColId();i.startsWith(gt)?s=null==e.value||""===e.value?void 0:"true"===e.value:e.node.aggData&&void 0!==e.node.aggData[i]?s=null!=(t=e.value)?t:void 0:r=!1}else s=null!=(i=e.value)?i:void 0;if(!r)return void this.eCheckbox.setDisplayed(!1);this.eCheckbox.setValue(s);const o=null!=e.disabled?e.disabled:!(null==(n=e.column)?void 0:n.isCellEditable(e.node));this.eCheckbox.setDisabled(o);const a=this.localeService.getLocaleTextFunc(),l=Ci(a,s),c=o?l:`${a("ariaToggleCellValue","Press SPACE to toggle cell value")} (${l})`;this.eCheckbox.setInputAriaLabel(c)}onCheckboxChanged(e){const{column:t,node:i,rowIndex:n,value:s}=this.params,r={type:dt.EVENT_CELL_EDITING_STARTED,column:t,colDef:null==t?void 0:t.getColDef(),data:i.data,node:i,rowIndex:n,rowPinned:i.rowPinned,value:s};this.eventService.dispatchEvent(r);const o=this.params.node.setDataValue(this.params.column,e,"edit"),a={type:dt.EVENT_CELL_EDITING_STOPPED,column:t,colDef:null==t?void 0:t.getColDef(),data:i.data,node:i,rowIndex:n,rowPinned:i.rowPinned,value:s,oldValue:s,newValue:e,valueChanged:o};this.eventService.dispatchEvent(a)}};ho.TEMPLATE='\n        <div class="ag-cell-wrapper ag-checkbox-cell" role="presentation">\n            <ag-checkbox role="presentation" ref="eCheckbox"></ag-checkbox>\n        </div>',m([Es("eCheckbox")],ho.prototype,"eCheckbox",2);var uo=ho,po=class extends Ar{constructor(){super('\n            <div class="ag-cell-wrapper ag-cell-edit-wrapper ag-checkbox-edit">\n                <ag-checkbox role="presentation" ref="eCheckbox"></ag-checkbox>\n            </div>')}init(e){var t;this.params=e;const i=null!=(t=e.value)?t:void 0;this.eCheckbox.setValue(i),this.eCheckbox.getInputElement().setAttribute("tabindex","-1"),this.setAriaLabel(i),this.addManagedListener(this.eCheckbox,dt.EVENT_FIELD_VALUE_CHANGED,e=>this.setAriaLabel(e.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=Ci(t,e),n=t("ariaToggleCellValue","Press SPACE to toggle cell value");this.eCheckbox.setInputAriaLabel(`${n} (${i})`)}};m([Es("eCheckbox")],po.prototype,"eCheckbox",2);var go=class extends ws{constructor(){super(),this.setTemplate("<div></div>")}init(e){var t;this.params=e,this.cssClassPrefix=null!=(t=this.params.cssClassPrefix)?t:"ag-menu-option",this.addIcon(),this.addName(),this.addShortcut(),this.addSubMenu()}configureDefaults(){return!0}addIcon(){if(this.params.isCompact)return;const e=An(`<span ref="eIcon" class="${this.getClassName("part")} ${this.getClassName("icon")}" role="presentation"></span>`);this.params.checked?e.appendChild(Zn("check",this.gos)):this.params.icon&&(Gn(this.params.icon)?e.appendChild(this.params.icon):"string"==typeof this.params.icon?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=An(`<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=An(`<span ref="eShortcut" class="${this.getClassName("part")} ${this.getClassName("shortcut")}">${this.params.shortcut||""}</span>`);this.getGui().appendChild(e)}addSubMenu(){const e=An(`<span ref="ePopupPointer" class="${this.getClassName("part")} ${this.getClassName("popup-pointer")}"></span>`),t=this.getGui();if(this.params.subMenu){const i=this.gos.get("enableRtl")?"smallLeft":"smallRight";si(t,!1),e.appendChild(Zn(i,this.gos))}t.appendChild(e)}getClassName(e){return`${this.cssClassPrefix}-${e}`}destroy(){super.destroy()}},fo=class extends ot{constructor(){super(...arguments),this.agGridDefaults={agDateInput:nr,agColumnHeader:xr,agColumnGroupHeader:Mr,agSortIndicator:Sr,agTextColumnFloatingFilter:vr,agNumberColumnFloatingFilter:mr,agDateColumnFloatingFilter:ir,agReadOnlyFloatingFilter:As,agAnimateShowChangeCellRenderer:Pr,agAnimateSlideCellRenderer:Nr,agGroupCellRenderer:Yr,agGroupRowRenderer:Yr,agLoadingCellRenderer:Xr,agSkeletonCellRenderer:Qr,agCheckboxCellRenderer:uo,agCellEditor:kr,agTextCellEditor:kr,agNumberCellEditor:ro,agDateCellEditor:ao,agDateStringCellEditor:co,agSelectCellEditor:Ir,agLargeTextCellEditor:Dr,agCheckboxCellEditor:po,agTextColumnFilter:ur,agNumberColumnFilter:cr,agDateColumnFilter:er,agLoadingOverlay:eo,agNoRowsOverlay:io,agTooltipComponent:no,agMenuItem:go},this.enterpriseAgDefaultCompsModule={agSetColumnFilter:"@ag-grid-enterprise/set-filter",agSetColumnFloatingFilter:"@ag-grid-enterprise/set-filter",agMultiColumnFilter:"@ag-grid-enterprise/multi-filter",agMultiColumnFloatingFilter:"@ag-grid-enterprise/multi-filter",agGroupColumnFilter:"@ag-grid-enterprise/row-grouping",agGroupColumnFloatingFilter:"@ag-grid-enterprise/row-grouping",agRichSelect:"@ag-grid-enterprise/rich-select",agRichSelectCellEditor:"@ag-grid-enterprise/rich-select",agDetailCellRenderer:"@ag-grid-enterprise/master-detail",agSparklineCellRenderer:"@ag-grid-enterprise/sparklines"},this.jsComps={}}init(){const e=this.gos.get("components");null!=e&&N(e,(e,t)=>this.registerJsComponent(e,t))}registerDefaultComponent(e,t){this.agGridDefaults[e]?console.error("Trying to overwrite a default component. You should call registerComponent"):this.agGridDefaults[e]=t}registerJsComponent(e,t){this.jsComps[e]=t}retrieve(e,t){const i=(e,t)=>({componentFromFramework:t,component:e}),n=this.getFrameworkOverrides().frameworkComponent(t,this.gos.get("components"));if(null!=n)return i(n,!0);const s=this.jsComps[t];if(s)return i(s,this.getFrameworkOverrides().isFrameworkComponent(s));const r=this.agGridDefaults[t];if(r)return i(r,!1);const o=this.enterpriseAgDefaultCompsModule[t];return o?ae.__assertRegistered(o,`AG Grid '${e}' component: ${t}`,this.context.getGridId()):W(()=>{this.warnAboutMissingComponent(e,t)},"MissingComp"+t),null}warnAboutMissingComponent(e,t){const i=Kn(t,[...Object.keys(this.agGridDefaults).filter(e=>!["agCellEditor","agGroupRowRenderer","agSortIndicator"].includes(e)),...Object.keys(this.jsComps)],!0,.8).values;console.warn(`AG Grid: Could not find '${t}' component. It was configured as "${e}: '${t}'" but it wasn't found in the list of registered components.`),i.length>0&&console.warn(`         Did you mean: [${i.slice(0,3)}]?`),console.warn(`If using a custom component check it has been registered as described in: ${this.getFrameworkOverrides().getDocLink("components/")}`)}};m([he],fo.prototype,"init",1),fo=m([ue("userComponentRegistry")],fo);var mo={propertyName:"dateComponent",cellRenderer:!1},vo={propertyName:"headerComponent",cellRenderer:!1},yo={propertyName:"headerGroupComponent",cellRenderer:!1},Co={propertyName:"cellRenderer",cellRenderer:!0},bo={propertyName:"loadingCellRenderer",cellRenderer:!0},So={propertyName:"cellEditor",cellRenderer:!1},wo={propertyName:"innerRenderer",cellRenderer:!0},xo={propertyName:"loadingOverlayComponent",cellRenderer:!1},Eo={propertyName:"noRowsOverlayComponent",cellRenderer:!1},Mo={propertyName:"tooltipComponent",cellRenderer:!1},Ao={propertyName:"filter",cellRenderer:!1},To={propertyName:"floatingFilterComponent",cellRenderer:!1},Do={propertyName:"toolPanel",cellRenderer:!1},Io={propertyName:"statusPanel",cellRenderer:!1},Ro={propertyName:"fullWidthCellRenderer",cellRenderer:!0},Lo={propertyName:"loadingCellRenderer",cellRenderer:!0},ko={propertyName:"groupRowRenderer",cellRenderer:!0},Po={propertyName:"detailCellRenderer",cellRenderer:!0},No={propertyName:"menuItem",cellRenderer:!1},Oo=class{static getFloatingFilterType(e){return this.filterToFloatingFilterMapping[e]}};Oo.filterToFloatingFilterMapping={set:"agSetColumnFloatingFilter",agSetColumnFilter:"agSetColumnFloatingFilter",multi:"agMultiColumnFloatingFilter",agMultiColumnFilter:"agMultiColumnFloatingFilter",group:"agGroupColumnFloatingFilter",agGroupColumnFilter:"agGroupColumnFloatingFilter",number:"agNumberColumnFloatingFilter",agNumberColumnFilter:"agNumberColumnFloatingFilter",date:"agDateColumnFloatingFilter",agDateColumnFilter:"agDateColumnFloatingFilter",text:"agTextColumnFloatingFilter",agTextColumnFilter:"agTextColumnFloatingFilter"};var _o=class extends ot{getHeaderCompDetails(e,t){return this.getCompDetails(e,vo,"agColumnHeader",t)}getHeaderGroupCompDetails(e){const t=e.columnGroup.getColGroupDef();return this.getCompDetails(t,yo,"agColumnGroupHeader",e)}getFullWidthCellRendererDetails(e){return this.getCompDetails(this.gridOptions,Ro,null,e,!0)}getFullWidthLoadingCellRendererDetails(e){return this.getCompDetails(this.gridOptions,Lo,"agLoadingCellRenderer",e,!0)}getFullWidthGroupCellRendererDetails(e){return this.getCompDetails(this.gridOptions,ko,"agGroupRowRenderer",e,!0)}getFullWidthDetailCellRendererDetails(e){return this.getCompDetails(this.gridOptions,Po,"agDetailCellRenderer",e,!0)}getInnerRendererDetails(e,t){return this.getCompDetails(e,wo,null,t)}getFullWidthGroupRowInnerCellRenderer(e,t){return this.getCompDetails(e,wo,null,t)}getCellRendererDetails(e,t){return this.getCompDetails(e,Co,null,t)}getLoadingCellRendererDetails(e,t){return this.getCompDetails(e,bo,"agSkeletonCellRenderer",t,!0)}getCellEditorDetails(e,t){return this.getCompDetails(e,So,"agCellEditor",t,!0)}getFilterDetails(e,t,i){return this.getCompDetails(e,Ao,i,t,!0)}getDateCompDetails(e){return this.getCompDetails(this.gridOptions,mo,"agDateInput",e,!0)}getLoadingOverlayCompDetails(e){return this.getCompDetails(this.gridOptions,xo,"agLoadingOverlay",e,!0)}getNoRowsOverlayCompDetails(e){return this.getCompDetails(this.gridOptions,Eo,"agNoRowsOverlay",e,!0)}getTooltipCompDetails(e){return this.getCompDetails(e.colDef,Mo,"agTooltipComponent",e,!0)}getSetFilterCellRendererDetails(e,t){return this.getCompDetails(e,Co,null,t)}getFloatingFilterCompDetails(e,t,i){return this.getCompDetails(e,To,i,t)}getToolPanelCompDetails(e,t){return this.getCompDetails(e,Do,null,t,!0)}getStatusPanelCompDetails(e,t){return this.getCompDetails(e,Io,null,t,!0)}getMenuItemCompDetails(e,t){return this.getCompDetails(e,No,"agMenuItem",t,!0)}getCompDetails(e,t,i,n,s=!1){const{propertyName:r,cellRenderer:o}=t;let{compName:a,jsComp:l,fwComp:c,paramsFromSelector:h,popupFromSelector:d,popupPositionFromSelector:u}=this.getCompKeys(e,t,n);const p=e=>{const t=this.userComponentRegistry.retrieve(r,e);t&&(l=t.componentFromFramework?void 0:t.component,c=t.componentFromFramework?t.component:void 0)};if(null!=a&&p(a),null==l&&null==c&&null!=i&&p(i),l&&o&&!this.agComponentUtils.doesImplementIComponent(l)&&(l=this.agComponentUtils.adaptFunction(r,l)),!l&&!c)return void(s&&console.error(`AG Grid: Could not find component ${a}, did you forget to configure this component?`));const g=this.mergeParamsWithApplicationProvidedParams(e,t,n,h),f=null==l,m=l||c;return{componentFromFramework:f,componentClass:m,params:g,type:t,popupFromSelector:d,popupPositionFromSelector:u,newAgStackInstance:()=>this.newAgStackInstance(m,f,g,t)}}getCompKeys(e,t,i){const{propertyName:n}=t;let s,r,o,a,l,c;if(e){const t=e,h=t[n+"Selector"],d=h?h(i):null,u=e=>{"string"==typeof e?s=e:null!=e&&!0!==e&&(this.getFrameworkOverrides().isFrameworkComponent(e)?o=e:r=e)};d?(u(d.component),a=d.params,l=d.popup,c=d.popupPosition):u(t[n])}return{compName:s,jsComp:r,fwComp:o,paramsFromSelector:a,popupFromSelector:l,popupPositionFromSelector:c}}newAgStackInstance(e,t,i,n){const s=n.propertyName;let r;if(t){const t=this.componentMetadataProvider.retrieve(s);r=this.frameworkComponentWrapper.wrap(e,t.mandatoryMethodList,t.optionalMethodList,n)}else r=new e;const o=this.initComponent(r,i);return null==o?gs.resolve(r):o.then(()=>r)}mergeParamsWithApplicationProvidedParams(e,t,i,n=null){const s=this.gos.getGridCommonParams();G(s,i);const r=e&&e[t.propertyName+"Params"];return"function"==typeof r?G(s,r(i)):"object"==typeof r&&G(s,r),G(s,n),s}initComponent(e,t){if(this.context.createBean(e),null!=e.init)return e.init(t)}getDefaultFloatingFilterType(e,t){if(null==e)return null;let i=null,{compName:n,jsComp:s,fwComp:r}=this.getCompKeys(e,Ao);return n?i=Oo.getFloatingFilterType(n):null==s&&null==r&&!0===e.filter&&(i=t()),i}};m([pe("gridOptions")],_o.prototype,"gridOptions",2),m([pe("agComponentUtils")],_o.prototype,"agComponentUtils",2),m([pe("componentMetadataProvider")],_o.prototype,"componentMetadataProvider",2),m([pe("userComponentRegistry")],_o.prototype,"userComponentRegistry",2),m([ge("frameworkComponentWrapper")],_o.prototype,"frameworkComponentWrapper",2),_o=m([ue("userComponentFactory")],_o);var Fo=(e=>(e[e.SINGLE_SHEET=0]="SINGLE_SHEET",e[e.MULTI_SHEET=1]="MULTI_SHEET",e))(Fo||{}),Go=(e=>(e[e.Above=0]="Above",e[e.Below=1]="Below",e))(Go||{}),Vo=class{constructor(e){this.tickingInterval=null,this.onScrollCallback=null,this.scrollContainer=e.scrollContainer,this.scrollHorizontally=-1!==e.scrollAxis.indexOf("x"),this.scrollVertically=-1!==e.scrollAxis.indexOf("y"),this.scrollByTick=null!=e.scrollByTick?e.scrollByTick:20,e.onScrollCallback&&(this.onScrollCallback=e.onScrollCallback),this.scrollVertically&&(this.getVerticalPosition=e.getVerticalPosition,this.setVerticalPosition=e.setVerticalPosition),this.scrollHorizontally&&(this.getHorizontalPosition=e.getHorizontalPosition,this.setHorizontalPosition=e.setHorizontalPosition),this.shouldSkipVerticalScroll=e.shouldSkipVerticalScroll||(()=>!1),this.shouldSkipHorizontalScroll=e.shouldSkipHorizontalScroll||(()=>!1)}check(e,t=!1){const i=t||this.shouldSkipVerticalScroll();if(i&&this.shouldSkipHorizontalScroll())return;const n=this.scrollContainer.getBoundingClientRect(),s=this.scrollByTick;this.tickLeft=e.clientX<n.left+s,this.tickRight=e.clientX>n.right-s,this.tickUp=e.clientY<n.top+s&&!i,this.tickDown=e.clientY>n.bottom-s&&!i,this.tickLeft||this.tickRight||this.tickUp||this.tickDown?this.ensureTickingStarted():this.ensureCleared()}ensureTickingStarted(){null===this.tickingInterval&&(this.tickingInterval=window.setInterval(this.doTick.bind(this),100),this.tickCount=0)}doTick(){let e;if(this.tickCount++,e=this.tickCount>20?200:this.tickCount>10?80:40,this.scrollVertically){const t=this.getVerticalPosition();this.tickUp&&this.setVerticalPosition(t-e),this.tickDown&&this.setVerticalPosition(t+e)}if(this.scrollHorizontally){const t=this.getHorizontalPosition();this.tickLeft&&this.setHorizontalPosition(t-e),this.tickRight&&this.setHorizontalPosition(t+e)}this.onScrollCallback&&this.onScrollCallback()}ensureCleared(){this.tickingInterval&&(window.clearInterval(this.tickingInterval),this.tickingInterval=null)}},Bo=class extends ot{constructor(e){super(),this.eContainer=e}postConstruct(){this.gos.isRowModelType("clientSide")&&(this.clientSideRowModel=this.rowModel),this.ctrlsService.whenReady(e=>{const t=e.gridBodyCtrl;this.autoScrollService=new Vo({scrollContainer:t.getBodyViewportElement(),scrollAxis:"y",getVerticalPosition:()=>t.getScrollFeature().getVScrollPosition().top,setVerticalPosition:e=>t.getScrollFeature().setVerticalScrollPosition(e),onScrollCallback:()=>{this.onDragging(this.lastDraggingEvent)}})})}getContainer(){return this.eContainer}isInterestedIn(e){return 2===e}getIconName(){return this.gos.get("rowDragManaged")&&this.shouldPreventRowMove()?Hr.ICON_NOT_ALLOWED:Hr.ICON_MOVE}shouldPreventRowMove(){return!!this.columnModel.getRowGroupColumns().length||(!!this.filterManager.isAnyFilterPresent()||!!this.sortController.isSortActive())}getRowNodes(e){if(!this.isFromThisGrid(e))return e.dragItem.rowNodes||[];const t=e.dragItem.rowNode;if(this.gos.get("rowDragMultiRow")){const e=[...this.selectionService.getSelectedNodes()].sort((e,t)=>null==e.rowIndex||null==t.rowIndex?0:this.getRowIndexNumber(e)-this.getRowIndexNumber(t));if(-1!==e.indexOf(t))return e}return[t]}onDragEnter(e){e.dragItem.rowNodes=this.getRowNodes(e),this.dispatchGridEvent(dt.EVENT_ROW_DRAG_ENTER,e),this.getRowNodes(e).forEach(e=>{e.setDragging(!0)}),this.onEnterOrDragging(e)}onDragging(e){this.onEnterOrDragging(e)}isFromThisGrid(e){const{dragSourceDomDataKey:t}=e.dragSource;return t===this.gos.getDomDataKey()}isDropZoneWithinThisGrid(e){const t=this.ctrlsService.getGridBodyCtrl().getGui(),{dropZoneTarget:i}=e;return!t.contains(i)}onEnterOrDragging(e){this.dispatchGridEvent(dt.EVENT_ROW_DRAG_MOVE,e),this.lastDraggingEvent=e;const t=this.mouseEventService.getNormalisedPosition(e).y;this.gos.get("rowDragManaged")&&this.doManagedDrag(e,t),this.autoScrollService.check(e.event)}doManagedDrag(e,t){const i=this.isFromThisGrid(e),n=this.gos.get("rowDragManaged"),s=e.dragItem.rowNodes;n&&this.shouldPreventRowMove()||(this.gos.get("suppressMoveWhenRowDragging")||!i?this.isDropZoneWithinThisGrid(e)||this.clientSideRowModel.highlightRowAtPixel(s[0],t):this.moveRows(s,t))}getRowIndexNumber(e){return parseInt(Le(e.getRowIndexString().split("-")),10)}moveRowAndClearHighlight(e){const t=this.clientSideRowModel.getLastHighlightedRowNode(),i=t&&1===t.highlighted,n=this.mouseEventService.getNormalisedPosition(e).y,s=e.dragItem.rowNodes;let r=i?1:0;if(this.isFromThisGrid(e))s.forEach(e=>{e.rowTop<n&&(r-=1)}),this.moveRows(s,n,r);else{const e=this.gos.getCallback("getRowId");let t=this.clientSideRowModel.getRowIndexAtPixel(n)+1;0===this.clientSideRowModel.getHighlightPosition(n)&&t--,this.clientSideRowModel.updateRowData({add:s.map(e=>e.data).filter(t=>!this.clientSideRowModel.getRowNode(e?e({data:t,level:0}):t.id)),addIndex:t})}this.clearRowHighlight()}clearRowHighlight(){this.clientSideRowModel.highlightRowAtPixel(null)}moveRows(e,t,i=0){var n;this.clientSideRowModel.ensureRowsAtPixel(e,t,i)&&(this.focusService.clearFocusedCell(),null==(n=this.rangeService)||n.removeAllCellRanges())}addRowDropZone(e){if(!e.getContainer())return void j("addRowDropZone - A container target needs to be provided");if(this.dragAndDropService.findExternalZone(e))return void console.warn("AG Grid: addRowDropZone - target already exists in the list of DropZones. Use `removeRowDropZone` before adding it again.");let t={getContainer:e.getContainer};e.fromGrid?t=e:(e.onDragEnter&&(t.onDragEnter=t=>{e.onDragEnter(this.draggingToRowDragEvent(dt.EVENT_ROW_DRAG_ENTER,t))}),e.onDragLeave&&(t.onDragLeave=t=>{e.onDragLeave(this.draggingToRowDragEvent(dt.EVENT_ROW_DRAG_LEAVE,t))}),e.onDragging&&(t.onDragging=t=>{e.onDragging(this.draggingToRowDragEvent(dt.EVENT_ROW_DRAG_MOVE,t))}),e.onDragStop&&(t.onDragStop=t=>{e.onDragStop(this.draggingToRowDragEvent(dt.EVENT_ROW_DRAG_END,t))})),this.dragAndDropService.addDropTarget(p({isInterestedIn:e=>2===e,getIconName:()=>Hr.ICON_MOVE,external:!0},t))}getRowDropZone(e){const t=this.getContainer.bind(this),i=this.onDragEnter.bind(this),n=this.onDragLeave.bind(this),s=this.onDragging.bind(this),r=this.onDragStop.bind(this);return e?{getContainer:t,onDragEnter:e.onDragEnter?t=>{i(t),e.onDragEnter(this.draggingToRowDragEvent(dt.EVENT_ROW_DRAG_ENTER,t))}:i,onDragLeave:e.onDragLeave?t=>{n(t),e.onDragLeave(this.draggingToRowDragEvent(dt.EVENT_ROW_DRAG_LEAVE,t))}:n,onDragging:e.onDragging?t=>{s(t),e.onDragging(this.draggingToRowDragEvent(dt.EVENT_ROW_DRAG_MOVE,t))}:s,onDragStop:e.onDragStop?t=>{r(t),e.onDragStop(this.draggingToRowDragEvent(dt.EVENT_ROW_DRAG_END,t))}:r,fromGrid:!0}:{getContainer:t,onDragEnter:i,onDragLeave:n,onDragging:s,onDragStop:r,fromGrid:!0}}draggingToRowDragEvent(e,t){const i=this.mouseEventService.getNormalisedPosition(t).y;let n,s,r=-1;switch(i>this.paginationProxy.getCurrentPageHeight()||(r=this.rowModel.getRowIndexAtPixel(i),n=this.rowModel.getRow(r)),t.vDirection){case 1:s="down";break;case 0:s="up";break;default:s=null}return this.gos.addGridCommonParams({type:e,event:t.event,node:t.dragItem.rowNode,nodes:t.dragItem.rowNodes,overIndex:r,overNode:n,y:i,vDirection:s})}dispatchGridEvent(e,t){const i=this.draggingToRowDragEvent(e,t);this.eventService.dispatchEvent(i)}onDragLeave(e){this.dispatchGridEvent(dt.EVENT_ROW_DRAG_LEAVE,e),this.stopDragging(e),this.gos.get("rowDragManaged")&&this.clearRowHighlight()}onDragStop(e){this.dispatchGridEvent(dt.EVENT_ROW_DRAG_END,e),this.stopDragging(e),!this.gos.get("rowDragManaged")||!this.gos.get("suppressMoveWhenRowDragging")&&this.isFromThisGrid(e)||this.isDropZoneWithinThisGrid(e)||this.moveRowAndClearHighlight(e)}stopDragging(e){this.autoScrollService.ensureCleared(),this.getRowNodes(e).forEach(e=>{e.setDragging(!1)})}};m([pe("dragAndDropService")],Bo.prototype,"dragAndDropService",2),m([pe("rowModel")],Bo.prototype,"rowModel",2),m([pe("paginationProxy")],Bo.prototype,"paginationProxy",2),m([pe("columnModel")],Bo.prototype,"columnModel",2),m([pe("focusService")],Bo.prototype,"focusService",2),m([pe("sortController")],Bo.prototype,"sortController",2),m([pe("filterManager")],Bo.prototype,"filterManager",2),m([pe("selectionService")],Bo.prototype,"selectionService",2),m([pe("mouseEventService")],Bo.prototype,"mouseEventService",2),m([pe("ctrlsService")],Bo.prototype,"ctrlsService",2),m([ge("rangeService")],Bo.prototype,"rangeService",2),m([he],Bo.prototype,"postConstruct",1);var Ho=class extends ot{constructor(){super(...arguments),this.dragEndFunctions=[],this.dragSources=[]}removeAllListeners(){this.dragSources.forEach(this.removeListener.bind(this)),this.dragSources.length=0}removeListener(e){const t=e.dragSource.eElement,i=e.mouseDownListener;if(t.removeEventListener("mousedown",i),e.touchEnabled){const i=e.touchStartListener;t.removeEventListener("touchstart",i,{passive:!0})}}removeDragSource(e){const t=this.dragSources.find(t=>t.dragSource===e);t&&(this.removeListener(t),Fe(this.dragSources,t))}isDragging(){return this.dragging}addDragSource(e){const t=this.onMouseDown.bind(this,e),{eElement:i,includeTouch:n,stopPropagationForTouch:s}=e;i.addEventListener("mousedown",t);let r=null;const o=this.gos.get("suppressTouch");n&&!o&&(r=t=>{ln(t.target)||(t.cancelable&&(t.preventDefault(),s&&t.stopPropagation()),this.onTouchStart(e,t))},i.addEventListener("touchstart",r,{passive:!1})),this.dragSources.push({dragSource:e,mouseDownListener:t,touchStartListener:r,touchEnabled:!!n})}getStartTarget(){return this.startTarget}onTouchStart(e,t){this.currentDragParams=e,this.dragging=!1;const i=t.touches[0];this.touchLastTime=i,this.touchStart=i;const n=t=>this.onTouchUp(t,e.eElement),s=t.target,r=[{target:this.gos.getRootNode(),type:"touchmove",listener:e=>{e.cancelable&&e.preventDefault()},options:{passive:!1}},{target:s,type:"touchmove",listener:t=>this.onTouchMove(t,e.eElement),options:{passive:!0}},{target:s,type:"touchend",listener:n,options:{passive:!0}},{target:s,type:"touchcancel",listener:n,options:{passive:!0}}];this.addTemporaryEvents(r),0===e.dragStartPixels&&this.onCommonMove(i,this.touchStart,e.eElement)}onMouseDown(e,t){const i=t;if(e.skipMouseEvent&&e.skipMouseEvent(t))return;if(i._alreadyProcessedByDragService)return;if(i._alreadyProcessedByDragService=!0,0!==t.button)return;this.shouldPreventMouseEvent(t)&&t.preventDefault(),this.currentDragParams=e,this.dragging=!1,this.mouseStartEvent=t,this.startTarget=t.target;const n=this.gos.getRootNode(),s=[{target:n,type:"mousemove",listener:t=>this.onMouseMove(t,e.eElement)},{target:n,type:"mouseup",listener:t=>this.onMouseUp(t,e.eElement)},{target:n,type:"contextmenu",listener:e=>e.preventDefault()}];this.addTemporaryEvents(s),0===e.dragStartPixels&&this.onMouseMove(t,e.eElement)}addTemporaryEvents(e){e.forEach(e=>{const{target:t,type:i,listener:n,options:s}=e;t.addEventListener(i,n,s)}),this.dragEndFunctions.push(()=>{e.forEach(e=>{const{target:t,type:i,listener:n,options:s}=e;t.removeEventListener(i,n,s)})})}isEventNearStartEvent(e,t){const{dragStartPixels:i}=this.currentDragParams;return os(e,t,S(i)?i:4)}getFirstActiveTouch(e){for(let t=0;t<e.length;t++)if(e[t].identifier===this.touchStart.identifier)return e[t];return null}onCommonMove(e,t,i){if(!this.dragging){if(!this.dragging&&this.isEventNearStartEvent(e,t))return;this.dragging=!0;const n={type:dt.EVENT_DRAG_STARTED,target:i};this.eventService.dispatchEvent(n),this.currentDragParams.onDragStart(t),this.currentDragParams.onDragging(t)}this.currentDragParams.onDragging(e)}onTouchMove(e,t){const i=this.getFirstActiveTouch(e.touches);i&&this.onCommonMove(i,this.touchStart,t)}onMouseMove(e,t){var i;Ii()&&(null==(i=this.gos.getDocument().getSelection())||i.removeAllRanges()),this.shouldPreventMouseEvent(e)&&e.preventDefault(),this.onCommonMove(e,this.mouseStartEvent,t)}shouldPreventMouseEvent(e){const t=this.gos.get("enableCellTextSelection"),i="mousemove"===e.type;return t&&i&&e.cancelable&&this.mouseEventService.isEventFromThisGrid(e)&&!this.isOverFormFieldElement(e)}isOverFormFieldElement(e){const t=e.target,i=null==t?void 0:t.tagName.toLocaleLowerCase();return!!(null==i?void 0:i.match("^a$|textarea|input|select|button"))}onTouchUp(e,t){let i=this.getFirstActiveTouch(e.changedTouches);i||(i=this.touchLastTime),this.onUpCommon(i,t)}onMouseUp(e,t){this.onUpCommon(e,t)}onUpCommon(e,t){if(this.dragging){this.dragging=!1,this.currentDragParams.onDragStop(e);const i={type:dt.EVENT_DRAG_STOPPED,target:t};this.eventService.dispatchEvent(i)}this.mouseStartEvent=null,this.startTarget=null,this.touchStart=null,this.touchLastTime=null,this.currentDragParams=null,this.dragEndFunctions.forEach(e=>e()),this.dragEndFunctions.length=0}};m([pe("mouseEventService")],Ho.prototype,"mouseEventService",2),m([de],Ho.prototype,"removeAllListeners",1),Ho=m([ue("dragService")],Ho);var zo="ag-list-item-hovered",Uo=class extends ot{constructor(e,t,i){super(),this.comp=e,this.virtualList=t,this.params=i,this.currentDragValue=null,this.lastHoveredListItem=null}postConstruct(){this.addManagedListener(this.params.eventSource,this.params.listItemDragStartEvent,this.listItemDragStart.bind(this)),this.addManagedListener(this.params.eventSource,this.params.listItemDragEndEvent,this.listItemDragEnd.bind(this)),this.createDropTarget(),this.createAutoScrollService()}listItemDragStart(e){this.currentDragValue=this.params.getCurrentDragValue(e),this.moveBlocked=this.params.isMoveBlocked(this.currentDragValue)}listItemDragEnd(){window.setTimeout(()=>{this.currentDragValue=null,this.moveBlocked=!1},10)}createDropTarget(){const e={isInterestedIn:e=>e===this.params.dragSourceType,getIconName:()=>this.moveBlocked?Hr.ICON_PINNED:Hr.ICON_MOVE,getContainer:()=>this.comp.getGui(),onDragging:e=>this.onDragging(e),onDragStop:()=>this.onDragStop(),onDragLeave:()=>this.onDragLeave()};this.dragAndDropService.addDropTarget(e)}createAutoScrollService(){const e=this.virtualList.getGui();this.autoScrollService=new Vo({scrollContainer:e,scrollAxis:"y",getVerticalPosition:()=>e.scrollTop,setVerticalPosition:t=>e.scrollTop=t})}onDragging(e){if(!this.currentDragValue||this.moveBlocked)return;const t=this.getListDragItem(e),i=this.virtualList.getComponentAt(t.rowIndex);if(!i)return;const n=i.getGui().parentElement;this.lastHoveredListItem&&this.lastHoveredListItem.rowIndex===t.rowIndex&&this.lastHoveredListItem.position===t.position||(this.autoScrollService.check(e.event),this.clearHoveredItems(),this.lastHoveredListItem=t,rn(n,zo),rn(n,`ag-item-highlight-${t.position}`))}getListDragItem(e){const t=this.virtualList.getGui(),i=parseFloat(window.getComputedStyle(t).paddingTop),n=this.virtualList.getRowHeight(),s=this.virtualList.getScrollTop(),r=Math.max(0,(e.y-i+s)/n),o=this.params.getNumRows(this.comp)-1,a=0|Math.min(o,r);return{rowIndex:a,position:Math.round(r)>r||r>o?"bottom":"top",component:this.virtualList.getComponentAt(a)}}onDragStop(){this.moveBlocked||(this.params.moveItem(this.currentDragValue,this.lastHoveredListItem),this.clearHoveredItems(),this.autoScrollService.ensureCleared())}onDragLeave(){this.clearHoveredItems(),this.autoScrollService.ensureCleared()}clearHoveredItems(){this.virtualList.getGui().querySelectorAll(`.${zo}`).forEach(e=>{[zo,"ag-item-highlight-top","ag-item-highlight-bottom"].forEach(t=>{e.classList.remove(t)})}),this.lastHoveredListItem=null}};function Wo(e){const t=e;return null!=t&&null!=t.getFrameworkComponentInstance?t.getFrameworkComponentInstance():e}m([pe("dragAndDropService")],Uo.prototype,"dragAndDropService",2),m([he],Uo.prototype,"postConstruct",1);var jo=class{constructor(){this.detailGridInfoMap={},this.destroyCalled=!1}init(){switch(this.rowModel.getType()){case"clientSide":this.clientSideRowModel=this.rowModel;break;case"infinite":this.infiniteRowModel=this.rowModel;break;case"serverSide":this.serverSideRowModel=this.rowModel}this.ctrlsService.whenReady(e=>{this.gridBodyCtrl=e.gridBodyCtrl})}__getAlignedGridService(){return this.alignedGridsService}getGridId(){return this.context.getGridId()}addDetailGridInfo(e,t){this.detailGridInfoMap[e]=t}removeDetailGridInfo(e){delete this.detailGridInfoMap[e]}getDetailGridInfo(e){return this.detailGridInfoMap[e]}forEachDetailGridInfo(e){let t=0;N(this.detailGridInfoMap,(i,n)=>{S(n)&&(e(n,t),t++)})}getDataAsCsv(e){if(ae.__assertRegistered("@ag-grid-community/csv-export","api.getDataAsCsv",this.context.getGridId()))return this.csvCreator.getDataAsCsv(e)}exportDataAsCsv(e){ae.__assertRegistered("@ag-grid-community/csv-export","api.exportDataAsCsv",this.context.getGridId())&&this.csvCreator.exportDataAsCsv(e)}assertNotExcelMultiSheet(e,t){return!(!ae.__assertRegistered("@ag-grid-enterprise/excel-export","api."+e,this.context.getGridId())||1===this.excelCreator.getFactoryMode()&&(console.warn("AG Grid: The Excel Exporter is currently on Multi Sheet mode. End that operation by calling 'api.getMultipleSheetAsExcel()' or 'api.exportMultipleSheetsAsExcel()'"),1))}getDataAsExcel(e){if(this.assertNotExcelMultiSheet("getDataAsExcel",e))return this.excelCreator.getDataAsExcel(e)}exportDataAsExcel(e){this.assertNotExcelMultiSheet("exportDataAsExcel",e)&&this.excelCreator.exportDataAsExcel(e)}getSheetDataForExcel(e){if(ae.__assertRegistered("@ag-grid-enterprise/excel-export","api.getSheetDataForExcel",this.context.getGridId()))return this.excelCreator.setFactoryMode(1),this.excelCreator.getSheetDataForExcel(e)}getMultipleSheetsAsExcel(e){if(ae.__assertRegistered("@ag-grid-enterprise/excel-export","api.getMultipleSheetsAsExcel",this.context.getGridId()))return this.excelCreator.getMultipleSheetsAsExcel(e)}exportMultipleSheetsAsExcel(e){ae.__assertRegistered("@ag-grid-enterprise/excel-export","api.exportMultipleSheetsAsExcel",this.context.getGridId())&&this.excelCreator.exportMultipleSheetsAsExcel(e)}setGridAriaProperty(e,t){if(!e)return;const i=this.ctrlsService.getGridBodyCtrl().getGui(),n=`aria-${e}`;null===t?i.removeAttribute(n):i.setAttribute(n,t)}logMissingRowModel(e,...t){console.error(`AG Grid: api.${e} can only be called when gridOptions.rowModelType is ${t.join(" or ")}`)}logDeprecation(e,t,i,n){j(`Since ${e} api.${t} is deprecated. Please use ${i} instead. ${null!=n?n:""}`)}getPinnedTopRowCount(){return this.pinnedRowModel.getPinnedTopRowCount()}getPinnedBottomRowCount(){return this.pinnedRowModel.getPinnedBottomRowCount()}getPinnedTopRow(e){return this.pinnedRowModel.getPinnedTopRow(e)}getPinnedBottomRow(e){return this.pinnedRowModel.getPinnedBottomRow(e)}expireValueCache(){this.valueCache.expire()}getVerticalPixelRange(){return this.gridBodyCtrl.getScrollFeature().getVScrollPosition()}getHorizontalPixelRange(){return this.gridBodyCtrl.getScrollFeature().getHScrollPosition()}refreshCells(e={}){this.frameworkOverrides.wrapIncoming(()=>this.rowRenderer.refreshCells(e))}flashCells(e={}){const t=e=>j(`Since v31.1 api.flashCells parameter '${e}Delay' is deprecated. Please use '${e}Duration' instead.`);S(e.fadeDelay)&&t("fade"),S(e.flashDelay)&&t("flash"),this.frameworkOverrides.wrapIncoming(()=>this.rowRenderer.flashCells(e))}redrawRows(e={}){const t=e?e.rowNodes:void 0;this.frameworkOverrides.wrapIncoming(()=>this.rowRenderer.redrawRows(t))}refreshHeader(){this.frameworkOverrides.wrapIncoming(()=>this.ctrlsService.getHeaderRowContainerCtrls().forEach(e=>e.refresh()))}isAnyFilterPresent(){return this.filterManager.isAnyFilterPresent()}isColumnFilterPresent(){return this.filterManager.isColumnFilterPresent()||this.filterManager.isAggregateFilterPresent()}isQuickFilterPresent(){return this.filterManager.isQuickFilterPresent()}getModel(){return j("Since v31.1 getModel() is deprecated. Please use the appropriate grid API methods instead."),this.rowModel}setRowNodeExpanded(e,t,i,n){this.expansionService.setRowNodeExpanded(e,t,i,n)}onGroupExpandedOrCollapsed(){w(this.clientSideRowModel)?this.logMissingRowModel("onGroupExpandedOrCollapsed","clientSide"):this.expansionService.onGroupExpandedOrCollapsed()}refreshClientSideRowModel(e){w(this.clientSideRowModel)?this.logMissingRowModel("refreshClientSideRowModel","clientSide"):this.clientSideRowModel.refreshModel(e)}isAnimationFrameQueueEmpty(){return this.animationFrameService.isQueueEmpty()}flushAllAnimationFrames(){this.animationFrameService.flushAllFrames()}getRowNode(e){return this.rowModel.getRowNode(e)}getSizesForCurrentTheme(){return{rowHeight:this.gos.getRowHeightAsNumber(),headerHeight:this.columnModel.getHeaderHeight()}}expandAll(){this.clientSideRowModel||this.serverSideRowModel?this.expansionService.expandAll(!0):this.logMissingRowModel("expandAll","clientSide","serverSide")}collapseAll(){this.clientSideRowModel||this.serverSideRowModel?this.expansionService.expandAll(!1):this.logMissingRowModel("collapseAll","clientSide","serverSide")}addRenderedRowListener(e,t,i){this.rowRenderer.addRenderedRowListener(e,t,i)}getQuickFilter(){return this.gos.get("quickFilterText")}getAdvancedFilterModel(){return ae.__assertRegistered("@ag-grid-enterprise/advanced-filter","api.getAdvancedFilterModel",this.context.getGridId())?this.filterManager.getAdvancedFilterModel():null}setAdvancedFilterModel(e){this.filterManager.setAdvancedFilterModel(e)}showAdvancedFilterBuilder(){ae.__assertRegistered("@ag-grid-enterprise/advanced-filter","api.setAdvancedFilterModel",this.context.getGridId())&&this.filterManager.showAdvancedFilterBuilder("api")}setNodesSelected(e){if(!e.nodes.every(e=>e.rowPinned?(console.warn("AG Grid: cannot select pinned rows"),!1):void 0!==e.id||(console.warn("AG Grid: cannot select node until id for node is known"),!1)))return;const{nodes:t,source:i,newValue:n}=e,s=t;this.selectionService.setNodesSelected({nodes:s,source:null!=i?i:"api",newValue:n})}selectAll(e="apiSelectAll"){this.selectionService.selectAllRowNodes({source:e})}deselectAll(e="apiSelectAll"){this.selectionService.deselectAllRowNodes({source:e})}selectAllFiltered(e="apiSelectAllFiltered"){this.selectionService.selectAllRowNodes({source:e,justFiltered:!0})}deselectAllFiltered(e="apiSelectAllFiltered"){this.selectionService.deselectAllRowNodes({source:e,justFiltered:!0})}getServerSideSelectionState(){return w(this.serverSideRowModel)?(this.logMissingRowModel("getServerSideSelectionState","serverSide"),null):this.selectionService.getSelectionState()}setServerSideSelectionState(e){w(this.serverSideRowModel)?this.logMissingRowModel("setServerSideSelectionState","serverSide"):this.selectionService.setSelectionState(e,"api")}selectAllOnCurrentPage(e="apiSelectAllCurrentPage"){this.selectionService.selectAllRowNodes({source:e,justCurrentPage:!0})}deselectAllOnCurrentPage(e="apiSelectAllCurrentPage"){this.selectionService.deselectAllRowNodes({source:e,justCurrentPage:!0})}showLoadingOverlay(){this.overlayService.showLoadingOverlay()}showNoRowsOverlay(){this.overlayService.showNoRowsOverlay()}hideOverlay(){this.overlayService.hideOverlay()}getSelectedNodes(){return this.selectionService.getSelectedNodes()}getSelectedRows(){return this.selectionService.getSelectedRows()}getBestCostNodeSelection(){if(!w(this.clientSideRowModel))return this.selectionService.getBestCostNodeSelection();this.logMissingRowModel("getBestCostNodeSelection","clientSide")}getRenderedNodes(){return this.rowRenderer.getRenderedNodes()}ensureColumnVisible(e,t="auto"){this.frameworkOverrides.wrapIncoming(()=>this.gridBodyCtrl.getScrollFeature().ensureColumnVisible(e,t),"ensureVisible")}ensureIndexVisible(e,t){this.frameworkOverrides.wrapIncoming(()=>this.gridBodyCtrl.getScrollFeature().ensureIndexVisible(e,t),"ensureVisible")}ensureNodeVisible(e,t=null){this.frameworkOverrides.wrapIncoming(()=>this.gridBodyCtrl.getScrollFeature().ensureNodeVisible(e,t),"ensureVisible")}forEachLeafNode(e){w(this.clientSideRowModel)?this.logMissingRowModel("forEachLeafNode","clientSide"):this.clientSideRowModel.forEachLeafNode(e)}forEachNode(e,t){this.rowModel.forEachNode(e,t)}forEachNodeAfterFilter(e){w(this.clientSideRowModel)?this.logMissingRowModel("forEachNodeAfterFilter","clientSide"):this.clientSideRowModel.forEachNodeAfterFilter(e)}forEachNodeAfterFilterAndSort(e){w(this.clientSideRowModel)?this.logMissingRowModel("forEachNodeAfterFilterAndSort","clientSide"):this.clientSideRowModel.forEachNodeAfterFilterAndSort(e)}getFilterInstance(e,t){return j("'getFilterInstance' is deprecated. To get/set individual filter models, use 'getColumnFilterModel' or 'setColumnFilterModel' instead. To get hold of the filter instance, use 'getColumnFilterInstance' which returns the instance asynchronously."),this.filterManager.getFilterInstance(e,t)}getColumnFilterInstance(e){return this.filterManager.getColumnFilterInstance(e)}destroyFilter(e){const t=this.columnModel.getPrimaryColumn(e);if(t)return this.filterManager.destroyFilter(t,"api")}getStatusPanel(e){if(ae.__assertRegistered("@ag-grid-enterprise/status-bar","api.getStatusPanel",this.context.getGridId()))return Wo(this.statusBarService.getStatusPanel(e))}getColumnDef(e){const t=this.columnModel.getPrimaryColumn(e);return t?t.getColDef():null}getColumnDefs(){return this.columnModel.getColumnDefs()}onFilterChanged(e="api"){this.filterManager.onFilterChanged({source:e})}onSortChanged(){this.sortController.onSortChanged("api")}setFilterModel(e){this.frameworkOverrides.wrapIncoming(()=>this.filterManager.setFilterModel(e))}getFilterModel(){return this.filterManager.getFilterModel()}getColumnFilterModel(e){return this.filterManager.getColumnFilterModel(e)}setColumnFilterModel(e,t){return this.filterManager.setColumnFilterModel(e,t)}getFocusedCell(){return this.focusService.getFocusedCell()}clearFocusedCell(){return this.focusService.clearFocusedCell()}setFocusedCell(e,t,i){this.focusService.setFocusedCell({rowIndex:e,column:t,rowPinned:i,forceBrowserFocus:!0})}addRowDropZone(e){this.gridBodyCtrl.getRowDragFeature().addRowDropZone(e)}removeRowDropZone(e){const t=this.dragAndDropService.findExternalZone(e);t&&this.dragAndDropService.removeDropTarget(t)}getRowDropZoneParams(e){return this.gridBodyCtrl.getRowDragFeature().getRowDropZone(e)}assertSideBarLoaded(e){return ae.__assertRegistered("@ag-grid-enterprise/side-bar","api."+e,this.context.getGridId())}isSideBarVisible(){return this.assertSideBarLoaded("isSideBarVisible")&&this.sideBarService.getSideBarComp().isDisplayed()}setSideBarVisible(e){this.assertSideBarLoaded("setSideBarVisible")&&this.sideBarService.getSideBarComp().setDisplayed(e)}setSideBarPosition(e){this.assertSideBarLoaded("setSideBarPosition")&&this.sideBarService.getSideBarComp().setSideBarPosition(e)}openToolPanel(e){this.assertSideBarLoaded("openToolPanel")&&this.sideBarService.getSideBarComp().openToolPanel(e,"api")}closeToolPanel(){this.assertSideBarLoaded("closeToolPanel")&&this.sideBarService.getSideBarComp().close("api")}getOpenedToolPanel(){return this.assertSideBarLoaded("getOpenedToolPanel")?this.sideBarService.getSideBarComp().openedItem():null}refreshToolPanel(){this.assertSideBarLoaded("refreshToolPanel")&&this.sideBarService.getSideBarComp().refresh()}isToolPanelShowing(){return this.assertSideBarLoaded("isToolPanelShowing")&&this.sideBarService.getSideBarComp().isToolPanelShowing()}getToolPanelInstance(e){if(this.assertSideBarLoaded("getToolPanelInstance"))return Wo(this.sideBarService.getSideBarComp().getToolPanelInstance(e))}getSideBar(){if(this.assertSideBarLoaded("getSideBar"))return this.sideBarService.getSideBarComp().getDef()}resetRowHeights(){if(S(this.clientSideRowModel)){if(this.columnModel.isAutoRowHeightActive())return void console.warn("AG Grid: calling gridApi.resetRowHeights() makes no sense when using Auto Row Height.");this.clientSideRowModel.resetRowHeights()}}setRowCount(e,t){if(this.serverSideRowModel)return this.columnModel.isRowGroupEmpty()?void this.serverSideRowModel.setRowCount(e,t):void console.error("AG Grid: setRowCount cannot be used while using row grouping.");this.infiniteRowModel?this.infiniteRowModel.setRowCount(e,t):this.logMissingRowModel("setRowCount","infinite","serverSide")}onRowHeightChanged(){this.clientSideRowModel?this.clientSideRowModel.onRowHeightChanged():this.serverSideRowModel&&this.serverSideRowModel.onRowHeightChanged()}getValue(e,t){return this.logDeprecation("31.3","getValue","getCellValue"),this.getCellValue({colKey:e,rowNode:t})}getCellValue(e){var t;const{colKey:i,rowNode:n,useFormatter:s}=e;let r=null!=(t=this.columnModel.getPrimaryColumn(i))?t:this.columnModel.getGridColumn(i);if(w(r))return null;const o=this.valueService.getValue(r,n);if(s){const e=this.valueService.formatValue(r,n,o);return null!=e?e:St(o,!0)}return o}addEventListener(e,t){this.apiEventService.addEventListener(e,t)}addGlobalListener(e){this.apiEventService.addGlobalListener(e)}removeEventListener(e,t){this.apiEventService.removeEventListener(e,t)}removeGlobalListener(e){this.apiEventService.removeGlobalListener(e)}dispatchEvent(e){this.eventService.dispatchEvent(e)}destroy(){var e;const t=`See ${this.frameworkOverrides.getDocLink("grid-lifecycle/#grid-pre-destroyed")}`;if(this.destroyCalled)return;const i={type:dt.EVENT_GRID_PRE_DESTROYED,state:this.getState()};this.dispatchEvent(i),this.destroyCalled=!0,null==(e=this.ctrlsService.get("gridCtrl"))||e.destroyGridUi(),this.context.destroy(),this.detailGridInfoMap={},B(this,["isDestroyed"],t)}isDestroyed(){return this.destroyCalled}resetQuickFilter(){this.filterManager.resetQuickFilterCache()}getCellRanges(){return this.rangeService?this.rangeService.getCellRanges():(ae.__assertRegistered("@ag-grid-enterprise/range-selection","api.getCellRanges",this.context.getGridId()),null)}addCellRange(e){this.rangeService?this.rangeService.addCellRange(e):ae.__assertRegistered("@ag-grid-enterprise/range-selection","api.addCellRange",this.context.getGridId())}clearRangeSelection(){this.rangeService&&this.rangeService.removeAllCellRanges(),ae.__assertRegistered("@ag-grid-enterprise/range-selection","gridApi.clearRangeSelection",this.context.getGridId())}undoCellEditing(){this.undoRedoService.undo("api")}redoCellEditing(){this.undoRedoService.redo("api")}getCurrentUndoSize(){return this.undoRedoService.getCurrentUndoStackSize()}getCurrentRedoSize(){return this.undoRedoService.getCurrentRedoStackSize()}assertChart(e,t){if(ae.__assertRegistered("@ag-grid-enterprise/charts","api."+e,this.context.getGridId()))return this.frameworkOverrides.wrapIncoming(()=>t())}getChartModels(){return this.assertChart("getChartModels",()=>this.chartService.getChartModels())}getChartRef(e){return this.assertChart("getChartRef",()=>this.chartService.getChartRef(e))}getChartImageDataURL(e){return this.assertChart("getChartImageDataURL",()=>this.chartService.getChartImageDataURL(e))}downloadChart(e){return this.assertChart("downloadChart",()=>this.chartService.downloadChart(e))}openChartToolPanel(e){return this.assertChart("openChartToolPanel",()=>this.chartService.openChartToolPanel(e))}closeChartToolPanel(e){return this.assertChart("closeChartToolPanel",()=>this.chartService.closeChartToolPanel(e.chartId))}createRangeChart(e){return this.assertChart("createRangeChart",()=>this.chartService.createRangeChart(e))}createPivotChart(e){return this.assertChart("createPivotChart",()=>this.chartService.createPivotChart(e))}createCrossFilterChart(e){return this.assertChart("createCrossFilterChart",()=>this.chartService.createCrossFilterChart(e))}updateChart(e){return this.assertChart("updateChart",()=>this.chartService.updateChart(e))}restoreChart(e,t){return this.assertChart("restoreChart",()=>this.chartService.restoreChart(e,t))}assertClipboard(e,t){ae.__assertRegistered("@ag-grid-enterprise/clipboard","api"+e,this.context.getGridId())&&t()}copyToClipboard(e){this.assertClipboard("copyToClipboard",()=>this.clipboardService.copyToClipboard(e))}cutToClipboard(e){this.assertClipboard("cutToClipboard",()=>this.clipboardService.cutToClipboard(e))}copySelectedRowsToClipboard(e){this.assertClipboard("copySelectedRowsToClipboard",()=>this.clipboardService.copySelectedRowsToClipboard(e))}copySelectedRangeToClipboard(e){this.assertClipboard("copySelectedRangeToClipboard",()=>this.clipboardService.copySelectedRangeToClipboard(e))}copySelectedRangeDown(){this.assertClipboard("copySelectedRangeDown",()=>this.clipboardService.copyRangeDown())}pasteFromClipboard(){this.assertClipboard("pasteFromClipboard",()=>this.clipboardService.pasteFromClipboard())}showColumnMenuAfterButtonClick(e,t){j("'showColumnMenuAfterButtonClick' is deprecated. Use 'IHeaderParams.showColumnMenu' within a header component, or 'api.showColumnMenu' elsewhere.");const i=this.columnModel.getGridColumn(e);this.menuService.showColumnMenu({column:i,buttonElement:t,positionBy:"button"})}showColumnMenuAfterMouseClick(e,t){j("'showColumnMenuAfterMouseClick' is deprecated. Use 'IHeaderParams.showColumnMenuAfterMouseClick' within a header component, or 'api.showColumnMenu' elsewhere.");let i=this.columnModel.getGridColumn(e);i||(i=this.columnModel.getPrimaryColumn(e)),i?this.menuService.showColumnMenu({column:i,mouseEvent:t,positionBy:"mouse"}):console.error(`AG Grid: column '${e}' not found`)}showContextMenu(e){const{rowNode:t,column:i,value:n,x:s,y:r}=e||{};let{x:o,y:a}=this.menuService.getContextMenuPosition(t,i);null!=s&&(o=s),null!=r&&(a=r),this.menuService.showContextMenu({mouseEvent:new MouseEvent("mousedown",{clientX:o,clientY:a}),rowNode:t,column:i,value:n})}showColumnChooser(e){this.menuService.showColumnChooser({chooserParams:e})}showColumnFilter(e){const t=this.columnModel.getGridColumn(e);t?this.menuService.showFilterMenu({column:t,containerType:"columnFilter",positionBy:"auto"}):console.error(`AG Grid: column '${e}' not found`)}showColumnMenu(e){const t=this.columnModel.getGridColumn(e);t?this.menuService.showColumnMenu({column:t,positionBy:"auto"}):console.error(`AG Grid: column '${e}' not found`)}hidePopupMenu(){this.menuService.hidePopupMenu()}hideColumnChooser(){this.menuService.hideColumnChooser()}tabToNextCell(e){return this.navigationService.tabToNextCell(!1,e)}tabToPreviousCell(e){return this.navigationService.tabToNextCell(!0,e)}getCellRendererInstances(e={}){return this.rowRenderer.getCellRendererInstances(e).map(Wo)}getCellEditorInstances(e={}){return this.rowRenderer.getCellEditorInstances(e).map(Wo)}getEditingCells(){return this.rowRenderer.getEditingCells()}stopEditing(e=!1){this.rowRenderer.stopEditing(e)}startEditingCell(e){const t=this.columnModel.getGridColumn(e.colKey);if(!t)return void console.warn(`AG Grid: no column found for ${e.colKey}`);const i={rowIndex:e.rowIndex,rowPinned:e.rowPinned||null,column:t};null==e.rowPinned&&this.ensureIndexVisible(e.rowIndex),this.ensureColumnVisible(e.colKey);const n=this.navigationService.getCellByPosition(i);n&&(this.focusService.isCellFocused(i)||this.focusService.setFocusedCell(i),n.startRowOrCellEdit(e.key))}addAggFunc(e,t){this.logDeprecation("v31.1","addAggFunc(key, func)","addAggFuncs({ key: func })"),this.aggFuncService&&this.aggFuncService.addAggFuncs({key:t})}addAggFuncs(e){this.aggFuncService&&this.aggFuncService.addAggFuncs(e)}clearAggFuncs(){this.aggFuncService&&this.aggFuncService.clear()}applyServerSideTransaction(e){if(this.serverSideTransactionManager)return this.serverSideTransactionManager.applyTransaction(e);this.logMissingRowModel("applyServerSideTransaction","serverSide")}applyServerSideTransactionAsync(e,t){if(this.serverSideTransactionManager)return this.serverSideTransactionManager.applyTransactionAsync(e,t);this.logMissingRowModel("applyServerSideTransactionAsync","serverSide")}applyServerSideRowData(e){var t,i;const n=null!=(t=e.startRow)?t:0,s=null!=(i=e.route)?i:[];n<0?console.warn(`AG Grid: invalid value ${e.startRow} for startRow, the value should be >= 0`):this.serverSideRowModel?this.serverSideRowModel.applyRowData(e.successParams,n,s):this.logMissingRowModel("setServerSideDatasource","serverSide")}retryServerSideLoads(){this.serverSideRowModel?this.serverSideRowModel.retryLoads():this.logMissingRowModel("retryServerSideLoads","serverSide")}flushServerSideAsyncTransactions(){if(this.serverSideTransactionManager)return this.serverSideTransactionManager.flushAsyncTransactions();this.logMissingRowModel("flushServerSideAsyncTransactions","serverSide")}applyTransaction(e){if(this.clientSideRowModel)return this.frameworkOverrides.wrapIncoming(()=>this.clientSideRowModel.updateRowData(e));this.logMissingRowModel("applyTransaction","clientSide")}applyTransactionAsync(e,t){this.clientSideRowModel?this.frameworkOverrides.wrapIncoming(()=>this.clientSideRowModel.batchUpdateRowData(e,t)):this.logMissingRowModel("applyTransactionAsync","clientSide")}flushAsyncTransactions(){this.clientSideRowModel?this.frameworkOverrides.wrapIncoming(()=>this.clientSideRowModel.flushAsyncTransactions()):this.logMissingRowModel("flushAsyncTransactions","clientSide")}refreshInfiniteCache(){this.infiniteRowModel?this.infiniteRowModel.refreshCache():this.logMissingRowModel("refreshInfiniteCache","infinite")}purgeInfiniteCache(){this.infiniteRowModel?this.infiniteRowModel.purgeCache():this.logMissingRowModel("purgeInfiniteCache","infinite")}refreshServerSide(e){this.serverSideRowModel?this.serverSideRowModel.refreshStore(e):this.logMissingRowModel("refreshServerSide","serverSide")}getServerSideGroupLevelState(){return this.serverSideRowModel?this.serverSideRowModel.getStoreState():(this.logMissingRowModel("getServerSideGroupLevelState","serverSide"),[])}getInfiniteRowCount(){if(this.infiniteRowModel)return this.infiniteRowModel.getRowCount();this.logMissingRowModel("getInfiniteRowCount","infinite")}isLastRowIndexKnown(){if(this.infiniteRowModel)return this.infiniteRowModel.isLastRowIndexKnown();this.logMissingRowModel("isLastRowIndexKnown","infinite")}getCacheBlockState(){return this.rowNodeBlockLoader.getBlockState()}getFirstDisplayedRow(){return this.logDeprecation("v31.1","getFirstDisplayedRow","getFirstDisplayedRowIndex"),this.getFirstDisplayedRowIndex()}getFirstDisplayedRowIndex(){return this.rowRenderer.getFirstVirtualRenderedRow()}getLastDisplayedRow(){return this.logDeprecation("v31.1","getLastDisplayedRow","getLastDisplayedRowIndex"),this.getLastDisplayedRowIndex()}getLastDisplayedRowIndex(){return this.rowRenderer.getLastVirtualRenderedRow()}getDisplayedRowAtIndex(e){return this.rowModel.getRow(e)}getDisplayedRowCount(){return this.rowModel.getRowCount()}paginationIsLastPageFound(){return this.paginationProxy.isLastPageFound()}paginationGetPageSize(){return this.paginationProxy.getPageSize()}paginationGetCurrentPage(){return this.paginationProxy.getCurrentPage()}paginationGetTotalPages(){return this.paginationProxy.getTotalPages()}paginationGetRowCount(){return this.paginationProxy.getMasterRowCount()}paginationGoToNextPage(){this.paginationProxy.goToNextPage()}paginationGoToPreviousPage(){this.paginationProxy.goToPreviousPage()}paginationGoToFirstPage(){this.paginationProxy.goToFirstPage()}paginationGoToLastPage(){this.paginationProxy.goToLastPage()}paginationGoToPage(e){this.paginationProxy.goToPage(e)}sizeColumnsToFit(e){"number"==typeof e?this.columnModel.sizeColumnsToFit(e,"api"):this.gridBodyCtrl.sizeColumnsToFit(e)}setColumnGroupOpened(e,t){this.columnModel.setColumnGroupOpened(e,t,"api")}getColumnGroup(e,t){return this.columnModel.getColumnGroup(e,t)}getProvidedColumnGroup(e){return this.columnModel.getProvidedColumnGroup(e)}getDisplayNameForColumn(e,t){return this.columnModel.getDisplayNameForColumn(e,t)||""}getDisplayNameForColumnGroup(e,t){return this.columnModel.getDisplayNameForColumnGroup(e,t)||""}getColumn(e){return this.columnModel.getPrimaryColumn(e)}getColumns(){return this.columnModel.getAllPrimaryColumns()}applyColumnState(e){return this.columnModel.applyColumnState(e,"api")}getColumnState(){return this.columnModel.getColumnState()}resetColumnState(){this.columnModel.resetColumnState("api")}getColumnGroupState(){return this.columnModel.getColumnGroupState()}setColumnGroupState(e){this.columnModel.setColumnGroupState(e,"api")}resetColumnGroupState(){this.columnModel.resetColumnGroupState("api")}isPinning(){return this.columnModel.isPinningLeft()||this.columnModel.isPinningRight()}isPinningLeft(){return this.columnModel.isPinningLeft()}isPinningRight(){return this.columnModel.isPinningRight()}getDisplayedColAfter(e){return this.columnModel.getDisplayedColAfter(e)}getDisplayedColBefore(e){return this.columnModel.getDisplayedColBefore(e)}setColumnVisible(e,t){this.logDeprecation("v31.1","setColumnVisible(key,visible)","setColumnsVisible([key],visible)"),this.columnModel.setColumnsVisible([e],t,"api")}setColumnsVisible(e,t){this.columnModel.setColumnsVisible(e,t,"api")}setColumnPinned(e,t){this.logDeprecation("v31.1","setColumnPinned(key,pinned)","setColumnsPinned([key],pinned)"),this.columnModel.setColumnsPinned([e],t,"api")}setColumnsPinned(e,t){this.columnModel.setColumnsPinned(e,t,"api")}getAllGridColumns(){return this.columnModel.getAllGridColumns()}getDisplayedLeftColumns(){return this.columnModel.getDisplayedLeftColumns()}getDisplayedCenterColumns(){return this.columnModel.getDisplayedCenterColumns()}getDisplayedRightColumns(){return this.columnModel.getDisplayedRightColumns()}getAllDisplayedColumns(){return this.columnModel.getAllDisplayedColumns()}getAllDisplayedVirtualColumns(){return this.columnModel.getViewportColumns()}moveColumn(e,t){this.logDeprecation("v31.1","moveColumn(key, toIndex)","moveColumns([key], toIndex)"),this.columnModel.moveColumns([e],t,"api")}moveColumnByIndex(e,t){this.columnModel.moveColumnByIndex(e,t,"api")}moveColumns(e,t){this.columnModel.moveColumns(e,t,"api")}moveRowGroupColumn(e,t){this.columnModel.moveRowGroupColumn(e,t,"api")}setColumnAggFunc(e,t){this.columnModel.setColumnAggFunc(e,t,"api")}setColumnWidth(e,t,i=!0,n="api"){this.logDeprecation("v31.1","setColumnWidth(col, width)","setColumnWidths([{key: col, newWidth: width}])"),this.columnModel.setColumnWidths([{key:e,newWidth:t}],!1,i,n)}setColumnWidths(e,t=!0,i="api"){this.columnModel.setColumnWidths(e,!1,t,i)}isPivotMode(){return this.columnModel.isPivotMode()}getPivotResultColumn(e,t){return this.columnModel.getSecondaryPivotColumn(e,t)}setValueColumns(e){this.columnModel.setValueColumns(e,"api")}getValueColumns(){return this.columnModel.getValueColumns()}removeValueColumn(e){this.logDeprecation("v31.1","removeValueColumn(colKey)","removeValueColumns([colKey])"),this.columnModel.removeValueColumns([e],"api")}removeValueColumns(e){this.columnModel.removeValueColumns(e,"api")}addValueColumn(e){this.logDeprecation("v31.1","addValueColumn(colKey)","addValueColumns([colKey])"),this.columnModel.addValueColumns([e],"api")}addValueColumns(e){this.columnModel.addValueColumns(e,"api")}setRowGroupColumns(e){this.columnModel.setRowGroupColumns(e,"api")}removeRowGroupColumn(e){this.logDeprecation("v31.1","removeRowGroupColumn(colKey)","removeRowGroupColumns([colKey])"),this.columnModel.removeRowGroupColumns([e],"api")}removeRowGroupColumns(e){this.columnModel.removeRowGroupColumns(e,"api")}addRowGroupColumn(e){this.logDeprecation("v31.1","addRowGroupColumn(colKey)","addRowGroupColumns([colKey])"),this.columnModel.addRowGroupColumns([e],"api")}addRowGroupColumns(e){this.columnModel.addRowGroupColumns(e,"api")}getRowGroupColumns(){return this.columnModel.getRowGroupColumns()}setPivotColumns(e){this.columnModel.setPivotColumns(e,"api")}removePivotColumn(e){this.logDeprecation("v31.1","removePivotColumn(colKey)","removePivotColumns([colKey])"),this.columnModel.removePivotColumns([e],"api")}removePivotColumns(e){this.columnModel.removePivotColumns(e,"api")}addPivotColumn(e){this.logDeprecation("v31.1","addPivotColumn(colKey)","addPivotColumns([colKey])"),this.columnModel.addPivotColumns([e],"api")}addPivotColumns(e){this.columnModel.addPivotColumns(e,"api")}getPivotColumns(){return this.columnModel.getPivotColumns()}getLeftDisplayedColumnGroups(){return this.columnModel.getDisplayedTreeLeft()}getCenterDisplayedColumnGroups(){return this.columnModel.getDisplayedTreeCentre()}getRightDisplayedColumnGroups(){return this.columnModel.getDisplayedTreeRight()}getAllDisplayedColumnGroups(){return this.columnModel.getAllDisplayedTrees()}autoSizeColumn(e,t){return this.logDeprecation("v31.1","autoSizeColumn(key, skipHeader)","autoSizeColumns([key], skipHeader)"),this.columnModel.autoSizeColumns({columns:[e],skipHeader:t,source:"api"})}autoSizeColumns(e,t){this.columnModel.autoSizeColumns({columns:e,skipHeader:t,source:"api"})}autoSizeAllColumns(e){this.columnModel.autoSizeAllColumns("api",e)}setPivotResultColumns(e){this.columnModel.setSecondaryColumns(e,"api")}getPivotResultColumns(){return this.columnModel.getSecondaryColumns()}getState(){return this.stateService.getState()}getGridOption(e){return this.gos.get(e)}setGridOption(e,t){this.updateGridOptions({[e]:t})}updateGridOptions(e){this.gos.updateGridOptions({options:e})}__internalUpdateGridOptions(e,t){this.gos.updateGridOptions({options:e,force:t,source:"gridOptionsUpdated"})}deprecatedUpdateGridOption(e,t){j(`set${e.charAt(0).toUpperCase()}${e.slice(1,e.length)} is deprecated. Please use 'api.setGridOption('${e}', newValue)' or 'api.updateGridOptions({ ${e}: newValue })' instead.`),this.setGridOption(e,t)}setPivotMode(e){this.deprecatedUpdateGridOption("pivotMode",e)}setPinnedTopRowData(e){this.deprecatedUpdateGridOption("pinnedTopRowData",e)}setPinnedBottomRowData(e){this.deprecatedUpdateGridOption("pinnedBottomRowData",e)}setPopupParent(e){this.deprecatedUpdateGridOption("popupParent",e)}setSuppressModelUpdateAfterUpdateTransaction(e){this.deprecatedUpdateGridOption("suppressModelUpdateAfterUpdateTransaction",e)}setDataTypeDefinitions(e){this.deprecatedUpdateGridOption("dataTypeDefinitions",e)}setPagination(e){this.deprecatedUpdateGridOption("pagination",e)}paginationSetPageSize(e){this.deprecatedUpdateGridOption("paginationPageSize",e)}setSideBar(e){this.deprecatedUpdateGridOption("sideBar",e)}setSuppressClipboardPaste(e){this.deprecatedUpdateGridOption("suppressClipboardPaste",e)}setGroupRemoveSingleChildren(e){this.deprecatedUpdateGridOption("groupRemoveSingleChildren",e)}setGroupRemoveLowestSingleChildren(e){this.deprecatedUpdateGridOption("groupRemoveLowestSingleChildren",e)}setGroupDisplayType(e){this.deprecatedUpdateGridOption("groupDisplayType",e)}setGroupIncludeFooter(e){this.deprecatedUpdateGridOption("groupIncludeFooter",e)}setGroupIncludeTotalFooter(e){this.deprecatedUpdateGridOption("groupIncludeTotalFooter",e)}setRowClass(e){this.deprecatedUpdateGridOption("rowClass",e)}setDeltaSort(e){this.deprecatedUpdateGridOption("deltaSort",e)}setSuppressRowDrag(e){this.deprecatedUpdateGridOption("suppressRowDrag",e)}setSuppressMoveWhenRowDragging(e){this.deprecatedUpdateGridOption("suppressMoveWhenRowDragging",e)}setSuppressRowClickSelection(e){this.deprecatedUpdateGridOption("suppressRowClickSelection",e)}setEnableAdvancedFilter(e){this.deprecatedUpdateGridOption("enableAdvancedFilter",e)}setIncludeHiddenColumnsInAdvancedFilter(e){this.deprecatedUpdateGridOption("includeHiddenColumnsInAdvancedFilter",e)}setAdvancedFilterParent(e){this.deprecatedUpdateGridOption("advancedFilterParent",e)}setAdvancedFilterBuilderParams(e){this.deprecatedUpdateGridOption("advancedFilterBuilderParams",e)}setQuickFilter(e){j("setQuickFilter is deprecated. Please use 'api.setGridOption('quickFilterText', newValue)' or 'api.updateGridOptions({ quickFilterText: newValue })' instead."),this.gos.updateGridOptions({options:{quickFilterText:e}})}setExcludeHiddenColumnsFromQuickFilter(e){this.deprecatedUpdateGridOption("includeHiddenColumnsInQuickFilter",!e)}setIncludeHiddenColumnsInQuickFilter(e){this.deprecatedUpdateGridOption("includeHiddenColumnsInQuickFilter",e)}setQuickFilterParser(e){this.deprecatedUpdateGridOption("quickFilterParser",e)}setQuickFilterMatcher(e){this.deprecatedUpdateGridOption("quickFilterMatcher",e)}setAlwaysShowHorizontalScroll(e){this.deprecatedUpdateGridOption("alwaysShowHorizontalScroll",e)}setAlwaysShowVerticalScroll(e){this.deprecatedUpdateGridOption("alwaysShowVerticalScroll",e)}setFunctionsReadOnly(e){this.deprecatedUpdateGridOption("functionsReadOnly",e)}setColumnDefs(e,t="api"){j("setColumnDefs is deprecated. Please use 'api.setGridOption('columnDefs', newValue)' or 'api.updateGridOptions({ columnDefs: newValue })' instead."),this.gos.updateGridOptions({options:{columnDefs:e},source:t})}setAutoGroupColumnDef(e,t="api"){j("setAutoGroupColumnDef is deprecated. Please use 'api.setGridOption('autoGroupColumnDef', newValue)' or 'api.updateGridOptions({ autoGroupColumnDef: newValue })' instead."),this.gos.updateGridOptions({options:{autoGroupColumnDef:e},source:t})}setDefaultColDef(e,t="api"){j("setDefaultColDef is deprecated. Please use 'api.setGridOption('defaultColDef', newValue)' or 'api.updateGridOptions({ defaultColDef: newValue })' instead."),this.gos.updateGridOptions({options:{defaultColDef:e},source:t})}setColumnTypes(e,t="api"){j("setColumnTypes is deprecated. Please use 'api.setGridOption('columnTypes', newValue)' or 'api.updateGridOptions({ columnTypes: newValue })' instead."),this.gos.updateGridOptions({options:{columnTypes:e},source:t})}setTreeData(e){this.deprecatedUpdateGridOption("treeData",e)}setServerSideDatasource(e){this.deprecatedUpdateGridOption("serverSideDatasource",e)}setCacheBlockSize(e){this.deprecatedUpdateGridOption("cacheBlockSize",e)}setDatasource(e){this.deprecatedUpdateGridOption("datasource",e)}setViewportDatasource(e){this.deprecatedUpdateGridOption("viewportDatasource",e)}setRowData(e){this.deprecatedUpdateGridOption("rowData",e)}setEnableCellTextSelection(e){this.deprecatedUpdateGridOption("enableCellTextSelection",e)}setHeaderHeight(e){this.deprecatedUpdateGridOption("headerHeight",e)}setDomLayout(e){this.deprecatedUpdateGridOption("domLayout",e)}setFillHandleDirection(e){this.deprecatedUpdateGridOption("fillHandleDirection",e)}setGroupHeaderHeight(e){this.deprecatedUpdateGridOption("groupHeaderHeight",e)}setFloatingFiltersHeight(e){this.deprecatedUpdateGridOption("floatingFiltersHeight",e)}setPivotHeaderHeight(e){this.deprecatedUpdateGridOption("pivotHeaderHeight",e)}setPivotGroupHeaderHeight(e){this.deprecatedUpdateGridOption("pivotGroupHeaderHeight",e)}setAnimateRows(e){this.deprecatedUpdateGridOption("animateRows",e)}setIsExternalFilterPresent(e){this.deprecatedUpdateGridOption("isExternalFilterPresent",e)}setDoesExternalFilterPass(e){this.deprecatedUpdateGridOption("doesExternalFilterPass",e)}setNavigateToNextCell(e){this.deprecatedUpdateGridOption("navigateToNextCell",e)}setTabToNextCell(e){this.deprecatedUpdateGridOption("tabToNextCell",e)}setTabToNextHeader(e){this.deprecatedUpdateGridOption("tabToNextHeader",e)}setNavigateToNextHeader(e){this.deprecatedUpdateGridOption("navigateToNextHeader",e)}setRowGroupPanelShow(e){this.deprecatedUpdateGridOption("rowGroupPanelShow",e)}setGetGroupRowAgg(e){this.deprecatedUpdateGridOption("getGroupRowAgg",e)}setGetBusinessKeyForNode(e){this.deprecatedUpdateGridOption("getBusinessKeyForNode",e)}setGetChildCount(e){this.deprecatedUpdateGridOption("getChildCount",e)}setProcessRowPostCreate(e){this.deprecatedUpdateGridOption("processRowPostCreate",e)}setGetRowId(e){j("getRowId is a static property and can no longer be updated.")}setGetRowClass(e){this.deprecatedUpdateGridOption("getRowClass",e)}setIsFullWidthRow(e){this.deprecatedUpdateGridOption("isFullWidthRow",e)}setIsRowSelectable(e){this.deprecatedUpdateGridOption("isRowSelectable",e)}setIsRowMaster(e){this.deprecatedUpdateGridOption("isRowMaster",e)}setPostSortRows(e){this.deprecatedUpdateGridOption("postSortRows",e)}setGetDocument(e){this.deprecatedUpdateGridOption("getDocument",e)}setGetContextMenuItems(e){this.deprecatedUpdateGridOption("getContextMenuItems",e)}setGetMainMenuItems(e){this.deprecatedUpdateGridOption("getMainMenuItems",e)}setProcessCellForClipboard(e){this.deprecatedUpdateGridOption("processCellForClipboard",e)}setSendToClipboard(e){this.deprecatedUpdateGridOption("sendToClipboard",e)}setProcessCellFromClipboard(e){this.deprecatedUpdateGridOption("processCellFromClipboard",e)}setProcessPivotResultColDef(e){this.deprecatedUpdateGridOption("processPivotResultColDef",e)}setProcessPivotResultColGroupDef(e){this.deprecatedUpdateGridOption("processPivotResultColGroupDef",e)}setPostProcessPopup(e){this.deprecatedUpdateGridOption("postProcessPopup",e)}setInitialGroupOrderComparator(e){this.deprecatedUpdateGridOption("initialGroupOrderComparator",e)}setGetChartToolbarItems(e){this.deprecatedUpdateGridOption("getChartToolbarItems",e)}setPaginationNumberFormatter(e){this.deprecatedUpdateGridOption("paginationNumberFormatter",e)}setGetServerSideGroupLevelParams(e){this.deprecatedUpdateGridOption("getServerSideGroupLevelParams",e)}setIsServerSideGroupOpenByDefault(e){this.deprecatedUpdateGridOption("isServerSideGroupOpenByDefault",e)}setIsApplyServerSideTransaction(e){this.deprecatedUpdateGridOption("isApplyServerSideTransaction",e)}setIsServerSideGroup(e){this.deprecatedUpdateGridOption("isServerSideGroup",e)}setGetServerSideGroupKey(e){this.deprecatedUpdateGridOption("getServerSideGroupKey",e)}setGetRowStyle(e){this.deprecatedUpdateGridOption("getRowStyle",e)}setGetRowHeight(e){this.deprecatedUpdateGridOption("getRowHeight",e)}};m([pe("rowRenderer")],jo.prototype,"rowRenderer",2),m([pe("navigationService")],jo.prototype,"navigationService",2),m([pe("filterManager")],jo.prototype,"filterManager",2),m([pe("columnModel")],jo.prototype,"columnModel",2),m([pe("selectionService")],jo.prototype,"selectionService",2),m([pe("gridOptionsService")],jo.prototype,"gos",2),m([pe("valueService")],jo.prototype,"valueService",2),m([pe("alignedGridsService")],jo.prototype,"alignedGridsService",2),m([pe("eventService")],jo.prototype,"eventService",2),m([pe("pinnedRowModel")],jo.prototype,"pinnedRowModel",2),m([pe("context")],jo.prototype,"context",2),m([pe("rowModel")],jo.prototype,"rowModel",2),m([pe("sortController")],jo.prototype,"sortController",2),m([pe("paginationProxy")],jo.prototype,"paginationProxy",2),m([pe("focusService")],jo.prototype,"focusService",2),m([pe("dragAndDropService")],jo.prototype,"dragAndDropService",2),m([pe("menuService")],jo.prototype,"menuService",2),m([pe("valueCache")],jo.prototype,"valueCache",2),m([pe("animationFrameService")],jo.prototype,"animationFrameService",2),m([pe("ctrlsService")],jo.prototype,"ctrlsService",2),m([pe("overlayService")],jo.prototype,"overlayService",2),m([pe("stateService")],jo.prototype,"stateService",2),m([pe("expansionService")],jo.prototype,"expansionService",2),m([pe("apiEventService")],jo.prototype,"apiEventService",2),m([pe("frameworkOverrides")],jo.prototype,"frameworkOverrides",2),m([pe("undoRedoService")],jo.prototype,"undoRedoService",2),m([pe("rowNodeBlockLoader")],jo.prototype,"rowNodeBlockLoader",2),m([ge("csvCreator")],jo.prototype,"csvCreator",2),m([ge("excelCreator")],jo.prototype,"excelCreator",2),m([ge("rangeService")],jo.prototype,"rangeService",2),m([ge("clipboardService")],jo.prototype,"clipboardService",2),m([ge("aggFuncService")],jo.prototype,"aggFuncService",2),m([ge("statusBarService")],jo.prototype,"statusBarService",2),m([ge("chartService")],jo.prototype,"chartService",2),m([ge("ssrmTransactionManager")],jo.prototype,"serverSideTransactionManager",2),m([ge("sideBarService")],jo.prototype,"sideBarService",2),m([he],jo.prototype,"init",1),jo=m([ue("gridApi")],jo);var Ko=class extends ot{constructor(){super(...arguments),this.quickFilter=null,this.quickFilterParts=null}postConstruct(){this.addManagedListener(this.eventService,dt.EVENT_COLUMN_PIVOT_MODE_CHANGED,()=>this.resetQuickFilterCache()),this.addManagedListener(this.eventService,dt.EVENT_NEW_COLUMNS_LOADED,()=>this.resetQuickFilterCache()),this.addManagedListener(this.eventService,dt.EVENT_COLUMN_ROW_GROUP_CHANGED,()=>this.resetQuickFilterCache()),this.addManagedListener(this.eventService,dt.EVENT_COLUMN_VISIBLE,()=>{this.gos.get("includeHiddenColumnsInQuickFilter")||this.resetQuickFilterCache()}),this.addManagedPropertyListener("quickFilterText",e=>this.setQuickFilter(e.currentValue)),this.addManagedPropertyListeners(["includeHiddenColumnsInQuickFilter","applyQuickFilterBeforePivotOrAgg"],()=>this.onQuickFilterColumnConfigChanged()),this.quickFilter=this.parseQuickFilter(this.gos.get("quickFilterText")),this.parser=this.gos.get("quickFilterParser"),this.matcher=this.gos.get("quickFilterMatcher"),this.setQuickFilterParts(),this.addManagedPropertyListeners(["quickFilterMatcher","quickFilterParser"],()=>this.setQuickFilterParserAndMatcher())}isQuickFilterPresent(){return null!==this.quickFilter}doesRowPassQuickFilter(e){const t=this.gos.get("cacheQuickFilter");return this.matcher?this.doesRowPassQuickFilterMatcher(t,e):this.quickFilterParts.every(i=>t?this.doesRowPassQuickFilterCache(e,i):this.doesRowPassQuickFilterNoCache(e,i))}resetQuickFilterCache(){this.rowModel.forEachNode(e=>e.quickFilterAggregateText=null)}setQuickFilterParts(){const{quickFilter:e,parser:t}=this;this.quickFilterParts=e?t?t(e):e.split(" "):null}parseQuickFilter(e){return S(e)?this.gos.isRowModelType("clientSide")?e.toUpperCase():(console.warn("AG Grid - Quick filtering only works with the Client-Side Row Model"),null):null}setQuickFilter(e){if(null!=e&&"string"!=typeof e)return void console.warn("AG Grid - Grid option quickFilterText only supports string inputs, received: "+typeof e);const t=this.parseQuickFilter(e);this.quickFilter!==t&&(this.quickFilter=t,this.setQuickFilterParts(),this.dispatchEvent({type:Ko.EVENT_QUICK_FILTER_CHANGED}))}setQuickFilterParserAndMatcher(){const e=this.gos.get("quickFilterParser"),t=this.gos.get("quickFilterMatcher"),i=e!==this.parser||t!==this.matcher;this.parser=e,this.matcher=t,i&&(this.setQuickFilterParts(),this.dispatchEvent({type:Ko.EVENT_QUICK_FILTER_CHANGED}))}onQuickFilterColumnConfigChanged(){this.columnModel.refreshQuickFilterColumns(),this.resetQuickFilterCache(),this.isQuickFilterPresent()&&this.dispatchEvent({type:Ko.EVENT_QUICK_FILTER_CHANGED})}doesRowPassQuickFilterNoCache(e,t){return this.columnModel.getAllColumnsForQuickFilter().some(i=>{const n=this.getQuickFilterTextForColumn(i,e);return S(n)&&n.indexOf(t)>=0})}doesRowPassQuickFilterCache(e,t){return this.checkGenerateQuickFilterAggregateText(e),e.quickFilterAggregateText.indexOf(t)>=0}doesRowPassQuickFilterMatcher(e,t){let i;e?(this.checkGenerateQuickFilterAggregateText(t),i=t.quickFilterAggregateText):i=this.getQuickFilterAggregateText(t);const{quickFilterParts:n,matcher:s}=this;return s(n,i)}checkGenerateQuickFilterAggregateText(e){e.quickFilterAggregateText||(e.quickFilterAggregateText=this.getQuickFilterAggregateText(e))}getQuickFilterTextForColumn(e,t){let i=this.valueService.getValue(e,t,!0);const n=e.getColDef();if(n.getQuickFilterText){const s=this.gos.addGridCommonParams({value:i,node:t,data:t.data,column:e,colDef:n});i=n.getQuickFilterText(s)}return S(i)?i.toString().toUpperCase():null}getQuickFilterAggregateText(e){const t=[];return this.columnModel.getAllColumnsForQuickFilter().forEach(i=>{const n=this.getQuickFilterTextForColumn(i,e);S(n)&&t.push(n)}),t.join(Ko.QUICK_FILTER_SEPARATOR)}};Ko.EVENT_QUICK_FILTER_CHANGED="quickFilterChanged",Ko.QUICK_FILTER_SEPARATOR="\n",m([pe("valueService")],Ko.prototype,"valueService",2),m([pe("columnModel")],Ko.prototype,"columnModel",2),m([pe("rowModel")],Ko.prototype,"rowModel",2),m([he],Ko.prototype,"postConstruct",1),Ko=m([ue("quickFilterService")],Ko);var $o=class extends ot{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,dt.EVENT_GRID_COLUMNS_CHANGED,()=>this.onColumnsChanged()),this.addManagedListener(this.eventService,dt.EVENT_COLUMN_VALUE_CHANGED,()=>this.refreshFiltersForAggregations()),this.addManagedListener(this.eventService,dt.EVENT_COLUMN_PIVOT_CHANGED,()=>this.refreshFiltersForAggregations()),this.addManagedListener(this.eventService,dt.EVENT_COLUMN_PIVOT_MODE_CHANGED,()=>this.refreshFiltersForAggregations()),this.addManagedListener(this.eventService,dt.EVENT_NEW_COLUMNS_LOADED,()=>this.updateAdvancedFilterColumns()),this.addManagedListener(this.eventService,dt.EVENT_COLUMN_VISIBLE,()=>this.updateAdvancedFilterColumns()),this.addManagedListener(this.eventService,dt.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",e=>this.setAdvancedFilterModel(e.currentValue)),this.addManagedListener(this.eventService,dt.EVENT_ADVANCED_FILTER_ENABLED_CHANGED,({enabled:e})=>this.onAdvancedFilterEnabledChanged(e)),this.addManagedListener(this.eventService,dt.EVENT_DATA_TYPES_INFERRED,()=>this.processFilterModelUpdateQueue()),this.addManagedListener(this.quickFilterService,Ko.EVENT_QUICK_FILTER_CHANGED,()=>this.onFilterChanged({source:"quickFilter"})),this.initialFilterModel=p({},null!=(i=null==(t=null==(e=this.gos.get("initialState"))?void 0:e.filter)?void 0:t.filterModel)?i:{})}isExternalFilterPresentCallback(){const e=this.gos.getCallback("isExternalFilterPresent");return"function"==typeof e&&e({})}doesExternalFilterPass(e){const t=this.gos.get("doesExternalFilterPass");return"function"==typeof t&&t(e)}setFilterModel(e,t="api"){if(this.isAdvancedFilterEnabled())return void this.warnAdvancedFilters();if(this.dataTypeService.isPendingInference())return void this.filterModelUpdateQueue.push({model:e,source:t});const i=[],n=this.getFilterModel();if(e){const t=hs(Object.keys(e));this.allColumnFilters.forEach((n,s)=>{const r=e[s];i.push(this.setModelOnFilterWrapper(n.filterPromise,r)),t.delete(s)}),t.forEach(t=>{const n=this.columnModel.getPrimaryColumn(t)||this.columnModel.getGridColumn(t);if(!n)return void console.warn("AG Grid: setFilterModel() - no column found for colId: "+t);if(!n.isFilterAllowed())return void console.warn("AG Grid: setFilterModel() - unable to fully apply model, filtering disabled for colId: "+t);const s=this.getOrCreateFilterWrapper(n,"NO_UI");s?i.push(this.setModelOnFilterWrapper(s.filterPromise,e[t])):console.warn("AG-Grid: setFilterModel() - unable to fully apply model, unable to create filter for colId: "+t)})}else this.allColumnFilters.forEach(e=>{i.push(this.setModelOnFilterWrapper(e.filterPromise,null))});gs.all(i).then(()=>{const e=this.getFilterModel(),i=[];this.allColumnFilters.forEach((t,s)=>{const r=n?n[s]:null,o=e?e[s]:null;ds.jsonEquals(r,o)||i.push(t.column)}),i.length>0&&this.onFilterChanged({columns:i,source:t})})}setModelOnFilterWrapper(e,t){return new gs(i=>{e.then(e=>{"function"!=typeof e.setModel&&(console.warn("AG Grid: filter missing setModel method, which is needed for setFilterModel"),i()),(e.setModel(t)||gs.resolve()).then(()=>i())})})}getFilterModel(){const e={};return this.allColumnFilters.forEach((t,i)=>{const n=this.getModelFromFilterWrapper(t);S(n)&&(e[i]=n)}),e}getModelFromFilterWrapper(e){var t;const i=e.filterPromise.resolveNow(null,e=>e);return null==i?null!=(t=this.initialFilterModel[e.column.getColId()])?t:null:"function"!=typeof i.getModel?(console.warn("AG Grid: filter API missing getModel method, which is needed for getFilterModel"),null):i.getModel()}isColumnFilterPresent(){return this.activeColumnFilters.length>0}isAggregateFilterPresent(){return!!this.activeAggregateFilters.length}isExternalFilterPresent(){return this.externalFilterPresent}isChildFilterPresent(){return this.isColumnFilterPresent()||this.isQuickFilterPresent()||this.isExternalFilterPresent()||this.isAdvancedFilterPresent()}isAdvancedFilterPresent(){return this.isAdvancedFilterEnabled()&&this.advancedFilterService.isFilterPresent()}onAdvancedFilterEnabledChanged(e){var t;e?this.allColumnFilters.size&&(this.allColumnFilters.forEach(e=>this.disposeFilterWrapper(e,"advancedFilterEnabled")),this.onFilterChanged({source:"advancedFilter"})):(null==(t=this.advancedFilterService)?void 0:t.isFilterPresent())&&(this.advancedFilterService.setModel(null),this.onFilterChanged({source:"advancedFilter"}))}isAdvancedFilterEnabled(){var e;return!!(null==(e=this.advancedFilterService)?void 0:e.isEnabled())}isAdvancedFilterHeaderActive(){return this.isAdvancedFilterEnabled()&&this.advancedFilterService.isHeaderActive()}doAggregateFiltersPass(e,t){return this.doColumnFiltersPass(e,t,!0)}updateActiveFilters(){this.activeColumnFilters.length=0,this.activeAggregateFilters.length=0;const e=e=>!!e&&(e.isFilterActive?e.isFilterActive():(console.warn("AG Grid: Filter is missing isFilterActive() method"),!1)),t=!!this.gos.getGroupAggFiltering(),i=e=>{if(!e.isPrimary())return!0;const i=!this.columnModel.isPivotActive();return!(!e.isValueActive()||!i)&&(!!this.columnModel.isPivotMode()||t)};this.allColumnFilters.forEach(t=>{if(t.filterPromise.resolveNow(!1,e)){const e=t.filterPromise.resolveNow(null,e=>e);i(t.column)?this.activeAggregateFilters.push(e):this.activeColumnFilters.push(e)}})}updateFilterFlagInColumns(e,t){this.allColumnFilters.forEach(i=>{const n=i.filterPromise.resolveNow(!1,e=>e.isFilterActive());i.column.setFilterActive(n,e,t)})}isAnyFilterPresent(){return this.isQuickFilterPresent()||this.isColumnFilterPresent()||this.isAggregateFilterPresent()||this.isExternalFilterPresent()||this.isAdvancedFilterPresent()}doColumnFiltersPass(e,t,i){const{data:n,aggData:s}=e,r=i?this.activeAggregateFilters:this.activeColumnFilters,o=i?s:n;for(let i=0;i<r.length;i++){const n=r[i];if(null!=n&&n!==t){if("function"!=typeof n.doesFilterPass)throw new Error("Filter is missing method doesFilterPass");if(!n.doesFilterPass({node:e,data:o}))return!1}}return!0}resetQuickFilterCache(){this.quickFilterService.resetQuickFilterCache()}refreshFiltersForAggregations(){this.gos.getGroupAggFiltering()&&this.onFilterChanged()}callOnFilterChangedOutsideRenderCycle(e){const t=()=>this.onFilterChanged(e);this.rowRenderer.isRefreshInProgress()?setTimeout(t,0):t()}onFilterChanged(e={}){const{source:t,filterInstance:i,additionalEventAttributes:n,columns:s}=e;this.updateDependantFilters(),this.updateActiveFilters(),this.updateFilterFlagInColumns("filterChanged",n),this.externalFilterPresent=this.isExternalFilterPresentCallback(),this.allColumnFilters.forEach(e=>{e.filterPromise&&e.filterPromise.then(e=>{e&&e!==i&&e.onAnyFilterChanged&&e.onAnyFilterChanged()})});const r={source:t,type:dt.EVENT_FILTER_CHANGED,columns:s||[]};n&&G(r,n),this.processingFilterChange=!0,this.eventService.dispatchEvent(r),this.processingFilterChange=!1}isSuppressFlashingCellsBecauseFiltering(){var e;return!(null!=(e=this.gos.get("allowShowChangeAfterFilter"))&&e)&&this.processingFilterChange}isQuickFilterPresent(){return this.quickFilterService.isQuickFilterPresent()}updateAggFiltering(){this.aggFiltering=!!this.gos.getGroupAggFiltering()}isAggregateQuickFilterPresent(){return this.isQuickFilterPresent()&&this.shouldApplyQuickFilterAfterAgg()}isNonAggregateQuickFilterPresent(){return this.isQuickFilterPresent()&&!this.shouldApplyQuickFilterAfterAgg()}shouldApplyQuickFilterAfterAgg(){return(this.aggFiltering||this.columnModel.isPivotMode())&&!this.gos.get("applyQuickFilterBeforePivotOrAgg")}doesRowPassOtherFilters(e,t){return this.doesRowPassFilter({rowNode:t,filterInstanceToSkip:e})}doesRowPassAggregateFilters(e){return!(this.isAggregateQuickFilterPresent()&&!this.quickFilterService.doesRowPassQuickFilter(e.rowNode)||this.isAggregateFilterPresent()&&!this.doAggregateFiltersPass(e.rowNode,e.filterInstanceToSkip))}doesRowPassFilter(e){return!(this.isNonAggregateQuickFilterPresent()&&!this.quickFilterService.doesRowPassQuickFilter(e.rowNode)||this.isExternalFilterPresent()&&!this.doesExternalFilterPass(e.rowNode)||this.isColumnFilterPresent()&&!this.doColumnFiltersPass(e.rowNode,e.filterInstanceToSkip)||this.isAdvancedFilterPresent()&&!this.advancedFilterService.doesFilterPass(e.rowNode))}onNewRowsLoaded(e){this.allColumnFilters.forEach(e=>{e.filterPromise.then(e=>{e.onNewRowsLoaded&&e.onNewRowsLoaded()})}),this.updateFilterFlagInColumns(e,{afterDataChange:!0}),this.updateActiveFilters()}createValueGetter(e){return({node:t})=>this.valueService.getValue(e,t,!0)}createGetValue(e){return(t,i)=>{const n=i?this.columnModel.getGridColumn(i):e;return n?this.valueService.getValue(n,t,!0):void 0}}getFilterComponent(e,t,i=!0){var n;if(i)return(null==(n=this.getOrCreateFilterWrapper(e,t))?void 0:n.filterPromise)||null;const s=this.cachedFilter(e);return s?s.filterPromise:null}isFilterActive(e){const t=this.cachedFilter(e);return!!t&&t.filterPromise.resolveNow(!1,e=>e.isFilterActive())}getOrCreateFilterWrapper(e,t){if(!e.isFilterAllowed())return null;let i=this.cachedFilter(e);return i||(i=this.createFilterWrapper(e,t),this.setColumnFilterWrapper(e,i)),i}cachedFilter(e){return this.allColumnFilters.get(e.getColId())}getDefaultFilter(e){let t;if(ae.__isRegistered("@ag-grid-enterprise/set-filter",this.context.getGridId()))t="agSetColumnFilter";else{const i=this.dataTypeService.getBaseDataType(e);t="number"===i?"agNumberColumnFilter":"date"===i||"dateString"===i?"agDateColumnFilter":"agTextColumnFilter"}return t}getDefaultFloatingFilter(e){let t;if(ae.__isRegistered("@ag-grid-enterprise/set-filter",this.context.getGridId()))t="agSetColumnFloatingFilter";else{const i=this.dataTypeService.getBaseDataType(e);t="number"===i?"agNumberColumnFloatingFilter":"date"===i||"dateString"===i?"agDateColumnFloatingFilter":"agTextColumnFloatingFilter"}return t}createFilterInstance(e){const t=this.getDefaultFilter(e),i=e.getColDef();let n;const s=g(p({},this.createFilterParams(e,i)),{filterModifiedCallback:()=>this.filterModifiedCallbackFactory(n,e)(),filterChangedCallback:t=>this.filterChangedCallbackFactory(n,e)(t),doesRowPassOtherFilter:e=>this.doesRowPassOtherFilters(n,e)}),r=this.userComponentFactory.getFilterDetails(i,s,t);return r?{filterPromise:()=>{const e=r.newAgStackInstance();return e&&e.then(e=>n=e),e},compDetails:r}:{filterPromise:null,compDetails:null}}createFilterParams(e,t){return this.gos.addGridCommonParams({column:e,colDef:O(t),rowModel:this.rowModel,filterChangedCallback:()=>{},filterModifiedCallback:()=>{},valueGetter:this.createValueGetter(e),getValue:this.createGetValue(e),doesRowPassOtherFilter:()=>!0})}createFilterWrapper(e,t){var i;const n={column:e,filterPromise:null,compiledElement:null,compDetails:null},{filterPromise:s,compDetails:r}=this.createFilterInstance(e);return n.filterPromise=null!=(i=null==s?void 0:s())?i:null,n.compDetails=r,n}onColumnsChanged(){const e=[];this.allColumnFilters.forEach((t,i)=>{let n;n=t.column.isPrimary()?this.columnModel.getPrimaryColumn(i):this.columnModel.getGridColumn(i),n&&n===t.column||(e.push(t.column),this.disposeFilterWrapper(t,"columnChanged"),this.disposeColumnListener(i))}),e.length>0?this.onFilterChanged({columns:e,source:"api"}):this.updateDependantFilters()}updateDependantFilters(){const e=this.columnModel.getGroupAutoColumns();null==e||e.forEach(e=>{"agGroupColumnFilter"===e.getColDef().filter&&this.getOrCreateFilterWrapper(e,"NO_UI")})}isFilterAllowed(e){var t,i;if(this.isAdvancedFilterEnabled())return!1;if(!e.isFilterAllowed())return!1;const n=this.allColumnFilters.get(e.getColId());return null==(i=null==(t=null==n?void 0:n.filterPromise)?void 0:t.resolveNow(!0,e=>"function"!=typeof(null==e?void 0:e.isFilterAllowed)||(null==e?void 0:e.isFilterAllowed())))||i}getFloatingFilterCompDetails(e,t){const i=t=>{const i=this.getFilterComponent(e,"NO_UI");null!=i&&i.then(e=>{t(Wo(e))})},n=e.getColDef(),s=g(p({},this.createFilterParams(e,n)),{filterChangedCallback:()=>i(t=>this.filterChangedCallbackFactory(t,e)())}),r=this.userComponentFactory.mergeParamsWithApplicationProvidedParams(n,Ao,s);let o=this.userComponentFactory.getDefaultFloatingFilterType(n,()=>this.getDefaultFloatingFilter(e));null==o&&(o="agReadOnlyFloatingFilter");const a={column:e,filterParams:r,currentParentModel:()=>this.getCurrentFloatingFilterParentModel(e),parentFilterInstance:i,showParentFilter:t,suppressFilterButton:!1};return this.userComponentFactory.getFloatingFilterCompDetails(n,a,o)}getCurrentFloatingFilterParentModel(e){const t=this.getFilterComponent(e,"NO_UI",!1);return t?t.resolveNow(null,e=>e&&e.getModel()):null}destroyFilter(e,t="api"){const i=e.getColId(),n=this.allColumnFilters.get(i);this.disposeColumnListener(i),delete this.initialFilterModel[i],n&&(this.disposeFilterWrapper(n,t),this.onFilterChanged({columns:[e],source:"api"}))}disposeColumnListener(e){const t=this.allColumnListeners.get(e);t&&(this.allColumnListeners.delete(e),t())}disposeFilterWrapper(e,t){e.filterPromise.then(i=>{this.getContext().destroyBean(i),e.column.setFilterActive(!1,"filterDestroyed"),this.allColumnFilters.delete(e.column.getColId());const n={type:dt.EVENT_FILTER_DESTROYED,source:t,column:e.column};this.eventService.dispatchEvent(n)})}filterModifiedCallbackFactory(e,t){return()=>{const i={type:dt.EVENT_FILTER_MODIFIED,column:t,filterInstance:e};this.eventService.dispatchEvent(i)}}filterChangedCallbackFactory(e,t){return i=>{var n;const s=null!=(n=null==i?void 0:i.source)?n:"api",r={filter:e,additionalEventAttributes:i,columns:[t],source:s};this.callOnFilterChangedOutsideRenderCycle(r)}}checkDestroyFilter(e){const t=this.allColumnFilters.get(e);if(!t)return;const i=t.column,{compDetails:n}=i.isFilterAllowed()?this.createFilterInstance(i):{compDetails:null};if(this.areFilterCompsDifferent(t.compDetails,n))return void this.destroyFilter(i,"paramsUpdated");const s=i.getColDef().filterParams;t.filterPromise?t.filterPromise.then(e=>{!1===(!(null==e?void 0:e.refresh)||e.refresh(p(g(p({},this.createFilterParams(i,i.getColDef())),{filterModifiedCallback:this.filterModifiedCallbackFactory(e,i),filterChangedCallback:this.filterChangedCallbackFactory(e,i),doesRowPassOtherFilter:t=>this.doesRowPassOtherFilters(e,t)}),s)))&&this.destroyFilter(i,"paramsUpdated")}):this.destroyFilter(i,"paramsUpdated")}setColumnFilterWrapper(e,t){const i=e.getColId();this.allColumnFilters.set(i,t),this.allColumnListeners.set(i,this.addManagedListener(e,Ee.EVENT_COL_DEF_CHANGED,()=>this.checkDestroyFilter(i)))}areFilterCompsDifferent(e,t){if(!t||!e)return!0;const{componentClass:i}=e,{componentClass:n}=t;return!(i===n||(null==i?void 0:i.render)&&(null==n?void 0:n.render)&&i.render===n.render)}getAdvancedFilterModel(){return this.isAdvancedFilterEnabled()?this.advancedFilterService.getModel():null}setAdvancedFilterModel(e){this.isAdvancedFilterEnabled()&&(this.dataTypeService.isPendingInference()?this.advancedFilterModelUpdateQueue.push(e):(this.advancedFilterService.setModel(null!=e?e:null),this.onFilterChanged({source:"advancedFilter"})))}showAdvancedFilterBuilder(e){this.isAdvancedFilterEnabled()&&this.advancedFilterService.getCtrl().toggleFilterBuilder(e,!0)}updateAdvancedFilterColumns(){this.isAdvancedFilterEnabled()&&this.advancedFilterService.updateValidity()&&this.onFilterChanged({source:"advancedFilter"})}hasFloatingFilters(){return!this.isAdvancedFilterEnabled()&&this.columnModel.getAllGridColumns().some(e=>e.getColDef().floatingFilter)}getFilterInstance(e,t){if(this.isAdvancedFilterEnabled())return void this.warnAdvancedFilters();const i=this.getFilterInstanceImpl(e,e=>{if(!t)return;const i=Wo(e);t(i)});return Wo(i)}getColumnFilterInstance(e){return new Promise(t=>{this.getFilterInstance(e,e=>{t(e)})})}getFilterInstanceImpl(e,t){const i=this.columnModel.getPrimaryColumn(e);if(!i)return;const n=this.getFilterComponent(i,"NO_UI"),s=n&&n.resolveNow(null,e=>e);return s?setTimeout(t,0,s):n&&n.then(e=>{t(e)}),s}warnAdvancedFilters(){j("Column Filter API methods have been disabled as Advanced Filters are enabled.")}setupAdvancedFilterHeaderComp(e){var t;null==(t=this.advancedFilterService)||t.getCtrl().setupHeaderComp(e)}getHeaderRowCount(){return this.isAdvancedFilterHeaderActive()?1:0}getHeaderHeight(){return this.isAdvancedFilterHeaderActive()?this.advancedFilterService.getCtrl().getHeaderHeight():0}processFilterModelUpdateQueue(){this.filterModelUpdateQueue.forEach(({model:e,source:t})=>this.setFilterModel(e,t)),this.filterModelUpdateQueue=[],this.columnFilterModelUpdateQueue.forEach(({key:e,model:t,resolve:i})=>{this.setColumnFilterModel(e,t).then(()=>i())}),this.columnFilterModelUpdateQueue=[],this.advancedFilterModelUpdateQueue.forEach(e=>this.setAdvancedFilterModel(e)),this.advancedFilterModelUpdateQueue=[]}getColumnFilterModel(e){const t=this.getFilterWrapper(e);return t?this.getModelFromFilterWrapper(t):null}setColumnFilterModel(e,t){if(this.isAdvancedFilterEnabled())return this.warnAdvancedFilters(),Promise.resolve();if(this.dataTypeService.isPendingInference()){let i=()=>{};const n=new Promise(e=>{i=e});return this.columnFilterModelUpdateQueue.push({key:e,model:t,resolve:i}),n}const i=this.columnModel.getPrimaryColumn(e),n=i?this.getOrCreateFilterWrapper(i,"NO_UI"):null;return n?(s=this.setModelOnFilterWrapper(n.filterPromise,t),new Promise(e=>{s.then(t=>e(t))})):Promise.resolve();var s}getFilterWrapper(e){var t;const i=this.columnModel.getPrimaryColumn(e);return i&&null!=(t=this.cachedFilter(i))?t:null}destroy(){super.destroy(),this.allColumnFilters.forEach(e=>this.disposeFilterWrapper(e,"gridDestroyed")),this.allColumnListeners.clear()}};m([pe("valueService")],$o.prototype,"valueService",2),m([pe("columnModel")],$o.prototype,"columnModel",2),m([pe("rowModel")],$o.prototype,"rowModel",2),m([pe("userComponentFactory")],$o.prototype,"userComponentFactory",2),m([pe("rowRenderer")],$o.prototype,"rowRenderer",2),m([pe("dataTypeService")],$o.prototype,"dataTypeService",2),m([pe("quickFilterService")],$o.prototype,"quickFilterService",2),m([ge("advancedFilterService")],$o.prototype,"advancedFilterService",2),m([he],$o.prototype,"init",1),$o=m([ue("filterManager")],$o);var Yo=class extends ws{constructor(e,t){super('<div class="ag-filter"></div>'),this.column=e,this.source=t,this.filterWrapper=null}postConstruct(){this.createFilter(!0),this.addManagedListener(this.eventService,dt.EVENT_FILTER_DESTROYED,this.onFilterDestroyed.bind(this))}hasFilter(){return!!this.filterWrapper}getFilter(){var e,t;return null!=(t=null==(e=this.filterWrapper)?void 0:e.filterPromise)?t:null}afterInit(){var e,t,i;return null!=(i=null==(t=null==(e=this.filterWrapper)?void 0:e.filterPromise)?void 0:t.then(()=>{}))?i:gs.resolve()}afterGuiAttached(e){var t,i;null==(i=null==(t=this.filterWrapper)?void 0:t.filterPromise)||i.then(t=>{var i;null==(i=null==t?void 0:t.afterGuiAttached)||i.call(t,e)})}afterGuiDetached(){var e,t;null==(t=null==(e=this.filterWrapper)?void 0:e.filterPromise)||t.then(e=>{var t;null==(t=null==e?void 0:e.afterGuiDetached)||t.call(e)})}createFilter(e){var t;const{column:i,source:n}=this;this.filterWrapper=this.filterManager.getOrCreateFilterWrapper(i,n),(null==(t=this.filterWrapper)?void 0:t.filterPromise)&&this.filterWrapper.filterPromise.then(t=>{let s=t.getGui();if(S(s)||console.warn(`AG Grid: getGui method from filter returned ${s}, it should be a DOM element or an HTML template string.`),"string"==typeof s&&(s=An(s)),this.appendChild(s),e){const e={type:dt.EVENT_FILTER_OPENED,column:i,source:n,eGui:this.getGui()};this.eventService.dispatchEvent(e)}})}onFilterDestroyed(e){"api"!==e.source&&"paramsUpdated"!==e.source||e.column.getId()!==this.column.getId()||!this.columnModel.getPrimaryColumn(this.column)||(wn(this.getGui()),this.createFilter())}destroy(){this.filterWrapper=null,super.destroy()}};m([pe("filterManager")],Yo.prototype,"filterManager",2),m([pe("columnModel")],Yo.prototype,"columnModel",2),m([he],Yo.prototype,"postConstruct",1);var qo=class extends ws{constructor(e,t){super(e),this.ctrl=t}getCtrl(){return this.ctrl}},Xo=class e extends qo{constructor(t){super(e.TEMPLATE,t)}postConstruct(){const e=this.getGui(),t={addOrRemoveCssClass:(e,t)=>this.addOrRemoveCssClass(e,t),addOrRemoveBodyCssClass:(e,t)=>this.eFloatingFilterBody.classList.toggle(e,t),setButtonWrapperDisplayed:e=>cn(this.eButtonWrapper,e),setCompDetails:e=>this.setCompDetails(e),getFloatingFilterComp:()=>this.compPromise,setWidth:t=>e.style.width=t,setMenuIcon:e=>this.eButtonShowMainFilter.appendChild(e)};this.ctrl.setComp(t,e,this.eButtonShowMainFilter,this.eFloatingFilterBody)}setCompDetails(e){if(!e)return this.destroyFloatingFilterComp(),void(this.compPromise=null);this.compPromise=e.newAgStackInstance(),this.compPromise.then(e=>this.afterCompCreated(e))}destroyFloatingFilterComp(){this.floatingFilterComp&&(this.eFloatingFilterBody.removeChild(this.floatingFilterComp.getGui()),this.floatingFilterComp=this.destroyBean(this.floatingFilterComp))}afterCompCreated(e){e&&(this.isAlive()?(this.destroyFloatingFilterComp(),this.floatingFilterComp=e,this.eFloatingFilterBody.appendChild(e.getGui()),e.afterGuiAttached&&e.afterGuiAttached()):this.destroyBean(e))}};Xo.TEMPLATE='<div class="ag-header-cell ag-floating-filter" role="gridcell">\n            <div ref="eFloatingFilterBody" role="presentation"></div>\n            <div class="ag-floating-filter-button ag-hidden" ref="eButtonWrapper" role="presentation">\n                <button type="button" class="ag-button ag-floating-filter-button-button" ref="eButtonShowMainFilter" tabindex="-1"></button>\n            </div>\n        </div>',m([Es("eFloatingFilterBody")],Xo.prototype,"eFloatingFilterBody",2),m([Es("eButtonWrapper")],Xo.prototype,"eButtonWrapper",2),m([Es("eButtonShowMainFilter")],Xo.prototype,"eButtonShowMainFilter",2),m([he],Xo.prototype,"postConstruct",1),m([de],Xo.prototype,"destroyFloatingFilterComp",1);var Zo=Xo,Qo=(e=>(e.AUTO_HEIGHT="ag-layout-auto-height",e.NORMAL="ag-layout-normal",e.PRINT="ag-layout-print",e))(Qo||{}),Jo=class extends ot{constructor(e){super(),this.view=e}postConstruct(){this.addManagedPropertyListener("domLayout",this.updateLayoutClasses.bind(this)),this.updateLayoutClasses()}updateLayoutClasses(){const e=this.getDomLayout(),t={autoHeight:"autoHeight"===e,normal:"normal"===e,print:"print"===e},i=t.autoHeight?"ag-layout-auto-height":t.print?"ag-layout-print":"ag-layout-normal";this.view.updateLayoutClasses(i,t)}getDomLayout(){var e;const t=null!=(e=this.gos.get("domLayout"))?e:"normal";return-1===["normal","print","autoHeight"].indexOf(t)?(j(`${t} is not valid for DOM Layout, valid values are 'normal', 'autoHeight', 'print'.`),"normal"):t}};m([he],Jo.prototype,"postConstruct",1);var ea=class extends ot{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=ee(()=>this.lastScrollSource[1]=null,500),this.resetLastVScrollDebounced=ee(()=>this.lastScrollSource[0]=null,500)}postConstruct(){this.enableRtl=this.gos.get("enableRtl"),this.addManagedListener(this.eventService,dt.EVENT_DISPLAYED_COLUMNS_WIDTH_CHANGED,this.onDisplayedColumnsWidthChanged.bind(this)),this.ctrlsService.whenReady(e=>{this.centerRowsCtrl=e.center,this.onDisplayedColumnsWidthChanged(),this.addScrollListener()})}addScrollListener(){const{fakeHScrollComp:e,fakeVScrollComp:t}=this.ctrlsService.getParams();this.addManagedListener(this.centerRowsCtrl.getViewportElement(),"scroll",this.onHScroll.bind(this)),e.onScrollCallback(this.onFakeHScroll.bind(this));const i=this.gos.get("debounceVerticalScrollbar"),n=i?ee(this.onVScroll.bind(this),100):this.onVScroll.bind(this),s=i?ee(this.onFakeVScroll.bind(this),100):this.onFakeVScroll.bind(this);this.addManagedListener(this.eBodyViewport,"scroll",n),t.onScrollCallback(s)}onDisplayedColumnsWidthChanged(){this.enableRtl&&this.horizontallyScrollHeaderCenterAndFloatingCenter()}horizontallyScrollHeaderCenterAndFloatingCenter(e){if(null==this.centerRowsCtrl)return;void 0===e&&(e=this.centerRowsCtrl.getCenterViewportScrollLeft());const t=this.enableRtl?e:-e,{topCenter:i,stickyTopCenter:n,stickyBottomCenter:s,centerHeader:r,bottomCenter:o,fakeHScrollComp:a}=this.ctrlsService.getParams();r.setHorizontalScroll(-t),o.setContainerTranslateX(t),i.setContainerTranslateX(t),n.setContainerTranslateX(t),s.setContainerTranslateX(t);const l=this.centerRowsCtrl.getViewportElement(),c=0===this.lastScrollSource[1];e=Math.abs(e),c?a.setScrollPosition(e):Sn(l,e,this.enableRtl)}isControllingScroll(e,t){return null==this.lastScrollSource[t]?(this.lastScrollSource[t]=e,!0):this.lastScrollSource[t]===e}onFakeHScroll(){this.isControllingScroll(1,1)&&this.onHScrollCommon(1)}onHScroll(){this.isControllingScroll(0,1)&&this.onHScrollCommon(0)}onHScrollCommon(e){const t=this.centerRowsCtrl.getViewportElement(),{scrollLeft:i}=t;if(this.shouldBlockScrollUpdate(1,i,!0))return;let n;n=0===e?bn(t,this.enableRtl):this.ctrlsService.get("fakeHScrollComp").getScrollPosition(),this.doHorizontalScroll(Math.round(n)),this.resetLastHScrollDebounced()}onFakeVScroll(){this.isControllingScroll(1,0)&&this.onVScrollCommon(1)}onVScroll(){this.isControllingScroll(0,0)&&this.onVScrollCommon(0)}onVScrollCommon(e){let t;t=0===e?this.eBodyViewport.scrollTop:this.ctrlsService.get("fakeVScrollComp").getScrollPosition(),this.shouldBlockScrollUpdate(0,t,!0)||(this.animationFrameService.setScrollTop(t),this.nextScrollTop=t,0===e?this.ctrlsService.get("fakeVScrollComp").setScrollPosition(t):this.eBodyViewport.scrollTop=t,this.gos.get("suppressAnimationFrame")?this.scrollGridIfNeeded():this.animationFrameService.schedule(),this.resetLastVScrollDebounced())}doHorizontalScroll(e){const t=this.ctrlsService.get("fakeHScrollComp").getScrollPosition();this.scrollLeft===e&&e===t||(this.scrollLeft=e,this.fireScrollEvent(1),this.horizontallyScrollHeaderCenterAndFloatingCenter(e),this.centerRowsCtrl.onHorizontalViewportChanged(!0))}fireScrollEvent(e){const t={type:dt.EVENT_BODY_SCROLL,direction:1===e?"horizontal":"vertical",left:this.scrollLeft,top:this.scrollTop};this.eventService.dispatchEvent(t),window.clearTimeout(this.scrollTimer),this.scrollTimer=void 0,this.scrollTimer=window.setTimeout(()=>{const e=g(p({},t),{type:dt.EVENT_BODY_SCROLL_END});this.eventService.dispatchEvent(e)},100)}shouldBlockScrollUpdate(e,t,i=!1){return!(i&&!Ni())&&(0===e?this.shouldBlockVerticalScroll(t):this.shouldBlockHorizontalScroll(t))}shouldBlockVerticalScroll(e){const t=gn(this.eBodyViewport),{scrollHeight:i}=this.eBodyViewport;return e<0||e+t>i}shouldBlockHorizontalScroll(e){const t=this.centerRowsCtrl.getCenterWidth(),{scrollWidth:i}=this.centerRowsCtrl.getViewportElement();if(this.enableRtl&&Cn()){if(e>0)return!0}else if(e<0)return!0;return Math.abs(e)+t>i}redrawRowsAfterScroll(){this.fireScrollEvent(0)}checkScrollLeft(){this.scrollLeft!==this.centerRowsCtrl.getCenterViewportScrollLeft()&&this.onHScrollCommon(0)}scrollGridIfNeeded(){const e=this.scrollTop!=this.nextScrollTop;return e&&(this.scrollTop=this.nextScrollTop,this.redrawRowsAfterScroll()),e}setHorizontalScrollPosition(e,t=!1){const i=this.centerRowsCtrl.getViewportElement().scrollWidth-this.centerRowsCtrl.getCenterWidth();!t&&this.shouldBlockScrollUpdate(1,e)&&(e=this.enableRtl&&Cn()?e>0?0:i:Math.min(Math.max(e,0),i)),Sn(this.centerRowsCtrl.getViewportElement(),Math.abs(e),this.enableRtl),this.doHorizontalScroll(e)}setVerticalScrollPosition(e){this.eBodyViewport.scrollTop=e}getVScrollPosition(){return this.lastScrollTop=this.eBodyViewport.scrollTop,this.lastOffsetHeight=this.eBodyViewport.offsetHeight,{top:this.lastScrollTop,bottom:this.lastScrollTop+this.lastOffsetHeight}}getApproximateVScollPosition(){return this.lastScrollTop>=0&&this.lastOffsetHeight>=0?{top:this.scrollTop,bottom:this.scrollTop+this.lastOffsetHeight}:this.getVScrollPosition()}getHScrollPosition(){return this.centerRowsCtrl.getHScrollPosition()}isHorizontalScrollShowing(){return this.centerRowsCtrl.isHorizontalScrollShowing()}scrollHorizontally(e){const t=this.centerRowsCtrl.getViewportElement().scrollLeft;return this.setHorizontalScrollPosition(t+e),this.centerRowsCtrl.getViewportElement().scrollLeft-t}scrollToTop(){this.eBodyViewport.scrollTop=0}ensureNodeVisible(e,t=null){const i=this.rowModel.getRowCount();let n=-1;for(let t=0;t<i;t++){const i=this.rowModel.getRow(t);if("function"==typeof e){if(i&&e(i)){n=t;break}}else if(e===i||e===i.data){n=t;break}}n>=0&&this.ensureIndexVisible(n,t)}ensureIndexVisible(e,t){if(this.gos.isDomLayout("print"))return;const i=this.paginationProxy.getRowCount();if("number"!=typeof e||e<0||e>=i)return void console.warn("AG Grid: Invalid row index for ensureIndexVisible: "+e);const n=this.gos.get("pagination")&&!this.gos.get("suppressPaginationPanel");this.getFrameworkOverrides().wrapIncoming(()=>{n||this.paginationProxy.goToPageWithIndex(e);const i=this.ctrlsService.getGridBodyCtrl(),s=i.getStickyTopHeight(),r=i.getStickyBottomHeight(),o=this.paginationProxy.getRow(e);let a;do{const e=o.rowTop,i=o.rowHeight,n=this.paginationProxy.getPixelOffset(),l=o.rowTop-n,c=l+o.rowHeight,h=this.getVScrollPosition(),d=this.heightScaler.getDivStretchOffset(),u=h.top+d,p=h.bottom+d,g=p-u,f=this.heightScaler.getScrollPositionForPixel(l),m=this.heightScaler.getScrollPositionForPixel(c-g),v=Math.min((f+m)/2,l);let y=null;"top"===t?y=f:"bottom"===t?y=m:"middle"===t?y=v:u+s>l?y=f-s:p-r<c&&(y=m+r),null!==y&&(this.setVerticalScrollPosition(y),this.rowRenderer.redraw({afterScroll:!0})),a=e!==o.rowTop||i!==o.rowHeight}while(a);this.animationFrameService.flushAllFrames()})}ensureColumnVisible(e,t="auto"){const i=this.columnModel.getGridColumn(e);if(!i)return;if(i.isPinned())return;if(!this.columnModel.isColumnDisplayed(i))return;const n=this.getPositionedHorizontalScroll(i,t);this.getFrameworkOverrides().wrapIncoming(()=>{null!==n&&this.centerRowsCtrl.setCenterViewportScrollLeft(n),this.centerRowsCtrl.onHorizontalViewportChanged(),this.animationFrameService.flushAllFrames()})}setScrollPosition(e,t){this.getFrameworkOverrides().wrapIncoming(()=>{this.centerRowsCtrl.setCenterViewportScrollLeft(t),this.setVerticalScrollPosition(e),this.rowRenderer.redraw({afterScroll:!0}),this.animationFrameService.flushAllFrames()})}getPositionedHorizontalScroll(e,t){const{columnBeforeStart:i,columnAfterEnd:n}=this.isColumnOutsideViewport(e),s=this.centerRowsCtrl.getCenterWidth()<e.getActualWidth(),r=this.centerRowsCtrl.getCenterWidth(),o=this.enableRtl;let a=(o?i:n)||s,l=o?n:i;"auto"!==t&&(a="start"===t,l="end"===t);const c="middle"===t;if(a||l||c){const{colLeft:t,colMiddle:i,colRight:n}=this.getColumnBounds(e);return c?i-r/2:a?o?n:t:o?t-r:n-r}return null}isColumnOutsideViewport(e){const{start:t,end:i}=this.getViewportBounds(),{colLeft:n,colRight:s}=this.getColumnBounds(e),r=this.enableRtl;return{columnBeforeStart:r?t>s:i<s,columnAfterEnd:r?i<n:t>n}}getColumnBounds(e){const t=this.enableRtl,i=this.columnModel.getBodyContainerWidth(),n=e.getActualWidth(),s=e.getLeft(),r=t?-1:1,o=t?i-s:s;return{colLeft:o,colMiddle:o+n/2*r,colRight:o+n*r}}getViewportBounds(){const e=this.centerRowsCtrl.getCenterWidth(),t=this.centerRowsCtrl.getCenterViewportScrollLeft();return{start:t,end:e+t,width:e}}};m([pe("ctrlsService")],ea.prototype,"ctrlsService",2),m([pe("animationFrameService")],ea.prototype,"animationFrameService",2),m([pe("paginationProxy")],ea.prototype,"paginationProxy",2),m([pe("rowModel")],ea.prototype,"rowModel",2),m([pe("rowContainerHeightService")],ea.prototype,"heightScaler",2),m([pe("rowRenderer")],ea.prototype,"rowRenderer",2),m([pe("columnModel")],ea.prototype,"columnModel",2),m([he],ea.prototype,"postConstruct",1);var ta=(e=>(e.ANIMATION_ON="ag-row-animation",e.ANIMATION_OFF="ag-row-no-animation",e))(ta||{}),ia="ag-force-vertical-scroll",na=class extends ot{constructor(){super(...arguments),this.stickyTopHeight=0,this.stickyBottomHeight=0}getScrollFeature(){return this.bodyScrollFeature}getBodyViewportElement(){return this.eBodyViewport}setComp(e,t,i,n,s,r,o){this.comp=e,this.eGridBody=t,this.eBodyViewport=i,this.eTop=n,this.eBottom=s,this.eStickyTop=r,this.eStickyBottom=o,this.setCellTextSelection(this.gos.get("enableCellTextSelection")),this.addManagedPropertyListener("enableCellTextSelection",e=>this.setCellTextSelection(e.currentValue)),this.createManagedBean(new Jo(this.comp)),this.bodyScrollFeature=this.createManagedBean(new ea(this.eBodyViewport)),this.addRowDragListener(),this.setupRowAnimationCssClass(),this.addEventListeners(),this.addFocusListeners([n,i,s,r,o]),this.onGridColumnsChanged(),this.addBodyViewportListener(),this.setFloatingHeights(),this.disableBrowserDragging(),this.addStopEditingWhenGridLosesFocus(),this.filterManager.setupAdvancedFilterHeaderComp(n),this.ctrlsService.register("gridBodyCtrl",this)}getComp(){return this.comp}addEventListeners(){this.addManagedListener(this.eventService,dt.EVENT_GRID_COLUMNS_CHANGED,this.onGridColumnsChanged.bind(this)),this.addManagedListener(this.eventService,dt.EVENT_SCROLL_VISIBILITY_CHANGED,this.onScrollVisibilityChanged.bind(this)),this.addManagedListener(this.eventService,dt.EVENT_PINNED_ROW_DATA_CHANGED,this.onPinnedRowDataChanged.bind(this)),this.addManagedListener(this.eventService,dt.EVENT_HEADER_HEIGHT_CHANGED,this.onHeaderHeightChanged.bind(this))}addFocusListeners(e){e.forEach(e=>{this.addManagedListener(e,"focusin",t=>{const{target:i}=t,n=un(i,"ag-root",e);e.classList.toggle("ag-has-focus",!n)}),this.addManagedListener(e,"focusout",t=>{const{target:i,relatedTarget:n}=t,s=e.contains(n),r=un(n,"ag-root",e);un(i,"ag-root",e)||s&&!r||e.classList.remove("ag-has-focus")})})}setColumnMovingCss(e){this.comp.setColumnMovingCss("ag-column-moving",e)}setCellTextSelection(e=!1){this.comp.setCellSelectableCss("ag-selectable",e)}onScrollVisibilityChanged(){const e=this.scrollVisibleService.isVerticalScrollShowing();this.setVerticalScrollPaddingVisible(e),this.setStickyWidth(e),this.setStickyBottomOffsetBottom();const t=`calc(100% + ${(e&&this.gos.getScrollbarWidth()||0)+(zi()?16:0)}px)`;this.animationFrameService.requestAnimationFrame(()=>this.comp.setBodyViewportWidth(t))}onGridColumnsChanged(){const e=this.columnModel.getAllGridColumns();this.comp.setColumnCount(e.length)}disableBrowserDragging(){this.addManagedListener(this.eGridBody,"dragstart",e=>{if(e.target instanceof HTMLImageElement)return e.preventDefault(),!1})}addStopEditingWhenGridLosesFocus(){if(!this.gos.get("stopEditingWhenCellsLoseFocus"))return;const e=e=>{const i=e.relatedTarget;if(null===_i(i))return void this.rowRenderer.stopEditing();let n=t.some(e=>e.contains(i))&&this.mouseEventService.isElementInThisGrid(i);if(!n){const e=this.popupService;n=e.getActivePopups().some(e=>e.contains(i))||e.isElementWithinCustomPopup(i)}n||this.rowRenderer.stopEditing()},t=[this.eBodyViewport,this.eBottom,this.eTop,this.eStickyTop,this.eStickyBottom];t.forEach(t=>this.addManagedListener(t,"focusout",e))}updateRowCount(){const e=this.headerNavigationService.getHeaderRowCount()+this.filterManager.getHeaderRowCount(),t=this.rowModel.isLastRowIndexKnown()?this.rowModel.getRowCount():-1,i=-1===t?-1:e+t;this.comp.setRowCount(i)}registerBodyViewportResizeListener(e){this.comp.registerBodyViewportResizeListener(e)}setVerticalScrollPaddingVisible(e){const t=e?"scroll":"hidden";this.comp.setPinnedTopBottomOverflowY(t)}isVerticalScrollShowing(){const e=this.gos.get("alwaysShowVerticalScroll"),t=e?ia:null,i=this.gos.isDomLayout("normal");return this.comp.setAlwaysVerticalScrollClass(t,e),e||i&&kn(this.eBodyViewport)}setupRowAnimationCssClass(){const e=()=>{const e=this.gos.isAnimateRows()&&!this.rowContainerHeightService.isStretching(),t=e?"ag-row-animation":"ag-row-no-animation";this.comp.setRowAnimationCssOnBodyViewport(t,e)};e(),this.addManagedListener(this.eventService,dt.EVENT_HEIGHT_SCALE_CHANGED,e),this.addManagedPropertyListener("animateRows",e)}getGridBodyElement(){return this.eGridBody}addBodyViewportListener(){const e=this.onBodyViewportContextMenu.bind(this);this.addManagedListener(this.eBodyViewport,"contextmenu",e),this.mockContextMenuForIPad(e),this.addManagedListener(this.eBodyViewport,"wheel",this.onBodyViewportWheel.bind(this)),this.addManagedListener(this.eStickyTop,"wheel",this.onStickyWheel.bind(this)),this.addManagedListener(this.eStickyBottom,"wheel",this.onStickyWheel.bind(this)),this.addFullWidthContainerWheelListener()}addFullWidthContainerWheelListener(){const e=this.eBodyViewport.querySelector(".ag-full-width-container"),t=this.eBodyViewport.querySelector(".ag-center-cols-viewport");e&&t&&this.addManagedListener(e,"wheel",e=>this.onFullWidthContainerWheel(e,t))}onFullWidthContainerWheel(e,t){!e.deltaX||Math.abs(e.deltaY)>Math.abs(e.deltaX)||!this.mouseEventService.isEventFromThisGrid(e)||(e.preventDefault(),t.scrollBy({left:e.deltaX}))}onBodyViewportContextMenu(e,t,i){if(!e&&!i)return;this.gos.get("preventDefaultOnContextMenu")&&(e||i).preventDefault();const{target:n}=e||t;n!==this.eBodyViewport&&n!==this.ctrlsService.get("center").getViewportElement()||this.menuService.showContextMenu({mouseEvent:e,touchEvent:i,value:null,anchorToElement:this.eGridBody})}mockContextMenuForIPad(e){if(!Ni())return;const t=new Cr(this.eBodyViewport);this.addManagedListener(t,Cr.EVENT_LONG_TAP,t=>{e(void 0,t.touchStart,t.touchEvent)}),this.addDestroyFunc(()=>t.destroy())}onBodyViewportWheel(e){this.gos.get("suppressScrollWhenPopupsAreOpen")&&this.popupService.hasAnchoredPopup()&&e.preventDefault()}onStickyWheel(e){e.preventDefault(),e.offsetY&&this.scrollVertically(e.deltaY)}getGui(){return this.eGridBody}scrollVertically(e){const t=this.eBodyViewport.scrollTop;return this.bodyScrollFeature.setVerticalScrollPosition(t+e),this.eBodyViewport.scrollTop-t}addRowDragListener(){this.rowDragFeature=this.createManagedBean(new Bo(this.eBodyViewport)),this.dragAndDropService.addDropTarget(this.rowDragFeature)}getRowDragFeature(){return this.rowDragFeature}onPinnedRowDataChanged(){this.setFloatingHeights()}setFloatingHeights(){const{pinnedRowModel:e}=this;let t=e.getPinnedTopTotalHeight(),i=e.getPinnedBottomTotalHeight();this.comp.setTopHeight(t),this.comp.setBottomHeight(i),this.comp.setTopDisplay(t?"inherit":"none"),this.comp.setBottomDisplay(i?"inherit":"none"),this.setStickyTopOffsetTop(),this.setStickyBottomOffsetBottom()}setStickyTopHeight(e=0){this.comp.setStickyTopHeight(`${e}px`),this.stickyTopHeight=e}getStickyTopHeight(){return this.stickyTopHeight}setStickyBottomHeight(e=0){this.comp.setStickyBottomHeight(`${e}px`),this.stickyBottomHeight=e}getStickyBottomHeight(){return this.stickyBottomHeight}setStickyWidth(e){if(e){const e=this.gos.getScrollbarWidth();this.comp.setStickyTopWidth(`calc(100% - ${e}px)`),this.comp.setStickyBottomWidth(`calc(100% - ${e}px)`)}else this.comp.setStickyTopWidth("100%"),this.comp.setStickyBottomWidth("100%")}onHeaderHeightChanged(){this.setStickyTopOffsetTop()}setStickyTopOffsetTop(){const e=this.ctrlsService.get("gridHeaderCtrl").getHeaderHeight()+this.filterManager.getHeaderHeight(),t=this.pinnedRowModel.getPinnedTopTotalHeight();let i=0;e>0&&(i+=e),t>0&&(i+=t),i>0&&(i+=1),this.comp.setStickyTopTop(`${i}px`)}setStickyBottomOffsetBottom(){const e=this.pinnedRowModel.getPinnedBottomTotalHeight()+(this.scrollVisibleService.isHorizontalScrollShowing()&&this.gos.getScrollbarWidth()||0);this.comp.setStickyBottomBottom(`${e}px`)}sizeColumnsToFit(e,t){const i=this.isVerticalScrollShowing()?this.gos.getScrollbarWidth():0,n=fn(this.eGridBody)-i;n>0?this.columnModel.sizeColumnsToFit(n,"sizeColumnsToFit",!1,e):void 0===t?window.setTimeout(()=>{this.sizeColumnsToFit(e,100)},0):100===t?window.setTimeout(()=>{this.sizeColumnsToFit(e,500)},100):500===t?window.setTimeout(()=>{this.sizeColumnsToFit(e,-1)},500):console.warn("AG Grid: tried to call sizeColumnsToFit() but the grid is coming back with zero width, maybe the grid is not visible yet on the screen?")}addScrollEventListener(e){this.eBodyViewport.addEventListener("scroll",e,{passive:!0})}removeScrollEventListener(e){this.eBodyViewport.removeEventListener("scroll",e)}};m([pe("animationFrameService")],na.prototype,"animationFrameService",2),m([pe("rowContainerHeightService")],na.prototype,"rowContainerHeightService",2),m([pe("ctrlsService")],na.prototype,"ctrlsService",2),m([pe("columnModel")],na.prototype,"columnModel",2),m([pe("scrollVisibleService")],na.prototype,"scrollVisibleService",2),m([pe("menuService")],na.prototype,"menuService",2),m([pe("headerNavigationService")],na.prototype,"headerNavigationService",2),m([pe("dragAndDropService")],na.prototype,"dragAndDropService",2),m([pe("pinnedRowModel")],na.prototype,"pinnedRowModel",2),m([pe("rowRenderer")],na.prototype,"rowRenderer",2),m([pe("popupService")],na.prototype,"popupService",2),m([pe("mouseEventService")],na.prototype,"mouseEventService",2),m([pe("rowModel")],na.prototype,"rowModel",2),m([pe("filterManager")],na.prototype,"filterManager",2);var sa=(e=>(e[e.FILL=0]="FILL",e[e.RANGE=1]="RANGE",e))(sa||{}),ra=(e=>(e[e.VALUE=0]="VALUE",e[e.DIMENSION=1]="DIMENSION",e))(ra||{}),oa="ag-cell-range-selected",aa=class{constructor(e,t){this.beans=e,this.rangeService=e.rangeService,this.selectionHandleFactory=e.selectionHandleFactory,this.cellCtrl=t}setComp(e,t){this.cellComp=e,this.eGui=t,this.onRangeSelectionChanged()}onRangeSelectionChanged(){this.cellComp&&(this.rangeCount=this.rangeService.getCellRangeCount(this.cellCtrl.getCellPosition()),this.hasChartRange=this.getHasChartRange(),this.cellComp.addOrRemoveCssClass(oa,0!==this.rangeCount),this.cellComp.addOrRemoveCssClass(`${oa}-1`,1===this.rangeCount),this.cellComp.addOrRemoveCssClass(`${oa}-2`,2===this.rangeCount),this.cellComp.addOrRemoveCssClass(`${oa}-3`,3===this.rangeCount),this.cellComp.addOrRemoveCssClass(`${oa}-4`,this.rangeCount>=4),this.cellComp.addOrRemoveCssClass("ag-cell-range-chart",this.hasChartRange),mi(this.eGui,this.rangeCount>0||void 0),this.cellComp.addOrRemoveCssClass("ag-cell-range-single-cell",this.isSingleCell()),this.updateRangeBorders(),this.refreshHandle())}updateRangeBorders(){const e=this.getRangeBorders(),t=this.isSingleCell(),i=!t&&e.top,n=!t&&e.right,s=!t&&e.bottom,r=!t&&e.left;this.cellComp.addOrRemoveCssClass("ag-cell-range-top",i),this.cellComp.addOrRemoveCssClass("ag-cell-range-right",n),this.cellComp.addOrRemoveCssClass("ag-cell-range-bottom",s),this.cellComp.addOrRemoveCssClass("ag-cell-range-left",r)}isSingleCell(){const{rangeService:e}=this.beans;return 1===this.rangeCount&&!!e&&!e.isMoreThanOneCell()}getHasChartRange(){const{rangeService:e}=this.beans;if(!this.rangeCount||!e)return!1;const t=e.getCellRanges();return t.length>0&&t.every(e=>Ue([1,0],e.type))}updateRangeBordersIfRangeCount(){this.rangeCount>0&&(this.updateRangeBorders(),this.refreshHandle())}getRangeBorders(){const e=this.beans.gos.get("enableRtl");let t=!1,i=!1,n=!1,s=!1;const r=this.cellCtrl.getCellPosition().column,o=this.beans.columnModel;let a,l;e?(a=o.getDisplayedColAfter(r),l=o.getDisplayedColBefore(r)):(a=o.getDisplayedColBefore(r),l=o.getDisplayedColAfter(r));const c=this.rangeService.getCellRanges().filter(e=>this.rangeService.isCellInSpecificRange(this.cellCtrl.getCellPosition(),e));a||(s=!0),l||(i=!0);for(let e=0;e<c.length&&!(t&&i&&n&&s);e++){const r=c[e],o=this.rangeService.getRangeStartRow(r),h=this.rangeService.getRangeEndRow(r);!t&&this.beans.rowPositionUtils.sameRow(o,this.cellCtrl.getCellPosition())&&(t=!0),!n&&this.beans.rowPositionUtils.sameRow(h,this.cellCtrl.getCellPosition())&&(n=!0),!s&&a&&r.columns.indexOf(a)<0&&(s=!0),!i&&l&&r.columns.indexOf(l)<0&&(i=!0)}return{top:t,right:i,bottom:n,left:s}}refreshHandle(){if(this.beans.context.isDestroyed())return;const e=this.shouldHaveSelectionHandle();this.selectionHandle&&!e&&(this.selectionHandle=this.beans.context.destroyBean(this.selectionHandle)),e&&this.addSelectionHandle(),this.cellComp.addOrRemoveCssClass("ag-cell-range-handle",!!this.selectionHandle)}shouldHaveSelectionHandle(){const e=this.beans.gos,t=this.rangeService.getCellRanges(),i=t.length;if(this.rangeCount<1||i<1)return!1;const n=Le(t),s=this.cellCtrl.getCellPosition(),r=e.get("enableFillHandle")&&!this.cellCtrl.isSuppressFillHandle(),o=e.get("enableRangeHandle");let a=1===i&&!this.cellCtrl.isEditing()&&(r||o);if(this.hasChartRange){const e=1===t[0].type&&this.rangeService.isCellInSpecificRange(s,t[0]);this.cellComp.addOrRemoveCssClass("ag-cell-range-chart-category",e),a=0===n.type}return a&&null!=n.endRow&&this.rangeService.isContiguousRange(n)&&this.rangeService.isBottomRightCell(n,s)}addSelectionHandle(){const e=this.beans.gos,t=Le(this.rangeService.getCellRanges()).type,i=e.get("enableFillHandle")&&w(t)?0:1;this.selectionHandle&&this.selectionHandle.getType()!==i&&(this.selectionHandle=this.beans.context.destroyBean(this.selectionHandle)),this.selectionHandle||(this.selectionHandle=this.selectionHandleFactory.createSelectionHandle(i)),this.selectionHandle.refresh(this.cellCtrl)}destroy(){this.beans.context.destroyBean(this.selectionHandle)}},la=class extends ot{constructor(e,t){super(),this.cellCtrl=e,this.beans=t,this.column=e.getColumn(),this.rowNode=e.getRowNode()}setupRowSpan(){this.rowSpan=this.column.getRowSpan(this.rowNode),this.addManagedListener(this.beans.eventService,dt.EVENT_NEW_COLUMNS_LOADED,()=>this.onNewColumnsLoaded())}setComp(e){this.eGui=e,this.setupColSpan(),this.setupRowSpan(),this.onLeftChanged(),this.onWidthChanged(),this.applyRowSpan()}onNewColumnsLoaded(){const e=this.column.getRowSpan(this.rowNode);this.rowSpan!==e&&(this.rowSpan=e,this.applyRowSpan(!0))}onDisplayColumnsChanged(){const e=this.getColSpanningList();ke(this.colsSpanning,e)||(this.colsSpanning=e,this.onWidthChanged(),this.onLeftChanged())}setupColSpan(){null!=this.column.getColDef().colSpan&&(this.colsSpanning=this.getColSpanningList(),this.addManagedListener(this.beans.eventService,dt.EVENT_DISPLAYED_COLUMNS_CHANGED,this.onDisplayColumnsChanged.bind(this)),this.addManagedListener(this.beans.eventService,dt.EVENT_DISPLAYED_COLUMNS_WIDTH_CHANGED,this.onWidthChanged.bind(this)))}onWidthChanged(){if(!this.eGui)return;const e=this.getCellWidth();this.eGui.style.width=`${e}px`}getCellWidth(){return this.colsSpanning?this.colsSpanning.reduce((e,t)=>e+t.getActualWidth(),0):this.column.getActualWidth()}getColSpanningList(){const e=this.column.getColSpan(this.rowNode),t=[];if(1===e)t.push(this.column);else{let i=this.column;const n=this.column.getPinned();for(let s=0;i&&s<e&&(t.push(i),i=this.beans.columnModel.getDisplayedColAfter(i),i&&!w(i))&&n===i.getPinned();s++);}return t}onLeftChanged(){if(!this.eGui)return;const e=this.modifyLeftForPrintLayout(this.getCellLeft());this.eGui.style.left=e+"px"}getCellLeft(){let e;return e=this.beans.gos.get("enableRtl")&&this.colsSpanning?Le(this.colsSpanning):this.column,e.getLeft()}modifyLeftForPrintLayout(e){if(!this.cellCtrl.isPrintLayout()||"left"===this.column.getPinned())return e;const t=this.beans.columnModel.getDisplayedColumnsLeftWidth();return"right"===this.column.getPinned()?t+this.beans.columnModel.getBodyContainerWidth()+(e||0):t+(e||0)}applyRowSpan(e){if(1===this.rowSpan&&!e)return;const t=this.beans.gos.getRowHeightAsNumber()*this.rowSpan;this.eGui.style.height=`${t}px`,this.eGui.style.zIndex="1"}destroy(){super.destroy()}},ca=class extends ot{constructor(e,t){super(),this.staticClasses=[],this.cellCtrl=e,this.beans=t,this.column=e.getColumn(),this.rowNode=e.getRowNode()}setComp(e){this.cellComp=e,this.applyUserStyles(),this.applyCellClassRules(),this.applyClassesFromColDef()}applyCellClassRules(){const e=this.column.getColDef(),{cellClassRules:t}=e,i=this.beans.gos.addGridCommonParams({value:this.cellCtrl.getValue(),data:this.rowNode.data,node:this.rowNode,colDef:e,column:this.column,rowIndex:this.rowNode.rowIndex});this.beans.stylingService.processClassRules(t===this.cellClassRules?void 0:this.cellClassRules,t,i,e=>this.cellComp.addOrRemoveCssClass(e,!0),e=>this.cellComp.addOrRemoveCssClass(e,!1)),this.cellClassRules=t}applyUserStyles(){const e=this.column.getColDef();if(!e.cellStyle)return;let t;if("function"==typeof e.cellStyle){const i=this.beans.gos.addGridCommonParams({column:this.column,value:this.cellCtrl.getValue(),colDef:e,data:this.rowNode.data,node:this.rowNode,rowIndex:this.rowNode.rowIndex});t=(0,e.cellStyle)(i)}else t=e.cellStyle;t&&this.cellComp.setUserStyles(t)}applyClassesFromColDef(){const e=this.column.getColDef(),t=this.beans.gos.addGridCommonParams({value:this.cellCtrl.getValue(),data:this.rowNode.data,node:this.rowNode,column:this.column,colDef:e,rowIndex:this.rowNode.rowIndex});this.staticClasses.length&&this.staticClasses.forEach(e=>this.cellComp.addOrRemoveCssClass(e,!1)),this.staticClasses=this.beans.stylingService.getStaticCellClasses(e,t),this.staticClasses.length&&this.staticClasses.forEach(e=>this.cellComp.addOrRemoveCssClass(e,!0))}destroy(){super.destroy()}},ha=class{postConstruct(){this.gos.isRowModelType("clientSide")&&(this.clientSideRowModel=this.rowModel),this.gos.isRowModelType("serverSide")&&(this.serverSideRowModel=this.rowModel)}};m([pe("resizeObserverService")],ha.prototype,"resizeObserverService",2),m([pe("paginationProxy")],ha.prototype,"paginationProxy",2),m([pe("context")],ha.prototype,"context",2),m([pe("gridOptionsService")],ha.prototype,"gos",2),m([pe("environment")],ha.prototype,"environment",2),m([pe("rowRenderer")],ha.prototype,"rowRenderer",2),m([pe("valueService")],ha.prototype,"valueService",2),m([pe("eventService")],ha.prototype,"eventService",2),m([pe("columnModel")],ha.prototype,"columnModel",2),m([pe("headerNavigationService")],ha.prototype,"headerNavigationService",2),m([pe("navigationService")],ha.prototype,"navigationService",2),m([pe("columnAnimationService")],ha.prototype,"columnAnimationService",2),m([pe("focusService")],ha.prototype,"focusService",2),m([pe("popupService")],ha.prototype,"popupService",2),m([pe("stylingService")],ha.prototype,"stylingService",2),m([pe("columnHoverService")],ha.prototype,"columnHoverService",2),m([pe("userComponentFactory")],ha.prototype,"userComponentFactory",2),m([pe("userComponentRegistry")],ha.prototype,"userComponentRegistry",2),m([pe("animationFrameService")],ha.prototype,"animationFrameService",2),m([pe("dragService")],ha.prototype,"dragService",2),m([pe("dragAndDropService")],ha.prototype,"dragAndDropService",2),m([pe("sortController")],ha.prototype,"sortController",2),m([pe("filterManager")],ha.prototype,"filterManager",2),m([pe("rowContainerHeightService")],ha.prototype,"rowContainerHeightService",2),m([pe("frameworkOverrides")],ha.prototype,"frameworkOverrides",2),m([pe("cellPositionUtils")],ha.prototype,"cellPositionUtils",2),m([pe("rowPositionUtils")],ha.prototype,"rowPositionUtils",2),m([pe("selectionService")],ha.prototype,"selectionService",2),m([pe("rowCssClassCalculator")],ha.prototype,"rowCssClassCalculator",2),m([pe("rowModel")],ha.prototype,"rowModel",2),m([pe("ctrlsService")],ha.prototype,"ctrlsService",2),m([pe("ctrlsFactory")],ha.prototype,"ctrlsFactory",2),m([pe("agStackComponentsRegistry")],ha.prototype,"agStackComponentsRegistry",2),m([pe("valueCache")],ha.prototype,"valueCache",2),m([pe("rowNodeEventThrottle")],ha.prototype,"rowNodeEventThrottle",2),m([pe("localeService")],ha.prototype,"localeService",2),m([pe("syncService")],ha.prototype,"syncService",2),m([pe("ariaAnnouncementService")],ha.prototype,"ariaAnnouncementService",2),m([ge("rangeService")],ha.prototype,"rangeService",2),m([ge("selectionHandleFactory")],ha.prototype,"selectionHandleFactory",2),m([he],ha.prototype,"postConstruct",1),ha=m([ue("beans")],ha);var da=class extends ha{constructor(e,t,i){super(),this.cellCtrl=e,this.beans=t,this.column=i}onMouseEvent(e,t){if(!Qe(t))switch(e){case"click":this.onCellClicked(t);break;case"mousedown":case"touchstart":this.onMouseDown(t);break;case"dblclick":this.onCellDoubleClicked(t);break;case"mouseout":this.onMouseOut(t);break;case"mouseover":this.onMouseOver(t)}}onCellClicked(e){if(this.isDoubleClickOnIPad())return this.onCellDoubleClicked(e),void e.preventDefault();const{eventService:t,rangeService:i,gos:n}=this.beans,s=e.ctrlKey||e.metaKey;i&&s&&i.getCellRangeCount(this.cellCtrl.getCellPosition())>1&&i.intersectLastRange(!0);const r=this.cellCtrl.createEvent(e,dt.EVENT_CELL_CLICKED);t.dispatchEvent(r);const o=this.column.getColDef();o.onCellClicked&&window.setTimeout(()=>{this.beans.frameworkOverrides.wrapOutgoing(()=>{o.onCellClicked(r)})},0),!n.get("singleClickEdit")&&!o.singleClickEdit||n.get("suppressClickEdit")||e.shiftKey&&0!=(null==i?void 0:i.getCellRanges().length)||this.cellCtrl.startRowOrCellEdit()}isDoubleClickOnIPad(){if(!Ni()||Je("dblclick"))return!1;const e=(new Date).getTime(),t=e-this.lastIPadMouseClickEvent<200;return this.lastIPadMouseClickEvent=e,t}onCellDoubleClicked(e){const t=this.column.getColDef(),i=this.cellCtrl.createEvent(e,dt.EVENT_CELL_DOUBLE_CLICKED);this.beans.eventService.dispatchEvent(i),"function"==typeof t.onCellDoubleClicked&&window.setTimeout(()=>{this.beans.frameworkOverrides.wrapOutgoing(()=>{t.onCellDoubleClicked(i)})},0),!this.beans.gos.get("singleClickEdit")&&!this.beans.gos.get("suppressClickEdit")&&this.cellCtrl.startRowOrCellEdit(null,e)}onMouseDown(e){const{ctrlKey:t,metaKey:i,shiftKey:n}=e,s=e.target,{cellCtrl:r,beans:o}=this,{eventService:a,rangeService:l,focusService:c}=o;if(this.isRightClickInExistingRange(e))return;const h=l&&0!=l.getCellRanges().length;if(!n||!h){const e=Ii()&&!r.isEditing()&&!ln(s);r.focusCell(e)}if(n&&h&&!c.isCellFocused(r.getCellPosition())){e.preventDefault();const t=c.getFocusedCell();if(t){const{column:e,rowIndex:i,rowPinned:n}=t,s=o.rowRenderer.getRowByPosition({rowIndex:i,rowPinned:n}),r=null==s?void 0:s.getCellCtrl(e);(null==r?void 0:r.isEditing())&&r.stopEditing(),c.setFocusedCell({column:e,rowIndex:i,rowPinned:n,forceBrowserFocus:!0,preventScrollOnBrowserFocus:!0})}}if(!this.containsWidget(s)){if(l){const e=this.cellCtrl.getCellPosition();if(n)l.extendLatestRangeToCell(e);else{const n=t||i;l.setRangeToCell(e,n)}}a.dispatchEvent(this.cellCtrl.createEvent(e,dt.EVENT_CELL_MOUSE_DOWN))}}isRightClickInExistingRange(e){const{rangeService:t}=this.beans;if(t){const i=t.isCellInAnyRange(this.cellCtrl.getCellPosition()),n=2===e.button||e.ctrlKey&&this.beans.gos.get("allowContextMenuWithControlKey");if(i&&n)return!0}return!1}containsWidget(e){return un(e,"ag-selection-checkbox",3)}onMouseOut(e){if(this.mouseStayingInsideCell(e))return;const t=this.cellCtrl.createEvent(e,dt.EVENT_CELL_MOUSE_OUT);this.beans.eventService.dispatchEvent(t),this.beans.columnHoverService.clearMouseOver()}onMouseOver(e){if(this.mouseStayingInsideCell(e))return;const t=this.cellCtrl.createEvent(e,dt.EVENT_CELL_MOUSE_OVER);this.beans.eventService.dispatchEvent(t),this.beans.columnHoverService.setMouseOver([this.column])}mouseStayingInsideCell(e){if(!e.target||!e.relatedTarget)return!1;const t=this.cellCtrl.getGui(),i=t.contains(e.target),n=t.contains(e.relatedTarget);return i&&n}destroy(){}},ua=class extends ot{constructor(e,t,i,n,s){super(),this.cellCtrl=e,this.beans=t,this.rowNode=n,this.rowCtrl=s}setComp(e){this.eGui=e}onKeyDown(e){const t=e.key;switch(t){case Jn.ENTER:this.onEnterKeyDown(e);break;case Jn.F2:this.onF2KeyDown(e);break;case Jn.ESCAPE:this.onEscapeKeyDown(e);break;case Jn.TAB:this.onTabKeyDown(e);break;case Jn.BACKSPACE:case Jn.DELETE:this.onBackspaceOrDeleteKeyDown(t,e);break;case Jn.DOWN:case Jn.UP:case Jn.RIGHT:case Jn.LEFT:this.onNavigationKeyDown(e,t)}}onNavigationKeyDown(e,t){this.cellCtrl.isEditing()||(e.shiftKey&&this.cellCtrl.isRangeSelectionEnabled()?this.onShiftRangeSelect(e):this.beans.navigationService.navigateToNextCell(e,t,this.cellCtrl.getCellPosition(),!0),e.preventDefault())}onShiftRangeSelect(e){if(!this.beans.rangeService)return;const t=this.beans.rangeService.extendLatestRangeInDirection(e);t&&this.beans.navigationService.ensureCellVisible(t)}onTabKeyDown(e){this.beans.navigationService.onTabKeyDown(this.cellCtrl,e)}onBackspaceOrDeleteKeyDown(e,t){var i;const{cellCtrl:n,beans:s,rowNode:r}=this,{gos:o,rangeService:a,eventService:l}=s;if(!n.isEditing()){if(l.dispatchEvent({type:dt.EVENT_KEY_SHORTCUT_CHANGED_CELL_START}),ss(e,o.get("enableCellEditingOnBackspace"))){if(a&&o.get("enableRangeSelection"))a.clearCellRangeCellValues({dispatchWrapperEvents:!0,wrapperEventSource:"deleteKey"});else if(n.isCellEditable()){const e=n.getColumn(),t=null!=(i=this.beans.valueService.parseValue(e,r,"",r.getValueFromValueService(e)))?i:null;r.setDataValue(e,t,"cellClear")}}else n.startRowOrCellEdit(e,t);l.dispatchEvent({type:dt.EVENT_KEY_SHORTCUT_CHANGED_CELL_END})}}onEnterKeyDown(e){if(this.cellCtrl.isEditing()||this.rowCtrl.isEditing())this.cellCtrl.stopEditingAndFocus(!1,e.shiftKey);else if(this.beans.gos.get("enterNavigatesVertically")){const t=e.shiftKey?Jn.UP:Jn.DOWN;this.beans.navigationService.navigateToNextCell(null,t,this.cellCtrl.getCellPosition(),!1)}else this.cellCtrl.startRowOrCellEdit(Jn.ENTER,e),this.cellCtrl.isEditing()&&e.preventDefault()}onF2KeyDown(e){this.cellCtrl.isEditing()||this.cellCtrl.startRowOrCellEdit(Jn.F2,e)}onEscapeKeyDown(e){this.cellCtrl.isEditing()&&(this.cellCtrl.stopRowOrCellEdit(!0),this.cellCtrl.focusCell(!0))}processCharacter(e){if(e.target!==this.eGui||this.cellCtrl.isEditing())return;const t=e.key;" "===t?this.onSpaceKeyDown(e):(this.cellCtrl.startRowOrCellEdit(t,e),e.preventDefault())}onSpaceKeyDown(e){const{gos:t}=this.beans;if(!this.cellCtrl.isEditing()&&t.isRowSelection()){const i=this.rowNode.isSelected(),n=!i;if(n||!t.get("suppressRowDeselection")){const t=this.beans.gos.get("groupSelectsFiltered"),s=this.rowNode.setSelectedParams({newValue:n,rangeSelect:e.shiftKey,groupSelectsFiltered:t,event:e,source:"spaceKey"});void 0===i&&0===s&&this.rowNode.setSelectedParams({newValue:!1,rangeSelect:e.shiftKey,groupSelectsFiltered:t,event:e,source:"spaceKey"})}}e.preventDefault()}destroy(){super.destroy()}},pa=class extends ws{constructor(e,t,i){super('<div class="ag-drag-handle ag-row-drag" draggable="true"></div>'),this.rowNode=e,this.column=t,this.eCell=i}postConstruct(){this.getGui().appendChild(Zn("rowDrag",this.gos,null)),this.addGuiEventListener("mousedown",e=>{e.stopPropagation()}),this.addDragSource(),this.checkVisibility()}addDragSource(){this.addGuiEventListener("dragstart",this.onDragStart.bind(this))}onDragStart(e){const t=this.column.getColDef().dndSourceOnRowDrag;e.dataTransfer.setDragImage(this.eCell,0,0);t?t(this.gos.addGridCommonParams({rowNode:this.rowNode,dragEvent:e})):(()=>{try{const t=JSON.stringify(this.rowNode.data);e.dataTransfer.setData("application/json",t),e.dataTransfer.setData("text/plain",t)}catch(e){}})()}checkVisibility(){const e=this.column.isDndSource(this.rowNode);this.setDisplayed(e)}};m([he],pa.prototype,"postConstruct",1);var ga=class{static getHeaderClassesFromColDef(e,t,i,n){return w(e)?[]:this.getColumnClassesFromCollDef(e.headerClass,e,t,i,n)}static getToolPanelClassesFromColDef(e,t,i,n){return w(e)?[]:this.getColumnClassesFromCollDef(e.toolPanelClass,e,t,i,n)}static refreshFirstAndLastStyles(e,t,i){e.addOrRemoveCssClass("ag-column-first",i.isColumnAtEdge(t,"first")),e.addOrRemoveCssClass("ag-column-last",i.isColumnAtEdge(t,"last"))}static getClassParams(e,t,i,n){return t.addGridCommonParams({colDef:e,column:i,columnGroup:n})}static getColumnClassesFromCollDef(e,t,i,n,s){if(w(e))return[];let r;return r="function"==typeof e?e(this.getClassParams(t,i,n,s)):e,"string"==typeof r?[r]:Array.isArray(r)?[...r]:[]}},fa=0,ma=class e extends ot{constructor(e,t,i,n){super(),this.cellRangeFeature=null,this.cellPositionFeature=null,this.cellCustomStyleFeature=null,this.tooltipFeature=null,this.cellMouseListenerFeature=null,this.cellKeyboardListenerFeature=null,this.suppressRefreshCell=!1,this.onCellCompAttachedFuncs=[],this.column=e,this.rowNode=t,this.beans=i,this.rowCtrl=n,this.instanceId=e.getId()+"-"+fa++,this.colIdSanitised=St(this.column.getId()),i.gos.get("suppressCellFocus")||(this.tabIndex=-1),this.createCellPosition(),this.addFeatures(),this.updateAndFormatValue(!1)}shouldRestoreFocus(){return this.beans.focusService.shouldRestoreFocus(this.cellPosition)}addFeatures(){this.cellPositionFeature=new la(this,this.beans),this.addDestroyFunc(()=>{var e;null==(e=this.cellPositionFeature)||e.destroy(),this.cellPositionFeature=null}),this.cellCustomStyleFeature=new ca(this,this.beans),this.addDestroyFunc(()=>{var e;null==(e=this.cellCustomStyleFeature)||e.destroy(),this.cellCustomStyleFeature=null}),this.cellMouseListenerFeature=new da(this,this.beans,this.column),this.addDestroyFunc(()=>{var e;null==(e=this.cellMouseListenerFeature)||e.destroy(),this.cellMouseListenerFeature=null}),this.cellKeyboardListenerFeature=new ua(this,this.beans,this.column,this.rowNode,this.rowCtrl),this.addDestroyFunc(()=>{var e;null==(e=this.cellKeyboardListenerFeature)||e.destroy(),this.cellKeyboardListenerFeature=null}),this.column.isTooltipEnabled()&&(this.enableTooltipFeature(),this.addDestroyFunc(()=>{this.disableTooltipFeature()})),this.beans.rangeService&&this.beans.gos.get("enableRangeSelection")&&(this.cellRangeFeature=new aa(this.beans,this),this.addDestroyFunc(()=>{var e;null==(e=this.cellRangeFeature)||e.destroy(),this.cellRangeFeature=null}))}enableTooltipFeature(e,t){const i="whenTruncated"===this.beans.gos.get("tooltipShowMode");t||!i||this.isCellRenderer()||(t=()=>{const e=this.getGui(),t=0===e.children.length?e:e.querySelector(".ag-cell-value");return!t||t.scrollWidth>t.clientWidth});const n={getColumn:()=>this.column,getColDef:()=>this.column.getColDef(),getRowIndex:()=>this.cellPosition.rowIndex,getRowNode:()=>this.rowNode,getGui:()=>this.getGui(),getLocation:()=>"cell",getTooltipValue:null!=e?()=>e:()=>{const e=this.column.getColDef(),t=this.rowNode.data;if(e.tooltipField&&S(t))return V(t,e.tooltipField,this.column.isTooltipFieldContainsDots());const i=e.tooltipValueGetter;return i?i(this.beans.gos.addGridCommonParams({location:"cell",colDef:this.column.getColDef(),column:this.column,rowIndex:this.cellPosition.rowIndex,node:this.rowNode,data:this.rowNode.data,value:this.value,valueFormatted:this.valueFormatted})):null},getValueFormatted:()=>this.valueFormatted,shouldDisplayTooltip:t};this.tooltipFeature=new Cs(n,this.beans)}disableTooltipFeature(){this.tooltipFeature&&(this.tooltipFeature.destroy(),this.tooltipFeature=null)}setComp(e,t,i,n,s){var r,o,a,l;this.cellComp=e,this.eGui=t,this.printLayout=n,this.addDomData(),this.onCellFocused(this.focusEventToRestore),this.applyStaticCssClasses(),this.setWrapText(),this.onFirstRightPinnedChanged(),this.onLastLeftPinnedChanged(),this.onColumnHover(),this.setupControlComps(),this.setupAutoHeight(i),this.refreshFirstAndLastStyles(),this.refreshAriaColIndex(),null==(r=this.cellPositionFeature)||r.setComp(t),null==(o=this.cellCustomStyleFeature)||o.setComp(e),null==(a=this.tooltipFeature)||a.refreshToolTip(),null==(l=this.cellKeyboardListenerFeature)||l.setComp(this.eGui),this.cellRangeFeature&&this.cellRangeFeature.setComp(e,t),s&&this.isCellEditable()?this.startEditing():this.showValue(),this.onCellCompAttachedFuncs.length&&(this.onCellCompAttachedFuncs.forEach(e=>e()),this.onCellCompAttachedFuncs=[])}setupAutoHeight(e){if(this.isAutoHeight=this.column.isAutoHeight(),!this.isAutoHeight||!e)return;const t=e.parentElement,i=this.beans.gos.getRowHeightForNode(this.rowNode).height,n=s=>{if(this.editing)return;if(!this.isAlive())return;const{paddingTop:r,paddingBottom:o,borderBottomWidth:a,borderTopWidth:l}=pn(t),c=r+o+a+l,h=e.offsetHeight+c;if(s<5){const t=this.beans.gos.getDocument();if(!t||!t.contains(e)||0==h)return void window.setTimeout(()=>n(s+1),0)}const d=Math.max(h,i);this.rowNode.setRowAutoHeight(d,this.column)},s=()=>n(0);s();const r=this.beans.resizeObserverService.observeResize(e,s);this.addDestroyFunc(()=>{r(),this.rowNode.setRowAutoHeight(void 0,this.column)})}getCellAriaRole(){var e;return null!=(e=this.column.getColDef().cellAriaRole)?e:"gridcell"}getInstanceId(){return this.instanceId}getColumnIdSanitised(){return this.colIdSanitised}getTabIndex(){return this.tabIndex}isCellRenderer(){const e=this.column.getColDef();return null!=e.cellRenderer||null!=e.cellRendererSelector}getValueToDisplay(){var e;return null!=(e=this.valueFormatted)?e:this.value}showValue(e=!1){var t;const i=this.getValueToDisplay();let n;if(this.rowNode.stub){const e=this.createCellRendererParams();n=this.beans.userComponentFactory.getLoadingCellRendererDetails(this.column.getColDef(),e)}else if(this.isCellRenderer()){const e=this.createCellRendererParams();n=this.beans.userComponentFactory.getCellRendererDetails(this.column.getColDef(),e)}this.cellComp.setRenderDetails(n,i,e),null==(t=this.cellRangeFeature)||t.refreshHandle()}setupControlComps(){const e=this.column.getColDef();this.includeSelection=this.isIncludeControl(e.checkboxSelection),this.includeRowDrag=this.isIncludeControl(e.rowDrag),this.includeDndSource=this.isIncludeControl(e.dndSource),this.cellComp.setIncludeSelection(this.includeSelection),this.cellComp.setIncludeDndSource(this.includeDndSource),this.cellComp.setIncludeRowDrag(this.includeRowDrag)}isForceWrapper(){return this.beans.gos.get("enableCellTextSelection")||this.column.isAutoHeight()}isIncludeControl(e){return!(null!=this.rowNode.rowPinned||"function"!=typeof e&&!0!==e)}refreshShouldDestroy(){const e=this.column.getColDef(),t=this.includeSelection!=this.isIncludeControl(e.checkboxSelection),i=this.includeRowDrag!=this.isIncludeControl(e.rowDrag),n=this.includeDndSource!=this.isIncludeControl(e.dndSource),s=this.isAutoHeight!=this.column.isAutoHeight();return t||i||n||s}startEditing(e=null,t=!1,i=null){if(!this.isCellEditable()||this.editing)return;if(!this.cellComp)return void this.onCellCompAttachedFuncs.push(()=>{this.startEditing(e,t,i)});const n=this.createCellEditorParams(e,t),s=this.column.getColDef(),r=this.beans.userComponentFactory.getCellEditorDetails(s,n);this.editCompDetails=r;const o=null!=(null==r?void 0:r.popupFromSelector)?r.popupFromSelector:!!s.cellEditorPopup,a=null!=(null==r?void 0:r.popupPositionFromSelector)?r.popupPositionFromSelector:s.cellEditorPopupPosition;this.setEditing(!0),this.cellComp.setEditDetails(r,o,a,this.beans.gos.get("reactiveCustomComponents"));const l=this.createEvent(i,dt.EVENT_CELL_EDITING_STARTED);this.beans.eventService.dispatchEvent(l)}setEditing(e){var t;this.editing!==e&&(this.editing=e,null==(t=this.cellRangeFeature)||t.refreshHandle())}stopRowOrCellEdit(e=!1){"fullRow"===this.beans.gos.get("editType")?this.rowCtrl.stopEditing(e):this.stopEditing(e)}onPopupEditorClosed(){this.isEditing()&&this.stopEditingAndFocus()}takeValueFromCellEditor(e){const t={newValueExists:!1};if(e)return t;const i=this.cellComp.getCellEditor();return i?i.isCancelAfterEnd&&i.isCancelAfterEnd()?t:{newValue:i.getValue(),newValueExists:!0}:t}saveNewValue(e,t){if(t===e)return!1;this.suppressRefreshCell=!0;const i=this.rowNode.setDataValue(this.column,t,"edit");return this.suppressRefreshCell=!1,i}stopEditing(e=!1){if(!this.editing)return!1;const{newValue:t,newValueExists:i}=this.takeValueFromCellEditor(e),n=this.rowNode.getValueFromValueService(this.column);let s=!1;return i&&(s=this.saveNewValue(n,t)),this.setEditing(!1),this.cellComp.setEditDetails(),this.editCompDetails=void 0,this.updateAndFormatValue(!1),this.refreshCell({forceRefresh:!0,suppressFlash:!0}),this.dispatchEditingStoppedEvent(n,t,!e&&!!s),s}dispatchEditingStoppedEvent(e,t,i){const n=g(p({},this.createEvent(null,dt.EVENT_CELL_EDITING_STOPPED)),{oldValue:e,newValue:t,valueChanged:i});this.beans.eventService.dispatchEvent(n)}createCellEditorParams(e,t){return this.beans.gos.addGridCommonParams({value:this.rowNode.getValueFromValueService(this.column),eventKey:e,column:this.column,colDef:this.column.getColDef(),rowIndex:this.getCellPosition().rowIndex,node:this.rowNode,data:this.rowNode.data,cellStartedEdit:t,onKeyDown:this.onKeyDown.bind(this),stopEditing:this.stopEditingAndFocus.bind(this),eGridCell:this.getGui(),parseValue:this.parseValue.bind(this),formatValue:this.formatValue.bind(this)})}createCellRendererParams(){return this.beans.gos.addGridCommonParams({value:this.value,valueFormatted:this.valueFormatted,getValue:()=>this.rowNode.getValueFromValueService(this.column),setValue:e=>this.beans.valueService.setValue(this.rowNode,this.column,e),formatValue:this.formatValue.bind(this),data:this.rowNode.data,node:this.rowNode,pinned:this.column.getPinned(),colDef:this.column.getColDef(),column:this.column,rowIndex:this.getCellPosition().rowIndex,refreshCell:this.refreshCell.bind(this),eGridCell:this.getGui(),eParentOfValue:this.cellComp.getParentOfValue(),registerRowDragger:(e,t,i,n)=>this.registerRowDragger(e,t,n),setTooltip:(e,t)=>{var i;this.tooltipFeature&&this.disableTooltipFeature(),this.enableTooltipFeature(e,t),null==(i=this.tooltipFeature)||i.refreshToolTip()}})}parseValue(e){return this.beans.valueService.parseValue(this.column,this.rowNode,e,this.getValue())}setFocusOutOnEditor(){if(!this.editing)return;const e=this.cellComp.getCellEditor();e&&e.focusOut&&e.focusOut()}setFocusInOnEditor(){if(!this.editing)return;const e=this.cellComp.getCellEditor();e&&e.focusIn?e.focusIn():this.focusCell(!0)}onCellChanged(e){e.column===this.column&&this.refreshCell({})}refreshOrDestroyCell(e){var t;this.refreshShouldDestroy()?null==(t=this.rowCtrl)||t.recreateCell(this):this.refreshCell(e)}refreshCell(e){var t,i,n,s;if(this.suppressRefreshCell||this.editing)return;const r=this.column.getColDef(),o=null!=e&&!!e.newData,a=null!=e&&!!e.suppressFlash||!!r.suppressCellFlash,l=null==r.field&&null==r.valueGetter&&null==r.showRowGroup,c=e&&e.forceRefresh||l||o,h=!!this.cellComp,d=this.updateAndFormatValue(h);if(h){if(c||d){this.showValue(o);const e=this.beans.filterManager.isSuppressFlashingCellsBecauseFiltering();!a&&!e&&(this.beans.gos.get("enableCellChangeFlash")||r.enableCellChangeFlash)&&this.flashCell(),null==(t=this.cellCustomStyleFeature)||t.applyUserStyles(),null==(i=this.cellCustomStyleFeature)||i.applyClassesFromColDef()}null==(n=this.tooltipFeature)||n.refreshToolTip(),null==(s=this.cellCustomStyleFeature)||s.applyCellClassRules()}}stopEditingAndFocus(e=!1,t=!1){this.stopRowOrCellEdit(),this.focusCell(!0),e||this.navigateAfterEdit(t)}navigateAfterEdit(e){if(this.beans.gos.get("enterNavigatesVerticallyAfterEdit")){const t=e?Jn.UP:Jn.DOWN;this.beans.navigationService.navigateToNextCell(null,t,this.getCellPosition(),!1)}}flashCell(e){var t,i;const n=null!=(t=null==e?void 0:e.flashDuration)?t:null==e?void 0:e.flashDelay,s=null!=(i=null==e?void 0:e.fadeDuration)?i:null==e?void 0:e.fadeDelay;this.animateCell("data-changed",n,s)}animateCell(e,t,i){if(!this.cellComp)return;const n=`ag-cell-${e}`,s=`ag-cell-${e}-animation`,{gos:r}=this.beans;t||(t=r.get("cellFlashDuration")),S(i)||(i=r.get("cellFadeDuration")),this.cellComp.addOrRemoveCssClass(n,!0),this.cellComp.addOrRemoveCssClass(s,!1),this.beans.frameworkOverrides.wrapIncoming(()=>{window.setTimeout(()=>{this.isAlive()&&(this.cellComp.addOrRemoveCssClass(n,!1),this.cellComp.addOrRemoveCssClass(s,!0),this.eGui.style.transition=`background-color ${i}ms`,window.setTimeout(()=>{this.isAlive()&&(this.cellComp.addOrRemoveCssClass(s,!1),this.eGui.style.transition="")},i))},t)})}onFlashCells(e){if(!this.cellComp)return;const t=this.beans.cellPositionUtils.createId(this.getCellPosition());e.cells[t]&&this.animateCell("highlight")}isCellEditable(){return this.column.isCellEditable(this.rowNode)}isSuppressFillHandle(){return this.column.isSuppressFillHandle()}formatValue(e){var t;return null!=(t=this.callValueFormatter(e))?t:e}callValueFormatter(e){return this.beans.valueService.formatValue(this.column,this.rowNode,e)}updateAndFormatValue(e){const t=this.value,i=this.valueFormatted;return this.value=this.rowNode.getValueFromValueService(this.column),this.valueFormatted=this.callValueFormatter(this.value),!e||!this.valuesAreEqual(t,this.value)||this.valueFormatted!=i}valuesAreEqual(e,t){const i=this.column.getColDef();return i.equals?i.equals(e,t):e===t}getComp(){return this.cellComp}getValue(){return this.value}addDomData(){const t=this.getGui();this.beans.gos.setDomData(t,e.DOM_DATA_KEY_CELL_CTRL,this),this.addDestroyFunc(()=>this.beans.gos.setDomData(t,e.DOM_DATA_KEY_CELL_CTRL,null))}createEvent(e,t){return this.beans.gos.addGridCommonParams({type:t,node:this.rowNode,data:this.rowNode.data,value:this.value,column:this.column,colDef:this.column.getColDef(),rowPinned:this.rowNode.rowPinned,event:e,rowIndex:this.rowNode.rowIndex})}processCharacter(e){var t;null==(t=this.cellKeyboardListenerFeature)||t.processCharacter(e)}onKeyDown(e){var t;null==(t=this.cellKeyboardListenerFeature)||t.onKeyDown(e)}onMouseEvent(e,t){var i;null==(i=this.cellMouseListenerFeature)||i.onMouseEvent(e,t)}getGui(){return this.eGui}getColSpanningList(){return this.cellPositionFeature.getColSpanningList()}onLeftChanged(){var e;this.cellComp&&(null==(e=this.cellPositionFeature)||e.onLeftChanged())}onDisplayedColumnsChanged(){this.eGui&&(this.refreshAriaColIndex(),this.refreshFirstAndLastStyles())}refreshFirstAndLastStyles(){const{cellComp:e,column:t,beans:i}=this;ga.refreshFirstAndLastStyles(e,t,i.columnModel)}refreshAriaColIndex(){const e=this.beans.columnModel.getAriaColumnIndex(this.column);ui(this.getGui(),e)}isSuppressNavigable(){return this.column.isSuppressNavigable(this.rowNode)}onWidthChanged(){var e;return null==(e=this.cellPositionFeature)?void 0:e.onWidthChanged()}getColumn(){return this.column}getRowNode(){return this.rowNode}isPrintLayout(){return this.printLayout}getCellPosition(){return this.cellPosition}isEditing(){return this.editing}startRowOrCellEdit(e,t=null){this.cellComp?"fullRow"===this.beans.gos.get("editType")?this.rowCtrl.startRowEditing(e,this):this.startEditing(e,!0,t):this.onCellCompAttachedFuncs.push(()=>{this.startRowOrCellEdit(e,t)})}getRowCtrl(){return this.rowCtrl}getRowPosition(){return{rowIndex:this.cellPosition.rowIndex,rowPinned:this.cellPosition.rowPinned}}updateRangeBordersIfRangeCount(){this.cellComp&&this.cellRangeFeature&&this.cellRangeFeature.updateRangeBordersIfRangeCount()}onRangeSelectionChanged(){this.cellComp&&this.cellRangeFeature&&this.cellRangeFeature.onRangeSelectionChanged()}isRangeSelectionEnabled(){return null!=this.cellRangeFeature}focusCell(e=!1){this.beans.focusService.setFocusedCell({rowIndex:this.getCellPosition().rowIndex,column:this.column,rowPinned:this.rowNode.rowPinned,forceBrowserFocus:e})}onRowIndexChanged(){this.createCellPosition(),this.onCellFocused(),this.cellRangeFeature&&this.cellRangeFeature.onRangeSelectionChanged()}onFirstRightPinnedChanged(){if(!this.cellComp)return;const e=this.column.isFirstRightPinned();this.cellComp.addOrRemoveCssClass("ag-cell-first-right-pinned",e)}onLastLeftPinnedChanged(){if(!this.cellComp)return;const e=this.column.isLastLeftPinned();this.cellComp.addOrRemoveCssClass("ag-cell-last-left-pinned",e)}onCellFocused(e){if(this.beans.gos.get("suppressCellFocus"))return;const t=this.beans.focusService.isCellFocused(this.cellPosition);if(!this.cellComp)return void(t&&(null==e?void 0:e.forceBrowserFocus)&&(this.focusEventToRestore=e));this.focusEventToRestore=void 0,this.cellComp.addOrRemoveCssClass("ag-cell-focus",t),t&&e&&e.forceBrowserFocus&&this.cellComp.getFocusableElement().focus({preventScroll:!!e.preventScrollOnBrowserFocus});const i="fullRow"===this.beans.gos.get("editType");t||i||!this.editing||this.stopRowOrCellEdit(),t&&this.rowCtrl.announceDescription()}createCellPosition(){this.cellPosition={rowIndex:this.rowNode.rowIndex,rowPinned:b(this.rowNode.rowPinned),column:this.column}}applyStaticCssClasses(){this.cellComp.addOrRemoveCssClass("ag-cell",!0),this.cellComp.addOrRemoveCssClass("ag-cell-not-inline-editing",!0);const e=1==this.column.isAutoHeight();this.cellComp.addOrRemoveCssClass("ag-cell-auto-height",e),this.cellComp.addOrRemoveCssClass("ag-cell-normal-height",!e)}onColumnHover(){if(!this.cellComp)return;if(!this.beans.gos.get("columnHoverHighlight"))return;const e=this.beans.columnHoverService.isHovered(this.column);this.cellComp.addOrRemoveCssClass("ag-column-hover",e)}onColDefChanged(){if(this.cellComp)if(this.column.isTooltipEnabled()?(this.disableTooltipFeature(),this.enableTooltipFeature()):this.disableTooltipFeature(),this.setWrapText(),this.editing){const e=this.getCellEditor();if(null==e?void 0:e.refresh){const{eventKey:t,cellStartedEdit:i}=this.editCompDetails.params,n=this.createCellEditorParams(t,i),s=this.column.getColDef(),r=this.beans.userComponentFactory.getCellEditorDetails(s,n);e.refresh(r.params)}}else this.refreshOrDestroyCell({forceRefresh:!0,suppressFlash:!0})}setWrapText(){const e=1==this.column.getColDef().wrapText;this.cellComp.addOrRemoveCssClass("ag-cell-wrap-text",e)}dispatchCellContextMenuEvent(e){const t=this.column.getColDef(),i=this.createEvent(e,dt.EVENT_CELL_CONTEXT_MENU);this.beans.eventService.dispatchEvent(i),t.onCellContextMenu&&window.setTimeout(()=>{this.beans.frameworkOverrides.wrapOutgoing(()=>{t.onCellContextMenu(i)})},0)}getCellRenderer(){return this.cellComp?this.cellComp.getCellRenderer():null}getCellEditor(){return this.cellComp?this.cellComp.getCellEditor():null}destroy(){this.onCellCompAttachedFuncs=[],super.destroy()}createSelectionCheckbox(){const e=new Fr;return this.beans.context.createBean(e),e.init({rowNode:this.rowNode,column:this.column}),e}createDndSource(){const e=new pa(this.rowNode,this.column,this.eGui);return this.beans.context.createBean(e),e}registerRowDragger(e,t,i){if(this.customRowDragComp)return void this.customRowDragComp.setDragElement(e,t);const n=this.createRowDragComp(e,t,i);n&&(this.customRowDragComp=n,this.addDestroyFunc(()=>{this.beans.context.destroyBean(n),this.customRowDragComp=null}))}createRowDragComp(e,t,i){const n=this.beans.gos.get("pagination"),s=this.beans.gos.get("rowDragManaged"),r=this.beans.gos.isRowModelType("clientSide");if(s){if(!r)return void j("managed row dragging is only allowed in the Client Side Row Model");if(n)return void j("managed row dragging is not possible when doing pagination")}const o=new zr(()=>this.value,this.rowNode,this.column,e,t,i);return this.beans.context.createBean(o),o}};ma.DOM_DATA_KEY_CELL_CTRL="cellCtrl";var va=ma,ya=0,Ca=class e extends ot{constructor(e,t,i,n,s){super(),this.allRowGuis=[],this.active=!0,this.centerCellCtrls={list:[],map:{}},this.leftCellCtrls={list:[],map:{}},this.rightCellCtrls={list:[],map:{}},this.slideInAnimation={left:!1,center:!1,right:!1,fullWidth:!1},this.fadeInAnimation={left:!1,center:!1,right:!1,fullWidth:!1},this.rowDragComps=[],this.lastMouseDownOnDragger=!1,this.emptyStyle={},this.updateColumnListsPending=!1,this.rowId=null,this.businessKeySanitised=null,this.beans=t,this.gos=t.gos,this.rowNode=e,this.paginationPage=t.paginationProxy.getCurrentPage(),this.useAnimationFrameForCreate=n,this.printLayout=s,this.suppressRowTransform=this.gos.get("suppressRowTransform"),this.instanceId=e.id+"-"+ya++,this.rowId=St(e.id),this.initRowBusinessKey(),this.rowFocused=t.focusService.isRowFocused(this.rowNode.rowIndex,this.rowNode.rowPinned),this.rowLevel=t.rowCssClassCalculator.calculateRowLevel(this.rowNode),this.setRowType(),this.setAnimateFlags(i),this.rowStyles=this.processStylesFromGridOptions(),this.isFullWidth()&&!this.gos.get("suppressCellFocus")&&(this.tabIndex=-1),this.addListeners()}initRowBusinessKey(){this.businessKeyForNodeFunc=this.gos.get("getBusinessKeyForNode"),this.updateRowBusinessKey()}updateRowBusinessKey(){if("function"!=typeof this.businessKeyForNodeFunc)return;const e=this.businessKeyForNodeFunc(this.rowNode);this.businessKeySanitised=St(e)}getRowId(){return this.rowId}getRowStyles(){return this.rowStyles}getTabIndex(){return this.tabIndex}isSticky(){return this.rowNode.sticky}getInstanceId(){return this.instanceId}setComp(e,t,i){const n={rowComp:e,element:t,containerType:i};this.allRowGuis.push(n),"left"===i?this.leftGui=n:"right"===i?this.rightGui=n:"fullWidth"===i?this.fullWidthGui=n:this.centerGui=n,this.initialiseRowComp(n),"FullWidthLoading"===this.rowType||this.rowNode.rowPinned||this.beans.rowRenderer.dispatchFirstDataRenderedEvent()}unsetComp(e){switch(this.allRowGuis=this.allRowGuis.filter(t=>t.containerType!==e),e){case"left":this.leftGui=void 0;break;case"right":this.rightGui=void 0;break;case"fullWidth":this.fullWidthGui=void 0;break;case"center":this.centerGui=void 0}}isCacheable(){return"FullWidthDetail"===this.rowType&&this.gos.get("keepDetailRows")}setCached(e){const t=e?"none":"";this.allRowGuis.forEach(e=>e.element.style.display=t)}initialiseRowComp(t){const i=this.gos;this.listenOnDomOrder(t),this.beans.columnModel.wasAutoRowHeightEverActive()&&this.rowNode.checkAutoHeights(),this.onRowHeightChanged(t),this.updateRowIndexes(t),this.setFocusedClasses(t),this.setStylesFromGridOptions(!1,t),i.isRowSelection()&&this.rowNode.selectable&&this.onRowSelected(t),this.updateColumnLists(!this.useAnimationFrameForCreate);const n=t.rowComp;this.getInitialRowClasses(t.containerType).forEach(e=>n.addOrRemoveCssClass(e,!0)),this.executeSlideAndFadeAnimations(t),this.rowNode.group&&si(t.element,1==this.rowNode.expanded),this.setRowCompRowId(n),this.setRowCompRowBusinessKey(n),i.setDomData(t.element,e.DOM_DATA_KEY_ROW_CTRL,this),this.addDestroyFunc(()=>i.setDomData(t.element,e.DOM_DATA_KEY_ROW_CTRL,null)),this.useAnimationFrameForCreate?this.beans.animationFrameService.createTask(this.addHoverFunctionality.bind(this,t.element),this.rowNode.rowIndex,"createTasksP2"):this.addHoverFunctionality(t.element),this.isFullWidth()&&this.setupFullWidth(t),i.get("rowDragEntireRow")&&this.addRowDraggerToRow(t),this.useAnimationFrameForCreate&&this.beans.animationFrameService.addDestroyTask(()=>{this.isAlive()&&t.rowComp.addOrRemoveCssClass("ag-after-created",!0)}),this.executeProcessRowPostCreateFunc()}setRowCompRowBusinessKey(e){null!=this.businessKeySanitised&&e.setRowBusinessKey(this.businessKeySanitised)}getBusinessKey(){return this.businessKeySanitised}setRowCompRowId(e){this.rowId=St(this.rowNode.id),null!=this.rowId&&e.setRowId(this.rowId)}executeSlideAndFadeAnimations(e){const{containerType:t}=e;this.slideInAnimation[t]&&(Q(()=>{this.onTopChanged()}),this.slideInAnimation[t]=!1),this.fadeInAnimation[t]&&(Q(()=>{e.rowComp.addOrRemoveCssClass("ag-opacity-zero",!1)}),this.fadeInAnimation[t]=!1)}addRowDraggerToRow(e){if(this.gos.get("enableRangeSelection"))return void j("Setting `rowDragEntireRow: true` in the gridOptions doesn't work with `enableRangeSelection: true`");const t=this.beans.localeService.getLocaleTextFunc(),i=new zr(()=>`1 ${t("rowDragRow","row")}`,this.rowNode,void 0,e.element,void 0,!0),n=this.createBean(i,this.beans.context);this.rowDragComps.push(n)}setupFullWidth(e){const t=this.getPinnedForContainer(e.containerType);if("FullWidthDetail"==this.rowType&&!ae.__assertRegistered("@ag-grid-enterprise/master-detail","cell renderer 'agDetailCellRenderer' (for master detail)",this.beans.context.getGridId()))return;const i=this.createFullWidthCompDetails(e.element,t);e.rowComp.showFullWidth(i)}isPrintLayout(){return this.printLayout}getFullWidthCellRenderers(){var e,t;return this.gos.get("embedFullWidthRows")?this.allRowGuis.map(e=>{var t;return null==(t=null==e?void 0:e.rowComp)?void 0:t.getFullWidthCellRenderer()}):[null==(t=null==(e=this.fullWidthGui)?void 0:e.rowComp)?void 0:t.getFullWidthCellRenderer()]}getCellElement(e){const t=this.getCellCtrl(e);return t?t.getGui():null}executeProcessRowPostCreateFunc(){const e=this.gos.getCallback("processRowPostCreate");e&&this.areAllContainersReady()&&e({eRow:this.centerGui.element,ePinnedLeftRow:this.leftGui?this.leftGui.element:void 0,ePinnedRightRow:this.rightGui?this.rightGui.element:void 0,node:this.rowNode,rowIndex:this.rowNode.rowIndex,addRenderedRowListener:this.addEventListener.bind(this)})}areAllContainersReady(){const e=!!this.leftGui||!this.beans.columnModel.isPinningLeft(),t=!!this.centerGui,i=!!this.rightGui||!this.beans.columnModel.isPinningRight();return e&&t&&i}setRowType(){const e=this.rowNode.stub&&!this.gos.get("suppressServerSideFullWidthLoadingRow"),t=this.rowNode.isFullWidthCell(),i=this.gos.get("masterDetail")&&this.rowNode.detail,n=this.beans.columnModel.isPivotMode(),s=!!this.rowNode.group&&!this.rowNode.footer&&this.gos.isGroupUseEntireRow(n);this.rowType=e?"FullWidthLoading":i?"FullWidthDetail":t?"FullWidth":s?"FullWidthGroup":"Normal"}updateColumnLists(e=!1,t=!1){this.isFullWidth()||(e||this.gos.get("suppressAnimationFrame")||this.printLayout?this.updateColumnListsImpl(t):this.updateColumnListsPending||(this.beans.animationFrameService.createTask(()=>{this.active&&this.updateColumnListsImpl(!0)},this.rowNode.rowIndex,"createTasksP1"),this.updateColumnListsPending=!0))}createCellCtrls(e,t,i=null){const n={list:[],map:{}},s=(e,t)=>{n.list.push(t),n.map[e]=t};return t.forEach(t=>{const i=t.getInstanceId();let n=e.map[i];n||(n=new va(t,this.rowNode,this.beans,this)),s(i,n)}),e.list.forEach(e=>{null==n.map[e.getColumn().getInstanceId()]&&(this.isCellEligibleToBeRemoved(e,i)?e.destroy():s(e.getColumn().getInstanceId(),e))}),n}updateColumnListsImpl(e){this.updateColumnListsPending=!1,this.createAllCellCtrls(),this.setCellCtrls(e)}setCellCtrls(e){this.allRowGuis.forEach(t=>{const i=this.getCellCtrlsForContainer(t.containerType);t.rowComp.setCellCtrls(i,e)})}getCellCtrlsForContainer(e){switch(e){case"left":return this.leftCellCtrls.list;case"right":return this.rightCellCtrls.list;case"fullWidth":return[];case"center":return this.centerCellCtrls.list;default:throw new Error(`Unhandled case: ${e}`)}}createAllCellCtrls(){const e=this.beans.columnModel;if(this.printLayout)this.centerCellCtrls=this.createCellCtrls(this.centerCellCtrls,e.getAllDisplayedColumns()),this.leftCellCtrls={list:[],map:{}},this.rightCellCtrls={list:[],map:{}};else{const t=e.getViewportCenterColumnsForRow(this.rowNode);this.centerCellCtrls=this.createCellCtrls(this.centerCellCtrls,t);const i=e.getDisplayedLeftColumnsForRow(this.rowNode);this.leftCellCtrls=this.createCellCtrls(this.leftCellCtrls,i,"left");const n=e.getDisplayedRightColumnsForRow(this.rowNode);this.rightCellCtrls=this.createCellCtrls(this.rightCellCtrls,n,"right")}}isCellEligibleToBeRemoved(e,t){const i=!0;if(e.getColumn().getPinned()!=t)return i;const n=e.isEditing(),s=this.beans.focusService.isCellFocused(e.getCellPosition());if(n||s){const t=e.getColumn();return!(this.beans.columnModel.getAllDisplayedColumns().indexOf(t)>=0)&&i}return i}getDomOrder(){return this.gos.get("ensureDomOrder")||this.gos.isDomLayout("print")}listenOnDomOrder(e){const t=()=>{e.rowComp.setDomOrder(this.getDomOrder())};this.addManagedPropertyListener("domLayout",t),this.addManagedPropertyListener("ensureDomOrder",t)}setAnimateFlags(e){if(this.isSticky()||!e)return;const t=S(this.rowNode.oldRowTop),i=this.beans.columnModel.isPinningLeft(),n=this.beans.columnModel.isPinningRight();if(t){if(this.isFullWidth()&&!this.gos.get("embedFullWidthRows"))return void(this.slideInAnimation.fullWidth=!0);this.slideInAnimation.center=!0,this.slideInAnimation.left=i,this.slideInAnimation.right=n}else{if(this.isFullWidth()&&!this.gos.get("embedFullWidthRows"))return void(this.fadeInAnimation.fullWidth=!0);this.fadeInAnimation.center=!0,this.fadeInAnimation.left=i,this.fadeInAnimation.right=n}}isEditing(){return this.editingRow}isFullWidth(){return"Normal"!==this.rowType}refreshFullWidth(){const e=(e,t)=>!e||e.rowComp.refreshFullWidth(()=>this.createFullWidthCompDetails(e.element,t).params),t=e(this.fullWidthGui,null),i=e(this.centerGui,null),n=e(this.leftGui,"left"),s=e(this.rightGui,"right");return t&&i&&n&&s}addListeners(){this.addManagedListener(this.rowNode,_r.EVENT_HEIGHT_CHANGED,()=>this.onRowHeightChanged()),this.addManagedListener(this.rowNode,_r.EVENT_ROW_SELECTED,()=>this.onRowSelected()),this.addManagedListener(this.rowNode,_r.EVENT_ROW_INDEX_CHANGED,this.onRowIndexChanged.bind(this)),this.addManagedListener(this.rowNode,_r.EVENT_TOP_CHANGED,this.onTopChanged.bind(this)),this.addManagedListener(this.rowNode,_r.EVENT_EXPANDED_CHANGED,this.updateExpandedCss.bind(this)),this.addManagedListener(this.rowNode,_r.EVENT_HAS_CHILDREN_CHANGED,this.updateExpandedCss.bind(this)),this.rowNode.detail&&this.addManagedListener(this.rowNode.parent,_r.EVENT_DATA_CHANGED,this.onRowNodeDataChanged.bind(this)),this.addManagedListener(this.rowNode,_r.EVENT_DATA_CHANGED,this.onRowNodeDataChanged.bind(this)),this.addManagedListener(this.rowNode,_r.EVENT_CELL_CHANGED,this.postProcessCss.bind(this)),this.addManagedListener(this.rowNode,_r.EVENT_HIGHLIGHT_CHANGED,this.onRowNodeHighlightChanged.bind(this)),this.addManagedListener(this.rowNode,_r.EVENT_DRAGGING_CHANGED,this.postProcessRowDragging.bind(this)),this.addManagedListener(this.rowNode,_r.EVENT_UI_LEVEL_CHANGED,this.onUiLevelChanged.bind(this));const e=this.beans.eventService;this.addManagedListener(e,dt.EVENT_PAGINATION_PIXEL_OFFSET_CHANGED,this.onPaginationPixelOffsetChanged.bind(this)),this.addManagedListener(e,dt.EVENT_HEIGHT_SCALE_CHANGED,this.onTopChanged.bind(this)),this.addManagedListener(e,dt.EVENT_DISPLAYED_COLUMNS_CHANGED,this.onDisplayedColumnsChanged.bind(this)),this.addManagedListener(e,dt.EVENT_VIRTUAL_COLUMNS_CHANGED,this.onVirtualColumnsChanged.bind(this)),this.addManagedListener(e,dt.EVENT_CELL_FOCUSED,this.onCellFocusChanged.bind(this)),this.addManagedListener(e,dt.EVENT_CELL_FOCUS_CLEARED,this.onCellFocusChanged.bind(this)),this.addManagedListener(e,dt.EVENT_PAGINATION_CHANGED,this.onPaginationChanged.bind(this)),this.addManagedListener(e,dt.EVENT_MODEL_UPDATED,this.refreshFirstAndLastRowStyles.bind(this)),this.addManagedListener(e,dt.EVENT_COLUMN_MOVED,this.updateColumnLists.bind(this)),this.addDestroyFunc(()=>{this.destroyBeans(this.rowDragComps,this.beans.context),this.tooltipFeature&&(this.tooltipFeature=this.destroyBean(this.tooltipFeature,this.beans.context))}),this.addManagedPropertyListeners(["rowDragEntireRow"],()=>{this.gos.get("rowDragEntireRow")?this.allRowGuis.forEach(e=>{this.addRowDraggerToRow(e)}):(this.destroyBeans(this.rowDragComps,this.beans.context),this.rowDragComps=[])}),this.addListenersForCellComps()}addListenersForCellComps(){this.addManagedListener(this.rowNode,_r.EVENT_ROW_INDEX_CHANGED,()=>{this.getAllCellCtrls().forEach(e=>e.onRowIndexChanged())}),this.addManagedListener(this.rowNode,_r.EVENT_CELL_CHANGED,e=>{this.getAllCellCtrls().forEach(t=>t.onCellChanged(e))})}onRowNodeDataChanged(e){if(this.isFullWidth()!==!!this.rowNode.isFullWidthCell())this.beans.rowRenderer.redrawRow(this.rowNode);else{if(this.isFullWidth())return void(this.refreshFullWidth()||this.beans.rowRenderer.redrawRow(this.rowNode));this.getAllCellCtrls().forEach(t=>t.refreshCell({suppressFlash:!e.update,newData:!e.update})),this.allRowGuis.forEach(e=>{this.setRowCompRowId(e.rowComp),this.updateRowBusinessKey(),this.setRowCompRowBusinessKey(e.rowComp)}),this.onRowSelected(),this.postProcessCss()}}postProcessCss(){this.setStylesFromGridOptions(!0),this.postProcessClassesFromGridOptions(),this.postProcessRowClassRules(),this.postProcessRowDragging()}onRowNodeHighlightChanged(){const e=this.rowNode.highlighted;this.allRowGuis.forEach(t=>{const i=0===e,n=1===e;t.rowComp.addOrRemoveCssClass("ag-row-highlight-above",i),t.rowComp.addOrRemoveCssClass("ag-row-highlight-below",n)})}postProcessRowDragging(){const e=this.rowNode.dragging;this.allRowGuis.forEach(t=>t.rowComp.addOrRemoveCssClass("ag-row-dragging",e))}updateExpandedCss(){const e=this.rowNode.isExpandable(),t=1==this.rowNode.expanded;this.allRowGuis.forEach(i=>{i.rowComp.addOrRemoveCssClass("ag-row-group",e),i.rowComp.addOrRemoveCssClass("ag-row-group-expanded",e&&t),i.rowComp.addOrRemoveCssClass("ag-row-group-contracted",e&&!t),si(i.element,e&&t)})}onDisplayedColumnsChanged(){this.updateColumnLists(!0),this.beans.columnModel.wasAutoRowHeightEverActive()&&this.rowNode.checkAutoHeights()}onVirtualColumnsChanged(){this.updateColumnLists(!1,!0)}getRowPosition(){return{rowPinned:b(this.rowNode.rowPinned),rowIndex:this.rowNode.rowIndex}}onKeyboardNavigate(e){const t=this.allRowGuis.find(t=>t.element.contains(e.target));if((t?t.element:null)!==e.target)return;const i=this.rowNode,n=this.beans.focusService.getFocusedCell(),s={rowIndex:i.rowIndex,rowPinned:i.rowPinned,column:n&&n.column};this.beans.navigationService.navigateToNextCell(e,e.key,s,!0),e.preventDefault()}onTabKeyDown(e){if(e.defaultPrevented||Qe(e))return;const t=this.allRowGuis.find(t=>t.element.contains(e.target)),i=t?t.element:null,n=i===e.target;let s=null;n||(s=this.beans.focusService.findNextFocusableElement(i,!1,e.shiftKey)),(this.isFullWidth()&&n||!s)&&this.beans.navigationService.onTabKeyDown(this,e)}getFullWidthElement(){return this.fullWidthGui?this.fullWidthGui.element:null}getRowYPosition(){var e;const t=null==(e=this.allRowGuis.find(e=>Mn(e.element)))?void 0:e.element;return t?t.getBoundingClientRect().top:0}onFullWidthRowFocused(e){var t;const i=this.rowNode,n=!!e&&this.isFullWidth()&&e.rowIndex===i.rowIndex&&e.rowPinned==i.rowPinned,s=this.fullWidthGui?this.fullWidthGui.element:null==(t=this.centerGui)?void 0:t.element;s&&(s.classList.toggle("ag-full-width-focus",n),n&&s.focus({preventScroll:!0}))}recreateCell(e){this.centerCellCtrls=this.removeCellCtrl(this.centerCellCtrls,e),this.leftCellCtrls=this.removeCellCtrl(this.leftCellCtrls,e),this.rightCellCtrls=this.removeCellCtrl(this.rightCellCtrls,e),e.destroy(),this.updateColumnLists()}removeCellCtrl(e,t){const i={list:[],map:{}};return e.list.forEach(e=>{e!==t&&(i.list.push(e),i.map[e.getColumn().getInstanceId()]=e)}),i}onMouseEvent(e,t){switch(e){case"dblclick":this.onRowDblClick(t);break;case"click":this.onRowClick(t);break;case"touchstart":case"mousedown":this.onRowMouseDown(t)}}createRowEvent(e,t){return this.gos.addGridCommonParams({type:e,node:this.rowNode,data:this.rowNode.data,rowIndex:this.rowNode.rowIndex,rowPinned:this.rowNode.rowPinned,event:t})}createRowEventWithSource(e,t){const i=this.createRowEvent(e,t);return i.source=this,i}onRowDblClick(e){if(Qe(e))return;const t=this.createRowEventWithSource(dt.EVENT_ROW_DOUBLE_CLICKED,e);this.beans.eventService.dispatchEvent(t)}onRowMouseDown(e){if(this.lastMouseDownOnDragger=un(e.target,"ag-row-drag",3),!this.isFullWidth())return;const t=this.rowNode,i=this.beans.columnModel;this.beans.rangeService&&this.beans.rangeService.removeAllCellRanges(),this.beans.focusService.setFocusedCell({rowIndex:t.rowIndex,column:i.getAllDisplayedColumns()[0],rowPinned:t.rowPinned,forceBrowserFocus:!0})}onRowClick(e){if(Qe(e)||this.lastMouseDownOnDragger)return;const t=this.createRowEventWithSource(dt.EVENT_ROW_CLICKED,e);this.beans.eventService.dispatchEvent(t);const i=e.ctrlKey||e.metaKey,n=e.shiftKey;if(this.gos.get("groupSelectsChildren")&&this.rowNode.group||this.isRowSelectionBlocked()||this.gos.get("suppressRowClickSelection"))return;const s=this.gos.get("rowMultiSelectWithClick"),r=!this.gos.get("suppressRowDeselection"),o="rowClicked";if(this.rowNode.isSelected())s?this.rowNode.setSelectedParams({newValue:!1,event:e,source:o}):i?r&&this.rowNode.setSelectedParams({newValue:!1,event:e,source:o}):this.rowNode.setSelectedParams({newValue:!0,clearSelection:!n,rangeSelect:n,event:e,source:o});else{const t=!s&&!i;this.rowNode.setSelectedParams({newValue:!0,clearSelection:t,rangeSelect:n,event:e,source:o})}}isRowSelectionBlocked(){return!this.rowNode.selectable||!!this.rowNode.rowPinned||!this.gos.isRowSelection()}setupDetailRowAutoHeight(e){if("FullWidthDetail"!==this.rowType)return;if(!this.gos.get("detailRowAutoHeight"))return;const t=()=>{const t=e.clientHeight;if(null!=t&&t>0){const e=()=>{this.rowNode.setRowHeight(t),this.beans.clientSideRowModel?this.beans.clientSideRowModel.onRowHeightChanged():this.beans.serverSideRowModel&&this.beans.serverSideRowModel.onRowHeightChanged()};window.setTimeout(e,0)}},i=this.beans.resizeObserverService.observeResize(e,t);this.addDestroyFunc(i),t()}createFullWidthCompDetails(e,t){const i=this.gos.addGridCommonParams({fullWidth:!0,data:this.rowNode.data,node:this.rowNode,value:this.rowNode.key,valueFormatted:this.rowNode.key,rowIndex:this.rowNode.rowIndex,eGridCell:e,eParentOfValue:e,pinned:t,addRenderedRowListener:this.addEventListener.bind(this),registerRowDragger:(e,t,i,n)=>this.addFullWidthRowDragging(e,t,i,n),setTooltip:(e,t)=>this.refreshRowTooltip(e,t)});switch(this.rowType){case"FullWidthDetail":return this.beans.userComponentFactory.getFullWidthDetailCellRendererDetails(i);case"FullWidthGroup":return this.beans.userComponentFactory.getFullWidthGroupCellRendererDetails(i);case"FullWidthLoading":return this.beans.userComponentFactory.getFullWidthLoadingCellRendererDetails(i);default:return this.beans.userComponentFactory.getFullWidthCellRendererDetails(i)}}refreshRowTooltip(e,t){if(!this.fullWidthGui)return;const i={getGui:()=>this.fullWidthGui.element,getTooltipValue:()=>e,getLocation:()=>"fullWidthRow",shouldDisplayTooltip:t};this.tooltipFeature&&this.destroyBean(this.tooltipFeature,this.beans.context),this.tooltipFeature=this.createBean(new Cs(i,this.beans))}addFullWidthRowDragging(e,t,i="",n){if(!this.isFullWidth())return;const s=new zr(()=>i,this.rowNode,void 0,e,t,n);this.createBean(s,this.beans.context),this.addDestroyFunc(()=>{this.destroyBean(s,this.beans.context)})}onUiLevelChanged(){const e=this.beans.rowCssClassCalculator.calculateRowLevel(this.rowNode);if(this.rowLevel!=e){const t="ag-row-level-"+e,i="ag-row-level-"+this.rowLevel;this.allRowGuis.forEach(e=>{e.rowComp.addOrRemoveCssClass(t,!0),e.rowComp.addOrRemoveCssClass(i,!1)})}this.rowLevel=e}isFirstRowOnPage(){return this.rowNode.rowIndex===this.beans.paginationProxy.getPageFirstRow()}isLastRowOnPage(){return this.rowNode.rowIndex===this.beans.paginationProxy.getPageLastRow()}refreshFirstAndLastRowStyles(){const e=this.isFirstRowOnPage(),t=this.isLastRowOnPage();this.firstRowOnPage!==e&&(this.firstRowOnPage=e,this.allRowGuis.forEach(t=>t.rowComp.addOrRemoveCssClass("ag-row-first",e))),this.lastRowOnPage!==t&&(this.lastRowOnPage=t,this.allRowGuis.forEach(e=>e.rowComp.addOrRemoveCssClass("ag-row-last",t)))}stopEditing(e=!1){if(this.stoppingRowEdit)return;const t=this.getAllCellCtrls(),i=this.editingRow;this.stoppingRowEdit=!0;let n=!1;for(const s of t){const t=s.stopEditing(e);i&&!e&&!n&&t&&(n=!0)}if(n){const e=this.createRowEvent(dt.EVENT_ROW_VALUE_CHANGED);this.beans.eventService.dispatchEvent(e)}i&&this.setEditingRow(!1),this.stoppingRowEdit=!1}setInlineEditingCss(e){this.allRowGuis.forEach(t=>{t.rowComp.addOrRemoveCssClass("ag-row-inline-editing",e),t.rowComp.addOrRemoveCssClass("ag-row-not-inline-editing",!e)})}setEditingRow(e){this.editingRow=e,this.allRowGuis.forEach(t=>t.rowComp.addOrRemoveCssClass("ag-row-editing",e));const t=e?this.createRowEvent(dt.EVENT_ROW_EDITING_STARTED):this.createRowEvent(dt.EVENT_ROW_EDITING_STOPPED);this.beans.eventService.dispatchEvent(t)}startRowEditing(e=null,t=null,i=null){this.editingRow||this.getAllCellCtrls().reduce((n,s)=>{const r=s===t;return r?s.startEditing(e,r,i):s.startEditing(null,r,i),!!n||s.isEditing()},!1)&&this.setEditingRow(!0)}getAllCellCtrls(){return 0===this.leftCellCtrls.list.length&&0===this.rightCellCtrls.list.length?this.centerCellCtrls.list:[...this.centerCellCtrls.list,...this.leftCellCtrls.list,...this.rightCellCtrls.list]}postProcessClassesFromGridOptions(){const e=this.beans.rowCssClassCalculator.processClassesFromGridOptions(this.rowNode);e&&e.length&&e.forEach(e=>{this.allRowGuis.forEach(t=>t.rowComp.addOrRemoveCssClass(e,!0))})}postProcessRowClassRules(){this.beans.rowCssClassCalculator.processRowClassRules(this.rowNode,e=>{this.allRowGuis.forEach(t=>t.rowComp.addOrRemoveCssClass(e,!0))},e=>{this.allRowGuis.forEach(t=>t.rowComp.addOrRemoveCssClass(e,!1))})}setStylesFromGridOptions(e,t){e&&(this.rowStyles=this.processStylesFromGridOptions()),this.forEachGui(t,e=>e.rowComp.setUserStyles(this.rowStyles))}getPinnedForContainer(e){return"left"===e?"left":"right"===e?"right":null}getInitialRowClasses(e){const t=this.getPinnedForContainer(e),i={rowNode:this.rowNode,rowFocused:this.rowFocused,fadeRowIn:this.fadeInAnimation[e],rowIsEven:this.rowNode.rowIndex%2==0,rowLevel:this.rowLevel,fullWidthRow:this.isFullWidth(),firstRowOnPage:this.isFirstRowOnPage(),lastRowOnPage:this.isLastRowOnPage(),printLayout:this.printLayout,expandable:this.rowNode.isExpandable(),pinned:t};return this.beans.rowCssClassCalculator.getInitialRowClasses(i)}processStylesFromGridOptions(){const e=this.gos.get("rowStyle");if(e&&"function"==typeof e)return void console.warn("AG Grid: rowStyle should be an object of key/value styles, not be a function, use getRowStyle() instead");const t=this.gos.getCallback("getRowStyle");let i;return t&&(i=t({data:this.rowNode.data,node:this.rowNode,rowIndex:this.rowNode.rowIndex})),i||e?Object.assign({},e,i):this.emptyStyle}onRowSelected(e){const t=!!this.rowNode.isSelected();this.forEachGui(e,e=>{e.rowComp.addOrRemoveCssClass("ag-row-selected",t),mi(e.element,t),!e.element.contains(this.beans.gos.getActiveDomElement())||e!==this.centerGui&&e!==this.fullWidthGui||this.announceDescription()})}announceDescription(){if(this.isRowSelectionBlocked())return;const e=this.rowNode.isSelected();if(e&&this.beans.gos.get("suppressRowDeselection"))return;const t=this.beans.localeService.getLocaleTextFunc()(e?"ariaRowDeselect":"ariaRowSelect",`Press SPACE to ${e?"deselect":"select"} this row.`);this.beans.ariaAnnouncementService.announceValue(t)}addHoverFunctionality(e){this.active&&(this.addManagedListener(e,"mouseenter",()=>this.rowNode.onMouseEnter()),this.addManagedListener(e,"mouseleave",()=>this.rowNode.onMouseLeave()),this.addManagedListener(this.rowNode,_r.EVENT_MOUSE_ENTER,()=>{this.beans.dragService.isDragging()||this.gos.get("suppressRowHoverHighlight")||(e.classList.add("ag-row-hover"),this.rowNode.setHovered(!0))}),this.addManagedListener(this.rowNode,_r.EVENT_MOUSE_LEAVE,()=>{e.classList.remove("ag-row-hover"),this.rowNode.setHovered(!1)}))}roundRowTopToBounds(e){const t=this.beans.ctrlsService.getGridBodyCtrl().getScrollFeature().getApproximateVScollPosition(),i=this.applyPaginationOffset(t.top,!0)-100,n=this.applyPaginationOffset(t.bottom,!0)+100;return Math.min(Math.max(i,e),n)}getFrameworkOverrides(){return this.beans.frameworkOverrides}forEachGui(e,t){e?t(e):this.allRowGuis.forEach(t)}onRowHeightChanged(e){if(null==this.rowNode.rowHeight)return;const t=this.rowNode.rowHeight,i=this.beans.environment.getDefaultRowHeight(),n=this.gos.isGetRowHeightFunction()?this.gos.getRowHeightForNode(this.rowNode).height:void 0,s=n?Math.min(i,n)-2+"px":void 0;this.forEachGui(e,e=>{e.element.style.height=`${t}px`,s&&e.element.style.setProperty("--ag-line-height",s)})}addEventListener(e,t){super.addEventListener(e,t)}removeEventListener(e,t){super.removeEventListener(e,t)}destroyFirstPass(e=!1){if(this.active=!1,!e&&this.gos.isAnimateRows()&&!this.isSticky())if(null!=this.rowNode.rowTop){const e=this.roundRowTopToBounds(this.rowNode.rowTop);this.setRowTop(e)}else this.allRowGuis.forEach(e=>e.rowComp.addOrRemoveCssClass("ag-opacity-zero",!0));this.rowNode.setHovered(!1);const t=this.createRowEvent(dt.EVENT_VIRTUAL_ROW_REMOVED);this.dispatchEvent(t),this.beans.eventService.dispatchEvent(t),super.destroy()}destroySecondPass(){this.allRowGuis.length=0,this.stopEditing();const e=e=>(e.list.forEach(e=>e.destroy()),{list:[],map:{}});this.centerCellCtrls=e(this.centerCellCtrls),this.leftCellCtrls=e(this.leftCellCtrls),this.rightCellCtrls=e(this.rightCellCtrls)}setFocusedClasses(e){this.forEachGui(e,e=>{e.rowComp.addOrRemoveCssClass("ag-row-focus",this.rowFocused),e.rowComp.addOrRemoveCssClass("ag-row-no-focus",!this.rowFocused)})}onCellFocusChanged(){const e=this.beans.focusService.isRowFocused(this.rowNode.rowIndex,this.rowNode.rowPinned);e!==this.rowFocused&&(this.rowFocused=e,this.setFocusedClasses()),!e&&this.editingRow&&this.stopEditing(!1)}onPaginationChanged(){const e=this.beans.paginationProxy.getCurrentPage();this.paginationPage!==e&&(this.paginationPage=e,this.onTopChanged()),this.refreshFirstAndLastRowStyles()}onTopChanged(){this.setRowTop(this.rowNode.rowTop)}onPaginationPixelOffsetChanged(){this.onTopChanged()}applyPaginationOffset(e,t=!1){return this.rowNode.isRowPinned()||this.rowNode.sticky?e:e+this.beans.paginationProxy.getPixelOffset()*(t?1:-1)}setRowTop(e){if(!this.printLayout&&S(e)){const t=this.applyPaginationOffset(e),i=`${this.rowNode.isRowPinned()||this.rowNode.sticky?t:this.beans.rowContainerHeightService.getRealPixelPosition(t)}px`;this.setRowTopStyle(i)}}getInitialRowTop(e){return this.suppressRowTransform?this.getInitialRowTopShared(e):void 0}getInitialTransform(e){return this.suppressRowTransform?void 0:`translateY(${this.getInitialRowTopShared(e)})`}getInitialRowTopShared(e){if(this.printLayout)return"";let t;if(this.isSticky())t=this.rowNode.stickyRowTop;else{const i=this.slideInAnimation[e]?this.roundRowTopToBounds(this.rowNode.oldRowTop):this.rowNode.rowTop,n=this.applyPaginationOffset(i);t=this.rowNode.isRowPinned()?n:this.beans.rowContainerHeightService.getRealPixelPosition(n)}return t+"px"}setRowTopStyle(e){this.allRowGuis.forEach(t=>this.suppressRowTransform?t.rowComp.setTop(e):t.rowComp.setTransform(`translateY(${e})`))}getRowNode(){return this.rowNode}getCellCtrl(e){let t=null;return this.getAllCellCtrls().forEach(i=>{i.getColumn()==e&&(t=i)}),null!=t||this.getAllCellCtrls().forEach(i=>{i.getColSpanningList().indexOf(e)>=0&&(t=i)}),t}onRowIndexChanged(){null!=this.rowNode.rowIndex&&(this.onCellFocusChanged(),this.updateRowIndexes(),this.postProcessCss())}getRowIndex(){return this.rowNode.getRowIndexString()}updateRowIndexes(e){const t=this.rowNode.getRowIndexString(),i=this.beans.headerNavigationService.getHeaderRowCount()+this.beans.filterManager.getHeaderRowCount(),n=this.rowNode.rowIndex%2==0,s=i+this.rowNode.rowIndex+1;this.forEachGui(e,e=>{e.rowComp.setRowIndex(t),e.rowComp.addOrRemoveCssClass("ag-row-even",n),e.rowComp.addOrRemoveCssClass("ag-row-odd",!n),hi(e.element,s)})}};Ca.DOM_DATA_KEY_ROW_CTRL="renderedRow";var ba=Ca,Sa=class extends ot{constructor(e){super(),this.element=e}postConstruct(){this.addKeyboardListeners(),this.addMouseListeners(),this.mockContextMenuForIPad()}addKeyboardListeners(){const e="keydown",t=this.processKeyboardEvent.bind(this,e);this.addManagedListener(this.element,e,t)}addMouseListeners(){["dblclick","contextmenu","mouseover","mouseout","click",Je("touchstart")?"touchstart":"mousedown"].forEach(e=>{const t=this.processMouseEvent.bind(this,e);this.addManagedListener(this.element,e,t)})}processMouseEvent(e,t){if(!this.mouseEventService.isEventFromThisGrid(t)||Qe(t))return;const i=this.getRowForEvent(t),n=this.mouseEventService.getRenderedCellForEvent(t);"contextmenu"===e?this.handleContextMenuMouseEvent(t,void 0,i,n):(n&&n.onMouseEvent(e,t),i&&i.onMouseEvent(e,t))}mockContextMenuForIPad(){if(!Ni())return;const e=new Cr(this.element);this.addManagedListener(e,Cr.EVENT_LONG_TAP,e=>{const t=this.getRowForEvent(e.touchEvent),i=this.mouseEventService.getRenderedCellForEvent(e.touchEvent);this.handleContextMenuMouseEvent(void 0,e.touchEvent,t,i)}),this.addDestroyFunc(()=>e.destroy())}getRowForEvent(e){let t=e.target;for(;t;){const e=this.gos.getDomData(t,ba.DOM_DATA_KEY_ROW_CTRL);if(e)return e;t=t.parentElement}return null}handleContextMenuMouseEvent(e,t,i,n){const s=i?i.getRowNode():null,r=n?n.getColumn():null;let o=null;if(r){const i=e||t;n.dispatchCellContextMenuEvent(null!=i?i:null),o=this.valueService.getValue(r,s)}const a=this.ctrlsService.getGridBodyCtrl(),l=n?n.getGui():a.getGridBodyElement();this.menuService.showContextMenu({mouseEvent:e,touchEvent:t,rowNode:s,column:r,value:o,anchorToElement:l})}getControlsForEventTarget(e){return{cellCtrl:et(this.gos,e,va.DOM_DATA_KEY_CELL_CTRL),rowCtrl:et(this.gos,e,ba.DOM_DATA_KEY_ROW_CTRL)}}processKeyboardEvent(e,t){const{cellCtrl:i,rowCtrl:n}=this.getControlsForEventTarget(t.target);t.defaultPrevented||(i?this.processCellKeyboardEvent(i,e,t):n&&n.isFullWidth()&&this.processFullWidthRowKeyboardEvent(n,e,t))}processCellKeyboardEvent(e,t,i){const n=e.getRowNode(),s=e.getColumn(),r=e.isEditing();if(ts(this.gos,i,n,s,r)||"keydown"!==t||(!r&&this.navigationService.handlePageScrollingKey(i)||e.onKeyDown(i),this.doGridOperations(i,e.isEditing()),es(i)&&e.processCharacter(i)),"keydown"===t){const t=e.createEvent(i,dt.EVENT_CELL_KEY_DOWN);this.eventService.dispatchEvent(t)}}processFullWidthRowKeyboardEvent(e,t,i){const n=e.getRowNode(),s=this.focusService.getFocusedCell(),r=s&&s.column;if(!ts(this.gos,i,n,r,!1)){const n=i.key;if("keydown"===t)switch(n){case Jn.PAGE_HOME:case Jn.PAGE_END:case Jn.PAGE_UP:case Jn.PAGE_DOWN:this.navigationService.handlePageScrollingKey(i,!0);break;case Jn.UP:case Jn.DOWN:e.onKeyboardNavigate(i);break;case Jn.TAB:e.onTabKeyDown(i)}}if("keydown"===t){const t=e.createRowEvent(dt.EVENT_CELL_KEY_DOWN,i);this.eventService.dispatchEvent(t)}}doGridOperations(e,t){if(!e.ctrlKey&&!e.metaKey)return;if(t)return;if(!this.mouseEventService.isEventFromThisGrid(e))return;const i=ns(e);return i===Jn.A?this.onCtrlAndA(e):i===Jn.C?this.onCtrlAndC(e):i===Jn.D?this.onCtrlAndD(e):i===Jn.V?this.onCtrlAndV(e):i===Jn.X?this.onCtrlAndX(e):i===Jn.Y?this.onCtrlAndY():i===Jn.Z?this.onCtrlAndZ(e):void 0}onCtrlAndA(e){const{pinnedRowModel:t,paginationProxy:i,rangeService:n}=this;if(n&&i.isRowsToRender()){const[e,i]=[t.isEmpty("top"),t.isEmpty("bottom")],s=e?null:"top";let r,o;i?(r=null,o=this.paginationProxy.getRowCount()-1):(r="bottom",o=t.getPinnedBottomRowData().length-1);const a=this.columnModel.getAllDisplayedColumns();if(x(a))return;n.setCellRange({rowStartIndex:0,rowStartPinned:s,rowEndIndex:o,rowEndPinned:r,columnStart:a[0],columnEnd:Le(a)})}e.preventDefault()}onCtrlAndC(e){if(!this.clipboardService||this.gos.get("enableCellTextSelection"))return;const{cellCtrl:t,rowCtrl:i}=this.getControlsForEventTarget(e.target);(null==t?void 0:t.isEditing())||(null==i?void 0:i.isEditing())||(e.preventDefault(),this.clipboardService.copyToClipboard())}onCtrlAndX(e){if(!this.clipboardService||this.gos.get("enableCellTextSelection")||this.gos.get("suppressCutToClipboard"))return;const{cellCtrl:t,rowCtrl:i}=this.getControlsForEventTarget(e.target);(null==t?void 0:t.isEditing())||(null==i?void 0:i.isEditing())||(e.preventDefault(),this.clipboardService.cutToClipboard(void 0,"ui"))}onCtrlAndV(e){const{cellCtrl:t,rowCtrl:i}=this.getControlsForEventTarget(e.target);(null==t?void 0:t.isEditing())||(null==i?void 0:i.isEditing())||this.clipboardService&&!this.gos.get("suppressClipboardPaste")&&this.clipboardService.pasteFromClipboard()}onCtrlAndD(e){this.clipboardService&&!this.gos.get("suppressClipboardPaste")&&this.clipboardService.copyRangeDown(),e.preventDefault()}onCtrlAndZ(e){this.gos.get("undoRedoCellEditing")&&(e.preventDefault(),e.shiftKey?this.undoRedoService.redo("ui"):this.undoRedoService.undo("ui"))}onCtrlAndY(){this.undoRedoService.redo("ui")}};m([pe("mouseEventService")],Sa.prototype,"mouseEventService",2),m([pe("valueService")],Sa.prototype,"valueService",2),m([pe("menuService")],Sa.prototype,"menuService",2),m([pe("ctrlsService")],Sa.prototype,"ctrlsService",2),m([pe("navigationService")],Sa.prototype,"navigationService",2),m([pe("focusService")],Sa.prototype,"focusService",2),m([pe("undoRedoService")],Sa.prototype,"undoRedoService",2),m([pe("columnModel")],Sa.prototype,"columnModel",2),m([pe("paginationProxy")],Sa.prototype,"paginationProxy",2),m([pe("pinnedRowModel")],Sa.prototype,"pinnedRowModel",2),m([ge("rangeService")],Sa.prototype,"rangeService",2),m([ge("clipboardService")],Sa.prototype,"clipboardService",2),m([he],Sa.prototype,"postConstruct",1);var wa=class extends ot{constructor(e){super(),this.centerContainerCtrl=e}postConstruct(){this.ctrlsService.whenReady(e=>{this.gridBodyCtrl=e.gridBodyCtrl,this.listenForResize()}),this.addManagedListener(this.eventService,dt.EVENT_SCROLLBAR_WIDTH_CHANGED,this.onScrollbarWidthChanged.bind(this)),this.addManagedPropertyListeners(["alwaysShowHorizontalScroll","alwaysShowVerticalScroll"],()=>{this.checkViewportAndScrolls()})}listenForResize(){const e=()=>this.onCenterViewportResized();this.centerContainerCtrl.registerViewportResizeListener(e),this.gridBodyCtrl.registerBodyViewportResizeListener(e)}onScrollbarWidthChanged(){this.checkViewportAndScrolls()}onCenterViewportResized(){if(this.centerContainerCtrl.isViewportInTheDOMTree()){this.keepPinnedColumnsNarrowerThanViewport(),this.checkViewportAndScrolls();const e=this.centerContainerCtrl.getCenterWidth();e!==this.centerWidth&&(this.centerWidth=e,this.columnModel.refreshFlexedColumns({viewportWidth:this.centerWidth,updateBodyWidths:!0,fireResizedEvent:!0}))}else this.bodyHeight=0}keepPinnedColumnsNarrowerThanViewport(){const e=fn(this.gridBodyCtrl.getBodyViewportElement());if(e<=50)return;let t=this.getPinnedColumnsOverflowingViewport(e-50);const i=this.gos.getCallback("processUnpinnedColumns");t.length&&(i&&(t=i({columns:t,viewportWidth:e})),this.columnModel.setColumnsPinned(t,null,"viewportSizeFeature"))}getPinnedColumnsOverflowingViewport(e){const t=this.pinnedWidthService.getPinnedRightWidth()+this.pinnedWidthService.getPinnedLeftWidth();if(t<e)return[];const i=[...this.columnModel.getDisplayedLeftColumns()],n=[...this.columnModel.getDisplayedRightColumns()];let s=0,r=0;const o=[];let a=t-0-e;for(;(r<i.length||s<n.length)&&a>0;){if(s<n.length){const e=n[s++];a-=e.getActualWidth(),o.push(e)}if(r<i.length&&a>0){const e=i[r++];a-=e.getActualWidth(),o.push(e)}}return o}checkViewportAndScrolls(){this.updateScrollVisibleService(),this.checkBodyHeight(),this.onHorizontalViewportChanged(),this.gridBodyCtrl.getScrollFeature().checkScrollLeft()}getBodyHeight(){return this.bodyHeight}checkBodyHeight(){const e=gn(this.gridBodyCtrl.getBodyViewportElement());if(this.bodyHeight!==e){this.bodyHeight=e;const t={type:dt.EVENT_BODY_HEIGHT_CHANGED};this.eventService.dispatchEvent(t)}}updateScrollVisibleService(){this.updateScrollVisibleServiceImpl(),setTimeout(this.updateScrollVisibleServiceImpl.bind(this),500)}updateScrollVisibleServiceImpl(){const e={horizontalScrollShowing:this.isHorizontalScrollShowing(),verticalScrollShowing:this.gridBodyCtrl.isVerticalScrollShowing()};this.scrollVisibleService.setScrollsVisible(e)}isHorizontalScrollShowing(){return this.centerContainerCtrl.isHorizontalScrollShowing()}onHorizontalViewportChanged(){const e=this.centerContainerCtrl.getCenterWidth(),t=this.centerContainerCtrl.getViewportScrollLeft();this.columnModel.setViewportPosition(e,t)}};m([pe("ctrlsService")],wa.prototype,"ctrlsService",2),m([pe("pinnedWidthService")],wa.prototype,"pinnedWidthService",2),m([pe("columnModel")],wa.prototype,"columnModel",2),m([pe("scrollVisibleService")],wa.prototype,"scrollVisibleService",2),m([he],wa.prototype,"postConstruct",1);var xa=class extends ot{constructor(e){super(),this.element=e}postConstruct(){this.addManagedListener(this.eventService,dt.EVENT_LEFT_PINNED_WIDTH_CHANGED,this.onPinnedLeftWidthChanged.bind(this))}onPinnedLeftWidthChanged(){const e=this.pinnedWidthService.getPinnedLeftWidth(),t=e>0;cn(this.element,t),Nn(this.element,e)}getWidth(){return this.pinnedWidthService.getPinnedLeftWidth()}};m([pe("pinnedWidthService")],xa.prototype,"pinnedWidthService",2),m([he],xa.prototype,"postConstruct",1);var Ea=class extends ot{constructor(e){super(),this.element=e}postConstruct(){this.addManagedListener(this.eventService,dt.EVENT_RIGHT_PINNED_WIDTH_CHANGED,this.onPinnedRightWidthChanged.bind(this))}onPinnedRightWidthChanged(){const e=this.pinnedWidthService.getPinnedRightWidth(),t=e>0;cn(this.element,t),Nn(this.element,e)}getWidth(){return this.pinnedWidthService.getPinnedRightWidth()}};m([pe("pinnedWidthService")],Ea.prototype,"pinnedWidthService",2),m([he],Ea.prototype,"postConstruct",1);var Ma=class extends ot{constructor(e,t){super(),this.eContainer=e,this.eViewport=t}postConstruct(){this.addManagedListener(this.eventService,dt.EVENT_ROW_CONTAINER_HEIGHT_CHANGED,this.onHeightChanged.bind(this))}onHeightChanged(){const e=this.maxDivHeightScaler.getUiContainerHeight(),t=null!=e?`${e}px`:"";this.eContainer.style.height=t,this.eViewport&&(this.eViewport.style.height=t)}};m([pe("rowContainerHeightService")],Ma.prototype,"maxDivHeightScaler",2),m([he],Ma.prototype,"postConstruct",1);var Aa=class extends ot{constructor(e){super(),this.eContainer=e}postConstruct(){this.rangeService&&(this.params={eElement:this.eContainer,onDragStart:this.rangeService.onDragStart.bind(this.rangeService),onDragStop:this.rangeService.onDragStop.bind(this.rangeService),onDragging:this.rangeService.onDragging.bind(this.rangeService)},this.addManagedPropertyListener("enableRangeSelection",e=>{e.currentValue?this.enableFeature():this.disableFeature()}),this.addDestroyFunc(()=>this.disableFeature()),this.gos.get("enableRangeSelection")&&this.enableFeature())}enableFeature(){this.dragService.addDragSource(this.params)}disableFeature(){this.dragService.removeDragSource(this.params)}};m([pe("dragService")],Aa.prototype,"dragService",2),m([ge("rangeService")],Aa.prototype,"rangeService",2),m([he],Aa.prototype,"postConstruct",1);var Ta=class extends ot{constructor(e,t=!1){super(),this.callback=e,this.addSpacer=t}postConstruct(){const e=this.setWidth.bind(this);this.addManagedPropertyListener("domLayout",e),this.addManagedListener(this.eventService,dt.EVENT_COLUMN_CONTAINER_WIDTH_CHANGED,e),this.addManagedListener(this.eventService,dt.EVENT_DISPLAYED_COLUMNS_CHANGED,e),this.addManagedListener(this.eventService,dt.EVENT_LEFT_PINNED_WIDTH_CHANGED,e),this.addSpacer&&(this.addManagedListener(this.eventService,dt.EVENT_RIGHT_PINNED_WIDTH_CHANGED,e),this.addManagedListener(this.eventService,dt.EVENT_SCROLL_VISIBILITY_CHANGED,e),this.addManagedListener(this.eventService,dt.EVENT_SCROLLBAR_WIDTH_CHANGED,e)),this.setWidth()}setWidth(){const{columnModel:e}=this,t=this.gos.isDomLayout("print"),i=e.getBodyContainerWidth(),n=e.getDisplayedColumnsLeftWidth(),s=e.getDisplayedColumnsRightWidth();let r;t?r=i+n+s:(r=i,this.addSpacer&&0===(this.gos.get("enableRtl")?n:s)&&this.scrollVisibleService.isVerticalScrollShowing()&&(r+=this.gos.getScrollbarWidth())),this.callback(r)}};m([pe("columnModel")],Ta.prototype,"columnModel",2),m([pe("scrollVisibleService")],Ta.prototype,"scrollVisibleService",2),m([he],Ta.prototype,"postConstruct",1);var Da=(e=>(e.LEFT="left",e.RIGHT="right",e.CENTER="center",e.FULL_WIDTH="fullWidth",e.TOP_LEFT="topLeft",e.TOP_RIGHT="topRight",e.TOP_CENTER="topCenter",e.TOP_FULL_WIDTH="topFullWidth",e.STICKY_TOP_LEFT="stickyTopLeft",e.STICKY_TOP_RIGHT="stickyTopRight",e.STICKY_TOP_CENTER="stickyTopCenter",e.STICKY_TOP_FULL_WIDTH="stickyTopFullWidth",e.STICKY_BOTTOM_LEFT="stickyBottomLeft",e.STICKY_BOTTOM_RIGHT="stickyBottomRight",e.STICKY_BOTTOM_CENTER="stickyBottomCenter",e.STICKY_BOTTOM_FULL_WIDTH="stickyBottomFullWidth",e.BOTTOM_LEFT="bottomLeft",e.BOTTOM_RIGHT="bottomRight",e.BOTTOM_CENTER="bottomCenter",e.BOTTOM_FULL_WIDTH="bottomFullWidth",e))(Da||{}),Ia=(e=>(e.LEFT="left",e.RIGHT="right",e.CENTER="center",e.FULL_WIDTH="fullWidth",e))(Ia||{});function Ra(e){switch(e){case"center":case"topCenter":case"stickyTopCenter":case"bottomCenter":case"stickyBottomCenter":return"center";case"left":case"topLeft":case"stickyTopLeft":case"bottomLeft":case"stickyBottomLeft":return"left";case"right":case"topRight":case"stickyTopRight":case"bottomRight":case"stickyBottomRight":return"right";case"fullWidth":case"topFullWidth":case"stickyTopFullWidth":case"bottomFullWidth":case"stickyBottomFullWidth":return"fullWidth";default:throw Error("Invalid Row Container Type")}}var La=Mt([["center","ag-center-cols-container"],["left","ag-pinned-left-cols-container"],["right","ag-pinned-right-cols-container"],["fullWidth","ag-full-width-container"],["topCenter","ag-floating-top-container"],["topLeft","ag-pinned-left-floating-top"],["topRight","ag-pinned-right-floating-top"],["topFullWidth","ag-floating-top-full-width-container"],["stickyTopCenter","ag-sticky-top-container"],["stickyTopLeft","ag-pinned-left-sticky-top"],["stickyTopRight","ag-pinned-right-sticky-top"],["stickyTopFullWidth","ag-sticky-top-full-width-container"],["stickyBottomCenter","ag-sticky-bottom-container"],["stickyBottomLeft","ag-pinned-left-sticky-bottom"],["stickyBottomRight","ag-pinned-right-sticky-bottom"],["stickyBottomFullWidth","ag-sticky-bottom-full-width-container"],["bottomCenter","ag-floating-bottom-container"],["bottomLeft","ag-pinned-left-floating-bottom"],["bottomRight","ag-pinned-right-floating-bottom"],["bottomFullWidth","ag-floating-bottom-full-width-container"]]),ka=Mt([["center","ag-center-cols-viewport"],["topCenter","ag-floating-top-viewport"],["stickyTopCenter","ag-sticky-top-viewport"],["bottomCenter","ag-floating-bottom-viewport"],["stickyBottomCenter","ag-sticky-bottom-viewport"]]),Pa=class e extends ot{constructor(e){super(),this.visible=!0,this.EMPTY_CTRLS=[],this.name=e,this.isFullWithContainer="topFullWidth"===this.name||"stickyTopFullWidth"===this.name||"stickyBottomFullWidth"===this.name||"bottomFullWidth"===this.name||"fullWidth"===this.name}static getRowContainerCssClasses(e){return{container:La.get(e),viewport:ka.get(e)}}static getPinned(e){switch(e){case"bottomLeft":case"topLeft":case"stickyTopLeft":case"stickyBottomLeft":case"left":return"left";case"bottomRight":case"topRight":case"stickyTopRight":case"stickyBottomRight":case"right":return"right";default:return null}}postConstruct(){this.enableRtl=this.gos.get("enableRtl"),this.forContainers(["center"],()=>this.viewportSizeFeature=this.createManagedBean(new wa(this)))}registerWithCtrlsService(){switch(this.name){case"fullWidth":case"topFullWidth":case"stickyTopFullWidth":case"bottomFullWidth":case"stickyBottomFullWidth":return;default:this.ctrlsService.register(this.name,this)}}forContainers(e,t){e.indexOf(this.name)>=0&&t()}getContainerElement(){return this.eContainer}getViewportSizeFeature(){return this.viewportSizeFeature}setComp(e,t,i){this.comp=e,this.eContainer=t,this.eViewport=i,this.createManagedBean(new Sa(this.eContainer)),this.addPreventScrollWhileDragging(),this.listenOnDomOrder(),this.stopHScrollOnPinnedRows();this.forContainers(["left","bottomLeft","topLeft","stickyTopLeft","stickyBottomLeft"],()=>{this.pinnedWidthFeature=this.createManagedBean(new xa(this.eContainer)),this.addManagedListener(this.eventService,dt.EVENT_LEFT_PINNED_WIDTH_CHANGED,()=>this.onPinnedWidthChanged())}),this.forContainers(["right","bottomRight","topRight","stickyTopRight","stickyBottomRight"],()=>{this.pinnedWidthFeature=this.createManagedBean(new Ea(this.eContainer)),this.addManagedListener(this.eventService,dt.EVENT_RIGHT_PINNED_WIDTH_CHANGED,()=>this.onPinnedWidthChanged())}),this.forContainers(["center","left","right","fullWidth"],()=>this.createManagedBean(new Ma(this.eContainer,"center"===this.name?i:void 0))),this.forContainers(["topCenter","topLeft","topRight","bottomCenter","bottomLeft","bottomRight","center","left","right","stickyTopCenter","stickyTopLeft","stickyTopRight","stickyBottomCenter","stickyBottomLeft","stickyBottomRight"],()=>this.createManagedBean(new Aa(this.eContainer))),this.forContainers(["center","topCenter","stickyTopCenter","bottomCenter","stickyBottomCenter"],()=>this.createManagedBean(new Ta(e=>this.comp.setContainerWidth(`${e}px`)))),this.addListeners(),this.registerWithCtrlsService()}addListeners(){this.addManagedListener(this.eventService,dt.EVENT_DISPLAYED_COLUMNS_CHANGED,()=>this.onDisplayedColumnsChanged()),this.addManagedListener(this.eventService,dt.EVENT_DISPLAYED_COLUMNS_WIDTH_CHANGED,()=>this.onDisplayedColumnsWidthChanged()),this.addManagedListener(this.eventService,dt.EVENT_DISPLAYED_ROWS_CHANGED,e=>this.onDisplayedRowsChanged(e.afterScroll)),this.onDisplayedColumnsChanged(),this.onDisplayedColumnsWidthChanged(),this.onDisplayedRowsChanged()}listenOnDomOrder(){if(["stickyTopCenter","stickyTopLeft","stickyTopRight","stickyTopFullWidth","stickyBottomCenter","stickyBottomLeft","stickyBottomRight","stickyBottomFullWidth"].indexOf(this.name)>=0)return void this.comp.setDomOrder(!0);const e=()=>{const e=this.gos.get("ensureDomOrder"),t=this.gos.isDomLayout("print");this.comp.setDomOrder(e||t)};this.addManagedPropertyListener("domLayout",e),e()}stopHScrollOnPinnedRows(){this.forContainers(["topCenter","stickyTopCenter","bottomCenter","stickyBottomCenter"],()=>{this.addManagedListener(this.eViewport,"scroll",()=>this.eViewport.scrollLeft=0)})}onDisplayedColumnsChanged(){this.forContainers(["center"],()=>this.onHorizontalViewportChanged())}onDisplayedColumnsWidthChanged(){this.forContainers(["center"],()=>this.onHorizontalViewportChanged())}addPreventScrollWhileDragging(){const e=e=>{this.dragService.isDragging()&&e.cancelable&&e.preventDefault()};this.eContainer.addEventListener("touchmove",e,{passive:!1}),this.addDestroyFunc(()=>this.eContainer.removeEventListener("touchmove",e))}onHorizontalViewportChanged(e=!1){const t=this.getCenterWidth(),i=this.getCenterViewportScrollLeft();this.columnModel.setViewportPosition(t,i,e)}getCenterWidth(){return fn(this.eViewport)}getCenterViewportScrollLeft(){return bn(this.eViewport,this.enableRtl)}registerViewportResizeListener(e){const t=this.resizeObserverService.observeResize(this.eViewport,e);this.addDestroyFunc(()=>t())}isViewportInTheDOMTree(){return En(this.eViewport)}getViewportScrollLeft(){return bn(this.eViewport,this.enableRtl)}isHorizontalScrollShowing(){return this.gos.get("alwaysShowHorizontalScroll")||Ln(this.eViewport)}getViewportElement(){return this.eViewport}setContainerTranslateX(e){this.eContainer.style.transform=`translateX(${e}px)`}getHScrollPosition(){return{left:this.eViewport.scrollLeft,right:this.eViewport.scrollLeft+this.eViewport.offsetWidth}}setCenterViewportScrollLeft(e){Sn(this.eViewport,e,this.enableRtl)}isContainerVisible(){return!e.getPinned(this.name)||!!this.pinnedWidthFeature&&this.pinnedWidthFeature.getWidth()>0}onPinnedWidthChanged(){const e=this.isContainerVisible();this.visible!=e&&(this.visible=e,this.onDisplayedRowsChanged())}onDisplayedRowsChanged(e=!1){const t=this.getRowCtrls();if(!this.visible||0===t.length)return void this.comp.setRowCtrls({rowCtrls:this.EMPTY_CTRLS});const i=this.gos.isDomLayout("print"),n=this.gos.get("embedFullWidthRows")||i,s=t.filter(e=>{const t=e.isFullWidth();return this.isFullWithContainer?!n&&t:n||!t});this.comp.setRowCtrls({rowCtrls:s,useFlushSync:e})}getRowCtrls(){switch(this.name){case"topCenter":case"topLeft":case"topRight":case"topFullWidth":return this.rowRenderer.getTopRowCtrls();case"stickyTopCenter":case"stickyTopLeft":case"stickyTopRight":case"stickyTopFullWidth":return this.rowRenderer.getStickyTopRowCtrls();case"stickyBottomCenter":case"stickyBottomLeft":case"stickyBottomRight":case"stickyBottomFullWidth":return this.rowRenderer.getStickyBottomRowCtrls();case"bottomCenter":case"bottomLeft":case"bottomRight":case"bottomFullWidth":return this.rowRenderer.getBottomRowCtrls();default:return this.rowRenderer.getCentreRowCtrls()}}};m([pe("dragService")],Pa.prototype,"dragService",2),m([pe("ctrlsService")],Pa.prototype,"ctrlsService",2),m([pe("columnModel")],Pa.prototype,"columnModel",2),m([pe("resizeObserverService")],Pa.prototype,"resizeObserverService",2),m([pe("rowRenderer")],Pa.prototype,"rowRenderer",2),m([he],Pa.prototype,"postConstruct",1);var Na=Pa,Oa=class extends ws{constructor(){super('<div class="ag-root ag-unselectable" role="treegrid">\n        <ag-header-root ref="gridHeader"></ag-header-root>\n        <div class="ag-floating-top" ref="eTop" role="presentation">\n            <ag-row-container ref="topLeftContainer" name="topLeft"></ag-row-container>\n            <ag-row-container ref="topCenterContainer" name="topCenter"></ag-row-container>\n            <ag-row-container ref="topRightContainer" name="topRight"></ag-row-container>\n            <ag-row-container ref="topFullWidthContainer" name="topFullWidth"></ag-row-container>\n        </div>\n        <div class="ag-body" ref="eBody" role="presentation">\n            <div class="ag-body-viewport" ref="eBodyViewport" role="presentation">\n                <ag-row-container ref="leftContainer" name="left"></ag-row-container>\n                <ag-row-container ref="centerContainer" name="center"></ag-row-container>\n                <ag-row-container ref="rightContainer" name="right"></ag-row-container>\n                <ag-row-container ref="fullWidthContainer" name="fullWidth"></ag-row-container>\n            </div>\n            <ag-fake-vertical-scroll></ag-fake-vertical-scroll>\n        </div>\n        <div class="ag-sticky-top" ref="eStickyTop" role="presentation">\n            <ag-row-container ref="stickyTopLeftContainer" name="stickyTopLeft"></ag-row-container>\n            <ag-row-container ref="stickyTopCenterContainer" name="stickyTopCenter"></ag-row-container>\n            <ag-row-container ref="stickyTopRightContainer" name="stickyTopRight"></ag-row-container>\n            <ag-row-container ref="stickyTopFullWidthContainer" name="stickyTopFullWidth"></ag-row-container>\n        </div>\n        <div class="ag-sticky-bottom" ref="eStickyBottom" role="presentation">\n            <ag-row-container ref="stickyBottomLeftContainer" name="stickyBottomLeft"></ag-row-container>\n            <ag-row-container ref="stickyBottomCenterContainer" name="stickyBottomCenter"></ag-row-container>\n            <ag-row-container ref="stickyBottomRightContainer" name="stickyBottomRight"></ag-row-container>\n            <ag-row-container ref="stickyBottomFullWidthContainer" name="stickyBottomFullWidth"></ag-row-container>\n        </div>\n        <div class="ag-floating-bottom" ref="eBottom" role="presentation">\n            <ag-row-container ref="bottomLeftContainer" name="bottomLeft"></ag-row-container>\n            <ag-row-container ref="bottomCenterContainer" name="bottomCenter"></ag-row-container>\n            <ag-row-container ref="bottomRightContainer" name="bottomRight"></ag-row-container>\n            <ag-row-container ref="bottomFullWidthContainer" name="bottomFullWidth"></ag-row-container>\n        </div>\n        <ag-fake-horizontal-scroll></ag-fake-horizontal-scroll>\n        <ag-overlay-wrapper></ag-overlay-wrapper>\n    </div>')}init(){const e=(e,t)=>{const i=`${e}px`;t.style.minHeight=i,t.style.height=i},t={setRowAnimationCssOnBodyViewport:(e,t)=>this.setRowAnimationCssOnBodyViewport(e,t),setColumnCount:e=>di(this.getGui(),e),setRowCount:e=>ci(this.getGui(),e),setTopHeight:t=>e(t,this.eTop),setBottomHeight:t=>e(t,this.eBottom),setTopDisplay:e=>this.eTop.style.display=e,setBottomDisplay:e=>this.eBottom.style.display=e,setStickyTopHeight:e=>this.eStickyTop.style.height=e,setStickyTopTop:e=>this.eStickyTop.style.top=e,setStickyTopWidth:e=>this.eStickyTop.style.width=e,setStickyBottomHeight:e=>this.eStickyBottom.style.height=e,setStickyBottomBottom:e=>this.eStickyBottom.style.bottom=e,setStickyBottomWidth:e=>this.eStickyBottom.style.width=e,setColumnMovingCss:(e,t)=>this.addOrRemoveCssClass(e,t),updateLayoutClasses:(e,t)=>{[this.eBodyViewport.classList,this.eBody.classList].forEach(e=>{e.toggle("ag-layout-auto-height",t.autoHeight),e.toggle("ag-layout-normal",t.normal),e.toggle("ag-layout-print",t.print)}),this.addOrRemoveCssClass("ag-layout-auto-height",t.autoHeight),this.addOrRemoveCssClass("ag-layout-normal",t.normal),this.addOrRemoveCssClass("ag-layout-print",t.print)},setAlwaysVerticalScrollClass:(e,t)=>this.eBodyViewport.classList.toggle(ia,t),registerBodyViewportResizeListener:e=>{const t=this.resizeObserverService.observeResize(this.eBodyViewport,e);this.addDestroyFunc(()=>t())},setPinnedTopBottomOverflowY:e=>this.eTop.style.overflowY=this.eBottom.style.overflowY=e,setCellSelectableCss:(e,t)=>{[this.eTop,this.eBodyViewport,this.eBottom].forEach(i=>i.classList.toggle(e,t))},setBodyViewportWidth:e=>this.eBodyViewport.style.width=e};this.ctrl=this.createManagedBean(new na),this.ctrl.setComp(t,this.getGui(),this.eBodyViewport,this.eTop,this.eBottom,this.eStickyTop,this.eStickyBottom),(this.rangeService&&this.gos.get("enableRangeSelection")||"multiple"===this.gos.get("rowSelection"))&&li(this.getGui(),!0)}setRowAnimationCssOnBodyViewport(e,t){const i=this.eBodyViewport.classList;i.toggle("ag-row-animation",t),i.toggle("ag-row-no-animation",!t)}getFloatingTopBottom(){return[this.eTop,this.eBottom]}};m([pe("resizeObserverService")],Oa.prototype,"resizeObserverService",2),m([ge("rangeService")],Oa.prototype,"rangeService",2),m([Es("eBodyViewport")],Oa.prototype,"eBodyViewport",2),m([Es("eStickyTop")],Oa.prototype,"eStickyTop",2),m([Es("eStickyBottom")],Oa.prototype,"eStickyBottom",2),m([Es("eTop")],Oa.prototype,"eTop",2),m([Es("eBottom")],Oa.prototype,"eBottom",2),m([Es("gridHeader")],Oa.prototype,"headerRootComp",2),m([Es("eBody")],Oa.prototype,"eBody",2),m([he],Oa.prototype,"init",1);var _a=class extends ot{postConstruct(){this.addManagedListener(this.eventService,dt.EVENT_DISPLAYED_COLUMNS_CHANGED,this.onDisplayedColumnsChanged.bind(this)),this.addManagedListener(this.eventService,dt.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.get("center");if(!e||this.columnAnimationService.isActive())return;const t={horizontalScrollShowing:e.isHorizontalScrollShowing(),verticalScrollShowing:this.isVerticalScrollShowing()};this.setScrollsVisible(t)}setScrollsVisible(e){if(this.horizontalScrollShowing!==e.horizontalScrollShowing||this.verticalScrollShowing!==e.verticalScrollShowing){this.horizontalScrollShowing=e.horizontalScrollShowing,this.verticalScrollShowing=e.verticalScrollShowing;const t={type:dt.EVENT_SCROLL_VISIBILITY_CHANGED};this.eventService.dispatchEvent(t)}}isHorizontalScrollShowing(){return this.horizontalScrollShowing}isVerticalScrollShowing(){return this.verticalScrollShowing}};m([pe("ctrlsService")],_a.prototype,"ctrlsService",2),m([pe("columnAnimationService")],_a.prototype,"columnAnimationService",2),m([he],_a.prototype,"postConstruct",1),_a=m([ue("scrollVisibleService")],_a);var Fa=class extends ot{constructor(){super(...arguments),this.gridInstanceId=Fa.gridInstanceSequence.next()}stampTopLevelGridCompWithGridInstance(e){e[Fa.GRID_DOM_KEY]=this.gridInstanceId}getRenderedCellForEvent(e){return et(this.gos,e.target,va.DOM_DATA_KEY_CELL_CTRL)}isEventFromThisGrid(e){return this.isElementInThisGrid(e.target)}isElementInThisGrid(e){let t=e;for(;t;){const e=t[Fa.GRID_DOM_KEY];if(S(e))return e===this.gridInstanceId;t=t.parentElement}return!1}getCellPositionForEvent(e){const t=this.getRenderedCellForEvent(e);return t?t.getCellPosition():null}getNormalisedPosition(e){const t=this.gos.isDomLayout("normal"),i=e;let n,s;if(null!=i.clientX||null!=i.clientY?(n=i.clientX,s=i.clientY):(n=i.x,s=i.y),t){const e=this.ctrlsService.getGridBodyCtrl(),t=e.getScrollFeature().getVScrollPosition();n+=e.getScrollFeature().getHScrollPosition().left,s+=t.top}return{x:n,y:s}}};Fa.gridInstanceSequence=new us,Fa.GRID_DOM_KEY="__ag_grid_instance",m([pe("ctrlsService")],Fa.prototype,"ctrlsService",2),Fa=m([ue("mouseEventService")],Fa);var Ga=class extends ot{constructor(){super(),this.onPageDown=te(this.onPageDown,100),this.onPageUp=te(this.onPageUp,100)}postConstruct(){this.ctrlsService.whenReady(e=>{this.gridBodyCon=e.gridBodyCtrl})}handlePageScrollingKey(e,t=!1){const i=e.key,n=e.altKey,s=e.ctrlKey||e.metaKey,r=!!this.rangeService&&e.shiftKey,o=this.mouseEventService.getCellPositionForEvent(e);let a=!1;switch(i){case Jn.PAGE_HOME:case Jn.PAGE_END:s||n||(this.onHomeOrEndKey(i),a=!0);break;case Jn.LEFT:case Jn.RIGHT:case Jn.UP:case Jn.DOWN:if(!o)return!1;!s||n||r||(this.onCtrlUpDownLeftRight(i,o),a=!0);break;case Jn.PAGE_DOWN:case Jn.PAGE_UP:s||n||(a=this.handlePageUpDown(i,o,t))}return a&&e.preventDefault(),a}handlePageUpDown(e,t,i){return i&&(t=this.focusService.getFocusedCell()),!!t&&(e===Jn.PAGE_UP?this.onPageUp(t):this.onPageDown(t),!0)}navigateTo(e){var t;const{scrollIndex:i,scrollType:n,scrollColumn:s,focusIndex:r,focusColumn:o}=e;S(s)&&!s.isPinned()&&this.gridBodyCon.getScrollFeature().ensureColumnVisible(s),S(i)&&this.gridBodyCon.getScrollFeature().ensureIndexVisible(i,n),e.isAsync||this.gridBodyCon.getScrollFeature().ensureIndexVisible(r),this.focusService.setFocusedCell({rowIndex:r,column:o,rowPinned:null,forceBrowserFocus:!0}),null==(t=this.rangeService)||t.setRangeToCell({rowIndex:r,rowPinned:null,column:o})}onPageDown(e){const t=this.ctrlsService.getGridBodyCtrl().getScrollFeature().getVScrollPosition(),i=this.getViewportHeight(),n=this.paginationProxy.getPixelOffset(),s=t.top+i,r=this.paginationProxy.getRowIndexAtPixel(s+n);this.columnModel.isAutoRowHeightActive()?this.navigateToNextPageWithAutoHeight(e,r):this.navigateToNextPage(e,r)}onPageUp(e){const t=this.ctrlsService.getGridBodyCtrl().getScrollFeature().getVScrollPosition(),i=this.paginationProxy.getPixelOffset(),n=t.top,s=this.paginationProxy.getRowIndexAtPixel(n+i);this.columnModel.isAutoRowHeightActive()?this.navigateToNextPageWithAutoHeight(e,s,!0):this.navigateToNextPage(e,s,!0)}navigateToNextPage(e,t,i=!1){const n=this.getViewportHeight(),s=this.paginationProxy.getPageFirstRow(),r=this.paginationProxy.getPageLastRow(),o=this.paginationProxy.getPixelOffset(),a=this.paginationProxy.getRow(e.rowIndex),l=i?(null==a?void 0:a.rowHeight)-n-o:n-o,c=(null==a?void 0:a.rowTop)+l;let h,d=this.paginationProxy.getRowIndexAtPixel(c+o);if(d===e.rowIndex){const n=i?-1:1;t=d=e.rowIndex+n}i?(h="bottom",d<s&&(d=s),t<s&&(t=s)):(h="top",d>r&&(d=r),t>r&&(t=r)),this.isRowTallerThanView(d)&&(t=d,h="top"),this.navigateTo({scrollIndex:t,scrollType:h,scrollColumn:null,focusIndex:d,focusColumn:e.column})}navigateToNextPageWithAutoHeight(e,t,i=!1){this.navigateTo({scrollIndex:t,scrollType:i?"bottom":"top",scrollColumn:null,focusIndex:t,focusColumn:e.column}),setTimeout(()=>{const n=this.getNextFocusIndexForAutoHeight(e,i);this.navigateTo({scrollIndex:t,scrollType:i?"bottom":"top",scrollColumn:null,focusIndex:n,focusColumn:e.column,isAsync:!0})},50)}getNextFocusIndexForAutoHeight(e,t=!1){var i;const n=t?-1:1,s=this.getViewportHeight(),r=this.paginationProxy.getPageLastRow();let o=0,a=e.rowIndex;for(;a>=0&&a<=r;){const e=this.paginationProxy.getRow(a);if(e){const t=null!=(i=e.rowHeight)?i:0;if(o+t>s)break;o+=t}a+=n}return Math.max(0,Math.min(a,r))}getViewportHeight(){const{gridBodyCtrl:e,center:t}=this.ctrlsService.getParams(),i=e.getScrollFeature().getVScrollPosition(),n=this.gos.getScrollbarWidth();let s=i.bottom-i.top;return t.isHorizontalScrollShowing()&&(s-=n),s}isRowTallerThanView(e){const t=this.paginationProxy.getRow(e);if(!t)return!1;const i=t.rowHeight;return"number"==typeof i&&i>this.getViewportHeight()}onCtrlUpDownLeftRight(e,t){const i=this.cellNavigationService.getNextCellToFocus(e,t,!0),{rowIndex:n,column:s}=i;this.navigateTo({scrollIndex:n,scrollType:null,scrollColumn:s,focusIndex:n,focusColumn:s})}onHomeOrEndKey(e){const t=e===Jn.PAGE_HOME,i=this.columnModel.getAllDisplayedColumns(),n=t?i[0]:Le(i),s=t?this.paginationProxy.getPageFirstRow():this.paginationProxy.getPageLastRow();this.navigateTo({scrollIndex:s,scrollType:null,scrollColumn:n,focusIndex:s,focusColumn:n})}onTabKeyDown(e,t){const i=t.shiftKey,n=this.tabToNextCellCommon(e,i,t);if(!1===n)if(i){const{rowIndex:i,rowPinned:n}=e.getRowPosition();(n?0===i:i===this.paginationProxy.getPageFirstRow())&&(0===this.gos.get("headerHeight")||this.gos.get("suppressHeaderFocus")?this.focusService.focusNextGridCoreContainer(!0,!0):(t.preventDefault(),this.focusService.focusPreviousFromFirstCell(t)))}else e instanceof va&&e.focusCell(!0),this.focusService.focusNextGridCoreContainer(i)&&t.preventDefault();else n&&t.preventDefault()}tabToNextCell(e,t){const i=this.focusService.getFocusedCell();if(!i)return!1;let n=this.getCellByPosition(i);return!!(n||(n=this.rowRenderer.getRowByPosition(i),n&&n.isFullWidth()))&&!!this.tabToNextCellCommon(n,e,t)}tabToNextCellCommon(e,t,i){let n,s=e.isEditing();if(!s&&e instanceof va){const t=e.getRowCtrl();t&&(s=t.isEditing())}return n=s?"fullRow"===this.gos.get("editType")?this.moveToNextEditingRow(e,t,i):this.moveToNextEditingCell(e,t,i):this.moveToNextCellNotEditing(e,t),null===n?n:n||!!this.focusService.getFocusedHeader()}moveToNextEditingCell(e,t,i=null){const n=e.getCellPosition();e.getGui().focus(),e.stopEditing();const s=this.findNextCellToFocusOn(n,t,!0);return!1===s?null:null!=s&&(s.startEditing(null,!0,i),s.focusCell(!1),!0)}moveToNextEditingRow(e,t,i=null){const n=e.getCellPosition(),s=this.findNextCellToFocusOn(n,t,!0);if(!1===s)return null;if(null==s)return!1;const r=s.getCellPosition(),o=this.isCellEditable(n),a=this.isCellEditable(r),l=r&&n.rowIndex===r.rowIndex&&n.rowPinned===r.rowPinned;return o&&e.setFocusOutOnEditor(),l||(e.getRowCtrl().stopEditing(),s.getRowCtrl().startRowEditing(void 0,void 0,i)),a?(s.setFocusInOnEditor(),s.focusCell()):s.focusCell(!0),!0}moveToNextCellNotEditing(e,t){const i=this.columnModel.getAllDisplayedColumns();let n;n=e instanceof ba?g(p({},e.getRowPosition()),{column:t?i[0]:Le(i)}):e.getCellPosition();const s=this.findNextCellToFocusOn(n,t,!1);if(!1===s)return null;if(s instanceof va)s.focusCell(!0);else if(s)return this.tryToFocusFullWidthRow(s.getRowPosition(),t);return S(s)}findNextCellToFocusOn(e,t,i){var n;let s=e;for(;;){e!==s&&(e=s),t||(s=this.getLastCellOfColSpan(s)),s=this.cellNavigationService.getNextTabbedCell(s,t);const r=this.gos.getCallback("tabToNextCell");if(S(r)){const n=r({backwards:t,editing:i,previousCellPosition:e,nextCellPosition:s||null});if(!0===n||null===n)null===n&&j("Returning `null` from tabToNextCell is deprecated. Return `true` to stay on the current cell, or `false` to let the browser handle the tab behaviour."),s=e;else{if(!1===n)return!1;n.floating&&(j("tabToNextCellFunc return type should have attributes: rowIndex, rowPinned, column. However you had 'floating', maybe you meant 'rowPinned'?"),n.rowPinned=n.floating),s={rowIndex:n.rowIndex,column:n.column,rowPinned:n.rowPinned}}}if(!s)return null;if(s.rowIndex<0){const e=this.headerNavigationService.getHeaderRowCount();return this.focusService.focusHeaderPosition({headerPosition:{headerRowIndex:e+s.rowIndex,column:s.column},fromCell:!0}),null}const o="fullRow"===this.gos.get("editType");if(i&&!o&&!this.isCellEditable(s))continue;this.ensureCellVisible(s);const a=this.getCellByPosition(s);if(!a){const e=this.rowRenderer.getRowByPosition(s);if(!e||!e.isFullWidth()||i)continue;return e}if(!a.isSuppressNavigable())return null==(n=this.rangeService)||n.setRangeToCell(s),a}}isCellEditable(e){const t=this.lookupRowNodeForCell(e);return!!t&&e.column.isCellEditable(t)}getCellByPosition(e){const t=this.rowRenderer.getRowByPosition(e);return t?t.getCellCtrl(e.column):null}lookupRowNodeForCell(e){return"top"===e.rowPinned?this.pinnedRowModel.getPinnedTopRow(e.rowIndex):"bottom"===e.rowPinned?this.pinnedRowModel.getPinnedBottomRow(e.rowIndex):this.paginationProxy.getRow(e.rowIndex)}navigateToNextCell(e,t,i,n){let s=i,r=!1;for(;s&&(s===i||!this.isValidNavigateCell(s));)this.gos.get("enableRtl")?t===Jn.LEFT&&(s=this.getLastCellOfColSpan(s)):t===Jn.RIGHT&&(s=this.getLastCellOfColSpan(s)),s=this.cellNavigationService.getNextCellToFocus(t,s),r=w(s);if(r&&e&&e.key===Jn.UP&&(s={rowIndex:-1,rowPinned:null,column:i.column}),n){const n=this.gos.getCallback("navigateToNextCell");if(S(n)){const r=n({key:t,previousCellPosition:i,nextCellPosition:s||null,event:e});S(r)?(r.floating&&(j("tabToNextCellFunc return type should have attributes: rowIndex, rowPinned, column. However you had 'floating', maybe you meant 'rowPinned'?"),r.rowPinned=r.floating),s={rowPinned:r.rowPinned,rowIndex:r.rowIndex,column:r.column}):s=null}}if(!s)return;if(s.rowIndex<0){const t=this.headerNavigationService.getHeaderRowCount();return void this.focusService.focusHeaderPosition({headerPosition:{headerRowIndex:t+s.rowIndex,column:i.column},event:e||void 0,fromCell:!0})}const o=this.getNormalisedPosition(s);o?this.focusPosition(o):this.tryToFocusFullWidthRow(s)}getNormalisedPosition(e){this.ensureCellVisible(e);const t=this.getCellByPosition(e);return t?(e=t.getCellPosition(),this.ensureCellVisible(e),e):null}tryToFocusFullWidthRow(e,t=!1){const i=this.columnModel.getAllDisplayedColumns(),n=this.rowRenderer.getRowByPosition(e);if(!n||!n.isFullWidth())return!1;const s=this.focusService.getFocusedCell(),r={rowIndex:e.rowIndex,rowPinned:e.rowPinned,column:e.column||(t?Le(i):i[0])};this.focusPosition(r);const o=null!=s&&this.rowPositionUtils.before(r,s),a={type:dt.EVENT_FULL_WIDTH_ROW_FOCUSED,rowIndex:r.rowIndex,rowPinned:r.rowPinned,column:r.column,isFullWidthCell:!0,floating:r.rowPinned,fromBelow:o};return this.eventService.dispatchEvent(a),!0}focusPosition(e){var t;this.focusService.setFocusedCell({rowIndex:e.rowIndex,column:e.column,rowPinned:e.rowPinned,forceBrowserFocus:!0}),null==(t=this.rangeService)||t.setRangeToCell(e)}isValidNavigateCell(e){return!!this.rowPositionUtils.getRowNode(e)}getLastCellOfColSpan(e){const t=this.getCellByPosition(e);if(!t)return e;const i=t.getColSpanningList();return 1===i.length?e:{rowIndex:e.rowIndex,column:Le(i),rowPinned:e.rowPinned}}ensureCellVisible(e){const t=this.gos.isGroupRowsSticky(),i=this.rowModel.getRow(e.rowIndex);!(t&&(null==i?void 0:i.sticky))&&w(e.rowPinned)&&this.gridBodyCon.getScrollFeature().ensureIndexVisible(e.rowIndex),e.column.isPinned()||this.gridBodyCon.getScrollFeature().ensureColumnVisible(e.column)}};m([pe("mouseEventService")],Ga.prototype,"mouseEventService",2),m([pe("paginationProxy")],Ga.prototype,"paginationProxy",2),m([pe("focusService")],Ga.prototype,"focusService",2),m([pe("columnModel")],Ga.prototype,"columnModel",2),m([pe("rowModel")],Ga.prototype,"rowModel",2),m([pe("ctrlsService")],Ga.prototype,"ctrlsService",2),m([pe("rowRenderer")],Ga.prototype,"rowRenderer",2),m([pe("headerNavigationService")],Ga.prototype,"headerNavigationService",2),m([pe("rowPositionUtils")],Ga.prototype,"rowPositionUtils",2),m([pe("cellNavigationService")],Ga.prototype,"cellNavigationService",2),m([pe("pinnedRowModel")],Ga.prototype,"pinnedRowModel",2),m([ge("rangeService")],Ga.prototype,"rangeService",2),m([he],Ga.prototype,"postConstruct",1),Ga=m([ue("navigationService")],Ga);var Va=class e extends Ar{constructor(e){super('<div class="ag-popup-editor" tabindex="-1"/>'),this.params=e}postConstruct(){this.gos.setDomData(this.getGui(),e.DOM_KEY_POPUP_EDITOR_WRAPPER,!0),this.addKeyDownListener()}addKeyDownListener(){const e=this.getGui(),t=this.params;this.addManagedListener(e,"keydown",e=>{ts(this.gos,e,t.node,t.column,!0)||t.onKeyDown(e)})}};Va.DOM_KEY_POPUP_EDITOR_WRAPPER="popupEditorWrapper",m([he],Va.prototype,"postConstruct",1);var Ba=Va,Ha=class extends ws{constructor(e,t,i,n,s){super(),this.rendererVersion=0,this.editorVersion=0,this.beans=e,this.column=t.getColumn(),this.rowNode=t.getRowNode(),this.rowCtrl=t.getRowCtrl(),this.eRow=n,this.cellCtrl=t;const r=document.createElement("div");r.setAttribute("comp-id",`${this.getCompId()}`),this.setTemplateFromElement(r);const o=this.getGui();this.forceWrapper=t.isForceWrapper(),this.refreshWrapper(!1);const a=(e,t)=>{null!=t&&""!=t?o.setAttribute(e,t):o.removeAttribute(e)};Ut(o,t.getCellAriaRole()),a("col-id",t.getColumnIdSanitised());const l=t.getTabIndex();void 0!==l&&a("tabindex",l.toString());const c={addOrRemoveCssClass:(e,t)=>this.addOrRemoveCssClass(e,t),setUserStyles:e=>Rn(o,e),getFocusableElement:()=>this.getFocusableElement(),setIncludeSelection:e=>this.includeSelection=e,setIncludeRowDrag:e=>this.includeRowDrag=e,setIncludeDndSource:e=>this.includeDndSource=e,setRenderDetails:(e,t,i)=>this.setRenderDetails(e,t,i),setEditDetails:(e,t,i)=>this.setEditDetails(e,t,i),getCellEditor:()=>this.cellEditor||null,getCellRenderer:()=>this.cellRenderer||null,getParentOfValue:()=>this.getParentOfValue()};t.setComp(c,this.getGui(),this.eCellWrapper,i,s)}getParentOfValue(){return this.eCellValue?this.eCellValue:this.eCellWrapper?this.eCellWrapper:this.getGui()}setRenderDetails(e,t,i){if(this.cellEditor&&!this.cellEditorPopupWrapper)return;this.firstRender=null==this.firstRender;const n=this.refreshWrapper(!1);this.refreshEditStyles(!1),e?!i&&!n&&this.refreshCellRenderer(e)||(this.destroyRenderer(),this.createCellRendererInstance(e)):(this.destroyRenderer(),this.insertValueWithoutCellRenderer(t))}setEditDetails(e,t,i){e?this.createCellEditorInstance(e,t,i):this.destroyEditor()}removeControls(){this.checkboxSelectionComp=this.beans.context.destroyBean(this.checkboxSelectionComp),this.dndSourceComp=this.beans.context.destroyBean(this.dndSourceComp),this.rowDraggingComp=this.beans.context.destroyBean(this.rowDraggingComp)}refreshWrapper(e){const t=this.includeRowDrag||this.includeDndSource||this.includeSelection,i=t||this.forceWrapper,n=i&&null==this.eCellWrapper;if(n){const e=document.createElement("div");e.setAttribute("role","presentation"),e.setAttribute("class","ag-cell-wrapper"),this.eCellWrapper=e,this.getGui().appendChild(this.eCellWrapper)}const s=!i&&null!=this.eCellWrapper;s&&(xn(this.eCellWrapper),this.eCellWrapper=void 0),this.addOrRemoveCssClass("ag-cell-value",!i);const r=!e&&i,o=r&&null==this.eCellValue;if(o){const e=document.createElement("span");e.setAttribute("role","presentation"),e.setAttribute("class","ag-cell-value"),this.eCellValue=e,this.eCellWrapper.appendChild(this.eCellValue)}const a=!r&&null!=this.eCellValue;a&&(xn(this.eCellValue),this.eCellValue=void 0);const l=n||s||o||a;return l&&this.removeControls(),e||t&&this.addControls(),l}addControls(){this.includeRowDrag&&null==this.rowDraggingComp&&(this.rowDraggingComp=this.cellCtrl.createRowDragComp(),this.rowDraggingComp&&this.eCellWrapper.insertBefore(this.rowDraggingComp.getGui(),this.eCellValue)),this.includeDndSource&&null==this.dndSourceComp&&(this.dndSourceComp=this.cellCtrl.createDndSource(),this.eCellWrapper.insertBefore(this.dndSourceComp.getGui(),this.eCellValue)),this.includeSelection&&null==this.checkboxSelectionComp&&(this.checkboxSelectionComp=this.cellCtrl.createSelectionCheckbox(),this.eCellWrapper.insertBefore(this.checkboxSelectionComp.getGui(),this.eCellValue))}createCellEditorInstance(e,t,i){const n=this.editorVersion,s=e.newAgStackInstance();if(!s)return;const{params:r}=e;s.then(e=>this.afterCellEditorCreated(n,e,r,t,i)),w(this.cellEditor)&&r.cellStartedEdit&&this.cellCtrl.focusCell(!0)}insertValueWithoutCellRenderer(e){const t=this.getParentOfValue();wn(t);const i=null!=e?St(e,!0):null;null!=i&&(t.textContent=i)}destroyEditorAndRenderer(){this.destroyRenderer(),this.destroyEditor()}destroyRenderer(){const{context:e}=this.beans;this.cellRenderer=e.destroyBean(this.cellRenderer),xn(this.cellRendererGui),this.cellRendererGui=null,this.rendererVersion++}destroyEditor(){const{context:e}=this.beans;this.hideEditorPopup&&this.hideEditorPopup(),this.hideEditorPopup=void 0,this.cellEditor=e.destroyBean(this.cellEditor),this.cellEditorPopupWrapper=e.destroyBean(this.cellEditorPopupWrapper),xn(this.cellEditorGui),this.cellEditorGui=null,this.editorVersion++}refreshCellRenderer(e){if(null==this.cellRenderer||null==this.cellRenderer.refresh)return!1;if(this.cellRendererClass!==e.componentClass)return!1;const t=this.cellRenderer.refresh(e.params);return!0===t||void 0===t}createCellRendererInstance(e){const t=!this.beans.gos.get("suppressAnimationFrame"),i=this.rendererVersion,{componentClass:n}=e,s=()=>{if(this.rendererVersion!==i||!this.isAlive())return;const t=e.newAgStackInstance(),s=this.afterCellRendererCreated.bind(this,i,n);t&&t.then(s)};t&&this.firstRender?this.beans.animationFrameService.createTask(s,this.rowNode.rowIndex,"createTasksP2"):s()}getCtrl(){return this.cellCtrl}getRowCtrl(){return this.rowCtrl}getCellRenderer(){return this.cellRenderer}getCellEditor(){return this.cellEditor}afterCellRendererCreated(e,t,i){if(this.isAlive()&&e===this.rendererVersion){if(this.cellRenderer=i,this.cellRendererClass=t,this.cellRendererGui=this.cellRenderer.getGui(),null!=this.cellRendererGui){const e=this.getParentOfValue();wn(e),e.appendChild(this.cellRendererGui)}}else this.beans.context.destroyBean(i)}afterCellEditorCreated(e,t,i,n,s){if(e!==this.editorVersion)return void this.beans.context.destroyBean(t);if(t.isCancelBeforeStart&&t.isCancelBeforeStart())return this.beans.context.destroyBean(t),void this.cellCtrl.stopEditing(!0);if(!t.getGui)return console.warn(`AG Grid: cellEditor for column ${this.column.getId()} is missing getGui() method`),void this.beans.context.destroyBean(t);this.cellEditor=t,this.cellEditorGui=t.getGui();const r=n||void 0!==t.isPopup&&t.isPopup();r?this.addPopupCellEditor(i,s):this.addInCellEditor(),this.refreshEditStyles(!0,r),t.afterGuiAttached&&t.afterGuiAttached()}refreshEditStyles(e,t){var i;this.addOrRemoveCssClass("ag-cell-inline-editing",e&&!t),this.addOrRemoveCssClass("ag-cell-popup-editing",e&&!!t),this.addOrRemoveCssClass("ag-cell-not-inline-editing",!e||!!t),null==(i=this.rowCtrl)||i.setInlineEditingCss(e)}addInCellEditor(){const e=this.getGui();e.contains(this.beans.gos.getActiveDomElement())&&e.focus(),this.destroyRenderer(),this.refreshWrapper(!0),this.clearParentOfValue(),this.cellEditorGui&&this.getParentOfValue().appendChild(this.cellEditorGui)}addPopupCellEditor(e,t){"fullRow"===this.beans.gos.get("editType")&&console.warn("AG Grid: popup cellEditor does not work with fullRowEdit - you cannot use them both - either turn off fullRowEdit, or stop using popup editors.");const i=this.cellEditor;this.cellEditorPopupWrapper=this.beans.context.createBean(new Ba(e));const n=this.cellEditorPopupWrapper.getGui();this.cellEditorGui&&n.appendChild(this.cellEditorGui);const s=this.beans.popupService,r=this.beans.gos.get("stopEditingWhenCellsLoseFocus"),o=null!=t?t:i.getPopupPosition?i.getPopupPosition():"over",a=this.beans.gos.get("enableRtl"),l={ePopup:n,column:this.column,rowNode:this.rowNode,type:"popupCellEditor",eventSource:this.getGui(),position:o,alignSide:a?"right":"left",keepWithinBounds:!0},c=s.positionPopupByComponent.bind(s,l),h=this.beans.localeService.getLocaleTextFunc(),d=s.addPopup({modal:r,eChild:n,closeOnEsc:!0,closedCallback:()=>{this.cellCtrl.onPopupEditorClosed()},anchorToElement:this.getGui(),positionCallback:c,ariaLabel:h("ariaLabelCellEditor","Cell Editor")});d&&(this.hideEditorPopup=d.hideFunc)}detach(){this.eRow.removeChild(this.getGui())}destroy(){this.cellCtrl.stopEditing(),this.destroyEditorAndRenderer(),this.removeControls(),super.destroy()}clearParentOfValue(){const e=this.getGui();e.contains(this.beans.gos.getActiveDomElement())&&Oi()&&e.focus({preventScroll:!0}),wn(this.getParentOfValue())}},za=class extends ws{constructor(e,t,i){super(),this.cellComps={},this.beans=t,this.rowCtrl=e;const n=document.createElement("div");n.setAttribute("comp-id",`${this.getCompId()}`),n.setAttribute("style",this.getInitialStyle(i)),this.setTemplateFromElement(n);const s=this.getGui(),r=s.style;this.domOrder=this.rowCtrl.getDomOrder(),Ut(s,"row");const o=this.rowCtrl.getTabIndex();null!=o&&s.setAttribute("tabindex",o.toString());const a={setDomOrder:e=>this.domOrder=e,setCellCtrls:e=>this.setCellCtrls(e),showFullWidth:e=>this.showFullWidth(e),getFullWidthCellRenderer:()=>this.getFullWidthCellRenderer(),addOrRemoveCssClass:(e,t)=>this.addOrRemoveCssClass(e,t),setUserStyles:e=>Rn(s,e),setTop:e=>r.top=e,setTransform:e=>r.transform=e,setRowIndex:e=>s.setAttribute("row-index",e),setRowId:e=>s.setAttribute("row-id",e),setRowBusinessKey:e=>s.setAttribute("row-business-key",e),refreshFullWidth:e=>this.refreshFullWidth(e)};e.setComp(a,this.getGui(),i),this.addDestroyFunc(()=>{e.unsetComp(i)})}getInitialStyle(e){const t=this.rowCtrl.getInitialTransform(e);return t?`transform: ${t}`:`top: ${this.rowCtrl.getInitialRowTop(e)}`}showFullWidth(e){const t=e.newAgStackInstance();t&&t.then(e=>{if(this.isAlive()){const t=e.getGui();this.getGui().appendChild(t),this.rowCtrl.setupDetailRowAutoHeight(t),this.setFullWidthRowComp(e)}else this.beans.context.destroyBean(e)})}setCellCtrls(e){const t=Object.assign({},this.cellComps);e.forEach(e=>{const i=e.getInstanceId();null==this.cellComps[i]?this.newCellComp(e):t[i]=null});const i=F(t).filter(e=>null!=e);this.destroyCells(i),this.ensureDomOrder(e)}ensureDomOrder(e){if(!this.domOrder)return;const t=[];e.forEach(e=>{const i=this.cellComps[e.getInstanceId()];i&&t.push(i.getGui())}),Dn(this.getGui(),t)}newCellComp(e){const t=new Ha(this.beans,e,this.rowCtrl.isPrintLayout(),this.getGui(),this.rowCtrl.isEditing());this.cellComps[e.getInstanceId()]=t,this.getGui().appendChild(t.getGui())}destroy(){super.destroy(),this.destroyAllCells()}destroyAllCells(){const e=F(this.cellComps).filter(e=>null!=e);this.destroyCells(e)}setFullWidthRowComp(e){this.fullWidthCellRenderer&&console.error("AG Grid - should not be setting fullWidthRowComponent twice"),this.fullWidthCellRenderer=e,this.addDestroyFunc(()=>{this.fullWidthCellRenderer=this.beans.context.destroyBean(this.fullWidthCellRenderer)})}getFullWidthCellRenderer(){return this.fullWidthCellRenderer}destroyCells(e){e.forEach(e=>{if(!e)return;const t=e.getCtrl().getInstanceId();this.cellComps[t]===e&&(e.detach(),e.destroy(),this.cellComps[t]=null)})}refreshFullWidth(e){const{fullWidthCellRenderer:t}=this;if(!t||!t.refresh)return!1;const i=e();return t.refresh(i)}},Ua=class extends ws{constructor(){super(function(){const e=ws.elementGettingCreated.getAttribute("name"),t=Na.getRowContainerCssClasses(e);let i;return i="center"===e||"topCenter"===e||"stickyTopCenter"===e||"bottomCenter"===e||"stickyBottomCenter"===e?`<div class="${t.viewport}" ref="eViewport" role="presentation">\n                <div class="${t.container}" ref="eContainer"></div>\n            </div>`:`<div class="${t.container}" ref="eContainer"></div>`,i}()),this.rowComps={},this.name=ws.elementGettingCreated.getAttribute("name"),this.type=Ra(this.name)}postConstruct(){const e={setViewportHeight:e=>this.eViewport.style.height=e,setRowCtrls:({rowCtrls:e})=>this.setRowCtrls(e),setDomOrder:e=>{this.domOrder=e},setContainerWidth:e=>this.eContainer.style.width=e};this.createManagedBean(new Na(this.name)).setComp(e,this.eContainer,this.eViewport)}preDestroy(){this.setRowCtrls([])}setRowCtrls(e){const t=p({},this.rowComps);this.rowComps={},this.lastPlacedElement=null,e.forEach(e=>{const i=e.getInstanceId(),n=t[i];if(n)this.rowComps[i]=n,delete t[i],this.ensureDomOrder(n.getGui());else{if(!e.getRowNode().displayed)return;const t=new za(e,this.beans,this.type);this.rowComps[i]=t,this.appendRow(t.getGui())}}),F(t).forEach(e=>{this.eContainer.removeChild(e.getGui()),e.destroy()}),Ut(this.eContainer,"rowgroup")}appendRow(e){this.domOrder?In(this.eContainer,e,this.lastPlacedElement):this.eContainer.appendChild(e),this.lastPlacedElement=e}ensureDomOrder(e){this.domOrder&&(Tn(this.eContainer,e,this.lastPlacedElement),this.lastPlacedElement=e)}};m([pe("beans")],Ua.prototype,"beans",2),m([Es("eViewport")],Ua.prototype,"eViewport",2),m([Es("eContainer")],Ua.prototype,"eContainer",2),m([he],Ua.prototype,"postConstruct",1),m([de],Ua.prototype,"preDestroy",1);var Wa=class{constructor(e){this.columnsToAggregate=[],this.columnsToGroup=[],this.columnsToPivot=[],this.pinned=e}onDragEnter(e){if(this.clearColumnsList(),this.gos.get("functionsReadOnly"))return;const t=e.dragItem.columns;t&&t.forEach(e=>{e.isPrimary()&&(e.isAnyFunctionActive()||(e.isAllowValue()?this.columnsToAggregate.push(e):e.isAllowRowGroup()?this.columnsToGroup.push(e):e.isAllowPivot()&&this.columnsToPivot.push(e)))})}getIconName(){return this.columnsToAggregate.length+this.columnsToGroup.length+this.columnsToPivot.length>0?this.pinned?Hr.ICON_PINNED:Hr.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")}};m([pe("columnModel")],Wa.prototype,"columnModel",2),m([pe("gridOptionsService")],Wa.prototype,"gos",2);var ja=class{static attemptMoveColumns(e){const{isFromHeader:t,hDirection:i,xPosition:n,fromEnter:s,fakeEvent:r,pinned:o,gos:a,columnModel:l}=e,c=0===i,h=1===i;let{allMovingColumns:d}=e;if(t){let e=[];d.forEach(t=>{var i;let n=null,s=t.getParent();for(;null!=s&&1===s.getDisplayedLeafColumns().length;)n=s,s=s.getParent();null!=n?((null==(i=n.getColGroupDef())?void 0:i.marryChildren)?n.getProvidedColumnGroup().getLeafColumns():n.getLeafColumns()).forEach(t=>{e.includes(t)||e.push(t)}):e.includes(t)||e.push(t)}),d=e}const u=d.slice();l.sortColumnsLikeGridColumns(u);const p=this.calculateValidMoves({movingCols:u,draggingRight:h,xPosition:n,pinned:o,gos:a,columnModel:l}),g=this.calculateOldIndex(u,l);if(0===p.length)return;const f=p[0];let m=null!==g&&!s;if(t&&(m=null!==g),m&&!r){if(c&&f>=g)return;if(h&&f<=g)return}const v=l.getAllDisplayedColumns();let y=[],C=null;for(let e=0;e<p.length;e++){const t=p[e],i=l.getProposedColumnOrder(u,t);if(!l.doesOrderPassRules(i))continue;const n=i.filter(e=>v.includes(e));if(null===C)C=n;else if(!ke(n,C))break;const s=this.groupFragCount(i);y.push({move:t,fragCount:s})}return 0!==y.length?(y.sort((e,t)=>e.fragCount-t.fragCount),this.moveColumns(d,y[0].move,"uiColumnMoved",!1,l)):void 0}static moveColumns(e,t,i,n,s){return s.moveColumns(e,t,i,n),n?null:{columns:e,toIndex:t}}static calculateOldIndex(e,t){const i=t.getAllGridColumns(),n=Ne(e.map(e=>i.indexOf(e))),s=n[0];return Le(n)-s!==n.length-1?null:s}static groupFragCount(e){function t(e){let t=[],i=e.getOriginalParent();for(;null!=i;)t.push(i),i=i.getOriginalParent();return t}let i=0;for(let n=0;n<e.length-1;n++){let s=t(e[n]),r=t(e[n+1]);[s,r]=s.length>r.length?[s,r]:[r,s],s.forEach(e=>{-1===r.indexOf(e)&&i++})}return i}static getDisplayedColumns(e,t){switch(t){case"left":return e.getDisplayedLeftColumns();case"right":return e.getDisplayedRightColumns();default:return e.getDisplayedCenterColumns()}}static calculateValidMoves(e){const{movingCols:t,draggingRight:i,xPosition:n,pinned:s,gos:r,columnModel:o}=e;if(r.get("suppressMovableColumns")||t.some(e=>e.getColDef().suppressMovable))return[];const a=this.getDisplayedColumns(o,s),l=o.getAllGridColumns(),c=a.filter(e=>Ue(t,e)),h=a.filter(e=>!Ue(t,e)),d=l.filter(e=>!Ue(t,e));let u,p=0,g=n;if(i){let e=0;c.forEach(t=>e+=t.getActualWidth()),g-=e}if(g>0){for(let e=0;e<h.length&&(g-=h[e].getActualWidth(),!(g<0));e++)p++;i&&p++}if(p>0){const e=h[p-1];u=d.indexOf(e)+1}else u=d.indexOf(h[0]),-1===u&&(u=0);const f=[u],m=(e,t)=>e-t;if(i){let e=u+1;const t=l.length-1;for(;e<=t;)f.push(e),e++;f.sort(m)}else{let e=u;const t=l.length-1;let i=l[e];for(;e<=t&&a.indexOf(i)<0;)e++,f.push(e),i=l[e];e=u-1;const n=0;for(;e>=n;)f.push(e),e--;f.sort(m).reverse()}return f}static normaliseX(e,t,i,n,s){const r=s.getHeaderRowContainerCtrl(t).getViewport();return i&&(e-=r.getBoundingClientRect().left),n.get("enableRtl")&&(e=r.clientWidth-e),null==t&&(e+=s.get("center").getCenterViewportScrollLeft()),e}},Ka=class{constructor(e){this.needToMoveLeft=!1,this.needToMoveRight=!1,this.lastMovedInfo=null,this.pinned=e,this.isCenterContainer=!S(e)}init(){this.ctrlsService.whenReady(e=>{this.gridBodyCon=e.gridBodyCtrl})}getIconName(){return this.pinned?Hr.ICON_PINNED:Hr.ICON_MOVE}onDragEnter(e){const t=e.dragItem.columns;if(0===e.dragSource.type)this.setColumnsVisible(t,!0,"uiColumnDragged");else{const i=e.dragItem.visibleState,n=(t||[]).filter(e=>i[e.getId()]);this.setColumnsVisible(n,!0,"uiColumnDragged")}this.setColumnsPinned(t,this.pinned,"uiColumnDragged"),this.onDragging(e,!0,!0)}onDragLeave(){this.ensureIntervalCleared(),this.lastMovedInfo=null}setColumnsVisible(e,t,i){if(e){const n=e.filter(e=>!e.getColDef().lockVisible);this.columnModel.setColumnsVisible(n,t,i)}}setColumnsPinned(e,t,i){if(e){const n=e.filter(e=>!e.getColDef().lockPinned);this.columnModel.setColumnsPinned(n,t,i)}}onDragStop(){this.onDragging(this.lastDraggingEvent,!1,!0,!0),this.ensureIntervalCleared(),this.lastMovedInfo=null}checkCenterForScrolling(e){if(this.isCenterContainer){const t=this.ctrlsService.get("center"),i=t.getCenterViewportScrollLeft(),n=i+t.getCenterWidth();this.gos.get("enableRtl")?(this.needToMoveRight=e<i+50,this.needToMoveLeft=e>n-50):(this.needToMoveLeft=e<i+50,this.needToMoveRight=e>n-50),this.needToMoveLeft||this.needToMoveRight?this.ensureIntervalStarted():this.ensureIntervalCleared()}}onDragging(e=this.lastDraggingEvent,t=!1,i=!1,n=!1){var s;if(n){if(this.lastMovedInfo){const{columns:e,toIndex:t}=this.lastMovedInfo;ja.moveColumns(e,t,"uiColumnMoved",!0,this.columnModel)}return}if(this.lastDraggingEvent=e,w(e.hDirection))return;const r=ja.normaliseX(e.x,this.pinned,!1,this.gos,this.ctrlsService);t||this.checkCenterForScrolling(r);const o=this.normaliseDirection(e.hDirection),a=e.dragSource.type,l=(null==(s=e.dragSource.getDragItem().columns)?void 0:s.filter(e=>!e.getColDef().lockPinned||e.getPinned()==this.pinned))||[],c=ja.attemptMoveColumns({allMovingColumns:l,isFromHeader:1===a,hDirection:o,xPosition:r,pinned:this.pinned,fromEnter:t,fakeEvent:i,gos:this.gos,columnModel:this.columnModel});c&&(this.lastMovedInfo=c)}normaliseDirection(e){if(!this.gos.get("enableRtl"))return e;switch(e){case 0:return 1;case 1:return 0;default:console.error(`AG Grid: Unknown direction ${e}`)}}ensureIntervalStarted(){this.movingIntervalId||(this.intervalCount=0,this.failedMoveAttempts=0,this.movingIntervalId=window.setInterval(this.moveInterval.bind(this),100),this.needToMoveLeft?this.dragAndDropService.setGhostIcon(Hr.ICON_LEFT,!0):this.dragAndDropService.setGhostIcon(Hr.ICON_RIGHT,!0))}ensureIntervalCleared(){this.movingIntervalId&&(window.clearInterval(this.movingIntervalId),this.movingIntervalId=null,this.dragAndDropService.setGhostIcon(Hr.ICON_MOVE))}moveInterval(){let e;this.intervalCount++,e=10+5*this.intervalCount,e>100&&(e=100);let t=null;const i=this.gridBodyCon.getScrollFeature();if(this.needToMoveLeft?t=i.scrollHorizontally(-e):this.needToMoveRight&&(t=i.scrollHorizontally(e)),0!==t)this.onDragging(this.lastDraggingEvent),this.failedMoveAttempts=0;else{this.failedMoveAttempts++;const e=this.lastDraggingEvent.dragItem.columns.filter(e=>!e.getColDef().lockPinned);if(e.length>0&&(this.dragAndDropService.setGhostIcon(Hr.ICON_PINNED),this.failedMoveAttempts>7)){const t=this.needToMoveLeft?"left":"right";this.setColumnsPinned(e,t,"uiColumnDragged"),this.dragAndDropService.nudge()}}}};m([pe("columnModel")],Ka.prototype,"columnModel",2),m([pe("dragAndDropService")],Ka.prototype,"dragAndDropService",2),m([pe("gridOptionsService")],Ka.prototype,"gos",2),m([pe("ctrlsService")],Ka.prototype,"ctrlsService",2),m([he],Ka.prototype,"init",1);var $a=class extends ot{constructor(e,t){super(),this.pinned=e,this.eContainer=t}postConstruct(){this.ctrlsService.whenReady(e=>{switch(this.pinned){case"left":this.eSecondaryContainers=[[e.gridBodyCtrl.getBodyViewportElement(),e.left.getContainerElement()],[e.bottomLeft.getContainerElement()],[e.topLeft.getContainerElement()]];break;case"right":this.eSecondaryContainers=[[e.gridBodyCtrl.getBodyViewportElement(),e.right.getContainerElement()],[e.bottomRight.getContainerElement()],[e.topRight.getContainerElement()]];break;default:this.eSecondaryContainers=[[e.gridBodyCtrl.getBodyViewportElement(),e.center.getViewportElement()],[e.bottomCenter.getViewportElement()],[e.topCenter.getViewportElement()]]}})}isInterestedIn(e){return 1===e||0===e&&this.gos.get("allowDragFromColumnsToolPanel")}getSecondaryContainers(){return this.eSecondaryContainers}getContainer(){return this.eContainer}init(){this.moveColumnFeature=this.createManagedBean(new Ka(this.pinned)),this.bodyDropPivotTarget=this.createManagedBean(new Wa(this.pinned)),this.dragAndDropService.addDropTarget(this)}getIconName(){return this.currentDropListener.getIconName()}isDropColumnInPivotMode(e){return this.columnModel.isPivotMode()&&0===e.dragSource.type}onDragEnter(e){this.currentDropListener=this.isDropColumnInPivotMode(e)?this.bodyDropPivotTarget:this.moveColumnFeature,this.currentDropListener.onDragEnter(e)}onDragLeave(e){this.currentDropListener.onDragLeave(e)}onDragging(e){this.currentDropListener.onDragging(e)}onDragStop(e){this.currentDropListener.onDragStop(e)}};m([pe("dragAndDropService")],$a.prototype,"dragAndDropService",2),m([pe("columnModel")],$a.prototype,"columnModel",2),m([pe("ctrlsService")],$a.prototype,"ctrlsService",2),m([he],$a.prototype,"postConstruct",1),m([he],$a.prototype,"init",1);var Ya=class e extends qo{constructor(t){super(e.TEMPLATE,t),this.headerCompVersion=0,this.column=t.getColumnGroupChild(),this.pinned=t.getPinned()}postConstruct(){const e=this.getGui();var t,i;t="col-id",null!=(i=this.column.getColId())&&""!=i?e.setAttribute(t,i):e.removeAttribute(t);const n={setWidth:t=>e.style.width=t,addOrRemoveCssClass:(e,t)=>this.addOrRemoveCssClass(e,t),setAriaSort:t=>t?gi(e,t):fi(e),setUserCompDetails:e=>this.setUserCompDetails(e),getUserCompInstance:()=>this.headerComp};this.ctrl.setComp(n,this.getGui(),this.eResize,this.eHeaderCompWrapper);const s=this.ctrl.getSelectAllGui();this.eResize.insertAdjacentElement("afterend",s)}destroyHeaderComp(){this.headerComp&&(this.eHeaderCompWrapper.removeChild(this.headerCompGui),this.headerComp=this.destroyBean(this.headerComp),this.headerCompGui=void 0)}setUserCompDetails(e){this.headerCompVersion++;const t=this.headerCompVersion;e.newAgStackInstance().then(e=>this.afterCompCreated(t,e))}afterCompCreated(e,t){e==this.headerCompVersion&&this.isAlive()?(this.destroyHeaderComp(),this.headerComp=t,this.headerCompGui=t.getGui(),this.eHeaderCompWrapper.appendChild(this.headerCompGui),this.ctrl.setDragSource(this.getGui())):this.destroyBean(t)}};Ya.TEMPLATE='<div class="ag-header-cell" role="columnheader">\n            <div ref="eResize" class="ag-header-cell-resize" role="presentation"></div>\n            <div ref="eHeaderCompWrapper" class="ag-header-cell-comp-wrapper" role="presentation"></div>\n        </div>',m([Es("eResize")],Ya.prototype,"eResize",2),m([Es("eHeaderCompWrapper")],Ya.prototype,"eHeaderCompWrapper",2),m([he],Ya.prototype,"postConstruct",1),m([de],Ya.prototype,"destroyHeaderComp",1);var qa=Ya,Xa=class e extends qo{constructor(t){super(e.TEMPLATE,t)}postConstruct(){const e=this.getGui();e.setAttribute("col-id",this.ctrl.getColId());const t={addOrRemoveCssClass:(e,t)=>this.addOrRemoveCssClass(e,t),setResizableDisplayed:e=>cn(this.eResize,e),setWidth:t=>e.style.width=t,setAriaExpanded:t=>{return i="aria-expanded",null!=(n=t)?e.setAttribute(i,n):e.removeAttribute(i);var i,n},setUserCompDetails:e=>this.setUserCompDetails(e),getUserCompInstance:()=>this.headerGroupComp};this.ctrl.setComp(t,e,this.eResize)}setUserCompDetails(e){e.newAgStackInstance().then(e=>this.afterHeaderCompCreated(e))}afterHeaderCompCreated(e){const t=()=>this.destroyBean(e);if(!this.isAlive())return void t();const i=this.getGui(),n=e.getGui();i.appendChild(n),this.addDestroyFunc(t),this.headerGroupComp=e,this.ctrl.setDragSource(i)}};Xa.TEMPLATE='<div class="ag-header-group-cell" role="columnheader">\n            <div ref="eResize" class="ag-header-cell-resize" role="presentation"></div>\n        </div>',m([Es("eResize")],Xa.prototype,"eResize",2),m([he],Xa.prototype,"postConstruct",1);var Za=Xa,Qa=(e=>(e.COLUMN_GROUP="group",e.COLUMN="column",e.FLOATING_FILTER="filter",e))(Qa||{}),Ja=class extends ws{constructor(e){super(),this.headerComps={},this.ctrl=e,this.setTemplate(`<div class="${this.ctrl.getHeaderRowClass()}" role="row"></div>`)}init(){hi(this.getGui(),this.ctrl.getAriaRowIndex());const e={setHeight:e=>this.getGui().style.height=e,setTop:e=>this.getGui().style.top=e,setHeaderCtrls:(e,t)=>this.setHeaderCtrls(e,t),setWidth:e=>this.getGui().style.width=e};this.ctrl.setComp(e)}destroyHeaderCtrls(){this.setHeaderCtrls([],!1)}setHeaderCtrls(e,t){if(!this.isAlive())return;const i=this.headerComps;if(this.headerComps={},e.forEach(e=>{const t=e.getInstanceId();let n=i[t];delete i[t],null==n&&(n=this.createHeaderComp(e),this.getGui().appendChild(n.getGui())),this.headerComps[t]=n}),N(i,(e,t)=>{this.getGui().removeChild(t.getGui()),this.destroyBean(t)}),t){const e=F(this.headerComps);e.sort((e,t)=>e.getCtrl().getColumnGroupChild().getLeft()-t.getCtrl().getColumnGroupChild().getLeft());const t=e.map(e=>e.getGui());Dn(this.getGui(),t)}}createHeaderComp(e){let t;switch(this.ctrl.getType()){case"group":t=new Za(e);break;case"filter":t=new Zo(e);break;default:t=new qa(e)}return this.createBean(t),t.setParentComponent(this),t}};m([he],Ja.prototype,"init",1),m([de],Ja.prototype,"destroyHeaderCtrls",1);var el=0,tl=class e extends ot{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()+"-"+el++}postConstruct(){this.addManagedPropertyListeners(["suppressHeaderFocus"],()=>this.refreshTabIndex())}shouldStopEventPropagation(e){const{headerRowIndex:t,column:i}=this.focusService.getFocusedHeader();return is(this.gos,e,t,i)}getWrapperHasFocus(){return this.gos.getActiveDomElement()===this.eGui}setGui(e){this.eGui=e,this.addDomData(),this.addManagedListener(this.beans.eventService,dt.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;ga.refreshFirstAndLastStyles(e,t,i.columnModel)}refreshAriaColIndex(){const{beans:e,column:t}=this,i=e.columnModel.getAriaColumnIndex(t);ui(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.gos.get("suppressHeaderFocus")?this.eGui.removeAttribute("tabindex"):this.eGui.setAttribute("tabindex","-1")}onGuiKeyDown(e){var t;const i=this.gos.getActiveDomElement(),n=e.key===Jn.LEFT||e.key===Jn.RIGHT;if(this.isResizing&&(e.preventDefault(),e.stopImmediatePropagation()),i!==this.eGui||!e.shiftKey&&!e.altKey)return;if((this.isResizing||n)&&(e.preventDefault(),e.stopImmediatePropagation()),!n)return;const s=e.key===Jn.LEFT!==this.gos.get("enableRtl"),r=Vr[s?"Left":"Right"];if(e.altKey){this.isResizing=!0,this.resizeMultiplier+=1;const i=this.getViewportAdjustedResizeDiff(e);this.resizeHeader(i,e.shiftKey),null==(t=this.resizeFeature)||t.toggleColumnResizing(!0)}else this.moveHeader(r)}getViewportAdjustedResizeDiff(e){let t=this.getResizeDiff(e);if(this.column.getPinned()){const e=this.pinnedWidthService.getPinnedLeftWidth(),i=this.pinnedWidthService.getPinnedRightWidth(),n=fn(this.ctrlsService.getGridBodyCtrl().getBodyViewportElement())-50;if(e+i+t>n){if(!(n>e+i))return 0;t=n-e-i}}return t}getResizeDiff(e){let t=e.key===Jn.LEFT!==this.gos.get("enableRtl");const i=this.column.getPinned(),n=this.gos.get("enableRtl");return i&&n!==("right"===i)&&(t=!t),(t?-1:1)*this.resizeMultiplier}onGuiKeyUp(){this.isResizing&&(this.resizeToggleTimeout&&(window.clearTimeout(this.resizeToggleTimeout),this.resizeToggleTimeout=0),this.isResizing=!1,this.resizeMultiplier=1,this.resizeToggleTimeout=setTimeout(()=>{var e;null==(e=this.resizeFeature)||e.toggleColumnResizing(!1)},150))}handleKeyDown(e){const t=this.getWrapperHasFocus();switch(e.key){case Jn.PAGE_DOWN:case Jn.PAGE_UP:case Jn.PAGE_HOME:case Jn.PAGE_END:t&&e.preventDefault()}}addDomData(){const t=e.DOM_DATA_KEY_HEADER_CTRL;this.gos.setDomData(this.eGui,t,this),this.addDestroyFunc(()=>this.gos.setDomData(this.eGui,t,null))}getGui(){return this.eGui}focus(e){return!!this.eGui&&(this.lastFocusEvent=e||null,this.eGui.focus(),!0)}getRowIndex(){return this.parentRowCtrl.getRowIndex()}getParentRowCtrl(){return this.parentRowCtrl}getPinned(){return this.parentRowCtrl.getPinned()}getInstanceId(){return this.instanceId}getColumnGroupChild(){return this.columnGroupChild}removeDragSource(){this.dragSource&&(this.dragAndDropService.removeDragSource(this.dragSource),this.dragSource=null)}handleContextMenuMouseEvent(e,t,i){const n=null!=e?e:t;this.gos.get("preventDefaultOnContextMenu")&&n.preventDefault();const s=i instanceof Ee?i:void 0;this.menuService.isHeaderContextMenuEnabled(s)&&this.menuService.showHeaderContextMenu(s,e,t),this.dispatchColumnMouseEvent(dt.EVENT_COLUMN_HEADER_CONTEXT_MENU,i)}dispatchColumnMouseEvent(e,t){const i={type:e,column:t};this.eventService.dispatchEvent(i)}destroy(){super.destroy(),this.removeDragSource(),this.comp=null,this.column=null,this.resizeFeature=null,this.lastFocusEvent=null,this.columnGroupChild=null,this.parentRowCtrl=null,this.eGui=null}};tl.DOM_DATA_KEY_HEADER_CTRL="headerCtrl",m([pe("pinnedWidthService")],tl.prototype,"pinnedWidthService",2),m([pe("focusService")],tl.prototype,"focusService",2),m([pe("userComponentFactory")],tl.prototype,"userComponentFactory",2),m([pe("ctrlsService")],tl.prototype,"ctrlsService",2),m([pe("dragAndDropService")],tl.prototype,"dragAndDropService",2),m([pe("menuService")],tl.prototype,"menuService",2),m([he],tl.prototype,"postConstruct",1);var il=tl,nl=class extends ot{constructor(e,t,i,n){super(),this.columnOrGroup=e,this.eCell=t,this.ariaEl=this.eCell.querySelector("[role=columnheader]")||this.eCell,this.colsSpanning=n,this.beans=i}setColsSpanning(e){this.colsSpanning=e,this.onLeftChanged()}getColumnOrGroup(){return this.beans.gos.get("enableRtl")&&this.colsSpanning?Le(this.colsSpanning):this.columnOrGroup}postConstruct(){this.addManagedListener(this.columnOrGroup,Ee.EVENT_LEFT_CHANGED,this.onLeftChanged.bind(this)),this.setLeftFirstTime(),this.addManagedListener(this.eventService,dt.EVENT_DISPLAYED_COLUMNS_WIDTH_CHANGED,this.onLeftChanged.bind(this)),this.addManagedPropertyListener("domLayout",this.onLeftChanged.bind(this))}setLeftFirstTime(){const e=this.beans.gos.get("suppressColumnMoveAnimation"),t=S(this.columnOrGroup.getOldLeft());this.beans.columnAnimationService.isActive()&&t&&!e?this.animateInLeft():this.onLeftChanged()}animateInLeft(){const e=this.getColumnOrGroup(),t=e.getLeft(),i=e.getOldLeft(),n=this.modifyLeftForPrintLayout(e,i),s=this.modifyLeftForPrintLayout(e,t);this.setLeft(n),this.actualLeft=s,this.beans.columnAnimationService.executeNextVMTurn(()=>{this.actualLeft===s&&this.setLeft(s)})}onLeftChanged(){const e=this.getColumnOrGroup(),t=e.getLeft();this.actualLeft=this.modifyLeftForPrintLayout(e,t),this.setLeft(this.actualLeft)}modifyLeftForPrintLayout(e,t){if(!this.beans.gos.isDomLayout("print"))return t;if("left"===e.getPinned())return t;const i=this.beans.columnModel.getDisplayedColumnsLeftWidth();return"right"===e.getPinned()?i+this.beans.columnModel.getBodyContainerWidth()+t:i+t}setLeft(e){let t;if(S(e)&&(this.eCell.style.left=`${e}px`),this.columnOrGroup instanceof Ee)t=this.columnOrGroup;else{const e=this.columnOrGroup.getLeafColumns();if(!e.length)return;e.length>1&&pi(this.ariaEl,e.length),t=e[0]}}};m([he],nl.prototype,"postConstruct",1);var sl=class extends ot{constructor(e,t){super(),this.columns=e,this.element=t}postConstruct(){this.gos.get("columnHoverHighlight")&&this.addMouseHoverListeners()}addMouseHoverListeners(){this.addManagedListener(this.element,"mouseout",this.onMouseOut.bind(this)),this.addManagedListener(this.element,"mouseover",this.onMouseOver.bind(this))}onMouseOut(){this.columnHoverService.clearMouseOver()}onMouseOver(){this.columnHoverService.setMouseOver(this.columns)}};m([pe("columnHoverService")],sl.prototype,"columnHoverService",2),m([he],sl.prototype,"postConstruct",1);var rl=class extends il{constructor(e,t,i){super(e,t,i),this.iconCreated=!1,this.column=e}setComp(e,t,i,n){this.comp=e,this.eButtonShowMainFilter=i,this.eFloatingFilterBody=n,this.setGui(t),this.setupActive(),this.setupWidth(),this.setupLeft(),this.setupHover(),this.setupFocus(),this.setupAria(),this.setupFilterButton(),this.setupUserComp(),this.setupSyncWithFilter(),this.setupUi(),this.addManagedListener(this.eButtonShowMainFilter,"click",this.showParentFilter.bind(this)),this.setupFilterChangedListener(),this.addManagedListener(this.column,Ee.EVENT_COL_DEF_CHANGED,this.onColDefChanged.bind(this))}resizeHeader(){}moveHeader(){}setupActive(){const e=this.column.getColDef(),t=!!e.filter,i=!!e.floatingFilter;this.active=t&&i}setupUi(){if(this.comp.setButtonWrapperDisplayed(!this.suppressFilterButton&&this.active),this.comp.addOrRemoveBodyCssClass("ag-floating-filter-full-body",this.suppressFilterButton),this.comp.addOrRemoveBodyCssClass("ag-floating-filter-body",!this.suppressFilterButton),!this.active||this.iconCreated)return;const e=Zn("filter",this.gos,this.column);e&&(this.iconCreated=!0,this.eButtonShowMainFilter.appendChild(e))}setupFocus(){this.createManagedBean(new Ls(this.eGui,{shouldStopEventPropagation:this.shouldStopEventPropagation.bind(this),onTabKeyDown:this.onTabKeyDown.bind(this),handleKeyDown:this.handleKeyDown.bind(this),onFocusIn:this.onFocusIn.bind(this)}))}setupAria(){const e=this.localeService.getLocaleTextFunc();Yt(this.eButtonShowMainFilter,e("ariaFilterMenuOpen","Open Filter Menu"))}onTabKeyDown(e){if(this.gos.getActiveDomElement()===this.eGui)return;const t=this.focusService.findNextFocusableElement(this.eGui,null,e.shiftKey);if(t)return this.beans.headerNavigationService.scrollToColumn(this.column),e.preventDefault(),void t.focus();const i=this.findNextColumnWithFloatingFilter(e.shiftKey);i&&this.focusService.focusHeaderPosition({headerPosition:{headerRowIndex:this.getParentRowCtrl().getRowIndex(),column:i},event:e})&&e.preventDefault()}findNextColumnWithFloatingFilter(e){const t=this.beans.columnModel;let i=this.column;do{if(i=e?t.getDisplayedColBefore(i):t.getDisplayedColAfter(i),!i)break}while(!i.getColDef().filter||!i.getColDef().floatingFilter);return i}handleKeyDown(e){super.handleKeyDown(e);const t=this.getWrapperHasFocus();switch(e.key){case Jn.UP:case Jn.DOWN:t||e.preventDefault();case Jn.LEFT:case Jn.RIGHT:if(t)return;e.stopPropagation();case Jn.ENTER:t&&this.focusService.focusInto(this.eGui)&&e.preventDefault();break;case Jn.ESCAPE:t||this.eGui.focus()}}onFocusIn(e){if(this.eGui.contains(e.relatedTarget))return;const t=!!e.relatedTarget&&!e.relatedTarget.classList.contains("ag-floating-filter"),i=!!e.relatedTarget&&un(e.relatedTarget,"ag-floating-filter");if(t&&i&&e.target===this.eGui){const e=this.lastFocusEvent,t=!(!e||e.key!==Jn.TAB);if(e&&t){const t=e.shiftKey;this.focusService.focusInto(this.eGui,t)}}const n=this.getRowIndex();this.beans.focusService.setFocusedHeader(n,this.column)}setupHover(){this.createManagedBean(new sl([this.column],this.eGui));const e=()=>{if(!this.gos.get("columnHoverHighlight"))return;const e=this.beans.columnHoverService.isHovered(this.column);this.comp.addOrRemoveCssClass("ag-column-hover",e)};this.addManagedListener(this.eventService,dt.EVENT_COLUMN_HOVER_CHANGED,e),e()}setupLeft(){const e=new nl(this.column,this.eGui,this.beans);this.createManagedBean(e)}setupFilterButton(){this.suppressFilterButton=!this.menuService.isFloatingFilterButtonEnabled(this.column),this.highlightFilterButtonWhenActive=!this.menuService.isLegacyMenuEnabled()}setupUserComp(){if(!this.active)return;const e=this.beans.filterManager.getFloatingFilterCompDetails(this.column,()=>this.showParentFilter());e&&this.setCompDetails(e)}setCompDetails(e){this.userCompDetails=e,this.comp.setCompDetails(e)}showParentFilter(){const e=this.suppressFilterButton?this.eFloatingFilterBody:this.eButtonShowMainFilter;this.menuService.showFilterMenu({column:this.column,buttonElement:e,containerType:"floatingFilter",positionBy:"button"})}setupSyncWithFilter(){if(!this.active)return;const{filterManager:e}=this.beans,t=t=>{if("filterDestroyed"===(null==t?void 0:t.source)&&this.context.isDestroyed())return;const i=this.comp.getFloatingFilterComp();i&&i.then(i=>{var n;if(i){const s=e.getCurrentFloatingFilterParentModel(this.column);i.onParentModelChanged(s,t?this.gos.addGridCommonParams({columns:null!=(n=t.columns)?n:[],type:dt.EVENT_FILTER_CHANGED,source:"api"===t.source?"api":"columnFilter"}):null)}})};this.destroySyncListener=this.addManagedListener(this.column,Ee.EVENT_FILTER_CHANGED,t),e.isFilterActive(this.column)&&t(null)}setupWidth(){const e=()=>{const e=`${this.column.getActualWidth()}px`;this.comp.setWidth(e)};this.addManagedListener(this.column,Ee.EVENT_WIDTH_CHANGED,e),e()}setupFilterChangedListener(){this.active&&(this.destroyFilterChangedListener=this.addManagedListener(this.column,Ee.EVENT_FILTER_CHANGED,this.updateFilterButton.bind(this)),this.updateFilterButton())}updateFilterButton(){if(!this.suppressFilterButton&&this.comp){const e=this.beans.filterManager.isFilterAllowed(this.column);this.comp.setButtonWrapperDisplayed(e),this.highlightFilterButtonWhenActive&&e&&this.eButtonShowMainFilter.classList.toggle("ag-filter-active",this.column.isFilterActive())}}onColDefChanged(){var e,t;const i=this.active;this.setupActive();const n=!i&&this.active;i&&!this.active&&(null==(e=this.destroySyncListener)||e.call(this),null==(t=this.destroyFilterChangedListener)||t.call(this));const s=this.active?this.beans.filterManager.getFloatingFilterCompDetails(this.column,()=>this.showParentFilter()):null,r=this.comp.getFloatingFilterComp();r&&s?r.then(e=>{var t;!e||this.beans.filterManager.areFilterCompsDifferent(null!=(t=this.userCompDetails)?t:null,s)?this.updateCompDetails(s,n):this.updateFloatingFilterParams(s)}):this.updateCompDetails(s,n)}updateCompDetails(e,t){this.isAlive()&&(this.setCompDetails(e),this.setupFilterButton(),this.setupUi(),t&&(this.setupSyncWithFilter(),this.setupFilterChangedListener()))}updateFloatingFilterParams(e){var t;if(!e)return;const i=e.params;null==(t=this.comp.getFloatingFilterComp())||t.then(e=>{let t=!1;(null==e?void 0:e.refresh)&&"function"==typeof e.refresh&&null!==e.refresh(i)&&(t=!0),!t&&(null==e?void 0:e.onParamsUpdated)&&"function"==typeof e.onParamsUpdated&&null!==e.onParamsUpdated(i)&&j("Custom floating filter method 'onParamsUpdated' is deprecated. Use 'refresh' instead.")})}destroy(){super.destroy(),this.eButtonShowMainFilter=null,this.eFloatingFilterBody=null,this.userCompDetails=null,this.destroySyncListener=null,this.destroyFilterChangedListener=null}},ol=class extends ot{constructor(e,t,i,n,s){super(),this.pinned=e,this.column=t,this.eResize=i,this.comp=n,this.ctrl=s}postConstruct(){const e=[];let t,i;const n=()=>{if(cn(this.eResize,t),!t)return;const n=this.horizontalResizeService.addResizeBar({eResizeBar:this.eResize,onResizeStart:this.onResizeStart.bind(this),onResizing:this.onResizing.bind(this,!1),onResizeEnd:this.onResizing.bind(this,!0)});if(e.push(n),i){const t=this.gos.get("skipHeaderOnAutoSize"),i=()=>{this.columnModel.autoSizeColumn(this.column,"uiColumnResized",t)};this.eResize.addEventListener("dblclick",i);const n=new Cr(this.eResize);n.addEventListener(Cr.EVENT_DOUBLE_TAP,i),e.push(()=>{this.eResize.removeEventListener("dblclick",i),n.removeEventListener(Cr.EVENT_DOUBLE_TAP,i),n.destroy()})}},s=()=>{e.forEach(e=>e()),e.length=0},r=()=>{const e=this.column.isResizable(),r=!this.gos.get("suppressAutoSize")&&!this.column.getColDef().suppressAutoSize;(e!==t||r!==i)&&(t=e,i=r,s(),n())};r(),this.addDestroyFunc(s),this.ctrl.addRefreshFunction(r)}onResizing(e,t){const{column:i,lastResizeAmount:n,resizeStartWidth:s}=this,r=this.normaliseResizeAmount(t),o=[{key:i,newWidth:s+r}];this.column.getPinned()&&this.pinnedWidthService.getPinnedLeftWidth()+this.pinnedWidthService.getPinnedRightWidth()+(r-n)>fn(this.ctrlsService.getGridBodyCtrl().getBodyViewportElement())-50||(this.lastResizeAmount=r,this.columnModel.setColumnWidths(o,this.resizeWithShiftKey,e,"uiColumnResized"),e&&this.toggleColumnResizing(!1))}onResizeStart(e){this.resizeStartWidth=this.column.getActualWidth(),this.lastResizeAmount=0,this.resizeWithShiftKey=e,this.toggleColumnResizing(!0)}toggleColumnResizing(e){this.comp.addOrRemoveCssClass("ag-column-resizing",e)}normaliseResizeAmount(e){let t=e;const i="left"!==this.pinned,n="right"===this.pinned;return this.gos.get("enableRtl")?i&&(t*=-1):n&&(t*=-1),t}};m([pe("horizontalResizeService")],ol.prototype,"horizontalResizeService",2),m([pe("pinnedWidthService")],ol.prototype,"pinnedWidthService",2),m([pe("ctrlsService")],ol.prototype,"ctrlsService",2),m([pe("columnModel")],ol.prototype,"columnModel",2),m([he],ol.prototype,"postConstruct",1);var al=class extends ot{constructor(e){super(),this.cbSelectAllVisible=!1,this.processingEventFromCheckbox=!1,this.column=e}onSpaceKeyDown(e){const t=this.cbSelectAll;t.isDisplayed()&&!t.getGui().contains(this.gos.getActiveDomElement())&&(e.preventDefault(),t.setValue(!t.getValue()))}getCheckboxGui(){return this.cbSelectAll.getGui()}setComp(e){this.headerCellCtrl=e,this.cbSelectAll=this.createManagedBean(new js),this.cbSelectAll.addCssClass("ag-header-select-all"),Ut(this.cbSelectAll.getGui(),"presentation"),this.showOrHideSelectAll(),this.addManagedListener(this.eventService,dt.EVENT_NEW_COLUMNS_LOADED,this.onNewColumnsLoaded.bind(this)),this.addManagedListener(this.eventService,dt.EVENT_DISPLAYED_COLUMNS_CHANGED,this.onDisplayedColumnsChanged.bind(this)),this.addManagedListener(this.eventService,dt.EVENT_SELECTION_CHANGED,this.onSelectionChanged.bind(this)),this.addManagedListener(this.eventService,dt.EVENT_PAGINATION_CHANGED,this.onSelectionChanged.bind(this)),this.addManagedListener(this.eventService,dt.EVENT_MODEL_UPDATED,this.onModelChanged.bind(this)),this.addManagedListener(this.cbSelectAll,dt.EVENT_FIELD_VALUE_CHANGED,this.onCbSelectAll.bind(this)),ii(this.cbSelectAll.getGui(),!0),this.cbSelectAll.getInputElement().setAttribute("tabindex","-1"),this.refreshSelectAllLabel()}onNewColumnsLoaded(){this.showOrHideSelectAll()}onDisplayedColumnsChanged(){this.isAlive()&&this.showOrHideSelectAll()}showOrHideSelectAll(){this.cbSelectAllVisible=this.isCheckboxSelection(),this.cbSelectAll.setDisplayed(this.cbSelectAllVisible,{skipAriaHidden:!0}),this.cbSelectAllVisible&&(this.checkRightRowModelType("selectAllCheckbox"),this.checkSelectionType("selectAllCheckbox"),this.updateStateOfCheckbox()),this.refreshSelectAllLabel()}onModelChanged(){this.cbSelectAllVisible&&this.updateStateOfCheckbox()}onSelectionChanged(){this.cbSelectAllVisible&&this.updateStateOfCheckbox()}updateStateOfCheckbox(){if(this.processingEventFromCheckbox)return;this.processingEventFromCheckbox=!0;const e=this.selectionService.getSelectAllState(this.isFilteredOnly(),this.isCurrentPageOnly());this.cbSelectAll.setValue(e);const t=this.selectionService.hasNodesToSelect(this.isFilteredOnly(),this.isCurrentPageOnly());this.cbSelectAll.setDisabled(!t),this.refreshSelectAllLabel(),this.processingEventFromCheckbox=!1}refreshSelectAllLabel(){const e=this.localeService.getLocaleTextFunc(),t=this.cbSelectAll.getValue()?e("ariaChecked","checked"):e("ariaUnchecked","unchecked"),i=e("ariaRowSelectAll","Press Space to toggle all rows selection");this.cbSelectAllVisible?this.headerCellCtrl.setAriaDescriptionProperty("selectAll",`${i} (${t})`):this.headerCellCtrl.setAriaDescriptionProperty("selectAll",null),this.cbSelectAll.setInputAriaLabel(`${i} (${t})`),this.headerCellCtrl.announceAriaDescription()}checkSelectionType(e){return!("multiple"!==this.gos.get("rowSelection")&&(console.warn(`AG Grid: ${e} is only available if using 'multiple' rowSelection.`),1))}checkRightRowModelType(e){const t=this.rowModel.getType();return!("clientSide"!==t&&"serverSide"!==t&&(console.warn(`AG Grid: ${e} is only available if using 'clientSide' or 'serverSide' rowModelType, you are using ${t}.`),1))}onCbSelectAll(){if(this.processingEventFromCheckbox)return;if(!this.cbSelectAllVisible)return;const e=this.cbSelectAll.getValue(),t=this.isFilteredOnly(),i=this.isCurrentPageOnly();let n="uiSelectAll";i?n="uiSelectAllCurrentPage":t&&(n="uiSelectAllFiltered");const s={source:n,justFiltered:t,justCurrentPage:i};e?this.selectionService.selectAllRowNodes(s):this.selectionService.deselectAllRowNodes(s)}isCheckboxSelection(){let e=this.column.getColDef().headerCheckboxSelection;return"function"==typeof e&&(e=e(this.gos.addGridCommonParams({column:this.column,colDef:this.column.getColDef()}))),!!e&&this.checkRightRowModelType("headerCheckboxSelection")&&this.checkSelectionType("headerCheckboxSelection")}isFilteredOnly(){return!!this.column.getColDef().headerCheckboxSelectionFilteredOnly}isCurrentPageOnly(){return!!this.column.getColDef().headerCheckboxSelectionCurrentPageOnly}};m([pe("rowModel")],al.prototype,"rowModel",2),m([pe("selectionService")],al.prototype,"selectionService",2);var ll=class extends il{constructor(e,t,i){super(e,t,i),this.refreshFunctions=[],this.userHeaderClasses=new Set,this.ariaDescriptionProperties=new Map,this.column=e}setComp(e,t,i,n){this.comp=e,this.setGui(t),this.updateState(),this.setupWidth(),this.setupMovingCss(),this.setupMenuClass(),this.setupSortableClass(),this.setupWrapTextClass(),this.refreshSpanHeaderHeight(),this.setupAutoHeight(n),this.addColumnHoverListener(),this.setupFilterClass(),this.setupClassesFromColDef(),this.setupTooltip(),this.addActiveHeaderMouseListeners(),this.setupSelectAll(),this.setupUserComp(),this.refreshAria(),this.resizeFeature=this.createManagedBean(new ol(this.getPinned(),this.column,i,e,this)),this.createManagedBean(new sl([this.column],t)),this.createManagedBean(new nl(this.column,t,this.beans)),this.createManagedBean(new Ls(t,{shouldStopEventPropagation:e=>this.shouldStopEventPropagation(e),onTabKeyDown:()=>null,handleKeyDown:this.handleKeyDown.bind(this),onFocusIn:this.onFocusIn.bind(this),onFocusOut:this.onFocusOut.bind(this)})),this.addResizeAndMoveKeyboardListeners(),this.addManagedPropertyListeners(["suppressMovableColumns","suppressMenuHide","suppressAggFuncInHeader"],this.refresh.bind(this)),this.addManagedListener(this.column,Ee.EVENT_COL_DEF_CHANGED,this.refresh.bind(this)),this.addManagedListener(this.eventService,dt.EVENT_COLUMN_VALUE_CHANGED,this.onColumnValueChanged.bind(this)),this.addManagedListener(this.eventService,dt.EVENT_COLUMN_ROW_GROUP_CHANGED,this.onColumnRowGroupChanged.bind(this)),this.addManagedListener(this.eventService,dt.EVENT_COLUMN_PIVOT_CHANGED,this.onColumnPivotChanged.bind(this)),this.addManagedListener(this.eventService,dt.EVENT_HEADER_HEIGHT_CHANGED,this.onHeaderHeightChanged.bind(this))}resizeHeader(e,t){var i,n;if(!this.column.isResizable())return;const s=this.column.getActualWidth(),r=null!=(i=this.column.getMinWidth())?i:0,o=null!=(n=this.column.getMaxWidth())?n:Number.MAX_SAFE_INTEGER,a=Math.min(Math.max(s+e,r),o);this.beans.columnModel.setColumnWidths([{key:this.column,newWidth:a}],t,!0,"uiColumnResized")}moveHeader(e){const{eGui:t,column:i,gos:n,ctrlsService:s}=this,r=this.getPinned(),o=t.getBoundingClientRect().left,a=i.getActualWidth(),l=0===e!==n.get("enableRtl"),c=ja.normaliseX(l?o-20:o+a+20,r,!0,n,s);ja.attemptMoveColumns({allMovingColumns:[i],isFromHeader:!0,hDirection:e,xPosition:c,pinned:r,fromEnter:!1,fakeEvent:!1,gos:n,columnModel:this.beans.columnModel}),s.getGridBodyCtrl().getScrollFeature().ensureColumnVisible(i,"auto")}setupUserComp(){const e=this.lookupUserCompDetails();this.setCompDetails(e)}setCompDetails(e){this.userCompDetails=e,this.comp.setUserCompDetails(e)}lookupUserCompDetails(){const e=this.createParams(),t=this.column.getColDef();return this.userComponentFactory.getHeaderCompDetails(t,e)}createParams(){return this.gos.addGridCommonParams({column:this.column,displayName:this.displayName,enableSorting:this.column.isSortable(),enableMenu:this.menuEnabled,enableFilterButton:this.openFilterEnabled&&this.menuService.isHeaderFilterButtonEnabled(this.column),enableFilterIcon:!this.openFilterEnabled||this.menuService.isLegacyMenuEnabled(),showColumnMenu:e=>{this.menuService.showColumnMenu({column:this.column,buttonElement:e,positionBy:"button"})},showColumnMenuAfterMouseClick:e=>{this.menuService.showColumnMenu({column:this.column,mouseEvent:e,positionBy:"mouse"})},showFilter:e=>{this.menuService.showFilterMenu({column:this.column,buttonElement:e,containerType:"columnFilter",positionBy:"button"})},progressSort:e=>{this.beans.sortController.progressSort(this.column,!!e,"uiColumnSorted")},setSort:(e,t)=>{this.beans.sortController.setSortForColumn(this.column,e,!!t,"uiColumnSorted")},eGridHeader:this.getGui(),setTooltip:(e,t)=>{this.setupTooltip(e,t)}})}setupSelectAll(){this.selectAllFeature=this.createManagedBean(new al(this.column)),this.selectAllFeature.setComp(this)}getSelectAllGui(){return this.selectAllFeature.getCheckboxGui()}handleKeyDown(e){super.handleKeyDown(e),e.key===Jn.SPACE&&this.selectAllFeature.onSpaceKeyDown(e),e.key===Jn.ENTER&&this.onEnterKeyDown(e),e.key===Jn.DOWN&&e.altKey&&this.showMenuOnKeyPress(e,!1)}onEnterKeyDown(e){if(e.ctrlKey||e.metaKey)this.showMenuOnKeyPress(e,!0);else if(this.sortable){const t=e.shiftKey;this.beans.sortController.progressSort(this.column,t,"uiColumnSorted")}}showMenuOnKeyPress(e,t){const i=this.comp.getUserCompInstance();i&&i instanceof xr&&i.onMenuKeyboardShortcut(t)&&e.preventDefault()}onFocusIn(e){if(!this.getGui().contains(e.relatedTarget)){const e=this.getRowIndex();this.focusService.setFocusedHeader(e,this.column),this.announceAriaDescription()}this.focusService.isKeyboardMode()&&this.setActiveHeader(!0)}onFocusOut(e){this.getGui().contains(e.relatedTarget)||this.setActiveHeader(!1)}setupTooltip(e,t){this.tooltipFeature&&(this.tooltipFeature=this.destroyBean(this.tooltipFeature));const i="whenTruncated"===this.gos.get("tooltipShowMode"),n=this.eGui,s=this.column.getColDef();t||!i||s.headerComponent||(t=()=>{const e=n.querySelector(".ag-header-cell-text");return!e||e.scrollWidth>e.clientWidth});const r={getColumn:()=>this.column,getColDef:()=>this.column.getColDef(),getGui:()=>n,getLocation:()=>"header",getTooltipValue:()=>null!=e?e:this.column.getColDef().headerTooltip,shouldDisplayTooltip:t},o=this.createManagedBean(new Cs(r));this.refreshFunctions.push(()=>o.refreshToolTip())}setupClassesFromColDef(){const e=()=>{const e=this.column.getColDef(),t=ga.getHeaderClassesFromColDef(e,this.gos,this.column,null),i=this.userHeaderClasses;this.userHeaderClasses=new Set(t),t.forEach(e=>{i.has(e)?i.delete(e):this.comp.addOrRemoveCssClass(e,!0)}),i.forEach(e=>this.comp.addOrRemoveCssClass(e,!1))};this.refreshFunctions.push(e),e()}setDragSource(e){if(this.dragSourceElement=e,this.removeDragSource(),!e||!this.draggable)return;const{column:t,beans:i,displayName:n,dragAndDropService:s,gos:r}=this,{columnModel:o}=i;let a=!this.gos.get("suppressDragLeaveHidesColumns");const l=this.dragSource={type:1,eElement:e,getDefaultIconName:()=>a?Hr.ICON_HIDE:Hr.ICON_NOT_ALLOWED,getDragItem:()=>this.createDragItem(t),dragItemName:n,onDragStarted:()=>{a=!r.get("suppressDragLeaveHidesColumns"),t.setMoving(!0,"uiColumnMoved")},onDragStopped:()=>t.setMoving(!1,"uiColumnMoved"),onGridEnter:e=>{var t;if(a){const i=(null==(t=null==e?void 0:e.columns)?void 0:t.filter(e=>!e.getColDef().lockVisible))||[];o.setColumnsVisible(i,!0,"uiColumnMoved")}},onGridExit:e=>{var t;if(a){const i=(null==(t=null==e?void 0:e.columns)?void 0:t.filter(e=>!e.getColDef().lockVisible))||[];o.setColumnsVisible(i,!1,"uiColumnMoved")}}};s.addDragSource(l,!0)}createDragItem(e){const t={};return t[e.getId()]=e.isVisible(),{columns:[e],visibleState:t}}updateState(){this.menuEnabled=this.menuService.isColumnMenuInHeaderEnabled(this.column),this.openFilterEnabled=this.menuService.isFilterMenuInHeaderEnabled(this.column),this.sortable=this.column.isSortable(),this.displayName=this.calculateDisplayName(),this.draggable=this.workOutDraggable()}addRefreshFunction(e){this.refreshFunctions.push(e)}refresh(){this.updateState(),this.refreshHeaderComp(),this.refreshAria(),this.refreshFunctions.forEach(e=>e())}refreshHeaderComp(){const e=this.lookupUserCompDetails();null!=this.comp.getUserCompInstance()&&this.userCompDetails.componentClass==e.componentClass&&this.attemptHeaderCompRefresh(e.params)?this.setDragSource(this.dragSourceElement):this.setCompDetails(e)}attemptHeaderCompRefresh(e){const t=this.comp.getUserCompInstance();return!!t&&(!!t.refresh&&t.refresh(e))}calculateDisplayName(){return this.beans.columnModel.getDisplayNameForColumn(this.column,"header",!0)}checkDisplayName(){this.displayName!==this.calculateDisplayName()&&this.refresh()}workOutDraggable(){const e=this.column.getColDef();return!(this.gos.get("suppressMovableColumns")||e.suppressMovable||e.lockPosition)||!!e.enableRowGroup||!!e.enablePivot}onColumnRowGroupChanged(){this.checkDisplayName()}onColumnPivotChanged(){this.checkDisplayName()}onColumnValueChanged(){this.checkDisplayName()}setupWidth(){const e=()=>{const e=this.column.getActualWidth();this.comp.setWidth(`${e}px`)};this.addManagedListener(this.column,Ee.EVENT_WIDTH_CHANGED,e),e()}setupMovingCss(){const e=()=>{this.comp.addOrRemoveCssClass("ag-header-cell-moving",this.column.isMoving())};this.addManagedListener(this.column,Ee.EVENT_MOVING_CHANGED,e),e()}setupMenuClass(){const e=()=>{this.comp.addOrRemoveCssClass("ag-column-menu-visible",this.column.isMenuVisible())};this.addManagedListener(this.column,Ee.EVENT_MENU_VISIBLE_CHANGED,e),e()}setupSortableClass(){const e=()=>{this.comp.addOrRemoveCssClass("ag-header-cell-sortable",!!this.sortable)};e(),this.addRefreshFunction(e),this.addManagedListener(this.eventService,Ee.EVENT_SORT_CHANGED,this.refreshAriaSort.bind(this))}setupFilterClass(){const e=()=>{const e=this.column.isFilterActive();this.comp.addOrRemoveCssClass("ag-header-cell-filtered",e),this.refreshAria()};this.addManagedListener(this.column,Ee.EVENT_FILTER_ACTIVE_CHANGED,e),e()}setupWrapTextClass(){const e=()=>{const e=!!this.column.getColDef().wrapHeaderText;this.comp.addOrRemoveCssClass("ag-header-cell-wrap-text",e)};e(),this.addRefreshFunction(e)}onDisplayedColumnsChanged(){super.onDisplayedColumnsChanged(),this.isAlive()&&this.onHeaderHeightChanged()}onHeaderHeightChanged(){this.refreshSpanHeaderHeight()}refreshSpanHeaderHeight(){const{eGui:e,column:t,comp:i,beans:n}=this;if(!t.isSpanHeaderHeight())return e.style.removeProperty("top"),e.style.removeProperty("height"),i.addOrRemoveCssClass("ag-header-span-height",!1),void i.addOrRemoveCssClass("ag-header-span-total",!1);const{numberOfParents:s,isSpanningTotal:r}=this.column.getColumnGroupPaddingInfo();i.addOrRemoveCssClass("ag-header-span-height",s>0);const{columnModel:o}=n,a=o.getColumnHeaderRowHeight();if(0===s)return i.addOrRemoveCssClass("ag-header-span-total",!1),e.style.setProperty("top","0px"),void e.style.setProperty("height",`${a}px`);i.addOrRemoveCssClass("ag-header-span-total",r);const l=s*(o.isPivotMode()?o.getPivotGroupHeaderHeight():o.getGroupHeaderHeight());e.style.setProperty("top",-l+"px"),e.style.setProperty("height",`${a+l}px`)}setupAutoHeight(e){const{columnModel:t,resizeObserverService:i}=this.beans,n=i=>{if(!this.isAlive())return;const{paddingTop:s,paddingBottom:r,borderBottomWidth:o,borderTopWidth:a}=pn(this.getGui()),l=s+r+o+a,c=e.offsetHeight+l;if(i<5){const t=this.beans.gos.getDocument();if(!t||!t.contains(e)||0==c)return void window.setTimeout(()=>n(i+1),0)}t.setColumnHeaderHeight(this.column,c)};let s,r=!1;const o=()=>{const e=this.column.isAutoHeaderHeight();e&&!r&&a(),!e&&r&&l()},a=()=>{r=!0,n(0),this.comp.addOrRemoveCssClass("ag-header-cell-auto-height",!0),s=i.observeResize(e,()=>n(0))},l=()=>{r=!1,s&&s(),this.comp.addOrRemoveCssClass("ag-header-cell-auto-height",!1),s=void 0};o(),this.addDestroyFunc(()=>l()),this.addManagedListener(this.column,Ee.EVENT_WIDTH_CHANGED,()=>r&&n(0)),this.addManagedListener(this.eventService,Ee.EVENT_SORT_CHANGED,()=>{r&&window.setTimeout(()=>n(0))}),this.addRefreshFunction(o)}refreshAriaSort(){if(this.sortable){const e=this.localeService.getLocaleTextFunc(),t=this.beans.sortController.getDisplaySortForColumn(this.column)||null;this.comp.setAriaSort(Wt(t)),this.setAriaDescriptionProperty("sort",e("ariaSortableColumn","Press ENTER to sort"))}else this.comp.setAriaSort(),this.setAriaDescriptionProperty("sort",null)}refreshAriaMenu(){if(this.menuEnabled){const e=this.localeService.getLocaleTextFunc();this.setAriaDescriptionProperty("menu",e("ariaMenuColumn","Press ALT DOWN to open column menu"))}else this.setAriaDescriptionProperty("menu",null)}refreshAriaFilterButton(){if(this.openFilterEnabled&&!this.menuService.isLegacyMenuEnabled()){const e=this.localeService.getLocaleTextFunc();this.setAriaDescriptionProperty("filterButton",e("ariaFilterColumn","Press CTRL ENTER to open filter"))}else this.setAriaDescriptionProperty("filterButton",null)}refreshAriaFiltered(){const e=this.localeService.getLocaleTextFunc();this.column.isFilterActive()?this.setAriaDescriptionProperty("filter",e("ariaColumnFiltered","Column Filtered")):this.setAriaDescriptionProperty("filter",null)}setAriaDescriptionProperty(e,t){null!=t?this.ariaDescriptionProperties.set(e,t):this.ariaDescriptionProperties.delete(e)}announceAriaDescription(){if(!this.eGui.contains(this.beans.gos.getActiveDomElement()))return;const e=Array.from(this.ariaDescriptionProperties.keys()).sort((e,t)=>"filter"===e?-1:t.charCodeAt(0)-e.charCodeAt(0)).map(e=>this.ariaDescriptionProperties.get(e)).join(". ");this.beans.ariaAnnouncementService.announceValue(e)}refreshAria(){this.refreshAriaSort(),this.refreshAriaMenu(),this.refreshAriaFilterButton(),this.refreshAriaFiltered()}addColumnHoverListener(){const e=()=>{if(!this.gos.get("columnHoverHighlight"))return;const e=this.beans.columnHoverService.isHovered(this.column);this.comp.addOrRemoveCssClass("ag-column-hover",e)};this.addManagedListener(this.eventService,dt.EVENT_COLUMN_HOVER_CHANGED,e),e()}getColId(){return this.column.getColId()}addActiveHeaderMouseListeners(){const e=e=>this.handleMouseOverChange("mouseenter"===e.type);this.addManagedListener(this.getGui(),"mouseenter",e),this.addManagedListener(this.getGui(),"mouseleave",e),this.addManagedListener(this.getGui(),"click",()=>this.dispatchColumnMouseEvent(dt.EVENT_COLUMN_HEADER_CLICKED,this.column)),this.addManagedListener(this.getGui(),"contextmenu",e=>this.handleContextMenuMouseEvent(e,void 0,this.column))}handleMouseOverChange(e){this.setActiveHeader(e);const t={type:e?dt.EVENT_COLUMN_HEADER_MOUSE_OVER:dt.EVENT_COLUMN_HEADER_MOUSE_LEAVE,column:this.column};this.eventService.dispatchEvent(t)}setActiveHeader(e){this.comp.addOrRemoveCssClass("ag-header-active",e)}getAnchorElementForMenu(e){const t=this.comp.getUserCompInstance();return t instanceof xr?t.getAnchorElementForMenu(e):this.getGui()}destroy(){super.destroy(),this.refreshFunctions=null,this.selectAllFeature=null,this.dragSourceElement=null,this.userCompDetails=null,this.userHeaderClasses=null,this.ariaDescriptionProperties=null}},cl=class extends ot{constructor(e,t,i,n){super(),this.eResize=t,this.comp=e,this.pinned=i,this.columnGroup=n}postConstruct(){if(!this.columnGroup.isResizable())return void this.comp.setResizableDisplayed(!1);const e=this.horizontalResizeService.addResizeBar({eResizeBar:this.eResize,onResizeStart:this.onResizeStart.bind(this),onResizing:this.onResizing.bind(this,!1),onResizeEnd:this.onResizing.bind(this,!0)});if(this.addDestroyFunc(e),!this.gos.get("suppressAutoSize")){const e=this.gos.get("skipHeaderOnAutoSize");this.eResize.addEventListener("dblclick",()=>{const t=[];this.columnGroup.getDisplayedLeafColumns().forEach(e=>{e.getColDef().suppressAutoSize||t.push(e.getColId())}),t.length>0&&this.columnModel.autoSizeColumns({columns:t,skipHeader:e,stopAtGroup:this.columnGroup,source:"uiColumnResized"}),this.resizeLeafColumnsToFit("uiColumnResized")})}}onResizeStart(e){const t=this.getInitialValues(e);this.storeLocalValues(t),this.toggleColumnResizing(!0)}onResizing(e,t,i="uiColumnResized"){const n=this.normaliseDragChange(t),s=this.resizeStartWidth+n;this.resizeColumnsFromLocalValues(s,i,e)}getInitialValues(e){const t=this.getColumnsToResize(),i=this.getInitialSizeOfColumns(t),n={columnsToResize:t,resizeStartWidth:i,resizeRatios:this.getSizeRatiosOfColumns(t,i)};let s=null;if(e&&(s=this.columnModel.getDisplayedGroupAtDirection(this.columnGroup,"After")),s){const e=s.getDisplayedLeafColumns(),t=n.groupAfterColumns=e.filter(e=>e.isResizable()),i=n.groupAfterStartWidth=this.getInitialSizeOfColumns(t);n.groupAfterRatios=this.getSizeRatiosOfColumns(t,i)}else n.groupAfterColumns=void 0,n.groupAfterStartWidth=void 0,n.groupAfterRatios=void 0;return n}storeLocalValues(e){const{columnsToResize:t,resizeStartWidth:i,resizeRatios:n,groupAfterColumns:s,groupAfterStartWidth:r,groupAfterRatios:o}=e;this.resizeCols=t,this.resizeStartWidth=i,this.resizeRatios=n,this.resizeTakeFromCols=s,this.resizeTakeFromStartWidth=r,this.resizeTakeFromRatios=o}clearLocalValues(){this.resizeCols=void 0,this.resizeRatios=void 0,this.resizeTakeFromCols=void 0,this.resizeTakeFromRatios=void 0}resizeLeafColumnsToFit(e){const t=this.autoWidthCalculator.getPreferredWidthForColumnGroup(this.columnGroup),i=this.getInitialValues();t>i.resizeStartWidth&&this.resizeColumns(i,t,e,!0)}resizeColumnsFromLocalValues(e,t,i=!0){var n,s,r;if(!this.resizeCols||!this.resizeRatios)return;const o={columnsToResize:this.resizeCols,resizeStartWidth:this.resizeStartWidth,resizeRatios:this.resizeRatios,groupAfterColumns:null!=(n=this.resizeTakeFromCols)?n:void 0,groupAfterStartWidth:null!=(s=this.resizeTakeFromStartWidth)?s:void 0,groupAfterRatios:null!=(r=this.resizeTakeFromRatios)?r:void 0};this.resizeColumns(o,e,t,i)}resizeColumns(e,t,i,n=!0){const{columnsToResize:s,resizeStartWidth:r,resizeRatios:o,groupAfterColumns:a,groupAfterStartWidth:l,groupAfterRatios:c}=e,h=[];if(h.push({columns:s,ratios:o,width:t}),a){const e=t-r;h.push({columns:a,ratios:c,width:l-e})}this.columnModel.resizeColumnSets({resizeSets:h,finished:n,source:i}),n&&this.toggleColumnResizing(!1)}toggleColumnResizing(e){this.comp.addOrRemoveCssClass("ag-column-resizing",e)}getColumnsToResize(){return this.columnGroup.getDisplayedLeafColumns().filter(e=>e.isResizable())}getInitialSizeOfColumns(e){return e.reduce((e,t)=>e+t.getActualWidth(),0)}getSizeRatiosOfColumns(e,t){return e.map(e=>e.getActualWidth()/t)}normaliseDragChange(e){let t=e;return this.gos.get("enableRtl")?"left"!==this.pinned&&(t*=-1):"right"===this.pinned&&(t*=-1),t}destroy(){super.destroy(),this.clearLocalValues()}};m([pe("horizontalResizeService")],cl.prototype,"horizontalResizeService",2),m([pe("autoWidthCalculator")],cl.prototype,"autoWidthCalculator",2),m([pe("columnModel")],cl.prototype,"columnModel",2),m([he],cl.prototype,"postConstruct",1);var hl=class extends ot{constructor(e,t){super(),this.removeChildListenersFuncs=[],this.columnGroup=t,this.comp=e}postConstruct(){this.addListenersToChildrenColumns(),this.addManagedListener(this.columnGroup,ht.EVENT_DISPLAYED_CHILDREN_CHANGED,this.onDisplayedChildrenChanged.bind(this)),this.onWidthChanged(),this.addDestroyFunc(this.removeListenersOnChildrenColumns.bind(this))}addListenersToChildrenColumns(){this.removeListenersOnChildrenColumns();const e=this.onWidthChanged.bind(this);this.columnGroup.getLeafColumns().forEach(t=>{t.addEventListener("widthChanged",e),t.addEventListener("visibleChanged",e),this.removeChildListenersFuncs.push(()=>{t.removeEventListener("widthChanged",e),t.removeEventListener("visibleChanged",e)})})}removeListenersOnChildrenColumns(){this.removeChildListenersFuncs.forEach(e=>e()),this.removeChildListenersFuncs=[]}onDisplayedChildrenChanged(){this.addListenersToChildrenColumns(),this.onWidthChanged()}onWidthChanged(){const e=this.columnGroup.getActualWidth();this.comp.setWidth(`${e}px`),this.comp.addOrRemoveCssClass("ag-hidden",0===e)}};m([he],hl.prototype,"postConstruct",1);var dl=class extends il{constructor(e,t,i){super(e,t,i),this.onSuppressColMoveChange=()=>{if(!this.isAlive()||this.isSuppressMoving())this.removeDragSource();else if(!this.dragSource){const e=this.getGui();this.setDragSource(e)}},this.column=e}setComp(e,t,i){this.comp=e,this.setGui(t),this.displayName=this.beans.columnModel.getDisplayNameForColumnGroup(this.column,"header"),this.addClasses(),this.setupMovingCss(),this.setupExpandable(),this.setupTooltip(),this.addDestroyFunc(()=>{this.tooltipFeature&&(this.tooltipFeature=this.destroyBean(this.tooltipFeature))}),this.setupUserComp(),this.addHeaderMouseListeners();const n=this.getParentRowCtrl().getPinned(),s=this.column.getProvidedColumnGroup().getLeafColumns();this.createManagedBean(new sl(s,t)),this.createManagedBean(new nl(this.column,t,this.beans)),this.createManagedBean(new hl(e,this.column)),this.resizeFeature=this.createManagedBean(new cl(e,i,n,this.column)),this.createManagedBean(new Ls(t,{shouldStopEventPropagation:this.shouldStopEventPropagation.bind(this),onTabKeyDown:()=>{},handleKeyDown:this.handleKeyDown.bind(this),onFocusIn:this.onFocusIn.bind(this)})),this.addManagedPropertyListener(dt.EVENT_SUPPRESS_COLUMN_MOVE_CHANGED,this.onSuppressColMoveChange),this.addResizeAndMoveKeyboardListeners()}resizeHeader(e,t){if(!this.resizeFeature)return;const i=this.resizeFeature.getInitialValues(t);this.resizeFeature.resizeColumns(i,i.resizeStartWidth+e,"uiColumnResized",!0)}moveHeader(e){const{beans:t,eGui:i,column:n,gos:s,ctrlsService:r}=this,o=s.get("enableRtl"),a=0===e,l=this.getPinned(),c=i.getBoundingClientRect(),h=c.left,d=c.width,u=ja.normaliseX(a!==o?h-20:h+d+20,l,!0,s,r),p=n.getGroupId(),g=this.focusService.getFocusedHeader();ja.attemptMoveColumns({allMovingColumns:this.column.getLeafColumns(),isFromHeader:!0,hDirection:e,xPosition:u,pinned:l,fromEnter:!1,fakeEvent:!1,gos:s,columnModel:t.columnModel});const f=n.getDisplayedLeafColumns(),m=a?f[0]:Le(f);this.ctrlsService.getGridBodyCtrl().getScrollFeature().ensureColumnVisible(m,"auto"),!this.isAlive()&&g&&this.restoreFocus(p,n,g)}restoreFocus(e,t,i){const n=t.getLeafColumns();if(!n.length)return;const s=n[0].getParent();if(!s)return;const r=this.findGroupWidthId(s,e);r&&this.focusService.focusHeaderPosition({headerPosition:g(p({},i),{column:r})})}findGroupWidthId(e,t){for(;e;){if(e.getGroupId()===t)return e;e=e.getParent()}return null}resizeLeafColumnsToFit(e){this.resizeFeature&&this.resizeFeature.resizeLeafColumnsToFit(e)}setupUserComp(){const e=this.gos.addGridCommonParams({displayName:this.displayName,columnGroup:this.column,setExpanded:e=>{this.beans.columnModel.setColumnGroupOpened(this.column.getProvidedColumnGroup(),e,"gridInitializing")},setTooltip:(e,t)=>{this.setupTooltip(e,t)}}),t=this.userComponentFactory.getHeaderGroupCompDetails(e);this.comp.setUserCompDetails(t)}addHeaderMouseListeners(){const e=e=>this.handleMouseOverChange("mouseenter"===e.type);this.addManagedListener(this.getGui(),"mouseenter",e),this.addManagedListener(this.getGui(),"mouseleave",e),this.addManagedListener(this.getGui(),"click",()=>this.dispatchColumnMouseEvent(dt.EVENT_COLUMN_HEADER_CLICKED,this.column.getProvidedColumnGroup())),this.addManagedListener(this.getGui(),"contextmenu",e=>this.handleContextMenuMouseEvent(e,void 0,this.column.getProvidedColumnGroup()))}handleMouseOverChange(e){const t={type:e?dt.EVENT_COLUMN_HEADER_MOUSE_OVER:dt.EVENT_COLUMN_HEADER_MOUSE_LEAVE,column:this.column.getProvidedColumnGroup()};this.eventService.dispatchEvent(t)}setupTooltip(e,t){this.tooltipFeature&&(this.tooltipFeature=this.destroyBean(this.tooltipFeature));const i=this.column.getColGroupDef(),n="whenTruncated"===this.gos.get("tooltipShowMode"),s=this.eGui;t||!n||(null==i?void 0:i.headerGroupComponent)||(t=()=>{const e=s.querySelector(".ag-header-group-text");return!e||e.scrollWidth>e.clientWidth});const r={getColumn:()=>this.column,getGui:()=>s,getLocation:()=>"headerGroup",getTooltipValue:()=>null!=e?e:i&&i.headerTooltip,shouldDisplayTooltip:t};i&&(r.getColDef=()=>i),this.createBean(new Cs(r))}setupExpandable(){const e=this.column.getProvidedColumnGroup();this.refreshExpanded(),this.addManagedListener(e,Ae.EVENT_EXPANDABLE_CHANGED,this.refreshExpanded.bind(this)),this.addManagedListener(e,Ae.EVENT_EXPANDED_CHANGED,this.refreshExpanded.bind(this))}refreshExpanded(){const e=this.column;this.expandable=e.isExpandable();const t=e.isExpanded();this.expandable?this.comp.setAriaExpanded(t?"true":"false"):this.comp.setAriaExpanded(void 0)}getColId(){return this.column.getUniqueId()}addClasses(){const e=this.column.getColGroupDef(),t=ga.getHeaderClassesFromColDef(e,this.gos,null,this.column);this.column.isPadding()?(t.push("ag-header-group-cell-no-group"),this.column.getLeafColumns().every(e=>e.isSpanHeaderHeight())&&t.push("ag-header-span-height")):t.push("ag-header-group-cell-with-group"),t.forEach(e=>this.comp.addOrRemoveCssClass(e,!0))}setupMovingCss(){const e=this.column.getProvidedColumnGroup().getLeafColumns(),t=()=>this.comp.addOrRemoveCssClass("ag-header-cell-moving",this.column.isMoving());e.forEach(e=>{this.addManagedListener(e,Ee.EVENT_MOVING_CHANGED,t)}),t()}onFocusIn(e){if(!this.eGui.contains(e.relatedTarget)){const e=this.getRowIndex();this.beans.focusService.setFocusedHeader(e,this.column)}}handleKeyDown(e){super.handleKeyDown(e);const t=this.getWrapperHasFocus();if(this.expandable&&t&&e.key===Jn.ENTER){const e=this.column,t=!e.isExpanded();this.beans.columnModel.setColumnGroupOpened(e.getProvidedColumnGroup(),t,"uiColumnExpanded")}}setDragSource(e){if(!this.isAlive()||this.isSuppressMoving())return;if(this.removeDragSource(),!e)return;const{beans:t,column:i,displayName:n,gos:s,dragAndDropService:r}=this,{columnModel:o}=t,a=i.getProvidedColumnGroup().getLeafColumns();let l=!s.get("suppressDragLeaveHidesColumns");const c=this.dragSource={type:1,eElement:e,getDefaultIconName:()=>l?Hr.ICON_HIDE:Hr.ICON_NOT_ALLOWED,dragItemName:n,getDragItem:()=>this.getDragItemForGroup(i),onDragStarted:()=>{l=!s.get("suppressDragLeaveHidesColumns"),a.forEach(e=>e.setMoving(!0,"uiColumnDragged"))},onDragStopped:()=>a.forEach(e=>e.setMoving(!1,"uiColumnDragged")),onGridEnter:e=>{var t;if(l){const i=(null==(t=null==e?void 0:e.columns)?void 0:t.filter(e=>!e.getColDef().lockVisible))||[];o.setColumnsVisible(i,!0,"uiColumnMoved")}},onGridExit:e=>{var t;if(l){const i=(null==(t=null==e?void 0:e.columns)?void 0:t.filter(e=>!e.getColDef().lockVisible))||[];o.setColumnsVisible(i,!1,"uiColumnMoved")}}};r.addDragSource(c,!0)}getDragItemForGroup(e){const t=e.getProvidedColumnGroup().getLeafColumns(),i={};t.forEach(e=>i[e.getId()]=e.isVisible());const n=[];return this.beans.columnModel.getAllDisplayedColumns().forEach(e=>{t.indexOf(e)>=0&&(n.push(e),Fe(t,e))}),t.forEach(e=>n.push(e)),{columns:n,visibleState:i}}isSuppressMoving(){let e=!1;return this.column.getLeafColumns().forEach(t=>{(t.getColDef().suppressMovable||t.getColDef().lockPosition)&&(e=!0)}),e||this.gos.get("suppressMovableColumns")}},ul=0,pl=class extends ot{constructor(e,t,i){super(),this.instanceId=ul++,this.rowIndex=e,this.pinned=t,this.type=i;const n="group"==i?"ag-header-row-column-group":"filter"==i?"ag-header-row-column-filter":"ag-header-row-column";this.headerRowClass=`ag-header-row ${n}`}postConstruct(){this.isPrintLayout=this.gos.isDomLayout("print"),this.isEnsureDomOrder=this.gos.get("ensureDomOrder")}getInstanceId(){return this.instanceId}setComp(e,t=!0){this.comp=e,t&&(this.onRowHeightChanged(),this.onVirtualColumnsChanged()),this.setWidth(),this.addEventListeners()}getHeaderRowClass(){return this.headerRowClass}getAriaRowIndex(){return this.rowIndex+1}addEventListeners(){this.addManagedListener(this.eventService,dt.EVENT_COLUMN_RESIZED,this.onColumnResized.bind(this)),this.addManagedListener(this.eventService,dt.EVENT_DISPLAYED_COLUMNS_CHANGED,this.onDisplayedColumnsChanged.bind(this)),this.addManagedListener(this.eventService,dt.EVENT_VIRTUAL_COLUMNS_CHANGED,e=>this.onVirtualColumnsChanged(e.afterScroll)),this.addManagedListener(this.eventService,dt.EVENT_COLUMN_HEADER_HEIGHT_CHANGED,this.onRowHeightChanged.bind(this)),this.addManagedListener(this.eventService,dt.EVENT_GRID_STYLES_CHANGED,this.onRowHeightChanged.bind(this)),this.addManagedListener(this.eventService,dt.EVENT_ADVANCED_FILTER_ENABLED_CHANGED,this.onRowHeightChanged.bind(this)),this.addManagedPropertyListener("domLayout",this.onDisplayedColumnsChanged.bind(this)),this.addManagedPropertyListener("ensureDomOrder",e=>this.isEnsureDomOrder=e.currentValue),this.addManagedPropertyListener("headerHeight",this.onRowHeightChanged.bind(this)),this.addManagedPropertyListener("pivotHeaderHeight",this.onRowHeightChanged.bind(this)),this.addManagedPropertyListener("groupHeaderHeight",this.onRowHeightChanged.bind(this)),this.addManagedPropertyListener("pivotGroupHeaderHeight",this.onRowHeightChanged.bind(this)),this.addManagedPropertyListener("floatingFiltersHeight",this.onRowHeightChanged.bind(this))}getHeaderCellCtrl(e){if(this.headerCellCtrls)return R(this.headerCellCtrls).find(t=>t.getColumnGroupChild()===e)}onDisplayedColumnsChanged(){this.isPrintLayout=this.gos.isDomLayout("print"),this.onVirtualColumnsChanged(),this.setWidth(),this.onRowHeightChanged()}getType(){return this.type}onColumnResized(){this.setWidth()}setWidth(){const e=this.getWidthForRow();this.comp.setWidth(`${e}px`)}getWidthForRow(){const{columnModel:e}=this.beans;return this.isPrintLayout?null!=this.pinned?0:e.getContainerWidth("right")+e.getContainerWidth("left")+e.getContainerWidth(null):e.getContainerWidth(this.pinned)}onRowHeightChanged(){var{topOffset:e,rowHeight:t}=this.getTopAndHeight();this.comp.setTop(e+"px"),this.comp.setHeight(t+"px")}getTopAndHeight(){const{columnModel:e,filterManager:t}=this.beans;let i=e.getHeaderRowCount();const n=[];let s=0;t.hasFloatingFilters()&&(i++,s=1);const r=e.getColumnGroupHeaderRowHeight(),o=e.getColumnHeaderRowHeight(),a=i-(1+s);for(let e=0;e<a;e++)n.push(r);n.push(o);for(let t=0;t<s;t++)n.push(e.getFloatingFiltersHeight());let l=0;for(let e=0;e<this.rowIndex;e++)l+=n[e];return{topOffset:l,rowHeight:n[this.rowIndex]}}getPinned(){return this.pinned}getRowIndex(){return this.rowIndex}onVirtualColumnsChanged(e=!1){const t=this.getHeaderCtrls(),i=this.isEnsureDomOrder||this.isPrintLayout;this.comp.setHeaderCtrls(t,i,e)}getHeaderCtrls(){const e=this.headerCellCtrls;this.headerCellCtrls=new Map;const t=this.getColumnsInViewport();for(const i of t)this.recycleAndCreateHeaderCtrls(i,e);const i=e=>{const{focusService:t,columnModel:i}=this.beans;return!!t.isHeaderWrapperFocused(e)&&i.isDisplayed(e.getColumnGroupChild())};if(e)for(const[t,n]of e)i(n)?this.headerCellCtrls.set(t,n):this.destroyBean(n);return Array.from(this.headerCellCtrls.values())}recycleAndCreateHeaderCtrls(e,t){if(!this.headerCellCtrls)return;if(e.isEmptyGroup())return;const i=e.getUniqueId();let n;if(t&&(n=t.get(i),t.delete(i)),n&&n.getColumnGroupChild()!=e&&(this.destroyBean(n),n=void 0),null==n)switch(this.type){case"filter":n=this.createBean(new rl(e,this.beans,this));break;case"group":n=this.createBean(new dl(e,this.beans,this));break;default:n=this.createBean(new ll(e,this.beans,this))}this.headerCellCtrls.set(i,n)}getColumnsInViewport(){return this.isPrintLayout?this.getColumnsInViewportPrintLayout():this.getColumnsInViewportNormalLayout()}getColumnsInViewportPrintLayout(){if(null!=this.pinned)return[];let e=[];const t=this.getActualDepth(),{columnModel:i}=this.beans;return["left",null,"right"].forEach(n=>{const s=i.getVirtualHeaderGroupRow(n,t);e=e.concat(s)}),e}getActualDepth(){return"filter"==this.type?this.rowIndex-1:this.rowIndex}getColumnsInViewportNormalLayout(){return this.beans.columnModel.getVirtualHeaderGroupRow(this.pinned,this.getActualDepth())}focusHeader(e,t){if(!this.headerCellCtrls)return!1;const i=Array.from(this.headerCellCtrls.values()).find(t=>t.getColumnGroupChild()==e);return!!i&&i.focus(t)}destroy(){this.headerCellCtrls&&this.headerCellCtrls.forEach(e=>{this.destroyBean(e)}),this.headerCellCtrls=void 0,super.destroy()}};m([pe("beans")],pl.prototype,"beans",2),m([he],pl.prototype,"postConstruct",1);var gl=class extends ot{constructor(e){super(),this.hidden=!1,this.includeFloatingFilter=!1,this.groupsRowCtrls=[],this.pinned=e}setComp(e,t){this.comp=e,this.eViewport=t,this.setupCenterWidth(),this.setupPinnedWidth(),this.setupDragAndDrop(this.eViewport),this.addManagedListener(this.eventService,dt.EVENT_GRID_COLUMNS_CHANGED,this.onGridColumnsChanged.bind(this)),this.addManagedListener(this.eventService,dt.EVENT_DISPLAYED_COLUMNS_CHANGED,this.onDisplayedColumnsChanged.bind(this)),this.addManagedListener(this.eventService,dt.EVENT_ADVANCED_FILTER_ENABLED_CHANGED,this.onDisplayedColumnsChanged.bind(this)),this.ctrlsService.registerHeaderContainer(this,this.pinned),this.columnModel.isReady()&&this.refresh()}setupDragAndDrop(e){const t=new $a(this.pinned,e);this.createManagedBean(t)}refresh(e=!1){const t=new us,i=this.focusService.getFocusHeaderToUseAfterRefresh();(()=>{const e=this.columnModel.getHeaderRowCount()-1;this.groupsRowCtrls=this.destroyBeans(this.groupsRowCtrls);for(let i=0;i<e;i++){const e=this.createBean(new pl(t.next(),this.pinned,"group"));this.groupsRowCtrls.push(e)}})(),(()=>{const i=t.next(),n=!(this.hidden||null!=this.columnsRowCtrl&&e&&this.columnsRowCtrl.getRowIndex()===i);(n||this.hidden)&&(this.columnsRowCtrl=this.destroyBean(this.columnsRowCtrl)),n&&(this.columnsRowCtrl=this.createBean(new pl(i,this.pinned,"column")))})(),(()=>{this.includeFloatingFilter=this.filterManager.hasFloatingFilters()&&!this.hidden;const i=()=>{this.filtersRowCtrl=this.destroyBean(this.filtersRowCtrl)};if(!this.includeFloatingFilter)return void i();const n=t.next();if(this.filtersRowCtrl){const t=this.filtersRowCtrl.getRowIndex()!==n;e&&!t||i()}this.filtersRowCtrl||(this.filtersRowCtrl=this.createBean(new pl(n,this.pinned,"filter")))})();const n=this.getAllCtrls();this.comp.setCtrls(n),this.restoreFocusOnHeader(i)}restoreFocusOnHeader(e){null!=e&&e.column.getPinned()==this.pinned&&this.focusService.focusHeaderPosition({headerPosition:e})}getAllCtrls(){const e=[...this.groupsRowCtrls];return this.columnsRowCtrl&&e.push(this.columnsRowCtrl),this.filtersRowCtrl&&e.push(this.filtersRowCtrl),e}onGridColumnsChanged(){this.refresh(!0)}onDisplayedColumnsChanged(){const e=this.filterManager.hasFloatingFilters()&&!this.hidden;this.includeFloatingFilter!==e&&this.refresh(!0)}setupCenterWidth(){null==this.pinned&&this.createManagedBean(new Ta(e=>this.comp.setCenterWidth(`${e}px`),!0))}setHorizontalScroll(e){this.comp.setViewportScrollLeft(e)}setupPinnedWidth(){if(null==this.pinned)return;const e="left"===this.pinned,t="right"===this.pinned;this.hidden=!0;const i=()=>{const i=e?this.pinnedWidthService.getPinnedLeftWidth():this.pinnedWidthService.getPinnedRightWidth();if(null==i)return;const n=0==i,s=this.hidden!==n,r=this.gos.get("enableRtl"),o=this.gos.getScrollbarWidth(),a=this.scrollVisibleService.isVerticalScrollShowing()&&(r&&e||!r&&t)?i+o:i;this.comp.setPinnedContainerWidth(`${a}px`),this.comp.setDisplayed(!n),s&&(this.hidden=n,this.refresh())};this.addManagedListener(this.eventService,dt.EVENT_LEFT_PINNED_WIDTH_CHANGED,i),this.addManagedListener(this.eventService,dt.EVENT_RIGHT_PINNED_WIDTH_CHANGED,i),this.addManagedListener(this.eventService,dt.EVENT_SCROLL_VISIBILITY_CHANGED,i),this.addManagedListener(this.eventService,dt.EVENT_SCROLLBAR_WIDTH_CHANGED,i)}getHeaderCtrlForColumn(e){if(e instanceof Ee){if(!this.columnsRowCtrl)return;return this.columnsRowCtrl.getHeaderCellCtrl(e)}if(0!==this.groupsRowCtrls.length)for(let t=0;t<this.groupsRowCtrls.length;t++){const i=this.groupsRowCtrls[t].getHeaderCellCtrl(e);if(i)return i}}getHtmlElementForColumnHeader(e){const t=this.getHeaderCtrlForColumn(e);return t?t.getGui():null}getRowType(e){const t=this.getAllCtrls()[e];return t?t.getType():void 0}focusHeader(e,t,i){const n=this.getAllCtrls()[e];return!!n&&n.focusHeader(t,i)}getViewport(){return this.eViewport}getRowCount(){return this.groupsRowCtrls.length+(this.columnsRowCtrl?1:0)+(this.filtersRowCtrl?1:0)}destroy(){this.filtersRowCtrl&&(this.filtersRowCtrl=this.destroyBean(this.filtersRowCtrl)),this.columnsRowCtrl&&(this.columnsRowCtrl=this.destroyBean(this.columnsRowCtrl)),this.groupsRowCtrls&&this.groupsRowCtrls.length&&(this.groupsRowCtrls=this.destroyBeans(this.groupsRowCtrls)),super.destroy()}};m([pe("ctrlsService")],gl.prototype,"ctrlsService",2),m([pe("scrollVisibleService")],gl.prototype,"scrollVisibleService",2),m([pe("pinnedWidthService")],gl.prototype,"pinnedWidthService",2),m([pe("columnModel")],gl.prototype,"columnModel",2),m([pe("focusService")],gl.prototype,"focusService",2),m([pe("filterManager")],gl.prototype,"filterManager",2);var fl=class e extends ws{constructor(e){super(),this.headerRowComps={},this.rowCompsList=[],this.pinned=e}init(){this.selectAndSetTemplate();const e={setDisplayed:e=>this.setDisplayed(e),setCtrls:e=>this.setCtrls(e),setCenterWidth:e=>this.eCenterContainer.style.width=e,setViewportScrollLeft:e=>this.getGui().scrollLeft=e,setPinnedContainerWidth:e=>{const t=this.getGui();t.style.width=e,t.style.maxWidth=e,t.style.minWidth=e}};this.createManagedBean(new gl(this.pinned)).setComp(e,this.getGui())}selectAndSetTemplate(){const t="left"==this.pinned,i="right"==this.pinned,n=t?e.PINNED_LEFT_TEMPLATE:i?e.PINNED_RIGHT_TEMPLATE:e.CENTER_TEMPLATE;this.setTemplate(n),this.eRowContainer=this.eCenterContainer?this.eCenterContainer:this.getGui()}destroyRowComps(){this.setCtrls([])}destroyRowComp(e){this.destroyBean(e),this.eRowContainer.removeChild(e.getGui())}setCtrls(e){const t=this.headerRowComps;let i;this.headerRowComps={},this.rowCompsList=[];const n=e=>{const t=e.getGui();t.parentElement!=this.eRowContainer&&this.eRowContainer.appendChild(t),i&&Tn(this.eRowContainer,t,i),i=t};e.forEach(e=>{const i=e.getInstanceId(),s=t[i];delete t[i];const r=s||this.createBean(new Ja(e));this.headerRowComps[i]=r,this.rowCompsList.push(r),n(r)}),F(t).forEach(e=>this.destroyRowComp(e))}};fl.PINNED_LEFT_TEMPLATE='<div class="ag-pinned-left-header" role="rowgroup"></div>',fl.PINNED_RIGHT_TEMPLATE='<div class="ag-pinned-right-header" role="rowgroup"></div>',fl.CENTER_TEMPLATE='<div class="ag-header-viewport" role="presentation">\n            <div class="ag-header-container" ref="eCenterContainer" role="rowgroup"></div>\n        </div>',m([Es("eCenterContainer")],fl.prototype,"eCenterContainer",2),m([he],fl.prototype,"init",1),m([de],fl.prototype,"destroyRowComps",1);var ml=fl,vl=(e=>(e[e.UP=0]="UP",e[e.DOWN=1]="DOWN",e[e.LEFT=2]="LEFT",e[e.RIGHT=3]="RIGHT",e))(vl||{}),yl=class extends ot{constructor(){super(...arguments),this.currentHeaderRowWithoutSpan=-1}postConstruct(){this.ctrlsService.whenReady(e=>{this.gridBodyCon=e.gridBodyCtrl});const e=this.gos.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:s}=t,r=this.getHeaderRowCount(),o=0===e;let{headerRowIndex:a,column:l,headerRowIndexWithoutSpan:c}=o?this.headerPositionUtils.getColumnVisibleParent(s,n):this.headerPositionUtils.getColumnVisibleChild(s,n),h=!1;return a<0&&(a=0,l=s,h=!0),a>=r?(a=-1,this.setCurrentHeaderRowWithoutSpan(-1)):void 0!==c&&(this.currentHeaderRowWithoutSpan=c),!(!h&&!l)&&this.focusService.focusHeaderPosition({headerPosition:{headerRowIndex:a,column:l},allowUserOverride:!0,event:i})}setCurrentHeaderRowWithoutSpan(e){this.currentHeaderRowWithoutSpan=e}navigateHorizontally(e,t=!1,i){const n=this.focusService.getFocusedHeader(),s=2===e,r=this.gos.get("enableRtl");let o,a;if(-1!==this.currentHeaderRowWithoutSpan?n.headerRowIndex=this.currentHeaderRowWithoutSpan:this.currentHeaderRowWithoutSpan=n.headerRowIndex,s!==r?(a="Before",o=this.headerPositionUtils.findHeader(n,a)):(a="After",o=this.headerPositionUtils.findHeader(n,a)),o||!t)return this.focusService.focusHeaderPosition({headerPosition:o,direction:a,fromTab:t,allowUserOverride:!0,event:i});if(t){const e=this.gos.getCallback("tabToNextHeader");if(e)return this.focusService.focusHeaderPositionFromUserFunc({userFunc:e,headerPosition:o,direction:a})}return this.focusNextHeaderRow(n,a,i)}focusNextHeaderRow(e,t,i){const n=e.headerRowIndex;let s,r=null;if("Before"===t?n>0&&(s=n-1,this.currentHeaderRowWithoutSpan-=1,r=this.headerPositionUtils.findColAtEdgeForHeaderRow(s,"end")):(s=n+1,this.currentHeaderRowWithoutSpan<this.getHeaderRowCount()?this.currentHeaderRowWithoutSpan+=1:this.setCurrentHeaderRowWithoutSpan(-1),r=this.headerPositionUtils.findColAtEdgeForHeaderRow(s,"start")),!r)return!1;const{column:o,headerRowIndex:a}=this.headerPositionUtils.getHeaderIndexToFocus(r.column,null==r?void 0:r.headerRowIndex);return this.focusService.focusHeaderPosition({headerPosition:{column:o,headerRowIndex:a},direction:t,fromTab:!0,allowUserOverride:!0,event:i})}scrollToColumn(e,t="After"){if(e.getPinned())return;let i;if(e instanceof ht){const n=e.getDisplayedLeafColumns();i="Before"===t?Le(n):n[0]}else i=e;this.gridBodyCon.getScrollFeature().ensureColumnVisible(i)}};m([pe("focusService")],yl.prototype,"focusService",2),m([pe("headerPositionUtils")],yl.prototype,"headerPositionUtils",2),m([pe("ctrlsService")],yl.prototype,"ctrlsService",2),m([he],yl.prototype,"postConstruct",1),yl=m([ue("headerNavigationService")],yl);var Cl=class extends ot{setComp(e,t,i){this.comp=e,this.eGui=t,this.createManagedBean(new Ls(i,{onTabKeyDown:this.onTabKeyDown.bind(this),handleKeyDown:this.handleKeyDown.bind(this),onFocusOut:this.onFocusOut.bind(this)})),this.addManagedListener(this.eventService,dt.EVENT_COLUMN_PIVOT_MODE_CHANGED,this.onPivotModeChanged.bind(this)),this.addManagedListener(this.eventService,dt.EVENT_DISPLAYED_COLUMNS_CHANGED,this.onDisplayedColumnsChanged.bind(this)),this.onPivotModeChanged(),this.setupHeaderHeight();const n=this.onHeaderContextMenu.bind(this);this.addManagedListener(this.eGui,"contextmenu",n),this.mockContextMenuForIPad(n),this.ctrlsService.register("gridHeaderCtrl",this)}setupHeaderHeight(){const e=this.setHeaderHeight.bind(this);e(),this.addManagedPropertyListener("headerHeight",e),this.addManagedPropertyListener("pivotHeaderHeight",e),this.addManagedPropertyListener("groupHeaderHeight",e),this.addManagedPropertyListener("pivotGroupHeaderHeight",e),this.addManagedPropertyListener("floatingFiltersHeight",e),this.addManagedListener(this.eventService,dt.EVENT_DISPLAYED_COLUMNS_CHANGED,e),this.addManagedListener(this.eventService,dt.EVENT_COLUMN_HEADER_HEIGHT_CHANGED,e),this.addManagedListener(this.eventService,dt.EVENT_GRID_STYLES_CHANGED,e),this.addManagedListener(this.eventService,dt.EVENT_ADVANCED_FILTER_ENABLED_CHANGED,e)}getHeaderHeight(){return this.headerHeight}setHeaderHeight(){const{columnModel:e}=this;let t,i=0,n=e.getHeaderRowCount();this.filterManager.hasFloatingFilters()&&(n++,i=1);const s=this.columnModel.getColumnGroupHeaderRowHeight(),r=this.columnModel.getColumnHeaderRowHeight(),o=n-(1+i);if(t=i*e.getFloatingFiltersHeight(),t+=o*s,t+=r,this.headerHeight===t)return;this.headerHeight=t;const a=`${t+1}px`;this.comp.setHeightAndMinHeight(a),this.eventService.dispatchEvent({type:dt.EVENT_HEADER_HEIGHT_CHANGED})}onPivotModeChanged(){const e=this.columnModel.isPivotMode();this.comp.addOrRemoveCssClass("ag-pivot-on",e),this.comp.addOrRemoveCssClass("ag-pivot-off",!e)}onDisplayedColumnsChanged(){const e=this.columnModel.getAllDisplayedColumns().some(e=>e.isSpanHeaderHeight());this.comp.addOrRemoveCssClass("ag-header-allow-overflow",e)}onTabKeyDown(e){const t=this.gos.get("enableRtl"),i=e.shiftKey!==t?2:3;(this.headerNavigationService.navigateHorizontally(i,!0,e)||this.focusService.focusNextGridCoreContainer(e.shiftKey))&&e.preventDefault()}handleKeyDown(e){let t=null;switch(e.key){case Jn.LEFT:t=2;case Jn.RIGHT:S(t)||(t=3),this.headerNavigationService.navigateHorizontally(t,!1,e);break;case Jn.UP:t=0;case Jn.DOWN:S(t)||(t=1),this.headerNavigationService.navigateVertically(t,null,e)&&e.preventDefault();break;default:return}}onFocusOut(e){const{relatedTarget:t}=e;!t&&this.eGui.contains(this.gos.getActiveDomElement())||this.eGui.contains(t)||this.focusService.clearFocusedHeader()}onHeaderContextMenu(e,t,i){if(!e&&!i||!this.menuService.isHeaderContextMenuEnabled())return;const{target:n}=null!=e?e:t;n!==this.eGui&&n!==this.ctrlsService.getHeaderRowContainerCtrl().getViewport()||this.menuService.showHeaderContextMenu(void 0,e,i)}mockContextMenuForIPad(e){if(!Ni())return;const t=new Cr(this.eGui);this.addManagedListener(t,Cr.EVENT_LONG_TAP,t=>{e(void 0,t.touchStart,t.touchEvent)}),this.addDestroyFunc(()=>t.destroy())}};m([pe("headerNavigationService")],Cl.prototype,"headerNavigationService",2),m([pe("focusService")],Cl.prototype,"focusService",2),m([pe("columnModel")],Cl.prototype,"columnModel",2),m([pe("ctrlsService")],Cl.prototype,"ctrlsService",2),m([pe("filterManager")],Cl.prototype,"filterManager",2),m([pe("menuService")],Cl.prototype,"menuService",2);var bl=class e extends ws{constructor(){super(e.TEMPLATE)}postConstruct(){const e={addOrRemoveCssClass:(e,t)=>this.addOrRemoveCssClass(e,t),setHeightAndMinHeight:e=>{this.getGui().style.height=e,this.getGui().style.minHeight=e}};this.createManagedBean(new Cl).setComp(e,this.getGui(),this.getFocusableElement());const t=e=>{this.createManagedBean(e),this.appendChild(e)};t(new ml("left")),t(new ml(null)),t(new ml("right"))}};bl.TEMPLATE='<div class="ag-header" role="presentation"/>',m([he],bl.prototype,"postConstruct",1);var Sl=bl,wl=class extends ot{addResizeBar(e){const t={dragStartPixels:e.dragStartPixels||0,eElement:e.eResizeBar,onDragStart:this.onDragStart.bind(this,e),onDragStop:this.onDragStop.bind(this,e),onDragging:this.onDragging.bind(this,e),includeTouch:!0,stopPropagationForTouch:!0};return this.dragService.addDragSource(t),()=>this.dragService.removeDragSource(t)}onDragStart(e,t){this.dragStartX=t.clientX,this.setResizeIcons();const i=t instanceof MouseEvent&&!0===t.shiftKey;e.onResizeStart(i)}setResizeIcons(){const e=this.ctrlsService.get("gridCtrl");e.setResizeCursor(!0),e.disableUserSelect(!0)}onDragStop(e,t){e.onResizeEnd(this.resizeAmount),this.resetIcons()}resetIcons(){const e=this.ctrlsService.get("gridCtrl");e.setResizeCursor(!1),e.disableUserSelect(!1)}onDragging(e,t){this.resizeAmount=t.clientX-this.dragStartX,e.onResizing(this.resizeAmount)}};m([pe("dragService")],wl.prototype,"dragService",2),m([pe("ctrlsService")],wl.prototype,"ctrlsService",2),wl=m([ue("horizontalResizeService")],wl);var xl=class extends ot{hideActiveMenu(){this.hidePopup&&this.hidePopup()}showMenuAfterMouseEvent(e,t,i){this.showPopup(e,n=>{this.popupService.positionPopupUnderMouseEvent({column:e,type:i,mouseEvent:t,ePopup:n})},i,t.target,this.menuService.isLegacyMenuEnabled())}showMenuAfterButtonClick(e,t,i){let n=-1,s="left";const r=this.menuService.isLegacyMenuEnabled();!r&&this.gos.get("enableRtl")&&(n=1,s="right");let o=r?void 0:4*n,a=r?void 0:4;this.showPopup(e,n=>{this.popupService.positionPopupByComponent({type:i,eventSource:t,ePopup:n,nudgeX:o,nudgeY:a,alignSide:s,keepWithinBounds:!0,position:"under",column:e})},i,t,r)}showPopup(e,t,i,n,s){const r=e?this.createBean(new Yo(e,"COLUMN_MENU")):void 0;if(this.activeMenu=r,!(null==r?void 0:r.hasFilter())||!e)throw new Error("AG Grid - unable to show popup filter, filter instantiation failed");const o=document.createElement("div");let a;Ut(o,"presentation"),o.classList.add("ag-menu"),s||o.classList.add("ag-filter-menu"),this.tabListener=this.addManagedListener(o,"keydown",e=>this.trapFocusWithin(e,o)),o.appendChild(null==r?void 0:r.getGui());const l=this.menuService.isColumnMenuAnchoringEnabled()?null!=n?n:this.ctrlsService.getGridBodyCtrl().getGui():void 0,c=this.localeService.getLocaleTextFunc(),h=s&&"columnFilter"!==i?c("ariaLabelColumnMenu","Column Menu"):c("ariaLabelColumnFilter","Column Filter"),d=this.popupService.addPopup({modal:!0,eChild:o,closeOnEsc:!0,closedCallback:t=>{e.setMenuVisible(!1,"contextMenu");const s=t instanceof KeyboardEvent;if(this.tabListener&&(this.tabListener=this.tabListener()),s&&n&&Mn(n)){const e=this.focusService.findTabbableParent(n);e&&e.focus()}null==r||r.afterGuiDetached(),this.destroyBean(this.activeMenu),this.dispatchVisibleChangedEvent(!1,i,e)},positionCallback:()=>t(o),anchorToElement:l,ariaLabel:h});d&&(this.hidePopup=a=d.hideFunc),r.afterInit().then(()=>{t(o),r.afterGuiAttached({container:i,hidePopup:a})}),e.setMenuVisible(!0,"contextMenu"),this.dispatchVisibleChangedEvent(!0,i,e)}trapFocusWithin(e,t){e.key!==Jn.TAB||e.defaultPrevented||this.focusService.findNextFocusableElement(t,!1,e.shiftKey)||(e.preventDefault(),this.focusService.focusInto(t,e.shiftKey))}dispatchVisibleChangedEvent(e,t,i){const n={type:dt.EVENT_COLUMN_MENU_VISIBLE_CHANGED,visible:e,switchingTab:!1,key:t,column:null!=i?i:null};this.eventService.dispatchEvent(n)}isMenuEnabled(e){var t;return e.isFilterAllowed()&&(null!=(t=e.getColDef().menuTabs)?t:["filterMenuTab"]).includes("filterMenuTab")}showMenuAfterContextMenuEvent(){}destroy(){this.destroyBean(this.activeMenu),super.destroy()}};m([pe("filterManager")],xl.prototype,"filterManager",2),m([pe("popupService")],xl.prototype,"popupService",2),m([pe("focusService")],xl.prototype,"focusService",2),m([pe("ctrlsService")],xl.prototype,"ctrlsService",2),m([pe("menuService")],xl.prototype,"menuService",2),xl=m([ue("filterMenuFactory")],xl);var El=(e=>(e.TAB_GUARD="ag-tab-guard",e.TAB_GUARD_TOP="ag-tab-guard-top",e.TAB_GUARD_BOTTOM="ag-tab-guard-bottom",e))(El||{}),Ml=class extends ot{constructor(e){super(),this.skipTabGuardFocus=!1,this.forcingFocusOut=!1;const{comp:t,eTopGuard:i,eBottomGuard:n,focusTrapActive:s,forceFocusOutWhenTabGuardsAreEmpty:r,focusInnerElement:o,onFocusIn:a,onFocusOut:l,shouldStopEventPropagation:c,onTabKeyDown:h,handleKeyDown:d,eFocusableElement:u}=e;this.comp=t,this.eTopGuard=i,this.eBottomGuard=n,this.providedFocusInnerElement=o,this.eFocusableElement=u,this.focusTrapActive=!!s,this.forceFocusOutWhenTabGuardsAreEmpty=!!r,this.providedFocusIn=a,this.providedFocusOut=l,this.providedShouldStopEventPropagation=c,this.providedOnTabKeyDown=h,this.providedHandleKeyDown=d}postConstruct(){this.createManagedBean(new Ls(this.eFocusableElement,{shouldStopEventPropagation:()=>this.shouldStopEventPropagation(),onTabKeyDown:e=>this.onTabKeyDown(e),handleKeyDown:e=>this.handleKeyDown(e),onFocusIn:e=>this.onFocusIn(e),onFocusOut:e=>this.onFocusOut(e)})),this.activateTabGuards(),[this.eTopGuard,this.eBottomGuard].forEach(e=>this.addManagedListener(e,"focus",this.onFocus.bind(this)))}handleKeyDown(e){this.providedHandleKeyDown&&this.providedHandleKeyDown(e)}tabGuardsAreActive(){return!!this.eTopGuard&&this.eTopGuard.hasAttribute("tabIndex")}shouldStopEventPropagation(){return!!this.providedShouldStopEventPropagation&&this.providedShouldStopEventPropagation()}activateTabGuards(){if(this.forcingFocusOut)return;const e=this.gos.get("tabIndex");this.comp.setTabIndex(e.toString())}deactivateTabGuards(){this.comp.setTabIndex()}onFocus(e){if(this.skipTabGuardFocus)return void(this.skipTabGuardFocus=!1);if(this.forceFocusOutWhenTabGuardsAreEmpty&&0===this.focusService.findFocusableElements(this.eFocusableElement,".ag-tab-guard").length)return void this.findNextElementOutsideAndFocus(e.target===this.eBottomGuard);const t=e.target===this.eBottomGuard;this.providedFocusInnerElement?this.providedFocusInnerElement(t):this.focusInnerElement(t)}findNextElementOutsideAndFocus(e){const t=this.gos.getDocument(),i=this.focusService.findFocusableElements(t.body,null,!0),n=i.indexOf(e?this.eTopGuard:this.eBottomGuard);if(-1===n)return;let s,r;e?(s=0,r=n):(s=n+1,r=i.length);const o=i.slice(s,r),a=this.gos.get("tabIndex");o.sort((e,t)=>{const i=parseInt(e.getAttribute("tabindex")||"0"),n=parseInt(t.getAttribute("tabindex")||"0");return n===a?1:i===a?-1:0===i?1:0===n?-1:i-n}),o[e?o.length-1:0].focus()}onFocusIn(e){this.focusTrapActive||(this.providedFocusIn&&this.providedFocusIn(e),this.deactivateTabGuards())}onFocusOut(e){this.focusTrapActive||(this.providedFocusOut&&this.providedFocusOut(e),this.eFocusableElement.contains(e.relatedTarget)||this.activateTabGuards())}onTabKeyDown(e){if(this.providedOnTabKeyDown)return void this.providedOnTabKeyDown(e);if(this.focusTrapActive)return;if(e.defaultPrevented)return;const t=this.tabGuardsAreActive();t&&this.deactivateTabGuards();const i=this.getNextFocusableElement(e.shiftKey);t&&setTimeout(()=>this.activateTabGuards(),0),i&&(i.focus(),e.preventDefault())}focusInnerElement(e=!1){const t=this.focusService.findFocusableElements(this.eFocusableElement);this.tabGuardsAreActive()&&(t.splice(0,1),t.splice(t.length-1,1)),t.length&&t[e?t.length-1:0].focus({preventScroll:!0})}getNextFocusableElement(e){return this.focusService.findNextFocusableElement(this.eFocusableElement,!1,e)}forceFocusOutOfContainer(e=!1){if(this.forcingFocusOut)return;const t=e?this.eTopGuard:this.eBottomGuard;this.activateTabGuards(),this.skipTabGuardFocus=!0,this.forcingFocusOut=!0,t.focus(),window.setTimeout(()=>{this.forcingFocusOut=!1,this.activateTabGuards()})}isTabGuard(e){return e===this.eTopGuard||e===this.eBottomGuard}};m([pe("focusService")],Ml.prototype,"focusService",2),m([he],Ml.prototype,"postConstruct",1);var Al=class extends ws{initialiseTabGuard(e){this.eTopGuard=this.createTabGuard("top"),this.eBottomGuard=this.createTabGuard("bottom"),this.eFocusableElement=this.getFocusableElement();const t=[this.eTopGuard,this.eBottomGuard],i={setTabIndex:e=>{t.forEach(t=>null!=e?t.setAttribute("tabindex",e):t.removeAttribute("tabindex"))}};this.addTabGuards(this.eTopGuard,this.eBottomGuard),this.tabGuardCtrl=this.createManagedBean(new Ml({comp:i,focusTrapActive:!!e.focusTrapActive,eTopGuard:this.eTopGuard,eBottomGuard:this.eBottomGuard,eFocusableElement:this.eFocusableElement,onFocusIn:e.onFocusIn,onFocusOut:e.onFocusOut,focusInnerElement:e.focusInnerElement,handleKeyDown:e.handleKeyDown,onTabKeyDown:e.onTabKeyDown,shouldStopEventPropagation:e.shouldStopEventPropagation,forceFocusOutWhenTabGuardsAreEmpty:e.forceFocusOutWhenTabGuardsAreEmpty}))}createTabGuard(e){const t=document.createElement("div"),i="top"===e?"ag-tab-guard-top":"ag-tab-guard-bottom";return t.classList.add("ag-tab-guard",i),Ut(t,"presentation"),t}addTabGuards(e,t){this.eFocusableElement.insertAdjacentElement("afterbegin",e),this.eFocusableElement.insertAdjacentElement("beforeend",t)}removeAllChildrenExceptTabGuards(){const e=[this.eTopGuard,this.eBottomGuard];wn(this.getFocusableElement()),this.addTabGuards(...e)}forceFocusOutOfContainer(e=!1){this.tabGuardCtrl.forceFocusOutOfContainer(e)}appendChild(e,t){Gn(e)||(e=e.getGui());const{eBottomGuard:i}=this;i?i.insertAdjacentElement("beforebegin",e):super.appendChild(e,t)}},Tl=class e extends Al{constructor(t){super(e.getTemplate(t.cssClass)),this.items=[],this.tabbedItemScrollMap=new Map,this.params=t}postConstruct(){this.setupHeader(),this.params.items&&this.params.items.forEach(e=>this.addItem(e)),this.initialiseTabGuard({onTabKeyDown:this.onTabKeyDown.bind(this),handleKeyDown:this.handleKeyDown.bind(this),focusInnerElement:this.focusInnerElement.bind(this),focusTrapActive:!0}),this.addDestroyFunc(()=>{var e,t,i;return null==(i=null==(t=null==(e=this.activeItem)?void 0:e.tabbedItem)?void 0:t.afterDetachedCallback)?void 0:i.call(t)})}static getTemplate(e){return`<div class="ag-tabs ${e}">\n            <div ref="eHeader"></div>\n            <div ref="eBody" role="presentation" class="ag-tabs-body ${e?`${e}-body`:""}"></div>\n        </div>`}setupHeader(){const{enableCloseButton:e,cssClass:t}=this.params,i=(e,i)=>{e.classList.add(`ag-tabs-${i}`),t&&e.classList.add(`${t}-${i}`)};e?(this.setupCloseButton(i),this.eTabHeader=this.gos.getDocument().createElement("div"),i(this.eHeader,"header-wrapper"),Ut(this.eHeader,"presentation"),this.eHeader.appendChild(this.eTabHeader)):this.eTabHeader=this.eHeader,Ut(this.eTabHeader,"tablist"),i(this.eTabHeader,"header")}setupCloseButton(e){const t=this.gos.getDocument(),i=t.createElement("button");e(i,"close-button");const n=Zn("close",this.gos,void 0,!0);Yt(i,this.params.closeButtonAriaLabel),i.appendChild(n),this.addManagedListener(i,"click",()=>{var e,t;return null==(t=(e=this.params).onCloseClicked)?void 0:t.call(e)});const s=t.createElement("div");e(s,"close-button-wrapper"),Ut(s,"presentation"),s.appendChild(i),this.eHeader.appendChild(s),this.eCloseButton=i}handleKeyDown(e){switch(e.key){case Jn.RIGHT:case Jn.LEFT:if(!this.eTabHeader.contains(this.gos.getActiveDomElement()))return;const t=e.key===Jn.RIGHT,i=this.gos.get("enableRtl"),n=this.items.indexOf(this.activeItem),s=t!==i?Math.min(n+1,this.items.length-1):Math.max(n-1,0);if(n===s)return;e.preventDefault();const r=this.items[s];this.showItemWrapper(r),r.eHeaderButton.focus();break;case Jn.UP:case Jn.DOWN:e.stopPropagation()}}onTabKeyDown(e){var t,i,n,s;if(e.defaultPrevented)return;const{focusService:r,eHeader:o,eBody:a,activeItem:l,params:c}=this,{suppressTrapFocus:h,enableCloseButton:d}=c,u=this.gos.getActiveDomElement(),p=e.target,g=e.shiftKey;if(o.contains(u))return e.preventDefault(),void(d&&g&&!(null==(t=this.eCloseButton)?void 0:t.contains(u))?null==(i=this.eCloseButton)||i.focus():h&&g?null==(n=this.focusService.findFocusableElementBeforeTabGuard(this.gos.getDocument().body,p))||n.focus():this.focusBody(e.shiftKey));let f=null;if(r.isTargetUnderManagedComponent(a,p)&&(g&&(f=this.focusService.findFocusableElementBeforeTabGuard(a,p)),f||h||(f=l.eHeaderButton)),!f&&a.contains(u)&&(f=r.findNextFocusableElement(a,!1,g),!f))return e.preventDefault(),void(h&&!g?this.forceFocusOutOfContainer(g):d&&!g?null==(s=this.eCloseButton)||s.focus():this.focusHeader());f&&(e.preventDefault(),f.focus())}focusInnerElement(e){e?this.focusHeader():this.focusBody(!0)}focusHeader(e){this.activeItem.eHeaderButton.focus({preventScroll:e})}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");Ut(t,"tab"),t.setAttribute("tabindex","-1"),t.appendChild(e.title),t.classList.add("ag-tab"),this.eTabHeader.appendChild(t),Yt(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(t=>t.tabbedItem===e);t&&this.showItemWrapper(t)}showItemWrapper(e){var t,i,n,s,r,o;const{tabbedItem:a,eHeaderButton:l}=e;null==(i=(t=this.params).onItemClicked)||i.call(t,{item:a}),this.activeItem!==e?(this.lastScrollListener&&(this.lastScrollListener=this.lastScrollListener()),wn(this.eBody),a.bodyPromise.then(e=>{this.eBody.appendChild(e);const t=!this.focusService.isKeyboardMode();if(this.params.suppressFocusBodyOnOpen||this.focusService.focusInto(this.eBody,!1,t),a.afterAttachedCallback&&a.afterAttachedCallback(this.afterAttachedParams),this.params.keepScrollPosition){const t=a.getScrollableContainer&&a.getScrollableContainer()||e;this.lastScrollListener=this.addManagedListener(t,"scroll",()=>{this.tabbedItemScrollMap.set(a.name,t.scrollTop)});const i=this.tabbedItemScrollMap.get(a.name);void 0!==i&&setTimeout(()=>{t.scrollTop=i},0)}}),this.activeItem&&(this.activeItem.eHeaderButton.classList.remove("ag-tab-selected"),null==(o=(r=this.activeItem.tabbedItem).afterDetachedCallback)||o.call(r)),l.classList.add("ag-tab-selected"),this.activeItem=e):null==(s=(n=this.params).onActiveItemClicked)||s.call(n)}};m([pe("focusService")],Tl.prototype,"focusService",2),m([Es("eHeader")],Tl.prototype,"eHeader",2),m([Es("eBody")],Tl.prototype,"eBody",2),m([he],Tl.prototype,"postConstruct",1);var Dl=Tl,Il=class extends ot{constructor(){super(...arguments),this.polyfillFunctions=[]}observeResize(e,t){const i=this.gos.getWindow(),n=()=>{var i,n;let s=null!=(i=null==e?void 0:e.clientWidth)?i:0,r=null!=(n=null==e?void 0:e.clientHeight)?n:0,o=!0;const a=()=>{var i,n;if(o){const o=null!=(i=null==e?void 0:e.clientWidth)?i:0,l=null!=(n=null==e?void 0:e.clientHeight)?n:0;(o!==s||l!==r)&&(s=o,r=l,t()),this.doNextPolyfillTurn(a)}};return a(),()=>o=!1},s=this.gos.get("suppressBrowserResizeObserver");return i.ResizeObserver&&!s?(()=>{const n=new i.ResizeObserver(t);return n.observe(e),()=>n.disconnect()})():this.getFrameworkOverrides().wrapIncoming(()=>n(),"resize-observer")}doNextPolyfillTurn(e){this.polyfillFunctions.push(e),this.schedulePolyfill()}schedulePolyfill(){this.polyfillScheduled||(this.polyfillScheduled=!0,window.setTimeout(()=>{const e=this.polyfillFunctions;this.polyfillScheduled=!1,this.polyfillFunctions=[],e.forEach(e=>e())},50))}};Il=m([ue("resizeObserverService")],Il);var Rl=class extends ot{constructor(){super(...arguments),this.createTasksP1={list:[],sorted:!1},this.createTasksP2={list:[],sorted:!1},this.destroyTasks=[],this.ticking=!1,this.scrollGoingDown=!0,this.lastPage=0,this.lastScrollTop=0,this.taskCount=0,this.cancelledTasks=new Set}setScrollTop(e){const t=this.gos.get("pagination");if(this.scrollGoingDown=e>=this.lastScrollTop,t&&0===e){const e=this.paginationProxy.getCurrentPage();e!==this.lastPage&&(this.lastPage=e,this.scrollGoingDown=!0)}this.lastScrollTop=e}init(){this.useAnimationFrame=!this.gos.get("suppressAnimationFrame")}isOn(){return this.useAnimationFrame}verifyAnimationFrameOn(e){!1===this.useAnimationFrame&&console.warn(`AG Grid: AnimationFrameService.${e} called but animation frames are off`)}createTask(e,t,i){this.verifyAnimationFrameOn(i);const n={task:e,index:t,createOrder:++this.taskCount};this.addTaskToList(this[i],n),this.schedule()}cancelTask(e){this.cancelledTasks.add(e)}addTaskToList(e,t){e.list.push(t),e.sorted=!1}sortTaskList(e){if(e.sorted)return;const t=this.scrollGoingDown?1:-1;e.list.sort((e,i)=>e.index!==i.index?t*(i.index-e.index):i.createOrder-e.createOrder),e.sorted=!0}addDestroyTask(e){this.verifyAnimationFrameOn("createTasksP3"),this.destroyTasks.push(e),this.schedule()}executeFrame(e){this.verifyAnimationFrameOn("executeFrame");const t=this.createTasksP1,i=t.list,n=this.createTasksP2,s=n.list,r=this.destroyTasks,o=(new Date).getTime();let a=(new Date).getTime()-o;const l=e<=0,c=this.ctrlsService.getGridBodyCtrl();for(;l||a<e;){if(!c.getScrollFeature().scrollGridIfNeeded()){let e;if(i.length)this.sortTaskList(t),e=i.pop().task;else if(s.length)this.sortTaskList(n),e=s.pop().task;else{if(!r.length){this.cancelledTasks.clear();break}e=r.pop()}this.cancelledTasks.has(e)||e()}a=(new Date).getTime()-o}i.length||s.length||r.length?this.requestFrame():this.stopTicking()}stopTicking(){this.ticking=!1}flushAllFrames(){this.useAnimationFrame&&this.executeFrame(-1)}schedule(){this.useAnimationFrame&&(this.ticking||(this.ticking=!0,this.requestFrame()))}requestFrame(){const e=this.executeFrame.bind(this,60);this.requestAnimationFrame(e)}requestAnimationFrame(e){const t=this.gos.getWindow();t.requestAnimationFrame?t.requestAnimationFrame(e):t.webkitRequestAnimationFrame?t.webkitRequestAnimationFrame(e):t.setTimeout(e,0)}isQueueEmpty(){return!this.ticking}debounce(e){let t=!1;return()=>{this.isOn()?t||(t=!0,this.addDestroyTask(()=>{t=!1,e()})):window.setTimeout(e,0)}}};m([pe("ctrlsService")],Rl.prototype,"ctrlsService",2),m([pe("paginationProxy")],Rl.prototype,"paginationProxy",2),m([he],Rl.prototype,"init",1),Rl=m([ue("animationFrameService")],Rl);var Ll=(e=>(e.EVERYTHING="group",e.FILTER="filter",e.SORT="sort",e.MAP="map",e.AGGREGATE="aggregate",e.FILTER_AGGREGATES="filter_aggregates",e.PIVOT="pivot",e.NOTHING="nothing",e))(Ll||{}),kl=class extends ot{postConstruct(){this.isClientSideRowModel="clientSide"===this.rowModel.getType()}expandRows(e){if(!this.isClientSideRowModel)return;const t=new Set(e);this.rowModel.forEachNode(e=>{e.id&&t.has(e.id)&&(e.expanded=!0)}),this.onGroupExpandedOrCollapsed()}getExpandedRows(){const e=[];return this.rowModel.forEachNode(({expanded:t,id:i})=>{t&&i&&e.push(i)}),e}expandAll(e){this.isClientSideRowModel&&this.rowModel.expandOrCollapseAll(e)}setRowNodeExpanded(e,t,i,n){e&&(i&&e.parent&&-1!==e.parent.level&&this.setRowNodeExpanded(e.parent,t,i,n),e.setExpanded(t,void 0,n))}onGroupExpandedOrCollapsed(){this.isClientSideRowModel&&this.rowModel.refreshModel({step:"map"})}};m([pe("rowModel")],kl.prototype,"rowModel",2),m([he],kl.prototype,"postConstruct",1),kl=m([ue("expansionService")],kl);var Pl=class extends ot{postConstruct(){var e;this.activeMenuFactory=null!=(e=this.enterpriseMenuFactory)?e:this.filterMenuFactory}showColumnMenu(e){this.showColumnMenuCommon(this.activeMenuFactory,e,"columnMenu")}showFilterMenu(e){const t=this.enterpriseMenuFactory&&this.isLegacyMenuEnabled()?this.enterpriseMenuFactory:this.filterMenuFactory;this.showColumnMenuCommon(t,e,e.containerType,!0)}showHeaderContextMenu(e,t,i){this.activeMenuFactory.showMenuAfterContextMenuEvent(e,t,i)}getContextMenuPosition(e,t){const i=this.getRowCtrl(e),n=this.getCellGui(i,t);if(!n)return i?{x:0,y:i.getRowYPosition()}:{x:0,y:0};const s=n.getBoundingClientRect();return{x:s.x+s.width/2,y:s.y+s.height/2}}showContextMenu(e){var t,i,n;const{column:s,rowNode:r}=e;let{anchorToElement:o,value:a}=e;r&&s&&null==a&&(a=r.getValueFromValueService(s)),null==o&&(o=this.getContextMenuAnchorElement(r,s)),null==(n=this.contextMenuFactory)||n.onContextMenu(null!=(t=e.mouseEvent)?t:null,null!=(i=e.touchEvent)?i:null,null!=r?r:null,null!=s?s:null,a,o)}showColumnChooser(e){var t;null==(t=this.columnChooserFactory)||t.showColumnChooser(e)}hidePopupMenu(){var e;null==(e=this.contextMenuFactory)||e.hideActiveMenu(),this.activeMenuFactory.hideActiveMenu()}hideColumnChooser(){var e;null==(e=this.columnChooserFactory)||e.hideActiveColumnChooser()}isColumnMenuInHeaderEnabled(e){const{suppressMenu:t,suppressHeaderMenuButton:i}=e.getColDef();return!(null!=i?i:t)&&this.activeMenuFactory.isMenuEnabled(e)&&(this.isLegacyMenuEnabled()||!!this.enterpriseMenuFactory)}isFilterMenuInHeaderEnabled(e){return!e.getColDef().suppressHeaderFilterButton&&this.filterManager.isFilterAllowed(e)}isHeaderContextMenuEnabled(e){return!(null==e?void 0:e.getColDef().suppressHeaderContextMenu)&&"new"===this.getColumnMenuType()}isHeaderMenuButtonAlwaysShowEnabled(){return this.isSuppressMenuHide()}isHeaderMenuButtonEnabled(){const e=!this.isSuppressMenuHide();return!(Ni()&&e)}isHeaderFilterButtonEnabled(e){return this.isFilterMenuInHeaderEnabled(e)&&!this.isLegacyMenuEnabled()&&!this.isFloatingFilterButtonDisplayed(e)}isFilterMenuItemEnabled(e){return this.filterManager.isFilterAllowed(e)&&!this.isLegacyMenuEnabled()&&!this.isFilterMenuInHeaderEnabled(e)&&!this.isFloatingFilterButtonDisplayed(e)}isColumnMenuAnchoringEnabled(){return!this.isLegacyMenuEnabled()}areAdditionalColumnMenuItemsEnabled(){return"new"===this.getColumnMenuType()}isLegacyMenuEnabled(){return"legacy"===this.getColumnMenuType()}isFloatingFilterButtonEnabled(e){var t;const i=e.getColDef(),n=null==(t=i.floatingFilterComponentParams)?void 0:t.suppressFilterButton;return null!=n&&j("As of v31.1, 'colDef.floatingFilterComponentParams.suppressFilterButton' is deprecated. Use 'colDef.suppressFloatingFilterButton' instead."),null==i.suppressFloatingFilterButton?!n:!i.suppressFloatingFilterButton}getColumnMenuType(){var e;return null!=(e=this.gos.get("columnMenu"))?e:"legacy"}isFloatingFilterButtonDisplayed(e){return!!e.getColDef().floatingFilter&&this.isFloatingFilterButtonEnabled(e)}isSuppressMenuHide(){const e=this.gos.get("suppressMenuHide");return this.isLegacyMenuEnabled()?e:!this.gos.exists("suppressMenuHide")||e}showColumnMenuCommon(e,t,i,n){const{column:s,positionBy:r}=t;if("button"===r){const{buttonElement:r}=t;e.showMenuAfterButtonClick(s,r,i,n)}else if("mouse"===r){const{mouseEvent:r}=t;e.showMenuAfterMouseEvent(s,r,i,n)}else s&&(this.ctrlsService.getGridBodyCtrl().getScrollFeature().ensureColumnVisible(s,"auto"),this.animationFrameService.requestAnimationFrame(()=>{const t=this.ctrlsService.getHeaderRowContainerCtrl(s.getPinned()).getHeaderCtrlForColumn(s);e.showMenuAfterButtonClick(s,t.getAnchorElementForMenu(n),i,!0)}))}getRowCtrl(e){const{rowIndex:t,rowPinned:i}=e||{};if(null!=t)return this.rowRenderer.getRowByPosition({rowIndex:t,rowPinned:i})||void 0}getCellGui(e,t){if(!e||!t)return;const i=e.getCellCtrl(t);return(null==i?void 0:i.getGui())||void 0}getContextMenuAnchorElement(e,t){const i=this.ctrlsService.getGridBodyCtrl().getGridBodyElement(),n=this.getRowCtrl(e);if(!n)return i;return this.getCellGui(n,t)||(n.isFullWidth()?n.getFullWidthElement():i)}};m([pe("filterMenuFactory")],Pl.prototype,"filterMenuFactory",2),m([pe("ctrlsService")],Pl.prototype,"ctrlsService",2),m([pe("animationFrameService")],Pl.prototype,"animationFrameService",2),m([pe("filterManager")],Pl.prototype,"filterManager",2),m([pe("rowRenderer")],Pl.prototype,"rowRenderer",2),m([ge("columnChooserFactory")],Pl.prototype,"columnChooserFactory",2),m([ge("contextMenuFactory")],Pl.prototype,"contextMenuFactory",2),m([ge("enterpriseMenuFactory")],Pl.prototype,"enterpriseMenuFactory",2),m([he],Pl.prototype,"postConstruct",1),Pl=m([ue("menuService")],Pl);var Nl=class extends ot{postConstruct(){this.ctrlsService.whenReady(e=>{this.centerRowContainerCtrl=e.center})}getPreferredWidthForColumn(e,t){const i=this.getHeaderCellForColumn(e);if(!i)return-1;const n=this.rowRenderer.getAllCellsForColumn(e);return t||n.push(i),this.addElementsToContainerAndGetWidth(n)}getPreferredWidthForColumnGroup(e){const t=this.getHeaderCellForColumn(e);return t?this.addElementsToContainerAndGetWidth([t]):-1}addElementsToContainerAndGetWidth(e){const t=document.createElement("form");t.style.position="fixed";const i=this.centerRowContainerCtrl.getContainerElement();e.forEach(e=>this.cloneItemIntoDummy(e,t)),i.appendChild(t);const n=t.offsetWidth;return i.removeChild(t),n+this.getAutoSizePadding()}getAutoSizePadding(){return this.gos.get("autoSizePadding")}getHeaderCellForColumn(e){let t=null;return this.ctrlsService.getHeaderRowContainerCtrls().forEach(i=>{const n=i.getHtmlElementForColumnHeader(e);null!=n&&(t=n)}),t}cloneItemIntoDummy(e,t){const i=e.cloneNode(!0);i.style.width="",i.style.position="static",i.style.left="";const n=document.createElement("div"),s=n.classList;["ag-header-cell","ag-header-group-cell"].some(e=>i.classList.contains(e))?(s.add("ag-header","ag-header-row"),n.style.position="static"):s.add("ag-row");let r=e.parentElement;for(;r;){if(["ag-header-row","ag-row"].some(e=>r.classList.contains(e))){for(let e=0;e<r.classList.length;e++){const t=r.classList[e];"ag-row-position-absolute"!=t&&s.add(t)}break}r=r.parentElement}n.appendChild(i),t.appendChild(n)}};m([pe("rowRenderer")],Nl.prototype,"rowRenderer",2),m([pe("ctrlsService")],Nl.prototype,"ctrlsService",2),m([pe("rowCssClassCalculator")],Nl.prototype,"rowCssClassCalculator",2),m([he],Nl.prototype,"postConstruct",1),Nl=m([ue("autoWidthCalculator")],Nl);var Ol=class extends ot{constructor(e,t){super(),this.createRowCon=e,this.destroyRowCtrls=t,this.stickyTopRowCtrls=[],this.stickyBottomRowCtrls=[],this.topContainerHeight=0,this.bottomContainerHeight=0}postConstruct(){this.isClientSide="clientSide"===this.rowModel.getType(),this.ctrlsService.whenReady(e=>{this.gridBodyCtrl=e.gridBodyCtrl})}getStickyTopRowCtrls(){return this.stickyTopRowCtrls}getStickyBottomRowCtrls(){return this.stickyBottomRowCtrls}getLastPixelOfGroup(e){return this.isClientSide?this.getClientSideLastPixelOfGroup(e):this.getServerSideLastPixelOfGroup(e)}getFirstPixelOfGroup(e){return e.footer?e.sibling.rowTop+e.sibling.rowHeight-1:e.hasChildren()?e.rowTop-1:0}getServerSideLastPixelOfGroup(e){var t,i,n,s;if(this.isClientSide)throw new Error("This func should only be called in server side row model.");if(e.isExpandable()||e.footer){if(e.master)return e.detailNode.rowTop+e.detailNode.rowHeight;if(!e.sibling||1===Math.abs(e.sibling.rowIndex-e.rowIndex)){let r=null==(t=e.childStore)?void 0:t.getStoreBounds();return e.footer&&(r=null==(i=e.sibling.childStore)?void 0:i.getStoreBounds()),(null!=(n=null==r?void 0:r.heightPx)?n:0)+(null!=(s=null==r?void 0:r.topPx)?s:0)}return e.footer?e.rowTop+e.rowHeight:e.sibling.rowTop+e.sibling.rowHeight}return Number.MAX_SAFE_INTEGER}getClientSideLastPixelOfGroup(e){if(!this.isClientSide)throw new Error("This func should only be called in client side row model.");if(e.isExpandable()||e.footer){const t=e.footer&&0===e.rowIndex,i=!e.sibling||1===Math.abs(e.sibling.rowIndex-e.rowIndex);if(t||i){let t=e.footer?e.sibling:e;for(;t.isExpandable()&&t.expanded;)if(t.master)t=t.detailNode;else if(t.childrenAfterSort){if(0===t.childrenAfterSort.length)break;t=Le(t.childrenAfterSort)}return t.rowTop+t.rowHeight}return e.footer?e.rowTop+e.rowHeight:e.sibling.rowTop+e.sibling.rowHeight}return Number.MAX_SAFE_INTEGER}updateStickyRows(e){const t="top"===e;let i=0;if(!this.canRowsBeSticky())return this.refreshNodesAndContainerHeight(e,new Set,i);const n=t?this.rowRenderer.getFirstVisibleVerticalPixel():this.rowRenderer.getLastVisibleVerticalPixel(),s=new Set,r=e=>{if(s.add(e),t){const t=this.getLastPixelOfGroup(e),s=n+i+e.rowHeight;e.stickyRowTop=t<s?i+(t-s):i}else{const t=this.getFirstPixelOfGroup(e),s=n-(i+e.rowHeight);e.stickyRowTop=t>s?i-(t-s):i}i=0,s.forEach(e=>{const t=e.stickyRowTop+e.rowHeight;i<t&&(i=t)})},o=this.areFooterRowsStickySuppressed(),a=this.gos.get("suppressGroupRowsSticky"),l=e=>!!e.displayed&&(e.footer?!0!==o&&(("grand"!==o||-1!==e.level)&&(!("group"===o&&e.level>-1)&&!s.has(e))):!!e.isExpandable()&&(!0!==a&&(!s.has(e)&&e.expanded)));for(let e=0;e<100;e++){let e=n+i;t||(e=n-i);const s=this.rowModel.getRowIndexAtPixel(e),o=this.rowModel.getRow(s);if(null==o)break;const a=this.getStickyAncestors(o).find(e=>(t?e.rowIndex<s:e.rowIndex>s)&&l(e));if(a)r(a);else{if(!(t?o.rowTop<e:o.rowTop+o.rowHeight>e)||!l(o))break;r(o)}}return t||s.forEach(e=>{e.stickyRowTop=i-(e.stickyRowTop+e.rowHeight)}),this.refreshNodesAndContainerHeight(e,s,i)}areFooterRowsStickySuppressed(){const e=this.gos.get("suppressStickyTotalRow");if(!0===e)return!0;const t=!!this.gos.get("groupIncludeFooter")||"group"===e,i=!!this.gos.get("groupIncludeTotalFooter")||"grand"===e;return!(!t||!i)||(i?"grand":!!t&&"group")}canRowsBeSticky(){const e=this.gos.isGroupRowsSticky(),t=this.areFooterRowsStickySuppressed(),i=this.gos.get("suppressGroupRowsSticky");return e&&(!t||!i)}getStickyAncestors(e){const t=[];let i=e.footer?e.sibling:e.parent;for(;i;)i.sibling&&t.push(i.sibling),t.push(i),i=i.parent;return t.reverse()}checkStickyRows(){const e=this.updateStickyRows("top"),t=this.updateStickyRows("bottom");return e||t}destroyStickyCtrls(){this.refreshNodesAndContainerHeight("top",new Set,0),this.refreshNodesAndContainerHeight("bottom",new Set,0)}refreshStickyNode(e){const t=new Set;if(this.stickyTopRowCtrls.some(t=>t.getRowNode()===e)){for(let i=0;i<this.stickyTopRowCtrls.length;i++){const n=this.stickyTopRowCtrls[i].getRowNode();n!==e&&t.add(n)}this.refreshNodesAndContainerHeight("top",t,this.topContainerHeight)&&this.checkStickyRows()}else{for(let i=0;i<this.stickyBottomRowCtrls.length;i++){const n=this.stickyBottomRowCtrls[i].getRowNode();n!==e&&t.add(n)}this.refreshNodesAndContainerHeight("bottom",t,this.bottomContainerHeight)&&this.checkStickyRows()}}refreshNodesAndContainerHeight(e,t,i){const n="top"===e,s=n?this.stickyTopRowCtrls:this.stickyBottomRowCtrls,r={},o=[];for(let e=0;e<s.length;e++){const i=s[e].getRowNode();t.has(i)?o.push(s[e]):(r[i.id]=s[e],i.sticky=!1)}const a=new Set;for(let e=0;e<o.length;e++)a.add(o[e].getRowNode());const l=[];t.forEach(e=>{a.has(e)||(e.sticky=!0,l.push(this.createRowCon(e,!1,!1)))});let c=!!l.length||o.length!==s.length;n?this.topContainerHeight!==i&&(this.topContainerHeight=i,this.gridBodyCtrl.setStickyTopHeight(i),c=!0):this.bottomContainerHeight!==i&&(this.bottomContainerHeight=i,this.gridBodyCtrl.setStickyBottomHeight(i),c=!0),this.destroyRowCtrls(r,!1);const h=[...o,...l];return h.sort((e,t)=>t.getRowNode().rowIndex-e.getRowNode().rowIndex),n||h.reverse(),h.forEach(e=>e.setRowTop(e.getRowNode().stickyRowTop)),!!c&&(n?this.stickyTopRowCtrls=h:this.stickyBottomRowCtrls=h,!0)}};m([pe("rowModel")],Ol.prototype,"rowModel",2),m([pe("rowRenderer")],Ol.prototype,"rowRenderer",2),m([pe("ctrlsService")],Ol.prototype,"ctrlsService",2),m([he],Ol.prototype,"postConstruct",1);var _l=class extends ot{constructor(){super(...arguments),this.destroyFuncsForColumnListeners=[],this.rowCtrlsByRowIndex={},this.zombieRowCtrls={},this.allRowCtrls=[],this.topRowCtrls=[],this.bottomRowCtrls=[],this.refreshInProgress=!1,this.dataFirstRenderedFired=!1,this.setupRangeSelectionListeners=()=>{const e=()=>{this.getAllCellCtrls().forEach(e=>e.onRangeSelectionChanged())},t=()=>{this.getAllCellCtrls().forEach(e=>e.updateRangeBordersIfRangeCount())},i=()=>{this.eventService.addEventListener(dt.EVENT_RANGE_SELECTION_CHANGED,e),this.eventService.addEventListener(dt.EVENT_COLUMN_MOVED,t),this.eventService.addEventListener(dt.EVENT_COLUMN_PINNED,t),this.eventService.addEventListener(dt.EVENT_COLUMN_VISIBLE,t)},n=()=>{this.eventService.removeEventListener(dt.EVENT_RANGE_SELECTION_CHANGED,e),this.eventService.removeEventListener(dt.EVENT_COLUMN_MOVED,t),this.eventService.removeEventListener(dt.EVENT_COLUMN_PINNED,t),this.eventService.removeEventListener(dt.EVENT_COLUMN_VISIBLE,t)};this.addDestroyFunc(()=>n()),this.addManagedPropertyListener("enableRangeSelection",e=>{e.currentValue?i():n()}),this.gos.get("enableRangeSelection")&&i()}}postConstruct(){this.ctrlsService.whenReady(e=>{this.gridBodyCtrl=e.gridBodyCtrl,this.initialise()})}initialise(){if(this.addManagedListener(this.eventService,dt.EVENT_PAGINATION_CHANGED,this.onPageLoaded.bind(this)),this.addManagedListener(this.eventService,dt.EVENT_PINNED_ROW_DATA_CHANGED,this.onPinnedRowDataChanged.bind(this)),this.addManagedListener(this.eventService,dt.EVENT_DISPLAYED_COLUMNS_CHANGED,this.onDisplayedColumnsChanged.bind(this)),this.addManagedListener(this.eventService,dt.EVENT_BODY_SCROLL,this.onBodyScroll.bind(this)),this.addManagedListener(this.eventService,dt.EVENT_BODY_HEIGHT_CHANGED,this.redraw.bind(this)),this.addManagedPropertyListeners(["domLayout","embedFullWidthRows"],()=>this.onDomLayoutChanged()),this.addManagedPropertyListeners(["suppressMaxRenderedRowRestriction","rowBuffer"],()=>this.redraw()),this.addManagedPropertyListeners(["suppressCellFocus","getBusinessKeyForNode","fullWidthCellRenderer","fullWidthCellRendererParams","rowStyle","getRowStyle","rowClass","getRowClass","rowClassRules","suppressStickyTotalRow","groupRowRenderer","groupRowRendererParams","loadingCellRenderer","loadingCellRendererParams","detailCellRenderer","detailCellRendererParams","enableRangeSelection","enableCellTextSelection"],()=>this.redrawRows()),this.gos.isGroupRowsSticky()){const e=this.rowModel.getType();"clientSide"!==e&&"serverSide"!==e||(this.stickyRowFeature=this.createManagedBean(new Ol(this.createRowCon.bind(this),this.destroyRowCtrls.bind(this))))}this.registerCellEventListeners(),this.initialiseCache(),this.printLayout=this.gos.isDomLayout("print"),this.embedFullWidthRows=this.printLayout||this.gos.get("embedFullWidthRows"),this.redrawAfterModelUpdate()}initialiseCache(){if(this.gos.get("keepDetailRows")){const e=this.getKeepDetailRowsCount(),t=null!=e?e:3;this.cachedRowCtrls=new Fl(t)}}getKeepDetailRowsCount(){return this.gos.get("keepDetailRowsCount")}getStickyTopRowCtrls(){return this.stickyRowFeature?this.stickyRowFeature.getStickyTopRowCtrls():[]}getStickyBottomRowCtrls(){return this.stickyRowFeature?this.stickyRowFeature.getStickyBottomRowCtrls():[]}updateAllRowCtrls(){const e=F(this.rowCtrlsByRowIndex),t=F(this.zombieRowCtrls),i=this.cachedRowCtrls?this.cachedRowCtrls.getEntries():[];t.length>0||i.length>0?this.allRowCtrls=[...e,...t,...i]:this.allRowCtrls=e}onCellFocusChanged(e){this.getAllCellCtrls().forEach(t=>t.onCellFocused(e)),this.getFullWidthRowCtrls().forEach(t=>t.onFullWidthRowFocused(e))}registerCellEventListeners(){this.addManagedListener(this.eventService,dt.EVENT_CELL_FOCUSED,e=>{this.onCellFocusChanged(e)}),this.addManagedListener(this.eventService,dt.EVENT_CELL_FOCUS_CLEARED,()=>{this.onCellFocusChanged()}),this.addManagedListener(this.eventService,dt.EVENT_FLASH_CELLS,e=>{this.getAllCellCtrls().forEach(t=>t.onFlashCells(e))}),this.addManagedListener(this.eventService,dt.EVENT_COLUMN_HOVER_CHANGED,()=>{this.getAllCellCtrls().forEach(e=>e.onColumnHover())}),this.addManagedListener(this.eventService,dt.EVENT_DISPLAYED_COLUMNS_CHANGED,()=>{this.getAllCellCtrls().forEach(e=>e.onDisplayedColumnsChanged())}),this.addManagedListener(this.eventService,dt.EVENT_DISPLAYED_COLUMNS_WIDTH_CHANGED,()=>{this.printLayout&&this.getAllCellCtrls().forEach(e=>e.onLeftChanged())}),this.setupRangeSelectionListeners(),this.refreshListenersToColumnsForCellComps(),this.addManagedListener(this.eventService,dt.EVENT_GRID_COLUMNS_CHANGED,this.refreshListenersToColumnsForCellComps.bind(this)),this.addDestroyFunc(this.removeGridColumnListeners.bind(this))}removeGridColumnListeners(){this.destroyFuncsForColumnListeners.forEach(e=>e()),this.destroyFuncsForColumnListeners.length=0}refreshListenersToColumnsForCellComps(){this.removeGridColumnListeners(),this.columnModel.getAllGridColumns().forEach(e=>{const t=t=>{this.getAllCellCtrls().forEach(i=>{i.getColumn()===e&&t(i)})},i=()=>{t(e=>e.onLeftChanged())},n=()=>{t(e=>e.onWidthChanged())},s=()=>{t(e=>e.onFirstRightPinnedChanged())},r=()=>{t(e=>e.onLastLeftPinnedChanged())},o=()=>{t(e=>e.onColDefChanged())};e.addEventListener("leftChanged",i),e.addEventListener("widthChanged",n),e.addEventListener("firstRightPinnedChanged",s),e.addEventListener("lastLeftPinnedChanged",r),e.addEventListener("colDefChanged",o),this.destroyFuncsForColumnListeners.push(()=>{e.removeEventListener("leftChanged",i),e.removeEventListener("widthChanged",n),e.removeEventListener("firstRightPinnedChanged",s),e.removeEventListener("lastLeftPinnedChanged",r),e.removeEventListener("colDefChanged",o)})})}onDomLayoutChanged(){const e=this.gos.isDomLayout("print"),t=e||this.gos.get("embedFullWidthRows"),i=t!==this.embedFullWidthRows||this.printLayout!==e;this.printLayout=e,this.embedFullWidthRows=t,i&&this.redrawAfterModelUpdate({domLayoutChanged:!0})}datasourceChanged(){this.firstRenderedRow=0,this.lastRenderedRow=-1;const e=Object.keys(this.rowCtrlsByRowIndex);this.removeRowCtrls(e)}onPageLoaded(e){const t={recycleRows:e.keepRenderedRows,animate:e.animate,newData:e.newData,newPage:e.newPage,onlyBody:!0};this.redrawAfterModelUpdate(t)}getAllCellsForColumn(e){const t=[];return this.getAllRowCtrls().forEach(i=>{const n=i.getCellElement(e);n&&t.push(n)}),t}refreshFloatingRowComps(){this.refreshFloatingRows(this.topRowCtrls,this.pinnedRowModel.getPinnedTopRowData()),this.refreshFloatingRows(this.bottomRowCtrls,this.pinnedRowModel.getPinnedBottomRowData())}getTopRowCtrls(){return this.topRowCtrls}getCentreRowCtrls(){return this.allRowCtrls}getBottomRowCtrls(){return this.bottomRowCtrls}refreshFloatingRows(e,t){e.forEach(e=>{e.destroyFirstPass(),e.destroySecondPass()}),e.length=0,t&&t.forEach(t=>{const i=new ba(t,this.beans,!1,!1,this.printLayout);e.push(i)})}onPinnedRowDataChanged(){this.redrawAfterModelUpdate({recycleRows:!0})}redrawRow(e,t=!1){var i;if(e.sticky)this.stickyRowFeature.refreshStickyNode(e);else{if(null==(i=this.cachedRowCtrls)?void 0:i.has(e))return void this.cachedRowCtrls.removeRow(e);{const t=t=>{const i=t[e.rowIndex];i&&i.getRowNode()===e&&(i.destroyFirstPass(),i.destroySecondPass(),t[e.rowIndex]=this.createRowCon(e,!1,!1))};switch(e.rowPinned){case"top":t(this.topRowCtrls);break;case"bottom":t(this.bottomRowCtrls);break;default:t(this.rowCtrlsByRowIndex),this.updateAllRowCtrls()}}}t||this.dispatchDisplayedRowsChanged(!1)}redrawRows(e){if(null!=e)return null==e||e.forEach(e=>this.redrawRow(e,!0)),void this.dispatchDisplayedRowsChanged(!1);this.redrawAfterModelUpdate()}getCellToRestoreFocusToAfterRefresh(e){const t=(null==e?void 0:e.suppressKeepFocus)?null:this.focusService.getFocusCellToUseAfterRefresh();if(null==t)return null;const i=this.gos.getActiveDomElement(),n=this.gos.getDomData(i,va.DOM_DATA_KEY_CELL_CTRL),s=this.gos.getDomData(i,ba.DOM_DATA_KEY_ROW_CTRL);return n||s?t:null}redrawAfterModelUpdate(e={}){this.getLockOnRefresh();const t=this.getCellToRestoreFocusToAfterRefresh(e);this.updateContainerHeights(),this.scrollToTopIfNewData(e);const i=!e.domLayoutChanged&&!!e.recycleRows,n=e.animate&&this.gos.isAnimateRows(),s=i?this.getRowsToRecycle():null;i||this.removeAllRowComps(),this.workOutFirstAndLastRowsToRender(),this.stickyRowFeature&&this.stickyRowFeature.checkStickyRows(),this.recycleRows(s,n),this.gridBodyCtrl.updateRowCount(),e.onlyBody||this.refreshFloatingRowComps(),this.dispatchDisplayedRowsChanged(),null!=t&&this.restoreFocusedCell(t),this.releaseLockOnRefresh()}scrollToTopIfNewData(e){const t=e.newData||e.newPage,i=this.gos.get("suppressScrollOnNewData");t&&!i&&this.gridBodyCtrl.getScrollFeature().scrollToTop()}updateContainerHeights(){if(this.printLayout)return void this.rowContainerHeightService.setModelHeight(null);let e=this.paginationProxy.getCurrentPageHeight();0===e&&(e=1),this.rowContainerHeightService.setModelHeight(e)}getLockOnRefresh(){if(this.refreshInProgress)throw new Error("AG Grid: cannot get grid to draw rows when it is in the middle of drawing rows. Your code probably called a grid API method while the grid was in the render stage. To overcome this, put the API call into a timeout, e.g. instead of api.redrawRows(), call setTimeout(function() { api.redrawRows(); }, 0). To see what part of your code that caused the refresh check this stacktrace.");this.refreshInProgress=!0}releaseLockOnRefresh(){this.refreshInProgress=!1}isRefreshInProgress(){return this.refreshInProgress}restoreFocusedCell(e){e&&(this.focusService.setRestoreFocusedCell(e),this.onCellFocusChanged(this.beans.gos.addGridCommonParams({rowIndex:e.rowIndex,column:e.column,rowPinned:e.rowPinned,forceBrowserFocus:!0,preventScrollOnBrowserFocus:!0,type:"mock"})))}stopEditing(e=!1){this.getAllRowCtrls().forEach(t=>{t.stopEditing(e)})}getAllCellCtrls(){const e=[],t=this.getAllRowCtrls(),i=t.length;for(let n=0;n<i;n++){const i=t[n].getAllCellCtrls(),s=i.length;for(let t=0;t<s;t++)e.push(i[t])}return e}getAllRowCtrls(){const e=this.stickyRowFeature&&this.stickyRowFeature.getStickyTopRowCtrls()||[],t=this.stickyRowFeature&&this.stickyRowFeature.getStickyBottomRowCtrls()||[],i=[...this.topRowCtrls,...this.bottomRowCtrls,...e,...t];for(const e in this.rowCtrlsByRowIndex)i.push(this.rowCtrlsByRowIndex[e]);return i}addRenderedRowListener(e,t,i){const n=this.rowCtrlsByRowIndex[t];n&&n.addEventListener(e,i)}flashCells(e={}){this.getCellCtrls(e.rowNodes,e.columns).forEach(t=>t.flashCell(e))}refreshCells(e={}){const t={forceRefresh:e.force,newData:!1,suppressFlash:e.suppressFlash};this.getCellCtrls(e.rowNodes,e.columns).forEach(e=>e.refreshOrDestroyCell(t)),e.rowNodes&&(this.getRowCtrls(e.rowNodes).forEach(e=>{e.isFullWidth()&&(e.refreshFullWidth()||this.redrawRow(e.getRowNode(),!0))}),this.dispatchDisplayedRowsChanged(!1))}getCellRendererInstances(e){var t;const i=this.getCellCtrls(e.rowNodes,e.columns).map(e=>e.getCellRenderer()).filter(e=>null!=e);if(null==(t=e.columns)?void 0:t.length)return i;const n=[],s=this.mapRowNodes(e.rowNodes);return this.getAllRowCtrls().forEach(e=>{if(s&&!this.isRowInMap(e.getRowNode(),s))return;if(!e.isFullWidth())return;const t=e.getFullWidthCellRenderers();for(let e=0;e<t.length;e++){const i=t[e];null!=i&&n.push(i)}}),[...n,...i]}getCellEditorInstances(e){const t=[];return this.getCellCtrls(e.rowNodes,e.columns).forEach(e=>{const i=e.getCellEditor();i&&t.push(i)}),t}getEditingCells(){const e=[];return this.getAllCellCtrls().forEach(t=>{if(t.isEditing()){const i=t.getCellPosition();e.push(i)}}),e}mapRowNodes(e){if(!e)return;const t={top:{},bottom:{},normal:{}};return e.forEach(e=>{const i=e.id;switch(e.rowPinned){case"top":t.top[i]=e;break;case"bottom":t.bottom[i]=e;break;default:t.normal[i]=e}}),t}isRowInMap(e,t){const i=e.id;switch(e.rowPinned){case"top":return null!=t.top[i];case"bottom":return null!=t.bottom[i];default:return null!=t.normal[i]}}getRowCtrls(e){const t=this.mapRowNodes(e),i=this.getAllRowCtrls();return e&&t?i.filter(e=>{const i=e.getRowNode();return this.isRowInMap(i,t)}):i}getCellCtrls(e,t){let i;S(t)&&(i={},t.forEach(e=>{const t=this.columnModel.getGridColumn(e);S(t)&&(i[t.getId()]=!0)}));const n=[];return this.getRowCtrls(e).forEach(e=>{e.getAllCellCtrls().forEach(e=>{const t=e.getColumn().getId();i&&!i[t]||n.push(e)})}),n}destroy(){this.removeAllRowComps(),super.destroy()}removeAllRowComps(){const e=Object.keys(this.rowCtrlsByRowIndex);this.removeRowCtrls(e),this.stickyRowFeature&&this.stickyRowFeature.destroyStickyCtrls()}getRowsToRecycle(){const e=[];N(this.rowCtrlsByRowIndex,(t,i)=>{null==i.getRowNode().id&&e.push(t)}),this.removeRowCtrls(e);const t={};return N(this.rowCtrlsByRowIndex,(e,i)=>{const n=i.getRowNode();t[n.id]=i}),this.rowCtrlsByRowIndex={},t}removeRowCtrls(e,t=!1){e.forEach(e=>{const i=this.rowCtrlsByRowIndex[e];i&&(i.destroyFirstPass(t),i.destroySecondPass()),delete this.rowCtrlsByRowIndex[e]})}onBodyScroll(e){"vertical"===e.direction&&this.redraw({afterScroll:!0})}redraw(e={}){const{afterScroll:t}=e;let i;this.stickyRowFeature&&Oi()&&(i=this.getCellToRestoreFocusToAfterRefresh()||void 0);const n=this.firstRenderedRow,s=this.lastRenderedRow;this.workOutFirstAndLastRowsToRender();let r=!1;this.stickyRowFeature&&(r=this.stickyRowFeature.checkStickyRows());const o=this.firstRenderedRow!==n||this.lastRenderedRow!==s;if((!t||r||o)&&(this.getLockOnRefresh(),this.recycleRows(null,!1,t),this.releaseLockOnRefresh(),this.dispatchDisplayedRowsChanged(t&&!r),null!=i)){const e=this.getCellToRestoreFocusToAfterRefresh();null!=i&&null==e&&(this.animationFrameService.flushAllFrames(),this.restoreFocusedCell(i))}}removeRowCompsNotToDraw(e,t){const i={};e.forEach(e=>i[e]=!0);const n=Object.keys(this.rowCtrlsByRowIndex).filter(e=>!i[e]);this.removeRowCtrls(n,t)}calculateIndexesToDraw(e){let t=Ki(this.firstRenderedRow,this.lastRenderedRow);const i=(e,i)=>{const n=i.getRowNode().rowIndex;null!=n&&(n<this.firstRenderedRow||n>this.lastRenderedRow)&&this.doNotUnVirtualiseRow(i)&&t.push(n)};N(this.rowCtrlsByRowIndex,i),N(e,i),t.sort((e,t)=>e-t);const n=[];for(let e=0;e<t.length;e++){const i=t[e],s=this.paginationProxy.getRow(i);s&&!s.sticky&&n.push(i)}return n}recycleRows(e,t=!1,i=!1){const n=this.calculateIndexesToDraw(e);(this.printLayout||i)&&(t=!1),this.removeRowCompsNotToDraw(n,!t);const s=[];n.forEach(n=>{const r=this.createOrUpdateRowCtrl(n,e,t,i);S(r)&&s.push(r)}),e&&(!i||this.gos.get("suppressAnimationFrame")||this.printLayout?this.destroyRowCtrls(e,t):this.beans.animationFrameService.addDestroyTask(()=>{this.destroyRowCtrls(e,t),this.updateAllRowCtrls(),this.dispatchDisplayedRowsChanged()})),this.updateAllRowCtrls()}dispatchDisplayedRowsChanged(e=!1){const t={type:dt.EVENT_DISPLAYED_ROWS_CHANGED,afterScroll:e};this.eventService.dispatchEvent(t)}onDisplayedColumnsChanged(){const e=this.columnModel.isPinningLeft(),t=this.columnModel.isPinningRight();(this.pinningLeft!==e||t!==this.pinningRight)&&(this.pinningLeft=e,this.pinningRight=t,this.embedFullWidthRows&&this.redrawFullWidthEmbeddedRows())}redrawFullWidthEmbeddedRows(){const e=[];this.getFullWidthRowCtrls().forEach(t=>{const i=t.getRowNode().rowIndex;e.push(i.toString())}),this.refreshFloatingRowComps(),this.removeRowCtrls(e),this.redraw({afterScroll:!0})}getFullWidthRowCtrls(e){const t=this.mapRowNodes(e);return this.getAllRowCtrls().filter(e=>{if(!e.isFullWidth())return!1;const i=e.getRowNode();return!(null!=t&&!this.isRowInMap(i,t))})}createOrUpdateRowCtrl(e,t,i,n){let s,r=this.rowCtrlsByRowIndex[e];if(r||(s=this.paginationProxy.getRow(e),S(s)&&S(t)&&t[s.id]&&s.alreadyRendered&&(r=t[s.id],t[s.id]=null)),!r){if(s||(s=this.paginationProxy.getRow(e)),!S(s))return;r=this.createRowCon(s,i,n)}return s&&(s.alreadyRendered=!0),this.rowCtrlsByRowIndex[e]=r,r}destroyRowCtrls(e,t){const i=[];N(e,(e,n)=>{n&&(this.cachedRowCtrls&&n.isCacheable()?this.cachedRowCtrls.addRow(n):(n.destroyFirstPass(!t),t?(this.zombieRowCtrls[n.getInstanceId()]=n,i.push(()=>{n.destroySecondPass(),delete this.zombieRowCtrls[n.getInstanceId()]})):n.destroySecondPass()))}),t&&(i.push(()=>{this.updateAllRowCtrls(),this.dispatchDisplayedRowsChanged()}),q(i))}getRowBuffer(){return this.gos.get("rowBuffer")}getRowBufferInPixels(){return this.getRowBuffer()*this.gos.getRowHeightAsNumber()}workOutFirstAndLastRowsToRender(){let e,t;if(this.rowContainerHeightService.updateOffset(),this.paginationProxy.isRowsToRender())if(this.printLayout)this.environment.refreshRowHeightVariable(),e=this.paginationProxy.getPageFirstRow(),t=this.paginationProxy.getPageLastRow();else{const i=this.getRowBufferInPixels(),n=this.ctrlsService.getGridBodyCtrl(),s=this.gos.get("suppressRowVirtualisation");let r,o,a=!1;do{const e=this.paginationProxy.getPixelOffset(),{pageFirstPixel:t,pageLastPixel:l}=this.paginationProxy.getCurrentPagePixelRange(),c=this.rowContainerHeightService.getDivStretchOffset(),h=n.getScrollFeature().getVScrollPosition(),d=h.top,u=h.bottom;s?(r=t+c,o=l+c):(r=Math.max(d+e-i,t)+c,o=Math.min(u+e+i,l)+c),this.firstVisibleVPixel=Math.max(d+e,t)+c,this.lastVisibleVPixel=Math.min(u+e,l)+c,a=this.ensureAllRowsInRangeHaveHeightsCalculated(r,o)}while(a);let l=this.paginationProxy.getRowIndexAtPixel(r),c=this.paginationProxy.getRowIndexAtPixel(o);const h=this.paginationProxy.getPageFirstRow(),d=this.paginationProxy.getPageLastRow();l<h&&(l=h),c>d&&(c=d),e=l,t=c}else e=0,t=-1;const i=this.gos.isDomLayout("normal"),n=this.gos.get("suppressMaxRenderedRowRestriction"),s=Math.max(this.getRowBuffer(),500);i&&!n&&t-e>s&&(t=e+s);const r=e!==this.firstRenderedRow,o=t!==this.lastRenderedRow;if(r||o){this.firstRenderedRow=e,this.lastRenderedRow=t;const i={type:dt.EVENT_VIEWPORT_CHANGED,firstRow:e,lastRow:t};this.eventService.dispatchEvent(i)}}dispatchFirstDataRenderedEvent(){if(this.dataFirstRenderedFired)return;this.dataFirstRenderedFired=!0;const e={type:dt.EVENT_FIRST_DATA_RENDERED,firstRow:this.firstRenderedRow,lastRow:this.lastRenderedRow};window.requestAnimationFrame(()=>{this.beans.eventService.dispatchEvent(e)})}ensureAllRowsInRangeHaveHeightsCalculated(e,t){const i=this.paginationProxy.ensureRowHeightsValid(e,t,-1,-1);return i&&this.updateContainerHeights(),i}getFirstVisibleVerticalPixel(){return this.firstVisibleVPixel}getLastVisibleVerticalPixel(){return this.lastVisibleVPixel}getFirstVirtualRenderedRow(){return this.firstRenderedRow}getLastVirtualRenderedRow(){return this.lastRenderedRow}doNotUnVirtualiseRow(e){const t=!1,i=e.getRowNode(),n=this.focusService.isRowNodeFocused(i),s=e.isEditing(),r=i.detail;return(n||s||r)&&!!this.paginationProxy.isRowPresent(i)||t}createRowCon(e,t,i){const n=this.cachedRowCtrls?this.cachedRowCtrls.getRow(e):null;if(n)return n;const s=this.gos.get("suppressAnimationFrame"),r=i&&!s&&!this.printLayout;return new ba(e,this.beans,t,r,this.printLayout)}getRenderedNodes(){const e=this.rowCtrlsByRowIndex;return Object.values(e).map(e=>e.getRowNode())}getRowByPosition(e){let t;const{rowIndex:i}=e;switch(e.rowPinned){case"top":t=this.topRowCtrls[i];break;case"bottom":t=this.bottomRowCtrls[i];break;default:t=this.rowCtrlsByRowIndex[i],t||(t=this.getStickyTopRowCtrls().find(e=>e.getRowNode().rowIndex===i)||null,t||(t=this.getStickyBottomRowCtrls().find(e=>e.getRowNode().rowIndex===i)||null))}return t}isRangeInRenderedViewport(e,t){if(null==e||null==t)return!1;const i=e>this.lastRenderedRow;return!(t<this.firstRenderedRow||i)}};m([pe("animationFrameService")],_l.prototype,"animationFrameService",2),m([pe("paginationProxy")],_l.prototype,"paginationProxy",2),m([pe("columnModel")],_l.prototype,"columnModel",2),m([pe("pinnedRowModel")],_l.prototype,"pinnedRowModel",2),m([pe("rowModel")],_l.prototype,"rowModel",2),m([pe("focusService")],_l.prototype,"focusService",2),m([pe("beans")],_l.prototype,"beans",2),m([pe("rowContainerHeightService")],_l.prototype,"rowContainerHeightService",2),m([pe("ctrlsService")],_l.prototype,"ctrlsService",2),m([he],_l.prototype,"postConstruct",1),_l=m([ue("rowRenderer")],_l);var Fl=class{constructor(e){this.entriesMap={},this.entriesList=[],this.maxCount=e}addRow(e){if(this.entriesMap[e.getRowNode().id]=e,this.entriesList.push(e),e.setCached(!0),this.entriesList.length>this.maxCount){const e=this.entriesList[0];e.destroyFirstPass(),e.destroySecondPass(),this.removeFromCache(e)}}getRow(e){if(null==e||null==e.id)return null;const t=this.entriesMap[e.id];return t?(this.removeFromCache(t),t.setCached(!1),t.getRowNode()!=e?null:t):null}has(e){return null!=this.entriesMap[e.id]}removeRow(e){const t=e.id,i=this.entriesMap[t];delete this.entriesMap[t],Fe(this.entriesList,i)}removeFromCache(e){const t=e.getRowNode().id;delete this.entriesMap[t],Fe(this.entriesList,e)}getEntries(){return this.entriesList}},Gl=class extends ot{init(){this.setPinnedTopRowData(),this.setPinnedBottomRowData(),this.addManagedPropertyListener("pinnedTopRowData",()=>this.setPinnedTopRowData()),this.addManagedPropertyListener("pinnedBottomRowData",()=>this.setPinnedBottomRowData())}isEmpty(e){return x("top"===e?this.pinnedTopRows:this.pinnedBottomRows)}isRowsToRender(e){return!this.isEmpty(e)}getRowAtPixel(e,t){const i="top"===t?this.pinnedTopRows:this.pinnedBottomRows;if(x(i))return 0;for(let t=0;t<i.length;t++){const n=i[t];if(n.rowTop+n.rowHeight-1>=e)return t}return i.length-1}setPinnedTopRowData(){const e=this.gos.get("pinnedTopRowData");this.pinnedTopRows=this.createNodesFromData(e,!0);const t={type:dt.EVENT_PINNED_ROW_DATA_CHANGED};this.eventService.dispatchEvent(t)}setPinnedBottomRowData(){const e=this.gos.get("pinnedBottomRowData");this.pinnedBottomRows=this.createNodesFromData(e,!1);const t={type:dt.EVENT_PINNED_ROW_DATA_CHANGED};this.eventService.dispatchEvent(t)}createNodesFromData(e,t){const i=[];if(e){let n=0;e.forEach((e,s)=>{const r=new _r(this.beans);r.data=e;const o=t?_r.ID_PREFIX_TOP_PINNED:_r.ID_PREFIX_BOTTOM_PINNED;r.id=o+s,r.rowPinned=t?"top":"bottom",r.setRowTop(n),r.setRowHeight(this.gos.getRowHeightForNode(r).height),r.setRowIndex(s),n+=r.rowHeight,i.push(r)})}return i}getPinnedTopRowData(){return this.pinnedTopRows}getPinnedBottomRowData(){return this.pinnedBottomRows}getPinnedTopTotalHeight(){return this.getTotalHeight(this.pinnedTopRows)}getPinnedTopRowCount(){return this.pinnedTopRows?this.pinnedTopRows.length:0}getPinnedBottomRowCount(){return this.pinnedBottomRows?this.pinnedBottomRows.length:0}getPinnedTopRow(e){return this.pinnedTopRows[e]}getPinnedBottomRow(e){return this.pinnedBottomRows[e]}forEachPinnedTopRow(e){x(this.pinnedTopRows)||this.pinnedTopRows.forEach(e)}forEachPinnedBottomRow(e){x(this.pinnedBottomRows)||this.pinnedBottomRows.forEach(e)}getPinnedBottomTotalHeight(){return this.getTotalHeight(this.pinnedBottomRows)}getTotalHeight(e){if(!e||0===e.length)return 0;const t=Le(e);return t.rowTop+t.rowHeight}};m([pe("beans")],Gl.prototype,"beans",2),m([he],Gl.prototype,"init",1),Gl=m([ue("pinnedRowModel")],Gl);var Vl=(e=>(e.Applied="Applied",e.StoreNotFound="StoreNotFound",e.StoreLoading="StoreLoading",e.StoreWaitingToLoad="StoreWaitingToLoad",e.StoreLoadingFailed="StoreLoadingFailed",e.StoreWrongType="StoreWrongType",e.Cancelled="Cancelled",e.StoreNotStarted="StoreNotStarted",e))(Vl||{}),Bl=class{constructor(e,t){this.active=!0,this.nodeIdsToColumns={},this.mapToItems={},this.keepingColumns=e,this.pathRoot={rowNode:t,children:null},this.mapToItems[t.id]=this.pathRoot}setInactive(){this.active=!1}isActive(){return this.active}depthFirstSearchChangedPath(e,t){if(e.children)for(let i=0;i<e.children.length;i++)this.depthFirstSearchChangedPath(e.children[i],t);t(e.rowNode)}depthFirstSearchEverything(e,t,i){if(e.childrenAfterGroup)for(let n=0;n<e.childrenAfterGroup.length;n++){const s=e.childrenAfterGroup[n];s.childrenAfterGroup?this.depthFirstSearchEverything(e.childrenAfterGroup[n],t,i):i&&t(s)}t(e)}forEachChangedNodeDepthFirst(e,t=!1,i=!1){this.active&&!i?this.depthFirstSearchChangedPath(this.pathRoot,e):this.depthFirstSearchEverything(this.pathRoot.rowNode,e,t)}executeFromRootNode(e){e(this.pathRoot.rowNode)}createPathItems(e){let t=e,i=0;for(;!this.mapToItems[t.id];){const e={rowNode:t,children:null};this.mapToItems[t.id]=e,i++,t=t.parent}return i}populateColumnsMap(e,t){if(!this.keepingColumns||!t)return;let i=e;for(;i;)this.nodeIdsToColumns[i.id]||(this.nodeIdsToColumns[i.id]={}),t.forEach(e=>this.nodeIdsToColumns[i.id][e.getId()]=!0),i=i.parent}linkPathItems(e,t){let i=e;for(let e=0;e<t;e++){const e=this.mapToItems[i.id],t=this.mapToItems[i.parent.id];t.children||(t.children=[]),t.children.push(e),i=i.parent}}addParentNode(e,t){if(!e||e.isRowPinned())return;const i=this.createPathItems(e);this.linkPathItems(e,i),this.populateColumnsMap(e,t)}canSkip(e){return this.active&&!this.mapToItems[e.id]}getValueColumnsForNode(e,t){if(!this.keepingColumns)return t;const i=this.nodeIdsToColumns[e.id];return t.filter(e=>i[e.getId()])}getNotValueColumnsForNode(e,t){if(!this.keepingColumns)return null;const i=this.nodeIdsToColumns[e.id];return t.filter(e=>!i[e.getId()])}},Hl=class e extends ot{constructor(t){super(),this.state=e.STATE_WAITING_TO_LOAD,this.version=0,this.id=t}getId(){return this.id}load(){this.state=e.STATE_LOADING,this.loadFromDatasource()}getVersion(){return this.version}setStateWaitingToLoad(){this.version++,this.state=e.STATE_WAITING_TO_LOAD}getState(){return this.state}pageLoadFailed(t){this.isRequestMostRecentAndLive(t)&&(this.state=e.STATE_FAILED,this.processServerFail()),this.dispatchLoadCompleted(!1)}success(e,t){this.successCommon(e,t)}pageLoaded(e,t,i){this.successCommon(e,{rowData:t,rowCount:i})}isRequestMostRecentAndLive(e){const t=e===this.version,i=this.isAlive();return t&&i}successCommon(t,i){this.dispatchLoadCompleted(),this.isRequestMostRecentAndLive(t)&&(this.state=e.STATE_LOADED,this.processServerResult(i))}dispatchLoadCompleted(t=!0){const i={type:e.EVENT_LOAD_COMPLETE,success:t,block:this};this.dispatchEvent(i)}};Hl.EVENT_LOAD_COMPLETE="loadComplete",Hl.STATE_WAITING_TO_LOAD="needsLoading",Hl.STATE_LOADING="loading",Hl.STATE_LOADED="loaded",Hl.STATE_FAILED="failed";var zl=Hl,Ul=class extends ot{constructor(){super(...arguments),this.activeBlockLoadsCount=0,this.blocks=[],this.active=!0}postConstruct(){this.maxConcurrentRequests=this.getMaxConcurrentDatasourceRequests();const e=this.gos.get("blockLoadDebounceMillis");e&&e>0&&(this.checkBlockToLoadDebounce=ds.debounce(this.performCheckBlocksToLoad.bind(this),e))}setBeans(e){this.logger=e.create("RowNodeBlockLoader")}getMaxConcurrentDatasourceRequests(){const e=this.gos.get("maxConcurrentDatasourceRequests");return null==e?2:e<=0?void 0:e}addBlock(e){this.blocks.push(e),e.addEventListener(zl.EVENT_LOAD_COMPLETE,this.loadComplete.bind(this)),this.checkBlockToLoad()}removeBlock(e){ds.removeFromArray(this.blocks,e)}destroy(){super.destroy(),this.active=!1}loadComplete(){this.activeBlockLoadsCount--,this.checkBlockToLoad(),this.dispatchEvent({type:Ul.BLOCK_LOADED_EVENT}),0==this.activeBlockLoadsCount&&this.dispatchEvent({type:Ul.BLOCK_LOADER_FINISHED_EVENT})}checkBlockToLoad(){this.checkBlockToLoadDebounce?this.checkBlockToLoadDebounce():this.performCheckBlocksToLoad()}performCheckBlocksToLoad(){if(!this.active)return;if(this.printCacheStatus(),null!=this.maxConcurrentRequests&&this.activeBlockLoadsCount>=this.maxConcurrentRequests)return void this.logger.log("checkBlockToLoad: max loads exceeded");const e=this.getAvailableLoadingCount(),t=this.blocks.filter(e=>e.getState()===zl.STATE_WAITING_TO_LOAD).slice(0,e);this.registerLoads(t.length),t.forEach(e=>e.load()),this.printCacheStatus()}getBlockState(){if(this.gos.isRowModelType("serverSide"))return this.rowModel.getBlockStates();const e={};return this.blocks.forEach(t=>{const{id:i,state:n}=t.getBlockStateJson();e[i]=n}),e}printCacheStatus(){this.logger.isLogging()&&this.logger.log(`printCacheStatus: activePageLoadsCount = ${this.activeBlockLoadsCount}, blocks = ${JSON.stringify(this.getBlockState())}`)}isLoading(){return this.activeBlockLoadsCount>0}registerLoads(e){this.activeBlockLoadsCount+=e}getAvailableLoadingCount(){return void 0!==this.maxConcurrentRequests?this.maxConcurrentRequests-this.activeBlockLoadsCount:void 0}};Ul.BLOCK_LOADED_EVENT="blockLoaded",Ul.BLOCK_LOADER_FINISHED_EVENT="blockLoaderFinished",m([pe("rowModel")],Ul.prototype,"rowModel",2),m([he],Ul.prototype,"postConstruct",1),m([v(0,me("loggerFactory"))],Ul.prototype,"setBeans",1),Ul=m([ue("rowNodeBlockLoader")],Ul);var Wl=class extends ot{constructor(){super(...arguments),this.currentPage=0,this.topDisplayedRowIndex=0,this.bottomDisplayedRowIndex=0,this.pixelOffset=0,this.masterRowCount=0}postConstruct(){this.active=this.gos.get("pagination"),this.pageSizeFromGridOptions=this.gos.get("paginationPageSize"),this.paginateChildRows=this.isPaginateChildRows(),this.addManagedListener(this.eventService,dt.EVENT_MODEL_UPDATED,this.onModelUpdated.bind(this)),this.addManagedPropertyListener("pagination",this.onPaginationGridOptionChanged.bind(this)),this.addManagedPropertyListener("paginationPageSize",this.onPageSizeGridOptionChanged.bind(this)),this.onModelUpdated()}ensureRowHeightsValid(e,t,i,n){const s=this.rowModel.ensureRowHeightsValid(e,t,this.getPageFirstRow(),this.getPageLastRow());return s&&this.calculatePages(),s}isPaginateChildRows(){return!(!this.gos.get("groupRemoveSingleChildren")&&!this.gos.get("groupRemoveLowestSingleChildren"))||this.gos.get("paginateChildRows")}onModelUpdated(e){this.calculatePages();const t={type:dt.EVENT_PAGINATION_CHANGED,animate:!!e&&e.animate,newData:!!e&&e.newData,newPage:!!e&&e.newPage,newPageSize:!!e&&e.newPageSize,keepRenderedRows:!!e&&e.keepRenderedRows};this.eventService.dispatchEvent(t)}onPaginationGridOptionChanged(){this.active=this.gos.get("pagination"),this.calculatePages();const e={type:dt.EVENT_PAGINATION_CHANGED,animate:!1,newData:!1,newPage:!1,newPageSize:!1,keepRenderedRows:!0};this.eventService.dispatchEvent(e)}onPageSizeGridOptionChanged(){this.setPageSize(this.gos.get("paginationPageSize"),"gridOptions")}goToPage(e){if(!this.active||this.currentPage===e||"number"!=typeof this.currentPage)return;this.currentPage=e,this.calculatePages();const t={type:dt.EVENT_PAGINATION_CHANGED,animate:!1,newData:!1,newPage:!0,newPageSize:!1,keepRenderedRows:!1};this.eventService.dispatchEvent(t)}getPixelOffset(){return this.pixelOffset}getRow(e){return this.rowModel.getRow(e)}getRowNode(e){return this.rowModel.getRowNode(e)}getRowIndexAtPixel(e){return this.rowModel.getRowIndexAtPixel(e)}getCurrentPageHeight(){return w(this.topRowBounds)||w(this.bottomRowBounds)?0:Math.max(this.bottomRowBounds.rowTop+this.bottomRowBounds.rowHeight-this.topRowBounds.rowTop,0)}getCurrentPagePixelRange(){return{pageFirstPixel:this.topRowBounds?this.topRowBounds.rowTop:0,pageLastPixel:this.bottomRowBounds?this.bottomRowBounds.rowTop+this.bottomRowBounds.rowHeight:0}}isRowPresent(e){return!!this.rowModel.isRowPresent(e)&&(e.rowIndex>=this.topDisplayedRowIndex&&e.rowIndex<=this.bottomDisplayedRowIndex)}isEmpty(){return this.rowModel.isEmpty()}isRowsToRender(){return this.rowModel.isRowsToRender()}forEachNode(e){return this.rowModel.forEachNode(e)}forEachNodeOnPage(e){const t=this.getPageFirstRow(),i=this.getPageLastRow();for(let n=t;n<=i;n++){const t=this.getRow(n);t&&e(t)}}getType(){return this.rowModel.getType()}getRowBounds(e){const t=this.rowModel.getRowBounds(e);return t.rowIndex=e,t}getPageFirstRow(){return this.topRowBounds?this.topRowBounds.rowIndex:-1}getPageLastRow(){return this.bottomRowBounds?this.bottomRowBounds.rowIndex:-1}getRowCount(){return this.rowModel.getRowCount()}getPageForIndex(e){return Math.floor(e/this.pageSize)}goToPageWithIndex(e){if(!this.active)return;const t=this.getPageForIndex(e);this.goToPage(t)}isRowInPage(e){return!this.active||this.getPageForIndex(e.rowIndex)===this.currentPage}isLastPageFound(){return this.rowModel.isLastRowIndexKnown()}getCurrentPage(){return this.currentPage}goToNextPage(){this.goToPage(this.currentPage+1)}goToPreviousPage(){this.goToPage(this.currentPage-1)}goToFirstPage(){this.goToPage(0)}goToLastPage(){const e=this.rowModel.getRowCount(),t=Math.floor(e/this.pageSize);this.goToPage(t)}getPageSize(){return this.pageSize}getTotalPages(){return this.totalPages}setPage(e){this.currentPage=e}get pageSize(){return S(this.pageSizeAutoCalculated)?this.pageSizeAutoCalculated:S(this.pageSizeFromPageSizeSelector)?this.pageSizeFromPageSizeSelector:S(this.pageSizeFromInitialState)?this.pageSizeFromInitialState:S(this.pageSizeFromGridOptions)?this.pageSizeFromGridOptions:this.defaultPageSize}unsetAutoCalculatedPageSize(){if(void 0===this.pageSizeAutoCalculated)return;const e=this.pageSizeAutoCalculated;if(this.pageSizeAutoCalculated=void 0,this.pageSize===e)return;this.calculatePages();const t={type:dt.EVENT_PAGINATION_CHANGED,animate:!1,newData:!1,newPage:!1,newPageSize:!0,keepRenderedRows:!1};this.eventService.dispatchEvent(t)}setPageSize(e,t){const i=this.pageSize;switch(t){case"autoCalculated":this.pageSizeAutoCalculated=e;break;case"pageSizeSelector":this.pageSizeFromPageSizeSelector=e,0!==this.currentPage&&this.goToFirstPage();break;case"initialState":this.pageSizeFromInitialState=e;break;case"gridOptions":this.pageSizeFromGridOptions=e,this.pageSizeFromInitialState=void 0,this.pageSizeFromPageSizeSelector=void 0,0!==this.currentPage&&this.goToFirstPage()}if(i!==this.pageSize){this.calculatePages();const e={type:dt.EVENT_PAGINATION_CHANGED,animate:!1,newData:!1,newPage:!1,newPageSize:!0,keepRenderedRows:!0};this.eventService.dispatchEvent(e)}}calculatePages(){this.active?this.paginateChildRows?this.calculatePagesAllRows():this.calculatePagesMasterRowsOnly():this.calculatedPagesNotActive(),this.topRowBounds=this.rowModel.getRowBounds(this.topDisplayedRowIndex),this.topRowBounds&&(this.topRowBounds.rowIndex=this.topDisplayedRowIndex),this.bottomRowBounds=this.rowModel.getRowBounds(this.bottomDisplayedRowIndex),this.bottomRowBounds&&(this.bottomRowBounds.rowIndex=this.bottomDisplayedRowIndex),this.setPixelOffset(S(this.topRowBounds)?this.topRowBounds.rowTop:0)}setPixelOffset(e){this.pixelOffset!==e&&(this.pixelOffset=e,this.eventService.dispatchEvent({type:dt.EVENT_PAGINATION_PIXEL_OFFSET_CHANGED}))}setZeroRows(){this.masterRowCount=0,this.topDisplayedRowIndex=0,this.bottomDisplayedRowIndex=-1,this.currentPage=0,this.totalPages=0}adjustCurrentPageIfInvalid(){this.currentPage>=this.totalPages&&(this.currentPage=this.totalPages-1),(!isFinite(this.currentPage)||isNaN(this.currentPage)||this.currentPage<0)&&(this.currentPage=0)}calculatePagesMasterRowsOnly(){if(this.masterRowCount=this.rowModel.getTopLevelRowCount(),this.masterRowCount<=0)return void this.setZeroRows();const e=this.masterRowCount-1;this.totalPages=Math.floor(e/this.pageSize)+1,this.adjustCurrentPageIfInvalid();const t=this.pageSize*this.currentPage;let i=this.pageSize*(this.currentPage+1)-1;if(i>e&&(i=e),this.topDisplayedRowIndex=this.rowModel.getTopLevelRowDisplayedIndex(t),i===e)this.bottomDisplayedRowIndex=this.rowModel.getRowCount()-1;else{const e=this.rowModel.getTopLevelRowDisplayedIndex(i+1);this.bottomDisplayedRowIndex=e-1}}getMasterRowCount(){return this.masterRowCount}calculatePagesAllRows(){if(this.masterRowCount=this.rowModel.getRowCount(),0===this.masterRowCount)return void this.setZeroRows();const e=this.masterRowCount-1;this.totalPages=Math.floor(e/this.pageSize)+1,this.adjustCurrentPageIfInvalid(),this.topDisplayedRowIndex=this.pageSize*this.currentPage,this.bottomDisplayedRowIndex=this.pageSize*(this.currentPage+1)-1,this.bottomDisplayedRowIndex>e&&(this.bottomDisplayedRowIndex=e)}calculatedPagesNotActive(){this.setPageSize(void 0,"autoCalculated"),this.totalPages=1,this.currentPage=0,this.topDisplayedRowIndex=0,this.bottomDisplayedRowIndex=this.rowModel.getRowCount()-1}};m([pe("rowModel")],Wl.prototype,"rowModel",2),m([he],Wl.prototype,"postConstruct",1),Wl=m([ue("paginationProxy")],Wl);var jl=class extends ot{processAllCellClasses(e,t,i,n){this.processClassRules(void 0,e.cellClassRules,t,i,n),this.processStaticCellClasses(e,t,i)}processClassRules(e,t,i,n,s){if(null==t&&null==e)return;const r={},o={},a=(e,t)=>{e.split(" ").forEach(e=>{""!=e.trim()&&t(e)})};if(t){const e=Object.keys(t);for(let n=0;n<e.length;n++){const s=e[n],l=t[s];let c;"string"==typeof l?c=this.expressionService.evaluate(l,i):"function"==typeof l&&(c=l(i)),a(s,e=>{c?r[e]=!0:o[e]=!0})}}e&&s&&Object.keys(e).forEach(e=>a(e,e=>{r[e]||(o[e]=!0)})),s&&Object.keys(o).forEach(s),Object.keys(r).forEach(n)}getStaticCellClasses(e,t){const{cellClass:i}=e;if(!i)return[];let n;return n="function"==typeof i?i(t):i,"string"==typeof n&&(n=[n]),n||[]}processStaticCellClasses(e,t,i){this.getStaticCellClasses(e,t).forEach(e=>{i(e)})}};m([pe("expressionService")],jl.prototype,"expressionService",2),jl=m([ue("stylingService")],jl);var Kl=class extends js{constructor(e){super(e,"ag-toggle-button")}setValue(e,t){return super.setValue(e,t),this.addOrRemoveCssClass("ag-selected",this.getValue()),this}},$l=class extends Ws{constructor(e){super(e,"ag-text-area",null,"textarea")}setValue(e,t){const i=super.setValue(e,t);return this.eInput.value=e,i}setCols(e){return this.eInput.cols=e,this}setRows(e){return this.eInput.rows=e,this}},Yl=class extends sr{constructor(e){super(e,"ag-date-field","date")}postConstruct(){super.postConstruct(),this.addManagedListener(this.eInput,"wheel",this.onWheel.bind(this));const e=Ii();this.addManagedListener(this.eInput,"mousedown",()=>{this.isDisabled()||e||this.eInput.focus()}),this.eInput.step="any"}onWheel(e){this.gos.getActiveDomElement()===this.eInput&&e.preventDefault()}setMin(e){var t;const i=e instanceof Date?null!=(t=Qi(null!=e?e:null,!1))?t:void 0:e;return this.min===i||(this.min=i,Hn(this.eInput,"min",i)),this}setMax(e){var t;const i=e instanceof Date?null!=(t=Qi(null!=e?e:null,!1))?t:void 0:e;return this.max===i||(this.max=i,Hn(this.eInput,"max",i)),this}setStep(e){return this.step===e||(this.step=e,Hn(this.eInput,"step",e)),this}getDate(){var e;if(this.eInput.validity.valid)return null!=(e=tn(this.getValue()))?e:void 0}setDate(e,t){this.setValue(Qi(null!=e?e:null,!1),t)}},ql=class extends Ws{constructor(e){super(e,"ag-range-field","range")}postConstruct(){super.postConstruct();const{min:e,max:t,step:i}=this.config;null!=e&&this.setMinValue(e),null!=t&&this.setMaxValue(t),this.setStep(i||1)}addInputListeners(){this.addManagedListener(this.eInput,"input",e=>{const t=e.target.value;this.setValue(t)})}setMinValue(e){return this.min=e,this.eInput.setAttribute("min",e.toString()),this}setMaxValue(e){return this.max=e,this.eInput.setAttribute("max",e.toString()),this}setStep(e){return this.eInput.setAttribute("step",e.toString()),this}setValue(e,t){null!=this.min&&(e=Math.max(parseFloat(e),this.min).toString()),null!=this.max&&(e=Math.min(parseFloat(e),this.max).toString());const i=super.setValue(e,t);return this.eInput.value=e,i}},Xl=class extends ws{constructor(e,t){super('<div class="ag-rich-select-row" role="presentation"></div>'),this.params=e,this.wrapperEl=t}postConstruct(){this.addManagedListener(this.getGui(),"click",this.onClick.bind(this))}setState(e){let t="";this.params.valueFormatter&&(t=this.params.valueFormatter(e)),this.populateWithRenderer(e,t)||this.populateWithoutRenderer(e,t),this.value=e}highlightString(e){const{parsedValue:t}=this;if(this.params.cellRenderer||!S(t))return;let i=S(e);if(i){const n=null==t?void 0:t.toLocaleLowerCase().indexOf(e.toLocaleLowerCase());if(n>=0){const i=n+e.length,s=St(t.slice(0,n),!0),r=St(t.slice(n,i),!0),o=St(t.slice(i));this.renderValueWithoutRenderer(`${s}<span class="ag-rich-select-row-text-highlight">${r}</span>${o}`)}else i=!1}i||this.renderValueWithoutRenderer(t)}updateHighlighted(e){var t;const i=this.getGui(),n=`ag-rich-select-row-${this.getCompId()}`;null==(t=i.parentElement)||t.setAttribute("id",n),e&&(ni(this.getParentComponent().getAriaElement(),n),this.wrapperEl.setAttribute("data-active-option",n)),mi(i.parentElement,e),this.addOrRemoveCssClass("ag-rich-select-row-selected",e)}populateWithoutRenderer(e,t){const i=this.gos.getDocument(),n=this.getGui(),s=i.createElement("span");s.style.overflow="hidden",s.style.textOverflow="ellipsis";const r=St(S(t)?t:e,!0);this.parsedValue=S(r)?r:null,n.appendChild(s),this.renderValueWithoutRenderer(r),this.setTooltip({newTooltipText:this.parsedValue,shouldDisplayTooltip:()=>s.scrollWidth>s.clientWidth})}renderValueWithoutRenderer(e){const t=this.getGui().querySelector("span");t&&(t.innerHTML=S(e)?e:"&nbsp;")}populateWithRenderer(e,t){let i,n;return this.params.cellRenderer&&(n=this.userComponentFactory.getCellRendererDetails(this.params,{value:e,valueFormatted:t,setTooltip:(e,t)=>{this.setTooltip({newTooltipText:e,shouldDisplayTooltip:t})}})),n&&(i=n.newAgStackInstance()),i&&Un(i,this.getGui()),!!i&&(i.then(e=>{this.addDestroyFunc(()=>{this.getContext().destroyBean(e)})}),!0)}onClick(){const e=this.getParentComponent(),t={type:dt.EVENT_FIELD_PICKER_VALUE_SELECTED,fromEnterKey:!1,value:this.value};null==e||e.dispatchEvent(t)}};m([pe("userComponentFactory")],Xl.prototype,"userComponentFactory",2),m([he],Xl.prototype,"postConstruct",1);var Zl=class e extends Al{constructor(t){super(e.getTemplate((null==t?void 0:t.cssIdentifier)||"default")),this.renderedRows=new Map,this.rowHeight=20,this.pageSize=-1,this.isScrolling=!1,this.isHeightFromTheme=!0;const{cssIdentifier:i="default",ariaRole:n="listbox",listName:s}=t||{};this.cssIdentifier=i,this.ariaRole=n,this.listName=s}postConstruct(){this.addScrollListener(),this.rowHeight=this.getItemHeight(),this.addResizeObserver(),this.initialiseTabGuard({onFocusIn:e=>this.onFocusIn(e),onFocusOut:e=>this.onFocusOut(e),focusInnerElement:e=>this.focusInnerElement(e),onTabKeyDown:e=>this.onTabKeyDown(e),handleKeyDown:e=>this.handleKeyDown(e)}),this.setAriaProperties(),this.addManagedListener(this.eventService,dt.EVENT_GRID_STYLES_CHANGED,this.onGridStylesChanged.bind(this))}onGridStylesChanged(){this.rowHeight=this.getItemHeight(),this.refresh()}setAriaProperties(){const e=this.localeService.getLocaleTextFunc()("ariaDefaultListName",this.listName||"List"),t=this.eContainer;Ut(t,this.ariaRole),Yt(t,e)}addResizeObserver(){const e=this.resizeObserverService.observeResize(this.getGui(),()=>this.animationFrameService.requestAnimationFrame(()=>this.drawVirtualRows()));this.addDestroyFunc(e)}focusInnerElement(e){this.focusRow(e?this.model.getRowCount()-1:0)}onFocusIn(e){const t=e.target;t.classList.contains("ag-virtual-list-item")&&(this.lastFocusedRowIndex=Kt(t)-1)}onFocusOut(e){this.getFocusableElement().contains(e.relatedTarget)||(this.lastFocusedRowIndex=null)}handleKeyDown(e){switch(e.key){case Jn.UP:case Jn.DOWN:this.navigate(e.key===Jn.UP)&&e.preventDefault();break;case Jn.PAGE_HOME:case Jn.PAGE_END:case Jn.PAGE_UP:case Jn.PAGE_DOWN:null!==this.navigateToPage(e.key)&&e.preventDefault()}}onTabKeyDown(e){this.navigate(e.shiftKey)?e.preventDefault():(Ze(e),this.forceFocusOutOfContainer(e.shiftKey))}navigate(e){if(null==this.lastFocusedRowIndex)return!1;const t=this.lastFocusedRowIndex+(e?-1:1);return!(t<0||t>=this.model.getRowCount()||(this.focusRow(t),0))}navigateToPage(e,t="focused"){let i=!1;"focused"===t&&(t=this.getLastFocusedRow(),i=!0);const n=this.model.getRowCount()-1;let s=-1;return e===Jn.PAGE_HOME?s=0:e===Jn.PAGE_END?s=n:e===Jn.PAGE_DOWN?s=Math.min(t+this.pageSize,n):e===Jn.PAGE_UP&&(s=Math.max(t-this.pageSize,0)),-1===s?null:(i?this.focusRow(s):this.ensureIndexVisible(s),s)}getLastFocusedRow(){return this.lastFocusedRowIndex}focusRow(e){this.isScrolling||(this.isScrolling=!0,this.ensureIndexVisible(e),this.animationFrameService.requestAnimationFrame(()=>{if(this.isScrolling=!1,!this.isAlive())return;const t=this.renderedRows.get(e);t&&t.eDiv.focus()}))}getComponentAt(e){const t=this.renderedRows.get(e);return t&&t.rowComponent}forEachRenderedRow(e){this.renderedRows.forEach((t,i)=>e(t.rowComponent,i))}static getTemplate(e){return`<div class="ag-virtual-list-viewport ag-${e}-virtual-list-viewport" role="presentation">\n                <div class="ag-virtual-list-container ag-${e}-virtual-list-container" ref="eContainer"></div>\n            </div>`}getItemHeight(){return this.isHeightFromTheme?this.environment.getListItemHeight():this.rowHeight}ensureIndexVisible(e,t=!0){const i=this.model.getRowCount();if("number"!=typeof e||e<0||e>=i)return console.warn("AG Grid: invalid row index for ensureIndexVisible: "+e),!1;const n=e*this.rowHeight,s=n+this.rowHeight,r=this.getGui(),o=r.scrollTop,a=r.offsetHeight,l=o+a,c=t?0:this.rowHeight,h=l<s-c;if(o>n+c)return r.scrollTop=n,!0;if(h){const e=s-a;return r.scrollTop=e,!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.isHeightFromTheme=!1,this.rowHeight=e,this.refresh()}refresh(e){if(null==this.model||!this.isAlive())return;const t=this.model.getRowCount();this.eContainer.style.height=t*this.rowHeight+"px",ie(()=>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&&"function"==typeof this.model.areRowsEqual&&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,s=Math.floor(i/this.rowHeight),r=Math.floor(n/this.rowHeight);this.pageSize=Math.floor((n-i)/this.rowHeight),this.ensureRowsRendered(s,r,e)}ensureRowsRendered(e,t,i){this.renderedRows.forEach((i,n)=>{(n<e||n>t)&&n!==this.lastFocusedRowIndex&&this.removeRow(n)}),i&&this.refreshRows();for(let i=e;i<=t;i++)this.renderedRows.has(i)||i<this.model.getRowCount()&&this.insertRow(i)}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`),Ut(i,"tree"===this.ariaRole?"treeitem":"option"),oi(i,this.model.getRowCount()),ai(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,s;if(i>=e)this.removeRow(i);else{const e=this.model.getRow(i);(null==(s=(n=this.model).areRowsEqual)?void 0:s.call(n,t.value,e))?this.componentUpdater(e,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())}};m([pe("resizeObserverService")],Zl.prototype,"resizeObserverService",2),m([pe("animationFrameService")],Zl.prototype,"animationFrameService",2),m([Es("eContainer")],Zl.prototype,"eContainer",2),m([he],Zl.prototype,"postConstruct",1);var Ql=Zl,Jl=class extends Vs{constructor(e){var t,i;super(g(p({pickerAriaLabelKey:"ariaLabelRichSelectField",pickerAriaLabelValue:"Rich Select Field",pickerType:"ag-list",className:"ag-rich-select",pickerIcon:"smallDown",ariaRole:"combobox",template:null!=(t=null==e?void 0:e.template)?t:'\n    <div class="ag-picker-field" role="presentation">\n        <div ref="eLabel"></div>\n            <div ref="eWrapper" class="ag-wrapper ag-picker-field-wrapper ag-rich-select-value ag-picker-collapsed">\n            <div ref="eDisplayField" class="ag-picker-field-display"></div>\n            <ag-input-text-field ref="eInput" class="ag-rich-select-field-input"></ag-input-text-field>\n            <div ref="eIcon" class="ag-picker-field-icon" aria-hidden="true"></div>\n        </div>\n    </div>',modalPicker:!1},e),{maxPickerHeight:null!=(i=null==e?void 0:e.maxPickerHeight)?i:"calc(var(--ag-row-height) * 6.5)"})),this.searchString="",this.highlightedItem=-1,this.lastRowHovered=-1,this.searchStringCreator=null;const{cellRowHeight:n,value:s,valueList:r,searchStringCreator:o}=e||{};null!=n&&(this.cellRowHeight=n),void 0!==s&&(this.value=s),null!=r&&(this.values=r),o&&(this.searchStringCreator=o)}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.gos.get("tabIndex");const{searchDebounceDelay:i=300}=this.config;this.clearSearchString=ee(this.clearSearchString,i),this.renderSelectedValue(),e&&(this.eInput.onValueChange(e=>this.searchTextFromString(e)),this.addManagedListener(this.eWrapper,"focus",this.onWrapperFocus.bind(this))),this.addManagedListener(this.eWrapper,"focusout",this.onWrapperFocusOut.bind(this))}createLoadingElement(){const e=this.gos.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 Ql({cssIdentifier:"rich-select"})),this.listComponent.setComponentCreator(this.createRowComponent.bind(this)),this.listComponent.setComponentUpdater((e,t)=>{}),this.listComponent.setParentComponent(this),this.addManagedListener(this.listComponent,dt.EVENT_FIELD_PICKER_VALUE_SELECTED,e=>{this.onListValueSelected(e.value,e.fromEnterKey)});const{cellRowHeight:e}=this;e&&this.listComponent.setRowHeight(e);const t=this.listComponent.getGui(),i=this.listComponent.getAriaElement();this.addManagedListener(t,"mousemove",this.onPickerMouseMove.bind(this)),this.addManagedListener(t,"mousedown",e=>e.preventDefault()),t.classList.add("ag-rich-select-list");const n=`ag-rich-select-list-${this.listComponent.getCompId()}`;i.setAttribute("id",n),Yt(i,this.localeService.getLocaleTextFunc()(this.config.pickerAriaLabelKey,this.config.pickerAriaLabelValue)),yi(this.eWrapper,i)}renderSelectedValue(){const{value:e,eDisplayField:t,config:i}=this,{allowTyping:n,initialInputValue:s}=this.config,r=this.config.valueFormatter?this.config.valueFormatter(e):e;if(n)return void this.eInput.setValue(null!=s?s:r);let o,a;if(i.cellRenderer&&(o=this.userComponentFactory.getCellRendererDetails(this.config,{value:e,valueFormatted:r})),o&&(a=o.newAgStackInstance()),a)wn(t),Un(a,t),a.then(e=>{this.addDestroyFunc(()=>this.getContext().destroyBean(e))});else{if(S(this.value))t.innerText=r,t.classList.remove("ag-display-as-placeholder");else{const{placeholder:e}=i;S(e)?(t.innerHTML=`${St(e)}`,t.classList.add("ag-display-as-placeholder")):wn(t)}this.setTooltip({newTooltipText:null!=r?r:null,shouldDisplayTooltip:()=>this.eDisplayField.scrollWidth>this.eDisplayField.clientWidth})}}getCurrentValueIndex(){const{currentList:e,value:t}=this;if(null==t||!e)return-1;for(let i=0;i<e.length;i++)if(e[i]===t)return i;return-1}highlightFilterMatch(){var e;null==(e=this.listComponent)||e.forEachRenderedRow((e,t)=>{e.highlightString(this.searchString)})}highlightSelectedValue(e){var t;null==e&&(e=this.getCurrentValueIndex()),this.highlightedItem=e,null==(t=this.listComponent)||t.forEachRenderedRow((t,i)=>{const n=-1!==e&&this.highlightedItem===i;t.updateHighlighted(n)})}setRowHeight(e){e!==this.cellRowHeight&&(this.cellRowHeight=e),this.listComponent&&this.listComponent.setRowHeight(e)}createPickerComponent(){const{values:e}=this;return e&&this.setValueList({valueList:e}),this.listComponent}setSearchStringCreator(e){this.searchStringCreator=e}setValueList(e){const{valueList:t,refresh:i}=e;this.listComponent&&this.currentList!==t&&(this.currentList=t,this.listComponent.setModel({getRowCount:()=>t.length,getRow:e=>t[e],areRowsEqual:(e,t)=>e===t}),i&&(this.values?this.listComponent.refresh(!0):(this.values=t,this.isPickerDisplayed&&this.showCurrentValueInPicker())))}showPicker(){super.showPicker(),this.showCurrentValueInPicker(),this.displayOrHidePicker()}showCurrentValueInPicker(){var e,t;if(!this.listComponent)return;if(!this.currentList)return void(this.isPickerDisplayed&&this.eLoading&&this.listComponent.appendChild(this.eLoading));(null==(e=this.eLoading)?void 0:e.offsetParent)&&(null==(t=this.eLoading.parentElement)||t.removeChild(this.eLoading));const i=this.getCurrentValueIndex();-1!==i?(this.listComponent.refresh(),this.listComponent.ensureIndexVisible(i),this.listComponent.refresh(!0),this.highlightSelectedValue(i)):this.listComponent.refresh()}beforeHidePicker(){this.highlightedItem=-1,super.beforeHidePicker()}onWrapperFocus(){if(!this.eInput)return;const e=this.eInput.getFocusableElement();e.focus(),e.select()}onWrapperFocusOut(e){this.eWrapper.contains(e.relatedTarget)||this.hidePicker()}buildSearchStringFromKeyboardEvent(e){let{key:t}=e;if(t===Jn.BACKSPACE)this.searchString=this.searchString.slice(0,-1),t="";else if(!es(e))return;e.preventDefault(),this.searchTextFromCharacter(t)}searchTextFromCharacter(e){this.searchString+=e,this.runSearch(),this.clearSearchString()}searchTextFromString(e){null==e&&(e=""),this.searchString=e,this.runSearch()}buildSearchStrings(e){const{valueFormatter:t=e=>e}=this.config;let i;return"number"==typeof e[0]||"string"==typeof e[0]?i=e.map(e=>t(e)):"object"==typeof e[0]&&this.searchStringCreator&&(i=this.searchStringCreator(e)),i}getSuggestionsAndFilteredValues(e,t){let i=[],n=[];if(!e.length)return{suggestions:i,filteredValues:n};const{searchType:s="fuzzy",filterList:r}=this.config;if("fuzzy"===s){const e=Kn(this.searchString,t,!0);i=e.values;const s=e.indices;if(r&&s.length)for(let e=0;e<s.length;e++)n.push(this.values[s[e]])}else i=t.filter((e,t)=>{const i=e.toLocaleLowerCase(),o=this.searchString.toLocaleLowerCase(),a="match"===s?i.startsWith(o):-1!==i.indexOf(o);return r&&a&&n.push(this.values[t]),a});return{suggestions:i,filteredValues:n}}filterListModel(e){const{filterList:t}=this.config;t&&(this.setValueList({valueList:e,refresh:!0}),this.alignPickerToComponent())}runSearch(){var e,t;const{values:i}=this,n=this.buildSearchStrings(i);if(!n)return void this.highlightSelectedValue(-1);const{suggestions:s,filteredValues:r}=this.getSuggestionsAndFilteredValues(this.searchString,n),{filterList:o,highlightMatch:a,searchType:l="fuzzy"}=this.config,c=r.length,h=!(!o||""===this.searchString);if(this.filterListModel(h?r:i),s.length){const e=h?0:n.indexOf(s[0]);this.selectListItem(e)}else if(this.highlightSelectedValue(-1),!h||c)null==(e=this.listComponent)||e.ensureIndexVisible(0);else if(h){this.getAriaElement().removeAttribute("data-active-option");const e=null==(t=this.listComponent)?void 0:t.getAriaElement();e&&ni(e,null)}a&&"fuzzy"!==l&&this.highlightFilterMatch(),this.displayOrHidePicker()}displayOrHidePicker(){var e;const t=null==(e=this.listComponent)?void 0:e.getGui(),i=!!this.currentList&&0===this.currentList.length;null==t||t.classList.toggle("ag-hidden",i)}clearSearchString(){this.searchString=""}selectListItem(e,t){!this.isPickerDisplayed||!this.currentList||!this.listComponent||e<0||e>=this.currentList.length||(this.listComponent.ensureIndexVisible(e,!t)&&!t&&this.listComponent.refresh(!0),this.highlightSelectedValue(e))}setValue(e,t,i){const n=this.currentList?this.currentList.indexOf(e):-1;return-1===n?this:(this.value=e,i||this.selectListItem(n),this.renderSelectedValue(),super.setValue(e,t))}createRowComponent(e){const t=new Xl(this.config,this.eWrapper);t.setParentComponent(this.listComponent),this.getContext().createBean(t),t.setState(e);const{highlightMatch:i,searchType:n="fuzzy"}=this.config;return i&&"fuzzy"!==n&&t.highlightString(this.searchString),t}getRowForMouseEvent(e){const{listComponent:t}=this;if(!t)return-1;const i=(null==t?void 0:t.getGui()).getBoundingClientRect(),n=t.getScrollTop(),s=e.clientY-i.top+n;return Math.floor(s/t.getRowHeight())}onPickerMouseMove(e){if(!this.listComponent)return;const t=this.getRowForMouseEvent(e);-1!==t&&t!=this.lastRowHovered&&(this.lastRowHovered=t,this.selectListItem(t,!0))}onNavigationKeyDown(e,t){e.preventDefault();const i=t===Jn.DOWN;if(!this.isPickerDisplayed&&i)return void this.showPicker();const n=this.highlightedItem,s=-1===n?0:n+(i?1:-1);this.selectListItem(s)}onPageNavigation(e){var t;if(!this.isPickerDisplayed)return;const i=null==(t=this.listComponent)?void 0:t.navigateToPage(e,this.highlightedItem);null!=i&&this.animationFrameService.requestAnimationFrame(()=>{if(!this.isAlive())return null;this.highlightSelectedValue(i)})}onEnterKeyDown(e){this.isPickerDisplayed&&(e.preventDefault(),this.currentList&&this.onListValueSelected(this.currentList[this.highlightedItem],!0))}onTabKeyDown(){this.isPickerDisplayed&&this.currentList&&this.setValue(this.currentList[this.highlightedItem],!1,!0)}onListValueSelected(e,t){this.setValue(e,!1,!0),this.dispatchPickerEvent(e,t),this.hidePicker()}dispatchPickerEvent(e,t){const i={type:dt.EVENT_FIELD_PICKER_VALUE_SELECTED,fromEnterKey:t,value:e};this.dispatchEvent(i)}getFocusableElement(){const{allowTyping:e}=this.config;return e?this.eInput.getFocusableElement():super.getFocusableElement()}onKeyDown(e){const t=e.key,{allowTyping:i}=this.config;switch(t){case Jn.LEFT:case Jn.RIGHT:i||e.preventDefault();break;case Jn.PAGE_HOME:case Jn.PAGE_END:if(i){e.preventDefault();const i=this.eInput.getInputElement(),n=t===Jn.PAGE_HOME?0:i.value.length;i.setSelectionRange(n,n);break}case Jn.PAGE_UP:case Jn.PAGE_DOWN:e.preventDefault(),this.onPageNavigation(t);break;case Jn.DOWN:case Jn.UP:this.onNavigationKeyDown(e,t);break;case Jn.ESCAPE:this.isPickerDisplayed&&(Mn(this.listComponent.getGui())&&(e.preventDefault(),Ze(e)),this.hidePicker());break;case Jn.ENTER:this.onEnterKeyDown(e);break;case Jn.TAB:this.onTabKeyDown();break;default:i||this.buildSearchStringFromKeyboardEvent(e)}}destroy(){this.listComponent&&(this.destroyBean(this.listComponent),this.listComponent=void 0),this.eLoading=void 0,super.destroy()}};m([pe("userComponentFactory")],Jl.prototype,"userComponentFactory",2),m([pe("animationFrameService")],Jl.prototype,"animationFrameService",2),m([Es("eInput")],Jl.prototype,"eInput",2);var ec=class e extends Fs{constructor(t){super(t,e.TEMPLATE),this.labelAlignment="top"}init(){this.eSlider.addCssClass("ag-slider-field");const{minValue:e,maxValue:t,textFieldWidth:i,step:n,value:s,onValueChange:r}=this.config;null!=e&&this.setMinValue(e),null!=t&&this.setMaxValue(t),null!=i&&this.setTextFieldWidth(i),null!=n&&this.setStep(n),null!=s&&this.setValue(s),null!=r&&this.onValueChange(r)}onValueChange(e){const t=dt.EVENT_FIELD_VALUE_CHANGED;return this.addManagedListener(this.eText,t,()=>{const t=parseFloat(this.eText.getValue());this.eSlider.setValue(t.toString(),!0),e(t||0)}),this.addManagedListener(this.eSlider,t,()=>{const t=this.eSlider.getValue();this.eText.setValue(t,!0),e(parseFloat(t))}),this}setSliderWidth(e){return this.eSlider.setWidth(e),this}setTextFieldWidth(e){return this.eText.setWidth(e),this}setMinValue(e){return this.eSlider.setMinValue(e),this.eText.setMin(e),this}setMaxValue(e){return this.eSlider.setMaxValue(e),this.eText.setMax(e),this}getValue(){return this.eText.getValue()}setValue(e,t){return this.getValue()===e||(this.eText.setValue(e,!0),this.eSlider.setValue(e,!0),t||this.dispatchEvent({type:dt.EVENT_FIELD_VALUE_CHANGED})),this}setStep(e){return this.eSlider.setStep(e),this.eText.setStep(e),this}};ec.TEMPLATE='<div class="ag-slider">\n            <label ref="eLabel"></label>\n            <div class="ag-wrapper ag-slider-wrapper">\n                <ag-input-range ref="eSlider"></ag-input-range>\n                <ag-input-number-field ref="eText"></ag-input-number-field>\n            </div>\n        </div>',m([Es("eLabel")],ec.prototype,"eLabel",2),m([Es("eSlider")],ec.prototype,"eSlider",2),m([Es("eText")],ec.prototype,"eText",2),m([he],ec.prototype,"init",1);var tc=ec,ic=class e extends ws{constructor(t={}){super(e.getTemplate(t)),this.params=t,this.suppressEnabledCheckbox=!0,this.suppressToggleExpandOnEnableChange=!1;const{enabled:i,items:n,suppressEnabledCheckbox:s,expanded:r,suppressToggleExpandOnEnableChange:o,useToggle:a}=t;this.cssIdentifier=t.cssIdentifier||"default",this.enabled=null==i||i,this.items=n||[],this.useToggle=null!=a&&a,this.alignItems=t.alignItems||"center",this.expanded=null==r||r,null!=s&&(this.suppressEnabledCheckbox=s),null!=o&&(this.suppressToggleExpandOnEnableChange=o)}static getTemplate(e){const t=e.cssIdentifier||"default";return`\n            <div class="ag-group ag-${t}-group" role="presentation">\n                <div ref="eToolbar" class="ag-group-toolbar ag-${t}-group-toolbar">\n                    <ag-checkbox ref="cbGroupEnabled"></ag-checkbox>\n                </div>\n                <div ref="eContainer" class="ag-group-container ag-group-container-${e.direction||"vertical"} ag-${t}-group-container"></div>\n            </div>\n        `}postConstruct(){if(this.setupTitleBar(),this.items.length){const e=this.items;this.items=[],this.addItems(e)}const e=this.localeService.getLocaleTextFunc();this.cbGroupEnabled.setLabel(e("enabled","Enabled")),this.enabled&&this.setEnabled(this.enabled,void 0,!0),this.setAlignItems(this.alignItems);const{onEnableChange:t,suppressOpenCloseIcons:i}=this.params;this.hideEnabledCheckbox(this.suppressEnabledCheckbox),this.hideOpenCloseIcons(null!=i&&i),this.refreshChildDisplay(),cn(this.eContainer,this.expanded),this.cbGroupEnabled.onValueChange(e=>{this.setEnabled(e,!0,this.suppressToggleExpandOnEnableChange),this.dispatchEnableChangeEvent(e)}),null!=t&&this.onEnableChange(t)}refreshChildDisplay(){var e;cn(this.eToolbar,this.expanded&&!this.suppressEnabledCheckbox),null==(e=this.eTitleBar)||e.refreshOnExpand(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(t){var i;let n=!1;if((null==(i=this.eTitleBar)?void 0:i.isSuppressCollapse())&&!this.useToggle)t=!0,n=!0;else if(t=null!=t?t:!this.expanded,this.expanded===t)return this;return this.expanded=t,this.refreshChildDisplay(),cn(this.eContainer,t),n||this.dispatchEvent({type:t?e.EVENT_EXPANDED:e.EVENT_COLLAPSED}),this}addItems(e){e.forEach(e=>this.addItem(e))}prependItem(e){this.insertItem(e,!0)}addItem(e){this.insertItem(e,!1)}insertItem(e,t){const i=this.eContainer,n=e instanceof ws?e.getGui():e;n.classList.add("ag-group-item",`ag-${this.cssIdentifier}-group-item`),t?(i.insertAdjacentElement("afterbegin",n),this.items.unshift(n)):(i.appendChild(n),this.items.push(n))}hideItem(e,t){cn(this.items[t],!e)}getItemIndex(e){const t=e instanceof ws?e.getGui():e;return this.items.indexOf(t)}setTitle(e){var t;return null==(t=this.eTitleBar)||t.setTitle(e),this}addTitleBarWidget(e){var t;return null==(t=this.eTitleBar)||t.addWidget(e),this}addCssClassToTitleBar(e){var t;null==(t=this.eTitleBar)||t.addCssClass(e)}dispatchEnableChangeEvent(t){const i={type:e.EVENT_ENABLE_CHANGE,enabled:t};this.dispatchEvent(i)}setEnabled(e,t,i){var n;return this.enabled=e,this.refreshDisabledStyles(),i||this.toggleGroupExpand(e),t||(this.cbGroupEnabled.setValue(e),null==(n=this.eToggle)||n.setValue(e)),this}isEnabled(){return this.enabled}onEnableChange(t){return this.addManagedListener(this,e.EVENT_ENABLE_CHANGE,e=>t(e.enabled)),this}hideEnabledCheckbox(e){return this.suppressEnabledCheckbox=e,this.refreshChildDisplay(),this.refreshDisabledStyles(),this}hideOpenCloseIcons(e){var t;return null==(t=this.eTitleBar)||t.hideOpenCloseIcons(e),this}refreshDisabledStyles(){var e;const t=!this.enabled;this.eContainer.classList.toggle("ag-disabled",t),null==(e=this.eTitleBar)||e.refreshDisabledStyles(this.suppressEnabledCheckbox&&t),this.eContainer.classList.toggle("ag-disabled-group-container",t)}setupTitleBar(){const e=this.useToggle?this.createToggleTitleBar():this.createDefaultTitleBar();this.eToolbar.insertAdjacentElement("beforebegin",e.getGui())}createDefaultTitleBar(){const e=this.createManagedBean(new oc(this.params));return this.eTitleBar=e,e.refreshOnExpand(this.expanded),this.addManagedListener(e,oc.EVENT_EXPAND_CHANGED,e=>this.toggleGroupExpand(e.expanded)),e}createToggleTitleBar(){var e;const t=this.createManagedBean(new Kl({value:this.enabled,label:this.params.title,labelAlignment:"left",labelWidth:"flex",onValueChange:e=>{this.setEnabled(e,!0),this.dispatchEnableChangeEvent(e)}}));return t.addCssClass("ag-group-title-bar"),t.addCssClass(`ag-${null!=(e=this.params.cssIdentifier)?e:"default"}-group-title-bar ag-unselectable`),this.eToggle=t,this.toggleGroupExpand(this.enabled),t}};ic.EVENT_EXPANDED="expanded",ic.EVENT_COLLAPSED="collapsed",ic.EVENT_ENABLE_CHANGE="enableChange",m([Es("eToolbar")],ic.prototype,"eToolbar",2),m([Es("cbGroupEnabled")],ic.prototype,"cbGroupEnabled",2),m([Es("eContainer")],ic.prototype,"eContainer",2),m([he],ic.prototype,"postConstruct",1);var nc=ic,sc="ag-disabled-group-title-bar",rc=class e extends ws{constructor(t={}){super(e.getTemplate(t)),this.suppressOpenCloseIcons=!1;const{title:i,suppressOpenCloseIcons:n}=t;i&&i.length>0&&(this.title=i),null!=n&&(this.suppressOpenCloseIcons=n)}static getTemplate(e){var t;const i=null!=(t=e.cssIdentifier)?t:"default";return`\n            <div class="ag-group-title-bar ag-${i}-group-title-bar ag-unselectable" role="button">\n                <span class="ag-group-title-bar-icon ag-${i}-group-title-bar-icon" ref="eGroupOpenedIcon" role="presentation"></span>\n                <span class="ag-group-title-bar-icon ag-${i}-group-title-bar-icon" ref="eGroupClosedIcon" role="presentation"></span>\n                <span ref="eTitle" class="ag-group-title ag-${i}-group-title"></span>\n            </div>\n        `}postConstruct(){this.setTitle(this.title),this.hideOpenCloseIcons(this.suppressOpenCloseIcons),this.setupExpandContract()}setupExpandContract(){this.eGroupClosedIcon.appendChild(Xn("columnSelectClosed",this.gos,null)),this.eGroupOpenedIcon.appendChild(Xn("columnSelectOpen",this.gos,null)),this.addManagedListener(this.getGui(),"click",()=>this.dispatchExpandChanged()),this.addManagedListener(this.getGui(),"keydown",e=>{switch(e.key){case Jn.ENTER:case Jn.SPACE:e.preventDefault(),this.dispatchExpandChanged();break;case Jn.RIGHT:case Jn.LEFT:e.preventDefault(),this.dispatchExpandChanged(e.key===Jn.RIGHT)}})}refreshOnExpand(e){this.refreshAriaStatus(e),this.refreshOpenCloseIcons(e)}refreshAriaStatus(e){this.suppressOpenCloseIcons||si(this.getGui(),e)}refreshOpenCloseIcons(e){const t=!this.suppressOpenCloseIcons;cn(this.eGroupOpenedIcon,t&&e),cn(this.eGroupClosedIcon,t&&!e)}isSuppressCollapse(){return this.suppressOpenCloseIcons}dispatchExpandChanged(t){const i={type:e.EVENT_EXPAND_CHANGED,expanded:t};this.dispatchEvent(i)}setTitle(e){const t=this.getGui(),i=!!e&&e.length>0;e=i?e:void 0,this.eTitle.textContent=null!=e?e:"",cn(t,i),e!==this.title&&(this.title=e);const n=t.classList.contains(sc);return this.refreshDisabledStyles(n),this}addWidget(e){return this.getGui().appendChild(e),this}hideOpenCloseIcons(e){return this.suppressOpenCloseIcons=e,e&&this.dispatchExpandChanged(!0),this}refreshDisabledStyles(e){const t=this.getGui();e?(t.classList.add(sc),t.removeAttribute("tabindex")):(t.classList.remove(sc),"string"==typeof this.title?t.setAttribute("tabindex","0"):t.removeAttribute("tabindex"))}};rc.EVENT_EXPAND_CHANGED="expandedChanged",m([Es("eGroupOpenedIcon")],rc.prototype,"eGroupOpenedIcon",2),m([Es("eGroupClosedIcon")],rc.prototype,"eGroupClosedIcon",2),m([Es("eTitle")],rc.prototype,"eTitle",2),m([he],rc.prototype,"postConstruct",1);var oc=rc,ac=class extends Al{constructor(e=0,t){super('<div class="ag-menu-list" role="tree"></div>'),this.level=e,this.menuItems=[],this.params=null!=t?t:{column:null,node:null,value:null}}postConstruct(){this.initialiseTabGuard({onTabKeyDown:e=>this.onTabKeyDown(e),handleKeyDown:e=>this.handleKeyDown(e),onFocusIn:e=>this.handleFocusIn(e),onFocusOut:e=>this.handleFocusOut(e)})}onTabKeyDown(e){const t=this.getParentComponent(),i=t&&t.getGui();i&&i.classList.contains("ag-focus-managed")||e.preventDefault(),e.shiftKey&&this.closeIfIsChild(e)}handleKeyDown(e){switch(e.key){case Jn.UP:case Jn.RIGHT:case Jn.DOWN:case Jn.LEFT:e.preventDefault(),this.handleNavKey(e.key);break;case Jn.ESCAPE:this.closeIfIsChild()&&Ze(e)}}handleFocusIn(e){var t,i;const n=e.relatedTarget;(this.tabGuardCtrl.isTabGuard(n)||!this.getGui().contains(n)&&!(null==(i=null==(t=this.activeMenuItem)?void 0:t.getSubMenuGui())?void 0:i.contains(n)))&&(this.activeMenuItem?this.activeMenuItem.activate():this.activateFirstItem())}handleFocusOut(e){var t;const i=e.relatedTarget;!this.activeMenuItem||this.getGui().contains(i)||(null==(t=this.activeMenuItem.getSubMenuGui())?void 0:t.contains(i))||this.activeMenuItem.isSubMenuOpening()||this.activeMenuItem.deactivate()}clearActiveItem(){this.activeMenuItem&&(this.activeMenuItem.deactivate(),this.activeMenuItem=null)}addMenuItems(e){null!=e&&gs.all(e.map(e=>"separator"===e?gs.resolve({eGui:this.createSeparator()}):"string"==typeof e?(console.warn(`AG Grid: unrecognised menu item ${e}`),gs.resolve({eGui:null})):this.addItem(e))).then(e=>{e.forEach(e=>{(null==e?void 0:e.eGui)&&(this.appendChild(e.eGui),e.comp&&this.menuItems.push(e.comp))})})}addItem(e){const t=this.createManagedBean(new hc);return t.init({menuItemDef:e,isAnotherSubMenuOpen:()=>this.menuItems.some(e=>e.isSubMenuOpen()),level:this.level,contextParams:this.params}).then(()=>(t.setParentComponent(this),this.addManagedListener(t,hc.EVENT_CLOSE_MENU,e=>{this.dispatchEvent(e)}),this.addManagedListener(t,hc.EVENT_MENU_ITEM_ACTIVATED,e=>{this.activeMenuItem&&this.activeMenuItem!==e.menuItem&&this.activeMenuItem.deactivate(),this.activeMenuItem=e.menuItem}),{comp:t,eGui:t.getGui()}))}activateFirstItem(){const e=this.menuItems.filter(e=>!e.isDisabled())[0];e&&e.activate()}createSeparator(){return An('\n            <div class="ag-menu-separator" aria-hidden="true">\n                <div class="ag-menu-separator-part"></div>\n                <div class="ag-menu-separator-part"></div>\n                <div class="ag-menu-separator-part"></div>\n                <div class="ag-menu-separator-part"></div>\n            </div>')}handleNavKey(e){switch(e){case Jn.UP:case Jn.DOWN:const t=this.findNextItem(e===Jn.UP);return void(t&&t!==this.activeMenuItem&&t.activate())}e===(this.gos.get("enableRtl")?Jn.RIGHT:Jn.LEFT)?this.closeIfIsChild():this.openChild()}closeIfIsChild(e){const t=this.getParentComponent();return!!(t&&t instanceof hc)&&(e&&e.preventDefault(),t.closeSubMenu(),t.getGui().focus(),!0)}openChild(){this.activeMenuItem&&this.activeMenuItem.openSubMenu(!0)}findNextItem(e){const t=this.menuItems.filter(e=>!e.isDisabled());if(!t.length)return;if(!this.activeMenuItem)return e?Le(t):t[0];let i;e&&t.reverse();let n=!1;for(let e=0;e<t.length;e++){const s=t[e];if(n){i=s;break}s===this.activeMenuItem&&(n=!0)}return n&&!i?t[0]:i||this.activeMenuItem}destroy(){this.clearActiveItem(),super.destroy()}};m([pe("focusService")],ac.prototype,"focusService",2),m([he],ac.prototype,"postConstruct",1);var lc=class extends Al{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===Jn.ESCAPE&&this.closePanel()}onTabKeyDown(e){e.defaultPrevented||(this.closePanel(),e.preventDefault())}closePanel(){const e=this.parentComponent;e.closeSubMenu(),setTimeout(()=>e.getGui().focus(),0)}};m([he],lc.prototype,"postConstruct",1);var cc=class e extends ot{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:s,level:r,childComponent:o,contextParams:a}=e;return this.params=e.menuItemDef,this.level=r,this.isAnotherSubMenuOpen=s,this.childComponent=o,this.contextParams=a,this.cssClassPrefix=null!=(i=null==(t=this.params.menuItemParams)?void 0:t.cssClassPrefix)?i:"ag-menu-option",this.userComponentFactory.getMenuItemCompDetails(this.params,g(p({},n),{level:r,isAnotherSubMenuOpen:s,openSubMenu:e=>this.openSubMenu(e),closeSubMenu:()=>this.closeSubMenu(),closeMenu:e=>this.closeMenu(e),updateTooltip:(e,t)=>this.refreshTooltip(e,t),onItemActivated:()=>this.onItemActivated()})).newAgStackInstance().then(e=>{var t;this.menuItemComp=e;const i=null==(t=e.configureDefaults)?void 0:t.call(e);i&&this.configureDefaults(!0===i?void 0:i)})}addListeners(e,t){(null==t?void 0:t.suppressClick)||this.addManagedListener(e,"click",e=>this.onItemSelected(e)),(null==t?void 0:t.suppressKeyboardSelect)||this.addManagedListener(e,"keydown",e=>{e.key!==Jn.ENTER&&e.key!==Jn.SPACE||(e.preventDefault(),this.onItemSelected(e))}),(null==t?void 0:t.suppressMouseDown)||this.addManagedListener(e,"mousedown",e=>{e.stopPropagation(),e.preventDefault()}),(null==t?void 0:t.suppressMouseOver)||(this.addManagedListener(e,"mouseenter",()=>this.onMouseEnter()),this.addManagedListener(e,"mouseleave",()=>this.onMouseLeave()))}isDisabled(){return!!this.params.disabled}openSubMenu(t=!1){var i,n;if(this.closeSubMenu(),!this.params.subMenu)return;this.subMenuIsOpening=!0;const s=An('<div class="ag-menu" role="presentation"></div>');let r;this.eSubMenuGui=s;let o=()=>{this.subMenuIsOpening=!1};if(this.childComponent){const e=this.createBean(new lc(this.childComponent));e.setParentComponent(this);const t=e.getGui(),i="mouseenter",n=()=>this.cancelDeactivate();t.addEventListener(i,n),r=()=>t.removeEventListener(i,n),s.appendChild(t),this.childComponent.afterGuiAttached&&(o=()=>{this.childComponent.afterGuiAttached(),this.subMenuIsOpening=!1})}else if(this.params.subMenu){const i=this.createBean(new ac(this.level+1,this.contextParams));i.setParentComponent(this),i.addMenuItems(this.params.subMenu),s.appendChild(i.getGui()),this.addManagedListener(i,e.EVENT_CLOSE_MENU,e=>this.dispatchEvent(e)),i.addGuiEventListener("mouseenter",()=>this.cancelDeactivate()),r=()=>this.destroyBean(i),t&&(o=()=>{i.activateFirstItem(),this.subMenuIsOpening=!1})}const a=this.popupService.positionPopupForMenu.bind(this.popupService,{eventSource:this.eGui,ePopup:s}),l=this.localeService.getLocaleTextFunc(),c=this.popupService.addPopup({modal:!0,eChild:s,positionCallback:a,anchorToElement:this.eGui,ariaLabel:l("ariaLabelSubMenu","SubMenu"),afterGuiAttached:o});this.subMenuIsOpen=!0,this.setAriaExpanded(!0),this.hideSubMenu=()=>{var e,t;c&&c.hideFunc(),this.subMenuIsOpen=!1,this.setAriaExpanded(!1),r(),null==(t=(e=this.menuItemComp).setExpanded)||t.call(e,!1),this.eSubMenuGui=void 0},null==(n=(i=this.menuItemComp).setExpanded)||n.call(i,!0)}setAriaExpanded(e){this.suppressAria||si(this.eGui,e)}closeSubMenu(){this.hideSubMenu&&(this.hideSubMenu(),this.hideSubMenu=null,this.setAriaExpanded(!1))}isSubMenuOpen(){return this.subMenuIsOpen}isSubMenuOpening(){return this.subMenuIsOpening}activate(e){var t,i;this.cancelActivate(),this.params.disabled||(this.isActive=!0,this.suppressRootStyles||this.eGui.classList.add(`${this.cssClassPrefix}-active`),null==(i=(t=this.menuItemComp).setActive)||i.call(t,!0),this.suppressFocus||this.eGui.focus({preventScroll:!0}),e&&this.params.subMenu&&window.setTimeout(()=>{this.isAlive()&&this.isActive&&this.openSubMenu()},300),this.onItemActivated())}deactivate(){var e,t;this.cancelDeactivate(),this.suppressRootStyles||this.eGui.classList.remove(`${this.cssClassPrefix}-active`),null==(t=(e=this.menuItemComp).setActive)||t.call(e,!1),this.isActive=!1,this.subMenuIsOpen&&this.hideSubMenu()}getGui(){return this.menuItemComp.getGui()}getParentComponent(){return this.parentComponent}setParentComponent(e){this.parentComponent=e}getSubMenuGui(){return this.eSubMenuGui}onItemSelected(e){var t,i;null==(i=(t=this.menuItemComp).select)||i.call(t),this.params.action?this.getFrameworkOverrides().wrapOutgoing(()=>this.params.action(this.gos.addGridCommonParams(p({},this.contextParams)))):this.openSubMenu(e&&"keydown"===e.type),this.params.subMenu&&!this.params.action||this.params.suppressCloseOnSelect||this.closeMenu(e)}closeMenu(t){const i={type:e.EVENT_CLOSE_MENU};t&&(t instanceof MouseEvent?i.mouseEvent=t:i.keyboardEvent=t),this.dispatchEvent(i)}onItemActivated(){const t={type:e.EVENT_MENU_ITEM_ACTIVATED,menuItem:this};this.dispatchEvent(t)}cancelActivate(){this.activateTimeoutId&&(window.clearTimeout(this.activateTimeoutId),this.activateTimeoutId=0)}cancelDeactivate(){this.deactivateTimeoutId&&(window.clearTimeout(this.deactivateTimeoutId),this.deactivateTimeoutId=0)}onMouseEnter(){this.cancelDeactivate(),this.isAnotherSubMenuOpen()?this.activateTimeoutId=window.setTimeout(()=>this.activate(!0),e.ACTIVATION_DELAY):this.activate(!0)}onMouseLeave(){this.cancelActivate(),this.isSubMenuOpen()?this.deactivateTimeoutId=window.setTimeout(()=>this.deactivate(),e.ACTIVATION_DELAY):this.deactivate()}configureDefaults(e){var t,i,n;if(!this.menuItemComp)return void setTimeout(()=>this.configureDefaults(e));let s=this.menuItemComp.getGui();const r=null==(i=(t=this.menuItemComp).getRootElement)?void 0:i.call(t);r&&((null==e?void 0:e.suppressRootStyles)||s.classList.add("ag-menu-option-custom"),s=r),this.eGui=s,this.suppressRootStyles=!!(null==e?void 0:e.suppressRootStyles),this.suppressRootStyles||(s.classList.add(this.cssClassPrefix),null==(n=this.params.cssClasses)||n.forEach(e=>s.classList.add(e)),this.params.disabled&&s.classList.add(`${this.cssClassPrefix}-disabled`)),(null==e?void 0:e.suppressTooltip)||this.refreshTooltip(this.params.tooltip),this.suppressAria=!!(null==e?void 0:e.suppressAria),this.suppressAria||(Ut(s,"treeitem"),ei(s,this.level+1),this.params.disabled&&ti(s,!0)),(null==e?void 0:e.suppressTabIndex)||s.setAttribute("tabindex","-1"),this.params.disabled||this.addListeners(s,e),this.suppressFocus=!!(null==e?void 0:e.suppressFocus)}refreshTooltip(e,t){this.tooltip=e,this.tooltipFeature&&(this.tooltipFeature=this.destroyBean(this.tooltipFeature)),e&&this.menuItemComp&&(this.tooltipFeature=this.createBean(new Cs({getGui:()=>this.getGui(),getTooltipValue:()=>this.tooltip,getLocation:()=>"menu",shouldDisplayTooltip:t})))}destroy(){this.tooltipFeature&&(this.tooltipFeature=this.destroyBean(this.tooltipFeature)),super.destroy()}};cc.EVENT_CLOSE_MENU="closeMenu",cc.EVENT_MENU_ITEM_ACTIVATED="menuItemActivated",cc.ACTIVATION_DELAY=80,m([pe("popupService")],cc.prototype,"popupService",2),m([pe("userComponentFactory")],cc.prototype,"userComponentFactory",2);var hc=cc,dc=class e extends ws{constructor(t){super(e.getTemplate(t)),this.config=t,this.closable=!0}static getTemplate(e){const t=e.cssIdentifier||"default";return`<div class="ag-panel ag-${t}-panel" tabindex="-1">\n            <div ref="eTitleBar" class="ag-panel-title-bar ag-${t}-panel-title-bar ag-unselectable">\n                <span ref="eTitle" class="ag-panel-title-bar-title ag-${t}-panel-title-bar-title"></span>\n                <div ref="eTitleBarButtons" class="ag-panel-title-bar-buttons ag-${t}-panel-title-bar-buttons"></div>\n            </div>\n            <div ref="eContentWrapper" class="ag-panel-content-wrapper ag-${t}-panel-content-wrapper"></div>\n        </div>`}postConstruct(){const{component:e,closable:t,hideTitleBar:i,title:n,minWidth:s=250,width:r,minHeight:o=250,height:a,centered:l,popup:c,x:h,y:d}=this.config;this.positionableFeature=new Ns(this.getGui(),{minWidth:s,width:r,minHeight:o,height:a,centered:l,x:h,y:d,popup:c,calculateTopBuffer:()=>this.positionableFeature.getHeight()-this.getBodyHeight()}),this.createManagedBean(this.positionableFeature);const u=this.getGui();e&&this.setBodyComponent(e),i?cn(this.eTitleBar,!1):(n&&this.setTitle(n),this.setClosable(null!=t?t:this.closable)),this.addManagedListener(this.eTitleBar,"mousedown",e=>{if(u.contains(e.relatedTarget)||u.contains(this.gos.getActiveDomElement())||this.eTitleBarButtons.contains(e.target))return void e.preventDefault();const t=this.eContentWrapper.querySelector("button, [href], input, select, textarea, [tabindex]");t&&t.focus()}),c&&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(t){if(t!==this.closable&&(this.closable=t),t){const t=this.closeButtonComp=new ws(e.CLOSE_BTN_TEMPLATE);this.getContext().createBean(t);const i=t.getGui(),n=Zn("close",this.gos);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 e=this.closeButtonComp.getGui();e.parentElement.removeChild(e),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,s=n.length;null==t&&(t=s),t=Math.max(0,Math.min(t,s)),e.addCssClass("ag-panel-title-bar-button");const r=e.getGui();0===t?i.insertAdjacentElement("afterbegin",r):t===s?i.insertAdjacentElement("beforeend",r):n[t-1].insertAdjacentElement("afterend",r),e.setParentComponent(this)}getBodyHeight(){return gn(this.eContentWrapper)}getBodyWidth(){return fn(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&&Mn(e)&&this.close(),super.destroy()}};dc.CLOSE_BTN_TEMPLATE='<div class="ag-button"></div>',m([Es("eContentWrapper")],dc.prototype,"eContentWrapper",2),m([Es("eTitleBar")],dc.prototype,"eTitleBar",2),m([Es("eTitleBarButtons")],dc.prototype,"eTitleBarButtons",2),m([Es("eTitle")],dc.prototype,"eTitle",2),m([he],dc.prototype,"postConstruct",1);var uc=dc,pc=class extends uc{constructor(e){super(g(p({},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",t=>{this.popupService.bringPopupToFront(e)}),t&&this.setMovable(t),n&&this.setMaximizable(n),i&&this.setResizable(i)}renderComponent(){const e=this.getGui(),{alwaysOnTop:t,modal:i,title:n,afterGuiAttached:s}=this.config,r=this.localeService.getLocaleTextFunc(),o=this.popupService.addPopup({modal:i,eChild:e,closeOnEsc:!0,closedCallback:this.onClosed.bind(this),alwaysOnTop:t,ariaLabel:n||r("ariaLabelDialog","Dialog"),afterGuiAttached:s});o&&(this.close=o.hideFunc)}onClosed(e){var t,i;this.destroy(),null==(i=(t=this.config).closedCallback)||i.call(t,e)}toggleMaximize(){const e=this.positionableFeature.getPosition();if(this.isMaximized){const{x:e,y:t,width:i,height:n}=this.lastPosition;this.setWidth(i),this.setHeight(n),this.positionableFeature.offsetElement(e,t)}else this.lastPosition.width=this.getWidth(),this.lastPosition.height=this.getHeight(),this.lastPosition.x=e.x,this.lastPosition.y=e.y,this.positionableFeature.offsetElement(0,0),this.setHeight("100%"),this.setWidth("100%");this.isMaximized=!this.isMaximized,this.refreshMaximizeIcon()}refreshMaximizeIcon(){cn(this.maximizeIcon,!this.isMaximized),cn(this.minimizeIcon,this.isMaximized)}clearMaximizebleListeners(){this.maximizeListeners.length&&(this.maximizeListeners.forEach(e=>e()),this.maximizeListeners.length=0),this.resizeListenerDestroy&&(this.resizeListenerDestroy(),this.resizeListenerDestroy=null)}destroy(){this.maximizeButtonComp=this.destroyBean(this.maximizeButtonComp),this.clearMaximizebleListeners(),super.destroy()}setResizable(e){this.positionableFeature.setResizable(e)}setMovable(e){this.positionableFeature.setMovable(e,this.eTitleBar)}setMaximizable(e){if(!e)return this.clearMaximizebleListeners(),void(this.maximizeButtonComp&&(this.destroyBean(this.maximizeButtonComp),this.maximizeButtonComp=this.maximizeIcon=this.minimizeIcon=void 0));const t=this.eTitleBar;if(!t||e===this.isMaximizable)return;const i=this.buildMaximizeAndMinimizeElements();this.refreshMaximizeIcon(),i.addManagedListener(i.getGui(),"click",this.toggleMaximize.bind(this)),this.addTitleBarButton(i,0),this.maximizeListeners.push(this.addManagedListener(t,"dblclick",this.toggleMaximize.bind(this))),this.resizeListenerDestroy=this.addManagedListener(this,"resize",()=>{this.isMaximized=!1,this.refreshMaximizeIcon()})}buildMaximizeAndMinimizeElements(){const e=this.maximizeButtonComp=this.createBean(new ws('<div class="ag-dialog-button"></span>')),t=e.getGui();return this.maximizeIcon=Zn("maximize",this.gos),t.appendChild(this.maximizeIcon),this.maximizeIcon.classList.add("ag-panel-title-bar-button-icon"),this.minimizeIcon=Zn("minimize",this.gos),t.appendChild(this.minimizeIcon),this.minimizeIcon.classList.add("ag-panel-title-bar-button-icon"),e}};m([pe("popupService")],pc.prototype,"popupService",2);var gc=0,fc=class extends ot{constructor(){super(...arguments),this.popupList=[]}postConstruct(){this.ctrlsService.whenReady(e=>{this.gridCtrl=e.gridCtrl}),this.addManagedListener(this.eventService,dt.EVENT_GRID_STYLES_CHANGED,this.handleThemeChange.bind(this))}getPopupParent(){return this.gos.get("popupParent")||this.gridCtrl.getGui()}positionPopupForMenu(e){const{eventSource:t,ePopup:i}=e,n=this.getPopupIndex(i);-1!==n&&(this.popupList[n].alignedToElement=t);const s=t.getBoundingClientRect(),r=this.getParentRect(),o=this.keepXYWithinBounds(i,s.top-r.top,0),a=i.clientWidth>0?i.clientWidth:200;i.style.minWidth=`${a}px`;const l=r.right-r.left-a;let c;function h(){return s.right-r.left-2}function d(){return s.left-r.left-a}this.gos.get("enableRtl")?(c=d(),c<0&&(c=h(),this.setAlignedStyles(i,"left")),c>l&&(c=0,this.setAlignedStyles(i,"right"))):(c=h(),c>l&&(c=d(),this.setAlignedStyles(i,"right")),c<0&&(c=0,this.setAlignedStyles(i,"left"))),i.style.left=`${c}px`,i.style.top=`${o}px`}positionPopupUnderMouseEvent(e){const{ePopup:t,nudgeX:i,nudgeY:n,skipObserver:s}=e;this.positionPopup({ePopup:t,nudgeX:i,nudgeY:n,keepWithinBounds:!0,skipObserver:s,updatePosition:()=>this.calculatePointerAlign(e.mouseEvent),postProcessCallback:()=>this.callPostProcessPopup(e.type,e.ePopup,null,e.mouseEvent,e.column,e.rowNode)})}calculatePointerAlign(e){const t=this.getParentRect();return{x:e.clientX-t.left,y:e.clientY-t.top}}positionPopupByComponent(e){const{ePopup:t,nudgeX:i,nudgeY:n,keepWithinBounds:s,eventSource:r,alignSide:o="left",position:a="over",column:l,rowNode:c,type:h}=e,d=r.getBoundingClientRect(),u=this.getParentRect(),p=this.getPopupIndex(t);-1!==p&&(this.popupList[p].alignedToElement=r),this.positionPopup({ePopup:t,nudgeX:i,nudgeY:n,keepWithinBounds:s,updatePosition:()=>{let i,s=d.left-u.left;return"right"===o&&(s-=t.offsetWidth-d.width),"over"===a?(i=d.top-u.top,this.setAlignedStyles(t,"over")):(this.setAlignedStyles(t,"under"),i="under"===this.shouldRenderUnderOrAbove(t,d,u,e.nudgeY||0)?d.top-u.top+d.height:d.top-t.offsetHeight-2*(n||0)-u.top),{x:s,y:i}},postProcessCallback:()=>this.callPostProcessPopup(h,t,r,null,l,c)})}shouldRenderUnderOrAbove(e,t,i,n){const s=i.bottom-t.bottom,r=t.top-i.top,o=e.offsetHeight+n;return s>o?"under":r>o||r>s?"above":"under"}setAlignedStyles(e,t){const i=this.getPopupIndex(e);if(-1===i)return;const n=this.popupList[i],{alignedToElement:s}=n;s&&(["right","left","over","above","under"].forEach(t=>{s.classList.remove(`ag-has-popup-positioned-${t}`),e.classList.remove(`ag-popup-positioned-${t}`)}),t&&(s.classList.add(`ag-has-popup-positioned-${t}`),e.classList.add(`ag-popup-positioned-${t}`)))}callPostProcessPopup(e,t,i,n,s,r){const o=this.gos.getCallback("postProcessPopup");o&&o({column:s,rowNode:r,ePopup:t,type:e,eventSource:i,mouseEvent:n})}positionPopup(e){const{ePopup:t,keepWithinBounds:i,nudgeX:n,nudgeY:s,skipObserver:r,updatePosition:o}=e,a={width:0,height:0},l=(r=!1)=>{let{x:l,y:c}=o();r&&t.clientWidth===a.width&&t.clientHeight===a.height||(a.width=t.clientWidth,a.height=t.clientHeight,n&&(l+=n),s&&(c+=s),i&&(l=this.keepXYWithinBounds(t,l,1),c=this.keepXYWithinBounds(t,c,0)),t.style.left=`${l}px`,t.style.top=`${c}px`,e.postProcessCallback&&e.postProcessCallback())};if(l(),!r){const e=this.resizeObserverService.observeResize(t,()=>l(!0));setTimeout(()=>e(),fc.WAIT_FOR_POPUP_CONTENT_RESIZE)}}getActivePopups(){return this.popupList.map(e=>e.element)}getPopupList(){return this.popupList}getParentRect(){const e=this.gos.getDocument();let t=this.getPopupParent();return t===e.body?t=e.documentElement:"static"===getComputedStyle(t).position&&(t=t.offsetParent),yn(t)}keepXYWithinBounds(e,t,i){const n=0===i,s=n?"clientHeight":"clientWidth",r=n?"top":"left",o=n?"offsetHeight":"offsetWidth",a=n?"scrollTop":"scrollLeft",l=this.gos.getDocument(),c=l.documentElement,h=this.getPopupParent(),d=h.getBoundingClientRect(),u=l.documentElement.getBoundingClientRect(),p=h===l.body,g=e[o];let f=p?(n?mn:vn)(c)+c[a]:h[s];p&&(f-=Math.abs(u[r]-d[r]));const m=f-g;return Math.min(Math.max(t,0),Math.abs(m))}addPopup(e){const t=this.gos.getDocument(),{eChild:i,ariaLabel:n,alwaysOnTop:s,positionCallback:r,anchorToElement:o}=e;if(!t)return console.warn("AG Grid: could not find the document, document is empty"),{hideFunc:()=>{}};const a=this.getPopupIndex(i);if(-1!==a)return{hideFunc:this.popupList[a].hideFunc};this.initialisePopupPosition(i);const l=this.createPopupWrapper(i,n,!!s),c=this.addEventListenersToPopup(g(p({},e),{wrapperEl:l}));return r&&r(),this.addPopupToPopupList(i,l,c,o),{hideFunc:c}}initialisePopupPosition(e){const t=this.getPopupParent().getBoundingClientRect();S(e.style.top)||(e.style.top=-1*t.top+"px"),S(e.style.left)||(e.style.left=-1*t.left+"px")}createPopupWrapper(e,t,i){const n=this.getPopupParent(),s=document.createElement("div"),{allThemes:r}=this.environment.getTheme();return r.length&&s.classList.add(...r),s.classList.add("ag-popup"),e.classList.add(this.gos.get("enableRtl")?"ag-rtl":"ag-ltr","ag-popup-child"),e.hasAttribute("role")||Ut(e,"dialog"),Yt(e,t),s.appendChild(e),n.appendChild(s),i?this.setAlwaysOnTop(e,!0):this.bringPopupToFront(e),s}handleThemeChange(){const{allThemes:e}=this.environment.getTheme();for(const t of this.popupList){for(const e of Array.from(t.wrapper.classList))e.startsWith("ag-theme-")&&t.wrapper.classList.remove(e);e.length&&t.wrapper.classList.add(...e)}}addEventListenersToPopup(e){const t=this.gos.getDocument(),i=this.getPopupParent(),{wrapperEl:n,eChild:s,closedCallback:r,afterGuiAttached:o,closeOnEsc:a,modal:l}=e;let c=!1;const h=e=>{n.contains(this.gos.getActiveDomElement())&&(e.key!==Jn.ESCAPE||Qe(e)||p({keyboardEvent:e}))},d=e=>p({mouseEvent:e}),u=e=>p({touchEvent:e}),p=(e={})=>{const{mouseEvent:o,touchEvent:a,keyboardEvent:l,forceHide:p}=e;(p||!this.isEventFromCurrentPopup({mouseEvent:o,touchEvent:a},s)&&!c)&&(c=!0,i.removeChild(n),t.removeEventListener("keydown",h),t.removeEventListener("mousedown",d),t.removeEventListener("touchstart",u),t.removeEventListener("contextmenu",d),this.eventService.removeEventListener(dt.EVENT_DRAG_STARTED,d),r&&r(o||a||l),this.removePopupFromPopupList(s))};return o&&o({hidePopup:p}),window.setTimeout(()=>{a&&t.addEventListener("keydown",h),l&&(t.addEventListener("mousedown",d),this.eventService.addEventListener(dt.EVENT_DRAG_STARTED,d),t.addEventListener("touchstart",u),t.addEventListener("contextmenu",d))},0),p}addPopupToPopupList(e,t,i,n){this.popupList.push({element:e,wrapper:t,hideFunc:i,instanceId:gc++,isAnchored:!!n}),n&&this.setPopupPositionRelatedToElement(e,n)}getPopupIndex(e){return this.popupList.findIndex(t=>t.element===e)}setPopupPositionRelatedToElement(e,t){const i=this.getPopupIndex(e);if(-1===i)return;const n=this.popupList[i];if(n.stopAnchoringPromise&&n.stopAnchoringPromise.then(e=>e&&e()),n.stopAnchoringPromise=void 0,n.isAnchored=!1,!t)return;const s=this.keepPopupPositionedRelativeTo({element:t,ePopup:e,hidePopup:n.hideFunc});return n.stopAnchoringPromise=s,n.isAnchored=!0,s}removePopupFromPopupList(e){this.setAlignedStyles(e,null),this.setPopupPositionRelatedToElement(e,null),this.popupList=this.popupList.filter(t=>t.element!==e)}keepPopupPositionedRelativeTo(e){const t=this.getPopupParent(),i=t.getBoundingClientRect(),{element:n,ePopup:s}=e,r=n.getBoundingClientRect(),o=i.top-r.top,a=i.left-r.left;let l=o,c=a;const h=s.style.top,d=parseInt(h.substring(0,h.length-1),10),u=s.style.left,p=parseInt(u.substring(0,u.length-1),10);return new gs(i=>{this.getFrameworkOverrides().setInterval(()=>{const i=t.getBoundingClientRect(),r=n.getBoundingClientRect();if(0==r.top&&0==r.left&&0==r.height&&0==r.width)return void e.hidePopup();const h=i.top-r.top;if(h!=l){const e=this.keepXYWithinBounds(s,d+o-h,0);s.style.top=`${e}px`}l=h;const u=i.left-r.left;if(u!=c){const e=this.keepXYWithinBounds(s,p+a-u,1);s.style.left=`${e}px`}c=u},200).then(e=>{i(()=>{null!=e&&window.clearInterval(e)})})})}hasAnchoredPopup(){return this.popupList.some(e=>e.isAnchored)}isEventFromCurrentPopup(e,t){const{mouseEvent:i,touchEvent:n}=e,s=i||n;if(!s)return!1;const r=this.getPopupIndex(t);if(-1===r)return!1;for(let e=r;e<this.popupList.length;e++)if(tt(this.popupList[e].element,s))return!0;return this.isElementWithinCustomPopup(s.target)}isElementWithinCustomPopup(e){const t=this.gos.getDocument();for(;e&&e!==t.body;){if(e.classList.contains("ag-custom-component-popup")||null===e.parentElement)return!0;e=e.parentElement}return!1}getWrapper(e){for(;!e.classList.contains("ag-popup")&&e.parentElement;)e=e.parentElement;return e.classList.contains("ag-popup")?e:null}setAlwaysOnTop(e,t){const i=this.getWrapper(e);i&&(i.classList.toggle("ag-always-on-top",!!t),t&&this.bringPopupToFront(i))}bringPopupToFront(e){const t=this.getPopupParent(),i=Array.prototype.slice.call(t.querySelectorAll(".ag-popup")),n=i.length,s=Array.prototype.slice.call(t.querySelectorAll(".ag-popup.ag-always-on-top")),r=s.length,o=this.getWrapper(e);if(!o||n<=1||!t.contains(e))return;const a=i.indexOf(o),l=o.querySelectorAll("div"),c=[];for(l.forEach(e=>{0!==e.scrollTop&&c.push([e,e.scrollTop])}),r?o.classList.contains("ag-always-on-top")?a!==n-1&&Le(s).insertAdjacentElement("afterend",o):a!==n-r-1&&s[0].insertAdjacentElement("beforebegin",o):a!==n-1&&Le(i).insertAdjacentElement("afterend",o);c.length;){const e=c.pop();e[0].scrollTop=e[1]}}};fc.WAIT_FOR_POPUP_CONTENT_RESIZE=200,m([pe("focusService")],fc.prototype,"focusService",2),m([pe("ctrlsService")],fc.prototype,"ctrlsService",2),m([pe("resizeObserverService")],fc.prototype,"resizeObserverService",2),m([he],fc.prototype,"postConstruct",1),fc=m([ue("popupService")],fc);var mc=class extends ws{constructor(){super('\n        <div class="ag-autocomplete-row" role="presentation">\n            <div class="ag-autocomplete-row-label"></div>\n        </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(S(e)){const n=null==(t=this.value)?void 0:t.toLocaleLowerCase().indexOf(e.toLocaleLowerCase());if(n>=0){i=!0,this.hasHighlighting=!0;const t=n+e.length,s=St(this.value.slice(0,n)),r=St(this.value.slice(n,t)),o=St(this.value.slice(t));this.getGui().lastElementChild.innerHTML=`${s}<b>${r}</b>${o}`}}!i&&this.hasHighlighting&&(this.hasHighlighting=!1,this.render())}render(){var e;this.getGui().lastElementChild.innerHTML=null!=(e=St(this.value))?e:"&nbsp;"}},vc=class e extends Ar{constructor(t){super(e.TEMPLATE),this.params=t,this.searchString=""}destroy(){super.destroy()}init(){this.autocompleteEntries=this.params.autocompleteEntries,this.virtualList=this.createManagedBean(new Ql({cssIdentifier:"autocomplete"})),this.virtualList.setComponentCreator(this.createRowComponent.bind(this)),this.eList.appendChild(this.virtualList.getGui()),this.virtualList.setModel({getRowCount:()=>this.autocompleteEntries.length,getRow:e=>this.autocompleteEntries[e]});const e=this.virtualList.getGui();this.addManagedListener(e,"click",()=>this.params.onConfirmed()),this.addManagedListener(e,"mousemove",this.onMouseMove.bind(this)),this.addManagedListener(e,"mousedown",e=>e.preventDefault()),this.setSelectedValue(0)}onNavigationKeyDown(e,t){e.preventDefault();const i=this.autocompleteEntries.indexOf(this.selectedValue),n=t===Jn.UP?i-1:i+1;this.checkSetSelectedValue(n)}setSearch(e){this.searchString=e,S(e)?this.runSearch():(this.autocompleteEntries=this.params.autocompleteEntries,this.virtualList.refresh(),this.checkSetSelectedValue(0)),this.updateSearchInList()}runContainsSearch(e,t){let i,n=!1;const s=e.toLocaleLowerCase(),r=t.filter(e=>{const t=e.toLocaleLowerCase().indexOf(s),r=0===t,o=t>=0;return o&&(!i||!n&&r||n===r&&e.length<i.length)&&(i=e,n=r),o});return!i&&r.length&&(i=r[0]),{topMatch:i,allMatches:r}}runSearch(){var e,t;const{autocompleteEntries:i}=this.params,n=i.map(e=>{var t;return null!=(t=e.displayValue)?t:e.key});let s,r;if(this.params.useFuzzySearch)s=Kn(this.searchString,n,!0).values,r=s.length?s[0]:void 0;else{const e=this.runContainsSearch(this.searchString,n);s=e.allMatches,r=e.topMatch}let o=i.filter(({key:e,displayValue:t})=>s.includes(null!=t?t:e));if(!o.length&&this.selectedValue&&(null==(t=null==(e=this.params)?void 0:e.forceLastSelection)?void 0:t.call(e,this.selectedValue,this.searchString))&&(o=[this.selectedValue]),this.autocompleteEntries=o,this.virtualList.refresh(),!r)return;const a=s.indexOf(r);this.checkSetSelectedValue(a)}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((t,i)=>{t.updateSelected(e===i)}))}createRowComponent(e){var t;const i=new mc;return this.getContext().createBean(i),i.setState(null!=(t=e.displayValue)?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,s=Math.floor(n/this.virtualList.getRowHeight());this.checkSetSelectedValue(s)}afterGuiAttached(){this.virtualList.refresh()}getSelectedValue(){var e;return this.autocompleteEntries.length&&null!=(e=this.selectedValue)?e:null}};vc.TEMPLATE='<div class="ag-autocomplete-list-popup">\n            <div ref="eList" class="ag-autocomplete-list"></div>\n        <div>',m([Es("eList")],vc.prototype,"eList",2),m([he],vc.prototype,"init",1);var yc=vc,Cc=class e extends ws{constructor(){super('\n            <div class="ag-autocomplete" role="presentation">\n                <ag-input-text-field ref="eAutocompleteInput"></ag-input-text-field>\n            </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=b(e);this.updateValue(t),this.updateAutocompleteList(t)}updateValue(t){this.updateLastPosition(),this.dispatchEvent({type:e.EVENT_VALUE_CHANGED,value:t}),this.validate(t)}updateAutocompleteList(e){var t,i,n,s;const r=null!=(i=null==(t=this.listGenerator)?void 0:t.call(this,e,this.lastPosition))?i:{enabled:!1};if(r.type&&r.type===(null==(n=this.autocompleteListParams)?void 0:n.type)||this.isListOpen&&this.closeList(),this.autocompleteListParams=r,null==(s=this.autocompleteListParams)?void 0:s.enabled){this.isListOpen||this.openList();const{searchString:e}=this.autocompleteListParams;this.autocompleteList.setSearch(null!=e?e:"")}else this.isListOpen&&this.closeList()}onKeyDown(e){const t=e.key;switch(this.updateLastPosition(),t){case Jn.ENTER:this.onEnterKeyDown(e);break;case Jn.TAB:this.onTabKeyDown(e);break;case Jn.DOWN:case Jn.UP:this.onUpDownKeyDown(e,t);break;case Jn.LEFT:case Jn.RIGHT:case Jn.PAGE_HOME:case Jn.PAGE_END:setTimeout(()=>{this.updatePositionAndList()});break;case Jn.ESCAPE:this.onEscapeKeyDown(e);break;case Jn.SPACE:e.ctrlKey&&!this.isListOpen&&(e.preventDefault(),this.forceOpenList())}}confirmSelection(){var t;const i=null==(t=this.autocompleteList)?void 0:t.getSelectedValue();i&&(this.closeList(),this.dispatchEvent({type:e.EVENT_OPTION_SELECTED,value:this.getValue(),position:this.lastPosition,updateEntry:i,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?null==(i=this.autocompleteList)||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(null!=(e=this.eAutocompleteInput.getValue())?e:null)}setCaret(e,t){const i=this.gos.getDocument(),n=this.gos.getActiveDomElement();!t||n&&n!==i.body||this.eAutocompleteInput.getFocusableElement().focus();const s=this.eAutocompleteInput.getInputElement();s.setSelectionRange(e,e),e===s.value.length&&(s.scrollLeft=s.scrollWidth)}forceOpenList(){this.onValueChanged(this.eAutocompleteInput.getValue())}updateLastPosition(){var e;this.lastPosition=null!=(e=this.eAutocompleteInput.getInputElement().selectionStart)?e:0}validate(t){var i;this.validator&&(this.validationMessage=this.validator(t),this.eAutocompleteInput.getInputElement().setCustomValidity(null!=(i=this.validationMessage)?i:""),this.valid=!this.validationMessage,this.dispatchEvent({type:e.EVENT_VALID_CHANGED,isValid:this.valid,validationMessage:this.validationMessage}))}openList(){this.isListOpen=!0,this.autocompleteList=this.createBean(new yc({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.gos.get("enableRtl")?"right":"left",keepWithinBounds:!0},i=this.popupService.addPopup({eChild:e,anchorToElement:this.getGui(),positionCallback:()=>this.popupService.positionPopupByComponent(t),ariaLabel:this.listAriaLabel});this.hidePopup=i.hideFunc,this.autocompleteList.afterGuiAttached()}closeList(){this.isListOpen=!1,this.hidePopup(),this.destroyBean(this.autocompleteList),this.autocompleteList=null}onCompleted(){this.isListOpen&&this.closeList(),this.dispatchEvent({type:e.EVENT_VALUE_CONFIRMED,value:this.getValue(),isValid:this.isValid()})}getValue(){return b(this.eAutocompleteInput.getValue())}setInputPlaceholder(e){return this.eAutocompleteInput.setInputPlaceholder(e),this}setInputAriaLabel(e){return this.eAutocompleteInput.setInputAriaLabel(e),this}setListAriaLabel(e){return this.listAriaLabel=e,this}setListGenerator(e){return this.listGenerator=e,this}setValidator(e){return this.validator=e,this}isValid(){return this.valid}setValue(e){const{value:t,position:i,silent:n,updateListOnlyIfOpen:s,restoreFocus:r}=e;this.eAutocompleteInput.setValue(t,!0),this.setCaret(null!=i?i:this.lastPosition,r),n||this.updateValue(t),s&&!this.isListOpen||this.updateAutocompleteList(t)}setForceLastSelection(e){return this.forceLastSelection=e,this}setInputDisabled(e){return this.eAutocompleteInput.setDisabled(e),this}};Cc.EVENT_VALUE_CHANGED="eventValueChanged",Cc.EVENT_VALUE_CONFIRMED="eventValueConfirmed",Cc.EVENT_OPTION_SELECTED="eventOptionSelected",Cc.EVENT_VALID_CHANGED="eventValidChanged",m([pe("popupService")],Cc.prototype,"popupService",2),m([Es("eAutocompleteInput")],Cc.prototype,"eAutocompleteInput",2),m([he],Cc.prototype,"postConstruct",1);var bc=Cc,Sc=class e extends ws{constructor(e,t,i,n){super(),this.dragSourceDropTarget=e,this.ghost=t,this.horizontal=i,this.template=n}init(){var t;this.setTemplate(null!=(t=this.template)?t:e.TEMPLATE);const i=this.getGui();this.addElementClasses(i),this.addElementClasses(this.eDragHandle,"drag-handle"),this.addElementClasses(this.eText,"text"),this.addElementClasses(this.eButton,"button"),this.eDragHandle.appendChild(Zn("columnDrag",this.gos)),this.eButton.appendChild(Zn("cancel",this.gos)),this.setupComponents(),!this.ghost&&this.isDraggable()&&this.addDragSource(),this.setupAria(),this.setupTooltip(),this.activateTabIndex(),this.refreshDraggable()}isDraggable(){return!0}refreshDraggable(){this.eDragHandle.classList.toggle("ag-column-select-column-readonly",!this.isDraggable())}setupAria(){const e=this.localeService.getLocaleTextFunc(),t=[this.getAriaDisplayName()];this.addAdditionalAriaInstructions(t,e),Yt(this.getGui(),t.join(". "))}addAdditionalAriaInstructions(e,t){if(this.isRemovable()){const i=t("ariaDropZoneColumnComponentDescription","Press DELETE to remove");e.push(i)}}setupTooltip(){const e=()=>{const e=this.getTooltip();this.setTooltip({newTooltipText:e})};e(),this.addManagedListener(this.eventService,dt.EVENT_NEW_COLUMNS_LOADED,e)}getDragSourceId(){}getDefaultIconName(){return Hr.ICON_NOT_ALLOWED}addDragSource(){const{dragAndDropService:e,eDragHandle:t}=this,i=this.createGetDragItem(),n=this.getDefaultIconName(),s={type:this.getDragSourceType(),sourceId:this.getDragSourceId(),eElement:t,getDefaultIconName:()=>n,getDragItem:i,dragItemName:this.getDisplayName()};e.addDragSource(s,!0),this.addDestroyFunc(()=>e.removeDragSource(s))}setupComponents(){this.setTextValue(),this.setupRemove(),this.ghost&&this.addCssClass("ag-column-drop-cell-ghost")}isRemovable(){return!0}refreshRemove(){cn(this.eButton,this.isRemovable())}setupRemove(){this.refreshRemove();const t={type:e.EVENT_COLUMN_REMOVE};this.addGuiEventListener("keydown",e=>this.onKeyDown(e)),this.addManagedListener(this.eButton,"click",e=>{this.dispatchEvent(t),e.stopPropagation()});const i=new Cr(this.eButton);this.addManagedListener(i,Cr.EVENT_TAP,()=>{this.dispatchEvent(t)}),this.addDestroyFunc(i.destroy.bind(i))}onKeyDown(t){t.key===Jn.DELETE&&this.isRemovable()&&(t.preventDefault(),this.dispatchEvent({type:e.EVENT_COLUMN_REMOVE}))}getDisplayValue(){return this.getDisplayName()}setTextValue(){const e=St(this.getDisplayValue());this.eText.innerHTML=e}addElementClasses(e,t){t=t?`-${t}`:"";const i=this.horizontal?"horizontal":"vertical";e.classList.add(`ag-column-drop-cell${t}`,`ag-column-drop-${i}-cell${t}`)}destroy(){super.destroy(),this.dragSourceDropTarget=null}};Sc.EVENT_COLUMN_REMOVE="columnRemove",Sc.TEMPLATE='<span role="option">\n          <span ref="eDragHandle" class="ag-drag-handle ag-column-drop-cell-drag-handle" role="presentation"></span>\n          <span ref="eText" class="ag-column-drop-cell-text" aria-hidden="true"></span>\n          <span ref="eButton" class="ag-column-drop-cell-button" role="presentation"></span>\n        </span>',m([pe("dragAndDropService")],Sc.prototype,"dragAndDropService",2),m([Es("eText")],Sc.prototype,"eText",2),m([Es("eDragHandle")],Sc.prototype,"eDragHandle",2),m([Es("eButton")],Sc.prototype,"eButton",2),m([he],Sc.prototype,"init",1);var wc=Sc,xc=class e extends ws{constructor(t){super('<div class="ag-unselectable" role="presentation"></div>'),this.horizontal=t,this.state=e.STATE_NOT_DRAGGING,this.guiDestroyFunctions=[],this.childPillComponents=[],this.resizeEnabled=!1,this.addElementClasses(this.getGui()),this.ePillDropList=document.createElement("div"),this.addElementClasses(this.ePillDropList,"list"),Ut(this.ePillDropList,"listbox")}isHorizontal(){return this.horizontal}toggleResizable(e){this.positionableFeature.setResizable(!!e&&{bottom:!0}),this.resizeEnabled=e}isSourceEventFromTarget(e){const{dropZoneTarget:t,dragSource:i}=e;return t.contains(i.eElement)}destroy(){this.destroyGui(),super.destroy()}destroyGui(){this.guiDestroyFunctions.forEach(e=>e()),this.guiDestroyFunctions.length=0,this.childPillComponents.length=0,wn(this.getGui()),wn(this.ePillDropList)}init(e){this.params=null!=e?e:{},this.createManagedBean(new Ls(this.getFocusableElement(),{handleKeyDown:this.handleKeyDown.bind(this)})),this.setupDropTarget(),this.positionableFeature=new Ns(this.getGui(),{minHeight:100}),this.createManagedBean(this.positionableFeature),this.refreshGui(),Yt(this.ePillDropList,this.getAriaLabel())}handleKeyDown(e){const t=!this.horizontal;let i=e.key===Jn.DOWN,n=e.key===Jn.UP;if(!t){const t=this.gos.get("enableRtl");i=!t&&e.key===Jn.RIGHT||t&&e.key===Jn.LEFT,n=!t&&e.key===Jn.LEFT||t&&e.key===Jn.RIGHT}if(!i&&!n)return;const s=this.focusService.findNextFocusableElement(this.getFocusableElement(),!1,n);s&&(e.preventDefault(),s.focus())}addElementClasses(e,t){t=t?`-${t}`:"";const i=this.horizontal?"horizontal":"vertical";e.classList.add(`ag-column-drop${t}`,`ag-column-drop-${i}${t}`)}setupDropTarget(){this.dropTarget={getContainer:this.getGui.bind(this),getIconName:this.getIconName.bind(this),onDragging:this.onDragging.bind(this),onDragEnter:this.onDragEnter.bind(this),onDragLeave:this.onDragLeave.bind(this),onDragStop:this.onDragStop.bind(this),isInterestedIn:this.isInterestedIn.bind(this)},this.dragAndDropService.addDropTarget(this.dropTarget)}minimumAllowedNewInsertIndex(){return 0}checkInsertIndex(e){const t=this.getNewInsertIndex(e);if(t<0)return!1;const i=this.minimumAllowedNewInsertIndex(),n=Math.max(i,t),s=n!==this.insertIndex;return s&&(this.insertIndex=n),s}getNewInsertIndex(e){const t=e.event,i=this.horizontal?t.clientX:t.clientY,n=this.childPillComponents.map(e=>e.getGui().getBoundingClientRect()),s=n.findIndex(e=>this.horizontal?e.right>i&&e.left<i:e.top<i&&e.bottom>i);if(-1===s){const e=this.gos.get("enableRtl");return n.every(e=>i>(this.horizontal?e.right:e.bottom))?e&&this.horizontal?0:this.childPillComponents.length:n.every(e=>i<(this.horizontal?e.left:e.top))?e&&this.horizontal?this.childPillComponents.length:0:this.insertIndex}return this.insertIndex<=s?s+1:s}checkDragStartedBySelf(t){this.state===e.STATE_NOT_DRAGGING&&(this.state=e.STATE_REARRANGE_ITEMS,this.potentialDndItems=this.getItems(t.dragSource.getDragItem()),this.refreshGui(),this.checkInsertIndex(t),this.refreshGui())}onDragging(e){this.checkDragStartedBySelf(e),this.checkInsertIndex(e)&&this.refreshGui()}handleDragEnterEnd(e){}onDragEnter(t){const i=this.getItems(t.dragSource.getDragItem());this.state=e.STATE_NEW_ITEMS_IN;const n=i.filter(e=>this.isItemDroppable(e,t)),s=n.every(e=>-1!==this.childPillComponents.map(e=>e.getItem()).indexOf(e));0!==n.length&&(this.potentialDndItems=n,s?this.state=e.STATE_NOT_DRAGGING:(this.handleDragEnterEnd(t),this.checkInsertIndex(t),this.refreshGui()))}isPotentialDndItems(){return Re(this.potentialDndItems)}handleDragLeaveEnd(e){}onDragLeave(t){if(this.state===e.STATE_REARRANGE_ITEMS){const e=this.getItems(t.dragSource.getDragItem());this.removeItems(e)}this.isPotentialDndItems()&&(this.handleDragLeaveEnd(t),this.potentialDndItems=[],this.refreshGui()),this.state=e.STATE_NOT_DRAGGING}refreshOnDragStop(){return!0}onDragStop(){if(this.isPotentialDndItems()){let t=!1;this.state===e.STATE_NEW_ITEMS_IN?(this.addItems(this.potentialDndItems),t=!0):t=this.rearrangeItems(this.potentialDndItems),this.potentialDndItems=[],!this.refreshOnDragStop()&&t||this.refreshGui()}this.state=e.STATE_NOT_DRAGGING}removeItems(e){const t=this.getExistingItems().filter(t=>!Ue(e,t));this.updateItems(t)}addItems(e){if(!e)return;const t=this.getExistingItems().slice(),i=e.filter(e=>t.indexOf(e)<0);He(t,i,this.insertIndex),this.updateItems(t)}addItem(e){this.insertIndex=this.getExistingItems().length,this.addItems([e]),this.refreshGui()}rearrangeItems(e){const t=this.getNonGhostItems().slice();return He(t,e,this.insertIndex),!ke(t,this.getExistingItems())&&(this.updateItems(t),!0)}refreshGui(){const e=this.ePillDropList.scrollTop,t=this.resizeEnabled,i=this.getFocusedItem();let n=this.focusService.findNextFocusableElement();n||(n=this.focusService.findNextFocusableElement(void 0,!1,!0)),this.toggleResizable(!1),this.destroyGui(),this.addIconAndTitleToGui(),this.addEmptyMessageToGui(),this.addItemsToGui(),this.isHorizontal()||(this.ePillDropList.scrollTop=e),t&&this.toggleResizable(t),this.focusService.isKeyboardMode()&&this.restoreFocus(i,n)}getFocusedItem(){const e=this.getGui(),t=this.gos.getActiveDomElement();return e.contains(t)?Array.from(e.querySelectorAll(".ag-column-drop-cell")).indexOf(t):-1}restoreFocus(e,t){const i=this.getGui(),n=Array.from(i.querySelectorAll(".ag-column-drop-cell"));if(-1===e)return;0===n.length&&t.focus();const s=n[Math.min(n.length-1,e)];s&&s.focus()}focusList(e){const t=e?this.childPillComponents.length-1:0;this.restoreFocus(t,this.getFocusableElement())}getNonGhostItems(){const e=this.getExistingItems();return this.isPotentialDndItems()?e.filter(e=>!Ue(this.potentialDndItems,e)):e}addItemsToGui(){const e=this.getNonGhostItems().map(e=>this.createItemComponent(e,!1));if(this.isPotentialDndItems()){const t=this.potentialDndItems.map(e=>this.createItemComponent(e,!0));this.insertIndex>=e.length?e.push(...t):e.splice(this.insertIndex,0,...t)}this.appendChild(this.ePillDropList),e.forEach((e,t)=>{t>0&&this.addArrow(this.ePillDropList),this.ePillDropList.appendChild(e.getGui())}),this.addAriaLabelsToComponents()}addAriaLabelsToComponents(){this.childPillComponents.forEach((e,t)=>{const i=e.getGui();ai(i,t+1),oi(i,this.childPillComponents.length)})}createItemComponent(e,t){const i=this.createPillComponent(e,this.dropTarget,t,this.horizontal);return i.addEventListener(wc.EVENT_COLUMN_REMOVE,this.removeItems.bind(this,[e])),this.context.createBean(i),this.guiDestroyFunctions.push(()=>this.destroyBean(i)),t||this.childPillComponents.push(i),i}addIconAndTitleToGui(){const{title:e,icon:t}=this.params;if(!e||!t)return;const i=document.createElement("div");if(ii(i,!0),this.addElementClasses(i,"title-bar"),this.addElementClasses(t,"icon"),this.addOrRemoveCssClass("ag-column-drop-empty",this.isExistingItemsEmpty()),i.appendChild(t),!this.horizontal){const t=document.createElement("span");this.addElementClasses(t,"title"),t.innerHTML=e,i.appendChild(t)}this.appendChild(i)}isExistingItemsEmpty(){return 0===this.getExistingItems().length}addEmptyMessageToGui(){const{emptyMessage:e}=this.params;if(!e||!this.isExistingItemsEmpty()||this.isPotentialDndItems())return;const t=document.createElement("span");t.innerHTML=e,this.addElementClasses(t,"empty-message"),this.ePillDropList.appendChild(t)}addArrow(e){if(this.horizontal){const t=Zn(this.gos.get("enableRtl")?"smallLeft":"smallRight",this.gos);this.addElementClasses(t,"cell-separator"),e.appendChild(t)}}};xc.STATE_NOT_DRAGGING="notDragging",xc.STATE_NEW_ITEMS_IN="newItemsIn",xc.STATE_REARRANGE_ITEMS="rearrangeItems",m([pe("focusService")],xc.prototype,"focusService",2),m([pe("dragAndDropService")],xc.prototype,"dragAndDropService",2);var Ec=xc,Mc=["touchstart","touchend","touchmove","touchcancel"],Ac=class{constructor(e="javascript"){this.frameworkName=e,this.renderingEngine="vanilla",this.wrapIncoming=e=>e(),this.wrapOutgoing=e=>e()}setInterval(e,t){return new gs(i=>{i(window.setInterval(e,t))})}addEventListener(e,t,i,n){const s=Ue(Mc,t);e.addEventListener(t,i,{capture:!!n,passive:s})}get shouldWrapOutgoing(){return!1}frameworkComponent(e){return null}isFrameworkComponent(e){return!1}getDocLink(e){return`https://www.ag-grid.com/${"solid"===this.frameworkName?"react":this.frameworkName}-data-grid${e?`/${e}`:""}`}},Tc=class extends ot{getNextCellToFocus(e,t,i=!1){return i?this.getNextCellToFocusWithCtrlPressed(e,t):this.getNextCellToFocusWithoutCtrlPressed(e,t)}getNextCellToFocusWithCtrlPressed(e,t){const i=e===Jn.UP,n=e===Jn.DOWN,s=e===Jn.LEFT;let r,o;if(i||n)o=i?this.paginationProxy.getPageFirstRow():this.paginationProxy.getPageLastRow(),r=t.column;else{const e=this.columnModel.getAllDisplayedColumns(),i=this.gos.get("enableRtl");o=t.rowIndex,r=s!==i?e[0]:Le(e)}return{rowIndex:o,rowPinned:null,column:r}}getNextCellToFocusWithoutCtrlPressed(e,t){let i=t,n=!1;for(;!n;){switch(e){case Jn.UP:i=this.getCellAbove(i);break;case Jn.DOWN:i=this.getCellBelow(i);break;case Jn.RIGHT:i=this.gos.get("enableRtl")?this.getCellToLeft(i):this.getCellToRight(i);break;case Jn.LEFT:i=this.gos.get("enableRtl")?this.getCellToRight(i):this.getCellToLeft(i);break;default:i=null,console.warn("AG Grid: unknown key for navigation "+e)}n=!i||this.isCellGoodToFocusOn(i)}return i}isCellGoodToFocusOn(e){const t=e.column;let i;switch(e.rowPinned){case"top":i=this.pinnedRowModel.getPinnedTopRow(e.rowIndex);break;case"bottom":i=this.pinnedRowModel.getPinnedBottomRow(e.rowIndex);break;default:i=this.rowModel.getRow(e.rowIndex)}return!!i&&!t.isSuppressNavigable(i)}getCellToLeft(e){if(!e)return null;const t=this.columnModel.getDisplayedColBefore(e.column);return t?{rowIndex:e.rowIndex,column:t,rowPinned:e.rowPinned}:null}getCellToRight(e){if(!e)return null;const t=this.columnModel.getDisplayedColAfter(e.column);return t?{rowIndex:e.rowIndex,column:t,rowPinned:e.rowPinned}:null}getRowBelow(e){const t=e.rowIndex,i=e.rowPinned;if(this.isLastRowInContainer(e))switch(i){case"bottom":return null;case"top":return this.rowModel.isRowsToRender()?{rowIndex:this.paginationProxy.getPageFirstRow(),rowPinned:null}:this.pinnedRowModel.isRowsToRender("bottom")?{rowIndex:0,rowPinned:"bottom"}:null;default:return this.pinnedRowModel.isRowsToRender("bottom")?{rowIndex:0,rowPinned:"bottom"}:null}const n=this.rowModel.getRow(e.rowIndex);return this.getNextStickyPosition(n)||{rowIndex:t+1,rowPinned:i}}getNextStickyPosition(e,t){if(!this.gos.isGroupRowsSticky()||!e||!e.sticky)return;let i=[];i=this.rowRenderer.getStickyTopRowCtrls().some(t=>t.getRowNode().rowIndex===e.rowIndex)?[...this.rowRenderer.getStickyTopRowCtrls()].sort((e,t)=>e.getRowNode().rowIndex-t.getRowNode().rowIndex):[...this.rowRenderer.getStickyBottomRowCtrls()].sort((e,t)=>t.getRowNode().rowIndex-e.getRowNode().rowIndex);const n=t?-1:1,s=i.findIndex(t=>t.getRowNode().rowIndex===e.rowIndex),r=i[s+n];return r?{rowIndex:r.getRowNode().rowIndex,rowPinned:null}:void 0}getCellBelow(e){if(!e)return null;const t=this.getRowBelow(e);return t?{rowIndex:t.rowIndex,column:e.column,rowPinned:t.rowPinned}:null}isLastRowInContainer(e){const t=e.rowPinned,i=e.rowIndex;return"top"===t?this.pinnedRowModel.getPinnedTopRowData().length-1<=i:"bottom"===t?this.pinnedRowModel.getPinnedBottomRowData().length-1<=i:this.paginationProxy.getPageLastRow()<=i}getRowAbove(e){const t=e.rowIndex,i=e.rowPinned;if(i?0===t:t===this.paginationProxy.getPageFirstRow())return"top"===i?null:i&&this.rowModel.isRowsToRender()?this.getLastBodyCell():this.pinnedRowModel.isRowsToRender("top")?this.getLastFloatingTopRow():null;const n=this.rowModel.getRow(e.rowIndex);return this.getNextStickyPosition(n,!0)||{rowIndex:t-1,rowPinned:i}}getCellAbove(e){if(!e)return null;const t=this.getRowAbove({rowIndex:e.rowIndex,rowPinned:e.rowPinned});return t?{rowIndex:t.rowIndex,column:e.column,rowPinned:t.rowPinned}:null}getLastBodyCell(){return{rowIndex:this.paginationProxy.getPageLastRow(),rowPinned:null}}getLastFloatingTopRow(){return{rowIndex:this.pinnedRowModel.getPinnedTopRowData().length-1,rowPinned:"top"}}getNextTabbedCell(e,t){return t?this.getNextTabbedCellBackwards(e):this.getNextTabbedCellForwards(e)}getNextTabbedCellForwards(e){const t=this.columnModel.getAllDisplayedColumns();let i=e.rowIndex,n=e.rowPinned,s=this.columnModel.getDisplayedColAfter(e.column);if(!s){s=t[0];const r=this.getRowBelow(e);if(w(r))return null;if(!r.rowPinned&&!this.paginationProxy.isRowInPage(r))return null;i=r?r.rowIndex:null,n=r?r.rowPinned:null}return{rowIndex:i,column:s,rowPinned:n}}getNextTabbedCellBackwards(e){const t=this.columnModel.getAllDisplayedColumns();let i=e.rowIndex,n=e.rowPinned,s=this.columnModel.getDisplayedColBefore(e.column);if(!s){s=Le(t);const r=this.getRowAbove({rowIndex:e.rowIndex,rowPinned:e.rowPinned});if(w(r))return null;if(!r.rowPinned&&!this.paginationProxy.isRowInPage(r))return null;i=r?r.rowIndex:null,n=r?r.rowPinned:null}return{rowIndex:i,column:s,rowPinned:n}}};m([pe("columnModel")],Tc.prototype,"columnModel",2),m([pe("rowModel")],Tc.prototype,"rowModel",2),m([pe("rowRenderer")],Tc.prototype,"rowRenderer",2),m([pe("pinnedRowModel")],Tc.prototype,"pinnedRowModel",2),m([pe("paginationProxy")],Tc.prototype,"paginationProxy",2),Tc=m([ue("cellNavigationService")],Tc);var Dc=class extends ot{constructor(){super(...arguments),this.consuming=!1}setBeans(e){this.logger=e.create("AlignedGridsService")}getAlignedGridApis(){var e;let t=null!=(e=this.gos.get("alignedGrids"))?e:[];const i="function"==typeof t;"function"==typeof t&&(t=t());const n=()=>`See ${this.getFrameworkOverrides().getDocLink("aligned-grids")}`;return t.map(e=>{var t;if(!e)return K("alignedGrids contains an undefined option."),i||K('You may want to configure via a callback to avoid setup race conditions:\n                     "alignedGrids: () => [linkedGrid]"'),void K(n());if(e instanceof jo)return e;const s=e;return"current"in s?null==(t=s.current)?void 0:t.api:(s.api||K(`alignedGrids - No api found on the linked grid. If you are passing gridOptions to alignedGrids since v31 this is no longer valid. ${n()}`),s.api)}).filter(e=>!!e&&!e.isDestroyed())}init(){this.addManagedListener(this.eventService,dt.EVENT_COLUMN_MOVED,this.fireColumnEvent.bind(this)),this.addManagedListener(this.eventService,dt.EVENT_COLUMN_VISIBLE,this.fireColumnEvent.bind(this)),this.addManagedListener(this.eventService,dt.EVENT_COLUMN_PINNED,this.fireColumnEvent.bind(this)),this.addManagedListener(this.eventService,dt.EVENT_COLUMN_GROUP_OPENED,this.fireColumnEvent.bind(this)),this.addManagedListener(this.eventService,dt.EVENT_COLUMN_RESIZED,this.fireColumnEvent.bind(this)),this.addManagedListener(this.eventService,dt.EVENT_BODY_SCROLL,this.fireScrollEvent.bind(this))}fireEvent(e){this.consuming||this.getAlignedGridApis().forEach(t=>{if(t.isDestroyed())return;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){"horizontal"===e.direction&&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(e=>{t.push(e)}):e.column&&t.push(e.column),t}getColumnIds(e){const t=[];return e.columns?e.columns.forEach(e=>{t.push(e.getColId())}):e.column&&t.push(e.column.getColId()),t}onColumnEvent(e){this.onEvent(()=>{switch(e.type){case dt.EVENT_COLUMN_MOVED:case dt.EVENT_COLUMN_VISIBLE:case dt.EVENT_COLUMN_PINNED:case dt.EVENT_COLUMN_RESIZED:const t=e;this.processColumnEvent(t);break;case dt.EVENT_COLUMN_GROUP_OPENED:const i=e;this.processGroupOpenedEvent(i);break;case dt.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.")}})}processGroupOpenedEvent(e){e.columnGroups.forEach(t=>{let i=null;if(t){const e=t.getGroupId();i=this.columnModel.getProvidedColumnGroup(e)}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 s=this.getMasterColumns(e);switch(e.type){case dt.EVENT_COLUMN_MOVED:{const t=e,i=e.api.getColumnState().map(e=>({colId:e.colId}));this.columnModel.applyColumnState({state:i,applyOrder:!0},"alignedGridChanged"),this.logger.log(`onColumnEvent-> processing ${e.type} toIndex = ${t.toIndex}`)}break;case dt.EVENT_COLUMN_VISIBLE:{const t=e,i=e.api.getColumnState().map(e=>({colId:e.colId,hide:e.hide}));this.columnModel.applyColumnState({state:i},"alignedGridChanged"),this.logger.log(`onColumnEvent-> processing ${e.type} visible = ${t.visible}`)}break;case dt.EVENT_COLUMN_PINNED:{const t=e,i=e.api.getColumnState().map(e=>({colId:e.colId,pinned:e.pinned}));this.columnModel.applyColumnState({state:i},"alignedGridChanged"),this.logger.log(`onColumnEvent-> processing ${e.type} pinned = ${t.pinned}`)}break;case dt.EVENT_COLUMN_RESIZED:const i=e,n={};s.forEach(t=>{this.logger.log(`onColumnEvent-> processing ${e.type} actualWidth = ${t.getActualWidth()}`),n[t.getId()]={key:t.getColId(),newWidth:t.getActualWidth()}}),null==(t=i.flexColumns)||t.forEach(e=>{n[e.getId()]&&delete n[e.getId()]}),this.columnModel.setColumnWidths(Object.values(n),!1,i.finished,"alignedGridChanged")}const r=this.ctrlsService.getGridBodyCtrl().isVerticalScrollShowing();this.getAlignedGridApis().forEach(e=>{e.setGridOption("alwaysShowVerticalScroll",r)})}};m([pe("columnModel")],Dc.prototype,"columnModel",2),m([pe("ctrlsService")],Dc.prototype,"ctrlsService",2),m([v(0,me("loggerFactory"))],Dc.prototype,"setBeans",1),m([he],Dc.prototype,"init",1),Dc=m([ue("alignedGridsService")],Dc);var Ic=class extends ot{constructor(){super(...arguments),this.selectedNodes=new Map,this.lastRowNode=null}init(){this.rowSelection=this.gos.get("rowSelection"),this.groupSelectsChildren=this.gos.get("groupSelectsChildren"),this.addManagedPropertyListeners(["groupSelectsChildren","rowSelection"],()=>{this.groupSelectsChildren=this.gos.get("groupSelectsChildren"),this.rowSelection=this.gos.get("rowSelection"),this.deselectAllRowNodes({source:"api"})}),this.addManagedListener(this.eventService,dt.EVENT_ROW_SELECTED,this.onRowSelected.bind(this))}destroy(){super.destroy(),this.resetNodes(),this.lastRowNode=null}isMultiselect(){return"multiple"===this.rowSelection}setNodesSelected(e){var t;const{newValue:i,clearSelection:n,suppressFinishActions:s,rangeSelect:r,nodes:o,event:a,source:l="api"}=e;if(0===o.length)return 0;if(o.length>1&&!this.isMultiselect())return console.warn("AG Grid: cannot multi select while rowSelection='single'"),0;const c=this.groupSelectsChildren&&!0===e.groupSelectsFiltered,h=o.map(e=>e.footer?e.sibling:e);if(r){if(o.length>1)return console.warn("AG Grid: cannot range select while selecting multiple rows"),0;let e=null;if("checkboxSelected"===l&&!1===i&&this.lastRowNode&&(this.lastRowNode.id?e=this.lastRowNode:this.lastRowNode=null),null==e&&(e=this.getLastSelectedNode()),e){const t=h[0];if(t!==e&&this.isMultiselect())return this.selectRange(t,e,i,l)}}this.lastRowNode=i?null:h[0];let d=0;for(let e=0;e<h.length;e++){const n=h[e];c&&n.group||n.selectThisNode(i,a,l)&&d++,this.groupSelectsChildren&&(null==(t=n.childrenAfterGroup)?void 0:t.length)&&(d+=this.selectChildren(n,i,c,l))}if(!s&&(i&&(n||!this.isMultiselect())&&(d+=this.clearOtherNodes(h[0],l)),d>0)){this.updateGroupsFromChildrenSelections(l);const e={type:dt.EVENT_SELECTION_CHANGED,source:l};this.eventService.dispatchEvent(e)}return d}selectRange(e,t,i=!0,n){const s=this.rowModel.getNodesInRangeForSelection(e,t);let r=0;s.forEach(e=>{e.group&&this.groupSelectsChildren||e.selectThisNode(i,void 0,n)&&r++}),this.updateGroupsFromChildrenSelections(n);const o={type:dt.EVENT_SELECTION_CHANGED,source:n};return this.eventService.dispatchEvent(o),r}selectChildren(e,t,i,n){const s=i?e.childrenAfterAggFilter:e.childrenAfterGroup;return w(s)?0:this.setNodesSelected({newValue:t,clearSelection:!1,suppressFinishActions:!0,groupSelectsFiltered:i,source:n,nodes:s})}getLastSelectedNode(){const e=Array.from(this.selectedNodes.keys());if(0==e.length)return null;return this.selectedNodes.get(Le(e))||null}getSelectedNodes(){const e=[];return this.selectedNodes.forEach(t=>{t&&e.push(t)}),e}getSelectedRows(){const e=[];return this.selectedNodes.forEach(t=>{t&&t.data&&e.push(t.data)}),e}getSelectionCount(){return this.selectedNodes.size}filterFromSelection(e){const t=new Map;this.selectedNodes.forEach((i,n)=>{i&&e(i)&&t.set(n,i)}),this.selectedNodes=t}updateGroupsFromChildrenSelections(e,t){if(!this.groupSelectsChildren)return!1;if("clientSide"!==this.rowModel.getType())return!1;const i=this.rowModel.getRootNode();t||(t=new Bl(!0,i)).setInactive();let n=!1;return t.forEachChangedNodeDepthFirst(t=>{if(t!==i){const i=t.calculateSelectedFromChildren();n=t.selectThisNode(null!==i&&i,void 0,e)||n}}),n}clearOtherNodes(e,t){const i=new Map;let n=0;return this.selectedNodes.forEach(s=>{if(s&&s.id!==e.id){const e=this.selectedNodes.get(s.id);n+=e.setSelectedParams({newValue:!1,clearSelection:!1,suppressFinishActions:!0,source:t}),this.groupSelectsChildren&&s.parent&&i.set(s.parent.id,s.parent)}}),i.forEach(e=>{const i=e.calculateSelectedFromChildren();e.selectThisNode(null!==i&&i,void 0,t)}),n}onRowSelected(e){const t=e.node;this.groupSelectsChildren&&t.group||(t.isSelected()?this.selectedNodes.set(t.id,t):this.selectedNodes.delete(t.id))}syncInRowNode(e,t){this.syncInOldRowNode(e,t),this.syncInNewRowNode(e)}syncInOldRowNode(e,t){if(S(t)&&e.id!==t.id&&t){const i=t.id;this.selectedNodes.get(i)==e&&this.selectedNodes.set(t.id,t)}}syncInNewRowNode(e){this.selectedNodes.has(e.id)?(e.setSelectedInitialValue(!0),this.selectedNodes.set(e.id,e)):e.setSelectedInitialValue(!1)}reset(e){const t=this.getSelectionCount();if(this.resetNodes(),t){const t={type:dt.EVENT_SELECTION_CHANGED,source:e};this.eventService.dispatchEvent(t)}}resetNodes(){var e;null==(e=this.selectedNodes)||e.clear()}getBestCostNodeSelection(){if("clientSide"!==this.rowModel.getType())return;const e=this.rowModel.getTopLevelNodes();if(null===e)return;const t=[];return function e(i){for(let n=0,s=i.length;n<s;n++){const s=i[n];if(s.isSelected())t.push(s);else{const t=s;t.group&&t.children&&e(t.children)}}}(e),t}isEmpty(){let e=0;return this.selectedNodes.forEach(t=>{t&&e++}),0===e}deselectAllRowNodes(e){const t=e=>e.selectThisNode(!1,void 0,n),i="clientSide"===this.rowModel.getType(),{source:n,justFiltered:s,justCurrentPage:r}=e;if(r||s){if(!i)return void console.error("AG Grid: selecting just filtered only works when gridOptions.rowModelType='clientSide'");this.getNodesToSelect(s,r).forEach(t)}else this.selectedNodes.forEach(e=>{e&&t(e)}),this.reset(n);i&&this.groupSelectsChildren&&this.updateGroupsFromChildrenSelections(n);const o={type:dt.EVENT_SELECTION_CHANGED,source:n};this.eventService.dispatchEvent(o)}getSelectedCounts(e,t){let i=0,n=0;return this.getNodesToSelect(e,t).forEach(e=>{this.groupSelectsChildren&&e.group||(e.isSelected()?i++:e.selectable&&n++)}),{selectedCount:i,notSelectedCount:n}}getSelectAllState(e,t){const{selectedCount:i,notSelectedCount:n}=this.getSelectedCounts(e,t);return(0!==i||0!==n)&&(i>0&&n>0?null:i>0)}hasNodesToSelect(e=!1,t=!1){return this.getNodesToSelect(e,t).filter(e=>e.selectable).length>0}getNodesToSelect(e=!1,t=!1){if("clientSide"!==this.rowModel.getType())throw new Error(`selectAll only available when rowModelType='clientSide', ie not ${this.rowModel.getType()}`);const i=[];if(t)return this.paginationProxy.forEachNodeOnPage(e=>{if(e.group){if(!e.expanded){const t=e=>{var n;i.push(e),(null==(n=e.childrenAfterFilter)?void 0:n.length)&&e.childrenAfterFilter.forEach(t)};return void t(e)}this.groupSelectsChildren||i.push(e)}else i.push(e)}),i;const n=this.rowModel;return e?(n.forEachNodeAfterFilter(e=>{i.push(e)}),i):(n.forEachNode(e=>{i.push(e)}),i)}selectAllRowNodes(e){if("clientSide"!==this.rowModel.getType())throw new Error(`selectAll only available when rowModelType='clientSide', ie not ${this.rowModel.getType()}`);const{source:t,justFiltered:i,justCurrentPage:n}=e;this.getNodesToSelect(i,n).forEach(e=>e.selectThisNode(!0,void 0,t)),"clientSide"===this.rowModel.getType()&&this.groupSelectsChildren&&this.updateGroupsFromChildrenSelections(t);const s={type:dt.EVENT_SELECTION_CHANGED,source:t};this.eventService.dispatchEvent(s)}getSelectionState(){const e=[];return this.selectedNodes.forEach(t=>{(null==t?void 0:t.id)&&e.push(t.id)}),e.length?e:null}setSelectionState(e,t){if(!Array.isArray(e))return;const i=new Set(e),n=[];this.rowModel.forEachNode(e=>{i.has(e.id)&&n.push(e)}),this.setNodesSelected({newValue:!0,nodes:n,source:t})}};m([pe("rowModel")],Ic.prototype,"rowModel",2),m([pe("paginationProxy")],Ic.prototype,"paginationProxy",2),m([he],Ic.prototype,"init",1),Ic=m([ue("selectionService")],Ic);var Rc=class{constructor(e){this.viaApi=(e,...t)=>(j(`Since v31, 'columnApi.${e}' is deprecated and moved to 'api.${e}'.`),this.api[e](...t)),this.api=e}sizeColumnsToFit(e){this.viaApi("sizeColumnsToFit",e)}setColumnGroupOpened(e,t){this.viaApi("setColumnGroupOpened",e,t)}getColumnGroup(e,t){return this.viaApi("getColumnGroup",e,t)}getProvidedColumnGroup(e){return this.viaApi("getProvidedColumnGroup",e)}getDisplayNameForColumn(e,t){return this.viaApi("getDisplayNameForColumn",e,t)}getDisplayNameForColumnGroup(e,t){return this.viaApi("getDisplayNameForColumnGroup",e,t)}getColumn(e){return this.viaApi("getColumn",e)}getColumns(){return this.viaApi("getColumns")}applyColumnState(e){return this.viaApi("applyColumnState",e)}getColumnState(){return this.viaApi("getColumnState")}resetColumnState(){this.viaApi("resetColumnState")}getColumnGroupState(){return this.viaApi("getColumnGroupState")}setColumnGroupState(e){this.viaApi("setColumnGroupState",e)}resetColumnGroupState(){this.viaApi("resetColumnGroupState")}isPinning(){return this.viaApi("isPinning")}isPinningLeft(){return this.viaApi("isPinningLeft")}isPinningRight(){return this.viaApi("isPinningRight")}getDisplayedColAfter(e){return this.viaApi("getDisplayedColAfter",e)}getDisplayedColBefore(e){return this.viaApi("getDisplayedColBefore",e)}setColumnVisible(e,t){this.viaApi("setColumnVisible",e,t)}setColumnsVisible(e,t){this.viaApi("setColumnsVisible",e,t)}setColumnPinned(e,t){this.viaApi("setColumnPinned",e,t)}setColumnsPinned(e,t){this.viaApi("setColumnsPinned",e,t)}getAllGridColumns(){return this.viaApi("getAllGridColumns")}getDisplayedLeftColumns(){return this.viaApi("getDisplayedLeftColumns")}getDisplayedCenterColumns(){return this.viaApi("getDisplayedCenterColumns")}getDisplayedRightColumns(){return this.viaApi("getDisplayedRightColumns")}getAllDisplayedColumns(){return this.viaApi("getAllDisplayedColumns")}getAllDisplayedVirtualColumns(){return this.viaApi("getAllDisplayedVirtualColumns")}moveColumn(e,t){this.viaApi("moveColumn",e,t)}moveColumnByIndex(e,t){this.viaApi("moveColumnByIndex",e,t)}moveColumns(e,t){this.viaApi("moveColumns",e,t)}moveRowGroupColumn(e,t){this.viaApi("moveRowGroupColumn",e,t)}setColumnAggFunc(e,t){this.viaApi("setColumnAggFunc",e,t)}setColumnWidth(e,t,i=!0,n){this.viaApi("setColumnWidth",e,t,i,n)}setColumnWidths(e,t=!0,i){this.viaApi("setColumnWidths",e,t,i)}setPivotMode(e){this.viaApi("setPivotMode",e)}isPivotMode(){return this.viaApi("isPivotMode")}getPivotResultColumn(e,t){return this.viaApi("getPivotResultColumn",e,t)}setValueColumns(e){this.viaApi("setValueColumns",e)}getValueColumns(){return this.viaApi("getValueColumns")}removeValueColumn(e){this.viaApi("removeValueColumn",e)}removeValueColumns(e){this.viaApi("removeValueColumns",e)}addValueColumn(e){this.viaApi("addValueColumn",e)}addValueColumns(e){this.viaApi("addValueColumns",e)}setRowGroupColumns(e){this.viaApi("setRowGroupColumns",e)}removeRowGroupColumn(e){this.viaApi("removeRowGroupColumn",e)}removeRowGroupColumns(e){this.viaApi("removeRowGroupColumns",e)}addRowGroupColumn(e){this.viaApi("addRowGroupColumn",e)}addRowGroupColumns(e){this.viaApi("addRowGroupColumns",e)}getRowGroupColumns(){return this.viaApi("getRowGroupColumns")}setPivotColumns(e){this.viaApi("setPivotColumns",e)}removePivotColumn(e){this.viaApi("removePivotColumn",e)}removePivotColumns(e){this.viaApi("removePivotColumns",e)}addPivotColumn(e){this.viaApi("addPivotColumn",e)}addPivotColumns(e){this.viaApi("addPivotColumns",e)}getPivotColumns(){return this.viaApi("getPivotColumns")}getLeftDisplayedColumnGroups(){return this.viaApi("getLeftDisplayedColumnGroups")}getCenterDisplayedColumnGroups(){return this.viaApi("getCenterDisplayedColumnGroups")}getRightDisplayedColumnGroups(){return this.viaApi("getRightDisplayedColumnGroups")}getAllDisplayedColumnGroups(){return this.viaApi("getAllDisplayedColumnGroups")}autoSizeColumn(e,t){return this.viaApi("autoSizeColumn",e,t)}autoSizeColumns(e,t){this.viaApi("autoSizeColumns",e,t)}autoSizeAllColumns(e){this.viaApi("autoSizeAllColumns",e)}setPivotResultColumns(e){this.viaApi("setPivotResultColumns",e)}getPivotResultColumns(){return this.viaApi("getPivotResultColumns")}};m([pe("gridApi")],Rc.prototype,"api",2),Rc=m([ue("columnApi")],Rc);var Lc=class extends ot{constructor(){super(...arguments),this.initialised=!1,this.isSsrm=!1}init(){this.isSsrm=this.gos.isRowModelType("serverSide"),this.cellExpressions=this.gos.get("enableCellExpressions"),this.isTreeData=this.gos.get("treeData"),this.initialised=!0;const e=e=>this.callColumnCellValueChangedHandler(e),t=this.gos.useAsyncEvents();this.eventService.addEventListener(dt.EVENT_CELL_VALUE_CHANGED,e,t),this.addDestroyFunc(()=>this.eventService.removeEventListener(dt.EVENT_CELL_VALUE_CHANGED,e,t)),this.addManagedPropertyListener("treeData",e=>this.isTreeData=e.currentValue)}getValue(e,t,i=!1,n=!1){if(this.initialised||this.init(),!t)return;const s=e.getColDef(),r=s.field,o=e.getColId(),a=t.data;let l;const c=t.groupData&&void 0!==t.groupData[o],h=!n&&t.aggData&&void 0!==t.aggData[o],d=this.isSsrm&&n&&!!e.getColDef().aggFunc,u=this.isSsrm&&t.footer&&t.field&&(!0===e.getColDef().showRowGroup||e.getColDef().showRowGroup===t.field);if(i&&s.filterValueGetter?l=this.executeFilterValueGetter(s.filterValueGetter,a,e,t):this.isTreeData&&h?l=t.aggData[o]:this.isTreeData&&s.valueGetter?l=this.executeValueGetter(s.valueGetter,a,e,t):this.isTreeData&&r&&a?l=V(a,r,e.isFieldContainsDots()):c?l=t.groupData[o]:h?l=t.aggData[o]:s.valueGetter?l=this.executeValueGetter(s.valueGetter,a,e,t):u?l=V(a,t.field,e.isFieldContainsDots()):r&&a&&!d&&(l=V(a,r,e.isFieldContainsDots())),this.cellExpressions&&"string"==typeof l&&0===l.indexOf("=")){const i=l.substring(1);l=this.executeValueGetter(i,a,e,t)}if(null==l){const i=this.getOpenedGroup(t,e);if(null!=i)return i}return l}parseValue(e,t,i,n){const s=e.getColDef(),r=this.gos.addGridCommonParams({node:t,data:null==t?void 0:t.data,oldValue:n,newValue:i,colDef:s,column:e}),o=s.valueParser;return S(o)?"function"==typeof o?o(r):this.expressionService.evaluate(o,r):i}formatValue(e,t,i,n,s=!0){let r,o=null;const a=e.getColDef();if(n?r=n:s&&(r=a.valueFormatter),r){const n=this.gos.addGridCommonParams({value:i,node:t,data:t?t.data:null,colDef:a,column:e});o="function"==typeof r?r(n):this.expressionService.evaluate(r,n)}else if(a.refData)return a.refData[i]||"";return null==o&&Array.isArray(i)&&(o=i.join(", ")),o}getOpenedGroup(e,t){if(!this.gos.get("showOpenedGroup"))return;if(!t.getColDef().showRowGroup)return;const i=t.getColDef().showRowGroup;let n=e.parent;for(;null!=n;){if(n.rowGroupColumn&&(!0===i||i===n.rowGroupColumn.getColId()))return n.key;n=n.parent}}setValue(e,t,i,n){const s=this.columnModel.getPrimaryColumn(t);if(!e||!s)return!1;w(e.data)&&(e.data={});const{field:r,valueSetter:o}=s.getColDef();if(w(r)&&w(o))return console.warn("AG Grid: you need either field or valueSetter set on colDef for editing to work"),!1;if(!this.dataTypeService.checkType(s,i))return console.warn("AG Grid: Data type of the new value does not match the cell data type of the column"),!1;const a=this.gos.addGridCommonParams({node:e,data:e.data,oldValue:this.getValue(s,e),newValue:i,colDef:s.getColDef(),column:s});let l;if(a.newValue=i,l=S(o)?"function"==typeof o?o(a):this.expressionService.evaluate(o,a):this.setValueUsingField(e.data,r,i,s.isFieldContainsDots()),void 0===l&&(l=!0),!l)return!1;e.resetQuickFilterAggregateText(),this.valueCache.onDataChanged(),a.newValue=this.getValue(s,e);const c={type:dt.EVENT_CELL_VALUE_CHANGED,event:null,rowIndex:e.rowIndex,rowPinned:e.rowPinned,column:a.column,api:a.api,columnApi:a.columnApi,colDef:a.colDef,context:a.context,data:e.data,node:e,oldValue:a.oldValue,newValue:a.newValue,value:a.newValue,source:n};return this.eventService.dispatchEvent(c),!0}callColumnCellValueChangedHandler(e){const t=e.colDef.onCellValueChanged;"function"==typeof t&&this.getFrameworkOverrides().wrapOutgoing(()=>{t({node:e.node,data:e.data,oldValue:e.oldValue,newValue:e.newValue,colDef:e.colDef,column:e.column,api:e.api,columnApi:e.columnApi,context:e.context})})}setValueUsingField(e,t,i,n){if(!t)return!1;let s=!1;if(n){const n=t.split(".");let r=e;for(;n.length>0&&r;){const e=n.shift();0===n.length?(s=r[e]===i,s||(r[e]=i)):r=r[e]}}else s=e[t]===i,s||(e[t]=i);return!s}executeFilterValueGetter(e,t,i,n){const s=this.gos.addGridCommonParams({data:t,node:n,column:i,colDef:i.getColDef(),getValue:this.getValueCallback.bind(this,n)});return"function"==typeof e?e(s):this.expressionService.evaluate(e,s)}executeValueGetter(e,t,i,n){const s=i.getColId(),r=this.valueCache.getValue(n,s);if(void 0!==r)return r;const o=this.gos.addGridCommonParams({data:t,node:n,column:i,colDef:i.getColDef(),getValue:this.getValueCallback.bind(this,n)});let a;return a="function"==typeof e?e(o):this.expressionService.evaluate(e,o),this.valueCache.setValue(n,s,a),a}getValueCallback(e,t){const i=this.columnModel.getPrimaryColumn(t);return i?this.getValue(i,e):null}getKeyForNode(e,t){const i=this.getValue(e,t),n=e.getColDef().keyCreator;let s=i;return n&&(s=n(this.gos.addGridCommonParams({value:i,colDef:e.getColDef(),column:e,node:t,data:t.data}))),"string"==typeof s||null==s||(s=String(s),"[object Object]"===s&&j("a column you are grouping or pivoting by has objects as values. If you want to group by complex objects then either a) use a colDef.keyCreator (se AG Grid docs) or b) to toString() on the object to return a key")),s}};m([pe("expressionService")],Lc.prototype,"expressionService",2),m([pe("columnModel")],Lc.prototype,"columnModel",2),m([pe("valueCache")],Lc.prototype,"valueCache",2),m([pe("dataTypeService")],Lc.prototype,"dataTypeService",2),m([he],Lc.prototype,"init",1),Lc=m([ue("valueService")],Lc);var kc=class extends ot{constructor(){super(...arguments),this.expressionToFunctionCache={}}setBeans(e){this.logger=e.create("ExpressionService")}evaluate(e,t){if("string"==typeof e)return this.evaluateExpression(e,t);console.error("AG Grid: value should be either a string or a function",e)}evaluateExpression(e,t){try{return this.createExpressionFunction(e)(t.value,t.context,t.oldValue,t.newValue,t.value,t.node,t.data,t.colDef,t.rowIndex,t.api,t.columnApi,t.getValue,t.column,t.columnGroup)}catch(i){return console.log("Processing of the expression failed"),console.log("Expression = "+e),console.log("Params =",t),console.log("Exception = "+i),null}}createExpressionFunction(e){if(this.expressionToFunctionCache[e])return this.expressionToFunctionCache[e];const t=this.createFunctionBody(e),i=new Function("x, ctx, oldValue, newValue, value, node, data, colDef, rowIndex, api, columnApi, getValue, column, columnGroup",t);return this.expressionToFunctionCache[e]=i,i}createFunctionBody(e){return e.indexOf("return")>=0?e:"return "+e+";"}};m([v(0,me("loggerFactory"))],kc.prototype,"setBeans",1),kc=m([ue("expressionService")],kc);var Pc=class extends ot{setBeans(e){this.logging=e.get("debug")}create(e){return new Nc(e,this.isLogging.bind(this))}isLogging(){return this.logging}};m([v(0,me("gridOptionsService"))],Pc.prototype,"setBeans",1),Pc=m([ue("loggerFactory")],Pc);var Nc=class{constructor(e,t){this.name=e,this.isLoggingFunc=t}isLogging(){return this.isLoggingFunc()}log(e){this.isLoggingFunc()&&console.log("AG Grid."+this.name+": "+e)}},Oc=class extends ot{setComp(e,t,i){this.view=e,this.eGridHostDiv=t,this.eGui=i,this.eGui.setAttribute("grid-id",this.context.getGridId()),this.dragAndDropService.addDropTarget({getContainer:()=>this.eGui,isInterestedIn:e=>1===e||0===e,getIconName:()=>Hr.ICON_NOT_ALLOWED}),this.mouseEventService.stampTopLevelGridCompWithGridInstance(t),this.createManagedBean(new Jo(this.view)),this.addRtlSupport();const n=this.resizeObserverService.observeResize(this.eGridHostDiv,this.onGridSizeChanged.bind(this));this.addDestroyFunc(()=>n()),this.ctrlsService.register("gridCtrl",this)}isDetailGrid(){var e;const t=this.focusService.findTabbableParent(this.getGui());return(null==(e=null==t?void 0:t.getAttribute("row-id"))?void 0:e.startsWith("detail"))||!1}showDropZones(){return ae.__isRegistered("@ag-grid-enterprise/row-grouping",this.context.getGridId())}showSideBar(){return ae.__isRegistered("@ag-grid-enterprise/side-bar",this.context.getGridId())}showStatusBar(){return ae.__isRegistered("@ag-grid-enterprise/status-bar",this.context.getGridId())}showWatermark(){return ae.__isRegistered("@ag-grid-enterprise/core",this.context.getGridId())}onGridSizeChanged(){const e={type:dt.EVENT_GRID_SIZE_CHANGED,clientWidth:this.eGridHostDiv.clientWidth,clientHeight:this.eGridHostDiv.clientHeight};this.eventService.dispatchEvent(e)}addRtlSupport(){const e=this.gos.get("enableRtl")?"ag-rtl":"ag-ltr";this.view.setRtlClass(e)}destroyGridUi(){this.view.destroyGridUi()}getGui(){return this.eGui}setResizeCursor(e){this.view.setCursor(e?"ew-resize":null)}disableUserSelect(e){this.view.setUserSelect(e?"none":null)}focusNextInnerContainer(e){const t=this.view.getFocusableContainers(),i=this.gos.getActiveDomElement(),n=t.findIndex(e=>e.contains(i))+(e?-1:1);return!(n<=0||n>=t.length)&&this.focusService.focusInto(t[n])}focusInnerElement(e){const t=this.view.getFocusableContainers(),i=this.columnModel.getAllDisplayedColumns();if(e){if(t.length>1)return this.focusService.focusInto(Le(t),!0);const e=Le(i);if(this.focusService.focusGridView(e,!0))return!0}if(0===this.gos.get("headerHeight")||this.gos.get("suppressHeaderFocus")){if(this.focusService.focusGridView(i[0]))return!0;for(let e=1;e<t.length;e++)if(this.focusService.focusInto(t[e]))return!0;return!1}return this.focusService.focusFirstHeader()}forceFocusOutOfContainer(e=!1){this.view.forceFocusOutOfContainer(e)}};m([pe("focusService")],Oc.prototype,"focusService",2),m([pe("resizeObserverService")],Oc.prototype,"resizeObserverService",2),m([pe("columnModel")],Oc.prototype,"columnModel",2),m([pe("ctrlsService")],Oc.prototype,"ctrlsService",2),m([pe("mouseEventService")],Oc.prototype,"mouseEventService",2),m([pe("dragAndDropService")],Oc.prototype,"dragAndDropService",2);var _c=class extends Al{constructor(e){super(),this.eGridDiv=e}postConstruct(){this.logger=this.loggerFactory.create("GridComp");const e={destroyGridUi:()=>this.destroyBean(this),setRtlClass:e=>this.addCssClass(e),forceFocusOutOfContainer:this.forceFocusOutOfContainer.bind(this),updateLayoutClasses:this.updateLayoutClasses.bind(this),getFocusableContainers:this.getFocusableContainers.bind(this),setUserSelect:e=>{this.getGui().style.userSelect=null!=e?e:"",this.getGui().style.webkitUserSelect=null!=e?e:""},setCursor:e=>{this.getGui().style.cursor=null!=e?e:""}};this.ctrl=this.createManagedBean(new Oc);const t=this.createTemplate();this.setTemplate(t),this.ctrl.setComp(e,this.eGridDiv,this.getGui()),this.insertGridIntoDom(),this.initialiseTabGuard({onTabKeyDown:()=>{},focusInnerElement:e=>this.ctrl.focusInnerElement(e),forceFocusOutWhenTabGuardsAreEmpty:!0})}insertGridIntoDom(){const e=this.getGui();this.eGridDiv.appendChild(e),this.addDestroyFunc(()=>{this.eGridDiv.removeChild(e),this.logger.log("Grid removed from DOM")})}updateLayoutClasses(e,t){const i=this.eRootWrapperBody.classList;i.toggle("ag-layout-auto-height",t.autoHeight),i.toggle("ag-layout-normal",t.normal),i.toggle("ag-layout-print",t.print),this.addOrRemoveCssClass("ag-layout-auto-height",t.autoHeight),this.addOrRemoveCssClass("ag-layout-normal",t.normal),this.addOrRemoveCssClass("ag-layout-print",t.print)}createTemplate(){return`<div class="ag-root-wrapper" role="presentation">\n                ${this.ctrl.showDropZones()?"<ag-grid-header-drop-zones></ag-grid-header-drop-zones>":""}\n                <div class="ag-root-wrapper-body" ref="rootWrapperBody" role="presentation">\n                    <ag-grid-body ref="gridBody"></ag-grid-body>\n                    ${this.ctrl.showSideBar()?'<ag-side-bar ref="sideBar"></ag-side-bar>':""}\n                </div>\n                ${this.ctrl.showStatusBar()?'<ag-status-bar ref="statusBar"></ag-status-bar>':""}\n                <ag-pagination></ag-pagination>\n                ${this.ctrl.showWatermark()?"<ag-watermark></ag-watermark>":""}\n            </div>`}getFocusableElement(){return this.eRootWrapperBody}getFocusableContainers(){const e=[this.gridBodyComp.getGui()];return this.sideBarComp&&e.push(this.sideBarComp.getGui()),e.filter(e=>Mn(e))}};m([pe("loggerFactory")],_c.prototype,"loggerFactory",2),m([Es("gridBody")],_c.prototype,"gridBodyComp",2),m([Es("sideBar")],_c.prototype,"sideBarComp",2),m([Es("rootWrapperBody")],_c.prototype,"eRootWrapperBody",2),m([he],_c.prototype,"postConstruct",1);var Fc=class extends ot{progressSort(e,t,i){const n=this.getNextSortDirection(e);this.setSortForColumn(e,n,t,i)}setSortForColumn(e,t,i,n){"asc"!==t&&"desc"!==t&&(t=null);let s=[e];if(this.gos.isColumnsSortingCoupledToGroup()&&e.getColDef().showRowGroup){const t=this.columnModel.getSourceColumnsForGroupColumn(e),i=null==t?void 0:t.filter(e=>e.isSortable());i&&(s=[e,...i])}s.forEach(e=>e.setSort(t,n));const r=[];if(!i&&!this.gos.get("alwaysMultiSort")||this.gos.get("suppressMultiSort")){const e=this.clearSortBarTheseColumns(s,n);r.push(...e)}this.updateSortIndex(e),r.push(...s),this.dispatchSortChangedEvents(n,r)}updateSortIndex(e){const t=this.gos.isColumnsSortingCoupledToGroup(),i=this.columnModel.getGroupDisplayColumnForGroup(e.getId()),n=t&&i||e,s=this.getColumnsWithSortingOrdered();this.columnModel.getPrimaryAndSecondaryAndAutoColumns().forEach(e=>e.setSortIndex(null));const r=s.filter(e=>!(t&&e.getColDef().showRowGroup||e===n));(n.getSort()?[...r,n]:r).forEach((e,t)=>{e.setSortIndex(t)})}onSortChanged(e,t){this.dispatchSortChangedEvents(e,t)}isSortActive(){const e=this.columnModel.getPrimaryAndSecondaryAndAutoColumns().filter(e=>!!e.getSort());return e&&e.length>0}dispatchSortChangedEvents(e,t){const i={type:dt.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(t=e.getColDef().sortingOrder?e.getColDef().sortingOrder:this.gos.get("sortingOrder")?this.gos.get("sortingOrder"):Fc.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,s=i==t.length-1;let r;return r=n||s?t[0]:t[i+1],Fc.DEFAULT_SORTING_ORDER.indexOf(r)<0?(console.warn("AG Grid: invalid sort type "+r),null):r}getIndexedSortMap(){let e=this.columnModel.getPrimaryAndSecondaryAndAutoColumns().filter(e=>!!e.getSort());if(this.columnModel.isPivotMode()){const t=this.gos.isColumnsSortingCoupledToGroup();e=e.filter(e=>{const i=!!e.getAggFunc(),n=!e.isPrimary(),s=t?this.columnModel.getGroupDisplayColumnForGroup(e.getId()):e.getColDef().showRowGroup;return i||n||s})}const t=this.columnModel.getRowGroupColumns().filter(e=>!!e.getSort()),i={};e.forEach((e,t)=>i[e.getId()]=t),e.sort((e,t)=>{const n=e.getSortIndex(),s=t.getSortIndex();return null!=n&&null!=s?n-s:null==n&&null==s?i[e.getId()]>i[t.getId()]?1:-1:null==s?-1:1});const n=this.gos.isColumnsSortingCoupledToGroup()&&!!t.length;n&&(e=[...new Set(e.map(e=>{var t;return null!=(t=this.columnModel.getGroupDisplayColumnForGroup(e.getId()))?t:e}))]);const s=new Map;return e.forEach((e,t)=>s.set(e,t)),n&&t.forEach(e=>{const t=this.columnModel.getGroupDisplayColumnForGroup(e.getId());s.set(e,s.get(t))}),s}getColumnsWithSortingOrdered(){return[...this.getIndexedSortMap().entries()].sort(([e,t],[i,n])=>t-n).map(([e])=>e)}getSortModel(){return this.getColumnsWithSortingOrdered().filter(e=>e.getSort()).map(e=>({sort:e.getSort(),colId:e.getId()}))}getSortOptions(){return this.getColumnsWithSortingOrdered().filter(e=>e.getSort()).map(e=>({sort:e.getSort(),column:e}))}canColumnDisplayMixedSort(e){const t=this.gos.isColumnsSortingCoupledToGroup(),i=!!e.getColDef().showRowGroup;return t&&i}getDisplaySortForColumn(e){const t=this.columnModel.getSourceColumnsForGroupColumn(e);if(!this.canColumnDisplayMixedSort(e)||!(null==t?void 0:t.length))return e.getSort();const i=null!=e.getColDef().field||e.getColDef().valueGetter?[e,...t]:t,n=i[0].getSort();return i.every(e=>e.getSort()==n)?n:"mixed"}getDisplaySortIndexForColumn(e){return this.getIndexedSortMap().get(e)}};Fc.DEFAULT_SORTING_ORDER=["asc","desc",null],m([pe("columnModel")],Fc.prototype,"columnModel",2),Fc=m([ue("sortController")],Fc);var Gc=class extends ot{static addKeyboardModeEvents(e){this.instanceCount>0||(e.addEventListener("keydown",Gc.toggleKeyboardMode),e.addEventListener("mousedown",Gc.toggleKeyboardMode))}static removeKeyboardModeEvents(e){this.instanceCount>0||(e.addEventListener("keydown",Gc.toggleKeyboardMode),e.addEventListener("mousedown",Gc.toggleKeyboardMode))}static toggleKeyboardMode(e){const t=Gc.keyboardModeActive,i="keydown"===e.type;i&&(e.ctrlKey||e.metaKey||e.altKey)||t!==i&&(Gc.keyboardModeActive=i)}static unregisterGridCompController(e){Gc.removeKeyboardModeEvents(e)}init(){const e=this.clearFocusedCell.bind(this);this.addManagedListener(this.eventService,dt.EVENT_COLUMN_PIVOT_MODE_CHANGED,e),this.addManagedListener(this.eventService,dt.EVENT_NEW_COLUMNS_LOADED,this.onColumnEverythingChanged.bind(this)),this.addManagedListener(this.eventService,dt.EVENT_COLUMN_GROUP_OPENED,e),this.addManagedListener(this.eventService,dt.EVENT_COLUMN_ROW_GROUP_CHANGED,e),this.registerKeyboardFocusEvents(),this.ctrlsService.whenReady(e=>{this.gridCtrl=e.gridCtrl})}registerKeyboardFocusEvents(){const e=this.gos.getDocument();Gc.addKeyboardModeEvents(e),Gc.instanceCount++,this.addDestroyFunc(()=>{Gc.instanceCount--,Gc.unregisterGridCompController(e)})}onColumnEverythingChanged(){if(!this.focusedCellPosition)return;const e=this.focusedCellPosition.column,t=this.columnModel.getGridColumn(e.getId());e!==t&&this.clearFocusedCell()}isKeyboardMode(){return Gc.keyboardModeActive}getFocusCellToUseAfterRefresh(){return this.gos.get("suppressFocusAfterRefresh")||!this.focusedCellPosition||this.isDomDataMissingInHierarchy(this.gos.getActiveDomElement(),ba.DOM_DATA_KEY_ROW_CTRL)?null:this.focusedCellPosition}getFocusHeaderToUseAfterRefresh(){return this.gos.get("suppressFocusAfterRefresh")||!this.focusedHeaderPosition||this.isDomDataMissingInHierarchy(this.gos.getActiveDomElement(),il.DOM_DATA_KEY_HEADER_CTRL)?null:this.focusedHeaderPosition}isDomDataMissingInHierarchy(e,t){let i=e;for(;i;){if(this.gos.getDomData(i,t))return!1;i=i.parentNode}return!0}getFocusedCell(){return this.focusedCellPosition}shouldRestoreFocus(e){return!!this.isCellRestoreFocused(e)&&(setTimeout(()=>{this.restoredFocusedCellPosition=null},0),!0)}isCellRestoreFocused(e){return null!=this.restoredFocusedCellPosition&&this.cellPositionUtils.equals(e,this.restoredFocusedCellPosition)}setRestoreFocusedCell(e){"react"===this.getFrameworkOverrides().renderingEngine&&(this.restoredFocusedCellPosition=e)}getFocusEventParams(){const{rowIndex:e,rowPinned:t,column:i}=this.focusedCellPosition,n={rowIndex:e,rowPinned:t,column:i,isFullWidthCell:!1},s=this.rowRenderer.getRowByPosition({rowIndex:e,rowPinned:t});return s&&(n.isFullWidthCell=s.isFullWidth()),n}clearFocusedCell(){if(this.restoredFocusedCellPosition=null,null==this.focusedCellPosition)return;const e=p({type:dt.EVENT_CELL_FOCUS_CLEARED},this.getFocusEventParams());this.focusedCellPosition=null,this.eventService.dispatchEvent(e)}setFocusedCell(e){const{column:t,rowIndex:i,rowPinned:n,forceBrowserFocus:s=!1,preventScrollOnBrowserFocus:r=!1}=e,o=this.columnModel.getGridColumn(t);if(!o)return void(this.focusedCellPosition=null);this.focusedCellPosition=o?{rowIndex:i,rowPinned:b(n),column:o}:null;const a=g(p({type:dt.EVENT_CELL_FOCUSED},this.getFocusEventParams()),{forceBrowserFocus:s,preventScrollOnBrowserFocus:r,floating:null});this.eventService.dispatchEvent(a)}isCellFocused(e){return null!=this.focusedCellPosition&&this.cellPositionUtils.equals(e,this.focusedCellPosition)}isRowNodeFocused(e){return this.isRowFocused(e.rowIndex,e.rowPinned)}isHeaderWrapperFocused(e){if(null==this.focusedHeaderPosition)return!1;const t=e.getColumnGroupChild(),i=e.getRowIndex(),n=e.getPinned(),{column:s,headerRowIndex:r}=this.focusedHeaderPosition;return t===s&&i===r&&n==s.getPinned()}clearFocusedHeader(){this.focusedHeaderPosition=null}getFocusedHeader(){return this.focusedHeaderPosition}setFocusedHeader(e,t){this.focusedHeaderPosition={headerRowIndex:e,column:t}}focusHeaderPosition(e){if(this.gos.get("suppressHeaderFocus"))return!1;const{direction:t,fromTab:i,allowUserOverride:n,event:s,fromCell:r,rowWithoutSpanValue:o}=e;let{headerPosition:a}=e;if(r&&this.filterManager.isAdvancedFilterHeaderActive())return this.focusAdvancedFilter(a);if(n){const e=this.getFocusedHeader(),n=this.headerNavigationService.getHeaderRowCount();if(i){const i=this.gos.getCallback("tabToNextHeader");i&&(a=this.getHeaderPositionFromUserFunc({userFunc:i,direction:t,currentPosition:e,headerPosition:a,headerRowCount:n}))}else{const t=this.gos.getCallback("navigateToNextHeader");t&&s&&(a=t({key:s.key,previousHeaderPosition:e,nextHeaderPosition:a,headerRowCount:n,event:s}))}}return!!a&&this.focusProvidedHeaderPosition({headerPosition:a,direction:t,event:s,fromCell:r,rowWithoutSpanValue:o})}focusHeaderPositionFromUserFunc(e){if(this.gos.get("suppressHeaderFocus"))return!1;const{userFunc:t,headerPosition:i,direction:n,event:s}=e,r=this.getFocusedHeader(),o=this.headerNavigationService.getHeaderRowCount(),a=this.getHeaderPositionFromUserFunc({userFunc:t,direction:n,currentPosition:r,headerPosition:i,headerRowCount:o});return!!a&&this.focusProvidedHeaderPosition({headerPosition:a,direction:n,event:s})}getHeaderPositionFromUserFunc(e){const{userFunc:t,direction:i,currentPosition:n,headerPosition:s,headerRowCount:r}=e,o=t({backwards:"Before"===i,previousHeaderPosition:n,nextHeaderPosition:s,headerRowCount:r});return!0===o||null===o?(null===o&&j("Returning `null` from tabToNextHeader is deprecated. Return `true` to stay on the current header, or `false` to let the browser handle the tab behaviour."),n):!1===o?null:o}focusProvidedHeaderPosition(e){const{headerPosition:t,direction:i,fromCell:n,rowWithoutSpanValue:s,event:r}=e;if(-1===t.headerRowIndex)return this.filterManager.isAdvancedFilterHeaderActive()?this.focusAdvancedFilter(t):this.focusGridView(t.column);this.headerNavigationService.scrollToColumn(t.column,i);const o=this.ctrlsService.getHeaderRowContainerCtrl(t.column.getPinned()).focusHeader(t.headerRowIndex,t.column,r);return o&&(null!=s||n)&&this.headerNavigationService.setCurrentHeaderRowWithoutSpan(null!=s?s:-1),o}focusFirstHeader(){let e=this.columnModel.getAllDisplayedColumns()[0];if(!e)return!1;e.getParent()&&(e=this.columnModel.getColumnGroupAtLevel(e,0));const t=this.headerPositionUtils.getHeaderIndexToFocus(e,0);return this.focusHeaderPosition({headerPosition:t,rowWithoutSpanValue:0})}focusLastHeader(e){const t=this.headerNavigationService.getHeaderRowCount()-1,i=Le(this.columnModel.getAllDisplayedColumns());return this.focusHeaderPosition({headerPosition:{headerRowIndex:t,column:i},rowWithoutSpanValue:-1,event:e})}focusPreviousFromFirstCell(e){return this.filterManager.isAdvancedFilterHeaderActive()?this.focusAdvancedFilter(null):this.focusLastHeader(e)}isAnyCellFocused(){return!!this.focusedCellPosition}isRowFocused(e,t){return null!=this.focusedCellPosition&&this.focusedCellPosition.rowIndex===e&&this.focusedCellPosition.rowPinned===b(t)}findFocusableElements(e,t,i=!1){const n=on;let s=an;t&&(s+=", "+t),i&&(s+=', [tabindex="-1"]');const r=Array.prototype.slice.apply(e.querySelectorAll(n)).filter(e=>Mn(e)),o=Array.prototype.slice.apply(e.querySelectorAll(s));return o.length?(a=o,r.filter(e=>-1===a.indexOf(e))):r;var a}focusInto(e,t=!1,i=!1){const n=this.findFocusableElements(e,null,i),s=t?Le(n):n[0];return!!s&&(s.focus({preventScroll:!0}),!0)}findFocusableElementBeforeTabGuard(e,t){if(!t)return null;const i=this.findFocusableElements(e),n=i.indexOf(t);if(-1===n)return null;let s=-1;for(let e=n-1;e>=0;e--)if(i[e].classList.contains("ag-tab-guard-top")){s=e;break}return s<=0?null:i[s-1]}findNextFocusableElement(e=this.eGridDiv,t,i){const n=this.findFocusableElements(e,t?':not([tabindex="-1"])':null),s=this.gos.getActiveDomElement();let r;r=t?n.findIndex(e=>e.contains(s)):n.indexOf(s);const o=r+(i?-1:1);return o<0||o>=n.length?null:n[o]}isTargetUnderManagedComponent(e,t){if(!t)return!1;const i=e.querySelectorAll(`.${Ls.FOCUS_MANAGED_CLASS}`);if(!i.length)return!1;for(let e=0;e<i.length;e++)if(i[e].contains(t))return!0;return!1}findTabbableParent(e,t=5){let i=0;for(;e&&null===_i(e)&&++i<=t;)e=e.parentElement;return null===_i(e)?null:e}focusGridView(e,t){var i;if(this.gos.get("suppressCellFocus"))return t?this.gos.get("suppressHeaderFocus")?this.focusNextGridCoreContainer(!0,!0):this.focusLastHeader():this.focusNextGridCoreContainer(!1);const n=t?this.rowPositionUtils.getLastRow():this.rowPositionUtils.getFirstRow();if(!n)return!1;const{rowIndex:s,rowPinned:r}=n,o=this.getFocusedHeader();return!e&&o&&(e=o.column),!(null==s||!e||(this.navigationService.ensureCellVisible({rowIndex:s,column:e,rowPinned:r}),this.setFocusedCell({rowIndex:s,column:e,rowPinned:b(r),forceBrowserFocus:!0}),null==(i=this.rangeService)||i.setRangeToCell({rowIndex:s,rowPinned:r,column:e}),0))}focusNextGridCoreContainer(e,t=!1){return!(t||!this.gridCtrl.focusNextInnerContainer(e))||((t||!e&&!this.gridCtrl.isDetailGrid())&&this.gridCtrl.forceFocusOutOfContainer(e),!1)}focusAdvancedFilter(e){var t,i;return this.advancedFilterFocusColumn=null==e?void 0:e.column,null!=(i=null==(t=this.advancedFilterService)?void 0:t.getCtrl().focusHeaderComp())&&i}focusNextFromAdvancedFilter(e,t){var i,n;const s=null!=(n=t?void 0:this.advancedFilterFocusColumn)?n:null==(i=this.columnModel.getAllDisplayedColumns())?void 0:i[0];return e?this.focusHeaderPosition({headerPosition:{column:s,headerRowIndex:this.headerNavigationService.getHeaderRowCount()-1}}):this.focusGridView(s)}clearAdvancedFilterColumn(){this.advancedFilterFocusColumn=void 0}};Gc.keyboardModeActive=!1,Gc.instanceCount=0,m([pe("eGridDiv")],Gc.prototype,"eGridDiv",2),m([pe("columnModel")],Gc.prototype,"columnModel",2),m([pe("headerNavigationService")],Gc.prototype,"headerNavigationService",2),m([pe("headerPositionUtils")],Gc.prototype,"headerPositionUtils",2),m([pe("rowRenderer")],Gc.prototype,"rowRenderer",2),m([pe("rowPositionUtils")],Gc.prototype,"rowPositionUtils",2),m([pe("cellPositionUtils")],Gc.prototype,"cellPositionUtils",2),m([pe("navigationService")],Gc.prototype,"navigationService",2),m([pe("ctrlsService")],Gc.prototype,"ctrlsService",2),m([pe("filterManager")],Gc.prototype,"filterManager",2),m([ge("rangeService")],Gc.prototype,"rangeService",2),m([ge("advancedFilterService")],Gc.prototype,"advancedFilterService",2),m([he],Gc.prototype,"init",1),Gc=m([ue("focusService")],Gc);var Vc=class extends ot{setMouseOver(e){this.selectedColumns=e;const t={type:dt.EVENT_COLUMN_HOVER_CHANGED};this.eventService.dispatchEvent(t)}clearMouseOver(){this.selectedColumns=null;const e={type:dt.EVENT_COLUMN_HOVER_CHANGED};this.eventService.dispatchEvent(e)}isHovered(e){return!!this.selectedColumns&&this.selectedColumns.indexOf(e)>=0}};Vc=m([ue("columnHoverService")],Vc);var Bc=class extends ot{constructor(){super(...arguments),this.executeNextFuncs=[],this.executeLaterFuncs=[],this.active=!1,this.suppressAnimation=!1,this.animationThreadCount=0}postConstruct(){this.ctrlsService.whenReady(e=>this.gridBodyCtrl=e.gridBodyCtrl)}isActive(){return this.active&&!this.suppressAnimation}setSuppressAnimation(e){this.suppressAnimation=e}start(){this.active||this.gos.get("suppressColumnMoveAnimation")||this.gos.get("enableRtl")||(this.ensureAnimationCssClassPresent(),this.active=!0)}finish(){this.active&&this.flush(()=>{this.active=!1})}executeNextVMTurn(e){this.active?this.executeNextFuncs.push(e):e()}executeLaterVMTurn(e){this.active?this.executeLaterFuncs.push(e):e()}ensureAnimationCssClassPresent(){this.animationThreadCount++;const e=this.animationThreadCount;this.gridBodyCtrl.setColumnMovingCss(!0),this.executeLaterFuncs.push(()=>{this.animationThreadCount===e&&this.gridBodyCtrl.setColumnMovingCss(!1)})}flush(e){if(0===this.executeNextFuncs.length&&0===this.executeLaterFuncs.length)return void e();const t=e=>{for(;e.length;){const t=e.pop();t&&t()}};this.getFrameworkOverrides().wrapIncoming(()=>{window.setTimeout(()=>t(this.executeNextFuncs),0),window.setTimeout(()=>{e(),t(this.executeLaterFuncs)},200)})}};m([pe("ctrlsService")],Bc.prototype,"ctrlsService",2),m([he],Bc.prototype,"postConstruct",1),Bc=m([ue("columnAnimationService")],Bc);var Hc=class extends ot{postConstruct(){this.ctrlsService.whenReady(e=>{this.centerRowsCtrl=e.center,this.addManagedListener(this.eventService,dt.EVENT_BODY_HEIGHT_CHANGED,this.checkPageSize.bind(this)),this.addManagedListener(this.eventService,dt.EVENT_SCROLL_VISIBILITY_CHANGED,this.checkPageSize.bind(this)),this.addManagedPropertyListener("paginationAutoPageSize",this.onPaginationAutoSizeChanged.bind(this)),this.checkPageSize()})}notActive(){return!this.gos.get("paginationAutoPageSize")||null==this.centerRowsCtrl}onPaginationAutoSizeChanged(){this.notActive()?this.paginationProxy.unsetAutoCalculatedPageSize():this.checkPageSize()}checkPageSize(){if(this.notActive())return;const e=this.centerRowsCtrl.getViewportSizeFeature().getBodyHeight();if(e>0){const t=()=>{const t=this.gos.getRowHeightAsNumber(),i=Math.floor(e/t);this.paginationProxy.setPageSize(i,"autoCalculated")};this.isBodyRendered?ee(()=>t(),50)():(t(),this.isBodyRendered=!0)}else this.isBodyRendered=!1}};m([pe("ctrlsService")],Hc.prototype,"ctrlsService",2),m([pe("paginationProxy")],Hc.prototype,"paginationProxy",2),m([he],Hc.prototype,"postConstruct",1),Hc=m([ue("paginationAutoPageSizeService")],Hc);var zc=class extends ot{constructor(){super(...arguments),this.cacheVersion=0}init(){this.active=this.gos.get("valueCache"),this.neverExpires=this.gos.get("valueCacheNeverExpires")}onDataChanged(){this.neverExpires||this.expire()}expire(){this.cacheVersion++}setValue(e,t,i){this.active&&(e.__cacheVersion!==this.cacheVersion&&(e.__cacheVersion=this.cacheVersion,e.__cacheData={}),e.__cacheData[t]=i)}getValue(e,t){if(this.active&&e.__cacheVersion===this.cacheVersion)return e.__cacheData[t]}};m([he],zc.prototype,"init",1),zc=m([ue("valueCache")],zc);var Uc=class extends ot{init(){"clientSide"===this.rowModel.getType()&&(this.clientSideRowModel=this.rowModel),this.addManagedListener(this.eventService,dt.EVENT_CELL_VALUE_CHANGED,this.onCellValueChanged.bind(this))}onCellValueChanged(e){"paste"!==e.source&&this.doChangeDetection(e.node,e.column)}doChangeDetection(e,t){if(this.gos.get("suppressChangeDetection"))return;const i=[e];if(this.clientSideRowModel&&!e.isRowPinned()){const n=this.gos.get("aggregateOnlyChangedColumns"),s=new Bl(n,this.clientSideRowModel.getRootNode());s.addParentNode(e.parent,[t]),this.clientSideRowModel.doAggregate(s),s.forEachChangedNodeDepthFirst(e=>{i.push(e)})}this.rowRenderer.refreshCells({rowNodes:i})}};m([pe("rowModel")],Uc.prototype,"rowModel",2),m([pe("rowRenderer")],Uc.prototype,"rowRenderer",2),m([he],Uc.prototype,"init",1),Uc=m([ue("changeDetectionService")],Uc);var Wc=class extends ot{adaptFunction(e,t){const i=this.componentMetadataProvider.retrieve(e);return i&&i.functionAdapter?i.functionAdapter(t):null}adaptCellRendererFunction(e){return class{refresh(e){return!1}getGui(){return this.eGui}init(t){const i=e(t),n=typeof i;this.eGui="string"!==n&&"number"!==n&&"boolean"!==n?null!=i?i:An("<span></span>"):An("<span>"+i+"</span>")}}}doesImplementIComponent(e){return!!e&&e.prototype&&"getGui"in e.prototype}};m([pe("componentMetadataProvider")],Wc.prototype,"componentMetadataProvider",2),Wc=m([ue("agComponentUtils")],Wc);var jc=class extends ot{postConstruct(){this.componentMetaData={dateComponent:{mandatoryMethodList:["getDate","setDate"],optionalMethodList:["afterGuiAttached","setInputPlaceholder","setInputAriaLabel","setDisabled","onParamsUpdated","refresh"]},detailCellRenderer:{mandatoryMethodList:[],optionalMethodList:["refresh"],functionAdapter:this.agComponentUtils.adaptCellRendererFunction.bind(this.agComponentUtils)},headerComponent:{mandatoryMethodList:[],optionalMethodList:["refresh"]},headerGroupComponent:{mandatoryMethodList:[],optionalMethodList:[]},loadingCellRenderer:{mandatoryMethodList:[],optionalMethodList:[],functionAdapter:this.agComponentUtils.adaptCellRendererFunction.bind(this.agComponentUtils)},loadingOverlayComponent:{mandatoryMethodList:[],optionalMethodList:["refresh"]},noRowsOverlayComponent:{mandatoryMethodList:[],optionalMethodList:["refresh"]},floatingFilterComponent:{mandatoryMethodList:["onParentModelChanged"],optionalMethodList:["afterGuiAttached","onParamsUpdated","refresh"]},cellRenderer:{mandatoryMethodList:[],optionalMethodList:["refresh","afterGuiAttached"],functionAdapter:this.agComponentUtils.adaptCellRendererFunction.bind(this.agComponentUtils)},cellEditor:{mandatoryMethodList:["getValue"],optionalMethodList:["isPopup","isCancelBeforeStart","isCancelAfterEnd","getPopupPosition","focusIn","focusOut","afterGuiAttached","refresh"]},innerRenderer:{mandatoryMethodList:[],optionalMethodList:["afterGuiAttached"],functionAdapter:this.agComponentUtils.adaptCellRendererFunction.bind(this.agComponentUtils)},fullWidthCellRenderer:{mandatoryMethodList:[],optionalMethodList:["refresh","afterGuiAttached"],functionAdapter:this.agComponentUtils.adaptCellRendererFunction.bind(this.agComponentUtils)},groupRowRenderer:{mandatoryMethodList:[],optionalMethodList:["afterGuiAttached"],functionAdapter:this.agComponentUtils.adaptCellRendererFunction.bind(this.agComponentUtils)},filter:{mandatoryMethodList:["isFilterActive","doesFilterPass","getModel","setModel"],optionalMethodList:["afterGuiAttached","afterGuiDetached","onNewRowsLoaded","getModelAsString","onFloatingFilterChanged","onAnyFilterChanged","refresh"]},statusPanel:{mandatoryMethodList:[],optionalMethodList:["refresh"]},toolPanel:{mandatoryMethodList:[],optionalMethodList:["refresh","getState"]},tooltipComponent:{mandatoryMethodList:[],optionalMethodList:[]},menuItem:{mandatoryMethodList:[],optionalMethodList:["setActive","select","setExpanded","configureDefaults"]}}}retrieve(e){return this.componentMetaData[e]}};m([pe("agComponentUtils")],jc.prototype,"agComponentUtils",2),m([he],jc.prototype,"postConstruct",1),jc=m([ue("componentMetadataProvider")],jc);var Kc={"ag-theme-custom":{headerHeight:25,headerCellMinWidth:24,listItemHeight:20,rowHeight:25,chartMenuPanelWidth:220},"ag-theme-material":{headerHeight:56,headerCellMinWidth:48,listItemHeight:32,rowHeight:48,chartMenuPanelWidth:240},"ag-theme-balham":{headerHeight:32,headerCellMinWidth:24,listItemHeight:24,rowHeight:28,chartMenuPanelWidth:220},"ag-theme-alpine":{headerHeight:48,headerCellMinWidth:36,listItemHeight:24,rowHeight:42,chartMenuPanelWidth:240},"ag-theme-quartz":{headerHeight:48,headerCellMinWidth:36,listItemHeight:24,rowHeight:42,chartMenuPanelWidth:260}},$c={headerHeight:["ag-header-row"],headerCellMinWidth:["ag-header-cell"],listItemHeight:["ag-virtual-list-item"],rowHeight:["ag-row"],chartMenuPanelWidth:["ag-chart-docked-container"]},Yc=class extends ot{constructor(){super(...arguments),this.calculatedSizes={},this.calculatedTheme=null}postConstruct(){var e;const t=null!=(e=this.getTheme().el)?e:this.eGridDiv;this.addManagedPropertyListener("rowHeight",()=>this.refreshRowHeightVariable()),this.mutationObserver=new MutationObserver(()=>{this.calculatedSizes={},this.calculatedTheme=null,this.calculatedTheme=this.getTheme(),this.fireGridStylesChangedEvent()}),this.mutationObserver.observe(t||this.eGridDiv,{attributes:!0,attributeFilter:["class"]})}fireGridStylesChangedEvent(){const e={type:dt.EVENT_GRID_STYLES_CHANGED};this.eventService.dispatchEvent(e)}getSassVariable(e){const{themeFamily:t,el:i}=this.getTheme();if(!t||0!==t.indexOf("ag-theme"))return;this.calculatedSizes||(this.calculatedSizes={}),this.calculatedSizes[t]||(this.calculatedSizes[t]={});const n=this.calculatedSizes[t][e];return null!=n?n:(this.calculatedSizes[t][e]=this.calculateValueForSassProperty(e,t,i),this.calculatedSizes[t][e])}calculateValueForSassProperty(e,t,i){const n="ag-theme-"+(t.match("material")?"material":t.match("balham")?"balham":t.match("alpine")?"alpine":"custom"),s=Kc[n][e],r=this.gos.getDocument();if(i||(i=this.eGridDiv),!$c[e])return s;const o=$c[e],a=r.createElement("div"),l=Array.from(i.classList);a.classList.add(t,...l),a.style.position="absolute";const c=o.reduce((e,t)=>{const i=r.createElement("div");return i.style.position="static",i.classList.add(t),e.appendChild(i),i},a);let h=0;if(r.body){r.body.appendChild(a);const t=-1!==e.toLowerCase().indexOf("height")?"height":"width";h=parseInt(window.getComputedStyle(c)[t],10),r.body.removeChild(a)}return h||s}isThemeDark(){const{theme:e}=this.getTheme();return!!e&&e.indexOf("dark")>=0}chartMenuPanelWidth(){return this.getSassVariable("chartMenuPanelWidth")}getTheme(){if(this.calculatedTheme)return this.calculatedTheme;const e=/\bag-(material|(?:theme-([\w\-]*)))\b/g;let t=this.eGridDiv,i=null,n=[];for(;t;){if(i=e.exec(t.className),i){const i=t.className.match(e);i&&(n=i);break}t=t.parentElement||void 0}if(!i)return{allThemes:n};const s=i[0];return this.calculatedTheme={theme:s,el:t,themeFamily:s.replace(/-dark$/,""),allThemes:n},this.calculatedTheme}getFromTheme(e,t){var i;return null!=(i=this.getSassVariable(t))?i:e}getDefaultRowHeight(){return this.getFromTheme(25,"rowHeight")}getListItemHeight(){return this.getFromTheme(20,"listItemHeight")}refreshRowHeightVariable(){const e=this.eGridDiv.style.getPropertyValue("--ag-line-height").trim(),t=this.gos.get("rowHeight");if(null==t||isNaN(t)||!isFinite(t))return null!==e&&this.eGridDiv.style.setProperty("--ag-line-height",null),-1;const i=`${t}px`;return e!=i?(this.eGridDiv.style.setProperty("--ag-line-height",i),t):""!=e?parseFloat(e):-1}getMinColWidth(){const e=this.getFromTheme(null,"headerCellMinWidth");return S(e)?Math.max(e,10):10}destroy(){this.calculatedSizes=null,this.mutationObserver&&this.mutationObserver.disconnect(),super.destroy()}};m([pe("eGridDiv")],Yc.prototype,"eGridDiv",2),m([he],Yc.prototype,"postConstruct",1),Yc=m([ue("environment")],Yc);var qc=class extends ot{constructor(){super(...arguments),this.scrollY=0,this.uiBodyHeight=0}agWire(e){this.logger=e.create("RowContainerHeightService")}postConstruct(){this.addManagedListener(this.eventService,dt.EVENT_BODY_HEIGHT_CHANGED,this.updateOffset.bind(this)),this.maxDivHeight=Fi(),this.logger.log("maxDivHeight = "+this.maxDivHeight)}isStretching(){return this.stretching}getDivStretchOffset(){return this.divStretchOffset}updateOffset(){if(!this.stretching)return;const e=this.ctrlsService.getGridBodyCtrl().getScrollFeature().getVScrollPosition().top,t=this.getUiBodyHeight();(e!==this.scrollY||t!==this.uiBodyHeight)&&(this.scrollY=e,this.uiBodyHeight=t,this.calculateOffset())}calculateOffset(){this.setUiContainerHeight(this.maxDivHeight),this.pixelsToShave=this.modelHeight-this.uiContainerHeight,this.maxScrollY=this.uiContainerHeight-this.uiBodyHeight;const e=this.scrollY/this.maxScrollY,t=e*this.pixelsToShave;this.logger.log(`Div Stretch Offset = ${t} (${this.pixelsToShave} * ${e})`),this.setDivStretchOffset(t)}setUiContainerHeight(e){e!==this.uiContainerHeight&&(this.uiContainerHeight=e,this.eventService.dispatchEvent({type:dt.EVENT_ROW_CONTAINER_HEIGHT_CHANGED}))}clearOffset(){this.setUiContainerHeight(this.modelHeight),this.pixelsToShave=0,this.setDivStretchOffset(0)}setDivStretchOffset(e){const t="number"==typeof e?Math.floor(e):null;this.divStretchOffset!==t&&(this.divStretchOffset=t,this.eventService.dispatchEvent({type:dt.EVENT_HEIGHT_SCALE_CHANGED}))}setModelHeight(e){this.modelHeight=e,this.stretching=null!=e&&this.maxDivHeight>0&&e>this.maxDivHeight,this.stretching?this.calculateOffset():this.clearOffset()}getUiContainerHeight(){return this.uiContainerHeight}getRealPixelPosition(e){return e-this.divStretchOffset}getUiBodyHeight(){const e=this.ctrlsService.getGridBodyCtrl().getScrollFeature().getVScrollPosition();return e.bottom-e.top}getScrollPositionForPixel(e){if(this.pixelsToShave<=0)return e;const t=e/(this.modelHeight-this.getUiBodyHeight());return this.maxScrollY*t}};m([pe("ctrlsService")],qc.prototype,"ctrlsService",2),m([v(0,me("loggerFactory"))],qc.prototype,"agWire",1),m([he],qc.prototype,"postConstruct",1),qc=m([ue("rowContainerHeightService")],qc);var Xc=class extends ot{init(){this.addManagedPropertyListener("isRowSelectable",()=>this.updateSelectable())}updateSelectableAfterGrouping(){this.updateSelectable(!0)}updateSelectable(e=!1){const t=!!this.gos.get("rowSelection"),i=this.gos.get("isRowSelectable");if(!t||!i)return;const n=this.gos.get("groupSelectsChildren"),s="clientSide"===this.rowModel.getType()&&n,r=[],o=t=>{if(e&&!t.group)return;if(s&&t.group){const e=t.childrenAfterGroup.some(e=>!0===e.selectable);return void t.setRowSelectable(e,!0)}const n=!i||i(t);t.setRowSelectable(n,!0),!n&&t.isSelected()&&r.push(t)};if(s){const e=this.rowModel;new Bl(!1,e.getRootNode()).forEachChangedNodeDepthFirst(o,!0,!0)}else this.rowModel.forEachNode(o);r.length&&this.selectionService.setNodesSelected({nodes:r,newValue:!1,source:"selectableChanged"}),s&&this.selectionService instanceof Ic&&this.selectionService.updateGroupsFromChildrenSelections("selectableChanged")}};m([pe("rowModel")],Xc.prototype,"rowModel",2),m([pe("selectionService")],Xc.prototype,"selectionService",2),m([he],Xc.prototype,"init",1),Xc=m([ue("selectableService")],Xc);var Zc=class extends ws{constructor(){super(),this.previousAndFirstButtonsDisabled=!1,this.nextButtonDisabled=!1,this.lastButtonDisabled=!1,this.areListenersSetup=!1}postConstruct(){const e=this.gos.get("enableRtl");this.setTemplate(this.getTemplate());const{btFirst:t,btPrevious:i,btNext:n,btLast:s,pageSizeComp:r}=this;this.activateTabIndex([t,i,n,s]),t.insertAdjacentElement("afterbegin",Zn(e?"last":"first",this.gos)),i.insertAdjacentElement("afterbegin",Zn(e?"next":"previous",this.gos)),n.insertAdjacentElement("afterbegin",Zn(e?"previous":"next",this.gos)),s.insertAdjacentElement("afterbegin",Zn(e?"first":"last",this.gos)),this.addManagedPropertyListener("pagination",this.onPaginationChanged.bind(this)),this.addManagedPropertyListener("suppressPaginationPanel",this.onPaginationChanged.bind(this)),this.addManagedPropertyListeners(["paginationPageSizeSelector","paginationAutoPageSize","suppressPaginationPanel"],()=>this.onPageSizeRelatedOptionsChange()),this.pageSizeComp.toggleSelectDisplay(this.pageSizeComp.shouldShowPageSizeSelector()),this.onPaginationChanged()}onPaginationChanged(){const e=this.gos.get("pagination")&&!this.gos.get("suppressPaginationPanel");this.setDisplayed(e),e&&(this.setupListeners(),this.enableOrDisableButtons(),this.updateRowLabels(),this.setCurrentPageLabel(),this.setTotalLabels(),this.onPageSizeRelatedOptionsChange())}onPageSizeRelatedOptionsChange(){this.pageSizeComp.toggleSelectDisplay(this.pageSizeComp.shouldShowPageSizeSelector())}setupListeners(){this.areListenersSetup||(this.addManagedListener(this.eventService,dt.EVENT_PAGINATION_CHANGED,this.onPaginationChanged.bind(this)),[{el:this.btFirst,fn:this.onBtFirst.bind(this)},{el:this.btPrevious,fn:this.onBtPrevious.bind(this)},{el:this.btNext,fn:this.onBtNext.bind(this)},{el:this.btLast,fn:this.onBtLast.bind(this)}].forEach(e=>{const{el:t,fn:i}=e;this.addManagedListener(t,"click",i),this.addManagedListener(t,"keydown",e=>{e.key!==Jn.ENTER&&e.key!==Jn.SPACE||(e.preventDefault(),i())})}),this.areListenersSetup=!0)}onBtFirst(){this.previousAndFirstButtonsDisabled||this.paginationProxy.goToFirstPage()}setCurrentPageLabel(){const e=this.paginationProxy.getTotalPages()>0,t=this.paginationProxy.getCurrentPage(),i=e?t+1:0;this.lbCurrent.textContent=this.formatNumber(i)}formatNumber(e){const t=this.gos.getCallback("paginationNumberFormatter");if(t)return t({value:e});const i=this.localeService.getLocaleTextFunc();return Xi(e,i("thousandSeparator",","),i("decimalSeparator","."))}getTemplate(){const e=this.localeService.getLocaleTextFunc(),t=e("page","Page"),i=e("to","to"),n=e("of","of"),s=e("firstPage","First Page"),r=e("previousPage","Previous Page"),o=e("nextPage","Next Page"),a=e("lastPage","Last Page"),l=this.getCompId();return`<div class="ag-paging-panel ag-unselectable" id="ag-${l}">\n                <ag-page-size-selector ref="pageSizeComp"></ag-page-size-selector>\n                <span class="ag-paging-row-summary-panel" role="status">\n                    <span id="ag-${l}-first-row" ref="lbFirstRowOnPage" class="ag-paging-row-summary-panel-number"></span>\n                    <span id="ag-${l}-to">${i}</span>\n                    <span id="ag-${l}-last-row" ref="lbLastRowOnPage" class="ag-paging-row-summary-panel-number"></span>\n                    <span id="ag-${l}-of">${n}</span>\n                    <span id="ag-${l}-row-count" ref="lbRecordCount" class="ag-paging-row-summary-panel-number"></span>\n                </span>\n                <span class="ag-paging-page-summary-panel" role="presentation">\n                    <div ref="btFirst" class="ag-button ag-paging-button" role="button" aria-label="${s}"></div>\n                    <div ref="btPrevious" class="ag-button ag-paging-button" role="button" aria-label="${r}"></div>\n                    <span class="ag-paging-description" role="status">\n                        <span id="ag-${l}-start-page">${t}</span>\n                        <span id="ag-${l}-start-page-number" ref="lbCurrent" class="ag-paging-number"></span>\n                        <span id="ag-${l}-of-page">${n}</span>\n                        <span id="ag-${l}-of-page-number" ref="lbTotal" class="ag-paging-number"></span>\n                    </span>\n                    <div ref="btNext" class="ag-button ag-paging-button" role="button" aria-label="${o}"></div>\n                    <div ref="btLast" class="ag-button ag-paging-button" role="button" aria-label="${a}"></div>\n                </span>\n            </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=0===e,this.toggleButtonDisabled(this.btFirst,this.previousAndFirstButtonsDisabled),this.toggleButtonDisabled(this.btPrevious,this.previousAndFirstButtonsDisabled);const n=this.isZeroPagesToDisplay(),s=e===i-1;this.nextButtonDisabled=s||n,this.lastButtonDisabled=!t||n||e===i-1,this.toggleButtonDisabled(this.btNext,this.nextButtonDisabled),this.toggleButtonDisabled(this.btLast,this.lastButtonDisabled)}toggleButtonDisabled(e,t){ti(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 s,r;if(this.isZeroPagesToDisplay()?s=r=0:(s=t*e+1,r=s+t-1,i&&r>n&&(r=n)),this.lbFirstRowOnPage.textContent=this.formatNumber(s),this.rowNodeBlockLoader.isLoading()){const e=this.localeService.getLocaleTextFunc();this.lbLastRowOnPage.innerHTML=e("pageLastRowUnknown","?")}else this.lbLastRowOnPage.textContent=this.formatNumber(r)}isZeroPagesToDisplay(){const e=this.paginationProxy.isLastPageFound(),t=this.paginationProxy.getTotalPages();return e&&0===t}setTotalLabels(){const e=this.paginationProxy.isLastPageFound(),t=this.paginationProxy.getTotalPages(),i=e?this.paginationProxy.getMasterRowCount():null;if(1===i){const e=this.paginationProxy.getRow(0);if(e&&e.group&&!e.groupData&&!e.aggData)return void this.setTotalLabelsToZero()}if(e)this.lbTotal.textContent=this.formatNumber(t),this.lbRecordCount.textContent=this.formatNumber(i);else{const e=this.localeService.getLocaleTextFunc()("more","more");this.lbTotal.innerHTML=e,this.lbRecordCount.innerHTML=e}}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)}};m([pe("paginationProxy")],Zc.prototype,"paginationProxy",2),m([pe("rowNodeBlockLoader")],Zc.prototype,"rowNodeBlockLoader",2),m([Es("btFirst")],Zc.prototype,"btFirst",2),m([Es("btPrevious")],Zc.prototype,"btPrevious",2),m([Es("btNext")],Zc.prototype,"btNext",2),m([Es("btLast")],Zc.prototype,"btLast",2),m([Es("lbRecordCount")],Zc.prototype,"lbRecordCount",2),m([Es("lbFirstRowOnPage")],Zc.prototype,"lbFirstRowOnPage",2),m([Es("lbLastRowOnPage")],Zc.prototype,"lbLastRowOnPage",2),m([Es("lbCurrent")],Zc.prototype,"lbCurrent",2),m([Es("lbTotal")],Zc.prototype,"lbTotal",2),m([Es("pageSizeComp")],Zc.prototype,"pageSizeComp",2),m([he],Zc.prototype,"postConstruct",1);var Qc=class e extends ws{constructor(){super(e.TEMPLATE),this.inProgress=!1,this.destroyRequested=!1}updateLayoutClasses(e,t){const i=this.eOverlayWrapper.classList;i.toggle("ag-layout-auto-height",t.autoHeight),i.toggle("ag-layout-normal",t.normal),i.toggle("ag-layout-print",t.print)}postConstruct(){this.createManagedBean(new Jo(this)),this.setDisplayed(!1,{skipAriaHidden:!0}),this.overlayService.registerOverlayWrapperComp(this)}setWrapperTypeClass(e){const t=this.eOverlayWrapper.classList;this.activeOverlayWrapperCssClass&&t.toggle(this.activeOverlayWrapperCssClass,!1),this.activeOverlayWrapperCssClass=e,t.toggle(e,!0)}showOverlay(e,t,i){this.inProgress||(this.setWrapperTypeClass(t),this.destroyActiveOverlay(),this.inProgress=!0,e&&e.then(e=>{this.inProgress=!1,this.eOverlayWrapper.appendChild(e.getGui()),this.activeOverlay=e,this.updateListenerDestroyFunc=i,this.destroyRequested&&(this.destroyRequested=!1,this.destroyActiveOverlay())}),this.setDisplayed(!0,{skipAriaHidden:!0}))}destroyActiveOverlay(){var e;this.inProgress?this.destroyRequested=!0:this.activeOverlay&&(this.activeOverlay=this.getContext().destroyBean(this.activeOverlay),null==(e=this.updateListenerDestroyFunc)||e.call(this),wn(this.eOverlayWrapper))}hideOverlay(){this.destroyActiveOverlay(),this.setDisplayed(!1,{skipAriaHidden:!0})}destroy(){this.destroyActiveOverlay(),super.destroy()}};Qc.TEMPLATE='\n        <div class="ag-overlay" role="presentation">\n            <div class="ag-overlay-panel" role="presentation">\n                <div class="ag-overlay-wrapper" ref="eOverlayWrapper" role="presentation"></div>\n            </div>\n        </div>',m([pe("overlayService")],Qc.prototype,"overlayService",2),m([Es("eOverlayWrapper")],Qc.prototype,"eOverlayWrapper",2),m([he],Qc.prototype,"postConstruct",1);var Jc=Qc,eh=class extends ot{getFirstRow(){let e,t=0;return this.pinnedRowModel.getPinnedTopRowCount()?e="top":this.rowModel.getRowCount()?(e=null,t=this.paginationProxy.getPageFirstRow()):this.pinnedRowModel.getPinnedBottomRowCount()&&(e="bottom"),void 0===e?null:{rowIndex:t,rowPinned:e}}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),void 0===e?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||!(e&&!t||!e&&t)&&e.rowIndex===t.rowIndex&&e.rowPinned==t.rowPinned}before(e,t){switch(e.rowPinned){case"top":if("top"!==t.rowPinned)return!0;break;case"bottom":if("bottom"!==t.rowPinned)return!1;break;default:if(S(t.rowPinned))return"top"!==t.rowPinned}return e.rowIndex<t.rowIndex}};m([pe("rowModel")],eh.prototype,"rowModel",2),m([pe("pinnedRowModel")],eh.prototype,"pinnedRowModel",2),m([pe("paginationProxy")],eh.prototype,"paginationProxy",2),eh=m([ue("rowPositionUtils")],eh);var th=class extends ot{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}.${null==i?"null":i}.${n.getId()}`}equals(e,t){const i=e.column===t.column,n=e.rowPinned===t.rowPinned,s=e.rowIndex===t.rowIndex;return i&&n&&s}};th=m([ue("cellPositionUtils")],th);var ih=class{constructor(e){this.cellValueChanges=e}},nh=class extends ih{constructor(e,t,i,n){super(e),this.initialRange=t,this.finalRange=i,this.ranges=n}},sh=class e{constructor(t){this.actionStack=[],this.maxStackSize=t||e.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}};sh.DEFAULT_STACK_SIZE=10;var rh=sh,oh=class extends ot{constructor(){super(...arguments),this.cellValueChanges=[],this.activeCellEdit=null,this.activeRowEdit=null,this.isPasting=!1,this.isRangeInAction=!1,this.onCellValueChanged=e=>{const t={column:e.column,rowIndex:e.rowIndex,rowPinned:e.rowPinned},i=null!==this.activeCellEdit&&this.cellPositionUtils.equals(this.activeCellEdit,t),n=null!==this.activeRowEdit&&this.rowPositionUtils.sameRow(this.activeRowEdit,t);if(!(i||n||this.isPasting||this.isRangeInAction))return;const{rowPinned:s,rowIndex:r,column:o,oldValue:a,value:l}=e,c={rowPinned:s,rowIndex:r,columnId:o.getColId(),newValue:l,oldValue:a};this.cellValueChanges.push(c)},this.clearStacks=()=>{this.undoStack.clear(),this.redoStack.clear()}}init(){if(!this.gos.get("undoRedoCellEditing"))return;const e=this.gos.get("undoRedoCellEditingLimit");e<=0||(this.undoStack=new rh(e),this.redoStack=new rh(e),this.addRowEditingListeners(),this.addCellEditingListeners(),this.addPasteListeners(),this.addFillListeners(),this.addCellKeyListeners(),this.addManagedListener(this.eventService,dt.EVENT_CELL_VALUE_CHANGED,this.onCellValueChanged),this.addManagedListener(this.eventService,dt.EVENT_MODEL_UPDATED,e=>{e.keepUndoRedoStack||this.clearStacks()}),this.addManagedListener(this.eventService,dt.EVENT_COLUMN_PIVOT_MODE_CHANGED,this.clearStacks),this.addManagedListener(this.eventService,dt.EVENT_NEW_COLUMNS_LOADED,this.clearStacks),this.addManagedListener(this.eventService,dt.EVENT_COLUMN_GROUP_OPENED,this.clearStacks),this.addManagedListener(this.eventService,dt.EVENT_COLUMN_ROW_GROUP_CHANGED,this.clearStacks),this.addManagedListener(this.eventService,dt.EVENT_COLUMN_MOVED,this.clearStacks),this.addManagedListener(this.eventService,dt.EVENT_COLUMN_PINNED,this.clearStacks),this.addManagedListener(this.eventService,dt.EVENT_COLUMN_VISIBLE,this.clearStacks),this.addManagedListener(this.eventService,dt.EVENT_ROW_DRAG_END,this.clearStacks),this.ctrlsService.whenReady(e=>{this.gridBodyCtrl=e.gridBodyCtrl}))}getCurrentUndoStackSize(){return this.undoStack?this.undoStack.getCurrentStackSize():0}getCurrentRedoStackSize(){return this.redoStack?this.redoStack.getCurrentStackSize():0}undo(e){const t={type:dt.EVENT_UNDO_STARTED,source:e};this.eventService.dispatchEvent(t);const i=this.undoRedo(this.undoStack,this.redoStack,"initialRange","oldValue","undo"),n={type:dt.EVENT_UNDO_ENDED,source:e,operationPerformed:i};this.eventService.dispatchEvent(n)}redo(e){const t={type:dt.EVENT_REDO_STARTED,source:e};this.eventService.dispatchEvent(t);const i=this.undoRedo(this.redoStack,this.undoStack,"finalRange","newValue","redo"),n={type:dt.EVENT_REDO_ENDED,source:e,operationPerformed:i};this.eventService.dispatchEvent(n)}undoRedo(e,t,i,n,s){if(!e)return!1;const r=e.pop();return!(!r||!r.cellValueChanges||(this.processAction(r,e=>e[n],s),r instanceof nh?this.processRange(this.rangeService,r.ranges||[r[i]]):this.processCell(r.cellValueChanges),t.push(r),0))}processAction(e,t,i){e.cellValueChanges.forEach(e=>{const{rowIndex:n,rowPinned:s,columnId:r}=e,o={rowIndex:n,rowPinned:s},a=this.rowPositionUtils.getRowNode(o);a.displayed&&a.setDataValue(r,t(e),i)})}processRange(e,t){let i;e.removeAllCellRanges(!0),t.forEach((n,s)=>{if(!n)return;const r=n.startRow,o=n.endRow;s===t.length-1&&(i={rowPinned:r.rowPinned,rowIndex:r.rowIndex,columnId:n.startColumn.getColId()},this.setLastFocusedCell(i));const a={rowStartIndex:r.rowIndex,rowStartPinned:r.rowPinned,rowEndIndex:o.rowIndex,rowEndPinned:o.rowPinned,columnStart:n.startColumn,columns:n.columns};e.addCellRange(a)})}processCell(e){const t=e[0],{rowIndex:i,rowPinned:n}=t,s={rowIndex:i,rowPinned:n},r=this.rowPositionUtils.getRowNode(s),o={rowPinned:t.rowPinned,rowIndex:r.rowIndex,columnId:t.columnId};this.setLastFocusedCell(o,this.rangeService)}setLastFocusedCell(e,t){const{rowIndex:i,columnId:n,rowPinned:s}=e,r=this.gridBodyCtrl.getScrollFeature(),o=this.columnModel.getGridColumn(n);if(!o)return;r.ensureIndexVisible(i),r.ensureColumnVisible(o);const a={rowIndex:i,column:o,rowPinned:s};this.focusService.setFocusedCell(g(p({},a),{forceBrowserFocus:!0})),null==t||t.setRangeToCell(a)}addRowEditingListeners(){this.addManagedListener(this.eventService,dt.EVENT_ROW_EDITING_STARTED,e=>{this.activeRowEdit={rowIndex:e.rowIndex,rowPinned:e.rowPinned}}),this.addManagedListener(this.eventService,dt.EVENT_ROW_EDITING_STOPPED,()=>{const e=new ih(this.cellValueChanges);this.pushActionsToUndoStack(e),this.activeRowEdit=null})}addCellEditingListeners(){this.addManagedListener(this.eventService,dt.EVENT_CELL_EDITING_STARTED,e=>{this.activeCellEdit={column:e.column,rowIndex:e.rowIndex,rowPinned:e.rowPinned}}),this.addManagedListener(this.eventService,dt.EVENT_CELL_EDITING_STOPPED,e=>{if(this.activeCellEdit=null,e.valueChanged&&!this.activeRowEdit&&!this.isPasting&&!this.isRangeInAction){const e=new ih(this.cellValueChanges);this.pushActionsToUndoStack(e)}})}addPasteListeners(){this.addManagedListener(this.eventService,dt.EVENT_PASTE_START,()=>{this.isPasting=!0}),this.addManagedListener(this.eventService,dt.EVENT_PASTE_END,()=>{const e=new ih(this.cellValueChanges);this.pushActionsToUndoStack(e),this.isPasting=!1})}addFillListeners(){this.addManagedListener(this.eventService,dt.EVENT_FILL_START,()=>{this.isRangeInAction=!0}),this.addManagedListener(this.eventService,dt.EVENT_FILL_END,e=>{const t=new nh(this.cellValueChanges,e.initialRange,e.finalRange);this.pushActionsToUndoStack(t),this.isRangeInAction=!1})}addCellKeyListeners(){this.addManagedListener(this.eventService,dt.EVENT_KEY_SHORTCUT_CHANGED_CELL_START,()=>{this.isRangeInAction=!0}),this.addManagedListener(this.eventService,dt.EVENT_KEY_SHORTCUT_CHANGED_CELL_END,()=>{let e;e=this.rangeService&&this.gos.get("enableRangeSelection")?new nh(this.cellValueChanges,void 0,void 0,[...this.rangeService.getCellRanges()]):new ih(this.cellValueChanges),this.pushActionsToUndoStack(e),this.isRangeInAction=!1})}pushActionsToUndoStack(e){this.undoStack.push(e),this.cellValueChanges=[],this.redoStack.clear()}};m([pe("focusService")],oh.prototype,"focusService",2),m([pe("ctrlsService")],oh.prototype,"ctrlsService",2),m([pe("cellPositionUtils")],oh.prototype,"cellPositionUtils",2),m([pe("rowPositionUtils")],oh.prototype,"rowPositionUtils",2),m([pe("columnModel")],oh.prototype,"columnModel",2),m([ge("rangeService")],oh.prototype,"rangeService",2),m([he],oh.prototype,"init",1),oh=m([ue("undoRedoService")],oh);var ah=class extends ot{findHeader(e,t){let i,n;if(e.column instanceof ht?i=this.columnModel.getDisplayedGroupAtDirection(e.column,t):(n=`getDisplayedCol${t}`,i=this.columnModel[n](e.column)),!i)return;let{headerRowIndex:s}=e;if("filter"!==this.getHeaderRowType(s)){const e=[i];for(;i.getParent();)i=i.getParent(),e.push(i);i=e[e.length-1-s]}const{column:r,headerRowIndex:o}=this.getHeaderIndexToFocus(i,s);return{column:r,headerRowIndex:o}}getHeaderIndexToFocus(e,t){let i;if(e instanceof ht&&this.isAnyChildSpanningHeaderHeight(e)&&e.isPadding()){const n=e;i=n.getLeafColumns()[0];let s=i;for(;s!==n;)t++,s=s.getParent()}return{column:i||e,headerRowIndex:t}}isAnyChildSpanningHeaderHeight(e){return!!e&&e.getLeafColumns().some(e=>e.isSpanHeaderHeight())}getColumnVisibleParent(e,t){const i=this.getHeaderRowType(t),n="column"===i;let s="filter"===i?e:e.getParent(),r=t-1,o=r;if(n&&this.isAnyChildSpanningHeaderHeight(e.getParent())){for(;s&&s.isPadding();)s=s.getParent(),r--;o=r,r<0&&(s=e,r=t,o=void 0)}return{column:s,headerRowIndex:r,headerRowIndexWithoutSpan:o}}getColumnVisibleChild(e,t,i="After"){let n=e,s=t+1,r=s;if("group"===this.getHeaderRowType(t)){const t=e.getDisplayedLeafColumns(),r="After"===i?t[0]:Le(t),o=[];let a=r;for(;a.getParent()!==e;)a=a.getParent(),o.push(a);if(n=r,r.isSpanHeaderHeight())for(let e=o.length-1;e>=0;e--){const t=o[e];if(!t.isPadding()){n=t;break}s++}else n=Le(o),n||(n=r)}return{column:n,headerRowIndex:s,headerRowIndexWithoutSpan:r}}getHeaderRowType(e){const t=this.ctrlsService.getHeaderRowContainerCtrl();if(t)return t.getRowType(e)}findColAtEdgeForHeaderRow(e,t){const i=this.columnModel.getAllDisplayedColumns(),n=i["start"===t?0:i.length-1];if(!n)return;const s=this.ctrlsService.getHeaderRowContainerCtrl(n.getPinned()).getRowType(e);return"group"==s?{headerRowIndex:e,column:this.columnModel.getColumnGroupAtLevel(n,e)}:{headerRowIndex:null==s?-1:e,column:n}}};m([pe("columnModel")],ah.prototype,"columnModel",2),m([pe("ctrlsService")],ah.prototype,"ctrlsService",2),ah=m([ue("headerPositionUtils")],ah);var lh=class{buildColumnDefs(e,t,i){const n=[],s={};return e.forEach(e=>{let r=!0,o=this.createDefFromColumn(e,t,i),a=e.getOriginalParent(),l=null;for(;a;){let e=null;if(a.isPadding()){a=a.getOriginalParent();continue}const t=s[a.getGroupId()];if(t){t.children.push(o),r=!1;break}if(e=this.createDefFromGroup(a),e&&(e.children=[o],s[e.groupId]=e,o=e,a=a.getOriginalParent()),null!=a&&l===a){r=!1;break}l=a}r&&n.push(o)}),n}createDefFromGroup(e){const t=_(e.getColGroupDef(),["children"]);return t&&(t.groupId=e.getGroupId()),t}createDefFromColumn(e,t,i){const n=_(e.getColDef());return n.colId=e.getColId(),n.width=e.getActualWidth(),n.rowGroup=e.isRowGroupActive(),n.rowGroupIndex=e.isRowGroupActive()?t.indexOf(e):null,n.pivot=e.isPivotActive(),n.pivotIndex=e.isPivotActive()?i.indexOf(e):null,n.aggFunc=e.isValueActive()?e.getAggFunc():null,n.hide=!e.isVisible()||void 0,n.pinned=e.isPinned()?e.getPinned():null,n.sort=e.getSort()?e.getSort():null,n.sortIndex=null!=e.getSortIndex()?e.getSortIndex():null,n}};lh=m([ue("columnDefFactory")],lh);var ch=class{getInitialRowClasses(e){const t=[];return S(e.extraCssClass)&&t.push(e.extraCssClass),t.push("ag-row"),t.push(e.rowFocused?"ag-row-focus":"ag-row-no-focus"),e.fadeRowIn&&t.push("ag-opacity-zero"),t.push(e.rowIsEven?"ag-row-even":"ag-row-odd"),e.rowNode.isRowPinned()&&t.push("ag-row-pinned"),e.rowNode.isSelected()&&t.push("ag-row-selected"),e.rowNode.footer&&t.push("ag-row-footer"),t.push("ag-row-level-"+e.rowLevel),e.rowNode.stub&&t.push("ag-row-loading"),e.fullWidthRow&&t.push("ag-full-width-row"),e.expandable&&(t.push("ag-row-group"),t.push(e.rowNode.expanded?"ag-row-group-expanded":"ag-row-group-contracted")),e.rowNode.dragging&&t.push("ag-row-dragging"),je(t,this.processClassesFromGridOptions(e.rowNode)),je(t,this.preProcessRowClassRules(e.rowNode)),t.push(e.printLayout?"ag-row-position-relative":"ag-row-position-absolute"),e.firstRowOnPage&&t.push("ag-row-first"),e.lastRowOnPage&&t.push("ag-row-last"),e.fullWidthRow&&("left"===e.pinned&&t.push("ag-cell-last-left-pinned"),"right"===e.pinned&&t.push("ag-cell-first-right-pinned")),t}processClassesFromGridOptions(e){const t=[],i=e=>{"string"==typeof e?t.push(e):Array.isArray(e)&&e.forEach(e=>t.push(e))},n=this.gos.get("rowClass");if(n){if("function"==typeof n)return console.warn("AG Grid: rowClass should not be a function, please use getRowClass instead"),[];i(n)}const s=this.gos.getCallback("getRowClass");return s&&i(s({data:e.data,node:e,rowIndex:e.rowIndex})),t}preProcessRowClassRules(e){const t=[];return this.processRowClassRules(e,e=>{t.push(e)},e=>{}),t}processRowClassRules(e,t,i){const n=this.gos.addGridCommonParams({data:e.data,node:e,rowIndex:e.rowIndex});this.stylingService.processClassRules(void 0,this.gos.get("rowClassRules"),n,t,i)}calculateRowLevel(e){return e.group?e.level:e.parent?e.parent.level+1:0}};m([pe("stylingService")],ch.prototype,"stylingService",2),m([pe("gridOptionsService")],ch.prototype,"gos",2),ch=m([ue("rowCssClassCalculator")],ch);var hh=class extends ot{init(){this.isAccentedSort=this.gos.get("accentedSort"),this.primaryColumnsSortGroups=this.gos.isColumnsSortingCoupledToGroup(),this.addManagedPropertyListener("accentedSort",e=>this.isAccentedSort=e.currentValue),this.addManagedPropertyListener("autoGroupColumnDef",()=>this.primaryColumnsSortGroups=this.gos.isColumnsSortingCoupledToGroup())}doFullSort(e,t){const i=e.map((e,t)=>({currentPos:t,rowNode:e}));return i.sort(this.compareRowNodes.bind(this,t)),i.map(e=>e.rowNode)}compareRowNodes(e,t,i){const n=t.rowNode,s=i.rowNode;for(let t=0,i=e.length;t<i;t++){const i=e[t],r="desc"===i.sort,o=this.getValue(n,i.column),a=this.getValue(s,i.column);let l;const c=this.getComparator(i,n);if(l=c?c(o,a,n,s,r):ds.defaultComparator(o,a,this.isAccentedSort),!isNaN(l)&&0!==l)return"asc"===i.sort?l:-1*l}return t.currentPos-i.currentPos}getComparator(e,t){const i=e.column,n=i.getColDef().comparator;if(null!=n)return n;if(!i.getColDef().showRowGroup)return;const s=!t.group&&i.getColDef().field;if(!s)return;const r=this.columnModel.getPrimaryColumn(s);return r?r.getColDef().comparator:void 0}getValue(e,t){var i,n;if(!this.primaryColumnsSortGroups)return this.valueService.getValue(t,e,!1,!1);if(e.rowGroupColumn===t){if(this.gos.isGroupUseEntireRow(this.columnModel.isPivotActive())){const n=null==(i=e.allLeafChildren)?void 0:i[0];return n?this.valueService.getValue(t,n,!1,!1):void 0}const s=this.columnModel.getGroupDisplayColumnForGroup(t.getId());if(!s)return;return null==(n=e.groupData)?void 0:n[s.getId()]}return e.group&&t.getColDef().showRowGroup?void 0:this.valueService.getValue(t,e,!1,!1)}};m([pe("valueService")],hh.prototype,"valueService",2),m([pe("columnModel")],hh.prototype,"columnModel",2),m([he],hh.prototype,"init",1),hh=m([ue("rowNodeSorter")],hh);var dh=class extends ot{constructor(){super(...arguments),this.params={},this.ready=!1,this.readyCallbacks=[]}checkReady(){const e=this.params;this.ready=null!=e.gridCtrl&&null!=e.gridBodyCtrl&&null!=e.center&&null!=e.left&&null!=e.right&&null!=e.bottomCenter&&null!=e.bottomLeft&&null!=e.bottomRight&&null!=e.topCenter&&null!=e.topLeft&&null!=e.topRight&&null!=e.stickyTopCenter&&null!=e.stickyTopLeft&&null!=e.stickyTopRight&&null!=e.stickyBottomCenter&&null!=e.stickyBottomLeft&&null!=e.stickyBottomRight&&null!=e.centerHeader&&null!=e.leftHeader&&null!=e.rightHeader&&null!=e.fakeHScrollComp&&null!=e.fakeVScrollComp&&null!=e.gridHeaderCtrl,this.ready&&(this.readyCallbacks.forEach(t=>t(e)),this.readyCallbacks.length=0)}whenReady(e){this.ready?e(this.params):this.readyCallbacks.push(e)}register(e,t){this.params[e]=t,this.checkReady()}registerHeaderContainer(e,t){switch(t){case"left":this.params.leftHeader=e;break;case"right":this.params.rightHeader=e;break;default:this.params.centerHeader=e}this.checkReady()}get(e){return this.params[e]}getParams(){return this.params}getGridBodyCtrl(){return this.params.gridBodyCtrl}getHeaderRowContainerCtrls(){return[this.params.leftHeader,this.params.rightHeader,this.params.centerHeader]}getHeaderRowContainerCtrl(e){switch(e){case"left":return this.params.leftHeader;case"right":return this.params.rightHeader;default:return this.params.centerHeader}}};dh.NAME="ctrlsService",dh=m([ue(dh.NAME)],dh);var uh=class extends ot{constructor(){super(...arguments),this.registry={}}register(e){this.registry[e.controllerName]=e.controllerClass}getInstance(e){const t=this.registry[e];if(null!=t)return new t}};uh=m([ue("ctrlsFactory")],uh);var ph=class extends ws{constructor(e,t){super(e),this.direction=t,this.hideTimeout=null}postConstruct(){this.addManagedListener(this.eventService,dt.EVENT_SCROLL_VISIBILITY_CHANGED,this.onScrollVisibilityChanged.bind(this)),this.onScrollVisibilityChanged(),this.addOrRemoveCssClass("ag-apple-scrollbar",Pi()||Ni())}initialiseInvisibleScrollbar(){void 0===this.invisibleScrollbar&&(this.invisibleScrollbar=zi(),this.invisibleScrollbar&&(this.hideAndShowInvisibleScrollAsNeeded(),this.addActiveListenerToggles()))}addActiveListenerToggles(){const e=this.getGui();["mouseenter","mousedown","touchstart"].forEach(t=>this.addManagedListener(e,t,()=>this.addOrRemoveCssClass("ag-scrollbar-active",!0))),["mouseleave","touchend"].forEach(t=>this.addManagedListener(e,t,()=>this.addOrRemoveCssClass("ag-scrollbar-active",!1)))}onScrollVisibilityChanged(){void 0===this.invisibleScrollbar&&this.initialiseInvisibleScrollbar(),this.animationFrameService.requestAnimationFrame(()=>this.setScrollVisible())}hideAndShowInvisibleScrollAsNeeded(){this.addManagedListener(this.eventService,dt.EVENT_BODY_SCROLL,e=>{e.direction===this.direction&&(null!==this.hideTimeout&&(window.clearTimeout(this.hideTimeout),this.hideTimeout=null),this.addOrRemoveCssClass("ag-scrollbar-scrolling",!0))}),this.addManagedListener(this.eventService,dt.EVENT_BODY_SCROLL_END,()=>{this.hideTimeout=window.setTimeout(()=>{this.addOrRemoveCssClass("ag-scrollbar-scrolling",!1),this.hideTimeout=null},400)})}attemptSettingScrollPosition(e){const t=this.getViewport();ie(()=>Mn(t),()=>this.setScrollPosition(e),100)}getViewport(){return this.eViewport}getContainer(){return this.eContainer}onScrollCallback(e){this.addManagedListener(this.getViewport(),"scroll",e)}};m([Es("eViewport")],ph.prototype,"eViewport",2),m([Es("eContainer")],ph.prototype,"eContainer",2),m([pe("scrollVisibleService")],ph.prototype,"scrollVisibleService",2),m([pe("ctrlsService")],ph.prototype,"ctrlsService",2),m([pe("animationFrameService")],ph.prototype,"animationFrameService",2);var gh=class e extends ph{constructor(){super(e.TEMPLATE,"horizontal")}postConstruct(){super.postConstruct();const e=this.setFakeHScrollSpacerWidths.bind(this);this.addManagedListener(this.eventService,dt.EVENT_DISPLAYED_COLUMNS_CHANGED,e),this.addManagedListener(this.eventService,dt.EVENT_DISPLAYED_COLUMNS_WIDTH_CHANGED,e),this.addManagedListener(this.eventService,dt.EVENT_PINNED_ROW_DATA_CHANGED,this.onPinnedRowDataChanged.bind(this)),this.addManagedPropertyListener("domLayout",e),this.ctrlsService.register("fakeHScrollComp",this),this.createManagedBean(new Ta(e=>this.eContainer.style.width=`${e}px`)),this.addManagedPropertyListeners(["suppressHorizontalScroll"],this.onScrollVisibilityChanged.bind(this))}initialiseInvisibleScrollbar(){void 0===this.invisibleScrollbar&&(this.enableRtl=this.gos.get("enableRtl"),super.initialiseInvisibleScrollbar(),this.invisibleScrollbar&&this.refreshCompBottom())}onPinnedRowDataChanged(){this.refreshCompBottom()}refreshCompBottom(){if(!this.invisibleScrollbar)return;const e=this.pinnedRowModel.getPinnedBottomTotalHeight();this.getGui().style.bottom=`${e}px`}onScrollVisibilityChanged(){super.onScrollVisibilityChanged(),this.setFakeHScrollSpacerWidths()}setFakeHScrollSpacerWidths(){const e=this.scrollVisibleService.isVerticalScrollShowing();let t=this.columnModel.getDisplayedColumnsRightWidth();const i=!this.enableRtl&&e,n=this.gos.getScrollbarWidth();i&&(t+=n),Nn(this.eRightSpacer,t),this.eRightSpacer.classList.toggle("ag-scroller-corner",t<=n);let s=this.columnModel.getDisplayedColumnsLeftWidth();this.enableRtl&&e&&(s+=n),Nn(this.eLeftSpacer,s),this.eLeftSpacer.classList.toggle("ag-scroller-corner",s<=n)}setScrollVisible(){const e=this.scrollVisibleService.isHorizontalScrollShowing(),t=this.invisibleScrollbar,i=this.gos.get("suppressHorizontalScroll"),n=e&&this.gos.getScrollbarWidth()||0,s=i?0:0===n&&t?16:n;this.addOrRemoveCssClass("ag-scrollbar-invisible",t),_n(this.getGui(),s),_n(this.eViewport,s),_n(this.eContainer,s),this.setDisplayed(e,{skipAriaHidden:!0})}getScrollPosition(){return bn(this.getViewport(),this.enableRtl)}setScrollPosition(e){Mn(this.getViewport())||this.attemptSettingScrollPosition(e),Sn(this.getViewport(),e,this.enableRtl)}};gh.TEMPLATE='<div class="ag-body-horizontal-scroll" aria-hidden="true">\n            <div class="ag-horizontal-left-spacer" ref="eLeftSpacer"></div>\n            <div class="ag-body-horizontal-scroll-viewport" ref="eViewport">\n                <div class="ag-body-horizontal-scroll-container" ref="eContainer"></div>\n            </div>\n            <div class="ag-horizontal-right-spacer" ref="eRightSpacer"></div>\n        </div>',m([Es("eLeftSpacer")],gh.prototype,"eLeftSpacer",2),m([Es("eRightSpacer")],gh.prototype,"eRightSpacer",2),m([pe("columnModel")],gh.prototype,"columnModel",2),m([pe("pinnedRowModel")],gh.prototype,"pinnedRowModel",2),m([he],gh.prototype,"postConstruct",1);var fh=gh,mh=class extends ot{postConstruct(){const e=this.checkContainerWidths.bind(this);this.addManagedListener(this.eventService,dt.EVENT_DISPLAYED_COLUMNS_CHANGED,e),this.addManagedListener(this.eventService,dt.EVENT_DISPLAYED_COLUMNS_WIDTH_CHANGED,e),this.addManagedPropertyListener("domLayout",e)}checkContainerWidths(){const e=this.gos.isDomLayout("print"),t=e?0:this.columnModel.getDisplayedColumnsLeftWidth(),i=e?0:this.columnModel.getDisplayedColumnsRightWidth();t!=this.leftWidth&&(this.leftWidth=t,this.eventService.dispatchEvent({type:dt.EVENT_LEFT_PINNED_WIDTH_CHANGED})),i!=this.rightWidth&&(this.rightWidth=i,this.eventService.dispatchEvent({type:dt.EVENT_RIGHT_PINNED_WIDTH_CHANGED}))}getPinnedRightWidth(){return this.rightWidth}getPinnedLeftWidth(){return this.leftWidth}};m([pe("columnModel")],mh.prototype,"columnModel",2),m([he],mh.prototype,"postConstruct",1),mh=m([ue("pinnedWidthService")],mh);var vh=class extends ot{constructor(){super(...arguments),this.events=[]}postConstruct(){"clientSide"==this.rowModel.getType()&&(this.clientSideRowModel=this.rowModel)}dispatchExpanded(e,t){if(null==this.clientSideRowModel)return void this.eventService.dispatchEvent(e);this.events.push(e);const i=()=>{this.clientSideRowModel&&this.clientSideRowModel.onRowGroupOpened(),this.events.forEach(e=>this.eventService.dispatchEvent(e)),this.events=[]};t?i():(null==this.dispatchExpandedDebounced&&(this.dispatchExpandedDebounced=this.animationFrameService.debounce(i)),this.dispatchExpandedDebounced())}};m([pe("animationFrameService")],vh.prototype,"animationFrameService",2),m([pe("rowModel")],vh.prototype,"rowModel",2),m([he],vh.prototype,"postConstruct",1),vh=m([ue("rowNodeEventThrottle")],vh);var yh=(e,t)=>{var i;return"clientSide"===(null!=(i=t.rowModelType)?i:"clientSide")?{module:"@ag-grid-enterprise/row-grouping"}:null},Ch={enableRowGroup:yh,rowGroup:yh,rowGroupIndex:yh,enablePivot:yh,enableValue:yh,pivot:yh,pivotIndex:yh,aggFunc:yh,cellEditor:e=>"agRichSelect"===e.cellEditor||"agRichSelectCellEditor"===e.cellEditor?{module:"@ag-grid-enterprise/rich-select"}:null,menuTabs:e=>{var t;const i=["columnsMenuTab","generalMenuTab"];return(null==(t=e.menuTabs)?void 0:t.some(e=>i.includes(e)))?{module:"@ag-grid-enterprise/menu"}:null},columnsMenuParams:{module:["@ag-grid-enterprise/menu","@ag-grid-enterprise/column-tool-panel"]},columnChooserParams:{module:["@ag-grid-enterprise/menu","@ag-grid-enterprise/column-tool-panel"]},headerCheckboxSelection:{supportedRowModels:["clientSide","serverSide"],dependencies:(e,{rowSelection:t})=>"multiple"===t?null:"headerCheckboxSelection is only supported with rowSelection=multiple"},headerCheckboxSelectionFilteredOnly:{supportedRowModels:["clientSide"],dependencies:(e,{rowSelection:t})=>"multiple"===t?null:"headerCheckboxSelectionFilteredOnly is only supported with rowSelection=multiple"},headerCheckboxSelectionCurrentPageOnly:{supportedRowModels:["clientSide"],dependencies:(e,{rowSelection:t})=>"multiple"===t?null:"headerCheckboxSelectionCurrentPageOnly is only supported with rowSelection=multiple"},children:()=>bh},bh={objectName:"colDef",allProperties:Object.keys({headerName:void 0,columnGroupShow:void 0,headerClass:void 0,toolPanelClass:void 0,headerValueGetter:void 0,pivotKeys:void 0,groupId:void 0,colId:void 0,sort:void 0,initialSort:void 0,field:void 0,type:void 0,cellDataType:void 0,tooltipComponent:void 0,tooltipField:void 0,headerTooltip:void 0,cellClass:void 0,showRowGroup:void 0,filter:void 0,initialAggFunc:void 0,defaultAggFunc:void 0,aggFunc:void 0,pinned:void 0,initialPinned:void 0,chartDataType:void 0,cellAriaRole:void 0,cellEditorPopupPosition:void 0,headerGroupComponent:void 0,headerGroupComponentParams:void 0,cellStyle:void 0,cellRenderer:void 0,cellRendererParams:void 0,cellEditor:void 0,cellEditorParams:void 0,filterParams:void 0,pivotValueColumn:void 0,headerComponent:void 0,headerComponentParams:void 0,floatingFilterComponent:void 0,floatingFilterComponentParams:void 0,tooltipComponentParams:void 0,refData:void 0,columnsMenuParams:void 0,columnChooserParams:void 0,children:void 0,sortingOrder:void 0,allowedAggFuncs:void 0,menuTabs:void 0,pivotTotalColumnIds:void 0,cellClassRules:void 0,icons:void 0,sortIndex:void 0,initialSortIndex:void 0,flex:void 0,initialFlex:void 0,width:void 0,initialWidth:void 0,minWidth:void 0,maxWidth:void 0,rowGroupIndex:void 0,initialRowGroupIndex:void 0,pivotIndex:void 0,initialPivotIndex:void 0,suppressCellFlash:void 0,suppressColumnsToolPanel:void 0,suppressFiltersToolPanel:void 0,openByDefault:void 0,marryChildren:void 0,suppressStickyLabel:void 0,hide:void 0,initialHide:void 0,rowGroup:void 0,initialRowGroup:void 0,pivot:void 0,initialPivot:void 0,checkboxSelection:void 0,showDisabledCheckboxes:void 0,headerCheckboxSelection:void 0,headerCheckboxSelectionFilteredOnly:void 0,headerCheckboxSelectionCurrentPageOnly:void 0,suppressMenu:void 0,suppressHeaderMenuButton:void 0,suppressMovable:void 0,lockPosition:void 0,lockVisible:void 0,lockPinned:void 0,unSortIcon:void 0,suppressSizeToFit:void 0,suppressAutoSize:void 0,enableRowGroup:void 0,enablePivot:void 0,enableValue:void 0,editable:void 0,suppressPaste:void 0,suppressNavigable:void 0,enableCellChangeFlash:void 0,rowDrag:void 0,dndSource:void 0,autoHeight:void 0,wrapText:void 0,sortable:void 0,resizable:void 0,singleClickEdit:void 0,floatingFilter:void 0,cellEditorPopup:void 0,suppressFillHandle:void 0,wrapHeaderText:void 0,autoHeaderHeight:void 0,dndSourceOnRowDrag:void 0,valueGetter:void 0,valueSetter:void 0,filterValueGetter:void 0,keyCreator:void 0,valueFormatter:void 0,valueParser:void 0,comparator:void 0,equals:void 0,pivotComparator:void 0,suppressKeyboardEvent:void 0,suppressHeaderKeyboardEvent:void 0,colSpan:void 0,rowSpan:void 0,getQuickFilterText:void 0,onCellValueChanged:void 0,onCellClicked:void 0,onCellDoubleClicked:void 0,onCellContextMenu:void 0,rowDragText:void 0,tooltipValueGetter:void 0,cellRendererSelector:void 0,cellEditorSelector:void 0,suppressSpanHeaderHeight:void 0,useValueFormatterForExport:void 0,useValueParserForImport:void 0,mainMenuItems:void 0,contextMenuItems:void 0,suppressFloatingFilterButton:void 0,suppressHeaderFilterButton:void 0,suppressHeaderContextMenu:void 0,loadingCellRenderer:void 0,loadingCellRendererParams:void 0,loadingCellRendererSelector:void 0}),docsUrl:"column-properties/",deprecations:{columnsMenuParams:{version:"31.1",message:"Use `columnChooserParams` instead."},suppressMenu:{version:"31.1",message:"Use `suppressHeaderMenuButton` instead."},suppressCellFlash:{version:"31.2",message:"Use `enableCellChangeFlash={false}` in the ColDef"},dndSource:{version:"31.2",message:"This feature has been replaced by `Row Dragging to an External DropZone`."},dndSourceOnRowDrag:{version:"31.2",message:"This feature has been replaced by `Row Dragging to an External DropZone`."}},validations:Ch},Sh={suppressContextMenu:!1,preventDefaultOnContextMenu:!1,allowContextMenuWithControlKey:!1,suppressMenuHide:!1,enableBrowserTooltips:!1,tooltipTrigger:"hover",tooltipShowDelay:2e3,tooltipHideDelay:1e4,tooltipMouseTrack:!1,tooltipShowMode:"standard",tooltipInteraction:!1,copyHeadersToClipboard:!1,copyGroupHeadersToClipboard:!1,clipboardDelimiter:"\t",suppressCopyRowsToClipboard:!1,suppressCopySingleCellRanges:!1,suppressLastEmptyLineOnPaste:!1,suppressClipboardPaste:!1,suppressClipboardApi:!1,suppressCutToClipboard:!1,maintainColumnOrder:!1,suppressFieldDotNotation:!1,allowDragFromColumnsToolPanel:!1,suppressMovableColumns:!1,suppressColumnMoveAnimation:!1,suppressDragLeaveHidesColumns:!1,suppressRowGroupHidesColumns:!1,suppressAutoSize:!1,autoSizePadding:20,skipHeaderOnAutoSize:!1,singleClickEdit:!1,suppressClickEdit:!1,readOnlyEdit:!1,stopEditingWhenCellsLoseFocus:!1,enterNavigatesVertically:!1,enterNavigatesVerticallyAfterEdit:!1,enableCellEditingOnBackspace:!1,undoRedoCellEditing:!1,undoRedoCellEditingLimit:10,suppressCsvExport:!1,suppressExcelExport:!1,cacheQuickFilter:!1,includeHiddenColumnsInQuickFilter:!1,excludeChildrenWhenTreeDataFiltering:!1,enableAdvancedFilter:!1,includeHiddenColumnsInAdvancedFilter:!1,enableCharts:!1,suppressChartToolPanelsButton:!1,masterDetail:!1,keepDetailRows:!1,keepDetailRowsCount:10,detailRowAutoHeight:!1,tabIndex:0,rowBuffer:10,valueCache:!1,valueCacheNeverExpires:!1,enableCellExpressions:!1,suppressTouch:!1,suppressFocusAfterRefresh:!1,suppressAsyncEvents:!1,suppressBrowserResizeObserver:!1,suppressPropertyNamesCheck:!1,suppressChangeDetection:!1,debug:!1,suppressLoadingOverlay:!1,suppressNoRowsOverlay:!1,pagination:!1,paginationPageSize:100,paginationPageSizeSelector:!0,paginationAutoPageSize:!1,paginateChildRows:!1,suppressPaginationPanel:!1,pivotMode:!1,pivotPanelShow:"never",pivotDefaultExpanded:0,pivotSuppressAutoColumn:!1,suppressExpandablePivotGroups:!1,functionsReadOnly:!1,suppressAggFuncInHeader:!1,alwaysAggregateAtRootLevel:!1,aggregateOnlyChangedColumns:!1,suppressAggFilteredOnly:!1,removePivotHeaderRowWhenSingleValueColumn:!1,animateRows:!0,enableCellChangeFlash:!1,cellFlashDelay:500,cellFlashDuration:500,cellFadeDelay:1e3,cellFadeDuration:1e3,allowShowChangeAfterFilter:!1,domLayout:"normal",ensureDomOrder:!1,enableRtl:!1,suppressColumnVirtualisation:!1,suppressMaxRenderedRowRestriction:!1,suppressRowVirtualisation:!1,rowDragManaged:!1,suppressRowDrag:!1,suppressMoveWhenRowDragging:!1,rowDragEntireRow:!1,rowDragMultiRow:!1,embedFullWidthRows:!1,groupDisplayType:"singleColumn",groupDefaultExpanded:0,groupMaintainOrder:!1,groupSelectsChildren:!1,groupIncludeTotalFooter:!1,groupSuppressBlankHeader:!1,groupSelectsFiltered:!1,showOpenedGroup:!1,groupRemoveSingleChildren:!1,groupRemoveLowestSingleChildren:!1,groupHideOpenParents:!1,groupAllowUnbalanced:!1,rowGroupPanelShow:"never",suppressMakeColumnVisibleAfterUnGroup:!1,treeData:!1,rowGroupPanelSuppressSort:!1,suppressGroupRowsSticky:!1,rowModelType:"clientSide",asyncTransactionWaitMillis:50,suppressModelUpdateAfterUpdateTransaction:!1,cacheOverflowSize:1,infiniteInitialRowCount:1,serverSideInitialRowCount:1,suppressServerSideInfiniteScroll:!1,cacheBlockSize:100,maxBlocksInCache:-1,maxConcurrentDatasourceRequests:2,blockLoadDebounceMillis:0,purgeClosedRowNodes:!1,serverSideSortAllLevels:!1,serverSideOnlyRefreshFilteredGroups:!1,serverSideSortOnServer:!1,serverSideFilterOnServer:!1,serverSidePivotResultFieldSeparator:"_",viewportRowModelPageSize:5,viewportRowModelBufferSize:5,alwaysShowHorizontalScroll:!1,alwaysShowVerticalScroll:!1,debounceVerticalScrollbar:!1,suppressHorizontalScroll:!1,suppressScrollOnNewData:!1,suppressScrollWhenPopupsAreOpen:!1,suppressAnimationFrame:!1,suppressMiddleClickScrolls:!1,suppressPreventDefaultOnMouseWheel:!1,rowMultiSelectWithClick:!1,suppressRowDeselection:!1,suppressRowClickSelection:!1,suppressCellFocus:!1,suppressHeaderFocus:!1,suppressMultiRangeSelection:!1,enableCellTextSelection:!1,enableRangeSelection:!1,enableRangeHandle:!1,enableFillHandle:!1,fillHandleDirection:"xy",suppressClearOnFillReduction:!1,accentedSort:!1,unSortIcon:!1,suppressMultiSort:!1,alwaysMultiSort:!1,suppressMaintainUnsortedOrder:!1,suppressRowHoverHighlight:!1,suppressRowTransform:!1,columnHoverHighlight:!1,deltaSort:!1,enableGroupEdit:!1,suppressGroupMaintainValueType:!1,functionsPassive:!1,groupLockGroupColumns:0,serverSideEnableClientSideSort:!1,suppressServerSideFullWidthLoadingRow:!1,pivotMaxGeneratedColumns:-1},wh={sideBar:{module:"@ag-grid-enterprise/side-bar"},statusBar:{module:"@ag-grid-enterprise/status-bar"},enableCharts:{module:"@ag-grid-enterprise/charts"},getMainMenuItems:{module:"@ag-grid-enterprise/menu"},getContextMenuItems:{module:"@ag-grid-enterprise/menu"},allowContextMenuWithControlKey:{module:"@ag-grid-enterprise/menu"},enableAdvancedFilter:{module:"@ag-grid-enterprise/advanced-filter"},treeData:{supportedRowModels:["clientSide","serverSide"],module:"@ag-grid-enterprise/row-grouping",dependencies:e=>{var t;const i=null!=(t=e.rowModelType)?t:"clientSide";switch(i){case"clientSide":const t=`treeData requires 'getDataPath' in the ${i} row model.`;return e.getDataPath?null:t;case"serverSide":const n=`treeData requires 'isServerSideGroup' and 'getServerSideGroupKey' in the ${i} row model.`;return e.isServerSideGroup&&e.getServerSideGroupKey?null:n}return null}},masterDetail:{module:"@ag-grid-enterprise/master-detail"},enableRangeSelection:{module:"@ag-grid-enterprise/range-selection"},enableRangeHandle:{dependencies:{enableRangeSelection:[!0]}},enableFillHandle:{dependencies:{enableRangeSelection:[!0]}},groupDefaultExpanded:{supportedRowModels:["clientSide"]},groupIncludeFooter:{supportedRowModels:["clientSide","serverSide"],dependencies:e=>{var t;switch(null!=(t=e.rowModelType)?t:"clientSide"){case"clientSide":return null;case"serverSide":const t="groupIncludeFooter is not supported alongside suppressServerSideInfiniteScroll";return e.suppressServerSideInfiniteScroll?t:null}return null}},groupIncludeTotalFooter:{supportedRowModels:["clientSide"]},groupRemoveSingleChildren:{dependencies:{groupHideOpenParents:[void 0,!1],groupRemoveLowestSingleChildren:[void 0,!1]}},groupRemoveLowestSingleChildren:{dependencies:{groupHideOpenParents:[void 0,!1],groupRemoveSingleChildren:[void 0,!1]}},groupSelectsChildren:{dependencies:{rowSelection:["multiple"]}},suppressParentsInRowNodes:{dependencies:{groupSelectsChildren:[void 0,!1]}},viewportDatasource:{supportedRowModels:["viewport"],module:"@ag-grid-enterprise/viewport-row-model"},serverSideDatasource:{supportedRowModels:["serverSide"],module:"@ag-grid-enterprise/server-side-row-model"},cacheBlockSize:{supportedRowModels:["serverSide","infinite"]},datasource:{supportedRowModels:["infinite"],module:"@ag-grid-community/infinite-row-model"},rowData:{supportedRowModels:["clientSide"],module:"@ag-grid-community/client-side-row-model"},columnDefs:()=>bh,defaultColDef:()=>bh,defaultColGroupDef:()=>bh,autoGroupColumnDef:()=>bh},xh={objectName:"gridOptions",allProperties:[...Nt.ALL_PROPERTIES,..._t.EVENT_CALLBACKS],propertyExceptions:["api","columnApi"],docsUrl:"grid-options/",deprecations:{enableChartToolPanelsButton:{version:"29"},functionsPassive:{version:"29.2"},onColumnRowGroupChangeRequest:{version:"29.2"},onColumnPivotChangeRequest:{version:"29.2"},onColumnValueChangeRequest:{version:"29.2"},onColumnAggFuncChangeRequest:{version:"29.2"},serverSideFilterAllLevels:{version:"30",message:"All server-side group levels are now filtered by default. This can be toggled using `serverSideOnlyRefreshFilteredGroups`."},suppressAggAtRootLevel:{version:"30",message:"The root level aggregation is now suppressed by default. This can be toggled using  `alwaysAggregateAtRootLevel`."},excludeHiddenColumnsFromQuickFilter:{version:"30",message:"Hidden columns are now excluded from the Quick Filter by default. This can be toggled using `includeHiddenColumnsInQuickFilter`."},enterMovesDown:{version:"30",renamed:"enterNavigatesVertically"},enterMovesDownAfterEdit:{version:"30",renamed:"enterNavigatesVerticallyAfterEdit"},suppressParentsInRowNodes:{version:"30.2",message:"Using suppressParentsInRowNodes is no longer recommended. To serialize nodes it is now recommended to instead remove the parent node reference before serialization."},advancedFilterModel:{version:"31",message:"Use `initialState.filter.advancedFilterModel` instead."},suppressAsyncEvents:{version:"31",message:"Events should be handled asynchronously."},cellFadeDelay:{version:"31.1",renamed:"cellFadeDuration"},cellFlashDelay:{version:"31.1",renamed:"cellFlashDuration"},suppressServerSideInfiniteScroll:{version:"31.1"},serverSideSortOnServer:{version:"31.1"},serverSideFilterOnServer:{version:"31.1"},enableCellChangeFlash:{version:"31.2",message:"Use `enableCellChangeFlash` in the `ColDef` or `defaultColDef` for all columns."},groupIncludeFooter:{version:"31.3",message:"Use `groupTotalRow` instead."},groupIncludeTotalFooter:{version:"31.3",message:"Use `grandTotalRow` instead."}},validations:wh},Eh=class{constructor(){this.destroyed=!1,this.domDataKey="__AG_"+Math.random().toString(),this.propertyEventService=new ye,this.globalEventHandlerFactory=e=>(t,i)=>{if(this.destroyed)return;const n=ut.has(t);if(n&&!e||!n&&e)return;const s=_t.getCallbackForEvent(t),r=this.gridOptions[s];"function"==typeof r&&this.frameworkOverrides.wrapOutgoing(()=>{r(i)})}}get context(){return this.gridOptions.context}init(){this.columnApi=new Rc(this.api);const e=!this.get("suppressAsyncEvents");this.eventService.addGlobalListener(this.globalEventHandlerFactory().bind(this),e),this.eventService.addGlobalListener(this.globalEventHandlerFactory(!0).bind(this),!1),this.propertyEventService.setFrameworkOverrides(this.frameworkOverrides),this.getScrollbarWidth()}destroy(){this.destroyed=!0,this.columnApi=void 0}get(e){var t;return null!=(t=this.gridOptions[e])?t:Sh[e]}getCallback(e){return this.mergeGridCommonParams(this.gridOptions[e])}exists(e){return S(this.gridOptions[e])}mergeGridCommonParams(e){return e?t=>{const i=t;return i.api=this.api,i.columnApi=this.columnApi,i.context=this.context,e(i)}:e}static toBoolean(e){return"boolean"==typeof e?e:"string"==typeof e&&("TRUE"===e.toUpperCase()||""==e)}static toNumber(e){if("number"==typeof e)return e;if("string"==typeof e){const t=parseInt(e);if(isNaN(t))return;return t}}static toConstrainedNum(e,t){return i=>{const n=Eh.toNumber(i);if(!(null==n||n<e||n>t))return n}}static getCoercedValue(e,t){const i=Eh.PROPERTY_COERCIONS.get(e);return i?i(t):t}static getCoercedGridOptions(e){const t={};return Object.entries(e).forEach(([e,i])=>{const n=Eh.getCoercedValue(e,i);t[e]=n}),t}updateGridOptions({options:e,force:t,source:i="api"}){const n={id:Eh.changeSetId++,properties:[]},s=[];Object.entries(e).forEach(([e,r])=>{"api"===i&&kt[e]&&j(`${e} is an initial property and cannot be updated.`);const o=Eh.getCoercedValue(e,r),a=t||"object"==typeof o&&"api"===i,l=this.gridOptions[e];if(a||l!==o){this.gridOptions[e]=o;const t={type:e,currentValue:o,previousValue:l,changeSet:n,source:i};s.push(t)}}),this.validationService.processGridOptions(this.gridOptions),n.properties=s.map(e=>e.type),s.forEach(e=>{this.gridOptions.debug&&console.log(`AG Grid: Updated property ${e.type} from `,e.previousValue," to  ",e.currentValue),this.propertyEventService.dispatchEvent(e)})}addEventListener(e,t){this.propertyEventService.addEventListener(e,t)}removeEventListener(e,t){this.propertyEventService.removeEventListener(e,t)}getScrollbarWidth(){if(null==this.scrollbarWidth){const e="number"==typeof this.gridOptions.scrollbarWidth&&this.gridOptions.scrollbarWidth>=0?this.gridOptions.scrollbarWidth:Bi();null!=e&&(this.scrollbarWidth=e,this.eventService.dispatchEvent({type:dt.EVENT_SCROLLBAR_WIDTH_CHANGED}))}return this.scrollbarWidth}isRowModelType(e){return this.gridOptions.rowModelType===e||"clientSide"===e&&w(this.gridOptions.rowModelType)}isDomLayout(e){var t;return(null!=(t=this.gridOptions.domLayout)?t:"normal")===e}isRowSelection(){return"single"===this.gridOptions.rowSelection||"multiple"===this.gridOptions.rowSelection}useAsyncEvents(){return!this.get("suppressAsyncEvents")}isGetRowHeightFunction(){return"function"==typeof this.gridOptions.getRowHeight}getRowHeightForNode(e,t=!1,i){if(null==i&&(i=this.environment.getDefaultRowHeight()),this.isGetRowHeightFunction()){if(t)return{height:i,estimated:!0};const n={node:e,data:e.data},s=this.getCallback("getRowHeight")(n);if(this.isNumeric(s))return 0===s&&j("The return of `getRowHeight` cannot be zero. If the intention is to hide rows, use a filter instead."),{height:Math.max(1,s),estimated:!1}}return e.detail&&this.get("masterDetail")?this.getMasterDetailRowHeight():{height:this.gridOptions.rowHeight&&this.isNumeric(this.gridOptions.rowHeight)?this.gridOptions.rowHeight:i,estimated:!1}}getMasterDetailRowHeight(){return this.get("detailRowAutoHeight")?{height:1,estimated:!1}:this.isNumeric(this.gridOptions.detailRowHeight)?{height:this.gridOptions.detailRowHeight,estimated:!1}:{height:300,estimated:!1}}getRowHeightAsNumber(){if(!this.gridOptions.rowHeight||w(this.gridOptions.rowHeight))return this.environment.getDefaultRowHeight();const e=this.environment.refreshRowHeightVariable();return-1!==e?e:(console.warn("AG Grid row height must be a number if not using standard row model"),this.environment.getDefaultRowHeight())}isNumeric(e){return!isNaN(e)&&"number"==typeof e&&isFinite(e)}getDomDataKey(){return this.domDataKey}getDomData(e,t){const i=e[this.getDomDataKey()];return i?i[t]:void 0}setDomData(e,t,i){const n=this.getDomDataKey();let s=e[n];w(s)&&(s={},e[n]=s),s[t]=i}getDocument(){let e=null;return this.gridOptions.getDocument&&S(this.gridOptions.getDocument)?e=this.gridOptions.getDocument():this.eGridDiv&&(e=this.eGridDiv.ownerDocument),e&&S(e)?e:document}getWindow(){return this.getDocument().defaultView||window}getRootNode(){return this.eGridDiv.getRootNode()}getActiveDomElement(){return this.getRootNode().activeElement}getAsyncTransactionWaitMillis(){return S(this.gridOptions.asyncTransactionWaitMillis)?this.gridOptions.asyncTransactionWaitMillis:50}isAnimateRows(){return!this.get("ensureDomOrder")&&this.get("animateRows")}isGroupRowsSticky(){return!(this.get("paginateChildRows")||this.get("groupHideOpenParents")||this.isDomLayout("print"))}isColumnsSortingCoupledToGroup(){const e=this.gridOptions.autoGroupColumnDef;return!(null==e?void 0:e.comparator)&&!this.get("treeData")}getGroupAggFiltering(){const e=this.gridOptions.groupAggFiltering;return"function"==typeof e?this.getCallback("groupAggFiltering"):!0===e?()=>!0:void 0}getGrandTotalRow(){const e=this.gridOptions.grandTotalRow;return e||(this.gridOptions.groupIncludeTotalFooter?"bottom":void 0)}getGroupTotalRowCallback(){const e=this.get("groupTotalRow");if("function"==typeof e)return this.getCallback("groupTotalRow");if(e)return()=>e;const t=this.get("groupIncludeFooter");if("function"==typeof t){const e=this.getCallback("groupIncludeFooter");return t=>e(t)?"bottom":void 0}return()=>t?"bottom":void 0}isGroupMultiAutoColumn(){return this.gridOptions.groupDisplayType?"multipleColumns"===this.gridOptions.groupDisplayType:this.get("groupHideOpenParents")}isGroupUseEntireRow(e){return!e&&"groupRows"===this.gridOptions.groupDisplayType}getGridCommonParams(){return{api:this.api,columnApi:this.columnApi,context:this.context}}addGridCommonParams(e){const t=e;return t.api=this.api,t.columnApi=this.columnApi,t.context=this.context,t}};Eh.PROPERTY_COERCIONS=new Map([...Nt.BOOLEAN_PROPERTIES.map(e=>[e,Eh.toBoolean]),...Nt.NUMBER_PROPERTIES.map(e=>[e,Eh.toNumber]),["groupAggFiltering",e=>"function"==typeof e?e:Eh.toBoolean(e)],["pageSize",Eh.toConstrainedNum(1,Number.MAX_VALUE)],["autoSizePadding",Eh.toConstrainedNum(0,Number.MAX_VALUE)],["keepDetailRowsCount",Eh.toConstrainedNum(1,Number.MAX_VALUE)],["rowBuffer",Eh.toConstrainedNum(0,Number.MAX_VALUE)],["infiniteInitialRowCount",Eh.toConstrainedNum(1,Number.MAX_VALUE)],["cacheOverflowSize",Eh.toConstrainedNum(1,Number.MAX_VALUE)],["cacheBlockSize",Eh.toConstrainedNum(1,Number.MAX_VALUE)],["serverSideInitialRowCount",Eh.toConstrainedNum(1,Number.MAX_VALUE)],["viewportRowModelPageSize",Eh.toConstrainedNum(1,Number.MAX_VALUE)],["viewportRowModelBufferSize",Eh.toConstrainedNum(0,Number.MAX_VALUE)]]),Eh.changeSetId=0,m([pe("gridOptions")],Eh.prototype,"gridOptions",2),m([pe("eventService")],Eh.prototype,"eventService",2),m([pe("environment")],Eh.prototype,"environment",2),m([pe("frameworkOverrides")],Eh.prototype,"frameworkOverrides",2),m([pe("eGridDiv")],Eh.prototype,"eGridDiv",2),m([pe("validationService")],Eh.prototype,"validationService",2),m([pe("gridApi")],Eh.prototype,"api",2),m([he],Eh.prototype,"init",1),m([de],Eh.prototype,"destroy",1),Eh=m([ue("gridOptionsService")],Eh);var Mh=class extends ot{getLocaleTextFunc(){const e=this.gos.getCallback("getLocaleText");if(e)return(t,i,n)=>e({key:t,defaultValue:i,variableValues:n});const t=this.gos.get("localeText");return(e,i,n)=>{let s=t&&t[e];if(s&&n&&n.length){let e=0;for(;!(e>=n.length)&&-1!==s.indexOf("${variable}");)s=s.replace("${variable}",n[e++])}return null!=s?s:i}}};Mh=m([ue("localeService")],Mh);var Ah=class e extends ph{constructor(){super(e.TEMPLATE,"vertical")}postConstruct(){super.postConstruct(),this.createManagedBean(new Ma(this.eContainer)),this.ctrlsService.register("fakeVScrollComp",this),this.addManagedListener(this.eventService,dt.EVENT_ROW_CONTAINER_HEIGHT_CHANGED,this.onRowContainerHeightChanged.bind(this))}setScrollVisible(){const e=this.scrollVisibleService.isVerticalScrollShowing(),t=this.invisibleScrollbar,i=e&&this.gos.getScrollbarWidth()||0,n=0===i&&t?16:i;this.addOrRemoveCssClass("ag-scrollbar-invisible",t),Nn(this.getGui(),n),Nn(this.eViewport,n),Nn(this.eContainer,n),this.setDisplayed(e,{skipAriaHidden:!0})}onRowContainerHeightChanged(){const{ctrlsService:e}=this,t=e.getGridBodyCtrl().getBodyViewportElement(),i=this.getScrollPosition(),n=t.scrollTop;i!=n&&this.setScrollPosition(n,!0)}getScrollPosition(){return this.getViewport().scrollTop}setScrollPosition(e,t){t||Mn(this.getViewport())||this.attemptSettingScrollPosition(e),this.getViewport().scrollTop=e}};Ah.TEMPLATE='<div class="ag-body-vertical-scroll" aria-hidden="true">\n            <div class="ag-body-vertical-scroll-viewport" ref="eViewport">\n                <div class="ag-body-vertical-scroll-container" ref="eContainer"></div>\n            </div>\n        </div>',m([he],Ah.prototype,"postConstruct",1);var Th=Ah,Dh={january:"January",february:"February",march:"March",april:"April",may:"May",june:"June",july:"July",august:"August",september:"September",october:"October",november:"November",december:"December"},Ih=["january","february","march","april","may","june","july","august","september","october","november","december"],Rh=class extends ot{constructor(){super(...arguments),this.dataTypeDefinitions={},this.isWaitingForRowData=!1,this.isColumnTypeOverrideInDataTypeDefinitions=!1,this.columnStateUpdatesPendingInference={},this.columnStateUpdateListenerDestroyFuncs=[]}init(){this.groupHideOpenParents=this.gos.get("groupHideOpenParents"),this.addManagedPropertyListener("groupHideOpenParents",()=>{this.groupHideOpenParents=this.gos.get("groupHideOpenParents")}),this.processDataTypeDefinitions(),this.addManagedPropertyListener("dataTypeDefinitions",e=>{this.processDataTypeDefinitions(),this.columnModel.recreateColumnDefs(It(e.source))})}processDataTypeDefinitions(){var e;const t=this.getDefaultDataTypes();this.dataTypeDefinitions={},Object.entries(t).forEach(([e,t])=>{this.dataTypeDefinitions[e]=g(p({},t),{groupSafeValueFormatter:this.createGroupSafeValueFormatter(t)})});const i=null!=(e=this.gos.get("dataTypeDefinitions"))?e:{};this.dataTypeMatchers={},Object.entries(i).forEach(([e,n])=>{const s=this.processDataTypeDefinition(n,i,[e],t);s&&(this.dataTypeDefinitions[e]=s,n.dataTypeMatcher&&(this.dataTypeMatchers[e]=n.dataTypeMatcher))}),this.checkObjectValueHandlers(t),["dateString","text","number","boolean","date"].forEach(e=>{const i=this.dataTypeMatchers[e];i&&delete this.dataTypeMatchers[e],this.dataTypeMatchers[e]=null!=i?i:t[e].dataTypeMatcher})}mergeDataTypeDefinitions(e,t){const i=p(p({},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 s;const r=e.extendsDataType;if(e.columnTypes&&(this.isColumnTypeOverrideInDataTypeDefinitions=!0),e.extendsDataType===e.baseDataType){let i=n[r];const o=t[r];if(i&&o&&(i=o),!this.validateDataTypeDefinition(e,i,r))return;s=this.mergeDataTypeDefinitions(i,e)}else{if(i.includes(r))return void j('Data type definition hierarchies (via the "extendsDataType" property) cannot contain circular references.');const o=t[r];if(!this.validateDataTypeDefinition(e,o,r))return;const a=this.processDataTypeDefinition(o,t,[...i,r],n);if(!a)return;s=this.mergeDataTypeDefinitions(a,e)}return g(p({},s),{groupSafeValueFormatter:this.createGroupSafeValueFormatter(s)})}validateDataTypeDefinition(e,t,i){return t?t.baseDataType===e.baseDataType||(j('The "baseDataType" property of a data type definition must match that of its parent.'),!1):(j(`The data type definition ${i} does not exist.`),!1)}createGroupSafeValueFormatter(e){if(e.valueFormatter)return t=>{var i,n;if(null==(i=t.node)?void 0:i.group){const i=t.column.getAggFunc();if(i){if("first"===i||"last"===i)return e.valueFormatter(t);if("number"===e.baseDataType&&"count"!==i){if("number"==typeof t.value)return e.valueFormatter(t);if("object"==typeof t.value){if(!t.value)return;if("toNumber"in t.value)return e.valueFormatter(g(p({},t),{value:t.value.toNumber()}));if("value"in t.value)return e.valueFormatter(g(p({},t),{value:t.value.value}))}}}if(!this.gos.get("suppressGroupMaintainValueType"))return}else if(this.groupHideOpenParents&&t.column.isRowGroupActive()){if("string"!=typeof t.value||(null==(n=e.dataTypeMatcher)?void 0:n.call(e,t.value)))return e.valueFormatter(t);if(!this.gos.get("suppressGroupMaintainValueType"))return}return e.valueFormatter(t)}}updateColDefAndGetDataTypeDefinitionColumnType(e,t,i){let{cellDataType:n}=t;const{field:s}=t;if(void 0===n&&(n=e.cellDataType),null!=n&&!0!==n||(n=!!this.canInferCellDataType(e,t)&&this.inferCellDataType(s,i)),!n)return void(e.cellDataType=!1);const r=this.dataTypeDefinitions[n];if(r)return e.cellDataType=n,r.groupSafeValueFormatter&&(e.valueFormatter=r.groupSafeValueFormatter),r.valueParser&&(e.valueParser=r.valueParser),r.suppressDefaultProperties||this.setColDefPropertiesForBaseDataType(e,r,i),r.columnTypes;j(`Missing data type definition - "${n}"`)}updateColDefAndGetColumnType(e,t,i){var n,s;const r=this.updateColDefAndGetDataTypeDefinitionColumnType(e,t,i),o=null!=(s=null!=(n=t.type)?n:r)?s:e.type;return e.type=o,o?this.convertColumnTypes(o):void 0}addColumnListeners(e){if(!this.isWaitingForRowData)return;const t=this.columnStateUpdatesPendingInference[e.getColId()];if(!t)return;const i=e=>{t.add(e.key)};e.addEventListener(Ee.EVENT_STATE_UPDATED,i),this.columnStateUpdateListenerDestroyFuncs.push(()=>e.removeEventListener(Ee.EVENT_STATE_UPDATED,i))}canInferCellDataType(e,t){var i;if("clientSide"!==this.rowModel.getType())return!1;const n={cellRenderer:!0,valueGetter:!0,valueParser:!0,refData:!0};if(this.doColDefPropsPreventInference(t,n))return!1;const s=null===t.type?e.type:t.type;if(s){const e=null!=(i=this.gos.get("columnTypes"))?i:{};if(this.convertColumnTypes(s).some(t=>{const i=e[t.trim()];return i&&this.doColDefPropsPreventInference(i,n)}))return!1}return!this.doColDefPropsPreventInference(e,n)}doColDefPropsPreventInference(e,t){return[["cellRenderer","agSparklineCellRenderer"],["valueGetter",void 0],["valueParser",void 0],["refData",void 0]].some(([i,n])=>this.doesColDefPropPreventInference(e,t,i,n))}doesColDefPropPreventInference(e,t,i,n){if(!t[i])return!1;const s=e[i];return null===s?(t[i]=!1,!1):void 0===n?!!s:s===n}inferCellDataType(e,t){var i;if(!e)return;let n;const s=this.getInitialData();if(s){const t=e.indexOf(".")>=0&&!this.gos.get("suppressFieldDotNotation");n=V(s,e,t)}else this.initWaitForRowData(t);if(null==n)return;const[r]=null!=(i=Object.entries(this.dataTypeMatchers).find(([e,t])=>t(n)))?i:["object"];return r}getInitialData(){const e=this.gos.get("rowData");if(null==e?void 0:e.length)return e[0];if(this.initialData)return this.initialData;{const e=this.rowModel.getRootNode().allLeafChildren;if(null==e?void 0:e.length)return e[0].data}return null}initWaitForRowData(e){if(this.columnStateUpdatesPendingInference[e]=new Set,this.isWaitingForRowData)return;this.isWaitingForRowData=!0;const t=this.isColumnTypeOverrideInDataTypeDefinitions;t&&this.columnModel.queueResizeOperations();const i=this.addManagedListener(this.eventService,dt.EVENT_ROW_DATA_UPDATE_STARTED,e=>{const{firstRowData:n}=e;if(!n)return;null==i||i(),this.isWaitingForRowData=!1,this.processColumnsPendingInference(n,t),this.columnStateUpdatesPendingInference={},t&&this.columnModel.processResizeOperations();const s={type:dt.EVENT_DATA_TYPES_INFERRED};this.eventService.dispatchEvent(s)})}isPendingInference(){return this.isWaitingForRowData}processColumnsPendingInference(e,t){this.initialData=e;const i=[];this.columnStateUpdateListenerDestroyFuncs.forEach(e=>e()),this.columnStateUpdateListenerDestroyFuncs=[];const n={},s={};Object.entries(this.columnStateUpdatesPendingInference).forEach(([e,r])=>{const o=this.columnModel.getGridColumn(e);if(!o)return;const a=o.getColDef();if(!this.columnModel.resetColumnDefIntoColumn(o,"cellDataTypeInferred"))return;const l=o.getColDef();if(t&&l.type&&l.type!==a.type){const t=this.getUpdatedColumnState(o,r);t.rowGroup&&null==t.rowGroupIndex&&(n[e]=t),t.pivot&&null==t.pivotIndex&&(s[e]=t),i.push(t)}}),t&&i.push(...this.columnModel.generateColumnStateForRowGroupAndPivotIndexes(n,s)),i.length&&this.columnModel.applyColumnState({state:i},"cellDataTypeInferred"),this.initialData=null}getUpdatedColumnState(e,t){const i=this.columnModel.getColumnStateFromColDef(e);return t.forEach(e=>{delete i[e],"rowGroup"===e?delete i.rowGroupIndex:"pivot"===e&&delete i.pivotIndex}),i}checkObjectValueHandlers(e){const t=this.dataTypeDefinitions.object,i=e.object;this.hasObjectValueParser=t.valueParser!==i.valueParser,this.hasObjectValueFormatter=t.valueFormatter!==i.valueFormatter}convertColumnTypes(e){let t=[];return e instanceof Array?e.some(e=>"string"!=typeof e)?console.warn("if colDef.type is supplied an array it should be of type 'string[]'"):t=e:"string"==typeof e?t=e.split(","):console.warn("colDef.type should be of type 'string' | 'string[]'"),t}getDateStringTypeDefinition(e){var t;return e&&null!=(t=this.getDataTypeDefinition(e))?t:this.dataTypeDefinitions.dateString}getDateParserFunction(e){return this.getDateStringTypeDefinition(e).dateParser}getDateFormatterFunction(e){return this.getDateStringTypeDefinition(e).dateFormatter}getDataTypeDefinition(e){const t=e.getColDef();if(t.cellDataType)return this.dataTypeDefinitions[t.cellDataType]}getBaseDataType(e){var t;return null==(t=this.getDataTypeDefinition(e))?void 0:t.baseDataType}checkType(e,t){var i;if(null==t)return!0;const n=null==(i=this.getDataTypeDefinition(e))?void 0:i.dataTypeMatcher;return!n||n(t)}validateColDef(e){"object"===e.cellDataType&&(e.valueFormatter!==this.dataTypeDefinitions.object.groupSafeValueFormatter||this.hasObjectValueFormatter||j('Cell data type is "object" but no value formatter has been provided. Please either provide an object data type definition with a value formatter, or set "colDef.valueFormatter"'),e.editable&&e.valueParser===this.dataTypeDefinitions.object.valueParser&&!this.hasObjectValueParser&&j('Cell data type is "object" but no value parser has been provided. Please either provide an object data type definition with a value parser, or set "colDef.valueParser"'))}setColDefPropertiesForBaseDataType(e,t,i){const n=(e,i,n)=>{let s=e.getColDef().valueFormatter;return s===t.groupSafeValueFormatter&&(s=t.valueFormatter),this.valueService.formatValue(e,i,n,s)},s=ae.__isRegistered("@ag-grid-enterprise/set-filter",this.context.getGridId()),r=this.localeService.getLocaleTextFunc(),o=t=>{const{filterParams:i}=e;e.filterParams="object"==typeof i?p(p({},i),t):t};switch(t.baseDataType){case"number":e.cellEditor="agNumberCellEditor",s&&o({comparator:(e,t)=>{const i=null==e?0:parseInt(e),n=null==t?0:parseInt(t);return i===n?0:i>n?1:-1}});break;case"boolean":e.cellEditor="agCheckboxCellEditor",e.cellRenderer="agCheckboxCellRenderer",e.suppressKeyboardEvent=e=>!!e.colDef.editable&&e.event.key===Jn.SPACE,o(s?{valueFormatter:e=>S(e.value)?r(String(e.value),e.value?"True":"False"):r("blanks","(Blanks)")}:{maxNumConditions:1,debounceMs:0,filterOptions:["empty",{displayKey:"true",displayName:"True",predicate:(e,t)=>t,numberOfInputs:0},{displayKey:"false",displayName:"False",predicate:(e,t)=>!1===t,numberOfInputs:0}]});break;case"date":e.cellEditor="agDateCellEditor",e.keyCreator=e=>n(e.column,e.node,e.value),s&&o({valueFormatter:e=>{const t=n(e.column,e.node,e.value);return S(t)?t:r("blanks","(Blanks)")},treeList:!0,treeListFormatter:(e,t)=>{if(1===t&&null!=e){const t=Ih[Number(e)-1];return r(t,Dh[t])}return null!=e?e:r("blanks","(Blanks)")}});break;case"dateString":{e.cellEditor="agDateStringCellEditor",e.keyCreator=e=>n(e.column,e.node,e.value);const i=t.dateParser;o(s?{valueFormatter:e=>{const t=n(e.column,e.node,e.value);return S(t)?t:r("blanks","(Blanks)")},treeList:!0,treeListPathGetter:e=>{const t=i(null!=e?e:void 0);return t?[String(t.getFullYear()),String(t.getMonth()+1),String(t.getDate())]:null},treeListFormatter:(e,t)=>{if(1===t&&null!=e){const t=Ih[Number(e)-1];return r(t,Dh[t])}return null!=e?e:r("blanks","(Blanks)")}}:{comparator:(e,t)=>{const n=i(t);return null==t||n<e?-1:n>e?1:0}});break}case"object":e.cellEditorParams={useFormatter:!0},e.comparator=(e,t)=>{const s=this.columnModel.getPrimaryColumn(i),r=null==s?void 0:s.getColDef();if(!s||!r)return 0;const o=null==e?"":n(s,null,e),a=null==t?"":n(s,null,t);return o===a?0:o>a?1:-1},e.keyCreator=e=>n(e.column,e.node,e.value),s?o({valueFormatter:e=>{const t=n(e.column,e.node,e.value);return S(t)?t:r("blanks","(Blanks)")}}):e.filterValueGetter=e=>n(e.column,e.node,this.valueService.getValue(e.column,e.node))}}getDefaultDataTypes(){const e=e=>!!e.match("^\\d{4}-\\d{2}-\\d{2}$"),t=this.localeService.getLocaleTextFunc();return{number:{baseDataType:"number",valueParser:e=>{var t,i;return""===(null==(i=null==(t=e.newValue)?void 0:t.trim)?void 0:i.call(t))?null:Number(e.newValue)},valueFormatter:e=>null==e.value?"":"number"!=typeof e.value||isNaN(e.value)?t("invalidNumber","Invalid Number"):String(e.value),dataTypeMatcher:e=>"number"==typeof e},text:{baseDataType:"text",valueParser:e=>""===e.newValue?null:E(e.newValue),dataTypeMatcher:e=>"string"==typeof e},boolean:{baseDataType:"boolean",valueParser:e=>{var t,i;return null==e.newValue?e.newValue:""===(null==(i=null==(t=e.newValue)?void 0:t.trim)?void 0:i.call(t))?null:"true"===String(e.newValue).toLowerCase()},valueFormatter:e=>null==e.value?"":String(e.value),dataTypeMatcher:e=>"boolean"==typeof e},date:{baseDataType:"date",valueParser:e=>tn(null==e.newValue?null:String(e.newValue)),valueFormatter:e=>{var i;return null==e.value?"":e.value instanceof Date&&!isNaN(e.value.getTime())?null!=(i=Qi(e.value,!1))?i:"":t("invalidDate","Invalid Date")},dataTypeMatcher:e=>e instanceof Date},dateString:{baseDataType:"dateString",dateParser:e=>{var t;return null!=(t=tn(e))?t:void 0},dateFormatter:e=>{var t;return null!=(t=Qi(null!=e?e:null,!1))?t:void 0},valueParser:t=>e(String(t.newValue))?t.newValue:null,valueFormatter:t=>e(String(t.value))?t.value:"",dataTypeMatcher:t=>"string"==typeof t&&e(t)},object:{baseDataType:"object",valueParser:()=>null,valueFormatter:e=>{var t;return null!=(t=E(e.value))?t:""}}}}};m([pe("rowModel")],Rh.prototype,"rowModel",2),m([pe("columnModel")],Rh.prototype,"columnModel",2),m([pe("valueService")],Rh.prototype,"valueService",2),m([he],Rh.prototype,"init",1),Rh=m([ue("dataTypeService")],Rh);var Lh=class extends ot{constructor(){super(...arguments),this.waitingForColumns=!1}postConstruct(){this.addManagedPropertyListener("columnDefs",e=>this.setColumnDefs(e))}start(){this.ctrlsService.whenReady(()=>{const e=this.gos.get("columnDefs");e?this.setColumnsAndData(e):this.waitingForColumns=!0,this.gridReady()})}setColumnsAndData(e){this.columnModel.setColumnDefs(null!=e?e:[],"gridInitializing"),this.rowModel.start()}gridReady(){this.dispatchGridReadyEvent();const e=ae.__isRegistered("@ag-grid-enterprise/core",this.context.getGridId());new Nc("AG Grid",()=>this.gos.get("debug")).log(`initialised successfully, enterprise = ${e}`)}dispatchGridReadyEvent(){const e={type:dt.EVENT_GRID_READY};this.eventService.dispatchEvent(e)}setColumnDefs(e){const t=this.gos.get("columnDefs");if(t)return this.waitingForColumns?(this.waitingForColumns=!1,void this.setColumnsAndData(t)):void this.columnModel.setColumnDefs(t,It(e.source))}};m([pe("ctrlsService")],Lh.prototype,"ctrlsService",2),m([pe("columnModel")],Lh.prototype,"columnModel",2),m([pe("rowModel")],Lh.prototype,"rowModel",2),m([he],Lh.prototype,"postConstruct",1),Lh=m([ue("syncService")],Lh);var kh=class extends ot{constructor(){super(...arguments),this.manuallyDisplayed=!1}postConstruct(){this.addManagedListener(this.eventService,dt.EVENT_ROW_DATA_UPDATED,()=>this.onRowDataUpdated()),this.addManagedListener(this.eventService,dt.EVENT_NEW_COLUMNS_LOADED,()=>this.onNewColumnsLoaded())}registerOverlayWrapperComp(e){this.overlayWrapperComp=e,(!this.gos.get("columnDefs")||this.gos.isRowModelType("clientSide")&&!this.gos.get("rowData"))&&this.showLoadingOverlay()}showLoadingOverlay(){if(this.gos.get("suppressLoadingOverlay"))return;const e=this.userComponentFactory.getLoadingOverlayCompDetails({});this.showOverlay(e,"ag-overlay-loading-wrapper","loadingOverlayComponentParams")}showNoRowsOverlay(){if(this.gos.get("suppressNoRowsOverlay"))return;const e=this.userComponentFactory.getNoRowsOverlayCompDetails({});this.showOverlay(e,"ag-overlay-no-rows-wrapper","noRowsOverlayComponentParams")}showOverlay(e,t,i){const n=e.newAgStackInstance(),s=this.addManagedPropertyListener(i,({currentValue:e})=>{n.then(t=>{t.refresh&&t.refresh(this.gos.addGridCommonParams(p({},null!=e?e:{})))})});this.manuallyDisplayed=this.columnModel.isReady()&&!this.paginationProxy.isEmpty(),this.overlayWrapperComp.showOverlay(n,t,s)}hideOverlay(){this.manuallyDisplayed=!1,this.overlayWrapperComp.hideOverlay()}showOrHideOverlay(){const e=this.paginationProxy.isEmpty(),t=this.gos.get("suppressNoRowsOverlay");e&&!t?this.showNoRowsOverlay():this.hideOverlay()}onRowDataUpdated(){this.showOrHideOverlay()}onNewColumnsLoaded(){!this.columnModel.isReady()||this.paginationProxy.isEmpty()||this.manuallyDisplayed||this.hideOverlay()}};m([pe("userComponentFactory")],kh.prototype,"userComponentFactory",2),m([pe("paginationProxy")],kh.prototype,"paginationProxy",2),m([pe("columnModel")],kh.prototype,"columnModel",2),m([he],kh.prototype,"postConstruct",1),kh=m([ue("overlayService")],kh);var Ph=class extends ot{constructor(){super(...arguments),this.suppressEvents=!0,this.queuedUpdateSources=new Set,this.dispatchStateUpdateEventDebounced=ee(()=>this.dispatchQueuedStateUpdateEvents(),0),this.onRowGroupOpenedDebounced=ee(()=>this.updateCachedState("rowGroupExpansion",this.getRowGroupExpansionState()),0),this.onRowSelectedDebounced=ee(()=>{this.staleStateKeys.delete("rowSelection"),this.updateCachedState("rowSelection",this.getRowSelectionState())},0),this.staleStateKeys=new Set}postConstruct(){var e;this.isClientSideRowModel="clientSide"===this.rowModel.getType(),this.cachedState=null!=(e=this.gos.get("initialState"))?e:{},this.ctrlsService.whenReady(()=>this.suppressEventsAndDispatchInitEvent(()=>this.setupStateOnGridReady()));const t=this.addManagedListener(this.eventService,dt.EVENT_NEW_COLUMNS_LOADED,({source:e})=>{"gridInitializing"===e&&(null==t||t(),this.suppressEventsAndDispatchInitEvent(()=>this.setupStateOnColumnsInitialised()))}),i=this.addManagedListener(this.eventService,dt.EVENT_ROW_COUNT_READY,()=>{null==i||i(),this.suppressEventsAndDispatchInitEvent(()=>this.setupStateOnRowCountReady())}),n=this.addManagedListener(this.eventService,dt.EVENT_FIRST_DATA_RENDERED,()=>{null==n||n(),this.suppressEventsAndDispatchInitEvent(()=>this.setupStateOnFirstDataRendered())})}getState(){return this.staleStateKeys.size&&this.refreshStaleState(),this.cachedState}setupStateOnGridReady(){this.updateCachedState("sideBar",this.getSideBarState()),this.addManagedListener(this.eventService,dt.EVENT_TOOL_PANEL_VISIBLE_CHANGED,()=>this.updateCachedState("sideBar",this.getSideBarState())),this.addManagedListener(this.eventService,dt.EVENT_SIDE_BAR_UPDATED,()=>this.updateCachedState("sideBar",this.getSideBarState()))}setupStateOnColumnsInitialised(){var e;const t=null!=(e=this.gos.get("initialState"))?e:{};this.setColumnState(t),this.setColumnGroupState(t),this.updateColumnState(["aggregation","columnOrder","columnPinning","columnSizing","columnVisibility","pivot","pivot","rowGroup","sort"]),this.updateCachedState("columnGroup",this.getColumnGroupState()),this.addManagedListener(this.eventService,dt.EVENT_COLUMN_VALUE_CHANGED,()=>this.updateColumnState(["aggregation"])),this.addManagedListener(this.eventService,dt.EVENT_COLUMN_MOVED,()=>this.updateColumnState(["columnOrder"])),this.addManagedListener(this.eventService,dt.EVENT_COLUMN_PINNED,()=>this.updateColumnState(["columnPinning"])),this.addManagedListener(this.eventService,dt.EVENT_COLUMN_RESIZED,()=>this.updateColumnState(["columnSizing"])),this.addManagedListener(this.eventService,dt.EVENT_COLUMN_VISIBLE,()=>this.updateColumnState(["columnVisibility"])),this.addManagedListener(this.eventService,dt.EVENT_COLUMN_PIVOT_CHANGED,()=>this.updateColumnState(["pivot"])),this.addManagedListener(this.eventService,dt.EVENT_COLUMN_PIVOT_MODE_CHANGED,()=>this.updateColumnState(["pivot"])),this.addManagedListener(this.eventService,dt.EVENT_COLUMN_ROW_GROUP_CHANGED,()=>this.updateColumnState(["rowGroup"])),this.addManagedListener(this.eventService,dt.EVENT_SORT_CHANGED,()=>this.updateColumnState(["sort"])),this.addManagedListener(this.eventService,dt.EVENT_NEW_COLUMNS_LOADED,()=>this.updateColumnState(["aggregation","columnOrder","columnPinning","columnSizing","columnVisibility","pivot","pivot","rowGroup","sort"])),this.addManagedListener(this.eventService,dt.EVENT_COLUMN_GROUP_OPENED,()=>this.updateCachedState("columnGroup",this.getColumnGroupState()))}setupStateOnRowCountReady(){var e;const{filter:t,rowGroupExpansion:i,rowSelection:n,pagination:s}=null!=(e=this.gos.get("initialState"))?e:{},r=this.gos.get("advancedFilterModel");(t||r)&&this.setFilterState(t,r),i&&this.setRowGroupExpansionState(i),n&&this.setRowSelectionState(n),s&&this.setPaginationState(s),this.updateCachedState("filter",this.getFilterState()),this.updateCachedState("rowGroupExpansion",this.getRowGroupExpansionState()),this.updateCachedState("rowSelection",this.getRowSelectionState()),this.updateCachedState("pagination",this.getPaginationState()),this.addManagedListener(this.eventService,dt.EVENT_FILTER_CHANGED,()=>this.updateCachedState("filter",this.getFilterState())),this.addManagedListener(this.eventService,dt.EVENT_ROW_GROUP_OPENED,()=>this.onRowGroupOpenedDebounced()),this.addManagedListener(this.eventService,dt.EVENT_EXPAND_COLLAPSE_ALL,()=>this.updateCachedState("rowGroupExpansion",this.getRowGroupExpansionState())),this.addManagedListener(this.eventService,dt.EVENT_SELECTION_CHANGED,()=>{this.staleStateKeys.add("rowSelection"),this.onRowSelectedDebounced()}),this.addManagedListener(this.eventService,dt.EVENT_PAGINATION_CHANGED,e=>{(e.newPage||e.newPageSize)&&this.updateCachedState("pagination",this.getPaginationState())})}setupStateOnFirstDataRendered(){var e;const{scroll:t,rangeSelection:i,focusedCell:n,columnOrder:s}=null!=(e=this.gos.get("initialState"))?e:{};n&&this.setFocusedCellState(n),i&&this.setRangeSelectionState(i),t&&this.setScrollState(t),this.setColumnPivotState(!!(null==s?void 0:s.orderedColIds)),this.updateCachedState("sideBar",this.getSideBarState()),this.updateCachedState("focusedCell",this.getFocusedCellState()),this.updateCachedState("rangeSelection",this.getRangeSelectionState()),this.updateCachedState("scroll",this.getScrollState()),this.addManagedListener(this.eventService,dt.EVENT_CELL_FOCUSED,()=>this.updateCachedState("focusedCell",this.getFocusedCellState())),this.addManagedListener(this.eventService,dt.EVENT_RANGE_SELECTION_CHANGED,e=>{e.finished&&this.updateCachedState("rangeSelection",this.getRangeSelectionState())}),this.addManagedListener(this.eventService,dt.EVENT_BODY_SCROLL_END,()=>this.updateCachedState("scroll",this.getScrollState()))}getColumnState(){const e=this.columnModel.isPivotMode(),t=[],i=[],n=[],s=[],r=[],o=[],a=[],l=[],c=[],h=this.columnModel.getColumnState();for(let e=0;e<h.length;e++){const{colId:d,sort:u,sortIndex:p,rowGroup:g,rowGroupIndex:f,aggFunc:m,pivot:v,pivotIndex:y,pinned:C,hide:b,width:S,flex:w}=h[e];c.push(d),u&&(t[null!=p?p:0]={colId:d,sort:u}),g&&(i[null!=f?f:0]=d),"string"==typeof m&&n.push({colId:d,aggFunc:m}),v&&(s[null!=y?y:0]=d),C&&("right"===C?o:r).push(d),b&&a.push(d),(w||S)&&l.push({colId:d,flex:null!=w?w:void 0,width:S})}return{sort:t.length?{sortModel:t}:void 0,rowGroup:i.length?{groupColIds:i}:void 0,aggregation:n.length?{aggregationModel:n}:void 0,pivot:s.length||e?{pivotMode:e,pivotColIds:s}:void 0,columnPinning:r.length||o.length?{leftColIds:r,rightColIds:o}:void 0,columnVisibility:a.length?{hiddenColIds:a}:void 0,columnSizing:l.length?{columnSizingModel:l}:void 0,columnOrder:c.length?{orderedColIds:c}:void 0}}setColumnState(e){const{sort:t,rowGroup:i,aggregation:n,pivot:s,columnPinning:r,columnVisibility:o,columnSizing:a,columnOrder:l}=e,c={},h=e=>{let t=c[e];return t||(t={colId:e},c[e]=t,t)};t&&t.sortModel.forEach(({colId:e,sort:t},i)=>{const n=h(e);n.sort=t,n.sortIndex=i}),i&&i.groupColIds.forEach((e,t)=>{const i=h(e);i.rowGroup=!0,i.rowGroupIndex=t}),n&&n.aggregationModel.forEach(({colId:e,aggFunc:t})=>{h(e).aggFunc=t}),s&&(s.pivotColIds.forEach((e,t)=>{const i=h(e);i.pivot=!0,i.pivotIndex=t}),this.gos.updateGridOptions({options:{pivotMode:s.pivotMode},source:"gridInitializing"})),r&&(r.leftColIds.forEach(e=>{h(e).pinned="left"}),r.rightColIds.forEach(e=>{h(e).pinned="right"})),o&&o.hiddenColIds.forEach(e=>{h(e).hide=!0}),a&&a.columnSizingModel.forEach(({colId:e,flex:t,width:i})=>{const n=h(e);n.flex=null!=t?t:null,n.width=i});const d=null==l?void 0:l.orderedColIds,u=!!(null==d?void 0:d.length),p=u?d.map(e=>h(e)):Object.values(c);if(p.length){this.columnStates=p;const e={sort:null,sortIndex:null,rowGroup:null,rowGroupIndex:null,aggFunc:null,pivot:null,pivotIndex:null,pinned:null,hide:null,flex:null};this.columnModel.applyColumnState({state:p,applyOrder:u,defaultState:e},"gridInitializing")}}setColumnPivotState(e){const t=this.columnStates;this.columnStates=void 0;const i=this.columnGroupStates;if(this.columnGroupStates=void 0,this.columnModel.isSecondaryColumnsPresent()){if(t){let i=[];for(const e of t)this.columnModel.getSecondaryColumn(e.colId)&&i.push(e);this.columnModel.applyColumnState({state:i,applyOrder:e},"gridInitializing")}i&&this.columnModel.setColumnGroupState(i,"gridInitializing")}}getColumnGroupState(){const e=this.columnModel.getColumnGroupState(),t=[];return e.forEach(({groupId:e,open:i})=>{i&&t.push(e)}),t.length?{openColumnGroupIds:t}:void 0}setColumnGroupState(e){var t;if(!e.hasOwnProperty("columnGroup"))return;const i=new Set(null==(t=e.columnGroup)?void 0:t.openColumnGroupIds),n=this.columnModel.getColumnGroupState().map(({groupId:e})=>{const t=i.has(e);return t&&i.delete(e),{groupId:e,open:t}});i.forEach(e=>{n.push({groupId:e,open:!0})}),n.length&&(this.columnGroupStates=n),this.columnModel.setColumnGroupState(n,"gridInitializing")}getFilterState(){var e;let t=this.filterManager.getFilterModel();t&&0===Object.keys(t).length&&(t=void 0);const i=null!=(e=this.filterManager.getAdvancedFilterModel())?e:void 0;return t||i?{filterModel:t,advancedFilterModel:i}:void 0}setFilterState(e,t){const{filterModel:i,advancedFilterModel:n}=null!=e?e:{advancedFilterModel:t};i&&this.filterManager.setFilterModel(i,"columnFilter"),n&&this.filterManager.setAdvancedFilterModel(n)}getRangeSelectionState(){var e;const t=null==(e=this.rangeService)?void 0:e.getCellRanges().map(e=>{const{id:t,type:i,startRow:n,endRow:s,columns:r,startColumn:o}=e;return{id:t,type:i,startRow:n,endRow:s,colIds:r.map(e=>e.getColId()),startColId:o.getColId()}});return(null==t?void 0:t.length)?{cellRanges:t}:void 0}setRangeSelectionState(e){if(!this.gos.get("enableRangeSelection")||!this.rangeService)return;const t=[];e.cellRanges.forEach(e=>{const i=[];if(e.colIds.forEach(e=>{const t=this.columnModel.getGridColumn(e);t&&i.push(t)}),!i.length)return;let n=this.columnModel.getGridColumn(e.startColId);if(!n){const e=this.columnModel.getAllDisplayedColumns(),t=new Set(i);n=e.find(e=>t.has(e))}t.push(g(p({},e),{columns:i,startColumn:n}))}),this.rangeService.setCellRanges(t)}getScrollState(){var e,t,i;if(!this.isClientSideRowModel)return;const n=null==(e=this.ctrlsService.getGridBodyCtrl())?void 0:e.getScrollFeature(),{left:s}=null!=(t=null==n?void 0:n.getHScrollPosition())?t:{left:0},{top:r}=null!=(i=null==n?void 0:n.getVScrollPosition())?i:{top:0};return r||s?{top:r,left:s}:void 0}setScrollState(e){var t;if(!this.isClientSideRowModel)return;const{top:i,left:n}=e;null==(t=this.ctrlsService.getGridBodyCtrl())||t.getScrollFeature().setScrollPosition(i,n)}getSideBarState(){var e,t;return null==(t=null==(e=this.sideBarService)?void 0:e.getSideBarComp())?void 0:t.getState()}getFocusedCellState(){if(!this.isClientSideRowModel)return;const e=this.focusService.getFocusedCell();if(e){const{column:t,rowIndex:i,rowPinned:n}=e;return{colId:t.getColId(),rowIndex:i,rowPinned:n}}}setFocusedCellState(e){if(!this.isClientSideRowModel)return;const{colId:t,rowIndex:i,rowPinned:n}=e;this.focusService.setFocusedCell({column:this.columnModel.getGridColumn(t),rowIndex:i,rowPinned:n,forceBrowserFocus:!0,preventScrollOnBrowserFocus:!0})}getPaginationState(){const e=this.paginationProxy.getCurrentPage(),t=this.gos.get("paginationAutoPageSize")?void 0:this.paginationProxy.getPageSize();if(e||t)return{page:e,pageSize:t}}setPaginationState(e){e.pageSize&&!this.gos.get("paginationAutoPageSize")&&this.paginationProxy.setPageSize(e.pageSize,"initialState"),"number"==typeof e.page&&this.paginationProxy.setPage(e.page)}getRowSelectionState(){var e;const t=this.selectionService.getSelectionState();return t&&(Array.isArray(t)||!1!==t.selectAll&&!1!==t.selectAllChildren||(null==(e=null==t?void 0:t.toggledNodes)?void 0:e.length))?t:void 0}setRowSelectionState(e){this.selectionService.setSelectionState(e,"gridInitializing")}getRowGroupExpansionState(){const e=this.expansionService.getExpandedRows();return e.length?{expandedRowGroupIds:e}:void 0}setRowGroupExpansionState(e){this.expansionService.expandRows(e.expandedRowGroupIds)}updateColumnState(e){const t=this.getColumnState();let i=!1;Object.entries(t).forEach(([e,t])=>{D(t,this.cachedState[e])||(i=!0)}),this.cachedState=p(p({},this.cachedState),t),i&&this.dispatchStateUpdateEvent(e)}updateCachedState(e,t){const i=this.cachedState[e];this.setCachedStateValue(e,t),D(t,i)||this.dispatchStateUpdateEvent([e])}setCachedStateValue(e,t){this.cachedState=g(p({},this.cachedState),{[e]:t})}refreshStaleState(){this.staleStateKeys.forEach(e=>{"rowSelection"===e&&this.setCachedStateValue(e,this.getRowSelectionState())}),this.staleStateKeys.clear()}dispatchStateUpdateEvent(e){this.suppressEvents||(e.forEach(e=>this.queuedUpdateSources.add(e)),this.dispatchStateUpdateEventDebounced())}dispatchQueuedStateUpdateEvents(){const e=Array.from(this.queuedUpdateSources);this.queuedUpdateSources.clear();const t={type:dt.EVENT_STATE_UPDATED,sources:e,state:this.cachedState};this.eventService.dispatchEvent(t)}suppressEventsAndDispatchInitEvent(e){this.suppressEvents=!0,this.columnAnimationService.setSuppressAnimation(!0),e(),setTimeout(()=>{this.suppressEvents=!1,this.queuedUpdateSources.clear(),this.isAlive()&&(this.columnAnimationService.setSuppressAnimation(!1),this.dispatchStateUpdateEvent(["gridInitializing"]))})}};m([pe("filterManager")],Ph.prototype,"filterManager",2),m([pe("ctrlsService")],Ph.prototype,"ctrlsService",2),m([pe("focusService")],Ph.prototype,"focusService",2),m([pe("columnModel")],Ph.prototype,"columnModel",2),m([pe("paginationProxy")],Ph.prototype,"paginationProxy",2),m([pe("rowModel")],Ph.prototype,"rowModel",2),m([pe("selectionService")],Ph.prototype,"selectionService",2),m([pe("expansionService")],Ph.prototype,"expansionService",2),m([pe("columnAnimationService")],Ph.prototype,"columnAnimationService",2),m([ge("sideBarService")],Ph.prototype,"sideBarService",2),m([ge("rangeService")],Ph.prototype,"rangeService",2),m([he],Ph.prototype,"postConstruct",1),Ph=m([ue("stateService")],Ph);var Nh=class extends ot{init(){this.processGridOptions(this.gridOptions)}processGridOptions(e){this.processOptions(e,xh)}processColumnDefs(e){this.processOptions(e,bh)}processOptions(e,t){const{validations:i,deprecations:n,allProperties:s,propertyExceptions:r,objectName:o,docsUrl:a}=t;s&&!0!==this.gridOptions.suppressPropertyNamesCheck&&this.checkProperties(e,[...null!=r?r:[],...Object.keys(n)],s,o,a);const l=new Set;Object.keys(e).forEach(t=>{var s;const r=n[t];if(r)if("renamed"in r){const{renamed:i,version:n}=r;l.add(`As of v${n}, ${String(t)} is deprecated. Please use ${String(i)} instead.`),e[i]=e[t]}else{const{message:e,version:i}=r;l.add(`As of v${i}, ${String(t)} is deprecated. ${null!=e?e:""}`)}const o=e[t];if(null==o||!1===o)return;const a=i[t];let c;if(!a)return;if("function"==typeof a){const i=a(e,this.gridOptions);if(!i)return;if("objectName"in i){const n=e[t];return Array.isArray(n)?void n.forEach(e=>{this.processOptions(e,i)}):void this.processOptions(e[t],i)}c=i}else c=a;const{module:h,dependencies:d,supportedRowModels:u}=c;if(u){const e=null!=(s=this.gridOptions.rowModelType)?s:"clientSide";if(!u.includes(e))return void l.add(`${String(t)} is not supported with the '${e}' row model.`)}if(h){const e=Array.isArray(h)?h:[h];let i=!0;if(e.forEach(e=>{ae.__assertRegistered(e,String(t),this.context.getGridId())||(i=!1,l.add(`${String(t)} is only available when ${e} is loaded.`))}),!i)return}if(d){const i=this.checkForWarning(t,d,e);if(i)return void l.add(i)}}),l.size>0&&l.forEach(e=>{j(e)})}checkForWarning(e,t,i){if("function"==typeof t)return t(i,this.gridOptions);const n=Object.entries(t).find(([e,t])=>{const n=i[e];return!t.includes(n)});if(!n)return null;const[s,r]=n;return r.length>1?`'${String(e)}' requires '${s}' to be one of [${r.join(", ")}].`:`'${String(e)}' requires '${s}' to be ${r[0]}.`}checkProperties(e,t,i,n,s){const r=jn(Object.getOwnPropertyNames(e),["__ob__","__v_skip","__metadata__",...t,...i],i);if(N(r,(e,t)=>{j(`invalid ${n} property '${e}' did you mean any of these: ${t.slice(0,8).join(", ")}`)}),Object.keys(r).length>0&&s){const e=this.getFrameworkOverrides().getDocLink(s);j(`to see all the valid ${n} properties please check: ${e}`)}}};m([pe("gridOptions")],Nh.prototype,"gridOptions",2),m([he],Nh.prototype,"init",1),Nh=m([ue("validationService")],Nh);var Oh=class extends ot{constructor(){super(...arguments),this.syncEventListeners=new Map,this.asyncEventListeners=new Map,this.syncGlobalEventListeners=new Set,this.globalEventListenerPairs=new Map}postConstruct(){this.frameworkEventWrappingService=new Ce(this.getFrameworkOverrides())}addEventListener(e,t){const i=this.frameworkEventWrappingService.wrap(t),n=this.gos.useAsyncEvents()&&!ut.has(e),s=n?this.asyncEventListeners:this.syncEventListeners;s.has(e)||s.set(e,new Set),s.get(e).add(i),this.eventService.addEventListener(e,i,n)}removeEventListener(e,t){var i;const n=this.frameworkEventWrappingService.unwrap(t),s=this.asyncEventListeners.get(e),r=!!(null==s?void 0:s.delete(n));r||null==(i=this.syncEventListeners.get(e))||i.delete(n),this.eventService.removeEventListener(e,n,r)}addGlobalListener(e){const t=this.frameworkEventWrappingService.wrapGlobal(e);if(this.gos.useAsyncEvents()){const i=(e,i)=>{ut.has(e)&&t(e,i)},n=(e,i)=>{ut.has(e)||t(e,i)};this.globalEventListenerPairs.set(e,{syncListener:i,asyncListener:n}),this.eventService.addGlobalListener(i,!1),this.eventService.addGlobalListener(n,!0)}else this.syncGlobalEventListeners.add(t),this.eventService.addGlobalListener(t,!1)}removeGlobalListener(e){const t=this.frameworkEventWrappingService.unwrapGlobal(e);if(this.globalEventListenerPairs.has(t)){const{syncListener:i,asyncListener:n}=this.globalEventListenerPairs.get(t);this.eventService.removeGlobalListener(i,!1),this.eventService.removeGlobalListener(n,!0),this.globalEventListenerPairs.delete(e)}else this.syncGlobalEventListeners.delete(t),this.eventService.removeGlobalListener(t,!1)}destroyEventListeners(e,t){e.forEach((e,i)=>{e.forEach(e=>this.eventService.removeEventListener(i,e,t)),e.clear()}),e.clear()}destroyGlobalListeners(e,t){e.forEach(e=>this.eventService.removeGlobalListener(e,t)),e.clear()}destroy(){super.destroy(),this.destroyEventListeners(this.syncEventListeners,!1),this.destroyEventListeners(this.asyncEventListeners,!0),this.destroyGlobalListeners(this.syncGlobalEventListeners,!1),this.globalEventListenerPairs.forEach(({syncListener:e,asyncListener:t})=>{this.eventService.removeGlobalListener(e,!1),this.eventService.removeGlobalListener(t,!0)}),this.globalEventListenerPairs.clear()}};m([he],Oh.prototype,"postConstruct",1),Oh=m([ue("apiEventService")],Oh);var _h=class extends ws{constructor(){super('<span class="ag-paging-page-size"></span>'),this.hasEmptyOption=!1,this.handlePageSizeItemSelected=()=>{if(!this.selectPageSizeComp)return;const e=this.selectPageSizeComp.getValue();if(!e)return;const t=Number(e);isNaN(t)||t<1||t===this.paginationProxy.getPageSize()||(this.paginationProxy.setPageSize(t,"pageSizeSelector"),this.hasEmptyOption&&this.toggleSelectDisplay(!0),this.selectPageSizeComp.getFocusableElement().focus())}}init(){this.addManagedPropertyListener("paginationPageSizeSelector",()=>{this.onPageSizeSelectorValuesChange()}),this.addManagedListener(this.eventService,dt.EVENT_PAGINATION_CHANGED,e=>this.handlePaginationChanged(e))}handlePaginationChanged(e){if(!this.selectPageSizeComp||!(null==e?void 0:e.newPageSize))return;const t=this.paginationProxy.getPageSize();this.getPageSizeSelectorValues().includes(t)?this.selectPageSizeComp.setValue(t.toString()):this.hasEmptyOption?this.selectPageSizeComp.setValue(""):this.toggleSelectDisplay(!0)}toggleSelectDisplay(e){this.selectPageSizeComp&&this.reset(),e&&(this.reloadPageSizesSelector(),this.selectPageSizeComp&&this.appendChild(this.selectPageSizeComp))}reset(){wn(this.getGui()),this.selectPageSizeComp&&(this.destroyBean(this.selectPageSizeComp),this.selectPageSizeComp=void 0)}onPageSizeSelectorValuesChange(){this.selectPageSizeComp&&this.shouldShowPageSizeSelector()&&this.reloadPageSizesSelector()}shouldShowPageSizeSelector(){return this.gos.get("pagination")&&!this.gos.get("suppressPaginationPanel")&&!this.gos.get("paginationAutoPageSize")&&!1!==this.gos.get("paginationPageSizeSelector")}reloadPageSizesSelector(){const e=this.getPageSizeSelectorValues(),t=this.paginationProxy.getPageSize(),i=!t||!e.includes(t);i&&(e.unshift(""),j("The paginationPageSize grid option is set to a value that is not in the list of page size options.\n                Please make sure that the paginationPageSize grid option is set to one of the values in the \n                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(),s=n("pageSizeSelectorLabel","Page Size:"),r=e.map(e=>({value:String(e),text:String(e)})),o=n("ariaPageSizeSelectorLabel","Page Size");this.selectPageSizeComp=this.createManagedBean(new Us).addOptions(r).setValue(String(i?"":t)).setAriaLabel(o).setLabel(s).onValueChange(()=>this.handlePageSizeItemSelected()),this.hasEmptyOption=i}getPageSizeSelectorValues(){const e=this.gos.get("paginationPageSizeSelector");return Array.isArray(e)&&this.validateValues(e)?[...e].sort((e,t)=>e-t):[20,50,100]}validateValues(e){if(!e.length)return j("The paginationPageSizeSelector grid option is an empty array. This is most likely a mistake.\n                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=i>0;if("number"!=typeof i)return j("The paginationPageSizeSelector grid option contains a non-numeric value.\n                    Please make sure that all values in the paginationPageSizeSelector array are numbers."),!1;if(!n)return j("The paginationPageSizeSelector grid option contains a negative number or zero.\n                    Please make sure that all values in the paginationPageSizeSelector array are positive."),!1}return!0}destroy(){this.toggleSelectDisplay(!1),super.destroy()}};m([pe("paginationProxy")],_h.prototype,"paginationProxy",2),m([he],_h.prototype,"init",1);var Fh=class extends ot{constructor(){super(),this.descriptionContainer=null,this.announceValue=ee(this.announceValue.bind(this),200)}postConstruct(){const e=this.gos.getDocument(),t=this.descriptionContainer=e.createElement("div");t.classList.add("ag-aria-description-container"),Zt(t,"polite"),Jt(t,"additions text"),Qt(t,!0),this.eGridDiv.appendChild(t)}announceValue(e){this.descriptionContainer&&(this.descriptionContainer.textContent="",setTimeout(()=>{this.isAlive()&&this.descriptionContainer&&(this.descriptionContainer.textContent=e)},50))}destroy(){super.destroy();const{descriptionContainer:e}=this;e&&(wn(e),e.parentElement&&e.parentElement.removeChild(e)),this.descriptionContainer=null,this.eGridDiv=null}};m([pe("eGridDiv")],Fh.prototype,"eGridDiv",2),m([he],Fh.prototype,"postConstruct",1),Fh=m([ue("ariaAnnouncementService")],Fh);var Gh=class{};function Vh(e){Gh.gridOptions=e}function Bh(e,t,i){if(!t)return K("No gridOptions provided to createGrid"),{};const n=(new Uh).create(e,t,t=>{const i=new _c(e);t.createBean(i)},void 0,i);if(!Object.isFrozen(t)&&!(null==i?void 0:i.frameworkOverrides)){const e="https://ag-grid.com/javascript-data-grid/grid-interface/#grid-api";Object.defineProperty(t,"api",{get:()=>{K(`gridOptions.api is no longer supported. See ${e}.`)},configurable:!0}),Object.defineProperty(t,"columnApi",{get:()=>{K(`gridOptions.columnApi is no longer supported and all methods moved to the grid api. See ${e}.`)},configurable:!0})}return n}Gh.gridOptions=void 0;var Hh=class{constructor(e,t,i){if(j("Since v31 new Grid(...) is deprecated. Use createGrid instead: `const gridApi = createGrid(...)`. The grid api is returned from createGrid and will not be available on gridOptions."),!t)return void K("No gridOptions provided to the grid");this.gridOptions=t;const n=(new Uh).create(e,t,t=>{const i=new _c(e);t.createBean(i).addDestroyFunc(()=>{this.destroy()})},void 0,i);this.gridOptions.api=n,this.gridOptions.columnApi=new Rc(n)}destroy(){var e;this.gridOptions&&(null==(e=this.gridOptions.api)||e.destroy(),delete this.gridOptions.api,delete this.gridOptions.columnApi)}},zh=1,Uh=class{create(e,t,i,n,s){var r;let o={};Gh.gridOptions?(G(o,Gh.gridOptions,!0,!0),o=p(p({},o),t)):o=t;const a=Eh.getCoercedGridOptions(o),l=!!a.debug,c=null!=(r=a.gridId)?r:String(zh++),h=this.getRegisteredModules(s,c),d=this.createBeansList(a.rowModelType,h,c),u=this.createProvidedBeans(e,a,s);if(!d)return void K("Failed to create grid.");const g={providedBeanInstances:u,beanClasses:d,debug:l,gridId:c},f=new Nc("Context",()=>g.debug),m=new le(g,f),v=m.getBean("beans");return this.registerModuleUserComponents(v,h),this.registerStackComponents(v,h),this.registerControllers(v,h),i(m),v.syncService.start(),n&&n(m),m.getBean("gridApi")}registerControllers(e,t){t.forEach(t=>{t.controllers&&t.controllers.forEach(t=>e.ctrlsFactory.register(t))})}registerStackComponents(e,t){const i=this.createAgStackComponentsList(t);e.agStackComponentsRegistry.setupComponents(i)}getRegisteredModules(e,t){const i=e?e.modules:null,n=ae.__getRegisteredModules(t),s=[],r={},o=(e,t,i)=>{var n;r[(n=t).moduleName]||(r[n.moduleName]=!0,s.push(n),ae.__register(n,e,i)),t.dependantModules&&t.dependantModules.forEach(t=>o(e,t,i))};return i&&i.forEach(e=>o(!0,e,t)),n&&n.forEach(e=>o(!ae.__isPackageBased(),e,void 0)),s}registerModuleUserComponents(e,t){this.extractModuleEntity(t,e=>e.userComponents?e.userComponents:[]).forEach(t=>{e.userComponentRegistry.registerDefaultComponent(t.componentName,t.componentClass)})}createProvidedBeans(e,t,i){let n=i?i.frameworkOverrides:null;w(n)&&(n=new Ac);const s={gridOptions:t,eGridDiv:e,globalEventListener:i?i.globalEventListener:null,globalSyncEventListener:i?i.globalSyncEventListener:null,frameworkOverrides:n};return i&&i.providedBeanInstances&&Object.assign(s,i.providedBeanInstances),s}createAgStackComponentsList(e){let t=[{componentName:"AgCheckbox",componentClass:js},{componentName:"AgRadioButton",componentClass:Ks},{componentName:"AgToggleButton",componentClass:Kl},{componentName:"AgInputTextField",componentClass:sr},{componentName:"AgInputTextArea",componentClass:$l},{componentName:"AgInputNumberField",componentClass:rr},{componentName:"AgInputDateField",componentClass:Yl},{componentName:"AgInputRange",componentClass:ql},{componentName:"AgRichSelect",componentClass:Jl},{componentName:"AgSelect",componentClass:Us},{componentName:"AgSlider",componentClass:tc},{componentName:"AgGridBody",componentClass:Oa},{componentName:"AgHeaderRoot",componentClass:Sl},{componentName:"AgSortIndicator",componentClass:Sr},{componentName:"AgPagination",componentClass:Zc},{componentName:"AgPageSizeSelector",componentClass:_h},{componentName:"AgOverlayWrapper",componentClass:Jc},{componentName:"AgGroupComponent",componentClass:nc},{componentName:"AgRowContainer",componentClass:Ua},{componentName:"AgFakeHorizontalScroll",componentClass:fh},{componentName:"AgFakeVerticalScroll",componentClass:Th},{componentName:"AgAutocomplete",componentClass:bc}];const i=this.extractModuleEntity(e,e=>e.agStackComponents?e.agStackComponents:[]);return t=t.concat(i),t}createBeansList(e="clientSide",t,i){const n=t.filter(t=>!t.rowModel||t.rowModel===e),s={clientSide:"@ag-grid-community/client-side-row-model",infinite:"@ag-grid-community/infinite-row-model",serverSide:"@ag-grid-enterprise/server-side-row-model",viewport:"@ag-grid-enterprise/viewport-row-model"};if(!s[e])return void K("Could not find row model for rowModelType = "+e);if(!ae.__assertRegistered(s[e],`rowModelType = '${e}'`,i))return;const r=[ha,eh,th,ah,Hc,jo,fo,Wc,jc,Il,_o,qc,wl,Mh,Nh,Gl,Ho,Lt,ye,Eh,fc,Ic,$o,Dt,yl,Wl,_l,kc,at,Dc,Ga,zc,Lc,Pc,Nl,xl,Hr,Rc,Gc,Fa,Yc,Tc,jl,_a,Fc,Vc,Bc,Xc,ft,Uc,Rl,oh,Ft,lh,ch,Ul,hh,dh,mh,vh,uh,Rh,Ko,Lh,kh,Ph,kl,Oh,Fh,Pl],o=this.extractModuleEntity(n,e=>e.beans?e.beans:[]);r.push(...o);const a=[];return r.forEach(e=>{a.indexOf(e)<0&&a.push(e)}),a}extractModuleEntity(e,t){return[].concat(...e.map(t))}},Wh=class{wrap(e,t,i=[],n){const s=this.createWrapper(e,n);return t.forEach(e=>{this.createMethod(s,e,!0)}),i.forEach(e=>{this.createMethod(s,e,!1)}),s}unwrap(e){return e}createMethod(e,t,i){e.addMethod(t,this.createMethodProxy(e,t,i))}createMethodProxy(e,t,i){return function(){return e.hasMethod(t)?e.callMethod(t,arguments):(i&&console.warn("AG Grid: Framework component is missing the method "+t+"()"),null)}}},jh=class{};jh.CHART_TYPE_TO_SERIES_TYPE={column:"bar",groupedColumn:"bar",stackedColumn:"bar",normalizedColumn:"bar",bar:"bar",groupedBar:"bar",stackedBar:"bar",normalizedBar:"bar",line:"line",scatter:"scatter",bubble:"bubble",pie:"pie",donut:"donut",doughnut:"donut",area:"area",stackedArea:"area",normalizedArea:"area",histogram:"histogram",radarLine:"radar-line",radarArea:"radar-area",nightingale:"nightingale",radialColumn:"radial-column",radialBar:"radial-bar",sunburst:"sunburst",rangeBar:"range-bar",rangeArea:"range-area",boxPlot:"box-plot",treemap:"treemap",heatmap:"heatmap",waterfall:"waterfall"},jh.COMBO_CHART_TYPES=["columnLineCombo","areaColumnCombo","customCombo"],jh.SERIES_GROUP_TYPES=["grouped","stacked","normalized"];var Kh=(e=>(e.InsideBase="insideBase",e.InsideEnd="insideEnd",e.Center="center",e.OutsideEnd="outsideEnd",e))(Kh||{}),$h=void 0===i.g?{}:i.g;$h.HTMLElement="undefined"==typeof HTMLElement?{}:HTMLElement,$h.HTMLButtonElement="undefined"==typeof HTMLButtonElement?{}:HTMLButtonElement,$h.HTMLSelectElement="undefined"==typeof HTMLSelectElement?{}:HTMLSelectElement,$h.HTMLInputElement="undefined"==typeof HTMLInputElement?{}:HTMLInputElement,$h.Node="undefined"==typeof Node?{}:Node,$h.MouseEvent="undefined"==typeof MouseEvent?{}:MouseEvent;var Yh=class e{constructor(t,i,n,s,r,o){this.nextId=0,this.rowCountReady=!1,this.allNodesMap={},this.rootNode=t,this.gos=i,this.eventService=n,this.columnModel=s,this.beans=o,this.selectionService=r,this.rootNode.group=!0,this.rootNode.level=-1,this.rootNode.id=e.ROOT_NODE_ID,this.rootNode.allLeafChildren=[],this.rootNode.childrenAfterGroup=[],this.rootNode.childrenAfterSort=[],this.rootNode.childrenAfterAggFilter=[],this.rootNode.childrenAfterFilter=[]}getCopyOfNodesMap(){return ds.cloneObject(this.allNodesMap)}getRowNode(e){return this.allNodesMap[e]}setRowData(t){if("string"==typeof t)return void console.warn("AG Grid: rowData must be an array.");this.rowCountReady=!0,this.dispatchRowDataUpdateStartedEvent(t);const i=this.rootNode,n=this.rootNode.sibling;i.childrenAfterFilter=null,i.childrenAfterGroup=null,i.childrenAfterAggFilter=null,i.childrenAfterSort=null,i.childrenMapped=null,i.updateHasChildren(),this.nextId=0,this.allNodesMap={},t?i.allLeafChildren=t.map(t=>this.createNode(t,this.rootNode,e.TOP_LEVEL)):(i.allLeafChildren=[],i.childrenAfterGroup=[]),n&&(n.childrenAfterFilter=i.childrenAfterFilter,n.childrenAfterGroup=i.childrenAfterGroup,n.childrenAfterAggFilter=i.childrenAfterAggFilter,n.childrenAfterSort=i.childrenAfterSort,n.childrenMapped=i.childrenMapped,n.allLeafChildren=i.allLeafChildren)}updateRowData(e,t){this.rowCountReady=!0,this.dispatchRowDataUpdateStartedEvent(e.add);const i={remove:[],update:[],add:[]},n=[];return this.executeRemove(e,i,n),this.executeUpdate(e,i,n),this.executeAdd(e,i),this.updateSelection(n,"rowDataChanged"),t&&ds.sortRowNodesByOrder(this.rootNode.allLeafChildren,t),i}isRowCountReady(){return this.rowCountReady}dispatchRowDataUpdateStartedEvent(e){const t={type:dt.EVENT_ROW_DATA_UPDATE_STARTED,firstRowData:(null==e?void 0:e.length)?e[0]:null};this.eventService.dispatchEvent(t)}updateSelection(e,t){const i=e.length>0;if(i&&this.selectionService.setNodesSelected({newValue:!1,nodes:e,suppressFinishActions:!0,source:t}),this.selectionService.updateGroupsFromChildrenSelections(t),i){const e={type:dt.EVENT_SELECTION_CHANGED,source:t};this.eventService.dispatchEvent(e)}}executeAdd(t,i){var n;const{add:s,addIndex:r}=t;if(ds.missingOrEmpty(s))return;const o=s.map(t=>this.createNode(t,this.rootNode,e.TOP_LEVEL));if("number"==typeof r&&r>=0){const{allLeafChildren:e}=this.rootNode,t=e.length;let i=r;if(this.gos.get("treeData")&&r>0&&t>0)for(let s=0;s<t;s++)if((null==(n=e[s])?void 0:n.rowIndex)==r-1){i=s+1;break}const s=e.slice(0,i),a=e.slice(i,e.length);this.rootNode.allLeafChildren=[...s,...o,...a]}else this.rootNode.allLeafChildren=[...this.rootNode.allLeafChildren,...o];this.rootNode.sibling&&(this.rootNode.sibling.allLeafChildren=this.rootNode.allLeafChildren),i.add=o}executeRemove(e,t,i){const{remove:n}=e;if(ds.missingOrEmpty(n))return;const s={};n.forEach(e=>{const n=this.lookupRowNode(e);n&&(n.isSelected()&&i.push(n),n.clearRowTopAndRowIndex(),s[n.id]=!0,delete this.allNodesMap[n.id],t.remove.push(n))}),this.rootNode.allLeafChildren=this.rootNode.allLeafChildren.filter(e=>!s[e.id]),this.rootNode.sibling&&(this.rootNode.sibling.allLeafChildren=this.rootNode.allLeafChildren)}executeUpdate(t,i,n){const{update:s}=t;ds.missingOrEmpty(s)||s.forEach(t=>{const s=this.lookupRowNode(t);s&&(s.updateData(t),!s.selectable&&s.isSelected()&&n.push(s),this.setMasterForRow(s,t,e.TOP_LEVEL,!1),i.update.push(s))})}lookupRowNode(e){const t=this.gos.getCallback("getRowId");let i;if(t){const n=t({data:e,level:0});if(i=this.allNodesMap[n],!i)return console.error(`AG Grid: could not find row id=${n}, data item was not found for this id`),null}else if(i=this.rootNode.allLeafChildren.find(t=>t.data===e),!i)return console.error("AG Grid: could not find data item as object was not found",e),console.error("Consider using getRowId to help the Grid find matching row data"),null;return i||null}createNode(e,t,i){const n=new _r(this.beans);n.group=!1,this.setMasterForRow(n,e,i,!0);const s=this.gos.get("suppressParentsInRowNodes");return t&&!s&&(n.parent=t),n.level=i,n.setDataAndId(e,this.nextId.toString()),this.allNodesMap[n.id]&&console.warn(`AG Grid: duplicate node id '${n.id}' detected from getRowId callback, this could cause issues in your grid.`),this.allNodesMap[n.id]=n,this.nextId++,n}setMasterForRow(e,t,i,n){if(this.gos.get("treeData"))e.setMaster(!1),n&&(e.expanded=!1);else{if(this.gos.get("masterDetail")){const i=this.gos.get("isRowMaster");i?e.setMaster(i(t)):e.setMaster(!0)}else e.setMaster(!1);if(n){const t=this.columnModel.getRowGroupColumns(),n=i+(t?t.length:0);e.expanded=!!e.master&&this.isExpanded(n)}}}isExpanded(e){const t=this.gos.get("groupDefaultExpanded");return-1===t||e<t}};Yh.TOP_LEVEL=0,Yh.ROOT_NODE_ID="ROOT_NODE_ID";var qh=Yh,Xh=class extends ot{constructor(){super(...arguments),this.onRowHeightChanged_debounced=ds.debounce(this.onRowHeightChanged.bind(this),100),this.rowsToDisplay=[],this.hasStarted=!1,this.shouldSkipSettingDataOnStart=!1,this.isRefreshingModel=!1,this.rowCountReady=!1}init(){const e=this.refreshModel.bind(this,{step:"group"}),t=!this.gos.get("suppressAnimationFrame"),i=this.refreshModel.bind(this,{step:"group",afterColumnsChanged:!0,keepRenderedRows:!0,animate:t});this.addManagedListener(this.eventService,dt.EVENT_NEW_COLUMNS_LOADED,i),this.addManagedListener(this.eventService,dt.EVENT_COLUMN_ROW_GROUP_CHANGED,e),this.addManagedListener(this.eventService,dt.EVENT_COLUMN_VALUE_CHANGED,this.onValueChanged.bind(this)),this.addManagedListener(this.eventService,dt.EVENT_COLUMN_PIVOT_CHANGED,this.refreshModel.bind(this,{step:"pivot"})),this.addManagedListener(this.eventService,dt.EVENT_FILTER_CHANGED,this.onFilterChanged.bind(this)),this.addManagedListener(this.eventService,dt.EVENT_SORT_CHANGED,this.onSortChanged.bind(this)),this.addManagedListener(this.eventService,dt.EVENT_COLUMN_PIVOT_MODE_CHANGED,e),this.addManagedListener(this.eventService,dt.EVENT_GRID_STYLES_CHANGED,this.onGridStylesChanges.bind(this)),this.addManagedListener(this.eventService,dt.EVENT_GRID_READY,()=>this.onGridReady()),this.addPropertyListeners(),this.rootNode=new _r(this.beans),this.nodeManager=new qh(this.rootNode,this.gos,this.eventService,this.columnModel,this.selectionService,this.beans)}addPropertyListeners(){const e=new Set(["treeData","masterDetail"]),t=new Set(["suppressParentsInRowNodes","groupDefaultExpanded","groupAllowUnbalanced","initialGroupOrderComparator","groupHideOpenParents","groupDisplayType"]),i=new Set(["excludeChildrenWhenTreeDataFiltering"]),n=new Set(["removePivotHeaderRowWhenSingleValueColumn","pivotRowTotals","pivotColumnGroupTotals","suppressExpandablePivotGroups"]),s=new Set(["getGroupRowAgg","alwaysAggregateAtRootLevel","groupIncludeTotalFooter","suppressAggFilteredOnly","grandTotalRow"]),r=new Set(["postSortRows","groupDisplayType","accentedSort"]),o=new Set([]),a=new Set(["groupRemoveSingleChildren","groupRemoveLowestSingleChildren","groupIncludeFooter","groupTotalRow"]),l=[...e,...t,...i,...n,...n,...s,...r,...o,...a];this.addManagedPropertyListeners(l,l=>{var c;const h=null==(c=l.changeSet)?void 0:c.properties;if(!h)return;const d=e=>h.some(t=>e.has(t));d(e)?this.setRowData(this.rootNode.allLeafChildren.map(e=>e.data)):d(t)?this.refreshModel({step:"group"}):d(i)?this.refreshModel({step:"filter"}):d(n)?this.refreshModel({step:"pivot"}):d(s)?this.refreshModel({step:"aggregate"}):d(r)?this.refreshModel({step:"sort"}):d(o)?this.refreshModel({step:"filter_aggregates"}):d(a)&&this.refreshModel({step:"map"})}),this.addManagedPropertyListener("rowHeight",()=>this.resetRowHeights())}start(){this.hasStarted=!0,this.shouldSkipSettingDataOnStart?this.dispatchUpdateEventsAndRefresh():this.setInitialData()}setInitialData(){const e=this.gos.get("rowData");e&&(this.shouldSkipSettingDataOnStart=!0,this.setRowData(e))}ensureRowHeightsValid(e,t,i,n){let s,r=!1;do{s=!1;const o=this.getRowIndexAtPixel(e),a=this.getRowIndexAtPixel(t),l=Math.max(o,i),c=Math.min(a,n);for(let e=l;e<=c;e++){const t=this.getRow(e);if(t.rowHeightEstimated){const e=this.gos.getRowHeightForNode(t);t.setRowHeight(e.height),s=!0,r=!0}}s&&this.setRowTopAndRowIndex()}while(s);return r}setRowTopAndRowIndex(){const e=this.environment.getDefaultRowHeight();let t=0;const i=new Set,n=this.gos.isDomLayout("normal");for(let s=0;s<this.rowsToDisplay.length;s++){const r=this.rowsToDisplay[s];if(null!=r.id&&i.add(r.id),null==r.rowHeight){const t=this.gos.getRowHeightForNode(r,n,e);r.setRowHeight(t.height,t.estimated)}r.setRowTop(t),r.setRowIndex(s),t+=r.rowHeight}return i}clearRowTopAndRowIndex(e,t){const i=e.isActive(),n=e=>{e&&null!=e.id&&!t.has(e.id)&&e.clearRowTopAndRowIndex()},s=e=>{if(n(e),n(e.detailNode),n(e.sibling),e.hasChildren()&&e.childrenAfterGroup){const t=-1==e.level;i&&!t&&!e.expanded||e.childrenAfterGroup.forEach(s)}};s(this.rootNode)}ensureRowsAtPixel(e,t,i=0){const n=this.getRowIndexAtPixel(t),s=this.getRow(n),r=!this.gos.get("suppressAnimationFrame");return s!==e[0]&&(e.forEach(e=>{ds.removeFromArray(this.rootNode.allLeafChildren,e)}),e.forEach((e,t)=>{ds.insertIntoArray(this.rootNode.allLeafChildren,e,Math.max(n+i,0)+t)}),this.refreshModel({step:"group",keepRenderedRows:!0,keepEditingRows:!0,animate:r}),!0)}highlightRowAtPixel(e,t){const i=null!=t?this.getRowIndexAtPixel(t):null,n=null!=i?this.getRow(i):null;if(!n||!e||n===e||null==t)return void(this.lastHighlightedRow&&(this.lastHighlightedRow.setHighlighted(null),this.lastHighlightedRow=null));const s=this.getHighlightPosition(t,n);this.lastHighlightedRow&&this.lastHighlightedRow!==n&&(this.lastHighlightedRow.setHighlighted(null),this.lastHighlightedRow=null),n.setHighlighted(s),this.lastHighlightedRow=n}getHighlightPosition(e,t){if(!t){const i=this.getRowIndexAtPixel(e);if(!(t=this.getRow(i||0)))return 1}const{rowTop:i,rowHeight:n}=t;return e-i<n/2?0:1}getLastHighlightedRowNode(){return this.lastHighlightedRow}isLastRowIndexKnown(){return!0}getRowCount(){return this.rowsToDisplay?this.rowsToDisplay.length:0}getTopLevelRowCount(){if(this.rowsToDisplay&&this.rowsToDisplay[0]===this.rootNode)return 1;const e=this.rootNode.childrenAfterAggFilter;return e?e.length:0}getTopLevelRowDisplayedIndex(e){if(this.rowsToDisplay&&this.rowsToDisplay[0]===this.rootNode)return e;let t=this.rootNode.childrenAfterSort[e];if(this.gos.get("groupHideOpenParents"))for(;t.expanded&&t.childrenAfterSort&&t.childrenAfterSort.length>0;)t=t.childrenAfterSort[0];return t.rowIndex}getRowBounds(e){if(ds.missing(this.rowsToDisplay))return null;const t=this.rowsToDisplay[e];return t?{rowTop:t.rowTop,rowHeight:t.rowHeight}:null}onRowGroupOpened(){const e=this.gos.isAnimateRows();this.refreshModel({step:"map",keepRenderedRows:!0,animate:e})}onFilterChanged(e){if(e.afterDataChange)return;const t=this.gos.isAnimateRows(),i=0===e.columns.length||e.columns.some(e=>e.isPrimary())?"filter":"filter_aggregates";this.refreshModel({step:i,keepRenderedRows:!0,animate:t})}onSortChanged(){const e=this.gos.isAnimateRows();this.refreshModel({step:"sort",keepRenderedRows:!0,animate:e,keepEditingRows:!0})}getType(){return"clientSide"}onValueChanged(){this.columnModel.isPivotActive()?this.refreshModel({step:"pivot"}):this.refreshModel({step:"aggregate"})}createChangePath(e){const t=ds.missingOrEmpty(e),i=new Bl(!1,this.rootNode);return(t||this.gos.get("treeData"))&&i.setInactive(),i}isSuppressModelUpdateAfterUpdateTransaction(e){if(!this.gos.get("suppressModelUpdateAfterUpdateTransaction"))return!1;if(null==e.rowNodeTransactions)return!1;const t=e.rowNodeTransactions.filter(e=>null!=e.add&&e.add.length>0||null!=e.remove&&e.remove.length>0);return null==t||0==t.length}buildRefreshModelParams(e){let t="group";const i={everything:"group",group:"group",filter:"filter",map:"map",aggregate:"aggregate",sort:"sort",pivot:"pivot"};if(ds.exists(e)&&(t=i[e]),!ds.missing(t))return{step:t,keepRenderedRows:!0,keepEditingRows:!0,animate:!this.gos.get("suppressAnimationFrame")};console.error(`AG Grid: invalid step ${e}, available steps are ${Object.keys(i).join(", ")}`)}refreshModel(e){if(!this.hasStarted||this.isRefreshingModel||this.columnModel.shouldRowModelIgnoreRefresh())return;let t="object"==typeof e&&"step"in e?e:this.buildRefreshModelParams(e);if(!t)return;if(this.isSuppressModelUpdateAfterUpdateTransaction(t))return;const i=this.createChangePath(t.rowNodeTransactions);switch(this.isRefreshingModel=!0,t.step){case"group":this.doRowGrouping(t.rowNodeTransactions,t.rowNodeOrder,i,!!t.afterColumnsChanged);case"filter":this.doFilter(i);case"pivot":this.doPivot(i);case"aggregate":this.doAggregate(i);case"filter_aggregates":this.doFilterAggregates(i);case"sort":this.doSort(t.rowNodeTransactions,i);case"map":this.doRowsToDisplay()}const n=this.setRowTopAndRowIndex();this.clearRowTopAndRowIndex(i,n),this.isRefreshingModel=!1;const s={type:dt.EVENT_MODEL_UPDATED,animate:t.animate,keepRenderedRows:t.keepRenderedRows,newData:t.newData,newPage:!1,keepUndoRedoStack:t.keepUndoRedoStack};this.eventService.dispatchEvent(s)}isEmpty(){const e=ds.missing(this.rootNode.allLeafChildren)||0===this.rootNode.allLeafChildren.length;return ds.missing(this.rootNode)||e||!this.columnModel.isReady()}isRowsToRender(){return ds.exists(this.rowsToDisplay)&&this.rowsToDisplay.length>0}getNodesInRangeForSelection(e,t){let i=!t,n=!1;const s=[],r=this.gos.get("groupSelectsChildren");return this.forEachNodeAfterFilterAndSort(o=>{if(!n)if(i&&(o===t||o===e)&&(n=!0,o.group&&r))s.push(...o.allLeafChildren);else{if(!i){if(o!==t&&o!==e)return;i=!0}(!o.group||!r)&&s.push(o)}}),s}setDatasource(e){console.error("AG Grid: should never call setDatasource on clientSideRowController")}getTopLevelNodes(){return this.rootNode?this.rootNode.childrenAfterGroup:null}getRootNode(){return this.rootNode}getRow(e){return this.rowsToDisplay[e]}isRowPresent(e){return this.rowsToDisplay.indexOf(e)>=0}getRowIndexAtPixel(e){if(this.isEmpty()||0===this.rowsToDisplay.length)return-1;let t=0,i=this.rowsToDisplay.length-1;if(e<=0)return 0;if(ds.last(this.rowsToDisplay).rowTop<=e)return this.rowsToDisplay.length-1;let n=-1,s=-1;for(;;){const r=Math.floor((t+i)/2),o=this.rowsToDisplay[r];if(this.isRowInPixel(o,e))return r;if(o.rowTop<e?t=r+1:o.rowTop>e&&(i=r-1),n===t&&s===i)return r;n=t,s=i}}isRowInPixel(e,t){const i=e.rowTop,n=e.rowTop+e.rowHeight;return i<=t&&n>t}forEachLeafNode(e){this.rootNode.allLeafChildren&&this.rootNode.allLeafChildren.forEach((t,i)=>e(t,i))}forEachNode(e,t=!1){this.recursivelyWalkNodesAndCallback({nodes:[...this.rootNode.childrenAfterGroup||[]],callback:e,recursionType:0,index:0,includeFooterNodes:t})}forEachNodeAfterFilter(e,t=!1){this.recursivelyWalkNodesAndCallback({nodes:[...this.rootNode.childrenAfterAggFilter||[]],callback:e,recursionType:1,index:0,includeFooterNodes:t})}forEachNodeAfterFilterAndSort(e,t=!1){this.recursivelyWalkNodesAndCallback({nodes:[...this.rootNode.childrenAfterSort||[]],callback:e,recursionType:2,index:0,includeFooterNodes:t})}forEachPivotNode(e,t=!1){this.recursivelyWalkNodesAndCallback({nodes:[this.rootNode],callback:e,recursionType:3,index:0,includeFooterNodes:t})}recursivelyWalkNodesAndCallback(e){const{nodes:t,callback:i,recursionType:n,includeFooterNodes:s}=e;let{index:r}=e;const o=e=>{var n;const o=null==(n=t[0])?void 0:n.parent;if(!o)return;const a=s&&this.gos.getGrandTotalRow(),l=this.gos.getGroupTotalRowCallback(),c=s&&l({node:o});o===this.rootNode?a===e&&(o.createFooter(),i(o.sibling,r++)):c===e&&(o.createFooter(),i(o.sibling,r++))};o("top");for(let e=0;e<t.length;e++){const o=t[e];if(i(o,r++),o.hasChildren()&&!o.footer){let e=null;switch(n){case 0:e=o.childrenAfterGroup;break;case 1:e=o.childrenAfterAggFilter;break;case 2:e=o.childrenAfterSort;break;case 3:e=o.leafGroup?null:o.childrenAfterSort}e&&(r=this.recursivelyWalkNodesAndCallback({nodes:[...e],callback:i,recursionType:n,index:r,includeFooterNodes:s}))}}return o("bottom"),r}doAggregate(e){var t;null==(t=this.aggregationStage)||t.execute({rowNode:this.rootNode,changedPath:e})}doFilterAggregates(e){this.filterAggregatesStage?this.filterAggregatesStage.execute({rowNode:this.rootNode,changedPath:e}):this.rootNode.childrenAfterAggFilter=this.rootNode.childrenAfterFilter}expandOrCollapseAll(e){const t=this.gos.get("treeData"),i=this.columnModel.isPivotActive(),n=s=>{s&&s.forEach(s=>{const r=()=>{s.expanded=e,n(s.childrenAfterGroup)};t?ds.exists(s.childrenAfterGroup)&&r():i?!s.leafGroup&&r():s.group&&r()})};this.rootNode&&n(this.rootNode.childrenAfterGroup),this.refreshModel({step:"map"});const s=e?"expandAll":"collapseAll",r={type:dt.EVENT_EXPAND_COLLAPSE_ALL,source:s};this.eventService.dispatchEvent(r)}doSort(e,t){this.sortStage.execute({rowNode:this.rootNode,rowNodeTransactions:e,changedPath:t})}doRowGrouping(e,t,i,n){if(this.groupStage){if(e?this.groupStage.execute({rowNode:this.rootNode,rowNodeTransactions:e,rowNodeOrder:t,changedPath:i}):this.groupStage.execute({rowNode:this.rootNode,changedPath:i,afterColumnsChanged:n}),this.gos.get("groupSelectsChildren")&&this.selectionService.updateGroupsFromChildrenSelections("rowGroupChanged",i)){const e={type:dt.EVENT_SELECTION_CHANGED,source:"rowGroupChanged"};this.eventService.dispatchEvent(e)}}else this.rootNode.childrenAfterGroup=this.rootNode.allLeafChildren,this.rootNode.sibling&&(this.rootNode.sibling.childrenAfterGroup=this.rootNode.childrenAfterGroup),this.rootNode.updateHasChildren();this.nodeManager.isRowCountReady()&&(this.rowCountReady=!0,this.eventService.dispatchEventOnce({type:dt.EVENT_ROW_COUNT_READY}))}doFilter(e){this.filterStage.execute({rowNode:this.rootNode,changedPath:e})}doPivot(e){var t;null==(t=this.pivotStage)||t.execute({rowNode:this.rootNode,changedPath:e})}getCopyOfNodesMap(){return this.nodeManager.getCopyOfNodesMap()}getRowNode(e){if("string"==typeof e&&0==e.indexOf(_r.ID_PREFIX_ROW_GROUP)){let t;return this.forEachNode(i=>{i.id===e&&(t=i)}),t}return this.nodeManager.getRowNode(e)}setRowData(e){this.selectionService.reset("rowDataChanged"),this.nodeManager.setRowData(e),this.hasStarted&&this.dispatchUpdateEventsAndRefresh()}dispatchUpdateEventsAndRefresh(){const e={type:dt.EVENT_ROW_DATA_UPDATED};this.eventService.dispatchEvent(e),this.refreshModel({step:"group",newData:!0})}batchUpdateRowData(e,t){if(null==this.applyAsyncTransactionsTimeout){this.rowDataTransactionBatch=[];const e=this.gos.getAsyncTransactionWaitMillis();this.applyAsyncTransactionsTimeout=window.setTimeout(()=>{this.executeBatchUpdateRowData()},e)}this.rowDataTransactionBatch.push({rowDataTransaction:e,callback:t})}flushAsyncTransactions(){null!=this.applyAsyncTransactionsTimeout&&(clearTimeout(this.applyAsyncTransactionsTimeout),this.executeBatchUpdateRowData())}executeBatchUpdateRowData(){this.valueCache.onDataChanged();const e=[],t=[];let i=!1;if(this.rowDataTransactionBatch&&this.rowDataTransactionBatch.forEach(n=>{const s=this.nodeManager.updateRowData(n.rowDataTransaction,void 0);t.push(s),n.callback&&e.push(n.callback.bind(null,s)),"number"==typeof n.rowDataTransaction.addIndex&&(i=!0)}),this.commonUpdateRowData(t,void 0,i),e.length>0&&window.setTimeout(()=>{e.forEach(e=>e())},0),t.length>0){const e={type:dt.EVENT_ASYNC_TRANSACTIONS_FLUSHED,results:t};this.eventService.dispatchEvent(e)}this.rowDataTransactionBatch=null,this.applyAsyncTransactionsTimeout=void 0}updateRowData(e,t){this.valueCache.onDataChanged();const i=this.nodeManager.updateRowData(e,t),n="number"==typeof e.addIndex;return this.commonUpdateRowData([i],t,n),i}createRowNodeOrder(){if(this.gos.get("suppressMaintainUnsortedOrder"))return;const e={};if(this.rootNode&&this.rootNode.allLeafChildren)for(let t=0;t<this.rootNode.allLeafChildren.length;t++)e[this.rootNode.allLeafChildren[t].id]=t;return e}commonUpdateRowData(e,t,i){if(!this.hasStarted)return;const n=!this.gos.get("suppressAnimationFrame");i&&(t=this.createRowNodeOrder());const s={type:dt.EVENT_ROW_DATA_UPDATED};this.eventService.dispatchEvent(s),this.refreshModel({step:"group",rowNodeTransactions:e,rowNodeOrder:t,keepRenderedRows:!0,keepEditingRows:!0,animate:n})}doRowsToDisplay(){this.rowsToDisplay=this.flattenStage.execute({rowNode:this.rootNode})}onRowHeightChanged(){this.refreshModel({step:"map",keepRenderedRows:!0,keepEditingRows:!0,keepUndoRedoStack:!0})}onRowHeightChangedDebounced(){this.onRowHeightChanged_debounced()}resetRowHeights(){const e=this.resetRowHeightsForAllRowNodes();this.rootNode.setRowHeight(this.rootNode.rowHeight,!0),this.rootNode.sibling&&this.rootNode.sibling.setRowHeight(this.rootNode.sibling.rowHeight,!0),e&&this.onRowHeightChanged()}resetRowHeightsForAllRowNodes(){let e=!1;return this.forEachNode(t=>{t.setRowHeight(t.rowHeight,!0);const i=t.detailNode;i&&i.setRowHeight(i.rowHeight,!0),t.sibling&&t.sibling.setRowHeight(t.sibling.rowHeight,!0),e=!0}),e}onGridStylesChanges(){this.columnModel.isAutoRowHeightActive()||this.resetRowHeights()}onGridReady(){this.hasStarted||this.setInitialData()}isRowDataLoaded(){return this.rowCountReady}};m([pe("columnModel")],Xh.prototype,"columnModel",2),m([pe("selectionService")],Xh.prototype,"selectionService",2),m([pe("valueCache")],Xh.prototype,"valueCache",2),m([pe("beans")],Xh.prototype,"beans",2),m([pe("filterStage")],Xh.prototype,"filterStage",2),m([pe("sortStage")],Xh.prototype,"sortStage",2),m([pe("flattenStage")],Xh.prototype,"flattenStage",2),m([ge("groupStage")],Xh.prototype,"groupStage",2),m([ge("aggregationStage")],Xh.prototype,"aggregationStage",2),m([ge("pivotStage")],Xh.prototype,"pivotStage",2),m([ge("filterAggregatesStage")],Xh.prototype,"filterAggregatesStage",2),m([he],Xh.prototype,"init",1),Xh=m([ue("rowModel")],Xh);var Zh=class extends ot{execute(e){const{changedPath:t}=e;this.filterService.filter(t)}};m([pe("filterService")],Zh.prototype,"filterService",2),Zh=m([ue("filterStage")],Zh);var Qh=class extends ot{execute(e){const t=this.sortController.getSortOptions(),i=ds.exists(t)&&t.length>0,n=i&&ds.exists(e.rowNodeTransactions)&&this.gos.get("deltaSort"),s=t.some(e=>this.gos.isColumnsSortingCoupledToGroup()?e.column.isPrimary()&&e.column.isRowGroupActive():!!e.column.getColDef().showRowGroup);this.sortService.sort(t,i,n,e.rowNodeTransactions,e.changedPath,s)}};m([pe("sortService")],Qh.prototype,"sortService",2),m([pe("sortController")],Qh.prototype,"sortController",2),Qh=m([ue("sortStage")],Qh);var Jh=class extends ot{execute(e){const t=e.rowNode,i=[],n=this.beans.columnModel.isPivotMode(),s=n&&t.leafGroup,r=s?[t]:t.childrenAfterSort,o=this.getFlattenDetails();if(this.recursivelyAddToRowsToDisplay(o,r,i,n,0),!s&&i.length>0&&o.grandTotalRow){t.createFooter();const e="top"===o.grandTotalRow;this.addRowNodeToRowsToDisplay(o,t.sibling,i,0,e)}return i}getFlattenDetails(){const e=this.gos.get("groupRemoveSingleChildren");return{groupRemoveLowestSingleChildren:!e&&this.gos.get("groupRemoveLowestSingleChildren"),groupRemoveSingleChildren:e,isGroupMultiAutoColumn:this.gos.isGroupMultiAutoColumn(),hideOpenParents:this.gos.get("groupHideOpenParents"),grandTotalRow:this.gos.getGrandTotalRow(),groupTotalRow:this.gos.getGroupTotalRowCallback()}}recursivelyAddToRowsToDisplay(e,t,i,n,s){if(!ds.missingOrEmpty(t))for(let r=0;r<t.length;r++){const o=t[r],a=o.hasChildren(),l=n&&!a,c=e.groupRemoveSingleChildren&&a&&1===o.childrenAfterGroup.length,h=e.groupRemoveLowestSingleChildren&&a&&o.leafGroup&&1===o.childrenAfterGroup.length,d=n&&o.leafGroup,u=e.hideOpenParents&&o.expanded&&!o.master&&!d;if(!(l||u||c||h)&&this.addRowNodeToRowsToDisplay(e,o,i,s),!n||!o.leafGroup)if(a){const t=c||h;if(o.expanded||t){const r=e.groupTotalRow({node:o});r||o.destroyFooter();const a=t?s:s+1;"top"===r&&(o.createFooter(),this.addRowNodeToRowsToDisplay(e,o.sibling,i,a)),this.recursivelyAddToRowsToDisplay(e,o.childrenAfterSort,i,n,a),"bottom"===r&&(o.createFooter(),this.addRowNodeToRowsToDisplay(e,o.sibling,i,a))}}else if(o.master&&o.expanded){const t=this.createDetailNode(o);this.addRowNodeToRowsToDisplay(e,t,i,s)}}}addRowNodeToRowsToDisplay(e,t,i,n,s){s?i.unshift(t):i.push(t),t.setUiLevel(e.isGroupMultiAutoColumn?0:n)}createDetailNode(e){if(ds.exists(e.detailNode))return e.detailNode;const t=new _r(this.beans);return t.detail=!0,t.selectable=!1,t.parent=e,ds.exists(e.id)&&(t.id="detail_"+e.id),t.data=e.data,t.level=e.level+1,e.detailNode=t,t}};m([pe("beans")],Jh.prototype,"beans",2),Jh=m([ue("flattenStage")],Jh);var ed=class extends ot{sort(e,t,i,n,s,r){const o=this.gos.get("groupMaintainOrder"),a=this.columnModel.getAllGridColumns().some(e=>e.isRowGroupActive());let l={};i&&n&&(l=this.calculateDirtyNodes(n));const c=this.columnModel.isPivotMode(),h=this.gos.getCallback("postSortRows");s&&s.forEachChangedNodeDepthFirst(n=>{var d;this.pullDownGroupDataForHideOpenParents(n.childrenAfterAggFilter,!0);const u=c&&n.leafGroup;if(o&&a&&!n.leafGroup&&!r){const e=null==(d=this.columnModel.getRowGroupColumns())?void 0:d[n.level+1],t=null===(null==e?void 0:e.getSort()),i=n.childrenAfterAggFilter.slice(0);if(n.childrenAfterSort&&!t){const e={};n.childrenAfterSort.forEach((t,i)=>{e[t.id]=i}),i.sort((t,i)=>{var n,s;return(null!=(n=e[t.id])?n:0)-(null!=(s=e[i.id])?s:0)})}n.childrenAfterSort=i}else n.childrenAfterSort=!t||u?n.childrenAfterAggFilter.slice(0):i?this.doDeltaSort(n,l,s,e):this.rowNodeSorter.doFullSort(n.childrenAfterAggFilter,e);if(n.sibling&&(n.sibling.childrenAfterSort=n.childrenAfterSort),this.updateChildIndexes(n),h){const e={nodes:n.childrenAfterSort};h(e)}}),this.updateGroupDataForHideOpenParents(s)}calculateDirtyNodes(e){const t={},i=e=>{e&&e.forEach(e=>t[e.id]=!0)};return e&&e.forEach(e=>{i(e.add),i(e.update),i(e.remove)}),t}doDeltaSort(e,t,i,n){const s=e.childrenAfterAggFilter,r=e.childrenAfterSort;if(!r)return this.rowNodeSorter.doFullSort(s,n);const o={},a=[];s.forEach(e=>{t[e.id]||!i.canSkip(e)?a.push(e):o[e.id]=!0});const l=r.filter(e=>o[e.id]),c=(e,t)=>({currentPos:t,rowNode:e}),h=a.map(c).sort((e,t)=>this.rowNodeSorter.compareRowNodes(n,e,t));return this.mergeSortedArrays(n,h,l.map(c)).map(({rowNode:e})=>e)}mergeSortedArrays(e,t,i){const n=[];let s=0,r=0;for(;s<t.length&&r<i.length;)this.rowNodeSorter.compareRowNodes(e,t[s],i[r])<0?n.push(t[s++]):n.push(i[r++]);for(;s<t.length;)n.push(t[s++]);for(;r<i.length;)n.push(i[r++]);return n}updateChildIndexes(e){if(ds.missing(e.childrenAfterSort))return;const t=e.childrenAfterSort;for(let i=0;i<t.length;i++){const n=t[i],s=0===i,r=i===e.childrenAfterSort.length-1;n.setFirstChild(s),n.setLastChild(r),n.setChildIndex(i)}}updateGroupDataForHideOpenParents(e){if(!this.gos.get("groupHideOpenParents"))return;if(this.gos.get("treeData"))return ds.warnOnce("The property hideOpenParents dose not work with Tree Data. This is because Tree Data has values at the group level, it doesn't make sense to hide them."),!1;const t=e=>{this.pullDownGroupDataForHideOpenParents(e.childrenAfterSort,!1),e.childrenAfterSort.forEach(e=>{e.hasChildren()&&t(e)})};e&&e.executeFromRootNode(e=>t(e))}pullDownGroupDataForHideOpenParents(e,t){this.gos.get("groupHideOpenParents")&&!ds.missing(e)&&e.forEach(e=>{this.columnModel.getGroupDisplayColumns().forEach(i=>{const n=i.getColDef().showRowGroup;if("string"!=typeof n)return void console.error("AG Grid: groupHideOpenParents only works when specifying specific columns for colDef.showRowGroup");const s=n,r=this.columnModel.getPrimaryColumn(s);if(r!==e.rowGroupColumn)if(t)e.setGroupValue(i.getId(),void 0);else{const t=e.getFirstChildOfFirstChild(r);t&&e.setGroupValue(i.getId(),t.key)}})})}};m([pe("columnModel")],ed.prototype,"columnModel",2),m([pe("rowNodeSorter")],ed.prototype,"rowNodeSorter",2),ed=m([ue("sortService")],ed);var td=class extends ot{filter(e){const t=this.filterManager.isChildFilterPresent();this.filterNodes(t,e)}filterNodes(e,t){const i=(t,i)=>{t.hasChildren()?t.childrenAfterFilter=e&&!i?t.childrenAfterGroup.filter(e=>{const t=e.childrenAfterFilter&&e.childrenAfterFilter.length>0,i=e.data&&this.filterManager.doesRowPassFilter({rowNode:e});return t||i}):t.childrenAfterGroup:t.childrenAfterFilter=t.childrenAfterGroup,t.sibling&&(t.sibling.childrenAfterFilter=t.childrenAfterFilter)};if(this.doingTreeDataFiltering()){const e=(t,n)=>{if(t.childrenAfterGroup)for(let s=0;s<t.childrenAfterGroup.length;s++){const r=t.childrenAfterGroup[s],o=n||this.filterManager.doesRowPassFilter({rowNode:r});r.childrenAfterGroup?e(t.childrenAfterGroup[s],o):i(r,o)}i(t,n)},n=t=>e(t,!1);t.executeFromRootNode(n)}else{const e=e=>i(e,!1);t.forEachChangedNodeDepthFirst(e,!0)}}doingTreeDataFiltering(){return this.gos.get("treeData")&&!this.gos.get("excludeChildrenWhenTreeDataFiltering")}};m([pe("filterManager")],td.prototype,"filterManager",2),td=m([ue("filterService")],td);var id=class extends ot{postConstruct(){"clientSide"===this.rowModel.getType()&&(this.clientSideRowModel=this.rowModel,this.addManagedPropertyListener("rowData",()=>this.onRowDataUpdated()))}isActive(){const e=this.gos.exists("getRowId");return!this.gos.get("resetRowDataOnUpdate")&&e}setRowData(e){const t=this.createTransactionForRowData(e);if(!t)return;const[i,n]=t;this.clientSideRowModel.updateRowData(i,n)}createTransactionForRowData(e){if(ds.missing(this.clientSideRowModel))return void console.error("AG Grid: ImmutableService only works with ClientSideRowModel");const t=this.gos.getCallback("getRowId");if(null==t)return void console.error("AG Grid: ImmutableService requires getRowId() callback to be implemented, your row data needs IDs!");const i={remove:[],update:[],add:[]},n=this.clientSideRowModel.getCopyOfNodesMap(),s=this.gos.get("suppressMaintainUnsortedOrder")?void 0:{};return ds.exists(e)&&e.forEach((e,r)=>{const o=t({data:e,level:0}),a=n[o];s&&(s[o]=r),a?(a.data!==e&&i.update.push(e),n[o]=void 0):i.add.push(e)}),ds.iterateObject(n,(e,t)=>{t&&i.remove.push(t.data)}),[i,s]}onRowDataUpdated(){const e=this.gos.get("rowData");e&&(this.isActive()?this.setRowData(e):(this.selectionService.reset("rowDataChanged"),this.clientSideRowModel.setRowData(e)))}};m([pe("rowModel")],id.prototype,"rowModel",2),m([pe("rowRenderer")],id.prototype,"rowRenderer",2),m([pe("selectionService")],id.prototype,"selectionService",2),m([he],id.prototype,"postConstruct",1);var nd={version:"31.3.4",moduleName:"@ag-grid-community/client-side-row-model",rowModel:"clientSide",beans:[Xh,Zh,Qh,Jh,ed,td,id=m([ue("immutableService")],id)]},sd=Object.defineProperty,rd=Object.getOwnPropertyDescriptor,od=(e,t,i,n)=>{for(var s,r=n>1?void 0:n?rd(t,i):t,o=e.length-1;o>=0;o--)(s=e[o])&&(r=(n?s(t,i,r):s(r))||r);return n&&r&&sd(t,i,r),r},ad=class extends zl{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){ds.exists(t)?e.setDataAndId(t,i.toString()):e.setDataAndId(void 0,void 0)}loadFromDatasource(){const e=this.createLoadParams();ds.missing(this.params.datasource.getRows)?console.warn("AG Grid: datasource is missing getRows method"):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.gos.getGridCommonParams().context}}forEachNode(e,t,i){this.rowNodes.forEach((n,s)=>{this.startRow+s<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 _r(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((t,i)=>{const n=e.rowData?e.rowData[i]:void 0;!t.id&&t.alreadyRendered&&n&&(this.rowNodes[i]=new _r(this.beans),this.rowNodes[i].setRowIndex(t.rowIndex),this.rowNodes[i].setRowTop(t.rowTop),this.rowNodes[i].setRowHeight(t.rowHeight),t.clearRowTopAndRowIndex()),this.setDataAndId(this.rowNodes[i],n,this.startRow+i)});const t=null!=e.rowCount&&e.rowCount>=0?e.rowCount:void 0;this.parentCache.pageLoaded(this,t)}destroyRowNodes(){this.rowNodes.forEach(e=>{e.clearRowTopAndRowIndex()})}};od([pe("beans")],ad.prototype,"beans",2),od([he],ad.prototype,"postConstruct",1),od([de],ad.prototype,"destroyRowNodes",1);var ld,cd=class e extends ot{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 ad(e,this,this.params));return this.blocks[t.getId()]=t,this.blockCount++,this.purgeBlocksIfNeeded(t),this.params.rowNodeBlockLoader.addBlock(t),t}refreshCache(){0==this.blockCount?this.purgeCache():(this.getBlocksInOrder().forEach(e=>e.setStateWaitingToLoad()),this.params.rowNodeBlockLoader.checkBlockToLoad())}destroyAllBlocks(){this.getBlocksInOrder().forEach(e=>this.destroyBlock(e))}getRowCount(){return this.rowCount}isLastRowIndexKnown(){return this.lastRowIndexKnown}pageLoaded(e,t){this.isAlive()&&(this.logger.log(`onPageLoaded: page = ${e.getId()}, lastRow = ${t}`),this.checkRowCount(e,t),this.onCacheUpdated())}purgeBlocksIfNeeded(t){const i=this.getBlocksInOrder().filter(e=>e!=t);i.sort((e,t)=>t.getLastAccessed()-e.getLastAccessed());const n=this.params.maxBlocksInCache>0,s=n?this.params.maxBlocksInCache-1:null,r=e.MAX_EMPTY_BLOCKS_TO_KEEP-1;i.forEach((e,t)=>{if(e.getState()===ad.STATE_WAITING_TO_LOAD&&t>=r||n&&t>=s){if(this.isBlockCurrentlyDisplayed(e))return;if(this.isBlockFocused(e))return;this.removeBlockFromCache(e)}})}isBlockFocused(e){const t=this.focusService.getFocusCellToUseAfterRefresh();if(!t)return!1;if(null!=t.rowPinned)return!1;const i=e.getStartRow(),n=e.getEndRow();return t.rowIndex>=i&&t.rowIndex<n}isBlockCurrentlyDisplayed(e){const t=e.getStartRow(),i=e.getEndRow()-1;return this.rowRenderer.isRangeInRenderedViewport(t,i)}removeBlockFromCache(e){e&&this.destroyBlock(e)}checkRowCount(e,t){if("number"==typeof t&&t>=0)this.rowCount=t,this.lastRowIndexKnown=!0;else if(!this.lastRowIndexKnown){const t=(e.getId()+1)*this.params.blockSize+this.params.overflowSize;this.rowCount<t&&(this.rowCount=t)}}setRowCount(e,t){this.rowCount=e,ds.exists(t)&&(this.lastRowIndexKnown=t),this.lastRowIndexKnown||this.rowCount%this.params.blockSize===0&&this.rowCount++,this.onCacheUpdated()}forEachNodeDeep(e){const t=new us;this.getBlocksInOrder().forEach(i=>i.forEachNode(e,t,this.rowCount))}getBlocksInOrder(){return ds.getAllValuesInObject(this.blocks).sort((e,t)=>e.getId()-t.getId())}destroyBlock(e){delete this.blocks[e.getId()],this.destroyBean(e),this.blockCount--,this.params.rowNodeBlockLoader.removeBlock(e)}onCacheUpdated(){if(this.isAlive()){this.destroyAllBlocksPastVirtualRowCount();const e={type:dt.EVENT_STORE_UPDATED};this.eventService.dispatchEvent(e)}}destroyAllBlocksPastVirtualRowCount(){const e=[];this.getBlocksInOrder().forEach(t=>{t.getId()*this.params.blockSize>=this.rowCount&&e.push(t)}),e.length>0&&e.forEach(e=>this.destroyBlock(e))}purgeCache(){this.getBlocksInOrder().forEach(e=>this.removeBlockFromCache(e)),this.lastRowIndexKnown=!1,0===this.rowCount&&(this.rowCount=this.params.initialRowCount),this.onCacheUpdated()}getRowNodesInRange(e,t){const i=[];let n=-1,s=!1;const r=new us;ds.missing(e)&&(s=!0);let o=!1;return this.getBlocksInOrder().forEach(a=>{o||(s&&n+1!==a.getId()?o=!0:(n=a.getId(),a.forEachNode(n=>{const r=n===e||n===t;(s||r)&&i.push(n),r&&(s=!s)},r,this.rowCount)))}),o||s?[]:i}};cd.MAX_EMPTY_BLOCKS_TO_KEEP=2,od([pe("rowRenderer")],cd.prototype,"rowRenderer",2),od([pe("focusService")],cd.prototype,"focusService",2),od([(ld=me("loggerFactory"),(e,t)=>ld(e,t,0))],cd.prototype,"setBeans",1),od([de],cd.prototype,"destroyAllBlocks",1);var hd=cd,dd=class extends ot{getRowBounds(e){return{rowHeight:this.rowHeight,rowTop:this.rowHeight*e}}ensureRowHeightsValid(e,t,i,n){return!1}init(){this.gos.isRowModelType("infinite")&&(this.rowHeight=this.gos.getRowHeightAsNumber(),this.addEventListeners(),this.addDestroyFunc(()=>this.destroyCache()),this.verifyProps())}verifyProps(){this.gos.exists("initialGroupOrderComparator")&&ds.warnOnce("initialGroupOrderComparator cannot be used with Infinite Row Model as sorting is done on the server side")}start(){this.setDatasource(this.gos.get("datasource"))}destroyDatasource(){this.datasource&&(this.getContext().destroyBean(this.datasource),this.rowRenderer.datasourceChanged(),this.datasource=null)}addEventListeners(){this.addManagedListener(this.eventService,dt.EVENT_FILTER_CHANGED,this.onFilterChanged.bind(this)),this.addManagedListener(this.eventService,dt.EVENT_SORT_CHANGED,this.onSortChanged.bind(this)),this.addManagedListener(this.eventService,dt.EVENT_NEW_COLUMNS_LOADED,this.onColumnEverything.bind(this)),this.addManagedListener(this.eventService,dt.EVENT_STORE_UPDATED,this.onCacheUpdated.bind(this)),this.addManagedPropertyListener("datasource",()=>this.setDatasource(this.gos.get("datasource"))),this.addManagedPropertyListener("cacheBlockSize",()=>this.resetCache()),this.addManagedPropertyListener("rowHeight",()=>{this.rowHeight=this.gos.getRowHeightAsNumber(),this.cacheParams.rowHeight=this.rowHeight,this.updateRowHeights()})}onFilterChanged(){this.reset()}onSortChanged(){this.reset()}onColumnEverything(){let e;e=!this.cacheParams||this.isSortModelDifferent(),e&&this.reset()}isSortModelDifferent(){return!ds.jsonEquals(this.cacheParams.sortModel,this.sortController.getSortModel())}getType(){return"infinite"}setDatasource(e){this.destroyDatasource(),this.datasource=e,e&&this.reset()}isEmpty(){return!this.infiniteCache}isRowsToRender(){return!!this.infiniteCache}getNodesInRangeForSelection(e,t){return this.infiniteCache?this.infiniteCache.getRowNodesInRange(e,t):[]}reset(){this.datasource&&(null!=this.gos.getCallback("getRowId")||this.selectionService.reset("rowDataChanged"),this.resetCache())}createModelUpdatedEvent(){return{type:dt.EVENT_MODEL_UPDATED,newPage:!1,newPageSize:!1,newData:!1,keepRenderedRows:!0,animate:!1}}resetCache(){this.destroyCache(),this.cacheParams={datasource:this.datasource,filterModel:this.filterManager.getFilterModel(),sortModel:this.sortController.getSortModel(),rowNodeBlockLoader:this.rowNodeBlockLoader,initialRowCount:this.gos.get("infiniteInitialRowCount"),maxBlocksInCache:this.gos.get("maxBlocksInCache"),rowHeight:this.gos.getRowHeightAsNumber(),overflowSize:this.gos.get("cacheOverflowSize"),blockSize:this.gos.get("cacheBlockSize"),lastAccessedSequence:new us},this.infiniteCache=this.createBean(new hd(this.cacheParams)),this.eventService.dispatchEventOnce({type:dt.EVENT_ROW_COUNT_READY});const e=this.createModelUpdatedEvent();this.eventService.dispatchEvent(e)}updateRowHeights(){this.forEachNode(e=>{e.setRowHeight(this.rowHeight),e.setRowTop(this.rowHeight*e.rowIndex)});const e=this.createModelUpdatedEvent();this.eventService.dispatchEvent(e)}destroyCache(){this.infiniteCache&&(this.infiniteCache=this.destroyBean(this.infiniteCache))}onCacheUpdated(){const e=this.createModelUpdatedEvent();this.eventService.dispatchEvent(e)}getRow(e){if(this.infiniteCache&&!(e>=this.infiniteCache.getRowCount()))return this.infiniteCache.getRow(e)}getRowNode(e){let t;return this.forEachNode(i=>{i.id===e&&(t=i)}),t}forEachNode(e){this.infiniteCache&&this.infiniteCache.forEachNodeDeep(e)}getTopLevelRowCount(){return this.getRowCount()}getTopLevelRowDisplayedIndex(e){return e}getRowIndexAtPixel(e){if(0!==this.rowHeight){const t=Math.floor(e/this.rowHeight),i=this.getRowCount()-1;return t>i?i:t}return 0}getRowCount(){return this.infiniteCache?this.infiniteCache.getRowCount():0}isRowPresent(e){return!!this.getRowNode(e.id)}refreshCache(){this.infiniteCache&&this.infiniteCache.refreshCache()}purgeCache(){this.infiniteCache&&this.infiniteCache.purgeCache()}isLastRowIndexKnown(){return!!this.infiniteCache&&this.infiniteCache.isLastRowIndexKnown()}setRowCount(e,t){this.infiniteCache&&this.infiniteCache.setRowCount(e,t)}};od([pe("filterManager")],dd.prototype,"filterManager",2),od([pe("sortController")],dd.prototype,"sortController",2),od([pe("selectionService")],dd.prototype,"selectionService",2),od([pe("rowRenderer")],dd.prototype,"rowRenderer",2),od([pe("rowNodeBlockLoader")],dd.prototype,"rowNodeBlockLoader",2),od([he],dd.prototype,"init",1),od([de],dd.prototype,"destroyDatasource",1);var ud={version:"31.3.4",moduleName:"@ag-grid-community/infinite-row-model",rowModel:"infinite",beans:[dd=od([ue("rowModel")],dd)]},pd=Object.defineProperty,gd=Object.defineProperties,fd=Object.getOwnPropertyDescriptor,md=Object.getOwnPropertyDescriptors,vd=Object.getOwnPropertySymbols,yd=Object.prototype.hasOwnProperty,Cd=Object.prototype.propertyIsEnumerable,bd=(e,t,i)=>t in e?pd(e,t,{enumerable:!0,configurable:!0,writable:!0,value:i}):e[t]=i,Sd=(e,t)=>{for(var i in t||(t={}))yd.call(t,i)&&bd(e,i,t[i]);if(vd)for(var i of vd(t))Cd.call(t,i)&&bd(e,i,t[i]);return e},wd=(e,t)=>gd(e,md(t)),xd=(e,t,i,n)=>{for(var s,r=n>1?void 0:n?fd(t,i):t,o=e.length-1;o>=0;o--)(s=e[o])&&(r=(n?s(t,i,r):s(r))||r);return n&&r&&pd(t,i,r),r},Ed=(e,t,i)=>new Promise((n,s)=>{var r=e=>{try{a(i.next(e))}catch(e){s(e)}},o=e=>{try{a(i.throw(e))}catch(e){s(e)}},a=e=>e.done?n(e.value):Promise.resolve(e.value).then(r,o);a((i=i.apply(e,t)).next())}),Md=class{setBeans(e){this.beans=e}getFileName(e){const t=this.getDefaultFileExtension();return null!=e&&e.length||(e=this.getDefaultFileName()),-1===e.indexOf(".")?`${e}.${t}`:e}getData(e){const t=this.createSerializingSession(e);return this.beans.gridSerializer.serialize(t,e)}getDefaultFileName(){return`export.${this.getDefaultFileExtension()}`}},Ad=class{constructor(e){this.groupColumns=[];const{columnModel:t,valueService:i,gos:n,processCellCallback:s,processHeaderCallback:r,processGroupHeaderCallback:o,processRowGroupCallback:a}=e;this.columnModel=t,this.valueService=i,this.gos=n,this.processCellCallback=s,this.processHeaderCallback=r,this.processGroupHeaderCallback=o,this.processRowGroupCallback=a}prepare(e){this.groupColumns=e.filter(e=>!!e.getColDef().showRowGroup)}extractHeaderValue(e){const t=this.getHeaderName(this.processHeaderCallback,e);return null!=t?t:""}extractRowCellValue(e,t,i,n,s){const r=this.gos.get("groupHideOpenParents")&&!s.footer||!this.shouldRenderGroupSummaryCell(s,e,t)?this.valueService.getValue(e,s):this.createValueForGroupNode(e,s);return this.processCell({accumulatedRowIndex:i,rowNode:s,column:e,value:r,processCellCallback:this.processCellCallback,type:n})}shouldRenderGroupSummaryCell(e,t,i){var n;if(!e||!e.group)return!1;if(-1!==this.groupColumns.indexOf(t)){if(null!=(null==(n=e.groupData)?void 0:n[t.getId()]))return!0;if(this.gos.isRowModelType("serverSide")&&e.group)return!0;if(e.footer&&-1===e.level){const e=t.getColDef();return null==e||!0===e.showRowGroup||e.showRowGroup===this.columnModel.getRowGroupColumns()[0].getId()}}const s=this.gos.isGroupUseEntireRow(this.columnModel.isPivotMode());return 0===i&&s}getHeaderName(e,t){return e?e(this.gos.addGridCommonParams({column:t})):this.columnModel.getDisplayNameForColumn(t,"csv",!0)}createValueForGroupNode(e,t){if(this.processRowGroupCallback)return this.processRowGroupCallback(this.gos.addGridCommonParams({column:e,node:t}));const i=this.gos.get("treeData"),n=this.gos.get("suppressGroupMaintainValueType"),s=t=>{var s,r;if(i||n)return t.key;const o=null==(s=t.groupData)?void 0:s[e.getId()];return o&&t.rowGroupColumn&&!1!==t.rowGroupColumn.getColDef().useValueFormatterForExport&&null!=(r=this.valueService.formatValue(t.rowGroupColumn,t,o))?r:o},r=t.footer,o=[s(t)];if(!this.gos.isGroupMultiAutoColumn())for(;t.parent;)t=t.parent,o.push(s(t));const a=o.reverse().join(" -> ");return r?`Total ${a}`:a}processCell(e){var t;const{accumulatedRowIndex:i,rowNode:n,column:s,value:r,processCellCallback:o,type:a}=e;return o?{value:null!=(t=o(this.gos.addGridCommonParams({accumulatedRowIndex:i,column:s,node:n,value:r,type:a,parseValue:e=>this.valueService.parseValue(s,n,e,this.valueService.getValue(s,n)),formatValue:e=>{var t;return null!=(t=this.valueService.formatValue(s,n,e))?t:e}})))?t:""}:!1!==s.getColDef().useValueFormatterForExport?{value:null!=r?r:"",valueFormatted:this.valueService.formatValue(s,n,r)}:{value:null!=r?r:""}}},Td=class{static download(e,t){const i=document.defaultView||window;if(!i)return void console.warn("AG Grid: There is no `window` associated with the current `document`");const n=document.createElement("a"),s=i.URL.createObjectURL(t);n.setAttribute("href",s),n.setAttribute("download",e),n.style.display="none",document.body.appendChild(n),n.dispatchEvent(new MouseEvent("click",{bubbles:!1,cancelable:!0,view:i})),document.body.removeChild(n),i.setTimeout(()=>{i.URL.revokeObjectURL(s)},0)}},Dd=class extends Ad{constructor(e){super(e),this.isFirstLine=!0,this.result="";const{suppressQuotes:t,columnSeparator:i}=e;this.suppressQuotes=t,this.columnSeparator=i}addCustomContent(e){e&&("string"==typeof e?(/^\s*\n/.test(e)||this.beginNewLine(),e=e.replace(/\r?\n/g,"\r\n"),this.result+=e):e.forEach(e=>{this.beginNewLine(),e.forEach((e,t)=>{0!==t&&(this.result+=this.columnSeparator),this.result+=this.putInQuotes(e.data.value||""),e.mergeAcross&&this.appendEmptyCells(e.mergeAcross)})}))}onNewHeaderGroupingRow(){return this.beginNewLine(),{onColumn:this.onNewHeaderGroupingRowColumn.bind(this)}}onNewHeaderGroupingRowColumn(e,t,i,n){0!=i&&(this.result+=this.columnSeparator),this.result+=this.putInQuotes(t),this.appendEmptyCells(n)}appendEmptyCells(e){for(let t=1;t<=e;t++)this.result+=this.columnSeparator+this.putInQuotes("")}onNewHeaderRow(){return this.beginNewLine(),{onColumn:this.onNewHeaderRowColumn.bind(this)}}onNewHeaderRowColumn(e,t){0!=t&&(this.result+=this.columnSeparator),this.result+=this.putInQuotes(this.extractHeaderValue(e))}onNewBodyRow(){return this.beginNewLine(),{onColumn:this.onNewBodyRowColumn.bind(this)}}onNewBodyRowColumn(e,t,i){var n;0!=t&&(this.result+=this.columnSeparator);const s=this.extractRowCellValue(e,t,t,"csv",i);this.result+=this.putInQuotes(null!=(n=s.valueFormatted)?n:s.value)}putInQuotes(e){if(this.suppressQuotes)return e;if(null==e)return'""';let t;return"string"==typeof e?t=e:"function"==typeof e.toString?t=e.toString():(console.warn("AG Grid: unknown value type during csv conversion"),t=""),'"'+t.replace(/"/g,'""')+'"'}parse(){return this.result}beginNewLine(){this.isFirstLine||(this.result+="\r\n"),this.isFirstLine=!1}},Id=class extends Md{postConstruct(){this.setBeans({gridSerializer:this.gridSerializer,gos:this.gos})}getMergedParams(e){const t=this.gos.get("defaultCsvExportParams");return Object.assign({},t,e)}export(e){if(this.isExportSuppressed())return void console.warn("AG Grid: Export cancelled. Export is not allowed as per your configuration.");const t=this.getMergedParams(e),i=this.getData(t),n=new Blob(["\ufeff",i],{type:"text/plain"}),s="function"==typeof t.fileName?t.fileName(this.gos.getGridCommonParams()):t.fileName;Td.download(this.getFileName(s),n)}exportDataAsCsv(e){this.export(e)}getDataAsCsv(e,t=!1){const i=t?Object.assign({},e):this.getMergedParams(e);return this.getData(i)}getDefaultFileExtension(){return"csv"}createSerializingSession(e){const{columnModel:t,valueService:i,gos:n}=this,{processCellCallback:s,processHeaderCallback:r,processGroupHeaderCallback:o,processRowGroupCallback:a,suppressQuotes:l,columnSeparator:c}=e;return new Dd({columnModel:t,valueService:i,gos:n,processCellCallback:s||void 0,processHeaderCallback:r||void 0,processGroupHeaderCallback:o||void 0,processRowGroupCallback:a||void 0,suppressQuotes:l||!1,columnSeparator:c||","})}isExportSuppressed(){return this.gos.get("suppressCsvExport")}};xd([pe("columnModel")],Id.prototype,"columnModel",2),xd([pe("valueService")],Id.prototype,"valueService",2),xd([pe("gridSerializer")],Id.prototype,"gridSerializer",2),xd([pe("gridOptionsService")],Id.prototype,"gos",2),xd([he],Id.prototype,"postConstruct",1),Id=xd([ue("csvCreator")],Id);var Rd=(e=>(e[e.HEADER_GROUPING=0]="HEADER_GROUPING",e[e.HEADER=1]="HEADER",e[e.BODY=2]="BODY",e))(Rd||{}),Ld=class extends ot{serialize(e,t={}){const{allColumns:i,columnKeys:n,skipRowGroups:s}=t,r=this.getColumnsToExport(i,s,n);return ds.compose(this.prepareSession(r),this.prependContent(t),this.exportColumnGroups(t,r),this.exportHeaders(t,r),this.processPinnedTopRows(t,r),this.processRows(t,r),this.processPinnedBottomRows(t,r),this.appendContent(t))(e).parse()}processRow(e,t,i,n){const s=t.shouldRowBeSkipped||(()=>!1),r=this.gos.get("groupRemoveSingleChildren"),o=this.gos.get("groupRemoveLowestSingleChildren"),a=null!=t.rowPositions||!!t.onlySelected,l=this.gos.get("groupHideOpenParents")&&!a,c=this.columnModel.isPivotMode()?n.leafGroup:!n.group,h=!!n.footer,d=(t.skipRowGroups,o&&n.leafGroup),u=1===n.allChildrenCount&&(r||d);if(!c&&!h&&(t.skipRowGroups||u||l)||t.onlySelected&&!n.isSelected()||t.skipPinnedTop&&"top"===n.rowPinned||t.skipPinnedBottom&&"bottom"===n.rowPinned)return;if(-1===n.level&&!c&&!h)return;if(s(this.gos.addGridCommonParams({node:n})))return;const p=e.onNewBodyRow(n);if(i.forEach((e,t)=>{p.onColumn(e,t,n)}),t.getCustomContentBelowRow){const i=t.getCustomContentBelowRow(this.gos.addGridCommonParams({node:n}));i&&e.addCustomContent(i)}}appendContent(e){return t=>{const i=e.appendContent;return i&&t.addCustomContent(i),t}}prependContent(e){return t=>{const i=e.prependContent;return i&&t.addCustomContent(i),t}}prepareSession(e){return t=>(t.prepare(e),t)}exportColumnGroups(e,t){return i=>{if(!e.skipColumnGroupHeaders){const n=new pt,s=this.displayedGroupCreator.createDisplayedGroups(t,n,null);this.recursivelyAddHeaderGroups(s,i,e.processGroupHeaderCallback)}return i}}exportHeaders(e,t){return i=>{if(!e.skipColumnHeaders){const e=i.onNewHeaderRow();t.forEach((t,i)=>{e.onColumn(t,i,void 0)})}return i}}processPinnedTopRows(e,t){return i=>{const n=this.processRow.bind(this,i,e,t);return e.rowPositions?e.rowPositions.filter(e=>"top"===e.rowPinned).sort((e,t)=>e.rowIndex-t.rowIndex).map(e=>this.pinnedRowModel.getPinnedTopRow(e.rowIndex)).forEach(n):this.pinnedRowModel.forEachPinnedTopRow(n),i}}processRows(e,t){return i=>{const n=this.rowModel,s=n.getType(),r="clientSide"===s,o="serverSide"===s,a=!r&&e.onlySelected,l=this.processRow.bind(this,i,e,t),{exportedRows:c="filteredAndSorted"}=e;if(e.rowPositions)e.rowPositions.filter(e=>null==e.rowPinned).sort((e,t)=>e.rowIndex-t.rowIndex).map(e=>n.getRow(e.rowIndex)).forEach(l);else if(this.columnModel.isPivotMode())r?n.forEachPivotNode(l,!0):o?n.forEachNodeAfterFilterAndSort(l,!0):n.forEachNode(l);else if(e.onlySelectedAllPages||a){const e=this.selectionService.getSelectedNodes();this.replicateSortedOrder(e),e.forEach(l)}else"all"===c?n.forEachNode(l):r||o?n.forEachNodeAfterFilterAndSort(l,!0):n.forEachNode(l);return i}}replicateSortedOrder(e){const t=this.sortController.getSortOptions(),i=(e,n)=>{var s,r,o,a;return null!=e.rowIndex&&null!=n.rowIndex?e.rowIndex-n.rowIndex:e.level===n.level?(null==(s=e.parent)?void 0:s.id)===(null==(r=n.parent)?void 0:r.id)?this.rowNodeSorter.compareRowNodes(t,{rowNode:e,currentPos:null!=(o=e.rowIndex)?o:-1},{rowNode:n,currentPos:null!=(a=n.rowIndex)?a:-1}):i(e.parent,n.parent):e.level>n.level?i(e.parent,n):i(e,n.parent)};e.sort(i)}processPinnedBottomRows(e,t){return i=>{const n=this.processRow.bind(this,i,e,t);return e.rowPositions?e.rowPositions.filter(e=>"bottom"===e.rowPinned).sort((e,t)=>e.rowIndex-t.rowIndex).map(e=>this.pinnedRowModel.getPinnedBottomRow(e.rowIndex)).forEach(n):this.pinnedRowModel.forEachPinnedBottomRow(n),i}}getColumnsToExport(e=!1,t=!1,i){const n=this.columnModel.isPivotMode();if(i&&i.length)return this.columnModel.getGridColumns(i);const s=this.gos.get("treeData");let r=[];return r=e&&!n?this.columnModel.getAllGridColumns():this.columnModel.getAllDisplayedColumns(),t&&!s&&(r=r.filter(e=>e.getColId()!==gt)),r}recursivelyAddHeaderGroups(e,t,i){const n=[];e.forEach(e=>{const t=e;t.getChildren&&t.getChildren().forEach(e=>n.push(e))}),e.length>0&&e[0]instanceof ht&&this.doAddHeaderHeader(t,e,i),n&&n.length>0&&this.recursivelyAddHeaderGroups(n,t,i)}doAddHeaderHeader(e,t,i){const n=e.onNewHeaderGroupingRow();let s=0;t.forEach(e=>{const t=e;let r;r=i?i(this.gos.addGridCommonParams({columnGroup:t})):this.columnModel.getDisplayNameForColumnGroup(t,"header");const o=t.getLeafColumns().reduce((e,t,i,n)=>{let s=ds.last(e);return"open"===t.getColumnGroupShow()?s&&null==s[1]||(s=[i],e.push(s)):s&&null==s[1]&&(s[1]=i-1),i===n.length-1&&s&&null==s[1]&&(s[1]=i),e},[]);n.onColumn(t,r||"",s++,t.getLeafColumns().length-1,o)})}};xd([pe("displayedGroupCreator")],Ld.prototype,"displayedGroupCreator",2),xd([pe("columnModel")],Ld.prototype,"columnModel",2),xd([pe("rowModel")],Ld.prototype,"rowModel",2),xd([pe("pinnedRowModel")],Ld.prototype,"pinnedRowModel",2),xd([pe("selectionService")],Ld.prototype,"selectionService",2),xd([pe("rowNodeSorter")],Ld.prototype,"rowNodeSorter",2),xd([pe("sortController")],Ld.prototype,"sortController",2),Ld=xd([ue("gridSerializer")],Ld);var kd={version:"31.3.4",moduleName:"@ag-grid-community/csv-export",beans:[Id,Ld]},Pd="\r\n",Nd=class{static createHeader(e={}){const t=["version"];return e.version||(e.version="1.0"),e.encoding&&t.push("encoding"),e.standalone&&t.push("standalone"),`<?xml ${t.map(t=>`${t}="${e[t]}"`).join(" ")} ?>`}static createXml(e,t){let i="";e.properties&&(e.properties.prefixedAttributes&&e.properties.prefixedAttributes.forEach(e=>{Object.keys(e.map).forEach(n=>{i+=this.returnAttributeIfPopulated(e.prefix+n,e.map[n],t)})}),e.properties.rawMap&&Object.keys(e.properties.rawMap).forEach(n=>{i+=this.returnAttributeIfPopulated(n,e.properties.rawMap[n],t)}));let n="<"+e.name+i;return e.children||null!=e.textNode?null!=e.textNode?n+">"+e.textNode+"</"+e.name+">"+Pd:(n+=">\r\n",e.children&&e.children.forEach(e=>{n+=this.createXml(e,t)}),n+"</"+e.name+">"+Pd):n+"/>"+Pd}static returnAttributeIfPopulated(e,t,i){if(!t&&""!==t&&0!==t)return"";let n=t;return"boolean"==typeof t&&i&&(n=i(t)),` ${e}="${n}"`}};function Od(e,t){let i="";for(let n=0;n<t;n++)i+=String.fromCharCode(255&e),e>>>=8;return i}var _d=e=>e.length?(e=>{if(!e.length)return 0;let t=-1,i=0,n=0,s=0;for(let r=0;r<e.length;r++)i=e[r],n=255&(t^i),s=Fd[n],t=t>>>8^s;return-1^t})("string"==typeof e?(new TextEncoder).encode(e):e):0,Fd=new Uint32Array([0,1996959894,3993919788,2567524794,124634137,1886057615,3915621685,2657392035,249268274,2044508324,3772115230,2547177864,162941995,2125561021,3887607047,2428444049,498536548,1789927666,4089016648,2227061214,450548861,1843258603,4107580753,2211677639,325883990,1684777152,4251122042,2321926636,335633487,1661365465,4195302755,2366115317,997073096,1281953886,3579855332,2724688242,1006888145,1258607687,3524101629,2768942443,901097722,1119000684,3686517206,2898065728,853044451,1172266101,3705015759,2882616665,651767980,1373503546,3369554304,3218104598,565507253,1454621731,3485111705,3099436303,671266974,1594198024,3322730930,2970347812,795835527,1483230225,3244367275,3060149565,1994146192,31158534,2563907772,4023717930,1907459465,112637215,2680153253,3904427059,2013776290,251722036,2517215374,3775830040,2137656763,141376813,2439277719,3865271297,1802195444,476864866,2238001368,4066508878,1812370925,453092731,2181625025,4111451223,1706088902,314042704,2344532202,4240017532,1658658271,366619977,2362670323,4224994405,1303535960,984961486,2747007092,3569037538,1256170817,1037604311,2765210733,3554079995,1131014506,879679996,2909243462,3663771856,1141124467,855842277,2852801631,3708648649,1342533948,654459306,3188396048,3373015174,1466479909,544179635,3110523913,3462522015,1591671054,702138776,2966460450,3352799412,1504918807,783551873,3082640443,3233442989,3988292384,2596254646,62317068,1957810842,3939845945,2647816111,81470997,1943803523,3814918930,2489596804,225274430,2053790376,3826175755,2466906013,167816743,2097651377,4027552580,2265490386,503444072,1762050814,4150417245,2154129355,426522225,1852507879,4275313526,2312317920,282753626,1742555852,4189708143,2394877945,397917763,1622183637,3604390888,2714866558,953729732,1340076626,3518719985,2797360999,1068828381,1219638859,3624741850,2936675148,906185462,1090812512,3747672003,2825379669,829329135,1181335161,3412177804,3160834842,628085408,1382605366,3423369109,3138078467,570562233,1426400815,3317316542,2998733608,733239954,1555261956,3268935591,3050360625,752459403,1541320221,2607071920,3965973030,1969922972,40735498,2617837225,3943577151,1913087877,83908371,2512341634,3803740692,2075208622,213261112,2463272603,3855990285,2094854071,198958881,2262029012,4057260610,1759359992,534414190,2176718541,4139329115,1873836001,414664567,2282248934,4279200368,1711684554,285281116,2405801727,4167216745,1634467795,376229701,2685067896,3608007406,1308918612,956543938,2808555105,3495958263,1231636301,1047427035,2932959818,3654703836,1088359270,936918e3,2847714899,3736837829,1202900863,817233897,3183342108,3401237130,1404277552,615818150,3134207493,3453421203,1423857449,601450431,3009837614,3294710456,1567103746,711928724,3020668471,3272380065,1510334235,755167117]),{utf8_encode:Gd}=ds,Vd=(e,t)=>Ed(void 0,null,function*(){const{content:i}=e,{size:n,content:s}=i?zd(i):{size:0,content:Uint8Array.from([])};let r,o,a=!1;if("file"===e.type&&s&&n>0){const e=yield(e=>Ed(void 0,null,function*(){const t=new Blob([e]),{size:i,content:n}=yield(s=t,Ed(void 0,null,function*(){let e=0;const t=[],i=new WritableStream({write:i=>{t.push(i),e+=i.length}}),n=new ReadableStream({start:e=>{const t=new FileReader;t.onload=t=>{var i;(null==(i=t.target)?void 0:i.result)&&e.enqueue(t.target.result),e.close()},t.readAsArrayBuffer(s)}}),r=new window.CompressionStream("deflate-raw");return yield n.pipeThrough(r).pipeTo(i),{size:e,content:new Blob(t)}}));var s;return{size:i,content:new Uint8Array(yield n.arrayBuffer())}}))(s);r=e.content,o=e.size,a=!0}const l=Hd(e,a,t,n,s,o);return wd(Sd({},l),{content:r||s,isCompressed:a})}),Bd=(e,t)=>{const{content:i}=e,{content:n}=i?zd(i):{content:Uint8Array.from([])},s=Hd(e,!1,t,n.length,n,void 0);return wd(Sd({},s),{content:n,isCompressed:!1})},Hd=(e,t,i,n,s,r)=>{const{content:o,path:a,created:l}=e,c=(e=>{let t=e.getHours();return t<<=6,t|=e.getMinutes(),t<<=5,t|=e.getSeconds()/2,t})(l),h=(e=>{let t=e.getFullYear()-1980;return t<<=4,t|=e.getMonth()+1,t<<=5,t|=e.getDate(),t})(l),d=_d(s),u=void 0!==r?r:n,p=Gd(a),g=p!==a;let f="";if(g){const e=Od(1,1)+Od(_d(p),4)+p;f="up"+Od(e.length,2)+e}const m="\0"+(g?"\0\b":"\0\0")+Od(t?8:0,2)+Od(c,2)+Od(h,2)+Od(u?d:0,4)+Od(null!=r?r:n,4)+Od(n,4)+Od(p.length,2)+Od(f.length,2),v="PK"+m+p+f,y="PK\0"+m+"\0\0\0\0\0\0"+(o?"\0\0\0\0":"\0\0\0")+Od(i,4)+p+f;return{localFileHeader:Uint8Array.from(v,e=>e.charCodeAt(0)),centralDirectoryHeader:Uint8Array.from(y,e=>e.charCodeAt(0))}},zd=e=>{let t;return t="string"==typeof e?(e=>{const t=new Uint8Array(e.length);for(let i=0;i<e.length;i++)t[i]=e.charCodeAt(i);return t})(atob(e.split(";base64,")[1])):e,{size:t.length,content:t}},Ud=class{static addFolders(e){e.forEach(this.addFolder.bind(this))}static addFolder(e){this.folders.push({path:e,created:new Date,isBase64:!1,type:"folder"})}static addFile(e,t,i=!1){this.files.push({path:e,created:new Date,content:i?t:(new TextEncoder).encode(t),isBase64:i,type:"file"})}static getZipFile(e="application/zip"){return Ed(this,null,function*(){const t=yield this.buildCompressedFileStream();return this.clearStream(),new Blob([t],{type:e})})}static getUncompressedZipFile(e="application/zip"){const t=this.buildFileStream();return this.clearStream(),new Blob([t],{type:e})}static clearStream(){this.folders=[],this.files=[]}static packageFiles(e){let t=new Uint8Array(0),i=new Uint8Array(0),n=0,s=0;for(const r of e){const{localFileHeader:e,centralDirectoryHeader:o,content:a}=r,l=new Uint8Array(t.length+e.length);l.set(t),l.set(e,t.length),t=l;const c=new Uint8Array(t.length+a.length);c.set(t),c.set(a,t.length),t=c;const h=new Uint8Array(i.length+o.length);h.set(i),h.set(o,i.length),i=h,n+=e.length+a.length,s+=o.length}const r=((e,t,i)=>{const n="PK\0\0\0\0"+Od(e,2)+Od(e,2)+Od(t,4)+Od(i,4)+"\0\0";return Uint8Array.from(n,e=>e.charCodeAt(0))})(e.length,s,n),o=new Uint8Array(t.length+i.length+r.length);return o.set(t),o.set(i,t.length),o.set(r,t.length+i.length),o}static buildCompressedFileStream(){return Ed(this,null,function*(){const e=[...this.folders,...this.files],t=[];let i=0;for(const n of e){const e=yield Vd(n,i),{localFileHeader:s,content:r}=e;t.push(e),i+=s.length+r.length}return this.packageFiles(t)})}static buildFileStream(){const e=[...this.folders,...this.files],t=[];let i=0;for(const n of e){const e=Bd(n,i),{localFileHeader:s,content:r}=e;t.push(e),i+=s.length+r.length}return this.packageFiles(t)}};Ud.folders=[],Ud.files=[],ae.__registerModules([nd,ud,kd],!1,void 0)},67748(e,t,i){var n,s=Object.defineProperty,r=Object.getOwnPropertyDescriptor,o=Object.getOwnPropertyNames,a=Object.prototype.hasOwnProperty,l=(e,t)=>{for(var i in t)s(e,i,{get:t[i],enumerable:!0})},c=(e,t,i,n)=>{if(t&&"object"==typeof t||"function"==typeof t)for(let l of o(t))a.call(e,l)||l===i||s(e,l,{get:()=>t[l],enumerable:!(n=r(t,l))||n.enumerable});return e},h=(e,t,i)=>(c(e,t,"default"),i&&c(i,t,"default")),d=(e,t,i,n)=>{for(var o,a=n>1?void 0:n?r(t,i):t,l=e.length-1;l>=0;l--)(o=e[l])&&(a=(n?o(t,i,a):o(a))||a);return n&&a&&s(t,i,a),a},u={};l(u,{ALWAYS_SYNC_GLOBAL_EVENTS:()=>qv.ALWAYS_SYNC_GLOBAL_EVENTS,AbstractHeaderCellCtrl:()=>Xv.AbstractHeaderCellCtrl,AdvancedFilterModule:()=>Fe,AgAbstractField:()=>Zv.AgAbstractField,AgAbstractLabel:()=>Qv.AgAbstractLabel,AgAutocomplete:()=>Jv.AgAutocomplete,AgCheckbox:()=>ey.AgCheckbox,AgDialog:()=>ty.AgDialog,AgGroupComponent:()=>iy.AgGroupComponent,AgInputDateField:()=>ny.AgInputDateField,AgInputNumberField:()=>sy.AgInputNumberField,AgInputRange:()=>ry.AgInputRange,AgInputTextArea:()=>oy.AgInputTextArea,AgInputTextField:()=>ay.AgInputTextField,AgMenuItemComponent:()=>ly.AgMenuItemComponent,AgMenuItemRenderer:()=>cy.AgMenuItemRenderer,AgMenuList:()=>hy.AgMenuList,AgMenuPanel:()=>dy.AgMenuPanel,AgPanel:()=>uy.AgPanel,AgPickerField:()=>py.AgPickerField,AgPromise:()=>gy.AgPromise,AgPromiseStatus:()=>fy.AgPromiseStatus,AgRadioButton:()=>my.AgRadioButton,AgRichSelect:()=>vy.AgRichSelect,AgSelect:()=>yy.AgSelect,AgSlider:()=>Cy.AgSlider,AgStackComponentsRegistry:()=>by.AgStackComponentsRegistry,AgToggleButton:()=>Sy.AgToggleButton,AlignedGridsService:()=>wy.AlignedGridsService,AnimateShowChangeCellRenderer:()=>xy.AnimateShowChangeCellRenderer,AnimateSlideCellRenderer:()=>Ey.AnimateSlideCellRenderer,AnimationFrameService:()=>My.AnimationFrameService,AutoScrollService:()=>Ay.AutoScrollService,AutoWidthCalculator:()=>Ty.AutoWidthCalculator,Autowired:()=>Dy.Autowired,BarColumnLabelPlacement:()=>Iy.BarColumnLabelPlacement,BaseComponentWrapper:()=>Ry.BaseComponentWrapper,Bean:()=>Ly.Bean,BeanStub:()=>ky.BeanStub,Beans:()=>Py.Beans,BodyDropPivotTarget:()=>Ny.BodyDropPivotTarget,BodyDropTarget:()=>Oy.BodyDropTarget,CellComp:()=>_y.CellComp,CellCtrl:()=>Fy.CellCtrl,CellNavigationService:()=>Gy.CellNavigationService,CellPositionUtils:()=>Vy.CellPositionUtils,CellRangeType:()=>By.CellRangeType,ChangedPath:()=>Hy.ChangedPath,ChartMappings:()=>zy.ChartMappings,CheckboxCellEditor:()=>Uy.CheckboxCellEditor,CheckboxCellRenderer:()=>Wy.CheckboxCellRenderer,CheckboxSelectionComponent:()=>jy.CheckboxSelectionComponent,ClientSideRowModelSteps:()=>Ky.ClientSideRowModelSteps,ClipboardModule:()=>pl,Column:()=>$y.Column,ColumnApi:()=>Yy.ColumnApi,ColumnFactory:()=>qy.ColumnFactory,ColumnGroup:()=>Xy.ColumnGroup,ColumnKeyCreator:()=>Zy.ColumnKeyCreator,ColumnModel:()=>Qy.ColumnModel,ColumnsToolPanelModule:()=>Oh,Component:()=>Jy.Component,ComponentUtil:()=>eC.ComponentUtil,Context:()=>tC.Context,CssClassApplier:()=>iC.CssClassApplier,CssClassManager:()=>nC.CssClassManager,CtrlsService:()=>sC.CtrlsService,DataTypeService:()=>rC.DataTypeService,DateCellEditor:()=>oC.DateCellEditor,DateFilter:()=>aC.DateFilter,DateStringCellEditor:()=>lC.DateStringCellEditor,DisplayedGroupCreator:()=>cC.DisplayedGroupCreator,DragAndDropService:()=>hC.DragAndDropService,DragService:()=>dC.DragService,DragSourceType:()=>uC.DragSourceType,EnterpriseCoreModule:()=>D,Environment:()=>pC.Environment,EventService:()=>gC.EventService,Events:()=>fC.Events,ExcelExportModule:()=>ju,ExcelFactoryMode:()=>mC.ExcelFactoryMode,ExpansionService:()=>vC.ExpansionService,ExpressionService:()=>yC.ExpressionService,FilterManager:()=>CC.FilterManager,FilterWrapperComp:()=>bC.FilterWrapperComp,FiltersToolPanelModule:()=>fp,FloatingFilterMapper:()=>SC.FloatingFilterMapper,FocusService:()=>wC.FocusService,GROUP_AUTO_COLUMN_ID:()=>xC.GROUP_AUTO_COLUMN_ID,Grid:()=>EC.Grid,GridApi:()=>MC.GridApi,GridBodyComp:()=>AC.GridBodyComp,GridBodyCtrl:()=>TC.GridBodyCtrl,GridChartsModule:()=>Ja,GridComp:()=>DC.GridComp,GridCoreCreator:()=>IC.GridCoreCreator,GridCtrl:()=>RC.GridCtrl,GridHeaderComp:()=>LC.GridHeaderComp,GridHeaderCtrl:()=>kC.GridHeaderCtrl,GridOptionsService:()=>PC.GridOptionsService,GroupCellRenderer:()=>NC.GroupCellRenderer,GroupCellRendererCtrl:()=>OC.GroupCellRendererCtrl,GroupInstanceIdCreator:()=>_C.GroupInstanceIdCreator,HeaderCellCtrl:()=>FC.HeaderCellCtrl,HeaderFilterCellComp:()=>GC.HeaderFilterCellComp,HeaderFilterCellCtrl:()=>VC.HeaderFilterCellCtrl,HeaderGroupCellCtrl:()=>BC.HeaderGroupCellCtrl,HeaderNavigationDirection:()=>HC.HeaderNavigationDirection,HeaderNavigationService:()=>zC.HeaderNavigationService,HeaderPositionUtils:()=>UC.HeaderPositionUtils,HeaderRowComp:()=>WC.HeaderRowComp,HeaderRowContainerComp:()=>jC.HeaderRowContainerComp,HeaderRowContainerCtrl:()=>KC.HeaderRowContainerCtrl,HeaderRowCtrl:()=>$C.HeaderRowCtrl,HeaderRowType:()=>YC.HeaderRowType,HorizontalDirection:()=>qC.HorizontalDirection,HorizontalResizeService:()=>XC.HorizontalResizeService,KeyCode:()=>ZC.KeyCode,LargeTextCellEditor:()=>QC.LargeTextCellEditor,LayoutCssClasses:()=>JC.LayoutCssClasses,LicenseManager:()=>M,LocaleService:()=>eb.LocaleService,Logger:()=>tb.Logger,LoggerFactory:()=>ib.LoggerFactory,ManagedFocusFeature:()=>nb.ManagedFocusFeature,MasterDetailModule:()=>Ip,MenuModule:()=>cg,MenuService:()=>sb.MenuService,ModuleNames:()=>rb.ModuleNames,ModuleRegistry:()=>ob.ModuleRegistry,MouseEventService:()=>ab.MouseEventService,MoveColumnFeature:()=>lb.MoveColumnFeature,MultiFilter:()=>Mg,MultiFilterModule:()=>Tg,NavigationService:()=>cb.NavigationService,NumberCellEditor:()=>hb.NumberCellEditor,NumberFilter:()=>db.NumberFilter,NumberSequence:()=>ub.NumberSequence,Optional:()=>pb.Optional,PaginationProxy:()=>gb.PaginationProxy,PillDragComp:()=>fb.PillDragComp,PillDropZonePanel:()=>mb.PillDropZonePanel,PinnedRowModel:()=>vb.PinnedRowModel,PivotDropZonePanel:()=>uc,PopupComponent:()=>yb.PopupComponent,PopupEditorWrapper:()=>Cb.PopupEditorWrapper,PopupService:()=>bb.PopupService,PositionableFeature:()=>Sb.PositionableFeature,PostConstruct:()=>wb.PostConstruct,PreConstruct:()=>xb.PreConstruct,PreDestroy:()=>Eb.PreDestroy,PrimaryColsPanel:()=>wh,PropertyKeys:()=>Mb.PropertyKeys,ProvidedColumnGroup:()=>Ab.ProvidedColumnGroup,ProvidedFilter:()=>Tb.ProvidedFilter,Qualifier:()=>Db.Qualifier,QuerySelector:()=>Ib.QuerySelector,RangeSelectionModule:()=>dt,RefSelector:()=>Rb.RefSelector,ResizeObserverService:()=>Lb.ResizeObserverService,RichSelectModule:()=>Lg,RowAnimationCssClasses:()=>kb.RowAnimationCssClasses,RowContainerComp:()=>Pb.RowContainerComp,RowContainerCtrl:()=>Nb.RowContainerCtrl,RowContainerName:()=>Ob.RowContainerName,RowContainerType:()=>_b.RowContainerType,RowCtrl:()=>Fb.RowCtrl,RowGroupDropZonePanel:()=>dc,RowGroupingModule:()=>yc,RowHighlightPosition:()=>Gb.RowHighlightPosition,RowNode:()=>Vb.RowNode,RowNodeBlock:()=>Bb.RowNodeBlock,RowNodeBlockLoader:()=>Hb.RowNodeBlockLoader,RowNodeSorter:()=>zb.RowNodeSorter,RowPositionUtils:()=>Ub.RowPositionUtils,RowRenderer:()=>Wb.RowRenderer,ScalarFilter:()=>jb.ScalarFilter,ScrollVisibleService:()=>Kb.ScrollVisibleService,SelectCellEditor:()=>$b.SelectCellEditor,SelectableService:()=>Yb.SelectableService,SelectionHandleType:()=>qb.SelectionHandleType,ServerSideRowModelModule:()=>Df,ServerSideTransactionResultStatus:()=>Xb.ServerSideTransactionResultStatus,SetFilter:()=>Zf,SetFilterModule:()=>im,SetLeftFeature:()=>Zb.SetLeftFeature,SideBarModule:()=>Zc,SimpleFilter:()=>Qb.SimpleFilter,SortController:()=>Jb.SortController,SortIndicatorComp:()=>eS.SortIndicatorComp,SparklinesModule:()=>bv,StandardMenuFactory:()=>tS.StandardMenuFactory,StatusBarModule:()=>Hv,StylingService:()=>iS.StylingService,TabGuardClassNames:()=>nS.TabGuardClassNames,TabGuardComp:()=>sS.TabGuardComp,TabGuardCtrl:()=>rS.TabGuardCtrl,TabbedLayout:()=>oS.TabbedLayout,TextCellEditor:()=>aS.TextCellEditor,TextFilter:()=>lS.TextFilter,TextFloatingFilter:()=>cS.TextFloatingFilter,Timer:()=>hS.Timer,ToolPanelColDefService:()=>qc,TooltipFeature:()=>dS.TooltipFeature,TooltipStateManager:()=>uS.TooltipStateManager,TouchListener:()=>pS.TouchListener,UserComponentFactory:()=>gS.UserComponentFactory,UserComponentRegistry:()=>fS.UserComponentRegistry,ValueCache:()=>mS.ValueCache,ValueService:()=>vS.ValueService,ValuesDropZonePanel:()=>Cc,VanillaFrameworkOverrides:()=>yS.VanillaFrameworkOverrides,VerticalDirection:()=>CS.VerticalDirection,ViewportRowModelModule:()=>Yv,VirtualList:()=>bS.VirtualList,VirtualListDragFeature:()=>SS.VirtualListDragFeature,_:()=>wS._,__FORCE_MODULE_DETECTION_AG_GRID_CORE_EXT:()=>el,agCharts:()=>tl,createGrid:()=>xS.createGrid,exportMultipleSheetsAsExcel:()=>Uu,getMultipleSheetsAsExcel:()=>zu,getRowContainerTypeForName:()=>ES.getRowContainerTypeForName,provideGlobalGridOptions:()=>MS.provideGlobalGridOptions}),e.exports=(n=u,c(s({},"__esModule",{value:!0}),n));var p=i(98092),g=i(98092),f=i(98092),m=i(98092),v=i(98092),y=i(98092),C=i(98092),b=class{constructor(){this.ieCompatibility=!1}init(){this.ieCompatibility="5d41402abc4b2a76b9719d911017c592"!=this.md5("hello")}md5cycle(e,t){let i=e[0],n=e[1],s=e[2],r=e[3];i=this.ff(i,n,s,r,t[0],7,-680876936),r=this.ff(r,i,n,s,t[1],12,-389564586),s=this.ff(s,r,i,n,t[2],17,606105819),n=this.ff(n,s,r,i,t[3],22,-1044525330),i=this.ff(i,n,s,r,t[4],7,-176418897),r=this.ff(r,i,n,s,t[5],12,1200080426),s=this.ff(s,r,i,n,t[6],17,-1473231341),n=this.ff(n,s,r,i,t[7],22,-45705983),i=this.ff(i,n,s,r,t[8],7,1770035416),r=this.ff(r,i,n,s,t[9],12,-1958414417),s=this.ff(s,r,i,n,t[10],17,-42063),n=this.ff(n,s,r,i,t[11],22,-1990404162),i=this.ff(i,n,s,r,t[12],7,1804603682),r=this.ff(r,i,n,s,t[13],12,-40341101),s=this.ff(s,r,i,n,t[14],17,-1502002290),n=this.ff(n,s,r,i,t[15],22,1236535329),i=this.gg(i,n,s,r,t[1],5,-165796510),r=this.gg(r,i,n,s,t[6],9,-1069501632),s=this.gg(s,r,i,n,t[11],14,643717713),n=this.gg(n,s,r,i,t[0],20,-373897302),i=this.gg(i,n,s,r,t[5],5,-701558691),r=this.gg(r,i,n,s,t[10],9,38016083),s=this.gg(s,r,i,n,t[15],14,-660478335),n=this.gg(n,s,r,i,t[4],20,-405537848),i=this.gg(i,n,s,r,t[9],5,568446438),r=this.gg(r,i,n,s,t[14],9,-1019803690),s=this.gg(s,r,i,n,t[3],14,-187363961),n=this.gg(n,s,r,i,t[8],20,1163531501),i=this.gg(i,n,s,r,t[13],5,-1444681467),r=this.gg(r,i,n,s,t[2],9,-51403784),s=this.gg(s,r,i,n,t[7],14,1735328473),n=this.gg(n,s,r,i,t[12],20,-1926607734),i=this.hh(i,n,s,r,t[5],4,-378558),r=this.hh(r,i,n,s,t[8],11,-2022574463),s=this.hh(s,r,i,n,t[11],16,1839030562),n=this.hh(n,s,r,i,t[14],23,-35309556),i=this.hh(i,n,s,r,t[1],4,-1530992060),r=this.hh(r,i,n,s,t[4],11,1272893353),s=this.hh(s,r,i,n,t[7],16,-155497632),n=this.hh(n,s,r,i,t[10],23,-1094730640),i=this.hh(i,n,s,r,t[13],4,681279174),r=this.hh(r,i,n,s,t[0],11,-358537222),s=this.hh(s,r,i,n,t[3],16,-722521979),n=this.hh(n,s,r,i,t[6],23,76029189),i=this.hh(i,n,s,r,t[9],4,-640364487),r=this.hh(r,i,n,s,t[12],11,-421815835),s=this.hh(s,r,i,n,t[15],16,530742520),n=this.hh(n,s,r,i,t[2],23,-995338651),i=this.ii(i,n,s,r,t[0],6,-198630844),r=this.ii(r,i,n,s,t[7],10,1126891415),s=this.ii(s,r,i,n,t[14],15,-1416354905),n=this.ii(n,s,r,i,t[5],21,-57434055),i=this.ii(i,n,s,r,t[12],6,1700485571),r=this.ii(r,i,n,s,t[3],10,-1894986606),s=this.ii(s,r,i,n,t[10],15,-1051523),n=this.ii(n,s,r,i,t[1],21,-2054922799),i=this.ii(i,n,s,r,t[8],6,1873313359),r=this.ii(r,i,n,s,t[15],10,-30611744),s=this.ii(s,r,i,n,t[6],15,-1560198380),n=this.ii(n,s,r,i,t[13],21,1309151649),i=this.ii(i,n,s,r,t[4],6,-145523070),r=this.ii(r,i,n,s,t[11],10,-1120210379),s=this.ii(s,r,i,n,t[2],15,718787259),n=this.ii(n,s,r,i,t[9],21,-343485551),e[0]=this.add32(i,e[0]),e[1]=this.add32(n,e[1]),e[2]=this.add32(s,e[2]),e[3]=this.add32(r,e[3])}cmn(e,t,i,n,s,r){return t=this.add32(this.add32(t,e),this.add32(n,r)),this.add32(t<<s|t>>>32-s,i)}ff(e,t,i,n,s,r,o){return this.cmn(t&i|~t&n,e,t,s,r,o)}gg(e,t,i,n,s,r,o){return this.cmn(t&n|i&~n,e,t,s,r,o)}hh(e,t,i,n,s,r,o){return this.cmn(t^i^n,e,t,s,r,o)}ii(e,t,i,n,s,r,o){return this.cmn(i^(t|~n),e,t,s,r,o)}md51(e){const t=e.length,i=[1732584193,-271733879,-1732584194,271733878];let n;for(n=64;n<=e.length;n+=64)this.md5cycle(i,this.md5blk(e.substring(n-64,n)));e=e.substring(n-64);const s=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];for(n=0;n<e.length;n++)s[n>>2]|=e.charCodeAt(n)<<(n%4<<3);if(s[n>>2]|=128<<(n%4<<3),n>55)for(this.md5cycle(i,s),n=0;n<16;n++)s[n]=0;return s[14]=8*t,this.md5cycle(i,s),i}md5blk(e){const t=[];for(let i=0;i<64;i+=4)t[i>>2]=e.charCodeAt(i)+(e.charCodeAt(i+1)<<8)+(e.charCodeAt(i+2)<<16)+(e.charCodeAt(i+3)<<24);return t}rhex(e){const t="0123456789abcdef".split("");let i="",n=0;for(;n<4;n++)i+=t[e>>8*n+4&15]+t[e>>8*n&15];return i}hex(e){for(let t=0;t<e.length;t++)e[t]=this.rhex(e[t]);return e.join("")}md5(e){return this.hex(this.md51(e))}add32(e,t){return this.ieCompatibility?this.add32Compat(e,t):this.add32Std(e,t)}add32Std(e,t){return e+t&4294967295}add32Compat(e,t){const i=(65535&e)+(65535&t);return(e>>16)+(t>>16)+(i>>16)<<16|65535&i}};function S(e){return null==e||0===e.length}var w={"01":"GRID","02":"CHARTS","0102":"BOTH"},x=class e{constructor(e){this.watermarkMessage=void 0,this.totalMessageLength=124,this.document=e,this.md5=new b,this.md5.init()}validateLicense(){const t=this.getLicenseDetails(e.licenseKey),i=`AG Grid ${"BOTH"===t.currentLicenseType?"and AG Charts ":""}Enterprise`,n=void 0===t.suppliedLicenseType?"":`AG ${"BOTH"===t.suppliedLicenseType?"Grid and AG Charts":"GRID"===t.suppliedLicenseType?"Grid":"Charts"} Enterprise`;if(t.missing)this.isWebsiteUrl()&&!this.isForceWatermark()||this.outputMissingLicenseKey(i);else if(t.expired){const s=e.getGridReleaseDate(),r=e.formatDate(s);this.outputExpiredKey(t.expiry,r,i,n)}else t.valid?t.isTrial&&t.trialExpired&&this.outputExpiredTrialKey(t.expiry,i,n):this.outputInvalidLicenseKey(!!t.incorrectLicenseType,i,n)}static extractExpiry(t){const i=t.substring(t.lastIndexOf("_")+1,t.length);return new Date(parseInt(e.decode(i),10))}static extractLicenseComponents(t){let i=t.replace(/[\u200B-\u200D\uFEFF]/g,"");if(i=i.replace(/\r?\n|\r/g,""),t.length<=32)return{md5:null,license:t,version:null,isTrial:null};const n=i.length-32,s=i.substring(n),r=i.substring(0,n),[o,a,l]=e.extractBracketedInformation(i);return{md5:s,license:r,version:o,isTrial:a,type:l}}getLicenseDetails(t){const i=e.chartsLicenseManager?"BOTH":"GRID";if(S(t))return{licenseKey:t,valid:!1,missing:!0,currentLicenseType:i};const n=e.getGridReleaseDate(),{md5:s,license:r,version:o,isTrial:a,type:l}=e.extractLicenseComponents(t);let c,h,d,u=s===this.md5.md5(r)&&-1===t.indexOf("For_Trialing_ag-Grid_Only"),p=null,g=!1;function f(){c=p<new Date,h=void 0}if(u&&(p=e.extractExpiry(r),u=!isNaN(p.getTime()),u))switch(h=n>p,o){case"legacy":case"2":a&&f();break;case"3":S(l)?u=!1:(d=l,l!==w["01"]&&l!==w["0102"]||"BOTH"===i&&"BOTH"!==d?(u=!1,g=!0):a&&f())}return u?{licenseKey:t,valid:u,expiry:e.formatDate(p),expired:h,version:o,isTrial:a,trialExpired:c,incorrectLicenseType:g,currentLicenseType:i,suppliedLicenseType:d}:{licenseKey:t,valid:u,incorrectLicenseType:g,currentLicenseType:i,suppliedLicenseType:d}}isDisplayWatermark(){return this.isForceWatermark()||!this.isLocalhost()&&!this.isWebsiteUrl()&&!S(this.watermarkMessage)}getWatermarkMessage(){return this.watermarkMessage||""}getHostname(){const e=(this.document.defaultView||window).location,{hostname:t=""}=e;return t}isForceWatermark(){const e=(this.document.defaultView||window).location,{pathname:t}=e;return!!t&&-1!==t.indexOf("forceWatermark")}isWebsiteUrl(){return null!==this.getHostname().match(/^((?:[\w-]+\.)?ag-grid\.com)$/)}isLocalhost(){return null!==this.getHostname().match(/^(?:127\.0\.0\.1|localhost)$/)}static formatDate(e){const t=e.getDate(),i=e.getMonth(),n=e.getFullYear();return t+" "+["January","February","March","April","May","June","July","August","September","October","November","December"][i]+" "+n}static getGridReleaseDate(){return new Date(parseInt(e.decode(e.RELEASE_INFORMATION),10))}static decode(t){const i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";let n,s,r,o,a,l,c,h="",d=0;const u=t.replace(/[^A-Za-z0-9+/=]/g,"");for(;d<u.length;)o=i.indexOf(u.charAt(d++)),a=i.indexOf(u.charAt(d++)),l=i.indexOf(u.charAt(d++)),c=i.indexOf(u.charAt(d++)),n=o<<2|a>>4,s=(15&a)<<4|l>>2,r=(3&l)<<6|c,h+=String.fromCharCode(n),64!=l&&(h+=String.fromCharCode(s)),64!=c&&(h+=String.fromCharCode(r));return h=e.utf8_decode(h),h}static utf8_decode(e){e=e.replace(/rn/g,"n");let t="";for(let i=0;i<e.length;i++){const n=e.charCodeAt(i);n<128?t+=String.fromCharCode(n):n>127&&n<2048?(t+=String.fromCharCode(n>>6|192),t+=String.fromCharCode(63&n|128)):(t+=String.fromCharCode(n>>12|224),t+=String.fromCharCode(n>>6&63|128),t+=String.fromCharCode(63&n|128))}return t}static setChartsLicenseManager(e){this.chartsLicenseManager=e}static setLicenseKey(e){this.licenseKey=e,this.chartsLicenseManager&&this.chartsLicenseManager.setLicenseKey(e,!0)}static extractBracketedInformation(e){if(!e.includes("["))return["legacy",!1,void 0];const t=e.match(/\[(.*?)\]/g).map(e=>e.replace("[","").replace("]",""));if(!t||0===t.length)return["legacy",!1,void 0];const i=1===t.filter(e=>"TRIAL"===e).length,n=t.filter(e=>0===e.indexOf("v"))[0];return[n?n.replace("v",""):"legacy",i,w[t.filter(e=>w[e])[0]]]}centerPadAndOutput(e){const t=this.totalMessageLength-e.length;console.error(e.padStart(t/2+e.length,"*").padEnd(this.totalMessageLength,"*"))}padAndOutput(e,t="*",i=""){console.error(e.padEnd(this.totalMessageLength-i.length,t)+i)}outputInvalidLicenseKey(e,t,i){e?(this.centerPadAndOutput(""),this.centerPadAndOutput(` ${t} License `),this.centerPadAndOutput(" Incompatible License Key "),this.padAndOutput(`* Your license key is for ${i} only and does not cover you for ${t}.`," ","*"),this.padAndOutput("* Please contact info@ag-grid.com to obtain a combined license key."," ","*"),this.centerPadAndOutput(""),this.centerPadAndOutput("")):(this.centerPadAndOutput(""),this.centerPadAndOutput(` ${t} License `),this.centerPadAndOutput(" Invalid License Key "),this.padAndOutput("* Your license key is not valid - please contact info@ag-grid.com to obtain a valid license."," ","*"),this.centerPadAndOutput(""),this.centerPadAndOutput("")),this.watermarkMessage="Invalid License"}outputExpiredTrialKey(e,t,i){this.centerPadAndOutput(""),this.centerPadAndOutput(` ${t} License `),this.centerPadAndOutput(" Trial Period Expired. "),this.padAndOutput(`* Your trial only license for ${i} expired on ${e}.`," ","*"),this.padAndOutput("* Please email info@ag-grid.com to purchase a license."," ","*"),this.centerPadAndOutput(""),this.centerPadAndOutput(""),this.watermarkMessage="Trial Period Expired"}outputMissingLicenseKey(e){this.centerPadAndOutput(""),this.centerPadAndOutput(` ${e} License `),this.centerPadAndOutput(" License Key Not Found "),this.padAndOutput(`* All ${e} features are unlocked for trial.`," ","*"),this.padAndOutput("* If you want to hide the watermark please email info@ag-grid.com for a trial license key."," ","*"),this.centerPadAndOutput(""),this.centerPadAndOutput(""),this.watermarkMessage="For Trial Use Only"}outputExpiredKey(e,t,i,n){this.centerPadAndOutput(""),this.centerPadAndOutput(` ${i} License `),this.centerPadAndOutput(" Incompatible Software Version "),this.padAndOutput(`* Your license key works with versions of ${n} released before ${e}.`," ","*"),this.padAndOutput(`* The version you are trying to use was released on ${t}.`," ","*"),this.padAndOutput("* Please contact info@ag-grid.com to renew your license key."," ","*"),this.centerPadAndOutput(""),this.centerPadAndOutput(""),this.watermarkMessage="License Expired"}};x.RELEASE_INFORMATION="MTcxNTc3NTcyODYxNg==";var E=x,M=class extends C.BeanStub{validateLicense(){this.licenseManager=new E(this.gos.getDocument()),this.licenseManager.validateLicense()}static getLicenseDetails(e){return new E(null).getLicenseDetails(e)}isDisplayWatermark(){return this.licenseManager.isDisplayWatermark()}getWatermarkMessage(){return this.licenseManager.getWatermarkMessage()}static setLicenseKey(e){E.setLicenseKey(e)}static setChartsLicenseManager(e){E.setChartsLicenseManager(e)}};d([C.PreConstruct],M.prototype,"validateLicense",1),M=d([(0,C.Bean)("licenseManager")],M);var A=i(98092),T=class extends A.Component{constructor(){super('<div class="ag-watermark">\n                <div ref="eLicenseTextRef" class="ag-watermark-text"></div>\n            </div>')}postConstruct(){const e=this.shouldDisplayWatermark();this.setDisplayed(e),e&&(this.eLicenseTextRef.innerText=this.licenseManager.getWatermarkMessage(),window.setTimeout(()=>this.addCssClass("ag-opacity-zero"),0),window.setTimeout(()=>this.setDisplayed(!1),5e3))}shouldDisplayWatermark(){return this.licenseManager.isDisplayWatermark()}};d([(0,A.Autowired)("licenseManager")],T.prototype,"licenseManager",2),d([(0,A.RefSelector)("eLicenseTextRef")],T.prototype,"eLicenseTextRef",2),d([A.PostConstruct],T.prototype,"postConstruct",1);var D={version:"31.3.4",moduleName:y.ModuleNames.EnterpriseCoreModule,beans:[M],agStackComponents:[{componentName:"AgWatermark",componentClass:T}]},I=i(98092),R=i(98092),L=i(98092),k=i(98092),P=i(98092),N=i(98092),O=i(98092),_=i(98092),F=i(98092),G=i(98092),V=i(98092),B=i(98092),H=i(98092),z=i(98092),U=i(98092),W=Object.defineProperty,j=Object.defineProperties,K=Object.getOwnPropertyDescriptor,$=Object.getOwnPropertyDescriptors,Y=Object.getOwnPropertySymbols,q=Object.prototype.hasOwnProperty,X=Object.prototype.propertyIsEnumerable,Z=(e,t,i)=>t in e?W(e,t,{enumerable:!0,configurable:!0,writable:!0,value:i}):e[t]=i,Q=(e,t)=>{for(var i in t||(t={}))q.call(t,i)&&Z(e,i,t[i]);if(Y)for(var i of Y(t))X.call(t,i)&&Z(e,i,t[i]);return e},J=(e,t)=>j(e,$(t)),ee=(e,t,i,n)=>{for(var s,r=n>1?void 0:n?K(t,i):t,o=e.length-1;o>=0;o--)(s=e[o])&&(r=(n?s(t,i,r):s(r))||r);return n&&r&&W(t,i,r),r},te=class extends L.Component{constructor(e){super('\n            <div class="ag-advanced-filter-header" role="row">\n            </div>'),this.enabled=e}postConstruct(){this.setupAdvancedFilter(this.enabled),this.addDestroyFunc(()=>this.destroyBean(this.eAdvancedFilter)),this.addManagedListener(this.eventService,L.Events.EVENT_GRID_COLUMNS_CHANGED,()=>this.onGridColumnsChanged()),this.addGuiEventListener("keydown",e=>this.onKeyDown(e)),this.addGuiEventListener("focusout",e=>{this.getFocusableElement().contains(e.relatedTarget)||this.focusService.clearAdvancedFilterColumn()})}getFocusableElement(){var e,t;return null!=(t=null==(e=this.eAdvancedFilter)?void 0:e.getGui())?t:this.getGui()}setEnabled(e){e!==this.enabled&&this.setupAdvancedFilter(e)}refresh(){var e;null==(e=this.eAdvancedFilter)||e.refresh()}getHeight(){return this.height}setInputDisabled(e){var t;null==(t=this.eAdvancedFilter)||t.setInputDisabled(e)}setupAdvancedFilter(e){const t=this.getGui();if(e){this.eAdvancedFilter=this.createBean(new ve);const e=this.eAdvancedFilter.getGui();this.eAdvancedFilter.addCssClass("ag-advanced-filter-header-cell"),this.height=this.columnModel.getFloatingFiltersHeight();const i=`${this.height}px`;t.style.height=i,t.style.minHeight=i,this.setAriaRowIndex(),L._.setAriaRole(e,"gridcell"),L._.setAriaColIndex(e,1),this.setAriaColumnCount(e),t.appendChild(e)}else L._.clearElement(t),this.destroyBean(this.eAdvancedFilter),this.height=0;L._.setDisplayed(t,e),this.enabled=e}setAriaColumnCount(e){L._.setAriaColSpan(e,this.columnModel.getAllGridColumns().length)}setAriaRowIndex(){L._.setAriaRowIndex(this.getGui(),this.headerNavigationService.getHeaderRowCount())}onGridColumnsChanged(){this.eAdvancedFilter&&(this.setAriaColumnCount(this.eAdvancedFilter.getGui()),this.setAriaRowIndex())}onKeyDown(e){switch(e.key){case L.KeyCode.ENTER:this.hasFocus()&&this.focusService.focusInto(this.getFocusableElement())&&e.preventDefault();break;case L.KeyCode.ESCAPE:this.hasFocus()||this.getFocusableElement().focus();break;case L.KeyCode.UP:this.navigateUpDown(!0,e);break;case L.KeyCode.DOWN:this.navigateUpDown(!1,e);break;case L.KeyCode.TAB:if(this.hasFocus())this.navigateLeftRight(e);else{const t=this.focusService.findNextFocusableElement(this.getFocusableElement(),null,e.shiftKey);t?(e.preventDefault(),t.focus()):this.navigateLeftRight(e)}}}navigateUpDown(e,t){this.hasFocus()&&this.focusService.focusNextFromAdvancedFilter(e)&&t.preventDefault()}navigateLeftRight(e){(e.shiftKey?this.focusService.focusLastHeader():this.focusService.focusNextFromAdvancedFilter(!1,!0))&&e.preventDefault()}hasFocus(){return this.gos.getActiveDomElement()===this.getFocusableElement()}};ee([(0,L.Autowired)("columnModel")],te.prototype,"columnModel",2),ee([(0,L.Autowired)("focusService")],te.prototype,"focusService",2),ee([(0,L.Autowired)("headerNavigationService")],te.prototype,"headerNavigationService",2),ee([L.PostConstruct],te.prototype,"postConstruct",1);var ie=class extends N.AgRichSelect{constructor(e){super(J(Q({},e),{template:'\n                <div class="ag-picker-field" role="presentation">\n                    <div ref="eLabel"></div>\n                    <div ref="eWrapper" class="ag-wrapper ag-picker-collapsed">\n                        <div ref="eDisplayField" class="ag-picker-field-display"></div>\n                        <ag-input-text-field ref="eInput" class="ag-rich-select-field-input"></ag-input-text-field>\n                        <div ref="eIcon" class="ag-picker-field-icon" aria-hidden="true"></div>\n                    </div>\n                </div>'})),this.params=e}showPicker(){setTimeout(()=>super.showPicker())}hidePicker(){setTimeout(()=>super.hidePicker())}postConstruct(){super.postConstruct();const{wrapperClassName:e,ariaLabel:t}=this.params;N._.setDisplayed(this.eDisplayField,!1),e&&this.eWrapper.classList.add(e),N._.setAriaLabelledBy(this.eWrapper,""),N._.setAriaLabel(this.eWrapper,t)}onEnterKeyDown(e){N._.stopPropagationForAgGrid(e),this.isPickerDisplayed?super.onEnterKeyDown(e):(e.preventDefault(),this.showPicker())}},ne=class e extends O.BeanStub{constructor(e,t){super(),this.comp=e,this.virtualList=t}postConstruct(){this.createManagedBean(new O.VirtualListDragFeature(this.comp,this.virtualList,{dragSourceType:O.DragSourceType.AdvancedFilterBuilder,listItemDragStartEvent:e.EVENT_DRAG_STARTED,listItemDragEndEvent:e.EVENT_DRAG_ENDED,eventSource:this,getCurrentDragValue:e=>this.getCurrentDragValue(e),isMoveBlocked:()=>!1,getNumRows:e=>e.getNumItems(),moveItem:(e,t)=>this.moveItem(e,t)}))}getCurrentDragValue(e){return e.item}moveItem(e,t){this.comp.moveItem(e,t)}};ne.EVENT_DRAG_STARTED="advancedFilterBuilderDragStarted",ne.EVENT_DRAG_ENDED="advancedFilterBuilderDragEnded",ee([O.PostConstruct],ne.prototype,"postConstruct",1);var se=ne,re=class extends _.BeanStub{constructor(e,t,i){super(),this.eGui=e,this.focusWrapper=t,this.eFocusableComp=i}postConstruct(){this.addManagedListener(this.eGui,"keydown",e=>{switch(e.key){case _.KeyCode.TAB:e.defaultPrevented||_._.stopPropagationForAgGrid(e);break;case _.KeyCode.UP:case _.KeyCode.DOWN:_._.stopPropagationForAgGrid(e);break;case _.KeyCode.ESCAPE:if(_._.isStopPropagationForAgGrid(e))return;this.eGui.contains(this.gos.getActiveDomElement())&&(e.preventDefault(),_._.stopPropagationForAgGrid(e),this.focusWrapper.focus())}}),this.addManagedListener(this.focusWrapper,"keydown",e=>{if(e.key===_.KeyCode.ENTER){if(_._.isStopPropagationForAgGrid(e))return;this.gos.getActiveDomElement()===this.focusWrapper&&(e.preventDefault(),_._.stopPropagationForAgGrid(e),this.eFocusableComp.getFocusableElement().focus())}}),this.addManagedListener(this.focusWrapper,"focusin",()=>{this.focusWrapper.classList.add("ag-advanced-filter-builder-virtual-list-item-highlight")}),this.addManagedListener(this.focusWrapper,"focusout",e=>{this.focusWrapper.contains(e.relatedTarget)||this.focusWrapper.classList.remove("ag-advanced-filter-builder-virtual-list-item-highlight")})}};function oe(e,t){return{pickerAriaLabelKey:"ariaLabelAdvancedFilterBuilderAddField",pickerAriaLabelValue:"Advanced Filter Builder Add Field",pickerType:"ag-list",valueList:[{key:"condition",displayValue:e("advancedFilterBuilderAddCondition")},{key:"join",displayValue:e("advancedFilterBuilderAddJoin")}],valueFormatter:e=>{var t;return null==e?null:null!=(t=e.displayValue)?t:e.key},pickerIcon:"advancedFilterBuilderAdd",maxPickerWidth:`${null!=t?t:120}px`,wrapperClassName:"ag-advanced-filter-builder-item-button",ariaLabel:e("advancedFilterBuilderAddButtonTooltip")}}ee([_.PostConstruct],re.prototype,"postConstruct",1);var ae=class{};ae.EVENT_ADDED="advancedFilterBuilderAdded",ae.EVENT_MOVED="advancedFilterBuilderMoved",ae.EVENT_REMOVED="advancedFilterBuilderRemoved",ae.EVENT_VALUE_CHANGED="advancedFilterBuilderValueChanged",ae.EVENT_VALID_CHANGED="advancedFilterBuilderValidChanged";var le=class extends F.Component{constructor(){super('\n            <div class="ag-advanced-filter-builder-item-condition" role="presentation"></div>\n        '),this.validationMessage=null}init(e){const{item:t,createPill:i}=e;this.item=t,this.createPill=i,this.filterModel=t.filterModel,this.setupColumnCondition(this.filterModel),this.validate(),this.addDestroyFunc(()=>this.destroyBeans([this.eColumnPill,this.eOperatorPill,this.eOperandPill]))}getDragName(){return this.filterModel.colId?this.advancedFilterExpressionService.parseColumnFilterModel(this.filterModel):this.getDefaultColumnDisplayValue()}getAriaLabel(){return`${this.advancedFilterExpressionService.translate("ariaAdvancedFilterBuilderFilterItem")} ${this.getDragName()}`}getValidationMessage(){return this.validationMessage}getFocusableElement(){return this.eColumnPill.getFocusableElement()}setupColumnCondition(e){var t;const i=this.advancedFilterExpressionService.getColumnDetails(e.colId);this.baseCellDataType=i.baseCellDataType,this.column=i.column,this.numOperands=this.getNumOperands(this.getOperatorKey()),this.eColumnPill=this.createPill({key:this.getColumnKey(),displayValue:null!=(t=this.getColumnDisplayValue())?t:this.getDefaultColumnDisplayValue(),cssClass:"ag-advanced-filter-builder-column-pill",isSelect:!0,getEditorParams:()=>({values:this.advancedFilterExpressionService.getColumnAutocompleteEntries()}),update:e=>this.setColumnKey(e),pickerAriaLabelKey:"ariaLabelAdvancedFilterBuilderColumnSelectField",pickerAriaLabelValue:"Advanced Filter Builder Column Select Field",ariaLabel:this.advancedFilterExpressionService.translate("ariaAdvancedFilterBuilderColumn")}),this.getGui().appendChild(this.eColumnPill.getGui()),F._.exists(this.getColumnKey())&&(this.createOperatorPill(),this.hasOperand()&&this.createOperandPill())}createOperatorPill(){var e;this.eOperatorPill=this.createPill({key:this.getOperatorKey(),displayValue:null!=(e=this.getOperatorDisplayValue())?e:this.getDefaultOptionSelectValue(),cssClass:"ag-advanced-filter-builder-option-pill",isSelect:!0,getEditorParams:()=>({values:this.getOperatorAutocompleteEntries()}),update:e=>this.setOperatorKey(e),pickerAriaLabelKey:"ariaLabelAdvancedFilterBuilderOptionSelectField",pickerAriaLabelValue:"Advanced Filter Builder Option Select Field",ariaLabel:this.advancedFilterExpressionService.translate("ariaAdvancedFilterBuilderOption")}),this.eColumnPill.getGui().insertAdjacentElement("afterend",this.eOperatorPill.getGui())}createOperandPill(){var e;const t=null!=(e=this.getOperandDisplayValue())?e:"";this.eOperandPill=this.createPill({key:t,displayValue:t,baseCellDataType:this.baseCellDataType,cssClass:"ag-advanced-filter-builder-value-pill",isSelect:!1,update:e=>this.setOperand(e),ariaLabel:this.advancedFilterExpressionService.translate("ariaAdvancedFilterBuilderValue")}),this.getGui().appendChild(this.eOperandPill.getGui())}getColumnKey(){return this.filterModel.colId}getColumnDisplayValue(){return this.advancedFilterExpressionService.getColumnDisplayValue(this.filterModel)}getOperatorKey(){return this.filterModel.type}getOperatorDisplayValue(){return this.advancedFilterExpressionService.getOperatorDisplayValue(this.filterModel)}getOperandDisplayValue(){return this.advancedFilterExpressionService.getOperandDisplayValue(this.filterModel,!0)}hasOperand(){return this.numOperands>0}getOperatorAutocompleteEntries(){return this.column?this.advancedFilterExpressionService.getOperatorAutocompleteEntries(this.column,this.baseCellDataType):[]}setColumnKey(e){this.eOperatorPill||this.createOperatorPill();const t=this.advancedFilterExpressionService.getColumnDetails(e);this.column=t.column;const i=t.baseCellDataType;this.baseCellDataType!==i&&(this.baseCellDataType=i,this.setOperatorKey(void 0),this.eOperatorPill&&(F._.removeFromParent(this.eOperatorPill.getGui()),this.destroyBean(this.eOperatorPill),this.createOperatorPill()),this.validate()),this.filterModel.colId=e,this.filterModel.filterType=this.baseCellDataType}setOperatorKey(e){const t=this.getNumOperands(e);t!==this.numOperands&&(this.numOperands=t,0===t?this.destroyOperandPill():(this.createOperandPill(),"number"!==this.baseCellDataType&&this.setOperand(""))),this.filterModel.type=e,this.validate()}setOperand(e){var t;let i=e;this.column&&(i=null!=(t=this.advancedFilterExpressionService.getOperandModelValue(e,this.baseCellDataType,this.column))?t:""),this.filterModel.filter=i,this.validate()}getNumOperands(e){var t,i;return null!=(i=null==(t=this.advancedFilterExpressionService.getExpressionOperator(this.baseCellDataType,e))?void 0:t.numOperands)?i:0}destroyOperandPill(){delete this.filterModel.filter,this.getGui().removeChild(this.eOperandPill.getGui()),this.destroyBean(this.eOperandPill),this.eOperandPill=void 0}validate(){let e=null;F._.exists(this.getColumnKey())?F._.exists(this.getOperatorKey())?this.numOperands>0&&!F._.exists(this.getOperandDisplayValue())&&(e=this.advancedFilterExpressionService.translate("advancedFilterBuilderValidationEnterValue")):e=this.advancedFilterExpressionService.translate("advancedFilterBuilderValidationSelectOption"):e=this.advancedFilterExpressionService.translate("advancedFilterBuilderValidationSelectColumn"),this.item.valid=!e,e!==this.validationMessage&&(this.validationMessage=e,this.dispatchEvent({type:ae.EVENT_VALID_CHANGED}))}getDefaultColumnDisplayValue(){return this.advancedFilterExpressionService.translate("advancedFilterBuilderSelectColumn")}getDefaultOptionSelectValue(){return this.advancedFilterExpressionService.translate("advancedFilterBuilderSelectOption")}};ee([(0,F.Autowired)("advancedFilterExpressionService")],le.prototype,"advancedFilterExpressionService",2),ee([(0,F.Autowired)("valueService")],le.prototype,"valueService",2);var ce=class extends G.Component{constructor(e){super('\n            <div class="ag-advanced-filter-builder-pill-wrapper" role="presentation">\n                <div ref="ePill" class="ag-advanced-filter-builder-pill" role="button">\n                    <span ref="eLabel" class="ag-advanced-filter-builder-pill-display"></span>\n                </div>\n            </div>\n        '),this.params=e,this.value=e.value}postConstruct(){const{cssClass:e,ariaLabel:t}=this.params;this.ePill.classList.add(e),this.activateTabIndex([this.ePill]),this.eLabel.id=`${this.getCompId()}`,G._.setAriaDescribedBy(this.ePill,this.eLabel.id),G._.setAriaLabel(this.ePill,t),this.renderValue(),this.addManagedListener(this.ePill,"click",e=>{e.preventDefault(),this.showEditor()}),this.addManagedListener(this.ePill,"keydown",e=>{e.key===G.KeyCode.ENTER&&(e.preventDefault(),G._.stopPropagationForAgGrid(e),this.showEditor())}),this.addDestroyFunc(()=>this.destroyBean(this.eEditor))}getFocusableElement(){return this.ePill}showEditor(){if(this.eEditor)return;G._.setDisplayed(this.ePill,!1),this.eEditor=this.createEditorComp(this.params.type),this.eEditor.setValue(this.value);const e=this.eEditor.getGui();this.eEditor.addManagedListener(e,"keydown",e=>{switch(e.key){case G.KeyCode.ENTER:e.preventDefault(),G._.stopPropagationForAgGrid(e),this.updateValue(!0);break;case G.KeyCode.ESCAPE:e.preventDefault(),G._.stopPropagationForAgGrid(e),this.hideEditor(!0)}}),this.eEditor.addManagedListener(e,"focusout",()=>{this.updateValue(!1)}),this.getGui().appendChild(e),this.eEditor.getFocusableElement().focus()}createEditorComp(e){let t;switch(e){case"text":t=new G.AgInputTextField;break;case"number":t=new G.AgInputNumberField;break;case"date":t=new G.AgInputDateField}return this.createBean(t)}hideEditor(e){const{eEditor:t}=this;t&&(this.eEditor=void 0,this.getGui().removeChild(t.getGui()),this.destroyBean(t),G._.setDisplayed(this.ePill,!0),e&&this.ePill.focus())}renderValue(){let e;this.eLabel.classList.remove("ag-advanced-filter-builder-value-empty","ag-advanced-filter-builder-value-number","ag-advanced-filter-builder-value-text"),G._.exists(this.value)?"number"===this.params.type?(e=this.value,this.eLabel.classList.add("ag-advanced-filter-builder-value-number")):(e=`"${this.value}"`,this.eLabel.classList.add("ag-advanced-filter-builder-value-text")):(e=this.advancedFilterExpressionService.translate("advancedFilterBuilderEnterValue"),this.eLabel.classList.add("ag-advanced-filter-builder-value-empty")),this.eLabel.innerText=e}updateValue(e){var t;if(!this.eEditor)return;const i=null!=(t=this.eEditor.getValue())?t:"";this.dispatchEvent({type:G.Events.EVENT_FIELD_VALUE_CHANGED,value:i}),this.value=i,this.renderValue(),this.hideEditor(e)}};ee([(0,G.RefSelector)("ePill")],ce.prototype,"ePill",2),ee([(0,G.RefSelector)("eLabel")],ce.prototype,"eLabel",2),ee([(0,G.Autowired)("advancedFilterExpressionService")],ce.prototype,"advancedFilterExpressionService",2),ee([G.PostConstruct],ce.prototype,"postConstruct",1);var he=class extends V.Component{constructor(){super('\n            <div class="ag-advanced-filter-builder-item-condition" role="presentation"></div>\n        ')}init(e){const{item:t,createPill:i}=e,n=t.filterModel;this.filterModel=n,this.ePill=i({key:n.type,displayValue:this.advancedFilterExpressionService.parseJoinOperator(n),cssClass:"ag-advanced-filter-builder-join-pill",isSelect:!0,getEditorParams:()=>({values:this.advancedFilterExpressionService.getJoinOperatorAutocompleteEntries()}),update:e=>n.type=e,pickerAriaLabelKey:"ariaLabelAdvancedFilterBuilderJoinSelectField",pickerAriaLabelValue:"Advanced Filter Builder Join Operator Select Field",ariaLabel:this.advancedFilterExpressionService.translate("ariaAdvancedFilterBuilderJoinOperator")}),this.getGui().appendChild(this.ePill.getGui()),this.addDestroyFunc(()=>this.destroyBean(this.ePill))}getDragName(){return this.advancedFilterExpressionService.parseJoinOperator(this.filterModel)}getAriaLabel(){return`${this.advancedFilterExpressionService.translate("ariaAdvancedFilterBuilderGroupItem")} ${this.getDragName()}`}getValidationMessage(){return null}getFocusableElement(){return this.ePill.getFocusableElement()}};ee([(0,V.Autowired)("advancedFilterExpressionService")],he.prototype,"advancedFilterExpressionService",2);var de=class extends B.AgRichSelect{constructor(e){super(J(Q({},e),{template:'\n                <div class="ag-picker-field ag-advanced-filter-builder-pill-wrapper" role="presentation">\n                    <div ref="eLabel"></div>\n                    <div ref="eWrapper" class="ag-wrapper ag-advanced-filter-builder-pill ag-picker-collapsed">\n                        <div ref="eDisplayField" class="ag-picker-field-display ag-advanced-filter-builder-pill-display"></div>\n                        <ag-input-text-field ref="eInput" class="ag-rich-select-field-input"></ag-input-text-field>\n                        <div ref="eIcon" class="ag-picker-field-icon" aria-hidden="true"></div>\n                    </div>\n                </div>'})),this.params=e}getFocusableElement(){return this.eWrapper}showPicker(){setTimeout(()=>super.showPicker())}hidePicker(){setTimeout(()=>super.hidePicker())}postConstruct(){super.postConstruct();const{wrapperClassName:e,ariaLabel:t}=this.params;this.eWrapper.classList.add(e),B._.setAriaLabelledBy(this.eWrapper,""),B._.setAriaLabel(this.eWrapper,t)}createPickerComponent(){var e;if(!this.values){const{values:t}=this.params.getEditorParams();this.values=t;const i=this.value.key,n=null!=(e=t.find(e=>e.key===i))?e:{key:i,displayValue:this.value.displayValue};this.value=n}return super.createPickerComponent()}onEnterKeyDown(e){B._.stopPropagationForAgGrid(e),this.isPickerDisplayed?super.onEnterKeyDown(e):(e.preventDefault(),this.showPicker())}},ue=class extends P.TabGuardComp{constructor(e,t,i){super('\n            <div class="ag-advanced-filter-builder-item-wrapper" role="presentation">\n                <div ref="eItem" class="ag-advanced-filter-builder-item" role="presentation">\n                    <div ref="eTreeLines" class="ag-advanced-filter-builder-item-tree-lines" aria-hidden="true"></div>\n                    <span ref="eDragHandle" class="ag-drag-handle" aria-hidden="true"></span>\n                    <span ref="eValidation" class="ag-advanced-filter-builder-item-button ag-advanced-filter-builder-invalid" aria-hidden="true"></span>\n                </div>\n                <div ref="eButtons" class="ag-advanced-filter-builder-item-buttons">\n                    <span ref="eMoveUpButton" class="ag-advanced-filter-builder-item-button" role="button"></span>\n                    <span ref="eMoveDownButton" class="ag-advanced-filter-builder-item-button" role="button"></span>\n                    <div ref="eAddButton" role="presentation"></div>\n                    <span ref="eRemoveButton" class="ag-advanced-filter-builder-item-button" role="button"></span>\n                </div>\n            </div>\n        '),this.item=e,this.dragFeature=t,this.focusWrapper=i,this.moveUpDisabled=!1,this.moveDownDisabled=!1}postConstruct(){const{filterModel:e,level:t,showMove:i}=this.item,n="join"===e.filterType;if(this.ePillWrapper=this.createManagedBean(n?new he:new le),this.ePillWrapper.init({item:this.item,createPill:e=>this.createPill(e)}),this.eDragHandle.insertAdjacentElement("afterend",this.ePillWrapper.getGui()),0===t){const e=document.createElement("div");e.classList.add("ag-advanced-filter-builder-item-tree-line-vertical-bottom"),e.classList.add("ag-advanced-filter-builder-item-tree-line-root"),this.eTreeLines.appendChild(e),P._.setDisplayed(this.eDragHandle,!1),P._.setDisplayed(this.eButtons,!1),P._.setAriaExpanded(this.focusWrapper,!0)}else this.setupTreeLines(t),this.eDragHandle.appendChild(P._.createIconNoSpan("advancedFilterBuilderDrag",this.gos)),this.setupValidation(),this.setupMoveButtons(i),this.setupAddButton(),this.setupRemoveButton(),this.setupDragging(),this.updateAriaExpanded();P._.setAriaLevel(this.focusWrapper,t+1),this.initialiseTabGuard({}),this.createManagedBean(new re(this.getGui(),this.focusWrapper,this.ePillWrapper)),this.updateAriaLabel(),this.addManagedListener(this.ePillWrapper,ae.EVENT_VALUE_CHANGED,()=>this.dispatchEvent({type:ae.EVENT_VALUE_CHANGED})),this.addManagedListener(this.ePillWrapper,ae.EVENT_VALID_CHANGED,()=>this.updateValidity())}setState(e){const{level:t}=this.item;if(0===t)return;const{showMove:i}=this.item,{disableMoveUp:n,disableMoveDown:s,treeLines:r,showStartTreeLine:o}=e;this.updateTreeLines(r,o),this.updateAriaExpanded(),i&&(this.moveUpDisabled=!!n,this.moveDownDisabled=!!s,this.eMoveUpButton.classList.toggle("ag-advanced-filter-builder-item-button-disabled",n),this.eMoveDownButton.classList.toggle("ag-advanced-filter-builder-item-button-disabled",s),P._.setAriaDisabled(this.eMoveUpButton,!!n),P._.setAriaDisabled(this.eMoveDownButton,!!s),this.moveUpTooltipFeature.refreshToolTip(),this.moveDownTooltipFeature.refreshToolTip())}focusMoveButton(e){(e?this.eMoveUpButton:this.eMoveDownButton).focus()}afterAdd(){this.ePillWrapper.getFocusableElement().focus()}setupTreeLines(e){for(let t=0;t<e;t++){const e=document.createElement("div");this.eTreeLines.appendChild(e)}}updateTreeLines(e,t){const i=e.length-1,{children:n}=this.eTreeLines;for(let t=0;t<i;t++){const i=n.item(t);i&&i.classList.toggle("ag-advanced-filter-builder-item-tree-line-vertical",!e[t])}const s=n.item(i);if(s){s.classList.add("ag-advanced-filter-builder-item-tree-line-horizontal");const t=e[i];s.classList.toggle("ag-advanced-filter-builder-item-tree-line-vertical-top",t),s.classList.toggle("ag-advanced-filter-builder-item-tree-line-vertical",!t)}this.eDragHandle.classList.toggle("ag-advanced-filter-builder-item-tree-line-vertical-bottom",t)}setupValidation(){this.eValidation.appendChild(P._.createIconNoSpan("advancedFilterBuilderInvalid",this.gos)),this.validationTooltipFeature=this.createManagedBean(new P.TooltipFeature({getGui:()=>this.eValidation,getLocation:()=>"advancedFilter",getTooltipValue:()=>this.ePillWrapper.getValidationMessage(),getTooltipShowDelayOverride:()=>1e3})),this.updateValidity()}setupAddButton(){var e;const t=oe(e=>this.advancedFilterExpressionService.translate(e),null==(e=this.gos.get("advancedFilterBuilderParams"))?void 0:e.addSelectWidth),i=this.createManagedBean(new ie(t));this.addManagedListener(i,P.Events.EVENT_FIELD_PICKER_VALUE_SELECTED,({value:e})=>this.dispatchEvent({type:ae.EVENT_ADDED,item:this.item,isJoin:"join"===e.key})),this.eAddButton.appendChild(i.getGui()),this.createManagedBean(new P.TooltipFeature({getGui:()=>this.eAddButton,getLocation:()=>"advancedFilter",getTooltipValue:()=>this.advancedFilterExpressionService.translate("advancedFilterBuilderAddButtonTooltip")}))}setupRemoveButton(){this.eRemoveButton.appendChild(P._.createIconNoSpan("advancedFilterBuilderRemove",this.gos)),this.addManagedListener(this.eRemoveButton,"click",()=>this.removeItem()),this.addManagedListener(this.eRemoveButton,"keydown",e=>{e.key===P.KeyCode.ENTER&&(e.preventDefault(),P._.stopPropagationForAgGrid(e),this.removeItem())}),this.createManagedBean(new P.TooltipFeature({getGui:()=>this.eRemoveButton,getLocation:()=>"advancedFilter",getTooltipValue:()=>this.advancedFilterExpressionService.translate("advancedFilterBuilderRemoveButtonTooltip")})),P._.setAriaLabel(this.eRemoveButton,this.advancedFilterExpressionService.translate("advancedFilterBuilderRemoveButtonTooltip")),this.activateTabIndex([this.eRemoveButton])}setupMoveButtons(e){e?(this.eMoveUpButton.appendChild(P._.createIconNoSpan("advancedFilterBuilderMoveUp",this.gos)),this.addManagedListener(this.eMoveUpButton,"click",()=>this.moveItem(!0)),this.addManagedListener(this.eMoveUpButton,"keydown",e=>{e.key===P.KeyCode.ENTER&&(e.preventDefault(),P._.stopPropagationForAgGrid(e),this.moveItem(!0))}),this.moveUpTooltipFeature=this.createManagedBean(new P.TooltipFeature({getGui:()=>this.eMoveUpButton,getLocation:()=>"advancedFilter",getTooltipValue:()=>this.moveUpDisabled?null:this.advancedFilterExpressionService.translate("advancedFilterBuilderMoveUpButtonTooltip")})),P._.setAriaLabel(this.eMoveUpButton,this.advancedFilterExpressionService.translate("advancedFilterBuilderMoveUpButtonTooltip")),this.eMoveDownButton.appendChild(P._.createIconNoSpan("advancedFilterBuilderMoveDown",this.gos)),this.addManagedListener(this.eMoveDownButton,"click",()=>this.moveItem(!1)),this.addManagedListener(this.eMoveDownButton,"keydown",e=>{e.key===P.KeyCode.ENTER&&(e.preventDefault(),P._.stopPropagationForAgGrid(e),this.moveItem(!1))}),this.moveDownTooltipFeature=this.createManagedBean(new P.TooltipFeature({getGui:()=>this.eMoveDownButton,getLocation:()=>"advancedFilter",getTooltipValue:()=>this.moveDownDisabled?null:this.advancedFilterExpressionService.translate("advancedFilterBuilderMoveDownButtonTooltip")})),P._.setAriaLabel(this.eMoveDownButton,this.advancedFilterExpressionService.translate("advancedFilterBuilderMoveDownButtonTooltip")),this.activateTabIndex([this.eMoveUpButton,this.eMoveDownButton])):(P._.setDisplayed(this.eMoveUpButton,!1),P._.setDisplayed(this.eMoveDownButton,!1))}updateValidity(){P._.setVisible(this.eValidation,!this.item.valid),this.validationTooltipFeature.refreshToolTip(),this.updateAriaLabel()}createPill(e){var t,i;const{key:n,displayValue:s,cssClass:r,update:o,ariaLabel:a}=e,l=e=>{null!=e&&(o(e),this.dispatchEvent({type:ae.EVENT_VALUE_CHANGED}))};if(e.isSelect){const{getEditorParams:o,pickerAriaLabelKey:c,pickerAriaLabelValue:h}=e,d=this.gos.get("advancedFilterBuilderParams"),u=`${null!=(t=null==d?void 0:d.pillSelectMinWidth)?t:140}px`,p=`${null!=(i=null==d?void 0:d.pillSelectMaxWidth)?i:200}px`,g=this.createBean(new de({pickerAriaLabelKey:c,pickerAriaLabelValue:h,pickerType:"ag-list",value:{key:n,displayValue:s},valueFormatter:e=>{var t;return null==e?null:null!=(t=e.displayValue)?t:e.key},variableWidth:!0,minPickerWidth:u,maxPickerWidth:p,getEditorParams:o,wrapperClassName:r,ariaLabel:a}));return this.addManagedListener(g,P.Events.EVENT_FIELD_PICKER_VALUE_SELECTED,({value:e})=>l(null==e?void 0:e.key)),g}{const t=this.createBean(new ce({value:s,cssClass:r,type:this.getInputType(e.baseCellDataType),ariaLabel:a}));return this.addManagedListener(t,P.Events.EVENT_FIELD_VALUE_CHANGED,({value:e})=>l(e)),t}}getInputType(e){switch(e){case"text":case"object":case"boolean":return"text";case"number":return"number";case"date":case"dateString":return"date"}}setupDragging(){const e={type:P.DragSourceType.AdvancedFilterBuilder,eElement:this.eDragHandle,dragItemName:()=>this.ePillWrapper.getDragName(),getDefaultIconName:()=>P.DragAndDropService.ICON_NOT_ALLOWED,getDragItem:()=>({}),onDragStarted:()=>this.dragFeature.dispatchEvent({type:se.EVENT_DRAG_STARTED,item:this.item}),onDragStopped:()=>this.dragFeature.dispatchEvent({type:se.EVENT_DRAG_ENDED})};this.dragAndDropService.addDragSource(e,!0),this.addDestroyFunc(()=>this.dragAndDropService.removeDragSource(e))}updateAriaLabel(){const e=this.ePillWrapper.getAriaLabel(),t=`${this.item.level+1}`,i=this.ePillWrapper.getValidationMessage();let n;n=i?this.advancedFilterExpressionService.translate("ariaAdvancedFilterBuilderItemValidation",[e,t,i]):this.advancedFilterExpressionService.translate("ariaAdvancedFilterBuilderItem",[e,t]),P._.setAriaLabel(this.focusWrapper,n)}updateAriaExpanded(){P._.removeAriaExpanded(this.focusWrapper);const{filterModel:e}=this.item;"join"===(null==e?void 0:e.filterType)&&e.conditions.length&&P._.setAriaExpanded(this.focusWrapper,!0)}removeItem(){this.dispatchEvent({type:ae.EVENT_REMOVED,item:this.item})}moveItem(e){this.dispatchEvent({type:ae.EVENT_MOVED,item:this.item,backwards:e})}};ee([(0,P.RefSelector)("eTreeLines")],ue.prototype,"eTreeLines",2),ee([(0,P.RefSelector)("eDragHandle")],ue.prototype,"eDragHandle",2),ee([(0,P.RefSelector)("eItem")],ue.prototype,"eItem",2),ee([(0,P.RefSelector)("eButtons")],ue.prototype,"eButtons",2),ee([(0,P.RefSelector)("eValidation")],ue.prototype,"eValidation",2),ee([(0,P.RefSelector)("eMoveUpButton")],ue.prototype,"eMoveUpButton",2),ee([(0,P.RefSelector)("eMoveDownButton")],ue.prototype,"eMoveDownButton",2),ee([(0,P.RefSelector)("eAddButton")],ue.prototype,"eAddButton",2),ee([(0,P.RefSelector)("eRemoveButton")],ue.prototype,"eRemoveButton",2),ee([(0,P.Autowired)("beans")],ue.prototype,"beans",2),ee([(0,P.Autowired)("dragAndDropService")],ue.prototype,"dragAndDropService",2),ee([(0,P.Autowired)("advancedFilterExpressionService")],ue.prototype,"advancedFilterExpressionService",2),ee([P.PostConstruct],ue.prototype,"postConstruct",1);var pe=class extends H.Component{constructor(e,t){super('\n            <div class="ag-advanced-filter-builder-item-wrapper" role="presentation">\n                <div ref="eItem" class="ag-advanced-filter-builder-item" role="presentation">\n                    <div class="ag-advanced-filter-builder-item-tree-lines" aria-hidden="true">\n                        <div class="ag-advanced-filter-builder-item-tree-line-vertical-top ag-advanced-filter-builder-item-tree-line-horizontal"></div>\n                    </div>\n                </div>\n            </div>\n        '),this.item=e,this.focusWrapper=t}postConstruct(){var e;H._.setAriaLevel(this.focusWrapper,2);const t=oe(e=>this.advancedFilterExpressionService.translate(e),null==(e=this.gos.get("advancedFilterBuilderParams"))?void 0:e.addSelectWidth),i=this.createManagedBean(new ie(t));this.addManagedListener(i,H.Events.EVENT_FIELD_PICKER_VALUE_SELECTED,({value:e})=>{this.dispatchEvent({type:ae.EVENT_ADDED,item:this.item,isJoin:"join"===e.key})}),this.eItem.appendChild(i.getGui()),this.createManagedBean(new H.TooltipFeature({getGui:()=>i.getGui(),getLocation:()=>"advancedFilter",getTooltipValue:()=>this.advancedFilterExpressionService.translate("advancedFilterBuilderAddButtonTooltip")})),this.createManagedBean(new re(this.getGui(),this.focusWrapper,i)),H._.setAriaLabel(this.focusWrapper,this.advancedFilterExpressionService.translate("ariaAdvancedFilterBuilderItem",[this.advancedFilterExpressionService.translate("advancedFilterBuilderAddButtonTooltip"),`${this.item.level+1}`]))}afterAdd(){}};ee([(0,H.Autowired)("beans")],pe.prototype,"beans",2),ee([(0,H.Autowired)("advancedFilterExpressionService")],pe.prototype,"advancedFilterExpressionService",2),ee([(0,H.RefSelector)("eItem")],pe.prototype,"eItem",2),ee([H.PostConstruct],pe.prototype,"postConstruct",1);var ge=class extends k.Component{constructor(){super('\n            <div role="presentation" class="ag-advanced-filter-builder" tabindex="-1">\n                <div role="presentation" class="ag-advanced-filter-builder-list" ref="eList"></div>\n                <div role="presentation" class="ag-advanced-filter-builder-button-panel">\n                    <button class="ag-button ag-standard-button ag-advanced-filter-builder-apply-button" ref="eApplyFilterButton"></button>\n                    <button class="ag-button ag-standard-button ag-advanced-filter-builder-cancel-button" ref="eCancelFilterButton"></button>\n                </div>\n            </div>'),this.validationMessage=null}postConstruct(){var e;const{showMoveButtons:t}=null!=(e=this.gos.get("advancedFilterBuilderParams"))?e:{};this.showMove=!!t,this.addManagedPropertyListener("advancedFilterBuilderParams",({currentValue:e})=>{this.showMove=!!(null==e?void 0:e.showMoveButtons),this.refreshList(!1)}),this.filterModel=this.setupFilterModel(),this.setupVirtualList(),this.dragFeature=this.createManagedBean(new se(this,this.virtualList)),this.setupButtons()}refresh(){let e=this.virtualList.getLastFocusedRow();this.setupFilterModel(),this.validateItems(),this.refreshList(!1),null!=e&&(this.virtualList.getComponentAt(e)||(e=0),this.virtualList.focusRow(e))}getNumItems(){return this.items.length}moveItem(e,t){t&&e&&this.moveItemToIndex(e,t.rowIndex,t.position)}afterGuiAttached(){this.virtualList.focusRow(0)}setupVirtualList(){this.virtualList=this.createManagedBean(new k.VirtualList({cssIdentifier:"advanced-filter-builder",ariaRole:"tree",listName:this.advancedFilterExpressionService.translate("ariaAdvancedFilterBuilderList")})),this.virtualList.setComponentCreator(this.createItemComponent.bind(this)),this.virtualList.setComponentUpdater(this.updateItemComponent.bind(this)),this.virtualList.setRowHeight(40),this.eList.appendChild(this.virtualList.getGui()),this.virtualList.setModel({getRowCount:()=>this.items.length,getRow:e=>this.items[e],areRowsEqual:(e,t)=>e===t}),this.buildList(),this.virtualList.refresh()}setupButtons(){this.eApplyFilterButton.innerText=this.advancedFilterExpressionService.translate("advancedFilterBuilderApply"),this.activateTabIndex([this.eApplyFilterButton]),this.addManagedListener(this.eApplyFilterButton,"click",()=>{this.advancedFilterService.setModel(this.filterModel),this.filterManager.onFilterChanged({source:"advancedFilter"}),this.close()}),this.validationTooltipFeature=this.createManagedBean(new k.TooltipFeature({getGui:()=>this.eApplyFilterButton,getLocation:()=>"advancedFilter",getTooltipValue:()=>this.validationMessage,getTooltipShowDelayOverride:()=>1e3})),this.validate(),this.addManagedListener(this.eApplyFilterButton,"mouseenter",()=>this.addOrRemoveCssClass("ag-advanced-filter-builder-validation",!0)),this.addManagedListener(this.eApplyFilterButton,"mouseleave",()=>this.addOrRemoveCssClass("ag-advanced-filter-builder-validation",!1)),this.eCancelFilterButton.innerText=this.advancedFilterExpressionService.translate("advancedFilterBuilderCancel"),this.activateTabIndex([this.eCancelFilterButton]),this.addManagedListener(this.eCancelFilterButton,"click",()=>this.close())}removeItemFromParent(e){const t=e.parent.conditions.indexOf(e.filterModel);return e.parent.conditions.splice(t,1),t}moveItemToIndex(e,t,i){var n;const s=this.items[t],r="join"===(null==(n=s.filterModel)?void 0:n.filterType)&&"bottom"===i,o=r?s.filterModel:s.parent;if(!o)return;if(this.isChildOrSelf(o,e.filterModel)||s===e)return;let a;this.removeItemFromParent(e),r?a=0:(a=o.conditions.indexOf(s.filterModel),-1===a?a=o.conditions.length:"bottom"===i&&(a+=1)),o.conditions.splice(a,0,e.filterModel),this.refreshList(!1)}isChildOrSelf(e,t){return e===t||"join"===t.filterType&&t.conditions.some(t=>this.isChildOrSelf(e,t))}setupFilterModel(){const e=this.formatFilterModel(this.advancedFilterService.getModel());return this.stringifiedModel=JSON.stringify(e),e}formatFilterModel(e){return"join"!==(e=null!=e?e:{filterType:"join",type:"AND",conditions:[]}).filterType&&(e={filterType:"join",type:"AND",conditions:[e]}),e}buildList(){const e=(t,i,n,s)=>{i.push({filterModel:t,level:n,parent:s,valid:!0,showMove:this.showMove}),"join"===t.filterType&&(t.conditions.forEach(s=>e(s,i,n+1,t)),0===n&&i.push({filterModel:null,level:n+1,parent:t,valid:!0}))};this.items=[],e(this.filterModel,this.items,0)}refreshList(e){if(!e){const e=[];this.items.forEach(t=>{t.valid||e.push(t.filterModel)}),this.buildList(),e.length&&this.items.forEach(t=>{t.filterModel&&e.includes(t.filterModel)&&(t.valid=!1)})}this.virtualList.refresh(e),this.validate()}updateItemComponent(e,t){const i=this.items.indexOf(e),n=(e,t)=>{const i=this.items.find(t=>t.filterModel===e),s=null==i?void 0:i.parent;if(s){const{conditions:i}=s;n(s,t),t.push(i[i.length-1]===e)}},s=[],{filterModel:r}=e;r&&(n(r,s),s[0]=!1);const o="join"===(null==r?void 0:r.filterType)&&!!r.conditions.length;t.setState({disableMoveUp:1===i,disableMoveDown:!this.canMoveDown(e,i),treeLines:s,showStartTreeLine:o})}createItemComponent(e,t){const i=this.createBean(e.filterModel?new ue(e,this.dragFeature,t):new pe(e,t));return i.addManagedListener(i,ae.EVENT_REMOVED,({item:e})=>this.removeItem(e)),i.addManagedListener(i,ae.EVENT_VALUE_CHANGED,()=>this.validate()),i.addManagedListener(i,ae.EVENT_ADDED,({item:e,isJoin:t})=>this.addItem(e,t)),i.addManagedListener(i,ae.EVENT_MOVED,({item:e,backwards:t})=>this.moveItemUpDown(e,t)),i instanceof ue&&this.updateItemComponent(e,i),i}addItem(e,t){var i;const{parent:n,level:s,filterModel:r}=e,o="join"===(null==r?void 0:r.filterType),a=t?{filterType:"join",type:"AND",conditions:[]}:{},l=o?r:n;let c=o?0:l.conditions.indexOf(r);c>=0?(o||(c+=1),l.conditions.splice(c,0,a)):l.conditions.push(a);let h=this.items.indexOf(e);const d=h>=0;if(d){e.filterModel&&h++;const i=[{filterModel:a,level:o?s+1:s,parent:l,valid:t,showMove:this.showMove}];this.items.splice(h,0,...i)}this.refreshList(d),d&&(null==(i=this.virtualList.getComponentAt(h))||i.afterAdd())}removeItem(e){var t;const i=e.parent,{filterModel:n}=e,s=i.conditions.indexOf(n);i.conditions.splice(s,1);const r="join"===(null==(t=e.filterModel)?void 0:t.filterType),o=this.items.indexOf(e),a=!r&&o>=0;a&&this.items.splice(o,1),this.refreshList(a),o>=0&&this.virtualList.focusRow(o)}moveItemUpDown(e,t){const i=this.items.indexOf(e),n=t?i-1:i+1;if(0===n||!t&&!this.canMoveDown(e,i))return;const s=this.items[n],r=this.removeItemFromParent(e),{level:o,filterModel:a,parent:l}=e,{level:c,filterModel:h,parent:d}=s;if(t)if(c===o&&"join"===h.filterType)h.conditions.push(a);else if(c<=o){const e=d.conditions.indexOf(h);d.conditions.splice(e,0,a)}else l.conditions[r-1].conditions.push(a);else if(c===o)if("join"===h.filterType)h.conditions.splice(0,0,a);else{const e=d.conditions.indexOf(h);d.conditions.splice(e+1,0,a)}else if(r<l.conditions.length)l.conditions.splice(r+1,0,a);else{const e=this.items.find(e=>e.filterModel===l),t=e.parent.conditions.indexOf(e.filterModel)+1;e.parent.conditions.splice(t,0,a)}this.refreshList(!1);const u=this.items.findIndex(({filterModel:e})=>e===a);if(u>=0){const e=this.virtualList.getComponentAt(u);e instanceof ue&&e.focusMoveButton(t)}}canMoveDown(e,t){return!(1===e.level&&t===this.items.length-2||1===e.level&&e.parent.conditions[e.parent.conditions.length-1]===e.filterModel)}close(){this.advancedFilterService.getCtrl().toggleFilterBuilder("ui")}validate(){let e=!this.items.every(({valid:e})=>e);e?this.validationMessage=this.advancedFilterExpressionService.translate("advancedFilterBuilderValidationIncomplete"):(e=JSON.stringify(this.filterModel)===this.stringifiedModel,this.validationMessage=e?this.advancedFilterExpressionService.translate("advancedFilterBuilderValidationAlreadyApplied"):null),k._.setDisabled(this.eApplyFilterButton,e),this.validationTooltipFeature.refreshToolTip()}validateItems(){const e=e=>{e.type=void 0},t=e=>{delete e.filter};this.items.forEach(i=>{if(!i.valid||!i.filterModel||"join"===i.filterModel.filterType)return;const{filterModel:n}=i,{colId:s}=n,r=this.advancedFilterExpressionService.getColumnAutocompleteEntries().find(({key:e})=>e===s),o=this.advancedFilterExpressionService.getColumnDetails(n.colId);if(!r||!o.column)return i.valid=!1,n.colId=void 0,e(n),void t(n);const a=this.advancedFilterExpressionService.getDataTypeExpressionOperator(o.baseCellDataType).operators[n.type];if(!a)return i.valid=!1,e(n),void t(n);a.numOperands>0&&!k._.exists(n.filter)&&(i.valid=!1)})}};ee([(0,k.RefSelector)("eList")],ge.prototype,"eList",2),ee([(0,k.RefSelector)("eApplyFilterButton")],ge.prototype,"eApplyFilterButton",2),ee([(0,k.RefSelector)("eCancelFilterButton")],ge.prototype,"eCancelFilterButton",2),ee([(0,k.Autowired)("filterManager")],ge.prototype,"filterManager",2),ee([(0,k.Autowired)("advancedFilterService")],ge.prototype,"advancedFilterService",2),ee([(0,k.Autowired)("advancedFilterExpressionService")],ge.prototype,"advancedFilterExpressionService",2),ee([(0,k.Autowired)("beans")],ge.prototype,"beans",2),ee([k.PostConstruct],ge.prototype,"postConstruct",1);var fe=class e extends R.BeanStub{constructor(e){super(),this.enabled=e}postConstruct(){this.hasAdvancedFilterParent=!!this.gos.get("advancedFilterParent"),this.ctrlsService.whenReady(()=>this.setAdvancedFilterComp()),this.addManagedListener(this.eventService,R.Events.EVENT_ADVANCED_FILTER_ENABLED_CHANGED,({enabled:e})=>this.onEnabledChanged(e)),this.addManagedPropertyListener("advancedFilterParent",()=>this.updateComps()),this.addDestroyFunc(()=>{this.destroyAdvancedFilterComp(),this.destroyBean(this.eBuilderComp),this.eBuilderDialog&&this.eBuilderDialog.isAlive()&&this.destroyBean(this.eBuilderDialog)})}setupHeaderComp(e){this.eHeaderComp=this.createManagedBean(new te(this.enabled&&!this.hasAdvancedFilterParent)),e.insertAdjacentElement("beforebegin",this.eHeaderComp.getGui())}focusHeaderComp(){return!!this.eHeaderComp&&(this.eHeaderComp.getFocusableElement().focus(),!0)}refreshComp(){var e,t;null==(e=this.eFilterComp)||e.refresh(),null==(t=this.eHeaderComp)||t.refresh()}refreshBuilderComp(){var e;null==(e=this.eBuilderComp)||e.refresh()}getHeaderHeight(){var e,t;return null!=(t=null==(e=this.eHeaderComp)?void 0:e.getHeight())?t:0}setInputDisabled(e){var t,i;null==(t=this.eFilterComp)||t.setInputDisabled(e),null==(i=this.eHeaderComp)||i.setInputDisabled(e)}toggleFilterBuilder(t,i){if(i&&this.eBuilderDialog||!1===i&&!this.eBuilderDialog)return;if(this.eBuilderDialog)return this.builderDestroySource=t,void this.destroyBean(this.eBuilderDialog);this.setInputDisabled(!0);const{width:n,height:s,minWidth:r}=this.getBuilderDialogSize();this.eBuilderComp=this.createBean(new ge),this.eBuilderDialog=this.createBean(new R.AgDialog({title:this.advancedFilterExpressionService.translate("advancedFilterBuilderTitle"),component:this.eBuilderComp,width:n,height:s,resizable:!0,movable:!0,maximizable:!0,centered:!0,closable:!0,minWidth:r,afterGuiAttached:()=>{var e;return null==(e=this.eBuilderComp)?void 0:e.afterGuiAttached()}})),this.dispatchFilterBuilderVisibleChangedEvent(t,!0),this.eBuilderDialog.addEventListener(R.AgDialog.EVENT_DESTROYED,()=>{var t;this.destroyBean(this.eBuilderComp),this.eBuilderComp=void 0,this.eBuilderDialog=void 0,this.setInputDisabled(!1),this.dispatchEvent({type:e.EVENT_BUILDER_CLOSED}),this.dispatchFilterBuilderVisibleChangedEvent(null!=(t=this.builderDestroySource)?t:"ui",!1),this.builderDestroySource=void 0})}dispatchFilterBuilderVisibleChangedEvent(e,t){const i={type:R.Events.EVENT_ADVANCED_FILTER_BUILDER_VISIBLE_CHANGED,source:e,visible:t};this.eventService.dispatchEvent(i)}getBuilderDialogSize(){var e,t;const i=null!=(t=null==(e=this.gos.get("advancedFilterBuilderParams"))?void 0:e.minWidth)?t:500,n=this.popupService.getPopupParent(),s=Math.round(R._.getAbsoluteWidth(n))-2,r=Math.round(.75*R._.getAbsoluteHeight(n))-2;return{width:Math.min(Math.max(600,i),s),height:Math.min(600,r),minWidth:i}}onEnabledChanged(e){this.enabled=e,this.updateComps()}updateComps(){this.setAdvancedFilterComp(),this.setHeaderCompEnabled(),this.eventService.dispatchEvent({type:R.Events.EVENT_HEADER_HEIGHT_CHANGED})}setAdvancedFilterComp(){if(this.destroyAdvancedFilterComp(),!this.enabled)return;const e=this.gos.get("advancedFilterParent");if(this.hasAdvancedFilterParent=!!e,e){const t=this.createBean(new ve),i=t.getGui(),{allThemes:n}=this.environment.getTheme();n.length&&i.classList.add(...n),i.classList.add(this.gos.get("enableRtl")?"ag-rtl":"ag-ltr"),e.appendChild(i),this.eFilterComp=t}}setHeaderCompEnabled(){var e;null==(e=this.eHeaderComp)||e.setEnabled(this.enabled&&!this.hasAdvancedFilterParent)}destroyAdvancedFilterComp(){this.eFilterComp&&(R._.removeFromParent(this.eFilterComp.getGui()),this.destroyBean(this.eFilterComp))}};fe.EVENT_BUILDER_CLOSED="advancedFilterBuilderClosed",ee([(0,R.Autowired)("focusService")],fe.prototype,"focusService",2),ee([(0,R.Autowired)("ctrlsService")],fe.prototype,"ctrlsService",2),ee([(0,R.Autowired)("popupService")],fe.prototype,"popupService",2),ee([(0,R.Autowired)("advancedFilterExpressionService")],fe.prototype,"advancedFilterExpressionService",2),ee([R.PostConstruct],fe.prototype,"postConstruct",1);var me=fe,ve=class extends I.Component{constructor(){super('\n            <div class="ag-advanced-filter" role="presentation" tabindex="-1">\n                <ag-autocomplete ref="eAutocomplete"></ag-autocomplete>\n                <button class="ag-button ag-standard-button ag-advanced-filter-apply-button" ref="eApplyFilterButton"></button>\n                <button class="ag-advanced-filter-builder-button" ref="eBuilderFilterButton">\n                    <span ref="eBuilderFilterButtonIcon" aria-hidden="true"></span>\n                    <span class="ag-advanced-filter-builder-button-label" ref="eBuilderFilterButtonLabel"></span>\n                </button>\n            </div>'),this.expressionParser=null,this.isApplyDisabled=!0,this.builderOpen=!1}postConstruct(){this.eAutocomplete.setListGenerator((e,t)=>this.generateAutocompleteListParams(t)).setValidator(()=>this.validateValue()).setForceLastSelection((e,t)=>this.forceLastSelection(e,t)).setInputAriaLabel(this.advancedFilterExpressionService.translate("ariaAdvancedFilterInput")).setListAriaLabel(this.advancedFilterExpressionService.translate("ariaLabelAdvancedFilterAutocomplete")),this.refresh(),this.addManagedListener(this.eAutocomplete,I.AgAutocomplete.EVENT_VALUE_CHANGED,({value:e})=>this.onValueChanged(e)),this.addManagedListener(this.eAutocomplete,I.AgAutocomplete.EVENT_VALUE_CONFIRMED,({isValid:e})=>this.onValueConfirmed(e)),this.addManagedListener(this.eAutocomplete,I.AgAutocomplete.EVENT_OPTION_SELECTED,({position:e,updateEntry:t,autocompleteType:i})=>this.onOptionSelected(e,t,i)),this.addManagedListener(this.eAutocomplete,I.AgAutocomplete.EVENT_VALID_CHANGED,({isValid:e,validationMessage:t})=>this.onValidChanged(e,t)),this.setupApplyButton(),this.setupBuilderButton()}refresh(){const e=this.advancedFilterService.getExpressionDisplayValue();this.eAutocomplete.setValue({value:null!=e?e:"",position:null==e?void 0:e.length,updateListOnlyIfOpen:!0})}setInputDisabled(e){this.eAutocomplete.setInputDisabled(e),I._.setDisabled(this.eApplyFilterButton,e||this.isApplyDisabled)}getTooltipParams(){const e=super.getTooltipParams();return e.location="advancedFilter",e}setupApplyButton(){this.eApplyFilterButton.innerText=this.advancedFilterExpressionService.translate("advancedFilterApply"),this.activateTabIndex([this.eApplyFilterButton]),this.addManagedListener(this.eApplyFilterButton,"click",()=>this.onValueConfirmed(this.eAutocomplete.isValid())),I._.setDisabled(this.eApplyFilterButton,this.isApplyDisabled)}setupBuilderButton(){this.eBuilderFilterButtonIcon.appendChild(I._.createIconNoSpan("advancedFilterBuilder",this.gos)),this.eBuilderFilterButtonLabel.innerText=this.advancedFilterExpressionService.translate("advancedFilterBuilder"),this.activateTabIndex([this.eBuilderFilterButton]),this.addManagedListener(this.eBuilderFilterButton,"click",()=>this.openBuilder()),this.addManagedListener(this.advancedFilterService.getCtrl(),me.EVENT_BUILDER_CLOSED,()=>this.closeBuilder())}onValueChanged(e){var t;e=I._.makeNull(e),this.advancedFilterService.setExpressionDisplayValue(e),this.expressionParser=this.advancedFilterService.createExpressionParser(e);const i=null==(t=this.expressionParser)?void 0:t.parseExpression();i&&i!==e&&this.eAutocomplete.setValue({value:i,silent:!0,restoreFocus:!0})}onValueConfirmed(e){e&&!this.isApplyDisabled&&(I._.setDisabled(this.eApplyFilterButton,!0),this.advancedFilterService.applyExpression(),this.filterManager.onFilterChanged({source:"advancedFilter"}))}onOptionSelected(e,t,i){const{updatedValue:n,updatedPosition:s,hideAutocomplete:r}=this.updateExpression(e,t,i);this.eAutocomplete.setValue({value:n,position:s,updateListOnlyIfOpen:r,restoreFocus:!0})}validateValue(){var e,t,i;return(null==(e=this.expressionParser)?void 0:e.isValid())?null:null!=(i=null==(t=this.expressionParser)?void 0:t.getValidationMessage())?i:null}onValidChanged(e,t){this.isApplyDisabled=!e||this.advancedFilterService.isCurrentExpressionApplied(),I._.setDisabled(this.eApplyFilterButton,this.isApplyDisabled),this.setTooltip({newTooltipText:t,showDelayOverride:1e3})}generateAutocompleteListParams(e){return this.expressionParser?this.expressionParser.getAutocompleteListParams(e):this.advancedFilterExpressionService.getDefaultAutocompleteListParams("")}updateExpression(e,t,i){var n,s;return this.advancedFilterExpressionService.updateAutocompleteCache(t,i),null!=(s=null==(n=this.expressionParser)?void 0:n.updateExpression(e,t,i))?s:this.advancedFilterService.getDefaultExpression(t)}forceLastSelection({key:e,displayValue:t},i){return!!i.toLocaleLowerCase().match(`^${(null!=t?t:e).toLocaleLowerCase()}\\s*$`)}openBuilder(){this.builderOpen||(this.builderOpen=!0,I._.setDisabled(this.eBuilderFilterButton,!0),this.advancedFilterService.getCtrl().toggleFilterBuilder("ui"))}closeBuilder(){this.builderOpen&&(this.builderOpen=!1,I._.setDisabled(this.eBuilderFilterButton,!1),this.eBuilderFilterButton.focus())}};ee([(0,I.RefSelector)("eAutocomplete")],ve.prototype,"eAutocomplete",2),ee([(0,I.RefSelector)("eApplyFilterButton")],ve.prototype,"eApplyFilterButton",2),ee([(0,I.RefSelector)("eBuilderFilterButton")],ve.prototype,"eBuilderFilterButton",2),ee([(0,I.RefSelector)("eBuilderFilterButtonIcon")],ve.prototype,"eBuilderFilterButtonIcon",2),ee([(0,I.RefSelector)("eBuilderFilterButtonLabel")],ve.prototype,"eBuilderFilterButtonLabel",2),ee([(0,I.Autowired)("advancedFilterService")],ve.prototype,"advancedFilterService",2),ee([(0,I.Autowired)("advancedFilterExpressionService")],ve.prototype,"advancedFilterExpressionService",2),ee([(0,I.Autowired)("filterManager")],ve.prototype,"filterManager",2),ee([I.PostConstruct],ve.prototype,"postConstruct",1);var ye={ariaAdvancedFilterBuilderItem:e=>`${e[0]}. Level ${e[1]}. Press ENTER to edit.`,ariaAdvancedFilterBuilderItemValidation:e=>`${e[0]}. Level ${e[1]}. ${e[2]} Press ENTER to edit.`,ariaAdvancedFilterBuilderList:"Advanced Filter Builder List",ariaAdvancedFilterBuilderFilterItem:"Filter Condition",ariaAdvancedFilterBuilderGroupItem:"Filter Group",ariaAdvancedFilterBuilderColumn:"Column",ariaAdvancedFilterBuilderOption:"Option",ariaAdvancedFilterBuilderValue:"Value",ariaAdvancedFilterBuilderJoinOperator:"Join Operator",ariaAdvancedFilterInput:"Advanced Filter Input",ariaLabelAdvancedFilterAutocomplete:"Advanced Filter Autocomplete",advancedFilterContains:"contains",advancedFilterNotContains:"does not contain",advancedFilterTextEquals:"equals",advancedFilterTextNotEqual:"does not equal",advancedFilterStartsWith:"begins with",advancedFilterEndsWith:"ends with",advancedFilterBlank:"is blank",advancedFilterNotBlank:"is not blank",advancedFilterEquals:"=",advancedFilterNotEqual:"!=",advancedFilterGreaterThan:">",advancedFilterGreaterThanOrEqual:">=",advancedFilterLessThan:"<",advancedFilterLessThanOrEqual:"<=",advancedFilterTrue:"is true",advancedFilterFalse:"is false",advancedFilterAnd:"AND",advancedFilterOr:"OR",advancedFilterApply:"Apply",advancedFilterBuilder:"Builder",advancedFilterValidationMissingColumn:"Column is missing",advancedFilterValidationMissingOption:"Option is missing",advancedFilterValidationMissingValue:"Value is missing",advancedFilterValidationInvalidColumn:"Column not found",advancedFilterValidationInvalidOption:"Option not found",advancedFilterValidationMissingQuote:"Value is missing an end quote",advancedFilterValidationNotANumber:"Value is not a number",advancedFilterValidationInvalidDate:"Value is not a valid date",advancedFilterValidationMissingCondition:"Condition is missing",advancedFilterValidationJoinOperatorMismatch:"Join operators within a condition must be the same",advancedFilterValidationInvalidJoinOperator:"Join operator not found",advancedFilterValidationMissingEndBracket:"Missing end bracket",advancedFilterValidationExtraEndBracket:"Too many end brackets",advancedFilterValidationMessage:e=>`Expression has an error. ${e[0]} - ${e[1]}.`,advancedFilterValidationMessageAtEnd:e=>`Expression has an error. ${e[0]} at end of expression.`,advancedFilterBuilderTitle:"Advanced Filter",advancedFilterBuilderApply:"Apply",advancedFilterBuilderCancel:"Cancel",advancedFilterBuilderAddButtonTooltip:"Add Filter or Group",advancedFilterBuilderRemoveButtonTooltip:"Remove",advancedFilterBuilderMoveUpButtonTooltip:"Move Up",advancedFilterBuilderMoveDownButtonTooltip:"Move Down",advancedFilterBuilderAddJoin:"Add Group",advancedFilterBuilderAddCondition:"Add Filter",advancedFilterBuilderSelectColumn:"Select a column",advancedFilterBuilderSelectOption:"Select an option",advancedFilterBuilderEnterValue:"Enter a value...",advancedFilterBuilderValidationAlreadyApplied:"Current filter already applied.",advancedFilterBuilderValidationIncomplete:"Not all conditions are complete.",advancedFilterBuilderValidationSelectColumn:"Must select a column.",advancedFilterBuilderValidationSelectOption:"Must select an option.",advancedFilterBuilderValidationEnterValue:"Must enter a value."};function Ce(e,t,i){if(!e)return"";const n=i-t;return n?e.slice(0,e.length-n):e}function be(e,t,i,n,s,r,o){const a=i+(!e.length||o?0:1);let l=0;return s&&(" "===e[a]?l=1:(n+=" ",r&&(n+='"'))),{updatedValue:e.slice(0,t)+n+e.slice(a),updatedPosition:t+n.length+l}}function Se(e,t,i,n){let s=t,r=!1;for(;s<e.length;){const t=e[s];if("("===t){n&&" "===e[s-1]?r=!0:s-=1;break}if(" "===t||i&&")"===t){s-=1;break}s++}return{endPosition:s,isEmpty:r}}function we(e,t,i,n){i!==t&&(e.expression=be(e.expression,n-t.length+1,n,i).updatedValue)}var xe=class{constructor(e,t){this.params=e,this.startPosition=t,this.type="column",this.valid=!0,this.hasStartChar=!1,this.hasEndChar=!1,this.colName=""}parse(e,t){if(e!==Ae.COL_START_CHAR||this.colName)if(e===Ae.COL_END_CHAR&&this.hasStartChar){if(this.parseColumn(!1,t))return this.hasEndChar=!0,!1;this.colName+=e}else this.colName+=e;else this.hasStartChar=!0}getDisplayValue(){return(this.hasStartChar?Ae.COL_START_CHAR:"")+this.colName+(this.hasEndChar?Ae.COL_END_CHAR:"")}getColId(){return this.colId}complete(e){this.parseColumn(!0,e)}getValidationError(){var e;return this.valid?null:{message:this.params.advancedFilterExpressionService.translate("advancedFilterValidationInvalidColumn"),startPosition:this.startPosition,endPosition:null!=(e=this.endPosition)?e:this.params.expression.length-1}}parseColumn(e,t){var i;this.endPosition=t;const n=this.params.advancedFilterExpressionService.getColId(this.colName);return n&&this.hasStartChar&&(this.colId=n.colId,we(this.params,this.colName,n.columnName,t-1),this.colName=n.columnName,this.column=this.params.columnModel.getPrimaryColumn(this.colId),this.column)?(this.baseCellDataType=null!=(i=this.params.dataTypeService.getBaseDataType(this.column))?i:"text",!0):(e&&(this.valid=!1),this.baseCellDataType="text",!1)}},Ee=class{constructor(e,t,i){this.params=e,this.startPosition=t,this.baseCellDataType=i,this.type="operator",this.valid=!0,this.expectedNumOperands=0,this.operator=""}parse(e,t){if(" "===e||")"===e){if(this.parseOperator(!1,t-1))return!0;this.operator+=e}else this.operator+=e}complete(e){this.parseOperator(!0,e)}getValidationError(){var e;return this.valid?null:{message:this.params.advancedFilterExpressionService.translate("advancedFilterValidationInvalidOption"),startPosition:this.startPosition,endPosition:null!=(e=this.endPosition)?e:this.params.expression.length-1}}getDisplayValue(){return this.operator}getOperatorKey(){return this.parsedOperator}parseOperator(e,t){const i=this.params.advancedFilterExpressionService.getDataTypeExpressionOperator(this.baseCellDataType),n=i.findOperator(this.operator);if(this.endPosition=t,n){this.parsedOperator=n;const e=i.operators[n];this.expectedNumOperands=e.numOperands;const s=e.displayValue;return we(this.params,this.operator,s,t),this.operator=s,!0}return!e&&null===n||(this.valid=!1),!1}},Me=class{constructor(e,t,i,n){this.params=e,this.startPosition=t,this.baseCellDataType=i,this.column=n,this.type="operand",this.valid=!0,this.operand="",this.validationMessage=null}parse(e,t){if(" "===e){if(!this.quotes)return this.parseOperand(!1,t),!0;this.operand+=e}else if(")"===e){if("number"===this.baseCellDataType||!this.quotes)return this.parseOperand(!1,t-1),!0;this.operand+=e}else if(this.operand||this.quotes||"'"!==e&&'"'!==e){if(this.quotes&&e===this.quotes)return this.parseOperand(!1,t),!1;this.operand+=e}else this.quotes=e}complete(e){this.parseOperand(!0,e)}getValidationError(){var e;return this.validationMessage?{message:this.validationMessage,startPosition:this.startPosition,endPosition:null!=(e=this.endPosition)?e:this.params.expression.length-1}:null}getRawValue(){return this.operand}getModelValue(){return this.modelValue}parseOperand(e,t){const{advancedFilterExpressionService:i}=this.params;if(this.endPosition=t,this.modelValue=this.operand,e&&this.quotes)this.valid=!1,this.validationMessage=i.translate("advancedFilterValidationMissingQuote");else if(""===this.modelValue)this.valid=!1,this.validationMessage=i.translate("advancedFilterValidationMissingValue");else{const e=i.getOperandModelValue(this.operand,this.baseCellDataType,this.column);switch(null!=e&&(this.modelValue=e),this.baseCellDataType){case"number":(this.quotes||isNaN(this.modelValue))&&(this.valid=!1,this.validationMessage=i.translate("advancedFilterValidationNotANumber"));break;case"date":case"dateString":null==e&&(this.valid=!1,this.validationMessage=i.translate("advancedFilterValidationInvalidDate"))}}}},Ae=class{constructor(e,t){this.params=e,this.startPosition=t,this.isAwaiting=!0}parseExpression(){var e,t;let i=this.startPosition;const{expression:n}=this.params;for(;i<n.length;){const e=n[i];if(" "===e&&this.isAwaiting);else{if(this.isAwaiting=!1,!this.parser){let e;this.columnParser?this.operatorParser?(this.operandParser=new Me(this.params,i,this.columnParser.baseCellDataType,this.columnParser.column),e=this.operandParser):(this.operatorParser=new Ee(this.params,i,this.columnParser.baseCellDataType),e=this.operatorParser):(this.columnParser=new xe(this.params,i),e=this.columnParser),this.parser=e}const t=this.parser.parse(e,i);if(null!=t){if(this.isComplete())return this.returnEndPosition(t?i-1:i,!0);this.parser=void 0,this.isAwaiting=!0}}i++}return null==(t=null==(e=this.parser)?void 0:e.complete)||t.call(e,i-1),this.returnEndPosition(i)}isValid(){return this.isComplete()&&this.columnParser.valid&&this.operatorParser.valid&&(!this.operandParser||this.operandParser.valid)}getValidationError(){var e,t,i,n,s;const r=null!=(s=null!=(i=null==(e=this.columnParser)?void 0:e.getValidationError())?i:null==(t=this.operatorParser)?void 0:t.getValidationError())?s:null==(n=this.operandParser)?void 0:n.getValidationError();if(r)return r;const o=this.params.expression.length;let a;return this.columnParser?this.operatorParser?this.operatorParser.expectedNumOperands&&!this.operandParser&&(a="advancedFilterValidationMissingValue"):a="advancedFilterValidationMissingOption":a="advancedFilterValidationMissingColumn",a?{message:this.params.advancedFilterExpressionService.translate(a),startPosition:o,endPosition:o}:null}getFunctionString(e){return this.getFunctionCommon(e,(e,t,i,n)=>`params.operators[${t}].evaluator(expressionProxy.getValue('${i.replace(/(['"])/,"\\$1")}', node), node, params.evaluatorParams[${n}]${null==e?"":`, params.operands[${e}]`})`)}getFunctionParsed(e){return this.getFunctionCommon(e,(e,t,i,n)=>(s,r,o)=>o.operators[t].evaluator(s.getValue(i,r),r,o.evaluatorParams[n],null==e?void 0:o.operands[e]))}getAutocompleteListParams(e){return this.isColumnPosition(e)?this.getColumnAutocompleteListParams(e):this.isOperatorPosition(e)?this.getOperatorAutocompleteListParams(e):this.isBeyondEndPosition(e)?void 0:{enabled:!1}}updateExpression(e,t,i){var n,s,r,o,a;const{expression:l}=this.params;if(this.isColumnPosition(e))return be(this.params.expression,this.startPosition,(null==(n=this.columnParser)?void 0:n.getColId())?this.columnParser.endPosition:Se(l,e).endPosition,this.params.advancedFilterExpressionService.getColumnValue(t),!0);if(this.isOperatorPosition(e)){const n=this.getBaseCellDataTypeFromOperatorAutocompleteType(i),c=this.hasOperand(n,t.key),h=c&&this.doesOperandNeedQuotes(n);let d;if(null!=(null==(s=this.operatorParser)?void 0:s.startPosition)&&e<this.operatorParser.startPosition)d=be(l,e,e,null!=(r=t.displayValue)?r:t.key,c,h);else{let i,n=!1;if(null==(o=this.operatorParser)?void 0:o.getOperatorKey())i=this.operatorParser.endPosition;else{const{endPosition:t,isEmpty:s}=Se(l,e,!0,!0);i=t,n=s}d=be(l,function(e,t,i){let n=t;for(;n<i&&" "===e[n];)n++;return n}(l,this.columnParser.endPosition+1,i),i,null!=(a=t.displayValue)?a:t.key,c,h,n)}return J(Q({},d),{hideAutocomplete:!c})}return null}getModel(){const e=this.columnParser.getColId(),t={filterType:this.columnParser.baseCellDataType,colId:e,type:this.operatorParser.getOperatorKey()};return this.operatorParser.expectedNumOperands&&(t.filter=this.operandParser.getModelValue()),t}getFunctionCommon(e,t){var i,n;const s=this.columnParser.getColId(),r=null==(i=this.operatorParser)?void 0:i.getOperatorKey(),{operators:o,evaluatorParams:a,operands:l}=e,c=this.params.advancedFilterExpressionService.getExpressionOperator(this.columnParser.baseCellDataType,r),h=this.addToListAndGetIndex(o,c),d=this.params.advancedFilterExpressionService.getExpressionEvaluatorParams(s),u=this.addToListAndGetIndex(a,d);return t(0===(null==(n=this.operatorParser)?void 0:n.expectedNumOperands)?void 0:this.addToListAndGetIndex(l,this.getOperandValue()),h,s,u)}getOperandValue(){let e=this.operandParser.getRawValue();const{baseCellDataType:t,column:i}=this.columnParser;switch(t){case"number":e=Number(e);break;case"date":case"dateString":e=this.params.valueService.parseValue(i,null,e,void 0)}return"dateString"===t?this.params.dataTypeService.getDateParserFunction(i)(e):e}isComplete(){return!(!this.operatorParser||!(!this.operatorParser.expectedNumOperands||this.operatorParser.expectedNumOperands&&this.operandParser))}isColumnPosition(e){return!this.columnParser||null==this.columnParser.endPosition||e<=this.columnParser.endPosition+1}isOperatorPosition(e){return!this.operatorParser||null==this.operatorParser.endPosition||e<=this.operatorParser.endPosition+1}isBeyondEndPosition(e){return this.isComplete()&&null!=this.endPosition&&e>this.endPosition+1&&this.endPosition+1<this.params.expression.length}returnEndPosition(e,t){return this.endPosition=t?e:e-1,e}getColumnAutocompleteListParams(e){return this.params.advancedFilterExpressionService.generateAutocompleteListParams(this.params.advancedFilterExpressionService.getColumnAutocompleteEntries(),"column",this.getColumnSearchString(e))}getColumnSearchString(e){var t,i,n,s,r;const o=null!=(i=null==(t=this.columnParser)?void 0:t.getDisplayValue())?i:"",a=Ce(o,e,null==(null==(n=this.columnParser)?void 0:n.endPosition)?this.params.expression.length:this.columnParser.endPosition+1),l=(null==(s=this.columnParser)?void 0:s.hasStartChar)&&a.length>0,c=(null==(r=this.columnParser)?void 0:r.hasEndChar)&&a.length===o.length+2;return l?a.slice(1,c?-1:void 0):a}getOperatorAutocompleteListParams(e){var t,i,n,s,r;const o=null==(t=this.columnParser)?void 0:t.column;if(!o)return{enabled:!1};const a=this.columnParser.baseCellDataType,l=null!=(null==(i=this.operatorParser)?void 0:i.startPosition)&&e<this.operatorParser.startPosition?"":Ce(null!=(s=null==(n=this.operatorParser)?void 0:n.getDisplayValue())?s:"",e,null==(null==(r=this.operatorParser)?void 0:r.endPosition)?this.params.expression.length:this.operatorParser.endPosition+1);return this.params.advancedFilterExpressionService.generateAutocompleteListParams(this.params.advancedFilterExpressionService.getOperatorAutocompleteEntries(o,a),`operator-${a}`,l)}getBaseCellDataTypeFromOperatorAutocompleteType(e){return null==e?void 0:e.replace("operator-","")}hasOperand(e,t){var i,n;return!e||!t||(null!=(n=null==(i=this.params.advancedFilterExpressionService.getExpressionOperator(e,t))?void 0:i.numOperands)?n:0)>0}doesOperandNeedQuotes(e){return"number"!==e}addToListAndGetIndex(e,t){const i=e.length;return e.push(t),i}};function Te(e,t,i){let n=!1;const s=e.toLocaleLowerCase(),r=s+" ",o=Object.entries(t).find(([e,t])=>{const o=i(t).toLocaleLowerCase();return o.startsWith(r)&&(n=!0),o===s});return o?o[0]:n?null:void 0}function De(e,t){return(null!=t?t:Object.keys(e)).map(t=>({key:t,displayValue:e[t].displayValue}))}Ae.COL_START_CHAR="[",Ae.COL_END_CHAR="]";var Ie=class{constructor(e){this.params=e,this.initOperators()}getEntries(e){return De(this.operators,e)}findOperator(e){return Te(e,this.operators,({displayValue:e})=>e)}initOperators(){const{translate:e}=this.params;this.operators={contains:{displayValue:e("advancedFilterContains"),evaluator:(e,t,i,n)=>this.evaluateExpression(e,t,i,n,!1,(e,t)=>e.includes(t)),numOperands:1},notContains:{displayValue:e("advancedFilterNotContains"),evaluator:(e,t,i,n)=>this.evaluateExpression(e,t,i,n,!0,(e,t)=>!e.includes(t)),numOperands:1},equals:{displayValue:e("advancedFilterTextEquals"),evaluator:(e,t,i,n)=>this.evaluateExpression(e,t,i,n,!1,(e,t)=>e===t),numOperands:1},notEqual:{displayValue:e("advancedFilterTextNotEqual"),evaluator:(e,t,i,n)=>this.evaluateExpression(e,t,i,n,!0,(e,t)=>e!=t),numOperands:1},startsWith:{displayValue:e("advancedFilterStartsWith"),evaluator:(e,t,i,n)=>this.evaluateExpression(e,t,i,n,!1,(e,t)=>e.startsWith(t)),numOperands:1},endsWith:{displayValue:e("advancedFilterEndsWith"),evaluator:(e,t,i,n)=>this.evaluateExpression(e,t,i,n,!1,(e,t)=>e.endsWith(t)),numOperands:1},blank:{displayValue:e("advancedFilterBlank"),evaluator:e=>null==e||"string"==typeof e&&0===e.trim().length,numOperands:0},notBlank:{displayValue:e("advancedFilterNotBlank"),evaluator:e=>null!=e&&("string"!=typeof e||e.trim().length>0),numOperands:0}}}evaluateExpression(e,t,i,n,s,r){return null==e?s:i.caseSensitive?r(i.valueConverter(e,t),n):r(i.valueConverter(e,t).toLocaleLowerCase(),n.toLocaleLowerCase())}},Re=class{constructor(e){this.params=e,this.initOperators()}getEntries(e){return De(this.operators,e)}findOperator(e){return Te(e,this.operators,({displayValue:e})=>e)}initOperators(){const{translate:e,equals:t}=this.params;this.operators={equals:{displayValue:e("advancedFilterEquals"),evaluator:(e,i,n,s)=>this.evaluateSingleOperandExpression(e,i,n,s,!!n.includeBlanksInEquals,t),numOperands:1},notEqual:{displayValue:e("advancedFilterNotEqual"),evaluator:(e,i,n,s)=>this.evaluateSingleOperandExpression(e,i,n,s,!!n.includeBlanksInEquals,(e,i)=>!t(e,i)),numOperands:1},greaterThan:{displayValue:e("advancedFilterGreaterThan"),evaluator:(e,t,i,n)=>this.evaluateSingleOperandExpression(e,t,i,n,!!i.includeBlanksInGreaterThan,(e,t)=>e>t),numOperands:1},greaterThanOrEqual:{displayValue:e("advancedFilterGreaterThanOrEqual"),evaluator:(e,t,i,n)=>this.evaluateSingleOperandExpression(e,t,i,n,!!i.includeBlanksInGreaterThan,(e,t)=>e>=t),numOperands:1},lessThan:{displayValue:e("advancedFilterLessThan"),evaluator:(e,t,i,n)=>this.evaluateSingleOperandExpression(e,t,i,n,!!i.includeBlanksInLessThan,(e,t)=>e<t),numOperands:1},lessThanOrEqual:{displayValue:e("advancedFilterLessThanOrEqual"),evaluator:(e,t,i,n)=>this.evaluateSingleOperandExpression(e,t,i,n,!!i.includeBlanksInLessThan,(e,t)=>e<=t),numOperands:1},blank:{displayValue:e("advancedFilterBlank"),evaluator:e=>null==e,numOperands:0},notBlank:{displayValue:e("advancedFilterNotBlank"),evaluator:e=>null!=e,numOperands:0}}}evaluateSingleOperandExpression(e,t,i,n,s,r){return null==e?s:r(i.valueConverter(e,t),n)}},Le=class{constructor(e){this.params=e,this.initOperators()}getEntries(e){return De(this.operators,e)}findOperator(e){return Te(e,this.operators,({displayValue:e})=>e)}initOperators(){const{translate:e}=this.params;this.operators={true:{displayValue:e("advancedFilterTrue"),evaluator:e=>!!e,numOperands:0},false:{displayValue:e("advancedFilterFalse"),evaluator:e=>!1===e,numOperands:0},blank:{displayValue:e("advancedFilterBlank"),evaluator:e=>null==e,numOperands:0},notBlank:{displayValue:e("advancedFilterNotBlank"),evaluator:e=>null!=e,numOperands:0}}}},ke=class extends z.BeanStub{constructor(){super(...arguments),this.columnNameToIdMap={},this.columnAutocompleteEntries=null,this.expressionEvaluatorParams={}}postConstruct(){this.expressionJoinOperators=this.generateExpressionJoinOperators(),this.expressionOperators=this.generateExpressionOperators()}parseJoinOperator(e){var t;const{type:i}=e;return null!=(t=this.expressionJoinOperators[i])?t:i}getColumnDisplayValue(e){const{colId:t}=e,i=this.getColumnAutocompleteEntries().find(({key:e})=>e===t);let n;return i?(n=i.displayValue,this.columnNameToIdMap[n.toLocaleUpperCase()]={colId:t,columnName:n}):n=t,n}getOperatorDisplayValue(e){var t,i;return null!=(i=null==(t=this.getExpressionOperator(e.filterType,e.type))?void 0:t.displayValue)?i:e.type}getOperandModelValue(e,t,i){var n;switch(t){case"number":return z._.exists(e)?Number(e):null;case"date":return z._.serialiseDate(this.valueService.parseValue(i,null,e,void 0),!1);case"dateString":const t=this.valueService.parseValue(i,null,e,void 0);return z._.serialiseDate(null!=(n=this.dataTypeService.getDateParserFunction(i)(t))?n:null,!1)}return e}getOperandDisplayValue(e,t){var i,n;const{colId:s,filter:r}=e,o=this.columnModel.getPrimaryColumn(s);let a="";if(null!=r){let s;switch(e.filterType){case"number":s=null!=(i=z._.toStringOrNull(r))?i:"";break;case"date":const e=z._.parseDateTimeFromString(r);s=o?this.valueService.formatValue(o,null,e):null;break;case"dateString":const t=z._.parseDateTimeFromString(r),n=o?this.dataTypeService.getDateFormatterFunction(o)(null!=t?t:void 0):null;s=o?this.valueService.formatValue(o,null,n):null}"number"!==e.filterType&&(s=null!=(n=null!=s?s:z._.toStringOrNull(r))?n:"",t||(s=`"${s}"`)),a=t?s:` ${s}`}return a}parseColumnFilterModel(e){var t,i;return`[${null!=(t=this.getColumnDisplayValue(e))?t:""}] ${null!=(i=this.getOperatorDisplayValue(e))?i:""}${this.getOperandDisplayValue(e)}`}updateAutocompleteCache(e,t){if("column"===t){const{key:t,displayValue:i}=e;this.columnNameToIdMap[e.displayValue.toLocaleUpperCase()]={colId:t,columnName:i}}}translate(e,t){let i=ye[e];return"function"==typeof i&&(i=i(t)),this.localeService.getLocaleTextFunc()(e,i,t)}generateAutocompleteListParams(e,t,i){return{enabled:!0,type:t,searchString:i,entries:e}}getColumnAutocompleteEntries(){var e;if(this.columnAutocompleteEntries)return this.columnAutocompleteEntries;const t=null!=(e=this.columnModel.getAllPrimaryColumns())?e:[],i=[],n=this.gos.get("includeHiddenColumnsInAdvancedFilter");return t.forEach(e=>{e.getColDef().filter&&(n||e.isVisible()||e.isRowGroupActive())&&i.push({key:e.getColId(),displayValue:this.columnModel.getDisplayNameForColumn(e,"advancedFilter")})}),i.sort((e,t)=>{var i,n;const s=null!=(i=e.displayValue)?i:"",r=null!=(n=t.displayValue)?n:"";return s<r?-1:r>s?1:0}),i}getOperatorAutocompleteEntries(e,t){const i=this.getActiveOperators(e);return this.getDataTypeExpressionOperator(t).getEntries(i)}getJoinOperatorAutocompleteEntries(){return Object.entries(this.expressionJoinOperators).map(([e,t])=>({key:e,displayValue:t}))}getDefaultAutocompleteListParams(e){return this.generateAutocompleteListParams(this.getColumnAutocompleteEntries(),"column",e)}getDataTypeExpressionOperator(e){return this.expressionOperators[e]}getExpressionOperator(e,t){var i,n;return null==(n=null==(i=this.getDataTypeExpressionOperator(e))?void 0:i.operators)?void 0:n[t]}getExpressionJoinOperators(){return this.expressionJoinOperators}getColId(e){const t=e.toLocaleUpperCase(),i=this.columnNameToIdMap[t];if(i)return i;const n=this.getColumnAutocompleteEntries().find(({displayValue:e})=>e.toLocaleUpperCase()===t);if(n){const{key:e,displayValue:i}=n,s={colId:e,columnName:i};return this.columnNameToIdMap[t]=s,s}return null}getExpressionEvaluatorParams(e){let t=this.expressionEvaluatorParams[e];if(t)return t;const i=this.columnModel.getPrimaryColumn(e);if(!i)return{valueConverter:e=>e};switch(this.dataTypeService.getBaseDataType(i)){case"dateString":t={valueConverter:this.dataTypeService.getDateParserFunction(i)};break;case"object":t=i.getColDef().filterValueGetter?{valueConverter:e=>e}:{valueConverter:(e,t)=>{var n;return null!=(n=this.valueService.formatValue(i,t,e))?n:"function"==typeof e.toString?e.toString():""}};break;case"text":case void 0:t={valueConverter:e=>z._.toStringOrNull(e)};break;default:t={valueConverter:e=>e}}const{filterParams:n}=i.getColDef();return n&&["caseSensitive","includeBlanksInEquals","includeBlanksInLessThan","includeBlanksInGreaterThan"].forEach(e=>{const i=n[e];i&&(t[e]=i)}),this.expressionEvaluatorParams[e]=t,t}getColumnDetails(e){var t,i;const n=null!=(t=this.columnModel.getPrimaryColumn(e))?t:void 0;return{column:n,baseCellDataType:null!=(i=n?this.dataTypeService.getBaseDataType(n):void 0)?i:"text"}}generateExpressionOperators(){const e=(e,t)=>this.translate(e,t);return{text:new Ie({translate:e}),boolean:new Le({translate:e}),object:new Ie({translate:e}),number:new Re({translate:e,equals:(e,t)=>e===t}),date:new Re({translate:e,equals:(e,t)=>e.getTime()===t.getTime()}),dateString:new Re({translate:e,equals:(e,t)=>e.getTime()===t.getTime()})}}getColumnValue({displayValue:e}){return`${Ae.COL_START_CHAR}${e}${Ae.COL_END_CHAR}`}generateExpressionJoinOperators(){return{AND:this.translate("advancedFilterAnd"),OR:this.translate("advancedFilterOr")}}getActiveOperators(e){var t;const i=null==(t=e.getColDef().filterParams)?void 0:t.filterOptions;if(i)return i.every(e=>"string"==typeof e)?i:void 0}resetColumnCaches(){this.columnAutocompleteEntries=null,this.columnNameToIdMap={},this.expressionEvaluatorParams={}}};ee([(0,z.Autowired)("valueService")],ke.prototype,"valueService",2),ee([(0,z.Autowired)("columnModel")],ke.prototype,"columnModel",2),ee([(0,z.Autowired)("dataTypeService")],ke.prototype,"dataTypeService",2),ee([z.PostConstruct],ke.prototype,"postConstruct",1),ke=ee([(0,z.Bean)("advancedFilterExpressionService")],ke);var Pe=class{constructor(e){this.params=e,this.operators=[],this.operatorStartPositions=[],this.operatorEndPositions=[],this.activeOperator=0,this.validationError=null}parseExpression(e){this.operators.push(""),this.operatorStartPositions.push(e),this.operatorEndPositions.push(void 0);const{expression:t}=this.params;for(;e<t.length;){const i=t[e];if(" "===i){if(this.parseOperator(e-1))return this.activeOperator++,e-1;this.operators[this.activeOperator]+=i}else this.operators[this.activeOperator]+=i;e++}return this.parseOperator(e-1),e}isValid(){return!(this.validationError||this.operators.length&&!this.parsedOperator)}getValidationError(){return this.validationError}getFunction(){return"OR"===this.parsedOperator?"||":"&&"}getModel(){return"OR"===this.parsedOperator?"OR":"AND"}getAutocompleteListParams(e,t){let i;if(null==t)i="";else{const n=this.operators[t],s=this.operatorEndPositions[t];i=Ce(n,e,null==s?this.params.expression.length:s+1)}let n=this.params.advancedFilterExpressionService.getJoinOperatorAutocompleteEntries();return(t||null==t&&this.activeOperator)&&(n=n.filter(({key:e})=>e===this.parsedOperator)),this.params.advancedFilterExpressionService.generateAutocompleteListParams(n,"join",i)}updateExpression(e,t,i){var n,s;let{expression:r}=this.params;const o=null!=(n=t.displayValue)?n:t.key;if(0===i)for(let e=this.operatorEndPositions.length-1;e>0;e--){const t=this.operatorEndPositions[e];null!=t&&(r=be(r,this.operatorStartPositions[e],t,o).updatedValue)}return be(r,this.operatorStartPositions.length>i?this.operatorStartPositions[i]:e,null!=(s=this.operatorEndPositions.length>i?this.operatorEndPositions[i]:void 0)?s:Se(r,e,!0).endPosition,o,!0)}getNumOperators(){return this.operators.length}getLastOperatorEndPosition(){return this.operatorEndPositions[this.operatorEndPositions.length-1]}parseOperator(e){const t=this.operators.length>this.activeOperator?this.operators[this.activeOperator]:"",i=this.params.advancedFilterExpressionService.getExpressionJoinOperators(),n=Te(t,i,e=>e);if(n){this.operatorEndPositions[this.activeOperator]=e;const s=i[n];if(this.activeOperator){if(n!==this.parsedOperator)return this.validationError||(this.validationError={message:this.params.advancedFilterExpressionService.translate("advancedFilterValidationJoinOperatorMismatch"),startPosition:e-t.length+1,endPosition:e}),!1}else this.parsedOperator=n;return t!==s&&(we(this.params,t,s,e),this.operators[this.activeOperator]=s),!0}return null!==n&&(this.validationError||(this.validationError={message:this.params.advancedFilterExpressionService.translate("advancedFilterValidationInvalidJoinOperator"),startPosition:e-t.length+1,endPosition:e}),!0)}},Ne=class e{constructor(e,t){this.params=e,this.startPosition=t,this.expectingExpression=!0,this.expectingOperator=!1,this.expressionParsers=[],this.operatorParser=new Pe(this.params),this.missingEndBracket=!1,this.extraEndBracket=!1}parseExpression(){let t=this.startPosition;const{expression:i}=this.params;for(;t<i.length;){const n=i[t];if("("!==n||this.expectingOperator){if(")"===n)return this.endPosition=t-1,0===this.startPosition&&(this.extraEndBracket=!0),t;if(" "===n);else if(this.expectingExpression){const e=new Ae(this.params,t);t=e.parseExpression(),this.expressionParsers.push(e),this.expectingExpression=!1,this.expectingOperator=!0}else this.expectingOperator&&(t=this.operatorParser.parseExpression(t),this.expectingOperator=!1,this.expectingExpression=!0)}else{const i=new e(this.params,t+1);t=i.parseExpression(),this.expressionParsers.push(i),this.expectingExpression=!1,this.expectingOperator=!0}t++}return this.startPosition>0&&(this.missingEndBracket=!0),t}isValid(){return!this.missingEndBracket&&!this.extraEndBracket&&this.expressionParsers.length===this.operatorParser.getNumOperators()+1&&this.operatorParser.isValid()&&this.expressionParsers.every(e=>e.isValid())}getValidationError(){const e=this.operatorParser.getValidationError();for(let t=0;t<this.expressionParsers.length;t++){const i=this.expressionParsers[t].getValidationError();if(i)return e&&e.startPosition<i.startPosition?e:i}if(e)return e;if(this.extraEndBracket)return{message:this.params.advancedFilterExpressionService.translate("advancedFilterValidationExtraEndBracket"),startPosition:this.endPosition+1,endPosition:this.endPosition+1};let t;return this.expressionParsers.length===this.operatorParser.getNumOperators()?t="advancedFilterValidationMissingCondition":this.missingEndBracket&&(t="advancedFilterValidationMissingEndBracket"),t?{message:this.params.advancedFilterExpressionService.translate(t),startPosition:this.params.expression.length,endPosition:this.params.expression.length}:null}getFunctionString(e){const t=this.expressionParsers.length>1,i=this.expressionParsers.map(t=>t.getFunctionString(e)).join(` ${this.operatorParser.getFunction()} `);return t?`(${i})`:i}getFunctionParsed(e){const t=this.operatorParser.getFunction(),i=this.expressionParsers.map(t=>t.getFunctionParsed(e)),n="&&"===t?"every":"some";return(e,t,s)=>i[n](i=>i(e,t,s))}getAutocompleteListParams(e){if(null!=this.endPosition&&e>this.endPosition+1)return;if(!this.expressionParsers.length)return this.getColumnAutocompleteListParams();const t=this.getExpressionParserIndex(e);if(null==t)return"("===this.params.expression[e]?{enabled:!1}:this.getColumnAutocompleteListParams();const i=this.expressionParsers[t].getAutocompleteListParams(e);if(!i){if(t<this.expressionParsers.length-1)return this.operatorParser.getAutocompleteListParams(e,t);if(this.expressionParsers.length===this.operatorParser.getNumOperators()){const t=this.operatorParser.getLastOperatorEndPosition();return null==t||e<=t+1?this.operatorParser.getAutocompleteListParams(e,this.operatorParser.getNumOperators()-1):this.getColumnAutocompleteListParams()}return")"===this.params.expression[e-1]?{enabled:!1}:this.operatorParser.getAutocompleteListParams(e)}return i}updateExpression(e,t,i){var n;const s=this.params.expression,r=this.getExpressionParserIndex(e);if(null==r){const e="column"===i?this.params.advancedFilterExpressionService.getColumnValue(t):null!=(n=t.displayValue)?n:t.key;return be(s,this.startPosition,this.startPosition,e,!0)}const o=this.expressionParsers[r].updateExpression(e,t,i);return null==o?"column"===i?be(s,e,s.length-1,this.params.advancedFilterExpressionService.getColumnValue(t),!0):null!=this.endPosition&&e>this.endPosition+1?null:this.operatorParser.updateExpression(e,t,r):o}getModel(){return this.expressionParsers.length>1?{filterType:"join",type:this.operatorParser.getModel(),conditions:this.expressionParsers.map(e=>e.getModel())}:this.expressionParsers[0].getModel()}getColumnAutocompleteListParams(){return this.params.advancedFilterExpressionService.generateAutocompleteListParams(this.params.advancedFilterExpressionService.getColumnAutocompleteEntries(),"column","")}getExpressionParserIndex(e){let t;for(let i=0;i<this.expressionParsers.length&&!(this.expressionParsers[i].startPosition>e);i++)t=i;return t}},Oe=class{constructor(e){this.params=e,this.valid=!1}parseExpression(){this.joinExpressionParser=new Ne(this.params,0);const e=this.joinExpressionParser.parseExpression();return this.valid=e>=this.params.expression.length-1&&this.joinExpressionParser.isValid(),this.params.expression}isValid(){return this.valid}getValidationMessage(){const e=this.joinExpressionParser.getValidationError();if(!e)return null;const{message:t,startPosition:i,endPosition:n}=e;return i<this.params.expression.length?this.params.advancedFilterExpressionService.translate("advancedFilterValidationMessage",[t,this.params.expression.slice(i,n+1).trim()]):this.params.advancedFilterExpressionService.translate("advancedFilterValidationMessageAtEnd",[t])}getFunctionString(){const e=this.createFunctionParams();return{functionString:`return ${this.joinExpressionParser.getFunctionString(e)};`,params:e}}getFunctionParsed(){const e=this.createFunctionParams();return{expressionFunction:this.joinExpressionParser.getFunctionParsed(e),params:e}}getAutocompleteListParams(e){var t;return null!=(t=this.joinExpressionParser.getAutocompleteListParams(e))?t:{enabled:!1}}updateExpression(e,t,i){return this.joinExpressionParser.updateExpression(e,t,i)}getModel(){return this.isValid()?this.joinExpressionParser.getModel():null}createFunctionParams(){return{operands:[],operators:[],evaluatorParams:[]}}},_e=class extends U.BeanStub{constructor(){super(...arguments),this.appliedExpression=null,this.expression=null,this.isValid=!0}postConstruct(){this.setEnabled(this.gos.get("enableAdvancedFilter"),!0),this.ctrl=this.createManagedBean(new me(this.enabled)),this.expressionProxy={getValue:(e,t)=>{const i=this.columnModel.getPrimaryColumn(e);return i?this.valueService.getValue(i,t,!0):void 0}},this.addManagedPropertyListener("enableAdvancedFilter",e=>this.setEnabled(!!e.currentValue)),this.addManagedListener(this.eventService,U.Events.EVENT_NEW_COLUMNS_LOADED,e=>this.onNewColumnsLoaded(e)),this.addManagedPropertyListener("includeHiddenColumnsInAdvancedFilter",()=>this.updateValidity())}isEnabled(){return this.enabled}isFilterPresent(){return!!this.expressionFunction}doesFilterPass(e){return this.expressionFunction(this.expressionProxy,e,this.expressionParams)}getModel(){var e;const t=this.createExpressionParser(this.appliedExpression);return null==t||t.parseExpression(),null!=(e=null==t?void 0:t.getModel())?e:null}setModel(e){const t=(e,i)=>{if("join"===e.filterType){const n=this.advancedFilterExpressionService.parseJoinOperator(e),s=e.conditions.map(e=>t(e)).filter(e=>U._.exists(e)).join(` ${n} `);return i||e.conditions.length<=1?s:`(${s})`}return this.advancedFilterExpressionService.parseColumnFilterModel(e)},i=e?t(e,!0):null;this.setExpressionDisplayValue(i),this.applyExpression(),this.ctrl.refreshComp(),this.ctrl.refreshBuilderComp()}getExpressionDisplayValue(){return this.expression}setExpressionDisplayValue(e){this.expression=e}isCurrentExpressionApplied(){return this.appliedExpression===this.expression}createExpressionParser(e){return e?new Oe({expression:e,columnModel:this.columnModel,dataTypeService:this.dataTypeService,valueService:this.valueService,advancedFilterExpressionService:this.advancedFilterExpressionService}):null}getDefaultExpression(e){const t=this.advancedFilterExpressionService.getColumnValue(e)+" ";return{updatedValue:t,updatedPosition:t.length}}isHeaderActive(){return!this.gos.get("advancedFilterParent")}getCtrl(){return this.ctrl}setEnabled(e,t){const i=this.enabled,n=this.rowModel.getType(),s="clientSide"===n||"serverSide"===n;if(e&&!n&&U._.warnOnce("Advanced Filter is only supported with the Client-Side Row Model or Server-Side Row Model."),this.enabled=e&&s,!t&&this.enabled!==i){const e={type:U.Events.EVENT_ADVANCED_FILTER_ENABLED_CHANGED,enabled:this.enabled};this.eventService.dispatchEvent(e)}}applyExpression(){const e=this.createExpressionParser(this.expression);null==e||e.parseExpression(),this.applyExpressionFromParser(e)}applyExpressionFromParser(e){if(this.isValid=!e||e.isValid(),!e||!this.isValid)return this.expressionFunction=null,this.expressionParams=null,void(this.appliedExpression=null);const{expressionFunction:t,params:i}=this.getFunction(e);this.expressionFunction=t,this.expressionParams=i,this.appliedExpression=this.expression}getFunction(e){if(this.gos.get("suppressAdvancedFilterEval"))return e.getFunctionParsed();{const{functionString:t,params:i}=e.getFunctionString();return{expressionFunction:new Function("expressionProxy","node","params",t),params:i}}}updateValidity(){this.advancedFilterExpressionService.resetColumnCaches();const e=this.createExpressionParser(this.expression);null==e||e.parseExpression();const t=(!e||e.isValid())!==this.isValid;return this.applyExpressionFromParser(e),this.ctrl.refreshComp(),this.ctrl.refreshBuilderComp(),t}onNewColumnsLoaded(e){if("gridInitializing"!==e.source||!this.dataTypeService.isPendingInference())return;this.ctrl.setInputDisabled(!0);const t=this.addManagedListener(this.eventService,U.Events.EVENT_DATA_TYPES_INFERRED,()=>{null==t||t(),this.ctrl.setInputDisabled(!1)})}};ee([(0,U.Autowired)("valueService")],_e.prototype,"valueService",2),ee([(0,U.Autowired)("columnModel")],_e.prototype,"columnModel",2),ee([(0,U.Autowired)("dataTypeService")],_e.prototype,"dataTypeService",2),ee([(0,U.Autowired)("rowModel")],_e.prototype,"rowModel",2),ee([(0,U.Autowired)("advancedFilterExpressionService")],_e.prototype,"advancedFilterExpressionService",2),ee([U.PostConstruct],_e.prototype,"postConstruct",1),_e=ee([(0,U.Bean)("advancedFilterService")],_e);var Fe={version:"31.3.4",moduleName:v.ModuleNames.AdvancedFilterModule,beans:[_e,ke],agStackComponents:[{componentName:"agAdvancedFilter",componentClass:ve}],dependantModules:[D]},Ge={};l(Ge,{GridChartsModule:()=>Ja,__FORCE_MODULE_DETECTION_AG_GRID_CORE_EXT:()=>el,agCharts:()=>tl});var Ve=i(98092),Be=i(98092),He=i(98092),ze=i(98092),Ue=i(98092),We=i(98092),je=i(98092),Ke=Object.defineProperty,$e=Object.defineProperties,Ye=Object.getOwnPropertyDescriptor,qe=Object.getOwnPropertyDescriptors,Xe=Object.getOwnPropertySymbols,Ze=Object.prototype.hasOwnProperty,Qe=Object.prototype.propertyIsEnumerable,Je=(e,t,i)=>t in e?Ke(e,t,{enumerable:!0,configurable:!0,writable:!0,value:i}):e[t]=i,et=(e,t)=>{for(var i in t||(t={}))Ze.call(t,i)&&Je(e,i,t[i]);if(Xe)for(var i of Xe(t))Qe.call(t,i)&&Je(e,i,t[i]);return e},tt=(e,t)=>$e(e,qe(t)),it=(e,t,i,n)=>{for(var s,r=n>1?void 0:n?Ye(t,i):t,o=e.length-1;o>=0;o--)(s=e[o])&&(r=(n?s(t,i,r):s(r))||r);return n&&r&&Ke(t,i,r),r},nt=class extends He.BeanStub{constructor(){super(...arguments),this.cellRanges=[],this.bodyScrollListener=this.onBodyScroll.bind(this),this.dragging=!1,this.intersectionRange=!1}init(){this.addManagedListener(this.eventService,He.Events.EVENT_NEW_COLUMNS_LOADED,()=>this.onColumnsChanged()),this.addManagedListener(this.eventService,He.Events.EVENT_COLUMN_VISIBLE,this.onColumnsChanged.bind(this)),this.addManagedListener(this.eventService,He.Events.EVENT_COLUMN_VALUE_CHANGED,this.onColumnsChanged.bind(this)),this.addManagedListener(this.eventService,He.Events.EVENT_COLUMN_PIVOT_MODE_CHANGED,()=>this.removeAllCellRanges()),this.addManagedListener(this.eventService,He.Events.EVENT_COLUMN_ROW_GROUP_CHANGED,()=>this.removeAllCellRanges()),this.addManagedListener(this.eventService,He.Events.EVENT_COLUMN_PIVOT_CHANGED,()=>this.removeAllCellRanges()),this.addManagedListener(this.eventService,He.Events.EVENT_COLUMN_GROUP_OPENED,this.refreshLastRangeStart.bind(this)),this.addManagedListener(this.eventService,He.Events.EVENT_COLUMN_MOVED,this.refreshLastRangeStart.bind(this)),this.addManagedListener(this.eventService,He.Events.EVENT_COLUMN_PINNED,this.refreshLastRangeStart.bind(this)),this.ctrlsService.whenReady(e=>{const t=e.gridBodyCtrl;this.autoScrollService=new He.AutoScrollService({scrollContainer:t.getBodyViewportElement(),scrollAxis:"xy",getVerticalPosition:()=>t.getScrollFeature().getVScrollPosition().top,setVerticalPosition:e=>t.getScrollFeature().setVerticalScrollPosition(e),getHorizontalPosition:()=>t.getScrollFeature().getHScrollPosition().left,setHorizontalPosition:e=>t.getScrollFeature().setHorizontalScrollPosition(e),shouldSkipVerticalScroll:()=>!this.gos.isDomLayout("normal"),shouldSkipHorizontalScroll:()=>!t.getScrollFeature().isHorizontalScrollShowing()})})}onColumnsChanged(){this.refreshLastRangeStart();const e=this.columnModel.getAllDisplayedColumns();this.cellRanges.forEach(t=>{const i=t.columns;t.columns=t.columns.filter(t=>t.isVisible()&&-1!==e.indexOf(t)),!He._.areEqual(i,t.columns)&&this.dispatchChangedEvent(!1,!0,t.id)});const t=this.cellRanges.length;this.cellRanges=this.cellRanges.filter(e=>e.columns.length>0),t>this.cellRanges.length&&this.dispatchChangedEvent(!1,!0)}refreshLastRangeStart(){const e=He._.last(this.cellRanges);e&&this.refreshRangeStart(e)}isContiguousRange(e){const t=e.columns;if(!t.length)return!1;const i=this.columnModel.getAllDisplayedColumns(),n=t.map(e=>i.indexOf(e)).sort((e,t)=>e-t);return He._.last(n)-n[0]+1===t.length}getRangeStartRow(e){return e.startRow&&e.endRow?this.rowPositionUtils.before(e.startRow,e.endRow)?e.startRow:e.endRow:{rowIndex:0,rowPinned:this.pinnedRowModel.getPinnedTopRowCount()>0?"top":null}}getRangeEndRow(e){if(e.startRow&&e.endRow)return this.rowPositionUtils.before(e.startRow,e.endRow)?e.endRow:e.startRow;const t=this.pinnedRowModel.getPinnedBottomRowCount();return t>0?{rowIndex:t-1,rowPinned:"bottom"}:{rowIndex:this.rowModel.getRowCount()-1,rowPinned:null}}setRangeToCell(e,t=!1){if(!this.gos.get("enableRangeSelection"))return;const i=this.calculateColumnsBetween(e.column,e.column);if(!i)return;(this.gos.get("suppressMultiRangeSelection")||!t||He._.missing(this.cellRanges))&&this.removeAllCellRanges(!0);const n={rowIndex:e.rowIndex,rowPinned:e.rowPinned},s={startRow:n,endRow:n,columns:i,startColumn:e.column};this.cellRanges.push(s),this.setNewestRangeStartCell(e),this.onDragStop(),this.dispatchChangedEvent(!0,!0)}extendLatestRangeToCell(e){if(this.isEmpty()||!this.newestRangeStartCell)return;const t=He._.last(this.cellRanges);this.updateRangeEnd(t,e)}updateRangeEnd(e,t,i=!1){const n=t.column,s=this.calculateColumnsBetween(e.startColumn,n);s&&!this.isLastCellOfRange(e,t)&&(e.columns=s,e.endRow={rowIndex:t.rowIndex,rowPinned:t.rowPinned},i||this.dispatchChangedEvent(!0,!0,e.id))}refreshRangeStart(e){const{startColumn:t,columns:i}=e,n=(t,i)=>{const n=e.columns.filter(e=>e!==t);t?(e.startColumn=t,e.columns=i?[t,...n]:[...n,t]):e.columns=n},{left:s,right:r}=this.getRangeEdgeColumns(e);t!==i[0]||t===s?t===He._.last(i)&&t===r&&n(r,!1):n(s,!0)}getRangeEdgeColumns(e){const t=this.columnModel.getAllDisplayedColumns(),i=e.columns.map(e=>t.indexOf(e)).filter(e=>e>-1).sort((e,t)=>e-t);return{left:t[i[0]],right:t[He._.last(i)]}}extendLatestRangeInDirection(e){if(this.isEmpty()||!this.newestRangeStartCell)return;const t=e.key,i=e.ctrlKey||e.metaKey,n=He._.last(this.cellRanges),s=this.newestRangeStartCell,r=n.columns[0],o=He._.last(n.columns),a=n.endRow.rowIndex,l=n.endRow.rowPinned,c={column:s.column===r?o:r,rowIndex:a,rowPinned:l},h=this.cellNavigationService.getNextCellToFocus(t,c,i);return h?(this.setCellRange({rowStartIndex:s.rowIndex,rowStartPinned:s.rowPinned,rowEndIndex:h.rowIndex,rowEndPinned:h.rowPinned,columnStart:s.column,columnEnd:h.column}),h):void 0}setCellRange(e){this.gos.get("enableRangeSelection")&&(this.removeAllCellRanges(!0),this.addCellRange(e))}setCellRanges(e){He._.shallowCompare(this.cellRanges,e)||(this.removeAllCellRanges(!0),e.forEach(e=>{e.columns&&e.startRow&&this.setNewestRangeStartCell({rowIndex:e.startRow.rowIndex,rowPinned:e.startRow.rowPinned,column:e.columns[0]}),this.cellRanges.push(e)}),this.dispatchChangedEvent(!1,!0))}setNewestRangeStartCell(e){this.newestRangeStartCell=e}clearCellRangeCellValues(e){let{cellRanges:t}=e;const{cellEventSource:i="rangeService",dispatchWrapperEvents:n,wrapperEventSource:s="deleteKey"}=e;if(n){const e={type:He.Events.EVENT_RANGE_DELETE_START,source:s};this.eventService.dispatchEvent(e)}if(t||(t=this.cellRanges),t.forEach(e=>{this.forEachRowInRange(e,t=>{var n;const s=this.rowPositionUtils.getRowNode(t);if(s)for(let t=0;t<e.columns.length;t++){const r=this.columnModel.getGridColumn(e.columns[t]);if(!r||!r.isCellEditable(s))continue;const o=null!=(n=this.valueService.parseValue(r,s,"",s.getValueFromValueService(r)))?n:null;s.setDataValue(r,o,i)}})}),n){const e={type:He.Events.EVENT_RANGE_DELETE_END,source:s};this.eventService.dispatchEvent(e)}}createCellRangeFromCellRangeParams(e){return this.createPartialCellRangeFromRangeParams(e,!1)}createPartialCellRangeFromRangeParams(e,t){let i,n=!1;if(e.columns)i=e.columns.map(e=>this.columnModel.getColumnWithValidation(e)).filter(e=>e);else{const t=this.columnModel.getColumnWithValidation(e.columnStart),s=this.columnModel.getColumnWithValidation(e.columnEnd);if(!t||!s)return;i=this.calculateColumnsBetween(t,s),i&&i.length&&(n=i[0]!==t)}if(i&&(t||0!==i.length))return{startRow:null!=e.rowStartIndex?{rowIndex:e.rowStartIndex,rowPinned:e.rowStartPinned||null}:void 0,endRow:null!=e.rowEndIndex?{rowIndex:e.rowEndIndex,rowPinned:e.rowEndPinned||null}:void 0,columns:i,startColumn:n?He._.last(i):i[0]}}addCellRange(e){if(!this.gos.get("enableRangeSelection"))return;const t=this.createCellRangeFromCellRangeParams(e);t&&(t.startRow&&this.setNewestRangeStartCell({rowIndex:t.startRow.rowIndex,rowPinned:t.startRow.rowPinned,column:t.startColumn}),this.cellRanges.push(t),this.dispatchChangedEvent(!1,!0,t.id))}getCellRanges(){return this.cellRanges}isEmpty(){return 0===this.cellRanges.length}isMoreThanOneCell(){const e=this.cellRanges.length;if(0===e)return!1;if(e>1)return!0;const t=this.cellRanges[0],i=this.getRangeStartRow(t),n=this.getRangeEndRow(t);return i.rowPinned!==n.rowPinned||i.rowIndex!==n.rowIndex||1!==t.columns.length}areAllRangesAbleToMerge(){const e=new Map;if(this.cellRanges.length<=1)return!0;let t;this.cellRanges.forEach(t=>{this.forEachRowInRange(t,i=>{const n=`${i.rowPinned||"normal"}_${i.rowIndex}`,s=e.get(n),r=t.columns.map(e=>e.getId());if(s){const e=r.filter(e=>-1===s.indexOf(e));s.push(...e)}else e.set(n,r)})});for(const i of e.values()){const e=i.sort().join();if(void 0!==t){if(t!==e)return!1}else t=e}return!0}forEachRowInRange(e,t){const i=this.getRangeStartRow(e),n=this.getRangeEndRow(e);let s=i;for(;s&&(t(s),!this.rowPositionUtils.sameRow(s,n));)s=this.cellNavigationService.getRowBelow(s)}removeAllCellRanges(e){this.isEmpty()||(this.onDragStop(),this.cellRanges.length=0,e||this.dispatchChangedEvent(!1,!0))}onBodyScroll(){this.dragging&&this.lastMouseEvent&&this.onDragging(this.lastMouseEvent)}isCellInAnyRange(e){return this.getCellRangeCount(e)>0}isCellInSpecificRange(e,t){const i=null!==t.columns&&He._.includes(t.columns,e.column),n=this.isRowInRange(e.rowIndex,e.rowPinned,t);return i&&n}isLastCellOfRange(e,t){const{startRow:i,endRow:n}=e,s=this.rowPositionUtils.before(i,n)?n:i,r=t.rowIndex===s.rowIndex&&t.rowPinned===s.rowPinned,o=e.columns[0],a=He._.last(e.columns),l=e.startColumn===o?a:o;return t.column===l&&r}isBottomRightCell(e,t){const i=this.columnModel.getAllDisplayedColumns(),n=e.columns.map(e=>i.indexOf(e)).sort((e,t)=>e-t),{startRow:s,endRow:r}=e,o=this.rowPositionUtils.before(s,r)?r:s,a=i.indexOf(t.column)===He._.last(n),l=t.rowIndex===o.rowIndex&&He._.makeNull(t.rowPinned)===He._.makeNull(o.rowPinned);return a&&l}getCellRangeCount(e){return this.isEmpty()?0:this.cellRanges.filter(t=>this.isCellInSpecificRange(e,t)).length}isRowInRange(e,t,i){const n=this.getRangeStartRow(i),s=this.getRangeEndRow(i),r={rowIndex:e,rowPinned:t||null},o=r.rowIndex===n.rowIndex&&r.rowPinned==n.rowPinned,a=r.rowIndex===s.rowIndex&&r.rowPinned==s.rowPinned;if(o||a)return!0;const l=!this.rowPositionUtils.before(r,n),c=this.rowPositionUtils.before(r,s);return l&&c}getDraggingRange(){return this.draggingRange}onDragStart(e){if(!this.gos.get("enableRangeSelection"))return;const{ctrlKey:t,metaKey:i,shiftKey:n}=e,s=t||i,r=!this.gos.get("suppressMultiRangeSelection")&&s,o=n&&He._.existsAndNotEmpty(this.cellRanges);r||o&&!He._.exists(He._.last(this.cellRanges).type)||this.removeAllCellRanges(!0);const a=this.dragService.getStartTarget();if(a&&this.updateValuesOnMove(a),this.lastCellHovered){if(this.dragging=!0,this.lastMouseEvent=e,this.intersectionRange=r&&this.getCellRangeCount(this.lastCellHovered)>1,o||this.setNewestRangeStartCell(this.lastCellHovered),this.cellRanges.length>0)this.draggingRange=He._.last(this.cellRanges);else{const e={rowIndex:this.lastCellHovered.rowIndex,rowPinned:this.lastCellHovered.rowPinned};this.draggingRange={startRow:e,endRow:e,columns:[this.lastCellHovered.column],startColumn:this.newestRangeStartCell.column},this.cellRanges.push(this.draggingRange)}this.ctrlsService.getGridBodyCtrl().addScrollEventListener(this.bodyScrollListener),this.dispatchChangedEvent(!0,!1,this.draggingRange.id)}}intersectLastRange(e){if(e&&this.dragging)return;if(this.gos.get("suppressMultiRangeSelection"))return;if(this.isEmpty())return;const t=this.rowPositionUtils,i=He._.last(this.cellRanges),n=this.getRangeStartRow(i),s=this.getRangeEndRow(i),r=[];this.cellRanges.slice(0,-1).forEach(e=>{const o=this.getRangeStartRow(e),a=this.getRangeEndRow(e),l=e.columns,c=l.filter(e=>-1===i.columns.indexOf(e));if(c.length===l.length)return void r.push(e);if(t.before(s,o)||t.before(a,n))return void r.push(e);const h=r.length;if(t.before(o,n)){const e={columns:[...l],startColumn:i.startColumn,startRow:et({},o),endRow:this.cellNavigationService.getRowAbove(n)};r.push(e)}if(c.length>0){const e={columns:c,startColumn:He._.includes(c,i.startColumn)?i.startColumn:c[0],startRow:this.rowMax([et({},n),et({},o)]),endRow:this.rowMin([et({},s),et({},a)])};r.push(e)}t.before(s,a)&&r.push({columns:[...l],startColumn:i.startColumn,startRow:this.cellNavigationService.getRowBelow(s),endRow:et({},a)}),r.length-h===1&&(r[r.length-1].id=e.id)}),this.cellRanges=r,e&&this.dispatchChangedEvent(!1,!0)}rowMax(e){let t;return e.forEach(e=>{(void 0===t||this.rowPositionUtils.before(t,e))&&(t=e)}),t}rowMin(e){let t;return e.forEach(e=>{(void 0===t||this.rowPositionUtils.before(e,t))&&(t=e)}),t}updateValuesOnMove(e){const t=He._.getCtrlForEventTarget(this.gos,e,He.CellCtrl.DOM_DATA_KEY_CELL_CTRL),i=null==t?void 0:t.getCellPosition();this.cellHasChanged=!1,!i||this.lastCellHovered&&this.cellPositionUtils.equals(i,this.lastCellHovered)||(this.lastCellHovered&&(this.cellHasChanged=!0),this.lastCellHovered=i)}onDragging(e){if(!this.dragging||!e)return;this.updateValuesOnMove(e.target),this.lastMouseEvent=e;const t=this.lastCellHovered,i=e=>t&&t.rowPinned===e&&this.newestRangeStartCell.rowPinned===e,n=i("top")||i("bottom");if(this.autoScrollService.check(e,n),!this.cellHasChanged)return;const s=this.calculateColumnsBetween(this.newestRangeStartCell.column,t.column);s&&(this.draggingRange.endRow={rowIndex:t.rowIndex,rowPinned:t.rowPinned},this.draggingRange.columns=s,this.dispatchChangedEvent(!1,!1,this.draggingRange.id))}onDragStop(){if(!this.dragging)return;const{id:e}=this.draggingRange;this.autoScrollService.ensureCleared(),this.ctrlsService.getGridBodyCtrl().removeScrollEventListener(this.bodyScrollListener),this.lastMouseEvent=null,this.dragging=!1,this.draggingRange=void 0,this.lastCellHovered=void 0,this.intersectionRange&&(this.intersectionRange=!1,this.intersectLastRange()),this.dispatchChangedEvent(!1,!0,e)}dispatchChangedEvent(e,t,i){const n={type:He.Events.EVENT_RANGE_SELECTION_CHANGED,started:e,finished:t,id:i};this.eventService.dispatchEvent(n)}calculateColumnsBetween(e,t){const i=this.columnModel.getAllDisplayedColumns(),n=e===t,s=i.indexOf(e);if(s<0)return void console.warn(`AG Grid: column ${e.getId()} is not visible`);const r=n?s:i.indexOf(t);if(r<0)return void console.warn(`AG Grid: column ${t.getId()} is not visible`);if(n)return[e];const o=Math.min(s,r),a=o===s?r:s,l=[];for(let e=o;e<=a;e++)l.push(i[e]);return l}};it([(0,He.Autowired)("rowModel")],nt.prototype,"rowModel",2),it([(0,He.Autowired)("dragService")],nt.prototype,"dragService",2),it([(0,He.Autowired)("columnModel")],nt.prototype,"columnModel",2),it([(0,He.Autowired)("cellNavigationService")],nt.prototype,"cellNavigationService",2),it([(0,He.Autowired)("pinnedRowModel")],nt.prototype,"pinnedRowModel",2),it([(0,He.Autowired)("rowPositionUtils")],nt.prototype,"rowPositionUtils",2),it([(0,He.Autowired)("cellPositionUtils")],nt.prototype,"cellPositionUtils",2),it([(0,He.Autowired)("ctrlsService")],nt.prototype,"ctrlsService",2),it([(0,He.Autowired)("valueService")],nt.prototype,"valueService",2),it([He.PostConstruct],nt.prototype,"init",1),nt=it([(0,He.Bean)("rangeService")],nt);var st=class extends Ue.Component{constructor(){super(...arguments),this.changedCalculatedValues=!1,this.dragging=!1,this.shouldDestroyOnEndDragging=!1}init(){this.dragService.addDragSource({dragStartPixels:0,eElement:this.getGui(),onDragStart:this.onDragStart.bind(this),onDragging:e=>{this.dragging=!0,this.rangeService.autoScrollService.check(e),this.changedCalculatedValues&&(this.onDrag(e),this.changedCalculatedValues=!1)},onDragStop:e=>{this.dragging=!1,this.onDragEnd(e),this.clearValues(),this.rangeService.autoScrollService.ensureCleared(),document.body.classList.remove(this.getDraggingCssClass()),this.shouldDestroyOnEndDragging&&this.destroy()}}),this.addManagedListener(this.getGui(),"mousedown",this.preventRangeExtension.bind(this))}isDragging(){return this.dragging}getCellCtrl(){return this.cellCtrl}setCellCtrl(e){this.cellCtrl=e}getCellRange(){return this.cellRange}setCellRange(e){this.cellRange=e}getRangeStartRow(){return this.rangeStartRow}setRangeStartRow(e){this.rangeStartRow=e}getRangeEndRow(){return this.rangeEndRow}setRangeEndRow(e){this.rangeEndRow=e}getLastCellHovered(){return this.lastCellHovered}preventRangeExtension(e){e.stopPropagation()}onDragStart(e){this.cellHoverListener=this.addManagedListener(this.ctrlsService.get("gridCtrl").getGui(),"mousemove",this.updateValuesOnMove.bind(this)),document.body.classList.add(this.getDraggingCssClass())}getDraggingCssClass(){return`ag-dragging-${this.type===Ue.SelectionHandleType.FILL?"fill":"range"}-handle`}updateValuesOnMove(e){const t=this.mouseEventService.getCellPositionForEvent(e);!t||this.lastCellHovered&&this.cellPositionUtils.equals(t,this.lastCellHovered)||(this.lastCellHovered=t,this.changedCalculatedValues=!0)}getType(){return this.type}refresh(e){const t=this.getCellCtrl(),i=this.getGui(),n=Ue._.last(this.rangeService.getCellRanges()),s=n.startRow,r=n.endRow;if(s&&r&&(this.rowPositionUtils.before(r,s)?(this.setRangeStartRow(r),this.setRangeEndRow(s)):(this.setRangeStartRow(s),this.setRangeEndRow(r))),t!==e||!Ue._.isVisible(i)){this.setCellCtrl(e);const t=e.getComp().getParentOfValue();t&&t.appendChild(i)}this.setCellRange(n)}clearValues(){this.lastCellHovered=void 0,this.removeListeners()}removeListeners(){this.cellHoverListener&&(this.cellHoverListener(),this.cellHoverListener=void 0)}destroy(){if(!this.shouldDestroyOnEndDragging&&this.isDragging())return Ue._.setDisplayed(this.getGui(),!1),void(this.shouldDestroyOnEndDragging=!0);this.shouldDestroyOnEndDragging=!1,super.destroy(),this.removeListeners();const e=this.getGui();e.parentElement&&e.parentElement.removeChild(e)}};function rt(e){const t=e.length;let i=0;if(t<=1)return e;for(let t=0;t<e.length;t++){const n=e[t],s=n.toString().split("e-");s.length>1?i=Math.max(i,parseInt(s[1],10)):Math.floor(n)!==n&&(i=Math.max(i,n.toString().split(".")[1].length))}let n=0,s=0,r=0,o=0,a=0;for(let i=0;i<t;i++)a=e[i],n+=i,s+=a,o+=i*i,r+=i*a;const l=(t*r-n*s)/(t*o-n*n),c=s/t-l*n/t,h=[];for(let e=0;e<=t;e++)h.push(parseFloat((e*l+c).toFixed(i)));return h}it([(0,Ue.Autowired)("rowRenderer")],st.prototype,"rowRenderer",2),it([(0,Ue.Autowired)("dragService")],st.prototype,"dragService",2),it([(0,Ue.Autowired)("rangeService")],st.prototype,"rangeService",2),it([(0,Ue.Autowired)("mouseEventService")],st.prototype,"mouseEventService",2),it([(0,Ue.Autowired)("columnModel")],st.prototype,"columnModel",2),it([(0,Ue.Autowired)("cellNavigationService")],st.prototype,"cellNavigationService",2),it([(0,Ue.Autowired)("navigationService")],st.prototype,"navigationService",2),it([(0,Ue.Autowired)("rowPositionUtils")],st.prototype,"rowPositionUtils",2),it([(0,Ue.Autowired)("cellPositionUtils")],st.prototype,"cellPositionUtils",2),it([(0,Ue.Autowired)("ctrlsService")],st.prototype,"ctrlsService",2),it([Ue.PostConstruct],st.prototype,"init",1);var ot=class e extends st{constructor(){super(e.TEMPLATE),this.markedCells=[],this.cellValues=[],this.isUp=!1,this.isLeft=!1,this.isReduce=!1,this.type=ze.SelectionHandleType.FILL}updateValuesOnMove(e){super.updateValuesOnMove(e),this.initialXY||(this.initialXY=this.mouseEventService.getNormalisedPosition(e));const{x:t,y:i}=this.initialXY,{x:n,y:s}=this.mouseEventService.getNormalisedPosition(e),r=Math.abs(t-n),o=Math.abs(i-s),a=this.getFillHandleDirection();let l;l="xy"===a?r>o?"x":"y":a,l!==this.dragAxis&&(this.dragAxis=l,this.changedCalculatedValues=!0)}onDrag(e){if(!this.initialPosition){const e=this.getCellCtrl();if(!e)return;this.initialPosition=e.getCellPosition()}const t=this.getLastCellHovered();t&&this.markPathFrom(this.initialPosition,t)}onDragEnd(e){if(this.initialXY=null,!this.markedCells.length)return;const t="x"===this.dragAxis,i=this.getCellRange(),n=i.columns.length,s=this.getRangeStartRow(),r=this.getRangeEndRow();let o;if(this.isUp||this.isLeft){const e=t?s:this.lastCellMarked;o=this.rangeService.createCellRangeFromCellRangeParams({rowStartIndex:e.rowIndex,rowStartPinned:e.rowPinned,columnStart:t?this.lastCellMarked.column:i.columns[0],rowEndIndex:r.rowIndex,rowEndPinned:r.rowPinned,columnEnd:i.columns[n-1]})}else o=this.rangeService.createCellRangeFromCellRangeParams({rowStartIndex:s.rowIndex,rowStartPinned:s.rowPinned,columnStart:i.columns[0],rowEndIndex:t?r.rowIndex:this.lastCellMarked.rowIndex,rowEndPinned:t?r.rowPinned:this.lastCellMarked.rowPinned,columnEnd:t?this.lastCellMarked.column:i.columns[n-1]});o&&(this.raiseFillStartEvent(),this.handleValueChanged(i,o,e),this.rangeService.setCellRanges([o]),this.raiseFillEndEvent(i,o))}getFillHandleDirection(){const e=this.gos.get("fillHandleDirection");return e?"x"!==e&&"y"!==e&&"xy"!==e?(ze._.warnOnce("valid values for fillHandleDirection are 'x', 'y' and 'xy'. Default to 'xy'."),"xy"):e:"xy"}raiseFillStartEvent(){const e={type:ze.Events.EVENT_FILL_START};this.eventService.dispatchEvent(e)}raiseFillEndEvent(e,t){const i={type:ze.Events.EVENT_FILL_END,initialRange:e,finalRange:t};this.eventService.dispatchEvent(i)}handleValueChanged(e,t,i){const n=this.rangeService.getRangeEndRow(e),s=this.rangeService.getRangeStartRow(e),r=this.rangeService.getRangeEndRow(t),o=this.rangeService.getRangeStartRow(t),a="y"===this.dragAxis;if(this.isReduce&&!this.gos.get("suppressClearOnFillReduction")){const i=a?e.columns:e.columns.filter(e=>t.columns.indexOf(e)<0),s=a?this.cellNavigationService.getRowBelow(r):o;return void(s&&this.clearCellsInRange(s,n,i))}const l=[],c=[],h=[],d=[];let u=!0,p=0;const g=()=>{l.length=0,c.length=0,h.length=0,d.length=0,p=0},f=(t,i)=>{let c=this.isUp?n:s,h=!1;for(a&&(u=!0,g());!h&&c;){const d=this.rowPositionUtils.getRowNode(c);if(!d)break;a&&t?m(l,t,d,()=>!this.rowPositionUtils.sameRow(c,this.isUp?s:n)):i&&(u=!0,g(),i.forEach(t=>m(l,t,d,()=>t!==(this.isLeft?e.columns[0]:ze._.last(e.columns))))),h=this.rowPositionUtils.sameRow(c,this.isUp?o:r),c=this.isUp?this.cellNavigationService.getRowAbove(c):this.cellNavigationService.getRowBelow(c)}},m=(e,t,n,s)=>{var r,o;let a,l=!1;if(u)a=this.valueService.getValue(t,n),c.push(a),h.push(this.valueService.getValue(t,n,void 0,!0)),d.push(this.valueService.formatValue(t,n,a)),u=s();else{const{value:s,fromUserFunction:u,sourceCol:g,sourceRowNode:f}=this.processValues({event:i,values:e,initialValues:c,initialNonAggregatedValues:h,initialFormattedValues:d,col:t,rowNode:n,idx:p++});if(a=s,t.isCellEditable(n)){const e=this.valueService.getValue(t,n);u||(g&&!1!==(null==(r=g.getColDef())?void 0:r.useValueFormatterForExport)&&(a=null!=(o=this.valueService.formatValue(g,f,a))?o:a),!1!==t.getColDef().useValueParserForImport&&(a=this.valueService.parseValue(t,n,g?a:ze._.toStringOrNull(a),e))),u&&e===a?l=!0:n.setDataValue(t,a,"rangeService")}}l||e.push({value:a,column:t,rowNode:n})};if(a)e.columns.forEach(e=>{f(e)});else{const e=this.isLeft?[...t.columns].reverse():t.columns;f(void 0,e)}}clearCellsInRange(e,t,i){const n={startRow:e,endRow:t,columns:i,startColumn:i[0]};this.rangeService.clearCellRangeCellValues({cellRanges:[n]})}processValues(e){const{event:t,values:i,initialValues:n,initialNonAggregatedValues:s,initialFormattedValues:r,col:o,rowNode:a,idx:l}=e,c=this.gos.getCallback("fillOperation");let h;if(h="y"===this.dragAxis?this.isUp?"up":"down":this.isLeft?"left":"right",c){const e=c({event:t,values:i.map(({value:e})=>e),initialValues:n,initialNonAggregatedValues:s,initialFormattedValues:r,currentIndex:l,currentCellValue:this.valueService.getValue(o,a),direction:h,column:o,rowNode:a});if(!1!==e)return{value:e,fromUserFunction:!0}}const d=!i.some(({value:e})=>{const t=parseFloat(e);return isNaN(t)||t.toString()!==e.toString()});if(t.altKey||!d){if(d&&1===n.length){const e=this.isUp||this.isLeft?-1:1;return{value:parseFloat(ze._.last(i).value)+1*e,fromUserFunction:!1}}const{value:e,column:t,rowNode:s}=i[l%i.length];return{value:e,fromUserFunction:!1,sourceCol:t,sourceRowNode:s}}return{value:ze._.last(rt(i.map(({value:e})=>Number(e)))),fromUserFunction:!1}}clearValues(){this.clearMarkedPath(),this.clearCellValues(),this.lastCellMarked=void 0,super.clearValues()}clearMarkedPath(){this.markedCells.forEach(e=>{if(!e.isAlive())return;const t=e.getComp();t.addOrRemoveCssClass("ag-selection-fill-top",!1),t.addOrRemoveCssClass("ag-selection-fill-right",!1),t.addOrRemoveCssClass("ag-selection-fill-bottom",!1),t.addOrRemoveCssClass("ag-selection-fill-left",!1)}),this.markedCells.length=0,this.isUp=!1,this.isLeft=!1,this.isReduce=!1}clearCellValues(){this.cellValues.length=0}markPathFrom(e,t){if(this.clearMarkedPath(),this.clearCellValues(),"y"===this.dragAxis){if(this.rowPositionUtils.sameRow(t,e))return;const i=this.rowPositionUtils.before(t,e),n=this.getRangeStartRow(),s=this.getRangeEndRow();i&&(t.rowPinned==n.rowPinned&&t.rowIndex>=n.rowIndex||n.rowPinned!=s.rowPinned&&t.rowPinned==s.rowPinned&&t.rowIndex<=s.rowIndex)?(this.reduceVertical(e,t),this.isReduce=!0):(this.extendVertical(e,t,i),this.isReduce=!1)}else{const i=e.column,n=t.column;if(i===n)return;const s=this.columnModel.getAllDisplayedColumns(),r=s.indexOf(i),o=s.indexOf(n);o<=r&&o>=s.indexOf(this.getCellRange().columns[0])?(this.reduceHorizontal(e,t),this.isReduce=!0):(this.extendHorizontal(e,t,o<r),this.isReduce=!1)}this.lastCellMarked=t}extendVertical(e,t,i){const{navigationService:n,rangeService:s}=this;let r=e;do{const o=this.getCellRange(),a=o.columns.length;for(let l=0;l<a;l++){const c=o.columns[l],h={rowIndex:r.rowIndex,rowPinned:r.rowPinned},d=tt(et({},h),{column:c}),u=s.isCellInSpecificRange(d,o),p=this.rowPositionUtils.sameRow(r,e);if(i&&(this.isUp=!0),!p){const e=n.getCellByPosition(d);if(e){this.markedCells.push(e);const n=e.getComp();u||(n.addOrRemoveCssClass("ag-selection-fill-left",0===l),n.addOrRemoveCssClass("ag-selection-fill-right",l===a-1)),n.addOrRemoveCssClass(i?"ag-selection-fill-top":"ag-selection-fill-bottom",this.rowPositionUtils.sameRow(r,t))}}}if(this.rowPositionUtils.sameRow(r,t))break}while(r=i?this.cellNavigationService.getRowAbove(r):this.cellNavigationService.getRowBelow(r))}reduceVertical(e,t){let i=e;do{const e=this.getCellRange(),n=e.columns.length,s=this.rowPositionUtils.sameRow(i,t);for(let s=0;s<n;s++){const n={rowIndex:i.rowIndex,rowPinned:i.rowPinned},r=tt(et({},n),{column:e.columns[s]}),o=this.navigationService.getCellByPosition(r);o&&(this.markedCells.push(o),o.getComp().addOrRemoveCssClass("ag-selection-fill-bottom",this.rowPositionUtils.sameRow(i,t)))}if(s)break}while(i=this.cellNavigationService.getRowAbove(i))}extendHorizontal(e,t,i){const n=this.columnModel.getAllDisplayedColumns(),s=n.indexOf(i?t.column:e.column),r=n.indexOf(i?this.getCellRange().columns[0]:t.column),o=i?0:1,a=n.slice(s+o,r+o),l=this.getRangeStartRow(),c=this.getRangeEndRow();a.forEach(e=>{let t=l,n=!1;do{n=this.rowPositionUtils.sameRow(t,c);const s=this.navigationService.getCellByPosition({rowIndex:t.rowIndex,rowPinned:t.rowPinned,column:e});if(s){this.markedCells.push(s);const n=s.getComp();n.addOrRemoveCssClass("ag-selection-fill-top",this.rowPositionUtils.sameRow(t,l)),n.addOrRemoveCssClass("ag-selection-fill-bottom",this.rowPositionUtils.sameRow(t,c)),i?(this.isLeft=!0,n.addOrRemoveCssClass("ag-selection-fill-left",e===a[0])):n.addOrRemoveCssClass("ag-selection-fill-right",e===ze._.last(a))}t=this.cellNavigationService.getRowBelow(t)}while(!n)})}reduceHorizontal(e,t){const i=this.columnModel.getAllDisplayedColumns(),n=i.indexOf(t.column),s=i.indexOf(e.column),r=i.slice(n,s),o=this.getRangeStartRow(),a=this.getRangeEndRow();r.forEach(e=>{let t=o,i=!1;do{i=this.rowPositionUtils.sameRow(t,a);const n=this.navigationService.getCellByPosition({rowIndex:t.rowIndex,rowPinned:t.rowPinned,column:e});n&&(this.markedCells.push(n),n.getComp().addOrRemoveCssClass("ag-selection-fill-right",e===r[0])),t=this.cellNavigationService.getRowBelow(t)}while(!i)})}refresh(e){const t=this.rangeService.getCellRanges()[0];t.startRow&&t.endRow?super.refresh(e):this.destroy()}};ot.TEMPLATE='<div class="ag-fill-handle"></div>',it([(0,ze.Autowired)("valueService")],ot.prototype,"valueService",2);var at=ot,lt=class e extends st{constructor(){super(e.TEMPLATE),this.type=We.SelectionHandleType.RANGE,this.rangeFixed=!1}onDrag(e){const t=this.getLastCellHovered();if(!t)return;const i=this.rangeService.getCellRanges(),n=We._.last(i);this.rangeFixed||(this.fixRangeStartEnd(n),this.rangeFixed=!0),this.endPosition={rowIndex:t.rowIndex,rowPinned:t.rowPinned,column:t.column},2===i.length&&i[0].type===We.CellRangeType.DIMENSION&&n.type===We.CellRangeType.VALUE&&!this.rowPositionUtils.sameRow(this.endPosition,this.rangeService.getRangeEndRow(n))&&this.rangeService.updateRangeEnd(i[0],tt(et({},this.endPosition),{column:i[0].columns[0]}),!0),this.rangeService.extendLatestRangeToCell(this.endPosition)}onDragEnd(e){const t=We._.last(this.rangeService.getCellRanges());this.fixRangeStartEnd(t),this.rangeFixed=!1}fixRangeStartEnd(e){const t=this.rangeService.getRangeStartRow(e),i=this.rangeService.getRangeEndRow(e),n=e.columns[0];e.startRow=t,e.endRow=i,e.startColumn=n}};lt.TEMPLATE='<div class="ag-range-handle"></div>';var ct=lt,ht=class extends je.BeanStub{createSelectionHandle(e){return this.createBean(e===je.SelectionHandleType.RANGE?new ct:new at)}};ht=it([(0,je.Bean)("selectionHandleFactory")],ht);var dt={version:"31.3.4",moduleName:Be.ModuleNames.RangeSelectionModule,beans:[nt,ht],agStackComponents:[{componentName:"AgFillHandle",componentClass:at},{componentName:"AgRangeHandle",componentClass:ct}],dependantModules:[D]},ut=i(98092),pt=i(21371),gt=i(98092),ft=i(98092),mt=i(98092),vt=i(98092),yt=i(98092),Ct=i(98092),bt=i(98092),St=i(98092),wt=i(98092),xt=i(98092),Et=i(21371),Mt=i(98092),At=i(21371),Tt=i(98092),Dt=i(21371),It=i(98092),Rt=i(98092),Lt=i(98092),kt=i(98092),Pt=i(98092),Nt=i(98092),Ot=i(98092),_t=i(98092),Ft=i(98092),Gt=i(98092),Vt=i(98092),Bt=i(98092),Ht=i(98092),zt=i(98092),Ut=i(98092),Wt=i(98092),jt=i(98092),Kt=i(98092),$t=i(98092),Yt=i(98092),qt=i(98092),Xt=i(98092),Zt=i(98092),Qt=i(21371),Jt=i(98092),ei=i(98092),ti=i(98092),ii=i(98092),ni=i(98092),si=i(98092),ri=i(98092),oi=i(98092),ai=i(98092),li=i(98092),ci=i(98092),hi=i(98092),di=i(98092),ui=i(98092),pi=i(21371),gi=i(21371),fi=i(21371),mi=i(21371),vi=i(21371),yi=i(21371),Ci=i(21371),bi=i(21371),Si=i(21371),wi=i(21371),xi=i(21371),Ei=i(21371),Mi=i(98092),Ai=i(21371),Ti=i(21371),Di=i(21371),Ii=i(21371),Ri=i(21371),Li=i(21371),ki=i(21371),Pi=i(21371),Ni=i(21371),Oi=i(21371),_i=i(21371),Fi=i(21371),Gi=i(98092),Vi=i(98092),Bi=i(98092),Hi=i(21371),zi=i(21371),Ui=i(98092),Wi=i(21371),ji=i(98092),Ki=i(98092),$i=i(98092),Yi=i(98092),qi=i(98092),Xi=i(98092),Zi=i(98092),Qi=i(98092),Ji=i(98092),en=i(98092),tn=i(98092),nn=i(21371);h(Ge,i(21371));var sn=Object.defineProperty,rn=Object.defineProperties,on=Object.getOwnPropertyDescriptor,an=Object.getOwnPropertyDescriptors,ln=Object.getOwnPropertySymbols,cn=Object.prototype.hasOwnProperty,hn=Object.prototype.propertyIsEnumerable,dn=(e,t,i)=>t in e?sn(e,t,{enumerable:!0,configurable:!0,writable:!0,value:i}):e[t]=i,un=(e,t)=>{for(var i in t||(t={}))cn.call(t,i)&&dn(e,i,t[i]);if(ln)for(var i of ln(t))hn.call(t,i)&&dn(e,i,t[i]);return e},pn=(e,t)=>rn(e,an(t)),gn=(e,t)=>{var i={};for(var n in e)cn.call(e,n)&&t.indexOf(n)<0&&(i[n]=e[n]);if(null!=e&&ln)for(var n of ln(e))t.indexOf(n)<0&&hn.call(e,n)&&(i[n]=e[n]);return i},fn=(e,t,i,n)=>{for(var s,r=n>1?void 0:n?on(t,i):t,o=e.length-1;o>=0;o--)(s=e[o])&&(r=(n?s(t,i,r):s(r))||r);return n&&r&&sn(t,i,r),r},mn=class e extends bt.BeanStub{getData(e){if(e.crossFiltering){if(e.grouping)return console.warn("AG Grid: crossing filtering with row grouping is not supported."),{chartData:[],columnNames:{}};if(!this.gos.isRowModelType("clientSide"))return console.warn("AG Grid: crossing filtering is only supported in the client side row model."),{chartData:[],columnNames:{}}}this.gos.isRowModelType("serverSide")&&e.pivoting&&this.updatePivotKeysForSSRM();const t=this.extractRowsFromGridRowModel(e);return t.chartData=this.aggregateRowsByDimension(e,t.chartData),t}extractRowsFromGridRowModel(t){const{crossFiltering:i,startRow:n,endRow:s,valueCols:r,dimensionCols:o,grouping:a}=t;let l=[];const c={},h={},d={};let u,p={},g=[];if(i)p=this.getFilteredRowNodes(),g=this.getAllRowNodes(),u=g.length;else{const e=this.gridRowModel.getRowCount()-1;u=n===s&&0===n&&0===o.length&&0===r.length?0:(s>=0?Math.min(s,e):e)-n+1}u>0&&r.forEach(e=>{let t=[];const i=e.getColDef().pivotKeys;i&&(t=i.slice());const n=e.getColDef().headerName;n&&t.push(n),t.length>0&&(c[e.getId()]=t)});let f,m=0;for(let s=0;s<u;s++){const c=i?g[s]:this.gridRowModel.getRow(s+n);if(c.footer){m++;continue}const u={};o.forEach(t=>{const i=t.colId,n=this.columnModel.getGridColumn(i);if(n){const t=this.valueService.getValue(n,c);if(a){const n=t&&t.toString?String(t.toString()):"",r=e.getGroupLabels(c,n);u[i]={labels:r,toString:function(){return this.labels.filter(e=>!!e).reverse().join(" - ")}},c.group&&(h[r.toString()]=s-m);const o=r.slice(1,r.length).toString();o&&(d[o]=h[o])}else u[i]=t}else u[_n.DEFAULT_CATEGORY]=s+1}),r.forEach(e=>{const n=e.getColId();if(i){const i=n+"-filtered-out",s=this.valueService.getValue(e,c),r=null!=s&&"function"==typeof s.toNumber?s.toNumber():s;p[c.id]?(u[n]=r,u[i]=t.aggFunc||t.isScatter?void 0:0):(u[n]=t.aggFunc||t.isScatter?void 0:0,u[i]=r)}else{let t=this.valueService.getValue(e,c);t&&t.hasOwnProperty("toString")&&(t=parseFloat(t.toString())),u[n]=null!=t&&"function"==typeof t.toNumber?t.toNumber():t}}),l.push(u)}if(a){const e=bt._.values(d),t=l;l=[],f=[];for(let i=0;i<t.length;i++)(bt._.includes(e,i)?f:l).push(t[i])}return{chartData:l,columnNames:c,groupChartData:f}}aggregateRowsByDimension(e,t){const i=e.dimensionCols;if(!e.aggFunc||0===i.length)return t;const n=bt._.last(i),s=n&&n.colId,r={},o=[];if(t.forEach(e=>{let t=r;i.forEach(n=>{const r=n.colId,a=e[r];if(r===s){let n=t[a];n||(n={__children:[]},i.forEach(t=>{const i=t.colId;n[i]=e[i]}),t[a]=n,o.push(n)),n.__children.push(e)}else t[a]||(t[a]={}),t=t[a]})}),bt.ModuleRegistry.__assertRegistered(bt.ModuleNames.RowGroupingModule,"Charting Aggregation",this.context.getGridId())){const t=this.aggregationStage;o.forEach(i=>e.valueCols.forEach(n=>{if(e.crossFiltering)e.valueCols.forEach(n=>{const s=n.getColId(),r=i.__children.filter(e=>void 0!==e[s]).map(e=>e[s]);let o=t.aggregateValues(r,e.aggFunc);i[n.getId()]=o&&void 0!==o.value?o.value:o;const a=`${s}-filtered-out`,l=i.__children.filter(e=>void 0!==e[a]).map(e=>e[a]);let c=t.aggregateValues(l,e.aggFunc);i[a]=c&&void 0!==c.value?c.value:c});else{const s=i.__children.map(e=>e[n.getId()]);let r=t.aggregateValues(s,e.aggFunc);i[n.getId()]=r&&void 0!==r.value?r.value:r}}))}return o}updatePivotKeysForSSRM(){const e=this.columnModel.getSecondaryColumns();if(!e)return;const t=this.extractPivotKeySeparator(e);e.forEach(e=>{if(""===t)e.getColDef().pivotKeys=[];else{const i=e.getColId().split(t);e.getColDef().pivotKeys=i.slice(0,i.length-1)}})}extractPivotKeySeparator(e){if(0===e.length)return"";const t=(e,i)=>{const n=e.getGroupId();return e.getParent()?t(e.getParent(),n):i.split(n)[1][0]},i=e[0];return null==i.getParent()?"":t(i.getParent(),i.getColId())}static getGroupLabels(e,t){const i=[t];for(;e&&0!==e.level;)(e=e.parent)&&i.push(e.key);return i}getFilteredRowNodes(){const e={};return this.gridRowModel.forEachNodeAfterFilterAndSort(t=>{e[t.id]=t}),e}getAllRowNodes(){let e=[];return this.gridRowModel.forEachNode(t=>{e.push(t)}),this.sortRowNodes(e)}sortRowNodes(e){const t=this.sortController.getSortOptions();return t&&0!=t.length?this.rowNodeSorter.doFullSort(e,t):e}};fn([(0,bt.Autowired)("rowModel")],mn.prototype,"gridRowModel",2),fn([(0,bt.Autowired)("valueService")],mn.prototype,"valueService",2),fn([(0,bt.Autowired)("columnModel")],mn.prototype,"columnModel",2),fn([(0,bt.Autowired)("rowNodeSorter")],mn.prototype,"rowNodeSorter",2),fn([(0,bt.Autowired)("sortController")],mn.prototype,"sortController",2),fn([(0,bt.Optional)("aggregationStage")],mn.prototype,"aggregationStage",2);var vn=mn,yn=class extends St.BeanStub{constructor(){super(...arguments),this.valueColsWithoutSeriesType=new Set}postConstruct(){const e=()=>this.valueColsWithoutSeriesType.clear();this.addManagedListener(this.eventService,St.Events.EVENT_NEW_COLUMNS_LOADED,e),this.addManagedListener(this.eventService,St.Events.EVENT_ROW_DATA_UPDATED,e)}getColumn(e){return this.columnModel.getPrimaryColumn(e)}getAllDisplayedColumns(){return this.columnModel.getAllDisplayedColumns()}getColDisplayName(e){return this.columnModel.getDisplayNameForColumn(e,"chart")}getRowGroupColumns(){return this.columnModel.getRowGroupColumns()}getGroupDisplayColumns(){return this.columnModel.getGroupDisplayColumns()}isPivotMode(){return this.columnModel.isPivotMode()}isPivotActive(){return this.columnModel.isPivotActive()}getChartColumns(){const e=this.columnModel.getAllGridColumns(),t=new Set,i=new Set;return e.forEach(e=>{const n=e.getColDef(),s=n.chartDataType;if(s)switch(s){case"category":case"time":return void t.add(e);case"series":return void i.add(e);case"excluded":return;default:console.warn(`AG Grid: unexpected chartDataType value '${s}' supplied, instead use 'category', 'series' or 'excluded'`)}"ag-Grid-AutoColumn"!==n.colId?e.isPrimary()?(this.isInferredValueCol(e)?i:t).add(e):i.add(e):t.add(e)}),{dimensionCols:t,valueCols:i}}isInferredValueCol(e){const t=e.getColId();if("ag-Grid-AutoColumn"===t)return!1;const i=this.rowPositionUtils.getRowNode({rowIndex:0,rowPinned:null});if(!i)return this.valueColsWithoutSeriesType.has(t);let n=this.valueService.getValue(e,i);null==n&&(n=this.extractLeafData(i,e)),null!=n&&"function"==typeof n.toNumber&&(n=n.toNumber());const s="number"==typeof n;return s&&this.valueColsWithoutSeriesType.add(t),s}extractLeafData(e,t){if(!e.allLeafChildren)return null;for(let i=0;i<e.allLeafChildren.length;i++){const n=e.allLeafChildren[i],s=this.valueService.getValue(t,n);if(null!=s)return s}return null}destroy(){this.valueColsWithoutSeriesType.clear(),super.destroy()}};fn([(0,St.Autowired)("columnModel")],yn.prototype,"columnModel",2),fn([(0,St.Autowired)("valueService")],yn.prototype,"valueService",2),fn([(0,St.Autowired)("rowPositionUtils")],yn.prototype,"rowPositionUtils",2),fn([St.PostConstruct],yn.prototype,"postConstruct",1),yn=fn([(0,St.Bean)("chartColumnService")],yn);var Cn=class e extends wt.BeanStub{constructor(e){var t;super(),this.suppressComboChartWarnings=!1,this.chartDataModel=e,this.seriesChartTypes=null!=(t=e.params.seriesChartTypes)?t:[]}init(){this.initComboCharts()}update(e){this.seriesChartTypes=null!=e?e:this.seriesChartTypes,this.initComboCharts(),this.updateSeriesChartTypes()}initComboCharts(){const e=this.seriesChartTypes&&this.seriesChartTypes.length>0;("customCombo"===this.chartDataModel.chartType||e)&&(this.chartDataModel.chartType="customCombo",this.savedCustomSeriesChartTypes=this.seriesChartTypes||[])}updateSeriesChartTypes(){this.chartDataModel.isComboChart()&&(this.seriesChartTypes=this.seriesChartTypes.map(e=>{const t=["groupedColumn","stackedColumn","stackedArea"].includes(e.chartType);return e.secondaryAxis=!t&&e.secondaryAxis,e}),"customCombo"!==this.chartDataModel.chartType?this.updateChartSeriesTypesForBuiltInCombos():this.updateSeriesChartTypesForCustomCombo())}updateSeriesChartTypesForCustomCombo(){this.seriesChartTypes&&this.seriesChartTypes.length>0||this.suppressComboChartWarnings||console.warn("AG Grid: 'seriesChartTypes' are required when the 'customCombo' chart type is specified."),this.seriesChartTypes=this.seriesChartTypes.map(t=>(e.SUPPORTED_COMBO_CHART_TYPES.includes(t.chartType)||(console.warn(`AG Grid: invalid chartType '${t.chartType}' supplied in 'seriesChartTypes', converting to 'line' instead.`),t.chartType="line"),t));const t=this.chartDataModel.valueColState.map(e=>{this.savedCustomSeriesChartTypes&&0!==this.savedCustomSeriesChartTypes.length||(this.savedCustomSeriesChartTypes=this.seriesChartTypes);return this.savedCustomSeriesChartTypes.find(t=>t.colId===e.colId)||(e.selected&&!this.suppressComboChartWarnings&&console.warn(`AG Grid: no 'seriesChartType' found for colId = '${e.colId}', defaulting to 'line'.`),{colId:e.colId,chartType:"line",secondaryAxis:!1})});this.seriesChartTypes=t,this.savedCustomSeriesChartTypes=t,this.suppressComboChartWarnings=!0}updateChartSeriesTypesForBuiltInCombos(){const{chartType:e,valueColState:t}=this.chartDataModel;let i="columnLineCombo"===e?"groupedColumn":"stackedArea",n="columnLineCombo"===e?"line":"groupedColumn";const s=t.filter(e=>e.selected),r=Math.ceil(s.length/2);this.seriesChartTypes=s.map((e,t)=>{const s=t>=r?n:i;return{colId:e.colId,chartType:s,secondaryAxis:!1}})}};Cn.SUPPORTED_COMBO_CHART_TYPES=["line","groupedColumn","stackedColumn","area","stackedArea"],fn([wt.PostConstruct],Cn.prototype,"init",1);var bn=Cn,Sn={area:{isCartesian:!0,canInvert:!0},bar:{isCartesian:!0,canInvert:!0},histogram:{isCartesian:!0},line:{isCartesian:!0,canInvert:!0},pie:{isPie:!0},donut:{isPie:!0,canInvert:!0},scatter:{isCartesian:!0},bubble:{isCartesian:!0},"radial-column":{isPolar:!0,isEnterprise:!0,isRadial:!0,canInvert:!0},"radial-bar":{isPolar:!0,isEnterprise:!0,isRadial:!0,canInvert:!0},"radar-line":{isPolar:!0,isEnterprise:!0,canInvert:!0},"radar-area":{isPolar:!0,isEnterprise:!0,canInvert:!0},nightingale:{isPolar:!0,isEnterprise:!0,canInvert:!0},"range-bar":{isCartesian:!0,isEnterprise:!0,canSwitchDirection:!0},"range-area":{isCartesian:!0,isEnterprise:!0},"box-plot":{isCartesian:!0,isEnterprise:!0,canSwitchDirection:!0},treemap:{isEnterprise:!0,isHierarchical:!0},sunburst:{isEnterprise:!0,isHierarchical:!0},heatmap:{isCartesian:!0,isEnterprise:!0},waterfall:{isCartesian:!0,isEnterprise:!0,canSwitchDirection:!0}};function wn(e){return xt.ChartMappings.COMBO_CHART_TYPES.includes(e)}function xn(e,t){var i;return!!(null==(i=Sn[e])?void 0:i[t])}var En=new Set(["stackedColumn","normalizedColumn","stackedBar","normalizedBar"]);function Mn(e){return xn(e,"isCartesian")}function An(e){return xn(e,"isPolar")}function Tn(e){return xn(e,"isHierarchical")}function Dn(e){return"doughnut"===e?"donut":e}function In(e){return xt.ChartMappings.CHART_TYPE_TO_SERIES_TYPE[e]}function Rn(e){var t;return null!=(t=In(e))?t:"line"}function Ln(e){return xn(e,"isPie")}function kn(e){return Tn(Rn(e))?void 0:1}function Pn(e){return Tn(Rn(e))?2:function(e){return"pie"===e||"waterfall"===e||"histogram"===e}(e)?1:void 0}function Nn(e){return xn(Rn(e),"canInvert")}var On=class e extends Ct.BeanStub{constructor(e){super(),this.unlinked=!1,this.chartData=[],this.valueColState=[],this.dimensionColState=[],this.columnNames={},this.crossFiltering=!1,this.grouping=!1,this.params=e,this.chartId=e.chartId,this.setParams(e)}setParams(e){const{chartType:t,pivotChart:i,chartThemeName:n,switchCategorySeries:s,aggFunc:r,cellRange:o,suppressChartRanges:a,unlinkChart:l,crossFiltering:c,seriesGroupType:h}=e;this.chartType=t,this.pivotChart=null!=i&&i,this.chartThemeName=n,this.switchCategorySeries=!!s,this.aggFunc=r,this.referenceCellRange=o,this.suppliedCellRange=o,this.suppressChartRanges=null!=a&&a,this.unlinked=!!l,this.crossFiltering=!!c,this.seriesGroupType=h}init(){this.datasource=this.createManagedBean(new vn),this.chartColumnService=this.createManagedBean(new yn),this.comboChartModel=this.createManagedBean(new bn(this)),this.updateCellRanges({setColsFromRange:!0}),this.updateData()}updateModel(e){const{cellRange:t,seriesChartTypes:i}=e;t!==this.suppliedCellRange&&(this.dimensionCellRange=void 0,this.valueCellRange=void 0),this.setParams(e),this.updateSelectedDimensions(null==t?void 0:t.columns),this.updateCellRanges({setColsFromRange:!0}),(this.isComboChart()||i)&&this.comboChartModel.update(i),this.unlinked||this.updateData()}updateCellRanges(e){const{updatedColState:t,resetOrder:i,maintainColState:n,setColsFromRange:s}=null!=e?e:{};this.valueCellRange&&(this.referenceCellRange=this.valueCellRange);const{dimensionCols:r,valueCols:o}=this.chartColumnService.getChartColumns(),a=this.getAllColumnsFromRanges();t&&this.updateColumnState(t,i),this.setDimensionCellRange(r,a,t),this.setValueCellRange(o,a,s),t||n||(this.resetColumnState(),this.syncDimensionCellRange()),this.comboChartModel.updateSeriesChartTypes()}updateData(){const{startRow:e,endRow:t}=this.getRowIndexes();this.pivotChart&&this.resetColumnState(),this.grouping=this.isGrouping();const i={aggFunc:this.aggFunc,dimensionCols:this.getSelectedDimensions(),grouping:this.grouping,pivoting:this.isPivotActive(),crossFiltering:this.crossFiltering,valueCols:this.getSelectedValueCols(),startRow:e,endRow:t,isScatter:Ct._.includes(["scatter","bubble"],this.chartType)},{chartData:n,columnNames:s,groupChartData:r}=this.datasource.getData(i);this.chartData=n,this.groupChartData=r,this.columnNames=s,this.categoryAxisType=void 0}isGrouping(){const e=this.gos.get("treeData"),t=e?null:this.chartColumnService.getRowGroupColumns(),i=e||t&&t.length>0,n=this.getSelectedDimensions().map(({colId:e})=>e),s=this.chartColumnService.getGroupDisplayColumns().map(e=>e.getColId()).some(e=>n.includes(e));return!!i&&s}getSelectedValueCols(){return this.valueColState.filter(e=>e.selected).map(e=>e.column)}getSelectedDimensions(){return this.dimensionColState.filter(e=>e.selected)}getColDisplayName(e){return this.chartColumnService.getColDisplayName(e)}isPivotMode(){return this.chartColumnService.isPivotMode()}getChartDataType(e){const t=this.chartColumnService.getColumn(e);return t?t.getColDef().chartDataType:void 0}isPivotActive(){return this.chartColumnService.isPivotActive()}createCellRange(e,...t){return{id:this.chartId,startRow:this.referenceCellRange.startRow,endRow:this.referenceCellRange.endRow,columns:t,startColumn:e===Ct.CellRangeType.DIMENSION||null==this.referenceCellRange.startColumn?t[0]:this.referenceCellRange.startColumn,type:e}}getAllColumnsFromRanges(){if(this.pivotChart)return Ct._.convertToSet(this.chartColumnService.getAllDisplayedColumns());const e=this.dimensionCellRange||this.valueCellRange?[]:this.referenceCellRange.columns;return this.dimensionCellRange&&e.push(...this.dimensionCellRange.columns),this.valueCellRange&&e.push(...this.valueCellRange.columns),Ct._.convertToSet(e)}getRowIndexes(){let e=0,t=0;const{rangeService:i,valueCellRange:n,dimensionCellRange:s}=this,r=n||s;if(i&&r){e=i.getRangeStartRow(r).rowIndex;const n=i.getRangeEndRow(r);t="bottom"===n.rowPinned?-1:n.rowIndex}return{startRow:e,endRow:t}}resetColumnState(){const{dimensionCols:t,valueCols:i}=this.chartColumnService.getChartColumns(),n=this.getAllColumnsFromRanges(),s=this.valueColState.length<1;this.dimensionColState=[],this.valueColState=[];const r=Tn(Rn(this.chartType));let o=!1,a=1;const l=this.suppliedCellRange.columns[0];t.forEach(e=>{const t="ag-Grid-AutoColumn"===e.getColId();let i=!1;this.crossFiltering&&this.aggFunc?l.getColId()===e.getColId()&&(i=!0):i=!!t||(!o||r)&&n.has(e),this.dimensionColState.push({column:e,colId:e.getColId(),displayName:this.getColDisplayName(e),selected:i,order:a++}),i&&(o=!0)});const c={colId:e.DEFAULT_CATEGORY,displayName:this.chartTranslationService.translate("defaultCategory"),selected:!o,order:0};this.dimensionColState.unshift(c);const h=this.referenceCellRange.columns.filter(e=>i.has(e));i.forEach(e=>{s&&Ct._.includes(this.referenceCellRange.columns,e)&&(e=h.shift()),this.valueColState.push({column:e,colId:e.getColId(),displayName:this.getColDisplayName(e),selected:n.has(e),order:a++})})}updateColumnState(e,t){const i=t=>t.colId===e.colId,{dimensionColState:n,valueColState:s}=this,r=n.find(i),o=s.find(i);if(r)if(Tn(Rn(this.chartType)))r.selected=e.selected;else{const t=e.selected?r:n.filter(e=>e!==r).find(({selected:e})=>e);n.forEach(e=>e.selected=e===t)}else o&&(o.selected=e.selected);const a=[...n,...s],l=[];t||(a.forEach((t,i)=>{i===e.order&&l.push(e.colId),t.colId!==e.colId&&l.push(t.colId)}),a.forEach(e=>{const t=l.indexOf(e.colId);e.order=t>=0?l.indexOf(e.colId):a.length-1})),this.reorderColState()}reorderColState(){const e=(e,t)=>e.order-t.order;this.dimensionColState.sort(e),this.valueColState.sort(e)}setDimensionCellRange(t,i,n){this.dimensionCellRange=void 0;const s=Tn(Rn(this.chartType));if(!n&&!this.dimensionColState.length){const e=new Array;return t.forEach(t=>{e.length>0&&!s||!i.has(t)||e.push(t)}),void(e.length>0&&(this.dimensionCellRange=this.createCellRange(Ct.CellRangeType.DIMENSION,...e)))}let r=n?[n]:[];if(this.crossFiltering&&this.aggFunc){const e=this.suppliedCellRange.columns[0];r=this.dimensionColState.filter(t=>t.colId===e.getColId())}else(s||0===r.length||r.some(({column:e})=>!e||!t.has(e)))&&(r=this.dimensionColState.filter(e=>e.selected));const o=1===r.length&&r[0].colId===e.DEFAULT_CATEGORY,a=r.map(({column:e})=>e).filter(e=>null!=e);a.length>0&&!o&&(this.dimensionCellRange=this.createCellRange(Ct.CellRangeType.DIMENSION,...a))}setValueCellRange(e,t,i){this.valueCellRange=void 0;const n=[],s=Pn(this.chartType);let r=0;if(e.forEach(e=>{i?(null==s||r<s)&&t.has(e)&&(n.push(e),r++):this.valueColState.some(t=>t.selected&&t.colId===e.getColId())&&n.push(e)}),n.length>0){let e=[];this.valueColState.length>0?e=this.valueColState.map(e=>e.colId):t.forEach(t=>e.push(t.getColId())),n.sort((t,i)=>e.indexOf(t.getColId())-e.indexOf(i.getColId())),this.valueCellRange=this.createCellRange(Ct.CellRangeType.VALUE,...n)}}resetCellRanges(e,t){if(!e&&!t)return;const{dimensionCols:i,valueCols:n}=this.chartColumnService.getChartColumns(),s=this.getAllColumnsFromRanges();e&&this.setDimensionCellRange(i,s),t&&this.setValueCellRange(n,s)}updateSelectedDimensions(e){const t=new Set(e.map(e=>e.getColId()));if(Tn(Rn(this.chartType))){const e=this.dimensionColState.filter(e=>t.has(e.colId)),i=new Set(e.map(e=>e.colId));this.dimensionColState=this.dimensionColState.map(e=>pn(un({},e),{selected:i.has(e.colId)}))}else{const e=(this.dimensionColState.find(e=>t.has(e.colId))||this.dimensionColState[0]).colId;this.dimensionColState=this.dimensionColState.map(t=>pn(un({},t),{selected:t.colId===e}))}}syncDimensionCellRange(){const e=this.getSelectedDimensions();if(0===e.length)return;const t=e.map(({column:e})=>e).filter(e=>null!=e);t.length>0&&(this.dimensionCellRange=this.createCellRange(Ct.CellRangeType.DIMENSION,...t))}isComboChart(e){return wn(null!=e?e:this.chartType)}};On.DEFAULT_CATEGORY="AG-GRID-DEFAULT-CATEGORY",fn([(0,Ct.Autowired)("rangeService")],On.prototype,"rangeService",2),fn([(0,Ct.Autowired)("chartTranslationService")],On.prototype,"chartTranslationService",2),fn([Ct.PostConstruct],On.prototype,"init",1);var _n=On,Fn=["number","category","grouped-category","log","time"];function Gn(e,t){return!1!==t.clone&&t.isMergeableObject(e)?Un(function(e){return Array.isArray(e)?[]:{}}(e),e,t):e}function Vn(e,t,i){return e.concat(t).map(function(e){return Gn(e,i)})}function Bn(e){return Object.keys(e).concat(function(e){return Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(e).filter(function(t){return e.propertyIsEnumerable(t)}):[]}(e))}function Hn(e,t){try{return t in e}catch(e){return!1}}function zn(e){return function(e){return!!e&&"object"==typeof e}(e)&&!function(e){const t=Object.prototype.toString.call(e);return"[object RegExp]"===t||"[object Date]"===t}(e)}function Un(e,t,i){(i=i||{}).arrayMerge=i.arrayMerge||Vn,i.isMergeableObject=i.isMergeableObject||zn,i.cloneUnlessOtherwiseSpecified=Gn;const n=Array.isArray(t);return n===Array.isArray(e)?n?i.arrayMerge(e,t,i):function(e={},t={},i){const n={};return i.isMergeableObject(e)&&Bn(e).forEach(function(t){n[t]=Gn(e[t],i)}),Bn(t).forEach(function(s){(function(e,t){return Hn(e,t)&&!(Object.hasOwnProperty.call(e,t)&&Object.propertyIsEnumerable.call(e,t))})(e,s)||(Hn(e,s)&&i.isMergeableObject(t[s])?n[s]=function(e,t){if(!t.customMerge)return Un;const i=t.customMerge(e);return"function"==typeof i?i:Un}(s,i)(e[s],t[s],i):n[s]=Gn(t[s],i))}),n}(e,t,i):Gn(t,i)}function Wn(e,t,i){if(null==e)return i;const n=t.split(".");let s=e;for(;n.length>1;)if(s=s[n.shift()],null==s)return i;const r=s[n[0]];return null!=r?r:i}function jn(e){return Mt._.includes(Object.keys(At._Theme.themes),e)}var Kn=Fn.reduce((e,t)=>pn(un({},e),{[t]:{title:{_enabledFromTheme:!0}}}),{});function $n(e,t,i){const n=e.getExtraPaddingDirections();return{common:pn(un({},t?{animation:{duration:500}}:void 0),{axes:Kn,padding:{top:!i&&n.includes("top")?40:20,right:n.includes("right")?30:20,bottom:n.includes("bottom")?40:20,left:n.includes("left")?30:20}}),pie:{series:{title:{_enabledFromTheme:!0},calloutLabel:{_enabledFromTheme:!0},sectorLabel:{enabled:!1,_enabledFromTheme:!0}}},donut:{series:{title:{_enabledFromTheme:!0},calloutLabel:{_enabledFromTheme:!0},sectorLabel:{enabled:!1,_enabledFromTheme:!0}}}}}function Yn(e,t){const{customChartThemes:i}=e,n=i&&i[t];return n||console.warn(`AG Grid: no stock theme exists with the name '${t}' and no custom chart theme with that name was supplied to 'customChartThemes'`),n}var qn=e=>t=>null==t||e(t),Xn=e=>"string"==typeof e,Zn=e=>"boolean"==typeof e,Qn=e=>"object"==typeof e,Jn=(e,t)=>i=>`AG Grid - unable to update chart as invalid params supplied:  \`${e}: ${i}\`, expected ${t}.`,es=e=>`${e} is not supported in AG Charts Community (either 'ag-grid-charts-enterprise' or '@ag-grid-enterprise/charts-enterprise' hasn't been loaded). See https://www.ag-grid.com/javascript-data-grid/integrated-charts-installation/ for more details.`,ts=class e{static isEnterprise(){return Dt._ModuleSupport.enterpriseModule.isEnterprise}static isValidChartType(e){return!!In(e)||wn(e)}static isLegacyChartType(t){return e.legacyChartTypes.includes(t)}static validateUpdateParams(t){switch(t.type){case"rangeChartUpdate":return e.validateUpdateRangeChartParams(t);case"pivotChartUpdate":return e.validateUpdatePivotChartParams(t);case"crossFilterChartUpdate":return e.validateUpdateCrossFilterChartParams(t);default:return console.warn(`AG Grid - Invalid value supplied for 'type': ${t.type}. It must be either 'rangeChartUpdate', 'pivotChartUpdate', or 'crossFilterChartUpdate'.`),!1}}static validateCreateParams(t){return e.validateProperties(t,[e.enterpriseChartTypeValidation,e.switchCategorySeriesValidation])}static validateUpdateRangeChartParams(t){const i=[...e.commonUpdateValidations,e.enterpriseChartTypeValidation,...e.cellRangeValidations,{property:"seriesChartTypes",validationFn:e=>void 0===e||Array.isArray(e)&&e.every(Qn),warnMessage:Jn("seriesChartTypes","Array of SeriesChartType")}];return e.validateProperties(t,i,[...e.baseUpdateChartParams,"cellRange","suppressChartRanges","switchCategorySeries","aggFunc","seriesChartTypes","seriesGroupType"],"UpdateRangeChartParams")}static validateUpdatePivotChartParams(t){const i=[...e.commonUpdateValidations];return e.validateProperties(t,i,[...e.baseUpdateChartParams],"UpdatePivotChartParams")}static validateUpdateCrossFilterChartParams(t){const i=[...e.commonUpdateValidations,...e.cellRangeValidations];return e.validateProperties(t,i,[...e.baseUpdateChartParams,"cellRange","suppressChartRanges","aggFunc"],"UpdateCrossFilterChartParams")}static validateProperties(e,t,i,n){let s;for(const i of t){const{property:t,validationFn:n,warnMessage:r,warnIfFixed:o}=i;if(t in e){const i=e[t],a=n(i);if(!0===a)continue;if(!1===a)return console.warn(r(i)),!1;s=s||un({},e),s[t]=a,o&&console.warn(r(i))}}if(i)for(const t in e)if(!i.includes(t))return console.warn(`AG Grid - Unexpected property supplied. ${n} does not contain: \`${t}\`.`),!1;return s||!0}};ts.legacyChartTypes=["doughnut"],ts.baseUpdateChartParams=["type","chartId","chartType","chartThemeName","chartThemeOverrides","unlinkChart"],ts.validateChartType=qn(e=>{if(ts.isValidChartType(e))return!0;if(ts.isLegacyChartType(e)){const t=Dn(e);return Tt._.warnOnce(`The chart type '${e}' has been deprecated. Please use '${t}' instead.`),t}return!1}),ts.validateAgChartThemeOverrides=qn(e=>"object"==typeof e),ts.validateChartParamsCellRange=qn(e=>"object"==typeof e),ts.validateAggFunc=qn(e=>"string"==typeof e||"function"==typeof e),ts.enterpriseChartTypeValidation={property:"chartType",validationFn:qn(e=>ts.isEnterprise()||!e||!function(e){return xn(Rn(e),"isEnterprise")}(e)),warnMessage:e=>es(`The '${e}' chart type`)},ts.switchCategorySeriesValidation={property:"switchCategorySeries",validationFn:qn(e=>{if(!e||ts.isEnterprise())return!0}),warnMessage:()=>es("'switchCategorySeries' has been ignored as it"),warnIfFixed:!0},ts.commonUpdateValidations=[{property:"chartId",validationFn:Xn,warnMessage:Jn("chartId","string")},{property:"chartType",validationFn:ts.validateChartType,warnMessage:Jn("chartType","ChartType")},{property:"chartThemeName",validationFn:Xn,warnMessage:Jn("chartThemeName","string")},{property:"chartThemeOverrides",validationFn:ts.validateAgChartThemeOverrides,warnMessage:Jn("chartThemeOverrides","AgChartThemeOverrides")},{property:"unlinkChart",validationFn:Zn,warnMessage:Jn("unlinkChart","boolean")}],ts.cellRangeValidations=[{property:"cellRange",validationFn:ts.validateChartParamsCellRange,warnMessage:Jn("cellRange","ChartParamsCellRange")},{property:"suppressChartRanges",validationFn:Zn,warnMessage:Jn("suppressChartRanges","boolean")},{property:"aggFunc",validationFn:ts.validateAggFunc,warnMessage:Jn("aggFunc","string or IAggFunc")},ts.switchCategorySeriesValidation];var is=ts,ns=["ag-default","ag-material","ag-sheets","ag-polychroma","ag-vivid"],ss=class e extends yt.BeanStub{constructor(e){super(),this.model=e,this.isEnterprise=()=>Et._ModuleSupport.enterpriseModule.isEnterprise}init(){this.setChartRange(),this.addManagedListener(this.eventService,yt.Events.EVENT_RANGE_SELECTION_CHANGED,e=>{e.id&&e.id===this.model.chartId&&this.updateForRangeChange()}),this.model.unlinked&&this.rangeService&&this.rangeService.setCellRanges([]),this.addManagedListener(this.eventService,yt.Events.EVENT_COLUMN_MOVED,this.updateForGridChange.bind(this)),this.addManagedListener(this.eventService,yt.Events.EVENT_COLUMN_PINNED,this.updateForGridChange.bind(this)),this.addManagedListener(this.eventService,yt.Events.EVENT_COLUMN_VISIBLE,this.updateForGridChange.bind(this)),this.addManagedListener(this.eventService,yt.Events.EVENT_COLUMN_ROW_GROUP_CHANGED,this.updateForGridChange.bind(this)),this.addManagedListener(this.eventService,yt.Events.EVENT_MODEL_UPDATED,this.updateForGridChange.bind(this)),this.addManagedListener(this.eventService,yt.Events.EVENT_CELL_VALUE_CHANGED,this.updateForDataChange.bind(this))}update(e){if(!this.validUpdateType(e))return!1;const t=is.validateUpdateParams(e);if(!t)return!1;const i=!0===t?e:t;return this.applyValidatedChartParams(i),!0}applyValidatedChartParams(e){var t,i,n,s,r,o,a,l,c;const{chartId:h,chartType:d,chartThemeName:u,unlinkChart:p}=e,g={chartId:h,pivotChart:this.model.pivotChart,chartType:null!=d?d:this.model.chartType,chartThemeName:null!=u?u:this.model.chartThemeName,unlinkChart:null!=p?p:this.model.unlinked,cellRange:this.model.suppliedCellRange,switchCategorySeries:this.model.switchCategorySeries,aggFunc:this.model.aggFunc,seriesChartTypes:void 0,suppressChartRanges:!1,crossFiltering:!1};let f=un({},g);switch(e.type){case"rangeChartUpdate":f.cellRange=null!=(t=this.createCellRange(e))?t:this.model.suppliedCellRange,f.switchCategorySeries=null!=(i=e.switchCategorySeries)?i:this.model.switchCategorySeries,f.aggFunc=null!=(n=e.aggFunc)?n:this.model.aggFunc,f.seriesChartTypes=e.seriesChartTypes,f.suppressChartRanges=null!=(s=e.suppressChartRanges)?s:this.model.suppressChartRanges,f.seriesGroupType=null!=(r=e.seriesGroupType)?r:this.model.seriesGroupType;break;case"crossFilterChartUpdate":f.cellRange=null!=(o=this.createCellRange(e))?o:this.model.suppliedCellRange,f.switchCategorySeries=!1,f.aggFunc=null!=(a=e.aggFunc)?a:this.model.aggFunc,f.crossFiltering=!0,f.suppressChartRanges=null!=(l=e.suppressChartRanges)?l:this.model.suppressChartRanges;break;case"pivotChartUpdate":f.switchCategorySeries=!1}this.model.updateModel(f),f.unlinkChart||f.suppressChartRanges?null==(c=this.rangeService)||c.setCellRanges([]):this.setChartRange()}updateForGridChange(e){if(this.model.unlinked)return;const{maintainColState:t,setColsFromRange:i}=null!=e?e:{};this.model.updateCellRanges({maintainColState:t,setColsFromRange:i}),this.model.updateData(),this.setChartRange()}updateForDataChange(){this.model.unlinked||(this.model.updateData(),this.raiseChartModelUpdateEvent())}updateForRangeChange(){this.updateForGridChange({setColsFromRange:!0}),this.raiseChartRangeSelectionChangedEvent()}updateForPanelChange(e){this.model.updateCellRanges(e),this.model.updateData(),e.skipAnimation&&this.getChartProxy().getChartRef().skipAnimations(),this.setChartRange(),this.raiseChartRangeSelectionChangedEvent()}updateThemeOverrides(e){this.chartProxy.updateThemeOverrides(e)}getChartUpdateParams(e){const t=this.getSelectedValueColState().map(e=>({colId:e.colId,displayName:e.displayName})),i=this.getChartData(),n=this.getSelectedDimensions(),s={data:i,groupData:this.model.groupChartData,grouping:this.isGrouping(),categories:n.map(e=>{var t;return{id:e.colId,name:e.displayName,chartDataType:null!=(t=this.model.categoryAxisType)?t:this.model.getChartDataType(e.colId)}}),fields:t,chartId:this.getChartId(),getCrossFilteringContext:()=>({lastSelectedChartId:"xxx"}),seriesChartTypes:this.getSeriesChartTypes(),updatedOverrides:e,seriesGroupType:this.model.seriesGroupType};return this.isCategorySeriesSwitched()?this.invertCategorySeriesParams(s):s}invertCategorySeriesParams(e){const[t]=e.categories,i=[{id:_n.DEFAULT_CATEGORY,name:""}],n=e.data.map((e,i)=>{const n=`${t.id}:${i}`,s=e[t.id];return{colId:n,displayName:null==s?"":String(s)}}),s=e.fields.map(i=>{const n={[_n.DEFAULT_CATEGORY]:i.displayName};for(const[s,r]of e.data.entries()){const e=`${t.id}:${s}`,o=r[i.colId];n[e]=o}return n});return pn(un({},e),{categories:i,fields:n,data:s})}getChartModel(){const e=this.model.pivotChart?"pivot":"range",t=this.isComboChart()?this.model.comboChartModel.seriesChartTypes:void 0;return{modelType:e,chartId:this.model.chartId,chartType:this.model.chartType,chartThemeName:this.getChartThemeName(),chartOptions:this.chartProxy.getChartThemeOverrides(),chartPalette:this.chartProxy.getChartPalette(),cellRange:this.getCellRangeParams(),switchCategorySeries:this.model.switchCategorySeries,suppressChartRanges:this.model.suppressChartRanges,aggFunc:this.model.aggFunc,unlinkChart:this.model.unlinked,seriesChartTypes:t,seriesGroupType:this.model.seriesGroupType}}getChartId(){return this.model.chartId}getChartData(){return this.model.chartData}getChartType(){return this.model.chartType}setChartType(e){this.updateMultiSeriesAndCategory(this.model.chartType,e),this.model.chartType=e,this.model.comboChartModel.updateSeriesChartTypes(),this.model.switchCategorySeries=!1,this.model.categoryAxisType=void 0,this.model.seriesGroupType=void 0,this.raiseChartModelUpdateEvent(),this.raiseChartOptionsChangedEvent()}isCategorySeriesSwitched(){return this.model.switchCategorySeries&&!this.model.isGrouping()}switchCategorySeries(e){Nn(this.getChartType())&&(this.model.switchCategorySeries=e,this.raiseChartModelUpdateEvent())}getAggFunc(){return this.model.aggFunc}setAggFunc(e,t){this.model.aggFunc!==e&&(this.model.aggFunc=e,t||(this.model.updateData(),this.raiseChartModelUpdateEvent()))}updateMultiSeriesAndCategory(e,t){var i,n;const s=(e,t)=>{let i=0;for(const n of e)n.selected&&(i>=t?n.selected=!1:i++);0===i&&(e[0].selected=!0)},r=kn(t),o=Pn(t),a=null!=r&&(null!=(i=kn(e))?i:100)>(null!=r?r:100),l=null!=o&&(null!=(n=Pn(e))?n:100)>(null!=o?o:100);a&&s(this.model.dimensionColState,r),l&&s(this.model.valueColState,o),(a||l)&&(this.model.resetCellRanges(a,l),this.setChartRange(!0))}setChartThemeName(e,t){this.model.chartThemeName=e,t||(this.raiseChartModelUpdateEvent(),this.raiseChartOptionsChangedEvent())}getChartThemeName(){return this.model.chartThemeName}isPivotChart(){return this.model.pivotChart}isPivotMode(){return this.model.isPivotMode()}isGrouping(){return this.model.isGrouping()}isCrossFilterChart(){return this.model.crossFiltering}getThemeNames(){return this.gos.get("chartThemes")||ns}getThemes(){return this.getThemeNames().map(e=>{const t=jn(e)?e:this.chartProxy.lookupCustomChartTheme(e);return Et._Theme.getChartTheme(t)})}getPalettes(){return this.getThemes().map(e=>e.palette)}getThemeTemplateParameters(){return this.getThemes().map(e=>e.getTemplateParameters())}getValueColState(){return this.model.valueColState.map(this.displayNameMapper.bind(this))}getSelectedValueColState(){return this.getValueColState().filter(e=>e.selected)}getSelectedDimensions(){return this.model.getSelectedDimensions()}displayNameMapper(e){const t=this.model.columnNames[e.colId];return e.displayName=t?t.join(" - "):this.model.getColDisplayName(e.column),e}getColStateForMenu(){return{dimensionCols:this.model.dimensionColState,valueCols:this.getValueColState()}}setChartRange(e=!1){!this.rangeService||this.model.suppressChartRanges||this.model.unlinked||this.rangeService.setCellRanges(this.getCellRanges()),e||this.raiseChartModelUpdateEvent()}detachChartRange(){this.model.unlinked=!this.model.unlinked,this.model.unlinked?this.rangeService&&this.rangeService.setCellRanges([]):this.updateForGridChange(),this.dispatchEvent({type:e.EVENT_CHART_LINKED_CHANGED})}setChartProxy(e){this.chartProxy=e}getChartProxy(){return this.chartProxy}isActiveXYChart(){return yt._.includes(["scatter","bubble"],this.getChartType())}isChartLinked(){return!this.model.unlinked}customComboExists(){const e=this.model.comboChartModel.savedCustomSeriesChartTypes;return e&&e.length>0}getSeriesChartTypes(){return this.model.comboChartModel.seriesChartTypes}isComboChart(e){return this.model.isComboChart(e)}updateSeriesChartType(t,i,n){const s=this.model.comboChartModel.seriesChartTypes.find(e=>e.colId===t);if(s){const t="customCombo"!==this.model.chartType;t&&(this.model.chartType="customCombo");const r=s.chartType;null!=i&&(s.chartType=i),null!=n&&(s.secondaryAxis=n),this.model.comboChartModel.savedCustomSeriesChartTypes=this.model.comboChartModel.seriesChartTypes,this.model.comboChartModel.updateSeriesChartTypes(),this.updateForDataChange(),t&&this.dispatchEvent({type:e.EVENT_CHART_TYPE_CHANGED}),r!==i&&this.dispatchEvent({type:e.EVENT_CHART_SERIES_CHART_TYPE_CHANGED}),this.raiseChartOptionsChangedEvent()}}getActiveSeriesChartTypes(){const e=this.getSelectedValueColState().map(e=>e.colId);return this.getSeriesChartTypes().filter(t=>e.includes(t.colId))}getChartSeriesTypes(e){const t=null!=e?e:this.getChartType();return this.isComboChart(t)?["line","bar","area"]:[Rn(t)]}getChartSeriesType(){const e=this.getSeriesChartTypes();if(0===e.length)return"bar";const t=e[0].chartType;return"columnLineCombo"===t?"bar":"areaColumnCombo"===t?"area":Rn(t)}getCellRanges(){return[this.model.dimensionCellRange,this.model.valueCellRange].filter(e=>e)}createCellRange(e){var t;return e.cellRange&&(null==(t=this.rangeService)?void 0:t.createPartialCellRangeFromRangeParams(e.cellRange,!0))}validUpdateType(e){var t;if(!e.type)return console.warn("AG Grid - Unable to update chart as the 'type' is missing. It must be either 'rangeChartUpdate', 'pivotChartUpdate', or 'crossFilterChartUpdate'."),!1;const i={"Range Chart":()=>!this.isPivotChart()&&!this.isCrossFilterChart(),"Pivot Chart":()=>this.isPivotChart(),"Cross Filter Chart":()=>this.isCrossFilterChart()},n=null!=(t=Object.keys(i).find(e=>i[e]()))?t:"Range Chart",s=e.type===`${n[0].toLowerCase()}${n.slice(1).replace(/ /g,"")}Update`;return s||console.warn(`AG Grid - Unable to update chart as a '${e.type}' update type is not permitted on a ${n}.`),s}getCellRangeParams(){const e=this.getCellRanges(),t=e[0],i=t&&t.startRow||null,n=t&&t.endRow||null;return{rowStartIndex:i&&i.rowIndex,rowStartPinned:i&&i.rowPinned,rowEndIndex:n&&n.rowIndex,rowEndPinned:n&&n.rowPinned,columns:e.reduce((e,t)=>e.concat(t.columns.map(e=>e.getId())),[])}}setCategoryAxisType(e){this.model.categoryAxisType=e,this.raiseChartModelUpdateEvent()}getSeriesGroupType(){var e;return null!=(e=this.model.seriesGroupType)?e:this.chartProxy.getSeriesGroupType()}setSeriesGroupType(e){this.model.seriesGroupType=e,this.raiseChartModelUpdateEvent()}raiseChartModelUpdateEvent(){const t={type:e.EVENT_CHART_MODEL_UPDATE};this.dispatchEvent(t)}raiseChartUpdatedEvent(){const t={type:e.EVENT_CHART_UPDATED};this.dispatchEvent(t)}raiseChartApiUpdateEvent(){const t={type:e.EVENT_CHART_API_UPDATE};this.dispatchEvent(t)}raiseChartOptionsChangedEvent(){const{chartId:e,chartType:t}=this.getChartModel(),i={type:yt.Events.EVENT_CHART_OPTIONS_CHANGED,chartId:e,chartType:t,chartThemeName:this.getChartThemeName(),chartOptions:this.chartProxy.getChartThemeOverrides()};this.eventService.dispatchEvent(i)}raiseChartRangeSelectionChangedEvent(){const e={type:yt.Events.EVENT_CHART_RANGE_SELECTION_CHANGED,id:this.model.chartId,chartId:this.model.chartId,cellRange:this.getCellRangeParams()};this.eventService.dispatchEvent(e)}destroy(){super.destroy(),this.rangeService&&this.rangeService.setCellRanges([])}};ss.EVENT_CHART_UPDATED="chartUpdated",ss.EVENT_CHART_API_UPDATE="chartApiUpdate",ss.EVENT_CHART_MODEL_UPDATE="chartModelUpdate",ss.EVENT_CHART_TYPE_CHANGED="chartTypeChanged",ss.EVENT_CHART_SERIES_CHART_TYPE_CHANGED="chartSeriesChartTypeChanged",ss.EVENT_CHART_LINKED_CHANGED="chartLinkedChanged",fn([(0,yt.Autowired)("rangeService")],ss.prototype,"rangeService",2),fn([yt.PostConstruct],ss.prototype,"init",1);var rs=ss,os=class e extends Lt.Component{constructor(t){super(e.TEMPLATE),this.config=null!=t?t:{};const{selectedValueList:i,valueFormatter:n,valueList:s}=this.config;this.selectedValues=null!=i?i:[],this.valueList=null!=s?s:[],this.valueFormatter=null!=n?n:e=>Lt._.escapeString(e)}init(){const{ariaLabel:e,onValuesChange:t,dragSourceId:i}=this.config;this.dropZonePanel=this.createManagedBean(new cs({getValues:()=>this.selectedValues,setValues:e=>this.updateValues(e),isDraggable:()=>this.selectedValues.length>1},e=>this.valueFormatter(e),e,i)),this.getGui().appendChild(this.dropZonePanel.getGui()),this.initSelect(),null!=t&&(this.onValuesChange=t)}setValues(e,t){const{added:i,removed:n,updated:s}=this.getChanges(this.valueList,e);let r=!1;return(i.length||n.length||s.length)&&(r=!0),this.valueList=e,this.updateValues(t,r,!0),this}setValueFormatter(e){return this.valueFormatter=e,this}initSelect(){const e=this.createSelectOptions();if(!e.length)return!1;const{selectPlaceholder:t}=this.config;return this.eSelect=this.createBean(new Lt.AgSelect({options:e,placeholder:t,onValueChange:e=>this.addValue(e),pickerIcon:"chartsMenuAdd"})),this.getGui().appendChild(this.eSelect.getGui()),!0}createSelectOptions(){let e=[];const{maxSelection:t}=this.config;return t&&this.selectedValues.length>=t||this.valueList.forEach(t=>{this.selectedValues.includes(t)||e.push({value:t,text:this.valueFormatter(t)})}),e}addValue(e){this.dropZonePanel.addItem(e)}updateValues(e,t,i){var n,s,r,o,a;const l=this.selectedValues;this.selectedValues=e;const c=this.getChanges(l,e),h=t||c.added.length||c.removed.length,d=this.gos.getActiveDomElement(),u=null==(n=this.eSelect)?void 0:n.getGui().contains(d),p=null==(s=this.dropZonePanel)?void 0:s.getGui().contains(d);i||null==(r=this.onValuesChange)||r.call(this,c);const g=!!h&&!this.refreshSelect();this.dropZonePanel.refreshGui(),h&&u&&(g?this.dropZonePanel.focusList(!0):null==(o=this.eSelect)||o.getFocusableElement().focus()),p&&!e.length&&(null==(a=this.eSelect)||a.getFocusableElement().focus())}getChanges(e,t){return{added:t.filter(t=>!e.includes(t)),removed:e.filter(e=>!t.includes(e)),updated:t.filter((t,i)=>e[i]!==t),selected:t}}refreshSelect(){if(!this.eSelect)return this.initSelect();const e=this.createSelectOptions();return e.length?(this.eSelect.clearOptions().addOptions(e).setValue(void 0,!0),!0):(Lt._.removeFromParent(this.eSelect.getGui()),this.eSelect=this.destroyBean(this.eSelect),!1)}destroy(){this.destroyBean(this.eSelect),super.destroy()}};os.TEMPLATE='<div class="ag-pill-select" role="presentation"></div>',fn([Lt.PostConstruct],os.prototype,"init",1);var as=os,ls=class extends Lt.PillDragComp{constructor(e,t,i,n,s,r){super(t,i,!1),this.value=e,this.valueFormatter=n,this.draggable=s,this.sourceId=r}getItem(){return this.value}getDisplayName(){return this.valueFormatter(this.value)}getAriaDisplayName(){return this.getDisplayName()}getTooltip(){}createGetDragItem(){return()=>({value:this.value})}getDragSourceType(){return Lt.DragSourceType.ChartPanel}getDragSourceId(){return this.sourceId}isDraggable(){return this.draggable}},cs=class extends Lt.PillDropZonePanel{constructor(e,t,i,n){super(!1),this.model=e,this.valueFormatter=t,this.ariaLabel=i,this.sourceId=n}postConstruct(){super.init()}isItemDroppable(e,t){return this.isSourceEventFromTarget(t)||null!=this.sourceId&&this.sourceId===t.dragSource.sourceId}updateItems(e){this.model.setValues(e)}getExistingItems(){return this.model.getValues()}getIconName(){return this.isPotentialDndItems()?Lt.DragAndDropService.ICON_MOVE:Lt.DragAndDropService.ICON_NOT_ALLOWED}getAriaLabel(){return this.ariaLabel}createPillComponent(e,t,i){return new ls(e,t,i,this.valueFormatter,this.model.isDraggable(),this.sourceId)}getItems(e){return[e.value]}isInterestedIn(e){return e===Lt.DragSourceType.ChartPanel}};fn([Lt.PostConstruct],cs.prototype,"postConstruct",1);var hs=class extends Rt.Component{constructor(e,t,i,n,s){super(s),this.chartController=e,this.autoScrollService=t,this.allowMultipleSelection=i,this.maxSelection=n,this.columnComps=new Map}refreshColumnComps(e){return!!Rt._.areEqual(Rt._.keys(this.columnComps),e.map(({colId:e})=>e))&&(e.forEach(e=>{this.columnComps.get(e.colId).setValue(e.selected,!0)}),!0)}createGroup(e,t,i,n,s){if(this.allowMultipleSelection){const s=e.filter(e=>e.selected);this.valuePillSelect=this.groupComp.createManagedBean(new as({valueList:e,selectedValueList:s,valueFormatter:t,selectPlaceholder:this.chartTranslationService.translate(i),dragSourceId:n,onValuesChange:e=>this.onValueChange(e),maxSelection:this.maxSelection})),this.groupComp.addItem(this.valuePillSelect)}else{const t=this.createValueSelectParams(e);t.onValueChange=t=>{e.forEach(e=>{e.selected=!1}),t.selected=!0,t.colId===_n.DEFAULT_CATEGORY&&this.chartController.setAggFunc(void 0,!0),this.chartController.updateForPanelChange({updatedColState:t,skipAnimation:null==s?void 0:s()})},this.valueSelect=this.groupComp.createManagedBean(new Rt.AgSelect(t)),this.groupComp.addItem(this.valueSelect)}}refreshValueSelect(e){if(!this.valueSelect)return;const{options:t,value:i}=this.createValueSelectParams(e);this.valueSelect.clearOptions().addOptions(t).setValue(i,!0)}createValueSelectParams(e){let t;return{options:e.map(e=>{var i;const n=null!=(i=e.displayName)?i:"";return e.selected&&(t=e),{value:e,text:n}}),value:t}}onDragging(e){const t=this.checkHoveredItem(e);if(!t)return;this.lastDraggedColumn=e.dragItem.columns[0];const{comp:i,position:n}=t,{comp:s,position:r}=this.lastHoveredItem||{};i===s&&n===r||(this.autoScrollService.check(e.event),this.clearHoveredItems(),this.lastHoveredItem={comp:i,position:n},i.getGui().classList.add("ag-list-item-hovered",`ag-item-highlight-${n}`))}checkHoveredItem(e){if(Rt._.missing(e.vDirection))return null;const t=e.event;for(const e of this.columnComps.values()){const i=e.getGui();if(!i.querySelector(".ag-chart-data-column-drag-handle"))continue;const n=i.getBoundingClientRect();if(t.clientY>=n.top&&t.clientY<=n.bottom){const s=i.clientHeight;return{comp:e,position:t.clientY>n.top+s/2?"bottom":"top"}}}return null}onDragLeave(){this.clearHoveredItems()}onDragStop(){if(this.lastHoveredItem){const{dimensionCols:e,valueCols:t}=this.chartController.getColStateForMenu(),i=[...e,...t].find(e=>e.column===this.lastDraggedColumn);if(i){let e=Array.from(this.columnComps.values()).indexOf(this.lastHoveredItem.comp);"bottom"===this.lastHoveredItem.position&&e++,i.order=e,this.chartController.updateForPanelChange({updatedColState:i})}}this.clearHoveredItems(),this.lastDraggedColumn=void 0,this.autoScrollService.ensureCleared()}clearHoveredItems(){this.columnComps.forEach(e=>{e.getGui().classList.remove("ag-list-item-hovered","ag-item-highlight-top","ag-item-highlight-bottom")}),this.lastHoveredItem=void 0}addDragHandle(e,t){const i=Rt._.createIconNoSpan("columnDrag",this.gos);i.classList.add("ag-drag-handle","ag-chart-data-column-drag-handle"),e.getGui().insertAdjacentElement("beforeend",i);const n={type:Rt.DragSourceType.ChartPanel,eElement:i,dragItemName:t.displayName,getDragItem:()=>({columns:[t.column]}),onDragStopped:()=>this.onDragStop()};this.dragAndDropService.addDragSource(n,!0),this.addDestroyFunc(()=>this.dragAndDropService.removeDragSource(n))}addChangeListener(e,t){this.addManagedListener(e,Rt.Events.EVENT_FIELD_VALUE_CHANGED,()=>{t.selected=e.getValue(),this.chartController.updateForPanelChange({updatedColState:t})})}isInterestedIn(e){return e===Rt.DragSourceType.ChartPanel}onValueChange({added:e,updated:t,removed:i,selected:n}){let s,r;const o=()=>{n.forEach((e,t)=>{e.order=t}),r=!0};e.length?(s=e[0],s.selected=!0,o()):i.length?(s=i[0],s.selected=!1):t.length&&(o(),s=t[0]),s&&this.chartController.updateForPanelChange({updatedColState:s,resetOrder:r})}destroy(){this.valuePillSelect=void 0,this.valueSelect=void 0,super.destroy()}};fn([(0,Rt.Autowired)("dragAndDropService")],hs.prototype,"dragAndDropService",2),fn([(0,Rt.Autowired)("chartTranslationService")],hs.prototype,"chartTranslationService",2);var ds=class e extends hs{constructor(t,i,n,s,r,o){super(t,i,s,void 0,e.TEMPLATE),this.title=n,this.dimensionCols=r,this.isOpen=o}init(){this.groupComp=this.createBean(new It.AgGroupComponent({title:this.title,enabled:!0,suppressEnabledCheckbox:!0,suppressOpenCloseIcons:!1,cssIdentifier:"charts-data",expanded:this.isOpen})),this.chartMenuService.isLegacyFormat()?(this.createLegacyCategoriesGroup(this.dimensionCols),this.clearAggFuncControls()):(this.createCategoriesGroup(this.dimensionCols),this.createAggFuncControls(this.dimensionCols)),this.getGui().appendChild(this.groupComp.getGui())}refresh(e){var t;this.chartMenuService.isLegacyFormat()?this.refreshColumnComps(e)||this.recreate(e):(null==(t=this.valuePillSelect)||t.setValues(e,e.filter(e=>e.selected)),this.refreshValueSelect(e),this.refreshAggFuncControls(e,this.chartController.getAggFunc()))}recreate(e){this.isOpen=this.groupComp.isExpanded(),It._.clearElement(this.getGui()),this.destroyBean(this.groupComp),this.dimensionCols=e,this.init()}createCategoriesGroup(e){this.createGroup(e,e=>{var t;return null!=(t=e.displayName)?t:""},"categoryAdd","categorySelect",()=>!this.chartController.getAggFunc())}createLegacyCategoriesGroup(e){const t=`chartDimension${this.groupComp.getCompId()}`,i=this.allowMultipleSelection;if(e.forEach(e=>{var n;const s={label:null!=(n=e.displayName)?n:"",value:e.selected,inputName:t},r=this.groupComp.createManagedBean(i?(()=>{const e=new It.AgCheckbox(s);return e.addCssClass("ag-data-select-checkbox"),e})():new It.AgRadioButton(s));this.addChangeListener(r,e),this.groupComp.addItem(r),this.columnComps.set(e.colId,r),i&&this.addDragHandle(r,e)}),i){const e=this.groupComp.getGui(),t={getIconName:()=>It.DragAndDropService.ICON_MOVE,getContainer:()=>e,onDragging:e=>this.onDragging(e),onDragLeave:()=>this.onDragLeave(),isInterestedIn:this.isInterestedIn.bind(this),targetContainsSource:!0};this.dragAndDropService.addDropTarget(t),this.addDestroyFunc(()=>this.dragAndDropService.removeDropTarget(t))}}createAggFuncControls(e){const t=this.chartController.getAggFunc();this.groupComp.addItem(this.aggFuncToggle=this.createBean(new It.AgToggleButton({label:this.chartTranslationService.translate("aggregate"),labelAlignment:"left",labelWidth:"flex",inputWidth:"flex",value:null!=t,onValueChange:e=>{var t,i;const n=e?"sum":void 0;this.chartController.setAggFunc(n),null==(t=this.aggFuncSelect)||t.setValue(n,!0),null==(i=this.aggFuncSelect)||i.setDisplayed(null!=n)}}))),this.groupComp.addItem(this.aggFuncSelect=this.createBean(new It.AgSelect({options:[{value:"sum",text:this.chartTranslationService.translate("sum")},{value:"first",text:this.chartTranslationService.translate("first")},{value:"last",text:this.chartTranslationService.translate("last")},{value:"min",text:this.chartTranslationService.translate("min")},{value:"max",text:this.chartTranslationService.translate("max")},{value:"count",text:this.chartTranslationService.translate("count")},{value:"avg",text:this.chartTranslationService.translate("avg")}],value:"string"==typeof t?t:void 0,onValueChange:e=>{this.chartController.setAggFunc(e)}}))),this.refreshAggFuncControls(e,t)}refreshAggFuncControls(e,t){var i,n,s,r;const o=e.filter(e=>e.selected).some(e=>e.colId!==_n.DEFAULT_CATEGORY);null==(i=this.aggFuncToggle)||i.setValue(null!=t),null==(n=this.aggFuncSelect)||n.setValue("string"==typeof t?t:void 0,!0),null==(s=this.aggFuncToggle)||s.setDisplayed(o),null==(r=this.aggFuncSelect)||r.setDisplayed(o&&null!=t)}clearAggFuncControls(){this.aggFuncToggle=this.aggFuncToggle&&this.destroyBean(this.aggFuncToggle),this.aggFuncSelect=this.aggFuncSelect&&this.destroyBean(this.aggFuncSelect)}destroy(){this.clearAggFuncControls(),this.groupComp=this.destroyBean(this.groupComp),super.destroy()}};ds.TEMPLATE='<div id="categoriesGroup"></div>',fn([(0,It.Autowired)("chartMenuService")],ds.prototype,"chartMenuService",2),fn([It.PostConstruct],ds.prototype,"init",1);var us=ds,ps=class e extends hs{constructor(t,i,n,s,r,o,a,l){super(t,i,r,o,e.TEMPLATE),this.chartOptionsService=n,this.title=s,this.valueCols=a,this.isOpen=l}init(){if(this.groupComp=this.createBean(new kt.AgGroupComponent({title:this.title,enabled:!0,suppressEnabledCheckbox:!0,suppressOpenCloseIcons:!1,cssIdentifier:"charts-data",expanded:this.isOpen})),this.chartController.isActiveXYChart()){const e=this.groupComp.createManagedBean(new kt.AgToggleButton({label:this.chartTranslationService.translate("paired"),labelAlignment:"left",labelWidth:"flex",inputWidth:"flex",value:this.chartOptionsService.getPairedMode(),onValueChange:e=>{this.chartOptionsService.setPairedMode(!!e),this.chartController.updateForGridChange({maintainColState:!0})}}));this.groupComp.addItem(e)}this.chartMenuService.isLegacyFormat()?this.createLegacySeriesGroup(this.valueCols):this.createSeriesGroup(this.valueCols),this.getGui().appendChild(this.groupComp.getGui())}refresh(e){var t,i;if(this.chartMenuService.isLegacyFormat())if(this.refreshColumnComps(e)){if(this.chartController.isActiveXYChart()){const t=this.generateGetSeriesLabel(e);e.forEach(e=>{this.columnComps.get(e.colId).setLabel(t(e))})}}else this.recreate(e);else null==(t=this.valuePillSelect)||t.setValueFormatter(this.generateGetSeriesLabel(e)),null==(i=this.valuePillSelect)||i.setValues(e,e.filter(e=>e.selected)),this.refreshValueSelect(e)}recreate(e){this.isOpen=this.groupComp.isExpanded(),kt._.clearElement(this.getGui()),this.destroyBean(this.groupComp),this.valueCols=e,this.init()}createSeriesGroup(e){this.createGroup(e,this.generateGetSeriesLabel(e),"seriesAdd","seriesSelect")}createLegacySeriesGroup(e){const t=this.generateGetSeriesLabel(e);e.forEach(e=>{const i=t(e),n=this.groupComp.createManagedBean(new kt.AgCheckbox({label:i,value:e.selected}));n.addCssClass("ag-data-select-checkbox"),this.addChangeListener(n,e),this.groupComp.addItem(n),this.columnComps.set(e.colId,n),this.addDragHandle(n,e)});const i=this.groupComp.getGui(),n={getIconName:()=>kt.DragAndDropService.ICON_MOVE,getContainer:()=>i,onDragging:e=>this.onDragging(e),onDragLeave:()=>this.onDragLeave(),isInterestedIn:this.isInterestedIn.bind(this),targetContainsSource:!0};this.dragAndDropService.addDropTarget(n),this.addDestroyFunc(()=>this.dragAndDropService.removeDropTarget(n))}generateGetSeriesLabel(e){if(!this.chartController.isActiveXYChart())return e=>{var t;return null!=(t=e.displayName)?t:""};const t=e.filter(e=>e.selected),i="bubble"===this.chartController.getChartType(),n=this.chartOptionsService.getPairedMode(),s=new Map;return s.set(0,"X"),s.set(1,"Y"),s.set(2,"size"),e=>{var r;const o=null!=(r=e.displayName)?r:"";if(!e.selected)return o;const a=t.indexOf(e);if(-1===a)return o;let l;return l=n?s.get(a%(i?3:2)):0===a?"X":i&&a%2==0?"size":"Y",`${o} (${l})`}}destroy(){this.groupComp=this.destroyBean(this.groupComp),super.destroy()}};ps.TEMPLATE='<div id="seriesGroup"></div>',fn([(0,kt.Autowired)("chartMenuService")],ps.prototype,"chartMenuService",2),fn([kt.PostConstruct],ps.prototype,"init",1);var gs=ps,fs=class e extends Pt.Component{constructor(t,i,n){super(e.TEMPLATE),this.chartController=t,this.columns=i,this.isOpen=n,this.selectedColIds=[],this.chartTypeComps=new Map,this.secondaryAxisComps=new Map}init(){this.createSeriesChartTypeGroup(this.columns)}refresh(e){Pt._.areEqual(this.getValidColIds(e),this.selectedColIds)?this.refreshComps():this.recreate(e)}recreate(e){this.isOpen=this.seriesChartTypeGroupComp.isExpanded(),Pt._.clearElement(this.getGui()),this.destroyBean(this.seriesChartTypeGroupComp),this.columns=e,this.selectedColIds=[],this.clearComps(),this.init()}getValidColIds(e){const t=this.chartController.getSeriesChartTypes();return e.filter(e=>e.selected&&!!t.filter(t=>t.colId===e.colId)[0]).map(({colId:e})=>e)}createSeriesChartTypeGroup(e){this.seriesChartTypeGroupComp=this.createBean(new Pt.AgGroupComponent({title:this.chartTranslationService.translate("seriesChartType"),enabled:!0,suppressEnabledCheckbox:!0,suppressOpenCloseIcons:!1,cssIdentifier:"charts-data",expanded:this.isOpen}));const t=this.chartController.getSeriesChartTypes();e.forEach(e=>{if(!e.selected)return;const i=t.filter(t=>t.colId===e.colId)[0];if(!i)return;this.selectedColIds.push(e.colId);const n=this.seriesChartTypeGroupComp.createManagedBean(new Pt.AgGroupComponent({title:e.displayName,enabled:!0,suppressEnabledCheckbox:!0,suppressOpenCloseIcons:!0,cssIdentifier:"charts-format-sub-level"})),s=this.seriesChartTypeGroupComp.createManagedBean(new Pt.AgCheckbox({label:this.chartTranslationService.translate("secondaryAxis"),labelWidth:"flex",disabled:(r=i.chartType,["groupedColumn","stackedColumn","stackedArea"].includes(r)),value:!!i.secondaryAxis,onValueChange:t=>this.chartController.updateSeriesChartType(e.colId,void 0,t)}));var r;n.addItem(s);const o=e=>this.chartTranslationService.translate(e),a=[{value:"line",text:o("line")},{value:"area",text:o("area")},{value:"stackedArea",text:o("stackedArea")},{value:"groupedColumn",text:o("groupedColumn")},{value:"stackedColumn",text:o("stackedColumn")}],l=n.createManagedBean(new Pt.AgSelect({labelAlignment:"left",labelWidth:"flex",options:a,value:i.chartType,onValueChange:t=>this.chartController.updateSeriesChartType(e.colId,t)}));n.addItem(l),this.seriesChartTypeGroupComp.addItem(n),this.chartTypeComps.set(e.colId,l),this.secondaryAxisComps.set(e.colId,s)}),this.getGui().appendChild(this.seriesChartTypeGroupComp.getGui())}refreshComps(){const e=this.chartController.getSeriesChartTypes();this.selectedColIds.forEach(t=>{const i=e.find(e=>e.colId===t);if(!i)return;const n=this.chartTypeComps.get(t),s=this.secondaryAxisComps.get(t);null==n||n.setValue(i.chartType),null==s||s.setValue(!!i.secondaryAxis),null==s||s.setDisabled(this.isSecondaryAxisDisabled(i.chartType))})}clearComps(){this.chartTypeComps.clear(),this.secondaryAxisComps.clear()}isSecondaryAxisDisabled(e){return["groupedColumn","stackedColumn","stackedArea"].includes(e)}destroy(){this.clearComps(),this.seriesChartTypeGroupComp=this.destroyBean(this.seriesChartTypeGroupComp),super.destroy()}};fs.TEMPLATE='<div id="seriesChartTypeGroup"></div>',fn([(0,Pt.Autowired)("chartTranslationService")],fs.prototype,"chartTranslationService",2),fn([Pt.PostConstruct],fs.prototype,"init",1);var ms=fs,vs=class e extends Nt.Component{constructor(e,t){super(),this.getValue=e,this.setValue=t}init(){this.switchCategorySeriesToggleButton=this.createManagedBean(new Nt.AgToggleButton({label:this.chartTranslationService.translate("switchCategorySeries"),labelAlignment:"left",labelWidth:"flex",inputWidth:"flex",value:this.getValue(),onValueChange:e=>{this.setValue(e)}}));const t={title:void 0,suppressEnabledCheckbox:!0,suppressOpenCloseIcons:!0,cssIdentifier:"charts-data",expanded:!0,items:[this.switchCategorySeriesToggleButton]};this.setTemplate(e.TEMPLATE,{switchCategorySeriesGroup:t})}refresh(){var e;null==(e=this.switchCategorySeriesToggleButton)||e.setValue(this.getValue(),!0)}};vs.TEMPLATE='<div>\n        <ag-group-component ref="switchCategorySeriesGroup"></ag-group-component>\n    </div>',fn([(0,Nt.Autowired)("chartTranslationService")],vs.prototype,"chartTranslationService",2),fn([Nt.PostConstruct],vs.prototype,"init",1);var ys=vs,Cs={groups:[{type:"categories",isOpen:!0},{type:"series",isOpen:!0},{type:"seriesChartType",isOpen:!0}]},bs=class e extends vt.Component{constructor(t,i){super(e.TEMPLATE),this.chartController=t,this.chartOptionsService=i,this.isSwitchCategorySeriesToggled=!1}init(){this.switchCategorySeriesPanel=this.addComponent(this.createManagedBean(new ys(()=>this.chartController.isCategorySeriesSwitched(),e=>this.chartController.switchCategorySeries(e)))),this.isSwitchCategorySeriesToggled=this.chartController.isCategorySeriesSwitched(),this.createAutoScrollService(),this.updatePanels(),this.addManagedListener(this.chartController,rs.EVENT_CHART_MODEL_UPDATE,this.updatePanels.bind(this)),this.addManagedListener(this.chartController,rs.EVENT_CHART_API_UPDATE,this.updatePanels.bind(this))}destroy(){this.clearPanelComponents(),super.destroy()}updatePanels(){var e,t,i,n,s;const r=this.chartType,o=this.isSwitchCategorySeriesToggled,{dimensionCols:a,valueCols:l}=this.chartController.getColStateForMenu();this.chartType=this.chartController.getChartType(),this.isSwitchCategorySeriesToggled=this.chartController.isCategorySeriesSwitched();const c=this.isSwitchCategorySeriesToggled!==o;this.canRefresh(r,this.chartType)&&!c?(null==(e=this.categoriesDataPanel)||e.refresh(a),null==(t=this.seriesDataPanel)||t.refresh(l),null==(i=this.seriesChartTypePanel)||i.refresh(l)):this.recreatePanels(a,l),null==(n=this.switchCategorySeriesPanel)||n.setDisplayed(Nn(this.chartType)&&!this.chartMenuService.isLegacyFormat()&&!this.chartController.isGrouping()),c&&(null==(s=this.switchCategorySeriesPanel)||s.refresh())}canRefresh(e,t){if(void 0===e)return!1;if(e===t)return!0;const i=e=>["columnLineCombo","areaColumnCombo","customCombo"].includes(e);return!(!i(e)||!i(t))}recreatePanels(e,t){var i;this.clearPanelComponents();const{chartType:n}=this;if(!n)return;const s=this.chartController.isCategorySeriesSwitched(),r=null==(i=this.getDataPanelDef().groups)?void 0:i.map(({type:i,isOpen:r})=>i===(s?"series":"categories")?this.categoriesDataPanel=this.createBean(new us(this.chartController,this.autoScrollService,this.getCategoryGroupTitle(s),this.getCategoryGroupMultipleSelect(n,s),e,r)):i===(s?"categories":"series")?this.seriesDataPanel=this.createBean(new gs(this.chartController,this.autoScrollService,this.chartOptionsService,this.getSeriesGroupTitle(s),this.getSeriesGroupMultipleSelect(n,s),this.getSeriesGroupMaxSelection(n,s),t,r)):"seriesChartType"===i?this.chartController.isComboChart()?this.seriesChartTypePanel=this.createBean(new ms(this.chartController,t,r)):null:(vt._.warnOnce(`Invalid charts data panel group name supplied: '${i}'`),null)).filter(e=>null!=e);r&&this.addPanelComponents(r)}addPanelComponents(e){var t;const i=document.createDocumentFragment();for(const t of e)this.registerComponent(t),i.appendChild(t.getGui());const n=null==(t=this.switchCategorySeriesPanel)?void 0:t.getGui();return this.getGui().insertBefore(i,null!=n?n:null),e}clearPanelComponents(){const e=this.getGui();this.categoriesDataPanel&&e.removeChild(this.categoriesDataPanel.getGui()),this.seriesDataPanel&&e.removeChild(this.seriesDataPanel.getGui()),this.seriesChartTypePanel&&e.removeChild(this.seriesChartTypePanel.getGui()),this.categoriesDataPanel=this.destroyBean(this.categoriesDataPanel),this.seriesDataPanel=this.destroyBean(this.seriesDataPanel),this.seriesChartTypePanel=this.destroyBean(this.seriesChartTypePanel)}createAutoScrollService(){const e=this.getGui();this.autoScrollService=new vt.AutoScrollService({scrollContainer:e,scrollAxis:"y",getVerticalPosition:()=>e.scrollTop,setVerticalPosition:t=>e.scrollTop=t})}addComponent(e){return this.registerComponent(e),this.getGui().appendChild(e.getGui()),e}registerComponent(e){e.addCssClass("ag-chart-data-section")}getDataPanelDef(){var e,t;return null!=(t=null==(e=this.gos.get("chartToolPanelsDef"))?void 0:e.dataPanel)?t:Cs}getCategoryGroupTitle(e){return e?this.chartTranslationService.translate("seriesLabels"):this.chartTranslationService.translate(this.chartController.isActiveXYChart()?"labels":"categories")}getCategoryGroupMultipleSelect(e,t){return!t&&1!==kn(e)}getSeriesGroupTitle(e){return e?this.chartTranslationService.translate("categoryValues"):this.chartTranslationService.translate(this.chartController.isActiveXYChart()?"xyValues":"series")}getSeriesGroupMultipleSelect(e,t){return 1!==this.getSeriesGroupMaxSelection(e,t)}getSeriesGroupMaxSelection(e,t){if(!t)return Pn(e)}};bs.TEMPLATE='<div class="ag-chart-data-wrapper ag-scrollable-container"></div>',fn([(0,vt.Autowired)("chartTranslationService")],bs.prototype,"chartTranslationService",2),fn([(0,vt.Autowired)("chartMenuService")],bs.prototype,"chartMenuService",2),fn([vt.PostConstruct],bs.prototype,"init",1);var Ss=bs,ws=class e extends Ft.Component{constructor(e){super(),this.activeComps=[],this.params=e,this.chartOptions=e.chartMenuUtils.getChartOptions()}init(){const t={cssIdentifier:"charts-format-sub-level",direction:"vertical",suppressOpenCloseIcons:!0,title:this.params.name||this.chartTranslationService.translate("font"),enabled:this.params.enabled,suppressEnabledCheckbox:!!this.params.suppressEnabledCheckbox,onEnableChange:e=>{this.params.onEnableChange&&this.params.onEnableChange(e)}};this.setTemplate(e.TEMPLATE,{fontGroup:t,familySelect:this.getFamilySelectParams(),weightStyleSelect:this.getWeightStyleSelectParams(),sizeSelect:this.getSizeSelectParams(),colorPicker:this.params.chartMenuUtils.getDefaultColorPickerParams(this.params.keyMapper("color"))})}addCompToPanel(e){this.fontGroup.addItem(e),this.activeComps.push(e)}setEnabled(e){this.fontGroup.setEnabled(e)}getFamilySelectParams(){const e=["Arial, sans-serif","Aria Black, sans-serif","Book Antiqua,  serif","Charcoal, sans-serif","Comic Sans MS, cursive","Courier, monospace","Courier New, monospace","Gadget, sans-serif","Geneva, sans-serif","Helvetica, sans-serif","Impact, sans-serif","Lucida Console, monospace","Lucida Grande, sans-serif","Lucida Sans Unicode,  sans-serif","Monaco, monospace","Palatino Linotype, serif","Palatino, serif","Times New Roman, serif","Times, serif","Verdana, sans-serif"],t=this.getInitialFontValue("fontFamily");let i=e[0];if(t){const n=e.map(e=>e.toLowerCase()).indexOf(t.toLowerCase());if(n>=0)i=e[n];else{const n=Ft._.capitalise(t);e.push(n),i=n}}return{options:e.sort().map(e=>({value:e,text:e})),inputWidth:"flex",value:`${i}`,onValueChange:e=>this.setFont({fontFamily:e})}}getSizeSelectParams(){const e=[8,10,12,14,16,18,20,22,24,26,28,30,32,34,36],t=this.getInitialFontValue("fontSize");return Ft._.includes(e,t)||e.push(t),{options:e.sort((e,t)=>e-t).map(e=>({value:`${e}`,text:`${e}`})),inputWidth:"flex",value:`${t}`,onValueChange:e=>this.setFont({fontSize:parseInt(e,10)}),label:this.chartTranslationService.translate("size")}}getWeightStyleSelectParams(){var e,t;const i=null!=(e=this.getInitialFontValue("fontWeight"))?e:"normal",n=null!=(t=this.getInitialFontValue("fontStyle"))?t:"normal",s=[{name:"normal",weight:"normal",style:"normal"},{name:"bold",weight:"bold",style:"normal"},{name:"italic",weight:"normal",style:"italic"},{name:"boldItalic",weight:"bold",style:"italic"}];let r=s.find(e=>e.weight===i&&e.style===n);return r||(r={name:"predefined",weight:i,style:n},s.unshift(r)),{options:s.map(e=>({value:e.name,text:this.chartTranslationService.translate(e.name)})),inputWidth:"flex",value:r.name,onValueChange:e=>{const t=s.find(t=>t.name===e);this.setFont({fontWeight:t.weight,fontStyle:t.style})}}}addItemToPanel(e){this.fontGroup.addItem(e),this.activeComps.push(e)}destroyActiveComps(){this.activeComps.forEach(e=>{Ft._.removeFromParent(e.getGui()),this.destroyBean(e)})}destroy(){this.destroyActiveComps(),super.destroy()}setFont(e){const{keyMapper:t}=this.params;Object.entries(e).forEach(([e,i])=>{i&&this.chartOptions.setValue(t(e),i)})}getInitialFontValue(e){const{keyMapper:t}=this.params;return this.chartOptions.getValue(t(e))}};ws.TEMPLATE='<div class="ag-font-panel">\n            <ag-group-component ref="fontGroup">\n                <ag-select ref="familySelect"></ag-select>\n                <ag-select ref="weightStyleSelect"></ag-select>\n                <div class="ag-charts-font-size-color">\n                    <ag-select ref="sizeSelect"></ag-select>\n                    <ag-color-picker ref="colorPicker"></ag-color-picker>\n                </div>\n            </ag-group-component>\n        </div>',fn([(0,Ft.RefSelector)("fontGroup")],ws.prototype,"fontGroup",2),fn([(0,Ft.Autowired)("chartTranslationService")],ws.prototype,"chartTranslationService",2),fn([Ft.PostConstruct],ws.prototype,"init",1);var xs=ws,Es=class e extends _t.Component{constructor({chartMenuParamsFactory:e,isExpandedOnInit:t=!1}){super(),this.chartMenuUtils=e,this.isExpandedOnInit=t}init(){const t=this.chartMenuUtils.addEnableParams("legend.enabled",{cssIdentifier:"charts-format-top-level",direction:"vertical",title:this.chartTranslationService.translate("legend"),suppressEnabledCheckbox:!1,suppressToggleExpandOnEnableChange:!0,expanded:this.isExpandedOnInit,items:[this.createLabelPanel()]});this.setTemplate(e.TEMPLATE,{legendGroup:t,legendPositionSelect:this.chartMenuUtils.getDefaultLegendParams("legend.position"),legendPaddingSlider:this.getSliderParams("spacing","spacing",200),markerSizeSlider:this.getSliderParams("item.marker.size","markerSize",40),markerStrokeSlider:this.getSliderParams("item.marker.strokeWidth","markerStroke",10),markerPaddingSlider:this.getSliderParams("item.marker.padding","itemSpacing",20),itemPaddingXSlider:this.getSliderParams("item.paddingX","layoutHorizontalSpacing",50),itemPaddingYSlider:this.getSliderParams("item.paddingY","layoutVerticalSpacing",50)})}getSliderParams(e,t,i){return this.chartMenuUtils.getDefaultSliderParams(`legend.${e}`,t,i)}createLabelPanel(){const e={enabled:!0,suppressEnabledCheckbox:!0,chartMenuUtils:this.chartMenuUtils,keyMapper:e=>`legend.item.label.${e}`};return this.createManagedBean(new xs(e))}};Es.TEMPLATE='<div>\n            <ag-group-component ref="legendGroup">\n                <ag-select ref="legendPositionSelect"></ag-select>\n                <ag-slider ref="legendPaddingSlider"></ag-slider>\n                <ag-slider ref="markerSizeSlider"></ag-slider>\n                <ag-slider ref="markerStrokeSlider"></ag-slider>\n                <ag-slider ref="markerPaddingSlider"></ag-slider>\n                <ag-slider ref="itemPaddingXSlider"></ag-slider>\n                <ag-slider ref="itemPaddingYSlider"></ag-slider>\n            </ag-group-component>\n        </div>',fn([(0,_t.Autowired)("chartTranslationService")],Es.prototype,"chartTranslationService",2),fn([_t.PostConstruct],Es.prototype,"init",1);var Ms=Es,As=class e extends Vt.Component{constructor(e){super(),this.chartMenuUtils=e}init(){const t=this.chartMenuUtils.addEnableParams("tick.enabled",{cssIdentifier:"charts-format-sub-level",direction:"vertical",suppressOpenCloseIcons:!0,title:this.chartTranslationService.translate("ticks"),suppressEnabledCheckbox:!1}),i=this.chartMenuUtils.getDefaultColorPickerParams("tick.color"),n=this.chartMenuUtils.getDefaultSliderParams("tick.width","width",10),s=this.chartMenuUtils.getDefaultSliderParams("tick.size","length",30);this.setTemplate(e.TEMPLATE,{axisTicksGroup:t,axisTicksColorPicker:i,axisTicksWidthSlider:n,axisTicksSizeSlider:s})}};As.TEMPLATE='<div>\n            <ag-group-component ref="axisTicksGroup">\n                <ag-color-picker ref="axisTicksColorPicker"></ag-color-picker>\n                <ag-slider ref="axisTicksWidthSlider"></ag-slider>\n                <ag-slider ref="axisTicksSizeSlider"></ag-slider>\n            </ag-group-component>\n        </div>',fn([(0,Vt.Autowired)("chartTranslationService")],As.prototype,"chartTranslationService",2),fn([Vt.PostConstruct],As.prototype,"init",1);var Ts=As,Ds=class e extends Bt.Component{constructor(e){super(),this.chartMenuUtils=e,this.chartOptions=e.getChartOptions()}init(){const t=this.chartMenuUtils.addEnableParams("gridLine.enabled",{cssIdentifier:"charts-format-sub-level",direction:"vertical",suppressOpenCloseIcons:!0,title:this.chartTranslationService.translate("gridLines"),suppressEnabledCheckbox:!1}),i=this.getGridLineColorPickerParams("color"),n=this.getGridLineWidthSliderParams("thickness"),s=this.getGridLineDashSliderParams("lineDash");this.setTemplate(e.TEMPLATE,{gridLineGroup:t,gridLineColorPicker:i,gridLineWidthSlider:n,gridLineLineDashSlider:s})}getGridLineColorPickerParams(e){return this.chartMenuUtils.getDefaultColorPickerParams("gridLine.style",e,{formatInputValue:e=>{var t;return null==(t=null==e?void 0:e[0])?void 0:t.stroke},parseInputValue:e=>{var t;const i=null!=(t=this.chartOptions.getValue("gridLine.style"))?t:[];return 0===i.length?[{stroke:e,lineDash:[]}]:[pn(un({},i[0]),{stroke:e})]}})}getGridLineWidthSliderParams(e){return this.chartMenuUtils.getDefaultSliderParams("gridLine.width",e,10)}getGridLineDashSliderParams(e){var t,i;const n=this.chartOptions.getValue("gridLine.style"),s=null==(i=null==(t=null==n?void 0:n[0])?void 0:t.lineDash)?void 0:i[0],r=this.chartMenuUtils.getDefaultSliderParamsWithoutValueParams(null!=s?s:0,e,30);return r.onValueChange=e=>{const t=this.chartOptions.getValue("gridLine.style.0.stroke");this.chartOptions.setValue("gridLine.style",[{lineDash:[e],stroke:t}])},r}};Ds.TEMPLATE='<div>\n            <ag-group-component ref="gridLineGroup">\n                <ag-color-picker ref="gridLineColorPicker"></ag-color-picker>\n                <ag-slider ref="gridLineWidthSlider"></ag-slider>\n                <ag-slider ref="gridLineLineDashSlider"></ag-slider>\n            </ag-group-component>\n        </div>',fn([(0,Bt.Autowired)("chartTranslationService")],Ds.prototype,"chartTranslationService",2),fn([Bt.PostConstruct],Ds.prototype,"init",1);var Is=Ds,Rs=class e extends Ht.AgAbstractLabel{constructor(t){super(t,e.TEMPLATE),this.radius=0,this.offsetX=0,this.offsetY=0}postConstruct(){super.postConstruct();const{value:e,onValueChange:t}=this.config;null!=e&&this.setValue(e,void 0,!0),null!=t&&this.onValueChange(t),this.dragListener={eElement:this.eParentCircle,dragStartPixels:0,onDragStart:e=>{this.parentCircleRect=this.eParentCircle.getBoundingClientRect()},onDragging:e=>this.calculateAngleDrag(e),onDragStop:()=>{}},this.dragService.addDragSource(this.dragListener),this.eAngleValue.setLabel("").setLabelWidth(5).setInputWidth(45).setMin(0).setMax(360).setValue(`${this.degrees}`).onValueChange(e=>{null!=e&&""!==e||(e="0"),e=this.eAngleValue.normalizeValue(e);let t=parseFloat(e);t>180&&(t-=360),this.setValue(t)}),this.updateNumberInput(),Ht._.exists(this.getValue())&&this.eAngleValue.setValue(this.normalizeNegativeValue(this.getValue()).toString()),this.addManagedListener(this,Ht.Events.EVENT_FIELD_VALUE_CHANGED,()=>{this.eAngleValue.getInputElement().contains(this.gos.getActiveDomElement())||this.updateNumberInput()})}updateNumberInput(){const e=this.normalizeNegativeValue(this.getValue());this.eAngleValue.setValue(e.toString())}positionChildCircle(e){const t=this.parentCircleRect||{width:24,height:24},i=this.eChildCircle,n=t.width/2,s=t.height/2;i.style.left=`${n+8*Math.cos(e)}px`,i.style.top=`${s+8*Math.sin(e)}px`}calculatePolar(){const e=this.offsetX,t=this.offsetY,i=Math.atan2(t,e);this.degrees=this.toDegrees(i),this.radius=Math.sqrt(e*e+t*t),this.positionChildCircle(i)}calculateCartesian(){const e=this.toRadians(this.getValue()),t=this.getRadius();this.setOffsetX(Math.cos(e)*t).setOffsetY(Math.sin(e)*t)}setOffsetX(e){return this.offsetX!==e&&(this.offsetX=e,this.calculatePolar()),this}setOffsetY(e){return this.offsetY!==e&&(this.offsetY=e,this.calculatePolar()),this}calculateAngleDrag(e){const t=this.parentCircleRect,i=t.width/2,n=t.height/2,s=e.clientX-t.left-i,r=e.clientY-t.top-n,o=Math.atan2(r,s);this.setValue(o,!0)}toDegrees(e){return e/Math.PI*180}toRadians(e){return e/180*Math.PI}normalizeNegativeValue(e){return e<0?360+e:e}normalizeAngle180(e){return(e%=2*Math.PI)<-Math.PI?e+=2*Math.PI:e>=Math.PI&&(e-=2*Math.PI),e}getRadius(){return this.radius}setRadius(e){return this.radius===e||(this.radius=e,this.calculateCartesian()),this}onValueChange(e){return this.addManagedListener(this,Ht.Events.EVENT_FIELD_VALUE_CHANGED,()=>{e(this.degrees)}),this}getValue(e){return e?this.toRadians(this.degrees):this.degrees}setValue(e,t,i){let n;return n=t?e:this.normalizeAngle180(this.toRadians(e)),e=this.toDegrees(n),this.degrees!==e&&(this.degrees=Math.floor(e),this.calculateCartesian(),this.positionChildCircle(n),i||this.dispatchEvent({type:Ht.Events.EVENT_FIELD_VALUE_CHANGED})),this}setWidth(e){return Ht._.setFixedWidth(this.getGui(),e),this}setDisabled(e){return super.setDisabled(e),this.eAngleValue.setDisabled(e),this}destroy(){this.dragService.removeDragSource(this.dragListener),super.destroy()}};Rs.TEMPLATE='<div class="ag-angle-select">\n            <div ref="eLabel"></div>\n            <div class="ag-wrapper ag-angle-select-wrapper">\n                <div ref="eAngleSelectField" class="ag-angle-select-field">\n                    <div ref="eParentCircle" class="ag-angle-select-parent-circle">\n                        <div ref="eChildCircle" class="ag-angle-select-child-circle"></div>\n                    </div>\n                </div>\n                <ag-input-number-field ref="eAngleValue"></ag-input-number-field>\n            </div>\n        </div>',fn([(0,Ht.RefSelector)("eLabel")],Rs.prototype,"eLabel",2),fn([(0,Ht.RefSelector)("eParentCircle")],Rs.prototype,"eParentCircle",2),fn([(0,Ht.RefSelector)("eChildCircle")],Rs.prototype,"eChildCircle",2),fn([(0,Ht.RefSelector)("eAngleValue")],Rs.prototype,"eAngleValue",2),fn([(0,Ht.Autowired)("dragService")],Rs.prototype,"dragService",2);var Ls=Rs,ks=class extends zt.BeanStub{constructor(e){super(),this.chartOptionsProxy=e}getDefaultColorPickerParams(e,t,i){return this.addValueParams(e,{label:this.chartTranslationService.translate(null!=t?t:"color"),labelWidth:"flex",inputWidth:"flex"},i)}getDefaultNumberInputParams(e,t,i){return this.addValueParams(e,{label:this.chartTranslationService.translate(t),labelWidth:"flex",inputWidth:"flex",precision:null==i?void 0:i.precision,step:null==i?void 0:i.step,min:null==i?void 0:i.min,max:null==i?void 0:i.max},{parseInputValue:e=>{const t=Number(e);return isNaN(t)?void 0:t},formatInputValue:e=>null==e?"":`${e}`})}getDefaultSliderParams(e,t,i,n){var s;let r=null!=(s=this.chartOptionsProxy.getValue(e))?s:0;n&&Array.isArray(r)&&(r=r[0]);const o=this.getDefaultSliderParamsWithoutValueParams(r,t,i);return o.onValueChange=t=>this.chartOptionsProxy.setValue(e,n?[t]:t),o}getDefaultSliderParamsWithoutValueParams(e,t,i){return{label:this.chartTranslationService.translate(t),minValue:0,maxValue:Math.max(e,i),textFieldWidth:45,value:`${e}`}}getDefaultCheckboxParams(e,t,i){const n=this.chartOptionsProxy.getValue(e),s={label:this.chartTranslationService.translate(t),value:n,readOnly:null==i?void 0:i.readOnly,passive:null==i?void 0:i.passive};return s.onValueChange=t=>{this.chartOptionsProxy.setValue(e,"boolean"==typeof t?t:void 0)},s}getDefaultSelectParams(e,t,i,n){const s=this.chartOptionsProxy.getValue(e),r={label:this.chartTranslationService.translate(t),value:s,options:i,pickerType:null==n?void 0:n.pickerType,pickerAriaLabelKey:null==n?void 0:n.pickerAriaLabelKey,pickerAriaLabelValue:null==n?void 0:n.pickerAriaLabelValue};return r.onValueChange=t=>{this.chartOptionsProxy.setValue(e,t)},r}getDefaultLegendParams(e){return this.addValueParams(e,{label:this.chartTranslationService.translate("position"),labelWidth:"flex",inputWidth:"flex",options:["top","right","bottom","left"].map(e=>({value:e,text:this.chartTranslationService.translate(e)}))})}getDefaultFontPanelParams(e,t){const i=t=>`${e}.${t}`;return this.addEnableParams(i("enabled"),{name:this.chartTranslationService.translate(t),suppressEnabledCheckbox:!1,chartMenuUtils:this,keyMapper:i})}addValueParams(e,t,i){const n=this.chartOptionsProxy.getValue(e);return t.value=(null==i?void 0:i.formatInputValue)?i.formatInputValue(n):n,t.onValueChange=t=>{const n=(null==i?void 0:i.parseInputValue)?i.parseInputValue(t):t;this.chartOptionsProxy.setValue(e,n)},t}addEnableParams(e,t){var i;return t.enabled=null!=(i=this.chartOptionsProxy.getValue(e))&&i,t.onEnableChange=t=>this.chartOptionsProxy.setValue(e,t),t}getChartOptions(){return this.chartOptionsProxy}};fn([(0,zt.Autowired)("chartTranslationService")],ks.prototype,"chartTranslationService",2);var Ps=class e extends Gt.Component{constructor(e,{chartController:t,chartOptionsService:i,isExpandedOnInit:n=!1,seriesType:s}){super(),this.activePanels=[],this.axisLabelUpdateFuncs=[],this.axisType=e,this.chartController=t,this.chartAxisOptionsProxy=i.getCartesianAxisOptionsProxy(e),this.chartAxisThemeOverridesProxy=i.getCartesianAxisThemeOverridesProxy(e),this.chartAxisAppliedThemeOverridesProxy=i.getCartesianAxisAppliedThemeOverridesProxy(e),this.chartOptionsSeriesProxy=i.getSeriesOptionsProxy(()=>null!=s?s:this.chartController.getChartSeriesType()),this.chartOptionsService=i,this.isExpandedOnInit=n}init(){var t;const i=this.axisType,n={cssIdentifier:"charts-format-top-level",direction:"vertical",title:this.translate(i),expanded:this.isExpandedOnInit,suppressEnabledCheckbox:!0},s=this.createManagedBean(new ks(this.chartAxisOptionsProxy)),r=this.createManagedBean(new ks(this.chartAxisThemeOverridesProxy)),o=this.getAxisTypeSelectParams(s,this.chartAxisAppliedThemeOverridesProxy),a=this.getAxisPositionSelectParams(s),l=this.getAxisTimeFormatSelectParams(s),c=this.getAxisColorInputParams(r),h=this.getAxisLineWidthSliderParams(r);this.setTemplate(e.TEMPLATE,{axisGroup:n,axisTypeSelect:null!=o?o:void 0,axisPositionSelect:null!=a?a:void 0,axisTimeFormatSelect:null!=l?l:void 0,axisColorInput:c,axisLineWidthSlider:h}),this.axisTypeSelect.setDisplayed(!!(null==(t=o.options)?void 0:t.length)),a||this.removeTemplateComponent(this.axisPositionSelect);const d=()=>{const e="time"===this.chartAxisOptionsProxy.getValue("type");Gt._.setDisplayed(this.axisTimeFormatSelect.getGui(),e)};l?(d(),this.addManagedListener(this.eventService,Gt.Events.EVENT_CHART_OPTIONS_CHANGED,e=>{d()})):this.removeTemplateComponent(this.axisTimeFormatSelect),this.initGridLines(r),this.initAxisTicks(r),this.initAxisLabels(r),this.addManagedListener(this.chartController,rs.EVENT_CHART_UPDATED,()=>this.axisLabelUpdateFuncs.forEach(e=>e())),this.addManagedListener(this.chartController,rs.EVENT_CHART_MODEL_UPDATE,()=>setTimeout(()=>{this.refreshAxisTypeSelect(s),d()}))}getAxisTypeSelectParams(e,t){const i=e.getChartOptions(),n=this.getAxisTypeSelectOptions(),s=e.getDefaultSelectParams("type","axisType",n);return s.onValueChange=e=>{var n;const s=i.getValue("type");if(e===s)return;const r=t.getValue("*"),o="time"===e,a="time"===s!==o?o?"%d %B %Y":void 0:null;if(this.chartOptionsService.setCartesianCategoryAxisType(this.axisType,e),null!==a){const e=null!=(n=i.getValue("label"))?n:{};i.setValue("label",pn(un({},e),{format:a}))}t.setValue("*",r)},s}refreshAxisTypeSelect(e){const t=this.getAxisTypeSelectOptions(),i=!!t.length;this.axisTypeSelect.setDisplayed(i),i&&this.axisTypeSelect.clearOptions().addOptions(t).setValue(e.getChartOptions().getValue("type"))}getAxisTypeSelectOptions(){const e=this.chartController.getChartType();return["heatmap","histogram","boxPlot","rangeBar","scatter","bubble"].includes(e)||this.chartController.isGrouping()||!this.isCategoryAxis()||this.chartController.isCategorySeriesSwitched()||!(()=>{const e=this.chartController.getChartData()[0];return!!e&&this.chartController.getSelectedDimensions().every(t=>!isNaN(parseFloat(e[t.colId])))})()?[]:["category","number","time"].map(e=>({value:e,text:this.translate(e)}))}isCategoryAxis(){const e="horizontal"===this.chartOptionsSeriesProxy.getValue("direction");return e&&"yAxis"===this.axisType||!e&&"xAxis"===this.axisType}getAxisPositionSelectParams(e){const t=((e,t)=>{if("heatmap"===e)return null;switch(t){case"xAxis":return[{value:"top",text:this.translate("top")},{value:"bottom",text:this.translate("bottom")}];case"yAxis":return[{value:"left",text:this.translate("left")},{value:"right",text:this.translate("right")}]}})(this.chartController.getChartType(),this.axisType);return t?e.getDefaultSelectParams("position","position",t):null}getAxisTimeFormatSelectParams(e){if(!this.isCategoryAxis())return null;const t=[{value:"%d/%m/%Y",text:this.translate("timeFormatSlashesDDMMYYYY")},{value:"%m/%d/%Y",text:this.translate("timeFormatSlashesMMDDYYYY")},{value:"%d/%m/%y",text:this.translate("timeFormatSlashesDDMMYY")},{value:"%m/%d/%y",text:this.translate("timeFormatSlashesMMDDYY")},{value:"%d.%e.%y",text:this.translate("timeFormatDotsDDMYY")},{value:"%e.%d.%y",text:this.translate("timeFormatDotsMDDYY")},{value:"%Y-%m-%d",text:this.translate("timeFormatDashesYYYYMMDD")},{value:"%d %B %Y",text:this.translate("timeFormatSpacesDDMMMMYYYY")},{value:"%H:%M:%S",text:this.translate("timeFormatHHMMSS")},{value:"%I:%M:%S %p",text:this.translate("timeFormatHHMMSSAmPm")}];return e.getDefaultSelectParams("label.format","timeFormat",t)}getAxisColorInputParams(e){return e.getDefaultColorPickerParams("line.color")}getAxisLineWidthSliderParams(e){var t;const i=e.getChartOptions(),n=e.getDefaultSliderParamsWithoutValueParams(null!=(t=i.getValue("line.enabled")?i.getValue("line.width"):null)?t:0,"thickness",10);return n.onValueChange=e=>{var t;t=0===e?null:e,i.setValues([{expression:"line.enabled",value:null!=t},{expression:"line.width",value:null!=t?t:0}])},n}initGridLines(e){if("heatmap"!==this.chartController.getChartType()){const t=this.createBean(new Is(e));this.axisGroup.addItem(t),this.activePanels.push(t)}}initAxisTicks(e){if(!this.hasConfigurableAxisTicks())return;const t=this.createBean(new Ts(e));this.axisGroup.addItem(t),this.activePanels.push(t)}hasConfigurableAxisTicks(){switch(this.chartController.getChartType()){case"radarLine":case"radarArea":case"rangeBar":case"boxPlot":case"waterfall":return!1;default:return!0}}initAxisLabels(e){const t={name:this.translate("labels"),enabled:!0,suppressEnabledCheckbox:!0,chartMenuUtils:e,keyMapper:e=>`label.${e}`},i=this.createBean(new xs(t));this.axisGroup.addItem(i),this.activePanels.push(i),this.addAdditionalLabelComps(i,e)}addAdditionalLabelComps(e,t){this.addLabelPadding(e,t);const i=this.createRotationWidget("labelRotation",t),n=this.initLabelRotation(i,t);e.addCompToPanel(n),e.addCompToPanel(i)}initLabelRotation(e,t){const i=t.getChartOptions(),n=()=>i.getValue("label.rotation"),s="number"!=typeof n()&&i.getValue("label.autoRotate"),r=this.createBean(new Gt.AgCheckbox({label:this.translate("autoRotate"),value:s,onValueChange:t=>{t&&(this.prevRotation=n()),i.setValues([{expression:"label.autoRotate",value:t},{expression:"label.rotation",value:t?void 0:this.prevRotation}]),e.setDisabled(t)}}));return e.setDisabled(s),r}createRotationWidget(e,t){var i;const n=t.getChartOptions(),s=()=>n.getValue("label.rotation"),r=String.fromCharCode(176),o=`${this.chartTranslationService.translate(e)} ${r}`,a=new Ls({label:o,labelWidth:"flex",value:null!=(i=s())?i:0,onValueChange:e=>n.setValue("label.rotation",e)});return this.axisLabelUpdateFuncs.push(()=>{var e;a.setValue(null!=(e=s())?e:0)}),this.createBean(a)}addLabelPadding(e,t){const i=this.createBean(new Gt.AgSlider(t.getDefaultSliderParams("label.padding","padding",30)));e.addCompToPanel(i)}translate(e){return this.chartTranslationService.translate(e)}removeTemplateComponent(e){Gt._.removeFromParent(e.getGui()),this.destroyBean(e)}destroyActivePanels(){this.activePanels.forEach(e=>{Gt._.removeFromParent(e.getGui()),this.destroyBean(e)})}destroy(){this.destroyActivePanels(),super.destroy()}};Ps.TEMPLATE='<div>\n            <ag-group-component ref="axisGroup">\n                <ag-select ref="axisTypeSelect"></ag-select>\n                <ag-select ref="axisTimeFormatSelect"></ag-select>\n                <ag-select ref="axisPositionSelect"></ag-select>\n                <ag-color-picker ref="axisColorInput"></ag-color-picker>\n                <ag-slider ref="axisLineWidthSlider"></ag-slider>\n            </ag-group-component>\n        </div>',fn([(0,Gt.RefSelector)("axisGroup")],Ps.prototype,"axisGroup",2),fn([(0,Gt.RefSelector)("axisTypeSelect")],Ps.prototype,"axisTypeSelect",2),fn([(0,Gt.RefSelector)("axisPositionSelect")],Ps.prototype,"axisPositionSelect",2),fn([(0,Gt.RefSelector)("axisTimeFormatSelect")],Ps.prototype,"axisTimeFormatSelect",2),fn([(0,Gt.Autowired)("chartTranslationService")],Ps.prototype,"chartTranslationService",2),fn([Gt.PostConstruct],Ps.prototype,"init",1);var Ns=Ps,Os=class e extends Ut.Component{constructor({chartController:e,chartAxisMenuParamsFactory:t,isExpandedOnInit:i=!1}){super(),this.chartController=e,this.chartMenuUtils=t,this.isExpandedOnInit=i}init(){const t={cssIdentifier:"charts-format-top-level",direction:"vertical",title:this.translate("polarAxis"),expanded:this.isExpandedOnInit,suppressEnabledCheckbox:!0},i=this.chartMenuUtils.getDefaultColorPickerParams("line.color"),n=this.chartMenuUtils.getDefaultSliderParams("line.width","thickness",10);this.setTemplate(e.TEMPLATE,{axisGroup:t,axisColorInput:i,axisLineWidthSlider:n}),this.initAxis(),this.initAxisLabels(),this.initRadiusAxis()}initAxis(){const e=this.chartController.getChartType();if(["radarLine","radarArea"].includes(e)){const e=[{value:"circle",text:this.translate("circle")},{value:"polygon",text:this.translate("polygon")}];this.axisGroup.addItem(this.createSelect({labelKey:"shape",options:e,property:"shape"}))}"pie"!==e&&this.axisGroup.addItem(this.createSlider({labelKey:"innerRadius",defaultMaxValue:1,property:"innerRadiusRatio"}))}initAxisLabels(){const e={name:this.translate("labels"),enabled:!0,suppressEnabledCheckbox:!0,chartMenuUtils:this.chartMenuUtils,keyMapper:e=>`label.${e}`},t=this.createManagedBean(new xs(e)),i=this.createOrientationWidget();t.addItemToPanel(i),this.axisGroup.addItem(t)}createOrientationWidget(){const e=[{value:"fixed",text:this.translate("fixed")},{value:"parallel",text:this.translate("parallel")},{value:"perpendicular",text:this.translate("perpendicular")}];return this.createSelect({labelKey:"orientation",options:e,property:"label.orientation"})}initRadiusAxis(){if(!xn(Rn(this.chartController.getChartType()),"isRadial"))return;const e=[this.createSlider({labelKey:"groupPadding",defaultMaxValue:1,property:"paddingInner"}),this.createSlider({labelKey:"seriesPadding",defaultMaxValue:1,property:"groupPaddingInner"})],t=this.createManagedBean(new Ut.AgGroupComponent({cssIdentifier:"charts-format-sub-level",direction:"vertical",suppressOpenCloseIcons:!0,enabled:!0,suppressEnabledCheckbox:!0,title:this.translate("padding"),items:e})).hideEnabledCheckbox(!0).hideOpenCloseIcons(!0);this.axisGroup.addItem(t)}createSlider(e){const{labelKey:t,defaultMaxValue:i,step:n=.05,property:s}=e,r=this.chartMenuUtils.getDefaultSliderParams(s,t,i);return r.step=n,this.createManagedBean(new Ut.AgSlider(r))}createSelect(e){const{labelKey:t,options:i,property:n}=e;return this.createManagedBean(new Ut.AgSelect(this.chartMenuUtils.addValueParams(n,{label:this.chartTranslationService.translate(t),labelAlignment:"left",labelWidth:"flex",inputWidth:"flex",options:i})))}translate(e){return this.chartTranslationService.translate(e)}};Os.TEMPLATE='<div>\n            <ag-group-component ref="axisGroup">\n                <ag-color-picker ref="axisColorInput"></ag-color-picker>\n                <ag-slider ref="axisLineWidthSlider"></ag-slider>\n            </ag-group-component>\n        </div>',fn([(0,Ut.RefSelector)("axisGroup")],Os.prototype,"axisGroup",2),fn([(0,Ut.Autowired)("chartTranslationService")],Os.prototype,"chartTranslationService",2),fn([Ut.PostConstruct],Os.prototype,"init",1);var _s=Os,Fs=class e extends jt.Component{constructor(e,t){super(),this.chartMenuUtils=e,this.chartController=t}init(){const t={cssIdentifier:"charts-format-sub-level",direction:"vertical",suppressOpenCloseIcons:!0,title:this.chartTranslationService.translate("padding"),suppressEnabledCheckbox:!0},i=e=>this.chartMenuUtils.getDefaultSliderParams("padding."+e,e,200);this.setTemplate(e.TEMPLATE,{chartPaddingGroup:t,paddingTopSlider:i("top"),paddingRightSlider:i("right"),paddingBottomSlider:i("bottom"),paddingLeftSlider:i("left")}),this.addManagedListener(this.eventService,jt.Events.EVENT_CHART_OPTIONS_CHANGED,e=>{this.updateTopPadding(e.chartOptions)})}updateTopPadding(e){const t=[...this.chartController.getChartSeriesTypes(),"common"].map(t=>{var i,n;return null==(n=null==(i=e[t])?void 0:i.padding)?void 0:n.top}).find(e=>null!=e);null!=t&&this.paddingTopSlider.setValue(`${t}`)}};Fs.TEMPLATE='<div>\n            <ag-group-component ref="chartPaddingGroup">\n                <ag-slider ref="paddingTopSlider"></ag-slider>\n                <ag-slider ref="paddingRightSlider"></ag-slider>\n                <ag-slider ref="paddingBottomSlider"></ag-slider>\n                <ag-slider ref="paddingLeftSlider"></ag-slider>\n            </ag-group-component>\n        <div>',fn([(0,jt.RefSelector)("paddingTopSlider")],Fs.prototype,"paddingTopSlider",2),fn([(0,jt.Autowired)("chartTranslationService")],Fs.prototype,"chartTranslationService",2),fn([jt.PostConstruct],Fs.prototype,"init",1);var Gs=Fs,Vs=class e extends Kt.Component{constructor(e){super(),this.chartMenuUtils=e}init(){const t=this.chartMenuUtils.addEnableParams("background.visible",{cssIdentifier:"charts-format-sub-level",direction:"vertical",suppressOpenCloseIcons:!0,title:this.chartTranslationService.translate("background"),suppressEnabledCheckbox:!1}),i=this.chartMenuUtils.getDefaultColorPickerParams("background.fill");this.setTemplate(e.TEMPLATE,{chartBackgroundGroup:t,colorPicker:i})}};Vs.TEMPLATE='<div>\n            <ag-group-component ref="chartBackgroundGroup">\n                <ag-color-picker ref="colorPicker"></ag-color-picker>\n            </ag-group-component>\n        <div>',fn([(0,Kt.Autowired)("chartTranslationService")],Vs.prototype,"chartTranslationService",2),fn([Kt.PostConstruct],Vs.prototype,"init",1);var Bs=Vs,Hs=class e extends $t.Component{constructor(t,i){super(e.TEMPLATE),this.chartMenuUtils=t,this.chartController=i,this.activePanels=[],this.chartOptions=t.getChartOptions()}init(){this.initFontPanel(),this.titlePlaceholder=this.chartTranslationService.translate("titlePlaceholder")}hasTitle(){const e=this.chartOptions.getValue("title");return e&&e.enabled&&e.text&&e.text.length>0}initFontPanel(){const e=this.hasTitle(),t={name:this.chartTranslationService.translate("title"),enabled:e,suppressEnabledCheckbox:!1,chartMenuUtils:this.chartMenuUtils,keyMapper:e=>`title.${e}`,onEnableChange:e=>{if(this.chartMenuService.doesChartToolbarExist(this.chartController)){const t=this.chartOptions.getValue("padding.top");this.chartOptions.setValue("padding.top",e?t-20:t+20)}this.chartOptions.setValue("title.enabled",e);const t=this.chartOptions.getValue("title.text"),i="Title"===t||0===(null==t?void 0:t.trim().length);e&&i&&this.chartOptions.setValue("title.text",this.titlePlaceholder)}},i=this.createBean(new xs(t));i.addItemToPanel(this.createSpacingSlicer()),this.getGui().appendChild(i.getGui()),this.activePanels.push(i),this.addManagedListener(this.eventService,"chartTitleEdit",()=>{i.setEnabled(this.hasTitle())})}createSpacingSlicer(){const e=this.chartMenuUtils.getDefaultSliderParams("title.spacing","spacing",100);return e.value="10",this.createBean(new $t.AgSlider(e))}destroyActivePanels(){this.activePanels.forEach(e=>{$t._.removeFromParent(e.getGui()),this.destroyBean(e)})}destroy(){this.destroyActivePanels(),super.destroy()}};Hs.TEMPLATE="<div></div>",fn([(0,$t.Autowired)("chartTranslationService")],Hs.prototype,"chartTranslationService",2),fn([(0,$t.Autowired)("chartMenuService")],Hs.prototype,"chartMenuService",2),fn([$t.PostConstruct],Hs.prototype,"init",1);var zs=Hs,Us=class e extends Wt.Component{constructor({chartController:e,chartMenuParamsFactory:t,isExpandedOnInit:i=!1,chartOptionsService:n,seriesType:s}){super(),this.chartController=e,this.chartMenuParamsFactory=t,this.chartOptionsSeriesProxy=n.getSeriesOptionsProxy(()=>null!=s?s:this.chartController.getChartSeriesType()),this.isExpandedOnInit=i}init(){this.chartSeriesMenuParamsFactory=this.createManagedBean(new ks(this.chartOptionsSeriesProxy));const t={cssIdentifier:"charts-format-top-level",direction:"vertical",title:this.chartTranslationService.translate("chart"),expanded:this.isExpandedOnInit,suppressEnabledCheckbox:!0,items:[this.createManagedBean(new zs(this.chartMenuParamsFactory,this.chartController)),this.createManagedBean(new Gs(this.chartMenuParamsFactory,this.chartController)),this.createManagedBean(new Bs(this.chartMenuParamsFactory)),...this.createDirectionSelect()]};this.setTemplate(e.TEMPLATE,{chartGroup:t}),this.addManagedListener(this.eventService,Wt.Events.EVENT_CHART_OPTIONS_CHANGED,()=>this.refresh())}refresh(){this.updateDirectionSelect()}createDirectionSelect(){if(this.chartMenuService.isLegacyFormat())return[];const e=["horizontal","vertical"].map(e=>({value:e,text:this.chartTranslationService.translate(e)})),t=this.chartSeriesMenuParamsFactory.getDefaultSelectParams("direction","direction",e);t.labelWidth="flex",t.inputWidth="flex";const i=t.onValueChange;return t.onValueChange=e=>{i(e),this.chartController.raiseChartModelUpdateEvent()},this.directionSelect=this.createManagedBean(new Wt.AgSelect(t)),this.updateDirectionSelect(),[this.directionSelect]}updateDirectionSelect(){var e;null==(e=this.directionSelect)||e.setDisplayed(xn(Rn(this.chartController.getChartType()),"canSwitchDirection"))}};Us.TEMPLATE='<div>\n            <ag-group-component ref="chartGroup"></ag-group-component>\n        </div>',fn([(0,Wt.Autowired)("chartTranslationService")],Us.prototype,"chartTranslationService",2),fn([(0,Wt.Autowired)("chartMenuService")],Us.prototype,"chartMenuService",2),fn([Wt.PostConstruct],Us.prototype,"init",1);var Ws=Us,js=class e extends qt.Component{constructor(e,t="shadow"){super(),this.chartMenuUtils=e,this.propertyKey=t}init(){const t=this.propertyKey,i=this.chartMenuUtils.addEnableParams(`${t}.enabled`,{cssIdentifier:"charts-format-sub-level",direction:"vertical",suppressOpenCloseIcons:!0,title:this.chartTranslationService.translate("shadow"),suppressEnabledCheckbox:!1}),n=this.chartMenuUtils.getDefaultColorPickerParams(`${t}.color`);this.setTemplate(e.TEMPLATE,{shadowGroup:i,shadowColorPicker:n,shadowBlurSlider:this.getSliderParams("blur",0,20),shadowXOffsetSlider:this.getSliderParams("xOffset",-10,10),shadowYOffsetSlider:this.getSliderParams("yOffset",-10,10)})}getSliderParams(e,t,i){const n=`${this.propertyKey}.${e}`,s=this.chartMenuUtils.getDefaultSliderParams(n,e,i);return s.minValue=t,s}};js.TEMPLATE='<div>\n            <ag-group-component ref="shadowGroup">\n                <ag-color-picker ref="shadowColorPicker"></ag-color-picker>\n                <ag-slider ref="shadowBlurSlider"></ag-slider>\n                <ag-slider ref="shadowXOffsetSlider"></ag-slider>\n                <ag-slider ref="shadowYOffsetSlider"></ag-slider>\n            </ag-group-component>\n        </div>',fn([(0,qt.Autowired)("chartTranslationService")],js.prototype,"chartTranslationService",2),fn([qt.PostConstruct],js.prototype,"init",1);var Ks=js,$s=class e extends Xt.Component{constructor(e,t){super(),this.chartOptionsService=e,this.chartMenuUtils=t}init(){const t=this.chartOptionsService.getChartType(),i=Xt._.includes(["scatter","bubble"],t),n=this.chartMenuUtils.addEnableParams("marker.enabled",{cssIdentifier:"charts-format-sub-level",direction:"vertical",title:this.chartTranslationService.translate("markers"),suppressEnabledCheckbox:i,suppressOpenCloseIcons:!0}),s="bubble"===t;let r,o;s?(r=this.getSliderParams("marker.maxSize","maxSize",60),o=this.getSliderParams("marker.size","minSize",60)):(r={},o=this.getSliderParams("marker.size","size",60)),this.setTemplate(e.TEMPLATE,{seriesMarkersGroup:n,seriesMarkerShapeSelect:this.getMarkerShapeSelectParams(),seriesMarkerMinSizeSlider:r,seriesMarkerSizeSlider:o,seriesMarkerStrokeWidthSlider:this.getSliderParams("marker.strokeWidth","strokeWidth",10)}),s||this.seriesMarkerMinSizeSlider.setDisplayed(!1)}getMarkerShapeSelectParams(){return this.chartMenuUtils.addValueParams("marker.shape",{options:[{value:"square",text:"Square"},{value:"circle",text:"Circle"},{value:"cross",text:"Cross"},{value:"diamond",text:"Diamond"},{value:"plus",text:"Plus"},{value:"triangle",text:"Triangle"},{value:"heart",text:"Heart"}],label:this.chartTranslationService.translate("shape")})}getSliderParams(e,t,i){return this.chartMenuUtils.getDefaultSliderParams(e,t,i)}};$s.TEMPLATE='<div>\n            <ag-group-component ref="seriesMarkersGroup">\n                <ag-select ref="seriesMarkerShapeSelect"></ag-select>\n                <ag-slider ref="seriesMarkerMinSizeSlider"></ag-slider>\n                <ag-slider ref="seriesMarkerSizeSlider"></ag-slider>\n                <ag-slider ref="seriesMarkerStrokeWidthSlider"></ag-slider>\n            </ag-group-component>\n        </div>',fn([(0,Xt.RefSelector)("seriesMarkerMinSizeSlider")],$s.prototype,"seriesMarkerMinSizeSlider",2),fn([(0,Xt.Autowired)("chartTranslationService")],$s.prototype,"chartTranslationService",2),fn([Xt.PostConstruct],$s.prototype,"init",1);var Ys=$s,qs=class e extends Zt.Component{constructor(t){super(e.TEMPLATE),this.H=1,this.S=1,this.B=1,this.A=1,this.isSpectrumDragging=!1,this.isSpectrumHueDragging=!1,this.isSpectrumAlphaDragging=!1,this.colorChanged=!1,this.picker=t.picker}postConstruct(){this.initTabIndex(),this.initRecentColors(),this.addGuiEventListener("focus",()=>this.spectrumColor.focus()),this.addGuiEventListener("keydown",e=>{e.key!==Jt.KeyCode.ENTER||e.defaultPrevented||this.destroy()}),this.addManagedListener(this.spectrumColor,"keydown",e=>this.moveDragger(e)),this.addManagedListener(this.spectrumAlphaSlider,"keydown",e=>this.moveAlphaSlider(e)),this.addManagedListener(this.spectrumHueSlider,"keydown",e=>this.moveHueSlider(e)),this.addManagedListener(this.spectrumVal,"mousedown",this.onSpectrumDraggerDown.bind(this)),this.addManagedListener(this.spectrumHue,"mousedown",this.onSpectrumHueDown.bind(this)),this.addManagedListener(this.spectrumAlpha,"mousedown",this.onSpectrumAlphaDown.bind(this)),this.addGuiEventListener("mousemove",e=>{this.onSpectrumDraggerMove(e),this.onSpectrumHueMove(e),this.onSpectrumAlphaMove(e)}),this.addManagedListener(document,"mouseup",this.onMouseUp.bind(this)),this.addManagedListener(this.recentColors,"click",this.onRecentColorClick.bind(this)),this.addManagedListener(this.recentColors,"keydown",e=>{e.key!==Jt.KeyCode.ENTER&&e.key!==Jt.KeyCode.SPACE||(e.preventDefault(),this.onRecentColorClick(e))})}initTabIndex(){const e=this.tabIndex=this.gos.get("tabIndex").toString();this.spectrumColor.setAttribute("tabindex",e),this.spectrumHueSlider.setAttribute("tabindex",e),this.spectrumAlphaSlider.setAttribute("tabindex",e)}refreshSpectrumRect(){return this.spectrumValRect=this.spectrumVal.getBoundingClientRect()}refreshHueRect(){return this.spectrumHueRect=this.spectrumHue.getBoundingClientRect()}refreshAlphaRect(){return this.spectrumAlphaRect=this.spectrumAlpha.getBoundingClientRect()}onSpectrumDraggerDown(e){this.refreshSpectrumRect(),this.isSpectrumDragging=!0,this.moveDragger(e)}onSpectrumDraggerMove(e){this.isSpectrumDragging&&this.moveDragger(e)}onSpectrumHueDown(e){this.refreshHueRect(),this.isSpectrumHueDragging=!0,this.moveHueSlider(e)}onSpectrumHueMove(e){this.isSpectrumHueDragging&&this.moveHueSlider(e)}onSpectrumAlphaDown(e){this.refreshAlphaRect(),this.isSpectrumAlphaDragging=!0,this.moveAlphaSlider(e)}onSpectrumAlphaMove(e){this.isSpectrumAlphaDragging&&this.moveAlphaSlider(e)}onMouseUp(){this.isSpectrumDragging=!1,this.isSpectrumHueDragging=!1,this.isSpectrumAlphaDragging=!1}moveDragger(e){const t=this.spectrumValRect;if(!t)return;let i,n;if(e instanceof MouseEvent)i=e.clientX-t.left,n=e.clientY-t.top;else{const t=e.key===Jt.KeyCode.LEFT,s=e.key===Jt.KeyCode.RIGHT,r=e.key===Jt.KeyCode.UP,o=e.key===Jt.KeyCode.DOWN,a=r||o,l=t||s;if(!a&&!l)return;e.preventDefault();const{x:c,y:h}=this.getSpectrumValue();i=c+(l?t?-5:5:0),n=h+(a?r?-5:5:0)}i=Math.max(i,0),i=Math.min(i,t.width),n=Math.max(n,0),n=Math.min(n,t.height),this.setSpectrumValue(i/t.width,1-n/t.height)}moveHueSlider(e){const t=this.spectrumHueRect;if(!t)return;const i=this.moveSlider(this.spectrumHueSlider,e);null!=i&&(this.H=1-i/t.width,this.update())}moveAlphaSlider(e){const t=this.spectrumAlphaRect;if(!t)return;const i=this.moveSlider(this.spectrumAlphaSlider,e);null!=i&&(this.A=i/t.width,this.update())}moveSlider(e,t){var i;const n=e.getBoundingClientRect(),s=null==(i=e.parentElement)?void 0:i.getBoundingClientRect();if(!e||!s)return null;let r;if(t instanceof MouseEvent)r=t.clientX-s.left;else{const i=t.key===Jt.KeyCode.LEFT,s=t.key===Jt.KeyCode.RIGHT;if(!i&&!s)return null;t.preventDefault();const o=i?-5:5;r=parseFloat(e.style.left)-n.width/2+o}return r=Math.max(r,0),r=Math.min(r,s.width),e.style.left=r+n.width/2+"px",r}update(){const e=Qt._Util.Color.fromHSB(360*this.H,this.S,this.B,this.A),t=Qt._Util.Color.fromHSB(360*this.H,1,1),i=e.toRgbaString(),n=this.picker;Qt._Util.Color.fromString(n.getValue()).toRgbaString()!==i&&(this.colorChanged=!0),n.setValue(i),this.spectrumColor.style.backgroundColor=t.toRgbaString(),this.spectrumDragger.style.backgroundColor=i}setSpectrumValue(e,t){const i=this.spectrumValRect||this.refreshSpectrumRect();if(null==i)return;const n=this.spectrumDragger,s=n.getBoundingClientRect();e=Math.max(0,e),e=Math.min(1,e),t=Math.max(0,t),t=Math.min(1,t),this.S=e,this.B=t,n.style.left=e*i.width-s.width/2+"px",n.style.top=(1-t)*i.height-s.height/2+"px",this.update()}getSpectrumValue(){const e=this.spectrumDragger,t=e.getBoundingClientRect();return{x:parseFloat(e.style.left)+t.width/2,y:parseFloat(e.style.top)+t.height/2}}initRecentColors(){const t=e.recentColors.map((e,t)=>`<div class="ag-recent-color" id=${t} style="background-color: ${e}; width: 15px; height: 15px;" recent-color="${e}" tabIndex="${this.tabIndex}"></div>`);this.recentColors.innerHTML=t.join("")}setValue(e){const t=Qt._Util.Color.fromString(e),[i,n,s]=t.toHSB();this.H=(isNaN(i)?0:i)/360,this.A=t.a;const r=this.spectrumHueRect||this.refreshHueRect(),o=this.spectrumAlphaRect||this.refreshAlphaRect();this.spectrumHueSlider.style.left=(this.H-1)*-r.width+"px",this.spectrumAlphaSlider.style.left=this.A*o.width+"px",this.setSpectrumValue(n,s)}onRecentColorClick(t){const i=t.target;if(!Zt._.exists(i.id))return;const n=parseInt(i.id,10);this.setValue(e.recentColors[n]),this.destroy()}addRecentColor(){const t=Qt._Util.Color.fromHSB(360*this.H,this.S,this.B,this.A).toRgbaString();let i=e.recentColors;this.colorChanged&&i[0]!==t&&(i=i.filter(e=>e!=t),i=[t].concat(i),i.length>e.maxRecentColors&&(i=i.slice(0,e.maxRecentColors)),e.recentColors=i)}destroy(){this.addRecentColor(),super.destroy()}};qs.maxRecentColors=8,qs.recentColors=[],qs.TEMPLATE='<div class="ag-color-panel" tabindex="-1">\n            <div ref="spectrumColor" class="ag-spectrum-color">\n                <div class="ag-spectrum-sat ag-spectrum-fill">\n                    <div ref="spectrumVal" class="ag-spectrum-val ag-spectrum-fill">\n                        <div ref="spectrumDragger" class="ag-spectrum-dragger"></div>\n                    </div>\n                </div>\n            </div>\n            <div class="ag-spectrum-tools">\n                <div ref="spectrumHue" class="ag-spectrum-hue ag-spectrum-tool">\n                    <div class="ag-spectrum-hue-background"></div>\n                    <div ref="spectrumHueSlider" class="ag-spectrum-slider"></div>\n                </div>\n                <div ref="spectrumAlpha" class="ag-spectrum-alpha ag-spectrum-tool">\n                    <div class="ag-spectrum-alpha-background"></div>\n                    <div ref="spectrumAlphaSlider" class="ag-spectrum-slider"></div>\n                </div>\n                <div ref="recentColors" class="ag-recent-colors"></div>\n            </div>\n        </div>',fn([(0,Zt.RefSelector)("spectrumColor")],qs.prototype,"spectrumColor",2),fn([(0,Zt.RefSelector)("spectrumVal")],qs.prototype,"spectrumVal",2),fn([(0,Zt.RefSelector)("spectrumDragger")],qs.prototype,"spectrumDragger",2),fn([(0,Zt.RefSelector)("spectrumHue")],qs.prototype,"spectrumHue",2),fn([(0,Zt.RefSelector)("spectrumHueSlider")],qs.prototype,"spectrumHueSlider",2),fn([(0,Zt.RefSelector)("spectrumAlpha")],qs.prototype,"spectrumAlpha",2),fn([(0,Zt.RefSelector)("spectrumAlphaSlider")],qs.prototype,"spectrumAlphaSlider",2),fn([(0,Zt.RefSelector)("recentColors")],qs.prototype,"recentColors",2),fn([Zt.PostConstruct],qs.prototype,"postConstruct",1);var Xs=qs,Zs=class extends ei.AgPickerField{constructor(e){super(un({pickerAriaLabelKey:"ariaLabelColorPicker",pickerAriaLabelValue:"Color Picker",pickerType:"ag-list",className:"ag-color-picker",pickerIcon:"colorPicker"},e))}postConstruct(){super.postConstruct(),this.value&&this.setValue(this.value)}createPickerComponent(){const e=this.getGui().getBoundingClientRect();return this.createBean(new ei.AgDialog({closable:!1,modal:!0,hideTitleBar:!0,minWidth:190,width:190,height:250,x:e.right-190,y:e.top-250}))}renderAndPositionPicker(){const e=this.pickerComponent,t=this.createBean(new Xs({picker:this}));return e.addCssClass("ag-color-dialog"),t.addDestroyFunc(()=>{e.isAlive()&&this.destroyBean(e)}),e.setParentComponent(this),e.setBodyComponent(t),t.setValue(this.getValue()),t.getGui().focus(),e.addDestroyFunc(()=>{this.isDestroyingPicker?this.isDestroyingPicker=!1:(this.beforeHidePicker(),this.isDestroyingPicker=!0,t.isAlive()&&this.destroyBean(t),this.isAlive()&&this.getFocusableElement().focus())}),()=>{var e;return null==(e=this.pickerComponent)?void 0:e.close()}}setValue(e){return this.value===e?this:(this.eDisplayField.style.backgroundColor=e,super.setValue(e))}getValue(){return this.value}},Qs=class e extends ti.Component{constructor(e){super(),this.chartMenuUtils=e}init(){const t={cssIdentifier:"charts-format-sub-level",direction:"vertical",title:this.chartTranslationService.translate("callout"),enabled:!0,suppressOpenCloseIcons:!0,suppressEnabledCheckbox:!0};this.setTemplate(e.TEMPLATE,{calloutGroup:t,calloutLengthSlider:this.chartMenuUtils.getDefaultSliderParams("calloutLine.length","length",40),calloutStrokeWidthSlider:this.chartMenuUtils.getDefaultSliderParams("calloutLine.strokeWidth","strokeWidth",10),labelOffsetSlider:this.chartMenuUtils.getDefaultSliderParams("calloutLabel.offset","offset",30)})}};Qs.TEMPLATE='<div>\n            <ag-group-component ref="calloutGroup">\n                <ag-slider ref="calloutLengthSlider"></ag-slider>\n                <ag-slider ref="calloutStrokeWidthSlider"></ag-slider>\n                <ag-slider ref="labelOffsetSlider"></ag-slider>\n            </ag-group-component>\n        </div>',fn([(0,ti.Autowired)("chartTranslationService")],Qs.prototype,"chartTranslationService",2),fn([ti.PostConstruct],Qs.prototype,"init",1);var Js=Qs,er=class e extends ii.Component{constructor(e){super(),this.chartMenuUtils=e}init(){const t={cssIdentifier:"charts-format-sub-level",direction:"vertical",title:this.chartTranslationService.translate("cap"),enabled:!0,suppressOpenCloseIcons:!0,suppressEnabledCheckbox:!0},i=this.chartMenuUtils.getDefaultSliderParams("cap.lengthRatio","capLengthRatio",1);i.step=.05,this.setTemplate(e.TEMPLATE,{capsGroup:t,capLengthRatioSlider:i})}};er.TEMPLATE='<div>\n            <ag-group-component ref="capsGroup">\n                <ag-slider ref="capLengthRatioSlider"></ag-slider>\n            </ag-group-component>\n        </div>',fn([(0,ii.Autowired)("chartTranslationService")],er.prototype,"chartTranslationService",2),fn([ii.PostConstruct],er.prototype,"init",1);var tr=er,ir=class e extends ni.Component{constructor(e){super(),this.chartMenuUtils=e}init(){const t={cssIdentifier:"charts-format-sub-level",direction:"vertical",title:this.chartTranslationService.translate("connectorLine"),enabled:!0,suppressOpenCloseIcons:!0,suppressEnabledCheckbox:!0};this.setTemplate(e.TEMPLATE,{lineGroup:t,lineColorPicker:this.chartMenuUtils.getDefaultColorPickerParams("line.stroke"),lineStrokeWidthSlider:this.getSliderParams("strokeWidth",10,"line.strokeWidth"),lineDashSlider:this.getSliderParams("lineDash",30,"line.lineDash",1,!0),lineOpacitySlider:this.getSliderParams("strokeOpacity",1,"line.strokeOpacity",.05)})}getSliderParams(e,t,i,n=1,s=!1){const r=this.chartMenuUtils.getDefaultSliderParams(i,e,t,s);return r.step=n,r}};ir.TEMPLATE='<div>\n            <ag-group-component ref="lineGroup">\n                <ag-color-picker ref="lineColorPicker"></ag-color-picker>\n                <ag-slider ref="lineStrokeWidthSlider"></ag-slider>\n                <ag-slider ref="lineOpacitySlider"></ag-slider>\n                <ag-slider ref="lineDashSlider"></ag-slider>                \n            </ag-group-component>\n        </div>',fn([(0,ni.Autowired)("chartTranslationService")],ir.prototype,"chartTranslationService",2),fn([ni.PostConstruct],ir.prototype,"init",1);var nr=ir,sr=class e extends si.Component{constructor(e){super(),this.chartMenuUtils=e}init(){const t={cssIdentifier:"charts-format-sub-level",direction:"vertical",title:this.chartTranslationService.translate("whisker"),enabled:!0,suppressOpenCloseIcons:!0,suppressEnabledCheckbox:!0};this.setTemplate(e.TEMPLATE,{whiskersGroup:t,whiskerColorPicker:this.chartMenuUtils.getDefaultColorPickerParams("whisker.stroke"),whiskerThicknessSlider:this.chartMenuUtils.getDefaultSliderParams("whisker.strokeWidth","strokeWidth",10),whiskerOpacitySlider:this.chartMenuUtils.getDefaultSliderParams("whisker.strokeOpacity","strokeOpacity",1),whiskerLineDashSlider:this.chartMenuUtils.getDefaultSliderParams("whisker.lineDash","lineDash",30,!0),whiskerLineDashOffsetSlider:this.chartMenuUtils.getDefaultSliderParams("whisker.lineDashOffset","lineDashOffset",30)})}};sr.TEMPLATE='<div>\n            <ag-group-component ref="whiskersGroup">\n                <ag-color-picker ref="whiskerColorPicker"></ag-color-picker>\n                <ag-slider ref="whiskerThicknessSlider"></ag-slider>\n                <ag-slider ref="whiskerOpacitySlider"></ag-slider>\n                <ag-slider ref="whiskerLineDashSlider"></ag-slider>\n                <ag-slider ref="whiskerLineDashOffsetSlider"></ag-slider>\n            </ag-group-component>\n        </div>',fn([(0,si.Autowired)("chartTranslationService")],sr.prototype,"chartTranslationService",2),fn([si.PostConstruct],sr.prototype,"init",1);var rr=sr,or=class e extends ri.Component{constructor(e){super(),this.chartMenuUtils=e,this.activePanels=[]}init(){const t={cssIdentifier:"charts-format-sub-level",direction:"vertical",title:this.chartTranslationService.translate("seriesItems"),enabled:!0,suppressOpenCloseIcons:!0,suppressEnabledCheckbox:!0};this.setTemplate(e.TEMPLATE,{seriesItemsGroup:t,seriesItemSelect:this.getSeriesItemsParams()}),this.initSeriesControls()}getSeriesItemsParams(){const e=[{value:"positive",text:this.chartTranslationService.translate("seriesItemPositive")},{value:"negative",text:this.chartTranslationService.translate("seriesItemNegative")}];return{label:this.chartTranslationService.translate("seriesItemType"),labelAlignment:"left",labelWidth:"flex",inputWidth:"flex",options:e,value:"positive",onValueChange:e=>{this.destroyActivePanels(),this.initSeriesControls(e)}}}initSeriesControls(e="positive"){this.initSlider("strokeWidth",10,`item.${e}.strokeWidth`),this.initSlider("lineDash",30,`item.${e}.lineDash`,1,!0),this.initSlider("strokeOpacity",1,`item.${e}.strokeOpacity`,.05,!1),this.initSlider("fillOpacity",1,`item.${e}.fillOpacity`,.05,!1),this.initItemLabels(e)}initSlider(e,t,i,n=1,s=!1){const r=this.chartMenuUtils.getDefaultSliderParams(i,e,t,s);r.step=n;const o=this.seriesItemsGroup.createManagedBean(new ri.AgSlider(r));this.seriesItemsGroup.addItem(o),this.activePanels.push(o)}initItemLabels(e){const t=this.chartMenuUtils.getDefaultFontPanelParams(`item.${e}.label`,"seriesItemLabels"),i=this.createBean(new xs(t));this.seriesItemsGroup.addItem(i),this.activePanels.push(i)}destroyActivePanels(){this.activePanels.forEach(e=>{ri._.removeFromParent(e.getGui()),this.destroyBean(e)})}destroy(){this.destroyActivePanels(),super.destroy()}};or.TEMPLATE='<div>\n            <ag-group-component ref="seriesItemsGroup">\n                <ag-select ref="seriesItemSelect"></ag-select>\n            </ag-group-component>\n        </div>',fn([(0,ri.RefSelector)("seriesItemsGroup")],or.prototype,"seriesItemsGroup",2),fn([(0,ri.Autowired)("chartTranslationService")],or.prototype,"chartTranslationService",2),fn([ri.PostConstruct],or.prototype,"init",1);var ar=or,lr=class e extends oi.Component{constructor(e){super(),this.chartMenuUtils=e}init(){const t={cssIdentifier:"charts-format-sub-level",direction:"vertical",enabled:!0,suppressOpenCloseIcons:!0,suppressEnabledCheckbox:!0};this.setTemplate(e.TEMPLATE,{groupSpacing:pn(un({},t),{title:this.chartTranslationService.translate("group")}),tileSpacing:pn(un({},t),{title:this.chartTranslationService.translate("tile")}),groupPaddingSlider:this.getSliderParams("padding","group.padding"),groupSpacingSlider:this.getSliderParams("spacing","group.gap"),tilePaddingSlider:this.getSliderParams("padding","tile.padding"),tileSpacingSlider:this.getSliderParams("spacing","tile.gap")})}getSliderParams(e,t){return this.chartMenuUtils.getDefaultSliderParams(t,e,10)}};lr.TEMPLATE='<div>\n            <ag-group-component ref="groupSpacing">\n                <ag-slider ref="groupPaddingSlider"></ag-slider>\n                <ag-slider ref="groupSpacingSlider"></ag-slider>\n            </ag-group-component>\n            <ag-group-component ref="tileSpacing">\n                <ag-slider ref="tilePaddingSlider"></ag-slider>\n                <ag-slider ref="tileSpacingSlider"></ag-slider>\n            </ag-group-component>\n        </div>',fn([(0,oi.Autowired)("chartTranslationService")],lr.prototype,"chartTranslationService",2),fn([oi.PostConstruct],lr.prototype,"init",1);var cr=lr,hr=class e extends Yt.Component{constructor({chartController:e,chartOptionsService:t,seriesType:i,isExpandedOnInit:n=!1}){super(),this.activePanels=[],this.widgetFuncs={lineWidth:()=>this.initStrokeWidth("lineWidth"),strokeWidth:()=>this.initStrokeWidth("strokeWidth"),lineColor:()=>this.initLineColor(),lineDash:()=>this.initLineDash(),lineOpacity:()=>this.initLineOpacity(),fillOpacity:()=>this.initFillOpacity(),markers:()=>this.initMarkers(),labels:()=>this.initLabels(),shadow:()=>this.initShadow(),tooltips:()=>this.initTooltips(),bins:()=>this.initBins(),whiskers:()=>this.initWhiskers(),caps:()=>this.initCaps(),connectorLine:()=>this.initConnectorLine(),seriesItems:()=>this.initSeriesItemsPanel(),tileSpacing:()=>this.initTileSpacingPanel(),groupType:()=>this.initGroupType()},this.seriesWidgetMappings={bar:["tooltips","strokeWidth","lineDash","lineOpacity","fillOpacity","labels","shadow"],pie:["tooltips","strokeWidth","lineOpacity","fillOpacity","labels","shadow"],donut:["tooltips","strokeWidth","lineOpacity","fillOpacity","labels","shadow"],line:["tooltips","lineWidth","lineDash","lineOpacity","markers","labels"],scatter:["tooltips","markers","labels"],bubble:["tooltips","markers","labels"],area:["tooltips","lineWidth","lineDash","lineOpacity","fillOpacity","markers","labels","shadow"],histogram:["tooltips","bins","strokeWidth","lineDash","lineOpacity","fillOpacity","labels","shadow"],"radial-column":["tooltips","strokeWidth","lineDash","lineOpacity","fillOpacity","labels","groupType"],"radial-bar":["tooltips","strokeWidth","lineDash","lineOpacity","fillOpacity","labels","groupType"],"radar-line":["tooltips","strokeWidth","lineDash","lineOpacity","markers","labels"],"radar-area":["tooltips","strokeWidth","lineDash","lineOpacity","fillOpacity","markers","labels"],nightingale:["tooltips","strokeWidth","lineDash","lineOpacity","fillOpacity","labels","groupType"],"box-plot":["tooltips","strokeWidth","lineDash","lineOpacity","fillOpacity","whiskers","caps"],"range-bar":["tooltips","strokeWidth","lineDash","lineOpacity","fillOpacity","labels"],"range-area":["tooltips","lineWidth","lineDash","lineOpacity","fillOpacity","markers","labels","shadow"],treemap:["tooltips","tileSpacing"],sunburst:["tooltips"],heatmap:["tooltips","labels","lineColor","lineWidth","lineOpacity"],waterfall:["tooltips","connectorLine","seriesItems"]},this.chartController=e,this.chartOptionsService=t,this.seriesType=i||this.chartController.getChartSeriesType(),this.isExpandedOnInit=n}init(){const t={cssIdentifier:"charts-format-top-level",direction:"vertical",title:this.translate("series"),expanded:this.isExpandedOnInit,suppressEnabledCheckbox:!0};this.setTemplate(e.TEMPLATE,{seriesGroup:t}),this.chartMenuUtils=this.createManagedBean(new ks(this.chartOptionsService.getSeriesOptionsProxy(()=>this.seriesType))),this.chartOptions=this.chartMenuUtils.getChartOptions(),this.addManagedListener(this.chartController,rs.EVENT_CHART_SERIES_CHART_TYPE_CHANGED,this.refreshWidgets.bind(this)),this.refreshWidgets()}refreshWidgets(){this.destroyActivePanels(),this.chartController.getChartProxy().getChart().waitForUpdate().then(()=>{var e;!this.isAlive()||(this.chartController.isComboChart()&&(this.updateSeriesType(),this.initSeriesSelect()),(null!=(e=this.seriesWidgetMappings[this.seriesType])?e:[]).forEach(e=>this.widgetFuncs[e]()))}).catch(e=>console.error("AG Grid - chart rendering failed",e))}initSeriesSelect(){const e=this.seriesGroup.createManagedBean(new Yt.AgSelect({label:this.translate("seriesType"),labelAlignment:"left",labelWidth:"flex",inputWidth:"flex",options:this.getSeriesSelectOptions(),value:`${this.seriesType}`,onValueChange:e=>{this.seriesType=e,this.refreshWidgets()}}));this.seriesGroup.addItem(e),this.activePanels.push(e)}initTooltips(){const e=this.createBean(new Yt.AgToggleButton(this.chartMenuUtils.addValueParams("tooltip.enabled",{label:this.translate("tooltips"),labelAlignment:"left",labelWidth:"flex",inputWidth:"flex"})));this.addWidget(e)}initLineColor(){const e=this.createBean(new Zs(this.chartMenuUtils.getDefaultColorPickerParams("stroke","strokeColor")));this.addWidget(e)}initStrokeWidth(e){const t=this.createBean(new Yt.AgSlider(this.chartMenuUtils.getDefaultSliderParams("strokeWidth",e,10)));this.addWidget(t)}initLineDash(){const e=this.createBean(new Yt.AgSlider(this.chartMenuUtils.getDefaultSliderParams("lineDash","lineDash",30,!0)));this.addWidget(e)}initLineOpacity(){const e=this.chartMenuUtils.getDefaultSliderParams("strokeOpacity","strokeOpacity",1);e.step=.05;const t=this.createBean(new Yt.AgSlider(e));this.addWidget(t)}initFillOpacity(){const e=this.chartMenuUtils.getDefaultSliderParams("fillOpacity","fillOpacity",1);e.step=.05;const t=this.createBean(new Yt.AgSlider(e));this.addWidget(t)}initLabels(){const e=Ln(this.seriesType),t=e?"calloutLabel":"label",i=e?"calloutLabels":"labels",n=this.chartMenuUtils.getDefaultFontPanelParams(t,i),s=this.createBean(new xs(n));if(e){const e=this.createBean(new Js(this.chartMenuUtils));s.addCompToPanel(e),this.activePanels.push(e)}if(this.addWidget(s),e){const e=this.chartMenuUtils.getDefaultFontPanelParams("sectorLabel","sectorLabels"),t=this.createBean(new xs(e)),i=this.getSectorLabelPositionRatio();t.addCompToPanel(i),this.addWidget(t)}if("range-bar"===this.seriesType){const e=[{value:"inside",text:this.translate("inside")},{value:"outside",text:this.translate("outside")}],t=s.createManagedBean(new Yt.AgSelect(this.chartMenuUtils.addValueParams("label.placement",{label:this.translate("labelPlacement"),labelAlignment:"left",labelWidth:"flex",inputWidth:"flex",options:e})));s.addCompToPanel(t),this.activePanels.push(t);const i=s.createManagedBean(new Yt.AgSlider(this.chartMenuUtils.getDefaultSliderParams("label.padding","padding",200)));s.addCompToPanel(i),this.activePanels.push(i)}}getSectorLabelPositionRatio(){const e=this.chartMenuUtils.getDefaultSliderParams("sectorLabel.positionRatio","positionRatio",1);return e.step=.05,this.createBean(new Yt.AgSlider(e))}initShadow(){const e=this.createBean(new Ks(this.chartMenuUtils));this.addWidget(e)}initMarkers(){const e=this.createBean(new Ys(this.chartOptionsService,this.chartMenuUtils));this.addWidget(e)}initBins(){var e;const t=this.chartMenuUtils.getDefaultSliderParams("binCount","histogramBinCount",20),i=(null!=(e=this.chartOptions.getValue("bins"))?e:this.chartOptions.getValue("calculatedBins",!0)).length;t.value=`${i}`,t.maxValue=Math.max(i,20);const n=this.createBean(new Yt.AgSlider(t));this.addWidget(n)}initWhiskers(){const e=this.createBean(new rr(this.chartMenuUtils));this.addWidget(e)}initCaps(){const e=this.createBean(new tr(this.chartMenuUtils));this.addWidget(e)}initConnectorLine(){const e=this.createBean(new nr(this.chartMenuUtils));this.addWidget(e)}initSeriesItemsPanel(){const e=this.createBean(new ar(this.chartMenuUtils));this.addWidget(e)}initTileSpacingPanel(){const e=this.createBean(new cr(this.chartMenuUtils));this.addWidget(e)}initGroupType(){const e=this.createBean(new Yt.AgSelect({label:this.chartTranslationService.translate("seriesGroupType"),options:Yt.ChartMappings.SERIES_GROUP_TYPES.map(e=>({value:e,text:this.chartTranslationService.translate(`${e}SeriesGroupType`)})),value:this.chartController.getSeriesGroupType(),onValueChange:e=>this.chartController.setSeriesGroupType(e)}));this.addWidget(e)}addWidget(e){this.seriesGroup.addItem(e),this.activePanels.push(e)}getSeriesSelectOptions(){const e=this.getActiveSeriesTypes();return["area","bar","line"].filter(t=>e.includes(t)).map(e=>({value:e,text:this.translate(e)}))}updateSeriesType(){const e=this.getActiveSeriesTypes();!e.includes(this.seriesType)&&e.length>0&&(this.seriesType=e[0])}getActiveSeriesTypes(){return this.chartController.getActiveSeriesChartTypes().map(e=>Rn(e.chartType))}translate(e){return this.chartTranslationService.translate(e)}destroyActivePanels(){this.activePanels.forEach(e=>{Yt._.removeFromParent(e.getGui()),this.destroyBean(e)})}destroy(){this.destroyActivePanels(),super.destroy()}};hr.TEMPLATE='<div>\n            <ag-group-component ref="seriesGroup">\n            </ag-group-component>\n        </div>',fn([(0,Yt.RefSelector)("seriesGroup")],hr.prototype,"seriesGroup",2),fn([(0,Yt.Autowired)("chartTranslationService")],hr.prototype,"chartTranslationService",2),fn([Yt.PostConstruct],hr.prototype,"init",1);var dr=hr,ur=class e extends ai.Component{constructor({chartMenuParamsFactory:e,isExpandedOnInit:t=!1}){super(),this.chartMenuUtils=e,this.isExpandedOnInit=t}init(){const t=this.chartMenuUtils.addEnableParams("gradientLegend.enabled",{cssIdentifier:"charts-format-top-level",direction:"vertical",title:this.chartTranslationService.translate("legend"),suppressEnabledCheckbox:!1,suppressToggleExpandOnEnableChange:!0,expanded:this.isExpandedOnInit,items:[this.createLabelPanel()]});this.setTemplate(e.TEMPLATE,{legendGroup:t,legendPositionSelect:this.chartMenuUtils.getDefaultLegendParams("gradientLegend.position"),gradientReverseCheckbox:this.getGradientReverseCheckboxParams(),gradientThicknessSlider:this.chartMenuUtils.getDefaultSliderParams("gradientLegend.gradient.thickness","thickness",40),gradientPreferredLengthSlider:this.chartMenuUtils.getDefaultSliderParams("gradientLegend.gradient.preferredLength","preferredLength",300),legendSpacingSlider:this.chartMenuUtils.getDefaultSliderParams("gradientLegend.spacing","spacing",200)})}getGradientReverseCheckboxParams(){return this.chartMenuUtils.addValueParams("gradientLegend.reverseOrder",{label:this.chartTranslationService.translate("reverseDirection"),labelWidth:"flex"})}createLabelPanel(){const e={enabled:!0,suppressEnabledCheckbox:!0,chartMenuUtils:this.chartMenuUtils,keyMapper:e=>`gradientLegend.scale.label.${e}`};return this.createManagedBean(new xs(e))}};ur.TEMPLATE='<div>\n            <ag-group-component ref="legendGroup">\n                <ag-select ref="legendPositionSelect"></ag-select>\n                <ag-checkbox ref="gradientReverseCheckbox"></ag-checkbox>\n                <ag-slider ref="gradientThicknessSlider"></ag-slider>\n                <ag-slider ref="gradientPreferredLengthSlider"></ag-slider>\n                <ag-slider ref="legendSpacingSlider"></ag-slider>\n            </ag-group-component>\n        </div>',fn([(0,ai.Autowired)("chartTranslationService")],ur.prototype,"chartTranslationService",2),fn([ai.PostConstruct],ur.prototype,"init",1);var pr=ur,gr=class extends li.BeanStub{constructor(e,t,i,n){super(),this.chartController=e,this.eGui=t,this.cssClass=i,this.createPanels=n,this.panels=[]}postConstruct(){this.addManagedListener(this.chartController,rs.EVENT_CHART_UPDATED,()=>this.refreshPanels(!0)),this.addManagedListener(this.chartController,rs.EVENT_CHART_API_UPDATE,()=>this.refreshPanels(!1))}addComponent(e){this.createBean(e),this.panels.push(e),e.addCssClass(this.cssClass),this.eGui.appendChild(e.getGui())}refreshPanels(e){const t=this.chartController.getChartType(),i=this.chartController.isGrouping(),n=Rn(t);e&&t===this.chartType&&i===this.isGrouping||(this.destroyPanels(),this.createPanels(t,n),this.chartType=t,this.isGrouping=i)}destroyPanels(){this.panels.forEach(e=>{li._.removeFromParent(e.getGui()),this.destroyBean(e)}),this.panels=[]}destroy(){this.destroyPanels(),super.destroy()}};fn([li.PostConstruct],gr.prototype,"postConstruct",1);var fr={groups:[{type:"chart"},{type:"legend"},{type:"series"},{type:"axis"}]},mr=class e extends Ot.Component{constructor(t){super(e.TEMPLATE),this.chartMenuContext=t}init(){this.chartPanelFeature=this.createManagedBean(new gr(this.chartMenuContext.chartController,this.getGui(),"ag-chart-format-section",(e,t)=>this.createPanels(e,t))),this.chartPanelFeature.refreshPanels()}createPanels(e,t){var i;null==(i=this.getFormatPanelDef().groups)||i.forEach(i=>{const n=i.type;if(!this.isGroupPanelShownInSeries(n,t))return;const s=pn(un({},this.chartMenuContext),{isExpandedOnInit:i.isOpen,seriesType:t});switch(n){case"chart":this.chartPanelFeature.addComponent(new Ws(s));break;case"legend":const n=["treemap","sunburst","heatmap"].includes(e)?new pr(s):new Ms(s);this.chartPanelFeature.addComponent(n);break;case"axis":An(t)?this.chartPanelFeature.addComponent(new _s(s)):Mn(t)&&(this.chartPanelFeature.addComponent(new Ns("xAxis",s)),this.chartPanelFeature.addComponent(new Ns("yAxis",s)));break;case"horizontalAxis":this.chartPanelFeature.addComponent(new Ns("xAxis",s));break;case"verticalAxis":this.chartPanelFeature.addComponent(new Ns("yAxis",s));break;case"series":this.chartPanelFeature.addComponent(new dr(s));break;case"navigator":Ot._.warnOnce("'navigator' is now displayed in the charts advanced settings instead of the format panel, and this setting will be ignored.");default:Ot._.warnOnce(`Invalid charts format panel group name supplied: '${i.type}'`)}})}getFormatPanelDef(){var e;return(null==(e=this.gos.get("chartToolPanelsDef"))?void 0:e.formatPanel)||fr}isGroupPanelShownInSeries(e,t){return["chart","legend","series"].includes(e)||Mn(t)&&["axis","horizontalAxis","verticalAxis"].includes(e)||An(t)&&"axis"===e}};mr.TEMPLATE='<div class="ag-chart-format-wrapper"></div>',fn([Ot.PostConstruct],mr.prototype,"init",1);var vr=mr,yr=class extends ui.Component{constructor(e,t){super(),this.tooltipName=t,this.size=58,this.padding=5,this.root=new pi._Scene.Group;const i=new pi._Scene.Scene({width:this.size,height:this.size});i.canvas.element.classList.add("ag-chart-mini-thumbnail-canvas"),i.setRoot(this.root),i.setContainer(e),this.scene=i}init(){this.scene.canvas.element.title=this.chartTranslationService.translate(this.tooltipName),this.scene.render().catch(e=>{console.error("AG Grid - chart update failed",e)})}};fn([(0,ui.Autowired)("chartTranslationService")],yr.prototype,"chartTranslationService",2),fn([ui.PostConstruct],yr.prototype,"init",1);var Cr=class extends yr{constructor(e,t){super(e,t),this.stroke="gray",this.axisOvershoot=3}addAxes(){const e=this.size,t=this.padding,i=new gi._Scene.Line;i.x1=t,i.y1=t,i.x2=t,i.y2=e-t+this.axisOvershoot,i.stroke=this.stroke;const n=new gi._Scene.Line;n.x1=t-this.axisOvershoot+1,n.y1=e-t,n.x2=e-t+1,n.y2=e-t,n.stroke=this.stroke;const s=this.root;s.append(i),s.append(n)}};function br(e){const{stacked:t,size:i,padding:n,xScalePadding:s,xScaleDomain:r,yScaleDomain:o}=e,a=new fi._Scene.BandScale;a.domain=r,a.range=[n,i-n],a.paddingInner=s,a.paddingOuter=s;const l=new fi._Scene.LinearScale;l.domain=o,l.range=[i-n,n];const c=(e,t,i)=>e.map((e,n)=>{const s=i.convert(e),r=new fi._Scene.Rect;return r.x=t.convert(n),r.y=s,r.width=t.bandwidth,r.height=i.convert(0)-s,r.strokeWidth=0,r.crisp=!0,r});return t?e.data.map(e=>c(e,a,l)):c(e.data,a,l)}function Sr(e,t,i,n){const s=new fi._Scene.LinearScale;s.domain=[0,4],s.range=[n,i-n];const r=new fi._Scene.LinearScale;r.domain=[0,10],r.range=[i-n,n];const o=t.map(e=>{const t=new fi._Scene.Path;return t.strokeWidth=3,t.lineCap="round",t.fill=void 0,e.forEach((e,i)=>{t.path[i>0?"lineTo":"moveTo"](s.convert(i),r.convert(e))}),t}),a=new fi._Scene.Group;return a.setClipRectInGroupCoordinateSpace(new fi._Scene.BBox(n,n,i-2*n,i-2*n)),a.append(o),e.append(a),o}function wr(e,t,i,n,s,r=0){const o=new fi._Scene.LinearScale;o.domain=[0,7],o.range=[-Math.PI,Math.PI].map(e=>e+Math.PI/2);const a=new fi._Scene.LinearScale;a.domain=[0,10],a.range=[n,s];const l=[],c=t.map(e=>{const t=new fi._Scene.Path;return t.strokeWidth=1,t.strokeOpacity=.5,t.lineCap="round",t.fill=void 0,t.fillOpacity=.8,e.forEach((e,i)=>{const c=o.convert(i),h=n+s-a.convert(e),d=h*Math.cos(c),u=h*Math.sin(c);if(t.path[i>0?"lineTo":"moveTo"](d,u),r>0){const e=new fi._Scene.Circle;e.x=d,e.y=u,e.size=r,l.push(e)}}),t.path.closePath(),t}),h=new fi._Scene.Group,d=i/2;return h.translationX=d,h.translationY=d,h.append([...c,...l]),e.append(h),{paths:c,markers:l}}function xr(e){let[t,i]=[1/0,-1/0];return{processedData:e.reduce((e,n,s)=>{const r=s>0?e[s-1]:void 0;null!=e[s]||(e[s]=[]);const o=e[s];return n.forEach((e,n)=>{r&&(e+=r[n]),o[n]=e,o[n]<t&&(t=o[n]),o[n]>i&&(i=o[n])}),e},[]),min:t,max:i}}fn([di.PostConstruct],Cr.prototype,"addAxes",1);var Er=class extends Cr{constructor(e,t,i){super(e,"groupedColumnTooltip"),this.columnData=[2,3,4];const{root:n,columnData:s,size:r,padding:o}=this;this.columns=br({stacked:!1,root:n,data:s,size:r,padding:o,xScaleDomain:[0,1,2],yScaleDomain:[0,4],xScalePadding:.3}),n.append(this.columns),this.updateColors(t,i)}updateColors(e,t){this.columns.forEach((i,n)=>{i.fill=e[n],i.stroke=t[n]})}};Er.chartType="groupedColumn";var Mr=class e extends Cr{constructor(t,i,n,s,r,o=e.data,a=[0,16],l="stackedColumnTooltip"){super(t,l);const{root:c,size:h,padding:d}=this;this.stackedColumns=br({stacked:!0,root:c,data:o,size:h,padding:d,xScaleDomain:[0,1,2],yScaleDomain:a,xScalePadding:.3}),c.append([].concat.apply([],this.stackedColumns)),this.updateColors(i,n)}updateColors(e,t){this.stackedColumns.forEach((i,n)=>i.forEach(i=>{i.fill=e[n],i.stroke=t[n]}))}};Mr.chartType="stackedColumn",Mr.data=[[8,12,16],[6,9,12],[2,3,4]];var Ar=Mr,Tr=class e extends Ar{constructor(t,i,n,s,r){super(t,i,n,s,r,e.data,[0,10],"normalizedColumnTooltip")}};Tr.chartType="normalizedColumn",Tr.data=[[10,10,10],[6,7,8],[2,4,6]];var Dr=Tr,Ir=class extends Cr{constructor(e,t,i){super(e,"groupedBarTooltip");const n=this.padding,s=this.size,r=new mi._Scene.BandScale;r.domain=[0,1,2],r.range=[n,s-n],r.paddingInner=.3,r.paddingOuter=.3;const o=new mi._Scene.LinearScale;o.domain=[0,4],o.range=[s-n,n];const a=o.convert(0),l=r.bandwidth;this.bars=[2,3,4].map((e,t)=>{const i=new mi._Scene.Rect;return i.x=n,i.y=r.convert(t),i.width=a-o.convert(e),i.height=l,i.strokeWidth=0,i.crisp=!0,i}),this.updateColors(t,i),this.root.append(this.bars)}updateColors(e,t){this.bars.forEach((i,n)=>{i.fill=e[n],i.stroke=t[n]})}};Ir.chartType="groupedBar";var Rr=class e extends Cr{constructor(t,i,n,s,r,o=e.data,a=[0,16],l="stackedBarTooltip"){super(t,l);const c=this.size,h=this.padding,d=new vi._Scene.BandScale;d.domain=[0,1,2],d.range=[h,c-h],d.paddingInner=.3,d.paddingOuter=.3;const u=new vi._Scene.LinearScale;u.domain=a,u.range=[c-h,h];const p=u.convert(0),g=d.bandwidth;this.bars=o.map(e=>e.map((e,t)=>{const i=new vi._Scene.Rect;return i.x=h,i.y=d.convert(t),i.width=p-u.convert(e),i.height=g,i.strokeWidth=0,i.crisp=!0,i})),this.updateColors(i,n),this.root.append([].concat.apply([],this.bars))}updateColors(e,t){this.bars.forEach((i,n)=>i.forEach(i=>{i.fill=e[n],i.stroke=t[n]}))}};Rr.chartType="stackedBar",Rr.data=[[8,12,16],[6,9,12],[2,3,4]];var Lr=Rr,kr=class e extends Lr{constructor(t,i,n,s,r){super(t,i,n,s,r,e.data,[0,10],"normalizedBarTooltip")}};kr.chartType="normalizedBar",kr.data=[[10,10,10],[6,7,8],[2,4,6]];var Pr=kr,Nr=yi._Scene.toRadians,Or=class extends yr{constructor(e,t,i,n,s,r=.6,o="donutTooltip"){super(e,o);const a=(this.size-2*this.padding)/2,l=a+this.padding,c=[[Nr(-90),Nr(30)],[Nr(30),Nr(120)],[Nr(120),Nr(180)],[Nr(180),Nr(210)],[Nr(210),Nr(240)],[Nr(240),Nr(270)]];this.sectors=c.map(([e,t])=>{const i=new yi._Scene.Sector;return i.centerX=l,i.centerY=l,i.innerRadius=a*r,i.outerRadius=a,i.startAngle=e,i.endAngle=t,i.stroke=void 0,i.strokeWidth=0,i.inset=.75,i}),this.updateColors(t,i),this.root.append(this.sectors)}updateColors(e,t){this.sectors.forEach((i,n)=>{i.fill=e[n%e.length],i.stroke=t[n%t.length]})}};Or.chartType="donut";var _r=class extends Or{constructor(e,t,i,n,s){super(e,t,i,n,s,0,"pieTooltip")}};_r.chartType="pie";var Fr=class extends Cr{constructor(e,t,i){super(e,"lineTooltip"),this.data=[[9,7,8,5,6],[5,6,3,4,1],[1,3,4,8,7]],this.lines=Sr(this.root,this.data,this.size,this.padding),this.updateColors(t,i)}updateColors(e,t){this.lines.forEach((t,i)=>{t.stroke=e[i]})}};Fr.chartType="line";var Gr=class extends Cr{constructor(e,t,i){super(e,"scatterTooltip");const n=this.size,s=this.padding,r=new Ci._Scene.LinearScale;r.domain=[-.5,4],r.range=[2*s,n-s];const o=new Ci._Scene.LinearScale;o.domain=[-.5,3.5],o.range=[n-s,s];const a=[];[[[.3,3],[1.1,.9],[2,.4],[3.4,2.4]],[[0,.3],[1,2],[2.4,1.4],[3,0]]].forEach(e=>{e.forEach(([e,t])=>{const i=new Ci._Scene.Arc;i.strokeWidth=0,i.centerX=r.convert(e),i.centerY=o.convert(t),i.radius=2.5,a.push(i)})}),this.points=a,this.updateColors(t,i);const l=new Ci._Scene.Group;l.setClipRectInGroupCoordinateSpace(new Ci._Scene.BBox(s,s,n-2*s,n-2*s)),l.append(this.points),this.root.append(l)}updateColors(e,t){this.points.forEach((i,n)=>{i.stroke=t[n%t.length],i.fill=e[n%e.length]})}};Gr.chartType="scatter";var Vr=class extends Cr{constructor(e,t,i){super(e,"bubbleTooltip");const n=this.size,s=this.padding,r=new bi._Scene.LinearScale;r.domain=[0,1],r.range=[2*s,n-s];const o=new bi._Scene.LinearScale;o.domain=[0,1],o.range=[n-s,s];const a=[];[[[.1,.3,5],[.5,.4,7],[.2,.8,7]],[[.8,.7,5],[.7,.3,9]]].forEach(e=>{e.forEach(([e,t,i])=>{const n=new bi._Scene.Arc;n.strokeWidth=0,n.centerX=r.convert(e),n.centerY=o.convert(t),n.radius=i,n.fillOpacity=.7,a.push(n)})}),this.points=a,this.updateColors(t,i);const l=new bi._Scene.Group;l.setClipRectInGroupCoordinateSpace(new bi._Scene.BBox(s,s,n-2*s,n-2*s)),l.append(this.points),this.root.append(l)}updateColors(e,t){this.points.forEach((i,n)=>{i.stroke=t[n%t.length],i.fill=e[n%e.length]})}};Vr.chartType="bubble";var Br=class e extends Cr{constructor(t,i,n,s,r,o=e.data){super(t,"groupedAreaTooltip");const a=this.size,l=this.padding,c=new Si._Scene.BandScale;c.domain=[0,1,2],c.paddingInner=1,c.paddingOuter=0,c.range=[l+.5,a-l-.5];const h=new Si._Scene.LinearScale;h.domain=[0,6],h.range=[a-l+.5,l];const d=2*o.length-1,u=[],p=h.convert(0);o.forEach((e,t)=>{const i=c.convert(t);e.forEach((e,n)=>{const s=h.convert(e),r=u[n]||(u[n]=[]);r[t]={x:i,y:s},r[d-t]={x:i,y:p}})}),this.areas=u.reverse().map(e=>{const t=new Si._Scene.Path;t.strokeWidth=1,t.strokeOpacity=.75,t.fillOpacity=.7;const i=t.path;return i.clear(),e.forEach((e,t)=>i[t>0?"lineTo":"moveTo"](e.x,e.y)),i.closePath(),t}),this.updateColors(i,n),this.root.append(this.areas)}updateColors(e,t){this.areas.forEach((i,n)=>{i.fill=e[n],i.stroke=t[n]})}};Br.chartType="area",Br.data=[[1,3,5],[2,6,4],[5,3,1]];var Hr=Br,zr=class e extends Cr{constructor(t,i,n,s,r,o=e.data,a="stackedAreaTooltip"){super(t,a);const l=this.size,c=this.padding,h=new wi._Scene.BandScale;h.domain=[0,1,2],h.paddingInner=1,h.paddingOuter=0,h.range=[c+.5,l-c-.5];const d=new wi._Scene.LinearScale;d.domain=[0,16],d.range=[l-c+.5,c+.5];const u=2*o.length-1,p=[];o.forEach((e,t)=>{const i=h.convert(t);let n=0;e.forEach((e,s)=>{const r=d.convert(n+e),o=p[s]||(p[s]=[]);o[t]={x:i,y:r},o[u-t]={x:i,y:d.convert(n)},n+=e})}),this.areas=p.map(e=>{const t=new wi._Scene.Path;t.strokeWidth=0;const i=t.path;return i.clear(),e.forEach((e,t)=>i[t>0?"lineTo":"moveTo"](e.x,e.y)),i.closePath(),t}),this.updateColors(i,n),this.root.append(this.areas)}updateColors(e,t){this.areas.forEach((i,n)=>{i.fill=e[n],i.stroke=t[n]})}};zr.chartType="stackedArea",zr.data=[[2,3,2],[3,6,5],[6,2,2]];var Ur=zr,Wr=class e extends Ur{constructor(t,i,n,s,r,o=e.data){super(t,i,n,s,r,o,"normalizedAreaTooltip")}};Wr.chartType="normalizedArea",Wr.data=Ur.data.map(e=>{const t=e.reduce((e,t)=>e+t,0);return e.map(e=>e/t*16)});var jr=Wr,Kr=class extends Cr{constructor(e,t,i){super(e,"histogramTooltip");const n=this.padding,s=this.size,r=[2,5,11,13,10,6,1],o=new xi._Scene.LinearScale;o.domain=[0,r.length],o.range=[n,s-n];const a=new xi._Scene.LinearScale;a.domain=[0,r.reduce((e,t)=>Math.max(e,t),0)],a.range=[s-n,n];const l=a.convert(0);this.bars=r.map((e,t)=>{const i=a.convert(e),n=o.convert(t),s=o.convert(t+1),r=new xi._Scene.Rect;return r.x=n,r.y=i,r.width=s-n,r.height=l-i,r.strokeWidth=1,r.strokeOpacity=.75,r.crisp=!0,r}),this.updateColors(t,i),this.root.append(this.bars)}updateColors([e],[t]){this.bars.forEach(i=>{i.fill=e,i.stroke=t})}};Kr.chartType="histogram";var $r=class extends yr{constructor(e,t){super(e,t),this.stroke="gray",this.showRadiusAxisLine=!0,this.showAngleAxisLines=!0}addAxes(){const e=this.size,t=this.padding,i=(e-2*t)/2,n=this.showAngleAxisLines?[i,.8*i,.6*i,.4*i]:[],s=new Ai._Scene.Line;s.x1=e/2,s.y1=t,s.x2=e/2,s.y2=e-t-i-n[n.length-1],s.stroke=this.stroke,s.strokeOpacity=.5,s.fill=void 0,s.visible=this.showRadiusAxisLine;const r=t+i;this.gridLines=n.map((e,t)=>{const i=new Ai._Scene.Path;return i.path.arc(r,r,e,0,2*Math.PI),i.strokeWidth=1,i.stroke=this.stroke,i.strokeOpacity=0===t?.5:.2,i.fill=void 0,i});const o=this.root;o.append(s),this.gridLines.length>0&&o.append(this.gridLines)}};fn([Mi.PostConstruct],$r.prototype,"addAxes",1);var Yr=class extends $r{constructor(e,t,i){super(e,"radialColumnTooltip"),this.data=[[6,8,10,2,6,5],[4,4,3,6,4,4],[5,4,2,9,8,9]],this.showRadiusAxisLine=!1;const{padding:n,size:s,data:r}=this,o=(s-2*n)/2,a=.4*o,l=new Ei._Scene.BandScale;l.domain=r[0].map((e,t)=>t),l.range=[0,2*Math.PI],l.paddingInner=0,l.paddingOuter=0;const c=.7*l.bandwidth,{processedData:h,max:d}=xr(r),u=new Ei._Scene.LinearScale;u.domain=[0,d],u.range=[a,o];const p=this.size/2;this.series=h.map((e,t)=>{const i=0===t?void 0:h[t-1],n=new Ei._Scene.Group({zIndex:1e6}),s=e.map((e,t)=>{const n=null==i?void 0:i[t],s=u.convert(e),r=u.convert(null!=n?n:0),h=l.convert(t),d=h+c,g=Ei._Scene.getRadialColumnWidth(h,d,o,.5,.5),f=new Ei._Scene.RadialColumnShape;return f.scalingCenterX=p,f.scalingCenterY=p,f.columnWidth=g,f.innerRadius=r,f.outerRadius=s,f.startAngle=h,f.endAngle=d,f.isBeveled=!0,f.axisInnerRadius=a,f.axisOuterRadius=o,f.stroke=void 0,f.strokeWidth=0,f});return n.append(s),n.translationX=p,n.translationY=p,n}),this.root.append(this.series),this.updateColors(t,i)}updateColors(e,t){this.series.forEach((i,n)=>{var s;null==(s=i.children)||s.forEach(i=>{i.fill=e[n%e.length],i.stroke=t[n%t.length]})})}};Yr.chartType="radialColumn";var qr=class extends $r{constructor(e,t,i){super(e,"radialBarTooltip"),this.data=[[6,8,10],[4,4,3],[5,4,2]],this.showRadiusAxisLine=!1;const n=(this.size-this.padding)/2,s=.4*n,r=n+s,o=new Ti._Scene.BandScale;o.domain=this.data[0].map((e,t)=>t),o.range=[n,s],o.paddingInner=.5,o.paddingOuter=0;const a=o.bandwidth,{processedData:l,max:c}=xr(this.data),h=new Ti._Scene.LinearScale;h.domain=[0,Math.ceil(1.5*c)];const d=1.5*Math.PI,u=d+2*Math.PI;h.range=[d,u];const p=this.size/2;this.series=l.map((e,t)=>{const i=t<0?void 0:l[t-1],n=new Ti._Scene.Group({zIndex:1e6}),s=e.map((e,t)=>{var n;const s=null!=(n=null==i?void 0:i[t])?n:0,l=r-o.convert(t),c=l+a,d=h.convert(s),u=h.convert(e),g=new Ti._Scene.Sector;return g.centerX=p,g.centerY=p,g.innerRadius=l,g.outerRadius=c,g.startAngle=d,g.endAngle=u,g.stroke=void 0,g.strokeWidth=0,g});return n.append(s),n}),this.root.append(this.series),this.updateColors(t,i)}updateColors(e,t){this.series.forEach((i,n)=>{var s;null==(s=i.children)||s.forEach(i=>{i.fill=e[n%e.length],i.stroke=t[n%t.length]})})}};qr.chartType="radialBar";var Xr=class extends $r{constructor(e,t,i){super(e,"radarLineTooltip"),this.markerSize=4,this.data=[[8,7,8,7,8,8,7,8],[6,8,5,10,6,7,4,6],[0,3,3,5,4,4,2,0]],this.showRadiusAxisLine=!1;const n=(this.size-2*this.padding)/2,{paths:s,markers:r}=wr(this.root,this.data,this.size,n,0,this.markerSize);this.lines=s,this.markers=r,this.updateColors(t,i)}updateColors(e,t){this.lines.forEach((i,n)=>{const s=this.data[n].length;i.stroke=e[n];const r=n*s,o=r+s;this.markers.slice(r,o).forEach(i=>{i.stroke=t[n],i.fill=e[n]})})}};Xr.chartType="radarLine";var Zr=class extends $r{constructor(e,t,i){super(e,"radarAreaTooltip"),this.data=[[8,10,5,7,4,1,5,8],[1,1,2,7,7,8,10,1],[4,5,9,9,4,2,3,4]],this.showRadiusAxisLine=!1;const n=(this.size-2*this.padding)/2,s=n-.3*this.size;this.areas=wr(this.root,this.data,this.size,n,s).paths,this.updateColors(t,i)}updateColors(e,t){this.areas.forEach((i,n)=>{i.fill=e[n],i.stroke=t[n]})}};Zr.chartType="radarArea";var Qr=class extends $r{constructor(e,t,i){super(e,"nightingaleTooltip"),this.data=[[6,10,9,8,7,8],[4,6,5,4,5,5],[3,5,4,3,4,7]],this.showRadiusAxisLine=!1;const n=(this.size-2*this.padding)/2,s=new Di._Scene.BandScale;s.domain=this.data[0].map((e,t)=>t),s.range=[-Math.PI,Math.PI],s.paddingInner=0,s.paddingOuter=0;const r=.7*s.bandwidth,{processedData:o,max:a}=xr(this.data),l=new Di._Scene.LinearScale;l.domain=[0,a],l.range=[0,n];const c=this.size/2;this.series=o.map((e,t)=>{const i=t<0?void 0:o[t-1],n=new Di._Scene.Group({zIndex:1e6}),a=e.map((e,t)=>{const n=null==i?void 0:i[t],o=l.convert(e),a=l.convert(null!=n?n:0),h=s.convert(t),d=h+r,u=new Di._Scene.Sector;return u.centerX=c,u.centerY=c,u.innerRadius=a,u.outerRadius=o,u.startAngle=h,u.endAngle=d,u.stroke=void 0,u.strokeWidth=0,u});return n.append(a),n}),this.root.append(this.series),this.updateColors(t,i)}updateColors(e,t){this.series.forEach((i,n)=>{var s;null==(s=i.children)||s.forEach(i=>{i.fill=e[n%e.length],i.stroke=t[n%t.length]})})}};Qr.chartType="nightingale";var Jr=class extends Cr{constructor(e,t,i){super(e,"rangeBarTooltip"),this.bars=this.createRangeBar(this.root,[3,3.5,3],this.size,this.padding,"vertical"),this.updateColors(t,i)}updateColors(e,t){this.bars.forEach((i,n)=>{i.fill=e[n],i.stroke=t[n]})}createRangeBar(e,t,i,n,s){const r="horizontal"===s,o=2*n,a=new Ii._Scene.BandScale;a.domain=t.map((e,t)=>t),a.range=[n,i-n],a.paddingInner=.3,a.paddingOuter=.3;const l=new Ii._Scene.LinearScale;l.domain=[.7*t.reduce((e,t)=>Math.min(e,t),1/0),1.3*t.reduce((e,t)=>Math.max(e,t),0)],l.range=[o,i-o];const c=a.bandwidth,h=t.map((e,t)=>{const[i,n]=[.7*e,1.3*e],s=a.convert(t),o=l.convert(i),h=l.convert(n)-o,d=new Ii._Scene.Rect;return d.x=r?o:s,d.y=r?s:o,d.width=r?h:c,d.height=r?c:h,d.strokeWidth=0,d.crisp=!0,d});return e.append(h),h}};Jr.chartType="rangeBar";var eo=class extends Cr{constructor(e,t,i){super(e,"rangeAreaTooltip");const n=[to({offset:1.5,length:4,pattern:{low:3,high:5,period:4}}),to({offset:1.5,length:4,pattern:{low:2.25,high:4.25,period:4}}),to({offset:3,length:4,pattern:{low:2.5,high:4.5,period:4}})].map(e=>e.map(([e,t])=>({x:e,low:t-.875,high:t+.875}))),{lines:s,areas:r}=this.createRangeArea(this.root,n,this.size,this.padding);this.lines=s,this.areas=r,this.updateColors(t,i)}updateColors(e,t){e=no(e,1,2),t=no(t,1,2),this.lines.forEach(([e,i],n)=>{e.fill=void 0,e.stroke=t[n],i.fill=void 0,i.stroke=t[n]}),this.areas.forEach((t,i)=>{t.fill=e[i]})}createRangeArea(e,t,i,n){const s=t.reduce((e,t)=>t.reduce((e,{x:t})=>Math.min(e,t),e),1/0),r=t.reduce((e,t)=>t.reduce((e,{x:t})=>Math.max(e,t),e),-1/0),o=t.reduce((e,t)=>t.reduce((e,{low:t})=>Math.min(e,t),e),1/0),a=t.reduce((e,t)=>t.reduce((e,{high:t})=>Math.max(e,t),e),-1/0),l=new Ri._Scene.LinearScale;l.domain=[s,r],l.range=[n,i-n];const c=2*n,h=new Ri._Scene.LinearScale;h.domain=[o,a],h.range=[i-c,c];const d=[],u=[];return t.map(e=>{const t=new Ri._Scene.Path,i=new Ri._Scene.Path,n=new Ri._Scene.Path;return d.push([t,i]),u.push(n),t.strokeWidth=0,i.strokeWidth=0,n.strokeWidth=0,n.fillOpacity=.8,t.path.clear(),i.path.clear(),n.path.clear(),e.map((e,s)=>{const{x:r,low:o,high:a}=e,c=l.convert(r),d=h.convert(o),u=h.convert(a),p=s>0?"lineTo":"moveTo";return t.path[p](c,u),i.path[p](c,d),n.path[p](c,u),[c,d]})}).forEach((e,t)=>{const i=e.length-1,n=u[t];for(let t=i;t>=0;t--){const[i,s]=e[t];n.path.lineTo(i,s)}}),e.append(u.concat(...d)),{lines:d,areas:u}}};function to(e){const{offset:t,length:i,pattern:n}=e,s=function(e,t,i){const{period:n}=i,s=e/n,r=[0,.5].map(e=>e-s).map(io).sort((e,t)=>e-t);return Array.from({length:Math.floor(r.length*(n/t))},(e,t)=>r[t%r.length]+Math.floor(t/r.length)).map(e=>e*n).map(t=>o(t,e,i))}(t,i,n),r=i;return 0!==s.length&&0===s[0][0]||s.unshift(o(0,t,n)),s[s.length-1][0]!==r&&s.push(o(r,t,n)),s;function o(e,t,i){return[e,a(t+e,i)]}function a(e,t){const{low:i,high:n,period:s}=t,r=io(e/s);return i+(n-i)*(r>.5?1-2*(r-.5):2*r)}}function io(e){const t=e%1;return t<0?t+1:t}function no(e,t,i){const n=[...e],s=n[t];return n[t]=n[i],n[i]=s,n}eo.chartType="rangeArea";var so=class extends Cr{constructor(e,t,i,n,s){super(e,"boxPlotTooltip");const r=this.padding,o=this.size,a=[11,11.5,10.5],l=new Li._Scene.LinearScale;l.domain=[.8*a.reduce((e,t)=>Math.min(e,t),1/0),1.2*a.reduce((e,t)=>Math.max(e,t),0)],l.range=[o-1.5*r,r];const c=new Li._Scene.BandScale;c.domain=a.map((e,t)=>t),c.range=[r,o-r],c.paddingInner=.4,c.paddingOuter=.2;const h=Math.round(c.bandwidth),d=Math.round(c.bandwidth/2);this.boxPlotGroups=a.map((e,t)=>{let[i,n,s,r]=[.8*e,.9*e,1.1*e,1.2*e];const o=Math.round(l.convert(s)),a=Math.round(c.convert(t)),u=Math.round(a+h),p=Math.round(l.convert(n)),g=Math.round(l.convert(i)),f=Math.round(l.convert(e)),m=Math.round(l.convert(r)),v=a+d,y=new Li._Scene.Group,C=new Li._Scene.Rect,b=new Li._Scene.Line,S=new Li._Scene.Line,w=new Li._Scene.Line,x=new Li._Scene.Line,E=new Li._Scene.Line;return C.x=a,C.y=o,C.width=h,C.height=p-o,C.strokeWidth=1,C.strokeOpacity=.75,C.crisp=!0,this.setLineProperties(b,a,u,f,f),this.setLineProperties(S,v,v,m,o),this.setLineProperties(w,v,v,g,p),this.setLineProperties(x,a,u,m,m),this.setLineProperties(E,a,u,g,g),y.append([C,b,S,w,x,E]),y}),this.updateColors(t,i,n,s),this.root.append(this.boxPlotGroups)}updateColors(e,t,i,n){var s;const r=null==i?void 0:i.properties.get(Li._Theme.DEFAULT_BACKGROUND_COLOUR),o=null!=(s=Array.isArray(r)?r[0]:r)?s:"white";this.boxPlotGroups.forEach((i,s)=>{var r;null==(r=i.children)||r.forEach(i=>{const r=e[s%e.length];i.fill=n?r:Li._Util.Color.interpolate(r,o)(.7),i.stroke=t[s%t.length]})})}setLineProperties(e,t,i,n,s){e.x1=t,e.x2=i,e.y1=n,e.y2=s,e.strokeOpacity=.75}};so.chartType="boxPlot";var ro=class extends yr{constructor(e,t,i,n,s){super(e,"treemapTooltip");const{size:r,padding:o}=this,a=[[1,1],[3,2,1]],l=a.length%2==0?.3:.2,c=[o,r-o],h=a.length,d=h*(h+1)/2,u=l/(h-1),p=c[1]-c[0],g=p-l;let f=c[0];this.rects=a.reduce((e,t,i)=>{null!=e||(e=[]);const n=g*((h-i)/d),s=t.length,r=t.reduce((e,t)=>e+t,0),o=l/(s-1||1),a=s>1?p-l:p;let m=c[0];const v=t.map(e=>{const t=new ki._Scene.Rect,i=a*e/r;return t.x=f,t.y=m,t.width=n,t.height=i,t.strokeWidth=.75,t.crisp=!0,m+=i+o,t});return f+=n+u,e.push(...v),e},[]),this.updateColors(t,i,n,s);const m=new ki._Scene.Group;m.setClipRectInGroupCoordinateSpace(new ki._Scene.BBox(o,o,r-o,r-o)),m.append(this.rects),this.root.append(m)}updateColors(e,t,i,n){var s;const{properties:r}=null!=i?i:{},o=null==r?void 0:r.get(ki._Theme.DEFAULT_BACKGROUND_COLOUR),a=null!=(s=Array.isArray(o)?o[0]:o)?s:"white";this.rects.forEach((i,s)=>{i.fill=e[s%t.length],i.stroke=n?t[s%t.length]:a})}};ro.chartType="treemap";var oo=class extends $r{constructor(e,t,i){super(e,"sunburstTooltip"),this.data=[[[],[]],[[],[]],[[],[]]],this.angleOffset=-Math.PI/2,this.innerRadiusRatio=0,this.showRadiusAxisLine=!1,this.showAngleAxisLines=!1;const{data:n,size:s,padding:r,angleOffset:o,innerRadiusRatio:a}=this,l=(s-2*r)/2,c=[o+0,o+2*Math.PI],h=Math.abs(c[1]-c[0]),d=[l*a,l],u=Math.abs(d[1]-d[0]);let p=0;const g=(e,t)=>{e.forEach(e=>{const i=t+1;p=Math.max(p,i),g(e,i)})};g(n,0);const f=u/p,m=this.size/2,v=c[0];this.series=[];const y=(e,t,i,n,s)=>{if(!Array.isArray(e))return;const r=t+1;let o=i;e.forEach((e,i,a)=>{let l=s;l||(l=new Pi._Scene.Group,this.series.push(l));const c=d[0]+t*f,h=d[0]+r*f,u=1/a.length,p=o,g=p+n*u,v=new Pi._Scene.Sector;v.centerX=m,v.centerY=m,v.innerRadius=c,v.outerRadius=h,v.startAngle=p,v.endAngle=g,v.stroke=void 0,v.strokeWidth=0,v.inset=.75,o=g,l.append(v),y(e,r,p,Math.abs(g-p),l)})};y(n,0,v,h),this.root.append(this.series),this.updateColors(t,i)}updateColors(e,t){this.series.forEach((i,n)=>{var s;null==(s=i.children)||s.forEach(i=>{i.fill=e[n%e.length],i.stroke=t[n%t.length]})})}};oo.chartType="sunburst";var ao=class extends yr{constructor(e,t,i,n,s){var r,o;super(e,"heatmapTooltip");const{size:a,padding:l}=this,c=Array.from({length:3},(e,t)=>Array.from({length:3},(e,t)=>t)),h=c.map((e,t)=>t),d=new Ni._Scene.BandScale;d.domain=h,d.range=[l,a-l],d.paddingInner=.01,d.paddingOuter=.1;const u=new Ni._Scene.BandScale;u.domain=h,u.range=[l,a-l],u.paddingInner=.01,u.paddingOuter=.1;const p=null!=(r=d.bandwidth)?r:0,g=null!=(o=u.bandwidth)?o:0;this.rects=c.reduce((e,t,i)=>{null!=e||(e=[]);const n=t.map((e,t)=>{const n=new Ni._Scene.Rect;return n.x=d.convert(i),n.y=u.convert(t),n.width=p,n.height=g,n.strokeWidth=0,n.crisp=!0,n});return e.push(...n),e},[]),this.updateColors(t,i,n,s);const f=new Ni._Scene.Group;f.setClipRectInGroupCoordinateSpace(new Ni._Scene.BBox(l,l,a-l,a-l)),f.append(this.rects),this.root.append(f)}updateColors(e,t,i,n){var s;const{properties:r}=null!=i?i:{},o=null==r?void 0:r.get(Ni._Theme.DEFAULT_DIVERGING_SERIES_COLOUR_RANGE),a=null==r?void 0:r.get(Ni._Theme.DEFAULT_BACKGROUND_COLOUR),l=null!=(s=Array.isArray(a)?a[0]:a)?s:"white",c=n?[e[0],e[1]]:o,h=n?t[0]:l;this.rects.forEach((e,t)=>{e.fill=Ni._Util.Color.interpolate(c[0],c[1])(.2*t),e.stroke=h})}};ao.chartType="heatmap";var lo=class extends Cr{constructor(e,t,i,n,s){super(e,"waterfallTooltip"),this.data=[4,3,-3,6,-3],this.bars=this.createWaterfall(this.root,this.data,this.size,this.padding,"vertical").bars,this.updateColors(t,i,n,s)}updateColors(e,t,i,n){var s,r;const{data:o}=this,{properties:a}=null!=i?i:{},l={fill:e[0],stroke:t[0]},c={fill:e[1],stroke:t[1]},h=n?l:null!=(s=null==a?void 0:a.get(Oi._Theme.DEFAULT_WATERFALL_SERIES_POSITIVE_COLOURS))?s:l,d=n?c:null!=(r=null==a?void 0:a.get(Oi._Theme.DEFAULT_WATERFALL_SERIES_NEGATIVE_COLOURS))?r:c;this.bars.forEach((e,t)=>{const i=o[t]>=0;e.fill=i?h.fill:d.fill,e.stroke=i?h.stroke:d.stroke})}createWaterfall(e,t,i,n,s){const r=2*n,{processedData:o,min:a,max:l}=xr(t.map(e=>[e])),c=o.reduce((e,t)=>e.concat(t),[]),h=new Oi._Scene.LinearScale;h.domain=[Math.min(a,0),l],h.range=[i-r,r];const d=new Oi._Scene.BandScale;d.domain=t.map((e,t)=>t),d.range=[n,i-n],d.paddingInner=.2,d.paddingOuter=.3;const u=d.bandwidth,p=new Oi._Scene.Path;p.stroke="#575757",p.strokeWidth=0;const g=Math.floor(p.strokeWidth)%2/2,f=p.path;f.clear();const m="horizontal"===s,v=c.map((e,i)=>{const n=i>0?c[i-1]:0,s=t[i]>0,r=Math.round(h.convert(e)),o=Math.round(h.convert(n)),a=(s?r:o)-g,l=(s?o:r)+g,p=Math.abs(l-a),v=d.convert(i),y=new Oi._Scene.Rect;y.x=m?a:v,y.y=m?v:a,y.width=m?p:u,y.height=m?u:p,y.strokeWidth=0,y.crisp=!0;const C=r+g,b=o+g;if(i>0){const e=m?b:y.x,t=m?y.y:b;f.lineTo(e,t)}const S=m?C:y.x,w=m?y.y:C;return f.moveTo(S,w),y});return e.append([p,...v]),{bars:v}}};lo.chartType="waterfall";var co=class extends Cr{constructor(e,t,i){super(e,"columnLineComboTooltip"),this.columnData=[3,4],this.lineData=[[5,4,6,5,4]];const{root:n,columnData:s,lineData:r,size:o,padding:a}=this;this.columns=br({stacked:!1,root:n,data:s,size:o,padding:a,xScaleDomain:[0,1],yScaleDomain:[0,4],xScalePadding:.5}),n.append(this.columns),this.lines=Sr(n,r,o,a),this.updateColors(t,i)}updateColors(e,t){this.columns.forEach((i,n)=>{i.fill=e[n],i.stroke=t[n]}),this.lines.forEach((t,i)=>{t.stroke=e[i+2]})}};co.chartType="columnLineCombo";var ho=class extends Cr{constructor(e,t,i){super(e,"areaColumnComboTooltip"),this.columnData=[3,4.5],this.areaData=[[5,4,6,5,4]];const{root:n,columnData:s,areaData:r,size:o,padding:a}=this;this.columns=br({stacked:!1,root:n,data:s,size:o,padding:a,xScaleDomain:[0,1],yScaleDomain:[0,6],xScalePadding:.5});const l=new _i._Scene.BandScale;l.range=[a,o-a],l.domain=[0,1,2,3,4],l.paddingInner=1,l.paddingOuter=0;const c=new _i._Scene.LinearScale;c.range=[o-a,a],c.domain=[0,6];const h=[],d=c.convert(0),u=l.convert(0);r.forEach((e,t)=>{const i=h[t]||(h[t]=[]);e.forEach((e,t)=>{const n=e,s=t,r=l.convert(s),o=c.convert(n);i[t]={x:r,y:o}});const n=l.convert(e.length-1);h[t].push({x:n,y:d},{x:u,y:d})}),this.areas=h.map(e=>{const t=new _i._Scene.Path;t.strokeWidth=0,t.fillOpacity=.8;const i=t.path;return e.forEach((e,t)=>i[t>0?"lineTo":"moveTo"](e.x,e.y)),t}),n.append(this.areas),n.append([].concat.apply([],this.columns)),this.updateColors(t,i)}updateColors(e,t){this.areas.forEach((i,n)=>{i.fill=e[n],i.stroke=t[n]}),this.columns.forEach((i,n)=>{i.fill=e[n+1],i.stroke=t[n+1]})}};ho.chartType="areaColumnCombo";var uo=class extends yr{constructor(e,t,i){super(e,"customComboTooltip"),this.columnData=[3,4],this.lineData=[[5,4,6,5,4]];const{root:n,columnData:s,lineData:r,size:o,padding:a}=this;this.columns=br({stacked:!1,root:n,data:s,size:o,padding:a,xScaleDomain:[0,1],yScaleDomain:[0,4],xScalePadding:.5}),n.append(this.columns),this.lines=Sr(n,r,o,a);const l="grey",c=new Fi._Scene.Line;c.x1=a,c.y1=a,c.x2=a,c.y2=o-a+3,c.stroke=l;const h=new Fi._Scene.Line;h.x1=a-3+1,h.y1=o-a,h.x2=o-a+1,h.y2=o-a,h.stroke=l;const d=new Fi._Scene.Path;this.buildPenIconPath(d),d.fill="whitesmoke",d.stroke="darkslategrey",d.strokeWidth=1,n.append([h,c,d]),this.updateColors(t,i)}updateColors(e,t){this.columns.forEach((i,n)=>{i.fill=e[n],i.stroke=t[n]}),this.lines.forEach((t,i)=>{t.stroke=e[i+2]})}buildPenIconPath(e){const{path:t}=e;t.moveTo(25.76,43.46),t.lineTo(31.27,48.53),t.moveTo(49.86,22),t.lineTo(49.86,22),t.cubicCurveTo(49.01994659053345,21.317514933510974,47.89593834348529,21.09645997825817,46.86,21.41),t.lineTo(46.86,21.41),t.cubicCurveTo(45.55460035985361,21.77260167850787,44.38777081121966,22.517979360321792,43.51,23.55),t.lineTo(25.51,43.8),t.lineTo(25.43,43.89),t.lineTo(23.01,51.89),t.lineTo(22.83,52.46),t.lineTo(31.02,48.86),t.lineTo(49.02,28.52),t.lineTo(49.02,28.52),t.cubicCurveTo(49.940716461596224,27.521914221246085,50.54302631059587,26.2720342455763,50.75,24.93),t.lineTo(50.75,24.93),t.cubicCurveTo(50.95363374988308,23.866379846512814,50.62080640232334,22.77066734274871,49.86,22),t.closePath(),t.moveTo(41.76,25.5),t.lineTo(47.34,30.5),t.moveTo(40.74,26.65),t.lineTo(46.25,31.71)}};uo.chartType="customCombo";var po={columnGroup:{column:{range:!0,pivot:!0,enterprise:!1,icon:Er},stackedColumn:{range:!0,pivot:!0,enterprise:!1,icon:Ar},normalizedColumn:{range:!0,pivot:!0,enterprise:!1,icon:Dr}},barGroup:{bar:{range:!0,pivot:!0,enterprise:!1,icon:Ir},stackedBar:{range:!0,pivot:!0,enterprise:!1,icon:Lr},normalizedBar:{range:!0,pivot:!0,enterprise:!1,icon:Pr}},pieGroup:{pie:{range:!0,pivot:!0,enterprise:!1,icon:_r},donut:{range:!0,pivot:!0,enterprise:!1,icon:Or},doughnut:{range:!0,pivot:!0,enterprise:!1,icon:Or}},lineGroup:{line:{range:!0,pivot:!0,enterprise:!1,icon:Fr}},scatterGroup:{scatter:{range:!0,pivot:!0,enterprise:!1,icon:Gr},bubble:{range:!0,pivot:!0,enterprise:!1,icon:Vr}},areaGroup:{area:{range:!0,pivot:!0,enterprise:!1,icon:Hr},stackedArea:{range:!0,pivot:!0,enterprise:!1,icon:Ur},normalizedArea:{range:!0,pivot:!0,enterprise:!1,icon:jr}},polarGroup:{radarLine:{range:!0,pivot:!1,enterprise:!0,icon:Xr},radarArea:{range:!0,pivot:!1,enterprise:!0,icon:Zr},nightingale:{range:!0,pivot:!1,enterprise:!0,icon:Qr},radialColumn:{range:!0,pivot:!1,enterprise:!0,icon:Yr},radialBar:{range:!0,pivot:!1,enterprise:!0,icon:qr}},statisticalGroup:{boxPlot:{range:!0,pivot:!1,enterprise:!0,icon:so},histogram:{range:!0,pivot:!1,enterprise:!1,icon:Kr},rangeBar:{range:!0,pivot:!1,enterprise:!0,icon:Jr},rangeArea:{range:!0,pivot:!1,enterprise:!0,icon:eo}},hierarchicalGroup:{treemap:{range:!0,pivot:!0,enterprise:!0,icon:ro},sunburst:{range:!0,pivot:!0,enterprise:!0,icon:oo}},specializedGroup:{heatmap:{range:!0,pivot:!1,enterprise:!0,icon:ao},waterfall:{range:!0,pivot:!1,enterprise:!0,icon:lo}},combinationGroup:{columnLineCombo:{range:!0,pivot:!0,enterprise:!1,icon:co},areaColumnCombo:{range:!0,pivot:!0,enterprise:!1,icon:ho},customCombo:{range:!0,pivot:!0,enterprise:!1,icon:uo}}},go={columnGroup:["column","stackedColumn","normalizedColumn"],barGroup:["bar","stackedBar","normalizedBar"],pieGroup:["pie","donut"],lineGroup:["line"],scatterGroup:["scatter","bubble"],areaGroup:["area","stackedArea","normalizedArea"],polarGroup:["radarLine","radarArea","nightingale","radialColumn","radialBar"],statisticalGroup:["boxPlot","histogram","rangeBar","rangeArea"],hierarchicalGroup:["treemap","sunburst"],specializedGroup:["heatmap","waterfall"],combinationGroup:["columnLineCombo","areaColumnCombo","customCombo"]},fo=class e extends hi.Component{constructor(t,i,n,s,r,o=go){super(e.TEMPLATE),this.wrappers={},this.chartController=t,this.fills=i,this.strokes=n,this.themeTemplateParameters=s,this.isCustomTheme=r,this.chartGroups=un({},o)}init(){!this.chartController.customComboExists()&&this.chartGroups.combinationGroup&&(this.chartGroups.combinationGroup=this.chartGroups.combinationGroup.filter(e=>"customCombo"!==e));const e=this.getGui(),t=this.chartController.isEnterprise(),i=this.chartController.isPivotChart(),n=!i,s=Object.keys(this.chartGroups).map(e=>{var s;const r=e in po?po[e]:void 0;if(!r)return hi._.warnOnce(`invalid chartGroupsDef config '${e}'`),null;const o=(null!=(s=this.chartGroups[e])?s:[]).map(s=>{const o=s in r?r[s]:void 0;return o?!t&&o.enterprise?null:n&&o.range||i&&o.pivot?o:null:(hi._.warnOnce(`invalid chartGroupsDef config '${e}.${s}'`),null)}).filter(e=>null!=e);return 0===o.length?null:{label:this.chartTranslationService.translate(e),items:o}}).filter(e=>null!=e);for(const{label:t,items:i}of s){const n=this.createBean(new hi.AgGroupComponent({title:t,suppressEnabledCheckbox:!0,enabled:!0,suppressOpenCloseIcons:!0,cssIdentifier:"charts-settings",direction:"horizontal"}));for(const e of i){const t=e.icon,i=document.createElement("div");i.classList.add("ag-chart-mini-thumbnail");const s=t.chartType;this.addManagedListener(i,"click",()=>{this.chartController.setChartType(s),this.updateSelectedMiniChart()}),this.wrappers[s]=i,this.createBean(new t(i,this.fills,this.strokes,this.themeTemplateParameters,this.isCustomTheme)),n.addItem(i)}e.appendChild(n.getGui())}this.updateSelectedMiniChart()}updateSelectedMiniChart(){const e=this.chartController.getChartType();for(const t in this.wrappers){const i=t===e;this.wrappers[t].classList.toggle("ag-selected",i)}}};fo.TEMPLATE='<div class="ag-chart-settings-mini-wrapper"></div>',fn([(0,hi.Autowired)("chartTranslationService")],fo.prototype,"chartTranslationService",2),fn([hi.PostConstruct],fo.prototype,"init",1);var mo=fo,vo=class e extends ci.Component{constructor(t){super(e.TEMPLATE),this.chartController=t,this.miniChartsContainers=[],this.cardItems=[],this.activePaletteIndex=0,this.palettes=[],this.themes=[]}postConstruct(){this.resetPalettes(),this.ePrevBtn.insertAdjacentElement("afterbegin",ci._.createIconNoSpan("previous",this.gos)),this.eNextBtn.insertAdjacentElement("afterbegin",ci._.createIconNoSpan("next",this.gos)),this.addManagedListener(this.ePrevBtn,"click",()=>this.setActivePalette(this.getPrev(),"left")),this.addManagedListener(this.eNextBtn,"click",()=>this.setActivePalette(this.getNext(),"right")),this.addManagedListener(this.chartController,rs.EVENT_CHART_TYPE_CHANGED,()=>this.resetPalettes(!0)),this.addManagedListener(this.chartController,rs.EVENT_CHART_API_UPDATE,()=>this.resetPalettes(!0)),this.scrollSelectedIntoView()}scrollSelectedIntoView(){setTimeout(()=>{const e=this.miniChartsContainers.find(e=>!e.getGui().classList.contains("ag-hidden")).getGui().querySelector(".ag-selected");if(e){const t=e.offsetParent;t&&this.eMiniChartsContainer.scrollTo(0,t.offsetTop)}},250)}resetPalettes(e){var t,i;const n=this.chartController.getPalettes(),s=this.chartController.getThemeTemplateParameters(),r=null==(i=null==(t=this.gos.get("chartToolPanelsDef"))?void 0:t.settingsPanel)?void 0:i.chartGroupsDef;if(ci._.shallowCompare(n,this.palettes)&&!e||this.isAnimating)return;this.palettes=n,this.themes=this.chartController.getThemeNames(),this.activePaletteIndex=this.themes.findIndex(e=>e===this.chartController.getChartThemeName()),this.cardItems=[],ci._.clearElement(this.eCardSelector),this.destroyMiniCharts();const{themes:o}=this;this.palettes.forEach((e,t)=>{const i=this.activePaletteIndex===t,{fills:n,strokes:a}=e,l=!jn(o[t]),c=this.createBean(new mo(this.chartController,n,a,s[t],l,r));this.miniChartsContainers.push(c),this.eMiniChartsContainer.appendChild(c.getGui()),this.addCardLink(t),i?c.updateSelectedMiniChart():c.setDisplayed(!1)}),ci._.setDisplayed(this.eNavBar,this.palettes.length>1),ci._.radioCssClass(this.cardItems[this.activePaletteIndex],"ag-selected","ag-not-selected")}addCardLink(e){const t=document.createElement("div");t.classList.add("ag-chart-settings-card-item"),this.addManagedListener(t,"click",()=>{this.setActivePalette(e,e<this.activePaletteIndex?"left":"right")}),this.eCardSelector.appendChild(t),this.cardItems.push(t)}getPrev(){let e=this.activePaletteIndex-1;return e<0&&(e=this.palettes.length-1),e}getNext(){let e=this.activePaletteIndex+1;return e>=this.palettes.length&&(e=0),e}setActivePalette(e,t){if(this.isAnimating||this.activePaletteIndex===e)return;ci._.radioCssClass(this.cardItems[e],"ag-selected","ag-not-selected");const i=this.miniChartsContainers[this.activePaletteIndex],n=i.getGui(),s=this.miniChartsContainers[e],r=s.getGui();i.updateSelectedMiniChart(),s.updateSelectedMiniChart();const o="left"===t?-1:1,a=r.style.left=ci._.getAbsoluteWidth(this.getGui())*o+"px";this.activePaletteIndex=e,this.isAnimating=!0;const l="ag-animating";s.setDisplayed(!0),i.addCssClass(l),s.addCssClass(l),this.chartController.setChartThemeName(this.themes[e]),window.setTimeout(()=>{n.style.left=-parseFloat(a)+"px",r.style.left="0px"},0),window.setTimeout(()=>{this.isAnimating=!1,i.removeCssClass(l),s.removeCssClass(l),i.setDisplayed(!1)},300)}destroyMiniCharts(){ci._.clearElement(this.eMiniChartsContainer),this.miniChartsContainers=this.destroyBeans(this.miniChartsContainers)}destroy(){this.destroyMiniCharts(),super.destroy()}};vo.TEMPLATE='<div class="ag-chart-settings-wrapper">\n            <div ref="eMiniChartsContainer" class="ag-chart-settings-mini-charts-container ag-scrollable-container"></div>\n            <div ref="eNavBar" class="ag-chart-settings-nav-bar">\n                <div ref="ePrevBtn" class="ag-chart-settings-prev">\n                    <button type="button" class="ag-button ag-chart-settings-prev-button"></button>\n                </div>\n                <div ref="eCardSelector" class="ag-chart-settings-card-selector"></div>\n                <div ref="eNextBtn" class="ag-chart-settings-next">\n                    <button type="button" class="ag-button ag-chart-settings-next-button"></button>\n                </div>\n            </div>\n        </div>',fn([(0,ci.RefSelector)("eMiniChartsContainer")],vo.prototype,"eMiniChartsContainer",2),fn([(0,ci.RefSelector)("eNavBar")],vo.prototype,"eNavBar",2),fn([(0,ci.RefSelector)("eCardSelector")],vo.prototype,"eCardSelector",2),fn([(0,ci.RefSelector)("ePrevBtn")],vo.prototype,"ePrevBtn",2),fn([(0,ci.RefSelector)("eNextBtn")],vo.prototype,"eNextBtn",2),fn([ci.PostConstruct],vo.prototype,"postConstruct",1);var yo=vo,Co=class e extends mt.Component{constructor(e,t){super(),this.panels=e,this.chartMenuContext=t,this.tabs=[]}init(){this.panels.forEach(e=>{const t=e.replace("chart","").toLowerCase(),i=this.createPanel(t),n=this.createTab(e,t,i);this.tabs.push(n),this.addDestroyFunc(()=>this.destroyBean(i))}),this.tabbedLayout=new mt.TabbedLayout({items:this.tabs,cssClass:"ag-chart-tabbed-menu",keepScrollPosition:!0,suppressFocusBodyOnOpen:!0,suppressTrapFocus:!0,enableCloseButton:!this.chartMenuService.isLegacyFormat(),closeButtonAriaLabel:this.chartTranslationService.translate("ariaChartMenuClose"),onCloseClicked:()=>{var t;null==(t=this.eventSource)||t.focus({preventScroll:!0}),this.dispatchEvent({type:e.EVENT_CLOSED})}}),this.getContext().createBean(this.tabbedLayout)}createTab(e,t,i){const n=document.createElement("div");n.classList.add("ag-chart-tab",`ag-chart-${t}`),this.getContext().createBean(i),n.appendChild(i.getGui());const s=document.createElement("div"),r=this.chartTranslationService.translate(t);return s.innerText=r,{title:s,titleLabel:r,bodyPromise:mt.AgPromise.resolve(n),getScrollableContainer:()=>n.querySelector(".ag-scrollable-container")||n,name:e}}showTab(e){const t=this.tabs[e];this.tabbedLayout.showItem(t)}getGui(){return this.tabbedLayout&&this.tabbedLayout.getGui()}showMenu(e,t){var i;this.eventSource=e,t||null==(i=this.tabbedLayout)||i.focusHeader(!0)}destroy(){this.parentComponent&&this.parentComponent.isAlive()&&this.destroyBean(this.parentComponent),super.destroy()}createPanel(t){const{chartController:i,chartOptionsService:n}=this.chartMenuContext;switch(t){case e.TAB_DATA:return new Ss(i,n);case e.TAB_FORMAT:return new vr(this.chartMenuContext);default:return new yo(i)}}};Co.EVENT_CLOSED="closed",Co.TAB_DATA="data",Co.TAB_FORMAT="format",fn([(0,mt.Autowired)("chartTranslationService")],Co.prototype,"chartTranslationService",2),fn([(0,mt.Autowired)("chartMenuService")],Co.prototype,"chartMenuService",2),fn([mt.PostConstruct],Co.prototype,"init",1);var bo=Co,So=class extends Gi.Component{constructor(){super('<div class="ag-chart-menu" ref="eMenu"></div>'),this.buttonListenersDestroyFuncs=[]}updateParams(e){const{buttons:t}=e;this.createButtons(t)}createButtons(e){this.buttonListenersDestroyFuncs.forEach(e=>null==e?void 0:e()),this.buttonListenersDestroyFuncs=[];const t=this.eMenu;Gi._.clearElement(t),e.forEach(e=>{const{buttonName:i,iconName:n,callback:s}=e,r=this.createButton(n),o=this.chartTranslationService.translate(i+"ToolbarTooltip");o&&r instanceof HTMLElement&&(r.title=o),this.buttonListenersDestroyFuncs.push(this.addManagedListener(r,"click",e=>s(e.target))),t.appendChild(r)})}createButton(e){let t=Gi._.createIconNoSpan(e,this.gos,void 0,!0);return t.classList.add("ag-chart-menu-icon"),this.chartMenuService.isLegacyFormat()||(t=this.wrapButton(t)),t}wrapButton(e){const t=this.gos.getDocument().createElement("button");return t.appendChild(e),t.classList.add("ag-chart-menu-toolbar-button"),t}destroy(){this.buttonListenersDestroyFuncs=[],super.destroy()}};fn([(0,Gi.Autowired)("chartTranslationService")],So.prototype,"chartTranslationService",2),fn([(0,Gi.Autowired)("chartMenuService")],So.prototype,"chartMenuService",2),fn([(0,Gi.RefSelector)("eMenu")],So.prototype,"eMenu",2);var wo=class e extends ft.Component{constructor(t,i,n){super(e.TEMPLATE),this.eChartContainer=t,this.eMenuPanelContainer=i,this.chartMenuContext=n,this.buttons={chartSettings:{iconName:"menu",callback:()=>this.showMenu({panel:this.defaultPanel})},chartData:{iconName:"menu",callback:()=>this.showMenu({panel:"chartData"})},chartFormat:{iconName:"menu",callback:()=>this.showMenu({panel:"chartFormat"})},chartLink:{iconName:"linked",callback:()=>this.chartMenuService.toggleLinked(this.chartMenuContext)},chartUnlink:{iconName:"unlinked",callback:()=>this.chartMenuService.toggleLinked(this.chartMenuContext)},chartDownload:{iconName:"save",callback:()=>this.chartMenuService.downloadChart(this.chartMenuContext)},chartMenu:{iconName:"menuAlt",callback:e=>this.showMenuList(e)}},this.panels=[],this.menuVisible=!1,this.chartController=n.chartController}postConstruct(){this.legacyFormat=this.chartMenuService.isLegacyFormat(),this.chartToolbar=this.createManagedBean(new So),this.getGui().appendChild(this.chartToolbar.getGui()),this.legacyFormat&&this.createLegacyToggleButton(),this.refreshToolbarAndPanels(),this.addManagedListener(this.eventService,ft.Events.EVENT_CHART_CREATED,e=>{var t;e.chartId===this.chartController.getChartId()&&Boolean(null==(t=this.gos.get("chartToolPanelsDef"))?void 0:t.defaultToolPanel)&&this.showMenu({panel:this.defaultPanel,animate:!1,suppressFocus:!0})}),this.addManagedListener(this.chartController,rs.EVENT_CHART_LINKED_CHANGED,this.refreshToolbarAndPanels.bind(this)),this.refreshMenuClasses(),this.legacyFormat&&!this.gos.get("suppressChartToolPanelsButton")&&this.panels.length>0&&(this.getGui().classList.add("ag-chart-tool-panel-button-enable"),this.eHideButton&&this.addManagedListener(this.eHideButton,"click",this.toggleMenu.bind(this))),this.legacyFormat||this.getGui().classList.add("ag-chart-menu-wrapper"),this.addManagedListener(this.chartController,rs.EVENT_CHART_API_UPDATE,this.refreshToolbarAndPanels.bind(this))}isVisible(){return this.menuVisible}getExtraPaddingDirections(){const e=[];return["chartMenu","chartLink","chartUnlink","chartDownload"].some(e=>this.chartToolbarOptions.includes(e))&&e.push("top"),["chartSettings","chartData","chartFormat"].some(e=>this.chartToolbarOptions.includes(e))&&e.push(this.gos.get("enableRtl")?"left":"right"),e}createLegacyToggleButton(){const e=this.gos.getDocument();this.eHideButton=e.createElement("button"),this.eHideButton.classList.add("ag-button","ag-chart-menu-close"),this.eHideButtonIcon=e.createElement("span"),this.eHideButtonIcon.classList.add("ag-icon","ag-icon-contracted"),this.eHideButton.appendChild(this.eHideButtonIcon),this.getGui().appendChild(this.eHideButton)}refreshToolbarAndPanels(){this.initToolbarOptionsAndPanels(),this.updateToolbar()}initToolbarOptionsAndPanels(){const{panels:e,defaultPanel:t,chartToolbarOptions:i}=this.chartMenuService.getToolbarOptionsAndPanels(this.chartController);this.panels=e,this.defaultPanel=t,this.chartToolbarOptions=i}updateToolbar(){const e=this.chartToolbarOptions.map(e=>{const{iconName:t,callback:i}=this.buttons[e];return{buttonName:e,iconName:t,callback:i}});this.chartToolbar.updateParams({buttons:e})}createMenuPanel(e){const t=this.environment.chartMenuPanelWidth(),i=this.menuPanel=this.createBean(new ft.AgPanel({minWidth:t,width:t,height:"100%",closable:!0,hideTitleBar:!0,cssIdentifier:"chart-menu"}));return i.setParentComponent(this),this.eMenuPanelContainer.appendChild(i.getGui()),this.tabbedMenu=this.createBean(new bo(this.panels,this.chartMenuContext)),this.addManagedListener(this.tabbedMenu,bo.EVENT_CLOSED,()=>{this.hideMenu(!1)}),this.addManagedListener(i,ft.Component.EVENT_DESTROYED,()=>this.destroyBean(this.tabbedMenu)),new ft.AgPromise(t=>{window.setTimeout(()=>{i.setBodyComponent(this.tabbedMenu),this.tabbedMenu.showTab(e),t(i),this.legacyFormat&&this.addManagedListener(this.eChartContainer,"click",e=>{this.getGui().contains(e.target)||this.menuVisible&&this.hideMenu()})},100)})}showContainer(e,t){this.menuPanel&&(this.menuVisible=!0,this.showParent(this.menuPanel.getWidth()),this.refreshMenuClasses(),this.tabbedMenu.showMenu(e,t))}toggleMenu(){this.menuVisible?this.hideMenu(this.legacyFormat):this.showMenu({animate:this.legacyFormat})}showMenu(e){const{panel:t,animate:i=!0,eventSource:n,suppressFocus:s}=e;if(i||this.eMenuPanelContainer.classList.add("ag-no-transition"),this.menuPanel&&!t)this.showContainer(n,s);else{const e=t||this.defaultPanel;let i=this.panels.indexOf(e);i<0&&(console.warn(`AG Grid: '${t}' is not a valid Chart Tool Panel name`),i=this.panels.indexOf(this.defaultPanel)),this.menuPanel?(this.tabbedMenu.showTab(i),this.showContainer(n,s)):this.createMenuPanel(i).then(()=>this.showContainer(n,s))}i||setTimeout(()=>{this.isAlive()&&this.eMenuPanelContainer.classList.remove("ag-no-transition")},500)}hideMenu(e=!0){e||this.eMenuPanelContainer.classList.add("ag-no-transition"),this.hideParent(),window.setTimeout(()=>{this.menuVisible=!1,this.refreshMenuClasses(),e||this.eMenuPanelContainer.classList.remove("ag-no-transition")},500)}refreshMenuClasses(){this.eChartContainer.classList.toggle("ag-chart-menu-visible",this.menuVisible),this.eChartContainer.classList.toggle("ag-chart-menu-hidden",!this.menuVisible),this.legacyFormat&&!this.gos.get("suppressChartToolPanelsButton")&&(this.eHideButtonIcon.classList.toggle("ag-icon-contracted",this.menuVisible),this.eHideButtonIcon.classList.toggle("ag-icon-expanded",!this.menuVisible))}showParent(e){this.eMenuPanelContainer.style.minWidth=`${e}px`}hideParent(){this.eMenuPanelContainer.style.minWidth="0"}showMenuList(e){this.chartMenuListFactory.showMenuList({eventSource:e,showMenu:()=>this.showMenu({animate:!1,eventSource:e}),chartMenuContext:this.chartMenuContext})}destroy(){super.destroy(),this.menuPanel&&this.menuPanel.isAlive()&&this.destroyBean(this.menuPanel),this.tabbedMenu&&this.tabbedMenu.isAlive()&&this.destroyBean(this.tabbedMenu)}};wo.TEMPLATE="<div></div>",fn([(0,ft.Autowired)("chartMenuService")],wo.prototype,"chartMenuService",2),fn([(0,ft.Autowired)("chartMenuListFactory")],wo.prototype,"chartMenuListFactory",2),fn([ft.PostConstruct],wo.prototype,"postConstruct",1);var xo=wo,Eo=class e extends Vi.Component{constructor(t){super(e.TEMPLATE),this.chartMenu=t,this.destroyableChartListeners=[],this.editing=!1}init(){this.addManagedListener(this.getGui(),"keydown",e=>{this.editing&&"Enter"===e.key&&!e.shiftKey&&(this.handleEndEditing(),e.preventDefault())}),this.addManagedListener(this.getGui(),"input",()=>{this.editing&&this.updateHeight()}),this.addManagedListener(this.getGui(),"blur",()=>this.endEditing())}refreshTitle(e){this.chartController=e.chartController,this.chartOptionsService=e.chartOptionsService,this.chartMenuUtils=e.chartMenuParamsFactory.getChartOptions();for(const e of this.destroyableChartListeners)e();this.destroyableChartListeners=[];const t=this.chartController.getChartProxy().getChart(),i=t.canvasElement,n=this.addManagedListener(i,"dblclick",e=>{const{title:n}=t;if(n&&n.node.containsPoint(e.offsetX,e.offsetY)){const e=n.node.computeBBox(),t=n.node.inverseTransformPoint(e.x,e.y);this.startEditing(un(un({},e),t),i.width)}});let s=!1;const r=this.addManagedListener(i,"mousemove",e=>{const{title:n}=t,r=!!(n&&n.enabled&&n.node.containsPoint(e.offsetX,e.offsetY));s!==r&&(i.style.cursor=r?"pointer":""),s=r});this.destroyableChartListeners=[n,r]}startEditing(e,t){if(this.chartMenuService.isLegacyFormat()&&this.chartMenu&&this.chartMenu.isVisible())return;if(this.editing)return;this.editing=!0;const i=Math.max(Math.min(e.width+20,t),300),n=this.getGui();n.classList.add("currently-editing");const s=n.style;s.fontFamily=this.chartMenuUtils.getValue("title.fontFamily"),s.fontWeight=this.chartMenuUtils.getValue("title.fontWeight"),s.fontStyle=this.chartMenuUtils.getValue("title.fontStyle"),s.fontSize=this.chartMenuUtils.getValue("title.fontSize")+"px",s.color=this.chartMenuUtils.getValue("title.color");const r=this.chartMenuUtils.getValue("title.text"),o=r===this.chartTranslationService.translate("titlePlaceholder");n.value=o?"":r;const a=r.split(/\r?\n/g).length;s.left=Math.round(e.x+e.width/2-i/2-1)+"px",s.top=Math.round(e.y+e.height/2-a*this.getLineHeight()/2-2)+"px",s.width=Math.round(i)+"px",s.lineHeight=this.getLineHeight()+"px",this.updateHeight(),n.focus()}updateHeight(){const e=this.getGui(),t=this.chartMenuUtils.getValue("title.text").split(/\r?\n/g).length,i=e.value.split(/\r?\n/g).length;e.style.height=Math.round(Math.max(t,i)*this.getLineHeight())+4+"px"}getLineHeight(){const e=this.chartMenuUtils.getValue("title.lineHeight");return e?parseInt(e):Math.round(1.2*parseInt(this.chartMenuUtils.getValue("title.fontSize")))}handleEndEditing(){const e=this.chartMenuUtils.getValue("title.color");this.chartMenuUtils.setValue("title.color","rgba(0, 0, 0, 0)"),this.chartOptionsService.awaitChartOptionUpdate(()=>this.endEditing()),this.chartOptionsService.awaitChartOptionUpdate(()=>{this.chartMenuUtils.setValue("title.color",e)})}endEditing(){if(!this.editing)return;this.editing=!1;const e=this.getGui().value;e&&""!==e.trim()?(this.chartMenuUtils.setValue("title.text",e),this.chartMenuUtils.setValue("title.enabled",!0)):(this.chartMenuUtils.setValue("title.text",""),this.chartMenuUtils.setValue("title.enabled",!1)),this.getGui().classList.remove("currently-editing"),this.chartOptionsService.awaitChartOptionUpdate(()=>{this.eventService.dispatchEvent({type:"chartTitleEdit"})})}};Eo.TEMPLATE='<textarea\n             class="ag-chart-title-edit"\n             style="padding:0; border:none; border-radius: 0; min-height: 0; text-align: center; resize: none;" />\n        ',fn([(0,Vi.Autowired)("chartTranslationService")],Eo.prototype,"chartTranslationService",2),fn([(0,Vi.Autowired)("chartMenuService")],Eo.prototype,"chartMenuService",2),fn([Vi.PostConstruct],Eo.prototype,"init",1);var Mo=Eo;function Ao(e){return null!=e.chart?e.chart:e}var To=class{constructor(e){this.chartProxyParams=e,this.clearThemeOverrides=!1,this.isEnterpriseCharts=Hi._ModuleSupport.enterpriseModule.isEnterprise,this.chart=e.chartInstance,this.chartType=e.chartType,this.crossFiltering=e.crossFiltering,this.crossFilterCallback=e.crossFilterCallback,this.standaloneChartType=Rn(this.chartType),null==this.chart?this.chart=Hi.AgCharts.create(this.getCommonChartOptions()):this.clearThemeOverrides=!0}crossFilteringReset(){}update(e){Hi.AgCharts.update(this.getChartRef(),this.getUpdateOptions(e,this.getCommonChartOptions(e.updatedOverrides)))}updateThemeOverrides(e){Hi.AgCharts.updateDelta(this.getChartRef(),{theme:{overrides:e}})}getChart(){return Ao(this.chart)}getChartRef(){return this.chart}downloadChart(e,t,i){const{chart:n}=this,s=Ao(n),r=t||(s.title?s.title.text:"chart"),{width:o,height:a}=e||{};Hi.AgCharts.download(n,{width:o,height:a,fileName:r,fileFormat:i})}getChartImageDataURL(e){return this.getChart().getCanvasDataURL(e)}getChartOptions(){return this.chart.getOptions()}getChartThemeOverrides(){var e;return null!=(e=this.getChartOptions().theme.overrides)?e:{}}getChartPalette(){return Hi._Theme.getChartTheme(this.getChartOptions().theme).palette}setPaired(e){const t=Rn(this.chartProxyParams.chartType);Hi.AgCharts.updateDelta(this.chart,{theme:{overrides:{[t]:{paired:e}}}})}isPaired(){const e=Rn(this.chartProxyParams.chartType);return Wn(this.getChartThemeOverrides(),`${e}.paired`,!0)}lookupCustomChartTheme(e){return Yn(this.chartProxyParams,e)}getSeriesGroupType(){}transformCategoryData(e,t){return e.map((e,i)=>{const n=e[t],s=n&&n.toString?n.toString():"",r=un({},e);return r[t]={id:i,value:n,toString:()=>s},r})}getCommonChartOptions(e){var t,i;const n=this.clearThemeOverrides?{}:null!=(i=null==(t=this.chart)?void 0:t.getOptions())?i:{},s=null!=this.chart?this.getActiveFormattingPanelOverrides():void 0;this.clearThemeOverrides=!1;const r=function(e,t,i,n,s){var r;const{chartOptionsToRestore:o,chartPaletteToRestore:a,chartThemeToRestore:l}=e,c=function(e){let t=e.getChartThemeName();const i=e.getChartThemes();return Mt._.includes(i,t)||(t=i[0]),t}(e),h=jn(c),d=h?{baseTheme:c}:null!=(r=Yn(e,c))?r:{},u=e.getGridOptionsChartThemeOverrides(),p=e.apiChartThemeOverrides,g=Rn(e.chartType),f=e.crossFiltering?function(e,t,i){const n={listeners:{legendItemClick:t=>{e.getChart().series.forEach(e=>{e.toggleSeriesItem(t.itemId,t.enabled),e.toggleSeriesItem(`${t.itemId}-filtered-out`,t.enabled)})}}};return{[i]:{tooltip:{delay:500},legend:n,listeners:{click:e=>t.crossFilterCallback(e,!0)}}}}(t,e,g):void 0,m=[h?$n(e,i,(()=>{const e=e=>!!e&&Object.keys(e).some(t=>Wn(e[t],"title.enabled",!1));return e(u)||e(p)})()):void 0,n,f,u,p,un({},null!=o?o:{}),s].filter(e=>!!e).reduce((e,t)=>({baseTheme:e,overrides:t}),d);return a&&c===l&&(function(e,t){const i=(e,t)=>e.length===t.length&&e.every((e,i)=>e===t[i]);return i(e.fills,t.fills)&&i(e.strokes,t.strokes)}(a,At._Theme.getChartTheme(d).palette)||(m.palette=a)),m}(this.chartProxyParams,this,this.isEnterpriseCharts,this.getChartThemeDefaults(),null!=e?e:s),o=pn(un({},n),{mode:"integrated"});return o.theme=r,o.container=this.chartProxyParams.parentElement,o}getChartThemeDefaults(){const e=this.getSeriesChartThemeDefaults(),t=e?{[this.standaloneChartType]:e}:{},i={enabled:!0,snap:!0,label:{enabled:!1}};return un({common:{navigator:{enabled:!1},zoom:{enabled:!0},animation:{enabled:!0,duration:500},axes:{number:{crosshair:i},category:{crosshair:i},log:{crosshair:i},time:{crosshair:i}}}},t)}getSeriesChartThemeDefaults(){}getActiveFormattingPanelOverrides(){var e,t;if(this.clearThemeOverrides)return{};const i=null==(e=this.chart)?void 0:e.getOptions().theme;return null!=(t=null==i?void 0:i.overrides)?t:{}}destroy({keepChartInstance:e=!1}={}){if(e)return this.chart.resetAnimations(),this.chart;this.destroyChart()}destroyChart(){this.chart&&(this.chart.destroy(),this.chart=void 0)}},Do=class extends To{constructor(e){super(e),this.crossFilteringAllPoints=new Set,this.crossFilteringSelectedPoints=[]}getUpdateOptions(e,t){const i=this.getAxes(e,t);return pn(un({},t),{data:this.getData(e,i),axes:i,series:this.getSeries(e)})}getData(e,t){const i=["area","line"].includes(this.standaloneChartType);return this.crossFiltering&&i?this.getCrossFilterData(e):this.getDataTransformedData(e,t)}getDataTransformedData(e,t){const i=t[0].type,{categories:n,data:s}=e,[r]=n;switch(i){case"category":return this.transformCategoryData(s,r.id);case"time":return this.transformTimeData(s,r.id);default:return s}}getXAxisType(e){return e.grouping?"grouped-category":this.isXAxisOfType(e,"time",e=>e instanceof Date)?"time":this.isXAxisOfType(e,"number")?"number":"category"}isXAxisOfType(e,t,i){const[n]=e.categories;if(null==n?void 0:n.chartDataType)return n.chartDataType===t;if(!i)return!1;const s=e.data[0];return!!s&&i(s[n.id])}transformTimeData(e,t){var i;return(null==(i=e[0])?void 0:i[t])instanceof Date?e:e.map(e=>{const i=e[t];return"string"==typeof i?pn(un({},e),{[t]:new Date(i)}):e})}crossFilteringReset(){this.crossFilteringSelectedPoints=[],this.crossFilteringAllPoints.clear()}crossFilteringPointSelected(e){return 0==this.crossFilteringSelectedPoints.length||this.crossFilteringSelectedPoints.includes(e)}crossFilteringDeselectedPoints(){return this.crossFilteringSelectedPoints.length>0&&this.crossFilteringAllPoints.size!==this.crossFilteringSelectedPoints.length}extractLineAreaCrossFilterSeries(e,t){const[i]=t.categories,n=e=>"area"===this.standaloneChartType?t.getCrossFilteringContext().lastSelectedChartId===t.chartId?e+"-total":e:e+"-total";return e.map(e=>(e.yKey=n(e.yKey),e.listeners={nodeClick:t=>{const i=t.datum[e.xKey],n=t.event.metaKey||t.event.ctrlKey;this.crossFilteringAddSelectedPoint(n,i),this.crossFilterCallback(t)}},e.marker={formatter:e=>{const t=e.datum[i.id];return{fill:e.highlighted?"yellow":e.fill,size:e.highlighted?14:this.crossFilteringPointSelected(t)?8:0}}},"area"===this.standaloneChartType&&(e.fillOpacity=this.crossFilteringDeselectedPoints()?.3:1),"line"===this.standaloneChartType&&(e.strokeOpacity=this.crossFilteringDeselectedPoints()?.3:1),e))}getCrossFilterData(e){this.crossFilteringAllPoints.clear();const[t]=e.categories,i=e.fields[0].colId,n=`${i}-filtered-out`,s=e.getCrossFilteringContext().lastSelectedChartId;return e.data.map(r=>{const o=r[t.id];this.crossFilteringAllPoints.add(o);const a=this.crossFilteringPointSelected(o);return"area"===this.standaloneChartType&&s===e.chartId&&(r[`${i}-total`]=a?r[i]:r[i]+r[n]),"line"===this.standaloneChartType&&(r[`${i}-total`]=a?r[i]:r[i]+r[n]),r})}crossFilteringAddSelectedPoint(e,t){e?this.crossFilteringSelectedPoints.push(t):this.crossFilteringSelectedPoints=[t]}isHorizontal(e){const t=this.standaloneChartType;if("waterfall"!==t&&"box-plot"!==t&&"range-bar"!==t)return!1;const i=e.theme,n=e=>{var i,s,r;const o=null==(r=null==(s=null==(i=null==e?void 0:e.overrides)?void 0:i[t])?void 0:s.series)?void 0:r.direction;return null!=o?"horizontal"===o:"object"==typeof(null==e?void 0:e.baseTheme)&&n(e.baseTheme)};return n(i)}};function Io(e,t){const i=parseInt(e.slice(1,3),16),n=parseInt(e.slice(3,5),16),s=parseInt(e.slice(5,7),16);return t?`rgba(${i}, ${n}, ${s}, ${t})`:`rgba(${i}, ${n}, ${s})`}function Ro(e,t){return e.map(e=>{const i=zi._Util.Color.fromString(e);return new zi._Util.Color(i.r,i.g,i.b,t).toHexString()})}var Lo=new Set(["bar","groupedBar","stackedBar","normalizedBar"]),ko=class extends Do{constructor(e){super(e)}getAxes(e){const t=[{type:this.getXAxisType(e),position:this.isHorizontal()?"left":"bottom"},{type:"number",position:this.isHorizontal()?"bottom":"left"}];if(this.isNormalised()){const e=t[1];e.label=pn(un({},e.label),{formatter:e=>Math.round(e.value)+"%"})}return t}getSeries(e){const[t]=e.categories,i=e.fields.map(e=>{return{type:this.standaloneChartType,direction:this.isHorizontal()?"horizontal":"vertical",stacked:this.crossFiltering||(i=this.chartType,En.has(i)),normalizedTo:this.isNormalised()?100:void 0,xKey:t.id,xName:t.name,yKey:e.colId,yName:e.displayName};var i});return this.crossFiltering?this.extractCrossFilterSeries(i):i}extractCrossFilterSeries(e){const t=this.getChartPalette(),i=(e,i)=>pn(un({},e),{highlightStyle:{item:{fill:void 0}},fill:null==t?void 0:t.fills[i],stroke:null==t?void 0:t.strokes[i],listeners:{nodeClick:this.crossFilterCallback}}),n=e=>{const t=e.yKey+"-filtered-out";return pn(un({},Un({},e)),{yKey:t,fill:Io(e.fill,"0.3"),stroke:Io(e.stroke,"0.3"),showInLegend:!1})},s=[];for(let t=0;t<e.length;t++){const r=i(e[t],t);s.push(r),s.push(n(r))}return s}isNormalised(){return!this.crossFiltering&&Bi._.includes(["normalizedColumn","normalizedBar"],this.chartType)}isHorizontal(){return Lo.has(this.chartType)}},Po=class extends Do{constructor(e){super(e)}getAxes(e){const t=[{type:this.getXAxisType(e),position:"bottom"},{type:"number",position:"left"}];if(this.isNormalised()){const e=t[1];e.label=pn(un({},e.label),{formatter:e=>Math.round(e.value)+"%"})}return t}getSeries(e){const[t]=e.categories,i=e.fields.map(e=>({type:this.standaloneChartType,xKey:t.id,xName:t.name,yKey:e.colId,yName:e.displayName,normalizedTo:"normalizedArea"===this.chartType?100:void 0,stacked:["normalizedArea","stackedArea"].includes(this.chartType)}));return this.crossFiltering?this.extractLineAreaCrossFilterSeries(i,e):i}isNormalised(){return!this.crossFiltering&&"normalizedArea"===this.chartType}},No=class extends Do{constructor(e){super(e)}getAxes(e){return[{type:this.getXAxisType(e),position:"bottom"},{type:"number",position:"left"}]}getSeries(e){const[t]=e.categories,i=e.fields.map(e=>({type:this.standaloneChartType,xKey:t.id,xName:t.name,yKey:e.colId,yName:e.displayName}));return this.crossFiltering?this.extractLineAreaCrossFilterSeries(i,e):i}},Oo=class extends To{constructor(e){super(e)}getAxes(e){const t="radial-bar"===this.standaloneChartType;return[{type:t?"angle-number":"angle-category"},{type:t?"radius-category":"radius-number"}]}getSeries(e){const{fields:t,categories:i,seriesGroupType:n}=e,[s]=i,r="radial-bar"===this.standaloneChartType,o=this.getSeriesGroupTypeOptions(n);return t.map(e=>{var t,i;return un({type:this.standaloneChartType,angleKey:r?e.colId:s.id,angleName:r?null!=(t=e.displayName)?t:void 0:s.name,radiusKey:r?s.id:e.colId,radiusName:r?s.name:null!=(i=e.displayName)?i:void 0},o)})}getSeriesGroupType(){var e,t;const i=this.standaloneChartType;if(!["nightingale","radial-bar","radial-column"].includes(i))return;const n=null==(t=null==(e=this.getChart().series)?void 0:e[0])?void 0:t.properties.toJson(),s=()=>n.normalizedTo?"normalized":"stacked";return"nightingale"===i?n.grouped?"grouped":s():n.stacked?s():"grouped"}getUpdateOptions(e,t){const i=this.getAxes(e);return pn(un({},t),{data:this.getData(e,i),axes:i,series:this.getSeries(e)})}getData(e,t){if(t.some(e=>"angle-category"===e.type||"radius-category"===e.type)){const[t]=e.categories;return this.transformCategoryData(e.data,t.id)}return e.data}getSeriesGroupTypeOptions(e){return e?{grouped:"grouped"===e||void 0,stacked:"grouped"!==e||void 0,normalizedTo:"normalized"===e?100:void 0}:{}}},_o=class e extends To{constructor(e){super(e)}getUpdateOptions(e,t){return pn(un({},t),{data:this.crossFiltering?this.getCrossFilterData(e):e.data,series:this.getSeries(e)})}getSeries(t){const[i]=t.categories,n=t.fields.length,s={currentOffset:0,offsetAmount:n>1?20:40},r=this.getFields(t).map(t=>{var r;const o={type:this.standaloneChartType,angleKey:t.colId,angleName:t.displayName,sectorLabelKey:t.colId,calloutLabelName:i.name,calloutLabelKey:i.id};if("donut"===this.chartType||"doughnut"===this.chartType){const{outerRadiusOffset:i,innerRadiusOffset:a}=e.calculateOffsets(s),l=t.displayName?{title:{text:t.displayName,showInLegend:n>1}}:void 0;return pn(un(pn(un({},o),{type:"donut",outerRadiusOffset:i,innerRadiusOffset:a}),l),{calloutLine:{colors:null==(r=this.getChartPalette())?void 0:r.strokes}})}return o});return this.crossFiltering?this.extractCrossFilterSeries(r):r}getCrossFilterData(e){const t=e.fields[0].colId,i=`${t}-filtered-out`;return e.data.map(e=>{const n=e[t]+e[i];return e[`${t}-total`]=n,e[i]=1,e[t]=e[t]/n,e})}extractCrossFilterSeries(e){const t=this.getChartPalette(),i=e[0],n=i.angleKey,s=(e=>pn(un({},e),{legendItemKey:e.calloutLabelKey,calloutLabel:{enabled:!1},highlightStyle:{item:{fill:void 0}},radiusKey:e.angleKey,angleKey:e.angleKey+"-total",radiusMin:0,radiusMax:1,listeners:{nodeClick:this.crossFilterCallback}}))(i);return[(r=i,o=n,pn(un({},Un({},s)),{radiusKey:o+"-filtered-out",fills:Ro(null!=(a=r.fills)?a:t.fills,.3),strokes:Ro(null!=(l=r.strokes)?l:t.strokes,.3),showInLegend:!1})),s];var r,o,a,l}static calculateOffsets(e){const t=e.currentOffset;e.currentOffset-=e.offsetAmount;const i=e.currentOffset;return e.currentOffset-=e.offsetAmount,{outerRadiusOffset:t,innerRadiusOffset:i}}getFields(e){return"pie"===this.chartType?e.fields.slice(0,1):e.fields}},Fo=class extends Do{constructor(e){super(e)}getAxes(e){return[{type:"number",position:"bottom"},{type:"number",position:"left"}]}getSeries(e){const[t]=e.categories,i=this.isPaired(),n=this.getSeriesDefinitions(e.fields,i),s=t.id===_n.DEFAULT_CATEGORY?void 0:t,r=n.map(e=>{var t,i,n,r,o;return(null==e?void 0:e.sizeField)?{type:"bubble",xKey:e.xField.colId,xName:null!=(t=e.xField.displayName)?t:void 0,yKey:e.yField.colId,yName:null!=(i=e.yField.displayName)?i:void 0,title:`${e.yField.displayName} vs ${e.xField.displayName}`,sizeKey:e.sizeField.colId,sizeName:null!=(n=e.sizeField.displayName)?n:"",labelKey:s?s.id:e.yField.colId,labelName:s?s.name:void 0}:{type:"scatter",xKey:e.xField.colId,xName:null!=(r=e.xField.displayName)?r:void 0,yKey:e.yField.colId,yName:null!=(o=e.yField.displayName)?o:void 0,title:`${e.yField.displayName} vs ${e.xField.displayName}`,labelKey:s?s.id:e.yField.colId,labelName:s?s.name:void 0}});return this.crossFiltering?this.extractCrossFilterSeries(r,e):r}extractCrossFilterSeries(e,t){const{data:i}=t,n=this.getChartPalette(),s=e=>`${e}-filtered-out`,r=e.map((e,t)=>{const r=null==n?void 0:n.fills[t],o=null==n?void 0:n.strokes[t];let a;if("bubble"===e.type){const{sizeKey:t}=e;a=((e,t)=>{var i;const n=[1/0,-1/0];if(null!=t)for(const r of e){const e=null!=(i=r[t])?i:r[s(t)];e<n[0]&&(n[0]=e),e>n[1]&&(n[1]=e)}if(n[0]<=n[1])return n})(i,t)}const l=pn(un({},e.marker),{fill:r,stroke:o,domain:a});return pn(un({},e),{marker:l,highlightStyle:{item:{fill:"yellow"}},listeners:pn(un({},e.listeners),{nodeClick:this.crossFilterCallback})})});return[...r,...r.map(e=>{let{yKey:t,xKey:i}=e,n={};return"bubble"===e.type&&(n={sizeKey:s(e.sizeKey)}),pn(un(un({},e),n),{yKey:s(t),xKey:s(i),marker:pn(un({},e.marker),{fillOpacity:.3,strokeOpacity:.3}),showInLegend:!1,listeners:pn(un({},e.listeners),{nodeClick:e=>{const t=e.datum[s(i)],n=pn(un({},e),{xKey:i,datum:pn(un({},e.datum),{[i]:t})});this.crossFilterCallback(n)}})})})]}getSeriesDefinitions(e,t){if(e.length<2)return[];const i="bubble"===this.chartType;if(t)return i?e.map((t,i)=>i%3==0?{xField:t,yField:e[i+1],sizeField:e[i+2]}:null).filter(e=>e&&e.yField&&e.sizeField):e.map((t,i)=>i%2==0?{xField:t,yField:e[i+1]}:null).filter(e=>e&&e.yField);const n=e[0];return i?e.map((t,i)=>i%2==1?{xField:n,yField:t,sizeField:e[i+1]}:null).filter(e=>e&&e.sizeField):e.filter((e,t)=>t>0).map(e=>({xField:n,yField:e}))}},Go=class extends Do{constructor(e){super(e)}getAxes(e,t){return[{type:this.getXAxisType(e),position:this.isHorizontal(t)?"left":"bottom"},{type:"number",position:this.isHorizontal(t)?"bottom":"left"}]}computeSeriesStatistics(e,t){const{data:i,fields:n}=e,[s]=e.categories,r=s.id||_n.DEFAULT_CATEGORY,o=this.groupDataByCategory(r,i);return Array.from(o).map(([e,i])=>{const r={[s.id]:e};return n.forEach((e,n)=>{const s=i.map(t=>t[e.colId]).filter(e=>"number"==typeof e&&!isNaN(e));Object.entries(t(s)).forEach(([e,t])=>{r[`${e}:${n}`]=s.length>0?t:null})}),r})}groupDataByCategory(e,t){return t.reduce((t,i)=>{let n=(t=>{if(e===_n.DEFAULT_CATEGORY)return 1;const i=t[e];return null==i?"":i instanceof Date?i.getTime():i})(i);const s=t.get(n);return s?s.push(i):t.set(n,[i]),t},new Map)}},Vo=class extends Go{constructor(e){super(e)}getSeries(e){const[t]=e.categories;return e.fields.map((e,i)=>{var n;return{type:this.standaloneChartType,xKey:t.id,xName:t.name,yName:null!=(n=e.displayName)?n:void 0,yLowName:"Min",yHighName:"Max",yLowKey:`min:${i}`,yHighKey:`max:${i}`}})}getData(e){return this.computeSeriesStatistics(e,e=>({min:Math.min(...e),max:Math.max(...e)}))}},Bo=class extends Do{constructor(e){super(e)}getSeries(e){const t=e.fields[0];return[{type:this.standaloneChartType,xKey:t.colId,xName:t.displayName,yName:this.chartProxyParams.translate("histogramFrequency"),areaPlot:!1}]}getAxes(e){return[{type:"number",position:"bottom"},{type:"number",position:"left"}]}},Ho=class extends Go{constructor(e){super(e)}getSeries(e){const[t]=e.categories;return e.fields.map((e,i)=>{var n;return{type:this.standaloneChartType,xKey:t.id,xName:t.name,yName:null!=(n=e.displayName)?n:void 0,minName:"Min",q1Name:"Q1",medianName:"Median",q3Name:"Q3",maxName:"Max",minKey:`min:${i}`,q1Key:`q1:${i}`,medianKey:`median:${i}`,q3Key:`q3:${i}`,maxKey:`max:${i}`}})}getData(e){return this.computeSeriesStatistics(e,e=>{const t=e.sort((e,t)=>e-t);return{min:t[0],q1:this.quantile(t,.25),median:this.quantile(t,.5),q3:this.quantile(t,.75),max:t[t.length-1]}})}quantile(e,t){const i=(e.length-1)*t,n=Math.floor(i),s=i-n;return void 0!==e[n+1]?e[n]+s*(e[n+1]-e[n]):e[n]}},zo=class extends To{constructor(e){super(e)}getUpdateOptions(e,t){const i="AG-GRID-DEFAULT-HEATMAP-SERIES-KEY",n="AG-GRID-DEFAULT-HEATMAP-VALUE-KEY",s="AG-GRID-DEFAULT-HEATMAP-CATEGORY-KEY";return pn(un({},t),{series:this.getSeries(e,i,n,s),data:this.getData(e,i,n,s)})}getSeries(e,t,i,n){const[s]=e.categories;return[{type:this.standaloneChartType,yKey:n,xKey:t,colorKey:i,yName:s.name,xName:void 0,colorName:void 0}]}getData(e,t,i,n){const[s]=e.categories;return r=e.data,o=(r,o)=>{const a=r[s.id],l=null==a?"":String(a),c={id:o,value:a,toString:()=>l};return e.fields.map(({colId:e,displayName:s})=>pn(un({},r),{[t]:s,[i]:r[e],[n]:c}))},r.reduce((e,t,i,n)=>e.concat(o(t,i)),new Array);var r,o}getSeriesChartThemeDefaults(){return{gradientLegend:{gradient:{preferredLength:200}},series:{tooltip:{renderer:Uo}}}}};function Uo(e){const{xKey:t,yKey:i,colorKey:n,yName:s,datum:r}=e;return{title:"",content:[{label:s,value:r[i]},{label:r[t],value:n&&r[n]}].map(({label:e,value:t})=>`<b>${Wo(String(e))}:</b> ${Wo(String(t))}`).join("<br>")}}function Wo(e){const t={"&":"&amp;","<":"&lt;",">":"&gt;"},i=`[${Object.keys(t).join("")}]`,n=new RegExp(i,"g");return e.replace(n,e=>t[e])}var jo=class extends Do{constructor(e){super(e)}getAxes(e,t){return[{type:this.getXAxisType(e),position:this.isHorizontal(t)?"left":"bottom"},{type:"number",position:this.isHorizontal(t)?"bottom":"left"}]}getSeries(e){var t;const[i]=e.categories,[n]=e.fields;return[{type:this.standaloneChartType,xKey:i.id,xName:i.name,yKey:n.colId,yName:null!=(t=n.displayName)?t:void 0}]}},Ko=["number","category","time","grouped-category"],$o=[...Ko,"angle-category","angle-number","radius-category","radius-number"],Yo=class e extends Ui.BeanStub{constructor(e){super(),this.chartController=e}getChartThemeOverridesProxy(){return{getValue:e=>this.getChartOption(e),setValue:(e,t)=>this.setChartThemeOverrides([{expression:e,value:t}]),setValues:e=>this.setChartThemeOverrides(e)}}getAxisThemeOverridesProxy(){return{getValue:e=>this.getAxisProperty(e),setValue:(e,t)=>this.setAxisThemeOverrides([{expression:e,value:t}]),setValues:e=>this.setAxisThemeOverrides(e)}}getCartesianAxisOptionsProxy(e){return{getValue:t=>this.getCartesianAxisProperty(e,t),setValue:(t,i)=>this.setCartesianAxisOptions(e,[{expression:t,value:i}]),setValues:t=>this.setCartesianAxisOptions(e,t)}}getCartesianAxisThemeOverridesProxy(e){return{getValue:t=>this.getCartesianAxisProperty(e,t),setValue:(t,i)=>this.setCartesianAxisThemeOverrides(e,[{expression:t,value:i}]),setValues:t=>this.setCartesianAxisThemeOverrides(e,t)}}getCartesianAxisAppliedThemeOverridesProxy(e){return{getValue:t=>this.getCartesianAxisThemeOverride(e,"*"===t?null:t),setValue:(t,i)=>this.setCartesianAxisThemeOverrides(e,[{expression:"*"===t?null:t,value:i}]),setValues:t=>this.setCartesianAxisThemeOverrides(e,t)}}getSeriesOptionsProxy(e){return{getValue:(t,i)=>this.getSeriesOption(e(),t,i),setValue:(t,i)=>this.setSeriesOptions(e(),[{expression:t,value:i}]),setValues:t=>this.setSeriesOptions(e(),t)}}getPersistedChartThemeOverrides(e,t,i,n){const s=this.getRetainedChartThemeOverrideKeys(i,n),r=this.getRetainedChartAxisThemeOverrideKeys(null,i,n),o=this.createChartOptions();for(const t of s){const s=this.retrieveChartOptionsThemeOverride(e,i,t);void 0!==s&&this.assignChartOptionsThemeOverride(o,n,t,s)}return t&&this.assignPersistedAxisOverrides({existingAxes:t,retainedChartAxisThemeOverrideKeys:r,existingChartOptions:e,targetChartOptions:o,existingChartType:i,targetChartType:n}),o.theme.overrides}assignPersistedAxisOverrides(e){const{existingAxes:t,retainedChartAxisThemeOverrideKeys:i,existingChartOptions:n,targetChartOptions:s,existingChartType:r,targetChartType:o}=e;for(const{expression:e,targetAxisTypes:a}of i)for(const i of t.map(e=>e.type)){const t=this.retrieveChartOptionsThemeOverride(n,r,["axes",i,e].join("."));if(void 0!==t)for(const i of a)this.assignChartOptionsThemeOverride(s,o,["axes",i,e].join("."),t)}}getRetainedChartThemeOverrideKeys(e,t){const i=["zoom","navigator"];return["animation",...((e,t)=>{const n=new Array;return Mn(Rn(e))&&Mn(Rn(t))&&n.push(...i),n})(e,t)]}getRetainedChartAxisThemeOverrideKeys(e,t,i){return Mn(Rn(t))&&Mn(Rn(i))?this.getRetainedCartesianAxisThemeOverrideKeys(e).map(e=>({expression:e,targetAxisTypes:Ko})):[]}getRetainedCartesianAxisThemeOverrideKeys(e){const t="xAxis"===e?["",".top",".bottom"]:"yAxis"===e?["",".left",".right"]:["",".left",".right",".top",".bottom"],i=["crosshair"],n=new Array;for(const e of i)for(const i of t)n.push(`${e}${i}`);return n}getChartOption(e){return Wn(this.getChart(),e,void 0)}setChartThemeOverrides(e){const t=this.getChartType(),i=this.createChartOptions();for(const{expression:n,value:s}of e)this.assignChartOptionsThemeOverride(i,t,n,s);this.applyChartOptions(i)}applyChartOptions(e,t){0!==Object.keys(e).length&&(this.updateChart(e),!(null==t?void 0:t.silent)&&this.raiseChartOptionsChangedEvent())}awaitChartOptionUpdate(e){this.chartController.getChartProxy().getChart().waitForUpdate().then(()=>e()).catch(e=>console.error("AG Grid - chart update failed",e))}getAxisProperty(e){var t;return Wn(null==(t=this.getChart().axes)?void 0:t[0],e,void 0)}setAxisThemeOverrides(e){var t;const i=this.getChart(),n=this.getChartType();let s=this.createChartOptions();for(const{expression:r,value:o}of e){const e=null==(t=i.axes)?void 0:t.filter(e=>{const t=r.split(".");let i=e;for(const e of t){if(!(e in i))return!1;i=i[e]}return!0});if(e)for(const t of e)this.isValidAxisType(t)&&this.assignChartAxisThemeOverride(s,n,t.type,null,r,o)}this.applyChartOptions(s)}getCartesianAxisProperty(e,t){const i=this.getChartAxes();return Wn(this.getCartesianAxis(i,e),t,void 0)}getCartesianAxisThemeOverride(e,t){const i=this.getChartAxes(),n=this.getCartesianAxis(i,e);if(!n||!this.isValidAxisType(n))return;const s=this.getChartType(),r=this.getChart().getOptions();return this.retrieveChartAxisThemeOverride(r,s,n.type,"yAxis"===e?["left","right"]:["bottom","top"],t)}setCartesianAxisThemeOverrides(e,t){const i=this.getChartAxes(),n=this.getCartesianAxis(i,e);if(!n||!this.isValidAxisType(n))return;const s=this.getChartType();let r=this.createChartOptions();for(const{expression:i,value:o}of t)this.assignChartAxisThemeOverride(r,s,n.type,"yAxis"===e?["left","right"]:["bottom","top"],i,o);this.applyChartOptions(r)}setCartesianAxisOptions(e,t){this.updateCartesianAxisOptions(e,(e,i,n)=>{const s=i.indexOf(n);for(const{expression:i,value:n}of t)this.assignChartOption(e,`axes.${s}.${i}`,n)})}updateCartesianAxisOptions(e,t){const i=this.getChart().getOptions(),n="axes"in i?i.axes:void 0;if(!i||!n)return;const s=this.getChartAxes(),r=this.getCartesianAxis(s,e);if(!r)return;let o=this.createChartOptions();o.axes=n,t(o,s,r,i),this.applyChartOptions(o)}setCartesianCategoryAxisType(e,t){this.updateCartesianAxisOptions(e,(i,n,s,r)=>{const o=this.getChartType();this.assignPersistedAxisOverrides({existingAxes:[s],retainedChartAxisThemeOverrideKeys:this.getRetainedChartAxisThemeOverrideKeys(e,o,o),existingChartOptions:r,targetChartOptions:i,existingChartType:o,targetChartType:o}),this.assignChartOption(i,"axes.0.type",t),this.chartController.setCategoryAxisType(t)})}getCartesianAxis(e,t){if(!(e.length<2))switch(t){case"xAxis":return"x"===e[0].direction?e[0]:e[1];case"yAxis":return"y"===e[1].direction?e[1]:e[0]}}getSeriesOption(t,i,n){const s=this.getChart().series.find(i=>e.isMatchingSeries(t,i));return Wn(n?s:null==s?void 0:s.properties.toJson(),i,void 0)}setSeriesOptions(e,t){let i=this.createChartOptions();for(const{expression:n,value:s}of t)this.assignChartOptionsSeriesThemeOverride(i,e,`series.${n}`,s);this.applyChartOptions(i)}getPairedMode(){return this.chartController.getChartProxy().isPaired()}setPairedMode(e){this.chartController.getChartProxy().setPaired(e)}getChartAxes(){var e;return null!=(e=this.getChart().axes)?e:[]}retrieveChartAxisThemeOverride(e,t,i,n,s){if(!n)return this.retrieveChartOptionsThemeOverride(e,t,["axes",i,...s?[s]:[]].join("."));for(const r of n){const n=this.retrieveChartOptionsThemeOverride(e,t,["axes",i,r,...s?[s]:[]].join("."));if(void 0!==n)return n}}assignChartAxisThemeOverride(e,t,i,n,s,r){if(n)for(const o of n)this.assignChartOptionsThemeOverride(e,t,["axes",i,o,...s?[s]:[]].join("."),r);else this.assignChartOptionsThemeOverride(e,t,["axes",i,...s?[s]:[]].join("."),r)}isValidAxisType(e){return $o.includes(e.type)}getChartType(){return this.chartController.getChartType()}getChart(){return this.chartController.getChartProxy().getChart()}updateChart(e){const t=this.chartController.getChartProxy().getChartRef();t.skipAnimations(),Wi.AgCharts.updateDelta(t,e)}createChartOptions(){return{theme:{overrides:{}}}}retrieveChartOptionsThemeOverride(e,t,i){const n=this.getChartThemeOverridesSeriesTypeKeys(t);for(const t of n){const n=this.retrieveChartOptionsSeriesThemeOverride(e,t,i);if(void 0!==n)return n}}assignChartOptionsThemeOverride(e,t,i,n){const s=this.getChartThemeOverridesSeriesTypeKeys(t);for(const t of s)this.assignChartOptionsSeriesThemeOverride(e,t,i,n)}retrieveChartOptionsSeriesThemeOverride(e,t,i){return this.retrieveChartOption(e,["theme","overrides",t,...i?[i]:[]].join("."))}assignChartOptionsSeriesThemeOverride(e,t,i,n){this.assignChartOption(e,["theme","overrides",t,...i?[i]:[]].join("."),n)}getChartThemeOverridesSeriesTypeKeys(e){const t=this.chartController.getChartSeriesTypes(e);return this.chartController.isComboChart()&&t.push("common"),t}retrieveChartOption(e,t){return Wn(e,t,void 0)}assignChartOption(e,t,i){!function(e,t,i){if(null==e)return;const n=t.split(".");let s=e;n.forEach((e,t)=>{s[e]||(s[e]={}),t<n.length-1&&(s=s[e])}),s[n[n.length-1]]=i}(e,t,i)}raiseChartOptionsChangedEvent(){const e=this.chartController.getChartModel(),t={type:Ui.Events.EVENT_CHART_OPTIONS_CHANGED,chartId:e.chartId,chartType:e.chartType,chartThemeName:this.chartController.getChartThemeName(),chartOptions:e.chartOptions};this.eventService.dispatchEvent(t)}static isMatchingSeries(e,t){return function(e){return!!Sn[e]}(e)&&t.type===e}destroy(){super.destroy()}},qo=class extends Do{constructor(e){super(e)}getAxes(e){const t=e?e.fields:[],i=new Map(t.map(e=>[e.colId,e])),{primaryYKeys:n,secondaryYKeys:s}=this.getYKeys(t,e.seriesChartTypes),r=[{type:this.getXAxisType(e),position:"bottom"}];return n.length>0&&r.push({type:"number",keys:n,position:"left"}),s.length>0&&s.forEach(e=>{const t=i.get(e);if(!t||t.colId!==e)return;const n={type:"number",keys:[e],position:"right"};r.push(n)}),r}getSeries(e){const{fields:t,seriesChartTypes:i}=e,[n]=e.categories;return t.map(e=>{const t=i.find(t=>t.colId===e.colId);if(t){const i=t.chartType,s=["groupedColumn","groupedBar"].includes(i)?{grouped:!0}:{};return un({type:Rn(i),xKey:n.id,yKey:e.colId,yName:e.displayName,stacked:["stackedArea","stackedColumn"].includes(i)},s)}})}getYKeys(e,t){const i=[],n=[];return e.forEach(e=>{const s=e.colId,r=t.find(e=>e.colId===s);r&&(r.secondaryAxis?n.push(s):i.push(s))}),{primaryYKeys:i,secondaryYKeys:n}}},Xo=["chartSettings","chartData","chartFormat"],Zo=["chartUnlink","chartLink","chartDownload"],Qo={settings:"chartSettings",data:"chartData",format:"chartFormat"},Jo=class extends ji.BeanStub{isLegacyFormat(){return!this.chartService.isEnterprise()}downloadChart(e,t,i,n){e.chartController.getChartProxy().downloadChart(t,i,n)}toggleLinked(e){e.chartController.detachChartRange()}openAdvancedSettings(e,t){this.advancedSettingsMenuFactory.showMenu(e,t)}hideAdvancedSettings(){this.advancedSettingsMenuFactory.hideMenu()}getToolbarOptionsAndPanels(e){var t,i,n;const s=this.isLegacyFormat();let r,o,a;if(Boolean(this.gos.get("chartToolPanelsDef"))||!s){const l=s?[e.isChartLinked()?"chartLink":"chartUnlink","chartDownload"]:["chartMenu"],c=this.gos.getCallback("getChartToolbarItems");a=c?c({defaultItems:l}).filter(e=>{if(!(s?Zo:[...Zo,"chartMenu"]).includes(e)){let t;return t=Xo.includes(e)?`'${e}' is a Chart Tool Panel option and will be ignored since 'chartToolPanelsDef' is used. Please use 'chartToolPanelsDef.panels' grid option instead`:"chartMenu"===e?"'chartMenu' is only allowed as a Chart Toolbar Option when using AG Charts Enterprise":`'${e}' is not a valid Chart Toolbar Option`,ji._.warnOnce(t),!1}return!0}):l;const h=null==(i=null==(t=this.gos.get("chartToolPanelsDef"))?void 0:t.panels)?void 0:i.map(e=>{const t=Qo[e];return t||ji._.warnOnce(`Invalid panel in chartToolPanelsDef.panels: '${e}'`),t}).filter(e=>Boolean(e));r=h||Object.values(Qo),e.isPivotChart()&&(r=r.filter(e=>"chartData"!==e));const d=null==(n=this.gos.get("chartToolPanelsDef"))?void 0:n.defaultToolPanel;o=d&&Qo[d]||r[0],s&&(a=r.length>0?[r[0],...a]:a)}else{let t=["chartSettings","chartData","chartFormat",e.isChartLinked()?"chartLink":"chartUnlink","chartDownload"];const i=this.gos.getCallback("getChartToolbarItems");if(i){const e=this.gos.get("suppressChartToolPanelsButton");t=i({defaultItems:e?t:Zo}).filter(t=>{if(!Xo.includes(t)&&!Zo.includes(t))return ji._.warnOnce(`'${t}' is not a valid Chart Toolbar Option`),!1;if(!e&&Xo.includes(t)){const e=`'${t}' is a Chart Tool Panel option and will be ignored. Please use 'chartToolPanelsDef.panels' grid option instead`;return ji._.warnOnce(e),!1}return!0}),e||(t=t.concat(Xo))}e.isPivotChart()&&(t=t.filter(e=>"chartData"!==e));const n=["chartUnlink","chartLink","chartDownload"];r=t.filter(e=>-1===n.indexOf(e)),o=r[0],a=t.filter(e=>-1!==n.indexOf(e)||r.length&&e===r[0])}return{panels:r,defaultPanel:o,chartToolbarOptions:a}}doesChartToolbarExist(e){const{chartToolbarOptions:t}=this.getToolbarOptionsAndPanels(e);return["chartMenu",...Zo].some(e=>t.includes(e))}doChartToolPanelsExist(e){const{panels:t}=this.getToolbarOptionsAndPanels(e);return t.length>0}};fn([(0,ji.Autowired)("chartService")],Jo.prototype,"chartService",2),fn([(0,ji.Autowired)("advancedSettingsMenuFactory")],Jo.prototype,"advancedSettingsMenuFactory",2),Jo=fn([(0,ji.Bean)("chartMenuService")],Jo);var ea="AG-GRID-DEFAULT-LABEL-KEY";function ta(e,t=null,i){const{depth:n,rootValues:s,value:r,children:o}=e;if(s)return s.map(e=>un({[ea]:t},e));if(0===n)return[un({[ea]:t},r)];const a=[];for(const[e,t]of o.entries())a.push(...ta(t,e,!0));return i?[un({[ea]:t,children:a},null!=r?r:{})]:a}function ia(e,t,i){const n={depth:0,children:new Map};return e.forEach(e=>{s(e,t(e),i,0,n)}),n;function s(e,t,i,n,r){if(n===t)return 0===n?(r.rootValues||(r.rootValues=[]),r.rootValues.push(e)):r.value=e,r;{const o=i(e,n),a=s(e,t,i,n+1,r.children.get(o)||{depth:0,children:new Map});return r.children.set(o,a),r.depth=Math.max(1+a.depth,r.depth),r}}}var na=class extends To{constructor(e){super(e)}getUpdateOptions(e,t){const{fields:i}=e,[n,s]=i;return pn(un({},t),{series:this.getSeries(n,s),data:this.getData(e,n,s)})}getSeriesChartThemeDefaults(){return{gradientLegend:{gradient:{preferredLength:200}}}}getSeries(e,t){var i,n;return[{type:this.standaloneChartType,labelKey:ea,sizeKey:null==e?void 0:e.colId,sizeName:null!=(i=null==e?void 0:e.displayName)?i:void 0,colorKey:null==t?void 0:t.colId,colorName:null!=(n=null==t?void 0:t.displayName)?n:void 0}]}getData(e,t,i){var n;const{categories:s,data:r,groupData:o,grouping:a}=e;return a?function(e,t){return ta(ia(e,function(e){var i,n;return null!=(n=null==(i=t(e))?void 0:i.length)?n:0},function(e,i){const n=t(e);return n?n[n.length-1-i]:null}))}(i?r.concat(null!=(n=null==o?void 0:o.map(e=>{const i=un({},e);return delete i[t.colId],i}))?n:[]):r,e=>{var t,i;return null!=(i=null==(t=e[Ki.GROUP_AUTO_COLUMN_ID])?void 0:t.labels)?i:null}):function(e,t){return ta(ia(e,function(e){return t.length},function(e,i){return null==(n=e[t[i]])?null:String(n);var n}))}(r,s.map(({id:e})=>e))}},sa=class e extends gt.Component{constructor(t){super(e.TEMPLATE),this.params=t}init(){const e=pn(un({},this.params),{chartType:Dn(this.params.chartType),chartThemeName:this.getThemeName()}),t=this.gos.get("enableRtl");this.addCssClass(t?"ag-rtl":"ag-ltr");const i=this.createBean(new _n(e));this.chartController=this.createManagedBean(new rs(i)),this.chartOptionsService=this.createManagedBean(new Yo(this.chartController)),this.validateCustomThemes(),this.createChart(),this.params.insideDialog&&this.addDialog(),this.addMenu(),this.addTitleEditComp(),this.addManagedListener(this.getGui(),"focusin",this.setActiveChartCellRange.bind(this)),this.addManagedListener(this.chartController,rs.EVENT_CHART_MODEL_UPDATE,this.update.bind(this)),this.addManagedPropertyListeners(["chartThemeOverrides","chartThemes"],this.reactivePropertyUpdate.bind(this)),this.update(),this.raiseChartCreatedEvent()}createChart(){var t;let i;this.chartProxy&&(i=this.chartProxy.destroy({keepChartInstance:!0}));const n=this.chartController.getChartType(),s={chartType:n,chartInstance:i,getChartThemeName:this.getChartThemeName.bind(this),getChartThemes:this.getChartThemes.bind(this),customChartThemes:this.gos.get("customChartThemes"),getGridOptionsChartThemeOverrides:()=>this.getGridOptionsChartThemeOverrides(),getExtraPaddingDirections:()=>{var e,t;return null!=(t=null==(e=this.chartMenu)?void 0:e.getExtraPaddingDirections())?t:[]},apiChartThemeOverrides:this.params.chartThemeOverrides,crossFiltering:null!=(t=this.params.crossFiltering)&&t,crossFilterCallback:(e,t)=>{this.params.crossFilteringContext.lastSelectedChartId=t?"":this.chartController.getChartId(),t&&this.params.crossFilteringResetCallback(),this.crossFilterService.filter(e,t)},parentElement:this.eChart,grouping:this.chartController.isGrouping(),chartThemeToRestore:this.params.chartThemeName,chartOptionsToRestore:this.params.chartOptionsToRestore,chartPaletteToRestore:this.params.chartPaletteToRestore,seriesChartTypes:this.chartController.getSeriesChartTypes(),translate:e=>this.chartTranslationService.translate(e)};if(this.params.chartOptionsToRestore=void 0,this.chartType=n,this.chartProxy=e.createChartProxy(s),!this.chartProxy)return void console.warn("AG Grid: invalid chart type supplied: ",s.chartType);const r=this.eChart.querySelector("canvas");r&&r.classList.add("ag-charts-canvas"),this.chartController.setChartProxy(this.chartProxy),this.createMenuContext(),this.titleEdit&&this.titleEdit.refreshTitle(this.chartMenuContext)}createMenuContext(){if(this.chartMenuContext)return;const e=this.createManagedBean(new ks(this.chartOptionsService.getChartThemeOverridesProxy())),t=this.createManagedBean(new ks(this.chartOptionsService.getAxisThemeOverridesProxy()));this.chartMenuContext={chartController:this.chartController,chartOptionsService:this.chartOptionsService,chartMenuParamsFactory:e,chartAxisMenuParamsFactory:t}}getChartThemeName(){return this.chartController.getChartThemeName()}getChartThemes(){return this.chartController.getThemeNames()}getGridOptionsChartThemeOverrides(){return this.gos.get("chartThemeOverrides")}static createChartProxy(e){switch(e.chartType){case"column":case"bar":case"groupedColumn":case"stackedColumn":case"normalizedColumn":case"groupedBar":case"stackedBar":case"normalizedBar":return new ko(e);case"pie":case"donut":case"doughnut":return new _o(e);case"area":case"stackedArea":case"normalizedArea":return new Po(e);case"line":return new No(e);case"scatter":case"bubble":return new Fo(e);case"histogram":return new Bo(e);case"radarLine":case"radarArea":case"nightingale":case"radialColumn":case"radialBar":return new Oo(e);case"rangeBar":case"rangeArea":return new Vo(e);case"boxPlot":return new Ho(e);case"treemap":case"sunburst":return new na(e);case"heatmap":return new zo(e);case"waterfall":return new jo(e);case"columnLineCombo":case"areaColumnCombo":case"customCombo":return new qo(e);default:throw`AG Grid: Unable to create chart as an invalid chartType = '${e.chartType}' was supplied.`}}addDialog(){const e=this.chartTranslationService.translate(this.params.pivotChart?"pivotChartTitle":"rangeChartTitle"),{width:t,height:i}=this.getBestDialogSize();this.chartDialog=new gt.AgDialog({resizable:!0,movable:!0,maximizable:!0,title:e,width:t,height:i,component:this,centered:!0,closable:!0}),this.getContext().createBean(this.chartDialog),this.chartDialog.addEventListener(gt.AgDialog.EVENT_DESTROYED,()=>{this.destroy(),this.chartMenuService.hideAdvancedSettings()})}getBestDialogSize(){const e=this.popupService.getPopupParent(),t=.75*gt._.getAbsoluteWidth(e),i=.75*gt._.getAbsoluteHeight(e),n=this.chartProxy.getChart();let s=this.params.insideDialog?850:n.width,r=this.params.insideDialog?470:n.height;return(s>t||r>i)&&(s=Math.min(s,t),r=Math.round(.553*s),r>i&&(r=i,s=Math.min(s,Math.round(r/.553)))),{width:s,height:r}}addMenu(){this.params.crossFiltering||(this.chartMenu=this.createBean(new xo(this.eChartContainer,this.eMenuContainer,this.chartMenuContext)),this.eChartContainer.appendChild(this.chartMenu.getGui()))}addTitleEditComp(){this.titleEdit=this.createBean(new Mo(this.chartMenu)),this.eTitleEditContainer.appendChild(this.titleEdit.getGui()),this.chartProxy&&this.titleEdit.refreshTitle(this.chartMenuContext)}update(e){if((null==e?void 0:e.chartId)&&!this.chartController.update(e))return;const t=this.chartTypeChanged(e),i=t||this.chartEmpty?(e=>{const t=this.chartType,i=e,n=this.chartProxy.getChart(),s=null==n?void 0:n.getOptions(),r=null==n?void 0:n.axes;return this.chartOptionsService.getPersistedChartThemeOverrides(s,r,t,null!=i?i:t)})(t):void 0;t&&this.createChart();const n=i&&(null==e?void 0:e.chartThemeOverrides)?Un(i,e.chartThemeOverrides):i||(null==e?void 0:e.chartThemeOverrides);this.updateChart(n),(null==e?void 0:e.chartId)&&this.chartProxy.getChart().waitForUpdate().then(()=>{this.chartController.raiseChartApiUpdateEvent()})}updateChart(e){const{chartProxy:t}=this,i=this.chartController.getSelectedValueColState(),n=this.chartController.getChartData(),s=this.handleEmptyChart(n,i.length);if(this.chartEmpty=s,s)return void(e&&this.chartController.updateThemeOverrides(e));let r=this.chartController.getChartUpdateParams(e);t.update(r),this.chartProxy.getChart().waitForUpdate().then(()=>{this.chartController.raiseChartUpdatedEvent()}),this.titleEdit.refreshTitle(this.chartMenuContext)}chartTypeChanged(e){const[t,i]=[this.chartController.getChartType(),null==e?void 0:e.chartType],n=i?Dn(i):void 0;return this.chartType!==t?null!=n?n:t:n&&t!==n?n:null}getChartModel(){return this.chartController.getChartModel()}getChartImageDataURL(e){return this.chartProxy.getChartImageDataURL(e)}handleEmptyChart(e,t){const i=this.chartController.isPivotChart()&&!this.chartController.isPivotMode(),n=this.chartController.getChartType();let s=1;this.chartController.isActiveXYChart()?s="bubble"===n?3:2:Tn(Rn(n))&&(s=0);const r=t<s||0===e.length;if(this.eChart){const e=i||r;gt._.setDisplayed(this.eChart,!e),gt._.setDisplayed(this.eEmpty,e)}return i?(this.eEmpty.innerText=this.chartTranslationService.translate("pivotChartRequiresPivotMode"),!0):!!r&&(this.eEmpty.innerText=this.chartTranslationService.translate("noDataToChart"),!0)}downloadChart(e,t,i){this.chartProxy.downloadChart(e,t,i)}openChartToolPanel(e){const t=e?Qo[e]:e;this.chartMenu.showMenu({panel:t})}closeChartToolPanel(){this.chartMenu.hideMenu()}getChartId(){return this.chartController.getChartId()}getUnderlyingChart(){return this.chartProxy.getChartRef()}crossFilteringReset(){this.chartProxy.crossFilteringReset()}setActiveChartCellRange(e){this.getGui().contains(e.relatedTarget)||(this.chartController.setChartRange(!0),this.focusService.clearFocusedCell())}getThemeName(){const e=this.gos.get("chartThemes")||ns;if(0===e.length)throw new Error("Cannot create chart: no chart themes available.");const{chartThemeName:t}=this.params;return gt._.includes(e,t)?t:e[0]}getAllKeysInObjects(e){const t={};return e.filter(e=>null!=e).forEach(e=>{Object.keys(e).forEach(e=>t[e]=null)}),Object.keys(t)}validateCustomThemes(){const e=this.getChartThemes(),t=this.gos.get("customChartThemes");t&&this.getAllKeysInObjects([t]).forEach(t=>{gt._.includes(e,t)||console.warn("AG Grid: a custom chart theme with the name '"+t+"' has been supplied but not added to the 'chartThemes' list")})}reactivePropertyUpdate(){this.chartController.setChartThemeName(this.getThemeName(),!0);const e=this.getChartId(),t=this.chartController.isCrossFilterChart()?"crossFilter":this.getChartModel().modelType,i=this.gos.get("chartThemeOverrides")||{};this.update({type:`${t}ChartUpdate`,chartId:e,chartThemeOverrides:i})}raiseChartCreatedEvent(){const e={type:gt.Events.EVENT_CHART_CREATED,chartId:this.chartController.getChartId()};this.chartProxy.getChart().waitForUpdate().then(()=>{this.eventService.dispatchEvent(e)})}raiseChartDestroyedEvent(){const e={type:gt.Events.EVENT_CHART_DESTROYED,chartId:this.chartController.getChartId()};this.eventService.dispatchEvent(e)}destroy(){var e;super.destroy(),this.chartProxy&&this.chartProxy.destroy(),this.destroyBean(this.chartMenu),this.destroyBean(this.titleEdit),this.chartDialog&&this.chartDialog.isAlive()&&this.destroyBean(this.chartDialog),null==(e=this.onDestroyColorSchemeChangeListener)||e.call(this);const t=this.getGui();gt._.clearElement(t),gt._.removeFromParent(t),this.raiseChartDestroyedEvent()}};sa.TEMPLATE='<div class="ag-chart" tabindex="-1">\n            <div ref="eChartContainer" tabindex="-1" class="ag-chart-components-wrapper">\n                <div ref="eChart" class="ag-chart-canvas-wrapper"></div>\n                <div ref="eEmpty" class="ag-chart-empty-text ag-unselectable"></div>\n            </div>\n            <div ref="eTitleEditContainer"></div>\n            <div ref="eMenuContainer" class="ag-chart-docked-container" style="min-width: 0px;"></div>\n        </div>',fn([(0,gt.RefSelector)("eChart")],sa.prototype,"eChart",2),fn([(0,gt.RefSelector)("eChartContainer")],sa.prototype,"eChartContainer",2),fn([(0,gt.RefSelector)("eMenuContainer")],sa.prototype,"eMenuContainer",2),fn([(0,gt.RefSelector)("eEmpty")],sa.prototype,"eEmpty",2),fn([(0,gt.RefSelector)("eTitleEditContainer")],sa.prototype,"eTitleEditContainer",2),fn([(0,gt.Autowired)("chartCrossFilterService")],sa.prototype,"crossFilterService",2),fn([(0,gt.Autowired)("chartTranslationService")],sa.prototype,"chartTranslationService",2),fn([(0,gt.Autowired)("chartMenuService")],sa.prototype,"chartMenuService",2),fn([(0,gt.Autowired)("focusService")],sa.prototype,"focusService",2),fn([(0,gt.Autowired)("popupService")],sa.prototype,"popupService",2),fn([gt.PostConstruct],sa.prototype,"init",1);var ra=sa,oa="31.3.4";function aa(e){return e=Ta("chartOptions.legend.item.marker.type","shape",e),e=Ta("chartOptions.seriesDefaults.marker.type","shape",e),Ta("chartOptions.legend.padding","spacing",e)}function la(e){var t;const i=e=Da("chartOptions.seriesDefaults.marker.minSize",e),{chartType:n,chartPalette:s,chartOptions:r}=i,o=r,{xAxis:a,yAxis:l}=o,c=gn(o,["xAxis","yAxis"]),h=gn(i,["chartType","chartPalette","chartOptions"]),d=function(e){switch(e){case"bar":case"stackedBar":case"normalizedBar":return["number","category"];case"groupedBar":return["number","grouped-category"];case"column":case"stackedColumn":case"normalizedColumn":case"line":case"area":case"stackedArea":case"normalizedArea":case"histogram":return["category","number"];case"groupedColumn":return["grouped-category","number"];case"scatter":case"bubble":return["number","number"];default:return}}(n),u=null==d?void 0:d.map((e,t)=>un({type:e},0===t?a:l));return un({chartType:n,chartThemeName:null!=(t={borneo:"ag-default",material:"ag-material",bright:"ag-vivid"}[s])?t:"ag-default",chartOptions:pn(un({},c),{axes:u,xAxis:a,yAxis:l})},h)}function ca(e){return Ta("chartOptions.seriesDefaults.label.minRequiredAngle","minAngle",e)}function ha(e){return e=Da("chart",e=Ra("chartOptions.seriesDefaults.highlightStyle",e,e=>{var t=e,{dimOpacity:i}=t,n=gn(t,["dimOpacity"]);return un(un({},n),null!=i?{series:{dimOpacity:i}}:{})})),e=Da("chartOptions.seriesDefaults.tooltipClass",e),e=wa("chartOptions.axes[].label.rotation",0,e=Da("chartOptions.seriesDefaults.tooltipTracking",e)),wa("chartOptions.axes[].label.rotation",335,e)}function da(e){const t=e=>{var t=e,{item:i,series:n}=t,s=gn(t,["item","series"]);return un({item:un(un({},s),i)},n?{series:n}:{})};return e=Ra("chartOptions.seriesDefaults.highlightStyle",e,t),Ra("chartOptions.series[].highlightStyle",e,t)}function ua(e){e=Ma("chartOptions.seriesDefaults.fill.opacity","chartOptions.seriesDefaults.fillOpacity",e),e=Ma("chartOptions.seriesDefaults.stroke.opacity","chartOptions.seriesDefaults.strokeOpacity",e),e=Da("chartOptions.seriesDefaults.fill",e=Ma("chartOptions.seriesDefaults.stroke.width","chartOptions.seriesDefaults.strokeWidth",e)),e=Da("chartOptions.seriesDefaults.stroke",e),e=Da("chartOptions.seriesDefaults.callout.colors",e),e=Da("chartOptions.xAxis",e);const t=e=Da("chartOptions.yAxis",e),{chartType:i,chartOptions:n}=t,s=n,{axes:r,series:o,seriesDefaults:a}=s,l=gn(s,["axes","series","seriesDefaults"]),c=gn(t,["chartType","chartOptions"]),h=Dn(i),d=Rn(h),u=[d],p={};if(!Ln(d)){const e={top:{},bottom:{},left:{},right:{}},t=r.map(t=>{var i=t,{type:n}=i,s=gn(i,["type"]);return{[n]:un(un({},e),s)}}).reduce(La,{});Fn.filter(e=>null==t[e]).forEach(i=>{t[i]=un({},e)}),p.axes=t}const g=u.map(e=>({[e]:un(pn(un({},p),{series:a}),l)})).reduce(La,{});return pn(un({},c),{chartType:h,chartOptions:g})}function pa(e){return e=Da("chartOptions.*.title.padding",e),e=Da("chartOptions.*.subtitle.padding",e),xa("chartOptions.*.axes.*.title.enabled",!1,e=Da("chartOptions.*.axes.*.title.padding",e))}function ga(e){return e=Ta("chartOptions.pie.series.callout","calloutLine",e),e=Ta("chartOptions.pie.series.label","calloutLabel",e),e=Ta("chartOptions.pie.series.labelKey","sectorLabelKey",e),e=Ta("chartOptions.pie.series.labelName","sectorLabelName",e),e=Ta("chartOptions.donut.series.callout","calloutLine",e),e=Ta("chartOptions.donut.series.label","calloutLabel",e),e=Ta("chartOptions.donut.series.labelKey","sectorLabelKey",e),Ta("chartOptions.donut.series.labelName","sectorLabelName",e)}function fa(e){return e=Aa("chartOptions.scatter.series.fill","chartOptions.scatter.series.marker.fill",e),e=Aa("chartOptions.scatter.series.fillOpacity","chartOptions.scatter.series.marker.fillOpacity",e),e=Aa("chartOptions.scatter.series.stroke","chartOptions.scatter.series.marker.stroke",e),e=Aa("chartOptions.scatter.series.strokeOpacity","chartOptions.scatter.series.marker.strokeOpacity",e),Ma("chartOptions.scatter.series.paired","chartOptions.scatter.paired",e=Aa("chartOptions.scatter.series.strokeWidth","chartOptions.scatter.series.marker.strokeWidth",e))}function ma(e){return Da("chartOptions.axes[].tick.count",e)}function va(e){return Ra("chartOptions.*.tooltip",e,e=>{var t=e,{tracking:i}=t,n=gn(t,["tracking"]);const s=un({},n);return!1===i?(null!=s.position||(s.position={type:"pointer"}),null!=s.range||(s.range="nearest")):!0===i&&(null!=s.position||(s.position={type:"node"}),null!=s.range||(s.range="nearest")),s})}function ya(e){return e=Ta("chartOptions.pie.series.labelKey","sectorLabelKey",e),xa("chartOptions.common.legend.position","right",e=Ea("chartOptions.common.legend.enabled",!0,e=Da("chartOptions.*.series.flipXY",e=va(e=ma(e=Ta("chartOptions.pie.series.labelName","sectorLabelName",e))))))}function Ca(e){const t=Ta("chartOptions.column","bar",e),i={"ag-pastel":"ag-sheets","ag-solar":"ag-polychroma"}[t.chartThemeName]||t.chartThemeName;return pn(un({},t),{chartThemeName:i})}function ba(e,t,i){if(Sa(e)>Sa(t.version)){const n=i(t);return n.version=e,n}return t}function Sa(e){const{major:t,minor:i,patch:n}=function(e){const t="string"==typeof e?e.split(".").map(e=>Number(e)):[];if(3!==t.length||t.some(e=>isNaN(e)))throw new Error("AG Grid - Illegal version string: "+e);return{major:t[0],minor:t[1],patch:t[2]}}(e);return 1e4*t+100*i+n}function wa(e,t,i){return Ia(e,!0,i,(e,i)=>{e[i]===t&&delete e[i]})}function xa(e,t,i){return Ia(e,!1,i,(e,i)=>{null==e[i]&&(e[i]=t)})}function Ea(e,t,i){var n;"string"==typeof e&&(e=e.split("."));const s=e[0];return e.length>1&&(i[s]=Ea(e.slice(1),t,null!=(n=i[s])?n:{})),Object.keys(i).includes(s)||(i[s]=t),i}function Ma(e,t,i){let n,s=!1;return i=Ia(e,!0,i,(e,t)=>{s=!0,n=e[t],delete e[t]}),s?Ia(t,!1,i,(e,t)=>{e[t]=n}):i}function Aa(e,t,i){let n,s=!1;return i=Ia(e,!0,i,(e,t)=>{s=!0,n=e[t],delete e[t]}),s?Ia(t,!1,i,(e,t)=>{void 0===e[t]&&(e[t]=n)}):i}function Ta(e,t,i){return Ia(e,!0,i,(e,i)=>{e[t]=e[i],delete e[i]})}function Da(e,t){return Ia(e,!0,t,(e,t)=>delete e[t])}function Ia(e,t,i,n){const s=e instanceof Array?e:e.split("."),r=s.slice(0,s.length-1),o=s[s.length-1];return Ra(r,i,e=>{const i=Object.keys(e).includes(o);if(t&&!i)return e;const s=un({},e);return n(s,o),s})}function Ra(e,t,i){const n=e instanceof Array?e:e.split(".");if(t=un({},t),0===n.length)return i(t);if(n[0].startsWith("{")){const e=n[0].substring(1,n[0].lastIndexOf("}")).split(",");for(const s of e)null!=t[s]&&(t[s]=Ra(n.slice(1),t[s],i))}else if(n[0].endsWith("[]")){const s=n[0].substring(0,e[0].indexOf("["));t[s]instanceof Array&&(t[s]=t[s].map(e=>Ra(n.slice(1),e,i)))}else if("*"===n[0])for(const e in t)t[e]=Ra(n.slice(1),t[e],i);else null!=t[n[0]]&&(t[n[0]]=Ra(n.slice(1),t[n[0]],i));return t}var La=(e,t)=>un(un({},e),t),ka=class extends ut.BeanStub{constructor(){super(...arguments),this.activeCharts=new Set,this.activeChartComps=new Set,this.crossFilteringContext={lastSelectedChartId:""},this.isEnterprise=()=>pt._ModuleSupport.enterpriseModule.isEnterprise}updateChart(e){if(0===this.activeChartComps.size)return void console.warn("AG Grid - No active charts to update.");const t=[...this.activeChartComps].find(t=>t.getChartId()===e.chartId);t?t.update(e):console.warn(`AG Grid - Unable to update chart. No active chart found with ID: ${e.chartId}.`)}getChartModels(){const e=[];return this.activeChartComps.forEach(t=>e.push((e=>pn(un({},e),{version:oa}))(t.getChartModel()))),e}getChartRef(e){let t;return this.activeCharts.forEach(i=>{i.chartId===e&&(t=i)}),t}getChartComp(e){let t;return this.activeChartComps.forEach(i=>{i.getChartId()===e&&(t=i)}),t}getChartImageDataURL(e){let t;return this.activeChartComps.forEach(i=>{i.getChartId()===e.chartId&&(t=i.getChartImageDataURL(e.fileFormat))}),t}downloadChart(e){const t=Array.from(this.activeChartComps).find(t=>t.getChartId()===e.chartId);null==t||t.downloadChart(e.dimensions,e.fileName,e.fileFormat)}openChartToolPanel(e){const t=Array.from(this.activeChartComps).find(t=>t.getChartId()===e.chartId);null==t||t.openChartToolPanel(e.panel)}closeChartToolPanel(e){const t=Array.from(this.activeChartComps).find(t=>t.getChartId()===e);null==t||t.closeChartToolPanel()}createChartFromCurrentRange(e="groupedColumn"){const t=this.getSelectedRange();return this.createChart({cellRange:t,chartType:e})}restoreChart(e,t){if(!e)return void console.warn("AG Grid - unable to restore chart as no chart model is provided");let i,n,s,r;return e.version!==oa&&(e=function(e){return e.version,null==e.version&&(e.version=function(e){var t,i;const n=e;if(null!=e.version)return e.version;const s=(e,...t)=>Object.keys(e||{}).some(e=>t.includes(e)),r=n.chartOptions,o=s(r,"seriesDefaults")?null==r?void 0:r.seriesDefaults:null==r?void 0:r[Object.keys(r)[0]],a={"27.0.0":s(n,"seriesChartTypes"),"26.2.0":!s(r,"seriesDefaults"),"26.1.0":s(null==o?void 0:o.highlightStyle,"item"),"26.0.0":s(null==o?void 0:o.highlightStyle,"series"),"25.1.0":s(null==o?void 0:o.label,"minAngle"),"25.0.0":s(n,"modelType","aggFunc","unlinkChart","suppressChartRanges")||s(o,"lineDash","lineDashOffset"),"24.0.0":s(n,"chartThemeName","chart")||s(r,"series"),"23.2.0":s(r,"navigator"),"23.0.0":s(null==(i=null==(t=null==r?void 0:r.legend)?void 0:t.item)?void 0:i.marker,"shape"),"22.1.0":s(n,"chartPalette","chartType")},l="27.1.0",c=Object.entries(a).filter(([e,t])=>t),[h=l]=c[0];return h}(e)),e=ba("23.0.0",e,aa),e=ba("24.0.0",e,la),e=ba("25.1.0",e,ca),e=ba("26.0.0",e,ha),e=ba("26.1.0",e,da),e=ba("26.2.0",e,ua),e=ba("28.0.0",e,pa),e=ba("28.2.0",e,ga),e=ba("29.0.0",e,fa),e=ba("29.1.0",e,ma),e=ba("29.2.0",e,va),e=ba("30.0.0",e,ya),e=function(e){return e=Da("chartOptions.*.width",e),xa("chartOptions.*.axes.category.label.autoRotate",!0,e=Da("chartOptions.*.height",e))}(e=ba("31.0.0",e,Ca)),ba(oa,e,e=>e)}(e)),"pivot"===e.modelType?(this.gos.updateGridOptions({options:{pivotMode:!0},source:"pivotChart"}),i=this.createCellRange(void 0,!0),n=!0,s=!0):(i=this.createCellRange(e.cellRange),r=e.chartPalette),i?this.createChart(pn(un({},e),{cellRange:i,pivotChart:n,suppressChartRanges:s,chartContainer:t,chartOptionsToRestore:e.chartOptions,chartPaletteToRestore:r})):void 0}createRangeChart(e){const t=this.createCellRange(e.cellRange);if(t)return this.createChart(pn(un({},e),{cellRange:t}))}createPivotChart(e){this.gos.updateGridOptions({options:{pivotMode:!0},source:"pivotChart"});const t=this.createCellRange(void 0,!0);if(t)return this.createChart(pn(un({},e),{cellRange:t,pivotChart:!0,suppressChartRanges:!0}))}createCrossFilterChart(e){const t=this.createCellRange(e.cellRange);if(!t)return;const i=!(void 0!==e.suppressChartRanges&&null!==e.suppressChartRanges)||e.suppressChartRanges;return this.createChart(pn(un({},e),{cellRange:t,suppressChartRanges:i,crossFiltering:!0}))}createChart(e){const t=is.validateCreateParams(e);if(!t)return;e=!0===t?e:t;const{chartType:i,chartContainer:n}=e,s=this.gos.getCallback("createChartContainer"),r=pn(un({},e),{chartId:this.generateId(),chartType:Dn(i),insideDialog:!(n||s),crossFilteringContext:this.crossFilteringContext,crossFilteringResetCallback:()=>this.activeChartComps.forEach(e=>e.crossFilteringReset())}),o=new ra(r);this.context.createBean(o);const a=this.createChartRef(o);if(n){n.appendChild(o.getGui());const e=this.environment.getTheme();e.el&&!e.el.contains(n)&&n.classList.add(e.theme)}else s?s(a):o.addEventListener(ra.EVENT_DESTROYED,()=>{this.activeChartComps.delete(o),this.activeCharts.delete(a)});return a}createChartRef(e){const t={destroyChart:()=>{this.activeCharts.has(t)&&(this.context.destroyBean(e),this.activeChartComps.delete(e),this.activeCharts.delete(t))},chartElement:e.getGui(),chart:e.getUnderlyingChart(),chartId:e.getChartModel().chartId};return this.activeCharts.add(t),this.activeChartComps.add(e),t}getSelectedRange(){var e,t;const i=null!=(t=null==(e=this.rangeService)?void 0:e.getCellRanges())?t:[];return i.length>0?i[0]:{columns:[]}}generateId(){return`id-${Math.random().toString(36).substring(2,18)}`}createCellRange(e,t){var i;const n=t?{rowStartIndex:null,rowStartPinned:void 0,rowEndIndex:null,rowEndPinned:void 0,columns:this.columnModel.getAllDisplayedColumns().map(e=>e.getColId())}:e,s=n&&(null==(i=this.rangeService)?void 0:i.createPartialCellRangeFromRangeParams(n,!0));return s||console.warn(`AG Grid - unable to create chart as ${t?"there are no columns in the grid":"no range is selected"}.`),s}destroyAllActiveCharts(){this.activeCharts.forEach(e=>e.destroyChart())}};ka.CHARTS_VERSION=pt.VERSION,fn([(0,ut.Autowired)("columnModel")],ka.prototype,"columnModel",2),fn([(0,ut.Optional)("rangeService")],ka.prototype,"rangeService",2),fn([ut.PreDestroy],ka.prototype,"destroyAllActiveCharts",1),ka=fn([(0,ut.Bean)("chartService")],ka);var Pa=class extends $i.BeanStub{translate(e){return this.localeService.getLocaleTextFunc()(e,Pa.DEFAULT_TRANSLATIONS[e])}};Pa.DEFAULT_TRANSLATIONS={pivotChartTitle:"Pivot Chart",rangeChartTitle:"Range Chart",settings:"Chart",data:"Data",format:"Format",categories:"Categories",defaultCategory:"(None)",series:"Series",switchCategorySeries:"Switch Category / Series",categoryValues:"Category Values",seriesLabels:"Series Labels",aggregate:"Aggregate",xyValues:"X Y Values",paired:"Paired Mode",axis:"Axis",xAxis:"Horizontal Axis",yAxis:"Vertical Axis",polarAxis:"Polar Axis",radiusAxis:"Radius Axis",navigator:"Navigator",zoom:"Zoom",animation:"Animation",crosshair:"Crosshair",color:"Color",thickness:"Thickness",preferredLength:"Preferred Length",xType:"X Type",axisType:"Axis Type",automatic:"Automatic",category:"Category",number:"Number",time:"Time",timeFormat:"Time Format",autoRotate:"Auto Rotate",labelRotation:"Rotation",circle:"Circle",orientation:"Orientation",polygon:"Polygon",fixed:"Fixed",parallel:"Parallel",perpendicular:"Perpendicular",radiusAxisPosition:"Position",ticks:"Ticks",gridLines:"Grid Lines",width:"Width",height:"Height",length:"Length",padding:"Padding",spacing:"Spacing",chart:"Chart",title:"Title",titlePlaceholder:"Chart title - double click to edit",background:"Background",font:"Font",top:"Top",right:"Right",bottom:"Bottom",left:"Left",labels:"Labels",calloutLabels:"Callout Labels",sectorLabels:"Sector Labels",positionRatio:"Position Ratio",size:"Size",shape:"Shape",minSize:"Minimum Size",maxSize:"Maximum Size",legend:"Legend",position:"Position",markerSize:"Marker Size",markerStroke:"Marker Stroke",markerPadding:"Marker Padding",itemSpacing:"Item Spacing",itemPaddingX:"Item Padding X",itemPaddingY:"Item Padding Y",layoutHorizontalSpacing:"Horizontal Spacing",layoutVerticalSpacing:"Vertical Spacing",strokeWidth:"Stroke Width",offset:"Offset",offsets:"Offsets",tooltips:"Tooltips",callout:"Callout",markers:"Markers",shadow:"Shadow",blur:"Blur",xOffset:"X Offset",yOffset:"Y Offset",lineWidth:"Line Width",lineDash:"Line Dash",lineDashOffset:"Dash Offset",scrollingZoom:"Scrolling",scrollingStep:"Scrolling Step",selectingZoom:"Selecting",durationMillis:"Duration (ms)",crosshairLabel:"Label",crosshairSnap:"Snap to Node",normal:"Normal",bold:"Bold",italic:"Italic",boldItalic:"Bold Italic",predefined:"Predefined",fillOpacity:"Fill Opacity",strokeColor:"Line Color",strokeOpacity:"Line Opacity",miniChart:"Mini-Chart",histogramBinCount:"Bin count",connectorLine:"Connector Line",seriesItems:"Series Items",seriesItemType:"Item Type",seriesItemPositive:"Positive",seriesItemNegative:"Negative",seriesItemLabels:"Item Labels",columnGroup:"Column",barGroup:"Bar",pieGroup:"Pie",lineGroup:"Line",scatterGroup:"X Y (Scatter)",areaGroup:"Area",polarGroup:"Polar",statisticalGroup:"Statistical",hierarchicalGroup:"Hierarchical",specializedGroup:"Specialized",combinationGroup:"Combination",groupedColumnTooltip:"Grouped",stackedColumnTooltip:"Stacked",normalizedColumnTooltip:"100% Stacked",groupedBarTooltip:"Grouped",stackedBarTooltip:"Stacked",normalizedBarTooltip:"100% Stacked",pieTooltip:"Pie",donutTooltip:"Donut",lineTooltip:"Line",groupedAreaTooltip:"Area",stackedAreaTooltip:"Stacked",normalizedAreaTooltip:"100% Stacked",scatterTooltip:"Scatter",bubbleTooltip:"Bubble",histogramTooltip:"Histogram",radialColumnTooltip:"Radial Column",radialBarTooltip:"Radial Bar",radarLineTooltip:"Radar Line",radarAreaTooltip:"Radar Area",nightingaleTooltip:"Nightingale",rangeBarTooltip:"Range Bar",rangeAreaTooltip:"Range Area",boxPlotTooltip:"Box Plot",treemapTooltip:"Treemap",sunburstTooltip:"Sunburst",heatmapTooltip:"Heatmap",waterfallTooltip:"Waterfall",columnLineComboTooltip:"Column & Line",areaColumnComboTooltip:"Area & Column",customComboTooltip:"Custom Combination",innerRadius:"Inner Radius",startAngle:"Start Angle",endAngle:"End Angle",reverseDirection:"Reverse Direction",groupPadding:"Group Padding",seriesPadding:"Series Padding",group:"Group",tile:"Tile",whisker:"Whisker",cap:"Cap",capLengthRatio:"Length Ratio",labelPlacement:"Placement",inside:"Inside",outside:"Outside",noDataToChart:"No data available to be charted.",pivotChartRequiresPivotMode:"Pivot Chart requires Pivot Mode enabled.",chartSettingsToolbarTooltip:"Menu",chartLinkToolbarTooltip:"Linked to Grid",chartUnlinkToolbarTooltip:"Unlinked from Grid",chartDownloadToolbarTooltip:"Download Chart",chartMenuToolbarTooltip:"Menu",chartEdit:"Edit Chart",chartAdvancedSettings:"Advanced Settings",chartLink:"Link to Grid",chartUnlink:"Unlink from Grid",chartDownload:"Download Chart",histogramFrequency:"Frequency",seriesChartType:"Series Chart Type",seriesType:"Series Type",secondaryAxis:"Secondary Axis",seriesAdd:"Add a series",categoryAdd:"Add a category",area:"Area",bar:"Bar",column:"Column",line:"Line",scatter:"Scatter",histogram:"Histogram",radialColumn:"Radial Column",radialBar:"Radial Bar",radarLine:"Radar Line",radarArea:"Radar Area",nightingale:"Nightingale",rangeBar:"Range Bar",rangeArea:"Range Area",treemap:"Treemap",sunburst:"Sunburst",waterfall:"Waterfall",boxPlot:"Box Plot",pie:"Pie",donut:"Donut",stackedArea:"StackedArea",groupedColumn:"Grouped Column",stackedColumn:"Stacked Column",advancedSettings:"Advanced Settings",ariaChartMenuClose:"Close Chart Edit Menu",timeFormatSlashesDDMMYYYY:"DD/MM/YYYY",timeFormatSlashesMMDDYYYY:"MM/DD/YYYY",timeFormatSlashesDDMMYY:"DD/MM/YY",timeFormatSlashesMMDDYY:"MM/DD/YY",timeFormatDotsDDMYY:"DD.M.YY",timeFormatDotsMDDYY:"M.DD.YY",timeFormatDashesYYYYMMDD:"YYYY-MM-DD",timeFormatSpacesDDMMMMYYYY:"DD MMMM YYYY",timeFormatHHMMSS:"HH:MM:SS",timeFormatHHMMSSAmPm:"HH:MM:SS AM/PM",sum:"Sum",first:"First",last:"Last",min:"Min",max:"Max",count:"Count",avg:"Average",direction:"Direction",horizontal:"Horizontal",vertical:"Vertical",seriesGroupType:"Group Type",groupedSeriesGroupType:"Grouped",stackedSeriesGroupType:"Stacked",normalizedSeriesGroupType:"100% Stacked"},Pa=fn([(0,$i.Bean)("chartTranslationService")],Pa);var Na=class extends Yi.BeanStub{filter(e,t=!1){const i=this.gridApi.getFilterModel();if(t)return void this.resetFilters(i);let n=Na.extractFilterColId(e);this.isValidColumnFilter(n)?this.updateFilters(i,e,n):console.warn("AG Grid: cross filtering requires a 'agSetColumnFilter' or 'agMultiColumnFilter' to be defined on the column with id: '"+n+"'")}resetFilters(e){Object.keys(e).length>0&&(this.gridApi.setFilterModel(null),this.gridApi.onFilterChanged())}updateFilters(e,t,i){let n=Na.extractFilterColId(t),s=t.datum[n];if(void 0===s)return;let r=s.toString();if(t.event.metaKey||t.event.ctrlKey){const t=this.getCurrentGridValuesForCategory(i);let n;Yi._.includes(t,r)?n=t.filter(e=>e!==r):(n=t,n.push(r)),e[i]=this.getUpdatedFilterModel(i,n)}else{const t=[r];e={[i]:this.getUpdatedFilterModel(i,t)}}this.gridApi.setFilterModel(e)}getUpdatedFilterModel(e,t){return"agMultiColumnFilter"===this.getColumnFilterType(e)?{filterType:"multi",filterModels:[null,{filterType:"set",values:t}]}:{filterType:"set",values:t}}getCurrentGridValuesForCategory(e){let t=[];const i=this.getColumnById(e);return this.gridApi.forEachNodeAfterFilter(e=>{if(i&&!e.group){const n=this.valueService.getValue(i,e)+"";t.includes(n)||t.push(n)}}),t}static extractFilterColId(e){return e.xKey||e.calloutLabelKey}isValidColumnFilter(e){e.indexOf("-filtered-out")&&(e=e.replace("-filtered-out",""));let t=this.getColumnFilterType(e);return"boolean"==typeof t?t:Yi._.includes(["agSetColumnFilter","agMultiColumnFilter"],t)}getColumnFilterType(e){let t=this.getColumnById(e);if(t)return t.getColDef().filter}getColumnById(e){return this.columnModel.getGridColumn(e)}};function Oa(e){return e&&e.match(/\d+\.\d+\.\d+/)}function _a({type:e,gridVersion:t,chartsVersion:i}){const n="AG Grid: AG Grid version is incompatible. Please see https://www.ag-grid.com/javascript-data-grid/modules/ for more information.";if(!t)return n;const s=function(e){if(!e||!Oa(e))return;const[t,i]=e.split(".")||[],n=`${t}.${i}.x`,s=parseInt(t,10)-28+6;return s<0?void 0:{gridMajorMinor:n,chartsMajorMinor:`${s}.${i}.x`}}(t);if(!s)return n;const{gridMajorMinor:r,chartsMajorMinor:o}=s;return"incompatible"===e?`AG Grid version ${t} and AG Charts version ${i} is not supported. AG Grid version ${r} should be used with AG Chart ${o}. Please see https://www.ag-grid.com/javascript-data-grid/modules/ for more information.`:"invalidCharts"===e?`AG Grid version ${r} should be used with AG Chart ${o}. Please see https://www.ag-grid.com/javascript-data-grid/modules/ for more information.`:n}fn([(0,Yi.Autowired)("gridApi")],Na.prototype,"gridApi",2),fn([(0,Yi.Autowired)("columnModel")],Na.prototype,"columnModel",2),fn([(0,Yi.Autowired)("valueService")],Na.prototype,"valueService",2),Na=fn([(0,Yi.Bean)("chartCrossFilterService")],Na);var Fa=class extends qi.BeanStub{showMenuList(e){const{eventSource:t,showMenu:i,chartMenuContext:n}=e,s=this.chartMenuService.doChartToolPanelsExist(n.chartController),r=this.mapWithStockItems(this.getMenuItems(n.chartController,s),n,i,t,s);if(!r.length)return;const o=this.createBean(new Ga(r));this.activeChartMenuList=o;let a=-1,l="left";this.gos.get("enableRtl")&&(a=1,l="right");const c=o.getGui();this.popupService.addPopup({modal:!0,eChild:c,closeOnEsc:!0,closedCallback:()=>{this.destroyBean(o),this.activeChartMenuList=void 0;const e=this.gos.getDocument(),i=this.gos.getActiveDomElement();i&&i!==e.body||t.focus({preventScroll:!0})},afterGuiAttached:e=>o.afterGuiAttached(e),positionCallback:()=>{this.popupService.positionPopupByComponent({type:"chartMenu",eventSource:t,ePopup:c,alignSide:l,nudgeX:4*a,nudgeY:4,position:"under",keepWithinBounds:!0})},ariaLabel:"Chart Menu"})}getMenuItems(e,t){const i=[...t?["chartEdit"]:[],...e.isEnterprise()?["chartAdvancedSettings"]:[],e.isChartLinked()?"chartUnlink":"chartLink","chartDownload"],n=this.gos.get("chartMenuItems");return n?Array.isArray(n)?n:n(this.gos.addGridCommonParams({defaultItems:i})):i}mapWithStockItems(e,t,i,n,s){if(!e)return[];const r=[];return e.forEach(e=>{let o;if(o="string"==typeof e?this.getStockMenuItem(e,t,i,n,s):un({},e),!o)return;const{subMenu:a}=o;Array.isArray(a)&&(o.subMenu=this.mapWithStockItems(a,t,i,n,s)),r.push(o)}),r}getStockMenuItem(e,t,i,n,s){switch(e){case"chartEdit":return s?this.createMenuItem(this.chartTranslationService.translate("chartEdit"),"chartsMenuEdit",i):null;case"chartAdvancedSettings":return this.createMenuItem(this.chartTranslationService.translate("chartAdvancedSettings"),"chartsMenuAdvancedSettings",()=>this.chartMenuService.openAdvancedSettings(t,n));case"chartUnlink":return t.chartController.isChartLinked()?this.createMenuItem(this.chartTranslationService.translate("chartUnlink"),"unlinked",()=>this.chartMenuService.toggleLinked(t)):null;case"chartLink":return t.chartController.isChartLinked()?null:this.createMenuItem(this.chartTranslationService.translate("chartLink"),"linked",()=>this.chartMenuService.toggleLinked(t));case"chartDownload":return this.createMenuItem(this.chartTranslationService.translate("chartDownload"),"save",()=>this.chartMenuService.downloadChart(t))}return null}createMenuItem(e,t,i){return{name:e,icon:qi._.createIconNoSpan(t,this.gos,null),action:i}}destroy(){this.destroyBean(this.activeChartMenuList),super.destroy()}};fn([(0,qi.Autowired)("popupService")],Fa.prototype,"popupService",2),fn([(0,qi.Autowired)("chartMenuService")],Fa.prototype,"chartMenuService",2),fn([(0,qi.Autowired)("chartTranslationService")],Fa.prototype,"chartTranslationService",2),Fa=fn([(0,qi.Bean)("chartMenuListFactory")],Fa);var Ga=class extends qi.Component{constructor(e){super('\n            <div ref="eChartsMenu" role="presentation" class="ag-menu ag-chart-menu-popup"></div>\n        '),this.menuItems=e}init(){this.mainMenuList=this.createManagedBean(new qi.AgMenuList(0)),this.mainMenuList.addMenuItems(this.menuItems),this.mainMenuList.addEventListener(qi.AgMenuItemComponent.EVENT_CLOSE_MENU,this.onHidePopup.bind(this)),this.eChartsMenu.appendChild(this.mainMenuList.getGui())}onHidePopup(){var e;null==(e=this.hidePopupFunc)||e.call(this)}afterGuiAttached({hidePopup:e}){e&&(this.hidePopupFunc=e,this.addDestroyFunc(e)),this.focusService.focusInto(this.mainMenuList.getGui())}};fn([(0,qi.Autowired)("focusService")],Ga.prototype,"focusService",2),fn([(0,qi.RefSelector)("eChartsMenu")],Ga.prototype,"eChartsMenu",2),fn([qi.PostConstruct],Ga.prototype,"init",1);var Va=class e extends Qi.Component{constructor(e){super(),this.chartMenuParamsFactory=e}init(){const t=this.chartMenuParamsFactory.addEnableParams("animation.enabled",{cssIdentifier:"charts-advanced-settings-top-level",direction:"vertical",suppressOpenCloseIcons:!0,title:this.chartTranslationService.translate("animation"),suppressEnabledCheckbox:!0,useToggle:!0}),i=this.chartMenuParamsFactory.getDefaultNumberInputParams("animation.duration","durationMillis",{min:0});this.setTemplate(e.TEMPLATE,{animationGroup:t,animationHeightInput:i})}};Va.TEMPLATE='<div>\n            <ag-group-component ref="animationGroup">\n                <ag-input-number-field ref="animationHeightInput"></ag-input>\n            </ag-group-component>\n        </div>',fn([(0,Qi.Autowired)("chartTranslationService")],Va.prototype,"chartTranslationService",2),fn([Qi.PostConstruct],Va.prototype,"init",1);var Ba=Va,Ha=class e extends Ji.Component{constructor(e){super(),this.chartMenuParamsFactory=e}init(){const t=this.chartMenuParamsFactory.addEnableParams("crosshair.enabled",{cssIdentifier:"charts-advanced-settings-top-level",direction:"vertical",suppressOpenCloseIcons:!0,title:this.chartTranslationService.translate("crosshair"),suppressEnabledCheckbox:!0,useToggle:!0}),i=this.chartMenuParamsFactory.getDefaultCheckboxParams("crosshair.label.enabled","crosshairLabel"),n=this.chartMenuParamsFactory.getDefaultCheckboxParams("crosshair.snap","crosshairSnap"),s=this.chartMenuParamsFactory.getDefaultColorPickerParams("crosshair.stroke","color");this.setTemplate(e.TEMPLATE,{crosshairGroup:t,crosshairLabelCheckbox:i,crosshairSnapCheckbox:n,crosshairStrokeColorPicker:s})}};Ha.TEMPLATE='<div>\n            <ag-group-component ref="crosshairGroup">\n                <ag-checkbox ref="crosshairLabelCheckbox"></ag-checkbox>\n                <ag-checkbox ref="crosshairSnapCheckbox"></ag-checkbox>\n                <ag-color-picker ref="crosshairStrokeColorPicker"></ag-color-picker>\n            </ag-group-component>\n        </div>',fn([(0,Ji.Autowired)("chartTranslationService")],Ha.prototype,"chartTranslationService",2),fn([Ji.PostConstruct],Ha.prototype,"init",1);var za=Ha,Ua=class e extends en.Component{constructor(e){super(),this.chartMenuParamsFactory=e}init(){const t=this.chartMenuParamsFactory.addEnableParams("navigator.enabled",{cssIdentifier:"charts-advanced-settings-top-level",direction:"vertical",suppressOpenCloseIcons:!0,title:this.chartTranslationService.translate("navigator"),suppressEnabledCheckbox:!0,useToggle:!0}),i=this.chartMenuParamsFactory.getDefaultSliderParams("navigator.height","height",60);i.minValue=10;const n=this.chartMenuParamsFactory.getDefaultCheckboxParams("navigator.miniChart.enabled","miniChart");this.setTemplate(e.TEMPLATE,{navigatorGroup:t,navigatorHeightSlider:i,navigatorMiniChartCheckbox:n})}};Ua.TEMPLATE='<div>\n            <ag-group-component ref="navigatorGroup">\n                <ag-slider ref="navigatorHeightSlider"></ag-slider>\n                <ag-checkbox ref="navigatorMiniChartCheckbox"></ag-checkbox>\n            </ag-group-component>\n        </div>',fn([(0,en.Autowired)("chartTranslationService")],Ua.prototype,"chartTranslationService",2),fn([en.PostConstruct],Ua.prototype,"init",1);var Wa=Ua,ja=class e extends tn.Component{constructor(e){super(),this.chartMenuParamsFactory=e}init(){const t=this.chartMenuParamsFactory.addEnableParams("zoom.enabled",{cssIdentifier:"charts-advanced-settings-top-level",direction:"vertical",suppressOpenCloseIcons:!0,title:this.chartTranslationService.translate("zoom"),suppressEnabledCheckbox:!0,useToggle:!0}),i=this.chartMenuParamsFactory.getDefaultCheckboxParams("zoom.enableScrolling","scrollingZoom"),n=this.chartMenuParamsFactory.getDefaultSliderParams("zoom.scrollingStep","scrollingStep",1);n.step=.01,n.minValue=n.step;const s=this.chartMenuParamsFactory.getDefaultCheckboxParams("zoom.enableSelecting","selectingZoom");i.onValueChange=(e=>t=>{e&&(e(t),this.zoomScrollingStepInput.setDisabled(!t))})(i.onValueChange),this.setTemplate(e.TEMPLATE,{zoomGroup:t,zoomScrollingCheckbox:i,zoomScrollingStepInput:n,zoomSelectingCheckbox:s}),this.zoomScrollingStepInput.setDisabled(!i.value)}};ja.TEMPLATE='<div>\n            <ag-group-component ref="zoomGroup">\n                <ag-checkbox ref="zoomSelectingCheckbox"></ag-checkbox>\n                <ag-checkbox ref="zoomScrollingCheckbox"></ag-checkbox>\n                <ag-slider ref="zoomScrollingStepInput"></ag-slider>\n            </ag-group-component>\n        </div>',fn([(0,tn.Autowired)("chartTranslationService")],ja.prototype,"chartTranslationService",2),fn([(0,tn.RefSelector)("zoomScrollingStepInput")],ja.prototype,"zoomScrollingStepInput",2),fn([tn.PostConstruct],ja.prototype,"init",1);var Ka=ja,$a=["navigator","zoom","animation","crosshair"],Ya=class e extends Zi.Component{constructor(t){super(e.TEMPLATE),this.chartMenuContext=t}postConstruct(){this.chartPanelFeature=this.createManagedBean(new gr(this.chartMenuContext.chartController,this.getGui(),"ag-chart-advanced-settings-section",(e,t)=>this.createPanels(e,t))),this.chartPanelFeature.refreshPanels()}createPanels(e,t){$a.forEach(e=>{if(!this.isGroupPanelShownForSeries(e,t))return;const i=this.createPanel(e);this.chartPanelFeature.addComponent(i)})}isGroupPanelShownForSeries(e,t){return"animation"===e||Mn(t)}createPanel(e){const{chartMenuParamsFactory:t,chartAxisMenuParamsFactory:i}=this.chartMenuContext;switch(e){case"navigator":return new Wa(t);case"zoom":return new Ka(t);case"animation":return new Ba(t);case"crosshair":return new za(i)}}};Ya.TEMPLATE='<div class="ag-chart-advanced-settings-wrapper"></div>',fn([Zi.PostConstruct],Ya.prototype,"postConstruct",1);var qa=Ya,Xa=class extends Xi.BeanStub{showMenu(e,t){this.hideMenu();const i=this.createBean(new Qa(e));this.activeDialog=this.createBean(new Xi.AgDialog({title:this.chartTranslationService.translate("advancedSettings"),component:i,width:300,height:400,resizable:!0,movable:!0,centered:!0,closable:!0,afterGuiAttached:()=>{var e;null==(e=this.focusService.findFocusableElements(i.getGui())[0])||e.focus()},closedCallback:()=>{this.activeMenu=this.destroyBean(this.activeMenu),this.activeDialog=void 0,null==t||t.focus({preventScroll:!0})}})),this.activeMenu=i}hideMenu(){this.activeDialog&&this.destroyBean(this.activeDialog)}destroy(){this.activeMenu=this.destroyBean(this.activeMenu),this.activeDialog=this.destroyBean(this.activeDialog),super.destroy()}};fn([(0,Xi.Autowired)("focusService")],Xa.prototype,"focusService",2),fn([(0,Xi.Autowired)("chartTranslationService")],Xa.prototype,"chartTranslationService",2),Xa=fn([(0,Xi.Bean)("advancedSettingsMenuFactory")],Xa);var Za=class e extends Xi.TabGuardComp{constructor(t){super(e.TEMPLATE),this.chartMenuContext=t}postConstruct(){this.advancedSettingsPanel=this.createManagedBean(new qa(this.chartMenuContext)),this.getGui().appendChild(this.advancedSettingsPanel.getGui()),this.initialiseTabGuard({onTabKeyDown:this.onTabKeyDown.bind(this),focusTrapActive:!0})}onTabKeyDown(e){if(e.defaultPrevented)return;e.preventDefault();const t=e.shiftKey,i=this.advancedSettingsPanel.getGui(),n=this.focusService.findNextFocusableElement(i,!1,t);if(n)n.focus();else{const e=this.focusService.findFocusableElements(i);e.length&&e[t?e.length-1:0].focus()}}};Za.TEMPLATE='<div class="ag-chart-advanced-settings"></div>',fn([(0,Xi.Autowired)("focusService")],Za.prototype,"focusService",2),fn([Xi.PostConstruct],Za.prototype,"postConstruct",1);var Qa=Za,Ja={version:oa,validate:()=>function({gridVersion:e,chartsVersion:t}){if(!Oa(t))return{isValid:!1,message:_a({type:"invalidCharts",gridVersion:e,chartsVersion:t})};if(!Oa(e))return{isValid:!1,message:_a({type:"invalidGrid",gridVersion:e,chartsVersion:t})};const[i,n]=e.split(".")||[],[s,r,o]=t.split(".")||[],a=function({gridMajorVersion:e,chartsMajorVersion:t}){const i=parseInt(e,10)-28;return i===parseInt(t,10)-6&&i>=0}({gridMajorVersion:i,chartsMajorVersion:s});return a&&n===r||o.includes("beta")?{isValid:!0}:a&&n===r?{isValid:!1,message:_a({type:"invalid",gridVersion:e,chartsVersion:t})}:{isValid:!1,message:_a({type:"incompatible",gridVersion:e,chartsVersion:t})}}({gridVersion:oa,chartsVersion:ka.CHARTS_VERSION}),moduleName:Ve.ModuleNames.GridChartsModule,beans:[ka,Pa,Na,Fa,Jo,Xa],agStackComponents:[{componentName:"AgColorPicker",componentClass:Zs},{componentName:"AgAngleSelect",componentClass:Ls},{componentName:"AgPillSelect",componentClass:as}],dependantModules:[dt,D]},el=0,tl={time:nn.time,AgChart:nn.AgChart},il=i(98092),nl=i(98092),sl=i(98092),rl=Object.defineProperty,ol=Object.getOwnPropertyDescriptor,al=(e,t,i,n)=>{for(var s,r=n>1?void 0:n?ol(t,i):t,o=e.length-1;o>=0;o--)(s=e[o])&&(r=(n?s(t,i,r):s(r))||r);return n&&r&&rl(t,i,r),r},ll="paste",cl="dragCopy",hl="clipboard",dl=e=>`AG Grid: Unable to use the Clipboard API (navigator.clipboard.${e}()). The reason why it could not be used has been logged in the previous line. For this reason the grid has defaulted to using a workaround which doesn't perform as well. Either fix why Clipboard API is blocked, OR stop this message from appearing by setting grid property suppressClipboardApi=true (which will default the grid to using the workaround rather than the API.`,ul=class extends sl.BeanStub{constructor(){super(...arguments),this.lastPasteOperationTime=0,this.navigatorApiFailed=!1}init(){this.logger=this.loggerFactory.create("ClipboardService"),"clientSide"===this.rowModel.getType()&&(this.clientSideRowModel=this.rowModel),this.ctrlsService.whenReady(e=>{this.gridCtrl=e.gridCtrl})}pasteFromClipboard(){this.logger.log("pasteFromClipboard"),!this.gos.get("suppressClipboardApi")&&!this.navigatorApiFailed&&navigator.clipboard&&navigator.clipboard.readText?navigator.clipboard.readText().then(this.processClipboardData.bind(this)).catch(e=>{sl._.doOnce(()=>{console.warn(e),console.warn(dl("readText"))},"clipboardApiError"),this.navigatorApiFailed=!0,this.pasteFromClipboardLegacy()}):this.pasteFromClipboardLegacy()}pasteFromClipboardLegacy(){let e=!1;const t=t=>{const i=(new Date).getTime();i-this.lastPasteOperationTime<50&&(e=!0,t.preventDefault()),this.lastPasteOperationTime=i};this.executeOnTempElement(e=>{e.addEventListener("paste",t),e.focus({preventScroll:!0})},i=>{const n=i.value;e?this.refocusLastFocusedCell():this.processClipboardData(n),i.removeEventListener("paste",t)})}refocusLastFocusedCell(){const e=this.focusService.getFocusedCell();e&&this.focusService.setFocusedCell({rowIndex:e.rowIndex,column:e.column,rowPinned:e.rowPinned,forceBrowserFocus:!0})}getClipboardDelimiter(){const e=this.gos.get("clipboardDelimiter");return sl._.exists(e)?e:"\t"}processClipboardData(e){if(null==e)return;let t=ul.stringToArray(e,this.getClipboardDelimiter());const i=this.gos.getCallback("processDataFromClipboard");i&&(t=i({data:t})),null!=t&&(this.gos.get("suppressLastEmptyLineOnPaste")&&this.removeLastLineIfBlank(t),this.doPasteOperation((e,i,n,s)=>{var r;(null==(r=this.rangeService)?void 0:r.isMoreThanOneCell())&&!this.hasOnlyOneValueToPaste(t)?this.pasteIntoActiveRange(this.rangeService,t,e,i,s):this.pasteStartingFromFocusedCell(t,e,i,n,s)}))}static stringToArray(e,t=","){const i=[],n=e=>"\r"===e||"\n"===e;let s=!1;if(""===e)return[[""]];for(let r=0,o=0,a=0;a<e.length;a++){const l=e[a-1],c=e[a],h=e[a+1],d=()=>{i[r]||(i[r]=[]),i[r][o]||(i[r][o]="")};if(d(),'"'===c&&(s?'"'===h?(i[r][o]+='"',a++):s=!1:(void 0===l||l===t||n(l))&&(s=!0)),!s&&'"'!==c){if(c===t){o++,d();continue}if(n(c)){o=0,r++,d(),"\r"===c&&"\n"===h&&a++;continue}}i[r][o]+=c}return i}doPasteOperation(e){const t="clipboard";let i;if(this.eventService.dispatchEvent({type:sl.Events.EVENT_PASTE_START,source:t}),this.clientSideRowModel){const e=this.gos.get("aggregateOnlyChangedColumns");i=new sl.ChangedPath(e,this.clientSideRowModel.getRootNode())}const n={},s=[];e(n,s,this.focusService.getFocusedCell(),i);const r=[...s];i&&(this.clientSideRowModel.doAggregate(i),i.forEachChangedNodeDepthFirst(e=>{r.push(e)})),this.rowRenderer.refreshCells({rowNodes:r}),this.dispatchFlashCells(n),this.fireRowChanged(s),this.refocusLastFocusedCell();const o={type:sl.Events.EVENT_PASTE_END,source:t};this.eventService.dispatchEvent(o)}pasteIntoActiveRange(e,t,i,n,s){const r=this.getRangeSize(e)%t.length!=0;let o=0,a=0;this.iterateActiveRanges(!1,(e,l,c,h)=>{if(h-o>=t.length){if(r)return;o+=a,a=0}const d=t[h-o];n.push(l);const u=this.gos.getCallback("processCellFromClipboard");c.forEach((t,n)=>{if(!t.isCellEditable(l)||t.isSuppressPaste(l))return;n>=d.length&&(n%=d.length);const r=this.processCell(l,t,d[n],cl,u,!0);l.setDataValue(t,r,ll),s&&s.addParentNode(l.parent,[t]);const{rowIndex:o,rowPinned:a}=e,c=this.cellPositionUtils.createIdFromValues({rowIndex:o,column:t,rowPinned:a});i[c]=!0}),a++})}getDisplayedColumnsStartingAt(e){let t=e;const i=[];for(;null!=t;)i.push(t),t=this.columnModel.getDisplayedColAfter(t);return i}pasteStartingFromFocusedCell(e,t,i,n,s){if(!n)return;const r={rowIndex:n.rowIndex,rowPinned:n.rowPinned},o=this.getDisplayedColumnsStartingAt(n.column);this.isPasteSingleValueIntoRange(e)?this.pasteSingleValueIntoRange(e,i,t,s):this.pasteMultipleValues(e,r,i,o,t,hl,s)}isPasteSingleValueIntoRange(e){return this.hasOnlyOneValueToPaste(e)&&null!=this.rangeService&&!this.rangeService.isEmpty()}pasteSingleValueIntoRange(e,t,i,n){const s=e[0][0];this.iterateActiveRanges(!1,(e,r,o)=>{t.push(r),o.forEach(e=>this.updateCellValue(r,e,s,i,hl,n))})}hasOnlyOneValueToPaste(e){return 1===e.length&&1===e[0].length}copyRangeDown(){if(!this.rangeService||this.rangeService.isEmpty())return;const e=[];this.doPasteOperation((t,i,n,s)=>{const r=this.gos.getCallback("processCellForClipboard"),o=this.gos.getCallback("processCellFromClipboard");this.iterateActiveRanges(!0,(n,a,l)=>{e.length?(i.push(a),l.forEach((i,r)=>{if(!i.isCellEditable(a)||i.isSuppressPaste(a))return;const l=this.processCell(a,i,e[r],cl,o,!0);a.setDataValue(i,l,ll),s&&s.addParentNode(a.parent,[i]);const{rowIndex:c,rowPinned:h}=n,d=this.cellPositionUtils.createIdFromValues({rowIndex:c,column:i,rowPinned:h});t[d]=!0})):l.forEach(t=>{const i=this.processCell(a,t,this.valueService.getValue(t,a),cl,r,!1,!0);e.push(i)})})})}removeLastLineIfBlank(e){const t=sl._.last(e);if(t&&1===t.length&&""===t[0]){if(1===e.length)return;sl._.removeFromArray(e,t)}}fireRowChanged(e){"fullRow"===this.gos.get("editType")&&e.forEach(e=>{const t={type:sl.Events.EVENT_ROW_VALUE_CHANGED,node:e,data:e.data,rowIndex:e.rowIndex,rowPinned:e.rowPinned};this.eventService.dispatchEvent(t)})}pasteMultipleValues(e,t,i,n,s,r,o){let a=t;const l=null!=this.clientSideRowModel&&!this.gos.get("enableGroupEdit")&&!this.gos.get("treeData"),c=()=>{for(;;){if(!a)return null;const e=this.rowPositionUtils.getRowNode(a);if(a=this.cellNavigationService.getRowBelow({rowPinned:a.rowPinned,rowIndex:a.rowIndex}),null==e)return null;if(!(e.detail||e.footer||l&&e.group))return e}};e.forEach(e=>{const t=c();t&&(e.forEach((e,i)=>this.updateCellValue(t,n[i],e,s,r,o)),i.push(t))})}updateCellValue(e,t,i,n,s,r){if(!e||!t||!t.isCellEditable(e)||t.isSuppressPaste(e))return;if(e.group&&t.isValueActive())return;const o=this.processCell(e,t,i,s,this.gos.getCallback("processCellFromClipboard"),!0);e.setDataValue(t,o,ll);const{rowIndex:a,rowPinned:l}=e;n[this.cellPositionUtils.createIdFromValues({rowIndex:a,column:t,rowPinned:l})]=!0,r&&r.addParentNode(e.parent,[t])}copyToClipboard(e={}){this.copyOrCutToClipboard(e)}cutToClipboard(e={},t="api"){if(this.gos.get("suppressCutToClipboard"))return;const i={type:sl.Events.EVENT_CUT_START,source:t};this.eventService.dispatchEvent(i),this.copyOrCutToClipboard(e,!0);const n={type:sl.Events.EVENT_CUT_END,source:t};this.eventService.dispatchEvent(n)}copyOrCutToClipboard(e,t){let{includeHeaders:i,includeGroupHeaders:n}=e;this.logger.log(`copyToClipboard: includeHeaders = ${i}`),null==i&&(i=this.gos.get("copyHeadersToClipboard")),null==n&&(n=this.gos.get("copyGroupHeadersToClipboard"));const s={includeHeaders:i,includeGroupHeaders:n},r=!this.gos.get("suppressCopyRowsToClipboard");let o=null;!this.rangeService||this.rangeService.isEmpty()||this.shouldSkipSingleCellRange(this.rangeService)?r&&!this.selectionService.isEmpty()?(this.copySelectedRowsToClipboard(s),o=1):this.focusService.isAnyCellFocused()&&(this.copyFocusedCellToClipboard(s),o=2):(this.copySelectedRangeToClipboard(s),o=0),t&&null!==o&&this.clearCellsAfterCopy(o)}clearCellsAfterCopy(e){if(this.eventService.dispatchEvent({type:sl.Events.EVENT_KEY_SHORTCUT_CHANGED_CELL_START}),0===e)this.rangeService.clearCellRangeCellValues({cellEventSource:"clipboardService"});else if(1===e)this.clearSelectedRows();else{const e=this.focusService.getFocusedCell();if(null==e)return;const t=this.rowPositionUtils.getRowNode(e);t&&this.clearCellValue(t,e.column)}this.eventService.dispatchEvent({type:sl.Events.EVENT_KEY_SHORTCUT_CHANGED_CELL_END})}clearSelectedRows(){const e=this.selectionService.getSelectedNodes(),t=this.columnModel.getAllDisplayedColumns();for(const i of e)for(const e of t)this.clearCellValue(i,e)}clearCellValue(e,t){var i;if(!t.isCellEditable(e))return;const n=null!=(i=this.valueService.parseValue(t,e,"",e.getValueFromValueService(t)))?i:null;e.setDataValue(t,n,"clipboardService")}shouldSkipSingleCellRange(e){return this.gos.get("suppressCopySingleCellRanges")&&!e.isMoreThanOneCell()}iterateActiveRanges(e,t,i){if(!this.rangeService||this.rangeService.isEmpty())return;const n=this.rangeService.getCellRanges();e?this.iterateActiveRange(n[0],t,i,!0):n.forEach((e,s)=>this.iterateActiveRange(e,t,i,s===n.length-1))}iterateActiveRange(e,t,i,n){if(!this.rangeService)return;let s=this.rangeService.getRangeStartRow(e);const r=this.rangeService.getRangeEndRow(e);i&&e.columns&&i(e.columns);let o=0,a=!1;for(;!a&&null!=s;){const i=this.rowPositionUtils.getRowNode(s);a=this.rowPositionUtils.sameRow(s,r),t(s,i,e.columns,o++,a&&n),s=this.cellNavigationService.getRowBelow(s)}}copySelectedRangeToClipboard(e={}){if(!this.rangeService||this.rangeService.isEmpty())return;const t=this.rangeService.areAllRangesAbleToMerge(),{data:i,cellsToFlash:n}=t?this.buildDataFromMergedRanges(this.rangeService,e):this.buildDataFromRanges(this.rangeService,e);this.copyDataToClipboard(i),this.dispatchFlashCells(n)}buildDataFromMergedRanges(e,t){const i=new Set,n=e.getCellRanges(),s=new Map,r=[],o={};n.forEach(t=>{t.columns.forEach(e=>i.add(e));const{rowPositions:n,cellsToFlash:a}=this.getRangeRowPositionsAndCellsToFlash(e,t);n.forEach(e=>{const t=`${e.rowIndex}-${e.rowPinned||"null"}`;s.get(t)||(s.set(t,!0),r.push(e))}),Object.assign(o,a)});const a=this.columnModel.getAllDisplayedColumns(),l=Array.from(i);return l.sort((e,t)=>a.indexOf(e)-a.indexOf(t)),{data:this.buildExportParams({columns:l,rowPositions:r,includeHeaders:t.includeHeaders,includeGroupHeaders:t.includeGroupHeaders}),cellsToFlash:o}}buildDataFromRanges(e,t){const i=e.getCellRanges(),n=[],s={};return i.forEach(i=>{const{rowPositions:r,cellsToFlash:o}=this.getRangeRowPositionsAndCellsToFlash(e,i);Object.assign(s,o),n.push(this.buildExportParams({columns:i.columns,rowPositions:r,includeHeaders:t.includeHeaders,includeGroupHeaders:t.includeGroupHeaders}))}),{data:n.join("\n"),cellsToFlash:s}}getRangeRowPositionsAndCellsToFlash(e,t){const i=[],n={},s=e.getRangeStartRow(t),r=e.getRangeEndRow(t);let o=s;for(;o&&(i.push(o),t.columns.forEach(e=>{const{rowIndex:t,rowPinned:i}=o,s=this.cellPositionUtils.createIdFromValues({rowIndex:t,column:e,rowPinned:i});n[s]=!0}),!this.rowPositionUtils.sameRow(o,r));)o=this.cellNavigationService.getRowBelow(o);return{rowPositions:i,cellsToFlash:n}}getCellsToFlashFromRowNodes(e){const t=this.columnModel.getAllDisplayedColumns(),i={};for(let n=0;n<e.length;n++){const{rowIndex:s,rowPinned:r}=e[n];if(null!=s)for(let e=0;e<t.length;e++){const n=t[e];i[this.cellPositionUtils.createIdFromValues({rowIndex:s,column:n,rowPinned:r})]=!0}}return i}copyFocusedCellToClipboard(e={}){const t=this.focusService.getFocusedCell();if(null==t)return;const i=this.cellPositionUtils.createId(t),n={rowPinned:t.rowPinned,rowIndex:t.rowIndex},s=t.column,r=this.buildExportParams({columns:[s],rowPositions:[n],includeHeaders:e.includeHeaders,includeGroupHeaders:e.includeGroupHeaders});this.copyDataToClipboard(r),this.dispatchFlashCells({[i]:!0})}copySelectedRowsToClipboard(e={}){const{columnKeys:t,includeHeaders:i,includeGroupHeaders:n}=e,s=this.buildExportParams({columns:t,includeHeaders:i,includeGroupHeaders:n});this.copyDataToClipboard(s);const r=this.selectionService.getSelectedNodes()||[];this.dispatchFlashCells(this.getCellsToFlashFromRowNodes(r))}buildExportParams(e){const{columns:t,rowPositions:i,includeHeaders:n=!1,includeGroupHeaders:s=!1}=e,r={columnKeys:t,rowPositions:i,skipColumnHeaders:!n,skipColumnGroupHeaders:!s,suppressQuotes:!0,columnSeparator:this.getClipboardDelimiter(),onlySelected:!i,processCellCallback:this.gos.getCallback("processCellForClipboard"),processRowGroupCallback:e=>this.processRowGroupCallback(e),processHeaderCallback:this.gos.getCallback("processHeaderForClipboard"),processGroupHeaderCallback:this.gos.getCallback("processGroupHeaderForClipboard")};return this.csvCreator.getDataAsCsv(r,!0)}processRowGroupCallback(e){const{node:t,column:i}=e,n=this.gos.get("treeData"),s=this.gos.get("suppressGroupMaintainValueType");let r=(()=>{var e,r;if(n||s||!i)return t.key;const o=null==(e=t.groupData)?void 0:e[i.getId()];return o&&t.rowGroupColumn&&!1!==t.rowGroupColumn.getColDef().useValueFormatterForExport&&null!=(r=this.valueService.formatValue(t.rowGroupColumn,t,o))?r:o})();if(e.node.footer){let e="";r&&r.length&&(e=` ${r}`),r=`Total${e}`}const o=this.gos.getCallback("processCellForClipboard");if(o){let e=t.rowGroupColumn;return!e&&t.footer&&-1===t.level&&(e=this.columnModel.getRowGroupColumns()[0]),o({value:r,node:t,column:e,type:"clipboard",formatValue:i=>{var n;return null!=(n=this.valueService.formatValue(e,t,i))?n:i},parseValue:i=>this.valueService.parseValue(e,t,i,this.valueService.getValue(e,t))})}return r}dispatchFlashCells(e){window.setTimeout(()=>{const t={type:sl.Events.EVENT_FLASH_CELLS,cells:e};this.eventService.dispatchEvent(t)},0)}processCell(e,t,i,n,s,r,o){var a;return s?s({column:t,node:e,value:i,type:n,formatValue:i=>{var n;return null!=(n=this.valueService.formatValue(t,null!=e?e:null,i))?n:i},parseValue:i=>this.valueService.parseValue(t,null!=e?e:null,i,this.valueService.getValue(t,e))}):r&&!1!==t.getColDef().useValueParserForImport?this.valueService.parseValue(t,null!=e?e:null,i,this.valueService.getValue(t,e)):o&&!1!==t.getColDef().useValueFormatterForExport&&null!=(a=this.valueService.formatValue(t,null!=e?e:null,i))?a:i}copyDataToClipboard(e){const t=this.gos.getCallback("sendToClipboard");t?t({data:e}):!this.gos.get("suppressClipboardApi")&&navigator.clipboard?navigator.clipboard.writeText(e).catch(t=>{sl._.doOnce(()=>{console.warn(t),console.warn(dl("writeText"))},"clipboardApiError"),this.copyDataToClipboardLegacy(e)}):this.copyDataToClipboardLegacy(e)}copyDataToClipboardLegacy(e){this.executeOnTempElement(t=>{const i=this.gos.getDocument(),n=this.gos.getActiveDomElement();t.value=e||" ",t.select(),t.focus({preventScroll:!0}),i.execCommand("copy")||console.warn("AG Grid: Browser did not allow document.execCommand('copy'). Ensure api.copySelectedRowsToClipboard() is invoked via a user event, i.e. button click, otherwise the browser will prevent it for security reasons."),null!=n&&null!=n.focus&&n.focus({preventScroll:!0})})}executeOnTempElement(e,t){const i=this.gos.getDocument(),n=i.createElement("textarea");n.style.width="1px",n.style.height="1px",n.style.top=i.documentElement.scrollTop+"px",n.style.left=i.documentElement.scrollLeft+"px",n.style.position="absolute",n.style.opacity="0";const s=this.gridCtrl.getGui();s.appendChild(n);try{e(n)}catch(e){console.warn("AG Grid: Browser does not support document.execCommand('copy') for clipboard operations")}t?window.setTimeout(()=>{t(n),s.removeChild(n)},100):s.removeChild(n)}getRangeSize(e){const t=e.getCellRanges();let i=0,n=0;return t.length>0&&(i=e.getRangeStartRow(t[0]).rowIndex,n=e.getRangeEndRow(t[0]).rowIndex),i-n+1}};al([(0,sl.Autowired)("csvCreator")],ul.prototype,"csvCreator",2),al([(0,sl.Autowired)("loggerFactory")],ul.prototype,"loggerFactory",2),al([(0,sl.Autowired)("selectionService")],ul.prototype,"selectionService",2),al([(0,sl.Autowired)("rowModel")],ul.prototype,"rowModel",2),al([(0,sl.Autowired)("ctrlsService")],ul.prototype,"ctrlsService",2),al([(0,sl.Autowired)("valueService")],ul.prototype,"valueService",2),al([(0,sl.Autowired)("focusService")],ul.prototype,"focusService",2),al([(0,sl.Autowired)("rowRenderer")],ul.prototype,"rowRenderer",2),al([(0,sl.Autowired)("columnModel")],ul.prototype,"columnModel",2),al([(0,sl.Autowired)("cellNavigationService")],ul.prototype,"cellNavigationService",2),al([(0,sl.Autowired)("cellPositionUtils")],ul.prototype,"cellPositionUtils",2),al([(0,sl.Autowired)("rowPositionUtils")],ul.prototype,"rowPositionUtils",2),al([(0,sl.Optional)("rangeService")],ul.prototype,"rangeService",2),al([sl.PostConstruct],ul.prototype,"init",1),ul=al([(0,sl.Bean)("clipboardService")],ul);var pl={version:"31.3.4",moduleName:il.ModuleNames.ClipboardModule,beans:[ul],dependantModules:[D,nl.CsvExportModule]},gl=i(98092),fl=i(98092),ml=i(98092),vl=i(98092),yl=i(98092),Cl=i(98092),bl=i(98092),Sl=i(98092),wl=i(98092),xl=i(98092),El=i(98092),Ml=i(98092),Al=i(98092),Tl=i(98092),Dl=i(98092),Il=i(98092),Rl=i(98092),Ll=i(98092),kl=i(98092),Pl=i(98092),Nl=i(98092),Ol=i(98092),_l=i(98092),Fl=i(98092),Gl=i(98092),Vl=Object.defineProperty,Bl=Object.defineProperties,Hl=Object.getOwnPropertyDescriptor,zl=Object.getOwnPropertyDescriptors,Ul=Object.getOwnPropertySymbols,Wl=Object.prototype.hasOwnProperty,jl=Object.prototype.propertyIsEnumerable,Kl=(e,t,i)=>t in e?Vl(e,t,{enumerable:!0,configurable:!0,writable:!0,value:i}):e[t]=i,$l=(e,t,i,n)=>{for(var s,r=n>1?void 0:n?Hl(t,i):t,o=e.length-1;o>=0;o--)(s=e[o])&&(r=(n?s(t,i,r):s(r))||r);return n&&r&&Vl(t,i,r),r},Yl=class extends Ml.BeanStub{execute(e){const t=Ml._.missingOrEmpty(this.columnModel.getValueColumns()),i=!this.gos.getCallback("getGroupRowAgg"),n=e.changedPath&&e.changedPath.isActive();if(t&&i&&n)return;const s=this.createAggDetails(e);this.recursivelyCreateAggData(s)}createAggDetails(e){const t=this.columnModel.isPivotActive(),i=this.columnModel.getValueColumns(),n=t?this.columnModel.getPivotColumns():[];return{alwaysAggregateAtRootLevel:this.gos.get("alwaysAggregateAtRootLevel"),groupIncludeTotalFooter:!!this.gos.getGrandTotalRow(),changedPath:e.changedPath,valueColumns:i,pivotColumns:n,filteredOnly:!this.isSuppressAggFilteredOnly(),userAggFunc:this.gos.getCallback("getGroupRowAgg")}}isSuppressAggFilteredOnly(){return void 0!==this.gos.getGroupAggFiltering()||this.gos.get("suppressAggFilteredOnly")}recursivelyCreateAggData(e){e.changedPath.forEachChangedNodeDepthFirst(t=>{if(t.hasChildren()){if(-1===t.level&&!e.groupIncludeTotalFooter){const i=!this.columnModel.isPivotMode();if(!e.alwaysAggregateAtRootLevel&&i)return void t.setAggData(null)}this.aggregateRowNode(t,e)}else t.aggData&&t.setAggData(null)},!0)}aggregateRowNode(e,t){const i=0===t.valueColumns.length,n=0===t.pivotColumns.length;let s;s=t.userAggFunc?t.userAggFunc({nodes:e.childrenAfterFilter}):i?null:n?this.aggregateRowNodeUsingValuesOnly(e,t):this.aggregateRowNodeUsingValuesAndPivot(e),e.setAggData(s),e.sibling&&e.sibling.setAggData(s)}aggregateRowNodeUsingValuesAndPivot(e){var t,i;const n={},s=null!=(t=this.columnModel.getSecondaryColumns())?t:[];let r=!0;for(let t=0;t<s.length;t++){const o=s[t],a=o.getColDef();if(null!=a.pivotTotalColumnIds){r=!1;continue}const l=null!=(i=a.pivotKeys)?i:[];let c;c=e.leafGroup?this.getValuesFromMappedSet(e.childrenMapped,l,a.pivotValueColumn):this.getValuesPivotNonLeaf(e,a.colId),n[a.colId]=this.aggregateValues(c,a.pivotValueColumn.getAggFunc(),a.pivotValueColumn,e,o)}if(!r)for(let t=0;t<s.length;t++){const i=s[t],r=i.getColDef();if(null==r.pivotTotalColumnIds||!r.pivotTotalColumnIds.length)continue;const o=r.pivotTotalColumnIds.map(e=>n[e]);n[r.colId]=this.aggregateValues(o,r.pivotValueColumn.getAggFunc(),r.pivotValueColumn,e,i)}return n}aggregateRowNodeUsingValuesOnly(e,t){const i={},n=t.changedPath.isActive()?t.changedPath.getValueColumnsForNode(e,t.valueColumns):t.valueColumns,s=t.changedPath.isActive()?t.changedPath.getNotValueColumnsForNode(e,t.valueColumns):null,r=this.getValuesNormal(e,n,t.filteredOnly),o=e.aggData;return n.forEach((t,n)=>{i[t.getId()]=this.aggregateValues(r[n],t.getAggFunc(),t,e)}),s&&o&&s.forEach(e=>{i[e.getId()]=o[e.getId()]}),i}getValuesPivotNonLeaf(e,t){return e.childrenAfterFilter.map(e=>e.aggData[t])}getValuesFromMappedSet(e,t,i){let n=e;for(let e=0;e<t.length;e++){const i=t[e];n=n?n[i]:null}return n?n.map(e=>this.valueService.getValue(i,e)):[]}getValuesNormal(e,t,i){const n=[];t.forEach(()=>n.push([]));const s=t.length,r=i?e.childrenAfterFilter:e.childrenAfterGroup,o=r.length;for(let e=0;e<o;e++){const i=r[e];for(let e=0;e<s;e++){const s=t[e],r=this.valueService.getValue(s,i);n[e].push(r)}}return n}aggregateValues(e,t,i,n,s){const r="string"==typeof t?this.aggFuncService.getAggFunc(t):t;return"function"!=typeof r?(console.error(`AG Grid: unrecognised aggregation function ${t}`),null):r(this.gos.addGridCommonParams({values:e,column:i,colDef:i?i.getColDef():void 0,pivotResultColumn:s,rowNode:n,data:n?n.data:void 0}))}};$l([(0,Ml.Autowired)("columnModel")],Yl.prototype,"columnModel",2),$l([(0,Ml.Autowired)("valueService")],Yl.prototype,"valueService",2),$l([(0,Ml.Autowired)("aggFuncService")],Yl.prototype,"aggFuncService",2),Yl=$l([(0,Ml.Bean)("aggregationStage")],Yl);var ql=class{constructor(){this.allSets={},this.allParents=[]}removeFromChildrenAfterGroup(e,t){this.getSet(e).removeFromChildrenAfterGroup[t.id]=!0}isRemoveFromAllLeafChildren(e,t){return!!this.getSet(e).removeFromAllLeafChildren[t.id]}preventRemoveFromAllLeafChildren(e,t){delete this.getSet(e).removeFromAllLeafChildren[t.id]}removeFromAllLeafChildren(e,t){this.getSet(e).removeFromAllLeafChildren[t.id]=!0}getSet(e){return this.allSets[e.id]||(this.allSets[e.id]={removeFromAllLeafChildren:{},removeFromChildrenAfterGroup:{}},this.allParents.push(e)),this.allSets[e.id]}getAllParents(){return this.allParents}flush(){this.allParents.forEach(e=>{const t=this.allSets[e.id];e.childrenAfterGroup=e.childrenAfterGroup.filter(e=>!t.removeFromChildrenAfterGroup[e.id]),e.allLeafChildren=e.allLeafChildren.filter(e=>!t.removeFromAllLeafChildren[e.id]),e.updateHasChildren(),e.sibling&&(e.sibling.childrenAfterGroup=e.childrenAfterGroup,e.sibling.allLeafChildren=e.allLeafChildren)}),this.allSets={},this.allParents.length=0}},Xl=class extends Al.BeanStub{execute(e){const t=this.createGroupingDetails(e);if(t.transactions)this.handleTransaction(t);else{const i=!0===e.afterColumnsChanged;this.shotgunResetEverything(t,i)}t.usingTreeData||(this.positionLeafsAndGroups(e.changedPath),this.orderGroups(t)),this.selectableService.updateSelectableAfterGrouping()}positionLeafsAndGroups(e){e.forEachChangedNodeDepthFirst(e=>{if(e.childrenAfterGroup){const t=[],i=[];let n;e.childrenAfterGroup.forEach(e=>{var s;(null==(s=e.childrenAfterGroup)?void 0:s.length)?""!==e.key||n?i.push(e):n=e:t.push(e)}),n&&i.push(n),e.childrenAfterGroup=[...t,...i]}},!1)}createGroupingDetails(e){var t;const{rowNode:i,changedPath:n,rowNodeTransactions:s,rowNodeOrder:r}=e,o=this.gos.get("treeData"),a=o?null:this.columnModel.getRowGroupColumns();return{includeParents:!this.gos.get("suppressParentsInRowNodes"),expandByDefault:this.gos.get("groupDefaultExpanded"),groupedCols:a,rootNode:i,pivotMode:this.columnModel.isPivotMode(),groupedColCount:o||!a?0:a.length,rowNodeOrder:r,transactions:s,changedPath:n,groupAllowUnbalanced:this.gos.get("groupAllowUnbalanced"),isGroupOpenByDefault:this.gos.getCallback("isGroupOpenByDefault"),initialGroupOrderComparator:this.gos.getCallback("initialGroupOrderComparator"),usingTreeData:o,suppressGroupMaintainValueType:this.gos.get("suppressGroupMaintainValueType"),getDataPath:o?this.gos.get("getDataPath"):void 0,keyCreators:null!=(t=null==a?void 0:a.map(e=>e.getColDef().keyCreator))?t:[]}}handleTransaction(e){e.transactions.forEach(t=>{const i=e.usingTreeData?void 0:new ql;if(Al._.existsAndNotEmpty(t.remove)&&this.removeNodes(t.remove,e,i),Al._.existsAndNotEmpty(t.update)&&this.moveNodesInWrongPath(t.update,e,i),Al._.existsAndNotEmpty(t.add)&&this.insertNodes(t.add,e,!1),i){const t=i.getAllParents().slice();i.flush(),this.removeEmptyGroups(t,e)}}),e.rowNodeOrder&&this.sortChildren(e)}sortChildren(e){e.changedPath.forEachChangedNodeDepthFirst(t=>{t.childrenAfterGroup&&Al._.sortRowNodesByOrder(t.childrenAfterGroup,e.rowNodeOrder)&&e.changedPath.addParentNode(t)},!1,!0)}orderGroups(e){const t=e.initialGroupOrderComparator;Al._.exists(t)&&function e(i){Al._.exists(i.childrenAfterGroup)&&!i.leafGroup&&(i.childrenAfterGroup.sort((e,i)=>t({nodeA:e,nodeB:i})),i.childrenAfterGroup.forEach(t=>e(t)))}(e.rootNode)}getExistingPathForNode(e,t){const i=[];let n=t.usingTreeData?e:e.parent;for(;n&&n!==t.rootNode;)i.push({key:n.key,rowGroupColumn:n.rowGroupColumn,field:n.field}),n=n.parent;return i.reverse(),i}moveNodesInWrongPath(e,t,i){e.forEach(e=>{t.changedPath.isActive()&&t.changedPath.addParentNode(e.parent);const n=e=>e.key,s=this.getExistingPathForNode(e,t).map(n),r=this.getGroupInfo(e,t).map(n);Al._.areEqual(s,r)||this.moveNode(e,t,i)})}moveNode(e,t,i){if(this.removeNodesInStages([e],t,i),this.insertOneNode(e,t,!0,i),e.setData(e.data),t.changedPath.isActive()){const i=e.parent;t.changedPath.addParentNode(i)}}removeNodes(e,t,i){this.removeNodesInStages(e,t,i),t.changedPath.isActive()&&e.forEach(e=>t.changedPath.addParentNode(e.parent))}removeNodesInStages(e,t,i){if(this.removeNodesFromParents(e,t,i),t.usingTreeData){this.postRemoveCreateFillerNodes(e,t);const i=e.map(e=>e.parent);this.removeEmptyGroups(i,t)}}forEachParentGroup(e,t,i){let n=t;for(;n&&n!==e.rootNode;)i(n),n=n.parent}removeNodesFromParents(e,t,i){const n=null==i,s=i||new ql;e.forEach(e=>{this.removeFromParent(e,s),this.forEachParentGroup(t,e.parent,t=>{s.removeFromAllLeafChildren(t,e)})}),n&&s.flush()}postRemoveCreateFillerNodes(e,t){e.forEach(e=>{if(e.hasChildren()){const i=this.getExistingPathForNode(e,t),n=this.findParentForNode(e,i,t);n.expanded=e.expanded,n.allLeafChildren=e.allLeafChildren,n.childrenAfterGroup=e.childrenAfterGroup,n.childrenMapped=e.childrenMapped,n.updateHasChildren(),n.childrenAfterGroup.forEach(e=>e.parent=n)}})}removeEmptyGroups(e,t){let i=!0;const n=e=>{const t=this.getChildrenMappedKey(e.key,e.rowGroupColumn),i=e.parent;return!!(i&&i.childrenMapped&&i.childrenMapped[t]&&e.isEmptyRowGroupNode())};for(;i;){i=!1;const s=new ql;e.forEach(e=>{this.forEachParentGroup(t,e,e=>{n(e)&&(i=!0,this.removeFromParent(e,s),e.setSelectedParams({newValue:!1,source:"rowGroupChanged"}))})}),s.flush()}}removeFromParent(e,t){e.parent&&(t?t.removeFromChildrenAfterGroup(e.parent,e):(Al._.removeFromArray(e.parent.childrenAfterGroup,e),e.parent.updateHasChildren()));const i=this.getChildrenMappedKey(e.key,e.rowGroupColumn);e.parent&&e.parent.childrenMapped&&(e.parent.childrenMapped[i]=void 0),e.setRowTop(null),e.setRowIndex(null)}addToParent(e,t){const i=this.getChildrenMappedKey(e.key,e.rowGroupColumn);t&&(null!=t.childrenMapped&&(t.childrenMapped[i]=e),t.childrenAfterGroup.push(e),t.updateHasChildren())}areGroupColsEqual(e,t){return null!=e&&null!=t&&e.pivotMode===t.pivotMode&&Al._.areEqual(e.groupedCols,t.groupedCols)&&Al._.areEqual(e.keyCreators,t.keyCreators)}checkAllGroupDataAfterColsChanged(e){const t=i=>{i&&i.forEach(i=>{if(!e.usingTreeData&&!i.group)return;const n={field:i.field,key:i.key,rowGroupColumn:i.rowGroupColumn,leafNode:i.allLeafChildren[0]};this.setGroupData(i,n,e),t(i.childrenAfterGroup)})};t(e.rootNode.childrenAfterGroup)}shotgunResetEverything(e,t){if(this.noChangeInGroupingColumns(e,t))return;this.selectionService.filterFromSelection(e=>e&&!e.group);const{rootNode:i,groupedCols:n}=e;i.leafGroup=!e.usingTreeData&&0===n.length,i.childrenAfterGroup=[],i.childrenMapped={},i.updateHasChildren();const s=i.sibling;s&&(s.childrenAfterGroup=i.childrenAfterGroup,s.childrenMapped=i.childrenMapped),this.insertNodes(i.allLeafChildren,e,!1)}noChangeInGroupingColumns(e,t){let i=!1;const n=this.columnModel.getGroupDisplayColumns(),s=n?n.map(e=>e.getId()).join("-"):"";return t&&(i=e.usingTreeData||this.areGroupColsEqual(e,this.oldGroupingDetails),this.oldGroupDisplayColIds!==s&&this.checkAllGroupDataAfterColsChanged(e)),this.oldGroupingDetails=e,this.oldGroupDisplayColIds=s,i}insertNodes(e,t,i){e.forEach(e=>{this.insertOneNode(e,t,i),t.changedPath.isActive()&&t.changedPath.addParentNode(e.parent)})}insertOneNode(e,t,i,n){const s=this.getGroupInfo(e,t),r=this.findParentForNode(e,s,t,n);r.group||console.warn("AG Grid: duplicate group keys for row data, keys should be unique",[r.data,e.data]),t.usingTreeData?this.swapGroupWithUserNode(r,e,i):(e.parent=r,e.level=s.length,r.childrenAfterGroup.push(e),r.updateHasChildren())}findParentForNode(e,t,i,n){let s=i.rootNode;return t.forEach((t,r)=>{s=this.getOrCreateNextNode(s,t,r,i),(null==n?void 0:n.isRemoveFromAllLeafChildren(s,e))?null==n||n.preventRemoveFromAllLeafChildren(s,e):s.allLeafChildren.push(e)}),s}swapGroupWithUserNode(e,t,i){t.parent=e.parent,t.key=e.key,t.field=e.field,t.groupData=e.groupData,t.level=e.level,i||(t.expanded=e.expanded),t.leafGroup=e.leafGroup,t.rowGroupIndex=e.rowGroupIndex,t.allLeafChildren=e.allLeafChildren,t.childrenAfterGroup=e.childrenAfterGroup,t.childrenMapped=e.childrenMapped,t.sibling=e.sibling,t.updateHasChildren(),this.removeFromParent(e),t.childrenAfterGroup.forEach(e=>e.parent=t),this.addToParent(t,e.parent)}getOrCreateNextNode(e,t,i,n){const s=this.getChildrenMappedKey(t.key,t.rowGroupColumn);let r=e.childrenMapped?e.childrenMapped[s]:void 0;return r||(r=this.createGroup(t,e,i,n),this.addToParent(r,e)),r}createGroup(e,t,i,n){const s=new Al.RowNode(this.beans);return s.group=!0,s.field=e.field,s.rowGroupColumn=e.rowGroupColumn,this.setGroupData(s,e,n),s.key=e.key,s.id=this.createGroupId(s,t,n.usingTreeData,i),s.level=i,s.leafGroup=!n.usingTreeData&&i===n.groupedColCount-1,s.allLeafChildren=[],s.setAllChildrenCount(0),s.rowGroupIndex=n.usingTreeData?null:i,s.childrenAfterGroup=[],s.childrenMapped={},s.updateHasChildren(),s.parent=n.includeParents?t:null,this.setExpandedInitialValue(n,s),s}createGroupId(e,t,i,n){let s;return s=i?(e,t,i)=>{if(i<0)return null;const n=t?s(t,t.parent,i-1):null;return`${null==n?"":n+"-"}${i}-${e.key}`}:(e,t)=>{if(!e.rowGroupColumn)return null;const i=t?s(t,t.parent,0):null;return`${null==i?"":i+"-"}${e.rowGroupColumn.getColId()}-${e.key}`},Al.RowNode.ID_PREFIX_ROW_GROUP+s(e,t,n)}setGroupData(e,t,i){e.groupData={},this.columnModel.getGroupDisplayColumns().forEach(n=>{if(i.usingTreeData)return void(e.groupData[n.getColId()]=t.key);const s=e.rowGroupColumn;null!==s&&n.isRowGroupDisplayed(s.getId())&&(i.suppressGroupMaintainValueType?e.groupData[n.getColId()]=t.key:e.groupData[n.getColId()]=this.valueService.getValue(s,t.leafNode))})}getChildrenMappedKey(e,t){return t?t.getId()+"-"+e:e}setExpandedInitialValue(e,t){if(e.pivotMode&&t.leafGroup)return void(t.expanded=!1);const i=e.isGroupOpenByDefault;if(i){const e={rowNode:t,field:t.field,key:t.key,level:t.level,rowGroupColumn:t.rowGroupColumn};return void(t.expanded=1==i(e))}const{expandByDefault:n}=e;-1!==e.expandByDefault?t.expanded=t.level<n:t.expanded=!0}getGroupInfo(e,t){return t.usingTreeData?this.getGroupInfoFromCallback(e,t):this.getGroupInfoFromGroupColumns(e,t)}getGroupInfoFromCallback(e,t){const i=t.getDataPath?t.getDataPath(e.data):null;return null!=i&&0!==i.length||Al._.warnOnce(`getDataPath() should not return an empty path for data ${e.data}`),i?i.map(e=>({key:e,field:null,rowGroupColumn:null})):[]}getGroupInfoFromGroupColumns(e,t){const i=[];return t.groupedCols.forEach(n=>{let s=this.valueService.getKeyForNode(n,e),r=null!=s&&""!==s;if((t.pivotMode||!t.groupAllowUnbalanced)&&!r&&(s="",r=!0),r){const t={key:s,field:n.getColDef().field,rowGroupColumn:n,leafNode:e};i.push(t)}}),i}};$l([(0,Al.Autowired)("columnModel")],Xl.prototype,"columnModel",2),$l([(0,Al.Autowired)("selectableService")],Xl.prototype,"selectableService",2),$l([(0,Al.Autowired)("valueService")],Xl.prototype,"valueService",2),$l([(0,Al.Autowired)("beans")],Xl.prototype,"beans",2),$l([(0,Al.Autowired)("selectionService")],Xl.prototype,"selectionService",2),Xl=$l([(0,Al.Bean)("groupStage")],Xl);var Zl=class extends Tl.BeanStub{init(){const e=()=>{var e;return null!=(e=this.gos.get("serverSidePivotResultFieldSeparator"))?e:"_"};this.fieldSeparator=e(),this.addManagedPropertyListener("serverSidePivotResultFieldSeparator",()=>{this.fieldSeparator=e()});const t=()=>this.gos.get("pivotDefaultExpanded");this.pivotDefaultExpanded=t(),this.addManagedPropertyListener("pivotDefaultExpanded",()=>{this.pivotDefaultExpanded=t()})}createPivotColumnDefs(e){const t=this.createPivotColumnsFromUniqueValues(e),i=function e(t,i=[]){return t.forEach(t=>{void 0!==t.children?e(t.children,i):i.push(t)}),i}(t);return this.addRowGroupTotals(t,i),this.addExpandablePivotGroups(t,i),this.addPivotTotalsToGroups(t,i),{pivotColumnGroupDefs:t,pivotColumnDefs:i.map(e=>Tl._.cloneObject(e))}}createPivotColumnsFromUniqueValues(e){const t=this.columnModel.getPivotColumns(),i=t.length;return this.recursivelyBuildGroup(0,e,[],i,t)}recursivelyBuildGroup(e,t,i,n,s){const r=this.columnModel.getValueColumns();if(e>=n)return this.buildMeasureCols(i);const o=s[e].getColDef(),a=this.headerNameComparator.bind(this,o.pivotComparator);if(1===r.length&&this.gos.get("removePivotHeaderRowWhenSingleValueColumn")&&e===n-1){const e=[];return Tl._.iterateObject(t,t=>{const n=[...i,t],s=this.createColDef(r[0],t,n);s.columnGroupShow="open",e.push(s)}),e.sort(a),e}const l=[];return Tl._.iterateObject(t,(t,r)=>{const o=-1===this.pivotDefaultExpanded||e<this.pivotDefaultExpanded,a=[...i,t];l.push({children:this.recursivelyBuildGroup(e+1,r,a,n,s),headerName:t,pivotKeys:a,columnGroupShow:"open",openByDefault:o,groupId:this.generateColumnGroupId(a)})}),l.sort(a),l}buildMeasureCols(e){const t=this.columnModel.getValueColumns();return 0===t.length?[this.createColDef(null,"-",e)]:t.map(t=>{const i=this.columnModel.getDisplayNameForColumn(t,"header");return n=((e,t)=>{for(var i in t||(t={}))Wl.call(t,i)&&Kl(e,i,t[i]);if(Ul)for(var i of Ul(t))jl.call(t,i)&&Kl(e,i,t[i]);return e})({},this.createColDef(t,i,e)),Bl(n,zl({columnGroupShow:"open"}));var n})}addExpandablePivotGroups(e,t){if(this.gos.get("suppressExpandablePivotGroups")||this.gos.get("pivotColumnGroupTotals"))return;const i=(e,t,n)=>{const s=e;if(s.children){const r=new Map;s.children.forEach(e=>{i(e,t,r)});const o=!s.children.some(e=>e.children);this.columnModel.getValueColumns().forEach(i=>{const n=this.columnModel.getDisplayNameForColumn(i,"header"),s=this.createColDef(i,n,e.pivotKeys);s.pivotTotalColumnIds=r.get(i.getColId()),s.columnGroupShow="closed",s.aggFunc=i.getAggFunc(),o||(e.children.push(s),t.push(s))}),this.merge(n,r)}else{const t=e;if(!t.pivotValueColumn)return;const i=t.pivotValueColumn.getColId(),s=n.has(i)?n.get(i):[];s.push(t.colId),n.set(i,s)}};e.forEach(e=>{i(e,t,new Map)})}addPivotTotalsToGroups(e,t){if(!this.gos.get("pivotColumnGroupTotals"))return;const i="after"===this.gos.get("pivotColumnGroupTotals"),n=this.columnModel.getValueColumns(),s=n.map(e=>e.getAggFunc());if(!s||s.length<1||!this.sameAggFuncs(s))return;const r=n[0];e.forEach(e=>{this.recursivelyAddPivotTotal(e,t,r,i)})}recursivelyAddPivotTotal(e,t,i,n){const s=e;if(!s.children){const t=e;return t.colId?[t.colId]:null}let r=[];if(s.children.forEach(e=>{const s=this.recursivelyAddPivotTotal(e,t,i,n);s&&(r=r.concat(s))}),s.children.length>1){const s=this.localeService.getLocaleTextFunc()("pivotColumnGroupTotals","Total"),o=this.createColDef(i,s,e.pivotKeys,!0);o.pivotTotalColumnIds=r,o.aggFunc=i.getAggFunc();const a=e.children;n?a.push(o):a.unshift(o),t.push(o)}return r}addRowGroupTotals(e,t){if(!this.gos.get("pivotRowTotals"))return;const i="after"===this.gos.get("pivotRowTotals"),n=this.columnModel.getValueColumns(),s=i?n.slice():n.slice().reverse();for(let n=0;n<s.length;n++){const r=s[n];let o=[];e.forEach(e=>{o=o.concat(this.extractColIdsForValueColumn(e,r))});const a=s.length>1||!this.gos.get("removePivotHeaderRowWhenSingleValueColumn");this.createRowGroupTotal(e,t,r,o,i,a)}}extractColIdsForValueColumn(e,t){const i=e;if(!i.children){const e=i;return e.pivotValueColumn===t&&e.colId?[e.colId]:[]}let n=[];return i.children.forEach(e=>{this.extractColIdsForValueColumn(e,t);const i=this.extractColIdsForValueColumn(e,t);n=n.concat(i)}),n}createRowGroupTotal(e,t,i,n,s,r){let o;if(0===this.columnModel.getValueColumns().length)o=this.createColDef(null,"-",[]);else{const e=this.columnModel.getDisplayNameForColumn(i,"header");o=this.createColDef(i,e,[]),o.pivotTotalColumnIds=n}o.colId=Zl.PIVOT_ROW_TOTAL_PREFIX+o.colId,t.push(o);const a=r?{children:[o],pivotKeys:[],groupId:`${Zl.PIVOT_ROW_TOTAL_PREFIX}_pivotGroup_${i.getColId()}`}:o;s?e.push(a):e.unshift(a)}createColDef(e,t,i,n=!1){const s={};if(e){const t=e.getColDef();Object.assign(s,t),s.hide=!1}return s.headerName=t,s.colId=this.generateColumnId(i||[],e&&!n?e.getColId():""),s.field=s.colId,s.valueGetter=e=>{var t;return null==(t=e.data)?void 0:t[e.colDef.field]},s.pivotKeys=i,s.pivotValueColumn=e,!0===s.filter&&(s.filter="agNumberColumnFilter"),s}sameAggFuncs(e){if(1==e.length)return!0;for(let t=1;t<e.length;t++)if(e[t]!==e[0])return!1;return!0}headerNameComparator(e,t,i){return e?e(t.headerName,i.headerName):t.headerName&&!i.headerName?1:!t.headerName&&i.headerName?-1:t.headerName&&i.headerName?t.headerName<i.headerName?-1:t.headerName>i.headerName?1:0:0}merge(e,t){t.forEach((t,i,n)=>{const s=[...e.has(i)?e.get(i):[],...t];e.set(i,s)})}generateColumnGroupId(e){return`pivotGroup_${this.columnModel.getPivotColumns().map(e=>e.getColId()).join("-")}_${e.join("-")}`}generateColumnId(e,t){return`pivot_${this.columnModel.getPivotColumns().map(e=>e.getColId()).join("-")}_${e.join("-")}_${t}`}createColDefsFromFields(e){const t={};for(let i=0;i<e.length;i++){const n=e[i].split(this.fieldSeparator);let s=t;for(let e=0;e<n.length;e++){const t=n[e];null==s[t]&&(s[t]={}),s=s[t]}}const i=(e,t,n,s)=>{var r;const o=[];for(let t in n){const r=n[t],a=i(`${e}${this.fieldSeparator}${t}`,t,r,s+1);o.push(a)}if(0===o.length){const i=this.columnModel.getPrimaryColumn(t);if(i){const n=null!=(r=this.columnModel.getDisplayNameForColumn(i,"header"))?r:t,s=this.createColDef(i,n,void 0,!1);return s.colId=e,s.aggFunc=i.getAggFunc(),s.valueGetter=t=>{var i;return null==(i=t.data)?void 0:i[e]},s}return{colId:e,headerName:t,valueGetter:t=>{var i;return null==(i=t.data)?void 0:i[e]}}}return this.gos.get("removePivotHeaderRowWhenSingleValueColumn")&&1===o.length&&"colId"in o[0]?(o[0].headerName=t,o[0]):{openByDefault:-1===this.pivotDefaultExpanded||s<this.pivotDefaultExpanded,groupId:e,headerName:t,children:o}},n=[];for(let e in t){const s=i(e,e,t[e],0);n.push(s)}return n}};Zl.PIVOT_ROW_TOTAL_PREFIX="PivotRowTotal_",$l([(0,Tl.Autowired)("columnModel")],Zl.prototype,"columnModel",2),$l([Tl.PostConstruct],Zl.prototype,"init",1),Zl=$l([(0,Tl.Bean)("pivotColDefService")],Zl);var Ql=class extends Dl.BeanStub{constructor(){super(...arguments),this.uniqueValues={},this.lastTimeFailed=!1,this.maxUniqueValues=-1,this.currentUniqueCount=0}execute(e){const t=e.changedPath;this.columnModel.isPivotActive()?this.executePivotOn(t):this.executePivotOff(t)}executePivotOff(e){this.aggregationColumnsHashLastTime=null,this.uniqueValues={},this.columnModel.isSecondaryColumnsPresent()&&(this.columnModel.setSecondaryColumns(null,"rowModelUpdated"),e&&e.setInactive())}executePivotOn(e){var t;const i=null!=(t=this.columnModel.getValueColumns().length)?t:1,n=this.gos.get("pivotMaxGeneratedColumns");let s;this.maxUniqueValues=-1===n?-1:n/i;try{s=this.bucketUpRowNodes(e)}catch(e){if(e.message===Ql.EXCEEDED_MAX_UNIQUE_VALUES){this.columnModel.setSecondaryColumns([],"rowModelUpdated");const t={type:Dl.Events.EVENT_PIVOT_MAX_COLUMNS_EXCEEDED,message:e.message};return this.eventService.dispatchEvent(t),void(this.lastTimeFailed=!0)}throw e}const r=this.setUniqueValues(s),o=this.columnModel.getValueColumns(),a=o.map(e=>`${e.getId()}-${e.getColDef().headerName}`).join("#"),l=o.map(e=>e.getAggFunc().toString()).join("#"),c=this.aggregationColumnsHashLastTime!==a,h=this.aggregationFuncsHashLastTime!==l;this.aggregationColumnsHashLastTime=a,this.aggregationFuncsHashLastTime=l;const d=this.columnModel.getRowGroupColumns().map(e=>e.getId()).join("#"),u=d!==this.groupColumnsHashLastTime;this.groupColumnsHashLastTime=d;const p=this.gos.get("pivotRowTotals"),g=this.gos.get("pivotColumnGroupTotals"),f=this.gos.get("suppressExpandablePivotGroups"),m=this.gos.get("removePivotHeaderRowWhenSingleValueColumn"),v=p!==this.pivotRowTotalsLastTime||g!==this.pivotColumnGroupTotalsLastTime||f!==this.suppressExpandablePivotGroupsLastTime||m!==this.removePivotHeaderRowWhenSingleValueColumnLastTime;if(this.pivotRowTotalsLastTime=p,this.pivotColumnGroupTotalsLastTime=g,this.suppressExpandablePivotGroupsLastTime=f,this.removePivotHeaderRowWhenSingleValueColumnLastTime=m,this.lastTimeFailed||r||c||u||h||v){const{pivotColumnGroupDefs:t,pivotColumnDefs:i}=this.pivotColDefService.createPivotColumnDefs(this.uniqueValues);this.pivotColumnDefs=i,this.columnModel.setSecondaryColumns(t,"rowModelUpdated"),e&&e.setInactive()}this.lastTimeFailed=!1}setUniqueValues(e){return!(JSON.stringify(e)===JSON.stringify(this.uniqueValues)||(this.uniqueValues=e,0))}bucketUpRowNodes(e){this.currentUniqueCount=0;const t={};e.forEachChangedNodeDepthFirst(e=>{e.leafGroup&&(e.childrenMapped=null)});const i=e=>{var n;e.leafGroup?this.bucketRowNode(e,t):null==(n=e.childrenAfterFilter)||n.forEach(i)};return e.executeFromRootNode(i),t}bucketRowNode(e,t){const i=this.columnModel.getPivotColumns();0===i.length?e.childrenMapped=null:e.childrenMapped=this.bucketChildren(e.childrenAfterFilter,i,0,t),e.sibling&&(e.sibling.childrenMapped=e.childrenMapped)}bucketChildren(e,t,i,n){const s={},r=t[i];if(e.forEach(e=>{let t=this.valueService.getKeyForNode(r,e);if(Dl._.missing(t)&&(t=""),!n[t]){this.currentUniqueCount+=1,n[t]={};const e=-1!==this.maxUniqueValues,i=this.currentUniqueCount>this.maxUniqueValues;if(e&&i)throw Error(Ql.EXCEEDED_MAX_UNIQUE_VALUES)}s[t]||(s[t]=[]),s[t].push(e)}),i===t.length-1)return s;{const e={};return Dl._.iterateObject(s,(s,r)=>{e[s]=this.bucketChildren(r,t,i+1,n[s])}),e}}getPivotColumnDefs(){return this.pivotColumnDefs}};Ql.EXCEEDED_MAX_UNIQUE_VALUES="Exceeded maximum allowed pivot column count.",$l([(0,Dl.Autowired)("valueService")],Ql.prototype,"valueService",2),$l([(0,Dl.Autowired)("columnModel")],Ql.prototype,"columnModel",2),$l([(0,Dl.Autowired)("pivotColDefService")],Ql.prototype,"pivotColDefService",2),Ql=$l([(0,Dl.Bean)("pivotStage")],Ql);var Jl={sum:"Sum",first:"First",last:"Last",min:"Min",max:"Max",count:"Count",avg:"Average"},ec=class extends Il.BeanStub{constructor(){super(...arguments),this.aggFuncsMap={},this.initialised=!1}init(){this.initialised||(this.initialiseWithDefaultAggregations(),this.addAggFuncs(this.gos.get("aggFuncs")))}initialiseWithDefaultAggregations(){this.aggFuncsMap[ec.AGG_SUM]=tc,this.aggFuncsMap[ec.AGG_FIRST]=ic,this.aggFuncsMap[ec.AGG_LAST]=nc,this.aggFuncsMap[ec.AGG_MIN]=sc,this.aggFuncsMap[ec.AGG_MAX]=rc,this.aggFuncsMap[ec.AGG_COUNT]=oc,this.aggFuncsMap[ec.AGG_AVG]=ac,this.initialised=!0}isAggFuncPossible(e,t){const i=this.getFuncNames(e),n=Il._.includes(i,t),s=Il._.exists(this.aggFuncsMap[t]);return n&&s}getDefaultFuncLabel(e){var t;return null!=(t=Jl[e])?t:e}getDefaultAggFunc(e){const t=e.getColDef().defaultAggFunc;if(Il._.exists(t)&&this.isAggFuncPossible(e,t))return t;if(this.isAggFuncPossible(e,ec.AGG_SUM))return ec.AGG_SUM;const i=this.getFuncNames(e);return Il._.existsAndNotEmpty(i)?i[0]:null}addAggFuncs(e){this.init(),Il._.iterateObject(e,(e,t)=>{this.aggFuncsMap[e]=t})}getAggFunc(e){return this.init(),this.aggFuncsMap[e]}getFuncNames(e){const t=e.getColDef().allowedAggFuncs;return null==t?Object.keys(this.aggFuncsMap).sort():t}clear(){this.aggFuncsMap={}}};function tc(e){const{values:t}=e;let i=null;for(let e=0;e<t.length;e++){const n=t[e];"number"==typeof n?null===i?i=n:i+="number"==typeof i?n:BigInt(n):"bigint"==typeof n&&(i=null===i?n:("bigint"==typeof i?i:BigInt(i))+n)}return i}function ic(e){return e.values.length>0?e.values[0]:null}function nc(e){return e.values.length>0?Il._.last(e.values):null}function sc(e){const{values:t}=e;let i=null;for(let e=0;e<t.length;e++){const n=t[e];"number"!=typeof n&&"bigint"!=typeof n||!(null===i||i>n)||(i=n)}return i}function rc(e){const{values:t}=e;let i=null;for(let e=0;e<t.length;e++){const n=t[e];"number"!=typeof n&&"bigint"!=typeof n||!(null===i||i<n)||(i=n)}return i}function oc(e){var t,i;const{values:n}=e;let s=0;for(let e=0;e<n.length;e++){const t=n[e];s+=null!=t&&"number"==typeof t.value?t.value:1}const r=null==(i=null==(t=e.rowNode)?void 0:t.aggData)?void 0:i[e.column.getColId()];return r&&r.value===s?r:{value:s,toString:function(){return this.value.toString()},toNumber:function(){return this.value}}}function ac(e){var t,i,n;const{values:s}=e;let r=0,o=0;for(let e=0;e<s.length;e++){const t=s[e];let i=null;"number"==typeof t||"bigint"==typeof t?(i=t,o++):null==t||"number"!=typeof t.value&&"bigint"!=typeof t.value||"number"!=typeof t.count||(i=t.value*("number"==typeof t.value?t.count:BigInt(t.count)),o+=t.count),"number"==typeof i?r+="number"==typeof r?i:BigInt(i):"bigint"==typeof i&&(r=("bigint"==typeof r?r:BigInt(r))+i)}let a=null;o>0&&(a=r/("number"==typeof r?o:BigInt(o)));const l=null==(n=null==(t=e.rowNode)?void 0:t.aggData)?void 0:n[null==(i=e.column)?void 0:i.getColId()];return l&&l.count===o&&l.value===a?l:{count:o,value:a,toString:function(){return"number"==typeof this.value||"bigint"==typeof this.value?this.value.toString():""},toNumber:function(){return this.value}}}ec.AGG_SUM="sum",ec.AGG_FIRST="first",ec.AGG_LAST="last",ec.AGG_MIN="min",ec.AGG_MAX="max",ec.AGG_COUNT="count",ec.AGG_AVG="avg",$l([Il.PostConstruct],ec.prototype,"init",1),ec=$l([(0,Il.Bean)("aggFuncService")],ec);var lc=class extends Pl.PillDragComp{constructor(e,t,i,n,s){super(t,i,s,'\n                <span role="option">\n                    <span ref="eDragHandle" class="ag-drag-handle ag-column-drop-cell-drag-handle" role="presentation"></span>\n                    <span ref="eText" class="ag-column-drop-cell-text" aria-hidden="true"></span>\n                    <ag-sort-indicator ref="eSortIndicator"></ag-sort-indicator>\n                    <span ref="eButton" class="ag-column-drop-cell-button" role="presentation"></span>\n                </span>\n            '),this.column=e,this.dropZonePurpose=n,this.popupShowing=!1}init(){this.displayName=this.columnModel.getDisplayNameForColumn(this.column,"columnDrop"),super.init(),this.setupSort(),this.addManagedListener(this.eventService,Pl.Column.EVENT_SORT_CHANGED,()=>{this.setupAria()}),this.isGroupingZone()&&this.addManagedPropertyListener("groupLockGroupColumns",()=>{this.refreshRemove(),this.refreshDraggable(),this.setupAria()})}getItem(){return this.column}getDisplayName(){return this.displayName}getTooltip(){return this.column.getColDef().headerTooltip}addAdditionalAriaInstructions(e,t){const i=this.gos.get("rowGroupPanelSuppressSort"),n=this.gos.get("functionsReadOnly");if(this.isAggregationZone()&&!n){const i=t("ariaDropZoneColumnValueItemDescription","Press ENTER to change the aggregation type");e.push(i)}if(this.isGroupingZone()&&this.column.isSortable()&&!i){const i=t("ariaDropZoneColumnGroupItemDescription","Press ENTER to sort");e.push(i)}super.addAdditionalAriaInstructions(e,t)}isDraggable(){return this.isReadOnly()}isRemovable(){return this.isReadOnly()}isReadOnly(){return!this.isGroupingAndLocked()&&!this.gos.get("functionsReadOnly")}getAriaDisplayName(){const e=this.localeService.getLocaleTextFunc(),{name:t,aggFuncName:i}=this.getColumnAndAggFuncName(),n=e("ariaDropZoneColumnComponentAggFuncSeparator"," of "),s={asc:e("ariaDropZoneColumnComponentSortAscending","ascending"),desc:e("ariaDropZoneColumnComponentSortDescending","descending")},r=this.column.getSort(),o=this.gos.get("rowGroupPanelSuppressSort");return[i&&`${i}${n}`,t,this.isGroupingZone()&&!o&&r&&`, ${s[r]}`].filter(e=>!!e).join("")}getColumnAndAggFuncName(){const e=this.displayName;let t="";if(this.isAggregationZone()){const e=this.column.getAggFunc(),i="string"==typeof e?e:"agg";t=this.localeService.getLocaleTextFunc()(i,i)}return{name:e,aggFuncName:t}}setupSort(){const e=this.column.isSortable(),t=this.isGroupingZone();if(e&&t&&!this.gos.get("rowGroupPanelSuppressSort")){this.eSortIndicator.setupSort(this.column,!0);const e=e=>{e.preventDefault();const t="ctrl"===this.gos.get("multiSortKey")?e.ctrlKey||e.metaKey:e.shiftKey;this.sortController.progressSort(this.column,t,"uiColumnSorted")};this.addGuiEventListener("click",e),this.addGuiEventListener("keydown",t=>{t.key===Pl.KeyCode.ENTER&&this.isGroupingZone()&&e(t)})}}getDefaultIconName(){return Pl.DragAndDropService.ICON_HIDE}createGetDragItem(){const{column:e}=this;return()=>{const t={};return t[e.getId()]=e.isVisible(),{columns:[e],visibleState:t}}}setupComponents(){super.setupComponents(),this.isAggregationZone()&&!this.gos.get("functionsReadOnly")&&this.addGuiEventListener("click",this.onShowAggFuncSelection.bind(this))}onKeyDown(e){super.onKeyDown(e),e.key===Pl.KeyCode.ENTER&&this.isAggregationZone()&&!this.gos.get("functionsReadOnly")&&(e.preventDefault(),this.onShowAggFuncSelection())}getDisplayValue(){const{name:e,aggFuncName:t}=this.getColumnAndAggFuncName();return this.isAggregationZone()?`${t}(${e})`:e}onShowAggFuncSelection(){if(this.popupShowing)return;this.popupShowing=!0;const e=new Pl.VirtualList({cssIdentifier:"select-agg-func"}),t=this.aggFuncService.getFuncNames(this.column),i=this.getGui(),n=e.getGui();e.setModel({getRow:function(e){return t[e]},getRowCount:function(){return t.length}}),this.getContext().createBean(e);const s=Pl._.loadTemplate('<div class="ag-select-agg-func-popup"></div>');s.style.top="0px",s.style.left="0px",s.appendChild(n),s.style.width=`${i.clientWidth}px`;const r=this.addManagedListener(s,"focusout",e=>{!s.contains(e.relatedTarget)&&a&&a.hideFunc()}),o=this.localeService.getLocaleTextFunc(),a=this.popupService.addPopup({modal:!0,eChild:s,closeOnEsc:!0,closedCallback:t=>{this.destroyBean(e),this.popupShowing=!1,"Escape"===(null==t?void 0:t.key)&&i.focus(),r&&r()},ariaLabel:o("ariaLabelAggregationFunction","Aggregation Function")});a&&e.setComponentCreator(this.createAggSelect.bind(this,a.hideFunc)),e.addGuiEventListener("keydown",t=>{if(t.key===Pl.KeyCode.ENTER||t.key===Pl.KeyCode.SPACE){const t=e.getLastFocusedRow();if(null==t)return;const i=e.getComponentAt(t);i&&i.selectItem()}}),this.popupService.positionPopupByComponent({type:"aggFuncSelect",eventSource:i,ePopup:s,keepWithinBounds:!0,column:this.column,position:"under"}),e.refresh();let l=t.findIndex(e=>e===this.column.getAggFunc());-1===l&&(l=0),e.focusRow(l)}createAggSelect(e,t){const i=this.localeService.getLocaleTextFunc(),n=t.toString(),s=i(n,n);return new cc(()=>{if(e(),this.gos.get("functionsPassive")){const e={type:Pl.Events.EVENT_COLUMN_AGG_FUNC_CHANGE_REQUEST,columns:[this.column],aggFunc:t};this.eventService.dispatchEvent(e)}else this.columnModel.setColumnAggFunc(this.column,t,"toolPanelDragAndDrop")},s)}isGroupingAndLocked(){return this.isGroupingZone()&&this.columnModel.isColumnGroupingLocked(this.column)}isAggregationZone(){return"aggregation"===this.dropZonePurpose}isGroupingZone(){return"rowGroup"===this.dropZonePurpose}getDragSourceType(){return Pl.DragSourceType.ToolPanel}destroy(){super.destroy(),this.column=null}};$l([(0,Pl.Autowired)("popupService")],lc.prototype,"popupService",2),$l([(0,Pl.Autowired)("sortController")],lc.prototype,"sortController",2),$l([(0,Pl.Autowired)("columnModel")],lc.prototype,"columnModel",2),$l([(0,Pl.Optional)("aggFuncService")],lc.prototype,"aggFuncService",2),$l([(0,Pl.RefSelector)("eSortIndicator")],lc.prototype,"eSortIndicator",2);var cc=class extends Pl.Component{constructor(e,t){super('<div class="ag-select-agg-func-item"/>'),this.selectItem=e,this.getGui().innerText=t,this.addGuiEventListener("click",this.selectItem)}},hc=class extends kl.PillDropZonePanel{constructor(e,t){super(e),this.dropZonePurpose=t}init(e){super.init(e),this.addManagedListener(this.eventService,kl.Events.EVENT_NEW_COLUMNS_LOADED,this.refreshGui.bind(this)),this.addManagedPropertyListeners(["functionsReadOnly","rowGroupPanelSuppressSort","groupLockGroupColumns"],this.refreshGui.bind(this))}getItems(e){var t;return null!=(t=e.columns)?t:[]}isInterestedIn(e){return e===kl.DragSourceType.HeaderCell||e===kl.DragSourceType.ToolPanel}minimumAllowedNewInsertIndex(){const e=this.gos.get("groupLockGroupColumns"),t=this.columnModel.getRowGroupColumns().length;return-1===e?t:Math.min(e,t)}showOrHideColumnOnExit(e){return this.isRowGroupPanel()&&!this.gos.get("suppressRowGroupHidesColumns")&&!e.fromNudge}handleDragEnterEnd(e){if(this.showOrHideColumnOnExit(e)){const t=e.dragSource.getDragItem().columns;this.setColumnsVisible(t,!1,"uiColumnDragged")}}handleDragLeaveEnd(e){if(this.showOrHideColumnOnExit(e)){const t=e.dragSource.getDragItem();this.setColumnsVisible(t.columns,!0,"uiColumnDragged")}}setColumnsVisible(e,t,i){if(e){const n=e.filter(e=>!e.getColDef().lockVisible);this.columnModel.setColumnsVisible(n,t,i)}}isRowGroupPanel(){return"rowGroup"===this.dropZonePurpose}refreshOnDragStop(){return!this.gos.get("functionsPassive")}createPillComponent(e,t,i,n){return new lc(e,t,i,this.dropZonePurpose,n)}};$l([(0,kl.Autowired)("columnModel")],hc.prototype,"columnModel",2);var dc=class extends hc{constructor(e){super(e,"rowGroup")}passBeansUp(){const e=this.localeService.getLocaleTextFunc(),t=e("rowGroupColumnsEmptyMessage","Drag here to set row groups"),i=e("groups","Row Groups");super.init({icon:Ll._.createIconNoSpan("rowGroupPanel",this.gos,null),emptyMessage:t,title:i}),this.addManagedListener(this.eventService,Ll.Events.EVENT_COLUMN_ROW_GROUP_CHANGED,this.refreshGui.bind(this))}getAriaLabel(){return this.localeService.getLocaleTextFunc()("ariaRowGroupDropZonePanelLabel","Row Groups")}getTooltipParams(){const e=super.getTooltipParams();return e.location="rowGroupColumnsList",e}isItemDroppable(e,t){return!(this.gos.get("functionsReadOnly")||!e.isPrimary())&&e.isAllowRowGroup()&&(!e.isRowGroupActive()||this.isSourceEventFromTarget(t))}updateItems(e){if(this.gos.get("functionsPassive")){const t={type:Ll.Events.EVENT_COLUMN_ROW_GROUP_CHANGE_REQUEST,columns:e};this.eventService.dispatchEvent(t)}else this.columnModel.setRowGroupColumns(e,"toolPanelUi")}getIconName(){return this.isPotentialDndItems()?Ll.DragAndDropService.ICON_GROUP:Ll.DragAndDropService.ICON_NOT_ALLOWED}getExistingItems(){return this.columnModel.getRowGroupColumns()}};$l([Ll.PostConstruct],dc.prototype,"passBeansUp",1);var uc=class extends hc{constructor(e){super(e,"pivot")}passBeansUp(){const e=this.localeService.getLocaleTextFunc(),t=e("pivotColumnsEmptyMessage","Drag here to set column labels"),i=e("pivots","Column Labels");super.init({icon:Nl._.createIconNoSpan("pivotPanel",this.gos,null),emptyMessage:t,title:i}),this.addManagedListener(this.eventService,Nl.Events.EVENT_NEW_COLUMNS_LOADED,this.refresh.bind(this)),this.addManagedListener(this.eventService,Nl.Events.EVENT_COLUMN_PIVOT_CHANGED,this.refresh.bind(this)),this.addManagedListener(this.eventService,Nl.Events.EVENT_COLUMN_PIVOT_MODE_CHANGED,this.checkVisibility.bind(this)),this.refresh()}getAriaLabel(){return this.localeService.getLocaleTextFunc()("ariaPivotDropZonePanelLabel","Column Labels")}getTooltipParams(){const e=super.getTooltipParams();return e.location="pivotColumnsList",e}refresh(){this.checkVisibility(),this.refreshGui()}checkVisibility(){const e=this.columnModel.isPivotMode();if(this.isHorizontal())switch(this.gos.get("pivotPanelShow")){case"always":this.setDisplayed(e);break;case"onlyWhenPivoting":const t=this.columnModel.isPivotActive();this.setDisplayed(e&&t);break;default:this.setDisplayed(!1)}else this.setDisplayed(e)}isItemDroppable(e,t){return!(this.gos.get("functionsReadOnly")||!e.isPrimary())&&e.isAllowPivot()&&(!e.isPivotActive()||this.isSourceEventFromTarget(t))}updateItems(e){if(this.gos.get("functionsPassive")){const t={type:Nl.Events.EVENT_COLUMN_PIVOT_CHANGE_REQUEST,columns:e};this.eventService.dispatchEvent(t)}else this.columnModel.setPivotColumns(e,"toolPanelUi")}getIconName(){return this.isPotentialDndItems()?Nl.DragAndDropService.ICON_PIVOT:Nl.DragAndDropService.ICON_NOT_ALLOWED}getExistingItems(){return this.columnModel.getPivotColumns()}};$l([Nl.PostConstruct],uc.prototype,"passBeansUp",1);var pc=class extends Rl.Component{constructor(){super()}postConstruct(){this.setGui(this.createNorthPanel()),this.addManagedListener(this.eventService,Rl.Events.EVENT_COLUMN_ROW_GROUP_CHANGED,()=>this.onRowGroupChanged()),this.addManagedListener(this.eventService,Rl.Events.EVENT_NEW_COLUMNS_LOADED,()=>this.onRowGroupChanged()),this.addManagedPropertyListener("rowGroupPanelShow",()=>this.onRowGroupChanged()),this.addManagedPropertyListener("pivotPanelShow",()=>this.onPivotPanelShow()),this.onRowGroupChanged()}createNorthPanel(){const e=document.createElement("div");return e.classList.add("ag-column-drop-wrapper"),Rl._.setAriaRole(e,"presentation"),this.rowGroupComp=new dc(!0),this.createManagedBean(this.rowGroupComp),this.pivotComp=new uc(!0),this.createManagedBean(this.pivotComp),e.appendChild(this.rowGroupComp.getGui()),e.appendChild(this.pivotComp.getGui()),this.addManagedListener(this.rowGroupComp,Rl.Component.EVENT_DISPLAYED_CHANGED,()=>this.onDropPanelVisible()),this.addManagedListener(this.pivotComp,Rl.Component.EVENT_DISPLAYED_CHANGED,()=>this.onDropPanelVisible()),this.onDropPanelVisible(),e}onDropPanelVisible(){const e=this.rowGroupComp.isDisplayed()&&this.pivotComp.isDisplayed();this.rowGroupComp.addOrRemoveCssClass("ag-column-drop-horizontal-half-width",e),this.pivotComp.addOrRemoveCssClass("ag-column-drop-horizontal-half-width",e)}onRowGroupChanged(){if(!this.rowGroupComp)return;const e=this.gos.get("rowGroupPanelShow");if("always"===e)this.rowGroupComp.setDisplayed(!0);else if("onlyWhenGrouping"===e){const e=!this.columnModel.isRowGroupEmpty();this.rowGroupComp.setDisplayed(e)}else this.rowGroupComp.setDisplayed(!1)}onPivotPanelShow(){if(!this.pivotComp)return;const e=this.gos.get("pivotPanelShow");if("always"===e)this.pivotComp.setDisplayed(!0);else if("onlyWhenPivoting"===e){const e=this.columnModel.isPivotActive();this.pivotComp.setDisplayed(e)}else this.pivotComp.setDisplayed(!1)}};$l([(0,Rl.Autowired)("columnModel")],pc.prototype,"columnModel",2),$l([Rl.PostConstruct],pc.prototype,"postConstruct",1);var gc=class extends Ol.BeanStub{execute(e){const t=this.columnModel.isPivotMode(),i=this.filterManager.isAggregateFilterPresent()||this.filterManager.isAggregateQuickFilterPresent(),n=this.gos.getGroupAggFiltering()||(t?e=>e.node.leafGroup:e=>!e.node.group),{changedPath:s}=e,r=(e,t=!1)=>{e.childrenAfterFilter&&(e.childrenAfterAggFilter=e.childrenAfterFilter,t&&e.childrenAfterAggFilter.forEach(e=>r(e,t)),this.setAllChildrenCount(e)),e.sibling&&(e.sibling.childrenAfterAggFilter=e.childrenAfterAggFilter)};s.forEachChangedNodeDepthFirst(i?e=>{var t;e.childrenAfterAggFilter=(null==(t=e.childrenAfterFilter)?void 0:t.filter(e=>{var t;return n({node:e})&&this.filterManager.doesRowPassAggregateFilters({rowNode:e})?(r(e,!0),!0):null==(t=e.childrenAfterAggFilter)?void 0:t.length}))||null,this.setAllChildrenCount(e),e.sibling&&(e.sibling.childrenAfterAggFilter=e.childrenAfterAggFilter)}:r,!0)}setAllChildrenCountTreeData(e){let t=0;e.childrenAfterAggFilter.forEach(e=>{t++,t+=e.allChildrenCount}),e.setAllChildrenCount(t)}setAllChildrenCountGridGrouping(e){let t=0;e.childrenAfterAggFilter.forEach(e=>{e.group?t+=e.allChildrenCount:t++}),e.setAllChildrenCount(t)}setAllChildrenCount(e){e.hasChildren()?this.gos.get("treeData")?this.setAllChildrenCountTreeData(e):this.setAllChildrenCountGridGrouping(e):e.setAllChildrenCount(null)}};$l([(0,Ol.Autowired)("filterManager")],gc.prototype,"filterManager",2),$l([(0,Ol.Autowired)("columnModel")],gc.prototype,"columnModel",2),gc=$l([(0,Ol.Bean)("filterAggregatesStage")],gc);var fc=class e extends _l.TabGuardComp{constructor(){super('\n            <div class="ag-group-filter">\n                <div ref="eGroupField"></div>\n                <div ref="eUnderlyingFilter"></div>\n            </div>\n        ')}postConstruct(){this.initialiseTabGuard({})}init(e){return this.params=e,this.validateParams(),this.updateGroups().then(()=>{this.addManagedListener(this.eventService,_l.Events.EVENT_COLUMN_ROW_GROUP_CHANGED,()=>this.onColumnRowGroupChanged())})}validateParams(){const{colDef:e}=this.params;e.field&&_l._.warnOnce('Group Column Filter does not work with the colDef property "field". This property will be ignored.'),e.filterValueGetter&&_l._.warnOnce('Group Column Filter does not work with the colDef property "filterValueGetter". This property will be ignored.'),e.filterParams&&_l._.warnOnce('Group Column Filter does not work with the colDef property "filterParams". This property will be ignored.')}updateGroups(){const e=this.updateGroupField();return this.getUnderlyingFilters(e)}getSourceColumns(){if(this.groupColumn=this.params.column,this.gos.get("treeData"))return _l._.warnOnce("Group Column Filter does not work with Tree Data enabled. Please disable Tree Data, or use a different filter."),[];return this.columnModel.getSourceColumnsForGroupColumn(this.groupColumn)||(_l._.warnOnce("Group Column Filter only works on group columns. Please use a different filter."),[])}updateGroupField(){_l._.clearElement(this.eGroupField),this.eGroupFieldSelect&&this.destroyBean(this.eGroupFieldSelect);const e=this.getSourceColumns(),t=e.filter(e=>e.isFilterAllowed());return t.length?(1===e.length?(this.selectedColumn=t[0],_l._.setDisplayed(this.eGroupField,!1)):(this.selectedColumn&&t.some(e=>e.getId()===this.selectedColumn.getId())||(this.selectedColumn=t[0]),this.createGroupFieldSelectElement(t),this.eGroupField.appendChild(this.eGroupFieldSelect.getGui()),this.eGroupField.appendChild(_l._.loadTemplate('<div class="ag-filter-separator"></div>')),_l._.setDisplayed(this.eGroupField,!0)),t):(this.selectedColumn=void 0,_l._.setDisplayed(this.eGroupField,!1),null)}createGroupFieldSelectElement(e){this.eGroupFieldSelect=this.createManagedBean(new _l.AgSelect);const t=this.localeService.getLocaleTextFunc();this.eGroupFieldSelect.setLabel(t("groupFilterSelect","Select field:")),this.eGroupFieldSelect.setLabelAlignment("top"),this.eGroupFieldSelect.addOptions(e.map(e=>{var t;return{value:e.getId(),text:null!=(t=this.columnModel.getDisplayNameForColumn(e,"groupFilter",!1))?t:void 0}})),this.eGroupFieldSelect.setValue(this.selectedColumn.getId()),this.eGroupFieldSelect.onValueChange(e=>this.updateSelectedColumn(e)),this.eGroupFieldSelect.addCssClass("ag-group-filter-field-select-wrapper"),1===e.length&&this.eGroupFieldSelect.setDisabled(!0)}getUnderlyingFilters(e){if(!e)return this.filterColumnPairs=void 0,this.selectedFilter=void 0,this.groupColumn.setFilterActive(!1,"columnRowGroupChanged"),_l.AgPromise.resolve();const t=[],i=[];return e.forEach(e=>{const n=this.filterManager.getOrCreateFilterWrapper(e,"COLUMN_MENU");(null==n?void 0:n.filterPromise)&&t.push(n.filterPromise.then(t=>(t&&i.push({filter:t,column:e}),e.getId()===this.selectedColumn.getId()&&(this.selectedFilter=null!=t?t:void 0),t)))}),_l.AgPromise.all(t).then(()=>{this.filterColumnPairs=i,this.groupColumn.setFilterActive(this.isFilterActive(),"columnRowGroupChanged")})}addUnderlyingFilterElement(){var e,t;if(_l._.clearElement(this.eUnderlyingFilter),!this.selectedColumn)return _l.AgPromise.resolve();const i=this.createManagedBean(new _l.FilterWrapperComp(this.selectedColumn,"COLUMN_MENU"));return this.filterWrapperComp=i,i.hasFilter()?(this.eUnderlyingFilter.appendChild(i.getGui()),null!=(t=null==(e=i.getFilter())?void 0:e.then(()=>{var e,t;null==(e=i.afterGuiAttached)||e.call(i,this.afterGuiAttachedParams),(null==(t=this.afterGuiAttachedParams)?void 0:t.suppressFocus)||!this.eGroupFieldSelect||this.eGroupFieldSelect.isDisabled()||this.eGroupFieldSelect.getFocusableElement().focus()}))?t:_l.AgPromise.resolve()):_l.AgPromise.resolve()}updateSelectedColumn(t){var i;if(!t)return;null==(i=this.filterWrapperComp)||i.afterGuiDetached(),this.destroyBean(this.filterWrapperComp);const n=this.getFilterColumnPair(t);this.selectedColumn=null==n?void 0:n.column,this.selectedFilter=null==n?void 0:n.filter,this.dispatchEvent({type:e.EVENT_SELECTED_COLUMN_CHANGED}),this.addUnderlyingFilterElement()}isFilterActive(){var e;return!!(null==(e=this.filterColumnPairs)?void 0:e.some(({filter:e})=>e.isFilterActive()))}doesFilterPass(){return!0}getModel(){return null}setModel(){return _l.AgPromise.resolve()}afterGuiAttached(e){this.afterGuiAttachedParams=e,this.addUnderlyingFilterElement()}afterGuiDetached(){var e,t;_l._.clearElement(this.eUnderlyingFilter),null==(t=null==(e=this.selectedFilter)?void 0:e.afterGuiDetached)||t.call(e)}onColumnRowGroupChanged(){this.updateGroups().then(()=>{this.dispatchEvent({type:e.EVENT_COLUMN_ROW_GROUP_CHANGED}),this.eventService.dispatchEvent({type:"filterAllowedUpdated"})})}getFilterColumnPair(e){var t;if(e)return null==(t=this.filterColumnPairs)?void 0:t.find(({column:t})=>t.getId()===e)}getSelectedFilter(){return this.selectedFilter}getSelectedColumn(){return this.selectedColumn}isFilterAllowed(){return!!this.selectedColumn}destroy(){super.destroy()}};fc.EVENT_COLUMN_ROW_GROUP_CHANGED="columnRowGroupChanged",fc.EVENT_SELECTED_COLUMN_CHANGED="selectedColumnChanged",$l([(0,_l.Autowired)("filterManager")],fc.prototype,"filterManager",2),$l([(0,_l.Autowired)("columnModel")],fc.prototype,"columnModel",2),$l([(0,_l.RefSelector)("eGroupField")],fc.prototype,"eGroupField",2),$l([(0,_l.RefSelector)("eUnderlyingFilter")],fc.prototype,"eUnderlyingFilter",2),$l([_l.PostConstruct],fc.prototype,"postConstruct",1);var mc=fc,vc=class extends Fl.Component{constructor(){super('\n            <div ref="eFloatingFilter" class="ag-group-floating-filter ag-floating-filter-input" role="presentation"></div>\n        '),this.haveAddedColumnListeners=!1}init(e){this.params=e;const t="multipleColumns"===this.gos.get("groupDisplayType");return new Fl.AgPromise(e=>{this.params.parentFilterInstance(i=>{this.parentFilterInstance=i,t?this.setupUnderlyingFloatingFilterElement().then(()=>e()):(this.setupReadOnlyFloatingFilterElement(),e())})}).then(()=>{this.addManagedListener(this.parentFilterInstance,mc.EVENT_SELECTED_COLUMN_CHANGED,()=>this.onSelectedColumnChanged()),this.addManagedListener(this.parentFilterInstance,mc.EVENT_COLUMN_ROW_GROUP_CHANGED,()=>this.onColumnRowGroupChanged())})}onParamsUpdated(e){this.refresh(e)}refresh(e){this.params=e,this.setParams()}setParams(){var e;const t=this.columnModel.getDisplayNameForColumn(this.params.column,"header",!0),i=this.localeService.getLocaleTextFunc();null==(e=this.eFloatingFilterText)||e.setInputAriaLabel(`${t} ${i("ariaFilterInput","Filter Input")}`)}setupReadOnlyFloatingFilterElement(){this.eFloatingFilterText||(this.eFloatingFilterText=this.createManagedBean(new Fl.AgInputTextField),this.eFloatingFilterText.setDisabled(!0).addGuiEventListener("click",()=>this.params.showParentFilter()),this.setParams()),this.updateDisplayedValue(),this.eFloatingFilter.appendChild(this.eFloatingFilterText.getGui())}setupUnderlyingFloatingFilterElement(){this.showingUnderlyingFloatingFilter=!1,this.underlyingFloatingFilter=void 0,Fl._.clearElement(this.eFloatingFilter);const e=this.parentFilterInstance.getSelectedColumn();if(e&&!e.isVisible()){const t=this.filterManager.getFloatingFilterCompDetails(e,this.params.showParentFilter);if(t)return this.compDetails=t,this.haveAddedColumnListeners||(this.haveAddedColumnListeners=!0,this.addManagedListener(e,Fl.Column.EVENT_VISIBLE_CHANGED,this.onColumnVisibleChanged.bind(this)),this.addManagedListener(e,Fl.Column.EVENT_COL_DEF_CHANGED,this.onColDefChanged.bind(this))),t.newAgStackInstance().then(e=>{var t,i;this.underlyingFloatingFilter=e,null==(i=this.underlyingFloatingFilter)||i.onParentModelChanged(null==(t=this.parentFilterInstance.getSelectedFilter())?void 0:t.getModel()),this.appendChild(e.getGui()),this.showingUnderlyingFloatingFilter=!0})}return this.setupReadOnlyFloatingFilterElement(),Fl.AgPromise.resolve()}onColumnVisibleChanged(){this.setupUnderlyingFloatingFilterElement()}onColDefChanged(e){var t,i,n;if(!e.column)return;const s=this.filterManager.getFloatingFilterCompDetails(e.column,this.params.showParentFilter);s&&((null==(t=this.underlyingFloatingFilter)?void 0:t.refresh)?this.underlyingFloatingFilter.refresh(s.params):null==(n=null==(i=this.underlyingFloatingFilter)?void 0:i.onParamsUpdated)||n.call(i,s.params))}onParentModelChanged(e,t){var i,n;this.showingUnderlyingFloatingFilter?null==(n=this.underlyingFloatingFilter)||n.onParentModelChanged(null==(i=this.parentFilterInstance.getSelectedFilter())?void 0:i.getModel(),t):this.updateDisplayedValue()}updateDisplayedValue(){if(!this.parentFilterInstance||!this.eFloatingFilterText)return;const e=this.parentFilterInstance.getSelectedFilter();if(!e)return this.eFloatingFilterText.setValue(""),void this.eFloatingFilterText.setDisplayed(!1);if(this.eFloatingFilterText.setDisplayed(!0),e.getModelAsString){const t=e.getModel();this.eFloatingFilterText.setValue(null==t?"":e.getModelAsString(t))}else this.eFloatingFilterText.setValue("")}onSelectedColumnChanged(){this.showingUnderlyingFloatingFilter||this.updateDisplayedValue()}onColumnRowGroupChanged(){this.showingUnderlyingFloatingFilter||this.updateDisplayedValue()}destroy(){super.destroy()}};$l([(0,Fl.Autowired)("columnModel")],vc.prototype,"columnModel",2),$l([(0,Fl.Autowired)("filterManager")],vc.prototype,"filterManager",2),$l([(0,Fl.RefSelector)("eFloatingFilter")],vc.prototype,"eFloatingFilter",2);var yc={version:"31.3.4",moduleName:El.ModuleNames.RowGroupingModule,beans:[Yl,gc,Xl,Zl,Ql,ec],agStackComponents:[{componentName:"AgGridHeaderDropZones",componentClass:pc}],userComponents:[{componentName:"agGroupColumnFilter",componentClass:mc},{componentName:"agGroupColumnFloatingFilter",componentClass:vc}],dependantModules:[D]},Cc=class extends hc{constructor(e){super(e,"aggregation")}passBeansUp(){const e=this.localeService.getLocaleTextFunc(),t=e("valueColumnsEmptyMessage","Drag here to aggregate"),i=e("values","Values");super.init({icon:Gl._.createIconNoSpan("valuePanel",this.gos,null),emptyMessage:t,title:i}),this.addManagedListener(this.eventService,Gl.Events.EVENT_COLUMN_VALUE_CHANGED,this.refreshGui.bind(this))}getAriaLabel(){return this.localeService.getLocaleTextFunc()("ariaValuesDropZonePanelLabel","Values")}getTooltipParams(){const e=super.getTooltipParams();return e.location="valueColumnsList",e}getIconName(){return this.isPotentialDndItems()?Gl.DragAndDropService.ICON_AGGREGATE:Gl.DragAndDropService.ICON_NOT_ALLOWED}isItemDroppable(e,t){return!(this.gos.get("functionsReadOnly")||!e.isPrimary())&&e.isAllowValue()&&(!e.isValueActive()||this.isSourceEventFromTarget(t))}updateItems(e){if(this.gos.get("functionsPassive")){const t={type:Gl.Events.EVENT_COLUMN_VALUE_CHANGE_REQUEST,columns:e};this.eventService.dispatchEvent(t)}else this.columnModel.setValueColumns(e,"toolPanelUi")}getExistingItems(){return this.columnModel.getValueColumns()}};$l([Gl.PostConstruct],Cc.prototype,"passBeansUp",1);var bc=i(98092),Sc=i(98092),wc=i(98092),xc=i(98092),Ec=i(98092),Mc=i(98092),Ac=i(98092),Tc=i(98092),Dc=i(98092),Ic=Object.defineProperty,Rc=Object.defineProperties,Lc=Object.getOwnPropertyDescriptor,kc=Object.getOwnPropertyDescriptors,Pc=Object.getOwnPropertySymbols,Nc=Object.prototype.hasOwnProperty,Oc=Object.prototype.propertyIsEnumerable,_c=(e,t,i)=>t in e?Ic(e,t,{enumerable:!0,configurable:!0,writable:!0,value:i}):e[t]=i,Fc=(e,t,i,n)=>{for(var s,r=n>1?void 0:n?Lc(t,i):t,o=e.length-1;o>=0;o--)(s=e[o])&&(r=(n?s(t,i,r):s(r))||r);return n&&r&&Ic(t,i,r),r},Gc=class extends wc.Component{constructor(){super('<div class="ag-tool-panel-horizontal-resize"></div>'),this.minWidth=100,this.maxWidth=null}setElementToResize(e){this.elementToResize=e}postConstruct(){const e=this.horizontalResizeService.addResizeBar({eResizeBar:this.getGui(),dragStartPixels:1,onResizeStart:this.onResizeStart.bind(this),onResizing:this.onResizing.bind(this),onResizeEnd:this.onResizeEnd.bind(this)});this.addDestroyFunc(e),this.setInverted(this.gos.get("enableRtl"))}dispatchResizeEvent(e,t,i){const n={type:wc.Events.EVENT_TOOL_PANEL_SIZE_CHANGED,width:i,started:e,ended:t};this.eventService.dispatchEvent(n)}onResizeStart(){this.startingWidth=this.elementToResize.offsetWidth,this.dispatchResizeEvent(!0,!1,this.startingWidth)}onResizeEnd(e){return this.onResizing(e,!0)}onResizing(e,t=!1){const i=this.inverted?-1:1;let n=Math.max(this.minWidth,Math.floor(this.startingWidth-e*i));null!=this.maxWidth&&(n=Math.min(this.maxWidth,n)),this.elementToResize.style.width=`${n}px`,this.dispatchResizeEvent(!1,t,n)}setInverted(e){this.inverted=e}setMaxWidth(e){this.maxWidth=e}setMinWidth(e){this.minWidth=null!=e?e:100}};Fc([(0,wc.Autowired)("horizontalResizeService")],Gc.prototype,"horizontalResizeService",2),Fc([wc.PostConstruct],Gc.prototype,"postConstruct",1);var Vc=class e extends Mc.Component{constructor(e){super(),this.toolPanelDef=e}getToolPanelId(){return this.toolPanelDef.id}postConstruct(){const e=this.createTemplate();this.setTemplate(e),this.setLabel(),this.setIcon(),this.addManagedListener(this.eToggleButton,"click",this.onButtonPressed.bind(this)),this.eToggleButton.setAttribute("id",`ag-${this.getCompId()}-button`)}createTemplate(){return'<div class="ag-side-button" role="presentation">\n                <button type="button" ref="eToggleButton" tabindex="-1" role="tab" aria-expanded="false" class="ag-button ag-side-button-button">\n                    <div ref="eIconWrapper" class="ag-side-button-icon-wrapper" aria-hidden="true"></div>\n                    <span ref ="eLabel" class="ag-side-button-label"></span>\n                </button>\n            </div>'}setLabel(){const e=this.localeService.getLocaleTextFunc(),t=this.toolPanelDef,i=e(t.labelKey,t.labelDefault);this.eLabel.innerText=i}setIcon(){this.eIconWrapper.insertAdjacentElement("afterbegin",Mc._.createIconNoSpan(this.toolPanelDef.iconKey,this.gos))}onButtonPressed(){this.dispatchEvent({type:e.EVENT_TOGGLE_BUTTON_CLICKED})}setSelected(e){this.addOrRemoveCssClass("ag-selected",e),Mc._.setAriaExpanded(this.eToggleButton,e)}getButtonElement(){return this.eToggleButton}};Vc.EVENT_TOGGLE_BUTTON_CLICKED="toggleButtonClicked",Fc([(0,Mc.RefSelector)("eToggleButton")],Vc.prototype,"eToggleButton",2),Fc([(0,Mc.RefSelector)("eIconWrapper")],Vc.prototype,"eIconWrapper",2),Fc([(0,Mc.RefSelector)("eLabel")],Vc.prototype,"eLabel",2),Fc([Mc.PostConstruct],Vc.prototype,"postConstruct",1);var Bc=Vc,Hc=class e extends Ec.Component{constructor(){super(e.TEMPLATE),this.buttonComps=[]}postConstruct(){this.addManagedListener(this.getFocusableElement(),"keydown",this.handleKeyDown.bind(this))}handleKeyDown(e){if(e.key!==Ec.KeyCode.TAB||!e.shiftKey)return;const t=Ec._.last(this.columnModel.getAllDisplayedColumns());this.focusService.focusGridView(t,!0)&&e.preventDefault()}setActiveButton(e){this.buttonComps.forEach(t=>{t.setSelected(e===t.getToolPanelId())})}addButtonComp(t){const i=this.createBean(new Bc(t));return this.buttonComps.push(i),this.appendChild(i),i.addEventListener(Bc.EVENT_TOGGLE_BUTTON_CLICKED,()=>{this.dispatchEvent({type:e.EVENT_SIDE_BAR_BUTTON_CLICKED,toolPanelId:t.id})}),i}clearButtons(){this.buttonComps=this.destroyBeans(this.buttonComps),Ec._.clearElement(this.getGui())}};Hc.EVENT_SIDE_BAR_BUTTON_CLICKED="sideBarButtonClicked",Hc.TEMPLATE='<div class="ag-side-buttons" role="tablist"></div>',Fc([(0,Ec.Autowired)("focusService")],Hc.prototype,"focusService",2),Fc([(0,Ec.Autowired)("columnModel")],Hc.prototype,"columnModel",2),Fc([Ec.PostConstruct],Hc.prototype,"postConstruct",1),Fc([Ec.PreDestroy],Hc.prototype,"clearButtons",1);var zc=Hc,Uc=class e{static parse(t){if(t){if(!0===t)return{toolPanels:[e.DEFAULT_COLUMN_COMP,e.DEFAULT_FILTER_COMP],defaultToolPanel:"columns"};if("string"==typeof t)return e.parse([t]);if(Array.isArray(t)){const i=[];if(t.forEach(t=>{const n=e.DEFAULT_BY_KEY[t];n?i.push(n):console.warn(`AG Grid: the key ${t} is not a valid key for specifying a tool panel, valid keys are: ${Object.keys(e.DEFAULT_BY_KEY).join(",")}`)}),0===i.length)return;return{toolPanels:i,defaultToolPanel:i[0].id}}return{toolPanels:e.parseComponents(t.toolPanels),defaultToolPanel:t.defaultToolPanel,hiddenByDefault:t.hiddenByDefault,position:t.position}}}static parseComponents(t){const i=[];return t?(t.forEach(t=>{let n=null;if("string"==typeof t){const i=e.DEFAULT_BY_KEY[t];if(!i)return void console.warn(`AG Grid: the key ${t} is not a valid key for specifying a tool panel, valid keys are: ${Object.keys(e.DEFAULT_BY_KEY).join(",")}`);n=i}else n=t;i.push(n)}),i):i}};Uc.DEFAULT_COLUMN_COMP={id:"columns",labelDefault:"Columns",labelKey:"columns",iconKey:"columns",toolPanel:"agColumnsToolPanel"},Uc.DEFAULT_FILTER_COMP={id:"filters",labelDefault:"Filters",labelKey:"filters",iconKey:"filter",toolPanel:"agFiltersToolPanel"},Uc.DEFAULT_BY_KEY={columns:Uc.DEFAULT_COLUMN_COMP,filters:Uc.DEFAULT_FILTER_COMP};var Wc=Uc,jc=class e extends Ac.Component{constructor(){super(e.TEMPLATE)}setupResize(){const e=this.getGui(),t=this.resizeBar=this.createManagedBean(new Gc);e.setAttribute("id",`ag-${this.getCompId()}`),t.setElementToResize(e),this.appendChild(t)}getToolPanelId(){return this.toolPanelId}setToolPanelDef(e,t){const{id:i,minWidth:n,maxWidth:s,width:r}=e;this.toolPanelId=i,this.width=r;const o=this.userComponentFactory.getToolPanelCompDetails(e,t),a=o.newAgStackInstance();this.params=o.params,null!=a?(a.then(this.setToolPanelComponent.bind(this)),null!=n&&this.resizeBar.setMinWidth(n),null!=s&&this.resizeBar.setMaxWidth(s)):console.warn(`AG Grid: error processing tool panel component ${i}. You need to specify 'toolPanel'`)}setToolPanelComponent(e){this.toolPanelCompInstance=e,this.appendChild(e.getGui()),this.addDestroyFunc(()=>{this.destroyBean(e)}),this.width&&(this.getGui().style.width=`${this.width}px`)}getToolPanelInstance(){return this.toolPanelCompInstance}setResizerSizerSide(e){const t="left"===e,i=this.gos.get("enableRtl")?t:!t;this.resizeBar.setInverted(i)}refresh(){this.toolPanelCompInstance.refresh(this.params)}};jc.TEMPLATE='<div class="ag-tool-panel-wrapper" role="tabpanel"/>',Fc([(0,Ac.Autowired)("userComponentFactory")],jc.prototype,"userComponentFactory",2),Fc([Ac.PostConstruct],jc.prototype,"setupResize",1);var Kc=jc,$c=class e extends xc.Component{constructor(){super(e.TEMPLATE),this.toolPanelWrappers=[]}postConstruct(){var e;this.sideBarButtonsComp.addEventListener(zc.EVENT_SIDE_BAR_BUTTON_CLICKED,this.onToolPanelButtonClicked.bind(this));const{sideBar:t}=null!=(e=this.gos.get("initialState"))?e:{};this.setSideBarDef({sideBarDef:Wc.parse(this.gos.get("sideBar")),sideBarState:t}),this.addManagedPropertyListener("sideBar",this.onSideBarUpdated.bind(this)),this.sideBarService.registerSideBarComp(this),this.createManagedBean(new xc.ManagedFocusFeature(this.getFocusableElement(),{onTabKeyDown:this.onTabKeyDown.bind(this),handleKeyDown:this.handleKeyDown.bind(this)}))}onTabKeyDown(e){if(e.defaultPrevented)return;const{focusService:t,sideBarButtonsComp:i}=this,n=this.getGui(),s=i.getGui(),r=this.gos.getActiveDomElement(),o=n.querySelector(".ag-tool-panel-wrapper:not(.ag-hidden)"),a=e.target;if(!o)return;if(s.contains(r))return void(t.focusInto(o,e.shiftKey)&&e.preventDefault());if(!e.shiftKey)return;let l=null;o.contains(r)?l=this.focusService.findNextFocusableElement(o,void 0,!0):t.isTargetUnderManagedComponent(o,a)&&e.shiftKey&&(l=this.focusService.findFocusableElementBeforeTabGuard(o,a)),l||(l=s.querySelector(".ag-selected button")),l&&l!==e.target&&(e.preventDefault(),l.focus())}handleKeyDown(e){const t=this.gos.getActiveDomElement();if(!this.sideBarButtonsComp.getGui().contains(t))return;const i=this.sideBarButtonsComp.getGui(),n=Array.prototype.slice.call(i.querySelectorAll(".ag-side-button")),s=n.findIndex(e=>e.contains(t));let r=null;switch(e.key){case xc.KeyCode.LEFT:case xc.KeyCode.UP:r=Math.max(0,s-1);break;case xc.KeyCode.RIGHT:case xc.KeyCode.DOWN:r=Math.min(s+1,n.length-1)}if(null===r)return;const o=n[r].querySelector("button");o&&(o.focus(),e.preventDefault())}onToolPanelButtonClicked(e){const t=e.toolPanelId;this.openedItem()===t?this.openToolPanel(void 0,"sideBarButtonClicked"):this.openToolPanel(t,"sideBarButtonClicked")}clearDownUi(){this.sideBarButtonsComp.clearButtons(),this.destroyToolPanelWrappers()}setSideBarDef({sideBarDef:e,sideBarState:t,existingToolPanelWrappers:i}){if(this.setDisplayed(!1),this.sideBar=e,this.sideBar&&this.sideBar.toolPanels){const e=this.sideBar.toolPanels;if(this.createToolPanelsAndSideButtons(e,t,i),!this.toolPanelWrappers.length)return;const n=t?t.visible:!this.sideBar.hiddenByDefault;if(this.setDisplayed(n),this.setSideBarPosition(t?t.position:this.sideBar.position),n)if(t){const{openToolPanel:e}=t;e&&this.openToolPanel(e,"sideBarInitializing")}else this.openToolPanel(this.sideBar.defaultToolPanel,"sideBarInitializing")}}getDef(){return this.sideBar}setSideBarPosition(e){e||(e="right"),this.position=e;const t="left"===e,i=t?"right":"left";return this.addOrRemoveCssClass("ag-side-bar-left",t),this.addOrRemoveCssClass("ag-side-bar-right",!t),this.toolPanelWrappers.forEach(e=>{e.setResizerSizerSide(i)}),this.eventService.dispatchEvent({type:xc.Events.EVENT_SIDE_BAR_UPDATED}),this}setDisplayed(e,t){super.setDisplayed(e,t),this.eventService.dispatchEvent({type:xc.Events.EVENT_SIDE_BAR_UPDATED})}getState(){const e={};return this.toolPanelWrappers.forEach(t=>{var i,n;e[t.getToolPanelId()]=null==(n=null==(i=t.getToolPanelInstance())?void 0:i.getState)?void 0:n.call(i)}),{visible:this.isDisplayed(),position:this.position,openToolPanel:this.openedItem(),toolPanels:e}}createToolPanelsAndSideButtons(e,t,i){var n;for(const s of e)this.createToolPanelAndSideButton(s,null==(n=null==t?void 0:t.toolPanels)?void 0:n[s.id],null==i?void 0:i[s.id])}validateDef(e){if(null==e.id)return console.warn("AG Grid: please review all your toolPanel components, it seems like at least one of them doesn't have an id"),!1;if("agColumnsToolPanel"===e.toolPanel&&!xc.ModuleRegistry.__assertRegistered(xc.ModuleNames.ColumnsToolPanelModule,"Column Tool Panel",this.context.getGridId()))return!1;if("agFiltersToolPanel"===e.toolPanel){if(!xc.ModuleRegistry.__assertRegistered(xc.ModuleNames.FiltersToolPanelModule,"Filters Tool Panel",this.context.getGridId()))return!1;if(this.filterManager.isAdvancedFilterEnabled())return xc._.warnOnce("Advanced Filter does not work with Filters Tool Panel. Filters Tool Panel has been disabled."),!1}return!0}createToolPanelAndSideButton(e,t,i){if(!this.validateDef(e))return;const n=this.sideBarButtonsComp.addButtonComp(e);let s;i?s=i:(s=this.getContext().createBean(new Kc),s.setToolPanelDef(e,{initialState:t,onStateUpdated:()=>this.eventService.dispatchEvent({type:xc.Events.EVENT_SIDE_BAR_UPDATED})})),s.setDisplayed(!1);const r=s.getGui();this.appendChild(r),this.toolPanelWrappers.push(s),xc._.setAriaControls(n.getButtonElement(),r)}refresh(){this.toolPanelWrappers.forEach(e=>e.refresh())}openToolPanel(e,t="api"){const i=this.openedItem();i!==e&&(this.toolPanelWrappers.forEach(t=>{const i=e===t.getToolPanelId();t.setDisplayed(i)}),i!==this.openedItem()&&(this.sideBarButtonsComp.setActiveButton(e),this.raiseToolPanelVisibleEvent(e,null!=i?i:void 0,t)))}getToolPanelInstance(e){const t=this.toolPanelWrappers.filter(t=>t.getToolPanelId()===e)[0];if(t)return t.getToolPanelInstance();console.warn(`AG Grid: unable to lookup Tool Panel as invalid key supplied: ${e}`)}raiseToolPanelVisibleEvent(e,t,i){const n=!!e&&!!t;if(t){const e={type:xc.Events.EVENT_TOOL_PANEL_VISIBLE_CHANGED,source:i,key:t,visible:!1,switchingToolPanel:n};this.eventService.dispatchEvent(e)}if(e){const t={type:xc.Events.EVENT_TOOL_PANEL_VISIBLE_CHANGED,source:i,key:e,visible:!0,switchingToolPanel:n};this.eventService.dispatchEvent(t)}}close(e="api"){this.openToolPanel(void 0,e)}isToolPanelShowing(){return!!this.openedItem()}openedItem(){let e=null;return this.toolPanelWrappers.forEach(t=>{t.isDisplayed()&&(e=t.getToolPanelId())}),e}onSideBarUpdated(){var e;const t=Wc.parse(this.gos.get("sideBar"));let i={};t&&this.sideBar&&(null==(e=t.toolPanels)||e.forEach(e=>{var t,n;const{id:s}=e;if(!s)return;const r=null==(t=this.sideBar.toolPanels)?void 0:t.find(e=>e.id===s);if(!r||e.toolPanel!==r.toolPanel)return;const o=this.toolPanelWrappers.find(e=>e.getToolPanelId()===s);if(!o)return;const a=this.gos.addGridCommonParams((l=((e,t)=>{for(var i in t||(t={}))Nc.call(t,i)&&_c(e,i,t[i]);if(Pc)for(var i of Pc(t))Oc.call(t,i)&&_c(e,i,t[i]);return e})({},null!=(n=e.toolPanelParams)?n:{}),Rc(l,kc({onStateUpdated:()=>this.eventService.dispatchEvent({type:xc.Events.EVENT_SIDE_BAR_UPDATED})}))));var l;!0===o.getToolPanelInstance().refresh(a)&&(this.toolPanelWrappers=this.toolPanelWrappers.filter(e=>e!==o),xc._.removeFromParent(o.getGui()),i[s]=o)})),this.clearDownUi(),this.setSideBarDef({sideBarDef:t,existingToolPanelWrappers:i})}destroyToolPanelWrappers(){this.toolPanelWrappers.forEach(e=>{xc._.removeFromParent(e.getGui()),this.destroyBean(e)}),this.toolPanelWrappers.length=0}destroy(){this.destroyToolPanelWrappers(),super.destroy()}};$c.TEMPLATE='<div class="ag-side-bar ag-unselectable">\n            <ag-side-bar-buttons ref="sideBarButtons"></ag-side-bar-buttons>\n        </div>',Fc([(0,xc.Autowired)("focusService")],$c.prototype,"focusService",2),Fc([(0,xc.Autowired)("filterManager")],$c.prototype,"filterManager",2),Fc([(0,xc.Autowired)("sideBarService")],$c.prototype,"sideBarService",2),Fc([(0,xc.RefSelector)("sideBarButtons")],$c.prototype,"sideBarButtonsComp",2),Fc([xc.PostConstruct],$c.prototype,"postConstruct",1);var Yc=$c,qc=class extends Tc.BeanStub{constructor(){super(...arguments),this.isColGroupDef=e=>e&&void 0!==e.children,this.getId=e=>this.isColGroupDef(e)?e.groupId:e.colId}createColumnTree(e){const t=[],i=(e,n)=>{if(this.isColGroupDef(e)){const t=e,s=void 0!==t.groupId?t.groupId:t.headerName,r=new Tc.ProvidedColumnGroup(t,s,!1,n),o=[];return t.children.forEach(e=>{const t=i(e,n+1);t&&o.push(t)}),r.setChildren(o),r}{const i=e,n=i.colId?i.colId:i.field,s=this.columnModel.getPrimaryColumn(n);return s||t.push(i),s}},n=[];return e.forEach(e=>{const t=i(e,0);t&&n.push(t)}),t.length>0&&console.warn("AG Grid: unable to find grid columns for the supplied colDef(s):",t),n}syncLayoutWithGrid(e){const t=this.getLeafPathTrees();e(this.mergeLeafPathTrees(t))}getLeafPathTrees(){const e=(t,i)=>{let n;if(t instanceof Tc.ProvidedColumnGroup)if(t.isPadding())n=i;else{const e=Object.assign({},t.getColGroupDef());e.groupId=t.getGroupId(),e.children=[i],n=e}else{const e=Object.assign({},t.getColDef());e.colId=t.getColId(),n=e}const s=t.getOriginalParent();return s?e(s,n):n};return this.columnModel.getAllGridColumns().filter(e=>{const t=e.getColDef();return e.isPrimary()&&!t.showRowGroup}).map(t=>e(t,t.getColDef()))}mergeLeafPathTrees(e){const t=(e,t)=>this.isColGroupDef(e)&&this.isColGroupDef(t)&&this.getId(e)===this.getId(t),i=(e,t)=>{if(!this.isColGroupDef(t))return e;const n=e,s=t;return s.children&&s.groupId&&this.addChildrenToGroup(n,s.groupId,s.children[0])||s.children.forEach(e=>i(n,e)),n},n=[];for(let s=1;s<=e.length;s++){const r=e[s-1],o=e[s];t(r,o)?e[s]=i(r,o):n.push(r)}return n}addChildrenToGroup(e,t,i){if(!this.isColGroupDef(e))return!0;const n=e,s=i;if(((e,t)=>{const i=e.children.map(this.getId),n=Tc._.includes(i,this.getId(t)),s=Tc._.last(e.children),r=s&&this.getId(s)!==this.getId(t);return n&&r})(n,s))return n.children.push(s),!0;if(n.groupId===t){const e=n.children.map(this.getId);if(!Tc._.includes(e,this.getId(s)))return n.children.push(s),!0}return n.children.forEach(e=>this.addChildrenToGroup(e,t,i)),!1}};Fc([(0,Tc.Autowired)("columnModel")],qc.prototype,"columnModel",2),qc=Fc([(0,Tc.Bean)("toolPanelColDefService")],qc);var Xc=class extends Dc.BeanStub{registerSideBarComp(e){this.sideBarComp=e}getSideBarComp(){return this.sideBarComp}};Xc=Fc([(0,Dc.Bean)("sideBarService")],Xc);var Zc={version:"31.3.4",moduleName:Sc.ModuleNames.SideBarModule,beans:[qc,Xc],agStackComponents:[{componentName:"AgHorizontalResize",componentClass:Gc},{componentName:"AgSideBar",componentClass:Yc},{componentName:"AgSideBarButtons",componentClass:zc}],dependantModules:[D]},Qc=i(98092),Jc=Object.defineProperty,eh=Object.getOwnPropertyDescriptor,th=Object.getOwnPropertySymbols,ih=Object.prototype.hasOwnProperty,nh=Object.prototype.propertyIsEnumerable,sh=(e,t,i)=>t in e?Jc(e,t,{enumerable:!0,configurable:!0,writable:!0,value:i}):e[t]=i,rh=(e,t)=>{for(var i in t||(t={}))ih.call(t,i)&&sh(e,i,t[i]);if(th)for(var i of th(t))nh.call(t,i)&&sh(e,i,t[i]);return e},oh=(e,t,i,n)=>{for(var s,r=n>1?void 0:n?eh(t,i):t,o=e.length-1;o>=0;o--)(s=e[o])&&(r=(n?s(t,i,r):s(r))||r);return n&&r&&Jc(t,i,r),r},ah=class e extends fl.Component{constructor(){super(e.TEMPLATE)}postConstruct(){this.createExpandIcons(),this.addManagedListener(this.eExpand,"click",this.onExpandClicked.bind(this)),this.addManagedListener(this.eExpand,"keydown",e=>{e.key===fl.KeyCode.SPACE&&(e.preventDefault(),this.onExpandClicked())}),this.addManagedListener(this.eSelect.getInputElement(),"click",this.onSelectClicked.bind(this)),this.addManagedPropertyListener("functionsReadOnly",()=>this.onFunctionsReadOnlyPropChanged()),this.eFilterTextField.setAutoComplete(!1).onValueChange(()=>this.onFilterTextChanged()),this.addManagedListener(this.eFilterTextField.getInputElement(),"keydown",this.onMiniFilterKeyDown.bind(this)),this.addManagedListener(this.eventService,fl.Events.EVENT_NEW_COLUMNS_LOADED,this.showOrHideOptions.bind(this));const e=this.localeService.getLocaleTextFunc();this.eSelect.setInputAriaLabel(e("ariaColumnSelectAll","Toggle Select All Columns")),this.eFilterTextField.setInputAriaLabel(e("ariaFilterColumnsInput","Filter Columns Input")),this.activateTabIndex([this.eExpand])}onFunctionsReadOnlyPropChanged(){const e=this.gos.get("functionsReadOnly");this.eSelect.setReadOnly(e),this.eSelect.addOrRemoveCssClass("ag-column-select-column-readonly",e)}init(e){this.params=e;const t=this.gos.get("functionsReadOnly");this.eSelect.setReadOnly(t),this.eSelect.addOrRemoveCssClass("ag-column-select-column-readonly",t),this.columnModel.isReady()&&this.showOrHideOptions()}createExpandIcons(){this.eExpand.appendChild(this.eExpandChecked=fl._.createIconNoSpan("columnSelectOpen",this.gos)),this.eExpand.appendChild(this.eExpandUnchecked=fl._.createIconNoSpan("columnSelectClosed",this.gos)),this.eExpand.appendChild(this.eExpandIndeterminate=fl._.createIconNoSpan("columnSelectIndeterminate",this.gos)),this.setExpandState(0)}showOrHideOptions(){const e=!this.params.suppressColumnFilter,t=!this.params.suppressColumnSelectAll,i=!this.params.suppressColumnExpandAll,n=this.columnModel.isPrimaryColumnGroupsPresent(),s=this.localeService.getLocaleTextFunc();this.eFilterTextField.setInputPlaceholder(s("searchOoo","Search...")),fl._.setDisplayed(this.eFilterTextField.getGui(),e),fl._.setDisplayed(this.eSelect.getGui(),t),fl._.setDisplayed(this.eExpand,i&&n)}onFilterTextChanged(){this.onFilterTextChangedDebounced||(this.onFilterTextChangedDebounced=fl._.debounce(()=>{const e=this.eFilterTextField.getValue();this.dispatchEvent({type:"filterChanged",filterText:e})},e.DEBOUNCE_DELAY)),this.onFilterTextChangedDebounced()}onMiniFilterKeyDown(t){t.key===fl.KeyCode.ENTER&&setTimeout(()=>this.onSelectClicked(),e.DEBOUNCE_DELAY)}onSelectClicked(){this.dispatchEvent({type:this.selectState?"unselectAll":"selectAll"})}onExpandClicked(){this.dispatchEvent({type:0===this.expandState?"collapseAll":"expandAll"})}setExpandState(e){this.expandState=e,fl._.setDisplayed(this.eExpandChecked,0===this.expandState),fl._.setDisplayed(this.eExpandUnchecked,1===this.expandState),fl._.setDisplayed(this.eExpandIndeterminate,2===this.expandState)}setSelectionState(e){this.selectState=e,this.eSelect.setValue(this.selectState)}};ah.DEBOUNCE_DELAY=300,ah.TEMPLATE='<div class="ag-column-select-header" role="presentation">\n            <div ref="eExpand" class="ag-column-select-header-icon"></div>\n            <ag-checkbox ref="eSelect" class="ag-column-select-header-checkbox"></ag-checkbox>\n            <ag-input-text-field class="ag-column-select-header-filter-wrapper" ref="eFilterTextField"></ag-input-text-field>\n        </div>',oh([(0,fl.Autowired)("columnModel")],ah.prototype,"columnModel",2),oh([(0,fl.RefSelector)("eExpand")],ah.prototype,"eExpand",2),oh([(0,fl.RefSelector)("eSelect")],ah.prototype,"eSelect",2),oh([(0,fl.RefSelector)("eFilterTextField")],ah.prototype,"eFilterTextField",2),oh([fl.PostConstruct],ah.prototype,"postConstruct",1);var lh=ah,ch=class e{constructor(e,t,i,n=!1,s){this.eventService=new Cl.EventService,this.displayName=e,this.dept=i,this.group=n,n?(this.columnGroup=t,this.expanded=s,this.children=[]):this.column=t}isGroup(){return this.group}getDisplayName(){return this.displayName}getColumnGroup(){return this.columnGroup}getColumn(){return this.column}getDept(){return this.dept}isExpanded(){return!!this.expanded}getChildren(){return this.children}isPassesFilter(){return this.passesFilter}setExpanded(t){t!==this.expanded&&(this.expanded=t,this.eventService.dispatchEvent({type:e.EVENT_EXPANDED_CHANGED}))}setPassesFilter(e){this.passesFilter=e}addEventListener(e,t){this.eventService.addEventListener(e,t)}removeEventListener(e,t){this.eventService.removeEventListener(e,t)}};ch.EVENT_EXPANDED_CHANGED="expandedChanged";var hh=ch,dh=class extends bl.Component{constructor(e,t,i){super('<div class="ag-menu"></div>'),this.column=e,this.mouseEvent=t,this.parentEl=i,this.displayName=null}postConstruct(){if(this.initializeProperties(this.column),this.buildMenuItemMap(),this.column instanceof bl.Column?this.displayName=this.columnModel.getDisplayNameForColumn(this.column,"columnToolPanel"):this.displayName=this.columnModel.getDisplayNameForProvidedColumnGroup(null,this.column,"columnToolPanel"),this.isActive()){this.mouseEvent.preventDefault();const e=this.getMappedMenuItems();if(0===e.length)return;this.displayContextMenu(e)}}initializeProperties(e){e instanceof bl.ProvidedColumnGroup?this.columns=e.getLeafColumns():this.columns=[e],this.allowGrouping=this.columns.some(e=>e.isPrimary()&&e.isAllowRowGroup()),this.allowValues=this.columns.some(e=>e.isPrimary()&&e.isAllowValue()),this.allowPivoting=this.columnModel.isPivotMode()&&this.columns.some(e=>e.isPrimary()&&e.isAllowPivot())}buildMenuItemMap(){const e=this.localeService.getLocaleTextFunc();this.menuItemMap=new Map,this.menuItemMap.set("rowGroup",{allowedFunction:e=>e.isPrimary()&&e.isAllowRowGroup()&&!this.columnModel.isColumnGroupingLocked(e),activeFunction:e=>e.isRowGroupActive(),activateLabel:()=>`${e("groupBy","Group by")} ${this.displayName}`,deactivateLabel:()=>`${e("ungroupBy","Un-Group by")} ${this.displayName}`,activateFunction:()=>{const e=this.columnModel.getRowGroupColumns();this.columnModel.setRowGroupColumns(this.addColumnsToList(e),"toolPanelUi")},deActivateFunction:()=>{const e=this.columnModel.getRowGroupColumns();this.columnModel.setRowGroupColumns(this.removeColumnsFromList(e),"toolPanelUi")},addIcon:"menuAddRowGroup",removeIcon:"menuRemoveRowGroup"}),this.menuItemMap.set("value",{allowedFunction:e=>e.isPrimary()&&e.isAllowValue(),activeFunction:e=>e.isValueActive(),activateLabel:()=>e("addToValues",`Add ${this.displayName} to values`,[this.displayName]),deactivateLabel:()=>e("removeFromValues",`Remove ${this.displayName} from values`,[this.displayName]),activateFunction:()=>{const e=this.columnModel.getValueColumns();this.columnModel.setValueColumns(this.addColumnsToList(e),"toolPanelUi")},deActivateFunction:()=>{const e=this.columnModel.getValueColumns();this.columnModel.setValueColumns(this.removeColumnsFromList(e),"toolPanelUi")},addIcon:"valuePanel",removeIcon:"valuePanel"}),this.menuItemMap.set("pivot",{allowedFunction:e=>this.columnModel.isPivotMode()&&e.isPrimary()&&e.isAllowPivot(),activeFunction:e=>e.isPivotActive(),activateLabel:()=>e("addToLabels",`Add ${this.displayName} to labels`,[this.displayName]),deactivateLabel:()=>e("removeFromLabels",`Remove ${this.displayName} from labels`,[this.displayName]),activateFunction:()=>{const e=this.columnModel.getPivotColumns();this.columnModel.setPivotColumns(this.addColumnsToList(e),"toolPanelUi")},deActivateFunction:()=>{const e=this.columnModel.getPivotColumns();this.columnModel.setPivotColumns(this.removeColumnsFromList(e),"toolPanelUi")},addIcon:"pivotPanel",removeIcon:"pivotPanel"})}addColumnsToList(e){return[...e].concat(this.columns.filter(t=>-1===e.indexOf(t)))}removeColumnsFromList(e){return e.filter(e=>-1===this.columns.indexOf(e))}displayContextMenu(e){const t=this.getGui(),i=this.createBean(new bl.AgMenuList),n=this.localeService.getLocaleTextFunc();let s=()=>{};t.appendChild(i.getGui()),i.addMenuItems(e),i.addManagedListener(i,bl.AgMenuItemComponent.EVENT_CLOSE_MENU,()=>{this.parentEl.focus(),s()});const r=this.popupService.addPopup({modal:!0,eChild:t,closeOnEsc:!0,afterGuiAttached:()=>this.focusService.focusInto(i.getGui()),ariaLabel:n("ariaLabelContextMenu","Context Menu"),closedCallback:e=>{e instanceof KeyboardEvent&&this.parentEl.focus(),this.destroyBean(i)}});r&&(s=r.hideFunc),this.popupService.positionPopupUnderMouseEvent({type:"columnContextMenu",mouseEvent:this.mouseEvent,ePopup:t})}isActive(){return this.allowGrouping||this.allowValues||this.allowPivoting}getMappedMenuItems(){const e=[];for(const t of this.menuItemMap.values()){const i=this.columns.some(e=>t.allowedFunction(e)&&!t.activeFunction(e)),n=this.columns.some(e=>t.allowedFunction(e)&&t.activeFunction(e));i&&e.push({name:t.activateLabel(this.displayName),icon:bl._.createIconNoSpan(t.addIcon,this.gos,null),action:()=>t.activateFunction()}),n&&e.push({name:t.deactivateLabel(this.displayName),icon:bl._.createIconNoSpan(t.removeIcon,this.gos,null),action:()=>t.deActivateFunction()})}return e}};oh([(0,bl.Autowired)("columnModel")],dh.prototype,"columnModel",2),oh([(0,bl.Autowired)("popupService")],dh.prototype,"popupService",2),oh([(0,bl.Autowired)("focusService")],dh.prototype,"focusService",2),oh([bl.PostConstruct],dh.prototype,"postConstruct",1);var uh=class e extends yl.Component{constructor(e,t,i,n){super(),this.modelItem=e,this.allowDragging=t,this.eventType=i,this.focusWrapper=n,this.processingColumnStateChange=!1,this.modelItem=e,this.columnGroup=e.getColumnGroup(),this.columnDept=e.getDept(),this.displayName=e.getDisplayName(),this.allowDragging=t}init(){this.setTemplate(e.TEMPLATE),this.eDragHandle=yl._.createIconNoSpan("columnDrag",this.gos),this.eDragHandle.classList.add("ag-drag-handle","ag-column-select-column-group-drag-handle");const t=this.cbSelect.getGui(),i=this.cbSelect.getInputElement();t.insertAdjacentElement("afterend",this.eDragHandle),i.setAttribute("tabindex","-1"),this.eLabel.innerHTML=this.displayName?this.displayName:"",this.setupExpandContract(),this.addCssClass("ag-column-select-indent-"+this.columnDept),this.addManagedListener(this.eventService,yl.Events.EVENT_COLUMN_PIVOT_MODE_CHANGED,this.onColumnStateChanged.bind(this)),this.addManagedListener(this.eLabel,"click",this.onLabelClicked.bind(this)),this.addManagedListener(this.cbSelect,yl.Events.EVENT_FIELD_VALUE_CHANGED,this.onCheckboxChanged.bind(this)),this.addManagedListener(this.modelItem,hh.EVENT_EXPANDED_CHANGED,this.onExpandChanged.bind(this)),this.addManagedListener(this.focusWrapper,"keydown",this.handleKeyDown.bind(this)),this.addManagedListener(this.focusWrapper,"contextmenu",this.onContextMenu.bind(this)),this.setOpenClosedIcons(),this.setupDragging(),this.onColumnStateChanged(),this.addVisibilityListenersToAllChildren(),this.refreshAriaExpanded(),this.refreshAriaLabel(),this.setupTooltip(),yl.CssClassApplier.getToolPanelClassesFromColDef(this.columnGroup.getColGroupDef(),this.gos,null,this.columnGroup).forEach(e=>this.addOrRemoveCssClass(e,!0))}getColumns(){return this.columnGroup.getLeafColumns()}setupTooltip(){const e=this.columnGroup.getColGroupDef();if(!e)return;let t;"whenTruncated"===this.gos.get("tooltipShowMode")&&(t=()=>this.eLabel.scrollWidth>this.eLabel.clientWidth);const i=()=>{const i=e.headerTooltip;this.setTooltip({newTooltipText:i,location:"columnToolPanelColumnGroup",shouldDisplayTooltip:t})};i(),this.addManagedListener(this.eventService,yl.Events.EVENT_NEW_COLUMNS_LOADED,i)}getTooltipParams(){const e=super.getTooltipParams();return e.location="columnToolPanelColumnGroup",e}handleKeyDown(e){switch(e.key){case yl.KeyCode.LEFT:e.preventDefault(),this.modelItem.setExpanded(!1);break;case yl.KeyCode.RIGHT:e.preventDefault(),this.modelItem.setExpanded(!0);break;case yl.KeyCode.SPACE:e.preventDefault(),this.isSelectable()&&this.onSelectAllChanged(!this.isSelected())}}onContextMenu(e){const{columnGroup:t,gos:i}=this;if(i.get("functionsReadOnly"))return;const n=this.createBean(new dh(t,e,this.focusWrapper));this.addDestroyFunc(()=>{n.isAlive()&&this.destroyBean(n)})}addVisibilityListenersToAllChildren(){this.columnGroup.getLeafColumns().forEach(e=>{this.addManagedListener(e,yl.Column.EVENT_VISIBLE_CHANGED,this.onColumnStateChanged.bind(this)),this.addManagedListener(e,yl.Column.EVENT_VALUE_CHANGED,this.onColumnStateChanged.bind(this)),this.addManagedListener(e,yl.Column.EVENT_PIVOT_CHANGED,this.onColumnStateChanged.bind(this)),this.addManagedListener(e,yl.Column.EVENT_ROW_GROUP_CHANGED,this.onColumnStateChanged.bind(this))})}setupDragging(){if(!this.allowDragging)return void yl._.setDisplayed(this.eDragHandle,!1);let e=!this.gos.get("suppressDragLeaveHidesColumns");const t={type:yl.DragSourceType.ToolPanel,eElement:this.eDragHandle,dragItemName:this.displayName,getDefaultIconName:()=>e?yl.DragAndDropService.ICON_HIDE:yl.DragAndDropService.ICON_NOT_ALLOWED,getDragItem:()=>this.createDragItem(),onDragStarted:()=>{e=!this.gos.get("suppressDragLeaveHidesColumns");const t={type:yl.Events.EVENT_COLUMN_PANEL_ITEM_DRAG_START,column:this.columnGroup};this.eventService.dispatchEvent(t)},onDragStopped:()=>{const e={type:yl.Events.EVENT_COLUMN_PANEL_ITEM_DRAG_END};this.eventService.dispatchEvent(e)},onGridEnter:t=>{e&&this.modelItemUtils.updateColumns({columns:this.columnGroup.getLeafColumns(),visibleState:null==t?void 0:t.visibleState,pivotState:null==t?void 0:t.pivotState,eventType:this.eventType})},onGridExit:()=>{e&&this.onChangeCommon(!1)}};this.dragAndDropService.addDragSource(t,!0),this.addDestroyFunc(()=>this.dragAndDropService.removeDragSource(t))}createDragItem(){const e=this.columnGroup.getLeafColumns(),t={},i={};return e.forEach(e=>{const n=e.getId();t[n]=e.isVisible(),i[n]=this.modelItemUtils.createPivotState(e)}),{columns:e,visibleState:t,pivotState:i}}setupExpandContract(){this.eGroupClosedIcon.appendChild(yl._.createIcon("columnSelectClosed",this.gos,null)),this.eGroupOpenedIcon.appendChild(yl._.createIcon("columnSelectOpen",this.gos,null)),this.addManagedListener(this.eGroupClosedIcon,"click",this.onExpandOrContractClicked.bind(this)),this.addManagedListener(this.eGroupOpenedIcon,"click",this.onExpandOrContractClicked.bind(this));const e=new yl.TouchListener(this.eColumnGroupIcons,!0);this.addManagedListener(e,yl.TouchListener.EVENT_TAP,this.onExpandOrContractClicked.bind(this)),this.addDestroyFunc(e.destroy.bind(e))}onLabelClicked(){const e=!this.cbSelect.getValue();this.onChangeCommon(e)}onCheckboxChanged(e){this.onChangeCommon(e.selected)}getVisibleLeafColumns(){const e=[],t=i=>{i.forEach(i=>{i.isPassesFilter()&&(i.isGroup()?t(i.getChildren()):e.push(i.getColumn()))})};return t(this.modelItem.getChildren()),e}onChangeCommon(e){this.refreshAriaLabel(),this.processingColumnStateChange||this.modelItemUtils.selectAllChildren(this.modelItem.getChildren(),e,this.eventType)}refreshAriaLabel(){const e=this.localeService.getLocaleTextFunc(),t=e("ariaColumnGroup","Column Group"),i=this.cbSelect.getValue(),n=void 0===i?e("ariaIndeterminate","indeterminate"):i?e("ariaVisible","visible"):e("ariaHidden","hidden"),s=e("ariaToggleVisibility","Press SPACE to toggle visibility");yl._.setAriaLabel(this.focusWrapper,`${this.displayName} ${t}`),this.cbSelect.setInputAriaLabel(`${s} (${n})`),yl._.setAriaDescribedBy(this.focusWrapper,this.cbSelect.getInputElement().id)}onColumnStateChanged(){const e=this.workOutSelectedValue(),t=this.workOutReadOnlyValue();this.processingColumnStateChange=!0,this.cbSelect.setValue(e),this.cbSelect.setReadOnly(t),this.addOrRemoveCssClass("ag-column-select-column-group-readonly",t),this.processingColumnStateChange=!1}workOutSelectedValue(){const e=this.columnModel.isPivotMode(),t=this.getVisibleLeafColumns();let i=0,n=0;if(t.forEach(t=>{!e&&t.getColDef().lockVisible||(this.isColumnChecked(t,e)?i++:n++)}),!(i>0&&n>0))return i>0}workOutReadOnlyValue(){const e=this.columnModel.isPivotMode();let t=0;return this.columnGroup.getLeafColumns().forEach(i=>{e?i.isAnyFunctionAllowed()&&t++:i.getColDef().lockVisible||t++}),0===t}isColumnChecked(e,t){if(t){const t=e.isPivotActive(),i=e.isRowGroupActive(),n=e.isValueActive();return t||i||n}return e.isVisible()}onExpandOrContractClicked(){const e=this.modelItem.isExpanded();this.modelItem.setExpanded(!e)}onExpandChanged(){this.setOpenClosedIcons(),this.refreshAriaExpanded()}setOpenClosedIcons(){const e=this.modelItem.isExpanded();yl._.setDisplayed(this.eGroupClosedIcon,!e),yl._.setDisplayed(this.eGroupOpenedIcon,e)}refreshAriaExpanded(){yl._.setAriaExpanded(this.focusWrapper,this.modelItem.isExpanded())}getDisplayName(){return this.displayName}onSelectAllChanged(e){const t=this.cbSelect.getValue();!this.cbSelect.isReadOnly()&&(e&&!t||!e&&t)&&this.cbSelect.toggle()}isSelected(){return this.cbSelect.getValue()}isSelectable(){return!this.cbSelect.isReadOnly()}setSelected(e){this.cbSelect.setValue(e,!0)}};uh.TEMPLATE='<div class="ag-column-select-column-group" aria-hidden="true">\n            <span class="ag-column-group-icons" ref="eColumnGroupIcons" >\n                <span class="ag-column-group-closed-icon" ref="eGroupClosedIcon"></span>\n                <span class="ag-column-group-opened-icon" ref="eGroupOpenedIcon"></span>\n            </span>\n            <ag-checkbox ref="cbSelect" class="ag-column-select-checkbox"></ag-checkbox>\n            <span class="ag-column-select-column-label" ref="eLabel"></span>\n        </div>',oh([(0,yl.Autowired)("columnModel")],uh.prototype,"columnModel",2),oh([(0,yl.Autowired)("dragAndDropService")],uh.prototype,"dragAndDropService",2),oh([(0,yl.Autowired)("modelItemUtils")],uh.prototype,"modelItemUtils",2),oh([(0,yl.RefSelector)("cbSelect")],uh.prototype,"cbSelect",2),oh([(0,yl.RefSelector)("eLabel")],uh.prototype,"eLabel",2),oh([(0,yl.RefSelector)("eGroupOpenedIcon")],uh.prototype,"eGroupOpenedIcon",2),oh([(0,yl.RefSelector)("eGroupClosedIcon")],uh.prototype,"eGroupClosedIcon",2),oh([(0,yl.RefSelector)("eColumnGroupIcons")],uh.prototype,"eColumnGroupIcons",2),oh([yl.PostConstruct],uh.prototype,"init",1);var ph=uh,gh=class extends vl.BeanStub{constructor(e,t){super(),this.comp=e,this.virtualList=t}postConstruct(){this.createManagedBean(new vl.VirtualListDragFeature(this.comp,this.virtualList,{dragSourceType:vl.DragSourceType.ToolPanel,listItemDragStartEvent:vl.Events.EVENT_COLUMN_PANEL_ITEM_DRAG_START,listItemDragEndEvent:vl.Events.EVENT_COLUMN_PANEL_ITEM_DRAG_END,eventSource:this.eventService,getCurrentDragValue:e=>this.getCurrentDragValue(e),isMoveBlocked:e=>this.isMoveBlocked(e),getNumRows:e=>e.getDisplayedColsList().length,moveItem:(e,t)=>this.moveItem(e,t)}))}getCurrentDragValue(e){return e.column}isMoveBlocked(e){return!!this.gos.get("suppressMovableColumns")||!!this.getCurrentColumns(e).find(e=>{const t=e.getColDef();return!!t.suppressMovable||!!t.lockPosition})}moveItem(e,t){const i=this.getTargetIndex(e,t),n=this.getCurrentColumns(e);null!=i&&this.columnModel.moveColumns(n,i,"toolPanelUi")}getMoveDiff(e,t){const i=this.columnModel.getAllGridColumns(),n=this.getCurrentColumns(e),s=n[0],r=n.length;return i.indexOf(s)<t?r:0}getCurrentColumns(e){return e instanceof vl.ProvidedColumnGroup?e.getLeafColumns():[e]}getTargetIndex(e,t){if(!t)return null;const i=t.component;let n,s="top"===t.position;if(i instanceof ph?(n=i.getColumns()[0],s=!0):n=i.getColumn(),-1!==this.getCurrentColumns(e).indexOf(n))return null;const r=this.columnModel.getAllGridColumns().indexOf(n),o=s?r:r+1;return o-this.getMoveDiff(e,o)}};oh([(0,vl.Autowired)("columnModel")],gh.prototype,"columnModel",2),oh([vl.PostConstruct],gh.prototype,"postConstruct",1);var fh=class e extends Sl.Component{constructor(e,t,i,n){super(),this.allowDragging=t,this.groupsExist=i,this.focusWrapper=n,this.processingColumnStateChange=!1,this.column=e.getColumn(),this.columnDept=e.getDept(),this.displayName=e.getDisplayName()}init(){this.setTemplate(e.TEMPLATE),this.eDragHandle=Sl._.createIconNoSpan("columnDrag",this.gos),this.eDragHandle.classList.add("ag-drag-handle","ag-column-select-column-drag-handle");const t=this.cbSelect.getGui(),i=this.cbSelect.getInputElement();t.insertAdjacentElement("afterend",this.eDragHandle),i.setAttribute("tabindex","-1");const n=Sl._.escapeString(this.displayName);this.eLabel.innerHTML=n;const s=this.columnDept;this.groupsExist&&this.addCssClass("ag-column-select-add-group-indent"),this.addCssClass(`ag-column-select-indent-${s}`),this.setupDragging(),this.addManagedListener(this.eventService,Sl.Events.EVENT_COLUMN_PIVOT_MODE_CHANGED,this.onColumnStateChanged.bind(this)),this.addManagedListener(this.column,Sl.Column.EVENT_VALUE_CHANGED,this.onColumnStateChanged.bind(this)),this.addManagedListener(this.column,Sl.Column.EVENT_PIVOT_CHANGED,this.onColumnStateChanged.bind(this)),this.addManagedListener(this.column,Sl.Column.EVENT_ROW_GROUP_CHANGED,this.onColumnStateChanged.bind(this)),this.addManagedListener(this.column,Sl.Column.EVENT_VISIBLE_CHANGED,this.onColumnStateChanged.bind(this)),this.addManagedListener(this.focusWrapper,"keydown",this.handleKeyDown.bind(this)),this.addManagedListener(this.focusWrapper,"contextmenu",this.onContextMenu.bind(this)),this.addManagedPropertyListener("functionsReadOnly",this.onColumnStateChanged.bind(this)),this.addManagedListener(this.cbSelect,Sl.Events.EVENT_FIELD_VALUE_CHANGED,this.onCheckboxChanged.bind(this)),this.addManagedListener(this.eLabel,"click",this.onLabelClicked.bind(this)),this.onColumnStateChanged(),this.refreshAriaLabel(),this.setupTooltip(),Sl.CssClassApplier.getToolPanelClassesFromColDef(this.column.getColDef(),this.gos,this.column,null).forEach(e=>this.addOrRemoveCssClass(e,!0))}getColumn(){return this.column}setupTooltip(){let e;"whenTruncated"===this.gos.get("tooltipShowMode")&&(e=()=>this.eLabel.scrollWidth>this.eLabel.clientWidth);const t=()=>{const t=this.column.getColDef().headerTooltip;this.setTooltip({newTooltipText:t,location:"columnToolPanelColumn",shouldDisplayTooltip:e})};t(),this.addManagedListener(this.eventService,Sl.Events.EVENT_NEW_COLUMNS_LOADED,t)}getTooltipParams(){const e=super.getTooltipParams();return e.location="columnToolPanelColumn",e.colDef=this.column.getColDef(),e}onContextMenu(e){const{column:t,gos:i}=this;if(i.get("functionsReadOnly"))return;const n=this.createBean(new dh(t,e,this.focusWrapper));this.addDestroyFunc(()=>{n.isAlive()&&this.destroyBean(n)})}handleKeyDown(e){e.key===Sl.KeyCode.SPACE&&(e.preventDefault(),this.isSelectable()&&this.onSelectAllChanged(!this.isSelected()))}onLabelClicked(){if(this.gos.get("functionsReadOnly"))return;const e=!this.cbSelect.getValue();this.onChangeCommon(e)}onCheckboxChanged(e){this.onChangeCommon(e.selected)}onChangeCommon(e){this.cbSelect.isReadOnly()||(this.refreshAriaLabel(),this.processingColumnStateChange||this.modelItemUtils.setColumn(this.column,e,"toolPanelUi"))}refreshAriaLabel(){const e=this.localeService.getLocaleTextFunc(),t=e("ariaColumn","Column"),i=this.cbSelect.getValue()?e("ariaVisible","visible"):e("ariaHidden","hidden"),n=e("ariaToggleVisibility","Press SPACE to toggle visibility");Sl._.setAriaLabel(this.focusWrapper,`${this.displayName} ${t}`),this.cbSelect.setInputAriaLabel(`${n} (${i})`),Sl._.setAriaDescribedBy(this.focusWrapper,this.cbSelect.getInputElement().id)}setupDragging(){if(!this.allowDragging)return void Sl._.setDisplayed(this.eDragHandle,!1);let e=!this.gos.get("suppressDragLeaveHidesColumns");const t={type:Sl.DragSourceType.ToolPanel,eElement:this.eDragHandle,dragItemName:this.displayName,getDefaultIconName:()=>e?Sl.DragAndDropService.ICON_HIDE:Sl.DragAndDropService.ICON_NOT_ALLOWED,getDragItem:()=>this.createDragItem(),onDragStarted:()=>{e=!this.gos.get("suppressDragLeaveHidesColumns");const t={type:Sl.Events.EVENT_COLUMN_PANEL_ITEM_DRAG_START,column:this.column};this.eventService.dispatchEvent(t)},onDragStopped:()=>{const e={type:Sl.Events.EVENT_COLUMN_PANEL_ITEM_DRAG_END};this.eventService.dispatchEvent(e)},onGridEnter:t=>{e&&this.modelItemUtils.updateColumns({columns:[this.column],visibleState:null==t?void 0:t.visibleState,pivotState:null==t?void 0:t.pivotState,eventType:"toolPanelUi"})},onGridExit:()=>{e&&this.onChangeCommon(!1)}};this.dragAndDropService.addDragSource(t,!0),this.addDestroyFunc(()=>this.dragAndDropService.removeDragSource(t))}createDragItem(){const e=this.column.getColId(),t={[e]:this.column.isVisible()},i={[e]:this.modelItemUtils.createPivotState(this.column)};return{columns:[this.column],visibleState:t,pivotState:i}}onColumnStateChanged(){this.processingColumnStateChange=!0;const e=this.columnModel.isPivotMode();if(e){const e=this.column.isAnyFunctionActive();this.cbSelect.setValue(e)}else this.cbSelect.setValue(this.column.isVisible());let t=!0,i=!0;if(e){const e=this.gos.get("functionsReadOnly"),n=!this.column.isAnyFunctionAllowed();t=!e&&!n,i=t}else{const{enableRowGroup:e,enableValue:n,lockPosition:s,suppressMovable:r,lockVisible:o}=this.column.getColDef();t=!o,i=!!e||!!n||!(s||r)}this.cbSelect.setReadOnly(!t),this.eDragHandle.classList.toggle("ag-column-select-column-readonly",!i),this.addOrRemoveCssClass("ag-column-select-column-readonly",!i&&!t);const n=e&&this.gos.get("functionsPassive");this.cbSelect.setPassive(n),this.processingColumnStateChange=!1}getDisplayName(){return this.displayName}onSelectAllChanged(e){e!==this.cbSelect.getValue()&&(this.cbSelect.isReadOnly()||this.cbSelect.toggle())}isSelected(){return this.cbSelect.getValue()}isSelectable(){return!this.cbSelect.isReadOnly()}isExpandable(){return!1}setExpanded(e){console.warn("AG Grid: can not expand a column item that does not represent a column group header")}};fh.TEMPLATE='<div class="ag-column-select-column" aria-hidden="true">\n            <ag-checkbox ref="cbSelect" class="ag-column-select-checkbox"></ag-checkbox>\n            <span class="ag-column-select-column-label" ref="eLabel"></span>\n        </div>',oh([(0,Sl.Autowired)("columnModel")],fh.prototype,"columnModel",2),oh([(0,Sl.Autowired)("dragAndDropService")],fh.prototype,"dragAndDropService",2),oh([(0,Sl.Autowired)("modelItemUtils")],fh.prototype,"modelItemUtils",2),oh([(0,Sl.RefSelector)("eLabel")],fh.prototype,"eLabel",2),oh([(0,Sl.RefSelector)("cbSelect")],fh.prototype,"cbSelect",2),oh([Sl.PostConstruct],fh.prototype,"init",1);var mh=fh,vh=class{constructor(e){this.items=e}getRowCount(){return this.items.length}getRow(e){return this.items[e]}},yh=class e extends ml.Component{constructor(){super(e.TEMPLATE),this.destroyColumnItemFuncs=[],this.hasLoadedInitialState=!1,this.isInitialState=!1}destroyColumnTree(){this.allColsTree=[],this.destroyColumnItemFuncs.forEach(e=>e()),this.destroyColumnItemFuncs=[]}init(e,t,i){this.params=e,this.allowDragging=t,this.eventType=i,this.params.suppressSyncLayoutWithGrid||this.addManagedListener(this.eventService,ml.Events.EVENT_COLUMN_MOVED,this.onColumnsChanged.bind(this)),this.addManagedListener(this.eventService,ml.Events.EVENT_NEW_COLUMNS_LOADED,this.onColumnsChanged.bind(this)),[ml.Events.EVENT_COLUMN_PIVOT_CHANGED,ml.Events.EVENT_COLUMN_PIVOT_MODE_CHANGED,ml.Events.EVENT_COLUMN_ROW_GROUP_CHANGED,ml.Events.EVENT_COLUMN_VALUE_CHANGED,ml.Events.EVENT_COLUMN_VISIBLE,ml.Events.EVENT_NEW_COLUMNS_LOADED].forEach(e=>{this.addManagedListener(this.eventService,e,this.fireSelectionChangedEvent.bind(this))}),this.expandGroupsByDefault=!this.params.contractColumnSelection,this.virtualList=this.createManagedBean(new ml.VirtualList({cssIdentifier:"column-select",ariaRole:"tree"})),this.appendChild(this.virtualList.getGui()),this.virtualList.setComponentCreator((e,t)=>(ml._.setAriaLevel(t,e.getDept()+1),this.createComponentFromItem(e,t))),this.columnModel.isReady()&&this.onColumnsChanged(),this.params.suppressColumnMove||this.createManagedBean(new gh(this,this.virtualList))}createComponentFromItem(e,t){if(e.isGroup()){const i=new ph(e,this.allowDragging,this.eventType,t);return this.getContext().createBean(i),i}const i=new mh(e,this.allowDragging,this.groupsExist,t);return this.getContext().createBean(i),i}onColumnsChanged(){this.hasLoadedInitialState||(this.hasLoadedInitialState=!0,this.isInitialState=!!this.params.initialState);const e=this.getExpandedStates(),t=this.columnModel.isPivotMode();this.params.suppressSyncLayoutWithGrid||t?this.buildTreeFromProvidedColumnDefs():this.buildTreeFromWhatGridIsDisplaying(),this.setExpandedStates(e),this.markFilteredColumns(),this.flattenAndFilterModel(),this.isInitialState=!1}getDisplayedColsList(){return this.displayedColsList}getExpandedStates(){const e={};if(this.isInitialState){const{expandedGroupIds:t}=this.params.initialState;return t.forEach(t=>{e[t]=!0}),e}return this.allColsTree?(this.forEachItem(t=>{if(!t.isGroup())return;const i=t.getColumnGroup();i&&(e[i.getId()]=t.isExpanded())}),e):{}}setExpandedStates(e){if(!this.allColsTree)return;const{isInitialState:t}=this;this.forEachItem(i=>{if(!i.isGroup())return;const n=i.getColumnGroup();if(n){const s=e[n.getId()];(null!=s||t)&&i.setExpanded(!!s)}})}buildTreeFromWhatGridIsDisplaying(){this.colDefService.syncLayoutWithGrid(this.setColumnLayout.bind(this))}setColumnLayout(e){const t=this.colDefService.createColumnTree(e);this.buildListModel(t),this.groupsExist=e.some(e=>e&&void 0!==e.children),this.markFilteredColumns(),this.flattenAndFilterModel()}buildTreeFromProvidedColumnDefs(){this.buildListModel(this.columnModel.getPrimaryColumnTree()),this.groupsExist=this.columnModel.isPrimaryColumnGroupsPresent()}buildListModel(e){const t=this.onColumnExpanded.bind(this),i=e=>{e.addEventListener(hh.EVENT_EXPANDED_CHANGED,t);const i=e.removeEventListener.bind(e,hh.EVENT_EXPANDED_CHANGED,t);this.destroyColumnItemFuncs.push(i)},n=(e,t,i)=>{e.forEach(e=>{e instanceof ml.ProvidedColumnGroup?s(e,t,i):r(e,t,i)})},s=(e,t,s)=>{const r=e.getColGroupDef();if(r&&r.suppressColumnsToolPanel)return;if(e.isPadding())return void n(e.getChildren(),t,s);const o=this.columnModel.getDisplayNameForProvidedColumnGroup(null,e,"columnToolPanel"),a=new hh(o,e,t,!0,this.expandGroupsByDefault);s.push(a),i(a),n(e.getChildren(),t+1,a.getChildren())},r=(e,t,i)=>{if(e.getColDef()&&e.getColDef().suppressColumnsToolPanel)return;const n=this.columnModel.getDisplayNameForColumn(e,"columnToolPanel");i.push(new hh(n,e,t))};this.destroyColumnTree(),n(e,0,this.allColsTree)}onColumnExpanded(){this.flattenAndFilterModel()}flattenAndFilterModel(){this.displayedColsList=[];const e=t=>{t.isPassesFilter()&&(this.displayedColsList.push(t),t.isGroup()&&t.isExpanded()&&t.getChildren().forEach(e))};this.allColsTree.forEach(e),this.virtualList.setModel(new vh(this.displayedColsList));const t=this.virtualList.getLastFocusedRow();this.virtualList.refresh(),null!=t&&this.focusRowIfAlive(t),this.notifyListeners(),this.refreshAriaLabel()}refreshAriaLabel(){const e=this.localeService.getLocaleTextFunc(),t=e("ariaColumnPanelList","Column List"),i=e("columns","Columns"),n=this.displayedColsList.length;ml._.setAriaLabel(this.virtualList.getAriaElement(),`${t} ${n} ${i}`)}focusRowIfAlive(e){window.setTimeout(()=>{this.isAlive()&&this.virtualList.focusRow(e)},0)}forEachItem(e){const t=i=>{i.forEach(i=>{e(i),i.isGroup()&&t(i.getChildren())})};this.allColsTree&&t(this.allColsTree)}doSetExpandedAll(e){this.forEachItem(t=>{t.isGroup()&&t.setExpanded(e)})}setGroupsExpanded(e,t){if(!t)return void this.doSetExpandedAll(e);const i=[];this.forEachItem(n=>{if(!n.isGroup())return;const s=n.getColumnGroup().getId();t.indexOf(s)>=0&&(n.setExpanded(e),i.push(s))});const n=t.filter(e=>!ml._.includes(i,e));n.length>0&&console.warn("AG Grid: unable to find group(s) for supplied groupIds:",n)}getExpandState(){let e=0,t=0;return this.forEachItem(i=>{i.isGroup()&&(i.isExpanded()?e++:t++)}),e>0&&t>0?2:t>0?1:0}doSetSelectedAll(e){this.modelItemUtils.selectAllChildren(this.allColsTree,e,this.eventType)}getSelectionState(){let e=0,t=0;const i=this.columnModel.isPivotMode();if(this.forEachItem(n=>{if(n.isGroup())return;if(!n.isPassesFilter())return;const s=n.getColumn(),r=s.getColDef();let o;if(i){if(!s.isAllowPivot()&&!s.isAllowRowGroup()&&!s.isAllowValue())return;o=s.isValueActive()||s.isPivotActive()||s.isRowGroupActive()}else{if(r.lockVisible)return;o=s.isVisible()}o?e++:t++}),!(e>0&&t>0))return!(0===e||t>0)}setFilterText(e){this.filterText=ml._.exists(e)?e.toLowerCase():null,this.markFilteredColumns(),this.flattenAndFilterModel()}markFilteredColumns(){const e=e=>{if(!ml._.exists(this.filterText))return!0;const t=e.getDisplayName();return null==t||-1!==t.toLowerCase().indexOf(this.filterText)},t=(i,n)=>{let s=!1;if(i.isGroup()){const r=e(i);i.getChildren().forEach(e=>{const i=t(e,r||n);i&&(s=i)})}const r=!(!n&&!s)||e(i);return i.setPassesFilter(r),r};this.allColsTree.forEach(e=>t(e,!1))}notifyListeners(){this.fireGroupExpandedEvent(),this.fireSelectionChangedEvent()}fireGroupExpandedEvent(){const e=this.getExpandState();this.dispatchEvent({type:"groupExpanded",state:e})}fireSelectionChangedEvent(){if(!this.allColsTree)return;const e=this.getSelectionState();this.dispatchEvent({type:"selectionChanged",state:e})}getExpandedGroups(){const e=[];return this.allColsTree?(this.forEachItem(t=>{t.isGroup()&&t.isExpanded()&&e.push(t.getColumnGroup().getId())}),e):e}};yh.TEMPLATE='<div class="ag-column-select-list" role="presentation"></div>',oh([(0,ml.Autowired)("columnModel")],yh.prototype,"columnModel",2),oh([(0,ml.Autowired)("toolPanelColDefService")],yh.prototype,"colDefService",2),oh([(0,ml.Autowired)("modelItemUtils")],yh.prototype,"modelItemUtils",2),oh([ml.PreDestroy],yh.prototype,"destroyColumnTree",1);var Ch=yh,bh=class extends xl.Component{createTemplate(){return'<div class="ag-pivot-mode-panel">\n                <ag-toggle-button ref="cbPivotMode" class="ag-pivot-mode-select"></ag-toggle-button>\n            </div>'}init(){this.setTemplate(this.createTemplate()),this.cbPivotMode.setValue(this.columnModel.isPivotMode());const e=this.localeService.getLocaleTextFunc();this.cbPivotMode.setLabel(e("pivotMode","Pivot Mode")),this.addManagedListener(this.cbPivotMode,xl.Events.EVENT_FIELD_VALUE_CHANGED,this.onBtPivotMode.bind(this)),this.addManagedListener(this.eventService,xl.Events.EVENT_NEW_COLUMNS_LOADED,this.onPivotModeChanged.bind(this)),this.addManagedListener(this.eventService,xl.Events.EVENT_COLUMN_PIVOT_MODE_CHANGED,this.onPivotModeChanged.bind(this))}onBtPivotMode(){const e=!!this.cbPivotMode.getValue();if(e!==this.columnModel.isPivotMode()){this.gos.updateGridOptions({options:{pivotMode:e},source:"toolPanelUi"});const{api:t}=this;t&&t.refreshHeader()}}onPivotModeChanged(){const e=this.columnModel.isPivotMode();this.cbPivotMode.setValue(e)}};oh([(0,xl.Autowired)("columnModel")],bh.prototype,"columnModel",2),oh([(0,xl.Autowired)("gridApi")],bh.prototype,"api",2),oh([(0,xl.RefSelector)("cbPivotMode")],bh.prototype,"cbPivotMode",2),oh([xl.PreConstruct],bh.prototype,"init",1);var Sh=class e extends bc.Component{constructor(){super(e.TEMPLATE)}init(e,t,i){this.allowDragging=e,this.params=t,this.eventType=i,this.primaryColsHeaderPanel.init(this.params);const n=this.params.suppressColumnFilter,s=this.params.suppressColumnSelectAll;this.params.suppressColumnExpandAll&&n&&s&&this.primaryColsHeaderPanel.setDisplayed(!1),this.addManagedListener(this.primaryColsListPanel,"groupExpanded",this.onGroupExpanded.bind(this)),this.addManagedListener(this.primaryColsListPanel,"selectionChanged",this.onSelectionChange.bind(this)),this.primaryColsListPanel.init(this.params,this.allowDragging,this.eventType),this.addManagedListener(this.primaryColsHeaderPanel,"expandAll",this.onExpandAll.bind(this)),this.addManagedListener(this.primaryColsHeaderPanel,"collapseAll",this.onCollapseAll.bind(this)),this.addManagedListener(this.primaryColsHeaderPanel,"selectAll",this.onSelectAll.bind(this)),this.addManagedListener(this.primaryColsHeaderPanel,"unselectAll",this.onUnselectAll.bind(this)),this.addManagedListener(this.primaryColsHeaderPanel,"filterChanged",this.onFilterChanged.bind(this)),this.positionableFeature=new bc.PositionableFeature(this.getGui(),{minHeight:100}),this.createManagedBean(this.positionableFeature)}toggleResizable(e){this.positionableFeature.setResizable(!!e&&{bottom:!0})}onExpandAll(){this.primaryColsListPanel.doSetExpandedAll(!0)}onCollapseAll(){this.primaryColsListPanel.doSetExpandedAll(!1)}expandGroups(e){this.primaryColsListPanel.setGroupsExpanded(!0,e)}collapseGroups(e){this.primaryColsListPanel.setGroupsExpanded(!1,e)}setColumnLayout(e){this.primaryColsListPanel.setColumnLayout(e)}onFilterChanged(e){this.primaryColsListPanel.setFilterText(e.filterText)}syncLayoutWithGrid(){this.primaryColsListPanel.onColumnsChanged()}onSelectAll(){this.primaryColsListPanel.doSetSelectedAll(!0)}onUnselectAll(){this.primaryColsListPanel.doSetSelectedAll(!1)}onGroupExpanded(e){this.primaryColsHeaderPanel.setExpandState(e.state),this.params.onStateUpdated()}onSelectionChange(e){this.primaryColsHeaderPanel.setSelectionState(e.state)}getExpandedGroups(){return this.primaryColsListPanel.getExpandedGroups()}};Sh.TEMPLATE='<div class="ag-column-select">\n            <ag-primary-cols-header ref="primaryColsHeaderPanel"></ag-primary-cols-header>\n            <ag-primary-cols-list ref="primaryColsListPanel"></ag-primary-cols-list>\n        </div>',oh([(0,bc.RefSelector)("primaryColsHeaderPanel")],Sh.prototype,"primaryColsHeaderPanel",2),oh([(0,bc.RefSelector)("primaryColsListPanel")],Sh.prototype,"primaryColsListPanel",2);var wh=Sh,xh=class e extends wl.Component{constructor(){super(e.TEMPLATE),this.initialised=!1,this.childDestroyFuncs=[]}setVisible(e){super.setDisplayed(e),e&&!this.initialised&&this.init(this.params)}init(e){const t=this.gos.addGridCommonParams({suppressColumnMove:!1,suppressColumnSelectAll:!1,suppressColumnFilter:!1,suppressColumnExpandAll:!1,contractColumnSelection:!1,suppressPivotMode:!1,suppressRowGroups:!1,suppressValues:!1,suppressPivots:!1,suppressSyncLayoutWithGrid:!1});if(this.params=rh(rh({},t),e),this.isRowGroupingModuleLoaded()&&!this.params.suppressPivotMode&&(this.pivotModePanel=this.createBean(new bh),this.childDestroyFuncs.push(()=>this.destroyBean(this.pivotModePanel)),this.appendChild(this.pivotModePanel)),this.primaryColsPanel=this.createBean(new wh),this.childDestroyFuncs.push(()=>this.destroyBean(this.primaryColsPanel)),this.primaryColsPanel.init(!0,this.params,"toolPanelUi"),this.primaryColsPanel.addCssClass("ag-column-panel-column-select"),this.appendChild(this.primaryColsPanel),this.isRowGroupingModuleLoaded()){this.params.suppressRowGroups||(this.rowGroupDropZonePanel=this.createBean(new dc(!1)),this.childDestroyFuncs.push(()=>this.destroyBean(this.rowGroupDropZonePanel)),this.appendChild(this.rowGroupDropZonePanel)),this.params.suppressValues||(this.valuesDropZonePanel=this.createBean(new Cc(!1)),this.childDestroyFuncs.push(()=>this.destroyBean(this.valuesDropZonePanel)),this.appendChild(this.valuesDropZonePanel)),this.params.suppressPivots||(this.pivotDropZonePanel=this.createBean(new uc(!1)),this.childDestroyFuncs.push(()=>this.destroyBean(this.pivotDropZonePanel)),this.appendChild(this.pivotDropZonePanel)),this.setLastVisible();const e=this.addManagedListener(this.eventService,wl.Events.EVENT_COLUMN_PIVOT_MODE_CHANGED,()=>{this.resetChildrenHeight(),this.setLastVisible()});this.childDestroyFuncs.push(()=>e())}this.initialised=!0}setPivotModeSectionVisible(e){this.isRowGroupingModuleLoaded()&&(this.pivotModePanel?this.pivotModePanel.setDisplayed(e):e&&(this.pivotModePanel=this.createBean(new bh),this.getGui().insertBefore(this.pivotModePanel.getGui(),this.getGui().firstChild),this.childDestroyFuncs.push(()=>this.destroyBean(this.pivotModePanel))),this.setLastVisible())}setRowGroupsSectionVisible(e){this.isRowGroupingModuleLoaded()&&(this.rowGroupDropZonePanel?this.rowGroupDropZonePanel.setDisplayed(e):e&&(this.rowGroupDropZonePanel=this.createManagedBean(new dc(!1)),this.appendChild(this.rowGroupDropZonePanel)),this.setLastVisible())}setValuesSectionVisible(e){this.isRowGroupingModuleLoaded()&&(this.valuesDropZonePanel?this.valuesDropZonePanel.setDisplayed(e):e&&(this.valuesDropZonePanel=this.createManagedBean(new Cc(!1)),this.appendChild(this.valuesDropZonePanel)),this.setLastVisible())}setPivotSectionVisible(e){this.isRowGroupingModuleLoaded()&&(this.pivotDropZonePanel?this.pivotDropZonePanel.setDisplayed(e):e&&(this.pivotDropZonePanel=this.createManagedBean(new uc(!1)),this.appendChild(this.pivotDropZonePanel),this.pivotDropZonePanel.setDisplayed(e)),this.setLastVisible())}setResizers(){[this.primaryColsPanel,this.rowGroupDropZonePanel,this.valuesDropZonePanel,this.pivotDropZonePanel].forEach(e=>{if(!e)return;const t=e.getGui();e.toggleResizable(!t.classList.contains("ag-last-column-drop")&&!t.classList.contains("ag-hidden"))})}setLastVisible(){const e=this.getGui();Array.prototype.slice.call(e.querySelectorAll(".ag-column-drop")).forEach(e=>e.classList.remove("ag-last-column-drop"));const t=e.querySelectorAll(".ag-column-drop:not(.ag-hidden)"),i=wl._.last(t);i&&i.classList.add("ag-last-column-drop"),this.setResizers()}resetChildrenHeight(){const e=this.getGui().children;for(let t=0;t<e.length;t++){const i=e[t];i.style.removeProperty("height"),i.style.removeProperty("flex")}}isRowGroupingModuleLoaded(){return wl.ModuleRegistry.__assertRegistered(wl.ModuleNames.RowGroupingModule,"Row Grouping",this.context.getGridId())}expandColumnGroups(e){this.primaryColsPanel.expandGroups(e)}collapseColumnGroups(e){this.primaryColsPanel.collapseGroups(e)}setColumnLayout(e){this.primaryColsPanel.setColumnLayout(e)}syncLayoutWithGrid(){this.primaryColsPanel.syncLayoutWithGrid()}destroyChildren(){this.childDestroyFuncs.forEach(e=>e()),this.childDestroyFuncs.length=0,wl._.clearElement(this.getGui())}refresh(e){return this.destroyChildren(),this.init(e),!0}getState(){return{expandedGroupIds:this.primaryColsPanel.getExpandedGroups()}}destroy(){this.destroyChildren(),super.destroy()}};xh.TEMPLATE='<div class="ag-column-panel"></div>';var Eh=xh,Mh=class{selectAllChildren(e,t,i){const n=this.extractAllLeafColumns(e);this.setAllColumns(n,t,i)}setColumn(e,t,i){this.setAllColumns([e],t,i)}setAllColumns(e,t,i){this.columnModel.isPivotMode()?this.setAllPivot(e,t,i):this.setAllVisible(e,t,i)}extractAllLeafColumns(e){const t=[],i=e=>{e.forEach(e=>{e.isPassesFilter()&&(e.isGroup()?i(e.getChildren()):t.push(e.getColumn()))})};return i(e),t}setAllVisible(e,t,i){const n=[];e.forEach(e=>{e.getColDef().lockVisible||e.isVisible()!=t&&n.push({colId:e.getId(),hide:!t})}),n.length>0&&this.columnModel.applyColumnState({state:n},i)}setAllPivot(e,t,i){this.gos.get("functionsPassive")?this.setAllPivotPassive(e,t):this.setAllPivotActive(e,t,i)}setAllPivotPassive(e,t){const i=this.columnModel.getPivotColumns().slice(),n=this.columnModel.getValueColumns().slice(),s=this.columnModel.getRowGroupColumns().slice();let r=!1,o=!1,a=!1;const l=t?e=>{e.isAnyFunctionActive()||(e.isAllowValue()?(n.push(e),o=!0):e.isAllowRowGroup()?(s.push(e),r=!0):e.isAllowPivot()&&(i.push(e),a=!0))}:e=>{e.isAnyFunctionActive()&&(i.indexOf(e)>=0&&(Qc._.removeFromArray(i,e),r=!0),n.indexOf(e)>=0&&(Qc._.removeFromArray(n,e),o=!0),s.indexOf(e)>=0&&(Qc._.removeFromArray(s,e),a=!0))};if(e.forEach(l),r){const e={type:Qc.Events.EVENT_COLUMN_PIVOT_CHANGE_REQUEST,columns:i};this.eventService.dispatchEvent(e)}if(a){const e={type:Qc.Events.EVENT_COLUMN_ROW_GROUP_CHANGE_REQUEST,columns:s};this.eventService.dispatchEvent(e)}if(o){const e={type:Qc.Events.EVENT_COLUMN_VALUE_CHANGE_REQUEST,columns:s};this.eventService.dispatchEvent(e)}}setAllPivotActive(e,t,i){const n=[],s=t?e=>{if(!e.isAnyFunctionActive())if(e.isAllowValue()){const t="string"==typeof e.getAggFunc()?e.getAggFunc():this.aggFuncService.getDefaultAggFunc(e);n.push({colId:e.getId(),aggFunc:t})}else e.isAllowRowGroup()?n.push({colId:e.getId(),rowGroup:!0}):e.isAllowPivot()&&n.push({colId:e.getId(),pivot:!0})}:e=>{(e.isPivotActive()||e.isRowGroupActive()||e.isValueActive())&&n.push({colId:e.getId(),pivot:!1,rowGroup:!1,aggFunc:null})};e.forEach(s),n.length>0&&this.columnModel.applyColumnState({state:n},i)}updateColumns(e){const{columns:t,visibleState:i,pivotState:n,eventType:s}=e,r=t.map(e=>{const t=e.getColId();if(this.columnModel.isPivotMode()){const e=null==n?void 0:n[t];return{colId:t,pivot:null==e?void 0:e.pivot,rowGroup:null==e?void 0:e.rowGroup,aggFunc:null==e?void 0:e.aggFunc}}return{colId:t,hide:!(null==i?void 0:i[t])}});this.columnModel.applyColumnState({state:r},s)}createPivotState(e){return{pivot:e.isPivotActive(),rowGroup:e.isRowGroupActive(),aggFunc:e.isValueActive()?e.getAggFunc():void 0}}};oh([(0,Qc.Autowired)("aggFuncService")],Mh.prototype,"aggFuncService",2),oh([(0,Qc.Autowired)("columnModel")],Mh.prototype,"columnModel",2),oh([(0,Qc.Autowired)("gridOptionsService")],Mh.prototype,"gos",2),oh([(0,Qc.Autowired)("eventService")],Mh.prototype,"eventService",2),Mh=oh([(0,Qc.Bean)("modelItemUtils")],Mh);var Ah,Th,Dh,Ih,Rh,Lh,kh,Ph,Nh,Oh={version:"31.3.4",moduleName:gl.ModuleNames.ColumnsToolPanelModule,beans:[Mh],agStackComponents:[{componentName:"AgPrimaryColsHeader",componentClass:lh},{componentName:"AgPrimaryColsList",componentClass:Ch},{componentName:"AgPrimaryCols",componentClass:wh}],userComponents:[{componentName:"agColumnsToolPanel",componentClass:Eh}],dependantModules:[D,yc,Zc]},_h=i(98092),Fh=i(98092),Gh=i(98092),Vh=i(98092),Bh=i(98092),Hh=i(98092),zh=i(98092),Uh=i(98092),Wh=i(98092),jh=i(98092),Kh=i(98092),$h=i(98092),Yh=i(98092),qh=Object.defineProperty,Xh=Object.defineProperties,Zh=Object.getOwnPropertyDescriptor,Qh=Object.getOwnPropertyDescriptors,Jh=Object.getOwnPropertySymbols,ed=Object.prototype.hasOwnProperty,td=Object.prototype.propertyIsEnumerable,id=(e,t,i)=>t in e?qh(e,t,{enumerable:!0,configurable:!0,writable:!0,value:i}):e[t]=i,nd=(e,t)=>{for(var i in t||(t={}))ed.call(t,i)&&id(e,i,t[i]);if(Jh)for(var i of Jh(t))td.call(t,i)&&id(e,i,t[i]);return e},sd=(e,t)=>Xh(e,Qh(t)),rd=(e,t,i,n)=>{for(var s,r=n>1?void 0:n?Zh(t,i):t,o=e.length-1;o>=0;o--)(s=e[o])&&(r=(n?s(t,i,r):s(r))||r);return n&&r&&qh(t,i,r),r},od={getTemplate(e){const t=(new Date).toJSON();return{name:"cp:coreProperties",properties:{prefixedAttributes:[{prefix:"xmlns:",map:{cp:"http://schemas.openxmlformats.org/package/2006/metadata/core-properties",dc:"http://purl.org/dc/elements/1.1/",dcterms:"http://purl.org/dc/terms/",dcmitype:"http://purl.org/dc/dcmitype/",xsi:"http://www.w3.org/2001/XMLSchema-instance"}}]},children:[{name:"dc:creator",textNode:e},{name:"dc:title",textNode:"Workbook"},{name:"dcterms:created",properties:{rawMap:{"xsi:type":"dcterms:W3CDTF"}},textNode:t},{name:"dcterms:modified",properties:{rawMap:{"xsi:type":"dcterms:W3CDTF"}},textNode:t}]}}},ad={getTemplate(e){const{name:t,ContentType:i,Extension:n,PartName:s}=e;return{name:t,properties:{rawMap:{Extension:n,PartName:s,ContentType:i}}}}},ld={getTemplate(e){const t=new Array(e).fill(void 0).map((e,t)=>({name:"Override",ContentType:"application/vnd.openxmlformats-officedocument.spreadsheetml.worksheet+xml",PartName:`/xl/worksheets/sheet${t+1}.xml`})),i=_u.worksheetImages.size,n=_u.worksheetHeaderFooterImages.size,s=_u.worksheetDataTables.size,r={};_u.workbookImageIds.forEach(e=>{const t="jpg"===e.type?"jpeg":e.type;r[t]=!0});const o=new Array(i).fill(void 0).map((e,t)=>({name:"Override",ContentType:"application/vnd.openxmlformats-officedocument.drawing+xml",PartName:`/xl/drawings/drawing${t+1}.xml`})),a=new Array(s).fill(void 0).map((e,t)=>({name:"Override",ContentType:"application/vnd.openxmlformats-officedocument.spreadsheetml.table+xml",PartName:`/xl/tables/${_u.getTableNameFromIndex(t)}.xml`})),l=Object.keys(r).map(e=>({name:"Default",ContentType:`image/${e}`,Extension:e}));return n&&l.push({name:"Default",Extension:"vml",ContentType:"application/vnd.openxmlformats-officedocument.vmlDrawing"}),{name:"Types",properties:{rawMap:{xmlns:"http://schemas.openxmlformats.org/package/2006/content-types"}},children:[...l,{name:"Default",Extension:"rels",ContentType:"application/vnd.openxmlformats-package.relationships+xml"},{name:"Default",ContentType:"application/xml",Extension:"xml"},{name:"Override",ContentType:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet.main+xml",PartName:"/xl/workbook.xml"},...t,{name:"Override",ContentType:"application/vnd.openxmlformats-officedocument.theme+xml",PartName:"/xl/theme/theme1.xml"},{name:"Override",ContentType:"application/vnd.openxmlformats-officedocument.spreadsheetml.styles+xml",PartName:"/xl/styles.xml"},{name:"Override",ContentType:"application/vnd.openxmlformats-officedocument.spreadsheetml.sharedStrings+xml",PartName:"/xl/sharedStrings.xml"},...o,...a,{name:"Override",ContentType:"application/vnd.openxmlformats-package.core-properties+xml",PartName:"/docProps/core.xml"}].map(e=>ad.getTemplate(e))}}},cd={0:1,"0.00":2,"#,##0":3,"#,##0.00":4,"0%":9,"0.00%":10,"0.00E+00":11,"# ?/?":12,"# ??/??":13,"mm-dd-yy":14,"d-mmm-yy":15,"d-mmm":16,"mmm-yy":17,"h:mm AM/PM":18,"h:mm:ss AM/PM":19,"h:mm":20,"h:mm:ss":21,"m/d/yy h:mm":22,"#,##0 ;(#,##0)":37,"#,##0 ;[Red](#,##0)":38,"#,##0.00;(#,##0.00)":39,"#,##0.00;[Red](#,##0.00)":40,"mm:ss":45,"[h]:mm:ss":46,"mmss.0":47,"##0.0E+0":48,"@":49},hd=e=>Math.round(96*e/72),dd=e=>Math.ceil(9525*e),ud=(e,t)=>{if(!t)return;let i;return i="number"==typeof t?t:t({rowIndex:e}),n=i,Math.round(72*n/96);var n},pd=(e,t)=>{const i=Vh.XmlFactory.createHeader({encoding:"UTF-8",standalone:"yes"}),n=Vh.XmlFactory.createXml(e);return t?n:`${i}${n}`},gd=e=>{const t=String.fromCharCode,i=Math.floor(e/26),n=e%26;return i&&26!==e?n?i<26?t(65+i-1)+t(65+n-1):gd(i)+t(65+n-1):gd(i-1)+"Z":t(65+e-1)},fd=(e,t)=>({name:`xdr:${e}`,children:[{name:"xdr:col",textNode:t.col.toString()},{name:"xdr:colOff",textNode:t.offsetX.toString()},{name:"xdr:row",textNode:t.row.toString()},{name:"xdr:rowOff",textNode:t.offsetY.toString()}]}),md=e=>{const t=[{name:"a:ext",properties:{rawMap:{uri:"{FF2B5EF4-FFF2-40B4-BE49-F238E27FC236}"}},children:[{name:"a16:creationId",properties:{rawMap:{id:"{822E6D20-D7BC-2841-A643-D49A6EF008A2}","xmlns:a16":"http://schemas.microsoft.com/office/drawing/2014/main"}}}]}];switch(e.recolor&&e.recolor.toLowerCase()){case"grayscale":case"sepia":case"washout":t.push({name:"a:ext",properties:{rawMap:{uri:"{C183D7F6-B498-43B3-948B-1728B52AA6E4}"}},children:[{name:"adec:decorative",properties:{rawMap:{val:"0","xmlns:adec":"http://schemas.microsoft.com/office/drawing/2017/decorative"}}}]})}return{name:"a:extLst",children:t}},vd=(e,t)=>({name:"xdr:nvPicPr",children:[{name:"xdr:cNvPr",properties:{rawMap:{id:t,name:e.id,descr:null!=e.altText?e.altText:void 0}},children:[md(e)]},{name:"xdr:cNvPicPr",properties:{rawMap:{preferRelativeResize:"0"}},children:[{name:"a:picLocks"}]}]}),yd=e=>{if(!e.saturation&&!e.tint)return;const t=[];return e.saturation&&t.push({name:"a:satMod",properties:{rawMap:{val:1e3*e.saturation}}}),e.tint&&t.push({name:"a:tint",properties:{rawMap:{val:1e3*e.tint}}}),t},Cd=(e,t)=>{let i;if(e.transparency){const t=Math.min(Math.max(e.transparency,0),100);i=[{name:"a:alphaModFix",properties:{rawMap:{amt:1e5-Math.round(1e3*t)}}}]}if(e.recolor)switch(i||(i=[]),e.recolor.toLocaleLowerCase()){case"grayscale":i.push({name:"a:grayscl"});break;case"sepia":i.push((s={color:"D9C3A5",tint:50,saturation:180},{name:"a:duotone",children:[{name:"a:prstClr",properties:{rawMap:{val:(n={color:"black"}).color}},children:yd(n)},{name:"a:srgbClr",properties:{rawMap:{val:s.color}},children:yd(s)}]}));break;case"washout":i.push({name:"a:lum",properties:{rawMap:{bright:"70000",contrast:"-70000"}}})}var n,s;return{name:"xdr:blipFill",children:[{name:"a:blip",properties:{rawMap:{cstate:"print","r:embed":`rId${t}`,"xmlns:r":"http://schemas.openxmlformats.org/officeDocument/2006/relationships"}},children:i},{name:"a:stretch",children:[{name:"a:fillRect"}]}]}},bd=(e,t)=>{const i={name:"a:xfrm",children:[{name:"a:off",properties:{rawMap:{x:0,y:0}}},{name:"a:ext",properties:{rawMap:{cx:t.width,cy:t.height}}}]};if(e.rotation){const t=e.rotation;i.properties={rawMap:{rot:6e4*Math.min(Math.max(t,0),360)}}}return{name:"xdr:spPr",children:[i,{name:"a:prstGeom",properties:{rawMap:{prst:"rect"}},children:[{name:"a:avLst"}]}]}},Sd=(e,t,i,n)=>({name:"xdr:pic",children:[vd(e,t+1),Cd(e,i+1),bd(e,n)]}),wd={getTemplate(e){const{sheetIndex:t}=e,i=_u.worksheetImages.get(t),n=_u.worksheetImageIds.get(t);return{name:"xdr:wsDr",properties:{rawMap:{"xmlns:a":"http://schemas.openxmlformats.org/drawingml/2006/main","xmlns:xdr":"http://schemas.openxmlformats.org/drawingml/2006/spreadsheetDrawing"}},children:i.map((e,t)=>{const i=(e=>{e.fitCell=!!e.fitCell||!e.width||!e.height;const{position:t={},fitCell:i,width:n=0,height:s=0,totalHeight:r,totalWidth:o}=e,{offsetX:a=0,offsetY:l=0,row:c=1,rowSpan:h=1,column:d=1,colSpan:u=1}=t;return{from:{row:c-1,col:d-1,offsetX:dd(a),offsetY:dd(l)},to:{row:c-1+(i?1:h-1),col:d-1+(i?1:u-1),offsetX:dd(n+a),offsetY:dd(s+l)},height:dd(r||s),width:dd(o||n)}})(e);return{name:"xdr:twoCellAnchor",properties:{rawMap:{editAs:"absolute"}},children:[fd("from",i.from),fd("to",i.to),Sd(e,t,n.get(e.id).index,i),{name:"xdr:clientData"}]}})}}},xd={getTemplate(e,t){const{name:i,columns:n,rowCount:s,displayName:r,headerRowIndex:o,showRowStripes:a,showColumnStripes:l,showFilterButtons:c,highlightFirstColumn:h,highlightLastColumn:d}=e||{};if(!(e&&i&&Array.isArray(n)&&n.length&&s))return{name:"table"};const u=n.map((e,t)=>({name:"filterColumn",properties:{rawMap:{colId:t.toString(),hiddenButton:c[t]?0:1}}})),p=o+1,g=(t+1).toString(),f=`A${p}:${String.fromCharCode(64+n.length)}${p+s}`;return{name:"table",properties:{rawMap:{xmlns:"http://schemas.openxmlformats.org/spreadsheetml/2006/main","xmlns:mc":"http://schemas.openxmlformats.org/markup-compatibility/2006","mc:Ignorable":"xr xr3","xmlns:xr":"http://schemas.microsoft.com/office/spreadsheetml/2014/revision","xmlns:xr3":"http://schemas.microsoft.com/office/spreadsheetml/2016/revision3",name:i,displayName:t?`${r}_${t+1}`:r,ref:f,totalsRowShown:0,id:g}},children:[{name:"autoFilter",properties:{rawMap:{ref:f}},children:u},{name:"tableColumns",properties:{rawMap:{count:n.length}},children:n.map((e,t)=>({name:"tableColumn",properties:{rawMap:{id:(t+1).toString(),name:e,dataCellStyle:"Normal"}}}))},{name:"tableStyleInfo",properties:{rawMap:{name:"TableStyleLight1",showFirstColumn:h?1:0,showLastColumn:d?1:0,showRowStripes:a?1:0,showColumnStripes:l?1:0}}}]}}},Ed=e=>{const[t,i,n,s]=e;return{name:`a:${t}`,children:[{name:`a:${i}`,properties:{rawMap:{val:n,lastClr:s}}}]}},Md=()=>({name:"a:clrScheme",properties:{rawMap:{name:"Office"}},children:[Ed(["dk1","sysClr","windowText","000000"]),Ed(["lt1","sysClr","window","FFFFFF"]),Ed(["dk2","srgbClr","44546A"]),Ed(["lt2","srgbClr","E7E6E6"]),Ed(["accent1","srgbClr","4472C4"]),Ed(["accent2","srgbClr","ED7D31"]),Ed(["accent3","srgbClr","A5A5A5"]),Ed(["accent4","srgbClr","FFC000"]),Ed(["accent5","srgbClr","5B9BD5"]),Ed(["accent6","srgbClr","70AD47"]),Ed(["hlink","srgbClr","0563C1"]),Ed(["folHlink","srgbClr","954F72"])]}),Ad=e=>{const[t,i,n,s]=e;return{name:`a:${t}`,properties:{rawMap:{script:n,typeface:i,panose:s}}}},Td=()=>({name:"a:fontScheme",properties:{rawMap:{name:"Office"}},children:[{name:"a:majorFont",children:[Ad(["latin","Calibri Light",void 0,"020F0302020204030204"]),Ad(["ea",""]),Ad(["cs",""]),Ad(["font","游ゴシック Light","Jpan"]),Ad(["font","맑은 고딕","Hang"]),Ad(["font","等线 Light","Hans"]),Ad(["font","新細明體","Hant"]),Ad(["font","Times New Roman","Arab"]),Ad(["font","Times New Roman","Hebr"]),Ad(["font","Tahoma","Thai"]),Ad(["font","Nyala","Ethi"]),Ad(["font","Vrinda","Beng"]),Ad(["font","Shruti","Gujr"]),Ad(["font","MoolBoran","Khmr"]),Ad(["font","Tunga","Knda"]),Ad(["font","Raavi","Guru"]),Ad(["font","Euphemia","Cans"]),Ad(["font","Plantagenet Cherokee","Cher"]),Ad(["font","Microsoft Yi Baiti","Yiii"]),Ad(["font","Microsoft Himalaya","Tibt"]),Ad(["font","MV Boli","Thaa"]),Ad(["font","Mangal","Deva"]),Ad(["font","Gautami","Telu"]),Ad(["font","Latha","Taml"]),Ad(["font","Estrangelo Edessa","Syrc"]),Ad(["font","Kalinga","Orya"]),Ad(["font","Kartika","Mlym"]),Ad(["font","DokChampa","Laoo"]),Ad(["font","Iskoola Pota","Sinh"]),Ad(["font","Mongolian Baiti","Mong"]),Ad(["font","Times New Roman","Viet"]),Ad(["font","Microsoft Uighur","Uigh"]),Ad(["font","Sylfaen","Geor"]),Ad(["font","Arial","Armn"]),Ad(["font","Leelawadee UI","Bugi"]),Ad(["font","Microsoft JhengHei","Bopo"]),Ad(["font","Javanese Text","Java"]),Ad(["font","Segoe UI","Lisu"]),Ad(["font","Myanmar Text","Mymr"]),Ad(["font","Ebrima","Nkoo"]),Ad(["font","Nirmala UI","Olck"]),Ad(["font","Ebrima","Osma"]),Ad(["font","Phagspa","Phag"]),Ad(["font","Estrangelo Edessa","Syrn"]),Ad(["font","Estrangelo Edessa","Syrj"]),Ad(["font","Estrangelo Edessa","Syre"]),Ad(["font","Nirmala UI","Sora"]),Ad(["font","Microsoft Tai Le","Tale"]),Ad(["font","Microsoft New Tai Lue","Talu"]),Ad(["font","Ebrima","Tfng"])]},{name:"a:minorFont",children:[Ad(["latin","Calibri",void 0,"020F0502020204030204"]),Ad(["ea",""]),Ad(["cs",""]),Ad(["font","游ゴシック","Jpan"]),Ad(["font","맑은 고딕","Hang"]),Ad(["font","等线","Hans"]),Ad(["font","新細明體","Hant"]),Ad(["font","Arial","Arab"]),Ad(["font","Arial","Hebr"]),Ad(["font","Tahoma","Thai"]),Ad(["font","Nyala","Ethi"]),Ad(["font","Vrinda","Beng"]),Ad(["font","Shruti","Gujr"]),Ad(["font","DaunPenh","Khmr"]),Ad(["font","Tunga","Knda"]),Ad(["font","Raavi","Guru"]),Ad(["font","Euphemia","Cans"]),Ad(["font","Plantagenet Cherokee","Cher"]),Ad(["font","Microsoft Yi Baiti","Yiii"]),Ad(["font","Microsoft Himalaya","Tibt"]),Ad(["font","MV Boli","Thaa"]),Ad(["font","Mangal","Deva"]),Ad(["font","Gautami","Telu"]),Ad(["font","Latha","Taml"]),Ad(["font","Estrangelo Edessa","Syrc"]),Ad(["font","Kalinga","Orya"]),Ad(["font","Kartika","Mlym"]),Ad(["font","DokChampa","Laoo"]),Ad(["font","Iskoola Pota","Sinh"]),Ad(["font","Mongolian Baiti","Mong"]),Ad(["font","Arial","Viet"]),Ad(["font","Microsoft Uighur","Uigh"]),Ad(["font","Sylfaen","Geor"]),Ad(["font","Arial","Armn"]),Ad(["font","Leelawadee UI","Bugi"]),Ad(["font","Microsoft JhengHei","Bopo"]),Ad(["font","Javanese Text","Java"]),Ad(["font","Segoe UI","Lisu"]),Ad(["font","Myanmar Text","Mymr"]),Ad(["font","Ebrima","Nkoo"]),Ad(["font","Nirmala UI","Olck"]),Ad(["font","Ebrima","Osma"]),Ad(["font","Phagspa","Phag"]),Ad(["font","Estrangelo Edessa","Syrn"]),Ad(["font","Estrangelo Edessa","Syrj"]),Ad(["font","Estrangelo Edessa","Syre"]),Ad(["font","Nirmala UI","Sora"]),Ad(["font","Microsoft Tai Le","Tale"]),Ad(["font","Microsoft New Tai Lue","Talu"]),Ad(["font","Ebrima","Tfng"])]}]}),Dd=(e,t,i)=>({name:`a:${e}`,properties:{rawMap:{val:t}},children:i}),Id=e=>{const[t,i,n,s,r,o]=e,a=[];return a.push(Dd("satMod",n)),s&&a.push(Dd("lumMod",s)),r&&a.push(Dd("tint",r)),o&&a.push(Dd("shade",o)),{name:"a:gs",properties:{rawMap:{pos:t}},children:[{name:"a:schemeClr",properties:{rawMap:{val:i}},children:a}]}},Rd=(e,t)=>({name:"a:solidFill",children:[Dd("schemeClr",e,t)]}),Ld=e=>{const[t,i,n,s,r]=e,[o,a]=r;return{name:"a:gradFill",properties:{rawMap:{rotWithShape:t}},children:[{name:"a:gsLst",children:[Id(i),Id(n),Id(s)]},{name:"a:lin",properties:{rawMap:{ang:o,scaled:a}}}]}},kd=e=>{const[t,i,n,s]=e;return{name:"a:ln",properties:{rawMap:{w:t,cap:i,cmpd:n,algn:s}},children:[Rd("phClr"),Dd("prstDash","solid"),{name:"a:miter",properties:{rawMap:{lim:"800000"}}}]}},Pd=e=>{const t=[];if(e){const[i,n,s,r,o]=e;t.push({name:"a:outerShdw",properties:{rawMap:{blurRad:i,dist:n,dir:s,algn:r,rotWithShape:o}},children:[Dd("srgbClr","000000",[Dd("alpha","63000")])]})}return{name:"a:effectStyle",children:[Object.assign({},{name:"a:effectLst"},t.length?{children:t}:{})]}},Nd=()=>({name:"a:fmtScheme",properties:{rawMap:{name:"Office"}},children:[{name:"a:fillStyleLst",children:[Rd("phClr"),Ld(["1",["0","phClr","105000","110000","67000"],["50000","phClr","103000","105000","73000"],["100000","phClr","109000","105000","81000"],["5400000","0"]]),Ld(["1",["0","phClr","103000","102000","94000"],["50000","phClr","110000","100000",void 0,"100000"],["100000","phClr","120000","99000",void 0,"78000"],["5400000","0"]])]},{name:"a:lnStyleLst",children:[kd(["6350","flat","sng","ctr"]),kd(["12700","flat","sng","ctr"]),kd(["19050","flat","sng","ctr"])]},{name:"a:effectStyleLst",children:[Pd(),Pd(),Pd(["57150","19050","5400000","ctr","0"])]},{name:"a:bgFillStyleLst",children:[Rd("phClr"),Rd("phClr",[Dd("tint","95000"),Dd("satMod","170000")]),Ld(["1",["0","phClr","150000","102000","93000","98000"],["50000","phClr","130000","103000","98000","90000"],["100000","phClr","120000",void 0,void 0,"63000"],["5400000","0"]])]}]}),Od=()=>({name:"a:themeElements",children:[Md(),Td(),Nd()]}),_d=()=>({name:"a:theme",properties:{prefixedAttributes:[{prefix:"xmlns:",map:{a:"http://schemas.openxmlformats.org/drawingml/2006/main"}}],rawMap:{name:"Office Theme"}},children:[Od(),{name:"a:objectDefaults"},{name:"a:extraClrSchemeLst"}]}),Fd=e=>{const t=[];for(const i of e.keys()){const e=i.toString(),n={name:"t",textNode:Bh._.escapeString(e)};e.trim().length!==e.length&&(n.properties={rawMap:{"xml:space":"preserve"}}),t.push({name:"si",children:[n]})}return t},Gd=e=>({name:"sst",properties:{rawMap:{xmlns:"http://schemas.openxmlformats.org/spreadsheetml/2006/main",count:e.size,uniqueCount:e.size}},children:Fd(e)}),Vd={getTemplate(e){let{formatCode:t,numFmtId:i}=e;return t.length&&(t=function(e){const t=e.split(/(\[[^\]]*\])/);for(let e=0;e<t.length;e++){let i=t[e];i.length&&(i.startsWith("[")||(i=i.replace(/\$/g,'"$"')),t[e]=Hh._.escapeString(i))}return t.join("")}(t)),{name:"numFmt",properties:{rawMap:{formatCode:t,numFmtId:i}}}}},Bd=e=>({name:"numFmts",properties:{rawMap:{count:e.length}},children:e.map(e=>Vd.getTemplate(e))}),Hd={getTemplate(e){const{size:t,colorTheme:i,color:n="FF000000",fontName:s="Calibri",family:r,scheme:o,italic:a,bold:l,strikeThrough:c,outline:h,shadow:d,underline:u,verticalAlign:p}=e,g=[{name:"sz",properties:{rawMap:{val:t}}},{name:"color",properties:{rawMap:{theme:i,rgb:n}}},{name:"name",properties:{rawMap:{val:s}}}];return r&&g.push({name:"family",properties:{rawMap:{val:r}}}),o&&g.push({name:"scheme",properties:{rawMap:{val:o}}}),a&&g.push({name:"i"}),l&&g.push({name:"b"}),c&&g.push({name:"strike"}),h&&g.push({name:"outline"}),d&&g.push({name:"shadow"}),u&&g.push({name:"u",properties:{rawMap:{val:u}}}),p&&g.push({name:"vertAlign",properties:{rawMap:{val:p}}}),{name:"font",children:g}}},zd=e=>({name:"fonts",properties:{rawMap:{count:e.length}},children:e.map(e=>Hd.getTemplate(e))}),Ud={getTemplate(e){const{patternType:t,fgTheme:i,fgTint:n,fgRgb:s,bgRgb:r,bgIndexed:o}=e,a={name:"patternFill",properties:{rawMap:{patternType:t}}};return(i||n||s)&&(a.children=[{name:"fgColor",properties:{rawMap:{theme:i,tint:n,rgb:s}}}]),(o||r)&&(a.children||(a.children=[]),a.children.push({name:"bgColor",properties:{rawMap:{indexed:o,rgb:r}}})),{name:"fill",children:[a]}}},Wd=e=>({name:"fills",properties:{rawMap:{count:e.length}},children:e.map(e=>Ud.getTemplate(e))}),jd={None:"None",Dot:"Dotted",Dash:"Dashed",Double:"Double",DashDot:"DashDot",DashDotDot:"DashDotDot",SlantDashDot:"SlantDashDot"},Kd=["Dashed","DashDot","DashDotDot"],$d={None:"none",Solid:"solid",Gray50:"mediumGray",Gray75:"darkGray",Gray25:"lightGray",HorzStripe:"darkHorizontal",VertStripe:"darkVertical",ReverseDiagStripe:"darkDown",DiagStripe:"darkUp",DiagCross:"darkGrid",ThickDiagCross:"darkTrellis",ThinHorzStripe:"lightHorizontal",ThinVertStripe:"lightVertical",ThinReverseDiagStripe:"lightDown",ThinDiagStripe:"lightUp",ThinHorzCross:"lightGrid",ThinDiagCross:"lightTrellis",Gray125:"gray125",Gray0625:"gray0625"},Yd={Automatic:"general",Left:"left",Center:"center",Right:"right",Fill:"fill",Justify:"justify",CenterAcrossSelection:"centerContinuous",Distributed:"distributed",JustifyDistributed:"justify"},qd={Automatic:void 0,Top:"top",Bottom:"bottom",Center:"center",Justify:"justify",Distributed:"distributed",JustifyDistributed:"justify"},Xd=e=>null==e?e:("#"===e.charAt(0)&&(e=e.substring(1)),6===e.length?"FF"+e:e),Zd=(e,t)=>{if(!e)return"thin";const i=(e=>{switch(e){case 1:return"thin";case 2:return"medium";case 3:return"thick";default:return"hair"}})(t),n=jd[e];return"Continuous"===e?i:"medium"===i&&-1!==Kd.indexOf(n)?`medium${n}`:n.charAt(0).toLowerCase()+n.substring(1)},Qd=e=>Yd[e]||"general",Jd=e=>qd[e]||void 0,eu=e=>({name:"color",properties:{rawMap:{rgb:Xd(e||"#000000")}}}),tu={getTemplate(e){const{left:t,right:i,top:n,bottom:s,diagonal:r}=e,o=t?[eu(t.color)]:void 0,a=i?[eu(i.color)]:void 0,l=n?[eu(n.color)]:void 0,c=s?[eu(s.color)]:void 0,h=r?[eu(r.color)]:void 0;return{name:"border",children:[{name:"left",properties:{rawMap:{style:t&&t.style}},children:o},{name:"right",properties:{rawMap:{style:i&&i.style}},children:a},{name:"top",properties:{rawMap:{style:n&&n.style}},children:l},{name:"bottom",properties:{rawMap:{style:s&&s.style}},children:c},{name:"diagonal",properties:{rawMap:{style:r&&r.style}},children:h}]}}},iu=e=>({name:"borders",properties:{rawMap:{count:e.length}},children:e.map(e=>tu.getTemplate(e))}),nu=e=>{const t=["Context","LeftToRight","RightToLeft"].indexOf(e);return Math.max(t,0)},su={getTemplate(e){const{horizontal:t,indent:i,readingOrder:n,rotate:s,shrinkToFit:r,vertical:o,wrapText:a}=e;return{name:"alignment",properties:{rawMap:{horizontal:t&&Qd(t),indent:i,readingOrder:n&&nu(n),textRotation:s,shrinkToFit:r,vertical:o&&Jd(o),wrapText:a}}}}},ru={getTemplate(e){const t=!1===e.protected?0:1;return{name:"protection",properties:{rawMap:{hidden:!0===e.hideFormula?1:0,locked:t}}}}},ou={getTemplate(e){const{alignment:t,borderId:i,fillId:n,fontId:s,numFmtId:r,protection:o,quotePrefix:a,xfId:l}=e,c=[];return t&&c.push(su.getTemplate(t)),o&&c.push(ru.getTemplate(o)),{name:"xf",properties:{rawMap:{applyAlignment:t?1:void 0,applyProtection:o?1:void 0,applyBorder:i?1:void 0,applyFill:n?1:void 0,borderId:i,fillId:n,applyFont:s?1:void 0,fontId:s,applyNumberFormat:r?1:void 0,numFmtId:r,quotePrefix:a?1:void 0,xfId:l}},children:c.length?c:void 0}}},au=e=>({name:"cellStyleXfs",properties:{rawMap:{count:e.length}},children:e.map(e=>ou.getTemplate(e))}),lu=e=>({name:"cellXfs",properties:{rawMap:{count:e.length}},children:e.map(e=>ou.getTemplate(e))}),cu={getTemplate(e){const{builtinId:t,name:i,xfId:n}=e;return{name:"cellStyle",properties:{rawMap:{builtinId:t,name:i,xfId:n}}}}},hu=e=>({name:"cellStyles",properties:{rawMap:{count:e.length}},children:e.map(e=>cu.getTemplate(e))}),du=(e,t)=>(-1!==e.indexOf("mixedStyle")&&t>1&&(e+=`_${t}`),e),uu=()=>{Ah={base:0},Th=[],Dh=[{fontName:"Calibri",colorTheme:"1",family:"2",scheme:"minor"}],Ih=[{patternType:"none"},{patternType:"gray125"}],Rh=[{left:void 0,right:void 0,top:void 0,bottom:void 0,diagonal:void 0}],Lh=[{borderId:0,fillId:0,fontId:0,numFmtId:0}],kh=[{borderId:0,fillId:0,fontId:0,numFmtId:0,xfId:0}],Ph=[{builtinId:0,name:"Normal",xfId:0}]},pu=e=>{const{alignment:t,borders:i,font:n,interior:s,numberFormat:r,protection:o,quotePrefix:a}=e;let{id:l}=e,c=0,h=0,d=0,u=0;l&&(l=du(l,Nh),null==Ah[l]&&(s&&(c=(e=>{const t=(i=e.pattern)?$d[i]||i:"none";var i;const n=Xd(e.color),s=Xd(e.patternColor);let r=Ih.findIndex(e=>{const{patternType:i,fgRgb:r,bgRgb:o}=e;return i==t&&r==n&&o==s});return-1===r&&(r=Ih.length,Ih.push({patternType:t,fgRgb:n,bgRgb:s})),r})(s)),i&&(h=(e=>{const{borderBottom:t,borderTop:i,borderLeft:n,borderRight:s}=e;let r,o,a,l,c,h,d,u;n&&(a=Zd(n.lineStyle,n.weight),d=Xd(n.color)),s&&(l=Zd(s.lineStyle,s.weight),u=Xd(s.color)),t&&(r=Zd(t.lineStyle,t.weight),c=Xd(t.color)),i&&(o=Zd(i.lineStyle,i.weight),h=Xd(i.color));let p=Rh.findIndex(e=>{const{left:t,right:i,top:n,bottom:s}=e;if(!t&&(a||d))return!1;if(!i&&(l||u))return!1;if(!n&&(o||h))return!1;if(!s&&(r||c))return!1;const{style:p,color:g}=t||{},{style:f,color:m}=i||{},{style:v,color:y}=n||{},{style:C,color:b}=s||{};return p==a&&g==d&&f==l&&m==u&&v==o&&y==h&&C==r&&b==c});return-1===p&&(p=Rh.length,Rh.push({left:{style:a,color:d},right:{style:l,color:u},top:{style:o,color:h},bottom:{style:r,color:c},diagonal:{style:void 0,color:void 0}})),p})(i)),n&&(d=(e=>{const{fontName:t="Calibri",color:i,size:n,bold:s,italic:r,outline:o,shadow:a,strikeThrough:l,underline:c,family:h,verticalAlign:d}=e,u=Xd(i),p=(e=>{if(void 0===e)return;const t=["Automatic","Roman","Swiss","Modern","Script","Decorative"].indexOf(e||"Automatic");return Math.max(t,0)})(h),g=c?c.toLocaleLowerCase():void 0,f=d?d.toLocaleLowerCase():void 0;let m=Dh.findIndex(e=>e.fontName==t&&e.color==u&&e.size==n&&e.bold==s&&e.italic==r&&e.outline==o&&e.shadow==a&&e.strikeThrough==l&&e.underline==g&&e.verticalAlign==f&&e.family==p);return-1===m&&(m=Dh.length,Dh.push({fontName:t,color:u,size:n,bold:s,italic:r,outline:o,shadow:a,strikeThrough:l,underline:g,verticalAlign:f,family:null!=p?p.toString():void 0})),m})(n)),r&&(u=(e=>{if(cd[e])return cd[e];let t=Th.findIndex(t=>t.formatCode===e);return-1===t?(t=Th.length+164,Th.push({formatCode:e,numFmtId:t})):t=Th[t].numFmtId,t})(r.format)),Ah[l]=kh.length,kh.push({alignment:t,borderId:h||0,fillId:c||0,fontId:d||0,numFmtId:u||0,protection:o,quotePrefix:a,xfId:0})))},gu=(e,t)=>Ah[du(e,t)]||0,fu={getTemplate(e){const t=Bd(Th),i=zd(Dh.map(t=>sd(nd({},t),{size:null!=t.size?t.size:e}))),n=Wd(Ih),s=iu(Rh),r=au(Lh),o=lu(kh),a=hu(Ph);return uu(),{name:"styleSheet",properties:{rawMap:{"mc:Ignorable":"x14ac x16r2 xr",xmlns:"http://schemas.openxmlformats.org/spreadsheetml/2006/main","xmlns:mc":"http://schemas.openxmlformats.org/markup-compatibility/2006","xmlns:x14ac":"http://schemas.microsoft.com/office/spreadsheetml/2009/9/ac","xmlns:x16r2":"http://schemas.microsoft.com/office/spreadsheetml/2015/02/main","xmlns:xr":"http://schemas.microsoft.com/office/spreadsheetml/2014/revision"}},children:[t,i,n,s,r,o,a,{name:"tableStyles",properties:{rawMap:{count:0,defaultPivotStyle:"PivotStyleLight16",defaultTableStyle:"TableStyleMedium2"}}}]}}},mu={getTemplate(e,t){const i=(t+1).toString();return{name:"sheet",properties:{rawMap:{name:e,sheetId:i,"r:id":`rId${i}`}}}}},vu=e=>({name:"sheets",children:e.map((e,t)=>mu.getTemplate(e,t))}),yu=e=>({name:"workbook",properties:{prefixedAttributes:[{prefix:"xmlns:",map:{r:"http://schemas.openxmlformats.org/officeDocument/2006/relationships"}}],rawMap:{xmlns:"http://schemas.openxmlformats.org/spreadsheetml/2006/main"}},children:[vu(e)]}),Cu={getTemplate(e){const{min:t,max:i,outlineLevel:n,s,width:r,hidden:o,bestFit:a}=e;let l=1,c="0";return r>1&&(l=(e=>Math.ceil((e-12)/7+1))(r),c="1"),{name:"col",properties:{rawMap:{min:t,max:i,outlineLevel:null!=n?n:void 0,width:l,style:s,hidden:o?"1":"0",bestFit:a?"1":"0",customWidth:c}}}}},bu={getTemplate(e,t,i){const{ref:n,data:s,styleId:r}=e,{type:o,value:a}=s||{type:"empty",value:null};let l=o;"f"===o?l="str":o.charAt(0)===o.charAt(0).toUpperCase()&&(l=(e=>{const t=e.charAt(0).toLowerCase();return"s"===t?"inlineStr":t})(o));const c={name:"c",properties:{rawMap:{r:n,t:"empty"===l?void 0:l,s:r?gu(r,i):void 0}}};if("empty"===l)return c;let h;return h="str"===l&&"f"===o?[{name:"f",textNode:Uh._.escapeString(a)}]:"inlineStr"===l?[{name:"is",children:[{name:"t",textNode:Uh._.escapeString(a)}]}]:[{name:"v",textNode:a}],Object.assign({},c,{children:h})}},Su=e=>{var t;return""!==(null==(t=e.data)?void 0:t.value)||void 0!==e.styleId},wu={getTemplate(e,t,i){const{collapsed:n,hidden:s,height:r,outlineLevel:o,cells:a=[]}=e;return((e,t)=>{const i=[];let n=0;for(let t=0;t<e.length;t++){const s=e[t];s.mergeAcross&&(i.push({pos:t,excelPos:n}),n+=s.mergeAcross),n++}if(i.length)for(let n=i.length-1;n>=0;n--){const s=[],r=e[i[n].pos];for(let e=1;e<=r.mergeAcross;e++)s.push({ref:`${gd(i[n].excelPos+1+e)}${t+1}`,styleId:r.styleId,data:{type:"empty",value:null}});s.length&&e.splice(i[n].pos+1,0,...s)}})(a,t),{name:"row",properties:{rawMap:{r:t+1,collapsed:n?"1":"0",hidden:s?"1":"0",ht:r,customHeight:null!=r?"1":"0",spans:"1:1",outlineLevel:o||void 0}},children:a.filter(Su).map((e,t)=>bu.getTemplate(e,t,i))}}},xu=e=>({name:"mergeCell",properties:{rawMap:{ref:e}}}),Eu=e=>{if(null==e)return 1;const t=["Letter","Letter Small","Tabloid","Ledger","Legal","Statement","Executive","A3","A4","A4 Small","A5","A6","B4","B5","Folio","Envelope","Envelope DL","Envelope C5","Envelope B5","Envelope C3","Envelope C4","Envelope C6","Envelope Monarch","Japanese Postcard","Japanese Double Postcard"].indexOf(e);return-1===t?1:t+1},Mu=(e,t,i)=>e.reduce((e,n,s)=>{const r="Center"===(o=n.position)?"C":"Right"===o?"R":"L";var o;const a=(l=`${e}&amp;${r}`,(c=n.font)?(l+="&amp;&quot;",l+=c.fontName||"Calibri",c.bold!==c.italic?l+=c.bold?",Bold":",Italic":c.bold?l+=",Bold Italic":l+=",Regular",l+="&quot;",c.size&&(l+=`&amp;${c.size}`),c.strikeThrough&&(l+="&amp;S"),c.underline&&(l+="&amp;"+("Double"===c.underline?"E":"U")),c.color&&(l+=`&amp;K${c.color.replace("#","").toUpperCase()}`),l):l);var l,c;n.position||(n.position=["Left","Center","Right"][s]);const{image:h}=n;if("&[Picture]"===n.value&&h){const e=`${r}${t}${i}`;_u.addHeaderFooterImageToMap(h,e)}return`${a}${zh._.escapeString((d=n.value,zh._.iterateObject({"&[Page]":"&P","&[Pages]":"&N","&[Date]":"&D","&[Time]":"&T","&[Tab]":"&A","&[Path]":"&Z","&[File]":"&F","&[Picture]":"&G"},(e,t)=>{d=d.replace(e,t)}),d))}`;var d},""),Au=e=>{const t=[];return["all","first","even"].forEach(i=>{const n=e[i],s="all"===i?"odd":i;if(n)for(const[e,r]of Object.entries(n)){const n=`${e.charAt(0).toUpperCase()}${e.slice(1)}`,o=e[0].toUpperCase();if(r){const e="all"===i?"":i.toUpperCase();t.push({name:`${s}${n}`,properties:{rawMap:{"xml:space":"preserve"}},textNode:Mu(r,o,e)})}}}),t},Tu={getTemplate(e){const{worksheet:t,currentSheet:i,config:n}=e,{margins:s={},pageSetup:r,headerFooterConfig:o,suppressColumnOutline:a}=n,{table:l}=t,{rows:c,columns:h}=l,d=h&&h.length?((e,t,i)=>{const n=[],s=[];e.forEach((e,i)=>{const r=e.cells;let o,a=0;r.forEach((e,r)=>{const l=r+a+1,c=gd(l),h=i+1;if(e.mergeAcross){a+=e.mergeAcross;const t=gd(r+a+1);n.push(`${c}${h}:${t}${h}`)}t[l-1]||(t[l-1]={});const{collapsibleRanges:d}=e;d&&d.forEach(e=>{s.push([l+e[0],l+e[1]])}),o=t[l-1],o.min=l,o.max=l,e.ref=`${c}${h}`})}),s.sort((e,t)=>e[0]!==t[0]?e[0]-t[0]:t[1]-e[1]);const r=new Map,o=new Map;return s.filter(e=>{const t=e.toString();return!r.get(t)&&(r.set(t,!0),!0)}).forEach(e=>{const n=t.find(t=>t.min==e[0]&&t.max==e[1]),s=o.get(e[0]);t.push({min:e[0],max:e[1],outlineLevel:i?void 0:s||1,width:(n||{width:100}).width}),o.set(e[0],(s||0)+1)}),n})(c,h,!!a):[],{worksheetDataTables:u}=_u,p=u.get(i),g=zh._.compose(e=>(e.children.push({name:"sheetPr",children:[{name:"outlinePr",properties:{rawMap:{summaryBelow:0}}}]}),e),(e=>t=>{const i=e.reduce((e,t)=>t.outlineLevel&&t.outlineLevel>e?t.outlineLevel:e,0);return t.children.push({name:"sheetFormatPr",properties:{rawMap:{baseColWidth:10,defaultRowHeight:16,outlineLevelRow:i||void 0}}}),t})(c),(e=>t=>(e.length&&t.children.push({name:"cols",children:e.map(e=>Cu.getTemplate(e))}),t))(h),((e,t)=>i=>(e.length&&i.children.push({name:"sheetData",children:e.map((e,i)=>wu.getTemplate(e,i,t))}),i))(c,i+1),(m=d,e=>(m.length&&e.children.push({name:"mergeCells",properties:{rawMap:{count:m.length}},children:m.map(e=>xu(e))}),e)),(e=>t=>{const{top:i=.75,right:n=.7,bottom:s=.75,left:r=.7,header:o=.3,footer:a=.3}=e;return t.children.push({name:"pageMargins",properties:{rawMap:{bottom:s,footer:a,header:o,left:r,right:n,top:i}}}),t})(s),(e=>t=>{var i;return e&&t.children.push({name:"pageSetup",properties:{rawMap:{horizontalDpi:0,verticalDpi:0,orientation:(i=e.orientation,!i||"Portrait"!==i&&"Landscape"!==i?"portrait":i.toLocaleLowerCase()),paperSize:Eu(e.pageSize)}}}),t})(r),(e=>t=>{if(!e)return t;const i=null!=e.first?1:0,n=null!=e.even?1:0;return t.children.push({name:"headerFooter",properties:{rawMap:{differentFirst:i,differentOddEven:n}},children:Au(e)}),t})(o),(e=>t=>{const i=_u.worksheetImages.get(e);return(null==i?void 0:i.length)&&t.children.push({name:"drawing",properties:{rawMap:{"r:id":"rId"+ ++t.rIdCounter}}}),t})(i),(e=>t=>(_u.worksheetHeaderFooterImages.get(e)&&t.children.push({name:"legacyDrawingHF",properties:{rawMap:{"r:id":"rId"+ ++t.rIdCounter}}}),t))(i),(f=p,e=>(f&&e.children.push({name:"tableParts",properties:{rawMap:{count:"1"}},children:[{name:"tablePart",properties:{rawMap:{"r:id":"rId"+ ++e.rIdCounter}}}]}),e)));var f,m;const{children:v}=g({children:[],rIdCounter:0});return{name:"worksheet",properties:{prefixedAttributes:[{prefix:"xmlns:",map:{r:"http://schemas.openxmlformats.org/officeDocument/2006/relationships"}}],rawMap:{xmlns:"http://schemas.openxmlformats.org/spreadsheetml/2006/main"}},children:v}}},Du={getTemplate(e){const{Id:t,Type:i,Target:n}=e;return{name:"Relationship",properties:{rawMap:{Id:t,Type:i,Target:n}}}}},Iu=e=>({name:"Relationships",properties:{rawMap:{xmlns:"http://schemas.openxmlformats.org/package/2006/relationships"}},children:e.map(e=>Du.getTemplate(e))}),Ru=e=>{const{aspectratio:t,rotation:i}=e||{},n={};return t&&(n.aspectratio="t"),i&&(n.rotation="t"),{name:"o:lock",properties:{prefixedAttributes:[{prefix:"v:",map:{ext:"edit"}}],rawMap:n}}},Lu={0:"0",5:"6554f",10:"13107f",15:"19661f",20:"26214f",25:".5",30:"39322f",35:"45875f",40:"52429f",45:"58982f",50:"1",55:"72818f",60:"1.25",65:"93623f",70:"109227f",75:"2",80:"2.5",85:"3.4",90:"5",95:"10",96:"12.5",97:"1092267f",98:"25",99:"50",100:"2147483647f"},ku=(e,t)=>{var i;let n;const{recolor:s,brightness:r,contrast:o,id:a}=e;var l;return s&&(n={},"Washout"!==s&&"Grayscale"!==s||(n.gain="19661f",n.blacklevel="22938f"),"Black & White"!==s&&"Grayscale"!==s||(n.grayscale="t","Black & White"===s&&(n.bilevel="t"))),s&&"Grayscale"!==s||(n||(n={}),null!=o&&50!==o&&(n.gain=null!=(i=Lu[o])?i:"1"),null!=r&&50!==r&&(n.blacklevel=(l=r,(l-0)/100*1-.5).toString())),{name:"v:imagedata",properties:{prefixedAttributes:[{prefix:"o:",map:{relid:`rId${t}`,title:a}}],rawMap:n}}},Pu=e=>Math.floor(.74999943307122*(null!=e?e:0)),Nu={getTemplate(e){const t=_u.worksheetHeaderFooterImages.get(e.sheetIndex)||[];var i;return{name:"xml",properties:{prefixedAttributes:[{prefix:"xmlns:",map:{v:"urn:schemas-microsoft-com:vml",o:"urn:schemas-microsoft-com:office:office",x:"urn:schemas-microsoft-com:office:excel"}}]},children:[{name:"o:shapelayout",properties:{prefixedAttributes:[{prefix:"v:",map:{ext:"edit"}}]},children:[{name:"o:idmap",properties:{prefixedAttributes:[{prefix:"v:",map:{ext:"edit"}}],rawMap:{data:"1"}}}]},{name:"v:shapetype",properties:{prefixedAttributes:[{prefix:"o:",map:{spt:"75",preferrelative:"t"}}],rawMap:{coordsize:"21600,21600",filled:"f",id:"_x0000_t75",path:"m@4@5l@4@11@9@11@9@5xe",stroked:"f"}},children:[{name:"v:stroke",properties:{rawMap:{joinstyle:"miter"}}},(i=["if lineDrawn pixelLineWidth 0","sum @0 1 0","sum 0 0 @1","prod @2 1 2","prod @3 21600 pixelWidth","prod @3 21600 pixelHeight","sum @0 0 1","prod @6 1 2","prod @7 21600 pixelWidth","sum @8 21600 0","prod @7 21600 pixelHeight","sum @10 21600 0"],{name:"v:formulas",children:i.map(e=>({name:"v:f",properties:{rawMap:{eqn:e}}}))}),{name:"v:path",properties:{prefixedAttributes:[{prefix:"o:",map:{connecttype:"rect",extrusionok:"f"}}],rawMap:{gradientshapeok:"t"}}},Ru({aspectratio:!0})]},...t.map((e,t)=>((e,t)=>{const{width:i=0,height:n=0,altText:s}=e,r=Pu(i),o=Pu(n);return{name:"v:shape",properties:{rawMap:{id:e.headerFooterPosition,"o:spid":"_x0000_s1025",style:`position: absolute; margin-left: 0; margin-top: 10in; margin-bottom: 0; margin-right: 0; width: ${r}pt; height: ${o}pt; z-index: ${t+1}`,type:"#_x0000_t75",alt:s}},children:[ku(e,t+1),Ru({rotation:!0})]}})(e,t))]}}},Ou=class e{static createExcel(e,t,i){this.addSheetName(t),((e,t)=>{1===(Nh=t)&&uu(),e.forEach(pu)})(e,this.sheetNames.length);let n=Object.assign({},i);return i.exportAsExcelTable&&(i.columnModel.isPivotActive()&&(this.showExcelTableNonCompatibleFeaturesWarning("pivot mode"),n.exportAsExcelTable=!1),i.gos.get("masterDetail")&&(this.showExcelTableNonCompatibleFeaturesWarning("master/detail"),n.exportAsExcelTable=!1)),this.processTableConfig(t,n),this.createWorksheet(t,n)}static showExcelTableNonCompatibleFeaturesWarning(e){console.warn(`AG Grid: Excel table export does not work with ${e}. The exported Excel file will not contain any Excel tables.\nPlease turn off ${e} to enable Excel table exports.`)}static getTableNameFromIndex(e){return`table${e+1}`}static getSanitizedTableName(e){return e.replace(/^[^a-zA-Z_]+/,"_").replace(/\s/g,"_").replace(/[^a-zA-Z0-9_]/g,"_")}static addTableToSheet(e,t){this.worksheetDataTables.has(e)?console.warn("Unable to add data table to Excel sheet: A table already exists."):this.worksheetDataTables.set(e,t)}static processTableConfig(t,i){var n;if(!i.exportAsExcelTable)return;const s="boolean"==typeof i.exportAsExcelTable?{}:i.exportAsExcelTable,{name:r,showColumnStripes:o,showRowStripes:a,showFilterButton:l,highlightFirstColumn:c,highlightLastColumn:h}=s,d=this.getSanitizedTableName(r||e.defaultTableDisplayName),u=this.sheetNames.length-1,{table:p}=t,{rows:g,columns:f}=p,m=i.columnModel.getHeaderRowCount(),v=m-1,y=g.length,C=f.length,b=[],S=[];for(let e=0;e<C;e++){const t=f[e];b.push(t.displayName||""),S.push("match"===l||void 0===l?null!=(n=t.filterAllowed)&&n:l)}b&&b.length&&y&&d?this.addTableToSheet(u,{name:this.getTableNameFromIndex(u),displayName:d,columns:b,showFilterButtons:S,headerRowIndex:v,rowCount:y-m,showRowStripes:null==a||a,showColumnStripes:null!=o&&o,highlightFirstColumn:null!=c&&c,highlightLastColumn:null!=h&&h}):console.warn("Unable to add data table to Excel sheet: Missing required parameters.")}static addHeaderFooterImageToMap(e,t){const i=this.sheetNames.length-1,n=e;n.headerFooterPosition=t,this.buildImageMap({imageToAdd:n,idx:i});let s=this.worksheetHeaderFooterImages.get(i);s||(s=[],this.worksheetHeaderFooterImages.set(i,s)),s.find(t=>t.id===e.id)||s.push(e)}static addBodyImageToMap(e,t,i,n,s){let r=this.sheetNames.length;const{row:o,column:a}=e.position||{},l=e;n&&(null==t||null==i||o&&a||(e.position||(e.position={}),e.position=Object.assign({},e.position,{row:t,column:n.indexOf(i)+1})),((e,t)=>{const{colSpan:i,column:n}=e.position;if(e.width)if(i){const s=t.slice(n-1,n+i-1);let r=0;for(let t=0;t<s.length;t++){const i=s[t].getActualWidth();if(e.width<r+i){e.position.colSpan=t+1,e.totalWidth=e.width,e.width=e.totalWidth-r;break}r+=i}}else e.totalWidth=e.width})(l,n),((e,t)=>{const{rowSpan:i,row:n}=e.position;if(e.height)if(i){let s=0,r=0;for(let o=n;o<n+i;o++){const i=hd(ud(o,t)||20);if(e.height<s+i){e.position.rowSpan=r+1,e.totalHeight=e.height,e.height=e.totalHeight-s;break}s+=i,r++}}else e.totalHeight=e.height})(l,s)),this.buildImageMap({imageToAdd:l,idx:r});let c=this.worksheetImageIds.get(r);c||(c=new Map,this.worksheetImageIds.set(r,c));const h=this.worksheetImages.get(r);h?h.push(l):this.worksheetImages.set(r,[l]),c.get(e.id)||c.set(e.id,{index:c.size,type:e.imageType})}static buildImageMap(e){const{imageToAdd:t,idx:i}=e,n=this.images.get(t.id);if(n){const e=n.find(e=>e.sheetId===i);e?e.image.push(t):n.push({sheetId:i,image:[t]})}else this.images.set(t.id,[{sheetId:i,image:[t]}]),this.workbookImageIds.set(t.id,{type:t.imageType,index:this.workbookImageIds.size})}static addSheetName(e){const t=Gh._.escapeString(e.name)||"";let i="";for(;-1!==this.sheetNames.indexOf(`${t}${i}`);)if(""===i)i="_1";else{const e=parseInt(i.slice(1),10);i=`_${e+1}`}e.name=`${t}${i}`,this.sheetNames.push(e.name)}static getStringPosition(e){return this.sharedStrings.has(e)?this.sharedStrings.get(e):(this.sharedStrings.set(e,this.sharedStrings.size),this.sharedStrings.size-1)}static resetFactory(){this.sharedStrings=new Map,this.images=new Map,this.worksheetImages=new Map,this.worksheetHeaderFooterImages=new Map,this.workbookImageIds=new Map,this.worksheetImageIds=new Map,this.worksheetDataTables=new Map,this.sheetNames=[],this.factoryMode=Gh.ExcelFactoryMode.SINGLE_SHEET}static createWorkbook(){return pd(yu(this.sheetNames))}static createStylesheet(e){return pd(fu.getTemplate(e))}static createSharedStrings(){return pd(Gd(this.sharedStrings))}static createCore(e){return pd(od.getTemplate(e))}static createContentTypes(e){return pd(ld.getTemplate(e))}static createRels(){const e=Iu([{Id:"rId1",Type:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/officeDocument",Target:"xl/workbook.xml"},{Id:"rId2",Type:"http://schemas.openxmlformats.org/package/2006/relationships/metadata/core-properties",Target:"docProps/core.xml"}]);return pd(e)}static createTheme(){return pd(_d())}static createTable(e,t){return pd(xd.getTemplate(e,t))}static createWorkbookRels(e){const t=new Array(e).fill(void 0).map((e,t)=>({Id:`rId${t+1}`,Type:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/worksheet",Target:`worksheets/sheet${t+1}.xml`})),i=Iu([...t,{Id:`rId${e+1}`,Type:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/theme",Target:"theme/theme1.xml"},{Id:`rId${e+2}`,Type:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/styles",Target:"styles.xml"},{Id:`rId${e+3}`,Type:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/sharedStrings",Target:"sharedStrings.xml"}]);return pd(i)}static createDrawing(e){return pd(wd.getTemplate({sheetIndex:e}))}static createDrawingRel(e){const t=this.worksheetImageIds.get(e)||[],i=[];for(const[e,n]of t)i.push({Id:`rId${n.index+1}`,Type:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/image",Target:`../media/image${this.workbookImageIds.get(e).index+1}.${n.type}`});return pd(Iu(i))}static createVmlDrawing(e){return pd(Nu.getTemplate({sheetIndex:e}),!0)}static createVmlDrawingRel(e){const t=this.worksheetHeaderFooterImages.get(e)||[],i=[];for(let e=0;e<t.length;e++){const n=t[e],s=this.workbookImageIds.get(n.id);if(!s)continue;const{index:r,type:o}=s,a="jpg"===o?"jpeg":o;i.push({Id:`rId${e+1}`,Type:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/image",Target:`../media/image${r+1}.${a}`})}return pd(Iu(i))}static createRelationships({drawingIndex:e,vmlDrawingIndex:t,tableIndex:i}={}){if(void 0===e&&void 0===t&&void 0===i)return"";const n=[];null!=e&&n.push({Id:`rId${n.length+1}`,Type:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/drawing",Target:`../drawings/drawing${e+1}.xml`}),null!=t&&n.push({Id:`rId${n.length+1}`,Type:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/vmlDrawing",Target:`../drawings/vmlDrawing${t+1}.vml`}),null!=i&&n.push({Id:`rId${n.length+1}`,Type:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/table",Target:`../tables/${this.getTableNameFromIndex(i)}.xml`});const s=Iu(n);return pd(s)}static createWorksheet(e,t){return pd(Tu.getTemplate({worksheet:e,currentSheet:this.sheetNames.length-1,config:t}))}};Ou.sharedStrings=new Map,Ou.sheetNames=[],Ou.images=new Map,Ou.worksheetImages=new Map,Ou.worksheetHeaderFooterImages=new Map,Ou.workbookImageIds=new Map,Ou.worksheetImageIds=new Map,Ou.worksheetDataTables=new Map,Ou.defaultTableDisplayName="AG-GRID-TABLE",Ou.factoryMode=Gh.ExcelFactoryMode.SINGLE_SHEET;var _u=Ou,Fu=class extends Kh.BaseGridSerializingSession{constructor(e){super(e),this.mixedStyles={},this.mixedStyleCounter=0,this.rows=[],this.config=Object.assign({},e),this.stylesByIds={},this.config.baseExcelStyles.forEach(e=>{this.stylesByIds[e.id]=e}),this.excelStyles=[...this.config.baseExcelStyles,{id:"_quotePrefix",quotePrefix:1}]}addCustomContent(e){e.forEach(e=>{const t=this.rows.length+1;let i;this.config.suppressRowOutline||null==e.outlineLevel||(i=e.outlineLevel);const n={height:ud(t,e.height||this.config.rowHeight),cells:(e.cells||[]).map((e,i)=>{var n,s,r;const o=this.addImage(t,this.columnsToExport[i],null==(n=e.data)?void 0:n.value);let a=null;e.styleId&&(a="string"==typeof e.styleId?[e.styleId]:e.styleId);const l=this.getStyleId(a);if(o)return this.createCell(l,this.getDataTypeForValue(o.value),null==o.value?"":o.value);const c=null!=(r=null==(s=e.data)?void 0:s.value)?r:"",h=this.getDataTypeForValue(c);return e.mergeAcross?this.createMergedCell(l,h,c,e.mergeAcross):this.createCell(l,h,c)}),outlineLevel:i};null!=e.collapsed&&(n.collapsed=e.collapsed),null!=e.hidden&&(n.hidden=e.hidden),this.rows.push(n)})}onNewHeaderGroupingRow(){const e=[];return this.rows.push({cells:e,height:ud(this.rows.length+1,this.config.headerRowHeight)}),{onColumn:(t,i,n,s,r)=>{const o=this.config.styleLinker({rowType:Kh.RowType.HEADER_GROUPING,rowIndex:1,value:`grouping-${i}`,columnGroup:t});e.push(sd(nd({},this.createMergedCell(this.getStyleId(o),this.getDataTypeForValue("string"),i,s)),{collapsibleRanges:r}))}}}onNewHeaderRow(){return this.onNewRow(this.onNewHeaderColumn,this.config.headerRowHeight)}onNewBodyRow(e){const t=this.onNewRow(this.onNewBodyColumn,this.config.rowHeight);return e&&this.addRowOutlineIfNecessary(e),t}prepare(e){super.prepare(e),this.columnsToExport=[...e],this.cols=e.map((e,t)=>this.convertColumnToExcel(e,t))}parse(){const e=this.rows.reduce((e,t)=>Math.max(e,t.cells.length),0);for(;this.cols.length<e;)this.cols.push(this.convertColumnToExcel(null,this.cols.length+1));const t={name:this.config.sheetName,table:{columns:this.cols,rows:this.rows}};return this.createExcel(t)}addRowOutlineIfNecessary(e){const{gos:t,suppressRowOutline:i,rowGroupExpandState:n="expanded"}=this.config;if(t.get("groupHideOpenParents")||i||null==e.level)return;const s=e.footer?1:0,r=jh._.last(this.rows);if(r.outlineLevel=e.level+s,"expanded"===n)return;const o="collapsed"===n;if(e.isExpandable()){const t=!o&&e.expanded;r.collapsed=!t}r.hidden=!!e.parent&&-1!==e.parent.level&&(o||this.isAnyParentCollapsed(e.parent))}isAnyParentCollapsed(e){for(;e&&-1!==e.level;){if(!e.expanded)return!0;e=e.parent}return!1}convertColumnToExcel(e,t){const i=this.config.columnWidth,n=e?this.extractHeaderValue(e):void 0,s=null!=n?n:"",r=!!e&&e.isFilterAllowed();if(i)return"number"==typeof i?{width:i,displayName:s,filterAllowed:r}:{width:i({column:e,index:t}),displayName:s,filterAllowed:r};if(e){const t=75;return{width:Math.max(e.getActualWidth(),t),displayName:s,filterAllowed:r}}return{displayName:s,filterAllowed:r}}onNewHeaderColumn(e,t){return i=>{const n=this.extractHeaderValue(i),s=this.config.styleLinker({rowType:Kh.RowType.HEADER,rowIndex:e,value:n,column:i});t.push(this.createCell(this.getStyleId(s),this.getDataTypeForValue("string"),n))}}onNewBodyColumn(e,t){let i=0;return(n,s,r)=>{if(i>0)return void(i-=1);const{value:o,valueFormatted:a}=this.extractRowCellValue(n,s,e,"excel",r),l=this.config.styleLinker({rowType:Kh.RowType.BODY,rowIndex:e,value:o,column:n,node:r}),c=this.getStyleId(l),h=n.getColSpan(r),d=this.addImage(e,n,o);d?t.push(this.createCell(c,this.getDataTypeForValue(d.value),null==d.value?"":d.value)):h>1?(i=h-1,t.push(this.createMergedCell(c,this.getDataTypeForValue(o),o,h-1))):t.push(this.createCell(c,this.getDataTypeForValue(o),o,a))}}onNewRow(e,t){const i=[];return this.rows.push({cells:i,height:ud(this.rows.length+1,t)}),{onColumn:e.bind(this,this.rows.length,i)()}}createExcel(e){const{excelStyles:t,config:i}=this;return _u.createExcel(t,e,i)}getDataTypeForValue(e){return void 0===e?"empty":this.isNumerical(e)?"n":"s"}getTypeFromStyle(e,t){if(this.isFormula(t))return"f";if(e&&e.dataType)switch(e.dataType.toLocaleLowerCase()){case"formula":return"f";case"string":return"s";case"number":return"n";case"datetime":return"d";case"error":return"e";case"boolean":return"b";default:console.warn(`AG Grid: Unrecognized data type for excel export [${e.id}.dataType=${e.dataType}]`)}return null}addImage(e,t,i){if(!this.config.addImageToCell)return;const n=this.config.addImageToCell(e,t,i);return n?(_u.addBodyImageToMap(n.image,e,t,this.columnsToExport,this.config.rowHeight),n):void 0}createCell(e,t,i,n){const s=this.getStyleById(e);!(null==s?void 0:s.dataType)&&"s"===t&&n&&(i=n);const r=this.getTypeFromStyle(s,i)||t,{value:o,escaped:a}=this.getCellValue(r,i),l=[];return s&&l.push(e),a&&l.push("_quotePrefix"),{styleId:e=this.getStyleId(l)||void 0,data:{type:r,value:o}}}createMergedCell(e,t,i,n){const s=null==i?"":i;return{styleId:this.getStyleById(e)?e:void 0,data:{type:t,value:"s"===t?_u.getStringPosition(s).toString():i},mergeAcross:n}}getCellValue(e,t){let i=!1;if(null==t&&(e="s",t=""),"s"===e)t&&"'"===t[0]&&(i=!0,t=t.slice(1)),t=_u.getStringPosition(t).toString();else if("f"===e)t=t.slice(1);else if("n"===e){const e=Number(t);isNaN(e)?t="":""!==t&&(t=e.toString())}return{value:t,escaped:i}}getStyleId(e){if(!e||!e.length)return null;if(1===e.length)return e[0];const t=e.join("-");return this.mixedStyles[t]||this.addNewMixedStyle(e),this.mixedStyles[t].excelID}deepCloneObject(e){return JSON.parse(JSON.stringify(e))}addNewMixedStyle(e){this.mixedStyleCounter+=1;const t=`mixedStyle${this.mixedStyleCounter}`,i={};for(const t of e)for(const e of this.excelStyles)e.id===t&&jh._.mergeDeep(i,this.deepCloneObject(e));i.id=t,i.name=t;const n=e.join("-");this.mixedStyles[n]={excelID:t,key:n,result:i},this.excelStyles.push(i),this.stylesByIds[t]=i}isFormula(e){return null!=e&&this.config.autoConvertFormulas&&e.toString().startsWith("=")}isNumerical(e){return"bigint"==typeof e||isFinite(e)&&""!==e&&!isNaN(parseFloat(e))}getStyleById(e){return null==e?null:this.stylesByIds[e]||null}},Gu=(e,t)=>{const i="xl/drawings",n=`${i}/drawing${t+1}.xml`,s=`${i}/_rels/drawing${t+1}.xml.rels`;Wh.ZipContainer.addFile(s,_u.createDrawingRel(e)),Wh.ZipContainer.addFile(n,_u.createDrawing(e))},Vu=(e,t)=>{const i="xl/drawings",n=`${i}/vmlDrawing${t+1}.vml`,s=`${i}/_rels/vmlDrawing${t+1}.vml.rels`;Wh.ZipContainer.addFile(n,_u.createVmlDrawing(e)),Wh.ZipContainer.addFile(s,_u.createVmlDrawingRel(e))},Bu=(e,t={})=>{if(!e||0===e.length)return console.warn("AG Grid: Invalid params supplied to createExcelFileForExcel() - `ExcelExportParams.data` is empty."),_u.resetFactory(),!1;const{fontSize:i=11,author:n="AG Grid"}=t;return(()=>{Wh.ZipContainer.addFolders(["_rels/","docProps/","xl/","xl/theme/","xl/_rels/","xl/worksheets/"]);const{images:e}=_u;if(!e.size)return;Wh.ZipContainer.addFolders(["xl/worksheets/_rels","xl/drawings/","xl/drawings/_rels","xl/media/"]);let t=0;e.forEach(e=>{const i=e[0].image[0],{base64:n,imageType:s}=i,r="jpg"===s?"jpeg":s;Wh.ZipContainer.addFile(`xl/media/image${++t}.${r}`,n,!0)})})(),(()=>{const{worksheetDataTables:e}=_u,t=e,i=Array.from(t.keys());for(let e=0;e<i.length;e++){const n=i[e],s=t.get(n);s&&Wh.ZipContainer.addFile(`xl/tables/${s.name}.xml`,_u.createTable(s,e))}})(),(e=>{let t=0,i=0,n=0;const{images:s,worksheetDataTables:r,worksheetImages:o,worksheetHeaderFooterImages:a}=_u;for(let l=0;l<e.length;l++){const c=e[l];Wh.ZipContainer.addFile(`xl/worksheets/sheet${l+1}.xml`,c,!1);const h=s.size>0&&o.has(l),d=r.size>0&&r.has(l),u=s.size&&a.has(l);if(!h&&!d&&!u)continue;let p,g,f;h&&(Gu(l,t),g=t,t++),u&&(Vu(l,i),f=i,i++),d&&(p=n++);const m=`xl/worksheets/_rels/sheet${l+1}.xml.rels`;Wh.ZipContainer.addFile(m,_u.createRelationships({tableIndex:p,drawingIndex:g,vmlDrawingIndex:f}))}})(e),((e,t,i)=>{Wh.ZipContainer.addFile("xl/workbook.xml",_u.createWorkbook()),Wh.ZipContainer.addFile("xl/styles.xml",_u.createStylesheet(e)),Wh.ZipContainer.addFile("xl/sharedStrings.xml",_u.createSharedStrings()),Wh.ZipContainer.addFile("xl/theme/theme1.xml",_u.createTheme()),Wh.ZipContainer.addFile("xl/_rels/workbook.xml.rels",_u.createWorkbookRels(i)),Wh.ZipContainer.addFile("docProps/core.xml",_u.createCore(t)),Wh.ZipContainer.addFile("[Content_Types].xml",_u.createContentTypes(i)),Wh.ZipContainer.addFile("_rels/.rels",_u.createRels())})(i,n,e.length),_u.resetFactory(),!0},Hu=e=>{const{data:t,fontSize:i,author:n}=e,s=e.mimeType||"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet";return Bu(t,{author:n,fontSize:i})?Wh.ZipContainer.getZipFile(s):Promise.resolve(void 0)},zu=e=>{const{data:t,fontSize:i,author:n}=e,s=e.mimeType||"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet";if(Bu(t,{author:n,fontSize:i}))return Wh.ZipContainer.getUncompressedZipFile(s)},Uu=e=>{const{fileName:t="export.xlsx"}=e;Hu(e).then(e=>{if(e){const i="function"==typeof t?t():t;Wh.Downloader.download(i,e)}})},Wu=class extends Wh.BaseCreator{postConstruct(){this.setBeans({gridSerializer:this.gridSerializer,gos:this.gos})}getMergedParams(e){const t=this.gos.get("defaultExcelExportParams");return Object.assign({},t,e)}export(e){if(this.isExportSuppressed())return void console.warn("AG Grid: Export cancelled. Export is not allowed as per your configuration.");const t=this.getMergedParams(e),i={data:[this.getData(t)],fontSize:t.fontSize,author:t.author,mimeType:t.mimeType};this.packageCompressedFile(i).then(e=>{if(e){const{fileName:i}=t,n="function"==typeof i?i(this.gos.getGridCommonParams()):i;Wh.Downloader.download(this.getFileName(n),e)}})}exportDataAsExcel(e){this.export(e)}getDataAsExcel(e){const t=this.getMergedParams(e),i={data:[this.getData(t)],fontSize:t.fontSize,author:t.author,mimeType:t.mimeType};return this.packageFile(i)}setFactoryMode(e){_u.factoryMode=e}getFactoryMode(){return _u.factoryMode}getSheetDataForExcel(e){const t=this.getMergedParams(e);return this.getData(t)}getMultipleSheetsAsExcel(e){return zu(e)}exportMultipleSheetsAsExcel(e){Uu(e)}getDefaultFileExtension(){return"xlsx"}createSerializingSession(e){const{columnModel:t,valueService:i,gos:n}=this;let s;if(null!=e.sheetName){const{sheetName:t}=e,i="function"==typeof t?t(this.gos.getGridCommonParams()):t;s=String(i).substring(0,31)}else s="ag-grid";const r=sd(nd({},e),{sheetName:s,columnModel:t,valueService:i,gos:n,suppressRowOutline:e.suppressRowOutline||e.skipRowGroups,headerRowHeight:e.headerRowHeight||e.rowHeight,baseExcelStyles:this.gos.get("excelStyles")||[],styleLinker:this.styleLinker.bind(this)});return new Fu(r)}styleLinker(e){const{rowType:t,rowIndex:i,value:n,column:s,columnGroup:r,node:o}=e,a=t===Wh.RowType.HEADER,l=t===Wh.RowType.HEADER_GROUPING,c=a?s:r;let h=[];if(a||l)return h.push("header"),l&&h.push("headerGroup"),c&&(h=h.concat(Fh.CssClassApplier.getHeaderClassesFromColDef(c.getDefinition(),this.gos,s||null,r||null))),h;const d=this.gos.get("excelStyles"),u=["cell"];if(!d||!d.length)return u;const p=d.map(e=>e.id);return this.stylingService.processAllCellClasses(s.getDefinition(),this.gos.addGridCommonParams({value:n,data:o.data,node:o,colDef:s.getDefinition(),column:s,rowIndex:i}),e=>{p.indexOf(e)>-1&&u.push(e)}),u.sort((e,t)=>p.indexOf(e)<p.indexOf(t)?-1:1)}isExportSuppressed(){return this.gos.get("suppressExcelExport")}packageCompressedFile(e){return Hu(e)}packageFile(e){return zu(e)}};rd([(0,Fh.Autowired)("columnModel")],Wu.prototype,"columnModel",2),rd([(0,Fh.Autowired)("valueService")],Wu.prototype,"valueService",2),rd([(0,Fh.Autowired)("stylingService")],Wu.prototype,"stylingService",2),rd([(0,Fh.Autowired)("gridSerializer")],Wu.prototype,"gridSerializer",2),rd([(0,Fh.Autowired)("gridOptionsService")],Wu.prototype,"gos",2),rd([Fh.PostConstruct],Wu.prototype,"postConstruct",1),Wu=rd([(0,Fh.Bean)("excelCreator")],Wu);var ju={version:"31.3.4",moduleName:_h.ModuleNames.ExcelExportModule,beans:[Wu,$h.GridSerializer,$h.CsvCreator],dependantModules:[Yh.CsvExportModule,D]},Ku=i(98092),$u=i(98092),Yu=i(98092),qu=i(98092),Xu=i(98092),Zu=i(98092),Qu=Object.defineProperty,Ju=Object.getOwnPropertyDescriptor,ep=Object.getOwnPropertySymbols,tp=Object.prototype.hasOwnProperty,ip=Object.prototype.propertyIsEnumerable,np=(e,t,i)=>t in e?Qu(e,t,{enumerable:!0,configurable:!0,writable:!0,value:i}):e[t]=i,sp=(e,t)=>{for(var i in t||(t={}))tp.call(t,i)&&np(e,i,t[i]);if(ep)for(var i of ep(t))ip.call(t,i)&&np(e,i,t[i]);return e},rp=(e,t,i,n)=>{for(var s,r=n>1?void 0:n?Ju(t,i):t,o=e.length-1;o>=0;o--)(s=e[o])&&(r=(n?s(t,i,r):s(r))||r);return n&&r&&Qu(t,i,r),r},op=class extends $u.Component{preConstruct(){this.setTemplate('<div class="ag-filter-toolpanel-search" role="presentation">\n                <div ref="eExpand" class="ag-filter-toolpanel-expand"></div>\n                <ag-input-text-field ref="eFilterTextField" class="ag-filter-toolpanel-search-input"></ag-input-text-field>\n            </div>')}postConstruct(){const e=this.localeService.getLocaleTextFunc();this.eFilterTextField.setAutoComplete(!1).setInputAriaLabel(e("ariaFilterColumnsInput","Filter Columns Input")).onValueChange(this.onSearchTextChanged.bind(this)),this.createExpandIcons(),this.setExpandState(0),this.addManagedListener(this.eExpand,"click",this.onExpandClicked.bind(this)),this.addManagedListener(this.eventService,$u.Events.EVENT_NEW_COLUMNS_LOADED,this.showOrHideOptions.bind(this))}init(e){this.params=e,this.columnModel.isReady()&&this.showOrHideOptions()}createExpandIcons(){this.eExpand.appendChild(this.eExpandChecked=$u._.createIconNoSpan("columnSelectOpen",this.gos)),this.eExpand.appendChild(this.eExpandUnchecked=$u._.createIconNoSpan("columnSelectClosed",this.gos)),this.eExpand.appendChild(this.eExpandIndeterminate=$u._.createIconNoSpan("columnSelectIndeterminate",this.gos))}showOrHideOptions(){const e=!this.params.suppressFilterSearch,t=!this.params.suppressExpandAll,i=this.localeService.getLocaleTextFunc();this.eFilterTextField.setInputPlaceholder(i("searchOoo","Search..."));const n=this.columnModel.getAllGridColumns().some(e=>e.getOriginalParent()&&e.isFilterAllowed());$u._.setDisplayed(this.eFilterTextField.getGui(),e),$u._.setDisplayed(this.eExpand,t&&n)}onSearchTextChanged(){this.onSearchTextChangedDebounced||(this.onSearchTextChangedDebounced=$u._.debounce(()=>{this.dispatchEvent({type:"searchChanged",searchText:this.eFilterTextField.getValue()})},300)),this.onSearchTextChangedDebounced()}onExpandClicked(){const e=0===this.currentExpandState?{type:"collapseAll"}:{type:"expandAll"};this.dispatchEvent(e)}setExpandState(e){this.currentExpandState=e,$u._.setDisplayed(this.eExpandChecked,0===this.currentExpandState),$u._.setDisplayed(this.eExpandUnchecked,1===this.currentExpandState),$u._.setDisplayed(this.eExpandIndeterminate,2===this.currentExpandState)}};rp([(0,$u.Autowired)("columnModel")],op.prototype,"columnModel",2),rp([(0,$u.RefSelector)("eExpand")],op.prototype,"eExpand",2),rp([(0,$u.RefSelector)("eFilterTextField")],op.prototype,"eFilterTextField",2),rp([$u.PreConstruct],op.prototype,"preConstruct",1),rp([$u.PostConstruct],op.prototype,"postConstruct",1);var ap=class e extends qu.Component{constructor(t,i){super(e.TEMPLATE),this.expandedCallback=i,this.expanded=!1,this.hideHeader=t}postConstruct(){this.eExpandChecked=qu._.createIconNoSpan("columnSelectOpen",this.gos),this.eExpandUnchecked=qu._.createIconNoSpan("columnSelectClosed",this.gos),this.eExpand.appendChild(this.eExpandChecked),this.eExpand.appendChild(this.eExpandUnchecked)}setColumn(e){this.column=e,this.eFilterName.innerText=this.columnModel.getDisplayNameForColumn(this.column,"filterToolPanel",!1)||"",this.addManagedListener(this.eFilterToolPanelHeader,"click",this.toggleExpanded.bind(this)),this.addManagedListener(this.eFilterToolPanelHeader,"keydown",this.onKeyDown.bind(this)),this.addManagedListener(this.eventService,qu.Events.EVENT_FILTER_OPENED,this.onFilterOpened.bind(this)),this.addInIcon("filter",this.eFilterIcon,this.column),qu._.setDisplayed(this.eFilterIcon,this.isFilterActive(),{skipAriaHidden:!0}),qu._.setDisplayed(this.eExpandChecked,!1),this.hideHeader?(qu._.setDisplayed(this.eFilterToolPanelHeader,!1),this.eFilterToolPanelHeader.removeAttribute("tabindex")):this.eFilterToolPanelHeader.setAttribute("tabindex","0"),this.addManagedListener(this.column,qu.Column.EVENT_FILTER_CHANGED,this.onFilterChanged.bind(this))}onKeyDown(e){const{key:t}=e,{ENTER:i,SPACE:n,LEFT:s,RIGHT:r}=qu.KeyCode;t!==i&&t!==n&&t!==s&&t!==r||(e.preventDefault(),t===i||t===n?this.toggleExpanded():t===qu.KeyCode.LEFT?this.collapse():this.expand())}getColumn(){return this.column}getColumnFilterName(){return this.columnModel.getDisplayNameForColumn(this.column,"filterToolPanel",!1)}addCssClassToTitleBar(e){this.eFilterToolPanelHeader.classList.add(e)}addInIcon(e,t,i){if(null==t)return;const n=qu._.createIconNoSpan(e,this.gos,i);t.appendChild(n)}isFilterActive(){return this.filterManager.isFilterActive(this.column)}onFilterChanged(){qu._.setDisplayed(this.eFilterIcon,this.isFilterActive(),{skipAriaHidden:!0}),this.dispatchEvent({type:qu.Column.EVENT_FILTER_CHANGED})}toggleExpanded(){this.expanded?this.collapse():this.expand()}expand(){this.expanded||(this.expanded=!0,qu._.setAriaExpanded(this.eFilterToolPanelHeader,!0),qu._.setDisplayed(this.eExpandChecked,!0),qu._.setDisplayed(this.eExpandUnchecked,!1),this.addFilterElement(),this.expandedCallback())}addFilterElement(e){var t;const i=qu._.loadTemplate('<div class="ag-filter-toolpanel-instance-filter"></div>'),n=this.createManagedBean(new qu.FilterWrapperComp(this.column,"TOOLBAR"));this.filterWrapperComp=n,n.hasFilter()&&(null==(t=n.getFilter())||t.then(t=>{this.underlyingFilter=t,t&&(i.appendChild(n.getGui()),this.agFilterToolPanelBody.appendChild(i),n.afterGuiAttached({container:"toolPanel",suppressFocus:e}))}))}collapse(){var e;this.expanded&&(this.expanded=!1,qu._.setAriaExpanded(this.eFilterToolPanelHeader,!1),this.removeFilterElement(),qu._.setDisplayed(this.eExpandChecked,!1),qu._.setDisplayed(this.eExpandUnchecked,!0),null==(e=this.filterWrapperComp)||e.afterGuiDetached(),this.destroyBean(this.filterWrapperComp),this.expandedCallback())}removeFilterElement(){qu._.clearElement(this.agFilterToolPanelBody)}isExpanded(){return this.expanded}refreshFilter(e){var t;if(!this.expanded)return;const i=this.underlyingFilter;i&&(e?"function"==typeof i.refreshVirtualList&&i.refreshVirtualList():null==(t=i.afterGuiDetached)||t.call(i))}onFilterOpened(e){"COLUMN_MENU"===e.source&&e.column===this.column&&this.expanded&&this.collapse()}};ap.TEMPLATE='\n        <div class="ag-filter-toolpanel-instance">\n            <div class="ag-filter-toolpanel-header ag-filter-toolpanel-instance-header" ref="eFilterToolPanelHeader" role="button" aria-expanded="false">\n                <div ref="eExpand" class="ag-filter-toolpanel-expand"></div>\n                <span ref="eFilterName" class="ag-header-cell-text"></span>\n                <span ref="eFilterIcon" class="ag-header-icon ag-filter-icon ag-filter-toolpanel-instance-header-icon" aria-hidden="true"></span>\n            </div>\n            <div class="ag-filter-toolpanel-instance-body ag-filter" ref="agFilterToolPanelBody"></div>\n        </div>',rp([(0,qu.RefSelector)("eFilterToolPanelHeader")],ap.prototype,"eFilterToolPanelHeader",2),rp([(0,qu.RefSelector)("eFilterName")],ap.prototype,"eFilterName",2),rp([(0,qu.RefSelector)("agFilterToolPanelBody")],ap.prototype,"agFilterToolPanelBody",2),rp([(0,qu.RefSelector)("eFilterIcon")],ap.prototype,"eFilterIcon",2),rp([(0,qu.RefSelector)("eExpand")],ap.prototype,"eExpand",2),rp([(0,qu.Autowired)("filterManager")],ap.prototype,"filterManager",2),rp([(0,qu.Autowired)("columnModel")],ap.prototype,"columnModel",2),rp([qu.PostConstruct],ap.prototype,"postConstruct",1);var lp=ap,cp=class e extends Xu.Component{constructor(e,t,i,n,s){super(),this.columnGroup=e,this.childFilterComps=t,this.depth=n,this.expandedCallback=i,this.showingColumn=s}preConstruct(){this.setTemplate(e.TEMPLATE,{filterGroupComp:{cssIdentifier:"filter-toolpanel",direction:"vertical"}})}init(){this.setGroupTitle(),this.filterGroupComp.setAlignItems("stretch"),this.filterGroupComp.addCssClass(`ag-filter-toolpanel-group-level-${this.depth}`),this.filterGroupComp.addCssClassToTitleBar(`ag-filter-toolpanel-group-level-${this.depth}-header`),this.childFilterComps.forEach(e=>{this.filterGroupComp.addItem(e),e.addCssClassToTitleBar(`ag-filter-toolpanel-group-level-${this.depth+1}-header`)}),this.refreshFilterClass(),this.addExpandCollapseListeners(),this.addFilterChangedListeners(),this.setupTooltip(),this.addInIcon("filter")}setupTooltip(){if(!this.showingColumn)return;let e;"whenTruncated"===this.gos.get("tooltipShowMode")&&(e=()=>{const e=this.filterGroupComp.getGui().querySelector(".ag-group-title");return!e||e.scrollWidth>e.clientWidth});const t=()=>{const t=this.columnGroup.getColDef().headerTooltip;this.setTooltip({newTooltipText:t,location:"filterToolPanelColumnGroup",shouldDisplayTooltip:e})};t(),this.addManagedListener(this.eventService,Xu.Events.EVENT_NEW_COLUMNS_LOADED,t)}getTooltipParams(){const e=super.getTooltipParams();return e.location="filterToolPanelColumnGroup",e}addCssClassToTitleBar(e){this.filterGroupComp.addCssClassToTitleBar(e)}refreshFilters(t){this.childFilterComps.forEach(i=>{i instanceof e?i.refreshFilters(t):i.refreshFilter(t)})}isColumnGroup(){return this.columnGroup instanceof Xu.ProvidedColumnGroup}isExpanded(){return this.filterGroupComp.isExpanded()}getChildren(){return this.childFilterComps}getFilterGroupName(){return this.filterGroupName?this.filterGroupName:""}getFilterGroupId(){return this.columnGroup.getId()}hideGroupItem(e,t){this.filterGroupComp.hideItem(e,t)}hideGroup(e){this.setDisplayed(!e)}addInIcon(e){const t=Xu._.createIconNoSpan(e,this.gos);t&&t.classList.add("ag-filter-toolpanel-group-instance-header-icon"),this.filterGroupComp.addTitleBarWidget(t)}forEachToolPanelFilterChild(e){this.childFilterComps.forEach(t=>{t instanceof lp&&e(t)})}addExpandCollapseListeners(){const e=this.isColumnGroup()?()=>this.expandedCallback():()=>this.forEachToolPanelFilterChild(e=>e.expand()),t=this.isColumnGroup()?()=>this.expandedCallback():()=>this.forEachToolPanelFilterChild(e=>e.collapse());this.addManagedListener(this.filterGroupComp,Xu.AgGroupComponent.EVENT_EXPANDED,e),this.addManagedListener(this.filterGroupComp,Xu.AgGroupComponent.EVENT_COLLAPSED,t)}getColumns(){return this.columnGroup instanceof Xu.ProvidedColumnGroup?this.columnGroup.getLeafColumns():[this.columnGroup]}addFilterChangedListeners(){this.getColumns().forEach(e=>{this.addManagedListener(e,Xu.Column.EVENT_FILTER_CHANGED,()=>this.refreshFilterClass())}),this.columnGroup instanceof Xu.ProvidedColumnGroup||this.addManagedListener(this.eventService,Xu.Events.EVENT_FILTER_OPENED,this.onFilterOpened.bind(this))}refreshFilterClass(){const e=this.getColumns();this.filterGroupComp.addOrRemoveCssClass("ag-has-filter",e.some(e=>e.isFilterActive()))}onFilterOpened(e){"COLUMN_MENU"===e.source&&e.column===this.columnGroup&&this.isExpanded()&&this.collapse()}expand(){this.filterGroupComp.toggleGroupExpand(!0)}collapse(){this.filterGroupComp.toggleGroupExpand(!1)}setGroupTitle(){this.filterGroupName=this.columnGroup instanceof Xu.ProvidedColumnGroup?this.getColumnGroupName(this.columnGroup):this.getColumnName(this.columnGroup),this.filterGroupComp.setTitle(this.filterGroupName||"")}getColumnGroupName(e){return this.columnModel.getDisplayNameForProvidedColumnGroup(null,e,"filterToolPanel")}getColumnName(e){return this.columnModel.getDisplayNameForColumn(e,"filterToolPanel",!1)}destroyFilters(){this.childFilterComps=this.destroyBeans(this.childFilterComps),Xu._.clearElement(this.getGui())}destroy(){this.destroyFilters(),super.destroy()}};cp.TEMPLATE='<div class="ag-filter-toolpanel-group-wrapper">\n            <ag-group-component ref="filterGroupComp"></ag-group-component>\n        </div>',rp([(0,Xu.RefSelector)("filterGroupComp")],cp.prototype,"filterGroupComp",2),rp([(0,Xu.Autowired)("columnModel")],cp.prototype,"columnModel",2),rp([Xu.PreConstruct],cp.prototype,"preConstruct",1),rp([Xu.PostConstruct],cp.prototype,"init",1);var hp=cp,dp=class e extends Yu.Component{constructor(){super(e.TEMPLATE),this.initialised=!1,this.hasLoadedInitialState=!1,this.isInitialState=!1,this.filterGroupComps=[],this.suppressOnColumnsChanged=!1,this.onColumnsChangedPending=!1}init(e){this.initialised=!0;const t=this.gos.addGridCommonParams({suppressExpandAll:!1,suppressFilterSearch:!1,suppressSyncLayoutWithGrid:!1});Yu._.mergeDeep(t,e),this.params=t,this.params.suppressSyncLayoutWithGrid||this.addManagedListener(this.eventService,Yu.Events.EVENT_COLUMN_MOVED,()=>this.onColumnsChanged()),this.addManagedListener(this.eventService,Yu.Events.EVENT_NEW_COLUMNS_LOADED,()=>this.onColumnsChanged()),this.addManagedListener(this.eventService,Yu.Events.EVENT_TOOL_PANEL_VISIBLE_CHANGED,e=>{"filters"===e.key&&this.refreshFilters(e.visible)}),this.addManagedListener(this.eventService,Yu.Events.EVENT_DRAG_STARTED,()=>{this.suppressOnColumnsChanged=!0}),this.addManagedListener(this.eventService,Yu.Events.EVENT_DRAG_STOPPED,()=>{this.suppressOnColumnsChanged=!1,this.onColumnsChangedPending&&(this.onColumnsChangedPending=!1,this.onColumnsChanged())}),this.columnModel.isReady()&&this.onColumnsChanged()}onColumnsChanged(){if(this.suppressOnColumnsChanged)return void(this.onColumnsChangedPending=!0);const e=this.columnModel.isPivotMode();this.params.suppressSyncLayoutWithGrid||e?this.buildTreeFromProvidedColumnDefs():this.syncFilterLayout(),this.refreshAriaLabel()}syncFilterLayout(){this.toolPanelColDefService.syncLayoutWithGrid(this.setFiltersLayout.bind(this)),this.refreshAriaLabel()}buildTreeFromProvidedColumnDefs(){const e=this.columnModel.getPrimaryColumnTree();this.recreateFilters(e)}setFiltersLayout(e){const t=this.toolPanelColDefService.createColumnTree(e);this.recreateFilters(t)}recreateFilters(e){const t=this.gos.getActiveDomElement();this.hasLoadedInitialState||(this.hasLoadedInitialState=!0,this.isInitialState=!!this.params.initialState);const i=this.getExpansionState();this.destroyFilters(),this.filterGroupComps=this.recursivelyAddComps(e,0,i);const n=this.filterGroupComps.length;n&&(this.filterGroupComps.forEach(e=>this.appendChild(e)),this.setFirstAndLastVisible(0,n-1)),Yu._.exists(this.searchFilterText)&&this.searchFilters(this.searchFilterText),this.fireExpandedEvent(),this.getGui().contains(t)&&t.focus(),this.isInitialState=!1,this.refreshAriaLabel()}recursivelyAddComps(e,t,i){return Yu._.flatten(e.map(e=>{if(e instanceof Yu.ProvidedColumnGroup)return Yu._.flatten(this.recursivelyAddFilterGroupComps(e,t,i));const n=e;if(!this.shouldDisplayFilter(n))return[];const s=new lp(0===t,()=>this.onFilterExpanded());if(this.createBean(s),s.setColumn(n),i.get(n.getId())&&s.expand(),t>0)return s;const r=this.createBean(new hp(n,[s],this.onGroupExpanded.bind(this),t,!0));return r.addCssClassToTitleBar("ag-filter-toolpanel-header"),i.get(r.getFilterGroupId())||r.collapse(),r}))}refreshAriaLabel(){const e=this.localeService.getLocaleTextFunc(),t=e("ariaFilterPanelList","Filter List"),i=e("filters","Filters"),n=this.getGui().querySelectorAll(".ag-filter-toolpanel-group-item:not(.ag-filter-toolpanel-group-wrapper, .ag-hidden)").length;Yu._.setAriaLabel(this.getAriaElement(),`${t} ${n} ${i}`)}recursivelyAddFilterGroupComps(e,t,i){if(!this.filtersExistInChildren(e.getChildren()))return;const n=e.getColGroupDef();if(n&&n.suppressFiltersToolPanel)return[];const s=e.isPadding()?t:t+1,r=Yu._.flatten(this.recursivelyAddComps(e.getChildren(),s,i));if(e.isPadding())return r;const o=new hp(e,r,this.onGroupExpanded.bind(this),t,!1);this.createBean(o),o.addCssClassToTitleBar("ag-filter-toolpanel-header");const a=i.get(o.getFilterGroupId());return(this.isInitialState&&!a||!1===a)&&o.collapse(),[o]}filtersExistInChildren(e){return e.some(e=>e instanceof Yu.ProvidedColumnGroup?this.filtersExistInChildren(e.getChildren()):this.shouldDisplayFilter(e))}shouldDisplayFilter(e){const t=e.getColDef()&&e.getColDef().suppressFiltersToolPanel;return e.isFilterAllowed()&&!t}getExpansionState(){const e=new Map;if(this.isInitialState){const{expandedColIds:t,expandedGroupIds:i}=this.params.initialState;return t.forEach(t=>e.set(t,!0)),i.forEach(t=>e.set(t,!0)),e}const t=i=>{e.set(i.getFilterGroupId(),i.isExpanded()),i.getChildren().forEach(i=>{i instanceof hp?t(i):e.set(i.getColumn().getId(),i.isExpanded())})};return this.filterGroupComps.forEach(t),e}refresh(){}setVisible(e){super.setDisplayed(e),e&&!this.initialised&&this.init(this.params)}expandFilterGroups(e,t){const i=[],n=s=>{const r=s.getFilterGroupId();(!t||Yu._.includes(t,r))&&(e&&s.isColumnGroup()?s.expand():s.collapse(),i.push(r)),s.getChildren().forEach(e=>{e instanceof hp&&n(e)})};if(this.filterGroupComps.forEach(n),this.onGroupExpanded(),t){const e=t.filter(e=>i.indexOf(e)<0);e.length>0&&console.warn("AG Grid: unable to find groups for these supplied groupIds:",e)}}expandFilters(e,t){const i=[],n=s=>{if(s instanceof hp){let t=!1;return s.getChildren().forEach(i=>{n(i)&&(e?(s.expand(),t=!0):s.isColumnGroup()||s.collapse())}),t}const r=s.getColumn().getColId(),o=!t||Yu._.includes(t,r);return o&&(e?s.expand():s.collapse(),i.push(r)),o};if(this.filterGroupComps.forEach(n),this.onGroupExpanded(),t){const e=t.filter(e=>i.indexOf(e)<0);e.length>0&&console.warn("AG Grid: unable to find columns for these supplied colIds:",e)}}onGroupExpanded(){this.fireExpandedEvent()}onFilterExpanded(){this.dispatchEvent({type:"filterExpanded"})}fireExpandedEvent(){let e=0,t=0;const i=n=>{n.isColumnGroup()&&(n.isExpanded()?e++:t++,n.getChildren().forEach(e=>{e instanceof hp&&i(e)}))};let n;this.filterGroupComps.forEach(i),n=e>0&&t>0?2:t>0?1:0,this.dispatchEvent({type:"groupExpanded",state:n})}performFilterSearch(e){this.searchFilterText=Yu._.exists(e)?e.toLowerCase():null,this.searchFilters(this.searchFilterText)}searchFilters(e){const t=t=>!Yu._.exists(e)||-1!==t.toLowerCase().indexOf(e),i=(e,n)=>{if(!(e instanceof hp))return t(e.getColumnFilterName()||"");const s=e.getChildren(),r=t(e.getFilterGroupName()),o=n||r;if(o){e.hideGroup(!1);for(let t=0;t<s.length;t++)i(s[t],o),e.hideGroupItem(!1,t);return!0}let a=!1;return s.forEach((t,s)=>{const r=i(t,n);e.hideGroupItem(!r,s),r&&(a=!0)}),e.hideGroup(!a),a};let n,s;this.filterGroupComps.forEach((e,t)=>{i(e,!1),void 0===n?e.containsCssClass("ag-hidden")||(n=t,s=t):e.containsCssClass("ag-hidden")||s===t||(s=t)}),this.setFirstAndLastVisible(n,s),this.refreshAriaLabel()}setFirstAndLastVisible(e,t){this.filterGroupComps.forEach((i,n)=>{i.removeCssClass("ag-first-group-visible"),i.removeCssClass("ag-last-group-visible"),n===e&&i.addCssClass("ag-first-group-visible"),n===t&&i.addCssClass("ag-last-group-visible")})}refreshFilters(e){this.filterGroupComps.forEach(t=>t.refreshFilters(e))}getExpandedFiltersAndGroups(){const e=[],t=new Set,i=n=>{if(n instanceof hp){n.getChildren().forEach(e=>i(e));const s=n.getFilterGroupId();n.isExpanded()&&!t.has(s)&&e.push(s)}else n.isExpanded()&&t.add(n.getColumn().getColId())};return this.filterGroupComps.forEach(i),{expandedGroupIds:e,expandedColIds:Array.from(t)}}destroyFilters(){this.filterGroupComps=this.destroyBeans(this.filterGroupComps),Yu._.clearElement(this.getGui())}destroy(){this.destroyFilters(),super.destroy()}};dp.TEMPLATE='<div class="ag-filter-list-panel"></div>',rp([(0,Yu.Autowired)("toolPanelColDefService")],dp.prototype,"toolPanelColDefService",2),rp([(0,Yu.Autowired)("columnModel")],dp.prototype,"columnModel",2);var up=dp,pp=class e extends Zu.Component{constructor(){super(e.TEMPLATE),this.initialised=!1,this.listenerDestroyFuncs=[]}init(e){this.initialised&&(this.listenerDestroyFuncs.forEach(e=>e()),this.listenerDestroyFuncs=[]),this.initialised=!0;const t=this.gos.addGridCommonParams({suppressExpandAll:!1,suppressFilterSearch:!1,suppressSyncLayoutWithGrid:!1});this.params=sp(sp({},t),e),this.filtersToolPanelHeaderPanel.init(this.params),this.filtersToolPanelListPanel.init(this.params);const i=this.params.suppressExpandAll,n=this.params.suppressFilterSearch;i&&n&&this.filtersToolPanelHeaderPanel.setDisplayed(!1),this.listenerDestroyFuncs.push(this.addManagedListener(this.filtersToolPanelHeaderPanel,"expandAll",this.onExpandAll.bind(this)),this.addManagedListener(this.filtersToolPanelHeaderPanel,"collapseAll",this.onCollapseAll.bind(this)),this.addManagedListener(this.filtersToolPanelHeaderPanel,"searchChanged",this.onSearchChanged.bind(this)),this.addManagedListener(this.filtersToolPanelListPanel,"filterExpanded",this.onFilterExpanded.bind(this)),this.addManagedListener(this.filtersToolPanelListPanel,"groupExpanded",this.onGroupExpanded.bind(this)))}setVisible(e){super.setDisplayed(e),e&&!this.initialised&&this.init(this.params)}onExpandAll(){this.filtersToolPanelListPanel.expandFilterGroups(!0)}onCollapseAll(){this.filtersToolPanelListPanel.expandFilterGroups(!1)}onSearchChanged(e){this.filtersToolPanelListPanel.performFilterSearch(e.searchText)}setFilterLayout(e){this.filtersToolPanelListPanel.setFiltersLayout(e)}onFilterExpanded(){this.params.onStateUpdated()}onGroupExpanded(e){this.filtersToolPanelHeaderPanel.setExpandState(e.state),this.params.onStateUpdated()}expandFilterGroups(e){this.filtersToolPanelListPanel.expandFilterGroups(!0,e)}collapseFilterGroups(e){this.filtersToolPanelListPanel.expandFilterGroups(!1,e)}expandFilters(e){this.filtersToolPanelListPanel.expandFilters(!0,e)}collapseFilters(e){this.filtersToolPanelListPanel.expandFilters(!1,e)}syncLayoutWithGrid(){this.filtersToolPanelListPanel.syncFilterLayout()}refresh(e){return this.init(e),!0}getState(){return this.filtersToolPanelListPanel.getExpandedFiltersAndGroups()}destroy(){super.destroy()}};pp.TEMPLATE='<div class="ag-filter-toolpanel">\n            <ag-filters-tool-panel-header ref="filtersToolPanelHeaderPanel"></ag-filters-tool-panel-header>\n            <ag-filters-tool-panel-list ref="filtersToolPanelListPanel"></ag-filters-tool-panel-list>\n         </div>',rp([(0,Zu.RefSelector)("filtersToolPanelHeaderPanel")],pp.prototype,"filtersToolPanelHeaderPanel",2),rp([(0,Zu.RefSelector)("filtersToolPanelListPanel")],pp.prototype,"filtersToolPanelListPanel",2);var gp=pp,fp={version:"31.3.4",moduleName:Ku.ModuleNames.FiltersToolPanelModule,beans:[],agStackComponents:[{componentName:"AgFiltersToolPanelHeader",componentClass:op},{componentName:"AgFiltersToolPanelList",componentClass:up}],userComponents:[{componentName:"agFiltersToolPanel",componentClass:gp}],dependantModules:[Zc,D]},mp=i(98092),vp=i(98092),yp=i(98092),Cp=Object.defineProperty,bp=Object.getOwnPropertyDescriptor,Sp=Object.getOwnPropertySymbols,wp=Object.prototype.hasOwnProperty,xp=Object.prototype.propertyIsEnumerable,Ep=(e,t,i)=>t in e?Cp(e,t,{enumerable:!0,configurable:!0,writable:!0,value:i}):e[t]=i,Mp=(e,t,i,n)=>{for(var s,r=n>1?void 0:n?bp(t,i):t,o=e.length-1;o>=0;o--)(s=e[o])&&(r=(n?s(t,i,r):s(r))||r);return n&&r&&Cp(t,i,r),r},Ap=class extends yp.BeanStub{constructor(){super(...arguments),this.loadRowDataVersion=0}init(e,t){this.params=t,this.comp=e,null!=t.pinned||(this.setAutoHeightClasses(),this.setupRefreshStrategy(),this.addThemeToDetailGrid(),this.createDetailGrid(),this.loadRowData(),this.addManagedListener(this.eventService,yp.Events.EVENT_FULL_WIDTH_ROW_FOCUSED,this.onFullWidthRowFocused.bind(this)))}onFullWidthRowFocused(e){const t=this.params,i={rowIndex:t.node.rowIndex,rowPinned:t.node.rowPinned},n={rowIndex:e.rowIndex,rowPinned:e.rowPinned};this.rowPositionUtils.sameRow(i,n)&&this.focusService.focusInto(this.comp.getGui(),e.fromBelow)}setAutoHeightClasses(){const e=this.gos.get("detailRowAutoHeight"),t=e?"ag-details-row-auto-height":"ag-details-row-fixed-height",i=e?"ag-details-grid-auto-height":"ag-details-grid-fixed-height";this.comp.addOrRemoveCssClass(t,!0),this.comp.addOrRemoveDetailGridCssClass(i,!0)}setupRefreshStrategy(){const e=this.params.refreshStrategy;"everything"==e||"nothing"==e||"rows"==e?this.refreshStrategy=e:(null!=e&&console.warn("AG Grid: invalid cellRendererParams.refreshStrategy = '"+e+"' supplied, defaulting to refreshStrategy = 'rows'."),this.refreshStrategy="rows")}addThemeToDetailGrid(){const{theme:e}=this.environment.getTheme();e&&this.comp.addOrRemoveDetailGridCssClass(e,!0)}createDetailGrid(){if(yp._.missing(this.params.detailGridOptions))return void console.warn("AG Grid: could not find detail grid options for master detail, please set gridOptions.detailCellRendererParams.detailGridOptions");const e=this.gos.get("detailRowAutoHeight"),t=((e,t)=>{for(var i in t||(t={}))wp.call(t,i)&&Ep(e,i,t[i]);if(Sp)for(var i of Sp(t))xp.call(t,i)&&Ep(e,i,t[i]);return e})({},this.params.detailGridOptions);e&&(t.domLayout="autoHeight"),this.comp.setDetailGrid(t)}registerDetailWithMaster(e,t){const i=this.params.node.id,n=this.params.api,s={id:i,api:e,columnApi:t},r=this.params.node;n.isDestroyed()||(n.addDetailGridInfo(i,s),r.detailGridInfo=s,this.addDestroyFunc(()=>{r.detailGridInfo===s&&(n.isDestroyed()||n.removeDetailGridInfo(i),r.detailGridInfo=null)}))}loadRowData(){var e,t,i;this.loadRowDataVersion++;const n=this.loadRowDataVersion;if("serverSide"===(null==(e=this.params.detailGridOptions)?void 0:e.rowModelType))return void(null==(i=null==(t=this.params.node.detailGridInfo)?void 0:t.api)||i.refreshServerSide({purge:!0}));const s=this.params.getDetailRowData;s?s({node:this.params.node,data:this.params.node.data,successCallback:e=>{this.loadRowDataVersion===n&&this.comp.setRowData(e)},context:this.gos.getGridCommonParams().context}):console.warn("AG Grid: could not find getDetailRowData for master / detail, please set gridOptions.detailCellRendererParams.getDetailRowData")}refresh(){const e=!0;switch(this.refreshStrategy){case"nothing":return e;case"everything":return!1}return this.loadRowData(),e}};Mp([(0,yp.Autowired)("rowPositionUtils")],Ap.prototype,"rowPositionUtils",2),Mp([(0,yp.Autowired)("focusService")],Ap.prototype,"focusService",2);var Tp=class e extends vp.Component{init(e){this.params=e,this.selectAndSetTemplate();const t={addOrRemoveCssClass:(e,t)=>this.addOrRemoveCssClass(e,t),addOrRemoveDetailGridCssClass:(e,t)=>this.eDetailGrid.classList.toggle(e,t),setDetailGrid:e=>this.setDetailGrid(e),setRowData:e=>this.setRowData(e),getGui:()=>this.eDetailGrid};this.ctrl=this.createManagedBean(new Ap),this.ctrl.init(t,e)}refresh(){return this.ctrl&&this.ctrl.refresh()}destroy(){super.destroy()}selectAndSetTemplate(){if(this.params.pinned)return void this.setTemplate('<div class="ag-details-row"></div>');const t=()=>{this.setTemplate(e.TEMPLATE)};if(vp._.missing(this.params.template))t();else if("string"==typeof this.params.template)this.setTemplate(this.params.template);else if("function"==typeof this.params.template){const e=(0,this.params.template)(this.params);this.setTemplate(e)}else console.warn("AG Grid: detailCellRendererParams.template should be function or string"),t();null==this.eDetailGrid&&console.warn('AG Grid: reference to eDetailGrid was missing from the details template. Please add ref="eDetailGrid" to the template.')}setDetailGrid(e){if(!this.eDetailGrid)return;const t=this.context.getBean("agGridReact"),i=t?vp._.cloneObject(t):void 0,n=this.context.getBean("frameworkComponentWrapper"),s=this.getFrameworkOverrides(),r=(0,vp.createGrid)(this.eDetailGrid,e,{frameworkOverrides:s,providedBeanInstances:{agGridReact:i,frameworkComponentWrapper:n},modules:vp.ModuleRegistry.__getGridRegisteredModules(this.params.api.getGridId())});this.detailApi=r,this.ctrl.registerDetailWithMaster(r,new vp.ColumnApi(r)),this.addDestroyFunc(()=>{null==r||r.destroy()})}setRowData(e){this.detailApi&&this.detailApi.setGridOption("rowData",e)}};Tp.TEMPLATE='<div class="ag-details-row" role="gridcell">\n            <div ref="eDetailGrid" class="ag-details-grid" role="presentation"></div>\n        </div>',Mp([(0,vp.RefSelector)("eDetailGrid")],Tp.prototype,"eDetailGrid",2);var Dp=Tp,Ip={version:"31.3.4",moduleName:mp.ModuleNames.MasterDetailModule,beans:[],userComponents:[{componentName:"agDetailCellRenderer",componentClass:Dp}],controllers:[{controllerName:"detailCellRenderer",controllerClass:Ap}],dependantModules:[D]},Rp=i(98092),Lp=i(98092),kp=i(98092),Pp=i(98092),Np=i(98092),Op=i(98092),_p=i(98092),Fp=i(98092),Gp=Object.defineProperty,Vp=Object.defineProperties,Bp=Object.getOwnPropertyDescriptor,Hp=Object.getOwnPropertyDescriptors,zp=Object.getOwnPropertySymbols,Up=Object.prototype.hasOwnProperty,Wp=Object.prototype.propertyIsEnumerable,jp=(e,t,i)=>t in e?Gp(e,t,{enumerable:!0,configurable:!0,writable:!0,value:i}):e[t]=i,Kp=(e,t)=>{for(var i in t||(t={}))Up.call(t,i)&&jp(e,i,t[i]);if(zp)for(var i of zp(t))Wp.call(t,i)&&jp(e,i,t[i]);return e},$p=(e,t)=>Vp(e,Hp(t)),Yp=(e,t,i,n)=>{for(var s,r=n>1?void 0:n?Bp(t,i):t,o=e.length-1;o>=0;o--)(s=e[o])&&(r=(n?s(t,i,r):s(r))||r);return n&&r&&Gp(t,i,r),r},qp=class extends Lp.BeanStub{hideActiveMenu(){this.destroyBean(this.activeMenu)}showMenuAfterMouseEvent(e,t,i,n){const s=n?"filterMenuTab":void 0;this.showMenu(e,n=>{var r;const o=n.getGui();this.popupService.positionPopupUnderMouseEvent({type:i,column:e,mouseEvent:t,ePopup:o}),s&&(null==(r=n.showTab)||r.call(n,s)),this.dispatchVisibleChangedEvent(!0,!1,e,s)},i,s,void 0,t.target)}showMenuAfterButtonClick(e,t,i,n){let s=-1,r="left";this.gos.get("enableRtl")&&(s=1,r="right");const o=n?"filterMenuTab":void 0,a=o?[o]:void 0,l=this.menuService.isLegacyMenuEnabled();let c=(l?9:4)*s,h=l?-23:4;this.showMenu(e,n=>{var s;const a=n.getGui();this.popupService.positionPopupByComponent({type:i,column:e,eventSource:t,ePopup:a,alignSide:r,nudgeX:c,nudgeY:h,position:"under",keepWithinBounds:!0}),o&&(null==(s=n.showTab)||s.call(n,o)),this.dispatchVisibleChangedEvent(!0,!1,e,o)},i,o,a,t)}showMenu(e,t,i,n,s,r){var o;const{menu:a,eMenuGui:l,anchorToElement:c,restoreFocusParams:h}=this.getMenuParams(e,s,r),d=[];d.push(t=>{const i=a.getGui();this.destroyBean(a),e&&(e.setMenuVisible(!1,"contextMenu"),this.menuUtils.restoreFocusOnClose(h,i,t))});const u=this.localeService.getLocaleTextFunc();if(this.popupService.addPopup({modal:!0,eChild:l,closeOnEsc:!0,closedCallback:t=>{d.forEach(e=>e(t)),this.dispatchVisibleChangedEvent(!1,!1,e,n)},afterGuiAttached:e=>a.afterGuiAttached(Object.assign({},{container:i},e)),positionCallback:n?()=>t(a):void 0,ariaLabel:u("ariaLabelColumnMenu","Column Menu")}),n||(null==(o=a.showTabBasedOnPreviousSelection)||o.call(a),t(a)),this.menuService.isColumnMenuAnchoringEnabled()){const t=this.popupService.setPopupPositionRelatedToElement(l,c);t&&e&&this.addStopAnchoring(t,e,d)}a.addEventListener(Zp.EVENT_TAB_SELECTED,t=>{this.dispatchVisibleChangedEvent(!1,!0,e),this.lastSelectedTab=t.key,this.dispatchVisibleChangedEvent(!0,!0,e)}),null==e||e.setMenuVisible(!0,"contextMenu"),this.activeMenu=a,a.addEventListener(Lp.BeanStub.EVENT_DESTROYED,()=>{this.activeMenu===a&&(this.activeMenu=null)})}addStopAnchoring(e,t,i){e.then(e=>{t.addEventListener("leftChanged",e),t.addEventListener("visibleChanged",e),i.push(()=>{t.removeEventListener("leftChanged",e),t.removeEventListener("visibleChanged",e)})})}getMenuParams(e,t,i){const n={column:e,headerPosition:this.focusService.getFocusedHeader(),columnIndex:this.columnModel.getAllDisplayedColumns().indexOf(e),eventSource:i},s=this.createMenu(e,n,t,i);return{menu:s,eMenuGui:s.getGui(),anchorToElement:i||this.ctrlsService.getGridBodyCtrl().getGui(),restoreFocusParams:n}}createMenu(e,t,i,n){return this.menuService.isLegacyMenuEnabled()?this.createBean(new Zp(e,t,this.lastSelectedTab,i,n)):this.createBean(new Qp(e,t,n))}dispatchVisibleChangedEvent(e,t,i,n){var s,r;const o={type:Lp.Events.EVENT_COLUMN_MENU_VISIBLE_CHANGED,visible:e,switchingTab:t,key:null!=(r=null!=(s=this.lastSelectedTab)?s:n)?r:this.menuService.isLegacyMenuEnabled()?Zp.TAB_GENERAL:"columnMenu",column:null!=i?i:null};this.eventService.dispatchEvent(o)}isMenuEnabled(e){var t;if(!this.menuService.isLegacyMenuEnabled())return!0;const i=!this.filterManager.isFilterAllowed(e),n=null!=(t=e.getColDef().menuTabs)?t:Zp.TABS_DEFAULT;return(i&&n.includes(Zp.TAB_FILTER)?n.length-1:n.length)>0}showMenuAfterContextMenuEvent(e,t,i){this.menuUtils.onContextMenu(t,i,t=>(this.showMenuAfterMouseEvent(e,t,"columnMenu"),!0))}};Yp([(0,Lp.Autowired)("popupService")],qp.prototype,"popupService",2),Yp([(0,Lp.Autowired)("focusService")],qp.prototype,"focusService",2),Yp([(0,Lp.Autowired)("ctrlsService")],qp.prototype,"ctrlsService",2),Yp([(0,Lp.Autowired)("columnModel")],qp.prototype,"columnModel",2),Yp([(0,Lp.Autowired)("filterManager")],qp.prototype,"filterManager",2),Yp([(0,Lp.Autowired)("menuUtils")],qp.prototype,"menuUtils",2),Yp([(0,Lp.Autowired)("menuService")],qp.prototype,"menuService",2),qp=Yp([(0,Lp.Bean)("enterpriseMenuFactory")],qp);var Xp=class e extends Lp.BeanStub{constructor(t,i,n,s,r){super(),this.column=t,this.restoreFocusParams=i,this.initialSelection=n,this.restrictTo=s,this.sourceElement=r,this.tabFactories={},this.includeChecks={},this.tabFactories[e.TAB_GENERAL]=this.createMainPanel.bind(this),this.tabFactories[e.TAB_FILTER]=this.createFilterPanel.bind(this),this.tabFactories[e.TAB_COLUMNS]=this.createColumnsPanel.bind(this),this.includeChecks[e.TAB_GENERAL]=()=>!0,this.includeChecks[e.TAB_FILTER]=()=>!!t&&this.filterManager.isFilterAllowed(t),this.includeChecks[e.TAB_COLUMNS]=()=>!0}init(){const e=this.getTabsToCreate().map(e=>this.createTab(e));this.tabbedLayout=new Lp.TabbedLayout({items:e,cssClass:"ag-menu",onActiveItemClicked:this.onHidePopup.bind(this),onItemClicked:this.onTabItemClicked.bind(this)}),this.createBean(this.tabbedLayout),this.mainMenuList&&this.mainMenuList.setParentComponent(this.tabbedLayout),this.addDestroyFunc(()=>this.destroyBean(this.tabbedLayout))}getTabsToCreate(){var t,i;return this.restrictTo?this.restrictTo:(null!=(i=null==(t=this.column)?void 0:t.getColDef().menuTabs)?i:e.TABS_DEFAULT).filter(e=>this.isValidMenuTabItem(e)).filter(e=>this.isNotSuppressed(e)).filter(e=>this.isModuleLoaded(e))}isModuleLoaded(t){return t!==e.TAB_COLUMNS||Lp.ModuleRegistry.__isRegistered(Lp.ModuleNames.ColumnsToolPanelModule,this.context.getGridId())}isValidMenuTabItem(t){let i=!0,n=e.TABS_DEFAULT;return null!=this.restrictTo&&(i=this.restrictTo.indexOf(t)>-1,n=this.restrictTo),i=i&&e.TABS_DEFAULT.indexOf(t)>-1,i||console.warn(`AG Grid: Trying to render an invalid menu item '${t}'. Check that your 'menuTabs' contains one of [${n}]`),i}isNotSuppressed(e){return this.includeChecks[e]()}createTab(e){return this.tabFactories[e]()}showTabBasedOnPreviousSelection(){this.showTab(this.initialSelection)}showTab(t){this.tabItemColumns&&t===e.TAB_COLUMNS?this.tabbedLayout.showItem(this.tabItemColumns):this.tabItemFilter&&t===e.TAB_FILTER?this.tabbedLayout.showItem(this.tabItemFilter):this.tabItemGeneral&&t===e.TAB_GENERAL?this.tabbedLayout.showItem(this.tabItemGeneral):this.tabbedLayout.showFirstItem()}onTabItemClicked(t){let i=null;switch(t.item){case this.tabItemColumns:i=e.TAB_COLUMNS;break;case this.tabItemFilter:i=e.TAB_FILTER;break;case this.tabItemGeneral:i=e.TAB_GENERAL}i&&this.activateTab(i)}activateTab(t){const i={type:e.EVENT_TAB_SELECTED,key:t};this.dispatchEvent(i)}createMainPanel(){return this.mainMenuList=this.columnMenuFactory.createMenu(this,this.column,()=>{var e;return null!=(e=this.sourceElement)?e:this.getGui()}),this.mainMenuList.addEventListener(Lp.AgMenuItemComponent.EVENT_CLOSE_MENU,this.onHidePopup.bind(this)),this.tabItemGeneral={title:Lp._.createIconNoSpan("menu",this.gos,this.column),titleLabel:e.TAB_GENERAL.replace("MenuTab",""),bodyPromise:Lp.AgPromise.resolve(this.mainMenuList.getGui()),name:e.TAB_GENERAL},this.tabItemGeneral}onHidePopup(e){this.menuUtils.closePopupAndRestoreFocusOnSelect(this.hidePopupFunc,this.restoreFocusParams,e)}createFilterPanel(){const t=this.column?this.createManagedBean(new Lp.FilterWrapperComp(this.column,"COLUMN_MENU")):null;if(!(null==t?void 0:t.hasFilter()))throw new Error("AG Grid - Unable to instantiate filter");return this.tabItemFilter={title:Lp._.createIconNoSpan("filter",this.gos,this.column),titleLabel:e.TAB_FILTER.replace("MenuTab",""),bodyPromise:Lp.AgPromise.resolve(null==t?void 0:t.getGui()),afterAttachedCallback:e=>t.afterGuiAttached(e),afterDetachedCallback:()=>t.afterGuiDetached(),name:e.TAB_FILTER},this.tabItemFilter}createColumnsPanel(){const t=document.createElement("div");t.classList.add("ag-menu-column-select-wrapper");const i=this.columnChooserFactory.createColumnSelectPanel(this,this.column).getGui();return i.classList.add("ag-menu-column-select"),t.appendChild(i),this.tabItemColumns={title:Lp._.createIconNoSpan("columns",this.gos,this.column),titleLabel:e.TAB_COLUMNS.replace("MenuTab",""),bodyPromise:Lp.AgPromise.resolve(t),name:e.TAB_COLUMNS},this.tabItemColumns}afterGuiAttached(e){const{container:t,hidePopup:i}=e;this.tabbedLayout.setAfterAttachedParams({container:t,hidePopup:i}),i&&(this.hidePopupFunc=i,this.addDestroyFunc(i))}getGui(){return this.tabbedLayout.getGui()}};Xp.EVENT_TAB_SELECTED="tabSelected",Xp.TAB_FILTER="filterMenuTab",Xp.TAB_GENERAL="generalMenuTab",Xp.TAB_COLUMNS="columnsMenuTab",Xp.TABS_DEFAULT=[Xp.TAB_GENERAL,Xp.TAB_FILTER,Xp.TAB_COLUMNS],Yp([(0,Lp.Autowired)("filterManager")],Xp.prototype,"filterManager",2),Yp([(0,Lp.Autowired)("columnChooserFactory")],Xp.prototype,"columnChooserFactory",2),Yp([(0,Lp.Autowired)("columnMenuFactory")],Xp.prototype,"columnMenuFactory",2),Yp([(0,Lp.Autowired)("menuUtils")],Xp.prototype,"menuUtils",2),Yp([Lp.PostConstruct],Xp.prototype,"init",1);var Zp=Xp,Qp=class extends Lp.Component{constructor(e,t,i){super('\n            <div ref="eColumnMenu" role="presentation" class="ag-menu ag-column-menu"></div>\n        '),this.column=e,this.restoreFocusParams=t,this.sourceElement=i}init(){this.mainMenuList=this.columnMenuFactory.createMenu(this,this.column,()=>{var e;return null!=(e=this.sourceElement)?e:this.getGui()}),this.mainMenuList.addEventListener(Lp.AgMenuItemComponent.EVENT_CLOSE_MENU,this.onHidePopup.bind(this)),this.eColumnMenu.appendChild(this.mainMenuList.getGui())}onHidePopup(e){this.menuUtils.closePopupAndRestoreFocusOnSelect(this.hidePopupFunc,this.restoreFocusParams,e)}afterGuiAttached({hidePopup:e}){e&&(this.hidePopupFunc=e,this.addDestroyFunc(e)),this.focusService.focusInto(this.mainMenuList.getGui())}};Yp([(0,Lp.Autowired)("columnMenuFactory")],Qp.prototype,"columnMenuFactory",2),Yp([(0,Lp.Autowired)("menuUtils")],Qp.prototype,"menuUtils",2),Yp([(0,Lp.Autowired)("focusService")],Qp.prototype,"focusService",2),Yp([(0,Lp.RefSelector)("eColumnMenu")],Qp.prototype,"eColumnMenu",2),Yp([Lp.PostConstruct],Qp.prototype,"init",1);var Jp="ag-context-menu-open",eg=class extends kp.BeanStub{hideActiveMenu(){this.destroyBean(this.activeMenu)}getMenuItems(e,t,i){const n=[];if(kp._.exists(e)&&kp.ModuleRegistry.__isRegistered(kp.ModuleNames.ClipboardModule,this.context.getGridId())&&t&&(this.gos.get("suppressCutToClipboard")||n.push("cut"),n.push("copy","copyWithHeaders","copyWithGroupHeaders","paste","separator")),this.gos.get("enableCharts")&&kp.ModuleRegistry.__isRegistered(kp.ModuleNames.GridChartsModule,this.context.getGridId())&&(this.columnModel.isPivotMode()&&n.push("pivotChart"),this.rangeService&&!this.rangeService.isEmpty()&&n.push("chartRange")),kp._.exists(e)){const e=!kp.ModuleRegistry.__isRegistered(kp.ModuleNames.CsvExportModule,this.context.getGridId()),t=!kp.ModuleRegistry.__isRegistered(kp.ModuleNames.ExcelExportModule,this.context.getGridId()),i=this.gos.get("suppressExcelExport")||t,s=this.gos.get("suppressCsvExport")||e;!(kp._.isIOSUserAgent()||i&&s)&&n.push("export")}const s=n.length?n:void 0,r=null==t?void 0:t.getColDef().contextMenuItems;if(Array.isArray(r))return r;if("function"==typeof r)return r(this.gos.addGridCommonParams({column:t,node:e,value:i,defaultItems:s}));const o=this.gos.getCallback("getContextMenuItems");return o?o({column:t,node:e,value:i,defaultItems:s}):n}onContextMenu(e,t,i,n,s,r){this.menuUtils.onContextMenu(e,t,e=>this.showMenu(i,n,s,e,r))}showMenu(e,t,i,n,s){const r=this.getMenuItems(e,t,i),o=this.ctrlsService.getGridBodyCtrl().getGui();if(void 0===r||kp._.missingOrEmpty(r))return!1;const a=new tg(r,t,e,i);this.createBean(a);const l=a.getGui(),c={column:t,rowNode:e,type:"contextMenu",mouseEvent:n,ePopup:l,nudgeY:1},h=this.localeService.getLocaleTextFunc(),d=this.popupService.addPopup({modal:!0,eChild:l,closeOnEsc:!0,closedCallback:e=>{o.classList.remove(Jp),this.destroyBean(a),this.dispatchVisibleChangedEvent(!1,void 0===e?"api":"ui")},click:n,positionCallback:()=>{const e=this.gos.get("enableRtl");this.popupService.positionPopupUnderMouseEvent($p(Kp({},c),{nudgeX:e?-1*(l.offsetWidth+1):1}))},anchorToElement:s,ariaLabel:h("ariaLabelContextMenu","Context Menu")});d&&(o.classList.add(Jp),a.afterGuiAttached({container:"contextMenu",hidePopup:d.hideFunc})),this.activeMenu&&this.hideActiveMenu(),this.activeMenu=a,a.addEventListener(kp.BeanStub.EVENT_DESTROYED,()=>{this.activeMenu===a&&(this.activeMenu=null)}),d&&a.addEventListener(kp.AgMenuItemComponent.EVENT_CLOSE_MENU,e=>{var t,i;return d.hideFunc({mouseEvent:null!=(t=e.mouseEvent)?t:void 0,keyboardEvent:null!=(i=e.keyboardEvent)?i:void 0,forceHide:!0})});const u=n&&n instanceof MouseEvent&&"mousedown"===n.type;return this.dispatchVisibleChangedEvent(!0,u?"api":"ui"),!0}dispatchVisibleChangedEvent(e,t="ui"){const i={type:kp.Events.EVENT_CONTEXT_MENU_VISIBLE_CHANGED,visible:e,source:t};this.eventService.dispatchEvent(i)}};Yp([(0,kp.Autowired)("popupService")],eg.prototype,"popupService",2),Yp([(0,kp.Autowired)("ctrlsService")],eg.prototype,"ctrlsService",2),Yp([(0,kp.Autowired)("columnModel")],eg.prototype,"columnModel",2),Yp([(0,kp.Autowired)("menuUtils")],eg.prototype,"menuUtils",2),Yp([(0,kp.Optional)("rangeService")],eg.prototype,"rangeService",2),eg=Yp([(0,kp.Bean)("contextMenuFactory")],eg);var tg=class extends kp.Component{constructor(e,t,i,n){super('<div class="ag-menu" role="presentation"></div>'),this.menuItems=e,this.column=t,this.node=i,this.value=n,this.menuList=null,this.focusedCell=null}addMenuItems(){const e=this.createManagedBean(new kp.AgMenuList(0,{column:this.column,node:this.node,value:this.value})),t=this.menuItemMapper.mapWithStockItems(this.menuItems,null,()=>this.getGui());e.addMenuItems(t),this.appendChild(e),this.menuList=e,e.addEventListener(kp.AgMenuItemComponent.EVENT_CLOSE_MENU,e=>this.dispatchEvent(e))}afterGuiAttached(e){e.hidePopup&&this.addDestroyFunc(e.hidePopup),this.focusedCell=this.focusService.getFocusedCell(),this.menuList&&this.focusService.focusInto(this.menuList.getGui())}restoreFocusedCell(){const e=this.focusService.getFocusedCell();if(e&&this.focusedCell&&this.cellPositionUtils.equals(e,this.focusedCell)){const{rowIndex:e,rowPinned:t,column:i}=this.focusedCell,n=this.gos.getDocument(),s=this.gos.getActiveDomElement();s&&s!==n.body||this.focusService.setFocusedCell({rowIndex:e,column:i,rowPinned:t,forceBrowserFocus:!0,preventScrollOnBrowserFocus:!this.focusService.isKeyboardMode()})}}destroy(){this.restoreFocusedCell(),super.destroy()}};Yp([(0,kp.Autowired)("menuItemMapper")],tg.prototype,"menuItemMapper",2),Yp([(0,kp.Autowired)("focusService")],tg.prototype,"focusService",2),Yp([(0,kp.Autowired)("cellPositionUtils")],tg.prototype,"cellPositionUtils",2),Yp([kp.PostConstruct],tg.prototype,"addMenuItems",1);var ig=class extends Pp.BeanStub{mapWithStockItems(e,t,i){if(!e)return[];const n=[];return e.forEach(e=>{let s;if(s="string"==typeof e?this.getStockMenuItem(e,t,i):Kp({},e),!s)return;const r=s,{subMenu:o}=r;o&&o instanceof Array&&(r.subMenu=this.mapWithStockItems(o,t,i)),null!=s&&n.push(s)}),n}getStockMenuItem(e,t,i){var n;const s=this.localeService.getLocaleTextFunc(),r=this.gos.get("skipHeaderOnAutoSize");switch(e){case"pinSubMenu":return{name:s("pinColumn","Pin Column"),icon:Pp._.createIconNoSpan("menuPin",this.gos,null),subMenu:["clearPinned","pinLeft","pinRight"]};case"pinLeft":return{name:s("pinLeft","Pin Left"),action:()=>this.columnModel.setColumnsPinned([t],"left","contextMenu"),checked:!!t&&t.isPinnedLeft()};case"pinRight":return{name:s("pinRight","Pin Right"),action:()=>this.columnModel.setColumnsPinned([t],"right","contextMenu"),checked:!!t&&t.isPinnedRight()};case"clearPinned":return{name:s("noPin","No Pin"),action:()=>this.columnModel.setColumnsPinned([t],null,"contextMenu"),checked:!!t&&!t.isPinned()};case"valueAggSubMenu":return Pp.ModuleRegistry.__assertRegistered(Pp.ModuleNames.RowGroupingModule,"Aggregation from Menu",this.context.getGridId())&&((null==t?void 0:t.isPrimary())||(null==t?void 0:t.getColDef().pivotValueColumn))?{name:s("valueAggregation","Value Aggregation"),icon:Pp._.createIconNoSpan("menuValue",this.gos,null),subMenu:this.createAggregationSubMenu(t,this.aggFuncService)}:null;case"autoSizeThis":return{name:s("autosizeThiscolumn","Autosize This Column"),action:()=>this.columnModel.autoSizeColumn(t,"contextMenu",r)};case"autoSizeAll":return{name:s("autosizeAllColumns","Autosize All Columns"),action:()=>this.columnModel.autoSizeAllColumns("contextMenu",r)};case"rowGroup":return{name:s("groupBy","Group by")+" "+Pp._.escapeString(this.columnModel.getDisplayNameForColumn(t,"header")),disabled:(null==t?void 0:t.isRowGroupActive())||!(null==t?void 0:t.getColDef().enableRowGroup),action:()=>this.columnModel.addRowGroupColumns([t],"contextMenu"),icon:Pp._.createIconNoSpan("menuAddRowGroup",this.gos,null)};case"rowUnGroup":const o=Pp._.createIconNoSpan("menuRemoveRowGroup",this.gos,null),a=null==t?void 0:t.getColDef().showRowGroup,l=this.gos.get("groupLockGroupColumns");if(!0===a)return{name:s("ungroupAll","Un-Group All"),disabled:-1===l||l>=this.columnModel.getRowGroupColumns().length,action:()=>this.columnModel.setRowGroupColumns(this.columnModel.getRowGroupColumns().slice(0,l),"contextMenu"),icon:o};if("string"==typeof a){const e=this.columnModel.getPrimaryColumn(a),t=null!=e?Pp._.escapeString(this.columnModel.getDisplayNameForColumn(e,"header")):a;return{name:s("ungroupBy","Un-Group by")+" "+t,disabled:null!=e&&this.columnModel.isColumnGroupingLocked(e),action:()=>this.columnModel.removeRowGroupColumns([a],"contextMenu"),icon:o}}return{name:s("ungroupBy","Un-Group by")+" "+Pp._.escapeString(this.columnModel.getDisplayNameForColumn(t,"header")),disabled:!(null==t?void 0:t.isRowGroupActive())||!(null==t?void 0:t.getColDef().enableRowGroup)||this.columnModel.isColumnGroupingLocked(t),action:()=>this.columnModel.removeRowGroupColumns([t],"contextMenu"),icon:o};case"resetColumns":return{name:s("resetColumns","Reset Columns"),action:()=>this.columnModel.resetColumnState("contextMenu")};case"expandAll":return{name:s("expandAll","Expand All Row Groups"),action:()=>this.gridApi.expandAll()};case"contractAll":return{name:s("collapseAll","Collapse All Row Groups"),action:()=>this.gridApi.collapseAll()};case"copy":return Pp.ModuleRegistry.__assertRegistered(Pp.ModuleNames.ClipboardModule,"Copy from Menu",this.context.getGridId())?{name:s("copy","Copy"),shortcut:s("ctrlC","Ctrl+C"),icon:Pp._.createIconNoSpan("clipboardCopy",this.gos,null),action:()=>this.clipboardService.copyToClipboard()}:null;case"copyWithHeaders":return Pp.ModuleRegistry.__assertRegistered(Pp.ModuleNames.ClipboardModule,"Copy with Headers from Menu",this.context.getGridId())?{name:s("copyWithHeaders","Copy with Headers"),icon:Pp._.createIconNoSpan("clipboardCopy",this.gos,null),action:()=>this.clipboardService.copyToClipboard({includeHeaders:!0})}:null;case"copyWithGroupHeaders":return Pp.ModuleRegistry.__assertRegistered(Pp.ModuleNames.ClipboardModule,"Copy with Group Headers from Menu",this.context.getGridId())?{name:s("copyWithGroupHeaders","Copy with Group Headers"),icon:Pp._.createIconNoSpan("clipboardCopy",this.gos,null),action:()=>this.clipboardService.copyToClipboard({includeHeaders:!0,includeGroupHeaders:!0})}:null;case"cut":if(Pp.ModuleRegistry.__assertRegistered(Pp.ModuleNames.ClipboardModule,"Cut from Menu",this.context.getGridId())){const e=this.focusService.getFocusedCell(),t=e?this.rowPositionUtils.getRowNode(e):null,i=!!t&&(null==e?void 0:e.column.isCellEditable(t));return{name:s("cut","Cut"),shortcut:s("ctrlX","Ctrl+X"),icon:Pp._.createIconNoSpan("clipboardCut",this.gos,null),disabled:!i||this.gos.get("suppressCutToClipboard"),action:()=>this.clipboardService.cutToClipboard(void 0,"contextMenu")}}return null;case"paste":return Pp.ModuleRegistry.__assertRegistered(Pp.ModuleNames.ClipboardModule,"Paste from Clipboard",this.context.getGridId())?{name:s("paste","Paste"),shortcut:s("ctrlV","Ctrl+V"),disabled:!0,icon:Pp._.createIconNoSpan("clipboardPaste",this.gos,null),action:()=>this.clipboardService.pasteFromClipboard()}:null;case"export":const c=[],h=Pp.ModuleRegistry.__isRegistered(Pp.ModuleNames.CsvExportModule,this.context.getGridId()),d=Pp.ModuleRegistry.__isRegistered(Pp.ModuleNames.ExcelExportModule,this.context.getGridId());return!this.gos.get("suppressCsvExport")&&h&&c.push("csvExport"),!this.gos.get("suppressExcelExport")&&d&&c.push("excelExport"),{name:s("export","Export"),subMenu:c,icon:Pp._.createIconNoSpan("save",this.gos,null)};case"csvExport":return{name:s("csvExport","CSV Export"),icon:Pp._.createIconNoSpan("csvExport",this.gos,null),action:()=>this.gridApi.exportDataAsCsv({})};case"excelExport":return{name:s("excelExport","Excel Export"),icon:Pp._.createIconNoSpan("excelExport",this.gos,null),action:()=>this.gridApi.exportDataAsExcel()};case"separator":return"separator";case"pivotChart":case"chartRange":return null!=(n=this.chartMenuItemMapper.getChartItems(e))?n:null;case"columnFilter":return t?{name:s("columnFilter","Column Filter"),icon:Pp._.createIconNoSpan("filter",this.gos,null),action:()=>this.menuService.showFilterMenu({column:t,buttonElement:i(),containerType:"columnFilter",positionBy:"button"})}:null;case"columnChooser":return Pp.ModuleRegistry.__isRegistered(Pp.ModuleNames.ColumnsToolPanelModule,this.context.getGridId())?{name:s("columnChooser","Choose Columns"),icon:Pp._.createIconNoSpan("columns",this.gos,null),action:()=>this.menuService.showColumnChooser({column:t,eventSource:i()})}:null;case"sortAscending":return{name:s("sortAscending","Sort Ascending"),icon:Pp._.createIconNoSpan("sortAscending",this.gos,null),action:()=>this.sortController.setSortForColumn(t,"asc",!1,"columnMenu")};case"sortDescending":return{name:s("sortDescending","Sort Descending"),icon:Pp._.createIconNoSpan("sortDescending",this.gos,null),action:()=>this.sortController.setSortForColumn(t,"desc",!1,"columnMenu")};case"sortUnSort":return{name:s("sortUnSort","Clear Sort"),icon:Pp._.createIconNoSpan("sortUnSort",this.gos,null),action:()=>this.sortController.setSortForColumn(t,null,!1,"columnMenu")};default:return console.warn(`AG Grid: unknown menu item type ${e}`),null}}createAggregationSubMenu(e,t){const i=this.localeService.getLocaleTextFunc();let n;if(e.isPrimary())n=e;else{const t=e.getColDef().pivotValueColumn;n=Pp._.exists(t)?t:void 0}const s=[];if(n){const e=n.isValueActive(),r=t.getFuncNames(n);s.push({name:i("noAggregation","None"),action:()=>{this.columnModel.removeValueColumns([n],"contextMenu"),this.columnModel.setColumnAggFunc(n,void 0,"contextMenu")},checked:!e}),r.forEach(r=>{s.push({name:i(r,t.getDefaultFuncLabel(r)),action:()=>{this.columnModel.setColumnAggFunc(n,r,"contextMenu"),this.columnModel.addValueColumns([n],"contextMenu")},checked:e&&n.getAggFunc()===r})})}return s}};Yp([(0,Pp.Autowired)("columnModel")],ig.prototype,"columnModel",2),Yp([(0,Pp.Autowired)("gridApi")],ig.prototype,"gridApi",2),Yp([(0,Pp.Autowired)("focusService")],ig.prototype,"focusService",2),Yp([(0,Pp.Autowired)("rowPositionUtils")],ig.prototype,"rowPositionUtils",2),Yp([(0,Pp.Autowired)("chartMenuItemMapper")],ig.prototype,"chartMenuItemMapper",2),Yp([(0,Pp.Autowired)("menuService")],ig.prototype,"menuService",2),Yp([(0,Pp.Autowired)("sortController")],ig.prototype,"sortController",2),Yp([(0,Pp.Optional)("clipboardService")],ig.prototype,"clipboardService",2),Yp([(0,Pp.Optional)("aggFuncService")],ig.prototype,"aggFuncService",2),ig=Yp([(0,Pp.Bean)("menuItemMapper")],ig);var ng=class extends Np.BeanStub{getChartItems(e){var t,i;if(!this.chartService)return void Np.ModuleRegistry.__assertRegistered(Np.ModuleNames.GridChartsModule,`the Context Menu key "${e}"`,this.context.getGridId());const n="pivotChart"===e?new sg(this.gos,this.chartService,this.localeService):new rg(this.gos,this.chartService,this.localeService),s=this.chartService.isEnterprise();let r=n.getMenuItem();if(r&&r.subMenu&&!s){const e=t=>{var i;return $p(Kp({},t),{subMenu:null==(i=t.subMenu)?void 0:i.filter(e=>!e._enterprise).map(t=>e(t))})};r=e(r)}const o=null==(i=null==(t=this.gos.get("chartToolPanelsDef"))?void 0:t.settingsPanel)?void 0:i.chartGroupsDef;return o&&(r=ng.filterAndOrderChartMenu(r,o,n.getConfigLookup())),this.cleanInternals(r)}cleanInternals(e){if(!e)return e;const t=e=>{var i;return null==e||delete e._key,null==e||delete e._enterprise,null==(i=null==e?void 0:e.subMenu)||i.forEach(e=>t(e)),e};return t(e)}static buildLookup(e){let t={};const i=e=>{t[e._key]=e,e.subMenu&&e.subMenu.forEach(e=>i(e))};return i(e),t}static filterAndOrderChartMenu(e,t,i){var n;const s=this.buildLookup(e);let r=$p(Kp({},e),{subMenu:[]});if(Object.entries(t).forEach(([e,t])=>{var n,o;const a=i[e];if(null===a)return;if(null==a)return void Np._.warnOnce(`invalid chartGroupsDef config '${e}'`);const l=s[a._key];if(l)if(l.subMenu){const i=t.map(t=>{const i=a[t];if(null!=i)return s[i];Np._.warnOnce(`invalid chartGroupsDef config '${e}.${t}'`)}).filter(e=>void 0!==e);i.length>0&&(l.subMenu=i,null==(n=r.subMenu)||n.push(l))}else null==(o=r.subMenu)||o.push(l)}),0!=(null==(n=r.subMenu)?void 0:n.length))return r}};Yp([(0,Np.Optional)("chartService")],ng.prototype,"chartService",2),ng=Yp([(0,Np.Bean)("chartMenuItemMapper")],ng);var sg=class{constructor(e,t,i){this.gos=e,this.chartService=t,this.localeService=i}getMenuItem(){const e=this.localeService.getLocaleTextFunc(),t=(t,i,n,s,r=!1)=>({name:e(t,i),action:()=>this.chartService.createPivotChart({chartType:n}),_key:s,_enterprise:r});return{name:e("pivotChart","Pivot Chart"),_key:"pivotChart",subMenu:[{_key:"pivotColumnChart",name:e("columnChart","Column"),subMenu:[t("groupedColumn","Grouped&lrm;","groupedColumn","pivotGroupedColumn"),t("stackedColumn","Stacked&lrm;","stackedColumn","pivotStackedColumn"),t("normalizedColumn","100% Stacked&lrm;","normalizedColumn","pivotNormalizedColumn")]},{_key:"pivotBarChart",name:e("barChart","Bar"),subMenu:[t("groupedBar","Grouped&lrm;","groupedBar","pivotGroupedBar"),t("stackedBar","Stacked&lrm;","stackedBar","pivotStackedBar"),t("normalizedBar","100% Stacked&lrm;","normalizedBar","pivotNormalizedBar")]},{_key:"pivotPieChart",name:e("pieChart","Pie"),subMenu:[t("pie","Pie&lrm;","pie","pivotPie"),t("donut","Donut&lrm;","donut","pivotDonut")]},t("line","Line&lrm;","line","pivotLineChart"),{_key:"pivotXYChart",name:e("xyChart","X Y (Scatter)"),subMenu:[t("scatter","Scatter&lrm;","scatter","pivotScatter"),t("bubble","Bubble&lrm;","bubble","pivotBubble")]},{_key:"pivotAreaChart",name:e("areaChart","Area"),subMenu:[t("area","Area&lrm;","area","pivotArea"),t("stackedArea","Stacked&lrm;","stackedArea","pivotStackedArea"),t("normalizedArea","100% Stacked&lrm;","normalizedArea","pivotNormalizedArea")]},{_key:"pivotStatisticalChart",_enterprise:!1,name:e("statisticalChart","Statistical"),subMenu:[t("histogramChart","Histogram&lrm;","histogram","pivotHistogram",!1)]},{_key:"pivotHierarchicalChart",_enterprise:!0,name:e("hierarchicalChart","Hierarchical"),subMenu:[t("treemapChart","Treemap&lrm;","treemap","pivotTreemap",!0),t("sunburstChart","Sunburst&lrm;","sunburst","pivotSunburst",!0)]},{_key:"pivotCombinationChart",name:e("combinationChart","Combination"),subMenu:[t("columnLineCombo","Column & Line&lrm;","columnLineCombo","pivotColumnLineCombo"),t("AreaColumnCombo","Area & Column&lrm;","areaColumnCombo","pivotAreaColumnCombo")]}],icon:Np._.createIconNoSpan("chart",this.gos,void 0)}}getConfigLookup(){return{columnGroup:{_key:"pivotColumnChart",column:"pivotGroupedColumn",stackedColumn:"pivotStackedColumn",normalizedColumn:"pivotNormalizedColumn"},barGroup:{_key:"pivotBarChart",bar:"pivotGroupedBar",stackedBar:"pivotStackedBar",normalizedBar:"pivotNormalizedBar"},pieGroup:{_key:"pivotPieChart",pie:"pivotPie",donut:"pivotDonut",doughnut:"pivotDonut"},lineGroup:{_key:"pivotLineChart",line:"pivotLineChart"},scatterGroup:{_key:"pivotXYChart",bubble:"pivotBubble",scatter:"pivotScatter"},areaGroup:{_key:"pivotAreaChart",area:"pivotArea",stackedArea:"pivotStackedArea",normalizedArea:"pivotNormalizedArea"},combinationGroup:{_key:"pivotCombinationChart",columnLineCombo:"pivotColumnLineCombo",areaColumnCombo:"pivotAreaColumnCombo",customCombo:null},hierarchicalGroup:{_key:"pivotHierarchicalChart",treemap:"pivotTreemap",sunburst:"pivotSunburst"},statisticalGroup:{_key:"pivotStatisticalChart",histogram:"pivotHistogram",rangeBar:null,rangeArea:null,boxPlot:null},polarGroup:null,specializedGroup:null}}},rg=class{constructor(e,t,i){this.gos=e,this.chartService=t,this.localeService=i}getMenuItem(){const e=this.localeService.getLocaleTextFunc(),t=(t,i,n,s,r=!1)=>({name:e(t,i),action:()=>this.chartService.createChartFromCurrentRange(n),_key:s,_enterprise:r});return{name:e("chartRange","Chart Range"),_key:"chartRange",subMenu:[{name:e("columnChart","Column"),subMenu:[t("groupedColumn","Grouped&lrm;","groupedColumn","rangeGroupedColumn"),t("stackedColumn","Stacked&lrm;","stackedColumn","rangeStackedColumn"),t("normalizedColumn","100% Stacked&lrm;","normalizedColumn","rangeNormalizedColumn")],_key:"rangeColumnChart"},{name:e("barChart","Bar"),subMenu:[t("groupedBar","Grouped&lrm;","groupedBar","rangeGroupedBar"),t("stackedBar","Stacked&lrm;","stackedBar","rangeStackedBar"),t("normalizedBar","100% Stacked&lrm;","normalizedBar","rangeNormalizedBar")],_key:"rangeBarChart"},{name:e("pieChart","Pie"),subMenu:[t("pie","Pie&lrm;","pie","rangePie"),t("donut","Donut&lrm;","donut","rangeDonut")],_key:"rangePieChart"},t("line","Line&lrm;","line","rangeLineChart"),{name:e("xyChart","X Y (Scatter)"),subMenu:[t("scatter","Scatter&lrm;","scatter","rangeScatter"),t("bubble","Bubble&lrm;","bubble","rangeBubble")],_key:"rangeXYChart"},{name:e("areaChart","Area"),subMenu:[t("area","Area&lrm;","area","rangeArea"),t("stackedArea","Stacked&lrm;","stackedArea","rangeStackedArea"),t("normalizedArea","100% Stacked&lrm;","normalizedArea","rangeNormalizedArea")],_key:"rangeAreaChart"},{name:e("polarChart","Polar"),subMenu:[t("radarLine","Radar Line&lrm;","radarLine","rangeRadarLine"),t("radarArea","Radar Area&lrm;","radarArea","rangeRadarArea"),t("nightingale","Nightingale&lrm;","nightingale","rangeNightingale"),t("radialColumn","Radial Column&lrm;","radialColumn","rangeRadialColumn"),t("radialBar","Radial Bar&lrm;","radialBar","rangeRadialBar")],_key:"rangePolarChart",_enterprise:!0},{name:e("statisticalChart","Statistical"),subMenu:[t("boxPlot","Box Plot&lrm;","boxPlot","rangeBoxPlot",!0),t("histogramChart","Histogram&lrm;","histogram","rangeHistogram",!1),t("rangeBar","Range Bar&lrm;","rangeBar","rangeRangeBar",!0),t("rangeArea","Range Area&lrm;","rangeArea","rangeRangeArea",!0)],_key:"rangeStatisticalChart",_enterprise:!1},{name:e("hierarchicalChart","Hierarchical"),subMenu:[t("treemap","Treemap&lrm;","treemap","rangeTreemap"),t("sunburst","Sunburst&lrm;","sunburst","rangeSunburst")],_key:"rangeHierarchicalChart",_enterprise:!0},{name:e("specializedChart","Specialized"),subMenu:[t("heatmap","Heatmap&lrm;","heatmap","rangeHeatmap"),t("waterfall","Waterfall&lrm;","waterfall","rangeWaterfall")],_key:"rangeSpecializedChart",_enterprise:!0},{name:e("combinationChart","Combination"),subMenu:[t("columnLineCombo","Column & Line&lrm;","columnLineCombo","rangeColumnLineCombo"),t("AreaColumnCombo","Area & Column&lrm;","areaColumnCombo","rangeAreaColumnCombo")],_key:"rangeCombinationChart"}],icon:Np._.createIconNoSpan("chart",this.gos,void 0)}}getConfigLookup(){return{columnGroup:{_key:"rangeColumnChart",column:"rangeGroupedColumn",stackedColumn:"rangeStackedColumn",normalizedColumn:"rangeNormalizedColumn"},barGroup:{_key:"rangeBarChart",bar:"rangeGroupedBar",stackedBar:"rangeStackedBar",normalizedBar:"rangeNormalizedBar"},pieGroup:{_key:"rangePieChart",pie:"rangePie",donut:"rangeDonut",doughnut:"rangeDonut"},lineGroup:{_key:"rangeLineChart",line:"rangeLineChart"},scatterGroup:{_key:"rangeXYChart",bubble:"rangeBubble",scatter:"rangeScatter"},areaGroup:{_key:"rangeAreaChart",area:"rangeArea",stackedArea:"rangeStackedArea",normalizedArea:"rangeNormalizedArea"},polarGroup:{_key:"rangePolarChart",radarLine:"rangeRadarLine",radarArea:"rangeRadarArea",nightingale:"rangeNightingale",radialColumn:"rangeRadialColumn",radialBar:"rangeRadialBar"},statisticalGroup:{_key:"rangeStatisticalChart",boxPlot:"rangeBoxPlot",histogram:"rangeHistogram",rangeBar:"rangeRangeBar",rangeArea:"rangeRangeArea"},hierarchicalGroup:{_key:"rangeHierarchicalChart",treemap:"rangeTreemap",sunburst:"rangeSunburst"},specializedGroup:{_key:"rangeSpecializedChart",heatmap:"rangeHeatmap",waterfall:"rangeWaterfall"},combinationGroup:{_key:"rangeCombinationChart",columnLineCombo:"rangeColumnLineCombo",areaColumnCombo:"rangeAreaColumnCombo",customCombo:null}}}},og=class extends Op.BeanStub{createColumnSelectPanel(e,t,i,n){var s,r;const o=e.createManagedBean(new wh),a=null!=(r=null!=(s=null!=n?n:null==t?void 0:t.getColDef().columnChooserParams)?s:null==t?void 0:t.getColDef().columnsMenuParams)?r:{},{contractColumnSelection:l,suppressColumnExpandAll:c,suppressColumnFilter:h,suppressColumnSelectAll:d,suppressSyncLayoutWithGrid:u,columnLayout:p}=a;return o.init(!!i,this.gos.addGridCommonParams({suppressColumnMove:!1,suppressValues:!1,suppressPivots:!1,suppressRowGroups:!1,suppressPivotMode:!1,contractColumnSelection:!!l,suppressColumnExpandAll:!!c,suppressColumnFilter:!!h,suppressColumnSelectAll:!!d,suppressSyncLayoutWithGrid:!!p||!!u,onStateUpdated:()=>{}}),"columnMenu"),p&&o.setColumnLayout(p),o}showColumnChooser({column:e,chooserParams:t,eventSource:i}){this.hideActiveColumnChooser();const n=this.createColumnSelectPanel(this,e,!0,t),s=this.localeService.getLocaleTextFunc(),r=this.columnModel.getAllDisplayedColumns().indexOf(e),o=e?this.focusService.getFocusedHeader():null;this.activeColumnChooserDialog=this.createBean(new Op.AgDialog({title:s("chooseColumns","Choose Columns"),component:n,width:300,height:300,resizable:!0,movable:!0,centered:!0,closable:!0,afterGuiAttached:()=>{var t;null==(t=this.focusService.findNextFocusableElement(n.getGui()))||t.focus(),this.dispatchVisibleChangedEvent(!0,e)},closedCallback:t=>{const n=this.activeColumnChooser.getGui();this.destroyBean(this.activeColumnChooser),this.activeColumnChooser=void 0,this.activeColumnChooserDialog=void 0,this.dispatchVisibleChangedEvent(!1,e),e&&this.menuUtils.restoreFocusOnClose({column:e,headerPosition:o,columnIndex:r,eventSource:i},n,t,!0)}})),this.activeColumnChooser=n}hideActiveColumnChooser(){this.activeColumnChooserDialog&&this.destroyBean(this.activeColumnChooserDialog)}dispatchVisibleChangedEvent(e,t){const i={type:Op.Events.EVENT_COLUMN_MENU_VISIBLE_CHANGED,visible:e,switchingTab:!1,key:"columnChooser",column:null!=t?t:null};this.eventService.dispatchEvent(i)}};Yp([(0,Op.Autowired)("focusService")],og.prototype,"focusService",2),Yp([(0,Op.Autowired)("menuUtils")],og.prototype,"menuUtils",2),Yp([(0,Op.Autowired)("columnModel")],og.prototype,"columnModel",2),og=Yp([(0,Op.Bean)("columnChooserFactory")],og);var ag=class extends _p.BeanStub{createMenu(e,t,i){const n=e.createManagedBean(new _p.AgMenuList(0,{column:null!=t?t:null,node:null,value:null})),s=this.getMenuItems(t),r=this.menuItemMapper.mapWithStockItems(s,null!=t?t:null,i);return n.addMenuItems(r),n}getMenuItems(e){const t=this.getDefaultMenuOptions(e);let i;const n=null==e?void 0:e.getColDef().mainMenuItems;if(Array.isArray(n))i=n;else if("function"==typeof n)i=n(this.gos.addGridCommonParams({column:e,defaultItems:t}));else{const n=this.gos.getCallback("getMainMenuItems");i=n&&e?n({column:e,defaultItems:t}):t}return _p._.removeRepeatsFromArray(i,ag.MENU_ITEM_SEPARATOR),i}getDefaultMenuOptions(e){const t=[],i=this.menuService.isLegacyMenuEnabled();if(!e)return i||t.push("columnChooser"),t.push("resetColumns"),t;const n=!e.getColDef().lockPinned,s=this.columnModel.getRowGroupColumns().length,r=s>0,o=e.isAllowValue(),a=e.isAllowRowGroup(),l=e.isPrimary(),c=this.columnModel.isPivotMode(),h="clientSide"===this.rowModel.getType(),d=this.gos.get("treeData"),u=l&&r&&o||!l;if(!i&&e.isSortable()){const i=e.getSort();"asc"!==i&&t.push("sortAscending"),"desc"!==i&&t.push("sortDescending"),i&&t.push("sortUnSort"),t.push(ag.MENU_ITEM_SEPARATOR)}return this.menuService.isFilterMenuItemEnabled(e)&&(t.push("columnFilter"),t.push(ag.MENU_ITEM_SEPARATOR)),n&&t.push("pinSubMenu"),u&&t.push("valueAggSubMenu"),(n||u)&&t.push(ag.MENU_ITEM_SEPARATOR),t.push("autoSizeThis"),t.push("autoSizeAll"),t.push(ag.MENU_ITEM_SEPARATOR),e.getColDef().showRowGroup?t.push("rowUnGroup"):a&&e.isPrimary()&&(e.isRowGroupActive()?this.columnModel.isColumnGroupingLocked(e)||t.push("rowUnGroup"):t.push("rowGroup")),t.push(ag.MENU_ITEM_SEPARATOR),i||t.push("columnChooser"),t.push("resetColumns"),h&&(d||s>(c?1:0))&&(t.push("expandAll"),t.push("contractAll")),t}};ag.MENU_ITEM_SEPARATOR="separator",Yp([(0,_p.Autowired)("menuItemMapper")],ag.prototype,"menuItemMapper",2),Yp([(0,_p.Autowired)("columnModel")],ag.prototype,"columnModel",2),Yp([(0,_p.Autowired)("rowModel")],ag.prototype,"rowModel",2),Yp([(0,_p.Autowired)("filterManager")],ag.prototype,"filterManager",2),Yp([(0,_p.Autowired)("menuService")],ag.prototype,"menuService",2),ag=Yp([(0,_p.Bean)("columnMenuFactory")],ag);var lg=class extends Fp.BeanStub{restoreFocusOnClose(e,t,i,n){const{eventSource:s}=e,r=i instanceof KeyboardEvent;if(!n&&!r||!s)return;const o=this.gos.getDocument(),a=this.gos.getActiveDomElement();(t.contains(a)||a===o.body)&&this.focusHeaderCell(e)}closePopupAndRestoreFocusOnSelect(e,t,i){let n;i&&i.keyboardEvent&&(n=i.keyboardEvent),e(n&&{keyboardEvent:n});const s=this.focusService.getFocusedCell(),r=this.gos.getDocument(),o=this.gos.getActiveDomElement();if(!o||o===r.body)if(s){const{rowIndex:e,rowPinned:t,column:i}=s;this.focusService.setFocusedCell({rowIndex:e,column:i,rowPinned:t,forceBrowserFocus:!0,preventScrollOnBrowserFocus:!0})}else this.focusHeaderCell(t)}onContextMenu(e,t,i){if((this.gos.get("allowContextMenuWithControlKey")||!e||!e.ctrlKey&&!e.metaKey)&&(e&&this.blockMiddleClickScrollsIfNeeded(e),!this.gos.get("suppressContextMenu")&&i(null!=e?e:t.touches[0]))){const i=null!=e?e:t;i&&i.cancelable&&i.preventDefault()}}focusHeaderCell(e){const{column:t,columnIndex:i,headerPosition:n,eventSource:s}=e;if(this.columnModel.getAllDisplayedColumns().some(e=>e===t)&&s&&Fp._.isVisible(s)){const e=this.focusService.findTabbableParent(s);e&&(t&&this.headerNavigationService.scrollToColumn(t),e.focus())}else if(n&&-1!==i){const e=this.columnModel.getAllDisplayedColumns(),t=e[i]||Fp._.last(e);t&&this.focusService.focusHeaderPosition({headerPosition:{headerRowIndex:n.headerRowIndex,column:t}})}}blockMiddleClickScrollsIfNeeded(e){this.gos.get("suppressMiddleClickScrolls")&&2===e.which&&e.preventDefault()}};Yp([(0,Fp.Autowired)("focusService")],lg.prototype,"focusService",2),Yp([(0,Fp.Autowired)("headerNavigationService")],lg.prototype,"headerNavigationService",2),Yp([(0,Fp.Autowired)("columnModel")],lg.prototype,"columnModel",2),lg=Yp([(0,Fp.Bean)("menuUtils")],lg);var cg={version:"31.3.4",moduleName:Rp.ModuleNames.MenuModule,beans:[qp,eg,ig,ng,og,ag,lg],dependantModules:[D]},hg=i(98092),dg=i(98092),ug=i(98092),pg=Object.defineProperty,gg=Object.defineProperties,fg=Object.getOwnPropertyDescriptor,mg=Object.getOwnPropertyDescriptors,vg=Object.getOwnPropertySymbols,yg=Object.prototype.hasOwnProperty,Cg=Object.prototype.propertyIsEnumerable,bg=(e,t,i)=>t in e?pg(e,t,{enumerable:!0,configurable:!0,writable:!0,value:i}):e[t]=i,Sg=(e,t)=>{for(var i in t||(t={}))yg.call(t,i)&&bg(e,i,t[i]);if(vg)for(var i of vg(t))Cg.call(t,i)&&bg(e,i,t[i]);return e},wg=(e,t)=>gg(e,mg(t)),xg=(e,t,i,n)=>{for(var s,r=n>1?void 0:n?fg(t,i):t,o=e.length-1;o>=0;o--)(s=e[o])&&(r=(n?s(t,i,r):s(r))||r);return n&&r&&pg(t,i,r),r},Eg=class e extends dg.TabGuardComp{constructor(){super('<div class="ag-multi-filter ag-menu-list-compact"></div>'),this.filterDefs=[],this.filters=[],this.guiDestroyFuncs=[],this.filterGuis=[],this.activeFilterIndices=[],this.lastActivatedMenuItem=null,this.afterFiltersReadyFuncs=[]}postConstruct(){this.initialiseTabGuard({onFocusIn:e=>this.onFocusIn(e)})}static getFilterDefs(e){const{filters:t}=e;return t&&t.length>0?t:[{filter:"agTextColumnFilter"},{filter:"agSetColumnFilter"}]}init(t){this.params=t,this.filterDefs=e.getFilterDefs(t);const{column:i,filterChangedCallback:n}=t;this.column=i,this.filterChangedCallback=n;const s=[];return this.filterDefs.forEach((e,t)=>{const i=this.createFilter(e,t);null!=i&&s.push(i)}),new dg.AgPromise(e=>{dg.AgPromise.all(s).then(t=>{this.filters=t,this.refreshGui("columnMenu").then(()=>{e()})})}).then(()=>{this.afterFiltersReadyFuncs.forEach(e=>e()),this.afterFiltersReadyFuncs.length=0})}refreshGui(e){return e===this.lastOpenedInContainer?dg.AgPromise.resolve():(this.removeAllChildrenExceptTabGuards(),this.destroyChildren(),dg.AgPromise.all(this.filters.map((t,i)=>{const n=this.filterDefs[i],s=this.getFilterTitle(t,n);let r;if("subMenu"===n.display&&"toolPanel"!==e)r=this.insertFilterMenu(t,s).then(e=>e.getGui());else if("subMenu"===n.display||"accordion"===n.display){const e=this.insertFilterGroup(t,s);r=dg.AgPromise.resolve(e.getGui())}else r=dg.AgPromise.resolve(t.getGui());return r})).then(t=>{t.forEach((e,t)=>{t>0&&this.appendChild(dg._.loadTemplate('<div class="ag-filter-separator"></div>')),this.appendChild(e)}),this.filterGuis=t,this.lastOpenedInContainer=e}))}getFilterTitle(e,t){return null!=t.title?t.title:e instanceof dg.ProvidedFilter?e.getFilterTitle():"Filter"}destroyChildren(){this.guiDestroyFuncs.forEach(e=>e()),this.guiDestroyFuncs.length=0,this.filterGuis.length=0}insertFilterMenu(e,t){const i=this.createBean(new dg.AgMenuItemComponent);return i.init({menuItemDef:{name:t,subMenu:[],cssClasses:["ag-multi-filter-menu-item"],menuItem:dg.AgMenuItemRenderer,menuItemParams:{cssClassPrefix:"ag-compact-menu-option",isCompact:!0}},level:0,isAnotherSubMenuOpen:()=>!1,childComponent:e,contextParams:{column:null,node:null,value:null}}).then(()=>{i.setParentComponent(this),this.guiDestroyFuncs.push(()=>this.destroyBean(i)),this.addManagedListener(i,dg.AgMenuItemComponent.EVENT_MENU_ITEM_ACTIVATED,e=>{this.lastActivatedMenuItem&&this.lastActivatedMenuItem!==e.menuItem&&this.lastActivatedMenuItem.deactivate(),this.lastActivatedMenuItem=e.menuItem});const e=i.getGui();return i.addManagedListener(e,"keydown",e=>{const{key:t}=e;switch(t){case dg.KeyCode.UP:case dg.KeyCode.RIGHT:case dg.KeyCode.DOWN:case dg.KeyCode.LEFT:e.preventDefault(),t===dg.KeyCode.RIGHT&&i.openSubMenu(!0)}}),i.addManagedListener(e,"focusin",()=>i.activate()),i.addManagedListener(e,"focusout",()=>{i.isSubMenuOpen()||i.isSubMenuOpening()||i.deactivate()}),i})}insertFilterGroup(e,t){const i=this.createBean(new dg.AgGroupComponent({title:t,cssIdentifier:"multi-filter"}));return this.guiDestroyFuncs.push(()=>this.destroyBean(i)),i.addItem(e.getGui()),i.toggleGroupExpand(!1),e.afterGuiAttached&&i.addManagedListener(i,dg.AgGroupComponent.EVENT_EXPANDED,()=>e.afterGuiAttached({container:this.lastOpenedInContainer,suppressFocus:!0,hidePopup:this.hidePopup})),i}isFilterActive(){return this.filters.some(e=>e.isFilterActive())}getLastActiveFilterIndex(){return this.activeFilterIndices.length>0?this.activeFilterIndices[this.activeFilterIndices.length-1]:null}doesFilterPass(e,t){let i=!0;return this.filters.forEach(n=>{i&&n!==t&&n.isFilterActive()&&(i=n.doesFilterPass(e))}),i}getFilterType(){return"multi"}getModelFromUi(){return{filterType:this.getFilterType(),filterModels:this.filters.map(e=>{const t=e;return"function"==typeof t.getModelFromUi?t.getModelFromUi():null})}}getModel(){return this.isFilterActive()?{filterType:this.getFilterType(),filterModels:this.filters.map(e=>e.isFilterActive()?e.getModel():null)}:null}setModel(e){const t=(e,t)=>new dg.AgPromise(i=>{const n=e.setModel(t);n?n.then(()=>i()):i()});let i=[];return null==e?i=this.filters.map((e,i)=>t(e,null).then(()=>{this.updateActiveList(i)})):this.filters.forEach((n,s)=>{const r=e.filterModels.length>s?e.filterModels[s]:null,o=t(n,r).then(()=>{this.updateActiveList(s)});i.push(o)}),dg.AgPromise.all(i).then(()=>{})}applyModel(e="api"){let t=!1;return this.filters.forEach(i=>{i instanceof dg.ProvidedFilter&&(t=i.applyModel(e)||t)}),t}getChildFilterInstance(e){return this.filters[e]}afterGuiAttached(e){let t;e?(this.hidePopup=e.hidePopup,t=this.refreshGui(e.container)):(this.hidePopup=void 0,t=dg.AgPromise.resolve()),t.then(()=>{const{filterDefs:t}=this;let i=!1;t&&dg._.forEachReverse(t,(t,n)=>{var s;const r=0===n,o=!r||"inline"!==t.display,a=wg(Sg({},null!=e?e:{}),{suppressFocus:o}),l=null==(s=this.filters)?void 0:s[n];if(l&&(this.executeFunctionIfExistsOnFilter(l,"afterGuiAttached",a),r&&(i=!0)),r&&o){const e=this.filterGuis[n];e&&(e.focus(),i=!0)}});const n=this.gos.getDocument(),s=this.gos.getActiveDomElement();i||s&&s!==n.body&&!this.getGui().contains(s)||this.forceFocusOutOfContainer(!0)})}afterGuiDetached(){this.executeFunctionIfExists("afterGuiDetached")}onAnyFilterChanged(){this.executeFunctionIfExists("onAnyFilterChanged")}onNewRowsLoaded(){this.executeFunctionIfExists("onNewRowsLoaded")}destroy(){this.filters.forEach(e=>this.destroyBean(e)),this.filters.length=0,this.destroyChildren(),this.hidePopup=void 0,super.destroy()}executeFunctionIfExists(e,...t){dg._.forEachReverse(this.filters,i=>{this.executeFunctionIfExistsOnFilter(i,e,t)})}executeFunctionIfExistsOnFilter(e,t,...i){const n=e[t];"function"==typeof n&&n.apply(e,i)}createFilter(e,t){const{filterModifiedCallback:i,doesRowPassOtherFilter:n}=this.params;let s;const r=wg(Sg({},this.filterManager.createFilterParams(this.column,this.column.getColDef())),{filterModifiedCallback:i,filterChangedCallback:e=>{this.executeWhenAllFiltersReady(()=>this.filterChanged(t,e))},doesRowPassOtherFilter:e=>n(e)&&this.doesFilterPass({node:e,data:e.data},s)}),o=this.userComponentFactory.getFilterDetails(e,r,"agTextColumnFilter");if(!o)return null;const a=o.newAgStackInstance();return a&&a.then(e=>s=e),a}executeWhenAllFiltersReady(e){this.filters&&this.filters.length>0?e():this.afterFiltersReadyFuncs.push(e)}updateActiveList(e){const t=this.filters[e];dg._.removeFromArray(this.activeFilterIndices,e),t.isFilterActive()&&this.activeFilterIndices.push(e)}filterChanged(e,t){this.updateActiveList(e),this.filterChangedCallback(t);const i=this.filters[e];this.filters.forEach(e=>{e!==i&&"function"==typeof e.onAnyFilterChanged&&e.onAnyFilterChanged()})}onFocusIn(e){null==this.lastActivatedMenuItem||this.lastActivatedMenuItem.getGui().contains(e.target)||(this.lastActivatedMenuItem.deactivate(),this.lastActivatedMenuItem=null)}getModelAsString(e){var t,i,n,s;if(!this.filters||!(null==(t=null==e?void 0:e.filterModels)?void 0:t.length))return"";const r=null!=(i=this.getLastActiveFilterIndex())?i:0,o=this.filters[r];return null!=(s=null==(n=o.getModelAsString)?void 0:n.call(o,e.filterModels[r]))?s:""}};xg([(0,dg.Autowired)("filterManager")],Eg.prototype,"filterManager",2),xg([(0,dg.Autowired)("userComponentFactory")],Eg.prototype,"userComponentFactory",2),xg([dg.PostConstruct],Eg.prototype,"postConstruct",1);var Mg=Eg,Ag=class extends ug.Component{constructor(){super('<div class="ag-multi-floating-filter ag-floating-filter-input"></div>'),this.floatingFilters=[],this.compDetailsList=[]}init(e){this.params=e;const{compDetailsList:t}=this.getCompDetailsList(e);return this.setParams(t)}setParams(e){const t=[];return e.forEach(e=>{const i=null==e?void 0:e.newAgStackInstance();null!=i&&(this.compDetailsList.push(e),t.push(i))}),ug.AgPromise.all(t).then(e=>{e.forEach((e,t)=>{this.floatingFilters.push(e);const i=e.getGui();this.appendChild(i),t>0&&ug._.setDisplayed(i,!1)})})}onParamsUpdated(e){this.refresh(e)}refresh(e){this.params=e;const{compDetailsList:t,floatingFilterParamsList:i}=this.getCompDetailsList(e);t.length===this.compDetailsList.length&&t.every((e,t)=>!this.filterManager.areFilterCompsDifferent(this.compDetailsList[t],e))?i.forEach((e,t)=>{var i;const n=this.floatingFilters[t];let s=!1;n.refresh&&null!==n.refresh(e)&&(s=!0),s||null==(i=n.onParamsUpdated)||i.call(n,e)}):(ug._.clearElement(this.getGui()),this.destroyBeans(this.floatingFilters),this.floatingFilters=[],this.compDetailsList=[],this.setParams(t))}getCompDetailsList(e){const t=[],i=[],n=e.filterParams;return Mg.getFilterDefs(n).forEach((n,s)=>{const r=wg(Sg({},e),{parentFilterInstance:e=>{this.parentMultiFilterInstance(t=>{const i=t.getChildFilterInstance(s);null!=i&&e(i)})}});ug._.mergeDeep(r.filterParams,n.filterParams);const o=this.getCompDetails(n,r);o&&(t.push(o),i.push(r))}),{compDetailsList:t,floatingFilterParamsList:i}}onParentModelChanged(e,t){t&&t.afterFloatingFilter||this.parentMultiFilterInstance(i=>{if(null==e)this.floatingFilters.forEach((e,i)=>{e.onParentModelChanged(null,t),ug._.setDisplayed(e.getGui(),0===i)});else{const n=i.getLastActiveFilterIndex();this.floatingFilters.forEach((i,s)=>{const r=e.filterModels.length>s?e.filterModels[s]:null;i.onParentModelChanged(r,t);const o=null==n?0===s:s===n;ug._.setDisplayed(i.getGui(),o)})}})}destroy(){this.destroyBeans(this.floatingFilters),this.floatingFilters.length=0,super.destroy()}getCompDetails(e,t){var i;let n=null!=(i=this.userComponentFactory.getDefaultFloatingFilterType(e,()=>this.filterManager.getDefaultFloatingFilter(this.params.column)))?i:"agReadOnlyFloatingFilter";return this.userComponentFactory.getFloatingFilterCompDetails(e,t,n)}parentMultiFilterInstance(e){this.params.parentFilterInstance(t=>{if(!(t instanceof Mg))throw new Error("AG Grid - MultiFloatingFilterComp expects MultiFilter as its parent");e(t)})}};xg([(0,ug.Autowired)("userComponentFactory")],Ag.prototype,"userComponentFactory",2),xg([(0,ug.Autowired)("filterManager")],Ag.prototype,"filterManager",2);var Tg={version:"31.3.4",moduleName:hg.ModuleNames.MultiFilterModule,beans:[],userComponents:[{componentName:"agMultiColumnFilter",componentClass:Mg},{componentName:"agMultiColumnFloatingFilter",componentClass:Ag}],dependantModules:[D]},Dg=i(98092),Ig=i(98092),Rg=class extends Ig.PopupComponent{constructor(){super('<div class="ag-cell-edit-wrapper"></div>')}init(e){this.params=e;const{cellStartedEdit:t,cellHeight:i,values:n}=e;Ig._.missing(n)&&console.warn("AG Grid: agRichSelectCellEditor requires cellEditorParams.values to be set");const{params:s,valuesPromise:r}=this.buildRichSelectParams();this.richSelect=this.createManagedBean(new Ig.AgRichSelect(s)),this.richSelect.addCssClass("ag-cell-editor"),this.appendChild(this.richSelect),r&&r.then(e=>{this.richSelect.setValueList({valueList:e,refresh:!0});const t=this.getSearchStringCallback(e);t&&this.richSelect.setSearchStringCreator(t)}),this.addManagedListener(this.richSelect,Ig.Events.EVENT_FIELD_PICKER_VALUE_SELECTED,this.onEditorPickerValueSelected.bind(this)),this.addManagedListener(this.richSelect.getGui(),"focusout",this.onEditorFocusOut.bind(this)),this.focusAfterAttached=t,Ig._.exists(i)&&this.richSelect.setRowHeight(i)}onEditorPickerValueSelected(e){this.params.stopEditing(!e.fromEnterKey)}onEditorFocusOut(e){this.richSelect.getGui().contains(e.relatedTarget)||this.params.stopEditing(!0)}buildRichSelectParams(){const{cellRenderer:e,value:t,values:i,formatValue:n,searchDebounceDelay:s,valueListGap:r,valueListMaxHeight:o,valueListMaxWidth:a,allowTyping:l,filterList:c,searchType:h,highlightMatch:d,valuePlaceholder:u,eventKey:p}=this.params,g={value:t,cellRenderer:e,searchDebounceDelay:s,valueFormatter:n,pickerAriaLabelKey:"ariaLabelRichSelectField",pickerAriaLabelValue:"Rich Select Field",pickerType:"virtual-list",pickerGap:r,allowTyping:l,filterList:c,searchType:h,highlightMatch:d,maxPickerHeight:o,maxPickerWidth:a,placeholder:u,initialInputValue:1===(null==p?void 0:p.length)?p:void 0};let f,m;return f="function"==typeof i?i(this.params):null!=i?i:[],Array.isArray(f)?(g.valueList=f,g.searchStringCreator=this.getSearchStringCallback(f)):m=f,{params:g,valuesPromise:m}}getSearchStringCallback(e){const{colDef:t}=this.params;if("object"==typeof e[0]&&t.keyCreator)return e=>e.map(e=>{const i=this.gos.addGridCommonParams({value:e,colDef:this.params.colDef,column:this.params.column,node:this.params.node,data:this.params.data});return t.keyCreator(i)})}afterGuiAttached(){const{focusAfterAttached:e,params:t}=this;setTimeout(()=>{if(!this.isAlive())return;if(e){const e=this.richSelect.getFocusableElement();e.focus();const{allowTyping:t,eventKey:i}=this.params;!t||i&&1===i.length||e.select()}this.richSelect.showPicker();const{eventKey:i}=t;i&&1===(null==i?void 0:i.length)&&this.richSelect.searchTextFromString(i)})}getValue(){return this.richSelect.getValue()}isPopup(){return!1}},Lg={version:"31.3.4",moduleName:Dg.ModuleNames.RichSelectModule,beans:[],userComponents:[{componentName:"agRichSelect",componentClass:Rg},{componentName:"agRichSelectCellEditor",componentClass:Rg}],dependantModules:[D]},kg=i(98092),Pg=i(98092),Ng=i(98092),Og=i(98092),_g=i(98092),Fg=i(98092),Gg=i(98092),Vg=i(98092),Bg=i(98092),Hg=i(98092),zg=i(98092),Ug=i(98092),Wg=i(98092),jg=i(98092),Kg=i(98092),$g=i(98092),Yg=i(98092),qg=i(98092),Xg=i(98092),Zg=Object.defineProperty,Qg=Object.defineProperties,Jg=Object.getOwnPropertyDescriptor,ef=Object.getOwnPropertyDescriptors,tf=Object.getOwnPropertySymbols,nf=Object.prototype.hasOwnProperty,sf=Object.prototype.propertyIsEnumerable,rf=(e,t,i)=>t in e?Zg(e,t,{enumerable:!0,configurable:!0,writable:!0,value:i}):e[t]=i,of=(e,t)=>{for(var i in t||(t={}))nf.call(t,i)&&rf(e,i,t[i]);if(tf)for(var i of tf(t))sf.call(t,i)&&rf(e,i,t[i]);return e},af=(e,t)=>{var i={};for(var n in e)nf.call(e,n)&&t.indexOf(n)<0&&(i[n]=e[n]);if(null!=e&&tf)for(var n of tf(e))t.indexOf(n)<0&&sf.call(e,n)&&(i[n]=e[n]);return i},lf=(e,t,i,n)=>{for(var s,r=n>1?void 0:n?Jg(t,i):t,o=e.length-1;o>=0;o--)(s=e[o])&&(r=(n?s(t,i,r):s(r))||r);return n&&r&&Zg(t,i,r),r},cf=class extends Ng.RowNodeBlock{constructor(e,t,i){super(0),this.nodeIdSequence=new Ng.NumberSequence,this.info={},this.ssrmParams=e,this.parentRowNode=i,this.level=i.level+1,this.groupLevel=e.rowGroupCols?this.level<e.rowGroupCols.length:void 0,this.leafGroup=!!e.rowGroupCols&&this.level===e.rowGroupCols.length-1}postConstruct(){if(this.usingTreeData=this.gos.get("treeData"),this.nodeIdPrefix=this.blockUtils.createNodeIdPrefix(this.parentRowNode),!this.usingTreeData&&this.groupLevel){const e=this.ssrmParams.rowGroupCols[this.level];this.groupField=e.field,this.rowGroupColumn=this.columnModel.getRowGroupColumns()[this.level]}let e=1;const t=-1===this.parentRowNode.level,i=this.storeUtils.getServerSideInitialRowCount();t&&null!=i&&(e=i),this.initialiseRowNodes(e),this.rowNodeBlockLoader.addBlock(this),this.addDestroyFunc(()=>this.rowNodeBlockLoader.removeBlock(this)),this.postSortFunc=this.gos.getCallback("postSortRows"),null!=i&&this.eventService.dispatchEventOnce({type:Ng.Events.EVENT_ROW_COUNT_READY})}destroyRowNodes(){this.blockUtils.destroyRowNodes(this.allRowNodes),this.allRowNodes=[],this.nodesAfterSort=[],this.nodesAfterFilter=[],this.allNodesMap={}}initialiseRowNodes(e,t=!1){this.destroyRowNodes();for(let i=0;i<e;i++){const e=this.blockUtils.createRowNode({field:this.groupField,group:this.groupLevel,leafGroup:this.leafGroup,level:this.level,parent:this.parentRowNode,rowGroupColumn:this.rowGroupColumn});t&&(e.failedLoad=!0),this.allRowNodes.push(e),this.nodesAfterFilter.push(e),this.nodesAfterSort.push(e)}}getBlockStateJson(){return{id:this.nodeIdPrefix?this.nodeIdPrefix:"",state:this.getState()}}loadFromDatasource(){this.storeUtils.loadFromDatasource({startRow:void 0,endRow:void 0,parentBlock:this,parentNode:this.parentRowNode,storeParams:this.ssrmParams,success:this.success.bind(this,this.getVersion()),fail:this.pageLoadFailed.bind(this,this.getVersion())})}getStartRow(){return 0}getEndRow(){return this.nodesAfterSort.length}createDataNode(e,t){const i=this.blockUtils.createRowNode({field:this.groupField,group:this.groupLevel,leafGroup:this.leafGroup,level:this.level,parent:this.parentRowNode,rowGroupColumn:this.rowGroupColumn});null!=t?Ng._.insertIntoArray(this.allRowNodes,i,t):this.allRowNodes.push(i);const n=this.prefixId(this.nodeIdSequence.next());return this.blockUtils.setDataIntoRowNode(i,e,n,void 0),this.nodeManager.addRowNode(i),this.blockUtils.checkOpenByDefault(i),this.allNodesMap[i.id]=i,i}prefixId(e){return this.nodeIdPrefix?this.nodeIdPrefix+"-"+e:e.toString()}processServerFail(){this.initialiseRowNodes(1,!0),this.fireStoreUpdatedEvent(),this.flushAsyncTransactions()}processServerResult(e){if(!this.isAlive())return;const t=e.groupLevelInfo;t&&Object.assign(this.info,t),e.pivotResultFields&&this.serverSideRowModel.generateSecondaryColumns(e.pivotResultFields);const i=this.allRowNodes.length>0?this.allNodesMap:void 0;this.allRowNodes=[],this.nodesAfterSort=[],this.nodesAfterFilter=[],this.allNodesMap={},e.rowData||Ng._.warnOnce('"params.data" is missing from Server-Side Row Model success() callback. Please use the "data" attribute. If no data is returned, set an empty list.'),this.createOrRecycleNodes(i,e.rowData),i&&this.blockUtils.destroyRowNodes(Ng._.getAllValuesInObject(i)),0===this.level&&this.eventService.dispatchEventOnce({type:Ng.Events.EVENT_ROW_COUNT_READY}),this.filterAndSortNodes(),this.fireStoreUpdatedEvent(),this.flushAsyncTransactions()}createOrRecycleNodes(e,t){if(!t)return;const i=t=>{if(!e)return;const i=this.gos.getCallback("getRowId");if(!i)return;const n=this.parentRowNode.getGroupKeys(),s=this.level,r=i({data:t,parentKeys:n.length>0?n:void 0,level:s}),o=e[r];return o?(delete e[r],o):void 0},n=(e,t)=>{this.allNodesMap[e.id]=e,this.blockUtils.updateDataIntoRowNode(e,t),this.allRowNodes.push(e)};t.forEach(e=>{const t=i(e);t?n(t,e):this.createDataNode(e)})}flushAsyncTransactions(){window.setTimeout(()=>this.transactionManager.flushAsyncTransactions(),0)}filterAndSortNodes(){this.filterRowNodes(),this.sortRowNodes()}sortRowNodes(){const e=this.storeUtils.isServerSideSortAllLevels()||this.storeUtils.isServerSideSortOnServer(),t=this.sortController.getSortOptions(),i=!t||0==t.length;if(e||i)this.nodesAfterSort=this.nodesAfterFilter;else if(this.nodesAfterSort=this.rowNodeSorter.doFullSort(this.nodesAfterFilter,t),this.postSortFunc){const e={nodes:this.nodesAfterSort};this.postSortFunc(e)}}filterRowNodes(){const e=!this.storeUtils.isServerSideOnlyRefreshFilteredGroups()||this.storeUtils.isServerSideFilterOnServer(),t=this.groupLevel;this.nodesAfterFilter=e||t?this.allRowNodes:this.allRowNodes.filter(e=>this.filterManager.doesRowPassFilter({rowNode:e}))}clearDisplayIndexes(){this.displayIndexStart=void 0,this.displayIndexEnd=void 0,this.allRowNodes.forEach(e=>this.blockUtils.clearDisplayIndex(e))}getDisplayIndexEnd(){return this.displayIndexEnd}isDisplayIndexInStore(e){return 0!==this.getRowCount()&&e>=this.displayIndexStart&&e<this.displayIndexEnd}setDisplayIndexes(e,t){this.displayIndexStart=e.peek(),this.topPx=t.value;const i={};this.nodesAfterSort.forEach(n=>{this.blockUtils.setDisplayIndex(n,e,t),i[n.id]=!0}),this.allRowNodes.forEach(e=>{i[e.id]||this.blockUtils.clearDisplayIndex(e)}),this.displayIndexEnd=e.peek(),this.heightPx=t.value-this.topPx}forEachStoreDeep(e,t=new Ng.NumberSequence){e(this,t.next()),this.allRowNodes.forEach(i=>{const n=i.childStore;n&&n.forEachStoreDeep(e,t)})}forEachNodeDeep(e,t=new Ng.NumberSequence){this.allRowNodes.forEach(i=>{e(i,t.next());const n=i.childStore;n&&n.forEachNodeDeep(e,t)})}forEachNodeDeepAfterFilterAndSort(e,t=new Ng.NumberSequence,i=!1){this.nodesAfterSort.forEach(n=>{e(n,t.next());const s=n.childStore;s&&s.forEachNodeDeepAfterFilterAndSort(e,t,i)}),i&&this.parentRowNode.sibling&&e(this.parentRowNode.sibling,t.next())}getRowUsingDisplayIndex(e){if(this.isDisplayIndexInStore(e))return this.blockUtils.binarySearchForDisplayIndex(e,this.nodesAfterSort)}getRowBounds(e){for(let t=0;t<this.nodesAfterSort.length;t++){const i=this.nodesAfterSort[t],n=this.blockUtils.extractRowBounds(i,e);if(n)return n}return null}isPixelInRange(e){return e>=this.topPx&&e<this.topPx+this.heightPx}getRowIndexAtPixel(e){if(e<=this.topPx)return this.nodesAfterSort[0].rowIndex;if(e>=this.topPx+this.heightPx){const t=this.nodesAfterSort[this.nodesAfterSort.length-1],i=t.rowTop+t.rowHeight;if(e>=i&&t.expanded){if(t.childStore&&t.childStore.getRowCount()>0)return t.childStore.getRowIndexAtPixel(e);if(t.detailNode)return t.detailNode.rowIndex}return t.rowIndex}let t=null;return this.nodesAfterSort.forEach(i=>{const n=this.blockUtils.getIndexAtPixel(i,e);null!=n&&(t=n)}),null==t?this.displayIndexEnd-1:t}getChildStore(e){return this.storeUtils.getChildStore(e,this,e=>this.allRowNodes.find(t=>t.key==e))}forEachChildStoreShallow(e){this.allRowNodes.forEach(t=>{const i=t.childStore;i&&e(i)})}refreshAfterFilter(e){const t=this.storeUtils.isServerSideFilterOnServer(),i=this.storeUtils.isServerRefreshNeeded(this.parentRowNode,this.ssrmParams.rowGroupCols,e);if(!this.storeUtils.isServerSideOnlyRefreshFilteredGroups()||t&&i)return this.refreshStore(!0),void this.sortRowNodes();this.filterRowNodes(),this.sortRowNodes(),this.forEachChildStoreShallow(t=>t.refreshAfterFilter(e))}refreshAfterSort(e){const t=this.storeUtils.isServerSideSortOnServer(),i=this.storeUtils.isServerRefreshNeeded(this.parentRowNode,this.ssrmParams.rowGroupCols,e);if(this.storeUtils.isServerSideSortAllLevels()||t&&i)return this.refreshStore(!0),void this.filterRowNodes();this.filterRowNodes(),this.sortRowNodes(),this.forEachChildStoreShallow(t=>t.refreshAfterSort(e))}applyTransaction(e){switch(this.getState()){case Ng.RowNodeBlock.STATE_FAILED:return{status:Ng.ServerSideTransactionResultStatus.StoreLoadingFailed};case Ng.RowNodeBlock.STATE_LOADING:return{status:Ng.ServerSideTransactionResultStatus.StoreLoading};case Ng.RowNodeBlock.STATE_WAITING_TO_LOAD:return{status:Ng.ServerSideTransactionResultStatus.StoreWaitingToLoad}}const t=this.gos.getCallback("isApplyServerSideTransaction");if(t&&!t({transaction:e,parentNode:this.parentRowNode,groupLevelInfo:this.info}))return{status:Ng.ServerSideTransactionResultStatus.Cancelled};const i={status:Ng.ServerSideTransactionResultStatus.Applied,remove:[],update:[],add:[]},n=[];return this.executeAdd(e,i),this.executeRemove(e,i,n),this.executeUpdate(e,i,n),this.filterAndSortNodes(),this.updateSelection(n),i}updateSelection(e){if(e.length>0){this.selectionService.setNodesSelected({newValue:!1,nodes:e,suppressFinishActions:!0,clearSelection:!1,source:"rowDataChanged"});const t={type:Ng.Events.EVENT_SELECTION_CHANGED,source:"rowDataChanged"};this.eventService.dispatchEvent(t)}}executeAdd(e,t){const{add:i,addIndex:n}=e;Ng._.missingOrEmpty(i)||("number"==typeof n&&n>=0?i.reverse().forEach(e=>{const i=this.createDataNode(e,n);t.add.push(i)}):i.forEach(e=>{const i=this.createDataNode(e);t.add.push(i)}))}executeRemove(e,t,i){const{remove:n}=e;if(null==n)return;const s={};n.forEach(e=>{const n=this.lookupRowNode(e);n&&(n.isSelected()&&i.push(n),n.clearRowTopAndRowIndex(),s[n.id]=!0,delete this.allNodesMap[n.id],t.remove.push(n),this.nodeManager.removeNode(n))}),this.allRowNodes=this.allRowNodes.filter(e=>!s[e.id])}executeUpdate(e,t,i){const{update:n}=e;null!=n&&n.forEach(e=>{const n=this.lookupRowNode(e);n&&(this.blockUtils.updateDataIntoRowNode(n,e),!n.selectable&&n.isSelected()&&i.push(n),t.update.push(n))})}lookupRowNode(e){const t=this.gos.getCallback("getRowId");let i;if(null!=t){const n=this.level,s=this.parentRowNode.getGroupKeys(),r=t({data:e,parentKeys:s.length>0?s:void 0,level:n});if(i=this.allNodesMap[r],!i)return console.error(`AG Grid: could not find row id=${r}, data item was not found for this id`),null}else if(i=this.allRowNodes.find(t=>t.data===e),!i)return console.error("AG Grid: could not find data item as object was not found",e),null;return i}addStoreStates(e){e.push({suppressInfiniteScroll:!0,route:this.parentRowNode.getGroupKeys(),rowCount:this.allRowNodes.length,info:this.info}),this.forEachChildStoreShallow(t=>t.addStoreStates(e))}refreshStore(e){if(e){const e=this.nodesAfterSort?this.nodesAfterSort.length:1;this.initialiseRowNodes(e)}this.scheduleLoad(),this.fireStoreUpdatedEvent()}retryLoads(){this.getState()===Ng.RowNodeBlock.STATE_FAILED&&(this.initialiseRowNodes(1),this.scheduleLoad()),this.forEachChildStoreShallow(e=>e.retryLoads())}scheduleLoad(){this.setStateWaitingToLoad(),this.rowNodeBlockLoader.checkBlockToLoad()}fireStoreUpdatedEvent(){const e={type:Ng.Events.EVENT_STORE_UPDATED};this.eventService.dispatchEvent(e)}getRowCount(){return this.nodesAfterSort.length}getTopLevelRowDisplayedIndex(e){return this.nodesAfterSort[e].rowIndex}isLastRowIndexKnown(){return this.getState()==Ng.RowNodeBlock.STATE_LOADED}getRowNodesInRange(e,t){const i=[];let n=!1;return Ng._.missing(e)&&(n=!0),this.nodesAfterSort.forEach(s=>{const r=s===e||s===t;(n||r)&&i.push(s),r&&(n=!n)}),n?[]:i}getStoreBounds(){return{topPx:this.topPx,heightPx:this.heightPx}}};lf([(0,Ng.Autowired)("ssrmStoreUtils")],cf.prototype,"storeUtils",2),lf([(0,Ng.Autowired)("ssrmBlockUtils")],cf.prototype,"blockUtils",2),lf([(0,Ng.Autowired)("columnModel")],cf.prototype,"columnModel",2),lf([(0,Ng.Autowired)("rowNodeBlockLoader")],cf.prototype,"rowNodeBlockLoader",2),lf([(0,Ng.Autowired)("rowNodeSorter")],cf.prototype,"rowNodeSorter",2),lf([(0,Ng.Autowired)("sortController")],cf.prototype,"sortController",2),lf([(0,Ng.Autowired)("selectionService")],cf.prototype,"selectionService",2),lf([(0,Ng.Autowired)("ssrmNodeManager")],cf.prototype,"nodeManager",2),lf([(0,Ng.Autowired)("filterManager")],cf.prototype,"filterManager",2),lf([(0,Ng.Autowired)("ssrmTransactionManager")],cf.prototype,"transactionManager",2),lf([(0,Ng.Autowired)("rowModel")],cf.prototype,"serverSideRowModel",2),lf([Ng.PostConstruct],cf.prototype,"postConstruct",1),lf([Ng.PreDestroy],cf.prototype,"destroyRowNodes",1);var hf=class{constructor(...e){if(e.length<1)throw new Error("AG Grid: At least one index must be provided.");this.indexes=e,this.maps=new Map(this.indexes.map(e=>[e,new Map]))}getSize(){return this.maps.get(this.indexes[0]).size}getBy(e,t){const i=this.maps.get(e);if(!i)throw new Error(`AG Grid: ${String(e)} not found`);return i.get(t)}set(e){this.indexes.forEach(t=>{const i=this.maps.get(t);if(!i)throw new Error(`AG Grid: ${String(t)} not found`);i.set(e[t],e)})}delete(e){this.indexes.forEach(t=>{const i=this.maps.get(t);if(!i)throw new Error(`AG Grid: ${String(t)} not found`);i.delete(e[t])})}clear(){this.maps.forEach(e=>e.clear())}getIterator(e){const t=this.maps.get(e);if(!t)throw new Error(`AG Grid: ${String(e)} not found`);return t.values()}forEach(e){const t=this.getIterator(this.indexes[0]);let i;for(;(i=t.next())&&!i.done;)e(i.value)}find(e){const t=this.getIterator(this.indexes[0]);let i;for(;(i=t.next())&&!i.done;)if(e(i.value))return i.value}filter(e){const t=this.getIterator(this.indexes[0]);let i;const n=[];for(;(i=t.next())&&!i.done;)e(i.value)&&n.push(i.value);return n}},df=class extends Fg.BeanStub{constructor(){super(...arguments),this.cacheLoadingNodesMap=new Map,this.isCheckQueued=!1,this.nextBlockToLoad=void 0}init(){this.addManagedListener(this.rowNodeBlockLoader,Fg.RowNodeBlockLoader.BLOCK_LOADED_EVENT,()=>this.queueLoadCheck())}subscribe(e){this.cacheLoadingNodesMap.set(e,new Set)}unsubscribe(e){this.cacheLoadingNodesMap.delete(e)}queueLoadCheck(){this.isCheckQueued||(this.isCheckQueued=!0,window.queueMicrotask(()=>{this.queueLoadAction(),this.isCheckQueued=!1}))}queueLoadAction(){const e=this.getBlockToLoad();if(!e)return;const t=this.nextBlockToLoad&&this.nextBlockToLoad.cache===e.cache&&this.nextBlockToLoad.index===e.index;if(!(t||this.nextBlockToLoad&&t)){this.nextBlockToLoad=e,window.clearTimeout(this.loaderTimeout);const t=Number(this.nextBlockToLoad.index),i=this.nextBlockToLoad.cache,n=e.index+e.cache.getBlockSize();this.loaderTimeout=window.setTimeout(()=>{i.isAlive()&&(this.loaderTimeout=void 0,this.attemptLoad(i,t,n),this.nextBlockToLoad=void 0)},this.gos.get("blockLoadDebounceMillis"))}}attemptLoad(e,t,i){const n=this.rowNodeBlockLoader.getAvailableLoadingCount();null!=n&&0===n||(this.rowNodeBlockLoader.registerLoads(1),this.executeLoad(e,t,i),this.queueLoadCheck())}executeLoad(e,t,i){var n;const s=e.getSsrmParams(),r={startRow:t,endRow:i,rowGroupCols:s.rowGroupCols,valueCols:s.valueCols,pivotCols:s.pivotCols,pivotMode:s.pivotMode,groupKeys:e.store.getParentNode().getGroupKeys(),filterModel:s.filterModel,sortModel:s.sortModel},o=this.cacheLoadingNodesMap.get(e),a=()=>{for(let e=0;e<i-t;e++)o.delete(t+e)},l=this.gos.addGridCommonParams({request:r,success:n=>{this.rowNodeBlockLoader.loadComplete(),e.onLoadSuccess(t,i-t,n),a()},fail:()=>{this.rowNodeBlockLoader.loadComplete(),e.onLoadFailed(t,i-t),a()},parentNode:e.store.getParentNode()});(()=>{for(let e=0;e<i-t;e++)o.add(t+e)})(),null==(n=e.getSsrmParams().datasource)||n.getRows(l)}getBlockToLoad(){var e;const t=this.rowRenderer.getFirstVirtualRenderedRow(),i=this.rowRenderer.getLastVirtualRenderedRow();for(let e=t;e<=i;e++){const t=this.rowModel.getRow(e);if(!t)continue;const i=t.parent&&t.parent.childStore;if(!(i&&i instanceof pf))continue;const n=i.getCache(),s=n.getNodes().getBy("node",t);if(!s)continue;const r=this.cacheLoadingNodesMap.get(n);if(!(null==r?void 0:r.has(s.index))&&(t.__needsRefreshWhenVisible||t.stub&&!t.failedLoad))return{cache:n,index:n.getBlockStartIndex(s.index)}}let n=null,s=null,r=Number.MAX_SAFE_INTEGER;for(const e of this.cacheLoadingNodesMap.keys())e.getNodesToRefresh().forEach(o=>{if(null==o.rowIndex)return s=o,void(n=e);const a=e.getNodes().getBy("node",o);if(!a)return;const l=this.cacheLoadingNodesMap.get(e);if(null==l?void 0:l.has(a.index))return;const c=Math.abs(t-o.rowIndex),h=Math.abs(o.rowIndex-i);c<r&&(s=o,r=c,n=e),h<r&&(s=o,r=h,n=e)});if(!n)return;const o=n,a=null==(e=o.getNodes().getBy("node",s))?void 0:e.index;return null==a?void 0:{cache:o,index:o.getBlockStartIndex(a)}}isRowLoading(e,t){var i,n;return null!=(n=null==(i=this.cacheLoadingNodesMap.get(e))?void 0:i.has(t))&&n}};df.DEFAULT_BLOCK_SIZE=100,lf([(0,Fg.Autowired)("rowNodeBlockLoader")],df.prototype,"rowNodeBlockLoader",2),lf([(0,Fg.Autowired)("rowRenderer")],df.prototype,"rowRenderer",2),lf([(0,Fg.Autowired)("rowModel")],df.prototype,"rowModel",2),lf([Fg.PostConstruct],df.prototype,"init",1),df=lf([(0,Fg.Bean)("lazyBlockLoadingService")],df);var uf=class extends _g.BeanStub{constructor(e,t,i){super(),this.live=!0,this.removedNodeCache=new Map,this.store=e,this.numberOfRows=t,this.isLastRowKnown=!1,this.storeParams=i}init(){this.lazyBlockLoadingService.subscribe(this),this.nodeMap=new hf("index","id","node"),this.nodeDisplayIndexMap=new Map,this.nodesToRefresh=new Set,this.defaultNodeIdPrefix=this.blockUtils.createNodeIdPrefix(this.store.getParentNode()),this.getRowIdFunc=this.gos.getCallback("getRowId"),this.isMasterDetail=this.gos.get("masterDetail")}destroyRowNodes(){this.lazyBlockLoadingService.unsubscribe(this),this.numberOfRows=0,this.nodeMap.forEach(e=>this.blockUtils.destroyRowNode(e.node)),this.nodeMap.clear(),this.nodeDisplayIndexMap.clear(),this.nodesToRefresh.clear(),this.live=!1}getRowByDisplayIndex(e){var t,i,n,s;if(!this.store.isDisplayIndexInStore(e))return;const r=this.nodeDisplayIndexMap.get(e);if(r)return(r.stub||r.__needsRefreshWhenVisible)&&this.lazyBlockLoadingService.queueLoadCheck(),r;if(e===this.store.getDisplayIndexStart())return this.createStubNode(0,e);const o=this.nodeDisplayIndexMap.get(e-1);if(o){if(this.isMasterDetail&&o.master&&o.expanded)return o.detailNode;if(o.expanded&&(null==(t=o.childStore)?void 0:t.isDisplayIndexInStore(e)))return null==(i=o.childStore)?void 0:i.getRowUsingDisplayIndex(e);const n=this.nodeMap.getBy("node",o);return this.createStubNode(n.index+1,e)}const a=this.getSurroundingNodesByDisplayIndex(e);if(null==a){const t=this.store.getRowCount()-(this.store.getDisplayIndexEnd()-e);return this.createStubNode(t,e)}const{previousNode:l,nextNode:c}=a;if(l&&l.node.expanded&&(null==(n=l.node.childStore)?void 0:n.isDisplayIndexInStore(e)))return null==(s=l.node.childStore)?void 0:s.getRowUsingDisplayIndex(e);if(c){const t=c.node.rowIndex-e,i=c.index-t;return this.createStubNode(i,e)}const h=this.store.getRowCount()-(this.store.getDisplayIndexEnd()-e);return this.createStubNode(h,e)}createStubNode(e,t){const i=this.store.getRowBounds(t),n=this.createRowAtIndex(e,null,e=>{e.setRowIndex(t),e.setRowTop(i.rowTop),this.nodeDisplayIndexMap.set(t,e)});return this.lazyBlockLoadingService.queueLoadCheck(),n}getRowByStoreIndex(e){var t;return null==(t=this.nodeMap.getBy("index",e))?void 0:t.node}skipDisplayIndexes(e,t,i){if(0===e)return;const n=this.gos.getRowHeightAsNumber();t.skip(e),i.value+=e*n}setDisplayIndexes(e,t){this.nodeDisplayIndexMap.clear();const i={};this.nodeMap.forEach(e=>{i[e.index]=e.node});let n=-1;for(const s in i){const r=i[s],o=Number(s),a=o-1-n;this.skipDisplayIndexes(a,e,t),this.blockUtils.setDisplayIndex(r,e,t),this.nodeDisplayIndexMap.set(r.rowIndex,r),n=o}const s=this.numberOfRows-1-n;this.skipDisplayIndexes(s,e,t),this.purgeExcessRows()}getRowCount(){return this.numberOfRows}setRowCount(e,t){if(e<0)throw new Error("AG Grid: setRowCount can only accept a positive row count.");this.numberOfRows=e,null!=t&&(this.isLastRowKnown=t,!1===t&&(this.numberOfRows+=1)),this.fireStoreUpdatedEvent()}getNodes(){return this.nodeMap}getNodeCachedByDisplayIndex(e){var t;return null!=(t=this.nodeDisplayIndexMap.get(e))?t:null}getNodesToRefresh(){return this.nodesToRefresh}getSurroundingNodesByDisplayIndex(e){let t,i;return this.nodeMap.forEach(n=>{e>n.node.rowIndex?(null==i||i.node.rowIndex<n.node.rowIndex)&&(i=n):(null==t||t.node.rowIndex>n.node.rowIndex)&&(t=n)}),i||t?{previousNode:i,nextNode:t}:null}getDisplayIndexFromStoreIndex(e){var t,i;const n=this.nodeMap.getBy("index",e);if(n)return n.node.rowIndex;let s,r;if(this.nodeMap.forEach(t=>{e>t.index?(null==r||r.index<t.index)&&(r=t):(null==s||s.index>t.index)&&(s=t)}),!s)return this.store.getDisplayIndexEnd()-(this.numberOfRows-e);if(!r)return this.store.getDisplayIndexStart()+e;const o=e-r.index;return(null!=(i=null==(t=r.node.childStore)?void 0:t.getDisplayIndexEnd())?i:r.node.rowIndex)+o}createRowAtIndex(e,t,i){var n,s;const r=this.nodeMap.getBy("index",e);if(r){const{node:i}=r;if(i.__needsRefreshWhenVisible=!1,this.doesNodeMatch(t,i))return this.blockUtils.updateDataIntoRowNode(i,t),this.nodesToRefresh.delete(i),i;if(null==this.getRowIdFunc&&i.hasChildren()&&i.expanded)return this.nodesToRefresh.delete(i),i;this.destroyRowAtIndex(e)}if(t&&null!=this.getRowIdFunc){const i=this.getRowId(t),r=i&&(null==(n=this.removedNodeCache)?void 0:n.get(i));if(r)return null==(s=this.removedNodeCache)||s.delete(i),this.blockUtils.updateDataIntoRowNode(r,t),this.nodeMap.set({id:r.id,node:r,index:e}),r;const o=this.nodeMap.getBy("id",i);if(o){this.nodeMap.delete(o);const{node:i,index:n}=o;return this.blockUtils.updateDataIntoRowNode(i,t),this.nodeMap.set({id:i.id,node:i,index:e}),this.nodesToRefresh.delete(i),this.getBlockStartIndex(n)===this.getBlockStartIndex(e)||this.markBlockForVerify(n),i}}const o=this.blockUtils.createRowNode(this.store.getRowDetails());if(null!=t){const e=this.getPrefixedId(this.store.getIdSequence().next());this.blockUtils.setDataIntoRowNode(o,t,e,void 0),this.serverSideRowModel.setPaused(!0),this.blockUtils.checkOpenByDefault(o),this.serverSideRowModel.setPaused(!1),this.nodeManager.addRowNode(o)}return this.nodeMap.set({id:o.id,node:o,index:e}),i&&i(o),o}getBlockStates(){const e={},t={};this.nodeMap.forEach(({node:i,index:n})=>{var s;const r=this.getBlockStartIndex(n);i.stub||i.failedLoad||(e[r]=(null!=(s=e[r])?s:0)+1);let o="loaded";i.failedLoad?o="failed":this.lazyBlockLoadingService.isRowLoading(this,r)?o="loading":(this.nodesToRefresh.has(i)||i.stub)&&(o="needsLoading"),t[r]||(t[r]=new Set),t[r].add(o)});const i={loading:4,failed:3,needsLoading:2,loaded:1},n=this.blockUtils.createNodeIdPrefix(this.store.getParentNode()),s={};return Object.entries(t).forEach(([t,r])=>{var o;const a=[...r].sort((e,t)=>{var n,s;return(null!=(n=i[e])?n:0)-(null!=(s=i[t])?s:0)})[0],l=Number(t)/this.getBlockSize(),c=n?`${n}-${l}`:String(l);s[c]={blockNumber:l,startRow:Number(t),endRow:Number(t)+this.getBlockSize(),pageStatus:a,loadedRowCount:null!=(o=e[t])?o:0}}),s}destroyRowAtIndex(e){const t=this.nodeMap.getBy("index",e);t&&(this.nodeMap.delete(t),this.nodeDisplayIndexMap.delete(t.node.rowIndex),this.nodesToRefresh.size>0?this.removedNodeCache.set(t.node.id,t.node):this.blockUtils.destroyRowNode(t.node),this.nodesToRefresh.delete(t.node))}getSsrmParams(){return this.store.getSsrmParams()}getPrefixedId(e){return this.defaultNodeIdPrefix?this.defaultNodeIdPrefix+"-"+e:e.toString()}markBlockForVerify(e){const[t,i]=this.getBlockBounds(e);this.nodeMap.filter(e=>e.index>=t&&e.index<i).forEach(({node:e})=>{e.__needsRefreshWhenVisible=!0})}doesNodeMatch(e,t){if(t.stub)return!1;if(null!=this.getRowIdFunc){const i=this.getRowId(e);return t.id===i}return t.data===e}purgeStubsOutsideOfViewport(){const e=this.api.getFirstDisplayedRowIndex(),t=this.api.getLastDisplayedRowIndex(),i=this.getBlockStartIndex(e),[n,s]=this.getBlockBounds(t);this.nodeMap.forEach(e=>{this.lazyBlockLoadingService.isRowLoading(this,e.index)||e.node.failedLoad||e.node.stub&&(e.index<i||e.index>s)&&this.destroyRowAtIndex(e.index)})}getBlocksDistanceFromRow(e,t){const i={};return e.forEach(({node:e,index:n})=>{const[s,r]=this.getBlockBounds(n);if(s in i)return;const o=Math.abs(e.rowIndex-t);let a;const l=this.nodeMap.getBy("index",[r-1]);l&&(a=Math.abs(l.node.rowIndex-t));const c=null==a||o<a?o:a;i[s]=c}),Object.entries(i)}purgeExcessRows(){var e;if(this.purgeStubsOutsideOfViewport(),null==this.store.getDisplayIndexEnd()||null==this.storeParams.maxBlocksInCache)return;const t=this.api.getFirstDisplayedRowIndex(),i=this.api.getLastDisplayedRowIndex(),n=new Set,s=new Set;this.nodeMap.forEach(({index:e,node:r})=>{const o=this.getBlockStartIndex(e);n.add(o),r.rowIndex>=t&&r.rowIndex<=i&&s.add(o)});const r=Math.max(s.size,null!=(e=this.storeParams.maxBlocksInCache)?e:0),o=n.size-r;if(o<=0)return;let a=Number.MAX_SAFE_INTEGER,l=Number.MIN_SAFE_INTEGER;s.forEach(e=>{a>e&&(a=e),l<e&&(l=e)});const c=this.nodeMap.filter(({node:e,index:t})=>{const i=this.getBlockStartIndex(t);return!(i>=a&&i<=l||this.isNodeCached(e))});if(0===c.length)return;const h=t+(i-t)/2,d=this.getBlocksDistanceFromRow(c,h),u=this.getBlockSize();d.sort((e,t)=>Math.sign(t[1]-e[1]));for(let e=0;e<Math.min(o,d.length);e++){const t=Number(d[e][0]);for(let e=t;e<t+u;e++){const t=this.nodeMap.getBy("index",e);t&&!this.isNodeCached(t.node)&&this.destroyRowAtIndex(e)}}}isNodeFocused(e){const t=this.focusService.getFocusCellToUseAfterRefresh();return!!t&&(null==t.rowPinned&&t.rowIndex===e.rowIndex)}isNodeCached(e){return e.isExpandable()&&e.expanded||this.isNodeFocused(e)}extractDuplicateIds(e){if(null==this.getRowIdFunc)return[];const t=new Set,i=new Set;return e.forEach(e=>{const n=this.getRowId(e);t.has(n)?i.add(n):t.add(n)}),[...i]}onLoadSuccess(e,t,i){if(!this.live)return;const n=i.groupLevelInfo;if(this.store.setStoreInfo(n),null!=this.getRowIdFunc){const n=this.extractDuplicateIds(i.rowData);if(n.length>0){const i=n.join(", ");return console.warn(`AG Grid: Unable to display rows as duplicate row ids (${i}) were returned by the getRowId callback. Please modify the getRowId callback to provide unique ids.`),void this.onLoadFailed(e,t)}}i.pivotResultFields&&this.serverSideRowModel.generateSecondaryColumns(i.pivotResultFields);const s=this.nodesToRefresh.size>0;if(i.rowData.forEach((t,i)=>{var n;const s=e+i,r=this.nodeMap.getBy("index",s);if(!(null==(n=null==r?void 0:r.node)?void 0:n.stub))return r&&this.doesNodeMatch(t,r.node)?(this.blockUtils.updateDataIntoRowNode(r.node,t),this.nodesToRefresh.delete(r.node),void(r.node.__needsRefreshWhenVisible=!1)):void this.createRowAtIndex(s,t);this.createRowAtIndex(s,t)}),null!=i.rowCount&&-1!==i.rowCount)this.numberOfRows=i.rowCount,this.isLastRowKnown=!0;else if(t>i.rowData.length)this.numberOfRows=e+i.rowData.length,this.isLastRowKnown=!0;else if(!this.isLastRowKnown){const t=e+i.rowData.length+1;t>this.numberOfRows&&(this.numberOfRows=t)}this.isLastRowKnown&&this.nodeMap.filter(e=>e.index>=this.numberOfRows).forEach(e=>this.destroyRowAtIndex(e.index)),this.fireStoreUpdatedEvent();const r=0===this.nodesToRefresh.size;s&&r&&this.fireRefreshFinishedEvent()}fireRefreshFinishedEvent(){0===this.nodesToRefresh.size&&(this.removedNodeCache.forEach(e=>{this.blockUtils.destroyRowNode(e)}),this.removedNodeCache=new Map,this.store.fireRefreshFinishedEvent())}isStoreFullyLoaded(){const e=this.isLastRowKnown,t=this.nodeMap.getSize()===this.numberOfRows;if(!e||!t)return;if(this.nodesToRefresh.size>0)return;let i=-1;return null==this.nodeMap.find(e=>(i+=1,e.index!==i||!!e.node.__needsRefreshWhenVisible||!!e.node.stub))}isLastRowIndexKnown(){return this.isLastRowKnown}onLoadFailed(e,t){var i;if(!this.live)return;const n=this.nodesToRefresh.size>0;for(let n=e;n<e+t&&n<this.getRowCount();n++){let{node:e}=null!=(i=this.nodeMap.getBy("index",n))?i:{};e&&this.nodesToRefresh.delete(e),e&&e.stub||(e&&!e.stub&&this.destroyRowAtIndex(n),e=this.createRowAtIndex(n)),e.__needsRefreshWhenVisible=!1,e.failedLoad=!0}const s=0===this.nodesToRefresh.size;n&&s&&this.fireRefreshFinishedEvent(),this.fireStoreUpdatedEvent()}markNodesForRefresh(){this.nodeMap.forEach(e=>{e.node.stub&&!e.node.failedLoad||this.nodesToRefresh.add(e.node)}),this.lazyBlockLoadingService.queueLoadCheck(),this.isLastRowKnown&&0===this.numberOfRows&&(this.numberOfRows=1,this.isLastRowKnown=!1,this.fireStoreUpdatedEvent())}isNodeInCache(e){return!!this.nodeMap.getBy("id",e)}fireStoreUpdatedEvent(){this.live&&this.store.fireStoreUpdatedEvent()}getRowId(e){if(null==this.getRowIdFunc)return null;const{level:t}=this.store.getRowDetails(),i=this.store.getParentNode().getGroupKeys(),n=this.getRowIdFunc({data:e,parentKeys:i.length>0?i:void 0,level:t});return String(n)}getOrderedNodeMap(){const e={};return this.nodeMap.forEach(t=>e[t.index]=t),e}clearDisplayIndexes(){this.nodeDisplayIndexMap.clear()}clientSideSortRows(){const e=this.sortController.getSortOptions();if(!e.some(e=>null!=e.sort))return;const t=new Array(this.nodeMap.getSize());this.nodeMap.forEach(e=>t[e.index]=e.node),this.nodeMap.clear(),this.rowNodeSorter.doFullSort(t,e).forEach((e,t)=>{this.nodeMap.set({id:e.id,node:e,index:t})})}updateRowNodes(e){if(null==this.getRowIdFunc)throw new Error("AG Grid: Transactions can only be applied when row ids are supplied.");const t=[];return e.forEach(e=>{const i=this.getRowId(e),n=this.nodeMap.getBy("id",i);n&&(this.blockUtils.updateDataIntoRowNode(n.node,e),t.push(n.node))}),t}insertRowNodes(e,t){const i=this.store.getRowCount()-(this.store.getParentNode().sibling?1:0),n=null==t&&this.isLastRowKnown?i:t;if(null==n||i<n)return[];if(null==this.getRowIdFunc)throw new Error("AG Grid: Transactions can only be applied when row ids are supplied.");const s={};e.forEach(e=>{const t=this.getRowId(e);t&&this.isNodeInCache(t)||(s[t]=e)});const r=Object.values(s);let o=r.length;if(0===o)return[];const a=this.nodeMap.filter(e=>e.index>=n);return a.forEach(e=>this.nodeMap.delete(e)),a.forEach(e=>{this.nodeMap.set({node:e.node,index:e.index+o,id:e.id})}),this.numberOfRows+=o,r.map((e,t)=>this.createRowAtIndex(n+t,e))}removeRowNodes(e){if(null==this.getRowIdFunc)throw new Error("AG Grid: Transactions can only be applied when row ids are supplied.");const t=[],i=[];let n=0;const s=[...e],r=this.getOrderedNodeMap();let o=-1;for(let e in r){o+=1;const a=r[e],l=s.findIndex(e=>e===a.id);if(-1!==l){s.splice(l,1),this.destroyRowAtIndex(Number(e)),t.push(a.node),n+=1;continue}if(0===n)continue;const c=Number(e);o!==c&&i.push(a.node),this.nodeMap.delete(r[e]),this.nodeMap.set({id:a.id,node:a.node,index:c-n})}return this.numberOfRows-=this.isLastRowIndexKnown()?e.length:n,s.length>0&&i.length>0&&(i.forEach(e=>e.__needsRefreshWhenVisible=!0),this.lazyBlockLoadingService.queueLoadCheck()),t}getBlockSize(){return this.storeParams.cacheBlockSize||df.DEFAULT_BLOCK_SIZE}getBlockStartIndex(e){return e-e%this.getBlockSize()}getBlockBounds(e){const t=this.getBlockStartIndex(e);return[t,t+this.getBlockSize()]}};lf([(0,_g.Autowired)("gridApi")],uf.prototype,"api",2),lf([(0,_g.Autowired)("ssrmBlockUtils")],uf.prototype,"blockUtils",2),lf([(0,_g.Autowired)("focusService")],uf.prototype,"focusService",2),lf([(0,_g.Autowired)("ssrmNodeManager")],uf.prototype,"nodeManager",2),lf([(0,_g.Autowired)("rowModel")],uf.prototype,"serverSideRowModel",2),lf([(0,_g.Autowired)("rowNodeSorter")],uf.prototype,"rowNodeSorter",2),lf([(0,_g.Autowired)("sortController")],uf.prototype,"sortController",2),lf([(0,_g.Autowired)("lazyBlockLoadingService")],uf.prototype,"lazyBlockLoadingService",2),lf([_g.PostConstruct],uf.prototype,"init",1),lf([_g.PreDestroy],uf.prototype,"destroyRowNodes",1);var pf=class extends Og.BeanStub{constructor(e,t,i){super(),this.idSequence=new Og.NumberSequence,this.ssrmParams=e,this.parentRowNode=i,this.storeParams=t,this.level=i.level+1,this.group=!!e.rowGroupCols&&this.level<e.rowGroupCols.length,this.leafGroup=!!e.rowGroupCols&&this.level===e.rowGroupCols.length-1,this.info={}}init(){var e;let t=1;if(0===this.level&&(t=null!=(e=this.storeUtils.getServerSideInitialRowCount())?e:1,this.eventService.dispatchEventOnce({type:Og.Events.EVENT_ROW_COUNT_READY})),this.cache=this.createManagedBean(new uf(this,t,this.storeParams)),!this.gos.get("treeData")&&this.group){const e=this.ssrmParams.rowGroupCols[this.level];this.groupField=e.field,this.rowGroupColumn=this.columnModel.getRowGroupColumns()[this.level]}}destroyRowNodes(){this.displayIndexStart=void 0,this.displayIndexEnd=void 0,this.destroyBean(this.cache)}applyRowData(e,t,i){this.cache.onLoadSuccess(t,i,e)}applyTransaction(e){var t,i,n;const s=this.gos.getCallback("getRowId");if(!s)return console.warn("AG Grid: getRowId callback must be implemented for transactions to work. Transaction was ignored."),{status:Og.ServerSideTransactionResultStatus.Cancelled};const r=this.gos.getCallback("isApplyServerSideTransaction");if(r&&!r({transaction:e,parentNode:this.parentRowNode,groupLevelInfo:this.info}))return{status:Og.ServerSideTransactionResultStatus.Cancelled};const o=this.cache.isStoreFullyLoaded();let a,l,c;if((null==(t=e.update)?void 0:t.length)&&(a=this.cache.updateRowNodes(e.update)),null==(i=e.add)?void 0:i.length){let t=e.addIndex;null!=t&&t<0&&(t=void 0),l=this.cache.insertRowNodes(e.add,t)}if(null==(n=e.remove)?void 0:n.length){const t=e.remove.map(e=>s({level:this.level,parentKeys:this.parentRowNode.getGroupKeys(),data:e})),i=[...new Set(t)];c=this.cache.removeRowNodes(i)}const h=this.gos.get("serverSideEnableClientSideSort"),d=(null==a?void 0:a.length)||(null==l?void 0:l.length);return o&&h&&d&&this.cache.clientSideSortRows(),this.updateSelectionAfterTransaction(a,c),{status:Og.ServerSideTransactionResultStatus.Applied,update:a,add:l,remove:c}}updateSelectionAfterTransaction(e,t){const i=[];null==e||e.forEach(e=>{e.isSelected()&&!e.selectable&&i.push(e)}),null==t||t.forEach(e=>{e.isSelected()&&i.push(e)}),i.length&&this.selectionService.setNodesSelected({newValue:!1,clearSelection:!1,nodes:i,source:"rowDataChanged"})}clearDisplayIndexes(){this.displayIndexStart=void 0,this.displayIndexEnd=void 0,this.cache.getNodes().forEach(e=>this.blockUtils.clearDisplayIndex(e.node)),this.parentRowNode.sibling&&this.blockUtils.clearDisplayIndex(this.parentRowNode.sibling),this.cache.clearDisplayIndexes()}getDisplayIndexStart(){return this.displayIndexStart}getDisplayIndexEnd(){return this.displayIndexEnd}getRowCount(){return this.parentRowNode.sibling?this.cache.getRowCount()+1:this.cache.getRowCount()}setRowCount(e,t){this.cache.setRowCount(e,t)}isDisplayIndexInStore(e){return 0!==this.cache.getRowCount()&&this.displayIndexStart<=e&&e<this.getDisplayIndexEnd()}setDisplayIndexes(e,t){this.displayIndexStart=e.peek(),this.topPx=t.value;const i=this.parentRowNode.level>-1&&this.gos.getGroupTotalRowCallback()({node:this.parentRowNode});i||this.parentRowNode.destroyFooter(),"top"===i&&(this.parentRowNode.createFooter(),this.blockUtils.setDisplayIndex(this.parentRowNode.sibling,e,t)),this.cache.setDisplayIndexes(e,t),"bottom"===i&&(this.parentRowNode.createFooter(),this.blockUtils.setDisplayIndex(this.parentRowNode.sibling,e,t)),this.displayIndexEnd=e.peek(),this.heightPx=t.value-this.topPx}forEachStoreDeep(e,t=new Og.NumberSequence){e(this,t.next()),this.cache.getNodes().forEach(i=>{const n=i.node.childStore;n&&n.forEachStoreDeep(e,t)})}forEachNodeDeep(e,t=new Og.NumberSequence){this.cache.getNodes().forEach(i=>{e(i.node,t.next());const n=i.node.childStore;n&&n.forEachNodeDeep(e,t)})}forEachNodeDeepAfterFilterAndSort(e,t=new Og.NumberSequence,i=!1){const n=this.parentRowNode.level>-1&&this.gos.getGroupTotalRowCallback()({node:this.parentRowNode});"top"===n&&e(this.parentRowNode.sibling,t.next());const s=this.cache.getOrderedNodeMap();for(let n in s){const r=s[n];e(r.node,t.next());const o=r.node.childStore;o&&o.forEachNodeDeepAfterFilterAndSort(e,t,i)}"bottom"===n&&e(this.parentRowNode.sibling,t.next())}retryLoads(){this.cache.getNodes().forEach(({node:e})=>{e.failedLoad&&(e.failedLoad=!1,e.__needsRefreshWhenVisible=!0,e.stub=!0)}),this.forEachChildStoreShallow(e=>e.retryLoads()),this.fireStoreUpdatedEvent()}getRowUsingDisplayIndex(e){return this.parentRowNode.sibling&&e===this.parentRowNode.sibling.rowIndex?this.parentRowNode.sibling:this.cache.getRowByDisplayIndex(e)}getRowBounds(e){var t;if(!this.isDisplayIndexInStore(e))return null;const i=this.cache.getNodeCachedByDisplayIndex(e);if(i){const t=this.blockUtils.extractRowBounds(i,e);if(t)return t}const{previousNode:n,nextNode:s}=null!=(t=this.cache.getSurroundingNodesByDisplayIndex(e))?t:{};if(n){const t=this.blockUtils.extractRowBounds(n.node,e);if(null!=t)return t}const r=this.gos.getRowHeightAsNumber();if(s){const t=(s.node.rowIndex-e)*r;return{rowTop:s.node.rowTop-t,rowHeight:r}}return{rowTop:this.topPx+this.heightPx-(this.getDisplayIndexEnd()-e)*r,rowHeight:r}}isPixelInRange(e){return e>=this.topPx&&e<this.topPx+this.heightPx}getRowIndexAtPixel(e){if(e<this.topPx)return this.getDisplayIndexStart();if(e>=this.topPx+this.heightPx)return this.getDisplayIndexEnd()-1;if(this.parentRowNode.sibling&&e>this.parentRowNode.sibling.rowTop&&e<this.parentRowNode.sibling.rowTop+this.parentRowNode.sibling.rowHeight)return this.parentRowNode.sibling.rowIndex;let t=Number.MAX_SAFE_INTEGER,i=null,n=Number.MAX_SAFE_INTEGER,s=null;if(this.cache.getNodes().forEach(({node:r})=>{const o=Math.abs(e-r.rowTop);r.rowTop<e?o<t&&(t=o,i=r):o<n&&(n=o,s=r)}),i){const t=this.blockUtils.getIndexAtPixel(i,e);if(null!=t)return t}const r=this.gos.getRowHeightAsNumber();if(s){const t=s.rowTop,i=Math.ceil((t-e)/r);return s.rowIndex-i}const o=this.topPx+this.heightPx,a=Math.floor((o-e)/r);return this.getDisplayIndexEnd()-a}getChildStore(e){return this.storeUtils.getChildStore(e,this,e=>{const t=this.cache.getNodes().find(t=>t.node.key==e);return t?t.node:null})}forEachChildStoreShallow(e){this.cache.getNodes().forEach(({node:t})=>{t.childStore&&e(t.childStore)})}refreshAfterSort(e){if(this.storeUtils.isServerSideSortAllLevels()||this.storeUtils.isServerRefreshNeeded(this.parentRowNode,this.ssrmParams.rowGroupCols,e)){const e=this.cache.isStoreFullyLoaded(),t=this.gos.get("serverSideEnableClientSideSort");if(!e||!t){const e=this.cache.getRowCount();return this.destroyBean(this.cache),void(this.cache=this.createManagedBean(new uf(this,e,this.storeParams)))}this.cache.clientSideSortRows()}this.forEachChildStoreShallow(t=>t.refreshAfterSort(e))}refreshAfterFilter(e){!this.storeUtils.isServerSideOnlyRefreshFilteredGroups()||this.storeUtils.isServerRefreshNeeded(this.parentRowNode,this.ssrmParams.rowGroupCols,e)?this.refreshStore(!0):this.forEachChildStoreShallow(t=>t.refreshAfterFilter(e))}refreshStore(e){if(e)return this.destroyBean(this.cache),this.cache=this.createManagedBean(new uf(this,1,this.storeParams)),void this.fireStoreUpdatedEvent();this.cache.markNodesForRefresh()}getTopLevelRowDisplayedIndex(e){const t=this.cache.getDisplayIndexFromStoreIndex(e);return null!=t?t:e}isLastRowIndexKnown(){return this.cache.isLastRowIndexKnown()}getRowNodesInRange(e,t){let i=!1;return Og._.missing(e)&&!0,this.cache.getNodes().filter(({node:i})=>i.rowIndex>=e.rowIndex&&i.rowIndex<=t.rowIndex).map(({node:e})=>e)}addStoreStates(e){e.push({suppressInfiniteScroll:!1,route:this.parentRowNode.getGroupKeys(),rowCount:this.getRowCount(),lastRowIndexKnown:this.isLastRowIndexKnown(),info:this.info,maxBlocksInCache:this.storeParams.maxBlocksInCache,cacheBlockSize:this.storeParams.cacheBlockSize}),this.forEachChildStoreShallow(t=>t.addStoreStates(e))}getIdSequence(){return this.idSequence}getParentNode(){return this.parentRowNode}getRowDetails(){return{field:this.groupField,group:this.group,leafGroup:this.leafGroup,level:this.level,parent:this.parentRowNode,rowGroupColumn:this.rowGroupColumn}}getSsrmParams(){return this.ssrmParams}setStoreInfo(e){e&&Object.assign(this.info,e)}fireStoreUpdatedEvent(){const e={type:Og.Events.EVENT_STORE_UPDATED};this.eventService.dispatchEvent(e)}fireRefreshFinishedEvent(){const e={type:Og.Events.EVENT_STORE_REFRESHED,route:this.parentRowNode.getRoute()};this.eventService.dispatchEvent(e)}getBlockStates(){return this.cache.getBlockStates()}getStoreBounds(){return{topPx:this.topPx,heightPx:this.heightPx}}getCache(){return this.cache}};lf([(0,Og.Autowired)("ssrmBlockUtils")],pf.prototype,"blockUtils",2),lf([(0,Og.Autowired)("ssrmStoreUtils")],pf.prototype,"storeUtils",2),lf([(0,Og.Autowired)("columnModel")],pf.prototype,"columnModel",2),lf([(0,Og.Autowired)("selectionService")],pf.prototype,"selectionService",2),lf([Og.PostConstruct],pf.prototype,"init",1),lf([Og.PreDestroy],pf.prototype,"destroyRowNodes",1);var gf=class extends Pg.BeanStub{constructor(){super(...arguments),this.onRowHeightChanged_debounced=Pg._.debounce(this.onRowHeightChanged.bind(this),100),this.pauseStoreUpdateListening=!1,this.started=!1,this.managingPivotResultColumns=!1}ensureRowHeightsValid(){return!1}start(){this.started=!0,this.updateDatasource()}destroyDatasource(){this.datasource&&(this.datasource.destroy&&this.datasource.destroy(),this.rowRenderer.datasourceChanged(),this.datasource=void 0)}addEventListeners(){this.addManagedListener(this.eventService,Pg.Events.EVENT_NEW_COLUMNS_LOADED,this.onColumnEverything.bind(this)),this.addManagedListener(this.eventService,Pg.Events.EVENT_STORE_UPDATED,this.onStoreUpdated.bind(this));const e=this.resetRootStore.bind(this);this.addManagedListener(this.eventService,Pg.Events.EVENT_COLUMN_VALUE_CHANGED,e),this.addManagedListener(this.eventService,Pg.Events.EVENT_COLUMN_PIVOT_CHANGED,e),this.addManagedListener(this.eventService,Pg.Events.EVENT_COLUMN_ROW_GROUP_CHANGED,e),this.addManagedListener(this.eventService,Pg.Events.EVENT_COLUMN_PIVOT_MODE_CHANGED,e),this.addManagedPropertyListeners(["masterDetail","treeData","removePivotHeaderRowWhenSingleValueColumn","suppressServerSideInfiniteScroll","cacheBlockSize"],e),this.addManagedPropertyListener("rowHeight",()=>this.resetRowHeights()),this.verifyProps(),this.addManagedPropertyListener("serverSideDatasource",()=>this.updateDatasource())}updateDatasource(){const e=this.gos.get("serverSideDatasource");e&&this.setDatasource(e)}verifyProps(){this.gos.exists("initialGroupOrderComparator")&&Pg._.warnOnce("initialGroupOrderComparator cannot be used with Server Side Row Model."),this.gos.isRowSelection()&&!this.gos.exists("getRowId")&&Pg._.warnOnce("getRowId callback must be provided for Server Side Row Model selection to work correctly.")}setDatasource(e){this.started&&(this.destroyDatasource(),this.datasource=e,this.resetRootStore())}applyRowData(e,t,i){const n=this.getRootStore();if(!n)return;const s=n.getChildStore(i);s&&(s instanceof pf?s.applyRowData(e,t,e.rowData.length):s instanceof cf&&s.processServerResult(e))}isLastRowIndexKnown(){const e=this.getRootStore();return!!e&&e.isLastRowIndexKnown()}onColumnEverything(){if(!this.storeParams)return void this.resetRootStore();const e=this.columnsToValueObjects(this.columnModel.getRowGroupColumns()),t=this.columnsToValueObjects(this.columnModel.getValueColumns()),i=this.columnsToValueObjects(this.columnModel.getPivotColumns()),n=e=>{const t={};e.oldCols.forEach(e=>t[e.id]=e);const i=e.newCols.every(e=>{const i=t[e.id];return i&&delete t[e.id],i&&i.field===e.field&&i.aggFunc===e.aggFunc}),n=!e.allowRemovedColumns&&!!Object.values(t).length;return i&&!n},s=!Pg._.jsonEquals(this.storeParams.sortModel,this.sortController.getSortModel()),r=!n({oldCols:this.storeParams.rowGroupCols,newCols:e}),o=!n({oldCols:this.storeParams.pivotCols,newCols:i}),a=!!(null==e?void 0:e.length)&&!n({oldCols:this.storeParams.valueCols,newCols:t,allowRemovedColumns:!0});if(s||r||o||a)this.resetRootStore();else{const e=this.createStoreParams();this.storeParams.rowGroupCols=e.rowGroupCols,this.storeParams.pivotCols=e.pivotCols,this.storeParams.valueCols=e.valueCols}}destroyRootStore(){this.rootNode&&this.rootNode.childStore&&(this.rootNode.childStore=this.destroyBean(this.rootNode.childStore),this.nodeManager.clear())}refreshAfterSort(e,t){this.storeParams&&(this.storeParams.sortModel=e);const i=this.getRootStore();i&&(i.refreshAfterSort(t),this.onStoreUpdated())}generateSecondaryColumns(e){if(!this.pivotColDefService)return void Pg.ModuleRegistry.__assertRegistered(Pg.ModuleNames.RowGroupingModule,"pivotResultFields",this.context.getGridId());const t=this.pivotColDefService.createColDefsFromFields(e);this.managingPivotResultColumns=!0,this.columnModel.setSecondaryColumns(t,"rowModelUpdated")}resetRowHeights(){const e=this.resetRowHeightsForAllRowNodes(),t=this.gos.getRowHeightForNode(this.rootNode);if(this.rootNode.setRowHeight(t.height,t.estimated),this.rootNode.sibling){const e=this.gos.getRowHeightForNode(this.rootNode.sibling);this.rootNode.sibling.setRowHeight(e.height,e.estimated)}e&&this.onRowHeightChanged()}resetRowHeightsForAllRowNodes(){let e=!1;return this.forEachNode(t=>{const i=this.gos.getRowHeightForNode(t);t.setRowHeight(i.height,i.estimated);const n=t.detailNode;if(n){const e=this.gos.getRowHeightForNode(n);n.setRowHeight(e.height,e.estimated)}if(t.sibling){const e=this.gos.getRowHeightForNode(t.sibling);n.setRowHeight(e.height,e.estimated)}e=!0}),e}resetRootStore(){this.destroyRootStore(),this.rootNode=new Pg.RowNode(this.beans),this.rootNode.group=!0,this.rootNode.level=-1,this.datasource&&(this.storeParams=this.createStoreParams(),this.rootNode.childStore=this.createBean(this.storeFactory.createStore(this.storeParams,this.rootNode)),this.updateRowIndexesAndBounds()),this.managingPivotResultColumns&&(this.columnModel.setSecondaryColumns(null,"api"),this.managingPivotResultColumns=!1),this.dispatchModelUpdated(!0)}columnsToValueObjects(e){return e.map(e=>({id:e.getId(),aggFunc:e.getAggFunc(),displayName:this.columnModel.getDisplayNameForColumn(e,"model"),field:e.getColDef().field}))}createStoreParams(){const e=this.columnsToValueObjects(this.columnModel.getRowGroupColumns()),t=this.columnsToValueObjects(this.columnModel.getValueColumns()),i=this.columnsToValueObjects(this.columnModel.getPivotColumns()),n=this.gos.isGetRowHeightFunction();return{valueCols:t,rowGroupCols:e,pivotCols:i,pivotMode:this.columnModel.isPivotMode(),filterModel:this.filterManager.isAdvancedFilterEnabled()?this.filterManager.getAdvancedFilterModel():this.filterManager.getFilterModel(),sortModel:this.sortController.getSortModel(),datasource:this.datasource,lastAccessedSequence:new Pg.NumberSequence,dynamicRowHeight:n}}getParams(){return this.storeParams}dispatchModelUpdated(e=!1){const t={type:Pg.Events.EVENT_MODEL_UPDATED,animate:!e,keepRenderedRows:!e,newPage:!1,newData:!1};this.eventService.dispatchEvent(t)}onStoreUpdated(){this.pauseStoreUpdateListening||(this.updateRowIndexesAndBounds(),this.dispatchModelUpdated())}onRowHeightChangedDebounced(){this.onRowHeightChanged_debounced()}onRowHeightChanged(){this.updateRowIndexesAndBounds(),this.dispatchModelUpdated()}updateRowIndexesAndBounds(){const e=this.getRootStore();e&&e.setDisplayIndexes(new Pg.NumberSequence,{value:0})}retryLoads(){const e=this.getRootStore();e&&(e.retryLoads(),this.onStoreUpdated())}getRow(e){const t=this.getRootStore();if(t)return t.getRowUsingDisplayIndex(e)}setPaused(e){this.pauseStoreUpdateListening=e}expandAll(e){this.pauseStoreUpdateListening=!0,this.forEachNode(t=>{t.stub||t.hasChildren()&&t.setExpanded(e)}),this.pauseStoreUpdateListening=!1,this.onStoreUpdated()}refreshAfterFilter(e,t){this.storeParams&&(this.storeParams.filterModel=e);const i=this.getRootStore();i&&(i.refreshAfterFilter(t),this.onStoreUpdated())}getRootStore(){if(this.rootNode&&this.rootNode.childStore)return this.rootNode.childStore}getRowCount(){const e=this.getRootStore();return e?e.getDisplayIndexEnd():0}getTopLevelRowCount(){const e=this.getRootStore();return e?e.getRowCount():1}getTopLevelRowDisplayedIndex(e){const t=this.getRootStore();return t?t.getTopLevelRowDisplayedIndex(e):e}getRowBounds(e){const t=this.getRootStore();return t?t.getRowBounds(e):{rowTop:0,rowHeight:this.gos.getRowHeightAsNumber()}}getBlockStates(){const e=this.getRootStore();if(!e)return;const t={};return e.forEachStoreDeep(e=>{if(e instanceof cf){const{id:i,state:n}=e.getBlockStateJson();t[i]=n}else{if(!(e instanceof pf))throw new Error("AG Grid: Unsupported store type");Object.entries(e.getBlockStates()).forEach(([e,i])=>{t[e]=i})}}),t}getRowIndexAtPixel(e){const t=this.getRootStore();return e<=0||!t?0:t.getRowIndexAtPixel(e)}isEmpty(){return!1}isRowsToRender(){return null!=this.getRootStore()&&this.getRowCount()>0}getType(){return"serverSide"}forEachNode(e){const t=this.getRootStore();t&&t.forEachNodeDeep(e)}forEachNodeAfterFilterAndSort(e,t=!1){const i=this.getRootStore();i&&i.forEachNodeDeepAfterFilterAndSort(e,void 0,t)}executeOnStore(e,t){if(!this.started)return!1;const i=this.getRootStore();if(!i)return!0;const n=i.getChildStore(e);return n&&t(n),!0}refreshStore(e={}){const t=e.route?e.route:[];this.executeOnStore(t,t=>t.refreshStore(1==e.purge))}getStoreState(){const e=[],t=this.getRootStore();return t&&t.addStoreStates(e),e}getNodesInRangeForSelection(e,t){if(!Pg._.exists(e))return[];if(!t)return[e];const i=e.rowIndex,n=t.rowIndex;if(null===i||null===n)return[e];const s=[],[r,o]=[i,n].sort((e,t)=>e-t);return this.forEachNode(e=>{const t=e.rowIndex;null==t||e.stub||t>=r&&t<=o&&s.push(e)}),s.length!==o-r+1?[e]:s}getRowNode(e){let t;return this.forEachNode(i=>{i.id===e&&(t=i),i.detailNode&&i.detailNode.id===e&&(t=i.detailNode)}),t}isRowPresent(e){return!!this.getRowNode(e.id)}setRowCount(e,t){const i=this.getRootStore();if(i){if(i instanceof pf)return void i.setRowCount(e,t);console.error("AG Grid: Infinite scrolling must be enabled in order to set the row count.")}}};lf([(0,Pg.Autowired)("columnModel")],gf.prototype,"columnModel",2),lf([(0,Pg.Autowired)("filterManager")],gf.prototype,"filterManager",2),lf([(0,Pg.Autowired)("sortController")],gf.prototype,"sortController",2),lf([(0,Pg.Autowired)("rowRenderer")],gf.prototype,"rowRenderer",2),lf([(0,Pg.Autowired)("ssrmNodeManager")],gf.prototype,"nodeManager",2),lf([(0,Pg.Autowired)("ssrmStoreFactory")],gf.prototype,"storeFactory",2),lf([(0,Pg.Autowired)("beans")],gf.prototype,"beans",2),lf([(0,Pg.Optional)("pivotColDefService")],gf.prototype,"pivotColDefService",2),lf([Pg.PreDestroy],gf.prototype,"destroyDatasource",1),lf([Pg.PostConstruct],gf.prototype,"addEventListeners",1),lf([Pg.PreDestroy],gf.prototype,"destroyRootStore",1),gf=lf([(0,Pg.Bean)("rowModel")],gf);var ff=class extends Gg.BeanStub{loadFromDatasource(e){const{storeParams:t,parentBlock:i,parentNode:n}=e,s=n.getGroupKeys();if(!t.datasource)return;const r={startRow:e.startRow,endRow:e.endRow,rowGroupCols:t.rowGroupCols,valueCols:t.valueCols,pivotCols:t.pivotCols,pivotMode:t.pivotMode,groupKeys:s,filterModel:t.filterModel,sortModel:t.sortModel},o=this.gos.addGridCommonParams({success:e.success,fail:e.fail,request:r,parentNode:e.parentNode});window.setTimeout(()=>{t.datasource&&i.isAlive()?t.datasource.getRows(o):e.fail()},0)}getChildStore(e,t,i){if(Gg._.missingOrEmpty(e))return t;const n=i(e[0]);if(n){if(1===e.length&&!n.childStore){const e=this.serverSideRowModel.getParams();n.childStore=this.createBean(this.storeFactory.createStore(e,n))}const t=e.slice(1,e.length),i=n.childStore;return i?i.getChildStore(t):null}return null}isServerRefreshNeeded(e,t,i){if(i.valueColChanged||i.secondaryColChanged)return!0;const n=e.level+1;if(!(n<t.length))return!0;const s=t[n].id;return i.changedColumns.indexOf(s)>-1||this.columnModel.getAllGridColumns().filter(e=>e.getColDef().showRowGroup&&i.changedColumns.includes(e.getId())).map(e=>e.getColDef().showRowGroup).some(e=>!0===e||e===s)}getServerSideInitialRowCount(){return this.gos.get("serverSideInitialRowCount")}assertRowModelIsServerSide(e){return!!this.gos.isRowModelType("serverSide")||(Gg._.warnOnce(`The '${e}' property can only be used with the Server Side Row Model.`),!1)}assertNotTreeData(e){return!this.gos.get("treeData")||(Gg._.warnOnce(`The '${e}' property cannot be used while using tree data.`),!1)}isServerSideSortAllLevels(){return this.gos.get("serverSideSortAllLevels")&&this.assertRowModelIsServerSide("serverSideSortAllLevels")}isServerSideOnlyRefreshFilteredGroups(){return this.gos.get("serverSideOnlyRefreshFilteredGroups")&&this.assertRowModelIsServerSide("serverSideOnlyRefreshFilteredGroups")}isServerSideSortOnServer(){return this.gos.get("serverSideSortOnServer")&&this.assertRowModelIsServerSide("serverSideSortOnServer")&&this.assertNotTreeData("serverSideSortOnServer")}isServerSideFilterOnServer(){return this.gos.get("serverSideFilterOnServer")&&this.assertRowModelIsServerSide("serverSideFilterOnServer")&&this.assertNotTreeData("serverSideFilterOnServer")}};lf([(0,Gg.Autowired)("columnModel")],ff.prototype,"columnModel",2),lf([(0,Gg.Autowired)("rowModel")],ff.prototype,"serverSideRowModel",2),lf([(0,Gg.Autowired)("ssrmStoreFactory")],ff.prototype,"storeFactory",2),ff=lf([(0,Gg.Bean)("ssrmStoreUtils")],ff);var mf=class extends Vg.BeanStub{createRowNode(e){const t=new Vg.RowNode(this.beans),i=null!=e.rowHeight?e.rowHeight:this.gos.getRowHeightAsNumber();return t.setRowHeight(i),t.group=e.group,t.leafGroup=e.leafGroup,t.level=e.level,t.uiLevel=e.level,t.parent=e.parent,t.stub=!0,t.__needsRefreshWhenVisible=!1,t.group&&(t.expanded=!1,t.field=e.field,t.rowGroupColumn=e.rowGroupColumn),t}destroyRowNodes(e){e&&e.forEach(e=>this.destroyRowNode(e))}destroyRowNode(e,t=!1){e.childStore&&!t&&(this.destroyBean(e.childStore),e.childStore=null),e.sibling&&!e.footer&&this.destroyRowNode(e.sibling,!1),e.clearRowTopAndRowIndex(),null!=e.id&&this.nodeManager.removeNode(e)}setTreeGroupInfo(e){e.updateHasChildren();const t=this.gos.get("getServerSideGroupKey");e.hasChildren()&&null!=t&&(e.key=t(e.data)),e.hasChildren()||null==e.childStore||(this.destroyBean(e.childStore),e.childStore=null,e.expanded=!1)}setRowGroupInfo(e){e.key=this.valueService.getValue(e.rowGroupColumn,e),null!==e.key&&void 0!==e.key||Vg._.doOnce(()=>{console.warn("AG Grid: null and undefined values are not allowed for server side row model keys"),e.rowGroupColumn&&console.warn(`column = ${e.rowGroupColumn.getId()}`),console.warn("data is ",e.data)},"ServerSideBlock-CannotHaveNullOrUndefinedForKey"),this.beans.gos.getGroupTotalRowCallback()({node:e})&&(e.createFooter(),e.sibling&&(e.sibling.uiLevel=e.uiLevel+1))}setMasterDetailInfo(e){const t=this.gos.get("isRowMaster");e.master=null==t||t(e.data)}updateDataIntoRowNode(e,t){e.updateData(t),this.gos.get("treeData")?(this.setTreeGroupInfo(e),this.setChildCountIntoRowNode(e)):e.group?(this.setChildCountIntoRowNode(e),e.footer||(this.beans.gos.getGroupTotalRowCallback()({node:e})?e.sibling?e.sibling.updateData(t):e.createFooter():e.sibling&&e.destroyFooter())):this.gos.get("masterDetail")}setDataIntoRowNode(e,t,i,n){var s;e.stub=!1;const r=this.gos.get("treeData");Vg._.exists(t)?(e.setDataAndId(t,i),r?this.setTreeGroupInfo(e):e.group?this.setRowGroupInfo(e):this.gos.get("masterDetail")&&this.setMasterDetailInfo(e)):(e.setDataAndId(void 0,void 0),e.key=null),(r||e.group)&&(this.setGroupDataIntoRowNode(e),this.setChildCountIntoRowNode(e)),Vg._.exists(t)&&(e.setRowHeight(this.gos.getRowHeightForNode(e,!1,n).height),null==(s=e.sibling)||s.setRowHeight(this.gos.getRowHeightForNode(e.sibling,!1,n).height))}setChildCountIntoRowNode(e){const t=this.gos.get("getChildCount");t&&e.setAllChildrenCount(t(e.data))}setGroupDataIntoRowNode(e){const t=this.columnModel.getGroupDisplayColumns(),i=this.gos.get("treeData");t.forEach(t=>{if(null==e.groupData&&(e.groupData={}),i)e.groupData[t.getColId()]=e.key;else if(t.isRowGroupDisplayed(e.rowGroupColumn.getId())){const i=this.valueService.getValue(e.rowGroupColumn,e);e.groupData[t.getColId()]=i}})}clearDisplayIndex(e){e.clearRowTopAndRowIndex(),e.hasChildren()&&Vg._.exists(e.childStore)&&e.childStore.clearDisplayIndexes(),e.master&&e.detailNode&&e.detailNode.clearRowTopAndRowIndex()}setDisplayIndex(e,t,i){if(e.setRowIndex(t.next()),e.setRowTop(i.value),i.value+=e.rowHeight,!e.footer&&(e.master&&(e.expanded&&e.detailNode?(e.detailNode.setRowIndex(t.next()),e.detailNode.setRowTop(i.value),i.value+=e.detailNode.rowHeight):e.detailNode&&e.detailNode.clearRowTopAndRowIndex()),e.hasChildren()&&Vg._.exists(e.childStore))){const n=e.childStore;e.expanded?n.setDisplayIndexes(t,i):n.clearDisplayIndexes()}}binarySearchForDisplayIndex(e,t){let i=0,n=t.length-1;if(Vg._.missing(n)||Vg._.missing(i))console.warn(`AG Grid: error: topPointer = ${n}, bottomPointer = ${i}`);else for(;;){const s=Math.floor((i+n)/2),r=t[s];if(r.rowIndex===e)return r;const o=r.master&&r.expanded,a=r.detailNode;if(o&&a&&a.rowIndex===e)return r.detailNode;const l=r.childStore;if(r.expanded&&l&&l.isDisplayIndexInStore(e))return l.getRowUsingDisplayIndex(e);if(r.rowIndex<e)i=s+1;else{if(!(r.rowIndex>e))return void console.warn(`AG Grid: error: unable to locate rowIndex = ${e} in cache`);n=s-1}}}extractRowBounds(e,t){const i=e=>({rowHeight:e.rowHeight,rowTop:e.rowTop});if(e.rowIndex===t)return i(e);if(e.hasChildren()&&e.expanded&&Vg._.exists(e.childStore)){const i=e.childStore;if(i.isDisplayIndexInStore(t))return i.getRowBounds(t)}else if(e.master&&e.expanded&&Vg._.exists(e.detailNode)&&e.detailNode.rowIndex===t)return i(e.detailNode)}getIndexAtPixel(e,t){if(e.isPixelInRange(t))return e.rowIndex;const i=e.master&&e.expanded,n=e.detailNode;if(i&&n&&n.isPixelInRange(t))return e.detailNode.rowIndex;if(e.hasChildren()&&e.expanded&&Vg._.exists(e.childStore)){const i=e.childStore;if(i.isPixelInRange(t))return i.getRowIndexAtPixel(t)}return null}createNodeIdPrefix(e){const t=[];let i=e;for(;i&&i.level>=0;)""===i.key?t.push("ag-Grid-MissingKey"):t.push(i.key),i=i.parent;if(t.length>0)return t.reverse().join("-")}checkOpenByDefault(e){return this.expansionService.checkOpenByDefault(e)}};lf([(0,Vg.Autowired)("valueService")],mf.prototype,"valueService",2),lf([(0,Vg.Autowired)("columnModel")],mf.prototype,"columnModel",2),lf([(0,Vg.Autowired)("ssrmNodeManager")],mf.prototype,"nodeManager",2),lf([(0,Vg.Autowired)("beans")],mf.prototype,"beans",2),lf([(0,Vg.Autowired)("expansionService")],mf.prototype,"expansionService",2),mf=lf([(0,Vg.Bean)("ssrmBlockUtils")],mf);var vf=class{constructor(){this.rowNodes={}}addRowNode(e){const t=e.id;this.rowNodes[t]&&(console.warn(`AG Grid: Duplicate node id ${e.id}. Row ID's are provided via the getRowId() callback. Please modify the getRowId() callback code to provide unique row id values.`),console.warn("first instance",this.rowNodes[t].data),console.warn("second instance",e.data)),this.rowNodes[t]=e}removeNode(e){const t=e.id;this.rowNodes[t]&&(this.rowNodes[t]=void 0)}clear(){this.rowNodes={}}};lf([Bg.PreDestroy],vf.prototype,"clear",1),vf=lf([(0,Bg.Bean)("ssrmNodeManager")],vf);var yf=class extends Hg.BeanStub{constructor(){super(...arguments),this.asyncTransactions=[]}postConstruct(){this.gos.isRowModelType("serverSide")}applyTransactionAsync(e,t){null==this.asyncTransactionsTimeout&&this.scheduleExecuteAsync(),this.asyncTransactions.push({transaction:e,callback:t})}scheduleExecuteAsync(){const e=this.gos.getAsyncTransactionWaitMillis();this.asyncTransactionsTimeout=window.setTimeout(()=>{this.executeAsyncTransactions()},e)}executeAsyncTransactions(){if(!this.asyncTransactions)return;const e=[],t=[],i=[];let n=!1;if(this.asyncTransactions.forEach(s=>{let r;this.serverSideRowModel.executeOnStore(s.transaction.route,e=>{r=e.applyTransaction(s.transaction)})?null==r&&(r={status:Hg.ServerSideTransactionResultStatus.StoreNotFound}):r={status:Hg.ServerSideTransactionResultStatus.StoreNotStarted},t.push(r),r.status==Hg.ServerSideTransactionResultStatus.StoreLoading?i.push(s):(s.callback&&e.push(()=>s.callback(r)),r.status===Hg.ServerSideTransactionResultStatus.Applied&&(n=!0))}),e.length>0&&window.setTimeout(()=>{e.forEach(e=>e())},0),this.asyncTransactionsTimeout=void 0,this.asyncTransactions=i,n&&(this.valueCache.onDataChanged(),this.eventService.dispatchEvent({type:Hg.Events.EVENT_STORE_UPDATED})),t.length>0){const e={type:Hg.Events.EVENT_ASYNC_TRANSACTIONS_FLUSHED,results:t};this.eventService.dispatchEvent(e)}}flushAsyncTransactions(){null!=this.asyncTransactionsTimeout&&clearTimeout(this.asyncTransactionsTimeout),this.executeAsyncTransactions()}applyTransaction(e){let t;if(this.serverSideRowModel.executeOnStore(e.route,i=>{t=i.applyTransaction(e)})){if(t){if(this.valueCache.onDataChanged(),t.remove){const i=t.remove.map(e=>e.id);this.selectionService.deleteSelectionStateFromParent(e.route||[],i)}return this.eventService.dispatchEvent({type:Hg.Events.EVENT_STORE_UPDATED}),t}return{status:Hg.ServerSideTransactionResultStatus.StoreNotFound}}return{status:Hg.ServerSideTransactionResultStatus.StoreNotStarted}}};lf([(0,Hg.Autowired)("rowNodeBlockLoader")],yf.prototype,"rowNodeBlockLoader",2),lf([(0,Hg.Autowired)("valueCache")],yf.prototype,"valueCache",2),lf([(0,Hg.Autowired)("rowModel")],yf.prototype,"serverSideRowModel",2),lf([(0,Hg.Autowired)("rowRenderer")],yf.prototype,"rowRenderer",2),lf([(0,Hg.Autowired)("selectionService")],yf.prototype,"selectionService",2),lf([Hg.PostConstruct],yf.prototype,"postConstruct",1),yf=lf([(0,Hg.Bean)("ssrmTransactionManager")],yf);var Cf=class extends zg.BeanStub{postConstruct(){this.gos.isRowModelType("serverSide")&&this.addManagedListener(this.eventService,zg.Events.EVENT_ROW_GROUP_OPENED,this.onRowGroupOpened.bind(this))}onRowGroupOpened(e){const t=e.node;if(t.expanded){if(t.master)this.createDetailNode(t);else if(zg._.missing(t.childStore)){const e=this.serverSideRowModel.getParams();t.childStore=this.createBean(this.storeFactory.createStore(e,t))}}else this.gos.get("purgeClosedRowNodes")&&zg._.exists(t.childStore)&&(t.childStore=this.destroyBean(t.childStore));const i={type:zg.Events.EVENT_STORE_UPDATED};this.eventService.dispatchEvent(i)}createDetailNode(e){if(zg._.exists(e.detailNode))return e.detailNode;const t=new zg.RowNode(this.beans);t.detail=!0,t.selectable=!1,t.parent=e,zg._.exists(e.id)&&(t.id="detail_"+e.id),t.data=e.data,t.level=e.level+1;const i=this.gos.getRowHeightForNode(t).height;return t.rowHeight=i||200,e.detailNode=t,t}};lf([(0,zg.Autowired)("rowModel")],Cf.prototype,"serverSideRowModel",2),lf([(0,zg.Autowired)("ssrmStoreFactory")],Cf.prototype,"storeFactory",2),lf([(0,zg.Autowired)("beans")],Cf.prototype,"beans",2),lf([zg.PostConstruct],Cf.prototype,"postConstruct",1),Cf=lf([(0,zg.Bean)("ssrmExpandListener")],Cf);var bf=class extends Ug.BeanStub{postConstruct(){this.gos.isRowModelType("serverSide")&&this.addManagedListener(this.eventService,Ug.Events.EVENT_SORT_CHANGED,this.onSortChanged.bind(this))}onSortChanged(){const e=this.serverSideRowModel.getParams();if(!e)return;const t=this.sortController.getSortModel(),i=e.sortModel,n=this.findChangedColumnsInSort(t,i),s={valueColChanged:this.listenerUtils.isSortingWithValueColumn(n),secondaryColChanged:this.listenerUtils.isSortingWithSecondaryColumn(n),changedColumns:n};this.serverSideRowModel.refreshAfterSort(t,s)}findChangedColumnsInSort(e,t){let i=[];return[e,t].forEach(e=>{if(e){const t=e.map(e=>e.colId);i=i.concat(t)}}),i.filter(i=>{const n=t.find(e=>e.colId===i),s=e.find(e=>e.colId===i);return((e,t)=>(e?e.sort:null)!==(t?t.sort:null))(n,s)||((i,n)=>(i?t.indexOf(i):-1)!==(n?e.indexOf(n):-1))(n,s)})}};lf([(0,Ug.Autowired)("sortController")],bf.prototype,"sortController",2),lf([(0,Ug.Autowired)("rowModel")],bf.prototype,"serverSideRowModel",2),lf([(0,Ug.Autowired)("ssrmListenerUtils")],bf.prototype,"listenerUtils",2),lf([Ug.PostConstruct],bf.prototype,"postConstruct",1),bf=lf([(0,Ug.Bean)("ssrmSortService")],bf);var Sf=class extends Wg.BeanStub{postConstruct(){this.gos.isRowModelType("serverSide")&&(this.addManagedListener(this.eventService,Wg.Events.EVENT_ADVANCED_FILTER_ENABLED_CHANGED,()=>this.onFilterChanged(!0)),this.addManagedListener(this.eventService,Wg.Events.EVENT_FILTER_CHANGED,()=>this.onFilterChanged()))}onFilterChanged(e){const t=this.serverSideRowModel.getParams();if(!t)return;const i=t.filterModel;let n,s;if(this.filterManager.isAdvancedFilterEnabled()){n=this.filterManager.getAdvancedFilterModel();const t=e?Object.keys(null!=i?i:{}):this.getAdvancedFilterColumns(i),r=this.getAdvancedFilterColumns(n);t.forEach(e=>r.add(e)),s=Array.from(r)}else if(n=this.filterManager.getFilterModel(),e){const e=this.getAdvancedFilterColumns(i);Object.keys(n).forEach(t=>e.add(t)),s=Array.from(e)}else s=this.findChangedColumns(i,n);const r={valueColChanged:this.listenerUtils.isSortingWithValueColumn(s),secondaryColChanged:this.listenerUtils.isSortingWithSecondaryColumn(s),changedColumns:s};this.serverSideRowModel.refreshAfterFilter(n,r)}findChangedColumns(e,t){const i={};Object.keys(e).forEach(e=>i[e]=!0),Object.keys(t).forEach(e=>i[e]=!0);const n=[];return Object.keys(i).forEach(i=>{JSON.stringify(e[i])!=JSON.stringify(t[i])&&n.push(i)}),n}getAdvancedFilterColumns(e){const t=new Set;if(!e)return t;const i=e=>{"join"===e.filterType?e.conditions.forEach(e=>i(e)):t.add(e.colId)};return i(e),t}};lf([(0,Wg.Autowired)("rowModel")],Sf.prototype,"serverSideRowModel",2),lf([(0,Wg.Autowired)("filterManager")],Sf.prototype,"filterManager",2),lf([(0,Wg.Autowired)("ssrmListenerUtils")],Sf.prototype,"listenerUtils",2),lf([Wg.PostConstruct],Sf.prototype,"postConstruct",1),Sf=lf([(0,Wg.Bean)("ssrmFilterListener")],Sf);var wf=class{createStore(e,t){const i=this.getStoreParams(e,t);return new(i.suppressInfiniteScroll?cf:pf)(e,i,t)}getStoreParams(e,t){const i=this.getLevelSpecificParams(t),n=this.isInfiniteScroll(i);return{suppressInfiniteScroll:!n,cacheBlockSize:this.getBlockSize(n,i),maxBlocksInCache:this.getMaxBlocksInCache(n,e,i)}}getMaxBlocksInCache(e,t,i){if(!e)return;const n=i&&null!=i.maxBlocksInCache?i.maxBlocksInCache:this.gos.get("maxBlocksInCache");if(null!=n&&n>=0){if(t.dynamicRowHeight){const e="Server Side Row Model does not support Dynamic Row Height and Cache Purging. Either a) remove getRowHeight() callback or b) remove maxBlocksInCache property. Purging has been disabled.";return void jg._.warnOnce(e)}if(this.columnModel.isAutoRowHeightActive()){const e="Server Side Row Model does not support Auto Row Height and Cache Purging. Either a) remove colDef.autoHeight or b) remove maxBlocksInCache property. Purging has been disabled.";return void jg._.warnOnce(e)}return n}}getBlockSize(e,t){if(!e)return;const i=t&&null!=t.cacheBlockSize?t.cacheBlockSize:this.gos.get("cacheBlockSize");return null!=i&&i>0?i:100}getLevelSpecificParams(e){const t=this.gos.getCallback("getServerSideGroupLevelParams");if(t)return t({level:e.level+1,parentRowNode:e.level>=0?e:void 0,rowGroupColumns:this.columnModel.getRowGroupColumns(),pivotColumns:this.columnModel.getPivotColumns(),pivotMode:this.columnModel.isPivotMode()})}isInfiniteScroll(e){return!(e&&null!=e.suppressInfiniteScroll?e.suppressInfiniteScroll:this.isSuppressServerSideInfiniteScroll())}isSuppressServerSideInfiniteScroll(){return this.gos.get("suppressServerSideInfiniteScroll")}};lf([(0,jg.Autowired)("gridOptionsService")],wf.prototype,"gos",2),lf([(0,jg.Autowired)("columnModel")],wf.prototype,"columnModel",2),wf=lf([(0,jg.Bean)("ssrmStoreFactory")],wf);var xf=class{isSortingWithValueColumn(e){const t=this.columnModel.getValueColumns().map(e=>e.getColId());for(let i=0;i<e.length;i++)if(t.indexOf(e[i])>-1)return!0;return!1}isSortingWithSecondaryColumn(e){if(!this.columnModel.getSecondaryColumns())return!1;const t=this.columnModel.getSecondaryColumns().map(e=>e.getColId());for(let i=0;i<e.length;i++)if(t.indexOf(e[i])>-1)return!0;return!1}};lf([(0,Kg.Autowired)("columnModel")],xf.prototype,"columnModel",2),xf=lf([(0,Kg.Bean)("ssrmListenerUtils")],xf);var Ef=class extends Yg.BeanStub{constructor(){super(...arguments),this.selectedState={selectAll:!1,toggledNodes:new Set},this.lastSelected=null,this.selectAllUsed=!1,this.selectedNodes={}}init(){this.rowSelection=this.gos.get("rowSelection"),this.addManagedPropertyListener("rowSelection",e=>{this.rowSelection=e.currentValue})}getSelectedState(){return{selectAll:this.selectedState.selectAll,toggledNodes:[...this.selectedState.toggledNodes]}}setSelectedState(e){const t={selectAll:!1,toggledNodes:new Set};"object"==typeof e?"selectAll"in e&&"boolean"==typeof e.selectAll?(t.selectAll=e.selectAll,"toggledNodes"in e&&Array.isArray(e.toggledNodes)?(e.toggledNodes.forEach(e=>{"string"==typeof e?t.toggledNodes.add(e):console.warn(`AG Grid: Provided ids must be of string type. Invalid id provided: ${e}`)}),this.selectedState=t):console.error("AG Grid: `toggledNodes` must be an array of string ids.")):console.error("AG Grid: Select all status should be of boolean type."):console.error("AG Grid: The provided selection state should be an object.")}deleteSelectionStateFromParent(e,t){if(0===this.selectedState.toggledNodes.size)return!1;let i=!1;return t.forEach(e=>{this.selectedState.toggledNodes.delete(e)&&(i=!0)}),i}setNodesSelected(e){if(0===e.nodes.length)return 0;const t=e.clearSelection&&e.newValue&&!e.rangeSelect;if("multiple"!==this.rowSelection||t){if(e.nodes.length>1)throw new Error("AG Grid: cannot select multiple rows when rowSelection is set to 'single'");const t=e.nodes[0];return e.newValue?(this.selectedNodes={[t.id]:t},this.selectedState={selectAll:!1,toggledNodes:new Set([t.id])}):(this.selectedNodes={},this.selectedState={selectAll:!1,toggledNodes:new Set}),this.lastSelected=t.id,1}const i=t=>{e.newValue?this.selectedNodes[t.id]=t:delete this.selectedNodes[t.id];const i=t.selectable;e.newValue!==this.selectedState.selectAll&&i?this.selectedState.toggledNodes.add(t.id):this.selectedState.toggledNodes.delete(t.id)};if(e.rangeSelect&&this.lastSelected){if(e.nodes.length>1)throw new Error("AG Grid: cannot select multiple rows when using rangeSelect");const t=e.nodes[0],n=this.rowModel.getRowNode(this.lastSelected);return this.rowModel.getNodesInRangeForSelection(t,null!=n?n:null).forEach(i),this.lastSelected=t.id,1}return e.nodes.forEach(i),this.lastSelected=e.nodes[e.nodes.length-1].id,1}processNewRow(e){this.selectedNodes[e.id]&&(this.selectedNodes[e.id]=e)}isNodeSelected(e){const t=this.selectedState.toggledNodes.has(e.id);return this.selectedState.selectAll?!t:t}getSelectedNodes(){return this.selectAllUsed&&console.warn("AG Grid: getSelectedNodes and getSelectedRows functions cannot be used with select all functionality with the server-side row model.\n                Use `api.getServerSideSelectionState()` instead."),Object.values(this.selectedNodes)}getSelectedRows(){return this.getSelectedNodes().map(e=>e.data)}getSelectionCount(){return this.selectedState.selectAll?-1:this.selectedState.toggledNodes.size}clearOtherNodes(e,t){const i=this.selectedState.selectAll?1:this.selectedState.toggledNodes.size-1;this.selectedState={selectAll:!1,toggledNodes:new Set([e.id])},this.rowModel.forEachNode(i=>{i!==e&&i.selectThisNode(!1,void 0,t)});const n={type:Yg.Events.EVENT_SELECTION_CHANGED,source:t};return this.eventService.dispatchEvent(n),i}isEmpty(){var e;return!this.selectedState.selectAll&&!(null==(e=this.selectedState.toggledNodes)?void 0:e.size)}selectAllRowNodes(e){this.selectedState={selectAll:!0,toggledNodes:new Set},this.selectedNodes={},this.selectAllUsed=!0}deselectAllRowNodes(e){this.selectedState={selectAll:!1,toggledNodes:new Set},this.selectedNodes={}}getSelectAllState(e,t){return this.selectedState.selectAll?!(this.selectedState.toggledNodes.size>0)||null:this.selectedState.toggledNodes.size>0&&null}};lf([(0,Yg.Autowired)("rowModel")],Ef.prototype,"rowModel",2),lf([Yg.PostConstruct],Ef.prototype,"init",1);var Mf=class extends qg.BeanStub{constructor(){super(...arguments),this.selectedState={selectAllChildren:!1,toggledNodes:new Map},this.lastSelected=null}init(){this.addManagedListener(this.eventService,qg.Events.EVENT_MODEL_UPDATED,()=>this.removeRedundantState()),this.addManagedListener(this.eventService,qg.Events.EVENT_COLUMN_ROW_GROUP_CHANGED,()=>this.selectionService.reset("rowGroupChanged"))}getSelectedState(){const e=this.gos.get("treeData"),t=(i,n,s)=>{const r={nodeId:s};if((e||n<=this.columnModel.getRowGroupColumns().length)&&(r.selectAllChildren=i.selectAllChildren),i.toggledNodes.size){const e=[];i.toggledNodes.forEach((i,s)=>{const r=t(i,n+1,s);e.push(r)}),r.toggledNodes=e}return r};return t(this.selectedState,0)}setSelectedState(e){const t=(e,i)=>{var n,s;if("object"!=typeof e)throw new Error("AG Grid: Each provided state object must be an object.");if("selectAllChildren"in e&&"boolean"!=typeof e.selectAllChildren)throw new Error("AG Grid: `selectAllChildren` must be a boolean value or undefined.");if("toggledNodes"in e){if(!Array.isArray(e.toggledNodes))throw new Error("AG Grid: `toggledNodes` must be an array.");if(!e.toggledNodes.every(e=>"object"==typeof e&&"nodeId"in e&&"string"==typeof e.nodeId))throw new Error("AG Grid: Every `toggledNode` requires an associated string id.")}const r=null!=(n=e.selectAllChildren)?n:!i,o=null==(s=e.toggledNodes)?void 0:s.map(e=>[e.nodeId,t(e,r)]);if(null==o?void 0:o.some(([e,t])=>r===t.selectAllChildren&&0===t.toggledNodes.size))throw new Error("\n                    AG Grid: AG Grid: Row selection state could not be parsed due to invalid data. Ensure all child state has toggledNodes or does not conform with the parent rule.\n                    Please rebuild the selection state and reapply it.\n                ");return{selectAllChildren:r,toggledNodes:new Map(o)}};try{this.selectedState=t(e,!!e.selectAllChildren)}catch(e){console.error(e.message)}}deleteSelectionStateFromParent(e,t){let i=this.selectedState;const n=[...e];for(;i&&n.length;)i=i.toggledNodes.get(n.pop());if(!i)return!1;let s=!1;return t.forEach(e=>{(null==i?void 0:i.toggledNodes.delete(e))&&(s=!0)}),s&&this.removeRedundantState(),s}setNodesSelected(e){const t=e,{nodes:i}=t,n=af(t,["nodes"]);if(0===i.length)return 0;if(e.rangeSelect){if(i.length>1)throw new Error("AG Grid: cannot select multiple rows when using rangeSelect");const e=i[0],t=this.rowModel.getNodesInRangeForSelection(e,this.lastSelected).map(this.getRouteToNode).sort((e,t)=>t.length-e.length),s=new Set;return t.forEach(t=>{s.has(t[t.length-1])||(t.forEach(e=>s.add(e)),this.recursivelySelectNode(t,this.selectedState,of({node:e},n)))}),this.removeRedundantState(),this.lastSelected=e,1}return e.nodes.forEach(e=>{const t=this.getRouteToNode(e);var i;this.recursivelySelectNode(t,this.selectedState,(i=of({},n),Qg(i,ef({node:e}))))}),this.removeRedundantState(),this.lastSelected=e.nodes[e.nodes.length-1],1}isNodeSelected(e){const t=this.getRouteToNode(e);return this.isNodePathSelected(t,this.selectedState)}isNodePathSelected([e,...t],i){if(0===t.length){const t=i.toggledNodes.has(e.id);if(e.hasChildren()){const t=i.toggledNodes.get(e.id);if(t&&t.toggledNodes.size)return}return i.selectAllChildren?!t:t}if(i.toggledNodes.has(e.id)){const n=i.toggledNodes.get(e.id);if(n)return this.isNodePathSelected(t,n)}return!!i.selectAllChildren}getRouteToNode(e){const t=[];let i=e;for(;i.parent;)t.push(i),i=i.parent;return t.reverse()}removeRedundantState(){if(this.filterManager.isAnyFilterPresent())return;const e=(t=this.selectedState,i,n)=>{if(t.toggledNodes.forEach((i,n)=>{e(i,n,t)}),i){const e=this.rowModel.getRowNode(i),n=null==e?void 0:e.childStore;if((null==n?void 0:n.isLastRowIndexKnown())&&t.toggledNodes.size>=n.getRowCount()){for(const e of t.toggledNodes.entries()){const[t,i]=e;if(i.toggledNodes.size>0)return;if(!this.rowModel.getRowNode(t))return}t.selectAllChildren=!t.selectAllChildren,t.toggledNodes.clear()}}const s=0===t.toggledNodes.size,r=(null==n?void 0:n.selectAllChildren)===t.selectAllChildren;s&&r&&(null==n||n.toggledNodes.delete(i))};e()}recursivelySelectNode([e,...t],i,n){if(!e)return;if(!t.length){const t=e.selectable;if(i.selectAllChildren===n.newValue||!t)return void i.toggledNodes.delete(e.id);const s={selectAllChildren:n.newValue,toggledNodes:new Map};return void i.toggledNodes.set(e.id,s)}const s=i.toggledNodes.has(e.id),r=s?i.toggledNodes.get(e.id):{selectAllChildren:i.selectAllChildren,toggledNodes:new Map};s||i.toggledNodes.set(e.id,r),this.recursivelySelectNode(t,r,n),i.selectAllChildren===r.selectAllChildren&&0===r.toggledNodes.size&&i.toggledNodes.delete(e.id)}getSelectedNodes(){console.warn("AG Grid: `getSelectedNodes` and `getSelectedRows` functions cannot be used with `groupSelectsChildren` and the server-side row model.\n            Use `api.getServerSideSelectionState()` instead.");const e=[];return this.rowModel.forEachNode(t=>{t.isSelected()&&e.push(t)}),e}processNewRow(e){}getSelectedRows(){return this.getSelectedNodes().map(e=>e.data)}getSelectionCount(){return-1}isEmpty(){var e;return!this.selectedState.selectAllChildren&&!(null==(e=this.selectedState.toggledNodes)?void 0:e.size)}selectAllRowNodes(e){this.selectedState={selectAllChildren:!0,toggledNodes:new Map}}deselectAllRowNodes(e){this.selectedState={selectAllChildren:!1,toggledNodes:new Map}}getSelectAllState(e,t){return this.selectedState.selectAllChildren?!(this.selectedState.toggledNodes.size>0)||null:this.selectedState.toggledNodes.size>0&&null}};lf([(0,qg.Autowired)("rowModel")],Mf.prototype,"rowModel",2),lf([(0,qg.Autowired)("columnModel")],Mf.prototype,"columnModel",2),lf([(0,qg.Autowired)("filterManager")],Mf.prototype,"filterManager",2),lf([(0,qg.Autowired)("rowModel")],Mf.prototype,"serverSideRowModel",2),lf([(0,qg.Autowired)("selectionService")],Mf.prototype,"selectionService",2),lf([qg.PostConstruct],Mf.prototype,"init",1);var Af=class extends $g.BeanStub{init(){const e=this.gos.get("groupSelectsChildren");this.addManagedPropertyListener("groupSelectsChildren",e=>{this.destroyBean(this.selectionStrategy);const t=e.currentValue?Mf:Ef;this.selectionStrategy=this.createManagedBean(new t),this.shotgunResetNodeSelectionState();const i={type:$g.Events.EVENT_SELECTION_CHANGED,source:"api"};this.eventService.dispatchEvent(i)}),this.addManagedPropertyListener("rowSelection",()=>this.deselectAllRowNodes({source:"api"}));const t=e?Mf:Ef;this.selectionStrategy=this.createManagedBean(new t)}getSelectionState(){return this.selectionStrategy.getSelectedState()}setSelectionState(e,t){if(Array.isArray(e))return;this.selectionStrategy.setSelectedState(e),this.shotgunResetNodeSelectionState();const i={type:$g.Events.EVENT_SELECTION_CHANGED,source:t};this.eventService.dispatchEvent(i)}setNodesSelected(e){const t=e,{nodes:i}=t,n=af(t,["nodes"]),s=this.gos.get("rowSelection");if(i.length>1&&"multiple"!==s)return console.warn("AG Grid: cannot multi select while rowSelection='single'"),0;if(i.length>1&&e.rangeSelect)return console.warn("AG Grid: cannot use range selection when multi selecting rows"),0;const r=of({nodes:i.filter(e=>e.selectable)},n);if(!r.nodes.length)return 0;const o=this.selectionStrategy.setNodesSelected(r);this.shotgunResetNodeSelectionState(r.source);const a={type:$g.Events.EVENT_SELECTION_CHANGED,source:r.source};return this.eventService.dispatchEvent(a),o}deleteSelectionStateFromParent(e,t){if(!this.selectionStrategy.deleteSelectionStateFromParent(e,t))return;this.shotgunResetNodeSelectionState();const i={type:$g.Events.EVENT_SELECTION_CHANGED,source:"api"};this.eventService.dispatchEvent(i)}shotgunResetNodeSelectionState(e){this.rowModel.forEachNode(t=>{if(t.stub)return;const i=this.selectionStrategy.isNodeSelected(t);i!==t.isSelected()&&t.selectThisNode(i,void 0,e)})}getSelectedNodes(){return this.selectionStrategy.getSelectedNodes()}getSelectedRows(){return this.selectionStrategy.getSelectedRows()}getSelectionCount(){return this.selectionStrategy.getSelectionCount()}syncInRowNode(e,t){this.selectionStrategy.processNewRow(e);const i=this.selectionStrategy.isNodeSelected(e);if(0!=i&&!e.selectable){this.selectionStrategy.setNodesSelected({nodes:[e],newValue:!1,source:"api"}),this.shotgunResetNodeSelectionState();const t={type:$g.Events.EVENT_SELECTION_CHANGED,source:"api"};return void this.eventService.dispatchEvent(t)}e.setSelectedInitialValue(i)}reset(){this.selectionStrategy.deselectAllRowNodes({source:"api"})}isEmpty(){return this.selectionStrategy.isEmpty()}hasNodesToSelect(e=!1,t=!1){return!0}selectAllRowNodes(e){(e.justCurrentPage||e.justFiltered)&&console.warn("AG Grid: selecting just filtered only works when gridOptions.rowModelType='clientSide'"),this.selectionStrategy.selectAllRowNodes(e),this.rowModel.forEachNode(t=>{t.stub||t.selectThisNode(!0,void 0,e.source)});const t={type:$g.Events.EVENT_SELECTION_CHANGED,source:e.source};this.eventService.dispatchEvent(t)}deselectAllRowNodes(e){(e.justCurrentPage||e.justFiltered)&&console.warn("AG Grid: selecting just filtered only works when gridOptions.rowModelType='clientSide'"),this.selectionStrategy.deselectAllRowNodes(e),this.rowModel.forEachNode(t=>{t.stub||t.selectThisNode(!1,void 0,e.source)});const t={type:$g.Events.EVENT_SELECTION_CHANGED,source:e.source};this.eventService.dispatchEvent(t)}getSelectAllState(e,t){return this.selectionStrategy.getSelectAllState(e,t)}updateGroupsFromChildrenSelections(e,t){return!1}getBestCostNodeSelection(){console.warn("AG Grid: calling gridApi.getBestCostNodeSelection() is only possible when using rowModelType=`clientSide`.")}filterFromSelection(){}};lf([(0,$g.Autowired)("rowModel")],Af.prototype,"rowModel",2),lf([$g.PostConstruct],Af.prototype,"init",1),Af=lf([(0,$g.Bean)("selectionService")],Af);var Tf=class extends Xg.ExpansionService{constructor(){super(...arguments),this.queuedRowIds=new Set}postConstruct(){super.postConstruct(),this.addManagedListener(this.eventService,Xg.Events.EVENT_COLUMN_ROW_GROUP_CHANGED,()=>{this.queuedRowIds.clear()})}checkOpenByDefault(e){if(!e.isExpandable())return;if(this.queuedRowIds.has(e.id))return this.queuedRowIds.delete(e.id),void e.setExpanded(!0);const t=this.gos.getCallback("isServerSideGroupOpenByDefault");t&&t({data:e.data,rowNode:e})&&e.setExpanded(!0)}expandRows(e){e.forEach(e=>{const t=this.serverSideRowModel.getRowNode(e);t?t.setExpanded(!0):this.queuedRowIds.add(e)})}expandAll(e){this.serverSideRowModel.expandAll(e)}onGroupExpandedOrCollapsed(){}};lf([(0,Xg.Autowired)("rowModel")],Tf.prototype,"serverSideRowModel",2),Tf=lf([(0,Xg.Bean)("expansionService")],Tf);var Df={version:"31.3.4",moduleName:kg.ModuleNames.ServerSideRowModelModule,rowModel:"serverSide",beans:[gf,Cf,bf,ff,mf,vf,yf,Sf,wf,xf,Af,Tf,df],dependantModules:[D]},If=i(98092),Rf=i(98092),Lf=i(98092),kf=i(98092),Pf=i(98092),Nf=i(98092),Of=i(98092),_f=Object.defineProperty,Ff=Object.getOwnPropertyDescriptor,Gf=(e,t,i,n)=>{for(var s,r=n>1?void 0:n?Ff(t,i):t,o=e.length-1;o>=0;o--)(s=e[o])&&(r=(n?s(t,i,r):s(r))||r);return n&&r&&_f(t,i,r),r},Vf=class{constructor(e,t,i,n,s,r,o,a,l,c,h){this.rowModel=e,this.filterParams=t,this.createKey=i,this.caseFormat=n,this.columnModel=s,this.valueService=r,this.treeDataOrGrouping=o,this.treeData=a,this.getDataPath=l,this.groupAllowUnbalanced=c,this.addManagedListener=h}extractUniqueValuesAsync(e,t){return new kf.AgPromise(i=>{if(this.rowModel.isRowDataLoaded())i(this.extractUniqueValues(e,t));else{const n=this.addManagedListener(kf.Events.EVENT_ROW_COUNT_READY,()=>{null==n||n(),i(this.extractUniqueValues(e,t))})}})}extractUniqueValues(e,t){const i=new Map,n=this.extractExistingFormattedKeys(t),s=new Set,r=this.treeData&&!!this.getDataPath,o=this.columnModel.getRowGroupColumns(),a=(e,r)=>{const o=this.caseFormat(e);if(!s.has(o)){s.add(o);let a=e,l=kf._.makeNull(r);const c=null==n?void 0:n.get(o);null!=c&&(a=c,l=t.get(c)),i.set(a,l)}};return this.rowModel.forEachLeafNode(t=>{if(!t.data||!e(t))return;if(this.treeDataOrGrouping)return void this.addValueForTreeDataOrGrouping(t,r,o,a);let i=this.getValue(t);this.filterParams.convertValuesToStrings?this.addValueForConvertValuesToString(t,i,a):null!=i&&Array.isArray(i)?(i.forEach(e=>{a(this.createKey(e,t),e)}),0===i.length&&a(null,null)):a(this.createKey(i,t),i)}),i}addValueForConvertValuesToString(e,t,i){const n=this.createKey(t,e);null!=n&&Array.isArray(n)?(n.forEach(e=>{const t=kf._.toStringOrNull(kf._.makeNull(e));i(t,t)}),0===n.length&&i(null,null)):i(n,n)}addValueForTreeDataOrGrouping(e,t,i,n){var s;let r;if(t){if(null==(s=e.childrenAfterGroup)?void 0:s.length)return;r=this.getDataPath(e.data)}else r=i.map(t=>this.valueService.getKeyForNode(t,e)),r.push(this.getValue(e));r&&(r=r.map(e=>kf._.toStringOrNull(kf._.makeNull(e)))),!t&&this.groupAllowUnbalanced&&(null==r?void 0:r.some(e=>null==e))&&(r=r.filter(e=>null!=e)),n(this.createKey(r),r)}getValue(e){return this.filterParams.getValue(e)}extractExistingFormattedKeys(e){if(!e)return null;const t=new Map;return e.forEach((e,i)=>{t.set(this.caseFormat(i),i)}),t}},Bf=class{};Bf.SELECT_ALL="__AG_SELECT_ALL__",Bf.ADD_SELECTION_TO_FILTER="__AG_ADD_SELECTION_TO_FILTER__";var Hf=class{constructor(e,t,i,n){this.valueService=e,this.valueFormatter=t,this.formatter=i,this.column=n,this.displayedKeys=[]}updateDisplayedValuesToAllAvailable(e,t,i){this.displayedKeys=Array.from(i)}updateDisplayedValuesToMatchMiniFilter(e,t,i,n,s){this.displayedKeys=[];for(let t of i)if(null==t)s&&this.displayedKeys.push(t);else{const i=e(t),s=this.valueService.formatValue(this.column,null,i,this.valueFormatter,!1);n(this.formatter(s))&&this.displayedKeys.push(t)}}getDisplayedValueCount(){return this.displayedKeys.length}getDisplayedItem(e){return this.displayedKeys[e]}getSelectAllItem(){return Bf.SELECT_ALL}getAddSelectionToFilterItem(){return Bf.ADD_SELECTION_TO_FILTER}getDisplayedKeys(){return this.displayedKeys}forEachDisplayedKey(e){this.displayedKeys.forEach(e)}someDisplayedKey(e){return this.displayedKeys.some(e)}hasGroups(){return!1}refresh(){}},zf=class e{constructor(e,t,i,n){this.formatter=e,this.treeListPathGetter=t,this.treeListFormatter=i,this.treeDataOrGrouping=n,this.allDisplayedItemsTree=[],this.activeDisplayedItemsFlat=[],this.selectAllItem={depth:0,filterPasses:!0,available:!0,treeKey:Bf.SELECT_ALL,children:this.allDisplayedItemsTree,expanded:!0,key:Bf.SELECT_ALL,parentTreeKeys:[]},this.addSelectionToFilterItem={depth:0,filterPasses:!0,available:!0,treeKey:Bf.ADD_SELECTION_TO_FILTER,expanded:!0,key:Bf.ADD_SELECTION_TO_FILTER,parentTreeKeys:[]}}updateDisplayedValuesToAllAvailable(e,t,i,n){"reload"===n?this.generateItemTree(e,t,i):"otherFilter"===n?(this.updateAvailable(i),this.updateExpandAll()):"miniFilter"===n&&(this.resetFilter(),this.updateExpandAll()),this.flattenItems()}updateDisplayedValuesToMatchMiniFilter(e,t,i,n,s,r){"reload"===r?this.generateItemTree(e,t,i):"otherFilter"===r&&this.updateAvailable(i),this.updateFilter(n,s),this.updateExpandAll(),this.flattenItems()}generateItemTree(e,t,i){var n;this.allDisplayedItemsTree=[],this.groupsExist=!1;const s=this.getTreeListPathGetter(e,i);for(let r of t){const t=null!=(n=s(e(r)))?n:[null];t.length>1&&(this.groupsExist=!0);const o=i.has(r);let a,l=this.allDisplayedItemsTree,c=[];t.forEach((e,i)=>{l||(l=[],a.children=l),a=l.find(t=>{var i;return(null==(i=t.treeKey)?void 0:i.toUpperCase())===(null==e?void 0:e.toUpperCase())}),a||(a={treeKey:e,depth:i,filterPasses:!0,expanded:!1,available:o,parentTreeKeys:c},i===t.length-1&&(a.key=r),l.push(a)),l=a.children,c=[...c,e]})}this.updateAvailable(i),this.selectAllItem.children=this.allDisplayedItemsTree,this.selectAllItem.expanded=!1}getTreeListPathGetter(t,i){if(this.treeListPathGetter)return this.treeListPathGetter;if(this.treeDataOrGrouping)return e=>e;let n=!1;for(const e of i){const i=t(e);if(i instanceof Date){n=!0;break}if(null!=i)break}return n?e.DATE_TREE_LIST_PATH_GETTER:(Pf._.warnOnce("property treeList=true for Set Filter params, but you did not provide a treeListPathGetter or values of type Date."),e=>[String(e)])}flattenItems(){this.activeDisplayedItemsFlat=[];const e=t=>{t.forEach(t=>{t.filterPasses&&t.available&&(this.activeDisplayedItemsFlat.push(t),t.children&&t.expanded&&e(t.children))})};e(this.allDisplayedItemsTree)}resetFilter(){const e=t=>{t.children&&t.children.forEach(t=>{e(t)}),t.filterPasses=!0};this.allDisplayedItemsTree.forEach(t=>e(t))}updateFilter(e,t){const i=i=>!!i.available&&(null==i.treeKey?t:e(this.formatter(this.treeListFormatter?this.treeListFormatter(i.treeKey,i.depth,i.parentTreeKeys):i.treeKey)));this.allDisplayedItemsTree.forEach(e=>this.recursiveItemCheck(e,!1,i,"filterPasses"))}getDisplayedValueCount(){return this.activeDisplayedItemsFlat.length}getDisplayedItem(e){return this.activeDisplayedItemsFlat[e]}getSelectAllItem(){return this.selectAllItem}getAddSelectionToFilterItem(){return this.addSelectionToFilterItem}getDisplayedKeys(){const e=[];return this.forEachDisplayedKey(t=>e.push(t)),e}forEachDisplayedKey(e){const t=(i,n)=>{i.children?i.expanded&&n||i.children.forEach(e=>{e.filterPasses&&t(e,!1)}):e(i.key)};this.activeDisplayedItemsFlat.forEach(e=>t(e,!0))}someDisplayedKey(e){const t=(i,n)=>i.children?(!i.expanded||!n)&&i.children.some(e=>!!e.filterPasses&&t(e,!1)):e(i.key);return this.activeDisplayedItemsFlat.some(e=>t(e,!0))}hasGroups(){return this.groupsExist}refresh(){this.updateExpandAll(),this.flattenItems()}updateExpandAll(){const e=(t,i,n)=>{for(const s of t){if(!s.filterPasses||!s.available||!s.children)continue;if(i=i||!!s.expanded,n=n||!s.expanded,i&&n)return;const t=e(s.children,i,n);if(void 0===t)return;t?i=!0:n=!0}return i&&n?void 0:i},t=this.getSelectAllItem();t.expanded=e(t.children,!1,!1)}recursiveItemCheck(e,t,i,n){let s=!1;e.children&&e.children.forEach(r=>{const o=this.recursiveItemCheck(r,t||i(e),i,n);s=s||o});const r=t||s||i(e);return e[n]=r,r}updateAvailable(e){const t=t=>e.has(t.key);this.allDisplayedItemsTree.forEach(e=>this.recursiveItemCheck(e,!1,t,"available"))}};zf.DATE_TREE_LIST_PATH_GETTER=e=>e?[String(e.getFullYear()),String(e.getMonth()+1),String(e.getDate())]:null;var Uf=zf,Wf=class{constructor({caseFormat:e}){this.filteringKeys=null,this.filteringKeysCaseFormatted=null,this.hasNoAppliedFilteringKeys=!1,this.caseFormat=e}allFilteringKeys(){return this.filteringKeys}allFilteringKeysCaseFormatted(){return this.filteringKeysCaseFormatted}noAppliedFilteringKeys(){return this.hasNoAppliedFilteringKeys}setFilteringKeys(e){this.filteringKeys=new Set(e),this.hasNoAppliedFilteringKeys=!this.filteringKeys||0===this.filteringKeys.size,this.filteringKeysCaseFormatted=new Set,this.filteringKeys.forEach(e=>this.filteringKeysCaseFormatted.add(this.caseFormat(e)))}addFilteringKey(e){null==this.filteringKeys&&(this.filteringKeys=new Set,this.filteringKeysCaseFormatted=new Set),this.filteringKeys.add(e),this.filteringKeysCaseFormatted.add(this.caseFormat(e)),this.hasNoAppliedFilteringKeys&&(this.hasNoAppliedFilteringKeys=!1)}hasCaseFormattedFilteringKey(e){return this.filteringKeysCaseFormatted.has(this.caseFormat(e))}hasFilteringKey(e){return this.filteringKeys.has(e)}reset(){this.filteringKeys=null,this.filteringKeysCaseFormatted=null,this.hasNoAppliedFilteringKeys=!1}},jf=class e{constructor(e){this.localEventService=new Lf.EventService,this.miniFilterText=null,this.addCurrentSelectionToFilter=!1,this.providedValues=null,this.allValues=new Map,this.availableKeys=new Set,this.selectedKeys=new Set,this.initialised=!1;const{usingComplexObjects:t,columnModel:i,valueService:n,treeDataTreeList:s,groupingTreeList:r,filterParams:o,gos:a,valueFormatter:l,addManagedListener:c}=e,{column:h,colDef:d,textFormatter:u,doesRowPassOtherFilter:p,suppressSorting:g,comparator:f,rowModel:m,values:v,caseSensitive:y,convertValuesToStrings:C,treeList:b,treeListPathGetter:S,treeListFormatter:w}=o;this.filterParams=o,this.gos=a,this.setIsLoading=e.setIsLoading,this.translate=e.translate,this.caseFormat=e.caseFormat,this.createKey=e.createKey,this.usingComplexObjects=!!e.usingComplexObjects,this.formatter=u||Lf.TextFilter.DEFAULT_FORMATTER,this.doesRowPassOtherFilters=p,this.suppressSorting=g||!1,this.convertValuesToStrings=!!C,this.filteringKeys=new Wf({caseFormat:this.caseFormat});const x=null!=f?f:d.comparator,E=!!s||!!r;this.compareByValue=!!(t&&x||E||b&&!S),this.entryComparator=E&&!x?this.createTreeDataOrGroupingComparator():!b||S||x?([e,t],[i,n])=>x(t,n):([e,t],[i,n])=>Lf._.defaultComparator(t,n),this.keyComparator=null!=x?x:Lf._.defaultComparator,this.caseSensitive=!!y;const M=a.get("getDataPath"),A=a.get("groupAllowUnbalanced");"clientSide"===m.getType()&&(this.clientSideValuesExtractor=new Vf(m,this.filterParams,this.createKey,this.caseFormat,i,n,E,!!s,M,A,c)),null==v?this.valuesType=2:(this.valuesType=Array.isArray(v)?0:1,this.providedValues=v),this.displayValueModel=b?new Uf(this.formatter,S,w,s||r):new Hf(n,l,this.formatter,h),this.updateAllValues().then(e=>this.resetSelectionState(e||[]))}addEventListener(e,t,i){this.localEventService.addEventListener(e,t,i)}removeEventListener(e,t,i){this.localEventService.removeEventListener(e,t,i)}updateOnParamsChange(e){return new Lf.AgPromise(t=>{const{values:i,textFormatter:n,suppressSorting:s}=e,r=this.providedValues,o=this.suppressSorting;if(this.filterParams=e,this.formatter=n||Lf.TextFilter.DEFAULT_FORMATTER,this.suppressSorting=s||!1,this.providedValues=null!=i?i:null,this.providedValues!==r||this.suppressSorting!==o){i&&0!==i.length?this.valuesType=Array.isArray(i)?0:1:(this.valuesType=2,this.providedValues=null);const e=this.getModel();this.updateAllValues().then(i=>{this.setModel(e).then(()=>t())})}else t()})}refreshValues(){return new Lf.AgPromise(e=>{this.allValuesPromise.then(()=>{const t=this.getModel();this.updateAllValues(),this.setModel(t).then(()=>e())})})}overrideValues(e){return new Lf.AgPromise(t=>{this.allValuesPromise.then(()=>{this.valuesType=0,this.providedValues=e,this.refreshValues().then(()=>t())})})}refreshAfterAnyFilterChanged(){return this.showAvailableOnly()?this.allValuesPromise.then(e=>(this.updateAvailableKeys(null!=e?e:[],"otherFilter"),!0)):Lf.AgPromise.resolve(!1)}isInitialised(){return this.initialised}updateAllValues(){return this.allValuesPromise=new Lf.AgPromise(e=>{switch(this.valuesType){case 2:this.getValuesFromRowsAsync(!1).then(t=>e(this.processAllValues(t)));break;case 0:e(this.processAllValues(this.uniqueValues(this.validateProvidedValues(this.providedValues))));break;case 1:{this.setIsLoading(!0);const t=this.providedValues,{column:i,colDef:n}=this.filterParams,s=this.gos.addGridCommonParams({success:t=>{this.setIsLoading(!1),e(this.processAllValues(this.uniqueValues(this.validateProvidedValues(t))))},colDef:n,column:i});window.setTimeout(()=>t(s),0);break}default:throw new Error("Unrecognised valuesType")}}),this.allValuesPromise.then(e=>this.updateAvailableKeys(e||[],"reload")).then(()=>this.initialised=!0),this.allValuesPromise}processAllValues(e){const t=this.sortKeys(e);return this.allValues=null!=e?e:new Map,t}validateProvidedValues(e){if(this.usingComplexObjects&&(null==e?void 0:e.length)){const t=e[0];t&&"object"!=typeof t&&"function"!=typeof t&&(null==this.createKey(t)?Lf._.warnOnce("Set Filter Key Creator is returning null for provided values and provided values are primitives. Please provide complex objects or set convertValuesToStrings=true in the filterParams. See https://www.ag-grid.com/javascript-data-grid/filter-set-filter-list/#filter-value-types"):Lf._.warnOnce("Set Filter has a Key Creator, but provided values are primitives. Did you mean to provide complex objects or enable convertValuesToStrings?"))}return e}setValuesType(e){this.valuesType=e}getValuesType(){return this.valuesType}isKeyAvailable(e){return this.availableKeys.has(e)}showAvailableOnly(){return 2===this.valuesType}updateAvailableKeys(t,i){const n=this.showAvailableOnly()?this.sortKeys(this.getValuesFromRows(!0)):t;this.availableKeys=new Set(n),this.localEventService.dispatchEvent({type:e.EVENT_AVAILABLE_VALUES_CHANGED}),this.updateDisplayedValues(i,t)}sortKeys(e){const t=null!=e?e:new Map;if(this.suppressSorting)return Array.from(t.keys());let i;return i=this.compareByValue?Array.from(t.entries()).sort(this.entryComparator).map(([e])=>e):Array.from(t.keys()).sort(this.keyComparator),this.filterParams.excelMode&&t.has(null)&&(i=i.filter(e=>null!=e),i.push(null)),i}getParamsForValuesFromRows(e=!1){return this.clientSideValuesExtractor?{predicate:t=>!e||this.doesRowPassOtherFilters(t),existingValues:e&&!this.caseSensitive?this.allValues:void 0}:(Lf._.doOnce(()=>{console.error("AG Grid: Set Filter cannot initialise because you are using a row model that does not contain all rows in the browser. Either use a different filter type, or configure Set Filter such that you provide it with values")},"setFilterValueNotCSRM"),null)}getValuesFromRows(e=!1){const t=this.getParamsForValuesFromRows(e);return t?this.clientSideValuesExtractor.extractUniqueValues(t.predicate,t.existingValues):null}getValuesFromRowsAsync(e=!1){const t=this.getParamsForValuesFromRows(e);return t?this.clientSideValuesExtractor.extractUniqueValuesAsync(t.predicate,t.existingValues):Lf.AgPromise.resolve(null)}setMiniFilter(e){return e=Lf._.makeNull(e),this.miniFilterText!==e&&(null===e&&this.setAddCurrentSelectionToFilter(!1),this.miniFilterText=e,this.updateDisplayedValues("miniFilter"),!0)}getMiniFilter(){return this.miniFilterText}updateDisplayedValues(e,t){if("expansion"===e)return void this.displayValueModel.refresh();if(null==this.miniFilterText)return void this.displayValueModel.updateDisplayedValuesToAllAvailable(e=>this.getValue(e),t,this.availableKeys,e);const i=this.caseFormat(this.formatter(this.miniFilterText)||""),n=e=>null!=e&&this.caseFormat(e).indexOf(i)>=0,s=!!this.filterParams.excelMode&&n(this.translate("blanks"));this.displayValueModel.updateDisplayedValuesToMatchMiniFilter(e=>this.getValue(e),t,this.availableKeys,n,s,e)}getDisplayedValueCount(){return this.displayValueModel.getDisplayedValueCount()}getDisplayedItem(e){return this.displayValueModel.getDisplayedItem(e)}getSelectAllItem(){return this.displayValueModel.getSelectAllItem()}getAddSelectionToFilterItem(){return this.displayValueModel.getAddSelectionToFilterItem()}hasSelections(){return this.filterParams.defaultToNothingSelected?this.selectedKeys.size>0:this.allValues.size!==this.selectedKeys.size}getKeys(){return Array.from(this.allValues.keys())}getValues(){return Array.from(this.allValues.values())}getValue(e){return this.allValues.get(e)}setAddCurrentSelectionToFilter(e){this.addCurrentSelectionToFilter=e}isInWindowsExcelMode(){return"windows"===this.filterParams.excelMode}isAddCurrentSelectionToFilterChecked(){return this.isInWindowsExcelMode()&&this.addCurrentSelectionToFilter}showAddCurrentSelectionToFilter(){return this.isInWindowsExcelMode()&&Lf._.exists(this.miniFilterText)&&this.miniFilterText.length>0}selectAllMatchingMiniFilter(e=!1){null==this.miniFilterText?this.selectedKeys=new Set(this.allValues.keys()):(e&&this.selectedKeys.clear(),this.displayValueModel.forEachDisplayedKey(e=>this.selectedKeys.add(e)))}deselectAllMatchingMiniFilter(){null==this.miniFilterText?this.selectedKeys.clear():this.displayValueModel.forEachDisplayedKey(e=>this.selectedKeys.delete(e))}selectKey(e){this.selectedKeys.add(e)}deselectKey(e){this.filterParams.excelMode&&this.isEverythingVisibleSelected()&&this.resetSelectionState(this.displayValueModel.getDisplayedKeys()),this.selectedKeys.delete(e)}isKeySelected(e){return this.selectedKeys.has(e)}isEverythingVisibleSelected(){return!this.displayValueModel.someDisplayedKey(e=>!this.isKeySelected(e))}isNothingVisibleSelected(){return!this.displayValueModel.someDisplayedKey(e=>this.isKeySelected(e))}getModel(){if(!this.hasSelections())return null;const e=this.isAddCurrentSelectionToFilterChecked()?this.filteringKeys.allFilteringKeys():null;if(e&&e.size>0){if(this.selectedKeys){const t=new Set([...Array.from(e),...Array.from(this.selectedKeys).filter(t=>!e.has(t))]);return Array.from(t)}return Array.from(e)}return Array.from(this.selectedKeys)}setModel(e){return this.allValuesPromise.then(t=>{if(null==e)this.resetSelectionState(null!=t?t:[]);else{this.selectedKeys.clear();const t=new Map;this.allValues.forEach((e,i)=>{t.set(this.caseFormat(i),i)}),e.forEach(e=>{const i=this.caseFormat(Lf._.makeNull(e)),n=t.get(i);void 0!==n&&this.selectKey(n)})}})}uniqueValues(e){const t=new Map,i=new Set;return(null!=e?e:[]).forEach(e=>{const n=Lf._.makeNull(e),s=this.convertAndGetKey(n),r=this.caseFormat(s);i.has(r)||(i.add(r),t.set(s,n))}),t}convertAndGetKey(e){return this.convertValuesToStrings?e:this.createKey(e)}resetSelectionState(e){this.filterParams.defaultToNothingSelected?this.selectedKeys.clear():this.selectedKeys=new Set(e)}hasGroups(){return this.displayValueModel.hasGroups()}createTreeDataOrGroupingComparator(){return([e,t],[i,n])=>{if(null==t)return null==n?0:-1;if(null==n)return 1;for(let e=0;e<t.length;e++){if(e>=n.length)return 1;const i=Lf._.defaultComparator(t[e],n[e]);if(0!==i)return i}return 0}}setAppliedModelKeys(e){this.filteringKeys.setFilteringKeys(e)}addToAppliedModelKeys(e){this.filteringKeys.addFilteringKey(e)}getAppliedModelKeys(){return this.filteringKeys.allFilteringKeys()}getCaseFormattedAppliedModelKeys(){return this.filteringKeys.allFilteringKeysCaseFormatted()}hasAppliedModelKey(e){return this.filteringKeys.hasCaseFormattedFilteringKey(e)}hasAnyAppliedModelKey(){return!this.filteringKeys.noAppliedFilteringKeys()}};jf.EVENT_AVAILABLE_VALUES_CHANGED="availableValuesChanged";var Kf=jf,$f=class e extends Nf.Component{constructor(t){var i;super(t.isGroup?e.GROUP_TEMPLATE:e.TEMPLATE),this.focusWrapper=t.focusWrapper,this.value=t.value,this.params=t.params,this.translate=t.translate,this.valueFormatter=t.valueFormatter,this.item=t.item,this.isSelected=t.isSelected,this.isTree=t.isTree,this.depth=null!=(i=t.depth)?i:0,this.isGroup=t.isGroup,this.groupsExist=t.groupsExist,this.isExpanded=t.isExpanded,this.hasIndeterminateExpandState=t.hasIndeterminateExpandState}init(){this.addDestroyFunc(()=>{var e;return null==(e=this.destroyCellRendererComponent)?void 0:e.call(this)}),this.render(),this.eCheckbox.setLabelEllipsis(!0).setValue(this.isSelected,!0).setDisabled(!!this.params.readOnly).getInputElement().setAttribute("tabindex","-1"),this.refreshVariableAriaLabels(),this.isTree&&(this.depth>0&&this.addCssClass("ag-set-filter-indent-"+this.depth),this.isGroup?this.setupExpansion():this.groupsExist&&this.addCssClass("ag-set-filter-add-group-indent"),Nf._.setAriaLevel(this.getAriaElement(),this.depth+1)),this.refreshAriaChecked(),this.params.readOnly||this.eCheckbox.onValueChange(e=>this.onCheckboxChanged(!!e))}getFocusableElement(){return this.focusWrapper}setupExpansion(){this.eGroupClosedIcon.appendChild(Nf._.createIcon("setFilterGroupClosed",this.gos,null)),this.eGroupOpenedIcon.appendChild(Nf._.createIcon("setFilterGroupOpen",this.gos,null)),this.addManagedListener(this.eGroupClosedIcon,"click",this.onExpandOrContractClicked.bind(this)),this.addManagedListener(this.eGroupOpenedIcon,"click",this.onExpandOrContractClicked.bind(this)),this.hasIndeterminateExpandState&&(this.eGroupIndeterminateIcon.appendChild(Nf._.createIcon("setFilterGroupIndeterminate",this.gos,null)),this.addManagedListener(this.eGroupIndeterminateIcon,"click",this.onExpandOrContractClicked.bind(this))),this.setExpandedIcons(),this.refreshAriaExpanded()}onExpandOrContractClicked(){this.setExpanded(!this.isExpanded)}setExpanded(t,i){if(this.isGroup&&t!==this.isExpanded){this.isExpanded=t;const n={type:e.EVENT_EXPANDED_CHANGED,isExpanded:!!t,item:this.item};i||this.dispatchEvent(n),this.setExpandedIcons(),this.refreshAriaExpanded()}}setExpandedIcons(){Nf._.setDisplayed(this.eGroupClosedIcon,this.hasIndeterminateExpandState?!1===this.isExpanded:!this.isExpanded),Nf._.setDisplayed(this.eGroupOpenedIcon,!0===this.isExpanded),this.hasIndeterminateExpandState&&Nf._.setDisplayed(this.eGroupIndeterminateIcon,void 0===this.isExpanded)}onCheckboxChanged(t){this.isSelected=t;const i={type:e.EVENT_SELECTION_CHANGED,isSelected:t,item:this.item};this.dispatchEvent(i),this.refreshVariableAriaLabels(),this.refreshAriaChecked()}toggleSelected(){this.params.readOnly||this.setSelected(!this.isSelected)}setSelected(e,t){this.isSelected=e,this.eCheckbox.setValue(e,t),this.refreshAriaChecked()}refreshVariableAriaLabels(){if(!this.isTree)return;const e=this.localeService.getLocaleTextFunc(),t=this.eCheckbox.getValue(),i=void 0===t?e("ariaIndeterminate","indeterminate"):t?e("ariaVisible","visible"):e("ariaHidden","hidden"),n=e("ariaToggleVisibility","Press SPACE to toggle visibility");Nf._.setAriaLabelledBy(this.eCheckbox.getInputElement(),void 0),this.eCheckbox.setInputAriaLabel(`${n} (${i})`)}setupFixedAriaLabels(e){if(!this.isTree)return;const t=this.localeService.getLocaleTextFunc()("ariaFilterValue","Filter Value"),i=this.getAriaElement();Nf._.setAriaLabel(i,`${e} ${t}`),Nf._.setAriaDescribedBy(i,this.eCheckbox.getInputElement().id)}refreshAriaChecked(){const e=this.getAriaElement();Nf._.setAriaChecked(e,this.eCheckbox.getValue())}refreshAriaExpanded(){Nf._.setAriaExpanded(this.getAriaElement(),!!this.isExpanded)}refresh(e,t,i){var n,s;if(this.item=e,t!==this.isSelected&&this.setSelected(t,!0),this.setExpanded(i,!0),this.valueFunction){const e=this.valueFunction();this.setTooltipAndCellRendererParams(e,e),this.cellRendererComponent||this.renderCellWithoutCellRenderer()}if(this.cellRendererComponent&&!(null==(s=(n=this.cellRendererComponent).refresh)?void 0:s.call(n,this.cellRendererParams))){const e=this.cellRendererComponent;this.renderCell(),this.destroyBean(e)}}render(){const{params:{column:e}}=this;let{value:t}=this,i=null;"function"==typeof t?(this.valueFunction=t,i=this.valueFunction(),t=i):i=this.isTree?Nf._.toStringOrNull(t):this.getFormattedValue(e,t),this.setTooltipAndCellRendererParams(t,i),this.renderCell()}setTooltipAndCellRendererParams(e,t){const i="whenTruncated"===this.gos.get("tooltipShowMode");if(this.params.showTooltips&&(!i||!this.params.cellRenderer)){const n=null!=t?t:Nf._.toStringOrNull(e);let s;i&&(s=()=>{const e=this.eCheckbox.getGui().querySelector(".ag-label");return!e||e.scrollWidth>e.clientWidth}),this.setTooltip({newTooltipText:n,location:"setFilterValue",getColDef:()=>this.params.colDef,getColumn:()=>this.params.column,shouldDisplayTooltip:s})}this.cellRendererParams=this.gos.addGridCommonParams({value:e,valueFormatted:t,colDef:this.params.colDef,column:this.params.column,setTooltip:(e,t)=>{this.setTooltip({newTooltipText:e,getColDef:()=>this.params.colDef,getColumn:()=>this.params.column,location:"setFilterValue",shouldDisplayTooltip:t})}})}getTooltipParams(){const e=super.getTooltipParams();return e.location="setFilterValue",e.colDef=this.getComponentHolder(),this.isTree&&(e.level=this.depth),e}getFormattedValue(e,t){return this.valueService.formatValue(e,null,t,this.valueFormatter,!1)}renderCell(){const e=this.userComponentFactory.getSetFilterCellRendererDetails(this.params,this.cellRendererParams),t=e?e.newAgStackInstance():void 0;null!=t?t.then(e=>{e&&(this.cellRendererComponent=e,this.eCheckbox.setLabel(e.getGui()),this.destroyCellRendererComponent=()=>this.destroyBean(e))}):this.renderCellWithoutCellRenderer()}renderCellWithoutCellRenderer(){var e;let t=null!=(e=null==this.cellRendererParams.valueFormatted?this.cellRendererParams.value:this.cellRendererParams.valueFormatted)?e:this.translate("blanks");"string"!=typeof t&&(Nf._.warnOnce(`Set Filter Value Formatter must return string values. Please ensure the Set Filter Value Formatter returns string values for complex objects, or set convertValuesToStrings=true in the filterParams. See ${this.getFrameworkOverrides().getDocLink("filter-set-filter-list/#filter-value-types")}`),t=""),this.eCheckbox.setLabel(t),this.setupFixedAriaLabels(t)}getComponentHolder(){return this.params.column.getColDef()}};$f.EVENT_SELECTION_CHANGED="selectionChanged",$f.EVENT_EXPANDED_CHANGED="expandedChanged",$f.GROUP_TEMPLATE='\n        <div class="ag-set-filter-item" aria-hidden="true">\n            <span class="ag-set-filter-group-icons">\n                <span class="ag-set-filter-group-closed-icon" ref="eGroupClosedIcon"></span>\n                <span class="ag-set-filter-group-opened-icon" ref="eGroupOpenedIcon"></span>\n                <span class="ag-set-filter-group-indeterminate-icon" ref="eGroupIndeterminateIcon"></span>\n            </span>\n            <ag-checkbox ref="eCheckbox" class="ag-set-filter-item-checkbox"></ag-checkbox>\n        </div>',$f.TEMPLATE='\n        <div class="ag-set-filter-item">\n            <ag-checkbox ref="eCheckbox" class="ag-set-filter-item-checkbox"></ag-checkbox>\n        </div>',Gf([(0,Nf.Autowired)("valueService")],$f.prototype,"valueService",2),Gf([(0,Nf.Autowired)("userComponentFactory")],$f.prototype,"userComponentFactory",2),Gf([(0,Nf.RefSelector)("eCheckbox")],$f.prototype,"eCheckbox",2),Gf([(0,Nf.RefSelector)("eGroupOpenedIcon")],$f.prototype,"eGroupOpenedIcon",2),Gf([(0,Nf.RefSelector)("eGroupClosedIcon")],$f.prototype,"eGroupClosedIcon",2),Gf([(0,Nf.RefSelector)("eGroupIndeterminateIcon")],$f.prototype,"eGroupIndeterminateIcon",2),Gf([Nf.PostConstruct],$f.prototype,"init",1);var Yf=$f,qf={loadingOoo:"Loading...",blanks:"(Blanks)",searchOoo:"Search...",selectAll:"(Select All)",selectAllSearchResults:"(Select All Search Results)",addCurrentSelectionToFilter:"Add current selection to filter",noMatches:"No matches."},Xf=class{getModelAsString(e,t){const{values:i}=e||t.getModel()||{},n=t.getValueModel();if(null==i||null==n)return"";const s=i.filter(e=>n.isKeyAvailable(e)),r=s.length;return`(${r}) ${s.slice(0,10).map(e=>t.getFormattedValue(e)).join(",")}${r>10?",...":""}`}},Zf=class extends Rf.ProvidedFilter{constructor(){super("setFilter"),this.valueModel=null,this.setFilterParams=null,this.virtualList=null,this.caseSensitive=!1,this.convertValuesToStrings=!1,this.treeDataTreeList=!1,this.groupingTreeList=!1,this.hardRefreshVirtualList=!1,this.noValueFormatterSupplied=!1,this.filterModelFormatter=new Xf,this.updateSetFilterOnParamsChange=e=>{var t;this.setFilterParams=e,this.convertValuesToStrings=!!e.convertValuesToStrings,this.caseSensitive=!!e.caseSensitive;const i=null!=(t=e.keyCreator)?t:e.colDef.keyCreator;this.setValueFormatter(e.valueFormatter,i,this.convertValuesToStrings,!!e.treeList,!!e.colDef.refData);const n=e.column.getId().startsWith(Rf.GROUP_AUTO_COLUMN_ID);this.treeDataTreeList=this.gos.get("treeData")&&!!e.treeList&&n,this.getDataPath=this.gos.get("getDataPath"),this.groupingTreeList=!!this.columnModel.getRowGroupColumns().length&&!!e.treeList&&n,this.createKey=this.generateCreateKey(i,this.convertValuesToStrings,this.treeDataTreeList||this.groupingTreeList)}}postConstruct(){super.postConstruct()}updateUiVisibility(){}createBodyTemplate(){return`\n            <div class="ag-set-filter">\n                <div ref="eFilterLoading" class="ag-filter-loading ag-hidden">${this.translateForSetFilter("loadingOoo")}</div>\n                <ag-input-text-field class="ag-mini-filter" ref="eMiniFilter"></ag-input-text-field>\n                <div ref="eFilterNoMatches" class="ag-filter-no-matches ag-hidden">${this.translateForSetFilter("noMatches")}</div>\n                <div ref="eSetFilterList" class="ag-set-filter-list" role="presentation"></div>\n            </div>`}handleKeyDown(e){if(super.handleKeyDown(e),!e.defaultPrevented)switch(e.key){case Rf.KeyCode.SPACE:this.handleKeySpace(e);break;case Rf.KeyCode.ENTER:this.handleKeyEnter(e);break;case Rf.KeyCode.LEFT:this.handleKeyLeft(e);break;case Rf.KeyCode.RIGHT:this.handleKeyRight(e)}}handleKeySpace(e){var t;null==(t=this.getComponentForKeyEvent(e))||t.toggleSelected()}handleKeyEnter(e){if(!this.setFilterParams)return;const{excelMode:t,readOnly:i}=this.setFilterParams||{};t&&!i&&(e.preventDefault(),this.onBtApply(!1,!1,e),"mac"===this.setFilterParams.excelMode&&this.eMiniFilter.getInputElement().select())}handleKeyLeft(e){var t;null==(t=this.getComponentForKeyEvent(e))||t.setExpanded(!1)}handleKeyRight(e){var t;null==(t=this.getComponentForKeyEvent(e))||t.setExpanded(!0)}getComponentForKeyEvent(e){var t;if(!this.eSetFilterList.contains(this.gos.getActiveDomElement())||!this.virtualList)return;const i=this.virtualList.getLastFocusedRow();if(null==i)return;const n=this.virtualList.getComponentAt(i);if(null==n)return;e.preventDefault();const{readOnly:s}=null!=(t=this.setFilterParams)?t:{};return s?void 0:n}getCssIdentifier(){return"set-filter"}setModel(e){var t;return null==e&&null==(null==(t=this.valueModel)?void 0:t.getModel())?(this.setMiniFilter(null),Rf.AgPromise.resolve()):super.setModel(e)}refresh(e){var t,i,n;return!!super.refresh(e)&&(!["treeList","treeListFormatter","treeListPathGetter","keyCreator","convertValuesToStrings","caseSensitive","comparator","suppressSelectAll","excelMode"].some(t=>{var i;return e[t]!==(null==(i=this.setFilterParams)?void 0:i[t])})&&!this.haveColDefParamsChanged(e.colDef)&&(super.updateParams(e),this.updateSetFilterOnParamsChange(e),this.updateMiniFilter(),e.cellRenderer===(null==(t=this.setFilterParams)?void 0:t.cellRenderer)&&e.valueFormatter===(null==(i=this.setFilterParams)?void 0:i.valueFormatter)||this.checkAndRefreshVirtualList(),null==(n=this.valueModel)||n.updateOnParamsChange(e).then(()=>{var e;(null==(e=this.valueModel)?void 0:e.hasSelections())&&this.refreshFilterValues()}),!0))}haveColDefParamsChanged(e){var t;const i=null==(t=this.setFilterParams)?void 0:t.colDef;return["keyCreator","filterValueGetter"].some(t=>e[t]!==(null==i?void 0:i[t]))}setModelAndRefresh(e){return this.valueModel?this.valueModel.setModel(e).then(()=>this.checkAndRefreshVirtualList()):Rf.AgPromise.resolve()}resetUiToDefaults(){return this.setMiniFilter(null),this.setModelAndRefresh(null)}setModelIntoUi(e){this.setMiniFilter(null);const t=null==e?null:e.values;return this.setModelAndRefresh(t)}getModelFromUi(){if(!this.valueModel)throw new Error("Value model has not been created.");const e=this.valueModel.getModel();return e?{values:e,filterType:this.getFilterType()}:null}getFilterType(){return"set"}getValueModel(){return this.valueModel}areModelsEqual(e,t){return null==e&&null==t||null!=e&&null!=t&&Rf._.areEqual(e.values,t.values)}setParams(e){var t;this.applyExcelModeOptions(e),super.setParams(e),this.updateSetFilterOnParamsChange(e);const i=null!=(t=e.keyCreator)?t:e.colDef.keyCreator;this.valueModel=new Kf({filterParams:e,setIsLoading:e=>this.setIsLoading(e),translate:e=>this.translateForSetFilter(e),caseFormat:e=>this.caseFormat(e),createKey:this.createKey,valueFormatter:this.valueFormatter,usingComplexObjects:!!i,gos:this.gos,columnModel:this.columnModel,valueService:this.valueService,treeDataTreeList:this.treeDataTreeList,groupingTreeList:this.groupingTreeList,addManagedListener:(e,t)=>this.addManagedListener(this.eventService,e,t)}),this.initialiseFilterBodyUi(),this.addEventListenersForDataChanges()}onAddCurrentSelectionToFilterChange(e){if(!this.valueModel)throw new Error("Value model has not been created.");this.valueModel.setAddCurrentSelectionToFilter(e)}setValueFormatter(e,t,i,n,s){let r=e;if(!r){if(t&&!i&&!n)throw new Error("AG Grid: Must supply a Value Formatter in Set Filter params when using a Key Creator unless convertValuesToStrings is enabled");this.noValueFormatterSupplied=!0,s||(r=e=>Rf._.toStringOrNull(e.value))}this.valueFormatter=r}generateCreateKey(e,t,i){if(i&&!e)throw new Error("AG Grid: Must supply a Key Creator in Set Filter params when `treeList = true` on a group column, and Tree Data or Row Grouping is enabled.");return e?(t,i=null)=>{const n=this.getKeyCreatorParams(t,i);return Rf._.makeNull(e(n))}:t?e=>Array.isArray(e)?e:Rf._.makeNull(Rf._.toStringOrNull(e)):e=>Rf._.makeNull(Rf._.toStringOrNull(e))}getFormattedValue(e){var t;let i=this.valueModel.getValue(e);this.noValueFormatterSupplied&&(this.treeDataTreeList||this.groupingTreeList)&&Array.isArray(i)&&(i=Rf._.last(i));const n=this.valueService.formatValue(this.setFilterParams.column,null,i,this.valueFormatter,!1);return null!=(t=null==n?Rf._.toStringOrNull(i):n)?t:this.translateForSetFilter("blanks")}applyExcelModeOptions(e){"windows"===e.excelMode?(e.buttons||(e.buttons=["apply","cancel"]),null==e.closeOnApply&&(e.closeOnApply=!0)):"mac"===e.excelMode&&(e.buttons||(e.buttons=["reset"]),null==e.applyMiniFilterWhileTyping&&(e.applyMiniFilterWhileTyping=!0),null==e.debounceMs&&(e.debounceMs=500)),e.excelMode&&e.defaultToNothingSelected&&(e.defaultToNothingSelected=!1,Rf._.warnOnce('The Set Filter Parameter "defaultToNothingSelected" value was ignored because it does not work when "excelMode" is used.'))}addEventListenersForDataChanges(){this.isValuesTakenFromGrid()&&(this.addManagedListener(this.eventService,Rf.Events.EVENT_CELL_VALUE_CHANGED,e=>{this.setFilterParams&&e.column===this.setFilterParams.column&&this.syncAfterDataChange()}),this.addManagedPropertyListeners(["treeData","getDataPath","groupAllowUnbalanced"],()=>{this.syncAfterDataChange()}))}syncAfterDataChange(){if(!this.valueModel)throw new Error("Value model has not been created.");return this.valueModel.refreshValues().then(()=>{this.checkAndRefreshVirtualList(),this.onBtApply(!1,!0)})}setIsLoading(e){Rf._.setDisplayed(this.eFilterLoading,e),e||(this.hardRefreshVirtualList=!0)}initialiseFilterBodyUi(){this.initVirtualList(),this.initMiniFilter()}initVirtualList(){if(!this.setFilterParams)throw new Error("Set filter params have not been provided.");if(!this.valueModel)throw new Error("Value model has not been created.");const e=this.localeService.getLocaleTextFunc()("ariaFilterList","Filter List"),t=!!this.setFilterParams.treeList,i=this.virtualList=this.createBean(new Rf.VirtualList({cssIdentifier:"filter",ariaRole:t?"tree":"listbox",listName:e})),n=this.getRefElement("eSetFilterList");t&&n.classList.add("ag-set-filter-tree-list"),n&&n.appendChild(i.getGui());const{cellHeight:s}=this.setFilterParams;let r;null!=s&&i.setRowHeight(s),i.setComponentCreator((e,i)=>this.createSetListItem(e,t,i)),i.setComponentUpdater((e,t)=>this.updateSetListItem(e,t)),r=this.setFilterParams.suppressSelectAll?new Qf(this.valueModel):new Jf(this.valueModel,()=>this.isSelectAllSelected()),t&&(r=new em(r)),i.setModel(r)}getSelectAllLabel(){if(!this.setFilterParams)throw new Error("Set filter params have not been provided.");if(!this.valueModel)throw new Error("Value model has not been created.");const e=null!=this.valueModel.getMiniFilter()&&this.setFilterParams.excelMode?"selectAllSearchResults":"selectAll";return this.translateForSetFilter(e)}getAddSelectionToFilterLabel(){if(!this.setFilterParams)throw new Error("Set filter params have not been provided.");if(!this.valueModel)throw new Error("Value model has not been created.");return this.translateForSetFilter("addCurrentSelectionToFilter")}createSetListItem(e,t,i){if(!this.setFilterParams)throw new Error("Set filter params have not been provided.");if(!this.valueModel)throw new Error("Value model has not been created.");const n=this.valueModel.hasGroups(),{isSelected:s,isExpanded:r}=this.isSelectedExpanded(e),{value:o,depth:a,isGroup:l,hasIndeterminateExpandState:c,selectedListener:h,expandedListener:d}=this.newSetListItemAttributes(e,t),u={focusWrapper:i,value:o,params:this.setFilterParams,translate:e=>this.translateForSetFilter(e),valueFormatter:this.valueFormatter,item:e,isSelected:s,isTree:t,depth:a,groupsExist:n,isGroup:l,isExpanded:r,hasIndeterminateExpandState:c},p=this.createBean(new Yf(u));return p.addEventListener(Yf.EVENT_SELECTION_CHANGED,h),d&&p.addEventListener(Yf.EVENT_EXPANDED_CHANGED,d),p}newSetTreeItemAttributes(e,t){var i,n,s,r,o,a;if(!this.setFilterParams)throw new Error("Set filter params have not been provided.");if(!this.valueModel)throw new Error("Value model has not been created.");const l=this.valueModel.hasGroups();return e.key===Bf.SELECT_ALL?{value:()=>this.getSelectAllLabel(),isGroup:l,depth:e.depth,hasIndeterminateExpandState:!0,selectedListener:e=>this.onSelectAll(e.isSelected),expandedListener:e=>this.onExpandAll(e.item,e.isExpanded)}:e.key===Bf.ADD_SELECTION_TO_FILTER?{value:()=>this.getAddSelectionToFilterLabel(),depth:e.depth,isGroup:!1,hasIndeterminateExpandState:!1,selectedListener:e=>{this.onAddCurrentSelectionToFilterChange(e.isSelected)}}:e.children?{value:null!=(s=null==(n=(i=this.setFilterParams).treeListFormatter)?void 0:n.call(i,e.treeKey,e.depth,e.parentTreeKeys))?s:e.treeKey,depth:e.depth,isGroup:!0,selectedListener:e=>this.onGroupItemSelected(e.item,e.isSelected),expandedListener:e=>this.onExpandedChanged(e.item,e.isExpanded)}:{value:null!=(a=null==(o=(r=this.setFilterParams).treeListFormatter)?void 0:o.call(r,e.treeKey,e.depth,e.parentTreeKeys))?a:e.treeKey,depth:e.depth,selectedListener:e=>this.onItemSelected(e.item.key,e.isSelected)}}newSetListItemAttributes(e,t){if(!this.setFilterParams)throw new Error("Set filter params have not been provided.");if(!this.valueModel)throw new Error("Value model has not been created.");return this.isSetFilterModelTreeItem(e)?this.newSetTreeItemAttributes(e,t):e===Bf.SELECT_ALL?{value:()=>this.getSelectAllLabel(),selectedListener:e=>this.onSelectAll(e.isSelected)}:e===Bf.ADD_SELECTION_TO_FILTER?{value:()=>this.getAddSelectionToFilterLabel(),selectedListener:e=>{this.onAddCurrentSelectionToFilterChange(e.isSelected)}}:{value:this.valueModel.getValue(e),selectedListener:e=>this.onItemSelected(e.item,e.isSelected)}}updateSetListItem(e,t){const{isSelected:i,isExpanded:n}=this.isSelectedExpanded(e);t.refresh(e,i,n)}isSelectedExpanded(e){let t,i;return this.isSetFilterModelTreeItem(e)?(i=e.expanded,t=e.key===Bf.SELECT_ALL?this.isSelectAllSelected():e.key===Bf.ADD_SELECTION_TO_FILTER?this.valueModel.isAddCurrentSelectionToFilterChecked():e.children?this.areAllChildrenSelected(e):this.valueModel.isKeySelected(e.key)):t=e===Bf.SELECT_ALL?this.isSelectAllSelected():e===Bf.ADD_SELECTION_TO_FILTER?this.valueModel.isAddCurrentSelectionToFilterChecked():this.valueModel.isKeySelected(e),{isSelected:t,isExpanded:i}}isSetFilterModelTreeItem(e){return void 0!==(null==e?void 0:e.treeKey)}initMiniFilter(){if(!this.setFilterParams)throw new Error("Set filter params have not been provided.");if(!this.valueModel)throw new Error("Value model has not been created.");const{eMiniFilter:e,localeService:t}=this,i=t.getLocaleTextFunc();e.setDisplayed(!this.setFilterParams.suppressMiniFilter),e.setValue(this.valueModel.getMiniFilter()),e.onValueChange(()=>this.onMiniFilterInput()),e.setInputAriaLabel(i("ariaSearchFilterValues","Search filter values")),this.addManagedListener(e.getInputElement(),"keydown",e=>this.onMiniFilterKeyDown(e))}updateMiniFilter(){if(!this.setFilterParams)throw new Error("Set filter params have not been provided.");if(!this.valueModel)throw new Error("Value model has not been created.");const{eMiniFilter:e}=this;e.isDisplayed()!==!this.setFilterParams.suppressMiniFilter&&e.setDisplayed(!this.setFilterParams.suppressMiniFilter);const t=this.valueModel.getMiniFilter();e.getValue()!==t&&e.setValue(t)}afterGuiAttached(e){if(!this.setFilterParams)throw new Error("Set filter params have not been provided.");super.afterGuiAttached(e),this.resetExpansion(),this.refreshVirtualList();const{eMiniFilter:t}=this;t.setInputPlaceholder(this.translateForSetFilter("searchOoo")),e&&e.suppressFocus||t.getFocusableElement().focus()}afterGuiDetached(){var e,t;super.afterGuiDetached(),(null==(e=this.setFilterParams)?void 0:e.excelMode)&&this.resetMiniFilter();const i=this.getModel();!(null==(t=this.setFilterParams)?void 0:t.excelMode)&&this.areModelsEqual(i,this.getModelFromUi())||(this.resetUiToActiveModel(i),this.showOrHideResults())}applyModel(e="api"){if(!this.setFilterParams)throw new Error("Set filter params have not been provided.");if(!this.valueModel)throw new Error("Value model has not been created.");this.setFilterParams.excelMode&&"rowDataUpdated"!==e&&this.valueModel.isEverythingVisibleSelected()&&this.valueModel.selectAllMatchingMiniFilter();const t=this.valueModel.showAddCurrentSelectionToFilter()&&this.valueModel.isAddCurrentSelectionToFilterChecked();if(t&&!this.getModel())return!1;const i=super.applyModel(e),n=this.getModel();return n?(t||this.valueModel.setAppliedModelKeys(new Set),n.values.forEach(e=>{this.valueModel.addToAppliedModelKeys(e)})):t||this.valueModel.setAppliedModelKeys(null),i}isModelValid(e){return!this.setFilterParams||!this.setFilterParams.excelMode||null==e||e.values.length>0}doesFilterPass(e){if(!this.setFilterParams||!this.valueModel||!this.valueModel.getCaseFormattedAppliedModelKeys())return!0;if(!this.valueModel.hasAnyAppliedModelKey())return!1;const{node:t,data:i}=e;if(this.treeDataTreeList)return this.doesFilterPassForTreeData(t,i);if(this.groupingTreeList)return this.doesFilterPassForGrouping(t);let n=this.getValueFromNode(t);return this.convertValuesToStrings?this.doesFilterPassForConvertValuesToString(t,n):null!=n&&Array.isArray(n)?0===n.length?this.valueModel.hasAppliedModelKey(null):n.some(e=>this.isInAppliedModel(this.createKey(e,t))):this.isInAppliedModel(this.createKey(n,t))}doesFilterPassForConvertValuesToString(e,t){const i=this.createKey(t,e);return null!=i&&Array.isArray(i)?0===i.length?this.valueModel.hasAppliedModelKey(null):i.some(e=>this.isInAppliedModel(e)):this.isInAppliedModel(i)}doesFilterPassForTreeData(e,t){var i;return!(null==(i=e.childrenAfterGroup)?void 0:i.length)&&this.isInAppliedModel(this.createKey(this.checkMakeNullDataPath(this.getDataPath(t))))}doesFilterPassForGrouping(e){const t=this.columnModel.getRowGroupColumns().map(t=>this.valueService.getKeyForNode(t,e));return t.push(this.getValueFromNode(e)),this.isInAppliedModel(this.createKey(this.checkMakeNullDataPath(t)))}checkMakeNullDataPath(e){return e&&(e=e.map(e=>Rf._.toStringOrNull(Rf._.makeNull(e)))),(null==e?void 0:e.some(e=>null==e))?null:e}isInAppliedModel(e){return this.valueModel.hasAppliedModelKey(e)}getValueFromNode(e){return this.setFilterParams.getValue(e)}getKeyCreatorParams(e,t=null){return{value:e,colDef:this.setFilterParams.colDef,column:this.setFilterParams.column,node:t,data:null==t?void 0:t.data,api:this.setFilterParams.api,columnApi:this.setFilterParams.columnApi,context:this.setFilterParams.context}}onNewRowsLoaded(){this.isValuesTakenFromGrid()&&this.syncAfterDataChange()}isValuesTakenFromGrid(){return!!this.valueModel&&2===this.valueModel.getValuesType()}setFilterValues(e){if(!this.valueModel)throw new Error("Value model has not been created.");this.valueModel.overrideValues(e).then(()=>{this.checkAndRefreshVirtualList(),this.onUiChanged()})}resetFilterValues(){if(!this.valueModel)throw new Error("Value model has not been created.");this.valueModel.setValuesType(2),this.syncAfterDataChange()}refreshFilterValues(){if(!this.valueModel)throw new Error("Value model has not been created.");this.valueModel.isInitialised()&&this.valueModel.refreshValues().then(()=>{this.checkAndRefreshVirtualList(),this.onUiChanged()})}onAnyFilterChanged(){setTimeout(()=>{if(this.isAlive()){if(!this.valueModel)throw new Error("Value model has not been created.");this.valueModel.refreshAfterAnyFilterChanged().then(e=>{e&&(this.checkAndRefreshVirtualList(),this.showOrHideResults())})}},0)}onMiniFilterInput(){if(!this.setFilterParams)throw new Error("Set filter params have not been provided.");if(!this.valueModel)throw new Error("Value model has not been created.");if(!this.valueModel.setMiniFilter(this.eMiniFilter.getValue()))return;const{applyMiniFilterWhileTyping:e,readOnly:t}=this.setFilterParams||{};!t&&e?this.filterOnAllVisibleValues(!1):this.updateUiAfterMiniFilterChange()}updateUiAfterMiniFilterChange(){if(!this.setFilterParams)throw new Error("Set filter params have not been provided.");if(!this.valueModel)throw new Error("Value model has not been created.");const{excelMode:e,readOnly:t}=this.setFilterParams||{};null==e||t?this.checkAndRefreshVirtualList():null==this.valueModel.getMiniFilter()?this.resetUiToActiveModel(this.getModel()):(this.valueModel.selectAllMatchingMiniFilter(!0),this.checkAndRefreshVirtualList(),this.onUiChanged()),this.showOrHideResults()}showOrHideResults(){if(!this.valueModel)throw new Error("Value model has not been created.");const e=null!=this.valueModel.getMiniFilter()&&this.valueModel.getDisplayedValueCount()<1;Rf._.setDisplayed(this.eNoMatches,e),Rf._.setDisplayed(this.eSetFilterList,!e)}resetMiniFilter(){var e;this.eMiniFilter.setValue(null,!0),null==(e=this.valueModel)||e.setMiniFilter(null)}resetUiToActiveModel(e,t){this.setModelAndRefresh(null==e?null:e.values).then(()=>{this.onUiChanged(!1,"prevent"),null==t||t()})}handleCancelEnd(e){this.setMiniFilter(null),super.handleCancelEnd(e)}onMiniFilterKeyDown(e){const{excelMode:t,readOnly:i}=this.setFilterParams||{};e.key!==Rf.KeyCode.ENTER||t||i||this.filterOnAllVisibleValues()}filterOnAllVisibleValues(e=!0){const{readOnly:t}=this.setFilterParams||{};if(!this.valueModel)throw new Error("Value model has not been created.");if(t)throw new Error("Unable to filter in readOnly mode.");this.valueModel.selectAllMatchingMiniFilter(!0),this.checkAndRefreshVirtualList(),this.onUiChanged(!1,e?"immediately":"debounce"),this.showOrHideResults()}focusRowIfAlive(e){null!=e&&window.setTimeout(()=>{if(!this.virtualList)throw new Error("Virtual list has not been created.");this.isAlive()&&this.virtualList.focusRow(e)},0)}onSelectAll(e){if(!this.valueModel)throw new Error("Value model has not been created.");if(!this.virtualList)throw new Error("Virtual list has not been created.");e?this.valueModel.selectAllMatchingMiniFilter():this.valueModel.deselectAllMatchingMiniFilter(),this.refreshAfterSelection()}onGroupItemSelected(e,t){const i=e=>{e.children?e.children.forEach(e=>i(e)):this.selectItem(e.key,t)};i(e),this.refreshAfterSelection()}onItemSelected(e,t){if(!this.valueModel)throw new Error("Value model has not been created.");if(!this.virtualList)throw new Error("Virtual list has not been created.");this.selectItem(e,t),this.refreshAfterSelection()}selectItem(e,t){t?this.valueModel.selectKey(e):this.valueModel.deselectKey(e)}onExpandAll(e,t){const i=e=>{e.filterPasses&&e.available&&e.children&&(e.children.forEach(e=>i(e)),e.expanded=t)};i(e),this.refreshAfterExpansion()}onExpandedChanged(e,t){e.expanded=t,this.refreshAfterExpansion()}refreshAfterExpansion(){const e=this.virtualList.getLastFocusedRow();this.valueModel.updateDisplayedValues("expansion"),this.checkAndRefreshVirtualList(),this.focusRowIfAlive(e)}refreshAfterSelection(){const e=this.virtualList.getLastFocusedRow();this.checkAndRefreshVirtualList(),this.onUiChanged(),this.focusRowIfAlive(e)}setMiniFilter(e){this.eMiniFilter.setValue(e),this.onMiniFilterInput()}getMiniFilter(){return this.valueModel?this.valueModel.getMiniFilter():null}checkAndRefreshVirtualList(){if(!this.virtualList)throw new Error("Virtual list has not been created.");this.virtualList.refresh(!this.hardRefreshVirtualList),this.hardRefreshVirtualList&&(this.hardRefreshVirtualList=!1)}getFilterKeys(){return this.valueModel?this.valueModel.getKeys():[]}getFilterValues(){return this.valueModel?this.valueModel.getValues():[]}getValues(){return this.getFilterKeys()}refreshVirtualList(){this.setFilterParams&&this.setFilterParams.refreshValuesOnOpen?this.refreshFilterValues():this.checkAndRefreshVirtualList()}translateForSetFilter(e){return this.localeService.getLocaleTextFunc()(e,qf[e])}isSelectAllSelected(){if(!this.setFilterParams||!this.valueModel)return!1;if(this.setFilterParams.defaultToNothingSelected){if(this.valueModel.hasSelections()&&this.valueModel.isEverythingVisibleSelected())return!0;if(this.valueModel.isNothingVisibleSelected())return!1}else{if(this.valueModel.hasSelections()&&this.valueModel.isNothingVisibleSelected())return!1;if(this.valueModel.isEverythingVisibleSelected())return!0}}areAllChildrenSelected(e){const t=e=>{if(e.children){let i=!1,n=!1;return e.children.some(e=>{if(!e.filterPasses||!e.available)return!1;const s=t(e);return void 0===s||(s?i=!0:n=!0,i&&n)})?void 0:i}return this.valueModel.isKeySelected(e.key)};return this.setFilterParams.defaultToNothingSelected?this.valueModel.hasSelections()&&t(e):t(e)}destroy(){null!=this.virtualList&&(this.virtualList.destroy(),this.virtualList=null),super.destroy()}caseFormat(e){return null==e||"string"!=typeof e||this.caseSensitive?e:e.toUpperCase()}resetExpansion(){var e,t;if(!(null==(e=this.setFilterParams)?void 0:e.treeList))return;const i=null==(t=this.valueModel)?void 0:t.getSelectAllItem();if(this.isSetFilterModelTreeItem(i)){const e=t=>{t.children&&(t.children.forEach(t=>e(t)),t.expanded=!1)};e(i),this.valueModel.updateDisplayedValues("expansion")}}getModelAsString(e){return this.filterModelFormatter.getModelAsString(e,this)}getPositionableElement(){return this.eSetFilterList}};Gf([(0,Rf.RefSelector)("eMiniFilter")],Zf.prototype,"eMiniFilter",2),Gf([(0,Rf.RefSelector)("eFilterLoading")],Zf.prototype,"eFilterLoading",2),Gf([(0,Rf.RefSelector)("eSetFilterList")],Zf.prototype,"eSetFilterList",2),Gf([(0,Rf.RefSelector)("eFilterNoMatches")],Zf.prototype,"eNoMatches",2),Gf([(0,Rf.Autowired)("columnModel")],Zf.prototype,"columnModel",2),Gf([(0,Rf.Autowired)("valueService")],Zf.prototype,"valueService",2);var Qf=class{constructor(e){this.model=e}getRowCount(){return this.model.getDisplayedValueCount()}getRow(e){return this.model.getDisplayedItem(e)}areRowsEqual(e,t){return e===t}},Jf=class{constructor(e,t){this.model=e,this.isSelectAllSelected=t}getRowCount(){const e=this.model.showAddCurrentSelectionToFilter()?2:1;return this.model.getDisplayedValueCount()+e}getRow(e){if(0===e)return this.model.getSelectAllItem();const t=this.model.showAddCurrentSelectionToFilter(),i=t?2:1;return 1===e&&t?this.model.getAddSelectionToFilterItem():this.model.getDisplayedItem(e-i)}areRowsEqual(e,t){return e===t}},em=class{constructor(e){this.model=e}getRowCount(){return this.model.getRowCount()}getRow(e){return this.model.getRow(e)}areRowsEqual(e,t){return null==e&&null==t||null!=e&&null!=t&&e.treeKey===t.treeKey&&e.depth===t.depth}},tm=class extends Of.Component{constructor(){super('\n            <div class="ag-floating-filter-input ag-set-floating-filter-input" role="presentation">\n                <ag-input-text-field ref="eFloatingFilterText"></ag-input-text-field>\n            </div>'),this.availableValuesListenerAdded=!1,this.filterModelFormatter=new Xf}destroy(){super.destroy()}init(e){this.params=e,this.eFloatingFilterText.setDisabled(!0).addGuiEventListener("click",()=>this.params.showParentFilter()),this.setParams(e)}setParams(e){const t=this.columnModel.getDisplayNameForColumn(e.column,"header",!0),i=this.localeService.getLocaleTextFunc();this.eFloatingFilterText.setInputAriaLabel(`${t} ${i("ariaFilterInput","Filter Input")}`)}onParamsUpdated(e){this.refresh(e)}refresh(e){this.params=e,this.setParams(e)}onParentModelChanged(e){this.updateFloatingFilterText(e)}parentSetFilterInstance(e){this.params.parentFilterInstance(t=>{if(!(t instanceof Zf))throw new Error("AG Grid - SetFloatingFilter expects SetFilter as its parent");e(t)})}addAvailableValuesListener(){this.parentSetFilterInstance(e=>{const t=e.getValueModel();t&&this.addManagedListener(t,Kf.EVENT_AVAILABLE_VALUES_CHANGED,()=>this.updateFloatingFilterText())}),this.availableValuesListenerAdded=!0}updateFloatingFilterText(e){this.availableValuesListenerAdded||this.addAvailableValuesListener(),this.parentSetFilterInstance(t=>{this.eFloatingFilterText.setValue(this.filterModelFormatter.getModelAsString(e,t))})}};Gf([(0,Of.RefSelector)("eFloatingFilterText")],tm.prototype,"eFloatingFilterText",2),Gf([(0,Of.Autowired)("columnModel")],tm.prototype,"columnModel",2);var im={version:"31.3.4",moduleName:If.ModuleNames.SetFilterModule,beans:[],userComponents:[{componentName:"agSetColumnFilter",componentClass:Zf},{componentName:"agSetColumnFloatingFilter",componentClass:tm}],dependantModules:[D]},nm=i(98092),sm=i(98092),rm=i(21371),om=i(21371),am=i(21371),lm=i(21371),cm=i(21371),hm=i(21371),dm=i(21371),um=i(21371),pm=i(98092),gm=Object.defineProperty,fm=Object.getOwnPropertyDescriptor,mm=Object.getOwnPropertySymbols,vm=Object.prototype.hasOwnProperty,ym=Object.prototype.propertyIsEnumerable,Cm=(e,t,i)=>t in e?gm(e,t,{enumerable:!0,configurable:!0,writable:!0,value:i}):e[t]=i,bm=(e,t,i,n)=>{for(var s,r=n>1?void 0:n?fm(t,i):t,o=e.length-1;o>=0;o--)(s=e[o])&&(r=(n?s(t,i,r):s(r))||r);return n&&r&&gm(t,i,r),r},{extent:Sm,isNumber:wm,isString:xm,isStringObject:Em,isDate:Mm,createId:Am,Padding:Tm}=om._Util,{LinearScale:Dm,BandScale:Im,TimeScale:Rm}=om._Scale,Lm=class{constructor(){this.type="category",this.stroke="rgb(204, 214, 235)",this.strokeWidth=1}},km=class e{constructor(){this.id=Am(this),this.seriesRect={x:0,y:0,width:0,height:0},this._context=void 0,this._container=void 0,this._data=void 0,this.padding=new Tm(3),this.xKey="x",this.yKey="y",this.dataType=void 0,this.xData=[],this.yData=[],this.min=void 0,this.max=void 0,this.yScale=new Dm,this.axis=new Lm,this.highlightStyle={size:6,fill:"yellow",stroke:"silver",strokeWidth:1},this._width=100,this._height=100,this.smallestInterval=void 0,this.layoutId=0,this.defaultDateFormatter=new Intl.DateTimeFormat("en-US",{year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",hour12:!1}),this._onMouseMove=this.onMouseMove.bind(this),this._onMouseOut=this.onMouseOut.bind(this);const t=new om._Scene.Group;this.rootGroup=t;const i=document.createElement("div");i.setAttribute("class","ag-sparkline-wrapper");const n=new om._Scene.Scene({});this.scene=n,this.canvasElement=n.canvas.element,n.setRoot(t),n.setContainer(i),this.resizeAndSetDimensions(this.width,this.height),e.tooltipDocuments.includes(document)||this.initialiseTooltipStyles(),this.setupDomEventListeners(this.canvasElement)}set context(e){this._context!==e&&(this._context=e)}get context(){return this._context}set container(e){if(this._container!==e){const{parentNode:t}=this.canvasElement;null!=t&&t.removeChild(this.canvasElement),e&&e.appendChild(this.canvasElement),this._container=e}}get container(){return this._container}set data(e){this._data!==e&&(this._data=e,this.processData(),this.mouseMoveEvent&&this.highlightedDatum&&this.updateHitPoint(this.mouseMoveEvent))}get data(){return this._data}resizeAndSetDimensions(e,t){this.scene.resize(e,t),this.seriesRect.width=e,this.seriesRect.height=t}initialiseTooltipStyles(){const t=document.createElement("style");t.innerHTML="\n.ag-sparkline-tooltip-wrapper {\n    position: absolute;\n    user-select: none;\n    pointer-events: none;\n}\n\n.ag-sparkline-tooltip {\n    position: relative;\n    font: 12px arial,sans-serif;\n    border-radius: 2px;\n    box-shadow: 0 1px 3px rgb(0 0 0 / 20%), 0 1px 1px rgb(0 0 0 / 14%);\n    line-height: 1.7em;\n    overflow: hidden;\n    white-space: nowrap;\n    z-index: 99999;\n    background-color: rgb(255, 255, 255);\n    color: rgba(0,0,0, 0.67);\n}\n\n.ag-sparkline-tooltip-content {\n    padding: 0 7px;\n    opacity: 1;\n}\n\n.ag-sparkline-tooltip-title {\n    padding-left: 7px;\n    opacity: 1;\n}\n\n.ag-sparkline-tooltip-wrapper-hidden {\n    top: -10000px !important;\n}\n\n.ag-sparkline-wrapper {\n    box-sizing: border-box;\n    overflow: hidden;\n}\n",document.head.insertBefore(t,document.head.querySelector("style")),e.tooltipDocuments.push(document)}set width(e){this._width!==e&&(this._width=e,this.scene.resize(e,this.height),this.scheduleLayout())}get width(){return this._width}set height(e){this._height!==e&&(this._height=e,this.scene.resize(this.width,e),this.scheduleLayout())}get height(){return this._height}update(){}updateYScale(){this.updateYScaleRange(),this.updateYScaleDomain()}updateYScaleDomain(){}updateYScaleRange(){const{yScale:e,seriesRect:t}=this;e.range=[t.height,0]}updateXScale(){const{type:e}=this.axis;this.xScale=this.getXScale(e),this.updateXScaleRange(),this.updateXScaleDomain()}updateXScaleRange(){this.xScale.range=[0,this.seriesRect.width]}updateXScaleDomain(){const{xData:e,xScale:t}=this;let i;(t instanceof Dm||t instanceof Rm)&&(i=Sm(e)),this.xScale.domain=i?i.slice():e}getXScale(e="category"){switch(e){case"number":return new Dm;case"time":return new Rm;default:return new Im}}updateAxisLine(){}updateAxes(){this.updateYScale(),this.updateXScale(),this.updateAxisLine()}updateCrosshairs(){this.updateXCrosshairLine(),this.updateYCrosshairLine()}generateNodeData(){return[]}getNodeData(){return[]}updateNodes(){}updateXCrosshairLine(){}updateYCrosshairLine(){}highlightDatum(e){this.updateNodes()}dehighlightDatum(){this.highlightedDatum=void 0,this.updateNodes(),this.updateCrosshairs()}onMouseMove(e){this.mouseMoveEvent=e,this.updateHitPoint(e)}updateHitPoint(e){var t,i,n;const s=this.pickClosestSeriesNodeDatum(e.offsetX,e.offsetY);if(!s)return;const r=this.highlightedDatum;this.highlightedDatum=s,(this.highlightedDatum&&!r||this.highlightedDatum&&r&&this.highlightedDatum!==r)&&(this.highlightDatum(s),this.updateCrosshairs(),this.scene.render().catch(e=>console.error("AG Grid - chart rendering failed",e))),(null==(n=null==(i=null==(t=this.processedOptions)?void 0:t.tooltip)?void 0:i.enabled)||n)&&this.handleTooltip(e,s)}onMouseOut(e){this.dehighlightDatum(),this.tooltip.toggle(!1),this.scene.render().catch(e=>console.error("AG Grid - chart rendering failed",e))}processData(){const{data:e,yData:t,xData:i}=this;if(!e||this.invalidData(this.data))return;t.length=0,i.length=0;const n=e.length,s=this.getDataType(e);this.dataType=s;const{type:r}=this.axis,o="number"!==r&&"time"!==r?"category":r,a="number"===o||"time"===o,l=(e,t)=>{null==this.smallestInterval&&(this.smallestInterval={x:1/0,y:1/0});const{x:i}=this.smallestInterval,n=Math.abs(e-t);n>0&&n<i&&(this.smallestInterval.x=n)};let c;if("number"===s)for(let s=0;s<n;s++){const n=s,r=e[s],h=this.getDatum(n,o),d=this.getDatum(r,"number");a&&l(h,c),i.push(h),t.push(d),c=h}else if("array"===s)for(let s=0;s<n;s++){const n=e[s];if(Array.isArray(n)){const e=n[0],s=n[1],r=this.getDatum(e,o),h=this.getDatum(s,"number");if(null==r)continue;a&&l(r,c),i.push(r),t.push(h),c=r}}else if("object"===s){const{yKey:s,xKey:r}=this;for(let h=0;h<n;h++){const n=e[h];if("object"==typeof n&&!Array.isArray(n)){const e=n[r],h=n[s],d=this.getDatum(e,o),u=this.getDatum(h,"number");if(null==d)continue;a&&l(d,c),i.push(d),t.push(u),c=d}}}this.updateAxes(),this.immediateLayout()}getDataType(e){for(const t of e)if(null!=t){if(wm(t))return"number";if(Array.isArray(t))return"array";if("object"==typeof t)return"object"}}getDatum(e,t){if("number"===t&&wm(e)||"time"===t&&(wm(e)||Mm(e)))return e;if("category"===t){if(xm(e)||Mm(e)||wm(e))return{toString:()=>String(e)};if(Em(e))return e}}get layoutScheduled(){return!!this.layoutId}scheduleLayout(){this.layoutId&&cancelAnimationFrame(this.layoutId),this.layoutId=requestAnimationFrame(()=>{this.immediateLayout(),this.layoutId=0})}immediateLayout(){this.setSparklineDimensions(),this.invalidData(this.data)||(this.updateXScaleRange(),this.updateYScaleRange(),this.updateAxisLine(),this.update(),this.scene.render().catch(e=>console.error("AG Grid - chart rendering failed",e)))}setSparklineDimensions(){const{width:e,height:t,padding:i,seriesRect:n,rootGroup:s}=this,r=e-i.left-i.right,o=t-i.top-i.bottom;n.width=r,n.height=o,n.x=i.left,n.y=i.top,s.translationX=n.x,s.translationY=n.y}pickClosestSeriesNodeDatum(e,t){let i,n=1/0;const s=this.rootGroup.transformPoint(e,t),r=this.getNodeData();for(let e=0;e<r.length;e++){const t=r[e];if(!t.point)return;const o=this.getDistance(s,t.point);o<=n&&(n=o,i=t)}return i}getDistance(e,t){return Math.abs(e.x-t.x)}handleTooltip(e,t){var i,n;const{seriesDatum:s}=t,{canvasElement:r}=this,{clientX:o,clientY:a}=e,l=null==(i=this.processedOptions)?void 0:i.tooltip,c={pageX:o,pageY:a,position:{xOffset:null==l?void 0:l.xOffset,yOffset:null==l?void 0:l.yOffset},container:null==l?void 0:l.container};null==c.container&&(c.container=r);const h=s.y,d=s.x;let u=null==(n=null==l?void 0:l.enabled)||n;const p=null==l?void 0:l.renderer;if(p){const e=p({context:this.context,datum:s,yValue:h,xValue:d});u="string"!=typeof e&&void 0!==e.enabled?e.enabled:u}const g=u&&void 0!==s.y&&this.getTooltipHtml(t);g&&this.tooltip.show(c,g)}formatNumericDatum(e){return String(Math.round(10*e)/10)}formatDatum(e){const t=this.axis.type||"category";return"number"===t&&"number"==typeof e?this.formatNumericDatum(e):"time"===t&&(e instanceof Date||wm(e))?this.defaultDateFormatter.format(e):String(e)}setupDomEventListeners(e){e.addEventListener("mousemove",this._onMouseMove),e.addEventListener("mouseout",this._onMouseOut)}cleanupDomEventListeners(e){e.removeEventListener("mousemove",this._onMouseMove),e.removeEventListener("mouseout",this._onMouseOut)}invalidData(e){return!e||!Array.isArray(e)}destroy(){this.cleanupDomEventListeners(this.canvasElement),this.scene.destroy(),this.container=void 0}};km.tooltipDocuments=[];var Pm=km;function Nm(e,t){var i,n,s;if("string"==typeof e)return e;t=null!=t?t:{};const{content:r=(null!=(i=t.content)?i:""),title:o=(null!=(n=t.title)?n:void 0),color:a=t.color,backgroundColor:l=t.backgroundColor,opacity:c=(null!=(s=t.opacity)?s:1)}=e;let h,d;a?(h=o?`<span class="${_m.class}-title"; style="color: ${a}">${o}</span>`:"",d=`<span class="${_m.class}-content" style="color: ${a}">${r}</span>`):(h=o?`<span class="${_m.class}-title">${o}</span>`:"",d=`<span class="${_m.class}-content">${r}</span>`);let u=`opacity: ${c}`;return l&&(u+=`; background-color: ${l.toLowerCase()}`),`<div class="${_m.class}" style="${u}">\n                ${h}\n                ${d}\n            </div>`}var Om=class e{constructor(){this.element=document.createElement("div"),document.body.appendChild(this.element)}isVisible(){const{element:t}=this;if(t.classList)return!t.classList.contains(`${e.class}-wrapper-hidden`);const i=t.getAttribute("class");return!!i&&i.split(" ").indexOf(`${e.class}-wrapper-hidden`)<0}updateClass(t){const i=[`${e.class}-wrapper`];!0!==t&&i.push(`${e.class}-wrapper-hidden`),this.element.setAttribute("class",i.join(" "))}show(e,t){var i,n,s,r;this.toggle(!1);const{element:o}=this;if(void 0!==t)o.innerHTML=t;else if(!o.innerHTML)return;const a=null!=(n=null==(i=e.position)?void 0:i.xOffset)?n:10,l=null!=(r=null==(s=e.position)?void 0:s.yOffset)?r:0;let c=e.pageX+a,h=e.pageY+l;const d=o.getBoundingClientRect();let u=window.innerWidth-d.width;if(e.container){const t=e.container.getBoundingClientRect();u=t.left+(t.width-d.width)}c>u&&(c=e.pageX-o.clientWidth-a),"undefined"!=typeof scrollX&&(c+=scrollX),"undefined"!=typeof scrollY&&(h+=scrollY),o.style.left=`${Math.round(c)}px`,o.style.top=`${Math.round(h)}px`,this.toggle(!0)}toggle(e){this.updateClass(e)}destroy(){const{parentNode:e}=this.element;e&&e.removeChild(this.element)}};Om.class="ag-sparkline-tooltip";var _m=Om;function Fm(e){switch(e){case"circle":default:return am._Scene.Circle;case"square":return am._Scene.Square;case"diamond":return am._Scene.Diamond}}function Gm(e,t="solid"){const i={solid:[],dash:[4,3],dot:[1,3],dashDot:[4,3,1,3],dashDotDot:[4,3,1,3,1,3],shortDot:[1,1],shortDash:[3,1],shortDashDot:[3,1,1,1],shortDashDotDot:[3,1,1,1,1,1],longDash:[8,3],longDashDot:[8,3,1,3],longDashDotDot:[8,3,1,3,1,3]},n={solid:[],dash:[3,3],dot:[0,3],dashDot:[3,3,0,3],dashDotDot:[3,3,0,3,0,3],shortDot:[0,2],shortDash:[2,2],shortDashDot:[2,2,0,2],shortDashDotDot:[2,2,0,2,0,2],longDash:[7,3],longDashDot:[7,3,0,3],longDashDotDot:[7,3,0,3,0,3]};return"round"===e||"square"===e?null==n[t]?(console.warn(`'${t}' is not a valid 'lineDash' option.`),n.solid):n[t]:null==i[t]?(console.warn(`'${t}' is not a valid 'lineDash' option.`),i.solid):i[t]}var{extent:Vm}=rm._Util,{BandScale:Bm}=rm._Scale,Hm=class{constructor(){this.enabled=!0,this.shape="circle",this.size=0,this.fill="rgb(124, 181, 236)",this.stroke="rgb(124, 181, 236)",this.strokeWidth=1,this.formatter=void 0}},zm=class{constructor(){this.stroke="rgb(124, 181, 236)",this.strokeWidth=1}},Um=class{constructor(){this.xLine={enabled:!0,stroke:"rgba(0,0,0, 0.54)",strokeWidth:1,lineDash:"solid",lineCap:void 0},this.yLine={enabled:!1,stroke:"rgba(0,0,0, 0.54)",strokeWidth:1,lineDash:"solid",lineCap:void 0}}},Wm=class extends Pm{constructor(){super(),this.fill="rgba(124, 181, 236, 0.25)",this.strokePath=new rm._Scene.Path,this.fillPath=new rm._Scene.Path,this.xCrosshairLine=new rm._Scene.Line,this.yCrosshairLine=new rm._Scene.Line,this.areaSparklineGroup=new rm._Scene.Group,this.xAxisLine=new rm._Scene.Line,this.markers=new rm._Scene.Group,this.markerSelection=rm._Scene.Selection.select(this.markers,()=>this.markerFactory()),this.markerSelectionData=[],this.marker=new Hm,this.line=new zm,this.crosshairs=new Um,this.rootGroup.append(this.areaSparklineGroup),this.xAxisLine.zIndex=500,this.fillPath.zIndex=50,this.strokePath.zIndex=1e3,this.xCrosshairLine.zIndex=2e3,this.yCrosshairLine.zIndex=2e3,this.markers.zIndex=2500,this.areaSparklineGroup.append([this.fillPath,this.xAxisLine,this.strokePath,this.xCrosshairLine,this.yCrosshairLine,this.markers])}markerFactory(){const{shape:e}=this.marker;return new(Fm(e))}getNodeData(){return this.markerSelectionData}update(){const e=this.generateNodeData();if(!e)return;const{nodeData:t,fillData:i,strokeData:n}=e;this.markerSelectionData=t,this.updateSelection(t),this.updateNodes(),this.updateStroke(n),this.updateFill(i)}updateYScaleDomain(){const{yData:e,yScale:t}=this,i=Vm(e);let n=0,s=1;void 0!==i&&(n=this.min=i[0],s=this.max=i[1]),n=n<0?n:0,s=s<0?0:s,t.domain=[n,s]}generateNodeData(){const{data:e,yData:t,xData:i,xScale:n,yScale:s}=this;if(!e)return;const r=!(n instanceof Bm),o=r?0:n.bandwidth/2,a=t.length,l=[],c=[],h=[];let d,u,p,g;const f=s.convert(0);for(let e=0;e<a;e++){const m=t[e],v=i[e],y=n.convert(r?n.toDomain(v):v)+o,C=void 0===m?NaN:s.convert(m);e+1<a&&(g=n.convert(r?n.toDomain(i[e+1]):i[e+1])+o),h.push({seriesDatum:{x:v,y:m},point:{x:y,y:C}}),void 0===m&&void 0!==p?(c.push({seriesDatum:void 0,point:{x:p,y:f}}),void 0!==g&&c.push({seriesDatum:void 0,point:{x:g,y:f}})):void 0!==m&&(c.push({seriesDatum:{x:v,y:m},point:{x:y,y:C}}),l.push({seriesDatum:{x:v,y:m},point:{x:y,y:C}}),d=void 0!==d?d:y,u=y),p=y}return c.push({seriesDatum:void 0,point:{x:u,y:f}},{seriesDatum:void 0,point:{x:d,y:f}}),{nodeData:l,fillData:c,strokeData:h}}updateAxisLine(){const{xScale:e,yScale:t,axis:i,xAxisLine:n}=this;n.x1=e.range[0],n.x2=e.range[1],n.y1=n.y2=0,n.stroke=i.stroke,n.strokeWidth=i.strokeWidth;const s=t.convert(0);n.translationY=s}updateSelection(e){this.markerSelection.update(e)}updateNodes(){const{highlightedDatum:e,highlightStyle:t,marker:i}=this,{size:n,fill:s,stroke:r,strokeWidth:o}=t,a=i.formatter;this.markerSelection.each((t,l,c)=>{const{point:h,seriesDatum:d}=l;if(!h)return;const u=l===e,p=u&&void 0!==s?s:i.fill,g=u&&void 0!==r?r:i.stroke,f=u&&void 0!==o?o:i.strokeWidth,m=u&&void 0!==n?n:i.size;let v;if(a){const e=0===c,t=c===this.markerSelectionData.length-1,i=d.y===this.min,n=d.y===this.max;v=a({datum:l,xValue:d.x,yValue:d.y,min:i,max:n,first:e,last:t,fill:p,stroke:g,strokeWidth:f,size:m,highlighted:u})}t.size=v&&null!=v.size?v.size:m,t.fill=v&&null!=v.fill?v.fill:p,t.stroke=v&&null!=v.stroke?v.stroke:g,t.strokeWidth=v&&null!=v.strokeWidth?v.strokeWidth:f,t.translationX=h.x,t.translationY=h.y,t.visible=v&&null!=v.enabled?v.enabled:i.enabled&&t.size>0})}updateStroke(e){const{strokePath:t,yData:i,line:n}=this,s=t.path;if(s.clear(),i.length<2)return;const r=e.length;let o=!0;for(let t=0;t<r;t++){const{point:i,seriesDatum:n}=e[t],r=i.x,a=i.y;null==n.y?o=!0:o?(s.moveTo(r,a),o=!1):s.lineTo(r,a)}t.lineJoin=t.lineCap="round",t.fill=void 0,t.stroke=n.stroke,t.strokeWidth=n.strokeWidth}updateFill(e){const{fillPath:t,yData:i,fill:n}=this,s=t.path,r=e.length;if(s.clear(),!(i.length<2)){for(let t=0;t<r;t++){const{point:i}=e[t],n=i.x,r=i.y;t>0?s.lineTo(n,r):s.moveTo(n,r)}s.closePath(),t.lineJoin="round",t.stroke=void 0,t.fill=n}}updateXCrosshairLine(){var e;const{yScale:t,xCrosshairLine:i,highlightedDatum:n,crosshairs:{xLine:s}}=this;if(!s.enabled||null==n)return void(i.strokeWidth=0);i.y1=t.range[0],i.y2=t.range[1],i.x1=i.x2=0,i.stroke=s.stroke,i.strokeWidth=null!=(e=s.strokeWidth)?e:1,i.lineCap="round"===s.lineCap||"square"===s.lineCap?s.lineCap:void 0;const{lineDash:r}=s;i.lineDash=Array.isArray(r)?r:Gm(i.lineCap,s.lineDash),i.translationX=n.point.x}updateYCrosshairLine(){var e;const{xScale:t,yCrosshairLine:i,highlightedDatum:n,crosshairs:{yLine:s}}=this;if(!s.enabled||null==n)return void(i.strokeWidth=0);i.x1=t.range[0],i.x2=t.range[1],i.y1=i.y2=0,i.stroke=s.stroke,i.strokeWidth=null!=(e=s.strokeWidth)?e:1,i.lineCap="round"===s.lineCap||"square"===s.lineCap?s.lineCap:void 0;const{lineDash:r}=s;i.lineDash=Array.isArray(r)?r:Gm(i.lineCap,s.lineDash),i.translationY=n.point.y}getTooltipHtml(e){var t,i;const{dataType:n}=this,{seriesDatum:s}=e,r=s.y,o=s.x,a={content:this.formatNumericDatum(r),title:"array"===n||"object"===n?this.formatDatum(o):void 0},l=null==(i=null==(t=this.processedOptions)?void 0:t.tooltip)?void 0:i.renderer;return l?Nm(l({context:this.context,datum:s,yValue:r,xValue:o}),a):Nm(a)}};Wm.className="AreaSparkline";var{extent:jm}=lm._Util,{BandScale:Km}=lm._Scale,$m=class{constructor(){this.enabled=!0,this.shape="circle",this.size=0,this.fill="rgb(124, 181, 236)",this.stroke="rgb(124, 181, 236)",this.strokeWidth=1,this.formatter=void 0}},Ym=class{constructor(){this.stroke="rgb(124, 181, 236)",this.strokeWidth=1}},qm=class{constructor(){this.xLine={enabled:!0,stroke:"rgba(0,0,0, 0.54)",strokeWidth:1,lineDash:"solid",lineCap:void 0},this.yLine={enabled:!1,stroke:"rgba(0,0,0, 0.54)",strokeWidth:1,lineDash:"solid",lineCap:void 0}}},Xm=class extends Pm{constructor(){super(),this.linePath=new lm._Scene.Path,this.xCrosshairLine=new lm._Scene.Line,this.yCrosshairLine=new lm._Scene.Line,this.lineSparklineGroup=new lm._Scene.Group,this.markers=new lm._Scene.Group,this.markerSelection=lm._Scene.Selection.select(this.markers,()=>this.markerFactory()),this.markerSelectionData=[],this.marker=new $m,this.line=new Ym,this.crosshairs=new qm,this.rootGroup.append(this.lineSparklineGroup),this.linePath.zIndex=1e3,this.xCrosshairLine.zIndex=2e3,this.yCrosshairLine.zIndex=2e3,this.markers.zIndex=2500,this.lineSparklineGroup.append([this.linePath,this.xCrosshairLine,this.yCrosshairLine,this.markers])}getNodeData(){return this.markerSelectionData}markerFactory(){const{shape:e}=this.marker;return new(Fm(e))}onMarkerShapeChange(){this.markerSelection=this.markerSelection.clear(),this.scheduleLayout()}update(){const e=this.generateNodeData();e&&(this.markerSelectionData=e,this.updateSelection(e),this.updateNodes(),this.updateLine())}updateYScaleDomain(){const{yData:e,yScale:t}=this,i=jm(e);let n=0,s=1;if(void 0!==i&&(n=this.min=i[0],s=this.max=i[1]),n===s){const e=Math.abs(.01*n);n-=e,s+=e}t.domain=[n,s]}generateNodeData(){const{data:e,yData:t,xData:i,xScale:n,yScale:s}=this;if(!e)return;const r=!(n instanceof Km),o=r?0:n.bandwidth/2,a=[];for(let e=0;e<t.length;e++){const l=t[e],c=i[e];if(null==l)continue;const h=n.convert(r?n.toDomain(c):c)+o,d=void 0===l?NaN:s.convert(l);a.push({seriesDatum:{x:c,y:l},point:{x:h,y:d}})}return a}updateSelection(e){this.markerSelection.update(e)}updateNodes(){const{highlightedDatum:e,highlightStyle:t,marker:i}=this,{size:n,fill:s,stroke:r,strokeWidth:o}=t,a=i.formatter;this.markerSelection.each((t,l,c)=>{const h=l===e,d=h&&void 0!==s?s:i.fill,u=h&&void 0!==r?r:i.stroke,p=h&&void 0!==o?o:i.strokeWidth,g=h&&void 0!==n?n:i.size;let f;const{seriesDatum:m,point:v}=l;if(a){const e=0===c,t=c===this.markerSelectionData.length-1,i=m.y===this.min,n=m.y===this.max;f=a({datum:l,xValue:m.x,yValue:m.y,min:i,max:n,first:e,last:t,fill:d,stroke:u,strokeWidth:p,size:g,highlighted:h})}t.size=f&&null!=f.size?f.size:g,t.fill=f&&null!=f.fill?f.fill:d,t.stroke=f&&null!=f.stroke?f.stroke:u,t.strokeWidth=f&&null!=f.strokeWidth?f.strokeWidth:p,t.translationX=v.x,t.translationY=v.y,t.visible=f&&null!=f.enabled?f.enabled:i.enabled&&t.size>0})}updateLine(){const{linePath:e,yData:t,xData:i,xScale:n,yScale:s,line:r}=this,o=e.path;if(o.clear(),t.length<2)return;const a=!(n instanceof Km),l=t.length,c=a?0:n.bandwidth/2;let h=!0;for(let e=0;e<l;e++){const r=i[e],l=t[e],d=n.convert(a?n.toDomain(r):r)+c,u=void 0===l?NaN:s.convert(l);null==l?h=!0:h?(o.moveTo(d,u),h=!1):o.lineTo(d,u)}e.fill=void 0,e.stroke=r.stroke,e.strokeWidth=r.strokeWidth}updateXCrosshairLine(){var e;const{yScale:t,xCrosshairLine:i,highlightedDatum:n,crosshairs:{xLine:s}}=this;if(!s.enabled||null==n)return void(i.strokeWidth=0);i.y1=t.range[0],i.y2=t.range[1],i.x1=i.x2=0,i.stroke=s.stroke,i.strokeWidth=null!=(e=s.strokeWidth)?e:1,i.lineCap="round"===s.lineCap||"square"===s.lineCap?s.lineCap:void 0;const{lineDash:r}=s;i.lineDash=Array.isArray(r)?r:Gm(i.lineCap,s.lineDash),i.translationX=n.point.x}updateYCrosshairLine(){var e;const{xScale:t,yCrosshairLine:i,highlightedDatum:n,crosshairs:{yLine:s}}=this;if(!s.enabled||null==n)return void(i.strokeWidth=0);i.x1=t.range[0],i.x2=t.range[1],i.y1=i.y2=0,i.stroke=s.stroke,i.strokeWidth=null!=(e=s.strokeWidth)?e:1,i.lineCap="round"===s.lineCap||"square"===s.lineCap?s.lineCap:void 0;const{lineDash:r}=s;i.lineDash=Array.isArray(r)?r:Gm(i.lineCap,s.lineDash),i.translationY=n.point.y}getTooltipHtml(e){var t,i;const{dataType:n}=this,{seriesDatum:s}=e,r=s.y,o=s.x,a={content:this.formatNumericDatum(r),title:"array"===n||"object"===n?this.formatDatum(o):void 0},l=null==(i=null==(t=this.processedOptions)?void 0:t.tooltip)?void 0:i.renderer;return l?Nm(l({context:this.context,datum:s,yValue:r,xValue:o}),a):Nm(a)}};Xm.className="LineSparkline";var Zm=class{constructor(){this.enabled=!0,this.fontSize=8,this.fontFamily="Verdana, sans-serif",this.fontStyle=void 0,this.fontWeight=void 0,this.color="rgba(70, 70, 70, 1)"}},{extent:Qm}=hm._Util,Jm=class extends Zm{constructor(){super(...arguments),this.formatter=void 0,this.placement="insideEnd"}},ev=class extends Pm{constructor(){super(),this.fill="rgb(124, 181, 236)",this.stroke="silver",this.strokeWidth=0,this.paddingInner=.1,this.paddingOuter=.2,this.valueAxisDomain=void 0,this.formatter=void 0,this.axisLine=new hm._Scene.Line,this.bandWidth=0,this.sparklineGroup=new hm._Scene.Group,this.rectGroup=new hm._Scene.Group,this.labelGroup=new hm._Scene.Group,this.rectSelection=hm._Scene.Selection.select(this.rectGroup,hm._Scene.Rect),this.labelSelection=hm._Scene.Selection.select(this.labelGroup,hm._Scene.Text),this.nodeSelectionData=[],this.label=new Jm,this.rootGroup.append(this.sparklineGroup),this.rectGroup.zIndex=50,this.axisLine.zIndex=500,this.labelGroup.zIndex=1500,this.sparklineGroup.append([this.rectGroup,this.axisLine,this.labelGroup]),this.axisLine.lineCap="round",this.label.enabled=!1}getNodeData(){return this.nodeSelectionData}update(){this.updateSelections(),this.updateNodes()}updateSelections(){const e=this.generateNodeData();e&&(this.nodeSelectionData=e,this.updateRectSelection(e),this.updateLabelSelection(e))}updateNodes(){this.updateRectNodes(),this.updateLabelNodes()}calculateStep(e){var t;const{xScale:i,paddingInner:n,paddingOuter:s,smallestInterval:r}=this;let o=(i.domain[1]-i.domain[0])/(null!=(t=null==r?void 0:r.x)?t:1)+1;const a=Math.min(o,50),l=a-1;return e/Math.max(1,2*s+l*n+a)}updateYScaleDomain(){const{yScale:e,yData:t,valueAxisDomain:i}=this,n=Qm(t);let s=0,r=1;void 0!==n&&(s=this.min=n[0],r=this.max=n[1]),s=s<0?s:0,r=r<0?0:r,i&&(i[1]<r&&(i[1]=r),i[0]>s&&(i[0]=s)),e.domain=i||[s,r]}updateRectSelection(e){this.rectSelection.update(e)}updateRectNodes(){const{highlightedDatum:e,formatter:t,fill:i,stroke:n,strokeWidth:s}=this,{fill:r,stroke:o,strokeWidth:a}=this.highlightStyle;this.rectSelection.each((l,c,h)=>{const d=c===e,u=d&&void 0!==r?r:i,p=d&&void 0!==o?o:n,g=d&&void 0!==a?a:s;let f;const{x:m,y:v,width:y,height:C,seriesDatum:b}=c;if(t){const e=0===h,i=h===this.nodeSelectionData.length-1,n=b.y===this.min,s=b.y===this.max;f=t({datum:c,xValue:b.x,yValue:b.y,width:y,height:C,min:n,max:s,first:e,last:i,fill:u,stroke:p,strokeWidth:g,highlighted:d})}l.fill=f&&f.fill||u,l.stroke=f&&f.stroke||p,l.strokeWidth=f&&f.strokeWidth||g,l.x=l.y=0,l.width=y,l.height=C,l.visible=l.height>0,l.translationX=m,l.translationY=v})}updateLabelSelection(e){this.labelSelection.update(e,e=>{e.tag=1,e.pointerEvents=hm._Scene.PointerEvents.None})}updateLabelNodes(){const{label:{enabled:e,fontStyle:t,fontWeight:i,fontSize:n,fontFamily:s,color:r}}=this;this.labelSelection.each((o,a)=>{const l=a.label;l&&e?(o.fontStyle=t,o.fontWeight=i,o.fontSize=n,o.fontFamily=s,o.textAlign=l.textAlign,o.textBaseline=l.textBaseline,o.text=l.text,o.x=l.x,o.y=l.y,o.fill=r,o.visible=!0):o.visible=!1})}getTooltipHtml(e){var t,i;const{dataType:n}=this,{seriesDatum:s}=e,r=s.y,o=s.x,a={content:this.formatNumericDatum(r),title:"array"===n||"object"===n?this.formatDatum(o):void 0},l=null==(i=null==(t=this.processedOptions)?void 0:t.tooltip)?void 0:i.renderer;return l?Nm(l({context:this.context,datum:s,yValue:r,xValue:o}),a):Nm(a)}formatLabelValue(e){return e%1!=0?e.toFixed(1):e.toFixed(0)}},{isNumber:tv}=cm._Util,{BandScale:iv}=cm._Scale,nv=class extends ev{updateYScaleRange(){const{seriesRect:e,yScale:t}=this;t.range=[0,e.width]}updateXScaleRange(){const{xScale:e,seriesRect:t,paddingOuter:i,paddingInner:n}=this;if(e instanceof iv)e.range=[0,t.height],e.paddingInner=n,e.paddingOuter=i;else{const s=this.calculateStep(t.height),r=s*i;this.bandWidth=s*(1-n),e.range=[r,t.height-r-this.bandWidth]}}updateAxisLine(){const{yScale:e,axis:t,axisLine:i,seriesRect:n}=this,{strokeWidth:s}=t;i.x1=0,i.x2=0,i.y1=0,i.y2=n.height,i.stroke=t.stroke,i.strokeWidth=s+(s%2==1?1:0);const r=e.convert(0);i.translationX=r}generateNodeData(){const{data:e,yData:t,xData:i,xScale:n,yScale:s,fill:r,stroke:o,strokeWidth:a,label:l}=this;if(!e)return;const{fontStyle:c,fontWeight:h,fontSize:d,fontFamily:u,color:p,formatter:g,placement:f}=l,m=[],v=s.convert(0),y=!(n instanceof iv);for(let e=0,l=t.length;e<l;e++){let l=t[e];const C=i[e],b=void 0===l;b&&(l=0);const S=n.convert(y?n.toDomain(C):C),w=Math.min(void 0===l?NaN:s.convert(l),v),x=Math.max(void 0===l?NaN:s.convert(l),v),E=y?this.bandWidth:n.bandwidth,M=x-w,A={x:v,y:S};let T;T=g?g({value:l}):void 0!==l&&tv(l)?this.formatLabelValue(l):"";const D=S+E/2;let I;const R="middle";let L;const k=void 0!==l&&l>=0,P=4;if("center"===f)I=w+M/2,L="center";else if("outsideEnd"===f)I=w+(k?M+P:-P),L=k?"start":"end";else if("insideEnd"===f){I=w+(k?M-P:P),L=k?"end":"start";const e=cm._Scene.Text.getTextSize(T,u).width||20;(k&&I<v+e||!k&&I>v-e)&&(I=v+P*(k?1:-1),L=k?"start":"end")}else I=v+P*(k?1:-1),L=k?"start":"end";m.push({x:w,y:S,width:M,height:E,fill:r,stroke:o,strokeWidth:a,seriesDatum:{x:C,y:b?void 0:l},point:A,label:{x:I,y:D,text:T,fontStyle:c,fontWeight:h,fontSize:d,fontFamily:u,textAlign:L,textBaseline:R,fill:p}})}return m}getDistance(e,t){return Math.abs(e.y-t.y)}};nv.className="BarSparkline";var{isNumber:sv}=dm._Util,{BandScale:rv}=dm._Scale,ov=class extends ev{updateYScaleRange(){const{seriesRect:e,yScale:t}=this;t.range=[e.height,0]}updateXScaleRange(){const{xScale:e,seriesRect:t,paddingOuter:i,paddingInner:n}=this;if(e instanceof rv)e.range=[0,t.width],e.paddingInner=n,e.paddingOuter=i;else{const s=this.calculateStep(t.width),r=s*i;this.bandWidth=s*(1-n),e.range=[r,t.width-r-this.bandWidth]}}updateAxisLine(){const{yScale:e,axis:t,axisLine:i,seriesRect:n}=this,{strokeWidth:s}=t;i.x1=0,i.x2=n.width,i.y1=0,i.y2=0,i.stroke=t.stroke,i.strokeWidth=s+(s%2==1?1:0);const r=e.convert(0);i.translationY=r}generateNodeData(){const{data:e,yData:t,xData:i,xScale:n,yScale:s,fill:r,stroke:o,strokeWidth:a,label:l}=this;if(!e)return;const{fontStyle:c,fontWeight:h,fontSize:d,fontFamily:u,color:p,formatter:g,placement:f}=l,m=[],v=s.convert(0),y=!(n instanceof rv);for(let e=0,l=t.length;e<l;e++){let l=t[e];const C=i[e],b=void 0===l;b&&(l=0);const S=Math.min(void 0===l?NaN:s.convert(l),v),w=n.convert(y?n.toDomain(C):C),x=Math.max(void 0===l?NaN:s.convert(l),v),E=y?this.bandWidth:n.bandwidth,M=x-S,A={x:w+E/2,y:v};let T;T=g?g({value:l}):void 0!==l&&sv(l)?this.formatLabelValue(l):"";const D=w+E/2;let I;const R="center";let L;const k=void 0!==l&&l>=0,P=2;if("center"===f)I=S+M/2,L="middle";else if("outsideEnd"===f)I=S+(k?-P:M+P),L=k?"bottom":"top";else if("insideEnd"===f){I=S+(k?P:M-P),L=k?"top":"bottom";const e=dm._Scene.Text.getTextSize(T,u).height||10;(k&&I>v-e||!k&&I<v+e)&&(I=v+P*(k?-1:1),L=k?"bottom":"top")}else I=v+P*(k?-1:1),L=k?"bottom":"top";m.push({x:w,y:S,width:E,height:M,fill:r,stroke:o,strokeWidth:a,seriesDatum:{x:C,y:b?void 0:l},point:A,label:{x:D,y:I,text:T,fontStyle:c,fontWeight:h,fontSize:d,fontFamily:u,textAlign:R,textBaseline:L,fill:p}})}return m}};ov.className="ColumnSparkline";var{isNumber:av}=um._Util,lv=class{static create(e,t){const i=function(e="line"){switch(e){case"column":return new ov;case"bar":return new nv;case"area":return new Wm;default:return new Xm}}((e=um._Util.deepClone(e)).type);return t&&(i.tooltip=t),function(e,t){mv(e,"context",t.context,t),mv(e,"width",t.width,t),mv(e,"height",t.height,t),mv(e,"container",t.container,t),mv(e,"xKey",t.xKey,t),mv(e,"yKey",t.yKey,t),t.padding&&function(e,t){mv(e,"top",t.top,t),mv(e,"right",t.right,t),mv(e,"bottom",t.bottom,t),mv(e,"left",t.left,t)}(e.padding,t.padding),t.axis&&function(e,t){mv(e,"type",t.type,t),mv(e,"stroke",t.stroke,t),mv(e,"strokeWidth",t.strokeWidth,t)}(e.axis,t.axis),t.highlightStyle&&function(e,t){mv(e,"fill",t.fill,t),mv(e,"size",t.size,t),mv(e,"stroke",t.stroke,t),mv(e,"strokeWidth",t.strokeWidth,t)}(e.highlightStyle,t.highlightStyle)}(i,e),function(e,t){switch(t.type){case"bar":case"column":!function(e,t){mv(e,"valueAxisDomain",t.valueAxisDomain,t),mv(e,"fill",t.fill,t),mv(e,"stroke",t.stroke,t),mv(e,"strokeWidth",t.strokeWidth,t),mv(e,"paddingInner",t.paddingInner,t),mv(e,"paddingOuter",t.paddingOuter,t),mv(e,"formatter",t.formatter,t),t.label&&function(e,t){mv(e,"enabled",t.enabled,t),mv(e,"fontStyle",t.fontStyle,t),mv(e,"fontWeight",t.fontWeight,t),mv(e,"fontSize",t.fontSize,t),mv(e,"fontFamily",t.fontFamily,t),mv(e,"textAlign",t.textAlign,t),mv(e,"textBaseline",t.textBaseline,t),mv(e,"color",t.color,t),mv(e,"formatter",t.formatter,t),mv(e,"placement",t.placement,t)}(e.label,t.label)}(e,t);break;case"area":!function(e,t){mv(e,"fill",t.fill,t),t.marker&&cv(e.marker,t.marker),t.line&&hv(e.line,t.line),t.crosshairs&&dv(e.crosshairs,t.crosshairs)}(e,t);break;default:!function(e,t){t.marker&&cv(e.marker,t.marker),t.line&&hv(e.line,t.line),t.crosshairs&&dv(e.crosshairs,t.crosshairs)}(e,t)}}(i,e),e.data&&(i.data=e.data),i.processedOptions=e,i}};function cv(e,t){mv(e,"enabled",t.enabled,t),mv(e,"size",t.size,t),mv(e,"shape",t.shape,t),mv(e,"fill",t.fill,t),mv(e,"stroke",t.stroke,t),mv(e,"strokeWidth",t.strokeWidth,t),mv(e,"formatter",t.formatter,t)}function hv(e,t){mv(e,"stroke",t.stroke,t),mv(e,"strokeWidth",t.strokeWidth,t)}function dv(e,t){e.xLine&&t.xLine&&uv(e.xLine,t.xLine),e.yLine&&t.yLine&&uv(e.yLine,t.yLine)}function uv(e,t){mv(e,"enabled",t.enabled,t),mv(e,"stroke",t.stroke,t),mv(e,"strokeWidth",t.strokeWidth,t),mv(e,"lineDash",t.lineDash,t),mv(e,"lineCap",t.lineCap,t)}var pv={},gv=(e,t,i)=>{if(av(t))return!0;const n=`AG Charts: ${e} must be a number, the value you provided is not a valid number. Using the default of ${i}px.`;var s,r;return s=()=>console.warn(n),pv[r=`${e} not a number`]||(s(),pv[r]=!0),!1},fv={xOffset:gv,yOffset:gv};function mv(e,t,i,n){if(t in n)if(t in e){const n=fv[t];(!n||n(t,i,e[t]))&&e[t]!==i&&(e[t]=i)}else console.warn(`Property ${t} does not exist on the target object.`)}var vv=class e extends sm.Component{constructor(){super(e.TEMPLATE)}init(e){let t=!0;const i=this.resizeObserverService.observeResize(this.getGui(),()=>{const{clientWidth:i,clientHeight:n}=this.getGui();if(0!==i&&0!==n)if(t){const s=((e,t)=>{for(var i in t||(t={}))vm.call(t,i)&&Cm(e,i,t[i]);if(mm)for(var i of mm(t))ym.call(t,i)&&Cm(e,i,t[i]);return e})({data:e.value,width:i,height:n,context:{data:e.data}},e.sparklineOptions);this.sparkline=lv.create(s,this.sparklineTooltipSingleton.getSparklineTooltip()),this.eSparkline.appendChild(this.sparkline.canvasElement),t=!1}else this.sparkline.width=i,this.sparkline.height=n});this.addDestroyFunc(()=>i())}refresh(e){return!!this.sparkline&&(this.sparkline.data=e.value,!0)}destroy(){this.sparkline&&this.sparkline.destroy(),super.destroy()}};vv.TEMPLATE='<div class="ag-sparkline-wrapper">\n            <span ref="eSparkline"></span>\n        </div>',bm([(0,sm.RefSelector)("eSparkline")],vv.prototype,"eSparkline",2),bm([(0,sm.Autowired)("resizeObserverService")],vv.prototype,"resizeObserverService",2),bm([(0,sm.Autowired)("sparklineTooltipSingleton")],vv.prototype,"sparklineTooltipSingleton",2);var yv=vv,Cv=class extends pm.BeanStub{postConstruct(){this.tooltip=new _m}getSparklineTooltip(){return this.tooltip}destroyTooltip(){this.tooltip&&this.tooltip.destroy()}};bm([pm.PostConstruct],Cv.prototype,"postConstruct",1),bm([pm.PreDestroy],Cv.prototype,"destroyTooltip",1),Cv=bm([(0,pm.Bean)("sparklineTooltipSingleton")],Cv);var bv={version:"31.3.4",moduleName:nm.ModuleNames.SparklinesModule,beans:[Cv],userComponents:[{componentName:"agSparklineCellRenderer",componentClass:yv}],dependantModules:[D]},Sv=i(98092),wv=i(98092),xv=class extends wv.BeanStub{constructor(){super(),this.allComponents=new Map}registerStatusPanel(e,t){this.allComponents.set(e,t)}unregisterStatusPanel(e){this.allComponents.delete(e)}unregisterAllComponents(){this.allComponents.clear()}getStatusPanel(e){return this.allComponents.get(e)}destroy(){this.unregisterAllComponents(),super.destroy()}};xv=d([(0,wv.Bean)("statusBarService")],xv);var Ev=i(98092),Mv=class e extends Ev.Component{constructor(){super(e.TEMPLATE),this.compDestroyFunctions={}}postConstruct(){this.processStatusPanels(new Map),this.addManagedPropertyListeners(["statusBar"],this.handleStatusBarChanged.bind(this))}processStatusPanels(e){var t;const i=null==(t=this.gos.get("statusBar"))?void 0:t.statusPanels;if(i){const t=i.filter(e=>"left"===e.align);this.createAndRenderComponents(t,this.eStatusBarLeft,e);const n=i.filter(e=>"center"===e.align);this.createAndRenderComponents(n,this.eStatusBarCenter,e);const s=i.filter(e=>!e.align||"right"===e.align);this.createAndRenderComponents(s,this.eStatusBarRight,e)}else this.setDisplayed(!1)}handleStatusBarChanged(){var e;const t=null==(e=this.gos.get("statusBar"))?void 0:e.statusPanels,i=Array.isArray(t)&&t.length>0;this.setDisplayed(i);const n=new Map;i&&t.forEach(e=>{var t,i;const s=null!=(t=e.key)?t:e.statusPanel,r=this.statusBarService.getStatusPanel(s);if(null==r?void 0:r.refresh){const t=this.gos.addGridCommonParams(null!=(i=e.statusPanelParams)?i:{});r.refresh(t)&&(n.set(s,r),delete this.compDestroyFunctions[s],Ev._.removeFromParent(r.getGui()))}}),this.resetStatusBar(),i&&this.processStatusPanels(n)}resetStatusBar(){this.eStatusBarLeft.innerHTML="",this.eStatusBarCenter.innerHTML="",this.eStatusBarRight.innerHTML="",this.destroyComponents(),this.statusBarService.unregisterAllComponents()}destroyComponents(){Object.values(this.compDestroyFunctions).forEach(e=>e()),this.compDestroyFunctions={}}createAndRenderComponents(e,t,i){const n=[];e.forEach(e=>{const t=e.key||e.statusPanel,s=i.get(t);let r;if(s)r=Ev.AgPromise.resolve(s);else{const t={};if(r=this.userComponentFactory.getStatusPanelCompDetails(e,t).newAgStackInstance(),!r)return}n.push({key:t,promise:r})}),Ev.AgPromise.all(n.map(e=>e.promise)).then(()=>{n.forEach(e=>{e.promise.then(i=>{const n=()=>{this.getContext().destroyBean(i)};this.isAlive()?(this.statusBarService.registerStatusPanel(e.key,i),t.appendChild(i.getGui()),this.compDestroyFunctions[e.key]=n):n()})})})}};Mv.TEMPLATE='<div class="ag-status-bar">\n            <div ref="eStatusBarLeft" class="ag-status-bar-left" role="status"></div>\n            <div ref="eStatusBarCenter" class="ag-status-bar-center" role="status"></div>\n            <div ref="eStatusBarRight" class="ag-status-bar-right" role="status"></div>\n        </div>',d([(0,Ev.Autowired)("userComponentFactory")],Mv.prototype,"userComponentFactory",2),d([(0,Ev.Autowired)("statusBarService")],Mv.prototype,"statusBarService",2),d([(0,Ev.RefSelector)("eStatusBarLeft")],Mv.prototype,"eStatusBarLeft",2),d([(0,Ev.RefSelector)("eStatusBarCenter")],Mv.prototype,"eStatusBarCenter",2),d([(0,Ev.RefSelector)("eStatusBarRight")],Mv.prototype,"eStatusBarRight",2),d([Ev.PostConstruct],Mv.prototype,"postConstruct",1),d([Ev.PreDestroy],Mv.prototype,"destroyComponents",1);var Av=Mv,Tv=i(98092),Dv=class e extends Tv.Component{constructor(){super(e.TEMPLATE)}setLabel(e,t){this.setDisplayed(!1);const i=this.localeService.getLocaleTextFunc();this.eLabel.innerHTML=i(e,t)}setValue(e){this.eValue.innerHTML=e}};Dv.TEMPLATE='<div class="ag-status-name-value">\n            <span ref="eLabel"></span>:&nbsp;\n            <span ref="eValue" class="ag-status-name-value-value"></span>\n        </div>',d([(0,Tv.RefSelector)("eLabel")],Dv.prototype,"eLabel",2),d([(0,Tv.RefSelector)("eValue")],Dv.prototype,"eValue",2);var Iv=Dv,Rv=i(98092),Lv=class extends Iv{postConstruct(){"clientSide"===this.rowModel.getType()?(this.setLabel("totalAndFilteredRows","Rows"),this.addCssClass("ag-status-panel"),this.addCssClass("ag-status-panel-total-and-filtered-row-count"),this.setDisplayed(!0),this.addManagedListener(this.eventService,Rv.Events.EVENT_MODEL_UPDATED,this.onDataChanged.bind(this)),this.onDataChanged()):Rv._.warnOnce("agTotalAndFilteredRowCountComponent should only be used with the client side row model.")}onDataChanged(){const e=this.localeService.getLocaleTextFunc(),t=e("thousandSeparator",","),i=e("decimalSeparator","."),n=Rv._.formatNumberCommas(this.getFilteredRowCountValue(),t,i),s=Rv._.formatNumberCommas(this.getTotalRowCount(),t,i);if(n===s)this.setValue(n);else{const e=this.localeService.getLocaleTextFunc();this.setValue(`${n} ${e("of","of")} ${s}`)}}getFilteredRowCountValue(){let e=0;return this.rowModel.forEachNodeAfterFilter(t=>{t.group||e++}),e}getTotalRowCount(){let e=0;return this.rowModel.forEachNode(t=>{t.group||e++}),e}init(){}refresh(){return!0}destroy(){super.destroy()}};d([(0,Rv.Autowired)("rowModel")],Lv.prototype,"rowModel",2),d([Rv.PostConstruct],Lv.prototype,"postConstruct",1);var kv=i(98092),Pv=class extends Iv{postConstruct(){if(this.setLabel("filteredRows","Filtered"),"clientSide"!==this.rowModel.getType())return void kv._.warnOnce("agFilteredRowCountComponent should only be used with the client side row model.");this.addCssClass("ag-status-panel"),this.addCssClass("ag-status-panel-filtered-row-count"),this.setDisplayed(!0);const e=this.onDataChanged.bind(this);this.addManagedListener(this.eventService,kv.Events.EVENT_MODEL_UPDATED,e),e()}onDataChanged(){const e=this.getTotalRowCountValue(),t=this.getFilteredRowCountValue(),i=this.localeService.getLocaleTextFunc(),n=i("thousandSeparator",","),s=i("decimalSeparator",".");this.setValue(kv._.formatNumberCommas(t,n,s)),this.setDisplayed(e!==t)}getTotalRowCountValue(){let e=0;return this.rowModel.forEachNode(t=>e+=1),e}getFilteredRowCountValue(){let e=0;return this.rowModel.forEachNodeAfterFilter(t=>{t.group||(e+=1)}),e}init(){}refresh(){return!0}destroy(){super.destroy()}};d([(0,kv.Autowired)("rowModel")],Pv.prototype,"rowModel",2),d([kv.PostConstruct],Pv.prototype,"postConstruct",1);var Nv=i(98092),Ov=class extends Iv{postConstruct(){this.setLabel("totalRows","Total Rows"),"clientSide"===this.rowModel.getType()?(this.addCssClass("ag-status-panel"),this.addCssClass("ag-status-panel-total-row-count"),this.setDisplayed(!0),this.addManagedListener(this.eventService,Nv.Events.EVENT_MODEL_UPDATED,this.onDataChanged.bind(this)),this.onDataChanged()):Nv._.warnOnce("agTotalRowCountComponent should only be used with the client side row model.")}onDataChanged(){const e=this.localeService.getLocaleTextFunc(),t=e("thousandSeparator",","),i=e("decimalSeparator",".");this.setValue(Nv._.formatNumberCommas(this.getRowCountValue(),t,i))}getRowCountValue(){let e=0;return this.rowModel.forEachLeafNode(t=>e+=1),e}init(){}refresh(){return!0}destroy(){super.destroy()}};d([(0,Nv.Autowired)("rowModel")],Ov.prototype,"rowModel",2),d([Nv.PostConstruct],Ov.prototype,"postConstruct",1);var _v=i(98092),Fv=class extends Iv{postConstruct(){if(!this.isValidRowModel())return void console.warn("AG Grid: agSelectedRowCountComponent should only be used with the client and server side row model.");this.setLabel("selectedRows","Selected"),this.addCssClass("ag-status-panel"),this.addCssClass("ag-status-panel-selected-row-count"),this.onRowSelectionChanged();const e=this.onRowSelectionChanged.bind(this);this.addManagedListener(this.eventService,_v.Events.EVENT_MODEL_UPDATED,e),this.addManagedListener(this.eventService,_v.Events.EVENT_SELECTION_CHANGED,e)}isValidRowModel(){const e=this.rowModel.getType();return"clientSide"===e||"serverSide"===e}onRowSelectionChanged(){const e=this.selectionService.getSelectionCount();if(e<0)return this.setValue("?"),void this.setDisplayed(!0);const t=this.localeService.getLocaleTextFunc(),i=t("thousandSeparator",","),n=t("decimalSeparator",".");this.setValue(_v._.formatNumberCommas(e,i,n)),this.setDisplayed(e>0)}init(){}refresh(){return!0}destroy(){super.destroy()}};d([(0,_v.Autowired)("rowModel")],Fv.prototype,"rowModel",2),d([(0,_v.Autowired)("selectionService")],Fv.prototype,"selectionService",2),d([_v.PostConstruct],Fv.prototype,"postConstruct",1);var Gv=i(98092),Vv=class e extends Gv.Component{constructor(){super(e.TEMPLATE)}destroy(){super.destroy()}postConstruct(){this.isValidRowModel()?(this.avgAggregationComp.setLabel("avg","Average"),this.countAggregationComp.setLabel("count","Count"),this.minAggregationComp.setLabel("min","Min"),this.maxAggregationComp.setLabel("max","Max"),this.sumAggregationComp.setLabel("sum","Sum"),this.addManagedListener(this.eventService,Gv.Events.EVENT_RANGE_SELECTION_CHANGED,this.onRangeSelectionChanged.bind(this)),this.addManagedListener(this.eventService,Gv.Events.EVENT_MODEL_UPDATED,this.onRangeSelectionChanged.bind(this))):console.warn("AG Grid: agAggregationComponent should only be used with the client and server side row model.")}isValidRowModel(){const e=this.rowModel.getType();return"clientSide"===e||"serverSide"===e}init(e){this.params=e}refresh(e){return this.params=e,this.onRangeSelectionChanged(),!0}setAggregationComponentValue(e,t,i){var n;const s=this.getAllowedAggregationValueComponent(e);if(Gv._.exists(s)&&s){const e=this.localeService.getLocaleTextFunc(),n=e("thousandSeparator",","),r=e("decimalSeparator",".");s.setValue(Gv._.formatNumberTwoDecimalPlacesAndCommas(t,n,r)),s.setDisplayed(i)}else null==(n=this.getAggregationValueComponent(e))||n.setDisplayed(!1)}getAllowedAggregationValueComponent(e){const{aggFuncs:t}=this.params;return!t||t.includes(e)?this.getAggregationValueComponent(e):null}getAggregationValueComponent(e){return this[`${e}AggregationComp`]}onRangeSelectionChanged(){var e;const t=null==(e=this.rangeService)?void 0:e.getCellRanges();let i=0,n=0,s=0,r=null,o=null;const a={};if(t&&!Gv._.missingOrEmpty(t)&&this.rangeService)for(let e=0;e<t.length;e++){const l=t[e];let c=this.rangeService.getRangeStartRow(l);const h=this.rangeService.getRangeEndRow(l);for(;!Gv._.missing(c)&&c&&!this.rowPositionUtils.before(h,c)&&c&&l.columns;)l.columns.forEach(e=>{if(null===c)return;const t=this.cellPositionUtils.createId({rowPinned:c.rowPinned,column:e,rowIndex:c.rowIndex});if(a[t])return;a[t]=!0;const l=this.rowPositionUtils.getRowNode(c);if(Gv._.missing(l))return;let h=this.valueService.getValue(e,l);Gv._.missing(h)||""===h||(n++,"object"==typeof h&&"value"in h&&(h=h.value,""===h)||("string"==typeof h&&(h=Number(h)),"number"!=typeof h||isNaN(h)||(i+=h,(null===o||h>o)&&(o=h),(null===r||h<r)&&(r=h),s++)))}),c=this.cellNavigationService.getRowBelow(c)}const l=n>1,c=s>1;this.setAggregationComponentValue("count",n,l),this.setAggregationComponentValue("sum",i,c),this.setAggregationComponentValue("min",r,c),this.setAggregationComponentValue("max",o,c),this.setAggregationComponentValue("avg",i/s,c)}};Vv.TEMPLATE='<div class="ag-status-panel ag-status-panel-aggregations">\n            <ag-name-value ref="avgAggregationComp"></ag-name-value>\n            <ag-name-value ref="countAggregationComp"></ag-name-value>\n            <ag-name-value ref="minAggregationComp"></ag-name-value>\n            <ag-name-value ref="maxAggregationComp"></ag-name-value>\n            <ag-name-value ref="sumAggregationComp"></ag-name-value>\n        </div>',d([(0,Gv.Optional)("rangeService")],Vv.prototype,"rangeService",2),d([(0,Gv.Autowired)("valueService")],Vv.prototype,"valueService",2),d([(0,Gv.Autowired)("cellNavigationService")],Vv.prototype,"cellNavigationService",2),d([(0,Gv.Autowired)("rowModel")],Vv.prototype,"rowModel",2),d([(0,Gv.Autowired)("cellPositionUtils")],Vv.prototype,"cellPositionUtils",2),d([(0,Gv.Autowired)("rowPositionUtils")],Vv.prototype,"rowPositionUtils",2),d([(0,Gv.RefSelector)("sumAggregationComp")],Vv.prototype,"sumAggregationComp",2),d([(0,Gv.RefSelector)("countAggregationComp")],Vv.prototype,"countAggregationComp",2),d([(0,Gv.RefSelector)("minAggregationComp")],Vv.prototype,"minAggregationComp",2),d([(0,Gv.RefSelector)("maxAggregationComp")],Vv.prototype,"maxAggregationComp",2),d([(0,Gv.RefSelector)("avgAggregationComp")],Vv.prototype,"avgAggregationComp",2),d([Gv.PostConstruct],Vv.prototype,"postConstruct",1);var Bv=Vv,Hv={version:"31.3.4",moduleName:Sv.ModuleNames.StatusBarModule,beans:[xv],agStackComponents:[{componentName:"AgStatusBar",componentClass:Av},{componentName:"AgNameValue",componentClass:Iv}],userComponents:[{componentName:"agAggregationComponent",componentClass:Bv},{componentName:"agSelectedRowCountComponent",componentClass:Fv},{componentName:"agTotalRowCountComponent",componentClass:Ov},{componentName:"agFilteredRowCountComponent",componentClass:Pv},{componentName:"agTotalAndFilteredRowCountComponent",componentClass:Lv}],dependantModules:[D]},zv=i(98092),Uv=i(98092),Wv=Object.defineProperty,jv=Object.getOwnPropertyDescriptor,Kv=(e,t,i,n)=>{for(var s,r=n>1?void 0:n?jv(t,i):t,o=e.length-1;o>=0;o--)(s=e[o])&&(r=(n?s(t,i,r):s(r))||r);return n&&r&&Wv(t,i,r),r},$v=class extends Uv.BeanStub{constructor(){super(...arguments),this.firstRow=-1,this.lastRow=-1,this.rowCount=-1,this.rowNodesByIndex={}}ensureRowHeightsValid(e,t,i,n){return!1}init(){this.rowHeight=this.gos.getRowHeightAsNumber(),this.addManagedListener(this.eventService,Uv.Events.EVENT_VIEWPORT_CHANGED,this.onViewportChanged.bind(this)),this.addManagedPropertyListener("viewportDatasource",()=>this.updateDatasource()),this.addManagedPropertyListener("rowHeight",()=>{this.rowHeight=this.gos.getRowHeightAsNumber(),this.updateRowHeights()})}start(){this.updateDatasource()}isLastRowIndexKnown(){return!0}destroyDatasource(){this.viewportDatasource&&(this.viewportDatasource.destroy&&this.viewportDatasource.destroy(),this.rowRenderer.datasourceChanged(),this.firstRow=-1,this.lastRow=-1)}updateDatasource(){const e=this.gos.get("viewportDatasource");e&&this.setViewportDatasource(e)}getViewportRowModelPageSize(){return this.gos.get("viewportRowModelPageSize")}getViewportRowModelBufferSize(){return this.gos.get("viewportRowModelBufferSize")}calculateFirstRow(e){const t=this.getViewportRowModelBufferSize(),i=this.getViewportRowModelPageSize(),n=e-t;return n<0?0:Math.floor(n/i)*i}calculateLastRow(e){if(-1===e)return e;const t=this.getViewportRowModelBufferSize(),i=this.getViewportRowModelPageSize(),n=e+t,s=Math.ceil(n/i)*i,r=this.rowCount-1;return Math.min(s,r)}onViewportChanged(e){const t=this.calculateFirstRow(e.firstRow),i=this.calculateLastRow(e.lastRow);this.firstRow===t&&this.lastRow===i||(this.firstRow=t,this.lastRow=i,this.purgeRowsNotInViewport(),this.viewportDatasource&&this.viewportDatasource.setViewportRange(this.firstRow,this.lastRow))}purgeRowsNotInViewport(){Object.keys(this.rowNodesByIndex).forEach(e=>{const t=parseInt(e,10);if(t<this.firstRow||t>this.lastRow){if(this.isRowFocused(t))return;delete this.rowNodesByIndex[t]}})}isRowFocused(e){const t=this.focusService.getFocusCellToUseAfterRefresh();return!!t&&(null==t.rowPinned&&t.rowIndex===e)}setViewportDatasource(e){this.destroyDatasource(),this.viewportDatasource=e,this.rowCount=-1,e.init?e.init({setRowCount:this.setRowCount.bind(this),setRowData:this.setRowData.bind(this),getRow:this.getRow.bind(this)}):console.warn("AG Grid: viewport is missing init method.")}getType(){return"viewport"}getRow(e){return this.rowNodesByIndex[e]||(this.rowNodesByIndex[e]=this.createBlankRowNode(e)),this.rowNodesByIndex[e]}getRowNode(e){let t;return this.forEachNode(i=>{i.id===e&&(t=i)}),t}getRowCount(){return-1===this.rowCount?0:this.rowCount}getRowIndexAtPixel(e){return 0!==this.rowHeight?Math.floor(e/this.rowHeight):0}getRowBounds(e){return{rowHeight:this.rowHeight,rowTop:this.rowHeight*e}}updateRowHeights(){this.forEachNode(e=>{e.setRowHeight(this.rowHeight),e.setRowTop(this.rowHeight*e.rowIndex)});const e={type:Uv.Events.EVENT_MODEL_UPDATED,newData:!1,newPage:!1,keepRenderedRows:!0,animate:!1};this.eventService.dispatchEvent(e)}getTopLevelRowCount(){return this.getRowCount()}getTopLevelRowDisplayedIndex(e){return e}isEmpty(){return this.rowCount>0}isRowsToRender(){return this.rowCount>0}getNodesInRangeForSelection(e,t){const i=Uv._.missing(e)?0:e.rowIndex,n=t.rowIndex,s=i<this.firstRow||i>this.lastRow,r=n<this.firstRow||n>this.lastRow;if(s||r)return[];const o=[],a=i<=n?n:i;for(let e=i<=n?i:n;e<=a;e++)o.push(this.rowNodesByIndex[e]);return o}forEachNode(e){let t=0;Object.keys(this.rowNodesByIndex).forEach(i=>{const n=parseInt(i,10),s=this.rowNodesByIndex[n];e(s,t),t++})}setRowData(e){Uv._.iterateObject(e,(e,t)=>{const i=parseInt(e,10);if(i>=this.firstRow&&i<=this.lastRow){let e=this.rowNodesByIndex[i];Uv._.missing(e)&&(e=this.createBlankRowNode(i),this.rowNodesByIndex[i]=e),e.setDataAndId(t,i.toString())}})}createBlankRowNode(e){const t=new Uv.RowNode(this.beans);return t.setRowHeight(this.rowHeight),t.setRowTop(this.rowHeight*e),t.setRowIndex(e),t}setRowCount(e,t=!1){if(e===this.rowCount)return;this.rowCount=e,this.eventService.dispatchEventOnce({type:Uv.Events.EVENT_ROW_COUNT_READY});const i={type:Uv.Events.EVENT_MODEL_UPDATED,newData:!1,newPage:!1,keepRenderedRows:t,animate:!1};this.eventService.dispatchEvent(i)}isRowPresent(e){return!!this.getRowNode(e.id)}};Kv([(0,Uv.Autowired)("rowRenderer")],$v.prototype,"rowRenderer",2),Kv([(0,Uv.Autowired)("focusService")],$v.prototype,"focusService",2),Kv([(0,Uv.Autowired)("beans")],$v.prototype,"beans",2),Kv([Uv.PostConstruct],$v.prototype,"init",1),Kv([Uv.PreDestroy],$v.prototype,"destroyDatasource",1),$v=Kv([(0,Uv.Bean)("rowModel")],$v);var Yv={version:"31.3.4",moduleName:zv.ModuleNames.ViewportRowModelModule,rowModel:"viewport",beans:[$v],dependantModules:[D]},qv=i(98092),Xv=i(98092),Zv=i(98092),Qv=i(98092),Jv=i(98092),ey=i(98092),ty=i(98092),iy=i(98092),ny=i(98092),sy=i(98092),ry=i(98092),oy=i(98092),ay=i(98092),ly=i(98092),cy=i(98092),hy=i(98092),dy=i(98092),uy=i(98092),py=i(98092),gy=i(98092),fy=i(98092),my=i(98092),vy=i(98092),yy=i(98092),Cy=i(98092),by=i(98092),Sy=i(98092),wy=i(98092),xy=i(98092),Ey=i(98092),My=i(98092),Ay=i(98092),Ty=i(98092),Dy=i(98092),Iy=i(98092),Ry=i(98092),Ly=i(98092),ky=i(98092),Py=i(98092),Ny=i(98092),Oy=i(98092),_y=i(98092),Fy=i(98092),Gy=i(98092),Vy=i(98092),By=i(98092),Hy=i(98092),zy=i(98092),Uy=i(98092),Wy=i(98092),jy=i(98092),Ky=i(98092),$y=i(98092),Yy=i(98092),qy=i(98092),Xy=i(98092),Zy=i(98092),Qy=i(98092),Jy=i(98092),eC=i(98092),tC=i(98092),iC=i(98092),nC=i(98092),sC=i(98092),rC=i(98092),oC=i(98092),aC=i(98092),lC=i(98092),cC=i(98092),hC=i(98092),dC=i(98092),uC=i(98092),pC=i(98092),gC=i(98092),fC=i(98092),mC=i(98092),vC=i(98092),yC=i(98092),CC=i(98092),bC=i(98092),SC=i(98092),wC=i(98092),xC=i(98092),EC=i(98092),MC=i(98092),AC=i(98092),TC=i(98092),DC=i(98092),IC=i(98092),RC=i(98092),LC=i(98092),kC=i(98092),PC=i(98092),NC=i(98092),OC=i(98092),_C=i(98092),FC=i(98092),GC=i(98092),VC=i(98092),BC=i(98092),HC=i(98092),zC=i(98092),UC=i(98092),WC=i(98092),jC=i(98092),KC=i(98092),$C=i(98092),YC=i(98092),qC=i(98092),XC=i(98092),ZC=i(98092),QC=i(98092),JC=i(98092),eb=i(98092),tb=i(98092),ib=i(98092),nb=i(98092),sb=i(98092),rb=i(98092),ob=i(98092),ab=i(98092),lb=i(98092),cb=i(98092),hb=i(98092),db=i(98092),ub=i(98092),pb=i(98092),gb=i(98092),fb=i(98092),mb=i(98092),vb=i(98092),yb=i(98092),Cb=i(98092),bb=i(98092),Sb=i(98092),wb=i(98092),xb=i(98092),Eb=i(98092),Mb=i(98092),Ab=i(98092),Tb=i(98092),Db=i(98092),Ib=i(98092),Rb=i(98092),Lb=i(98092),kb=i(98092),Pb=i(98092),Nb=i(98092),Ob=i(98092),_b=i(98092),Fb=i(98092),Gb=i(98092),Vb=i(98092),Bb=i(98092),Hb=i(98092),zb=i(98092),Ub=i(98092),Wb=i(98092),jb=i(98092),Kb=i(98092),$b=i(98092),Yb=i(98092),qb=i(98092),Xb=i(98092),Zb=i(98092),Qb=i(98092),Jb=i(98092),eS=i(98092),tS=i(98092),iS=i(98092),nS=i(98092),sS=i(98092),rS=i(98092),oS=i(98092),aS=i(98092),lS=i(98092),cS=i(98092),hS=i(98092),dS=i(98092),uS=i(98092),pS=i(98092),gS=i(98092),fS=i(98092),mS=i(98092),vS=i(98092),yS=i(98092),CS=i(98092),bS=i(98092),SS=i(98092),wS=i(98092),xS=i(98092),ES=i(98092),MS=i(98092);h(u,Ge,e.exports),p.ModuleRegistry.__registerModules([g.ClientSideRowModelModule,f.InfiniteRowModelModule,m.CsvExportModule,Fe,Ja,pl,Oh,ju,fp,Ip,cg,Tg,dt,Lg,yc,Df,im,Zc,bv,Hv,Yv],!1,void 0)},19270(e,t,i){"use strict";var n,s=Object.create,r=Object.defineProperty,o=Object.defineProperties,a=Object.getOwnPropertyDescriptor,l=Object.getOwnPropertyDescriptors,c=Object.getOwnPropertyNames,h=Object.getOwnPropertySymbols,d=Object.getPrototypeOf,u=Object.prototype.hasOwnProperty,p=Object.prototype.propertyIsEnumerable,g=(e,t,i)=>t in e?r(e,t,{enumerable:!0,configurable:!0,writable:!0,value:i}):e[t]=i,f=(e,t)=>{for(var i in t||(t={}))u.call(t,i)&&g(e,i,t[i]);if(h)for(var i of h(t))p.call(t,i)&&g(e,i,t[i]);return e},m=(e,t)=>o(e,l(t)),v=(e,t,i,n)=>{if(t&&"object"==typeof t||"function"==typeof t)for(let s of c(t))u.call(e,s)||s===i||r(e,s,{get:()=>t[s],enumerable:!(n=a(t,s))||n.enumerable});return e},y=(e,t,i)=>(i=null!=e?s(d(e)):{},v(!t&&e&&e.__esModule?i:r(i,"default",{value:e,enumerable:!0}),e)),C={};((e,t)=>{for(var i in t)r(e,i,{get:t[i],enumerable:!0})})(C,{AgGridReact:()=>ht,ChangeDetectionStrategyType:()=>dt,getInstance:()=>De,useGridCellEditor:()=>gt,useGridDate:()=>ft,useGridFilter:()=>mt,useGridFloatingFilter:()=>vt,useGridMenuItem:()=>yt,warnReactiveCustomComponents:()=>Ie}),e.exports=(n=C,v(r({},"__esModule",{value:!0}),n));var b=y(i(22155)),S=i(98092),w=y(i(22155)),x=i(98092),E=y(i(22155)),M=(0,i(22155).createContext)({setMethods:()=>{}}),A=(0,E.memo)(e=>{const{initialProps:t,addUpdateCallback:i,CustomComponentClass:n,setMethods:s}=e,[r,o]=(0,E.useState)(t);return(0,E.useEffect)(()=>{i(e=>o(e))},[]),E.default.createElement(M.Provider,{value:{setMethods:s}},E.default.createElement(n,f({},r)))}),T=i(22155),D=i(98092),I=0;function R(){return"agPortalKey_"+ ++I}var L=i(70316),k=i(32431),P=class{constructor(e,t,i,n){this.portal=null,this.oldPortal=null,this.reactComponent=e,this.portalManager=t,this.componentType=i,this.suppressFallbackMethods=!!n,this.statelessComponent=this.isStateless(this.reactComponent),this.key=R(),this.portalKey=R(),this.instanceCreated=this.isStatelessComponent()?D.AgPromise.resolve(!1):new D.AgPromise(e=>{this.resolveInstanceCreated=e})}getGui(){return this.eParentElement}getRootElement(){return this.eParentElement.firstChild}destroy(){return this.componentInstance&&"function"==typeof this.componentInstance.destroy&&this.componentInstance.destroy(),this.portalManager.destroyPortal(this.portal)}createParentElement(e){const t=this.portalManager.getComponentWrappingElement(),i=document.createElement(t||"div");return i.classList.add("ag-react-container"),e.reactContainer=i,i}addParentContainerStyleAndClasses(){this.componentInstance&&(this.componentInstance.getReactContainerStyle&&this.componentInstance.getReactContainerStyle()&&(D._.warnOnce('Since v31.1 "getReactContainerStyle" is deprecated. Apply styling directly to ".ag-react-container" if needed.'),Object.assign(this.eParentElement.style,this.componentInstance.getReactContainerStyle())),this.componentInstance.getReactContainerClasses&&this.componentInstance.getReactContainerClasses())&&(D._.warnOnce('Since v31.1 "getReactContainerClasses" is deprecated. Apply styling directly to ".ag-react-container" if needed.'),this.componentInstance.getReactContainerClasses().forEach(e=>this.eParentElement.classList.add(e)))}statelessComponentRendered(){return this.eParentElement.childElementCount>0||this.eParentElement.childNodes.length>0}getFrameworkComponentInstance(){return this.componentInstance}isStatelessComponent(){return this.statelessComponent}getReactComponentName(){return this.reactComponent.name}getMemoType(){return this.hasSymbol()?Symbol.for("react.memo"):60115}hasSymbol(){return"function"==typeof Symbol&&Symbol.for}isStateless(e){return"function"==typeof e&&!(e.prototype&&e.prototype.isReactComponent)||"object"==typeof e&&e.$$typeof===this.getMemoType()}hasMethod(e){const t=this.getFrameworkComponentInstance();return!!t&&null!=t[e]||this.fallbackMethodAvailable(e)}callMethod(e,t){const i=this.getFrameworkComponentInstance();if(this.isStatelessComponent())return this.fallbackMethod(e,t&&t[0]?t[0]:{});if(!i)return void setTimeout(()=>this.callMethod(e,t));const n=i[e];return n?n.apply(i,t):this.fallbackMethodAvailable(e)?this.fallbackMethod(e,t&&t[0]?t[0]:{}):void 0}addMethod(e,t){this[e]=t}init(e){return this.eParentElement=this.createParentElement(e),this.params=e,this.createOrUpdatePortal(e),new D.AgPromise(e=>this.createReactComponent(e))}createOrUpdatePortal(e){this.isStatelessComponent()||(this.ref=e=>{var t;this.componentInstance=e,this.addParentContainerStyleAndClasses(),null==(t=this.resolveInstanceCreated)||t.call(this,!0),this.resolveInstanceCreated=void 0},e.ref=this.ref),this.reactElement=this.createElement(this.reactComponent,m(f({},e),{key:this.key})),this.portal=(0,L.createPortal)(this.reactElement,this.eParentElement,this.portalKey)}createElement(e,t){return(0,T.createElement)(e,t)}createReactComponent(e){this.portalManager.mountReactPortal(this.portal,this,t=>{e(t)})}isNullValue(){return this.valueRenderedIsNull(this.params)}rendered(){return this.isStatelessComponent()&&this.statelessComponentRendered()||!(this.isStatelessComponent()||!this.getFrameworkComponentInstance())}valueRenderedIsNull(e){if(!this.componentType.cellRenderer)return!1;const t=console.error;try{return console.error=()=>{},""===(0,k.renderToStaticMarkup)((0,T.createElement)(this.reactComponent,e))}catch(e){}finally{console.error=t}return!1}refreshComponent(e){this.oldPortal=this.portal,this.createOrUpdatePortal(e),this.portalManager.updateReactPortal(this.oldPortal,this.portal)}fallbackMethod(e,t){const i=this[`${e}Component`];if(!this.suppressFallbackMethods&&i)return i.bind(this)(t)}fallbackMethodAvailable(e){return!this.suppressFallbackMethods&&!!this[`${e}Component`]}};function N(e,t,i){e.forEach(e=>{const n=t[e];n&&(i[e]=n)})}var O=class extends P{constructor(){super(...arguments),this.awaitUpdateCallback=new x.AgPromise(e=>{this.resolveUpdateCallback=e}),this.wrapperComponent=A}init(e){return this.sourceParams=e,super.init(this.getProps())}addMethod(){}getInstance(){return this.instanceCreated.then(()=>this.componentInstance)}getFrameworkComponentInstance(){return this}createElement(e,t){return super.createElement(this.wrapperComponent,{initialProps:t,CustomComponentClass:e,setMethods:e=>this.setMethods(e),addUpdateCallback:e=>{this.updateCallback=()=>(e(this.getProps()),new x.AgPromise(e=>{setTimeout(()=>{e()})})),this.resolveUpdateCallback()}})}setMethods(e){this.providedMethods=e,N(this.getOptionalMethods(),this.providedMethods,this)}getOptionalMethods(){return[]}getProps(){return m(f({},this.sourceParams),{key:this.key,ref:this.ref})}refreshProps(){return this.updateCallback?this.updateCallback():new x.AgPromise(e=>this.awaitUpdateCallback.then(()=>{this.updateCallback().then(()=>e())}))}},_=class extends O{constructor(){super(...arguments),this.date=null,this.onDateChange=e=>this.updateDate(e)}getDate(){return this.date}setDate(e){this.date=e,this.refreshProps()}refresh(e){this.sourceParams=e,this.refreshProps()}getOptionalMethods(){return["afterGuiAttached","setInputPlaceholder","setInputAriaLabel","setDisabled"]}updateDate(e){this.setDate(e),this.sourceParams.onDateChanged()}getProps(){const e=super.getProps();return e.date=this.date,e.onDateChange=this.onDateChange,delete e.onDateChanged,e}},F=class extends O{constructor(){super(...arguments),this.model=null,this.onModelChange=e=>this.updateModel(e),this.onUiChange=()=>this.sourceParams.filterChangedCallback()}isFilterActive(){return null!=this.model}doesFilterPass(e){return this.providedMethods.doesFilterPass(e)}getModel(){return this.model}setModel(e){return this.model=e,this.refreshProps()}refresh(e){return this.sourceParams=e,this.refreshProps(),!0}getOptionalMethods(){return["afterGuiAttached","afterGuiDetached","onNewRowsLoaded","getModelAsString","onAnyFilterChanged"]}updateModel(e){this.setModel(e).then(()=>this.sourceParams.filterChangedCallback())}getProps(){const e=super.getProps();return e.model=this.model,e.onModelChange=this.onModelChange,e.onUiChange=this.onUiChange,delete e.filterChangedCallback,delete e.filterModifiedCallback,delete e.valueGetter,e}},G=i(98092);function V(e,t){e.parentFilterInstance(i=>{(i.setModel(t)||G.AgPromise.resolve()).then(()=>{e.filterParams.filterChangedCallback()})})}var B=class{constructor(e,t){this.floatingFilterParams=e,this.refreshProps=t,this.model=null,this.onModelChange=e=>this.updateModel(e)}getProps(){return m(f({},this.floatingFilterParams),{model:this.model,onModelChange:this.onModelChange})}onParentModelChanged(e){this.model=e,this.refreshProps()}refresh(e){this.floatingFilterParams=e,this.refreshProps()}setMethods(e){N(this.getOptionalMethods(),e,this)}getOptionalMethods(){return["afterGuiAttached"]}updateModel(e){this.model=e,this.refreshProps(),V(this.floatingFilterParams,e)}},H=class extends O{constructor(){super(...arguments),this.model=null,this.onModelChange=e=>this.updateModel(e)}onParentModelChanged(e){this.model=e,this.refreshProps()}refresh(e){this.sourceParams=e,this.refreshProps()}getOptionalMethods(){return["afterGuiAttached"]}updateModel(e){this.model=e,this.refreshProps(),V(this.sourceParams,e)}getProps(){const e=super.getProps();return e.model=this.model,e.onModelChange=this.onModelChange,e}},z=class extends O{refresh(e){this.sourceParams=e,this.refreshProps()}},U=class extends O{constructor(){super(...arguments),this.active=!1,this.expanded=!1,this.onActiveChange=e=>this.updateActive(e)}setActive(e){this.awaitSetActive(e)}setExpanded(e){this.expanded=e,this.refreshProps()}getOptionalMethods(){return["select","configureDefaults"]}awaitSetActive(e){return this.active=e,this.refreshProps()}updateActive(e){const t=this.awaitSetActive(e);e&&t.then(()=>this.sourceParams.onItemActivated())}getProps(){const e=super.getProps();return e.active=this.active,e.expanded=this.expanded,e.onActiveChange=this.onActiveChange,delete e.onItemActivated,e}},W=class extends O{refresh(e){this.sourceParams=e,this.refreshProps()}},j=class extends O{refresh(e){return this.sourceParams=e,this.refreshProps(),!0}},K=class extends O{constructor(){super(...arguments),this.onStateChange=e=>this.updateState(e)}refresh(e){return this.sourceParams=e,this.refreshProps(),!0}getState(){return this.state}updateState(e){this.state=e,this.refreshProps(),this.sourceParams.onStateUpdated()}getProps(){const e=super.getProps();return e.state=this.state,e.onStateChange=this.onStateChange,e}},$=class e{constructor(t,i,n){this.destroyed=!1,this.portals=[],this.hasPendingPortalUpdate=!1,this.wrappingElement=i||"div",this.refresher=t,this.maxComponentCreationTimeMs=n||e.MAX_COMPONENT_CREATION_TIME_IN_MS}getPortals(){return this.portals}destroy(){this.destroyed=!0}destroyPortal(e){this.portals=this.portals.filter(t=>t!==e),this.batchUpdate()}getComponentWrappingElement(){return this.wrappingElement}mountReactPortal(e,t,i){this.portals=[...this.portals,e],this.waitForInstance(t,i),this.batchUpdate()}updateReactPortal(e,t){this.portals[this.portals.indexOf(e)]=t,this.batchUpdate()}batchUpdate(){this.hasPendingPortalUpdate||(setTimeout(()=>{this.destroyed||(this.refresher(),this.hasPendingPortalUpdate=!1)}),this.hasPendingPortalUpdate=!0)}waitForInstance(e,t,i=Date.now()){if(this.destroyed)t(null);else if(e.rendered())t(e);else{if(Date.now()-i>=this.maxComponentCreationTimeMs&&!this.hasPendingPortalUpdate)return e.isNullValue()?void t(e):(console.error(`AG Grid: React Component '${e.getReactComponentName()}' not created within ${this.maxComponentCreationTimeMs}ms.`),void console.error("    If the component is using `forwardRef` but not `useImperativeHandle`, add the following: `useImperativeHandle(ref, () => ({}));`"));window.setTimeout(()=>{this.waitForInstance(e,t,i)})}}};$.MAX_COMPONENT_CREATION_TIME_IN_MS=1e3;var Y=$,q=y(i(22155)).default.createContext({}),X=y(i(70316)),Z=(...e)=>e.filter(e=>null!=e&&""!==e).join(" "),Q=class e{constructor(...e){this.classesMap={},e.forEach(e=>{this.classesMap[e]=!0})}setClass(t,i){if(!!this.classesMap[t]==i)return this;const n=new e;return n.classesMap=f({},this.classesMap),n.classesMap[t]=i,n}toString(){return Object.keys(this.classesMap).filter(e=>this.classesMap[e]).join(" ")}},J=e=>"function"==typeof e&&!(e.prototype&&e.prototype.isReactComponent)||"object"==typeof e&&e.$$typeof===("function"==typeof Symbol&&Symbol.for?Symbol.for("react.memo"):60115),ee=null!=X.default.createRoot&&null!=X.default.flushSync,te=!1,ie=(e,t)=>{ee&&e&&!te?X.default.flushSync(t):t()};function ne(e,t,i){if(null==t||null==e)return t;if(e===t||0===t.length&&0===e.length)return e;if(i||0===e.length&&t.length>0||e.length>0&&0===t.length)return t;const n=[],s=[],r=new Map,o=new Map;for(let e=0;e<t.length;e++){const i=t[e];o.set(i.getInstanceId(),i)}for(let t=0;t<e.length;t++){const i=e[t];r.set(i.getInstanceId(),i),o.has(i.getInstanceId())&&n.push(i)}for(let e=0;e<t.length;e++){const i=t[e],n=i.getInstanceId();r.has(n)||s.push(i)}return n.length===e.length&&0===s.length?e:0===n.length&&s.length===t.length?t:0===n.length?s:0===s.length?n:[...n,...s]}var se=i(98092),re=y(i(22155)),oe=(e,t,i,n)=>{if(!e||e.componentFromFramework||t.isDestroyed())return;const s=e.newAgStackInstance();if(!s)return;let r,o,a=!1;return s.then(e=>{a?t.destroyBean(e):(r=e,o=r.getGui(),i.appendChild(o),ae(n,r))}),()=>{a=!0,r&&(o&&o.parentElement&&o.parentElement.removeChild(o),t.destroyBean(r),n&&ae(n,void 0))}},ae=(e,t)=>{e&&(e instanceof Function?e(t):e.current=t)},le=(0,re.forwardRef)((e,t)=>{var i;const n=(0,re.useContext)(q).context,s=(0,re.useRef)(null),r=(0,re.useRef)(null),o=(0,re.useRef)(null),a=(0,re.useRef)(null),l=(0,re.useRef)(null),c=(0,re.useRef)(),[h,d]=(0,re.useState)(),[u,p]=(0,re.useState)(),[g,m]=(0,re.useState)(),[v,y]=(0,re.useState)(()=>new Q),[C,b]=(0,re.useState)(()=>new Q("ag-hidden")),[S,w]=(0,re.useState)(()=>new Q("ag-hidden")),[x,E]=(0,re.useState)(()=>new Q("ag-invisible"));(0,re.useImperativeHandle)(t,()=>({refresh:()=>!1})),(0,re.useLayoutEffect)(()=>oe(h,n,r.current),[h]);const M=(0,re.useCallback)(t=>{if(s.current=t,!s.current)return n.destroyBean(c.current),void(c.current=null);const i={setInnerRenderer:(e,t)=>{d(e),m(t)},setChildCount:e=>p(e),addOrRemoveCssClass:(e,t)=>y(i=>i.setClass(e,t)),setContractedDisplayed:e=>w(t=>t.setClass("ag-hidden",!e)),setExpandedDisplayed:e=>b(t=>t.setClass("ag-hidden",!e)),setCheckboxVisible:e=>E(t=>t.setClass("ag-invisible",!e))};c.current=n.createBean(new se.GroupCellRendererCtrl),c.current.init(i,s.current,o.current,a.current,l.current,le,e)},[]),A=(0,re.useMemo)(()=>`ag-cell-wrapper ${v.toString()}`,[v]),T=(0,re.useMemo)(()=>`ag-group-expanded ${C.toString()}`,[C]),D=(0,re.useMemo)(()=>`ag-group-contracted ${S.toString()}`,[S]),I=(0,re.useMemo)(()=>`ag-group-checkbox ${x.toString()}`,[x]),R=h&&h.componentFromFramework,L=R?h.componentClass:void 0,k=null==h&&null!=g,P=se._.escapeString(g,!0);return re.default.createElement("span",f({className:A,ref:M},e.colDef?{}:{role:null==(i=c.current)?void 0:i.getCellAriaRole()}),re.default.createElement("span",{className:T,ref:a}),re.default.createElement("span",{className:D,ref:l}),re.default.createElement("span",{className:I,ref:o}),re.default.createElement("span",{className:"ag-group-value",ref:r},k&&re.default.createElement(re.default.Fragment,null,P),R&&re.default.createElement(L,f({},h.params))),re.default.createElement("span",{className:"ag-group-child-count"},u))}),ce=le,he=i(98092),de=y(i(22155)),ue=i(98092),pe=y(i(22155)),ge=y(i(22155)),fe=i(98092),me=y(i(22155)),ve=i(98092),ye=i(98092),Ce=y(i(22155)),be=y(i(22155)),Se=i(98092),we=(0,be.memo)(e=>{const{ctrl:t}=e,i=t.isAlive(),{context:n}=(0,be.useContext)(q),s=i?t.getColId():void 0,[r,o]=(0,be.useState)(),a=(0,be.useRef)(null),l=(0,be.useRef)(null),c=(0,be.useRef)(null),h=(0,be.useRef)();let d=(0,be.useRef)();i&&!d.current&&(d.current=new Se.CssClassManager(()=>a.current));const u=(0,be.useCallback)(e=>{var n;if(a.current=e,!a.current||!i)return;const s={setWidth:e=>{a.current&&(a.current.style.width=e)},addOrRemoveCssClass:(e,t)=>d.current.addOrRemoveCssClass(e,t),setAriaSort:e=>{a.current&&(e?Se._.setAriaSort(a.current,e):Se._.removeAriaSort(a.current))},setUserCompDetails:e=>o(e),getUserCompInstance:()=>h.current||void 0};t.setComp(s,a.current,l.current,c.current);const r=t.getSelectAllGui();null==(n=l.current)||n.insertAdjacentElement("afterend",r)},[]);(0,be.useLayoutEffect)(()=>oe(r,n,c.current,h),[r]),(0,be.useEffect)(()=>{t.setDragSource(a.current)},[r]);const p=(0,be.useMemo)(()=>!(!(null==r?void 0:r.componentFromFramework)||!J(r.componentClass)),[r]),g=r&&r.componentFromFramework,v=r&&r.componentClass;return be.default.createElement("div",{ref:u,className:"ag-header-cell","col-id":s,role:"columnheader"},be.default.createElement("div",{ref:l,className:"ag-header-cell-resize",role:"presentation"}),be.default.createElement("div",{ref:c,className:"ag-header-cell-comp-wrapper",role:"presentation"},g&&p&&be.default.createElement(v,f({},r.params)),g&&!p&&be.default.createElement(v,m(f({},r.params),{ref:h}))))}),xe=y(i(22155)),Ee=(0,xe.memo)(e=>{const{context:t}=(0,xe.useContext)(q),{ctrl:i}=e,[n,s]=(0,xe.useState)(()=>new Q),[r,o]=(0,xe.useState)(()=>new Q),[a,l]=(0,xe.useState)("false"),[c,h]=(0,xe.useState)(),[d,u]=(0,xe.useState)(),p=(0,xe.useMemo)(()=>i.getColId(),[]),g=(0,xe.useRef)(null),v=(0,xe.useRef)(null),y=(0,xe.useRef)(),C=(0,xe.useCallback)(e=>{if(g.current=e,!g.current)return;const t={setWidth:e=>{g.current&&(g.current.style.width=e)},addOrRemoveCssClass:(e,t)=>s(i=>i.setClass(e,t)),setUserCompDetails:e=>u(e),setResizableDisplayed:e=>{o(t=>t.setClass("ag-hidden",!e)),l(e?"false":"true")},setAriaExpanded:e=>h(e),getUserCompInstance:()=>y.current||void 0};i.setComp(t,g.current,v.current)},[]);(0,xe.useLayoutEffect)(()=>oe(d,t,g.current),[d]),(0,xe.useEffect)(()=>{g.current&&i.setDragSource(g.current)},[d]);const b=(0,xe.useMemo)(()=>!(!(null==d?void 0:d.componentFromFramework)||!J(d.componentClass)),[d]),S=(0,xe.useMemo)(()=>"ag-header-group-cell "+n.toString(),[n]),w=(0,xe.useMemo)(()=>"ag-header-cell-resize "+r.toString(),[r]),x=d&&d.componentFromFramework,E=d&&d.componentClass;return xe.default.createElement("div",{ref:C,className:S,"col-id":p,role:"columnheader","aria-expanded":c},x&&b&&xe.default.createElement(E,f({},d.params)),x&&!b&&xe.default.createElement(E,m(f({},d.params),{ref:y})),xe.default.createElement("div",{ref:v,"aria-hidden":a,className:w}))}),Me=y(i(22155)),Ae=i(98092),Te=i(98092);function De(e,t){var i,n;(null!=(n=null==(i=null==e?void 0:e.getInstance)?void 0:i.call(e))?n:Te.AgPromise.resolve(void 0)).then(e=>t(e))}function Ie(){Te._.warnOnce("Using custom components without `reactiveCustomComponents = true` is deprecated.")}var Re=(0,Me.memo)(e=>{const{context:t,gos:i}=(0,Me.useContext)(q),[n,s]=(0,Me.useState)(()=>new Q("ag-header-cell","ag-floating-filter")),[r,o]=(0,Me.useState)(()=>new Q),[a,l]=(0,Me.useState)(()=>new Q("ag-floating-filter-button","ag-hidden")),[c,h]=(0,Me.useState)("false"),[d,u]=(0,Me.useState)(),[p,g]=(0,Me.useState)(1),v=(0,Me.useRef)(null),y=(0,Me.useRef)(null),C=(0,Me.useRef)(null),b=(0,Me.useRef)(null),S=(0,Me.useRef)(),w=(0,Me.useRef)(),x=e=>{null!=e&&S.current&&S.current(e)},{ctrl:E}=e,A=(0,Me.useCallback)(e=>{if(v.current=e,!v.current)return;w.current=new Ae.AgPromise(e=>{S.current=e});const t={addOrRemoveCssClass:(e,t)=>s(i=>i.setClass(e,t)),addOrRemoveBodyCssClass:(e,t)=>o(i=>i.setClass(e,t)),setButtonWrapperDisplayed:e=>{l(t=>t.setClass("ag-hidden",!e)),h(e?"false":"true")},setWidth:e=>{v.current&&(v.current.style.width=e)},setCompDetails:e=>u(e),getFloatingFilterComp:()=>w.current?w.current:null,setMenuIcon:e=>{var t;return null==(t=b.current)?void 0:t.appendChild(e)}};E.setComp(t,v.current,b.current,y.current)},[]);(0,Me.useLayoutEffect)(()=>oe(d,t,y.current,x),[d]);const T=(0,Me.useMemo)(()=>n.toString(),[n]),D=(0,Me.useMemo)(()=>r.toString(),[r]),I=(0,Me.useMemo)(()=>a.toString(),[a]),R=(0,Me.useMemo)(()=>!!(d&&d.componentFromFramework&&J(d.componentClass)),[d]),L=(0,Me.useMemo)(()=>i.get("reactiveCustomComponents"),[]),k=(0,Me.useMemo)(()=>{if(d){if(L){const e=new B(d.params,()=>g(e=>e+1));return x(e),e}d.componentFromFramework&&Ie()}},[d]),P=null==k?void 0:k.getProps(),N=d&&d.componentFromFramework,O=d&&d.componentClass;return Me.default.createElement("div",{ref:A,className:T,role:"gridcell"},Me.default.createElement("div",{ref:y,className:D,role:"presentation"},N&&!L&&Me.default.createElement(O,m(f({},d.params),{ref:R?()=>{}:x})),N&&L&&Me.default.createElement(M.Provider,{value:{setMethods:e=>k.setMethods(e)}},Me.default.createElement(O,f({},P)))),Me.default.createElement("div",{ref:C,"aria-hidden":c,className:I,role:"presentation"},Me.default.createElement("button",{ref:b,type:"button",className:"ag-button ag-floating-filter-button-button",tabIndex:-1})))}),Le=(0,Ce.memo)(e=>{const{ctrl:t}=e,{topOffset:i,rowHeight:n}=(0,Ce.useMemo)(()=>t.getTopAndHeight(),[]),s=t.getAriaRowIndex(),r=t.getHeaderRowClass(),[o,a]=(0,Ce.useState)(()=>n+"px"),[l,c]=(0,Ce.useState)(()=>i+"px"),h=(0,Ce.useRef)(null),d=(0,Ce.useRef)(null),[u,p]=(0,Ce.useState)(()=>t.getHeaderCtrls()),g=(0,Ce.useRef)(null),f=(0,Ce.useCallback)(e=>{if(g.current=e,!e)return;const i={setHeight:e=>a(e),setTop:e=>c(e),setHeaderCtrls:(e,t,i)=>{d.current=h.current,h.current=e;const n=ne(d.current,e,t);n!==d.current&&ie(i,()=>p(n))},setWidth:e=>{g.current&&(g.current.style.width=e)}};t.setComp(i,!1)},[]),m=(0,Ce.useMemo)(()=>({height:o,top:l}),[o,l]),v=(0,Ce.useCallback)(e=>{switch(t.getType()){case ye.HeaderRowType.COLUMN_GROUP:return Ce.default.createElement(Ee,{ctrl:e,key:e.getInstanceId()});case ye.HeaderRowType.FLOATING_FILTER:return Ce.default.createElement(Re,{ctrl:e,key:e.getInstanceId()});default:return Ce.default.createElement(we,{ctrl:e,key:e.getInstanceId()})}},[]);return Ce.default.createElement("div",{ref:f,className:r,role:"row",style:m,"aria-rowindex":s},u.map(v))}),ke=(0,me.memo)(e=>{const[t,i]=(0,me.useState)(!0),[n,s]=(0,me.useState)([]),{context:r}=(0,me.useContext)(q),o=(0,me.useRef)(null),a=(0,me.useRef)(null),l=(0,me.useRef)(null),c="left"===e.pinned,h="right"===e.pinned,d=!c&&!h,u=(0,me.useCallback)(t=>{if(o.current=t,!o.current)return r.destroyBean(l.current),void(l.current=null);const n={setDisplayed:i,setCtrls:e=>s(e),setCenterWidth:e=>{a.current&&(a.current.style.width=e)},setViewportScrollLeft:e=>{o.current&&(o.current.scrollLeft=e)},setPinnedContainerWidth:e=>{o.current&&(o.current.style.width=e,o.current.style.minWidth=e,o.current.style.maxWidth=e)}};l.current=r.createBean(new ve.HeaderRowContainerCtrl(e.pinned)),l.current.setComp(n,o.current)},[]),p=t?"":"ag-hidden",g=()=>n.map(e=>me.default.createElement(Le,{ctrl:e,key:e.getInstanceId()}));return me.default.createElement(me.default.Fragment,null,c&&me.default.createElement("div",{ref:u,className:"ag-pinned-left-header "+p,"aria-hidden":!t,role:"rowgroup"},g()),h&&me.default.createElement("div",{ref:u,className:"ag-pinned-right-header "+p,"aria-hidden":!t,role:"rowgroup"},g()),d&&me.default.createElement("div",{ref:u,className:"ag-header-viewport "+p,role:"presentation"},me.default.createElement("div",{ref:a,className:"ag-header-container",role:"rowgroup"},g())))}),Pe=(0,ge.memo)(()=>{const[e,t]=(0,ge.useState)(()=>new Q),[i,n]=(0,ge.useState)(),{context:s}=(0,ge.useContext)(q),r=(0,ge.useRef)(null),o=(0,ge.useRef)(null),a=(0,ge.useCallback)(e=>{if(r.current=e,!e)return s.destroyBean(o.current),void(o.current=null);const i={addOrRemoveCssClass:(e,i)=>t(t=>t.setClass(e,i)),setHeightAndMinHeight:e=>n(e)};o.current=s.createBean(new fe.GridHeaderCtrl),o.current.setComp(i,r.current,r.current)},[]),l=(0,ge.useMemo)(()=>"ag-header "+e.toString(),[e]),c=(0,ge.useMemo)(()=>({height:i,minHeight:i}),[i]);return ge.default.createElement("div",{ref:a,className:l,style:c,role:"presentation"},ge.default.createElement(ke,{pinned:"left"}),ge.default.createElement(ke,{pinned:null}),ge.default.createElement(ke,{pinned:"right"}))}),Ne=i(22155),Oe=(e,t)=>{(0,Ne.useEffect)(()=>{const i=t.current;if(i){const t=i.parentElement;if(t){const n=document.createComment(e);return t.insertBefore(n,i),()=>{t.removeChild(n)}}}},[e])},_e=i(98092),Fe=y(i(22155)),Ge=y(i(22155)),Ve=i(98092),Be=i(98092),He=y(i(22155)),ze=i(98092),Ue=y(i(22155)),We=i(70316),je=i(22155),Ke=(0,Ue.memo)(e=>{const[t,i]=(0,Ue.useState)(),{context:n,popupService:s,localeService:r,gos:o}=(0,Ue.useContext)(q);return(()=>{const t=(0,je.useRef)(()=>{const{editDetails:t,cellCtrl:a,eParentCell:l}=e,{compDetails:c}=t,h=o.get("stopEditingWhenCellsLoseFocus"),d=n.createBean(new ze.PopupEditorWrapper(c.params)),u=d.getGui();if(e.jsChildComp){const t=e.jsChildComp.getGui();t&&u.appendChild(t)}const p={column:a.getColumn(),rowNode:a.getRowNode(),type:"popupCellEditor",eventSource:l,ePopup:u,position:t.popupPosition,keepWithinBounds:!0},g=s.positionPopupByComponent.bind(s,p),f=r.getLocaleTextFunc(),m=s.addPopup({modal:h,eChild:u,closeOnEsc:!0,closedCallback:()=>{a.onPopupEditorClosed()},anchorToElement:l,positionCallback:g,ariaLabel:f("ariaLabelCellEditor","Cell Editor")}),v=m?m.hideFunc:void 0;return i(d),e.jsChildComp&&e.jsChildComp.afterGuiAttached&&e.jsChildComp.afterGuiAttached(),()=>{null!=v&&v(),n.destroyBean(d)}}),a=(0,je.useRef)(),l=(0,je.useRef)(!1),c=(0,je.useRef)(!1),[,h]=(0,je.useState)(0);l.current&&(c.current=!0),(0,je.useEffect)(()=>(l.current||(a.current=t.current(),l.current=!0),h(e=>e+1),()=>{c.current&&a.current&&a.current()}),[])})(),Ue.default.createElement(Ue.default.Fragment,null,t&&e.wrappedContent&&(0,We.createPortal)(e.wrappedContent,t.getGui()))}),$e=i(22155),Ye=i(98092),qe=class{constructor(e,t){this.cellEditorParams=e,this.refreshProps=t,this.instanceCreated=new Ye.AgPromise(e=>{this.resolveInstanceCreated=e}),this.onValueChange=e=>this.updateValue(e),this.value=e.value}getProps(){return m(f({},this.cellEditorParams),{initialValue:this.cellEditorParams.value,value:this.value,onValueChange:this.onValueChange})}getValue(){return this.value}refresh(e){this.cellEditorParams=e,this.refreshProps()}setMethods(e){N(this.getOptionalMethods(),e,this)}getInstance(){return this.instanceCreated.then(()=>this.componentInstance)}setRef(e){var t;this.componentInstance=e,null==(t=this.resolveInstanceCreated)||t.call(this),this.resolveInstanceCreated=void 0}getOptionalMethods(){return["isPopup","isCancelBeforeStart","isCancelAfterEnd","getPopupPosition","focusIn","focusOut","afterGuiAttached"]}updateValue(e){this.value=e,this.refreshProps()}},Xe=(e,t,i)=>{const n=e.compProxy;return He.default.createElement(He.default.Fragment,null,!n&&He.default.createElement(t,m(f({},e.compDetails.params),{ref:i})),n&&((e,t,i)=>{const{compProxy:n}=e;i(n);const s=n.getProps(),r=J(t);return He.default.createElement(M.Provider,{value:{setMethods:e=>n.setMethods(e)}},r&&He.default.createElement(t,f({},s)),!r&&He.default.createElement(t,m(f({},s),{ref:e=>n.setRef(e)})))})(e,t,i))},Ze=(0,He.memo)(e=>{const{context:t}=(0,He.useContext)(q),{cellCtrl:i,printLayout:n,editingRow:s}=e,r=i.getTabIndex(),o=i.getColumnIdSanitised(),a=i.getInstanceId(),[l,c]=(0,He.useState)(()=>i.isCellRenderer()?void 0:{compDetails:void 0,value:i.getValueToDisplay(),force:!1}),[h,d]=(0,He.useState)(),[u,p]=(0,He.useState)(1),[g,v]=(0,He.useState)(),[y,C]=(0,He.useState)(!1),[b,S]=(0,He.useState)(!1),[w,x]=(0,He.useState)(!1),[E,M]=(0,He.useState)(),A=(0,He.useMemo)(()=>i.isForceWrapper(),[i]),T=(0,He.useMemo)(()=>i.getCellAriaRole(),[i]),D=(0,He.useRef)(null),I=(0,He.useRef)(null),R=(0,He.useRef)(),L=(0,He.useRef)(),k=(0,He.useRef)(),P=(0,He.useRef)([]),N=(0,He.useRef)(),[O,_]=(0,He.useState)(0),F=(0,He.useCallback)(e=>{N.current=e,_(e=>e+1)},[]),G=A||null!=l&&(y||w||b),V=(0,He.useCallback)((e,t)=>{L.current=t,t&&(((e,t,i)=>{const n=i.getColumn();if(!e&&t.isPopup&&t.isPopup()){const e=`AG Grid: Found an issue in column ${n.getColId()}. If using React, specify an editor is a popup using colDef.cellEditorPopup=true. AG Grid React cannot depend on the editor component specifying if it's in a popup (via the isPopup() method on the editor), as React needs to know this information BEFORE the component is created.`;Be._.doOnce(()=>console.warn(e),"jsEditorComp-isPopup-"+i.getColumn().getColId())}if(e&&t.getPopupPosition&&null!=t.getPopupPosition()){const e=`AG Grid: Found an issue in column ${n.getColId()}. If using React, specify an editor popup position using colDef.cellEditorPopupPosition=true. AG Grid React cannot depend on the editor component specifying it's position (via the getPopupPosition() method on the editor), as React needs to know this information BEFORE the component is created.`;Be._.doOnce(()=>console.warn(e),"jsEditorComp-getPopupPosition-"+i.getColumn().getColId())}})(e,t,i),t.isCancelBeforeStart&&t.isCancelBeforeStart()&&setTimeout(()=>{i.stopEditing(!0),i.focusCell(!0)}))},[i]),B=(0,He.useCallback)(e=>V(!0,e),[V]),H=(0,He.useCallback)(e=>V(!1,e),[V]);let z=(0,He.useRef)();z.current||(z.current=new Be.CssClassManager(()=>D.current)),((e,t,i,n,s,r)=>{const{context:o}=(0,$e.useContext)(q),a=(0,$e.useCallback)(()=>{const e=s.current;if(!e)return;const t=e.getGui();t&&t.parentElement&&t.parentElement.removeChild(t),o.destroyBean(e),s.current=void 0},[]);(0,$e.useEffect)(()=>{const n=null!=e,o=e&&e.compDetails&&!e.compDetails.componentFromFramework;if(!n||!o||t&&null==i)return void a();const l=e.compDetails;if(s.current){const t=s.current,i=!(null==t.refresh||0!=e.force)&&t.refresh(l.params);if(!0===i||void 0===i)return;a()}const c=l.newAgStackInstance();if(!c)return;const h=c.resolveNow(null,e=>e);if(!h)return;const d=h.getGui();d&&((t?i:r.current).appendChild(d),s.current=h)},[e,t,n]),(0,$e.useEffect)(()=>a,[])})(l,G,N.current,O,R,D);const U=(0,He.useRef)();(0,He.useLayoutEffect)(()=>{const e=U.current,t=l;if(U.current=l,null==e||null==e.compDetails||null==t||null==t.compDetails)return;const i=e.compDetails,n=t.compDetails;i.componentClass==n.componentClass&&null!=I.current&&null!=I.current.refresh&&1!=I.current.refresh(n.params)&&p(e=>e+1)},[l]),(0,He.useLayoutEffect)(()=>{if(!h||h.compDetails.componentFromFramework)return;const e=h.compDetails,i=!0===h.popup,n=(e=>{const t=e.newAgStackInstance();if(t)return t.resolveNow(null,e=>e)})(e);if(!n)return;const s=n.getGui();if(V(i,n),!i){const e=(A?k:D).current;null==e||e.appendChild(s),n.afterGuiAttached&&n.afterGuiAttached()}return M(n),()=>{t.destroyBean(n),V(i,void 0),M(void 0),s&&s.parentElement&&s.parentElement.removeChild(s)}},[h]);const W=(0,He.useCallback)(e=>{if(k.current=e,!k.current)return P.current.forEach(e=>e()),void(P.current=[]);const n=e=>{var i;if(e){const n=e.getGui();null==(i=k.current)||i.insertAdjacentElement("afterbegin",n),P.current.push(()=>{t.destroyBean(e),Be._.removeFromParent(n)})}return e};y&&n(i.createSelectionCheckbox()),w&&n(i.createDndSource()),b&&n(i.createRowDragComp())},[i,t,w,b,y]),j=(0,He.useCallback)(e=>{if(D.current=e,!D.current)return;if(!i)return;const t={addOrRemoveCssClass:(e,t)=>z.current.addOrRemoveCssClass(e,t),setUserStyles:e=>v(e),getFocusableElement:()=>D.current,setIncludeSelection:e=>C(e),setIncludeRowDrag:e=>S(e),setIncludeDndSource:e=>x(e),getCellEditor:()=>L.current||null,getCellRenderer:()=>I.current?I.current:R.current,getParentOfValue:()=>N.current?N.current:k.current?k.current:D.current,setRenderDetails:(e,t,i)=>{c(n=>(null==n?void 0:n.compDetails)!==e||(null==n?void 0:n.value)!==t||(null==n?void 0:n.force)!==i?{value:t,compDetails:e,force:i}:n)},setEditDetails:(e,t,i,n)=>{if(e){let s;n?s=new qe(e.params,()=>p(e=>e+1)):e.componentFromFramework&&Ie(),d({compDetails:e,popup:t,popupPosition:i,compProxy:s}),t||c(void 0)}else d(e=>{(null==e?void 0:e.compProxy)&&(L.current=void 0)})}},r=k.current||void 0;i.setComp(t,D.current,r,n,s)},[]),K=(0,He.useMemo)(()=>!!(l&&l.compDetails&&l.compDetails.componentFromFramework&&J(l.compDetails.componentClass)),[l]);(0,He.useLayoutEffect)(()=>{var e;D.current&&(z.current.addOrRemoveCssClass("ag-cell-value",!G),z.current.addOrRemoveCssClass("ag-cell-inline-editing",!!h&&!h.popup),z.current.addOrRemoveCssClass("ag-cell-popup-editing",!!h&&!!h.popup),z.current.addOrRemoveCssClass("ag-cell-not-inline-editing",!h||!!h.popup),null==(e=i.getRowCtrl())||e.setInlineEditingCss(!!h),i.shouldRestoreFocus()&&!i.isEditing()&&D.current.focus({preventScroll:!0}))});const $=()=>He.default.createElement(He.default.Fragment,null,null!=l&&((e,t,i,n,s,r,o)=>{const{compDetails:a,value:l}=e,c=!a,h=a&&a.componentFromFramework,d=a&&a.componentClass,u=(null==l?void 0:l.toString)?l.toString():l,p=()=>He.default.createElement(He.default.Fragment,null,c&&He.default.createElement(He.default.Fragment,null,u),h&&!r&&He.default.createElement(d,m(f({},a.params),{key:t,ref:n})),h&&r&&He.default.createElement(d,m(f({},a.params),{key:t})));return He.default.createElement(He.default.Fragment,null,s?He.default.createElement("span",{role:"presentation",id:`cell-${i}`,className:"ag-cell-value",ref:o},p()):p())})(l,u,a,I,G,K,F),null!=h&&((e,t,i,n,s,r)=>{const o=e.compDetails,a=o.componentClass,l=o.componentFromFramework&&!e.popup,c=o.componentFromFramework&&e.popup,h=!o.componentFromFramework&&e.popup;return He.default.createElement(He.default.Fragment,null,l&&Xe(e,a,t),c&&He.default.createElement(Ke,{editDetails:e,cellCtrl:s,eParentCell:n,wrappedContent:Xe(e,a,i)}),h&&r&&He.default.createElement(Ke,{editDetails:e,cellCtrl:s,eParentCell:n,jsChildComp:r}))})(h,H,B,D.current,i,E));return He.default.createElement("div",{ref:j,style:g,tabIndex:r,role:T,"col-id":o},G?He.default.createElement("div",{className:"ag-cell-wrapper",role:"presentation",ref:W},$()):$())}),Qe=(0,Ge.memo)(e=>{const{context:t,gos:i}=(0,Ge.useContext)(q),{rowCtrl:n,containerType:s}=e,r=n.getTabIndex(),o=(0,Ge.useRef)(n.getDomOrder()),a=n.isFullWidth(),l=n.getRowNode().displayed,[c,h]=(0,Ge.useState)(()=>l?n.getRowIndex():null),[d,u]=(0,Ge.useState)(()=>n.getRowId()),[p,g]=(0,Ge.useState)(()=>n.getBusinessKey()),[v,y]=(0,Ge.useState)(()=>n.getRowStyles()),C=(0,Ge.useRef)(null),b=(0,Ge.useRef)(null),[S,w]=(0,Ge.useState)(()=>null),[x,E]=(0,Ge.useState)(),[M,A]=(0,Ge.useState)(()=>l?n.getInitialRowTop(s):void 0),[T,D]=(0,Ge.useState)(()=>l?n.getInitialTransform(s):void 0),I=(0,Ge.useRef)(null),R=(0,Ge.useRef)(),L=(0,Ge.useRef)(!1),[k,P]=(0,Ge.useState)(0);(0,Ge.useEffect)(()=>{var e;if(L.current)return;if(!x)return;if(k>10)return;const t=null==(e=I.current)?void 0:e.firstChild;t?(n.setupDetailRowAutoHeight(t),L.current=!0):P(e=>e+1)},[x,k]);let N=(0,Ge.useRef)();N.current||(N.current=new Ve.CssClassManager(()=>I.current));const O=(0,Ge.useCallback)(e=>{if(I.current=e,!I.current)return void n.unsetComp(s);if(!n.isAlive())return;const t={setTop:A,setTransform:D,addOrRemoveCssClass:(e,t)=>N.current.addOrRemoveCssClass(e,t),setDomOrder:e=>o.current=e,setRowIndex:h,setRowId:u,setRowBusinessKey:g,setUserStyles:y,setCellCtrls:(e,t)=>{b.current=C.current,C.current=e;const i=ne(b.current,e,o.current);i!==b.current&&ie(t,()=>w(i))},showFullWidth:e=>E(e),getFullWidthCellRenderer:()=>R.current,refreshFullWidth:e=>B.current?(E(t=>m(f({},t),{params:e()})),!0):!(!R.current||!R.current.refresh)&&R.current.refresh(e())};n.setComp(t,I.current,s)},[]);(0,Ge.useLayoutEffect)(()=>oe(x,t,I.current,R),[x]);const _=(0,Ge.useMemo)(()=>{const e={top:M,transform:T};return Object.assign(e,v),e},[M,T,v]),F=a&&x&&x.componentFromFramework,G=!a&&null!=S,V=(0,Ge.useMemo)(()=>!(!(null==x?void 0:x.componentFromFramework)||!J(x.componentClass)),[x]),B=(0,Ge.useRef)(!1);return(0,Ge.useEffect)(()=>{B.current=V&&!!x&&!!i.get("reactiveCustomComponents")},[V,x]),Ge.default.createElement("div",{ref:O,role:"row",style:_,"row-index":c,"row-id":d,"row-business-key":p,tabIndex:r},G&&(null==S?void 0:S.map(e=>Ge.default.createElement(Ze,{cellCtrl:e,editingRow:n.isEditing(),printLayout:n.isPrintLayout(),key:e.getInstanceId()}))),F&&(()=>{const e=x.componentClass;return Ge.default.createElement(Ge.default.Fragment,null,V&&Ge.default.createElement(e,f({},x.params)),!V&&Ge.default.createElement(e,m(f({},x.params),{ref:R})))})())}),Je=(0,Fe.memo)(e=>{const{context:t}=(0,Fe.useContext)(q),{name:i}=e,n=(0,Fe.useMemo)(()=>(0,_e.getRowContainerTypeForName)(i),[i]),s=(0,Fe.useRef)(null),r=(0,Fe.useRef)(null),o=(0,Fe.useRef)([]),a=(0,Fe.useRef)([]),[l,c]=(0,Fe.useState)(()=>[]),h=(0,Fe.useRef)(!1),d=(0,Fe.useRef)(),u=(0,Fe.useMemo)(()=>_e.RowContainerCtrl.getRowContainerCssClasses(i),[i]),p=(0,Fe.useMemo)(()=>Z(u.viewport),[u]),g=(0,Fe.useMemo)(()=>Z(u.container),[u]),f=i===_e.RowContainerName.CENTER||i===_e.RowContainerName.TOP_CENTER||i===_e.RowContainerName.BOTTOM_CENTER||i===_e.RowContainerName.STICKY_TOP_CENTER||i===_e.RowContainerName.STICKY_BOTTOM_CENTER;Oe(" AG Row Container "+i+" ",f?s:r);const m=(0,Fe.useCallback)(()=>f?null!=s.current&&null!=r.current:null!=r.current,[]),v=(0,Fe.useCallback)(()=>f?null==s.current&&null==r.current:null==r.current,[]),y=(0,Fe.useCallback)(()=>{if(v()&&(t.destroyBean(d.current),d.current=null),m()){const e=e=>{const t=ne(a.current,o.current,h.current);t!==a.current&&(a.current=t,ie(e,()=>c(t)))},n={setViewportHeight:e=>{s.current&&(s.current.style.height=e)},setRowCtrls:({rowCtrls:t,useFlushSync:i})=>{const n=!!i&&o.current.length>0&&t.length>0;o.current=t,e(n)},setDomOrder:t=>{h.current!=t&&(h.current=t,e(!1))},setContainerWidth:e=>{r.current&&(r.current.style.width=e)}};d.current=t.createBean(new _e.RowContainerCtrl(i)),d.current.setComp(n,r.current,s.current)}},[m,v]),C=(0,Fe.useCallback)(e=>{r.current=e,y()},[y]),b=(0,Fe.useCallback)(e=>{s.current=e,y()},[y]),S=()=>Fe.default.createElement("div",{className:g,ref:C,role:"rowgroup"},l.map(e=>Fe.default.createElement(Qe,{rowCtrl:e,containerType:n,key:e.getInstanceId()})));return Fe.default.createElement(Fe.default.Fragment,null,f?Fe.default.createElement("div",{className:p,ref:b,role:"presentation"},S()):S())}),et=(0,pe.memo)(()=>{const{context:e,agStackComponentsRegistry:t,resizeObserverService:i}=(0,pe.useContext)(q),[n,s]=(0,pe.useState)(""),[r,o]=(0,pe.useState)(0),[a,l]=(0,pe.useState)(0),[c,h]=(0,pe.useState)("0px"),[d,u]=(0,pe.useState)("0px"),[p,g]=(0,pe.useState)("100%"),[f,m]=(0,pe.useState)("0px"),[v,y]=(0,pe.useState)("0px"),[C,b]=(0,pe.useState)("100%"),[S,w]=(0,pe.useState)(""),[x,E]=(0,pe.useState)(""),[M,A]=(0,pe.useState)(null),[T,D]=(0,pe.useState)(""),[I,R]=(0,pe.useState)(null),[L,k]=(0,pe.useState)("ag-layout-normal");let P=(0,pe.useRef)();P.current||(P.current=new ue.CssClassManager(()=>N.current));const N=(0,pe.useRef)(null),O=(0,pe.useRef)(null),_=(0,pe.useRef)(null),F=(0,pe.useRef)(null),G=(0,pe.useRef)(null),V=(0,pe.useRef)(null),B=(0,pe.useRef)(null),H=(0,pe.useRef)([]),z=(0,pe.useRef)([]);Oe(" AG Grid Body ",N),Oe(" AG Pinned Top ",O),Oe(" AG Sticky Top ",_),Oe(" AG Middle ",V),Oe(" AG Pinned Bottom ",B);const U=(0,pe.useCallback)(n=>{if(N.current=n,!N.current)return e.destroyBeans(H.current),z.current.forEach(e=>e()),H.current=[],void(z.current=[]);if(!e)return;const r=i=>{const n=t.getComponentClass(i),s=e.createBean(new n);return H.current.push(s),s},a=(e,t)=>{e.appendChild(t),z.current.push(()=>e.removeChild(t))};a(N.current,document.createComment(" AG Fake Horizontal Scroll ")),a(N.current,r("AG-FAKE-HORIZONTAL-SCROLL").getGui()),a(N.current,document.createComment(" AG Overlay Wrapper ")),a(N.current,r("AG-OVERLAY-WRAPPER").getGui()),G.current&&(a(G.current,document.createComment(" AG Fake Vertical Scroll ")),a(G.current,r("AG-FAKE-VERTICAL-SCROLL").getGui()));const c={setRowAnimationCssOnBodyViewport:s,setColumnCount:e=>{N.current&&ue._.setAriaColCount(N.current,e)},setRowCount:e=>{N.current&&ue._.setAriaRowCount(N.current,e)},setTopHeight:o,setBottomHeight:l,setStickyTopHeight:h,setStickyTopTop:u,setStickyTopWidth:g,setTopDisplay:w,setBottomDisplay:E,setColumnMovingCss:(e,t)=>P.current.addOrRemoveCssClass(e,t),updateLayoutClasses:k,setAlwaysVerticalScrollClass:A,setPinnedTopBottomOverflowY:D,setCellSelectableCss:(e,t)=>R(t?e:null),setBodyViewportWidth:e=>{V.current&&(V.current.style.width=e)},registerBodyViewportResizeListener:e=>{if(V.current){const t=i.observeResize(V.current,e);z.current.push(()=>t())}},setStickyBottomHeight:m,setStickyBottomBottom:y,setStickyBottomWidth:b},d=e.createBean(new ue.GridBodyCtrl);H.current.push(d),d.setComp(c,N.current,V.current,O.current,B.current,_.current,F.current)},[]),W=(0,pe.useMemo)(()=>Z("ag-root","ag-unselectable",L),[L]),j=(0,pe.useMemo)(()=>Z("ag-body-viewport",n,L,M,I),[n,L,M,I]),K=(0,pe.useMemo)(()=>Z("ag-body",L),[L]),$=(0,pe.useMemo)(()=>Z("ag-floating-top",I),[I]),Y=(0,pe.useMemo)(()=>Z("ag-sticky-top",I),[I]),X=(0,pe.useMemo)(()=>Z("ag-sticky-bottom",I),[I]),Q=(0,pe.useMemo)(()=>Z("ag-floating-bottom",I),[I]),J=(0,pe.useMemo)(()=>({height:r,minHeight:r,display:S,overflowY:T}),[r,S,T]),ee=(0,pe.useMemo)(()=>({height:c,top:d,width:p}),[c,d,p]),te=(0,pe.useMemo)(()=>({height:f,bottom:v,width:C}),[f,v,C]),ie=(0,pe.useMemo)(()=>({height:a,minHeight:a,display:x,overflowY:T}),[a,x,T]),ne=e=>pe.default.createElement(Je,{name:e,key:`${e}-container`}),se=({section:e,children:t,className:i,style:n})=>pe.default.createElement("div",{ref:e,className:i,role:"presentation",style:n},t.map(ne));return pe.default.createElement("div",{ref:U,className:W,role:"treegrid"},pe.default.createElement(Pe,null),se({section:O,className:$,style:J,children:[ue.RowContainerName.TOP_LEFT,ue.RowContainerName.TOP_CENTER,ue.RowContainerName.TOP_RIGHT,ue.RowContainerName.TOP_FULL_WIDTH]}),pe.default.createElement("div",{className:K,ref:G,role:"presentation"},se({section:V,className:j,children:[ue.RowContainerName.LEFT,ue.RowContainerName.CENTER,ue.RowContainerName.RIGHT,ue.RowContainerName.FULL_WIDTH]})),se({section:_,className:Y,style:ee,children:[ue.RowContainerName.STICKY_TOP_LEFT,ue.RowContainerName.STICKY_TOP_CENTER,ue.RowContainerName.STICKY_TOP_RIGHT,ue.RowContainerName.STICKY_TOP_FULL_WIDTH]}),se({section:F,className:X,style:te,children:[ue.RowContainerName.STICKY_BOTTOM_LEFT,ue.RowContainerName.STICKY_BOTTOM_CENTER,ue.RowContainerName.STICKY_BOTTOM_RIGHT,ue.RowContainerName.STICKY_BOTTOM_FULL_WIDTH]}),se({section:B,className:Q,style:ie,children:[ue.RowContainerName.BOTTOM_LEFT,ue.RowContainerName.BOTTOM_CENTER,ue.RowContainerName.BOTTOM_RIGHT,ue.RowContainerName.BOTTOM_FULL_WIDTH]}))}),tt=y(i(22155)),it=i(98092),nt=(0,tt.forwardRef)((e,t)=>{const{children:i,eFocusableElement:n,onTabKeyDown:s,gridCtrl:r,forceFocusOutWhenTabGuardsAreEmpty:o}=e,{context:a}=(0,tt.useContext)(q),l=(0,tt.useRef)(null),c=(0,tt.useRef)(null),h=(0,tt.useRef)(),d=e=>{const t=null==e?void 0:parseInt(e,10).toString();[l,c].forEach(e=>{var i,n;void 0===t?null==(i=e.current)||i.removeAttribute("tabindex"):null==(n=e.current)||n.setAttribute("tabindex",t)})};(0,tt.useImperativeHandle)(t,()=>({forceFocusOutOfContainer(e){var t;null==(t=h.current)||t.forceFocusOutOfContainer(e)}}));const u=(0,tt.useCallback)(()=>{if(!l.current&&!c.current)return a.destroyBean(h.current),void(h.current=null);if(l.current&&c.current){const e={setTabIndex:d};h.current=a.createBean(new it.TabGuardCtrl({comp:e,eTopGuard:l.current,eBottomGuard:c.current,eFocusableElement:n,onTabKeyDown:s,forceFocusOutWhenTabGuardsAreEmpty:o,focusInnerElement:e=>r.focusInnerElement(e)}))}},[]),p=(0,tt.useCallback)(e=>{l.current=e,u()},[u]),g=(0,tt.useCallback)(e=>{c.current=e,u()},[u]),f=e=>{const t="top"===e?it.TabGuardClassNames.TAB_GUARD_TOP:it.TabGuardClassNames.TAB_GUARD_BOTTOM;return tt.default.createElement("div",{className:`${it.TabGuardClassNames.TAB_GUARD} ${t}`,role:"presentation",ref:"top"===e?p:g})};return tt.default.createElement(tt.default.Fragment,null,f("top"),i,f("bottom"))}),st=(0,tt.memo)(nt),rt=(0,de.memo)(({context:e})=>{const[t,i]=(0,de.useState)(""),[n,s]=(0,de.useState)(""),[r,o]=(0,de.useState)(""),[a,l]=(0,de.useState)(null),[c,h]=(0,de.useState)(null),[d,u]=(0,de.useState)(!1),[p,g]=(0,de.useState)(),f=(0,de.useRef)(null),m=(0,de.useRef)(null),v=(0,de.useRef)(),[y,C]=(0,de.useState)(null),b=(0,de.useRef)(()=>{}),S=(0,de.useCallback)(()=>{},[]),w=(0,de.useMemo)(()=>e.isDestroyed()?null:e.getBean("beans"),[e]);Oe(" AG Grid ",m);const x=(0,de.useCallback)(t=>{if(m.current=t,!m.current)return e.destroyBean(f.current),void(f.current=null);if(e.isDestroyed())return;f.current=e.createBean(new he.GridCtrl);const n=f.current;b.current=n.focusInnerElement.bind(n);const s={destroyGridUi:()=>{},setRtlClass:i,forceFocusOutOfContainer:e=>{var t;null==(t=v.current)||t.forceFocusOutOfContainer(e)},updateLayoutClasses:o,getFocusableContainers:()=>{var e,t;const i=[],n=null==(e=m.current)?void 0:e.querySelector(".ag-root"),s=null==(t=m.current)?void 0:t.querySelector(".ag-side-bar:not(.ag-hidden)");return n&&i.push(n),s&&i.push(s),i},setCursor:l,setUserSelect:h};n.setComp(s,m.current,m.current),u(!0)},[]);(0,de.useEffect)(()=>{if(!(p&&w&&f.current&&y&&m.current))return;const t=f.current,i=[],{agStackComponentsRegistry:n}=w,s=n.getComponentClass("AG-GRID-HEADER-DROP-ZONES"),r=n.getComponentClass("AG-SIDE-BAR"),o=n.getComponentClass("AG-STATUS-BAR"),a=n.getComponentClass("AG-WATERMARK"),l=n.getComponentClass("AG-PAGINATION"),c=[],h=m.current;if(t.showDropZones()&&s){const t=e.createBean(new s),n=t.getGui();h.insertAdjacentElement("afterbegin",n),c.push(n),i.push(t)}if(t.showSideBar()&&r){const t=e.createBean(new r),n=t.getGui(),s=y.querySelector(".ag-tab-guard-bottom");s&&(s.insertAdjacentElement("beforebegin",n),c.push(n)),i.push(t)}if(t.showStatusBar()&&o){const t=e.createBean(new o),n=t.getGui();h.insertAdjacentElement("beforeend",n),c.push(n),i.push(t)}if(l){const t=e.createBean(new l),n=t.getGui();h.insertAdjacentElement("beforeend",n),c.push(n),i.push(t)}if(t.showWatermark()&&a){const t=e.createBean(new a),n=t.getGui();h.insertAdjacentElement("beforeend",n),c.push(n),i.push(t)}return()=>{e.destroyBeans(i),c.forEach(e=>{e.parentElement&&e.parentElement.removeChild(e)})}},[p,y,w]);const E=(0,de.useMemo)(()=>Z("ag-root-wrapper",t,n,r),[t,n,r]),M=(0,de.useMemo)(()=>Z("ag-root-wrapper-body","ag-focus-managed",r),[r]),A=(0,de.useMemo)(()=>({userSelect:null!=c?c:"",WebkitUserSelect:null!=c?c:"",cursor:null!=a?a:""}),[c,a]),T=(0,de.useCallback)(e=>{v.current=e,g(null!==e)},[]);return de.default.createElement("div",{ref:x,className:E,style:A,role:"presentation"},de.default.createElement("div",{className:M,ref:C,role:"presentation"},d&&y&&w&&de.default.createElement(q.Provider,{value:w},de.default.createElement(st,{ref:T,eFocusableElement:y,onTabKeyDown:S,gridCtrl:f.current,forceFocusOutWhenTabGuardsAreEmpty:!0},de.default.createElement(et,null)))))}),ot=e=>{var t,i;const n=(0,w.useRef)(),s=(0,w.useRef)(null),r=(0,w.useRef)(null),o=(0,w.useRef)([]),a=(0,w.useRef)([]),l=(0,w.useRef)(e),c=(0,w.useRef)(!1),[h,d]=(0,w.useState)(void 0),[,u]=(0,w.useState)(0),p=(0,w.useCallback)(t=>{if(s.current=t,!s.current)return o.current.forEach(e=>e()),void(o.current.length=0);const i=e.modules||[];r.current||(r.current=new Y(()=>u(e=>e+1),e.componentWrappingElement,e.maxComponentCreationTimeMs),o.current.push(()=>{var e;null==(e=r.current)||e.destroy(),r.current=null}));const l=S.ComponentUtil.combineAttributesAndGridOptions(e.gridOptions,e),h={providedBeanInstances:{frameworkComponentWrapper:new at(r.current,!!l.reactiveCustomComponents)},modules:i,frameworkOverrides:new ct},p=new S.GridCoreCreator;n.current=p.create(s.current,l,t=>{d(t),o.current.push(()=>{t.destroy()}),t.getBean(S.CtrlsService.NAME).whenReady(()=>{if(t.isDestroyed())return;const i=n.current;i&&e.setGridApi&&e.setGridApi(i,new S.ColumnApi(i))})},e=>{e.getBean(S.CtrlsService.NAME).whenReady(()=>{a.current.forEach(e=>e()),a.current.length=0,c.current=!0})},h)},[]),g=(0,w.useMemo)(()=>f({height:"100%"},e.containerStyle||{}),[e.containerStyle]),m=(0,w.useCallback)(e=>{c.current?e():a.current.push(e)},[]);return(0,w.useEffect)(()=>{const t=function(e,t){const i={};return Object.keys(t).forEach(n=>{const s=t[n];e[n]!==s&&(i[n]=s)}),i}(l.current,e);l.current=e,m(()=>{n.current&&S.ComponentUtil.processOnChange(t,n.current)})},[e]),w.default.createElement("div",{style:g,className:e.className,ref:p},h&&!h.isDestroyed()?w.default.createElement(rt,{context:h}):null,null!=(i=null==(t=r.current)?void 0:t.getPortals())?i:null)},at=class extends S.BaseComponentWrapper{constructor(e,t){super(),this.parent=e,this.reactiveCustomComponents=t}createWrapper(e,t){if(this.reactiveCustomComponents){const i=(e=>{switch(e){case"filter":return F;case"floatingFilterComponent":return H;case"dateComponent":return _;case"loadingOverlayComponent":return z;case"noRowsOverlayComponent":return W;case"statusPanel":return j;case"toolPanel":return K;case"menuItem":return U}})(t.propertyName);if(i)return new i(e,this.parent,t)}else switch(t.propertyName){case"filter":case"floatingFilterComponent":case"dateComponent":case"loadingOverlayComponent":case"noRowsOverlayComponent":case"statusPanel":case"toolPanel":case"menuItem":Ie()}const i=!t.cellRenderer&&"toolPanel"!==t.propertyName;return new P(e,this.parent,t,i)}},lt=(0,w.forwardRef)((e,t)=>{const{ctrlsFactory:i,context:n,gos:s,resizeObserverService:r,clientSideRowModel:o,serverSideRowModel:a}=(0,w.useContext)(q),[l,c]=(0,w.useState)(()=>new Q),[h,d]=(0,w.useState)(()=>new Q),[u,p]=(0,w.useState)(),[g,v]=(0,w.useState)(),y=(0,w.useRef)(),C=(0,w.useRef)(null),b=(0,w.useRef)(),x=(0,w.useMemo)(()=>S.ModuleRegistry.__getGridRegisteredModules(e.api.getGridId()),[e]),E=(0,w.useMemo)(()=>l.toString()+" ag-details-row",[l]),M=(0,w.useMemo)(()=>h.toString()+" ag-details-grid",[h]);t&&(0,w.useImperativeHandle)(t,()=>({refresh(){var e,t;return null!=(t=null==(e=y.current)?void 0:e.refresh())&&t}})),e.template&&S._.warnOnce("detailCellRendererParams.template is not supported by AG Grid React. To change the template, provide a Custom Detail Cell Renderer. See https://ag-grid.com/react-data-grid/master-detail-custom-detail/");const A=(0,w.useCallback)(t=>{if(C.current=t,!C.current)return n.destroyBean(y.current),void(b.current&&b.current());const l={addOrRemoveCssClass:(e,t)=>c(i=>i.setClass(e,t)),addOrRemoveDetailGridCssClass:(e,t)=>d(i=>i.setClass(e,t)),setDetailGrid:e=>p(e),setRowData:e=>v(e),getGui:()=>C.current},h=i.getInstance("detailCellRenderer");if(h&&(n.createBean(h),h.init(l,e),y.current=h,s.get("detailRowAutoHeight"))){const t=()=>{if(null==C.current)return;const t=C.current.clientHeight;null!=t&&t>0&&setTimeout(()=>{e.node.setRowHeight(t),o?o.onRowHeightChanged():a&&a.onRowHeightChanged()},0)};b.current=r.observeResize(C.current,t),t()}},[]),T=(0,w.useCallback)((e,t)=>{var i;null==(i=y.current)||i.registerDetailWithMaster(e,t)},[]);return w.default.createElement("div",{className:E,ref:A},u&&w.default.createElement(ot,m(f({className:M},u),{modules:x,rowData:g,setGridApi:T})))}),ct=class extends S.VanillaFrameworkOverrides{constructor(){super("react"),this.frameworkComponents={agGroupCellRenderer:ce,agGroupRowRenderer:ce,agDetailCellRenderer:lt},this.wrapIncoming=(e,t)=>{return"ensureVisible"===t?(i=e,te||setTimeout(()=>te=!1,0),te=!0,i()):e();var i},this.renderingEngine="react"}frameworkComponent(e){return this.frameworkComponents[e]}isFrameworkComponent(e){if(!e)return!1;const t=e.prototype;return!(t&&"getGui"in t)}},ht=class extends b.Component{constructor(){super(...arguments),this.apiListeners=[],this.setGridApi=(e,t)=>{this.api=e,this.columnApi=t,this.apiListeners.forEach(t=>t(e))}}registerApiListener(e){this.apiListeners.push(e)}componentWillUnmount(){this.apiListeners.length=0}render(){return b.default.createElement(ot,m(f({},this.props),{setGridApi:this.setGridApi}))}},dt=(e=>(e.IdentityCheck="IdentityCheck",e.DeepValueCheck="DeepValueCheck",e.NoCheck="NoCheck",e))(dt||{}),ut=i(22155);function pt(e){const{setMethods:t}=(0,ut.useContext)(M);t(e)}function gt(e){pt(e)}function ft(e){return pt(e)}function mt(e){return pt(e)}function vt(e){pt(e)}function yt(e){pt(e)}},14538(e,t){!function(e){"use strict";function t(e,t){(null==t||t>e.length)&&(t=e.length);for(var i=0,n=Array(t);i<t;i++)n[i]=e[i];return n}function i(e,t,i,n,s,r,o){try{var a=e[r](o),l=a.value}catch(e){return void i(e)}a.done?t(l):Promise.resolve(l).then(n,s)}function n(e){return function(){var t=this,n=arguments;return new Promise(function(s,r){var o=e.apply(t,n);function a(e){i(o,s,r,a,l,"next",e)}function l(e){i(o,s,r,a,l,"throw",e)}a(void 0)})}}function s(e,t,i){return t=l(t),function(e,t){if(t&&("object"==typeof t||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,h()?Reflect.construct(t,i||[],l(e).constructor):t.apply(e,i))}function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t,i){return Object.defineProperty(e,"prototype",{writable:!1}),e}function a(e,t,i){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var i=e[Symbol.toPrimitive];if(void 0!==i){var n=i.call(e,t);if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,e}function l(e){return l=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},l(e)}function c(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&m(e,t)}function h(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(h=function(){return!!e})()}function d(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),i.push.apply(i,n)}return i}function u(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?d(Object(i),!0).forEach(function(t){a(e,t,i[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):d(Object(i)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))})}return e}function p(e,t){if(null==e)return{};var i,n,s=function(e,t){if(null==e)return{};var i={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(-1!==t.indexOf(n))continue;i[n]=e[n]}return i}(e,t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);for(n=0;n<r.length;n++)i=r[n],-1===t.indexOf(i)&&{}.propertyIsEnumerable.call(e,i)&&(s[i]=e[i])}return s}function g(){var e,t,i="function"==typeof Symbol?Symbol:{},n=i.iterator||"@@iterator",s=i.toStringTag||"@@toStringTag";function r(i,n,s,r){var l=n&&n.prototype instanceof a?n:a,c=Object.create(l.prototype);return f(c,"_invoke",function(i,n,s){var r,a,l,c=0,h=s||[],d=!1,u={p:0,n:0,v:e,a:p,f:p.bind(e,4),d:function(t,i){return r=t,a=0,l=e,u.n=i,o}};function p(i,n){for(a=i,l=n,t=0;!d&&c&&!s&&t<h.length;t++){var s,r=h[t],p=u.p,g=r[2];i>3?(s=g===n)&&(l=r[(a=r[4])?5:(a=3,3)],r[4]=r[5]=e):r[0]<=p&&((s=i<2&&p<r[1])?(a=0,u.v=n,u.n=r[1]):p<g&&(s=i<3||r[0]>n||n>g)&&(r[4]=i,r[5]=n,u.n=g,a=0))}if(s||i>1)return o;throw d=!0,n}return function(s,h,g){if(c>1)throw TypeError("Generator is already running");for(d&&1===h&&p(h,g),a=h,l=g;(t=a<2?e:l)||!d;){r||(a?a<3?(a>1&&(u.n=-1),p(a,l)):u.n=l:u.v=l);try{if(c=2,r){if(a||(s="next"),t=r[s]){if(!(t=t.call(r,l)))throw TypeError("iterator result is not an object");if(!t.done)return t;l=t.value,a<2&&(a=0)}else 1===a&&(t=r.return)&&t.call(r),a<2&&(l=TypeError("The iterator does not provide a '"+s+"' method"),a=1);r=e}else if((t=(d=u.n<0)?l:i.call(n,u))!==o)break}catch(t){r=e,a=1,l=t}finally{c=1}}return{value:t,done:d}}}(i,s,r),!0),c}var o={};function a(){}function l(){}function c(){}t=Object.getPrototypeOf;var h=[][n]?t(t([][n]())):(f(t={},n,function(){return this}),t),d=c.prototype=a.prototype=Object.create(h);function u(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,c):(e.__proto__=c,f(e,s,"GeneratorFunction")),e.prototype=Object.create(d),e}return l.prototype=c,f(d,"constructor",c),f(c,"constructor",l),l.displayName="GeneratorFunction",f(c,s,"GeneratorFunction"),f(d),f(d,s,"Generator"),f(d,n,function(){return this}),f(d,"toString",function(){return"[object Generator]"}),(g=function(){return{w:r,m:u}})()}function f(e,t,i,n){var s=Object.defineProperty;try{s({},"",{})}catch(e){s=0}f=function(e,t,i,n){function r(t,i){f(e,t,function(e){return this._invoke(t,i,e)})}t?s?s(e,t,{value:i,enumerable:!n,configurable:!n,writable:!n}):e[t]=i:(r("next",0),r("throw",1),r("return",2))},f(e,t,i,n)}function m(e,t){return m=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},m(e,t)}function v(e,i){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var i=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=i){var n,s,r,o,a=[],l=!0,c=!1;try{if(r=(i=i.call(e)).next,0===t);else for(;!(l=(n=r.call(i)).done)&&(a.push(n.value),a.length!==t);l=!0);}catch(e){c=!0,s=e}finally{try{if(!l&&null!=i.return&&(o=i.return(),Object(o)!==o))return}finally{if(c)throw s}}return a}}(e,i)||function(e,i){if(e){if("string"==typeof e)return t(e,i);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?t(e,i):void 0}}(e,i)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function y(e){return y="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},y(e)}var C={CALLBACK_OPERATION_INVOKED:"CALLBACK_OPERATION_INVOKED",CONTENT_LOADED:"CONTENT_LOADED",EXPERIENCE_INITIALIZED:"EXPERIENCE_INITIALIZED",ERROR_OCCURRED:"ERROR_OCCURRED",SIZE_CHANGED:"SIZE_CHANGED",PARAMETERS_CHANGED:"PARAMETERS_CHANGED",SELECTED_SHEET_CHANGED:"SELECTED_SHEET_CHANGED",MODAL_OPENED:"MODAL_OPENED",Q_SEARCH_CLOSED:"Q_SEARCH_CLOSED",Q_SEARCH_OPENED:"Q_SEARCH_OPENED",Q_SEARCH_FOCUSED:"Q_SEARCH_FOCUSED",Q_SEARCH_SIZE_CHANGED:"Q_SEARCH_SIZE_CHANGED",Q_SEARCH_ENTERED_FULLSCREEN:"Q_SEARCH_ENTERED_FULLSCREEN",Q_SEARCH_EXITED_FULLSCREEN:"Q_SEARCH_EXITED_FULLSCREEN",Q_PANEL_ENTERED_FULLSCREEN:"Q_PANEL_ENTERED_FULLSCREEN",Q_PANEL_EXITED_FULLSCREEN:"Q_PANEL_EXITED_FULLSCREEN",PAGE_NAVIGATION:"PAGE_NAVIGATION",PARAMETERS_LOADED:"PARAMETERS_LOADED"},b={FRAME_STARTED:"FRAME_STARTED",FRAME_MOUNTED:"FRAME_MOUNTED",FRAME_LOADED:"FRAME_LOADED",FRAME_REMOVED:"FRAME_REMOVED"},S={FRAME_NOT_CREATED:"FRAME_NOT_CREATED",NO_BODY:"NO_BODY",NO_CONTAINER:"NO_CONTAINER",INVALID_CONTAINER:"INVALID_CONTAINER",NO_URL:"NO_URL",INVALID_URL:"INVALID_URL",NO_FRAME_OPTIONS:"NO_FRAME_OPTIONS",INVALID_FRAME_OPTIONS:"INVALID_FRAME_OPTIONS"},w={UNRECOGNIZED_CONTENT_OPTIONS:"UNRECOGNIZED_CONTENT_OPTIONS",UNRECOGNIZED_FRAME_OPTIONS:"UNRECOGNIZED_FRAME_OPTIONS",UNRECOGNIZED_EVENT_TARGET:"UNRECOGNIZED_EVENT_TARGET"},x={SET_PARAMETERS:"SET_PARAMETERS",SET_SELECTED_SHEET_ID:"SET_SELECTED_SHEET_ID",SET_Q_SEARCH_QUESTION:"SET_Q_SEARCH_QUESTION",SET_VISUAL_ACTIONS:"SET_VISUAL_ACTIONS",SET_THEME:"SET_THEME",ADD_FILTER_GROUPS:"ADD_FILTER_GROUPS",UPDATE_FILTER_GROUPS:"UPDATE_FILTER_GROUPS",REMOVE_FILTER_GROUPS:"REMOVE_FILTER_GROUPS",ADD_VISUAL_ACTIONS:"ADD_VISUAL_ACTIONS",REMOVE_VISUAL_ACTIONS:"REMOVE_VISUAL_ACTIONS",SET_THEME_OVERRIDE:"SET_THEME_OVERRIDE",PRELOAD_THEMES:"PRELOAD_THEMES",CREATE_SHARED_VIEW:"CREATE_SHARED_VIEW"},E={GET_PARAMETERS:"GET_PARAMETERS",GET_SHEETS:"GET_SHEETS",GET_SHEET_VISUALS:"GET_SHEET_VISUALS",GET_VISUAL_ACTIONS:"GET_VISUAL_ACTIONS",GET_SELECTED_SHEET_ID:"GET_SELECTED_SHEET_ID",GET_FILTER_GROUPS_FOR_SHEET:"GET_FILTER_GROUPS_FOR_SHEET",GET_FILTER_GROUPS_FOR_VISUAL:"GET_FILTER_GROUPS_FOR_VISUAL"},M={ACKNOWLEDGE:"ACKNOWLEDGE",INITIATE_PRINT:"INITIATE_PRINT",NAVIGATE_TO_DASHBOARD:"NAVIGATE_TO_DASHBOARD",CLOSE_Q_SEARCH:"CLOSE_Q_SEARCH",UNDO:"UNDO",REDO:"REDO",RESET:"RESET",TOGGLE_EXECUTIVE_SUMMARY_PANE:"TOGGLE_EXECUTIVE_SUMMARY_PANE",OPEN_BUILD_VISUAL_PANE:"OPEN_BUILD_VISUAL_PANE",OPEN_DATA_QNA_PANE:"OPEN_DATA_QNA_PANE",TOGGLE_BOOKMARKS_PANE:"TOGGLE_BOOKMARKS_PANE",TOGGLE_THRESHOLD_ALERTS_PANE:"TOGGLE_THRESHOLD_ALERTS_PANE",TOGGLE_SCHEDULING_PANE:"TOGGLE_SCHEDULING_PANE",TOGGLE_RECENT_SNAPSHOTS_PANE:"TOGGLE_RECENT_SNAPSHOTS_PANE",IMPORT_OBJECTS:"IMPORT_OBJECTS",OPEN_BUILD_STORY_PANE:"OPEN_BUILD_STORY_PANE",SEND_PROMPT:"SEND_PROMPT"},A=Object.freeze({__proto__:null,ErrorChangeEventName:S,GetterMessageEventName:E,InfoChangeEventName:b,InfoMessageEventName:C,InvokerMessageEventName:M,SetterMessageEventName:x,WarnChangeEventName:w}),T=u(u(u({},b),S),w),D=u(u(u(u({},C),x),E),M),I={ERROR:"ERROR",INFO:"INFO",WARN:"WARN"},R=Object.freeze({__proto__:null,ChangeEventLevel:I,ChangeEventName:T,MessageEventName:D}),L=Object.freeze({__proto__:null}),k=Object.freeze({__proto__:null}),P=Object.freeze({__proto__:null}),N=Object.freeze({__proto__:null}),O={CONSOLE:"CONSOLE",CONTEXT:"CONTEXT",CONTROL:"CONTROL",VISUAL:"VISUAL",DASHBOARD:"DASHBOARD",QSEARCH:"QSEARCH",GENERATIVEQNA:"QSEARCH",QUICKCHAT:"QUICKCHAT"},_=Object.freeze({__proto__:null,ExperienceType:O}),F=Object.freeze({__proto__:null}),G={NULL:null,OTHER_BUCKET:null},V={INTEGER:null,STRING:null,DECIMAL:null,DATETIME:null},B=Object.freeze({__proto__:null,CALCULATED_METRIC_COLUMN_TYPE:V,SPECIAL_DATAPOINT_VALUE_TYPES:G}),H=Object.freeze({__proto__:null}),z=Object.freeze({__proto__:null}),U=Object.freeze({__proto__:null}),W={FULL:"FULL",SEARCH_BAR:"SEARCH_BAR"},j=Object.freeze({__proto__:null,GenerativeQnAPanelType:W}),K=Object.freeze({__proto__:null}),$=Object.freeze({__proto__:null}),Y=o(function e(t,i,n){r(this,e),this.eventName=t,this.message=i,this.data=n}),q=function(e){function t(e,i,n,o){var a;return r(this,t),(a=s(this,t,[e,n,o])).eventLevel=i,a}return c(t,e),o(t)}(Y),X=function(e){function t(e,i,n){var o;return r(this,t),(o=s(this,t,[e,i,n])).eventName=e,o}return c(t,e),o(t)}(Y),Z=function(e){function t(e,i,n,o){var a;return r(this,t),(a=s(this,t,[e,n,o])).eventTarget=i,a}return c(t,e),o(t)}(X),Q=function(e){function t(e,i,n,o,a,l,c){var h;return r(this,t),(h=s(this,t,[e,i,l,c])).timestamp=o,h.version=a,h.eventId=n,h}return c(t,e),o(t)}(Z),J=o(function e(){r(this,e)}),ee=o(function e(){r(this,e),a(this,"success",!0)}),te=o(function e(t){r(this,e),a(this,"success",!1),this.errorCode=t.errorCode,this.error=t.error,this.message=t.message}),ie=o(function e(t){r(this,e),a(this,"success",!0),this.message=t});let ne;const se=new Uint8Array(16);function re(){if(!ne&&(ne="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!ne))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return ne(se)}const oe=[];for(let e=0;e<256;++e)oe.push((e+256).toString(16).slice(1));var ae={randomUUID:"undefined"!=typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};function le(e,t,i){if(ae.randomUUID&&!e)return ae.randomUUID();const n=(e=e||{}).random||(e.rng||re)();return n[6]=15&n[6]|64,n[8]=63&n[8]|128,function(e,t=0){return oe[e[t+0]]+oe[e[t+1]]+oe[e[t+2]]+oe[e[t+3]]+"-"+oe[e[t+4]]+oe[e[t+5]]+"-"+oe[e[t+6]]+oe[e[t+7]]+"-"+oe[e[t+8]]+oe[e[t+9]]+"-"+oe[e[t+10]]+oe[e[t+11]]+oe[e[t+12]]+oe[e[t+13]]+oe[e[t+14]]+oe[e[t+15]]}(n)}var ce=o(function e(t,i,s,o){var l=this;r(this,e),a(this,"send",function(){var e=n(g().m(function e(t){var i;return g().w(function(e){for(;;)switch(e.n){case 0:if(l.experienceFrame&&l.internalExperience){e.n=1;break}throw new Error("Experience has not been initialized");case 1:return i=new Z(t.eventName,l.internalExperience,t.message,t.data),e.a(2,l.experienceFrame.send(i))}},e)}));return function(t){return e.apply(this,arguments)}}()),a(this,"addEventListener",function(e,t){return l.experienceFrame.addInternalEventListener(e,t)}),a(this,"setLogProvider",function(e){return l.logger=e,l}),a(this,"getInternalExperienceInfo",function(t){var i,n,s=-1;do{s++,i=u(u({},t),{},{contextId:l.controlOptions.contextId,discriminator:s}),n=e.getExperienceIdentifier(i)}while(l.experienceIdentifiers.has(n));return l.experienceIdentifiers.add(n),{experienceIdentifier:n,internalExperience:i}}),a(this,"transformContentOptions",function(e,t){return l.warnUnrecognizedContentOptions(Object.keys(t)),e}),a(this,"warnUnrecognizedContentOptions",function(e){var t,i,n;e.length>0&&(null===(t=(i=l.frameOptions).onChange)||void 0===t||t.call(i,new q(T.UNRECOGNIZED_CONTENT_OPTIONS,I.WARN,"Experience content options contain unrecognized properties",{unrecognizedContentOptions:e}),{frame:null}),null===(n=l.logger)||void 0===n||n.warn("Experience content options contain unrecognized properties"))}),a(this,"validateFrameOptions",function(){if(!l.frameOptions.url){var e,t,i="Url is required for the experience";throw null===(e=(t=l.frameOptions).onChange)||void 0===e||e.call(t,new q(T.NO_URL,I.ERROR,i),{frame:null}),new Error(i)}}),this.frameOptions=t,this.contentOptions=i,this.controlOptions=s,this.experienceIdentifiers=o,this.validateFrameOptions()});a(ce,"getExperienceIdentifier",function(e){if(e.experienceType===O.DASHBOARD)return[e.contextId,e.experienceType,e.dashboardId,e.discriminator].filter(Boolean).join("-");if(e.experienceType===O.VISUAL)return[e.contextId,e.experienceType,e.dashboardId,e.sheetId,e.visualId,e.discriminator].filter(Boolean).join("-");if([O.CONSOLE,O.CONTROL,O.CONTEXT,O.QSEARCH,O.GENERATIVEQNA,O.QUICKCHAT].includes(e.experienceType))return[e.contextId,e.experienceType,e.discriminator].filter(Boolean).join("-");throw new Error("Invalid experience unable to build experience identifier")});const he=2147483647,de={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},ue=Math.floor,pe=String.fromCharCode;function ge(e){throw new RangeError(de[e])}const fe=function(e,t){return e+22+75*(e<26)-((0!=t)<<5)},me=function(e,t,i){let n=0;for(e=i?ue(e/700):e>>1,e+=ue(e/t);e>455;n+=36)e=ue(e/35);return ue(n+36*e/(e+38))},ve=function(e){const t=[];e=function(e){const t=[];let i=0;const n=e.length;for(;i<n;){const s=e.charCodeAt(i++);if(s>=55296&&s<=56319&&i<n){const n=e.charCodeAt(i++);56320==(64512&n)?t.push(((1023&s)<<10)+(1023&n)+65536):(t.push(s),i--)}else t.push(s)}return t}(e);const i=e.length;let n=128,s=0,r=72;for(const i of e)i<128&&t.push(pe(i));const o=t.length;let a=o;for(o&&t.push("-");a<i;){let i=he;for(const t of e)t>=n&&t<i&&(i=t);const l=a+1;i-n>ue((he-s)/l)&&ge("overflow"),s+=(i-n)*l,n=i;for(const i of e)if(i<n&&++s>he&&ge("overflow"),i===n){let e=s;for(let i=36;;i+=36){const n=i<=r?1:i>=r+26?26:i-r;if(e<n)break;const s=e-n,o=36-n;t.push(pe(fe(n+s%o,0))),e=ue(s/o)}t.push(pe(fe(e,0))),r=me(s,l,a===o),s=0,++a}++s,++n}return t.join("")};var ye=o(function e(t){var i=this;r(this,e),a(this,"classNames",[e.IFRAME_CLASS_NAME]),a(this,"getIframe",function(){return i.iframe}),a(this,"createIframePlaceholder",function(t){if(i.iframePlaceholder=document.createElement("div"),i.iframePlaceholder.id="".concat(i.iframeName,"-placeholder"),i.iframePlaceholder.style.width=i.width,i.iframePlaceholder.style.backgroundColor="rgba(0,0,0,.01)",i.iframePlaceholder.style.display="flex",i.iframePlaceholder.style.justifyContent="center",i.iframePlaceholder.style.alignItems="center",i.iframePlaceholder.className="".concat(e.IFRAME_CLASS_NAME,"-placeholder"),i.height.endsWith("px")&&(i.iframePlaceholder.style.height=i.height),t&&"boolean"!=typeof t)i.iframePlaceholder.appendChild(t);else{var n=i.createLoaderSVG();i.iframePlaceholder.appendChild(n)}i.container.appendChild(i.iframePlaceholder)}),a(this,"createIframe",function(){var e,t,n=document.createElement("iframe");n.className=i.classNames.join(" ").trim(),n.id=i.iframeName,n.name=i.iframeName,n.width=i.width,n.height=i.height,i.loading&&(n.loading=i.loading),n.style.border="0px",n.style.padding="0px",i.iframePlaceholder&&(n.style.opacity="0",n.style.position="absolute"),"0px"===i.width&&"0px"===i.height&&(n.style.position="absolute");var s=[];return null!==(e=i.framePermissions)&&void 0!==e&&e.clipboardRead&&s.push("clipboard-read ".concat(new URL(i.src).origin)),null!==(t=i.framePermissions)&&void 0!==t&&t.clipboardWrite&&s.push("clipboard-write ".concat(new URL(i.src).origin)),s.length&&(n.allow=s.join("; ")),i.container.appendChild(n),i.payload?i.postRequest=i.createPostRequest({src:i.src,target:n.name,container:i.container,payload:i.payload}):n.src=i.src,n}),a(this,"onLoadLocal",function(e){var t,n;i.iframePlaceholder&&(i.iframePlaceholder.remove(),i.iframe.style.position="",i.iframe.style.opacity="1",i.iframe.style.transition="opacity .5s ease-in-out"),null===(t=i.onLoad)||void 0===t||t.call(i,e),null===(n=i.postRequest)||void 0===n||n.remove()}),a(this,"createPostRequest",function(e){var t=e.src,i=e.container,n=e.target,s=e.payload;if(!t)throw new Error("No source has been provided.");var r=document.createElement("form");return r.style.visibility="hidden",r.method="POST",r.action=t,r.target=n,r.name="".concat(n,"-form"),Object.keys(s).forEach(function(e){var t=document.createElement("input");t.type="hidden",t.name=e,t.value=s[e],r.appendChild(t)}),i.appendChild(r),null==r||r.submit(),{remove:function(){r.remove()}}}),a(this,"createSvgElement",function(e,t){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:[],s=document.createElementNS("http://www.w3.org/2000/svg",e);return Object.entries(t).forEach(function(e){var t=v(e,2),i=t[0],n=t[1];return s.setAttribute(i,n)}),Object.entries(i).forEach(function(e){var t=v(e,2),i=t[0],n=t[1];return s.style.setProperty(i,n)}),n.forEach(function(e){return s.appendChild(e)}),s}),a(this,"createLoaderSVG",function(){var e=[1,2,3].map(function(e){var t=i.createSvgElement("animate",{attributeName:"opacity",dur:"1s",values:"0;1;0",repeatCount:"indefinite",begin:"".concat(e/10)});return i.createSvgElement("circle",{fill:"#ccc",stroke:"none",cx:"".concat(20*e-14),cy:"50",r:"6"},void 0,[t])});return i.createSvgElement("svg",{version:"1.1",x:"0px",y:"0px",viewBox:"0 0 100 100","enable-background":"new 0 0 0 0"},{width:"100px",height:"100px"},e)});var n=t.id,s=t.src,o=t.width,l=void 0===o?"100%":o,c=t.height,h=void 0===c?"100%":c,d=t.container,u=t.onLoad,p=t.loading,g=t.withIframePlaceholder,f=t.payload,m=t.className,y=t.framePermissions;this.width=l,this.height=h,this.onLoad=u,this.iframeName=n,this.framePermissions=y,this.loading=p,m&&this.classNames.push(m),this.container=d,this.payload=f,this.src=s,g&&this.createIframePlaceholder(g),this.iframe=this.createIframe(),this.iframe.addEventListener("load",this.onLoadLocal)});a(ye,"IFRAME_CLASS_NAME","quicksight-embedding-iframe");var Ce="2.11.2",be=o(function e(t,i,s,o,l,c,h){var d=this;r(this,e),a(this,"MESSAGE_RESPONSE_TIMEOUT",5e3),a(this,"iframe",null),a(this,"send",function(){var e=n(g().m(function e(t){var i,n,s;return g().w(function(e){for(;;)switch(e.n){case 0:if(!d.controlOptions.sendToControlFrame){e.n=1;break}return e.a(2,d.controlOptions.sendToControlFrame(t));case 1:if(d.iframe){e.n=2;break}throw new Error("Cannot send ".concat(t.eventName,": No experience frame found"));case 2:if(n=le(),s=new Q(t.eventName,t.eventTarget,n,Date.now(),Ce,t.message,t.data),null===(i=d.iframe)||void 0===i||null===(i=i.contentWindow)||void 0===i||i.postMessage(s,d.url),t.eventName!==D.ACKNOWLEDGE){e.n=3;break}return e.a(2,Promise.resolve(new ee));case 3:return e.a(2,new Promise(function(e,i){var s=function(t){var i,r,o=t.data;(null==o?void 0:o.eventId)===n&&(window.removeEventListener("message",s),!0===(null===(i=o.message)||void 0===i?void 0:i.success)?e(new ee):!1===(null===(r=o.message)||void 0===r?void 0:r.success)?e(new te(o.message)):e(new ie(o.message)))};window.addEventListener("message",s),setTimeout(function(){window.removeEventListener("message",s),i("".concat(t.eventName," timed out"))},d.MESSAGE_RESPONSE_TIMEOUT)}))}},e)}));return function(t){return e.apply(this,arguments)}}()),a(this,"buildParameterString",function(e){return e&&"object"===y(e)?Object.entries(e).map(function(e){var t=v(e,2),i=t[0],n=t[1],s=Array.isArray(n)?n:[n],r=encodeURIComponent(i);return s.map(encodeURIComponent).map(function(e){return"p.".concat(r,"=").concat(e)}).join("&")}).join("&"):""}),a(this,"buildQueryString",function(e){var t=Object.entries(e).reduce(function(e,t){var i=v(t,2),n=i[0],s=i[1];return null!=s?u(u({},e),{},a({},n,"".concat(s))):e},{punyCodeEmbedOrigin:ve("".concat(window.location.origin,"/")),sdkVersion:Ce});return new URLSearchParams(t).toString()}),a(this,"createExperienceIframe",function(){d.onChange(new q(T.FRAME_STARTED,I.INFO,"Creating the frame",{experience:d.internalExperience}));try{d.setTimeoutInstance(),d.iframe=new ye({id:d.experienceId,src:d.url,width:d.frameOptions.width,height:d.frameOptions.height,container:d.container,onLoad:d.onLoadHandler,withIframePlaceholder:d.frameOptions.withIframePlaceholder,className:d.frameOptions.className,framePermissions:d.frameOptions.framePermissions}).getIframe()}catch(e){throw d.onChange(new q(T.FRAME_NOT_CREATED,I.ERROR,"Failed to create the frame",{experience:d.internalExperience})),e}d.onChange(new q(T.FRAME_MOUNTED,I.INFO,"The frame mounted",{experience:d.internalExperience,frame:d.iframe}))}),a(this,"addInternalEventListener",function(e,t){var i=function(i,n){i.eventName===e&&t(i,n)};return d.controlOptions.eventManager.addEventListener(d.experienceId,i,!0),{remove:function(){return d.controlOptions.eventManager.removeEventListener(d.experienceId,i)}}}),a(this,"validateBaseUrl",function(e){if(!e)throw d.onChange(new q(T.NO_URL,I.ERROR,"Url is required for the experience",{experience:d.internalExperience})),new Error("Url is required for the experience");try{new URL(e)}catch(e){throw d.onChange(new q(T.INVALID_URL,I.ERROR,"Invalid experience url",{experience:d.internalExperience})),new Error("Invalid experience url")}return e}),a(this,"setTimeoutInstance",function(){d.timeoutInstance=setTimeout(function(){throw d.onChange(new q(T.FRAME_NOT_CREATED,I.ERROR,"Creating the frame timed out",{experience:d.internalExperience})),new Error("Creating the frame timed out")},d.controlOptions.timeout)}),a(this,"onLoadHandler",n(g().m(function e(){return g().w(function(e){for(;;)switch(e.n){case 0:d.timeoutInstance&&clearTimeout(d.timeoutInstance),d.onChange(new q(T.FRAME_LOADED,I.INFO,"The experience iframe loaded",{experience:d.internalExperience}));case 1:return e.a(2)}},e)}))),a(this,"getContainer",function(e){if(!e){var t="Container is required for the experience";throw d.onChange(new q(T.NO_CONTAINER,I.ERROR,t,{experience:d.internalExperience})),new Error(t)}var i=null;if("string"==typeof e)try{i=document.querySelector(e)}catch(e){throw e instanceof Error&&d.onChange(new q(T.INVALID_CONTAINER,I.ERROR,e.message,{experience:d.internalExperience})),e}else"object"===y(e)&&e.nodeName&&(i=e);if(!i){var n="Invalid container '".concat(e,"' for the experience");throw d.onChange(new q(T.INVALID_CONTAINER,I.ERROR,n,{experience:d.internalExperience})),new Error(n)}return i}),a(this,"decorateOnChange",function(e){return function(t){if(e){var i={frame:d.iframe};e(t,i)}}}),a(this,"decorateOnMessage",function(e,t){return function(i){t&&d.iframe&&t(i,{frame:d.iframe}),e&&e(i,{frame:d.iframe})}}),a(this,"initializeMutationObserver",function(){var e=new MutationObserver(function(t){t.some(function(e){return Array.from(e.removedNodes).some(function(e){return e===d.iframe||e===d.container})})&&(d.controlOptions.eventManager.cleanUpCallbacksForExperience(d.experienceId),e.disconnect(),d.iframe=null,d.onChange(new q(T.FRAME_REMOVED,I.INFO,"Frame removed from the DOM",{experience:d.internalExperience})))});e.observe(document.body,{childList:!0,subtree:!0})}),this.frameOptions=t,this.contentOptions=s,this.onChange=this.decorateOnChange(t.onChange),this.onMessage=this.decorateOnMessage(s.onMessage,h),this.container=this.getContainer(t.container),this.internalExperience=l,this.controlOptions=i,this.transformedContentOptions=o,this.experienceId=c,this.url=this.validateBaseUrl(t.url),this.controlOptions.eventManager.addEventListener(this.experienceId,this.onMessage,!0),this.initializeMutationObserver()}),Se=["parameters"],we=function(e){function t(e,i,n,o,l,c,h){var d;return r(this,t),a(d=s(this,t,[e,i,n,o,l,c,h]),"buildExperienceUrl",function(e){var t=d.transformedContentOptions,i=t.parameters,n=p(t,Se),s=d.internalExperience,r=s.contextId,o=s.discriminator;return[e,[d.buildQueryString(u(u({},n),{},{contextId:r,discriminator:o})),d.buildParameterString(i)].join("#")].join(e.includes("?")?"&":"?")}),d.url=d.buildExperienceUrl(e.url),d.createExperienceIframe(),d}return c(t,e),o(t)}(be),xe=["scaleToContainer","fitToIframeWidth","locale","parameters","themeOptions","onMessage"],Ee=function(e){function t(e,i,o,l){var c;r(this,t),a(c=s(this,t,[e,i,o,l]),"setParameters",function(){var e=n(g().m(function e(t){return g().w(function(e){for(;;)if(0===e.n)return e.a(2,c.send(new X(D.SET_PARAMETERS,t)))},e)}));return function(t){return e.apply(this,arguments)}}()),a(c,"reset",n(g().m(function e(){return g().w(function(e){for(;;)if(0===e.n)return e.a(2,c.send(new X(D.RESET)))},e)}))),a(c,"addFilterGroups",function(){var e=n(g().m(function e(t){return g().w(function(e){for(;;)if(0===e.n)return e.a(2,c.send(new X(D.ADD_FILTER_GROUPS,t)))},e)}));return function(t){return e.apply(this,arguments)}}()),a(c,"updateFilterGroups",function(){var e=n(g().m(function e(t){return g().w(function(e){for(;;)if(0===e.n)return e.a(2,c.send(new X(D.UPDATE_FILTER_GROUPS,t)))},e)}));return function(t){return e.apply(this,arguments)}}()),a(c,"removeFilterGroups",function(){var e=n(g().m(function e(t){return g().w(function(e){for(;;)if(0===e.n)return e.a(2,c.send(new X(D.REMOVE_FILTER_GROUPS,t)))},e)}));return function(t){return e.apply(this,arguments)}}()),a(c,"getFilterGroups",n(g().m(function e(){var t;return g().w(function(e){for(;;)switch(e.n){case 0:return e.n=1,c.send(new X(D.GET_FILTER_GROUPS_FOR_VISUAL));case 1:if(t=e.v,Array.isArray(null==t?void 0:t.message)){e.n=2;break}throw new Error("Failed to retrieve filter groups for the visual");case 2:return e.a(2,t.message)}},e)}))),a(c,"getActions",n(g().m(function e(){var t;return g().w(function(e){for(;;)switch(e.n){case 0:return e.n=1,c.send(new X(D.GET_VISUAL_ACTIONS));case 1:if(t=e.v,Array.isArray(null==t?void 0:t.message)){e.n=2;break}throw new Error("Failed to retrieve the actions");case 2:return e.a(2,t.message)}},e)}))),a(c,"addActions",function(){var e=n(g().m(function e(t){return g().w(function(e){for(;;)if(0===e.n)return e.a(2,c.send(new X(D.ADD_VISUAL_ACTIONS,{Actions:t})))},e)}));return function(t){return e.apply(this,arguments)}}()),a(c,"setActions",function(){var e=n(g().m(function e(t){return g().w(function(e){for(;;)if(0===e.n)return e.a(2,c.send(new X(D.SET_VISUAL_ACTIONS,{Actions:t})))},e)}));return function(t){return e.apply(this,arguments)}}()),a(c,"removeActions",function(){var e=n(g().m(function e(t){return g().w(function(e){for(;;)if(0===e.n)return e.a(2,c.send(new X(D.REMOVE_VISUAL_ACTIONS,{Actions:t})))},e)}));return function(t){return e.apply(this,arguments)}}()),a(c,"setTheme",function(){var e=n(g().m(function e(t){return g().w(function(e){for(;;)if(0===e.n)return e.a(2,c.send(new X(D.SET_THEME,{ThemeArn:t})))},e)}));return function(t){return e.apply(this,arguments)}}()),a(c,"setThemeOverride",function(){var e=n(g().m(function e(t){return g().w(function(e){for(;;)if(0===e.n)return e.a(2,c.send(new X(D.SET_THEME_OVERRIDE,{ThemeOverride:t})))},e)}));return function(t){return e.apply(this,arguments)}}()),a(c,"setPreloadThemes",function(){var e=n(g().m(function e(t){return g().w(function(e){for(;;)if(0===e.n)return e.a(2,c.send(new X(D.PRELOAD_THEMES,{PreloadThemes:t})))},e)}));return function(t){return e.apply(this,arguments)}}()),a(c,"extractExperienceFromUrl",function(e){var t,i,n=/^https:\/\/[^/]+\/embed\/[^/]+\/dashboards\/([\w-]+)\/sheets\/([\w-]+)\/visuals\/([\w-]+)(\?|$)/i.exec(e)||[];if(n.length<5)throw null===(t=(i=c.frameOptions).onChange)||void 0===t||t.call(i,new q(T.INVALID_URL,I.ERROR,"Invalid visual experience url",{url:e}),{frame:c.experienceFrame.iframe}),new Error("Invalid visual experience URL");return{experienceType:O.VISUAL,dashboardId:n[1],sheetId:n[2],visualId:n[3]}}),a(c,"interceptMessage",function(e,t){var i,n,s,r,o;"SIZE_CHANGED"===e.eventName&&c.frameOptions.resizeHeightOnSizeChangedEvent&&!c.contentOptions.scaleToContainer&&(null==t||null===(s=t.frame)||void 0===s||null===(r=s.setAttribute)||void 0===r||r.call(s,"height","".concat(null===(o=e.message)||void 0===o?void 0:o.height,"px"))),"EXPERIENCE_INITIALIZED"===e.eventName&&null!==(i=c.contentOptions)&&void 0!==i&&null!==(i=i.themeOptions)&&void 0!==i&&i.themeOverride&&c.setThemeOverride(c.contentOptions.themeOptions.themeOverride),"EXPERIENCE_INITIALIZED"===e.eventName&&null!==(n=c.contentOptions)&&void 0!==n&&null!==(n=n.themeOptions)&&void 0!==n&&n.preloadThemes&&c.setPreloadThemes(c.contentOptions.themeOptions.preloadThemes)}),a(c,"transformVisualContentOptions",function(e){var t=e.scaleToContainer,i=e.fitToIframeWidth,n=e.locale,s=e.parameters,r=e.themeOptions;e.onMessage;var o=p(e,xe),l=c.transformContentOptions({scaleToContainer:null!=t&&t,fitToIframeWidth:null==i||i,locale:n},o);return Array.isArray(s)&&(l.parameters=s.reduce(function(e,t){return u(u({},e),{},a({},t.Name,t.Values))},{})),null!=r&&r.themeArn&&(l.themeArn=r.themeArn),l}),c.experience=c.extractExperienceFromUrl(e.url);var h=c.getInternalExperienceInfo(c.experience),d=h.experienceIdentifier,f=h.internalExperience;return c.internalExperience=f,c.experienceId=d,c.experienceFrame=new we(e,o,i,c.transformVisualContentOptions(i),f,d,c.interceptMessage),c}return c(t,e),o(t)}(ce),Me=function(e){function t(e,i,n,o,l,c,h){var d;return r(this,t),a(d=s(this,t,[e,i,n,o,l,c,h]),"buildExperienceUrl",function(e){var t=d.internalExperience,i=t.contextId,n=t.discriminator;return[e,d.buildQueryString(u(u({},d.transformedContentOptions),{},{contextId:i,discriminator:n}))].join(e.includes("?")?"&":"?")}),d.url=d.buildExperienceUrl(e.url),d.createExperienceIframe(),d}return c(t,e),o(t)}(be),Ae=["locale","toolbarOptions","onMessage"],Te=function(e){function t(e,i,o,l){var c;r(this,t),a(c=s(this,t,[e,i,o,l]),"createSharedView",n(g().m(function e(){var t;return g().w(function(e){for(;;)switch(e.n){case 0:if("DASHBOARD"===c.currentPage||"DASHBOARD_SHEET"===c.currentPage||"DASHBOARD_VIEW"===c.currentPage){e.n=1;break}throw new Error("Cannot call createSharedView from this page");case 1:return e.n=2,c.send(new X(D.CREATE_SHARED_VIEW));case 2:if(null!=(t=e.v)&&t.message){e.n=3;break}throw new Error("Failed to create shared view");case 3:return e.a(2,t)}},e)}))),a(c,"toggleExecutiveSummaryPane",n(g().m(function e(){return g().w(function(e){for(;;)switch(e.n){case 0:if("DASHBOARD"===c.currentPage){e.n=1;break}throw new Error("Cannot call toggleExecutiveSummaryPane from this page");case 1:return e.a(2,c.send(new X(D.TOGGLE_EXECUTIVE_SUMMARY_PANE)))}},e)}))),a(c,"openDataQnAPane",n(g().m(function e(){return g().w(function(e){for(;;)if(0===e.n)return e.a(2,c.send(new X(D.OPEN_DATA_QNA_PANE)))},e)}))),a(c,"openBuildVisualPane",n(g().m(function e(){return g().w(function(e){for(;;)if(0===e.n)return e.a(2,c.send(new X(D.OPEN_BUILD_VISUAL_PANE)))},e)}))),a(c,"buildStoryFromDashboard",n(g().m(function e(){return g().w(function(e){for(;;)switch(e.n){case 0:if("DASHBOARD"===c.currentPage){e.n=1;break}throw new Error('Cannot call buildStoryFromDashboard from "'.concat(c.currentPage,'" page'));case 1:return e.a(2,c.send(new X(D.OPEN_BUILD_STORY_PANE)))}},e)}))),a(c,"interceptMessage",function(e,t){var i;e.eventName===D.PAGE_NAVIGATION&&(c.currentPage=null==e||null===(i=e.message)||void 0===i?void 0:i.pageType)}),a(c,"extractExperienceFromUrl",function(e){var t,i;if((/^https:\/\/[^/]+\/embedding\/[^/]+\/(start(\/(favorites|dashboards|analyses))?|dashboards\/[\w-]+(\/views\/[\w-]+)?|analyses\/[\w-]+)(\?|$)/i.exec(e)||[]).length<5)throw null===(t=(i=c.frameOptions).onChange)||void 0===t||t.call(i,new q(T.INVALID_URL,I.ERROR,"Invalid console experience url",{url:e}),{frame:c.experienceFrame.iframe}),new Error("Invalid console experience URL");return{experienceType:O.CONSOLE}}),a(c,"transformConsoleContentOptions",function(e){var t=e.locale,i=e.toolbarOptions;e.onMessage;var n=p(e,Ae),s=c.transformContentOptions({locale:t},n);return!0===(null==i?void 0:i.executiveSummary)&&(s.showExecutiveSummaryIcon=!0),!0===(null==i?void 0:i.dataQnA)&&(s.showDataQnAIcon=!0),!0===(null==i?void 0:i.buildVisual)&&(s.showBuildVisualIcon=!0),!0===(null==i?void 0:i.buildStory)&&(s.showBuildStoryIcon=!0),s}),c.experience=c.extractExperienceFromUrl(e.url);var h=c.getInternalExperienceInfo(c.experience),d=h.experienceIdentifier,u=h.internalExperience;c.internalExperience=u,c.experienceId=d,i.locale,i.onMessage;var f=c.transformConsoleContentOptions(i);return c.experienceFrame=new Me(e,o,i,f,u,d,c.interceptMessage),c.currentPage="START",c}return c(t,e),o(t)}(ce),De=["parameters"],Ie=function(e){function t(e,i,n,o,l,c,h){var d;return r(this,t),a(d=s(this,t,[e,i,n,o,l,c,h]),"buildExperienceUrl",function(e){var t=d.transformedContentOptions,i=t.parameters,n=p(t,De),s=d.internalExperience,r=s.contextId,o=s.discriminator,a=d.contentOptions.viewId;if(a){var l=new URL(e);l.pathname=l.pathname.concat("/views/"+a),e=l.href}return[e,[d.buildQueryString(u(u({},n),{},{contextId:r,discriminator:o})),d.buildParameterString(i)].join("#")].join(e.includes("?")?"&":"?")}),d.url=d.buildExperienceUrl(e.url),d.createExperienceIframe(),d}return c(t,e),o(t)}(be),Re=["parameters","locale","attributionOptions","sheetOptions","toolbarOptions","themeOptions","onMessage"],Le=function(e){function t(e,i,o,l){var c;r(this,t),a(c=s(this,t,[e,i,o,l]),"initiatePrint",n(g().m(function e(){return g().w(function(e){for(;;)if(0===e.n)return e.a(2,c.send(new X(D.INITIATE_PRINT)))},e)}))),a(c,"undo",n(g().m(function e(){return g().w(function(e){for(;;)if(0===e.n)return e.a(2,c.send(new X(D.UNDO)))},e)}))),a(c,"redo",n(g().m(function e(){return g().w(function(e){for(;;)if(0===e.n)return e.a(2,c.send(new X(D.REDO)))},e)}))),a(c,"toggleExecutiveSummaryPane",n(g().m(function e(){return g().w(function(e){for(;;)if(0===e.n)return e.a(2,c.send(new X(D.TOGGLE_EXECUTIVE_SUMMARY_PANE)))},e)}))),a(c,"toggleBookmarksPane",n(g().m(function e(){return g().w(function(e){for(;;)if(0===e.n)return e.a(2,c.send(new X(D.TOGGLE_BOOKMARKS_PANE)))},e)}))),a(c,"toggleThresholdAlertsPane",n(g().m(function e(){return g().w(function(e){for(;;)if(0===e.n)return e.a(2,c.send(new X(D.TOGGLE_THRESHOLD_ALERTS_PANE)))},e)}))),a(c,"toggleSchedulingPane",n(g().m(function e(){return g().w(function(e){for(;;)if(0===e.n)return e.a(2,c.send(new X(D.TOGGLE_SCHEDULING_PANE)))},e)}))),a(c,"toggleRecentSnapshotsPane",n(g().m(function e(){return g().w(function(e){for(;;)if(0===e.n)return e.a(2,c.send(new X(D.TOGGLE_RECENT_SNAPSHOTS_PANE)))},e)}))),a(c,"getParameters",n(g().m(function e(){var t;return g().w(function(e){for(;;)switch(e.n){case 0:return e.n=1,c.send(new X(D.GET_PARAMETERS));case 1:if(t=e.v,Array.isArray(null==t?void 0:t.message)){e.n=2;break}throw new Error("Failed to retrieve the parameters");case 2:return e.a(2,t.message)}},e)}))),a(c,"getSheets",n(g().m(function e(){var t;return g().w(function(e){for(;;)switch(e.n){case 0:return e.n=1,c.send(new X(D.GET_SHEETS));case 1:if(t=e.v,Array.isArray(null==t?void 0:t.message)){e.n=2;break}throw new Error("Failed to retrieve the sheets");case 2:return e.a(2,t.message)}},e)}))),a(c,"addFilterGroups",function(){var e=n(g().m(function e(t){return g().w(function(e){for(;;)if(0===e.n)return e.a(2,c.send(new X(D.ADD_FILTER_GROUPS,t)))},e)}));return function(t){return e.apply(this,arguments)}}()),a(c,"updateFilterGroups",function(){var e=n(g().m(function e(t){return g().w(function(e){for(;;)if(0===e.n)return e.a(2,c.send(new X(D.UPDATE_FILTER_GROUPS,t)))},e)}));return function(t){return e.apply(this,arguments)}}()),a(c,"removeFilterGroups",function(){var e=n(g().m(function e(t){return g().w(function(e){for(;;)if(0===e.n)return e.a(2,c.send(new X(D.REMOVE_FILTER_GROUPS,t)))},e)}));return function(t){return e.apply(this,arguments)}}()),a(c,"getFilterGroupsForSheet",function(){var e=n(g().m(function e(t){var i;return g().w(function(e){for(;;)switch(e.n){case 0:return e.n=1,c.send(new X(D.GET_FILTER_GROUPS_FOR_SHEET,{SheetId:t}));case 1:if(i=e.v,Array.isArray(null==i?void 0:i.message)){e.n=2;break}throw new Error("Failed to retrieve filter groups for the sheet");case 2:return e.a(2,i.message)}},e)}));return function(t){return e.apply(this,arguments)}}()),a(c,"getFilterGroupsForVisual",function(){var e=n(g().m(function e(t,i){var n;return g().w(function(e){for(;;)switch(e.n){case 0:return e.n=1,c.send(new X(D.GET_FILTER_GROUPS_FOR_VISUAL,{SheetId:t,VisualId:i}));case 1:if(n=e.v,Array.isArray(null==n?void 0:n.message)){e.n=2;break}throw new Error("Failed to retrieve filter groups for the visual");case 2:return e.a(2,n.message)}},e)}));return function(t,i){return e.apply(this,arguments)}}()),a(c,"getVisualActions",function(){var e=n(g().m(function e(t,i){var n;return g().w(function(e){for(;;)switch(e.n){case 0:return e.n=1,c.send(new X(D.GET_VISUAL_ACTIONS,{SheetId:t,VisualId:i}));case 1:if(n=e.v,Array.isArray(null==n?void 0:n.message)){e.n=2;break}throw new Error("Failed to retrieve the visual actions");case 2:return e.a(2,n.message)}},e)}));return function(t,i){return e.apply(this,arguments)}}()),a(c,"addVisualActions",function(){var e=n(g().m(function e(t,i,n){return g().w(function(e){for(;;)if(0===e.n)return e.a(2,c.send(new X(D.ADD_VISUAL_ACTIONS,{SheetId:t,VisualId:i,Actions:n})))},e)}));return function(t,i,n){return e.apply(this,arguments)}}()),a(c,"setVisualActions",function(){var e=n(g().m(function e(t,i,n){return g().w(function(e){for(;;)if(0===e.n)return e.a(2,c.send(new X(D.SET_VISUAL_ACTIONS,{SheetId:t,VisualId:i,Actions:n})))},e)}));return function(t,i,n){return e.apply(this,arguments)}}()),a(c,"getSelectedSheetId",n(g().m(function e(){var t;return g().w(function(e){for(;;)switch(e.n){case 0:return e.n=1,c.send(new X(D.GET_SELECTED_SHEET_ID));case 1:if(null!=(t=e.v)&&t.message){e.n=2;break}throw new Error("Failed to retrieve the selected sheet id");case 2:return e.a(2,t.message)}},e)}))),a(c,"setSelectedSheetId",function(){var e=n(g().m(function e(t){return g().w(function(e){for(;;)if(0===e.n)return e.a(2,c.send(new X(D.SET_SELECTED_SHEET_ID,{SheetId:t})))},e)}));return function(t){return e.apply(this,arguments)}}()),a(c,"setTheme",function(){var e=n(g().m(function e(t){return g().w(function(e){for(;;)if(0===e.n)return e.a(2,c.send(new X(D.SET_THEME,{ThemeArn:t})))},e)}));return function(t){return e.apply(this,arguments)}}()),a(c,"navigateToDashboard",function(){var e=n(g().m(function e(t,i){return g().w(function(e){for(;;)if(0===e.n)return e.a(2,c.send(new X(D.NAVIGATE_TO_DASHBOARD,{DashboardId:t,Parameters:null==i?void 0:i.parameters})))},e)}));return function(t,i){return e.apply(this,arguments)}}()),a(c,"removeVisualActions",function(){var e=n(g().m(function e(t,i,n){return g().w(function(e){for(;;)if(0===e.n)return e.a(2,c.send(new X(D.REMOVE_VISUAL_ACTIONS,{SheetId:t,VisualId:i,Actions:n})))},e)}));return function(t,i,n){return e.apply(this,arguments)}}()),a(c,"getSheetVisuals",function(){var e=n(g().m(function e(t){var i;return g().w(function(e){for(;;)switch(e.n){case 0:return e.n=1,c.send(new X(D.GET_SHEET_VISUALS,{SheetId:t}));case 1:if(i=e.v,Array.isArray(null==i?void 0:i.message)){e.n=2;break}throw new Error("Failed to retrieve the sheet visuals");case 2:return e.a(2,i.message)}},e)}));return function(t){return e.apply(this,arguments)}}()),a(c,"setParameters",function(){var e=n(g().m(function e(t){return g().w(function(e){for(;;)if(0===e.n)return e.a(2,c.send(new X(D.SET_PARAMETERS,t)))},e)}));return function(t){return e.apply(this,arguments)}}()),a(c,"reset",n(g().m(function e(){return g().w(function(e){for(;;)if(0===e.n)return e.a(2,c.send(new X(D.RESET)))},e)}))),a(c,"setThemeOverride",function(){var e=n(g().m(function e(t){return g().w(function(e){for(;;)if(0===e.n)return e.a(2,c.send(new X(D.SET_THEME_OVERRIDE,{ThemeOverride:t})))},e)}));return function(t){return e.apply(this,arguments)}}()),a(c,"setPreloadThemes",function(){var e=n(g().m(function e(t){return g().w(function(e){for(;;)if(0===e.n)return e.a(2,c.send(new X(D.PRELOAD_THEMES,{PreloadThemes:t})))},e)}));return function(t){return e.apply(this,arguments)}}()),a(c,"createSharedView",n(g().m(function e(){var t;return g().w(function(e){for(;;)switch(e.n){case 0:return e.n=1,c.send(new X(D.CREATE_SHARED_VIEW));case 1:if(null!=(t=e.v)&&t.message){e.n=2;break}throw new Error("Failed to create shared view");case 2:return e.a(2,t)}},e)}))),a(c,"extractExperienceFromUrl",function(e){var t,i,n=/^https:\/\/[^/]+\/embed\/[^/]+\/dashboards\/([\w-]+)(\?|$)/i.exec(e)||[];if(n.length<3)throw null===(t=(i=c.frameOptions).onChange)||void 0===t||t.call(i,new q(T.INVALID_URL,I.ERROR,"Invalid dashboard experience url",{url:e}),{frame:null}),new Error("Invalid dashboard experience URL");return{experienceType:O.DASHBOARD,dashboardId:n[1]}}),a(c,"interceptMessage",function(e,t){var i,n,s,r,o;"SIZE_CHANGED"===e.eventName&&c.frameOptions.resizeHeightOnSizeChangedEvent&&(null==t||null===(s=t.frame)||void 0===s||null===(r=s.setAttribute)||void 0===r||r.call(s,"height","".concat(null==e||null===(o=e.message)||void 0===o?void 0:o.height,"px"))),"EXPERIENCE_INITIALIZED"===e.eventName&&null!==(i=c.contentOptions)&&void 0!==i&&null!==(i=i.themeOptions)&&void 0!==i&&i.themeOverride&&c.setThemeOverride(c.contentOptions.themeOptions.themeOverride),"EXPERIENCE_INITIALIZED"===e.eventName&&null!==(n=c.contentOptions)&&void 0!==n&&null!==(n=n.themeOptions)&&void 0!==n&&n.preloadThemes&&c.setPreloadThemes(c.contentOptions.themeOptions.preloadThemes)}),a(c,"transformDashboardContentOptions",function(e){var t,i,n=e.parameters,s=e.locale,r=e.attributionOptions,o=e.sheetOptions,l=e.toolbarOptions,h=e.themeOptions;e.onMessage;var d=p(e,Re),g=c.transformContentOptions({locale:s,fitSheetToWidth:null===(t=null==o?void 0:o.fitSheetToWidth)||void 0===t||t},d);return Array.isArray(n)&&(g.parameters=n.reduce(function(e,t){return u(u({},e),{},a({},t.Name,t.Values))},{})),!0!==(null==r?void 0:r.overlayContent)&&(g.footerPaddingEnabled=!0),(null!=l&&l.export||null!=l&&null!==(i=l.export)&&void 0!==i&&i.print)&&(g.printEnabled=!0),!0!==(null==l?void 0:l.undoRedo)&&(g.undoRedoDisabled=!0),!0!==(null==l?void 0:l.reset)&&(g.resetDisabled=!0),!0===(null==l?void 0:l.bookmarks)&&(g.showBookmarksIcon=!0),!0===(null==l?void 0:l.thresholdAlerts)&&(g.showThresholdAlertsIcon=!0),!0===(null==l?void 0:l.scheduling)&&(g.showSchedulingIcon=!0),!0===(null==l?void 0:l.executiveSummary)&&(g.showExecutiveSummaryIcon=!0),!0===(null==l?void 0:l.recentSnapshots)&&(g.showRecentSnapshotsIcon=!0),null!=o&&o.initialSheetId&&(g.sheetId=o.initialSheetId),"boolean"==typeof(null==o?void 0:o.singleSheet)&&(g.sheetTabsDisabled=o.singleSheet),null!=o&&o.emitSizeChangedEventOnSheetChange&&(g.resizeOnSheetChange=!0),null!=h&&h.themeArn&&(g.themeArn=h.themeArn),g}),c.experience=c.extractExperienceFromUrl(e.url);var h=c.getInternalExperienceInfo(c.experience),d=h.experienceIdentifier,f=h.internalExperience;return c.internalExperience=f,c.experienceId=d,c.experienceFrame=new Ie(e,o,i,c.transformDashboardContentOptions(i),f,d,c.interceptMessage),c}return c(t,e),o(t)}(ce),ke=function(e){function t(e,i,n,o,l,c,h){var d;return r(this,t),a(d=s(this,t,[e,i,n,o,l,c,h]),"buildExperienceUrl",function(e){var t=d.internalExperience,i=t.contextId,n=t.discriminator;return[e,d.buildQueryString(u(u({},d.transformedContentOptions),{},{contextId:i,discriminator:n}))].join(e.includes("?")?"&":"?")}),d.url=d.buildExperienceUrl(e.url),d.createExperienceIframe(),d}return c(t,e),o(t)}(be),Pe=function(e){function t(){var e;r(this,t);for(var i=arguments.length,o=new Array(i),l=0;l<i;l++)o[l]=arguments[l];return a(e=s(this,t,[].concat(o)),"close",function(){return e.send(new X(D.CLOSE_Q_SEARCH))}),a(e,"setQuestion",function(t){return e.send(new X(D.SET_Q_SEARCH_QUESTION,{question:t}))}),a(e,"trackOutsideClicks",function(){var t=function(){var t=n(g().m(function t(i){var n,s;return g().w(function(t){for(;;)switch(t.p=t.n){case 0:if(null!==(n=e.experienceFrame.iframe)&&void 0!==n&&n.contains(i.target)){t.n=5;break}return t.p=1,t.n=2,e.close();case 2:t.n=5;break;case 3:if(t.p=3,s=t.v,e.experienceFrame.iframe){t.n=4;break}return t.a(2);case 4:throw s;case 5:return t.a(2)}},t,null,[[1,3]])}));return function(e){return t.apply(this,arguments)}}();window.addEventListener("click",t),e.controlOptions.eventManager.addEventListenerForCleanup(e.experienceId,function(){return window.removeEventListener("click",t)})}),a(e,"enterFullScreen",function(i){var n,s;!e.frameStyles&&null!=i&&i.frame&&(e.frameStyles={position:null===(n=i.frame)||void 0===n?void 0:n.style.position,top:null===(s=i.frame)||void 0===s?void 0:s.style.top,left:i.frame.style.left,zIndex:i.frame.style.zIndex,width:i.frame.style.width,height:i.frame.style.height},i.frame.style.position="fixed",i.frame.style.top="0px",i.frame.style.left="0px",i.frame.style.zIndex=t.MAX_Z_INDEX,i.frame.style.width="100vw",i.frame.style.height="100vh")}),a(e,"exitFullScreen",function(t){e.frameStyles&&null!=t&&t.frame&&(t.frame.style.position=e.frameStyles.position,t.frame.style.top=e.frameStyles.top,t.frame.style.left=e.frameStyles.left,t.frame.style.zIndex=e.frameStyles.zIndex,t.frame.style.width=e.frameStyles.width,t.frame.style.height=e.frameStyles.height,e.frameStyles=void 0)}),e}return c(t,e),o(t)}(ce);a(Pe,"MAX_Z_INDEX","2147483647");var Ne=["hideIcon","hideTopicName","theme","allowTopicSelection","onMessage"],Oe=function(e){function t(e,i,n,o){var l;r(this,t),a(l=s(this,t,[e,i,n,o]),"extractExperienceFromUrl",function(e){var t,i;if((/^https:\/\/[^/]+\/embedding\/[^/]+\/q\/search(\/|\?|$)/i.exec(e)||[]).length<2)throw null===(t=(i=l.frameOptions).onChange)||void 0===t||t.call(i,new q(T.INVALID_URL,I.ERROR,"Invalid q-search experience URL",{url:e}),{frame:l.experienceFrame.iframe}),new Error("Invalid q-search experience URL");return{experienceType:O.QSEARCH}}),a(l,"interceptMessage",function(e,t){switch(e.eventName){case D.Q_SEARCH_OPENED:case D.Q_SEARCH_CLOSED:var i,n;"object"===y(e.message)&&(null==t||null===(i=t.frame)||void 0===i||i.style.setProperty("height","".concat(null==e||null===(n=e.message)||void 0===n?void 0:n.height,"px")));break;case D.CONTENT_LOADED:l.trackOutsideClicks();break;case D.Q_SEARCH_ENTERED_FULLSCREEN:l.enterFullScreen(t);break;case D.Q_SEARCH_EXITED_FULLSCREEN:l.exitFullScreen(t)}}),a(l,"transformQSearchContentOptions",function(e){var t=e.hideIcon,i=e.hideTopicName,n=e.theme,s=e.allowTopicSelection;e.onMessage;var r=p(e,Ne),o=l.transformContentOptions({allowTopicSelection:s},r);return void 0!==t&&(o.qBarIconDisabled=t),void 0!==i&&(o.qBarTopicNameDisabled=i),void 0!==n&&(o.themeId=n),o}),l.experience=l.extractExperienceFromUrl(e.url);var c=l.getInternalExperienceInfo(l.experience),h=c.experienceIdentifier,d=c.internalExperience;return l.internalExperience=d,l.experienceId=h,l.experienceFrame=new ke(e,n,i,l.transformQSearchContentOptions(i),d,h,l.interceptMessage),l}return c(t,e),o(t)}(Pe),_e=function(e){function t(e,i,n,o,l,c,h){var d;return r(this,t),a(d=s(this,t,[e,i,n,o,l,c,h]),"buildExperienceUrl",function(e){var t=d.internalExperience,i=t.contextId,n=t.discriminator;return[e,d.buildQueryString(u(u({},d.transformedContentOptions),{},{contextId:i,discriminator:n}))].join(e.includes("?")?"&":"?")}),d.url=d.buildExperienceUrl(e.url),d.createExperienceIframe(),d}return c(t,e),o(t)}(be),Fe=["onMessage","showTopicName","showPinboard","showSearchBar","showInterpretedAs","showFeedback","showGeneratedNarrative","showDidYouMean","showComplementaryVisuals","showQBusinessInsights","showSeeWhy","allowTopicSelection","allowFullscreen","allowReturn","searchPlaceholderText","panelOptions","themeOptions","initialQuestionId","initialAnswerId"],Ge=["panelType","title","showQIcon"],Ve=["panelType","focusedHeight","expandedHeight"],Be=function(e){function t(e,i,n,o){var l;r(this,t),a(l=s(this,t,[e,i,n,o]),"extractExperienceFromUrl",function(e){var t,i;if((/^https:\/\/[^/]+\/embedding\/[^/]+\/q\/search(\/|\?|$)/i.exec(e)||[]).length<2)throw null===(t=(i=l.frameOptions).onChange)||void 0===t||t.call(i,new q(T.INVALID_URL,I.ERROR,"Invalid generative-qna experience URL",{url:e}),{frame:l.experienceFrame.iframe}),new Error("Invalid generative-qna experience URL");return{experienceType:O.GENERATIVEQNA}}),a(l,"interceptMessage",function(e,t){switch(e.eventName){case D.Q_SEARCH_OPENED:case D.Q_SEARCH_CLOSED:case D.Q_SEARCH_FOCUSED:var i,n;"object"===y(e.message)&&(null==t||null===(i=t.frame)||void 0===i||i.style.setProperty("height","".concat(null==e||null===(n=e.message)||void 0===n?void 0:n.height)));break;case D.CONTENT_LOADED:var s;(null===(s=l.contentOptions)||void 0===s||null===(s=s.panelOptions)||void 0===s?void 0:s.panelType)===W.SEARCH_BAR&&l.trackOutsideClicks();break;case D.Q_PANEL_ENTERED_FULLSCREEN:l.enterFullScreen(t);break;case D.Q_PANEL_EXITED_FULLSCREEN:l.exitFullScreen(t)}}),a(l,"transformGenerativeQnAContentOptions",function(e){var t=[],i=function(e){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";Object.keys(e).forEach(function(e){t.push(i+e)})};e.onMessage;var n=e.showTopicName,s=e.showPinboard,r=e.showSearchBar,o=e.showInterpretedAs,a=e.showFeedback,c=e.showGeneratedNarrative,h=e.showDidYouMean,d=e.showComplementaryVisuals,u=e.showQBusinessInsights,g=e.showSeeWhy,f=e.allowTopicSelection,m=e.allowFullscreen,v=e.allowReturn,y=e.searchPlaceholderText,C=e.panelOptions,b=e.themeOptions,S=e.initialQuestionId,w=e.initialAnswerId;i(p(e,Fe));var x={qShowTopicName:n,qShowPinboard:s,qShowSearchBar:r,qShowInterpretedAs:o,qShowFeedback:a,qShowGeneratedNarrative:c,qShowDidYouMean:h,qShowComplementaryVisuals:d,qShowQBusinessInsights:u,qShowSeeWhy:g,qAllowTopicSelection:f,qAllowFullscreen:m,qAllowReturn:v,questionId:S,answerId:w};if("string"==typeof y&&(l.checkMaxLength(y,"searchPlaceholderText"),x.qSearchPlaceholderText=encodeURIComponent(y)),C){var E=C.panelType;if(x.qPanelType=E,E===W.FULL){C.panelType;var M=C.title,A=C.showQIcon,T=p(C,Ge);"string"==typeof M&&(l.checkMaxLength(M,"panelOptions.title"),x.qPanelTitle=encodeURIComponent(M)),x.qShowPanelIcon=A,i(T,"panelOptions.")}else{if(E!==W.SEARCH_BAR)throw new Error("panelOptions.panelType should be one of following: [FULL, SEARCH_BAR]");C.panelType;var D=C.focusedHeight,I=C.expandedHeight,R=p(C,Ve);x.qPanelFocusedHeight=D,x.qPanelExpandedHeight=I,i(R,"panelOptions.")}}return null!=b&&b.themeArn&&(x.themeArn=b.themeArn),l.warnUnrecognizedContentOptions(t),x}),a(l,"checkMaxLength",function(e,i){var n=t.TEXT_PROPERTY_MAX_LENGTH;if(e.length>n)throw new Error("".concat(i," should be less than ").concat(n," characters"))}),l.experience=l.extractExperienceFromUrl(e.url);var c=l.getInternalExperienceInfo(l.experience),h=c.experienceIdentifier,d=c.internalExperience;return l.internalExperience=d,l.experienceId=h,l.experienceFrame=new _e(e,n,i,l.transformGenerativeQnAContentOptions(i),d,h,l.interceptMessage),l}return c(t,e),o(t)}(Pe);a(Be,"TEXT_PROPERTY_MAX_LENGTH",200);var He=function(e){function t(e,i,n,o,l,c,h){var d;return r(this,t),a(d=s(this,t,[e,i,n,o,l,c,h]),"buildExperienceUrl",function(e){var t=d.internalExperience,i=t.contextId,n=t.discriminator;return[e,d.buildQueryString(u(u({},d.transformedContentOptions),{},{contextId:i,discriminator:n}))].join("?")}),d.url=d.buildExperienceUrl(e.url),d.createExperienceIframe(),d}return c(t,e),o(t)}(be),ze=o(function e(t,i,n,s){var o=this;r(this,e),a(this,"experience",{experienceType:O.CONTROL}),a(this,"send",function(e){return o.controlExperienceFrame.send(e)}),a(this,"controlFrameMessageListener",function(e){if(o.isMessageEvent(e.data)){var t=e.data;try{if(t.eventTarget){var i=ce.getExperienceIdentifier(t.eventTarget);o.eventManager.invokeEventListener(i,t)}o.sendAcknowledgment(t)}catch(e){var n,s;null===(n=o.onChange)||void 0===n||n.call(o,new q(T.UNRECOGNIZED_EVENT_TARGET,I.WARN,"Message with unrecognized event target received",{eventTarget:t.eventTarget}),{frame:o.controlExperienceFrame.iframe}),null===(s=o.logger)||void 0===s||s.warn("Message with unrecognized event target received")}}}),a(this,"sendAcknowledgment",function(e){var t,i,n=new Z(D.ACKNOWLEDGE,o.internalExperience,{eventName:e.eventName,eventTarget:e.eventTarget});(null===(t=(i=window).requestIdleCallback)||void 0===t?void 0:t.call(i,function(){return o.send(n)}))||o.send(n)}),a(this,"getControlExperienceId",function(){return[o.internalExperience.contextId,o.internalExperience.experienceType,o.internalExperience.discriminator].filter(Boolean).join("-")}),a(this,"getControlExperienceBaseUrl",function(){var e=o.urlInfo,t=e.host,i=e.sessionId,n="".concat(t,"/embed/").concat(i,"/embedControl");return new URL(n).href}),a(this,"isMessageEvent",function(e){return!!e&&!!e.eventTarget&&!!e.eventName}),this.container=t,this.eventManager=i.eventManager,this.urlInfo=i.urlInfo,this.onChange=n,this.logger=s,this.internalExperience=u(u({},this.experience),{},{contextId:i.contextId,discriminator:0});var l=this.getControlExperienceId();this.controlExperienceFrame=new He({url:this.getControlExperienceBaseUrl(),container:this.container,width:"0px",height:"0px",onChange:this.onChange},{eventManager:this.eventManager,contextId:this.internalExperience.contextId,timeout:e.FRAME_TIMEOUT,urlInfo:this.urlInfo},{},{},this.internalExperience,l),window.addEventListener("message",this.controlFrameMessageListener),this.eventManager.addEventListenerForCleanup(l,function(){return window.removeEventListener("message",o.controlFrameMessageListener)})});a(ze,"FRAME_TIMEOUT",6e4);var Ue=o(function e(){var t=this;r(this,e),a(this,"addEventListener",function(e,i,n){if(!e)throw new Error("Experience identifier is required when calling addEventListener");if("function"!=typeof i)throw new Error("Invalid type provided for event listener");var s=t.eventListeners.get(e);return n&&t.addEventListenerForCleanup(e,function(){return t.removeEventListener(e,i)}),s?(s.push(i),t):(t.eventListeners.set(e,[i]),t)}),a(this,"invokeEventListener",function(e,i){var n=t.eventListeners.get(e);if(!n)throw new Error("Unable to find experience specific event listeners: ".concat(e));return n.forEach(function(e){e(i)}),t}),a(this,"removeEventListener",function(e,i){var n=t.eventListeners.get(e);if(!n)throw new Error("Unable to find experience specific event listeners: ".concat(e));var s=n.filter(function(e){return e!==i});return t.eventListeners.set(e,s),t}),a(this,"addEventListenerForCleanup",function(e,i){var n,s=null!==(n=t.cleanUpCallbacks.get(e))&&void 0!==n?n:[];s.push(i),t.cleanUpCallbacks.set(e,s)}),a(this,"cleanUpCallbacksForExperience",function(e){var i=t.cleanUpCallbacks.get(e);i&&(i.forEach(function(e){return e()}),t.cleanUpCallbacks.delete(e),t.eventListeners.set(e,[]))}),this.eventListeners=new Map,this.cleanUpCallbacks=new Map}),We=o(function e(){r(this,e),a(this,"log",console.log),a(this,"warn",console.warn),a(this,"error",console.error),a(this,"debug",console.debug),a(this,"info",console.info)}),je=function(e){function t(e,i,n,o,l,c,h){var d;return r(this,t),a(d=s(this,t,[e,i,n,o,l,c,h]),"buildExperienceUrl",function(e){var t=d.internalExperience,i=t.contextId,n=t.discriminator;return[e,d.buildQueryString(u({contextId:i,discriminator:n},d.transformedContentOptions))].join(e.includes("?")?"&":"?")}),d.url=d.buildExperienceUrl(e.url),d.createExperienceIframe(),d}return c(t,e),o(t)}(be),Ke=["fixedAgentArn","agentOptions","promptOptions","footerOptions","onMessage"],$e=["fixedAgentId"],Ye=["allowFileAttachments","showAgentKnowledgeBoundary","initialPrompt","showWebSearch"],qe=["showBrandAttribution","showUsagePolicy"],Xe=function(e){function t(e,i,n,o){var l;r(this,t);var c=u({framePermissions:u({clipboardRead:!0,clipboardWrite:!0},e.framePermissions)},e);a(l=s(this,t,[c,i,n,o]),"extractExperienceFromUrl",function(e){var t,i;if((/^https:\/\/[^/]+\/embedding\/[^/]+\/quick\/chat(\/|\?|$)/i.exec(e)||[]).length<2)throw null===(t=(i=l.frameOptions).onChange)||void 0===t||t.call(i,new q(T.INVALID_URL,I.ERROR,"Invalid quick chat experience url",{url:e}),{frame:null}),new Error("Invalid quick chat experience url");return{experienceType:O.QUICKCHAT}}),a(l,"interceptMessage",function(e,t){var i;e.eventName===D.EXPERIENCE_INITIALIZED&&null!==(i=l.contentOptions.promptOptions)&&void 0!==i&&i.initialPrompt&&l.sendPrompt(l.contentOptions.promptOptions.initialPrompt)}),a(l,"sendPrompt",function(e){return l.send(new X(D.SEND_PROMPT,{prompt:e}))}),a(l,"transformQuickChatContentOptions",function(e){var t=[],i=function(e){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";Object.keys(e).forEach(function(e){t.push(i+e)})},n=e.fixedAgentArn,s=e.agentOptions,r=void 0===s?{}:s,o=e.promptOptions,a=void 0===o?{}:o,c=e.footerOptions,h=void 0===c?{}:c;e.onMessage,i(p(e,Ke));var d=r.fixedAgentId;i(p(r,$e),"agentOptions.");var u=a.allowFileAttachments,g=a.showAgentKnowledgeBoundary;a.initialPrompt;var f=a.showWebSearch;i(p(a,Ye),"promptOptions.");var m=h.showBrandAttribution,v=h.showUsagePolicy;return i(p(h,qe),"footerOptions."),l.warnUnrecognizedContentOptions(t),{allowFileAttachments:u,showAgentKnowledgeBoundary:g,showBrandAttribution:m,showUsagePolicy:v,showWebSearch:f,fixedAgentId:l.validateFixedAgentId(n,d)}}),a(l,"validateFixedAgentId",function(e,t){if(e&&t)throw new Error("Both fixedAgentArn and agentOptions.fixedAgentId cannot be specified. Use agentOptions.fixedAgentId.");if(t)return t;if(e){var i;null===(i=l.logger)||void 0===i||i.warn("The fixedAgentArn option is deprecated. Use agentOptions.fixedAgentId instead.");var n=e.split("/")[1];if(!n)throw new Error("Invalid fixedAgentArn.");return n}}),l.experience=l.extractExperienceFromUrl(c.url);var h=l.getInternalExperienceInfo(l.experience),d=h.experienceIdentifier,g=h.internalExperience;return l.internalExperience=g,l.experienceId=d,l.experienceFrame=new je(c,n,i,l.transformQuickChatContentOptions(i),g,d,l.interceptMessage),l}return c(t,e),o(t)}(ce),Ze=o(function e(t){var i=this;r(this,e),a(this,"embedVisual",function(){var e=n(g().m(function e(t){var n,s,r=arguments;return g().w(function(e){for(;;)if(0===e.n)return n=r.length>1&&void 0!==r[1]?r[1]:{},i.validateFrameOptions(t,"embedVisual"),s=i.buildControlOptions(t),e.a(2,new Ee(t,n,s,i.experienceIdentifiers).setLogProvider(i.logger))},e)}));return function(t){return e.apply(this,arguments)}}()),a(this,"embedDashboard",function(){var e=n(g().m(function e(t){var n,s,r=arguments;return g().w(function(e){for(;;)if(0===e.n)return n=r.length>1&&void 0!==r[1]?r[1]:{},i.validateFrameOptions(t,"embedDashboard"),s=i.buildControlOptions(t),e.a(2,new Le(t,n,s,i.experienceIdentifiers).setLogProvider(i.logger))},e)}));return function(t){return e.apply(this,arguments)}}()),a(this,"embedConsole",function(){var e=n(g().m(function e(t){var n,s,r=arguments;return g().w(function(e){for(;;)if(0===e.n)return n=r.length>1&&void 0!==r[1]?r[1]:{},i.validateFrameOptions(t,"embedConsole"),s=i.buildControlOptions(t),e.a(2,new Te(t,n,s,i.experienceIdentifiers).setLogProvider(i.logger))},e)}));return function(t){return e.apply(this,arguments)}}()),a(this,"embedQSearchBar",function(){var e=n(g().m(function e(t){var n,s,r=arguments;return g().w(function(e){for(;;)if(0===e.n)return n=r.length>1&&void 0!==r[1]?r[1]:{},i.validateFrameOptions(t,"embedQSearchBar"),s=i.buildControlOptions(t),e.a(2,new Oe(t,n,s,i.experienceIdentifiers).setLogProvider(i.logger))},e)}));return function(t){return e.apply(this,arguments)}}()),a(this,"embedGenerativeQnA",function(){var e=n(g().m(function e(t){var n,s,r=arguments;return g().w(function(e){for(;;)if(0===e.n)return n=r.length>1&&void 0!==r[1]?r[1]:{},i.validateFrameOptions(t,"embedGenerativeQnA"),s=i.buildControlOptions(t),e.a(2,new Be(t,n,s,i.experienceIdentifiers).setLogProvider(i.logger))},e)}));return function(t){return e.apply(this,arguments)}}()),a(this,"embedQuickChat",function(){var e=n(g().m(function e(t){var n,s,r=arguments;return g().w(function(e){for(;;)if(0===e.n)return n=r.length>1&&void 0!==r[1]?r[1]:{},i.validateFrameOptions(t,"embedQuickChat"),s=i.buildControlOptions(t),e.a(2,new Xe(t,n,s,i.experienceIdentifiers).setLogProvider(i.logger))},e)}));return function(t){return e.apply(this,arguments)}}()),a(this,"validateFrameOptions",function(e,t){if(!e){var n="".concat(t," is called without frameOptions");throw i.onChange(new q(T.NO_FRAME_OPTIONS,I.ERROR,"".concat(t," is called without frameOptions"),{methodName:t}),{frame:null}),new Error(n)}if("object"!==y(e)||Array.isArray(e)){var s="".concat(t," is called with non-object frameOptions");throw i.onChange(new q(T.INVALID_FRAME_OPTIONS,I.ERROR,s,{methodName:t,frameOptionsType:Array.isArray(e)?"array":y(e)}),{frame:null}),new Error(s)}var r=["url","container","width","height","resizeHeightOnSizeChangedEvent","withIframePlaceholder","onChange","className","framePermissions"],o=Object.keys(e).filter(function(e){return!r.includes(e)});if(o.length>0){var a,l,c="".concat(t," is called with unrecognized properties");null===(a=e.onChange)||void 0===a||a.call(e,new q(T.UNRECOGNIZED_FRAME_OPTIONS,I.WARN,c,{unrecognizedFrameOptions:o}),{frame:null}),null===(l=i.logger)||void 0===l||l.warn(c)}}),a(this,"buildControlOptions",function(e){if(!i.controlOptions){if(!e.url)throw new Error("URL is missing in frame options, but is a required field");var t=i.getControlUrlInfo(e.url),n=new ze(i.getBodyElement(),{eventManager:i.eventManager,urlInfo:t,contextId:i.contextId},i.onChange,i.logger);i.controlOptions={eventManager:i.eventManager,sendToControlFrame:n.send,contextId:i.contextId,timeout:ze.FRAME_TIMEOUT,urlInfo:t}}return i.controlOptions}),a(this,"onChange",function(e,t){i.contextOnChange&&i.contextOnChange(e,t)}),a(this,"getControlUrlInfo",function(e){var t=/^(https:\/\/[^/]+)\/(embedding|embed)\/([^/]+)\/[^?]+\?(.*)/i.exec(e)||[];if((null==t?void 0:t.length)<4)throw new Error('Invalid embedding url: "'.concat(e,'"'));return{sessionId:t[3],host:t[1],urlSearchParams:new URLSearchParams(t[4])}}),a(this,"getBodyElement",function(){var e,t=null===(e=document.getElementsByTagName("body"))||void 0===e?void 0:e[0];if(!t){var n="could not locate <body> element in the page";throw i.onChange(new q(T.NO_BODY,I.ERROR,n),{frame:null}),new Error(n)}return t}),this.contextId=le(),this.experienceIdentifiers=new Set,this.eventManager=new Ue,this.contextOnChange=t.onChange,this.logger=new We}),Qe=function(){var e=n(g().m(function e(){var t,i=arguments;return g().w(function(e){for(;;)if(0===e.n)return t=i.length>0&&void 0!==i[0]?i[0]:{},e.a(2,new Ze(t))},e)}));return function(){return e.apply(this,arguments)}}(),Je=u(u(u(u(u(u(u(u(u(u(u(u(u(u(u({},N),A),R),L),k),P),_),F),B),z),H),U),j),K),$);e.BaseExperience=ce,e.BaseExperienceFrame=be,e.CALCULATED_METRIC_COLUMN_TYPE=V,e.ChangeEvent=q,e.ChangeEventLevel=I,e.ChangeEventName=T,e.ConsoleExperience=Te,e.ConsoleExperienceFrame=Me,e.ControlExperience=ze,e.ControlExperienceFrame=He,e.DashboardExperience=Le,e.DashboardExperienceFrame=Ie,e.DataResponse=ie,e.DefaultLogger=We,e.EmbeddingContext=Ze,e.EmbeddingEvent=Y,e.EmbeddingMessageEvent=X,e.ErrorChangeEventName=S,e.ErrorResponse=te,e.EventManager=Ue,e.ExperienceType=O,e.GenerativeQnAExperience=Be,e.GenerativeQnAExperienceFrame=_e,e.GenerativeQnAPanelType=W,e.GetterMessageEventName=E,e.Iframe=ye,e.InfoChangeEventName=b,e.InfoMessageEventName=C,e.InternalQBaseExperience=Pe,e.InvokerMessageEventName=M,e.MessageEventName=D,e.PostMessageEvent=Q,e.QSE=Je,e.QSearchExperience=Oe,e.QSearchExperienceFrame=ke,e.QuickChatExperience=Xe,e.QuickChatExperienceFrame=je,e.ResponseMessage=J,e.SDK_VERSION=Ce,e.SPECIAL_DATAPOINT_VALUE_TYPES=G,e.SetterMessageEventName=x,e.SuccessResponse=ee,e.TargetedMessageEvent=Z,e.VisualExperience=Ee,e.VisualExperienceFrame=we,e.WarnChangeEventName=w,e.createEmbeddingContext=Qe}(t)},96411(e,t,i){"use strict";i.d(t,{G:()=>v});var n=i(3224),s=i(17303),r=i(51759),o=i(38383),a=i.n(o),l=i(74831);function c(e){return e.query.definitions.find(e=>"OperationDefinition"===e.kind)}var h=i(74579),d=i.n(h);const u={shouldHandleOperation:void 0,uri:void 0,setTransaction:!0,setFingerprint:!0,attachBreadcrumbs:{includeQuery:!1,includeVariables:!1,includeFetchResult:!1,includeError:!1,includeCache:!1,includeContext:!1,transform:void 0}};var p=i(6613),g=i(74765);function f(e){return JSON.stringify(e,null,2)}function m(e,t,i){const n=i.attachBreadcrumbs&&"function"==typeof i.attachBreadcrumbs.transform?i.attachBreadcrumbs.transform(t,e):t;n.data=function(e){const t={};for(const[i,n]of Object.entries(e))t[i]="object"==typeof n?f(n):n;return t}(n.data),(0,g.Z)(n)}class v extends n.C{options;constructor(e={}){super(),this.options=function(e){return d()(u,e)}(e)}request(e,t){const{options:i}=this;if(!(i.shouldHandleOperation?.(e)??1))return t(e);i.setTransaction&&function(e){const t=c(e).name;t&&(0,p.o5)().setTransactionName(t.value)}(e),i.setFingerprint&&function(e){const t=c(e).name;t&&(0,p.o5)().setFingerprint(["{{ default }}",t.value])}(e);const{attachBreadcrumbs:n}=i;if(!n)return t(e);const o=function(e,t){const i=t.attachBreadcrumbs,n=c(e),s={},r=t.uri;r&&(s.url=r);const o=n.name?.value;o&&(s.operationName=o),i.includeQuery&&(s.query=n.loc?.source?.body??(0,l.y)(n)),i.includeVariables&&(s.variables=e.variables),i.includeCache&&(s.cache=e.getContext().cache?.data?.data??void 0);const h=i.includeContext;return h&&(s.context=function(e,t){const i={};return t.forEach(t=>{i[t]=a().get(e,t)}),i}(e.getContext(),h)),{type:"http",category:`graphql.${n.operation}`,data:s}}(e,i);return new r.c(r=>{const a=t(e).subscribe({next:e=>{o.level=function(e){return e.errors&&e.errors.length>0?"error":"info"}(e),n.includeFetchResult&&(o.data.fetchResult=e),n.includeError&&e.errors&&e.errors.length>0&&(o.data.error=new s.K4({graphQLErrors:e.errors})),r.next(e)},complete:()=>{m(e,o,i),r.complete()},error:t=>{let s;if(o.level="error",function(e){return"object"==typeof e&&null!==e&&"response"in e&&"result"in e&&"statusCode"in e}(t)){const{result:e,response:i,...r}=t;s=r,n.includeFetchResult&&(o.data.fetchResult=e)}else s=t;n.includeError&&(o.data.error=s),m(e,o,i),r.error(t)}});return()=>{a.unsubscribe()}})}}},78071(e,t,i){var n=t;n.bignum=i(5630),n.define=i(92300).define,n.base=i(73160),n.constants=i(36622),n.decoders=i(81300),n.encoders=i(36028)},92300(e,t,i){var n=i(78071),s=i(91193);function r(e,t){this.name=e,this.body=t,this.decoders={},this.encoders={}}t.define=function(e,t){return new r(e,t)},r.prototype._createNamed=function(e){var t;try{t=i(92785).runInThisContext("(function "+this.name+"(entity) {\n  this._initNamed(entity);\n})")}catch(e){t=function(e){this._initNamed(e)}}return s(t,e),t.prototype._initNamed=function(t){e.call(this,t)},new t(this)},r.prototype._getDecoder=function(e){return e=e||"der",this.decoders.hasOwnProperty(e)||(this.decoders[e]=this._createNamed(n.decoders[e])),this.decoders[e]},r.prototype.decode=function(e,t,i){return this._getDecoder(t).decode(e,i)},r.prototype._getEncoder=function(e){return e=e||"der",this.encoders.hasOwnProperty(e)||(this.encoders[e]=this._createNamed(n.encoders[e])),this.encoders[e]},r.prototype.encode=function(e,t,i){return this._getEncoder(t).encode(e,i)}},86216(e,t,i){var n=i(91193),s=i(73160).Reporter,r=i(77511).Buffer;function o(e,t){s.call(this,t),r.isBuffer(e)?(this.base=e,this.offset=0,this.length=e.length):this.error("Input not Buffer")}function a(e,t){if(Array.isArray(e))this.length=0,this.value=e.map(function(e){return e instanceof a||(e=new a(e,t)),this.length+=e.length,e},this);else if("number"==typeof e){if(!(0<=e&&e<=255))return t.error("non-byte EncoderBuffer value");this.value=e,this.length=1}else if("string"==typeof e)this.value=e,this.length=r.byteLength(e);else{if(!r.isBuffer(e))return t.error("Unsupported type: "+typeof e);this.value=e,this.length=e.length}}n(o,s),t.t=o,o.prototype.save=function(){return{offset:this.offset,reporter:s.prototype.save.call(this)}},o.prototype.restore=function(e){var t=new o(this.base);return t.offset=e.offset,t.length=this.offset,this.offset=e.offset,s.prototype.restore.call(this,e.reporter),t},o.prototype.isEmpty=function(){return this.offset===this.length},o.prototype.readUInt8=function(e){return this.offset+1<=this.length?this.base.readUInt8(this.offset++,!0):this.error(e||"DecoderBuffer overrun")},o.prototype.skip=function(e,t){if(!(this.offset+e<=this.length))return this.error(t||"DecoderBuffer overrun");var i=new o(this.base);return i._reporterState=this._reporterState,i.offset=this.offset,i.length=this.offset+e,this.offset+=e,i},o.prototype.raw=function(e){return this.base.slice(e?e.offset:this.offset,this.length)},t.d=a,a.prototype.join=function(e,t){return e||(e=new r(this.length)),t||(t=0),0===this.length||(Array.isArray(this.value)?this.value.forEach(function(i){i.join(e,t),t+=i.length}):("number"==typeof this.value?e[t]=this.value:"string"==typeof this.value?e.write(this.value,t):r.isBuffer(this.value)&&this.value.copy(e,t),t+=this.length)),e}},73160(e,t,i){var n=t;n.Reporter=i(18031).a,n.DecoderBuffer=i(86216).t,n.EncoderBuffer=i(86216).d,n.Node=i(13558)},13558(e,t,i){var n=i(73160).Reporter,s=i(73160).EncoderBuffer,r=i(73160).DecoderBuffer,o=i(35578),a=["seq","seqof","set","setof","objid","bool","gentime","utctime","null_","enum","int","objDesc","bitstr","bmpstr","charstr","genstr","graphstr","ia5str","iso646str","numstr","octstr","printstr","t61str","unistr","utf8str","videostr"],l=["key","obj","use","optional","explicit","implicit","def","choice","any","contains"].concat(a);function c(e,t){var i={};this._baseState=i,i.enc=e,i.parent=t||null,i.children=null,i.tag=null,i.args=null,i.reverseArgs=null,i.choice=null,i.optional=!1,i.any=!1,i.obj=!1,i.use=null,i.useDecoder=null,i.key=null,i.default=null,i.explicit=null,i.implicit=null,i.contains=null,i.parent||(i.children=[],this._wrap())}e.exports=c;var h=["enc","parent","children","tag","args","reverseArgs","choice","optional","any","obj","use","alteredUse","key","default","explicit","implicit","contains"];c.prototype.clone=function(){var e=this._baseState,t={};h.forEach(function(i){t[i]=e[i]});var i=new this.constructor(t.parent);return i._baseState=t,i},c.prototype._wrap=function(){var e=this._baseState;l.forEach(function(t){this[t]=function(){var i=new this.constructor(this);return e.children.push(i),i[t].apply(i,arguments)}},this)},c.prototype._init=function(e){var t=this._baseState;o(null===t.parent),e.call(this),t.children=t.children.filter(function(e){return e._baseState.parent===this},this),o.equal(t.children.length,1,"Root node can have only one child")},c.prototype._useArgs=function(e){var t=this._baseState,i=e.filter(function(e){return e instanceof this.constructor},this);e=e.filter(function(e){return!(e instanceof this.constructor)},this),0!==i.length&&(o(null===t.children),t.children=i,i.forEach(function(e){e._baseState.parent=this},this)),0!==e.length&&(o(null===t.args),t.args=e,t.reverseArgs=e.map(function(e){if("object"!=typeof e||e.constructor!==Object)return e;var t={};return Object.keys(e).forEach(function(i){i==(0|i)&&(i|=0);var n=e[i];t[n]=i}),t}))},["_peekTag","_decodeTag","_use","_decodeStr","_decodeObjid","_decodeTime","_decodeNull","_decodeInt","_decodeBool","_decodeList","_encodeComposite","_encodeStr","_encodeObjid","_encodeTime","_encodeNull","_encodeInt","_encodeBool"].forEach(function(e){c.prototype[e]=function(){var t=this._baseState;throw new Error(e+" not implemented for encoding: "+t.enc)}}),a.forEach(function(e){c.prototype[e]=function(){var t=this._baseState,i=Array.prototype.slice.call(arguments);return o(null===t.tag),t.tag=e,this._useArgs(i),this}}),c.prototype.use=function(e){o(e);var t=this._baseState;return o(null===t.use),t.use=e,this},c.prototype.optional=function(){return this._baseState.optional=!0,this},c.prototype.def=function(e){var t=this._baseState;return o(null===t.default),t.default=e,t.optional=!0,this},c.prototype.explicit=function(e){var t=this._baseState;return o(null===t.explicit&&null===t.implicit),t.explicit=e,this},c.prototype.implicit=function(e){var t=this._baseState;return o(null===t.explicit&&null===t.implicit),t.implicit=e,this},c.prototype.obj=function(){var e=this._baseState,t=Array.prototype.slice.call(arguments);return e.obj=!0,0!==t.length&&this._useArgs(t),this},c.prototype.key=function(e){var t=this._baseState;return o(null===t.key),t.key=e,this},c.prototype.any=function(){return this._baseState.any=!0,this},c.prototype.choice=function(e){var t=this._baseState;return o(null===t.choice),t.choice=e,this._useArgs(Object.keys(e).map(function(t){return e[t]})),this},c.prototype.contains=function(e){var t=this._baseState;return o(null===t.use),t.contains=e,this},c.prototype._decode=function(e,t){var i=this._baseState;if(null===i.parent)return e.wrapResult(i.children[0]._decode(e,t));var n,s=i.default,o=!0,a=null;if(null!==i.key&&(a=e.enterKey(i.key)),i.optional){var l=null;if(null!==i.explicit?l=i.explicit:null!==i.implicit?l=i.implicit:null!==i.tag&&(l=i.tag),null!==l||i.any){if(o=this._peekTag(e,l,i.any),e.isError(o))return o}else{var c=e.save();try{null===i.choice?this._decodeGeneric(i.tag,e,t):this._decodeChoice(e,t),o=!0}catch(e){o=!1}e.restore(c)}}if(i.obj&&o&&(n=e.enterObject()),o){if(null!==i.explicit){var h=this._decodeTag(e,i.explicit);if(e.isError(h))return h;e=h}var d=e.offset;if(null===i.use&&null===i.choice){i.any&&(c=e.save());var u=this._decodeTag(e,null!==i.implicit?i.implicit:i.tag,i.any);if(e.isError(u))return u;i.any?s=e.raw(c):e=u}if(t&&t.track&&null!==i.tag&&t.track(e.path(),d,e.length,"tagged"),t&&t.track&&null!==i.tag&&t.track(e.path(),e.offset,e.length,"content"),i.any||(s=null===i.choice?this._decodeGeneric(i.tag,e,t):this._decodeChoice(e,t)),e.isError(s))return s;if(i.any||null!==i.choice||null===i.children||i.children.forEach(function(i){i._decode(e,t)}),i.contains&&("octstr"===i.tag||"bitstr"===i.tag)){var p=new r(s);s=this._getUse(i.contains,e._reporterState.obj)._decode(p,t)}}return i.obj&&o&&(s=e.leaveObject(n)),null===i.key||null===s&&!0!==o?null!==a&&e.exitKey(a):e.leaveKey(a,i.key,s),s},c.prototype._decodeGeneric=function(e,t,i){var n=this._baseState;return"seq"===e||"set"===e?null:"seqof"===e||"setof"===e?this._decodeList(t,e,n.args[0],i):/str$/.test(e)?this._decodeStr(t,e,i):"objid"===e&&n.args?this._decodeObjid(t,n.args[0],n.args[1],i):"objid"===e?this._decodeObjid(t,null,null,i):"gentime"===e||"utctime"===e?this._decodeTime(t,e,i):"null_"===e?this._decodeNull(t,i):"bool"===e?this._decodeBool(t,i):"objDesc"===e?this._decodeStr(t,e,i):"int"===e||"enum"===e?this._decodeInt(t,n.args&&n.args[0],i):null!==n.use?this._getUse(n.use,t._reporterState.obj)._decode(t,i):t.error("unknown tag: "+e)},c.prototype._getUse=function(e,t){var i=this._baseState;return i.useDecoder=this._use(e,t),o(null===i.useDecoder._baseState.parent),i.useDecoder=i.useDecoder._baseState.children[0],i.implicit!==i.useDecoder._baseState.implicit&&(i.useDecoder=i.useDecoder.clone(),i.useDecoder._baseState.implicit=i.implicit),i.useDecoder},c.prototype._decodeChoice=function(e,t){var i=this._baseState,n=null,s=!1;return Object.keys(i.choice).some(function(r){var o=e.save(),a=i.choice[r];try{var l=a._decode(e,t);if(e.isError(l))return!1;n={type:r,value:l},s=!0}catch(t){return e.restore(o),!1}return!0},this),s?n:e.error("Choice not matched")},c.prototype._createEncoderBuffer=function(e){return new s(e,this.reporter)},c.prototype._encode=function(e,t,i){var n=this._baseState;if(null===n.default||n.default!==e){var s=this._encodeValue(e,t,i);if(void 0!==s&&!this._skipDefault(s,t,i))return s}},c.prototype._encodeValue=function(e,t,i){var s=this._baseState;if(null===s.parent)return s.children[0]._encode(e,t||new n);var r=null;if(this.reporter=t,s.optional&&void 0===e){if(null===s.default)return;e=s.default}var o=null,a=!1;if(s.any)r=this._createEncoderBuffer(e);else if(s.choice)r=this._encodeChoice(e,t);else if(s.contains)o=this._getUse(s.contains,i)._encode(e,t),a=!0;else if(s.children)o=s.children.map(function(i){if("null_"===i._baseState.tag)return i._encode(null,t,e);if(null===i._baseState.key)return t.error("Child should have a key");var n=t.enterKey(i._baseState.key);if("object"!=typeof e)return t.error("Child expected, but input is not object");var s=i._encode(e[i._baseState.key],t,e);return t.leaveKey(n),s},this).filter(function(e){return e}),o=this._createEncoderBuffer(o);else if("seqof"===s.tag||"setof"===s.tag){if(!s.args||1!==s.args.length)return t.error("Too many args for : "+s.tag);if(!Array.isArray(e))return t.error("seqof/setof, but data is not Array");var l=this.clone();l._baseState.implicit=null,o=this._createEncoderBuffer(e.map(function(i){var n=this._baseState;return this._getUse(n.args[0],e)._encode(i,t)},l))}else null!==s.use?r=this._getUse(s.use,i)._encode(e,t):(o=this._encodePrimitive(s.tag,e),a=!0);if(!s.any&&null===s.choice){var c=null!==s.implicit?s.implicit:s.tag,h=null===s.implicit?"universal":"context";null===c?null===s.use&&t.error("Tag could be omitted only for .use()"):null===s.use&&(r=this._encodeComposite(c,a,h,o))}return null!==s.explicit&&(r=this._encodeComposite(s.explicit,!1,"context",r)),r},c.prototype._encodeChoice=function(e,t){var i=this._baseState,n=i.choice[e.type];return n||o(!1,e.type+" not found in "+JSON.stringify(Object.keys(i.choice))),n._encode(e.value,t)},c.prototype._encodePrimitive=function(e,t){var i=this._baseState;if(/str$/.test(e))return this._encodeStr(t,e);if("objid"===e&&i.args)return this._encodeObjid(t,i.reverseArgs[0],i.args[1]);if("objid"===e)return this._encodeObjid(t,null,null);if("gentime"===e||"utctime"===e)return this._encodeTime(t,e);if("null_"===e)return this._encodeNull();if("int"===e||"enum"===e)return this._encodeInt(t,i.args&&i.reverseArgs[0]);if("bool"===e)return this._encodeBool(t);if("objDesc"===e)return this._encodeStr(t,e);throw new Error("Unsupported tag: "+e)},c.prototype._isNumstr=function(e){return/^[0-9 ]*$/.test(e)},c.prototype._isPrintstr=function(e){return/^[A-Za-z0-9 '\(\)\+,\-\.\/:=\?]*$/.test(e)}},18031(e,t,i){var n=i(91193);function s(e){this._reporterState={obj:null,path:[],options:e||{},errors:[]}}function r(e,t){this.path=e,this.rethrow(t)}t.a=s,s.prototype.isError=function(e){return e instanceof r},s.prototype.save=function(){var e=this._reporterState;return{obj:e.obj,pathLen:e.path.length}},s.prototype.restore=function(e){var t=this._reporterState;t.obj=e.obj,t.path=t.path.slice(0,e.pathLen)},s.prototype.enterKey=function(e){return this._reporterState.path.push(e)},s.prototype.exitKey=function(e){var t=this._reporterState;t.path=t.path.slice(0,e-1)},s.prototype.leaveKey=function(e,t,i){var n=this._reporterState;this.exitKey(e),null!==n.obj&&(n.obj[t]=i)},s.prototype.path=function(){return this._reporterState.path.join("/")},s.prototype.enterObject=function(){var e=this._reporterState,t=e.obj;return e.obj={},t},s.prototype.leaveObject=function(e){var t=this._reporterState,i=t.obj;return t.obj=e,i},s.prototype.error=function(e){var t,i=this._reporterState,n=e instanceof r;if(t=n?e:new r(i.path.map(function(e){return"["+JSON.stringify(e)+"]"}).join(""),e.message||e,e.stack),!i.options.partial)throw t;return n||i.errors.push(t),t},s.prototype.wrapResult=function(e){var t=this._reporterState;return t.options.partial?{result:this.isError(e)?null:e,errors:t.errors}:e},n(r,Error),r.prototype.rethrow=function(e){if(this.message=e+" at: "+(this.path||"(shallow)"),Error.captureStackTrace&&Error.captureStackTrace(this,r),!this.stack)try{throw new Error(this.message)}catch(e){this.stack=e.stack}return this}},4029(e,t,i){var n=i(36622);t.tagClass={0:"universal",1:"application",2:"context",3:"private"},t.tagClassByName=n._reverse(t.tagClass),t.tag={0:"end",1:"bool",2:"int",3:"bitstr",4:"octstr",5:"null_",6:"objid",7:"objDesc",8:"external",9:"real",10:"enum",11:"embed",12:"utf8str",13:"relativeOid",16:"seq",17:"set",18:"numstr",19:"printstr",20:"t61str",21:"videostr",22:"ia5str",23:"utctime",24:"gentime",25:"graphstr",26:"iso646str",27:"genstr",28:"unistr",29:"charstr",30:"bmpstr"},t.tagByName=n._reverse(t.tag)},36622(e,t,i){var n=t;n._reverse=function(e){var t={};return Object.keys(e).forEach(function(i){(0|i)==i&&(i|=0);var n=e[i];t[n]=i}),t},n.der=i(4029)},87779(e,t,i){var n=i(91193),s=i(78071),r=s.base,o=s.bignum,a=s.constants.der;function l(e){this.enc="der",this.name=e.name,this.entity=e,this.tree=new c,this.tree._init(e.body)}function c(e){r.Node.call(this,"der",e)}function h(e,t){var i=e.readUInt8(t);if(e.isError(i))return i;var n=a.tagClass[i>>6],s=!(32&i);if(31&~i)i&=31;else{var r=i;for(i=0;!(128&~r);){if(r=e.readUInt8(t),e.isError(r))return r;i<<=7,i|=127&r}}return{cls:n,primitive:s,tag:i,tagStr:a.tag[i]}}function d(e,t,i){var n=e.readUInt8(i);if(e.isError(n))return n;if(!t&&128===n)return null;if(!(128&n))return n;var s=127&n;if(s>4)return e.error("length octect is too long");n=0;for(var r=0;r<s;r++){n<<=8;var o=e.readUInt8(i);if(e.isError(o))return o;n|=o}return n}e.exports=l,l.prototype.decode=function(e,t){return e instanceof r.DecoderBuffer||(e=new r.DecoderBuffer(e,t)),this.tree._decode(e,t)},n(c,r.Node),c.prototype._peekTag=function(e,t,i){if(e.isEmpty())return!1;var n=e.save(),s=h(e,'Failed to peek tag: "'+t+'"');return e.isError(s)?s:(e.restore(n),s.tag===t||s.tagStr===t||s.tagStr+"of"===t||i)},c.prototype._decodeTag=function(e,t,i){var n=h(e,'Failed to decode tag of "'+t+'"');if(e.isError(n))return n;var s=d(e,n.primitive,'Failed to get length of "'+t+'"');if(e.isError(s))return s;if(!i&&n.tag!==t&&n.tagStr!==t&&n.tagStr+"of"!==t)return e.error('Failed to match tag: "'+t+'"');if(n.primitive||null!==s)return e.skip(s,'Failed to match body of: "'+t+'"');var r=e.save(),o=this._skipUntilEnd(e,'Failed to skip indefinite length body: "'+this.tag+'"');return e.isError(o)?o:(s=e.offset-r.offset,e.restore(r),e.skip(s,'Failed to match body of: "'+t+'"'))},c.prototype._skipUntilEnd=function(e,t){for(;;){var i=h(e,t);if(e.isError(i))return i;var n,s=d(e,i.primitive,t);if(e.isError(s))return s;if(n=i.primitive||null!==s?e.skip(s):this._skipUntilEnd(e,t),e.isError(n))return n;if("end"===i.tagStr)break}},c.prototype._decodeList=function(e,t,i,n){for(var s=[];!e.isEmpty();){var r=this._peekTag(e,"end");if(e.isError(r))return r;var o=i.decode(e,"der",n);if(e.isError(o)&&r)break;s.push(o)}return s},c.prototype._decodeStr=function(e,t){if("bitstr"===t){var i=e.readUInt8();return e.isError(i)?i:{unused:i,data:e.raw()}}if("bmpstr"===t){var n=e.raw();if(n.length%2==1)return e.error("Decoding of string type: bmpstr length mismatch");for(var s="",r=0;r<n.length/2;r++)s+=String.fromCharCode(n.readUInt16BE(2*r));return s}if("numstr"===t){var o=e.raw().toString("ascii");return this._isNumstr(o)?o:e.error("Decoding of string type: numstr unsupported characters")}if("octstr"===t)return e.raw();if("objDesc"===t)return e.raw();if("printstr"===t){var a=e.raw().toString("ascii");return this._isPrintstr(a)?a:e.error("Decoding of string type: printstr unsupported characters")}return/str$/.test(t)?e.raw().toString():e.error("Decoding of string type: "+t+" unsupported")},c.prototype._decodeObjid=function(e,t,i){for(var n,s=[],r=0;!e.isEmpty();){var o=e.readUInt8();r<<=7,r|=127&o,128&o||(s.push(r),r=0)}128&o&&s.push(r);var a=s[0]/40|0,l=s[0]%40;if(n=i?s:[a,l].concat(s.slice(1)),t){var c=t[n.join(" ")];void 0===c&&(c=t[n.join(".")]),void 0!==c&&(n=c)}return n},c.prototype._decodeTime=function(e,t){var i=e.raw().toString();if("gentime"===t)var n=0|i.slice(0,4),s=0|i.slice(4,6),r=0|i.slice(6,8),o=0|i.slice(8,10),a=0|i.slice(10,12),l=0|i.slice(12,14);else{if("utctime"!==t)return e.error("Decoding "+t+" time is not supported yet");n=0|i.slice(0,2),s=0|i.slice(2,4),r=0|i.slice(4,6),o=0|i.slice(6,8),a=0|i.slice(8,10),l=0|i.slice(10,12),n=n<70?2e3+n:1900+n}return Date.UTC(n,s-1,r,o,a,l,0)},c.prototype._decodeNull=function(e){return null},c.prototype._decodeBool=function(e){var t=e.readUInt8();return e.isError(t)?t:0!==t},c.prototype._decodeInt=function(e,t){var i=e.raw(),n=new o(i);return t&&(n=t[n.toString(10)]||n),n},c.prototype._use=function(e,t){return"function"==typeof e&&(e=e(t)),e._getDecoder("der").tree}},81300(e,t,i){var n=t;n.der=i(87779),n.pem=i(71222)},71222(e,t,i){var n=i(91193),s=i(77511).Buffer,r=i(87779);function o(e){r.call(this,e),this.enc="pem"}n(o,r),e.exports=o,o.prototype.decode=function(e,t){for(var i=e.toString().split(/[\r\n]+/g),n=t.label.toUpperCase(),o=/^-----(BEGIN|END) ([^-]+)-----$/,a=-1,l=-1,c=0;c<i.length;c++){var h=i[c].match(o);if(null!==h&&h[2]===n){if(-1!==a){if("END"!==h[1])break;l=c;break}if("BEGIN"!==h[1])break;a=c}}if(-1===a||-1===l)throw new Error("PEM section not found for: "+n);var d=i.slice(a+1,l).join("");d.replace(/[^a-z0-9\+\/=]+/gi,"");var u=new s(d,"base64");return r.prototype.decode.call(this,u,t)}},99291(e,t,i){var n=i(91193),s=i(77511).Buffer,r=i(78071),o=r.base,a=r.constants.der;function l(e){this.enc="der",this.name=e.name,this.entity=e,this.tree=new c,this.tree._init(e.body)}function c(e){o.Node.call(this,"der",e)}function h(e){return e<10?"0"+e:e}e.exports=l,l.prototype.encode=function(e,t){return this.tree._encode(e,t).join()},n(c,o.Node),c.prototype._encodeComposite=function(e,t,i,n){var r,o=function(e,t,i,n){var s;if("seqof"===e?e="seq":"setof"===e&&(e="set"),a.tagByName.hasOwnProperty(e))s=a.tagByName[e];else{if("number"!=typeof e||(0|e)!==e)return n.error("Unknown tag: "+e);s=e}return s>=31?n.error("Multi-octet tag encoding unsupported"):(t||(s|=32),s|=a.tagClassByName[i||"universal"]<<6)}(e,t,i,this.reporter);if(n.length<128)return(r=new s(2))[0]=o,r[1]=n.length,this._createEncoderBuffer([r,n]);for(var l=1,c=n.length;c>=256;c>>=8)l++;(r=new s(2+l))[0]=o,r[1]=128|l,c=1+l;for(var h=n.length;h>0;c--,h>>=8)r[c]=255&h;return this._createEncoderBuffer([r,n])},c.prototype._encodeStr=function(e,t){if("bitstr"===t)return this._createEncoderBuffer([0|e.unused,e.data]);if("bmpstr"===t){for(var i=new s(2*e.length),n=0;n<e.length;n++)i.writeUInt16BE(e.charCodeAt(n),2*n);return this._createEncoderBuffer(i)}return"numstr"===t?this._isNumstr(e)?this._createEncoderBuffer(e):this.reporter.error("Encoding of string type: numstr supports only digits and space"):"printstr"===t?this._isPrintstr(e)?this._createEncoderBuffer(e):this.reporter.error("Encoding of string type: printstr supports only latin upper and lower case letters, digits, space, apostrophe, left and rigth parenthesis, plus sign, comma, hyphen, dot, slash, colon, equal sign, question mark"):/str$/.test(t)||"objDesc"===t?this._createEncoderBuffer(e):this.reporter.error("Encoding of string type: "+t+" unsupported")},c.prototype._encodeObjid=function(e,t,i){if("string"==typeof e){if(!t)return this.reporter.error("string objid given, but no values map found");if(!t.hasOwnProperty(e))return this.reporter.error("objid not found in values map");e=t[e].split(/[\s\.]+/g);for(var n=0;n<e.length;n++)e[n]|=0}else if(Array.isArray(e))for(e=e.slice(),n=0;n<e.length;n++)e[n]|=0;if(!Array.isArray(e))return this.reporter.error("objid() should be either array or string, got: "+JSON.stringify(e));if(!i){if(e[1]>=40)return this.reporter.error("Second objid identifier OOB");e.splice(0,2,40*e[0]+e[1])}var r=0;for(n=0;n<e.length;n++){var o=e[n];for(r++;o>=128;o>>=7)r++}var a=new s(r),l=a.length-1;for(n=e.length-1;n>=0;n--)for(o=e[n],a[l--]=127&o;(o>>=7)>0;)a[l--]=128|127&o;return this._createEncoderBuffer(a)},c.prototype._encodeTime=function(e,t){var i,n=new Date(e);return"gentime"===t?i=[h(n.getFullYear()),h(n.getUTCMonth()+1),h(n.getUTCDate()),h(n.getUTCHours()),h(n.getUTCMinutes()),h(n.getUTCSeconds()),"Z"].join(""):"utctime"===t?i=[h(n.getFullYear()%100),h(n.getUTCMonth()+1),h(n.getUTCDate()),h(n.getUTCHours()),h(n.getUTCMinutes()),h(n.getUTCSeconds()),"Z"].join(""):this.reporter.error("Encoding "+t+" time is not supported yet"),this._encodeStr(i,"octstr")},c.prototype._encodeNull=function(){return this._createEncoderBuffer("")},c.prototype._encodeInt=function(e,t){if("string"==typeof e){if(!t)return this.reporter.error("String int or enum given, but no values map");if(!t.hasOwnProperty(e))return this.reporter.error("Values map doesn't contain: "+JSON.stringify(e));e=t[e]}if("number"!=typeof e&&!s.isBuffer(e)){var i=e.toArray();!e.sign&&128&i[0]&&i.unshift(0),e=new s(i)}if(s.isBuffer(e)){var n=e.length;0===e.length&&n++;var r=new s(n);return e.copy(r),0===e.length&&(r[0]=0),this._createEncoderBuffer(r)}if(e<128)return this._createEncoderBuffer(e);if(e<256)return this._createEncoderBuffer([0,e]);n=1;for(var o=e;o>=256;o>>=8)n++;for(o=(r=new Array(n)).length-1;o>=0;o--)r[o]=255&e,e>>=8;return 128&r[0]&&r.unshift(0),this._createEncoderBuffer(new s(r))},c.prototype._encodeBool=function(e){return this._createEncoderBuffer(e?255:0)},c.prototype._use=function(e,t){return"function"==typeof e&&(e=e(t)),e._getEncoder("der").tree},c.prototype._skipDefault=function(e,t,i){var n,s=this._baseState;if(null===s.default)return!1;var r=e.join();if(void 0===s.defaultBuffer&&(s.defaultBuffer=this._encodeValue(s.default,t,i).join()),r.length!==s.defaultBuffer.length)return!1;for(n=0;n<r.length;n++)if(r[n]!==s.defaultBuffer[n])return!1;return!0}},36028(e,t,i){var n=t;n.der=i(99291),n.pem=i(59678)},59678(e,t,i){var n=i(91193),s=i(99291);function r(e){s.call(this,e),this.enc="pem"}n(r,s),e.exports=r,r.prototype.encode=function(e,t){for(var i=s.prototype.encode.call(this,e).toString("base64"),n=["-----BEGIN "+t.label+"-----"],r=0;r<i.length;r+=64)n.push(i.slice(r,r+64));return n.push("-----END "+t.label+"-----"),n.join("\n")}},28213(e,t){"use strict";t.A=function(e,t){if(e&&t){var i=Array.isArray(t)?t:t.split(",");if(0===i.length)return!0;var n=e.name||"",s=(e.type||"").toLowerCase(),r=s.replace(/\/.*$/,"");return i.some(function(e){var t=e.trim().toLowerCase();return"."===t.charAt(0)?n.toLowerCase().endsWith(t):t.endsWith("/*")?r===t.replace(/\/.*$/,""):s===t})}return!0}},6184(e,t){"use strict";function i(e){var t=void 0;return"undefined"!=typeof Reflect&&"function"==typeof Reflect.ownKeys?t=Reflect.ownKeys(e.prototype):(t=Object.getOwnPropertyNames(e.prototype),"function"==typeof Object.getOwnPropertySymbols&&(t=t.concat(Object.getOwnPropertySymbols(e.prototype)))),t.forEach(function(t){if("constructor"!==t){var i=Object.getOwnPropertyDescriptor(e.prototype,t);"function"==typeof i.value&&Object.defineProperty(e.prototype,t,n(e,t,i))}}),e}function n(e,t,i){var n=i.value;if("function"!=typeof n)throw new Error("@autobind decorator can only be applied to methods not: "+typeof n);var s=!1;return{configurable:!0,get:function(){if(s||this===e.prototype||this.hasOwnProperty(t))return n;var i=n.bind(this);return s=!0,Object.defineProperty(this,t,{value:i,configurable:!0,writable:!0}),s=!1,i}}}Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(){for(var e=arguments.length,t=Array(e),s=0;s<e;s++)t[s]=arguments[s];return 1===t.length?i.apply(void 0,t):n.apply(void 0,t)},e.exports=t.default},47187(e,t,i){"use strict";var n,s=this&&this.__extends||(n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])},n(e,t)},function(e,t){function i(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(i.prototype=t.prototype,new i)}),r=this&&this.__assign||function(){return r=Object.assign||function(e){for(var t,i=1,n=arguments.length;i<n;i++)for(var s in t=arguments[i])Object.prototype.hasOwnProperty.call(t,s)&&(e[s]=t[s]);return e},r.apply(this,arguments)},o=this&&this.__awaiter||function(e,t,i,n){return new(i||(i=Promise))(function(s,r){function o(e){try{l(n.next(e))}catch(e){r(e)}}function a(e){try{l(n.throw(e))}catch(e){r(e)}}function l(e){var t;e.done?s(e.value):(t=e.value,t instanceof i?t:new i(function(e){e(t)})).then(o,a)}l((n=n.apply(e,t||[])).next())})},a=this&&this.__generator||function(e,t){var i,n,s,r,o={label:0,sent:function(){if(1&s[0])throw s[1];return s[1]},trys:[],ops:[]};return r={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(r[Symbol.iterator]=function(){return this}),r;function a(r){return function(a){return function(r){if(i)throw new TypeError("Generator is already executing.");for(;o;)try{if(i=1,n&&(s=2&r[0]?n.return:r[0]?n.throw||((s=n.return)&&s.call(n),0):n.next)&&!(s=s.call(n,r[1])).done)return s;switch(n=0,s&&(r=[2&r[0],s.value]),r[0]){case 0:case 1:s=r;break;case 4:return o.label++,{value:r[1],done:!1};case 5:o.label++,n=r[1],r=[0];continue;case 7:r=o.ops.pop(),o.trys.pop();continue;default:if(!((s=(s=o.trys).length>0&&s[s.length-1])||6!==r[0]&&2!==r[0])){o=0;continue}if(3===r[0]&&(!s||r[1]>s[0]&&r[1]<s[3])){o.label=r[1];break}if(6===r[0]&&o.label<s[1]){o.label=s[1],s=r;break}if(s&&o.label<s[2]){o.label=s[2],o.ops.push(r);break}s[2]&&o.ops.pop(),o.trys.pop();continue}r=t.call(e,o)}catch(e){r=[6,e],n=0}finally{i=s=0}if(5&r[0])throw r[1];return{value:r[0]?r[1]:void 0,done:!0}}([r,a])}}};Object.defineProperty(t,"__esModule",{value:!0});var l,c=i(16266),h=i(91911),d=i(57845),u=i(71481),p=i(21511),g=i(40501);t.USER_AGENT_HEADER="x-amz-user-agent",t.USER_AGENT="aws-amplify/"+g.version+(p.userAgent&&" ")+p.userAgent,function(e){e.NONE="NONE",e.API_KEY="API_KEY",e.AWS_IAM="AWS_IAM",e.AMAZON_COGNITO_USER_POOLS="AMAZON_COGNITO_USER_POOLS",e.OPENID_CONNECT="OPENID_CONNECT",e.AWS_LAMBDA="AWS_LAMBDA"}(l=t.AUTH_TYPE||(t.AUTH_TYPE={}));var f=function(e){function i(i){var n=e.call(this)||this;return n.link=t.authLink(i),n}return s(i,e),i.prototype.request=function(e,t){return this.link.request(e,t)},i}(c.ApolloLink);t.AuthLink=f;var m=function(e,i,n){var s=void 0===e?{header:"",value:""}:e,l=s.header,c=s.value;return o(void 0,void 0,void 0,function(){var e,s,o,h,d;return a(this,function(a){switch(a.label){case 0:return e=i.getContext(),s=r(r({},e.headers),((h={})[t.USER_AGENT_HEADER]=t.USER_AGENT,h)),l&&c?"function"!=typeof c?[3,2]:[4,c.call(void 0)]:[3,5];case 1:return o=a.sent(),[3,4];case 2:return[4,c];case 3:o=a.sent(),a.label=4;case 4:s=r(((d={})[l]=o,d),s),a.label=5;case 5:return i.setContext(r(r({},e),{headers:s})),[2,n(i)]}})})};t.authLink=function(e){var i=e.url,n=e.region,s=e.auth,h=(void 0===s?{}:s).type,p=e.auth;return new c.ApolloLink(function(e,s){return new c.Observable(function(c){var g,f;switch(h){case l.NONE:f=m(void 0,e,s);break;case l.AWS_IAM:var y=p.credentials;f=function(e,i,n){var s=e.credentials,l=e.region,c=e.url;return o(void 0,void 0,void 0,function(){var e,o,h,p,g,f,m,y,C,b,S,w,x;return a(this,function(a){switch(a.label){case 0:return e="appsync",o=i.getContext(),(h="function"==typeof s?s.call():s||{})&&"function"==typeof h.getPromise?[4,h.getPromise()]:[3,2];case 1:a.sent(),a.label=2;case 2:return[4,h];case 3:return p=a.sent(),g=p.accessKeyId,f=p.secretAccessKey,m=p.sessionToken,y=u.parse(c),C=y.host,b=y.path,S=r(r({},v(i,{})),{service:e,region:l,url:c,host:C,path:b}),w=d.Signer.sign(S,{access_key:g,secret_key:f,session_token:m}).headers,i.setContext(r(r({},o),{headers:r(r(r({},o.headers),w),(x={},x[t.USER_AGENT_HEADER]=t.USER_AGENT,x))})),[2,n(i)]}})})}({credentials:void 0===y?{}:y,region:n,url:i},e,s);break;case l.API_KEY:var C=p.apiKey;f=m({header:"X-Api-Key",value:void 0===C?"":C},e,s);break;case l.AMAZON_COGNITO_USER_POOLS:case l.OPENID_CONNECT:var b=p.jwtToken;f=m({header:"Authorization",value:void 0===b?"":b},e,s);break;case l.AWS_LAMBDA:var S=p.token;f=m({header:"Authorization",value:void 0===S?"":S},e,s);break;default:throw new Error("Invalid AUTH_TYPE: "+p.type)}return f.then(function(e){g=e.subscribe({next:c.next.bind(c),error:c.error.bind(c),complete:c.complete.bind(c)})}),function(){g&&g.unsubscribe()}})})};var v=function(e,t){var i=e.operationName,n=e.variables,s=e.query,o={operationName:i,variables:y(n),query:h.print(s)};return r(r({body:JSON.stringify(o),method:"POST"},t),{headers:r({accept:"*/*","content-type":"application/json; charset=UTF-8"},t.headers)})},y=function(e){return Object.keys(e).filter(function(e){return!e.startsWith("@@")}).reduce(function(t,i){return t[i]=e[i],t},{})}},2662(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=i(47187);t.AuthLink=n.AuthLink,t.AUTH_TYPE=n.AUTH_TYPE,t.USER_AGENT_HEADER=n.USER_AGENT_HEADER,t.USER_AGENT=n.USER_AGENT,t.createAuthLink=function(e){var t=e.url,i=e.region,s=e.auth;return new n.AuthLink({url:t,region:i,auth:s})};var s=i(57845);t.Signer=s.Signer},21511(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.userAgent=""},57845(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e){for(var i in e)t.hasOwnProperty(i)||(t[i]=e[i])}(i(24799))},24799(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),i.g.Buffer=i.g.Buffer||i(77511).Buffer;var n=i(71481),s=i(18558).Sha256,r=i(93065).n,o=function(e,t,i){void 0===i&&(i="");var n=new s(e);n.update(t);var o=n.digestSync();return"hex"===i?r(o):o},a=function(e){var t=e||"",i=new s;return i.update(t),r(i.digestSync())},l=function(e){return Object.keys(e).map(function(e){return e.toLowerCase()}).sort().join(";")},c=function(e,t,i){void 0===i&&(i=null),e.headers=e.headers||{};var s=(new Date).toISOString().replace(/[:-]|\.\d{3}/g,""),r=s.substr(0,8),c="AWS4-HMAC-SHA256",h=n.parse(e.url);e.headers.host=h.host,e.headers["x-amz-date"]=s,t.session_token&&(e.headers["X-Amz-Security-Token"]=t.session_token);var d=function(e){var t,i=n.parse(e.url);return[e.method||"/",i.path,i.query,(t=e.headers,t&&0!==Object.keys(t).length?Object.keys(t).map(function(e){return{key:e.toLowerCase(),value:t[e]?t[e].trim().replace(/\s+/g," "):""}}).sort(function(e,t){return e.key<t.key?-1:1}).map(function(e){return e.key+":"+e.value}).join("\n")+"\n":""),l(e.headers),a(e.body)].join("\n")}(e);i=i||function(e){var t=(n.parse(e.url).host.match(/([^.]+)\.(?:([^.]*)\.)?amazonaws\.com$/)||[]).slice(1,3);return"es"===t[1]&&(t=t.reverse()),{service:e.service||t[0],region:e.region||t[1]}}(e);var u=function(e,t,i){return[e,t,i,"aws4_request"].join("/")}(r,i.region,i.service),p=function(e,t,i,n){return[e,i,n,a(t)].join("\n")}(c,d,s,u),g=function(e,t,i){void 0===e&&(e="");var n=o("AWS4"+e,t),s=o(n,i.region),r=o(s,i.service);return o(r,"aws4_request")}(t.secret_key,r,i),f=function(e,t){return o(e,t,"hex")}(g,p),m=function(e,t,i,n,s){return void 0===t&&(t=""),[e+" Credential="+t+"/"+i,"SignedHeaders="+n,"Signature="+s].join(", ")}(c,t.access_key,u,l(e.headers),f);return e.headers.Authorization=m,e},h=function(){function e(){}return e.sign=c,e}();t.Signer=h,t.default=h},77583(e,t,i){"use strict";var n=this&&this.__rest||function(e,t){var i={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(i[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var s=0;for(n=Object.getOwnPropertySymbols(e);s<n.length;s++)t.indexOf(n[s])<0&&Object.prototype.propertyIsEnumerable.call(e,n[s])&&(i[n[s]]=e[n[s]])}return i};Object.defineProperty(t,"__esModule",{value:!0});var s=i(16491);t.CONTROL_EVENTS_KEY=s.CONTROL_EVENTS_KEY;var r=i(16266),o=i(42007),a=i(89444),l=i(62178),c=i(44635);t.createSubscriptionHandshakeLink=function(e,t){var i,h;if("string"==typeof e)i=t||o.createHttpLink({uri:e}),h=r.ApolloLink.from([new l.NonTerminatingLink("controlMessages",{link:new r.ApolloLink(function(e,t){return new r.Observable(function(t){var i,r=e.variables,o=s.CONTROL_EVENTS_KEY,a=r[o],l=n(r,["symbol"==typeof o?o:o+""]);return void 0!==a&&(e.variables=l),t.next(((i={})[s.CONTROL_EVENTS_KEY]=a,i)),function(){}})})}),new l.NonTerminatingLink("subsInfo",{link:i}),new s.SubscriptionHandshakeLink("subsInfo")]);else{var d=e.url;i=t||o.createHttpLink({uri:d}),h=new c.AppSyncRealTimeSubscriptionHandshakeLink(e)}return r.ApolloLink.split(function(e){var t=e.query,i=a.getMainDefinition(t),n=i.kind,s=i.operation;return"OperationDefinition"===n&&"subscription"===s},h,i)}},62178(e,t,i){"use strict";var n,s=this&&this.__extends||(n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])},n(e,t)},function(e,t){function i(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(i.prototype=t.prototype,new i)}),r=this&&this.__assign||function(){return r=Object.assign||function(e){for(var t,i=1,n=arguments.length;i<n;i++)for(var s in t=arguments[i])Object.prototype.hasOwnProperty.call(t,s)&&(e[s]=t[s]);return e},r.apply(this,arguments)},o=this&&this.__awaiter||function(e,t,i,n){return new(i||(i=Promise))(function(s,r){function o(e){try{l(n.next(e))}catch(e){r(e)}}function a(e){try{l(n.throw(e))}catch(e){r(e)}}function l(e){var t;e.done?s(e.value):(t=e.value,t instanceof i?t:new i(function(e){e(t)})).then(o,a)}l((n=n.apply(e,t||[])).next())})},a=this&&this.__generator||function(e,t){var i,n,s,r,o={label:0,sent:function(){if(1&s[0])throw s[1];return s[1]},trys:[],ops:[]};return r={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(r[Symbol.iterator]=function(){return this}),r;function a(r){return function(a){return function(r){if(i)throw new TypeError("Generator is already executing.");for(;o;)try{if(i=1,n&&(s=2&r[0]?n.return:r[0]?n.throw||((s=n.return)&&s.call(n),0):n.next)&&!(s=s.call(n,r[1])).done)return s;switch(n=0,s&&(r=[2&r[0],s.value]),r[0]){case 0:case 1:s=r;break;case 4:return o.label++,{value:r[1],done:!1};case 5:o.label++,n=r[1],r=[0];continue;case 7:r=o.ops.pop(),o.trys.pop();continue;default:if(!((s=(s=o.trys).length>0&&s[s.length-1])||6!==r[0]&&2!==r[0])){o=0;continue}if(3===r[0]&&(!s||r[1]>s[0]&&r[1]<s[3])){o.label=r[1];break}if(6===r[0]&&o.label<s[1]){o.label=s[1],s=r;break}if(s&&o.label<s[2]){o.label=s[2],o.ops.push(r);break}s[2]&&o.ops.pop(),o.trys.pop();continue}r=t.call(e,o)}catch(e){r=[6,e],n=0}finally{i=s=0}if(5&r[0])throw r[1];return{value:r[0]?r[1]:void 0,done:!0}}([r,a])}}};Object.defineProperty(t,"__esModule",{value:!0});var l=i(16266),c=i(36712),h=function(e){function t(t,i){var n=i.link,s=e.call(this)||this;return s.contextKey=t,s.link=n,s}return s(t,e),t.prototype.request=function(e,t){var i=this;return c.setContext(function(t,n){return o(i,void 0,void 0,function(){var t,i,s=this;return a(this,function(o){switch(o.label){case 0:return[4,new Promise(function(t,i){s.link.request(e).subscribe({next:t,error:i})})];case 1:return t=o.sent(),[2,r(r({},n),(i={},i[this.contextKey]=t,i))]}})})}).request(e,t)},t}(l.ApolloLink);t.NonTerminatingLink=h},44635(e,t,i){"use strict";var n,s=this&&this.__extends||(n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])},n(e,t)},function(e,t){function i(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(i.prototype=t.prototype,new i)}),r=this&&this.__assign||function(){return r=Object.assign||function(e){for(var t,i=1,n=arguments.length;i<n;i++)for(var s in t=arguments[i])Object.prototype.hasOwnProperty.call(t,s)&&(e[s]=t[s]);return e},r.apply(this,arguments)},o=this&&this.__awaiter||function(e,t,i,n){return new(i||(i=Promise))(function(s,r){function o(e){try{l(n.next(e))}catch(e){r(e)}}function a(e){try{l(n.throw(e))}catch(e){r(e)}}function l(e){var t;e.done?s(e.value):(t=e.value,t instanceof i?t:new i(function(e){e(t)})).then(o,a)}l((n=n.apply(e,t||[])).next())})},a=this&&this.__generator||function(e,t){var i,n,s,r,o={label:0,sent:function(){if(1&s[0])throw s[1];return s[1]},trys:[],ops:[]};return r={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(r[Symbol.iterator]=function(){return this}),r;function a(r){return function(a){return function(r){if(i)throw new TypeError("Generator is already executing.");for(;o;)try{if(i=1,n&&(s=2&r[0]?n.return:r[0]?n.throw||((s=n.return)&&s.call(n),0):n.next)&&!(s=s.call(n,r[1])).done)return s;switch(n=0,s&&(r=[2&r[0],s.value]),r[0]){case 0:case 1:s=r;break;case 4:return o.label++,{value:r[1],done:!1};case 5:o.label++,n=r[1],r=[0];continue;case 7:r=o.ops.pop(),o.trys.pop();continue;default:if(!((s=(s=o.trys).length>0&&s[s.length-1])||6!==r[0]&&2!==r[0])){o=0;continue}if(3===r[0]&&(!s||r[1]>s[0]&&r[1]<s[3])){o.label=r[1];break}if(6===r[0]&&o.label<s[1]){o.label=s[1],s=r;break}if(s&&o.label<s[2]){o.label=s[2],o.ops.push(r);break}s[2]&&o.ops.pop(),o.trys.pop();continue}r=t.call(e,o)}catch(e){r=[6,e],n=0}finally{i=s=0}if(5&r[0])throw r[1];return{value:r[0]?r[1]:void 0,done:!0}}([r,a])}}};Object.defineProperty(t,"__esModule",{value:!0});var l=i(16266),c=i(35497),h=i(2662),d=i(89347),u=i(71481),p=i(32486),g=i(74037),f=i(18639),m=c.rootLogger.extend("subscriptions");t.CONTROL_EVENTS_KEY="@@controlEvents";var v=[400,401,403],y={accept:"application/json, text/javascript","content-encoding":"amz-1.0","content-type":"application/json; charset=UTF-8"},C=/^https:\/\/\w{26}\.appsync\-api\.\w{2}(?:(?:\-\w{2,})+)\-\d\.amazonaws.com\/graphql$/i,b=function(e){function i(t){var i=t.url,n=t.region,s=t.auth,r=t.keepAliveTimeoutMs,o=e.call(this)||this;if(o.socketStatus=g.SOCKET_STATUS.CLOSED,o.keepAliveTimeout=void 0,o.subscriptionObserverMap=new Map,o.promiseArray=[],o.url=i,o.region=n,o.auth=s,o.keepAliveTimeout=r,o.keepAliveTimeout<6e4)throw new Error("keepAliveTimeoutMs must be greater than or equal to 60000 ("+o.keepAliveTimeout+" used).");return o}return s(i,e),i.prototype.isCustomDomain=function(e){return null===e.match(C)},i.prototype.request=function(e){var i,n=this,s=e.query,c=e.variables,u=e.getContext(),f=u.controlMessages,m=t.CONTROL_EVENTS_KEY,v=(void 0===f?(i={},i[t.CONTROL_EVENTS_KEY]=void 0,i):f)[m],y=u.headers;return new l.Observable(function(e){if(n.url){var t=p.v4(),i=n.auth.type===h.AUTH_TYPE.AMAZON_COGNITO_USER_POOLS||n.auth.type===h.AUTH_TYPE.OPENID_CONNECT?n.auth.jwtToken:null;i=n.auth.type===h.AUTH_TYPE.AWS_LAMBDA?n.auth.token:i;var l={appSyncGraphqlEndpoint:n.url,authenticationType:n.auth.type,query:d.print(s),region:n.region,graphql_headers:function(){return y},variables:c,apiKey:n.auth.type===h.AUTH_TYPE.API_KEY?n.auth.apiKey:"",credentials:n.auth.type===h.AUTH_TYPE.AWS_IAM?n.auth.credentials:null,token:i};return n._startSubscriptionWithAWSAppSyncRealTime({options:l,observer:e,subscriptionId:t}),function(){return o(n,void 0,void 0,function(){return a(this,function(e){try{if(this._verifySubscriptionAlreadyStarted(t),this.subscriptionObserverMap.get(t).subscriptionState!==g.SUBSCRIPTION_STATUS.CONNECTED)throw new Error("Subscription has failed, starting to remove subscription.");this._sendUnsubscriptionMessage(t)}catch(e){return this._removeSubscriptionObserver(t),[2]}return[2]})})}}e.error({errors:[r({},new d.GraphQLError("Subscribe only available for AWS AppSync endpoint"))]}),e.complete()}).filter(function(e){var t=e.extensions,i=(void 0===t?{}:t).controlMsgType;return!0===v||!(void 0!==(void 0===i?void 0:i))})},i.prototype._verifySubscriptionAlreadyStarted=function(e){return o(this,void 0,void 0,function(){var t=this;return a(this,function(i){return this.subscriptionObserverMap.get(e).subscriptionState===g.SUBSCRIPTION_STATUS.PENDING?[2,new Promise(function(i,n){var s=t.subscriptionObserverMap.get(e),r=s.observer,o=s.subscriptionState,a=s.variables,l=s.query;t.subscriptionObserverMap.set(e,{observer:r,subscriptionState:o,variables:a,query:l,subscriptionReadyCallback:i,subscriptionFailedCallback:n})})]:[2]})})},i.prototype._sendUnsubscriptionMessage=function(e){try{if(this.awsRealTimeSocket&&this.awsRealTimeSocket.readyState===WebSocket.OPEN&&this.socketStatus===g.SOCKET_STATUS.READY){var t={id:e,type:g.MESSAGE_TYPES.GQL_STOP},i=JSON.stringify(t);this.awsRealTimeSocket.send(i),this._removeSubscriptionObserver(e)}}catch(e){m({err:e})}},i.prototype._removeSubscriptionObserver=function(e){this.subscriptionObserverMap.delete(e),setTimeout(this._closeSocketIfRequired.bind(this),1e3)},i.prototype._closeSocketIfRequired=function(){this.subscriptionObserverMap.size>0||(this.awsRealTimeSocket?this.awsRealTimeSocket.bufferedAmount>0?setTimeout(this._closeSocketIfRequired.bind(this),1e3):(m("closing WebSocket..."),clearTimeout(this.keepAliveTimeoutId),this.awsRealTimeSocket.close(1e3),this.awsRealTimeSocket=null,this.socketStatus=g.SOCKET_STATUS.CLOSED):this.socketStatus=g.SOCKET_STATUS.CLOSED)},i.prototype._startSubscriptionWithAWSAppSyncRealTime=function(e){var t=e.options,i=e.observer,n=e.subscriptionId;return o(this,void 0,void 0,function(){var e,s,o,l,c,u,p,f,m,v,y,C,b,S,w,x,E,M,A,T,D,I,R,L,k,P=this;return a(this,function(a){switch(a.label){case 0:return e=t.appSyncGraphqlEndpoint,s=t.authenticationType,o=t.query,l=t.variables,c=t.apiKey,u=t.region,p=t.graphql_headers,f=void 0===p?function(){return{}}:p,m=t.credentials,v=t.token,y=g.SUBSCRIPTION_STATUS.PENDING,C={query:o,variables:l},this.subscriptionObserverMap.set(n,{observer:i,query:o,variables:l,subscriptionState:y,startAckTimeoutId:null}),b=JSON.stringify(C),w=[{}],[4,this._awsRealTimeHeaderBasedAuth({apiKey:c,appSyncGraphqlEndpoint:e,authenticationType:s,payload:b,canonicalUri:"",region:u,credentials:m,token:v,graphql_headers:f})];case 1:S=r.apply(void 0,[r.apply(void 0,w.concat([a.sent()])),(k={},k[h.USER_AGENT_HEADER]=h.USER_AGENT,k)]),x={id:n,payload:{data:b,extensions:{authorization:r({},S)}},type:g.MESSAGE_TYPES.GQL_START},E=JSON.stringify(x),a.label=2;case 2:return a.trys.push([2,4,,5]),[4,this._initializeWebSocketConnection({apiKey:c,appSyncGraphqlEndpoint:e,authenticationType:s,region:u,credentials:m,token:v})];case 3:return a.sent(),[3,5];case 4:return M=a.sent(),A=M.message,T=void 0===A?"":A,i.error({errors:[r({},new d.GraphQLError("Connection failed: "+T))]}),i.complete(),"function"==typeof(D=(this.subscriptionObserverMap.get(n)||{}).subscriptionFailedCallback)&&D(),[2];case 5:return I=this.subscriptionObserverMap.get(n)||{},R=I.subscriptionFailedCallback,L=I.subscriptionReadyCallback,this.subscriptionObserverMap.set(n,{observer:i,subscriptionState:y,variables:l,query:o,subscriptionReadyCallback:L,subscriptionFailedCallback:R,startAckTimeoutId:setTimeout(function(){P._timeoutStartSubscriptionAck.call(P,n)},15e3)}),this.awsRealTimeSocket&&this.awsRealTimeSocket.send(E),[2]}})})},i.prototype._initializeWebSocketConnection=function(e){var t=this,i=e.appSyncGraphqlEndpoint,n=e.authenticationType,s=e.apiKey,r=e.region,l=e.credentials,c=e.token;if(this.socketStatus!==g.SOCKET_STATUS.READY)return new Promise(function(e,h){return o(t,void 0,void 0,function(){var t,o,d,u,p,f,v,y,C;return a(this,function(a){switch(a.label){case 0:if(this.promiseArray.push({res:e,rej:h}),this.socketStatus!==g.SOCKET_STATUS.CLOSED)return[3,5];a.label=1;case 1:return a.trys.push([1,4,,5]),this.socketStatus=g.SOCKET_STATUS.CONNECTING,t="{}",u=(d=JSON).stringify,[4,this._awsRealTimeHeaderBasedAuth({authenticationType:n,payload:t,canonicalUri:"/connect",apiKey:s,appSyncGraphqlEndpoint:i,region:r,credentials:l,token:c,graphql_headers:function(){}})];case 2:return o=u.apply(d,[a.sent()]),p=Buffer.from(o).toString("base64"),f=Buffer.from(t).toString("base64"),v=i,v=(v=this.isCustomDomain(v)?v.concat("/realtime"):v.replace("appsync-api","appsync-realtime-api").replace("gogi-beta","grt-beta")).replace("https://","wss://").replace("http://","ws://"),y=v+"?header="+p+"&payload="+f,[4,this._initializeRetryableHandshake({awsRealTimeUrl:y})];case 3:return a.sent(),this.promiseArray.forEach(function(e){var t=e.res;m("Notifying connection successful"),t()}),this.socketStatus=g.SOCKET_STATUS.READY,this.promiseArray=[],[3,5];case 4:return C=a.sent(),this.promiseArray.forEach(function(e){return(0,e.rej)(C)}),this.promiseArray=[],this.awsRealTimeSocket&&this.awsRealTimeSocket.readyState===WebSocket.OPEN&&this.awsRealTimeSocket.close(3001),this.awsRealTimeSocket=null,this.socketStatus=g.SOCKET_STATUS.CLOSED,[3,5];case 5:return[2]}})})})},i.prototype._awsRealTimeHeaderBasedAuth=function(e){var t=e.authenticationType,i=e.payload,n=e.canonicalUri,s=e.appSyncGraphqlEndpoint,r=e.apiKey,l=e.region,c=e.credentials,h=e.token,d=e.graphql_headers;return o(this,void 0,void 0,function(){var e,o,p;return a(this,function(a){switch(a.label){case 0:return e={API_KEY:this._awsRealTimeApiKeyHeader.bind(this),AWS_IAM:this._awsRealTimeIAMHeader.bind(this),OPENID_CONNECT:this._awsRealTimeAuthorizationHeader.bind(this),AMAZON_COGNITO_USER_POOLS:this._awsRealTimeAuthorizationHeader.bind(this),AWS_LAMBDA:this._awsRealTimeAuthorizationHeader.bind(this)},"function"!=typeof(o=e[t])?(m("Authentication type "+t+" not supported"),[2,{}]):(p=u.parse(s).host,[4,o({payload:i,canonicalUri:n,appSyncGraphqlEndpoint:s,apiKey:r,region:l,host:p,credentials:c,token:h,graphql_headers:d})]);case 1:return[2,a.sent()]}})})},i.prototype._awsRealTimeAuthorizationHeader=function(e){var t=e.host,i=e.token,n=e.graphql_headers;return o(this,void 0,void 0,function(){var e,s,o;return a(this,function(a){switch(a.label){case 0:return e={},"function"!=typeof i?[3,2]:[4,i.call(void 0)];case 1:return s=a.sent(),[3,4];case 2:return[4,i];case 3:s=a.sent(),a.label=4;case 4:return o=[(e.Authorization=s,e.host=t,e)],[4,n()];case 5:return[2,r.apply(void 0,o.concat([a.sent()]))]}})})},i.prototype._awsRealTimeApiKeyHeader=function(e){var t=e.apiKey,i=e.host,n=e.graphql_headers;return o(this,void 0,void 0,function(){var e,s,o;return a(this,function(a){switch(a.label){case 0:return e=new Date,s=e.toISOString().replace(/[:\-]|\.\d{3}/g,""),o=[{host:i,"x-amz-date":s,"x-api-key":t}],[4,n()];case 1:return[2,r.apply(void 0,o.concat([a.sent()]))]}})})},i.prototype._awsRealTimeIAMHeader=function(e){var t=e.payload,i=e.canonicalUri,n=e.appSyncGraphqlEndpoint,s=e.region,l=e.credentials;return o(this,void 0,void 0,function(){var e,o,c,d,u,p,g,f;return a(this,function(a){switch(a.label){case 0:return e={region:s,service:"appsync"},(o="function"==typeof l?l.call():l||{})&&"function"==typeof o.getPromise?[4,o.getPromise()]:[3,2];case 1:a.sent(),a.label=2;case 2:if(!o)throw new Error("No credentials");return[4,o];case 3:return c=a.sent(),d=c.accessKeyId,u=c.secretAccessKey,p=c.sessionToken,g={access_key:d,secret_key:u,session_token:p},f={url:""+n+i,body:t,method:"POST",headers:r({},y)},[2,h.Signer.sign(f,g,e).headers]}})})},i.prototype._initializeRetryableHandshake=function(e){var t=e.awsRealTimeUrl;return o(this,void 0,void 0,function(){return a(this,function(e){switch(e.label){case 0:return m("Initializaling retryable Handshake"),[4,f.jitteredExponentialRetry(this._initializeHandshake.bind(this),[{awsRealTimeUrl:t}])];case 1:return e.sent(),[2]}})})},i.prototype._initializeHandshake=function(e){var t=e.awsRealTimeUrl;return o(this,void 0,void 0,function(){var e,n,s,r=this;return a(this,function(o){switch(o.label){case 0:m("Initializing handshake "+t),o.label=1;case 1:return o.trys.push([1,4,,5]),[4,new Promise(function(e,n){var s=i.createWebSocket(t,"graphql-ws");s.onerror=function(){m("WebSocket connection error")},s.onclose=function(){n(new Error("Connection handshake error"))},s.onopen=function(){return r.awsRealTimeSocket=s,e()}})];case 2:return o.sent(),[4,new Promise(function(e,t){var i=!1;r.awsRealTimeSocket.onerror=function(e){m("WebSocket closed "+JSON.stringify(e))},r.awsRealTimeSocket.onclose=function(e){m("WebSocket closed "+e.reason),t(new Error(JSON.stringify(e)))},r.awsRealTimeSocket.onmessage=function(n){var s;m("subscription message from AWS AppSyncRealTime: "+n.data+" ");var o=JSON.parse(n.data),a=o.type,l=o.payload,c=(void 0===l?{}:l).connectionTimeoutMs,h=void 0===c?3e5:c;if(a===g.MESSAGE_TYPES.GQL_CONNECTION_ACK)return i=!0,r.keepAliveTimeout=null!==(s=r.keepAliveTimeout)&&void 0!==s?s:h,r.awsRealTimeSocket.onmessage=r._handleIncomingSubscriptionMessage.bind(r),r.awsRealTimeSocket.onerror=function(e){m(e),r._errorDisconnect(g.CONTROL_MSG.CONNECTION_CLOSED)},r.awsRealTimeSocket.onclose=function(e){m("WebSocket closed "+e.reason),r._errorDisconnect(g.CONTROL_MSG.CONNECTION_CLOSED)},void e("Cool, connected to AWS AppSyncRealTime");if(a===g.MESSAGE_TYPES.GQL_CONNECTION_ERROR){var d=o.payload,u=(void 0===d?{}:d).errors,p=(void 0===u?[]:u)[0],f=void 0===p?{}:p,v=f.errorType,y=void 0===v?"":v,C=f.errorCode;t({errorType:y,errorCode:void 0===C?0:C})}};var n={type:g.MESSAGE_TYPES.GQL_CONNECTION_INIT};r.awsRealTimeSocket.send(JSON.stringify(n)),setTimeout(function(){i||t(new Error("Connection timeout: ack from AWSRealTime was not received on 15000 ms"))}.bind(r),15e3)})];case 3:return o.sent(),[3,5];case 4:throw e=o.sent(),n=e.errorType,s=e.errorCode,v.indexOf(s)>=0?new f.NonRetryableError(n):n?new Error(n):e;case 5:return[2]}})})},i.prototype._handleIncomingSubscriptionMessage=function(e){m("subscription message from AWS AppSync RealTime: "+e.data);var t=JSON.parse(e.data),i=t.id,n=void 0===i?"":i,s=t.payload,o=t.type,a=this.subscriptionObserverMap.get(n)||{},l=a.observer,c=void 0===l?null:l,h=a.query,u=void 0===h?"":h,p=a.variables,f=void 0===p?{}:p,v=a.startAckTimeoutId,y=void 0===v?0:v,C=a.subscriptionReadyCallback,b=void 0===C?null:C,S=a.subscriptionFailedCallback,w=void 0===S?null:S;if(m({id:n,observer:c,query:u,variables:f}),o===g.MESSAGE_TYPES.GQL_DATA&&s&&s.data)c?c.next(s):m("observer not found for id: "+n);else if(o!==g.MESSAGE_TYPES.GQL_START_ACK){if(o===g.MESSAGE_TYPES.GQL_CONNECTION_KEEP_ALIVE)return clearTimeout(this.keepAliveTimeoutId),void(this.keepAliveTimeoutId=setTimeout(this._errorDisconnect.bind(this,g.CONTROL_MSG.TIMEOUT_DISCONNECT),this.keepAliveTimeout));o===g.MESSAGE_TYPES.GQL_ERROR&&(x=g.SUBSCRIPTION_STATUS.FAILED,this.subscriptionObserverMap.set(n,{observer:c,query:u,variables:f,startAckTimeoutId:y,subscriptionReadyCallback:b,subscriptionFailedCallback:w,subscriptionState:x}),clearTimeout(y),c?(c.error({errors:[r({},new d.GraphQLError("Connection failed: "+JSON.stringify(s)))]}),c.complete()):m("observer not found for id: "+n),"function"==typeof w&&w())}else{m("subscription ready for "+JSON.stringify({query:u,variables:f})),"function"==typeof b&&b(),clearTimeout(y),c?c.next({data:s,extensions:{controlMsgType:"CONNECTED"}}):m("observer not found for id: "+n);var x=g.SUBSCRIPTION_STATUS.CONNECTED;this.subscriptionObserverMap.set(n,{observer:c,query:u,variables:f,startAckTimeoutId:null,subscriptionState:x,subscriptionReadyCallback:b,subscriptionFailedCallback:w})}},i.prototype._errorDisconnect=function(e){m("Disconnect error: "+e),this.subscriptionObserverMap.forEach(function(t){var i=t.observer;i&&!i.closed&&i.error({errors:[r({},new d.GraphQLError(e))]})}),this.subscriptionObserverMap.clear(),this.awsRealTimeSocket&&this.awsRealTimeSocket.close(),this.socketStatus=g.SOCKET_STATUS.CLOSED},i.prototype._timeoutStartSubscriptionAck=function(e){var t=this.subscriptionObserverMap.get(e)||{},i=t.observer,n=t.query,s=t.variables;i&&(this.subscriptionObserverMap.set(e,{observer:i,query:n,variables:s,subscriptionState:g.SUBSCRIPTION_STATUS.FAILED}),i&&!i.closed&&(i.error({errors:[r({},new d.GraphQLError("Subscription timeout "+JSON.stringify({query:n,variables:s})))]}),i.complete()),m("timeoutStartSubscription",JSON.stringify({query:n,variables:s})))},i.createWebSocket=function(e,t){return new WebSocket(e,t)},i}(l.ApolloLink);t.AppSyncRealTimeSubscriptionHandshakeLink=b},16491(e,t,i){"use strict";var n,s=this&&this.__extends||(n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])},n(e,t)},function(e,t){function i(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(i.prototype=t.prototype,new i)}),r=this&&this.__assign||function(){return r=Object.assign||function(e){for(var t,i=1,n=arguments.length;i<n;i++)for(var s in t=arguments[i])Object.prototype.hasOwnProperty.call(t,s)&&(e[s]=t[s]);return e},r.apply(this,arguments)},o=this&&this.__awaiter||function(e,t,i,n){return new(i||(i=Promise))(function(s,r){function o(e){try{l(n.next(e))}catch(e){r(e)}}function a(e){try{l(n.throw(e))}catch(e){r(e)}}function l(e){var t;e.done?s(e.value):(t=e.value,t instanceof i?t:new i(function(e){e(t)})).then(o,a)}l((n=n.apply(e,t||[])).next())})},a=this&&this.__generator||function(e,t){var i,n,s,r,o={label:0,sent:function(){if(1&s[0])throw s[1];return s[1]},trys:[],ops:[]};return r={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(r[Symbol.iterator]=function(){return this}),r;function a(r){return function(a){return function(r){if(i)throw new TypeError("Generator is already executing.");for(;o;)try{if(i=1,n&&(s=2&r[0]?n.return:r[0]?n.throw||((s=n.return)&&s.call(n),0):n.next)&&!(s=s.call(n,r[1])).done)return s;switch(n=0,s&&(r=[2&r[0],s.value]),r[0]){case 0:case 1:s=r;break;case 4:return o.label++,{value:r[1],done:!1};case 5:o.label++,n=r[1],r=[0];continue;case 7:r=o.ops.pop(),o.trys.pop();continue;default:if(!((s=(s=o.trys).length>0&&s[s.length-1])||6!==r[0]&&2!==r[0])){o=0;continue}if(3===r[0]&&(!s||r[1]>s[0]&&r[1]<s[3])){o.label=r[1];break}if(6===r[0]&&o.label<s[1]){o.label=s[1],s=r;break}if(s&&o.label<s[2]){o.label=s[2],o.ops.push(r);break}s[2]&&o.ops.pop(),o.trys.pop();continue}r=t.call(e,o)}catch(e){r=[6,e],n=0}finally{i=s=0}if(5&r[0])throw r[1];return{value:r[0]?r[1]:void 0,done:!0}}([r,a])}}},l=this&&this.__rest||function(e,t){var i={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(i[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var s=0;for(n=Object.getOwnPropertySymbols(e);s<n.length;s++)t.indexOf(n[s])<0&&Object.prototype.propertyIsEnumerable.call(e,n[s])&&(i[n[s]]=e[n[s]])}return i};Object.defineProperty(t,"__esModule",{value:!0});var c=i(16266),h=i(35497),d=i(35529),u=i(89444),p=h.rootLogger.extend("subscriptions"),g=p.extend("mqtt");t.CONTROL_EVENTS_KEY="@@controlEvents";var f=function(e){function i(t){var i=e.call(this)||this;return i.topicObservers=new Map,i.clientObservers=new Map,i.onMessage=function(e,t,n){var s=JSON.parse(t),o=i.topicObservers.get(e),a=n.reduce(function(e,t){return e[t]=e[t]||null,e},s.data||{});p("Message received",{data:a,topic:e,observers:o}),o.forEach(function(e){try{e.next(r(r({},s),{data:a}))}catch(e){p(e)}})},i.subsInfoContextKey=t,i}return s(i,e),i.prototype.request=function(e){var i,n=this,s=e.getContext(),o=s[this.subsInfoContextKey],a=s.controlMessages,h=t.CONTROL_EVENTS_KEY,d=(void 0===a?(i={},i[t.CONTROL_EVENTS_KEY]=void 0,i):a)[h],u=o.extensions,p=(void 0===u?{subscription:{newSubscriptions:{},mqttConnections:[]}}:u).subscription,g=p.newSubscriptions,f=p.mqttConnections,m=o.errors,v=void 0===m?[]:m;if(v&&v.length)return new c.Observable(function(e){return e.error(new c.ApolloError({errorMessage:"Error during subscription handshake",extraInfo:{errors:v},graphQLErrors:v})),function(){}});var y=Object.keys(g).map(function(e){return g[e].topic}),C=new Set(y.filter(function(e){return n.topicObservers.has(e)})),b=new Set(y.filter(function(e){return!C.has(e)}));return new c.Observable(function(t){C.forEach(function(e){n.topicObservers.get(e).add(t);var i=Array.from(n.topicObservers.get(e)).find(function(){return!0}),s=Array.from(n.clientObservers).find(function(e){return e[1].observers.has(i)})[0];n.clientObservers.get(s).observers.add(t)});var i=f.filter(function(e){return e.topics.some(function(e){return b.has(e)})}).map(function(e){var t=e.topics,i=l(e,["topics"]);return r(r({},i),{topics:t.filter(function(e){return b.has(e)})})});return n.connectNewClients(i,t,e),function(){var e=Array.from(n.clientObservers).filter(function(e){return e[1].observers.has(t)});e.forEach(function(e){var i=e[0];return n.clientObservers.get(i).observers.delete(t)}),n.clientObservers.forEach(function(e){var t=e.observers,i=e.client;0===t.size&&(i.isConnected()&&i.disconnect(),n.clientObservers.delete(i.clientId))}),n.clientObservers=new Map(Array.from(n.clientObservers).filter(function(e){return e[1].observers.size>0})),n.topicObservers.forEach(function(e){return e.delete(t)}),n.topicObservers=new Map(Array.from(n.topicObservers).filter(function(e){return e[1].size>0}))}}).filter(function(e){var t=e.extensions,i=(void 0===t?{}:t).controlMsgType;return!0===d||!(void 0!==(void 0===i?void 0:i))})},i.prototype.connectNewClients=function(e,t,i){return o(this,void 0,void 0,function(){var n,s,r,o,l=this;return a(this,function(a){return n=i.query,s=u.getMainDefinition(n).selectionSet.selections.map(function(e){return e.name.value}),r=Promise.all(e.map(function(e){return l.connectNewClient(e,t,s)})),o=s.reduce(function(e,t){return e[t]=e[t]||null,e},{}),t.next({data:o,extensions:{controlMsgType:"CONNECTED",controlMsgInfo:{connectionInfo:e}}}),[2,r]})})},i.prototype.connectNewClient=function(e,t,i){return o(this,void 0,void 0,function(){var n,s,o,c,h=this;return a(this,function(a){switch(a.label){case 0:return n=e.client,s=e.url,o=e.topics,(c=new d.Client(s,n)).trace=g.bind(null,n),c.onConnectionLost=function(e){var t=e.errorCode,i=l(e,["errorCode"]);0!==t&&o.forEach(function(e){h.topicObservers.has(e)&&h.topicObservers.get(e).forEach(function(e){return e.error(r(r({},i),{permanent:!0}))})}),o.forEach(function(e){return h.topicObservers.delete(e)})},c.onMessageArrived=function(e){var t=e.destinationName,n=e.payloadString;return h.onMessage(t,n,i)},[4,new Promise(function(e,t){c.connect({useSSL:0===s.indexOf("wss://"),mqttVersion:3,onSuccess:function(){return e(c)},onFailure:t})})];case 1:return a.sent(),[4,this.subscribeToTopics(c,o,t)];case 2:return a.sent(),[2,c]}})})},i.prototype.subscribeToTopics=function(e,t,i){var n=this;return Promise.all(t.map(function(t){return n.subscribeToTopic(e,t,i)}))},i.prototype.subscribeToTopic=function(e,t,i){var n=this;return new Promise(function(s,r){e.subscribe(t,{onSuccess:function(){n.topicObservers.has(t)||n.topicObservers.set(t,new Set),n.clientObservers.has(e.clientId)||n.clientObservers.set(e.clientId,{client:e,observers:new Set}),n.topicObservers.get(t).add(i),n.clientObservers.get(e.clientId).observers.add(i),s(t)},onFailure:r})})},i}(c.ApolloLink);t.SubscriptionHandshakeLink=f},74037(e,t){"use strict";var i,n,s,r;Object.defineProperty(t,"__esModule",{value:!0}),(r=t.SUBSCRIPTION_STATUS||(t.SUBSCRIPTION_STATUS={}))[r.PENDING=0]="PENDING",r[r.CONNECTED=1]="CONNECTED",r[r.FAILED=2]="FAILED",(s=t.SOCKET_STATUS||(t.SOCKET_STATUS={}))[s.CLOSED=0]="CLOSED",s[s.READY=1]="READY",s[s.CONNECTING=2]="CONNECTING",(n=t.MESSAGE_TYPES||(t.MESSAGE_TYPES={})).GQL_CONNECTION_INIT="connection_init",n.GQL_CONNECTION_ERROR="connection_error",n.GQL_CONNECTION_ACK="connection_ack",n.GQL_START="start",n.GQL_START_ACK="start_ack",n.GQL_DATA="data",n.GQL_CONNECTION_KEEP_ALIVE="ka",n.GQL_STOP="stop",n.GQL_COMPLETE="complete",n.GQL_ERROR="error",(i=t.CONTROL_MSG||(t.CONTROL_MSG={})).CONNECTION_CLOSED="Connection closed",i.TIMEOUT_DISCONNECT="Timeout disconnect",i.SUBSCRIPTION_ACK="Subscription ack"},35497(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=i(77321);t.rootLogger=n.default},77321(e,t,i){"use strict";var n=this&&this.__spreadArrays||function(){for(var e=0,t=0,i=arguments.length;t<i;t++)e+=arguments[t].length;var n=Array(e),s=0;for(t=0;t<i;t++)for(var r=arguments[t],o=0,a=r.length;o<a;o++,s++)n[s]=r[o];return n};Object.defineProperty(t,"__esModule",{value:!0});var s=i(89028),r=s.default("aws-appsync"),o=function(e){void 0===e&&(e="");var t=e?n(this.namespace.split(":"),[e]).join(":"):this.namespace,i=s.default(t);return i.extend=o.bind(i),i};r.extend=o.bind(r),t.default=r},18639(e,t,i){"use strict";var n,s=this&&this.__extends||(n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])},n(e,t)},function(e,t){function i(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(i.prototype=t.prototype,new i)}),r=this&&this.__awaiter||function(e,t,i,n){return new(i||(i=Promise))(function(s,r){function o(e){try{l(n.next(e))}catch(e){r(e)}}function a(e){try{l(n.throw(e))}catch(e){r(e)}}function l(e){var t;e.done?s(e.value):(t=e.value,t instanceof i?t:new i(function(e){e(t)})).then(o,a)}l((n=n.apply(e,t||[])).next())})},o=this&&this.__generator||function(e,t){var i,n,s,r,o={label:0,sent:function(){if(1&s[0])throw s[1];return s[1]},trys:[],ops:[]};return r={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(r[Symbol.iterator]=function(){return this}),r;function a(r){return function(a){return function(r){if(i)throw new TypeError("Generator is already executing.");for(;o;)try{if(i=1,n&&(s=2&r[0]?n.return:r[0]?n.throw||((s=n.return)&&s.call(n),0):n.next)&&!(s=s.call(n,r[1])).done)return s;switch(n=0,s&&(r=[2&r[0],s.value]),r[0]){case 0:case 1:s=r;break;case 4:return o.label++,{value:r[1],done:!1};case 5:o.label++,n=r[1],r=[0];continue;case 7:r=o.ops.pop(),o.trys.pop();continue;default:if(!((s=(s=o.trys).length>0&&s[s.length-1])||6!==r[0]&&2!==r[0])){o=0;continue}if(3===r[0]&&(!s||r[1]>s[0]&&r[1]<s[3])){o.label=r[1];break}if(6===r[0]&&o.label<s[1]){o.label=s[1],s=r;break}if(s&&o.label<s[2]){o.label=s[2],o.ops.push(r);break}s[2]&&o.ops.pop(),o.trys.pop();continue}r=t.call(e,o)}catch(e){r=[6,e],n=0}finally{i=s=0}if(5&r[0])throw r[1];return{value:r[0]?r[1]:void 0,done:!0}}([r,a])}}};Object.defineProperty(t,"__esModule",{value:!0});var a=i(35497).rootLogger.extend("retry"),l=function(e){function t(t){var i=e.call(this,t)||this;return i.nonRetryable=!0,i}return s(t,e),t}(Error);function c(e,t,i,n){return void 0===n&&(n=1),r(this,void 0,void 0,function(){var s,r;return o(this,function(o){switch(o.label){case 0:a("Attempt #"+n+" for this vars: "+JSON.stringify(t)),o.label=1;case 1:return o.trys.push([1,3,,8]),[4,e.apply(void 0,t)];case 2:return o.sent(),[3,8];case 3:if(s=o.sent(),a("error "+s),(l=s)&&l.nonRetryable)throw a("non retryable error"),s;return r=i(n,t,s),a("retryIn ",r),!1===r?[3,6]:[4,new Promise(function(e){return setTimeout(e,r)})];case 4:return o.sent(),[4,c(e,t,i,n+1)];case 5:return[2,o.sent()];case 6:throw s;case 7:return[3,8];case 8:return[2]}var l})})}t.NonRetryableError=l,t.retry=c,t.jitteredExponentialRetry=function(e,t,i){return void 0===i&&(i=5e3),c(e,t,function(e){return function(t){var i=100*Math.pow(2,t)+100*Math.random();return!(i>e)&&i}}(i))}},35529(e,t,i){var n;n=function(){var e=function(t){var i,n=t.localStorage||(i={},{setItem:function(e,t){i[e]=t},getItem:function(e){return i[e]},removeItem:function(e){delete i[e]}}),s=function(e,t){for(var i in e)if(e.hasOwnProperty(i)){if(!t.hasOwnProperty(i)){var n="Unknown property, "+i+". Valid properties are:";for(var s in t)t.hasOwnProperty(s)&&(n=n+" "+s);throw new Error(n)}if(typeof e[i]!==t[i])throw new Error(l(o.INVALID_TYPE,[typeof e[i],i]))}},r=function(e,t){return function(){return e.apply(t,arguments)}},o={OK:{code:0,text:"AMQJSC0000I OK."},CONNECT_TIMEOUT:{code:1,text:"AMQJSC0001E Connect timed out."},SUBSCRIBE_TIMEOUT:{code:2,text:"AMQJS0002E Subscribe timed out."},UNSUBSCRIBE_TIMEOUT:{code:3,text:"AMQJS0003E Unsubscribe timed out."},PING_TIMEOUT:{code:4,text:"AMQJS0004E Ping timed out."},INTERNAL_ERROR:{code:5,text:"AMQJS0005E Internal error. Error Message: {0}, Stack trace: {1}"},CONNACK_RETURNCODE:{code:6,text:"AMQJS0006E Bad Connack return code:{0} {1}."},SOCKET_ERROR:{code:7,text:"AMQJS0007E Socket error:{0}."},SOCKET_CLOSE:{code:8,text:"AMQJS0008I Socket closed."},MALFORMED_UTF:{code:9,text:"AMQJS0009E Malformed UTF data:{0} {1} {2}."},UNSUPPORTED:{code:10,text:"AMQJS0010E {0} is not supported by this browser."},INVALID_STATE:{code:11,text:"AMQJS0011E Invalid state {0}."},INVALID_TYPE:{code:12,text:"AMQJS0012E Invalid type {0} for {1}."},INVALID_ARGUMENT:{code:13,text:"AMQJS0013E Invalid argument {0} for {1}."},UNSUPPORTED_OPERATION:{code:14,text:"AMQJS0014E Unsupported operation."},INVALID_STORED_DATA:{code:15,text:"AMQJS0015E Invalid data in local storage key={0} value={1}."},INVALID_MQTT_MESSAGE_TYPE:{code:16,text:"AMQJS0016E Invalid MQTT message type {0}."},MALFORMED_UNICODE:{code:17,text:"AMQJS0017E Malformed Unicode string:{0} {1}."},BUFFER_FULL:{code:18,text:"AMQJS0018E Message buffer is full, maximum buffer size: {0}."}},a={0:"Connection Accepted",1:"Connection Refused: unacceptable protocol version",2:"Connection Refused: identifier rejected",3:"Connection Refused: server unavailable",4:"Connection Refused: bad user name or password",5:"Connection Refused: not authorized"},l=function(e,t){var i=e.text;if(t)for(var n,s,r=0;r<t.length;r++)if(n="{"+r+"}",(s=i.indexOf(n))>0){var o=i.substring(0,s),a=i.substring(s+n.length);i=o+t[r]+a}return i},c=[0,6,77,81,73,115,100,112,3],h=[0,4,77,81,84,84,4],d=function(e,t){for(var i in this.type=e,t)t.hasOwnProperty(i)&&(this[i]=t[i])};function u(t,i){var n,s=i,r=t[i],o=r>>4,a=r&=15;i+=1;var l=0,c=1;do{if(i==t.length)return[null,s];l+=(127&(n=t[i++]))*c,c*=128}while(128&n);var h=i+l;if(h>t.length)return[null,s];var u=new d(o);switch(o){case 2:1&t[i++]&&(u.sessionPresent=!0),u.returnCode=t[i++];break;case 3:var p=a>>1&3,g=f(t,i),m=y(t,i+=2,g);i+=g,p>0&&(u.messageIdentifier=f(t,i),i+=2);var v=new e.Message(t.subarray(i,h));1&~a||(v.retained=!0),8&~a||(v.duplicate=!0),v.qos=p,v.destinationName=m,u.payloadMessage=v;break;case 4:case 5:case 6:case 7:case 11:u.messageIdentifier=f(t,i);break;case 9:u.messageIdentifier=f(t,i),i+=2,u.returnCode=t.subarray(i,h)}return[u,h]}function p(e,t,i){return t[i++]=e>>8,t[i++]=e%256,i}function g(e,t,i,n){return v(e,i,n=p(t,i,n)),n+t}function f(e,t){return 256*e[t]+e[t+1]}function m(e){for(var t=0,i=0;i<e.length;i++){var n=e.charCodeAt(i);n>2047?(55296<=n&&n<=56319&&(i++,t++),t+=3):n>127?t+=2:t++}return t}function v(e,t,i){for(var n=i,s=0;s<e.length;s++){var r=e.charCodeAt(s);if(55296<=r&&r<=56319){var a=e.charCodeAt(++s);if(isNaN(a))throw new Error(l(o.MALFORMED_UNICODE,[r,a]));r=a-56320+(r-55296<<10)+65536}r<=127?t[n++]=r:r<=2047?(t[n++]=r>>6&31|192,t[n++]=63&r|128):r<=65535?(t[n++]=r>>12&15|224,t[n++]=r>>6&63|128,t[n++]=63&r|128):(t[n++]=r>>18&7|240,t[n++]=r>>12&63|128,t[n++]=r>>6&63|128,t[n++]=63&r|128)}return t}function y(e,t,i){for(var n,s="",r=t;r<t+i;){var a=e[r++];if(a<128)n=a;else{var c=e[r++]-128;if(c<0)throw new Error(l(o.MALFORMED_UTF,[a.toString(16),c.toString(16),""]));if(a<224)n=64*(a-192)+c;else{var h=e[r++]-128;if(h<0)throw new Error(l(o.MALFORMED_UTF,[a.toString(16),c.toString(16),h.toString(16)]));if(a<240)n=4096*(a-224)+64*c+h;else{var d=e[r++]-128;if(d<0)throw new Error(l(o.MALFORMED_UTF,[a.toString(16),c.toString(16),h.toString(16),d.toString(16)]));if(!(a<248))throw new Error(l(o.MALFORMED_UTF,[a.toString(16),c.toString(16),h.toString(16),d.toString(16)]));n=262144*(a-240)+4096*c+64*h+d}}}n>65535&&(n-=65536,s+=String.fromCharCode(55296+(n>>10)),n=56320+(1023&n)),s+=String.fromCharCode(n)}return s}d.prototype.encode=function(){var e,t=(15&this.type)<<4,i=0,n=[],s=0;switch(void 0!==this.messageIdentifier&&(i+=2),this.type){case 1:switch(this.mqttVersion){case 3:i+=c.length+3;break;case 4:i+=h.length+3}i+=m(this.clientId)+2,void 0!==this.willMessage&&(i+=m(this.willMessage.destinationName)+2,(e=this.willMessage.payloadBytes)instanceof Uint8Array||(e=new Uint8Array(o)),i+=e.byteLength+2),void 0!==this.userName&&(i+=m(this.userName)+2),void 0!==this.password&&(i+=m(this.password)+2);break;case 8:t|=2;for(var r=0;r<this.topics.length;r++)n[r]=m(this.topics[r]),i+=n[r]+2;i+=this.requestedQos.length;break;case 10:for(t|=2,r=0;r<this.topics.length;r++)n[r]=m(this.topics[r]),i+=n[r]+2;break;case 6:t|=2;break;case 3:this.payloadMessage.duplicate&&(t|=8),t=t|=this.payloadMessage.qos<<1,this.payloadMessage.retained&&(t|=1),i+=(s=m(this.payloadMessage.destinationName))+2;var o=this.payloadMessage.payloadBytes;i+=o.byteLength,o instanceof ArrayBuffer?o=new Uint8Array(o):o instanceof Uint8Array||(o=new Uint8Array(o.buffer))}var a=function(e){var t=new Array(1),i=0;do{var n=e%128;(e>>=7)>0&&(n|=128),t[i++]=n}while(e>0&&i<4);return t}(i),l=a.length+1,d=new ArrayBuffer(i+l),u=new Uint8Array(d);if(u[0]=t,u.set(a,1),3==this.type)l=g(this.payloadMessage.destinationName,s,u,l);else if(1==this.type){switch(this.mqttVersion){case 3:u.set(c,l),l+=c.length;break;case 4:u.set(h,l),l+=h.length}var f=0;this.cleanSession&&(f=2),void 0!==this.willMessage&&(f|=4,f|=this.willMessage.qos<<3,this.willMessage.retained&&(f|=32)),void 0!==this.userName&&(f|=128),void 0!==this.password&&(f|=64),u[l++]=f,l=p(this.keepAliveInterval,u,l)}switch(void 0!==this.messageIdentifier&&(l=p(this.messageIdentifier,u,l)),this.type){case 1:l=g(this.clientId,m(this.clientId),u,l),void 0!==this.willMessage&&(l=g(this.willMessage.destinationName,m(this.willMessage.destinationName),u,l),l=p(e.byteLength,u,l),u.set(e,l),l+=e.byteLength),void 0!==this.userName&&(l=g(this.userName,m(this.userName),u,l)),void 0!==this.password&&(l=g(this.password,m(this.password),u,l));break;case 3:u.set(o,l);break;case 8:for(r=0;r<this.topics.length;r++)l=g(this.topics[r],n[r],u,l),u[l++]=this.requestedQos[r];break;case 10:for(r=0;r<this.topics.length;r++)l=g(this.topics[r],n[r],u,l)}return d};var C=function(e,t){this._client=e,this._keepAliveInterval=1e3*t,this.isReset=!1;var i=new d(12).encode(),n=function(e){return function(){return s.apply(e)}},s=function(){this.isReset?(this.isReset=!1,this._client._trace("Pinger.doPing","send PINGREQ"),this._client.socket.send(i),this.timeout=setTimeout(n(this),this._keepAliveInterval)):(this._client._trace("Pinger.doPing","Timed out"),this._client._disconnected(o.PING_TIMEOUT.code,l(o.PING_TIMEOUT)))};this.reset=function(){this.isReset=!0,clearTimeout(this.timeout),this._keepAliveInterval>0&&(this.timeout=setTimeout(n(this),this._keepAliveInterval))},this.cancel=function(){clearTimeout(this.timeout)}},b=function(e,t,i,n){t||(t=30),this.timeout=setTimeout(function(e,t,i){return function(){return e.apply(t,i)}}(i,e,n),1e3*t),this.cancel=function(){clearTimeout(this.timeout)}},S=function(e,i,s,r,a){if(!("WebSocket"in t)||null===t.WebSocket)throw new Error(l(o.UNSUPPORTED,["WebSocket"]));if(!("ArrayBuffer"in t)||null===t.ArrayBuffer)throw new Error(l(o.UNSUPPORTED,["ArrayBuffer"]));for(var c in this._trace("Paho.Client",e,i,s,r,a),this.host=i,this.port=s,this.path=r,this.uri=e,this.clientId=a,this._wsuri=null,this._localKey=i+":"+s+("/mqtt"!=r?":"+r:"")+":"+a+":",this._msg_queue=[],this._buffered_msg_queue=[],this._sentMessages={},this._receivedMessages={},this._notify_msg_sent={},this._message_identifier=1,this._sequence=0,n)0!==c.indexOf("Sent:"+this._localKey)&&0!==c.indexOf("Received:"+this._localKey)||this.restore(c)};S.prototype.host=null,S.prototype.port=null,S.prototype.path=null,S.prototype.uri=null,S.prototype.clientId=null,S.prototype.socket=null,S.prototype.connected=!1,S.prototype.maxMessageIdentifier=65536,S.prototype.connectOptions=null,S.prototype.hostIndex=null,S.prototype.onConnected=null,S.prototype.onConnectionLost=null,S.prototype.onMessageDelivered=null,S.prototype.onMessageArrived=null,S.prototype.traceFunction=null,S.prototype._msg_queue=null,S.prototype._buffered_msg_queue=null,S.prototype._connectTimeout=null,S.prototype.sendPinger=null,S.prototype.receivePinger=null,S.prototype._reconnectInterval=1,S.prototype._reconnecting=!1,S.prototype._reconnectTimeout=null,S.prototype.disconnectedPublishing=!1,S.prototype.disconnectedBufferSize=5e3,S.prototype.receiveBuffer=null,S.prototype._traceBuffer=null,S.prototype._MAX_TRACE_ENTRIES=100,S.prototype.connect=function(e){var t=this._traceMask(e,"password");if(this._trace("Client.connect",t,this.socket,this.connected),this.connected)throw new Error(l(o.INVALID_STATE,["already connected"]));if(this.socket)throw new Error(l(o.INVALID_STATE,["already connected"]));this._reconnecting&&(this._reconnectTimeout.cancel(),this._reconnectTimeout=null,this._reconnecting=!1),this.connectOptions=e,this._reconnectInterval=1,this._reconnecting=!1,e.uris?(this.hostIndex=0,this._doConnect(e.uris[0])):this._doConnect(this.uri)},S.prototype.subscribe=function(e,t){if(this._trace("Client.subscribe",e,t),!this.connected)throw new Error(l(o.INVALID_STATE,["not connected"]));var i=new d(8);i.topics=[e],void 0!==t.qos?i.requestedQos=[t.qos]:i.requestedQos=[0],t.onSuccess&&(i.onSuccess=function(e){t.onSuccess({invocationContext:t.invocationContext,grantedQos:e})}),t.onFailure&&(i.onFailure=function(e){t.onFailure({invocationContext:t.invocationContext,errorCode:e,errorMessage:l(e)})}),t.timeout&&(i.timeOut=new b(this,t.timeout,t.onFailure,[{invocationContext:t.invocationContext,errorCode:o.SUBSCRIBE_TIMEOUT.code,errorMessage:l(o.SUBSCRIBE_TIMEOUT)}])),this._requires_ack(i),this._schedule_message(i)},S.prototype.unsubscribe=function(e,t){if(this._trace("Client.unsubscribe",e,t),!this.connected)throw new Error(l(o.INVALID_STATE,["not connected"]));var i=new d(10);i.topics=[e],t.onSuccess&&(i.callback=function(){t.onSuccess({invocationContext:t.invocationContext})}),t.timeout&&(i.timeOut=new b(this,t.timeout,t.onFailure,[{invocationContext:t.invocationContext,errorCode:o.UNSUBSCRIBE_TIMEOUT.code,errorMessage:l(o.UNSUBSCRIBE_TIMEOUT)}])),this._requires_ack(i),this._schedule_message(i)},S.prototype.send=function(e){this._trace("Client.send",e);var t=new d(3);if(t.payloadMessage=e,this.connected)e.qos>0?this._requires_ack(t):this.onMessageDelivered&&(this._notify_msg_sent[t]=this.onMessageDelivered(t.payloadMessage)),this._schedule_message(t);else{if(!this._reconnecting||!this.disconnectedPublishing)throw new Error(l(o.INVALID_STATE,["not connected"]));if(Object.keys(this._sentMessages).length+this._buffered_msg_queue.length>this.disconnectedBufferSize)throw new Error(l(o.BUFFER_FULL,[this.disconnectedBufferSize]));e.qos>0?this._requires_ack(t):(t.sequence=++this._sequence,this._buffered_msg_queue.unshift(t))}},S.prototype.disconnect=function(){if(this._trace("Client.disconnect"),this._reconnecting&&(this._reconnectTimeout.cancel(),this._reconnectTimeout=null,this._reconnecting=!1),!this.socket)throw new Error(l(o.INVALID_STATE,["not connecting or connected"]));var e=new d(14);this._notify_msg_sent[e]=r(this._disconnected,this),this._schedule_message(e)},S.prototype.getTraceLog=function(){if(null!==this._traceBuffer){for(var e in this._trace("Client.getTraceLog",new Date),this._trace("Client.getTraceLog in flight messages",this._sentMessages.length),this._sentMessages)this._trace("_sentMessages ",e,this._sentMessages[e]);for(var e in this._receivedMessages)this._trace("_receivedMessages ",e,this._receivedMessages[e]);return this._traceBuffer}},S.prototype.startTrace=function(){null===this._traceBuffer&&(this._traceBuffer=[]),this._trace("Client.startTrace",new Date,"@VERSION@-@BUILDLEVEL@")},S.prototype.stopTrace=function(){delete this._traceBuffer},S.prototype._doConnect=function(e){if(this.connectOptions.useSSL){var t=e.split(":");t[0]="wss",e=t.join(":")}this._wsuri=e,this.connected=!1,this.connectOptions.mqttVersion<4?this.socket=new WebSocket(e,["mqttv3.1"]):this.socket=new WebSocket(e,["mqtt"]),this.socket.binaryType="arraybuffer",this.socket.onopen=r(this._on_socket_open,this),this.socket.onmessage=r(this._on_socket_message,this),this.socket.onerror=r(this._on_socket_error,this),this.socket.onclose=r(this._on_socket_close,this),this.sendPinger=new C(this,this.connectOptions.keepAliveInterval),this.receivePinger=new C(this,this.connectOptions.keepAliveInterval),this._connectTimeout&&(this._connectTimeout.cancel(),this._connectTimeout=null),this._connectTimeout=new b(this,this.connectOptions.timeout,this._disconnected,[o.CONNECT_TIMEOUT.code,l(o.CONNECT_TIMEOUT)])},S.prototype._schedule_message=function(e){this._msg_queue.unshift(e),this.connected&&this._process_queue()},S.prototype.store=function(e,t){var i={type:t.type,messageIdentifier:t.messageIdentifier,version:1};if(3!==t.type)throw Error(l(o.INVALID_STORED_DATA,[e+this._localKey+t.messageIdentifier,i]));t.pubRecReceived&&(i.pubRecReceived=!0),i.payloadMessage={};for(var s="",r=t.payloadMessage.payloadBytes,a=0;a<r.length;a++)r[a]<=15?s=s+"0"+r[a].toString(16):s+=r[a].toString(16);i.payloadMessage.payloadHex=s,i.payloadMessage.qos=t.payloadMessage.qos,i.payloadMessage.destinationName=t.payloadMessage.destinationName,t.payloadMessage.duplicate&&(i.payloadMessage.duplicate=!0),t.payloadMessage.retained&&(i.payloadMessage.retained=!0),0===e.indexOf("Sent:")&&(void 0===t.sequence&&(t.sequence=++this._sequence),i.sequence=t.sequence),n.setItem(e+this._localKey+t.messageIdentifier,JSON.stringify(i))},S.prototype.restore=function(t){var i=n.getItem(t),s=JSON.parse(i),r=new d(s.type,s);if(3!==s.type)throw Error(l(o.INVALID_STORED_DATA,[t,i]));for(var a=s.payloadMessage.payloadHex,c=new ArrayBuffer(a.length/2),h=new Uint8Array(c),u=0;a.length>=2;){var p=parseInt(a.substring(0,2),16);a=a.substring(2,a.length),h[u++]=p}var g=new e.Message(h);g.qos=s.payloadMessage.qos,g.destinationName=s.payloadMessage.destinationName,s.payloadMessage.duplicate&&(g.duplicate=!0),s.payloadMessage.retained&&(g.retained=!0),r.payloadMessage=g,0===t.indexOf("Sent:"+this._localKey)?(r.payloadMessage.duplicate=!0,this._sentMessages[r.messageIdentifier]=r):0===t.indexOf("Received:"+this._localKey)&&(this._receivedMessages[r.messageIdentifier]=r)},S.prototype._process_queue=function(){for(var e=null;e=this._msg_queue.pop();)this._socket_send(e),this._notify_msg_sent[e]&&(this._notify_msg_sent[e](),delete this._notify_msg_sent[e])},S.prototype._requires_ack=function(e){var t=Object.keys(this._sentMessages).length;if(t>this.maxMessageIdentifier)throw Error("Too many messages:"+t);for(;void 0!==this._sentMessages[this._message_identifier];)this._message_identifier++;e.messageIdentifier=this._message_identifier,this._sentMessages[e.messageIdentifier]=e,3===e.type&&this.store("Sent:",e),this._message_identifier===this.maxMessageIdentifier&&(this._message_identifier=1)},S.prototype._on_socket_open=function(){var e=new d(1,this.connectOptions);e.clientId=this.clientId,this._socket_send(e)},S.prototype._on_socket_message=function(e){this._trace("Client._on_socket_message",e.data);for(var t=this._deframeMessages(e.data),i=0;i<t.length;i+=1)this._handleMessage(t[i])},S.prototype._deframeMessages=function(e){var t=new Uint8Array(e),i=[];if(this.receiveBuffer){var n=new Uint8Array(this.receiveBuffer.length+t.length);n.set(this.receiveBuffer),n.set(t,this.receiveBuffer.length),t=n,delete this.receiveBuffer}try{for(var s=0;s<t.length;){var r=u(t,s),a=r[0];if(s=r[1],null===a)break;i.push(a)}s<t.length&&(this.receiveBuffer=t.subarray(s))}catch(e){var c="undefined"==e.hasOwnProperty("stack")?e.stack.toString():"No Error Stack Available";return void this._disconnected(o.INTERNAL_ERROR.code,l(o.INTERNAL_ERROR,[e.message,c]))}return i},S.prototype._handleMessage=function(e){this._trace("Client._handleMessage",e);try{switch(e.type){case 2:if(this._connectTimeout.cancel(),this._reconnectTimeout&&this._reconnectTimeout.cancel(),this.connectOptions.cleanSession){for(var t in this._sentMessages){var i=this._sentMessages[t];n.removeItem("Sent:"+this._localKey+i.messageIdentifier)}for(var t in this._sentMessages={},this._receivedMessages){var s=this._receivedMessages[t];n.removeItem("Received:"+this._localKey+s.messageIdentifier)}this._receivedMessages={}}if(0!==e.returnCode){this._disconnected(o.CONNACK_RETURNCODE.code,l(o.CONNACK_RETURNCODE,[e.returnCode,a[e.returnCode]]));break}this.connected=!0,this.connectOptions.uris&&(this.hostIndex=this.connectOptions.uris.length);var r=[];for(var c in this._sentMessages)this._sentMessages.hasOwnProperty(c)&&r.push(this._sentMessages[c]);if(this._buffered_msg_queue.length>0)for(var h=null;h=this._buffered_msg_queue.pop();)r.push(h),this.onMessageDelivered&&(this._notify_msg_sent[h]=this.onMessageDelivered(h.payloadMessage));r=r.sort(function(e,t){return e.sequence-t.sequence});for(var u=0,p=r.length;u<p;u++)if(3==(i=r[u]).type&&i.pubRecReceived){var g=new d(6,{messageIdentifier:i.messageIdentifier});this._schedule_message(g)}else this._schedule_message(i);this.connectOptions.onSuccess&&this.connectOptions.onSuccess({invocationContext:this.connectOptions.invocationContext});var f=!1;this._reconnecting&&(f=!0,this._reconnectInterval=1,this._reconnecting=!1),this._connected(f,this._wsuri),this._process_queue();break;case 3:this._receivePublish(e);break;case 4:(i=this._sentMessages[e.messageIdentifier])&&(delete this._sentMessages[e.messageIdentifier],n.removeItem("Sent:"+this._localKey+e.messageIdentifier),this.onMessageDelivered&&this.onMessageDelivered(i.payloadMessage));break;case 5:(i=this._sentMessages[e.messageIdentifier])&&(i.pubRecReceived=!0,g=new d(6,{messageIdentifier:e.messageIdentifier}),this.store("Sent:",i),this._schedule_message(g));break;case 6:s=this._receivedMessages[e.messageIdentifier],n.removeItem("Received:"+this._localKey+e.messageIdentifier),s&&(this._receiveMessage(s),delete this._receivedMessages[e.messageIdentifier]);var m=new d(7,{messageIdentifier:e.messageIdentifier});this._schedule_message(m);break;case 7:i=this._sentMessages[e.messageIdentifier],delete this._sentMessages[e.messageIdentifier],n.removeItem("Sent:"+this._localKey+e.messageIdentifier),this.onMessageDelivered&&this.onMessageDelivered(i.payloadMessage);break;case 9:(i=this._sentMessages[e.messageIdentifier])&&(i.timeOut&&i.timeOut.cancel(),128===e.returnCode[0]?i.onFailure&&i.onFailure(e.returnCode):i.onSuccess&&i.onSuccess(e.returnCode),delete this._sentMessages[e.messageIdentifier]);break;case 11:(i=this._sentMessages[e.messageIdentifier])&&(i.timeOut&&i.timeOut.cancel(),i.callback&&i.callback(),delete this._sentMessages[e.messageIdentifier]);break;case 13:this.sendPinger.reset();break;default:this._disconnected(o.INVALID_MQTT_MESSAGE_TYPE.code,l(o.INVALID_MQTT_MESSAGE_TYPE,[e.type]))}}catch(e){var v="undefined"==e.hasOwnProperty("stack")?e.stack.toString():"No Error Stack Available";return void this._disconnected(o.INTERNAL_ERROR.code,l(o.INTERNAL_ERROR,[e.message,v]))}},S.prototype._on_socket_error=function(e){this._reconnecting||this._disconnected(o.SOCKET_ERROR.code,l(o.SOCKET_ERROR,[e.data]))},S.prototype._on_socket_close=function(){this._reconnecting||this._disconnected(o.SOCKET_CLOSE.code,l(o.SOCKET_CLOSE))},S.prototype._socket_send=function(e){if(1==e.type){var t=this._traceMask(e,"password");this._trace("Client._socket_send",t)}else this._trace("Client._socket_send",e);this.socket.send(e.encode()),this.sendPinger.reset()},S.prototype._receivePublish=function(e){switch(e.payloadMessage.qos){case"undefined":case 0:this._receiveMessage(e);break;case 1:var t=new d(4,{messageIdentifier:e.messageIdentifier});this._schedule_message(t),this._receiveMessage(e);break;case 2:this._receivedMessages[e.messageIdentifier]=e,this.store("Received:",e);var i=new d(5,{messageIdentifier:e.messageIdentifier});this._schedule_message(i);break;default:throw Error("Invaild qos="+e.payloadMessage.qos)}},S.prototype._receiveMessage=function(e){this.onMessageArrived&&this.onMessageArrived(e.payloadMessage)},S.prototype._connected=function(e,t){this.onConnected&&this.onConnected(e,t)},S.prototype._reconnect=function(){this._trace("Client._reconnect"),this.connected||(this._reconnecting=!0,this.sendPinger.cancel(),this.receivePinger.cancel(),this._reconnectInterval<128&&(this._reconnectInterval=2*this._reconnectInterval),this.connectOptions.uris?(this.hostIndex=0,this._doConnect(this.connectOptions.uris[0])):this._doConnect(this.uri))},S.prototype._disconnected=function(e,t){if(this._trace("Client._disconnected",e,t),void 0!==e&&this._reconnecting)this._reconnectTimeout=new b(this,this._reconnectInterval,this._reconnect);else if(this.sendPinger.cancel(),this.receivePinger.cancel(),this._connectTimeout&&(this._connectTimeout.cancel(),this._connectTimeout=null),this._msg_queue=[],this._buffered_msg_queue=[],this._notify_msg_sent={},this.socket&&(this.socket.onopen=null,this.socket.onmessage=null,this.socket.onerror=null,this.socket.onclose=null,1===this.socket.readyState&&this.socket.close(),delete this.socket),this.connectOptions.uris&&this.hostIndex<this.connectOptions.uris.length-1)this.hostIndex++,this._doConnect(this.connectOptions.uris[this.hostIndex]);else if(void 0===e&&(e=o.OK.code,t=l(o.OK)),this.connected){if(this.connected=!1,this.onConnectionLost&&this.onConnectionLost({errorCode:e,errorMessage:t,reconnect:this.connectOptions.reconnect,uri:this._wsuri}),e!==o.OK.code&&this.connectOptions.reconnect)return this._reconnectInterval=1,void this._reconnect()}else 4===this.connectOptions.mqttVersion&&!1===this.connectOptions.mqttVersionExplicit?(this._trace("Failed to connect V4, dropping back to V3"),this.connectOptions.mqttVersion=3,this.connectOptions.uris?(this.hostIndex=0,this._doConnect(this.connectOptions.uris[0])):this._doConnect(this.uri)):this.connectOptions.onFailure&&this.connectOptions.onFailure({invocationContext:this.connectOptions.invocationContext,errorCode:e,errorMessage:t})},S.prototype._trace=function(){if(this.traceFunction){var e=Array.prototype.slice.call(arguments);for(var t in e)void 0!==e[t]&&e.splice(t,1,JSON.stringify(e[t]));var i=e.join("");this.traceFunction({severity:"Debug",message:i})}if(null!==this._traceBuffer){t=0;for(var n=arguments.length;t<n;t++)this._traceBuffer.length==this._MAX_TRACE_ENTRIES&&this._traceBuffer.shift(),0===t||void 0===arguments[t]?this._traceBuffer.push(arguments[t]):this._traceBuffer.push("  "+JSON.stringify(arguments[t]))}},S.prototype._traceMask=function(e,t){var i={};for(var n in e)e.hasOwnProperty(n)&&(i[n]=n==t?"******":e[n]);return i};var w=function(e){var t,i;if(!("string"==typeof e||e instanceof ArrayBuffer||ArrayBuffer.isView(e)&&!(e instanceof DataView)))throw l(o.INVALID_ARGUMENT,[e,"newPayload"]);t=e;var n=0,s=!1,r=!1;Object.defineProperties(this,{payloadString:{enumerable:!0,get:function(){return"string"==typeof t?t:y(t,0,t.length)}},payloadBytes:{enumerable:!0,get:function(){if("string"==typeof t){var e=new ArrayBuffer(m(t)),i=new Uint8Array(e);return v(t,i,0),i}return t}},destinationName:{enumerable:!0,get:function(){return i},set:function(e){if("string"!=typeof e)throw new Error(l(o.INVALID_ARGUMENT,[e,"newDestinationName"]));i=e}},qos:{enumerable:!0,get:function(){return n},set:function(e){if(0!==e&&1!==e&&2!==e)throw new Error("Invalid argument:"+e);n=e}},retained:{enumerable:!0,get:function(){return s},set:function(e){if("boolean"!=typeof e)throw new Error(l(o.INVALID_ARGUMENT,[e,"newRetained"]));s=e}},topic:{enumerable:!0,get:function(){return i},set:function(e){i=e}},duplicate:{enumerable:!0,get:function(){return r},set:function(e){r=e}}})};return{Client:function(e,t,i,n){var r;if("string"!=typeof e)throw new Error(l(o.INVALID_TYPE,[typeof e,"host"]));if(2==arguments.length){n=t;var a=(r=e).match(/^(wss?):\/\/((\[(.+)\])|([^\/]+?))(:(\d+))?(\/.*)$/);if(!a)throw new Error(l(o.INVALID_ARGUMENT,[e,"host"]));e=a[4]||a[2],t=parseInt(a[7]),i=a[8]}else{if(3==arguments.length&&(n=i,i="/mqtt"),"number"!=typeof t||t<0)throw new Error(l(o.INVALID_TYPE,[typeof t,"port"]));if("string"!=typeof i)throw new Error(l(o.INVALID_TYPE,[typeof i,"path"]));var c=-1!==e.indexOf(":")&&"["!==e.slice(0,1)&&"]"!==e.slice(-1);r="ws://"+(c?"["+e+"]":e)+":"+t+i}for(var h=0,d=0;d<n.length;d++){var u=n.charCodeAt(d);55296<=u&&u<=56319&&d++,h++}if("string"!=typeof n||h>65535)throw new Error(l(o.INVALID_ARGUMENT,[n,"clientId"]));var p=new S(r,e,t,i,n);Object.defineProperties(this,{host:{get:function(){return e},set:function(){throw new Error(l(o.UNSUPPORTED_OPERATION))}},port:{get:function(){return t},set:function(){throw new Error(l(o.UNSUPPORTED_OPERATION))}},path:{get:function(){return i},set:function(){throw new Error(l(o.UNSUPPORTED_OPERATION))}},uri:{get:function(){return r},set:function(){throw new Error(l(o.UNSUPPORTED_OPERATION))}},clientId:{get:function(){return p.clientId},set:function(){throw new Error(l(o.UNSUPPORTED_OPERATION))}},onConnected:{get:function(){return p.onConnected},set:function(e){if("function"!=typeof e)throw new Error(l(o.INVALID_TYPE,[typeof e,"onConnected"]));p.onConnected=e}},disconnectedPublishing:{get:function(){return p.disconnectedPublishing},set:function(e){p.disconnectedPublishing=e}},disconnectedBufferSize:{get:function(){return p.disconnectedBufferSize},set:function(e){p.disconnectedBufferSize=e}},onConnectionLost:{get:function(){return p.onConnectionLost},set:function(e){if("function"!=typeof e)throw new Error(l(o.INVALID_TYPE,[typeof e,"onConnectionLost"]));p.onConnectionLost=e}},onMessageDelivered:{get:function(){return p.onMessageDelivered},set:function(e){if("function"!=typeof e)throw new Error(l(o.INVALID_TYPE,[typeof e,"onMessageDelivered"]));p.onMessageDelivered=e}},onMessageArrived:{get:function(){return p.onMessageArrived},set:function(e){if("function"!=typeof e)throw new Error(l(o.INVALID_TYPE,[typeof e,"onMessageArrived"]));p.onMessageArrived=e}},trace:{get:function(){return p.traceFunction},set:function(e){if("function"!=typeof e)throw new Error(l(o.INVALID_TYPE,[typeof e,"onTrace"]));p.traceFunction=e}}}),this.connect=function(e){if(s(e=e||{},{timeout:"number",userName:"string",password:"string",willMessage:"object",keepAliveInterval:"number",cleanSession:"boolean",useSSL:"boolean",invocationContext:"object",onSuccess:"function",onFailure:"function",hosts:"object",ports:"object",reconnect:"boolean",mqttVersion:"number",mqttVersionExplicit:"boolean",uris:"object"}),void 0===e.keepAliveInterval&&(e.keepAliveInterval=60),e.mqttVersion>4||e.mqttVersion<3)throw new Error(l(o.INVALID_ARGUMENT,[e.mqttVersion,"connectOptions.mqttVersion"]));if(void 0===e.mqttVersion?(e.mqttVersionExplicit=!1,e.mqttVersion=4):e.mqttVersionExplicit=!0,void 0!==e.password&&void 0===e.userName)throw new Error(l(o.INVALID_ARGUMENT,[e.password,"connectOptions.password"]));if(e.willMessage){if(!(e.willMessage instanceof w))throw new Error(l(o.INVALID_TYPE,[e.willMessage,"connectOptions.willMessage"]));if(e.willMessage.stringPayload=null,void 0===e.willMessage.destinationName)throw new Error(l(o.INVALID_TYPE,[typeof e.willMessage.destinationName,"connectOptions.willMessage.destinationName"]))}if(void 0===e.cleanSession&&(e.cleanSession=!0),e.hosts){if(!(e.hosts instanceof Array))throw new Error(l(o.INVALID_ARGUMENT,[e.hosts,"connectOptions.hosts"]));if(e.hosts.length<1)throw new Error(l(o.INVALID_ARGUMENT,[e.hosts,"connectOptions.hosts"]));for(var t=!1,n=0;n<e.hosts.length;n++){if("string"!=typeof e.hosts[n])throw new Error(l(o.INVALID_TYPE,[typeof e.hosts[n],"connectOptions.hosts["+n+"]"]));if(/^(wss?):\/\/((\[(.+)\])|([^\/]+?))(:(\d+))?(\/.*)$/.test(e.hosts[n])){if(0===n)t=!0;else if(!t)throw new Error(l(o.INVALID_ARGUMENT,[e.hosts[n],"connectOptions.hosts["+n+"]"]))}else if(t)throw new Error(l(o.INVALID_ARGUMENT,[e.hosts[n],"connectOptions.hosts["+n+"]"]))}if(t)e.uris=e.hosts;else{if(!e.ports)throw new Error(l(o.INVALID_ARGUMENT,[e.ports,"connectOptions.ports"]));if(!(e.ports instanceof Array))throw new Error(l(o.INVALID_ARGUMENT,[e.ports,"connectOptions.ports"]));if(e.hosts.length!==e.ports.length)throw new Error(l(o.INVALID_ARGUMENT,[e.ports,"connectOptions.ports"]));for(e.uris=[],n=0;n<e.hosts.length;n++){if("number"!=typeof e.ports[n]||e.ports[n]<0)throw new Error(l(o.INVALID_TYPE,[typeof e.ports[n],"connectOptions.ports["+n+"]"]));var a=e.hosts[n],c=e.ports[n],h=-1!==a.indexOf(":");r="ws://"+(h?"["+a+"]":a)+":"+c+i,e.uris.push(r)}}}p.connect(e)},this.subscribe=function(e,t){if("string"!=typeof e)throw new Error("Invalid argument:"+e);if(s(t=t||{},{qos:"number",invocationContext:"object",onSuccess:"function",onFailure:"function",timeout:"number"}),t.timeout&&!t.onFailure)throw new Error("subscribeOptions.timeout specified with no onFailure callback.");if(void 0!==t.qos&&0!==t.qos&&1!==t.qos&&2!==t.qos)throw new Error(l(o.INVALID_ARGUMENT,[t.qos,"subscribeOptions.qos"]));p.subscribe(e,t)},this.unsubscribe=function(e,t){if("string"!=typeof e)throw new Error("Invalid argument:"+e);if(s(t=t||{},{invocationContext:"object",onSuccess:"function",onFailure:"function",timeout:"number"}),t.timeout&&!t.onFailure)throw new Error("unsubscribeOptions.timeout specified with no onFailure callback.");p.unsubscribe(e,t)},this.send=function(e,t,i,n){var s;if(0===arguments.length)throw new Error("Invalid argument.length");if(1==arguments.length){if(!(e instanceof w)&&"string"!=typeof e)throw new Error("Invalid argument:"+typeof e);if(void 0===(s=e).destinationName)throw new Error(l(o.INVALID_ARGUMENT,[s.destinationName,"Message.destinationName"]));p.send(s)}else(s=new w(t)).destinationName=e,arguments.length>=3&&(s.qos=i),arguments.length>=4&&(s.retained=n),p.send(s)},this.publish=function(e,t,i,n){var s;if(0===arguments.length)throw new Error("Invalid argument.length");if(1==arguments.length){if(!(e instanceof w)&&"string"!=typeof e)throw new Error("Invalid argument:"+typeof e);if(void 0===(s=e).destinationName)throw new Error(l(o.INVALID_ARGUMENT,[s.destinationName,"Message.destinationName"]));p.send(s)}else(s=new w(t)).destinationName=e,arguments.length>=3&&(s.qos=i),arguments.length>=4&&(s.retained=n),p.send(s)},this.disconnect=function(){p.disconnect()},this.getTraceLog=function(){return p.getTraceLog()},this.startTrace=function(){p.startTrace()},this.stopTrace=function(){p.stopTrace()},this.isConnected=function(){return p.connected}},Message:w}}(void 0!==i.g?i.g:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{});return e},e.exports=n()},16288(e,t,i){e.exports=i(58158)},359(e,t,i){"use strict";var n=i(34309),s=i(46503),r=i(30989),o=i(43029),a=i(29728),l=i(41923),c=i(95367),h=i(60700),d=i(70304),u=i(34690);e.exports=function(e){return new Promise(function(t,i){var p,g=e.data,f=e.headers,m=e.responseType;function v(){e.cancelToken&&e.cancelToken.unsubscribe(p),e.signal&&e.signal.removeEventListener("abort",p)}n.isFormData(g)&&delete f["Content-Type"];var y=new XMLHttpRequest;if(e.auth){var C=e.auth.username||"",b=e.auth.password?unescape(encodeURIComponent(e.auth.password)):"";f.Authorization="Basic "+btoa(C+":"+b)}var S=a(e.baseURL,e.url);function w(){if(y){var n="getAllResponseHeaders"in y?l(y.getAllResponseHeaders()):null,r={data:m&&"text"!==m&&"json"!==m?y.response:y.responseText,status:y.status,statusText:y.statusText,headers:n,config:e,request:y};s(function(e){t(e),v()},function(e){i(e),v()},r),y=null}}if(y.open(e.method.toUpperCase(),o(S,e.params,e.paramsSerializer),!0),y.timeout=e.timeout,"onloadend"in y?y.onloadend=w:y.onreadystatechange=function(){y&&4===y.readyState&&(0!==y.status||y.responseURL&&0===y.responseURL.indexOf("file:"))&&setTimeout(w)},y.onabort=function(){y&&(i(h("Request aborted",e,"ECONNABORTED",y)),y=null)},y.onerror=function(){i(h("Network Error",e,null,y)),y=null},y.ontimeout=function(){var t=e.timeout?"timeout of "+e.timeout+"ms exceeded":"timeout exceeded",n=e.transitional||d.transitional;e.timeoutErrorMessage&&(t=e.timeoutErrorMessage),i(h(t,e,n.clarifyTimeoutError?"ETIMEDOUT":"ECONNABORTED",y)),y=null},n.isStandardBrowserEnv()){var x=(e.withCredentials||c(S))&&e.xsrfCookieName?r.read(e.xsrfCookieName):void 0;x&&(f[e.xsrfHeaderName]=x)}"setRequestHeader"in y&&n.forEach(f,function(e,t){void 0===g&&"content-type"===t.toLowerCase()?delete f[t]:y.setRequestHeader(t,e)}),n.isUndefined(e.withCredentials)||(y.withCredentials=!!e.withCredentials),m&&"json"!==m&&(y.responseType=e.responseType),"function"==typeof e.onDownloadProgress&&y.addEventListener("progress",e.onDownloadProgress),"function"==typeof e.onUploadProgress&&y.upload&&y.upload.addEventListener("progress",e.onUploadProgress),(e.cancelToken||e.signal)&&(p=function(e){y&&(i(!e||e&&e.type?new u("canceled"):e),y.abort(),y=null)},e.cancelToken&&e.cancelToken.subscribe(p),e.signal&&(e.signal.aborted?p():e.signal.addEventListener("abort",p))),g||(g=null),y.send(g)})}},58158(e,t,i){"use strict";var n=i(34309),s=i(73059),r=i(62484),o=i(80404),a=function e(t){var i=new r(t),a=s(r.prototype.request,i);return n.extend(a,r.prototype,i),n.extend(a,i),a.create=function(i){return e(o(t,i))},a}(i(70304));a.Axios=r,a.Cancel=i(34690),a.CancelToken=i(81471),a.isCancel=i(32493),a.VERSION=i(13846).version,a.all=function(e){return Promise.all(e)},a.spread=i(7547),a.isAxiosError=i(68620),e.exports=a,e.exports.default=a},34690(e){"use strict";function t(e){this.message=e}t.prototype.toString=function(){return"Cancel"+(this.message?": "+this.message:"")},t.prototype.__CANCEL__=!0,e.exports=t},81471(e,t,i){"use strict";var n=i(34690);function s(e){if("function"!=typeof e)throw new TypeError("executor must be a function.");var t;this.promise=new Promise(function(e){t=e});var i=this;this.promise.then(function(e){if(i._listeners){var t,n=i._listeners.length;for(t=0;t<n;t++)i._listeners[t](e);i._listeners=null}}),this.promise.then=function(e){var t,n=new Promise(function(e){i.subscribe(e),t=e}).then(e);return n.cancel=function(){i.unsubscribe(t)},n},e(function(e){i.reason||(i.reason=new n(e),t(i.reason))})}s.prototype.throwIfRequested=function(){if(this.reason)throw this.reason},s.prototype.subscribe=function(e){this.reason?e(this.reason):this._listeners?this._listeners.push(e):this._listeners=[e]},s.prototype.unsubscribe=function(e){if(this._listeners){var t=this._listeners.indexOf(e);-1!==t&&this._listeners.splice(t,1)}},s.source=function(){var e;return{token:new s(function(t){e=t}),cancel:e}},e.exports=s},32493(e){"use strict";e.exports=function(e){return!(!e||!e.__CANCEL__)}},62484(e,t,i){"use strict";var n=i(34309),s=i(43029),r=i(84254),o=i(86037),a=i(80404),l=i(7636),c=l.validators;function h(e){this.defaults=e,this.interceptors={request:new r,response:new r}}h.prototype.request=function(e){"string"==typeof e?(e=arguments[1]||{}).url=arguments[0]:e=e||{},(e=a(this.defaults,e)).method?e.method=e.method.toLowerCase():this.defaults.method?e.method=this.defaults.method.toLowerCase():e.method="get";var t=e.transitional;void 0!==t&&l.assertOptions(t,{silentJSONParsing:c.transitional(c.boolean),forcedJSONParsing:c.transitional(c.boolean),clarifyTimeoutError:c.transitional(c.boolean)},!1);var i=[],n=!0;this.interceptors.request.forEach(function(t){"function"==typeof t.runWhen&&!1===t.runWhen(e)||(n=n&&t.synchronous,i.unshift(t.fulfilled,t.rejected))});var s,r=[];if(this.interceptors.response.forEach(function(e){r.push(e.fulfilled,e.rejected)}),!n){var h=[o,void 0];for(Array.prototype.unshift.apply(h,i),h=h.concat(r),s=Promise.resolve(e);h.length;)s=s.then(h.shift(),h.shift());return s}for(var d=e;i.length;){var u=i.shift(),p=i.shift();try{d=u(d)}catch(e){p(e);break}}try{s=o(d)}catch(e){return Promise.reject(e)}for(;r.length;)s=s.then(r.shift(),r.shift());return s},h.prototype.getUri=function(e){return e=a(this.defaults,e),s(e.url,e.params,e.paramsSerializer).replace(/^\?/,"")},n.forEach(["delete","get","head","options"],function(e){h.prototype[e]=function(t,i){return this.request(a(i||{},{method:e,url:t,data:(i||{}).data}))}}),n.forEach(["post","put","patch"],function(e){h.prototype[e]=function(t,i,n){return this.request(a(n||{},{method:e,url:t,data:i}))}}),e.exports=h},84254(e,t,i){"use strict";var n=i(34309);function s(){this.handlers=[]}s.prototype.use=function(e,t,i){return this.handlers.push({fulfilled:e,rejected:t,synchronous:!!i&&i.synchronous,runWhen:i?i.runWhen:null}),this.handlers.length-1},s.prototype.eject=function(e){this.handlers[e]&&(this.handlers[e]=null)},s.prototype.forEach=function(e){n.forEach(this.handlers,function(t){null!==t&&e(t)})},e.exports=s},29728(e,t,i){"use strict";var n=i(80408),s=i(20773);e.exports=function(e,t){return e&&!n(t)?s(e,t):t}},60700(e,t,i){"use strict";var n=i(74120);e.exports=function(e,t,i,s,r){var o=new Error(e);return n(o,t,i,s,r)}},86037(e,t,i){"use strict";var n=i(34309),s=i(69762),r=i(32493),o=i(70304),a=i(34690);function l(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new a("canceled")}e.exports=function(e){return l(e),e.headers=e.headers||{},e.data=s.call(e,e.data,e.headers,e.transformRequest),e.headers=n.merge(e.headers.common||{},e.headers[e.method]||{},e.headers),n.forEach(["delete","get","head","post","put","patch","common"],function(t){delete e.headers[t]}),(e.adapter||o.adapter)(e).then(function(t){return l(e),t.data=s.call(e,t.data,t.headers,e.transformResponse),t},function(t){return r(t)||(l(e),t&&t.response&&(t.response.data=s.call(e,t.response.data,t.response.headers,e.transformResponse))),Promise.reject(t)})}},74120(e){"use strict";e.exports=function(e,t,i,n,s){return e.config=t,i&&(e.code=i),e.request=n,e.response=s,e.isAxiosError=!0,e.toJSON=function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:this.config,code:this.code,status:this.response&&this.response.status?this.response.status:null}},e}},80404(e,t,i){"use strict";var n=i(34309);e.exports=function(e,t){t=t||{};var i={};function s(e,t){return n.isPlainObject(e)&&n.isPlainObject(t)?n.merge(e,t):n.isPlainObject(t)?n.merge({},t):n.isArray(t)?t.slice():t}function r(i){return n.isUndefined(t[i])?n.isUndefined(e[i])?void 0:s(void 0,e[i]):s(e[i],t[i])}function o(e){if(!n.isUndefined(t[e]))return s(void 0,t[e])}function a(i){return n.isUndefined(t[i])?n.isUndefined(e[i])?void 0:s(void 0,e[i]):s(void 0,t[i])}function l(i){return i in t?s(e[i],t[i]):i in e?s(void 0,e[i]):void 0}var c={url:o,method:o,data:o,baseURL:a,transformRequest:a,transformResponse:a,paramsSerializer:a,timeout:a,timeoutMessage:a,withCredentials:a,adapter:a,responseType:a,xsrfCookieName:a,xsrfHeaderName:a,onUploadProgress:a,onDownloadProgress:a,decompress:a,maxContentLength:a,maxBodyLength:a,transport:a,httpAgent:a,httpsAgent:a,cancelToken:a,socketPath:a,responseEncoding:a,validateStatus:l};return n.forEach(Object.keys(e).concat(Object.keys(t)),function(e){var t=c[e]||r,s=t(e);n.isUndefined(s)&&t!==l||(i[e]=s)}),i}},46503(e,t,i){"use strict";var n=i(60700);e.exports=function(e,t,i){var s=i.config.validateStatus;i.status&&s&&!s(i.status)?t(n("Request failed with status code "+i.status,i.config,null,i.request,i)):e(i)}},69762(e,t,i){"use strict";var n=i(34309),s=i(70304);e.exports=function(e,t,i){var r=this||s;return n.forEach(i,function(i){e=i.call(r,e,t)}),e}},70304(e,t,i){"use strict";var n=i(85409),s=i(34309),r=i(26339),o=i(74120),a={"Content-Type":"application/x-www-form-urlencoded"};function l(e,t){!s.isUndefined(e)&&s.isUndefined(e["Content-Type"])&&(e["Content-Type"]=t)}var c,h={transitional:{silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},adapter:(("undefined"!=typeof XMLHttpRequest||void 0!==n&&"[object process]"===Object.prototype.toString.call(n))&&(c=i(359)),c),transformRequest:[function(e,t){return r(t,"Accept"),r(t,"Content-Type"),s.isFormData(e)||s.isArrayBuffer(e)||s.isBuffer(e)||s.isStream(e)||s.isFile(e)||s.isBlob(e)?e:s.isArrayBufferView(e)?e.buffer:s.isURLSearchParams(e)?(l(t,"application/x-www-form-urlencoded;charset=utf-8"),e.toString()):s.isObject(e)||t&&"application/json"===t["Content-Type"]?(l(t,"application/json"),function(e){if(s.isString(e))try{return(0,JSON.parse)(e),s.trim(e)}catch(e){if("SyntaxError"!==e.name)throw e}return(0,JSON.stringify)(e)}(e)):e}],transformResponse:[function(e){var t=this.transitional||h.transitional,i=t&&t.silentJSONParsing,n=t&&t.forcedJSONParsing,r=!i&&"json"===this.responseType;if(r||n&&s.isString(e)&&e.length)try{return JSON.parse(e)}catch(e){if(r){if("SyntaxError"===e.name)throw o(e,this,"E_JSON_PARSE");throw e}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};s.forEach(["delete","get","head"],function(e){h.headers[e]={}}),s.forEach(["post","put","patch"],function(e){h.headers[e]=s.merge(a)}),e.exports=h},13846(e){e.exports={version:"0.24.0"}},73059(e){"use strict";e.exports=function(e,t){return function(){for(var i=new Array(arguments.length),n=0;n<i.length;n++)i[n]=arguments[n];return e.apply(t,i)}}},43029(e,t,i){"use strict";var n=i(34309);function s(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}e.exports=function(e,t,i){if(!t)return e;var r;if(i)r=i(t);else if(n.isURLSearchParams(t))r=t.toString();else{var o=[];n.forEach(t,function(e,t){null!=e&&(n.isArray(e)?t+="[]":e=[e],n.forEach(e,function(e){n.isDate(e)?e=e.toISOString():n.isObject(e)&&(e=JSON.stringify(e)),o.push(s(t)+"="+s(e))}))}),r=o.join("&")}if(r){var a=e.indexOf("#");-1!==a&&(e=e.slice(0,a)),e+=(-1===e.indexOf("?")?"?":"&")+r}return e}},20773(e){"use strict";e.exports=function(e,t){return t?e.replace(/\/+$/,"")+"/"+t.replace(/^\/+/,""):e}},30989(e,t,i){"use strict";var n=i(34309);e.exports=n.isStandardBrowserEnv()?{write:function(e,t,i,s,r,o){var a=[];a.push(e+"="+encodeURIComponent(t)),n.isNumber(i)&&a.push("expires="+new Date(i).toGMTString()),n.isString(s)&&a.push("path="+s),n.isString(r)&&a.push("domain="+r),!0===o&&a.push("secure"),document.cookie=a.join("; ")},read:function(e){var t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove:function(e){this.write(e,"",Date.now()-864e5)}}:{write:function(){},read:function(){return null},remove:function(){}}},80408(e){"use strict";e.exports=function(e){return/^([a-z][a-z\d\+\-\.]*:)?\/\//i.test(e)}},68620(e){"use strict";e.exports=function(e){return"object"==typeof e&&!0===e.isAxiosError}},95367(e,t,i){"use strict";var n=i(34309);e.exports=n.isStandardBrowserEnv()?function(){var e,t=/(msie|trident)/i.test(navigator.userAgent),i=document.createElement("a");function s(e){var n=e;return t&&(i.setAttribute("href",n),n=i.href),i.setAttribute("href",n),{href:i.href,protocol:i.protocol?i.protocol.replace(/:$/,""):"",host:i.host,search:i.search?i.search.replace(/^\?/,""):"",hash:i.hash?i.hash.replace(/^#/,""):"",hostname:i.hostname,port:i.port,pathname:"/"===i.pathname.charAt(0)?i.pathname:"/"+i.pathname}}return e=s(window.location.href),function(t){var i=n.isString(t)?s(t):t;return i.protocol===e.protocol&&i.host===e.host}}():function(){return!0}},26339(e,t,i){"use strict";var n=i(34309);e.exports=function(e,t){n.forEach(e,function(i,n){n!==t&&n.toUpperCase()===t.toUpperCase()&&(e[t]=i,delete e[n])})}},41923(e,t,i){"use strict";var n=i(34309),s=["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"];e.exports=function(e){var t,i,r,o={};return e?(n.forEach(e.split("\n"),function(e){if(r=e.indexOf(":"),t=n.trim(e.substr(0,r)).toLowerCase(),i=n.trim(e.substr(r+1)),t){if(o[t]&&s.indexOf(t)>=0)return;o[t]="set-cookie"===t?(o[t]?o[t]:[]).concat([i]):o[t]?o[t]+", "+i:i}}),o):o}},7547(e){"use strict";e.exports=function(e){return function(t){return e.apply(null,t)}}},7636(e,t,i){"use strict";var n=i(13846).version,s={};["object","boolean","number","function","string","symbol"].forEach(function(e,t){s[e]=function(i){return typeof i===e||"a"+(t<1?"n ":" ")+e}});var r={};s.transitional=function(e,t,i){function s(e,t){return"[Axios v"+n+"] Transitional option '"+e+"'"+t+(i?". "+i:"")}return function(i,n,o){if(!1===e)throw new Error(s(n," has been removed"+(t?" in "+t:"")));return t&&!r[n]&&(r[n]=!0,console.warn(s(n," has been deprecated since v"+t+" and will be removed in the near future"))),!e||e(i,n,o)}},e.exports={assertOptions:function(e,t,i){if("object"!=typeof e)throw new TypeError("options must be an object");for(var n=Object.keys(e),s=n.length;s-- >0;){var r=n[s],o=t[r];if(o){var a=e[r],l=void 0===a||o(a,r,e);if(!0!==l)throw new TypeError("option "+r+" must be "+l)}else if(!0!==i)throw Error("Unknown option "+r)}},validators:s}},34309(e,t,i){"use strict";var n=i(73059),s=Object.prototype.toString;function r(e){return"[object Array]"===s.call(e)}function o(e){return void 0===e}function a(e){return null!==e&&"object"==typeof e}function l(e){if("[object Object]"!==s.call(e))return!1;var t=Object.getPrototypeOf(e);return null===t||t===Object.prototype}function c(e){return"[object Function]"===s.call(e)}function h(e,t){if(null!=e)if("object"!=typeof e&&(e=[e]),r(e))for(var i=0,n=e.length;i<n;i++)t.call(null,e[i],i,e);else for(var s in e)Object.prototype.hasOwnProperty.call(e,s)&&t.call(null,e[s],s,e)}e.exports={isArray:r,isArrayBuffer:function(e){return"[object ArrayBuffer]"===s.call(e)},isBuffer:function(e){return null!==e&&!o(e)&&null!==e.constructor&&!o(e.constructor)&&"function"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)},isFormData:function(e){return"undefined"!=typeof FormData&&e instanceof FormData},isArrayBufferView:function(e){return"undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&e.buffer instanceof ArrayBuffer},isString:function(e){return"string"==typeof e},isNumber:function(e){return"number"==typeof e},isObject:a,isPlainObject:l,isUndefined:o,isDate:function(e){return"[object Date]"===s.call(e)},isFile:function(e){return"[object File]"===s.call(e)},isBlob:function(e){return"[object Blob]"===s.call(e)},isFunction:c,isStream:function(e){return a(e)&&c(e.pipe)},isURLSearchParams:function(e){return"undefined"!=typeof URLSearchParams&&e instanceof URLSearchParams},isStandardBrowserEnv:function(){return("undefined"==typeof navigator||"ReactNative"!==navigator.product&&"NativeScript"!==navigator.product&&"NS"!==navigator.product)&&"undefined"!=typeof window&&"undefined"!=typeof document},forEach:h,merge:function e(){var t={};function i(i,n){l(t[n])&&l(i)?t[n]=e(t[n],i):l(i)?t[n]=e({},i):r(i)?t[n]=i.slice():t[n]=i}for(var n=0,s=arguments.length;n<s;n++)h(arguments[n],i);return t},extend:function(e,t,i){return h(t,function(t,s){e[s]=i&&"function"==typeof t?n(t,i):t}),e},trim:function(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")},stripBOM:function(e){return 65279===e.charCodeAt(0)&&(e=e.slice(1)),e}}},5611(e,t,i){e.exports={default:i(85877),__esModule:!0}},80238(e,t,i){e.exports={default:i(13112),__esModule:!0}},65191(e,t,i){e.exports={default:i(30481),__esModule:!0}},38841(e,t,i){e.exports={default:i(40688),__esModule:!0}},12581(e,t,i){e.exports={default:i(55111),__esModule:!0}},20144(e,t,i){e.exports={default:i(27773),__esModule:!0}},75697(e,t,i){e.exports={default:i(63315),__esModule:!0}},17380(e,t){"use strict";t.__esModule=!0,t.default=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}},31354(e,t,i){"use strict";t.__esModule=!0;var n,s=(n=i(65191))&&n.__esModule?n:{default:n};t.default=function(){function e(e,t){for(var i=0;i<t.length;i++){var n=t[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),(0,s.default)(e,n.key,n)}}return function(t,i,n){return i&&e(t.prototype,i),n&&e(t,n),t}}()},84011(e,t,i){"use strict";t.__esModule=!0;var n,s=(n=i(5611))&&n.__esModule?n:{default:n};t.default=s.default||function(e){for(var t=1;t<arguments.length;t++){var i=arguments[t];for(var n in i)Object.prototype.hasOwnProperty.call(i,n)&&(e[n]=i[n])}return e}},87724(e,t,i){"use strict";t.__esModule=!0;var n=o(i(12581)),s=o(i(80238)),r=o(i(38829));function o(e){return e&&e.__esModule?e:{default:e}}t.default=function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+(void 0===t?"undefined":(0,r.default)(t)));e.prototype=(0,s.default)(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(n.default?(0,n.default)(e,t):e.__proto__=t)}},77857(e,t,i){"use strict";t.__esModule=!0;var n,s=(n=i(38829))&&n.__esModule?n:{default:n};t.default=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==(void 0===t?"undefined":(0,s.default)(t))&&"function"!=typeof t?e:t}},38829(e,t,i){"use strict";t.__esModule=!0;var n=o(i(75697)),s=o(i(20144)),r="function"==typeof s.default&&"symbol"==typeof n.default?function(e){return typeof e}:function(e){return e&&"function"==typeof s.default&&e.constructor===s.default&&e!==s.default.prototype?"symbol":typeof e};function o(e){return e&&e.__esModule?e:{default:e}}t.default="function"==typeof s.default&&"symbol"===r(n.default)?function(e){return void 0===e?"undefined":r(e)}:function(e){return e&&"function"==typeof s.default&&e.constructor===s.default&&e!==s.default.prototype?"symbol":void 0===e?"undefined":r(e)}},92178(e){"use strict";e.exports=function(e){if(e)throw e}},84933(e,t){"use strict";t.byteLength=function(e){var t=a(e),i=t[0],n=t[1];return 3*(i+n)/4-n},t.toByteArray=function(e){var t,i,r=a(e),o=r[0],l=r[1],c=new s(function(e,t,i){return 3*(t+i)/4-i}(0,o,l)),h=0,d=l>0?o-4:o;for(i=0;i<d;i+=4)t=n[e.charCodeAt(i)]<<18|n[e.charCodeAt(i+1)]<<12|n[e.charCodeAt(i+2)]<<6|n[e.charCodeAt(i+3)],c[h++]=t>>16&255,c[h++]=t>>8&255,c[h++]=255&t;return 2===l&&(t=n[e.charCodeAt(i)]<<2|n[e.charCodeAt(i+1)]>>4,c[h++]=255&t),1===l&&(t=n[e.charCodeAt(i)]<<10|n[e.charCodeAt(i+1)]<<4|n[e.charCodeAt(i+2)]>>2,c[h++]=t>>8&255,c[h++]=255&t),c},t.fromByteArray=function(e){for(var t,n=e.length,s=n%3,r=[],o=16383,a=0,l=n-s;a<l;a+=o)r.push(c(e,a,a+o>l?l:a+o));return 1===s?(t=e[n-1],r.push(i[t>>2]+i[t<<4&63]+"==")):2===s&&(t=(e[n-2]<<8)+e[n-1],r.push(i[t>>10]+i[t>>4&63]+i[t<<2&63]+"=")),r.join("")};for(var i=[],n=[],s="undefined"!=typeof Uint8Array?Uint8Array:Array,r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",o=0;o<64;++o)i[o]=r[o],n[r.charCodeAt(o)]=o;function a(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var i=e.indexOf("=");return-1===i&&(i=t),[i,i===t?0:4-i%4]}function l(e){return i[e>>18&63]+i[e>>12&63]+i[e>>6&63]+i[63&e]}function c(e,t,i){for(var n,s=[],r=t;r<i;r+=3)n=(e[r]<<16&16711680)+(e[r+1]<<8&65280)+(255&e[r+2]),s.push(l(n));return s.join("")}n["-".charCodeAt(0)]=62,n["_".charCodeAt(0)]=63},5630(e,t,i){!function(e,t){"use strict";function n(e,t){if(!e)throw new Error(t||"Assertion failed")}function s(e,t){e.super_=t;var i=function(){};i.prototype=t.prototype,e.prototype=new i,e.prototype.constructor=e}function r(e,t,i){if(r.isBN(e))return e;this.negative=0,this.words=null,this.length=0,this.red=null,null!==e&&("le"!==t&&"be"!==t||(i=t,t=10),this._init(e||0,t||10,i||"be"))}var o;"object"==typeof e?e.exports=r:t.BN=r,r.BN=r,r.wordSize=26;try{o="undefined"!=typeof window&&void 0!==window.Buffer?window.Buffer:i(46216).Buffer}catch(e){}function a(e,t){var i=e.charCodeAt(t);return i>=65&&i<=70?i-55:i>=97&&i<=102?i-87:i-48&15}function l(e,t,i){var n=a(e,i);return i-1>=t&&(n|=a(e,i-1)<<4),n}function c(e,t,i,n){for(var s=0,r=Math.min(e.length,i),o=t;o<r;o++){var a=e.charCodeAt(o)-48;s*=n,s+=a>=49?a-49+10:a>=17?a-17+10:a}return s}r.isBN=function(e){return e instanceof r||null!==e&&"object"==typeof e&&e.constructor.wordSize===r.wordSize&&Array.isArray(e.words)},r.max=function(e,t){return e.cmp(t)>0?e:t},r.min=function(e,t){return e.cmp(t)<0?e:t},r.prototype._init=function(e,t,i){if("number"==typeof e)return this._initNumber(e,t,i);if("object"==typeof e)return this._initArray(e,t,i);"hex"===t&&(t=16),n(t===(0|t)&&t>=2&&t<=36);var s=0;"-"===(e=e.toString().replace(/\s+/g,""))[0]&&(s++,this.negative=1),s<e.length&&(16===t?this._parseHex(e,s,i):(this._parseBase(e,t,s),"le"===i&&this._initArray(this.toArray(),t,i)))},r.prototype._initNumber=function(e,t,i){e<0&&(this.negative=1,e=-e),e<67108864?(this.words=[67108863&e],this.length=1):e<4503599627370496?(this.words=[67108863&e,e/67108864&67108863],this.length=2):(n(e<9007199254740992),this.words=[67108863&e,e/67108864&67108863,1],this.length=3),"le"===i&&this._initArray(this.toArray(),t,i)},r.prototype._initArray=function(e,t,i){if(n("number"==typeof e.length),e.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(e.length/3),this.words=new Array(this.length);for(var s=0;s<this.length;s++)this.words[s]=0;var r,o,a=0;if("be"===i)for(s=e.length-1,r=0;s>=0;s-=3)o=e[s]|e[s-1]<<8|e[s-2]<<16,this.words[r]|=o<<a&67108863,this.words[r+1]=o>>>26-a&67108863,(a+=24)>=26&&(a-=26,r++);else if("le"===i)for(s=0,r=0;s<e.length;s+=3)o=e[s]|e[s+1]<<8|e[s+2]<<16,this.words[r]|=o<<a&67108863,this.words[r+1]=o>>>26-a&67108863,(a+=24)>=26&&(a-=26,r++);return this.strip()},r.prototype._parseHex=function(e,t,i){this.length=Math.ceil((e.length-t)/6),this.words=new Array(this.length);for(var n=0;n<this.length;n++)this.words[n]=0;var s,r=0,o=0;if("be"===i)for(n=e.length-1;n>=t;n-=2)s=l(e,t,n)<<r,this.words[o]|=67108863&s,r>=18?(r-=18,o+=1,this.words[o]|=s>>>26):r+=8;else for(n=(e.length-t)%2==0?t+1:t;n<e.length;n+=2)s=l(e,t,n)<<r,this.words[o]|=67108863&s,r>=18?(r-=18,o+=1,this.words[o]|=s>>>26):r+=8;this.strip()},r.prototype._parseBase=function(e,t,i){this.words=[0],this.length=1;for(var n=0,s=1;s<=67108863;s*=t)n++;n--,s=s/t|0;for(var r=e.length-i,o=r%n,a=Math.min(r,r-o)+i,l=0,h=i;h<a;h+=n)l=c(e,h,h+n,t),this.imuln(s),this.words[0]+l<67108864?this.words[0]+=l:this._iaddn(l);if(0!==o){var d=1;for(l=c(e,h,e.length,t),h=0;h<o;h++)d*=t;this.imuln(d),this.words[0]+l<67108864?this.words[0]+=l:this._iaddn(l)}this.strip()},r.prototype.copy=function(e){e.words=new Array(this.length);for(var t=0;t<this.length;t++)e.words[t]=this.words[t];e.length=this.length,e.negative=this.negative,e.red=this.red},r.prototype.clone=function(){var e=new r(null);return this.copy(e),e},r.prototype._expand=function(e){for(;this.length<e;)this.words[this.length++]=0;return this},r.prototype.strip=function(){for(;this.length>1&&0===this.words[this.length-1];)this.length--;return this._normSign()},r.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},r.prototype.inspect=function(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"};var h=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],d=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],u=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];function p(e,t,i){i.negative=t.negative^e.negative;var n=e.length+t.length|0;i.length=n,n=n-1|0;var s=0|e.words[0],r=0|t.words[0],o=s*r,a=67108863&o,l=o/67108864|0;i.words[0]=a;for(var c=1;c<n;c++){for(var h=l>>>26,d=67108863&l,u=Math.min(c,t.length-1),p=Math.max(0,c-e.length+1);p<=u;p++){var g=c-p|0;h+=(o=(s=0|e.words[g])*(r=0|t.words[p])+d)/67108864|0,d=67108863&o}i.words[c]=0|d,l=0|h}return 0!==l?i.words[c]=0|l:i.length--,i.strip()}r.prototype.toString=function(e,t){var i;if(t=0|t||1,16===(e=e||10)||"hex"===e){i="";for(var s=0,r=0,o=0;o<this.length;o++){var a=this.words[o],l=(16777215&(a<<s|r)).toString(16);r=a>>>24-s&16777215,(s+=2)>=26&&(s-=26,o--),i=0!==r||o!==this.length-1?h[6-l.length]+l+i:l+i}for(0!==r&&(i=r.toString(16)+i);i.length%t!==0;)i="0"+i;return 0!==this.negative&&(i="-"+i),i}if(e===(0|e)&&e>=2&&e<=36){var c=d[e],p=u[e];i="";var g=this.clone();for(g.negative=0;!g.isZero();){var f=g.modn(p).toString(e);i=(g=g.idivn(p)).isZero()?f+i:h[c-f.length]+f+i}for(this.isZero()&&(i="0"+i);i.length%t!==0;)i="0"+i;return 0!==this.negative&&(i="-"+i),i}n(!1,"Base should be between 2 and 36")},r.prototype.toNumber=function(){var e=this.words[0];return 2===this.length?e+=67108864*this.words[1]:3===this.length&&1===this.words[2]?e+=4503599627370496+67108864*this.words[1]:this.length>2&&n(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-e:e},r.prototype.toJSON=function(){return this.toString(16)},r.prototype.toBuffer=function(e,t){return n(void 0!==o),this.toArrayLike(o,e,t)},r.prototype.toArray=function(e,t){return this.toArrayLike(Array,e,t)},r.prototype.toArrayLike=function(e,t,i){var s=this.byteLength(),r=i||Math.max(1,s);n(s<=r,"byte array longer than desired length"),n(r>0,"Requested array length <= 0"),this.strip();var o,a,l="le"===t,c=new e(r),h=this.clone();if(l){for(a=0;!h.isZero();a++)o=h.andln(255),h.iushrn(8),c[a]=o;for(;a<r;a++)c[a]=0}else{for(a=0;a<r-s;a++)c[a]=0;for(a=0;!h.isZero();a++)o=h.andln(255),h.iushrn(8),c[r-a-1]=o}return c},Math.clz32?r.prototype._countBits=function(e){return 32-Math.clz32(e)}:r.prototype._countBits=function(e){var t=e,i=0;return t>=4096&&(i+=13,t>>>=13),t>=64&&(i+=7,t>>>=7),t>=8&&(i+=4,t>>>=4),t>=2&&(i+=2,t>>>=2),i+t},r.prototype._zeroBits=function(e){if(0===e)return 26;var t=e,i=0;return 8191&t||(i+=13,t>>>=13),127&t||(i+=7,t>>>=7),15&t||(i+=4,t>>>=4),3&t||(i+=2,t>>>=2),1&t||i++,i},r.prototype.bitLength=function(){var e=this.words[this.length-1],t=this._countBits(e);return 26*(this.length-1)+t},r.prototype.zeroBits=function(){if(this.isZero())return 0;for(var e=0,t=0;t<this.length;t++){var i=this._zeroBits(this.words[t]);if(e+=i,26!==i)break}return e},r.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},r.prototype.toTwos=function(e){return 0!==this.negative?this.abs().inotn(e).iaddn(1):this.clone()},r.prototype.fromTwos=function(e){return this.testn(e-1)?this.notn(e).iaddn(1).ineg():this.clone()},r.prototype.isNeg=function(){return 0!==this.negative},r.prototype.neg=function(){return this.clone().ineg()},r.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},r.prototype.iuor=function(e){for(;this.length<e.length;)this.words[this.length++]=0;for(var t=0;t<e.length;t++)this.words[t]=this.words[t]|e.words[t];return this.strip()},r.prototype.ior=function(e){return n(0===(this.negative|e.negative)),this.iuor(e)},r.prototype.or=function(e){return this.length>e.length?this.clone().ior(e):e.clone().ior(this)},r.prototype.uor=function(e){return this.length>e.length?this.clone().iuor(e):e.clone().iuor(this)},r.prototype.iuand=function(e){var t;t=this.length>e.length?e:this;for(var i=0;i<t.length;i++)this.words[i]=this.words[i]&e.words[i];return this.length=t.length,this.strip()},r.prototype.iand=function(e){return n(0===(this.negative|e.negative)),this.iuand(e)},r.prototype.and=function(e){return this.length>e.length?this.clone().iand(e):e.clone().iand(this)},r.prototype.uand=function(e){return this.length>e.length?this.clone().iuand(e):e.clone().iuand(this)},r.prototype.iuxor=function(e){var t,i;this.length>e.length?(t=this,i=e):(t=e,i=this);for(var n=0;n<i.length;n++)this.words[n]=t.words[n]^i.words[n];if(this!==t)for(;n<t.length;n++)this.words[n]=t.words[n];return this.length=t.length,this.strip()},r.prototype.ixor=function(e){return n(0===(this.negative|e.negative)),this.iuxor(e)},r.prototype.xor=function(e){return this.length>e.length?this.clone().ixor(e):e.clone().ixor(this)},r.prototype.uxor=function(e){return this.length>e.length?this.clone().iuxor(e):e.clone().iuxor(this)},r.prototype.inotn=function(e){n("number"==typeof e&&e>=0);var t=0|Math.ceil(e/26),i=e%26;this._expand(t),i>0&&t--;for(var s=0;s<t;s++)this.words[s]=67108863&~this.words[s];return i>0&&(this.words[s]=~this.words[s]&67108863>>26-i),this.strip()},r.prototype.notn=function(e){return this.clone().inotn(e)},r.prototype.setn=function(e,t){n("number"==typeof e&&e>=0);var i=e/26|0,s=e%26;return this._expand(i+1),this.words[i]=t?this.words[i]|1<<s:this.words[i]&~(1<<s),this.strip()},r.prototype.iadd=function(e){var t,i,n;if(0!==this.negative&&0===e.negative)return this.negative=0,t=this.isub(e),this.negative^=1,this._normSign();if(0===this.negative&&0!==e.negative)return e.negative=0,t=this.isub(e),e.negative=1,t._normSign();this.length>e.length?(i=this,n=e):(i=e,n=this);for(var s=0,r=0;r<n.length;r++)t=(0|i.words[r])+(0|n.words[r])+s,this.words[r]=67108863&t,s=t>>>26;for(;0!==s&&r<i.length;r++)t=(0|i.words[r])+s,this.words[r]=67108863&t,s=t>>>26;if(this.length=i.length,0!==s)this.words[this.length]=s,this.length++;else if(i!==this)for(;r<i.length;r++)this.words[r]=i.words[r];return this},r.prototype.add=function(e){var t;return 0!==e.negative&&0===this.negative?(e.negative=0,t=this.sub(e),e.negative^=1,t):0===e.negative&&0!==this.negative?(this.negative=0,t=e.sub(this),this.negative=1,t):this.length>e.length?this.clone().iadd(e):e.clone().iadd(this)},r.prototype.isub=function(e){if(0!==e.negative){e.negative=0;var t=this.iadd(e);return e.negative=1,t._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(e),this.negative=1,this._normSign();var i,n,s=this.cmp(e);if(0===s)return this.negative=0,this.length=1,this.words[0]=0,this;s>0?(i=this,n=e):(i=e,n=this);for(var r=0,o=0;o<n.length;o++)r=(t=(0|i.words[o])-(0|n.words[o])+r)>>26,this.words[o]=67108863&t;for(;0!==r&&o<i.length;o++)r=(t=(0|i.words[o])+r)>>26,this.words[o]=67108863&t;if(0===r&&o<i.length&&i!==this)for(;o<i.length;o++)this.words[o]=i.words[o];return this.length=Math.max(this.length,o),i!==this&&(this.negative=1),this.strip()},r.prototype.sub=function(e){return this.clone().isub(e)};var g=function(e,t,i){var n,s,r,o=e.words,a=t.words,l=i.words,c=0,h=0|o[0],d=8191&h,u=h>>>13,p=0|o[1],g=8191&p,f=p>>>13,m=0|o[2],v=8191&m,y=m>>>13,C=0|o[3],b=8191&C,S=C>>>13,w=0|o[4],x=8191&w,E=w>>>13,M=0|o[5],A=8191&M,T=M>>>13,D=0|o[6],I=8191&D,R=D>>>13,L=0|o[7],k=8191&L,P=L>>>13,N=0|o[8],O=8191&N,_=N>>>13,F=0|o[9],G=8191&F,V=F>>>13,B=0|a[0],H=8191&B,z=B>>>13,U=0|a[1],W=8191&U,j=U>>>13,K=0|a[2],$=8191&K,Y=K>>>13,q=0|a[3],X=8191&q,Z=q>>>13,Q=0|a[4],J=8191&Q,ee=Q>>>13,te=0|a[5],ie=8191&te,ne=te>>>13,se=0|a[6],re=8191&se,oe=se>>>13,ae=0|a[7],le=8191&ae,ce=ae>>>13,he=0|a[8],de=8191&he,ue=he>>>13,pe=0|a[9],ge=8191&pe,fe=pe>>>13;i.negative=e.negative^t.negative,i.length=19;var me=(c+(n=Math.imul(d,H))|0)+((8191&(s=(s=Math.imul(d,z))+Math.imul(u,H)|0))<<13)|0;c=((r=Math.imul(u,z))+(s>>>13)|0)+(me>>>26)|0,me&=67108863,n=Math.imul(g,H),s=(s=Math.imul(g,z))+Math.imul(f,H)|0,r=Math.imul(f,z);var ve=(c+(n=n+Math.imul(d,W)|0)|0)+((8191&(s=(s=s+Math.imul(d,j)|0)+Math.imul(u,W)|0))<<13)|0;c=((r=r+Math.imul(u,j)|0)+(s>>>13)|0)+(ve>>>26)|0,ve&=67108863,n=Math.imul(v,H),s=(s=Math.imul(v,z))+Math.imul(y,H)|0,r=Math.imul(y,z),n=n+Math.imul(g,W)|0,s=(s=s+Math.imul(g,j)|0)+Math.imul(f,W)|0,r=r+Math.imul(f,j)|0;var ye=(c+(n=n+Math.imul(d,$)|0)|0)+((8191&(s=(s=s+Math.imul(d,Y)|0)+Math.imul(u,$)|0))<<13)|0;c=((r=r+Math.imul(u,Y)|0)+(s>>>13)|0)+(ye>>>26)|0,ye&=67108863,n=Math.imul(b,H),s=(s=Math.imul(b,z))+Math.imul(S,H)|0,r=Math.imul(S,z),n=n+Math.imul(v,W)|0,s=(s=s+Math.imul(v,j)|0)+Math.imul(y,W)|0,r=r+Math.imul(y,j)|0,n=n+Math.imul(g,$)|0,s=(s=s+Math.imul(g,Y)|0)+Math.imul(f,$)|0,r=r+Math.imul(f,Y)|0;var Ce=(c+(n=n+Math.imul(d,X)|0)|0)+((8191&(s=(s=s+Math.imul(d,Z)|0)+Math.imul(u,X)|0))<<13)|0;c=((r=r+Math.imul(u,Z)|0)+(s>>>13)|0)+(Ce>>>26)|0,Ce&=67108863,n=Math.imul(x,H),s=(s=Math.imul(x,z))+Math.imul(E,H)|0,r=Math.imul(E,z),n=n+Math.imul(b,W)|0,s=(s=s+Math.imul(b,j)|0)+Math.imul(S,W)|0,r=r+Math.imul(S,j)|0,n=n+Math.imul(v,$)|0,s=(s=s+Math.imul(v,Y)|0)+Math.imul(y,$)|0,r=r+Math.imul(y,Y)|0,n=n+Math.imul(g,X)|0,s=(s=s+Math.imul(g,Z)|0)+Math.imul(f,X)|0,r=r+Math.imul(f,Z)|0;var be=(c+(n=n+Math.imul(d,J)|0)|0)+((8191&(s=(s=s+Math.imul(d,ee)|0)+Math.imul(u,J)|0))<<13)|0;c=((r=r+Math.imul(u,ee)|0)+(s>>>13)|0)+(be>>>26)|0,be&=67108863,n=Math.imul(A,H),s=(s=Math.imul(A,z))+Math.imul(T,H)|0,r=Math.imul(T,z),n=n+Math.imul(x,W)|0,s=(s=s+Math.imul(x,j)|0)+Math.imul(E,W)|0,r=r+Math.imul(E,j)|0,n=n+Math.imul(b,$)|0,s=(s=s+Math.imul(b,Y)|0)+Math.imul(S,$)|0,r=r+Math.imul(S,Y)|0,n=n+Math.imul(v,X)|0,s=(s=s+Math.imul(v,Z)|0)+Math.imul(y,X)|0,r=r+Math.imul(y,Z)|0,n=n+Math.imul(g,J)|0,s=(s=s+Math.imul(g,ee)|0)+Math.imul(f,J)|0,r=r+Math.imul(f,ee)|0;var Se=(c+(n=n+Math.imul(d,ie)|0)|0)+((8191&(s=(s=s+Math.imul(d,ne)|0)+Math.imul(u,ie)|0))<<13)|0;c=((r=r+Math.imul(u,ne)|0)+(s>>>13)|0)+(Se>>>26)|0,Se&=67108863,n=Math.imul(I,H),s=(s=Math.imul(I,z))+Math.imul(R,H)|0,r=Math.imul(R,z),n=n+Math.imul(A,W)|0,s=(s=s+Math.imul(A,j)|0)+Math.imul(T,W)|0,r=r+Math.imul(T,j)|0,n=n+Math.imul(x,$)|0,s=(s=s+Math.imul(x,Y)|0)+Math.imul(E,$)|0,r=r+Math.imul(E,Y)|0,n=n+Math.imul(b,X)|0,s=(s=s+Math.imul(b,Z)|0)+Math.imul(S,X)|0,r=r+Math.imul(S,Z)|0,n=n+Math.imul(v,J)|0,s=(s=s+Math.imul(v,ee)|0)+Math.imul(y,J)|0,r=r+Math.imul(y,ee)|0,n=n+Math.imul(g,ie)|0,s=(s=s+Math.imul(g,ne)|0)+Math.imul(f,ie)|0,r=r+Math.imul(f,ne)|0;var we=(c+(n=n+Math.imul(d,re)|0)|0)+((8191&(s=(s=s+Math.imul(d,oe)|0)+Math.imul(u,re)|0))<<13)|0;c=((r=r+Math.imul(u,oe)|0)+(s>>>13)|0)+(we>>>26)|0,we&=67108863,n=Math.imul(k,H),s=(s=Math.imul(k,z))+Math.imul(P,H)|0,r=Math.imul(P,z),n=n+Math.imul(I,W)|0,s=(s=s+Math.imul(I,j)|0)+Math.imul(R,W)|0,r=r+Math.imul(R,j)|0,n=n+Math.imul(A,$)|0,s=(s=s+Math.imul(A,Y)|0)+Math.imul(T,$)|0,r=r+Math.imul(T,Y)|0,n=n+Math.imul(x,X)|0,s=(s=s+Math.imul(x,Z)|0)+Math.imul(E,X)|0,r=r+Math.imul(E,Z)|0,n=n+Math.imul(b,J)|0,s=(s=s+Math.imul(b,ee)|0)+Math.imul(S,J)|0,r=r+Math.imul(S,ee)|0,n=n+Math.imul(v,ie)|0,s=(s=s+Math.imul(v,ne)|0)+Math.imul(y,ie)|0,r=r+Math.imul(y,ne)|0,n=n+Math.imul(g,re)|0,s=(s=s+Math.imul(g,oe)|0)+Math.imul(f,re)|0,r=r+Math.imul(f,oe)|0;var xe=(c+(n=n+Math.imul(d,le)|0)|0)+((8191&(s=(s=s+Math.imul(d,ce)|0)+Math.imul(u,le)|0))<<13)|0;c=((r=r+Math.imul(u,ce)|0)+(s>>>13)|0)+(xe>>>26)|0,xe&=67108863,n=Math.imul(O,H),s=(s=Math.imul(O,z))+Math.imul(_,H)|0,r=Math.imul(_,z),n=n+Math.imul(k,W)|0,s=(s=s+Math.imul(k,j)|0)+Math.imul(P,W)|0,r=r+Math.imul(P,j)|0,n=n+Math.imul(I,$)|0,s=(s=s+Math.imul(I,Y)|0)+Math.imul(R,$)|0,r=r+Math.imul(R,Y)|0,n=n+Math.imul(A,X)|0,s=(s=s+Math.imul(A,Z)|0)+Math.imul(T,X)|0,r=r+Math.imul(T,Z)|0,n=n+Math.imul(x,J)|0,s=(s=s+Math.imul(x,ee)|0)+Math.imul(E,J)|0,r=r+Math.imul(E,ee)|0,n=n+Math.imul(b,ie)|0,s=(s=s+Math.imul(b,ne)|0)+Math.imul(S,ie)|0,r=r+Math.imul(S,ne)|0,n=n+Math.imul(v,re)|0,s=(s=s+Math.imul(v,oe)|0)+Math.imul(y,re)|0,r=r+Math.imul(y,oe)|0,n=n+Math.imul(g,le)|0,s=(s=s+Math.imul(g,ce)|0)+Math.imul(f,le)|0,r=r+Math.imul(f,ce)|0;var Ee=(c+(n=n+Math.imul(d,de)|0)|0)+((8191&(s=(s=s+Math.imul(d,ue)|0)+Math.imul(u,de)|0))<<13)|0;c=((r=r+Math.imul(u,ue)|0)+(s>>>13)|0)+(Ee>>>26)|0,Ee&=67108863,n=Math.imul(G,H),s=(s=Math.imul(G,z))+Math.imul(V,H)|0,r=Math.imul(V,z),n=n+Math.imul(O,W)|0,s=(s=s+Math.imul(O,j)|0)+Math.imul(_,W)|0,r=r+Math.imul(_,j)|0,n=n+Math.imul(k,$)|0,s=(s=s+Math.imul(k,Y)|0)+Math.imul(P,$)|0,r=r+Math.imul(P,Y)|0,n=n+Math.imul(I,X)|0,s=(s=s+Math.imul(I,Z)|0)+Math.imul(R,X)|0,r=r+Math.imul(R,Z)|0,n=n+Math.imul(A,J)|0,s=(s=s+Math.imul(A,ee)|0)+Math.imul(T,J)|0,r=r+Math.imul(T,ee)|0,n=n+Math.imul(x,ie)|0,s=(s=s+Math.imul(x,ne)|0)+Math.imul(E,ie)|0,r=r+Math.imul(E,ne)|0,n=n+Math.imul(b,re)|0,s=(s=s+Math.imul(b,oe)|0)+Math.imul(S,re)|0,r=r+Math.imul(S,oe)|0,n=n+Math.imul(v,le)|0,s=(s=s+Math.imul(v,ce)|0)+Math.imul(y,le)|0,r=r+Math.imul(y,ce)|0,n=n+Math.imul(g,de)|0,s=(s=s+Math.imul(g,ue)|0)+Math.imul(f,de)|0,r=r+Math.imul(f,ue)|0;var Me=(c+(n=n+Math.imul(d,ge)|0)|0)+((8191&(s=(s=s+Math.imul(d,fe)|0)+Math.imul(u,ge)|0))<<13)|0;c=((r=r+Math.imul(u,fe)|0)+(s>>>13)|0)+(Me>>>26)|0,Me&=67108863,n=Math.imul(G,W),s=(s=Math.imul(G,j))+Math.imul(V,W)|0,r=Math.imul(V,j),n=n+Math.imul(O,$)|0,s=(s=s+Math.imul(O,Y)|0)+Math.imul(_,$)|0,r=r+Math.imul(_,Y)|0,n=n+Math.imul(k,X)|0,s=(s=s+Math.imul(k,Z)|0)+Math.imul(P,X)|0,r=r+Math.imul(P,Z)|0,n=n+Math.imul(I,J)|0,s=(s=s+Math.imul(I,ee)|0)+Math.imul(R,J)|0,r=r+Math.imul(R,ee)|0,n=n+Math.imul(A,ie)|0,s=(s=s+Math.imul(A,ne)|0)+Math.imul(T,ie)|0,r=r+Math.imul(T,ne)|0,n=n+Math.imul(x,re)|0,s=(s=s+Math.imul(x,oe)|0)+Math.imul(E,re)|0,r=r+Math.imul(E,oe)|0,n=n+Math.imul(b,le)|0,s=(s=s+Math.imul(b,ce)|0)+Math.imul(S,le)|0,r=r+Math.imul(S,ce)|0,n=n+Math.imul(v,de)|0,s=(s=s+Math.imul(v,ue)|0)+Math.imul(y,de)|0,r=r+Math.imul(y,ue)|0;var Ae=(c+(n=n+Math.imul(g,ge)|0)|0)+((8191&(s=(s=s+Math.imul(g,fe)|0)+Math.imul(f,ge)|0))<<13)|0;c=((r=r+Math.imul(f,fe)|0)+(s>>>13)|0)+(Ae>>>26)|0,Ae&=67108863,n=Math.imul(G,$),s=(s=Math.imul(G,Y))+Math.imul(V,$)|0,r=Math.imul(V,Y),n=n+Math.imul(O,X)|0,s=(s=s+Math.imul(O,Z)|0)+Math.imul(_,X)|0,r=r+Math.imul(_,Z)|0,n=n+Math.imul(k,J)|0,s=(s=s+Math.imul(k,ee)|0)+Math.imul(P,J)|0,r=r+Math.imul(P,ee)|0,n=n+Math.imul(I,ie)|0,s=(s=s+Math.imul(I,ne)|0)+Math.imul(R,ie)|0,r=r+Math.imul(R,ne)|0,n=n+Math.imul(A,re)|0,s=(s=s+Math.imul(A,oe)|0)+Math.imul(T,re)|0,r=r+Math.imul(T,oe)|0,n=n+Math.imul(x,le)|0,s=(s=s+Math.imul(x,ce)|0)+Math.imul(E,le)|0,r=r+Math.imul(E,ce)|0,n=n+Math.imul(b,de)|0,s=(s=s+Math.imul(b,ue)|0)+Math.imul(S,de)|0,r=r+Math.imul(S,ue)|0;var Te=(c+(n=n+Math.imul(v,ge)|0)|0)+((8191&(s=(s=s+Math.imul(v,fe)|0)+Math.imul(y,ge)|0))<<13)|0;c=((r=r+Math.imul(y,fe)|0)+(s>>>13)|0)+(Te>>>26)|0,Te&=67108863,n=Math.imul(G,X),s=(s=Math.imul(G,Z))+Math.imul(V,X)|0,r=Math.imul(V,Z),n=n+Math.imul(O,J)|0,s=(s=s+Math.imul(O,ee)|0)+Math.imul(_,J)|0,r=r+Math.imul(_,ee)|0,n=n+Math.imul(k,ie)|0,s=(s=s+Math.imul(k,ne)|0)+Math.imul(P,ie)|0,r=r+Math.imul(P,ne)|0,n=n+Math.imul(I,re)|0,s=(s=s+Math.imul(I,oe)|0)+Math.imul(R,re)|0,r=r+Math.imul(R,oe)|0,n=n+Math.imul(A,le)|0,s=(s=s+Math.imul(A,ce)|0)+Math.imul(T,le)|0,r=r+Math.imul(T,ce)|0,n=n+Math.imul(x,de)|0,s=(s=s+Math.imul(x,ue)|0)+Math.imul(E,de)|0,r=r+Math.imul(E,ue)|0;var De=(c+(n=n+Math.imul(b,ge)|0)|0)+((8191&(s=(s=s+Math.imul(b,fe)|0)+Math.imul(S,ge)|0))<<13)|0;c=((r=r+Math.imul(S,fe)|0)+(s>>>13)|0)+(De>>>26)|0,De&=67108863,n=Math.imul(G,J),s=(s=Math.imul(G,ee))+Math.imul(V,J)|0,r=Math.imul(V,ee),n=n+Math.imul(O,ie)|0,s=(s=s+Math.imul(O,ne)|0)+Math.imul(_,ie)|0,r=r+Math.imul(_,ne)|0,n=n+Math.imul(k,re)|0,s=(s=s+Math.imul(k,oe)|0)+Math.imul(P,re)|0,r=r+Math.imul(P,oe)|0,n=n+Math.imul(I,le)|0,s=(s=s+Math.imul(I,ce)|0)+Math.imul(R,le)|0,r=r+Math.imul(R,ce)|0,n=n+Math.imul(A,de)|0,s=(s=s+Math.imul(A,ue)|0)+Math.imul(T,de)|0,r=r+Math.imul(T,ue)|0;var Ie=(c+(n=n+Math.imul(x,ge)|0)|0)+((8191&(s=(s=s+Math.imul(x,fe)|0)+Math.imul(E,ge)|0))<<13)|0;c=((r=r+Math.imul(E,fe)|0)+(s>>>13)|0)+(Ie>>>26)|0,Ie&=67108863,n=Math.imul(G,ie),s=(s=Math.imul(G,ne))+Math.imul(V,ie)|0,r=Math.imul(V,ne),n=n+Math.imul(O,re)|0,s=(s=s+Math.imul(O,oe)|0)+Math.imul(_,re)|0,r=r+Math.imul(_,oe)|0,n=n+Math.imul(k,le)|0,s=(s=s+Math.imul(k,ce)|0)+Math.imul(P,le)|0,r=r+Math.imul(P,ce)|0,n=n+Math.imul(I,de)|0,s=(s=s+Math.imul(I,ue)|0)+Math.imul(R,de)|0,r=r+Math.imul(R,ue)|0;var Re=(c+(n=n+Math.imul(A,ge)|0)|0)+((8191&(s=(s=s+Math.imul(A,fe)|0)+Math.imul(T,ge)|0))<<13)|0;c=((r=r+Math.imul(T,fe)|0)+(s>>>13)|0)+(Re>>>26)|0,Re&=67108863,n=Math.imul(G,re),s=(s=Math.imul(G,oe))+Math.imul(V,re)|0,r=Math.imul(V,oe),n=n+Math.imul(O,le)|0,s=(s=s+Math.imul(O,ce)|0)+Math.imul(_,le)|0,r=r+Math.imul(_,ce)|0,n=n+Math.imul(k,de)|0,s=(s=s+Math.imul(k,ue)|0)+Math.imul(P,de)|0,r=r+Math.imul(P,ue)|0;var Le=(c+(n=n+Math.imul(I,ge)|0)|0)+((8191&(s=(s=s+Math.imul(I,fe)|0)+Math.imul(R,ge)|0))<<13)|0;c=((r=r+Math.imul(R,fe)|0)+(s>>>13)|0)+(Le>>>26)|0,Le&=67108863,n=Math.imul(G,le),s=(s=Math.imul(G,ce))+Math.imul(V,le)|0,r=Math.imul(V,ce),n=n+Math.imul(O,de)|0,s=(s=s+Math.imul(O,ue)|0)+Math.imul(_,de)|0,r=r+Math.imul(_,ue)|0;var ke=(c+(n=n+Math.imul(k,ge)|0)|0)+((8191&(s=(s=s+Math.imul(k,fe)|0)+Math.imul(P,ge)|0))<<13)|0;c=((r=r+Math.imul(P,fe)|0)+(s>>>13)|0)+(ke>>>26)|0,ke&=67108863,n=Math.imul(G,de),s=(s=Math.imul(G,ue))+Math.imul(V,de)|0,r=Math.imul(V,ue);var Pe=(c+(n=n+Math.imul(O,ge)|0)|0)+((8191&(s=(s=s+Math.imul(O,fe)|0)+Math.imul(_,ge)|0))<<13)|0;c=((r=r+Math.imul(_,fe)|0)+(s>>>13)|0)+(Pe>>>26)|0,Pe&=67108863;var Ne=(c+(n=Math.imul(G,ge))|0)+((8191&(s=(s=Math.imul(G,fe))+Math.imul(V,ge)|0))<<13)|0;return c=((r=Math.imul(V,fe))+(s>>>13)|0)+(Ne>>>26)|0,Ne&=67108863,l[0]=me,l[1]=ve,l[2]=ye,l[3]=Ce,l[4]=be,l[5]=Se,l[6]=we,l[7]=xe,l[8]=Ee,l[9]=Me,l[10]=Ae,l[11]=Te,l[12]=De,l[13]=Ie,l[14]=Re,l[15]=Le,l[16]=ke,l[17]=Pe,l[18]=Ne,0!==c&&(l[19]=c,i.length++),i};function f(e,t,i){return(new m).mulp(e,t,i)}function m(e,t){this.x=e,this.y=t}Math.imul||(g=p),r.prototype.mulTo=function(e,t){var i,n=this.length+e.length;return i=10===this.length&&10===e.length?g(this,e,t):n<63?p(this,e,t):n<1024?function(e,t,i){i.negative=t.negative^e.negative,i.length=e.length+t.length;for(var n=0,s=0,r=0;r<i.length-1;r++){var o=s;s=0;for(var a=67108863&n,l=Math.min(r,t.length-1),c=Math.max(0,r-e.length+1);c<=l;c++){var h=r-c,d=(0|e.words[h])*(0|t.words[c]),u=67108863&d;a=67108863&(u=u+a|0),s+=(o=(o=o+(d/67108864|0)|0)+(u>>>26)|0)>>>26,o&=67108863}i.words[r]=a,n=o,o=s}return 0!==n?i.words[r]=n:i.length--,i.strip()}(this,e,t):f(this,e,t),i},m.prototype.makeRBT=function(e){for(var t=new Array(e),i=r.prototype._countBits(e)-1,n=0;n<e;n++)t[n]=this.revBin(n,i,e);return t},m.prototype.revBin=function(e,t,i){if(0===e||e===i-1)return e;for(var n=0,s=0;s<t;s++)n|=(1&e)<<t-s-1,e>>=1;return n},m.prototype.permute=function(e,t,i,n,s,r){for(var o=0;o<r;o++)n[o]=t[e[o]],s[o]=i[e[o]]},m.prototype.transform=function(e,t,i,n,s,r){this.permute(r,e,t,i,n,s);for(var o=1;o<s;o<<=1)for(var a=o<<1,l=Math.cos(2*Math.PI/a),c=Math.sin(2*Math.PI/a),h=0;h<s;h+=a)for(var d=l,u=c,p=0;p<o;p++){var g=i[h+p],f=n[h+p],m=i[h+p+o],v=n[h+p+o],y=d*m-u*v;v=d*v+u*m,m=y,i[h+p]=g+m,n[h+p]=f+v,i[h+p+o]=g-m,n[h+p+o]=f-v,p!==a&&(y=l*d-c*u,u=l*u+c*d,d=y)}},m.prototype.guessLen13b=function(e,t){var i=1|Math.max(t,e),n=1&i,s=0;for(i=i/2|0;i;i>>>=1)s++;return 1<<s+1+n},m.prototype.conjugate=function(e,t,i){if(!(i<=1))for(var n=0;n<i/2;n++){var s=e[n];e[n]=e[i-n-1],e[i-n-1]=s,s=t[n],t[n]=-t[i-n-1],t[i-n-1]=-s}},m.prototype.normalize13b=function(e,t){for(var i=0,n=0;n<t/2;n++){var s=8192*Math.round(e[2*n+1]/t)+Math.round(e[2*n]/t)+i;e[n]=67108863&s,i=s<67108864?0:s/67108864|0}return e},m.prototype.convert13b=function(e,t,i,s){for(var r=0,o=0;o<t;o++)r+=0|e[o],i[2*o]=8191&r,r>>>=13,i[2*o+1]=8191&r,r>>>=13;for(o=2*t;o<s;++o)i[o]=0;n(0===r),n(!(-8192&r))},m.prototype.stub=function(e){for(var t=new Array(e),i=0;i<e;i++)t[i]=0;return t},m.prototype.mulp=function(e,t,i){var n=2*this.guessLen13b(e.length,t.length),s=this.makeRBT(n),r=this.stub(n),o=new Array(n),a=new Array(n),l=new Array(n),c=new Array(n),h=new Array(n),d=new Array(n),u=i.words;u.length=n,this.convert13b(e.words,e.length,o,n),this.convert13b(t.words,t.length,c,n),this.transform(o,r,a,l,n,s),this.transform(c,r,h,d,n,s);for(var p=0;p<n;p++){var g=a[p]*h[p]-l[p]*d[p];l[p]=a[p]*d[p]+l[p]*h[p],a[p]=g}return this.conjugate(a,l,n),this.transform(a,l,u,r,n,s),this.conjugate(u,r,n),this.normalize13b(u,n),i.negative=e.negative^t.negative,i.length=e.length+t.length,i.strip()},r.prototype.mul=function(e){var t=new r(null);return t.words=new Array(this.length+e.length),this.mulTo(e,t)},r.prototype.mulf=function(e){var t=new r(null);return t.words=new Array(this.length+e.length),f(this,e,t)},r.prototype.imul=function(e){return this.clone().mulTo(e,this)},r.prototype.imuln=function(e){n("number"==typeof e),n(e<67108864);for(var t=0,i=0;i<this.length;i++){var s=(0|this.words[i])*e,r=(67108863&s)+(67108863&t);t>>=26,t+=s/67108864|0,t+=r>>>26,this.words[i]=67108863&r}return 0!==t&&(this.words[i]=t,this.length++),this.length=0===e?1:this.length,this},r.prototype.muln=function(e){return this.clone().imuln(e)},r.prototype.sqr=function(){return this.mul(this)},r.prototype.isqr=function(){return this.imul(this.clone())},r.prototype.pow=function(e){var t=function(e){for(var t=new Array(e.bitLength()),i=0;i<t.length;i++){var n=i/26|0,s=i%26;t[i]=(e.words[n]&1<<s)>>>s}return t}(e);if(0===t.length)return new r(1);for(var i=this,n=0;n<t.length&&0===t[n];n++,i=i.sqr());if(++n<t.length)for(var s=i.sqr();n<t.length;n++,s=s.sqr())0!==t[n]&&(i=i.mul(s));return i},r.prototype.iushln=function(e){n("number"==typeof e&&e>=0);var t,i=e%26,s=(e-i)/26,r=67108863>>>26-i<<26-i;if(0!==i){var o=0;for(t=0;t<this.length;t++){var a=this.words[t]&r,l=(0|this.words[t])-a<<i;this.words[t]=l|o,o=a>>>26-i}o&&(this.words[t]=o,this.length++)}if(0!==s){for(t=this.length-1;t>=0;t--)this.words[t+s]=this.words[t];for(t=0;t<s;t++)this.words[t]=0;this.length+=s}return this.strip()},r.prototype.ishln=function(e){return n(0===this.negative),this.iushln(e)},r.prototype.iushrn=function(e,t,i){var s;n("number"==typeof e&&e>=0),s=t?(t-t%26)/26:0;var r=e%26,o=Math.min((e-r)/26,this.length),a=67108863^67108863>>>r<<r,l=i;if(s-=o,s=Math.max(0,s),l){for(var c=0;c<o;c++)l.words[c]=this.words[c];l.length=o}if(0===o);else if(this.length>o)for(this.length-=o,c=0;c<this.length;c++)this.words[c]=this.words[c+o];else this.words[0]=0,this.length=1;var h=0;for(c=this.length-1;c>=0&&(0!==h||c>=s);c--){var d=0|this.words[c];this.words[c]=h<<26-r|d>>>r,h=d&a}return l&&0!==h&&(l.words[l.length++]=h),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},r.prototype.ishrn=function(e,t,i){return n(0===this.negative),this.iushrn(e,t,i)},r.prototype.shln=function(e){return this.clone().ishln(e)},r.prototype.ushln=function(e){return this.clone().iushln(e)},r.prototype.shrn=function(e){return this.clone().ishrn(e)},r.prototype.ushrn=function(e){return this.clone().iushrn(e)},r.prototype.testn=function(e){n("number"==typeof e&&e>=0);var t=e%26,i=(e-t)/26,s=1<<t;return!(this.length<=i||!(this.words[i]&s))},r.prototype.imaskn=function(e){n("number"==typeof e&&e>=0);var t=e%26,i=(e-t)/26;if(n(0===this.negative,"imaskn works only with positive numbers"),this.length<=i)return this;if(0!==t&&i++,this.length=Math.min(i,this.length),0!==t){var s=67108863^67108863>>>t<<t;this.words[this.length-1]&=s}return 0===this.length&&(this.words[0]=0,this.length=1),this.strip()},r.prototype.maskn=function(e){return this.clone().imaskn(e)},r.prototype.iaddn=function(e){return n("number"==typeof e),n(e<67108864),e<0?this.isubn(-e):0!==this.negative?1===this.length&&(0|this.words[0])<e?(this.words[0]=e-(0|this.words[0]),this.negative=0,this):(this.negative=0,this.isubn(e),this.negative=1,this):this._iaddn(e)},r.prototype._iaddn=function(e){this.words[0]+=e;for(var t=0;t<this.length&&this.words[t]>=67108864;t++)this.words[t]-=67108864,t===this.length-1?this.words[t+1]=1:this.words[t+1]++;return this.length=Math.max(this.length,t+1),this},r.prototype.isubn=function(e){if(n("number"==typeof e),n(e<67108864),e<0)return this.iaddn(-e);if(0!==this.negative)return this.negative=0,this.iaddn(e),this.negative=1,this;if(this.words[0]-=e,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var t=0;t<this.length&&this.words[t]<0;t++)this.words[t]+=67108864,this.words[t+1]-=1;return this.strip()},r.prototype.addn=function(e){return this.clone().iaddn(e)},r.prototype.subn=function(e){return this.clone().isubn(e)},r.prototype.iabs=function(){return this.negative=0,this},r.prototype.abs=function(){return this.clone().iabs()},r.prototype._ishlnsubmul=function(e,t,i){var s,r,o=e.length+i;this._expand(o);var a=0;for(s=0;s<e.length;s++){r=(0|this.words[s+i])+a;var l=(0|e.words[s])*t;a=((r-=67108863&l)>>26)-(l/67108864|0),this.words[s+i]=67108863&r}for(;s<this.length-i;s++)a=(r=(0|this.words[s+i])+a)>>26,this.words[s+i]=67108863&r;if(0===a)return this.strip();for(n(-1===a),a=0,s=0;s<this.length;s++)a=(r=-(0|this.words[s])+a)>>26,this.words[s]=67108863&r;return this.negative=1,this.strip()},r.prototype._wordDiv=function(e,t){var i=(this.length,e.length),n=this.clone(),s=e,o=0|s.words[s.length-1];0!=(i=26-this._countBits(o))&&(s=s.ushln(i),n.iushln(i),o=0|s.words[s.length-1]);var a,l=n.length-s.length;if("mod"!==t){(a=new r(null)).length=l+1,a.words=new Array(a.length);for(var c=0;c<a.length;c++)a.words[c]=0}var h=n.clone()._ishlnsubmul(s,1,l);0===h.negative&&(n=h,a&&(a.words[l]=1));for(var d=l-1;d>=0;d--){var u=67108864*(0|n.words[s.length+d])+(0|n.words[s.length+d-1]);for(u=Math.min(u/o|0,67108863),n._ishlnsubmul(s,u,d);0!==n.negative;)u--,n.negative=0,n._ishlnsubmul(s,1,d),n.isZero()||(n.negative^=1);a&&(a.words[d]=u)}return a&&a.strip(),n.strip(),"div"!==t&&0!==i&&n.iushrn(i),{div:a||null,mod:n}},r.prototype.divmod=function(e,t,i){return n(!e.isZero()),this.isZero()?{div:new r(0),mod:new r(0)}:0!==this.negative&&0===e.negative?(a=this.neg().divmod(e,t),"mod"!==t&&(s=a.div.neg()),"div"!==t&&(o=a.mod.neg(),i&&0!==o.negative&&o.iadd(e)),{div:s,mod:o}):0===this.negative&&0!==e.negative?(a=this.divmod(e.neg(),t),"mod"!==t&&(s=a.div.neg()),{div:s,mod:a.mod}):0!==(this.negative&e.negative)?(a=this.neg().divmod(e.neg(),t),"div"!==t&&(o=a.mod.neg(),i&&0!==o.negative&&o.isub(e)),{div:a.div,mod:o}):e.length>this.length||this.cmp(e)<0?{div:new r(0),mod:this}:1===e.length?"div"===t?{div:this.divn(e.words[0]),mod:null}:"mod"===t?{div:null,mod:new r(this.modn(e.words[0]))}:{div:this.divn(e.words[0]),mod:new r(this.modn(e.words[0]))}:this._wordDiv(e,t);var s,o,a},r.prototype.div=function(e){return this.divmod(e,"div",!1).div},r.prototype.mod=function(e){return this.divmod(e,"mod",!1).mod},r.prototype.umod=function(e){return this.divmod(e,"mod",!0).mod},r.prototype.divRound=function(e){var t=this.divmod(e);if(t.mod.isZero())return t.div;var i=0!==t.div.negative?t.mod.isub(e):t.mod,n=e.ushrn(1),s=e.andln(1),r=i.cmp(n);return r<0||1===s&&0===r?t.div:0!==t.div.negative?t.div.isubn(1):t.div.iaddn(1)},r.prototype.modn=function(e){n(e<=67108863);for(var t=(1<<26)%e,i=0,s=this.length-1;s>=0;s--)i=(t*i+(0|this.words[s]))%e;return i},r.prototype.idivn=function(e){n(e<=67108863);for(var t=0,i=this.length-1;i>=0;i--){var s=(0|this.words[i])+67108864*t;this.words[i]=s/e|0,t=s%e}return this.strip()},r.prototype.divn=function(e){return this.clone().idivn(e)},r.prototype.egcd=function(e){n(0===e.negative),n(!e.isZero());var t=this,i=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var s=new r(1),o=new r(0),a=new r(0),l=new r(1),c=0;t.isEven()&&i.isEven();)t.iushrn(1),i.iushrn(1),++c;for(var h=i.clone(),d=t.clone();!t.isZero();){for(var u=0,p=1;0===(t.words[0]&p)&&u<26;++u,p<<=1);if(u>0)for(t.iushrn(u);u-- >0;)(s.isOdd()||o.isOdd())&&(s.iadd(h),o.isub(d)),s.iushrn(1),o.iushrn(1);for(var g=0,f=1;0===(i.words[0]&f)&&g<26;++g,f<<=1);if(g>0)for(i.iushrn(g);g-- >0;)(a.isOdd()||l.isOdd())&&(a.iadd(h),l.isub(d)),a.iushrn(1),l.iushrn(1);t.cmp(i)>=0?(t.isub(i),s.isub(a),o.isub(l)):(i.isub(t),a.isub(s),l.isub(o))}return{a,b:l,gcd:i.iushln(c)}},r.prototype._invmp=function(e){n(0===e.negative),n(!e.isZero());var t=this,i=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var s,o=new r(1),a=new r(0),l=i.clone();t.cmpn(1)>0&&i.cmpn(1)>0;){for(var c=0,h=1;0===(t.words[0]&h)&&c<26;++c,h<<=1);if(c>0)for(t.iushrn(c);c-- >0;)o.isOdd()&&o.iadd(l),o.iushrn(1);for(var d=0,u=1;0===(i.words[0]&u)&&d<26;++d,u<<=1);if(d>0)for(i.iushrn(d);d-- >0;)a.isOdd()&&a.iadd(l),a.iushrn(1);t.cmp(i)>=0?(t.isub(i),o.isub(a)):(i.isub(t),a.isub(o))}return(s=0===t.cmpn(1)?o:a).cmpn(0)<0&&s.iadd(e),s},r.prototype.gcd=function(e){if(this.isZero())return e.abs();if(e.isZero())return this.abs();var t=this.clone(),i=e.clone();t.negative=0,i.negative=0;for(var n=0;t.isEven()&&i.isEven();n++)t.iushrn(1),i.iushrn(1);for(;;){for(;t.isEven();)t.iushrn(1);for(;i.isEven();)i.iushrn(1);var s=t.cmp(i);if(s<0){var r=t;t=i,i=r}else if(0===s||0===i.cmpn(1))break;t.isub(i)}return i.iushln(n)},r.prototype.invm=function(e){return this.egcd(e).a.umod(e)},r.prototype.isEven=function(){return!(1&this.words[0])},r.prototype.isOdd=function(){return!(1&~this.words[0])},r.prototype.andln=function(e){return this.words[0]&e},r.prototype.bincn=function(e){n("number"==typeof e);var t=e%26,i=(e-t)/26,s=1<<t;if(this.length<=i)return this._expand(i+1),this.words[i]|=s,this;for(var r=s,o=i;0!==r&&o<this.length;o++){var a=0|this.words[o];r=(a+=r)>>>26,a&=67108863,this.words[o]=a}return 0!==r&&(this.words[o]=r,this.length++),this},r.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},r.prototype.cmpn=function(e){var t,i=e<0;if(0!==this.negative&&!i)return-1;if(0===this.negative&&i)return 1;if(this.strip(),this.length>1)t=1;else{i&&(e=-e),n(e<=67108863,"Number is too big");var s=0|this.words[0];t=s===e?0:s<e?-1:1}return 0!==this.negative?0|-t:t},r.prototype.cmp=function(e){if(0!==this.negative&&0===e.negative)return-1;if(0===this.negative&&0!==e.negative)return 1;var t=this.ucmp(e);return 0!==this.negative?0|-t:t},r.prototype.ucmp=function(e){if(this.length>e.length)return 1;if(this.length<e.length)return-1;for(var t=0,i=this.length-1;i>=0;i--){var n=0|this.words[i],s=0|e.words[i];if(n!==s){n<s?t=-1:n>s&&(t=1);break}}return t},r.prototype.gtn=function(e){return 1===this.cmpn(e)},r.prototype.gt=function(e){return 1===this.cmp(e)},r.prototype.gten=function(e){return this.cmpn(e)>=0},r.prototype.gte=function(e){return this.cmp(e)>=0},r.prototype.ltn=function(e){return-1===this.cmpn(e)},r.prototype.lt=function(e){return-1===this.cmp(e)},r.prototype.lten=function(e){return this.cmpn(e)<=0},r.prototype.lte=function(e){return this.cmp(e)<=0},r.prototype.eqn=function(e){return 0===this.cmpn(e)},r.prototype.eq=function(e){return 0===this.cmp(e)},r.red=function(e){return new x(e)},r.prototype.toRed=function(e){return n(!this.red,"Already a number in reduction context"),n(0===this.negative,"red works only with positives"),e.convertTo(this)._forceRed(e)},r.prototype.fromRed=function(){return n(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},r.prototype._forceRed=function(e){return this.red=e,this},r.prototype.forceRed=function(e){return n(!this.red,"Already a number in reduction context"),this._forceRed(e)},r.prototype.redAdd=function(e){return n(this.red,"redAdd works only with red numbers"),this.red.add(this,e)},r.prototype.redIAdd=function(e){return n(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,e)},r.prototype.redSub=function(e){return n(this.red,"redSub works only with red numbers"),this.red.sub(this,e)},r.prototype.redISub=function(e){return n(this.red,"redISub works only with red numbers"),this.red.isub(this,e)},r.prototype.redShl=function(e){return n(this.red,"redShl works only with red numbers"),this.red.shl(this,e)},r.prototype.redMul=function(e){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.mul(this,e)},r.prototype.redIMul=function(e){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.imul(this,e)},r.prototype.redSqr=function(){return n(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},r.prototype.redISqr=function(){return n(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},r.prototype.redSqrt=function(){return n(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},r.prototype.redInvm=function(){return n(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},r.prototype.redNeg=function(){return n(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},r.prototype.redPow=function(e){return n(this.red&&!e.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,e)};var v={k256:null,p224:null,p192:null,p25519:null};function y(e,t){this.name=e,this.p=new r(t,16),this.n=this.p.bitLength(),this.k=new r(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function C(){y.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function b(){y.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function S(){y.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function w(){y.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function x(e){if("string"==typeof e){var t=r._prime(e);this.m=t.p,this.prime=t}else n(e.gtn(1),"modulus must be greater than 1"),this.m=e,this.prime=null}function E(e){x.call(this,e),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new r(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}y.prototype._tmp=function(){var e=new r(null);return e.words=new Array(Math.ceil(this.n/13)),e},y.prototype.ireduce=function(e){var t,i=e;do{this.split(i,this.tmp),t=(i=(i=this.imulK(i)).iadd(this.tmp)).bitLength()}while(t>this.n);var n=t<this.n?-1:i.ucmp(this.p);return 0===n?(i.words[0]=0,i.length=1):n>0?i.isub(this.p):void 0!==i.strip?i.strip():i._strip(),i},y.prototype.split=function(e,t){e.iushrn(this.n,0,t)},y.prototype.imulK=function(e){return e.imul(this.k)},s(C,y),C.prototype.split=function(e,t){for(var i=4194303,n=Math.min(e.length,9),s=0;s<n;s++)t.words[s]=e.words[s];if(t.length=n,e.length<=9)return e.words[0]=0,void(e.length=1);var r=e.words[9];for(t.words[t.length++]=r&i,s=10;s<e.length;s++){var o=0|e.words[s];e.words[s-10]=(o&i)<<4|r>>>22,r=o}r>>>=22,e.words[s-10]=r,0===r&&e.length>10?e.length-=10:e.length-=9},C.prototype.imulK=function(e){e.words[e.length]=0,e.words[e.length+1]=0,e.length+=2;for(var t=0,i=0;i<e.length;i++){var n=0|e.words[i];t+=977*n,e.words[i]=67108863&t,t=64*n+(t/67108864|0)}return 0===e.words[e.length-1]&&(e.length--,0===e.words[e.length-1]&&e.length--),e},s(b,y),s(S,y),s(w,y),w.prototype.imulK=function(e){for(var t=0,i=0;i<e.length;i++){var n=19*(0|e.words[i])+t,s=67108863&n;n>>>=26,e.words[i]=s,t=n}return 0!==t&&(e.words[e.length++]=t),e},r._prime=function(e){if(v[e])return v[e];var t;if("k256"===e)t=new C;else if("p224"===e)t=new b;else if("p192"===e)t=new S;else{if("p25519"!==e)throw new Error("Unknown prime "+e);t=new w}return v[e]=t,t},x.prototype._verify1=function(e){n(0===e.negative,"red works only with positives"),n(e.red,"red works only with red numbers")},x.prototype._verify2=function(e,t){n(0===(e.negative|t.negative),"red works only with positives"),n(e.red&&e.red===t.red,"red works only with red numbers")},x.prototype.imod=function(e){return this.prime?this.prime.ireduce(e)._forceRed(this):e.umod(this.m)._forceRed(this)},x.prototype.neg=function(e){return e.isZero()?e.clone():this.m.sub(e)._forceRed(this)},x.prototype.add=function(e,t){this._verify2(e,t);var i=e.add(t);return i.cmp(this.m)>=0&&i.isub(this.m),i._forceRed(this)},x.prototype.iadd=function(e,t){this._verify2(e,t);var i=e.iadd(t);return i.cmp(this.m)>=0&&i.isub(this.m),i},x.prototype.sub=function(e,t){this._verify2(e,t);var i=e.sub(t);return i.cmpn(0)<0&&i.iadd(this.m),i._forceRed(this)},x.prototype.isub=function(e,t){this._verify2(e,t);var i=e.isub(t);return i.cmpn(0)<0&&i.iadd(this.m),i},x.prototype.shl=function(e,t){return this._verify1(e),this.imod(e.ushln(t))},x.prototype.imul=function(e,t){return this._verify2(e,t),this.imod(e.imul(t))},x.prototype.mul=function(e,t){return this._verify2(e,t),this.imod(e.mul(t))},x.prototype.isqr=function(e){return this.imul(e,e.clone())},x.prototype.sqr=function(e){return this.mul(e,e)},x.prototype.sqrt=function(e){if(e.isZero())return e.clone();var t=this.m.andln(3);if(n(t%2==1),3===t){var i=this.m.add(new r(1)).iushrn(2);return this.pow(e,i)}for(var s=this.m.subn(1),o=0;!s.isZero()&&0===s.andln(1);)o++,s.iushrn(1);n(!s.isZero());var a=new r(1).toRed(this),l=a.redNeg(),c=this.m.subn(1).iushrn(1),h=this.m.bitLength();for(h=new r(2*h*h).toRed(this);0!==this.pow(h,c).cmp(l);)h.redIAdd(l);for(var d=this.pow(h,s),u=this.pow(e,s.addn(1).iushrn(1)),p=this.pow(e,s),g=o;0!==p.cmp(a);){for(var f=p,m=0;0!==f.cmp(a);m++)f=f.redSqr();n(m<g);var v=this.pow(d,new r(1).iushln(g-m-1));u=u.redMul(v),d=v.redSqr(),p=p.redMul(d),g=m}return u},x.prototype.invm=function(e){var t=e._invmp(this.m);return 0!==t.negative?(t.negative=0,this.imod(t).redNeg()):this.imod(t)},x.prototype.pow=function(e,t){if(t.isZero())return new r(1).toRed(this);if(0===t.cmpn(1))return e.clone();var i=new Array(16);i[0]=new r(1).toRed(this),i[1]=e;for(var n=2;n<i.length;n++)i[n]=this.mul(i[n-1],e);var s=i[0],o=0,a=0,l=t.bitLength()%26;for(0===l&&(l=26),n=t.length-1;n>=0;n--){for(var c=t.words[n],h=l-1;h>=0;h--){var d=c>>h&1;s!==i[0]&&(s=this.sqr(s)),0!==d||0!==o?(o<<=1,o|=d,(4===++a||0===n&&0===h)&&(s=this.mul(s,i[o]),a=0,o=0)):a=0}l=26}return s},x.prototype.convertTo=function(e){var t=e.umod(this.m);return t===e?t.clone():t},x.prototype.convertFrom=function(e){var t=e.clone();return t.red=null,t},r.mont=function(e){return new E(e)},s(E,x),E.prototype.convertTo=function(e){return this.imod(e.ushln(this.shift))},E.prototype.convertFrom=function(e){var t=this.imod(e.mul(this.rinv));return t.red=null,t},E.prototype.imul=function(e,t){if(e.isZero()||t.isZero())return e.words[0]=0,e.length=1,e;var i=e.imul(t),n=i.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),s=i.isub(n).iushrn(this.shift),r=s;return s.cmp(this.m)>=0?r=s.isub(this.m):s.cmpn(0)<0&&(r=s.iadd(this.m)),r._forceRed(this)},E.prototype.mul=function(e,t){if(e.isZero()||t.isZero())return new r(0)._forceRed(this);var i=e.mul(t),n=i.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),s=i.isub(n).iushrn(this.shift),o=s;return s.cmp(this.m)>=0?o=s.isub(this.m):s.cmpn(0)<0&&(o=s.iadd(this.m)),o._forceRed(this)},E.prototype.invm=function(e){return this.imod(e._invmp(this.m).mul(this.r2))._forceRed(this)}}(e=i.nmd(e),this)},39286(e,t,i){!function(e,t){"use strict";function n(e,t){if(!e)throw new Error(t||"Assertion failed")}function s(e,t){e.super_=t;var i=function(){};i.prototype=t.prototype,e.prototype=new i,e.prototype.constructor=e}function r(e,t,i){if(r.isBN(e))return e;this.negative=0,this.words=null,this.length=0,this.red=null,null!==e&&("le"!==t&&"be"!==t||(i=t,t=10),this._init(e||0,t||10,i||"be"))}var o;"object"==typeof e?e.exports=r:t.BN=r,r.BN=r,r.wordSize=26;try{o="undefined"!=typeof window&&void 0!==window.Buffer?window.Buffer:i(3308).Buffer}catch(e){}function a(e,t){var i=e.charCodeAt(t);return i>=48&&i<=57?i-48:i>=65&&i<=70?i-55:i>=97&&i<=102?i-87:void n(!1,"Invalid character in "+e)}function l(e,t,i){var n=a(e,i);return i-1>=t&&(n|=a(e,i-1)<<4),n}function c(e,t,i,s){for(var r=0,o=0,a=Math.min(e.length,i),l=t;l<a;l++){var c=e.charCodeAt(l)-48;r*=s,o=c>=49?c-49+10:c>=17?c-17+10:c,n(c>=0&&o<s,"Invalid character"),r+=o}return r}function h(e,t){e.words=t.words,e.length=t.length,e.negative=t.negative,e.red=t.red}if(r.isBN=function(e){return e instanceof r||null!==e&&"object"==typeof e&&e.constructor.wordSize===r.wordSize&&Array.isArray(e.words)},r.max=function(e,t){return e.cmp(t)>0?e:t},r.min=function(e,t){return e.cmp(t)<0?e:t},r.prototype._init=function(e,t,i){if("number"==typeof e)return this._initNumber(e,t,i);if("object"==typeof e)return this._initArray(e,t,i);"hex"===t&&(t=16),n(t===(0|t)&&t>=2&&t<=36);var s=0;"-"===(e=e.toString().replace(/\s+/g,""))[0]&&(s++,this.negative=1),s<e.length&&(16===t?this._parseHex(e,s,i):(this._parseBase(e,t,s),"le"===i&&this._initArray(this.toArray(),t,i)))},r.prototype._initNumber=function(e,t,i){e<0&&(this.negative=1,e=-e),e<67108864?(this.words=[67108863&e],this.length=1):e<4503599627370496?(this.words=[67108863&e,e/67108864&67108863],this.length=2):(n(e<9007199254740992),this.words=[67108863&e,e/67108864&67108863,1],this.length=3),"le"===i&&this._initArray(this.toArray(),t,i)},r.prototype._initArray=function(e,t,i){if(n("number"==typeof e.length),e.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(e.length/3),this.words=new Array(this.length);for(var s=0;s<this.length;s++)this.words[s]=0;var r,o,a=0;if("be"===i)for(s=e.length-1,r=0;s>=0;s-=3)o=e[s]|e[s-1]<<8|e[s-2]<<16,this.words[r]|=o<<a&67108863,this.words[r+1]=o>>>26-a&67108863,(a+=24)>=26&&(a-=26,r++);else if("le"===i)for(s=0,r=0;s<e.length;s+=3)o=e[s]|e[s+1]<<8|e[s+2]<<16,this.words[r]|=o<<a&67108863,this.words[r+1]=o>>>26-a&67108863,(a+=24)>=26&&(a-=26,r++);return this._strip()},r.prototype._parseHex=function(e,t,i){this.length=Math.ceil((e.length-t)/6),this.words=new Array(this.length);for(var n=0;n<this.length;n++)this.words[n]=0;var s,r=0,o=0;if("be"===i)for(n=e.length-1;n>=t;n-=2)s=l(e,t,n)<<r,this.words[o]|=67108863&s,r>=18?(r-=18,o+=1,this.words[o]|=s>>>26):r+=8;else for(n=(e.length-t)%2==0?t+1:t;n<e.length;n+=2)s=l(e,t,n)<<r,this.words[o]|=67108863&s,r>=18?(r-=18,o+=1,this.words[o]|=s>>>26):r+=8;this._strip()},r.prototype._parseBase=function(e,t,i){this.words=[0],this.length=1;for(var n=0,s=1;s<=67108863;s*=t)n++;n--,s=s/t|0;for(var r=e.length-i,o=r%n,a=Math.min(r,r-o)+i,l=0,h=i;h<a;h+=n)l=c(e,h,h+n,t),this.imuln(s),this.words[0]+l<67108864?this.words[0]+=l:this._iaddn(l);if(0!==o){var d=1;for(l=c(e,h,e.length,t),h=0;h<o;h++)d*=t;this.imuln(d),this.words[0]+l<67108864?this.words[0]+=l:this._iaddn(l)}this._strip()},r.prototype.copy=function(e){e.words=new Array(this.length);for(var t=0;t<this.length;t++)e.words[t]=this.words[t];e.length=this.length,e.negative=this.negative,e.red=this.red},r.prototype._move=function(e){h(e,this)},r.prototype.clone=function(){var e=new r(null);return this.copy(e),e},r.prototype._expand=function(e){for(;this.length<e;)this.words[this.length++]=0;return this},r.prototype._strip=function(){for(;this.length>1&&0===this.words[this.length-1];)this.length--;return this._normSign()},r.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},"undefined"!=typeof Symbol&&"function"==typeof Symbol.for)try{r.prototype[Symbol.for("nodejs.util.inspect.custom")]=d}catch(e){r.prototype.inspect=d}else r.prototype.inspect=d;function d(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"}var u=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],p=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],g=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];function f(e,t,i){i.negative=t.negative^e.negative;var n=e.length+t.length|0;i.length=n,n=n-1|0;var s=0|e.words[0],r=0|t.words[0],o=s*r,a=67108863&o,l=o/67108864|0;i.words[0]=a;for(var c=1;c<n;c++){for(var h=l>>>26,d=67108863&l,u=Math.min(c,t.length-1),p=Math.max(0,c-e.length+1);p<=u;p++){var g=c-p|0;h+=(o=(s=0|e.words[g])*(r=0|t.words[p])+d)/67108864|0,d=67108863&o}i.words[c]=0|d,l=0|h}return 0!==l?i.words[c]=0|l:i.length--,i._strip()}r.prototype.toString=function(e,t){var i;if(t=0|t||1,16===(e=e||10)||"hex"===e){i="";for(var s=0,r=0,o=0;o<this.length;o++){var a=this.words[o],l=(16777215&(a<<s|r)).toString(16);r=a>>>24-s&16777215,(s+=2)>=26&&(s-=26,o--),i=0!==r||o!==this.length-1?u[6-l.length]+l+i:l+i}for(0!==r&&(i=r.toString(16)+i);i.length%t!==0;)i="0"+i;return 0!==this.negative&&(i="-"+i),i}if(e===(0|e)&&e>=2&&e<=36){var c=p[e],h=g[e];i="";var d=this.clone();for(d.negative=0;!d.isZero();){var f=d.modrn(h).toString(e);i=(d=d.idivn(h)).isZero()?f+i:u[c-f.length]+f+i}for(this.isZero()&&(i="0"+i);i.length%t!==0;)i="0"+i;return 0!==this.negative&&(i="-"+i),i}n(!1,"Base should be between 2 and 36")},r.prototype.toNumber=function(){var e=this.words[0];return 2===this.length?e+=67108864*this.words[1]:3===this.length&&1===this.words[2]?e+=4503599627370496+67108864*this.words[1]:this.length>2&&n(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-e:e},r.prototype.toJSON=function(){return this.toString(16,2)},o&&(r.prototype.toBuffer=function(e,t){return this.toArrayLike(o,e,t)}),r.prototype.toArray=function(e,t){return this.toArrayLike(Array,e,t)},r.prototype.toArrayLike=function(e,t,i){this._strip();var s=this.byteLength(),r=i||Math.max(1,s);n(s<=r,"byte array longer than desired length"),n(r>0,"Requested array length <= 0");var o=function(e,t){return e.allocUnsafe?e.allocUnsafe(t):new e(t)}(e,r);return this["_toArrayLike"+("le"===t?"LE":"BE")](o,s),o},r.prototype._toArrayLikeLE=function(e,t){for(var i=0,n=0,s=0,r=0;s<this.length;s++){var o=this.words[s]<<r|n;e[i++]=255&o,i<e.length&&(e[i++]=o>>8&255),i<e.length&&(e[i++]=o>>16&255),6===r?(i<e.length&&(e[i++]=o>>24&255),n=0,r=0):(n=o>>>24,r+=2)}if(i<e.length)for(e[i++]=n;i<e.length;)e[i++]=0},r.prototype._toArrayLikeBE=function(e,t){for(var i=e.length-1,n=0,s=0,r=0;s<this.length;s++){var o=this.words[s]<<r|n;e[i--]=255&o,i>=0&&(e[i--]=o>>8&255),i>=0&&(e[i--]=o>>16&255),6===r?(i>=0&&(e[i--]=o>>24&255),n=0,r=0):(n=o>>>24,r+=2)}if(i>=0)for(e[i--]=n;i>=0;)e[i--]=0},Math.clz32?r.prototype._countBits=function(e){return 32-Math.clz32(e)}:r.prototype._countBits=function(e){var t=e,i=0;return t>=4096&&(i+=13,t>>>=13),t>=64&&(i+=7,t>>>=7),t>=8&&(i+=4,t>>>=4),t>=2&&(i+=2,t>>>=2),i+t},r.prototype._zeroBits=function(e){if(0===e)return 26;var t=e,i=0;return 8191&t||(i+=13,t>>>=13),127&t||(i+=7,t>>>=7),15&t||(i+=4,t>>>=4),3&t||(i+=2,t>>>=2),1&t||i++,i},r.prototype.bitLength=function(){var e=this.words[this.length-1],t=this._countBits(e);return 26*(this.length-1)+t},r.prototype.zeroBits=function(){if(this.isZero())return 0;for(var e=0,t=0;t<this.length;t++){var i=this._zeroBits(this.words[t]);if(e+=i,26!==i)break}return e},r.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},r.prototype.toTwos=function(e){return 0!==this.negative?this.abs().inotn(e).iaddn(1):this.clone()},r.prototype.fromTwos=function(e){return this.testn(e-1)?this.notn(e).iaddn(1).ineg():this.clone()},r.prototype.isNeg=function(){return 0!==this.negative},r.prototype.neg=function(){return this.clone().ineg()},r.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},r.prototype.iuor=function(e){for(;this.length<e.length;)this.words[this.length++]=0;for(var t=0;t<e.length;t++)this.words[t]=this.words[t]|e.words[t];return this._strip()},r.prototype.ior=function(e){return n(0===(this.negative|e.negative)),this.iuor(e)},r.prototype.or=function(e){return this.length>e.length?this.clone().ior(e):e.clone().ior(this)},r.prototype.uor=function(e){return this.length>e.length?this.clone().iuor(e):e.clone().iuor(this)},r.prototype.iuand=function(e){var t;t=this.length>e.length?e:this;for(var i=0;i<t.length;i++)this.words[i]=this.words[i]&e.words[i];return this.length=t.length,this._strip()},r.prototype.iand=function(e){return n(0===(this.negative|e.negative)),this.iuand(e)},r.prototype.and=function(e){return this.length>e.length?this.clone().iand(e):e.clone().iand(this)},r.prototype.uand=function(e){return this.length>e.length?this.clone().iuand(e):e.clone().iuand(this)},r.prototype.iuxor=function(e){var t,i;this.length>e.length?(t=this,i=e):(t=e,i=this);for(var n=0;n<i.length;n++)this.words[n]=t.words[n]^i.words[n];if(this!==t)for(;n<t.length;n++)this.words[n]=t.words[n];return this.length=t.length,this._strip()},r.prototype.ixor=function(e){return n(0===(this.negative|e.negative)),this.iuxor(e)},r.prototype.xor=function(e){return this.length>e.length?this.clone().ixor(e):e.clone().ixor(this)},r.prototype.uxor=function(e){return this.length>e.length?this.clone().iuxor(e):e.clone().iuxor(this)},r.prototype.inotn=function(e){n("number"==typeof e&&e>=0);var t=0|Math.ceil(e/26),i=e%26;this._expand(t),i>0&&t--;for(var s=0;s<t;s++)this.words[s]=67108863&~this.words[s];return i>0&&(this.words[s]=~this.words[s]&67108863>>26-i),this._strip()},r.prototype.notn=function(e){return this.clone().inotn(e)},r.prototype.setn=function(e,t){n("number"==typeof e&&e>=0);var i=e/26|0,s=e%26;return this._expand(i+1),this.words[i]=t?this.words[i]|1<<s:this.words[i]&~(1<<s),this._strip()},r.prototype.iadd=function(e){var t,i,n;if(0!==this.negative&&0===e.negative)return this.negative=0,t=this.isub(e),this.negative^=1,this._normSign();if(0===this.negative&&0!==e.negative)return e.negative=0,t=this.isub(e),e.negative=1,t._normSign();this.length>e.length?(i=this,n=e):(i=e,n=this);for(var s=0,r=0;r<n.length;r++)t=(0|i.words[r])+(0|n.words[r])+s,this.words[r]=67108863&t,s=t>>>26;for(;0!==s&&r<i.length;r++)t=(0|i.words[r])+s,this.words[r]=67108863&t,s=t>>>26;if(this.length=i.length,0!==s)this.words[this.length]=s,this.length++;else if(i!==this)for(;r<i.length;r++)this.words[r]=i.words[r];return this},r.prototype.add=function(e){var t;return 0!==e.negative&&0===this.negative?(e.negative=0,t=this.sub(e),e.negative^=1,t):0===e.negative&&0!==this.negative?(this.negative=0,t=e.sub(this),this.negative=1,t):this.length>e.length?this.clone().iadd(e):e.clone().iadd(this)},r.prototype.isub=function(e){if(0!==e.negative){e.negative=0;var t=this.iadd(e);return e.negative=1,t._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(e),this.negative=1,this._normSign();var i,n,s=this.cmp(e);if(0===s)return this.negative=0,this.length=1,this.words[0]=0,this;s>0?(i=this,n=e):(i=e,n=this);for(var r=0,o=0;o<n.length;o++)r=(t=(0|i.words[o])-(0|n.words[o])+r)>>26,this.words[o]=67108863&t;for(;0!==r&&o<i.length;o++)r=(t=(0|i.words[o])+r)>>26,this.words[o]=67108863&t;if(0===r&&o<i.length&&i!==this)for(;o<i.length;o++)this.words[o]=i.words[o];return this.length=Math.max(this.length,o),i!==this&&(this.negative=1),this._strip()},r.prototype.sub=function(e){return this.clone().isub(e)};var m=function(e,t,i){var n,s,r,o=e.words,a=t.words,l=i.words,c=0,h=0|o[0],d=8191&h,u=h>>>13,p=0|o[1],g=8191&p,f=p>>>13,m=0|o[2],v=8191&m,y=m>>>13,C=0|o[3],b=8191&C,S=C>>>13,w=0|o[4],x=8191&w,E=w>>>13,M=0|o[5],A=8191&M,T=M>>>13,D=0|o[6],I=8191&D,R=D>>>13,L=0|o[7],k=8191&L,P=L>>>13,N=0|o[8],O=8191&N,_=N>>>13,F=0|o[9],G=8191&F,V=F>>>13,B=0|a[0],H=8191&B,z=B>>>13,U=0|a[1],W=8191&U,j=U>>>13,K=0|a[2],$=8191&K,Y=K>>>13,q=0|a[3],X=8191&q,Z=q>>>13,Q=0|a[4],J=8191&Q,ee=Q>>>13,te=0|a[5],ie=8191&te,ne=te>>>13,se=0|a[6],re=8191&se,oe=se>>>13,ae=0|a[7],le=8191&ae,ce=ae>>>13,he=0|a[8],de=8191&he,ue=he>>>13,pe=0|a[9],ge=8191&pe,fe=pe>>>13;i.negative=e.negative^t.negative,i.length=19;var me=(c+(n=Math.imul(d,H))|0)+((8191&(s=(s=Math.imul(d,z))+Math.imul(u,H)|0))<<13)|0;c=((r=Math.imul(u,z))+(s>>>13)|0)+(me>>>26)|0,me&=67108863,n=Math.imul(g,H),s=(s=Math.imul(g,z))+Math.imul(f,H)|0,r=Math.imul(f,z);var ve=(c+(n=n+Math.imul(d,W)|0)|0)+((8191&(s=(s=s+Math.imul(d,j)|0)+Math.imul(u,W)|0))<<13)|0;c=((r=r+Math.imul(u,j)|0)+(s>>>13)|0)+(ve>>>26)|0,ve&=67108863,n=Math.imul(v,H),s=(s=Math.imul(v,z))+Math.imul(y,H)|0,r=Math.imul(y,z),n=n+Math.imul(g,W)|0,s=(s=s+Math.imul(g,j)|0)+Math.imul(f,W)|0,r=r+Math.imul(f,j)|0;var ye=(c+(n=n+Math.imul(d,$)|0)|0)+((8191&(s=(s=s+Math.imul(d,Y)|0)+Math.imul(u,$)|0))<<13)|0;c=((r=r+Math.imul(u,Y)|0)+(s>>>13)|0)+(ye>>>26)|0,ye&=67108863,n=Math.imul(b,H),s=(s=Math.imul(b,z))+Math.imul(S,H)|0,r=Math.imul(S,z),n=n+Math.imul(v,W)|0,s=(s=s+Math.imul(v,j)|0)+Math.imul(y,W)|0,r=r+Math.imul(y,j)|0,n=n+Math.imul(g,$)|0,s=(s=s+Math.imul(g,Y)|0)+Math.imul(f,$)|0,r=r+Math.imul(f,Y)|0;var Ce=(c+(n=n+Math.imul(d,X)|0)|0)+((8191&(s=(s=s+Math.imul(d,Z)|0)+Math.imul(u,X)|0))<<13)|0;c=((r=r+Math.imul(u,Z)|0)+(s>>>13)|0)+(Ce>>>26)|0,Ce&=67108863,n=Math.imul(x,H),s=(s=Math.imul(x,z))+Math.imul(E,H)|0,r=Math.imul(E,z),n=n+Math.imul(b,W)|0,s=(s=s+Math.imul(b,j)|0)+Math.imul(S,W)|0,r=r+Math.imul(S,j)|0,n=n+Math.imul(v,$)|0,s=(s=s+Math.imul(v,Y)|0)+Math.imul(y,$)|0,r=r+Math.imul(y,Y)|0,n=n+Math.imul(g,X)|0,s=(s=s+Math.imul(g,Z)|0)+Math.imul(f,X)|0,r=r+Math.imul(f,Z)|0;var be=(c+(n=n+Math.imul(d,J)|0)|0)+((8191&(s=(s=s+Math.imul(d,ee)|0)+Math.imul(u,J)|0))<<13)|0;c=((r=r+Math.imul(u,ee)|0)+(s>>>13)|0)+(be>>>26)|0,be&=67108863,n=Math.imul(A,H),s=(s=Math.imul(A,z))+Math.imul(T,H)|0,r=Math.imul(T,z),n=n+Math.imul(x,W)|0,s=(s=s+Math.imul(x,j)|0)+Math.imul(E,W)|0,r=r+Math.imul(E,j)|0,n=n+Math.imul(b,$)|0,s=(s=s+Math.imul(b,Y)|0)+Math.imul(S,$)|0,r=r+Math.imul(S,Y)|0,n=n+Math.imul(v,X)|0,s=(s=s+Math.imul(v,Z)|0)+Math.imul(y,X)|0,r=r+Math.imul(y,Z)|0,n=n+Math.imul(g,J)|0,s=(s=s+Math.imul(g,ee)|0)+Math.imul(f,J)|0,r=r+Math.imul(f,ee)|0;var Se=(c+(n=n+Math.imul(d,ie)|0)|0)+((8191&(s=(s=s+Math.imul(d,ne)|0)+Math.imul(u,ie)|0))<<13)|0;c=((r=r+Math.imul(u,ne)|0)+(s>>>13)|0)+(Se>>>26)|0,Se&=67108863,n=Math.imul(I,H),s=(s=Math.imul(I,z))+Math.imul(R,H)|0,r=Math.imul(R,z),n=n+Math.imul(A,W)|0,s=(s=s+Math.imul(A,j)|0)+Math.imul(T,W)|0,r=r+Math.imul(T,j)|0,n=n+Math.imul(x,$)|0,s=(s=s+Math.imul(x,Y)|0)+Math.imul(E,$)|0,r=r+Math.imul(E,Y)|0,n=n+Math.imul(b,X)|0,s=(s=s+Math.imul(b,Z)|0)+Math.imul(S,X)|0,r=r+Math.imul(S,Z)|0,n=n+Math.imul(v,J)|0,s=(s=s+Math.imul(v,ee)|0)+Math.imul(y,J)|0,r=r+Math.imul(y,ee)|0,n=n+Math.imul(g,ie)|0,s=(s=s+Math.imul(g,ne)|0)+Math.imul(f,ie)|0,r=r+Math.imul(f,ne)|0;var we=(c+(n=n+Math.imul(d,re)|0)|0)+((8191&(s=(s=s+Math.imul(d,oe)|0)+Math.imul(u,re)|0))<<13)|0;c=((r=r+Math.imul(u,oe)|0)+(s>>>13)|0)+(we>>>26)|0,we&=67108863,n=Math.imul(k,H),s=(s=Math.imul(k,z))+Math.imul(P,H)|0,r=Math.imul(P,z),n=n+Math.imul(I,W)|0,s=(s=s+Math.imul(I,j)|0)+Math.imul(R,W)|0,r=r+Math.imul(R,j)|0,n=n+Math.imul(A,$)|0,s=(s=s+Math.imul(A,Y)|0)+Math.imul(T,$)|0,r=r+Math.imul(T,Y)|0,n=n+Math.imul(x,X)|0,s=(s=s+Math.imul(x,Z)|0)+Math.imul(E,X)|0,r=r+Math.imul(E,Z)|0,n=n+Math.imul(b,J)|0,s=(s=s+Math.imul(b,ee)|0)+Math.imul(S,J)|0,r=r+Math.imul(S,ee)|0,n=n+Math.imul(v,ie)|0,s=(s=s+Math.imul(v,ne)|0)+Math.imul(y,ie)|0,r=r+Math.imul(y,ne)|0,n=n+Math.imul(g,re)|0,s=(s=s+Math.imul(g,oe)|0)+Math.imul(f,re)|0,r=r+Math.imul(f,oe)|0;var xe=(c+(n=n+Math.imul(d,le)|0)|0)+((8191&(s=(s=s+Math.imul(d,ce)|0)+Math.imul(u,le)|0))<<13)|0;c=((r=r+Math.imul(u,ce)|0)+(s>>>13)|0)+(xe>>>26)|0,xe&=67108863,n=Math.imul(O,H),s=(s=Math.imul(O,z))+Math.imul(_,H)|0,r=Math.imul(_,z),n=n+Math.imul(k,W)|0,s=(s=s+Math.imul(k,j)|0)+Math.imul(P,W)|0,r=r+Math.imul(P,j)|0,n=n+Math.imul(I,$)|0,s=(s=s+Math.imul(I,Y)|0)+Math.imul(R,$)|0,r=r+Math.imul(R,Y)|0,n=n+Math.imul(A,X)|0,s=(s=s+Math.imul(A,Z)|0)+Math.imul(T,X)|0,r=r+Math.imul(T,Z)|0,n=n+Math.imul(x,J)|0,s=(s=s+Math.imul(x,ee)|0)+Math.imul(E,J)|0,r=r+Math.imul(E,ee)|0,n=n+Math.imul(b,ie)|0,s=(s=s+Math.imul(b,ne)|0)+Math.imul(S,ie)|0,r=r+Math.imul(S,ne)|0,n=n+Math.imul(v,re)|0,s=(s=s+Math.imul(v,oe)|0)+Math.imul(y,re)|0,r=r+Math.imul(y,oe)|0,n=n+Math.imul(g,le)|0,s=(s=s+Math.imul(g,ce)|0)+Math.imul(f,le)|0,r=r+Math.imul(f,ce)|0;var Ee=(c+(n=n+Math.imul(d,de)|0)|0)+((8191&(s=(s=s+Math.imul(d,ue)|0)+Math.imul(u,de)|0))<<13)|0;c=((r=r+Math.imul(u,ue)|0)+(s>>>13)|0)+(Ee>>>26)|0,Ee&=67108863,n=Math.imul(G,H),s=(s=Math.imul(G,z))+Math.imul(V,H)|0,r=Math.imul(V,z),n=n+Math.imul(O,W)|0,s=(s=s+Math.imul(O,j)|0)+Math.imul(_,W)|0,r=r+Math.imul(_,j)|0,n=n+Math.imul(k,$)|0,s=(s=s+Math.imul(k,Y)|0)+Math.imul(P,$)|0,r=r+Math.imul(P,Y)|0,n=n+Math.imul(I,X)|0,s=(s=s+Math.imul(I,Z)|0)+Math.imul(R,X)|0,r=r+Math.imul(R,Z)|0,n=n+Math.imul(A,J)|0,s=(s=s+Math.imul(A,ee)|0)+Math.imul(T,J)|0,r=r+Math.imul(T,ee)|0,n=n+Math.imul(x,ie)|0,s=(s=s+Math.imul(x,ne)|0)+Math.imul(E,ie)|0,r=r+Math.imul(E,ne)|0,n=n+Math.imul(b,re)|0,s=(s=s+Math.imul(b,oe)|0)+Math.imul(S,re)|0,r=r+Math.imul(S,oe)|0,n=n+Math.imul(v,le)|0,s=(s=s+Math.imul(v,ce)|0)+Math.imul(y,le)|0,r=r+Math.imul(y,ce)|0,n=n+Math.imul(g,de)|0,s=(s=s+Math.imul(g,ue)|0)+Math.imul(f,de)|0,r=r+Math.imul(f,ue)|0;var Me=(c+(n=n+Math.imul(d,ge)|0)|0)+((8191&(s=(s=s+Math.imul(d,fe)|0)+Math.imul(u,ge)|0))<<13)|0;c=((r=r+Math.imul(u,fe)|0)+(s>>>13)|0)+(Me>>>26)|0,Me&=67108863,n=Math.imul(G,W),s=(s=Math.imul(G,j))+Math.imul(V,W)|0,r=Math.imul(V,j),n=n+Math.imul(O,$)|0,s=(s=s+Math.imul(O,Y)|0)+Math.imul(_,$)|0,r=r+Math.imul(_,Y)|0,n=n+Math.imul(k,X)|0,s=(s=s+Math.imul(k,Z)|0)+Math.imul(P,X)|0,r=r+Math.imul(P,Z)|0,n=n+Math.imul(I,J)|0,s=(s=s+Math.imul(I,ee)|0)+Math.imul(R,J)|0,r=r+Math.imul(R,ee)|0,n=n+Math.imul(A,ie)|0,s=(s=s+Math.imul(A,ne)|0)+Math.imul(T,ie)|0,r=r+Math.imul(T,ne)|0,n=n+Math.imul(x,re)|0,s=(s=s+Math.imul(x,oe)|0)+Math.imul(E,re)|0,r=r+Math.imul(E,oe)|0,n=n+Math.imul(b,le)|0,s=(s=s+Math.imul(b,ce)|0)+Math.imul(S,le)|0,r=r+Math.imul(S,ce)|0,n=n+Math.imul(v,de)|0,s=(s=s+Math.imul(v,ue)|0)+Math.imul(y,de)|0,r=r+Math.imul(y,ue)|0;var Ae=(c+(n=n+Math.imul(g,ge)|0)|0)+((8191&(s=(s=s+Math.imul(g,fe)|0)+Math.imul(f,ge)|0))<<13)|0;c=((r=r+Math.imul(f,fe)|0)+(s>>>13)|0)+(Ae>>>26)|0,Ae&=67108863,n=Math.imul(G,$),s=(s=Math.imul(G,Y))+Math.imul(V,$)|0,r=Math.imul(V,Y),n=n+Math.imul(O,X)|0,s=(s=s+Math.imul(O,Z)|0)+Math.imul(_,X)|0,r=r+Math.imul(_,Z)|0,n=n+Math.imul(k,J)|0,s=(s=s+Math.imul(k,ee)|0)+Math.imul(P,J)|0,r=r+Math.imul(P,ee)|0,n=n+Math.imul(I,ie)|0,s=(s=s+Math.imul(I,ne)|0)+Math.imul(R,ie)|0,r=r+Math.imul(R,ne)|0,n=n+Math.imul(A,re)|0,s=(s=s+Math.imul(A,oe)|0)+Math.imul(T,re)|0,r=r+Math.imul(T,oe)|0,n=n+Math.imul(x,le)|0,s=(s=s+Math.imul(x,ce)|0)+Math.imul(E,le)|0,r=r+Math.imul(E,ce)|0,n=n+Math.imul(b,de)|0,s=(s=s+Math.imul(b,ue)|0)+Math.imul(S,de)|0,r=r+Math.imul(S,ue)|0;var Te=(c+(n=n+Math.imul(v,ge)|0)|0)+((8191&(s=(s=s+Math.imul(v,fe)|0)+Math.imul(y,ge)|0))<<13)|0;c=((r=r+Math.imul(y,fe)|0)+(s>>>13)|0)+(Te>>>26)|0,Te&=67108863,n=Math.imul(G,X),s=(s=Math.imul(G,Z))+Math.imul(V,X)|0,r=Math.imul(V,Z),n=n+Math.imul(O,J)|0,s=(s=s+Math.imul(O,ee)|0)+Math.imul(_,J)|0,r=r+Math.imul(_,ee)|0,n=n+Math.imul(k,ie)|0,s=(s=s+Math.imul(k,ne)|0)+Math.imul(P,ie)|0,r=r+Math.imul(P,ne)|0,n=n+Math.imul(I,re)|0,s=(s=s+Math.imul(I,oe)|0)+Math.imul(R,re)|0,r=r+Math.imul(R,oe)|0,n=n+Math.imul(A,le)|0,s=(s=s+Math.imul(A,ce)|0)+Math.imul(T,le)|0,r=r+Math.imul(T,ce)|0,n=n+Math.imul(x,de)|0,s=(s=s+Math.imul(x,ue)|0)+Math.imul(E,de)|0,r=r+Math.imul(E,ue)|0;var De=(c+(n=n+Math.imul(b,ge)|0)|0)+((8191&(s=(s=s+Math.imul(b,fe)|0)+Math.imul(S,ge)|0))<<13)|0;c=((r=r+Math.imul(S,fe)|0)+(s>>>13)|0)+(De>>>26)|0,De&=67108863,n=Math.imul(G,J),s=(s=Math.imul(G,ee))+Math.imul(V,J)|0,r=Math.imul(V,ee),n=n+Math.imul(O,ie)|0,s=(s=s+Math.imul(O,ne)|0)+Math.imul(_,ie)|0,r=r+Math.imul(_,ne)|0,n=n+Math.imul(k,re)|0,s=(s=s+Math.imul(k,oe)|0)+Math.imul(P,re)|0,r=r+Math.imul(P,oe)|0,n=n+Math.imul(I,le)|0,s=(s=s+Math.imul(I,ce)|0)+Math.imul(R,le)|0,r=r+Math.imul(R,ce)|0,n=n+Math.imul(A,de)|0,s=(s=s+Math.imul(A,ue)|0)+Math.imul(T,de)|0,r=r+Math.imul(T,ue)|0;var Ie=(c+(n=n+Math.imul(x,ge)|0)|0)+((8191&(s=(s=s+Math.imul(x,fe)|0)+Math.imul(E,ge)|0))<<13)|0;c=((r=r+Math.imul(E,fe)|0)+(s>>>13)|0)+(Ie>>>26)|0,Ie&=67108863,n=Math.imul(G,ie),s=(s=Math.imul(G,ne))+Math.imul(V,ie)|0,r=Math.imul(V,ne),n=n+Math.imul(O,re)|0,s=(s=s+Math.imul(O,oe)|0)+Math.imul(_,re)|0,r=r+Math.imul(_,oe)|0,n=n+Math.imul(k,le)|0,s=(s=s+Math.imul(k,ce)|0)+Math.imul(P,le)|0,r=r+Math.imul(P,ce)|0,n=n+Math.imul(I,de)|0,s=(s=s+Math.imul(I,ue)|0)+Math.imul(R,de)|0,r=r+Math.imul(R,ue)|0;var Re=(c+(n=n+Math.imul(A,ge)|0)|0)+((8191&(s=(s=s+Math.imul(A,fe)|0)+Math.imul(T,ge)|0))<<13)|0;c=((r=r+Math.imul(T,fe)|0)+(s>>>13)|0)+(Re>>>26)|0,Re&=67108863,n=Math.imul(G,re),s=(s=Math.imul(G,oe))+Math.imul(V,re)|0,r=Math.imul(V,oe),n=n+Math.imul(O,le)|0,s=(s=s+Math.imul(O,ce)|0)+Math.imul(_,le)|0,r=r+Math.imul(_,ce)|0,n=n+Math.imul(k,de)|0,s=(s=s+Math.imul(k,ue)|0)+Math.imul(P,de)|0,r=r+Math.imul(P,ue)|0;var Le=(c+(n=n+Math.imul(I,ge)|0)|0)+((8191&(s=(s=s+Math.imul(I,fe)|0)+Math.imul(R,ge)|0))<<13)|0;c=((r=r+Math.imul(R,fe)|0)+(s>>>13)|0)+(Le>>>26)|0,Le&=67108863,n=Math.imul(G,le),s=(s=Math.imul(G,ce))+Math.imul(V,le)|0,r=Math.imul(V,ce),n=n+Math.imul(O,de)|0,s=(s=s+Math.imul(O,ue)|0)+Math.imul(_,de)|0,r=r+Math.imul(_,ue)|0;var ke=(c+(n=n+Math.imul(k,ge)|0)|0)+((8191&(s=(s=s+Math.imul(k,fe)|0)+Math.imul(P,ge)|0))<<13)|0;c=((r=r+Math.imul(P,fe)|0)+(s>>>13)|0)+(ke>>>26)|0,ke&=67108863,n=Math.imul(G,de),s=(s=Math.imul(G,ue))+Math.imul(V,de)|0,r=Math.imul(V,ue);var Pe=(c+(n=n+Math.imul(O,ge)|0)|0)+((8191&(s=(s=s+Math.imul(O,fe)|0)+Math.imul(_,ge)|0))<<13)|0;c=((r=r+Math.imul(_,fe)|0)+(s>>>13)|0)+(Pe>>>26)|0,Pe&=67108863;var Ne=(c+(n=Math.imul(G,ge))|0)+((8191&(s=(s=Math.imul(G,fe))+Math.imul(V,ge)|0))<<13)|0;return c=((r=Math.imul(V,fe))+(s>>>13)|0)+(Ne>>>26)|0,Ne&=67108863,l[0]=me,l[1]=ve,l[2]=ye,l[3]=Ce,l[4]=be,l[5]=Se,l[6]=we,l[7]=xe,l[8]=Ee,l[9]=Me,l[10]=Ae,l[11]=Te,l[12]=De,l[13]=Ie,l[14]=Re,l[15]=Le,l[16]=ke,l[17]=Pe,l[18]=Ne,0!==c&&(l[19]=c,i.length++),i};function v(e,t,i){i.negative=t.negative^e.negative,i.length=e.length+t.length;for(var n=0,s=0,r=0;r<i.length-1;r++){var o=s;s=0;for(var a=67108863&n,l=Math.min(r,t.length-1),c=Math.max(0,r-e.length+1);c<=l;c++){var h=r-c,d=(0|e.words[h])*(0|t.words[c]),u=67108863&d;a=67108863&(u=u+a|0),s+=(o=(o=o+(d/67108864|0)|0)+(u>>>26)|0)>>>26,o&=67108863}i.words[r]=a,n=o,o=s}return 0!==n?i.words[r]=n:i.length--,i._strip()}function y(e,t,i){return v(e,t,i)}function C(e,t){this.x=e,this.y=t}Math.imul||(m=f),r.prototype.mulTo=function(e,t){var i=this.length+e.length;return 10===this.length&&10===e.length?m(this,e,t):i<63?f(this,e,t):i<1024?v(this,e,t):y(this,e,t)},C.prototype.makeRBT=function(e){for(var t=new Array(e),i=r.prototype._countBits(e)-1,n=0;n<e;n++)t[n]=this.revBin(n,i,e);return t},C.prototype.revBin=function(e,t,i){if(0===e||e===i-1)return e;for(var n=0,s=0;s<t;s++)n|=(1&e)<<t-s-1,e>>=1;return n},C.prototype.permute=function(e,t,i,n,s,r){for(var o=0;o<r;o++)n[o]=t[e[o]],s[o]=i[e[o]]},C.prototype.transform=function(e,t,i,n,s,r){this.permute(r,e,t,i,n,s);for(var o=1;o<s;o<<=1)for(var a=o<<1,l=Math.cos(2*Math.PI/a),c=Math.sin(2*Math.PI/a),h=0;h<s;h+=a)for(var d=l,u=c,p=0;p<o;p++){var g=i[h+p],f=n[h+p],m=i[h+p+o],v=n[h+p+o],y=d*m-u*v;v=d*v+u*m,m=y,i[h+p]=g+m,n[h+p]=f+v,i[h+p+o]=g-m,n[h+p+o]=f-v,p!==a&&(y=l*d-c*u,u=l*u+c*d,d=y)}},C.prototype.guessLen13b=function(e,t){var i=1|Math.max(t,e),n=1&i,s=0;for(i=i/2|0;i;i>>>=1)s++;return 1<<s+1+n},C.prototype.conjugate=function(e,t,i){if(!(i<=1))for(var n=0;n<i/2;n++){var s=e[n];e[n]=e[i-n-1],e[i-n-1]=s,s=t[n],t[n]=-t[i-n-1],t[i-n-1]=-s}},C.prototype.normalize13b=function(e,t){for(var i=0,n=0;n<t/2;n++){var s=8192*Math.round(e[2*n+1]/t)+Math.round(e[2*n]/t)+i;e[n]=67108863&s,i=s<67108864?0:s/67108864|0}return e},C.prototype.convert13b=function(e,t,i,s){for(var r=0,o=0;o<t;o++)r+=0|e[o],i[2*o]=8191&r,r>>>=13,i[2*o+1]=8191&r,r>>>=13;for(o=2*t;o<s;++o)i[o]=0;n(0===r),n(!(-8192&r))},C.prototype.stub=function(e){for(var t=new Array(e),i=0;i<e;i++)t[i]=0;return t},C.prototype.mulp=function(e,t,i){var n=2*this.guessLen13b(e.length,t.length),s=this.makeRBT(n),r=this.stub(n),o=new Array(n),a=new Array(n),l=new Array(n),c=new Array(n),h=new Array(n),d=new Array(n),u=i.words;u.length=n,this.convert13b(e.words,e.length,o,n),this.convert13b(t.words,t.length,c,n),this.transform(o,r,a,l,n,s),this.transform(c,r,h,d,n,s);for(var p=0;p<n;p++){var g=a[p]*h[p]-l[p]*d[p];l[p]=a[p]*d[p]+l[p]*h[p],a[p]=g}return this.conjugate(a,l,n),this.transform(a,l,u,r,n,s),this.conjugate(u,r,n),this.normalize13b(u,n),i.negative=e.negative^t.negative,i.length=e.length+t.length,i._strip()},r.prototype.mul=function(e){var t=new r(null);return t.words=new Array(this.length+e.length),this.mulTo(e,t)},r.prototype.mulf=function(e){var t=new r(null);return t.words=new Array(this.length+e.length),y(this,e,t)},r.prototype.imul=function(e){return this.clone().mulTo(e,this)},r.prototype.imuln=function(e){var t=e<0;t&&(e=-e),n("number"==typeof e),n(e<67108864);for(var i=0,s=0;s<this.length;s++){var r=(0|this.words[s])*e,o=(67108863&r)+(67108863&i);i>>=26,i+=r/67108864|0,i+=o>>>26,this.words[s]=67108863&o}return 0!==i&&(this.words[s]=i,this.length++),this.length=0===e?1:this.length,t?this.ineg():this},r.prototype.muln=function(e){return this.clone().imuln(e)},r.prototype.sqr=function(){return this.mul(this)},r.prototype.isqr=function(){return this.imul(this.clone())},r.prototype.pow=function(e){var t=function(e){for(var t=new Array(e.bitLength()),i=0;i<t.length;i++){var n=i/26|0,s=i%26;t[i]=e.words[n]>>>s&1}return t}(e);if(0===t.length)return new r(1);for(var i=this,n=0;n<t.length&&0===t[n];n++,i=i.sqr());if(++n<t.length)for(var s=i.sqr();n<t.length;n++,s=s.sqr())0!==t[n]&&(i=i.mul(s));return i},r.prototype.iushln=function(e){n("number"==typeof e&&e>=0);var t,i=e%26,s=(e-i)/26,r=67108863>>>26-i<<26-i;if(0!==i){var o=0;for(t=0;t<this.length;t++){var a=this.words[t]&r,l=(0|this.words[t])-a<<i;this.words[t]=l|o,o=a>>>26-i}o&&(this.words[t]=o,this.length++)}if(0!==s){for(t=this.length-1;t>=0;t--)this.words[t+s]=this.words[t];for(t=0;t<s;t++)this.words[t]=0;this.length+=s}return this._strip()},r.prototype.ishln=function(e){return n(0===this.negative),this.iushln(e)},r.prototype.iushrn=function(e,t,i){var s;n("number"==typeof e&&e>=0),s=t?(t-t%26)/26:0;var r=e%26,o=Math.min((e-r)/26,this.length),a=67108863^67108863>>>r<<r,l=i;if(s-=o,s=Math.max(0,s),l){for(var c=0;c<o;c++)l.words[c]=this.words[c];l.length=o}if(0===o);else if(this.length>o)for(this.length-=o,c=0;c<this.length;c++)this.words[c]=this.words[c+o];else this.words[0]=0,this.length=1;var h=0;for(c=this.length-1;c>=0&&(0!==h||c>=s);c--){var d=0|this.words[c];this.words[c]=h<<26-r|d>>>r,h=d&a}return l&&0!==h&&(l.words[l.length++]=h),0===this.length&&(this.words[0]=0,this.length=1),this._strip()},r.prototype.ishrn=function(e,t,i){return n(0===this.negative),this.iushrn(e,t,i)},r.prototype.shln=function(e){return this.clone().ishln(e)},r.prototype.ushln=function(e){return this.clone().iushln(e)},r.prototype.shrn=function(e){return this.clone().ishrn(e)},r.prototype.ushrn=function(e){return this.clone().iushrn(e)},r.prototype.testn=function(e){n("number"==typeof e&&e>=0);var t=e%26,i=(e-t)/26,s=1<<t;return!(this.length<=i||!(this.words[i]&s))},r.prototype.imaskn=function(e){n("number"==typeof e&&e>=0);var t=e%26,i=(e-t)/26;if(n(0===this.negative,"imaskn works only with positive numbers"),this.length<=i)return this;if(0!==t&&i++,this.length=Math.min(i,this.length),0!==t){var s=67108863^67108863>>>t<<t;this.words[this.length-1]&=s}return 0===this.length&&(this.words[0]=0,this.length=1),this._strip()},r.prototype.maskn=function(e){return this.clone().imaskn(e)},r.prototype.iaddn=function(e){return n("number"==typeof e),n(e<67108864),e<0?this.isubn(-e):0!==this.negative?1===this.length&&(0|this.words[0])<=e?(this.words[0]=e-(0|this.words[0]),this.negative=0,this):(this.negative=0,this.isubn(e),this.negative=1,this):this._iaddn(e)},r.prototype._iaddn=function(e){this.words[0]+=e;for(var t=0;t<this.length&&this.words[t]>=67108864;t++)this.words[t]-=67108864,t===this.length-1?this.words[t+1]=1:this.words[t+1]++;return this.length=Math.max(this.length,t+1),this},r.prototype.isubn=function(e){if(n("number"==typeof e),n(e<67108864),e<0)return this.iaddn(-e);if(0!==this.negative)return this.negative=0,this.iaddn(e),this.negative=1,this;if(this.words[0]-=e,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var t=0;t<this.length&&this.words[t]<0;t++)this.words[t]+=67108864,this.words[t+1]-=1;return this._strip()},r.prototype.addn=function(e){return this.clone().iaddn(e)},r.prototype.subn=function(e){return this.clone().isubn(e)},r.prototype.iabs=function(){return this.negative=0,this},r.prototype.abs=function(){return this.clone().iabs()},r.prototype._ishlnsubmul=function(e,t,i){var s,r,o=e.length+i;this._expand(o);var a=0;for(s=0;s<e.length;s++){r=(0|this.words[s+i])+a;var l=(0|e.words[s])*t;a=((r-=67108863&l)>>26)-(l/67108864|0),this.words[s+i]=67108863&r}for(;s<this.length-i;s++)a=(r=(0|this.words[s+i])+a)>>26,this.words[s+i]=67108863&r;if(0===a)return this._strip();for(n(-1===a),a=0,s=0;s<this.length;s++)a=(r=-(0|this.words[s])+a)>>26,this.words[s]=67108863&r;return this.negative=1,this._strip()},r.prototype._wordDiv=function(e,t){var i=(this.length,e.length),n=this.clone(),s=e,o=0|s.words[s.length-1];0!=(i=26-this._countBits(o))&&(s=s.ushln(i),n.iushln(i),o=0|s.words[s.length-1]);var a,l=n.length-s.length;if("mod"!==t){(a=new r(null)).length=l+1,a.words=new Array(a.length);for(var c=0;c<a.length;c++)a.words[c]=0}var h=n.clone()._ishlnsubmul(s,1,l);0===h.negative&&(n=h,a&&(a.words[l]=1));for(var d=l-1;d>=0;d--){var u=67108864*(0|n.words[s.length+d])+(0|n.words[s.length+d-1]);for(u=Math.min(u/o|0,67108863),n._ishlnsubmul(s,u,d);0!==n.negative;)u--,n.negative=0,n._ishlnsubmul(s,1,d),n.isZero()||(n.negative^=1);a&&(a.words[d]=u)}return a&&a._strip(),n._strip(),"div"!==t&&0!==i&&n.iushrn(i),{div:a||null,mod:n}},r.prototype.divmod=function(e,t,i){return n(!e.isZero()),this.isZero()?{div:new r(0),mod:new r(0)}:0!==this.negative&&0===e.negative?(a=this.neg().divmod(e,t),"mod"!==t&&(s=a.div.neg()),"div"!==t&&(o=a.mod.neg(),i&&0!==o.negative&&o.iadd(e)),{div:s,mod:o}):0===this.negative&&0!==e.negative?(a=this.divmod(e.neg(),t),"mod"!==t&&(s=a.div.neg()),{div:s,mod:a.mod}):0!==(this.negative&e.negative)?(a=this.neg().divmod(e.neg(),t),"div"!==t&&(o=a.mod.neg(),i&&0!==o.negative&&o.isub(e)),{div:a.div,mod:o}):e.length>this.length||this.cmp(e)<0?{div:new r(0),mod:this}:1===e.length?"div"===t?{div:this.divn(e.words[0]),mod:null}:"mod"===t?{div:null,mod:new r(this.modrn(e.words[0]))}:{div:this.divn(e.words[0]),mod:new r(this.modrn(e.words[0]))}:this._wordDiv(e,t);var s,o,a},r.prototype.div=function(e){return this.divmod(e,"div",!1).div},r.prototype.mod=function(e){return this.divmod(e,"mod",!1).mod},r.prototype.umod=function(e){return this.divmod(e,"mod",!0).mod},r.prototype.divRound=function(e){var t=this.divmod(e);if(t.mod.isZero())return t.div;var i=0!==t.div.negative?t.mod.isub(e):t.mod,n=e.ushrn(1),s=e.andln(1),r=i.cmp(n);return r<0||1===s&&0===r?t.div:0!==t.div.negative?t.div.isubn(1):t.div.iaddn(1)},r.prototype.modrn=function(e){var t=e<0;t&&(e=-e),n(e<=67108863);for(var i=(1<<26)%e,s=0,r=this.length-1;r>=0;r--)s=(i*s+(0|this.words[r]))%e;return t?-s:s},r.prototype.modn=function(e){return this.modrn(e)},r.prototype.idivn=function(e){var t=e<0;t&&(e=-e),n(e<=67108863);for(var i=0,s=this.length-1;s>=0;s--){var r=(0|this.words[s])+67108864*i;this.words[s]=r/e|0,i=r%e}return this._strip(),t?this.ineg():this},r.prototype.divn=function(e){return this.clone().idivn(e)},r.prototype.egcd=function(e){n(0===e.negative),n(!e.isZero());var t=this,i=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var s=new r(1),o=new r(0),a=new r(0),l=new r(1),c=0;t.isEven()&&i.isEven();)t.iushrn(1),i.iushrn(1),++c;for(var h=i.clone(),d=t.clone();!t.isZero();){for(var u=0,p=1;0===(t.words[0]&p)&&u<26;++u,p<<=1);if(u>0)for(t.iushrn(u);u-- >0;)(s.isOdd()||o.isOdd())&&(s.iadd(h),o.isub(d)),s.iushrn(1),o.iushrn(1);for(var g=0,f=1;0===(i.words[0]&f)&&g<26;++g,f<<=1);if(g>0)for(i.iushrn(g);g-- >0;)(a.isOdd()||l.isOdd())&&(a.iadd(h),l.isub(d)),a.iushrn(1),l.iushrn(1);t.cmp(i)>=0?(t.isub(i),s.isub(a),o.isub(l)):(i.isub(t),a.isub(s),l.isub(o))}return{a,b:l,gcd:i.iushln(c)}},r.prototype._invmp=function(e){n(0===e.negative),n(!e.isZero());var t=this,i=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var s,o=new r(1),a=new r(0),l=i.clone();t.cmpn(1)>0&&i.cmpn(1)>0;){for(var c=0,h=1;0===(t.words[0]&h)&&c<26;++c,h<<=1);if(c>0)for(t.iushrn(c);c-- >0;)o.isOdd()&&o.iadd(l),o.iushrn(1);for(var d=0,u=1;0===(i.words[0]&u)&&d<26;++d,u<<=1);if(d>0)for(i.iushrn(d);d-- >0;)a.isOdd()&&a.iadd(l),a.iushrn(1);t.cmp(i)>=0?(t.isub(i),o.isub(a)):(i.isub(t),a.isub(o))}return(s=0===t.cmpn(1)?o:a).cmpn(0)<0&&s.iadd(e),s},r.prototype.gcd=function(e){if(this.isZero())return e.abs();if(e.isZero())return this.abs();var t=this.clone(),i=e.clone();t.negative=0,i.negative=0;for(var n=0;t.isEven()&&i.isEven();n++)t.iushrn(1),i.iushrn(1);for(;;){for(;t.isEven();)t.iushrn(1);for(;i.isEven();)i.iushrn(1);var s=t.cmp(i);if(s<0){var r=t;t=i,i=r}else if(0===s||0===i.cmpn(1))break;t.isub(i)}return i.iushln(n)},r.prototype.invm=function(e){return this.egcd(e).a.umod(e)},r.prototype.isEven=function(){return!(1&this.words[0])},r.prototype.isOdd=function(){return!(1&~this.words[0])},r.prototype.andln=function(e){return this.words[0]&e},r.prototype.bincn=function(e){n("number"==typeof e);var t=e%26,i=(e-t)/26,s=1<<t;if(this.length<=i)return this._expand(i+1),this.words[i]|=s,this;for(var r=s,o=i;0!==r&&o<this.length;o++){var a=0|this.words[o];r=(a+=r)>>>26,a&=67108863,this.words[o]=a}return 0!==r&&(this.words[o]=r,this.length++),this},r.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},r.prototype.cmpn=function(e){var t,i=e<0;if(0!==this.negative&&!i)return-1;if(0===this.negative&&i)return 1;if(this._strip(),this.length>1)t=1;else{i&&(e=-e),n(e<=67108863,"Number is too big");var s=0|this.words[0];t=s===e?0:s<e?-1:1}return 0!==this.negative?0|-t:t},r.prototype.cmp=function(e){if(0!==this.negative&&0===e.negative)return-1;if(0===this.negative&&0!==e.negative)return 1;var t=this.ucmp(e);return 0!==this.negative?0|-t:t},r.prototype.ucmp=function(e){if(this.length>e.length)return 1;if(this.length<e.length)return-1;for(var t=0,i=this.length-1;i>=0;i--){var n=0|this.words[i],s=0|e.words[i];if(n!==s){n<s?t=-1:n>s&&(t=1);break}}return t},r.prototype.gtn=function(e){return 1===this.cmpn(e)},r.prototype.gt=function(e){return 1===this.cmp(e)},r.prototype.gten=function(e){return this.cmpn(e)>=0},r.prototype.gte=function(e){return this.cmp(e)>=0},r.prototype.ltn=function(e){return-1===this.cmpn(e)},r.prototype.lt=function(e){return-1===this.cmp(e)},r.prototype.lten=function(e){return this.cmpn(e)<=0},r.prototype.lte=function(e){return this.cmp(e)<=0},r.prototype.eqn=function(e){return 0===this.cmpn(e)},r.prototype.eq=function(e){return 0===this.cmp(e)},r.red=function(e){return new A(e)},r.prototype.toRed=function(e){return n(!this.red,"Already a number in reduction context"),n(0===this.negative,"red works only with positives"),e.convertTo(this)._forceRed(e)},r.prototype.fromRed=function(){return n(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},r.prototype._forceRed=function(e){return this.red=e,this},r.prototype.forceRed=function(e){return n(!this.red,"Already a number in reduction context"),this._forceRed(e)},r.prototype.redAdd=function(e){return n(this.red,"redAdd works only with red numbers"),this.red.add(this,e)},r.prototype.redIAdd=function(e){return n(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,e)},r.prototype.redSub=function(e){return n(this.red,"redSub works only with red numbers"),this.red.sub(this,e)},r.prototype.redISub=function(e){return n(this.red,"redISub works only with red numbers"),this.red.isub(this,e)},r.prototype.redShl=function(e){return n(this.red,"redShl works only with red numbers"),this.red.shl(this,e)},r.prototype.redMul=function(e){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.mul(this,e)},r.prototype.redIMul=function(e){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.imul(this,e)},r.prototype.redSqr=function(){return n(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},r.prototype.redISqr=function(){return n(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},r.prototype.redSqrt=function(){return n(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},r.prototype.redInvm=function(){return n(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},r.prototype.redNeg=function(){return n(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},r.prototype.redPow=function(e){return n(this.red&&!e.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,e)};var b={k256:null,p224:null,p192:null,p25519:null};function S(e,t){this.name=e,this.p=new r(t,16),this.n=this.p.bitLength(),this.k=new r(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function w(){S.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function x(){S.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function E(){S.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function M(){S.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function A(e){if("string"==typeof e){var t=r._prime(e);this.m=t.p,this.prime=t}else n(e.gtn(1),"modulus must be greater than 1"),this.m=e,this.prime=null}function T(e){A.call(this,e),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new r(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}S.prototype._tmp=function(){var e=new r(null);return e.words=new Array(Math.ceil(this.n/13)),e},S.prototype.ireduce=function(e){var t,i=e;do{this.split(i,this.tmp),t=(i=(i=this.imulK(i)).iadd(this.tmp)).bitLength()}while(t>this.n);var n=t<this.n?-1:i.ucmp(this.p);return 0===n?(i.words[0]=0,i.length=1):n>0?i.isub(this.p):void 0!==i.strip?i.strip():i._strip(),i},S.prototype.split=function(e,t){e.iushrn(this.n,0,t)},S.prototype.imulK=function(e){return e.imul(this.k)},s(w,S),w.prototype.split=function(e,t){for(var i=4194303,n=Math.min(e.length,9),s=0;s<n;s++)t.words[s]=e.words[s];if(t.length=n,e.length<=9)return e.words[0]=0,void(e.length=1);var r=e.words[9];for(t.words[t.length++]=r&i,s=10;s<e.length;s++){var o=0|e.words[s];e.words[s-10]=(o&i)<<4|r>>>22,r=o}r>>>=22,e.words[s-10]=r,0===r&&e.length>10?e.length-=10:e.length-=9},w.prototype.imulK=function(e){e.words[e.length]=0,e.words[e.length+1]=0,e.length+=2;for(var t=0,i=0;i<e.length;i++){var n=0|e.words[i];t+=977*n,e.words[i]=67108863&t,t=64*n+(t/67108864|0)}return 0===e.words[e.length-1]&&(e.length--,0===e.words[e.length-1]&&e.length--),e},s(x,S),s(E,S),s(M,S),M.prototype.imulK=function(e){for(var t=0,i=0;i<e.length;i++){var n=19*(0|e.words[i])+t,s=67108863&n;n>>>=26,e.words[i]=s,t=n}return 0!==t&&(e.words[e.length++]=t),e},r._prime=function(e){if(b[e])return b[e];var t;if("k256"===e)t=new w;else if("p224"===e)t=new x;else if("p192"===e)t=new E;else{if("p25519"!==e)throw new Error("Unknown prime "+e);t=new M}return b[e]=t,t},A.prototype._verify1=function(e){n(0===e.negative,"red works only with positives"),n(e.red,"red works only with red numbers")},A.prototype._verify2=function(e,t){n(0===(e.negative|t.negative),"red works only with positives"),n(e.red&&e.red===t.red,"red works only with red numbers")},A.prototype.imod=function(e){return this.prime?this.prime.ireduce(e)._forceRed(this):(h(e,e.umod(this.m)._forceRed(this)),e)},A.prototype.neg=function(e){return e.isZero()?e.clone():this.m.sub(e)._forceRed(this)},A.prototype.add=function(e,t){this._verify2(e,t);var i=e.add(t);return i.cmp(this.m)>=0&&i.isub(this.m),i._forceRed(this)},A.prototype.iadd=function(e,t){this._verify2(e,t);var i=e.iadd(t);return i.cmp(this.m)>=0&&i.isub(this.m),i},A.prototype.sub=function(e,t){this._verify2(e,t);var i=e.sub(t);return i.cmpn(0)<0&&i.iadd(this.m),i._forceRed(this)},A.prototype.isub=function(e,t){this._verify2(e,t);var i=e.isub(t);return i.cmpn(0)<0&&i.iadd(this.m),i},A.prototype.shl=function(e,t){return this._verify1(e),this.imod(e.ushln(t))},A.prototype.imul=function(e,t){return this._verify2(e,t),this.imod(e.imul(t))},A.prototype.mul=function(e,t){return this._verify2(e,t),this.imod(e.mul(t))},A.prototype.isqr=function(e){return this.imul(e,e.clone())},A.prototype.sqr=function(e){return this.mul(e,e)},A.prototype.sqrt=function(e){if(e.isZero())return e.clone();var t=this.m.andln(3);if(n(t%2==1),3===t){var i=this.m.add(new r(1)).iushrn(2);return this.pow(e,i)}for(var s=this.m.subn(1),o=0;!s.isZero()&&0===s.andln(1);)o++,s.iushrn(1);n(!s.isZero());var a=new r(1).toRed(this),l=a.redNeg(),c=this.m.subn(1).iushrn(1),h=this.m.bitLength();for(h=new r(2*h*h).toRed(this);0!==this.pow(h,c).cmp(l);)h.redIAdd(l);for(var d=this.pow(h,s),u=this.pow(e,s.addn(1).iushrn(1)),p=this.pow(e,s),g=o;0!==p.cmp(a);){for(var f=p,m=0;0!==f.cmp(a);m++)f=f.redSqr();n(m<g);var v=this.pow(d,new r(1).iushln(g-m-1));u=u.redMul(v),d=v.redSqr(),p=p.redMul(d),g=m}return u},A.prototype.invm=function(e){var t=e._invmp(this.m);return 0!==t.negative?(t.negative=0,this.imod(t).redNeg()):this.imod(t)},A.prototype.pow=function(e,t){if(t.isZero())return new r(1).toRed(this);if(0===t.cmpn(1))return e.clone();var i=new Array(16);i[0]=new r(1).toRed(this),i[1]=e;for(var n=2;n<i.length;n++)i[n]=this.mul(i[n-1],e);var s=i[0],o=0,a=0,l=t.bitLength()%26;for(0===l&&(l=26),n=t.length-1;n>=0;n--){for(var c=t.words[n],h=l-1;h>=0;h--){var d=c>>h&1;s!==i[0]&&(s=this.sqr(s)),0!==d||0!==o?(o<<=1,o|=d,(4===++a||0===n&&0===h)&&(s=this.mul(s,i[o]),a=0,o=0)):a=0}l=26}return s},A.prototype.convertTo=function(e){var t=e.umod(this.m);return t===e?t.clone():t},A.prototype.convertFrom=function(e){var t=e.clone();return t.red=null,t},r.mont=function(e){return new T(e)},s(T,A),T.prototype.convertTo=function(e){return this.imod(e.ushln(this.shift))},T.prototype.convertFrom=function(e){var t=this.imod(e.mul(this.rinv));return t.red=null,t},T.prototype.imul=function(e,t){if(e.isZero()||t.isZero())return e.words[0]=0,e.length=1,e;var i=e.imul(t),n=i.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),s=i.isub(n).iushrn(this.shift),r=s;return s.cmp(this.m)>=0?r=s.isub(this.m):s.cmpn(0)<0&&(r=s.iadd(this.m)),r._forceRed(this)},T.prototype.mul=function(e,t){if(e.isZero()||t.isZero())return new r(0)._forceRed(this);var i=e.mul(t),n=i.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),s=i.isub(n).iushrn(this.shift),o=s;return s.cmp(this.m)>=0?o=s.isub(this.m):s.cmpn(0)<0&&(o=s.iadd(this.m)),o._forceRed(this)},T.prototype.invm=function(e){return this.imod(e._invmp(this.m).mul(this.r2))._forceRed(this)}}(e=i.nmd(e),this)},36621(e){e.exports=function(e){var t={};function i(n){if(t[n])return t[n].exports;var s=t[n]={i:n,l:!1,exports:{}};return e[n].call(s.exports,s,s.exports,i),s.l=!0,s.exports}return i.m=e,i.c=t,i.d=function(e,t,n){i.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},i.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},i.t=function(e,t){if(1&t&&(e=i(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(i.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var s in e)i.d(n,s,function(t){return e[t]}.bind(null,s));return n},i.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return i.d(t,"a",t),t},i.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},i.p="",i(i.s=90)}({17:function(e,t,i){"use strict";t.__esModule=!0,t.default=void 0;var n=i(18),s=function(){function e(){}return e.getFirstMatch=function(e,t){var i=t.match(e);return i&&i.length>0&&i[1]||""},e.getSecondMatch=function(e,t){var i=t.match(e);return i&&i.length>1&&i[2]||""},e.matchAndReturnConst=function(e,t,i){if(e.test(t))return i},e.getWindowsVersionName=function(e){switch(e){case"NT":return"NT";case"XP":case"NT 5.1":return"XP";case"NT 5.0":return"2000";case"NT 5.2":return"2003";case"NT 6.0":return"Vista";case"NT 6.1":return"7";case"NT 6.2":return"8";case"NT 6.3":return"8.1";case"NT 10.0":return"10";default:return}},e.getMacOSVersionName=function(e){var t=e.split(".").splice(0,2).map(function(e){return parseInt(e,10)||0});t.push(0);var i=t[0],n=t[1];if(10===i)switch(n){case 5:return"Leopard";case 6:return"Snow Leopard";case 7:return"Lion";case 8:return"Mountain Lion";case 9:return"Mavericks";case 10:return"Yosemite";case 11:return"El Capitan";case 12:return"Sierra";case 13:return"High Sierra";case 14:return"Mojave";case 15:return"Catalina";default:return}switch(i){case 11:return"Big Sur";case 12:return"Monterey";case 13:return"Ventura";case 14:return"Sonoma";case 15:return"Sequoia";default:return}},e.getAndroidVersionName=function(e){var t=e.split(".").splice(0,2).map(function(e){return parseInt(e,10)||0});if(t.push(0),!(1===t[0]&&t[1]<5))return 1===t[0]&&t[1]<6?"Cupcake":1===t[0]&&t[1]>=6?"Donut":2===t[0]&&t[1]<2?"Eclair":2===t[0]&&2===t[1]?"Froyo":2===t[0]&&t[1]>2?"Gingerbread":3===t[0]?"Honeycomb":4===t[0]&&t[1]<1?"Ice Cream Sandwich":4===t[0]&&t[1]<4?"Jelly Bean":4===t[0]&&t[1]>=4?"KitKat":5===t[0]?"Lollipop":6===t[0]?"Marshmallow":7===t[0]?"Nougat":8===t[0]?"Oreo":9===t[0]?"Pie":void 0},e.getVersionPrecision=function(e){return e.split(".").length},e.compareVersions=function(t,i,n){void 0===n&&(n=!1);var s=e.getVersionPrecision(t),r=e.getVersionPrecision(i),o=Math.max(s,r),a=0,l=e.map([t,i],function(t){var i=o-e.getVersionPrecision(t),n=t+new Array(i+1).join(".0");return e.map(n.split("."),function(e){return new Array(20-e.length).join("0")+e}).reverse()});for(n&&(a=o-Math.min(s,r)),o-=1;o>=a;){if(l[0][o]>l[1][o])return 1;if(l[0][o]===l[1][o]){if(o===a)return 0;o-=1}else if(l[0][o]<l[1][o])return-1}},e.map=function(e,t){var i,n=[];if(Array.prototype.map)return Array.prototype.map.call(e,t);for(i=0;i<e.length;i+=1)n.push(t(e[i]));return n},e.find=function(e,t){var i,n;if(Array.prototype.find)return Array.prototype.find.call(e,t);for(i=0,n=e.length;i<n;i+=1){var s=e[i];if(t(s,i))return s}},e.assign=function(e){for(var t,i,n=e,s=arguments.length,r=new Array(s>1?s-1:0),o=1;o<s;o++)r[o-1]=arguments[o];if(Object.assign)return Object.assign.apply(Object,[e].concat(r));var a=function(){var e=r[t];"object"==typeof e&&null!==e&&Object.keys(e).forEach(function(t){n[t]=e[t]})};for(t=0,i=r.length;t<i;t+=1)a();return e},e.getBrowserAlias=function(e){return n.BROWSER_ALIASES_MAP[e]},e.getBrowserTypeByAlias=function(e){return n.BROWSER_MAP[e]||""},e}();t.default=s,e.exports=t.default},18:function(e,t,i){"use strict";t.__esModule=!0,t.ENGINE_MAP=t.OS_MAP=t.PLATFORMS_MAP=t.BROWSER_MAP=t.BROWSER_ALIASES_MAP=void 0,t.BROWSER_ALIASES_MAP={AmazonBot:"amazonbot","Amazon Silk":"amazon_silk","Android Browser":"android",BaiduSpider:"baiduspider",Bada:"bada",BingCrawler:"bingcrawler",Brave:"brave",BlackBerry:"blackberry","ChatGPT-User":"chatgpt_user",Chrome:"chrome",ClaudeBot:"claudebot",Chromium:"chromium",Diffbot:"diffbot",DuckDuckBot:"duckduckbot",DuckDuckGo:"duckduckgo",Electron:"electron",Epiphany:"epiphany",FacebookExternalHit:"facebookexternalhit",Firefox:"firefox",Focus:"focus",Generic:"generic","Google Search":"google_search",Googlebot:"googlebot",GPTBot:"gptbot","Internet Explorer":"ie",InternetArchiveCrawler:"internetarchivecrawler","K-Meleon":"k_meleon",LibreWolf:"librewolf",Linespider:"linespider",Maxthon:"maxthon","Meta-ExternalAds":"meta_externalads","Meta-ExternalAgent":"meta_externalagent","Meta-ExternalFetcher":"meta_externalfetcher","Meta-WebIndexer":"meta_webindexer","Microsoft Edge":"edge","MZ Browser":"mz","NAVER Whale Browser":"naver","OAI-SearchBot":"oai_searchbot",Omgilibot:"omgilibot",Opera:"opera","Opera Coast":"opera_coast","Pale Moon":"pale_moon",PerplexityBot:"perplexitybot","Perplexity-User":"perplexity_user",PhantomJS:"phantomjs",PingdomBot:"pingdombot",Puffin:"puffin",QQ:"qq",QQLite:"qqlite",QupZilla:"qupzilla",Roku:"roku",Safari:"safari",Sailfish:"sailfish","Samsung Internet for Android":"samsung_internet",SlackBot:"slackbot",SeaMonkey:"seamonkey",Sleipnir:"sleipnir","Sogou Browser":"sogou",Swing:"swing",Tizen:"tizen","UC Browser":"uc",Vivaldi:"vivaldi","WebOS Browser":"webos",WeChat:"wechat",YahooSlurp:"yahooslurp","Yandex Browser":"yandex",YandexBot:"yandexbot",YouBot:"youbot"},t.BROWSER_MAP={amazonbot:"AmazonBot",amazon_silk:"Amazon Silk",android:"Android Browser",baiduspider:"BaiduSpider",bada:"Bada",bingcrawler:"BingCrawler",blackberry:"BlackBerry",brave:"Brave",chatgpt_user:"ChatGPT-User",chrome:"Chrome",claudebot:"ClaudeBot",chromium:"Chromium",diffbot:"Diffbot",duckduckbot:"DuckDuckBot",duckduckgo:"DuckDuckGo",edge:"Microsoft Edge",electron:"Electron",epiphany:"Epiphany",facebookexternalhit:"FacebookExternalHit",firefox:"Firefox",focus:"Focus",generic:"Generic",google_search:"Google Search",googlebot:"Googlebot",gptbot:"GPTBot",ie:"Internet Explorer",internetarchivecrawler:"InternetArchiveCrawler",k_meleon:"K-Meleon",librewolf:"LibreWolf",linespider:"Linespider",maxthon:"Maxthon",meta_externalads:"Meta-ExternalAds",meta_externalagent:"Meta-ExternalAgent",meta_externalfetcher:"Meta-ExternalFetcher",meta_webindexer:"Meta-WebIndexer",mz:"MZ Browser",naver:"NAVER Whale Browser",oai_searchbot:"OAI-SearchBot",omgilibot:"Omgilibot",opera:"Opera",opera_coast:"Opera Coast",pale_moon:"Pale Moon",perplexitybot:"PerplexityBot",perplexity_user:"Perplexity-User",phantomjs:"PhantomJS",pingdombot:"PingdomBot",puffin:"Puffin",qq:"QQ Browser",qqlite:"QQ Browser Lite",qupzilla:"QupZilla",roku:"Roku",safari:"Safari",sailfish:"Sailfish",samsung_internet:"Samsung Internet for Android",seamonkey:"SeaMonkey",slackbot:"SlackBot",sleipnir:"Sleipnir",sogou:"Sogou Browser",swing:"Swing",tizen:"Tizen",uc:"UC Browser",vivaldi:"Vivaldi",webos:"WebOS Browser",wechat:"WeChat",yahooslurp:"YahooSlurp",yandex:"Yandex Browser",yandexbot:"YandexBot",youbot:"YouBot"},t.PLATFORMS_MAP={bot:"bot",desktop:"desktop",mobile:"mobile",tablet:"tablet",tv:"tv"},t.OS_MAP={Android:"Android",Bada:"Bada",BlackBerry:"BlackBerry",ChromeOS:"Chrome OS",HarmonyOS:"HarmonyOS",iOS:"iOS",Linux:"Linux",MacOS:"macOS",PlayStation4:"PlayStation 4",Roku:"Roku",Tizen:"Tizen",WebOS:"WebOS",Windows:"Windows",WindowsPhone:"Windows Phone"},t.ENGINE_MAP={Blink:"Blink",EdgeHTML:"EdgeHTML",Gecko:"Gecko",Presto:"Presto",Trident:"Trident",WebKit:"WebKit"}},90:function(e,t,i){"use strict";t.__esModule=!0,t.default=void 0;var n,s=(n=i(91))&&n.__esModule?n:{default:n},r=i(18);function o(e,t){for(var i=0;i<t.length;i++){var n=t[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}var a=function(){function e(){}var t,i;return e.getParser=function(e,t,i){if(void 0===t&&(t=!1),void 0===i&&(i=null),"string"!=typeof e)throw new Error("UserAgent should be a string");return new s.default(e,t,i)},e.parse=function(e,t){return void 0===t&&(t=null),new s.default(e,t).getResult()},t=e,i=[{key:"BROWSER_MAP",get:function(){return r.BROWSER_MAP}},{key:"ENGINE_MAP",get:function(){return r.ENGINE_MAP}},{key:"OS_MAP",get:function(){return r.OS_MAP}},{key:"PLATFORMS_MAP",get:function(){return r.PLATFORMS_MAP}}],null&&o(t.prototype,null),i&&o(t,i),e}();t.default=a,e.exports=t.default},91:function(e,t,i){"use strict";t.__esModule=!0,t.default=void 0;var n=l(i(92)),s=l(i(93)),r=l(i(94)),o=l(i(95)),a=l(i(17));function l(e){return e&&e.__esModule?e:{default:e}}var c=function(){function e(e,t,i){if(void 0===t&&(t=!1),void 0===i&&(i=null),null==e||""===e)throw new Error("UserAgent parameter can't be empty");this._ua=e;var n=!1;"boolean"==typeof t?(n=t,this._hints=i):this._hints=null!=t&&"object"==typeof t?t:null,this.parsedResult={},!0!==n&&this.parse()}var t=e.prototype;return t.getHints=function(){return this._hints},t.hasBrand=function(e){if(!this._hints||!Array.isArray(this._hints.brands))return!1;var t=e.toLowerCase();return this._hints.brands.some(function(e){return e.brand&&e.brand.toLowerCase()===t})},t.getBrandVersion=function(e){if(this._hints&&Array.isArray(this._hints.brands)){var t=e.toLowerCase(),i=this._hints.brands.find(function(e){return e.brand&&e.brand.toLowerCase()===t});return i?i.version:void 0}},t.getUA=function(){return this._ua},t.test=function(e){return e.test(this._ua)},t.parseBrowser=function(){var e=this;this.parsedResult.browser={};var t=a.default.find(n.default,function(t){if("function"==typeof t.test)return t.test(e);if(Array.isArray(t.test))return t.test.some(function(t){return e.test(t)});throw new Error("Browser's test function is not valid")});return t&&(this.parsedResult.browser=t.describe(this.getUA(),this)),this.parsedResult.browser},t.getBrowser=function(){return this.parsedResult.browser?this.parsedResult.browser:this.parseBrowser()},t.getBrowserName=function(e){return e?String(this.getBrowser().name).toLowerCase()||"":this.getBrowser().name||""},t.getBrowserVersion=function(){return this.getBrowser().version},t.getOS=function(){return this.parsedResult.os?this.parsedResult.os:this.parseOS()},t.parseOS=function(){var e=this;this.parsedResult.os={};var t=a.default.find(s.default,function(t){if("function"==typeof t.test)return t.test(e);if(Array.isArray(t.test))return t.test.some(function(t){return e.test(t)});throw new Error("Browser's test function is not valid")});return t&&(this.parsedResult.os=t.describe(this.getUA())),this.parsedResult.os},t.getOSName=function(e){var t=this.getOS().name;return e?String(t).toLowerCase()||"":t||""},t.getOSVersion=function(){return this.getOS().version},t.getPlatform=function(){return this.parsedResult.platform?this.parsedResult.platform:this.parsePlatform()},t.getPlatformType=function(e){void 0===e&&(e=!1);var t=this.getPlatform().type;return e?String(t).toLowerCase()||"":t||""},t.parsePlatform=function(){var e=this;this.parsedResult.platform={};var t=a.default.find(r.default,function(t){if("function"==typeof t.test)return t.test(e);if(Array.isArray(t.test))return t.test.some(function(t){return e.test(t)});throw new Error("Browser's test function is not valid")});return t&&(this.parsedResult.platform=t.describe(this.getUA())),this.parsedResult.platform},t.getEngine=function(){return this.parsedResult.engine?this.parsedResult.engine:this.parseEngine()},t.getEngineName=function(e){return e?String(this.getEngine().name).toLowerCase()||"":this.getEngine().name||""},t.parseEngine=function(){var e=this;this.parsedResult.engine={};var t=a.default.find(o.default,function(t){if("function"==typeof t.test)return t.test(e);if(Array.isArray(t.test))return t.test.some(function(t){return e.test(t)});throw new Error("Browser's test function is not valid")});return t&&(this.parsedResult.engine=t.describe(this.getUA())),this.parsedResult.engine},t.parse=function(){return this.parseBrowser(),this.parseOS(),this.parsePlatform(),this.parseEngine(),this},t.getResult=function(){return a.default.assign({},this.parsedResult)},t.satisfies=function(e){var t=this,i={},n=0,s={},r=0;if(Object.keys(e).forEach(function(t){var o=e[t];"string"==typeof o?(s[t]=o,r+=1):"object"==typeof o&&(i[t]=o,n+=1)}),n>0){var o=Object.keys(i),l=a.default.find(o,function(e){return t.isOS(e)});if(l){var c=this.satisfies(i[l]);if(void 0!==c)return c}var h=a.default.find(o,function(e){return t.isPlatform(e)});if(h){var d=this.satisfies(i[h]);if(void 0!==d)return d}}if(r>0){var u=Object.keys(s),p=a.default.find(u,function(e){return t.isBrowser(e,!0)});if(void 0!==p)return this.compareVersion(s[p])}},t.isBrowser=function(e,t){void 0===t&&(t=!1);var i=this.getBrowserName().toLowerCase(),n=e.toLowerCase(),s=a.default.getBrowserTypeByAlias(n);return t&&s&&(n=s.toLowerCase()),n===i},t.compareVersion=function(e){var t=[0],i=e,n=!1,s=this.getBrowserVersion();if("string"==typeof s)return">"===e[0]||"<"===e[0]?(i=e.substr(1),"="===e[1]?(n=!0,i=e.substr(2)):t=[],">"===e[0]?t.push(1):t.push(-1)):"="===e[0]?i=e.substr(1):"~"===e[0]&&(n=!0,i=e.substr(1)),t.indexOf(a.default.compareVersions(s,i,n))>-1},t.isOS=function(e){return this.getOSName(!0)===String(e).toLowerCase()},t.isPlatform=function(e){return this.getPlatformType(!0)===String(e).toLowerCase()},t.isEngine=function(e){return this.getEngineName(!0)===String(e).toLowerCase()},t.is=function(e,t){return void 0===t&&(t=!1),this.isBrowser(e,t)||this.isOS(e)||this.isPlatform(e)},t.some=function(e){var t=this;return void 0===e&&(e=[]),e.some(function(e){return t.is(e)})},e}();t.default=c,e.exports=t.default},92:function(e,t,i){"use strict";t.__esModule=!0,t.default=void 0;var n,s=(n=i(17))&&n.__esModule?n:{default:n},r=/version\/(\d+(\.?_?\d+)+)/i,o=[{test:[/gptbot/i],describe:function(e){var t={name:"GPTBot"},i=s.default.getFirstMatch(/gptbot\/(\d+(\.\d+)+)/i,e)||s.default.getFirstMatch(r,e);return i&&(t.version=i),t}},{test:[/chatgpt-user/i],describe:function(e){var t={name:"ChatGPT-User"},i=s.default.getFirstMatch(/chatgpt-user\/(\d+(\.\d+)+)/i,e)||s.default.getFirstMatch(r,e);return i&&(t.version=i),t}},{test:[/oai-searchbot/i],describe:function(e){var t={name:"OAI-SearchBot"},i=s.default.getFirstMatch(/oai-searchbot\/(\d+(\.\d+)+)/i,e)||s.default.getFirstMatch(r,e);return i&&(t.version=i),t}},{test:[/claudebot/i,/claude-web/i,/claude-user/i,/claude-searchbot/i],describe:function(e){var t={name:"ClaudeBot"},i=s.default.getFirstMatch(/(?:claudebot|claude-web|claude-user|claude-searchbot)\/(\d+(\.\d+)+)/i,e)||s.default.getFirstMatch(r,e);return i&&(t.version=i),t}},{test:[/omgilibot/i,/webzio-extended/i],describe:function(e){var t={name:"Omgilibot"},i=s.default.getFirstMatch(/(?:omgilibot|webzio-extended)\/(\d+(\.\d+)+)/i,e)||s.default.getFirstMatch(r,e);return i&&(t.version=i),t}},{test:[/diffbot/i],describe:function(e){var t={name:"Diffbot"},i=s.default.getFirstMatch(/diffbot\/(\d+(\.\d+)+)/i,e)||s.default.getFirstMatch(r,e);return i&&(t.version=i),t}},{test:[/perplexitybot/i],describe:function(e){var t={name:"PerplexityBot"},i=s.default.getFirstMatch(/perplexitybot\/(\d+(\.\d+)+)/i,e)||s.default.getFirstMatch(r,e);return i&&(t.version=i),t}},{test:[/perplexity-user/i],describe:function(e){var t={name:"Perplexity-User"},i=s.default.getFirstMatch(/perplexity-user\/(\d+(\.\d+)+)/i,e)||s.default.getFirstMatch(r,e);return i&&(t.version=i),t}},{test:[/youbot/i],describe:function(e){var t={name:"YouBot"},i=s.default.getFirstMatch(/youbot\/(\d+(\.\d+)+)/i,e)||s.default.getFirstMatch(r,e);return i&&(t.version=i),t}},{test:[/meta-webindexer/i],describe:function(e){var t={name:"Meta-WebIndexer"},i=s.default.getFirstMatch(/meta-webindexer\/(\d+(\.\d+)+)/i,e)||s.default.getFirstMatch(r,e);return i&&(t.version=i),t}},{test:[/meta-externalads/i],describe:function(e){var t={name:"Meta-ExternalAds"},i=s.default.getFirstMatch(/meta-externalads\/(\d+(\.\d+)+)/i,e)||s.default.getFirstMatch(r,e);return i&&(t.version=i),t}},{test:[/meta-externalagent/i],describe:function(e){var t={name:"Meta-ExternalAgent"},i=s.default.getFirstMatch(/meta-externalagent\/(\d+(\.\d+)+)/i,e)||s.default.getFirstMatch(r,e);return i&&(t.version=i),t}},{test:[/meta-externalfetcher/i],describe:function(e){var t={name:"Meta-ExternalFetcher"},i=s.default.getFirstMatch(/meta-externalfetcher\/(\d+(\.\d+)+)/i,e)||s.default.getFirstMatch(r,e);return i&&(t.version=i),t}},{test:[/googlebot/i],describe:function(e){var t={name:"Googlebot"},i=s.default.getFirstMatch(/googlebot\/(\d+(\.\d+))/i,e)||s.default.getFirstMatch(r,e);return i&&(t.version=i),t}},{test:[/linespider/i],describe:function(e){var t={name:"Linespider"},i=s.default.getFirstMatch(/(?:linespider)(?:-[-\w]+)?[\s/](\d+(\.\d+)+)/i,e)||s.default.getFirstMatch(r,e);return i&&(t.version=i),t}},{test:[/amazonbot/i],describe:function(e){var t={name:"AmazonBot"},i=s.default.getFirstMatch(/amazonbot\/(\d+(\.\d+)+)/i,e)||s.default.getFirstMatch(r,e);return i&&(t.version=i),t}},{test:[/bingbot/i],describe:function(e){var t={name:"BingCrawler"},i=s.default.getFirstMatch(/bingbot\/(\d+(\.\d+)+)/i,e)||s.default.getFirstMatch(r,e);return i&&(t.version=i),t}},{test:[/baiduspider/i],describe:function(e){var t={name:"BaiduSpider"},i=s.default.getFirstMatch(/baiduspider\/(\d+(\.\d+)+)/i,e)||s.default.getFirstMatch(r,e);return i&&(t.version=i),t}},{test:[/duckduckbot/i],describe:function(e){var t={name:"DuckDuckBot"},i=s.default.getFirstMatch(/duckduckbot\/(\d+(\.\d+)+)/i,e)||s.default.getFirstMatch(r,e);return i&&(t.version=i),t}},{test:[/ia_archiver/i],describe:function(e){var t={name:"InternetArchiveCrawler"},i=s.default.getFirstMatch(/ia_archiver\/(\d+(\.\d+)+)/i,e)||s.default.getFirstMatch(r,e);return i&&(t.version=i),t}},{test:[/facebookexternalhit/i,/facebookcatalog/i],describe:function(){return{name:"FacebookExternalHit"}}},{test:[/slackbot/i,/slack-imgProxy/i],describe:function(e){var t={name:"SlackBot"},i=s.default.getFirstMatch(/(?:slackbot|slack-imgproxy)(?:-[-\w]+)?[\s/](\d+(\.\d+)+)/i,e)||s.default.getFirstMatch(r,e);return i&&(t.version=i),t}},{test:[/yahoo!?[\s/]*slurp/i],describe:function(){return{name:"YahooSlurp"}}},{test:[/yandexbot/i,/yandexmobilebot/i],describe:function(){return{name:"YandexBot"}}},{test:[/pingdom/i],describe:function(){return{name:"PingdomBot"}}},{test:[/opera/i],describe:function(e){var t={name:"Opera"},i=s.default.getFirstMatch(r,e)||s.default.getFirstMatch(/(?:opera)[\s/](\d+(\.?_?\d+)+)/i,e);return i&&(t.version=i),t}},{test:[/opr\/|opios/i],describe:function(e){var t={name:"Opera"},i=s.default.getFirstMatch(/(?:opr|opios)[\s/](\S+)/i,e)||s.default.getFirstMatch(r,e);return i&&(t.version=i),t}},{test:[/SamsungBrowser/i],describe:function(e){var t={name:"Samsung Internet for Android"},i=s.default.getFirstMatch(r,e)||s.default.getFirstMatch(/(?:SamsungBrowser)[\s/](\d+(\.?_?\d+)+)/i,e);return i&&(t.version=i),t}},{test:[/Whale/i],describe:function(e){var t={name:"NAVER Whale Browser"},i=s.default.getFirstMatch(r,e)||s.default.getFirstMatch(/(?:whale)[\s/](\d+(?:\.\d+)+)/i,e);return i&&(t.version=i),t}},{test:[/PaleMoon/i],describe:function(e){var t={name:"Pale Moon"},i=s.default.getFirstMatch(r,e)||s.default.getFirstMatch(/(?:PaleMoon)[\s/](\d+(?:\.\d+)+)/i,e);return i&&(t.version=i),t}},{test:[/MZBrowser/i],describe:function(e){var t={name:"MZ Browser"},i=s.default.getFirstMatch(/(?:MZBrowser)[\s/](\d+(?:\.\d+)+)/i,e)||s.default.getFirstMatch(r,e);return i&&(t.version=i),t}},{test:[/focus/i],describe:function(e){var t={name:"Focus"},i=s.default.getFirstMatch(/(?:focus)[\s/](\d+(?:\.\d+)+)/i,e)||s.default.getFirstMatch(r,e);return i&&(t.version=i),t}},{test:[/swing/i],describe:function(e){var t={name:"Swing"},i=s.default.getFirstMatch(/(?:swing)[\s/](\d+(?:\.\d+)+)/i,e)||s.default.getFirstMatch(r,e);return i&&(t.version=i),t}},{test:[/coast/i],describe:function(e){var t={name:"Opera Coast"},i=s.default.getFirstMatch(r,e)||s.default.getFirstMatch(/(?:coast)[\s/](\d+(\.?_?\d+)+)/i,e);return i&&(t.version=i),t}},{test:[/opt\/\d+(?:.?_?\d+)+/i],describe:function(e){var t={name:"Opera Touch"},i=s.default.getFirstMatch(/(?:opt)[\s/](\d+(\.?_?\d+)+)/i,e)||s.default.getFirstMatch(r,e);return i&&(t.version=i),t}},{test:[/yabrowser/i],describe:function(e){var t={name:"Yandex Browser"},i=s.default.getFirstMatch(/(?:yabrowser)[\s/](\d+(\.?_?\d+)+)/i,e)||s.default.getFirstMatch(r,e);return i&&(t.version=i),t}},{test:[/ucbrowser/i],describe:function(e){var t={name:"UC Browser"},i=s.default.getFirstMatch(r,e)||s.default.getFirstMatch(/(?:ucbrowser)[\s/](\d+(\.?_?\d+)+)/i,e);return i&&(t.version=i),t}},{test:[/Maxthon|mxios/i],describe:function(e){var t={name:"Maxthon"},i=s.default.getFirstMatch(r,e)||s.default.getFirstMatch(/(?:Maxthon|mxios)[\s/](\d+(\.?_?\d+)+)/i,e);return i&&(t.version=i),t}},{test:[/epiphany/i],describe:function(e){var t={name:"Epiphany"},i=s.default.getFirstMatch(r,e)||s.default.getFirstMatch(/(?:epiphany)[\s/](\d+(\.?_?\d+)+)/i,e);return i&&(t.version=i),t}},{test:[/puffin/i],describe:function(e){var t={name:"Puffin"},i=s.default.getFirstMatch(r,e)||s.default.getFirstMatch(/(?:puffin)[\s/](\d+(\.?_?\d+)+)/i,e);return i&&(t.version=i),t}},{test:[/sleipnir/i],describe:function(e){var t={name:"Sleipnir"},i=s.default.getFirstMatch(r,e)||s.default.getFirstMatch(/(?:sleipnir)[\s/](\d+(\.?_?\d+)+)/i,e);return i&&(t.version=i),t}},{test:[/k-meleon/i],describe:function(e){var t={name:"K-Meleon"},i=s.default.getFirstMatch(r,e)||s.default.getFirstMatch(/(?:k-meleon)[\s/](\d+(\.?_?\d+)+)/i,e);return i&&(t.version=i),t}},{test:[/micromessenger/i],describe:function(e){var t={name:"WeChat"},i=s.default.getFirstMatch(/(?:micromessenger)[\s/](\d+(\.?_?\d+)+)/i,e)||s.default.getFirstMatch(r,e);return i&&(t.version=i),t}},{test:[/qqbrowser/i],describe:function(e){var t={name:/qqbrowserlite/i.test(e)?"QQ Browser Lite":"QQ Browser"},i=s.default.getFirstMatch(/(?:qqbrowserlite|qqbrowser)[/](\d+(\.?_?\d+)+)/i,e)||s.default.getFirstMatch(r,e);return i&&(t.version=i),t}},{test:[/msie|trident/i],describe:function(e){var t={name:"Internet Explorer"},i=s.default.getFirstMatch(/(?:msie |rv:)(\d+(\.?_?\d+)+)/i,e);return i&&(t.version=i),t}},{test:[/\sedg\//i],describe:function(e){var t={name:"Microsoft Edge"},i=s.default.getFirstMatch(/\sedg\/(\d+(\.?_?\d+)+)/i,e);return i&&(t.version=i),t}},{test:[/edg([ea]|ios)/i],describe:function(e){var t={name:"Microsoft Edge"},i=s.default.getSecondMatch(/edg([ea]|ios)\/(\d+(\.?_?\d+)+)/i,e);return i&&(t.version=i),t}},{test:[/vivaldi/i],describe:function(e){var t={name:"Vivaldi"},i=s.default.getFirstMatch(/vivaldi\/(\d+(\.?_?\d+)+)/i,e);return i&&(t.version=i),t}},{test:[/seamonkey/i],describe:function(e){var t={name:"SeaMonkey"},i=s.default.getFirstMatch(/seamonkey\/(\d+(\.?_?\d+)+)/i,e);return i&&(t.version=i),t}},{test:[/sailfish/i],describe:function(e){var t={name:"Sailfish"},i=s.default.getFirstMatch(/sailfish\s?browser\/(\d+(\.\d+)?)/i,e);return i&&(t.version=i),t}},{test:[/silk/i],describe:function(e){var t={name:"Amazon Silk"},i=s.default.getFirstMatch(/silk\/(\d+(\.?_?\d+)+)/i,e);return i&&(t.version=i),t}},{test:[/phantom/i],describe:function(e){var t={name:"PhantomJS"},i=s.default.getFirstMatch(/phantomjs\/(\d+(\.?_?\d+)+)/i,e);return i&&(t.version=i),t}},{test:[/slimerjs/i],describe:function(e){var t={name:"SlimerJS"},i=s.default.getFirstMatch(/slimerjs\/(\d+(\.?_?\d+)+)/i,e);return i&&(t.version=i),t}},{test:[/blackberry|\bbb\d+/i,/rim\stablet/i],describe:function(e){var t={name:"BlackBerry"},i=s.default.getFirstMatch(r,e)||s.default.getFirstMatch(/blackberry[\d]+\/(\d+(\.?_?\d+)+)/i,e);return i&&(t.version=i),t}},{test:[/(web|hpw)[o0]s/i],describe:function(e){var t={name:"WebOS Browser"},i=s.default.getFirstMatch(r,e)||s.default.getFirstMatch(/w(?:eb)?[o0]sbrowser\/(\d+(\.?_?\d+)+)/i,e);return i&&(t.version=i),t}},{test:[/bada/i],describe:function(e){var t={name:"Bada"},i=s.default.getFirstMatch(/dolfin\/(\d+(\.?_?\d+)+)/i,e);return i&&(t.version=i),t}},{test:[/tizen/i],describe:function(e){var t={name:"Tizen"},i=s.default.getFirstMatch(/(?:tizen\s?)?browser\/(\d+(\.?_?\d+)+)/i,e)||s.default.getFirstMatch(r,e);return i&&(t.version=i),t}},{test:[/qupzilla/i],describe:function(e){var t={name:"QupZilla"},i=s.default.getFirstMatch(/(?:qupzilla)[\s/](\d+(\.?_?\d+)+)/i,e)||s.default.getFirstMatch(r,e);return i&&(t.version=i),t}},{test:[/librewolf/i],describe:function(e){var t={name:"LibreWolf"},i=s.default.getFirstMatch(/(?:librewolf)[\s/](\d+(\.?_?\d+)+)/i,e);return i&&(t.version=i),t}},{test:[/firefox|iceweasel|fxios/i],describe:function(e){var t={name:"Firefox"},i=s.default.getFirstMatch(/(?:firefox|iceweasel|fxios)[\s/](\d+(\.?_?\d+)+)/i,e);return i&&(t.version=i),t}},{test:[/electron/i],describe:function(e){var t={name:"Electron"},i=s.default.getFirstMatch(/(?:electron)\/(\d+(\.?_?\d+)+)/i,e);return i&&(t.version=i),t}},{test:[/sogoumobilebrowser/i,/metasr/i,/se 2\.[x]/i],describe:function(e){var t={name:"Sogou Browser"},i=s.default.getFirstMatch(/(?:sogoumobilebrowser)[\s/](\d+(\.?_?\d+)+)/i,e),n=s.default.getFirstMatch(/(?:chrome|crios|crmo)\/(\d+(\.?_?\d+)+)/i,e),r=s.default.getFirstMatch(/se ([\d.]+)x/i,e),o=i||n||r;return o&&(t.version=o),t}},{test:[/MiuiBrowser/i],describe:function(e){var t={name:"Miui"},i=s.default.getFirstMatch(/(?:MiuiBrowser)[\s/](\d+(\.?_?\d+)+)/i,e);return i&&(t.version=i),t}},{test:function(e){return!!e.hasBrand("DuckDuckGo")||e.test(/\sDdg\/[\d.]+$/i)},describe:function(e,t){var i={name:"DuckDuckGo"};if(t){var n=t.getBrandVersion("DuckDuckGo");if(n)return i.version=n,i}var r=s.default.getFirstMatch(/\sDdg\/([\d.]+)$/i,e);return r&&(i.version=r),i}},{test:function(e){return e.hasBrand("Brave")},describe:function(e,t){var i={name:"Brave"};if(t){var n=t.getBrandVersion("Brave");if(n)return i.version=n,i}return i}},{test:[/chromium/i],describe:function(e){var t={name:"Chromium"},i=s.default.getFirstMatch(/(?:chromium)[\s/](\d+(\.?_?\d+)+)/i,e)||s.default.getFirstMatch(r,e);return i&&(t.version=i),t}},{test:[/chrome|crios|crmo/i],describe:function(e){var t={name:"Chrome"},i=s.default.getFirstMatch(/(?:chrome|crios|crmo)\/(\d+(\.?_?\d+)+)/i,e);return i&&(t.version=i),t}},{test:[/GSA/i],describe:function(e){var t={name:"Google Search"},i=s.default.getFirstMatch(/(?:GSA)\/(\d+(\.?_?\d+)+)/i,e);return i&&(t.version=i),t}},{test:function(e){var t=!e.test(/like android/i),i=e.test(/android/i);return t&&i},describe:function(e){var t={name:"Android Browser"},i=s.default.getFirstMatch(r,e);return i&&(t.version=i),t}},{test:[/playstation 4/i],describe:function(e){var t={name:"PlayStation 4"},i=s.default.getFirstMatch(r,e);return i&&(t.version=i),t}},{test:[/safari|applewebkit/i],describe:function(e){var t={name:"Safari"},i=s.default.getFirstMatch(r,e);return i&&(t.version=i),t}},{test:[/.*/i],describe:function(e){var t=-1!==e.search("\\(")?/^(.*)\/(.*)[ \t]\((.*)/:/^(.*)\/(.*) /;return{name:s.default.getFirstMatch(t,e),version:s.default.getSecondMatch(t,e)}}}];t.default=o,e.exports=t.default},93:function(e,t,i){"use strict";t.__esModule=!0,t.default=void 0;var n,s=(n=i(17))&&n.__esModule?n:{default:n},r=i(18),o=[{test:[/Roku\/DVP/],describe:function(e){var t=s.default.getFirstMatch(/Roku\/DVP-(\d+\.\d+)/i,e);return{name:r.OS_MAP.Roku,version:t}}},{test:[/windows phone/i],describe:function(e){var t=s.default.getFirstMatch(/windows phone (?:os)?\s?(\d+(\.\d+)*)/i,e);return{name:r.OS_MAP.WindowsPhone,version:t}}},{test:[/windows /i],describe:function(e){var t=s.default.getFirstMatch(/Windows ((NT|XP)( \d\d?.\d)?)/i,e),i=s.default.getWindowsVersionName(t);return{name:r.OS_MAP.Windows,version:t,versionName:i}}},{test:[/Macintosh(.*?) FxiOS(.*?)\//],describe:function(e){var t={name:r.OS_MAP.iOS},i=s.default.getSecondMatch(/(Version\/)(\d[\d.]+)/,e);return i&&(t.version=i),t}},{test:[/macintosh/i],describe:function(e){var t=s.default.getFirstMatch(/mac os x (\d+(\.?_?\d+)+)/i,e).replace(/[_\s]/g,"."),i=s.default.getMacOSVersionName(t),n={name:r.OS_MAP.MacOS,version:t};return i&&(n.versionName=i),n}},{test:[/(ipod|iphone|ipad)/i],describe:function(e){var t=s.default.getFirstMatch(/os (\d+([_\s]\d+)*) like mac os x/i,e).replace(/[_\s]/g,".");return{name:r.OS_MAP.iOS,version:t}}},{test:[/OpenHarmony/i],describe:function(e){var t=s.default.getFirstMatch(/OpenHarmony\s+(\d+(\.\d+)*)/i,e);return{name:r.OS_MAP.HarmonyOS,version:t}}},{test:function(e){var t=!e.test(/like android/i),i=e.test(/android/i);return t&&i},describe:function(e){var t=s.default.getFirstMatch(/android[\s/-](\d+(\.\d+)*)/i,e),i=s.default.getAndroidVersionName(t),n={name:r.OS_MAP.Android,version:t};return i&&(n.versionName=i),n}},{test:[/(web|hpw)[o0]s/i],describe:function(e){var t=s.default.getFirstMatch(/(?:web|hpw)[o0]s\/(\d+(\.\d+)*)/i,e),i={name:r.OS_MAP.WebOS};return t&&t.length&&(i.version=t),i}},{test:[/blackberry|\bbb\d+/i,/rim\stablet/i],describe:function(e){var t=s.default.getFirstMatch(/rim\stablet\sos\s(\d+(\.\d+)*)/i,e)||s.default.getFirstMatch(/blackberry\d+\/(\d+([_\s]\d+)*)/i,e)||s.default.getFirstMatch(/\bbb(\d+)/i,e);return{name:r.OS_MAP.BlackBerry,version:t}}},{test:[/bada/i],describe:function(e){var t=s.default.getFirstMatch(/bada\/(\d+(\.\d+)*)/i,e);return{name:r.OS_MAP.Bada,version:t}}},{test:[/tizen/i],describe:function(e){var t=s.default.getFirstMatch(/tizen[/\s](\d+(\.\d+)*)/i,e);return{name:r.OS_MAP.Tizen,version:t}}},{test:[/linux/i],describe:function(){return{name:r.OS_MAP.Linux}}},{test:[/CrOS/],describe:function(){return{name:r.OS_MAP.ChromeOS}}},{test:[/PlayStation 4/],describe:function(e){var t=s.default.getFirstMatch(/PlayStation 4[/\s](\d+(\.\d+)*)/i,e);return{name:r.OS_MAP.PlayStation4,version:t}}}];t.default=o,e.exports=t.default},94:function(e,t,i){"use strict";t.__esModule=!0,t.default=void 0;var n,s=(n=i(17))&&n.__esModule?n:{default:n},r=i(18),o=[{test:[/googlebot/i],describe:function(){return{type:r.PLATFORMS_MAP.bot,vendor:"Google"}}},{test:[/linespider/i],describe:function(){return{type:r.PLATFORMS_MAP.bot,vendor:"Line"}}},{test:[/amazonbot/i],describe:function(){return{type:r.PLATFORMS_MAP.bot,vendor:"Amazon"}}},{test:[/gptbot/i],describe:function(){return{type:r.PLATFORMS_MAP.bot,vendor:"OpenAI"}}},{test:[/chatgpt-user/i],describe:function(){return{type:r.PLATFORMS_MAP.bot,vendor:"OpenAI"}}},{test:[/oai-searchbot/i],describe:function(){return{type:r.PLATFORMS_MAP.bot,vendor:"OpenAI"}}},{test:[/baiduspider/i],describe:function(){return{type:r.PLATFORMS_MAP.bot,vendor:"Baidu"}}},{test:[/bingbot/i],describe:function(){return{type:r.PLATFORMS_MAP.bot,vendor:"Bing"}}},{test:[/duckduckbot/i],describe:function(){return{type:r.PLATFORMS_MAP.bot,vendor:"DuckDuckGo"}}},{test:[/claudebot/i,/claude-web/i,/claude-user/i,/claude-searchbot/i],describe:function(){return{type:r.PLATFORMS_MAP.bot,vendor:"Anthropic"}}},{test:[/omgilibot/i,/webzio-extended/i],describe:function(){return{type:r.PLATFORMS_MAP.bot,vendor:"Webz.io"}}},{test:[/diffbot/i],describe:function(){return{type:r.PLATFORMS_MAP.bot,vendor:"Diffbot"}}},{test:[/perplexitybot/i],describe:function(){return{type:r.PLATFORMS_MAP.bot,vendor:"Perplexity AI"}}},{test:[/perplexity-user/i],describe:function(){return{type:r.PLATFORMS_MAP.bot,vendor:"Perplexity AI"}}},{test:[/youbot/i],describe:function(){return{type:r.PLATFORMS_MAP.bot,vendor:"You.com"}}},{test:[/ia_archiver/i],describe:function(){return{type:r.PLATFORMS_MAP.bot,vendor:"Internet Archive"}}},{test:[/meta-webindexer/i],describe:function(){return{type:r.PLATFORMS_MAP.bot,vendor:"Meta"}}},{test:[/meta-externalads/i],describe:function(){return{type:r.PLATFORMS_MAP.bot,vendor:"Meta"}}},{test:[/meta-externalagent/i],describe:function(){return{type:r.PLATFORMS_MAP.bot,vendor:"Meta"}}},{test:[/meta-externalfetcher/i],describe:function(){return{type:r.PLATFORMS_MAP.bot,vendor:"Meta"}}},{test:[/facebookexternalhit/i,/facebookcatalog/i],describe:function(){return{type:r.PLATFORMS_MAP.bot,vendor:"Meta"}}},{test:[/slackbot/i,/slack-imgProxy/i],describe:function(){return{type:r.PLATFORMS_MAP.bot,vendor:"Slack"}}},{test:[/yahoo/i],describe:function(){return{type:r.PLATFORMS_MAP.bot,vendor:"Yahoo"}}},{test:[/yandexbot/i,/yandexmobilebot/i],describe:function(){return{type:r.PLATFORMS_MAP.bot,vendor:"Yandex"}}},{test:[/pingdom/i],describe:function(){return{type:r.PLATFORMS_MAP.bot,vendor:"Pingdom"}}},{test:[/huawei/i],describe:function(e){var t=s.default.getFirstMatch(/(can-l01)/i,e)&&"Nova",i={type:r.PLATFORMS_MAP.mobile,vendor:"Huawei"};return t&&(i.model=t),i}},{test:[/nexus\s*(?:7|8|9|10).*/i],describe:function(){return{type:r.PLATFORMS_MAP.tablet,vendor:"Nexus"}}},{test:[/ipad/i],describe:function(){return{type:r.PLATFORMS_MAP.tablet,vendor:"Apple",model:"iPad"}}},{test:[/Macintosh(.*?) FxiOS(.*?)\//],describe:function(){return{type:r.PLATFORMS_MAP.tablet,vendor:"Apple",model:"iPad"}}},{test:[/kftt build/i],describe:function(){return{type:r.PLATFORMS_MAP.tablet,vendor:"Amazon",model:"Kindle Fire HD 7"}}},{test:[/silk/i],describe:function(){return{type:r.PLATFORMS_MAP.tablet,vendor:"Amazon"}}},{test:[/tablet(?! pc)/i],describe:function(){return{type:r.PLATFORMS_MAP.tablet}}},{test:function(e){var t=e.test(/ipod|iphone/i),i=e.test(/like (ipod|iphone)/i);return t&&!i},describe:function(e){var t=s.default.getFirstMatch(/(ipod|iphone)/i,e);return{type:r.PLATFORMS_MAP.mobile,vendor:"Apple",model:t}}},{test:[/nexus\s*[0-6].*/i,/galaxy nexus/i],describe:function(){return{type:r.PLATFORMS_MAP.mobile,vendor:"Nexus"}}},{test:[/Nokia/i],describe:function(e){var t=s.default.getFirstMatch(/Nokia\s+([0-9]+(\.[0-9]+)?)/i,e),i={type:r.PLATFORMS_MAP.mobile,vendor:"Nokia"};return t&&(i.model=t),i}},{test:[/[^-]mobi/i],describe:function(){return{type:r.PLATFORMS_MAP.mobile}}},{test:function(e){return"blackberry"===e.getBrowserName(!0)},describe:function(){return{type:r.PLATFORMS_MAP.mobile,vendor:"BlackBerry"}}},{test:function(e){return"bada"===e.getBrowserName(!0)},describe:function(){return{type:r.PLATFORMS_MAP.mobile}}},{test:function(e){return"windows phone"===e.getBrowserName()},describe:function(){return{type:r.PLATFORMS_MAP.mobile,vendor:"Microsoft"}}},{test:function(e){var t=Number(String(e.getOSVersion()).split(".")[0]);return"android"===e.getOSName(!0)&&t>=3},describe:function(){return{type:r.PLATFORMS_MAP.tablet}}},{test:function(e){return"android"===e.getOSName(!0)},describe:function(){return{type:r.PLATFORMS_MAP.mobile}}},{test:[/smart-?tv|smarttv/i],describe:function(){return{type:r.PLATFORMS_MAP.tv}}},{test:[/netcast/i],describe:function(){return{type:r.PLATFORMS_MAP.tv}}},{test:function(e){return"macos"===e.getOSName(!0)},describe:function(){return{type:r.PLATFORMS_MAP.desktop,vendor:"Apple"}}},{test:function(e){return"windows"===e.getOSName(!0)},describe:function(){return{type:r.PLATFORMS_MAP.desktop}}},{test:function(e){return"linux"===e.getOSName(!0)},describe:function(){return{type:r.PLATFORMS_MAP.desktop}}},{test:function(e){return"playstation 4"===e.getOSName(!0)},describe:function(){return{type:r.PLATFORMS_MAP.tv}}},{test:function(e){return"roku"===e.getOSName(!0)},describe:function(){return{type:r.PLATFORMS_MAP.tv}}}];t.default=o,e.exports=t.default},95:function(e,t,i){"use strict";t.__esModule=!0,t.default=void 0;var n,s=(n=i(17))&&n.__esModule?n:{default:n},r=i(18),o=[{test:function(e){return"microsoft edge"===e.getBrowserName(!0)},describe:function(e){if(/\sedg\//i.test(e))return{name:r.ENGINE_MAP.Blink};var t=s.default.getFirstMatch(/edge\/(\d+(\.?_?\d+)+)/i,e);return{name:r.ENGINE_MAP.EdgeHTML,version:t}}},{test:[/trident/i],describe:function(e){var t={name:r.ENGINE_MAP.Trident},i=s.default.getFirstMatch(/trident\/(\d+(\.?_?\d+)+)/i,e);return i&&(t.version=i),t}},{test:function(e){return e.test(/presto/i)},describe:function(e){var t={name:r.ENGINE_MAP.Presto},i=s.default.getFirstMatch(/presto\/(\d+(\.?_?\d+)+)/i,e);return i&&(t.version=i),t}},{test:function(e){var t=e.test(/gecko/i),i=e.test(/like gecko/i);return t&&!i},describe:function(e){var t={name:r.ENGINE_MAP.Gecko},i=s.default.getFirstMatch(/gecko\/(\d+(\.?_?\d+)+)/i,e);return i&&(t.version=i),t}},{test:[/(apple)?webkit\/537\.36/i],describe:function(){return{name:r.ENGINE_MAP.Blink}}},{test:[/(apple)?webkit/i],describe:function(e){var t={name:r.ENGINE_MAP.WebKit},i=s.default.getFirstMatch(/webkit\/(\d+(\.?_?\d+)+)/i,e);return i&&(t.version=i),t}}];t.default=o,e.exports=t.default}})},65442(e,t,i){var n;function s(e){this.rand=e}if(e.exports=function(e){return n||(n=new s(null)),n.generate(e)},e.exports.Rand=s,s.prototype.generate=function(e){return this._rand(e)},s.prototype._rand=function(e){if(this.rand.getBytes)return this.rand.getBytes(e);for(var t=new Uint8Array(e),i=0;i<t.length;i++)t[i]=this.rand.getByte();return t},"object"==typeof self)self.crypto&&self.crypto.getRandomValues?s.prototype._rand=function(e){var t=new Uint8Array(e);return self.crypto.getRandomValues(t),t}:self.msCrypto&&self.msCrypto.getRandomValues?s.prototype._rand=function(e){var t=new Uint8Array(e);return self.msCrypto.getRandomValues(t),t}:"object"==typeof window&&(s.prototype._rand=function(){throw new Error("Not implemented yet")});else try{var r=i(44507);if("function"!=typeof r.randomBytes)throw new Error("Not supported");s.prototype._rand=function(e){return r.randomBytes(e)}}catch(e){}},87088(e,t,i){var n=i(56608).Buffer;function s(e){n.isBuffer(e)||(e=n.from(e));for(var t=e.length/4|0,i=new Array(t),s=0;s<t;s++)i[s]=e.readUInt32BE(4*s);return i}function r(e){for(;0<e.length;e++)e[0]=0}function o(e,t,i,n,s){for(var r,o,a,l,c=i[0],h=i[1],d=i[2],u=i[3],p=e[0]^t[0],g=e[1]^t[1],f=e[2]^t[2],m=e[3]^t[3],v=4,y=1;y<s;y++)r=c[p>>>24]^h[g>>>16&255]^d[f>>>8&255]^u[255&m]^t[v++],o=c[g>>>24]^h[f>>>16&255]^d[m>>>8&255]^u[255&p]^t[v++],a=c[f>>>24]^h[m>>>16&255]^d[p>>>8&255]^u[255&g]^t[v++],l=c[m>>>24]^h[p>>>16&255]^d[g>>>8&255]^u[255&f]^t[v++],p=r,g=o,f=a,m=l;return r=(n[p>>>24]<<24|n[g>>>16&255]<<16|n[f>>>8&255]<<8|n[255&m])^t[v++],o=(n[g>>>24]<<24|n[f>>>16&255]<<16|n[m>>>8&255]<<8|n[255&p])^t[v++],a=(n[f>>>24]<<24|n[m>>>16&255]<<16|n[p>>>8&255]<<8|n[255&g])^t[v++],l=(n[m>>>24]<<24|n[p>>>16&255]<<16|n[g>>>8&255]<<8|n[255&f])^t[v++],[r>>>=0,o>>>=0,a>>>=0,l>>>=0]}var a=[0,1,2,4,8,16,32,64,128,27,54],l=function(){for(var e=new Array(256),t=0;t<256;t++)e[t]=t<128?t<<1:t<<1^283;for(var i=[],n=[],s=[[],[],[],[]],r=[[],[],[],[]],o=0,a=0,l=0;l<256;++l){var c=a^a<<1^a<<2^a<<3^a<<4;c=c>>>8^255&c^99,i[o]=c,n[c]=o;var h=e[o],d=e[h],u=e[d],p=257*e[c]^16843008*c;s[0][o]=p<<24|p>>>8,s[1][o]=p<<16|p>>>16,s[2][o]=p<<8|p>>>24,s[3][o]=p,p=16843009*u^65537*d^257*h^16843008*o,r[0][c]=p<<24|p>>>8,r[1][c]=p<<16|p>>>16,r[2][c]=p<<8|p>>>24,r[3][c]=p,0===o?o=a=1:(o=h^e[e[e[u^h]]],a^=e[e[a]])}return{SBOX:i,INV_SBOX:n,SUB_MIX:s,INV_SUB_MIX:r}}();function c(e){this._key=s(e),this._reset()}c.blockSize=16,c.keySize=32,c.prototype.blockSize=c.blockSize,c.prototype.keySize=c.keySize,c.prototype._reset=function(){for(var e=this._key,t=e.length,i=t+6,n=4*(i+1),s=[],r=0;r<t;r++)s[r]=e[r];for(r=t;r<n;r++){var o=s[r-1];r%t===0?(o=o<<8|o>>>24,o=l.SBOX[o>>>24]<<24|l.SBOX[o>>>16&255]<<16|l.SBOX[o>>>8&255]<<8|l.SBOX[255&o],o^=a[r/t|0]<<24):t>6&&r%t===4&&(o=l.SBOX[o>>>24]<<24|l.SBOX[o>>>16&255]<<16|l.SBOX[o>>>8&255]<<8|l.SBOX[255&o]),s[r]=s[r-t]^o}for(var c=[],h=0;h<n;h++){var d=n-h,u=s[d-(h%4?0:4)];c[h]=h<4||d<=4?u:l.INV_SUB_MIX[0][l.SBOX[u>>>24]]^l.INV_SUB_MIX[1][l.SBOX[u>>>16&255]]^l.INV_SUB_MIX[2][l.SBOX[u>>>8&255]]^l.INV_SUB_MIX[3][l.SBOX[255&u]]}this._nRounds=i,this._keySchedule=s,this._invKeySchedule=c},c.prototype.encryptBlockRaw=function(e){return o(e=s(e),this._keySchedule,l.SUB_MIX,l.SBOX,this._nRounds)},c.prototype.encryptBlock=function(e){var t=this.encryptBlockRaw(e),i=n.allocUnsafe(16);return i.writeUInt32BE(t[0],0),i.writeUInt32BE(t[1],4),i.writeUInt32BE(t[2],8),i.writeUInt32BE(t[3],12),i},c.prototype.decryptBlock=function(e){var t=(e=s(e))[1];e[1]=e[3],e[3]=t;var i=o(e,this._invKeySchedule,l.INV_SUB_MIX,l.INV_SBOX,this._nRounds),r=n.allocUnsafe(16);return r.writeUInt32BE(i[0],0),r.writeUInt32BE(i[3],4),r.writeUInt32BE(i[2],8),r.writeUInt32BE(i[1],12),r},c.prototype.scrub=function(){r(this._keySchedule),r(this._invKeySchedule),r(this._key)},e.exports.AES=c},55801(e,t,i){var n=i(87088),s=i(56608).Buffer,r=i(36334),o=i(91193),a=i(60050),l=i(10460),c=i(56696);function h(e,t,i,o){r.call(this);var l=s.alloc(4,0);this._cipher=new n.AES(t);var h=this._cipher.encryptBlock(l);this._ghash=new a(h),i=function(e,t,i){if(12===t.length)return e._finID=s.concat([t,s.from([0,0,0,1])]),s.concat([t,s.from([0,0,0,2])]);var n=new a(i),r=t.length,o=r%16;n.update(t),o&&(o=16-o,n.update(s.alloc(o,0))),n.update(s.alloc(8,0));var l=8*r,h=s.alloc(8);h.writeUIntBE(l,0,8),n.update(h),e._finID=n.state;var d=s.from(e._finID);return c(d),d}(this,i,h),this._prev=s.from(i),this._cache=s.allocUnsafe(0),this._secCache=s.allocUnsafe(0),this._decrypt=o,this._alen=0,this._len=0,this._mode=e,this._authTag=null,this._called=!1}o(h,r),h.prototype._update=function(e){if(!this._called&&this._alen){var t=16-this._alen%16;t<16&&(t=s.alloc(t,0),this._ghash.update(t))}this._called=!0;var i=this._mode.encrypt(this,e);return this._decrypt?this._ghash.update(e):this._ghash.update(i),this._len+=e.length,i},h.prototype._final=function(){if(this._decrypt&&!this._authTag)throw new Error("Unsupported state or unable to authenticate data");var e=l(this._ghash.final(8*this._alen,8*this._len),this._cipher.encryptBlock(this._finID));if(this._decrypt&&function(e,t){var i=0;e.length!==t.length&&i++;for(var n=Math.min(e.length,t.length),s=0;s<n;++s)i+=e[s]^t[s];return i}(e,this._authTag))throw new Error("Unsupported state or unable to authenticate data");this._authTag=e,this._cipher.scrub()},h.prototype.getAuthTag=function(){if(this._decrypt||!s.isBuffer(this._authTag))throw new Error("Attempting to get auth tag in unsupported state");return this._authTag},h.prototype.setAuthTag=function(e){if(!this._decrypt)throw new Error("Attempting to set auth tag in unsupported state");this._authTag=e},h.prototype.setAAD=function(e){if(this._called)throw new Error("Attempting to set AAD in unsupported state");this._ghash.update(e),this._alen+=e.length},e.exports=h},15007(e,t,i){var n=i(85173),s=i(98733),r=i(3349);t.createCipher=t.Cipher=n.createCipher,t.createCipheriv=t.Cipheriv=n.createCipheriv,t.createDecipher=t.Decipher=s.createDecipher,t.createDecipheriv=t.Decipheriv=s.createDecipheriv,t.listCiphers=t.getCiphers=function(){return Object.keys(r)}},98733(e,t,i){var n=i(55801),s=i(56608).Buffer,r=i(76200),o=i(58116),a=i(36334),l=i(87088),c=i(51804);function h(e,t,i){a.call(this),this._cache=new d,this._last=void 0,this._cipher=new l.AES(t),this._prev=s.from(i),this._mode=e,this._autopadding=!0}function d(){this.cache=s.allocUnsafe(0)}function u(e,t,i){var a=r[e.toLowerCase()];if(!a)throw new TypeError("invalid suite type");if("string"==typeof i&&(i=s.from(i)),"GCM"!==a.mode&&i.length!==a.iv)throw new TypeError("invalid iv length "+i.length);if("string"==typeof t&&(t=s.from(t)),t.length!==a.key/8)throw new TypeError("invalid key length "+t.length);return"stream"===a.type?new o(a.module,t,i,!0):"auth"===a.type?new n(a.module,t,i,!0):new h(a.module,t,i)}i(91193)(h,a),h.prototype._update=function(e){var t,i;this._cache.add(e);for(var n=[];t=this._cache.get(this._autopadding);)i=this._mode.decrypt(this,t),n.push(i);return s.concat(n)},h.prototype._final=function(){var e=this._cache.flush();if(this._autopadding)return function(e){var t=e[15];if(t<1||t>16)throw new Error("unable to decrypt data");for(var i=-1;++i<t;)if(e[i+(16-t)]!==t)throw new Error("unable to decrypt data");if(16!==t)return e.slice(0,16-t)}(this._mode.decrypt(this,e));if(e)throw new Error("data not multiple of block length")},h.prototype.setAutoPadding=function(e){return this._autopadding=!!e,this},d.prototype.add=function(e){this.cache=s.concat([this.cache,e])},d.prototype.get=function(e){var t;if(e){if(this.cache.length>16)return t=this.cache.slice(0,16),this.cache=this.cache.slice(16),t}else if(this.cache.length>=16)return t=this.cache.slice(0,16),this.cache=this.cache.slice(16),t;return null},d.prototype.flush=function(){if(this.cache.length)return this.cache},t.createDecipher=function(e,t){var i=r[e.toLowerCase()];if(!i)throw new TypeError("invalid suite type");var n=c(t,!1,i.key,i.iv);return u(e,n.key,n.iv)},t.createDecipheriv=u},85173(e,t,i){var n=i(76200),s=i(55801),r=i(56608).Buffer,o=i(58116),a=i(36334),l=i(87088),c=i(51804);function h(e,t,i){a.call(this),this._cache=new u,this._cipher=new l.AES(t),this._prev=r.from(i),this._mode=e,this._autopadding=!0}i(91193)(h,a),h.prototype._update=function(e){var t,i;this._cache.add(e);for(var n=[];t=this._cache.get();)i=this._mode.encrypt(this,t),n.push(i);return r.concat(n)};var d=r.alloc(16,16);function u(){this.cache=r.allocUnsafe(0)}function p(e,t,i){var a=n[e.toLowerCase()];if(!a)throw new TypeError("invalid suite type");if("string"==typeof t&&(t=r.from(t)),t.length!==a.key/8)throw new TypeError("invalid key length "+t.length);if("string"==typeof i&&(i=r.from(i)),"GCM"!==a.mode&&i.length!==a.iv)throw new TypeError("invalid iv length "+i.length);return"stream"===a.type?new o(a.module,t,i):"auth"===a.type?new s(a.module,t,i):new h(a.module,t,i)}h.prototype._final=function(){var e=this._cache.flush();if(this._autopadding)return e=this._mode.encrypt(this,e),this._cipher.scrub(),e;if(!e.equals(d))throw this._cipher.scrub(),new Error("data not multiple of block length")},h.prototype.setAutoPadding=function(e){return this._autopadding=!!e,this},u.prototype.add=function(e){this.cache=r.concat([this.cache,e])},u.prototype.get=function(){if(this.cache.length>15){var e=this.cache.slice(0,16);return this.cache=this.cache.slice(16),e}return null},u.prototype.flush=function(){for(var e=16-this.cache.length,t=r.allocUnsafe(e),i=-1;++i<e;)t.writeUInt8(e,i);return r.concat([this.cache,t])},t.createCipheriv=p,t.createCipher=function(e,t){var i=n[e.toLowerCase()];if(!i)throw new TypeError("invalid suite type");var s=c(t,!1,i.key,i.iv);return p(e,s.key,s.iv)}},60050(e,t,i){var n=i(56608).Buffer,s=n.alloc(16,0);function r(e){var t=n.allocUnsafe(16);return t.writeUInt32BE(e[0]>>>0,0),t.writeUInt32BE(e[1]>>>0,4),t.writeUInt32BE(e[2]>>>0,8),t.writeUInt32BE(e[3]>>>0,12),t}function o(e){this.h=e,this.state=n.alloc(16,0),this.cache=n.allocUnsafe(0)}o.prototype.ghash=function(e){for(var t=-1;++t<e.length;)this.state[t]^=e[t];this._multiply()},o.prototype._multiply=function(){for(var e,t,i,n=[(e=this.h).readUInt32BE(0),e.readUInt32BE(4),e.readUInt32BE(8),e.readUInt32BE(12)],s=[0,0,0,0],o=-1;++o<128;){for(!!(this.state[~~(o/8)]&1<<7-o%8)&&(s[0]^=n[0],s[1]^=n[1],s[2]^=n[2],s[3]^=n[3]),i=!!(1&n[3]),t=3;t>0;t--)n[t]=n[t]>>>1|(1&n[t-1])<<31;n[0]=n[0]>>>1,i&&(n[0]=n[0]^225<<24)}this.state=r(s)},o.prototype.update=function(e){var t;for(this.cache=n.concat([this.cache,e]);this.cache.length>=16;)t=this.cache.slice(0,16),this.cache=this.cache.slice(16),this.ghash(t)},o.prototype.final=function(e,t){return this.cache.length&&this.ghash(n.concat([this.cache,s],16)),this.ghash(r([0,e,0,t])),this.state},e.exports=o},56696(e){e.exports=function(e){for(var t,i=e.length;i--;){if(255!==(t=e.readUInt8(i))){t++,e.writeUInt8(t,i);break}e.writeUInt8(0,i)}}},31125(e,t,i){var n=i(10460);t.encrypt=function(e,t){var i=n(t,e._prev);return e._prev=e._cipher.encryptBlock(i),e._prev},t.decrypt=function(e,t){var i=e._prev;e._prev=t;var s=e._cipher.decryptBlock(t);return n(s,i)}},78530(e,t,i){var n=i(56608).Buffer,s=i(10460);function r(e,t,i){var r=t.length,o=s(t,e._cache);return e._cache=e._cache.slice(r),e._prev=n.concat([e._prev,i?t:o]),o}t.encrypt=function(e,t,i){for(var s,o=n.allocUnsafe(0);t.length;){if(0===e._cache.length&&(e._cache=e._cipher.encryptBlock(e._prev),e._prev=n.allocUnsafe(0)),!(e._cache.length<=t.length)){o=n.concat([o,r(e,t,i)]);break}s=e._cache.length,o=n.concat([o,r(e,t.slice(0,s),i)]),t=t.slice(s)}return o}},68394(e,t,i){var n=i(56608).Buffer;function s(e,t,i){for(var n,s,o=-1,a=0;++o<8;)n=t&1<<7-o?128:0,a+=(128&(s=e._cipher.encryptBlock(e._prev)[0]^n))>>o%8,e._prev=r(e._prev,i?n:s);return a}function r(e,t){var i=e.length,s=-1,r=n.allocUnsafe(e.length);for(e=n.concat([e,n.from([t])]);++s<i;)r[s]=e[s]<<1|e[s+1]>>7;return r}t.encrypt=function(e,t,i){for(var r=t.length,o=n.allocUnsafe(r),a=-1;++a<r;)o[a]=s(e,t[a],i);return o}},20193(e,t,i){var n=i(56608).Buffer;function s(e,t,i){var s=e._cipher.encryptBlock(e._prev)[0]^t;return e._prev=n.concat([e._prev.slice(1),n.from([i?t:s])]),s}t.encrypt=function(e,t,i){for(var r=t.length,o=n.allocUnsafe(r),a=-1;++a<r;)o[a]=s(e,t[a],i);return o}},5527(e,t,i){var n=i(10460),s=i(56608).Buffer,r=i(56696);function o(e){var t=e._cipher.encryptBlockRaw(e._prev);return r(e._prev),t}t.encrypt=function(e,t){var i=Math.ceil(t.length/16),r=e._cache.length;e._cache=s.concat([e._cache,s.allocUnsafe(16*i)]);for(var a=0;a<i;a++){var l=o(e),c=r+16*a;e._cache.writeUInt32BE(l[0],c+0),e._cache.writeUInt32BE(l[1],c+4),e._cache.writeUInt32BE(l[2],c+8),e._cache.writeUInt32BE(l[3],c+12)}var h=e._cache.slice(0,t.length);return e._cache=e._cache.slice(t.length),n(t,h)}},60882(e,t){t.encrypt=function(e,t){return e._cipher.encryptBlock(t)},t.decrypt=function(e,t){return e._cipher.decryptBlock(t)}},76200(e,t,i){var n={ECB:i(60882),CBC:i(31125),CFB:i(78530),CFB8:i(20193),CFB1:i(68394),OFB:i(37481),CTR:i(5527),GCM:i(5527)},s=i(3349);for(var r in s)s[r].module=n[s[r].mode];e.exports=s},37481(e,t,i){var n=i(10460);function s(e){return e._prev=e._cipher.encryptBlock(e._prev),e._prev}t.encrypt=function(e,t){for(;e._cache.length<t.length;)e._cache=Buffer.concat([e._cache,s(e)]);var i=e._cache.slice(0,t.length);return e._cache=e._cache.slice(t.length),n(t,i)}},58116(e,t,i){var n=i(87088),s=i(56608).Buffer,r=i(36334);function o(e,t,i,o){r.call(this),this._cipher=new n.AES(t),this._prev=s.from(i),this._cache=s.allocUnsafe(0),this._secCache=s.allocUnsafe(0),this._decrypt=o,this._mode=e}i(91193)(o,r),o.prototype._update=function(e){return this._mode.encrypt(this,e,this._decrypt)},o.prototype._final=function(){this._cipher.scrub()},e.exports=o},18350(e,t,i){var n=i(34487),s=i(15007),r=i(76200),o=i(13811),a=i(51804);function l(e,t,i){if(e=e.toLowerCase(),r[e])return s.createCipheriv(e,t,i);if(o[e])return new n({key:t,iv:i,mode:e});throw new TypeError("invalid suite type")}function c(e,t,i){if(e=e.toLowerCase(),r[e])return s.createDecipheriv(e,t,i);if(o[e])return new n({key:t,iv:i,mode:e,decrypt:!0});throw new TypeError("invalid suite type")}t.createCipher=t.Cipher=function(e,t){var i,n;if(e=e.toLowerCase(),r[e])i=r[e].key,n=r[e].iv;else{if(!o[e])throw new TypeError("invalid suite type");i=8*o[e].key,n=o[e].iv}var s=a(t,!1,i,n);return l(e,s.key,s.iv)},t.createCipheriv=t.Cipheriv=l,t.createDecipher=t.Decipher=function(e,t){var i,n;if(e=e.toLowerCase(),r[e])i=r[e].key,n=r[e].iv;else{if(!o[e])throw new TypeError("invalid suite type");i=8*o[e].key,n=o[e].iv}var s=a(t,!1,i,n);return c(e,s.key,s.iv)},t.createDecipheriv=t.Decipheriv=c,t.listCiphers=t.getCiphers=function(){return Object.keys(o).concat(s.getCiphers())}},34487(e,t,i){var n=i(36334),s=i(88754),r=i(91193),o=i(56608).Buffer,a={"des-ede3-cbc":s.CBC.instantiate(s.EDE),"des-ede3":s.EDE,"des-ede-cbc":s.CBC.instantiate(s.EDE),"des-ede":s.EDE,"des-cbc":s.CBC.instantiate(s.DES),"des-ecb":s.DES};function l(e){n.call(this);var t,i=e.mode.toLowerCase(),s=a[i];t=e.decrypt?"decrypt":"encrypt";var r=e.key;o.isBuffer(r)||(r=o.from(r)),"des-ede"!==i&&"des-ede-cbc"!==i||(r=o.concat([r,r.slice(0,8)]));var l=e.iv;o.isBuffer(l)||(l=o.from(l)),this._des=s.create({key:r,iv:l,type:t})}a.des=a["des-cbc"],a.des3=a["des-ede3-cbc"],e.exports=l,r(l,n),l.prototype._update=function(e){return o.from(this._des.update(e))},l.prototype._final=function(){return o.from(this._des.final())}},13811(e,t){t["des-ecb"]={key:8,iv:0},t["des-cbc"]=t.des={key:8,iv:8},t["des-ede3-cbc"]=t.des3={key:24,iv:8},t["des-ede3"]={key:24,iv:0},t["des-ede-cbc"]={key:16,iv:8},t["des-ede"]={key:16,iv:0}},38538(e,t,i){"use strict";var n=i(39286),s=i(82869),r=i(56608).Buffer;function o(e){var t,i=e.modulus.byteLength();do{t=new n(s(i))}while(t.cmp(e.modulus)>=0||!t.umod(e.prime1)||!t.umod(e.prime2));return t}function a(e,t){var i=function(e){var t=o(e);return{blinder:t.toRed(n.mont(e.modulus)).redPow(new n(e.publicExponent)).fromRed(),unblinder:t.invm(e.modulus)}}(t),s=t.modulus.byteLength(),a=new n(e).mul(i.blinder).umod(t.modulus),l=a.toRed(n.mont(t.prime1)),c=a.toRed(n.mont(t.prime2)),h=t.coefficient,d=t.prime1,u=t.prime2,p=l.redPow(t.exponent1).fromRed(),g=c.redPow(t.exponent2).fromRed(),f=p.isub(g).imul(h).umod(d).imul(u);return g.iadd(f).imul(i.unblinder).umod(t.modulus).toArrayLike(r,"be",s)}a.getr=o,e.exports=a},92761(e,t,i){"use strict";e.exports=i(8049)},80206(e,t,i){"use strict";var n=i(56608).Buffer,s=i(18955),r=i(9464),o=i(91193),a=i(76853),l=i(24757),c=i(8049);function h(e){r.Writable.call(this);var t=c[e];if(!t)throw new Error("Unknown message digest");this._hashType=t.hash,this._hash=s(t.hash),this._tag=t.id,this._signType=t.sign}function d(e){r.Writable.call(this);var t=c[e];if(!t)throw new Error("Unknown message digest");this._hash=s(t.hash),this._tag=t.id,this._signType=t.sign}function u(e){return new h(e)}function p(e){return new d(e)}Object.keys(c).forEach(function(e){c[e].id=n.from(c[e].id,"hex"),c[e.toLowerCase()]=c[e]}),o(h,r.Writable),h.prototype._write=function(e,t,i){this._hash.update(e),i()},h.prototype.update=function(e,t){return this._hash.update("string"==typeof e?n.from(e,t):e),this},h.prototype.sign=function(e,t){this.end();var i=this._hash.digest(),n=a(i,e,this._hashType,this._signType,this._tag);return t?n.toString(t):n},o(d,r.Writable),d.prototype._write=function(e,t,i){this._hash.update(e),i()},d.prototype.update=function(e,t){return this._hash.update("string"==typeof e?n.from(e,t):e),this},d.prototype.verify=function(e,t,i){var s="string"==typeof t?n.from(t,i):t;this.end();var r=this._hash.digest();return l(s,r,e,this._signType,this._tag)},e.exports={Sign:u,Verify:p,createSign:u,createVerify:p}},76853(e,t,i){"use strict";var n=i(56608).Buffer,s=i(33053),r=i(38538),o=i(23071).ec,a=i(39286),l=i(21973),c=i(32279);function h(e,t,i,r){if((e=n.from(e.toArray())).length<t.byteLength()){var o=n.alloc(t.byteLength()-e.length);e=n.concat([o,e])}var a=i.length,l=function(e,t){e=(e=d(e,t)).mod(t);var i=n.from(e.toArray());if(i.length<t.byteLength()){var s=n.alloc(t.byteLength()-i.length);i=n.concat([s,i])}return i}(i,t),c=n.alloc(a);c.fill(1);var h=n.alloc(a);return h=s(r,h).update(c).update(n.from([0])).update(e).update(l).digest(),c=s(r,h).update(c).digest(),{k:h=s(r,h).update(c).update(n.from([1])).update(e).update(l).digest(),v:c=s(r,h).update(c).digest()}}function d(e,t){var i=new a(e),n=(e.length<<3)-t.bitLength();return n>0&&i.ishrn(n),i}function u(e,t,i){var r,o;do{for(r=n.alloc(0);8*r.length<e.bitLength();)t.v=s(i,t.k).update(t.v).digest(),r=n.concat([r,t.v]);o=d(r,e),t.k=s(i,t.k).update(t.v).update(n.from([0])).digest(),t.v=s(i,t.k).update(t.v).digest()}while(-1!==o.cmp(e));return o}function p(e,t,i,n){return e.toRed(a.mont(i)).redPow(t).fromRed().mod(n)}e.exports=function(e,t,i,s,g){var f=l(t);if(f.curve){if("ecdsa"!==s&&"ecdsa/rsa"!==s)throw new Error("wrong private key type");return function(e,t){var i=c[t.curve.join(".")];if(!i)throw new Error("unknown curve "+t.curve.join("."));var s=new o(i).keyFromPrivate(t.privateKey).sign(e);return n.from(s.toDER())}(e,f)}if("dsa"===f.type){if("dsa"!==s)throw new Error("wrong private key type");return function(e,t,i){for(var s,r=t.params.priv_key,o=t.params.p,l=t.params.q,c=t.params.g,g=new a(0),f=d(e,l).mod(l),m=!1,v=h(r,l,e,i);!1===m;)g=p(c,s=u(l,v,i),o,l),0===(m=s.invm(l).imul(f.add(r.mul(g))).mod(l)).cmpn(0)&&(m=!1,g=new a(0));return function(e,t){e=e.toArray(),t=t.toArray(),128&e[0]&&(e=[0].concat(e)),128&t[0]&&(t=[0].concat(t));var i=[48,e.length+t.length+4,2,e.length];return i=i.concat(e,[2,t.length],t),n.from(i)}(g,m)}(e,f,i)}if("rsa"!==s&&"ecdsa/rsa"!==s)throw new Error("wrong private key type");if(void 0!==t.padding&&1!==t.padding)throw new Error("illegal or unsupported padding mode");e=n.concat([g,e]);for(var m=f.modulus.byteLength(),v=[0,1];e.length+v.length+1<m;)v.push(255);v.push(0);for(var y=-1;++y<e.length;)v.push(e[y]);return r(v,f)},e.exports.getKey=h,e.exports.makeKey=u},24757(e,t,i){"use strict";var n=i(56608).Buffer,s=i(39286),r=i(23071).ec,o=i(21973),a=i(32279);function l(e,t){if(e.cmpn(0)<=0)throw new Error("invalid sig");if(e.cmp(t)>=0)throw new Error("invalid sig")}e.exports=function(e,t,i,c,h){var d=o(i);if("ec"===d.type){if("ecdsa"!==c&&"ecdsa/rsa"!==c)throw new Error("wrong public key type");return function(e,t,i){var n=a[i.data.algorithm.curve.join(".")];if(!n)throw new Error("unknown curve "+i.data.algorithm.curve.join("."));var s=new r(n),o=i.data.subjectPrivateKey.data;return s.verify(t,e,o)}(e,t,d)}if("dsa"===d.type){if("dsa"!==c)throw new Error("wrong public key type");return function(e,t,i){var n=i.data.p,r=i.data.q,a=i.data.g,c=i.data.pub_key,h=o.signature.decode(e,"der"),d=h.s,u=h.r;l(d,r),l(u,r);var p=s.mont(n),g=d.invm(r);return 0===a.toRed(p).redPow(new s(t).mul(g).mod(r)).fromRed().mul(c.toRed(p).redPow(u.mul(g).mod(r)).fromRed()).mod(n).mod(r).cmp(u)}(e,t,d)}if("rsa"!==c&&"ecdsa/rsa"!==c)throw new Error("wrong public key type");t=n.concat([h,t]);for(var u=d.modulus.byteLength(),p=[1],g=0;t.length+p.length+2<u;)p.push(255),g+=1;p.push(0);for(var f=-1;++f<t.length;)p.push(t[f]);p=n.from(p);var m=s.mont(d.modulus);e=(e=new s(e).toRed(m)).redPow(new s(d.publicExponent)),e=n.from(e.fromRed().toArray());var v=g<8?1:0;for(u=Math.min(e.length,p.length),e.length!==p.length&&(v=1),f=-1;++f<u;)v|=e[f]^p[f];return 0===v}},10460(e){e.exports=function(e,t){for(var i=Math.min(e.length,t.length),n=new Buffer(i),s=0;s<i;++s)n[s]=e[s]^t[s];return n}},51999(e,t,i){"use strict";var n=i(84933),s=i(63328),r=i(85101);function o(){return l.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function a(e,t){if(o()<t)throw new RangeError("Invalid typed array length");return l.TYPED_ARRAY_SUPPORT?(e=new Uint8Array(t)).__proto__=l.prototype:(null===e&&(e=new l(t)),e.length=t),e}function l(e,t,i){if(!(l.TYPED_ARRAY_SUPPORT||this instanceof l))return new l(e,t,i);if("number"==typeof e){if("string"==typeof t)throw new Error("If encoding is specified then the first argument must be a string");return d(this,e)}return c(this,e,t,i)}function c(e,t,i,n){if("number"==typeof t)throw new TypeError('"value" argument must not be a number');return"undefined"!=typeof ArrayBuffer&&t instanceof ArrayBuffer?function(e,t,i,n){if(t.byteLength,i<0||t.byteLength<i)throw new RangeError("'offset' is out of bounds");if(t.byteLength<i+(n||0))throw new RangeError("'length' is out of bounds");return t=void 0===i&&void 0===n?new Uint8Array(t):void 0===n?new Uint8Array(t,i):new Uint8Array(t,i,n),l.TYPED_ARRAY_SUPPORT?(e=t).__proto__=l.prototype:e=u(e,t),e}(e,t,i,n):"string"==typeof t?function(e,t,i){if("string"==typeof i&&""!==i||(i="utf8"),!l.isEncoding(i))throw new TypeError('"encoding" must be a valid string encoding');var n=0|g(t,i),s=(e=a(e,n)).write(t,i);return s!==n&&(e=e.slice(0,s)),e}(e,t,i):function(e,t){if(l.isBuffer(t)){var i=0|p(t.length);return 0===(e=a(e,i)).length||t.copy(e,0,0,i),e}if(t){if("undefined"!=typeof ArrayBuffer&&t.buffer instanceof ArrayBuffer||"length"in t)return"number"!=typeof t.length||(n=t.length)!=n?a(e,0):u(e,t);if("Buffer"===t.type&&r(t.data))return u(e,t.data)}var n;throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}(e,t)}function h(e){if("number"!=typeof e)throw new TypeError('"size" argument must be a number');if(e<0)throw new RangeError('"size" argument must not be negative')}function d(e,t){if(h(t),e=a(e,t<0?0:0|p(t)),!l.TYPED_ARRAY_SUPPORT)for(var i=0;i<t;++i)e[i]=0;return e}function u(e,t){var i=t.length<0?0:0|p(t.length);e=a(e,i);for(var n=0;n<i;n+=1)e[n]=255&t[n];return e}function p(e){if(e>=o())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+o().toString(16)+" bytes");return 0|e}function g(e,t){if(l.isBuffer(e))return e.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(e)||e instanceof ArrayBuffer))return e.byteLength;"string"!=typeof e&&(e=""+e);var i=e.length;if(0===i)return 0;for(var n=!1;;)switch(t){case"ascii":case"latin1":case"binary":return i;case"utf8":case"utf-8":case void 0:return H(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*i;case"hex":return i>>>1;case"base64":return z(e).length;default:if(n)return H(e).length;t=(""+t).toLowerCase(),n=!0}}function f(e,t,i){var n=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===i||i>this.length)&&(i=this.length),i<=0)return"";if((i>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return R(this,t,i);case"utf8":case"utf-8":return A(this,t,i);case"ascii":return D(this,t,i);case"latin1":case"binary":return I(this,t,i);case"base64":return M(this,t,i);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return L(this,t,i);default:if(n)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),n=!0}}function m(e,t,i){var n=e[t];e[t]=e[i],e[i]=n}function v(e,t,i,n,s){if(0===e.length)return-1;if("string"==typeof i?(n=i,i=0):i>2147483647?i=2147483647:i<-2147483648&&(i=-2147483648),i=+i,isNaN(i)&&(i=s?0:e.length-1),i<0&&(i=e.length+i),i>=e.length){if(s)return-1;i=e.length-1}else if(i<0){if(!s)return-1;i=0}if("string"==typeof t&&(t=l.from(t,n)),l.isBuffer(t))return 0===t.length?-1:y(e,t,i,n,s);if("number"==typeof t)return t&=255,l.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?s?Uint8Array.prototype.indexOf.call(e,t,i):Uint8Array.prototype.lastIndexOf.call(e,t,i):y(e,[t],i,n,s);throw new TypeError("val must be string, number or Buffer")}function y(e,t,i,n,s){var r,o=1,a=e.length,l=t.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(e.length<2||t.length<2)return-1;o=2,a/=2,l/=2,i/=2}function c(e,t){return 1===o?e[t]:e.readUInt16BE(t*o)}if(s){var h=-1;for(r=i;r<a;r++)if(c(e,r)===c(t,-1===h?0:r-h)){if(-1===h&&(h=r),r-h+1===l)return h*o}else-1!==h&&(r-=r-h),h=-1}else for(i+l>a&&(i=a-l),r=i;r>=0;r--){for(var d=!0,u=0;u<l;u++)if(c(e,r+u)!==c(t,u)){d=!1;break}if(d)return r}return-1}function C(e,t,i,n){i=Number(i)||0;var s=e.length-i;n?(n=Number(n))>s&&(n=s):n=s;var r=t.length;if(r%2!=0)throw new TypeError("Invalid hex string");n>r/2&&(n=r/2);for(var o=0;o<n;++o){var a=parseInt(t.substr(2*o,2),16);if(isNaN(a))return o;e[i+o]=a}return o}function b(e,t,i,n){return U(H(t,e.length-i),e,i,n)}function S(e,t,i,n){return U(function(e){for(var t=[],i=0;i<e.length;++i)t.push(255&e.charCodeAt(i));return t}(t),e,i,n)}function w(e,t,i,n){return S(e,t,i,n)}function x(e,t,i,n){return U(z(t),e,i,n)}function E(e,t,i,n){return U(function(e,t){for(var i,n,s,r=[],o=0;o<e.length&&!((t-=2)<0);++o)n=(i=e.charCodeAt(o))>>8,s=i%256,r.push(s),r.push(n);return r}(t,e.length-i),e,i,n)}function M(e,t,i){return 0===t&&i===e.length?n.fromByteArray(e):n.fromByteArray(e.slice(t,i))}function A(e,t,i){i=Math.min(e.length,i);for(var n=[],s=t;s<i;){var r,o,a,l,c=e[s],h=null,d=c>239?4:c>223?3:c>191?2:1;if(s+d<=i)switch(d){case 1:c<128&&(h=c);break;case 2:128==(192&(r=e[s+1]))&&(l=(31&c)<<6|63&r)>127&&(h=l);break;case 3:r=e[s+1],o=e[s+2],128==(192&r)&&128==(192&o)&&(l=(15&c)<<12|(63&r)<<6|63&o)>2047&&(l<55296||l>57343)&&(h=l);break;case 4:r=e[s+1],o=e[s+2],a=e[s+3],128==(192&r)&&128==(192&o)&&128==(192&a)&&(l=(15&c)<<18|(63&r)<<12|(63&o)<<6|63&a)>65535&&l<1114112&&(h=l)}null===h?(h=65533,d=1):h>65535&&(h-=65536,n.push(h>>>10&1023|55296),h=56320|1023&h),n.push(h),s+=d}return function(e){var t=e.length;if(t<=T)return String.fromCharCode.apply(String,e);for(var i="",n=0;n<t;)i+=String.fromCharCode.apply(String,e.slice(n,n+=T));return i}(n)}t.hp=l,t.IS=50,l.TYPED_ARRAY_SUPPORT=void 0!==i.g.TYPED_ARRAY_SUPPORT?i.g.TYPED_ARRAY_SUPPORT:function(){try{var e=new Uint8Array(1);return e.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===e.foo()&&"function"==typeof e.subarray&&0===e.subarray(1,1).byteLength}catch(e){return!1}}(),o(),l.poolSize=8192,l._augment=function(e){return e.__proto__=l.prototype,e},l.from=function(e,t,i){return c(null,e,t,i)},l.TYPED_ARRAY_SUPPORT&&(l.prototype.__proto__=Uint8Array.prototype,l.__proto__=Uint8Array,"undefined"!=typeof Symbol&&Symbol.species&&l[Symbol.species]===l&&Object.defineProperty(l,Symbol.species,{value:null,configurable:!0})),l.alloc=function(e,t,i){return function(e,t,i,n){return h(t),t<=0?a(e,t):void 0!==i?"string"==typeof n?a(e,t).fill(i,n):a(e,t).fill(i):a(e,t)}(null,e,t,i)},l.allocUnsafe=function(e){return d(null,e)},l.allocUnsafeSlow=function(e){return d(null,e)},l.isBuffer=function(e){return!(null==e||!e._isBuffer)},l.compare=function(e,t){if(!l.isBuffer(e)||!l.isBuffer(t))throw new TypeError("Arguments must be Buffers");if(e===t)return 0;for(var i=e.length,n=t.length,s=0,r=Math.min(i,n);s<r;++s)if(e[s]!==t[s]){i=e[s],n=t[s];break}return i<n?-1:n<i?1:0},l.isEncoding=function(e){switch(String(e).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},l.concat=function(e,t){if(!r(e))throw new TypeError('"list" argument must be an Array of Buffers');if(0===e.length)return l.alloc(0);var i;if(void 0===t)for(t=0,i=0;i<e.length;++i)t+=e[i].length;var n=l.allocUnsafe(t),s=0;for(i=0;i<e.length;++i){var o=e[i];if(!l.isBuffer(o))throw new TypeError('"list" argument must be an Array of Buffers');o.copy(n,s),s+=o.length}return n},l.byteLength=g,l.prototype._isBuffer=!0,l.prototype.swap16=function(){var e=this.length;if(e%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var t=0;t<e;t+=2)m(this,t,t+1);return this},l.prototype.swap32=function(){var e=this.length;if(e%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var t=0;t<e;t+=4)m(this,t,t+3),m(this,t+1,t+2);return this},l.prototype.swap64=function(){var e=this.length;if(e%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var t=0;t<e;t+=8)m(this,t,t+7),m(this,t+1,t+6),m(this,t+2,t+5),m(this,t+3,t+4);return this},l.prototype.toString=function(){var e=0|this.length;return 0===e?"":0===arguments.length?A(this,0,e):f.apply(this,arguments)},l.prototype.equals=function(e){if(!l.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e||0===l.compare(this,e)},l.prototype.inspect=function(){var e="",i=t.IS;return this.length>0&&(e=this.toString("hex",0,i).match(/.{2}/g).join(" "),this.length>i&&(e+=" ... ")),"<Buffer "+e+">"},l.prototype.compare=function(e,t,i,n,s){if(!l.isBuffer(e))throw new TypeError("Argument must be a Buffer");if(void 0===t&&(t=0),void 0===i&&(i=e?e.length:0),void 0===n&&(n=0),void 0===s&&(s=this.length),t<0||i>e.length||n<0||s>this.length)throw new RangeError("out of range index");if(n>=s&&t>=i)return 0;if(n>=s)return-1;if(t>=i)return 1;if(this===e)return 0;for(var r=(s>>>=0)-(n>>>=0),o=(i>>>=0)-(t>>>=0),a=Math.min(r,o),c=this.slice(n,s),h=e.slice(t,i),d=0;d<a;++d)if(c[d]!==h[d]){r=c[d],o=h[d];break}return r<o?-1:o<r?1:0},l.prototype.includes=function(e,t,i){return-1!==this.indexOf(e,t,i)},l.prototype.indexOf=function(e,t,i){return v(this,e,t,i,!0)},l.prototype.lastIndexOf=function(e,t,i){return v(this,e,t,i,!1)},l.prototype.write=function(e,t,i,n){if(void 0===t)n="utf8",i=this.length,t=0;else if(void 0===i&&"string"==typeof t)n=t,i=this.length,t=0;else{if(!isFinite(t))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");t|=0,isFinite(i)?(i|=0,void 0===n&&(n="utf8")):(n=i,i=void 0)}var s=this.length-t;if((void 0===i||i>s)&&(i=s),e.length>0&&(i<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");for(var r=!1;;)switch(n){case"hex":return C(this,e,t,i);case"utf8":case"utf-8":return b(this,e,t,i);case"ascii":return S(this,e,t,i);case"latin1":case"binary":return w(this,e,t,i);case"base64":return x(this,e,t,i);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return E(this,e,t,i);default:if(r)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),r=!0}},l.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var T=4096;function D(e,t,i){var n="";i=Math.min(e.length,i);for(var s=t;s<i;++s)n+=String.fromCharCode(127&e[s]);return n}function I(e,t,i){var n="";i=Math.min(e.length,i);for(var s=t;s<i;++s)n+=String.fromCharCode(e[s]);return n}function R(e,t,i){var n=e.length;(!t||t<0)&&(t=0),(!i||i<0||i>n)&&(i=n);for(var s="",r=t;r<i;++r)s+=B(e[r]);return s}function L(e,t,i){for(var n=e.slice(t,i),s="",r=0;r<n.length;r+=2)s+=String.fromCharCode(n[r]+256*n[r+1]);return s}function k(e,t,i){if(e%1!=0||e<0)throw new RangeError("offset is not uint");if(e+t>i)throw new RangeError("Trying to access beyond buffer length")}function P(e,t,i,n,s,r){if(!l.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>s||t<r)throw new RangeError('"value" argument is out of bounds');if(i+n>e.length)throw new RangeError("Index out of range")}function N(e,t,i,n){t<0&&(t=65535+t+1);for(var s=0,r=Math.min(e.length-i,2);s<r;++s)e[i+s]=(t&255<<8*(n?s:1-s))>>>8*(n?s:1-s)}function O(e,t,i,n){t<0&&(t=4294967295+t+1);for(var s=0,r=Math.min(e.length-i,4);s<r;++s)e[i+s]=t>>>8*(n?s:3-s)&255}function _(e,t,i,n,s,r){if(i+n>e.length)throw new RangeError("Index out of range");if(i<0)throw new RangeError("Index out of range")}function F(e,t,i,n,r){return r||_(e,0,i,4),s.write(e,t,i,n,23,4),i+4}function G(e,t,i,n,r){return r||_(e,0,i,8),s.write(e,t,i,n,52,8),i+8}l.prototype.slice=function(e,t){var i,n=this.length;if((e=~~e)<0?(e+=n)<0&&(e=0):e>n&&(e=n),(t=void 0===t?n:~~t)<0?(t+=n)<0&&(t=0):t>n&&(t=n),t<e&&(t=e),l.TYPED_ARRAY_SUPPORT)(i=this.subarray(e,t)).__proto__=l.prototype;else{var s=t-e;i=new l(s,void 0);for(var r=0;r<s;++r)i[r]=this[r+e]}return i},l.prototype.readUIntLE=function(e,t,i){e|=0,t|=0,i||k(e,t,this.length);for(var n=this[e],s=1,r=0;++r<t&&(s*=256);)n+=this[e+r]*s;return n},l.prototype.readUIntBE=function(e,t,i){e|=0,t|=0,i||k(e,t,this.length);for(var n=this[e+--t],s=1;t>0&&(s*=256);)n+=this[e+--t]*s;return n},l.prototype.readUInt8=function(e,t){return t||k(e,1,this.length),this[e]},l.prototype.readUInt16LE=function(e,t){return t||k(e,2,this.length),this[e]|this[e+1]<<8},l.prototype.readUInt16BE=function(e,t){return t||k(e,2,this.length),this[e]<<8|this[e+1]},l.prototype.readUInt32LE=function(e,t){return t||k(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},l.prototype.readUInt32BE=function(e,t){return t||k(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},l.prototype.readIntLE=function(e,t,i){e|=0,t|=0,i||k(e,t,this.length);for(var n=this[e],s=1,r=0;++r<t&&(s*=256);)n+=this[e+r]*s;return n>=(s*=128)&&(n-=Math.pow(2,8*t)),n},l.prototype.readIntBE=function(e,t,i){e|=0,t|=0,i||k(e,t,this.length);for(var n=t,s=1,r=this[e+--n];n>0&&(s*=256);)r+=this[e+--n]*s;return r>=(s*=128)&&(r-=Math.pow(2,8*t)),r},l.prototype.readInt8=function(e,t){return t||k(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},l.prototype.readInt16LE=function(e,t){t||k(e,2,this.length);var i=this[e]|this[e+1]<<8;return 32768&i?4294901760|i:i},l.prototype.readInt16BE=function(e,t){t||k(e,2,this.length);var i=this[e+1]|this[e]<<8;return 32768&i?4294901760|i:i},l.prototype.readInt32LE=function(e,t){return t||k(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},l.prototype.readInt32BE=function(e,t){return t||k(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},l.prototype.readFloatLE=function(e,t){return t||k(e,4,this.length),s.read(this,e,!0,23,4)},l.prototype.readFloatBE=function(e,t){return t||k(e,4,this.length),s.read(this,e,!1,23,4)},l.prototype.readDoubleLE=function(e,t){return t||k(e,8,this.length),s.read(this,e,!0,52,8)},l.prototype.readDoubleBE=function(e,t){return t||k(e,8,this.length),s.read(this,e,!1,52,8)},l.prototype.writeUIntLE=function(e,t,i,n){e=+e,t|=0,i|=0,n||P(this,e,t,i,Math.pow(2,8*i)-1,0);var s=1,r=0;for(this[t]=255&e;++r<i&&(s*=256);)this[t+r]=e/s&255;return t+i},l.prototype.writeUIntBE=function(e,t,i,n){e=+e,t|=0,i|=0,n||P(this,e,t,i,Math.pow(2,8*i)-1,0);var s=i-1,r=1;for(this[t+s]=255&e;--s>=0&&(r*=256);)this[t+s]=e/r&255;return t+i},l.prototype.writeUInt8=function(e,t,i){return e=+e,t|=0,i||P(this,e,t,1,255,0),l.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[t]=255&e,t+1},l.prototype.writeUInt16LE=function(e,t,i){return e=+e,t|=0,i||P(this,e,t,2,65535,0),l.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):N(this,e,t,!0),t+2},l.prototype.writeUInt16BE=function(e,t,i){return e=+e,t|=0,i||P(this,e,t,2,65535,0),l.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):N(this,e,t,!1),t+2},l.prototype.writeUInt32LE=function(e,t,i){return e=+e,t|=0,i||P(this,e,t,4,4294967295,0),l.TYPED_ARRAY_SUPPORT?(this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e):O(this,e,t,!0),t+4},l.prototype.writeUInt32BE=function(e,t,i){return e=+e,t|=0,i||P(this,e,t,4,4294967295,0),l.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):O(this,e,t,!1),t+4},l.prototype.writeIntLE=function(e,t,i,n){if(e=+e,t|=0,!n){var s=Math.pow(2,8*i-1);P(this,e,t,i,s-1,-s)}var r=0,o=1,a=0;for(this[t]=255&e;++r<i&&(o*=256);)e<0&&0===a&&0!==this[t+r-1]&&(a=1),this[t+r]=(e/o|0)-a&255;return t+i},l.prototype.writeIntBE=function(e,t,i,n){if(e=+e,t|=0,!n){var s=Math.pow(2,8*i-1);P(this,e,t,i,s-1,-s)}var r=i-1,o=1,a=0;for(this[t+r]=255&e;--r>=0&&(o*=256);)e<0&&0===a&&0!==this[t+r+1]&&(a=1),this[t+r]=(e/o|0)-a&255;return t+i},l.prototype.writeInt8=function(e,t,i){return e=+e,t|=0,i||P(this,e,t,1,127,-128),l.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),e<0&&(e=255+e+1),this[t]=255&e,t+1},l.prototype.writeInt16LE=function(e,t,i){return e=+e,t|=0,i||P(this,e,t,2,32767,-32768),l.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):N(this,e,t,!0),t+2},l.prototype.writeInt16BE=function(e,t,i){return e=+e,t|=0,i||P(this,e,t,2,32767,-32768),l.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):N(this,e,t,!1),t+2},l.prototype.writeInt32LE=function(e,t,i){return e=+e,t|=0,i||P(this,e,t,4,2147483647,-2147483648),l.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24):O(this,e,t,!0),t+4},l.prototype.writeInt32BE=function(e,t,i){return e=+e,t|=0,i||P(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),l.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):O(this,e,t,!1),t+4},l.prototype.writeFloatLE=function(e,t,i){return F(this,e,t,!0,i)},l.prototype.writeFloatBE=function(e,t,i){return F(this,e,t,!1,i)},l.prototype.writeDoubleLE=function(e,t,i){return G(this,e,t,!0,i)},l.prototype.writeDoubleBE=function(e,t,i){return G(this,e,t,!1,i)},l.prototype.copy=function(e,t,i,n){if(i||(i=0),n||0===n||(n=this.length),t>=e.length&&(t=e.length),t||(t=0),n>0&&n<i&&(n=i),n===i)return 0;if(0===e.length||0===this.length)return 0;if(t<0)throw new RangeError("targetStart out of bounds");if(i<0||i>=this.length)throw new RangeError("sourceStart out of bounds");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),e.length-t<n-i&&(n=e.length-t+i);var s,r=n-i;if(this===e&&i<t&&t<n)for(s=r-1;s>=0;--s)e[s+t]=this[s+i];else if(r<1e3||!l.TYPED_ARRAY_SUPPORT)for(s=0;s<r;++s)e[s+t]=this[s+i];else Uint8Array.prototype.set.call(e,this.subarray(i,i+r),t);return r},l.prototype.fill=function(e,t,i,n){if("string"==typeof e){if("string"==typeof t?(n=t,t=0,i=this.length):"string"==typeof i&&(n=i,i=this.length),1===e.length){var s=e.charCodeAt(0);s<256&&(e=s)}if(void 0!==n&&"string"!=typeof n)throw new TypeError("encoding must be a string");if("string"==typeof n&&!l.isEncoding(n))throw new TypeError("Unknown encoding: "+n)}else"number"==typeof e&&(e&=255);if(t<0||this.length<t||this.length<i)throw new RangeError("Out of range index");if(i<=t)return this;var r;if(t>>>=0,i=void 0===i?this.length:i>>>0,e||(e=0),"number"==typeof e)for(r=t;r<i;++r)this[r]=e;else{var o=l.isBuffer(e)?e:H(new l(e,n).toString()),a=o.length;for(r=0;r<i-t;++r)this[r+t]=o[r%a]}return this};var V=/[^+\/0-9A-Za-z-_]/g;function B(e){return e<16?"0"+e.toString(16):e.toString(16)}function H(e,t){var i;t=t||1/0;for(var n=e.length,s=null,r=[],o=0;o<n;++o){if((i=e.charCodeAt(o))>55295&&i<57344){if(!s){if(i>56319){(t-=3)>-1&&r.push(239,191,189);continue}if(o+1===n){(t-=3)>-1&&r.push(239,191,189);continue}s=i;continue}if(i<56320){(t-=3)>-1&&r.push(239,191,189),s=i;continue}i=65536+(s-55296<<10|i-56320)}else s&&(t-=3)>-1&&r.push(239,191,189);if(s=null,i<128){if((t-=1)<0)break;r.push(i)}else if(i<2048){if((t-=2)<0)break;r.push(i>>6|192,63&i|128)}else if(i<65536){if((t-=3)<0)break;r.push(i>>12|224,i>>6&63|128,63&i|128)}else{if(!(i<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;r.push(i>>18|240,i>>12&63|128,i>>6&63|128,63&i|128)}}return r}function z(e){return n.toByteArray(function(e){if((e=function(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}(e).replace(V,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function U(e,t,i,n){for(var s=0;s<n&&!(s+i>=t.length||s>=e.length);++s)t[s+i]=e[s];return s}},77511(e,t,i){"use strict";var n=i(84933),s=i(63328),r="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;t.Buffer=l,t.SlowBuffer=function(e){return+e!=e&&(e=0),l.alloc(+e)},t.INSPECT_MAX_BYTES=50;var o=2147483647;function a(e){if(e>o)throw new RangeError('The value "'+e+'" is invalid for option "size"');var t=new Uint8Array(e);return Object.setPrototypeOf(t,l.prototype),t}function l(e,t,i){if("number"==typeof e){if("string"==typeof t)throw new TypeError('The "string" argument must be of type string. Received type number');return d(e)}return c(e,t,i)}function c(e,t,i){if("string"==typeof e)return function(e,t){if("string"==typeof t&&""!==t||(t="utf8"),!l.isEncoding(t))throw new TypeError("Unknown encoding: "+t);var i=0|f(e,t),n=a(i),s=n.write(e,t);return s!==i&&(n=n.slice(0,s)),n}(e,t);if(ArrayBuffer.isView(e))return u(e);if(null==e)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e);if(z(e,ArrayBuffer)||e&&z(e.buffer,ArrayBuffer))return p(e,t,i);if("undefined"!=typeof SharedArrayBuffer&&(z(e,SharedArrayBuffer)||e&&z(e.buffer,SharedArrayBuffer)))return p(e,t,i);if("number"==typeof e)throw new TypeError('The "value" argument must not be of type number. Received type number');var n=e.valueOf&&e.valueOf();if(null!=n&&n!==e)return l.from(n,t,i);var s=function(e){if(l.isBuffer(e)){var t=0|g(e.length),i=a(t);return 0===i.length||e.copy(i,0,0,t),i}return void 0!==e.length?"number"!=typeof e.length||U(e.length)?a(0):u(e):"Buffer"===e.type&&Array.isArray(e.data)?u(e.data):void 0}(e);if(s)return s;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof e[Symbol.toPrimitive])return l.from(e[Symbol.toPrimitive]("string"),t,i);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e)}function h(e){if("number"!=typeof e)throw new TypeError('"size" argument must be of type number');if(e<0)throw new RangeError('The value "'+e+'" is invalid for option "size"')}function d(e){return h(e),a(e<0?0:0|g(e))}function u(e){for(var t=e.length<0?0:0|g(e.length),i=a(t),n=0;n<t;n+=1)i[n]=255&e[n];return i}function p(e,t,i){if(t<0||e.byteLength<t)throw new RangeError('"offset" is outside of buffer bounds');if(e.byteLength<t+(i||0))throw new RangeError('"length" is outside of buffer bounds');var n;return n=void 0===t&&void 0===i?new Uint8Array(e):void 0===i?new Uint8Array(e,t):new Uint8Array(e,t,i),Object.setPrototypeOf(n,l.prototype),n}function g(e){if(e>=o)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+o.toString(16)+" bytes");return 0|e}function f(e,t){if(l.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||z(e,ArrayBuffer))return e.byteLength;if("string"!=typeof e)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof e);var i=e.length,n=arguments.length>2&&!0===arguments[2];if(!n&&0===i)return 0;for(var s=!1;;)switch(t){case"ascii":case"latin1":case"binary":return i;case"utf8":case"utf-8":return V(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*i;case"hex":return i>>>1;case"base64":return B(e).length;default:if(s)return n?-1:V(e).length;t=(""+t).toLowerCase(),s=!0}}function m(e,t,i){var n=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===i||i>this.length)&&(i=this.length),i<=0)return"";if((i>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return L(this,t,i);case"utf8":case"utf-8":return T(this,t,i);case"ascii":return I(this,t,i);case"latin1":case"binary":return R(this,t,i);case"base64":return A(this,t,i);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return k(this,t,i);default:if(n)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),n=!0}}function v(e,t,i){var n=e[t];e[t]=e[i],e[i]=n}function y(e,t,i,n,s){if(0===e.length)return-1;if("string"==typeof i?(n=i,i=0):i>2147483647?i=2147483647:i<-2147483648&&(i=-2147483648),U(i=+i)&&(i=s?0:e.length-1),i<0&&(i=e.length+i),i>=e.length){if(s)return-1;i=e.length-1}else if(i<0){if(!s)return-1;i=0}if("string"==typeof t&&(t=l.from(t,n)),l.isBuffer(t))return 0===t.length?-1:C(e,t,i,n,s);if("number"==typeof t)return t&=255,"function"==typeof Uint8Array.prototype.indexOf?s?Uint8Array.prototype.indexOf.call(e,t,i):Uint8Array.prototype.lastIndexOf.call(e,t,i):C(e,[t],i,n,s);throw new TypeError("val must be string, number or Buffer")}function C(e,t,i,n,s){var r,o=1,a=e.length,l=t.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(e.length<2||t.length<2)return-1;o=2,a/=2,l/=2,i/=2}function c(e,t){return 1===o?e[t]:e.readUInt16BE(t*o)}if(s){var h=-1;for(r=i;r<a;r++)if(c(e,r)===c(t,-1===h?0:r-h)){if(-1===h&&(h=r),r-h+1===l)return h*o}else-1!==h&&(r-=r-h),h=-1}else for(i+l>a&&(i=a-l),r=i;r>=0;r--){for(var d=!0,u=0;u<l;u++)if(c(e,r+u)!==c(t,u)){d=!1;break}if(d)return r}return-1}function b(e,t,i,n){i=Number(i)||0;var s=e.length-i;n?(n=Number(n))>s&&(n=s):n=s;var r=t.length;n>r/2&&(n=r/2);for(var o=0;o<n;++o){var a=parseInt(t.substr(2*o,2),16);if(U(a))return o;e[i+o]=a}return o}function S(e,t,i,n){return H(V(t,e.length-i),e,i,n)}function w(e,t,i,n){return H(function(e){for(var t=[],i=0;i<e.length;++i)t.push(255&e.charCodeAt(i));return t}(t),e,i,n)}function x(e,t,i,n){return w(e,t,i,n)}function E(e,t,i,n){return H(B(t),e,i,n)}function M(e,t,i,n){return H(function(e,t){for(var i,n,s,r=[],o=0;o<e.length&&!((t-=2)<0);++o)n=(i=e.charCodeAt(o))>>8,s=i%256,r.push(s),r.push(n);return r}(t,e.length-i),e,i,n)}function A(e,t,i){return 0===t&&i===e.length?n.fromByteArray(e):n.fromByteArray(e.slice(t,i))}function T(e,t,i){i=Math.min(e.length,i);for(var n=[],s=t;s<i;){var r,o,a,l,c=e[s],h=null,d=c>239?4:c>223?3:c>191?2:1;if(s+d<=i)switch(d){case 1:c<128&&(h=c);break;case 2:128==(192&(r=e[s+1]))&&(l=(31&c)<<6|63&r)>127&&(h=l);break;case 3:r=e[s+1],o=e[s+2],128==(192&r)&&128==(192&o)&&(l=(15&c)<<12|(63&r)<<6|63&o)>2047&&(l<55296||l>57343)&&(h=l);break;case 4:r=e[s+1],o=e[s+2],a=e[s+3],128==(192&r)&&128==(192&o)&&128==(192&a)&&(l=(15&c)<<18|(63&r)<<12|(63&o)<<6|63&a)>65535&&l<1114112&&(h=l)}null===h?(h=65533,d=1):h>65535&&(h-=65536,n.push(h>>>10&1023|55296),h=56320|1023&h),n.push(h),s+=d}return function(e){var t=e.length;if(t<=D)return String.fromCharCode.apply(String,e);for(var i="",n=0;n<t;)i+=String.fromCharCode.apply(String,e.slice(n,n+=D));return i}(n)}t.kMaxLength=o,l.TYPED_ARRAY_SUPPORT=function(){try{var e=new Uint8Array(1),t={foo:function(){return 42}};return Object.setPrototypeOf(t,Uint8Array.prototype),Object.setPrototypeOf(e,t),42===e.foo()}catch(e){return!1}}(),l.TYPED_ARRAY_SUPPORT||"undefined"==typeof console||"function"!=typeof console.error||console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support."),Object.defineProperty(l.prototype,"parent",{enumerable:!0,get:function(){if(l.isBuffer(this))return this.buffer}}),Object.defineProperty(l.prototype,"offset",{enumerable:!0,get:function(){if(l.isBuffer(this))return this.byteOffset}}),l.poolSize=8192,l.from=function(e,t,i){return c(e,t,i)},Object.setPrototypeOf(l.prototype,Uint8Array.prototype),Object.setPrototypeOf(l,Uint8Array),l.alloc=function(e,t,i){return function(e,t,i){return h(e),e<=0?a(e):void 0!==t?"string"==typeof i?a(e).fill(t,i):a(e).fill(t):a(e)}(e,t,i)},l.allocUnsafe=function(e){return d(e)},l.allocUnsafeSlow=function(e){return d(e)},l.isBuffer=function(e){return null!=e&&!0===e._isBuffer&&e!==l.prototype},l.compare=function(e,t){if(z(e,Uint8Array)&&(e=l.from(e,e.offset,e.byteLength)),z(t,Uint8Array)&&(t=l.from(t,t.offset,t.byteLength)),!l.isBuffer(e)||!l.isBuffer(t))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(e===t)return 0;for(var i=e.length,n=t.length,s=0,r=Math.min(i,n);s<r;++s)if(e[s]!==t[s]){i=e[s],n=t[s];break}return i<n?-1:n<i?1:0},l.isEncoding=function(e){switch(String(e).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},l.concat=function(e,t){if(!Array.isArray(e))throw new TypeError('"list" argument must be an Array of Buffers');if(0===e.length)return l.alloc(0);var i;if(void 0===t)for(t=0,i=0;i<e.length;++i)t+=e[i].length;var n=l.allocUnsafe(t),s=0;for(i=0;i<e.length;++i){var r=e[i];if(z(r,Uint8Array)&&(r=l.from(r)),!l.isBuffer(r))throw new TypeError('"list" argument must be an Array of Buffers');r.copy(n,s),s+=r.length}return n},l.byteLength=f,l.prototype._isBuffer=!0,l.prototype.swap16=function(){var e=this.length;if(e%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var t=0;t<e;t+=2)v(this,t,t+1);return this},l.prototype.swap32=function(){var e=this.length;if(e%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var t=0;t<e;t+=4)v(this,t,t+3),v(this,t+1,t+2);return this},l.prototype.swap64=function(){var e=this.length;if(e%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var t=0;t<e;t+=8)v(this,t,t+7),v(this,t+1,t+6),v(this,t+2,t+5),v(this,t+3,t+4);return this},l.prototype.toString=function(){var e=this.length;return 0===e?"":0===arguments.length?T(this,0,e):m.apply(this,arguments)},l.prototype.toLocaleString=l.prototype.toString,l.prototype.equals=function(e){if(!l.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e||0===l.compare(this,e)},l.prototype.inspect=function(){var e="",i=t.INSPECT_MAX_BYTES;return e=this.toString("hex",0,i).replace(/(.{2})/g,"$1 ").trim(),this.length>i&&(e+=" ... "),"<Buffer "+e+">"},r&&(l.prototype[r]=l.prototype.inspect),l.prototype.compare=function(e,t,i,n,s){if(z(e,Uint8Array)&&(e=l.from(e,e.offset,e.byteLength)),!l.isBuffer(e))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof e);if(void 0===t&&(t=0),void 0===i&&(i=e?e.length:0),void 0===n&&(n=0),void 0===s&&(s=this.length),t<0||i>e.length||n<0||s>this.length)throw new RangeError("out of range index");if(n>=s&&t>=i)return 0;if(n>=s)return-1;if(t>=i)return 1;if(this===e)return 0;for(var r=(s>>>=0)-(n>>>=0),o=(i>>>=0)-(t>>>=0),a=Math.min(r,o),c=this.slice(n,s),h=e.slice(t,i),d=0;d<a;++d)if(c[d]!==h[d]){r=c[d],o=h[d];break}return r<o?-1:o<r?1:0},l.prototype.includes=function(e,t,i){return-1!==this.indexOf(e,t,i)},l.prototype.indexOf=function(e,t,i){return y(this,e,t,i,!0)},l.prototype.lastIndexOf=function(e,t,i){return y(this,e,t,i,!1)},l.prototype.write=function(e,t,i,n){if(void 0===t)n="utf8",i=this.length,t=0;else if(void 0===i&&"string"==typeof t)n=t,i=this.length,t=0;else{if(!isFinite(t))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");t>>>=0,isFinite(i)?(i>>>=0,void 0===n&&(n="utf8")):(n=i,i=void 0)}var s=this.length-t;if((void 0===i||i>s)&&(i=s),e.length>0&&(i<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");for(var r=!1;;)switch(n){case"hex":return b(this,e,t,i);case"utf8":case"utf-8":return S(this,e,t,i);case"ascii":return w(this,e,t,i);case"latin1":case"binary":return x(this,e,t,i);case"base64":return E(this,e,t,i);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return M(this,e,t,i);default:if(r)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),r=!0}},l.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var D=4096;function I(e,t,i){var n="";i=Math.min(e.length,i);for(var s=t;s<i;++s)n+=String.fromCharCode(127&e[s]);return n}function R(e,t,i){var n="";i=Math.min(e.length,i);for(var s=t;s<i;++s)n+=String.fromCharCode(e[s]);return n}function L(e,t,i){var n=e.length;(!t||t<0)&&(t=0),(!i||i<0||i>n)&&(i=n);for(var s="",r=t;r<i;++r)s+=W[e[r]];return s}function k(e,t,i){for(var n=e.slice(t,i),s="",r=0;r<n.length;r+=2)s+=String.fromCharCode(n[r]+256*n[r+1]);return s}function P(e,t,i){if(e%1!=0||e<0)throw new RangeError("offset is not uint");if(e+t>i)throw new RangeError("Trying to access beyond buffer length")}function N(e,t,i,n,s,r){if(!l.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>s||t<r)throw new RangeError('"value" argument is out of bounds');if(i+n>e.length)throw new RangeError("Index out of range")}function O(e,t,i,n,s,r){if(i+n>e.length)throw new RangeError("Index out of range");if(i<0)throw new RangeError("Index out of range")}function _(e,t,i,n,r){return t=+t,i>>>=0,r||O(e,0,i,4),s.write(e,t,i,n,23,4),i+4}function F(e,t,i,n,r){return t=+t,i>>>=0,r||O(e,0,i,8),s.write(e,t,i,n,52,8),i+8}l.prototype.slice=function(e,t){var i=this.length;(e=~~e)<0?(e+=i)<0&&(e=0):e>i&&(e=i),(t=void 0===t?i:~~t)<0?(t+=i)<0&&(t=0):t>i&&(t=i),t<e&&(t=e);var n=this.subarray(e,t);return Object.setPrototypeOf(n,l.prototype),n},l.prototype.readUIntLE=function(e,t,i){e>>>=0,t>>>=0,i||P(e,t,this.length);for(var n=this[e],s=1,r=0;++r<t&&(s*=256);)n+=this[e+r]*s;return n},l.prototype.readUIntBE=function(e,t,i){e>>>=0,t>>>=0,i||P(e,t,this.length);for(var n=this[e+--t],s=1;t>0&&(s*=256);)n+=this[e+--t]*s;return n},l.prototype.readUInt8=function(e,t){return e>>>=0,t||P(e,1,this.length),this[e]},l.prototype.readUInt16LE=function(e,t){return e>>>=0,t||P(e,2,this.length),this[e]|this[e+1]<<8},l.prototype.readUInt16BE=function(e,t){return e>>>=0,t||P(e,2,this.length),this[e]<<8|this[e+1]},l.prototype.readUInt32LE=function(e,t){return e>>>=0,t||P(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},l.prototype.readUInt32BE=function(e,t){return e>>>=0,t||P(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},l.prototype.readIntLE=function(e,t,i){e>>>=0,t>>>=0,i||P(e,t,this.length);for(var n=this[e],s=1,r=0;++r<t&&(s*=256);)n+=this[e+r]*s;return n>=(s*=128)&&(n-=Math.pow(2,8*t)),n},l.prototype.readIntBE=function(e,t,i){e>>>=0,t>>>=0,i||P(e,t,this.length);for(var n=t,s=1,r=this[e+--n];n>0&&(s*=256);)r+=this[e+--n]*s;return r>=(s*=128)&&(r-=Math.pow(2,8*t)),r},l.prototype.readInt8=function(e,t){return e>>>=0,t||P(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},l.prototype.readInt16LE=function(e,t){e>>>=0,t||P(e,2,this.length);var i=this[e]|this[e+1]<<8;return 32768&i?4294901760|i:i},l.prototype.readInt16BE=function(e,t){e>>>=0,t||P(e,2,this.length);var i=this[e+1]|this[e]<<8;return 32768&i?4294901760|i:i},l.prototype.readInt32LE=function(e,t){return e>>>=0,t||P(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},l.prototype.readInt32BE=function(e,t){return e>>>=0,t||P(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},l.prototype.readFloatLE=function(e,t){return e>>>=0,t||P(e,4,this.length),s.read(this,e,!0,23,4)},l.prototype.readFloatBE=function(e,t){return e>>>=0,t||P(e,4,this.length),s.read(this,e,!1,23,4)},l.prototype.readDoubleLE=function(e,t){return e>>>=0,t||P(e,8,this.length),s.read(this,e,!0,52,8)},l.prototype.readDoubleBE=function(e,t){return e>>>=0,t||P(e,8,this.length),s.read(this,e,!1,52,8)},l.prototype.writeUIntLE=function(e,t,i,n){e=+e,t>>>=0,i>>>=0,n||N(this,e,t,i,Math.pow(2,8*i)-1,0);var s=1,r=0;for(this[t]=255&e;++r<i&&(s*=256);)this[t+r]=e/s&255;return t+i},l.prototype.writeUIntBE=function(e,t,i,n){e=+e,t>>>=0,i>>>=0,n||N(this,e,t,i,Math.pow(2,8*i)-1,0);var s=i-1,r=1;for(this[t+s]=255&e;--s>=0&&(r*=256);)this[t+s]=e/r&255;return t+i},l.prototype.writeUInt8=function(e,t,i){return e=+e,t>>>=0,i||N(this,e,t,1,255,0),this[t]=255&e,t+1},l.prototype.writeUInt16LE=function(e,t,i){return e=+e,t>>>=0,i||N(this,e,t,2,65535,0),this[t]=255&e,this[t+1]=e>>>8,t+2},l.prototype.writeUInt16BE=function(e,t,i){return e=+e,t>>>=0,i||N(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=255&e,t+2},l.prototype.writeUInt32LE=function(e,t,i){return e=+e,t>>>=0,i||N(this,e,t,4,4294967295,0),this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e,t+4},l.prototype.writeUInt32BE=function(e,t,i){return e=+e,t>>>=0,i||N(this,e,t,4,4294967295,0),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},l.prototype.writeIntLE=function(e,t,i,n){if(e=+e,t>>>=0,!n){var s=Math.pow(2,8*i-1);N(this,e,t,i,s-1,-s)}var r=0,o=1,a=0;for(this[t]=255&e;++r<i&&(o*=256);)e<0&&0===a&&0!==this[t+r-1]&&(a=1),this[t+r]=(e/o|0)-a&255;return t+i},l.prototype.writeIntBE=function(e,t,i,n){if(e=+e,t>>>=0,!n){var s=Math.pow(2,8*i-1);N(this,e,t,i,s-1,-s)}var r=i-1,o=1,a=0;for(this[t+r]=255&e;--r>=0&&(o*=256);)e<0&&0===a&&0!==this[t+r+1]&&(a=1),this[t+r]=(e/o|0)-a&255;return t+i},l.prototype.writeInt8=function(e,t,i){return e=+e,t>>>=0,i||N(this,e,t,1,127,-128),e<0&&(e=255+e+1),this[t]=255&e,t+1},l.prototype.writeInt16LE=function(e,t,i){return e=+e,t>>>=0,i||N(this,e,t,2,32767,-32768),this[t]=255&e,this[t+1]=e>>>8,t+2},l.prototype.writeInt16BE=function(e,t,i){return e=+e,t>>>=0,i||N(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=255&e,t+2},l.prototype.writeInt32LE=function(e,t,i){return e=+e,t>>>=0,i||N(this,e,t,4,2147483647,-2147483648),this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24,t+4},l.prototype.writeInt32BE=function(e,t,i){return e=+e,t>>>=0,i||N(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},l.prototype.writeFloatLE=function(e,t,i){return _(this,e,t,!0,i)},l.prototype.writeFloatBE=function(e,t,i){return _(this,e,t,!1,i)},l.prototype.writeDoubleLE=function(e,t,i){return F(this,e,t,!0,i)},l.prototype.writeDoubleBE=function(e,t,i){return F(this,e,t,!1,i)},l.prototype.copy=function(e,t,i,n){if(!l.isBuffer(e))throw new TypeError("argument should be a Buffer");if(i||(i=0),n||0===n||(n=this.length),t>=e.length&&(t=e.length),t||(t=0),n>0&&n<i&&(n=i),n===i)return 0;if(0===e.length||0===this.length)return 0;if(t<0)throw new RangeError("targetStart out of bounds");if(i<0||i>=this.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),e.length-t<n-i&&(n=e.length-t+i);var s=n-i;if(this===e&&"function"==typeof Uint8Array.prototype.copyWithin)this.copyWithin(t,i,n);else if(this===e&&i<t&&t<n)for(var r=s-1;r>=0;--r)e[r+t]=this[r+i];else Uint8Array.prototype.set.call(e,this.subarray(i,n),t);return s},l.prototype.fill=function(e,t,i,n){if("string"==typeof e){if("string"==typeof t?(n=t,t=0,i=this.length):"string"==typeof i&&(n=i,i=this.length),void 0!==n&&"string"!=typeof n)throw new TypeError("encoding must be a string");if("string"==typeof n&&!l.isEncoding(n))throw new TypeError("Unknown encoding: "+n);if(1===e.length){var s=e.charCodeAt(0);("utf8"===n&&s<128||"latin1"===n)&&(e=s)}}else"number"==typeof e?e&=255:"boolean"==typeof e&&(e=Number(e));if(t<0||this.length<t||this.length<i)throw new RangeError("Out of range index");if(i<=t)return this;var r;if(t>>>=0,i=void 0===i?this.length:i>>>0,e||(e=0),"number"==typeof e)for(r=t;r<i;++r)this[r]=e;else{var o=l.isBuffer(e)?e:l.from(e,n),a=o.length;if(0===a)throw new TypeError('The value "'+e+'" is invalid for argument "value"');for(r=0;r<i-t;++r)this[r+t]=o[r%a]}return this};var G=/[^+/0-9A-Za-z-_]/g;function V(e,t){var i;t=t||1/0;for(var n=e.length,s=null,r=[],o=0;o<n;++o){if((i=e.charCodeAt(o))>55295&&i<57344){if(!s){if(i>56319){(t-=3)>-1&&r.push(239,191,189);continue}if(o+1===n){(t-=3)>-1&&r.push(239,191,189);continue}s=i;continue}if(i<56320){(t-=3)>-1&&r.push(239,191,189),s=i;continue}i=65536+(s-55296<<10|i-56320)}else s&&(t-=3)>-1&&r.push(239,191,189);if(s=null,i<128){if((t-=1)<0)break;r.push(i)}else if(i<2048){if((t-=2)<0)break;r.push(i>>6|192,63&i|128)}else if(i<65536){if((t-=3)<0)break;r.push(i>>12|224,i>>6&63|128,63&i|128)}else{if(!(i<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;r.push(i>>18|240,i>>12&63|128,i>>6&63|128,63&i|128)}}return r}function B(e){return n.toByteArray(function(e){if((e=(e=e.split("=")[0]).trim().replace(G,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function H(e,t,i,n){for(var s=0;s<n&&!(s+i>=t.length||s>=e.length);++s)t[s+i]=e[s];return s}function z(e,t){return e instanceof t||null!=e&&null!=e.constructor&&null!=e.constructor.name&&e.constructor.name===t.name}function U(e){return e!=e}var W=function(){for(var e="0123456789abcdef",t=new Array(256),i=0;i<16;++i)for(var n=16*i,s=0;s<16;++s)t[n+s]=e[i]+e[s];return t}()},97785(e,t,i){"use strict";var n=i(79524),s=i(64811),r=i(46255),o=i(12728);e.exports=o||n.call(r,s)},96440(e,t,i){"use strict";var n=i(79524),s=i(64811),r=i(97785);e.exports=function(){return r(n,s,arguments)}},64811(e){"use strict";e.exports=Function.prototype.apply},46255(e){"use strict";e.exports=Function.prototype.call},92427(e,t,i){"use strict";var n=i(79524),s=i(71102),r=i(46255),o=i(97785);e.exports=function(e){if(e.length<1||"function"!=typeof e[0])throw new s("a function is required");return o(n,r,e)}},12728(e){"use strict";e.exports="undefined"!=typeof Reflect&&Reflect&&Reflect.apply},17695(e,t,i){"use strict";var n=i(7755),s=i(39886),r=i(92427),o=i(96440);e.exports=function(e){var t=r(arguments),i=e.length-(arguments.length-1);return n(t,1+(i>0?i:0),!0)},s?s(e.exports,"apply",{value:o}):e.exports.apply=o},98801(e,t,i){"use strict";var n=i(49336),s=i(92427),r=s([n("%String.prototype.indexOf%")]);e.exports=function(e,t){var i=n(e,!!t);return"function"==typeof i&&r(e,".prototype.")>-1?s([i]):i}},36334(e,t,i){"use strict";var n=i(56608).Buffer,s=i(66096).Transform,r=i(64323).I,o=i(91193),a=i(26919);function l(e){s.call(this),this.hashMode="string"==typeof e,this.hashMode?this[e]=this._finalOrDigest:this.final=this._finalOrDigest,this._final&&(this.__final=this._final,this._final=null),this._decoder=null,this._encoding=null}o(l,s),l.prototype.update=function(e,t,i){var n=a(e,t),s=this._update(n);return this.hashMode?this:(i&&(s=this._toString(s,i)),s)},l.prototype.setAutoPadding=function(){},l.prototype.getAuthTag=function(){throw new Error("trying to get auth tag in unsupported state")},l.prototype.setAuthTag=function(){throw new Error("trying to set auth tag in unsupported state")},l.prototype.setAAD=function(){throw new Error("trying to set aad in unsupported state")},l.prototype._transform=function(e,t,i){var n;try{this.hashMode?this._update(e):this.push(this._update(e))}catch(e){n=e}finally{i(n)}},l.prototype._flush=function(e){var t;try{this.push(this.__final())}catch(e){t=e}e(t)},l.prototype._finalOrDigest=function(e){var t=this.__final()||n.alloc(0);return e&&(t=this._toString(t,e,!0)),t},l.prototype._toString=function(e,t,i){if(this._decoder||(this._decoder=new r(t),this._encoding=t),this._encoding!==t)throw new Error("can’t switch encodings");var n=this._decoder.write(e);return i&&(n+=this._decoder.end()),n},e.exports=l},44477(e){function t(){return new DOMException("The request is not allowed","NotAllowedError")}e.exports=async function(e){try{await async function(e){if(!navigator.clipboard)throw t();return navigator.clipboard.writeText(e)}(e)}catch(i){try{await async function(e){const i=document.createElement("span");i.textContent=e,i.style.whiteSpace="pre",i.style.webkitUserSelect="auto",i.style.userSelect="all",document.body.appendChild(i);const n=window.getSelection(),s=window.document.createRange();n.removeAllRanges(),s.selectNode(i),n.addRange(s);let r=!1;try{r=window.document.execCommand("copy")}finally{n.removeAllRanges(),window.document.body.removeChild(i)}if(!r)throw t()}(e)}catch(e){throw e||i||t()}}}},35284(e,t,i){"use strict";function n(e){var t,i,s="";if("string"==typeof e||"number"==typeof e)s+=e;else if("object"==typeof e)if(Array.isArray(e))for(t=0;t<e.length;t++)e[t]&&(i=n(e[t]))&&(s&&(s+=" "),s+=i);else for(t in e)e[t]&&(s&&(s+=" "),s+=t);return s}i.d(t,{A:()=>s});const s=function(){for(var e,t,i=0,s="";i<arguments.length;)(e=arguments[i++])&&(t=n(e))&&(s&&(s+=" "),s+=t);return s}},89901(e){function t(e){var i,n,s="";if("string"==typeof e||"number"==typeof e)s+=e;else if("object"==typeof e)if(Array.isArray(e)){var r=e.length;for(i=0;i<r;i++)e[i]&&(n=t(e[i]))&&(s&&(s+=" "),s+=n)}else for(n in e)e[n]&&(s&&(s+=" "),s+=n);return s}function i(){for(var e,i,n=0,s="",r=arguments.length;n<r;n++)(e=arguments[n])&&(i=t(e))&&(s&&(s+=" "),s+=i);return s}e.exports=i,e.exports.clsx=i},50703(e){"use strict";e.exports=function(e){return String(e).replace(/\s+/g," ")}},99448(e,t){"use strict";t.q=function(e,t){if("string"!=typeof e)throw new TypeError("argument str must be a string");for(var n={},s=t||{},o=e.split(";"),a=s.decode||i,l=0;l<o.length;l++){var c=o[l],h=c.indexOf("=");if(!(h<0)){var d=c.substring(0,h).trim();if(null==n[d]){var u=c.substring(h+1,c.length).trim();'"'===u[0]&&(u=u.slice(1,-1)),n[d]=r(u,a)}}}return n},t.l=function(e,t,i){var r=i||{},o=r.encode||n;if("function"!=typeof o)throw new TypeError("option encode is invalid");if(!s.test(e))throw new TypeError("argument name is invalid");var a=o(t);if(a&&!s.test(a))throw new TypeError("argument val is invalid");var l=e+"="+a;if(null!=r.maxAge){var c=r.maxAge-0;if(isNaN(c)||!isFinite(c))throw new TypeError("option maxAge is invalid");l+="; Max-Age="+Math.floor(c)}if(r.domain){if(!s.test(r.domain))throw new TypeError("option domain is invalid");l+="; Domain="+r.domain}if(r.path){if(!s.test(r.path))throw new TypeError("option path is invalid");l+="; Path="+r.path}if(r.expires){if("function"!=typeof r.expires.toUTCString)throw new TypeError("option expires is invalid");l+="; Expires="+r.expires.toUTCString()}if(r.httpOnly&&(l+="; HttpOnly"),r.secure&&(l+="; Secure"),r.sameSite)switch("string"==typeof r.sameSite?r.sameSite.toLowerCase():r.sameSite){case!0:l+="; SameSite=Strict";break;case"lax":l+="; SameSite=Lax";break;case"strict":l+="; SameSite=Strict";break;case"none":l+="; SameSite=None";break;default:throw new TypeError("option sameSite is invalid")}return l};var i=decodeURIComponent,n=encodeURIComponent,s=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/;function r(e,t){try{return t(e)}catch(t){return e}}},85877(e,t,i){i(2903),e.exports=i(96595).Object.assign},13112(e,t,i){i(81026);var n=i(96595).Object;e.exports=function(e,t){return n.create(e,t)}},30481(e,t,i){i(92611);var n=i(96595).Object;e.exports=function(e,t,i){return n.defineProperty(e,t,i)}},40688(e,t,i){i(95029),e.exports=i(96595).Object.getPrototypeOf},55111(e,t,i){i(74537),e.exports=i(96595).Object.setPrototypeOf},27773(e,t,i){i(63977),i(83149),i(78993),i(50237),e.exports=i(96595).Symbol},63315(e,t,i){i(91210),i(75505),e.exports=i(36063).f("iterator")},30322(e){e.exports=function(e){if("function"!=typeof e)throw TypeError(e+" is not a function!");return e}},51453(e){e.exports=function(){}},44655(e,t,i){var n=i(17482);e.exports=function(e){if(!n(e))throw TypeError(e+" is not an object!");return e}},2473(e,t,i){var n=i(51552),s=i(14326),r=i(23138);e.exports=function(e){return function(t,i,o){var a,l=n(t),c=s(l.length),h=r(o,c);if(e&&i!=i){for(;c>h;)if((a=l[h++])!=a)return!0}else for(;c>h;h++)if((e||h in l)&&l[h]===i)return e||h||0;return!e&&-1}}},6486(e){var t={}.toString;e.exports=function(e){return t.call(e).slice(8,-1)}},96595(e){var t=e.exports={version:"2.6.12"};"number"==typeof __e&&(__e=t)},64015(e,t,i){var n=i(30322);e.exports=function(e,t,i){if(n(e),void 0===t)return e;switch(i){case 1:return function(i){return e.call(t,i)};case 2:return function(i,n){return e.call(t,i,n)};case 3:return function(i,n,s){return e.call(t,i,n,s)}}return function(){return e.apply(t,arguments)}}},77095(e){e.exports=function(e){if(null==e)throw TypeError("Can't call method on  "+e);return e}},27828(e,t,i){e.exports=!i(58599)(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a})},35299(e,t,i){var n=i(17482),s=i(79747).document,r=n(s)&&n(s.createElement);e.exports=function(e){return r?s.createElement(e):{}}},46527(e){e.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},94618(e,t,i){var n=i(46936),s=i(62951),r=i(60092);e.exports=function(e){var t=n(e),i=s.f;if(i)for(var o,a=i(e),l=r.f,c=0;a.length>c;)l.call(e,o=a[c++])&&t.push(o);return t}},9102(e,t,i){var n=i(79747),s=i(96595),r=i(64015),o=i(48324),a=i(21998),l="prototype",c=function(e,t,i){var h,d,u,p=e&c.F,g=e&c.G,f=e&c.S,m=e&c.P,v=e&c.B,y=e&c.W,C=g?s:s[t]||(s[t]={}),b=C[l],S=g?n:f?n[t]:(n[t]||{})[l];for(h in g&&(i=t),i)(d=!p&&S&&void 0!==S[h])&&a(C,h)||(u=d?S[h]:i[h],C[h]=g&&"function"!=typeof S[h]?i[h]:v&&d?r(u,n):y&&S[h]==u?function(e){var t=function(t,i,n){if(this instanceof e){switch(arguments.length){case 0:return new e;case 1:return new e(t);case 2:return new e(t,i)}return new e(t,i,n)}return e.apply(this,arguments)};return t[l]=e[l],t}(u):m&&"function"==typeof u?r(Function.call,u):u,m&&((C.virtual||(C.virtual={}))[h]=u,e&c.R&&b&&!b[h]&&o(b,h,u)))};c.F=1,c.G=2,c.S=4,c.P=8,c.B=16,c.W=32,c.U=64,c.R=128,e.exports=c},58599(e){e.exports=function(e){try{return!!e()}catch(e){return!0}}},79747(e){var t=e.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=t)},21998(e){var t={}.hasOwnProperty;e.exports=function(e,i){return t.call(e,i)}},48324(e,t,i){var n=i(10788),s=i(25995);e.exports=i(27828)?function(e,t,i){return n.f(e,t,s(1,i))}:function(e,t,i){return e[t]=i,e}},31349(e,t,i){var n=i(79747).document;e.exports=n&&n.documentElement},27941(e,t,i){e.exports=!i(27828)&&!i(58599)(function(){return 7!=Object.defineProperty(i(35299)("div"),"a",{get:function(){return 7}}).a})},6234(e,t,i){var n=i(6486);e.exports=Object("z").propertyIsEnumerable(0)?Object:function(e){return"String"==n(e)?e.split(""):Object(e)}},39984(e,t,i){var n=i(6486);e.exports=Array.isArray||function(e){return"Array"==n(e)}},17482(e){e.exports=function(e){return"object"==typeof e?null!==e:"function"==typeof e}},36099(e,t,i){"use strict";var n=i(69840),s=i(25995),r=i(26343),o={};i(48324)(o,i(78161)("iterator"),function(){return this}),e.exports=function(e,t,i){e.prototype=n(o,{next:s(1,i)}),r(e,t+" Iterator")}},14520(e,t,i){"use strict";var n=i(75549),s=i(9102),r=i(10058),o=i(48324),a=i(71813),l=i(36099),c=i(26343),h=i(23218),d=i(78161)("iterator"),u=!([].keys&&"next"in[].keys()),p="keys",g="values",f=function(){return this};e.exports=function(e,t,i,m,v,y,C){l(i,t,m);var b,S,w,x=function(e){if(!u&&e in T)return T[e];switch(e){case p:case g:return function(){return new i(this,e)}}return function(){return new i(this,e)}},E=t+" Iterator",M=v==g,A=!1,T=e.prototype,D=T[d]||T["@@iterator"]||v&&T[v],I=D||x(v),R=v?M?x("entries"):I:void 0,L="Array"==t&&T.entries||D;if(L&&(w=h(L.call(new e)))!==Object.prototype&&w.next&&(c(w,E,!0),n||"function"==typeof w[d]||o(w,d,f)),M&&D&&D.name!==g&&(A=!0,I=function(){return D.call(this)}),n&&!C||!u&&!A&&T[d]||o(T,d,I),a[t]=I,a[E]=f,v)if(b={values:M?I:x(g),keys:y?I:x(p),entries:R},C)for(S in b)S in T||r(T,S,b[S]);else s(s.P+s.F*(u||A),t,b);return b}},17093(e){e.exports=function(e,t){return{value:t,done:!!e}}},71813(e){e.exports={}},75549(e){e.exports=!0},26853(e,t,i){var n=i(14472)("meta"),s=i(17482),r=i(21998),o=i(10788).f,a=0,l=Object.isExtensible||function(){return!0},c=!i(58599)(function(){return l(Object.preventExtensions({}))}),h=function(e){o(e,n,{value:{i:"O"+ ++a,w:{}}})},d=e.exports={KEY:n,NEED:!1,fastKey:function(e,t){if(!s(e))return"symbol"==typeof e?e:("string"==typeof e?"S":"P")+e;if(!r(e,n)){if(!l(e))return"F";if(!t)return"E";h(e)}return e[n].i},getWeak:function(e,t){if(!r(e,n)){if(!l(e))return!0;if(!t)return!1;h(e)}return e[n].w},onFreeze:function(e){return c&&d.NEED&&l(e)&&!r(e,n)&&h(e),e}}},33677(e,t,i){"use strict";var n=i(27828),s=i(46936),r=i(62951),o=i(60092),a=i(70749),l=i(6234),c=Object.assign;e.exports=!c||i(58599)(function(){var e={},t={},i=Symbol(),n="abcdefghijklmnopqrst";return e[i]=7,n.split("").forEach(function(e){t[e]=e}),7!=c({},e)[i]||Object.keys(c({},t)).join("")!=n})?function(e,t){for(var i=a(e),c=arguments.length,h=1,d=r.f,u=o.f;c>h;)for(var p,g=l(arguments[h++]),f=d?s(g).concat(d(g)):s(g),m=f.length,v=0;m>v;)p=f[v++],n&&!u.call(g,p)||(i[p]=g[p]);return i}:c},69840(e,t,i){var n=i(44655),s=i(50251),r=i(46527),o=i(81119)("IE_PROTO"),a=function(){},l="prototype",c=function(){var e,t=i(35299)("iframe"),n=r.length;for(t.style.display="none",i(31349).appendChild(t),t.src="javascript:",(e=t.contentWindow.document).open(),e.write("<script>document.F=Object<\/script>"),e.close(),c=e.F;n--;)delete c[l][r[n]];return c()};e.exports=Object.create||function(e,t){var i;return null!==e?(a[l]=n(e),i=new a,a[l]=null,i[o]=e):i=c(),void 0===t?i:s(i,t)}},10788(e,t,i){var n=i(44655),s=i(27941),r=i(15873),o=Object.defineProperty;t.f=i(27828)?Object.defineProperty:function(e,t,i){if(n(e),t=r(t,!0),n(i),s)try{return o(e,t,i)}catch(e){}if("get"in i||"set"in i)throw TypeError("Accessors not supported!");return"value"in i&&(e[t]=i.value),e}},50251(e,t,i){var n=i(10788),s=i(44655),r=i(46936);e.exports=i(27828)?Object.defineProperties:function(e,t){s(e);for(var i,o=r(t),a=o.length,l=0;a>l;)n.f(e,i=o[l++],t[i]);return e}},73686(e,t,i){var n=i(60092),s=i(25995),r=i(51552),o=i(15873),a=i(21998),l=i(27941),c=Object.getOwnPropertyDescriptor;t.f=i(27828)?c:function(e,t){if(e=r(e),t=o(t,!0),l)try{return c(e,t)}catch(e){}if(a(e,t))return s(!n.f.call(e,t),e[t])}},90662(e,t,i){var n=i(51552),s=i(4788).f,r={}.toString,o="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];e.exports.f=function(e){return o&&"[object Window]"==r.call(e)?function(e){try{return s(e)}catch(e){return o.slice()}}(e):s(n(e))}},4788(e,t,i){var n=i(18556),s=i(46527).concat("length","prototype");t.f=Object.getOwnPropertyNames||function(e){return n(e,s)}},62951(e,t){t.f=Object.getOwnPropertySymbols},23218(e,t,i){var n=i(21998),s=i(70749),r=i(81119)("IE_PROTO"),o=Object.prototype;e.exports=Object.getPrototypeOf||function(e){return e=s(e),n(e,r)?e[r]:"function"==typeof e.constructor&&e instanceof e.constructor?e.constructor.prototype:e instanceof Object?o:null}},18556(e,t,i){var n=i(21998),s=i(51552),r=i(2473)(!1),o=i(81119)("IE_PROTO");e.exports=function(e,t){var i,a=s(e),l=0,c=[];for(i in a)i!=o&&n(a,i)&&c.push(i);for(;t.length>l;)n(a,i=t[l++])&&(~r(c,i)||c.push(i));return c}},46936(e,t,i){var n=i(18556),s=i(46527);e.exports=Object.keys||function(e){return n(e,s)}},60092(e,t){t.f={}.propertyIsEnumerable},72234(e,t,i){var n=i(9102),s=i(96595),r=i(58599);e.exports=function(e,t){var i=(s.Object||{})[e]||Object[e],o={};o[e]=t(i),n(n.S+n.F*r(function(){i(1)}),"Object",o)}},25995(e){e.exports=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}},10058(e,t,i){e.exports=i(48324)},9721(e,t,i){var n=i(17482),s=i(44655),r=function(e,t){if(s(e),!n(t)&&null!==t)throw TypeError(t+": can't set as prototype!")};e.exports={set:Object.setPrototypeOf||("__proto__"in{}?function(e,t,n){try{(n=i(64015)(Function.call,i(73686).f(Object.prototype,"__proto__").set,2))(e,[]),t=!(e instanceof Array)}catch(e){t=!0}return function(e,i){return r(e,i),t?e.__proto__=i:n(e,i),e}}({},!1):void 0),check:r}},26343(e,t,i){var n=i(10788).f,s=i(21998),r=i(78161)("toStringTag");e.exports=function(e,t,i){e&&!s(e=i?e:e.prototype,r)&&n(e,r,{configurable:!0,value:t})}},81119(e,t,i){var n=i(27641)("keys"),s=i(14472);e.exports=function(e){return n[e]||(n[e]=s(e))}},27641(e,t,i){var n=i(96595),s=i(79747),r="__core-js_shared__",o=s[r]||(s[r]={});(e.exports=function(e,t){return o[e]||(o[e]=void 0!==t?t:{})})("versions",[]).push({version:n.version,mode:i(75549)?"pure":"global",copyright:"© 2020 Denis Pushkarev (zloirock.ru)"})},62447(e,t,i){var n=i(29358),s=i(77095);e.exports=function(e){return function(t,i){var r,o,a=String(s(t)),l=n(i),c=a.length;return l<0||l>=c?e?"":void 0:(r=a.charCodeAt(l))<55296||r>56319||l+1===c||(o=a.charCodeAt(l+1))<56320||o>57343?e?a.charAt(l):r:e?a.slice(l,l+2):o-56320+(r-55296<<10)+65536}}},23138(e,t,i){var n=i(29358),s=Math.max,r=Math.min;e.exports=function(e,t){return(e=n(e))<0?s(e+t,0):r(e,t)}},29358(e){var t=Math.ceil,i=Math.floor;e.exports=function(e){return isNaN(e=+e)?0:(e>0?i:t)(e)}},51552(e,t,i){var n=i(6234),s=i(77095);e.exports=function(e){return n(s(e))}},14326(e,t,i){var n=i(29358),s=Math.min;e.exports=function(e){return e>0?s(n(e),9007199254740991):0}},70749(e,t,i){var n=i(77095);e.exports=function(e){return Object(n(e))}},15873(e,t,i){var n=i(17482);e.exports=function(e,t){if(!n(e))return e;var i,s;if(t&&"function"==typeof(i=e.toString)&&!n(s=i.call(e)))return s;if("function"==typeof(i=e.valueOf)&&!n(s=i.call(e)))return s;if(!t&&"function"==typeof(i=e.toString)&&!n(s=i.call(e)))return s;throw TypeError("Can't convert object to primitive value")}},14472(e){var t=0,i=Math.random();e.exports=function(e){return"Symbol(".concat(void 0===e?"":e,")_",(++t+i).toString(36))}},99225(e,t,i){var n=i(79747),s=i(96595),r=i(75549),o=i(36063),a=i(10788).f;e.exports=function(e){var t=s.Symbol||(s.Symbol=r?{}:n.Symbol||{});"_"==e.charAt(0)||e in t||a(t,e,{value:o.f(e)})}},36063(e,t,i){t.f=i(78161)},78161(e,t,i){var n=i(27641)("wks"),s=i(14472),r=i(79747).Symbol,o="function"==typeof r;(e.exports=function(e){return n[e]||(n[e]=o&&r[e]||(o?r:s)("Symbol."+e))}).store=n},27698(e,t,i){"use strict";var n=i(51453),s=i(17093),r=i(71813),o=i(51552);e.exports=i(14520)(Array,"Array",function(e,t){this._t=o(e),this._i=0,this._k=t},function(){var e=this._t,t=this._k,i=this._i++;return!e||i>=e.length?(this._t=void 0,s(1)):s(0,"keys"==t?i:"values"==t?e[i]:[i,e[i]])},"values"),r.Arguments=r.Array,n("keys"),n("values"),n("entries")},2903(e,t,i){var n=i(9102);n(n.S+n.F,"Object",{assign:i(33677)})},81026(e,t,i){var n=i(9102);n(n.S,"Object",{create:i(69840)})},92611(e,t,i){var n=i(9102);n(n.S+n.F*!i(27828),"Object",{defineProperty:i(10788).f})},95029(e,t,i){var n=i(70749),s=i(23218);i(72234)("getPrototypeOf",function(){return function(e){return s(n(e))}})},74537(e,t,i){var n=i(9102);n(n.S,"Object",{setPrototypeOf:i(9721).set})},83149(){},91210(e,t,i){"use strict";var n=i(62447)(!0);i(14520)(String,"String",function(e){this._t=String(e),this._i=0},function(){var e,t=this._t,i=this._i;return i>=t.length?{value:void 0,done:!0}:(e=n(t,i),this._i+=e.length,{value:e,done:!1})})},63977(e,t,i){"use strict";var n=i(79747),s=i(21998),r=i(27828),o=i(9102),a=i(10058),l=i(26853).KEY,c=i(58599),h=i(27641),d=i(26343),u=i(14472),p=i(78161),g=i(36063),f=i(99225),m=i(94618),v=i(39984),y=i(44655),C=i(17482),b=i(70749),S=i(51552),w=i(15873),x=i(25995),E=i(69840),M=i(90662),A=i(73686),T=i(62951),D=i(10788),I=i(46936),R=A.f,L=D.f,k=M.f,P=n.Symbol,N=n.JSON,O=N&&N.stringify,_="prototype",F=p("_hidden"),G=p("toPrimitive"),V={}.propertyIsEnumerable,B=h("symbol-registry"),H=h("symbols"),z=h("op-symbols"),U=Object[_],W="function"==typeof P&&!!T.f,j=n.QObject,K=!j||!j[_]||!j[_].findChild,$=r&&c(function(){return 7!=E(L({},"a",{get:function(){return L(this,"a",{value:7}).a}})).a})?function(e,t,i){var n=R(U,t);n&&delete U[t],L(e,t,i),n&&e!==U&&L(U,t,n)}:L,Y=function(e){var t=H[e]=E(P[_]);return t._k=e,t},q=W&&"symbol"==typeof P.iterator?function(e){return"symbol"==typeof e}:function(e){return e instanceof P},X=function(e,t,i){return e===U&&X(z,t,i),y(e),t=w(t,!0),y(i),s(H,t)?(i.enumerable?(s(e,F)&&e[F][t]&&(e[F][t]=!1),i=E(i,{enumerable:x(0,!1)})):(s(e,F)||L(e,F,x(1,{})),e[F][t]=!0),$(e,t,i)):L(e,t,i)},Z=function(e,t){y(e);for(var i,n=m(t=S(t)),s=0,r=n.length;r>s;)X(e,i=n[s++],t[i]);return e},Q=function(e){var t=V.call(this,e=w(e,!0));return!(this===U&&s(H,e)&&!s(z,e))&&(!(t||!s(this,e)||!s(H,e)||s(this,F)&&this[F][e])||t)},J=function(e,t){if(e=S(e),t=w(t,!0),e!==U||!s(H,t)||s(z,t)){var i=R(e,t);return!i||!s(H,t)||s(e,F)&&e[F][t]||(i.enumerable=!0),i}},ee=function(e){for(var t,i=k(S(e)),n=[],r=0;i.length>r;)s(H,t=i[r++])||t==F||t==l||n.push(t);return n},te=function(e){for(var t,i=e===U,n=k(i?z:S(e)),r=[],o=0;n.length>o;)!s(H,t=n[o++])||i&&!s(U,t)||r.push(H[t]);return r};W||(P=function(){if(this instanceof P)throw TypeError("Symbol is not a constructor!");var e=u(arguments.length>0?arguments[0]:void 0),t=function(i){this===U&&t.call(z,i),s(this,F)&&s(this[F],e)&&(this[F][e]=!1),$(this,e,x(1,i))};return r&&K&&$(U,e,{configurable:!0,set:t}),Y(e)},a(P[_],"toString",function(){return this._k}),A.f=J,D.f=X,i(4788).f=M.f=ee,i(60092).f=Q,T.f=te,r&&!i(75549)&&a(U,"propertyIsEnumerable",Q,!0),g.f=function(e){return Y(p(e))}),o(o.G+o.W+o.F*!W,{Symbol:P});for(var ie="hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables".split(","),ne=0;ie.length>ne;)p(ie[ne++]);for(var se=I(p.store),re=0;se.length>re;)f(se[re++]);o(o.S+o.F*!W,"Symbol",{for:function(e){return s(B,e+="")?B[e]:B[e]=P(e)},keyFor:function(e){if(!q(e))throw TypeError(e+" is not a symbol!");for(var t in B)if(B[t]===e)return t},useSetter:function(){K=!0},useSimple:function(){K=!1}}),o(o.S+o.F*!W,"Object",{create:function(e,t){return void 0===t?E(e):Z(E(e),t)},defineProperty:X,defineProperties:Z,getOwnPropertyDescriptor:J,getOwnPropertyNames:ee,getOwnPropertySymbols:te});var oe=c(function(){T.f(1)});o(o.S+o.F*oe,"Object",{getOwnPropertySymbols:function(e){return T.f(b(e))}}),N&&o(o.S+o.F*(!W||c(function(){var e=P();return"[null]"!=O([e])||"{}"!=O({a:e})||"{}"!=O(Object(e))})),"JSON",{stringify:function(e){for(var t,i,n=[e],s=1;arguments.length>s;)n.push(arguments[s++]);if(i=t=n[1],(C(t)||void 0!==e)&&!q(e))return v(t)||(t=function(e,t){if("function"==typeof i&&(t=i.call(this,e,t)),!q(t))return t}),n[1]=t,O.apply(N,n)}}),P[_][G]||i(48324)(P[_],G,P[_].valueOf),d(P,"Symbol"),d(Math,"Math",!0),d(n.JSON,"JSON",!0)},78993(e,t,i){i(99225)("asyncIterator")},50237(e,t,i){i(99225)("observable")},75505(e,t,i){i(27698);for(var n=i(79747),s=i(48324),r=i(71813),o=i(78161)("toStringTag"),a="CSSRuleList,CSSStyleDeclaration,CSSValueList,ClientRectList,DOMRectList,DOMStringList,DOMTokenList,DataTransferItemList,FileList,HTMLAllCollection,HTMLCollection,HTMLFormElement,HTMLSelectElement,MediaList,MimeTypeArray,NamedNodeMap,NodeList,PaintRequestList,Plugin,PluginArray,SVGLengthList,SVGNumberList,SVGPathSegList,SVGPointList,SVGStringList,SVGTransformList,SourceBufferList,StyleSheetList,TextTrackCueList,TextTrackList,TouchList".split(","),l=0;l<a.length;l++){var c=a[l],h=n[c],d=h&&h.prototype;d&&!d[o]&&s(d,o,c),r[c]=r.Array}},41166(e,t,i){function n(e){return Object.prototype.toString.call(e)}t.isArray=function(e){return Array.isArray?Array.isArray(e):"[object Array]"===n(e)},t.isBoolean=function(e){return"boolean"==typeof e},t.isNull=function(e){return null===e},t.isNullOrUndefined=function(e){return null==e},t.isNumber=function(e){return"number"==typeof e},t.isString=function(e){return"string"==typeof e},t.isSymbol=function(e){return"symbol"==typeof e},t.isUndefined=function(e){return void 0===e},t.isRegExp=function(e){return"[object RegExp]"===n(e)},t.isObject=function(e){return"object"==typeof e&&null!==e},t.isDate=function(e){return"[object Date]"===n(e)},t.isError=function(e){return"[object Error]"===n(e)||e instanceof Error},t.isFunction=function(e){return"function"==typeof e},t.isPrimitive=function(e){return null===e||"boolean"==typeof e||"number"==typeof e||"string"==typeof e||"symbol"==typeof e||void 0===e},t.isBuffer=i(77511).Buffer.isBuffer},29520(e,t,i){var n=i(23071),s=i(5630);e.exports=function(e){return new o(e)};var r={secp256k1:{name:"secp256k1",byteLength:32},secp224r1:{name:"p224",byteLength:28},prime256v1:{name:"p256",byteLength:32},prime192v1:{name:"p192",byteLength:24},ed25519:{name:"ed25519",byteLength:32},secp384r1:{name:"p384",byteLength:48},secp521r1:{name:"p521",byteLength:66}};function o(e){this.curveType=r[e],this.curveType||(this.curveType={name:e}),this.curve=new n.ec(this.curveType.name),this.keys=void 0}function a(e,t,i){Array.isArray(e)||(e=e.toArray());var n=new Buffer(e);if(i&&n.length<i){var s=new Buffer(i-n.length);s.fill(0),n=Buffer.concat([s,n])}return t?n.toString(t):n}r.p224=r.secp224r1,r.p256=r.secp256r1=r.prime256v1,r.p192=r.secp192r1=r.prime192v1,r.p384=r.secp384r1,r.p521=r.secp521r1,o.prototype.generateKeys=function(e,t){return this.keys=this.curve.genKeyPair(),this.getPublicKey(e,t)},o.prototype.computeSecret=function(e,t,i){return t=t||"utf8",Buffer.isBuffer(e)||(e=new Buffer(e,t)),a(this.curve.keyFromPublic(e).getPublic().mul(this.keys.getPrivate()).getX(),i,this.curveType.byteLength)},o.prototype.getPublicKey=function(e,t){var i=this.keys.getPublic("compressed"===t,!0);return"hybrid"===t&&(i[i.length-1]%2?i[0]=7:i[0]=6),a(i,e)},o.prototype.getPrivateKey=function(e){return a(this.keys.getPrivate(),e)},o.prototype.setPublicKey=function(e,t){return t=t||"utf8",Buffer.isBuffer(e)||(e=new Buffer(e,t)),this.keys._importPublic(e),this},o.prototype.setPrivateKey=function(e,t){t=t||"utf8",Buffer.isBuffer(e)||(e=new Buffer(e,t));var i=new s(e);return i=i.toString(16),this.keys=this.curve.genKeyPair(),this.keys._importPrivate(i),this}},18955(e,t,i){"use strict";var n=i(91193),s=i(75035),r=i(47795),o=i(99041),a=i(36334);function l(e){a.call(this,"digest"),this._hash=e}n(l,a),l.prototype._update=function(e){this._hash.update(e)},l.prototype._final=function(){return this._hash.digest()},e.exports=function(e){return"md5"===(e=e.toLowerCase())?new s:"rmd160"===e||"ripemd160"===e?new r:new l(o(e))}},46159(e,t,i){var n=i(75035);e.exports=function(e){return(new n).update(e).digest()}},33053(e,t,i){"use strict";var n=i(91193),s=i(670),r=i(36334),o=i(56608).Buffer,a=i(46159),l=i(47795),c=i(99041),h=o.alloc(128);function d(e,t){r.call(this,"digest"),"string"==typeof t&&(t=o.from(t));var i="sha512"===e||"sha384"===e?128:64;this._alg=e,this._key=t,t.length>i?t=("rmd160"===e?new l:c(e)).update(t).digest():t.length<i&&(t=o.concat([t,h],i));for(var n=this._ipad=o.allocUnsafe(i),s=this._opad=o.allocUnsafe(i),a=0;a<i;a++)n[a]=54^t[a],s[a]=92^t[a];this._hash="rmd160"===e?new l:c(e),this._hash.update(n)}n(d,r),d.prototype._update=function(e){this._hash.update(e)},d.prototype._final=function(){var e=this._hash.digest();return("rmd160"===this._alg?new l:c(this._alg)).update(this._opad).update(e).digest()},e.exports=function(e,t){return"rmd160"===(e=e.toLowerCase())||"ripemd160"===e?new d("rmd160",t):"md5"===e?new s(a,t):new d(e,t)}},670(e,t,i){"use strict";var n=i(91193),s=i(56608).Buffer,r=i(36334),o=s.alloc(128),a=64;function l(e,t){r.call(this,"digest"),"string"==typeof t&&(t=s.from(t)),this._alg=e,this._key=t,t.length>a?t=e(t):t.length<a&&(t=s.concat([t,o],a));for(var i=this._ipad=s.allocUnsafe(a),n=this._opad=s.allocUnsafe(a),l=0;l<a;l++)i[l]=54^t[l],n[l]=92^t[l];this._hash=[i]}n(l,r),l.prototype._update=function(e){this._hash.push(e)},l.prototype._final=function(){var e=this._alg(s.concat(this._hash));return this._alg(s.concat([this._opad,e]))},e.exports=l},24215(e,t,i){"use strict";t.randomBytes=t.rng=t.pseudoRandomBytes=t.prng=i(82869),t.createHash=t.Hash=i(18955),t.createHmac=t.Hmac=i(33053);var n=i(92761),s=Object.keys(n),r=["sha1","sha224","sha256","sha384","sha512","md5","rmd160"].concat(s);t.getHashes=function(){return r};var o=i(46375);t.pbkdf2=o.pbkdf2,t.pbkdf2Sync=o.pbkdf2Sync;var a=i(18350);t.Cipher=a.Cipher,t.createCipher=a.createCipher,t.Cipheriv=a.Cipheriv,t.createCipheriv=a.createCipheriv,t.Decipher=a.Decipher,t.createDecipher=a.createDecipher,t.Decipheriv=a.Decipheriv,t.createDecipheriv=a.createDecipheriv,t.getCiphers=a.getCiphers,t.listCiphers=a.listCiphers;var l=i(35835);t.DiffieHellmanGroup=l.DiffieHellmanGroup,t.createDiffieHellmanGroup=l.createDiffieHellmanGroup,t.getDiffieHellman=l.getDiffieHellman,t.createDiffieHellman=l.createDiffieHellman,t.DiffieHellman=l.DiffieHellman;var c=i(80206);t.createSign=c.createSign,t.Sign=c.Sign,t.createVerify=c.createVerify,t.Verify=c.Verify,t.createECDH=i(29520);var h=i(32211);t.publicEncrypt=h.publicEncrypt,t.privateEncrypt=h.privateEncrypt,t.publicDecrypt=h.publicDecrypt,t.privateDecrypt=h.privateDecrypt;var d=i(44925);t.randomFill=d.randomFill,t.randomFillSync=d.randomFillSync,t.createCredentials=function(){throw new Error("sorry, createCredentials is not implemented yet\nwe accept pull requests\nhttps://github.com/browserify/crypto-browserify")},t.constants={DH_CHECK_P_NOT_SAFE_PRIME:2,DH_CHECK_P_NOT_PRIME:1,DH_UNABLE_TO_CHECK_GENERATOR:4,DH_NOT_SUITABLE_GENERATOR:8,NPN_ENABLED:1,ALPN_ENABLED:1,RSA_PKCS1_PADDING:1,RSA_SSLV23_PADDING:2,RSA_NO_PADDING:3,RSA_PKCS1_OAEP_PADDING:4,RSA_X931_PADDING:5,RSA_PKCS1_PSS_PADDING:6,POINT_CONVERSION_COMPRESSED:2,POINT_CONVERSION_UNCOMPRESSED:4,POINT_CONVERSION_HYBRID:6}},60095(e,t,i){var n;e.exports=(n=n||function(e){var t;if("undefined"!=typeof window&&window.crypto&&(t=window.crypto),"undefined"!=typeof self&&self.crypto&&(t=self.crypto),"undefined"!=typeof globalThis&&globalThis.crypto&&(t=globalThis.crypto),!t&&"undefined"!=typeof window&&window.msCrypto&&(t=window.msCrypto),!t&&void 0!==i.g&&i.g.crypto&&(t=i.g.crypto),!t)try{t=i(57167)}catch(e){}var n=function(){if(t){if("function"==typeof t.getRandomValues)try{return t.getRandomValues(new Uint32Array(1))[0]}catch(e){}if("function"==typeof t.randomBytes)try{return t.randomBytes(4).readInt32LE()}catch(e){}}throw new Error("Native crypto module could not be used to get secure random number.")},s=Object.create||function(){function e(){}return function(t){var i;return e.prototype=t,i=new e,e.prototype=null,i}}(),r={},o=r.lib={},a=o.Base={extend:function(e){var t=s(this);return e&&t.mixIn(e),t.hasOwnProperty("init")&&this.init!==t.init||(t.init=function(){t.$super.init.apply(this,arguments)}),t.init.prototype=t,t.$super=this,t},create:function(){var e=this.extend();return e.init.apply(e,arguments),e},init:function(){},mixIn:function(e){for(var t in e)e.hasOwnProperty(t)&&(this[t]=e[t]);e.hasOwnProperty("toString")&&(this.toString=e.toString)},clone:function(){return this.init.prototype.extend(this)}},l=o.WordArray=a.extend({init:function(e,t){e=this.words=e||[],this.sigBytes=null!=t?t:4*e.length},toString:function(e){return(e||h).stringify(this)},concat:function(e){var t=this.words,i=e.words,n=this.sigBytes,s=e.sigBytes;if(this.clamp(),n%4)for(var r=0;r<s;r++){var o=i[r>>>2]>>>24-r%4*8&255;t[n+r>>>2]|=o<<24-(n+r)%4*8}else for(var a=0;a<s;a+=4)t[n+a>>>2]=i[a>>>2];return this.sigBytes+=s,this},clamp:function(){var t=this.words,i=this.sigBytes;t[i>>>2]&=4294967295<<32-i%4*8,t.length=e.ceil(i/4)},clone:function(){var e=a.clone.call(this);return e.words=this.words.slice(0),e},random:function(e){for(var t=[],i=0;i<e;i+=4)t.push(n());return new l.init(t,e)}}),c=r.enc={},h=c.Hex={stringify:function(e){for(var t=e.words,i=e.sigBytes,n=[],s=0;s<i;s++){var r=t[s>>>2]>>>24-s%4*8&255;n.push((r>>>4).toString(16)),n.push((15&r).toString(16))}return n.join("")},parse:function(e){for(var t=e.length,i=[],n=0;n<t;n+=2)i[n>>>3]|=parseInt(e.substr(n,2),16)<<24-n%8*4;return new l.init(i,t/2)}},d=c.Latin1={stringify:function(e){for(var t=e.words,i=e.sigBytes,n=[],s=0;s<i;s++){var r=t[s>>>2]>>>24-s%4*8&255;n.push(String.fromCharCode(r))}return n.join("")},parse:function(e){for(var t=e.length,i=[],n=0;n<t;n++)i[n>>>2]|=(255&e.charCodeAt(n))<<24-n%4*8;return new l.init(i,t)}},u=c.Utf8={stringify:function(e){try{return decodeURIComponent(escape(d.stringify(e)))}catch(e){throw new Error("Malformed UTF-8 data")}},parse:function(e){return d.parse(unescape(encodeURIComponent(e)))}},p=o.BufferedBlockAlgorithm=a.extend({reset:function(){this._data=new l.init,this._nDataBytes=0},_append:function(e){"string"==typeof e&&(e=u.parse(e)),this._data.concat(e),this._nDataBytes+=e.sigBytes},_process:function(t){var i,n=this._data,s=n.words,r=n.sigBytes,o=this.blockSize,a=r/(4*o),c=(a=t?e.ceil(a):e.max((0|a)-this._minBufferSize,0))*o,h=e.min(4*c,r);if(c){for(var d=0;d<c;d+=o)this._doProcessBlock(s,d);i=s.splice(0,c),n.sigBytes-=h}return new l.init(i,h)},clone:function(){var e=a.clone.call(this);return e._data=this._data.clone(),e},_minBufferSize:0}),g=(o.Hasher=p.extend({cfg:a.extend(),init:function(e){this.cfg=this.cfg.extend(e),this.reset()},reset:function(){p.reset.call(this),this._doReset()},update:function(e){return this._append(e),this._process(),this},finalize:function(e){return e&&this._append(e),this._doFinalize()},blockSize:16,_createHelper:function(e){return function(t,i){return new e.init(i).finalize(t)}},_createHmacHelper:function(e){return function(t,i){return new g.HMAC.init(e,i).finalize(t)}}}),r.algo={});return r}(Math),n)},81716(e,t,i){var n,s,r;e.exports=(n=i(60095),r=(s=n).lib.WordArray,s.enc.Base64={stringify:function(e){var t=e.words,i=e.sigBytes,n=this._map;e.clamp();for(var s=[],r=0;r<i;r+=3)for(var o=(t[r>>>2]>>>24-r%4*8&255)<<16|(t[r+1>>>2]>>>24-(r+1)%4*8&255)<<8|t[r+2>>>2]>>>24-(r+2)%4*8&255,a=0;a<4&&r+.75*a<i;a++)s.push(n.charAt(o>>>6*(3-a)&63));var l=n.charAt(64);if(l)for(;s.length%4;)s.push(l);return s.join("")},parse:function(e){var t=e.length,i=this._map,n=this._reverseMap;if(!n){n=this._reverseMap=[];for(var s=0;s<i.length;s++)n[i.charCodeAt(s)]=s}var o=i.charAt(64);if(o){var a=e.indexOf(o);-1!==a&&(t=a)}return function(e,t,i){for(var n=[],s=0,o=0;o<t;o++)if(o%4){var a=i[e.charCodeAt(o-1)]<<o%4*2|i[e.charCodeAt(o)]>>>6-o%4*2;n[s>>>2]|=a<<24-s%4*8,s++}return r.create(n,s)}(e,t,n)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="},n.enc.Base64)},31939(e,t,i){var n;e.exports=(n=i(60095),i(9331),i(55979),n.HmacSHA256)},55979(e,t,i){var n,s,r;e.exports=(s=(n=i(60095)).lib.Base,r=n.enc.Utf8,void(n.algo.HMAC=s.extend({init:function(e,t){e=this._hasher=new e.init,"string"==typeof t&&(t=r.parse(t));var i=e.blockSize,n=4*i;t.sigBytes>n&&(t=e.finalize(t)),t.clamp();for(var s=this._oKey=t.clone(),o=this._iKey=t.clone(),a=s.words,l=o.words,c=0;c<i;c++)a[c]^=1549556828,l[c]^=909522486;s.sigBytes=o.sigBytes=n,this.reset()},reset:function(){var e=this._hasher;e.reset(),e.update(this._iKey)},update:function(e){return this._hasher.update(e),this},finalize:function(e){var t=this._hasher,i=t.finalize(e);return t.reset(),t.finalize(this._oKey.clone().concat(i))}})))},74842(e,t,i){var n;e.exports=(n=i(60095),function(){if("function"==typeof ArrayBuffer){var e=n.lib.WordArray,t=e.init,i=e.init=function(e){if(e instanceof ArrayBuffer&&(e=new Uint8Array(e)),(e instanceof Int8Array||"undefined"!=typeof Uint8ClampedArray&&e instanceof Uint8ClampedArray||e instanceof Int16Array||e instanceof Uint16Array||e instanceof Int32Array||e instanceof Uint32Array||e instanceof Float32Array||e instanceof Float64Array)&&(e=new Uint8Array(e.buffer,e.byteOffset,e.byteLength)),e instanceof Uint8Array){for(var i=e.byteLength,n=[],s=0;s<i;s++)n[s>>>2]|=e[s]<<24-s%4*8;t.call(this,n,i)}else t.apply(this,arguments)};i.prototype=e}}(),n.lib.WordArray)},9331(e,t,i){var n;e.exports=(n=i(60095),function(e){var t=n,i=t.lib,s=i.WordArray,r=i.Hasher,o=t.algo,a=[],l=[];!function(){function t(t){for(var i=e.sqrt(t),n=2;n<=i;n++)if(!(t%n))return!1;return!0}function i(e){return 4294967296*(e-(0|e))|0}for(var n=2,s=0;s<64;)t(n)&&(s<8&&(a[s]=i(e.pow(n,.5))),l[s]=i(e.pow(n,1/3)),s++),n++}();var c=[],h=o.SHA256=r.extend({_doReset:function(){this._hash=new s.init(a.slice(0))},_doProcessBlock:function(e,t){for(var i=this._hash.words,n=i[0],s=i[1],r=i[2],o=i[3],a=i[4],h=i[5],d=i[6],u=i[7],p=0;p<64;p++){if(p<16)c[p]=0|e[t+p];else{var g=c[p-15],f=(g<<25|g>>>7)^(g<<14|g>>>18)^g>>>3,m=c[p-2],v=(m<<15|m>>>17)^(m<<13|m>>>19)^m>>>10;c[p]=f+c[p-7]+v+c[p-16]}var y=n&s^n&r^s&r,C=(n<<30|n>>>2)^(n<<19|n>>>13)^(n<<10|n>>>22),b=u+((a<<26|a>>>6)^(a<<21|a>>>11)^(a<<7|a>>>25))+(a&h^~a&d)+l[p]+c[p];u=d,d=h,h=a,a=o+b|0,o=r,r=s,s=n,n=b+(C+y)|0}i[0]=i[0]+n|0,i[1]=i[1]+s|0,i[2]=i[2]+r|0,i[3]=i[3]+o|0,i[4]=i[4]+a|0,i[5]=i[5]+h|0,i[6]=i[6]+d|0,i[7]=i[7]+u|0},_doFinalize:function(){var t=this._data,i=t.words,n=8*this._nDataBytes,s=8*t.sigBytes;return i[s>>>5]|=128<<24-s%32,i[14+(s+64>>>9<<4)]=e.floor(n/4294967296),i[15+(s+64>>>9<<4)]=n,t.sigBytes=4*i.length,this._process(),this._hash},clone:function(){var e=r.clone.call(this);return e._hash=this._hash.clone(),e}});t.SHA256=r._createHelper(h),t.HmacSHA256=r._createHmacHelper(h)}(Math),n.SHA256)},83160(e,t,i){"use strict";i.d(t,{cO:()=>ie,mR:()=>y,u8:()=>X});var n=i(42346),s=i(58337),r="",o="",a="",l="",c=n.A&&"ontouchstart"in document.documentElement;if(n.A){var h={Moz:"-moz-",ms:"-ms-",O:"-o-",Webkit:"-webkit-"},d=document.createElement("p").style;for(var u in h)if(u+"Transform"in d){r=u,o=h[u];break}"Webkit"===r&&"msHyphens"in d&&(r="ms",o=h.ms,l="edge"),"Webkit"===r&&"-apple-trailing-word"in d&&(a="apple")}var p=r,g=o,f=a,m=l,v=c;function y(e){return"-"===e[1]||"ms"===p?e:"@"+g+"keyframes"+e.substr(10)}var C={noPrefill:["appearance"],supportedProperty:function(e){return"appearance"===e&&("ms"===p?"-webkit-"+e:g+e)}},b={noPrefill:["color-adjust"],supportedProperty:function(e){return"color-adjust"===e&&("Webkit"===p?g+"print-"+e:e)}},S=/[-\s]+(.)?/g;function w(e,t){return t?t.toUpperCase():""}function x(e){return e.replace(S,w)}function E(e){return x("-"+e)}var M,A={noPrefill:["mask"],supportedProperty:function(e,t){if(!/^mask/.test(e))return!1;if("Webkit"===p){var i="mask-image";if(x(i)in t)return e;if(p+E(i)in t)return g+e}return e}},T={noPrefill:["text-orientation"],supportedProperty:function(e){return"text-orientation"===e&&("apple"!==f||v?e:g+e)}},D={noPrefill:["transform"],supportedProperty:function(e,t,i){return"transform"===e&&(i.transform?e:g+e)}},I={noPrefill:["transition"],supportedProperty:function(e,t,i){return"transition"===e&&(i.transition?e:g+e)}},R={noPrefill:["writing-mode"],supportedProperty:function(e){return"writing-mode"===e&&("Webkit"===p||"ms"===p&&"edge"!==m?g+e:e)}},L={noPrefill:["user-select"],supportedProperty:function(e){return"user-select"===e&&("Moz"===p||"ms"===p||"apple"===f?g+e:e)}},k={supportedProperty:function(e,t){return!!/^break-/.test(e)&&("Webkit"===p?"WebkitColumn"+E(e)in t&&g+"column-"+e:"Moz"===p&&"page"+E(e)in t&&"page-"+e)}},P={supportedProperty:function(e,t){if(!/^(border|margin|padding)-inline/.test(e))return!1;if("Moz"===p)return e;var i=e.replace("-inline","");return p+E(i)in t&&g+i}},N={supportedProperty:function(e,t){return x(e)in t&&e}},O={supportedProperty:function(e,t){var i=E(e);return"-"===e[0]||"-"===e[0]&&"-"===e[1]?e:p+i in t?g+e:"Webkit"!==p&&"Webkit"+i in t&&"-webkit-"+e}},_={supportedProperty:function(e){return"scroll-snap"===e.substring(0,11)&&("ms"===p?""+g+e:e)}},F={supportedProperty:function(e){return"overscroll-behavior"===e&&("ms"===p?g+"scroll-chaining":e)}},G={"flex-grow":"flex-positive","flex-shrink":"flex-negative","flex-basis":"flex-preferred-size","justify-content":"flex-pack",order:"flex-order","align-items":"flex-align","align-content":"flex-line-pack"},V={supportedProperty:function(e,t){var i=G[e];return!!i&&p+E(i)in t&&g+i}},B={flex:"box-flex","flex-grow":"box-flex","flex-direction":["box-orient","box-direction"],order:"box-ordinal-group","align-items":"box-align","flex-flow":["box-orient","box-direction"],"justify-content":"box-pack"},H=Object.keys(B),z=function(e){return g+e},U={supportedProperty:function(e,t,i){var n=i.multiple;if(H.indexOf(e)>-1){var s=B[e];if(!Array.isArray(s))return p+E(s)in t&&g+s;if(!n)return!1;for(var r=0;r<s.length;r++)if(!(p+E(s[0])in t))return!1;return s.map(z)}return!1}},W=[C,b,A,T,D,I,R,L,k,P,N,O,_,F,V,U],j=W.filter(function(e){return e.supportedProperty}).map(function(e){return e.supportedProperty}),K=W.filter(function(e){return e.noPrefill}).reduce(function(e,t){return e.push.apply(e,(0,s.A)(t.noPrefill)),e},[]),$={};if(n.A){M=document.createElement("p");var Y=window.getComputedStyle(document.documentElement,"");for(var q in Y)isNaN(q)||($[Y[q]]=Y[q]);K.forEach(function(e){return delete $[e]})}function X(e,t){if(void 0===t&&(t={}),!M)return e;if(null!=$[e])return $[e];"transition"!==e&&"transform"!==e||(t[e]=e in M.style);for(var i=0;i<j.length&&($[e]=j[i](e,M.style,t),!$[e]);i++);try{M.style[e]=""}catch(e){return!1}return $[e]}var Z,Q={},J={transition:1,"transition-property":1,"-webkit-transition":1,"-webkit-transition-property":1},ee=/(^\s*[\w-]+)|, (\s*[\w-]+)(?![^()]*\))/g;function te(e,t,i){return"var"===t?"var":"all"===t?"all":"all"===i?", all":(t?X(t):", "+X(i))||t||i}function ie(e,t){var i=t;if(!Z||"content"===e)return t;if("string"!=typeof i||!isNaN(parseInt(i,10)))return i;var n=e+i;if(null!=Q[n])return Q[n];try{Z.style[e]=i}catch(e){return Q[n]=!1,!1}if(J[e])i=i.replace(ee,te);else if(""===Z.style[e]&&("-ms-flex"===(i=g+i)&&(Z.style[e]="-ms-flexbox"),Z.style[e]=i,""===Z.style[e]))return Q[n]=!1,!1;return Z.style[e]="",Q[n]=i,Q[n]}n.A&&(Z=document.createElement("p"))},18814(e){e.exports=function(){"use strict";var e=6e4,t=36e5,i="millisecond",n="second",s="minute",r="hour",o="day",a="week",l="month",c="quarter",h="year",d="date",u="Invalid Date",p=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,g=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,f={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(e){var t=["th","st","nd","rd"],i=e%100;return"["+e+(t[(i-20)%10]||t[i]||t[0])+"]"}},m=function(e,t,i){var n=String(e);return!n||n.length>=t?e:""+Array(t+1-n.length).join(i)+e},v={s:m,z:function(e){var t=-e.utcOffset(),i=Math.abs(t),n=Math.floor(i/60),s=i%60;return(t<=0?"+":"-")+m(n,2,"0")+":"+m(s,2,"0")},m:function e(t,i){if(t.date()<i.date())return-e(i,t);var n=12*(i.year()-t.year())+(i.month()-t.month()),s=t.clone().add(n,l),r=i-s<0,o=t.clone().add(n+(r?-1:1),l);return+(-(n+(i-s)/(r?s-o:o-s))||0)},a:function(e){return e<0?Math.ceil(e)||0:Math.floor(e)},p:function(e){return{M:l,y:h,w:a,d:o,D:d,h:r,m:s,s:n,ms:i,Q:c}[e]||String(e||"").toLowerCase().replace(/s$/,"")},u:function(e){return void 0===e}},y="en",C={};C[y]=f;var b="$isDayjsObject",S=function(e){return e instanceof M||!(!e||!e[b])},w=function e(t,i,n){var s;if(!t)return y;if("string"==typeof t){var r=t.toLowerCase();C[r]&&(s=r),i&&(C[r]=i,s=r);var o=t.split("-");if(!s&&o.length>1)return e(o[0])}else{var a=t.name;C[a]=t,s=a}return!n&&s&&(y=s),s||!n&&y},x=function(e,t){if(S(e))return e.clone();var i="object"==typeof t?t:{};return i.date=e,i.args=arguments,new M(i)},E=v;E.l=w,E.i=S,E.w=function(e,t){return x(e,{locale:t.$L,utc:t.$u,x:t.$x,$offset:t.$offset})};var M=function(){function f(e){this.$L=w(e.locale,null,!0),this.parse(e),this.$x=this.$x||e.x||{},this[b]=!0}var m=f.prototype;return m.parse=function(e){this.$d=function(e){var t=e.date,i=e.utc;if(null===t)return new Date(NaN);if(E.u(t))return new Date;if(t instanceof Date)return new Date(t);if("string"==typeof t&&!/Z$/i.test(t)){var n=t.match(p);if(n){var s=n[2]-1||0,r=(n[7]||"0").substring(0,3);return i?new Date(Date.UTC(n[1],s,n[3]||1,n[4]||0,n[5]||0,n[6]||0,r)):new Date(n[1],s,n[3]||1,n[4]||0,n[5]||0,n[6]||0,r)}}return new Date(t)}(e),this.init()},m.init=function(){var e=this.$d;this.$y=e.getFullYear(),this.$M=e.getMonth(),this.$D=e.getDate(),this.$W=e.getDay(),this.$H=e.getHours(),this.$m=e.getMinutes(),this.$s=e.getSeconds(),this.$ms=e.getMilliseconds()},m.$utils=function(){return E},m.isValid=function(){return!(this.$d.toString()===u)},m.isSame=function(e,t){var i=x(e);return this.startOf(t)<=i&&i<=this.endOf(t)},m.isAfter=function(e,t){return x(e)<this.startOf(t)},m.isBefore=function(e,t){return this.endOf(t)<x(e)},m.$g=function(e,t,i){return E.u(e)?this[t]:this.set(i,e)},m.unix=function(){return Math.floor(this.valueOf()/1e3)},m.valueOf=function(){return this.$d.getTime()},m.startOf=function(e,t){var i=this,c=!!E.u(t)||t,u=E.p(e),p=function(e,t){var n=E.w(i.$u?Date.UTC(i.$y,t,e):new Date(i.$y,t,e),i);return c?n:n.endOf(o)},g=function(e,t){return E.w(i.toDate()[e].apply(i.toDate("s"),(c?[0,0,0,0]:[23,59,59,999]).slice(t)),i)},f=this.$W,m=this.$M,v=this.$D,y="set"+(this.$u?"UTC":"");switch(u){case h:return c?p(1,0):p(31,11);case l:return c?p(1,m):p(0,m+1);case a:var C=this.$locale().weekStart||0,b=(f<C?f+7:f)-C;return p(c?v-b:v+(6-b),m);case o:case d:return g(y+"Hours",0);case r:return g(y+"Minutes",1);case s:return g(y+"Seconds",2);case n:return g(y+"Milliseconds",3);default:return this.clone()}},m.endOf=function(e){return this.startOf(e,!1)},m.$set=function(e,t){var a,c=E.p(e),u="set"+(this.$u?"UTC":""),p=(a={},a[o]=u+"Date",a[d]=u+"Date",a[l]=u+"Month",a[h]=u+"FullYear",a[r]=u+"Hours",a[s]=u+"Minutes",a[n]=u+"Seconds",a[i]=u+"Milliseconds",a)[c],g=c===o?this.$D+(t-this.$W):t;if(c===l||c===h){var f=this.clone().set(d,1);f.$d[p](g),f.init(),this.$d=f.set(d,Math.min(this.$D,f.daysInMonth())).$d}else p&&this.$d[p](g);return this.init(),this},m.set=function(e,t){return this.clone().$set(e,t)},m.get=function(e){return this[E.p(e)]()},m.add=function(i,c){var d,u=this;i=Number(i);var p=E.p(c),g=function(e){var t=x(u);return E.w(t.date(t.date()+Math.round(e*i)),u)};if(p===l)return this.set(l,this.$M+i);if(p===h)return this.set(h,this.$y+i);if(p===o)return g(1);if(p===a)return g(7);var f=(d={},d[s]=e,d[r]=t,d[n]=1e3,d)[p]||1,m=this.$d.getTime()+i*f;return E.w(m,this)},m.subtract=function(e,t){return this.add(-1*e,t)},m.format=function(e){var t=this,i=this.$locale();if(!this.isValid())return i.invalidDate||u;var n=e||"YYYY-MM-DDTHH:mm:ssZ",s=E.z(this),r=this.$H,o=this.$m,a=this.$M,l=i.weekdays,c=i.months,h=i.meridiem,d=function(e,i,s,r){return e&&(e[i]||e(t,n))||s[i].slice(0,r)},p=function(e){return E.s(r%12||12,e,"0")},f=h||function(e,t,i){var n=e<12?"AM":"PM";return i?n.toLowerCase():n};return n.replace(g,function(e,n){return n||function(e){switch(e){case"YY":return String(t.$y).slice(-2);case"YYYY":return E.s(t.$y,4,"0");case"M":return a+1;case"MM":return E.s(a+1,2,"0");case"MMM":return d(i.monthsShort,a,c,3);case"MMMM":return d(c,a);case"D":return t.$D;case"DD":return E.s(t.$D,2,"0");case"d":return String(t.$W);case"dd":return d(i.weekdaysMin,t.$W,l,2);case"ddd":return d(i.weekdaysShort,t.$W,l,3);case"dddd":return l[t.$W];case"H":return String(r);case"HH":return E.s(r,2,"0");case"h":return p(1);case"hh":return p(2);case"a":return f(r,o,!0);case"A":return f(r,o,!1);case"m":return String(o);case"mm":return E.s(o,2,"0");case"s":return String(t.$s);case"ss":return E.s(t.$s,2,"0");case"SSS":return E.s(t.$ms,3,"0");case"Z":return s}return null}(e)||s.replace(":","")})},m.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},m.diff=function(i,d,u){var p,g=this,f=E.p(d),m=x(i),v=(m.utcOffset()-this.utcOffset())*e,y=this-m,C=function(){return E.m(g,m)};switch(f){case h:p=C()/12;break;case l:p=C();break;case c:p=C()/3;break;case a:p=(y-v)/6048e5;break;case o:p=(y-v)/864e5;break;case r:p=y/t;break;case s:p=y/e;break;case n:p=y/1e3;break;default:p=y}return u?p:E.a(p)},m.daysInMonth=function(){return this.endOf(l).$D},m.$locale=function(){return C[this.$L]},m.locale=function(e,t){if(!e)return this.$L;var i=this.clone(),n=w(e,t,!0);return n&&(i.$L=n),i},m.clone=function(){return E.w(this.$d,this)},m.toDate=function(){return new Date(this.valueOf())},m.toJSON=function(){return this.isValid()?this.toISOString():null},m.toISOString=function(){return this.$d.toISOString()},m.toString=function(){return this.$d.toUTCString()},f}(),A=M.prototype;return x.prototype=A,[["$ms",i],["$s",n],["$m",s],["$H",r],["$W",o],["$M",l],["$y",h],["$D",d]].forEach(function(e){A[e[1]]=function(t){return this.$g(t,e[0],e[1])}}),x.extend=function(e,t){return e.$i||(e(t,M,x),e.$i=!0),x},x.locale=w,x.isDayjs=S,x.unix=function(e){return x(1e3*e)},x.en=C[y],x.Ls=C,x.p={},x}()},73524(e){e.exports=function(){"use strict";return function(e,t){var i=t.prototype,n=i.format;i.format=function(e){var t=this,i=this.$locale();if(!this.isValid())return n.bind(this)(e);var s=this.$utils(),r=(e||"YYYY-MM-DDTHH:mm:ssZ").replace(/\[([^\]]+)]|Q|wo|ww|w|WW|W|zzz|z|gggg|GGGG|Do|X|x|k{1,2}|S/g,function(e){switch(e){case"Q":return Math.ceil((t.$M+1)/3);case"Do":return i.ordinal(t.$D);case"gggg":return t.weekYear();case"GGGG":return t.isoWeekYear();case"wo":return i.ordinal(t.week(),"W");case"w":case"ww":return s.s(t.week(),"w"===e?1:2,"0");case"W":case"WW":return s.s(t.isoWeek(),"W"===e?1:2,"0");case"k":case"kk":return s.s(String(0===t.$H?24:t.$H),"k"===e?1:2,"0");case"X":return Math.floor(t.$d.getTime()/1e3);case"x":return t.$d.getTime();case"z":return"["+t.offsetName()+"]";case"zzz":return"["+t.offsetName("long")+"]";default:return e}});return n.bind(this)(r)}}}()},38588(e){e.exports=function(){"use strict";var e={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},t=/(\[[^[]*\])|([-_:/.,()\s]+)|(A|a|Q|YYYY|YY?|ww?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g,i=/\d/,n=/\d\d/,s=/\d\d?/,r=/\d*[^-_:/,()\s\d]+/,o={},a=function(e){return(e=+e)+(e>68?1900:2e3)},l=function(e){return function(t){this[e]=+t}},c=[/[+-]\d\d:?(\d\d)?|Z/,function(e){(this.zone||(this.zone={})).offset=function(e){if(!e)return 0;if("Z"===e)return 0;var t=e.match(/([+-]|\d\d)/g),i=60*t[1]+(+t[2]||0);return 0===i?0:"+"===t[0]?-i:i}(e)}],h=function(e){var t=o[e];return t&&(t.indexOf?t:t.s.concat(t.f))},d=function(e,t){var i,n=o.meridiem;if(n){for(var s=1;s<=24;s+=1)if(e.indexOf(n(s,0,t))>-1){i=s>12;break}}else i=e===(t?"pm":"PM");return i},u={A:[r,function(e){this.afternoon=d(e,!1)}],a:[r,function(e){this.afternoon=d(e,!0)}],Q:[i,function(e){this.month=3*(e-1)+1}],S:[i,function(e){this.milliseconds=100*+e}],SS:[n,function(e){this.milliseconds=10*+e}],SSS:[/\d{3}/,function(e){this.milliseconds=+e}],s:[s,l("seconds")],ss:[s,l("seconds")],m:[s,l("minutes")],mm:[s,l("minutes")],H:[s,l("hours")],h:[s,l("hours")],HH:[s,l("hours")],hh:[s,l("hours")],D:[s,l("day")],DD:[n,l("day")],Do:[r,function(e){var t=o.ordinal,i=e.match(/\d+/);if(this.day=i[0],t)for(var n=1;n<=31;n+=1)t(n).replace(/\[|\]/g,"")===e&&(this.day=n)}],w:[s,l("week")],ww:[n,l("week")],M:[s,l("month")],MM:[n,l("month")],MMM:[r,function(e){var t=h("months"),i=(h("monthsShort")||t.map(function(e){return e.slice(0,3)})).indexOf(e)+1;if(i<1)throw new Error;this.month=i%12||i}],MMMM:[r,function(e){var t=h("months").indexOf(e)+1;if(t<1)throw new Error;this.month=t%12||t}],Y:[/[+-]?\d+/,l("year")],YY:[n,function(e){this.year=a(e)}],YYYY:[/\d{4}/,l("year")],Z:c,ZZ:c};function p(i){var n,s;n=i,s=o&&o.formats;for(var r=(i=n.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,function(t,i,n){var r=n&&n.toUpperCase();return i||s[n]||e[n]||s[r].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,function(e,t,i){return t||i.slice(1)})})).match(t),a=r.length,l=0;l<a;l+=1){var c=r[l],h=u[c],d=h&&h[0],p=h&&h[1];r[l]=p?{regex:d,parser:p}:c.replace(/^\[|\]$/g,"")}return function(e){for(var t={},i=0,n=0;i<a;i+=1){var s=r[i];if("string"==typeof s)n+=s.length;else{var o=s.regex,l=s.parser,c=e.slice(n),h=o.exec(c)[0];l.call(t,h),e=e.replace(h,"")}}return function(e){var t=e.afternoon;if(void 0!==t){var i=e.hours;t?i<12&&(e.hours+=12):12===i&&(e.hours=0),delete e.afternoon}}(t),t}}return function(e,t,i){i.p.customParseFormat=!0,e&&e.parseTwoDigitYear&&(a=e.parseTwoDigitYear);var n=t.prototype,s=n.parse;n.parse=function(e){var t=e.date,n=e.utc,r=e.args;this.$u=n;var a=r[1];if("string"==typeof a){var l=!0===r[2],c=!0===r[3],h=l||c,d=r[2];c&&(d=r[2]),o=this.$locale(),!l&&d&&(o=i.Ls[d]),this.$d=function(e,t,i,n){try{if(["x","X"].indexOf(t)>-1)return new Date(("X"===t?1e3:1)*e);var s=p(t)(e),r=s.year,o=s.month,a=s.day,l=s.hours,c=s.minutes,h=s.seconds,d=s.milliseconds,u=s.zone,g=s.week,f=new Date,m=a||(r||o?1:f.getDate()),v=r||f.getFullYear(),y=0;r&&!o||(y=o>0?o-1:f.getMonth());var C,b=l||0,S=c||0,w=h||0,x=d||0;return u?new Date(Date.UTC(v,y,m,b,S,w,x+60*u.offset*1e3)):i?new Date(Date.UTC(v,y,m,b,S,w,x)):(C=new Date(v,y,m,b,S,w,x),g&&(C=n(C).week(g).toDate()),C)}catch(e){return new Date("")}}(t,a,n,i),this.init(),d&&!0!==d&&(this.$L=this.locale(d).$L),h&&t!=this.format(a)&&(this.$d=new Date("")),o={}}else if(a instanceof Array)for(var u=a.length,g=1;g<=u;g+=1){r[1]=a[g-1];var f=i.apply(this,r);if(f.isValid()){this.$d=f.$d,this.$L=f.$L,this.init();break}g===u&&(this.$d=new Date(""))}else s.call(this,e)}}}()},47045(e){e.exports=function(){"use strict";return function(e,t,i){t.prototype.isBetween=function(e,t,n,s){var r=i(e),o=i(t),a="("===(s=s||"()")[0],l=")"===s[1];return(a?this.isAfter(r,n):!this.isBefore(r,n))&&(l?this.isBefore(o,n):!this.isAfter(o,n))||(a?this.isBefore(r,n):!this.isAfter(r,n))&&(l?this.isAfter(o,n):!this.isBefore(o,n))}}}()},85451(e){e.exports=function(){"use strict";var e={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"};return function(t,i,n){var s=i.prototype,r=s.format;n.en.formats=e,s.format=function(t){void 0===t&&(t="YYYY-MM-DDTHH:mm:ssZ");var i=this.$locale().formats,n=function(t,i){return t.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,function(t,n,s){var r=s&&s.toUpperCase();return n||i[s]||e[s]||i[r].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,function(e,t,i){return t||i.slice(1)})})}(t,void 0===i?{}:i);return r.call(this,n)}}}()},28486(e){e.exports=function(){"use strict";var e={year:0,month:1,day:2,hour:3,minute:4,second:5},t={};return function(i,n,s){var r,o=function(e,i,n){void 0===n&&(n={});var s=new Date(e),r=function(e,i){void 0===i&&(i={});var n=i.timeZoneName||"short",s=e+"|"+n,r=t[s];return r||(r=new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:e,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",timeZoneName:n}),t[s]=r),r}(i,n);return r.formatToParts(s)},a=function(t,i){for(var n=o(t,i),r=[],a=0;a<n.length;a+=1){var l=n[a],c=l.type,h=l.value,d=e[c];d>=0&&(r[d]=parseInt(h,10))}var u=r[3],p=24===u?0:u,g=r[0]+"-"+r[1]+"-"+r[2]+" "+p+":"+r[4]+":"+r[5]+":000",f=+t;return(s.utc(g).valueOf()-(f-=f%1e3))/6e4},l=n.prototype;l.tz=function(e,t){void 0===e&&(e=r);var i,n=this.utcOffset(),o=this.toDate(),a=o.toLocaleString("en-US",{timeZone:e}),l=Math.round((o-new Date(a))/1e3/60),c=15*-Math.round(o.getTimezoneOffset()/15)-l;if(Number(c)){if(i=s(a,{locale:this.$L}).$set("millisecond",this.$ms).utcOffset(c,!0),t){var h=i.utcOffset();i=i.add(n-h,"minute")}}else i=this.utcOffset(0,t);return i.$x.$timezone=e,i},l.offsetName=function(e){var t=this.$x.$timezone||s.tz.guess(),i=o(this.valueOf(),t,{timeZoneName:e}).find(function(e){return"timezonename"===e.type.toLowerCase()});return i&&i.value};var c=l.startOf;l.startOf=function(e,t){if(!this.$x||!this.$x.$timezone)return c.call(this,e,t);var i=s(this.format("YYYY-MM-DD HH:mm:ss:SSS"),{locale:this.$L});return c.call(i,e,t).tz(this.$x.$timezone,!0)},s.tz=function(e,t,i){var n=i&&t,o=i||t||r,l=a(+s(),o);if("string"!=typeof e)return s(e).tz(o);var c=function(e,t,i){var n=e-60*t*1e3,s=a(n,i);if(t===s)return[n,t];var r=a(n-=60*(s-t)*1e3,i);return s===r?[n,s]:[e-60*Math.min(s,r)*1e3,Math.max(s,r)]}(s.utc(e,n).valueOf(),l,o),h=c[0],d=c[1],u=s(h).utcOffset(d);return u.$x.$timezone=o,u},s.tz.guess=function(){return Intl.DateTimeFormat().resolvedOptions().timeZone},s.tz.setDefault=function(e){r=e}}}()},61699(e){e.exports=function(){"use strict";var e="minute",t=/[+-]\d\d(?::?\d\d)?/g,i=/([+-]|\d\d)/g;return function(n,s,r){var o=s.prototype;r.utc=function(e){return new s({date:e,utc:!0,args:arguments})},o.utc=function(t){var i=r(this.toDate(),{locale:this.$L,utc:!0});return t?i.add(this.utcOffset(),e):i},o.local=function(){return r(this.toDate(),{locale:this.$L,utc:!1})};var a=o.parse;o.parse=function(e){e.utc&&(this.$u=!0),this.$utils().u(e.$offset)||(this.$offset=e.$offset),a.call(this,e)};var l=o.init;o.init=function(){if(this.$u){var e=this.$d;this.$y=e.getUTCFullYear(),this.$M=e.getUTCMonth(),this.$D=e.getUTCDate(),this.$W=e.getUTCDay(),this.$H=e.getUTCHours(),this.$m=e.getUTCMinutes(),this.$s=e.getUTCSeconds(),this.$ms=e.getUTCMilliseconds()}else l.call(this)};var c=o.utcOffset;o.utcOffset=function(n,s){var r=this.$utils().u;if(r(n))return this.$u?0:r(this.$offset)?c.call(this):this.$offset;if("string"==typeof n&&(n=function(e){void 0===e&&(e="");var n=e.match(t);if(!n)return null;var s=(""+n[0]).match(i)||["-",0,0],r=s[0],o=60*+s[1]+ +s[2];return 0===o?0:"+"===r?o:-o}(n),null===n))return this;var o=Math.abs(n)<=16?60*n:n;if(0===o)return this.utc(s);var a=this.clone();if(s)return a.$offset=o,a.$u=!1,a;var l=this.$u?this.toDate().getTimezoneOffset():-1*this.utcOffset();return(a=this.local().add(o+l,e)).$offset=o,a.$x.$localOffset=l,a};var h=o.format;o.format=function(e){var t=e||(this.$u?"YYYY-MM-DDTHH:mm:ss[Z]":"");return h.call(this,t)},o.valueOf=function(){var e=this.$utils().u(this.$offset)?0:this.$offset+(this.$x.$localOffset||this.$d.getTimezoneOffset());return this.$d.valueOf()-6e4*e},o.isUTC=function(){return!!this.$u},o.toISOString=function(){return this.toDate().toISOString()},o.toString=function(){return this.toDate().toUTCString()};var d=o.toDate;o.toDate=function(e){return"s"===e&&this.$offset?r(this.format("YYYY-MM-DD HH:mm:ss:SSS")).toDate():d.call(this)};var u=o.diff;o.diff=function(e,t,i){if(e&&this.$u===e.$u)return u.call(this,e,t,i);var n=this.local(),s=r(e).local();return u.call(n,s,t,i)}}}()},64881(e){e.exports=function(){"use strict";var e="week",t="year";return function(i,n,s){var r=n.prototype;r.week=function(i){if(void 0===i&&(i=null),null!==i)return this.add(7*(i-this.week()),"day");var n=this.$locale().yearStart||1;if(11===this.month()&&this.date()>25){var r=s(this).startOf(t).add(1,t).date(n),o=s(this).endOf(e);if(r.isBefore(o))return 1}var a=s(this).startOf(t).date(n).startOf(e).subtract(1,"millisecond"),l=this.diff(a,e,!0);return l<0?s(this).startOf("week").week():Math.ceil(l)},r.weeks=function(e){return void 0===e&&(e=null),this.week(e)}}}()},89028(e,t,i){var n=i(85409);function s(){var e;try{e=t.storage.debug}catch(e){}return!e&&void 0!==n&&"env"in n&&(e={NODE_ENV:"production",REACT_APP_LEARN_THUMBNAIL_UPLOAD:"https://vbmmdf81nl.execute-api.eu-west-2.amazonaws.com/live/learnthumbnailupload",REACT_APP_COGNITO_DOMAIN:"rio.auth.eu-west-2.amazoncognito.com",REACT_APP_RESOLVE_EXTERNAL_USER_URL:"https://zp73c6vc5l.execute-api.eu-west-2.amazonaws.com/current/resolve-external-user",REACT_APP_IDENTITY_POOL_ID:"eu-west-2:2fee832d-d0ba-420c-a056-0ed865cde419",REACT_APP_STRIPE_PUBLIC_KEY:"pk_live_51HLD9AEF3FA3cLa5DWIX6QpW41AHM0f5DALJjUtBoRhvP52iJrBkyGW9HajZ6MHF0M6weW7Nals5CkSZdULWyYyT00Pg5PgL0l",REACT_APP_PROFILE_BUCKET:"https://platform-profilepictures-live.s3.eu-west-2.amazonaws.com",REACT_APP_BANNER_CONTENT:"/VIDEO/LearnBanner.mp4",REACT_APP_AG_GRID_LICENSE_KEY:"Using_this_{AG_Grid}_Enterprise_key_{AG-063287}_in_excess_of_the_licence_granted_is_not_permitted___Please_report_misuse_to_legal@ag-grid.com___For_help_with_changing_this_key_please_contact_info@ag-grid.com___{RIO_ESG_LTD}_is_granted_a_{Single_Application}_Developer_License_for_the_application_{Rio}_only_for_{1}_Front-End_JavaScript_developer___All_Front-End_JavaScript_developers_working_on_{Rio}_need_to_be_licensed___{Rio}_has_been_granted_a_Deployment_License_Add-on_for_{1}_Production_Environment___This_key_works_with_{AG_Grid}_Enterprise_versions_released_before_{30_September_2025}____[v3]_[01]_MTc1OTE4NjgwMDAwMA==8e1b4570338f7c27ca6155479e1e2c14",REACT_APP_DS_URL:"https://rio.ai",REACT_APP_LOCATION_PICTURE_BUCKET:"https://platform-location-pictures-live.s3.eu-west-2.amazonaws.com",REACT_APP_GOOGLE_ANALYTIC_KEY:"UA-74511216-3",REACT_APP_IMPACT_LOCATIONS_MAP_ID:"b3c1bd97c9d0fbf8",REACT_APP_AG_CHARTS_LICENSE_KEY:"Using_this_{AG_Charts}_Enterprise_key_{AG-085624}_in_excess_of_the_licence_granted_is_not_permitted___Please_report_misuse_to_legal@ag-grid.com___For_help_with_changing_this_key_please_contact_info@ag-grid.com___{Ditto_sustainability_limited}_is_granted_a_{Single_Application}_Developer_License_for_the_application_{Rio}_only_for_{1}_Front-End_JavaScript_developer___All_Front-End_JavaScript_developers_working_on_{Rio}_need_to_be_licensed___{Rio}_has_been_granted_a_Deployment_License_Add-on_for_{1}_Production_Environment___This_key_works_with_{AG_Charts}_Enterprise_versions_released_before_{28_March_2026}____[v3]_[02]_MTc3NDY1NjAwMDAwMA==0f33e64d601fc4473c9e232e427c01f2",REACT_APP_DOCUMENT_UPLOAD:"https://1iyju5wg22.execute-api.eu-west-1.amazonaws.com/dev/documentupload",REACT_APP_INTELLIGENCE_API_STAGE:"live",REACT_APP_CONSULTATIONS_URL:"https://inference-engine.esg-r.io/api",REACT_APP_ENVIRONMENT_NAME:"Live",REACT_APP_USER_POOL_ID:"eu-west-2_CXMj8XQn0",REACT_APP_USER_POOL_WEB_CLIENT_ID:"2a8c10u5721464di89s75deqbr",REACT_APP_SENTRY_ENV:"LIVE",REACT_APP_BASE_URL:"https://sustainability.rio.ai",REACT_APP_DROMO_LICENSE_KEY:"a1fc32a8-fb02-4546-ad17-74254111f991",REACT_APP_HUBSPOT_TRACKER:"3847934",REACT_APP_GOOGLE_MAP_API_KEY:"AIzaSyD0bNhOInxPo2plOg1oxsYHeOsIXdefauE",REACT_APP_AZURE_SSO_APP_ID:"f7c97800-e70d-43a3-800e-64b6ba778a31",REACT_APP_AWS_REGION:"eu-west-2",REACT_APP_PINPOINT_REGION:"us-east-1",REACT_APP_GRAPHQL_URI:"https://kmkdrdo3dzcvnkzqzfnmfuwt4m.appsync-api.eu-west-2.amazonaws.com/graphql",REACT_APP_PINPOINT_APP_CLIENT_ID:"1b81e38efb7546329dd7eb32e0088b29"}.DEBUG),e}(t=e.exports=i(41111)).log=function(){return"object"==typeof console&&console.log&&Function.prototype.apply.call(console.log,console,arguments)},t.formatArgs=function(e){var i=this.useColors;if(e[0]=(i?"%c":"")+this.namespace+(i?" %c":" ")+e[0]+(i?"%c ":" ")+"+"+t.humanize(this.diff),i){var n="color: "+this.color;e.splice(1,0,n,"color: inherit");var s=0,r=0;e[0].replace(/%[a-zA-Z%]/g,function(e){"%%"!==e&&(s++,"%c"===e&&(r=s))}),e.splice(r,0,n)}},t.save=function(e){try{null==e?t.storage.removeItem("debug"):t.storage.debug=e}catch(e){}},t.load=s,t.useColors=function(){return!("undefined"==typeof window||!window.process||"renderer"!==window.process.type)||("undefined"!=typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!=typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/))},t.storage="undefined"!=typeof chrome&&void 0!==chrome.storage?chrome.storage.local:function(){try{return window.localStorage}catch(e){}}(),t.colors=["lightseagreen","forestgreen","goldenrod","dodgerblue","darkorchid","crimson"],t.formatters.j=function(e){try{return JSON.stringify(e)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}},t.enable(s())},41111(e,t,i){var n;function s(e){function i(){if(i.enabled){var e=i,s=+new Date,r=s-(n||s);e.diff=r,e.prev=n,e.curr=s,n=s;for(var o=new Array(arguments.length),a=0;a<o.length;a++)o[a]=arguments[a];o[0]=t.coerce(o[0]),"string"!=typeof o[0]&&o.unshift("%O");var l=0;o[0]=o[0].replace(/%([a-zA-Z%])/g,function(i,n){if("%%"===i)return i;l++;var s=t.formatters[n];if("function"==typeof s){var r=o[l];i=s.call(e,r),o.splice(l,1),l--}return i}),t.formatArgs.call(e,o),(i.log||t.log||console.log.bind(console)).apply(e,o)}}return i.namespace=e,i.enabled=t.enabled(e),i.useColors=t.useColors(),i.color=function(e){var i,n=0;for(i in e)n=(n<<5)-n+e.charCodeAt(i),n|=0;return t.colors[Math.abs(n)%t.colors.length]}(e),"function"==typeof t.init&&t.init(i),i}(t=e.exports=s.debug=s.default=s).coerce=function(e){return e instanceof Error?e.stack||e.message:e},t.disable=function(){t.enable("")},t.enable=function(e){t.save(e),t.names=[],t.skips=[];for(var i=("string"==typeof e?e:"").split(/[\s,]+/),n=i.length,s=0;s<n;s++)i[s]&&("-"===(e=i[s].replace(/\*/g,".*?"))[0]?t.skips.push(new RegExp("^"+e.substr(1)+"$")):t.names.push(new RegExp("^"+e+"$")))},t.enabled=function(e){var i,n;for(i=0,n=t.skips.length;i<n;i++)if(t.skips[i].test(e))return!1;for(i=0,n=t.names.length;i<n;i++)if(t.names[i].test(e))return!0;return!1},t.humanize=i(36644),t.names=[],t.skips=[],t.formatters={}},2858(e){"use strict";var t="%[a-f0-9]{2}",i=new RegExp("("+t+")|([^%]+?)","gi"),n=new RegExp("("+t+")+","gi");function s(e,t){try{return[decodeURIComponent(e.join(""))]}catch(e){}if(1===e.length)return e;t=t||1;var i=e.slice(0,t),n=e.slice(t);return Array.prototype.concat.call([],s(i),s(n))}function r(e){try{return decodeURIComponent(e)}catch(r){for(var t=e.match(i)||[],n=1;n<t.length;n++)t=(e=s(t,n).join("")).match(i)||[];return e}}e.exports=function(e){if("string"!=typeof e)throw new TypeError("Expected `encodedURI` to be of type `string`, got `"+typeof e+"`");try{return e=e.replace(/\+/g," "),decodeURIComponent(e)}catch(t){return function(e){for(var t={"%FE%FF":"��","%FF%FE":"��"},i=n.exec(e);i;){try{t[i[0]]=decodeURIComponent(i[0])}catch(e){var s=r(i[0]);s!==i[0]&&(t[i[0]]=s)}i=n.exec(e)}t["%C2"]="�";for(var o=Object.keys(t),a=0;a<o.length;a++){var l=o[a];e=e.replace(new RegExp(l,"g"),t[l])}return e}(e)}}},90357(e,t,i){var n,s;s=function(e){var t=["N","E","A","D"];function i(e,t){e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})}function n(e,t){Object.defineProperty(this,"kind",{value:e,enumerable:!0}),t&&t.length&&Object.defineProperty(this,"path",{value:t,enumerable:!0})}function s(e,t,i){s.super_.call(this,"E",e),Object.defineProperty(this,"lhs",{value:t,enumerable:!0}),Object.defineProperty(this,"rhs",{value:i,enumerable:!0})}function r(e,t){r.super_.call(this,"N",e),Object.defineProperty(this,"rhs",{value:t,enumerable:!0})}function o(e,t){o.super_.call(this,"D",e),Object.defineProperty(this,"lhs",{value:t,enumerable:!0})}function a(e,t,i){a.super_.call(this,"A",e),Object.defineProperty(this,"index",{value:t,enumerable:!0}),Object.defineProperty(this,"item",{value:i,enumerable:!0})}function l(e,t,i){var n=e.slice((i||t)+1||e.length);return e.length=t<0?e.length+t:t,e.push.apply(e,n),e}function c(e){var t=typeof e;return"object"!==t?t:e===Math?"math":null===e?"null":Array.isArray(e)?"array":"[object Date]"===Object.prototype.toString.call(e)?"date":"function"==typeof e.toString&&/^\/.*\//.test(e.toString())?"regexp":"object"}function h(e){var t=0;if(0===e.length)return t;for(var i=0;i<e.length;i++)t=(t<<5)-t+e.charCodeAt(i),t&=t;return t}function d(e){var t=0,i=c(e);if("array"===i)return e.forEach(function(e){t+=d(e)}),t+h("[type: array, hash: "+t+"]");if("object"===i){for(var n in e)if(e.hasOwnProperty(n)){var s="[ type: object, key: "+n+", value hash: "+d(e[n])+"]";t+=h(s)}return t}return t+h("[ type: "+i+" ; value: "+e+"]")}function u(e,t,i,n,l,h,p,g){i=i||[],p=p||[];var f=(l=l||[]).slice(0);if(null!=h){if(n){if("function"==typeof n&&n(f,h))return;if("object"==typeof n){if(n.prefilter&&n.prefilter(f,h))return;if(n.normalize){var m=n.normalize(f,h,e,t);m&&(e=m[0],t=m[1])}}}f.push(h)}"regexp"===c(e)&&"regexp"===c(t)&&(e=e.toString(),t=t.toString());var v,y,C,b,S=typeof e,w=typeof t,x="undefined"!==S||p&&p.length>0&&p[p.length-1].lhs&&Object.getOwnPropertyDescriptor(p[p.length-1].lhs,h),E="undefined"!==w||p&&p.length>0&&p[p.length-1].rhs&&Object.getOwnPropertyDescriptor(p[p.length-1].rhs,h);if(!x&&E)i.push(new r(f,t));else if(!E&&x)i.push(new o(f,e));else if(c(e)!==c(t))i.push(new s(f,e,t));else if("date"===c(e)&&e-t!==0)i.push(new s(f,e,t));else if("object"===S&&null!==e&&null!==t){for(v=p.length-1;v>-1;--v)if(p[v].lhs===e){b=!0;break}if(b)e!==t&&i.push(new s(f,e,t));else{if(p.push({lhs:e,rhs:t}),Array.isArray(e)){for(g&&(e.sort(function(e,t){return d(e)-d(t)}),t.sort(function(e,t){return d(e)-d(t)})),v=t.length-1,y=e.length-1;v>y;)i.push(new a(f,v,new r(void 0,t[v--])));for(;y>v;)i.push(new a(f,y,new o(void 0,e[y--])));for(;v>=0;--v)u(e[v],t[v],i,n,f,v,p,g)}else{var M=Object.keys(e),A=Object.keys(t);for(v=0;v<M.length;++v)C=M[v],(b=A.indexOf(C))>=0?(u(e[C],t[C],i,n,f,C,p,g),A[b]=null):u(e[C],void 0,i,n,f,C,p,g);for(v=0;v<A.length;++v)(C=A[v])&&u(void 0,t[C],i,n,f,C,p,g)}p.length=p.length-1}}else e!==t&&("number"===S&&isNaN(e)&&isNaN(t)||i.push(new s(f,e,t)))}function p(e,t,i,n,s){var r=[];if(u(e,t,r,n,null,null,null,s),i)for(var o=0;o<r.length;++o)i(r[o]);return r}function g(e,t,i,n){var s=p(e,t,n?function(e){e&&n.push(e)}:void 0,i);return n||(s.length?s:void 0)}function f(e,t,i){if(i.path&&i.path.length){var n,s=e[t],r=i.path.length-1;for(n=0;n<r;n++)s=s[i.path[n]];switch(i.kind){case"A":f(s[i.path[n]],i.index,i.item);break;case"D":delete s[i.path[n]];break;case"E":case"N":s[i.path[n]]=i.rhs}}else switch(i.kind){case"A":f(e[t],i.index,i.item);break;case"D":e=l(e,t);break;case"E":case"N":e[t]=i.rhs}return e}function m(e,i,n){if(void 0===n&&i&&~t.indexOf(i.kind)&&(n=i),e&&n&&n.kind){for(var s=e,r=-1,o=n.path?n.path.length-1:0;++r<o;)void 0===s[n.path[r]]&&(s[n.path[r]]=void 0!==n.path[r+1]&&"number"==typeof n.path[r+1]?[]:{}),s=s[n.path[r]];switch(n.kind){case"A":n.path&&void 0===s[n.path[r]]&&(s[n.path[r]]=[]),f(n.path?s[n.path[r]]:s,n.index,n.item);break;case"D":delete s[n.path[r]];break;case"E":case"N":s[n.path[r]]=n.rhs}}}function v(e,t,i){if(i.path&&i.path.length){var n,s=e[t],r=i.path.length-1;for(n=0;n<r;n++)s=s[i.path[n]];switch(i.kind){case"A":v(s[i.path[n]],i.index,i.item);break;case"D":case"E":s[i.path[n]]=i.lhs;break;case"N":delete s[i.path[n]]}}else switch(i.kind){case"A":v(e[t],i.index,i.item);break;case"D":case"E":e[t]=i.lhs;break;case"N":e=l(e,t)}return e}return i(s,n),i(r,n),i(o,n),i(a,n),Object.defineProperties(g,{diff:{value:g,enumerable:!0},orderIndependentDiff:{value:function(e,t,i,n){var s=p(e,t,n?function(e){e&&n.push(e)}:void 0,i,!0);return n||(s.length?s:void 0)},enumerable:!0},observableDiff:{value:p,enumerable:!0},orderIndependentObservableDiff:{value:function(e,t,i,n,s,r,o){return u(e,t,i,n,s,r,o,!0)},enumerable:!0},orderIndepHash:{value:d,enumerable:!0},applyDiff:{value:function(e,t,i){e&&t&&p(e,t,function(n){i&&!i(e,t,n)||m(e,t,n)})},enumerable:!0},applyChange:{value:m,enumerable:!0},revertChange:{value:function(e,t,i){if(e&&t&&i&&i.kind){var n,s,r=e;for(s=i.path.length-1,n=0;n<s;n++)void 0===r[i.path[n]]&&(r[i.path[n]]={}),r=r[i.path[n]];switch(i.kind){case"A":v(r[i.path[n]],i.index,i.item);break;case"D":case"E":r[i.path[n]]=i.lhs;break;case"N":delete r[i.path[n]]}}},enumerable:!0},isConflict:{value:function(){return"undefined"!=typeof $conflict},enumerable:!0}}),g.DeepDiff=g,e&&(e.DeepDiff=g),g}(this),void 0===(n=function(){return s}.call(t,i,t,e))||(e.exports=n)},66538(e,t,i){"use strict";i.d(t,{A:()=>l});var n=function(e){return function(e){return!!e&&"object"==typeof e}(e)&&!function(e){var t=Object.prototype.toString.call(e);return"[object RegExp]"===t||"[object Date]"===t||function(e){return e.$$typeof===s}(e)}(e)},s="function"==typeof Symbol&&Symbol.for?Symbol.for("react.element"):60103;function r(e,t){return!1!==t.clone&&t.isMergeableObject(e)?a((i=e,Array.isArray(i)?[]:{}),e,t):e;var i}function o(e,t,i){return e.concat(t).map(function(e){return r(e,i)})}function a(e,t,i){(i=i||{}).arrayMerge=i.arrayMerge||o,i.isMergeableObject=i.isMergeableObject||n;var s=Array.isArray(t);return s===Array.isArray(e)?s?i.arrayMerge(e,t,i):function(e,t,i){var n={};return i.isMergeableObject(e)&&Object.keys(e).forEach(function(t){n[t]=r(e[t],i)}),Object.keys(t).forEach(function(s){i.isMergeableObject(t[s])&&e[s]?n[s]=a(e[s],t[s],i):n[s]=r(t[s],i)}),n}(e,t,i):r(t,i)}a.all=function(e,t){if(!Array.isArray(e))throw new Error("first argument should be an array");return e.reduce(function(e,i){return a(e,i,t)},{})};const l=a},74579(e){"use strict";var t=function(e){return function(e){return!!e&&"object"==typeof e}(e)&&!function(e){var t=Object.prototype.toString.call(e);return"[object RegExp]"===t||"[object Date]"===t||function(e){return e.$$typeof===i}(e)}(e)},i="function"==typeof Symbol&&Symbol.for?Symbol.for("react.element"):60103;function n(e,t){return!1!==t.clone&&t.isMergeableObject(e)?a((i=e,Array.isArray(i)?[]:{}),e,t):e;var i}function s(e,t,i){return e.concat(t).map(function(e){return n(e,i)})}function r(e){return Object.keys(e).concat(function(e){return Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(e).filter(function(t){return Object.propertyIsEnumerable.call(e,t)}):[]}(e))}function o(e,t){try{return t in e}catch(e){return!1}}function a(e,i,l){(l=l||{}).arrayMerge=l.arrayMerge||s,l.isMergeableObject=l.isMergeableObject||t,l.cloneUnlessOtherwiseSpecified=n;var c=Array.isArray(i);return c===Array.isArray(e)?c?l.arrayMerge(e,i,l):function(e,t,i){var s={};return i.isMergeableObject(e)&&r(e).forEach(function(t){s[t]=n(e[t],i)}),r(t).forEach(function(r){(function(e,t){return o(e,t)&&!(Object.hasOwnProperty.call(e,t)&&Object.propertyIsEnumerable.call(e,t))})(e,r)||(o(e,r)&&i.isMergeableObject(t[r])?s[r]=function(e,t){if(!t.customMerge)return a;var i=t.customMerge(e);return"function"==typeof i?i:a}(r,i)(e[r],t[r],i):s[r]=n(t[r],i))}),s}(e,i,l):n(i,l)}a.all=function(e,t){if(!Array.isArray(e))throw new Error("first argument should be an array");return e.reduce(function(e,i){return a(e,i,t)},{})};var l=a;e.exports=l},20022(e,t,i){"use strict";var n=i(39886),s=i(63429),r=i(71102),o=i(25667);e.exports=function(e,t,i){if(!e||"object"!=typeof e&&"function"!=typeof e)throw new r("`obj` must be an object or a function`");if("string"!=typeof t&&"symbol"!=typeof t)throw new r("`property` must be a string or a symbol`");if(arguments.length>3&&"boolean"!=typeof arguments[3]&&null!==arguments[3])throw new r("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&"boolean"!=typeof arguments[4]&&null!==arguments[4])throw new r("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&"boolean"!=typeof arguments[5]&&null!==arguments[5])throw new r("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&"boolean"!=typeof arguments[6])throw new r("`loose`, if provided, must be a boolean");var a=arguments.length>3?arguments[3]:null,l=arguments.length>4?arguments[4]:null,c=arguments.length>5?arguments[5]:null,h=arguments.length>6&&arguments[6],d=!!o&&o(e,t);if(n)n(e,t,{configurable:null===c&&d?d.configurable:!c,enumerable:null===a&&d?d.enumerable:!a,value:i,writable:null===l&&d?d.writable:!l});else{if(!h&&(a||l||c))throw new s("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.");e[t]=i}}},88754(e,t,i){"use strict";t.utils=i(26012),t.Cipher=i(96242),t.DES=i(7325),t.CBC=i(39015),t.EDE=i(62597)},39015(e,t,i){"use strict";var n=i(35578),s=i(91193),r={};function o(e){n.equal(e.length,8,"Invalid IV length"),this.iv=new Array(8);for(var t=0;t<this.iv.length;t++)this.iv[t]=e[t]}t.instantiate=function(e){function t(t){e.call(this,t),this._cbcInit()}s(t,e);for(var i=Object.keys(r),n=0;n<i.length;n++){var o=i[n];t.prototype[o]=r[o]}return t.create=function(e){return new t(e)},t},r._cbcInit=function(){var e=new o(this.options.iv);this._cbcState=e},r._update=function(e,t,i,n){var s=this._cbcState,r=this.constructor.super_.prototype,o=s.iv;if("encrypt"===this.type){for(var a=0;a<this.blockSize;a++)o[a]^=e[t+a];for(r._update.call(this,o,0,i,n),a=0;a<this.blockSize;a++)o[a]=i[n+a]}else{for(r._update.call(this,e,t,i,n),a=0;a<this.blockSize;a++)i[n+a]^=o[a];for(a=0;a<this.blockSize;a++)o[a]=e[t+a]}}},96242(e,t,i){"use strict";var n=i(35578);function s(e){this.options=e,this.type=this.options.type,this.blockSize=8,this._init(),this.buffer=new Array(this.blockSize),this.bufferOff=0,this.padding=!1!==e.padding}e.exports=s,s.prototype._init=function(){},s.prototype.update=function(e){return 0===e.length?[]:"decrypt"===this.type?this._updateDecrypt(e):this._updateEncrypt(e)},s.prototype._buffer=function(e,t){for(var i=Math.min(this.buffer.length-this.bufferOff,e.length-t),n=0;n<i;n++)this.buffer[this.bufferOff+n]=e[t+n];return this.bufferOff+=i,i},s.prototype._flushBuffer=function(e,t){return this._update(this.buffer,0,e,t),this.bufferOff=0,this.blockSize},s.prototype._updateEncrypt=function(e){var t=0,i=0,n=(this.bufferOff+e.length)/this.blockSize|0,s=new Array(n*this.blockSize);0!==this.bufferOff&&(t+=this._buffer(e,t),this.bufferOff===this.buffer.length&&(i+=this._flushBuffer(s,i)));for(var r=e.length-(e.length-t)%this.blockSize;t<r;t+=this.blockSize)this._update(e,t,s,i),i+=this.blockSize;for(;t<e.length;t++,this.bufferOff++)this.buffer[this.bufferOff]=e[t];return s},s.prototype._updateDecrypt=function(e){for(var t=0,i=0,n=Math.ceil((this.bufferOff+e.length)/this.blockSize)-1,s=new Array(n*this.blockSize);n>0;n--)t+=this._buffer(e,t),i+=this._flushBuffer(s,i);return t+=this._buffer(e,t),s},s.prototype.final=function(e){var t,i;return e&&(t=this.update(e)),i="encrypt"===this.type?this._finalEncrypt():this._finalDecrypt(),t?t.concat(i):i},s.prototype._pad=function(e,t){if(0===t)return!1;for(;t<e.length;)e[t++]=0;return!0},s.prototype._finalEncrypt=function(){if(!this._pad(this.buffer,this.bufferOff))return[];var e=new Array(this.blockSize);return this._update(this.buffer,0,e,0),e},s.prototype._unpad=function(e){return e},s.prototype._finalDecrypt=function(){n.equal(this.bufferOff,this.blockSize,"Not enough data to decrypt");var e=new Array(this.blockSize);return this._flushBuffer(e,0),this._unpad(e)}},7325(e,t,i){"use strict";var n=i(35578),s=i(91193),r=i(26012),o=i(96242);function a(){this.tmp=new Array(2),this.keys=null}function l(e){o.call(this,e);var t=new a;this._desState=t,this.deriveKeys(t,e.key)}s(l,o),e.exports=l,l.create=function(e){return new l(e)};var c=[1,1,2,2,2,2,2,2,1,2,2,2,2,2,2,1];l.prototype.deriveKeys=function(e,t){e.keys=new Array(32),n.equal(t.length,this.blockSize,"Invalid key length");var i=r.readUInt32BE(t,0),s=r.readUInt32BE(t,4);r.pc1(i,s,e.tmp,0),i=e.tmp[0],s=e.tmp[1];for(var o=0;o<e.keys.length;o+=2){var a=c[o>>>1];i=r.r28shl(i,a),s=r.r28shl(s,a),r.pc2(i,s,e.keys,o)}},l.prototype._update=function(e,t,i,n){var s=this._desState,o=r.readUInt32BE(e,t),a=r.readUInt32BE(e,t+4);r.ip(o,a,s.tmp,0),o=s.tmp[0],a=s.tmp[1],"encrypt"===this.type?this._encrypt(s,o,a,s.tmp,0):this._decrypt(s,o,a,s.tmp,0),o=s.tmp[0],a=s.tmp[1],r.writeUInt32BE(i,o,n),r.writeUInt32BE(i,a,n+4)},l.prototype._pad=function(e,t){if(!1===this.padding)return!1;for(var i=e.length-t,n=t;n<e.length;n++)e[n]=i;return!0},l.prototype._unpad=function(e){if(!1===this.padding)return e;for(var t=e[e.length-1],i=e.length-t;i<e.length;i++)n.equal(e[i],t);return e.slice(0,e.length-t)},l.prototype._encrypt=function(e,t,i,n,s){for(var o=t,a=i,l=0;l<e.keys.length;l+=2){var c=e.keys[l],h=e.keys[l+1];r.expand(a,e.tmp,0),c^=e.tmp[0],h^=e.tmp[1];var d=r.substitute(c,h),u=a;a=(o^r.permute(d))>>>0,o=u}r.rip(a,o,n,s)},l.prototype._decrypt=function(e,t,i,n,s){for(var o=i,a=t,l=e.keys.length-2;l>=0;l-=2){var c=e.keys[l],h=e.keys[l+1];r.expand(o,e.tmp,0),c^=e.tmp[0],h^=e.tmp[1];var d=r.substitute(c,h),u=o;o=(a^r.permute(d))>>>0,a=u}r.rip(o,a,n,s)}},62597(e,t,i){"use strict";var n=i(35578),s=i(91193),r=i(96242),o=i(7325);function a(e,t){n.equal(t.length,24,"Invalid key length");var i=t.slice(0,8),s=t.slice(8,16),r=t.slice(16,24);this.ciphers="encrypt"===e?[o.create({type:"encrypt",key:i}),o.create({type:"decrypt",key:s}),o.create({type:"encrypt",key:r})]:[o.create({type:"decrypt",key:r}),o.create({type:"encrypt",key:s}),o.create({type:"decrypt",key:i})]}function l(e){r.call(this,e);var t=new a(this.type,this.options.key);this._edeState=t}s(l,r),e.exports=l,l.create=function(e){return new l(e)},l.prototype._update=function(e,t,i,n){var s=this._edeState;s.ciphers[0]._update(e,t,i,n),s.ciphers[1]._update(i,n,i,n),s.ciphers[2]._update(i,n,i,n)},l.prototype._pad=o.prototype._pad,l.prototype._unpad=o.prototype._unpad},26012(e,t){"use strict";t.readUInt32BE=function(e,t){return(e[0+t]<<24|e[1+t]<<16|e[2+t]<<8|e[3+t])>>>0},t.writeUInt32BE=function(e,t,i){e[0+i]=t>>>24,e[1+i]=t>>>16&255,e[2+i]=t>>>8&255,e[3+i]=255&t},t.ip=function(e,t,i,n){for(var s=0,r=0,o=6;o>=0;o-=2){for(var a=0;a<=24;a+=8)s<<=1,s|=t>>>a+o&1;for(a=0;a<=24;a+=8)s<<=1,s|=e>>>a+o&1}for(o=6;o>=0;o-=2){for(a=1;a<=25;a+=8)r<<=1,r|=t>>>a+o&1;for(a=1;a<=25;a+=8)r<<=1,r|=e>>>a+o&1}i[n+0]=s>>>0,i[n+1]=r>>>0},t.rip=function(e,t,i,n){for(var s=0,r=0,o=0;o<4;o++)for(var a=24;a>=0;a-=8)s<<=1,s|=t>>>a+o&1,s<<=1,s|=e>>>a+o&1;for(o=4;o<8;o++)for(a=24;a>=0;a-=8)r<<=1,r|=t>>>a+o&1,r<<=1,r|=e>>>a+o&1;i[n+0]=s>>>0,i[n+1]=r>>>0},t.pc1=function(e,t,i,n){for(var s=0,r=0,o=7;o>=5;o--){for(var a=0;a<=24;a+=8)s<<=1,s|=t>>a+o&1;for(a=0;a<=24;a+=8)s<<=1,s|=e>>a+o&1}for(a=0;a<=24;a+=8)s<<=1,s|=t>>a+o&1;for(o=1;o<=3;o++){for(a=0;a<=24;a+=8)r<<=1,r|=t>>a+o&1;for(a=0;a<=24;a+=8)r<<=1,r|=e>>a+o&1}for(a=0;a<=24;a+=8)r<<=1,r|=e>>a+o&1;i[n+0]=s>>>0,i[n+1]=r>>>0},t.r28shl=function(e,t){return e<<t&268435455|e>>>28-t};var i=[14,11,17,4,27,23,25,0,13,22,7,18,5,9,16,24,2,20,12,21,1,8,15,26,15,4,25,19,9,1,26,16,5,11,23,8,12,7,17,0,22,3,10,14,6,20,27,24];t.pc2=function(e,t,n,s){for(var r=0,o=0,a=i.length>>>1,l=0;l<a;l++)r<<=1,r|=e>>>i[l]&1;for(l=a;l<i.length;l++)o<<=1,o|=t>>>i[l]&1;n[s+0]=r>>>0,n[s+1]=o>>>0},t.expand=function(e,t,i){var n=0,s=0;n=(1&e)<<5|e>>>27;for(var r=23;r>=15;r-=4)n<<=6,n|=e>>>r&63;for(r=11;r>=3;r-=4)s|=e>>>r&63,s<<=6;s|=(31&e)<<1|e>>>31,t[i+0]=n>>>0,t[i+1]=s>>>0};var n=[14,0,4,15,13,7,1,4,2,14,15,2,11,13,8,1,3,10,10,6,6,12,12,11,5,9,9,5,0,3,7,8,4,15,1,12,14,8,8,2,13,4,6,9,2,1,11,7,15,5,12,11,9,3,7,14,3,10,10,0,5,6,0,13,15,3,1,13,8,4,14,7,6,15,11,2,3,8,4,14,9,12,7,0,2,1,13,10,12,6,0,9,5,11,10,5,0,13,14,8,7,10,11,1,10,3,4,15,13,4,1,2,5,11,8,6,12,7,6,12,9,0,3,5,2,14,15,9,10,13,0,7,9,0,14,9,6,3,3,4,15,6,5,10,1,2,13,8,12,5,7,14,11,12,4,11,2,15,8,1,13,1,6,10,4,13,9,0,8,6,15,9,3,8,0,7,11,4,1,15,2,14,12,3,5,11,10,5,14,2,7,12,7,13,13,8,14,11,3,5,0,6,6,15,9,0,10,3,1,4,2,7,8,2,5,12,11,1,12,10,4,14,15,9,10,3,6,15,9,0,0,6,12,10,11,1,7,13,13,8,15,9,1,4,3,5,14,11,5,12,2,7,8,2,4,14,2,14,12,11,4,2,1,12,7,4,10,7,11,13,6,1,8,5,5,0,3,15,15,10,13,3,0,9,14,8,9,6,4,11,2,8,1,12,11,7,10,1,13,14,7,2,8,13,15,6,9,15,12,0,5,9,6,10,3,4,0,5,14,3,12,10,1,15,10,4,15,2,9,7,2,12,6,9,8,5,0,6,13,1,3,13,4,14,14,0,7,11,5,3,11,8,9,4,14,3,15,2,5,12,2,9,8,5,12,15,3,10,7,11,0,14,4,1,10,7,1,6,13,0,11,8,6,13,4,13,11,0,2,11,14,7,15,4,0,9,8,1,13,10,3,14,12,3,9,5,7,12,5,2,10,15,6,8,1,6,1,6,4,11,11,13,13,8,12,1,3,4,7,10,14,7,10,9,15,5,6,0,8,15,0,14,5,2,9,3,2,12,13,1,2,15,8,13,4,8,6,10,15,3,11,7,1,4,10,12,9,5,3,6,14,11,5,0,0,14,12,9,7,2,7,2,11,1,4,14,1,7,9,4,12,10,14,8,2,13,0,15,6,12,10,9,13,0,15,3,3,5,5,6,8,11];t.substitute=function(e,t){for(var i=0,s=0;s<4;s++)i<<=4,i|=n[64*s+(e>>>18-6*s&63)];for(s=0;s<4;s++)i<<=4,i|=n[256+64*s+(t>>>18-6*s&63)];return i>>>0};var s=[16,25,12,11,3,20,4,15,31,17,9,6,27,14,1,22,30,24,8,18,0,5,29,23,13,19,2,26,10,21,28,7];t.permute=function(e){for(var t=0,i=0;i<s.length;i++)t<<=1,t|=e>>>s[i]&1;return t>>>0},t.padSplit=function(e,t,i){for(var n=e.toString(2);n.length<t;)n="0"+n;for(var s=[],r=0;r<t;r+=i)s.push(n.slice(r,r+i));return s.join(" ")}},35835(e,t,i){var n=i(25122),s=i(37821),r=i(29242),o={binary:!0,hex:!0,base64:!0};t.DiffieHellmanGroup=t.createDiffieHellmanGroup=t.getDiffieHellman=function(e){var t=new Buffer(s[e].prime,"hex"),i=new Buffer(s[e].gen,"hex");return new r(t,i)},t.createDiffieHellman=t.DiffieHellman=function e(t,i,s,a){return Buffer.isBuffer(i)||void 0===o[i]?e(t,"binary",i,s):(i=i||"binary",a=a||"binary",s=s||new Buffer([2]),Buffer.isBuffer(s)||(s=new Buffer(s,a)),"number"==typeof t?new r(n(t,s),s,!0):(Buffer.isBuffer(t)||(t=new Buffer(t,i)),new r(t,s,!0)))}},29242(e,t,i){var n=i(5630),s=new(i(74442)),r=new n(24),o=new n(11),a=new n(10),l=new n(3),c=new n(7),h=i(25122),d=i(82869);function u(e,t){return t=t||"utf8",Buffer.isBuffer(e)||(e=new Buffer(e,t)),this._pub=new n(e),this}function p(e,t){return t=t||"utf8",Buffer.isBuffer(e)||(e=new Buffer(e,t)),this._priv=new n(e),this}e.exports=f;var g={};function f(e,t,i){this.setGenerator(t),this.__prime=new n(e),this._prime=n.mont(this.__prime),this._primeLen=e.length,this._pub=void 0,this._priv=void 0,this._primeCode=void 0,i?(this.setPublicKey=u,this.setPrivateKey=p):this._primeCode=8}function m(e,t){var i=new Buffer(e.toArray());return t?i.toString(t):i}Object.defineProperty(f.prototype,"verifyError",{enumerable:!0,get:function(){return"number"!=typeof this._primeCode&&(this._primeCode=function(e,t){var i=t.toString("hex"),n=[i,e.toString(16)].join("_");if(n in g)return g[n];var d,u=0;if(e.isEven()||!h.simpleSieve||!h.fermatTest(e)||!s.test(e))return u+=1,u+="02"===i||"05"===i?8:4,g[n]=u,u;switch(s.test(e.shrn(1))||(u+=2),i){case"02":e.mod(r).cmp(o)&&(u+=8);break;case"05":(d=e.mod(a)).cmp(l)&&d.cmp(c)&&(u+=8);break;default:u+=4}return g[n]=u,u}(this.__prime,this.__gen)),this._primeCode}}),f.prototype.generateKeys=function(){return this._priv||(this._priv=new n(d(this._primeLen))),this._pub=this._gen.toRed(this._prime).redPow(this._priv).fromRed(),this.getPublicKey()},f.prototype.computeSecret=function(e){var t=(e=(e=new n(e)).toRed(this._prime)).redPow(this._priv).fromRed(),i=new Buffer(t.toArray()),s=this.getPrime();if(i.length<s.length){var r=new Buffer(s.length-i.length);r.fill(0),i=Buffer.concat([r,i])}return i},f.prototype.getPublicKey=function(e){return m(this._pub,e)},f.prototype.getPrivateKey=function(e){return m(this._priv,e)},f.prototype.getPrime=function(e){return m(this.__prime,e)},f.prototype.getGenerator=function(e){return m(this._gen,e)},f.prototype.setGenerator=function(e,t){return t=t||"utf8",Buffer.isBuffer(e)||(e=new Buffer(e,t)),this.__gen=e,this._gen=new n(e),this}},25122(e,t,i){var n=i(82869);e.exports=y,y.simpleSieve=m,y.fermatTest=v;var s=i(5630),r=new s(24),o=new(i(74442)),a=new s(1),l=new s(2),c=new s(5),h=(new s(16),new s(8),new s(10)),d=new s(3),u=(new s(7),new s(11)),p=new s(4),g=(new s(12),null);function f(){if(null!==g)return g;var e=[];e[0]=2;for(var t=1,i=3;i<1048576;i+=2){for(var n=Math.ceil(Math.sqrt(i)),s=0;s<t&&e[s]<=n&&i%e[s]!==0;s++);t!==s&&e[s]<=n||(e[t++]=i)}return g=e,e}function m(e){for(var t=f(),i=0;i<t.length;i++)if(0===e.modn(t[i]))return 0===e.cmpn(t[i]);return!0}function v(e){var t=s.mont(e);return 0===l.toRed(t).redPow(e.subn(1)).fromRed().cmpn(1)}function y(e,t){if(e<16)return new s(2===t||5===t?[140,123]:[140,39]);var i,g;for(t=new s(t);;){for(i=new s(n(Math.ceil(e/8)));i.bitLength()>e;)i.ishrn(1);if(i.isEven()&&i.iadd(a),i.testn(1)||i.iadd(l),t.cmp(l)){if(!t.cmp(c))for(;i.mod(h).cmp(d);)i.iadd(p)}else for(;i.mod(r).cmp(u);)i.iadd(p);if(m(g=i.shrn(1))&&m(i)&&v(g)&&v(i)&&o.test(g)&&o.test(i))return i}}},24310(e,t,i){"use strict";function n(e,t){e.classList?e.classList.add(t):function(e,t){return e.classList?!!t&&e.classList.contains(t):-1!==(" "+(e.className.baseVal||e.className)+" ").indexOf(" "+t+" ")}(e,t)||("string"==typeof e.className?e.className=e.className+" "+t:e.setAttribute("class",(e.className&&e.className.baseVal||"")+" "+t))}i.d(t,{A:()=>n})},48532(e,t,i){"use strict";function n(e,t){return e.replace(new RegExp("(^|\\s)"+t+"(?:\\s|$)","g"),"$1").replace(/\s+/g," ").replace(/^\s*|\s*$/g,"")}function s(e,t){e.classList?e.classList.remove(t):"string"==typeof e.className?e.className=n(e.className,t):e.setAttribute("class",n(e.className&&e.className.baseVal||"",t))}i.d(t,{A:()=>s})},38383(e,t,i){"use strict";const n=i(72856),s=new Set(["__proto__","prototype","constructor"]);function r(e){const t=e.split("."),i=[];for(let e=0;e<t.length;e++){let n=t[e];for(;"\\"===n[n.length-1]&&void 0!==t[e+1];)n=n.slice(0,-1)+".",n+=t[++e];i.push(n)}return i.some(e=>s.has(e))?[]:i}e.exports={get(e,t,i){if(!n(e)||"string"!=typeof t)return void 0===i?e:i;const s=r(t);if(0!==s.length){for(let t=0;t<s.length;t++)if(null==(e=e[s[t]])){if(t!==s.length-1)return i;break}return void 0===e?i:e}},set(e,t,i){if(!n(e)||"string"!=typeof t)return e;const s=e,o=r(t);for(let t=0;t<o.length;t++){const s=o[t];n(e[s])||(e[s]={}),t===o.length-1&&(e[s]=i),e=e[s]}return s},delete(e,t){if(!n(e)||"string"!=typeof t)return!1;const i=r(t);for(let t=0;t<i.length;t++){const s=i[t];if(t===i.length-1)return delete e[s],!0;if(e=e[s],!n(e))return!1}},has(e,t){if(!n(e)||"string"!=typeof t)return!1;const i=r(t);if(0===i.length)return!1;for(let t=0;t<i.length;t++){if(!n(e))return!1;if(!(i[t]in e))return!1;e=e[i[t]]}return!0}}},86858(e,t,i){"use strict";function n(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{},n=Object.keys(i);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(i).filter(function(e){return Object.getOwnPropertyDescriptor(i,e).enumerable}))),n.forEach(function(t){s(e,t,i[t])})}return e}function s(e,t,i){return t in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,e}var r=i(84433),o=i(41671),a=i(40643),l=i(31527),c=i(58267),h=i(59539),d=i(12634),u=i(17595),p=i(21829),g=i(83886),f=u("draft_tree_data_support"),m=f?l:a,v=p.List,y=p.Repeat,C={insertAtomicBlock:function(e,t,i){var s=e.getCurrentContent(),a=e.getSelection(),l=c.removeRange(s,a,"backward"),u=l.getSelectionAfter(),p=c.splitBlock(l,u),g=p.getSelectionAfter(),C=c.setBlockType(p,g,"atomic"),b=o.create({entity:t}),S={key:d(),type:"atomic",text:i,characterList:v(y(b,i.length))},w={key:d(),type:"unstyled"};f&&(S=n({},S,{nextSibling:w.key}),w=n({},w,{prevSibling:S.key}));var x=[new m(S),new m(w)],E=r.createFromArray(x),M=c.replaceWithFragment(C,g,E),A=M.merge({selectionBefore:a,selectionAfter:M.getSelectionAfter().set("hasFocus",!0)});return h.push(e,A,"insert-fragment")},moveAtomicBlock:function(e,t,i,n){var s,r=e.getCurrentContent(),o=e.getSelection();if("before"===n||"after"===n){var a=r.getBlockForKey("before"===n?i.getStartKey():i.getEndKey());s=g(r,t,a,n)}else{var l=c.removeRange(r,i,"backward"),d=l.getSelectionAfter(),u=l.getBlockForKey(d.getFocusKey());if(0===d.getStartOffset())s=g(l,t,u,"before");else if(d.getEndOffset()===u.getLength())s=g(l,t,u,"after");else{var p=c.splitBlock(l,d),f=p.getSelectionAfter(),m=p.getBlockForKey(f.getFocusKey());s=g(p,t,m,"before")}}var v=s.merge({selectionBefore:o,selectionAfter:s.getSelectionAfter().set("hasFocus",!0)});return h.push(e,v,"move-block")}};e.exports=C},84433(e,t,i){"use strict";var n=i(21829).OrderedMap,s={createFromArray:function(e){return n(e.map(function(e){return[e.getKey(),e]}))}};e.exports=s},52568(e,t,i){"use strict";function n(e,t,i){return t in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,e}var s=i(14910),r=i(68768),o=i(21829),a=o.List,l=o.Repeat,c=o.Record,h=function(){return!0},d=c({start:null,end:null}),u=c({start:null,end:null,decoratorKey:null,leaves:null}),p={generate:function(e,t,i){var n=t.getLength();if(!n)return a.of(new u({start:0,end:0,decoratorKey:null,leaves:a.of(new d({start:0,end:0}))}));var r=[],o=i?i.getDecorations(t,e):a(l(null,n)),c=t.getCharacterList();return s(o,g,h,function(e,t){var i,n,l,p;r.push(new u({start:e,end:t,decoratorKey:o.get(e),leaves:(i=c.slice(e,t).toList(),n=e,l=[],p=i.map(function(e){return e.getStyle()}).toList(),s(p,g,h,function(e,t){l.push(new d({start:e+n,end:t+n}))}),a(l))}))}),a(r)},fromJS:function(e){var t=e.leaves,i=function(e,t){if(null==e)return{};var i,n,s={},r=Object.keys(e);for(n=0;n<r.length;n++)i=r[n],t.indexOf(i)>=0||(s[i]=e[i]);return s}(e,["leaves"]);return new u(function(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{},s=Object.keys(i);"function"==typeof Object.getOwnPropertySymbols&&(s=s.concat(Object.getOwnPropertySymbols(i).filter(function(e){return Object.getOwnPropertyDescriptor(i,e).enumerable}))),s.forEach(function(t){n(e,t,i[t])})}return e}({},i,{leaves:null!=t?a(Array.isArray(t)?t:r(t)).map(function(e){return d(e)}):null}))}};function g(e,t){return e===t}e.exports=p},41671(e,t,i){"use strict";var n=i(21829),s=n.Map,r=n.OrderedSet,o=n.Record,a=r(),l={style:a,entity:null},c=function(e){var t,i;function n(){return e.apply(this,arguments)||this}i=e,(t=n).prototype=Object.create(i.prototype),t.prototype.constructor=t,t.__proto__=i;var o=n.prototype;return o.getStyle=function(){return this.get("style")},o.getEntity=function(){return this.get("entity")},o.hasStyle=function(e){return this.getStyle().includes(e)},n.applyStyle=function(e,t){var i=e.set("style",e.getStyle().add(t));return n.create(i)},n.removeStyle=function(e,t){var i=e.set("style",e.getStyle().remove(t));return n.create(i)},n.applyEntity=function(e,t){var i=e.getEntity()===t?e:e.set("entity",t);return n.create(i)},n.create=function(e){if(!e)return h;var t=s({style:a,entity:null}).merge(e),i=d.get(t);if(i)return i;var r=new n(t);return d=d.set(t,r),r},n.fromJS=function(e){var t=e.style,i=e.entity;return new n({style:Array.isArray(t)?r(t):t,entity:Array.isArray(i)?r(i):i})},n}(o(l)),h=new c,d=s([[s(l),h]]);c.EMPTY=h,e.exports=c},9294(e,t,i){"use strict";var n=i(21829).List,s=function(){function e(e){var t,i;i=void 0,(t="_decorators")in this?Object.defineProperty(this,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):this[t]=i,this._decorators=e.slice()}var t=e.prototype;return t.getDecorations=function(e,t){var i=Array(e.getText().length).fill(null);return this._decorators.forEach(function(n,s){var r=0;(0,n.strategy)(e,function(e,t){(function(e,t,i){for(var n=t;n<i;n++)if(null!=e[n])return!1;return!0})(i,e,t)&&(function(e,t,i,n){for(var s=t;s<i;s++)e[s]=n}(i,e,t,s+"."+r),r++)},t)}),n(i)},t.getComponentForKey=function(e){var t=parseInt(e.split(".")[0],10);return this._decorators[t].component},t.getPropsForKey=function(e){var t=parseInt(e.split(".")[0],10);return this._decorators[t].props},e}();e.exports=s},40643(e,t,i){"use strict";var n=i(41671),s=i(14910),r=i(21829),o=r.List,a=r.Map,l=r.OrderedSet,c=r.Record,h=r.Repeat,d=l(),u=function(e){var t,i;function r(t){return e.call(this,function(e){if(!e)return e;var t=e.characterList,i=e.text;return i&&!t&&(e.characterList=o(h(n.EMPTY,i.length))),e}(t))||this}i=e,(t=r).prototype=Object.create(i.prototype),t.prototype.constructor=t,t.__proto__=i;var a=r.prototype;return a.getKey=function(){return this.get("key")},a.getType=function(){return this.get("type")},a.getText=function(){return this.get("text")},a.getCharacterList=function(){return this.get("characterList")},a.getLength=function(){return this.getText().length},a.getDepth=function(){return this.get("depth")},a.getData=function(){return this.get("data")},a.getInlineStyleAt=function(e){var t=this.getCharacterList().get(e);return t?t.getStyle():d},a.getEntityAt=function(e){var t=this.getCharacterList().get(e);return t?t.getEntity():null},a.findStyleRanges=function(e,t){s(this.getCharacterList(),p,e,t)},a.findEntityRanges=function(e,t){s(this.getCharacterList(),g,e,t)},r}(c({key:"",type:"unstyled",text:"",characterList:o(),depth:0,data:a()}));function p(e,t){return e.getStyle()===t.getStyle()}function g(e,t){return e.getEntity()===t.getEntity()}e.exports=u},31527(e,t,i){"use strict";var n=i(41671),s=i(14910),r=i(21829),o=r.List,a=r.Map,l=r.OrderedSet,c=r.Record,h=r.Repeat,d=l(),u={parent:null,characterList:o(),data:a(),depth:0,key:"",text:"",type:"unstyled",children:o(),prevSibling:null,nextSibling:null},p=function(e,t){return e.getStyle()===t.getStyle()},g=function(e,t){return e.getEntity()===t.getEntity()},f=function(e){var t,i;function r(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:u;return e.call(this,function(e){if(!e)return e;var t=e.characterList,i=e.text;return i&&!t&&(e.characterList=o(h(n.EMPTY,i.length))),e}(t))||this}i=e,(t=r).prototype=Object.create(i.prototype),t.prototype.constructor=t,t.__proto__=i;var a=r.prototype;return a.getKey=function(){return this.get("key")},a.getType=function(){return this.get("type")},a.getText=function(){return this.get("text")},a.getCharacterList=function(){return this.get("characterList")},a.getLength=function(){return this.getText().length},a.getDepth=function(){return this.get("depth")},a.getData=function(){return this.get("data")},a.getInlineStyleAt=function(e){var t=this.getCharacterList().get(e);return t?t.getStyle():d},a.getEntityAt=function(e){var t=this.getCharacterList().get(e);return t?t.getEntity():null},a.getChildKeys=function(){return this.get("children")},a.getParentKey=function(){return this.get("parent")},a.getPrevSiblingKey=function(){return this.get("prevSibling")},a.getNextSiblingKey=function(){return this.get("nextSibling")},a.findStyleRanges=function(e,t){s(this.getCharacterList(),p,e,t)},a.findEntityRanges=function(e,t){s(this.getCharacterList(),g,e,t)},r}(c(u));e.exports=f},23315(e,t,i){"use strict";function n(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{},n=Object.keys(i);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(i).filter(function(e){return Object.getOwnPropertyDescriptor(i,e).enumerable}))),n.forEach(function(t){s(e,t,i[t])})}return e}function s(e,t,i){return t in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,e}var r=i(84433),o=i(41671),a=i(40643),l=i(31527),c=i(70873),h=i(27442),d=i(12634),u=i(68768),p=i(17595),g=i(21829),f=i(10160),m=g.List,v=g.Record,y=g.Repeat,C=g.Map,b=g.OrderedMap,S=v({entityMap:null,blockMap:null,selectionBefore:null,selectionAfter:null}),w=p("draft_tree_data_support")?l:a,x=function(e){var t,i;function s(){return e.apply(this,arguments)||this}i=e,(t=s).prototype=Object.create(i.prototype),t.prototype.constructor=t,t.__proto__=i;var a=s.prototype;return a.getEntityMap=function(){return c},a.getBlockMap=function(){return this.get("blockMap")},a.getSelectionBefore=function(){return this.get("selectionBefore")},a.getSelectionAfter=function(){return this.get("selectionAfter")},a.getBlockForKey=function(e){return this.getBlockMap().get(e)},a.getKeyBefore=function(e){return this.getBlockMap().reverse().keySeq().skipUntil(function(t){return t===e}).skip(1).first()},a.getKeyAfter=function(e){return this.getBlockMap().keySeq().skipUntil(function(t){return t===e}).skip(1).first()},a.getBlockAfter=function(e){return this.getBlockMap().skipUntil(function(t,i){return i===e}).skip(1).first()},a.getBlockBefore=function(e){return this.getBlockMap().reverse().skipUntil(function(t,i){return i===e}).skip(1).first()},a.getBlocksAsArray=function(){return this.getBlockMap().toArray()},a.getFirstBlock=function(){return this.getBlockMap().first()},a.getLastBlock=function(){return this.getBlockMap().last()},a.getPlainText=function(e){return this.getBlockMap().map(function(e){return e?e.getText():""}).join(e||"\n")},a.getLastCreatedEntityKey=function(){return c.__getLastCreatedEntityKey()},a.hasText=function(){var e=this.getBlockMap();return e.size>1||escape(e.first().getText()).replace(/%u200B/g,"").length>0},a.createEntity=function(e,t,i){return c.__create(e,t,i),this},a.mergeEntityData=function(e,t){return c.__mergeData(e,t),this},a.replaceEntityData=function(e,t){return c.__replaceData(e,t),this},a.addEntity=function(e){return c.__add(e),this},a.getEntity=function(e){return c.__get(e)},a.getAllEntities=function(){return c.__getAll()},a.loadWithEntities=function(e){return c.__loadWithEntities(e)},s.createFromBlockArray=function(e,t){var i=Array.isArray(e)?e:e.contentBlocks,n=r.createFromArray(i),o=n.isEmpty()?new h:h.createEmpty(n.first().getKey());return new s({blockMap:n,entityMap:t||c,selectionBefore:o,selectionAfter:o})},s.createFromText=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:/\r\n?|\n/g,i=e.split(t).map(function(e){return e=f(e),new w({key:d(),text:e,type:"unstyled",characterList:m(y(o.EMPTY,e.length))})});return s.createFromBlockArray(i)},s.fromJS=function(e){return new s(n({},e,{blockMap:b(e.blockMap).map(s.createContentBlockFromJS),selectionBefore:new h(e.selectionBefore),selectionAfter:new h(e.selectionAfter)}))},s.createContentBlockFromJS=function(e){var t=e.characterList;return new w(n({},e,{data:C(e.data),characterList:null!=t?m((Array.isArray(t)?t:u(t)).map(function(e){return o.fromJS(e)})):void 0}))},s}(S);e.exports=x},61773(e,t,i){"use strict";var n=i(41671),s=i(21829).Map,r={add:function(e,t,i){return o(e,t,i,!0)},remove:function(e,t,i){return o(e,t,i,!1)}};function o(e,t,i,r){var o=e.getBlockMap(),a=t.getStartKey(),l=t.getStartOffset(),c=t.getEndKey(),h=t.getEndOffset(),d=o.skipUntil(function(e,t){return t===a}).takeUntil(function(e,t){return t===c}).concat(s([[c,o.get(c)]])).map(function(e,t){var s,o;a===c?(s=l,o=h):(s=t===a?l:0,o=t===c?h:e.getLength());for(var d,u=e.getCharacterList();s<o;)d=u.get(s),u=u.set(s,r?n.applyStyle(d,i):n.removeStyle(d,i)),s++;return e.set("characterList",u)});return e.merge({blockMap:o.merge(d),selectionBefore:t,selectionAfter:t})}e.exports=r},94199(e,t,i){"use strict";function n(e,t,i){return t in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,e}var s=i(63390),r=i(65461),o=i(82826),a=i(21829),l=i(40041),c=i(25813),h=a.Map,d={subtree:!0,characterData:!0,childList:!0,characterDataOldValue:!1,attributes:!1},u=s.isBrowser("IE <= 11"),p=function(){function e(e){var t=this;n(this,"observer",void 0),n(this,"container",void 0),n(this,"mutations",void 0),n(this,"onCharData",void 0),this.container=e,this.mutations=h();var i=o(e);i.MutationObserver&&!u?this.observer=new i.MutationObserver(function(e){return t.registerMutations(e)}):this.onCharData=function(e){e.target instanceof Node||l(!1),t.registerMutation({type:"characterData",target:e.target})}}var t=e.prototype;return t.start=function(){this.observer?this.observer.observe(this.container,d):this.container.addEventListener("DOMCharacterDataModified",this.onCharData)},t.stopAndFlushMutations=function(){var e=this.observer;e?(this.registerMutations(e.takeRecords()),e.disconnect()):this.container.removeEventListener("DOMCharacterDataModified",this.onCharData);var t=this.mutations;return this.mutations=h(),t},t.registerMutations=function(e){for(var t=0;t<e.length;t++)this.registerMutation(e[t])},t.getMutationTextContent=function(e){var t=e.type,i=e.target,n=e.removedNodes;if("characterData"===t){if(""!==i.textContent)return u?i.textContent.replace("\n",""):i.textContent}else if("childList"===t){if(n&&n.length)return"";if(""!==i.textContent)return i.textContent}return null},t.registerMutation=function(e){var t=this.getMutationTextContent(e);if(null!=t){var i=c(r(e.target));this.mutations=this.mutations.set(i,t)}},e}();e.exports=p},47904(e,t,i){"use strict";var n=i(22155),s=i(22978),r=(0,i(21829).Map)({"header-one":{element:"h1"},"header-two":{element:"h2"},"header-three":{element:"h3"},"header-four":{element:"h4"},"header-five":{element:"h5"},"header-six":{element:"h6"},section:{element:"section"},article:{element:"article"},"unordered-list-item":{element:"li",wrapper:n.createElement("ul",{className:s("public/DraftStyleDefault/ul")})},"ordered-list-item":{element:"li",wrapper:n.createElement("ol",{className:s("public/DraftStyleDefault/ol")})},blockquote:{element:"blockquote"},atomic:{element:"figure"},"code-block":{element:"pre",wrapper:n.createElement("pre",{className:s("public/DraftStyleDefault/pre")})},unstyled:{element:"div",aliasedElements:["p"]}});e.exports=r},55175(e){"use strict";e.exports={BOLD:{fontWeight:"bold"},CODE:{fontFamily:"monospace",wordWrap:"break-word"},ITALIC:{fontStyle:"italic"},STRIKETHROUGH:{textDecoration:"line-through"},UNDERLINE:{textDecoration:"underline"}}},53506(e,t,i){"use strict";var n=i(86858),s=i(84433),r=i(41671),o=i(9294),a=i(40643),l=i(23315),c=i(47904),h=i(55175),d=i(13162),u=i(92063),p=i(70873),g=i(58267),f=i(72066),m=i(59539),v=i(8117),y=i(79198),C=i(75969),b=i(27442),S=i(93613),w=i(12503),x=i(12634),E=i(93564),M=i(50531),A={Editor:d,EditorBlock:u,EditorState:m,CompositeDecorator:o,Entity:p,EntityInstance:f,BlockMapBuilder:s,CharacterMetadata:r,ContentBlock:a,ContentState:l,RawDraftContentState:y,SelectionState:b,AtomicBlockUtils:n,KeyBindingUtil:v,Modifier:g,RichUtils:C,DefaultDraftBlockRenderMap:c,DefaultDraftInlineStyle:h,convertFromHTML:i(86739),convertFromRaw:w,convertToRaw:S,genKey:x,getDefaultKeyBinding:E,getVisibleSelectionRect:M};e.exports=A},13162(e,t,i){"use strict";var n=i(46084);function s(){return s=n||function(e){for(var t=1;t<arguments.length;t++){var i=arguments[t];for(var n in i)Object.prototype.hasOwnProperty.call(i,n)&&(e[n]=i[n])}return e},s.apply(this,arguments)}function r(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{},n=Object.keys(i);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(i).filter(function(e){return Object.getOwnPropertyDescriptor(i,e).enumerable}))),n.forEach(function(t){a(e,t,i[t])})}return e}function o(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function a(e,t,i){return t in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,e}function l(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}var c=i(47904),h=i(55175),d=i(60913),u=i(74804),p=i(38001),g=i(51163),f=i(94951),m=i(12803),v=i(7618),y=i(59539),C=i(22155),b=i(72528),S=i(98556),w=i(63390),x=i(22978),E=i(12634),M=i(93564),A=i(93987),T=i(17595),D=i(40041),I=i(44110),R=i(25813),L=w.isBrowser("IE"),k=!L,P={edit:g,composite:d,drag:p,cut:null,render:null},N=!1,O=function(e){function t(){return e.apply(this,arguments)||this}l(t,e);var i=t.prototype;return i.render=function(){return null},i.componentDidMount=function(){this._update()},i.componentDidUpdate=function(){this._update()},i._update=function(){var e=this.props.editor;e._latestEditorState=this.props.editorState,e._blockSelectEvents=!0},t}(C.Component),_=function(e){function t(t){var i;return a(o(i=e.call(this,t)||this),"_blockSelectEvents",void 0),a(o(i),"_clipboard",void 0),a(o(i),"_handler",void 0),a(o(i),"_dragCount",void 0),a(o(i),"_internalDrag",void 0),a(o(i),"_editorKey",void 0),a(o(i),"_placeholderAccessibilityID",void 0),a(o(i),"_latestEditorState",void 0),a(o(i),"_latestCommittedEditorState",void 0),a(o(i),"_pendingStateFromBeforeInput",void 0),a(o(i),"_onBeforeInput",void 0),a(o(i),"_onBlur",void 0),a(o(i),"_onCharacterData",void 0),a(o(i),"_onCompositionEnd",void 0),a(o(i),"_onCompositionStart",void 0),a(o(i),"_onCopy",void 0),a(o(i),"_onCut",void 0),a(o(i),"_onDragEnd",void 0),a(o(i),"_onDragOver",void 0),a(o(i),"_onDragStart",void 0),a(o(i),"_onDrop",void 0),a(o(i),"_onInput",void 0),a(o(i),"_onFocus",void 0),a(o(i),"_onKeyDown",void 0),a(o(i),"_onKeyPress",void 0),a(o(i),"_onKeyUp",void 0),a(o(i),"_onMouseDown",void 0),a(o(i),"_onMouseUp",void 0),a(o(i),"_onPaste",void 0),a(o(i),"_onSelect",void 0),a(o(i),"editor",void 0),a(o(i),"editorContainer",void 0),a(o(i),"focus",void 0),a(o(i),"blur",void 0),a(o(i),"setMode",void 0),a(o(i),"exitCurrentMode",void 0),a(o(i),"restoreEditorDOM",void 0),a(o(i),"setClipboard",void 0),a(o(i),"getClipboard",void 0),a(o(i),"getEditorKey",void 0),a(o(i),"update",void 0),a(o(i),"onDragEnter",void 0),a(o(i),"onDragLeave",void 0),a(o(i),"_handleEditorContainerRef",function(e){i.editorContainer=e,i.editor=null!==e?e.firstChild:null}),a(o(i),"focus",function(e){var t=i.props.editorState,n=t.getSelection().getHasFocus(),s=i.editor;if(s){var r=S.getScrollParent(s),o=e||A(r),a=o.x,l=o.y;I(s)||D(!1),s.focus(),r===window?window.scrollTo(a,l):b.setTop(r,l),n||i.update(y.forceSelection(t,t.getSelection()))}}),a(o(i),"blur",function(){var e=i.editor;e&&(I(e)||D(!1),e.blur())}),a(o(i),"setMode",function(e){var t=i.props,n=t.onPaste,s=t.onCut,o=t.onCopy,a=r({},P.edit);n&&(a.onPaste=n),s&&(a.onCut=s),o&&(a.onCopy=o);var l=r({},P,{edit:a});i._handler=l[e]}),a(o(i),"exitCurrentMode",function(){i.setMode("edit")}),a(o(i),"restoreEditorDOM",function(e){i.setState({contentsKey:i.state.contentsKey+1},function(){i.focus(e)})}),a(o(i),"setClipboard",function(e){i._clipboard=e}),a(o(i),"getClipboard",function(){return i._clipboard}),a(o(i),"update",function(e){i._latestEditorState=e,i.props.onChange(e)}),a(o(i),"onDragEnter",function(){i._dragCount++}),a(o(i),"onDragLeave",function(){i._dragCount--,0===i._dragCount&&i.exitCurrentMode()}),i._blockSelectEvents=!1,i._clipboard=null,i._handler=null,i._dragCount=0,i._editorKey=t.editorKey||E(),i._placeholderAccessibilityID="placeholder-"+i._editorKey,i._latestEditorState=t.editorState,i._latestCommittedEditorState=t.editorState,i._onBeforeInput=i._buildHandler("onBeforeInput"),i._onBlur=i._buildHandler("onBlur"),i._onCharacterData=i._buildHandler("onCharacterData"),i._onCompositionEnd=i._buildHandler("onCompositionEnd"),i._onCompositionStart=i._buildHandler("onCompositionStart"),i._onCopy=i._buildHandler("onCopy"),i._onCut=i._buildHandler("onCut"),i._onDragEnd=i._buildHandler("onDragEnd"),i._onDragOver=i._buildHandler("onDragOver"),i._onDragStart=i._buildHandler("onDragStart"),i._onDrop=i._buildHandler("onDrop"),i._onInput=i._buildHandler("onInput"),i._onFocus=i._buildHandler("onFocus"),i._onKeyDown=i._buildHandler("onKeyDown"),i._onKeyPress=i._buildHandler("onKeyPress"),i._onKeyUp=i._buildHandler("onKeyUp"),i._onMouseDown=i._buildHandler("onMouseDown"),i._onMouseUp=i._buildHandler("onMouseUp"),i._onPaste=i._buildHandler("onPaste"),i._onSelect=i._buildHandler("onSelect"),i.getEditorKey=function(){return i._editorKey},i.state={contentsKey:0},i}l(t,e);var n=t.prototype;return n._buildHandler=function(e){var t=this;return function(i){if(!t.props.readOnly){var n=t._handler&&t._handler[e];n&&(f?f(function(){return n(t,i)}):n(t,i))}}},n._showPlaceholder=function(){return!!this.props.placeholder&&!this.props.editorState.isInCompositionMode()&&!this.props.editorState.getCurrentContent().hasText()},n._renderPlaceholder=function(){if(this._showPlaceholder()){var e={text:R(this.props.placeholder),editorState:this.props.editorState,textAlignment:this.props.textAlignment,accessibilityID:this._placeholderAccessibilityID};return C.createElement(m,e)}return null},n._renderARIADescribedBy=function(){var e=this.props.ariaDescribedBy||"",t=this._showPlaceholder()?this._placeholderAccessibilityID:"";return e.replace("{{editor_id_placeholder}}",t)||void 0},n.render=function(){var e=this.props,t=e.blockRenderMap,i=e.blockRendererFn,n=e.blockStyleFn,o=e.customStyleFn,a=e.customStyleMap,l=e.editorState,c=e.preventScroll,d=e.readOnly,p=e.textAlignment,g=e.textDirectionality,f=x({"DraftEditor/root":!0,"DraftEditor/alignLeft":"left"===p,"DraftEditor/alignRight":"right"===p,"DraftEditor/alignCenter":"center"===p}),m=this.props.role||"textbox",v="combobox"===m?!!this.props.ariaExpanded:null,y={blockRenderMap:t,blockRendererFn:i,blockStyleFn:n,customStyleMap:r({},h,a),customStyleFn:o,editorKey:this._editorKey,editorState:l,preventScroll:c,textDirectionality:g};return C.createElement("div",{className:f},this._renderPlaceholder(),C.createElement("div",{className:x("DraftEditor/editorContainer"),ref:this._handleEditorContainerRef},C.createElement("div",{"aria-activedescendant":d?null:this.props.ariaActiveDescendantID,"aria-autocomplete":d?null:this.props.ariaAutoComplete,"aria-controls":d?null:this.props.ariaControls,"aria-describedby":this._renderARIADescribedBy(),"aria-expanded":d?null:v,"aria-label":this.props.ariaLabel,"aria-labelledby":this.props.ariaLabelledBy,"aria-multiline":this.props.ariaMultiline,"aria-owns":d?null:this.props.ariaOwneeID,autoCapitalize:this.props.autoCapitalize,autoComplete:this.props.autoComplete,autoCorrect:this.props.autoCorrect,className:x({notranslate:!d,"public/DraftEditor/content":!0}),contentEditable:!d,"data-testid":this.props.webDriverTestID,onBeforeInput:this._onBeforeInput,onBlur:this._onBlur,onCompositionEnd:this._onCompositionEnd,onCompositionStart:this._onCompositionStart,onCopy:this._onCopy,onCut:this._onCut,onDragEnd:this._onDragEnd,onDragEnter:this.onDragEnter,onDragLeave:this.onDragLeave,onDragOver:this._onDragOver,onDragStart:this._onDragStart,onDrop:this._onDrop,onFocus:this._onFocus,onInput:this._onInput,onKeyDown:this._onKeyDown,onKeyPress:this._onKeyPress,onKeyUp:this._onKeyUp,onMouseUp:this._onMouseUp,onPaste:this._onPaste,onSelect:this._onSelect,ref:this.props.editorRef,role:d?null:m,spellCheck:k&&this.props.spellCheck,style:{outline:"none",userSelect:"text",WebkitUserSelect:"text",whiteSpace:"pre-wrap",wordWrap:"break-word"},suppressContentEditableWarning:!0,tabIndex:this.props.tabIndex},C.createElement(O,{editor:this,editorState:l}),C.createElement(u,s({},y,{key:"contents"+this.state.contentsKey})))))},n.componentDidMount=function(){this._blockSelectEvents=!1,!N&&T("draft_ods_enabled")&&(N=!0,v.initODS()),this.setMode("edit"),L&&(this.editor?this.editor.ownerDocument.execCommand("AutoUrlDetect",!1,!1):i.g.execCommand("AutoUrlDetect",!1,!1))},n.componentDidUpdate=function(){this._blockSelectEvents=!1,this._latestEditorState=this.props.editorState,this._latestCommittedEditorState=this.props.editorState},t}(C.Component);a(_,"defaultProps",{ariaDescribedBy:"{{editor_id_placeholder}}",blockRenderMap:c,blockRendererFn:function(){return null},blockStyleFn:function(){return""},keyBindingFn:M,readOnly:!1,spellCheck:!1,stripPastedStyles:!1}),e.exports=_},92063(e,t,i){"use strict";var n=i(46084);function s(){return s=n||function(e){for(var t=1;t<arguments.length;t++){var i=arguments[t];for(var n in i)Object.prototype.hasOwnProperty.call(i,n)&&(e[n]=i[n])}return e},s.apply(this,arguments)}var r=i(49162),o=i(13878),a=i(22155),l=i(72528),c=i(98556),h=i(46616),d=i(76675),u=i(22978),p=i(5026),g=i(93987),f=i(68982),m=i(40041),v=i(44110),y=i(25813),C=function(e,t){return e.getAnchorKey()===t||e.getFocusKey()===t},b=function(e){var t,i;function n(){for(var t,i,n,s,r=arguments.length,o=new Array(r),a=0;a<r;a++)o[a]=arguments[a];return s=void 0,(n="_node")in(i=function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(t=e.call.apply(e,[this].concat(o))||this))?Object.defineProperty(i,n,{value:s,enumerable:!0,configurable:!0,writable:!0}):i[n]=s,t}i=e,(t=n).prototype=Object.create(i.prototype),t.prototype.constructor=t,t.__proto__=i;var b=n.prototype;return b.shouldComponentUpdate=function(e){return this.props.block!==e.block||this.props.tree!==e.tree||this.props.direction!==e.direction||C(e.selection,e.block.getKey())&&e.forceSelection},b.componentDidMount=function(){if(!this.props.preventScroll){var e=this.props.selection,t=e.getEndKey();if(e.getHasFocus()&&t===this.props.block.getKey()){var i=this._node;if(null!=i){var n,s=c.getScrollParent(i),r=g(s);if(s===window){var o=p(i);(n=o.y+o.height-f().height)>0&&window.scrollTo(r.x,r.y+n+10)}else v(i)||m(!1),(n=i.offsetHeight+i.offsetTop-(s.offsetTop+s.offsetHeight+r.y))>0&&l.setTop(s,l.getTop(s)+n+10)}}}},b._renderChildren=function(){var e=this,t=this.props.block,i=t.getKey(),n=t.getText(),l=this.props.tree.size-1,c=C(this.props.selection,i);return this.props.tree.map(function(u,p){var g=u.get("leaves");if(0===g.size)return null;var f=g.size-1,m=g.map(function(s,h){var d=o.encode(i,p,h),u=s.get("start"),g=s.get("end");return a.createElement(r,{key:d,offsetKey:d,block:t,start:u,selection:c?e.props.selection:null,forceSelection:e.props.forceSelection,text:n.slice(u,g),styleSet:t.getInlineStyleAt(u),customStyleMap:e.props.customStyleMap,customStyleFn:e.props.customStyleFn,isLast:p===l&&h===f})}).toArray(),v=u.get("decoratorKey");if(null==v)return m;if(!e.props.decorator)return m;var C=y(e.props.decorator),b=C.getComponentForKey(v);if(!b)return m;var S=C.getPropsForKey(v),w=o.encode(i,p,0),x=g.first().get("start"),E=g.last().get("end"),M=n.slice(x,E),A=t.getEntityAt(u.get("start")),T=d.getHTMLDirIfDifferent(h.getDirection(M),e.props.direction),D={contentState:e.props.contentState,decoratedText:M,dir:T,start:x,end:E,blockKey:i,entityKey:A,offsetKey:w};return a.createElement(b,s({},S,D,{key:w}),m)}).toArray()},b.render=function(){var e=this,t=this.props,i=t.direction,n=t.offsetKey,s=u({"public/DraftStyleDefault/block":!0,"public/DraftStyleDefault/ltr":"LTR"===i,"public/DraftStyleDefault/rtl":"RTL"===i});return a.createElement("div",{"data-offset-key":n,className:s,ref:function(t){return e._node=t}},this._renderChildren())},n}(a.Component);e.exports=b},35063(e,t,i){"use strict";var n=i(46084);function s(){return s=n||function(e){for(var t=1;t<arguments.length;t++){var i=arguments[t];for(var n in i)Object.prototype.hasOwnProperty.call(i,n)&&(e[n]=i[n])}return e},s.apply(this,arguments)}function r(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{},n=Object.keys(i);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(i).filter(function(e){return Object.getOwnPropertyDescriptor(i,e).enumerable}))),n.forEach(function(t){o(e,t,i[t])})}return e}function o(e,t,i){return t in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,e}var a=i(92694),l=i(13878),c=i(22155),h=i(72528),d=i(98556),u=i(5026),p=i(93987),g=i(68982),f=i(21829),m=i(40041),v=i(44110),y=(f.List,function(e,t){return e.getAnchorKey()===t||e.getFocusKey()===t}),C=function(e,t){var i=t.get(e.getType())||t.get("unstyled"),n=i.wrapper;return{Element:i.element||t.get("unstyled").element,wrapperTemplate:n}},b=function(e,t){var i=t(e);return i?{CustomComponent:i.component,customProps:i.props,customEditable:i.editable}:{}},S=function(e,t,i,n,s,o){var a={"data-block":!0,"data-editor":t,"data-offset-key":i,key:e.getKey(),ref:o},l=n(e);return l&&(a.className=l),void 0!==s.customEditable&&(a=r({},a,{contentEditable:s.customEditable,suppressContentEditableWarning:!0})),a},w=function(e){var t,i;function n(){for(var t,i=arguments.length,n=new Array(i),s=0;s<i;s++)n[s]=arguments[s];return o(function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(t=e.call.apply(e,[this].concat(n))||this),"wrapperRef",c.createRef()),t}i=e,(t=n).prototype=Object.create(i.prototype),t.prototype.constructor=t,t.__proto__=i;var f=n.prototype;return f.shouldComponentUpdate=function(e){var t=this.props,i=t.block,n=t.direction,s=t.tree,r=!i.getChildKeys().isEmpty(),o=i!==e.block||s!==e.tree||n!==e.direction||y(e.selection,e.block.getKey())&&e.forceSelection;return r||o},f.componentDidMount=function(){var e=this.props.selection,t=e.getEndKey();if(e.getHasFocus()&&t===this.props.block.getKey()){var i=this.wrapperRef.current;if(i){var n,s=d.getScrollParent(i),r=p(s);if(s===window){var o=u(i);(n=o.y+o.height-g().height)>0&&window.scrollTo(r.x,r.y+n+10)}else{v(i)||m(!1);var a=i;(n=a.offsetHeight+a.offsetTop-(s.offsetHeight+r.y))>0&&h.setTop(s,h.getTop(s)+n+10)}}}},f.render=function(){var e=this,t=this.props,i=t.block,o=t.blockRenderMap,h=t.blockRendererFn,d=t.blockStyleFn,u=t.contentState,p=t.decorator,g=t.editorKey,f=t.editorState,m=t.customStyleFn,v=t.customStyleMap,w=t.direction,x=t.forceSelection,E=t.selection,M=t.tree,A=null;i.children.size&&(A=i.children.reduce(function(t,i){var s=l.encode(i,0,0),a=u.getBlockForKey(i),p=b(a,h),m=p.CustomComponent||n,v=C(a,o),y=v.Element,w=v.wrapperTemplate,x=S(a,g,s,d,p,null),E=r({},e.props,{tree:f.getBlockTree(i),blockProps:p.customProps,offsetKey:s,block:a});return t.push(c.createElement(y,x,c.createElement(m,E))),!w||function(e,t){var i=e.getNextSiblingKey();return!!i&&t.getBlockForKey(i).getType()===e.getType()}(a,u)||function(e,t,i){var n=[],s=!0,r=!1,o=void 0;try{for(var a,h=i.reverse()[Symbol.iterator]();!(s=(a=h.next()).done);s=!0){var d=a.value;if(d.type!==t)break;n.push(d)}}catch(e){r=!0,o=e}finally{try{s||null==h.return||h.return()}finally{if(r)throw o}}i.splice(i.indexOf(n[0]),n.length+1);var u=n.reverse(),p=u[0].key;i.push(c.cloneElement(e,{key:"".concat(p,"-wrap"),"data-offset-key":l.encode(p,0,0)},u))}(w,y,t),t},[]));var T=i.getKey(),D=l.encode(T,0,0),I=b(i,h),R=I.CustomComponent,L=null!=R?c.createElement(R,s({},this.props,{tree:f.getBlockTree(T),blockProps:I.customProps,offsetKey:D,block:i})):c.createElement(a,{block:i,children:A,contentState:u,customStyleFn:m,customStyleMap:v,decorator:p,direction:w,forceSelection:x,hasSelection:y(E,T),selection:E,tree:M});if(i.getParentKey())return L;var k=C(i,o).Element,P=S(i,g,D,d,I,this.wrapperRef);return c.createElement(k,P,L)},n}(c.Component);e.exports=w},60913(e,t,i){"use strict";var n=i(94199),s=i(58267),r=i(13878),o=i(59539),a=i(4617),l=i(63390),c=i(10292),h=i(71093),d=i(15801),u=i(60836),p=i(25813),g=l.isBrowser("IE"),f=!1,m=!1,v=null,y={onCompositionStart:function(e){m=!0,function(e){v||(v=new n(h(e))).start()}(e)},onCompositionEnd:function(e){f=!1,m=!1,setTimeout(function(){f||y.resolveComposition(e)},20)},onSelect:c,onKeyDown:function(e,t){if(!m)return y.resolveComposition(e),void e._onKeyDown(t);t.which!==a.RIGHT&&t.which!==a.LEFT||t.preventDefault()},onKeyPress:function(e,t){t.which===a.RETURN&&t.preventDefault()},resolveComposition:function(e){if(!m){var t=p(v).stopAndFlushMutations();v=null,f=!0;var i=o.set(e._latestEditorState,{inCompositionMode:!1});if(e.exitCurrentMode(),t.size){var n=i.getCurrentContent();t.forEach(function(e,t){var a=r.decode(t),l=a.blockKey,c=a.decoratorKey,h=a.leafKey,d=i.getBlockTree(l).getIn([c,"leaves",h]),p=d.start,g=d.end,f=i.getSelection().merge({anchorKey:l,focusKey:l,anchorOffset:p,focusOffset:g,isBackward:!1}),m=u(n,f),v=n.getBlockForKey(l).getInlineStyleAt(p);n=s.replaceText(n,f,e,v,m),i=o.set(i,{currentContent:n})});var a=d(i,h(e)).selectionState;e.restoreEditorDOM();var l=g?o.forceSelection(i,a):o.acceptSelection(i,a);e.update(o.push(l,n,"insert-characters"))}else e.update(i)}}};e.exports=y},47672(e,t,i){"use strict";var n=i(46084);function s(){return s=n||function(e){for(var t=1;t<arguments.length;t++){var i=arguments[t];for(var n in i)Object.prototype.hasOwnProperty.call(i,n)&&(e[n]=i[n])}return e},s.apply(this,arguments)}function r(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{},n=Object.keys(i);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(i).filter(function(e){return Object.getOwnPropertyDescriptor(i,e).enumerable}))),n.forEach(function(t){o(e,t,i[t])})}return e}function o(e,t,i){return t in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,e}var a=i(92063),l=i(13878),c=i(22155),h=i(22978),d=i(66145),u=i(25813),p=function(e,t,i,n){return h({"public/DraftStyleDefault/unorderedListItem":"unordered-list-item"===e,"public/DraftStyleDefault/orderedListItem":"ordered-list-item"===e,"public/DraftStyleDefault/reset":i,"public/DraftStyleDefault/depth0":0===t,"public/DraftStyleDefault/depth1":1===t,"public/DraftStyleDefault/depth2":2===t,"public/DraftStyleDefault/depth3":3===t,"public/DraftStyleDefault/depth4":t>=4,"public/DraftStyleDefault/listLTR":"LTR"===n,"public/DraftStyleDefault/listRTL":"RTL"===n})},g=function(e){var t,i;function n(){return e.apply(this,arguments)||this}i=e,(t=n).prototype=Object.create(i.prototype),t.prototype.constructor=t,t.__proto__=i;var o=n.prototype;return o.shouldComponentUpdate=function(e){var t=this.props.editorState,i=e.editorState;if(t.getDirectionMap()!==i.getDirectionMap())return!0;if(t.getSelection().getHasFocus()!==i.getSelection().getHasFocus())return!0;var n=i.getNativelyRenderedContent(),s=t.isInCompositionMode(),r=i.isInCompositionMode();if(t===i||null!==n&&i.getCurrentContent()===n||s&&r)return!1;var o=t.getCurrentContent(),a=i.getCurrentContent(),l=t.getDecorator(),c=i.getDecorator();return s!==r||o!==a||l!==c||i.mustForceSelection()},o.render=function(){for(var e=this.props,t=e.blockRenderMap,i=e.blockRendererFn,n=e.blockStyleFn,o=e.customStyleMap,h=e.customStyleFn,g=e.editorState,f=e.editorKey,m=e.preventScroll,v=e.textDirectionality,y=g.getCurrentContent(),C=g.getSelection(),b=g.mustForceSelection(),S=g.getDecorator(),w=u(g.getDirectionMap()),x=y.getBlocksAsArray(),E=[],M=null,A=null,T=0;T<x.length;T++){var D=x[T],I=D.getKey(),R=D.getType(),L=i(D),k=void 0,P=void 0,N=void 0;L&&(k=L.component,P=L.props,N=L.editable);var O=v||w.get(I),_=l.encode(I,0,0),F={contentState:y,block:D,blockProps:P,blockStyleFn:n,customStyleMap:o,customStyleFn:h,decorator:S,direction:O,forceSelection:b,offsetKey:_,preventScroll:m,selection:C,tree:g.getBlockTree(I)},G=t.get(R)||t.get("unstyled"),V=G.wrapper,B=G.element||t.get("unstyled").element,H=D.getDepth(),z="";n&&(z=n(D)),"li"===B&&(z=d(z,p(R,H,A!==V||null===M||H>M,O)));var U=k||a,W={className:z,"data-block":!0,"data-editor":f,"data-offset-key":_,key:I};void 0!==N&&(W=r({},W,{contentEditable:N,suppressContentEditableWarning:!0}));var j=c.createElement(B,W,c.createElement(U,s({},F,{key:I})));E.push({block:j,wrapperTemplate:V,key:I,offsetKey:_}),M=V?D.getDepth():null,A=V}for(var K=[],$=0;$<E.length;){var Y=E[$];if(Y.wrapperTemplate){var q=[];do{q.push(E[$].block),$++}while($<E.length&&E[$].wrapperTemplate===Y.wrapperTemplate);var X=c.cloneElement(Y.wrapperTemplate,{key:Y.key+"-wrap","data-offset-key":Y.offsetKey},q);K.push(X)}else K.push(Y.block),$++}return c.createElement("div",{"data-contents":"true"},K)},n}(c.Component);e.exports=g},74804(e,t,i){"use strict";var n=i(17595)("draft_tree_data_support");e.exports=i(n?88074:47672)},88074(e,t,i){"use strict";var n=i(46084);function s(){return s=n||function(e){for(var t=1;t<arguments.length;t++){var i=arguments[t];for(var n in i)Object.prototype.hasOwnProperty.call(i,n)&&(e[n]=i[n])}return e},s.apply(this,arguments)}var r=i(35063),o=i(13878),a=i(22155),l=i(25813),c=function(e){var t,i;function n(){return e.apply(this,arguments)||this}i=e,(t=n).prototype=Object.create(i.prototype),t.prototype.constructor=t,t.__proto__=i;var c=n.prototype;return c.shouldComponentUpdate=function(e){var t=this.props.editorState,i=e.editorState;if(t.getDirectionMap()!==i.getDirectionMap())return!0;if(t.getSelection().getHasFocus()!==i.getSelection().getHasFocus())return!0;var n=i.getNativelyRenderedContent(),s=t.isInCompositionMode(),r=i.isInCompositionMode();if(t===i||null!==n&&i.getCurrentContent()===n||s&&r)return!1;var o=t.getCurrentContent(),a=i.getCurrentContent(),l=t.getDecorator(),c=i.getDecorator();return s!==r||o!==a||l!==c||i.mustForceSelection()},c.render=function(){for(var e=this.props,t=e.blockRenderMap,i=e.blockRendererFn,n=e.blockStyleFn,c=e.customStyleMap,h=e.customStyleFn,d=e.editorState,u=e.editorKey,p=e.textDirectionality,g=d.getCurrentContent(),f=d.getSelection(),m=d.mustForceSelection(),v=d.getDecorator(),y=l(d.getDirectionMap()),C=[],b=g.getBlocksAsArray()[0];b;){var S=b.getKey(),w={blockRenderMap:t,blockRendererFn:i,blockStyleFn:n,contentState:g,customStyleFn:h,customStyleMap:c,decorator:v,editorKey:u,editorState:d,forceSelection:m,selection:f,block:b,direction:p||y.get(S),tree:d.getBlockTree(S)},x=(t.get(b.getType())||t.get("unstyled")).wrapper;C.push({block:a.createElement(r,s({key:S},w)),wrapperTemplate:x,key:S,offsetKey:o.encode(S,0,0)});var E=b.getNextSiblingKey();b=E?g.getBlockForKey(E):null}for(var M=[],A=0;A<C.length;){var T=C[A];if(T.wrapperTemplate){var D=[];do{D.push(C[A].block),A++}while(A<C.length&&C[A].wrapperTemplate===T.wrapperTemplate);var I=a.cloneElement(T.wrapperTemplate,{key:T.key+"-wrap","data-offset-key":T.offsetKey},D);M.push(I)}else M.push(T.block),A++}return a.createElement("div",{"data-contents":"true"},M)},n}(a.Component);e.exports=c},859(e,t,i){"use strict";var n=i(46084);function s(){return s=n||function(e){for(var t=1;t<arguments.length;t++){var i=arguments[t];for(var n in i)Object.prototype.hasOwnProperty.call(i,n)&&(e[n]=i[n])}return e},s.apply(this,arguments)}var r=i(13878),o=i(22155),a=i(46616),l=i(76675),c=function(e){var t,i;function n(){return e.apply(this,arguments)||this}return i=e,(t=n).prototype=Object.create(i.prototype),t.prototype.constructor=t,t.__proto__=i,n.prototype.render=function(){var e=this.props,t=e.block,i=e.children,n=e.contentState,c=e.decorator,h=e.decoratorKey,d=e.direction,u=e.leafSet,p=e.text,g=t.getKey(),f=u.get("leaves"),m=c.getComponentForKey(h),v=c.getPropsForKey(h),y=r.encode(g,parseInt(h,10),0),C=p.slice(f.first().get("start"),f.last().get("end")),b=l.getHTMLDirIfDifferent(a.getDirection(C),d);return o.createElement(m,s({},v,{contentState:n,decoratedText:C,dir:b,key:y,entityKey:t.getEntityAt(u.get("start")),offsetKey:y}),i)},n}(o.Component);e.exports=c},38001(e,t,i){"use strict";var n=i(81354),s=i(58267),r=i(59539),o=i(65461),a=i(82097),l=i(27786),c=i(69397),h=i(82826),d=i(46415),u=i(25813),p={onDragEnd:function(e){e.exitCurrentMode(),g(e)},onDrop:function(e,t){var i=new n(t.nativeEvent.dataTransfer),h=e._latestEditorState,p=function(e,t){var i=null,n=null,s=a(e.currentTarget);if("function"==typeof s.caretRangeFromPoint){var r=s.caretRangeFromPoint(e.x,e.y);i=r.startContainer,n=r.startOffset}else{if(!e.rangeParent)return null;i=e.rangeParent,n=e.rangeOffset}i=u(i),n=u(n);var l=u(o(i));return c(t,l,n,l,n)}(t.nativeEvent,h);if(t.preventDefault(),e._dragCount=0,e.exitCurrentMode(),null!=p){var m=i.getFiles();if(m.length>0){if(e.props.handleDroppedFiles&&d(e.props.handleDroppedFiles(p,m)))return;l(m,function(t){t&&e.update(f(h,p,t))})}else{var v=e._internalDrag?"internal":"external";e.props.handleDrop&&d(e.props.handleDrop(p,i,v))||(e._internalDrag?e.update(function(e,t){var i=s.moveText(e.getCurrentContent(),e.getSelection(),t);return r.push(e,i,"insert-fragment")}(h,p)):e.update(f(h,p,i.getText()))),g(e)}}}};function g(e){e._internalDrag=!1;var t=e.editorContainer;if(t){var i=new MouseEvent("mouseup",{view:h(t),bubbles:!0,cancelable:!0});t.dispatchEvent(i)}}function f(e,t,i){var n=s.insertText(e.getCurrentContent(),t,i,e.getCurrentInlineStyle());return r.push(e,n,"insert-fragment")}e.exports=p},51163(e,t,i){"use strict";var n=i(63390),s=i(45995),r=i(23717),o=i(46438),a=i(78073),l=i(43046),c=i(76100),h=i(92244),d=i(38514),u=i(29830),p=i(41345),g=i(35346),f=i(10292),m=n.isBrowser("Chrome"),v=n.isBrowser("Firefox"),y=m||v?f:function(e){},C={onBeforeInput:s,onBlur:r,onCompositionStart:o,onCopy:a,onCut:l,onDragOver:c,onDragStart:h,onFocus:d,onInput:u,onKeyDown:p,onPaste:g,onSelect:f,onMouseUp:y,onKeyUp:y};e.exports=C},94951(e,t,i){"use strict";var n=i(70316).unstable_flushControlled;e.exports=n},49162(e,t,i){"use strict";var n=i(46084),s=i(5413),r=i(22155),o=i(40041),a=i(4734),l=i(90933).setDraftEditorSelection,c=function(e){var t,i;function c(){for(var t,i,n,s,r=arguments.length,o=new Array(r),a=0;a<r;a++)o[a]=arguments[a];return s=void 0,(n="leaf")in(i=function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(t=e.call.apply(e,[this].concat(o))||this))?Object.defineProperty(i,n,{value:s,enumerable:!0,configurable:!0,writable:!0}):i[n]=s,t}i=e,(t=c).prototype=Object.create(i.prototype),t.prototype.constructor=t,t.__proto__=i;var h=c.prototype;return h._setSelection=function(){var e=this.props.selection;if(null!=e&&e.getHasFocus()){var t=this.props,i=t.block,n=t.start,s=t.text,r=i.getKey(),c=n+s.length;if(e.hasEdgeWithin(r,n,c)){var h=this.leaf;h||o(!1);var d,u=h.firstChild;u||o(!1),u.nodeType===Node.TEXT_NODE?d=u:a(u)?d=h:(d=u.firstChild)||o(!1),l(e,d,r,n,c)}}},h.shouldComponentUpdate=function(e){var t=this.leaf;return t||o(!1),t.textContent!==e.text||e.styleSet!==this.props.styleSet||e.forceSelection},h.componentDidUpdate=function(){this._setSelection()},h.componentDidMount=function(){this._setSelection()},h.render=function(){var e=this,t=this.props.block,i=this.props.text;i.endsWith("\n")&&this.props.isLast&&(i+="\n");var o=this.props,a=o.customStyleMap,l=o.customStyleFn,c=o.offsetKey,h=o.styleSet,d=h.reduce(function(e,t){var i={},s=a[t];return void 0!==s&&e.textDecoration!==s.textDecoration&&(i.textDecoration=[e.textDecoration,s.textDecoration].join(" ").trim()),n(e,s,i)},{});if(l){var u=l(h,t);d=n(d,u)}return r.createElement("span",{"data-offset-key":c,ref:function(t){return e.leaf=t},style:d},r.createElement(s,null,i))},c}(r.Component);e.exports=c},92694(e,t,i){"use strict";var n=i(859),s=i(49162),r=i(13878),o=i(21829),a=i(22155),l=i(22978),c=(o.List,function(e){var t,i;function o(){return e.apply(this,arguments)||this}return i=e,(t=o).prototype=Object.create(i.prototype),t.prototype.constructor=t,t.__proto__=i,o.prototype.render=function(){var e=this.props,t=e.block,i=e.contentState,o=e.customStyleFn,c=e.customStyleMap,h=e.decorator,d=e.direction,u=e.forceSelection,p=e.hasSelection,g=e.selection,f=e.tree,m=t.getKey(),v=t.getText(),y=f.size-1,C=this.props.children||f.map(function(e,l){var f=e.get("decoratorKey"),C=e.get("leaves"),b=C.size-1,S=C.map(function(e,i){var n=r.encode(m,l,i),h=e.get("start"),d=e.get("end");return a.createElement(s,{key:n,offsetKey:n,block:t,start:h,selection:p?g:null,forceSelection:u,text:v.slice(h,d),styleSet:t.getInlineStyleAt(h),customStyleMap:c,customStyleFn:o,isLast:f===y&&i===b})}).toArray();return f&&h?a.createElement(n,{block:t,children:S,contentState:i,decorator:h,decoratorKey:f,direction:d,leafSet:e,text:v,key:l}):S}).toArray();return a.createElement("div",{"data-offset-key":r.encode(m,0,0),className:l({"public/DraftStyleDefault/block":!0,"public/DraftStyleDefault/ltr":"LTR"===d,"public/DraftStyleDefault/rtl":"RTL"===d})},C)},o}(a.Component));e.exports=c},12803(e,t,i){"use strict";var n=i(22155),s=i(22978),r=function(e){var t,i;function r(){return e.apply(this,arguments)||this}i=e,(t=r).prototype=Object.create(i.prototype),t.prototype.constructor=t,t.__proto__=i;var o=r.prototype;return o.shouldComponentUpdate=function(e){return this.props.text!==e.text||this.props.editorState.getSelection().getHasFocus()!==e.editorState.getSelection().getHasFocus()},o.render=function(){var e=this.props.editorState.getSelection().getHasFocus(),t=s({"public/DraftEditorPlaceholder/root":!0,"public/DraftEditorPlaceholder/hasFocus":e});return n.createElement("div",{className:t},n.createElement("div",{className:s("public/DraftEditorPlaceholder/inner"),id:this.props.accessibilityID,style:{whiteSpace:"pre-wrap"}},this.props.text))},r}(n.Component);e.exports=r},5413(e,t,i){"use strict";function n(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function s(e,t,i){return t in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,e}var r=i(22155),o=i(63390),a=i(40041),l=i(66305),c=o.isBrowser("IE <= 11"),h=function(e){var t,i;function o(t){var i;return s(n(i=e.call(this,t)||this),"_forceFlag",void 0),s(n(i),"_node",void 0),i._forceFlag=!1,i}i=e,(t=o).prototype=Object.create(i.prototype),t.prototype.constructor=t,t.__proto__=i;var h=o.prototype;return h.shouldComponentUpdate=function(e){var t=this._node,i=""===e.children;l(t)||a(!1);var n=t;return i?!function(e){return c?"\n"===e.textContent:"BR"===e.tagName}(n):n.textContent!==e.children},h.componentDidMount=function(){this._forceFlag=!this._forceFlag},h.componentDidUpdate=function(){this._forceFlag=!this._forceFlag},h.render=function(){var e,t=this;return""===this.props.children?this._forceFlag?(e=function(e){return t._node=e},c?r.createElement("span",{key:"A","data-text":"true",ref:e},"\n"):r.createElement("br",{key:"A","data-text":"true",ref:e})):function(e){return c?r.createElement("span",{key:"B","data-text":"true",ref:e},"\n"):r.createElement("br",{key:"B","data-text":"true",ref:e})}(function(e){return t._node=e}):r.createElement("span",{key:this._forceFlag?"A":"B","data-text":"true",ref:function(e){return t._node=e}},this.props.children)},o}(r.Component);e.exports=h},7618(e){"use strict";e.exports={initODS:function(){},handleExtensionCausedError:function(){}}},70873(e,t,i){"use strict";function n(e,t,i){return t in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,e}var s=i(72066),r=i(21829),o=i(40041),a=i(10254),l=(0,r.Map)(),c=a();function h(e,t){console.warn("WARNING: "+e+' will be deprecated soon!\nPlease use "'+t+'" instead.')}var d={getLastCreatedEntityKey:function(){return h("DraftEntity.getLastCreatedEntityKey","contentState.getLastCreatedEntityKey"),d.__getLastCreatedEntityKey()},create:function(e,t,i){return h("DraftEntity.create","contentState.createEntity"),d.__create(e,t,i)},add:function(e){return h("DraftEntity.add","contentState.addEntity"),d.__add(e)},get:function(e){return h("DraftEntity.get","contentState.getEntity"),d.__get(e)},__getAll:function(){return l},__loadWithEntities:function(e){l=e,c=a()},mergeData:function(e,t){return h("DraftEntity.mergeData","contentState.mergeEntityData"),d.__mergeData(e,t)},replaceData:function(e,t){return h("DraftEntity.replaceData","contentState.replaceEntityData"),d.__replaceData(e,t)},__getLastCreatedEntityKey:function(){return c},__create:function(e,t,i){return d.__add(new s({type:e,mutability:t,data:i||{}}))},__add:function(e){return c=a(),l=l.set(c,e),c},__get:function(e){var t=l.get(e);return t||o(!1),t},__mergeData:function(e,t){var i=d.__get(e),s=function(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{},s=Object.keys(i);"function"==typeof Object.getOwnPropertySymbols&&(s=s.concat(Object.getOwnPropertySymbols(i).filter(function(e){return Object.getOwnPropertyDescriptor(i,e).enumerable}))),s.forEach(function(t){n(e,t,i[t])})}return e}({},i.getData(),t),r=i.set("data",s);return l=l.set(e,r),r},__replaceData:function(e,t){var i=d.__get(e).set("data",t);return l=l.set(e,i),i}};e.exports=d},72066(e,t,i){"use strict";var n=function(e){var t,i;function n(){return e.apply(this,arguments)||this}i=e,(t=n).prototype=Object.create(i.prototype),t.prototype.constructor=t,t.__proto__=i;var s=n.prototype;return s.getType=function(){return this.get("type")},s.getMutability=function(){return this.get("mutability")},s.getData=function(){return this.get("data")},n}((0,i(21829).Record)({type:"TOKEN",mutability:"IMMUTABLE",data:Object}));e.exports=n},451(e){"use strict";e.exports={getRemovalRange:function(e,t,i,n,s){var r=i.split(" ");r=r.map(function(e,t){if("forward"===s){if(t>0)return" "+e}else if(t<r.length-1)return e+" ";return e});for(var o,a=n,l=null,c=null,h=0;h<r.length;h++){if(e<(o=a+r[h].length)&&a<t)null!==l||(l=a),c=o;else if(null!==l)break;a=o}var d=n+i.length,u=l===n,p=c===d;return(!u&&p||u&&!p)&&("forward"===s?c!==d&&c++:l!==n&&l--),{start:l,end:c}}}},35693(e){"use strict";e.exports={logBlockedSelectionEvent:function(){return null},logSelectionStateFailure:function(){return null}}},58267(e,t,i){"use strict";var n=i(41671),s=i(61773),r=i(40377),o=i(64047),a=i(54095),l=i(21829),c=i(72368),h=i(32983),d=i(40041),u=i(79981),p=i(91825),g=i(5646),f=i(2661),m=l.OrderedSet,v={replaceText:function(e,t,i,s,r){var o=p(e,t),a=g(o,t),l=n.create({style:s||m(),entity:r||null});return h(a,a.getSelectionAfter(),i,l)},insertText:function(e,t,i,n,s){return t.isCollapsed()||d(!1),v.replaceText(e,t,i,n,s)},moveText:function(e,t,i){var n=a(e,t),s=v.removeRange(e,t,"backward");return v.replaceWithFragment(s,i,n)},replaceWithFragment:function(e,t,i){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"REPLACE_WITH_NEW_DATA",s=p(e,t),r=g(s,t);return c(r,r.getSelectionAfter(),i,n)},removeRange:function(e,t,i){var n,s,r,a;t.getIsBackward()&&(t=t.merge({anchorKey:t.getFocusKey(),anchorOffset:t.getFocusOffset(),focusKey:t.getAnchorKey(),focusOffset:t.getAnchorOffset(),isBackward:!1})),n=t.getAnchorKey(),s=t.getFocusKey(),r=e.getBlockForKey(n),a=e.getBlockForKey(s);var l=t.getStartOffset(),c=t.getEndOffset(),h=r.getEntityAt(l),d=a.getEntityAt(c-1);if(n===s&&h&&h===d){var u=o(e.getEntityMap(),r,a,t,i);return g(e,u)}var f=p(e,t);return g(f,t)},splitBlock:function(e,t){var i=p(e,t),n=g(i,t);return f(n,n.getSelectionAfter())},applyInlineStyle:function(e,t,i){return s.add(e,t,i)},removeInlineStyle:function(e,t,i){return s.remove(e,t,i)},setBlockType:function(e,t,i){return u(e,t,function(e){return e.merge({type:i,depth:0})})},setBlockData:function(e,t,i){return u(e,t,function(e){return e.merge({data:i})})},mergeBlockData:function(e,t,i){return u(e,t,function(e){return e.merge({data:e.getData().merge(i)})})},applyEntity:function(e,t,i){var n=p(e,t);return r(n,t,i)}};e.exports=v},13878(e){"use strict";var t="-",i={encode:function(e,i,n){return e+t+i+t+n},decode:function(e){var i=e.split(t).reverse(),n=i[0],s=i[1];return{blockKey:i.slice(2).reverse().join(t),decoratorKey:parseInt(s,10),leafKey:parseInt(n,10)}}};e.exports=i},42471(e,t,i){"use strict";function n(e,t,i){return t in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,e}var s=i(40643),r=i(31527),o=i(86739),a=i(12634),l=i(38413),c=i(17595),h=i(21829),d=i(10160),u=h.List,p=h.Repeat,g=c("draft_tree_data_support"),f=g?r:s,m={processHTML:function(e,t){return o(e,l,t)},processText:function(e,t,i){return e.reduce(function(e,s,r){s=d(s);var o=a(),l={key:o,type:i,text:s,characterList:u(p(t,s.length))};if(g&&0!==r){var c=r-1;l=function(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{},s=Object.keys(i);"function"==typeof Object.getOwnPropertySymbols&&(s=s.concat(Object.getOwnPropertySymbols(i).filter(function(e){return Object.getOwnPropertyDescriptor(i,e).enumerable}))),s.forEach(function(t){n(e,t,i[t])})}return e}({},l,{prevSibling:(e[c]=e[c].merge({nextSibling:o})).getKey()})}return e.push(new f(l)),e},[])}};e.exports=m},76425(e,t,i){"use strict";var n="['‘’]",s="\\s|(?![_])"+i(59544).getPunctuation(),r=new RegExp("^(?:"+s+")*(?:"+n+"|(?!"+s+").)*(?:(?!"+s+").)"),o=new RegExp("(?:(?!"+s+").)(?:"+n+"|(?!"+s+").)*(?:"+s+")*$");function a(e,t){var i=t?o.exec(e):r.exec(e);return i?i[0]:e}var l={getBackward:function(e){return a(e,!0)},getForward:function(e){return a(e,!1)}};e.exports=l},93184(e){"use strict";var t={stringify:function(e){return"_"+String(e)},unstringify:function(e){return e.slice(1)}};e.exports=t},85063(e,t,i){"use strict";function n(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{},n=Object.keys(i);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(i).filter(function(e){return Object.getOwnPropertyDescriptor(i,e).enumerable}))),n.forEach(function(t){s(e,t,i[t])})}return e}function s(e,t,i){return t in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,e}var r=i(12634),o=i(40041),a=function(e){if(!e||!e.type)return!1;var t=e.type;return"unordered-list-item"===t||"ordered-list-item"===t},l={fromRawTreeStateToRawState:function(e){var t=e.blocks,i=[];return Array.isArray(t)||o(!1),Array.isArray(t)&&t.length?(function(e,t){for(var i=[].concat(e).reverse();i.length;){var n=i.pop();t(n);var s=n.children;Array.isArray(s)||o(!1),i=i.concat([].concat(s.reverse()))}}(t,function(e){var t=n({},e);a(e)&&(t.depth=t.depth||0,function(e){Array.isArray(e.children)&&(e.children=e.children.map(function(t){return t.type===e.type?n({},t,{depth:(e.depth||0)+1}):t}))}(e),null!=e.children&&e.children.length>0)||(delete t.children,i.push(t))}),e.blocks=i,n({},e,{blocks:i})):e},fromRawStateToRawTreeState:function(e){var t=[],i=[];return e.blocks.forEach(function(e){var s=a(e),o=e.depth||0,l=n({},e,{children:[]});if(s){var c=i[0];if(null==c&&0===o)t.push(l);else if(null==c||c.depth<o-1){var h={key:r(),text:"",depth:o-1,type:e.type,children:[],entityRanges:[],inlineStyleRanges:[]};i.unshift(h),1===o?t.push(h):null!=c&&c.children.push(h),h.children.push(l)}else if(c.depth===o-1)c.children.push(l);else{for(;null!=c&&c.depth>=o;)i.shift(),c=i[0];o>0?c.children.push(l):t.push(l)}}else t.push(l)}),n({},e,{blocks:t})}};e.exports=l},59415(e,t,i){"use strict";i(92697),e.exports={isValidBlock:function(e,t){var i=e.getKey(),n=e.getParentKey();if(null!=n&&!t.get(n).getChildKeys().includes(i))return!1;if(!e.getChildKeys().map(function(e){return t.get(e)}).every(function(e){return e.getParentKey()===i}))return!1;var s=e.getPrevSiblingKey();if(null!=s&&t.get(s).getNextSiblingKey()!==i)return!1;var r=e.getNextSiblingKey();return(null==r||t.get(r).getPrevSiblingKey()===i)&&!(null!==r&&null!==s&&s===r||""!=e.text&&e.getChildKeys().size>0)},isConnectedTree:function(e){var t=e.toArray().filter(function(e){return null==e.getParentKey()&&null==e.getPrevSiblingKey()});if(1!==t.length)return!1;for(var i=0,n=t.shift().getKey(),s=[];null!=n;){var r=e.get(n),o=r.getChildKeys(),a=r.getNextSiblingKey();if(o.size>0){null!=a&&s.unshift(a);var l=o.map(function(t){return e.get(t)}).find(function(e){return null==e.getPrevSiblingKey()});if(null==l)return!1;n=l.getKey()}else n=null!=r.getNextSiblingKey()?r.getNextSiblingKey():s.shift();i++}return i===e.size},isValidTree:function(e){var t=this;return!!e.toArray().every(function(i){return t.isValidBlock(i,e)})&&this.isConnectedTree(e)}}},76539(e,t,i){"use strict";var n,s=i(75361),r=i(21829),o=i(25813),a=r.OrderedMap,l={getDirectionMap:function(e,t){n?n.reset():n=new s;var i=e.getBlockMap(),l=i.valueSeq().map(function(e){return o(n).getDirection(e.getText())}),c=a(i.keySeq().zip(l));return null!=t&&r.is(t,c)?t:c}};e.exports=l},59539(e,t,i){"use strict";function n(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{},n=Object.keys(i);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(i).filter(function(e){return Object.getOwnPropertyDescriptor(i,e).enumerable}))),n.forEach(function(t){s(e,t,i[t])})}return e}function s(e,t,i){return t in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,e}var r=i(52568),o=i(23315),a=i(76539),l=i(27442),c=i(21829),h=c.OrderedSet,d=c.Record,u=c.Stack,p=c.OrderedMap,g=c.List,f=d({allowUndo:!0,currentContent:null,decorator:null,directionMap:null,forceSelection:!1,inCompositionMode:!1,inlineStyleOverride:null,lastChangeType:null,nativelyRenderedContent:null,redoStack:u(),selection:null,treeMap:null,undoStack:u()}),m=function(){t.createEmpty=function(e){return this.createWithText("",e)},t.createWithText=function(e,i){return t.createWithContent(o.createFromText(e),i)},t.createWithContent=function(e,i){if(0===e.getBlockMap().count())return t.createEmpty(i);var n=e.getBlockMap().first().getKey();return t.create({currentContent:e,undoStack:u(),redoStack:u(),decorator:i||null,selection:l.createEmpty(n)})},t.create=function(e){var i=e.currentContent,s=n({},e,{treeMap:y(i,e.decorator),directionMap:a.getDirectionMap(i)});return new t(new f(s))},t.fromJS=function(e){return new t(new f(n({},e,{directionMap:null!=e.directionMap?p(e.directionMap):e.directionMap,inlineStyleOverride:null!=e.inlineStyleOverride?h(e.inlineStyleOverride):e.inlineStyleOverride,nativelyRenderedContent:null!=e.nativelyRenderedContent?o.fromJS(e.nativelyRenderedContent):e.nativelyRenderedContent,redoStack:null!=e.redoStack?u(e.redoStack.map(function(e){return o.fromJS(e)})):e.redoStack,selection:null!=e.selection?new l(e.selection):e.selection,treeMap:null!=e.treeMap?p(e.treeMap).map(function(e){return g(e).map(function(e){return r.fromJS(e)})}):e.treeMap,undoStack:null!=e.undoStack?u(e.undoStack.map(function(e){return o.fromJS(e)})):e.undoStack,currentContent:o.fromJS(e.currentContent)})))},t.set=function(e,i){return new t(e.getImmutable().withMutations(function(t){var n=t.get("decorator"),s=n;null===i.decorator?s=null:i.decorator&&(s=i.decorator);var o=i.currentContent||e.getCurrentContent();if(s!==n){var a,l=t.get("treeMap");return a=s&&n?function(e,t,i,n,s){return i.merge(t.toSeq().filter(function(t){return n.getDecorations(t,e)!==s.getDecorations(t,e)}).map(function(t){return r.generate(e,t,n)}))}(o,o.getBlockMap(),l,s,n):y(o,s),void t.merge({decorator:s,treeMap:a,nativelyRenderedContent:null})}o!==e.getCurrentContent()&&t.set("treeMap",function(e,t,i,n){var s=e.getCurrentContent().set("entityMap",i),o=s.getBlockMap();return e.getImmutable().get("treeMap").merge(t.toSeq().filter(function(e,t){return e!==o.get(t)}).map(function(e){return r.generate(s,e,n)}))}(e,o.getBlockMap(),o.getEntityMap(),s)),t.merge(i)}))};var e=t.prototype;function t(e){s(this,"_immutable",void 0),this._immutable=e}return e.toJS=function(){return this.getImmutable().toJS()},e.getAllowUndo=function(){return this.getImmutable().get("allowUndo")},e.getCurrentContent=function(){return this.getImmutable().get("currentContent")},e.getUndoStack=function(){return this.getImmutable().get("undoStack")},e.getRedoStack=function(){return this.getImmutable().get("redoStack")},e.getSelection=function(){return this.getImmutable().get("selection")},e.getDecorator=function(){return this.getImmutable().get("decorator")},e.isInCompositionMode=function(){return this.getImmutable().get("inCompositionMode")},e.mustForceSelection=function(){return this.getImmutable().get("forceSelection")},e.getNativelyRenderedContent=function(){return this.getImmutable().get("nativelyRenderedContent")},e.getLastChangeType=function(){return this.getImmutable().get("lastChangeType")},e.getInlineStyleOverride=function(){return this.getImmutable().get("inlineStyleOverride")},t.setInlineStyleOverride=function(e,i){return t.set(e,{inlineStyleOverride:i})},e.getCurrentInlineStyle=function(){var e=this.getInlineStyleOverride();if(null!=e)return e;var t=this.getCurrentContent(),i=this.getSelection();return i.isCollapsed()?function(e,t){var i=t.getStartKey(),n=t.getStartOffset(),s=e.getBlockForKey(i);return n>0?s.getInlineStyleAt(n-1):s.getLength()?s.getInlineStyleAt(0):C(e,i)}(t,i):function(e,t){var i=t.getStartKey(),n=t.getStartOffset(),s=e.getBlockForKey(i);return n<s.getLength()?s.getInlineStyleAt(n):n>0?s.getInlineStyleAt(n-1):C(e,i)}(t,i)},e.getBlockTree=function(e){return this.getImmutable().getIn(["treeMap",e])},e.isSelectionAtStartOfContent=function(){var e=this.getCurrentContent().getBlockMap().first().getKey();return this.getSelection().hasEdgeWithin(e,0,0)},e.isSelectionAtEndOfContent=function(){var e=this.getCurrentContent().getBlockMap().last(),t=e.getLength();return this.getSelection().hasEdgeWithin(e.getKey(),t,t)},e.getDirectionMap=function(){return this.getImmutable().get("directionMap")},t.acceptSelection=function(e,t){return v(e,t,!1)},t.forceSelection=function(e,t){return t.getHasFocus()||(t=t.set("hasFocus",!0)),v(e,t,!0)},t.moveSelectionToEnd=function(e){var i=e.getCurrentContent().getLastBlock(),n=i.getKey(),s=i.getLength();return t.acceptSelection(e,new l({anchorKey:n,anchorOffset:s,focusKey:n,focusOffset:s,isBackward:!1}))},t.moveFocusToEnd=function(e){var i=t.moveSelectionToEnd(e);return t.forceSelection(i,i.getSelection())},t.push=function(e,i,n){var s=!(arguments.length>3&&void 0!==arguments[3])||arguments[3];if(e.getCurrentContent()===i)return e;var r=a.getDirectionMap(i,e.getDirectionMap());if(!e.getAllowUndo())return t.set(e,{currentContent:i,directionMap:r,lastChangeType:n,selection:i.getSelectionAfter(),forceSelection:s,inlineStyleOverride:null});var o=e.getSelection(),l=e.getCurrentContent(),c=e.getUndoStack(),h=i;o!==l.getSelectionAfter()||function(e,t){return t!==e.getLastChangeType()||"insert-characters"!==t&&"backspace-character"!==t&&"delete-character"!==t}(e,n)?(c=c.push(l),h=h.set("selectionBefore",o)):"insert-characters"!==n&&"backspace-character"!==n&&"delete-character"!==n||(h=h.set("selectionBefore",l.getSelectionBefore()));var d=e.getInlineStyleOverride();-1===["adjust-depth","change-block-type","split-block"].indexOf(n)&&(d=null);var p={currentContent:h,directionMap:r,undoStack:c,redoStack:u(),lastChangeType:n,selection:i.getSelectionAfter(),forceSelection:s,inlineStyleOverride:d};return t.set(e,p)},t.undo=function(e){if(!e.getAllowUndo())return e;var i=e.getUndoStack(),n=i.peek();if(!n)return e;var s=e.getCurrentContent(),r=a.getDirectionMap(n,e.getDirectionMap());return t.set(e,{currentContent:n,directionMap:r,undoStack:i.shift(),redoStack:e.getRedoStack().push(s),forceSelection:!0,inlineStyleOverride:null,lastChangeType:"undo",nativelyRenderedContent:null,selection:s.getSelectionBefore()})},t.redo=function(e){if(!e.getAllowUndo())return e;var i=e.getRedoStack(),n=i.peek();if(!n)return e;var s=e.getCurrentContent(),r=a.getDirectionMap(n,e.getDirectionMap());return t.set(e,{currentContent:n,directionMap:r,undoStack:e.getUndoStack().push(s),redoStack:i.shift(),forceSelection:!0,inlineStyleOverride:null,lastChangeType:"redo",nativelyRenderedContent:null,selection:n.getSelectionAfter()})},e.getImmutable=function(){return this._immutable},t}();function v(e,t,i){return m.set(e,{selection:t,forceSelection:i,nativelyRenderedContent:null,inlineStyleOverride:null})}function y(e,t){return e.getBlockMap().map(function(i){return r.generate(e,i,t)}).toOrderedMap()}function C(e,t){var i=e.getBlockMap().reverse().skipUntil(function(e,i){return i===t}).skip(1).skipUntil(function(e,t){return e.getLength()}).first();return i?i.getInlineStyleAt(i.getLength()-1):h()}e.exports=m},8117(e,t,i){"use strict";var n=i(63390),s=i(97253),r=n.isPlatform("Mac OS X"),o={isCtrlKeyCommand:function(e){return!!e.ctrlKey&&!e.altKey},isOptionKeyCommand:function(e){return r&&e.altKey},usesMacOSHeuristics:function(){return r},hasCommandModifier:function(e){return r?!!e.metaKey&&!e.altKey:o.isCtrlKeyCommand(e)},isSoftNewlineEvent:s};e.exports=o},79198(){},75969(e,t,i){"use strict";var n=i(58267),s=i(59539),r=i(10563),o=i(25813),a={currentBlockContainsLink:function(e){var t=e.getSelection(),i=e.getCurrentContent(),n=i.getEntityMap();return i.getBlockForKey(t.getAnchorKey()).getCharacterList().slice(t.getStartOffset(),t.getEndOffset()).some(function(e){var t=e.getEntity();return!!t&&"LINK"===n.__get(t).getType()})},getCurrentBlockType:function(e){var t=e.getSelection();return e.getCurrentContent().getBlockForKey(t.getStartKey()).getType()},getDataObjectForLinkURL:function(e){return{url:e.toString()}},handleKeyCommand:function(e,t,i){switch(t){case"bold":return a.toggleInlineStyle(e,"BOLD");case"italic":return a.toggleInlineStyle(e,"ITALIC");case"underline":return a.toggleInlineStyle(e,"UNDERLINE");case"code":return a.toggleCode(e);case"backspace":case"backspace-word":case"backspace-to-start-of-line":return a.onBackspace(e);case"delete":case"delete-word":case"delete-to-end-of-block":return a.onDelete(e);default:return null}},insertSoftNewline:function(e){var t=n.insertText(e.getCurrentContent(),e.getSelection(),"\n",e.getCurrentInlineStyle(),null),i=s.push(e,t,"insert-characters");return s.forceSelection(i,t.getSelectionAfter())},onBackspace:function(e){var t=e.getSelection();if(!t.isCollapsed()||t.getAnchorOffset()||t.getFocusOffset())return null;var i=e.getCurrentContent(),n=t.getStartKey(),r=i.getBlockBefore(n);if(r&&"atomic"===r.getType()){var o=i.getBlockMap().delete(r.getKey()),l=i.merge({blockMap:o,selectionAfter:t});if(l!==i)return s.push(e,l,"remove-range")}var c=a.tryToRemoveBlockStyle(e);return c?s.push(e,c,"change-block-type"):null},onDelete:function(e){var t=e.getSelection();if(!t.isCollapsed())return null;var i=e.getCurrentContent(),r=t.getStartKey(),o=i.getBlockForKey(r).getLength();if(t.getStartOffset()<o)return null;var a=i.getBlockAfter(r);if(!a||"atomic"!==a.getType())return null;var l=t.merge({focusKey:a.getKey(),focusOffset:a.getLength()}),c=n.removeRange(i,l,"forward");return c!==i?s.push(e,c,"remove-range"):null},onTab:function(e,t,i){var n=t.getSelection(),o=n.getAnchorKey();if(o!==n.getFocusKey())return t;var a=t.getCurrentContent(),l=a.getBlockForKey(o),c=l.getType();if("unordered-list-item"!==c&&"ordered-list-item"!==c)return t;e.preventDefault();var h=l.getDepth();if(!e.shiftKey&&h===i)return t;var d=r(a,n,e.shiftKey?-1:1,i);return s.push(t,d,"adjust-depth")},toggleBlockType:function(e,t){var i=e.getSelection(),r=i.getStartKey(),a=i.getEndKey(),l=e.getCurrentContent(),c=i;if(r!==a&&0===i.getEndOffset()){var h=o(l.getBlockBefore(a));a=h.getKey(),c=c.merge({anchorKey:r,anchorOffset:i.getStartOffset(),focusKey:a,focusOffset:h.getLength(),isBackward:!1})}if(l.getBlockMap().skipWhile(function(e,t){return t!==r}).reverse().skipWhile(function(e,t){return t!==a}).some(function(e){return"atomic"===e.getType()}))return e;var d=l.getBlockForKey(r).getType()===t?"unstyled":t;return s.push(e,n.setBlockType(l,c,d),"change-block-type")},toggleCode:function(e){var t=e.getSelection(),i=t.getAnchorKey(),n=t.getFocusKey();return t.isCollapsed()||i!==n?a.toggleBlockType(e,"code-block"):a.toggleInlineStyle(e,"CODE")},toggleInlineStyle:function(e,t){var i=e.getSelection(),r=e.getCurrentInlineStyle();if(i.isCollapsed())return s.setInlineStyleOverride(e,r.has(t)?r.remove(t):r.add(t));var o,a=e.getCurrentContent();return o=r.has(t)?n.removeInlineStyle(a,i,t):n.applyInlineStyle(a,i,t),s.push(e,o,"change-inline-style")},toggleLink:function(e,t,i){var r=n.applyEntity(e.getCurrentContent(),t,i);return s.push(e,r,"apply-entity")},tryToRemoveBlockStyle:function(e){var t=e.getSelection(),i=t.getAnchorOffset();if(t.isCollapsed()&&0===i){var s=t.getAnchorKey(),r=e.getCurrentContent(),o=r.getBlockForKey(s).getType(),a=r.getBlockBefore(s);if("code-block"===o&&a&&"code-block"===a.getType()&&0!==a.getLength())return null;if("unstyled"!==o)return n.setBlockType(r,t,"unstyled")}return null}};e.exports=a},56109(e,t,i){"use strict";var n=i(58267),s=i(59539),r=i(54095),o=i(25813),a=null,l={cut:function(e){var t=e.getCurrentContent(),i=e.getSelection(),l=null;if(i.isCollapsed()){var c=i.getAnchorKey(),h=t.getBlockForKey(c).getLength();if(h===i.getAnchorOffset()){var d=t.getKeyAfter(c);if(null==d)return e;l=i.set("focusKey",d).set("focusOffset",0)}else l=i.set("focusOffset",h)}else l=i;l=o(l),a=r(t,l);var u=n.removeRange(t,l,"forward");return u===t?e:s.push(e,u,"remove-range")},paste:function(e){if(!a)return e;var t=n.replaceWithFragment(e.getCurrentContent(),e.getSelection(),a);return s.push(e,t,"insert-fragment")}};e.exports=l},27442(e,t,i){"use strict";var n=function(e){var t,i;function n(){return e.apply(this,arguments)||this}i=e,(t=n).prototype=Object.create(i.prototype),t.prototype.constructor=t,t.__proto__=i;var s=n.prototype;return s.serialize=function(){return"Anchor: "+this.getAnchorKey()+":"+this.getAnchorOffset()+", Focus: "+this.getFocusKey()+":"+this.getFocusOffset()+", Is Backward: "+String(this.getIsBackward())+", Has Focus: "+String(this.getHasFocus())},s.getAnchorKey=function(){return this.get("anchorKey")},s.getAnchorOffset=function(){return this.get("anchorOffset")},s.getFocusKey=function(){return this.get("focusKey")},s.getFocusOffset=function(){return this.get("focusOffset")},s.getIsBackward=function(){return this.get("isBackward")},s.getHasFocus=function(){return this.get("hasFocus")},s.hasEdgeWithin=function(e,t,i){var n=this.getAnchorKey(),s=this.getFocusKey();if(n===s&&n===e){var r=this.getStartOffset(),o=this.getEndOffset();return t<=r&&r<=i||t<=o&&o<=i}if(e!==n&&e!==s)return!1;var a=e===n?this.getAnchorOffset():this.getFocusOffset();return t<=a&&i>=a},s.isCollapsed=function(){return this.getAnchorKey()===this.getFocusKey()&&this.getAnchorOffset()===this.getFocusOffset()},s.getStartKey=function(){return this.getIsBackward()?this.getFocusKey():this.getAnchorKey()},s.getStartOffset=function(){return this.getIsBackward()?this.getFocusOffset():this.getAnchorOffset()},s.getEndKey=function(){return this.getIsBackward()?this.getAnchorKey():this.getFocusKey()},s.getEndOffset=function(){return this.getIsBackward()?this.getAnchorOffset():this.getFocusOffset()},n.createEmpty=function(e){return new n({anchorKey:e,anchorOffset:0,focusKey:e,focusOffset:0,isBackward:!1,hasFocus:!1})},n}((0,i(21829).Record)({anchorKey:"",anchorOffset:0,focusKey:"",focusOffset:0,isBackward:!1,hasFocus:!1}));e.exports=n},10563(e){"use strict";e.exports=function(e,t,i,n){var s=t.getStartKey(),r=t.getEndKey(),o=e.getBlockMap(),a=o.toSeq().skipUntil(function(e,t){return t===s}).takeUntil(function(e,t){return t===r}).concat([[r,o.get(r)]]).map(function(e){var t=e.getDepth()+i;return t=Math.max(0,Math.min(t,n)),e.set("depth",t)});return o=o.merge(a),e.merge({blockMap:o,selectionBefore:t,selectionAfter:t})}},43253(e,t,i){"use strict";var n=i(41671);e.exports=function(e,t,i,s){for(var r=t,o=e.getCharacterList();r<i;)o=o.set(r,n.applyEntity(o.get(r),s)),r++;return e.set("characterList",o)}},40377(e,t,i){"use strict";var n=i(43253),s=i(21829);e.exports=function(e,t,i){var r=e.getBlockMap(),o=t.getStartKey(),a=t.getStartOffset(),l=t.getEndKey(),c=t.getEndOffset(),h=r.skipUntil(function(e,t){return t===o}).takeUntil(function(e,t){return t===l}).toOrderedMap().merge(s.OrderedMap([[l,r.get(l)]])).map(function(e,t){var s=t===o?a:0,r=t===l?c:e.getLength();return n(e,s,r,i)});return e.merge({blockMap:r.merge(h),selectionBefore:t,selectionAfter:t})}},93613(e,t,i){"use strict";function n(e,t,i){return t in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,e}var s=i(40643),r=i(31527),o=i(93184),a=i(30370),l=i(3399),c=i(40041),h=function(e,t){return{key:e.getKey(),text:e.getText(),type:e.getType(),depth:e.getDepth(),inlineStyleRanges:l(e),entityRanges:a(e,t),data:e.getData().toObject()}};e.exports=function(e){var t={entityMap:{},blocks:[]};return t=function(e,t){var i=t.entityMap,a=[],l={},d={},u=0;return e.getBlockMap().forEach(function(e){e.findEntityRanges(function(e){return null!==e.getEntity()},function(t){var n=e.getEntityAt(t),s=o.stringify(n);d[s]||(d[s]=n,i[s]="".concat(u),u++)}),function(e,t,i,o){if(e instanceof s)i.push(h(e,t));else{e instanceof r||c(!1);var a=e.getParentKey(),l=o[e.getKey()]=function(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{},s=Object.keys(i);"function"==typeof Object.getOwnPropertySymbols&&(s=s.concat(Object.getOwnPropertySymbols(i).filter(function(e){return Object.getOwnPropertyDescriptor(i,e).enumerable}))),s.forEach(function(t){n(e,t,i[t])})}return e}({},h(e,t),{children:[]});a?o[a].children.push(l):i.push(l)}}(e,i,a,l)}),{blocks:a,entityMap:i}}(e,t),t=function(e,t){var i=t.blocks,n=t.entityMap,s={};return Object.keys(n).forEach(function(t,i){var n=e.getEntity(o.unstringify(t));s[i]={type:n.getType(),mutability:n.getMutability(),data:n.getData()}}),{blocks:i,entityMap:s}}(e,t),t}},86739(e,t,i){"use strict";var n;function s(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{},n=Object.keys(i);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(i).filter(function(e){return Object.getOwnPropertyDescriptor(i,e).enumerable}))),n.forEach(function(t){r(e,t,i[t])})}return e}function r(e,t,i){return t in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,e}var o=i(41671),a=i(40643),l=i(31527),c=i(47904),h=i(70873),d=i(10499),u=i(22978),p=i(12634),g=i(38413),f=i(17595),m=i(21829),v=m.List,y=m.Map,C=m.OrderedSet,b=i(34189),S=i(4734),w=i(44110),x=i(80119),E=f("draft_tree_data_support"),M=new RegExp("\r","g"),A=new RegExp("\n","g"),T=new RegExp("^\n","g"),D=new RegExp("&nbsp;","g"),I=new RegExp("&#13;?","g"),R=new RegExp("&#8203;?","g"),L=["bold","bolder","500","600","700","800","900"],k=["light","lighter","normal","100","200","300","400"],P=["className","href","rel","target","title"],N=["alt","className","height","src","width"],O=(r(n={},u("public/DraftStyleDefault/depth0"),0),r(n,u("public/DraftStyleDefault/depth1"),1),r(n,u("public/DraftStyleDefault/depth2"),2),r(n,u("public/DraftStyleDefault/depth3"),3),r(n,u("public/DraftStyleDefault/depth4"),4),n),_=y({b:"BOLD",code:"CODE",del:"STRIKETHROUGH",em:"ITALIC",i:"ITALIC",s:"STRIKETHROUGH",strike:"STRIKETHROUGH",strong:"BOLD",u:"UNDERLINE",mark:"HIGHLIGHT"}),F=function(e){return w(e)&&e.style.fontFamily.includes("monospace")?"CODE":null},G=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return Object.keys(O).some(function(i){e.classList.contains(i)&&(t=O[i])}),t},V=function(e){if(!b(e))return!1;var t=e;if(!t.href||"http:"!==t.protocol&&"https:"!==t.protocol&&"mailto:"!==t.protocol&&"tel:"!==t.protocol)return!1;try{return new d(t.href),!0}catch(e){return!1}},B=function(e){if(!x(e))return!1;var t=e;return!(!t.attributes.getNamedItem("src")||!t.attributes.getNamedItem("src").value)},H=function(e,t){if(!w(e))return t;var i=e,n=i.style.fontWeight,s=i.style.fontStyle,r=i.style.textDecoration;return t.withMutations(function(e){L.indexOf(n)>=0?e.add("BOLD"):k.indexOf(n)>=0&&e.remove("BOLD"),"italic"===s?e.add("ITALIC"):"normal"===s&&e.remove("ITALIC"),"underline"===r&&e.add("UNDERLINE"),"line-through"===r&&e.add("STRIKETHROUGH"),"none"===r&&(e.remove("UNDERLINE"),e.remove("STRIKETHROUGH"))})},z=function(e){return"ul"===e||"ol"===e},U=function(){function e(e,t){r(this,"characterList",v()),r(this,"currentBlockType","unstyled"),r(this,"currentDepth",0),r(this,"currentEntity",null),r(this,"currentText",""),r(this,"wrapper",null),r(this,"blockConfigs",[]),r(this,"contentBlocks",[]),r(this,"entityMap",h),r(this,"blockTypeMap",void 0),r(this,"disambiguate",void 0),this.clear(),this.blockTypeMap=e,this.disambiguate=t}var t=e.prototype;return t.clear=function(){this.characterList=v(),this.blockConfigs=[],this.currentBlockType="unstyled",this.currentDepth=0,this.currentEntity=null,this.currentText="",this.entityMap=h,this.wrapper=null,this.contentBlocks=[]},t.addDOMNode=function(e){var t;return this.contentBlocks=[],this.currentDepth=0,(t=this.blockConfigs).push.apply(t,this._toBlockConfigs([e],C())),this._trimCurrentText(),""!==this.currentText&&this.blockConfigs.push(this._makeBlockConfig()),this},t.getContentBlocks=function(){return 0===this.contentBlocks.length&&(E?this._toContentBlocks(this.blockConfigs):this._toFlatContentBlocks(this.blockConfigs)),{contentBlocks:this.contentBlocks,entityMap:this.entityMap}},t._makeBlockConfig=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=s({key:e.key||p(),type:this.currentBlockType,text:this.currentText,characterList:this.characterList,depth:this.currentDepth,parent:null,children:v(),prevSibling:null,nextSibling:null,childConfigs:[]},e);return this.characterList=v(),this.currentBlockType="unstyled",this.currentText="",t},t._toBlockConfigs=function(e,t){for(var i=[],n=0;n<e.length;n++){var s=e[n],r=s.nodeName.toLowerCase();if("body"===r||z(r)){this._trimCurrentText(),""!==this.currentText&&i.push(this._makeBlockConfig());var o=this.currentDepth,a=this.wrapper;z(r)&&(this.wrapper=r,z(a)&&this.currentDepth++),i.push.apply(i,this._toBlockConfigs(Array.from(s.childNodes),t)),this.currentDepth=o,this.wrapper=a}else{var l=this.blockTypeMap.get(r);if(void 0===l)if("#text"!==r)if("br"!==r)if(B(s))this._addImgNode(s,t);else if(V(s))this._addAnchorNode(s,i,t);else{var c=t;_.has(r)&&(c=c.add(_.get(r))),c=H(s,c);var h=F(s);null!=h&&(c=c.add(h)),i.push.apply(i,this._toBlockConfigs(Array.from(s.childNodes),c))}else this._addBreakNode(s,t);else this._addTextNode(s,t);else{this._trimCurrentText(),""!==this.currentText&&i.push(this._makeBlockConfig());var d=this.currentDepth,u=this.wrapper;if(this.wrapper="pre"===r?"pre":this.wrapper,"string"!=typeof l&&(l=this.disambiguate(r,this.wrapper)||l[0]||"unstyled"),!E&&w(s)&&("unordered-list-item"===l||"ordered-list-item"===l)){var g=s;this.currentDepth=G(g,this.currentDepth)}var f=p(),m=this._toBlockConfigs(Array.from(s.childNodes),t);this._trimCurrentText(),i.push(this._makeBlockConfig({key:f,childConfigs:m,type:l})),this.currentDepth=d,this.wrapper=u}}}return i},t._appendText=function(e,t){var i;this.currentText+=e;var n=o.create({style:t,entity:this.currentEntity});this.characterList=(i=this.characterList).push.apply(i,Array(e.length).fill(n))},t._trimCurrentText=function(){var e=this.currentText.length,t=e-this.currentText.trimLeft().length,i=this.currentText.trimRight().length,n=this.characterList.findEntry(function(e){return null!==e.getEntity()});(t=void 0!==n?Math.min(t,n[0]):t)>(i=void 0!==(n=this.characterList.reverse().findEntry(function(e){return null!==e.getEntity()}))?Math.max(i,e-n[0]):i)?(this.currentText="",this.characterList=v()):(this.currentText=this.currentText.slice(t,i),this.characterList=this.characterList.slice(t,i))},t._addTextNode=function(e,t){var i=e.textContent;""===i.trim()&&"pre"!==this.wrapper&&(i=" "),"pre"!==this.wrapper&&(i=(i=i.replace(T,"")).replace(A," ")),this._appendText(i,t)},t._addBreakNode=function(e,t){S(e)&&this._appendText("\n",t)},t._addImgNode=function(e,t){if(x(e)){var i=e,n={};N.forEach(function(e){var t=i.getAttribute(e);t&&(n[e]=t)}),this.currentEntity=this.entityMap.__create("IMAGE","IMMUTABLE",n),f("draftjs_fix_paste_for_img")?"presentation"!==i.getAttribute("role")&&this._appendText("📷",t):this._appendText("📷",t),this.currentEntity=null}},t._addAnchorNode=function(e,t,i){if(b(e)){var n=e,s={};P.forEach(function(e){var t=n.getAttribute(e);t&&(s[e]=t)}),s.url=new d(n.href).toString(),this.currentEntity=this.entityMap.__create("LINK","MUTABLE",s||{}),t.push.apply(t,this._toBlockConfigs(Array.from(e.childNodes),i)),this.currentEntity=null}},t._toContentBlocks=function(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,i=e.length-1,n=0;n<=i;n++){var r=e[n];r.parent=t,r.prevSibling=n>0?e[n-1].key:null,r.nextSibling=n<i?e[n+1].key:null,r.children=v(r.childConfigs.map(function(e){return e.key})),this.contentBlocks.push(new l(s({},r))),this._toContentBlocks(r.childConfigs,r.key)}},t._hoistContainersInBlockConfigs=function(e){var t=this;return v(e).flatMap(function(e){return"unstyled"!==e.type||""!==e.text?[e]:t._hoistContainersInBlockConfigs(e.childConfigs)})},t._toFlatContentBlocks=function(e){var t=this;this._hoistContainersInBlockConfigs(e).forEach(function(e){var i=t._extractTextFromBlockConfigs(e.childConfigs),n=i.text,r=i.characterList;t.contentBlocks.push(new a(s({},e,{text:e.text+n,characterList:e.characterList.concat(r)})))})},t._extractTextFromBlockConfigs=function(e){for(var t=e.length-1,i="",n=v(),s=0;s<=t;s++){var r=e[s];i+=r.text,n=n.concat(r.characterList),""!==i&&"unstyled"!==r.type&&(i+="\n",n=n.push(n.last()));var o=this._extractTextFromBlockConfigs(r.childConfigs);i+=o.text,n=n.concat(o.characterList)}return{text:i,characterList:n}},e}();e.exports=function(e){var t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:c,i=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:g)(e=e.trim().replace(M,"").replace(D," ").replace(I,"").replace(R,""));if(!i)return null;var n=function(e){var t={};return e.mapKeys(function(e,i){var n=[i.element];void 0!==i.aliasedElements&&n.push.apply(n,i.aliasedElements),n.forEach(function(i){void 0===t[i]?t[i]=e:"string"==typeof t[i]?t[i]=[t[i],e]:t[i].push(e)})}),y(t)}(t);return new U(n,function(e,t){return"li"===e?"ol"===t?"ordered-list-item":"unordered-list-item":null}).addDOMNode(i).getContentBlocks()}},12503(e,t,i){"use strict";function n(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{},n=Object.keys(i);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(i).filter(function(e){return Object.getOwnPropertyDescriptor(i,e).enumerable}))),n.forEach(function(t){s(e,t,i[t])})}return e}function s(e,t,i){return t in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,e}var r=i(40643),o=i(31527),a=i(23315),l=i(70873),c=i(85063),h=(i(59415),i(27442)),d=i(59974),u=i(87838),p=i(55107),g=i(12634),f=i(17595),m=i(21829),v=i(40041),y=f("draft_tree_data_support"),C=m.List,b=m.Map,S=m.OrderedMap,w=function(e,t){var i=e.key,n=e.type,s=e.data;return{text:e.text,depth:e.depth||0,type:n||"unstyled",key:i||g(),data:b(s),characterList:x(e,t)}},x=function(e,t){var i=e.text,s=e.entityRanges,r=e.inlineStyleRanges,o=s||[];return d(p(i,r||[]),u(i,o.filter(function(e){return t.hasOwnProperty(e.key)}).map(function(e){return n({},e,{key:t[e.key]})})))},E=function(e){return n({},e,{key:e.key||g()})},M=function(e,t,i){var s=t.map(function(e){return n({},e,{parentRef:i})});return e.concat(s.reverse())};e.exports=function(e){Array.isArray(e.blocks)||v(!1);var t=function(e){var t=e.entityMap,i={};return Object.keys(t).forEach(function(e){var n=t[e],s=n.type,r=n.mutability,o=n.data;i[e]=l.__create(s,r,o||{})}),i}(e),i=function(e,t){var i=e.blocks.find(function(e){return Array.isArray(e.children)&&e.children.length>0}),s=y&&!i?c.fromRawStateToRawTreeState(e).blocks:e.blocks;if(!y)return function(e,t){return S(e.map(function(e){var i=new r(w(e,t));return[i.getKey(),i]}))}(i?c.fromRawTreeStateToRawState(e).blocks:s,t);var a=function(e,t){return e.map(E).reduce(function(i,s,r){Array.isArray(s.children)||v(!1);var a=s.children.map(E),l=new o(n({},w(s,t),{prevSibling:0===r?null:e[r-1].key,nextSibling:r===e.length-1?null:e[r+1].key,children:C(a.map(function(e){return e.key}))}));i=i.set(l.getKey(),l);for(var c=M([],a,l);c.length>0;){var h=c.pop(),d=h.parentRef,u=d.getChildKeys(),p=u.indexOf(h.key),g=Array.isArray(h.children);if(!g){g||v(!1);break}var f=h.children.map(E),m=new o(n({},w(h,t),{parent:d.getKey(),children:C(f.map(function(e){return e.key})),prevSibling:0===p?null:u.get(p-1),nextSibling:p===u.size-1?null:u.get(p+1)}));i=i.set(m.getKey(),m),c=M(c,f,m)}return i},S())}(s,t);return a}(e,t),s=i.isEmpty()?new h:h.createEmpty(i.first().getKey());return new a({blockMap:i,entityMap:t,selectionBefore:s,selectionAfter:s})}},59974(e,t,i){"use strict";var n=i(41671),s=i(21829).List;e.exports=function(e,t){var i=e.map(function(e,i){var s=t[i];return n.create({style:e,entity:s})});return s(i)}},87838(e,t,i){"use strict";var n=i(13145).substr;e.exports=function(e,t){var i=Array(e.length).fill(null);return t&&t.forEach(function(t){for(var s=n(e,0,t.offset).length,r=s+n(e,t.offset,t.length).length,o=s;o<r;o++)i[o]=t.key}),i}},55107(e,t,i){"use strict";var n=i(13145),s=i(21829).OrderedSet,r=n.substr,o=s();e.exports=function(e,t){var i=Array(e.length).fill(o);return t&&t.forEach(function(t){for(var n=r(e,0,t.offset).length,s=n+r(e,t.offset,t.length).length;n<s;)i[n]=i[n].add(t.style),n++}),i}},25070(e){"use strict";e.exports={notEmptyKey:function(e){return null!=e&&""!=e}}},45995(e,t,i){"use strict";var n=i(58267),s=i(59539),r=i(63390),o=i(60836),a=i(46415),l=i(65044),c=i(25813),h=i(95136),d=r.isBrowser("Firefox");function u(e,t,i,r,o){var a=n.replaceText(e.getCurrentContent(),e.getSelection(),t,i,r);return s.push(e,a,"insert-characters",o)}e.exports=function(e,t){void 0!==e._pendingStateFromBeforeInput&&(e.update(e._pendingStateFromBeforeInput),e._pendingStateFromBeforeInput=void 0);var i=e._latestEditorState,n=t.data;if(n)if(e.props.handleBeforeInput&&a(e.props.handleBeforeInput(n,i,t.timeStamp)))t.preventDefault();else{var r=i.getSelection(),p=r.getStartOffset(),g=r.getAnchorKey();if(!r.isCollapsed())return t.preventDefault(),void e.update(u(i,n,i.getCurrentInlineStyle(),o(i.getCurrentContent(),i.getSelection()),!0));var f,m=u(i,n,i.getCurrentInlineStyle(),o(i.getCurrentContent(),i.getSelection()),!1),v=!1;if(v||(v=l(e._latestCommittedEditorState)),!v){var y=i.getBlockTree(g),C=m.getBlockTree(g);v=y.size!==C.size||y.zip(C).some(function(e){var t=e[0],i=e[1],s=t.get("start"),r=s+(s>=p?n.length:0),o=t.get("end"),a=o+(o>=p?n.length:0),l=i.get("start"),c=i.get("end"),h=i.get("decoratorKey");return t.get("decoratorKey")!==h||t.get("leaves").size!==i.get("leaves").size||r!==l||a!==c||null!=h&&c-l!==o-s})}if(v||(f=n,v=d&&("'"==f||"/"==f)),v||(v=c(m.getDirectionMap()).get(g)!==c(i.getDirectionMap()).get(g)),v)return t.preventDefault(),m=s.set(m,{forceSelection:!0}),void e.update(m);m=s.set(m,{nativelyRenderedContent:m.getCurrentContent()}),e._pendingStateFromBeforeInput=m,h(function(){void 0!==e._pendingStateFromBeforeInput&&(e.update(e._pendingStateFromBeforeInput),e._pendingStateFromBeforeInput=void 0)})}}},23717(e,t,i){"use strict";var n=i(59539),s=i(68820),r=i(53967);e.exports=function(e,t){var i=t.currentTarget.ownerDocument;if(!Boolean(e.props.preserveSelectionOnBlur)&&r(i)===i.body){var o=i.defaultView.getSelection(),a=e.editor;1===o.rangeCount&&s(a,o.anchorNode)&&s(a,o.focusNode)&&o.removeAllRanges()}var l=e._latestEditorState,c=l.getSelection();if(c.getHasFocus()){var h=c.set("hasFocus",!1);e.props.onBlur&&e.props.onBlur(t),e.update(n.acceptSelection(l,h))}}},46438(e,t,i){"use strict";var n=i(59539);e.exports=function(e,t){e.setMode("composite"),e.update(n.set(e._latestEditorState,{inCompositionMode:!0})),e._onCompositionStart(t)}},78073(e,t,i){"use strict";var n=i(13355);e.exports=function(e,t){e._latestEditorState.getSelection().isCollapsed()?t.preventDefault():e.setClipboard(n(e._latestEditorState))}},43046(e,t,i){"use strict";var n=i(58267),s=i(59539),r=i(98556),o=i(13355),a=i(93987),l=i(76871);e.exports=function(e,t){var i,c=e._latestEditorState,h=c.getSelection(),d=t.target;if(h.isCollapsed())t.preventDefault();else{if(l(d)){var u=d;i=a(r.getScrollParent(u))}var p=o(c);e.setClipboard(p),e.setMode("cut"),setTimeout(function(){e.restoreEditorDOM(i),e.exitCurrentMode(),e.update(function(e){var t=n.removeRange(e.getCurrentContent(),e.getSelection(),"forward");return s.push(e,t,"remove-range")}(c))},0)}}},76100(e){"use strict";e.exports=function(e,t){e.setMode("drag"),t.preventDefault()}},92244(e){"use strict";e.exports=function(e){e._internalDrag=!0,e.setMode("drag")}},38514(e,t,i){"use strict";var n=i(59539),s=i(63390);e.exports=function(e,t){var i=e._latestEditorState,r=i.getSelection();if(!r.getHasFocus()){var o=r.set("hasFocus",!0);e.props.onFocus&&e.props.onFocus(t),s.isBrowser("Chrome < 60.0.3081.0")?e.update(n.forceSelection(i,o)):e.update(n.acceptSelection(i,o))}}},29830(e,t,i){"use strict";var n=i(58267),s=i(13878),r=i(59539),o=i(63390),a=i(25070).notEmptyKey,l=i(65461),c=i(97402),h=i(25813),d=o.isEngine("Gecko");e.exports=function(e,t){void 0!==e._pendingStateFromBeforeInput&&(e.update(e._pendingStateFromBeforeInput),e._pendingStateFromBeforeInput=void 0);var i=e.editor.ownerDocument.defaultView.getSelection(),o=i.anchorNode,u=i.isCollapsed,p=(null==o?void 0:o.nodeType)!==Node.TEXT_NODE&&(null==o?void 0:o.nodeType)!==Node.ELEMENT_NODE;if(null!=o&&!p){if(o.nodeType===Node.TEXT_NODE&&(null!==o.previousSibling||null!==o.nextSibling)){var g=o.parentNode;if(null==g)return;o.nodeValue=g.textContent;for(var f=g.firstChild;null!=f;f=f.nextSibling)f!==o&&g.removeChild(f)}var m=o.textContent,v=e._latestEditorState,y=h(l(o)),C=s.decode(y),b=C.blockKey,S=C.decoratorKey,w=C.leafKey,x=v.getBlockTree(b).getIn([S,"leaves",w]),E=x.start,M=x.end,A=v.getCurrentContent(),T=A.getBlockForKey(b),D=T.getText().slice(E,M);if(m.endsWith("\n\n")&&(m=m.slice(0,-1)),m!==D){var I,R,L,k,P=v.getSelection(),N=P.merge({anchorOffset:E,focusOffset:M,isBackward:!1}),O=T.getEntityAt(E),_=a(O)?A.getEntity(O):null,F="MUTABLE"===(null!=_?_.getMutability():null),G=F?"spellcheck-change":"apply-entity",V=n.replaceText(A,N,m,T.getInlineStyleAt(E),F?T.getEntityAt(E):null);if(d)I=i.anchorOffset,R=i.focusOffset,k=(L=E+Math.min(I,R))+Math.abs(I-R),I=L,R=k;else{var B=m.length-D.length;L=P.getStartOffset(),k=P.getEndOffset(),I=u?k+B:L,R=k+B}var H=V.merge({selectionBefore:A.getSelectionAfter(),selectionAfter:P.merge({anchorOffset:I,focusOffset:R})});e.update(r.push(v,H,G))}else{var z=t.nativeEvent.inputType;if(z){var U=function(e,t){return"deleteContentBackward"===e?c(t):t}(z,v);if(U!==v)return e.restoreEditorDOM(),void e.update(U)}}}}},41345(e,t,i){"use strict";var n=i(58267),s=i(59539),r=i(8117),o=i(4617),a=i(56109),l=i(63390),c=i(46415),h=i(50976),d=i(44126),u=i(27130),p=i(79774),g=i(11644),f=i(63467),m=i(97402),v=i(12750),y=i(2194),C=i(38707),b=r.isOptionKeyCommand,S=l.isBrowser("Chrome");e.exports=function(e,t){var i=t.which,r=e._latestEditorState;function l(i){var n=e.props[i];return!!n&&(n(t),!0)}switch(i){case o.RETURN:if(t.preventDefault(),e.props.handleReturn&&c(e.props.handleReturn(t,r)))return;break;case o.ESC:if(t.preventDefault(),l("onEscape"))return;break;case o.TAB:if(l("onTab"))return;break;case o.UP:if(l("onUpArrow"))return;break;case o.RIGHT:if(l("onRightArrow"))return;break;case o.DOWN:if(l("onDownArrow"))return;break;case o.LEFT:if(l("onLeftArrow"))return;break;case o.SPACE:S&&b(t)&&t.preventDefault()}var w=e.props.keyBindingFn(t);if(null!=w&&""!==w)if("undo"!==w){if(t.preventDefault(),!e.props.handleKeyCommand||!c(e.props.handleKeyCommand(w,r,t.timeStamp))){var x=function(e,t,i){switch(e){case"redo":return s.redo(t);case"delete":return v(t);case"delete-word":return u(t);case"backspace":return m(t);case"backspace-word":return d(t);case"backspace-to-start-of-line":return h(t,i);case"split-block":return p(t);case"transpose-characters":return y(t);case"move-selection-to-start-of-block":return f(t);case"move-selection-to-end-of-block":return g(t);case"secondary-cut":return a.cut(t);case"secondary-paste":return a.paste(t);default:return t}}(w,r,t);x!==r&&e.update(x)}}else C(t,r,e.update);else if(i===o.SPACE&&S&&b(t)){var E=n.replaceText(r.getCurrentContent(),r.getSelection()," ");e.update(s.push(r,E,"insert-characters"))}}},35346(e,t,i){"use strict";var n=i(84433),s=i(41671),r=i(81354),o=i(58267),a=i(42471),l=i(59539),c=i(75969),h=i(60836),d=i(27786),u=i(46415),p=i(55585);function g(e,t,i){var n=o.replaceWithFragment(e.getCurrentContent(),e.getSelection(),t);return l.push(e,n.set("entityMap",i),"insert-fragment")}e.exports=function(e,t){t.preventDefault();var i=new r(t.clipboardData);if(!i.isRichText()){var f=i.getFiles(),m=i.getText();if(f.length>0){if(e.props.handlePastedFiles&&u(e.props.handlePastedFiles(f)))return;return void d(f,function(t){if(t=t||m){var i=e._latestEditorState,r=p(t),d=s.create({style:i.getCurrentInlineStyle(),entity:h(i.getCurrentContent(),i.getSelection())}),u=c.getCurrentBlockType(i),g=a.processText(r,d,u),f=n.createFromArray(g),v=o.replaceWithFragment(i.getCurrentContent(),i.getSelection(),f);e.update(l.push(i,v,"insert-fragment"))}})}}var v=[],y=i.getText(),C=i.getHTML(),b=e._latestEditorState;if(e.props.formatPastedText){var S=e.props.formatPastedText(y,C);y=S.text,C=S.html}if(!e.props.handlePastedText||!u(e.props.handlePastedText(y,C,b))){if(y&&(v=p(y)),!e.props.stripPastedStyles){var w,x=e.getClipboard();if(!e.props.formatPastedText&&i.isRichText()&&x){if(-1!==(null===(w=C)||void 0===w?void 0:w.indexOf(e.getEditorKey()))||1===v.length&&1===x.size&&x.first().getText()===y)return void e.update(g(e._latestEditorState,x))}else if(x&&i.types.includes("com.apple.webarchive")&&!i.types.includes("text/html")&&function(e,t){return e.length===t.size&&t.valueSeq().every(function(t,i){return t.getText()===e[i]})}(v,x))return void e.update(g(e._latestEditorState,x));if(C){var E=a.processHTML(C,e.props.blockRenderMap);if(E){var M=E.contentBlocks,A=E.entityMap;if(M){var T=n.createFromArray(M);return void e.update(g(e._latestEditorState,T,A))}}}e.setClipboard(null)}if(v.length){var D=s.create({style:b.getCurrentInlineStyle(),entity:h(b.getCurrentContent(),b.getSelection())}),I=c.getCurrentBlockType(b),R=a.processText(v,D,I),L=n.createFromArray(R);e.update(g(e._latestEditorState,L))}}}},10292(e,t,i){"use strict";var n=i(35693),s=i(59539),r=i(71093),o=i(15801);e.exports=function(e){if(e._blockSelectEvents||e._latestEditorState!==e.props.editorState){if(e._blockSelectEvents){var t=e.props.editorState.getSelection();n.logBlockedSelectionEvent({anonymizedDom:"N/A",extraParams:JSON.stringify({stacktrace:(new Error).stack}),selectionState:JSON.stringify(t.toJS())})}}else{var i=e.props.editorState,a=o(i,r(e)),l=a.selectionState;l!==i.getSelection()&&(i=a.needsRecovery?s.forceSelection(i,l):s.acceptSelection(i,l),e.update(i))}}},30370(e,t,i){"use strict";var n=i(93184),s=i(13145).strlen;e.exports=function(e,t){var i=[];return e.findEntityRanges(function(e){return!!e.getEntity()},function(r,o){var a=e.getText(),l=e.getEntityAt(r);i.push({offset:s(a.slice(0,r)),length:s(a.slice(r,o)),key:Number(t[n.stringify(l)])})}),i}},3399(e,t,i){"use strict";var n=i(13145),s=i(14910),r=function(e,t){return e===t},o=function(e){return!!e},a=[];e.exports=function(e){var t=e.getCharacterList().map(function(e){return e.getStyle()}).toList(),i=t.flatten().toSet().map(function(i){return function(e,t,i){var a=[],l=t.map(function(e){return e.has(i)}).toList();return s(l,r,o,function(t,s){var r=e.getText();a.push({offset:n.strlen(r.slice(0,t)),length:n.strlen(r.slice(t,s)),style:i})}),a}(e,t,i)});return Array.prototype.concat.apply(a,i.toJS())}},31950(e,t,i){"use strict";var n=i(13145),s=i(82097),r=i(45072),o=i(40041);function a(e,t){for(var i=1/0,n=1/0,s=-1/0,r=-1/0,o=0;o<e.length;o++){var a=e[o];0!==a.width&&1!==a.width&&(i=Math.min(i,a.top),n=Math.min(n,a.bottom),s=Math.max(s,a.top),r=Math.max(r,a.bottom))}return s<=n&&s-i<t&&r-n<t}function l(e){switch(e.nodeType){case Node.DOCUMENT_TYPE_NODE:return 0;case Node.TEXT_NODE:case Node.PROCESSING_INSTRUCTION_NODE:case Node.COMMENT_NODE:return e.length;default:return e.childNodes.length}}e.exports=function(e){e.collapsed||o(!1);var t=(e=e.cloneRange()).startContainer;1!==t.nodeType&&(t=t.parentNode);var i=function(e){var t=getComputedStyle(e),i=s(e),n=i.createElement("div");n.style.fontFamily=t.fontFamily,n.style.fontSize=t.fontSize,n.style.fontStyle=t.fontStyle,n.style.fontWeight=t.fontWeight,n.style.lineHeight=t.lineHeight,n.style.position="absolute",n.textContent="M";var r=i.body;r||o(!1),r.appendChild(n);var a=n.getBoundingClientRect();return r.removeChild(n),a.height}(t),c=e.endContainer,h=e.endOffset;for(e.setStart(e.startContainer,0);a(r(e),i)&&(c=e.startContainer,h=e.startOffset,c.parentNode||o(!1),e.setStartBefore(c),1!==c.nodeType||"inline"===getComputedStyle(c).display););for(var d=c,u=h-1;;){for(var p=d.nodeValue,g=u;g>=0;g--)if(!(null!=p&&g>0&&n.isSurrogatePair(p,g-1))){if(e.setStart(d,g),!a(r(e),i))break;c=d,h=g}if(-1===g||0===d.childNodes.length)break;u=l(d=d.childNodes[g])}return e.setStart(c,h),e}},65461(e,t,i){"use strict";var n=i(82097),s=i(39762);e.exports=function(e){for(var t=e;t&&t!==n(e).documentElement;){var i=s(t);if(null!=i)return i;t=t.parentNode}return null}},14910(e){"use strict";e.exports=function(e,t,i,n){if(e.size){var s=0;e.reduce(function(e,r,o){return t(e,r)||(i(e)&&n(s,o),s=o),r}),i(e.last())&&n(s,e.count())}}},12634(e){"use strict";var t={},i=Math.pow(2,24);e.exports=function(){for(var e;void 0===e||t.hasOwnProperty(e)||!isNaN(+e);)e=Math.floor(Math.random()*i).toString(32);return t[e]=!0,e}},64047(e,t,i){"use strict";var n=i(451),s=i(23474),r=i(40041);function o(e,t,i,o,a,l,c){var h=i.getStartOffset(),d=i.getEndOffset(),u=e.__get(a).getMutability(),p=c?h:d;if("MUTABLE"===u)return i;var g=s(t,a).filter(function(e){return p<=e.end&&p>=e.start});1!=g.length&&r(!1);var f=g[0];if("IMMUTABLE"===u)return i.merge({anchorOffset:f.start,focusOffset:f.end,isBackward:!1});l||(c?d=f.end:h=f.start);var m=n.getRemovalRange(h,d,t.getText().slice(f.start,f.end),f.start,o);return i.merge({anchorOffset:m.start,focusOffset:m.end,isBackward:!1})}e.exports=function(e,t,i,n,s){var r=n.getStartOffset(),a=n.getEndOffset(),l=t.getEntityAt(r),c=i.getEntityAt(a-1);if(!l&&!c)return n;var h=n;if(l&&l===c)h=o(e,t,h,s,l,!0,!0);else if(l&&c){var d=o(e,t,h,s,l,!1,!0),u=o(e,i,h,s,c,!1,!1);h=h.merge({anchorOffset:d.getAnchorOffset(),focusOffset:u.getFocusOffset(),isBackward:!1})}else if(l){var p=o(e,t,h,s,l,!1,!0);h=h.merge({anchorOffset:p.getStartOffset(),isBackward:!1})}else if(c){var g=o(e,i,h,s,c,!1,!1);h=h.merge({focusOffset:g.getEndOffset(),isBackward:!1})}return h}},71093(e,t,i){"use strict";var n=i(40041),s=i(44110);e.exports=function(e){var t=e.editorContainer;return t||n(!1),s(t.firstChild)||n(!1),t.firstChild}},54095(e,t,i){"use strict";var n=i(30287),s=i(91825);e.exports=function(e,t){var i=t.getStartKey(),r=t.getStartOffset(),o=t.getEndKey(),a=t.getEndOffset(),l=s(e,t).getBlockMap(),c=l.keySeq(),h=c.indexOf(i),d=c.indexOf(o)+1;return n(l.slice(h,d).map(function(e,t){var n=e.getText(),s=e.getCharacterList();return i===o?e.merge({text:n.slice(r,a),characterList:s.slice(r,a)}):t===i?e.merge({text:n.slice(r),characterList:s.slice(r)}):t===o?e.merge({text:n.slice(0,a),characterList:s.slice(0,a)}):e}))}},82097(e){"use strict";e.exports=function(e){return e&&e.ownerDocument?e.ownerDocument:document}},93564(e,t,i){"use strict";var n=i(8117),s=i(4617),r=i(63390),o=r.isPlatform("Mac OS X"),a=o&&r.isBrowser("Firefox < 29"),l=n.hasCommandModifier,c=n.isCtrlKeyCommand;function h(e){return o&&e.altKey||c(e)}e.exports=function(e){switch(e.keyCode){case 66:return l(e)?"bold":null;case 68:return c(e)?"delete":null;case 72:return c(e)?"backspace":null;case 73:return l(e)?"italic":null;case 74:return l(e)?"code":null;case 75:return o&&c(e)?"secondary-cut":null;case 77:case 79:return c(e)?"split-block":null;case 84:return o&&c(e)?"transpose-characters":null;case 85:return l(e)?"underline":null;case 87:return o&&c(e)?"backspace-word":null;case 89:return c(e)?o?"secondary-paste":"redo":null;case 90:return function(e){return l(e)?e.shiftKey?"redo":"undo":null}(e)||null;case s.RETURN:return"split-block";case s.DELETE:return function(e){return!o&&e.shiftKey?null:h(e)?"delete-word":"delete"}(e);case s.BACKSPACE:return function(e){return l(e)&&o?"backspace-to-start-of-line":h(e)?"backspace-word":"backspace"}(e);case s.LEFT:return a&&l(e)?"move-selection-to-start-of-block":null;case s.RIGHT:return a&&l(e)?"move-selection-to-end-of-block":null;default:return null}}},15801(e,t,i){"use strict";var n=i(89668);e.exports=function(e,t){var i=t.ownerDocument.defaultView.getSelection(),s=i.anchorNode,r=i.anchorOffset,o=i.focusNode,a=i.focusOffset;return 0===i.rangeCount||null==s||null==o?{selectionState:e.getSelection().set("hasFocus",!1),needsRecovery:!1}:n(e,t,s,r,o,a)}},89668(e,t,i){"use strict";var n=i(65461),s=i(39762),r=i(69397),o=i(40041),a=i(66305),l=i(25813);function c(e,t,i){var r=t,c=n(r);if(null!=c||e&&(e===r||e.firstChild===r)||o(!1),e===r&&(r=r.firstChild,a(r)||o(!1),"true"!==r.getAttribute("data-contents")&&o(!1),i>0&&(i=r.childNodes.length)),0===i){var d=null;if(null!=c)d=c;else{var u=function(e){for(;e.firstChild&&(a(e.firstChild)&&"true"===e.firstChild.getAttribute("data-blocks")||s(e.firstChild));)e=e.firstChild;return e}(r);d=l(s(u))}return{key:d,offset:0}}var p=r.childNodes[i-1],g=null,f=null;if(s(p)){var m=function(e){for(;e.lastChild&&(a(e.lastChild)&&"true"===e.lastChild.getAttribute("data-blocks")||s(e.lastChild));)e=e.lastChild;return e}(p);g=l(s(m)),f=h(m)}else g=l(c),f=h(p);return{key:g,offset:f}}function h(e){var t=e.textContent;return"\n"===t?0:t.length}e.exports=function(e,t,i,s,o,a){var h=i.nodeType===Node.TEXT_NODE,d=o.nodeType===Node.TEXT_NODE;if(h&&d)return{selectionState:r(e,l(n(i)),s,l(n(o)),a),needsRecovery:!1};var u=null,p=null,g=!0;return h?(u={key:l(n(i)),offset:s},p=c(t,o,a)):d?(p={key:l(n(o)),offset:a},u=c(t,i,s)):(u=c(t,i,s),p=c(t,o,a),i===o&&s===a&&(g=!!i.firstChild&&"BR"!==i.firstChild.nodeName)),{selectionState:r(e,u.key,u.offset,p.key,p.offset),needsRecovery:g}}},60836(e,t,i){"use strict";var n=i(25070).notEmptyKey;function s(e,t){return n(t)&&"MUTABLE"===e.__get(t).getMutability()?t:null}e.exports=function(e,t){var i;if(t.isCollapsed()){var n=t.getAnchorKey(),r=t.getAnchorOffset();return r>0?(i=e.getBlockForKey(n).getEntityAt(r-1))!==e.getBlockForKey(n).getEntityAt(r)?null:s(e.getEntityMap(),i):null}var o=t.getStartKey(),a=t.getStartOffset(),l=e.getBlockForKey(o);return i=a===l.getLength()?null:l.getEntityAt(a),s(e.getEntityMap(),i)}},13355(e,t,i){"use strict";var n=i(54095);e.exports=function(e){var t=e.getSelection();return t.isCollapsed()?null:n(e.getCurrentContent(),t)}},26167(e,t,i){"use strict";var n=i(31527);e.exports=function(e,t){if(!(e instanceof n))return null;var i=e.getNextSiblingKey();if(i)return i;var s=e.getParentKey();if(!s)return null;for(var r=t.get(s);r&&!r.getNextSiblingKey();){var o=r.getParentKey();r=o?t.get(o):null}return r?r.getNextSiblingKey():null}},68768(e){"use strict";e.exports=function(e){return Object.keys(e).map(function(t){return e[t]})}},66017(e,t,i){"use strict";var n=i(45072);e.exports=function(e){var t=n(e),i=0,s=0,r=0,o=0;if(t.length){if(t.length>1&&0===t[0].width){var a=t[1];i=a.top,s=a.right,r=a.bottom,o=a.left}else{var l=t[0];i=l.top,s=l.right,r=l.bottom,o=l.left}for(var c=1;c<t.length;c++){var h=t[c];0!==h.height&&0!==h.width&&(i=Math.min(i,h.top),s=Math.max(s,h.right),r=Math.max(r,h.bottom),o=Math.min(o,h.left))}}return{top:i,right:s,bottom:r,left:o,width:s-o,height:r-i}}},45072(e,t,i){"use strict";var n=i(63390),s=i(40041),r=n.isBrowser("Chrome")?function(e){for(var t=e.cloneRange(),i=[],n=e.endContainer;null!=n;n=n.parentNode){var r=n===e.commonAncestorContainer;r?t.setStart(e.startContainer,e.startOffset):t.setStart(t.endContainer,0);var o,a=Array.from(t.getClientRects());if(i.push(a),r)return i.reverse(),(o=[]).concat.apply(o,i);t.setEndBefore(n)}s(!1)}:function(e){return Array.from(e.getClientRects())};e.exports=r},23474(e,t,i){"use strict";var n=i(40041);e.exports=function(e,t){var i=[];return e.findEntityRanges(function(e){return e.getEntity()===t},function(e,t){i.push({start:e,end:t})}),i.length||n(!1),i}},38413(e,t,i){"use strict";var n=i(63390),s=i(40041),r=n.isBrowser("IE <= 9");e.exports=function(e){var t,i=null;return!r&&document.implementation&&document.implementation.createHTMLDocument&&((t=document.implementation.createHTMLDocument("foo")).documentElement||s(!1),t.documentElement.innerHTML=e,i=t.getElementsByTagName("body")[0]),i}},39762(e,t,i){"use strict";var n=i(66305);e.exports=function e(t){if(n(t)){var i=t,s=i.getAttribute("data-offset-key");if(s)return s;for(var r=0;r<i.childNodes.length;r++){var o=e(i.childNodes[r]);if(o)return o}}return null}},27786(e,t,i){"use strict";var n=i(40041),s=/\.textClipping$/,r={"text/plain":!0,"text/html":!0,"text/rtf":!0};e.exports=function(e,t){var o=0,a=[];e.forEach(function(l){!function(e,t){if(!i.g.FileReader||e.type&&!(e.type in r))t("");else{if(""===e.type){var o="";return s.test(e.name)&&(o=e.name.replace(s,"")),void t(o)}var a=new FileReader;a.onload=function(){var e=a.result;"string"!=typeof e&&n(!1),t(e)},a.onerror=function(){t("")},a.readAsText(e)}}(l,function(i){o++,i&&a.push(i.slice(0,5e3)),o==e.length&&t(a.join("\r"))})})}},69397(e,t,i){"use strict";var n=i(13878),s=i(25813);e.exports=function(e,t,i,r,o){var a=s(e.getSelection());if(!t||!r)return a;var l=n.decode(t),c=l.blockKey,h=e.getBlockTree(c),d=h&&h.getIn([l.decoratorKey,"leaves",l.leafKey]),u=n.decode(r),p=u.blockKey,g=e.getBlockTree(p),f=g&&g.getIn([u.decoratorKey,"leaves",u.leafKey]);if(!d||!f)return a;var m=d.get("start"),v=f.get("start"),y=d?m+i:null,C=f?v+o:null;if(a.getAnchorKey()===c&&a.getAnchorOffset()===y&&a.getFocusKey()===p&&a.getFocusOffset()===C)return a;var b=!1;if(c===p){var S=d.get("end"),w=f.get("end");b=v===m&&w===S?o<i:v<m}else b=e.getCurrentContent().getBlockMap().keySeq().skipUntil(function(e){return e===c||e===p}).first()===p;return a.merge({anchorKey:c,anchorOffset:y,focusKey:p,focusOffset:C,isBackward:b})}},50531(e,t,i){"use strict";var n=i(66017);e.exports=function(e){var t=e.getSelection();if(!t.rangeCount)return null;var i=t.getRangeAt(0),s=n(i),r=s.top,o=s.right,a=s.bottom,l=s.left;return 0===r&&0===o&&0===a&&0===l?null:s}},82826(e){"use strict";e.exports=function(e){return e&&e.ownerDocument&&e.ownerDocument.defaultView?e.ownerDocument.defaultView:window}},17595(e){"use strict";e.exports=function(e){return!("undefined"==typeof window||!window.__DRAFT_GKX||!window.__DRAFT_GKX[e])}},72368(e,t,i){"use strict";var n=i(84433),s=i(31527),r=i(21829),o=i(86374),a=i(40041),l=i(30287),c=r.List;e.exports=function(e,t,i){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"REPLACE_WITH_NEW_DATA";t.isCollapsed()||a(!1);var h=e.getBlockMap(),d=l(i),u=t.getStartKey(),p=t.getStartOffset(),g=h.get(u);return g instanceof s&&(g.getChildKeys().isEmpty()||a(!1)),1===d.size?function(e,t,i,n,s,r){var a=arguments.length>6&&void 0!==arguments[6]?arguments[6]:"REPLACE_WITH_NEW_DATA",l=i.get(s),c=l.getText(),h=l.getCharacterList(),d=s,u=r+n.getText().length,p=null;switch(a){case"MERGE_OLD_DATA_TO_NEW_DATA":p=n.getData().merge(l.getData());break;case"REPLACE_WITH_NEW_DATA":p=n.getData()}var g=l.getType();c&&"unstyled"===g&&(g=n.getType());var f=l.merge({text:c.slice(0,r)+n.getText()+c.slice(r),characterList:o(h,n.getCharacterList(),r),type:g,data:p});return e.merge({blockMap:i.set(s,f),selectionBefore:t,selectionAfter:t.merge({anchorKey:d,anchorOffset:u,focusKey:d,focusOffset:u,isBackward:!1})})}(e,t,h,d.first(),u,p,r):function(e,t,i,r,o,a){var l=i.first()instanceof s,h=[],d=r.size,u=i.get(o),p=r.first(),g=r.last(),f=g.getLength(),m=g.getKey(),v=l&&(!u.getChildKeys().isEmpty()||!p.getChildKeys().isEmpty());i.forEach(function(e,t){t===o?(v?h.push(e):h.push(function(e,t,i){var n=e.getText(),s=e.getCharacterList(),r=n.slice(0,t),o=s.slice(0,t),a=i.first();return e.merge({text:r+a.getText(),characterList:o.concat(a.getCharacterList()),type:r?e.getType():a.getType(),data:a.getData()})}(e,a,r)),r.slice(v?0:1,d-1).forEach(function(e){return h.push(e)}),h.push(function(e,t,i){var n=e.getText(),s=e.getCharacterList(),r=n.length,o=n.slice(t,r),a=s.slice(t,r),l=i.last();return l.merge({text:l.getText()+o,characterList:l.getCharacterList().concat(a),data:l.getData()})}(e,a,r))):h.push(e)});var y=n.createFromArray(h);return l&&(y=function(e,t,i,n){return e.withMutations(function(t){var s=i.getKey(),r=n.getKey(),o=i.getNextSiblingKey(),a=i.getParentKey(),l=function(e,t){var i=e.getKey(),n=e,s=[];for(t.get(i)&&s.push(i);n&&n.getNextSiblingKey();){var r=n.getNextSiblingKey();if(!r)break;s.push(r),n=t.get(r)}return s}(n,e),h=l[l.length-1];if(t.get(r)?(t.setIn([s,"nextSibling"],r),t.setIn([r,"prevSibling"],s)):(t.setIn([s,"nextSibling"],n.getNextSiblingKey()),t.setIn([n.getNextSiblingKey(),"prevSibling"],s)),t.setIn([h,"nextSibling"],o),o&&t.setIn([o,"prevSibling"],h),l.forEach(function(e){return t.setIn([e,"parent"],a)}),a){var d=e.get(a).getChildKeys(),u=d.indexOf(s)+1,p=d.toArray();p.splice.apply(p,[u,0].concat(l)),t.setIn([a,"children"],c(p))}})}(y,0,u,p)),e.merge({blockMap:y,selectionBefore:t,selectionAfter:t.merge({anchorKey:m,anchorOffset:f,focusKey:m,focusOffset:f,isBackward:!1})})}(e,t,h,d,u,p)}},86374(e){"use strict";e.exports=function(e,t,i){var n=e;if(i===n.count())t.forEach(function(e){n=n.push(e)});else if(0===i)t.reverse().forEach(function(e){n=n.unshift(e)});else{var s=n.slice(0,i),r=n.slice(i);n=s.concat(t,r).toList()}return n}},32983(e,t,i){"use strict";var n=i(21829),s=i(86374),r=i(40041),o=n.Repeat;e.exports=function(e,t,i,n){t.isCollapsed()||r(!1);var a=null;if(null!=i&&(a=i.length),null==a||0===a)return e;var l=e.getBlockMap(),c=t.getStartKey(),h=t.getStartOffset(),d=l.get(c),u=d.getText(),p=d.merge({text:u.slice(0,h)+i+u.slice(h,d.getLength()),characterList:s(d.getCharacterList(),o(n,a).toList(),h)}),g=h+a;return e.merge({blockMap:l.set(c,p),selectionAfter:t.merge({anchorOffset:g,focusOffset:g})})}},66305(e){"use strict";e.exports=function(e){return!(!e||!e.ownerDocument)&&e.nodeType===Node.ELEMENT_NODE}},46415(e){"use strict";e.exports=function(e){return"handled"===e||!0===e}},34189(e,t,i){"use strict";var n=i(66305);e.exports=function(e){return!(!e||!e.ownerDocument)&&n(e)&&"A"===e.nodeName}},4734(e,t,i){"use strict";var n=i(66305);e.exports=function(e){return!(!e||!e.ownerDocument)&&n(e)&&"BR"===e.nodeName}},44110(e){"use strict";e.exports=function(e){return!(!e||!e.ownerDocument)&&(e.ownerDocument.defaultView?e instanceof e.ownerDocument.defaultView.HTMLElement:e instanceof HTMLElement)}},80119(e,t,i){"use strict";var n=i(66305);e.exports=function(e){return!(!e||!e.ownerDocument)&&n(e)&&"IMG"===e.nodeName}},76871(e){"use strict";e.exports=function(e){if(!e||!("ownerDocument"in e))return!1;if("ownerDocument"in e){var t=e;if(!t.ownerDocument.defaultView)return t instanceof Node;if(t instanceof t.ownerDocument.defaultView.Node)return!0}return!1}},65044(e){"use strict";e.exports=function(e){var t=e.getSelection(),i=t.getAnchorKey(),n=e.getBlockTree(i),s=t.getStartOffset(),r=!1;return n.some(function(e){return s===e.get("start")?(r=!0,!0):s<e.get("end")&&e.get("leaves").some(function(e){var t=e.get("start");return s===t&&(r=!0,!0)})}),r}},97253(e,t,i){"use strict";var n=i(4617);e.exports=function(e){return e.which===n.RETURN&&(e.getModifierState("Shift")||e.getModifierState("Alt")||e.getModifierState("Control"))}},50976(e,t,i){"use strict";var n=i(59539),s=i(31950),r=i(89668),o=i(95625),a=i(16335);e.exports=function(e,t){var i=a(e,function(e){var i=e.getSelection();if(i.isCollapsed()&&0===i.getAnchorOffset())return o(e,1);var n=t.currentTarget.ownerDocument.defaultView.getSelection().getRangeAt(0);return n=s(n),r(e,null,n.endContainer,n.endOffset,n.startContainer,n.startOffset).selectionState},"backward");return i===e.getCurrentContent()?e:n.push(e,i,"remove-range")}},44126(e,t,i){"use strict";var n=i(76425),s=i(59539),r=i(95625),o=i(16335);e.exports=function(e){var t=o(e,function(e){var t=e.getSelection(),i=t.getStartOffset();if(0===i)return r(e,1);var s=t.getStartKey(),o=e.getCurrentContent().getBlockForKey(s).getText().slice(0,i),a=n.getBackward(o);return r(e,a.length||1)},"backward");return t===e.getCurrentContent()?e:s.push(e,t,"remove-range")}},27130(e,t,i){"use strict";var n=i(76425),s=i(59539),r=i(30919),o=i(16335);e.exports=function(e){var t=o(e,function(e){var t=e.getSelection(),i=t.getStartOffset(),s=t.getStartKey(),o=e.getCurrentContent().getBlockForKey(s).getText().slice(i),a=n.getForward(o);return r(e,a.length||1)},"forward");return t===e.getCurrentContent()?e:s.push(e,t,"remove-range")}},79774(e,t,i){"use strict";var n=i(58267),s=i(59539);e.exports=function(e){var t=n.splitBlock(e.getCurrentContent(),e.getSelection());return s.push(e,t,"split-block")}},11644(e,t,i){"use strict";var n=i(59539);e.exports=function(e){var t=e.getSelection(),i=t.getEndKey(),s=e.getCurrentContent().getBlockForKey(i).getLength();return n.set(e,{selection:t.merge({anchorKey:i,anchorOffset:s,focusKey:i,focusOffset:s,isBackward:!1}),forceSelection:!0})}},63467(e,t,i){"use strict";var n=i(59539);e.exports=function(e){var t=e.getSelection(),i=t.getStartKey();return n.set(e,{selection:t.merge({anchorKey:i,anchorOffset:0,focusKey:i,focusOffset:0,isBackward:!1}),forceSelection:!0})}},97402(e,t,i){"use strict";var n=i(59539),s=i(13145),r=i(95625),o=i(16335);e.exports=function(e){var t=o(e,function(e){var t=e.getSelection(),i=e.getCurrentContent(),n=t.getAnchorKey(),o=t.getAnchorOffset(),a=i.getBlockForKey(n).getText()[o-1];return r(e,a?s.getUTF16Length(a,0):1)},"backward");if(t===e.getCurrentContent())return e;var i=e.getSelection();return n.push(e,t.set("selectionBefore",i),i.isCollapsed()?"backspace-character":"remove-range")}},12750(e,t,i){"use strict";var n=i(59539),s=i(13145),r=i(30919),o=i(16335);e.exports=function(e){var t=o(e,function(e){var t=e.getSelection(),i=e.getCurrentContent(),n=t.getAnchorKey(),o=t.getAnchorOffset(),a=i.getBlockForKey(n).getText()[o];return r(e,a?s.getUTF16Length(a,0):1)},"forward");if(t===e.getCurrentContent())return e;var i=e.getSelection();return n.push(e,t.set("selectionBefore",i),i.isCollapsed()?"delete-character":"remove-range")}},2194(e,t,i){"use strict";var n=i(58267),s=i(59539),r=i(54095);e.exports=function(e){var t=e.getSelection();if(!t.isCollapsed())return e;var i=t.getAnchorOffset();if(0===i)return e;var o,a,l=t.getAnchorKey(),c=e.getCurrentContent(),h=c.getBlockForKey(l).getLength();if(h<=1)return e;i===h?(o=t.set("anchorOffset",i-1),a=t):a=(o=t.set("focusOffset",i+1)).set("anchorOffset",i+1);var d=r(c,o),u=n.removeRange(c,o,"backward"),p=u.getSelectionAfter(),g=p.getAnchorOffset()-1,f=p.merge({anchorOffset:g,focusOffset:g}),m=n.replaceWithFragment(u,f,d),v=s.push(e,m,"insert-fragment");return s.acceptSelection(v,a)}},38707(e,t,i){"use strict";var n=i(59539);e.exports=function(e,t,i){var s=n.undo(t);if("spellcheck-change"!==t.getLastChangeType())e.preventDefault(),t.getNativelyRenderedContent()?(i(n.set(t,{nativelyRenderedContent:null})),setTimeout(function(){i(s)},0)):i(s);else{var r=s.getCurrentContent();i(n.set(s,{nativelyRenderedContent:r}))}}},79981(e,t,i){"use strict";var n=i(21829).Map;e.exports=function(e,t,i){var s=t.getStartKey(),r=t.getEndKey(),o=e.getBlockMap(),a=o.toSeq().skipUntil(function(e,t){return t===s}).takeUntil(function(e,t){return t===r}).concat(n([[r,o.get(r)]])).map(i);return e.merge({blockMap:o.merge(a),selectionBefore:t,selectionAfter:t})}},83886(e,t,i){"use strict";var n=i(31527),s=i(26167),r=i(21829),o=i(40041),a=r.OrderedMap,l=r.List,c=function(e,t,i){if(e){var n=t.get(e);n&&t.set(e,i(n))}},h=function(e,t,i,n,s){if(!s)return e;var r="after"===n,o=t.getKey(),a=i.getKey(),h=t.getParentKey(),d=t.getNextSiblingKey(),u=t.getPrevSiblingKey(),p=i.getParentKey(),g=r?i.getNextSiblingKey():a,f=r?a:i.getPrevSiblingKey();return e.withMutations(function(e){c(h,e,function(e){var t=e.getChildKeys();return e.merge({children:t.delete(t.indexOf(o))})}),c(u,e,function(e){return e.merge({nextSibling:d})}),c(d,e,function(e){return e.merge({prevSibling:u})}),c(g,e,function(e){return e.merge({prevSibling:o})}),c(f,e,function(e){return e.merge({nextSibling:o})}),c(p,e,function(e){var t=e.getChildKeys(),i=t.indexOf(a),n=r?i+1:0!==i?i-1:0,s=t.toArray();return s.splice(n,0,o),e.merge({children:l(s)})}),c(o,e,function(e){return e.merge({nextSibling:g,prevSibling:f,parent:p})})})};e.exports=function(e,t,i,r){"replace"===r&&o(!1);var l=i.getKey(),c=t.getKey();c===l&&o(!1);var d=e.getBlockMap(),u=t instanceof n,p=[t],g=d.delete(c);u&&(p=[],g=d.withMutations(function(e){var i=t.getNextSiblingKey(),n=s(t,e);e.toSeq().skipUntil(function(e){return e.getKey()===c}).takeWhile(function(e){var t=e.getKey(),s=t===c,r=i&&t!==i,o=!i&&e.getParentKey()&&(!n||t!==n);return!!(s||r||o)}).forEach(function(t){p.push(t),e.delete(t.getKey())})}));var f=g.toSeq().takeUntil(function(e){return e===i}),m=g.toSeq().skipUntil(function(e){return e===i}).skip(1),v=p.map(function(e){return[e.getKey(),e]}),y=a();if("before"===r){var C=e.getBlockBefore(l);C&&C.getKey()===t.getKey()&&o(!1),y=f.concat([].concat(v,[[l,i]]),m).toOrderedMap()}else if("after"===r){var b=e.getBlockAfter(l);b&&b.getKey()===c&&o(!1),y=f.concat([[l,i]].concat(v),m).toOrderedMap()}return e.merge({blockMap:h(y,t,i,r,u),selectionBefore:e.getSelectionAfter(),selectionAfter:e.getSelectionAfter().merge({anchorKey:c,focusKey:c})})}},95625(e,t,i){"use strict";i(92697),e.exports=function(e,t){var i=e.getSelection(),n=e.getCurrentContent(),s=i.getStartKey(),r=i.getStartOffset(),o=s,a=0;if(t>r){var l=n.getKeyBefore(s);null==l?o=s:(o=l,a=n.getBlockForKey(l).getText().length)}else a=r-t;return i.merge({focusKey:o,focusOffset:a,isBackward:!0})}},30919(e,t,i){"use strict";i(92697),e.exports=function(e,t){var i,n=e.getSelection(),s=n.getStartKey(),r=n.getStartOffset(),o=e.getCurrentContent(),a=s;return t>o.getBlockForKey(s).getText().length-r?(a=o.getKeyAfter(s),i=0):i=r+t,n.merge({focusKey:a,focusOffset:i})}},30287(e,t,i){"use strict";var n=i(31527),s=i(12634),r=i(21829).OrderedMap;e.exports=function(e){return e.first()instanceof n?function(e){var t,i={};return r(e.withMutations(function(e){e.forEach(function(n,r){var o=n.getKey(),a=n.getNextSiblingKey(),l=n.getPrevSiblingKey(),c=n.getChildKeys(),h=n.getParentKey(),d=s();if(i[o]=d,a&&(e.get(a)?e.setIn([a,"prevSibling"],d):e.setIn([o,"nextSibling"],null)),l&&(e.get(l)?e.setIn([l,"nextSibling"],d):e.setIn([o,"prevSibling"],null)),h&&e.get(h)){var u=e.get(h).getChildKeys();e.setIn([h,"children"],u.set(u.indexOf(n.getKey()),d))}else e.setIn([o,"parent"],null),t&&(e.setIn([t.getKey(),"nextSibling"],d),e.setIn([o,"prevSibling"],i[t.getKey()])),t=e.get(o);c.forEach(function(t){e.get(t)?e.setIn([t,"parent"],d):e.setIn([o,"children"],n.getChildKeys().filter(function(e){return e!==t}))})})}).toArray().map(function(e){return[i[e.getKey()],e.set("key",i[e.getKey()])]}))}(e):function(e){return r(e.toArray().map(function(e){var t=s();return[t,e.set("key",t)]}))}(e)}},91825(e,t,i){"use strict";var n=i(41671),s=i(14910),r=i(40041);function o(e,t,i){var o=t.getCharacterList(),a=i>0?o.get(i-1):void 0,l=i<o.count()?o.get(i):void 0,c=a?a.getEntity():void 0,h=l?l.getEntity():void 0;if(h&&h===c&&"MUTABLE"!==e.__get(h).getMutability()){for(var d,u=function(e,t,i){var n;return s(e,function(e,t){return e.getEntity()===t.getEntity()},function(e){return e.getEntity()===t},function(e,t){e<=i&&t>=i&&(n={start:e,end:t})}),"object"!=typeof n&&r(!1),n}(o,h,i),p=u.start,g=u.end;p<g;)d=o.get(p),o=o.set(p,n.applyEntity(d,null)),p++;return t.set("characterList",o)}return t}e.exports=function(e,t){var i=e.getBlockMap(),n=e.getEntityMap(),s={},r=t.getStartKey(),a=t.getStartOffset(),l=i.get(r),c=o(n,l,a);c!==l&&(s[r]=c);var h=t.getEndKey(),d=t.getEndOffset(),u=i.get(h);r===h&&(u=c);var p=o(n,u,d);return p!==u&&(s[h]=p),Object.keys(s).length?e.merge({blockMap:i.merge(s),selectionAfter:t}):e.set("selectionAfter",t)}},5646(e,t,i){"use strict";var n=i(31527),s=i(26167),r=i(21829),o=(r.List,r.Map),a=function(e,t,i){if(e){var n=t.get(e);n&&t.set(e,i(n))}},l=function(e,t){var i=[];if(!e)return i;for(var n=t.get(e);n&&n.getParentKey();){var s=n.getParentKey();s&&i.push(s),n=s?t.get(s):null}return i},c=function(e,t,i){if(!e)return null;for(var n=i.get(e.getKey()).getNextSiblingKey();n&&!t.get(n);)n=i.get(n).getNextSiblingKey()||null;return n},h=function(e,t,i){if(!e)return null;for(var n=i.get(e.getKey()).getPrevSiblingKey();n&&!t.get(n);)n=i.get(n).getPrevSiblingKey()||null;return n};e.exports=function(e,t){if(t.isCollapsed())return e;var i,r=e.getBlockMap(),d=t.getStartKey(),u=t.getStartOffset(),p=t.getEndKey(),g=t.getEndOffset(),f=r.get(d),m=r.get(p),v=f instanceof n,y=[];if(v){var C=m.getChildKeys(),b=l(p,r);m.getNextSiblingKey()&&(y=y.concat(b)),C.isEmpty()||(y=y.concat(b.concat([p]))),y=y.concat(l(s(m,r),r))}i=f===m?function(e,t,i){if(0===t)for(;t<i;)e=e.shift(),t++;else if(i===e.count())for(;i>t;)e=e.pop(),i--;else{var n=e.slice(0,t),s=e.slice(i);e=n.concat(s).toList()}return e}(f.getCharacterList(),u,g):f.getCharacterList().slice(0,u).concat(m.getCharacterList().slice(g));var S=f.merge({text:f.getText().slice(0,u)+m.getText().slice(g),characterList:i}),w=v&&0===u&&0===g&&m.getParentKey()===d&&null==m.getPrevSiblingKey()?o([[d,null]]):r.toSeq().skipUntil(function(e,t){return t===d}).takeUntil(function(e,t){return t===p}).filter(function(e,t){return-1===y.indexOf(t)}).concat(o([[p,null]])).map(function(e,t){return t===d?S:null}),x=r.merge(w).filter(function(e){return!!e});return v&&f!==m&&(x=function(e,t,i,n){return e.withMutations(function(r){if(a(t.getKey(),r,function(e){return e.merge({nextSibling:c(e,r,n),prevSibling:h(e,r,n)})}),a(i.getKey(),r,function(e){return e.merge({nextSibling:c(e,r,n),prevSibling:h(e,r,n)})}),l(t.getKey(),n).forEach(function(e){return a(e,r,function(e){return e.merge({children:e.getChildKeys().filter(function(e){return r.get(e)}),nextSibling:c(e,r,n),prevSibling:h(e,r,n)})})}),a(t.getNextSiblingKey(),r,function(e){return e.merge({prevSibling:t.getPrevSiblingKey()})}),a(t.getPrevSiblingKey(),r,function(e){return e.merge({nextSibling:c(e,r,n)})}),a(i.getNextSiblingKey(),r,function(e){return e.merge({prevSibling:h(e,r,n)})}),a(i.getPrevSiblingKey(),r,function(e){return e.merge({nextSibling:i.getNextSiblingKey()})}),l(i.getKey(),n).forEach(function(e){a(e,r,function(e){return e.merge({children:e.getChildKeys().filter(function(e){return r.get(e)}),nextSibling:c(e,r,n),prevSibling:h(e,r,n)})})}),function(e,t){var i=[];if(!e)return i;for(var n=s(e,t);n&&t.get(n);){var r=t.get(n);i.push(n),n=r.getParentKey()?s(r,t):null}return i}(i,n).forEach(function(e){return a(e,r,function(e){return e.merge({nextSibling:c(e,r,n),prevSibling:h(e,r,n)})})}),null==e.get(t.getKey())&&null!=e.get(i.getKey())&&i.getParentKey()===t.getKey()&&null==i.getPrevSiblingKey()){var o=t.getPrevSiblingKey();a(i.getKey(),r,function(e){return e.merge({prevSibling:o})}),a(o,r,function(e){return e.merge({nextSibling:i.getKey()})});var d=o?e.get(o):null,u=d?d.getParentKey():null;if(t.getChildKeys().forEach(function(e){a(e,r,function(e){return e.merge({parent:u})})}),null!=u){var p=e.get(u);a(u,r,function(e){return e.merge({children:p.getChildKeys().concat(t.getChildKeys())})})}a(t.getChildKeys().find(function(t){return null===e.get(t).getNextSiblingKey()}),r,function(e){return e.merge({nextSibling:t.getNextSiblingKey()})})}})}(x,f,m,r)),e.merge({blockMap:x,selectionBefore:t,selectionAfter:t.merge({anchorKey:d,anchorOffset:u,focusKey:d,focusOffset:u,isBackward:!1})})}},16335(e,t,i){"use strict";var n=i(58267),s=i(17595)("draft_tree_data_support");e.exports=function(e,t,i){var r=e.getSelection(),o=e.getCurrentContent(),a=r,l=r.getAnchorKey(),c=r.getFocusKey(),h=o.getBlockForKey(l);if(s&&"forward"===i&&l!==c)return o;if(r.isCollapsed()){if("forward"===i){if(e.isSelectionAtEndOfContent())return o;if(s&&r.getAnchorOffset()===o.getBlockForKey(l).getLength()){var d=o.getBlockForKey(h.nextSibling);if(!d||0===d.getLength())return o}}else if(e.isSelectionAtStartOfContent())return o;if((a=t(e))===r)return o}return n.removeRange(o,a,i)}},10160(e){"use strict";var t=new RegExp("\r","g");e.exports=function(e){return e.replace(t,"")}},90933(e,t,i){"use strict";var n=i(7618),s=i(35693),r=i(63390),o=i(68820),a=i(53967),l=i(82097),c=i(40041),h=i(66305),d=r.isBrowser("IE");function u(e,t){if(!e)return"[empty]";var i=p(e,t);return i.nodeType===Node.TEXT_NODE?i.textContent:(h(i)||c(!1),i.outerHTML)}function p(e,t){var i=void 0!==t?t(e):[];if(e.nodeType===Node.TEXT_NODE){var n=e.textContent.length;return l(e).createTextNode("[text "+n+(i.length?" | "+i.join(", "):"")+"]")}var s=e.cloneNode();1===s.nodeType&&i.length&&s.setAttribute("data-labels",i.join(", "));for(var r=e.childNodes,o=0;o<r.length;o++)s.appendChild(p(r[o],t));return s}function g(e,t){for(var i=e,n=i;i;){if(h(i)&&n.hasAttribute("contenteditable"))return u(i,t);n=i=i.parentNode}return"Could not find contentEditable parent of node"}function f(e){return null===e.nodeValue?e.childNodes.length:e.nodeValue.length}function m(e,t,i,n){var r=a();if(e.extend&&null!=t&&o(r,t)){i>f(t)&&s.logSelectionStateFailure({anonymizedDom:g(t),extraParams:JSON.stringify({offset:i}),selectionState:JSON.stringify(n.toJS())});var l=t===e.focusNode;try{e.rangeCount>0&&e.extend&&e.extend(t,i)}catch(o){throw s.logSelectionStateFailure({anonymizedDom:g(t,function(t){var i=[];return t===r&&i.push("active element"),t===e.anchorNode&&i.push("selection anchor node"),t===e.focusNode&&i.push("selection focus node"),i}),extraParams:JSON.stringify({activeElementName:r?r.nodeName:null,nodeIsFocus:t===e.focusNode,nodeWasFocus:l,selectionRangeCount:e.rangeCount,selectionAnchorNodeName:e.anchorNode?e.anchorNode.nodeName:null,selectionAnchorOffset:e.anchorOffset,selectionFocusNodeName:e.focusNode?e.focusNode.nodeName:null,selectionFocusOffset:e.focusOffset,message:o?""+o:null,offset:i},null,2),selectionState:JSON.stringify(n.toJS(),null,2)}),o}}else if(t&&e.rangeCount>0){var c=e.getRangeAt(0);c.setEnd(t,i),e.addRange(c.cloneRange())}}function v(e,t,i,r){var o=l(t).createRange();if(i>f(t)&&(s.logSelectionStateFailure({anonymizedDom:g(t),extraParams:JSON.stringify({offset:i}),selectionState:JSON.stringify(r.toJS())}),n.handleExtensionCausedError()),o.setStart(t,i),d)try{e.addRange(o)}catch(e){}else e.addRange(o)}e.exports={setDraftEditorSelection:function(e,t,i,n,s){var r=l(t);if(o(r.documentElement,t)){var a=r.defaultView.getSelection(),c=e.getAnchorKey(),h=e.getAnchorOffset(),d=e.getFocusKey(),u=e.getFocusOffset(),p=e.getIsBackward();if(!a.extend&&p){var g=c,f=h;c=d,h=u,d=g,u=f,p=!1}var y=c===i&&n<=h&&s>=h,C=d===i&&n<=u&&s>=u;if(y&&C)return a.removeAllRanges(),v(a,t,h-n,e),void m(a,t,u-n,e);if(p){if(C&&(a.removeAllRanges(),v(a,t,u-n,e)),y){var b=a.focusNode,S=a.focusOffset;a.removeAllRanges(),v(a,t,h-n,e),m(a,b,S,e)}}else y&&(a.removeAllRanges(),v(a,t,h-n,e)),C&&m(a,t,u-n,e)}},addFocusToSelection:m}},2661(e,t,i){"use strict";var n=i(31527),s=i(12634),r=i(21829),o=i(40041),a=i(79981),l=r.List,c=r.Map,h=function(e,t,i){if(e){var n=t.get(e);n&&t.set(e,i(n))}};e.exports=function(e,t){t.isCollapsed()||o(!1);var i=t.getAnchorKey(),r=e.getBlockMap(),d=r.get(i),u=d.getText();if(!u){var p=d.getType();if("unordered-list-item"===p||"ordered-list-item"===p)return a(e,t,function(e){return e.merge({type:"unstyled",depth:0})})}var g=t.getAnchorOffset(),f=d.getCharacterList(),m=s(),v=d instanceof n,y=d.merge({text:u.slice(0,g),characterList:f.slice(0,g)}),C=y.merge({key:m,text:u.slice(g),characterList:f.slice(g),data:c()}),b=r.toSeq().takeUntil(function(e){return e===d}),S=r.toSeq().skipUntil(function(e){return e===d}).rest(),w=b.concat([[i,y],[m,C]],S).toOrderedMap();return v&&(d.getChildKeys().isEmpty()||o(!1),w=function(e,t,i){return e.withMutations(function(e){var n=t.getKey(),s=i.getKey();h(t.getParentKey(),e,function(e){var t=e.getChildKeys(),i=t.indexOf(n)+1,r=t.toArray();return r.splice(i,0,s),e.merge({children:l(r)})}),h(t.getNextSiblingKey(),e,function(e){return e.merge({prevSibling:s})}),h(n,e,function(e){return e.merge({nextSibling:s})}),h(s,e,function(e){return e.merge({prevSibling:n})})})}(w,y,C)),e.merge({blockMap:w,selectionBefore:t,selectionAfter:t.merge({anchorKey:m,anchorOffset:0,focusKey:m,focusOffset:0,isBackward:!1})})}},55585(e){"use strict";var t=/\r\n?|\n/g;e.exports=function(e){return e.split(t)}},10254(e){"use strict";e.exports=function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(e){var t=16*Math.random()|0;return("x"==e?t:3&t|8).toString(16)})}},49541(e){e.exports=function(){"use strict";var e=function(){return(e=Object.assign||function(e){for(var t,i=1,n=arguments.length;i<n;i++)for(var s in t=arguments[i])Object.prototype.hasOwnProperty.call(t,s)&&(e[s]=t[s]);return e}).apply(this,arguments)};function t(e,t,i,n){return new(i||(i=Promise))(function(s,r){function o(e){try{l(n.next(e))}catch(e){r(e)}}function a(e){try{l(n.throw(e))}catch(e){r(e)}}function l(e){var t;e.done?s(e.value):(t=e.value,t instanceof i?t:new i(function(e){e(t)})).then(o,a)}l((n=n.apply(e,t||[])).next())})}function i(e,t){var i,n,s,r,o={label:0,sent:function(){if(1&s[0])throw s[1];return s[1]},trys:[],ops:[]};return r={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(r[Symbol.iterator]=function(){return this}),r;function a(r){return function(a){return function(r){if(i)throw new TypeError("Generator is already executing.");for(;o;)try{if(i=1,n&&(s=2&r[0]?n.return:r[0]?n.throw||((s=n.return)&&s.call(n),0):n.next)&&!(s=s.call(n,r[1])).done)return s;switch(n=0,s&&(r=[2&r[0],s.value]),r[0]){case 0:case 1:s=r;break;case 4:return o.label++,{value:r[1],done:!1};case 5:o.label++,n=r[1],r=[0];continue;case 7:r=o.ops.pop(),o.trys.pop();continue;default:if(!((s=(s=o.trys).length>0&&s[s.length-1])||6!==r[0]&&2!==r[0])){o=0;continue}if(3===r[0]&&(!s||r[1]>s[0]&&r[1]<s[3])){o.label=r[1];break}if(6===r[0]&&o.label<s[1]){o.label=s[1],s=r;break}if(s&&o.label<s[2]){o.label=s[2],o.ops.push(r);break}s[2]&&o.ops.pop(),o.trys.pop();continue}r=t.call(e,o)}catch(e){r=[6,e],n=0}finally{i=s=0}if(5&r[0])throw r[1];return{value:r[0]?r[1]:void 0,done:!0}}([r,a])}}}var n,s,r,o,a,l;!function(e){e.INIT_IFRAME="INIT_IFRAME"}(n||(n={})),function(e){e.Call="call",e.Reply="reply",e.Syn="syn",e.SynAck="synAck",e.Ack="ack"}(s||(s={})),function(e){e.Fulfilled="fulfilled",e.Rejected="rejected"}(r||(r={})),function(e){e.ConnectionDestroyed="ConnectionDestroyed",e.ConnectionTimeout="ConnectionTimeout",e.NotInIframe="NotInIframe",e.NoIframeSrc="NoIframeSrc"}(o||(o={})),function(e){e.DataCloneError="DataCloneError"}(a||(a={})),function(e){e.Message="message"}(l||(l={}));const c={"http:":"80","https:":"443"},h=/^(https?:)?\/\/([^/:]+)?(:(\d+))?/,d=["file:","data:"],u=({name:e,message:t,stack:i})=>({name:e,message:t,stack:i});let p=0;var g=()=>++p,f=(e,t,i,n,a)=>{const{localName:c,local:h,remote:d,originForSending:u,originForReceiving:p}=t;let f=!1;a(`${c}: Connecting call sender`);return i.reduce((e,t)=>(e[t]=(e=>(...t)=>{let i;a(`${c}: Sending ${e}() call`);try{d.closed&&(i=!0)}catch(e){i=!0}if(i&&n(),f){const t=new Error(`Unable to send ${e}() call due to destroyed connection`);throw t.code=o.ConnectionDestroyed,t}return new Promise((i,n)=>{const o=g(),f=t=>{if(t.source!==d||t.data.penpal!==s.Reply||t.data.id!==o)return;if(t.origin!==p)return void a(`${c} received message from origin ${t.origin} which did not match expected origin ${p}`);const u=t.data;a(`${c}: Received ${e}() reply`),h.removeEventListener(l.Message,f);let g=u.returnValue;u.returnValueIsError&&(g=(e=>{const t=new Error;return Object.keys(e).forEach(i=>t[i]=e[i]),t})(g)),(u.resolution===r.Fulfilled?i:n)(g)};h.addEventListener(l.Message,f);const m={penpal:s.Call,id:o,methodName:e,args:t};d.postMessage(m,u)})})(t),e),e),()=>{f=!0}},m=(e,t,i,n,o)=>{const{destroy:c,onDestroy:h}=n;let d,p;const g={};return n=>{if(n.origin!==t)return void o(`Parent: Handshake - Received ACK message from origin ${n.origin} which did not match expected origin ${t}`);o("Parent: Handshake - Received ACK");const m={localName:"Parent",local:window,remote:n.source,originForSending:i,originForReceiving:t};d&&d(),d=((e,t,i)=>{const{localName:n,local:o,remote:c,originForSending:h,originForReceiving:d}=e;let p=!1;const g=e=>{if(e.source!==c||e.data.penpal!==s.Call)return;if(e.origin!==d)return void i(`${n} received message from origin ${e.origin} which did not match expected origin ${d}`);const o=e.data,{methodName:l,args:g,id:f}=o;i(`${n}: Received ${l}() call`);const m=e=>t=>{if(i(`${n}: Sending ${l}() reply`),p)return void i(`${n}: Unable to send ${l}() reply due to destroyed connection`);const o={penpal:s.Reply,id:f,resolution:e,returnValue:t};e===r.Rejected&&t instanceof Error&&(o.returnValue=u(t),o.returnValueIsError=!0);try{c.postMessage(o,h)}catch(e){if(e.name===a.DataCloneError){const t={penpal:s.Reply,id:f,resolution:r.Rejected,returnValue:u(e),returnValueIsError:!0};c.postMessage(t,h)}throw e}};new Promise(e=>e(t[l].apply(t,g))).then(m(r.Fulfilled),m(r.Rejected))};return o.addEventListener(l.Message,g),()=>{p=!0,o.removeEventListener(l.Message,g)}})(m,e,o),h(d),p&&p.forEach(e=>{delete g[e]}),p=n.data.methodNames;const v=f(g,m,p,c,o);return h(v),g}},v=e=>{let{iframe:t,methods:i={},childOrigin:n,timeout:r,debug:a=!1}=e;const u=(e=>(...t)=>{e&&console.log("[Penpal]",...t)})(a),p=(()=>{const e=[];let t=!1;return{destroy(i){t=!0,e.forEach(e=>{e(i)})},onDestroy(i){t?i():e.push(i)}}})(),{onDestroy:g,destroy:f}=p;n||((e=>{if(!e.src&&!e.srcdoc){const e=new Error("Iframe must have src or srcdoc property defined.");throw e.code=o.NoIframeSrc,e}})(t),n=(e=>{if(e&&d.find(t=>e.startsWith(t)))return"null";const t=document.location,i=h.exec(e);let n,s,r;return i?(n=i[1]?i[1]:t.protocol,s=i[2],r=i[4]):(n=t.protocol,s=t.hostname,r=t.port),`${n}//${s}${r&&r!==c[n]?`:${r}`:""}`})(t.src));const v="null"===n?"*":n,y=((e,t,i,n)=>r=>{if(r.origin!==i)return void e(`Parent: Handshake - Received SYN message from origin ${r.origin} which did not match expected origin ${i}`);e("Parent: Handshake - Received SYN, responding with SYN-ACK");const o={penpal:s.SynAck,methodNames:Object.keys(t)};r.source.postMessage(o,n)})(u,i,n,v),C=m(i,n,v,p,u);return{promise:new Promise((e,i)=>{const n=((e,t)=>{let i;return void 0!==e&&(i=window.setTimeout(()=>{const i=new Error(`Connection timed out after ${e}ms`);i.code=o.ConnectionTimeout,t(i)},e)),()=>{clearTimeout(i)}})(r,f),a=i=>{if(i.source===t.contentWindow&&i.data)if(i.data.penpal!==s.Syn)if(i.data.penpal!==s.Ack);else{const t=C(i);t&&(n(),e(t))}else y(i)};window.addEventListener(l.Message,a),u("Parent: Awaiting handshake"),((e,t)=>{const{destroy:i,onDestroy:n}=t,s=setInterval(()=>{e.isConnected||(clearInterval(s),i())},6e4);n(()=>{clearInterval(s)})})(t,p),g(e=>{window.removeEventListener(l.Message,a),e||((e=new Error("Connection destroyed")).code=o.ConnectionDestroyed),i(e)})}),destroy(){f()}}},y=function(e,t){return console.error("[Dromo-External-Error] There was an error running your ".concat(t,"."),e)},C=function(e){return setTimeout(function(){console.warn("[Dromo Error] Slow ".concat(e," detected (>10s). Long running hooks can degrade user experience and importer performance."))},1e4)},b=function(e){clearTimeout(e)},S=function(n,s,r){return t(void 0,void 0,void 0,function(){var o,a,l;return i(this,function(c){switch(c.label){case 0:return o=new Map,a=s.map(function(t){return e({},t)}),[4,n.reduce(function(e,n){return t(void 0,void 0,void 0,function(){return i(this,function(s){switch(s.label){case 0:return[4,e.then(function(){return t(void 0,void 0,void 0,function(){var e,t,s;return i(this,function(i){switch(i.label){case 0:return i.trys.push([0,2,,3]),e=C("column hook"),[4,n.callback(a)];case 1:return t=i.sent(),b(e),t.forEach(function(e){if(void 0!==e.value||void 0!==e.info){var t={};void 0!==e.value&&(t.value=e.value,a[e.index].value=e.value),void 0!==e.info&&(t.info=e.info),o.set(e.index,t)}}),[3,3];case 2:return s=i.sent(),r(s,"column hooks"),[3,3];case 3:return[2]}})})})];case 1:return s.sent(),[2]}})})},Promise.resolve())];case 1:return c.sent(),l=[],o.forEach(function(t,i){return l.push(e(e({},t),{index:i}))}),[2,l]}})})},w=function(e){return void 0===e.value&&void 0===e.info&&void 0===e.selectOptions&&void 0===e.manyToOne},x=function(e,n,s,r,o){return t(void 0,void 0,void 0,function(){var a,l,c,h,d,u,p,g,f,m,v,y,S;return i(this,function(x){switch(x.label){case 0:a=new Map,l=new Map(e.map(function(e){return[e.index,e]})),c=function(e,t){for(var i,n=l.get(e),s=function(t,s){if(w(s))return"continue";var r=n.row[t],o=Array.isArray(r.manyToOne),l="manyToOne"in s&&Array.isArray(s.manyToOne);if(o&&!l)throw new Error("".concat(t," should have manyToOne defined as an array."));if(o&&l&&r.manyToOne.length!==s.manyToOne.length)throw new Error("".concat(t," should be array of length ").concat(r.manyToOne.length));var c=a.get(e)||{},h=null!==(i=c[t])&&void 0!==i?i:{},d=[];l?(h.manyToOne=[],s.manyToOne.forEach(function(e,t){if(!w(e)){var i={};h.manyToOne.push(i),d.push({fieldOutput:e,rowDataField:r.manyToOne[t],cellChange:i})}})):d.push({fieldOutput:s,rowDataField:r,cellChange:h}),d.forEach(function(e){var t=e.fieldOutput,i=e.rowDataField,n=e.cellChange;void 0!==t.value&&(n.value=t.value,i.value=t.value),void 0!==t.info&&(n.info=t.info,i.info=t.info),void 0!==t.selectOptions&&(n.selectOptions=t.selectOptions,i.selectOptions=t.selectOptions)}),c[t]=h,a.set(e,c)},r=0,o=Object.entries(null!=t?t:{});r<o.length;r++){var c=o[r];s(c[0],c[1])}},h=0,d=r,x.label=1;case 1:if(!(h<d.length))return[3,6];u=d[h],x.label=2;case 2:return x.trys.push([2,4,,5]),p=C("bulk row hook"),[4,u(e,n)];case 3:for(g=x.sent(),b(p),f=0,m=g;f<m.length;f++)v=m[f],c(v.index,v.row);return[3,5];case 4:return y=x.sent(),o(y,"bulk row hooks"),[3,5];case 5:return h++,[3,1];case 6:return[4,Promise.all(e.map(function(e){return t(void 0,void 0,void 0,function(){var t,r,a,l,h,d;return i(this,function(i){switch(i.label){case 0:t=0,r=s,i.label=1;case 1:if(!(t<r.length))return[3,6];a=r[t],i.label=2;case 2:return i.trys.push([2,4,,5]),l=C("row hook"),[4,a(e,n)];case 3:return h=i.sent(),b(l),c(e.index,h.row),[3,5];case 4:return d=i.sent(),o(d,"row hooks"),[3,5];case 5:return t++,[3,1];case 6:return[2]}})})}))];case 7:return x.sent(),S=[],a.forEach(function(e,t){S.push({index:t,row:e})}),[2,S]}})})},E=function(e,n,s){return t(void 0,void 0,void 0,function(){return i(this,function(r){return[2,Promise.all(e.map(function(e){return t(void 0,void 0,void 0,function(){return i(this,function(r){return n.forEach(function(n){return t(void 0,void 0,void 0,function(){var t,r;return i(this,function(i){switch(i.label){case 0:return i.trys.push([0,2,,3]),t=C("row delete hook"),[4,n(e)];case 1:return i.sent(),b(t),[3,3];case 2:return r=i.sent(),s(r,"row delete hooks"),[3,3];case 3:return[2]}})})}),[2]})})}))]})})},M=function(e,n,s,r,o){return t(void 0,void 0,void 0,function(){return i(this,function(a){switch(a.label){case 0:return[4,Promise.all(s.map(function(s){return t(void 0,void 0,void 0,function(){var t;return i(this,function(i){switch(i.label){case 0:if(e!==s.type)return[2,Promise.resolve()];i.label=1;case 1:return i.trys.push([1,3,,4]),[4,s.callback(r,n)];case 2:return[2,i.sent()];case 3:return t=i.sent(),o(t,"step hook ".concat(e)),[2,Promise.resolve()];case 4:return[2]}})})}))];case 1:return a.sent(),[2]}})})},A=function(e,n,s,r,o){return t(void 0,void 0,void 0,function(){var t;return i(this,function(i){switch(i.label){case 0:return i.trys.push([0,2,,3]),[4,s(e,n,r)];case 1:return[2,i.sent()];case 2:return t=i.sent(),o(t,"before finish callback"),[3,3];case 3:return[2]}})})},T=function(e,n,s,r){return t(void 0,void 0,void 0,function(){var t;return i(this,function(i){switch(i.label){case 0:return i.trys.push([0,2,,3]),[4,r(e,n)];case 1:return[2,i.sent()];case 2:return t=i.sent(),s(t,"custom file parser callback"),[3,3];case 3:return[2]}})})},D="dromo-container",I=function(t){var i=e({},t);return i.validators&&(i.validators=i.validators.map(function(t){return("regex_match"===t.validate||"regex_exclude"===t.validate)&&t.regex instanceof RegExp?e(e({},t),{regex:t.regex.source,regexOptions:{ignoreCase:t.regex.flags.includes("i"),dotAll:t.regex.flags.includes("s"),multiline:t.regex.flags.includes("m"),unicode:t.regex.flags.includes("u")}}):t})),i};return function(){function n(n,s,r,o){var a=this;this.embedInline=!1,this.columnHooks=[],this.bulkRowHooks=[],this.rowHooks=[],this.stepHooks=[],this.rowDeleteHooks=[],this.fileParsers=[],this.initChild=function(){return t(a,void 0,void 0,function(){var t,n,s,r,o;return i(this,function(i){switch(i.label){case 0:return this.connection?[4,this.connection.promise]:(console.error("shim cannot connect with Dromo service."),alert("There was en error opening the importer. Please contact support if this issue persists."),[2]);case 1:return t=i.sent(),n=Array.from(document.getElementsByTagName("script")).some(function(e){return"https://unpkg.com/dromo-uploader-js/dist/DromoUploader.js"===e.src||"https://cdn.jsdelivr.net/npm/dromo-uploader-js@latest/dist/DromoUploader.js"===e.src}),[4,t.setNumRegisteredRowHooks(this.totalNumRowHooks())];case 2:return i.sent(),[4,t.setNumRegisteredColHooks(this.columnHooks.length)];case 3:return i.sent(),[4,t.setNumRegisteredRowDeleteHooks(this.rowDeleteHooks.length)];case 4:return i.sent(),[4,t.setCustomParserFileExtensions(this.fileParsers.flatMap(function(e){return e.extensions.map(function(e){return e.toLowerCase()})}))];case 5:return i.sent(),[4,t.setEmbedInline(this.embedInline)];case 6:return i.sent(),this.fields&&this.settings&&this.user?(s=e({},this.settings),n||(s.version=null!==(r=s.version)&&void 0!==r?r:"v2"),s.browserExcelParsing=null===(o=s.browserExcelParsing)||void 0===o||o,[4,t.init(this.licenseKey,this.fields,s,this.user,this.appHost)]):[3,8];case 7:return i.sent(),[3,11];case 8:return this.schemaId?[4,t.initFromSavedSchema(this.licenseKey,this.schemaId,this.appHost,{user:this.user,developmentMode:this.developmentMode,headerRowOverride:this.headerRowOverride})]:[3,10];case 9:return i.sent(),[3,11];case 10:console.error("Invalid Dromo configuration"),i.label=11;case 11:return[2]}})})},this.initIFrame=function(){var e,t,i,n,s;if(window.DROMO_WIDGET_OVERRIDE)s=window.DROMO_WIDGET_OVERRIDE;else if(null===(e=a.settings)||void 0===e?void 0:e.alternateDomain){var r=new URL(a.settings.alternateDomain);s=r.protocol+"//widget."+r.host}else s="v1"===(null===(t=a.settings)||void 0===t?void 0:t.version)?"https://widget-v1.dromo.io/":"https://widget.dromo.io/";if(!document.getElementById(a.iframeId)){var o=document.createElement("iframe"),l=null!==(n=null===(i=a.settings)||void 0===i?void 0:i.importIdentifier)&&void 0!==n?n:a.schemaId;o.title=l?"Dromo Importer: ".concat(l):"Dromo Importer",o.src=s,o.id=a.iframeId,o.style.height="100%",o.style.width="100%",o.style.border="0",o.crossorigin="anonymous",a.iframe=o}},this.createConnection=function(){var e=a,n=a.iframe;n?a.connection=v({iframe:n,methods:{handleColumnHooks:function(n,s){return t(this,void 0,void 0,function(){var t;return i(this,function(i){switch(i.label){case 0:return t=e.columnHooks.filter(function(e){return e.fieldName===n}),[4,S(t,s,y)];case 1:return[2,i.sent()]}})})},handleRowHooks:function(n,s){return t(this,void 0,void 0,function(){return i(this,function(t){switch(t.label){case 0:return[4,x(n,s,e.rowHooks.map(function(e){return e.callback}),e.bulkRowHooks,y)];case 1:return[2,t.sent()]}})})},handleStepHook:function(n,s){return t(this,void 0,void 0,function(){return i(this,function(t){switch(t.label){case 0:return[4,M(n,s,e.stepHooks,e,y)];case 1:return[2,t.sent()]}})})},handleParseFileCallback:function(n,s){return t(this,void 0,void 0,function(){var t,r;return i(this,function(i){switch(i.label){case 0:return t=s.split(".").pop(),r=e.fileParsers.find(function(e){return-1!==e.extensions.map(function(e){return e.toLowerCase()}).indexOf(t.toLowerCase())}),[4,T(n,s,y,r.parseFile)];case 1:return[2,i.sent()]}})})},handleRowDeleteHooks:function(n){return t(this,void 0,void 0,function(){return i(this,function(t){switch(t.label){case 0:return[4,E(n,e.rowDeleteHooks,y)];case 1:return t.sent(),[2]}})})},handleBeforeFinishCallback:function(n,s){return t(this,void 0,void 0,function(){return i(this,function(t){switch(t.label){case 0:return e.beforeFinishCallback?[4,A(n,s,e.beforeFinishCallback,e,y)]:[3,2];case 1:return[2,t.sent()];case 2:return[2]}})})},handleResults:function(n,s){return t(this,void 0,void 0,function(){var t;return i(this,function(i){switch(i.label){case 0:if(!e.resultsCallback)return[3,4];i.label=1;case 1:return i.trys.push([1,3,,4]),[4,e.resultsCallback(n,s)];case 2:return i.sent(),[3,4];case 3:return t=i.sent(),console.error("[Dromo-External-Error] There was an error in your onResult callback.",t),[3,4];case 4:return e.close(),[2]}})})},handleCloseModal:function(){e.close()},handleCancel:function(){if(e.cancelCallback)try{e.cancelCallback()}catch(e){console.error("[Dromo-External-Error] There was an error in your cancel callback.",e)}e.close()}}}):console.error("shim cannot connect to Dromo.")},this.mountIFrame=function(){if(!document.getElementById(a.iframeId)){var e=document.createElement("div");e.id=a.wrapperId,e.style.zIndex=Number.MAX_SAFE_INTEGER.toString(),e.style.visibility="hidden",e.style.width="0px",e.style.height="0px",e.style.position="fixed",e.style.top="0px",e.style.left="0px",e.style.right="0px",e.style.bottom="0px",e.appendChild(a.iframe),document.body.appendChild(e),a.wrapper=e}},this.addIFrameToWrapper=function(){a.wrapper&&a.iframe&&(a.iframe.style.visibility="hidden",a.wrapper.appendChild(a.iframe))},this.showIframe=function(){a.iframe&&(a.iframe.style.visibility="visible")},this.showWrapper=function(){a.wrapper&&(a.wrapper.style.visibility="visible",a.wrapper.style.width="100%",a.wrapper.style.height="100%",document.body.style.overflow="hidden")},this.registerColumnHook=function(e,t){a.columnHooks.push({fieldName:e,callback:t}),a.connection&&a.connection.promise.then(function(e){e.setNumRegisteredColHooks(a.columnHooks.length)})},this.totalNumRowHooks=function(){return a.rowHooks.length+a.bulkRowHooks.length},this.registerBulkRowHook=function(e){a.bulkRowHooks.push(e),a.connection&&a.connection.promise.then(function(e){e.setNumRegisteredRowHooks(a.totalNumRowHooks())})},this.registerRowHook=function(e){a.rowHooks.push({callback:e}),a.connection&&a.connection.promise.then(function(e){e.setNumRegisteredRowHooks(a.totalNumRowHooks())})},this.registerStepHook=function(e,t){a.stepHooks.push({type:e,callback:t})},this.registerRowDeleteHook=function(e){a.rowDeleteHooks.push(e),a.connection&&a.connection.promise.then(function(e){e.setNumRegisteredRowDeleteHooks(a.rowDeleteHooks.length)})},this.beforeFinish=function(e){a.beforeFinishCallback=e},this.registerFileParser=function(e){a.fileParsers.push(e),a.connection&&a.connection.promise.then(function(e){e.setCustomParserFileExtensions(a.fileParsers.flatMap(function(e){return e.extensions.map(function(e){return e.toLowerCase()})}))})},this.registerAllHooks=function(e){if(e.columnHooks)for(var t=0,i=e.columnHooks;t<i.length;t++){var n=i[t],s=n.fieldName,r=n.callback;a.registerColumnHook(s,r)}if(e.rowHooks)for(var o=0,l=e.rowHooks;o<l.length;o++){var c=l[o];a.registerRowHook(c)}if(e.bulkRowHooks)for(var h=0,d=e.bulkRowHooks;h<d.length;h++){var u=d[h];a.registerBulkRowHook(u)}if(e.rowDeleteHooks)for(var p=0,g=e.rowDeleteHooks;p<g.length;p++){var f=g[p];a.registerRowDeleteHook(f)}if(e.stepHooks)for(var m=0,v=e.stepHooks;m<v.length;m++){var y=v[m],C=y.type;r=y.callback,a.registerStepHook(C,r)}if(e.beforeFinishCallback&&a.beforeFinish(e.beforeFinishCallback),e.fileParsers)for(var b=0,S=e.fileParsers;b<S.length;b++){var w=S[b];a.registerFileParser(w)}},this.onResults=function(e){a.resultsCallback=e},this.onCancel=function(e){a.cancelCallback=e},this.setUser=function(e){return t(a,void 0,void 0,function(){return i(this,function(t){switch(t.label){case 0:return this.user=e,this.connection?[4,this.connection.promise]:[3,3];case 1:return[4,t.sent().setUser(this.user)];case 2:t.sent(),t.label=3;case 3:return[2]}})})},this.addField=function(e,n){return t(a,void 0,void 0,function(){return i(this,function(t){switch(t.label){case 0:return this.connection?[4,this.connection.promise]:[3,3];case 1:return[4,t.sent().addField(I(e),n)];case 2:return t.sent(),[3,4];case 3:console.error("[Dromo-Error] Invalid connection to Dromo Uploader."),t.label=4;case 4:return[2]}})})},this.removeField=function(e){return t(a,void 0,void 0,function(){return i(this,function(t){switch(t.label){case 0:return this.connection?[4,this.connection.promise]:[3,3];case 1:return[4,t.sent().removeField(e)];case 2:return t.sent(),[3,4];case 3:console.error("[Dromo-Error] Invalid connection to Dromo Uploader."),t.label=4;case 4:return[2]}})})},this.updateInfoMessages=function(e){return t(a,void 0,void 0,function(){return i(this,function(t){switch(t.label){case 0:return this.connection?[4,this.connection.promise]:[3,3];case 1:return[4,t.sent().updateInfoMessages(e)];case 2:return t.sent(),[3,4];case 3:console.error("[Dromo-Error] Invalid connection to Dromo Uploader."),t.label=4;case 4:return[2]}})})},this.setHeaderRowOverride=function(e){return t(a,void 0,void 0,function(){return i(this,function(t){switch(t.label){case 0:return this.headerRowOverride=e,this.connection?[4,this.connection.promise]:[3,3];case 1:return[4,t.sent().setHeaderRowOverride(e)];case 2:t.sent(),t.label=3;case 3:return[2]}})})},this.setConfirmationMessage=function(e,n){return t(a,void 0,void 0,function(){return i(this,function(t){switch(t.label){case 0:return this.connection?[4,this.connection.promise]:[3,3];case 1:return[4,t.sent().setConfirmationMessage(e,n)];case 2:return t.sent(),[3,4];case 3:console.error("[Dromo-Error] Invalid connection to Dromo Uploader."),t.label=4;case 4:return[2]}})})},this.open=function(){return t(a,void 0,void 0,function(){return i(this,function(e){switch(e.label){case 0:return this.wrapper||(this.initIFrame(),this.createConnection(),this.mountIFrame()),[4,this.initChild()];case 1:return e.sent(),this.showWrapper(),[2]}})})},this.initInline=function(e){return t(a,void 0,void 0,function(){var t,n;return i(this,function(i){switch(i.label){case 0:this.embedInline=!0,i.label=1;case 1:if(i.trys.push([1,3,,4]),e instanceof HTMLElement&&(this.wrapper=e,this.wrapperId=e.id,""!==this.wrapperId&&void 0!==this.wrapperId||(this.wrapperId=Math.random().toString(36).substring(7)+"-"+D)),"string"==typeof e){if(null===(t=document.getElementById(e)))throw new Error("WRAPPER_NOT_FOUND");this.wrapper=t,this.wrapperId=e}return this.iframe||(this.initIFrame(),this.createConnection(),this.addIFrameToWrapper()),[4,this.initChild()];case 2:return i.sent(),this.showIframe(),[3,4];case 3:throw"WRAPPER_NOT_FOUND"===(n=i.sent()).message&&console.error("[Dromo-Error] Could not find wrapper using provided ID."),n;case 4:return[2]}})})},this.addRows=function(e){return t(a,void 0,void 0,function(){return i(this,function(t){switch(t.label){case 0:return this.connection?[4,this.connection.promise]:[3,3];case 1:return[4,t.sent().addRows(e)];case 2:return[2,t.sent()];case 3:return console.error("[Dromo-Error] Invalid connection to Dromo Uploader."),[2,[]]}})})},this.removeRows=function(e){return t(a,void 0,void 0,function(){return i(this,function(t){switch(t.label){case 0:return this.connection?[4,this.connection.promise]:[3,3];case 1:return[4,t.sent().removeRows(e)];case 2:return t.sent(),[3,4];case 3:console.error("[Dromo-Error] Invalid connection to Dromo Uploader."),t.label=4;case 4:return[2]}})})},this.close=function(){a.wrapper&&(a.wrapper.style.visibility="hidden",a.wrapper.style.width="0px",a.wrapper.style.height="0px",document.body.style.overflow="inherit")},this.setDevelopmentMode=function(e){return t(a,void 0,void 0,function(){return i(this,function(t){switch(t.label){case 0:return this.developmentMode=e,this.connection?[4,this.connection.promise]:[3,3];case 1:return[4,t.sent().setDevelopmentMode(this.developmentMode)];case 2:t.sent(),t.label=3;case 3:return[2]}})})},this.rehydrate=function(e,n){return t(a,void 0,void 0,function(){return i(this,function(t){switch(t.label){case 0:return this.wrapper||(this.initIFrame(),this.createConnection(),this.mountIFrame()),[4,this.initChild()];case 1:return t.sent(),[4,this.connection.promise];case 2:return[4,t.sent().rehydrate(e,n)];case 3:return t.sent(),this.showWrapper(),[2]}})})},this.iframeId=Math.random().toString(36).substring(7)+"-dromo-iframe-element",this.wrapperId=Math.random().toString(36).substring(7)+"-"+D,this.appHost=document.location.hostname,void 0!==r&&void 0!==o?(this.licenseKey=n,this.fields=s.map(I),this.settings=r,this.user=o,this.checkCloneable({licenseKey:this.licenseKey,fields:this.fields,settings:this.settings,user:this.user})):(this.licenseKey=n,this.schemaId=s,this.checkCloneable({licenseKey:this.licenseKey,schemaId:this.schemaId}))}var s;return n.prototype.checkCloneable=function(e){if("function"==typeof structuredClone){var t=Object.entries(e).filter(function(e){e[0];var t=e[1];try{return structuredClone(t),!1}catch(e){return!0}}).map(function(e){return e[0]});if(t.length>0){var i=t.join(", ");throw new Error("[Dromo-External-Error] The Dromo importer received non-cloneable parameters: ".concat(i,". See https://dromo.dev/err/clone"))}}},s=n,n.rehydrateHeadless=function(e){var r=e.licenseKey,o=e.headlessImportId,a=e.fields,l=e.settings,c=e.hooks,h=e.rehydrateState;return t(void 0,void 0,void 0,function(){var e;return i(s,function(t){switch(t.label){case 0:return(e=new n(r,a,l,{id:"headless-review"})).registerAllHooks(c),[4,e.rehydrate(h,o)];case 1:return t.sent(),e.open(),[2,e]}})})},n}()}()},18482(e,t,i){"use strict";i.d(t,{A:()=>o});var n=i(22155),s=i(49541),r=i.n(s);const o=function(e){var t,i;function s(t){var i;return(i=e.call(this,t)||this).inlineRef=null,i.init=function(){if("fields"in i.props&&"settings"in i.props)i.dromo=new(r())(i.props.licenseKey,i.props.fields,i.props.settings,i.props.user);else if("schemaId"in i.props||"schemaName"in i.props){var e="schemaId"in i.props?i.props.schemaId:i.props.schemaName;i.dromo=new(r())(i.props.licenseKey,e),"developmentMode"in i.props&&i.dromo.setDevelopmentMode(i.props.developmentMode),"user"in i.props&&i.dromo.setUser(i.props.user),"headerRowOverride"in i.props&&i.dromo.setHeaderRowOverride(i.props.headerRowOverride)}i.props.rowHooks&&i.props.rowHooks.forEach(function(e){return i.dromo.registerRowHook(e)}),i.props.bulkRowHooks&&i.props.bulkRowHooks.forEach(function(e){return i.dromo.registerBulkRowHook(e)}),i.props.columnHooks&&i.props.columnHooks.forEach(function(e){i.dromo.registerColumnHook(e.fieldName,e.callback)}),i.props.rowDeleteHooks&&i.props.rowDeleteHooks.forEach(function(e){return i.dromo.registerRowDeleteHook(e)}),i.props.beforeFinish&&i.dromo.beforeFinish(i.props.beforeFinish),i.props.onResults&&i.dromo.onResults(i.props.onResults),i.props.onCancel&&i.dromo.onCancel(i.props.onCancel),i.props.stepHooks&&i.props.stepHooks.forEach(function(e){i.dromo.registerStepHook(e.type,e.callback)}),i.props.fileParsers&&i.props.fileParsers.forEach(function(e){i.dromo.registerFileParser(e)})},i.open=function(){i.init(),i.dromo.open()},i.initInline=function(){i.inlineRef&&(i.init(),i.dromo.initInline(i.inlineRef.current))},t.inline&&(i.inlineRef=(0,n.createRef)()),i}i=e,(t=s).prototype=Object.create(i.prototype),t.prototype.constructor=t,t.__proto__=i;var o=s.prototype;return o.componentDidMount=function(){this.props.inline&&this.inlineRef?this.initInline():this.props.open&&this.open()},o.componentDidUpdate=function(e){this.props.inline?this.initInline():(!e.open&&this.props.open&&this.open(),e.open&&!this.props.open&&this.dromo.close())},o.componentWillUnmount=function(){this.props.open&&!this.props.inline&&this.dromo.close()},o.render=function(){return this.props.inline?(0,n.createElement)("div",{ref:this.inlineRef,className:this.props.className,style:this.props.style}):void 0===this.props.children?(0,n.createElement)(n.Fragment,null):(0,n.createElement)("button",{style:this.props.style,className:this.props.className,onClick:this.open},this.props.children)},s}(n.Component)},57678(e,t,i){"use strict";var n,s=i(92427),r=i(25667);try{n=[].__proto__===Array.prototype}catch(e){if(!e||"object"!=typeof e||!("code"in e)||"ERR_PROTO_ACCESS"!==e.code)throw e}var o=!!n&&r&&r(Object.prototype,"__proto__"),a=Object,l=a.getPrototypeOf;e.exports=o&&"function"==typeof o.get?s([o.get]):"function"==typeof l&&function(e){return l(null==e?e:a(e))}},23071(e,t,i){"use strict";var n=t;n.version=i(23718).rE,n.utils=i(9185),n.rand=i(65442),n.curve=i(95228),n.curves=i(25366),n.ec=i(72961),n.eddsa=i(87808)},94499(e,t,i){"use strict";var n=i(5630),s=i(9185),r=s.getNAF,o=s.getJSF,a=s.assert;function l(e,t){this.type=e,this.p=new n(t.p,16),this.red=t.prime?n.red(t.prime):n.mont(this.p),this.zero=new n(0).toRed(this.red),this.one=new n(1).toRed(this.red),this.two=new n(2).toRed(this.red),this.n=t.n&&new n(t.n,16),this.g=t.g&&this.pointFromJSON(t.g,t.gRed),this._wnafT1=new Array(4),this._wnafT2=new Array(4),this._wnafT3=new Array(4),this._wnafT4=new Array(4),this._bitLength=this.n?this.n.bitLength():0;var i=this.n&&this.p.div(this.n);!i||i.cmpn(100)>0?this.redN=null:(this._maxwellTrick=!0,this.redN=this.n.toRed(this.red))}function c(e,t){this.curve=e,this.type=t,this.precomputed=null}e.exports=l,l.prototype.point=function(){throw new Error("Not implemented")},l.prototype.validate=function(){throw new Error("Not implemented")},l.prototype._fixedNafMul=function(e,t){a(e.precomputed);var i=e._getDoubles(),n=r(t,1,this._bitLength),s=(1<<i.step+1)-(i.step%2==0?2:1);s/=3;var o,l,c=[];for(o=0;o<n.length;o+=i.step){l=0;for(var h=o+i.step-1;h>=o;h--)l=(l<<1)+n[h];c.push(l)}for(var d=this.jpoint(null,null,null),u=this.jpoint(null,null,null),p=s;p>0;p--){for(o=0;o<c.length;o++)(l=c[o])===p?u=u.mixedAdd(i.points[o]):l===-p&&(u=u.mixedAdd(i.points[o].neg()));d=d.add(u)}return d.toP()},l.prototype._wnafMul=function(e,t){var i=4,n=e._getNAFPoints(i);i=n.wnd;for(var s=n.points,o=r(t,i,this._bitLength),l=this.jpoint(null,null,null),c=o.length-1;c>=0;c--){for(var h=0;c>=0&&0===o[c];c--)h++;if(c>=0&&h++,l=l.dblp(h),c<0)break;var d=o[c];a(0!==d),l="affine"===e.type?d>0?l.mixedAdd(s[d-1>>1]):l.mixedAdd(s[-d-1>>1].neg()):d>0?l.add(s[d-1>>1]):l.add(s[-d-1>>1].neg())}return"affine"===e.type?l.toP():l},l.prototype._wnafMulAdd=function(e,t,i,n,s){var a,l,c,h=this._wnafT1,d=this._wnafT2,u=this._wnafT3,p=0;for(a=0;a<n;a++){var g=(c=t[a])._getNAFPoints(e);h[a]=g.wnd,d[a]=g.points}for(a=n-1;a>=1;a-=2){var f=a-1,m=a;if(1===h[f]&&1===h[m]){var v=[t[f],null,null,t[m]];0===t[f].y.cmp(t[m].y)?(v[1]=t[f].add(t[m]),v[2]=t[f].toJ().mixedAdd(t[m].neg())):0===t[f].y.cmp(t[m].y.redNeg())?(v[1]=t[f].toJ().mixedAdd(t[m]),v[2]=t[f].add(t[m].neg())):(v[1]=t[f].toJ().mixedAdd(t[m]),v[2]=t[f].toJ().mixedAdd(t[m].neg()));var y=[-3,-1,-5,-7,0,7,5,1,3],C=o(i[f],i[m]);for(p=Math.max(C[0].length,p),u[f]=new Array(p),u[m]=new Array(p),l=0;l<p;l++){var b=0|C[0][l],S=0|C[1][l];u[f][l]=y[3*(b+1)+(S+1)],u[m][l]=0,d[f]=v}}else u[f]=r(i[f],h[f],this._bitLength),u[m]=r(i[m],h[m],this._bitLength),p=Math.max(u[f].length,p),p=Math.max(u[m].length,p)}var w=this.jpoint(null,null,null),x=this._wnafT4;for(a=p;a>=0;a--){for(var E=0;a>=0;){var M=!0;for(l=0;l<n;l++)x[l]=0|u[l][a],0!==x[l]&&(M=!1);if(!M)break;E++,a--}if(a>=0&&E++,w=w.dblp(E),a<0)break;for(l=0;l<n;l++){var A=x[l];0!==A&&(A>0?c=d[l][A-1>>1]:A<0&&(c=d[l][-A-1>>1].neg()),w="affine"===c.type?w.mixedAdd(c):w.add(c))}}for(a=0;a<n;a++)d[a]=null;return s?w:w.toP()},l.BasePoint=c,c.prototype.eq=function(){throw new Error("Not implemented")},c.prototype.validate=function(){return this.curve.validate(this)},l.prototype.decodePoint=function(e,t){e=s.toArray(e,t);var i=this.p.byteLength();if((4===e[0]||6===e[0]||7===e[0])&&e.length-1==2*i)return 6===e[0]?a(e[e.length-1]%2==0):7===e[0]&&a(e[e.length-1]%2==1),this.point(e.slice(1,1+i),e.slice(1+i,1+2*i));if((2===e[0]||3===e[0])&&e.length-1===i)return this.pointFromX(e.slice(1,1+i),3===e[0]);throw new Error("Unknown point format")},c.prototype.encodeCompressed=function(e){return this.encode(e,!0)},c.prototype._encode=function(e){var t=this.curve.p.byteLength(),i=this.getX().toArray("be",t);return e?[this.getY().isEven()?2:3].concat(i):[4].concat(i,this.getY().toArray("be",t))},c.prototype.encode=function(e,t){return s.encode(this._encode(t),e)},c.prototype.precompute=function(e){if(this.precomputed)return this;var t={doubles:null,naf:null,beta:null};return t.naf=this._getNAFPoints(8),t.doubles=this._getDoubles(4,e),t.beta=this._getBeta(),this.precomputed=t,this},c.prototype._hasDoubles=function(e){if(!this.precomputed)return!1;var t=this.precomputed.doubles;return!!t&&t.points.length>=Math.ceil((e.bitLength()+1)/t.step)},c.prototype._getDoubles=function(e,t){if(this.precomputed&&this.precomputed.doubles)return this.precomputed.doubles;for(var i=[this],n=this,s=0;s<t;s+=e){for(var r=0;r<e;r++)n=n.dbl();i.push(n)}return{step:e,points:i}},c.prototype._getNAFPoints=function(e){if(this.precomputed&&this.precomputed.naf)return this.precomputed.naf;for(var t=[this],i=(1<<e)-1,n=1===i?null:this.dbl(),s=1;s<i;s++)t[s]=t[s-1].add(n);return{wnd:e,points:t}},c.prototype._getBeta=function(){return null},c.prototype.dblp=function(e){for(var t=this,i=0;i<e;i++)t=t.dbl();return t}},83544(e,t,i){"use strict";var n=i(9185),s=i(5630),r=i(91193),o=i(94499),a=n.assert;function l(e){this.twisted=1!=(0|e.a),this.mOneA=this.twisted&&-1==(0|e.a),this.extended=this.mOneA,o.call(this,"edwards",e),this.a=new s(e.a,16).umod(this.red.m),this.a=this.a.toRed(this.red),this.c=new s(e.c,16).toRed(this.red),this.c2=this.c.redSqr(),this.d=new s(e.d,16).toRed(this.red),this.dd=this.d.redAdd(this.d),a(!this.twisted||0===this.c.fromRed().cmpn(1)),this.oneC=1==(0|e.c)}function c(e,t,i,n,r){o.BasePoint.call(this,e,"projective"),null===t&&null===i&&null===n?(this.x=this.curve.zero,this.y=this.curve.one,this.z=this.curve.one,this.t=this.curve.zero,this.zOne=!0):(this.x=new s(t,16),this.y=new s(i,16),this.z=n?new s(n,16):this.curve.one,this.t=r&&new s(r,16),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)),this.t&&!this.t.red&&(this.t=this.t.toRed(this.curve.red)),this.zOne=this.z===this.curve.one,this.curve.extended&&!this.t&&(this.t=this.x.redMul(this.y),this.zOne||(this.t=this.t.redMul(this.z.redInvm()))))}r(l,o),e.exports=l,l.prototype._mulA=function(e){return this.mOneA?e.redNeg():this.a.redMul(e)},l.prototype._mulC=function(e){return this.oneC?e:this.c.redMul(e)},l.prototype.jpoint=function(e,t,i,n){return this.point(e,t,i,n)},l.prototype.pointFromX=function(e,t){(e=new s(e,16)).red||(e=e.toRed(this.red));var i=e.redSqr(),n=this.c2.redSub(this.a.redMul(i)),r=this.one.redSub(this.c2.redMul(this.d).redMul(i)),o=n.redMul(r.redInvm()),a=o.redSqrt();if(0!==a.redSqr().redSub(o).cmp(this.zero))throw new Error("invalid point");var l=a.fromRed().isOdd();return(t&&!l||!t&&l)&&(a=a.redNeg()),this.point(e,a)},l.prototype.pointFromY=function(e,t){(e=new s(e,16)).red||(e=e.toRed(this.red));var i=e.redSqr(),n=i.redSub(this.c2),r=i.redMul(this.d).redMul(this.c2).redSub(this.a),o=n.redMul(r.redInvm());if(0===o.cmp(this.zero)){if(t)throw new Error("invalid point");return this.point(this.zero,e)}var a=o.redSqrt();if(0!==a.redSqr().redSub(o).cmp(this.zero))throw new Error("invalid point");return a.fromRed().isOdd()!==t&&(a=a.redNeg()),this.point(a,e)},l.prototype.validate=function(e){if(e.isInfinity())return!0;e.normalize();var t=e.x.redSqr(),i=e.y.redSqr(),n=t.redMul(this.a).redAdd(i),s=this.c2.redMul(this.one.redAdd(this.d.redMul(t).redMul(i)));return 0===n.cmp(s)},r(c,o.BasePoint),l.prototype.pointFromJSON=function(e){return c.fromJSON(this,e)},l.prototype.point=function(e,t,i,n){return new c(this,e,t,i,n)},c.fromJSON=function(e,t){return new c(e,t[0],t[1],t[2])},c.prototype.inspect=function(){return this.isInfinity()?"<EC Point Infinity>":"<EC Point x: "+this.x.fromRed().toString(16,2)+" y: "+this.y.fromRed().toString(16,2)+" z: "+this.z.fromRed().toString(16,2)+">"},c.prototype.isInfinity=function(){return 0===this.x.cmpn(0)&&(0===this.y.cmp(this.z)||this.zOne&&0===this.y.cmp(this.curve.c))},c.prototype._extDbl=function(){var e=this.x.redSqr(),t=this.y.redSqr(),i=this.z.redSqr();i=i.redIAdd(i);var n=this.curve._mulA(e),s=this.x.redAdd(this.y).redSqr().redISub(e).redISub(t),r=n.redAdd(t),o=r.redSub(i),a=n.redSub(t),l=s.redMul(o),c=r.redMul(a),h=s.redMul(a),d=o.redMul(r);return this.curve.point(l,c,d,h)},c.prototype._projDbl=function(){var e,t,i,n,s,r,o=this.x.redAdd(this.y).redSqr(),a=this.x.redSqr(),l=this.y.redSqr();if(this.curve.twisted){var c=(n=this.curve._mulA(a)).redAdd(l);this.zOne?(e=o.redSub(a).redSub(l).redMul(c.redSub(this.curve.two)),t=c.redMul(n.redSub(l)),i=c.redSqr().redSub(c).redSub(c)):(s=this.z.redSqr(),r=c.redSub(s).redISub(s),e=o.redSub(a).redISub(l).redMul(r),t=c.redMul(n.redSub(l)),i=c.redMul(r))}else n=a.redAdd(l),s=this.curve._mulC(this.z).redSqr(),r=n.redSub(s).redSub(s),e=this.curve._mulC(o.redISub(n)).redMul(r),t=this.curve._mulC(n).redMul(a.redISub(l)),i=n.redMul(r);return this.curve.point(e,t,i)},c.prototype.dbl=function(){return this.isInfinity()?this:this.curve.extended?this._extDbl():this._projDbl()},c.prototype._extAdd=function(e){var t=this.y.redSub(this.x).redMul(e.y.redSub(e.x)),i=this.y.redAdd(this.x).redMul(e.y.redAdd(e.x)),n=this.t.redMul(this.curve.dd).redMul(e.t),s=this.z.redMul(e.z.redAdd(e.z)),r=i.redSub(t),o=s.redSub(n),a=s.redAdd(n),l=i.redAdd(t),c=r.redMul(o),h=a.redMul(l),d=r.redMul(l),u=o.redMul(a);return this.curve.point(c,h,u,d)},c.prototype._projAdd=function(e){var t,i,n=this.z.redMul(e.z),s=n.redSqr(),r=this.x.redMul(e.x),o=this.y.redMul(e.y),a=this.curve.d.redMul(r).redMul(o),l=s.redSub(a),c=s.redAdd(a),h=this.x.redAdd(this.y).redMul(e.x.redAdd(e.y)).redISub(r).redISub(o),d=n.redMul(l).redMul(h);return this.curve.twisted?(t=n.redMul(c).redMul(o.redSub(this.curve._mulA(r))),i=l.redMul(c)):(t=n.redMul(c).redMul(o.redSub(r)),i=this.curve._mulC(l).redMul(c)),this.curve.point(d,t,i)},c.prototype.add=function(e){return this.isInfinity()?e:e.isInfinity()?this:this.curve.extended?this._extAdd(e):this._projAdd(e)},c.prototype.mul=function(e){return this._hasDoubles(e)?this.curve._fixedNafMul(this,e):this.curve._wnafMul(this,e)},c.prototype.mulAdd=function(e,t,i){return this.curve._wnafMulAdd(1,[this,t],[e,i],2,!1)},c.prototype.jmulAdd=function(e,t,i){return this.curve._wnafMulAdd(1,[this,t],[e,i],2,!0)},c.prototype.normalize=function(){if(this.zOne)return this;var e=this.z.redInvm();return this.x=this.x.redMul(e),this.y=this.y.redMul(e),this.t&&(this.t=this.t.redMul(e)),this.z=this.curve.one,this.zOne=!0,this},c.prototype.neg=function(){return this.curve.point(this.x.redNeg(),this.y,this.z,this.t&&this.t.redNeg())},c.prototype.getX=function(){return this.normalize(),this.x.fromRed()},c.prototype.getY=function(){return this.normalize(),this.y.fromRed()},c.prototype.eq=function(e){return this===e||0===this.getX().cmp(e.getX())&&0===this.getY().cmp(e.getY())},c.prototype.eqXToP=function(e){var t=e.toRed(this.curve.red).redMul(this.z);if(0===this.x.cmp(t))return!0;for(var i=e.clone(),n=this.curve.redN.redMul(this.z);;){if(i.iadd(this.curve.n),i.cmp(this.curve.p)>=0)return!1;if(t.redIAdd(n),0===this.x.cmp(t))return!0}},c.prototype.toP=c.prototype.normalize,c.prototype.mixedAdd=c.prototype.add},95228(e,t,i){"use strict";var n=t;n.base=i(94499),n.short=i(53970),n.mont=i(50536),n.edwards=i(83544)},50536(e,t,i){"use strict";var n=i(5630),s=i(91193),r=i(94499),o=i(9185);function a(e){r.call(this,"mont",e),this.a=new n(e.a,16).toRed(this.red),this.b=new n(e.b,16).toRed(this.red),this.i4=new n(4).toRed(this.red).redInvm(),this.two=new n(2).toRed(this.red),this.a24=this.i4.redMul(this.a.redAdd(this.two))}function l(e,t,i){r.BasePoint.call(this,e,"projective"),null===t&&null===i?(this.x=this.curve.one,this.z=this.curve.zero):(this.x=new n(t,16),this.z=new n(i,16),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)))}s(a,r),e.exports=a,a.prototype.validate=function(e){var t=e.normalize().x,i=t.redSqr(),n=i.redMul(t).redAdd(i.redMul(this.a)).redAdd(t);return 0===n.redSqrt().redSqr().cmp(n)},s(l,r.BasePoint),a.prototype.decodePoint=function(e,t){return this.point(o.toArray(e,t),1)},a.prototype.point=function(e,t){return new l(this,e,t)},a.prototype.pointFromJSON=function(e){return l.fromJSON(this,e)},l.prototype.precompute=function(){},l.prototype._encode=function(){return this.getX().toArray("be",this.curve.p.byteLength())},l.fromJSON=function(e,t){return new l(e,t[0],t[1]||e.one)},l.prototype.inspect=function(){return this.isInfinity()?"<EC Point Infinity>":"<EC Point x: "+this.x.fromRed().toString(16,2)+" z: "+this.z.fromRed().toString(16,2)+">"},l.prototype.isInfinity=function(){return 0===this.z.cmpn(0)},l.prototype.dbl=function(){var e=this.x.redAdd(this.z).redSqr(),t=this.x.redSub(this.z).redSqr(),i=e.redSub(t),n=e.redMul(t),s=i.redMul(t.redAdd(this.curve.a24.redMul(i)));return this.curve.point(n,s)},l.prototype.add=function(){throw new Error("Not supported on Montgomery curve")},l.prototype.diffAdd=function(e,t){var i=this.x.redAdd(this.z),n=this.x.redSub(this.z),s=e.x.redAdd(e.z),r=e.x.redSub(e.z).redMul(i),o=s.redMul(n),a=t.z.redMul(r.redAdd(o).redSqr()),l=t.x.redMul(r.redISub(o).redSqr());return this.curve.point(a,l)},l.prototype.mul=function(e){for(var t=e.clone(),i=this,n=this.curve.point(null,null),s=[];0!==t.cmpn(0);t.iushrn(1))s.push(t.andln(1));for(var r=s.length-1;r>=0;r--)0===s[r]?(i=i.diffAdd(n,this),n=n.dbl()):(n=i.diffAdd(n,this),i=i.dbl());return n},l.prototype.mulAdd=function(){throw new Error("Not supported on Montgomery curve")},l.prototype.jumlAdd=function(){throw new Error("Not supported on Montgomery curve")},l.prototype.eq=function(e){return 0===this.getX().cmp(e.getX())},l.prototype.normalize=function(){return this.x=this.x.redMul(this.z.redInvm()),this.z=this.curve.one,this},l.prototype.getX=function(){return this.normalize(),this.x.fromRed()}},53970(e,t,i){"use strict";var n=i(9185),s=i(5630),r=i(91193),o=i(94499),a=n.assert;function l(e){o.call(this,"short",e),this.a=new s(e.a,16).toRed(this.red),this.b=new s(e.b,16).toRed(this.red),this.tinv=this.two.redInvm(),this.zeroA=0===this.a.fromRed().cmpn(0),this.threeA=0===this.a.fromRed().sub(this.p).cmpn(-3),this.endo=this._getEndomorphism(e),this._endoWnafT1=new Array(4),this._endoWnafT2=new Array(4)}function c(e,t,i,n){o.BasePoint.call(this,e,"affine"),null===t&&null===i?(this.x=null,this.y=null,this.inf=!0):(this.x=new s(t,16),this.y=new s(i,16),n&&(this.x.forceRed(this.curve.red),this.y.forceRed(this.curve.red)),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.inf=!1)}function h(e,t,i,n){o.BasePoint.call(this,e,"jacobian"),null===t&&null===i&&null===n?(this.x=this.curve.one,this.y=this.curve.one,this.z=new s(0)):(this.x=new s(t,16),this.y=new s(i,16),this.z=new s(n,16)),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)),this.zOne=this.z===this.curve.one}r(l,o),e.exports=l,l.prototype._getEndomorphism=function(e){if(this.zeroA&&this.g&&this.n&&1===this.p.modn(3)){var t,i;if(e.beta)t=new s(e.beta,16).toRed(this.red);else{var n=this._getEndoRoots(this.p);t=(t=n[0].cmp(n[1])<0?n[0]:n[1]).toRed(this.red)}if(e.lambda)i=new s(e.lambda,16);else{var r=this._getEndoRoots(this.n);0===this.g.mul(r[0]).x.cmp(this.g.x.redMul(t))?i=r[0]:(i=r[1],a(0===this.g.mul(i).x.cmp(this.g.x.redMul(t))))}return{beta:t,lambda:i,basis:e.basis?e.basis.map(function(e){return{a:new s(e.a,16),b:new s(e.b,16)}}):this._getEndoBasis(i)}}},l.prototype._getEndoRoots=function(e){var t=e===this.p?this.red:s.mont(e),i=new s(2).toRed(t).redInvm(),n=i.redNeg(),r=new s(3).toRed(t).redNeg().redSqrt().redMul(i);return[n.redAdd(r).fromRed(),n.redSub(r).fromRed()]},l.prototype._getEndoBasis=function(e){for(var t,i,n,r,o,a,l,c,h,d=this.n.ushrn(Math.floor(this.n.bitLength()/2)),u=e,p=this.n.clone(),g=new s(1),f=new s(0),m=new s(0),v=new s(1),y=0;0!==u.cmpn(0);){var C=p.div(u);c=p.sub(C.mul(u)),h=m.sub(C.mul(g));var b=v.sub(C.mul(f));if(!n&&c.cmp(d)<0)t=l.neg(),i=g,n=c.neg(),r=h;else if(n&&2===++y)break;l=c,p=u,u=c,m=g,g=h,v=f,f=b}o=c.neg(),a=h;var S=n.sqr().add(r.sqr());return o.sqr().add(a.sqr()).cmp(S)>=0&&(o=t,a=i),n.negative&&(n=n.neg(),r=r.neg()),o.negative&&(o=o.neg(),a=a.neg()),[{a:n,b:r},{a:o,b:a}]},l.prototype._endoSplit=function(e){var t=this.endo.basis,i=t[0],n=t[1],s=n.b.mul(e).divRound(this.n),r=i.b.neg().mul(e).divRound(this.n),o=s.mul(i.a),a=r.mul(n.a),l=s.mul(i.b),c=r.mul(n.b);return{k1:e.sub(o).sub(a),k2:l.add(c).neg()}},l.prototype.pointFromX=function(e,t){(e=new s(e,16)).red||(e=e.toRed(this.red));var i=e.redSqr().redMul(e).redIAdd(e.redMul(this.a)).redIAdd(this.b),n=i.redSqrt();if(0!==n.redSqr().redSub(i).cmp(this.zero))throw new Error("invalid point");var r=n.fromRed().isOdd();return(t&&!r||!t&&r)&&(n=n.redNeg()),this.point(e,n)},l.prototype.validate=function(e){if(e.inf)return!0;var t=e.x,i=e.y,n=this.a.redMul(t),s=t.redSqr().redMul(t).redIAdd(n).redIAdd(this.b);return 0===i.redSqr().redISub(s).cmpn(0)},l.prototype._endoWnafMulAdd=function(e,t,i){for(var n=this._endoWnafT1,s=this._endoWnafT2,r=0;r<e.length;r++){var o=this._endoSplit(t[r]),a=e[r],l=a._getBeta();o.k1.negative&&(o.k1.ineg(),a=a.neg(!0)),o.k2.negative&&(o.k2.ineg(),l=l.neg(!0)),n[2*r]=a,n[2*r+1]=l,s[2*r]=o.k1,s[2*r+1]=o.k2}for(var c=this._wnafMulAdd(1,n,s,2*r,i),h=0;h<2*r;h++)n[h]=null,s[h]=null;return c},r(c,o.BasePoint),l.prototype.point=function(e,t,i){return new c(this,e,t,i)},l.prototype.pointFromJSON=function(e,t){return c.fromJSON(this,e,t)},c.prototype._getBeta=function(){if(this.curve.endo){var e=this.precomputed;if(e&&e.beta)return e.beta;var t=this.curve.point(this.x.redMul(this.curve.endo.beta),this.y);if(e){var i=this.curve,n=function(e){return i.point(e.x.redMul(i.endo.beta),e.y)};e.beta=t,t.precomputed={beta:null,naf:e.naf&&{wnd:e.naf.wnd,points:e.naf.points.map(n)},doubles:e.doubles&&{step:e.doubles.step,points:e.doubles.points.map(n)}}}return t}},c.prototype.toJSON=function(){return this.precomputed?[this.x,this.y,this.precomputed&&{doubles:this.precomputed.doubles&&{step:this.precomputed.doubles.step,points:this.precomputed.doubles.points.slice(1)},naf:this.precomputed.naf&&{wnd:this.precomputed.naf.wnd,points:this.precomputed.naf.points.slice(1)}}]:[this.x,this.y]},c.fromJSON=function(e,t,i){"string"==typeof t&&(t=JSON.parse(t));var n=e.point(t[0],t[1],i);if(!t[2])return n;function s(t){return e.point(t[0],t[1],i)}var r=t[2];return n.precomputed={beta:null,doubles:r.doubles&&{step:r.doubles.step,points:[n].concat(r.doubles.points.map(s))},naf:r.naf&&{wnd:r.naf.wnd,points:[n].concat(r.naf.points.map(s))}},n},c.prototype.inspect=function(){return this.isInfinity()?"<EC Point Infinity>":"<EC Point x: "+this.x.fromRed().toString(16,2)+" y: "+this.y.fromRed().toString(16,2)+">"},c.prototype.isInfinity=function(){return this.inf},c.prototype.add=function(e){if(this.inf)return e;if(e.inf)return this;if(this.eq(e))return this.dbl();if(this.neg().eq(e))return this.curve.point(null,null);if(0===this.x.cmp(e.x))return this.curve.point(null,null);var t=this.y.redSub(e.y);0!==t.cmpn(0)&&(t=t.redMul(this.x.redSub(e.x).redInvm()));var i=t.redSqr().redISub(this.x).redISub(e.x),n=t.redMul(this.x.redSub(i)).redISub(this.y);return this.curve.point(i,n)},c.prototype.dbl=function(){if(this.inf)return this;var e=this.y.redAdd(this.y);if(0===e.cmpn(0))return this.curve.point(null,null);var t=this.curve.a,i=this.x.redSqr(),n=e.redInvm(),s=i.redAdd(i).redIAdd(i).redIAdd(t).redMul(n),r=s.redSqr().redISub(this.x.redAdd(this.x)),o=s.redMul(this.x.redSub(r)).redISub(this.y);return this.curve.point(r,o)},c.prototype.getX=function(){return this.x.fromRed()},c.prototype.getY=function(){return this.y.fromRed()},c.prototype.mul=function(e){return e=new s(e,16),this.isInfinity()?this:this._hasDoubles(e)?this.curve._fixedNafMul(this,e):this.curve.endo?this.curve._endoWnafMulAdd([this],[e]):this.curve._wnafMul(this,e)},c.prototype.mulAdd=function(e,t,i){var n=[this,t],s=[e,i];return this.curve.endo?this.curve._endoWnafMulAdd(n,s):this.curve._wnafMulAdd(1,n,s,2)},c.prototype.jmulAdd=function(e,t,i){var n=[this,t],s=[e,i];return this.curve.endo?this.curve._endoWnafMulAdd(n,s,!0):this.curve._wnafMulAdd(1,n,s,2,!0)},c.prototype.eq=function(e){return this===e||this.inf===e.inf&&(this.inf||0===this.x.cmp(e.x)&&0===this.y.cmp(e.y))},c.prototype.neg=function(e){if(this.inf)return this;var t=this.curve.point(this.x,this.y.redNeg());if(e&&this.precomputed){var i=this.precomputed,n=function(e){return e.neg()};t.precomputed={naf:i.naf&&{wnd:i.naf.wnd,points:i.naf.points.map(n)},doubles:i.doubles&&{step:i.doubles.step,points:i.doubles.points.map(n)}}}return t},c.prototype.toJ=function(){return this.inf?this.curve.jpoint(null,null,null):this.curve.jpoint(this.x,this.y,this.curve.one)},r(h,o.BasePoint),l.prototype.jpoint=function(e,t,i){return new h(this,e,t,i)},h.prototype.toP=function(){if(this.isInfinity())return this.curve.point(null,null);var e=this.z.redInvm(),t=e.redSqr(),i=this.x.redMul(t),n=this.y.redMul(t).redMul(e);return this.curve.point(i,n)},h.prototype.neg=function(){return this.curve.jpoint(this.x,this.y.redNeg(),this.z)},h.prototype.add=function(e){if(this.isInfinity())return e;if(e.isInfinity())return this;var t=e.z.redSqr(),i=this.z.redSqr(),n=this.x.redMul(t),s=e.x.redMul(i),r=this.y.redMul(t.redMul(e.z)),o=e.y.redMul(i.redMul(this.z)),a=n.redSub(s),l=r.redSub(o);if(0===a.cmpn(0))return 0!==l.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl();var c=a.redSqr(),h=c.redMul(a),d=n.redMul(c),u=l.redSqr().redIAdd(h).redISub(d).redISub(d),p=l.redMul(d.redISub(u)).redISub(r.redMul(h)),g=this.z.redMul(e.z).redMul(a);return this.curve.jpoint(u,p,g)},h.prototype.mixedAdd=function(e){if(this.isInfinity())return e.toJ();if(e.isInfinity())return this;var t=this.z.redSqr(),i=this.x,n=e.x.redMul(t),s=this.y,r=e.y.redMul(t).redMul(this.z),o=i.redSub(n),a=s.redSub(r);if(0===o.cmpn(0))return 0!==a.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl();var l=o.redSqr(),c=l.redMul(o),h=i.redMul(l),d=a.redSqr().redIAdd(c).redISub(h).redISub(h),u=a.redMul(h.redISub(d)).redISub(s.redMul(c)),p=this.z.redMul(o);return this.curve.jpoint(d,u,p)},h.prototype.dblp=function(e){if(0===e)return this;if(this.isInfinity())return this;if(!e)return this.dbl();var t;if(this.curve.zeroA||this.curve.threeA){var i=this;for(t=0;t<e;t++)i=i.dbl();return i}var n=this.curve.a,s=this.curve.tinv,r=this.x,o=this.y,a=this.z,l=a.redSqr().redSqr(),c=o.redAdd(o);for(t=0;t<e;t++){var h=r.redSqr(),d=c.redSqr(),u=d.redSqr(),p=h.redAdd(h).redIAdd(h).redIAdd(n.redMul(l)),g=r.redMul(d),f=p.redSqr().redISub(g.redAdd(g)),m=g.redISub(f),v=p.redMul(m);v=v.redIAdd(v).redISub(u);var y=c.redMul(a);t+1<e&&(l=l.redMul(u)),r=f,a=y,c=v}return this.curve.jpoint(r,c.redMul(s),a)},h.prototype.dbl=function(){return this.isInfinity()?this:this.curve.zeroA?this._zeroDbl():this.curve.threeA?this._threeDbl():this._dbl()},h.prototype._zeroDbl=function(){var e,t,i;if(this.zOne){var n=this.x.redSqr(),s=this.y.redSqr(),r=s.redSqr(),o=this.x.redAdd(s).redSqr().redISub(n).redISub(r);o=o.redIAdd(o);var a=n.redAdd(n).redIAdd(n),l=a.redSqr().redISub(o).redISub(o),c=r.redIAdd(r);c=(c=c.redIAdd(c)).redIAdd(c),e=l,t=a.redMul(o.redISub(l)).redISub(c),i=this.y.redAdd(this.y)}else{var h=this.x.redSqr(),d=this.y.redSqr(),u=d.redSqr(),p=this.x.redAdd(d).redSqr().redISub(h).redISub(u);p=p.redIAdd(p);var g=h.redAdd(h).redIAdd(h),f=g.redSqr(),m=u.redIAdd(u);m=(m=m.redIAdd(m)).redIAdd(m),e=f.redISub(p).redISub(p),t=g.redMul(p.redISub(e)).redISub(m),i=(i=this.y.redMul(this.z)).redIAdd(i)}return this.curve.jpoint(e,t,i)},h.prototype._threeDbl=function(){var e,t,i;if(this.zOne){var n=this.x.redSqr(),s=this.y.redSqr(),r=s.redSqr(),o=this.x.redAdd(s).redSqr().redISub(n).redISub(r);o=o.redIAdd(o);var a=n.redAdd(n).redIAdd(n).redIAdd(this.curve.a),l=a.redSqr().redISub(o).redISub(o);e=l;var c=r.redIAdd(r);c=(c=c.redIAdd(c)).redIAdd(c),t=a.redMul(o.redISub(l)).redISub(c),i=this.y.redAdd(this.y)}else{var h=this.z.redSqr(),d=this.y.redSqr(),u=this.x.redMul(d),p=this.x.redSub(h).redMul(this.x.redAdd(h));p=p.redAdd(p).redIAdd(p);var g=u.redIAdd(u),f=(g=g.redIAdd(g)).redAdd(g);e=p.redSqr().redISub(f),i=this.y.redAdd(this.z).redSqr().redISub(d).redISub(h);var m=d.redSqr();m=(m=(m=m.redIAdd(m)).redIAdd(m)).redIAdd(m),t=p.redMul(g.redISub(e)).redISub(m)}return this.curve.jpoint(e,t,i)},h.prototype._dbl=function(){var e=this.curve.a,t=this.x,i=this.y,n=this.z,s=n.redSqr().redSqr(),r=t.redSqr(),o=i.redSqr(),a=r.redAdd(r).redIAdd(r).redIAdd(e.redMul(s)),l=t.redAdd(t),c=(l=l.redIAdd(l)).redMul(o),h=a.redSqr().redISub(c.redAdd(c)),d=c.redISub(h),u=o.redSqr();u=(u=(u=u.redIAdd(u)).redIAdd(u)).redIAdd(u);var p=a.redMul(d).redISub(u),g=i.redAdd(i).redMul(n);return this.curve.jpoint(h,p,g)},h.prototype.trpl=function(){if(!this.curve.zeroA)return this.dbl().add(this);var e=this.x.redSqr(),t=this.y.redSqr(),i=this.z.redSqr(),n=t.redSqr(),s=e.redAdd(e).redIAdd(e),r=s.redSqr(),o=this.x.redAdd(t).redSqr().redISub(e).redISub(n),a=(o=(o=(o=o.redIAdd(o)).redAdd(o).redIAdd(o)).redISub(r)).redSqr(),l=n.redIAdd(n);l=(l=(l=l.redIAdd(l)).redIAdd(l)).redIAdd(l);var c=s.redIAdd(o).redSqr().redISub(r).redISub(a).redISub(l),h=t.redMul(c);h=(h=h.redIAdd(h)).redIAdd(h);var d=this.x.redMul(a).redISub(h);d=(d=d.redIAdd(d)).redIAdd(d);var u=this.y.redMul(c.redMul(l.redISub(c)).redISub(o.redMul(a)));u=(u=(u=u.redIAdd(u)).redIAdd(u)).redIAdd(u);var p=this.z.redAdd(o).redSqr().redISub(i).redISub(a);return this.curve.jpoint(d,u,p)},h.prototype.mul=function(e,t){return e=new s(e,t),this.curve._wnafMul(this,e)},h.prototype.eq=function(e){if("affine"===e.type)return this.eq(e.toJ());if(this===e)return!0;var t=this.z.redSqr(),i=e.z.redSqr();if(0!==this.x.redMul(i).redISub(e.x.redMul(t)).cmpn(0))return!1;var n=t.redMul(this.z),s=i.redMul(e.z);return 0===this.y.redMul(s).redISub(e.y.redMul(n)).cmpn(0)},h.prototype.eqXToP=function(e){var t=this.z.redSqr(),i=e.toRed(this.curve.red).redMul(t);if(0===this.x.cmp(i))return!0;for(var n=e.clone(),s=this.curve.redN.redMul(t);;){if(n.iadd(this.curve.n),n.cmp(this.curve.p)>=0)return!1;if(i.redIAdd(s),0===this.x.cmp(i))return!0}},h.prototype.inspect=function(){return this.isInfinity()?"<EC JPoint Infinity>":"<EC JPoint x: "+this.x.toString(16,2)+" y: "+this.y.toString(16,2)+" z: "+this.z.toString(16,2)+">"},h.prototype.isInfinity=function(){return 0===this.z.cmpn(0)}},25366(e,t,i){"use strict";var n,s=t,r=i(61631),o=i(95228),a=i(9185).assert;function l(e){"short"===e.type?this.curve=new o.short(e):"edwards"===e.type?this.curve=new o.edwards(e):this.curve=new o.mont(e),this.g=this.curve.g,this.n=this.curve.n,this.hash=e.hash,a(this.g.validate(),"Invalid curve"),a(this.g.mul(this.n).isInfinity(),"Invalid curve, G*N != O")}function c(e,t){Object.defineProperty(s,e,{configurable:!0,enumerable:!0,get:function(){var i=new l(t);return Object.defineProperty(s,e,{configurable:!0,enumerable:!0,value:i}),i}})}s.PresetCurve=l,c("p192",{type:"short",prime:"p192",p:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff",a:"ffffffff ffffffff ffffffff fffffffe ffffffff fffffffc",b:"64210519 e59c80e7 0fa7e9ab 72243049 feb8deec c146b9b1",n:"ffffffff ffffffff ffffffff 99def836 146bc9b1 b4d22831",hash:r.sha256,gRed:!1,g:["188da80e b03090f6 7cbf20eb 43a18800 f4ff0afd 82ff1012","07192b95 ffc8da78 631011ed 6b24cdd5 73f977a1 1e794811"]}),c("p224",{type:"short",prime:"p224",p:"ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001",a:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff fffffffe",b:"b4050a85 0c04b3ab f5413256 5044b0b7 d7bfd8ba 270b3943 2355ffb4",n:"ffffffff ffffffff ffffffff ffff16a2 e0b8f03e 13dd2945 5c5c2a3d",hash:r.sha256,gRed:!1,g:["b70e0cbd 6bb4bf7f 321390b9 4a03c1d3 56c21122 343280d6 115c1d21","bd376388 b5f723fb 4c22dfe6 cd4375a0 5a074764 44d58199 85007e34"]}),c("p256",{type:"short",prime:null,p:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff ffffffff",a:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff fffffffc",b:"5ac635d8 aa3a93e7 b3ebbd55 769886bc 651d06b0 cc53b0f6 3bce3c3e 27d2604b",n:"ffffffff 00000000 ffffffff ffffffff bce6faad a7179e84 f3b9cac2 fc632551",hash:r.sha256,gRed:!1,g:["6b17d1f2 e12c4247 f8bce6e5 63a440f2 77037d81 2deb33a0 f4a13945 d898c296","4fe342e2 fe1a7f9b 8ee7eb4a 7c0f9e16 2bce3357 6b315ece cbb64068 37bf51f5"]}),c("p384",{type:"short",prime:null,p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 ffffffff",a:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 fffffffc",b:"b3312fa7 e23ee7e4 988e056b e3f82d19 181d9c6e fe814112 0314088f 5013875a c656398d 8a2ed19d 2a85c8ed d3ec2aef",n:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff c7634d81 f4372ddf 581a0db2 48b0a77a ecec196a ccc52973",hash:r.sha384,gRed:!1,g:["aa87ca22 be8b0537 8eb1c71e f320ad74 6e1d3b62 8ba79b98 59f741e0 82542a38 5502f25d bf55296c 3a545e38 72760ab7","3617de4a 96262c6f 5d9e98bf 9292dc29 f8f41dbd 289a147c e9da3113 b5f0b8c0 0a60b1ce 1d7e819d 7a431d7c 90ea0e5f"]}),c("p521",{type:"short",prime:null,p:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff",a:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffc",b:"00000051 953eb961 8e1c9a1f 929a21a0 b68540ee a2da725b 99b315f3 b8b48991 8ef109e1 56193951 ec7e937b 1652c0bd 3bb1bf07 3573df88 3d2c34f1 ef451fd4 6b503f00",n:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffa 51868783 bf2f966b 7fcc0148 f709a5d0 3bb5c9b8 899c47ae bb6fb71e 91386409",hash:r.sha512,gRed:!1,g:["000000c6 858e06b7 0404e9cd 9e3ecb66 2395b442 9c648139 053fb521 f828af60 6b4d3dba a14b5e77 efe75928 fe1dc127 a2ffa8de 3348b3c1 856a429b f97e7e31 c2e5bd66","00000118 39296a78 9a3bc004 5c8a5fb4 2c7d1bd9 98f54449 579b4468 17afbd17 273e662c 97ee7299 5ef42640 c550b901 3fad0761 353c7086 a272c240 88be9476 9fd16650"]}),c("curve25519",{type:"mont",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"76d06",b:"1",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:r.sha256,gRed:!1,g:["9"]}),c("ed25519",{type:"edwards",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"-1",c:"1",d:"52036cee2b6ffe73 8cc740797779e898 00700a4d4141d8ab 75eb4dca135978a3",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:r.sha256,gRed:!1,g:["216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a","6666666666666666666666666666666666666666666666666666666666666658"]});try{n=i(67153)}catch(e){n=void 0}c("secp256k1",{type:"short",prime:"k256",p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f",a:"0",b:"7",n:"ffffffff ffffffff ffffffff fffffffe baaedce6 af48a03b bfd25e8c d0364141",h:"1",hash:r.sha256,beta:"7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee",lambda:"5363ad4cc05c30e0a5261c028812645a122e22ea20816678df02967c1b23bd72",basis:[{a:"3086d221a7d46bcde86c90e49284eb15",b:"-e4437ed6010e88286f547fa90abfe4c3"},{a:"114ca50f7a8e2f3f657c1108d9d44cfd8",b:"3086d221a7d46bcde86c90e49284eb15"}],gRed:!1,g:["79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798","483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8",n]})},72961(e,t,i){"use strict";var n=i(5630),s=i(52519),r=i(9185),o=i(25366),a=i(65442),l=r.assert,c=i(5666),h=i(44375);function d(e){if(!(this instanceof d))return new d(e);"string"==typeof e&&(l(Object.prototype.hasOwnProperty.call(o,e),"Unknown curve "+e),e=o[e]),e instanceof o.PresetCurve&&(e={curve:e}),this.curve=e.curve.curve,this.n=this.curve.n,this.nh=this.n.ushrn(1),this.g=this.curve.g,this.g=e.curve.g,this.g.precompute(e.curve.n.bitLength()+1),this.hash=e.hash||e.curve.hash}e.exports=d,d.prototype.keyPair=function(e){return new c(this,e)},d.prototype.keyFromPrivate=function(e,t){return c.fromPrivate(this,e,t)},d.prototype.keyFromPublic=function(e,t){return c.fromPublic(this,e,t)},d.prototype.genKeyPair=function(e){e||(e={});for(var t=new s({hash:this.hash,pers:e.pers,persEnc:e.persEnc||"utf8",entropy:e.entropy||a(this.hash.hmacStrength),entropyEnc:e.entropy&&e.entropyEnc||"utf8",nonce:this.n.toArray()}),i=this.n.byteLength(),r=this.n.sub(new n(2));;){var o=new n(t.generate(i));if(!(o.cmp(r)>0))return o.iaddn(1),this.keyFromPrivate(o)}},d.prototype._truncateToN=function(e,t,i){var s;if(n.isBN(e)||"number"==typeof e)s=(e=new n(e,16)).byteLength();else if("object"==typeof e)s=e.length,e=new n(e,16);else{var r=e.toString();s=r.length+1>>>1,e=new n(r,16)}"number"!=typeof i&&(i=8*s);var o=i-this.n.bitLength();return o>0&&(e=e.ushrn(o)),!t&&e.cmp(this.n)>=0?e.sub(this.n):e},d.prototype.sign=function(e,t,i,r){if("object"==typeof i&&(r=i,i=null),r||(r={}),"string"!=typeof e&&"number"!=typeof e&&!n.isBN(e)){l("object"==typeof e&&e&&"number"==typeof e.length,"Expected message to be an array-like, a hex string, or a BN instance"),l(e.length>>>0===e.length);for(var o=0;o<e.length;o++)l((255&e[o])===e[o])}t=this.keyFromPrivate(t,i),e=this._truncateToN(e,!1,r.msgBitLength),l(!e.isNeg(),"Can not sign a negative message");var a=this.n.byteLength(),c=t.getPrivate().toArray("be",a),d=e.toArray("be",a);l(new n(d).eq(e),"Can not sign message");for(var u=new s({hash:this.hash,entropy:c,nonce:d,pers:r.pers,persEnc:r.persEnc||"utf8"}),p=this.n.sub(new n(1)),g=0;;g++){var f=r.k?r.k(g):new n(u.generate(this.n.byteLength()));if(!((f=this._truncateToN(f,!0)).cmpn(1)<=0||f.cmp(p)>=0)){var m=this.g.mul(f);if(!m.isInfinity()){var v=m.getX(),y=v.umod(this.n);if(0!==y.cmpn(0)){var C=f.invm(this.n).mul(y.mul(t.getPrivate()).iadd(e));if(0!==(C=C.umod(this.n)).cmpn(0)){var b=(m.getY().isOdd()?1:0)|(0!==v.cmp(y)?2:0);return r.canonical&&C.cmp(this.nh)>0&&(C=this.n.sub(C),b^=1),new h({r:y,s:C,recoveryParam:b})}}}}}},d.prototype.verify=function(e,t,i,n,s){s||(s={}),e=this._truncateToN(e,!1,s.msgBitLength),i=this.keyFromPublic(i,n);var r=(t=new h(t,"hex")).r,o=t.s;if(r.cmpn(1)<0||r.cmp(this.n)>=0)return!1;if(o.cmpn(1)<0||o.cmp(this.n)>=0)return!1;var a,l=o.invm(this.n),c=l.mul(e).umod(this.n),d=l.mul(r).umod(this.n);return this.curve._maxwellTrick?!(a=this.g.jmulAdd(c,i.getPublic(),d)).isInfinity()&&a.eqXToP(r):!(a=this.g.mulAdd(c,i.getPublic(),d)).isInfinity()&&0===a.getX().umod(this.n).cmp(r)},d.prototype.recoverPubKey=function(e,t,i,s){l((3&i)===i,"The recovery param is more than two bits"),t=new h(t,s);var r=this.n,o=new n(e),a=t.r,c=t.s,d=1&i,u=i>>1;if(a.cmp(this.curve.p.umod(this.curve.n))>=0&&u)throw new Error("Unable to find sencond key candinate");a=u?this.curve.pointFromX(a.add(this.curve.n),d):this.curve.pointFromX(a,d);var p=t.r.invm(r),g=r.sub(o).mul(p).umod(r),f=c.mul(p).umod(r);return this.g.mulAdd(g,a,f)},d.prototype.getKeyRecoveryParam=function(e,t,i,n){if(null!==(t=new h(t,n)).recoveryParam)return t.recoveryParam;for(var s=0;s<4;s++){var r;try{r=this.recoverPubKey(e,t,s)}catch(e){continue}if(r.eq(i))return s}throw new Error("Unable to find valid recovery factor")}},5666(e,t,i){"use strict";var n=i(5630),s=i(9185).assert;function r(e,t){this.ec=e,this.priv=null,this.pub=null,t.priv&&this._importPrivate(t.priv,t.privEnc),t.pub&&this._importPublic(t.pub,t.pubEnc)}e.exports=r,r.fromPublic=function(e,t,i){return t instanceof r?t:new r(e,{pub:t,pubEnc:i})},r.fromPrivate=function(e,t,i){return t instanceof r?t:new r(e,{priv:t,privEnc:i})},r.prototype.validate=function(){var e=this.getPublic();return e.isInfinity()?{result:!1,reason:"Invalid public key"}:e.validate()?e.mul(this.ec.curve.n).isInfinity()?{result:!0,reason:null}:{result:!1,reason:"Public key * N != O"}:{result:!1,reason:"Public key is not a point"}},r.prototype.getPublic=function(e,t){return"string"==typeof e&&(t=e,e=null),this.pub||(this.pub=this.ec.g.mul(this.priv)),t?this.pub.encode(t,e):this.pub},r.prototype.getPrivate=function(e){return"hex"===e?this.priv.toString(16,2):this.priv},r.prototype._importPrivate=function(e,t){this.priv=new n(e,t||16),this.priv=this.priv.umod(this.ec.curve.n)},r.prototype._importPublic=function(e,t){if(e.x||e.y)return"mont"===this.ec.curve.type?s(e.x,"Need x coordinate"):"short"!==this.ec.curve.type&&"edwards"!==this.ec.curve.type||s(e.x&&e.y,"Need both x and y coordinate"),void(this.pub=this.ec.curve.point(e.x,e.y));this.pub=this.ec.curve.decodePoint(e,t)},r.prototype.derive=function(e){return e.validate()||s(e.validate(),"public point not validated"),e.mul(this.priv).getX()},r.prototype.sign=function(e,t,i){return this.ec.sign(e,this,t,i)},r.prototype.verify=function(e,t,i){return this.ec.verify(e,t,this,void 0,i)},r.prototype.inspect=function(){return"<Key priv: "+(this.priv&&this.priv.toString(16,2))+" pub: "+(this.pub&&this.pub.inspect())+" >"}},44375(e,t,i){"use strict";var n=i(5630),s=i(9185),r=s.assert;function o(e,t){if(e instanceof o)return e;this._importDER(e,t)||(r(e.r&&e.s,"Signature without r or s"),this.r=new n(e.r,16),this.s=new n(e.s,16),void 0===e.recoveryParam?this.recoveryParam=null:this.recoveryParam=e.recoveryParam)}function a(){this.place=0}function l(e,t){var i=e[t.place++];if(!(128&i))return i;var n=15&i;if(0===n||n>4)return!1;if(0===e[t.place])return!1;for(var s=0,r=0,o=t.place;r<n;r++,o++)s<<=8,s|=e[o],s>>>=0;return!(s<=127)&&(t.place=o,s)}function c(e){for(var t=0,i=e.length-1;!e[t]&&!(128&e[t+1])&&t<i;)t++;return 0===t?e:e.slice(t)}function h(e,t){if(t<128)e.push(t);else{var i=1+(Math.log(t)/Math.LN2>>>3);for(e.push(128|i);--i;)e.push(t>>>(i<<3)&255);e.push(t)}}e.exports=o,o.prototype._importDER=function(e,t){e=s.toArray(e,t);var i=new a;if(48!==e[i.place++])return!1;var r=l(e,i);if(!1===r)return!1;if(r+i.place!==e.length)return!1;if(2!==e[i.place++])return!1;var o=l(e,i);if(!1===o)return!1;if(128&e[i.place])return!1;var c=e.slice(i.place,o+i.place);if(i.place+=o,2!==e[i.place++])return!1;var h=l(e,i);if(!1===h)return!1;if(e.length!==h+i.place)return!1;if(128&e[i.place])return!1;var d=e.slice(i.place,h+i.place);if(0===c[0]){if(!(128&c[1]))return!1;c=c.slice(1)}if(0===d[0]){if(!(128&d[1]))return!1;d=d.slice(1)}return this.r=new n(c),this.s=new n(d),this.recoveryParam=null,!0},o.prototype.toDER=function(e){var t=this.r.toArray(),i=this.s.toArray();for(128&t[0]&&(t=[0].concat(t)),128&i[0]&&(i=[0].concat(i)),t=c(t),i=c(i);!(i[0]||128&i[1]);)i=i.slice(1);var n=[2];h(n,t.length),(n=n.concat(t)).push(2),h(n,i.length);var r=n.concat(i),o=[48];return h(o,r.length),o=o.concat(r),s.encode(o,e)}},87808(e,t,i){"use strict";var n=i(61631),s=i(25366),r=i(9185),o=r.assert,a=r.parseBytes,l=i(36419),c=i(95406);function h(e){if(o("ed25519"===e,"only tested with ed25519 so far"),!(this instanceof h))return new h(e);e=s[e].curve,this.curve=e,this.g=e.g,this.g.precompute(e.n.bitLength()+1),this.pointClass=e.point().constructor,this.encodingLength=Math.ceil(e.n.bitLength()/8),this.hash=n.sha512}e.exports=h,h.prototype.sign=function(e,t){e=a(e);var i=this.keyFromSecret(t),n=this.hashInt(i.messagePrefix(),e),s=this.g.mul(n),r=this.encodePoint(s),o=this.hashInt(r,i.pubBytes(),e).mul(i.priv()),l=n.add(o).umod(this.curve.n);return this.makeSignature({R:s,S:l,Rencoded:r})},h.prototype.verify=function(e,t,i){if(e=a(e),(t=this.makeSignature(t)).S().gte(t.eddsa.curve.n)||t.S().isNeg())return!1;var n=this.keyFromPublic(i),s=this.hashInt(t.Rencoded(),n.pubBytes(),e),r=this.g.mul(t.S());return t.R().add(n.pub().mul(s)).eq(r)},h.prototype.hashInt=function(){for(var e=this.hash(),t=0;t<arguments.length;t++)e.update(arguments[t]);return r.intFromLE(e.digest()).umod(this.curve.n)},h.prototype.keyFromPublic=function(e){return l.fromPublic(this,e)},h.prototype.keyFromSecret=function(e){return l.fromSecret(this,e)},h.prototype.makeSignature=function(e){return e instanceof c?e:new c(this,e)},h.prototype.encodePoint=function(e){var t=e.getY().toArray("le",this.encodingLength);return t[this.encodingLength-1]|=e.getX().isOdd()?128:0,t},h.prototype.decodePoint=function(e){var t=(e=r.parseBytes(e)).length-1,i=e.slice(0,t).concat(-129&e[t]),n=!!(128&e[t]),s=r.intFromLE(i);return this.curve.pointFromY(s,n)},h.prototype.encodeInt=function(e){return e.toArray("le",this.encodingLength)},h.prototype.decodeInt=function(e){return r.intFromLE(e)},h.prototype.isPoint=function(e){return e instanceof this.pointClass}},36419(e,t,i){"use strict";var n=i(9185),s=n.assert,r=n.parseBytes,o=n.cachedProperty;function a(e,t){this.eddsa=e,this._secret=r(t.secret),e.isPoint(t.pub)?this._pub=t.pub:this._pubBytes=r(t.pub)}a.fromPublic=function(e,t){return t instanceof a?t:new a(e,{pub:t})},a.fromSecret=function(e,t){return t instanceof a?t:new a(e,{secret:t})},a.prototype.secret=function(){return this._secret},o(a,"pubBytes",function(){return this.eddsa.encodePoint(this.pub())}),o(a,"pub",function(){return this._pubBytes?this.eddsa.decodePoint(this._pubBytes):this.eddsa.g.mul(this.priv())}),o(a,"privBytes",function(){var e=this.eddsa,t=this.hash(),i=e.encodingLength-1,n=t.slice(0,e.encodingLength);return n[0]&=248,n[i]&=127,n[i]|=64,n}),o(a,"priv",function(){return this.eddsa.decodeInt(this.privBytes())}),o(a,"hash",function(){return this.eddsa.hash().update(this.secret()).digest()}),o(a,"messagePrefix",function(){return this.hash().slice(this.eddsa.encodingLength)}),a.prototype.sign=function(e){return s(this._secret,"KeyPair can only verify"),this.eddsa.sign(e,this)},a.prototype.verify=function(e,t){return this.eddsa.verify(e,t,this)},a.prototype.getSecret=function(e){return s(this._secret,"KeyPair is public only"),n.encode(this.secret(),e)},a.prototype.getPublic=function(e){return n.encode(this.pubBytes(),e)},e.exports=a},95406(e,t,i){"use strict";var n=i(5630),s=i(9185),r=s.assert,o=s.cachedProperty,a=s.parseBytes;function l(e,t){this.eddsa=e,"object"!=typeof t&&(t=a(t)),Array.isArray(t)&&(r(t.length===2*e.encodingLength,"Signature has invalid size"),t={R:t.slice(0,e.encodingLength),S:t.slice(e.encodingLength)}),r(t.R&&t.S,"Signature without R or S"),e.isPoint(t.R)&&(this._R=t.R),t.S instanceof n&&(this._S=t.S),this._Rencoded=Array.isArray(t.R)?t.R:t.Rencoded,this._Sencoded=Array.isArray(t.S)?t.S:t.Sencoded}o(l,"S",function(){return this.eddsa.decodeInt(this.Sencoded())}),o(l,"R",function(){return this.eddsa.decodePoint(this.Rencoded())}),o(l,"Rencoded",function(){return this.eddsa.encodePoint(this.R())}),o(l,"Sencoded",function(){return this.eddsa.encodeInt(this.S())}),l.prototype.toBytes=function(){return this.Rencoded().concat(this.Sencoded())},l.prototype.toHex=function(){return s.encode(this.toBytes(),"hex").toUpperCase()},e.exports=l},67153(e){e.exports={doubles:{step:4,points:[["e60fce93b59e9ec53011aabc21c23e97b2a31369b87a5ae9c44ee89e2a6dec0a","f7e3507399e595929db99f34f57937101296891e44d23f0be1f32cce69616821"],["8282263212c609d9ea2a6e3e172de238d8c39cabd5ac1ca10646e23fd5f51508","11f8a8098557dfe45e8256e830b60ace62d613ac2f7b17bed31b6eaff6e26caf"],["175e159f728b865a72f99cc6c6fc846de0b93833fd2222ed73fce5b551e5b739","d3506e0d9e3c79eba4ef97a51ff71f5eacb5955add24345c6efa6ffee9fed695"],["363d90d447b00c9c99ceac05b6262ee053441c7e55552ffe526bad8f83ff4640","4e273adfc732221953b445397f3363145b9a89008199ecb62003c7f3bee9de9"],["8b4b5f165df3c2be8c6244b5b745638843e4a781a15bcd1b69f79a55dffdf80c","4aad0a6f68d308b4b3fbd7813ab0da04f9e336546162ee56b3eff0c65fd4fd36"],["723cbaa6e5db996d6bf771c00bd548c7b700dbffa6c0e77bcb6115925232fcda","96e867b5595cc498a921137488824d6e2660a0653779494801dc069d9eb39f5f"],["eebfa4d493bebf98ba5feec812c2d3b50947961237a919839a533eca0e7dd7fa","5d9a8ca3970ef0f269ee7edaf178089d9ae4cdc3a711f712ddfd4fdae1de8999"],["100f44da696e71672791d0a09b7bde459f1215a29b3c03bfefd7835b39a48db0","cdd9e13192a00b772ec8f3300c090666b7ff4a18ff5195ac0fbd5cd62bc65a09"],["e1031be262c7ed1b1dc9227a4a04c017a77f8d4464f3b3852c8acde6e534fd2d","9d7061928940405e6bb6a4176597535af292dd419e1ced79a44f18f29456a00d"],["feea6cae46d55b530ac2839f143bd7ec5cf8b266a41d6af52d5e688d9094696d","e57c6b6c97dce1bab06e4e12bf3ecd5c981c8957cc41442d3155debf18090088"],["da67a91d91049cdcb367be4be6ffca3cfeed657d808583de33fa978bc1ec6cb1","9bacaa35481642bc41f463f7ec9780e5dec7adc508f740a17e9ea8e27a68be1d"],["53904faa0b334cdda6e000935ef22151ec08d0f7bb11069f57545ccc1a37b7c0","5bc087d0bc80106d88c9eccac20d3c1c13999981e14434699dcb096b022771c8"],["8e7bcd0bd35983a7719cca7764ca906779b53a043a9b8bcaeff959f43ad86047","10b7770b2a3da4b3940310420ca9514579e88e2e47fd68b3ea10047e8460372a"],["385eed34c1cdff21e6d0818689b81bde71a7f4f18397e6690a841e1599c43862","283bebc3e8ea23f56701de19e9ebf4576b304eec2086dc8cc0458fe5542e5453"],["6f9d9b803ecf191637c73a4413dfa180fddf84a5947fbc9c606ed86c3fac3a7","7c80c68e603059ba69b8e2a30e45c4d47ea4dd2f5c281002d86890603a842160"],["3322d401243c4e2582a2147c104d6ecbf774d163db0f5e5313b7e0e742d0e6bd","56e70797e9664ef5bfb019bc4ddaf9b72805f63ea2873af624f3a2e96c28b2a0"],["85672c7d2de0b7da2bd1770d89665868741b3f9af7643397721d74d28134ab83","7c481b9b5b43b2eb6374049bfa62c2e5e77f17fcc5298f44c8e3094f790313a6"],["948bf809b1988a46b06c9f1919413b10f9226c60f668832ffd959af60c82a0a","53a562856dcb6646dc6b74c5d1c3418c6d4dff08c97cd2bed4cb7f88d8c8e589"],["6260ce7f461801c34f067ce0f02873a8f1b0e44dfc69752accecd819f38fd8e8","bc2da82b6fa5b571a7f09049776a1ef7ecd292238051c198c1a84e95b2b4ae17"],["e5037de0afc1d8d43d8348414bbf4103043ec8f575bfdc432953cc8d2037fa2d","4571534baa94d3b5f9f98d09fb990bddbd5f5b03ec481f10e0e5dc841d755bda"],["e06372b0f4a207adf5ea905e8f1771b4e7e8dbd1c6a6c5b725866a0ae4fce725","7a908974bce18cfe12a27bb2ad5a488cd7484a7787104870b27034f94eee31dd"],["213c7a715cd5d45358d0bbf9dc0ce02204b10bdde2a3f58540ad6908d0559754","4b6dad0b5ae462507013ad06245ba190bb4850f5f36a7eeddff2c27534b458f2"],["4e7c272a7af4b34e8dbb9352a5419a87e2838c70adc62cddf0cc3a3b08fbd53c","17749c766c9d0b18e16fd09f6def681b530b9614bff7dd33e0b3941817dcaae6"],["fea74e3dbe778b1b10f238ad61686aa5c76e3db2be43057632427e2840fb27b6","6e0568db9b0b13297cf674deccb6af93126b596b973f7b77701d3db7f23cb96f"],["76e64113f677cf0e10a2570d599968d31544e179b760432952c02a4417bdde39","c90ddf8dee4e95cf577066d70681f0d35e2a33d2b56d2032b4b1752d1901ac01"],["c738c56b03b2abe1e8281baa743f8f9a8f7cc643df26cbee3ab150242bcbb891","893fb578951ad2537f718f2eacbfbbbb82314eef7880cfe917e735d9699a84c3"],["d895626548b65b81e264c7637c972877d1d72e5f3a925014372e9f6588f6c14b","febfaa38f2bc7eae728ec60818c340eb03428d632bb067e179363ed75d7d991f"],["b8da94032a957518eb0f6433571e8761ceffc73693e84edd49150a564f676e03","2804dfa44805a1e4d7c99cc9762808b092cc584d95ff3b511488e4e74efdf6e7"],["e80fea14441fb33a7d8adab9475d7fab2019effb5156a792f1a11778e3c0df5d","eed1de7f638e00771e89768ca3ca94472d155e80af322ea9fcb4291b6ac9ec78"],["a301697bdfcd704313ba48e51d567543f2a182031efd6915ddc07bbcc4e16070","7370f91cfb67e4f5081809fa25d40f9b1735dbf7c0a11a130c0d1a041e177ea1"],["90ad85b389d6b936463f9d0512678de208cc330b11307fffab7ac63e3fb04ed4","e507a3620a38261affdcbd9427222b839aefabe1582894d991d4d48cb6ef150"],["8f68b9d2f63b5f339239c1ad981f162ee88c5678723ea3351b7b444c9ec4c0da","662a9f2dba063986de1d90c2b6be215dbbea2cfe95510bfdf23cbf79501fff82"],["e4f3fb0176af85d65ff99ff9198c36091f48e86503681e3e6686fd5053231e11","1e63633ad0ef4f1c1661a6d0ea02b7286cc7e74ec951d1c9822c38576feb73bc"],["8c00fa9b18ebf331eb961537a45a4266c7034f2f0d4e1d0716fb6eae20eae29e","efa47267fea521a1a9dc343a3736c974c2fadafa81e36c54e7d2a4c66702414b"],["e7a26ce69dd4829f3e10cec0a9e98ed3143d084f308b92c0997fddfc60cb3e41","2a758e300fa7984b471b006a1aafbb18d0a6b2c0420e83e20e8a9421cf2cfd51"],["b6459e0ee3662ec8d23540c223bcbdc571cbcb967d79424f3cf29eb3de6b80ef","67c876d06f3e06de1dadf16e5661db3c4b3ae6d48e35b2ff30bf0b61a71ba45"],["d68a80c8280bb840793234aa118f06231d6f1fc67e73c5a5deda0f5b496943e8","db8ba9fff4b586d00c4b1f9177b0e28b5b0e7b8f7845295a294c84266b133120"],["324aed7df65c804252dc0270907a30b09612aeb973449cea4095980fc28d3d5d","648a365774b61f2ff130c0c35aec1f4f19213b0c7e332843967224af96ab7c84"],["4df9c14919cde61f6d51dfdbe5fee5dceec4143ba8d1ca888e8bd373fd054c96","35ec51092d8728050974c23a1d85d4b5d506cdc288490192ebac06cad10d5d"],["9c3919a84a474870faed8a9c1cc66021523489054d7f0308cbfc99c8ac1f98cd","ddb84f0f4a4ddd57584f044bf260e641905326f76c64c8e6be7e5e03d4fc599d"],["6057170b1dd12fdf8de05f281d8e06bb91e1493a8b91d4cc5a21382120a959e5","9a1af0b26a6a4807add9a2daf71df262465152bc3ee24c65e899be932385a2a8"],["a576df8e23a08411421439a4518da31880cef0fba7d4df12b1a6973eecb94266","40a6bf20e76640b2c92b97afe58cd82c432e10a7f514d9f3ee8be11ae1b28ec8"],["7778a78c28dec3e30a05fe9629de8c38bb30d1f5cf9a3a208f763889be58ad71","34626d9ab5a5b22ff7098e12f2ff580087b38411ff24ac563b513fc1fd9f43ac"],["928955ee637a84463729fd30e7afd2ed5f96274e5ad7e5cb09eda9c06d903ac","c25621003d3f42a827b78a13093a95eeac3d26efa8a8d83fc5180e935bcd091f"],["85d0fef3ec6db109399064f3a0e3b2855645b4a907ad354527aae75163d82751","1f03648413a38c0be29d496e582cf5663e8751e96877331582c237a24eb1f962"],["ff2b0dce97eece97c1c9b6041798b85dfdfb6d8882da20308f5404824526087e","493d13fef524ba188af4c4dc54d07936c7b7ed6fb90e2ceb2c951e01f0c29907"],["827fbbe4b1e880ea9ed2b2e6301b212b57f1ee148cd6dd28780e5e2cf856e241","c60f9c923c727b0b71bef2c67d1d12687ff7a63186903166d605b68baec293ec"],["eaa649f21f51bdbae7be4ae34ce6e5217a58fdce7f47f9aa7f3b58fa2120e2b3","be3279ed5bbbb03ac69a80f89879aa5a01a6b965f13f7e59d47a5305ba5ad93d"],["e4a42d43c5cf169d9391df6decf42ee541b6d8f0c9a137401e23632dda34d24f","4d9f92e716d1c73526fc99ccfb8ad34ce886eedfa8d8e4f13a7f7131deba9414"],["1ec80fef360cbdd954160fadab352b6b92b53576a88fea4947173b9d4300bf19","aeefe93756b5340d2f3a4958a7abbf5e0146e77f6295a07b671cdc1cc107cefd"],["146a778c04670c2f91b00af4680dfa8bce3490717d58ba889ddb5928366642be","b318e0ec3354028add669827f9d4b2870aaa971d2f7e5ed1d0b297483d83efd0"],["fa50c0f61d22e5f07e3acebb1aa07b128d0012209a28b9776d76a8793180eef9","6b84c6922397eba9b72cd2872281a68a5e683293a57a213b38cd8d7d3f4f2811"],["da1d61d0ca721a11b1a5bf6b7d88e8421a288ab5d5bba5220e53d32b5f067ec2","8157f55a7c99306c79c0766161c91e2966a73899d279b48a655fba0f1ad836f1"],["a8e282ff0c9706907215ff98e8fd416615311de0446f1e062a73b0610d064e13","7f97355b8db81c09abfb7f3c5b2515888b679a3e50dd6bd6cef7c73111f4cc0c"],["174a53b9c9a285872d39e56e6913cab15d59b1fa512508c022f382de8319497c","ccc9dc37abfc9c1657b4155f2c47f9e6646b3a1d8cb9854383da13ac079afa73"],["959396981943785c3d3e57edf5018cdbe039e730e4918b3d884fdff09475b7ba","2e7e552888c331dd8ba0386a4b9cd6849c653f64c8709385e9b8abf87524f2fd"],["d2a63a50ae401e56d645a1153b109a8fcca0a43d561fba2dbb51340c9d82b151","e82d86fb6443fcb7565aee58b2948220a70f750af484ca52d4142174dcf89405"],["64587e2335471eb890ee7896d7cfdc866bacbdbd3839317b3436f9b45617e073","d99fcdd5bf6902e2ae96dd6447c299a185b90a39133aeab358299e5e9faf6589"],["8481bde0e4e4d885b3a546d3e549de042f0aa6cea250e7fd358d6c86dd45e458","38ee7b8cba5404dd84a25bf39cecb2ca900a79c42b262e556d64b1b59779057e"],["13464a57a78102aa62b6979ae817f4637ffcfed3c4b1ce30bcd6303f6caf666b","69be159004614580ef7e433453ccb0ca48f300a81d0942e13f495a907f6ecc27"],["bc4a9df5b713fe2e9aef430bcc1dc97a0cd9ccede2f28588cada3a0d2d83f366","d3a81ca6e785c06383937adf4b798caa6e8a9fbfa547b16d758d666581f33c1"],["8c28a97bf8298bc0d23d8c749452a32e694b65e30a9472a3954ab30fe5324caa","40a30463a3305193378fedf31f7cc0eb7ae784f0451cb9459e71dc73cbef9482"],["8ea9666139527a8c1dd94ce4f071fd23c8b350c5a4bb33748c4ba111faccae0","620efabbc8ee2782e24e7c0cfb95c5d735b783be9cf0f8e955af34a30e62b945"],["dd3625faef5ba06074669716bbd3788d89bdde815959968092f76cc4eb9a9787","7a188fa3520e30d461da2501045731ca941461982883395937f68d00c644a573"],["f710d79d9eb962297e4f6232b40e8f7feb2bc63814614d692c12de752408221e","ea98e67232d3b3295d3b535532115ccac8612c721851617526ae47a9c77bfc82"]]},naf:{wnd:7,points:[["f9308a019258c31049344f85f89d5229b531c845836f99b08601f113bce036f9","388f7b0f632de8140fe337e62a37f3566500a99934c2231b6cb9fd7584b8e672"],["2f8bde4d1a07209355b4a7250a5c5128e88b84bddc619ab7cba8d569b240efe4","d8ac222636e5e3d6d4dba9dda6c9c426f788271bab0d6840dca87d3aa6ac62d6"],["5cbdf0646e5db4eaa398f365f2ea7a0e3d419b7e0330e39ce92bddedcac4f9bc","6aebca40ba255960a3178d6d861a54dba813d0b813fde7b5a5082628087264da"],["acd484e2f0c7f65309ad178a9f559abde09796974c57e714c35f110dfc27ccbe","cc338921b0a7d9fd64380971763b61e9add888a4375f8e0f05cc262ac64f9c37"],["774ae7f858a9411e5ef4246b70c65aac5649980be5c17891bbec17895da008cb","d984a032eb6b5e190243dd56d7b7b365372db1e2dff9d6a8301d74c9c953c61b"],["f28773c2d975288bc7d1d205c3748651b075fbc6610e58cddeeddf8f19405aa8","ab0902e8d880a89758212eb65cdaf473a1a06da521fa91f29b5cb52db03ed81"],["d7924d4f7d43ea965a465ae3095ff41131e5946f3c85f79e44adbcf8e27e080e","581e2872a86c72a683842ec228cc6defea40af2bd896d3a5c504dc9ff6a26b58"],["defdea4cdb677750a420fee807eacf21eb9898ae79b9768766e4faa04a2d4a34","4211ab0694635168e997b0ead2a93daeced1f4a04a95c0f6cfb199f69e56eb77"],["2b4ea0a797a443d293ef5cff444f4979f06acfebd7e86d277475656138385b6c","85e89bc037945d93b343083b5a1c86131a01f60c50269763b570c854e5c09b7a"],["352bbf4a4cdd12564f93fa332ce333301d9ad40271f8107181340aef25be59d5","321eb4075348f534d59c18259dda3e1f4a1b3b2e71b1039c67bd3d8bcf81998c"],["2fa2104d6b38d11b0230010559879124e42ab8dfeff5ff29dc9cdadd4ecacc3f","2de1068295dd865b64569335bd5dd80181d70ecfc882648423ba76b532b7d67"],["9248279b09b4d68dab21a9b066edda83263c3d84e09572e269ca0cd7f5453714","73016f7bf234aade5d1aa71bdea2b1ff3fc0de2a887912ffe54a32ce97cb3402"],["daed4f2be3a8bf278e70132fb0beb7522f570e144bf615c07e996d443dee8729","a69dce4a7d6c98e8d4a1aca87ef8d7003f83c230f3afa726ab40e52290be1c55"],["c44d12c7065d812e8acf28d7cbb19f9011ecd9e9fdf281b0e6a3b5e87d22e7db","2119a460ce326cdc76c45926c982fdac0e106e861edf61c5a039063f0e0e6482"],["6a245bf6dc698504c89a20cfded60853152b695336c28063b61c65cbd269e6b4","e022cf42c2bd4a708b3f5126f16a24ad8b33ba48d0423b6efd5e6348100d8a82"],["1697ffa6fd9de627c077e3d2fe541084ce13300b0bec1146f95ae57f0d0bd6a5","b9c398f186806f5d27561506e4557433a2cf15009e498ae7adee9d63d01b2396"],["605bdb019981718b986d0f07e834cb0d9deb8360ffb7f61df982345ef27a7479","2972d2de4f8d20681a78d93ec96fe23c26bfae84fb14db43b01e1e9056b8c49"],["62d14dab4150bf497402fdc45a215e10dcb01c354959b10cfe31c7e9d87ff33d","80fc06bd8cc5b01098088a1950eed0db01aa132967ab472235f5642483b25eaf"],["80c60ad0040f27dade5b4b06c408e56b2c50e9f56b9b8b425e555c2f86308b6f","1c38303f1cc5c30f26e66bad7fe72f70a65eed4cbe7024eb1aa01f56430bd57a"],["7a9375ad6167ad54aa74c6348cc54d344cc5dc9487d847049d5eabb0fa03c8fb","d0e3fa9eca8726909559e0d79269046bdc59ea10c70ce2b02d499ec224dc7f7"],["d528ecd9b696b54c907a9ed045447a79bb408ec39b68df504bb51f459bc3ffc9","eecf41253136e5f99966f21881fd656ebc4345405c520dbc063465b521409933"],["49370a4b5f43412ea25f514e8ecdad05266115e4a7ecb1387231808f8b45963","758f3f41afd6ed428b3081b0512fd62a54c3f3afbb5b6764b653052a12949c9a"],["77f230936ee88cbbd73df930d64702ef881d811e0e1498e2f1c13eb1fc345d74","958ef42a7886b6400a08266e9ba1b37896c95330d97077cbbe8eb3c7671c60d6"],["f2dac991cc4ce4b9ea44887e5c7c0bce58c80074ab9d4dbaeb28531b7739f530","e0dedc9b3b2f8dad4da1f32dec2531df9eb5fbeb0598e4fd1a117dba703a3c37"],["463b3d9f662621fb1b4be8fbbe2520125a216cdfc9dae3debcba4850c690d45b","5ed430d78c296c3543114306dd8622d7c622e27c970a1de31cb377b01af7307e"],["f16f804244e46e2a09232d4aff3b59976b98fac14328a2d1a32496b49998f247","cedabd9b82203f7e13d206fcdf4e33d92a6c53c26e5cce26d6579962c4e31df6"],["caf754272dc84563b0352b7a14311af55d245315ace27c65369e15f7151d41d1","cb474660ef35f5f2a41b643fa5e460575f4fa9b7962232a5c32f908318a04476"],["2600ca4b282cb986f85d0f1709979d8b44a09c07cb86d7c124497bc86f082120","4119b88753c15bd6a693b03fcddbb45d5ac6be74ab5f0ef44b0be9475a7e4b40"],["7635ca72d7e8432c338ec53cd12220bc01c48685e24f7dc8c602a7746998e435","91b649609489d613d1d5e590f78e6d74ecfc061d57048bad9e76f302c5b9c61"],["754e3239f325570cdbbf4a87deee8a66b7f2b33479d468fbc1a50743bf56cc18","673fb86e5bda30fb3cd0ed304ea49a023ee33d0197a695d0c5d98093c536683"],["e3e6bd1071a1e96aff57859c82d570f0330800661d1c952f9fe2694691d9b9e8","59c9e0bba394e76f40c0aa58379a3cb6a5a2283993e90c4167002af4920e37f5"],["186b483d056a033826ae73d88f732985c4ccb1f32ba35f4b4cc47fdcf04aa6eb","3b952d32c67cf77e2e17446e204180ab21fb8090895138b4a4a797f86e80888b"],["df9d70a6b9876ce544c98561f4be4f725442e6d2b737d9c91a8321724ce0963f","55eb2dafd84d6ccd5f862b785dc39d4ab157222720ef9da217b8c45cf2ba2417"],["5edd5cc23c51e87a497ca815d5dce0f8ab52554f849ed8995de64c5f34ce7143","efae9c8dbc14130661e8cec030c89ad0c13c66c0d17a2905cdc706ab7399a868"],["290798c2b6476830da12fe02287e9e777aa3fba1c355b17a722d362f84614fba","e38da76dcd440621988d00bcf79af25d5b29c094db2a23146d003afd41943e7a"],["af3c423a95d9f5b3054754efa150ac39cd29552fe360257362dfdecef4053b45","f98a3fd831eb2b749a93b0e6f35cfb40c8cd5aa667a15581bc2feded498fd9c6"],["766dbb24d134e745cccaa28c99bf274906bb66b26dcf98df8d2fed50d884249a","744b1152eacbe5e38dcc887980da38b897584a65fa06cedd2c924f97cbac5996"],["59dbf46f8c94759ba21277c33784f41645f7b44f6c596a58ce92e666191abe3e","c534ad44175fbc300f4ea6ce648309a042ce739a7919798cd85e216c4a307f6e"],["f13ada95103c4537305e691e74e9a4a8dd647e711a95e73cb62dc6018cfd87b8","e13817b44ee14de663bf4bc808341f326949e21a6a75c2570778419bdaf5733d"],["7754b4fa0e8aced06d4167a2c59cca4cda1869c06ebadfb6488550015a88522c","30e93e864e669d82224b967c3020b8fa8d1e4e350b6cbcc537a48b57841163a2"],["948dcadf5990e048aa3874d46abef9d701858f95de8041d2a6828c99e2262519","e491a42537f6e597d5d28a3224b1bc25df9154efbd2ef1d2cbba2cae5347d57e"],["7962414450c76c1689c7b48f8202ec37fb224cf5ac0bfa1570328a8a3d7c77ab","100b610ec4ffb4760d5c1fc133ef6f6b12507a051f04ac5760afa5b29db83437"],["3514087834964b54b15b160644d915485a16977225b8847bb0dd085137ec47ca","ef0afbb2056205448e1652c48e8127fc6039e77c15c2378b7e7d15a0de293311"],["d3cc30ad6b483e4bc79ce2c9dd8bc54993e947eb8df787b442943d3f7b527eaf","8b378a22d827278d89c5e9be8f9508ae3c2ad46290358630afb34db04eede0a4"],["1624d84780732860ce1c78fcbfefe08b2b29823db913f6493975ba0ff4847610","68651cf9b6da903e0914448c6cd9d4ca896878f5282be4c8cc06e2a404078575"],["733ce80da955a8a26902c95633e62a985192474b5af207da6df7b4fd5fc61cd4","f5435a2bd2badf7d485a4d8b8db9fcce3e1ef8e0201e4578c54673bc1dc5ea1d"],["15d9441254945064cf1a1c33bbd3b49f8966c5092171e699ef258dfab81c045c","d56eb30b69463e7234f5137b73b84177434800bacebfc685fc37bbe9efe4070d"],["a1d0fcf2ec9de675b612136e5ce70d271c21417c9d2b8aaaac138599d0717940","edd77f50bcb5a3cab2e90737309667f2641462a54070f3d519212d39c197a629"],["e22fbe15c0af8ccc5780c0735f84dbe9a790badee8245c06c7ca37331cb36980","a855babad5cd60c88b430a69f53a1a7a38289154964799be43d06d77d31da06"],["311091dd9860e8e20ee13473c1155f5f69635e394704eaa74009452246cfa9b3","66db656f87d1f04fffd1f04788c06830871ec5a64feee685bd80f0b1286d8374"],["34c1fd04d301be89b31c0442d3e6ac24883928b45a9340781867d4232ec2dbdf","9414685e97b1b5954bd46f730174136d57f1ceeb487443dc5321857ba73abee"],["f219ea5d6b54701c1c14de5b557eb42a8d13f3abbcd08affcc2a5e6b049b8d63","4cb95957e83d40b0f73af4544cccf6b1f4b08d3c07b27fb8d8c2962a400766d1"],["d7b8740f74a8fbaab1f683db8f45de26543a5490bca627087236912469a0b448","fa77968128d9c92ee1010f337ad4717eff15db5ed3c049b3411e0315eaa4593b"],["32d31c222f8f6f0ef86f7c98d3a3335ead5bcd32abdd94289fe4d3091aa824bf","5f3032f5892156e39ccd3d7915b9e1da2e6dac9e6f26e961118d14b8462e1661"],["7461f371914ab32671045a155d9831ea8793d77cd59592c4340f86cbc18347b5","8ec0ba238b96bec0cbdddcae0aa442542eee1ff50c986ea6b39847b3cc092ff6"],["ee079adb1df1860074356a25aa38206a6d716b2c3e67453d287698bad7b2b2d6","8dc2412aafe3be5c4c5f37e0ecc5f9f6a446989af04c4e25ebaac479ec1c8c1e"],["16ec93e447ec83f0467b18302ee620f7e65de331874c9dc72bfd8616ba9da6b5","5e4631150e62fb40d0e8c2a7ca5804a39d58186a50e497139626778e25b0674d"],["eaa5f980c245f6f038978290afa70b6bd8855897f98b6aa485b96065d537bd99","f65f5d3e292c2e0819a528391c994624d784869d7e6ea67fb18041024edc07dc"],["78c9407544ac132692ee1910a02439958ae04877151342ea96c4b6b35a49f51","f3e0319169eb9b85d5404795539a5e68fa1fbd583c064d2462b675f194a3ddb4"],["494f4be219a1a77016dcd838431aea0001cdc8ae7a6fc688726578d9702857a5","42242a969283a5f339ba7f075e36ba2af925ce30d767ed6e55f4b031880d562c"],["a598a8030da6d86c6bc7f2f5144ea549d28211ea58faa70ebf4c1e665c1fe9b5","204b5d6f84822c307e4b4a7140737aec23fc63b65b35f86a10026dbd2d864e6b"],["c41916365abb2b5d09192f5f2dbeafec208f020f12570a184dbadc3e58595997","4f14351d0087efa49d245b328984989d5caf9450f34bfc0ed16e96b58fa9913"],["841d6063a586fa475a724604da03bc5b92a2e0d2e0a36acfe4c73a5514742881","73867f59c0659e81904f9a1c7543698e62562d6744c169ce7a36de01a8d6154"],["5e95bb399a6971d376026947f89bde2f282b33810928be4ded112ac4d70e20d5","39f23f366809085beebfc71181313775a99c9aed7d8ba38b161384c746012865"],["36e4641a53948fd476c39f8a99fd974e5ec07564b5315d8bf99471bca0ef2f66","d2424b1b1abe4eb8164227b085c9aa9456ea13493fd563e06fd51cf5694c78fc"],["336581ea7bfbbb290c191a2f507a41cf5643842170e914faeab27c2c579f726","ead12168595fe1be99252129b6e56b3391f7ab1410cd1e0ef3dcdcabd2fda224"],["8ab89816dadfd6b6a1f2634fcf00ec8403781025ed6890c4849742706bd43ede","6fdcef09f2f6d0a044e654aef624136f503d459c3e89845858a47a9129cdd24e"],["1e33f1a746c9c5778133344d9299fcaa20b0938e8acff2544bb40284b8c5fb94","60660257dd11b3aa9c8ed618d24edff2306d320f1d03010e33a7d2057f3b3b6"],["85b7c1dcb3cec1b7ee7f30ded79dd20a0ed1f4cc18cbcfcfa410361fd8f08f31","3d98a9cdd026dd43f39048f25a8847f4fcafad1895d7a633c6fed3c35e999511"],["29df9fbd8d9e46509275f4b125d6d45d7fbe9a3b878a7af872a2800661ac5f51","b4c4fe99c775a606e2d8862179139ffda61dc861c019e55cd2876eb2a27d84b"],["a0b1cae06b0a847a3fea6e671aaf8adfdfe58ca2f768105c8082b2e449fce252","ae434102edde0958ec4b19d917a6a28e6b72da1834aff0e650f049503a296cf2"],["4e8ceafb9b3e9a136dc7ff67e840295b499dfb3b2133e4ba113f2e4c0e121e5","cf2174118c8b6d7a4b48f6d534ce5c79422c086a63460502b827ce62a326683c"],["d24a44e047e19b6f5afb81c7ca2f69080a5076689a010919f42725c2b789a33b","6fb8d5591b466f8fc63db50f1c0f1c69013f996887b8244d2cdec417afea8fa3"],["ea01606a7a6c9cdd249fdfcfacb99584001edd28abbab77b5104e98e8e3b35d4","322af4908c7312b0cfbfe369f7a7b3cdb7d4494bc2823700cfd652188a3ea98d"],["af8addbf2b661c8a6c6328655eb96651252007d8c5ea31be4ad196de8ce2131f","6749e67c029b85f52a034eafd096836b2520818680e26ac8f3dfbcdb71749700"],["e3ae1974566ca06cc516d47e0fb165a674a3dabcfca15e722f0e3450f45889","2aeabe7e4531510116217f07bf4d07300de97e4874f81f533420a72eeb0bd6a4"],["591ee355313d99721cf6993ffed1e3e301993ff3ed258802075ea8ced397e246","b0ea558a113c30bea60fc4775460c7901ff0b053d25ca2bdeee98f1a4be5d196"],["11396d55fda54c49f19aa97318d8da61fa8584e47b084945077cf03255b52984","998c74a8cd45ac01289d5833a7beb4744ff536b01b257be4c5767bea93ea57a4"],["3c5d2a1ba39c5a1790000738c9e0c40b8dcdfd5468754b6405540157e017aa7a","b2284279995a34e2f9d4de7396fc18b80f9b8b9fdd270f6661f79ca4c81bd257"],["cc8704b8a60a0defa3a99a7299f2e9c3fbc395afb04ac078425ef8a1793cc030","bdd46039feed17881d1e0862db347f8cf395b74fc4bcdc4e940b74e3ac1f1b13"],["c533e4f7ea8555aacd9777ac5cad29b97dd4defccc53ee7ea204119b2889b197","6f0a256bc5efdf429a2fb6242f1a43a2d9b925bb4a4b3a26bb8e0f45eb596096"],["c14f8f2ccb27d6f109f6d08d03cc96a69ba8c34eec07bbcf566d48e33da6593","c359d6923bb398f7fd4473e16fe1c28475b740dd098075e6c0e8649113dc3a38"],["a6cbc3046bc6a450bac24789fa17115a4c9739ed75f8f21ce441f72e0b90e6ef","21ae7f4680e889bb130619e2c0f95a360ceb573c70603139862afd617fa9b9f"],["347d6d9a02c48927ebfb86c1359b1caf130a3c0267d11ce6344b39f99d43cc38","60ea7f61a353524d1c987f6ecec92f086d565ab687870cb12689ff1e31c74448"],["da6545d2181db8d983f7dcb375ef5866d47c67b1bf31c8cf855ef7437b72656a","49b96715ab6878a79e78f07ce5680c5d6673051b4935bd897fea824b77dc208a"],["c40747cc9d012cb1a13b8148309c6de7ec25d6945d657146b9d5994b8feb1111","5ca560753be2a12fc6de6caf2cb489565db936156b9514e1bb5e83037e0fa2d4"],["4e42c8ec82c99798ccf3a610be870e78338c7f713348bd34c8203ef4037f3502","7571d74ee5e0fb92a7a8b33a07783341a5492144cc54bcc40a94473693606437"],["3775ab7089bc6af823aba2e1af70b236d251cadb0c86743287522a1b3b0dedea","be52d107bcfa09d8bcb9736a828cfa7fac8db17bf7a76a2c42ad961409018cf7"],["cee31cbf7e34ec379d94fb814d3d775ad954595d1314ba8846959e3e82f74e26","8fd64a14c06b589c26b947ae2bcf6bfa0149ef0be14ed4d80f448a01c43b1c6d"],["b4f9eaea09b6917619f6ea6a4eb5464efddb58fd45b1ebefcdc1a01d08b47986","39e5c9925b5a54b07433a4f18c61726f8bb131c012ca542eb24a8ac07200682a"],["d4263dfc3d2df923a0179a48966d30ce84e2515afc3dccc1b77907792ebcc60e","62dfaf07a0f78feb30e30d6295853ce189e127760ad6cf7fae164e122a208d54"],["48457524820fa65a4f8d35eb6930857c0032acc0a4a2de422233eeda897612c4","25a748ab367979d98733c38a1fa1c2e7dc6cc07db2d60a9ae7a76aaa49bd0f77"],["dfeeef1881101f2cb11644f3a2afdfc2045e19919152923f367a1767c11cceda","ecfb7056cf1de042f9420bab396793c0c390bde74b4bbdff16a83ae09a9a7517"],["6d7ef6b17543f8373c573f44e1f389835d89bcbc6062ced36c82df83b8fae859","cd450ec335438986dfefa10c57fea9bcc521a0959b2d80bbf74b190dca712d10"],["e75605d59102a5a2684500d3b991f2e3f3c88b93225547035af25af66e04541f","f5c54754a8f71ee540b9b48728473e314f729ac5308b06938360990e2bfad125"],["eb98660f4c4dfaa06a2be453d5020bc99a0c2e60abe388457dd43fefb1ed620c","6cb9a8876d9cb8520609af3add26cd20a0a7cd8a9411131ce85f44100099223e"],["13e87b027d8514d35939f2e6892b19922154596941888336dc3563e3b8dba942","fef5a3c68059a6dec5d624114bf1e91aac2b9da568d6abeb2570d55646b8adf1"],["ee163026e9fd6fe017c38f06a5be6fc125424b371ce2708e7bf4491691e5764a","1acb250f255dd61c43d94ccc670d0f58f49ae3fa15b96623e5430da0ad6c62b2"],["b268f5ef9ad51e4d78de3a750c2dc89b1e626d43505867999932e5db33af3d80","5f310d4b3c99b9ebb19f77d41c1dee018cf0d34fd4191614003e945a1216e423"],["ff07f3118a9df035e9fad85eb6c7bfe42b02f01ca99ceea3bf7ffdba93c4750d","438136d603e858a3a5c440c38eccbaddc1d2942114e2eddd4740d098ced1f0d8"],["8d8b9855c7c052a34146fd20ffb658bea4b9f69e0d825ebec16e8c3ce2b526a1","cdb559eedc2d79f926baf44fb84ea4d44bcf50fee51d7ceb30e2e7f463036758"],["52db0b5384dfbf05bfa9d472d7ae26dfe4b851ceca91b1eba54263180da32b63","c3b997d050ee5d423ebaf66a6db9f57b3180c902875679de924b69d84a7b375"],["e62f9490d3d51da6395efd24e80919cc7d0f29c3f3fa48c6fff543becbd43352","6d89ad7ba4876b0b22c2ca280c682862f342c8591f1daf5170e07bfd9ccafa7d"],["7f30ea2476b399b4957509c88f77d0191afa2ff5cb7b14fd6d8e7d65aaab1193","ca5ef7d4b231c94c3b15389a5f6311e9daff7bb67b103e9880ef4bff637acaec"],["5098ff1e1d9f14fb46a210fada6c903fef0fb7b4a1dd1d9ac60a0361800b7a00","9731141d81fc8f8084d37c6e7542006b3ee1b40d60dfe5362a5b132fd17ddc0"],["32b78c7de9ee512a72895be6b9cbefa6e2f3c4ccce445c96b9f2c81e2778ad58","ee1849f513df71e32efc3896ee28260c73bb80547ae2275ba497237794c8753c"],["e2cb74fddc8e9fbcd076eef2a7c72b0ce37d50f08269dfc074b581550547a4f7","d3aa2ed71c9dd2247a62df062736eb0baddea9e36122d2be8641abcb005cc4a4"],["8438447566d4d7bedadc299496ab357426009a35f235cb141be0d99cd10ae3a8","c4e1020916980a4da5d01ac5e6ad330734ef0d7906631c4f2390426b2edd791f"],["4162d488b89402039b584c6fc6c308870587d9c46f660b878ab65c82c711d67e","67163e903236289f776f22c25fb8a3afc1732f2b84b4e95dbda47ae5a0852649"],["3fad3fa84caf0f34f0f89bfd2dcf54fc175d767aec3e50684f3ba4a4bf5f683d","cd1bc7cb6cc407bb2f0ca647c718a730cf71872e7d0d2a53fa20efcdfe61826"],["674f2600a3007a00568c1a7ce05d0816c1fb84bf1370798f1c69532faeb1a86b","299d21f9413f33b3edf43b257004580b70db57da0b182259e09eecc69e0d38a5"],["d32f4da54ade74abb81b815ad1fb3b263d82d6c692714bcff87d29bd5ee9f08f","f9429e738b8e53b968e99016c059707782e14f4535359d582fc416910b3eea87"],["30e4e670435385556e593657135845d36fbb6931f72b08cb1ed954f1e3ce3ff6","462f9bce619898638499350113bbc9b10a878d35da70740dc695a559eb88db7b"],["be2062003c51cc3004682904330e4dee7f3dcd10b01e580bf1971b04d4cad297","62188bc49d61e5428573d48a74e1c655b1c61090905682a0d5558ed72dccb9bc"],["93144423ace3451ed29e0fb9ac2af211cb6e84a601df5993c419859fff5df04a","7c10dfb164c3425f5c71a3f9d7992038f1065224f72bb9d1d902a6d13037b47c"],["b015f8044f5fcbdcf21ca26d6c34fb8197829205c7b7d2a7cb66418c157b112c","ab8c1e086d04e813744a655b2df8d5f83b3cdc6faa3088c1d3aea1454e3a1d5f"],["d5e9e1da649d97d89e4868117a465a3a4f8a18de57a140d36b3f2af341a21b52","4cb04437f391ed73111a13cc1d4dd0db1693465c2240480d8955e8592f27447a"],["d3ae41047dd7ca065dbf8ed77b992439983005cd72e16d6f996a5316d36966bb","bd1aeb21ad22ebb22a10f0303417c6d964f8cdd7df0aca614b10dc14d125ac46"],["463e2763d885f958fc66cdd22800f0a487197d0a82e377b49f80af87c897b065","bfefacdb0e5d0fd7df3a311a94de062b26b80c61fbc97508b79992671ef7ca7f"],["7985fdfd127c0567c6f53ec1bb63ec3158e597c40bfe747c83cddfc910641917","603c12daf3d9862ef2b25fe1de289aed24ed291e0ec6708703a5bd567f32ed03"],["74a1ad6b5f76e39db2dd249410eac7f99e74c59cb83d2d0ed5ff1543da7703e9","cc6157ef18c9c63cd6193d83631bbea0093e0968942e8c33d5737fd790e0db08"],["30682a50703375f602d416664ba19b7fc9bab42c72747463a71d0896b22f6da3","553e04f6b018b4fa6c8f39e7f311d3176290d0e0f19ca73f17714d9977a22ff8"],["9e2158f0d7c0d5f26c3791efefa79597654e7a2b2464f52b1ee6c1347769ef57","712fcdd1b9053f09003a3481fa7762e9ffd7c8ef35a38509e2fbf2629008373"],["176e26989a43c9cfeba4029c202538c28172e566e3c4fce7322857f3be327d66","ed8cc9d04b29eb877d270b4878dc43c19aefd31f4eee09ee7b47834c1fa4b1c3"],["75d46efea3771e6e68abb89a13ad747ecf1892393dfc4f1b7004788c50374da8","9852390a99507679fd0b86fd2b39a868d7efc22151346e1a3ca4726586a6bed8"],["809a20c67d64900ffb698c4c825f6d5f2310fb0451c869345b7319f645605721","9e994980d9917e22b76b061927fa04143d096ccc54963e6a5ebfa5f3f8e286c1"],["1b38903a43f7f114ed4500b4eac7083fdefece1cf29c63528d563446f972c180","4036edc931a60ae889353f77fd53de4a2708b26b6f5da72ad3394119daf408f9"]]}}},9185(e,t,i){"use strict";var n=t,s=i(5630),r=i(35578),o=i(94209);n.assert=r,n.toArray=o.toArray,n.zero2=o.zero2,n.toHex=o.toHex,n.encode=o.encode,n.getNAF=function(e,t,i){var n,s=new Array(Math.max(e.bitLength(),i)+1);for(n=0;n<s.length;n+=1)s[n]=0;var r=1<<t+1,o=e.clone();for(n=0;n<s.length;n++){var a,l=o.andln(r-1);o.isOdd()?(a=l>(r>>1)-1?(r>>1)-l:l,o.isubn(a)):a=0,s[n]=a,o.iushrn(1)}return s},n.getJSF=function(e,t){var i=[[],[]];e=e.clone(),t=t.clone();for(var n,s=0,r=0;e.cmpn(-s)>0||t.cmpn(-r)>0;){var o,a,l=e.andln(3)+s&3,c=t.andln(3)+r&3;3===l&&(l=-1),3===c&&(c=-1),o=1&l?3!=(n=e.andln(7)+s&7)&&5!==n||2!==c?l:-l:0,i[0].push(o),a=1&c?3!=(n=t.andln(7)+r&7)&&5!==n||2!==l?c:-c:0,i[1].push(a),2*s===o+1&&(s=1-s),2*r===a+1&&(r=1-r),e.iushrn(1),t.iushrn(1)}return i},n.cachedProperty=function(e,t,i){var n="_"+t;e.prototype[t]=function(){return void 0!==this[n]?this[n]:this[n]=i.call(this)}},n.parseBytes=function(e){return"string"==typeof e?n.toArray(e,"hex"):e},n.intFromLE=function(e){return new s(e,"hex","le")}},15120(e){function t(e){if(e)return function(e){for(var i in t.prototype)e[i]=t.prototype[i];return e}(e)}e.exports=t,t.prototype.on=t.prototype.addEventListener=function(e,t){return this._callbacks=this._callbacks||{},(this._callbacks[e]=this._callbacks[e]||[]).push(t),this},t.prototype.once=function(e,t){var i=this;function n(){i.off(e,n),t.apply(this,arguments)}return this._callbacks=this._callbacks||{},n.fn=t,this.on(e,n),this},t.prototype.off=t.prototype.removeListener=t.prototype.removeAllListeners=t.prototype.removeEventListener=function(e,t){if(this._callbacks=this._callbacks||{},0==arguments.length)return this._callbacks={},this;var i,n=this._callbacks[e];if(!n)return this;if(1==arguments.length)return delete this._callbacks[e],this;for(var s=0;s<n.length;s++)if((i=n[s])===t||i.fn===t){n.splice(s,1);break}return this},t.prototype.emit=function(e){this._callbacks=this._callbacks||{};var t=[].slice.call(arguments,1),i=this._callbacks[e];if(i)for(var n=0,s=(i=i.slice(0)).length;n<s;++n)i[n].apply(this,t);return this},t.prototype.listeners=function(e){return this._callbacks=this._callbacks||{},this._callbacks[e]||[]},t.prototype.hasListeners=function(e){return!!this.listeners(e).length}},15726(e,t,i){var n=i(69866),s=i(24758).each;function r(e,t){this.query=e,this.isUnconditional=t,this.handlers=[],this.mql=window.matchMedia(e);var i=this;this.listener=function(e){i.mql=e.currentTarget||e,i.assess()},this.mql.addListener(this.listener)}r.prototype={constuctor:r,addHandler:function(e){var t=new n(e);this.handlers.push(t),this.matches()&&t.on()},removeHandler:function(e){var t=this.handlers;s(t,function(i,n){if(i.equals(e))return i.destroy(),!t.splice(n,1)})},matches:function(){return this.mql.matches||this.isUnconditional},clear:function(){s(this.handlers,function(e){e.destroy()}),this.mql.removeListener(this.listener),this.handlers.length=0},assess:function(){var e=this.matches()?"on":"off";s(this.handlers,function(t){t[e]()})}},e.exports=r},68456(e,t,i){var n=i(15726),s=i(24758),r=s.each,o=s.isFunction,a=s.isArray;function l(){if(!window.matchMedia)throw new Error("matchMedia not present, legacy browsers require a polyfill");this.queries={},this.browserIsIncapable=!window.matchMedia("only all").matches}l.prototype={constructor:l,register:function(e,t,i){var s=this.queries,l=i&&this.browserIsIncapable;return s[e]||(s[e]=new n(e,l)),o(t)&&(t={match:t}),a(t)||(t=[t]),r(t,function(t){o(t)&&(t={match:t}),s[e].addHandler(t)}),this},unregister:function(e,t){var i=this.queries[e];return i&&(t?i.removeHandler(t):(i.clear(),delete this.queries[e])),this}},e.exports=l},69866(e){function t(e){this.options=e,!e.deferSetup&&this.setup()}t.prototype={constructor:t,setup:function(){this.options.setup&&this.options.setup(),this.initialised=!0},on:function(){!this.initialised&&this.setup(),this.options.match&&this.options.match()},off:function(){this.options.unmatch&&this.options.unmatch()},destroy:function(){this.options.destroy?this.options.destroy():this.off()},equals:function(e){return this.options===e||this.options.match===e}},e.exports=t},24758(e){e.exports={isFunction:function(e){return"function"==typeof e},isArray:function(e){return"[object Array]"===Object.prototype.toString.apply(e)},each:function(e,t){for(var i=0,n=e.length;i<n&&!1!==t(e[i],i);i++);}}},78708(e,t,i){var n=i(68456);e.exports=new n},39886(e){"use strict";var t=Object.defineProperty||!1;if(t)try{t({},"a",{value:1})}catch(e){t=!1}e.exports=t},38004(e){"use strict";e.exports=EvalError},41488(e){"use strict";e.exports=Error},96469(e){"use strict";e.exports=RangeError},12557(e){"use strict";e.exports=ReferenceError},63429(e){"use strict";e.exports=SyntaxError},71102(e){"use strict";e.exports=TypeError},85966(e){"use strict";e.exports=URIError},25153(e){"use strict";e.exports=Object},80381(e){"use strict";var t,i="object"==typeof Reflect?Reflect:null,n=i&&"function"==typeof i.apply?i.apply:function(e,t,i){return Function.prototype.apply.call(e,t,i)};t=i&&"function"==typeof i.ownKeys?i.ownKeys:Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:function(e){return Object.getOwnPropertyNames(e)};var s=Number.isNaN||function(e){return e!=e};function r(){r.init.call(this)}e.exports=r,e.exports.once=function(e,t){return new Promise(function(i,n){function s(i){e.removeListener(t,r),n(i)}function r(){"function"==typeof e.removeListener&&e.removeListener("error",s),i([].slice.call(arguments))}f(e,t,r,{once:!0}),"error"!==t&&function(e,t){"function"==typeof e.on&&f(e,"error",t,{once:!0})}(e,s)})},r.EventEmitter=r,r.prototype._events=void 0,r.prototype._eventsCount=0,r.prototype._maxListeners=void 0;var o=10;function a(e){if("function"!=typeof e)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof e)}function l(e){return void 0===e._maxListeners?r.defaultMaxListeners:e._maxListeners}function c(e,t,i,n){var s,r,o,c;if(a(i),void 0===(r=e._events)?(r=e._events=Object.create(null),e._eventsCount=0):(void 0!==r.newListener&&(e.emit("newListener",t,i.listener?i.listener:i),r=e._events),o=r[t]),void 0===o)o=r[t]=i,++e._eventsCount;else if("function"==typeof o?o=r[t]=n?[i,o]:[o,i]:n?o.unshift(i):o.push(i),(s=l(e))>0&&o.length>s&&!o.warned){o.warned=!0;var h=new Error("Possible EventEmitter memory leak detected. "+o.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");h.name="MaxListenersExceededWarning",h.emitter=e,h.type=t,h.count=o.length,c=h,console&&console.warn&&console.warn(c)}return e}function h(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0===arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function d(e,t,i){var n={fired:!1,wrapFn:void 0,target:e,type:t,listener:i},s=h.bind(n);return s.listener=i,n.wrapFn=s,s}function u(e,t,i){var n=e._events;if(void 0===n)return[];var s=n[t];return void 0===s?[]:"function"==typeof s?i?[s.listener||s]:[s]:i?function(e){for(var t=new Array(e.length),i=0;i<t.length;++i)t[i]=e[i].listener||e[i];return t}(s):g(s,s.length)}function p(e){var t=this._events;if(void 0!==t){var i=t[e];if("function"==typeof i)return 1;if(void 0!==i)return i.length}return 0}function g(e,t){for(var i=new Array(t),n=0;n<t;++n)i[n]=e[n];return i}function f(e,t,i,n){if("function"==typeof e.on)n.once?e.once(t,i):e.on(t,i);else{if("function"!=typeof e.addEventListener)throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof e);e.addEventListener(t,function s(r){n.once&&e.removeEventListener(t,s),i(r)})}}Object.defineProperty(r,"defaultMaxListeners",{enumerable:!0,get:function(){return o},set:function(e){if("number"!=typeof e||e<0||s(e))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+e+".");o=e}}),r.init=function(){void 0!==this._events&&this._events!==Object.getPrototypeOf(this)._events||(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},r.prototype.setMaxListeners=function(e){if("number"!=typeof e||e<0||s(e))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+e+".");return this._maxListeners=e,this},r.prototype.getMaxListeners=function(){return l(this)},r.prototype.emit=function(e){for(var t=[],i=1;i<arguments.length;i++)t.push(arguments[i]);var s="error"===e,r=this._events;if(void 0!==r)s=s&&void 0===r.error;else if(!s)return!1;if(s){var o;if(t.length>0&&(o=t[0]),o instanceof Error)throw o;var a=new Error("Unhandled error."+(o?" ("+o.message+")":""));throw a.context=o,a}var l=r[e];if(void 0===l)return!1;if("function"==typeof l)n(l,this,t);else{var c=l.length,h=g(l,c);for(i=0;i<c;++i)n(h[i],this,t)}return!0},r.prototype.addListener=function(e,t){return c(this,e,t,!1)},r.prototype.on=r.prototype.addListener,r.prototype.prependListener=function(e,t){return c(this,e,t,!0)},r.prototype.once=function(e,t){return a(t),this.on(e,d(this,e,t)),this},r.prototype.prependOnceListener=function(e,t){return a(t),this.prependListener(e,d(this,e,t)),this},r.prototype.removeListener=function(e,t){var i,n,s,r,o;if(a(t),void 0===(n=this._events))return this;if(void 0===(i=n[e]))return this;if(i===t||i.listener===t)0===--this._eventsCount?this._events=Object.create(null):(delete n[e],n.removeListener&&this.emit("removeListener",e,i.listener||t));else if("function"!=typeof i){for(s=-1,r=i.length-1;r>=0;r--)if(i[r]===t||i[r].listener===t){o=i[r].listener,s=r;break}if(s<0)return this;0===s?i.shift():function(e,t){for(;t+1<e.length;t++)e[t]=e[t+1];e.pop()}(i,s),1===i.length&&(n[e]=i[0]),void 0!==n.removeListener&&this.emit("removeListener",e,o||t)}return this},r.prototype.off=r.prototype.removeListener,r.prototype.removeAllListeners=function(e){var t,i,n;if(void 0===(i=this._events))return this;if(void 0===i.removeListener)return 0===arguments.length?(this._events=Object.create(null),this._eventsCount=0):void 0!==i[e]&&(0===--this._eventsCount?this._events=Object.create(null):delete i[e]),this;if(0===arguments.length){var s,r=Object.keys(i);for(n=0;n<r.length;++n)"removeListener"!==(s=r[n])&&this.removeAllListeners(s);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if("function"==typeof(t=i[e]))this.removeListener(e,t);else if(void 0!==t)for(n=t.length-1;n>=0;n--)this.removeListener(e,t[n]);return this},r.prototype.listeners=function(e){return u(this,e,!0)},r.prototype.rawListeners=function(e){return u(this,e,!1)},r.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):p.call(e,t)},r.prototype.listenerCount=p,r.prototype.eventNames=function(){return this._eventsCount>0?t(this._events):[]}},51804(e,t,i){var n=i(56608).Buffer,s=i(75035);e.exports=function(e,t,i,r){if(n.isBuffer(e)||(e=n.from(e,"binary")),t&&(n.isBuffer(t)||(t=n.from(t,"binary")),8!==t.length))throw new RangeError("salt should be Buffer with 8 byte length");for(var o=i/8,a=n.alloc(o),l=n.alloc(r||0),c=n.alloc(0);o>0||r>0;){var h=new s;h.update(c),h.update(e),t&&h.update(t),c=h.digest();var d=0;if(o>0){var u=a.length-o;d=Math.min(o,c.length),c.copy(a,u,0,d),o-=d}if(d<c.length&&r>0){var p=l.length-r,g=Math.min(r,c.length-d);c.copy(l,p,d,d+g),r-=g}}return c.fill(0),{key:a,iv:l}}},52083(e,t,i){var n;!function(){"use strict";var s=!("undefined"==typeof window||!window.document||!window.document.createElement),r={canUseDOM:s,canUseWorkers:"undefined"!=typeof Worker,canUseEventListeners:s&&!(!window.addEventListener&&!window.attachEvent),canUseViewport:s&&!!window.screen};void 0===(n=function(){return r}.call(t,i,t,e))||(e.exports=n)}()},49461(e){"use strict";var t=Object.prototype.hasOwnProperty,i=Object.prototype.toString,n=Object.defineProperty,s=Object.getOwnPropertyDescriptor,r=function(e){return"function"==typeof Array.isArray?Array.isArray(e):"[object Array]"===i.call(e)},o=function(e){if(!e||"[object Object]"!==i.call(e))return!1;var n,s=t.call(e,"constructor"),r=e.constructor&&e.constructor.prototype&&t.call(e.constructor.prototype,"isPrototypeOf");if(e.constructor&&!s&&!r)return!1;for(n in e);return void 0===n||t.call(e,n)},a=function(e,t){n&&"__proto__"===t.name?n(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},l=function(e,i){if("__proto__"===i){if(!t.call(e,i))return;if(s)return s(e,i).value}return e[i]};e.exports=function e(){var t,i,n,s,c,h,d=arguments[0],u=1,p=arguments.length,g=!1;for("boolean"==typeof d&&(g=d,d=arguments[1]||{},u=2),(null==d||"object"!=typeof d&&"function"!=typeof d)&&(d={});u<p;++u)if(null!=(t=arguments[u]))for(i in t)n=l(d,i),d!==(s=l(t,i))&&(g&&s&&(o(s)||(c=r(s)))?(c?(c=!1,h=n&&r(n)?n:[]):h=n&&o(n)?n:{},a(d,{name:i,newValue:e(g,h,s)})):void 0!==s&&a(d,{name:i,newValue:s}));return d}},67371(e){"use strict";e.exports=function e(t,i){if(t===i)return!0;if(t&&i&&"object"==typeof t&&"object"==typeof i){if(t.constructor!==i.constructor)return!1;var n,s,r;if(Array.isArray(t)){if((n=t.length)!=i.length)return!1;for(s=n;0!==s--;)if(!e(t[s],i[s]))return!1;return!0}if(t.constructor===RegExp)return t.source===i.source&&t.flags===i.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===i.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===i.toString();if((n=(r=Object.keys(t)).length)!==Object.keys(i).length)return!1;for(s=n;0!==s--;)if(!Object.prototype.hasOwnProperty.call(i,r[s]))return!1;for(s=n;0!==s--;){var o=r[s];if(!e(t[o],i[o]))return!1}return!0}return t!=t&&i!=i}},53039(e,t,i){"use strict";i.d(t,{D4:()=>L});var n=i(84708),s=i(35310);const r=[];for(let e=0;e<256;e++){let t=e;for(let e=0;e<8;e++)1&t?t=3988292384^t>>>1:t>>>=1;r[e]=t}const o=4294967295;function a(e,t,i){const n=e.readUint32(),s=(a=new Uint8Array(e.buffer,e.byteOffset+e.offset-t-4,t),(function(e,t,i){let n=e;for(let e=0;e<i;e++)n=r[255&(n^t[e])]^n>>>8;return n}(o,a,t)^o)>>>0);var a;if(s!==n)throw new Error(`CRC mismatch for chunk ${i}. Expected ${n}, found ${s}`)}function l(e,t,i){for(let n=0;n<i;n++)t[n]=e[n]}function c(e,t,i,n){let s=0;for(;s<n;s++)t[s]=e[s];for(;s<i;s++)t[s]=e[s]+t[s-n]&255}function h(e,t,i,n){let s=0;if(0===i.length)for(;s<n;s++)t[s]=e[s];else for(;s<n;s++)t[s]=e[s]+i[s]&255}function d(e,t,i,n,s){let r=0;if(0===i.length){for(;r<s;r++)t[r]=e[r];for(;r<n;r++)t[r]=e[r]+(t[r-s]>>1)&255}else{for(;r<s;r++)t[r]=e[r]+(i[r]>>1)&255;for(;r<n;r++)t[r]=e[r]+(t[r-s]+i[r]>>1)&255}}function u(e,t,i,n,s){let r=0;if(0===i.length){for(;r<s;r++)t[r]=e[r];for(;r<n;r++)t[r]=e[r]+t[r-s]&255}else{for(;r<s;r++)t[r]=e[r]+i[r]&255;for(;r<n;r++)t[r]=e[r]+p(t[r-s],i[r],i[r-s])&255}}function p(e,t,i){const n=e+t-i,s=Math.abs(n-e),r=Math.abs(n-t),o=Math.abs(n-i);return s<=r&&s<=o?e:r<=o?t:i}function g(e,t,i,n,s,r){switch(e){case 0:l(t,i,s);break;case 1:c(t,i,s,r);break;case 2:h(t,i,n,s);break;case 3:d(t,i,n,s,r);break;case 4:u(t,i,n,s,r);break;default:throw new Error(`Unsupported filter: ${e}`)}}const f=new Uint16Array([255]),m=255===new Uint8Array(f.buffer)[0];function v(e){return(255&e)<<8|e>>8&255}const y=new Uint16Array([255]),C=255===new Uint8Array(y.buffer)[0],b=new Uint8Array(0);function S(e){const{data:t,width:i,height:n,channels:s,depth:r}=e,o=Math.ceil(r/8)*s,a=Math.ceil(r/8*s*i),p=new Uint8Array(n*a);let g,f,m=b,v=0;for(let e=0;e<n;e++){switch(g=t.subarray(v+1,v+1+a),f=p.subarray(e*a,(e+1)*a),t[v]){case 0:l(g,f,a);break;case 1:c(g,f,a,o);break;case 2:h(g,f,m,a);break;case 3:d(g,f,m,a,o);break;case 4:u(g,f,m,a,o);break;default:throw new Error(`Unsupported filter: ${t[v]}`)}m=f,v+=a+1}if(16===r){const e=new Uint16Array(p.buffer);if(C)for(let t=0;t<e.length;t++)e[t]=w(e[t]);return e}return p}function w(e){return(255&e)<<8|e>>8&255}const x=Uint8Array.of(137,80,78,71,13,10,26,10);function E(e){if(!function(e){if(e.length<x.length)return!1;for(let t=0;t<x.length;t++)if(e[t]!==x[t])return!1;return!0}(e.readBytes(x.length)))throw new Error("wrong PNG signature")}const M=new TextDecoder("latin1");function A(e){if(function(e){if(!T.test(e))throw new Error("invalid latin1 text")}(e),0===e.length||e.length>79)throw new Error("keyword length must be between 1 and 79")}const T=/^[\u0000-\u00FF]*$/;function D(e){for(e.mark();0!==e.readByte(););const t=e.offset;e.reset();const i=M.decode(e.readBytes(t-e.offset-1));return e.skip(1),A(i),i}class I extends n.H{_checkCrc;_inflator;_png;_apng;_end;_hasPalette;_palette;_hasTransparency;_transparency;_compressionMethod;_filterMethod;_interlaceMethod;_colorType;_isAnimated;_numberOfFrames;_numberOfPlays;_frames;_writingDataChunks;constructor(e,t={}){super(e);const{checkCrc:i=!1}=t;this._checkCrc=i,this._inflator=new s.EL,this._png={width:-1,height:-1,channels:-1,data:new Uint8Array(0),depth:1,text:{}},this._apng={width:-1,height:-1,channels:-1,depth:1,numberOfFrames:1,numberOfPlays:0,text:{},frames:[]},this._end=!1,this._hasPalette=!1,this._palette=[],this._hasTransparency=!1,this._transparency=new Uint16Array(0),this._compressionMethod=-1,this._filterMethod=-1,this._interlaceMethod=-1,this._colorType=-1,this._isAnimated=!1,this._numberOfFrames=1,this._numberOfPlays=0,this._frames=[],this._writingDataChunks=!1,this.setBigEndian()}decode(){for(E(this);!this._end;){const e=this.readUint32(),t=this.readChars(4);this.decodeChunk(e,t)}return this.decodeImage(),this._png}decodeApng(){for(E(this);!this._end;){const e=this.readUint32(),t=this.readChars(4);this.decodeApngChunk(e,t)}return this.decodeApngImage(),this._apng}decodeChunk(e,t){const i=this.offset;switch(t){case"IHDR":this.decodeIHDR();break;case"PLTE":this.decodePLTE(e);break;case"IDAT":this.decodeIDAT(e);break;case"IEND":this._end=!0;break;case"tRNS":this.decodetRNS(e);break;case"iCCP":this.decodeiCCP(e);break;case"tEXt":!function(e,t,i){const n=D(t);e[n]=function(e,t){return M.decode(e.readBytes(t))}(t,i-n.length-1)}(this._png.text,this,e);break;case"pHYs":this.decodepHYs();break;default:this.skip(e)}if(this.offset-i!==e)throw new Error(`Length mismatch while decoding chunk ${t}`);this._checkCrc?a(this,e+4,t):this.skip(4)}decodeApngChunk(e,t){const i=this.offset;switch("fdAT"!==t&&"IDAT"!==t&&this._writingDataChunks&&this.pushDataToFrame(),t){case"acTL":this.decodeACTL();break;case"fcTL":this.decodeFCTL();break;case"fdAT":this.decodeFDAT(e);break;default:this.decodeChunk(e,t),this.offset=i+e}if(this.offset-i!==e)throw new Error(`Length mismatch while decoding chunk ${t}`);this._checkCrc?a(this,e+4,t):this.skip(4)}decodeIHDR(){const e=this._png;e.width=this.readUint32(),e.height=this.readUint32(),e.depth=function(e){if(1!==e&&2!==e&&4!==e&&8!==e&&16!==e)throw new Error(`invalid bit depth: ${e}`);return e}(this.readUint8());const t=this.readUint8();let i;switch(this._colorType=t,t){case 0:case 3:i=1;break;case 2:i=3;break;case 4:i=2;break;case 6:i=4;break;default:throw new Error(`Unknown color type: ${t}`)}if(this._png.channels=i,this._compressionMethod=this.readUint8(),0!==this._compressionMethod)throw new Error(`Unsupported compression method: ${this._compressionMethod}`);this._filterMethod=this.readUint8(),this._interlaceMethod=this.readUint8()}decodeACTL(){this._numberOfFrames=this.readUint32(),this._numberOfPlays=this.readUint32(),this._isAnimated=!0}decodeFCTL(){const e={sequenceNumber:this.readUint32(),width:this.readUint32(),height:this.readUint32(),xOffset:this.readUint32(),yOffset:this.readUint32(),delayNumber:this.readUint16(),delayDenominator:this.readUint16(),disposeOp:this.readUint8(),blendOp:this.readUint8(),data:new Uint8Array(0)};this._frames.push(e)}decodePLTE(e){if(e%3!=0)throw new RangeError(`PLTE field length must be a multiple of 3. Got ${e}`);const t=e/3;this._hasPalette=!0;const i=[];this._palette=i;for(let e=0;e<t;e++)i.push([this.readUint8(),this.readUint8(),this.readUint8()])}decodeIDAT(e){this._writingDataChunks=!0;const t=e,i=this.offset+this.byteOffset;if(this._inflator.push(new Uint8Array(this.buffer,i,t)),this._inflator.err)throw new Error(`Error while decompressing the data: ${this._inflator.err}`);this.skip(e)}decodeFDAT(e){this._writingDataChunks=!0;let t=e,i=this.offset+this.byteOffset;if(i+=4,t-=4,this._inflator.push(new Uint8Array(this.buffer,i,t)),this._inflator.err)throw new Error(`Error while decompressing the data: ${this._inflator.err}`);this.skip(e)}decodetRNS(e){switch(this._colorType){case 0:case 2:if(e%2!=0)throw new RangeError(`tRNS chunk length must be a multiple of 2. Got ${e}`);if(e/2>this._png.width*this._png.height)throw new Error(`tRNS chunk contains more alpha values than there are pixels (${e/2} vs ${this._png.width*this._png.height})`);this._hasTransparency=!0,this._transparency=new Uint16Array(e/2);for(let t=0;t<e/2;t++)this._transparency[t]=this.readUint16();break;case 3:{if(e>this._palette.length)throw new Error(`tRNS chunk contains more alpha values than there are palette colors (${e} vs ${this._palette.length})`);let t=0;for(;t<e;t++){const e=this.readByte();this._palette[t].push(e)}for(;t<this._palette.length;t++)this._palette[t].push(255);break}default:throw new Error(`tRNS chunk is not supported for color type ${this._colorType}`)}}decodeiCCP(e){const t=D(this),i=this.readUint8();if(0!==i)throw new Error(`Unsupported iCCP compression method: ${i}`);const n=this.readBytes(e-t.length-2);this._png.iccEmbeddedProfile={name:t,profile:(0,s.UD)(n)}}decodepHYs(){const e=this.readUint32(),t=this.readUint32(),i=this.readByte();this._png.resolution={x:e,y:t,unit:i}}decodeApngImage(){this._apng.width=this._png.width,this._apng.height=this._png.height,this._apng.channels=this._png.channels,this._apng.depth=this._png.depth,this._apng.numberOfFrames=this._numberOfFrames,this._apng.numberOfPlays=this._numberOfPlays,this._apng.text=this._png.text,this._apng.resolution=this._png.resolution;for(let e=0;e<this._numberOfFrames;e++){const t={sequenceNumber:this._frames[e].sequenceNumber,delayNumber:this._frames[e].delayNumber,delayDenominator:this._frames[e].delayDenominator,data:8===this._apng.depth?new Uint8Array(this._apng.width*this._apng.height*this._apng.channels):new Uint16Array(this._apng.width*this._apng.height*this._apng.channels)},i=this._frames.at(e);if(i){if(i.data=S({data:i.data,width:i.width,height:i.height,channels:this._apng.channels,depth:this._apng.depth}),this._hasPalette&&(this._apng.palette=this._palette),this._hasTransparency&&(this._apng.transparency=this._transparency),0===e||0===i.xOffset&&0===i.yOffset&&i.width===this._png.width&&i.height===this._png.height)t.data=i.data;else{const n=this._apng.frames.at(e-1);this.disposeFrame(i,n,t),this.addFrameDataToCanvas(t,i)}this._apng.frames.push(t)}}return this._apng}disposeFrame(e,t,i){switch(e.disposeOp){case 0:break;case 1:for(let t=0;t<this._png.height;t++)for(let n=0;n<this._png.width;n++){const s=(t*e.width+n)*this._png.channels;for(let e=0;e<this._png.channels;e++)i.data[s+e]=0}break;case 2:i.data.set(t.data);break;default:throw new Error("Unknown disposeOp")}}addFrameDataToCanvas(e,t){const i=1<<this._png.depth,n=(e,i)=>({index:((e+t.yOffset)*this._png.width+t.xOffset+i)*this._png.channels,frameIndex:(e*t.width+i)*this._png.channels});switch(t.blendOp){case 0:for(let i=0;i<t.height;i++)for(let s=0;s<t.width;s++){const{index:r,frameIndex:o}=n(i,s);for(let i=0;i<this._png.channels;i++)e.data[r+i]=t.data[o+i]}break;case 1:for(let s=0;s<t.height;s++)for(let r=0;r<t.width;r++){const{index:o,frameIndex:a}=n(s,r);for(let n=0;n<this._png.channels;n++){const s=t.data[a+this._png.channels-1]/i,r=n%(this._png.channels-1)==0?1:t.data[a+n],l=Math.floor(s*r+(1-s)*e.data[o+n]);e.data[o+n]+=l}}break;default:throw new Error("Unknown blendOp")}}decodeImage(){if(this._inflator.err)throw new Error(`Error while decompressing the data: ${this._inflator.err}`);const e=this._isAnimated?(this._frames?.at(0)).data:this._inflator.result;if(0!==this._filterMethod)throw new Error(`Filter method ${this._filterMethod} not supported`);if(0===this._interlaceMethod)this._png.data=S({data:e,width:this._png.width,height:this._png.height,channels:this._png.channels,depth:this._png.depth});else{if(1!==this._interlaceMethod)throw new Error(`Interlace method ${this._interlaceMethod} not supported`);this._png.data=function(e){const{data:t,width:i,height:n,channels:s,depth:r}=e,o=[{x:0,y:0,xStep:8,yStep:8},{x:4,y:0,xStep:8,yStep:8},{x:0,y:4,xStep:4,yStep:8},{x:2,y:0,xStep:4,yStep:4},{x:0,y:2,xStep:2,yStep:4},{x:1,y:0,xStep:2,yStep:2},{x:0,y:1,xStep:1,yStep:2}],a=Math.ceil(r/8)*s,l=new Uint8Array(n*i*a);let c=0;for(let e=0;e<7;e++){const s=o[e],r=Math.ceil((i-s.x)/s.xStep),h=Math.ceil((n-s.y)/s.yStep);if(r<=0||h<=0)continue;const d=r*a,u=new Uint8Array(d);for(let e=0;e<h;e++){const o=t[c++],h=t.subarray(c,c+d);c+=d;const p=new Uint8Array(d);g(o,h,p,u,d,a),u.set(p);for(let t=0;t<r;t++){const r=s.x+t*s.xStep,o=s.y+e*s.yStep;if(!(r>=i||o>=n))for(let e=0;e<a;e++)l[(o*i+r)*a+e]=p[t*a+e]}}}if(16===r){const e=new Uint16Array(l.buffer);if(m)for(let t=0;t<e.length;t++)e[t]=v(e[t]);return e}return l}({data:e,width:this._png.width,height:this._png.height,channels:this._png.channels,depth:this._png.depth})}this._hasPalette&&(this._png.palette=this._palette),this._hasTransparency&&(this._png.transparency=this._transparency)}pushDataToFrame(){const e=this._inflator.result,t=this._frames.at(-1);t?t.data=e:this._frames.push({sequenceNumber:0,width:this._png.width,height:this._png.height,xOffset:0,yOffset:0,delayNumber:0,delayDenominator:0,disposeOp:0,blendOp:0,data:e}),this._inflator=new s.EL,this._writingDataChunks=!1}}var R;function L(e,t){return new I(e,t).decode()}n.H,function(e){e[e.UNKNOWN=0]="UNKNOWN",e[e.METRE=1]="METRE"}(R||(R={}))},81354(e,t,i){"use strict";var n=i(7144),s=i(95573),r=i(1948),o=new RegExp("\r\n","g"),a={"text/rtf":1,"text/html":1};function l(e){if("file"==e.kind)return e.getAsFile()}var c=function(){function e(e){this.data=e,this.types=e.types?s(e.types):[]}var t=e.prototype;return t.isRichText=function(){return!(!this.getHTML()||!this.getText())||!this.isImage()&&this.types.some(function(e){return a[e]})},t.getText=function(){var e;return this.data.getData&&(this.types.length?-1!=this.types.indexOf("text/plain")&&(e=this.data.getData("text/plain")):e=this.data.getData("Text")),e?e.replace(o,"\n"):null},t.getHTML=function(){if(this.data.getData){if(!this.types.length)return this.data.getData("Text");if(-1!=this.types.indexOf("text/html"))return this.data.getData("text/html")}},t.isLink=function(){return this.types.some(function(e){return-1!=e.indexOf("Url")||-1!=e.indexOf("text/uri-list")||e.indexOf("text/x-moz-url")})},t.getLink=function(){return this.data.getData?-1!=this.types.indexOf("text/x-moz-url")?this.data.getData("text/x-moz-url").split("\n")[0]:-1!=this.types.indexOf("text/uri-list")?this.data.getData("text/uri-list"):this.data.getData("url"):null},t.isImage=function(){var e=this.types.some(function(e){return-1!=e.indexOf("application/x-moz-file")});if(e)return!0;for(var t=this.getFiles(),i=0;i<t.length;i++){var s=t[i].type;if(!n.isImage(s))return!1}return!0},t.getCount=function(){return this.data.hasOwnProperty("items")?this.data.items.length:this.data.hasOwnProperty("mozItemCount")?this.data.mozItemCount:this.data.files?this.data.files.length:null},t.getFiles=function(){return this.data.items?Array.prototype.slice.call(this.data.items).map(l).filter(r.thatReturnsArgument):this.data.files?Array.prototype.slice.call(this.data.files):[]},t.hasFiles=function(){return this.getFiles().length>0},e}();e.exports=c},4617(e){"use strict";e.exports={BACKSPACE:8,TAB:9,RETURN:13,ALT:18,ESC:27,SPACE:32,PAGE_UP:33,PAGE_DOWN:34,END:35,HOME:36,LEFT:37,UP:38,RIGHT:39,DOWN:40,DELETE:46,COMMA:188,PERIOD:190,A:65,Z:90,ZERO:48,NUMPAD_0:96,NUMPAD_9:105}},7144(e){"use strict";var t={isImage:function(e){return"image"===i(e)[0]},isJpeg:function(e){var n=i(e);return t.isImage(e)&&("jpeg"===n[1]||"pjpeg"===n[1])}};function i(e){return e.split("/")}e.exports=t},72528(e){"use strict";function t(e,t){return!!t&&(e===t.documentElement||e===t.body)}var i={getTop:function(e){var i=e.ownerDocument;return t(e,i)?i.body.scrollTop||i.documentElement.scrollTop:e.scrollTop},setTop:function(e,i){var n=e.ownerDocument;t(e,n)?n.body.scrollTop=n.documentElement.scrollTop=i:e.scrollTop=i},getLeft:function(e){var i=e.ownerDocument;return t(e,i)?i.body.scrollLeft||i.documentElement.scrollLeft:e.scrollLeft},setLeft:function(e,i){var n=e.ownerDocument;t(e,n)?n.body.scrollLeft=n.documentElement.scrollLeft=i:e.scrollLeft=i}};e.exports=i},98556(e,t,i){"use strict";function n(e,t){var i=s.get(e,t);return"auto"===i||"scroll"===i}var s={get:i(54973),getScrollParent:function(e){if(!e)return null;for(var t=e.ownerDocument;e&&e!==t.body;){if(n(e,"overflow")||n(e,"overflowY")||n(e,"overflowX"))return e;e=e.parentNode}return t.defaultView||t.parentWindow}};e.exports=s},59544(e){"use strict";e.exports={getPunctuation:function(){return"[.,+*?$|#{}()'\\^\\-\\[\\]\\\\\\/!@%\"~=<>_:;・、。〈-】〔-〟：-？！-／［-｀｛-･⸮؟٪-٬؛،؍﴾﴿᠁।၊။‐-‧‰-⁞¡-±´-¸º»¿]"}}},10499(e){"use strict";var t=function(){function e(e){var t,i;i=void 0,(t="_uri")in this?Object.defineProperty(this,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):this[t]=i,this._uri=e}return e.prototype.toString=function(){return this._uri},e}();e.exports=t},46616(e,t,i){"use strict";var n=i(76675),s=i(40041),r="֐־׀׃׆׈-׏א-ת׫-ׯװ-ײ׳-״׵-׿߀-߉ߊ-ߪߴ-ߵߺ߻-߿ࠀ-ࠕࠚࠤࠨ࠮-࠯࠰-࠾࠿ࡀ-ࡘ࡜-࡝࡞࡟-࢟‏יִײַ-ﬨשׁ-זּ﬷טּ-לּ﬽מּ﬿נּ-סּ﭂ףּ-פּ﭅צּ-ﭏ",o="؈؋؍؛؜؝؞-؟ؠ-ؿـف-ي٭ٮ-ٯٱ-ۓ۔ەۥ-ۦۮ-ۯۺ-ۼ۽-۾ۿ܀-܍܎܏ܐܒ-ܯ݋-݌ݍ-ޥޱ޲-޿ࢠ-ࢲࢳ-ࣣﭐ-ﮱ﮲-﯁﯂-﯒ﯓ-ﴽ﵀-﵏ﵐ-ﶏ﶐-﶑ﶒ-ﷇ﷈-﷏ﷰ-ﷻ﷼﷾-﷿ﹰ-ﹴ﹵ﹶ-ﻼ﻽-﻾",a=new RegExp("[A-Za-zªµºÀ-ÖØ-öø-ƺƻƼ-ƿǀ-ǃǄ-ʓʔʕ-ʯʰ-ʸʻ-ˁː-ˑˠ-ˤˮͰ-ͳͶ-ͷͺͻ-ͽͿΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁ҂Ҋ-ԯԱ-Ֆՙ՚-՟ա-և։ःऄ-हऻऽा-ीॉ-ौॎ-ॏॐक़-ॡ।-॥०-९॰ॱॲ-ঀং-ঃঅ-ঌএ-ঐও-নপ-রলশ-হঽা-ীে-ৈো-ৌৎৗড়-ঢ়য়-ৡ০-৯ৰ-ৱ৴-৹৺ਃਅ-ਊਏ-ਐਓ-ਨਪ-ਰਲ-ਲ਼ਵ-ਸ਼ਸ-ਹਾ-ੀਖ਼-ੜਫ਼੦-੯ੲ-ੴઃઅ-ઍએ-ઑઓ-નપ-રલ-ળવ-હઽા-ીૉો-ૌૐૠ-ૡ૦-૯૰ଂ-ଃଅ-ଌଏ-ଐଓ-ନପ-ରଲ-ଳଵ-ହଽାୀେ-ୈୋ-ୌୗଡ଼-ଢ଼ୟ-ୡ୦-୯୰ୱ୲-୷ஃஅ-ஊஎ-ஐஒ-கங-சஜஞ-டண-தந-பம-ஹா-ிு-ூெ-ைொ-ௌௐௗ௦-௯௰-௲ఁ-ఃఅ-ఌఎ-ఐఒ-నప-హఽు-ౄౘ-ౙౠ-ౡ౦-౯౿ಂ-ಃಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹಽಾಿೀ-ೄೆೇ-ೈೊ-ೋೕ-ೖೞೠ-ೡ೦-೯ೱ-ೲം-ഃഅ-ഌഎ-ഐഒ-ഺഽാ-ീെ-ൈൊ-ൌൎൗൠ-ൡ൦-൯൰-൵൹ൺ-ൿං-ඃඅ-ඖක-නඳ-රලව-ෆා-ෑෘ-ෟ෦-෯ෲ-ෳ෴ก-ะา-ำเ-ๅๆ๏๐-๙๚-๛ກ-ຂຄງ-ຈຊຍດ-ທນ-ຟມ-ຣລວສ-ຫອ-ະາ-ຳຽເ-ໄໆ໐-໙ໜ-ໟༀ༁-༃༄-༒༓༔༕-༗༚-༟༠-༩༪-༳༴༶༸༾-༿ཀ-ཇཉ-ཬཿ྅ྈ-ྌ྾-࿅࿇-࿌࿎-࿏࿐-࿔࿕-࿘࿙-࿚က-ဪါ-ာေးျ-ြဿ၀-၉၊-၏ၐ-ၕၖ-ၗၚ-ၝၡၢ-ၤၥ-ၦၧ-ၭၮ-ၰၵ-ႁႃ-ႄႇ-ႌႎႏ႐-႙ႚ-ႜ႞-႟Ⴀ-ჅჇჍა-ჺ჻ჼჽ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚ፠-፨፩-፼ᎀ-ᎏᎠ-Ᏼᐁ-ᙬ᙭-᙮ᙯ-ᙿᚁ-ᚚᚠ-ᛪ᛫-᛭ᛮ-ᛰᛱ-ᛸᜀ-ᜌᜎ-ᜑᜠ-ᜱ᜵-᜶ᝀ-ᝑᝠ-ᝬᝮ-ᝰក-ឳាើ-ៅះ-ៈ។-៖ៗ៘-៚ៜ០-៩᠐-᠙ᠠ-ᡂᡃᡄ-ᡷᢀ-ᢨᢪᢰ-ᣵᤀ-ᤞᤣ-ᤦᤩ-ᤫᤰ-ᤱᤳ-ᤸ᥆-᥏ᥐ-ᥭᥰ-ᥴᦀ-ᦫᦰ-ᧀᧁ-ᧇᧈ-ᧉ᧐-᧙᧚ᨀ-ᨖᨙ-ᨚ᨞-᨟ᨠ-ᩔᩕᩗᩡᩣ-ᩤᩭ-ᩲ᪀-᪉᪐-᪙᪠-᪦ᪧ᪨-᪭ᬄᬅ-ᬳᬵᬻᬽ-ᭁᭃ-᭄ᭅ-ᭋ᭐-᭙᭚-᭠᭡-᭪᭴-᭼ᮂᮃ-ᮠᮡᮦ-ᮧ᮪ᮮ-ᮯ᮰-᮹ᮺ-ᯥᯧᯪ-ᯬᯮ᯲-᯳᯼-᯿ᰀ-ᰣᰤ-ᰫᰴ-ᰵ᰻-᰿᱀-᱉ᱍ-ᱏ᱐-᱙ᱚ-ᱷᱸ-ᱽ᱾-᱿᳀-᳇᳓᳡ᳩ-ᳬᳮ-ᳱᳲ-ᳳᳵ-ᳶᴀ-ᴫᴬ-ᵪᵫ-ᵷᵸᵹ-ᶚᶛ-ᶿḀ-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼ‎ⁱⁿₐ-ₜℂℇℊ-ℓℕℙ-ℝℤΩℨK-ℭℯ-ℴℵ-ℸℹℼ-ℿⅅ-ⅉⅎ⅏Ⅰ-ↂↃ-ↄↅ-ↈ⌶-⍺⎕⒜-ⓩ⚬⠀-⣿Ⰰ-Ⱞⰰ-ⱞⱠ-ⱻⱼ-ⱽⱾ-ⳤⳫ-ⳮⳲ-ⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯ⵰ⶀ-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞ々〆〇〡-〩〮-〯〱-〵〸-〺〻〼ぁ-ゖゝ-ゞゟァ-ヺー-ヾヿㄅ-ㄭㄱ-ㆎ㆐-㆑㆒-㆕㆖-㆟ㆠ-ㆺㇰ-ㇿ㈀-㈜㈠-㈩㈪-㉇㉈-㉏㉠-㉻㉿㊀-㊉㊊-㊰㋀-㋋㋐-㋾㌀-㍶㍻-㏝㏠-㏾㐀-䶵一-鿌ꀀ-ꀔꀕꀖ-ꒌꓐ-ꓷꓸ-ꓽ꓾-꓿ꔀ-ꘋꘌꘐ-ꘟ꘠-꘩ꘪ-ꘫꙀ-ꙭꙮꚀ-ꚛꚜ-ꚝꚠ-ꛥꛦ-ꛯ꛲-꛷Ꜣ-ꝯꝰꝱ-ꞇ꞉-꞊Ꞌ-ꞎꞐ-ꞭꞰ-Ʇꟷꟸ-ꟹꟺꟻ-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠢꠣ-ꠤꠧ꠰-꠵꠶-꠷ꡀ-ꡳꢀ-ꢁꢂ-ꢳꢴ-ꣃ꣎-꣏꣐-꣙ꣲ-ꣷ꣸-꣺ꣻ꤀-꤉ꤊ-ꤥ꤮-꤯ꤰ-ꥆꥒ-꥓꥟ꥠ-ꥼꦃꦄ-ꦲꦴ-ꦵꦺ-ꦻꦽ-꧀꧁-꧍ꧏ꧐-꧙꧞-꧟ꧠ-ꧤꧦꧧ-ꧯ꧰-꧹ꧺ-ꧾꨀ-ꨨꨯ-ꨰꨳ-ꨴꩀ-ꩂꩄ-ꩋꩍ꩐-꩙꩜-꩟ꩠ-ꩯꩰꩱ-ꩶ꩷-꩹ꩺꩻꩽꩾ-ꪯꪱꪵ-ꪶꪹ-ꪽꫀꫂꫛ-ꫜꫝ꫞-꫟ꫠ-ꫪꫫꫮ-ꫯ꫰-꫱ꫲꫳ-ꫴꫵꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꬰ-ꭚ꭛ꭜ-ꭟꭤ-ꭥꯀ-ꯢꯣ-ꯤꯦ-ꯧꯩ-ꯪ꯫꯬꯰-꯹가-힣ힰ-ퟆퟋ-ퟻ-豈-舘並-龎ﬀ-ﬆﬓ-ﬗＡ-Ｚａ-ｚｦ-ｯｰｱ-ﾝﾞ-ﾟﾠ-ﾾￂ-ￇￊ-ￏￒ-ￗￚ-ￜ"+r+o+"]"),l=new RegExp("["+r+o+"]");function c(e){var t=a.exec(e);return null==t?null:t[0]}function h(e){var t=c(e);return null==t?n.NEUTRAL:l.exec(t)?n.RTL:n.LTR}function d(e,t){if(t=t||n.NEUTRAL,!e.length)return t;var i=h(e);return i===n.NEUTRAL?t:i}function u(e,t){return t||(t=n.getGlobalDir()),n.isStrong(t)||s(!1),d(e,t)}var p={firstStrongChar:c,firstStrongCharDir:h,resolveBlockDir:d,getDirection:u,isDirectionLTR:function(e,t){return u(e,t)===n.LTR},isDirectionRTL:function(e,t){return u(e,t)===n.RTL}};e.exports=p},76675(e,t,i){"use strict";var n=i(40041),s="LTR",r=null;function o(e){return e===s||"RTL"===e}function a(e){return o(e)||n(!1),e===s?"ltr":"rtl"}function l(e){r=e}var c={NEUTRAL:"NEUTRAL",LTR:s,RTL:"RTL",isStrong:o,getHTMLDir:a,getHTMLDirIfDifferent:function(e,t){return o(e)||n(!1),o(t)||n(!1),e===t?null:a(e)},setGlobalDir:l,initGlobalDir:function(){l(s)},getGlobalDir:function(){return r||this.initGlobalDir(),r||n(!1),r}};e.exports=c},75361(e,t,i){"use strict";function n(e,t,i){return t in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,e}var s=i(46616),r=i(76675),o=i(40041),a=function(){function e(e){n(this,"_defaultDir",void 0),n(this,"_lastDir",void 0),e?r.isStrong(e)||o(!1):e=r.getGlobalDir(),this._defaultDir=e,this.reset()}var t=e.prototype;return t.reset=function(){this._lastDir=this._defaultDir},t.getDirection=function(e){return this._lastDir=s.getDirection(e,this._lastDir),this._lastDir},e}();e.exports=a},13145(e,t,i){"use strict";var n=i(40041),s=/[\uD800-\uDFFF]/;function r(e){return 55296<=e&&e<=57343}function o(e){return s.test(e)}function a(e,t){return 1+r(e.charCodeAt(t))}function l(e,t,i){if(t=t||0,i=void 0===i?1/0:i||0,!o(e))return e.substr(t,i);var n=e.length;if(n<=0||t>n||i<=0)return"";var s=0;if(t>0){for(;t>0&&s<n;t--)s+=a(e,s);if(s>=n)return""}else if(t<0){for(s=n;t<0&&0<s;t++)s-=a(e,s-1);s<0&&(s=0)}var r=n;if(i<n)for(r=s;i>0&&r<n;i--)r+=a(e,r);return e.substring(s,r)}var c={getCodePoints:function(e){for(var t=[],i=0;i<e.length;i+=a(e,i))t.push(e.codePointAt(i));return t},getUTF16Length:a,hasSurrogateUnit:o,isCodeUnitInSurrogateRange:r,isSurrogatePair:function(e,t){if(0<=t&&t<e.length||n(!1),t+1===e.length)return!1;var i=e.charCodeAt(t),s=e.charCodeAt(t+1);return 55296<=i&&i<=56319&&56320<=s&&s<=57343},strlen:function(e){if(!o(e))return e.length;for(var t=0,i=0;i<e.length;i+=a(e,i))t++;return t},substring:function(e,t,i){(t=t||0)<0&&(t=0),(i=void 0===i?1/0:i||0)<0&&(i=0);var n=Math.abs(i-t);return l(e,t=t<i?t:i,n)},substr:l};e.exports=c},63390(e,t,i){"use strict";var n=i(9793),s=i(63504),r=i(27696),o=i(12017);function a(e,t,i,n){if(e===i)return!0;if(!i.startsWith(e))return!1;var r=i.slice(e.length);return!!t&&(r=n?n(r):r,s.contains(r,t))}function l(e){return"Windows"===n.platformName?e.replace(/^\s*NT/,""):e}var c={isBrowser:function(e){return a(n.browserName,n.browserFullVersion,e)},isBrowserArchitecture:function(e){return a(n.browserArchitecture,null,e)},isDevice:function(e){return a(n.deviceName,null,e)},isEngine:function(e){return a(n.engineName,n.engineVersion,e)},isPlatform:function(e){return a(n.platformName,n.platformFullVersion,e,l)},isPlatformArchitecture:function(e){return a(n.platformArchitecture,null,e)}};e.exports=r(c,o)},9793(e,t,i){"use strict";var n,s="Unknown",r=(new(i(17385))).getResult(),o=function(e){if(!e)return{major:"",minor:""};var t=e.split(".");return{major:t[0],minor:t[1]}}(r.browser.version),a={browserArchitecture:r.cpu.architecture||s,browserFullVersion:r.browser.version||s,browserMinorVersion:o.minor||s,browserName:r.browser.name||s,browserVersion:r.browser.major||s,deviceName:r.device.model||s,engineName:r.engine.name||s,engineVersion:r.engine.version||s,platformArchitecture:r.cpu.architecture||s,platformName:(n=r.os.name,{"Mac OS":"Mac OS X"}[n]||n||s),platformVersion:r.os.version||s,platformFullVersion:r.os.version||s};e.exports=a},63504(e,t,i){"use strict";var n=i(40041),s=/\./,r=/\|\|/,o=/\s+\-\s+/,a=/^(<=|<|=|>=|~>|~|>|)?\s*(.+)/,l=/^(\d*)(.*)/;function c(e,t){if(""===(e=e.trim()))return!0;var i,n=t.split(s),r=u(e),o=r.modifier,a=r.rangeComponents;switch(o){case"<":return h(n,a);case"<=":return-1===(i=y(n,a))||0===i;case">=":return d(n,a);case">":return 1===y(n,a);case"~":case"~>":return function(e,t){var i=t.slice(),n=t.slice();n.length>1&&n.pop();var s=n.length-1,r=parseInt(n[s],10);return p(r)&&(n[s]=r+1+""),d(e,i)&&h(e,n)}(n,a);default:return function(e,t){return 0===y(e,t)}(n,a)}}function h(e,t){return-1===y(e,t)}function d(e,t){var i=y(e,t);return 1===i||0===i}function u(e){var t=e.split(s),i=t[0].match(a);return i||n(!1),{modifier:i[1],rangeComponents:[i[2]].concat(t.slice(1))}}function p(e){return!isNaN(e)&&isFinite(e)}function g(e){return!u(e).modifier}function f(e,t){for(var i=e.length;i<t;i++)e[i]="0"}function m(e,t){var i=e.match(l)[1],n=t.match(l)[1],s=parseInt(i,10),r=parseInt(n,10);return p(s)&&p(r)&&s!==r?v(s,r):v(e,t)}function v(e,t){return typeof e!=typeof t&&n(!1),e>t?1:e<t?-1:0}function y(e,t){for(var i=function(e,t){f(e=e.slice(),(t=t.slice()).length);for(var i=0;i<t.length;i++){var n=t[i].match(/^[x*]$/i);if(n&&(t[i]=e[i]="0","*"===n[0]&&i===t.length-1))for(var s=i;s<e.length;s++)e[s]="0"}return f(t,e.length),[e,t]}(e,t),n=i[0],s=i[1],r=0;r<s.length;r++){var o=m(n[r],s[r]);if(o)return o}return 0}var C={contains:function(e,t){return function(e,t){var i=e.split(r);return i.length>1?i.some(function(e){return C.contains(e,t)}):function(e,t){var i=e.split(o);if(i.length>0&&i.length<=2||n(!1),1===i.length)return c(i[0],t);var s=i[0],r=i[1];return g(s)&&g(r)||n(!1),c(">="+s,t)&&c("<="+r,t)}(e=i[0].trim(),t)}(e.trim(),t.trim())}};e.exports=C},26797(e){"use strict";var t=/-(.)/g;e.exports=function(e){return e.replace(t,function(e,t){return t.toUpperCase()})}},68820(e,t,i){"use strict";var n=i(82366);e.exports=function e(t,i){return!(!t||!i)&&(t===i||!n(t)&&(n(i)?e(t,i.parentNode):"contains"in t?t.contains(i):!!t.compareDocumentPosition&&!!(16&t.compareDocumentPosition(i))))}},95573(e,t,i){"use strict";var n=i(40041);e.exports=function(e){return function(e){return!!e&&("object"==typeof e||"function"==typeof e)&&"length"in e&&!("setInterval"in e)&&"number"!=typeof e.nodeType&&(Array.isArray(e)||"callee"in e||"item"in e)}(e)?Array.isArray(e)?e.slice():function(e){var t=e.length;if((Array.isArray(e)||"object"!=typeof e&&"function"!=typeof e)&&n(!1),"number"!=typeof t&&n(!1),0===t||t-1 in e||n(!1),"function"==typeof e.callee&&n(!1),e.hasOwnProperty)try{return Array.prototype.slice.call(e)}catch(e){}for(var i=Array(t),s=0;s<t;s++)i[s]=e[s];return i}(e):[e]}},22978(e){"use strict";function t(e){return e.replace(/\//g,"-")}e.exports=function(e){return"object"==typeof e?Object.keys(e).filter(function(t){return e[t]}).map(t).join(" "):Array.prototype.map.call(arguments,t).join(" ")}},1948(e){"use strict";function t(e){return function(){return e}}var i=function(){};i.thatReturns=t,i.thatReturnsFalse=t(!1),i.thatReturnsTrue=t(!0),i.thatReturnsNull=t(null),i.thatReturnsThis=function(){return this},i.thatReturnsArgument=function(e){return e},e.exports=i},53967(e){"use strict";e.exports=function(e){if(void 0===(e=e||("undefined"!=typeof document?document:void 0)))return null;try{return e.activeElement||e.body}catch(t){return e.body}}},31709(e){"use strict";var t="undefined"!=typeof navigator&&navigator.userAgent.indexOf("AppleWebKit")>-1;e.exports=function(e){return(e=e||document).scrollingElement?e.scrollingElement:t||"CSS1Compat"!==e.compatMode?e.body:e.documentElement}},5026(e,t,i){"use strict";var n=i(25651);e.exports=function(e){var t=n(e);return{x:t.left,y:t.top,width:t.right-t.left,height:t.bottom-t.top}}},25651(e,t,i){"use strict";var n=i(68820);e.exports=function(e){var t=e.ownerDocument.documentElement;if(!("getBoundingClientRect"in e)||!n(t,e))return{left:0,right:0,top:0,bottom:0};var i=e.getBoundingClientRect();return{left:Math.round(i.left)-t.clientLeft,right:Math.round(i.right)-t.clientLeft,top:Math.round(i.top)-t.clientTop,bottom:Math.round(i.bottom)-t.clientTop}}},93987(e,t,i){"use strict";var n=i(31709),s=i(48031);e.exports=function(e){var t=n(e.ownerDocument||e.document);e.Window&&e instanceof e.Window&&(e=t);var i=s(e),r=e===t?e.ownerDocument.documentElement:e,o=e.scrollWidth-r.clientWidth,a=e.scrollHeight-r.clientHeight;return i.x=Math.max(0,Math.min(i.x,o)),i.y=Math.max(0,Math.min(i.y,a)),i}},54973(e,t,i){"use strict";var n=i(26797),s=i(24313);function r(e){return null==e?e:String(e)}e.exports=function(e,t){var i;if(window.getComputedStyle&&(i=window.getComputedStyle(e,null)))return r(i.getPropertyValue(s(t)));if(document.defaultView&&document.defaultView.getComputedStyle){if(i=document.defaultView.getComputedStyle(e,null))return r(i.getPropertyValue(s(t)));if("display"===t)return"none"}return e.currentStyle?r("float"===t?e.currentStyle.cssFloat||e.currentStyle.styleFloat:e.currentStyle[n(t)]):r(e.style&&e.style[n(t)])}},48031(e){"use strict";e.exports=function(e){return e.Window&&e instanceof e.Window?{x:e.pageXOffset||e.document.documentElement.scrollLeft,y:e.pageYOffset||e.document.documentElement.scrollTop}:{x:e.scrollLeft,y:e.scrollTop}}},68982(e){"use strict";function t(){var e;return document.documentElement&&(e=document.documentElement.clientWidth),!e&&document.body&&(e=document.body.clientWidth),e||0}function i(){var e;return document.documentElement&&(e=document.documentElement.clientHeight),!e&&document.body&&(e=document.body.clientHeight),e||0}function n(){return{width:window.innerWidth||t(),height:window.innerHeight||i()}}n.withoutScrollbars=function(){return{width:t(),height:i()}},e.exports=n},24313(e){"use strict";var t=/([A-Z])/g;e.exports=function(e){return e.replace(t,"-$1").toLowerCase()}},40041(e){"use strict";e.exports=function(e,t){for(var i=arguments.length,n=new Array(i>2?i-2:0),s=2;s<i;s++)n[s-2]=arguments[s];if(!e){var r;if(void 0===t)r=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var o=0;(r=new Error(t.replace(/%s/g,function(){return String(n[o++])}))).name="Invariant Violation"}throw r.framesToPop=1,r}}},38157(e){"use strict";e.exports=function(e){var t=(e?e.ownerDocument||e:document).defaultView||window;return!(!e||!("function"==typeof t.Node?e instanceof t.Node:"object"==typeof e&&"number"==typeof e.nodeType&&"string"==typeof e.nodeName))}},82366(e,t,i){"use strict";var n=i(38157);e.exports=function(e){return n(e)&&3==e.nodeType}},66145(e){"use strict";e.exports=function(e){var t=e||"",i=arguments.length;if(i>1)for(var n=1;n<i;n++){var s=arguments[n];s&&(t=(t?t+" ":"")+s)}return t}},27696(e){"use strict";var t=Object.prototype.hasOwnProperty;e.exports=function(e,i,n){if(!e)return null;var s={};for(var r in e)t.call(e,r)&&(s[r]=i.call(n,e[r],r,e));return s}},12017(e){"use strict";e.exports=function(e){var t={};return function(i){return t.hasOwnProperty(i)||(t[i]=e.call(this,i)),t[i]}}},25813(e){"use strict";e.exports=function(e){if(null!=e)return e;throw new Error("Got unexpected null or undefined")}},95136(e,t,i){"use strict";i(7921),e.exports=i.g.setImmediate},92697(e,t,i){"use strict";var n=i(1948);e.exports=n},32016(e,t,i){"use strict";i.d(t,{$:()=>F});var n=Uint8Array,s=Uint16Array,r=Int32Array,o=new n([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),a=new n([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),l=new n([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),c=function(e,t){for(var i=new s(31),n=0;n<31;++n)i[n]=t+=1<<e[n-1];var o=new r(i[30]);for(n=1;n<30;++n)for(var a=i[n];a<i[n+1];++a)o[a]=a-i[n]<<5|n;return{b:i,r:o}},h=c(o,2),d=h.b,u=h.r;d[28]=258,u[258]=28;for(var p=c(a,0),g=(p.b,p.r),f=new s(32768),m=0;m<32768;++m){var v=(43690&m)>>1|(21845&m)<<1;v=(61680&(v=(52428&v)>>2|(13107&v)<<2))>>4|(3855&v)<<4,f[m]=((65280&v)>>8|(255&v)<<8)>>1}var y=function(e,t,i){for(var n=e.length,r=0,o=new s(t);r<n;++r)e[r]&&++o[e[r]-1];var a,l=new s(t);for(r=1;r<t;++r)l[r]=l[r-1]+o[r-1]<<1;if(i){a=new s(1<<t);var c=15-t;for(r=0;r<n;++r)if(e[r])for(var h=r<<4|e[r],d=t-e[r],u=l[e[r]-1]++<<d,p=u|(1<<d)-1;u<=p;++u)a[f[u]>>c]=h}else for(a=new s(n),r=0;r<n;++r)e[r]&&(a[r]=f[l[e[r]-1]++]>>15-e[r]);return a},C=new n(288);for(m=0;m<144;++m)C[m]=8;for(m=144;m<256;++m)C[m]=9;for(m=256;m<280;++m)C[m]=7;for(m=280;m<288;++m)C[m]=8;var b=new n(32);for(m=0;m<32;++m)b[m]=5;var S=y(C,9,0),w=y(b,5,0),x=function(e){return(e+7)/8|0},E=function(e,t,i){i<<=7&t;var n=t/8|0;e[n]|=i,e[n+1]|=i>>8},M=function(e,t,i){i<<=7&t;var n=t/8|0;e[n]|=i,e[n+1]|=i>>8,e[n+2]|=i>>16},A=function(e,t){for(var i=[],r=0;r<e.length;++r)e[r]&&i.push({s:r,f:e[r]});var o=i.length,a=i.slice();if(!o)return{t:P,l:0};if(1==o){var l=new n(i[0].s+1);return l[i[0].s]=1,{t:l,l:1}}i.sort(function(e,t){return e.f-t.f}),i.push({s:-1,f:25001});var c=i[0],h=i[1],d=0,u=1,p=2;for(i[0]={s:-1,f:c.f+h.f,l:c,r:h};u!=o-1;)c=i[i[d].f<i[p].f?d++:p++],h=i[d!=u&&i[d].f<i[p].f?d++:p++],i[u++]={s:-1,f:c.f+h.f,l:c,r:h};var g=a[0].s;for(r=1;r<o;++r)a[r].s>g&&(g=a[r].s);var f=new s(g+1),m=T(i[u-1],f,0);if(m>t){r=0;var v=0,y=m-t,C=1<<y;for(a.sort(function(e,t){return f[t.s]-f[e.s]||e.f-t.f});r<o;++r){var b=a[r].s;if(!(f[b]>t))break;v+=C-(1<<m-f[b]),f[b]=t}for(v>>=y;v>0;){var S=a[r].s;f[S]<t?v-=1<<t-f[S]++-1:++r}for(;r>=0&&v;--r){var w=a[r].s;f[w]==t&&(--f[w],++v)}m=t}return{t:new n(f),l:m}},T=function(e,t,i){return-1==e.s?Math.max(T(e.l,t,i+1),T(e.r,t,i+1)):t[e.s]=i},D=function(e){for(var t=e.length;t&&!e[--t];);for(var i=new s(++t),n=0,r=e[0],o=1,a=function(e){i[n++]=e},l=1;l<=t;++l)if(e[l]==r&&l!=t)++o;else{if(!r&&o>2){for(;o>138;o-=138)a(32754);o>2&&(a(o>10?o-11<<5|28690:o-3<<5|12305),o=0)}else if(o>3){for(a(r),--o;o>6;o-=6)a(8304);o>2&&(a(o-3<<5|8208),o=0)}for(;o--;)a(r);o=1,r=e[l]}return{c:i.subarray(0,n),n:t}},I=function(e,t){for(var i=0,n=0;n<t.length;++n)i+=e[n]*t[n];return i},R=function(e,t,i){var n=i.length,s=x(t+2);e[s]=255&n,e[s+1]=n>>8,e[s+2]=255^e[s],e[s+3]=255^e[s+1];for(var r=0;r<n;++r)e[s+r+4]=i[r];return 8*(s+4+n)},L=function(e,t,i,n,r,c,h,d,u,p,g){E(t,g++,i),++r[256];for(var f=A(r,15),m=f.t,v=f.l,x=A(c,15),T=x.t,L=x.l,k=D(m),P=k.c,N=k.n,O=D(T),_=O.c,F=O.n,G=new s(19),V=0;V<P.length;++V)++G[31&P[V]];for(V=0;V<_.length;++V)++G[31&_[V]];for(var B=A(G,7),H=B.t,z=B.l,U=19;U>4&&!H[l[U-1]];--U);var W,j,K,$,Y=p+5<<3,q=I(r,C)+I(c,b)+h,X=I(r,m)+I(c,T)+h+14+3*U+I(G,H)+2*G[16]+3*G[17]+7*G[18];if(u>=0&&Y<=q&&Y<=X)return R(t,g,e.subarray(u,u+p));if(E(t,g,1+(X<q)),g+=2,X<q){W=y(m,v,0),j=m,K=y(T,L,0),$=T;var Z=y(H,z,0);for(E(t,g,N-257),E(t,g+5,F-1),E(t,g+10,U-4),g+=14,V=0;V<U;++V)E(t,g+3*V,H[l[V]]);g+=3*U;for(var Q=[P,_],J=0;J<2;++J){var ee=Q[J];for(V=0;V<ee.length;++V){var te=31&ee[V];E(t,g,Z[te]),g+=H[te],te>15&&(E(t,g,ee[V]>>5&127),g+=ee[V]>>12)}}}else W=S,j=C,K=w,$=b;for(V=0;V<d;++V){var ie=n[V];if(ie>255){M(t,g,W[257+(te=ie>>18&31)]),g+=j[te+257],te>7&&(E(t,g,ie>>23&31),g+=o[te]);var ne=31&ie;M(t,g,K[ne]),g+=$[ne],ne>3&&(M(t,g,ie>>5&8191),g+=a[ne])}else M(t,g,W[ie]),g+=j[ie]}return M(t,g,W[256]),g+j[256]},k=new r([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),P=new n(0),N=function(e,t,i,l,c,h){var d=h.z||e.length,p=new n(l+d+5*(1+Math.ceil(d/7e3))+c),f=p.subarray(l,p.length-c),m=h.l,v=7&(h.r||0);if(t){v&&(f[0]=h.r>>3);for(var y=k[t-1],C=y>>13,b=8191&y,S=(1<<i)-1,w=h.p||new s(32768),E=h.h||new s(S+1),M=Math.ceil(i/3),A=2*M,T=function(t){return(e[t]^e[t+1]<<M^e[t+2]<<A)&S},D=new r(25e3),I=new s(288),P=new s(32),N=0,O=0,_=h.i||0,F=0,G=h.w||0,V=0;_+2<d;++_){var B=T(_),H=32767&_,z=E[B];if(w[H]=z,E[B]=H,G<=_){var U=d-_;if((N>7e3||F>24576)&&(U>423||!m)){v=L(e,f,0,D,I,P,O,F,V,_-V,v),F=N=O=0,V=_;for(var W=0;W<286;++W)I[W]=0;for(W=0;W<30;++W)P[W]=0}var j=2,K=0,$=b,Y=H-z&32767;if(U>2&&B==T(_-Y))for(var q=Math.min(C,U)-1,X=Math.min(32767,_),Z=Math.min(258,U);Y<=X&&--$&&H!=z;){if(e[_+j]==e[_+j-Y]){for(var Q=0;Q<Z&&e[_+Q]==e[_+Q-Y];++Q);if(Q>j){if(j=Q,K=Y,Q>q)break;var J=Math.min(Y,Q-2),ee=0;for(W=0;W<J;++W){var te=_-Y+W&32767,ie=te-w[te]&32767;ie>ee&&(ee=ie,z=te)}}}Y+=(H=z)-(z=w[H])&32767}if(K){D[F++]=268435456|u[j]<<18|g[K];var ne=31&u[j],se=31&g[K];O+=o[ne]+a[se],++I[257+ne],++P[se],G=_+j,++N}else D[F++]=e[_],++I[e[_]]}}for(_=Math.max(_,G);_<d;++_)D[F++]=e[_],++I[e[_]];v=L(e,f,m,D,I,P,O,F,V,_-V,v),m||(h.r=7&v|f[v/8|0]<<3,v-=7,h.h=E,h.p=w,h.i=_,h.w=G)}else{for(_=h.w||0;_<d+m;_+=65535){var re=_+65535;re>=d&&(f[v/8|0]=m,re=d),v=R(f,v+1,e.subarray(_,re))}h.i=d}return function(e,t,i){return(null==t||t<0)&&(t=0),(null==i||i>e.length)&&(i=e.length),new n(e.subarray(t,i))}(p,0,l+x(v)+c)},O=function(){var e=1,t=0;return{p:function(i){for(var n=e,s=t,r=0|i.length,o=0;o!=r;){for(var a=Math.min(o+2655,r);o<a;++o)s+=n+=i[o];n=(65535&n)+15*(n>>16),s=(65535&s)+15*(s>>16)}e=n,t=s},d:function(){return(255&(e%=65521))<<24|(65280&e)<<8|(255&(t%=65521))<<8|t>>8}}},_=function(e,t,i){for(;i;++t)e[t]=i,i>>>=8};function F(e,t){t||(t={});var i=O();i.p(e);var s=function(e,t,i,s,r){if(!r&&(r={l:1},t.dictionary)){var o=t.dictionary.subarray(-32768),a=new n(o.length+e.length);a.set(o),a.set(e,o.length),e=a,r.w=o.length}return N(e,null==t.level?6:t.level,null==t.mem?r.l?Math.ceil(1.5*Math.max(8,Math.min(13,Math.log(e.length)))):20:12+t.mem,i,s,r)}(e,t,t.dictionary?6:2,4);return function(e,t){var i=t.level,n=0==i?0:i<6?1:9==i?3:2;if(e[0]=120,e[1]=n<<6|(t.dictionary&&32),e[1]|=31-(e[0]<<8|e[1])%31,t.dictionary){var s=O();s.p(t.dictionary),_(e,2,s.d())}}(s,t),_(s,s.length-4,i.d()),s}var G="undefined"!=typeof TextDecoder&&new TextDecoder;try{G.decode(P,{stream:!0})}catch(e){}"function"==typeof queueMicrotask?queueMicrotask:"function"==typeof setTimeout&&setTimeout},45792(e,t,i){"use strict";i.d(t,{R:()=>a});var n=i(65959),s=new Map([["aac","audio/aac"],["abw","application/x-abiword"],["arc","application/x-freearc"],["avif","image/avif"],["avi","video/x-msvideo"],["azw","application/vnd.amazon.ebook"],["bin","application/octet-stream"],["bmp","image/bmp"],["bz","application/x-bzip"],["bz2","application/x-bzip2"],["cda","application/x-cdf"],["csh","application/x-csh"],["css","text/css"],["csv","text/csv"],["doc","application/msword"],["docx","application/vnd.openxmlformats-officedocument.wordprocessingml.document"],["eot","application/vnd.ms-fontobject"],["epub","application/epub+zip"],["gz","application/gzip"],["gif","image/gif"],["htm","text/html"],["html","text/html"],["ico","image/vnd.microsoft.icon"],["ics","text/calendar"],["jar","application/java-archive"],["jpeg","image/jpeg"],["jpg","image/jpeg"],["js","text/javascript"],["json","application/json"],["jsonld","application/ld+json"],["mid","audio/midi"],["midi","audio/midi"],["mjs","text/javascript"],["mp3","audio/mpeg"],["mp4","video/mp4"],["mpeg","video/mpeg"],["mpkg","application/vnd.apple.installer+xml"],["odp","application/vnd.oasis.opendocument.presentation"],["ods","application/vnd.oasis.opendocument.spreadsheet"],["odt","application/vnd.oasis.opendocument.text"],["oga","audio/ogg"],["ogv","video/ogg"],["ogx","application/ogg"],["opus","audio/opus"],["otf","font/otf"],["png","image/png"],["pdf","application/pdf"],["php","application/x-httpd-php"],["ppt","application/vnd.ms-powerpoint"],["pptx","application/vnd.openxmlformats-officedocument.presentationml.presentation"],["rar","application/vnd.rar"],["rtf","application/rtf"],["sh","application/x-sh"],["svg","image/svg+xml"],["swf","application/x-shockwave-flash"],["tar","application/x-tar"],["tif","image/tiff"],["tiff","image/tiff"],["ts","video/mp2t"],["ttf","font/ttf"],["txt","text/plain"],["vsd","application/vnd.visio"],["wav","audio/wav"],["weba","audio/webm"],["webm","video/webm"],["webp","image/webp"],["woff","font/woff"],["woff2","font/woff2"],["xhtml","application/xhtml+xml"],["xls","application/vnd.ms-excel"],["xlsx","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"],["xml","application/xml"],["xul","application/vnd.mozilla.xul+xml"],["zip","application/zip"],["7z","application/x-7z-compressed"],["mkv","video/x-matroska"],["mov","video/quicktime"],["msg","application/vnd.ms-outlook"]]);function r(e,t){var i=function(e){var t=e.name;if(t&&-1!==t.lastIndexOf(".")&&!e.type){var i=t.split(".").pop().toLowerCase(),n=s.get(i);n&&Object.defineProperty(e,"type",{value:n,writable:!1,configurable:!1,enumerable:!0})}return e}(e);if("string"!=typeof i.path){var n=e.webkitRelativePath;Object.defineProperty(i,"path",{value:"string"==typeof t?t:"string"==typeof n&&n.length>0?n:e.name,writable:!1,configurable:!1,enumerable:!0})}return i}var o=[".DS_Store","Thumbs.db"];function a(e){return(0,n.__awaiter)(this,void 0,void 0,function(){return(0,n.__generator)(this,function(t){return l(e)&&l(e.dataTransfer)?[2,d(e.dataTransfer,e.type)]:l(i=e)&&l(i.target)?[2,c(e)]:Array.isArray(e)&&e.every(function(e){return"getFile"in e&&"function"==typeof e.getFile})?[2,h(e)]:[2,[]];var i})})}function l(e){return"object"==typeof e&&null!==e}function c(e){return p(e.target.files).map(function(e){return r(e)})}function h(e){return(0,n.__awaiter)(this,void 0,void 0,function(){return(0,n.__generator)(this,function(t){switch(t.label){case 0:return[4,Promise.all(e.map(function(e){return e.getFile()}))];case 1:return[2,t.sent().map(function(e){return r(e)})]}})})}function d(e,t){return(0,n.__awaiter)(this,void 0,void 0,function(){var i;return(0,n.__generator)(this,function(n){switch(n.label){case 0:return null===e?[2,[]]:e.items?(i=p(e.items).filter(function(e){return"file"===e.kind}),"drop"!==t?[2,i]:[4,Promise.all(i.map(g))]):[3,2];case 1:return[2,u(f(n.sent()))];case 2:return[2,u(p(e.files).map(function(e){return r(e)}))]}})})}function u(e){return e.filter(function(e){return-1===o.indexOf(e.name)})}function p(e){if(null===e)return[];for(var t=[],i=0;i<e.length;i++){var n=e[i];t.push(n)}return t}function g(e){if("function"!=typeof e.webkitGetAsEntry)return m(e);var t=e.webkitGetAsEntry();return t&&t.isDirectory?y(t):m(e)}function f(e){return e.reduce(function(e,t){return(0,n.__spread)(e,Array.isArray(t)?f(t):[t])},[])}function m(e){var t=e.getAsFile();if(!t)return Promise.reject(e+" is not a File");var i=r(t);return Promise.resolve(i)}function v(e){return(0,n.__awaiter)(this,void 0,void 0,function(){return(0,n.__generator)(this,function(t){return[2,e.isDirectory?y(e):C(e)]})})}function y(e){var t=e.createReader();return new Promise(function(e,i){var s=[];!function r(){var o=this;t.readEntries(function(t){return(0,n.__awaiter)(o,void 0,void 0,function(){var o,a,l;return(0,n.__generator)(this,function(n){switch(n.label){case 0:if(t.length)return[3,5];n.label=1;case 1:return n.trys.push([1,3,,4]),[4,Promise.all(s)];case 2:return o=n.sent(),e(o),[3,4];case 3:return a=n.sent(),i(a),[3,4];case 4:return[3,6];case 5:l=Promise.all(t.map(v)),s.push(l),r(),n.label=6;case 6:return[2]}})})},function(e){i(e)})}()})}function C(e){return(0,n.__awaiter)(this,void 0,void 0,function(){return(0,n.__generator)(this,function(t){return[2,new Promise(function(t,i){e.file(function(i){var n=r(i,e.fullPath);t(n)},function(e){i(e)})})]})})}},21702(e){"use strict";e.exports=function(e,t){for(var i={},n=Object.keys(e),s=Array.isArray(t),r=0;r<n.length;r++){var o=n[r],a=e[o];(s?-1!==t.indexOf(o):t(o,a,e))&&(i[o]=a)}return i}},87196(e,t,i){"use strict";var n=i(22956),s=Object.prototype.toString,r=Object.prototype.hasOwnProperty;e.exports=function(e,t,i){if(!n(t))throw new TypeError("iterator must be a function");var o,a;arguments.length>=3&&(o=i),a=e,"[object Array]"===s.call(a)?function(e,t,i){for(var n=0,s=e.length;n<s;n++)r.call(e,n)&&(null==i?t(e[n],n,e):t.call(i,e[n],n,e))}(e,t,o):"string"==typeof e?function(e,t,i){for(var n=0,s=e.length;n<s;n++)null==i?t(e.charAt(n),n,e):t.call(i,e.charAt(n),n,e)}(e,t,o):function(e,t,i){for(var n in e)r.call(e,n)&&(null==i?t(e[n],n,e):t.call(i,e[n],n,e))}(e,t,o)}},69992(e){"use strict";var t=Object.prototype.toString,i=Math.max,n=function(e,t){for(var i=[],n=0;n<e.length;n+=1)i[n]=e[n];for(var s=0;s<t.length;s+=1)i[s+e.length]=t[s];return i};e.exports=function(e){var s=this;if("function"!=typeof s||"[object Function]"!==t.apply(s))throw new TypeError("Function.prototype.bind called on incompatible "+s);for(var r,o=function(e){for(var t=[],i=1,n=0;i<e.length;i+=1,n+=1)t[n]=e[i];return t}(arguments),a=i(0,s.length-o.length),l=[],c=0;c<a;c++)l[c]="$"+c;if(r=Function("binder","return function ("+function(e){for(var t="",i=0;i<e.length;i+=1)t+=e[i],i+1<e.length&&(t+=",");return t}(l)+"){ return binder.apply(this,arguments); }")(function(){if(this instanceof r){var t=s.apply(this,n(o,arguments));return Object(t)===t?t:this}return s.apply(e,n(o,arguments))}),s.prototype){var h=function(){};h.prototype=s.prototype,r.prototype=new h,h.prototype=null}return r}},79524(e,t,i){"use strict";var n=i(69992);e.exports=Function.prototype.bind||n},18910(e,t,i){e.exports=i(21923)},21923(e,t,i){var n,s,r=i(24215),o=function(){(void 0===n||n>=s.length)&&(n=0,s=r.randomBytes(256));var e=s[n];return n+=1,e},a=function(e){for(var t=o();t>=256-256%e;)t=o();return t%e},l=/[ilLI|`oO0]/g,c=[{name:"lowercase",rule:/[a-z]/},{name:"uppercase",rule:/[A-Z]/},{name:"numbers",rule:/[0-9]/},{name:"symbols",rule:/[!@#$%^&*()+_\-=}{[\]|:;"/?.><,`~]/}],h=function(e,t){for(var i="",n=e.length,s=t.length,r=0;r<n;r++)i+=t[a(s)];return e.strict&&!c.every(function(t){return 0==e[t.name]||("symbols"===t.name&&"string"==typeof e[t.name]?new RegExp("["+e[t.name]+"]").test(i):t.rule.test(i))})?h(e,t):i};e.exports.generate=function(e){if(e=e||{},Object.prototype.hasOwnProperty.call(e,"length")||(e.length=10),Object.prototype.hasOwnProperty.call(e,"numbers")||(e.numbers=!1),Object.prototype.hasOwnProperty.call(e,"symbols")||(e.symbols=!1),Object.prototype.hasOwnProperty.call(e,"exclude")||(e.exclude=""),Object.prototype.hasOwnProperty.call(e,"uppercase")||(e.uppercase=!0),Object.prototype.hasOwnProperty.call(e,"lowercase")||(e.lowercase=!0),Object.prototype.hasOwnProperty.call(e,"excludeSimilarCharacters")||(e.excludeSimilarCharacters=!1),Object.prototype.hasOwnProperty.call(e,"strict")||(e.strict=!1),e.strict&&1+(e.numbers?1:0)+(e.symbols?1:0)+(e.uppercase?1:0)>e.length)throw new TypeError("Length must correlate with strict guidelines");var t="";if(e.lowercase&&(t+="abcdefghijklmnopqrstuvwxyz"),e.uppercase&&(t+="ABCDEFGHIJKLMNOPQRSTUVWXYZ"),e.numbers&&(t+="0123456789"),e.symbols&&("string"==typeof e.symbols?t+=e.symbols:t+='!@#$%^&*()+_-=}{[]|:;"/?.><,`~'),!t)throw new TypeError("At least one rule for pools must be true");e.excludeSimilarCharacters&&(t=t.replace(l,""));for(var i=e.exclude.length;i--;)t=t.replace(e.exclude[i],"");return h(e,t)},e.exports.generateMultiple=function(t,i){for(var n=[],s=0;s<t;s++)n[s]=e.exports.generate(i);return n}},49336(e,t,i){"use strict";var n,s=i(25153),r=i(41488),o=i(38004),a=i(96469),l=i(12557),c=i(63429),h=i(71102),d=i(85966),u=i(77412),p=i(52418),g=i(57958),f=i(47384),m=i(250),v=i(51844),y=i(47279),C=Function,b=function(e){try{return C('"use strict"; return ('+e+").constructor;")()}catch(e){}},S=i(25667),w=i(39886),x=function(){throw new h},E=S?function(){try{return x}catch(e){try{return S(arguments,"callee").get}catch(e){return x}}}():x,M=i(21514)(),A=i(14252),T=i(23752),D=i(60248),I=i(64811),R=i(46255),L={},k="undefined"!=typeof Uint8Array&&A?A(Uint8Array):n,P={__proto__:null,"%AggregateError%":"undefined"==typeof AggregateError?n:AggregateError,"%Array%":Array,"%ArrayBuffer%":"undefined"==typeof ArrayBuffer?n:ArrayBuffer,"%ArrayIteratorPrototype%":M&&A?A([][Symbol.iterator]()):n,"%AsyncFromSyncIteratorPrototype%":n,"%AsyncFunction%":L,"%AsyncGenerator%":L,"%AsyncGeneratorFunction%":L,"%AsyncIteratorPrototype%":L,"%Atomics%":"undefined"==typeof Atomics?n:Atomics,"%BigInt%":"undefined"==typeof BigInt?n:BigInt,"%BigInt64Array%":"undefined"==typeof BigInt64Array?n:BigInt64Array,"%BigUint64Array%":"undefined"==typeof BigUint64Array?n:BigUint64Array,"%Boolean%":Boolean,"%DataView%":"undefined"==typeof DataView?n:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":r,"%eval%":eval,"%EvalError%":o,"%Float16Array%":"undefined"==typeof Float16Array?n:Float16Array,"%Float32Array%":"undefined"==typeof Float32Array?n:Float32Array,"%Float64Array%":"undefined"==typeof Float64Array?n:Float64Array,"%FinalizationRegistry%":"undefined"==typeof FinalizationRegistry?n:FinalizationRegistry,"%Function%":C,"%GeneratorFunction%":L,"%Int8Array%":"undefined"==typeof Int8Array?n:Int8Array,"%Int16Array%":"undefined"==typeof Int16Array?n:Int16Array,"%Int32Array%":"undefined"==typeof Int32Array?n:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":M&&A?A(A([][Symbol.iterator]())):n,"%JSON%":"object"==typeof JSON?JSON:n,"%Map%":"undefined"==typeof Map?n:Map,"%MapIteratorPrototype%":"undefined"!=typeof Map&&M&&A?A((new Map)[Symbol.iterator]()):n,"%Math%":Math,"%Number%":Number,"%Object%":s,"%Object.getOwnPropertyDescriptor%":S,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":"undefined"==typeof Promise?n:Promise,"%Proxy%":"undefined"==typeof Proxy?n:Proxy,"%RangeError%":a,"%ReferenceError%":l,"%Reflect%":"undefined"==typeof Reflect?n:Reflect,"%RegExp%":RegExp,"%Set%":"undefined"==typeof Set?n:Set,"%SetIteratorPrototype%":"undefined"!=typeof Set&&M&&A?A((new Set)[Symbol.iterator]()):n,"%SharedArrayBuffer%":"undefined"==typeof SharedArrayBuffer?n:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":M&&A?A(""[Symbol.iterator]()):n,"%Symbol%":M?Symbol:n,"%SyntaxError%":c,"%ThrowTypeError%":E,"%TypedArray%":k,"%TypeError%":h,"%Uint8Array%":"undefined"==typeof Uint8Array?n:Uint8Array,"%Uint8ClampedArray%":"undefined"==typeof Uint8ClampedArray?n:Uint8ClampedArray,"%Uint16Array%":"undefined"==typeof Uint16Array?n:Uint16Array,"%Uint32Array%":"undefined"==typeof Uint32Array?n:Uint32Array,"%URIError%":d,"%WeakMap%":"undefined"==typeof WeakMap?n:WeakMap,"%WeakRef%":"undefined"==typeof WeakRef?n:WeakRef,"%WeakSet%":"undefined"==typeof WeakSet?n:WeakSet,"%Function.prototype.call%":R,"%Function.prototype.apply%":I,"%Object.defineProperty%":w,"%Object.getPrototypeOf%":T,"%Math.abs%":u,"%Math.floor%":p,"%Math.max%":g,"%Math.min%":f,"%Math.pow%":m,"%Math.round%":v,"%Math.sign%":y,"%Reflect.getPrototypeOf%":D};if(A)try{null.error}catch(e){var N=A(A(e));P["%Error.prototype%"]=N}var O=function e(t){var i;if("%AsyncFunction%"===t)i=b("async function () {}");else if("%GeneratorFunction%"===t)i=b("function* () {}");else if("%AsyncGeneratorFunction%"===t)i=b("async function* () {}");else if("%AsyncGenerator%"===t){var n=e("%AsyncGeneratorFunction%");n&&(i=n.prototype)}else if("%AsyncIteratorPrototype%"===t){var s=e("%AsyncGenerator%");s&&A&&(i=A(s.prototype))}return P[t]=i,i},_={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},F=i(79524),G=i(75630),V=F.call(R,Array.prototype.concat),B=F.call(I,Array.prototype.splice),H=F.call(R,String.prototype.replace),z=F.call(R,String.prototype.slice),U=F.call(R,RegExp.prototype.exec),W=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,j=/\\(\\)?/g,K=function(e,t){var i,n=e;if(G(_,n)&&(n="%"+(i=_[n])[0]+"%"),G(P,n)){var s=P[n];if(s===L&&(s=O(n)),void 0===s&&!t)throw new h("intrinsic "+e+" exists, but is not available. Please file an issue!");return{alias:i,name:n,value:s}}throw new c("intrinsic "+e+" does not exist!")};e.exports=function(e,t){if("string"!=typeof e||0===e.length)throw new h("intrinsic name must be a non-empty string");if(arguments.length>1&&"boolean"!=typeof t)throw new h('"allowMissing" argument must be a boolean');if(null===U(/^%?[^%]*%?$/,e))throw new c("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var i=function(e){var t=z(e,0,1),i=z(e,-1);if("%"===t&&"%"!==i)throw new c("invalid intrinsic syntax, expected closing `%`");if("%"===i&&"%"!==t)throw new c("invalid intrinsic syntax, expected opening `%`");var n=[];return H(e,W,function(e,t,i,s){n[n.length]=i?H(s,j,"$1"):t||e}),n}(e),n=i.length>0?i[0]:"",s=K("%"+n+"%",t),r=s.name,o=s.value,a=!1,l=s.alias;l&&(n=l[0],B(i,V([0,1],l)));for(var d=1,u=!0;d<i.length;d+=1){var p=i[d],g=z(p,0,1),f=z(p,-1);if(('"'===g||"'"===g||"`"===g||'"'===f||"'"===f||"`"===f)&&g!==f)throw new c("property names with quotes must have matching quotes");if("constructor"!==p&&u||(a=!0),G(P,r="%"+(n+="."+p)+"%"))o=P[r];else if(null!=o){if(!(p in o)){if(!t)throw new h("base intrinsic for "+e+" exists, but the property is not available.");return}if(S&&d+1>=i.length){var m=S(o,p);o=(u=!!m)&&"get"in m&&!("originalValue"in m.get)?m.get:o[p]}else u=G(o,p),o=o[p];u&&!a&&(P[r]=o)}}return o}},23752(e,t,i){"use strict";var n=i(25153);e.exports=n.getPrototypeOf||null},60248(e){"use strict";e.exports="undefined"!=typeof Reflect&&Reflect.getPrototypeOf||null},14252(e,t,i){"use strict";var n=i(60248),s=i(23752),r=i(57678);e.exports=n?function(e){return n(e)}:s?function(e){if(!e||"object"!=typeof e&&"function"!=typeof e)throw new TypeError("getProto: not an object");return s(e)}:r?function(e){return r(e)}:null},2013(e,t,i){var n;n="undefined"!=typeof window?window:void 0!==i.g?i.g:"undefined"!=typeof self?self:{},e.exports=n},29530(e){var t,i,n,s,r,o;function a(e,t,i,n,s,r){var o,a,l,c,h,d,u,p,g,f,m,v,y,C;for(g=0;g<r;g++){for(u=g,p=0,c=h=(o=e[d=g*s])*n[6],m=n[0],v=n[1],y=n[4],C=n[5],f=0;f<s;f++)l=(a=e[d])*m+o*v+c*y+h*C,h=c,c=l,o=a,i[p]=c,p++,d++;for(p--,u+=r*(s-1),c=h=(o=e[--d])*n[7],a=o,m=n[2],v=n[3],f=s-1;f>=0;f--)l=a*m+o*v+c*y+h*C,h=c,c=l,o=a,a=e[d],t[u]=i[p]+c,d--,p--,u-=r}}e.exports=function(e,l,c,h){if(h){var d=new Uint16Array(e.length),u=new Float32Array(Math.max(l,c)),p=function(e){e<.5&&(e=.5);var a=Math.exp(.527076)/e,l=Math.exp(-a),c=Math.exp(-2*a),h=(1-l)*(1-l)/(1+2*a*l-c);return t=h,i=h*(a-1)*l,n=h*(a+1)*l,s=-h*c,r=2*l,o=-c,new Float32Array([t,i,n,s,r,o,(t+i)/(1-r-o),(n+s)/(1-r-o)])}(h);a(e,d,u,p,l,c),a(d,e,u,p,c,l)}}},51333(e){"use strict";e.exports=Object.getOwnPropertyDescriptor},25667(e,t,i){"use strict";var n=i(51333);if(n)try{n([],"length")}catch(e){n=null}e.exports=n},44648(e,t,i){"use strict";i.r(t)},81949(e,t,i){"use strict";i.r(t)},724(e,t,i){"use strict";i.r(t)},8261(e){function t(){return e.exports=t=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var i=arguments[t];for(var n in i)({}).hasOwnProperty.call(i,n)&&(e[n]=i[n])}return e},e.exports.__esModule=!0,e.exports.default=e.exports,t.apply(null,arguments)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports},46001(e){e.exports=function(e){return e&&e.__esModule?e:{default:e}},e.exports.__esModule=!0,e.exports.default=e.exports},80620(e,t,i){var n=i(86747).default;function s(t,i){if("function"==typeof WeakMap)var r=new WeakMap,o=new WeakMap;return(e.exports=s=function(e,t){if(!t&&e&&e.__esModule)return e;var i,s,a={__proto__:null,default:e};if(null===e||"object"!=n(e)&&"function"!=typeof e)return a;if(i=t?o:r){if(i.has(e))return i.get(e);i.set(e,a)}for(var l in e)"default"!==l&&{}.hasOwnProperty.call(e,l)&&((s=(i=Object.defineProperty)&&Object.getOwnPropertyDescriptor(e,l))&&(s.get||s.set)?i(a,l,s):a[l]=e[l]);return a},e.exports.__esModule=!0,e.exports.default=e.exports)(t,i)}e.exports=s,e.exports.__esModule=!0,e.exports.default=e.exports},11700(e){e.exports=function(e,t){if(null==e)return{};var i={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(-1!==t.indexOf(n))continue;i[n]=e[n]}return i},e.exports.__esModule=!0,e.exports.default=e.exports},86747(e){function t(i){return e.exports=t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e.exports.__esModule=!0,e.exports.default=e.exports,t(i)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports},57506(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CompositeRootContext=void 0,t.useCompositeRootContext=function(e=!1){const t=n.useContext(r);if(void 0===t&&!e)throw new Error("Base UI: CompositeRootContext is missing. Composite parts must be placed within <Composite.Root>.");return t};var n=function(e,t){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var i=s(t);if(i&&i.has(e))return i.get(e);var n={__proto__:null},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if("default"!==o&&{}.hasOwnProperty.call(e,o)){var a=r?Object.getOwnPropertyDescriptor(e,o):null;a&&(a.get||a.set)?Object.defineProperty(n,o,a):n[o]=e[o]}return n.default=e,i&&i.set(e,n),n}(i(22155));function s(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,i=new WeakMap;return(s=function(e){return e?i:t})(e)}const r=t.CompositeRootContext=n.createContext(void 0)},53079(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DirectionContext=void 0,t.useDirection=function(e=!0){const t=n.useContext(r);if(void 0===t&&!e)throw new Error("Base UI: DirectionContext is missing.");return t?.direction??"ltr"};var n=function(e,t){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var i=s(t);if(i&&i.has(e))return i.get(e);var n={__proto__:null},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if("default"!==o&&{}.hasOwnProperty.call(e,o)){var a=r?Object.getOwnPropertyDescriptor(e,o):null;a&&(a.get||a.set)?Object.defineProperty(n,o,a):n[o]=e[o]}return n.default=e,i&&i.set(e,n),n}(i(22155));function s(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,i=new WeakMap;return(s=function(e){return e?i:t})(e)}const r=t.DirectionContext=n.createContext(void 0)},80725(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=i(19571);Object.keys(n).forEach(function(e){"default"!==e&&"__esModule"!==e&&(e in t&&t[e]===n[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return n[e]}}))})},19571(e,t){"use strict";function i(e,t){return s(e)?e(t):e??{}}function n(e,t){return t?e?Object.entries(t).reduce((t,[i,n])=>{var s,o,a,l;return function(e,t){const i=e.charCodeAt(2);return"o"===e[0]&&"n"===e[1]&&i>=65&&i<=90&&"function"==typeof t}(i,n)?t[i]=(s=e[i],o=n,e=>{if(function(e){return null!=e&&"object"==typeof e&&"nativeEvent"in e}(e)){const t=e;r(t);const i=o(t);return t.baseUIHandlerPrevented||s?.(t),i}const t=o(e);return s?.(e),t}):t[i]="style"===i?function(e,t){if(t||e)return{...e,...t}}(e.style,n):"className"===i?(a=e.className,(l=n)?a?l+" "+a:l:a):n,t},{...e}):t:e||{}}function s(e){return"function"==typeof e}function r(e){return e.preventBaseUIHandler=()=>{e.baseUIHandlerPrevented=!0},e}Object.defineProperty(t,"__esModule",{value:!0}),t.makeEventPreventable=r,t.mergeProps=function(...e){if(0===e.length)return{};if(1===e.length)return i(e[0],{});let t=i(e[0],{});for(let i=1;i<e.length;i+=1){const r=e[i];r&&(t=s(r)?r(t):n(t,r))}return t??{}}},85607(e,t,i){"use strict";var n=i(46001);Object.defineProperty(t,"__esModule",{value:!0}),t.PopoverArrow=void 0;var s=function(e,t){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var i=c(t);if(i&&i.has(e))return i.get(e);var n={__proto__:null},s=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var r in e)if("default"!==r&&{}.hasOwnProperty.call(e,r)){var o=s?Object.getOwnPropertyDescriptor(e,r):null;o&&(o.get||o.set)?Object.defineProperty(n,r,o):n[r]=e[r]}return n.default=e,i&&i.set(e,n),n}(i(22155)),r=(n(i(5821)),i(14434)),o=i(4706),a=i(72204),l=i(13214);function c(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,i=new WeakMap;return(c=function(e){return e?i:t})(e)}t.PopoverArrow=s.forwardRef(function(e,t){const{className:i,render:n,...c}=e,{open:h}=(0,o.usePopoverRootContext)(),{arrowRef:d,side:u,align:p,arrowUncentered:g,arrowStyles:f}=(0,r.usePopoverPositionerContext)(),m=s.useMemo(()=>({open:h,side:u,align:p,uncentered:g}),[h,u,p,g]);return(0,l.useRenderElement)("div",e,{state:m,ref:[t,d],props:[{style:f,"aria-hidden":!0},c],customStyleHookMapping:a.popupStateMapping})()})},30509(e,t,i){"use strict";var n=i(46001);Object.defineProperty(t,"__esModule",{value:!0}),t.PopoverBackdrop=void 0;var s=function(e,t){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var i=c(t);if(i&&i.has(e))return i.get(e);var n={__proto__:null},s=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var r in e)if("default"!==r&&{}.hasOwnProperty.call(e,r)){var o=s?Object.getOwnPropertyDescriptor(e,r):null;o&&(o.get||o.set)?Object.defineProperty(n,r,o):n[r]=e[r]}return n.default=e,i&&i.set(e,n),n}(i(22155)),r=(n(i(5821)),i(4706)),o=i(72204),a=i(60687),l=i(13214);function c(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,i=new WeakMap;return(c=function(e){return e?i:t})(e)}const h={...o.popupStateMapping,...a.transitionStatusMapping};t.PopoverBackdrop=s.forwardRef(function(e,t){const{className:i,render:n,...o}=e,{open:a,mounted:c,transitionStatus:d,openReason:u}=(0,r.usePopoverRootContext)(),p=s.useMemo(()=>({open:a,transitionStatus:d}),[a,d]);return(0,l.useRenderElement)("div",e,{state:p,ref:t,props:[{role:"presentation",hidden:!c,style:{pointerEvents:"hover"===u?"none":void 0,userSelect:"none",WebkitUserSelect:"none"}},o],customStyleHookMapping:h})()})},89101(e,t,i){"use strict";var n=i(46001);Object.defineProperty(t,"__esModule",{value:!0}),t.PopoverClose=void 0;var s=function(e,t){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var i=a(t);if(i&&i.has(e))return i.get(e);var n={__proto__:null},s=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var r in e)if("default"!==r&&{}.hasOwnProperty.call(e,r)){var o=s?Object.getOwnPropertyDescriptor(e,r):null;o&&(o.get||o.set)?Object.defineProperty(n,r,o):n[r]=e[r]}return n.default=e,i&&i.set(e,n),n}(i(22155)),r=(n(i(5821)),i(4706)),o=i(13214);function a(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,i=new WeakMap;return(a=function(e){return e?i:t})(e)}t.PopoverClose=s.forwardRef(function(e,t){const{render:i,className:n,...s}=e,{setOpen:a}=(0,r.usePopoverRootContext)();return(0,o.useRenderElement)("button",e,{ref:t,props:[{onClick(){a(!1,void 0,void 0)}},s]})()})},36253(e,t,i){"use strict";var n=i(46001);Object.defineProperty(t,"__esModule",{value:!0}),t.PopoverDescription=void 0;var s=function(e,t){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var i=c(t);if(i&&i.has(e))return i.get(e);var n={__proto__:null},s=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var r in e)if("default"!==r&&{}.hasOwnProperty.call(e,r)){var o=s?Object.getOwnPropertyDescriptor(e,r):null;o&&(o.get||o.set)?Object.defineProperty(n,r,o):n[r]=e[r]}return n.default=e,i&&i.set(e,n),n}(i(22155)),r=(n(i(5821)),i(4706)),o=i(26111),a=i(322),l=i(13214);function c(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,i=new WeakMap;return(c=function(e){return e?i:t})(e)}t.PopoverDescription=s.forwardRef(function(e,t){const{render:i,className:n,...s}=e,{setDescriptionId:c}=(0,r.usePopoverRootContext)(),h=(0,a.useBaseUiId)(s.id);return(0,o.useEnhancedEffect)(()=>(c(h),()=>{c(void 0)}),[c,h]),(0,l.useRenderElement)("p",e,{ref:t,props:[{id:h},s]})()})},17051(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Popover=void 0;var n=function(e,t){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var i=s(t);if(i&&i.has(e))return i.get(e);var n={__proto__:null},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if("default"!==o&&{}.hasOwnProperty.call(e,o)){var a=r?Object.getOwnPropertyDescriptor(e,o):null;a&&(a.get||a.set)?Object.defineProperty(n,o,a):n[o]=e[o]}return n.default=e,i&&i.set(e,n),n}(i(41507));function s(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,i=new WeakMap;return(s=function(e){return e?i:t})(e)}t.Popover=n},41507(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"Arrow",{enumerable:!0,get:function(){return l.PopoverArrow}}),Object.defineProperty(t,"Backdrop",{enumerable:!0,get:function(){return c.PopoverBackdrop}}),Object.defineProperty(t,"Close",{enumerable:!0,get:function(){return u.PopoverClose}}),Object.defineProperty(t,"Description",{enumerable:!0,get:function(){return d.PopoverDescription}}),Object.defineProperty(t,"Popup",{enumerable:!0,get:function(){return a.PopoverPopup}}),Object.defineProperty(t,"Portal",{enumerable:!0,get:function(){return r.PopoverPortal}}),Object.defineProperty(t,"Positioner",{enumerable:!0,get:function(){return o.PopoverPositioner}}),Object.defineProperty(t,"Root",{enumerable:!0,get:function(){return n.PopoverRoot}}),Object.defineProperty(t,"Title",{enumerable:!0,get:function(){return h.PopoverTitle}}),Object.defineProperty(t,"Trigger",{enumerable:!0,get:function(){return s.PopoverTrigger}});var n=i(1881),s=i(4905),r=i(12309),o=i(53049),a=i(97069),l=i(85607),c=i(30509),h=i(63317),d=i(36253),u=i(89101)},97069(e,t,i){"use strict";var n=i(46001);Object.defineProperty(t,"__esModule",{value:!0}),t.PopoverPopup=void 0;var s=function(e,t){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var i=g(t);if(i&&i.has(e))return i.get(e);var n={__proto__:null},s=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var r in e)if("default"!==r&&{}.hasOwnProperty.call(e,r)){var o=s?Object.getOwnPropertyDescriptor(e,r):null;o&&(o.get||o.set)?Object.defineProperty(n,r,o):n[r]=e[r]}return n.default=e,i&&i.set(e,n),n}(i(22155)),r=(n(i(5821)),i(25081)),o=i(4706),a=i(14434),l=i(66476),c=i(72204),h=(i(10389),i(60687)),d=i(65635),u=i(13214),p=i(65723);function g(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,i=new WeakMap;return(g=function(e){return e?i:t})(e)}const f={...c.popupStateMapping,...h.transitionStatusMapping};t.PopoverPopup=s.forwardRef(function(e,t){const{className:i,render:n,initialFocus:c,finalFocus:h,...g}=e,{open:m,instantType:v,transitionStatus:y,getPopupProps:C,titleId:b,descriptionId:S,popupRef:w,mounted:x,openReason:E,onOpenChangeComplete:M,modal:A}=(0,o.usePopoverRootContext)(),T=(0,a.usePopoverPositionerContext)();(0,d.useOpenChangeComplete)({open:m,ref:w,onComplete(){m&&M?.(!0)}});const{props:D,resolvedInitialFocus:I}=(0,l.usePopoverPopup)({titleId:b,descriptionId:S,initialFocus:c}),R=s.useMemo(()=>({open:m,side:T.side,align:T.align,instant:v,transitionStatus:y}),[m,T.side,T.align,v,y]),L=(0,u.useRenderElement)("div",e,{state:R,ref:[t,w],props:[D,C,{style:"starting"===y?{transition:"none"}:{}},g],customStyleHookMapping:f});return(0,p.jsx)(r.FloatingFocusManager,{context:T.context,modal:"trap-focus"===A,disabled:!x||"hover"===E,initialFocus:I,returnFocus:h,children:L()})})},66476(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.usePopoverPopup=function(e){const{titleId:t,descriptionId:i,initialFocus:r}=e,{popupRef:o,openMethod:a}=(0,s.usePopoverRootContext)(),l=n.useMemo(()=>({"aria-labelledby":t,"aria-describedby":i}),[t,i]),c=n.useCallback(e=>"touch"===e?o:0,[o]),h=n.useMemo(()=>null==r?c(a??""):"function"==typeof r?r(a??""):r,[c,r,a]);return n.useMemo(()=>({props:l,resolvedInitialFocus:h}),[l,h])};var n=function(e,t){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var i=r(t);if(i&&i.has(e))return i.get(e);var n={__proto__:null},s=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if("default"!==o&&{}.hasOwnProperty.call(e,o)){var a=s?Object.getOwnPropertyDescriptor(e,o):null;a&&(a.get||a.set)?Object.defineProperty(n,o,a):n[o]=e[o]}return n.default=e,i&&i.set(e,n),n}(i(22155)),s=i(4706);function r(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,i=new WeakMap;return(r=function(e){return e?i:t})(e)}},12309(e,t,i){"use strict";var n=i(46001);Object.defineProperty(t,"__esModule",{value:!0}),t.PopoverPortal=function(e){const{children:t,keepMounted:i=!1,container:n}=e,{mounted:l}=(0,r.usePopoverRootContext)();return l||i?(0,a.jsx)(o.PopoverPortalContext.Provider,{value:i,children:(0,a.jsx)(s.FloatingPortal,{root:n,children:t})}):null},function(e,t){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var i=l(t);if(i&&i.has(e))return i.get(e);var n={__proto__:null},s=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var r in e)if("default"!==r&&{}.hasOwnProperty.call(e,r)){var o=s?Object.getOwnPropertyDescriptor(e,r):null;o&&(o.get||o.set)?Object.defineProperty(n,r,o):n[r]=e[r]}n.default=e,i&&i.set(e,n)}(i(22155)),n(i(5821));var s=i(25081),r=i(4706),o=(i(10389),i(53486)),a=i(65723);function l(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,i=new WeakMap;return(l=function(e){return e?i:t})(e)}},53486(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PopoverPortalContext=void 0,t.usePopoverPortalContext=function(){const e=n.useContext(r);if(void 0===e)throw new Error("Base UI: <Popover.Portal> is missing.");return e};var n=function(e,t){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var i=s(t);if(i&&i.has(e))return i.get(e);var n={__proto__:null},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if("default"!==o&&{}.hasOwnProperty.call(e,o)){var a=r?Object.getOwnPropertyDescriptor(e,o):null;a&&(a.get||a.set)?Object.defineProperty(n,o,a):n[o]=e[o]}return n.default=e,i&&i.set(e,n),n}(i(22155));function s(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,i=new WeakMap;return(s=function(e){return e?i:t})(e)}const r=t.PopoverPortalContext=n.createContext(void 0)},53049(e,t,i){"use strict";var n=i(46001);Object.defineProperty(t,"__esModule",{value:!0}),t.PopoverPositioner=void 0;var s=function(e,t){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var i=g(t);if(i&&i.has(e))return i.get(e);var n={__proto__:null},s=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var r in e)if("default"!==r&&{}.hasOwnProperty.call(e,r)){var o=s?Object.getOwnPropertyDescriptor(e,r):null;o&&(o.get||o.set)?Object.defineProperty(n,r,o):n[r]=e[r]}return n.default=e,i&&i.set(e,n),n}(i(22155)),r=(n(i(5821)),i(4706)),o=i(35938),a=i(14434),l=i(72204),c=(i(10389),i(53486)),h=i(52454),d=i(42468),u=i(13214),p=i(65723);function g(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,i=new WeakMap;return(g=function(e){return e?i:t})(e)}t.PopoverPositioner=s.forwardRef(function(e,t){const{render:i,className:n,anchor:g,positionMethod:f="absolute",side:m="bottom",align:v="center",sideOffset:y=0,alignOffset:C=0,collisionBoundary:b="clipping-ancestors",collisionPadding:S=5,arrowPadding:w=5,sticky:x=!1,trackAnchor:E=!0,...M}=e,{floatingRootContext:A,open:T,mounted:D,setPositionerElement:I,modal:R,openReason:L,openMethod:k}=(0,r.usePopoverRootContext)(),P=(0,c.usePopoverPortalContext)(),N=(0,o.usePopoverPositioner)({anchor:g,floatingRootContext:A,positionMethod:f,mounted:D,open:T,side:m,sideOffset:y,align:v,alignOffset:C,arrowPadding:w,collisionBoundary:b,collisionPadding:S,sticky:x,trackAnchor:E,keepMounted:P}),O=s.useMemo(()=>({open:T,side:N.side,align:N.align,anchorHidden:N.anchorHidden}),[T,N.side,N.align,N.anchorHidden]),_=(0,u.useRenderElement)("div",e,{state:O,props:[N.props,M],ref:[t,I],customStyleHookMapping:l.popupStateMapping});return(0,p.jsxs)(a.PopoverPositionerContext.Provider,{value:N,children:[D&&!0===R&&"hover"!==L&&"touch"!==k&&(0,p.jsx)(d.InternalBackdrop,{inert:(0,h.inertValue)(!T)}),_()]})})},14434(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PopoverPositionerContext=void 0,t.usePopoverPositionerContext=function(){const e=n.useContext(r);if(void 0===e)throw new Error("Base UI: PopoverPositionerContext is missing. PopoverPositioner parts must be placed within <Popover.Positioner>.");return e};var n=function(e,t){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var i=s(t);if(i&&i.has(e))return i.get(e);var n={__proto__:null},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if("default"!==o&&{}.hasOwnProperty.call(e,o)){var a=r?Object.getOwnPropertyDescriptor(e,o):null;a&&(a.get||a.set)?Object.defineProperty(n,o,a):n[o]=e[o]}return n.default=e,i&&i.set(e,n),n}(i(22155));function s(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,i=new WeakMap;return(s=function(e){return e?i:t})(e)}const r=t.PopoverPositionerContext=n.createContext(void 0)},35938(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.usePopoverPositioner=function(e){const{open:t,mounted:i}=(0,r.usePopoverRootContext)(),o=(0,s.useAnchorPositioning)(e),a=n.useMemo(()=>{const e={};return t||(e.pointerEvents="none"),{role:"presentation",hidden:!i,style:{...o.positionerStyles,...e}}},[t,i,o.positionerStyles]);return n.useMemo(()=>({props:a,...o}),[a,o])};var n=function(e,t){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var i=o(t);if(i&&i.has(e))return i.get(e);var n={__proto__:null},s=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var r in e)if("default"!==r&&{}.hasOwnProperty.call(e,r)){var a=s?Object.getOwnPropertyDescriptor(e,r):null;a&&(a.get||a.set)?Object.defineProperty(n,r,a):n[r]=e[r]}return n.default=e,i&&i.set(e,n),n}(i(22155)),s=i(54540),r=i(4706);function o(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,i=new WeakMap;return(o=function(e){return e?i:t})(e)}},1881(e,t,i){"use strict";var n=i(46001);Object.defineProperty(t,"__esModule",{value:!0}),t.PopoverRoot=void 0;var s=function(e,t){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var i=c(t);if(i&&i.has(e))return i.get(e);var n={__proto__:null},s=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var r in e)if("default"!==r&&{}.hasOwnProperty.call(e,r)){var o=s?Object.getOwnPropertyDescriptor(e,r):null;o&&(o.get||o.set)?Object.defineProperty(n,r,o):n[r]=e[r]}return n.default=e,i&&i.set(e,n),n}(i(22155)),r=(n(i(5821)),i(4706)),o=i(33890),a=i(81324),l=i(65723);function c(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,i=new WeakMap;return(c=function(e){return e?i:t})(e)}t.PopoverRoot=function(e){const{defaultOpen:t=!1,onOpenChange:i,open:n,openOnHover:c=!1,delay:h,closeDelay:d=0,actionsRef:u,onOpenChangeComplete:p,modal:g=!1}=e,f=h??a.OPEN_DELAY,m=(0,o.usePopoverRoot)({...e,defaultOpen:t,onOpenChange:i,open:n,openOnHover:c,onOpenChangeComplete:p,delay:f,closeDelay:d,actionsRef:u,modal:g}),v=s.useMemo(()=>({...m,openOnHover:c,delay:f,closeDelay:d,modal:g}),[m,c,f,d,g]);return(0,l.jsx)(r.PopoverRootContext.Provider,{value:v,children:e.children})}},4706(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PopoverRootContext=void 0,t.usePopoverRootContext=function(){const e=n.useContext(r);if(void 0===e)throw new Error("Base UI: PopoverRootContext is missing. Popover parts must be placed within <Popover.Root>.");return e};var n=function(e,t){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var i=s(t);if(i&&i.has(e))return i.get(e);var n={__proto__:null},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if("default"!==o&&{}.hasOwnProperty.call(e,o)){var a=r?Object.getOwnPropertyDescriptor(e,o):null;a&&(a.get||a.set)?Object.defineProperty(n,o,a):n[o]=e[o]}return n.default=e,i&&i.set(e,n),n}(i(22155));function s(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,i=new WeakMap;return(s=function(e){return e?i:t})(e)}const r=t.PopoverRootContext=n.createContext(void 0)},33890(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.usePopoverRoot=function(e){const{open:t,onOpenChange:i,defaultOpen:m=!1,delay:v,closeDelay:y,openOnHover:C=!1,onOpenChangeComplete:b,modal:S}=e,w=v??c.OPEN_DELAY,x=y??0,[E,M]=n.useState(),[A,T]=n.useState(),[D,I]=n.useState(),[R,L]=n.useState(null),[k,P]=n.useState(null),[N,O]=n.useState(null),[_,F]=n.useState(!0),G=n.useRef(null),V=n.useRef(-1),[B,H]=(0,o.useControlled)({controlled:t,default:m,name:"Popover",state:"open"}),z=(0,a.useEventCallback)(i),{mounted:U,setMounted:W,transitionStatus:j}=(0,l.useTransitionStatus)(B);(0,f.useScrollLock)({enabled:B&&!0===S&&"hover"!==N,mounted:U,open:B,referenceElement:k});const K=(0,a.useEventCallback)((e,t,i)=>{z(e,t,i),H(e),e&&O(i??null)}),$=(0,a.useEventCallback)(()=>{W(!1),F(!0),O(null),b?.(!1)});(0,p.useOpenChangeComplete)({enabled:!e.actionsRef,open:B,ref:G,onComplete(){B||$()}}),n.useImperativeHandle(e.actionsRef,()=>({unmount:$}),[$]);const Y=(0,a.useEventCallback)(()=>{clearTimeout(V.current)});n.useEffect(()=>{B||Y()},[Y,B]),n.useEffect(()=>Y,[Y]);const q=(0,r.useFloatingRootContext)({elements:{reference:R,floating:k},open:B,onOpenChange(e,t,i){const n="hover"===i||"safe-polygon"===i,r="click"===i&&0===t.detail,o=!e&&("escape-key"===i||null==i);function a(){K(e,t,(0,u.translateOpenChangeReason)(i))}n?(F(!0),Y(),V.current=window.setTimeout(()=>{F(!1)},g.PATIENT_CLICK_THRESHOLD),s.flushSync(a)):a(),M(r||o?r?"click":"dismiss":void 0)}}),{openMethod:X,triggerProps:Z}=(0,d.useOpenInteractionType)(B),Q=w,J=(0,r.useHover)(q,{enabled:C&&("touch"!==X||"click"!==N),mouseOnly:!0,move:!1,handleClose:(0,r.safePolygon)({blockPointerEvents:!0}),restMs:Q,delay:{close:x}}),ee=(0,r.useClick)(q,{stickIfOpen:_}),te=(0,r.useDismiss)(q),ie=(0,r.useRole)(q),{getReferenceProps:ne,getFloatingProps:se}=(0,r.useInteractions)([J,ee,te,ie]),re=n.useCallback((e={})=>ne((0,h.mergeProps)(Z,e)),[ne,Z]);return n.useMemo(()=>({open:B,setOpen:K,mounted:U,setMounted:W,transitionStatus:j,setTriggerElement:L,positionerElement:k,setPositionerElement:P,popupRef:G,titleId:A,setTitleId:T,descriptionId:D,setDescriptionId:I,getTriggerProps:re,getPopupProps:se,floatingRootContext:q,instantType:E,openMethod:X,openReason:N,onOpenChangeComplete:b}),[B,K,U,W,j,k,A,D,re,se,q,E,X,N,b])};var n=v(i(22155)),s=v(i(70316)),r=i(25081),o=i(46830),a=i(37041),l=i(30973),c=i(81324),h=i(80725),d=i(30626),u=i(861),p=i(65635),g=i(71202),f=i(22130);function m(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,i=new WeakMap;return(m=function(e){return e?i:t})(e)}function v(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var i=m(t);if(i&&i.has(e))return i.get(e);var n={__proto__:null},s=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var r in e)if("default"!==r&&{}.hasOwnProperty.call(e,r)){var o=s?Object.getOwnPropertyDescriptor(e,r):null;o&&(o.get||o.set)?Object.defineProperty(n,r,o):n[r]=e[r]}return n.default=e,i&&i.set(e,n),n}},63317(e,t,i){"use strict";var n=i(46001);Object.defineProperty(t,"__esModule",{value:!0}),t.PopoverTitle=void 0;var s=function(e,t){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var i=c(t);if(i&&i.has(e))return i.get(e);var n={__proto__:null},s=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var r in e)if("default"!==r&&{}.hasOwnProperty.call(e,r)){var o=s?Object.getOwnPropertyDescriptor(e,r):null;o&&(o.get||o.set)?Object.defineProperty(n,r,o):n[r]=e[r]}return n.default=e,i&&i.set(e,n),n}(i(22155)),r=(n(i(5821)),i(4706)),o=i(13214),a=i(26111),l=i(322);function c(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,i=new WeakMap;return(c=function(e){return e?i:t})(e)}t.PopoverTitle=s.forwardRef(function(e,t){const{render:i,className:n,...s}=e,{setTitleId:c}=(0,r.usePopoverRootContext)(),h=(0,l.useBaseUiId)(s.id);return(0,a.useEnhancedEffect)(()=>(c(h),()=>{c(void 0)}),[c,h]),(0,o.useRenderElement)("h2",e,{ref:t,props:[{id:h},s]})()})},4905(e,t,i){"use strict";var n=i(46001);Object.defineProperty(t,"__esModule",{value:!0}),t.PopoverTrigger=void 0;var s=function(e,t){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var i=c(t);if(i&&i.has(e))return i.get(e);var n={__proto__:null},s=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var r in e)if("default"!==r&&{}.hasOwnProperty.call(e,r)){var o=s?Object.getOwnPropertyDescriptor(e,r):null;o&&(o.get||o.set)?Object.defineProperty(n,r,o):n[r]=e[r]}return n.default=e,i&&i.set(e,n),n}(i(22155)),r=(n(i(5821)),i(4706)),o=i(1623),a=i(72204),l=i(13214);function c(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,i=new WeakMap;return(c=function(e){return e?i:t})(e)}t.PopoverTrigger=s.forwardRef(function(e,t){const{render:i,className:n,disabled:c=!1,...h}=e,{open:d,setTriggerElement:u,getTriggerProps:p,openReason:g}=(0,r.usePopoverRootContext)(),f=s.useMemo(()=>({disabled:c,open:d}),[c,d]),{getButtonProps:m,buttonRef:v}=(0,o.useButton)({disabled:c,buttonRef:t}),y=s.useMemo(()=>({open:e=>e&&"click"===g?a.pressableTriggerOpenStateMapping.open(e):a.triggerOpenStateMapping.open(e)}),[g]);return(0,l.useRenderElement)("button",e,{state:f,ref:[v,u],props:[p,h,m],customStyleHookMapping:y})()})},81324(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.OPEN_DELAY=void 0,t.OPEN_DELAY=300},1623(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.useButton=function(e={}){const{buttonRef:t,disabled:i=!1,focusableWhenDisabled:h,tabIndex:d,type:u="button",elementName:p}=e,g=n.useRef(null),{rootElementName:f,updateRootElementName:m}=(0,l.useRootElementName)({rootElementName:p}),v=void 0!==(0,c.useCompositeRootContext)(!0),y=(0,a.useEventCallback)(()=>{const e=g.current;return"BUTTON"===f||"INPUT"===f&&["button","submit","reset"].includes(e?.type)}),C=(0,a.useEventCallback)(()=>{const e=g.current;return Boolean("A"===f&&e?.href)}),b=(0,s.useForkRef)(m,t,g),S=n.useMemo(()=>{const e={};return void 0===d||v||(e.tabIndex=d),"BUTTON"===f||"INPUT"===f?h||v?e["aria-disabled"]=i:v||(e.disabled=i):""!==f&&("A"!==f?(e.role="button",v||(e.tabIndex=d??0)):d&&!v&&(e.tabIndex=d),i&&(e["aria-disabled"]=i,v||(e.tabIndex=h?d??0:-1))),e},[i,f,h,v,d]);return(0,o.useEnhancedEffect)(()=>{const e=g.current;e instanceof HTMLButtonElement&&v&&i&&void 0===S.disabled&&e.disabled&&(e.disabled=!1)},[i,S.disabled,v]),{getButtonProps:n.useCallback((e={})=>{const{onClick:t,onMouseDown:n,onKeyUp:s,onKeyDown:o,onPointerDown:a,...l}=e;return(0,r.mergeProps)({type:"BUTTON"===f||"INPUT"===f?u:void 0,onClick(e){i?e.preventDefault():t?.(e)},onMouseDown(e){i||n?.(e)},onKeyDown(e){(i&&h&&"Tab"!==e.key||e.target===e.currentTarget&&!y()&&" "===e.key)&&e.preventDefault(),i||((0,r.makeEventPreventable)(e),o?.(e)),e.baseUIHandlerPrevented||e.target!==e.currentTarget||y()||C()||"Enter"!==e.key||i||(t?.(e),e.preventDefault())},onKeyUp(e){i||((0,r.makeEventPreventable)(e),s?.(e)),e.baseUIHandlerPrevented||e.target!==e.currentTarget||y()||i||" "!==e.key||t?.(e)},onPointerDown(e){i?e.preventDefault():a?.(e)},ref:b},S,l)},[S,i,f,h,y,C,b,u]),buttonRef:b}};var n=function(e,t){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var i=h(t);if(i&&i.has(e))return i.get(e);var n={__proto__:null},s=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var r in e)if("default"!==r&&{}.hasOwnProperty.call(e,r)){var o=s?Object.getOwnPropertyDescriptor(e,r):null;o&&(o.get||o.set)?Object.defineProperty(n,r,o):n[r]=e[r]}return n.default=e,i&&i.set(e,n),n}(i(22155)),s=i(74467),r=i(80725),o=i(56371),a=i(37041),l=i(46489),c=i(57506);function h(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,i=new WeakMap;return(h=function(e){return e?i:t})(e)}},42468(e,t,i){"use strict";var n=i(46001);Object.defineProperty(t,"__esModule",{value:!0}),t.InternalBackdrop=void 0;var s=function(e,t){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var i=o(t);if(i&&i.has(e))return i.get(e);var n={__proto__:null},s=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var r in e)if("default"!==r&&{}.hasOwnProperty.call(e,r)){var a=s?Object.getOwnPropertyDescriptor(e,r):null;a&&(a.get||a.set)?Object.defineProperty(n,r,a):n[r]=e[r]}return n.default=e,i&&i.set(e,n),n}(i(22155)),r=(n(i(5821)),i(65723));function o(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,i=new WeakMap;return(o=function(e){return e?i:t})(e)}t.InternalBackdrop=s.forwardRef(function(e,t){return(0,r.jsx)("div",{ref:t,role:"presentation","data-floating-ui-inert":!0,...e,style:{position:"fixed",inset:0,userSelect:"none",WebkitUserSelect:"none"}})})},71202(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TYPEAHEAD_RESET_MS=t.PATIENT_CLICK_THRESHOLD=void 0,t.TYPEAHEAD_RESET_MS=500,t.PATIENT_CLICK_THRESHOLD=500},71922(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getNavigatorData=s,t.isFirefox=function(){return/firefox/i.test((0,n.getUserAgent)())},t.isIOS=function(){const e=s();return"MacIntel"===e.platform&&e.maxTouchPoints>1||/iP(hone|ad|od)|iOS/.test(e.platform)},t.isWebKit=function(){return!("undefined"==typeof CSS||!CSS.supports)&&CSS.supports("-webkit-backdrop-filter:none")};var n=i(14650);function s(){if("undefined"==typeof navigator)return{platform:"",maxTouchPoints:-1};const e=navigator.userAgentData;return e?.platform?{platform:e.platform,maxTouchPoints:navigator.maxTouchPoints}:{platform:navigator.platform,maxTouchPoints:navigator.maxTouchPoints}}},38454(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.evaluateRenderProp=function(e,t,i){return"function"==typeof e?e(t,i):n.cloneElement(e,{...(0,s.mergeProps)(t,e.props),ref:t.ref})};var n=function(e,t){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var i=r(t);if(i&&i.has(e))return i.get(e);var n={__proto__:null},s=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if("default"!==o&&{}.hasOwnProperty.call(e,o)){var a=s?Object.getOwnPropertyDescriptor(e,o):null;a&&(a.get||a.set)?Object.defineProperty(n,o,a):n[o]=e[o]}return n.default=e,i&&i.set(e,n),n}(i(22155)),s=i(80725);function r(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,i=new WeakMap;return(r=function(e){return e?i:t})(e)}},95361(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getReactElementRef=function(e){return parseInt(n.version,10)>=19?e?.props?.ref||null:e?.ref||null};var n=function(e,t){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var i=s(t);if(i&&i.has(e))return i.get(e);var n={__proto__:null},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if("default"!==o&&{}.hasOwnProperty.call(e,o)){var a=r?Object.getOwnPropertyDescriptor(e,o):null;a&&(a.get||a.set)?Object.defineProperty(n,o,a):n[o]=e[o]}return n.default=e,i&&i.set(e,n),n}(i(22155));function s(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,i=new WeakMap;return(s=function(e){return e?i:t})(e)}},87935(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getStyleHookProps=function(e,t){let i={};return Object.entries(e).forEach(([e,n])=>{if(t?.hasOwnProperty(e)){const s=t[e](n);return void(null!=s&&(i={...i,...s}))}!0===n?i[`data-${e.toLowerCase()}`]="":n&&(i[`data-${e.toLowerCase()}`]=n.toString())}),i}},26111(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=i(95361);Object.keys(n).forEach(function(e){"default"!==e&&"__esModule"!==e&&(e in t&&t[e]===n[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return n[e]}}))});var s=i(46830);Object.keys(s).forEach(function(e){"default"!==e&&"__esModule"!==e&&(e in t&&t[e]===s[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return s[e]}}))});var r=i(56371);Object.keys(r).forEach(function(e){"default"!==e&&"__esModule"!==e&&(e in t&&t[e]===r[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return r[e]}}))});var o=i(74467);Object.keys(o).forEach(function(e){"default"!==e&&"__esModule"!==e&&(e in t&&t[e]===o[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return o[e]}}))});var a=i(50901);Object.keys(a).forEach(function(e){"default"!==e&&"__esModule"!==e&&(e in t&&t[e]===a[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return a[e]}}))});var l=i(22130);Object.keys(l).forEach(function(e){"default"!==e&&"__esModule"!==e&&(e in t&&t[e]===l[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return l[e]}}))});var c=i(30973);Object.keys(c).forEach(function(e){"default"!==e&&"__esModule"!==e&&(e in t&&t[e]===c[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return c[e]}}))});var h=i(21932);Object.keys(h).forEach(function(e){"default"!==e&&"__esModule"!==e&&(e in t&&t[e]===h[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return h[e]}}))})},52454(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.inertValue=function(e){return(0,n.isReactVersionAtLeast)(19)?e:e?"true":void 0};var n=i(49958)},68736(e,t){"use strict";function i(e){return e&&e.ownerDocument||document}Object.defineProperty(t,"__esModule",{value:!0}),t.ownerDocument=i,t.ownerWindow=function(e){return i(e).defaultView||window}},72204(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.triggerOpenStateMapping=t.pressableTriggerOpenStateMapping=t.popupStateMapping=t.CommonTriggerDataAttributes=t.CommonPopupDataAttributes=void 0;var n=i(60687);let s=t.CommonPopupDataAttributes=function(e){return e.open="data-open",e.closed="data-closed",e[e.startingStyle=n.TransitionStatusDataAttributes.startingStyle]="startingStyle",e[e.endingStyle=n.TransitionStatusDataAttributes.endingStyle]="endingStyle",e.anchorHidden="data-anchor-hidden",e}({}),r=t.CommonTriggerDataAttributes=function(e){return e.popupOpen="data-popup-open",e.pressed="data-pressed",e}({});const o={[r.popupOpen]:""},a={[r.popupOpen]:"",[r.pressed]:""},l={[s.open]:""},c={[s.closed]:""},h={[s.anchorHidden]:""};t.triggerOpenStateMapping={open:e=>e?o:null},t.pressableTriggerOpenStateMapping={open:e=>e?a:null},t.popupStateMapping={open:e=>e?l:c,anchorHidden:e=>e?h:null}},10389(e,t,i){"use strict";var n=i(46001);Object.defineProperty(t,"__esModule",{value:!0}),t.HTMLElementType=function(e,t,i,n,s){return null},t.exactProp=function(e){return e},t.refType=void 0;var s=n(i(5821));t.refType=s.default.oneOfType([s.default.func,s.default.object])},49958(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isReactVersionAtLeast=function(e){return r>=e};var n=function(e,t){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var i=s(t);if(i&&i.has(e))return i.get(e);var n={__proto__:null},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if("default"!==o&&{}.hasOwnProperty.call(e,o)){var a=r?Object.getOwnPropertyDescriptor(e,o):null;a&&(a.get||a.set)?Object.defineProperty(n,o,a):n[o]=e[o]}return n.default=e,i&&i.set(e,n),n}(i(22155));function s(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,i=new WeakMap;return(s=function(e){return e?i:t})(e)}const r=parseInt(n.version,10)},74184(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.resolveClassName=function(e,t){return"function"==typeof e?e(t):e}},60687(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.transitionStatusMapping=t.TransitionStatusDataAttributes=void 0;let i=t.TransitionStatusDataAttributes=function(e){return e.startingStyle="data-starting-style",e.endingStyle="data-ending-style",e}({});const n={[i.startingStyle]:""},s={[i.endingStyle]:""};t.transitionStatusMapping={transitionStatus:e=>"starting"===e?n:"ending"===e?s:null}},861(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.translateOpenChangeReason=function(e){if(e)return{click:"click",hover:"hover",focus:"focus","focus-out":"focus-out","escape-key":"escape-key","outside-press":"outside-press","reference-press":"trigger-press","safe-polygon":"hover","ancestor-scroll":void 0,"list-navigation":void 0}[e]}},54540(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.useAnchorPositioning=function(e){const{anchor:t,positionMethod:i="absolute",side:c="bottom",sideOffset:u=0,align:p="center",alignOffset:g=0,collisionBoundary:f,collisionPadding:m=5,sticky:v=!1,arrowPadding:y=5,keepMounted:C=!1,floatingRootContext:b,mounted:S,trackAnchor:w=!0,nodeId:x}=e,E="rtl"===(0,a.useDirection)(),M={top:"top",right:"right",bottom:"bottom",left:"left","inline-end":E?"left":"right","inline-start":E?"right":"left"}[c],A="center"===p?M:`${M}-${p}`,T={boundary:"clipping-ancestors"===f?"clippingAncestors":f,padding:m},D=n.useRef(null),I=(0,l.useLatestRef)(u),R=(0,l.useLatestRef)(g),L="function"!=typeof u?u:0,k="function"!=typeof g?g:0,P=[(0,s.offset)(({rects:e,placement:t})=>{const i={side:h(c,(0,r.getSide)(t),E),align:(0,r.getAlignment)(t)||"center",anchor:{width:e.reference.width,height:e.reference.height},positioner:{width:e.floating.width,height:e.floating.height}},n="function"==typeof I.current?I.current(i):I.current,s="function"==typeof R.current?R.current(i):R.current;return{mainAxis:n,crossAxis:s,alignmentAxis:s}},[L,k,E,c])],N=(0,s.flip)(T),O=(0,s.shift)({...T,crossAxis:v,limiter:v?void 0:(0,s.limitShift)(()=>{if(!D.current)return{};const{height:e}=D.current.getBoundingClientRect();return{offset:e/2+("number"==typeof m?m:0)}})});"center"!==p?P.push(N,O):P.push(O,N),P.push((0,s.size)({...T,apply({elements:{floating:e},rects:{reference:t},availableWidth:i,availableHeight:n}){Object.entries({"--available-width":`${i}px`,"--available-height":`${n}px`,"--anchor-width":`${t.width}px`,"--anchor-height":`${t.height}px`}).forEach(([t,i])=>{e.style.setProperty(t,i)})}}),(0,s.arrow)(()=>({element:D.current||document.createElement("div"),padding:y}),[y]),(0,s.hide)(),{name:"transformOrigin",fn({elements:e,middlewareData:t,placement:i}){const n=(0,r.getSide)(i),s=D.current,o=t.arrow?.x??0,a=t.arrow?.y??0,l=o+(s?.clientWidth??0)/2,c=a+(s?.clientHeight??0)/2,h={top:`${l}px calc(100% + ${u}px)`,bottom:`${l}px ${-u}px`,left:`calc(100% + ${u}px) ${c}px`,right:`${-u}px ${c}px`}[n];return e.floating.style.setProperty("--transform-origin",h),{}}});let _=b;!S&&b&&(_={...b,elements:{reference:null,floating:null,domReference:null}});const F=n.useMemo(()=>({elementResize:w&&"undefined"!=typeof ResizeObserver,layoutShift:w&&"undefined"!=typeof IntersectionObserver}),[w]),{refs:G,elements:V,floatingStyles:B,middlewareData:H,update:z,placement:U,context:W,isPositioned:j}=(0,s.useFloating)({rootContext:_,placement:A,middleware:P,strategy:i,whileElementsMounted:C?void 0:(...e)=>(0,s.autoUpdate)(...e,F),nodeId:x}),K=n.useRef(null);(0,o.useEnhancedEffect)(()=>{if(!S)return;const e="function"==typeof t?t():t;if(e){const t=d(e)?e.current:e;G.setPositionReference(t),K.current=t}},[S,G,t]),n.useEffect(()=>{S&&"function"!=typeof t&&d(t)&&t.current!==K.current&&(G.setPositionReference(t.current),K.current=t.current)},[S,G,t]),n.useEffect(()=>{if(C&&S&&V.domReference&&V.floating)return(0,s.autoUpdate)(V.domReference,V.floating,z,F)},[C,S,V,z,F]);const $=(0,r.getSide)(U),Y=h(c,$,E),q=(0,r.getAlignment)(U)||"center",X=Boolean(H.hide?.referenceHidden),Z=n.useMemo(()=>({position:"absolute",top:H.arrow?.y,left:H.arrow?.x}),[H.arrow]),Q=0!==H.arrow?.centerOffset;return n.useMemo(()=>({positionerStyles:B,arrowStyles:Z,arrowRef:D,arrowUncentered:Q,side:Y,align:q,anchorHidden:X,refs:G,context:W,isPositioned:j}),[B,Z,D,Q,Y,q,X,G,W,j])};var n=function(e,t){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var i=c(t);if(i&&i.has(e))return i.get(e);var n={__proto__:null},s=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var r in e)if("default"!==r&&{}.hasOwnProperty.call(e,r)){var o=s?Object.getOwnPropertyDescriptor(e,r):null;o&&(o.get||o.set)?Object.defineProperty(n,r,o):n[r]=e[r]}return n.default=e,i&&i.set(e,n),n}(i(22155)),s=i(25081),r=i(49065),o=i(56371),a=i(53079),l=i(12618);function c(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,i=new WeakMap;return(c=function(e){return e?i:t})(e)}function h(e,t,i){const n="inline-start"===e||"inline-end"===e;return{top:"top",right:n?i?"inline-start":"inline-end":"right",bottom:"bottom",left:n?i?"inline-end":"inline-start":"left"}[t]}function d(e){return null!=e&&"current"in e}},6029(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.useAnimationsFinished=function(e,t=!1){const i=n.useRef(-1),o=n.useRef(-1),a=(0,r.useEventCallback)(()=>{cancelAnimationFrame(i.current),clearTimeout(o.current)});return n.useEffect(()=>a,[a]),(0,r.useEventCallback)((n,r=null)=>{a();const l=e.current;l&&("function"!=typeof l.getAnimations||globalThis.BASE_UI_ANIMATIONS_DISABLED?n():i.current=requestAnimationFrame(()=>{function e(){l&&Promise.allSettled(l.getAnimations().map(e=>e.finished)).then(()=>{null!=r&&r.aborted||s.flushSync(n)})}t?o.current=window.setTimeout(e):e()}))})};var n=a(i(22155)),s=a(i(70316)),r=i(37041);function o(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,i=new WeakMap;return(o=function(e){return e?i:t})(e)}function a(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var i=o(t);if(i&&i.has(e))return i.get(e);var n={__proto__:null},s=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var r in e)if("default"!==r&&{}.hasOwnProperty.call(e,r)){var a=s?Object.getOwnPropertyDescriptor(e,r):null;a&&(a.get||a.set)?Object.defineProperty(n,r,a):n[r]=e[r]}return n.default=e,i&&i.set(e,n),n}},322(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.useBaseUiId=function(e){return(0,n.useId)(e,"base-ui")};var n=i(50901)},46830(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.useControlled=function({controlled:e,default:t,name:i,state:s="value"}){const{current:r}=n.useRef(void 0!==e),[o,a]=n.useState(t);return[r?e:o,n.useCallback(e=>{r||a(e)},[])]};var n=function(e,t){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var i=s(t);if(i&&i.has(e))return i.get(e);var n={__proto__:null},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if("default"!==o&&{}.hasOwnProperty.call(e,o)){var a=r?Object.getOwnPropertyDescriptor(e,o):null;a&&(a.get||a.set)?Object.defineProperty(n,o,a):n[o]=e[o]}return n.default=e,i&&i.set(e,n),n}(i(22155));function s(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,i=new WeakMap;return(s=function(e){return e?i:t})(e)}},24842(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.useEnhancedClickHandler=function(e){const t=n.useRef(""),i=n.useCallback(e=>{e.defaultPrevented||(t.current=e.pointerType)},[]);return{onClick:n.useCallback(i=>{0!==i.detail?("pointerType"in i&&e(i,i.pointerType),e(i,t.current),t.current=""):e(i,"keyboard")},[e]),onPointerDown:i}};var n=function(e,t){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var i=s(t);if(i&&i.has(e))return i.get(e);var n={__proto__:null},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if("default"!==o&&{}.hasOwnProperty.call(e,o)){var a=r?Object.getOwnPropertyDescriptor(e,o):null;a&&(a.get||a.set)?Object.defineProperty(n,o,a):n[o]=e[o]}return n.default=e,i&&i.set(e,n),n}(i(22155));function s(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,i=new WeakMap;return(s=function(e){return e?i:t})(e)}},56371(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.useEnhancedEffect=void 0;var n=function(e,t){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var i=s(t);if(i&&i.has(e))return i.get(e);var n={__proto__:null},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if("default"!==o&&{}.hasOwnProperty.call(e,o)){var a=r?Object.getOwnPropertyDescriptor(e,o):null;a&&(a.get||a.set)?Object.defineProperty(n,o,a):n[o]=e[o]}return n.default=e,i&&i.set(e,n),n}(i(22155));function s(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,i=new WeakMap;return(s=function(e){return e?i:t})(e)}t.useEnhancedEffect="undefined"!=typeof window?n.useLayoutEffect:n.useEffect},37041(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.useEventCallback=function(e){const t=n.useRef(e);return(0,s.useEnhancedEffect)(()=>{t.current=e}),n.useCallback((...e)=>t.current?.(...e),[])};var n=function(e,t){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var i=r(t);if(i&&i.has(e))return i.get(e);var n={__proto__:null},s=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if("default"!==o&&{}.hasOwnProperty.call(e,o)){var a=s?Object.getOwnPropertyDescriptor(e,o):null;a&&(a.get||a.set)?Object.defineProperty(n,o,a):n[o]=e[o]}return n.default=e,i&&i.set(e,n),n}(i(22155)),s=i(56371);function r(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,i=new WeakMap;return(r=function(e){return e?i:t})(e)}},74467(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.useForkRef=function(...e){const t=n.useRef(void 0),i=n.useCallback(t=>{const i=e.map(e=>{if(null==e)return null;if("function"==typeof e){const i=e,n=i(t);return"function"==typeof n?n:()=>{i(null)}}return e.current=t,()=>{e.current=null}});return()=>{i.forEach(e=>e?.())}},e);return n.useMemo(()=>e.every(e=>null==e)?null:e=>{t.current&&(t.current(),t.current=void 0),null!=e&&(t.current=i(e))},e)};var n=function(e,t){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var i=s(t);if(i&&i.has(e))return i.get(e);var n={__proto__:null},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if("default"!==o&&{}.hasOwnProperty.call(e,o)){var a=r?Object.getOwnPropertyDescriptor(e,o):null;a&&(a.get||a.set)?Object.defineProperty(n,o,a):n[o]=e[o]}return n.default=e,i&&i.set(e,n),n}(i(22155));function s(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,i=new WeakMap;return(s=function(e){return e?i:t})(e)}},50901(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.useId=function(e,t){if(void 0!==o){const i=o();return e??(t?`${t}-${i}`:i)}return function(e,t="mui"){const[i,s]=n.useState(e),o=e||i;return n.useEffect(()=>{null==i&&(r+=1,s(`${t}-${r}`))},[i,t]),o}(e,t)};var n=function(e,t){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var i=s(t);if(i&&i.has(e))return i.get(e);var n={__proto__:null},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if("default"!==o&&{}.hasOwnProperty.call(e,o)){var a=r?Object.getOwnPropertyDescriptor(e,o):null;a&&(a.get||a.set)?Object.defineProperty(n,o,a):n[o]=e[o]}return n.default=e,i&&i.set(e,n),n}(i(22155));function s(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,i=new WeakMap;return(s=function(e){return e?i:t})(e)}let r=0;const o={...n}.useId},12618(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.useLatestRef=function(e){const t=n.useRef(e);return(0,s.useEnhancedEffect)(()=>{t.current=e}),t};var n=function(e,t){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var i=r(t);if(i&&i.has(e))return i.get(e);var n={__proto__:null},s=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if("default"!==o&&{}.hasOwnProperty.call(e,o)){var a=s?Object.getOwnPropertyDescriptor(e,o):null;a&&(a.get||a.set)?Object.defineProperty(n,o,a):n[o]=e[o]}return n.default=e,i&&i.set(e,n),n}(i(22155)),s=i(56371);function r(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,i=new WeakMap;return(r=function(e){return e?i:t})(e)}},65635(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.useOpenChangeComplete=function(e){const{enabled:t=!0,open:i,ref:a,onComplete:l}=e,c=(0,o.useLatestRef)(i),h=(0,r.useEventCallback)(l),d=(0,s.useAnimationsFinished)(a,i);n.useEffect(()=>{t&&d(()=>{i===c.current&&h()})},[t,i,h,d,c])};var n=function(e,t){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var i=a(t);if(i&&i.has(e))return i.get(e);var n={__proto__:null},s=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var r in e)if("default"!==r&&{}.hasOwnProperty.call(e,r)){var o=s?Object.getOwnPropertyDescriptor(e,r):null;o&&(o.get||o.set)?Object.defineProperty(n,r,o):n[r]=e[r]}return n.default=e,i&&i.set(e,n),n}(i(22155)),s=i(6029),r=i(37041),o=i(12618);function a(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,i=new WeakMap;return(a=function(e){return e?i:t})(e)}},30626(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.useOpenInteractionType=function(e){const[t,i]=n.useState(null);e||null===t||i(null);const r=n.useCallback((t,n)=>{e||i(n)},[e,i]),{onClick:o,onPointerDown:a}=(0,s.useEnhancedClickHandler)(r);return n.useMemo(()=>({openMethod:t,triggerProps:{onClick:o,onPointerDown:a}}),[t,o,a])};var n=function(e,t){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var i=r(t);if(i&&i.has(e))return i.get(e);var n={__proto__:null},s=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if("default"!==o&&{}.hasOwnProperty.call(e,o)){var a=s?Object.getOwnPropertyDescriptor(e,o):null;a&&(a.get||a.set)?Object.defineProperty(n,o,a):n[o]=e[o]}return n.default=e,i&&i.set(e,n),n}(i(22155)),s=i(24842);function r(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,i=new WeakMap;return(r=function(e){return e?i:t})(e)}},13214(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.useRenderElement=function(e,t,i={}){const{className:h,render:u}=t,{propGetter:p=e=>e,state:g=d,ref:f,props:m,customStyleHookMapping:v,styleHooks:y=!0}=i,C=u||("string"==typeof e?(w=e,function(e){return"button"===w?(0,c.jsx)("button",{type:"button",...e}):"img"===w?(0,c.jsx)("img",{alt:"",...e}):(0,c.jsx)(w,{...e})}):e),b=(0,r.resolveClassName)(h,g),S=p({...n.useMemo(()=>y?(0,s.getStyleHookProps)(g,v):d,[g,v,y]),...Array.isArray(m)?(0,l.mergeProps)(...m):m});var w;let x=[];void 0!==f&&(x=Array.isArray(f)?f:[f]);const E={...S,ref:(0,a.useRenderPropForkRef)(C,S.ref,...x)};return void 0!==b&&(E.className=b),()=>(0,o.evaluateRenderProp)(C,E,g)};var n=function(e,t){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var i=h(t);if(i&&i.has(e))return i.get(e);var n={__proto__:null},s=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var r in e)if("default"!==r&&{}.hasOwnProperty.call(e,r)){var o=s?Object.getOwnPropertyDescriptor(e,r):null;o&&(o.get||o.set)?Object.defineProperty(n,r,o):n[r]=e[r]}return n.default=e,i&&i.set(e,n),n}(i(22155)),s=i(87935),r=i(74184),o=i(38454),a=i(58064),l=i(80725),c=i(65723);function h(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,i=new WeakMap;return(h=function(e){return e?i:t})(e)}const d={}},58064(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.useRenderPropForkRef=function(e,...t){let i;return i="function"!=typeof e?(0,s.isReactVersionAtLeast)(19)?e.props.ref:e.ref:null,(0,n.useForkRef)(i,...t)};var n=i(74467),s=i(49958)},46489(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.useRootElementName=function(e){const{rootElementName:t=""}=e,[i,s]=n.useState(t.toUpperCase());return{rootElementName:i,updateRootElementName:n.useCallback(e=>{s(e?.tagName??"")},[])}};var n=function(e,t){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var i=s(t);if(i&&i.has(e))return i.get(e);var n={__proto__:null},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if("default"!==o&&{}.hasOwnProperty.call(e,o)){var a=r?Object.getOwnPropertyDescriptor(e,o):null;a&&(a.get||a.set)?Object.defineProperty(n,o,a):n[o]=e[o]}return n.default=e,i&&i.set(e,n),n}(i(22155));function s(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,i=new WeakMap;return(s=function(e){return e?i:t})(e)}i(56371),i(6543)},22130(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getPreventScrollCount=function(){return u},t.useScrollLock=function(e){const{enabled:t=!0,mounted:i,open:l,referenceElement:g}=e,f=n.useMemo(()=>t&&((0,r.isIOS)()||!("undefined"!=typeof CSS&&"function"==typeof CSS.supports&&CSS.supports("height","1dvh"))||(0,r.isFirefox)()&&!function(e){if("undefined"==typeof document)return!1;const t=(0,o.ownerDocument)(e);return(0,o.ownerWindow)(t).innerWidth-t.documentElement.clientWidth>0}(g)),[t,g]);(0,a.useEnhancedEffect)(()=>{if(i&&!l&&(0,r.isWebKit)()){const e=(0,o.ownerDocument)(g),t=e.body.style.userSelect,i=e.body.style.webkitUserSelect;return e.body.style.userSelect="none",e.body.style.webkitUserSelect="none",()=>{e.body.style.userSelect=t,e.body.style.webkitUserSelect=i}}},[i,l,g]),(0,s.usePreventScroll)({isDisabled:!f}),(0,a.useEnhancedEffect)(()=>{if(t&&!f)return u+=1,1===u&&(p=function(e){const t=(0,o.ownerDocument)(e),i=t.documentElement,n=t.body,s=(0,o.ownerWindow)(i);let a=0,l=0,u=-1;if((0,r.isWebKit)()&&1!==(s.visualViewport?.scale??1))return()=>{};function p(){const e=s.getComputedStyle(i),t=s.getComputedStyle(n);a=i.scrollTop,l=i.scrollLeft,c={overflowY:i.style.overflowY,overflowX:i.style.overflowX},d=i.style.scrollBehavior,h={position:n.style.position,height:n.style.height,width:n.style.width,boxSizing:n.style.boxSizing,overflowY:n.style.overflowY,overflowX:n.style.overflowX,scrollBehavior:n.style.scrollBehavior};const r=e.scrollbarGutter?.includes("stable"),o=i.scrollHeight>i.clientHeight,u=i.scrollWidth>i.clientWidth,p="scroll"===e.overflowY||"scroll"===t.overflowY,g="scroll"===e.overflowX||"scroll"===t.overflowX,f=Math.max(0,s.innerWidth-i.clientWidth),m=Math.max(0,s.innerHeight-i.clientHeight);Object.assign(i.style,{overflowY:r||!o&&!p?"hidden":"scroll",overflowX:r||!u&&!g?"hidden":"scroll"});const v=parseFloat(t.marginTop)+parseFloat(t.marginBottom),y=parseFloat(t.marginLeft)+parseFloat(t.marginRight);Object.assign(n.style,{position:"relative",height:v||m?`calc(100dvh - ${v+m}px)`:"100dvh",width:y||f?`calc(100vw - ${y+f}px)`:"100vw",boxSizing:"border-box",overflow:"hidden",scrollBehavior:"unset"}),n.scrollTop=a,n.scrollLeft=l,i.setAttribute("data-base-ui-scroll-locked",""),i.style.scrollBehavior="unset"}function g(){Object.assign(i.style,c),Object.assign(n.style,h),i.scrollTop=a,i.scrollLeft=l,i.removeAttribute("data-base-ui-scroll-locked"),i.style.scrollBehavior=d}function f(){g(),cancelAnimationFrame(u),u=requestAnimationFrame(p)}return p(),s.addEventListener("resize",f),()=>{cancelAnimationFrame(u),g(),s.removeEventListener("resize",f)}}(g)),()=>{u-=1,0===u&&p()}},[t,f,g])};var n=function(e,t){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var i=l(t);if(i&&i.has(e))return i.get(e);var n={__proto__:null},s=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var r in e)if("default"!==r&&{}.hasOwnProperty.call(e,r)){var o=s?Object.getOwnPropertyDescriptor(e,r):null;o&&(o.get||o.set)?Object.defineProperty(n,r,o):n[r]=e[r]}return n.default=e,i&&i.set(e,n),n}(i(22155)),s=i(2531),r=i(71922),o=i(68736),a=i(56371);function l(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,i=new WeakMap;return(l=function(e){return e?i:t})(e)}let c={},h={},d="",u=0,p=()=>{}},30973(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.useTransitionStatus=function(e){const[t,i]=n.useState(e?"idle":void 0),[r,o]=n.useState(e);return e&&!r&&(o(!0),i("starting")),!e&&r&&"ending"!==t&&i("ending"),e||r||"ending"!==t||i(void 0),(0,s.useEnhancedEffect)(()=>{if(!e)return;e&&r&&"idle"!==t&&i("starting");const n=requestAnimationFrame(()=>{i("idle")});return()=>{cancelAnimationFrame(n)}},[e,r,i,t]),n.useMemo(()=>({mounted:r,setMounted:o,transitionStatus:t}),[r,t])};var n=function(e,t){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var i=r(t);if(i&&i.has(e))return i.get(e);var n={__proto__:null},s=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if("default"!==o&&{}.hasOwnProperty.call(e,o)){var a=s?Object.getOwnPropertyDescriptor(e,o):null;a&&(a.get||a.set)?Object.defineProperty(n,o,a):n[o]=e[o]}return n.default=e,i&&i.set(e,n),n}(i(22155)),s=i(56371);function r(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,i=new WeakMap;return(r=function(e){return e?i:t})(e)}},21932(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.visuallyHidden=void 0,t.visuallyHidden={clip:"rect(0 0 0 0)",overflow:"hidden",whiteSpace:"nowrap",position:"fixed",top:0,left:0,border:0,padding:0,width:1,height:1,margin:-1}},6543(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.warn=function(...e){}},64379(e,t,i){"use strict";var n=i(7274),s="undefined"==typeof globalThis?i.g:globalThis;e.exports=function(){for(var e=[],t=0;t<n.length;t++)"function"==typeof s[n[t]]&&(e[e.length]=n[t]);return e}},30395(e,t){var i;!function(){"use strict";var n={}.hasOwnProperty;function s(){for(var e="",t=0;t<arguments.length;t++){var i=arguments[t];i&&(e=o(e,r(i)))}return e}function r(e){if("string"==typeof e||"number"==typeof e)return e;if("object"!=typeof e)return"";if(Array.isArray(e))return s.apply(null,e);if(e.toString!==Object.prototype.toString&&!e.toString.toString().includes("[native code]"))return e.toString();var t="";for(var i in e)n.call(e,i)&&e[i]&&(t=o(t,i));return t}function o(e,t){return t?e?e+" "+t:e+t:e}e.exports?(s.default=s,e.exports=s):void 0===(i=function(){return s}.apply(t,[]))||(e.exports=i)}()},30622(e,t,i){"use strict";i.d(t,{k:()=>m});var n=i(65959),s=i(81987),r=i(51759),o=i(19360),a=i(48555),l=i(47812),c=i(45902),h=i(78027),d=i(27231),u=i(47372),p=i(131),g=i(13062),f=i(30301),m=function(){function e(){this.assumeImmutableResults=!1,this.getFragmentDoc=(0,s.LV)(a.ct,{max:o.v["cache.fragmentQueryDocuments"]||1e3,cache:h.l})}return e.prototype.lookupFragment=function(e){return null},e.prototype.batch=function(e){var t,i=this,n="string"==typeof e.optimistic?e.optimistic:!1===e.optimistic?null:void 0;return this.performTransaction(function(){return t=e.update(i)},n),t},e.prototype.recordOptimisticTransaction=function(e,t){this.performTransaction(e,t)},e.prototype.transformDocument=function(e){return e},e.prototype.transformForLink=function(e){return e},e.prototype.identify=function(e){},e.prototype.gc=function(){return[]},e.prototype.modify=function(e){return!1},e.prototype.readQuery=function(e,t){var i=this;return void 0===t&&(t=!!e.optimistic),!1!==globalThis.__DEV__&&(0,f.cc)(e,"canonizeResults","cache.readQuery"),(0,f.lz)("canonizeResults",function(){return i.read((0,n.__assign)((0,n.__assign)({},e),{rootId:e.id||"ROOT_QUERY",optimistic:t}))})},e.prototype.watchFragment=function(e){var t=this,i=e.fragment,s=e.fragmentName,o=e.from,a=e.optimistic,h=void 0===a||a,d=(0,n.__rest)(e,["fragment","fragmentName","from","optimistic"]),f=this.getFragmentDoc(i,s),m=void 0===o||"string"==typeof o?o:this.identify(o),v=!!e[Symbol.for("apollo.dataMasking")];if(!1!==globalThis.__DEV__){var y=s||(0,l.E4)(i).name.value;m||!1!==globalThis.__DEV__&&p.V1.warn(1,y)}var C,b=(0,n.__assign)((0,n.__assign)({},d),{returnPartialData:!0,id:m,query:f,optimistic:h});return new r.c(function(r){return t.watch((0,n.__assign)((0,n.__assign)({},b),{immediate:!0,callback:function(o){var a=v?(0,g.z)(o.result,i,t,s):o.result;if(!C||!(0,u.a)(f,{data:C.result},{data:a},e.variables)){var l={data:a,complete:!!o.complete};o.missing&&(l.missing=(0,c.IM)(o.missing.map(function(e){return e.missing}))),C=(0,n.__assign)((0,n.__assign)({},o),{result:a}),r.next(l)}}}))})},e.prototype.readFragment=function(e,t){var i=this;return void 0===t&&(t=!!e.optimistic),!1!==globalThis.__DEV__&&(0,f.cc)(e,"canonizeResults","cache.readFragment"),(0,f.lz)("canonizeResults",function(){return i.read((0,n.__assign)((0,n.__assign)({},e),{query:i.getFragmentDoc(e.fragment,e.fragmentName),rootId:e.id,optimistic:t}))})},e.prototype.writeQuery=function(e){var t=e.id,i=e.data,s=(0,n.__rest)(e,["id","data"]);return this.write(Object.assign(s,{dataId:t||"ROOT_QUERY",result:i}))},e.prototype.writeFragment=function(e){var t=e.id,i=e.data,s=e.fragment,r=e.fragmentName,o=(0,n.__rest)(e,["id","data","fragment","fragmentName"]);return this.write(Object.assign(o,{query:this.getFragmentDoc(s,r),dataId:t,result:i}))},e.prototype.updateQuery=function(e,t){return!1!==globalThis.__DEV__&&(0,f.cc)(e,"canonizeResults","cache.updateQuery"),this.batch({update:function(i){var s=(0,f.lz)("canonizeResults",function(){return i.readQuery(e)}),r=t(s);return null==r?s:(i.writeQuery((0,n.__assign)((0,n.__assign)({},e),{data:r})),r)}})},e.prototype.updateFragment=function(e,t){return!1!==globalThis.__DEV__&&(0,f.cc)(e,"canonizeResults","cache.updateFragment"),this.batch({update:function(i){var s=(0,f.lz)("canonizeResults",function(){return i.readFragment(e)}),r=t(s);return null==r?s:(i.writeFragment((0,n.__assign)((0,n.__assign)({},e),{data:r})),r)}})},e}();!1!==globalThis.__DEV__&&(m.prototype.getMemoryInternals=d.tQ)},79193(e,t,i){"use strict";i.d(t,{Z:()=>s});var n=i(65959),s=function(e){function t(i,n,s,r){var o,a=e.call(this,i)||this;if(a.message=i,a.path=n,a.query=s,a.variables=r,Array.isArray(a.path)){a.missing=a.message;for(var l=a.path.length-1;l>=0;--l)a.missing=((o={})[a.path[l]]=a.missing,o)}else a.missing=a.path;return a.__proto__=t.prototype,a}return(0,n.__extends)(t,e),t}(Error)},47422(e,t,i){"use strict";i.d(t,{$3:()=>d,I6:()=>f,T9:()=>b,Ui:()=>v,Xx:()=>m,d1:()=>S,gk:()=>y,iJ:()=>C,lq:()=>x,mv:()=>w,or:()=>p});var n=i(14270),s=i(48555),r=i(47812),o=i(99310),a=i(45902),l=i(79e3),c=i(1164),h=i(58173),d=Object.prototype.hasOwnProperty;function u(e){return null==e}function p(e,t){var i=e.__typename,n=e.id,s=e._id;if("string"==typeof i&&(t&&(t.keyObject=u(n)?u(s)?void 0:{_id:s}:{id:n}),u(n)&&!u(s)&&(n=s),!u(n)))return"".concat(i,":").concat("number"==typeof n||"string"==typeof n?n:JSON.stringify(n))}var g={dataIdFromObject:p,addTypename:!0,resultCaching:!0,canonizeResults:!1};function f(e){return(0,h.o)(g,e)}function m(e){var t=e.canonizeResults;return void 0===t?g.canonizeResults:t}function v(e,t){return(0,o.A_)(t)?e.get(t.__ref,"__typename"):t&&t.__typename}var y=/^[_a-z][_0-9a-z]*/i;function C(e){var t=e.match(y);return t?t[0]:e}function b(e,t,i){return!!(0,c.U)(t)&&((0,l.c)(t)?t.every(function(t){return b(e,t,i)}):e.selections.every(function(e){if((0,o.dt)(e)&&(0,n.MS)(e,i)){var s=(0,o.ue)(e);return d.call(t,s)&&(!e.selectionSet||b(e.selectionSet,t[s],i))}return!0}))}function S(e){return(0,c.U)(e)&&!(0,o.A_)(e)&&!(0,l.c)(e)}function w(){return new a.ZI}function x(e,t){var i=(0,s.JG)((0,r.zK)(e));return{fragmentMap:i,lookupFragment:function(e){var n=i[e];return!n&&t&&(n=t.lookup(e)),n||null}}}},70415(e,t,i){"use strict";i.d(t,{D:()=>be});var n=i(65959),s=i(131),r=i(81987),o=i(45063),a=i(30622),l=i(79193),c=i(78917),h=i(83906),d=i(19360),u=i(26497),p=i(33137),g=i(99310),f=i(49270),m=i(97703),v=i(58173),y=i(47812),C=i(45902),b=i(14270),S=i(48555),w=i(12209),x=i(1164),E=i(69796),M=i(47422),A=Object.create(null),T=function(){return A},D=Object.create(null),I=function(){function e(e,t){var i=this;this.policies=e,this.group=t,this.data=Object.create(null),this.rootIds=Object.create(null),this.refs=Object.create(null),this.getFieldValue=function(e,t){return(0,w.G)((0,g.A_)(e)?i.get(e.__ref,t):e&&e[t])},this.canRead=function(e){return(0,g.A_)(e)?i.has(e.__ref):"object"==typeof e},this.toReference=function(e,t){if("string"==typeof e)return(0,g.WU)(e);if((0,g.A_)(e))return e;var n=i.policies.identify(e)[0];if(n){var s=(0,g.WU)(n);return t&&i.merge(n,e),s}}}return e.prototype.toObject=function(){return(0,n.__assign)({},this.data)},e.prototype.has=function(e){return void 0!==this.lookup(e,!0)},e.prototype.get=function(e,t){if(this.group.depend(e,t),M.$3.call(this.data,e)){var i=this.data[e];if(i&&M.$3.call(i,t))return i[t]}return"__typename"===t&&M.$3.call(this.policies.rootTypenamesById,e)?this.policies.rootTypenamesById[e]:this instanceof P?this.parent.get(e,t):void 0},e.prototype.lookup=function(e,t){return t&&this.group.depend(e,"__exists"),M.$3.call(this.data,e)?this.data[e]:this instanceof P?this.parent.lookup(e,t):this.policies.rootTypenamesById[e]?Object.create(null):void 0},e.prototype.merge=function(e,t){var i,n=this;(0,g.A_)(e)&&(e=e.__ref),(0,g.A_)(t)&&(t=t.__ref);var r="string"==typeof e?this.lookup(i=e):e,o="string"==typeof t?this.lookup(i=t):t;if(o){(0,s.V1)("string"==typeof i,2);var a=new C.ZI(O).merge(r,o);if(this.data[i]=a,a!==r&&(delete this.refs[i],this.group.caching)){var l=Object.create(null);r||(l.__exists=1),Object.keys(o).forEach(function(e){if(!r||r[e]!==a[e]){l[e]=1;var t=(0,M.iJ)(e);t===e||n.policies.hasKeyArgs(a.__typename,t)||(l[t]=1),void 0!==a[e]||n instanceof P||delete a[e]}}),!l.__typename||r&&r.__typename||this.policies.rootTypenamesById[i]!==a.__typename||delete l.__typename,Object.keys(l).forEach(function(e){return n.group.dirty(i,e)})}}},e.prototype.modify=function(e,t){var i=this,r=this.lookup(e);if(r){var o=Object.create(null),a=!1,l=!0,c={DELETE:A,INVALIDATE:D,isReference:g.A_,toReference:this.toReference,canRead:this.canRead,readField:function(t,n){return i.policies.readField("string"==typeof t?{fieldName:t,from:n||(0,g.WU)(e)}:t,{store:i})}};if(Object.keys(r).forEach(function(h){var d=(0,M.iJ)(h),u=r[h];if(void 0!==u){var p="function"==typeof t?t:t[h]||t[d];if(p){var f=p===T?A:p((0,w.G)(u),(0,n.__assign)((0,n.__assign)({},c),{fieldName:d,storeFieldName:h,storage:i.getStorage(e,h)}));if(f===D)i.group.dirty(e,h);else if(f===A&&(f=void 0),f!==u&&(o[h]=f,a=!0,u=f,!1!==globalThis.__DEV__)){var m=function(e){if(void 0===i.lookup(e.__ref))return!1!==globalThis.__DEV__&&s.V1.warn(3,e),!0};if((0,g.A_)(f))m(f);else if(Array.isArray(f))for(var v=!1,y=void 0,C=0,b=f;C<b.length;C++){var S=b[C];if((0,g.A_)(S)){if(v=!0,m(S))break}else"object"==typeof S&&S&&i.policies.identify(S)[0]&&(y=S);if(v&&void 0!==y){!1!==globalThis.__DEV__&&s.V1.warn(4,y);break}}}}void 0!==u&&(l=!1)}}),a)return this.merge(e,o),l&&(this instanceof P?this.data[e]=void 0:delete this.data[e],this.group.dirty(e,"__exists")),!0}return!1},e.prototype.delete=function(e,t,i){var n,s=this.lookup(e);if(s){var r=this.getFieldValue(s,"__typename"),o=t&&i?this.policies.getStoreFieldName({typename:r,fieldName:t,args:i}):t;return this.modify(e,o?((n={})[o]=T,n):T)}return!1},e.prototype.evict=function(e,t){var i=!1;return e.id&&(M.$3.call(this.data,e.id)&&(i=this.delete(e.id,e.fieldName,e.args)),this instanceof P&&this!==t&&(i=this.parent.evict(e,t)||i),(e.fieldName||i)&&this.group.dirty(e.id,e.fieldName||"__exists")),i},e.prototype.clear=function(){this.replace(null)},e.prototype.extract=function(){var e=this,t=this.toObject(),i=[];return this.getRootIdSet().forEach(function(t){M.$3.call(e.policies.rootTypenamesById,t)||i.push(t)}),i.length&&(t.__META={extraRootIds:i.sort()}),t},e.prototype.replace=function(e){var t=this;if(Object.keys(this.data).forEach(function(i){e&&M.$3.call(e,i)||t.delete(i)}),e){var i=e.__META,s=(0,n.__rest)(e,["__META"]);Object.keys(s).forEach(function(e){t.merge(e,s[e])}),i&&i.extraRootIds.forEach(this.retain,this)}},e.prototype.retain=function(e){return this.rootIds[e]=(this.rootIds[e]||0)+1},e.prototype.release=function(e){if(this.rootIds[e]>0){var t=--this.rootIds[e];return t||delete this.rootIds[e],t}return 0},e.prototype.getRootIdSet=function(e){return void 0===e&&(e=new Set),Object.keys(this.rootIds).forEach(e.add,e),this instanceof P?this.parent.getRootIdSet(e):Object.keys(this.policies.rootTypenamesById).forEach(e.add,e),e},e.prototype.gc=function(){var e=this,t=this.getRootIdSet(),i=this.toObject();t.forEach(function(n){M.$3.call(i,n)&&(Object.keys(e.findChildRefIds(n)).forEach(t.add,t),delete i[n])});var n=Object.keys(i);if(n.length){for(var s=this;s instanceof P;)s=s.parent;n.forEach(function(e){return s.delete(e)})}return n},e.prototype.findChildRefIds=function(e){if(!M.$3.call(this.refs,e)){var t=this.refs[e]=Object.create(null),i=this.data[e];if(!i)return t;var n=new Set([i]);n.forEach(function(e){(0,g.A_)(e)&&(t[e.__ref]=!0),(0,x.U)(e)&&Object.keys(e).forEach(function(t){var i=e[t];(0,x.U)(i)&&n.add(i)})})}return this.refs[e]},e.prototype.makeCacheKey=function(){return this.group.keyMaker.lookupArray(arguments)},e}(),R=function(){function e(e,t){void 0===t&&(t=null),this.caching=e,this.parent=t,this.d=null,this.resetCaching()}return e.prototype.resetCaching=function(){this.d=this.caching?(0,r.yN)():null,this.keyMaker=new E.b(m.et)},e.prototype.depend=function(e,t){if(this.d){this.d(L(e,t));var i=(0,M.iJ)(t);i!==t&&this.d(L(e,i)),this.parent&&this.parent.depend(e,t)}},e.prototype.dirty=function(e,t){this.d&&this.d.dirty(L(e,t),"__exists"===t?"forget":"setDirty")},e}();function L(e,t){return t+"#"+e}function k(e,t){_(e)&&e.group.depend(t,"__exists")}!function(e){var t=function(e){function t(t){var i=t.policies,n=t.resultCaching,s=void 0===n||n,r=t.seed,o=e.call(this,i,new R(s))||this;return o.stump=new N(o),o.storageTrie=new E.b(m.et),r&&o.replace(r),o}return(0,n.__extends)(t,e),t.prototype.addLayer=function(e,t){return this.stump.addLayer(e,t)},t.prototype.removeLayer=function(){return this},t.prototype.getStorage=function(){return this.storageTrie.lookupArray(arguments)},t}(e);e.Root=t}(I||(I={}));var P=function(e){function t(t,i,n,s){var r=e.call(this,i.policies,s)||this;return r.id=t,r.parent=i,r.replay=n,r.group=s,n(r),r}return(0,n.__extends)(t,e),t.prototype.addLayer=function(e,i){return new t(e,this,i,this.group)},t.prototype.removeLayer=function(e){var t=this,i=this.parent.removeLayer(e);return e===this.id?(this.group.caching&&Object.keys(this.data).forEach(function(e){var n=t.data[e],s=i.lookup(e);s?n?n!==s&&Object.keys(n).forEach(function(i){(0,o.L)(n[i],s[i])||t.group.dirty(e,i)}):(t.group.dirty(e,"__exists"),Object.keys(s).forEach(function(i){t.group.dirty(e,i)})):t.delete(e)}),i):i===this.parent?this:i.addLayer(this.id,this.replay)},t.prototype.toObject=function(){return(0,n.__assign)((0,n.__assign)({},this.parent.toObject()),this.data)},t.prototype.findChildRefIds=function(t){var i=this.parent.findChildRefIds(t);return M.$3.call(this.data,t)?(0,n.__assign)((0,n.__assign)({},i),e.prototype.findChildRefIds.call(this,t)):i},t.prototype.getStorage=function(){for(var e=this.parent;e.parent;)e=e.parent;return e.getStorage.apply(e,arguments)},t}(I),N=function(e){function t(t){return e.call(this,"EntityStore.Stump",t,function(){},new R(t.group.caching,t.group))||this}return(0,n.__extends)(t,e),t.prototype.removeLayer=function(){return this},t.prototype.merge=function(e,t){return this.parent.merge(e,t)},t}(P);function O(e,t,i){var n=e[i],s=t[i];return(0,o.L)(n,s)?n:s}function _(e){return!!(e instanceof I&&e.group.caching)}var F=i(79e3),G=function(){function e(){this.known=new(m.En?WeakSet:Set),this.pool=new E.b(m.et),this.passes=new WeakMap,this.keysByJSON=new Map,this.empty=this.admit({})}return e.prototype.isKnown=function(e){return(0,x.U)(e)&&this.known.has(e)},e.prototype.pass=function(e){if((0,x.U)(e)){var t=function(e){return(0,x.U)(e)?(0,F.c)(e)?e.slice(0):(0,n.__assign)({__proto__:Object.getPrototypeOf(e)},e):e}(e);return this.passes.set(t,e),t}return e},e.prototype.admit=function(e){var t=this;if((0,x.U)(e)){var i=this.passes.get(e);if(i)return i;switch(Object.getPrototypeOf(e)){case Array.prototype:if(this.known.has(e))return e;var n=e.map(this.admit,this);return(a=this.pool.lookupArray(n)).array||(this.known.add(a.array=n),!1!==globalThis.__DEV__&&Object.freeze(n)),a.array;case null:case Object.prototype:if(this.known.has(e))return e;var s=Object.getPrototypeOf(e),r=[s],o=this.sortedKeys(e);r.push(o.json);var a,l=r.length;if(o.sorted.forEach(function(i){r.push(t.admit(e[i]))}),!(a=this.pool.lookupArray(r)).object){var c=a.object=Object.create(s);this.known.add(c),o.sorted.forEach(function(e,t){c[e]=r[l+t]}),!1!==globalThis.__DEV__&&Object.freeze(c)}return a.object}}return e},e.prototype.sortedKeys=function(e){var t=Object.keys(e),i=this.pool.lookupArray(t);if(!i.keys){t.sort();var n=JSON.stringify(t);(i.keys=this.keysByJSON.get(n))||this.keysByJSON.set(n,i.keys={sorted:t,json:n})}return i.keys},e}();function V(e){return[e.selectionSet,e.objectOrReference,e.context,e.context.canonizeResults]}var B=function(){function e(e){var t=this;this.knownResults=new(m.et?WeakMap:Map),this.config=(0,v.o)(e,{addTypename:!1!==e.addTypename,canonizeResults:(0,M.Xx)(e)}),this.canon=e.canon||new G,this.executeSelectionSet=(0,r.LV)(function(e){var i,s=e.context.canonizeResults,r=V(e);r[3]=!s;var o=(i=t.executeSelectionSet).peek.apply(i,r);return o?s?(0,n.__assign)((0,n.__assign)({},o),{result:t.canon.admit(o.result)}):o:(k(e.context.store,e.enclosingRef.__ref),t.execSelectionSetImpl(e))},{max:this.config.resultCacheMaxSize||d.v["inMemoryCache.executeSelectionSet"]||5e4,keyArgs:V,makeCacheKey:function(e,t,i,n){if(_(i.store))return i.store.makeCacheKey(e,(0,g.A_)(t)?t.__ref:t,i.varString,n)}}),this.executeSubSelectedArray=(0,r.LV)(function(e){return k(e.context.store,e.enclosingRef.__ref),t.execSubSelectedArrayImpl(e)},{max:this.config.resultCacheMaxSize||d.v["inMemoryCache.executeSubSelectedArray"]||1e4,makeCacheKey:function(e){var t=e.field,i=e.array,n=e.context;if(_(n.store))return n.store.makeCacheKey(t,i,n.varString)}})}return e.prototype.resetCanon=function(){this.canon=new G},e.prototype.diffQueryAgainstStore=function(e){var t=e.store,i=e.query,s=e.rootId,r=void 0===s?"ROOT_QUERY":s,o=e.variables,a=e.returnPartialData,c=void 0===a||a,h=e.canonizeResults,d=void 0===h?this.config.canonizeResults:h,p=this.config.cache.policies;o=(0,n.__assign)((0,n.__assign)({},(0,y.wY)((0,y.AT)(i))),o);var f,m=(0,g.WU)(r),v=this.executeSelectionSet({selectionSet:(0,y.Vn)(i).selectionSet,objectOrReference:m,enclosingRef:m,context:(0,n.__assign)({store:t,query:i,policies:p,variables:o,varString:(0,u.M)(o),canonizeResults:d},(0,M.lq)(i,this.config.fragments))});if(v.missing&&(f=[new l.Z(H(v.missing),v.missing,i,o)],!c))throw f[0];return{result:v.result,complete:!f,missing:f}},e.prototype.isFresh=function(e,t,i,n){if(_(n.store)&&this.knownResults.get(e)===i){var s=this.executeSelectionSet.peek(i,t,n,this.canon.isKnown(e));if(s&&e===s.result)return!0}return!1},e.prototype.execSelectionSetImpl=function(e){var t=this,i=e.selectionSet,n=e.objectOrReference,r=e.enclosingRef,o=e.context;if((0,g.A_)(n)&&!o.policies.rootTypenamesById[n.__ref]&&!o.store.has(n.__ref))return{result:this.canon.empty,missing:"Dangling reference to missing ".concat(n.__ref," object")};var a,l=o.variables,c=o.policies,d=o.store.getFieldValue(n,"__typename"),u=[],p=new C.ZI;function m(e,t){var i;return e.missing&&(a=p.merge(a,((i={})[t]=e.missing,i))),e.result}this.config.addTypename&&"string"==typeof d&&!c.rootIdsByTypename[d]&&u.push({__typename:d});var v=new Set(i.selections);v.forEach(function(e){var i,y;if((0,b.MS)(e,l))if((0,g.dt)(e)){var C=c.readField({fieldName:e.name.value,field:e,variables:o.variables,from:n},o),w=(0,g.ue)(e);void 0===C?h.XY.added(e)||(a=p.merge(a,((i={})[w]="Can't find field '".concat(e.name.value,"' on ").concat((0,g.A_)(n)?n.__ref+" object":"object "+JSON.stringify(n,null,2)),i))):(0,F.c)(C)?C.length>0&&(C=m(t.executeSubSelectedArray({field:e,array:C,enclosingRef:r,context:o}),w)):e.selectionSet?null!=C&&(C=m(t.executeSelectionSet({selectionSet:e.selectionSet,objectOrReference:C,enclosingRef:(0,g.A_)(C)?C:r,context:o}),w)):o.canonizeResults&&(C=t.canon.pass(C)),void 0!==C&&u.push(((y={})[w]=C,y))}else{var x=(0,S.HQ)(e,o.lookupFragment);if(!x&&e.kind===f.b.FRAGMENT_SPREAD)throw(0,s.vA)(10,e.name.value);x&&c.fragmentMatches(x,d)&&x.selectionSet.selections.forEach(v.add,v)}});var y={result:(0,C.IM)(u),missing:a},x=o.canonizeResults?this.canon.admit(y):(0,w.G)(y);return x.result&&this.knownResults.set(x.result,i),x},e.prototype.execSubSelectedArrayImpl=function(e){var t,i=this,n=e.field,r=e.array,o=e.enclosingRef,a=e.context,l=new C.ZI;function c(e,i){var n;return e.missing&&(t=l.merge(t,((n={})[i]=e.missing,n))),e.result}return n.selectionSet&&(r=r.filter(a.store.canRead)),r=r.map(function(e,t){return null===e?null:(0,F.c)(e)?c(i.executeSubSelectedArray({field:n,array:e,enclosingRef:o,context:a}),t):n.selectionSet?c(i.executeSelectionSet({selectionSet:n.selectionSet,objectOrReference:e,enclosingRef:(0,g.A_)(e)?e:o,context:a}),t):(!1!==globalThis.__DEV__&&function(e,t,i){if(!t.selectionSet){var n=new Set([i]);n.forEach(function(i){(0,x.U)(i)&&((0,s.V1)(!(0,g.A_)(i),11,(0,M.Ui)(e,i),t.name.value),Object.values(i).forEach(n.add,n))})}}(a.store,n,e),e)}),{result:a.canonizeResults?this.canon.admit(r):r,missing:t}},e}();function H(e){try{JSON.stringify(e,function(e,t){if("string"==typeof t)throw t;return t})}catch(e){return e}}var z=i(37563),U=i(48670),W=i(67566),j=Object.create(null);function K(e){var t=JSON.stringify(e);return j[t]||(j[t]=Object.create(null))}function $(e){var t=K(e);return t.keyFieldsFn||(t.keyFieldsFn=function(t,i){var n=function(e,t){return i.readField(t,e)},r=i.keyObject=q(e,function(e){var r=Q(i.storeObject,e,n);return void 0===r&&t!==i.storeObject&&M.$3.call(t,e[0])&&(r=Q(t,e,Z)),(0,s.V1)(void 0!==r,5,e.join("."),t),r});return"".concat(i.typename,":").concat(JSON.stringify(r))})}function Y(e){var t=K(e);return t.keyArgsFn||(t.keyArgsFn=function(t,i){var n=i.field,s=i.variables,r=i.fieldName,o=q(e,function(e){var i=e[0],r=i.charAt(0);if("@"!==r)if("$"!==r){if(t)return Q(t,e)}else{var o=i.slice(1);if(s&&M.$3.call(s,o)){var a=e.slice(0);return a[0]=o,Q(s,a)}}else if(n&&(0,F.E)(n.directives)){var l=i.slice(1),c=n.directives.find(function(e){return e.name.value===l}),h=c&&(0,g.MB)(c,s);return h&&Q(h,e.slice(1))}}),a=JSON.stringify(o);return(t||"{}"!==a)&&(r+=":"+a),r})}function q(e,t){var i=new C.ZI;return X(e).reduce(function(e,n){var s,r=t(n);if(void 0!==r){for(var o=n.length-1;o>=0;--o)(s={})[n[o]]=r,r=s;e=i.merge(e,r)}return e},Object.create(null))}function X(e){var t=K(e);if(!t.paths){var i=t.paths=[],n=[];e.forEach(function(t,s){(0,F.c)(t)?(X(t).forEach(function(e){return i.push(n.concat(e))}),n.length=0):(n.push(t),(0,F.c)(e[s+1])||(i.push(n.slice(0)),n.length=0))})}return t.paths}function Z(e,t){return e[t]}function Q(e,t,i){return i=i||Z,J(t.reduce(function e(t,n){return(0,F.c)(t)?t.map(function(t){return e(t,n)}):t&&i(t,n)},e))}function J(e){return(0,x.U)(e)?(0,F.c)(e)?e.map(J):q(Object.keys(e).sort(),function(t){return Q(e,t)}):e}var ee=i(71637);function te(e){return void 0!==e.args?e.args:e.field?(0,g.MB)(e.field,e.variables):null}var ie=function(){},ne=function(e,t){return t.fieldName},se=function(e,t,i){return(0,i.mergeObjects)(e,t)},re=function(e,t){return t},oe=function(){function e(e){this.config=e,this.typePolicies=Object.create(null),this.toBeAdded=Object.create(null),this.supertypeMap=new Map,this.fuzzySubtypes=new Map,this.rootIdsByTypename=Object.create(null),this.rootTypenamesById=Object.create(null),this.usingPossibleTypes=!1,this.config=(0,n.__assign)({dataIdFromObject:M.or},e),this.cache=this.config.cache,this.setRootTypename("Query"),this.setRootTypename("Mutation"),this.setRootTypename("Subscription"),e.possibleTypes&&this.addPossibleTypes(e.possibleTypes),e.typePolicies&&this.addTypePolicies(e.typePolicies)}return e.prototype.identify=function(e,t){var i,s=this,r=t&&(t.typename||(null===(i=t.storeObject)||void 0===i?void 0:i.__typename))||e.__typename;if(r===this.rootTypenamesById.ROOT_QUERY)return["ROOT_QUERY"];var o,a=t&&t.storeObject||e,l=(0,n.__assign)((0,n.__assign)({},t),{typename:r,storeObject:a,readField:t&&t.readField||function(){var e=le(arguments,a);return s.readField(e,{store:s.cache.data,variables:e.variables})}}),c=r&&this.getTypePolicy(r),h=c&&c.keyFn||this.config.dataIdFromObject;return ee.yV.withValue(!0,function(){for(;h;){var t=h((0,n.__assign)((0,n.__assign)({},e),a),l);if(!(0,F.c)(t)){o=t;break}h=$(t)}}),o=o?String(o):void 0,l.keyObject?[o,l.keyObject]:[o]},e.prototype.addTypePolicies=function(e){var t=this;Object.keys(e).forEach(function(i){var s=e[i],r=s.queryType,o=s.mutationType,a=s.subscriptionType,l=(0,n.__rest)(s,["queryType","mutationType","subscriptionType"]);r&&t.setRootTypename("Query",i),o&&t.setRootTypename("Mutation",i),a&&t.setRootTypename("Subscription",i),M.$3.call(t.toBeAdded,i)?t.toBeAdded[i].push(l):t.toBeAdded[i]=[l]})},e.prototype.updateTypePolicy=function(e,t,i){var n=this.getTypePolicy(e),s=t.keyFields,r=t.fields;function o(e,t){e.merge="function"==typeof t?t:!0===t?se:!1===t?re:e.merge}o(n,t.merge),n.keyFn=!1===s?ie:(0,F.c)(s)?$(s):"function"==typeof s?s:n.keyFn,r&&Object.keys(r).forEach(function(t){var n=i[t];n&&(null==n?void 0:n.typename)===e||(n=i[t]={typename:e});var s=r[t];if("function"==typeof s)n.read=s;else{var a=s.keyArgs,l=s.read,c=s.merge;n.keyFn=!1===a?ne:(0,F.c)(a)?Y(a):"function"==typeof a?a:n.keyFn,"function"==typeof l&&(n.read=l),o(n,c)}n.read&&n.merge&&(n.keyFn=n.keyFn||ne)})},e.prototype.setRootTypename=function(e,t){void 0===t&&(t=e);var i="ROOT_"+e.toUpperCase(),n=this.rootTypenamesById[i];t!==n&&((0,s.V1)(!n||n===e,6,e),n&&delete this.rootIdsByTypename[n],this.rootIdsByTypename[t]=i,this.rootTypenamesById[i]=t)},e.prototype.addPossibleTypes=function(e){var t=this;this.usingPossibleTypes=!0,Object.keys(e).forEach(function(i){t.getSupertypeSet(i,!0),e[i].forEach(function(e){t.getSupertypeSet(e,!0).add(i);var n=e.match(M.gk);n&&n[0]===e||t.fuzzySubtypes.set(e,new RegExp(e))})})},e.prototype.getTypePolicy=function(e){var t=this;if(!M.$3.call(this.typePolicies,e)){var i=this.typePolicies[e]=Object.create(null);i.fields=Object.create(null);var s=this.supertypeMap.get(e);!s&&this.fuzzySubtypes.size&&(s=this.getSupertypeSet(e,!0),this.fuzzySubtypes.forEach(function(i,n){if(i.test(e)){var r=t.supertypeMap.get(n);r&&r.forEach(function(e){return s.add(e)})}})),s&&s.size&&s.forEach(function(e){var s=t.getTypePolicy(e),r=s.fields,o=(0,n.__rest)(s,["fields"]);Object.assign(i,o),Object.assign(i.fields,r)})}var r=this.toBeAdded[e];return r&&r.length&&r.splice(0).forEach(function(i){t.updateTypePolicy(e,i,t.typePolicies[e].fields)}),this.typePolicies[e]},e.prototype.getFieldPolicy=function(e,t){if(e)return this.getTypePolicy(e).fields[t]},e.prototype.getSupertypeSet=function(e,t){var i=this.supertypeMap.get(e);return!i&&t&&this.supertypeMap.set(e,i=new Set),i},e.prototype.fragmentMatches=function(e,t,i,n){var r=this;if(!e.typeCondition)return!0;if(!t)return!1;var o=e.typeCondition.name.value;if(t===o)return!0;if(this.usingPossibleTypes&&this.supertypeMap.has(o))for(var a=this.getSupertypeSet(t,!0),l=[a],c=function(e){var t=r.getSupertypeSet(e,!1);t&&t.size&&l.indexOf(t)<0&&l.push(t)},h=!(!i||!this.fuzzySubtypes.size),d=!1,u=0;u<l.length;++u){var p=l[u];if(p.has(o))return a.has(o)||(d&&!1!==globalThis.__DEV__&&s.V1.warn(7,t,o),a.add(o)),!0;p.forEach(c),h&&u===l.length-1&&(0,M.T9)(e.selectionSet,i,n)&&(h=!1,d=!0,this.fuzzySubtypes.forEach(function(e,i){var n=t.match(e);n&&n[0]===t&&c(i)}))}return!1},e.prototype.hasKeyArgs=function(e,t){var i=this.getFieldPolicy(e,t);return!(!i||!i.keyFn)},e.prototype.getStoreFieldName=function(e){var t,i=e.typename,n=e.fieldName,s=this.getFieldPolicy(i,n),r=s&&s.keyFn;if(r&&i)for(var o={typename:i,fieldName:n,field:e.field||null,variables:e.variables},a=te(e);r;){var l=r(a,o);if(!(0,F.c)(l)){t=l||n;break}r=Y(l)}return void 0===t&&(t=e.field?(0,g.Ii)(e.field,e.variables):(0,g.o5)(n,te(e))),!1===t?n:n===(0,M.iJ)(t)?t:n+":"+t},e.prototype.readField=function(e,t){var i=e.from;if(i&&(e.field||e.fieldName)){if(void 0===e.typename){var n=t.store.getFieldValue(i,"__typename");n&&(e.typename=n)}var s=this.getStoreFieldName(e),r=(0,M.iJ)(s),o=t.store.getFieldValue(i,s),a=this.getFieldPolicy(e.typename,r),l=a&&a.read;if(l){var c=ae(this,i,e,t,t.store.getStorage((0,g.A_)(i)?i.__ref:i,s));return W.bl.withValue(this.cache,l,[o,c])}return o}},e.prototype.getReadFunction=function(e,t){var i=this.getFieldPolicy(e,t);return i&&i.read},e.prototype.getMergeFunction=function(e,t,i){var n=this.getFieldPolicy(e,t),s=n&&n.merge;return!s&&i&&(s=(n=this.getTypePolicy(i))&&n.merge),s},e.prototype.runMergeFunction=function(e,t,i,n,s){var r=i.field,o=i.typename,a=i.merge;return a===se?ce(n.store)(e,t):a===re?t:(n.overwrite&&(e=void 0),a(e,t,ae(this,void 0,{typename:o,fieldName:r.name.value,field:r,variables:n.variables},n,s||Object.create(null))))},e}();function ae(e,t,i,n,s){var r=e.getStoreFieldName(i),o=(0,M.iJ)(r),a=i.variables||n.variables,l=n.store,c=l.toReference,h=l.canRead;return{args:te(i),field:i.field||null,fieldName:o,storeFieldName:r,variables:a,isReference:g.A_,toReference:c,storage:s,cache:e.cache,canRead:h,readField:function(){return e.readField(le(arguments,t,a),n)},mergeObjects:ce(n.store)}}function le(e,t,i){var r,o=e[0],a=e[1],l=e.length;return"string"==typeof o?r={fieldName:o,from:l>1?a:t}:(r=(0,n.__assign)({},o),M.$3.call(r,"from")||(r.from=t)),!1!==globalThis.__DEV__&&void 0===r.from&&!1!==globalThis.__DEV__&&s.V1.warn(8,(0,U.p)(Array.from(e))),void 0===r.variables&&(r.variables=i),r}function ce(e){return function(t,i){if((0,F.c)(t)||(0,F.c)(i))throw(0,s.vA)(9);if((0,x.U)(t)&&(0,x.U)(i)){var r=e.getFieldValue(t,"__typename"),o=e.getFieldValue(i,"__typename");if(r&&o&&r!==o)return i;if((0,g.A_)(t)&&(0,M.d1)(i))return e.merge(t.__ref,i),t;if((0,M.d1)(t)&&(0,g.A_)(i))return e.merge(t,i.__ref),i;if((0,M.d1)(t)&&(0,M.d1)(i))return(0,n.__assign)((0,n.__assign)({},t),i)}return i}}function he(e,t,i){var s="".concat(t).concat(i),r=e.flavors.get(s);return r||e.flavors.set(s,r=e.clientOnly===t&&e.deferred===i?e:(0,n.__assign)((0,n.__assign)({},e),{clientOnly:t,deferred:i})),r}var de=function(){function e(e,t,i){this.cache=e,this.reader=t,this.fragments=i}return e.prototype.writeToStore=function(e,t){var i=this,r=t.query,a=t.result,l=t.dataId,c=t.variables,h=t.overwrite,d=(0,y.Vu)(r),p=(0,M.mv)();c=(0,n.__assign)((0,n.__assign)({},(0,y.wY)(d)),c);var f=(0,n.__assign)((0,n.__assign)({store:e,written:Object.create(null),merge:function(e,t){return p.merge(e,t)},variables:c,varString:(0,u.M)(c)},(0,M.lq)(r,this.fragments)),{overwrite:!!h,incomingById:new Map,clientOnly:!1,deferred:!1,flavors:new Map}),m=this.processSelectionSet({result:a||Object.create(null),dataId:l,selectionSet:d.selectionSet,mergeTree:{map:new Map},context:f});if(!(0,g.A_)(m))throw(0,s.vA)(12,a);return f.incomingById.forEach(function(t,r){var a=t.storeObject,l=t.mergeTree,c=t.fieldNodeSet,h=(0,g.WU)(r);if(l&&l.map.size){var d=i.applyMerges(l,h,a,f);if((0,g.A_)(d))return;a=d}if(!1!==globalThis.__DEV__&&!f.overwrite){var u=Object.create(null);c.forEach(function(e){e.selectionSet&&(u[e.name.value]=!0)}),Object.keys(a).forEach(function(e){(function(e){return!0===u[(0,M.iJ)(e)]})(e)&&!function(e){var t=l&&l.map.get(e);return Boolean(t&&t.info&&t.info.merge)}(e)&&function(e,t,i,r){var a=function(e){var t=r.getFieldValue(e,i);return"object"==typeof t&&t},l=a(e);if(l){var c=a(t);if(c&&!(0,g.A_)(l)&&!(0,o.L)(l,c)&&!Object.keys(l).every(function(e){return void 0!==r.getFieldValue(c,e)})){var h=r.getFieldValue(e,"__typename")||r.getFieldValue(t,"__typename"),d=(0,M.iJ)(i),u="".concat(h,".").concat(d);if(!ve.has(u)){ve.add(u);var p=[];(0,F.c)(l)||(0,F.c)(c)||[l,c].forEach(function(e){var t=r.getFieldValue(e,"__typename");"string"!=typeof t||p.includes(t)||p.push(t)}),!1!==globalThis.__DEV__&&s.V1.warn(15,d,h,p.length?"either ensure all objects of type "+p.join(" and ")+" have an ID or a custom merge function, or ":"",u,(0,n.__assign)({},l),(0,n.__assign)({},c))}}}}(h,a,e,f.store)})}e.merge(r,a)}),e.retain(m.__ref),m},e.prototype.processSelectionSet=function(e){var t=this,i=e.dataId,r=e.result,o=e.selectionSet,a=e.context,l=e.mergeTree,c=this.cache.policies,d=Object.create(null),u=i&&c.rootTypenamesById[i]||(0,g.D$)(r,o,a.fragmentMap)||i&&a.store.get(i,"__typename");"string"==typeof u&&(d.__typename=u);var p=function(){var e=le(arguments,d,a.variables);if((0,g.A_)(e.from)){var t=a.incomingById.get(e.from.__ref);if(t){var i=c.readField((0,n.__assign)((0,n.__assign)({},e),{from:t.storeObject}),a);if(void 0!==i)return i}}return c.readField(e,a)},f=new Set;this.flattenFields(o,r,a,u).forEach(function(e,i){var n,o=(0,g.ue)(i),a=r[o];if(f.add(i),void 0!==a){var m=c.getStoreFieldName({typename:u,fieldName:i.name.value,field:i,variables:e.variables}),v=pe(l,m),y=t.processFieldValue(a,i,i.selectionSet?he(e,!1,!1):e,v),C=void 0;i.selectionSet&&((0,g.A_)(y)||(0,M.d1)(y))&&(C=p("__typename",y));var b=c.getMergeFunction(u,i.name.value,C);b?v.info={field:i,typename:u,merge:b}:me(l,m),d=e.merge(d,((n={})[m]=y,n))}else!1===globalThis.__DEV__||e.clientOnly||e.deferred||h.XY.added(i)||c.getReadFunction(u,i.name.value)||!1!==globalThis.__DEV__&&s.V1.error(13,(0,g.ue)(i),r)});try{var m=c.identify(r,{typename:u,selectionSet:o,fragmentMap:a.fragmentMap,storeObject:d,readField:p}),v=m[0],y=m[1];i=i||v,y&&(d=a.merge(d,y))}catch(e){if(!i)throw e}if("string"==typeof i){var C=(0,g.WU)(i),b=a.written[i]||(a.written[i]=[]);if(b.indexOf(o)>=0)return C;if(b.push(o),this.reader&&this.reader.isFresh(r,C,o,a))return C;var S=a.incomingById.get(i);return S?(S.storeObject=a.merge(S.storeObject,d),S.mergeTree=ge(S.mergeTree,l),f.forEach(function(e){return S.fieldNodeSet.add(e)})):a.incomingById.set(i,{storeObject:d,mergeTree:fe(l)?void 0:l,fieldNodeSet:f}),C}return d},e.prototype.processFieldValue=function(e,t,i,n){var s=this;return t.selectionSet&&null!==e?(0,F.c)(e)?e.map(function(e,r){var o=s.processFieldValue(e,t,i,pe(n,r));return me(n,r),o}):this.processSelectionSet({result:e,selectionSet:t.selectionSet,context:i,mergeTree:n}):!1!==globalThis.__DEV__?(0,z.m)(e):e},e.prototype.flattenFields=function(e,t,i,n){void 0===n&&(n=(0,g.D$)(t,e,i.fragmentMap));var r=new Map,o=this.cache.policies,a=new E.b(!1);return function e(l,c){var h=a.lookup(l,c.clientOnly,c.deferred);h.visited||(h.visited=!0,l.selections.forEach(function(a){if((0,b.MS)(a,i.variables)){var l=c.clientOnly,h=c.deferred;if(l&&h||!(0,F.E)(a.directives)||a.directives.forEach(function(e){var t=e.name.value;if("client"===t&&(l=!0),"defer"===t){var n=(0,g.MB)(e,i.variables);n&&!1===n.if||(h=!0)}}),(0,g.dt)(a)){var d=r.get(a);d&&(l=l&&d.clientOnly,h=h&&d.deferred),r.set(a,he(i,l,h))}else{var u=(0,S.HQ)(a,i.lookupFragment);if(!u&&a.kind===f.b.FRAGMENT_SPREAD)throw(0,s.vA)(14,a.name.value);u&&o.fragmentMatches(u,n,t,i.variables)&&e(u.selectionSet,he(i,l,h))}}}))}(e,i),r},e.prototype.applyMerges=function(e,t,i,r,o){var a,l=this;if(e.map.size&&!(0,g.A_)(i)){var c,h=(0,F.c)(i)||!(0,g.A_)(t)&&!(0,M.d1)(t)?void 0:t,d=i;h&&!o&&(o=[(0,g.A_)(h)?h.__ref:h]);var u=function(e,t){return(0,F.c)(e)?"number"==typeof t?e[t]:void 0:r.store.getFieldValue(e,String(t))};e.map.forEach(function(e,t){var i=u(h,t),n=u(d,t);if(void 0!==n){o&&o.push(t);var a=l.applyMerges(e,i,n,r,o);a!==n&&(c=c||new Map).set(t,a),o&&(0,s.V1)(o.pop()===t)}}),c&&(i=(0,F.c)(d)?d.slice(0):(0,n.__assign)({},d),c.forEach(function(e,t){i[t]=e}))}return e.info?this.cache.policies.runMergeFunction(t,i,e.info,r,o&&(a=r.store).getStorage.apply(a,o)):i},e}(),ue=[];function pe(e,t){var i=e.map;return i.has(t)||i.set(t,ue.pop()||{map:new Map}),i.get(t)}function ge(e,t){if(e===t||!t||fe(t))return e;if(!e||fe(e))return t;var i=e.info&&t.info?(0,n.__assign)((0,n.__assign)({},e.info),t.info):e.info||t.info,s=e.map.size&&t.map.size,r={info:i,map:s?new Map:e.map.size?e.map:t.map};if(s){var o=new Set(t.map.keys());e.map.forEach(function(e,i){r.map.set(i,ge(e,t.map.get(i))),o.delete(i)}),o.forEach(function(i){r.map.set(i,ge(t.map.get(i),e.map.get(i)))})}return r}function fe(e){return!e||!(e.info||e.map.size)}function me(e,t){var i=e.map,n=i.get(t);n&&fe(n)&&(ue.push(n),i.delete(t))}var ve=new Set,ye=i(27231),Ce=i(30301),be=function(e){function t(t){void 0===t&&(t={});var i=e.call(this)||this;return i.watches=new Set,i.addTypenameTransform=new c.c(h.XY),i.assumeImmutableResults=!0,i.makeVar=W.UT,i.txCount=0,!1!==globalThis.__DEV__&&((0,Ce.cc)(t,"addTypename","InMemoryCache","Please remove the `addTypename` option when initializing `InMemoryCache`."),(0,Ce.cc)(t,"canonizeResults","InMemoryCache","Please remove the `canonizeResults` option when initializing `InMemoryCache`.")),i.config=(0,M.I6)(t),i.addTypename=!!i.config.addTypename,i.policies=new oe({cache:i,dataIdFromObject:i.config.dataIdFromObject,possibleTypes:i.config.possibleTypes,typePolicies:i.config.typePolicies}),i.init(),i}return(0,n.__extends)(t,e),t.prototype.init=function(){var e=this.data=new I.Root({policies:this.policies,resultCaching:this.config.resultCaching});this.optimisticData=e.stump,this.resetResultCache()},t.prototype.resetResultCache=function(e){var t=this,i=this.storeReader,n=this.config.fragments;this.addTypenameTransform.resetCache(),null==n||n.resetCaches(),this.storeWriter=new de(this,this.storeReader=new B({cache:this,addTypename:this.addTypename,resultCacheMaxSize:this.config.resultCacheMaxSize,canonizeResults:(0,M.Xx)(this.config),canon:e?void 0:i&&i.canon,fragments:n}),n),this.maybeBroadcastWatch=(0,r.LV)(function(e,i){return t.broadcastWatch(e,i)},{max:this.config.resultCacheMaxSize||d.v["inMemoryCache.maybeBroadcastWatch"]||5e3,makeCacheKey:function(e){var i=e.optimistic?t.optimisticData:t.data;if(_(i)){var n=e.optimistic,s=e.id,r=e.variables;return i.makeCacheKey(e.query,e.callback,(0,u.M)({optimistic:n,id:s,variables:r}))}}}),new Set([this.data.group,this.optimisticData.group]).forEach(function(e){return e.resetCaching()})},t.prototype.restore=function(e){return this.init(),e&&this.data.replace(e),this},t.prototype.extract=function(e){return void 0===e&&(e=!1),(e?this.optimisticData:this.data).extract()},t.prototype.read=function(e){!1!==globalThis.__DEV__&&(0,Ce.cc)(e,"canonizeResults","cache.read");var t=e.returnPartialData,i=void 0!==t&&t;try{return this.storeReader.diffQueryAgainstStore((0,n.__assign)((0,n.__assign)({},e),{store:e.optimistic?this.optimisticData:this.data,config:this.config,returnPartialData:i})).result||null}catch(e){if(e instanceof l.Z)return null;throw e}},t.prototype.write=function(e){try{return++this.txCount,this.storeWriter.writeToStore(this.data,e)}finally{--this.txCount||!1===e.broadcast||this.broadcastWatches()}},t.prototype.modify=function(e){if(M.$3.call(e,"id")&&!e.id)return!1;var t=e.optimistic?this.optimisticData:this.data;try{return++this.txCount,t.modify(e.id||"ROOT_QUERY",e.fields)}finally{--this.txCount||!1===e.broadcast||this.broadcastWatches()}},t.prototype.diff=function(e){return!1!==globalThis.__DEV__&&(0,Ce.cc)(e,"canonizeResults","cache.diff"),this.storeReader.diffQueryAgainstStore((0,n.__assign)((0,n.__assign)({},e),{store:e.optimistic?this.optimisticData:this.data,rootId:e.id||"ROOT_QUERY",config:this.config}))},t.prototype.watch=function(e){var t=this;return this.watches.size||(0,W.MS)(this),this.watches.add(e),e.immediate&&this.maybeBroadcastWatch(e),function(){t.watches.delete(e)&&!t.watches.size&&(0,W.WR)(t),t.maybeBroadcastWatch.forget(e)}},t.prototype.gc=function(e){!1!==globalThis.__DEV__&&(0,Ce.cc)(e||{},"resetResultIdentities","cache.gc","First ensure all usages of `canonizeResults` are removed, then remove this option."),u.M.reset(),p.y.reset();var t=this.optimisticData.gc();return e&&!this.txCount&&(e.resetResultCache?this.resetResultCache(e.resetResultIdentities):e.resetResultIdentities&&this.storeReader.resetCanon()),t},t.prototype.retain=function(e,t){return(t?this.optimisticData:this.data).retain(e)},t.prototype.release=function(e,t){return(t?this.optimisticData:this.data).release(e)},t.prototype.identify=function(e){if((0,g.A_)(e))return e.__ref;try{return this.policies.identify(e)[0]}catch(e){!1!==globalThis.__DEV__&&s.V1.warn(e)}},t.prototype.evict=function(e){if(!e.id){if(M.$3.call(e,"id"))return!1;e=(0,n.__assign)((0,n.__assign)({},e),{id:"ROOT_QUERY"})}try{return++this.txCount,this.optimisticData.evict(e,this.data)}finally{--this.txCount||!1===e.broadcast||this.broadcastWatches()}},t.prototype.reset=function(e){var t=this;return this.init(),u.M.reset(),e&&e.discardWatches?(this.watches.forEach(function(e){return t.maybeBroadcastWatch.forget(e)}),this.watches.clear(),(0,W.WR)(this)):this.broadcastWatches(),Promise.resolve()},t.prototype.removeOptimistic=function(e){var t=this.optimisticData.removeLayer(e);t!==this.optimisticData&&(this.optimisticData=t,this.broadcastWatches())},t.prototype.batch=function(e){var t,i=this,s=e.update,r=e.optimistic,o=void 0===r||r,a=e.removeOptimistic,l=e.onWatchUpdated,c=function(e){var n=i,r=n.data,o=n.optimisticData;++i.txCount,e&&(i.data=i.optimisticData=e);try{return t=s(i)}finally{--i.txCount,i.data=r,i.optimisticData=o}},h=new Set;return l&&!this.txCount&&this.broadcastWatches((0,n.__assign)((0,n.__assign)({},e),{onWatchUpdated:function(e){return h.add(e),!1}})),"string"==typeof o?this.optimisticData=this.optimisticData.addLayer(o,c):!1===o?c(this.data):c(),"string"==typeof a&&(this.optimisticData=this.optimisticData.removeLayer(a)),l&&h.size?(this.broadcastWatches((0,n.__assign)((0,n.__assign)({},e),{onWatchUpdated:function(e,t){var i=l.call(this,e,t);return!1!==i&&h.delete(e),i}})),h.size&&h.forEach(function(e){return i.maybeBroadcastWatch.dirty(e)})):this.broadcastWatches(e),t},t.prototype.performTransaction=function(e,t){return this.batch({update:e,optimistic:t||null!==t})},t.prototype.transformDocument=function(e){return this.addTypenameToDocument(this.addFragmentsToDocument(e))},t.prototype.fragmentMatches=function(e,t){return this.policies.fragmentMatches(e,t)},t.prototype.lookupFragment=function(e){var t;return(null===(t=this.config.fragments)||void 0===t?void 0:t.lookup(e))||null},t.prototype.broadcastWatches=function(e){var t=this;this.txCount||this.watches.forEach(function(i){return t.maybeBroadcastWatch(i,e)})},t.prototype.addFragmentsToDocument=function(e){var t=this.config.fragments;return t?t.transform(e):e},t.prototype.addTypenameToDocument=function(e){return this.addTypename?this.addTypenameTransform.transformDocument(e):e},t.prototype.broadcastWatch=function(e,t){var i=this,n=e.lastDiff,s=(0,Ce.lz)("canonizeResults",function(){return i.diff(e)});t&&(e.optimistic&&"string"==typeof t.optimistic&&(s.fromOptimisticTransaction=!0),t.onWatchUpdated&&!1===t.onWatchUpdated.call(this,e,s,n))||n&&(0,o.L)(n.result,s.result)||e.callback(e.lastDiff=s,n)},t}(a.k);!1!==globalThis.__DEV__&&(be.prototype.getMemoryInternals=ye.cM)},67566(e,t,i){"use strict";i.d(t,{MS:()=>l,UT:()=>c,WR:()=>a,bl:()=>s});var n=i(81987),s=new n.DX,r=new WeakMap;function o(e){var t=r.get(e);return t||r.set(e,t={vars:new Set,dep:(0,n.yN)()}),t}function a(e){o(e).vars.forEach(function(t){return t.forgetCache(e)})}function l(e){o(e).vars.forEach(function(t){return t.attachCache(e)})}function c(e){var t=new Set,i=new Set,n=function(a){if(arguments.length>0){if(e!==a){e=a,t.forEach(function(e){o(e).dep.dirty(n),function(e){e.broadcastWatches&&e.broadcastWatches()}(e)});var l=Array.from(i);i.clear(),l.forEach(function(t){return t(e)})}}else{var c=s.getValue();c&&(r(c),o(c).dep(n))}return e};n.onNextChange=function(e){return i.add(e),function(){i.delete(e)}};var r=n.attachCache=function(e){return t.add(e),o(e).vars.add(n),n};return n.forgetCache=function(e){return t.delete(e)},n}},50953(e,t,i){"use strict";i.d(t,{R:()=>Q});var n=i(65959),s=i(131),r=i(3224),o=i(34109),a=i(29527),l=i(39781),c=i(45063),h=i(94537),d=i(14270),u=i(83906),p=i(48555),g=i(26497),f=i(78917),m=i(34471),v=i(28931),y=i(79e3),C=i(47812),b=i(99310),S=i(1164),w=i(66566),x=i(51759),E=i(84382),M=i(17303),A=i(78440),T=i(49995),D=i(45902),I=i(97703),R=i(30301),L=new(I.et?WeakMap:Map);function k(e,t){var i=e[t];"function"==typeof i&&(e[t]=function(){return L.set(e,(L.get(e)+1)%1e15),i.apply(this,arguments)})}var P=function(){function e(e,t){void 0===t&&(t=e.generateQueryId()),this.queryId=t,this.document=null,this.lastRequestId=1,this.stopped=!1,this.observableQuery=null;var i=this.cache=e.cache;L.has(i)||(L.set(i,0),k(i,"evict"),k(i,"modify"),k(i,"reset"))}return e.prototype.init=function(e){var t=e.networkStatus||T.pT.loading;return this.variables&&this.networkStatus!==T.pT.loading&&!(0,c.L)(this.variables,e.variables)&&(t=T.pT.setVariables),(0,c.L)(e.variables,this.variables)||(this.lastDiff=void 0,this.cancel()),Object.assign(this,{document:e.document,variables:e.variables,networkError:null,graphQLErrors:this.graphQLErrors||[],networkStatus:t}),e.observableQuery&&this.setObservableQuery(e.observableQuery),e.lastRequestId&&(this.lastRequestId=e.lastRequestId),this},e.prototype.resetDiff=function(){this.lastDiff=void 0},e.prototype.getDiff=function(){var e=this,t=this.getDiffOptions();if(this.lastDiff&&(0,c.L)(t,this.lastDiff.options))return this.lastDiff.diff;this.updateWatch(this.variables);var i=this.observableQuery;if(i&&"no-cache"===i.options.fetchPolicy)return{complete:!1};var n=(0,R.lz)("canonizeResults",function(){return e.cache.diff(t)});return this.updateLastDiff(n,t),n},e.prototype.updateLastDiff=function(e,t){this.lastDiff=e?{diff:e,options:t||this.getDiffOptions()}:void 0},e.prototype.getDiffOptions=function(e){var t;return void 0===e&&(e=this.variables),{query:this.document,variables:e,returnPartialData:!0,optimistic:!0,canonizeResults:null===(t=this.observableQuery)||void 0===t?void 0:t.options.canonizeResults}},e.prototype.setDiff=function(e){var t,i=this,n=this.lastDiff&&this.lastDiff.diff;e&&!e.complete&&(0,R.lz)("getLastError",function(){var e;return null===(e=i.observableQuery)||void 0===e?void 0:e.getLastError()})||(this.updateLastDiff(e),(0,c.L)(n&&n.result,e&&e.result)||null===(t=this.observableQuery)||void 0===t||t.scheduleNotify())},e.prototype.setObservableQuery=function(e){e!==this.observableQuery&&(this.observableQuery=e,e&&(e.queryInfo=this))},e.prototype.stop=function(){var e;if(!this.stopped){this.stopped=!0,null===(e=this.observableQuery)||void 0===e||e.resetNotifications(),this.cancel();var t=this.observableQuery;t&&t.stopPolling()}},e.prototype.cancel=function(){var e;null===(e=this.cancelWatch)||void 0===e||e.call(this),this.cancelWatch=void 0},e.prototype.updateWatch=function(e){var t=this;void 0===e&&(e=this.variables);var i=this.observableQuery;if(!i||"no-cache"!==i.options.fetchPolicy){var s=(0,n.__assign)((0,n.__assign)({},this.getDiffOptions(e)),{watcher:this,callback:function(e){return t.setDiff(e)}});this.lastWatch&&(0,c.L)(s,this.lastWatch)||(this.cancel(),this.cancelWatch=this.cache.watch(this.lastWatch=s))}},e.prototype.resetLastWrite=function(){this.lastWrite=void 0},e.prototype.shouldWrite=function(e,t){var i=this.lastWrite;return!(i&&i.dmCount===L.get(this.cache)&&(0,c.L)(t,i.variables)&&(0,c.L)(e.data,i.result.data))},e.prototype.markResult=function(e,t,i,n){var s,r=this,o=new D.ZI,a=(0,y.E)(e.errors)?e.errors.slice(0):[];if(null===(s=this.observableQuery)||void 0===s||s.resetNotifications(),"incremental"in e&&(0,y.E)(e.incremental)){var l=(0,h.bd)(this.getDiff().result,e);e.data=l}else if("hasNext"in e&&e.hasNext){var d=this.getDiff();e.data=o.merge(d.result,e.data)}this.graphQLErrors=a,"no-cache"===i.fetchPolicy?this.updateLastDiff({result:e.data,complete:!0},this.getDiffOptions(i.variables)):0!==n&&(N(e,i.errorPolicy)?this.cache.performTransaction(function(s){if(r.shouldWrite(e,i.variables))s.writeQuery({query:t,data:e.data,variables:i.variables,overwrite:1===n}),r.lastWrite={result:e,variables:i.variables,dmCount:L.get(r.cache)};else if(r.lastDiff&&r.lastDiff.diff.complete)return void(e.data=r.lastDiff.diff.result);var o=r.getDiffOptions(i.variables),a=(0,R.lz)("canonizeResults",function(){return s.diff(o)});!r.stopped&&(0,c.L)(r.variables,i.variables)&&r.updateWatch(i.variables),r.updateLastDiff(a,o),a.complete&&(e.data=a.result)}):this.lastWrite=void 0)},e.prototype.markReady=function(){return this.networkError=null,this.networkStatus=T.pT.ready},e.prototype.markError=function(e){var t;return this.networkStatus=T.pT.error,this.lastWrite=void 0,null===(t=this.observableQuery)||void 0===t||t.resetNotifications(),e.graphQLErrors&&(this.graphQLErrors=e.graphQLErrors),e.networkError&&(this.networkError=e.networkError),e},e}();function N(e,t){void 0===t&&(t="none");var i="ignore"===t||"all"===t,n=!(0,v.t)(e);return!n&&i&&e.data&&(n=!0),n}var O=i(33137),_=i(69796),F=i(75859),G=i(19360),V=i(94959),B=i(71637),H=i(13062),z=Object.prototype.hasOwnProperty,U=Object.create(null),W=function(){function e(e){var t=this;this.clientAwareness={},this.queries=new Map,this.fetchCancelFns=new Map,this.transformCache=new F.A(G.v["queryManager.getDocumentInfo"]||2e3),this.queryIdCounter=1,this.requestIdCounter=1,this.mutationIdCounter=1,this.inFlightLinkObservables=new _.b(!1),this.noCacheWarningsByQueryId=new Set;var i=new f.c(function(e){return t.cache.transformDocument(e)},{cache:!1});this.cache=e.cache,this.link=e.link,this.defaultOptions=e.defaultOptions,this.queryDeduplication=e.queryDeduplication,this.clientAwareness=e.clientAwareness,this.localState=e.localState,this.ssrMode=e.ssrMode,this.assumeImmutableResults=e.assumeImmutableResults,this.dataMasking=e.dataMasking;var n=e.documentTransform;this.documentTransform=n?i.concat(n).concat(i):i,this.defaultContext=e.defaultContext||Object.create(null),(this.onBroadcast=e.onBroadcast)&&(this.mutationStore=Object.create(null))}return e.prototype.stop=function(){var e=this;this.queries.forEach(function(t,i){e.stopQueryNoBroadcast(i)}),this.cancelPendingFetches((0,s.vA)(35))},e.prototype.cancelPendingFetches=function(e){this.fetchCancelFns.forEach(function(t){return t(e)}),this.fetchCancelFns.clear()},e.prototype.mutate=function(e){return(0,n.__awaiter)(this,arguments,void 0,function(e){var t,i,r,o,a,l,c,h=e.mutation,d=e.variables,u=e.optimisticResponse,p=e.updateQueries,g=e.refetchQueries,f=void 0===g?[]:g,y=e.awaitRefetchQueries,C=void 0!==y&&y,b=e.update,S=e.onQueryUpdated,w=e.fetchPolicy,x=void 0===w?(null===(l=this.defaultOptions.mutate)||void 0===l?void 0:l.fetchPolicy)||"network-only":w,E=e.errorPolicy,A=void 0===E?(null===(c=this.defaultOptions.mutate)||void 0===c?void 0:c.errorPolicy)||"none":E,T=e.keepRootFields,D=e.context;return(0,n.__generator)(this,function(e){switch(e.label){case 0:return(0,s.V1)(h,36),(0,s.V1)("network-only"===x||"no-cache"===x,37),t=this.generateMutationId(),h=this.cache.transformForLink(this.transform(h)),i=this.getDocumentInfo(h).hasClientExports,d=this.getVariables(h,d),i?[4,this.localState.addExportedVariables(h,d,D)]:[3,2];case 1:d=e.sent(),e.label=2;case 2:return r=this.mutationStore&&(this.mutationStore[t]={mutation:h,variables:d,loading:!0,error:null}),o=u&&this.markMutationOptimistic(u,{mutationId:t,document:h,variables:d,fetchPolicy:x,errorPolicy:A,context:D,updateQueries:p,update:b,keepRootFields:T}),this.broadcastQueries(),a=this,[2,new Promise(function(e,i){return(0,m.x)(a.getObservableFromLink(h,(0,n.__assign)((0,n.__assign)({},D),{optimisticResponse:o?u:void 0}),d,{},!1),function(e){if((0,v.t)(e)&&"none"===A)throw new M.K4({graphQLErrors:(0,v.M)(e)});r&&(r.loading=!1,r.error=null);var i=(0,n.__assign)({},e);return"function"==typeof f&&(f=f(i)),"ignore"===A&&(0,v.t)(i)&&delete i.errors,a.markMutationResult({mutationId:t,result:i,document:h,variables:d,fetchPolicy:x,errorPolicy:A,context:D,update:b,updateQueries:p,awaitRefetchQueries:C,refetchQueries:f,removeOptimistic:o?t:void 0,onQueryUpdated:S,keepRootFields:T})}).subscribe({next:function(i){a.broadcastQueries(),"hasNext"in i&&!1!==i.hasNext||e((0,n.__assign)((0,n.__assign)({},i),{data:a.maskOperation({document:h,data:i.data,fetchPolicy:x,id:t})}))},error:function(e){r&&(r.loading=!1,r.error=e),o&&a.cache.removeOptimistic(t),a.broadcastQueries(),i(e instanceof M.K4?e:new M.K4({networkError:e}))}})})]}})})},e.prototype.markMutationResult=function(e,t){var i=this;void 0===t&&(t=this.cache);var s=e.result,r=[],o="no-cache"===e.fetchPolicy;if(!o&&N(s,e.errorPolicy)){if((0,h.ST)(s)||r.push({result:s.data,dataId:"ROOT_MUTATION",query:e.document,variables:e.variables}),(0,h.ST)(s)&&(0,y.E)(s.incremental)){var a=t.diff({id:"ROOT_MUTATION",query:this.getDocumentInfo(e.document).asQuery,variables:e.variables,optimistic:!1,returnPartialData:!0}),l=void 0;a.result&&(l=(0,h.bd)(a.result,s)),void 0!==l&&(s.data=l,r.push({result:l,dataId:"ROOT_MUTATION",query:e.document,variables:e.variables}))}var c=e.updateQueries;c&&this.queries.forEach(function(e,n){var o=e.observableQuery,a=o&&o.queryName;if(a&&z.call(c,a)){var l=c[a],h=i.queries.get(n),d=h.document,u=h.variables,p=t.diff({query:d,variables:u,returnPartialData:!0,optimistic:!1}),g=p.result;if(p.complete&&g){var f=l(g,{mutationResult:s,queryName:d&&(0,C.n4)(d)||void 0,queryVariables:u});f&&r.push({result:f,dataId:"ROOT_QUERY",query:d,variables:u})}}})}if(r.length>0||(e.refetchQueries||"").length>0||e.update||e.onQueryUpdated||e.removeOptimistic){var d=[];if(this.refetchQueries({updateCache:function(t){o||r.forEach(function(e){return t.write(e)});var a=e.update,l=!(0,h.YX)(s)||(0,h.ST)(s)&&!s.hasNext;if(a){if(!o){var c=t.diff({id:"ROOT_MUTATION",query:i.getDocumentInfo(e.document).asQuery,variables:e.variables,optimistic:!1,returnPartialData:!0});c.complete&&("incremental"in(s=(0,n.__assign)((0,n.__assign)({},s),{data:c.result}))&&delete s.incremental,"hasNext"in s&&delete s.hasNext)}l&&a(t,s,{context:e.context,variables:e.variables})}o||e.keepRootFields||!l||t.modify({id:"ROOT_MUTATION",fields:function(e,t){var i=t.fieldName,n=t.DELETE;return"__typename"===i?e:n}})},include:e.refetchQueries,optimistic:!1,removeOptimistic:e.removeOptimistic,onQueryUpdated:e.onQueryUpdated||null}).forEach(function(e){return d.push(e)}),e.awaitRefetchQueries||e.onQueryUpdated)return Promise.all(d).then(function(){return s})}return Promise.resolve(s)},e.prototype.markMutationOptimistic=function(e,t){var i=this,r="function"==typeof e?e(t.variables,{IGNORE:U}):e;return r!==U&&(this.cache.recordOptimisticTransaction(function(e){try{i.markMutationResult((0,n.__assign)((0,n.__assign)({},t),{result:{data:r}}),e)}catch(e){!1!==globalThis.__DEV__&&s.V1.error(e)}},t.mutationId),!0)},e.prototype.fetchQuery=function(e,t,i){return this.fetchConcastWithInfo(this.getOrCreateQuery(e),t,i).concast.promise},e.prototype.getQueryStore=function(){var e=Object.create(null);return this.queries.forEach(function(t,i){e[i]={variables:t.variables,networkStatus:t.networkStatus,networkError:t.networkError,graphQLErrors:t.graphQLErrors}}),e},e.prototype.resetErrors=function(e){var t=this.queries.get(e);t&&(t.networkError=void 0,t.graphQLErrors=[])},e.prototype.transform=function(e){return this.documentTransform.transformDocument(e)},e.prototype.getDocumentInfo=function(e){var t=this.transformCache;if(!t.has(e)){var i={hasClientExports:(0,d.f2)(e),hasForcedResolvers:this.localState.shouldForceResolvers(e),hasNonreactiveDirective:(0,d.d8)(["nonreactive"],e),nonReactiveQuery:(0,u.x3)(e),clientQuery:this.localState.clientQuery(e),serverQuery:(0,u.iz)([{name:"client",remove:!0},{name:"connection"},{name:"nonreactive"},{name:"unmask"}],e),defaultVars:(0,C.wY)((0,C.Vu)(e)),asQuery:(0,n.__assign)((0,n.__assign)({},e),{definitions:e.definitions.map(function(e){return"OperationDefinition"===e.kind&&"query"!==e.operation?(0,n.__assign)((0,n.__assign)({},e),{operation:"query"}):e})})};t.set(e,i)}return t.get(e)},e.prototype.getVariables=function(e,t){return(0,n.__assign)((0,n.__assign)({},this.getDocumentInfo(e).defaultVars),t)},e.prototype.watchQuery=function(e){var t=this.transform(e.query);void 0===(e=(0,n.__assign)((0,n.__assign)({},e),{variables:this.getVariables(t,e.variables)})).notifyOnNetworkStatusChange&&(e.notifyOnNetworkStatusChange=!1);var i=new P(this),s=new A.U({queryManager:this,queryInfo:i,options:e});return s.lastQuery=t,A.U.inactiveOnCreation.getValue()||this.queries.set(s.queryId,i),i.init({document:t,observableQuery:s,variables:s.variables}),s},e.prototype.query=function(e,t){var i=this;void 0===t&&(t=this.generateQueryId()),(0,s.V1)(e.query,38),(0,s.V1)("Document"===e.query.kind,39),(0,s.V1)(!e.returnPartialData,40),(0,s.V1)(!e.pollInterval,41);var r=this.transform(e.query);return this.fetchQuery(t,(0,n.__assign)((0,n.__assign)({},e),{query:r})).then(function(s){return s&&(0,n.__assign)((0,n.__assign)({},s),{data:i.maskOperation({document:r,data:s.data,fetchPolicy:e.fetchPolicy,id:t})})}).finally(function(){return i.stopQuery(t)})},e.prototype.generateQueryId=function(){return String(this.queryIdCounter++)},e.prototype.generateRequestId=function(){return this.requestIdCounter++},e.prototype.generateMutationId=function(){return String(this.mutationIdCounter++)},e.prototype.stopQueryInStore=function(e){this.stopQueryInStoreNoBroadcast(e),this.broadcastQueries()},e.prototype.stopQueryInStoreNoBroadcast=function(e){var t=this.queries.get(e);t&&t.stop()},e.prototype.clearStore=function(e){return void 0===e&&(e={discardWatches:!0}),this.cancelPendingFetches((0,s.vA)(42)),this.queries.forEach(function(e){e.observableQuery?e.networkStatus=T.pT.loading:e.stop()}),this.mutationStore&&(this.mutationStore=Object.create(null)),this.cache.reset(e)},e.prototype.getObservableQueries=function(e){var t=this;void 0===e&&(e="active");var i=new Map,r=new Map,o=new Map,a=new Set;return Array.isArray(e)&&e.forEach(function(e){if("string"==typeof e)r.set(e,e),o.set(e,!1);else if((0,b.Kc)(e)){var i=(0,O.y)(t.transform(e));r.set(i,(0,C.n4)(e)),o.set(i,!1)}else(0,S.U)(e)&&e.query&&a.add(e)}),this.queries.forEach(function(t,n){var s=t.observableQuery,r=t.document;if(s){if("all"===e)return void i.set(n,s);var a=s.queryName;if("standby"===s.options.fetchPolicy||"active"===e&&!s.hasObservers())return;("active"===e||a&&o.has(a)||r&&o.has((0,O.y)(r)))&&(i.set(n,s),a&&o.set(a,!0),r&&o.set((0,O.y)(r),!0))}}),a.size&&a.forEach(function(e){var r=(0,w.v)("legacyOneTimeQuery"),o=t.getOrCreateQuery(r).init({document:e.query,variables:e.variables}),a=new A.U({queryManager:t,queryInfo:o,options:(0,n.__assign)((0,n.__assign)({},e),{fetchPolicy:"network-only"})});(0,s.V1)(a.queryId===r),o.setObservableQuery(a),i.set(r,a)}),!1!==globalThis.__DEV__&&o.size&&o.forEach(function(e,t){if(!e){var i=r.get(t);i?!1!==globalThis.__DEV__&&s.V1.warn(43,i):!1!==globalThis.__DEV__&&s.V1.warn(44)}}),i},e.prototype.reFetchObservableQueries=function(e){var t=this;void 0===e&&(e=!1);var i=[];return this.getObservableQueries(e?"all":"active").forEach(function(n,s){var r=n.options.fetchPolicy;(0,R.lz)("resetLastResults",function(){return n.resetLastResults()}),(e||"standby"!==r&&"cache-only"!==r)&&i.push(n.refetch()),(t.queries.get(s)||n.queryInfo).setDiff(null)}),this.broadcastQueries(),Promise.all(i)},e.prototype.startGraphQLSubscription=function(e){var t=this,i=e.query,n=e.variables,s=e.fetchPolicy,r=e.errorPolicy,o=void 0===r?"none":r,a=e.context,l=void 0===a?{}:a,c=e.extensions,h=void 0===c?{}:c;i=this.transform(i),n=this.getVariables(i,n);var d=function(e){return t.getObservableFromLink(i,l,e,h).map(function(n){"no-cache"!==s&&(N(n,o)&&t.cache.write({query:i,result:n.data,dataId:"ROOT_SUBSCRIPTION",variables:e}),t.broadcastQueries());var r=(0,v.t)(n),a=(0,M.uR)(n);if(r||a){var l={};if(r&&(l.graphQLErrors=n.errors),a&&(l.protocolErrors=n.extensions[M.K$]),"none"===o||a)throw new M.K4(l)}return"ignore"===o&&delete n.errors,n})};if(this.getDocumentInfo(i).hasClientExports){var u=this.localState.addExportedVariables(i,n,l).then(d);return new x.c(function(e){var t=null;return u.then(function(i){return t=i.subscribe(e)},e.error),function(){return t&&t.unsubscribe()}})}return d(n)},e.prototype.stopQuery=function(e){this.stopQueryNoBroadcast(e),this.broadcastQueries()},e.prototype.stopQueryNoBroadcast=function(e){this.stopQueryInStoreNoBroadcast(e),this.removeQuery(e)},e.prototype.removeQuery=function(e){var t;this.fetchCancelFns.delete(e),this.queries.has(e)&&(null===(t=this.queries.get(e))||void 0===t||t.stop(),this.queries.delete(e))},e.prototype.broadcastQueries=function(){this.onBroadcast&&this.onBroadcast(),this.queries.forEach(function(e){var t;return null===(t=e.observableQuery)||void 0===t?void 0:t.notify()})},e.prototype.getLocalState=function(){return this.localState},e.prototype.getObservableFromLink=function(e,t,i,s,r){var a,l,c=this;void 0===r&&(r=null!==(a=null==t?void 0:t.queryDeduplication)&&void 0!==a?a:this.queryDeduplication);var h=this.getDocumentInfo(e),d=h.serverQuery,u=h.clientQuery;if(d){var p=this.inFlightLinkObservables,f=this.link,v={query:d,variables:i,operationName:(0,C.n4)(d)||void 0,context:this.prepareContext((0,n.__assign)((0,n.__assign)({},t),{forceFetch:!r})),extensions:s};if(t=v.context,r){var y=(0,O.y)(d),b=(0,g.M)(i),S=p.lookup(y,b);if(!(l=S.observable)){var w=new E.E([(0,o.g)(f,v)]);l=S.observable=w,w.beforeNext(function e(t,i){"next"===t&&"hasNext"in i&&i.hasNext?w.beforeNext(e):p.remove(y,b)})}}else l=new E.E([(0,o.g)(f,v)])}else l=new E.E([x.c.of({data:{}})]),t=this.prepareContext(t);return u&&(l=(0,m.x)(l,function(e){return c.localState.runResolvers({document:u,remoteResult:e,context:t,variables:i})})),l},e.prototype.getResultsFromLink=function(e,t,i){var n=e.lastRequestId=this.generateRequestId(),s=this.cache.transformForLink(i.query);return(0,m.x)(this.getObservableFromLink(s,i.context,i.variables),function(r){var o=(0,v.M)(r),a=o.length>0,l=i.errorPolicy;if(n>=e.lastRequestId){if(a&&"none"===l)throw e.markError(new M.K4({graphQLErrors:o}));e.markResult(r,s,i,t),e.markReady()}var c={data:r.data,loading:!1,networkStatus:T.pT.ready};return a&&"none"===l&&(c.data=void 0),a&&"ignore"!==l&&(c.errors=o,c.networkStatus=T.pT.error),c},function(t){var i=(0,M.Mn)(t)?t:new M.K4({networkError:t});throw n>=e.lastRequestId&&e.markError(i),i})},e.prototype.fetchConcastWithInfo=function(e,t,i,n){var s=this;void 0===i&&(i=T.pT.loading),void 0===n&&(n=t.query);var r,o,a=this.getVariables(n,t.variables),l=this.defaultOptions.watchQuery,c=t.fetchPolicy,h=void 0===c?l&&l.fetchPolicy||"cache-first":c,d=t.errorPolicy,u=void 0===d?l&&l.errorPolicy||"none":d,p=t.returnPartialData,g=void 0!==p&&p,f=t.notifyOnNetworkStatusChange,m=void 0!==f&&f,v=t.context,y=void 0===v?{}:v,C=Object.assign({},t,{query:n,variables:a,fetchPolicy:h,errorPolicy:u,returnPartialData:g,notifyOnNetworkStatusChange:m,context:y}),b=function(n){C.variables=n;var r=s.fetchQueryByPolicy(e,C,i);return"standby"!==C.fetchPolicy&&r.sources.length>0&&e.observableQuery&&e.observableQuery.applyNextFetchPolicy("after-fetch",t),r},S=function(){return s.fetchCancelFns.delete(e.queryId)};if(this.fetchCancelFns.set(e.queryId,function(e){S(),setTimeout(function(){return r.cancel(e)})}),this.getDocumentInfo(C.query).hasClientExports)r=new E.E(this.localState.addExportedVariables(C.query,C.variables,C.context).then(b).then(function(e){return e.sources})),o=!0;else{var w=b(C.variables);o=w.fromLink,r=new E.E(w.sources)}return r.promise.then(S,S),{concast:r,fromLink:o}},e.prototype.refetchQueries=function(e){var t=this,i=e.updateCache,n=e.include,s=e.optimistic,r=void 0!==s&&s,o=e.removeOptimistic,a=void 0===o?r?(0,w.v)("refetchQueries"):void 0:o,l=e.onQueryUpdated,c=new Map;n&&this.getObservableQueries(n).forEach(function(e,i){c.set(i,{oq:e,lastDiff:(t.queries.get(i)||e.queryInfo).getDiff()})});var h=new Map;return i&&this.cache.batch({update:i,optimistic:r&&a||!1,removeOptimistic:a,onWatchUpdated:function(e,t,i){var n=e.watcher instanceof P&&e.watcher.observableQuery;if(n){if(l){c.delete(n.queryId);var s=l(n,t,i);return!0===s&&(s=n.refetch()),!1!==s&&h.set(n,s),s}null!==l&&c.set(n.queryId,{oq:n,lastDiff:i,diff:t})}}}),c.size&&c.forEach(function(e,i){var n,s=e.oq,r=e.lastDiff,o=e.diff;l&&(o||(o=(0,R.lz)("canonizeResults",function(){return t.cache.diff(s.queryInfo.getDiffOptions())})),n=l(s,o,r)),l&&!0!==n||(n=s.refetch()),!1!==n&&h.set(s,n),i.indexOf("legacyOneTimeQuery")>=0&&t.stopQueryNoBroadcast(i)}),a&&this.cache.removeOptimistic(a),h},e.prototype.maskOperation=function(e){var t,i,n,r=e.document,o=e.data;if(!1!==globalThis.__DEV__){var a=e.fetchPolicy,l=e.id,c=null===(t=(0,C.Vu)(r))||void 0===t?void 0:t.operation,h=(null!==(i=null==c?void 0:c[0])&&void 0!==i?i:"o")+l;!this.dataMasking||"no-cache"!==a||(0,p.s6)(r)||this.noCacheWarningsByQueryId.has(h)||(this.noCacheWarningsByQueryId.add(h),!1!==globalThis.__DEV__&&s.V1.warn(45,null!==(n=(0,C.n4)(r))&&void 0!==n?n:"Unnamed ".concat(null!=c?c:"operation")))}return this.dataMasking?function(e,t,i){var n;if(!i.fragmentMatches)return!1!==globalThis.__DEV__&&(0,B.Ki)(),e;var r=(0,C.Vu)(t);return(0,s.V1)(r,63),null==e?e:(0,V.S)(e,r.selectionSet,{operationType:r.operation,operationName:null===(n=r.name)||void 0===n?void 0:n.value,fragmentMap:(0,p.JG)((0,C.zK)(t)),cache:i,mutableTargets:new B.jq,knownChanged:new B.xm})}(o,r,this.cache):o},e.prototype.maskFragment=function(e){var t=e.data,i=e.fragment,n=e.fragmentName;return this.dataMasking?(0,H.z)(t,i,this.cache,n):t},e.prototype.fetchQueryByPolicy=function(e,t,i){var s=this,r=t.query,o=t.variables,a=t.fetchPolicy,l=t.refetchWritePolicy,h=t.errorPolicy,d=t.returnPartialData,u=t.context,p=t.notifyOnNetworkStatusChange,g=e.networkStatus;e.init({document:r,variables:o,networkStatus:i});var f=function(){return e.getDiff()},m=function(t,i){void 0===i&&(i=e.networkStatus||T.pT.loading);var a=t.result;!1===globalThis.__DEV__||d||(0,c.L)(a,{})||(0,A.y)(t.missing);var l=function(e){return x.c.of((0,n.__assign)({data:e,loading:(0,T.bi)(i),networkStatus:i},t.complete?null:{partial:!0}))};return a&&s.getDocumentInfo(r).hasForcedResolvers?s.localState.runResolvers({document:r,remoteResult:{data:a},context:u,variables:o,onlyRunForcedResolvers:!0}).then(function(e){return l(e.data||void 0)}):"none"===h&&i===T.pT.refetch&&Array.isArray(t.missing)?l(void 0):l(a)},v="no-cache"===a?0:i===T.pT.refetch&&"merge"!==l?1:2,y=function(){return s.getResultsFromLink(e,v,{query:r,variables:o,context:u,fetchPolicy:a,errorPolicy:h})},C=p&&"number"==typeof g&&g!==i&&(0,T.bi)(i);switch(a){default:case"cache-first":return(b=f()).complete?{fromLink:!1,sources:[m(b,e.markReady())]}:d||C?{fromLink:!0,sources:[m(b),y()]}:{fromLink:!0,sources:[y()]};case"cache-and-network":var b;return(b=f()).complete||d||C?{fromLink:!0,sources:[m(b),y()]}:{fromLink:!0,sources:[y()]};case"cache-only":return{fromLink:!1,sources:[m(f(),e.markReady())]};case"network-only":return C?{fromLink:!0,sources:[m(f()),y()]}:{fromLink:!0,sources:[y()]};case"no-cache":return C?{fromLink:!0,sources:[m(e.getDiff()),y()]}:{fromLink:!0,sources:[y()]};case"standby":return{fromLink:!1,sources:[]}}},e.prototype.getOrCreateQuery=function(e){return e&&!this.queries.has(e)&&this.queries.set(e,new P(this,e)),this.queries.get(e)},e.prototype.prepareContext=function(e){void 0===e&&(e={});var t=this.localState.prepareContext(e);return(0,n.__assign)((0,n.__assign)((0,n.__assign)({},this.defaultContext),t),{clientAwareness:this.clientAwareness})},e}(),j=i(85517),K=i(96891),$=i(67566),Y=function(){function e(e){var t=e.cache,i=e.client,n=e.resolvers,s=e.fragmentMatcher;this.selectionsToResolveCache=new WeakMap,this.cache=t,i&&(this.client=i),n&&this.addResolvers(n),s&&this.setFragmentMatcher(s)}return e.prototype.addResolvers=function(e){var t=this;this.resolvers=this.resolvers||{},Array.isArray(e)?e.forEach(function(e){t.resolvers=(0,D.D9)(t.resolvers,e)}):this.resolvers=(0,D.D9)(this.resolvers,e)},e.prototype.setResolvers=function(e){this.resolvers={},this.addResolvers(e)},e.prototype.getResolvers=function(){return this.resolvers||{}},e.prototype.runResolvers=function(e){return(0,n.__awaiter)(this,arguments,void 0,function(e){var t=e.document,i=e.remoteResult,s=e.context,r=e.variables,o=e.onlyRunForcedResolvers,a=void 0!==o&&o;return(0,n.__generator)(this,function(e){return t?[2,this.resolveDocument(t,i.data,s,r,this.fragmentMatcher,a).then(function(e){return(0,n.__assign)((0,n.__assign)({},i),{data:e.result})})]:[2,i]})})},e.prototype.setFragmentMatcher=function(e){this.fragmentMatcher=e},e.prototype.getFragmentMatcher=function(){return this.fragmentMatcher},e.prototype.clientQuery=function(e){return(0,d.d8)(["client"],e)&&this.resolvers?e:null},e.prototype.serverQuery=function(e){return(0,u.er)(e)},e.prototype.prepareContext=function(e){var t=this.cache;return(0,n.__assign)((0,n.__assign)({},e),{cache:t,getCacheKey:function(e){return t.identify(e)}})},e.prototype.addExportedVariables=function(e){return(0,n.__awaiter)(this,arguments,void 0,function(e,t,i){return void 0===t&&(t={}),void 0===i&&(i={}),(0,n.__generator)(this,function(s){return e?[2,this.resolveDocument(e,this.buildRootValueFromCache(e,t)||{},this.prepareContext(i),t).then(function(e){return(0,n.__assign)((0,n.__assign)({},t),e.exportedVariables)})]:[2,(0,n.__assign)({},t)]})})},e.prototype.shouldForceResolvers=function(e){var t=!1;return(0,j.YR)(e,{Directive:{enter:function(e){if("client"===e.name.value&&e.arguments&&(t=e.arguments.some(function(e){return"always"===e.name.value&&"BooleanValue"===e.value.kind&&!0===e.value.value})))return j.sP}}}),t},e.prototype.buildRootValueFromCache=function(e,t){return this.cache.diff({query:(0,u.zc)(e),variables:t,returnPartialData:!0,optimistic:!1}).result},e.prototype.resolveDocument=function(e,t){return(0,n.__awaiter)(this,arguments,void 0,function(e,t,i,s,r,o){var a,l,c,h,d,u,g,f,m,v;return void 0===i&&(i={}),void 0===s&&(s={}),void 0===r&&(r=function(){return!0}),void 0===o&&(o=!1),(0,n.__generator)(this,function(y){return a=(0,C.Vn)(e),l=(0,C.zK)(e),c=(0,p.JG)(l),h=this.collectSelectionsToResolve(a,c),d=a.operation,u=d?d.charAt(0).toUpperCase()+d.slice(1):"Query",f=(g=this).cache,m=g.client,v={fragmentMap:c,context:(0,n.__assign)((0,n.__assign)({},i),{cache:f,client:m}),variables:s,fragmentMatcher:r,defaultOperationType:u,exportedVariables:{},selectionsToResolve:h,onlyRunForcedResolvers:o},[2,this.resolveSelectionSet(a.selectionSet,!1,t,v).then(function(e){return{result:e,exportedVariables:v.exportedVariables}})]})})},e.prototype.resolveSelectionSet=function(e,t,i,r){return(0,n.__awaiter)(this,void 0,void 0,function(){var o,a,l,c,h,u=this;return(0,n.__generator)(this,function(p){return o=r.fragmentMap,a=r.context,l=r.variables,c=[i],h=function(e){return(0,n.__awaiter)(u,void 0,void 0,function(){var h,u;return(0,n.__generator)(this,function(n){return(t||r.selectionsToResolve.has(e))&&(0,d.MS)(e,l)?(0,b.dt)(e)?[2,this.resolveField(e,t,i,r).then(function(t){var i;void 0!==t&&c.push(((i={})[(0,b.ue)(e)]=t,i))})]:((0,b.kd)(e)?h=e:(h=o[e.name.value],(0,s.V1)(h,21,e.name.value)),h&&h.typeCondition&&(u=h.typeCondition.name.value,r.fragmentMatcher(i,u,a))?[2,this.resolveSelectionSet(h.selectionSet,t,i,r).then(function(e){c.push(e)})]:[2]):[2]})})},[2,Promise.all(e.selections.map(h)).then(function(){return(0,D.IM)(c)})]})})},e.prototype.resolveField=function(e,t,i,s){return(0,n.__awaiter)(this,void 0,void 0,function(){var r,o,a,l,c,h,d,u,p,g=this;return(0,n.__generator)(this,function(n){return i?(r=s.variables,o=e.name.value,a=(0,b.ue)(e),l=o!==a,c=i[a]||i[o],h=Promise.resolve(c),s.onlyRunForcedResolvers&&!this.shouldForceResolvers(e)||(d=i.__typename||s.defaultOperationType,(u=this.resolvers&&this.resolvers[d])&&(p=u[l?o:a])&&(h=Promise.resolve($.bl.withValue(this.cache,p,[i,(0,b.MB)(e,r),s.context,{field:e,fragmentMap:s.fragmentMap}])))),[2,h.then(function(i){var n,r;if(void 0===i&&(i=c),e.directives&&e.directives.forEach(function(e){"export"===e.name.value&&e.arguments&&e.arguments.forEach(function(e){"as"===e.name.value&&"StringValue"===e.value.kind&&(s.exportedVariables[e.value.value]=i)})}),!e.selectionSet)return i;if(null==i)return i;var o=null!==(r=null===(n=e.directives)||void 0===n?void 0:n.some(function(e){return"client"===e.name.value}))&&void 0!==r&&r;return Array.isArray(i)?g.resolveSubSelectedArray(e,t||o,i,s):e.selectionSet?g.resolveSelectionSet(e.selectionSet,t||o,i,s):void 0})]):[2,null]})})},e.prototype.resolveSubSelectedArray=function(e,t,i,n){var s=this;return Promise.all(i.map(function(i){return null===i?null:Array.isArray(i)?s.resolveSubSelectedArray(e,t,i,n):e.selectionSet?s.resolveSelectionSet(e.selectionSet,t,i,n):void 0}))},e.prototype.collectSelectionsToResolve=function(e,t){var i=function(e){return!Array.isArray(e)},n=this.selectionsToResolveCache;return function e(r){if(!n.has(r)){var o=new Set;n.set(r,o),(0,j.YR)(r,{Directive:function(e,t,n,s,r){"client"===e.name.value&&r.forEach(function(e){i(e)&&(0,K.VK)(e)&&o.add(e)})},FragmentSpread:function(n,r,a,l,c){var h=t[n.name.value];(0,s.V1)(h,22,n.name.value);var d=e(h);d.size>0&&(c.forEach(function(e){i(e)&&(0,K.VK)(e)&&o.add(e)}),o.add(n),d.forEach(function(e){o.add(e)}))}})}return n.get(r)}(e)},e}(),q=i(97460),X=i(27231),Z=!1,Q=function(){function e(e){var t,i,o,c=this;if(this.resetStoreCallbacks=[],this.clearStoreCallbacks=[],!e.cache)throw(0,s.vA)(16);var h=e.uri,d=e.credentials,u=e.headers,p=e.cache,g=e.documentTransform,f=e.ssrMode,m=void 0!==f&&f,v=e.ssrForceFetchDelay,y=void 0===v?0:v,C=e.connectToDevTools,b=e.queryDeduplication,S=void 0===b||b,w=e.defaultOptions,x=e.defaultContext,E=e.assumeImmutableResults,M=void 0===E?p.assumeImmutableResults:E,A=e.resolvers,T=e.typeDefs,D=e.fragmentMatcher,I=e.clientAwareness,L=e.name,k=e.version,P=e.devtools,N=e.dataMasking;!1!==globalThis.__DEV__&&((0,R.cc)(e,"connectToDevTools","ApolloClient","Please use `devtools.enabled` instead."),(0,R.cc)(e,"uri","ApolloClient","Please initialize an instance of `HttpLink` with `uri` instead."),(0,R.cc)(e,"credentials","ApolloClient","Please initialize an instance of `HttpLink` with `credentials` instead."),(0,R.cc)(e,"headers","ApolloClient","Please initialize an instance of `HttpLink` with `headers` instead."),(0,R.cc)(e,"name","ApolloClient","Please use the `clientAwareness.name` option instead."),(0,R.cc)(e,"version","ApolloClient","Please use the `clientAwareness.version` option instead."),(0,R.cc)(e,"typeDefs","ApolloClient"),e.link||!1!==globalThis.__DEV__&&s.V1.warn(17));var O=e.link;O||(O=h?new l.P({uri:h,credentials:d,headers:u}):r.C.empty()),this.link=O,this.cache=p,this.disableNetworkFetches=m||y>0,this.queryDeduplication=S,this.defaultOptions=w||Object.create(null),this.typeDefs=T,this.devtoolsConfig=(0,n.__assign)((0,n.__assign)({},P),{enabled:null!==(t=null==P?void 0:P.enabled)&&void 0!==t?t:C}),void 0===this.devtoolsConfig.enabled&&(this.devtoolsConfig.enabled=!1!==globalThis.__DEV__),y&&setTimeout(function(){return c.disableNetworkFetches=!1},y),this.watchQuery=this.watchQuery.bind(this),this.query=this.query.bind(this),this.mutate=this.mutate.bind(this),this.watchFragment=this.watchFragment.bind(this),this.resetStore=this.resetStore.bind(this),this.reFetchObservableQueries=this.reFetchObservableQueries.bind(this),this.version=a.r,this.localState=new Y({cache:p,client:this,resolvers:A,fragmentMatcher:D}),this.queryManager=new W({cache:this.cache,link:this.link,defaultOptions:this.defaultOptions,defaultContext:x,documentTransform:g,queryDeduplication:S,ssrMode:m,dataMasking:!!N,clientAwareness:{name:null!==(i=null==I?void 0:I.name)&&void 0!==i?i:L,version:null!==(o=null==I?void 0:I.version)&&void 0!==o?o:k},localState:this.localState,assumeImmutableResults:M,onBroadcast:this.devtoolsConfig.enabled?function(){c.devToolsHookCb&&c.devToolsHookCb({action:{},state:{queries:c.queryManager.getQueryStore(),mutations:c.queryManager.mutationStore||{}},dataWithOptimisticResults:c.cache.extract(!0)})}:void 0}),this.devtoolsConfig.enabled&&this.connectToDevTools()}return Object.defineProperty(e.prototype,"prioritizeCacheValues",{get:function(){return this.disableNetworkFetches},set:function(e){this.disableNetworkFetches=e},enumerable:!1,configurable:!0}),e.prototype.connectToDevTools=function(){if("undefined"!=typeof window){var e=window,t=Symbol.for("apollo.devtools");(e[t]=e[t]||[]).push(this),e.__APOLLO_CLIENT__=this,Z||!1===globalThis.__DEV__||(Z=!0,window.document&&window.top===window.self&&/^(https?|file):$/.test(window.location.protocol)&&setTimeout(function(){if(!window.__APOLLO_DEVTOOLS_GLOBAL_HOOK__){var e=window.navigator,t=e&&e.userAgent,i=void 0;"string"==typeof t&&(t.indexOf("Chrome/")>-1?i="https://chrome.google.com/webstore/detail/apollo-client-developer-t/jdkknkkbebbapilgoeccciglkfbmbnfm":t.indexOf("Firefox/")>-1&&(i="https://addons.mozilla.org/en-US/firefox/addon/apollo-developer-tools/")),i&&!1!==globalThis.__DEV__&&s.V1.log("Download the Apollo DevTools for a better development experience: %s",i)}},1e4))}},Object.defineProperty(e.prototype,"documentTransform",{get:function(){return this.queryManager.documentTransform},enumerable:!1,configurable:!0}),e.prototype.stop=function(){this.queryManager.stop()},e.prototype.watchQuery=function(e){return this.defaultOptions.watchQuery&&(e=(0,q.l)(this.defaultOptions.watchQuery,e)),!this.disableNetworkFetches||"network-only"!==e.fetchPolicy&&"cache-and-network"!==e.fetchPolicy||(e=(0,n.__assign)((0,n.__assign)({},e),{fetchPolicy:"cache-first"})),!1!==globalThis.__DEV__&&((0,R.cc)(e,"canonizeResults","client.watchQuery"),(0,R.cc)(e,"partialRefetch","client.watchQuery")),this.queryManager.watchQuery(e)},e.prototype.query=function(e){return this.defaultOptions.query&&(e=(0,q.l)(this.defaultOptions.query,e)),(0,s.V1)("cache-and-network"!==e.fetchPolicy,18),this.disableNetworkFetches&&"network-only"===e.fetchPolicy&&(e=(0,n.__assign)((0,n.__assign)({},e),{fetchPolicy:"cache-first"})),!1!==globalThis.__DEV__&&((0,R.cc)(e,"canonizeResults","client.query"),(0,R.cc)(e,"notifyOnNetworkStatusChange","client.query","This option does not affect `client.query` and can be safely removed."),"standby"===e.fetchPolicy&&!1!==globalThis.__DEV__&&s.V1.warn(19)),this.queryManager.query(e)},e.prototype.mutate=function(e){return this.defaultOptions.mutate&&(e=(0,q.l)(this.defaultOptions.mutate,e)),this.queryManager.mutate(e)},e.prototype.subscribe=function(e){var t=this,i=this.queryManager.generateQueryId();return this.queryManager.startGraphQLSubscription(e).map(function(s){return(0,n.__assign)((0,n.__assign)({},s),{data:t.queryManager.maskOperation({document:e.query,data:s.data,fetchPolicy:e.fetchPolicy,id:i})})})},e.prototype.readQuery=function(e,t){return void 0===t&&(t=!1),this.cache.readQuery(e,t)},e.prototype.watchFragment=function(e){var t;return this.cache.watchFragment((0,n.__assign)((0,n.__assign)({},e),((t={})[Symbol.for("apollo.dataMasking")]=this.queryManager.dataMasking,t)))},e.prototype.readFragment=function(e,t){return void 0===t&&(t=!1),this.cache.readFragment(e,t)},e.prototype.writeQuery=function(e){var t=this.cache.writeQuery(e);return!1!==e.broadcast&&this.queryManager.broadcastQueries(),t},e.prototype.writeFragment=function(e){var t=this.cache.writeFragment(e);return!1!==e.broadcast&&this.queryManager.broadcastQueries(),t},e.prototype.__actionHookForDevTools=function(e){this.devToolsHookCb=e},e.prototype.__requestRaw=function(e){return(0,o.g)(this.link,e)},e.prototype.resetStore=function(){var e=this;return Promise.resolve().then(function(){return e.queryManager.clearStore({discardWatches:!1})}).then(function(){return Promise.all(e.resetStoreCallbacks.map(function(e){return e()}))}).then(function(){return e.reFetchObservableQueries()})},e.prototype.clearStore=function(){var e=this;return Promise.resolve().then(function(){return e.queryManager.clearStore({discardWatches:!0})}).then(function(){return Promise.all(e.clearStoreCallbacks.map(function(e){return e()}))})},e.prototype.onResetStore=function(e){var t=this;return this.resetStoreCallbacks.push(e),function(){t.resetStoreCallbacks=t.resetStoreCallbacks.filter(function(t){return t!==e})}},e.prototype.onClearStore=function(e){var t=this;return this.clearStoreCallbacks.push(e),function(){t.clearStoreCallbacks=t.clearStoreCallbacks.filter(function(t){return t!==e})}},e.prototype.reFetchObservableQueries=function(e){return this.queryManager.reFetchObservableQueries(e)},e.prototype.refetchQueries=function(e){var t=this.queryManager.refetchQueries(e),i=[],n=[];t.forEach(function(e,t){i.push(t),n.push(e)});var r=Promise.all(n);return r.queries=i,r.results=n,r.catch(function(e){!1!==globalThis.__DEV__&&s.V1.debug(20,e)}),r},e.prototype.getObservableQueries=function(e){return void 0===e&&(e="active"),this.queryManager.getObservableQueries(e)},e.prototype.extract=function(e){return this.cache.extract(e)},e.prototype.restore=function(e){return this.cache.restore(e)},e.prototype.addResolvers=function(e){this.localState.addResolvers(e)},e.prototype.setResolvers=function(e){this.localState.setResolvers(e)},e.prototype.getResolvers=function(){return this.localState.getResolvers()},e.prototype.setLocalStateFragmentMatcher=function(e){this.localState.setFragmentMatcher(e)},e.prototype.setLink=function(e){this.link=this.queryManager.link=e},Object.defineProperty(e.prototype,"defaultContext",{get:function(){return this.queryManager.defaultContext},enumerable:!1,configurable:!0}),e}();!1!==globalThis.__DEV__&&(Q.prototype.getMemoryInternals=X.ep)},78440(e,t,i){"use strict";i.d(t,{U:()=>b,y:()=>w});var n=i(65959),s=i(131),r=i(45063),o=i(49995),a=i(51759),l=i(47812),c=i(90767),h=i(37563),d=i(20658),u=i(24783),p=i(58173),g=i(17303),f=i(47372),m=i(81987),v=i(30301),y=Object.assign,C=Object.hasOwnProperty,b=function(e){function t(i){var s=i.queryManager,r=i.queryInfo,o=i.options,a=this,c=t.inactiveOnCreation.getValue();(a=e.call(this,function(e){a._getOrCreateQuery();try{var t=e._subscription._observer;t&&!t.error&&(t.error=S)}catch(e){}var i=!a.observers.size;a.observers.add(e);var n=a.last;return n&&n.error?e.error&&e.error(n.error):n&&n.result&&e.next&&e.next(a.maskResult(n.result)),i&&a.reobserve().catch(function(){}),function(){a.observers.delete(e)&&!a.observers.size&&a.tearDownQuery()}})||this).observers=new Set,a.subscriptions=new Set,a.dirty=!1,a._getOrCreateQuery=function(){return c&&(s.queries.set(a.queryId,r),c=!1),a.queryManager.getOrCreateQuery(a.queryId)},a.queryInfo=r,a.queryManager=s,a.waitForOwnResult=x(o.fetchPolicy),a.isTornDown=!1,a.subscribeToMore=a.subscribeToMore.bind(a),a.maskResult=a.maskResult.bind(a);var h=s.defaultOptions.watchQuery,d=(void 0===h?{}:h).fetchPolicy,u=void 0===d?"cache-first":d,p=o.fetchPolicy,g=void 0===p?u:p,f=o.initialFetchPolicy,m=void 0===f?"standby"===g?u:g:f;a.options=(0,n.__assign)((0,n.__assign)({},o),{initialFetchPolicy:m,fetchPolicy:g}),a.queryId=r.queryId||s.generateQueryId();var v=(0,l.Vu)(a.query);return a.queryName=v&&v.name&&v.name.value,a}return(0,n.__extends)(t,e),Object.defineProperty(t.prototype,"query",{get:function(){return this.lastQuery||this.options.query},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"variables",{get:function(){return this.options.variables},enumerable:!1,configurable:!0}),t.prototype.result=function(){var e=this;return!1!==globalThis.__DEV__&&(0,v.S2)("observableQuery.result",function(){!1!==globalThis.__DEV__&&s.V1.warn(23)}),new Promise(function(t,i){var n={next:function(i){t(i),e.observers.delete(n),e.observers.size||e.queryManager.removeQuery(e.queryId),setTimeout(function(){s.unsubscribe()},0)},error:i},s=e.subscribe(n)})},t.prototype.resetDiff=function(){this.queryInfo.resetDiff()},t.prototype.getCurrentFullResult=function(e){var t=this;void 0===e&&(e=!0);var i=(0,v.lz)("getLastResult",function(){return t.getLastResult(!0)}),s=this.queryInfo.networkStatus||i&&i.networkStatus||o.pT.ready,a=(0,n.__assign)((0,n.__assign)({},i),{loading:(0,o.bi)(s),networkStatus:s}),l=this.options.fetchPolicy,c=void 0===l?"cache-first":l;if(x(c)||this.queryManager.getDocumentInfo(this.query).hasForcedResolvers);else if(this.waitForOwnResult)this.queryInfo.updateWatch();else{var h=this.queryInfo.getDiff();(h.complete||this.options.returnPartialData)&&(a.data=h.result),(0,r.L)(a.data,{})&&(a.data=void 0),h.complete?(delete a.partial,!h.complete||a.networkStatus!==o.pT.loading||"cache-first"!==c&&"cache-only"!==c||(a.networkStatus=o.pT.ready,a.loading=!1)):a.partial=!0,a.networkStatus===o.pT.ready&&(a.error||a.errors)&&(a.networkStatus=o.pT.error),!1===globalThis.__DEV__||h.complete||this.options.partialRefetch||a.loading||a.data||a.error||w(h.missing)}return e&&this.updateLastResult(a),a},t.prototype.getCurrentResult=function(e){return void 0===e&&(e=!0),this.maskResult(this.getCurrentFullResult(e))},t.prototype.isDifferentFromLastResult=function(e,t){if(!this.last)return!0;var i=this.queryManager.getDocumentInfo(this.query),n=this.queryManager.dataMasking,s=n?i.nonReactiveQuery:this.query;return(n||i.hasNonreactiveDirective?!(0,f.a)(s,this.last.result,e,this.variables):!(0,r.L)(this.last.result,e))||t&&!(0,r.L)(this.last.variables,t)},t.prototype.getLast=function(e,t){var i=this.last;if(i&&i[e]&&(!t||(0,r.L)(i.variables,this.variables)))return i[e]},t.prototype.getLastResult=function(e){return!1!==globalThis.__DEV__&&(0,v.S2)("getLastResult",function(){!1!==globalThis.__DEV__&&s.V1.warn(24)}),this.getLast("result",e)},t.prototype.getLastError=function(e){return!1!==globalThis.__DEV__&&(0,v.S2)("getLastError",function(){!1!==globalThis.__DEV__&&s.V1.warn(25)}),this.getLast("error",e)},t.prototype.resetLastResults=function(){!1!==globalThis.__DEV__&&(0,v.S2)("resetLastResults",function(){!1!==globalThis.__DEV__&&s.V1.warn(26)}),delete this.last,this.isTornDown=!1},t.prototype.resetQueryStoreErrors=function(){!1!==globalThis.__DEV__&&!1!==globalThis.__DEV__&&s.V1.warn(27),this.queryManager.resetErrors(this.queryId)},t.prototype.refetch=function(e){var t,i={pollInterval:0},a=this.options.fetchPolicy;if(i.fetchPolicy="no-cache"===a?"no-cache":"network-only",!1!==globalThis.__DEV__&&e&&C.call(e,"variables")){var c=(0,l.AT)(this.query),h=c.variableDefinitions;h&&h.some(function(e){return"variables"===e.variable.name.value})||!1!==globalThis.__DEV__&&s.V1.warn(28,e,(null===(t=c.name)||void 0===t?void 0:t.value)||c)}return e&&!(0,r.L)(this.options.variables,e)&&(i.variables=this.options.variables=(0,n.__assign)((0,n.__assign)({},this.options.variables),e)),this.queryInfo.resetLastWrite(),this.reobserve(i,o.pT.refetch)},t.prototype.fetchMore=function(e){var t=this,i=(0,n.__assign)((0,n.__assign)({},e.query?e:(0,n.__assign)((0,n.__assign)((0,n.__assign)((0,n.__assign)({},this.options),{query:this.options.query}),e),{variables:(0,n.__assign)((0,n.__assign)({},this.options.variables),e.variables)})),{fetchPolicy:"no-cache"});i.query=this.transformDocument(i.query);var r=this.queryManager.generateQueryId();this.lastQuery=e.query?this.transformDocument(this.options.query):i.query;var a=this.queryInfo,l=a.networkStatus;a.networkStatus=o.pT.fetchMore,i.notifyOnNetworkStatusChange&&this.observe();var c=new Set,h=null==e?void 0:e.updateQuery,d="no-cache"!==this.options.fetchPolicy;return d||(0,s.V1)(h,29),this.queryManager.fetchQuery(r,i,o.pT.fetchMore).then(function(s){if(t.queryManager.removeQuery(r),a.networkStatus===o.pT.fetchMore&&(a.networkStatus=l),d)t.queryManager.cache.batch({update:function(n){var r=e.updateQuery;r?n.updateQuery({query:t.query,variables:t.variables,returnPartialData:!0,optimistic:!1},function(e){return r(e,{fetchMoreResult:s.data,variables:i.variables})}):n.writeQuery({query:i.query,variables:i.variables,data:s.data})},onWatchUpdated:function(e){c.add(e.query)}});else{var u=t.getLast("result"),p=h(u.data,{fetchMoreResult:s.data,variables:i.variables});t.reportResult((0,n.__assign)((0,n.__assign)({},u),{networkStatus:l,loading:(0,o.bi)(l),data:p}),t.variables)}return t.maskResult(s)}).finally(function(){d&&!c.has(t.query)&&t.reobserveCacheFirst()})},t.prototype.subscribeToMore=function(e){var t=this,i=this.queryManager.startGraphQLSubscription({query:e.document,variables:e.variables,context:e.context}).subscribe({next:function(i){var s=e.updateQuery;s&&t.updateQuery(function(e,t){return s(e,(0,n.__assign)({subscriptionData:i},t))})},error:function(t){e.onError?e.onError(t):!1!==globalThis.__DEV__&&s.V1.error(30,t)}});return this.subscriptions.add(i),function(){t.subscriptions.delete(i)&&i.unsubscribe()}},t.prototype.setOptions=function(e){return!1!==globalThis.__DEV__&&((0,v.cc)(e,"canonizeResults","setOptions"),(0,v.S2)("setOptions",function(){!1!==globalThis.__DEV__&&s.V1.warn(31)})),this.reobserve(e)},t.prototype.silentSetOptions=function(e){var t=(0,p.o)(this.options,e||{});y(this.options,t)},t.prototype.setVariables=function(e){var t=this;return(0,r.L)(this.variables,e)?this.observers.size?(0,v.lz)("observableQuery.result",function(){return t.result()}):Promise.resolve():(this.options.variables=e,this.observers.size?this.reobserve({fetchPolicy:this.options.initialFetchPolicy,variables:e},o.pT.setVariables):Promise.resolve())},t.prototype.updateQuery=function(e){var t=this.queryManager,i=t.cache.diff({query:this.options.query,variables:this.variables,returnPartialData:!0,optimistic:!1}),n=i.result,s=i.complete,r=e(n,{variables:this.variables,complete:!!s,previousData:n});r&&(t.cache.writeQuery({query:this.options.query,data:r,variables:this.variables}),t.broadcastQueries())},t.prototype.startPolling=function(e){this.options.pollInterval=e,this.updatePolling()},t.prototype.stopPolling=function(){this.options.pollInterval=0,this.updatePolling()},t.prototype.applyNextFetchPolicy=function(e,t){if(t.nextFetchPolicy){var i=t.fetchPolicy,n=void 0===i?"cache-first":i,s=t.initialFetchPolicy,r=void 0===s?n:s;"standby"===n||("function"==typeof t.nextFetchPolicy?t.fetchPolicy=t.nextFetchPolicy(n,{reason:e,options:t,observable:this,initialFetchPolicy:r}):t.fetchPolicy="variables-changed"===e?r:t.nextFetchPolicy)}return t.fetchPolicy},t.prototype.fetch=function(e,t,i){var n=this._getOrCreateQuery();return n.setObservableQuery(this),this.queryManager.fetchConcastWithInfo(n,e,t,i)},t.prototype.updatePolling=function(){var e=this;if(!this.queryManager.ssrMode){var t=this.pollingInfo,i=this.options.pollInterval;if(i&&this.hasObservers()){if(!t||t.interval!==i){(0,s.V1)(i,32),(t||(this.pollingInfo={})).interval=i;var n=function(){var t,i;e.pollingInfo&&((0,o.bi)(e.queryInfo.networkStatus)||(null===(i=(t=e.options).skipPollAttempt)||void 0===i?void 0:i.call(t))?r():e.reobserve({fetchPolicy:"no-cache"===e.options.initialFetchPolicy?"no-cache":"network-only"},o.pT.poll).then(r,r))},r=function(){var t=e.pollingInfo;t&&(clearTimeout(t.timeout),t.timeout=setTimeout(n,t.interval))};r()}}else t&&(clearTimeout(t.timeout),delete this.pollingInfo)}},t.prototype.updateLastResult=function(e,t){var i=this;void 0===t&&(t=this.variables);var s=(0,v.lz)("getLastError",function(){return i.getLastError()});return s&&this.last&&!(0,r.L)(t,this.last.variables)&&(s=void 0),this.last=(0,n.__assign)({result:this.queryManager.assumeImmutableResults?e:(0,h.m)(e),variables:t},s?{error:s}:null)},t.prototype.reobserveAsConcast=function(e,t){var i=this;this.isTornDown=!1;var s=t===o.pT.refetch||t===o.pT.fetchMore||t===o.pT.poll,a=this.options.variables,l=this.options.fetchPolicy,c=(0,p.o)(this.options,e||{}),h=s?c:y(this.options,c),d=this.transformDocument(h.query);this.lastQuery=d,s||(this.updatePolling(),!e||!e.variables||(0,r.L)(e.variables,a)||"standby"===h.fetchPolicy||h.fetchPolicy!==l&&"function"!=typeof h.nextFetchPolicy||(this.applyNextFetchPolicy("variables-changed",h),void 0===t&&(t=o.pT.setVariables))),this.waitForOwnResult&&(this.waitForOwnResult=x(h.fetchPolicy));var u=function(){i.concast===v&&(i.waitForOwnResult=!1)},f=h.variables&&(0,n.__assign)({},h.variables),m=this.fetch(h,t,d),v=m.concast,C=m.fromLink,b={next:function(e){(0,r.L)(i.variables,f)&&(u(),i.reportResult(e,f))},error:function(e){(0,r.L)(i.variables,f)&&((0,g.Mn)(e)||(e=new g.K4({networkError:e})),u(),i.reportError(e,f))}};return s||!C&&this.concast||(this.concast&&this.observer&&this.concast.removeObserver(this.observer),this.concast=v,this.observer=b),v.addObserver(b),v},t.prototype.reobserve=function(e,t){return(0,c.X)(this.reobserveAsConcast(e,t).promise.then(this.maskResult))},t.prototype.resubscribeAfterError=function(){for(var e=this,t=[],i=0;i<arguments.length;i++)t[i]=arguments[i];var n=this.last;(0,v.lz)("resetLastResults",function(){return e.resetLastResults()});var s=this.subscribe.apply(this,t);return this.last=n,s},t.prototype.observe=function(){this.reportResult(this.getCurrentFullResult(!1),this.variables)},t.prototype.reportResult=function(e,t){var i=this,n=(0,v.lz)("getLastError",function(){return i.getLastError()}),s=this.isDifferentFromLastResult(e,t);(n||!e.partial||this.options.returnPartialData)&&this.updateLastResult(e,t),(n||s)&&(0,d.w)(this.observers,"next",this.maskResult(e))},t.prototype.reportError=function(e,t){var i=this,s=(0,n.__assign)((0,n.__assign)({},(0,v.lz)("getLastResult",function(){return i.getLastResult()})),{error:e,errors:e.graphQLErrors,networkStatus:o.pT.error,loading:!1});this.updateLastResult(s,t),(0,d.w)(this.observers,"error",this.last.error=e)},t.prototype.hasObservers=function(){return this.observers.size>0},t.prototype.tearDownQuery=function(){this.isTornDown||(this.concast&&this.observer&&(this.concast.removeObserver(this.observer),delete this.concast,delete this.observer),this.stopPolling(),this.subscriptions.forEach(function(e){return e.unsubscribe()}),this.subscriptions.clear(),this.queryManager.stopQuery(this.queryId),this.observers.clear(),this.isTornDown=!0)},t.prototype.transformDocument=function(e){return this.queryManager.transform(e)},t.prototype.maskResult=function(e){return e&&"data"in e?(0,n.__assign)((0,n.__assign)({},e),{data:this.queryManager.maskOperation({document:this.query,data:e.data,fetchPolicy:this.options.fetchPolicy,id:this.queryId})}):e},t.prototype.resetNotifications=function(){this.cancelNotifyTimeout(),this.dirty=!1},t.prototype.cancelNotifyTimeout=function(){this.notifyTimeout&&(clearTimeout(this.notifyTimeout),this.notifyTimeout=void 0)},t.prototype.scheduleNotify=function(){var e=this;this.dirty||(this.dirty=!0,this.notifyTimeout||(this.notifyTimeout=setTimeout(function(){return e.notify()},0)))},t.prototype.notify=function(){this.cancelNotifyTimeout(),this.dirty&&("cache-only"!=this.options.fetchPolicy&&"cache-and-network"!=this.options.fetchPolicy&&(0,o.bi)(this.queryInfo.networkStatus)||(this.queryInfo.getDiff().fromOptimisticTransaction?this.observe():this.reobserveCacheFirst())),this.dirty=!1},t.prototype.reobserveCacheFirst=function(){var e=this.options,t=e.fetchPolicy,i=e.nextFetchPolicy;return"cache-and-network"===t||"network-only"===t?this.reobserve({fetchPolicy:"cache-first",nextFetchPolicy:function(e,n){return this.nextFetchPolicy=i,"function"==typeof this.nextFetchPolicy?this.nextFetchPolicy(e,n):t}}):this.reobserve()},t.inactiveOnCreation=new m.DX,t}(a.c);function S(e){!1!==globalThis.__DEV__&&s.V1.error(33,e.message,e.stack)}function w(e){!1!==globalThis.__DEV__&&e&&!1!==globalThis.__DEV__&&s.V1.debug(34,e)}function x(e){return"network-only"===e||"no-cache"===e||"standby"===e}(0,u.r)(b)},47372(e,t,i){"use strict";i.d(t,{a:()=>c});var n=i(65959),s=i(45063),r=i(14270),o=i(48555),a=i(47812),l=i(99310);function c(e,t,i,r){var l=t.data,c=(0,n.__rest)(t,["data"]),d=i.data,u=(0,n.__rest)(i,["data"]);return(0,s.A)(c,u)&&h((0,a.Vn)(e).selectionSet,l,d,{fragmentMap:(0,o.JG)((0,a.zK)(e)),variables:r})}function h(e,t,i,n){if(t===i)return!0;var a=new Set;return e.selections.every(function(e){if(a.has(e))return!0;if(a.add(e),!(0,r.MS)(e,n.variables))return!0;if(d(e))return!0;if((0,l.dt)(e)){var c=(0,l.ue)(e),u=t&&t[c],p=i&&i[c],g=e.selectionSet;if(!g)return(0,s.A)(u,p);var f=Array.isArray(u),m=Array.isArray(p);if(f!==m)return!1;if(f&&m){var v=u.length;if(p.length!==v)return!1;for(var y=0;y<v;++y)if(!h(g,u[y],p[y],n))return!1;return!0}return h(g,u,p,n)}var C=(0,o.HQ)(e,n.fragmentMap);return C?!!d(C)||h(C.selectionSet,t,i,n):void 0})}function d(e){return!!e.directives&&e.directives.some(u)}function u(e){return"nonreactive"===e.name.value}},16266(e,t,i){"use strict";i.r(t),i.d(t,{ApolloCache:()=>c.k,ApolloClient:()=>s.R,ApolloError:()=>l.K4,ApolloLink:()=>f.C,Cache:()=>n,DocumentTransform:()=>T.c,HttpLink:()=>S.HttpLink,InMemoryCache:()=>h.D,MissingFieldError:()=>d.Z,NetworkStatus:()=>a.pT,Observable:()=>x.c,ObservableQuery:()=>o.U,checkFetcher:()=>S.checkFetcher,concat:()=>C,createHttpLink:()=>S.createHttpLink,createSignalIfSupported:()=>S.createSignalIfSupported,defaultDataIdFromObject:()=>u.or,defaultPrinter:()=>S.defaultPrinter,disableExperimentalFragmentVariables:()=>R.qj,disableFragmentWarnings:()=>R.gi,empty:()=>m,enableExperimentalFragmentVariables:()=>R.VC,execute:()=>b.g,fallbackHttpConfig:()=>S.fallbackHttpConfig,from:()=>v,fromError:()=>M.N,fromPromise:()=>E,gql:()=>R.J1,isApolloError:()=>l.Mn,isNetworkRequestSettled:()=>a.D2,isReference:()=>D.A_,makeReference:()=>D.WU,makeVar:()=>p.UT,mergeOptions:()=>r.l,parseAndCheckHttpResponse:()=>S.parseAndCheckHttpResponse,resetCaches:()=>R.Nh,rewriteURIForGET:()=>S.rewriteURIForGET,selectHttpOptionsAndBody:()=>S.selectHttpOptionsAndBody,selectHttpOptionsAndBodyInternal:()=>S.selectHttpOptionsAndBodyInternal,selectURI:()=>S.selectURI,serializeFetchParameter:()=>S.serializeFetchParameter,setLogVerbosity:()=>I.Q9,split:()=>y,throwServerError:()=>A.A,toPromise:()=>w});var n,s=i(50953),r=i(97460),o=i(78440),a=i(49995),l=i(17303);n||(n={});var c=i(30622),h=i(70415),d=i(79193),u=i(47422),p=i(67566),g=i(131),f=i(3224),m=f.C.empty,v=f.C.from,y=f.C.split,C=f.C.concat,b=i(34109),S=i(42007);function w(e){var t=!1;return new Promise(function(i,n){e.subscribe({next:function(e){t?!1!==globalThis.__DEV__&&g.V1.warn(57):(t=!0,i(e))},error:n})})}var x=i(51759);function E(e){return new x.c(function(t){e.then(function(e){t.next(e),t.complete()}).catch(t.error.bind(t))})}var M=i(47752),A=i(49703),T=i(78917),D=i(99310),I=i(92981),R=i(27477);(0,I.Q9)(!1!==globalThis.__DEV__?"log":"silent")},49995(e,t,i){"use strict";var n;function s(e){return!!e&&e<7}function r(e){return 7===e||8===e}i.d(t,{D2:()=>r,bi:()=>s,pT:()=>n}),function(e){e[e.loading=1]="loading",e[e.setVariables=2]="setVariables",e[e.fetchMore=3]="fetchMore",e[e.refetch=4]="refetch",e[e.poll=6]="poll",e[e.ready=7]="ready",e[e.error=8]="error"}(n||(n={}))},17303(e,t,i){"use strict";i.d(t,{K$:()=>r,K4:()=>l,Mn:()=>a,uR:()=>o});var n=i(65959),s=(i(131),i(1164)),r=Symbol();function o(e){return!!e.extensions&&Array.isArray(e.extensions[r])}function a(e){return e.hasOwnProperty("graphQLErrors")}var l=function(e){function t(i){var r,o,a=i.graphQLErrors,l=i.protocolErrors,c=i.clientErrors,h=i.networkError,d=i.errorMessage,u=i.extraInfo,p=e.call(this,d)||this;return p.name="ApolloError",p.graphQLErrors=a||[],p.protocolErrors=l||[],p.clientErrors=c||[],p.networkError=h||null,p.message=d||(r=p,o=(0,n.__spreadArray)((0,n.__spreadArray)((0,n.__spreadArray)([],r.graphQLErrors,!0),r.clientErrors,!0),r.protocolErrors,!0),r.networkError&&o.push(r.networkError),o.map(function(e){return(0,s.U)(e)&&e.message||"Error message not found."}).join("\n")),p.extraInfo=u,p.cause=(0,n.__spreadArray)((0,n.__spreadArray)((0,n.__spreadArray)([h],a||[],!0),l||[],!0),c||[],!0).find(function(e){return!!e})||null,p.__proto__=t.prototype,p}return(0,n.__extends)(t,e),t}(Error)},36712(e,t,i){"use strict";i.r(t),i.d(t,{setContext:()=>o});var n=i(65959),s=i(3224),r=i(51759);function o(e){return new s.C(function(t,i){var s=(0,n.__rest)(t,[]);return new r.c(function(n){var r,o=!1;return Promise.resolve(s).then(function(i){return e(i,t.getContext())}).then(t.setContext).then(function(){o||(r=i(t).subscribe({next:n.next.bind(n),error:n.error.bind(n),complete:n.complete.bind(n)}))}).catch(n.error.bind(n)),function(){o=!0,r&&r.unsubscribe()}})})}},3224(e,t,i){"use strict";i.d(t,{C:()=>d});var n=i(131),s=i(51759),r=i(65959),o=i(47812),a=i(30301);function l(e,t){return t?t(e):s.c.of()}function c(e){return"function"==typeof e?new d(e):e}function h(e){return e.request.length<=1}var d=function(){function e(e){e&&(this.request=e)}return e.empty=function(){return new e(function(){return s.c.of()})},e.from=function(t){return 0===t.length?e.empty():t.map(c).reduce(function(e,t){return e.concat(t)})},e.split=function(t,i,n){var r,o=c(i),a=c(n||new e(l));return r=h(o)&&h(a)?new e(function(e){return t(e)?o.request(e)||s.c.of():a.request(e)||s.c.of()}):new e(function(e,i){return t(e)?o.request(e,i)||s.c.of():a.request(e,i)||s.c.of()}),Object.assign(r,{left:o,right:a})},e.execute=function(e,t){return e.request(function(e,t){var i=(0,r.__assign)({},e);return Object.defineProperty(t,"setContext",{enumerable:!1,value:function(e){i="function"==typeof e?(0,r.__assign)((0,r.__assign)({},i),e(i)):(0,r.__assign)((0,r.__assign)({},i),e)}}),Object.defineProperty(t,"getContext",{enumerable:!1,value:function(){return(0,r.__assign)({},i)}}),t}(t.context,function(e){var t={variables:e.variables||{},extensions:e.extensions||{},operationName:e.operationName,query:e.query};return t.operationName||(t.operationName="string"!=typeof t.query?(0,o.n4)(t.query)||void 0:""),t}(function(e){for(var t=["query","operationName","variables","extensions","context"],i=0,s=Object.keys(e);i<s.length;i++){var r=s[i];if(t.indexOf(r)<0)throw(0,n.vA)(58,r)}return e}(t))))||s.c.of()},e.concat=function(t,i){var r=c(t);if(h(r))return!1!==globalThis.__DEV__&&n.V1.warn(47,r),r;var o,a=c(i);return o=h(a)?new e(function(e){return r.request(e,function(e){return a.request(e)||s.c.of()})||s.c.of()}):new e(function(e,t){return r.request(e,function(e){return a.request(e,t)||s.c.of()})||s.c.of()}),Object.assign(o,{left:r,right:a})},e.prototype.split=function(t,i,n){return this.concat(e.split(t,i,n||new e(l)))},e.prototype.concat=function(t){return e.concat(this,t)},e.prototype.request=function(e,t){throw(0,n.vA)(48)},e.prototype.onError=function(e,t){if(!1!==globalThis.__DEV__&&(0,a.S2)("onError",function(){!1!==globalThis.__DEV__&&n.V1.warn(49)}),t&&t.error)return t.error(e),!1;throw e},e.prototype.setOnError=function(e){return!1!==globalThis.__DEV__&&!1!==globalThis.__DEV__&&n.V1.warn(50),this.onError=e,this},e}()},34109(e,t,i){"use strict";i.d(t,{g:()=>n});var n=i(3224).C.execute},81381(e,t,i){"use strict";i.d(t,{S:()=>a});var n=i(65959),s=i(17303),r=i(51759),o=i(3224);function a(e){return new o.C(function(t,i){return new r.c(function(n){var r,o,a;try{r=i(t).subscribe({next:function(r){r.errors?a=e({graphQLErrors:r.errors,response:r,operation:t,forward:i}):(0,s.uR)(r)&&(a=e({protocolErrors:r.extensions[s.K$],response:r,operation:t,forward:i})),a?o=a.subscribe({next:n.next.bind(n),error:n.error.bind(n),complete:n.complete.bind(n)}):n.next(r)},error:function(s){(a=e({operation:t,networkError:s,graphQLErrors:s&&s.result&&s.result.errors||void 0,forward:i}))?o=a.subscribe({next:n.next.bind(n),error:n.error.bind(n),complete:n.complete.bind(n)}):n.error(s)},complete:function(){a||n.complete.bind(n)()}})}catch(s){e({networkError:s,operation:t,forward:i}),n.error(s)}return function(){r&&r.unsubscribe(),o&&r.unsubscribe()}})})}!function(e){function t(t){var i=e.call(this)||this;return i.link=a(t),i}(0,n.__extends)(t,e),t.prototype.request=function(e,t){return this.link.request(e,t)}}(o.C)},39781(e,t,i){"use strict";i.d(t,{P:()=>o});var n=i(65959),s=i(3224),r=i(48674),o=function(e){function t(t){void 0===t&&(t={});var i=e.call(this,(0,r.$)(t).request)||this;return i.options=t,i}return(0,n.__extends)(t,e),t}(s.C)},75938(e,t,i){"use strict";i.d(t,{S:()=>s});var n=i(131),s=function(e){if(!e&&"undefined"==typeof fetch)throw(0,n.vA)(51)}},48674(e,t,i){"use strict";i.d(t,{$:()=>C});var n=i(65959),s=i(131),r=i(3224),o=i(14270),a=i(51759),l=i(87708),c=i(61555),h=i(80243),d=i(75938),u=i(55662),p=i(76662),g=i(47752),f=i(85517),m=i(83906),v=i(47812),y=(0,s.no)(function(){return fetch}),C=function(e){void 0===e&&(e={});var t=e.uri,i=void 0===t?"/graphql":t,C=e.fetch,b=e.print,S=void 0===b?u.i1:b,w=e.includeExtensions,x=e.preserveHeaderCase,E=e.useGETForQueries,M=e.includeUnusedVariables,A=void 0!==M&&M,T=(0,n.__rest)(e,["uri","fetch","print","includeExtensions","preserveHeaderCase","useGETForQueries","includeUnusedVariables"]);!1!==globalThis.__DEV__&&(0,d.S)(C||y);var D={http:{includeExtensions:w,preserveHeaderCase:x},options:T.fetchOptions,credentials:T.credentials,headers:T.headers};return new r.C(function(e){var t=(0,c.z)(e,i),r=e.getContext(),d={};if(r.clientAwareness){var b=r.clientAwareness,w=b.name,x=b.version;w&&(d["apollographql-client-name"]=w),x&&(d["apollographql-client-version"]=x)}var M=(0,n.__assign)((0,n.__assign)({},d),r.headers),T={http:r.http,options:r.fetchOptions,credentials:r.credentials,headers:M};if((0,o.d8)(["client"],e.query)){!1!==globalThis.__DEV__&&!1!==globalThis.__DEV__&&s.V1.warn(52);var I=(0,m.er)(e.query);if(!I)return(0,g.N)(new Error("HttpLink: Trying to send a client-only query to the server. To send to the server, ensure a non-client field is added to the query or set the `transformOptions.removeClientFields` option to `true`."));e.query=I}var R,L,k,P,N,O=(0,u.HY)(e,S,u.R4,D,T),_=O.options,F=O.body;F.variables&&!A&&(F.variables=(R=F.variables,L=e.query,k=(0,n.__assign)({},R),P=new Set(Object.keys(R)),(0,f.YR)(L,{Variable:function(e,t,i){i&&"VariableDefinition"!==i.kind&&P.delete(e.name.value)}}),P.forEach(function(e){delete k[e]}),k)),_.signal||"undefined"==typeof AbortController||(N=new AbortController,_.signal=N.signal);var G,V="OperationDefinition"===(G=(0,v.Vn)(e.query)).kind&&"subscription"===G.operation,B=(0,o.d8)(["defer"],e.query);if(E&&!e.query.definitions.some(function(e){return"OperationDefinition"===e.kind&&"mutation"===e.operation})&&(_.method="GET"),B||V){_.headers=_.headers||{};var H="multipart/mixed;";V&&B&&!1!==globalThis.__DEV__&&s.V1.warn(53),V?H+="boundary=graphql;subscriptionSpec=1.0,application/json":B&&(H+="deferSpec=20220824,application/json"),_.headers.accept=H}if("GET"===_.method){var z=(0,p.E)(t,F),U=z.newURI,W=z.parseError;if(W)return(0,g.N)(W);t=U}else try{_.body=(0,l.Y)(F,"Payload")}catch(W){return(0,g.N)(W)}return new a.c(function(i){var n=C||(0,s.no)(function(){return fetch})||y,r=i.next.bind(i);return n(t,_).then(function(t){var i;e.setContext({response:t});var n=null===(i=t.headers)||void 0===i?void 0:i.get("content-type");return null!==n&&/^multipart\/mixed/i.test(n)?(0,h.tD)(t,r):(0,h.OQ)(e)(t).then(r)}).then(function(){N=void 0,i.complete()}).catch(function(e){N=void 0,(0,h.H4)(e,i)}),function(){N&&N.abort()}})})}},42007(e,t,i){"use strict";i.r(t),i.d(t,{HttpLink:()=>h.P,checkFetcher:()=>o.S,createHttpLink:()=>c.$,createSignalIfSupported:()=>a,defaultPrinter:()=>r.i1,fallbackHttpConfig:()=>r.R4,parseAndCheckHttpResponse:()=>n.OQ,rewriteURIForGET:()=>d.E,selectHttpOptionsAndBody:()=>r.Wz,selectHttpOptionsAndBodyInternal:()=>r.HY,selectURI:()=>l.z,serializeFetchParameter:()=>s.Y}),i(131);var n=i(80243),s=i(87708),r=i(55662),o=i(75938),a=function(){if("undefined"==typeof AbortController)return{controller:!1,signal:!1};var e=new AbortController;return{controller:e,signal:e.signal}},l=i(61555),c=i(48674),h=i(39781),d=i(76662)},80243(e,t,i){"use strict";i.d(t,{H4:()=>g,OQ:()=>f,tD:()=>d});var n=i(65959),s=i(97703);function r(e){var t={next:function(){return e.read()}};return s.uJ&&(t[Symbol.asyncIterator]=function(){return this}),t}function o(e){var t,i,n,o=e;if(e.body&&(o=e.body),n=o,s.uJ&&n[Symbol.asyncIterator])return i=o[Symbol.asyncIterator](),(t={next:function(){return i.next()}})[Symbol.asyncIterator]=function(){return this},t;if(function(e){return!!e.getReader}(o))return r(o.getReader());if(function(e){return!!e.stream}(o))return r(o.stream().getReader());if(function(e){return!!e.arrayBuffer}(o))return function(e){var t=!1,i={next:function(){return t?Promise.resolve({value:void 0,done:!0}):(t=!0,new Promise(function(t,i){e.then(function(e){t({value:e,done:!1})}).catch(i)}))}};return s.uJ&&(i[Symbol.asyncIterator]=function(){return this}),i}(o.arrayBuffer());if(function(e){return!!e.pipe}(o))return function(e){var t=null,i=null,n=!1,r=[],o=[];function a(e){if(!i){if(o.length){var t=o.shift();if(Array.isArray(t)&&t[0])return t[0]({value:e,done:!1})}r.push(e)}}function l(e){i=e,o.slice().forEach(function(t){t[1](e)}),!t||t()}function c(){n=!0,o.slice().forEach(function(e){e[0]({value:void 0,done:!0})}),!t||t()}t=function(){t=null,e.removeListener("data",a),e.removeListener("error",l),e.removeListener("end",c),e.removeListener("finish",c),e.removeListener("close",c)},e.on("data",a),e.on("error",l),e.on("end",c),e.on("finish",c),e.on("close",c);var h={next:function(){return new Promise(function(e,t){return i?t(i):r.length?e({value:r.shift(),done:!1}):n?e({value:void 0,done:!0}):void o.push([e,t])})}};return s.uJ&&(h[Symbol.asyncIterator]=function(){return this}),h}(o);throw new Error("Unknown body type for responseIterator. Please pass a streamable response.")}var a=i(49703),l=i(17303),c=i(94537),h=Object.prototype.hasOwnProperty;function d(e,t){return(0,n.__awaiter)(this,void 0,void 0,function(){var i,s,r,a,h,d,g,f,m,v,y,C,b,S,w,x,E,M,A,T,D,I,R,L;return(0,n.__generator)(this,function(k){switch(k.label){case 0:if(void 0===TextDecoder)throw new Error("TextDecoder must be defined in the environment: please import a polyfill.");i=new TextDecoder("utf-8"),s=null===(L=e.headers)||void 0===L?void 0:L.get("content-type"),r="boundary=",a=(null==s?void 0:s.includes(r))?null==s?void 0:s.substring((null==s?void 0:s.indexOf(r))+9).replace(/['"]/g,"").replace(/\;(.*)/gm,"").trim():"-",h="\r\n--".concat(a),d="",g=o(e),f=!0,k.label=1;case 1:return f?[4,g.next()]:[3,3];case 2:for(m=k.sent(),v=m.value,y=m.done,C="string"==typeof v?v:i.decode(v),b=d.length-h.length+1,f=!y,S=(d+=C).indexOf(h,b);S>-1;){if(w=void 0,I=[d.slice(0,S),d.slice(S+h.length)],d=I[1],x=(w=I[0]).indexOf("\r\n\r\n"),E=u(w.slice(0,x)),(M=E["content-type"])&&-1===M.toLowerCase().indexOf("application/json"))throw new Error("Unsupported patch content type: application/json is required.");if(A=w.slice(x))if(T=p(e,A),Object.keys(T).length>1||"data"in T||"incremental"in T||"errors"in T||"payload"in T)if((0,c.Nw)(T)){if(D={},"payload"in T){if(1===Object.keys(T).length&&null===T.payload)return[2];D=(0,n.__assign)({},T.payload)}"errors"in T&&(D=(0,n.__assign)((0,n.__assign)({},D),{extensions:(0,n.__assign)((0,n.__assign)({},"extensions"in D?D.extensions:null),(R={},R[l.K$]=T.errors,R))})),t(D)}else t(T);else if(1===Object.keys(T).length&&"hasNext"in T&&!T.hasNext)return[2];S=d.indexOf(h)}return[3,1];case 3:return[2]}})})}function u(e){var t={};return e.split("\n").forEach(function(e){var i=e.indexOf(":");if(i>-1){var n=e.slice(0,i).trim().toLowerCase(),s=e.slice(i+1).trim();t[n]=s}}),t}function p(e,t){e.status>=300&&(0,a.A)(e,function(){try{return JSON.parse(t)}catch(e){return t}}(),"Response not successful: Received status code ".concat(e.status));try{return JSON.parse(t)}catch(n){var i=n;throw i.name="ServerParseError",i.response=e,i.statusCode=e.status,i.bodyText=t,i}}function g(e,t){e.result&&e.result.errors&&e.result.data&&t.next(e.result),t.error(e)}function f(e){return function(t){return t.text().then(function(e){return p(t,e)}).then(function(i){return Array.isArray(i)||h.call(i,"data")||h.call(i,"errors")||(0,a.A)(t,i,"Server response was missing for query '".concat(Array.isArray(e)?e.map(function(e){return e.operationName}):e.operationName,"'.")),i})}}},76662(e,t,i){"use strict";i.d(t,{E:()=>s});var n=i(87708);function s(e,t){var i=[],s=function(e,t){i.push("".concat(e,"=").concat(encodeURIComponent(t)))};if("query"in t&&s("query",t.query),t.operationName&&s("operationName",t.operationName),t.variables){var r=void 0;try{r=(0,n.Y)(t.variables,"Variables map")}catch(e){return{parseError:e}}s("variables",r)}if(t.extensions){var o=void 0;try{o=(0,n.Y)(t.extensions,"Extensions map")}catch(e){return{parseError:e}}s("extensions",o)}var a="",l=e,c=e.indexOf("#");-1!==c&&(a=e.substr(c),l=e.substr(0,c));var h=-1===l.indexOf("?")?"?":"&";return{newURI:l+h+i.join("&")+a}}},55662(e,t,i){"use strict";i.d(t,{HY:()=>l,R4:()=>r,Wz:()=>a,i1:()=>o});var n=i(65959),s=i(33137),r={http:{includeQuery:!0,includeExtensions:!1,preserveHeaderCase:!1},headers:{accept:"*/*","content-type":"application/json"},options:{method:"POST"}},o=function(e,t){return t(e)};function a(e,t){for(var i=[],s=2;s<arguments.length;s++)i[s-2]=arguments[s];return i.unshift(t),l.apply(void 0,(0,n.__spreadArray)([e,o],i,!1))}function l(e,t){for(var i=[],r=2;r<arguments.length;r++)i[r-2]=arguments[r];var o={},a={};i.forEach(function(e){o=(0,n.__assign)((0,n.__assign)((0,n.__assign)({},o),e.options),{headers:(0,n.__assign)((0,n.__assign)({},o.headers),e.headers)}),e.credentials&&(o.credentials=e.credentials),a=(0,n.__assign)((0,n.__assign)({},a),e.http)}),o.headers&&(o.headers=function(e,t){if(!t){var i={};return Object.keys(Object(e)).forEach(function(t){i[t.toLowerCase()]=e[t]}),i}var n={};Object.keys(Object(e)).forEach(function(t){n[t.toLowerCase()]={originalName:t,value:e[t]}});var s={};return Object.keys(n).forEach(function(e){s[n[e].originalName]=n[e].value}),s}(o.headers,a.preserveHeaderCase));var l=e.operationName,c=e.extensions,h=e.variables,d=e.query,u={operationName:l,variables:h};return a.includeExtensions&&(u.extensions=c),a.includeQuery&&(u.query=t(d,s.y)),{options:o,body:u}}},61555(e,t,i){"use strict";i.d(t,{z:()=>n});var n=function(e,t){return e.getContext().uri||("function"==typeof t?t(e):t||"/graphql")}},87708(e,t,i){"use strict";i.d(t,{Y:()=>s});var n=i(131),s=function(e,t){var i;try{i=JSON.stringify(e)}catch(e){var s=(0,n.vA)(54,t,e.message);throw s.parseError=e,s}return i}},47752(e,t,i){"use strict";i.d(t,{N:()=>s});var n=i(51759);function s(e){return new n.c(function(t){t.error(e)})}},49703(e,t,i){"use strict";i.d(t,{A:()=>n});var n=function(e,t,i){var n=new Error(i);throw n.name="ServerError",n.response=e,n.statusCode=e.status,n.result=t,n}},94959(e,t,i){"use strict";i.d(t,{S:()=>c});var n=i(49270),s=i(14270),r=i(99310),o=i(12209),a=i(71637),l=i(131);function c(e,t,i){return a.yV.withValue(!0,function(){var n=h(e,t,i,!1);return Object.isFrozen(e)&&(0,o.G)(n),n})}function h(e,t,i,o,a){var c,u=i.knownChanged,p=function(e,t){if(t.has(e))return t.get(e);var i=Array.isArray(e)?[]:Object.create(null);return t.set(e,i),i}(e,i.mutableTargets);if(Array.isArray(e)){for(var g=0,f=Array.from(e.entries());g<f.length;g++){var m=f[g],v=m[0],y=m[1];if(null!==y){var C=h(y,t,i,o,!1!==globalThis.__DEV__?"".concat(a||"","[").concat(v,"]"):void 0);u.has(C)&&u.add(p),p[v]=C}else p[v]=null}return u.has(p)?p:e}for(var b=0,S=t.selections;b<S.length;b++){var w=S[b],x=void 0;if(o&&u.add(p),w.kind===n.b.FIELD){var E=(0,r.ue)(w),M=w.selectionSet;if(void 0===(x=p[E]||e[E]))continue;M&&null!==x&&(C=h(e[E],M,i,o,!1!==globalThis.__DEV__?"".concat(a||"",".").concat(E):void 0),u.has(C)&&(x=C)),!1===globalThis.__DEV__&&(p[E]=x),!1!==globalThis.__DEV__&&(o&&"__typename"!==E&&!(null===(c=Object.getOwnPropertyDescriptor(p,E))||void 0===c?void 0:c.value)?Object.defineProperty(p,E,d(E,x,a||"",i.operationName,i.operationType)):(delete p[E],p[E]=x))}if(w.kind!==n.b.INLINE_FRAGMENT||w.typeCondition&&!i.cache.fragmentMatches(w,e.__typename)||(x=h(e,w.selectionSet,i,o,a)),w.kind===n.b.FRAGMENT_SPREAD){var A=w.name.value,T=i.fragmentMap[A]||(i.fragmentMap[A]=i.cache.lookupFragment(A));(0,l.V1)(T,59,A);var D=(0,s.s7)(w);"mask"!==D&&(x=h(e,T.selectionSet,i,"migrate"===D,a))}u.has(x)&&u.add(p)}return"__typename"in e&&!("__typename"in p)&&(p.__typename=e.__typename),Object.keys(p).length!==Object.keys(e).length&&u.add(p),u.has(p)?p:e}function d(e,t,i,n,s){var r=function(){return a.yV.getValue()||(!1!==globalThis.__DEV__&&l.V1.warn(60,n?"".concat(s," '").concat(n,"'"):"anonymous ".concat(s),"".concat(i,".").concat(e).replace(/^\./,"")),r=function(){return t}),t};return{get:function(){return r()},set:function(e){r=function(){return e}},enumerable:!0,configurable:!0}}},13062(e,t,i){"use strict";i.d(t,{z:()=>h});var n=i(49270),s=i(71637),r=i(131),o=i(45063),a=i(94959),l=i(48555),c=i(47812);function h(e,t,i,h){if(!i.fragmentMatches)return!1!==globalThis.__DEV__&&(0,s.Ki)(),e;var d=t.definitions.filter(function(e){return e.kind===n.b.FRAGMENT_DEFINITION});void 0===h&&((0,r.V1)(1===d.length,61,d.length),h=d[0].name.value);var u=d.find(function(e){return e.name.value===h});return(0,r.V1)(!!u,62,h),null==e||(0,o.A)(e,{})?e:(0,a.S)(e,u.selectionSet,{operationType:"fragment",operationName:u.name.value,fragmentMap:(0,l.JG)((0,c.zK)(t)),cache:i,mutableTargets:new s.jq,knownChanged:new s.xm})}},71637(e,t,i){"use strict";i.d(t,{Ki:()=>h,jq:()=>o,xm:()=>a,yV:()=>l});var n=i(81987),s=i(131),r=i(97703),o=r.et?WeakMap:Map,a=r.En?WeakSet:Set,l=new n.DX,c=!1;function h(){c||(c=!0,!1!==globalThis.__DEV__&&s.V1.warn(64))}},76013(e,t,i){"use strict";i.d(t,{s:()=>a});var n=i(5821),s=i(38640),r=i(66003),o=i(131);function a(e){(0,r.k)("<Mutation />",function(){!1!==globalThis.__DEV__&&o.V1.warn(65)});var t=(0,s.n)(e.mutation,e),i=t[0],n=t[1];return e.children?e.children(i,n):null}a.propTypes={mutation:n.object.isRequired,variables:n.object,optimisticResponse:n.oneOfType([n.object,n.func]),refetchQueries:n.oneOfType([n.arrayOf(n.oneOfType([n.string,n.object])),n.func]),awaitRefetchQueries:n.bool,update:n.func,children:n.func.isRequired,onCompleted:n.func,onError:n.func,fetchPolicy:n.string}},95115(e,t,i){"use strict";i.d(t,{X:()=>l});var n=i(65959),s=i(5821),r=i(10344),o=i(131),a=i(66003);function l(e){(0,a.k)("<Query />",function(){!1!==globalThis.__DEV__&&o.V1.warn(66)});var t=e.children,i=e.query,s=(0,n.__rest)(e,["children","query"]),l=(0,r.IT)(i,s);return l?t(l):null}l.propTypes={client:s.object,children:s.func.isRequired,fetchPolicy:s.string,notifyOnNetworkStatusChange:s.bool,onCompleted:s.func,onError:s.func,pollInterval:s.number,query:s.object.isRequired,variables:s.object,ssr:s.bool,partialRefetch:s.bool,returnPartialData:s.bool}},69177(e,t,i){"use strict";var n;i.d(t,{l:()=>l});var s=i(41399),r=i(97703),o=i(131),a=r.ol?Symbol.for("__APOLLO_CONTEXT__"):"__APOLLO_CONTEXT__";function l(){(0,o.V1)("createContext"in(n||(n=i.t(s,2))),69);var e=s.createContext[a];return e||(Object.defineProperty(s.createContext,a,{value:e=s.createContext({}),enumerable:!1,writable:!1,configurable:!0}),e.displayName="ApolloContext"),e}},40833(e,t,i){"use strict";i.d(t,{X:()=>a});var n=i(65959),s=i(131),r=i(41399),o=i(69177),a=function(e){var t=e.client,i=e.children,a=(0,o.l)(),l=r.useContext(a),c=r.useMemo(function(){return(0,n.__assign)((0,n.__assign)({},l),{client:t||l.client})},[l,t]);return(0,s.V1)(c.client,71),r.createElement(a.Provider,{value:c},i)}},17084(e,t,i){"use strict";i.d(t,{U:()=>S});var n=i(28367),s=i(65959),r=i(41399),o=i(4674),a=i(95115),l=i(131),c=function(){return{}},h=function(){return!1};function d(e){return e.displayName||e.name||"Component"}function u(e,t){for(var i={},n=0,s=e.variables;n<s.length;n++){var r=s[n],o=r.variable,a=r.type;if(o.name&&o.name.value){var l=o.name.value,c=t[l];void 0===c?"NonNullType"!==a.kind&&(i[l]=void 0):i[l]=c}}return i}var p=function(e){function t(t){var i=e.call(this,t)||this;return i.withRef=!1,i.setWrappedInstance=i.setWrappedInstance.bind(i),i}return(0,s.__extends)(t,e),t.prototype.getWrappedInstance=function(){return(0,l.V1)(this.withRef,73),this.wrappedInstance},t.prototype.setWrappedInstance=function(e){this.wrappedInstance=e},t}(r.Component),g=i(92981),f=i(30301),m=i(76013),v=i(5821),y=i(72634),C=i(66003);function b(e){(0,C.k)("<Subscription />",function(){!1!==globalThis.__DEV__&&l.V1.warn(67)});var t=(0,y.R)(e.subscription,e);return e.children&&t?e.children(t):null}function S(e,t){switch(void 0===t&&(t={}),!1!==globalThis.__DEV__&&(0,f.S2)("graphql",function(){!1!==globalThis.__DEV__&&l.V1.warn(72)}),(0,f.lz)("parser",function(){return(0,n.K3)(e).type})){case n.KG.Mutation:return(0,f.lz)("withMutation",function(){return function(e,t){void 0===t&&(t={}),!1!==globalThis.__DEV__&&(0,f.S2)("withMutation",function(){!1!==globalThis.__DEV__&&l.V1.warn(74)});var i=(0,f.lz)("parser",n.K3,[e]),a=t.options,h=void 0===a?c:a,g=t.alias,v=void 0===g?"Apollo":g,y=h;return"function"!=typeof y&&(y=function(){return h}),function(n){var a="".concat(v,"(").concat(d(n),")"),l=function(o){function l(){return null!==o&&o.apply(this,arguments)||this}return(0,s.__extends)(l,o),l.prototype.render=function(){var o=this.props,a=y(o);return t.withRef&&(this.withRef=!0,o=Object.assign({},o,{ref:this.setWrappedInstance})),!a.variables&&i.variables.length>0&&(a.variables=u(i,o)),r.createElement(m.s,(0,s.__assign)({ignoreResults:!0},a,{mutation:e}),function(e,i){var a,l,c=i.data,h=(0,s.__rest)(i,["data"]),d=Object.assign(h,c||{}),u=t.name||"mutate",p=t.name?"".concat(u,"Result"):"result",g=((a={})[u]=e,a[p]=d,a);if(t.props){var f=((l={})[u]=e,l[p]=d,l.ownProps=o,l);g=t.props(f)}return r.createElement(n,(0,s.__assign)({},o,g))})},l.displayName=a,l.WrappedComponent=n,l}(p);return o(l,n,{})}}(e,t)});case n.KG.Subscription:return(0,f.lz)("withSubscription",function(){return function(e,t){void 0===t&&(t={}),!1!==globalThis.__DEV__&&(0,f.S2)("withSubscription",function(){!1!==globalThis.__DEV__&&l.V1.warn(76)});var i=(0,f.lz)("parser",n.K3,[e]),a=t.options,g=void 0===a?c:a,m=t.skip,v=void 0===m?h:m,y=t.alias,C=void 0===y?"Apollo":y,S=t.shouldResubscribe,w=g;"function"!=typeof w&&(w=function(){return g});var x,E=v;return"function"!=typeof E&&(E=function(){return v}),function(n){var a="".concat(C,"(").concat(d(n),")"),l=function(o){function l(e){var t=o.call(this,e)||this;return t.state={resubscribe:!1},t}return(0,s.__extends)(l,o),l.prototype.updateResubscribe=function(e){this.setState({resubscribe:e})},l.prototype.componentDidUpdate=function(e){var t=!(!S||!S(e,this.props));this.state.resubscribe!==t&&this.updateResubscribe(t)},l.prototype.render=function(){var o=this,l=this.props,c=E(l),h=c?Object.create(null):w(l);return!c&&!h.variables&&i.variables.length>0&&(h.variables=u(i,l)),r.createElement(b,(0,s.__assign)({},h,{displayName:a,skip:c,subscription:e,shouldResubscribe:this.state.resubscribe}),function(e){var i,a,h=e.data,d=(0,s.__rest)(e,["data"]);if(t.withRef&&(o.withRef=!0,l=Object.assign({},l,{ref:o.setWrappedInstance})),c)return r.createElement(n,(0,s.__assign)({},l,{}));var u=Object.assign(d,h||{}),p=t.name||"data",g=((i={})[p]=u,i);if(t.props){var f=((a={})[p]=u,a.ownProps=l,a);g=x=t.props(f,x)}return r.createElement(n,(0,s.__assign)({},l,g))})},l.displayName=a,l.WrappedComponent=n,l}(p);return o(l,n,{})}}(e,t)});case n.KG.Query:default:return(0,f.lz)("withQuery",function(){return function(e,t){void 0===t&&(t={}),!1!==globalThis.__DEV__&&(0,f.S2)("withQuery",function(){!1!==globalThis.__DEV__&&g.Ay.warn(75)});var i=(0,f.lz)("parser",n.K3,[e]),l=t.options,m=void 0===l?c:l,v=t.skip,y=void 0===v?h:v,C=t.alias,b=void 0===C?"Apollo":C,S=m;"function"!=typeof S&&(S=function(){return m});var w,x=y;return"function"!=typeof x&&(x=function(){return y}),function(n){var l="".concat(b,"(").concat(d(n),")"),c=function(o){function c(){return null!==o&&o.apply(this,arguments)||this}return(0,s.__extends)(c,o),c.prototype.render=function(){var o=this,c=this.props,h=x(c),d=h?Object.create(null):(0,s.__assign)({},S(c));return!h&&!d.variables&&i.variables.length>0&&(d.variables=u(i,c)),r.createElement(a.X,(0,s.__assign)({},d,{displayName:l,skip:h,query:e}),function(e){e.client;var i,a,l=e.data,d=(0,s.__rest)(e,["client","data"]);if(t.withRef&&(o.withRef=!0,c=Object.assign({},c,{ref:o.setWrappedInstance})),h)return r.createElement(n,(0,s.__assign)({},c,{}));var u=Object.assign(d,l||{}),p=t.name||"data",g=((i={})[p]=u,i);if(t.props){var f=((a={})[p]=u,a.ownProps=c,a);g=w=t.props(f,w)}return r.createElement(n,(0,s.__assign)({},c,g))})},c.displayName=l,c.WrappedComponent=n,c}(p);return o(c,n,{})}}(e,t)})}}b.propTypes={subscription:v.object.isRequired,variables:v.object,children:v.func,onSubscriptionData:v.func,onData:v.func,onSubscriptionComplete:v.func,onComplete:v.func,shouldResubscribe:v.oneOfType([v.func,v.bool])}},2374(e,t,i){"use strict";i.d(t,{W:()=>c});var n=i(65959),s=i(131),r=i(41399),o=i(4674),a=i(69177),l=function(e){var t=(0,a.l)();return r.createElement(t.Consumer,null,function(t){return(0,s.V1)(t&&t.client,68),e.children(t.client)})};function c(e,t){void 0===t&&(t={});var i="withApollo(".concat(function(e){return e.displayName||e.name||"Component"}(e),")"),a=function(o){function a(e){var t=o.call(this,e)||this;return t.setWrappedInstance=t.setWrappedInstance.bind(t),t}return(0,n.__extends)(a,o),a.prototype.getWrappedInstance=function(){return(0,s.V1)(t.withRef,77),this.wrappedInstance},a.prototype.setWrappedInstance=function(e){this.wrappedInstance=e},a.prototype.render=function(){var i=this;return r.createElement(l,null,function(s){var o=Object.assign({},i.props,{client:s,ref:t.withRef?i.setWrappedInstance:void 0});return r.createElement(e,(0,n.__assign)({},o))})},a.displayName=i,a.WrappedComponent=e,a}(r.Component);return o(a,e,{})}},99449(e,t,i){"use strict";i.d(t,{E:()=>s});var n=i(41399),s=i(97703).Sw?n.useLayoutEffect:n.useEffect},66003(e,t,i){"use strict";i.d(t,{k:()=>r});var n=i(41399),s=i(30301);function r(e,t){var i=n.useRef(!1);!1!==globalThis.__DEV__&&(i.current||(0,s.S2)(e,t),i.current=!0)}},25302(e,t,i){"use strict";i.d(t,{h:()=>r});var n=i(41399),s=i(131);function r(e,t,i,r){void 0===r&&(r="Please remove this option.");var o=n.useRef(!1);t in e&&!o.current&&(!1!==globalThis.__DEV__&&s.V1.warn(78,i,t,r),o.current=!0)}},62659(e,t,i){"use strict";i.d(t,{m:()=>o});var n=i(131),s=i(41399),r=i(69177);function o(e){var t=s.useContext((0,r.l)()),i=e||t.client;return(0,n.V1)(!!i,79),i}},13542(e,t,i){"use strict";i.d(t,{_:()=>m});var n,s=i(65959),r=i(41399),o=i(97460),a=i(10344),l=i(99449),c=i(25302),h=i(27119),d=i(30301);function u(){}var p=["refetch","reobserve","fetchMore","updateQuery","startPolling","stopPolling","subscribeToMore"],g=["initialFetchPolicy","onCompleted","onError","defaultOptions","partialRefetch","canonizeResults"],f=["query","ssr","client","fetchPolicy","nextFetchPolicy","refetchWritePolicy","errorPolicy","pollInterval","notifyOnNetworkStatusChange","returnPartialData","skipPollAttempt"];function m(e,t){var i;if(!1!==globalThis.__DEV__){var m=t||{};(0,c.h)(m,"canonizeResults","useLazyQuery"),(0,c.h)(m,"variables","useLazyQuery","Pass all `variables` to the returned `execute` function instead."),(0,c.h)(m,"context","useLazyQuery","Pass `context` to the returned `execute` function instead."),(0,c.h)(m,"onCompleted","useLazyQuery","If your `onCompleted` callback sets local state, switch to use derived state using `data` returned from the hook instead. Use `useEffect` to perform side-effects as a result of updates to `data`."),(0,c.h)(m,"onError","useLazyQuery","If your `onError` callback sets local state, switch to use derived state using `data`, `error` or `errors` returned from the hook instead. Use `useEffect` if you need to perform side-effects as a result of updates to `data`, `error` or `errors`."),(0,c.h)(m,"defaultOptions","useLazyQuery","Pass the options directly to the hook instead."),(0,c.h)(m,"initialFetchPolicy","useLazyQuery","Use the `fetchPolicy` option instead."),(0,c.h)(m,"partialRefetch","useLazyQuery")}var v=r.useRef(void 0),y=r.useRef(void 0),C=r.useRef(void 0),b=(0,o.l)(t,v.current||{}),S=null!==(i=null==b?void 0:b.query)&&void 0!==i?i:e;y.current=t,C.current=S;var w=(0,s.__assign)((0,s.__assign)({},b),{skip:!v.current}),x=(0,a.SX)(S,w),E=x.obsQueryFields,M=x.result,A=x.client,T=x.resultData,D=x.observable,I=x.onQueryExecuted,R=D.options.initialFetchPolicy||(0,a.kk)(w.defaultOptions,A.defaultOptions),L=r.useReducer(function(e){return e+1},0)[1],k=r.useMemo(function(){for(var e={},t=function(t){var i=E[t];e[t]=function(){return!1!==globalThis.__DEV__&&"reobserve"===t&&!1!==globalThis.__DEV__&&h.V1.warn(80),v.current||(v.current=Object.create(null),L()),i.apply(this,arguments)}},i=0,n=p;i<n.length;i++)t(n[i]);return e},[L,E]),P=!!v.current,N=r.useMemo(function(){return(0,s.__assign)((0,s.__assign)((0,s.__assign)({},M),k),{called:P})},[M,k,P]),O=(n||(n=r.createContext(null)),r.useCallback(function(){var e=console.error;try{return console.error=u,r.useContext(n),!0}catch(e){return!1}finally{console.error=e}},[])),_=r.useRef(new Set),F=r.useCallback(function(e){if(!1!==globalThis.__DEV__){O()&&!1!==globalThis.__DEV__&&h.V1.warn(81);for(var t=0,i=g;t<i.length;t++){var n=i[t];_.current.has(n)||((0,d.cc)(e||{},n,"useLazyQuery.execute"),_.current.add(n))}for(var r=0,l=f;r<l.length;r++){var c=l[r];_.current.has(c)||((0,d.cc)(e||{},c,"useLazyQuery.execute","Please pass the option to the `useLazyQuery` hook instead."),_.current.add(c))}}v.current=e?(0,s.__assign)((0,s.__assign)({},e),{fetchPolicy:e.fetchPolicy||R}):{fetchPolicy:R};var u=(0,o.l)(y.current,(0,s.__assign)({query:C.current},v.current)),p=function(e,t,i,n,s,r){var o=s.query||n,l=(0,a.Er)(i,o,s,!1)(t),c=t.reobserveAsConcast((0,a.t_)(t,i,s,l));return r(l),new Promise(function(n){var s;c.subscribe({next:function(e){s=e},error:function(){n((0,a.$X)(t.getCurrentResult(),e.previousData,t,i))},complete:function(){n((0,a.$X)(t.maskResult(s),e.previousData,t,i))}})})}(T,D,A,S,(0,s.__assign)((0,s.__assign)({},u),{skip:!1}),I).then(function(e){return Object.assign(e,k)});return p.catch(function(){}),p},[O,A,S,k,R,D,T,I]),G=r.useRef(F);(0,l.E)(function(){G.current=F});var V=r.useCallback(function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return G.current.apply(G,e)},[]);return[V,N]}},38640(e,t,i){"use strict";i.d(t,{n:()=>u});var n=i(65959),s=i(41399),r=i(97460),o=i(45063),a=i(28367),l=i(17303),c=i(62659),h=i(99449),d=i(25302);function u(e,t){!1!==globalThis.__DEV__&&(0,d.h)(t||{},"ignoreResults","useMutation","If you don't want to synchronize component state with the mutation, please use the `useApolloClient` hook to get the client instance and call `client.mutate` directly.");var i=(0,c.m)(null==t?void 0:t.client);(0,a.D$)(e,a.KG.Mutation);var u=s.useState({called:!1,loading:!1,client:i}),p=u[0],g=u[1],f=s.useRef({result:p,mutationId:0,isMounted:!0,client:i,mutation:e,options:t});(0,h.E)(function(){Object.assign(f.current,{client:i,options:t,mutation:e})});var m=s.useCallback(function(e){void 0===e&&(e={});var t=f.current,i=t.options,s=t.mutation,a=(0,n.__assign)((0,n.__assign)({},i),{mutation:s}),c=e.client||f.current.client;f.current.result.loading||a.ignoreResults||!f.current.isMounted||g(f.current.result={loading:!0,error:void 0,data:void 0,called:!0,client:c});var h=++f.current.mutationId,d=(0,r.l)(a,e);return c.mutate(d).then(function(t){var i,n,s=t.data,r=t.errors,a=r&&r.length>0?new l.K4({graphQLErrors:r}):void 0,u=e.onError||(null===(i=f.current.options)||void 0===i?void 0:i.onError);if(a&&u&&u(a,d),h===f.current.mutationId&&!d.ignoreResults){var p={called:!0,loading:!1,data:s,error:a,client:c};f.current.isMounted&&!(0,o.L)(f.current.result,p)&&g(f.current.result=p)}var m=e.onCompleted||(null===(n=f.current.options)||void 0===n?void 0:n.onCompleted);return a||null==m||m(t.data,d),t},function(t){var i;if(h===f.current.mutationId&&f.current.isMounted){var n={loading:!1,error:t,data:void 0,called:!0,client:c};(0,o.L)(f.current.result,n)||g(f.current.result=n)}var s=e.onError||(null===(i=f.current.options)||void 0===i?void 0:i.onError);if(s)return s(t,d),{data:void 0,errors:t};throw t})},[]),v=s.useCallback(function(){if(f.current.isMounted){var e={called:!1,loading:!1,client:f.current.client};Object.assign(f.current,{mutationId:0,result:e}),g(e)}},[]);return s.useEffect(function(){var e=f.current;return e.isMounted=!0,function(){e.isMounted=!1}},[]),[m,(0,n.__assign)({reset:v},p)]}},10344(e,t,i){"use strict";i.d(t,{Er:()=>T,kk:()=>L,t_:()=>D,jy:()=>k,$X:()=>P,IT:()=>E,SX:()=>A});var n=i(65959),s=i(131),r=i(41399),o=i(8590),a=i(45063),l=i(97460),c=i(69177),h=i(17303),d=i(78440),u=i(49995),p=i(28367),g=i(62659),f=i(58173),m=i(79e3),v=i(12209),y=Symbol.for("apollo.hook.wrappers"),C=i(25302),b=i(30301),S=Object.prototype.hasOwnProperty;function w(){}var x=Symbol();function E(e,t){return void 0===t&&(t=Object.create(null)),(i=M,(r=(s=(n=(0,g.m)(t&&t.client).queryManager)&&n[y])&&s.useQuery)?r(i):i)(e,t);var i,n,s,r}function M(e,t){!1!==globalThis.__DEV__&&((0,C.h)(t,"canonizeResults","useQuery"),(0,C.h)(t,"partialRefetch","useQuery"),(0,C.h)(t,"defaultOptions","useQuery","Pass the options directly to the hook instead."),(0,C.h)(t,"onCompleted","useQuery","If your `onCompleted` callback sets local state, switch to use derived state using `data` returned from the hook instead. Use `useEffect` to perform side-effects as a result of updates to `data`."),(0,C.h)(t,"onError","useQuery","If your `onError` callback sets local state, switch to use derived state using `data`, `error` or `errors` returned from the hook instead. Use `useEffect` if you need to perform side-effects as a result of updates to `data`, `error` or `errors`."));var i=A(e,t),s=i.result,o=i.obsQueryFields;return r.useMemo(function(){return(0,n.__assign)((0,n.__assign)({},s),o)},[s,o])}function A(e,t){var i=(0,g.m)(t.client),l=r.useContext((0,c.l)()).renderPromises,h=!!l,f=i.disableNetworkFetches,m=!1!==t.ssr&&!t.skip,v=t.partialRefetch,y=T(i,e,t,h),C=function(e,t,i,s,o){function a(n){var r;return(0,p.D$)(t,p.KG.Query),{client:e,query:t,observable:s&&s.getSSRObservable(o())||d.U.inactiveOnCreation.withValue(!s,function(){return(0,b.lz)("canonizeResults",function(){return e.watchQuery(D(void 0,e,i,o()))})}),resultData:{previousData:null===(r=null==n?void 0:n.resultData.current)||void 0===r?void 0:r.data}}}var l=r.useState(a),c=l[0],h=l[1];function u(e){var t,i;Object.assign(c.observable,((t={})[x]=e,t));var s=c.resultData;h((0,n.__assign)((0,n.__assign)({},c),{query:e.query,resultData:Object.assign(s,{previousData:(null===(i=s.current)||void 0===i?void 0:i.data)||s.previousData,current:void 0})}))}if(e!==c.client||t!==c.query){var g=a(c);return h(g),[g,u]}return[c,u]}(i,e,t,l,y),E=C[0],M=E.observable,A=E.resultData,L=C[1],k=y(M);!function(e,t,i,n,s){var r;t[x]&&!(0,a.L)(t[x],s)&&(t.reobserve(D(t,i,n,s)),e.previousData=(null===(r=e.current)||void 0===r?void 0:r.data)||e.previousData,e.current=void 0),t[x]=s}(A,M,i,t,k);var _=r.useMemo(function(){return function(e){return{refetch:e.refetch.bind(e),reobserve:function(){for(var t=[],i=0;i<arguments.length;i++)t[i]=arguments[i];return!1!==globalThis.__DEV__&&!1!==globalThis.__DEV__&&s.V1.warn(84),e.reobserve.apply(e,t)},fetchMore:e.fetchMore.bind(e),updateQuery:e.updateQuery.bind(e),startPolling:e.startPolling.bind(e),stopPolling:e.stopPolling.bind(e),subscribeToMore:e.subscribeToMore.bind(e)}}(M)},[M]);!function(e,t,i){t&&i&&(t.registerSSRObservable(e),e.getCurrentResult().loading&&t.addObservableQueryPromise(e))}(M,l,m);var F=function(e,t,i,n,s,l,c,h,d){var p=r.useRef(d);r.useEffect(function(){p.current=d});var g=!h&&!l||!1!==n.ssr||n.skip?n.skip||"standby"===s.fetchPolicy?O:void 0:N,f=e.previousData,m=r.useMemo(function(){return g&&P(g,f,t,i)},[i,t,g,f]);return(0,o.r)(r.useCallback(function(n){if(h)return function(){};var s=function(){var s=e.current,r=t.getCurrentResult();s&&s.loading===r.loading&&s.networkStatus===r.networkStatus&&(0,a.L)(s.data,r.data)||I(r,e,t,i,c,n,p.current)},r=function(l){if(o.current.unsubscribe(),o.current=t.resubscribeAfterError(s,r),!S.call(l,"graphQLErrors"))throw l;var h=e.current;(!h||h&&h.loading||!(0,a.L)(l,h.error))&&I({data:h&&h.data,error:l,loading:!1,networkStatus:u.pT.error},e,t,i,c,n,p.current)},o={current:t.subscribe(s,r)};return function(){setTimeout(function(){return o.current.unsubscribe()})}},[l,h,t,e,c,i]),function(){return m||R(e,t,p.current,c,i)},function(){return m||R(e,t,p.current,c,i)})}(A,M,i,t,k,f,v,h,{onCompleted:t.onCompleted||w,onError:t.onError||w});return{result:F,obsQueryFields:_,observable:M,resultData:A,client:i,onQueryExecuted:L}}function T(e,t,i,s){void 0===i&&(i={});var r=i.skip,o=(i.ssr,i.onCompleted,i.onError,i.defaultOptions),a=(0,n.__rest)(i,["skip","ssr","onCompleted","onError","defaultOptions"]);return function(i){var n=Object.assign(a,{query:t});return!s||"network-only"!==n.fetchPolicy&&"cache-and-network"!==n.fetchPolicy||(n.fetchPolicy="cache-first"),n.variables||(n.variables={}),r?(n.initialFetchPolicy=n.initialFetchPolicy||n.fetchPolicy||L(o,e.defaultOptions),n.fetchPolicy="standby"):n.fetchPolicy||(n.fetchPolicy=(null==i?void 0:i.options.initialFetchPolicy)||L(o,e.defaultOptions)),n}}function D(e,t,i,n){var s=[],r=t.defaultOptions.watchQuery;return r&&s.push(r),i.defaultOptions&&s.push(i.defaultOptions),s.push((0,f.o)(e&&e.options,n)),s.reduce(l.l)}function I(e,t,i,r,o,a,l){var c=t.current;c&&c.data&&(t.previousData=c.data),!e.error&&(0,m.E)(e.errors)&&(e.error=new h.K4({graphQLErrors:e.errors})),t.current=P(function(e,t,i){return!e.partial||!i||e.loading||e.data&&0!==Object.keys(e.data).length||"cache-only"===t.options.fetchPolicy?e:(t.refetch(),(0,n.__assign)((0,n.__assign)({},e),{loading:!0,networkStatus:u.pT.refetch}))}(e,i,o),t.previousData,i,r),a(),function(e,t,i){if(!e.loading){var n=k(e);Promise.resolve().then(function(){n?i.onError(n):e.data&&t!==e.networkStatus&&e.networkStatus===u.pT.ready&&i.onCompleted(e.data)}).catch(function(e){!1!==globalThis.__DEV__&&s.V1.warn(e)})}}(e,null==c?void 0:c.networkStatus,l)}function R(e,t,i,n,s){return e.current||I(t.getCurrentResult(),e,t,s,n,function(){},i),e.current}function L(e,t){var i;return(null==e?void 0:e.fetchPolicy)||(null===(i=null==t?void 0:t.watchQuery)||void 0===i?void 0:i.fetchPolicy)||"cache-first"}function k(e){return(0,m.E)(e.errors)?new h.K4({graphQLErrors:e.errors}):e.error}function P(e,t,i,s){var r=e.data,o=(e.partial,(0,n.__rest)(e,["data","partial"]));return(0,n.__assign)((0,n.__assign)({data:r},o),{client:s,observable:i,variables:i.variables,called:e!==N&&e!==O,previousData:t})}var N=(0,v.G)({loading:!0,data:void 0,error:void 0,networkStatus:u.pT.loading}),O=(0,v.G)({loading:!1,data:void 0,error:void 0,networkStatus:u.pT.ready})},72634(e,t,i){"use strict";i.d(t,{R:()=>g});var n=i(65959),s=i(131),r=i(41399),o=i(45063),a=i(28367),l=i(17303),c=i(51759),h=i(62659),d=i(8590),u=i(10344),p=i(99449);function g(e,t){void 0===t&&(t=Object.create(null));var i=r.useRef(!1),g=(0,h.m)(t.client);(0,a.D$)(e,a.KG.Subscription),i.current||(i.current=!0,t.onSubscriptionData&&!1!==globalThis.__DEV__&&s.V1.warn(t.onData?85:86),t.onSubscriptionComplete&&!1!==globalThis.__DEV__&&s.V1.warn(t.onComplete?87:88));var f,m,v,y=t.skip,C=t.fetchPolicy,b=t.errorPolicy,S=t.shouldResubscribe,w=t.context,x=t.extensions,E=t.ignoreResults,M=(f=function(){return t.variables},m=[t.variables],(v=r.useRef(void 0)).current&&(0,o.L)(v.current.deps,m)||(v.current={value:f(),deps:m}),v.current.value),A=function(){return function(e,t,i,s,r,o,a){var l={query:t,variables:i,fetchPolicy:s,errorPolicy:r,context:o,extensions:a},h=(0,n.__assign)((0,n.__assign)({},l),{client:e,result:{loading:!0,data:void 0,error:void 0,variables:i},setResult:function(e){h.result=e}}),d=null;return Object.assign(new c.c(function(t){d||(d=e.subscribe(l));var i=d.subscribe(t);return function(){return i.unsubscribe()}}),{__:h})}(g,e,M,C,b,w,x)},T=r.useState(t.skip?null:A),D=T[0],I=T[1],R=r.useRef(A);(0,p.E)(function(){R.current=A}),y?D&&I(D=null):D&&(g===D.__.client&&e===D.__.query&&C===D.__.fetchPolicy&&b===D.__.errorPolicy&&(0,o.L)(M,D.__.variables)||!1===("function"==typeof S?!!S(t):S))||I(D=A());var L=r.useRef(t);r.useEffect(function(){L.current=t});var k=!y&&!E,P=r.useMemo(function(){return{loading:k,error:void 0,data:void 0,variables:M}},[k,M]),N=r.useRef(E);(0,p.E)(function(){N.current=E});var O=(0,d.r)(r.useCallback(function(e){if(!D)return function(){};var t=!1,i=D.__.variables,n=D.__.client,s=D.subscribe({next:function(s){var r,o;if(!t){var a={loading:!1,data:s.data,error:(0,u.jy)(s),variables:i};D.__.setResult(a),N.current||e(),a.error?null===(o=(r=L.current).onError)||void 0===o||o.call(r,a.error):L.current.onData?L.current.onData({client:n,data:a}):L.current.onSubscriptionData&&L.current.onSubscriptionData({client:n,subscriptionData:a})}},error:function(n){var s,r;n=n instanceof l.K4?n:new l.K4({protocolErrors:[n]}),t||(D.__.setResult({loading:!1,data:void 0,error:n,variables:i}),N.current||e(),null===(r=(s=L.current).onError)||void 0===r||r.call(s,n))},complete:function(){t||(L.current.onComplete?L.current.onComplete():L.current.onSubscriptionComplete&&L.current.onSubscriptionComplete())}});return function(){t=!0,setTimeout(function(){s.unsubscribe()})}},[D]),function(){return!D||y||E?P:D.__.result},function(){return P}),_=r.useCallback(function(){(0,s.V1)(!L.current.skip,89),I(R.current())},[L,R]);return r.useMemo(function(){return(0,n.__assign)((0,n.__assign)({},O),{restart:_})},[O,_])}},8590(e,t,i){"use strict";var n;i.d(t,{r:()=>l});var s=i(131),r=i(41399),o=i(97703),a=!1,l=(n||(n=i.t(r,2))).useSyncExternalStore||function(e,t,i){var n=t();!1===globalThis.__DEV__||a||n===t()||(a=!0,!1!==globalThis.__DEV__&&s.V1.error(92));var l=r.useState({inst:{value:n,getSnapshot:t}}),h=l[0].inst,d=l[1];return o.JR?r.useLayoutEffect(function(){Object.assign(h,{value:n,getSnapshot:t}),c(h)&&d({inst:h})},[e,n,t]):Object.assign(h,{value:n,getSnapshot:t}),r.useEffect(function(){return c(h)&&d({inst:h}),e(function(){c(h)&&d({inst:h})})},[e]),n};function c(e){var t=e.value,i=e.getSnapshot;try{return t!==i()}catch(e){return!0}}},28367(e,t,i){"use strict";i.d(t,{D$:()=>u,K3:()=>d,KG:()=>n});var n,s,r=i(131),o=i(75859),a=i(19360),l=i(27231),c=i(30301);function h(e){var t;switch(e){case n.Query:t="Query";break;case n.Mutation:t="Mutation";break;case n.Subscription:t="Subscription"}return t}function d(e){(0,c.S2)("parser",function(){!1!==globalThis.__DEV__&&r.V1.warn(94)}),s||(s=new o.A(a.v.parser||1e3));var t,i,l=s.get(e);if(l)return l;(0,r.V1)(!!e&&!!e.kind,95,e);for(var h=[],d=[],u=[],p=[],g=0,f=e.definitions;g<f.length;g++){var m=f[g];if("FragmentDefinition"!==m.kind){if("OperationDefinition"===m.kind)switch(m.operation){case"query":d.push(m);break;case"mutation":u.push(m);break;case"subscription":p.push(m)}}else h.push(m)}(0,r.V1)(!h.length||d.length||u.length||p.length,96),(0,r.V1)(d.length+u.length+p.length<=1,97,e,d.length,p.length,u.length),i=d.length?n.Query:n.Mutation,d.length||u.length||(i=n.Subscription);var v=d.length?d:u.length?u:p;(0,r.V1)(1===v.length,98,e,v.length);var y=v[0];t=y.variableDefinitions||[];var C={name:y.name&&"Name"===y.name.kind?y.name.value:"data",type:i,variables:t};return s.set(e,C),C}function u(e,t){var i=(0,c.lz)("parser",d,[e]),n=h(t),s=h(i.type);(0,r.V1)(i.type===t,99,n,n,s)}!function(e){e[e.Query=0]="Query",e[e.Mutation=1]="Mutation",e[e.Subscription=2]="Subscription"}(n||(n={})),d.resetCache=function(){s=void 0},!1!==globalThis.__DEV__&&(0,l.D_)("parser",function(){return s?s.size:0})},75859(e,t,i){"use strict";i.d(t,{A:()=>a,V:()=>l});var n=i(23336),s=i(78027),r=new WeakSet;function o(e){e.size<=(e.max||-1)||r.has(e)||(r.add(e),setTimeout(function(){e.clean(),r.delete(e)},100))}var a=function(e,t){var i=new s.l(e,t);return i.set=function(e,t){var i=s.l.prototype.set.call(this,e,t);return o(this),i},i},l=function(e,t){var i=new n.C(e,t);return i.set=function(e,t){var i=n.C.prototype.set.call(this,e,t);return o(this),i},i}},27231(e,t,i){"use strict";i.d(t,{D_:()=>o,cM:()=>l,ep:()=>a,tQ:()=>c});var n=i(65959),s=i(19360),r={};function o(e,t){r[e]=t}var a=!1!==globalThis.__DEV__?function(){var e,t,i,o,a;if(!1===globalThis.__DEV__)throw new Error("only supported in development mode");return{limits:Object.fromEntries(Object.entries({parser:1e3,canonicalStringify:1e3,print:2e3,"documentTransform.cache":2e3,"queryManager.getDocumentInfo":2e3,"PersistedQueryLink.persistedQueryHashes":2e3,"fragmentRegistry.transform":2e3,"fragmentRegistry.lookup":1e3,"fragmentRegistry.findFragmentSpreads":4e3,"cache.fragmentQueryDocuments":1e3,"removeTypenameFromVariables.getVariableDefinitions":2e3,"inMemoryCache.maybeBroadcastWatch":5e3,"inMemoryCache.executeSelectionSet":5e4,"inMemoryCache.executeSubSelectedArray":1e4}).map(function(e){var t=e[0],i=e[1];return[t,s.v[t]||i]})),sizes:(0,n.__assign)({print:null===(e=r.print)||void 0===e?void 0:e.call(r),parser:null===(t=r.parser)||void 0===t?void 0:t.call(r),canonicalStringify:null===(i=r.canonicalStringify)||void 0===i?void 0:i.call(r),links:f(this.link),queryManager:{getDocumentInfo:this.queryManager.transformCache.size,documentTransforms:p(this.queryManager.documentTransform)}},null===(a=(o=this.cache).getMemoryInternals)||void 0===a?void 0:a.call(o))}}:void 0,l=!1!==globalThis.__DEV__?function(){var e=this.config.fragments;return(0,n.__assign)((0,n.__assign)({},h.apply(this)),{addTypenameDocumentTransform:p(this.addTypenameTransform),inMemoryCache:{executeSelectionSet:d(this.storeReader.executeSelectionSet),executeSubSelectedArray:d(this.storeReader.executeSubSelectedArray),maybeBroadcastWatch:d(this.maybeBroadcastWatch)},fragmentRegistry:{findFragmentSpreads:d(null==e?void 0:e.findFragmentSpreads),lookup:d(null==e?void 0:e.lookup),transform:d(null==e?void 0:e.transform)}})}:void 0,c=!1!==globalThis.__DEV__?h:void 0;function h(){return{cache:{fragmentQueryDocuments:d(this.getFragmentDoc)}}}function d(e){return function(e){return!!e&&"dirtyKey"in e}(e)?e.size:void 0}function u(e){return null!=e}function p(e){return g(e).map(function(e){return{cache:e}})}function g(e){return e?(0,n.__spreadArray)((0,n.__spreadArray)([d(null==e?void 0:e.performWork)],g(null==e?void 0:e.left),!0),g(null==e?void 0:e.right),!0).filter(u):[]}function f(e){var t;return e?(0,n.__spreadArray)((0,n.__spreadArray)([null===(t=null==e?void 0:e.getMemoryInternals)||void 0===t?void 0:t.call(e)],f(null==e?void 0:e.left),!0),f(null==e?void 0:e.right),!0).filter(u):[]}},19360(e,t,i){"use strict";i.d(t,{v:()=>o});var n=i(65959),s=i(131),r=Symbol.for("apollo.cacheSize"),o=(0,n.__assign)({},s.Sf[r])},79e3(e,t,i){"use strict";i.d(t,{E:()=>s,c:()=>n});var n=Array.isArray;function s(e){return Array.isArray(e)&&e.length>0}},97703(e,t,i){"use strict";i.d(t,{En:()=>o,JR:()=>d,Sw:()=>c,et:()=>r,ol:()=>a,uJ:()=>l});var n=i(131),s="ReactNative"==(0,n.no)(function(){return navigator.product}),r="function"==typeof WeakMap&&!(s&&!i.g.HermesInternal),o="function"==typeof WeakSet,a="function"==typeof Symbol&&"function"==typeof Symbol.for,l=a&&Symbol.asyncIterator,c="function"==typeof(0,n.no)(function(){return window.document.createElement}),h=(0,n.no)(function(){return navigator.userAgent.indexOf("jsdom")>=0})||!1,d=(c||s)&&!h},26497(e,t,i){"use strict";i.d(t,{M:()=>a});var n,s=i(75859),r=i(19360),o=i(27231),a=Object.assign(function(e){return JSON.stringify(e,l)},{reset:function(){n=new s.V(r.v.canonicalStringify||1e3)}});function l(e,t){if(t&&"object"==typeof t){var i=Object.getPrototypeOf(t);if(i===Object.prototype||null===i){var s=Object.keys(t);if(s.every(c))return t;var r=JSON.stringify(s),o=n.get(r);if(!o){s.sort();var a=JSON.stringify(s);o=n.get(a)||s,n.set(r,o),n.set(a,o)}var l=Object.create(i);return o.forEach(function(e){l[e]=t[e]}),l}}return t}function c(e,t,i){return 0===t||i[t-1]<=e}!1!==globalThis.__DEV__&&(0,o.D_)("canonicalStringify",function(){return n.size}),a.reset()},37563(e,t,i){"use strict";i.d(t,{m:()=>s});var n=Object.prototype.toString;function s(e){return r(e)}function r(e,t){switch(n.call(e)){case"[object Array]":if((t=t||new Map).has(e))return t.get(e);var i=e.slice(0);return t.set(e,i),i.forEach(function(e,n){i[n]=r(e,t)}),i;case"[object Object]":if((t=t||new Map).has(e))return t.get(e);var s=Object.create(Object.getPrototypeOf(e));return t.set(e,s),Object.keys(e).forEach(function(i){s[i]=r(e[i],t)}),s;default:return e}}},58173(e,t,i){"use strict";function n(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var i=Object.create(null);return e.forEach(function(e){e&&Object.keys(e).forEach(function(t){var n=e[t];void 0!==n&&(i[t]=n)})}),i}i.d(t,{o:()=>n})},28931(e,t,i){"use strict";i.d(t,{M:()=>o,t:()=>r});var n=i(79e3),s=i(94537);function r(e){var t=o(e);return(0,n.E)(t)}function o(e){var t=(0,n.E)(e.errors)?e.errors.slice(0):[];return(0,s.ST)(e)&&(0,n.E)(e.incremental)&&e.incremental.forEach(function(e){e.errors&&t.push.apply(t,e.errors)}),t}},94537(e,t,i){"use strict";i.d(t,{EQ:()=>a,Nw:()=>c,ST:()=>o,YX:()=>l,bd:()=>h});var n=i(1164),s=i(79e3),r=i(45902);function o(e){return"incremental"in e}function a(e){return"hasNext"in e&&"data"in e}function l(e){return o(e)||a(e)}function c(e){return(0,n.U)(e)&&"payload"in e}function h(e,t){var i=e,n=new r.ZI;return o(t)&&(0,s.E)(t.incremental)&&t.incremental.forEach(function(e){for(var t=e.data,s=e.path,r=s.length-1;r>=0;--r){var o=s[r],a=isNaN(+o)?{}:[];a[o]=t,t=a}i=n.merge(i,t)}),i}},66566(e,t,i){"use strict";i.d(t,{v:()=>s});var n=new Map;function s(e){var t=n.get(e)||1;return n.set(e,t+1),"".concat(e,":").concat(t,":").concat(Math.random().toString(36).slice(2))}},12209(e,t,i){"use strict";i.d(t,{G:()=>s});var n=i(1164);function s(e){return!1!==globalThis.__DEV__&&(t=e,(i=new Set([t])).forEach(function(e){(0,n.U)(e)&&function(e){if(!1!==globalThis.__DEV__&&!Object.isFrozen(e))try{Object.freeze(e)}catch(e){if(e instanceof TypeError)return null;throw e}return e}(e)===e&&Object.getOwnPropertyNames(e).forEach(function(t){(0,n.U)(e[t])&&i.add(e[t])})})),e;var t,i}},45902(e,t,i){"use strict";i.d(t,{D9:()=>o,IM:()=>a,ZI:()=>c});var n=i(65959),s=i(1164),r=Object.prototype.hasOwnProperty;function o(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return a(e)}function a(e){var t=e[0]||{},i=e.length;if(i>1)for(var n=new c,s=1;s<i;++s)t=n.merge(t,e[s]);return t}var l=function(e,t,i){return this.merge(e[i],t[i])},c=function(){function e(e){void 0===e&&(e=l),this.reconciler=e,this.isObject=s.U,this.pastCopies=new Set}return e.prototype.merge=function(e,t){for(var i=this,o=[],a=2;a<arguments.length;a++)o[a-2]=arguments[a];return(0,s.U)(t)&&(0,s.U)(e)?(Object.keys(t).forEach(function(s){if(r.call(e,s)){var a=e[s];if(t[s]!==a){var l=i.reconciler.apply(i,(0,n.__spreadArray)([e,t,s],o,!1));l!==a&&((e=i.shallowCopyForMerge(e))[s]=l)}}else(e=i.shallowCopyForMerge(e))[s]=t[s]}),e):t},e.prototype.shallowCopyForMerge=function(e){return(0,s.U)(e)&&(this.pastCopies.has(e)||(e=Array.isArray(e)?e.slice(0):(0,n.__assign)({__proto__:Object.getPrototypeOf(e)},e),this.pastCopies.add(e))),e},e}()},97460(e,t,i){"use strict";i.d(t,{l:()=>r});var n=i(65959),s=i(58173);function r(e,t){return(0,s.o)(e,t,t.variables&&{variables:(0,s.o)((0,n.__assign)((0,n.__assign)({},e&&e.variables),t.variables))})}},1164(e,t,i){"use strict";function n(e){return null!==e&&"object"==typeof e}function s(e){return null!==e&&"object"==typeof e&&(Object.getPrototypeOf(e)===Object.prototype||null===Object.getPrototypeOf(e))}i.d(t,{Q:()=>s,U:()=>n})},48670(e,t,i){"use strict";i.d(t,{p:()=>s});var n=i(66566);function s(e,t){void 0===t&&(t=0);var i=(0,n.v)("stringifyForDisplay");return JSON.stringify(e,function(e,t){return void 0===t?i:t},t).split(JSON.stringify(i)).join("<undefined>")}},30301(e,t,i){"use strict";i.d(t,{S2:()=>d,cc:()=>h,lz:()=>c});var n=i(65959),s=i(81987),r=i(131),o=Symbol.for("apollo.deprecations"),a=r.Sf,l=new s.DX;function c(e){for(var t=[],i=1;i<arguments.length;i++)t[i-1]=arguments[i];return l.withValue.apply(l,(0,n.__spreadArray)([Array.isArray(e)?e:[e]],t,!1))}function h(e,t,i,n){void 0===n&&(n="Please remove this option."),d(t,function(){t in e&&!1!==globalThis.__DEV__&&r.V1.warn(104,i,t,n)})}function d(e,t){(function(e){return a[o]||(l.getValue()||[]).includes(e)})(e)||t()}},18084(e,t,i){"use strict";i.d(t,{A:()=>s});var n=i(86483);const s=(0,n.n)(function(){return globalThis})||(0,n.n)(function(){return window})||(0,n.n)(function(){return self})||(0,n.n)(function(){return i.g})||(0,n.n)(function(){return n.n.constructor("return this")()})},131(e,t,i){"use strict";i.d(t,{IJ:()=>o,Sf:()=>r.A,V1:()=>n.V1,no:()=>s.n,vA:()=>n.vA});var n=i(27119),s=i(86483),r=i(18084),o=!1!==globalThis.__DEV__},27119(e,t,i){"use strict";i.d(t,{V1:()=>l,vA:()=>c});var n=i(92981),s=i(29527),r=i(18084),o=i(48670);function a(e){return function(t){for(var i=[],n=1;n<arguments.length;n++)i[n-1]=arguments[n];if("number"==typeof t){var s=t;(t=u(s))||(t=p(s,i),i=[])}e.apply(void 0,[t].concat(i))}}var l=Object.assign(function(e,t){for(var i=[],s=2;s<arguments.length;s++)i[s-2]=arguments[s];e||(0,n.V1)(e,u(t,i)||p(t,i))},{debug:a(n.V1.debug),log:a(n.V1.log),warn:a(n.V1.warn),error:a(n.V1.error)});function c(e){for(var t=[],i=1;i<arguments.length;i++)t[i-1]=arguments[i];return new n.zU(u(e,t)||p(e,t))}var h=Symbol.for("ApolloErrorMessageHandler_"+s.r);function d(e){if("string"==typeof e)return e;try{return(0,o.p)(e,2).slice(0,1e3)}catch(e){return"<non-serializable>"}}function u(e,t){if(void 0===t&&(t=[]),e)return r.A[h]&&r.A[h](e,t.map(d))}function p(e,t){if(void 0===t&&(t=[]),e)return"An error occurred! For more details, see the full error text at https://go.apollo.dev/c/err#".concat(encodeURIComponent(JSON.stringify({version:s.r,message:e,args:t.map(d)})))}},86483(e,t,i){"use strict";function n(e){try{return e()}catch(e){}}i.d(t,{n:()=>n})},78917(e,t,i){"use strict";i.d(t,{c:()=>d});var n=i(69796),s=i(97703),r=i(47812),o=i(131),a=i(78027),l=i(81987),c=i(19360);function h(e){return e}var d=function(){function e(e,t){void 0===t&&(t=Object.create(null)),this.resultCache=s.En?new WeakSet:new Set,this.transform=e,t.getCacheKey&&(this.getCacheKey=t.getCacheKey),this.cached=!1!==t.cache,this.resetCache()}return e.prototype.getCacheKey=function(e){return[e]},e.identity=function(){return new e(h,{cache:!1})},e.split=function(t,i,n){return void 0===n&&(n=e.identity()),Object.assign(new e(function(e){return(t(e)?i:n).transformDocument(e)},{cache:!1}),{left:i,right:n})},e.prototype.resetCache=function(){var t=this;if(this.cached){var i=new n.b(s.et);this.performWork=(0,l.LV)(e.prototype.performWork.bind(this),{makeCacheKey:function(e){var n=t.getCacheKey(e);if(n)return(0,o.V1)(Array.isArray(n),105),i.lookupArray(n)},max:c.v["documentTransform.cache"],cache:a.l})}},e.prototype.performWork=function(e){return(0,r.sw)(e),this.transform(e)},e.prototype.transformDocument=function(e){if(this.resultCache.has(e))return e;var t=this.performWork(e);return this.resultCache.add(t),t},e.prototype.concat=function(t){var i=this;return Object.assign(new e(function(e){return t.transformDocument(i.transformDocument(e))},{cache:!1}),{left:this,right:t})},e}()},14270(e,t,i){"use strict";i.d(t,{I5:()=>c,MS:()=>o,d8:()=>h,f2:()=>d,hE:()=>l,s7:()=>p,sx:()=>a,tY:()=>u});var n=i(131),s=i(49270),r=i(85517);function o(e,t){var i=e.directives;return!i||!i.length||u(i).every(function(e){var i=e.directive,s=e.ifArgument,r=!1;return"Variable"===s.value.kind?(r=t&&t[s.value.name.value],(0,n.V1)(void 0!==r,106,i.name.value)):r=s.value.value,"skip"===i.name.value?!r:r})}function a(e){var t=[];return(0,r.YR)(e,{Directive:function(e){t.push(e.name.value)}}),t}var l=function(e,t){return h(e,t,!1)},c=function(e,t){return h(e,t,!0)};function h(e,t,i){var n=new Set(e),s=n.size;return(0,r.YR)(t,{Directive:function(e){if(n.delete(e.name.value)&&(!i||!n.size))return r.sP}}),i?!n.size:n.size<s}function d(e){return e&&h(["client","export"],e,!0)}function u(e){var t=[];return e&&e.length&&e.forEach(function(e){if("skip"===(i=e.name.value)||"include"===i){var i,s=e.arguments,r=e.name.value;(0,n.V1)(s&&1===s.length,107,r);var o=s[0];(0,n.V1)(o.name&&"if"===o.name.value,108,r);var a=o.value;(0,n.V1)(a&&("Variable"===a.kind||"BooleanValue"===a.kind),109,r),t.push({directive:e,ifArgument:o})}}),t}function p(e){var t,i,r=null===(t=e.directives)||void 0===t?void 0:t.find(function(e){return"unmask"===e.name.value});if(!r)return"mask";var o=null===(i=r.arguments)||void 0===i?void 0:i.find(function(e){return"mode"===e.name.value});return!1!==globalThis.__DEV__&&o&&(o.value.kind===s.b.VARIABLE?!1!==globalThis.__DEV__&&n.V1.warn(110):o.value.kind!==s.b.STRING?!1!==globalThis.__DEV__&&n.V1.warn(111):"migrate"!==o.value.value&&!1!==globalThis.__DEV__&&n.V1.warn(112,o.value.value)),o&&"value"in o.value&&"migrate"===o.value.value?"migrate":"unmask"}},48555(e,t,i){"use strict";i.d(t,{HQ:()=>l,JG:()=>a,ct:()=>o,s6:()=>c});var n=i(65959),s=i(131),r=i(85517);function o(e,t){var i=t,r=[];return e.definitions.forEach(function(e){if("OperationDefinition"===e.kind)throw(0,s.vA)(113,e.operation,e.name?" named '".concat(e.name.value,"'"):"");"FragmentDefinition"===e.kind&&r.push(e)}),void 0===i&&((0,s.V1)(1===r.length,114,r.length),i=r[0].name.value),(0,n.__assign)((0,n.__assign)({},e),{definitions:(0,n.__spreadArray)([{kind:"OperationDefinition",operation:"query",selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:i}}]}}],e.definitions,!0)})}function a(e){void 0===e&&(e=[]);var t={};return e.forEach(function(e){t[e.name.value]=e}),t}function l(e,t){switch(e.kind){case"InlineFragment":return e;case"FragmentSpread":var i=e.name.value;if("function"==typeof t)return t(i);var n=t&&t[i];return(0,s.V1)(n,115,i),n||null;default:return null}}function c(e){var t=!0;return(0,r.YR)(e,{FragmentSpread:function(e){if(!(t=!!e.directives&&e.directives.some(function(e){return"unmask"===e.name.value})))return r.sP}}),t}},47812(e,t,i){"use strict";i.d(t,{AT:()=>c,E4:()=>h,Vn:()=>d,Vu:()=>o,n4:()=>a,sw:()=>r,wY:()=>u,zK:()=>l});var n=i(131),s=i(99310);function r(e){(0,n.V1)(e&&"Document"===e.kind,116);var t=e.definitions.filter(function(e){return"FragmentDefinition"!==e.kind}).map(function(e){if("OperationDefinition"!==e.kind)throw(0,n.vA)(117,e.kind);return e});return(0,n.V1)(t.length<=1,118,t.length),e}function o(e){return r(e),e.definitions.filter(function(e){return"OperationDefinition"===e.kind})[0]}function a(e){return e.definitions.filter(function(e){return"OperationDefinition"===e.kind&&!!e.name}).map(function(e){return e.name.value})[0]||null}function l(e){return e.definitions.filter(function(e){return"FragmentDefinition"===e.kind})}function c(e){var t=o(e);return(0,n.V1)(t&&"query"===t.operation,119),t}function h(e){(0,n.V1)("Document"===e.kind,120),(0,n.V1)(e.definitions.length<=1,121);var t=e.definitions[0];return(0,n.V1)("FragmentDefinition"===t.kind,122),t}function d(e){var t;r(e);for(var i=0,s=e.definitions;i<s.length;i++){var o=s[i];if("OperationDefinition"===o.kind){var a=o.operation;if("query"===a||"mutation"===a||"subscription"===a)return o}"FragmentDefinition"!==o.kind||t||(t=o)}if(t)return t;throw(0,n.vA)(123)}function u(e){var t=Object.create(null),i=e&&e.variableDefinitions;return i&&i.length&&i.forEach(function(e){e.defaultValue&&(0,s.J)(t,e.variable.name,e.defaultValue)}),t}},33137(e,t,i){"use strict";i.d(t,{y:()=>l});var n,s=i(74831),r=i(75859),o=i(19360),a=i(27231),l=Object.assign(function(e){var t=n.get(e);return t||(t=(0,s.y)(e),n.set(e,t)),t},{reset:function(){n=new r.A(o.v.print||2e3)}});l.reset(),!1!==globalThis.__DEV__&&(0,a.D_)("print",function(){return n?n.size:0})},99310(e,t,i){"use strict";i.d(t,{A_:()=>l,D$:()=>v,Ii:()=>d,J:()=>h,Kc:()=>c,MB:()=>f,WU:()=>a,dt:()=>y,kd:()=>C,o5:()=>g,ue:()=>m});var n=i(131),s=i(1164),r=i(48555),o=i(26497);function a(e){return{__ref:String(e)}}function l(e){return Boolean(e&&"object"==typeof e&&"string"==typeof e.__ref)}function c(e){return(0,s.U)(e)&&"Document"===e.kind&&Array.isArray(e.definitions)}function h(e,t,i,s){if(function(e){return"IntValue"===e.kind}(i)||function(e){return"FloatValue"===e.kind}(i))e[t.value]=Number(i.value);else if(function(e){return"BooleanValue"===e.kind}(i)||function(e){return"StringValue"===e.kind}(i))e[t.value]=i.value;else if(function(e){return"ObjectValue"===e.kind}(i)){var r={};i.fields.map(function(e){return h(r,e.name,e.value,s)}),e[t.value]=r}else if(function(e){return"Variable"===e.kind}(i)){var o=(s||{})[i.name.value];e[t.value]=o}else if(function(e){return"ListValue"===e.kind}(i))e[t.value]=i.values.map(function(e){var i={};return h(i,t,e,s),i[t.value]});else if(function(e){return"EnumValue"===e.kind}(i))e[t.value]=i.value;else{if(!function(e){return"NullValue"===e.kind}(i))throw(0,n.vA)(124,t.value,i.kind);e[t.value]=null}}function d(e,t){var i=null;e.directives&&(i={},e.directives.forEach(function(e){i[e.name.value]={},e.arguments&&e.arguments.forEach(function(n){var s=n.name,r=n.value;return h(i[e.name.value],s,r,t)})}));var n=null;return e.arguments&&e.arguments.length&&(n={},e.arguments.forEach(function(e){var i=e.name,s=e.value;return h(n,i,s,t)})),g(e.name.value,n,i)}var u=["connection","include","skip","client","rest","export","nonreactive"],p=o.M,g=Object.assign(function(e,t,i){if(t&&i&&i.connection&&i.connection.key){if(i.connection.filter&&i.connection.filter.length>0){var n=i.connection.filter?i.connection.filter:[];n.sort();var s={};return n.forEach(function(e){s[e]=t[e]}),"".concat(i.connection.key,"(").concat(p(s),")")}return i.connection.key}var r=e;if(t){var o=p(t);r+="(".concat(o,")")}return i&&Object.keys(i).forEach(function(e){-1===u.indexOf(e)&&(i[e]&&Object.keys(i[e]).length?r+="@".concat(e,"(").concat(p(i[e]),")"):r+="@".concat(e))}),r},{setStringify:function(e){var t=p;return p=e,t}});function f(e,t){if(e.arguments&&e.arguments.length){var i={};return e.arguments.forEach(function(e){var n=e.name,s=e.value;return h(i,n,s,t)}),i}return null}function m(e){return e.alias?e.alias.value:e.name.value}function v(e,t,i){for(var n,s=0,o=t.selections;s<o.length;s++)if(y(c=o[s])){if("__typename"===c.name.value)return e[m(c)]}else n?n.push(c):n=[c];if("string"==typeof e.__typename)return e.__typename;if(n)for(var a=0,l=n;a<l.length;a++){var c=l[a],h=v(e,(0,r.HQ)(c,i).selectionSet,i);if("string"==typeof h)return h}}function y(e){return"Field"===e.kind}function C(e){return"InlineFragment"===e.kind}},83906(e,t,i){"use strict";i.d(t,{TC:()=>b,XY:()=>m,er:()=>w,hX:()=>y,it:()=>C,iz:()=>f,x3:()=>x,zc:()=>S});var n=i(65959),s=i(131),r=i(49270),o=i(85517),a=i(47812),l=i(99310),c=i(48555),h=i(79e3),d={kind:r.b.FIELD,name:{kind:r.b.NAME,value:"__typename"}};function u(e,t){return!e||e.selectionSet.selections.every(function(e){return e.kind===r.b.FRAGMENT_SPREAD&&u(t[e.name.value],t)})}function p(e){return u((0,a.Vu)(e)||(0,a.E4)(e),(0,c.JG)((0,a.zK)(e)))?null:e}function g(e){var t=new Map;return function(i){void 0===i&&(i=e);var n=t.get(i);return n||t.set(i,n={variables:new Set,fragmentSpreads:new Set}),n}}function f(e,t){(0,a.sw)(t);for(var i=g(""),l=g(""),c=function(e){for(var t=0,n=void 0;t<e.length&&(n=e[t]);++t)if(!(0,h.c)(n)){if(n.kind===r.b.OPERATION_DEFINITION)return i(n.name&&n.name.value);if(n.kind===r.b.FRAGMENT_DEFINITION)return l(n.name.value)}return!1!==globalThis.__DEV__&&s.V1.error(125),null},d=0,u=t.definitions.length-1;u>=0;--u)t.definitions[u].kind===r.b.OPERATION_DEFINITION&&++d;var f,m,v,y=(f=e,m=new Map,v=new Map,f.forEach(function(e){e&&(e.name?m.set(e.name,e):e.test&&v.set(e.test,e))}),function(e){var t=m.get(e.name.value);return!t&&v.size&&v.forEach(function(i,n){n(e)&&(t=i)}),t}),C=function(e){return(0,h.E)(e)&&e.map(y).some(function(e){return e&&e.remove})},b=new Map,S=!1,w={enter:function(e){if(C(e.directives))return S=!0,null}},x=(0,o.YR)(t,{Field:w,InlineFragment:w,VariableDefinition:{enter:function(){return!1}},Variable:{enter:function(e,t,i,n,s){var r=c(s);r&&r.variables.add(e.name.value)}},FragmentSpread:{enter:function(e,t,i,n,s){if(C(e.directives))return S=!0,null;var r=c(s);r&&r.fragmentSpreads.add(e.name.value)}},FragmentDefinition:{enter:function(e,t,i,n){b.set(JSON.stringify(n),e)},leave:function(e,t,i,n){return e===b.get(JSON.stringify(n))?e:d>0&&e.selectionSet.selections.every(function(e){return e.kind===r.b.FIELD&&"__typename"===e.name.value})?(l(e.name.value).removed=!0,S=!0,null):void 0}},Directive:{leave:function(e){if(y(e))return S=!0,null}}});if(!S)return t;var E=function(e){return e.transitiveVars||(e.transitiveVars=new Set(e.variables),e.removed||e.fragmentSpreads.forEach(function(t){E(l(t)).transitiveVars.forEach(function(t){e.transitiveVars.add(t)})})),e},M=new Set;x.definitions.forEach(function(e){e.kind===r.b.OPERATION_DEFINITION?E(i(e.name&&e.name.value)).fragmentSpreads.forEach(function(e){M.add(e)}):e.kind!==r.b.FRAGMENT_DEFINITION||0!==d||l(e.name.value).removed||M.add(e.name.value)}),M.forEach(function(e){E(l(e)).fragmentSpreads.forEach(function(e){M.add(e)})});var A={enter:function(e){if(t=e.name.value,!M.has(t)||l(t).removed)return null;var t}};return p((0,o.YR)(x,{FragmentSpread:A,FragmentDefinition:A,OperationDefinition:{leave:function(e){if(e.variableDefinitions){var t=E(i(e.name&&e.name.value)).transitiveVars;if(t.size<e.variableDefinitions.length)return(0,n.__assign)((0,n.__assign)({},e),{variableDefinitions:e.variableDefinitions.filter(function(e){return t.has(e.variable.name.value)})})}}}}))}var m=Object.assign(function(e){return(0,o.YR)(e,{SelectionSet:{enter:function(e,t,i){if(!i||i.kind!==r.b.OPERATION_DEFINITION){var s=e.selections;if(s&&!s.some(function(e){return(0,l.dt)(e)&&("__typename"===e.name.value||0===e.name.value.lastIndexOf("__",0))})){var o=i;if(!((0,l.dt)(o)&&o.directives&&o.directives.some(function(e){return"export"===e.name.value})))return(0,n.__assign)((0,n.__assign)({},e),{selections:(0,n.__spreadArray)((0,n.__spreadArray)([],s,!0),[d],!1)})}}}}})},{added:function(e){return e===d}}),v={test:function(e){var t="connection"===e.name.value;return t&&(e.arguments&&e.arguments.some(function(e){return"key"===e.name.value})||!1!==globalThis.__DEV__&&s.V1.warn(126)),t}};function y(e){return f([v],(0,a.sw)(e))}function C(e,t){var i=function(e){return function(t){return e.some(function(e){return t.value&&t.value.kind===r.b.VARIABLE&&t.value.name&&(e.name===t.value.name.value||e.test&&e.test(t))})}}(e);return p((0,o.YR)(t,{OperationDefinition:{enter:function(t){return(0,n.__assign)((0,n.__assign)({},t),{variableDefinitions:t.variableDefinitions?t.variableDefinitions.filter(function(t){return!e.some(function(e){return e.name===t.variable.name.value})}):[]})}},Field:{enter:function(t){if(e.some(function(e){return e.remove})){var n=0;if(t.arguments&&t.arguments.forEach(function(e){i(e)&&(n+=1)}),1===n)return null}}},Argument:{enter:function(e){if(i(e))return null}}}))}function b(e,t){function i(t){if(e.some(function(e){return e.name===t.name.value}))return null}return p((0,o.YR)(t,{FragmentSpread:{enter:i},FragmentDefinition:{enter:i}}))}function S(e){return"query"===(0,a.Vn)(e).operation?e:(0,o.YR)(e,{OperationDefinition:{enter:function(e){return(0,n.__assign)((0,n.__assign)({},e),{operation:"query"})}}})}function w(e){return(0,a.sw)(e),f([{test:function(e){return"client"===e.name.value},remove:!0}],e)}function x(e){return(0,a.sw)(e),(0,o.YR)(e,{FragmentSpread:function(e){var t;if(!(null===(t=e.directives)||void 0===t?void 0:t.some(function(e){return"unmask"===e.name.value})))return(0,n.__assign)((0,n.__assign)({},e),{directives:(0,n.__spreadArray)((0,n.__spreadArray)([],e.directives||[],!0),[{kind:r.b.DIRECTIVE,name:{kind:r.b.NAME,value:"nonreactive"}}],!1)})}})}},89444(e,t,i){"use strict";i.r(t),i.d(t,{AutoCleanedStrongCache:()=>$.V,AutoCleanedWeakCache:()=>$.A,Concast:()=>k.E,DEV:()=>n.IJ,DeepMerger:()=>m.ZI,DocumentTransform:()=>r.c,Observable:()=>w.c,addNonReactiveToNamedFragments:()=>h.x3,addTypenameToDocument:()=>h.XY,argumentsObjectFromField:()=>c.MB,asyncMap:()=>L.x,buildQueryFromSelectionSet:()=>h.zc,cacheSizes:()=>Y.v,canUseAsyncIteratorSymbol:()=>F.uJ,canUseDOM:()=>F.Sw,canUseLayoutEffect:()=>F.JR,canUseSymbol:()=>F.ol,canUseWeakMap:()=>F.et,canUseWeakSet:()=>F.En,canonicalStringify:()=>U.M,checkDocument:()=>a.sw,cloneDeep:()=>D.m,compact:()=>G.o,concatPagination:()=>v,createFragmentMap:()=>o.JG,createFulfilledPromise:()=>x,createRejectedPromise:()=>E,fixObservableSubclass:()=>P.r,getDefaultValues:()=>a.wY,getDirectiveNames:()=>s.sx,getFragmentDefinition:()=>a.E4,getFragmentDefinitions:()=>a.zK,getFragmentFromSelection:()=>o.HQ,getFragmentMaskMode:()=>s.s7,getFragmentQueryDocument:()=>o.ct,getGraphQLErrorsFromResult:()=>_.M,getInclusionDirectives:()=>s.tY,getMainDefinition:()=>a.Vn,getOperationDefinition:()=>a.Vu,getOperationName:()=>a.n4,getQueryDefinition:()=>a.AT,getStoreKeyName:()=>c.o5,getTypenameFromResult:()=>c.D$,graphQLResultHasError:()=>_.t,hasAllDirectives:()=>s.I5,hasAnyDirectives:()=>s.hE,hasClientExports:()=>s.f2,hasDirectives:()=>s.d8,isApolloPayloadResult:()=>z.Nw,isArray:()=>N.c,isDocumentNode:()=>c.Kc,isExecutionPatchIncrementalResult:()=>z.ST,isExecutionPatchInitialResult:()=>z.EQ,isExecutionPatchResult:()=>z.YX,isField:()=>c.dt,isFullyUnmaskedOperation:()=>o.s6,isInlineFragment:()=>c.kd,isMutationOperation:()=>u,isNonEmptyArray:()=>N.E,isNonNullObject:()=>O.U,isPlainObject:()=>O.Q,isQueryOperation:()=>p,isReference:()=>c.A_,isStatefulPromise:()=>M,isSubscriptionOperation:()=>g,iterateObserversSafely:()=>R.w,makeReference:()=>c.WU,makeUniqueId:()=>V.v,maybe:()=>n.no,maybeDeepFreeze:()=>I.G,mergeDeep:()=>m.D9,mergeDeepArray:()=>m.IM,mergeIncrementalData:()=>z.bd,mergeOptions:()=>H.l,offsetLimitPagination:()=>y,omitDeep:()=>W,preventUnhandledRejection:()=>T.X,print:()=>l.y,relayStylePagination:()=>C,removeArgumentsFromDocument:()=>h.it,removeClientSetsFromDocument:()=>h.er,removeConnectionDirectiveFromDocument:()=>h.hX,removeDirectivesFromDocument:()=>h.iz,removeFragmentSpreadFromDocument:()=>h.TC,resultKeyNameFromField:()=>c.ue,shouldInclude:()=>s.MS,storeKeyNameFromField:()=>c.Ii,stringifyForDisplay:()=>B.p,stripTypename:()=>K,valueToObjectRepresentation:()=>c.J,wrapPromiseWithState:()=>A});var n=i(131),s=i(14270),r=i(78917),o=i(48555),a=i(47812),l=i(33137),c=i(99310),h=i(83906);function d(e,t){var i;return(null===(i=(0,a.Vu)(e))||void 0===i?void 0:i.operation)===t}function u(e){return d(e,"mutation")}function p(e){return d(e,"query")}function g(e){return d(e,"subscription")}var f=i(65959),m=i(45902);function v(e){return void 0===e&&(e=!1),{keyArgs:e,merge:function(e,t){return e?(0,f.__spreadArray)((0,f.__spreadArray)([],e,!0),t,!0):t}}}function y(e){return void 0===e&&(e=!1),{keyArgs:e,merge:function(e,t,i){var n=i.args,s=e?e.slice(0):[];if(t)if(n)for(var r=n.offset,o=void 0===r?0:r,a=0;a<t.length;++a)s[o+a]=t[a];else s.push.apply(s,t);return s}}}function C(e){return void 0===e&&(e=!1),{keyArgs:e,read:function(e,t){var i=t.canRead,n=t.readField;if(!e)return e;var s=[],r="",o="";e.edges.forEach(function(e){i(n("node",e))&&(s.push(e),e.cursor&&(r=r||e.cursor||"",o=e.cursor||o))}),s.length>1&&r===o&&(r="");var a=e.pageInfo||{},l=a.startCursor,c=a.endCursor;return(0,f.__assign)((0,f.__assign)({},b(e)),{edges:s,pageInfo:(0,f.__assign)((0,f.__assign)({},e.pageInfo),{startCursor:l||r,endCursor:c||o})})},merge:function(e,t,i){var n=i.args,s=i.isReference,r=i.readField;if(e||(e={edges:[],pageInfo:{hasPreviousPage:!1,hasNextPage:!0,startCursor:"",endCursor:""}}),!t)return e;var o=t.edges?t.edges.map(function(e){return s(e=(0,f.__assign)({},e))&&(e.cursor=r("cursor",e)),e}):[];if(t.pageInfo){var a=t.pageInfo,l=a.startCursor,c=a.endCursor,h=o[0],d=o[o.length-1];h&&l&&(h.cursor=l),d&&c&&(d.cursor=c);var u=h&&h.cursor;u&&!l&&(t=(0,m.D9)(t,{pageInfo:{startCursor:u}}));var p=d&&d.cursor;p&&!c&&(t=(0,m.D9)(t,{pageInfo:{endCursor:p}}))}var g=e.edges,v=[];if(n&&n.after)(y=g.findIndex(function(e){return e.cursor===n.after}))>=0&&(g=g.slice(0,y+1));else if(n&&n.before){var y;v=(y=g.findIndex(function(e){return e.cursor===n.before}))<0?g:g.slice(y),g=[]}else t.edges&&(g=[]);var C=(0,f.__spreadArray)((0,f.__spreadArray)((0,f.__spreadArray)([],g,!0),o,!0),v,!0),S=(0,f.__assign)((0,f.__assign)({},t.pageInfo),e.pageInfo);if(t.pageInfo){var w=t.pageInfo,x=w.hasPreviousPage,E=w.hasNextPage,M=(l=w.startCursor,c=w.endCursor,(0,f.__rest)(w,["hasPreviousPage","hasNextPage","startCursor","endCursor"]));Object.assign(S,M),g.length||(void 0!==x&&(S.hasPreviousPage=x),void 0!==l&&(S.startCursor=l)),v.length||(void 0!==E&&(S.hasNextPage=E),void 0!==c&&(S.endCursor=c))}return(0,f.__assign)((0,f.__assign)((0,f.__assign)({},b(e)),b(t)),{edges:C,pageInfo:S})}}}var b=function(e){return(0,f.__rest)(e,S)},S=["edges","pageInfo"],w=i(51759);function x(e){var t=Promise.resolve(e);return t.status="fulfilled",t.value=e,t}function E(e){var t=Promise.reject(e);return t.catch(function(){}),t.status="rejected",t.reason=e,t}function M(e){return"status"in e}function A(e){if(M(e))return e;var t=e;return t.status="pending",t.then(function(e){if("pending"===t.status){var i=t;i.status="fulfilled",i.value=e}},function(e){if("pending"===t.status){var i=t;i.status="rejected",i.reason=e}}),e}var T=i(90767),D=i(37563),I=i(12209),R=i(20658),L=i(34471),k=i(84382),P=i(24783),N=i(79e3),O=i(1164),_=i(28931),F=i(97703),G=i(58173),V=i(66566),B=i(48670),H=i(97460),z=i(94537),U=i(26497);function W(e,t){return j(e,t)}function j(e,t,i){if(void 0===i&&(i=new Map),i.has(e))return i.get(e);var n=!1;if(Array.isArray(e)){var s=[];if(i.set(e,s),e.forEach(function(e,r){var o=j(e,t,i);n||(n=o!==e),s[r]=o}),n)return s}else if((0,O.Q)(e)){var r=Object.create(Object.getPrototypeOf(e));if(i.set(e,r),Object.keys(e).forEach(function(s){if(s!==t){var o=j(e[s],t,i);n||(n=o!==e[s]),r[s]=o}else n=!0}),n)return r}return e}function K(e){return W(e,"__typename")}var $=i(75859),Y=i(19360)},84382(e,t,i){"use strict";i.d(t,{E:()=>l});var n=i(65959),s=i(51759),r=i(20658),o=i(24783);function a(e){return e&&"function"==typeof e.then}var l=function(e){function t(t){var i=e.call(this,function(e){return i.addObserver(e),function(){return i.removeObserver(e)}})||this;return i.observers=new Set,i.promise=new Promise(function(e,t){i.resolve=e,i.reject=t}),i.handlers={next:function(e){null!==i.sub&&(i.latest=["next",e],i.notify("next",e),(0,r.w)(i.observers,"next",e))},error:function(e){var t=i.sub;null!==t&&(t&&setTimeout(function(){return t.unsubscribe()}),i.sub=null,i.latest=["error",e],i.reject(e),i.notify("error",e),(0,r.w)(i.observers,"error",e))},complete:function(){var e=i,t=e.sub,n=e.sources;if(null!==t){var s=(void 0===n?[]:n).shift();s?a(s)?s.then(function(e){return i.sub=e.subscribe(i.handlers)},i.handlers.error):i.sub=s.subscribe(i.handlers):(t&&setTimeout(function(){return t.unsubscribe()}),i.sub=null,i.latest&&"next"===i.latest[0]?i.resolve(i.latest[1]):i.resolve(),i.notify("complete"),(0,r.w)(i.observers,"complete"))}}},i.nextResultListeners=new Set,i.cancel=function(e){i.reject(e),i.sources=[],i.handlers.error(e)},i.promise.catch(function(e){}),"function"==typeof t&&(t=[new s.c(t)]),a(t)?t.then(function(e){return i.start(e)},i.handlers.error):i.start(t),i}return(0,n.__extends)(t,e),t.prototype.start=function(e){void 0===this.sub&&(this.sources=Array.from(e),this.handlers.complete())},t.prototype.deliverLastMessage=function(e){if(this.latest){var t=this.latest[0],i=e[t];i&&i.call(e,this.latest[1]),null===this.sub&&"next"===t&&e.complete&&e.complete()}},t.prototype.addObserver=function(e){this.observers.has(e)||(this.deliverLastMessage(e),this.observers.add(e))},t.prototype.removeObserver=function(e){this.observers.delete(e)&&this.observers.size<1&&this.handlers.complete()},t.prototype.notify=function(e,t){var i=this.nextResultListeners;i.size&&(this.nextResultListeners=new Set,i.forEach(function(i){return i(e,t)}))},t.prototype.beforeNext=function(e){var t=!1;this.nextResultListeners.add(function(i,n){t||(t=!0,e(i,n))})},t}(s.c);(0,o.r)(l)},34471(e,t,i){"use strict";i.d(t,{x:()=>s});var n=i(51759);function s(e,t,i){return new n.c(function(n){var s={then:function(e){return new Promise(function(t){return t(e())})}};function r(e,t){return function(i){if(e){var r=function(){return n.closed?0:e(i)};s=s.then(r,r).then(function(e){return n.next(e)},function(e){return n.error(e)})}else n[t](i)}}var o={next:r(t,"next"),error:r(i,"error"),complete:function(){s.then(function(){return n.complete()})}},a=e.subscribe(o);return function(){return a.unsubscribe()}})}},20658(e,t,i){"use strict";function n(e,t,i){var n=[];e.forEach(function(e){return e[t]&&n.push(e)}),n.forEach(function(e){return e[t](i)})}i.d(t,{w:()=>n})},24783(e,t,i){"use strict";i.d(t,{r:()=>r});var n=i(51759),s=i(97703);function r(e){function t(t){Object.defineProperty(e,t,{value:n.c})}return s.ol&&Symbol.species&&t(Symbol.species),t("@@species"),e}},90767(e,t,i){"use strict";function n(e){return e.catch(function(){}),e}i.d(t,{X:()=>n})},29527(e,t,i){"use strict";i.d(t,{r:()=>n});var n="3.14.0"},45688(e,t,i){"use strict";i.d(t,{vq:()=>fr});var n=i(95177),s=i(14927);const r="AAD",o="OIDC",a="none";var l=i(90865);const c="client_info_decoding_error",h="client_info_empty_error",d="token_parsing_error",u="null_or_empty_token",p="endpoints_resolution_error",g="network_error",f="openid_config_error",m="hash_not_deserialized",v="invalid_state",y="state_mismatch",C="state_not_found",b="nonce_mismatch",S="auth_time_not_found",w="max_age_transpired",x="multiple_matching_tokens",E="multiple_matching_accounts",M="multiple_matching_appMetadata",A="request_cannot_be_made",T="cannot_remove_empty_scope",D="cannot_append_scopeset",I="empty_input_scopeset",R="device_code_polling_cancelled",L="device_code_expired",k="device_code_unknown_error",P="no_account_in_silent_request",N="invalid_cache_record",O="invalid_cache_environment",_="no_account_found",F="no_crypto_object",G="unexpected_credential_type",V="invalid_assertion",B="invalid_client_credential",H="token_refresh_required",z="user_timeout_reached",U="token_claims_cnf_required_for_signedjwt",W="authorization_code_missing_from_server_response",j="binding_key_not_removed",K="end_session_endpoint_not_supported",$="key_id_missing",Y="no_network_connectivity",q="user_canceled",X="missing_tenant_id_error",Z="method_not_implemented",Q="nested_app_auth_bridge_disabled",J={[c]:"The client info could not be parsed/decoded correctly",[h]:"The client info was empty",[d]:"Token cannot be parsed",[u]:"The token is null or empty",[p]:"Endpoints cannot be resolved",[g]:"Network request failed",[f]:"Could not retrieve endpoints. Check your authority and verify the .well-known/openid-configuration endpoint returns the required endpoints.",[m]:"The hash parameters could not be deserialized",[v]:"State was not the expected format",[y]:"State mismatch error",[C]:"State not found",[b]:"Nonce mismatch error",[S]:"Max Age was requested and the ID token is missing the auth_time variable. auth_time is an optional claim and is not enabled by default - it must be enabled. See https://aka.ms/msaljs/optional-claims for more information.",[w]:"Max Age is set to 0, or too much time has elapsed since the last end-user authentication.",[x]:"The cache contains multiple tokens satisfying the requirements. Call AcquireToken again providing more requirements such as authority or account.",[E]:"The cache contains multiple accounts satisfying the given parameters. Please pass more info to obtain the correct account",[M]:"The cache contains multiple appMetadata satisfying the given parameters. Please pass more info to obtain the correct appMetadata",[A]:"Token request cannot be made without authorization code or refresh token.",[T]:"Cannot remove null or empty scope from ScopeSet",[D]:"Cannot append ScopeSet",[I]:"Empty input ScopeSet cannot be processed",[R]:"Caller has cancelled token endpoint polling during device code flow by setting DeviceCodeRequest.cancel = true.",[L]:"Device code is expired.",[k]:"Device code stopped polling for unknown reasons.",[P]:"Please pass an account object, silent flow is not supported without account information",[N]:"Cache record object was null or undefined.",[O]:"Invalid environment when attempting to create cache entry",[_]:"No account found in cache for given key.",[F]:"No crypto object detected.",[G]:"Unexpected credential type.",[V]:"Client assertion must meet requirements described in https://tools.ietf.org/html/rfc7515",[B]:"Client credential (secret, certificate, or assertion) must not be empty when creating a confidential client. An application should at most have one credential",[H]:"Cannot return token from cache because it must be refreshed. This may be due to one of the following reasons: forceRefresh parameter is set to true, claims have been requested, there is no cached access token or it is expired.",[z]:"User defined timeout for device code polling reached",[U]:"Cannot generate a POP jwt if the token_claims are not populated",[W]:"Server response does not contain an authorization code to proceed",[j]:"Could not remove the credential's binding key from storage.",[K]:"The provided authority does not support logout",[$]:"A keyId value is missing from the requested bound token's cache record and is required to match the token to it's stored binding key.",[Y]:"No network connectivity. Check your internet connection.",[q]:"User cancelled the flow.",[X]:"A tenant id - not common, organizations, or consumers - must be specified when using the client_credentials flow.",[Z]:"This method has not been implemented",[Q]:"The nested app auth bridge is disabled"};class ee extends l.lR{constructor(e,t){super(e,t?`${J[e]}: ${t}`:J[e]),this.name="ClientAuthError",Object.setPrototypeOf(this,ee.prototype)}}function te(e,t){return new ee(e,t)}const ie={createNewGuid:()=>{throw te(Z)},base64Decode:()=>{throw te(Z)},base64Encode:()=>{throw te(Z)},base64UrlEncode:()=>{throw te(Z)},encodeKid:()=>{throw te(Z)},async getPublicKeyThumbprint(){throw te(Z)},async removeTokenBindingKey(){throw te(Z)},async clearKeystore(){throw te(Z)},async signJwt(){throw te(Z)},async hashString(){throw te(Z)}},ne="@azure/msal-common",se="14.15.0";function re(e,t){const i=function(e){if(!e)throw te(u);const t=/^([^\.\s]*)\.([^\.\s]+)\.([^\.\s]*)$/.exec(e);if(!t||t.length<4)throw te(d);return t[2]}(e);try{const e=t(i);return JSON.parse(e)}catch(e){throw te(d)}}function oe(e,t){if(0===t||Date.now()-3e5>e+t)throw te(w)}function ae(){return Math.round((new Date).getTime()/1e3)}function le(e,t){const i=Number(e)||0;return ae()+t>i}function ce(e){return[ve(e),ye(e),Ce(e),be(e),Se(e)].join(s.LR.CACHE_KEY_SEPARATOR).toLowerCase()}function he(e,t,i,n,r){return{credentialType:s.aG.ID_TOKEN,homeAccountId:e,environment:t,clientId:n,secret:i,realm:r}}function de(e,t,i,n,r,o,a,l,c,h,d,u,p,g,f){const m={homeAccountId:e,credentialType:s.aG.ACCESS_TOKEN,secret:i,cachedAt:ae().toString(),expiresOn:a.toString(),extendedExpiresOn:l.toString(),environment:t,clientId:n,realm:r,target:o,tokenType:d||s.IO.BEARER};if(u&&(m.userAssertionHash=u),h&&(m.refreshOn=h.toString()),g&&(m.requestedClaims=g,m.requestedClaimsHash=f),m.tokenType?.toLowerCase()!==s.IO.BEARER.toLowerCase())switch(m.credentialType=s.aG.ACCESS_TOKEN_WITH_AUTH_SCHEME,m.tokenType){case s.IO.POP:const e=re(i,c);if(!e?.cnf?.kid)throw te(U);m.keyId=e.cnf.kid;break;case s.IO.SSH:m.keyId=p}return m}function ue(e,t,i,n,r,o,a){const l={credentialType:s.aG.REFRESH_TOKEN,homeAccountId:e,environment:t,clientId:n,secret:i};return o&&(l.userAssertionHash=o),r&&(l.familyId=r),a&&(l.expiresOn=a.toString()),l}function pe(e){return e.hasOwnProperty("homeAccountId")&&e.hasOwnProperty("environment")&&e.hasOwnProperty("credentialType")&&e.hasOwnProperty("clientId")&&e.hasOwnProperty("secret")}function ge(e){return!!e&&pe(e)&&e.hasOwnProperty("realm")&&e.hasOwnProperty("target")&&(e.credentialType===s.aG.ACCESS_TOKEN||e.credentialType===s.aG.ACCESS_TOKEN_WITH_AUTH_SCHEME)}function fe(e){return!!e&&pe(e)&&e.hasOwnProperty("realm")&&e.credentialType===s.aG.ID_TOKEN}function me(e){return!!e&&pe(e)&&e.credentialType===s.aG.REFRESH_TOKEN}function ve(e){return[e.homeAccountId,e.environment].join(s.LR.CACHE_KEY_SEPARATOR).toLowerCase()}function ye(e){const t=e.credentialType===s.aG.REFRESH_TOKEN&&e.familyId||e.clientId;return[e.credentialType,t,e.realm||""].join(s.LR.CACHE_KEY_SEPARATOR).toLowerCase()}function Ce(e){return(e.target||"").toLowerCase()}function be(e){return(e.requestedClaimsHash||"").toLowerCase()}function Se(e){return e.tokenType&&e.tokenType.toLowerCase()!==s.IO.BEARER.toLowerCase()?e.tokenType.toLowerCase():""}function we(){return ae()+s.u0.REFRESH_TIME_SECONDS}function xe(e,t,i){e.authorization_endpoint=t.authorization_endpoint,e.token_endpoint=t.token_endpoint,e.end_session_endpoint=t.end_session_endpoint,e.issuer=t.issuer,e.endpointsFromNetwork=i,e.jwks_uri=t.jwks_uri}function Ee(e,t,i){e.aliases=t.aliases,e.preferred_cache=t.preferred_cache,e.preferred_network=t.preferred_network,e.aliasesFromNetwork=i}function Me(e){return e.expiresAt<=ae()}const Ae="redirect_uri_empty",Te="claims_request_parsing_error",De="authority_uri_insecure",Ie="url_parse_error",Re="empty_url_error",Le="empty_input_scopes_error",ke="invalid_prompt_value",Pe="invalid_claims",Ne="token_request_empty",Oe="logout_request_empty",_e="invalid_code_challenge_method",Fe="pkce_params_missing",Ge="invalid_cloud_discovery_metadata",Ve="invalid_authority_metadata",Be="untrusted_authority",He="missing_ssh_jwk",ze="missing_ssh_kid",Ue="missing_nonce_authentication_header",We="invalid_authentication_header",je="cannot_set_OIDCOptions",Ke="cannot_allow_native_broker",$e="authority_mismatch",Ye={[Ae]:"A redirect URI is required for all calls, and none has been set.",[Te]:"Could not parse the given claims request object.",[De]:"Authority URIs must use https.  Please see here for valid authority configuration options: https://docs.microsoft.com/en-us/azure/active-directory/develop/msal-js-initializing-client-applications#configuration-options",[Ie]:"URL could not be parsed into appropriate segments.",[Re]:"URL was empty or null.",[Le]:"Scopes cannot be passed as null, undefined or empty array because they are required to obtain an access token.",[ke]:"Please see here for valid configuration options: https://azuread.github.io/microsoft-authentication-library-for-js/ref/modules/_azure_msal_common.html#commonauthorizationurlrequest",[Pe]:"Given claims parameter must be a stringified JSON object.",[Ne]:"Token request was empty and not found in cache.",[Oe]:"The logout request was null or undefined.",[_e]:'code_challenge_method passed is invalid. Valid values are "plain" and "S256".',[Fe]:"Both params: code_challenge and code_challenge_method are to be passed if to be sent in the request",[Ge]:"Invalid cloudDiscoveryMetadata provided. Must be a stringified JSON object containing tenant_discovery_endpoint and metadata fields",[Ve]:"Invalid authorityMetadata provided. Must by a stringified JSON object containing authorization_endpoint, token_endpoint, issuer fields.",[Be]:"The provided authority is not a trusted authority. Please include this authority in the knownAuthorities config parameter.",[He]:"Missing sshJwk in SSH certificate request. A stringified JSON Web Key is required when using the SSH authentication scheme.",[ze]:"Missing sshKid in SSH certificate request. A string that uniquely identifies the public SSH key is required when using the SSH authentication scheme.",[Ue]:"Unable to find an authentication header containing server nonce. Either the Authentication-Info or WWW-Authenticate headers must be present in order to obtain a server nonce.",[We]:"Invalid authentication header provided",[je]:"Cannot set OIDCOptions parameter. Please change the protocol mode to OIDC or use a non-Microsoft authority.",[Ke]:"Cannot set allowNativeBroker parameter to true when not in AAD protocol mode.",[$e]:"Authority mismatch error. Authority provided in login request or PublicClientApplication config does not match the environment of the provided account. Please use a matching account or make an interactive request to login to this authority."};class qe extends l.lR{constructor(e){super(e,Ye[e]),this.name="ClientConfigurationError",Object.setPrototypeOf(this,qe.prototype)}}function Xe(e){return new qe(e)}class Ze{static isEmptyObj(e){if(e)try{const t=JSON.parse(e);return 0===Object.keys(t).length}catch(e){}return!0}static startsWith(e,t){return 0===e.indexOf(t)}static endsWith(e,t){return e.length>=t.length&&e.lastIndexOf(t)===e.length-t.length}static queryStringToObject(e){const t={},i=e.split("&"),n=e=>decodeURIComponent(e.replace(/\+/g," "));return i.forEach(e=>{if(e.trim()){const[i,s]=e.split(/=(.+)/g,2);i&&s&&(t[n(i)]=n(s))}}),t}static trimArrayEntries(e){return e.map(e=>e.trim())}static removeEmptyStringsFromArray(e){return e.filter(e=>!!e)}static jsonParseHelper(e){try{return JSON.parse(e)}catch(e){return null}}static matchPattern(e,t){return new RegExp(e.replace(/\\/g,"\\\\").replace(/\*/g,"[^ ]*").replace(/\?/g,"\\?")).test(t)}}class Qe{constructor(e){const t=e?Ze.trimArrayEntries([...e]):[],i=t?Ze.removeEmptyStringsFromArray(t):[];this.validateInputScopes(i),this.scopes=new Set,i.forEach(e=>this.scopes.add(e))}static fromString(e){const t=(e||s.YM.EMPTY_STRING).split(" ");return new Qe(t)}static createSearchScopes(e){const t=new Qe(e);return t.containsOnlyOIDCScopes()?t.removeScope(s.YM.OFFLINE_ACCESS_SCOPE):t.removeOIDCScopes(),t}validateInputScopes(e){if(!e||e.length<1)throw Xe(Le)}containsScope(e){const t=this.printScopesLowerCase().split(" "),i=new Qe(t);return!!e&&i.scopes.has(e.toLowerCase())}containsScopeSet(e){return!(!e||e.scopes.size<=0)&&this.scopes.size>=e.scopes.size&&e.asArray().every(e=>this.containsScope(e))}containsOnlyOIDCScopes(){let e=0;return s._A.forEach(t=>{this.containsScope(t)&&(e+=1)}),this.scopes.size===e}appendScope(e){e&&this.scopes.add(e.trim())}appendScopes(e){try{e.forEach(e=>this.appendScope(e))}catch(e){throw te(D)}}removeScope(e){if(!e)throw te(T);this.scopes.delete(e.trim())}removeOIDCScopes(){s._A.forEach(e=>{this.scopes.delete(e)})}unionScopeSets(e){if(!e)throw te(I);const t=new Set;return e.scopes.forEach(e=>t.add(e.toLowerCase())),this.scopes.forEach(e=>t.add(e.toLowerCase())),t}intersectingScopeSets(e){if(!e)throw te(I);e.containsOnlyOIDCScopes()||e.removeOIDCScopes();const t=this.unionScopeSets(e),i=e.getScopeCount(),n=this.getScopeCount();return t.size<n+i}getScopeCount(){return this.scopes.size}asArray(){const e=[];return this.scopes.forEach(t=>e.push(t)),e}printScopes(){return this.scopes?this.asArray().join(" "):s.YM.EMPTY_STRING}printScopesLowerCase(){return this.printScopes().toLowerCase()}}function Je(e,t){if(!e)throw te(h);try{const i=t(e);return JSON.parse(i)}catch(e){throw te(c)}}function et(e){if(!e)throw te(c);const t=e.split(s.LR.CLIENT_INFO_SEPARATOR,2);return{uid:t[0],utid:t.length<2?s.YM.EMPTY_STRING:t[1]}}function tt(e,t){return!!e&&!!t&&e===t.split(".")[1]}function it(e,t,i,n){if(n){const{oid:t,sub:i,tid:s,name:r,tfp:o,acr:a}=n,l=s||o||a||"";return{tenantId:l,localAccountId:t||i||"",name:r,isHomeTenant:tt(l,e)}}return{tenantId:i,localAccountId:t,isHomeTenant:tt(i,e)}}function nt(e,t,i,n){let s=e;if(t){const{isHomeTenant:i,...n}=t;s={...e,...n}}if(i){const{isHomeTenant:t,...r}=it(e.homeAccountId,e.localAccountId,e.tenantId,i);return s={...s,...r,idTokenClaims:i,idToken:n},s}return s}function st(e){return e&&(e.tid||e.tfp||e.acr)||null}class rt{generateAccountId(){return[this.homeAccountId,this.environment].join(s.LR.CACHE_KEY_SEPARATOR).toLowerCase()}generateAccountKey(){return rt.generateAccountCacheKey({homeAccountId:this.homeAccountId,environment:this.environment,tenantId:this.realm,username:this.username,localAccountId:this.localAccountId})}getAccountInfo(){return{homeAccountId:this.homeAccountId,environment:this.environment,tenantId:this.realm,username:this.username,localAccountId:this.localAccountId,name:this.name,nativeAccountId:this.nativeAccountId,authorityType:this.authorityType,tenantProfiles:new Map((this.tenantProfiles||[]).map(e=>[e.tenantId,e]))}}isSingleTenant(){return!this.tenantProfiles}static generateAccountCacheKey(e){const t=e.homeAccountId.split(".")[1];return[e.homeAccountId,e.environment||"",t||e.tenantId||""].join(s.LR.CACHE_KEY_SEPARATOR).toLowerCase()}static createAccount(e,t,i){const n=new rt;let o;1===t.authorityType?n.authorityType=s.Qd.ADFS_ACCOUNT_TYPE:t.protocolMode===r?n.authorityType=s.Qd.MSSTS_ACCOUNT_TYPE:n.authorityType=s.Qd.GENERIC_ACCOUNT_TYPE,e.clientInfo&&i&&(o=Je(e.clientInfo,i)),n.clientInfo=e.clientInfo,n.homeAccountId=e.homeAccountId,n.nativeAccountId=e.nativeAccountId;const a=e.environment||t&&t.getPreferredCache();if(!a)throw te(O);n.environment=a,n.realm=o?.utid||st(e.idTokenClaims)||"",n.localAccountId=o?.uid||e.idTokenClaims?.oid||e.idTokenClaims?.sub||"";const l=e.idTokenClaims?.preferred_username||e.idTokenClaims?.upn,c=e.idTokenClaims?.emails?e.idTokenClaims.emails[0]:null;if(n.username=l||c||"",n.name=e.idTokenClaims?.name||"",n.cloudGraphHostName=e.cloudGraphHostName,n.msGraphHost=e.msGraphHost,e.tenantProfiles)n.tenantProfiles=e.tenantProfiles;else{const t=it(e.homeAccountId,n.localAccountId,n.realm,e.idTokenClaims);n.tenantProfiles=[t]}return n}static createFromAccountInfo(e,t,i){const n=new rt;return n.authorityType=e.authorityType||s.Qd.GENERIC_ACCOUNT_TYPE,n.homeAccountId=e.homeAccountId,n.localAccountId=e.localAccountId,n.nativeAccountId=e.nativeAccountId,n.realm=e.tenantId,n.environment=e.environment,n.username=e.username,n.name=e.name,n.cloudGraphHostName=t,n.msGraphHost=i,n.tenantProfiles=Array.from(e.tenantProfiles?.values()||[]),n}static generateHomeAccountId(e,t,i,n,s){if(1!==t&&2!==t){if(e)try{const t=Je(e,n.base64Decode);if(t.uid&&t.utid)return`${t.uid}.${t.utid}`}catch(e){}i.warning("No client info in response")}return s?.sub||""}static isAccountEntity(e){return!!e&&e.hasOwnProperty("homeAccountId")&&e.hasOwnProperty("environment")&&e.hasOwnProperty("realm")&&e.hasOwnProperty("localAccountId")&&e.hasOwnProperty("username")&&e.hasOwnProperty("authorityType")}static accountInfoIsEqual(e,t,i){if(!e||!t)return!1;let n=!0;if(i){const i=e.idTokenClaims||{},s=t.idTokenClaims||{};n=i.iat===s.iat&&i.nonce===s.nonce}return e.homeAccountId===t.homeAccountId&&e.localAccountId===t.localAccountId&&e.username===t.username&&e.tenantId===t.tenantId&&e.environment===t.environment&&e.nativeAccountId===t.nativeAccountId&&n}}function ot(e){return e.startsWith("#/")?e.substring(2):e.startsWith("#")||e.startsWith("?")?e.substring(1):e}function at(e){if(!e||e.indexOf("=")<0)return null;try{const t=ot(e),i=Object.fromEntries(new URLSearchParams(t));if(i.code||i.error||i.error_description||i.state)return i}catch(e){throw te(m)}return null}class lt{get urlString(){return this._urlString}constructor(e){if(this._urlString=e,!this._urlString)throw Xe(Re);e.includes("#")||(this._urlString=lt.canonicalizeUri(e))}static canonicalizeUri(e){if(e){let t=e.toLowerCase();return Ze.endsWith(t,"?")?t=t.slice(0,-1):Ze.endsWith(t,"?/")&&(t=t.slice(0,-2)),Ze.endsWith(t,"/")||(t+="/"),t}return e}validateAsUri(){let e;try{e=this.getUrlComponents()}catch(e){throw Xe(Ie)}if(!e.HostNameAndPort||!e.PathSegments)throw Xe(Ie);if(!e.Protocol||"https:"!==e.Protocol.toLowerCase())throw Xe(De)}static appendQueryString(e,t){return t?e.indexOf("?")<0?`${e}?${t}`:`${e}&${t}`:e}static removeHashFromUrl(e){return lt.canonicalizeUri(e.split("#")[0])}replaceTenantPath(e){const t=this.getUrlComponents(),i=t.PathSegments;return!e||0===i.length||i[0]!==s.v2.COMMON&&i[0]!==s.v2.ORGANIZATIONS||(i[0]=e),lt.constructAuthorityUriFromObject(t)}getUrlComponents(){const e=RegExp("^(([^:/?#]+):)?(//([^/?#]*))?([^?#]*)(\\?([^#]*))?(#(.*))?"),t=this.urlString.match(e);if(!t)throw Xe(Ie);const i={Protocol:t[1],HostNameAndPort:t[4],AbsolutePath:t[5],QueryString:t[7]};let n=i.AbsolutePath.split("/");return n=n.filter(e=>e&&e.length>0),i.PathSegments=n,i.QueryString&&i.QueryString.endsWith("/")&&(i.QueryString=i.QueryString.substring(0,i.QueryString.length-1)),i}static getDomainFromUrl(e){const t=RegExp("^([^:/?#]+://)?([^/?#]*)"),i=e.match(t);if(!i)throw Xe(Ie);return i[2]}static getAbsoluteUrl(e,t){if(e[0]===s.YM.FORWARD_SLASH){const i=new lt(t).getUrlComponents();return i.Protocol+"//"+i.HostNameAndPort+e}return e}static constructAuthorityUriFromObject(e){return new lt(e.Protocol+"//"+e.HostNameAndPort+"/"+e.PathSegments.join("/"))}static hashContainsKnownProperties(e){return!!at(e)}}const ct={"login.microsoftonline.com":{token_endpoint:"https://login.microsoftonline.com/{tenantid}/oauth2/v2.0/token",jwks_uri:"https://login.microsoftonline.com/{tenantid}/discovery/v2.0/keys",issuer:"https://login.microsoftonline.com/{tenantid}/v2.0",authorization_endpoint:"https://login.microsoftonline.com/{tenantid}/oauth2/v2.0/authorize",end_session_endpoint:"https://login.microsoftonline.com/{tenantid}/oauth2/v2.0/logout"},"login.chinacloudapi.cn":{token_endpoint:"https://login.chinacloudapi.cn/{tenantid}/oauth2/v2.0/token",jwks_uri:"https://login.chinacloudapi.cn/{tenantid}/discovery/v2.0/keys",issuer:"https://login.partner.microsoftonline.cn/{tenantid}/v2.0",authorization_endpoint:"https://login.chinacloudapi.cn/{tenantid}/oauth2/v2.0/authorize",end_session_endpoint:"https://login.chinacloudapi.cn/{tenantid}/oauth2/v2.0/logout"},"login.microsoftonline.us":{token_endpoint:"https://login.microsoftonline.us/{tenantid}/oauth2/v2.0/token",jwks_uri:"https://login.microsoftonline.us/{tenantid}/discovery/v2.0/keys",issuer:"https://login.microsoftonline.us/{tenantid}/v2.0",authorization_endpoint:"https://login.microsoftonline.us/{tenantid}/oauth2/v2.0/authorize",end_session_endpoint:"https://login.microsoftonline.us/{tenantid}/oauth2/v2.0/logout"}},ht={tenant_discovery_endpoint:"https://{canonicalAuthority}/v2.0/.well-known/openid-configuration",metadata:[{preferred_network:"login.microsoftonline.com",preferred_cache:"login.windows.net",aliases:["login.microsoftonline.com","login.windows.net","login.microsoft.com","sts.windows.net"]},{preferred_network:"login.partner.microsoftonline.cn",preferred_cache:"login.partner.microsoftonline.cn",aliases:["login.partner.microsoftonline.cn","login.chinacloudapi.cn"]},{preferred_network:"login.microsoftonline.de",preferred_cache:"login.microsoftonline.de",aliases:["login.microsoftonline.de"]},{preferred_network:"login.microsoftonline.us",preferred_cache:"login.microsoftonline.us",aliases:["login.microsoftonline.us","login.usgovcloudapi.net"]},{preferred_network:"login-us.microsoftonline.com",preferred_cache:"login-us.microsoftonline.com",aliases:["login-us.microsoftonline.com"]}]},dt=new Set;function ut(e,t,i,n){if(n?.trace(`getAliasesFromMetadata called with source: ${i}`),e&&t){const s=pt(t,e);if(s)return n?.trace(`getAliasesFromMetadata: found cloud discovery metadata in ${i}, returning aliases`),s.aliases;n?.trace(`getAliasesFromMetadata: did not find cloud discovery metadata in ${i}`)}return null}function pt(e,t){for(let i=0;i<e.length;i++){const n=e[i];if(n.aliases.includes(t))return n}return null}ht.metadata.forEach(e=>{e.aliases.forEach(e=>{dt.add(e)})});const gt="cache_quota_exceeded",ft="cache_error_unknown",mt={[gt]:"Exceeded cache storage capacity.",[ft]:"Unexpected error occurred when using cache storage."};class vt extends Error{constructor(e,t){const i=t||(mt[e]?mt[e]:mt[ft]);super(`${e}: ${i}`),Object.setPrototypeOf(this,vt.prototype),this.name="CacheError",this.errorCode=e,this.errorMessage=i}}class yt{constructor(e,t,i,n){this.clientId=e,this.cryptoImpl=t,this.commonLogger=i.clone(ne,se),this.staticAuthorityOptions=n}getAllAccounts(e){return this.buildTenantProfiles(this.getAccountsFilteredBy(e||{}),e)}getAccountInfoFilteredBy(e){const t=this.getAllAccounts(e);return t.length>1?t.sort(e=>e.idTokenClaims?-1:1)[0]:1===t.length?t[0]:null}getBaseAccountInfo(e){const t=this.getAccountsFilteredBy(e);return t.length>0?t[0].getAccountInfo():null}buildTenantProfiles(e,t){return e.flatMap(e=>this.getTenantProfilesFromAccountEntity(e,t?.tenantId,t))}getTenantedAccountInfoByFilter(e,t,i,n){let s,r=null;if(n&&!this.tenantProfileMatchesFilter(i,n))return null;const o=this.getIdToken(e,t,i.tenantId);return o&&(s=re(o.secret,this.cryptoImpl.base64Decode),!this.idTokenClaimsMatchTenantProfileFilter(s,n))?null:(r=nt(e,i,s,o?.secret),r)}getTenantProfilesFromAccountEntity(e,t,i){const n=e.getAccountInfo();let s=n.tenantProfiles||new Map;const r=this.getTokenKeys();if(t){const e=s.get(t);if(!e)return[];s=new Map([[t,e]])}const o=[];return s.forEach(e=>{const t=this.getTenantedAccountInfoByFilter(n,r,e,i);t&&o.push(t)}),o}tenantProfileMatchesFilter(e,t){return!(t.localAccountId&&!this.matchLocalAccountIdFromTenantProfile(e,t.localAccountId)||t.name&&e.name!==t.name||void 0!==t.isHomeTenant&&e.isHomeTenant!==t.isHomeTenant)}idTokenClaimsMatchTenantProfileFilter(e,t){if(t){if(t.localAccountId&&!this.matchLocalAccountIdFromTokenClaims(e,t.localAccountId))return!1;if(t.loginHint&&!this.matchLoginHintFromTokenClaims(e,t.loginHint))return!1;if(t.username&&!this.matchUsername(e.preferred_username,t.username))return!1;if(t.name&&!this.matchName(e,t.name))return!1;if(t.sid&&!this.matchSid(e,t.sid))return!1}return!0}async saveCacheRecord(e,t,i){if(!e)throw te(N);try{e.account&&this.setAccount(e.account),e.idToken&&!1!==t?.idToken&&this.setIdTokenCredential(e.idToken),e.accessToken&&!1!==t?.accessToken&&await this.saveAccessToken(e.accessToken),e.refreshToken&&!1!==t?.refreshToken&&this.setRefreshTokenCredential(e.refreshToken),e.appMetadata&&this.setAppMetadata(e.appMetadata)}catch(e){throw this.commonLogger?.error("CacheManager.saveCacheRecord: failed"),e instanceof Error?(this.commonLogger?.errorPii(`CacheManager.saveCacheRecord: ${e.message}`,i),"QuotaExceededError"===e.name||"NS_ERROR_DOM_QUOTA_REACHED"===e.name||e.message.includes("exceeded the quota")?(this.commonLogger?.error("CacheManager.saveCacheRecord: exceeded storage quota",i),new vt(gt)):new vt(e.name,e.message)):(this.commonLogger?.errorPii(`CacheManager.saveCacheRecord: ${e}`,i),new vt(ft))}}async saveAccessToken(e){const t={clientId:e.clientId,credentialType:e.credentialType,environment:e.environment,homeAccountId:e.homeAccountId,realm:e.realm,tokenType:e.tokenType,requestedClaimsHash:e.requestedClaimsHash},i=this.getTokenKeys(),n=Qe.fromString(e.target),s=[];i.accessToken.forEach(e=>{if(!this.accessTokenKeyMatchesFilter(e,t,!1))return;const i=this.getAccessTokenCredential(e);i&&this.credentialMatchesFilter(i,t)&&Qe.fromString(i.target).intersectingScopeSets(n)&&s.push(this.removeAccessToken(e))}),await Promise.all(s),this.setAccessTokenCredential(e)}getAccountsFilteredBy(e){const t=this.getAccountKeys(),i=[];return t.forEach(t=>{if(!this.isAccountKey(t,e.homeAccountId))return;const n=this.getAccount(t,this.commonLogger);if(!n)return;if(e.homeAccountId&&!this.matchHomeAccountId(n,e.homeAccountId))return;if(e.username&&!this.matchUsername(n.username,e.username))return;if(e.environment&&!this.matchEnvironment(n,e.environment))return;if(e.realm&&!this.matchRealm(n,e.realm))return;if(e.nativeAccountId&&!this.matchNativeAccountId(n,e.nativeAccountId))return;if(e.authorityType&&!this.matchAuthorityType(n,e.authorityType))return;const s={localAccountId:e?.localAccountId,name:e?.name},r=n.tenantProfiles?.filter(e=>this.tenantProfileMatchesFilter(e,s));r&&0===r.length||i.push(n)}),i}isAccountKey(e,t,i){return!(e.split(s.LR.CACHE_KEY_SEPARATOR).length<3||t&&!e.toLowerCase().includes(t.toLowerCase())||i&&!e.toLowerCase().includes(i.toLowerCase()))}isCredentialKey(e){if(e.split(s.LR.CACHE_KEY_SEPARATOR).length<6)return!1;const t=e.toLowerCase();if(-1===t.indexOf(s.aG.ID_TOKEN.toLowerCase())&&-1===t.indexOf(s.aG.ACCESS_TOKEN.toLowerCase())&&-1===t.indexOf(s.aG.ACCESS_TOKEN_WITH_AUTH_SCHEME.toLowerCase())&&-1===t.indexOf(s.aG.REFRESH_TOKEN.toLowerCase()))return!1;if(t.indexOf(s.aG.REFRESH_TOKEN.toLowerCase())>-1){const e=`${s.aG.REFRESH_TOKEN}${s.LR.CACHE_KEY_SEPARATOR}${this.clientId}${s.LR.CACHE_KEY_SEPARATOR}`,i=`${s.aG.REFRESH_TOKEN}${s.LR.CACHE_KEY_SEPARATOR}${s.hB}${s.LR.CACHE_KEY_SEPARATOR}`;if(-1===t.indexOf(e.toLowerCase())&&-1===t.indexOf(i.toLowerCase()))return!1}else if(-1===t.indexOf(this.clientId.toLowerCase()))return!1;return!0}credentialMatchesFilter(e,t){if(t.clientId&&!this.matchClientId(e,t.clientId))return!1;if(t.userAssertionHash&&!this.matchUserAssertionHash(e,t.userAssertionHash))return!1;if("string"==typeof t.homeAccountId&&!this.matchHomeAccountId(e,t.homeAccountId))return!1;if(t.environment&&!this.matchEnvironment(e,t.environment))return!1;if(t.realm&&!this.matchRealm(e,t.realm))return!1;if(t.credentialType&&!this.matchCredentialType(e,t.credentialType))return!1;if(t.familyId&&!this.matchFamilyId(e,t.familyId))return!1;if(t.target&&!this.matchTarget(e,t.target))return!1;if((t.requestedClaimsHash||e.requestedClaimsHash)&&e.requestedClaimsHash!==t.requestedClaimsHash)return!1;if(e.credentialType===s.aG.ACCESS_TOKEN_WITH_AUTH_SCHEME){if(t.tokenType&&!this.matchTokenType(e,t.tokenType))return!1;if(t.tokenType===s.IO.SSH&&t.keyId&&!this.matchKeyId(e,t.keyId))return!1}return!0}getAppMetadataFilteredBy(e){const t=this.getKeys(),i={};return t.forEach(t=>{if(!this.isAppMetadata(t))return;const n=this.getAppMetadata(t);n&&(e.environment&&!this.matchEnvironment(n,e.environment)||e.clientId&&!this.matchClientId(n,e.clientId)||(i[t]=n))}),i}getAuthorityMetadataByAlias(e){const t=this.getAuthorityMetadataKeys();let i=null;return t.forEach(t=>{if(!this.isAuthorityMetadata(t)||-1===t.indexOf(this.clientId))return;const n=this.getAuthorityMetadata(t);n&&-1!==n.aliases.indexOf(e)&&(i=n)}),i}async removeAllAccounts(){const e=this.getAccountKeys(),t=[];e.forEach(e=>{t.push(this.removeAccount(e))}),await Promise.all(t)}async removeAccount(e){const t=this.getAccount(e,this.commonLogger);t&&(await this.removeAccountContext(t),this.removeItem(e))}async removeAccountContext(e){const t=this.getTokenKeys(),i=e.generateAccountId(),n=[];t.idToken.forEach(e=>{0===e.indexOf(i)&&this.removeIdToken(e)}),t.accessToken.forEach(e=>{0===e.indexOf(i)&&n.push(this.removeAccessToken(e))}),t.refreshToken.forEach(e=>{0===e.indexOf(i)&&this.removeRefreshToken(e)}),await Promise.all(n)}updateOutdatedCachedAccount(e,t,i){if(t&&t.isSingleTenant()){this.commonLogger?.verbose("updateOutdatedCachedAccount: Found a single-tenant (outdated) account entity in the cache, migrating to multi-tenant account entity");const n=this.getAccountKeys().filter(e=>e.startsWith(t.homeAccountId)),s=[];n.forEach(e=>{const t=this.getCachedAccountEntity(e);t&&s.push(t)});const r=s.find(e=>tt(e.realm,e.homeAccountId))||s[0];r.tenantProfiles=s.map(e=>({tenantId:e.realm,localAccountId:e.localAccountId,name:e.name,isHomeTenant:tt(e.realm,e.homeAccountId)}));const o=yt.toObject(new rt,{...r}),a=o.generateAccountKey();return n.forEach(t=>{t!==a&&this.removeOutdatedAccount(e)}),this.setAccount(o),i?.verbose("Updated an outdated account entity in the cache"),o}return t}async removeAccessToken(e){const t=this.getAccessTokenCredential(e);if(t){if(t.credentialType.toLowerCase()===s.aG.ACCESS_TOKEN_WITH_AUTH_SCHEME.toLowerCase()&&t.tokenType===s.IO.POP){const e=t.keyId;if(e)try{await this.cryptoImpl.removeTokenBindingKey(e)}catch(e){throw te(j)}}return this.removeItem(e)}}removeAppMetadata(){return this.getKeys().forEach(e=>{this.isAppMetadata(e)&&this.removeItem(e)}),!0}readAccountFromCache(e){const t=rt.generateAccountCacheKey(e);return this.getAccount(t,this.commonLogger)}getIdToken(e,t,i,n,r){this.commonLogger.trace("CacheManager - getIdToken called");const o={homeAccountId:e.homeAccountId,environment:e.environment,credentialType:s.aG.ID_TOKEN,clientId:this.clientId,realm:i},a=this.getIdTokensByFilter(o,t),l=a.size;if(l<1)return this.commonLogger.info("CacheManager:getIdToken - No token found"),null;if(l>1){let t=a;if(!i){const i=new Map;a.forEach((t,n)=>{t.realm===e.tenantId&&i.set(n,t)});const n=i.size;if(n<1)return this.commonLogger.info("CacheManager:getIdToken - Multiple ID tokens found for account but none match account entity tenant id, returning first result"),a.values().next().value;if(1===n)return this.commonLogger.info("CacheManager:getIdToken - Multiple ID tokens found for account, defaulting to home tenant profile"),i.values().next().value;t=i}return this.commonLogger.info("CacheManager:getIdToken - Multiple matching ID tokens found, clearing them"),t.forEach((e,t)=>{this.removeIdToken(t)}),n&&r&&n.addFields({multiMatchedID:a.size},r),null}return this.commonLogger.info("CacheManager:getIdToken - Returning ID token"),a.values().next().value}getIdTokensByFilter(e,t){const i=t&&t.idToken||this.getTokenKeys().idToken,n=new Map;return i.forEach(t=>{if(!this.idTokenKeyMatchesFilter(t,{clientId:this.clientId,...e}))return;const i=this.getIdTokenCredential(t);i&&this.credentialMatchesFilter(i,e)&&n.set(t,i)}),n}idTokenKeyMatchesFilter(e,t){const i=e.toLowerCase();return!(t.clientId&&-1===i.indexOf(t.clientId.toLowerCase())||t.homeAccountId&&-1===i.indexOf(t.homeAccountId.toLowerCase()))}removeIdToken(e){this.removeItem(e)}removeRefreshToken(e){this.removeItem(e)}getAccessToken(e,t,i,n,r,o){this.commonLogger.trace("CacheManager - getAccessToken called");const a=Qe.createSearchScopes(t.scopes),l=t.authenticationScheme||s.IO.BEARER,c=l&&l.toLowerCase()!==s.IO.BEARER.toLowerCase()?s.aG.ACCESS_TOKEN_WITH_AUTH_SCHEME:s.aG.ACCESS_TOKEN,h={homeAccountId:e.homeAccountId,environment:e.environment,credentialType:c,clientId:this.clientId,realm:n||e.tenantId,target:a,tokenType:l,keyId:t.sshKid,requestedClaimsHash:t.requestedClaimsHash},d=i&&i.accessToken||this.getTokenKeys().accessToken,u=[];d.forEach(e=>{if(this.accessTokenKeyMatchesFilter(e,h,!0)){const t=this.getAccessTokenCredential(e);t&&this.credentialMatchesFilter(t,h)&&u.push(t)}});const p=u.length;return p<1?(this.commonLogger.info("CacheManager:getAccessToken - No token found"),null):p>1?(this.commonLogger.info("CacheManager:getAccessToken - Multiple access tokens found, clearing them"),u.forEach(e=>{this.removeAccessToken(ce(e))}),r&&o&&r.addFields({multiMatchedAT:u.length},o),null):(this.commonLogger.info("CacheManager:getAccessToken - Returning access token"),u[0])}accessTokenKeyMatchesFilter(e,t,i){const n=e.toLowerCase();if(t.clientId&&-1===n.indexOf(t.clientId.toLowerCase()))return!1;if(t.homeAccountId&&-1===n.indexOf(t.homeAccountId.toLowerCase()))return!1;if(t.realm&&-1===n.indexOf(t.realm.toLowerCase()))return!1;if(t.requestedClaimsHash&&-1===n.indexOf(t.requestedClaimsHash.toLowerCase()))return!1;if(t.target){const e=t.target.asArray();for(let t=0;t<e.length;t++){if(i&&!n.includes(e[t].toLowerCase()))return!1;if(!i&&n.includes(e[t].toLowerCase()))return!0}}return!0}getAccessTokensByFilter(e){const t=this.getTokenKeys(),i=[];return t.accessToken.forEach(t=>{if(!this.accessTokenKeyMatchesFilter(t,e,!0))return;const n=this.getAccessTokenCredential(t);n&&this.credentialMatchesFilter(n,e)&&i.push(n)}),i}getRefreshToken(e,t,i,n,r){this.commonLogger.trace("CacheManager - getRefreshToken called");const o=t?s.hB:void 0,a={homeAccountId:e.homeAccountId,environment:e.environment,credentialType:s.aG.REFRESH_TOKEN,clientId:this.clientId,familyId:o},l=i&&i.refreshToken||this.getTokenKeys().refreshToken,c=[];l.forEach(e=>{if(this.refreshTokenKeyMatchesFilter(e,a)){const t=this.getRefreshTokenCredential(e);t&&this.credentialMatchesFilter(t,a)&&c.push(t)}});const h=c.length;return h<1?(this.commonLogger.info("CacheManager:getRefreshToken - No refresh token found."),null):(h>1&&n&&r&&n.addFields({multiMatchedRT:h},r),this.commonLogger.info("CacheManager:getRefreshToken - returning refresh token"),c[0])}refreshTokenKeyMatchesFilter(e,t){const i=e.toLowerCase();return!(t.familyId&&-1===i.indexOf(t.familyId.toLowerCase())||!t.familyId&&t.clientId&&-1===i.indexOf(t.clientId.toLowerCase())||t.homeAccountId&&-1===i.indexOf(t.homeAccountId.toLowerCase()))}readAppMetadataFromCache(e){const t={environment:e,clientId:this.clientId},i=this.getAppMetadataFilteredBy(t),n=Object.keys(i).map(e=>i[e]),s=n.length;if(s<1)return null;if(s>1)throw te(M);return n[0]}isAppMetadataFOCI(e){const t=this.readAppMetadataFromCache(e);return!(!t||t.familyId!==s.hB)}matchHomeAccountId(e,t){return!("string"!=typeof e.homeAccountId||t!==e.homeAccountId)}matchLocalAccountIdFromTokenClaims(e,t){return t===(e.oid||e.sub)}matchLocalAccountIdFromTenantProfile(e,t){return e.localAccountId===t}matchName(e,t){return!(t.toLowerCase()!==e.name?.toLowerCase())}matchUsername(e,t){return!(!e||"string"!=typeof e||t?.toLowerCase()!==e.toLowerCase())}matchUserAssertionHash(e,t){return!(!e.userAssertionHash||t!==e.userAssertionHash)}matchEnvironment(e,t){if(this.staticAuthorityOptions){const i=function(e,t){let i;const n=e.canonicalAuthority;if(n){const r=new lt(n).getUrlComponents().HostNameAndPort;i=ut(r,e.cloudDiscoveryMetadata?.metadata,s.E_.CONFIG,t)||ut(r,ht.metadata,s.E_.HARDCODED_VALUES,t)||e.knownAuthorities}return i||[]}(this.staticAuthorityOptions,this.commonLogger);if(i.includes(t)&&i.includes(e.environment))return!0}const i=this.getAuthorityMetadataByAlias(t);return!!(i&&i.aliases.indexOf(e.environment)>-1)}matchCredentialType(e,t){return e.credentialType&&t.toLowerCase()===e.credentialType.toLowerCase()}matchClientId(e,t){return!(!e.clientId||t!==e.clientId)}matchFamilyId(e,t){return!(!e.familyId||t!==e.familyId)}matchRealm(e,t){return!(e.realm?.toLowerCase()!==t.toLowerCase())}matchNativeAccountId(e,t){return!(!e.nativeAccountId||t!==e.nativeAccountId)}matchLoginHintFromTokenClaims(e,t){return e.login_hint===t||e.preferred_username===t||e.upn===t}matchSid(e,t){return e.sid===t}matchAuthorityType(e,t){return!(!e.authorityType||t.toLowerCase()!==e.authorityType.toLowerCase())}matchTarget(e,t){return!(e.credentialType!==s.aG.ACCESS_TOKEN&&e.credentialType!==s.aG.ACCESS_TOKEN_WITH_AUTH_SCHEME||!e.target)&&Qe.fromString(e.target).containsScopeSet(t)}matchTokenType(e,t){return!(!e.tokenType||e.tokenType!==t)}matchKeyId(e,t){return!(!e.keyId||e.keyId!==t)}isAppMetadata(e){return-1!==e.indexOf(s.GU)}isAuthorityMetadata(e){return-1!==e.indexOf(s.u0.CACHE_KEY)}generateAuthorityMetadataCacheKey(e){return`${s.u0.CACHE_KEY}-${this.clientId}-${e}`}static toObject(e,t){for(const i in t)e[i]=t[i];return e}}class Ct extends yt{setAccount(){throw te(Z)}getAccount(){throw te(Z)}getCachedAccountEntity(){throw te(Z)}setIdTokenCredential(){throw te(Z)}getIdTokenCredential(){throw te(Z)}setAccessTokenCredential(){throw te(Z)}getAccessTokenCredential(){throw te(Z)}setRefreshTokenCredential(){throw te(Z)}getRefreshTokenCredential(){throw te(Z)}setAppMetadata(){throw te(Z)}getAppMetadata(){throw te(Z)}setServerTelemetry(){throw te(Z)}getServerTelemetry(){throw te(Z)}setAuthorityMetadata(){throw te(Z)}getAuthorityMetadata(){throw te(Z)}getAuthorityMetadataKeys(){throw te(Z)}setThrottlingCache(){throw te(Z)}getThrottlingCache(){throw te(Z)}removeItem(){throw te(Z)}getKeys(){throw te(Z)}getAccountKeys(){throw te(Z)}getTokenKeys(){throw te(Z)}async clear(){throw te(Z)}updateCredentialCacheKey(){throw te(Z)}removeOutdatedAccount(){throw te(Z)}}const bt={tokenRenewalOffsetSeconds:s.F0,preventCorsPreflight:!1},St={loggerCallback:()=>{},piiLoggingEnabled:!1,logLevel:n.$.Info,correlationId:s.YM.EMPTY_STRING},wt={claimsBasedCachingEnabled:!1},xt={async sendGetRequestAsync(){throw te(Z)},async sendPostRequestAsync(){throw te(Z)}},Et={sku:s.YM.SKU,version:se,cpu:s.YM.EMPTY_STRING,os:s.YM.EMPTY_STRING},Mt={clientSecret:s.YM.EMPTY_STRING,clientAssertion:void 0},At={azureCloudInstance:a,tenant:`${s.YM.DEFAULT_COMMON_TENANT}`},Tt={application:{appName:"",appVersion:""}};function Dt(e){return e.authOptions.authority.options.protocolMode===o}const It={sendGetRequestAsync:()=>Promise.reject(te(Z)),sendPostRequestAsync:()=>Promise.reject(te(Z))},Rt="acquireTokenByCode",Lt="acquireTokenByRefreshToken",kt="acquireTokenSilent",Pt="acquireTokenSilentAsync",Nt="acquireTokenPopup",Ot="acquireTokenRedirect",_t="cryptoOptsGetPublicKeyThumbprint",Ft="cryptoOptsSignJwt",Gt="silentCacheClientAcquireToken",Vt="silentIframeClientAcquireToken",Bt="silentRefreshClientAcquireToken",Ht="ssoSilent",zt="standardInteractionClientGetDiscoveredAuthority",Ut="fetchAccountIdWithNativeBroker",Wt="nativeInteractionClientAcquireToken",jt="refreshTokenClientExecutePostToTokenEndpoint",Kt="authorizationCodeClientExecutePostToTokenEndpoint",$t="refreshTokenClientExecuteTokenRequest",Yt="refreshTokenClientAcquireToken",qt="refreshTokenClientAcquireTokenWithCachedRefreshToken",Xt="refreshTokenClientAcquireTokenByRefreshToken",Zt="refreshTokenClientCreateTokenRequestBody",Qt="acquireTokenFromCache",Jt="silentFlowClientAcquireCachedToken",ei="silentFlowClientGenerateResultFromCacheRecord",ti="acquireTokenBySilentIframe",ii="initializeBaseRequest",ni="initializeSilentRequest",si="initializeClientApplication",ri="silentIframeClientTokenHelper",oi="silentHandlerInitiateAuthRequest",ai="silentHandlerMonitorIframeForHash",li="silentHandlerLoadFrame",ci="silentHandlerLoadFrameSync",hi="standardInteractionClientCreateAuthCodeClient",di="standardInteractionClientGetClientConfiguration",ui="standardInteractionClientInitializeAuthorizationRequest",pi="standardInteractionClientInitializeAuthorizationCodeRequest",gi="getAuthCodeUrl",fi="handleCodeResponseFromServer",mi="handleCodeResponse",vi="updateTokenEndpointAuthority",yi="authClientAcquireToken",Ci="authClientExecuteTokenRequest",bi="authClientCreateTokenRequestBody",Si="authClientCreateQueryString",wi="popTokenGenerateCnf",xi="popTokenGenerateKid",Ei="handleServerTokenResponse",Mi="deserializeResponse",Ai="authorityFactoryCreateDiscoveredInstance",Ti="authorityResolveEndpointsAsync",Di="authorityGetCloudDiscoveryMetadataFromNetwork",Ii="authorityUpdateCloudDiscoveryMetadata",Ri="authorityGetEndpointMetadataFromNetwork",Li="authorityUpdateEndpointMetadata",ki="authorityUpdateMetadataWithRegionalInformation",Pi="regionDiscoveryDetectRegion",Ni="regionDiscoveryGetRegionFromIMDS",Oi="regionDiscoveryGetCurrentVersion",_i="acquireTokenByCodeAsync",Fi="handleRedirectPromise",Gi="handleNativeRedirectPromise",Vi="nativeMessageHandlerHandshake",Bi="removeHiddenIframe",Hi="clearTokensAndKeysWithClaims",zi="cacheManagerGetRefreshToken",Ui="generatePkceCodes",Wi="generateCodeVerifier",ji="generateCodeChallengeFromVerifier",Ki="sha256Digest",$i="getRandomValues",Yi=(new Map([[Rt,"ATByCode"],[Lt,"ATByRT"],[kt,"ATS"],[Pt,"ATSAsync"],[Nt,"ATPopup"],[Ot,"ATRedirect"],[_t,"CryptoGetPKThumb"],[Ft,"CryptoSignJwt"],[Gt,"SltCacheClientAT"],[Vt,"SltIframeClientAT"],[Bt,"SltRClientAT"],[Ht,"SsoSlt"],[zt,"StdIntClientGetDiscAuth"],[Ut,"FetchAccIdWithNtvBroker"],[Wt,"NtvIntClientAT"],["baseClientCreateTokenRequestHeaders","BaseClientCreateTReqHead"],[jt,"RTClientExecPost"],[Kt,"AuthCodeClientExecPost"],["brokerHandshake","BrokerHandshake"],["acquireTokenByRefreshTokenInBroker","ATByRTInBroker"],["acquireTokenByBroker","ATByBroker"],[$t,"RTClientExecTReq"],[Yt,"RTClientAT"],[qt,"RTClientATWithCachedRT"],[Xt,"RTClientATByRT"],[Zt,"RTClientCreateTReqBody"],[Qt,"ATFromCache"],[Jt,"SltFlowClientATCached"],[ei,"SltFlowClientGenResFromCache"],[ti,"ATBySltIframe"],[ii,"InitBaseReq"],[ni,"InitSltReq"],[si,"InitClientApplication"],[ri,"SIClientTHelper"],[oi,"SHandlerInitAuthReq"],[ai,"SltHandlerMonitorIframeForHash"],[li,"SHandlerLoadFrame"],[ci,"SHandlerLoadFrameSync"],[hi,"StdIntClientCreateAuthCodeClient"],[di,"StdIntClientGetClientConf"],[ui,"StdIntClientInitAuthReq"],[pi,"StdIntClientInitAuthCodeReq"],[gi,"GetAuthCodeUrl"],[fi,"HandleCodeResFromServer"],[mi,"HandleCodeResp"],[vi,"UpdTEndpointAuth"],[yi,"AuthClientAT"],[Ci,"AuthClientExecTReq"],[bi,"AuthClientCreateTReqBody"],[Si,"AuthClientCreateQueryStr"],[wi,"PopTGenCnf"],[xi,"PopTGenKid"],[Ei,"HandleServerTRes"],[Mi,"DeserializeRes"],[Ai,"AuthFactCreateDiscInst"],[Ti,"AuthResolveEndpointsAsync"],["authorityResolveEndpointsFromLocalSources","AuthResolveEndpointsFromLocal"],[Di,"AuthGetCDMetaFromNet"],[Ii,"AuthUpdCDMeta"],[Ri,"AuthUpdCDMetaFromNet"],[Li,"AuthUpdEndpointMeta"],[ki,"AuthUpdMetaWithRegInfo"],[Pi,"RegDiscDetectReg"],[Ni,"RegDiscGetRegFromIMDS"],[Oi,"RegDiscGetCurrentVer"],[_i,"ATByCodeAsync"],["getEndpointMetadataFromNetwork","GetEndpointMetaFromNet"],["getCloudDiscoveryMetadataFromNetworkMeasurement","GetCDMetaFromNet"],[Fi,"HandleRedirectPromise"],[Gi,"HandleNtvRedirectPromise"],["updateCloudDiscoveryMetadataMeasurement","UpdateCDMeta"],["usernamePasswordClientAcquireToken","UserPassClientAT"],[Vi,"NtvMsgHandlerHandshake"],["nativeGenerateAuthResult","NtvGenAuthRes"],[Bi,"RemoveHiddenIframe"],[Hi,"ClearTAndKeysWithClaims"],[zi,"CacheManagerGetRT"],[Ui,"GenPkceCodes"],[Wi,"GenCodeVerifier"],[ji,"GenCodeChallengeFromVerifier"],[Ki,"Sha256Digest"],[$i,"GetRandomValues"]]),1);new Set(["accessTokenSize","durationMs","idTokenSize","matsSilentStatus","matsHttpStatus","refreshTokenSize","queuedTimeMs","startTimeMs","status","multiMatchedAT","multiMatchedID","multiMatchedRT"]);class qi{startMeasurement(){}endMeasurement(){}flushMeasurement(){return null}}class Xi{generateId(){return"callback-id"}startMeasurement(e,t){return{end:()=>null,discard:()=>{},add:()=>{},increment:()=>{},event:{eventId:this.generateId(),status:Yi,authority:"",libraryName:"",libraryVersion:"",clientId:"",name:e,startTimeMs:Date.now(),correlationId:t||""},measurement:new qi}}startPerformanceMeasurement(){return new qi}calculateQueuedTime(){return 0}addQueueMeasurement(){}setPreQueueTime(){}endMeasurement(){return null}discardMeasurements(){}removePerformanceCallback(){return!0}addPerformanceCallback(){return""}emitEvents(){}addFields(){}incrementFields(){}cacheEventByCorrelationId(){}}var Zi=i(58090);class Qi{navigateInternal(e,t){return Qi.defaultNavigateWindow(e,t)}navigateExternal(e,t){return Qi.defaultNavigateWindow(e,t)}static defaultNavigateWindow(e,t){return t.noHistory?window.location.replace(e):window.location.assign(e),new Promise(e=>{setTimeout(()=>{e(!0)},t.timeout)})}}var Ji=i(75970),en=i(2919);class tn{async sendGetRequestAsync(e,t){let i;try{i=await fetch(e,{method:Zi.CC.GET,headers:this.getFetchHeaders(t)})}catch(e){throw window.navigator.onLine?(0,Ji.bD)(en.Zw):(0,Ji.bD)(en.l7)}try{return{headers:this.getHeaderDict(i.headers),body:await i.json(),status:i.status}}catch(e){throw(0,Ji.bD)(en.db)}}async sendPostRequestAsync(e,t){const i=t&&t.body||s.YM.EMPTY_STRING;let n;try{n=await fetch(e,{method:Zi.CC.POST,headers:this.getFetchHeaders(t),body:i})}catch(e){throw window.navigator.onLine?(0,Ji.bD)(en.zv):(0,Ji.bD)(en.l7)}try{return{headers:this.getHeaderDict(n.headers),body:await n.json(),status:n.status}}catch(e){throw(0,Ji.bD)(en.db)}}getFetchHeaders(e){const t=new Headers;if(!e||!e.headers)return t;const i=e.headers;return Object.keys(i).forEach(e=>{t.append(e,i[e])}),t}getHeaderDict(e){const t={};return e.forEach((e,i)=>{t[i]=e}),t}}const nn="3.26.1";class sn{static loggerCallback(e,t){switch(e){case n.$.Error:return void console.error(t);case n.$.Info:return void console.info(t);case n.$.Verbose:return void console.debug(t);case n.$.Warning:return void console.warn(t);default:return void console.log(t)}}constructor(e){let t;this.browserEnvironment="undefined"!=typeof window,this.config=function({auth:e,cache:t,system:i,telemetry:l},c){const h={clientId:s.YM.EMPTY_STRING,authority:`${s.YM.DEFAULT_AUTHORITY}`,knownAuthorities:[],cloudDiscoveryMetadata:s.YM.EMPTY_STRING,authorityMetadata:s.YM.EMPTY_STRING,redirectUri:s.YM.EMPTY_STRING,postLogoutRedirectUri:s.YM.EMPTY_STRING,navigateToLoginRequestUrl:!0,clientCapabilities:[],protocolMode:r,OIDCOptions:{serverResponseType:s.zL.FRAGMENT,defaultScopes:[s.YM.OPENID_SCOPE,s.YM.PROFILE_SCOPE,s.YM.OFFLINE_ACCESS_SCOPE]},azureCloudOptions:{azureCloudInstance:a,tenant:s.YM.EMPTY_STRING},skipAuthorityMetadataCache:!1,supportsNestedAppAuth:!1,instanceAware:!1},d={cacheLocation:Zi.Al.SessionStorage,temporaryCacheLocation:Zi.Al.SessionStorage,storeAuthStateInCookie:!1,secureCookies:!1,cacheMigrationEnabled:!(!t||t.cacheLocation!==Zi.Al.LocalStorage),claimsBasedCachingEnabled:!1},u={loggerCallback:()=>{},logLevel:n.$.Info,piiLoggingEnabled:!1},p={...{...bt,loggerOptions:u,networkClient:c?new tn:It,navigationClient:new Qi,loadFrameTimeout:0,windowHashTimeout:i?.loadFrameTimeout||6e4,iframeHashTimeout:i?.loadFrameTimeout||1e4,navigateFrameWait:0,redirectNavigationTimeout:3e4,asyncPopups:!1,allowRedirectInIframe:!1,allowNativeBroker:!1,nativeBrokerHandshakeTimeout:i?.nativeBrokerHandshakeTimeout||2e3,pollIntervalMilliseconds:Zi.Q1.DEFAULT_POLL_INTERVAL_MS},...i,loggerOptions:i?.loggerOptions||u},g={application:{appName:s.YM.EMPTY_STRING,appVersion:s.YM.EMPTY_STRING},client:new Xi};if(e?.protocolMode!==o&&e?.OIDCOptions&&new n.V(p.loggerOptions).warning(JSON.stringify(Xe(je))),e?.protocolMode&&e.protocolMode!==r&&p?.allowNativeBroker)throw Xe(Ke);return{auth:{...h,...e,OIDCOptions:{...h.OIDCOptions,...e?.OIDCOptions}},cache:{...d,...t},system:p,telemetry:{...g,...l}}}(e,this.browserEnvironment);try{t=window[Zi.Al.SessionStorage]}catch(e){}const i=t?.getItem(Zi.L$),l=t?.getItem(Zi.P3)?.toLowerCase(),c="true"===l||"false"!==l&&void 0,h={...this.config.system.loggerOptions},d=i&&Object.keys(n.$).includes(i)?n.$[i]:void 0;d&&(h.loggerCallback=sn.loggerCallback,h.logLevel=d),void 0!==c&&(h.piiLoggingEnabled=c),this.logger=new n.V(h,"@azure/msal-browser",nn),this.available=!1}getConfig(){return this.config}getLogger(){return this.logger}isAvailable(){return this.available}isBrowserEnvironment(){return this.browserEnvironment}}class rn extends sn{getModuleName(){return rn.MODULE_NAME}getId(){return rn.ID}async initialize(){return this.available="undefined"!=typeof window,this.available}}rn.MODULE_NAME="",rn.ID="StandardOperatingContext";const on="missing_kid_error",an="missing_alg_error",ln={[on]:"The JOSE Header for the requested JWT, JWS or JWK object requires a keyId to be configured as the 'kid' header claim. No 'kid' value was provided.",[an]:"The JOSE Header for the requested JWT, JWS or JWK object requires an algorithm to be specified as the 'alg' header claim. No 'alg' value was provided."};class cn extends l.lR{constructor(e,t){super(e,t),this.name="JoseHeaderError",Object.setPrototypeOf(this,cn.prototype)}}function hn(e){return new cn(e,ln[e])}class dn{constructor(e){this.typ=e.typ,this.alg=e.alg,this.kid=e.kid}static getShrHeaderString(e){if(!e.kid)throw hn(on);if(!e.alg)throw hn(an);const t=new dn({typ:e.typ||s.Lz.Pop,kid:e.kid,alg:e.alg});return JSON.stringify(t)}}function un(e){return encodeURIComponent(gn(e).replace(/=/g,"").replace(/\+/g,"-").replace(/\//g,"_"))}function pn(e){return fn(e).replace(/=/g,"").replace(/\+/g,"-").replace(/\//g,"_")}function gn(e){return fn((new TextEncoder).encode(e))}function fn(e){const t=Array.from(e,e=>String.fromCodePoint(e)).join("");return btoa(t)}function mn(e){return(new TextDecoder).decode(function(e){let t=e.replace(/-/g,"+").replace(/_/g,"/");switch(t.length%4){case 0:break;case 2:t+="==";break;case 3:t+="=";break;default:throw(0,Ji.bD)(en._t)}const i=atob(t);return Uint8Array.from(i,e=>e.codePointAt(0)||0)}(e))}const vn="SHA-256",yn=new Uint8Array([1,0,1]),Cn="0123456789abcdef",bn=new Uint32Array(1),Sn={name:"RSASSA-PKCS1-v1_5",hash:vn,modulusLength:2048,publicExponent:yn};async function wn(e,t,i){t?.addQueueMeasurement(Ki,i);const n=(new TextEncoder).encode(e);return window.crypto.subtle.digest(vn,n)}function xn(e){return window.crypto.getRandomValues(e)}function En(){return window.crypto.getRandomValues(bn),bn[0]}function Mn(){const e=Date.now(),t=1024*En()+(1023&En()),i=new Uint8Array(16),n=Math.trunc(t/2**30),s=t&2**30-1,r=En();i[0]=e/2**40,i[1]=e/2**32,i[2]=e/2**24,i[3]=e/65536,i[4]=e/256,i[5]=e,i[6]=112|n>>>8,i[7]=n,i[8]=128|s>>>24,i[9]=s>>>16,i[10]=s>>>8,i[11]=s,i[12]=r>>>24,i[13]=r>>>16,i[14]=r>>>8,i[15]=r;let o="";for(let e=0;e<i.length;e++)o+=Cn.charAt(i[e]>>>4),o+=Cn.charAt(15&i[e]),3!==e&&5!==e&&7!==e&&9!==e||(o+="-");return o}async function An(e){return window.crypto.subtle.exportKey(Zi.jb,e)}async function Tn(e){const t=await wn(e);return pn(new Uint8Array(t))}class Dn{constructor(){this.dbName=Zi.$u,this.version=Zi.G8,this.tableName=Zi.WJ,this.dbOpen=!1}async open(){return new Promise((e,t)=>{const i=window.indexedDB.open(this.dbName,this.version);i.addEventListener("upgradeneeded",e=>{e.target.result.createObjectStore(this.tableName)}),i.addEventListener("success",t=>{const i=t;this.db=i.target.result,this.dbOpen=!0,e()}),i.addEventListener("error",()=>t((0,Ji.bD)(en.MG)))})}closeConnection(){const e=this.db;e&&this.dbOpen&&(e.close(),this.dbOpen=!1)}async validateDbIsOpen(){if(!this.dbOpen)return this.open()}async getItem(e){return await this.validateDbIsOpen(),new Promise((t,i)=>{if(!this.db)return i((0,Ji.bD)(en.rn));const n=this.db.transaction([this.tableName],"readonly").objectStore(this.tableName).get(e);n.addEventListener("success",e=>{const i=e;this.closeConnection(),t(i.target.result)}),n.addEventListener("error",e=>{this.closeConnection(),i(e)})})}async setItem(e,t){return await this.validateDbIsOpen(),new Promise((i,n)=>{if(!this.db)return n((0,Ji.bD)(en.rn));const s=this.db.transaction([this.tableName],"readwrite").objectStore(this.tableName).put(t,e);s.addEventListener("success",()=>{this.closeConnection(),i()}),s.addEventListener("error",e=>{this.closeConnection(),n(e)})})}async removeItem(e){return await this.validateDbIsOpen(),new Promise((t,i)=>{if(!this.db)return i((0,Ji.bD)(en.rn));const n=this.db.transaction([this.tableName],"readwrite").objectStore(this.tableName).delete(e);n.addEventListener("success",()=>{this.closeConnection(),t()}),n.addEventListener("error",e=>{this.closeConnection(),i(e)})})}async getKeys(){return await this.validateDbIsOpen(),new Promise((e,t)=>{if(!this.db)return t((0,Ji.bD)(en.rn));const i=this.db.transaction([this.tableName],"readonly").objectStore(this.tableName).getAllKeys();i.addEventListener("success",t=>{const i=t;this.closeConnection(),e(i.target.result)}),i.addEventListener("error",e=>{this.closeConnection(),t(e)})})}async containsKey(e){return await this.validateDbIsOpen(),new Promise((t,i)=>{if(!this.db)return i((0,Ji.bD)(en.rn));const n=this.db.transaction([this.tableName],"readonly").objectStore(this.tableName).count(e);n.addEventListener("success",e=>{const i=e;this.closeConnection(),t(1===i.target.result)}),n.addEventListener("error",e=>{this.closeConnection(),i(e)})})}async deleteDatabase(){return this.db&&this.dbOpen&&this.closeConnection(),new Promise((e,t)=>{const i=window.indexedDB.deleteDatabase(Zi.$u),n=setTimeout(()=>t(!1),200);i.addEventListener("success",()=>(clearTimeout(n),e(!0))),i.addEventListener("blocked",()=>(clearTimeout(n),e(!0))),i.addEventListener("error",()=>(clearTimeout(n),t(!1)))})}}class In{constructor(){this.cache=new Map}getItem(e){return this.cache.get(e)||null}setItem(e,t){this.cache.set(e,t)}removeItem(e){this.cache.delete(e)}getKeys(){const e=[];return this.cache.forEach((t,i)=>{e.push(i)}),e}containsKey(e){return this.cache.has(e)}clear(){this.cache.clear()}}class Rn{constructor(e){this.inMemoryCache=new In,this.indexedDBCache=new Dn,this.logger=e}handleDatabaseAccessError(e){if(!(e instanceof Ji.jT&&e.errorCode===en.MG))throw e;this.logger.error("Could not access persistent storage. This may be caused by browser privacy features which block persistent storage in third-party contexts.")}async getItem(e){const t=this.inMemoryCache.getItem(e);if(!t)try{return this.logger.verbose("Queried item not found in in-memory cache, now querying persistent storage."),await this.indexedDBCache.getItem(e)}catch(e){this.handleDatabaseAccessError(e)}return t}async setItem(e,t){this.inMemoryCache.setItem(e,t);try{await this.indexedDBCache.setItem(e,t)}catch(e){this.handleDatabaseAccessError(e)}}async removeItem(e){this.inMemoryCache.removeItem(e);try{await this.indexedDBCache.removeItem(e)}catch(e){this.handleDatabaseAccessError(e)}}async getKeys(){const e=this.inMemoryCache.getKeys();if(0===e.length)try{return this.logger.verbose("In-memory cache is empty, now querying persistent storage."),await this.indexedDBCache.getKeys()}catch(e){this.handleDatabaseAccessError(e)}return e}async containsKey(e){const t=this.inMemoryCache.containsKey(e);if(!t)try{return this.logger.verbose("Key not found in in-memory cache, now querying persistent storage."),await this.indexedDBCache.containsKey(e)}catch(e){this.handleDatabaseAccessError(e)}return t}clearInMemory(){this.logger.verbose("Deleting in-memory keystore"),this.inMemoryCache.clear(),this.logger.verbose("In-memory keystore deleted")}async clearPersistent(){try{this.logger.verbose("Deleting persistent keystore");const e=await this.indexedDBCache.deleteDatabase();return e&&this.logger.verbose("Persistent keystore deleted"),e}catch(e){return this.handleDatabaseAccessError(e),!1}}}class Ln{constructor(e,t){this.logger=e,function(e){if(!("crypto"in window))throw e.error("BrowserCrypto: crypto interface is unavailable"),(0,Ji.bD)(en.rc);e.verbose("BrowserCrypto: modern crypto interface available")}(e),this.cache=new Rn(this.logger),this.performanceClient=t}createNewGuid(){return Mn()}base64Encode(e){return gn(e)}base64Decode(e){return mn(e)}base64UrlEncode(e){return un(e)}encodeKid(e){return this.base64UrlEncode(JSON.stringify({kid:e}))}async getPublicKeyThumbprint(e){const t=this.performanceClient?.startMeasurement(_t,e.correlationId),i=await async function(e,t){return window.crypto.subtle.generateKey(Sn,e,t)}(Ln.EXTRACTABLE,Ln.POP_KEY_USAGES),n=await An(i.publicKey),s=kn({e:n.e,kty:n.kty,n:n.n}),r=await this.hashString(s),o=await An(i.privateKey),a=await async function(e){return window.crypto.subtle.importKey(Zi.jb,e,Sn,!1,["sign"])}(o);return await this.cache.setItem(r,{privateKey:a,publicKey:i.publicKey,requestMethod:e.resourceRequestMethod,requestUri:e.resourceRequestUri}),t&&t.end({success:!0}),r}async removeTokenBindingKey(e){return await this.cache.removeItem(e),!await this.cache.containsKey(e)}async clearKeystore(){this.cache.clearInMemory();try{return await this.cache.clearPersistent(),!0}catch(e){return e instanceof Error?this.logger.error(`Clearing keystore failed with error: ${e.message}`):this.logger.error("Clearing keystore failed with unknown error"),!1}}async signJwt(e,t,i,n){const s=this.performanceClient?.startMeasurement(Ft,n),r=await this.cache.getItem(t);if(!r)throw(0,Ji.bD)(en.e0);const o=await An(r.publicKey),a=kn(o),l=un(JSON.stringify({kid:t})),c=un(dn.getShrHeaderString({...i?.header,alg:o.alg,kid:l}));e.cnf={jwk:JSON.parse(a)};const h=`${c}.${un(JSON.stringify(e))}`,d=(new TextEncoder).encode(h),u=await async function(e,t){return window.crypto.subtle.sign(Sn,e,t)}(r.privateKey,d),p=`${h}.${pn(new Uint8Array(u))}`;return s&&s.end({success:!0}),p}async hashString(e){return Tn(e)}}function kn(e){return JSON.stringify(e,Object.keys(e).sort())}Ln.POP_KEY_USAGES=["sign","verify"],Ln.EXTRACTABLE=!0;const Pn=(e,t,i,n,s)=>(...r)=>{i.trace(`Executing function ${t}`);const o=n?.startMeasurement(t,s);if(s){const e=t+"CallCount";n?.incrementFields({[e]:1},s)}try{const n=e(...r);return o?.end({success:!0}),i.trace(`Returning result from ${t}`),n}catch(e){i.trace(`Error occurred in ${t}`);try{i.trace(JSON.stringify(e))}catch(e){i.trace("Unable to print error message.")}throw o?.end({success:!1},e),e}},Nn=(e,t,i,n,s)=>(...r)=>{i.trace(`Executing function ${t}`);const o=n?.startMeasurement(t,s);if(s){const e=t+"CallCount";n?.incrementFields({[e]:1},s)}return n?.setPreQueueTime(t,s),e(...r).then(e=>(i.trace(`Returning result from ${t}`),o?.end({success:!0}),e)).catch(e=>{i.trace(`Error occurred in ${t}`);try{i.trace(JSON.stringify(e))}catch(e){i.trace("Unable to print error message.")}throw o?.end({success:!1},e),e})};class On{constructor(e,t,i,n){this.networkInterface=e,this.logger=t,this.performanceClient=i,this.correlationId=n}async detectRegion(e,t){this.performanceClient?.addQueueMeasurement(Pi,this.correlationId);let i=e;if(i)t.region_source=s.jZ.ENVIRONMENT_VARIABLE;else{const e=On.IMDS_OPTIONS;try{const n=await Nn(this.getRegionFromIMDS.bind(this),Ni,this.logger,this.performanceClient,this.correlationId)(s.YM.IMDS_VERSION,e);if(n.status===s.Kk.httpSuccess&&(i=n.body,t.region_source=s.jZ.IMDS),n.status===s.Kk.httpBadRequest){const n=await Nn(this.getCurrentVersion.bind(this),Oi,this.logger,this.performanceClient,this.correlationId)(e);if(!n)return t.region_source=s.jZ.FAILED_AUTO_DETECTION,null;const r=await Nn(this.getRegionFromIMDS.bind(this),Ni,this.logger,this.performanceClient,this.correlationId)(n,e);r.status===s.Kk.httpSuccess&&(i=r.body,t.region_source=s.jZ.IMDS)}}catch(e){return t.region_source=s.jZ.FAILED_AUTO_DETECTION,null}}return i||(t.region_source=s.jZ.FAILED_AUTO_DETECTION),i||null}async getRegionFromIMDS(e,t){return this.performanceClient?.addQueueMeasurement(Ni,this.correlationId),this.networkInterface.sendGetRequestAsync(`${s.YM.IMDS_ENDPOINT}?api-version=${e}&format=text`,t,s.YM.IMDS_TIMEOUT)}async getCurrentVersion(e){this.performanceClient?.addQueueMeasurement(Oi,this.correlationId);try{const t=await this.networkInterface.sendGetRequestAsync(`${s.YM.IMDS_ENDPOINT}?format=json`,e);return t.status===s.Kk.httpBadRequest&&t.body&&t.body["newest-versions"]&&t.body["newest-versions"].length>0?t.body["newest-versions"][0]:null}catch(e){return null}}}On.IMDS_OPTIONS={headers:{Metadata:"true"}};class _n{constructor(e,t,i,n,s,r,o,a){this.canonicalAuthority=e,this._canonicalAuthority.validateAsUri(),this.networkInterface=t,this.cacheManager=i,this.authorityOptions=n,this.regionDiscoveryMetadata={region_used:void 0,region_source:void 0,region_outcome:void 0},this.logger=s,this.performanceClient=o,this.correlationId=r,this.managedIdentity=a||!1,this.regionDiscovery=new On(t,this.logger,this.performanceClient,this.correlationId)}getAuthorityType(e){if(e.HostNameAndPort.endsWith(s.YM.CIAM_AUTH_URL))return 3;const t=e.PathSegments;if(t.length)switch(t[0].toLowerCase()){case s.YM.ADFS:return 1;case s.YM.DSTS:return 2}return 0}get authorityType(){return this.getAuthorityType(this.canonicalAuthorityUrlComponents)}get protocolMode(){return this.authorityOptions.protocolMode}get options(){return this.authorityOptions}get canonicalAuthority(){return this._canonicalAuthority.urlString}set canonicalAuthority(e){this._canonicalAuthority=new lt(e),this._canonicalAuthority.validateAsUri(),this._canonicalAuthorityUrlComponents=null}get canonicalAuthorityUrlComponents(){return this._canonicalAuthorityUrlComponents||(this._canonicalAuthorityUrlComponents=this._canonicalAuthority.getUrlComponents()),this._canonicalAuthorityUrlComponents}get hostnameAndPort(){return this.canonicalAuthorityUrlComponents.HostNameAndPort.toLowerCase()}get tenant(){return this.canonicalAuthorityUrlComponents.PathSegments[0]}get authorizationEndpoint(){if(this.discoveryComplete())return this.replacePath(this.metadata.authorization_endpoint);throw te(p)}get tokenEndpoint(){if(this.discoveryComplete())return this.replacePath(this.metadata.token_endpoint);throw te(p)}get deviceCodeEndpoint(){if(this.discoveryComplete())return this.replacePath(this.metadata.token_endpoint.replace("/token","/devicecode"));throw te(p)}get endSessionEndpoint(){if(this.discoveryComplete()){if(!this.metadata.end_session_endpoint)throw te(K);return this.replacePath(this.metadata.end_session_endpoint)}throw te(p)}get selfSignedJwtAudience(){if(this.discoveryComplete())return this.replacePath(this.metadata.issuer);throw te(p)}get jwksUri(){if(this.discoveryComplete())return this.replacePath(this.metadata.jwks_uri);throw te(p)}canReplaceTenant(e){return 1===e.PathSegments.length&&!_n.reservedTenantDomains.has(e.PathSegments[0])&&0===this.getAuthorityType(e)&&this.protocolMode===r}replaceTenant(e){return e.replace(/{tenant}|{tenantid}/g,this.tenant)}replacePath(e){let t=e;const i=new lt(this.metadata.canonical_authority).getUrlComponents(),n=i.PathSegments;return this.canonicalAuthorityUrlComponents.PathSegments.forEach((e,s)=>{let r=n[s];if(0===s&&this.canReplaceTenant(i)){const e=new lt(this.metadata.authorization_endpoint).getUrlComponents().PathSegments[0];r!==e&&(this.logger.verbose(`Replacing tenant domain name ${r} with id ${e}`),r=e)}e!==r&&(t=t.replace(`/${r}/`,`/${e}/`))}),this.replaceTenant(t)}get defaultOpenIdConfigurationEndpoint(){const e=this.hostnameAndPort;return this.canonicalAuthority.endsWith("v2.0/")||1===this.authorityType||this.protocolMode!==r&&!this.isAliasOfKnownMicrosoftAuthority(e)?`${this.canonicalAuthority}.well-known/openid-configuration`:`${this.canonicalAuthority}v2.0/.well-known/openid-configuration`}discoveryComplete(){return!!this.metadata}async resolveEndpointsAsync(){this.performanceClient?.addQueueMeasurement(Ti,this.correlationId);const e=this.getCurrentMetadataEntity(),t=await Nn(this.updateCloudDiscoveryMetadata.bind(this),Ii,this.logger,this.performanceClient,this.correlationId)(e);this.canonicalAuthority=this.canonicalAuthority.replace(this.hostnameAndPort,e.preferred_network);const i=await Nn(this.updateEndpointMetadata.bind(this),Li,this.logger,this.performanceClient,this.correlationId)(e);this.updateCachedMetadata(e,t,{source:i}),this.performanceClient?.addFields({cloudDiscoverySource:t,authorityEndpointSource:i},this.correlationId)}getCurrentMetadataEntity(){let e=this.cacheManager.getAuthorityMetadataByAlias(this.hostnameAndPort);return e||(e={aliases:[],preferred_cache:this.hostnameAndPort,preferred_network:this.hostnameAndPort,canonical_authority:this.canonicalAuthority,authorization_endpoint:"",token_endpoint:"",end_session_endpoint:"",issuer:"",aliasesFromNetwork:!1,endpointsFromNetwork:!1,expiresAt:we(),jwks_uri:""}),e}updateCachedMetadata(e,t,i){t!==s.E_.CACHE&&i?.source!==s.E_.CACHE&&(e.expiresAt=we(),e.canonical_authority=this.canonicalAuthority);const n=this.cacheManager.generateAuthorityMetadataCacheKey(e.preferred_cache);this.cacheManager.setAuthorityMetadata(n,e),this.metadata=e}async updateEndpointMetadata(e){this.performanceClient?.addQueueMeasurement(Li,this.correlationId);const t=this.updateEndpointMetadataFromLocalSources(e);if(t)return t.source===s.E_.HARDCODED_VALUES&&this.authorityOptions.azureRegionConfiguration?.azureRegion&&t.metadata&&(xe(e,await Nn(this.updateMetadataWithRegionalInformation.bind(this),ki,this.logger,this.performanceClient,this.correlationId)(t.metadata),!1),e.canonical_authority=this.canonicalAuthority),t.source;let i=await Nn(this.getEndpointMetadataFromNetwork.bind(this),Ri,this.logger,this.performanceClient,this.correlationId)();if(i)return this.authorityOptions.azureRegionConfiguration?.azureRegion&&(i=await Nn(this.updateMetadataWithRegionalInformation.bind(this),ki,this.logger,this.performanceClient,this.correlationId)(i)),xe(e,i,!0),s.E_.NETWORK;throw te(f,this.defaultOpenIdConfigurationEndpoint)}updateEndpointMetadataFromLocalSources(e){this.logger.verbose("Attempting to get endpoint metadata from authority configuration");const t=this.getEndpointMetadataFromConfig();if(t)return this.logger.verbose("Found endpoint metadata in authority configuration"),xe(e,t,!1),{source:s.E_.CONFIG};if(this.logger.verbose("Did not find endpoint metadata in the config... Attempting to get endpoint metadata from the hardcoded values."),this.authorityOptions.skipAuthorityMetadataCache)this.logger.verbose("Skipping hardcoded metadata cache since skipAuthorityMetadataCache is set to true. Attempting to get endpoint metadata from the network metadata cache.");else{const t=this.getEndpointMetadataFromHardcodedValues();if(t)return xe(e,t,!1),{source:s.E_.HARDCODED_VALUES,metadata:t};this.logger.verbose("Did not find endpoint metadata in hardcoded values... Attempting to get endpoint metadata from the network metadata cache.")}const i=Me(e);return this.isAuthoritySameType(e)&&e.endpointsFromNetwork&&!i?(this.logger.verbose("Found endpoint metadata in the cache."),{source:s.E_.CACHE}):(i&&this.logger.verbose("The metadata entity is expired."),null)}isAuthoritySameType(e){return new lt(e.canonical_authority).getUrlComponents().PathSegments.length===this.canonicalAuthorityUrlComponents.PathSegments.length}getEndpointMetadataFromConfig(){if(this.authorityOptions.authorityMetadata)try{return JSON.parse(this.authorityOptions.authorityMetadata)}catch(e){throw Xe(Ve)}return null}async getEndpointMetadataFromNetwork(){this.performanceClient?.addQueueMeasurement(Ri,this.correlationId);const e={},t=this.defaultOpenIdConfigurationEndpoint;this.logger.verbose(`Authority.getEndpointMetadataFromNetwork: attempting to retrieve OAuth endpoints from ${t}`);try{const i=await this.networkInterface.sendGetRequestAsync(t,e),n=function(e){return e.hasOwnProperty("authorization_endpoint")&&e.hasOwnProperty("token_endpoint")&&e.hasOwnProperty("issuer")&&e.hasOwnProperty("jwks_uri")}(i.body);return n?i.body:(this.logger.verbose("Authority.getEndpointMetadataFromNetwork: could not parse response as OpenID configuration"),null)}catch(e){return this.logger.verbose(`Authority.getEndpointMetadataFromNetwork: ${e}`),null}}getEndpointMetadataFromHardcodedValues(){return this.hostnameAndPort in ct?ct[this.hostnameAndPort]:null}async updateMetadataWithRegionalInformation(e){this.performanceClient?.addQueueMeasurement(ki,this.correlationId);const t=this.authorityOptions.azureRegionConfiguration?.azureRegion;if(t){if(t!==s.YM.AZURE_REGION_AUTO_DISCOVER_FLAG)return this.regionDiscoveryMetadata.region_outcome=s._2.CONFIGURED_NO_AUTO_DETECTION,this.regionDiscoveryMetadata.region_used=t,_n.replaceWithRegionalInformation(e,t);const i=await Nn(this.regionDiscovery.detectRegion.bind(this.regionDiscovery),Pi,this.logger,this.performanceClient,this.correlationId)(this.authorityOptions.azureRegionConfiguration?.environmentRegion,this.regionDiscoveryMetadata);if(i)return this.regionDiscoveryMetadata.region_outcome=s._2.AUTO_DETECTION_REQUESTED_SUCCESSFUL,this.regionDiscoveryMetadata.region_used=i,_n.replaceWithRegionalInformation(e,i);this.regionDiscoveryMetadata.region_outcome=s._2.AUTO_DETECTION_REQUESTED_FAILED}return e}async updateCloudDiscoveryMetadata(e){this.performanceClient?.addQueueMeasurement(Ii,this.correlationId);const t=this.updateCloudDiscoveryMetadataFromLocalSources(e);if(t)return t;const i=await Nn(this.getCloudDiscoveryMetadataFromNetwork.bind(this),Di,this.logger,this.performanceClient,this.correlationId)();if(i)return Ee(e,i,!0),s.E_.NETWORK;throw Xe(Be)}updateCloudDiscoveryMetadataFromLocalSources(e){this.logger.verbose("Attempting to get cloud discovery metadata  from authority configuration"),this.logger.verbosePii(`Known Authorities: ${this.authorityOptions.knownAuthorities||s.YM.NOT_APPLICABLE}`),this.logger.verbosePii(`Authority Metadata: ${this.authorityOptions.authorityMetadata||s.YM.NOT_APPLICABLE}`),this.logger.verbosePii(`Canonical Authority: ${e.canonical_authority||s.YM.NOT_APPLICABLE}`);const t=this.getCloudDiscoveryMetadataFromConfig();if(t)return this.logger.verbose("Found cloud discovery metadata in authority configuration"),Ee(e,t,!1),s.E_.CONFIG;if(this.logger.verbose("Did not find cloud discovery metadata in the config... Attempting to get cloud discovery metadata from the hardcoded values."),this.options.skipAuthorityMetadataCache)this.logger.verbose("Skipping hardcoded cloud discovery metadata cache since skipAuthorityMetadataCache is set to true. Attempting to get cloud discovery metadata from the network metadata cache.");else{const t=(i=this.hostnameAndPort,pt(ht.metadata,i));if(t)return this.logger.verbose("Found cloud discovery metadata from hardcoded values."),Ee(e,t,!1),s.E_.HARDCODED_VALUES;this.logger.verbose("Did not find cloud discovery metadata in hardcoded values... Attempting to get cloud discovery metadata from the network metadata cache.")}var i;const n=Me(e);return this.isAuthoritySameType(e)&&e.aliasesFromNetwork&&!n?(this.logger.verbose("Found cloud discovery metadata in the cache."),s.E_.CACHE):(n&&this.logger.verbose("The metadata entity is expired."),null)}getCloudDiscoveryMetadataFromConfig(){if(3===this.authorityType)return this.logger.verbose("CIAM authorities do not support cloud discovery metadata, generate the aliases from authority host."),_n.createCloudDiscoveryMetadataFromHost(this.hostnameAndPort);if(this.authorityOptions.cloudDiscoveryMetadata){this.logger.verbose("The cloud discovery metadata has been provided as a network response, in the config.");try{this.logger.verbose("Attempting to parse the cloud discovery metadata.");const e=pt(JSON.parse(this.authorityOptions.cloudDiscoveryMetadata).metadata,this.hostnameAndPort);if(this.logger.verbose("Parsed the cloud discovery metadata."),e)return this.logger.verbose("There is returnable metadata attached to the parsed cloud discovery metadata."),e;this.logger.verbose("There is no metadata attached to the parsed cloud discovery metadata.")}catch(e){throw this.logger.verbose("Unable to parse the cloud discovery metadata. Throwing Invalid Cloud Discovery Metadata Error."),Xe(Ge)}}return this.isInKnownAuthorities()?(this.logger.verbose("The host is included in knownAuthorities. Creating new cloud discovery metadata from the host."),_n.createCloudDiscoveryMetadataFromHost(this.hostnameAndPort)):null}async getCloudDiscoveryMetadataFromNetwork(){this.performanceClient?.addQueueMeasurement(Di,this.correlationId);const e=`${s.YM.AAD_INSTANCE_DISCOVERY_ENDPT}${this.canonicalAuthority}oauth2/v2.0/authorize`,t={};let i=null;try{const n=await this.networkInterface.sendGetRequestAsync(e,t);let r,o;if(function(e){return e.hasOwnProperty("tenant_discovery_endpoint")&&e.hasOwnProperty("metadata")}(n.body))r=n.body,o=r.metadata,this.logger.verbosePii(`tenant_discovery_endpoint is: ${r.tenant_discovery_endpoint}`);else{if(!function(e){return e.hasOwnProperty("error")&&e.hasOwnProperty("error_description")}(n.body))return this.logger.error("AAD did not return a CloudInstanceDiscoveryResponse or CloudInstanceDiscoveryErrorResponse"),null;if(this.logger.warning(`A CloudInstanceDiscoveryErrorResponse was returned. The cloud instance discovery network request's status code is: ${n.status}`),r=n.body,r.error===s.YM.INVALID_INSTANCE)return this.logger.error("The CloudInstanceDiscoveryErrorResponse error is invalid_instance."),null;this.logger.warning(`The CloudInstanceDiscoveryErrorResponse error is ${r.error}`),this.logger.warning(`The CloudInstanceDiscoveryErrorResponse error description is ${r.error_description}`),this.logger.warning("Setting the value of the CloudInstanceDiscoveryMetadata (returned from the network) to []"),o=[]}this.logger.verbose("Attempting to find a match between the developer's authority and the CloudInstanceDiscoveryMetadata returned from the network request."),i=pt(o,this.hostnameAndPort)}catch(e){if(e instanceof l.lR)this.logger.error(`There was a network error while attempting to get the cloud discovery instance metadata.\nError: ${e.errorCode}\nError Description: ${e.errorMessage}`);else{const t=e;this.logger.error(`A non-MSALJS error was thrown while attempting to get the cloud instance discovery metadata.\nError: ${t.name}\nError Description: ${t.message}`)}return null}return i||(this.logger.warning("The developer's authority was not found within the CloudInstanceDiscoveryMetadata returned from the network request."),this.logger.verbose("Creating custom Authority for custom domain scenario."),i=_n.createCloudDiscoveryMetadataFromHost(this.hostnameAndPort)),i}isInKnownAuthorities(){return this.authorityOptions.knownAuthorities.filter(e=>e&&lt.getDomainFromUrl(e).toLowerCase()===this.hostnameAndPort).length>0}static generateAuthority(e,t){let i;if(t&&t.azureCloudInstance!==a){const e=t.tenant?t.tenant:s.YM.DEFAULT_COMMON_TENANT;i=`${t.azureCloudInstance}/${e}/`}return i||e}static createCloudDiscoveryMetadataFromHost(e){return{preferred_network:e,preferred_cache:e,aliases:[e]}}getPreferredCache(){if(this.managedIdentity)return s.YM.DEFAULT_AUTHORITY_HOST;if(this.discoveryComplete())return this.metadata.preferred_cache;throw te(p)}isAlias(e){return this.metadata.aliases.indexOf(e)>-1}isAliasOfKnownMicrosoftAuthority(e){return dt.has(e)}static isPublicCloudAuthority(e){return s.YM.KNOWN_PUBLIC_CLOUDS.indexOf(e)>=0}static buildRegionalAuthorityString(e,t,i){const n=new lt(e);n.validateAsUri();const r=n.getUrlComponents();let o=`${t}.${r.HostNameAndPort}`;this.isPublicCloudAuthority(r.HostNameAndPort)&&(o=`${t}.${s.YM.REGIONAL_AUTH_PUBLIC_CLOUD_SUFFIX}`);const a=lt.constructAuthorityUriFromObject({...n.getUrlComponents(),HostNameAndPort:o}).urlString;return i?`${a}?${i}`:a}static replaceWithRegionalInformation(e,t){const i={...e};return i.authorization_endpoint=_n.buildRegionalAuthorityString(i.authorization_endpoint,t),i.token_endpoint=_n.buildRegionalAuthorityString(i.token_endpoint,t),i.end_session_endpoint&&(i.end_session_endpoint=_n.buildRegionalAuthorityString(i.end_session_endpoint,t)),i}static transformCIAMAuthority(e){let t=e;const i=new lt(e).getUrlComponents();return 0===i.PathSegments.length&&i.HostNameAndPort.endsWith(s.YM.CIAM_AUTH_URL)&&(t=`${t}${i.HostNameAndPort.split(".")[0]}${s.YM.AAD_TENANT_DOMAIN_SUFFIX}`),t}}function Fn(e){return e.endsWith(s.YM.FORWARD_SLASH)?e:`${e}${s.YM.FORWARD_SLASH}`}_n.reservedTenantDomains=new Set(["{tenant}","{tenantid}",s.v2.COMMON,s.v2.CONSUMERS,s.v2.ORGANIZATIONS]);const Gn="no_tokens_found",Vn="native_account_unavailable",Bn="refresh_token_expired",Hn="bad_token",zn=["interaction_required","consent_required","login_required",Hn],Un=["message_only","additional_action","basic_action","user_password_expired","consent_required","bad_token"],Wn={[Gn]:"No refresh token found in the cache. Please sign-in.",[Vn]:"The requested account is not available in the native broker. It may have been deleted or logged out. Please sign-in again using an interactive API.",[Bn]:"Refresh token has expired.",[Hn]:"Identity provider returned bad_token due to an expired or invalid refresh token. Please invoke an interactive API to resolve."};class jn extends l.lR{constructor(e,t,i,n,r,o,a,l){super(e,t,i),Object.setPrototypeOf(this,jn.prototype),this.timestamp=n||s.YM.EMPTY_STRING,this.traceId=r||s.YM.EMPTY_STRING,this.correlationId=o||s.YM.EMPTY_STRING,this.claims=a||s.YM.EMPTY_STRING,this.name="InteractionRequiredAuthError",this.errorNo=l}}function Kn(e,t,i){const n=!!e&&zn.indexOf(e)>-1,s=!!i&&Un.indexOf(i)>-1,r=!!t&&zn.some(e=>t.indexOf(e)>-1);return n||r||s}function $n(e){return new jn(e,Wn[e])}class Yn{static setRequestState(e,t,i){const n=Yn.generateLibraryState(e,i);return t?`${n}${s.YM.RESOURCE_DELIM}${t}`:n}static generateLibraryState(e,t){if(!e)throw te(F);const i={id:e.createNewGuid()};t&&(i.meta=t);const n=JSON.stringify(i);return e.base64Encode(n)}static parseRequestState(e,t){if(!e)throw te(F);if(!t)throw te(v);try{const i=t.split(s.YM.RESOURCE_DELIM),n=i[0],r=i.length>1?i.slice(1).join(s.YM.RESOURCE_DELIM):s.YM.EMPTY_STRING,o=e.base64Decode(n),a=JSON.parse(o);return{userRequestState:r||s.YM.EMPTY_STRING,libraryState:a}}catch(e){throw te(v)}}}const qn="home_account_id",Xn="UPN";var Zn=i(24680),Qn=i(85362);class Jn{constructor(e){this.validateWindowStorage(e),this.windowStorage=window[e]}validateWindowStorage(e){if(e!==Zi.Al.LocalStorage&&e!==Zi.Al.SessionStorage||!window[e])throw(0,Zn.jz)(Qn.xz)}getItem(e){return this.windowStorage.getItem(e)}setItem(e,t){this.windowStorage.setItem(e,t)}removeItem(e){this.windowStorage.removeItem(e)}getKeys(){return Object.keys(this.windowStorage)}containsKey(e){return this.windowStorage.hasOwnProperty(e)}}function es(e,t){if(!t)return null;try{return Yn.parseRequestState(e,t).libraryState.meta}catch(e){throw te(v)}}class ts extends yt{constructor(e,t,i,n,s,r){super(e,i,n,s),this.COOKIE_LIFE_MULTIPLIER=864e5,this.cacheConfig=t,this.logger=n,this.internalStorage=new In,this.browserStorage=this.setupBrowserStorage(this.cacheConfig.cacheLocation),this.temporaryCacheStorage=this.setupTemporaryCacheStorage(this.cacheConfig.temporaryCacheLocation,this.cacheConfig.cacheLocation),t.cacheMigrationEnabled&&(this.migrateCacheEntries(),this.createKeyMaps()),this.performanceClient=r}setupBrowserStorage(e){switch(e){case Zi.Al.LocalStorage:case Zi.Al.SessionStorage:try{return new Jn(e)}catch(e){this.logger.verbose(e);break}}return this.cacheConfig.cacheLocation=Zi.Al.MemoryStorage,new In}setupTemporaryCacheStorage(e,t){switch(t){case Zi.Al.LocalStorage:case Zi.Al.SessionStorage:try{return new Jn(e||Zi.Al.SessionStorage)}catch(e){return this.logger.verbose(e),this.internalStorage}case Zi.Al.MemoryStorage:default:return this.internalStorage}}migrateCacheEntries(){const e=`${s.YM.CACHE_PREFIX}.${s.Gd.ID_TOKEN}`,t=`${s.YM.CACHE_PREFIX}.${s.Gd.CLIENT_INFO}`,i=`${s.YM.CACHE_PREFIX}.${s.Gd.ERROR}`,n=`${s.YM.CACHE_PREFIX}.${s.Gd.ERROR_DESC}`,r=[this.browserStorage.getItem(e),this.browserStorage.getItem(t),this.browserStorage.getItem(i),this.browserStorage.getItem(n)];[s.Gd.ID_TOKEN,s.Gd.CLIENT_INFO,s.Gd.ERROR,s.Gd.ERROR_DESC].forEach((e,t)=>{const i=r[t];i&&this.setTemporaryCache(e,i,!0)})}createKeyMaps(){this.logger.trace("BrowserCacheManager - createKeyMaps called.");const e=this.getItem(Zi.dh.ACCOUNT_KEYS),t=this.getItem(`${Zi.dh.TOKEN_KEYS}.${this.clientId}`);e&&t?this.logger.verbose("BrowserCacheManager:createKeyMaps - account and token key maps already exist, skipping migration."):this.browserStorage.getKeys().forEach(e=>{if(this.isCredentialKey(e)){const t=this.getItem(e);if(t){const i=this.validateAndParseJson(t);if(i&&i.hasOwnProperty("credentialType"))switch(i.credentialType){case s.aG.ID_TOKEN:if(fe(i)){this.logger.trace("BrowserCacheManager:createKeyMaps - idToken found, saving key to token key map"),this.logger.tracePii(`BrowserCacheManager:createKeyMaps - idToken with key: ${e} found, saving key to token key map`);const t=i,n=this.updateCredentialCacheKey(e,t);return void this.addTokenKey(n,s.aG.ID_TOKEN)}this.logger.trace("BrowserCacheManager:createKeyMaps - key found matching idToken schema with value containing idToken credentialType field but value failed IdTokenEntity validation, skipping."),this.logger.tracePii(`BrowserCacheManager:createKeyMaps - failed idToken validation on key: ${e}`);break;case s.aG.ACCESS_TOKEN:case s.aG.ACCESS_TOKEN_WITH_AUTH_SCHEME:if(ge(i)){this.logger.trace("BrowserCacheManager:createKeyMaps - accessToken found, saving key to token key map"),this.logger.tracePii(`BrowserCacheManager:createKeyMaps - accessToken with key: ${e} found, saving key to token key map`);const t=i,n=this.updateCredentialCacheKey(e,t);return void this.addTokenKey(n,s.aG.ACCESS_TOKEN)}this.logger.trace("BrowserCacheManager:createKeyMaps - key found matching accessToken schema with value containing accessToken credentialType field but value failed AccessTokenEntity validation, skipping."),this.logger.tracePii(`BrowserCacheManager:createKeyMaps - failed accessToken validation on key: ${e}`);break;case s.aG.REFRESH_TOKEN:if(me(i)){this.logger.trace("BrowserCacheManager:createKeyMaps - refreshToken found, saving key to token key map"),this.logger.tracePii(`BrowserCacheManager:createKeyMaps - refreshToken with key: ${e} found, saving key to token key map`);const t=i,n=this.updateCredentialCacheKey(e,t);return void this.addTokenKey(n,s.aG.REFRESH_TOKEN)}this.logger.trace("BrowserCacheManager:createKeyMaps - key found matching refreshToken schema with value containing refreshToken credentialType field but value failed RefreshTokenEntity validation, skipping."),this.logger.tracePii(`BrowserCacheManager:createKeyMaps - failed refreshToken validation on key: ${e}`)}}}if(this.isAccountKey(e)){const t=this.getItem(e);if(t){const i=this.validateAndParseJson(t);i&&rt.isAccountEntity(i)&&(this.logger.trace("BrowserCacheManager:createKeyMaps - account found, saving key to account key map"),this.logger.tracePii(`BrowserCacheManager:createKeyMaps - account with key: ${e} found, saving key to account key map`),this.addAccountKeyToMap(e))}}})}validateAndParseJson(e){try{const t=JSON.parse(e);return t&&"object"==typeof t?t:null}catch(e){return null}}getItem(e){return this.browserStorage.getItem(e)}setItem(e,t){this.browserStorage.setItem(e,t)}getAccount(e,t){this.logger.trace("BrowserCacheManager.getAccount called");const i=this.getCachedAccountEntity(e);return this.updateOutdatedCachedAccount(e,i,t)}getCachedAccountEntity(e){const t=this.getItem(e);if(!t)return this.removeAccountKeyFromMap(e),null;const i=this.validateAndParseJson(t);return i&&rt.isAccountEntity(i)?yt.toObject(new rt,i):(this.removeAccountKeyFromMap(e),null)}setAccount(e){this.logger.trace("BrowserCacheManager.setAccount called");const t=e.generateAccountKey();this.setItem(t,JSON.stringify(e)),this.addAccountKeyToMap(t)}getAccountKeys(){this.logger.trace("BrowserCacheManager.getAccountKeys called");const e=this.getItem(Zi.dh.ACCOUNT_KEYS);return e?JSON.parse(e):(this.logger.verbose("BrowserCacheManager.getAccountKeys - No account keys found"),[])}addAccountKeyToMap(e){this.logger.trace("BrowserCacheManager.addAccountKeyToMap called"),this.logger.tracePii(`BrowserCacheManager.addAccountKeyToMap called with key: ${e}`);const t=this.getAccountKeys();-1===t.indexOf(e)?(t.push(e),this.setItem(Zi.dh.ACCOUNT_KEYS,JSON.stringify(t)),this.logger.verbose("BrowserCacheManager.addAccountKeyToMap account key added")):this.logger.verbose("BrowserCacheManager.addAccountKeyToMap account key already exists in map")}removeAccountKeyFromMap(e){this.logger.trace("BrowserCacheManager.removeAccountKeyFromMap called"),this.logger.tracePii(`BrowserCacheManager.removeAccountKeyFromMap called with key: ${e}`);const t=this.getAccountKeys(),i=t.indexOf(e);i>-1?(t.splice(i,1),this.setItem(Zi.dh.ACCOUNT_KEYS,JSON.stringify(t)),this.logger.trace("BrowserCacheManager.removeAccountKeyFromMap account key removed")):this.logger.trace("BrowserCacheManager.removeAccountKeyFromMap key not found in existing map")}async removeAccount(e){super.removeAccount(e),this.removeAccountKeyFromMap(e)}removeOutdatedAccount(e){this.removeItem(e),this.removeAccountKeyFromMap(e)}removeIdToken(e){super.removeIdToken(e),this.removeTokenKey(e,s.aG.ID_TOKEN)}async removeAccessToken(e){super.removeAccessToken(e),this.removeTokenKey(e,s.aG.ACCESS_TOKEN)}removeRefreshToken(e){super.removeRefreshToken(e),this.removeTokenKey(e,s.aG.REFRESH_TOKEN)}getTokenKeys(){this.logger.trace("BrowserCacheManager.getTokenKeys called");const e=this.getItem(`${Zi.dh.TOKEN_KEYS}.${this.clientId}`);if(e){const t=this.validateAndParseJson(e);if(t&&t.hasOwnProperty("idToken")&&t.hasOwnProperty("accessToken")&&t.hasOwnProperty("refreshToken"))return t;this.logger.error("BrowserCacheManager.getTokenKeys - Token keys found but in an unknown format. Returning empty key map.")}else this.logger.verbose("BrowserCacheManager.getTokenKeys - No token keys found");return{idToken:[],accessToken:[],refreshToken:[]}}addTokenKey(e,t){this.logger.trace("BrowserCacheManager addTokenKey called");const i=this.getTokenKeys();switch(t){case s.aG.ID_TOKEN:-1===i.idToken.indexOf(e)&&(this.logger.info("BrowserCacheManager: addTokenKey - idToken added to map"),i.idToken.push(e));break;case s.aG.ACCESS_TOKEN:-1===i.accessToken.indexOf(e)&&(this.logger.info("BrowserCacheManager: addTokenKey - accessToken added to map"),i.accessToken.push(e));break;case s.aG.REFRESH_TOKEN:-1===i.refreshToken.indexOf(e)&&(this.logger.info("BrowserCacheManager: addTokenKey - refreshToken added to map"),i.refreshToken.push(e));break;default:throw this.logger.error(`BrowserCacheManager:addTokenKey - CredentialType provided invalid. CredentialType: ${t}`),te(G)}this.setItem(`${Zi.dh.TOKEN_KEYS}.${this.clientId}`,JSON.stringify(i))}removeTokenKey(e,t){this.logger.trace("BrowserCacheManager removeTokenKey called");const i=this.getTokenKeys();switch(t){case s.aG.ID_TOKEN:this.logger.infoPii(`BrowserCacheManager: removeTokenKey - attempting to remove idToken with key: ${e} from map`);const n=i.idToken.indexOf(e);n>-1?(this.logger.info("BrowserCacheManager: removeTokenKey - idToken removed from map"),i.idToken.splice(n,1)):this.logger.info("BrowserCacheManager: removeTokenKey - idToken does not exist in map. Either it was previously removed or it was never added.");break;case s.aG.ACCESS_TOKEN:this.logger.infoPii(`BrowserCacheManager: removeTokenKey - attempting to remove accessToken with key: ${e} from map`);const r=i.accessToken.indexOf(e);r>-1?(this.logger.info("BrowserCacheManager: removeTokenKey - accessToken removed from map"),i.accessToken.splice(r,1)):this.logger.info("BrowserCacheManager: removeTokenKey - accessToken does not exist in map. Either it was previously removed or it was never added.");break;case s.aG.REFRESH_TOKEN:this.logger.infoPii(`BrowserCacheManager: removeTokenKey - attempting to remove refreshToken with key: ${e} from map`);const o=i.refreshToken.indexOf(e);o>-1?(this.logger.info("BrowserCacheManager: removeTokenKey - refreshToken removed from map"),i.refreshToken.splice(o,1)):this.logger.info("BrowserCacheManager: removeTokenKey - refreshToken does not exist in map. Either it was previously removed or it was never added.");break;default:throw this.logger.error(`BrowserCacheManager:removeTokenKey - CredentialType provided invalid. CredentialType: ${t}`),te(G)}this.setItem(`${Zi.dh.TOKEN_KEYS}.${this.clientId}`,JSON.stringify(i))}getIdTokenCredential(e){const t=this.getItem(e);if(!t)return this.logger.trace("BrowserCacheManager.getIdTokenCredential: called, no cache hit"),this.removeTokenKey(e,s.aG.ID_TOKEN),null;const i=this.validateAndParseJson(t);return i&&fe(i)?(this.logger.trace("BrowserCacheManager.getIdTokenCredential: cache hit"),i):(this.logger.trace("BrowserCacheManager.getIdTokenCredential: called, no cache hit"),this.removeTokenKey(e,s.aG.ID_TOKEN),null)}setIdTokenCredential(e){this.logger.trace("BrowserCacheManager.setIdTokenCredential called");const t=ce(e);this.setItem(t,JSON.stringify(e)),this.addTokenKey(t,s.aG.ID_TOKEN)}getAccessTokenCredential(e){const t=this.getItem(e);if(!t)return this.logger.trace("BrowserCacheManager.getAccessTokenCredential: called, no cache hit"),this.removeTokenKey(e,s.aG.ACCESS_TOKEN),null;const i=this.validateAndParseJson(t);return i&&ge(i)?(this.logger.trace("BrowserCacheManager.getAccessTokenCredential: cache hit"),i):(this.logger.trace("BrowserCacheManager.getAccessTokenCredential: called, no cache hit"),this.removeTokenKey(e,s.aG.ACCESS_TOKEN),null)}setAccessTokenCredential(e){this.logger.trace("BrowserCacheManager.setAccessTokenCredential called");const t=ce(e);this.setItem(t,JSON.stringify(e)),this.addTokenKey(t,s.aG.ACCESS_TOKEN)}getRefreshTokenCredential(e){const t=this.getItem(e);if(!t)return this.logger.trace("BrowserCacheManager.getRefreshTokenCredential: called, no cache hit"),this.removeTokenKey(e,s.aG.REFRESH_TOKEN),null;const i=this.validateAndParseJson(t);return i&&me(i)?(this.logger.trace("BrowserCacheManager.getRefreshTokenCredential: cache hit"),i):(this.logger.trace("BrowserCacheManager.getRefreshTokenCredential: called, no cache hit"),this.removeTokenKey(e,s.aG.REFRESH_TOKEN),null)}setRefreshTokenCredential(e){this.logger.trace("BrowserCacheManager.setRefreshTokenCredential called");const t=ce(e);this.setItem(t,JSON.stringify(e)),this.addTokenKey(t,s.aG.REFRESH_TOKEN)}getAppMetadata(e){const t=this.getItem(e);if(!t)return this.logger.trace("BrowserCacheManager.getAppMetadata: called, no cache hit"),null;const i=this.validateAndParseJson(t);return i&&((n=i)&&0===e.indexOf(s.GU)&&n.hasOwnProperty("clientId")&&n.hasOwnProperty("environment"))?(this.logger.trace("BrowserCacheManager.getAppMetadata: cache hit"),i):(this.logger.trace("BrowserCacheManager.getAppMetadata: called, no cache hit"),null);var n}setAppMetadata(e){this.logger.trace("BrowserCacheManager.setAppMetadata called");const t=function({environment:e,clientId:t}){return[s.GU,e,t].join(s.LR.CACHE_KEY_SEPARATOR).toLowerCase()}(e);this.setItem(t,JSON.stringify(e))}getServerTelemetry(e){const t=this.getItem(e);if(!t)return this.logger.trace("BrowserCacheManager.getServerTelemetry: called, no cache hit"),null;const i=this.validateAndParseJson(t);return i&&function(e,t){const i=0===e.indexOf(s.gT.CACHE_KEY);let n=!0;return t&&(n=t.hasOwnProperty("failedRequests")&&t.hasOwnProperty("errors")&&t.hasOwnProperty("cacheHits")),i&&n}(e,i)?(this.logger.trace("BrowserCacheManager.getServerTelemetry: cache hit"),i):(this.logger.trace("BrowserCacheManager.getServerTelemetry: called, no cache hit"),null)}setServerTelemetry(e,t){this.logger.trace("BrowserCacheManager.setServerTelemetry called"),this.setItem(e,JSON.stringify(t))}getAuthorityMetadata(e){const t=this.internalStorage.getItem(e);if(!t)return this.logger.trace("BrowserCacheManager.getAuthorityMetadata: called, no cache hit"),null;const i=this.validateAndParseJson(t);return i&&function(e,t){return!!t&&0===e.indexOf(s.u0.CACHE_KEY)&&t.hasOwnProperty("aliases")&&t.hasOwnProperty("preferred_cache")&&t.hasOwnProperty("preferred_network")&&t.hasOwnProperty("canonical_authority")&&t.hasOwnProperty("authorization_endpoint")&&t.hasOwnProperty("token_endpoint")&&t.hasOwnProperty("issuer")&&t.hasOwnProperty("aliasesFromNetwork")&&t.hasOwnProperty("endpointsFromNetwork")&&t.hasOwnProperty("expiresAt")&&t.hasOwnProperty("jwks_uri")}(e,i)?(this.logger.trace("BrowserCacheManager.getAuthorityMetadata: cache hit"),i):null}getAuthorityMetadataKeys(){return this.internalStorage.getKeys().filter(e=>this.isAuthorityMetadata(e))}setWrapperMetadata(e,t){this.internalStorage.setItem(Zi.H3.WRAPPER_SKU,e),this.internalStorage.setItem(Zi.H3.WRAPPER_VER,t)}getWrapperMetadata(){return[this.internalStorage.getItem(Zi.H3.WRAPPER_SKU)||s.YM.EMPTY_STRING,this.internalStorage.getItem(Zi.H3.WRAPPER_VER)||s.YM.EMPTY_STRING]}setAuthorityMetadata(e,t){this.logger.trace("BrowserCacheManager.setAuthorityMetadata called"),this.internalStorage.setItem(e,JSON.stringify(t))}getActiveAccount(){const e=this.generateCacheKey(s.Gd.ACTIVE_ACCOUNT_FILTERS),t=this.getItem(e);if(!t){this.logger.trace("BrowserCacheManager.getActiveAccount: No active account filters cache schema found, looking for legacy schema");const e=this.generateCacheKey(s.Gd.ACTIVE_ACCOUNT),t=this.getItem(e);if(!t)return this.logger.trace("BrowserCacheManager.getActiveAccount: No active account found"),null;const i=this.getAccountInfoFilteredBy({localAccountId:t});return i?(this.logger.trace("BrowserCacheManager.getActiveAccount: Legacy active account cache schema found"),this.logger.trace("BrowserCacheManager.getActiveAccount: Adding active account filters cache schema"),this.setActiveAccount(i),i):null}const i=this.validateAndParseJson(t);return i?(this.logger.trace("BrowserCacheManager.getActiveAccount: Active account filters schema found"),this.getAccountInfoFilteredBy({homeAccountId:i.homeAccountId,localAccountId:i.localAccountId,tenantId:i.tenantId})):(this.logger.trace("BrowserCacheManager.getActiveAccount: No active account found"),null)}setActiveAccount(e){const t=this.generateCacheKey(s.Gd.ACTIVE_ACCOUNT_FILTERS),i=this.generateCacheKey(s.Gd.ACTIVE_ACCOUNT);if(e){this.logger.verbose("setActiveAccount: Active account set");const n={homeAccountId:e.homeAccountId,localAccountId:e.localAccountId,tenantId:e.tenantId};this.browserStorage.setItem(t,JSON.stringify(n)),this.browserStorage.setItem(i,e.localAccountId)}else this.logger.verbose("setActiveAccount: No account passed, active account not set"),this.browserStorage.removeItem(t),this.browserStorage.removeItem(i)}getThrottlingCache(e){const t=this.getItem(e);if(!t)return this.logger.trace("BrowserCacheManager.getThrottlingCache: called, no cache hit"),null;const i=this.validateAndParseJson(t);return i&&function(e,t){let i=!1;e&&(i=0===e.indexOf(s.Xw.THROTTLING_PREFIX));let n=!0;return t&&(n=t.hasOwnProperty("throttleTime")),i&&n}(e,i)?(this.logger.trace("BrowserCacheManager.getThrottlingCache: cache hit"),i):(this.logger.trace("BrowserCacheManager.getThrottlingCache: called, no cache hit"),null)}setThrottlingCache(e,t){this.logger.trace("BrowserCacheManager.setThrottlingCache called"),this.setItem(e,JSON.stringify(t))}getTemporaryCache(e,t){const i=t?this.generateCacheKey(e):e;if(this.cacheConfig.storeAuthStateInCookie){const e=this.getItemCookie(i);if(e)return this.logger.trace("BrowserCacheManager.getTemporaryCache: storeAuthStateInCookies set to true, retrieving from cookies"),e}const n=this.temporaryCacheStorage.getItem(i);if(!n){if(this.cacheConfig.cacheLocation===Zi.Al.LocalStorage){const e=this.browserStorage.getItem(i);if(e)return this.logger.trace("BrowserCacheManager.getTemporaryCache: Temporary cache item found in local storage"),e}return this.logger.trace("BrowserCacheManager.getTemporaryCache: No cache item found in local storage"),null}return this.logger.trace("BrowserCacheManager.getTemporaryCache: Temporary cache item returned"),n}setTemporaryCache(e,t,i){const n=i?this.generateCacheKey(e):e;this.temporaryCacheStorage.setItem(n,t),this.cacheConfig.storeAuthStateInCookie&&(this.logger.trace("BrowserCacheManager.setTemporaryCache: storeAuthStateInCookie set to true, setting item cookie"),this.setItemCookie(n,t))}removeItem(e){this.browserStorage.removeItem(e)}removeTemporaryItem(e){this.temporaryCacheStorage.removeItem(e),this.cacheConfig.storeAuthStateInCookie&&(this.logger.trace("BrowserCacheManager.removeItem: storeAuthStateInCookie is true, clearing item cookie"),this.clearItemCookie(e))}getKeys(){return this.browserStorage.getKeys()}async clear(){await this.removeAllAccounts(),this.removeAppMetadata(),this.temporaryCacheStorage.getKeys().forEach(e=>{-1===e.indexOf(s.YM.CACHE_PREFIX)&&-1===e.indexOf(this.clientId)||this.removeTemporaryItem(e)}),this.browserStorage.getKeys().forEach(e=>{-1===e.indexOf(s.YM.CACHE_PREFIX)&&-1===e.indexOf(this.clientId)||this.browserStorage.removeItem(e)}),this.internalStorage.clear()}async clearTokensAndKeysWithClaims(e,t){e.addQueueMeasurement(Hi,t);const i=this.getTokenKeys(),n=[];i.accessToken.forEach(e=>{const t=this.getAccessTokenCredential(e);t?.requestedClaimsHash&&e.includes(t.requestedClaimsHash.toLowerCase())&&n.push(this.removeAccessToken(e))}),await Promise.all(n),n.length>0&&this.logger.warning(`${n.length} access tokens with claims in the cache keys have been removed from the cache.`)}setItemCookie(e,t,i){let n=`${encodeURIComponent(e)}=${encodeURIComponent(t)};path=/;SameSite=Lax;`;i&&(n+=`expires=${this.getCookieExpirationTime(i)};`),this.cacheConfig.secureCookies&&(n+="Secure;"),document.cookie=n}getItemCookie(e){const t=`${encodeURIComponent(e)}=`,i=document.cookie.split(";");for(let e=0;e<i.length;e++){let n=i[e];for(;" "===n.charAt(0);)n=n.substring(1);if(0===n.indexOf(t))return decodeURIComponent(n.substring(t.length,n.length))}return s.YM.EMPTY_STRING}clearMsalCookies(){const e=`${s.YM.CACHE_PREFIX}.${this.clientId}`;document.cookie.split(";").forEach(t=>{for(;" "===t.charAt(0);)t=t.substring(1);if(0===t.indexOf(e)){const e=t.split("=")[0];this.clearItemCookie(e)}})}clearItemCookie(e){this.setItemCookie(e,s.YM.EMPTY_STRING,-1)}getCookieExpirationTime(e){const t=new Date;return new Date(t.getTime()+e*this.COOKIE_LIFE_MULTIPLIER).toUTCString()}generateCacheKey(e){return this.validateAndParseJson(e)?JSON.stringify(e):Ze.startsWith(e,s.YM.CACHE_PREFIX)||Ze.startsWith(e,s.Gd.ADAL_ID_TOKEN)?e:`${s.YM.CACHE_PREFIX}.${this.clientId}.${e}`}generateAuthorityKey(e){const{libraryState:{id:t}}=Yn.parseRequestState(this.cryptoImpl,e);return this.generateCacheKey(`${Zi._p.AUTHORITY}.${t}`)}generateNonceKey(e){const{libraryState:{id:t}}=Yn.parseRequestState(this.cryptoImpl,e);return this.generateCacheKey(`${Zi._p.NONCE_IDTOKEN}.${t}`)}generateStateKey(e){const{libraryState:{id:t}}=Yn.parseRequestState(this.cryptoImpl,e);return this.generateCacheKey(`${Zi._p.REQUEST_STATE}.${t}`)}getCachedAuthority(e){const t=this.generateStateKey(e),i=this.getTemporaryCache(t);if(!i)return null;const n=this.generateAuthorityKey(i);return this.getTemporaryCache(n)}updateCacheEntries(e,t,i,n,s){this.logger.trace("BrowserCacheManager.updateCacheEntries called");const r=this.generateStateKey(e);this.setTemporaryCache(r,e,!1);const o=this.generateNonceKey(e);this.setTemporaryCache(o,t,!1);const a=this.generateAuthorityKey(e);if(this.setTemporaryCache(a,i,!1),s){const e={credential:s.homeAccountId,type:qn};this.setTemporaryCache(Zi._p.CCS_CREDENTIAL,JSON.stringify(e),!0)}else if(n){const e={credential:n,type:Xn};this.setTemporaryCache(Zi._p.CCS_CREDENTIAL,JSON.stringify(e),!0)}}resetRequestCache(e){this.logger.trace("BrowserCacheManager.resetRequestCache called"),e&&(this.temporaryCacheStorage.getKeys().forEach(t=>{-1!==t.indexOf(e)&&this.removeTemporaryItem(t)}),this.removeTemporaryItem(this.generateStateKey(e)),this.removeTemporaryItem(this.generateNonceKey(e)),this.removeTemporaryItem(this.generateAuthorityKey(e))),this.removeTemporaryItem(this.generateCacheKey(Zi._p.REQUEST_PARAMS)),this.removeTemporaryItem(this.generateCacheKey(Zi._p.ORIGIN_URI)),this.removeTemporaryItem(this.generateCacheKey(Zi._p.URL_HASH)),this.removeTemporaryItem(this.generateCacheKey(Zi._p.CORRELATION_ID)),this.removeTemporaryItem(this.generateCacheKey(Zi._p.CCS_CREDENTIAL)),this.removeTemporaryItem(this.generateCacheKey(Zi._p.NATIVE_REQUEST)),this.setInteractionInProgress(!1)}cleanRequestByState(e){if(this.logger.trace("BrowserCacheManager.cleanRequestByState called"),e){const t=this.generateStateKey(e),i=this.temporaryCacheStorage.getItem(t);this.logger.infoPii(`BrowserCacheManager.cleanRequestByState: Removing temporary cache items for state: ${i}`),this.resetRequestCache(i||s.YM.EMPTY_STRING)}this.clearMsalCookies()}cleanRequestByInteractionType(e){this.logger.trace("BrowserCacheManager.cleanRequestByInteractionType called"),this.temporaryCacheStorage.getKeys().forEach(t=>{if(-1===t.indexOf(Zi._p.REQUEST_STATE))return;const i=this.temporaryCacheStorage.getItem(t);if(!i)return;const n=es(this.cryptoImpl,i);n&&n.interactionType===e&&(this.logger.infoPii(`BrowserCacheManager.cleanRequestByInteractionType: Removing temporary cache items for state: ${i}`),this.resetRequestCache(i))}),this.clearMsalCookies(),this.setInteractionInProgress(!1)}cacheCodeRequest(e){this.logger.trace("BrowserCacheManager.cacheCodeRequest called");const t=gn(JSON.stringify(e));this.setTemporaryCache(Zi._p.REQUEST_PARAMS,t,!0)}getCachedRequest(e){this.logger.trace("BrowserCacheManager.getCachedRequest called");const t=this.getTemporaryCache(Zi._p.REQUEST_PARAMS,!0);if(!t)throw(0,Ji.bD)(en.y6);let i;try{i=JSON.parse(mn(t))}catch(e){throw this.logger.errorPii(`Attempted to parse: ${t}`),this.logger.error(`Parsing cached token request threw with error: ${e}`),(0,Ji.bD)(en.ot)}if(this.removeTemporaryItem(this.generateCacheKey(Zi._p.REQUEST_PARAMS)),!i.authority){const t=this.generateAuthorityKey(e),n=this.getTemporaryCache(t);if(!n)throw(0,Ji.bD)(en.Ne);i.authority=n}return i}getCachedNativeRequest(){this.logger.trace("BrowserCacheManager.getCachedNativeRequest called");const e=this.getTemporaryCache(Zi._p.NATIVE_REQUEST,!0);if(!e)return this.logger.trace("BrowserCacheManager.getCachedNativeRequest: No cached native request found"),null;return this.validateAndParseJson(e)||(this.logger.error("BrowserCacheManager.getCachedNativeRequest: Unable to parse native request"),null)}isInteractionInProgress(e){const t=this.getInteractionInProgress();return e?t===this.clientId:!!t}getInteractionInProgress(){const e=`${s.YM.CACHE_PREFIX}.${Zi._p.INTERACTION_STATUS_KEY}`;return this.getTemporaryCache(e,!1)}setInteractionInProgress(e){const t=`${s.YM.CACHE_PREFIX}.${Zi._p.INTERACTION_STATUS_KEY}`;if(e){if(this.getInteractionInProgress())throw(0,Ji.bD)(en.b);this.setTemporaryCache(t,this.clientId,!1)}else e||this.getInteractionInProgress()!==this.clientId||this.removeTemporaryItem(t)}getLegacyLoginHint(){const e=this.getTemporaryCache(s.Gd.ADAL_ID_TOKEN);e&&(this.browserStorage.removeItem(s.Gd.ADAL_ID_TOKEN),this.logger.verbose("Cached ADAL id token retrieved."));const t=this.getTemporaryCache(s.Gd.ID_TOKEN,!0);t&&(this.browserStorage.removeItem(this.generateCacheKey(s.Gd.ID_TOKEN)),this.logger.verbose("Cached MSAL.js v1 id token retrieved"));const i=t||e;if(i){const e=re(i,mn);if(e.preferred_username)return this.logger.verbose("No SSO params used and ADAL/MSAL v1 token retrieved, setting ADAL/MSAL v1 preferred_username as loginHint"),e.preferred_username;if(e.upn)return this.logger.verbose("No SSO params used and ADAL/MSAL v1 token retrieved, setting ADAL/MSAL v1 upn as loginHint"),e.upn;this.logger.verbose("No SSO params used and ADAL/MSAL v1 token retrieved, however, no account hint claim found. Enable preferred_username or upn id token claim to get SSO.")}return null}updateCredentialCacheKey(e,t){const i=ce(t);if(e!==i){const n=this.getItem(e);if(n)return this.browserStorage.removeItem(e),this.setItem(i,n),this.logger.verbose(`Updated an outdated ${t.credentialType} cache key`),i;this.logger.error(`Attempted to update an outdated ${t.credentialType} cache key but no item matching the outdated key was found in storage`)}return e}async hydrateCache(e,t){const i=he(e.account?.homeAccountId,e.account?.environment,e.idToken,this.clientId,e.tenantId);let n;t.claims&&(n=await this.cryptoImpl.hashString(t.claims));const s={idToken:i,accessToken:de(e.account?.homeAccountId,e.account.environment,e.accessToken,this.clientId,e.tenantId,e.scopes.join(" "),e.expiresOn?e.expiresOn.getTime()/1e3:0,e.extExpiresOn?e.extExpiresOn.getTime()/1e3:0,mn,void 0,e.tokenType,void 0,t.sshKid,t.claims,n)};return this.saveCacheRecord(s)}async saveCacheRecord(e,t,i){try{await super.saveCacheRecord(e,t,i)}catch(e){if(e instanceof vt&&this.performanceClient&&i)try{const e=this.getTokenKeys();this.performanceClient.addFields({cacheRtCount:e.refreshToken.length,cacheIdCount:e.idToken.length,cacheAtCount:e.accessToken.length},i)}catch(e){}throw e}}}function is(){return window.parent!==window}function ns(){return window.location.href.split("?")[0].split("#")[0]}function ss(){if("undefined"==typeof window)throw(0,Ji.bD)(en.tI)}function rs(e){if(!e)throw(0,Ji.bD)(en.IR)}function os(e){ss(),function(){if(lt.hashContainsKnownProperties(window.location.hash)&&is())throw(0,Ji.bD)(en.tZ)}(),function(){if("undefined"!=typeof window&&window.opener&&window.opener!==window&&"string"==typeof window.name&&0===window.name.indexOf(`${Zi.Q1.POPUP_NAME_PREFIX}.`))throw(0,Ji.bD)(en.aH)}(),rs(e)}function as(e,t){if(os(e),function(e){if(is()&&!e)throw(0,Ji.bD)(en.OT)}(t.system.allowRedirectInIframe),t.cache.cacheLocation===Zi.Al.MemoryStorage&&!t.cache.storeAuthStateInCookie)throw(0,Zn.jz)(Qn.jE)}function ls(e){const t=document.createElement("link");t.rel="preconnect",t.href=new URL(e).origin,t.crossOrigin="anonymous",document.head.appendChild(t),window.setTimeout(()=>{try{document.head.removeChild(t)}catch{}},1e4)}var cs=i(99268);class hs{constructor(e){this.eventCallbacks=new Map,this.logger=e||new n.V({})}addEventCallback(e,t,i){if("undefined"!=typeof window){const n=i||Mn();return this.eventCallbacks.has(n)?(this.logger.error(`Event callback with id: ${n} is already registered. Please provide a unique id or remove the existing callback and try again.`),null):(this.eventCallbacks.set(n,[e,t||[]]),this.logger.verbose(`Event callback registered with id: ${n}`),n)}return null}removeEventCallback(e){this.eventCallbacks.delete(e),this.logger.verbose(`Event callback ${e} removed.`)}emitEvent(e,t,i,n){if("undefined"!=typeof window){const s={eventType:e,interactionType:t||null,payload:i||null,error:n||null,timestamp:Date.now()};this.eventCallbacks.forEach(([t,i],n)=>{(0===i.length||i.includes(e))&&(this.logger.verbose(`Emitting event to callback ${n}: ${e}`),t.apply(null,[s]))})}}}class ds extends l.lR{constructor(e,t,i,n,s){super(e,t,i),this.name="ServerError",this.errorNo=n,this.status=s,Object.setPrototypeOf(this,ds.prototype)}}class us{static generateThrottlingStorageKey(e){return`${s.Xw.THROTTLING_PREFIX}.${JSON.stringify(e)}`}static preProcess(e,t){const i=us.generateThrottlingStorageKey(t),n=e.getThrottlingCache(i);if(n){if(n.throttleTime<Date.now())return void e.removeItem(i);throw new ds(n.errorCodes?.join(" ")||s.YM.EMPTY_STRING,n.errorMessage,n.subError)}}static postProcess(e,t,i){if(us.checkResponseStatus(i)||us.checkResponseForRetryAfter(i)){const n={throttleTime:us.calculateThrottleTime(parseInt(i.headers[s.OK.RETRY_AFTER])),error:i.body.error,errorCodes:i.body.error_codes,errorMessage:i.body.error_description,subError:i.body.suberror};e.setThrottlingCache(us.generateThrottlingStorageKey(t),n)}}static checkResponseStatus(e){return 429===e.status||e.status>=500&&e.status<600}static checkResponseForRetryAfter(e){return!!e.headers&&e.headers.hasOwnProperty(s.OK.RETRY_AFTER)&&(e.status<200||e.status>=300)}static calculateThrottleTime(e){const t=e<=0?0:e,i=Date.now()/1e3;return Math.floor(1e3*Math.min(i+(t||s.Xw.DEFAULT_THROTTLE_TIME_SECONDS),i+s.Xw.DEFAULT_MAX_THROTTLE_TIME_SECONDS))}static removeThrottle(e,t,i,n){const s={clientId:t,authority:i.authority,scopes:i.scopes,homeAccountIdentifier:n,claims:i.claims,authenticationScheme:i.authenticationScheme,resourceRequestMethod:i.resourceRequestMethod,resourceRequestUri:i.resourceRequestUri,shrClaims:i.shrClaims,sshKid:i.sshKid},r=this.generateThrottlingStorageKey(s);e.removeItem(r)}}class ps{constructor(e,t){this.networkClient=e,this.cacheManager=t}async sendPostRequest(e,t,i){let n;us.preProcess(this.cacheManager,e);try{n=await this.networkClient.sendPostRequestAsync(t,i)}catch(e){throw e instanceof l.lR?e:te(g)}return us.postProcess(this.cacheManager,e,n),n}}const gs="client_id",fs="response_type",ms="token_type",vs="req_cnf",ys="return_spa_code",Cs="x-client-xtra-sku";class bs{static validateRedirectUri(e){if(!e)throw Xe(Ae)}static validatePrompt(e){const t=[];for(const e in s._M)t.push(s._M[e]);if(t.indexOf(e)<0)throw Xe(ke)}static validateClaims(e){try{JSON.parse(e)}catch(e){throw Xe(Pe)}}static validateCodeChallengeParams(e,t){if(!e||!t)throw Xe(Fe);this.validateCodeChallengeMethod(t)}static validateCodeChallengeMethod(e){if([s.iF.PLAIN,s.iF.S256].indexOf(e)<0)throw Xe(_e)}}class Ss{constructor(){this.parameters=new Map}addResponseTypeCode(){this.parameters.set(fs,encodeURIComponent(s.YM.CODE_RESPONSE_TYPE))}addResponseTypeForTokenAndIdToken(){this.parameters.set(fs,encodeURIComponent(`${s.YM.TOKEN_RESPONSE_TYPE} ${s.YM.ID_TOKEN_RESPONSE_TYPE}`))}addResponseMode(e){this.parameters.set("response_mode",encodeURIComponent(e||s.p.QUERY))}addNativeBroker(){this.parameters.set("nativebroker",encodeURIComponent("1"))}addScopes(e,t=!0,i=s.aZ){!t||i.includes("openid")||e.includes("openid")||i.push("openid");const n=t?[...e||[],...i]:e||[],r=new Qe(n);this.parameters.set("scope",encodeURIComponent(r.printScopes()))}addClientId(e){this.parameters.set(gs,encodeURIComponent(e))}addRedirectUri(e){bs.validateRedirectUri(e),this.parameters.set("redirect_uri",encodeURIComponent(e))}addPostLogoutRedirectUri(e){bs.validateRedirectUri(e),this.parameters.set("post_logout_redirect_uri",encodeURIComponent(e))}addIdTokenHint(e){this.parameters.set("id_token_hint",encodeURIComponent(e))}addDomainHint(e){this.parameters.set("domain_hint",encodeURIComponent(e))}addLoginHint(e){this.parameters.set("login_hint",encodeURIComponent(e))}addCcsUpn(e){this.parameters.set(s.OK.CCS_HEADER,encodeURIComponent(`UPN:${e}`))}addCcsOid(e){this.parameters.set(s.OK.CCS_HEADER,encodeURIComponent(`Oid:${e.uid}@${e.utid}`))}addSid(e){this.parameters.set("sid",encodeURIComponent(e))}addClaims(e,t){const i=this.addClientCapabilitiesToClaims(e,t);bs.validateClaims(i),this.parameters.set("claims",encodeURIComponent(i))}addCorrelationId(e){this.parameters.set("client-request-id",encodeURIComponent(e))}addLibraryInfo(e){this.parameters.set("x-client-SKU",e.sku),this.parameters.set("x-client-VER",e.version),e.os&&this.parameters.set("x-client-OS",e.os),e.cpu&&this.parameters.set("x-client-CPU",e.cpu)}addApplicationTelemetry(e){e?.appName&&this.parameters.set("x-app-name",e.appName),e?.appVersion&&this.parameters.set("x-app-ver",e.appVersion)}addPrompt(e){bs.validatePrompt(e),this.parameters.set("prompt",encodeURIComponent(e))}addState(e){e&&this.parameters.set("state",encodeURIComponent(e))}addNonce(e){this.parameters.set("nonce",encodeURIComponent(e))}addCodeChallengeParams(e,t){if(bs.validateCodeChallengeParams(e,t),!e||!t)throw Xe(Fe);this.parameters.set("code_challenge",encodeURIComponent(e)),this.parameters.set("code_challenge_method",encodeURIComponent(t))}addAuthorizationCode(e){this.parameters.set("code",encodeURIComponent(e))}addDeviceCode(e){this.parameters.set("device_code",encodeURIComponent(e))}addRefreshToken(e){this.parameters.set("refresh_token",encodeURIComponent(e))}addCodeVerifier(e){this.parameters.set("code_verifier",encodeURIComponent(e))}addClientSecret(e){this.parameters.set("client_secret",encodeURIComponent(e))}addClientAssertion(e){e&&this.parameters.set("client_assertion",encodeURIComponent(e))}addClientAssertionType(e){e&&this.parameters.set("client_assertion_type",encodeURIComponent(e))}addOboAssertion(e){this.parameters.set("assertion",encodeURIComponent(e))}addRequestTokenUse(e){this.parameters.set("requested_token_use",encodeURIComponent(e))}addGrantType(e){this.parameters.set("grant_type",encodeURIComponent(e))}addClientInfo(){this.parameters.set(s.JR,"1")}addExtraQueryParameters(e){Object.entries(e).forEach(([e,t])=>{!this.parameters.has(e)&&t&&this.parameters.set(e,t)})}addClientCapabilitiesToClaims(e,t){let i;if(e)try{i=JSON.parse(e)}catch(e){throw Xe(Pe)}else i={};return t&&t.length>0&&(i.hasOwnProperty(s.Fq.ACCESS_TOKEN)||(i[s.Fq.ACCESS_TOKEN]={}),i[s.Fq.ACCESS_TOKEN][s.Fq.XMS_CC]={values:t}),JSON.stringify(i)}addUsername(e){this.parameters.set(s.Tq.username,encodeURIComponent(e))}addPassword(e){this.parameters.set(s.Tq.password,encodeURIComponent(e))}addPopToken(e){e&&(this.parameters.set(ms,s.IO.POP),this.parameters.set(vs,encodeURIComponent(e)))}addSshJwk(e){e&&(this.parameters.set(ms,s.IO.SSH),this.parameters.set(vs,encodeURIComponent(e)))}addServerTelemetry(e){this.parameters.set("x-client-current-telemetry",e.generateCurrentRequestHeaderValue()),this.parameters.set("x-client-last-telemetry",e.generateLastRequestHeaderValue())}addThrottling(){this.parameters.set("x-ms-lib-capability",s.Xw.X_MS_LIB_CAPABILITY_VALUE)}addLogoutHint(e){this.parameters.set("logout_hint",encodeURIComponent(e))}createQueryString(){const e=new Array;return this.parameters.forEach((t,i)=>{e.push(`${i}=${t}`)}),e.join("&")}}async function ws(e,t,i,n,s,r,o){o?.addQueueMeasurement(Ai,r);const a=_n.transformCIAMAuthority(Fn(e)),l=new _n(a,t,i,n,s,r,o);try{return await Nn(l.resolveEndpointsAsync.bind(l),Ti,s,o,r)(),l}catch(e){throw te(p)}}class xs{constructor(e,t){this.config=function({authOptions:e,systemOptions:t,loggerOptions:i,cacheOptions:s,storageInterface:r,networkInterface:o,cryptoInterface:a,clientCredentials:l,libraryInfo:c,telemetry:h,serverTelemetryManager:d,persistencePlugin:u,serializableCache:p}){const g={...St,...i};return{authOptions:(f=e,{clientCapabilities:[],azureCloudOptions:At,skipAuthorityMetadataCache:!1,instanceAware:!1,...f}),systemOptions:{...bt,...t},loggerOptions:g,cacheOptions:{...wt,...s},storageInterface:r||new Ct(e.clientId,ie,new n.V(g)),networkInterface:o||xt,cryptoInterface:a||ie,clientCredentials:l||Mt,libraryInfo:{...Et,...c},telemetry:{...Tt,...h},serverTelemetryManager:d||null,persistencePlugin:u||null,serializableCache:p||null};var f}(e),this.logger=new n.V(this.config.loggerOptions,ne,se),this.cryptoUtils=this.config.cryptoInterface,this.cacheManager=this.config.storageInterface,this.networkClient=this.config.networkInterface,this.networkManager=new ps(this.networkClient,this.cacheManager),this.serverTelemetryManager=this.config.serverTelemetryManager,this.authority=this.config.authOptions.authority,this.performanceClient=t}createTokenRequestHeaders(e){const t={};if(t[s.OK.CONTENT_TYPE]=s.YM.URL_FORM_CONTENT_TYPE,!this.config.systemOptions.preventCorsPreflight&&e)switch(e.type){case qn:try{const i=et(e.credential);t[s.OK.CCS_HEADER]=`Oid:${i.uid}@${i.utid}`}catch(e){this.logger.verbose("Could not parse home account ID for CCS Header: "+e)}break;case Xn:t[s.OK.CCS_HEADER]=`UPN: ${e.credential}`}return t}async executePostToTokenEndpoint(e,t,i,n,r,o){o&&this.performanceClient?.addQueueMeasurement(o,r);const a=await this.networkManager.sendPostRequest(n,e,{body:t,headers:i});return this.performanceClient?.addFields({refreshTokenSize:a.body.refresh_token?.length||0,httpVerToken:a.headers?.[s.OK.X_MS_HTTP_VERSION]||""},r),this.config.serverTelemetryManager&&a.status<500&&429!==a.status&&this.config.serverTelemetryManager.clearTelemetryCache(),a}async updateAuthority(e,t){this.performanceClient?.addQueueMeasurement(vi,t);const i=`https://${e}/${this.authority.tenant}/`,n=await ws(i,this.networkClient,this.cacheManager,this.authority.options,this.logger,t,this.performanceClient);this.authority=n}createTokenQueryParameters(e){const t=new Ss;return e.tokenQueryParameters&&t.addExtraQueryParameters(e.tokenQueryParameters),t.createQueryString()}}class Es{constructor(e,t){this.cryptoUtils=e,this.performanceClient=t}async generateCnf(e,t){this.performanceClient?.addQueueMeasurement(wi,e.correlationId);const i=await Nn(this.generateKid.bind(this),wi,t,this.performanceClient,e.correlationId)(e),n=this.cryptoUtils.base64UrlEncode(JSON.stringify(i));return{kid:i.kid,reqCnfString:n}}async generateKid(e){return this.performanceClient?.addQueueMeasurement(xi,e.correlationId),{kid:await this.cryptoUtils.getPublicKeyThumbprint(e),xms_ksl:"sw"}}async signPopToken(e,t,i){return this.signPayload(e,t,i)}async signPayload(e,t,i,n){const{resourceRequestMethod:s,resourceRequestUri:r,shrClaims:o,shrNonce:a,shrOptions:l}=i,c=r?new lt(r):void 0,h=c?.getUrlComponents();return this.cryptoUtils.signJwt({at:e,ts:ae(),m:s?.toUpperCase(),u:h?.HostNameAndPort,nonce:a||this.cryptoUtils.createNewGuid(),p:h?.AbsolutePath,q:h?.QueryString?[[],h.QueryString]:void 0,client_claims:o||void 0,...n},t,l,i.correlationId)}}class Ms{constructor(e,t){this.cache=e,this.hasChanged=t}get cacheHasChanged(){return this.hasChanged}get tokenCache(){return this.cache}}class As{constructor(e,t,i,n,s,r,o){this.clientId=e,this.cacheStorage=t,this.cryptoObj=i,this.logger=n,this.serializableCache=s,this.persistencePlugin=r,this.performanceClient=o}validateServerAuthorizationCodeResponse(e,t){if(!e.state||!t)throw e.state?te(C,"Cached State"):te(C,"Server State");let i,n;try{i=decodeURIComponent(e.state)}catch(t){throw te(v,e.state)}try{n=decodeURIComponent(t)}catch(t){throw te(v,e.state)}if(i!==n)throw te(y);if(e.error||e.error_description||e.suberror){const t=function(e){const t=e.error_uri?.lastIndexOf("code=");return t&&t>=0?e.error_uri?.substring(t+5):void 0}(e);if(Kn(e.error,e.error_description,e.suberror))throw new jn(e.error||"",e.error_description,e.suberror,e.timestamp||"",e.trace_id||"",e.correlation_id||"",e.claims||"",t);throw new ds(e.error||"",e.error_description,e.suberror,t)}}validateTokenResponse(e,t){if(e.error||e.error_description||e.suberror){const i=`Error(s): ${e.error_codes||s.YM.NOT_AVAILABLE} - Timestamp: ${e.timestamp||s.YM.NOT_AVAILABLE} - Description: ${e.error_description||s.YM.NOT_AVAILABLE} - Correlation ID: ${e.correlation_id||s.YM.NOT_AVAILABLE} - Trace ID: ${e.trace_id||s.YM.NOT_AVAILABLE}`,n=e.error_codes?.length?e.error_codes[0]:void 0,r=new ds(e.error,i,e.suberror,n,e.status);if(t&&e.status&&e.status>=s.t3.SERVER_ERROR_RANGE_START&&e.status<=s.t3.SERVER_ERROR_RANGE_END)return void this.logger.warning(`executeTokenRequest:validateTokenResponse - AAD is currently unavailable and the access token is unable to be refreshed.\n${r}`);if(t&&e.status&&e.status>=s.t3.CLIENT_ERROR_RANGE_START&&e.status<=s.t3.CLIENT_ERROR_RANGE_END)return void this.logger.warning(`executeTokenRequest:validateTokenResponse - AAD is currently available but is unable to refresh the access token.\n${r}`);if(Kn(e.error,e.error_description,e.suberror))throw new jn(e.error,e.error_description,e.suberror,e.timestamp||s.YM.EMPTY_STRING,e.trace_id||s.YM.EMPTY_STRING,e.correlation_id||s.YM.EMPTY_STRING,e.claims||s.YM.EMPTY_STRING,n);throw r}}async handleServerTokenResponse(e,t,i,n,r,o,a,l,c){let h,d;if(this.performanceClient?.addQueueMeasurement(Ei,e.correlation_id),e.id_token){if(h=re(e.id_token||s.YM.EMPTY_STRING,this.cryptoObj.base64Decode),r&&r.nonce&&h.nonce!==r.nonce)throw te(b);if(n.maxAge||0===n.maxAge){const e=h.auth_time;if(!e)throw te(S);oe(e,n.maxAge)}}this.homeAccountIdentifier=rt.generateHomeAccountId(e.client_info||s.YM.EMPTY_STRING,t.authorityType,this.logger,this.cryptoObj,h),r&&r.state&&(d=Yn.parseRequestState(this.cryptoObj,r.state)),e.key_id=e.key_id||n.sshKid||void 0;const u=this.generateCacheRecord(e,t,i,n,h,o,r);let p;try{if(this.persistencePlugin&&this.serializableCache&&(this.logger.verbose("Persistence enabled, calling beforeCacheAccess"),p=new Ms(this.serializableCache,!0),await this.persistencePlugin.beforeCacheAccess(p)),a&&!l&&u.account){const e=u.account.generateAccountKey();if(!this.cacheStorage.getAccount(e,this.logger))return this.logger.warning("Account used to refresh tokens not in persistence, refreshed tokens will not be stored in the cache"),await As.generateAuthenticationResult(this.cryptoObj,t,u,!1,n,h,d,void 0,c)}await this.cacheStorage.saveCacheRecord(u,n.storeInCache,n.correlationId)}finally{this.persistencePlugin&&this.serializableCache&&p&&(this.logger.verbose("Persistence enabled, calling afterCacheAccess"),await this.persistencePlugin.afterCacheAccess(p))}return As.generateAuthenticationResult(this.cryptoObj,t,u,!1,n,h,d,e,c)}generateCacheRecord(e,t,i,n,s,r,o){const a=t.getPreferredCache();if(!a)throw te(O);const l=st(s);let c,h;e.id_token&&s&&(c=he(this.homeAccountIdentifier,a,e.id_token,this.clientId,l||""),h=Ts(this.cacheStorage,t,this.homeAccountIdentifier,this.cryptoObj.base64Decode,s,e.client_info,a,l,o,void 0,this.logger));let d=null;if(e.access_token){const s=e.scope?Qe.fromString(e.scope):new Qe(n.scopes||[]),o=("string"==typeof e.expires_in?parseInt(e.expires_in,10):e.expires_in)||0,c=("string"==typeof e.ext_expires_in?parseInt(e.ext_expires_in,10):e.ext_expires_in)||0,h=("string"==typeof e.refresh_in?parseInt(e.refresh_in,10):e.refresh_in)||void 0,u=i+o,p=u+c,g=h&&h>0?i+h:void 0;d=de(this.homeAccountIdentifier,a,e.access_token,this.clientId,l||t.tenant||"",s.printScopes(),u,p,this.cryptoObj.base64Decode,g,e.token_type,r,e.key_id,n.claims,n.requestedClaimsHash)}let u=null;if(e.refresh_token){let t;e.refresh_token_expires_in&&(t=i+("string"==typeof e.refresh_token_expires_in?parseInt(e.refresh_token_expires_in,10):e.refresh_token_expires_in)),u=ue(this.homeAccountIdentifier,a,e.refresh_token,this.clientId,e.foci,r,t)}let p=null;return e.foci&&(p={clientId:this.clientId,environment:a,familyId:e.foci}),{account:h,idToken:c,accessToken:d,refreshToken:u,appMetadata:p}}static async generateAuthenticationResult(e,t,i,n,r,o,a,l,c){let h,d,u=s.YM.EMPTY_STRING,p=[],g=null,f=s.YM.EMPTY_STRING;if(i.accessToken){if(i.accessToken.tokenType!==s.IO.POP||r.popKid)u=i.accessToken.secret;else{const t=new Es(e),{secret:n,keyId:s}=i.accessToken;if(!s)throw te($);u=await t.signPopToken(n,s,r)}p=Qe.fromString(i.accessToken.target).asArray(),g=new Date(1e3*Number(i.accessToken.expiresOn)),h=new Date(1e3*Number(i.accessToken.extendedExpiresOn)),i.accessToken.refreshOn&&(d=new Date(1e3*Number(i.accessToken.refreshOn)))}i.appMetadata&&(f=i.appMetadata.familyId===s.hB?s.hB:"");const m=o?.oid||o?.sub||"",v=o?.tid||"";l?.spa_accountid&&i.account&&(i.account.nativeAccountId=l?.spa_accountid);const y=i.account?nt(i.account.getAccountInfo(),void 0,o,i.idToken?.secret):null;return{authority:t.canonicalAuthority,uniqueId:m,tenantId:v,scopes:p,account:y,idToken:i?.idToken?.secret||"",idTokenClaims:o||{},accessToken:u,fromCache:n,expiresOn:g,extExpiresOn:h,refreshOn:d,correlationId:r.correlationId,requestId:c||s.YM.EMPTY_STRING,familyId:f,tokenType:i.accessToken?.tokenType||s.YM.EMPTY_STRING,state:a?a.userRequestState:s.YM.EMPTY_STRING,cloudGraphHostName:i.account?.cloudGraphHostName||s.YM.EMPTY_STRING,msGraphHost:i.account?.msGraphHost||s.YM.EMPTY_STRING,code:l?.spa_code,fromNativeBroker:!1}}}function Ts(e,t,i,n,s,r,o,a,l,c,h){h?.verbose("setCachedAccount called");const d=e.getAccountKeys().find(e=>e.startsWith(i));let u=null;d&&(u=e.getAccount(d,h));const p=u||rt.createAccount({homeAccountId:i,idTokenClaims:s,clientInfo:r,environment:o,cloudGraphHostName:l?.cloud_graph_host_name,msGraphHost:l?.msgraph_host,nativeAccountId:c},t,n),g=p.tenantProfiles||[],f=a||p.realm;if(f&&!g.find(e=>e.tenantId===f)){const e=it(i,p.localAccountId,f,s);g.push(e)}return p.tenantProfiles=g,p}async function Ds(e,t,i){return"string"==typeof e?e:e({clientId:t,tokenEndpoint:i})}class Is extends xs{constructor(e,t){super(e,t),this.includeRedirectUri=!0,this.oidcDefaultScopes=this.config.authOptions.authority.options.OIDCOptions?.defaultScopes}async getAuthCodeUrl(e){this.performanceClient?.addQueueMeasurement(gi,e.correlationId);const t=await Nn(this.createAuthCodeUrlQueryString.bind(this),Si,this.logger,this.performanceClient,e.correlationId)(e);return lt.appendQueryString(this.authority.authorizationEndpoint,t)}async acquireToken(e,t){if(this.performanceClient?.addQueueMeasurement(yi,e.correlationId),!e.code)throw te(A);const i=ae(),n=await Nn(this.executeTokenRequest.bind(this),Ci,this.logger,this.performanceClient,e.correlationId)(this.authority,e),r=n.headers?.[s.OK.X_MS_REQUEST_ID],o=new As(this.config.authOptions.clientId,this.cacheManager,this.cryptoUtils,this.logger,this.config.serializableCache,this.config.persistencePlugin,this.performanceClient);return o.validateTokenResponse(n.body),Nn(o.handleServerTokenResponse.bind(o),Ei,this.logger,this.performanceClient,e.correlationId)(n.body,this.authority,i,e,t,void 0,void 0,void 0,r)}handleFragmentResponse(e,t){if(new As(this.config.authOptions.clientId,this.cacheManager,this.cryptoUtils,this.logger,null,null).validateServerAuthorizationCodeResponse(e,t),!e.code)throw te(W);return e}getLogoutUri(e){if(!e)throw Xe(Oe);const t=this.createLogoutUrlQueryString(e);return lt.appendQueryString(this.authority.endSessionEndpoint,t)}async executeTokenRequest(e,t){this.performanceClient?.addQueueMeasurement(Ci,t.correlationId);const i=this.createTokenQueryParameters(t),n=lt.appendQueryString(e.tokenEndpoint,i),r=await Nn(this.createTokenRequestBody.bind(this),bi,this.logger,this.performanceClient,t.correlationId)(t);let o;if(t.clientInfo)try{const e=Je(t.clientInfo,this.cryptoUtils.base64Decode);o={credential:`${e.uid}${s.LR.CLIENT_INFO_SEPARATOR}${e.utid}`,type:qn}}catch(e){this.logger.verbose("Could not parse client info for CCS Header: "+e)}const a=this.createTokenRequestHeaders(o||t.ccsCredential),l={clientId:t.tokenBodyParameters?.clientId||this.config.authOptions.clientId,authority:e.canonicalAuthority,scopes:t.scopes,claims:t.claims,authenticationScheme:t.authenticationScheme,resourceRequestMethod:t.resourceRequestMethod,resourceRequestUri:t.resourceRequestUri,shrClaims:t.shrClaims,sshKid:t.sshKid};return Nn(this.executePostToTokenEndpoint.bind(this),Kt,this.logger,this.performanceClient,t.correlationId)(n,r,a,l,t.correlationId,Kt)}async createTokenRequestBody(e){this.performanceClient?.addQueueMeasurement(bi,e.correlationId);const t=new Ss;if(t.addClientId(e.tokenBodyParameters?.[gs]||this.config.authOptions.clientId),this.includeRedirectUri?t.addRedirectUri(e.redirectUri):bs.validateRedirectUri(e.redirectUri),t.addScopes(e.scopes,!0,this.oidcDefaultScopes),t.addAuthorizationCode(e.code),t.addLibraryInfo(this.config.libraryInfo),t.addApplicationTelemetry(this.config.telemetry.application),t.addThrottling(),this.serverTelemetryManager&&!Dt(this.config)&&t.addServerTelemetry(this.serverTelemetryManager),e.codeVerifier&&t.addCodeVerifier(e.codeVerifier),this.config.clientCredentials.clientSecret&&t.addClientSecret(this.config.clientCredentials.clientSecret),this.config.clientCredentials.clientAssertion){const i=this.config.clientCredentials.clientAssertion;t.addClientAssertion(await Ds(i.assertion,this.config.authOptions.clientId,e.resourceRequestUri)),t.addClientAssertionType(i.assertionType)}if(t.addGrantType(s.$x.AUTHORIZATION_CODE_GRANT),t.addClientInfo(),e.authenticationScheme===s.IO.POP){const i=new Es(this.cryptoUtils,this.performanceClient);let n;n=e.popKid?this.cryptoUtils.encodeKid(e.popKid):(await Nn(i.generateCnf.bind(i),wi,this.logger,this.performanceClient,e.correlationId)(e,this.logger)).reqCnfString,t.addPopToken(n)}else if(e.authenticationScheme===s.IO.SSH){if(!e.sshJwk)throw Xe(He);t.addSshJwk(e.sshJwk)}const i=e.correlationId||this.config.cryptoInterface.createNewGuid();let n;if(t.addCorrelationId(i),(!Ze.isEmptyObj(e.claims)||this.config.authOptions.clientCapabilities&&this.config.authOptions.clientCapabilities.length>0)&&t.addClaims(e.claims,this.config.authOptions.clientCapabilities),e.clientInfo)try{const t=Je(e.clientInfo,this.cryptoUtils.base64Decode);n={credential:`${t.uid}${s.LR.CLIENT_INFO_SEPARATOR}${t.utid}`,type:qn}}catch(e){this.logger.verbose("Could not parse client info for CCS Header: "+e)}else n=e.ccsCredential;if(this.config.systemOptions.preventCorsPreflight&&n)switch(n.type){case qn:try{const e=et(n.credential);t.addCcsOid(e)}catch(e){this.logger.verbose("Could not parse home account ID for CCS Header: "+e)}break;case Xn:t.addCcsUpn(n.credential)}return e.tokenBodyParameters&&t.addExtraQueryParameters(e.tokenBodyParameters),!e.enableSpaAuthorizationCode||e.tokenBodyParameters&&e.tokenBodyParameters[ys]||t.addExtraQueryParameters({[ys]:"1"}),t.createQueryString()}async createAuthCodeUrlQueryString(e){this.performanceClient?.addQueueMeasurement(Si,e.correlationId);const t=new Ss;t.addClientId(e.extraQueryParameters?.[gs]||this.config.authOptions.clientId);const i=[...e.scopes||[],...e.extraScopesToConsent||[]];t.addScopes(i,!0,this.oidcDefaultScopes),t.addRedirectUri(e.redirectUri);const n=e.correlationId||this.config.cryptoInterface.createNewGuid();if(t.addCorrelationId(n),t.addResponseMode(e.responseMode),t.addResponseTypeCode(),t.addLibraryInfo(this.config.libraryInfo),Dt(this.config)||t.addApplicationTelemetry(this.config.telemetry.application),t.addClientInfo(),e.codeChallenge&&e.codeChallengeMethod&&t.addCodeChallengeParams(e.codeChallenge,e.codeChallengeMethod),e.prompt&&t.addPrompt(e.prompt),e.domainHint&&t.addDomainHint(e.domainHint),e.prompt!==s._M.SELECT_ACCOUNT)if(e.sid&&e.prompt===s._M.NONE)this.logger.verbose("createAuthCodeUrlQueryString: Prompt is none, adding sid from request"),t.addSid(e.sid);else if(e.account){const i=this.extractAccountSid(e.account);let n=this.extractLoginHint(e.account);if(n&&e.domainHint&&(this.logger.warning('AuthorizationCodeClient.createAuthCodeUrlQueryString: "domainHint" param is set, skipping opaque "login_hint" claim. Please consider not passing domainHint'),n=null),n){this.logger.verbose("createAuthCodeUrlQueryString: login_hint claim present on account"),t.addLoginHint(n);try{const i=et(e.account.homeAccountId);t.addCcsOid(i)}catch(e){this.logger.verbose("createAuthCodeUrlQueryString: Could not parse home account ID for CCS Header")}}else if(i&&e.prompt===s._M.NONE){this.logger.verbose("createAuthCodeUrlQueryString: Prompt is none, adding sid from account"),t.addSid(i);try{const i=et(e.account.homeAccountId);t.addCcsOid(i)}catch(e){this.logger.verbose("createAuthCodeUrlQueryString: Could not parse home account ID for CCS Header")}}else if(e.loginHint)this.logger.verbose("createAuthCodeUrlQueryString: Adding login_hint from request"),t.addLoginHint(e.loginHint),t.addCcsUpn(e.loginHint);else if(e.account.username){this.logger.verbose("createAuthCodeUrlQueryString: Adding login_hint from account"),t.addLoginHint(e.account.username);try{const i=et(e.account.homeAccountId);t.addCcsOid(i)}catch(e){this.logger.verbose("createAuthCodeUrlQueryString: Could not parse home account ID for CCS Header")}}}else e.loginHint&&(this.logger.verbose("createAuthCodeUrlQueryString: No account, adding login_hint from request"),t.addLoginHint(e.loginHint),t.addCcsUpn(e.loginHint));else this.logger.verbose("createAuthCodeUrlQueryString: Prompt is select_account, ignoring account hints");if(e.nonce&&t.addNonce(e.nonce),e.state&&t.addState(e.state),(e.claims||this.config.authOptions.clientCapabilities&&this.config.authOptions.clientCapabilities.length>0)&&t.addClaims(e.claims,this.config.authOptions.clientCapabilities),this.addExtraQueryParams(e,t),e.nativeBroker&&(t.addNativeBroker(),e.authenticationScheme===s.IO.POP)){const i=new Es(this.cryptoUtils);let n;n=e.popKid?this.cryptoUtils.encodeKid(e.popKid):(await Nn(i.generateCnf.bind(i),wi,this.logger,this.performanceClient,e.correlationId)(e,this.logger)).reqCnfString,t.addPopToken(n)}return t.createQueryString()}createLogoutUrlQueryString(e){const t=new Ss;return e.postLogoutRedirectUri&&t.addPostLogoutRedirectUri(e.postLogoutRedirectUri),e.correlationId&&t.addCorrelationId(e.correlationId),e.idTokenHint&&t.addIdTokenHint(e.idTokenHint),e.state&&t.addState(e.state),e.logoutHint&&t.addLogoutHint(e.logoutHint),this.addExtraQueryParams(e,t),t.createQueryString()}addExtraQueryParams(e,t){!(e.extraQueryParameters&&e.extraQueryParameters.hasOwnProperty("instance_aware"))&&this.config.authOptions.instanceAware&&(e.extraQueryParameters=e.extraQueryParameters||{},e.extraQueryParameters.instance_aware="true"),e.extraQueryParameters&&t.addExtraQueryParameters(e.extraQueryParameters)}extractAccountSid(e){return e.idTokenClaims?.sid||null}extractLoginHint(e){return e.idTokenClaims?.login_hint||null}}class Rs{constructor(e,t){this.cacheOutcome=s.Rv.NOT_APPLICABLE,this.cacheManager=t,this.apiId=e.apiId,this.correlationId=e.correlationId,this.wrapperSKU=e.wrapperSKU||s.YM.EMPTY_STRING,this.wrapperVer=e.wrapperVer||s.YM.EMPTY_STRING,this.telemetryCacheKey=s.gT.CACHE_KEY+s.LR.CACHE_KEY_SEPARATOR+e.clientId}generateCurrentRequestHeaderValue(){const e=`${this.apiId}${s.gT.VALUE_SEPARATOR}${this.cacheOutcome}`,t=[this.wrapperSKU,this.wrapperVer],i=this.getNativeBrokerErrorCode();i?.length&&t.push(`broker_error=${i}`);const n=t.join(s.gT.VALUE_SEPARATOR),r=[e,this.getRegionDiscoveryFields()].join(s.gT.VALUE_SEPARATOR);return[s.gT.SCHEMA_VERSION,r,n].join(s.gT.CATEGORY_SEPARATOR)}generateLastRequestHeaderValue(){const e=this.getLastRequests(),t=Rs.maxErrorsToSend(e),i=e.failedRequests.slice(0,2*t).join(s.gT.VALUE_SEPARATOR),n=e.errors.slice(0,t).join(s.gT.VALUE_SEPARATOR),r=e.errors.length,o=[r,t<r?s.gT.OVERFLOW_TRUE:s.gT.OVERFLOW_FALSE].join(s.gT.VALUE_SEPARATOR);return[s.gT.SCHEMA_VERSION,e.cacheHits,i,n,o].join(s.gT.CATEGORY_SEPARATOR)}cacheFailedRequest(e){const t=this.getLastRequests();t.errors.length>=s.gT.MAX_CACHED_ERRORS&&(t.failedRequests.shift(),t.failedRequests.shift(),t.errors.shift()),t.failedRequests.push(this.apiId,this.correlationId),e instanceof Error&&e&&e.toString()?e instanceof l.lR?e.subError?t.errors.push(e.subError):e.errorCode?t.errors.push(e.errorCode):t.errors.push(e.toString()):t.errors.push(e.toString()):t.errors.push(s.gT.UNKNOWN_ERROR),this.cacheManager.setServerTelemetry(this.telemetryCacheKey,t)}incrementCacheHits(){const e=this.getLastRequests();return e.cacheHits+=1,this.cacheManager.setServerTelemetry(this.telemetryCacheKey,e),e.cacheHits}getLastRequests(){return this.cacheManager.getServerTelemetry(this.telemetryCacheKey)||{failedRequests:[],errors:[],cacheHits:0}}clearTelemetryCache(){const e=this.getLastRequests(),t=Rs.maxErrorsToSend(e);if(t===e.errors.length)this.cacheManager.removeItem(this.telemetryCacheKey);else{const i={failedRequests:e.failedRequests.slice(2*t),errors:e.errors.slice(t),cacheHits:0};this.cacheManager.setServerTelemetry(this.telemetryCacheKey,i)}}static maxErrorsToSend(e){let t,i=0,n=0;const r=e.errors.length;for(t=0;t<r;t++){const r=e.failedRequests[2*t]||s.YM.EMPTY_STRING,o=e.failedRequests[2*t+1]||s.YM.EMPTY_STRING,a=e.errors[t]||s.YM.EMPTY_STRING;if(n+=r.toString().length+o.toString().length+a.length+3,!(n<s.gT.MAX_LAST_HEADER_BYTES))break;i+=1}return i}getRegionDiscoveryFields(){const e=[];return e.push(this.regionUsed||s.YM.EMPTY_STRING),e.push(this.regionSource||s.YM.EMPTY_STRING),e.push(this.regionOutcome||s.YM.EMPTY_STRING),e.join(",")}updateRegionDiscoveryMetadata(e){this.regionUsed=e.region_used,this.regionSource=e.region_source,this.regionOutcome=e.region_outcome}setCacheOutcome(e){this.cacheOutcome=e}setNativeBrokerErrorCode(e){const t=this.getLastRequests();t.nativeBrokerErrorCode=e,this.cacheManager.setServerTelemetry(this.telemetryCacheKey,t)}getNativeBrokerErrorCode(){return this.getLastRequests().nativeBrokerErrorCode}clearNativeBrokerErrorCode(){const e=this.getLastRequests();delete e.nativeBrokerErrorCode,this.cacheManager.setServerTelemetry(this.telemetryCacheKey,e)}static makeExtraSkuString(e){return function(e){const{skus:t,libraryName:i,libraryVersion:n,extensionName:s,extensionVersion:r}=e,o=new Map([[0,[i,n]],[2,[s,r]]]);let a=[];if(t?.length){if(a=t.split(","),a.length<4)return t}else a=Array.from({length:4},()=>"|");return o.forEach((e,t)=>{2===e.length&&e[0]?.length&&e[1]?.length&&function(e){const{skuArr:t,index:i,skuName:n,skuVersion:s}=e;i>=t.length||(t[i]=[n,s].join("|"))}({skuArr:a,index:t,skuName:e[0],skuVersion:e[1]})}),a.join(",")}(e)}}class Ls{constructor(e,t,i,n,s,r,o,a,l){this.config=e,this.browserStorage=t,this.browserCrypto=i,this.networkClient=this.config.system.networkClient,this.eventHandler=s,this.navigationClient=r,this.nativeMessageHandler=a,this.correlationId=l||Mn(),this.logger=n.clone(Zi.Q1.MSAL_SKU,nn,this.correlationId),this.performanceClient=o}async clearCacheOnLogout(e){if(e){rt.accountInfoIsEqual(e,this.browserStorage.getActiveAccount(),!1)&&(this.logger.verbose("Setting active account to null"),this.browserStorage.setActiveAccount(null));try{await this.browserStorage.removeAccount(rt.generateAccountCacheKey(e)),this.logger.verbose("Cleared cache items belonging to the account provided in the logout request.")}catch(e){this.logger.error("Account provided in logout request was not found. Local cache unchanged.")}}else try{this.logger.verbose("No account provided in logout request, clearing all cache items.",this.correlationId),await this.browserStorage.clear(),await this.browserCrypto.clearKeystore()}catch(e){this.logger.error("Attempted to clear all MSAL cache items and failed. Local cache unchanged.")}}getRedirectUri(e){this.logger.verbose("getRedirectUri called");const t=e||this.config.auth.redirectUri||ns();return lt.getAbsoluteUrl(t,ns())}initializeServerTelemetryManager(e,t){this.logger.verbose("initializeServerTelemetryManager called");const i={clientId:this.config.auth.clientId,correlationId:this.correlationId,apiId:e,forceRefresh:t||!1,wrapperSKU:this.browserStorage.getWrapperMetadata()[0],wrapperVer:this.browserStorage.getWrapperMetadata()[1]};return new Rs(i,this.browserStorage)}async getDiscoveredAuthority(e){const{account:t}=e,i=e.requestExtraQueryParameters&&e.requestExtraQueryParameters.hasOwnProperty("instance_aware")?e.requestExtraQueryParameters.instance_aware:void 0;this.performanceClient.addQueueMeasurement(zt,this.correlationId);const n={protocolMode:this.config.auth.protocolMode,OIDCOptions:this.config.auth.OIDCOptions,knownAuthorities:this.config.auth.knownAuthorities,cloudDiscoveryMetadata:this.config.auth.cloudDiscoveryMetadata,authorityMetadata:this.config.auth.authorityMetadata,skipAuthorityMetadataCache:this.config.auth.skipAuthorityMetadataCache},s=e.requestAuthority||this.config.auth.authority,r=i?.length?"true"===i:this.config.auth.instanceAware,o=t&&r?this.config.auth.authority.replace(lt.getDomainFromUrl(s),t.environment):s,a=_n.generateAuthority(o,e.requestAzureCloudOptions||this.config.auth.azureCloudOptions),l=await Nn(ws,Ai,this.logger,this.performanceClient,this.correlationId)(a,this.config.system.networkClient,this.browserStorage,n,this.logger,this.correlationId,this.performanceClient);if(t&&!l.isAlias(t.environment))throw Xe($e);return l}}async function ks(e,t,i){e.addQueueMeasurement(Ui,i);const n=Pn(Ps,Wi,t,e,i)(e,t,i);return{verifier:n,challenge:await Nn(Ns,ji,t,e,i)(n,e,t,i)}}function Ps(e,t,i){try{const n=new Uint8Array(32);return Pn(xn,$i,t,e,i)(n),pn(n)}catch(e){throw(0,Ji.bD)(en.p5)}}async function Ns(e,t,i,n){t.addQueueMeasurement(ji,n);try{const s=await Nn(wn,Ki,i,t,n)(e,t,n);return pn(new Uint8Array(s))}catch(e){throw(0,Ji.bD)(en.p5)}}async function Os(e,t,i,n){i.addQueueMeasurement(ii,e.correlationId);const r=e.authority||t.auth.authority,o=[...e&&e.scopes||[]],a={...e,correlationId:e.correlationId,authority:r,scopes:o};if(a.authenticationScheme){if(a.authenticationScheme===s.IO.SSH){if(!e.sshJwk)throw Xe(He);if(!e.sshKid)throw Xe(ze)}n.verbose(`Authentication Scheme set to "${a.authenticationScheme}" as configured in Auth request`)}else a.authenticationScheme=s.IO.BEARER,n.verbose('Authentication Scheme wasn\'t explicitly set in request, defaulting to "Bearer" request');return t.cache.claimsBasedCachingEnabled&&e.claims&&!Ze.isEmptyObj(e.claims)&&(a.requestedClaimsHash=await Tn(e.claims)),a}async function _s(e,t,i,n,s){n.addQueueMeasurement(ni,e.correlationId);const r=await Nn(Os,ii,s,n,e.correlationId)(e,i,n,s);return{...e,...r,account:t,forceRefresh:e.forceRefresh||!1}}class Fs extends Ls{async initializeAuthorizationCodeRequest(e){this.performanceClient.addQueueMeasurement(pi,this.correlationId);const t=await Nn(ks,Ui,this.logger,this.performanceClient,this.correlationId)(this.performanceClient,this.logger,this.correlationId),i={...e,redirectUri:e.redirectUri,code:s.YM.EMPTY_STRING,codeVerifier:t.verifier};return e.codeChallenge=t.challenge,e.codeChallengeMethod=s.YM.S256_CODE_CHALLENGE_METHOD,i}initializeLogoutRequest(e){this.logger.verbose("initializeLogoutRequest called",e?.correlationId);const t={correlationId:this.correlationId||Mn(),...e};if(e)if(e.logoutHint)this.logger.verbose("logoutHint has already been set in logoutRequest");else if(e.account){const i=this.getLogoutHintFromIdTokenClaims(e.account);i&&(this.logger.verbose("Setting logoutHint to login_hint ID Token Claim value for the account provided"),t.logoutHint=i)}else this.logger.verbose("logoutHint was not set and account was not passed into logout request, logoutHint will not be set");else this.logger.verbose("logoutHint will not be set since no logout request was configured");return e&&null===e.postLogoutRedirectUri?this.logger.verbose("postLogoutRedirectUri passed as null, not setting post logout redirect uri",t.correlationId):e&&e.postLogoutRedirectUri?(this.logger.verbose("Setting postLogoutRedirectUri to uri set on logout request",t.correlationId),t.postLogoutRedirectUri=lt.getAbsoluteUrl(e.postLogoutRedirectUri,ns())):null===this.config.auth.postLogoutRedirectUri?this.logger.verbose("postLogoutRedirectUri configured as null and no uri set on request, not passing post logout redirect",t.correlationId):this.config.auth.postLogoutRedirectUri?(this.logger.verbose("Setting postLogoutRedirectUri to configured uri",t.correlationId),t.postLogoutRedirectUri=lt.getAbsoluteUrl(this.config.auth.postLogoutRedirectUri,ns())):(this.logger.verbose("Setting postLogoutRedirectUri to current page",t.correlationId),t.postLogoutRedirectUri=lt.getAbsoluteUrl(ns(),ns())),t}getLogoutHintFromIdTokenClaims(e){const t=e.idTokenClaims;if(t){if(t.login_hint)return t.login_hint;this.logger.verbose("The ID Token Claims tied to the provided account do not contain a login_hint claim, logoutHint will not be added to logout request")}else this.logger.verbose("The provided account does not contain ID Token Claims, logoutHint will not be added to logout request");return null}async createAuthCodeClient(e){this.performanceClient.addQueueMeasurement(hi,this.correlationId);const t=await Nn(this.getClientConfiguration.bind(this),di,this.logger,this.performanceClient,this.correlationId)(e);return new Is(t,this.performanceClient)}async getClientConfiguration(e){const{serverTelemetryManager:t,requestAuthority:i,requestAzureCloudOptions:n,requestExtraQueryParameters:r,account:o}=e;this.performanceClient.addQueueMeasurement(di,this.correlationId);const a=await Nn(this.getDiscoveredAuthority.bind(this),zt,this.logger,this.performanceClient,this.correlationId)({requestAuthority:i,requestAzureCloudOptions:n,requestExtraQueryParameters:r,account:o}),l=this.config.system.loggerOptions;return{authOptions:{clientId:this.config.auth.clientId,authority:a,clientCapabilities:this.config.auth.clientCapabilities},systemOptions:{tokenRenewalOffsetSeconds:this.config.system.tokenRenewalOffsetSeconds,preventCorsPreflight:!0},loggerOptions:{loggerCallback:l.loggerCallback,piiLoggingEnabled:l.piiLoggingEnabled,logLevel:l.logLevel,correlationId:this.correlationId},cacheOptions:{claimsBasedCachingEnabled:this.config.cache.claimsBasedCachingEnabled},cryptoInterface:this.browserCrypto,networkInterface:this.networkClient,storageInterface:this.browserStorage,serverTelemetryManager:t,libraryInfo:{sku:Zi.Q1.MSAL_SKU,version:nn,cpu:s.YM.EMPTY_STRING,os:s.YM.EMPTY_STRING},telemetry:this.config.telemetry}}async initializeAuthorizationRequest(e,t){this.performanceClient.addQueueMeasurement(ui,this.correlationId);const i=this.getRedirectUri(e.redirectUri),n={interactionType:t},r=Yn.setRequestState(this.browserCrypto,e&&e.state||s.YM.EMPTY_STRING,n),o={...await Nn(Os,ii,this.logger,this.performanceClient,this.correlationId)({...e,correlationId:this.correlationId},this.config,this.performanceClient,this.logger),redirectUri:i,state:r,nonce:e.nonce||Mn(),responseMode:this.config.auth.OIDCOptions.serverResponseType},a=e.account||this.browserStorage.getActiveAccount();if(a&&(this.logger.verbose("Setting validated request account",this.correlationId),this.logger.verbosePii(`Setting validated request account: ${a.homeAccountId}`,this.correlationId),o.account=a),!o.loginHint&&!a){const e=this.browserStorage.getLegacyLoginHint();e&&(o.loginHint=e)}return o}}var Gs=i(5841);const Vs="user_switch",Bs={[Vs]:"User attempted to switch accounts in the native broker, which is not allowed. All new accounts must sign-in through the standard web flow first, please try again."};class Hs extends l.lR{constructor(e,t,i){super(e,t),Object.setPrototypeOf(this,Hs.prototype),this.name="NativeAuthError",this.ext=i}}function zs(e){return!(!e.ext||!e.ext.status||"PERSISTENT_ERROR"!==e.ext.status&&"DISABLED"!==e.ext.status)||!(!e.ext||!e.ext.error||-2147186943!==e.ext.error)||"ContentError"===e.errorCode}function Us(e,t,i){if(i&&i.status)switch(i.status){case"ACCOUNT_UNAVAILABLE":return $n(Vn);case"USER_INTERACTION_REQUIRED":return new jn(e,t);case"USER_CANCEL":return(0,Ji.bD)(en.fN);case"NO_NETWORK":return(0,Ji.bD)(en.l7)}return new Hs(e,Bs[e]||t,i)}class Ws extends xs{constructor(e,t){super(e,t)}async acquireToken(e){this.performanceClient?.addQueueMeasurement(Yt,e.correlationId);const t=ae(),i=await Nn(this.executeTokenRequest.bind(this),$t,this.logger,this.performanceClient,e.correlationId)(e,this.authority),n=i.headers?.[s.OK.X_MS_REQUEST_ID],r=new As(this.config.authOptions.clientId,this.cacheManager,this.cryptoUtils,this.logger,this.config.serializableCache,this.config.persistencePlugin);return r.validateTokenResponse(i.body),Nn(r.handleServerTokenResponse.bind(r),Ei,this.logger,this.performanceClient,e.correlationId)(i.body,this.authority,t,e,void 0,void 0,!0,e.forceCache,n)}async acquireTokenByRefreshToken(e){if(!e)throw Xe(Ne);if(this.performanceClient?.addQueueMeasurement(Xt,e.correlationId),!e.account)throw te(P);if(this.cacheManager.isAppMetadataFOCI(e.account.environment))try{return await Nn(this.acquireTokenWithCachedRefreshToken.bind(this),qt,this.logger,this.performanceClient,e.correlationId)(e,!0)}catch(t){const i=t instanceof jn&&t.errorCode===Gn,n=t instanceof ds&&t.errorCode===s.I.INVALID_GRANT_ERROR&&t.subError===s.I.CLIENT_MISMATCH_ERROR;if(i||n)return Nn(this.acquireTokenWithCachedRefreshToken.bind(this),qt,this.logger,this.performanceClient,e.correlationId)(e,!1);throw t}return Nn(this.acquireTokenWithCachedRefreshToken.bind(this),qt,this.logger,this.performanceClient,e.correlationId)(e,!1)}async acquireTokenWithCachedRefreshToken(e,t){this.performanceClient?.addQueueMeasurement(qt,e.correlationId);const i=Pn(this.cacheManager.getRefreshToken.bind(this.cacheManager),zi,this.logger,this.performanceClient,e.correlationId)(e.account,t,void 0,this.performanceClient,e.correlationId);if(!i)throw $n(Gn);if(i.expiresOn&&le(i.expiresOn,e.refreshTokenExpirationOffsetSeconds||300))throw $n(Bn);const n={...e,refreshToken:i.secret,authenticationScheme:e.authenticationScheme||s.IO.BEARER,ccsCredential:{credential:e.account.homeAccountId,type:qn}};try{return await Nn(this.acquireToken.bind(this),Yt,this.logger,this.performanceClient,e.correlationId)(n)}catch(e){if(e instanceof jn&&e.subError===Hn){this.logger.verbose("acquireTokenWithRefreshToken: bad refresh token, removing from cache");const e=ce(i);this.cacheManager.removeRefreshToken(e)}throw e}}async executeTokenRequest(e,t){this.performanceClient?.addQueueMeasurement($t,e.correlationId);const i=this.createTokenQueryParameters(e),n=lt.appendQueryString(t.tokenEndpoint,i),s=await Nn(this.createTokenRequestBody.bind(this),Zt,this.logger,this.performanceClient,e.correlationId)(e),r=this.createTokenRequestHeaders(e.ccsCredential),o={clientId:e.tokenBodyParameters?.clientId||this.config.authOptions.clientId,authority:t.canonicalAuthority,scopes:e.scopes,claims:e.claims,authenticationScheme:e.authenticationScheme,resourceRequestMethod:e.resourceRequestMethod,resourceRequestUri:e.resourceRequestUri,shrClaims:e.shrClaims,sshKid:e.sshKid};return Nn(this.executePostToTokenEndpoint.bind(this),jt,this.logger,this.performanceClient,e.correlationId)(n,s,r,o,e.correlationId,jt)}async createTokenRequestBody(e){this.performanceClient?.addQueueMeasurement(Zt,e.correlationId);const t=e.correlationId,i=new Ss;if(i.addClientId(e.tokenBodyParameters?.[gs]||this.config.authOptions.clientId),e.redirectUri&&i.addRedirectUri(e.redirectUri),i.addScopes(e.scopes,!0,this.config.authOptions.authority.options.OIDCOptions?.defaultScopes),i.addGrantType(s.$x.REFRESH_TOKEN_GRANT),i.addClientInfo(),i.addLibraryInfo(this.config.libraryInfo),i.addApplicationTelemetry(this.config.telemetry.application),i.addThrottling(),this.serverTelemetryManager&&!Dt(this.config)&&i.addServerTelemetry(this.serverTelemetryManager),i.addCorrelationId(t),i.addRefreshToken(e.refreshToken),this.config.clientCredentials.clientSecret&&i.addClientSecret(this.config.clientCredentials.clientSecret),this.config.clientCredentials.clientAssertion){const t=this.config.clientCredentials.clientAssertion;i.addClientAssertion(await Ds(t.assertion,this.config.authOptions.clientId,e.resourceRequestUri)),i.addClientAssertionType(t.assertionType)}if(e.authenticationScheme===s.IO.POP){const t=new Es(this.cryptoUtils,this.performanceClient);let n;n=e.popKid?this.cryptoUtils.encodeKid(e.popKid):(await Nn(t.generateCnf.bind(t),wi,this.logger,this.performanceClient,e.correlationId)(e,this.logger)).reqCnfString,i.addPopToken(n)}else if(e.authenticationScheme===s.IO.SSH){if(!e.sshJwk)throw Xe(He);i.addSshJwk(e.sshJwk)}if((!Ze.isEmptyObj(e.claims)||this.config.authOptions.clientCapabilities&&this.config.authOptions.clientCapabilities.length>0)&&i.addClaims(e.claims,this.config.authOptions.clientCapabilities),this.config.systemOptions.preventCorsPreflight&&e.ccsCredential)switch(e.ccsCredential.type){case qn:try{const t=et(e.ccsCredential.credential);i.addCcsOid(t)}catch(e){this.logger.verbose("Could not parse home account ID for CCS Header: "+e)}break;case Xn:i.addCcsUpn(e.ccsCredential.credential)}return e.tokenBodyParameters&&i.addExtraQueryParameters(e.tokenBodyParameters),i.createQueryString()}}class js extends xs{constructor(e,t){super(e,t)}async acquireToken(e){try{const[t,i]=await this.acquireCachedToken({...e,scopes:e.scopes?.length?e.scopes:[...s.aZ]});return i===s.Rv.PROACTIVELY_REFRESHED&&(this.logger.info("SilentFlowClient:acquireCachedToken - Cached access token's refreshOn property has been exceeded'. It's not expired, but must be refreshed."),new Ws(this.config,this.performanceClient).acquireTokenByRefreshToken(e).catch(()=>{})),t}catch(t){if(t instanceof ee&&t.errorCode===H)return new Ws(this.config,this.performanceClient).acquireTokenByRefreshToken(e);throw t}}async acquireCachedToken(e){this.performanceClient?.addQueueMeasurement(Jt,e.correlationId);let t=s.Rv.NOT_APPLICABLE;if(e.forceRefresh||!this.config.cacheOptions.claimsBasedCachingEnabled&&!Ze.isEmptyObj(e.claims))throw this.setCacheOutcome(s.Rv.FORCE_REFRESH_OR_CLAIMS,e.correlationId),te(H);if(!e.account)throw te(P);const i=e.account.tenantId||function(e){const t=new lt(e).getUrlComponents(),i=t.PathSegments.slice(-1)[0]?.toLowerCase();switch(i){case s.v2.COMMON:case s.v2.ORGANIZATIONS:case s.v2.CONSUMERS:return;default:return i}}(e.authority),n=this.cacheManager.getTokenKeys(),r=this.cacheManager.getAccessToken(e.account,e,n,i,this.performanceClient,e.correlationId);if(!r)throw this.setCacheOutcome(s.Rv.NO_CACHED_ACCESS_TOKEN,e.correlationId),te(H);if(o=r.cachedAt,Number(o)>ae()||le(r.expiresOn,this.config.systemOptions.tokenRenewalOffsetSeconds))throw this.setCacheOutcome(s.Rv.CACHED_ACCESS_TOKEN_EXPIRED,e.correlationId),te(H);var o;r.refreshOn&&le(r.refreshOn,0)&&(t=s.Rv.PROACTIVELY_REFRESHED);const a=e.authority||this.authority.getPreferredCache(),l={account:this.cacheManager.readAccountFromCache(e.account),accessToken:r,idToken:this.cacheManager.getIdToken(e.account,n,i,this.performanceClient,e.correlationId),refreshToken:null,appMetadata:this.cacheManager.readAppMetadataFromCache(a)};return this.setCacheOutcome(t,e.correlationId),this.config.serverTelemetryManager&&this.config.serverTelemetryManager.incrementCacheHits(),[await Nn(this.generateResultFromCacheRecord.bind(this),ei,this.logger,this.performanceClient,e.correlationId)(l,e),t]}setCacheOutcome(e,t){this.serverTelemetryManager?.setCacheOutcome(e),this.performanceClient?.addFields({cacheOutcome:e},t),e!==s.Rv.NOT_APPLICABLE&&this.logger.info(`Token refresh is required due to cache outcome: ${e}`)}async generateResultFromCacheRecord(e,t){let i;if(this.performanceClient?.addQueueMeasurement(ei,t.correlationId),e.idToken&&(i=re(e.idToken.secret,this.config.cryptoInterface.base64Decode)),t.maxAge||0===t.maxAge){const e=i?.auth_time;if(!e)throw te(S);oe(e,t.maxAge)}return As.generateAuthenticationResult(this.cryptoUtils,this.authority,e,!0,t,i)}}class Ks extends Fs{async acquireToken(e){this.performanceClient.addQueueMeasurement(Gt,e.correlationId);const t=this.initializeServerTelemetryManager(Zi.sA.acquireTokenSilent_silentFlow),i=await Nn(this.getClientConfiguration.bind(this),di,this.logger,this.performanceClient,this.correlationId)({serverTelemetryManager:t,requestAuthority:e.authority,requestAzureCloudOptions:e.azureCloudOptions,account:e.account}),n=new js(i,this.performanceClient);this.logger.verbose("Silent auth client created");try{const t=(await Nn(n.acquireCachedToken.bind(n),Jt,this.logger,this.performanceClient,e.correlationId)(e))[0];return this.performanceClient.addFields({fromCache:!0},e.correlationId),t}catch(e){throw e instanceof Ji.jT&&e.errorCode===en.e0&&this.logger.verbose("Signing keypair for bound access token not found. Refreshing bound access token and generating a new crypto keypair."),e}}logout(e){this.logger.verbose("logoutRedirect called");const t=this.initializeLogoutRequest(e);return this.clearCacheOnLogout(t?.account)}}const $s="brk_redirect_uri";class Ys extends Ls{constructor(e,t,i,n,s,r,o,a,l,c,h,d){super(e,t,i,n,s,r,a,l,d),this.apiId=o,this.accountId=c,this.nativeMessageHandler=l,this.nativeStorageManager=h,this.silentCacheClient=new Ks(e,this.nativeStorageManager,i,n,s,r,a,l,d),this.serverTelemetryManager=this.initializeServerTelemetryManager(this.apiId);const u=this.nativeMessageHandler.getExtensionId()===Zi.JD.PREFERRED_EXTENSION_ID?"chrome":this.nativeMessageHandler.getExtensionId()?.length?"unknown":void 0;this.skus=Rs.makeExtraSkuString({libraryName:Zi.Q1.MSAL_SKU,libraryVersion:nn,extensionName:u,extensionVersion:this.nativeMessageHandler.getExtensionVersion()})}addRequestSKUs(e){e.extraParameters={...e.extraParameters,[Cs]:this.skus}}async acquireToken(e){this.performanceClient.addQueueMeasurement(Wt,e.correlationId),this.logger.trace("NativeInteractionClient - acquireToken called.");const t=this.performanceClient.startMeasurement(Wt,e.correlationId),i=ae();try{const n=await this.initializeNativeRequest(e);try{const e=await this.acquireTokensFromCache(this.accountId,n);return t.end({success:!0,isNativeBroker:!1,fromCache:!0}),e}catch(e){this.logger.info("MSAL internal Cache does not contain tokens, proceed to make a native call")}const{...s}=n,r={method:Zi.Ct.GetToken,request:s},o=await this.nativeMessageHandler.sendMessage(r),a=this.validateNativeResponse(o);return await this.handleNativeResponse(a,n,i).then(e=>(t.end({success:!0,isNativeBroker:!0,requestId:e.requestId}),this.serverTelemetryManager.clearNativeBrokerErrorCode(),e)).catch(e=>{throw t.end({success:!1,errorCode:e.errorCode,subErrorCode:e.subError,isNativeBroker:!0}),e})}catch(e){throw e instanceof Hs&&this.serverTelemetryManager.setNativeBrokerErrorCode(e.errorCode),e}}createSilentCacheRequest(e,t){return{authority:e.authority,correlationId:this.correlationId,scopes:Qe.fromString(e.scope).asArray(),account:t,forceRefresh:!1}}async acquireTokensFromCache(e,t){if(!e)throw this.logger.warning("NativeInteractionClient:acquireTokensFromCache - No nativeAccountId provided"),te(_);const i=this.browserStorage.getBaseAccountInfo({nativeAccountId:e});if(!i)throw te(_);try{const e=this.createSilentCacheRequest(t,i),n=await this.silentCacheClient.acquireToken(e),s={...i,idTokenClaims:n?.idTokenClaims,idToken:n?.idToken};return{...n,account:s}}catch(e){throw e}}async acquireTokenRedirect(e,t){this.logger.trace("NativeInteractionClient - acquireTokenRedirect called.");const{...i}=e;delete i.onRedirectNavigate;const n=await this.initializeNativeRequest(i),s={method:Zi.Ct.GetToken,request:n};try{const e=await this.nativeMessageHandler.sendMessage(s);this.validateNativeResponse(e)}catch(e){if(e instanceof Hs&&(this.serverTelemetryManager.setNativeBrokerErrorCode(e.errorCode),zs(e)))throw e}this.browserStorage.setTemporaryCache(Zi._p.NATIVE_REQUEST,JSON.stringify(n),!0);const r={apiId:Zi.sA.acquireTokenRedirect,timeout:this.config.system.redirectNavigationTimeout,noHistory:!1},o=this.config.auth.navigateToLoginRequestUrl?window.location.href:this.getRedirectUri(e.redirectUri);t.end({success:!0}),await this.navigationClient.navigateExternal(o,r)}async handleRedirectPromise(e,t){if(this.logger.trace("NativeInteractionClient - handleRedirectPromise called."),!this.browserStorage.isInteractionInProgress(!0))return this.logger.info("handleRedirectPromise called but there is no interaction in progress, returning null."),null;const i=this.browserStorage.getCachedNativeRequest();if(!i)return this.logger.verbose("NativeInteractionClient - handleRedirectPromise called but there is no cached request, returning null."),e&&t&&e?.addFields({errorCode:"no_cached_request"},t),null;const{prompt:n,...s}=i;n&&this.logger.verbose("NativeInteractionClient - handleRedirectPromise called and prompt was included in the original request, removing prompt from cached request to prevent second interaction with native broker window."),this.browserStorage.removeItem(this.browserStorage.generateCacheKey(Zi._p.NATIVE_REQUEST));const r={method:Zi.Ct.GetToken,request:s},o=ae();try{this.logger.verbose("NativeInteractionClient - handleRedirectPromise sending message to native broker.");const e=await this.nativeMessageHandler.sendMessage(r);this.validateNativeResponse(e);const t=this.handleNativeResponse(e,s,o);this.browserStorage.setInteractionInProgress(!1);const i=await t;return this.serverTelemetryManager.clearNativeBrokerErrorCode(),i}catch(e){throw this.browserStorage.setInteractionInProgress(!1),e}}logout(){return this.logger.trace("NativeInteractionClient - logout called."),Promise.reject("Logout not implemented yet")}async handleNativeResponse(e,t,i){this.logger.trace("NativeInteractionClient - handleNativeResponse called.");const n=re(e.id_token,mn),s=this.createHomeAccountIdentifier(e,n),r=this.browserStorage.getAccountInfoFilteredBy({nativeAccountId:t.accountId})?.homeAccountId;if(s!==r&&e.account.id!==t.accountId)throw Us(Vs);const o=await this.getDiscoveredAuthority({requestAuthority:t.authority}),a=Ts(this.browserStorage,o,s,mn,n,e.client_info,void 0,n.tid,void 0,e.account.id,this.logger),l=await this.generateAuthenticationResult(e,t,n,a,o.canonicalAuthority,i);return this.cacheAccount(a),this.cacheNativeTokens(e,t,s,n,e.access_token,l.tenantId,i),l}createHomeAccountIdentifier(e,t){return rt.generateHomeAccountId(e.client_info||s.YM.EMPTY_STRING,0,this.logger,this.browserCrypto,t)}generateScopes(e,t){return e.scope?Qe.fromString(e.scope):Qe.fromString(t.scope)}async generatePopAccessToken(e,t){if(t.tokenType===s.IO.POP&&t.signPopToken){if(e.shr)return this.logger.trace("handleNativeServerResponse: SHR is enabled in native layer"),e.shr;const i=new Es(this.browserCrypto),n={resourceRequestMethod:t.resourceRequestMethod,resourceRequestUri:t.resourceRequestUri,shrClaims:t.shrClaims,shrNonce:t.shrNonce};if(!t.keyId)throw te($);return i.signPopToken(e.access_token,t.keyId,n)}return e.access_token}async generateAuthenticationResult(e,t,i,n,r,o){const a=this.addTelemetryFromNativeResponse(e),l=e.scope?Qe.fromString(e.scope):Qe.fromString(t.scope),c=e.account.properties||{},h=c.UID||i.oid||i.sub||s.YM.EMPTY_STRING,d=c.TenantId||i.tid||s.YM.EMPTY_STRING,u=nt(n.getAccountInfo(),void 0,i,e.id_token);u.nativeAccountId!==e.account.id&&(u.nativeAccountId=e.account.id);const p=await this.generatePopAccessToken(e,t),g=t.tokenType===s.IO.POP?s.IO.POP:s.IO.BEARER;return{authority:r,uniqueId:h,tenantId:d,scopes:l.asArray(),account:u,idToken:e.id_token,idTokenClaims:i,accessToken:p,fromCache:!!a&&this.isResponseFromCache(a),expiresOn:new Date(1e3*Number(o+e.expires_in)),tokenType:g,correlationId:this.correlationId,state:e.state,fromNativeBroker:!0}}cacheAccount(e){this.browserStorage.setAccount(e),this.browserStorage.removeAccountContext(e).catch(e=>{this.logger.error(`Error occurred while removing account context from browser storage. ${e}`)})}cacheNativeTokens(e,t,i,n,r,o,a){const l=he(i,t.authority,e.id_token||"",t.clientId,n.tid||""),c=a+(t.tokenType===s.IO.POP?s.YM.SHR_NONCE_VALIDITY:("string"==typeof e.expires_in?parseInt(e.expires_in,10):e.expires_in)||0),h=this.generateScopes(e,t),d={idToken:l,accessToken:de(i,t.authority,r,t.clientId,n.tid||o,h.printScopes(),c,0,mn,void 0,t.tokenType,void 0,t.keyId)};this.nativeStorageManager.saveCacheRecord(d,t.storeInCache)}addTelemetryFromNativeResponse(e){const t=this.getMATSFromResponse(e);return t?(this.performanceClient.addFields({extensionId:this.nativeMessageHandler.getExtensionId(),extensionVersion:this.nativeMessageHandler.getExtensionVersion(),matsBrokerVersion:t.broker_version,matsAccountJoinOnStart:t.account_join_on_start,matsAccountJoinOnEnd:t.account_join_on_end,matsDeviceJoin:t.device_join,matsPromptBehavior:t.prompt_behavior,matsApiErrorCode:t.api_error_code,matsUiVisible:t.ui_visible,matsSilentCode:t.silent_code,matsSilentBiSubCode:t.silent_bi_sub_code,matsSilentMessage:t.silent_message,matsSilentStatus:t.silent_status,matsHttpStatus:t.http_status,matsHttpEventCount:t.http_event_count},this.correlationId),t):null}validateNativeResponse(e){if(e.hasOwnProperty("access_token")&&e.hasOwnProperty("id_token")&&e.hasOwnProperty("client_info")&&e.hasOwnProperty("account")&&e.hasOwnProperty("scope")&&e.hasOwnProperty("expires_in"))return e;throw(0,l.pz)(Gs.W,"Response missing expected properties.")}getMATSFromResponse(e){if(e.properties.MATS)try{return JSON.parse(e.properties.MATS)}catch(e){this.logger.error("NativeInteractionClient - Error parsing MATS telemetry, returning null instead")}return null}isResponseFromCache(e){return void 0===e.is_cached?(this.logger.verbose("NativeInteractionClient - MATS telemetry does not contain field indicating if response was served from cache. Returning false."),!1):!!e.is_cached}async initializeNativeRequest(e){this.logger.trace("NativeInteractionClient - initializeNativeRequest called");const t=e.authority||this.config.auth.authority;e.account&&await this.getDiscoveredAuthority({requestAuthority:t,requestAzureCloudOptions:e.azureCloudOptions,account:e.account});const i=new lt(t);i.validateAsUri();const{scopes:n,...r}=e,o=new Qe(n||[]);o.appendScopes(s.aZ);const a={...r,accountId:this.accountId,clientId:this.config.auth.clientId,authority:i.urlString,scope:o.printScopes(),redirectUri:this.getRedirectUri(e.redirectUri),prompt:(()=>{switch(this.apiId){case Zi.sA.ssoSilent:case Zi.sA.acquireTokenSilent_silentFlow:return this.logger.trace("initializeNativeRequest: silent request sets prompt to none"),s._M.NONE}if(e.prompt)switch(e.prompt){case s._M.NONE:case s._M.CONSENT:case s._M.LOGIN:return this.logger.trace("initializeNativeRequest: prompt is compatible with native flow"),e.prompt;default:throw this.logger.trace(`initializeNativeRequest: prompt = ${e.prompt} is not compatible with native flow`),(0,Ji.bD)(en.nF)}else this.logger.trace("initializeNativeRequest: prompt was not provided")})(),correlationId:this.correlationId,tokenType:e.authenticationScheme,windowTitleSubstring:document.title,extraParameters:{...e.extraQueryParameters,...e.tokenQueryParameters},extendedExpiryToken:!1,keyId:e.popKid};if(a.signPopToken&&e.popKid)throw(0,Ji.bD)(en.bT);if(this.handleExtraBrokerParams(a),a.extraParameters=a.extraParameters||{},a.extraParameters.telemetry=Zi.JD.MATS_TELEMETRY,e.authenticationScheme===s.IO.POP){const t={resourceRequestUri:e.resourceRequestUri,resourceRequestMethod:e.resourceRequestMethod,shrClaims:e.shrClaims,shrNonce:e.shrNonce},i=new Es(this.browserCrypto);let n;if(a.keyId)n=this.browserCrypto.base64UrlEncode(JSON.stringify({kid:a.keyId})),a.signPopToken=!1;else{const s=await Nn(i.generateCnf.bind(i),wi,this.logger,this.performanceClient,e.correlationId)(t,this.logger);n=s.reqCnfString,a.keyId=s.kid,a.signPopToken=!0}a.reqCnf=n}return this.addRequestSKUs(a),a}handleExtraBrokerParams(e){if(e.extraParameters&&e.extraParameters.hasOwnProperty("brk_client_id")&&e.extraParameters.hasOwnProperty($s)&&e.extraParameters.hasOwnProperty(gs)){const t=e.extraParameters[gs],i=e.redirectUri,n=e.extraParameters[$s];e.extraParameters={child_client_id:t,child_redirect_uri:i},e.redirectUri=n}}}class qs{constructor(e,t,i,n){this.logger=e,this.handshakeTimeoutMs=t,this.extensionId=n,this.resolvers=new Map,this.handshakeResolvers=new Map,this.messageChannel=new MessageChannel,this.windowListener=this.onWindowMessage.bind(this),this.performanceClient=i,this.handshakeEvent=i.startMeasurement(Vi)}async sendMessage(e){this.logger.trace("NativeMessageHandler - sendMessage called.");const t={channel:Zi.JD.CHANNEL_ID,extensionId:this.extensionId,responseId:Mn(),body:e};return this.logger.trace("NativeMessageHandler - Sending request to browser extension"),this.logger.tracePii(`NativeMessageHandler - Sending request to browser extension: ${JSON.stringify(t)}`),this.messageChannel.port1.postMessage(t),new Promise((e,i)=>{this.resolvers.set(t.responseId,{resolve:e,reject:i})})}static async createProvider(e,t,i){e.trace("NativeMessageHandler - createProvider called.");try{const n=new qs(e,t,i,Zi.JD.PREFERRED_EXTENSION_ID);return await n.sendHandshakeRequest(),n}catch(n){const s=new qs(e,t,i);return await s.sendHandshakeRequest(),s}}async sendHandshakeRequest(){this.logger.trace("NativeMessageHandler - sendHandshakeRequest called."),window.addEventListener("message",this.windowListener,!1);const e={channel:Zi.JD.CHANNEL_ID,extensionId:this.extensionId,responseId:Mn(),body:{method:Zi.Ct.HandshakeRequest}};return this.handshakeEvent.add({extensionId:this.extensionId,extensionHandshakeTimeoutMs:this.handshakeTimeoutMs}),this.messageChannel.port1.onmessage=e=>{this.onChannelMessage(e)},window.postMessage(e,window.origin,[this.messageChannel.port2]),new Promise((t,i)=>{this.handshakeResolvers.set(e.responseId,{resolve:t,reject:i}),this.timeoutId=window.setTimeout(()=>{window.removeEventListener("message",this.windowListener,!1),this.messageChannel.port1.close(),this.messageChannel.port2.close(),this.handshakeEvent.end({extensionHandshakeTimedOut:!0,success:!1}),i((0,Ji.bD)(en.y3)),this.handshakeResolvers.delete(e.responseId)},this.handshakeTimeoutMs)})}onWindowMessage(e){if(this.logger.trace("NativeMessageHandler - onWindowMessage called"),e.source!==window)return;const t=e.data;if(t.channel&&t.channel===Zi.JD.CHANNEL_ID&&(!t.extensionId||t.extensionId===this.extensionId)&&t.body.method===Zi.Ct.HandshakeRequest){const e=this.handshakeResolvers.get(t.responseId);if(!e)return void this.logger.trace(`NativeMessageHandler.onWindowMessage - resolver can't be found for request ${t.responseId}`);this.logger.verbose(t.extensionId?`Extension with id: ${t.extensionId} not installed`:"No extension installed"),clearTimeout(this.timeoutId),this.messageChannel.port1.close(),this.messageChannel.port2.close(),window.removeEventListener("message",this.windowListener,!1),this.handshakeEvent.end({success:!1,extensionInstalled:!1}),e.reject((0,Ji.bD)(en.cq))}}onChannelMessage(e){this.logger.trace("NativeMessageHandler - onChannelMessage called.");const t=e.data,i=this.resolvers.get(t.responseId),n=this.handshakeResolvers.get(t.responseId);try{const e=t.body.method;if(e===Zi.Ct.Response){if(!i)return;const e=t.body.response;if(this.logger.trace("NativeMessageHandler - Received response from browser extension"),this.logger.tracePii(`NativeMessageHandler - Received response from browser extension: ${JSON.stringify(e)}`),"Success"!==e.status)i.reject(Us(e.code,e.description,e.ext));else{if(!e.result)throw(0,l.pz)(Gs.W,"Event does not contain result.");e.result.code&&e.result.description?i.reject(Us(e.result.code,e.result.description,e.result.ext)):i.resolve(e.result)}this.resolvers.delete(t.responseId)}else if(e===Zi.Ct.HandshakeResponse){if(!n)return void this.logger.trace(`NativeMessageHandler.onChannelMessage - resolver can't be found for request ${t.responseId}`);clearTimeout(this.timeoutId),window.removeEventListener("message",this.windowListener,!1),this.extensionId=t.extensionId,this.extensionVersion=t.body.version,this.logger.verbose(`NativeMessageHandler - Received HandshakeResponse from extension: ${this.extensionId}`),this.handshakeEvent.end({extensionInstalled:!0,success:!0}),n.resolve(),this.handshakeResolvers.delete(t.responseId)}}catch(t){this.logger.error("Error parsing response from WAM Extension"),this.logger.errorPii(`Error parsing response from WAM Extension: ${t}`),this.logger.errorPii(`Unable to parse ${e}`),i?i.reject(t):n&&n.reject(t)}}getExtensionId(){return this.extensionId}getExtensionVersion(){return this.extensionVersion}static isNativeAvailable(e,t,i,n){if(t.trace("isNativeAvailable called"),!e.system.allowNativeBroker)return t.trace("isNativeAvailable: allowNativeBroker is not enabled, returning false"),!1;if(!i)return t.trace("isNativeAvailable: WAM extension provider is not initialized, returning false"),!1;if(n)switch(n){case s.IO.BEARER:case s.IO.POP:return t.trace("isNativeAvailable: authenticationScheme is supported, returning true"),!0;default:return t.trace("isNativeAvailable: authenticationScheme is not supported, returning false"),!1}return!0}}class Xs{constructor(e,t,i,n,s){this.authModule=e,this.browserStorage=t,this.authCodeRequest=i,this.logger=n,this.performanceClient=s}async handleCodeResponse(e,t){let i;this.performanceClient.addQueueMeasurement(mi,t.correlationId);try{i=this.authModule.handleFragmentResponse(e,t.state)}catch(e){throw e instanceof ds&&e.subError===en.fN?(0,Ji.bD)(en.fN):e}return Nn(this.handleCodeResponseFromServer.bind(this),fi,this.logger,this.performanceClient,t.correlationId)(i,t)}async handleCodeResponseFromServer(e,t,i=!0){if(this.performanceClient.addQueueMeasurement(fi,t.correlationId),this.logger.trace("InteractionHandler.handleCodeResponseFromServer called"),this.authCodeRequest.code=e.code,e.cloud_instance_host_name&&await Nn(this.authModule.updateAuthority.bind(this.authModule),vi,this.logger,this.performanceClient,t.correlationId)(e.cloud_instance_host_name,t.correlationId),i&&(e.nonce=t.nonce||void 0),e.state=t.state,e.client_info)this.authCodeRequest.clientInfo=e.client_info;else{const e=this.createCcsCredentials(t);e&&(this.authCodeRequest.ccsCredential=e)}return await Nn(this.authModule.acquireToken.bind(this.authModule),yi,this.logger,this.performanceClient,t.correlationId)(this.authCodeRequest,e)}createCcsCredentials(e){return e.account?{credential:e.account.homeAccountId,type:qn}:e.loginHint?{credential:e.loginHint,type:Xn}:null}}function Zs(e,t,i){const n=at(e);if(!n)throw ot(e)?(i.error(`A ${t} is present in the iframe but it does not contain known properties. It's likely that the ${t} has been replaced by code running on the redirectUri page.`),i.errorPii(`The ${t} detected is: ${e}`),(0,Ji.bD)(en.Lm)):(i.error(`The request has returned to the redirectUri but a ${t} is not present. It's likely that the ${t} has been removed or the page has been redirected by code running on the redirectUri page.`),(0,Ji.bD)(en.wv));return n}class Qs extends Fs{constructor(e,t,i,n,s,r,o,a,l,c){super(e,t,i,n,s,r,o,l,c),this.unloadWindow=this.unloadWindow.bind(this),this.nativeStorage=a}acquireToken(e){try{const t={popupName:this.generatePopupName(e.scopes||s.aZ,e.authority||this.config.auth.authority),popupWindowAttributes:e.popupWindowAttributes||{},popupWindowParent:e.popupWindowParent??window};return this.config.system.asyncPopups?(this.logger.verbose("asyncPopups set to true, acquiring token"),this.acquireTokenPopupAsync(e,t)):(this.logger.verbose("asyncPopup set to false, opening popup before acquiring token"),t.popup=this.openSizedPopup("about:blank",t),this.acquireTokenPopupAsync(e,t))}catch(e){return Promise.reject(e)}}logout(e){try{this.logger.verbose("logoutPopup called");const t=this.initializeLogoutRequest(e),i={popupName:this.generateLogoutPopupName(t),popupWindowAttributes:e?.popupWindowAttributes||{},popupWindowParent:e?.popupWindowParent??window},n=e&&e.authority,s=e&&e.mainWindowRedirectUri;return this.config.system.asyncPopups?(this.logger.verbose("asyncPopups set to true"),this.logoutPopupAsync(t,i,n,s)):(this.logger.verbose("asyncPopup set to false, opening popup"),i.popup=this.openSizedPopup("about:blank",i),this.logoutPopupAsync(t,i,n,s))}catch(e){return Promise.reject(e)}}async acquireTokenPopupAsync(e,t){this.logger.verbose("acquireTokenPopupAsync called");const i=this.initializeServerTelemetryManager(Zi.sA.acquireTokenPopup),n=await Nn(this.initializeAuthorizationRequest.bind(this),ui,this.logger,this.performanceClient,this.correlationId)(e,Zi.X8.Popup);ls(n.authority);try{const s=await Nn(this.initializeAuthorizationCodeRequest.bind(this),pi,this.logger,this.performanceClient,this.correlationId)(n),r=await Nn(this.createAuthCodeClient.bind(this),hi,this.logger,this.performanceClient,this.correlationId)({serverTelemetryManager:i,requestAuthority:n.authority,requestAzureCloudOptions:n.azureCloudOptions,requestExtraQueryParameters:n.extraQueryParameters,account:n.account}),o=qs.isNativeAvailable(this.config,this.logger,this.nativeMessageHandler,e.authenticationScheme);let a;o&&(a=this.performanceClient.startMeasurement(Ut,e.correlationId));const l=await r.getAuthCodeUrl({...n,nativeBroker:o}),c=new Xs(r,this.browserStorage,s,this.logger,this.performanceClient),h=this.initiateAuthRequest(l,t);this.eventHandler.emitEvent(cs.B.POPUP_OPENED,Zi.X8.Popup,{popupWindow:h},null);const d=await this.monitorPopupForHash(h,t.popupWindowParent),u=Pn(Zs,Mi,this.logger,this.performanceClient,this.correlationId)(d,this.config.auth.OIDCOptions.serverResponseType,this.logger);if(us.removeThrottle(this.browserStorage,this.config.auth.clientId,s),u.accountId){if(this.logger.verbose("Account id found in hash, calling WAM for token"),a&&a.end({success:!0,isNativeBroker:!0}),!this.nativeMessageHandler)throw(0,Ji.bD)(en.XC);const e=new Ys(this.config,this.browserStorage,this.browserCrypto,this.logger,this.eventHandler,this.navigationClient,Zi.sA.acquireTokenPopup,this.performanceClient,this.nativeMessageHandler,u.accountId,this.nativeStorage,n.correlationId),{userRequestState:t}=Yn.parseRequestState(this.browserCrypto,n.state);return await e.acquireToken({...n,state:t,prompt:void 0})}return await c.handleCodeResponse(u,n)}catch(e){throw t.popup?.close(),e instanceof l.lR&&(e.setCorrelationId(this.correlationId),i.cacheFailedRequest(e)),e}}async logoutPopupAsync(e,t,i,n){this.logger.verbose("logoutPopupAsync called"),this.eventHandler.emitEvent(cs.B.LOGOUT_START,Zi.X8.Popup,e);const s=this.initializeServerTelemetryManager(Zi.sA.logoutPopup);try{await this.clearCacheOnLogout(e.account);const r=await Nn(this.createAuthCodeClient.bind(this),hi,this.logger,this.performanceClient,this.correlationId)({serverTelemetryManager:s,requestAuthority:i,account:e.account||void 0});try{r.authority.endSessionEndpoint}catch{if(e.account?.homeAccountId&&e.postLogoutRedirectUri&&r.authority.protocolMode===o){if(this.browserStorage.removeAccount(e.account?.homeAccountId),this.eventHandler.emitEvent(cs.B.LOGOUT_SUCCESS,Zi.X8.Popup,e),n){const e={apiId:Zi.sA.logoutPopup,timeout:this.config.system.redirectNavigationTimeout,noHistory:!1},t=lt.getAbsoluteUrl(n,ns());await this.navigationClient.navigateInternal(t,e)}return void t.popup?.close()}}const a=r.getLogoutUri(e);this.eventHandler.emitEvent(cs.B.LOGOUT_SUCCESS,Zi.X8.Popup,e);const l=this.openPopup(a,t);if(this.eventHandler.emitEvent(cs.B.POPUP_OPENED,Zi.X8.Popup,{popupWindow:l},null),await this.monitorPopupForHash(l,t.popupWindowParent).catch(()=>{}),n){const e={apiId:Zi.sA.logoutPopup,timeout:this.config.system.redirectNavigationTimeout,noHistory:!1},t=lt.getAbsoluteUrl(n,ns());this.logger.verbose("Redirecting main window to url specified in the request"),this.logger.verbosePii(`Redirecting main window to: ${t}`),await this.navigationClient.navigateInternal(t,e)}else this.logger.verbose("No main window navigation requested")}catch(e){throw t.popup?.close(),e instanceof l.lR&&(e.setCorrelationId(this.correlationId),s.cacheFailedRequest(e)),this.browserStorage.setInteractionInProgress(!1),this.eventHandler.emitEvent(cs.B.LOGOUT_FAILURE,Zi.X8.Popup,null,e),this.eventHandler.emitEvent(cs.B.LOGOUT_END,Zi.X8.Popup),e}this.eventHandler.emitEvent(cs.B.LOGOUT_END,Zi.X8.Popup)}initiateAuthRequest(e,t){if(e)return this.logger.infoPii(`Navigate to: ${e}`),this.openPopup(e,t);throw this.logger.error("Navigate url is empty"),(0,Ji.bD)(en.B2)}monitorPopupForHash(e,t){return new Promise((t,i)=>{this.logger.verbose("PopupHandler.monitorPopupForHash - polling started");const n=setInterval(()=>{if(e.closed)return this.logger.error("PopupHandler.monitorPopupForHash - window closed"),clearInterval(n),void i((0,Ji.bD)(en.fN));let r="";try{r=e.location.href}catch(e){}if(!r||"about:blank"===r)return;clearInterval(n);let o="";const a=this.config.auth.OIDCOptions.serverResponseType;e&&(o=a===s.zL.QUERY?e.location.search:e.location.hash),this.logger.verbose("PopupHandler.monitorPopupForHash - popup window is on same origin as caller"),t(o)},this.config.system.pollIntervalMilliseconds)}).finally(()=>{this.cleanPopup(e,t)})}openPopup(e,t){try{let i;if(t.popup?(i=t.popup,this.logger.verbosePii(`Navigating popup window to: ${e}`),i.location.assign(e)):void 0===t.popup&&(this.logger.verbosePii(`Opening popup window to: ${e}`),i=this.openSizedPopup(e,t)),!i)throw(0,Ji.bD)(en.MP);return i.focus&&i.focus(),this.currentWindow=i,t.popupWindowParent.addEventListener("beforeunload",this.unloadWindow),i}catch(e){throw this.logger.error("error opening popup "+e.message),this.browserStorage.setInteractionInProgress(!1),(0,Ji.bD)(en.hs)}}openSizedPopup(e,{popupName:t,popupWindowAttributes:i,popupWindowParent:n}){const s=n.screenLeft?n.screenLeft:n.screenX,r=n.screenTop?n.screenTop:n.screenY,o=n.innerWidth||document.documentElement.clientWidth||document.body.clientWidth,a=n.innerHeight||document.documentElement.clientHeight||document.body.clientHeight;let l=i.popupSize?.width,c=i.popupSize?.height,h=i.popupPosition?.top,d=i.popupPosition?.left;return(!l||l<0||l>o)&&(this.logger.verbose("Default popup window width used. Window width not configured or invalid."),l=Zi.Q1.POPUP_WIDTH),(!c||c<0||c>a)&&(this.logger.verbose("Default popup window height used. Window height not configured or invalid."),c=Zi.Q1.POPUP_HEIGHT),(!h||h<0||h>a)&&(this.logger.verbose("Default popup window top position used. Window top not configured or invalid."),h=Math.max(0,a/2-Zi.Q1.POPUP_HEIGHT/2+r)),(!d||d<0||d>o)&&(this.logger.verbose("Default popup window left position used. Window left not configured or invalid."),d=Math.max(0,o/2-Zi.Q1.POPUP_WIDTH/2+s)),n.open(e,t,`width=${l}, height=${c}, top=${h}, left=${d}, scrollbars=yes`)}unloadWindow(e){this.browserStorage.cleanRequestByInteractionType(Zi.X8.Popup),this.currentWindow&&this.currentWindow.close(),e.preventDefault()}cleanPopup(e,t){e.close(),t.removeEventListener("beforeunload",this.unloadWindow),this.browserStorage.setInteractionInProgress(!1)}generatePopupName(e,t){return`${Zi.Q1.POPUP_NAME_PREFIX}.${this.config.auth.clientId}.${e.join("-")}.${t}.${this.correlationId}`}generateLogoutPopupName(e){const t=e.account&&e.account.homeAccountId;return`${Zi.Q1.POPUP_NAME_PREFIX}.${this.config.auth.clientId}.${t}.${this.correlationId}`}}class Js{constructor(e,t,i,n,s){this.authModule=e,this.browserStorage=t,this.authCodeRequest=i,this.logger=n,this.performanceClient=s}async initiateAuthRequest(e,t){if(this.logger.verbose("RedirectHandler.initiateAuthRequest called"),e){t.redirectStartPage&&(this.logger.verbose("RedirectHandler.initiateAuthRequest: redirectStartPage set, caching start page"),this.browserStorage.setTemporaryCache(Zi._p.ORIGIN_URI,t.redirectStartPage,!0)),this.browserStorage.setTemporaryCache(Zi._p.CORRELATION_ID,this.authCodeRequest.correlationId,!0),this.browserStorage.cacheCodeRequest(this.authCodeRequest),this.logger.infoPii(`RedirectHandler.initiateAuthRequest: Navigate to: ${e}`);const i={apiId:Zi.sA.acquireTokenRedirect,timeout:t.redirectTimeout,noHistory:!1};return"function"==typeof t.onRedirectNavigate?(this.logger.verbose("RedirectHandler.initiateAuthRequest: Invoking onRedirectNavigate callback"),!1!==t.onRedirectNavigate(e)?(this.logger.verbose("RedirectHandler.initiateAuthRequest: onRedirectNavigate did not return false, navigating"),void await t.navigationClient.navigateExternal(e,i)):void this.logger.verbose("RedirectHandler.initiateAuthRequest: onRedirectNavigate returned false, stopping navigation")):(this.logger.verbose("RedirectHandler.initiateAuthRequest: Navigating window to navigate url"),void await t.navigationClient.navigateExternal(e,i))}throw this.logger.info("RedirectHandler.initiateAuthRequest: Navigate url is empty"),(0,Ji.bD)(en.B2)}async handleCodeResponse(e,t){this.logger.verbose("RedirectHandler.handleCodeResponse called"),this.browserStorage.setInteractionInProgress(!1);const i=this.browserStorage.generateStateKey(t),n=this.browserStorage.getTemporaryCache(i);if(!n)throw te(C,"Cached State");let s;try{s=this.authModule.handleFragmentResponse(e,n)}catch(e){throw e instanceof ds&&e.subError===en.fN?(0,Ji.bD)(en.fN):e}const r=this.browserStorage.generateNonceKey(n),o=this.browserStorage.getTemporaryCache(r);if(this.authCodeRequest.code=s.code,s.cloud_instance_host_name&&await Nn(this.authModule.updateAuthority.bind(this.authModule),vi,this.logger,this.performanceClient,this.authCodeRequest.correlationId)(s.cloud_instance_host_name,this.authCodeRequest.correlationId),s.nonce=o||void 0,s.state=n,s.client_info)this.authCodeRequest.clientInfo=s.client_info;else{const e=this.checkCcsCredentials();e&&(this.authCodeRequest.ccsCredential=e)}const a=await this.authModule.acquireToken(this.authCodeRequest,s);return this.browserStorage.cleanRequestByState(t),a}checkCcsCredentials(){const e=this.browserStorage.getTemporaryCache(Zi._p.CCS_CREDENTIAL,!0);if(e)try{return JSON.parse(e)}catch(t){this.authModule.logger.error("Cache credential could not be parsed"),this.authModule.logger.errorPii(`Cache credential could not be parsed: ${e}`)}return null}}class er extends Fs{constructor(e,t,i,n,s,r,o,a,l,c){super(e,t,i,n,s,r,o,l,c),this.nativeStorage=a}async acquireToken(e){const t=await Nn(this.initializeAuthorizationRequest.bind(this),ui,this.logger,this.performanceClient,this.correlationId)(e,Zi.X8.Redirect);this.browserStorage.updateCacheEntries(t.state,t.nonce,t.authority,t.loginHint||"",t.account||null);const i=this.initializeServerTelemetryManager(Zi.sA.acquireTokenRedirect),n=e=>{e.persisted&&(this.logger.verbose("Page was restored from back/forward cache. Clearing temporary cache."),this.browserStorage.cleanRequestByState(t.state),this.eventHandler.emitEvent(cs.B.RESTORE_FROM_BFCACHE,Zi.X8.Redirect))};try{const s=await Nn(this.initializeAuthorizationCodeRequest.bind(this),pi,this.logger,this.performanceClient,this.correlationId)(t),r=await Nn(this.createAuthCodeClient.bind(this),hi,this.logger,this.performanceClient,this.correlationId)({serverTelemetryManager:i,requestAuthority:t.authority,requestAzureCloudOptions:t.azureCloudOptions,requestExtraQueryParameters:t.extraQueryParameters,account:t.account}),o=new Js(r,this.browserStorage,s,this.logger,this.performanceClient),a=await r.getAuthCodeUrl({...t,nativeBroker:qs.isNativeAvailable(this.config,this.logger,this.nativeMessageHandler,e.authenticationScheme)}),l=this.getRedirectStartPage(e.redirectStartPage);return this.logger.verbosePii(`Redirect start page: ${l}`),window.addEventListener("pageshow",n),await o.initiateAuthRequest(a,{navigationClient:this.navigationClient,redirectTimeout:this.config.system.redirectNavigationTimeout,redirectStartPage:l,onRedirectNavigate:e.onRedirectNavigate||this.config.auth.onRedirectNavigate})}catch(e){throw e instanceof l.lR&&(e.setCorrelationId(this.correlationId),i.cacheFailedRequest(e)),window.removeEventListener("pageshow",n),this.browserStorage.cleanRequestByState(t.state),e}}async handleRedirectPromise(e="",t){const i=this.initializeServerTelemetryManager(Zi.sA.handleRedirectPromise);try{if(!this.browserStorage.isInteractionInProgress(!0))return this.logger.info("handleRedirectPromise called but there is no interaction in progress, returning null."),null;const[n,r]=this.getRedirectResponse(e||"");if(!n)return this.logger.info("handleRedirectPromise did not detect a response as a result of a redirect. Cleaning temporary cache."),this.browserStorage.cleanRequestByInteractionType(Zi.X8.Redirect),"back_forward"!==function(){if("undefined"==typeof window||void 0===window.performance||"function"!=typeof window.performance.getEntriesByType)return;const e=window.performance.getEntriesByType("navigation"),t=e.length?e[0]:void 0;return t?.type}()?t.event.errorCode="no_server_response":this.logger.verbose("Back navigation event detected. Muting no_server_response error"),null;const o=this.browserStorage.getTemporaryCache(Zi._p.ORIGIN_URI,!0)||s.YM.EMPTY_STRING;if(lt.removeHashFromUrl(o)===lt.removeHashFromUrl(window.location.href)&&this.config.auth.navigateToLoginRequestUrl)return this.logger.verbose("Current page is loginRequestUrl, handling response"),o.indexOf("#")>-1&&function(e){const t=e.split("#");t.shift(),window.location.hash=t.length>0?t.join("#"):""}(o),await this.handleResponse(n,i);if(!this.config.auth.navigateToLoginRequestUrl)return this.logger.verbose("NavigateToLoginRequestUrl set to false, handling response"),await this.handleResponse(n,i);if(!is()||this.config.system.allowRedirectInIframe){this.browserStorage.setTemporaryCache(Zi._p.URL_HASH,r,!0);const e={apiId:Zi.sA.handleRedirectPromise,timeout:this.config.system.redirectNavigationTimeout,noHistory:!0};let t=!0;if(o&&"null"!==o)this.logger.verbose(`Navigating to loginRequestUrl: ${o}`),t=await this.navigationClient.navigateInternal(o,e);else{const i=function(){const e=new lt(window.location.href).getUrlComponents();return`${e.Protocol}//${e.HostNameAndPort}/`}();this.browserStorage.setTemporaryCache(Zi._p.ORIGIN_URI,i,!0),this.logger.warning("Unable to get valid login request url from cache, redirecting to home page"),t=await this.navigationClient.navigateInternal(i,e)}if(!t)return await this.handleResponse(n,i)}return null}catch(e){throw e instanceof l.lR&&(e.setCorrelationId(this.correlationId),i.cacheFailedRequest(e)),this.browserStorage.cleanRequestByInteractionType(Zi.X8.Redirect),e}}getRedirectResponse(e){this.logger.verbose("getRedirectResponseHash called");let t=e;t||(t=this.config.auth.OIDCOptions.serverResponseType===s.zL.QUERY?window.location.search:window.location.hash);let i=at(t);if(i){try{!function(e,t,i){if(!e.state)throw(0,Ji.bD)(en.c$);const n=es(t,e.state);if(!n)throw(0,Ji.bD)(en.fA);if(n.interactionType!==i)throw(0,Ji.bD)(en.oe)}(i,this.browserCrypto,Zi.X8.Redirect)}catch(e){return e instanceof l.lR&&this.logger.error(`Interaction type validation failed due to ${e.errorCode}: ${e.errorMessage}`),[null,""]}return(n=window).location.hash="","function"==typeof n.history.replaceState&&n.history.replaceState(null,"",`${n.location.origin}${n.location.pathname}${n.location.search}`),this.logger.verbose("Hash contains known properties, returning response hash"),[i,t]}var n;const r=this.browserStorage.getTemporaryCache(Zi._p.URL_HASH,!0);return this.browserStorage.removeItem(this.browserStorage.generateCacheKey(Zi._p.URL_HASH)),r&&(i=at(r),i)?(this.logger.verbose("Hash does not contain known properties, returning cached hash"),[i,r]):[null,""]}async handleResponse(e,t){const i=e.state;if(!i)throw(0,Ji.bD)(en.c$);const n=this.browserStorage.getCachedRequest(i);if(this.logger.verbose("handleResponse called, retrieved cached request"),e.accountId){if(this.logger.verbose("Account id found in hash, calling WAM for token"),!this.nativeMessageHandler)throw(0,Ji.bD)(en.XC);const t=new Ys(this.config,this.browserStorage,this.browserCrypto,this.logger,this.eventHandler,this.navigationClient,Zi.sA.acquireTokenPopup,this.performanceClient,this.nativeMessageHandler,e.accountId,this.nativeStorage,n.correlationId),{userRequestState:s}=Yn.parseRequestState(this.browserCrypto,i);return t.acquireToken({...n,state:s,prompt:void 0}).finally(()=>{this.browserStorage.cleanRequestByState(i)})}const s=this.browserStorage.getCachedAuthority(i);if(!s)throw(0,Ji.bD)(en.Ne);const r=await Nn(this.createAuthCodeClient.bind(this),hi,this.logger,this.performanceClient,this.correlationId)({serverTelemetryManager:t,requestAuthority:s});return us.removeThrottle(this.browserStorage,this.config.auth.clientId,n),new Js(r,this.browserStorage,n,this.logger,this.performanceClient).handleCodeResponse(e,i)}async logout(e){this.logger.verbose("logoutRedirect called");const t=this.initializeLogoutRequest(e),i=this.initializeServerTelemetryManager(Zi.sA.logout);try{this.eventHandler.emitEvent(cs.B.LOGOUT_START,Zi.X8.Redirect,e),await this.clearCacheOnLogout(t.account);const n={apiId:Zi.sA.logout,timeout:this.config.system.redirectNavigationTimeout,noHistory:!1},s=await Nn(this.createAuthCodeClient.bind(this),hi,this.logger,this.performanceClient,this.correlationId)({serverTelemetryManager:i,requestAuthority:e&&e.authority,requestExtraQueryParameters:e?.extraQueryParameters,account:e&&e.account||void 0});if(s.authority.protocolMode===o)try{s.authority.endSessionEndpoint}catch{if(t.account?.homeAccountId)return this.browserStorage.removeAccount(t.account?.homeAccountId),void this.eventHandler.emitEvent(cs.B.LOGOUT_SUCCESS,Zi.X8.Redirect,t)}const r=s.getLogoutUri(t);if(this.eventHandler.emitEvent(cs.B.LOGOUT_SUCCESS,Zi.X8.Redirect,t),!e||"function"!=typeof e.onRedirectNavigate)return this.browserStorage.getInteractionInProgress()||this.browserStorage.setInteractionInProgress(!0),void await this.navigationClient.navigateExternal(r,n);if(!1!==e.onRedirectNavigate(r))return this.logger.verbose("Logout onRedirectNavigate did not return false, navigating"),this.browserStorage.getInteractionInProgress()||this.browserStorage.setInteractionInProgress(!0),void await this.navigationClient.navigateExternal(r,n);this.browserStorage.setInteractionInProgress(!1),this.logger.verbose("Logout onRedirectNavigate returned false, stopping navigation")}catch(e){throw e instanceof l.lR&&(e.setCorrelationId(this.correlationId),i.cacheFailedRequest(e)),this.eventHandler.emitEvent(cs.B.LOGOUT_FAILURE,Zi.X8.Redirect,null,e),this.eventHandler.emitEvent(cs.B.LOGOUT_END,Zi.X8.Redirect),e}this.eventHandler.emitEvent(cs.B.LOGOUT_END,Zi.X8.Redirect)}getRedirectStartPage(e){const t=e||window.location.href;return lt.getAbsoluteUrl(t,ns())}}async function tr(e,t,i,n,s){if(t.addQueueMeasurement(oi,n),!e)throw i.info("Navigate url is empty"),(0,Ji.bD)(en.B2);return s?Nn(nr,li,i,t,n)(e,s,t,n):Pn(sr,ci,i,t,n)(e)}async function ir(e,t,i,n,r,o,a){return n.addQueueMeasurement(ai,o),new Promise((n,o)=>{t<1e4&&r.warning(`system.loadFrameTimeout or system.iframeHashTimeout set to lower (${t}ms) than the default (10000ms). This may result in timeouts.`);const l=window.setTimeout(()=>{window.clearInterval(c),o((0,Ji.bD)(en.Uf))},t),c=window.setInterval(()=>{let t="";const i=e.contentWindow;try{t=i?i.location.href:""}catch(e){}if(!t||"about:blank"===t)return;let r="";i&&(r=a===s.zL.QUERY?i.location.search:i.location.hash),window.clearTimeout(l),window.clearInterval(c),n(r)},i)}).finally(()=>{Pn(or,Bi,r,n,o)(e)})}function nr(e,t,i,n){return i.addQueueMeasurement(li,n),new Promise((i,n)=>{const s=rr();window.setTimeout(()=>{s?(s.src=e,i(s)):n("Unable to load iframe")},t)})}function sr(e){const t=rr();return t.src=e,t}function rr(){const e=document.createElement("iframe");return e.className="msalSilentIframe",e.style.visibility="hidden",e.style.position="absolute",e.style.width=e.style.height="0",e.style.border="0",e.setAttribute("sandbox","allow-scripts allow-same-origin allow-forms"),document.body.appendChild(e),e}function or(e){document.body===e.parentNode&&document.body.removeChild(e)}class ar extends Fs{constructor(e,t,i,n,s,r,o,a,l,c,h){super(e,t,i,n,s,r,a,c,h),this.apiId=o,this.nativeStorage=l}async acquireToken(e){this.performanceClient.addQueueMeasurement(Vt,e.correlationId),e.loginHint||e.sid||e.account&&e.account.username||this.logger.warning("No user hint provided. The authorization server may need more information to complete this request.");const t={...e};t.prompt?t.prompt!==s._M.NONE&&t.prompt!==s._M.NO_SESSION&&(this.logger.warning(`SilentIframeClient. Replacing invalid prompt ${t.prompt} with ${s._M.NONE}`),t.prompt=s._M.NONE):t.prompt=s._M.NONE;const i=await Nn(this.initializeAuthorizationRequest.bind(this),ui,this.logger,this.performanceClient,e.correlationId)(t,Zi.X8.Silent);ls(i.authority);const n=this.initializeServerTelemetryManager(this.apiId);let r;try{return r=await Nn(this.createAuthCodeClient.bind(this),hi,this.logger,this.performanceClient,e.correlationId)({serverTelemetryManager:n,requestAuthority:i.authority,requestAzureCloudOptions:i.azureCloudOptions,requestExtraQueryParameters:i.extraQueryParameters,account:i.account}),await Nn(this.silentTokenHelper.bind(this),ri,this.logger,this.performanceClient,e.correlationId)(r,i)}catch(i){if(i instanceof l.lR&&(i.setCorrelationId(this.correlationId),n.cacheFailedRequest(i)),!(r&&i instanceof l.lR&&i.errorCode===Zi.Q1.INVALID_GRANT_ERROR))throw i;this.performanceClient.addFields({retryError:i.errorCode},this.correlationId);const s=await Nn(this.initializeAuthorizationRequest.bind(this),ui,this.logger,this.performanceClient,e.correlationId)(t,Zi.X8.Silent);return await Nn(this.silentTokenHelper.bind(this),ri,this.logger,this.performanceClient,this.correlationId)(r,s)}}logout(){return Promise.reject((0,Ji.bD)(en.v7))}async silentTokenHelper(e,t){const i=t.correlationId;this.performanceClient.addQueueMeasurement(ri,i);const n=await Nn(this.initializeAuthorizationCodeRequest.bind(this),pi,this.logger,this.performanceClient,i)(t),r=await Nn(e.getAuthCodeUrl.bind(e),gi,this.logger,this.performanceClient,i)({...t,nativeBroker:qs.isNativeAvailable(this.config,this.logger,this.nativeMessageHandler,t.authenticationScheme)}),o=new Xs(e,this.browserStorage,n,this.logger,this.performanceClient),a=await Nn(tr,oi,this.logger,this.performanceClient,i)(r,this.performanceClient,this.logger,i,this.config.system.navigateFrameWait),l=this.config.auth.OIDCOptions.serverResponseType,c=await Nn(ir,ai,this.logger,this.performanceClient,i)(a,this.config.system.iframeHashTimeout,this.config.system.pollIntervalMilliseconds,this.performanceClient,this.logger,i,l),h=Pn(Zs,Mi,this.logger,this.performanceClient,this.correlationId)(c,l,this.logger);if(h.accountId){if(this.logger.verbose("Account id found in hash, calling WAM for token"),!this.nativeMessageHandler)throw(0,Ji.bD)(en.XC);const e=new Ys(this.config,this.browserStorage,this.browserCrypto,this.logger,this.eventHandler,this.navigationClient,this.apiId,this.performanceClient,this.nativeMessageHandler,h.accountId,this.browserStorage,i),{userRequestState:n}=Yn.parseRequestState(this.browserCrypto,t.state);return Nn(e.acquireToken.bind(e),Wt,this.logger,this.performanceClient,i)({...t,state:n,prompt:t.prompt||s._M.NONE})}return Nn(o.handleCodeResponse.bind(o),mi,this.logger,this.performanceClient,i)(h,t)}}class lr extends Fs{async acquireToken(e){this.performanceClient.addQueueMeasurement(Bt,e.correlationId);const t=await Nn(Os,ii,this.logger,this.performanceClient,e.correlationId)(e,this.config,this.performanceClient,this.logger),i={...e,...t};e.redirectUri&&(i.redirectUri=this.getRedirectUri(e.redirectUri));const n=this.initializeServerTelemetryManager(Zi.sA.acquireTokenSilent_silentFlow),s=await this.createRefreshTokenClient({serverTelemetryManager:n,authorityUrl:i.authority,azureCloudOptions:i.azureCloudOptions,account:i.account});return Nn(s.acquireTokenByRefreshToken.bind(s),Xt,this.logger,this.performanceClient,e.correlationId)(i).catch(e=>{throw e.setCorrelationId(this.correlationId),n.cacheFailedRequest(e),e})}logout(){return Promise.reject((0,Ji.bD)(en.v7))}async createRefreshTokenClient(e){const t=await Nn(this.getClientConfiguration.bind(this),di,this.logger,this.performanceClient,this.correlationId)({serverTelemetryManager:e.serverTelemetryManager,requestAuthority:e.authorityUrl,requestAzureCloudOptions:e.azureCloudOptions,requestExtraQueryParameters:e.extraQueryParameters,account:e.account});return new Ws(t,this.performanceClient)}}class cr{constructor(e,t,i,n){this.isBrowserEnvironment="undefined"!=typeof window,this.config=e,this.storage=t,this.logger=i,this.cryptoObj=n}loadExternalTokens(e,t,i){if(!this.isBrowserEnvironment)throw(0,Ji.bD)(en.tI);const n=t.id_token?re(t.id_token,mn):void 0,s={protocolMode:this.config.auth.protocolMode,knownAuthorities:this.config.auth.knownAuthorities,cloudDiscoveryMetadata:this.config.auth.cloudDiscoveryMetadata,authorityMetadata:this.config.auth.authorityMetadata,skipAuthorityMetadataCache:this.config.auth.skipAuthorityMetadataCache},r=e.authority?new _n(_n.generateAuthority(e.authority,e.azureCloudOptions),this.config.system.networkClient,this.storage,s,this.logger,e.correlationId||Mn()):void 0,o=this.loadAccount(e,i.clientInfo||t.client_info||"",n,r),a=this.loadIdToken(t,o.homeAccountId,o.environment,o.realm),l=this.loadAccessToken(e,t,o.homeAccountId,o.environment,o.realm,i),c=this.loadRefreshToken(t,o.homeAccountId,o.environment);return this.generateAuthenticationResult(e,{account:o,idToken:a,accessToken:l,refreshToken:c},n,r)}loadAccount(e,t,i,n){if(this.logger.verbose("TokenCache - loading account"),e.account){const t=rt.createFromAccountInfo(e.account);return this.storage.setAccount(t),t}if(!n||!t&&!i)throw this.logger.error("TokenCache - if an account is not provided on the request, authority and either clientInfo or idToken must be provided instead."),(0,Ji.bD)(en.s9);const s=rt.generateHomeAccountId(t,n.authorityType,this.logger,this.cryptoObj,i),r=i?.tid,o=Ts(this.storage,n,s,mn,i,t,n.hostnameAndPort,r,void 0,void 0,this.logger);return this.storage.setAccount(o),o}loadIdToken(e,t,i,n){if(!e.id_token)return this.logger.verbose("TokenCache - no id token found in response"),null;this.logger.verbose("TokenCache - loading id token");const s=he(t,i,e.id_token,this.config.auth.clientId,n);return this.storage.setIdTokenCredential(s),s}loadAccessToken(e,t,i,n,s,r){if(!t.access_token)return this.logger.verbose("TokenCache - no access token found in response"),null;if(!t.expires_in)return this.logger.error("TokenCache - no expiration set on the access token. Cannot add it to the cache."),null;if(!(t.scope||e.scopes&&e.scopes.length))return this.logger.error("TokenCache - scopes not specified in the request or response. Cannot add token to the cache."),null;this.logger.verbose("TokenCache - loading access token");const o=t.scope?Qe.fromString(t.scope):new Qe(e.scopes),a=r.expiresOn||t.expires_in+(new Date).getTime()/1e3,l=r.extendedExpiresOn||(t.ext_expires_in||t.expires_in)+(new Date).getTime()/1e3,c=de(i,n,t.access_token,this.config.auth.clientId,s,o.printScopes(),a,l,mn);return this.storage.setAccessTokenCredential(c),c}loadRefreshToken(e,t,i){if(!e.refresh_token)return this.logger.verbose("TokenCache - no refresh token found in response"),null;this.logger.verbose("TokenCache - loading refresh token");const n=ue(t,i,e.refresh_token,this.config.auth.clientId,e.foci,void 0,e.refresh_token_expires_in);return this.storage.setRefreshTokenCredential(n),n}generateAuthenticationResult(e,t,i,n){let s,r="",o=[],a=null;t?.accessToken&&(r=t.accessToken.secret,o=Qe.fromString(t.accessToken.target).asArray(),a=new Date(1e3*Number(t.accessToken.expiresOn)),s=new Date(1e3*Number(t.accessToken.extendedExpiresOn)));const l=t.account;return{authority:n?n.canonicalAuthority:"",uniqueId:t.account.localAccountId,tenantId:t.account.realm,scopes:o,account:l.getAccountInfo(),idToken:t.idToken?.secret||"",idTokenClaims:i||{},accessToken:r,fromCache:!0,expiresOn:a,correlationId:e.correlationId||"",requestId:"",extExpiresOn:s,familyId:t.refreshToken?.familyId||"",tokenType:t?.accessToken?.tokenType||"",state:e.state||"",cloudGraphHostName:l.cloudGraphHostName||"",msGraphHost:l.msGraphHost||"",fromNativeBroker:!1}}}class hr extends Is{constructor(e){super(e),this.includeRedirectUri=!1}}class dr extends Fs{constructor(e,t,i,n,s,r,o,a,l,c){super(e,t,i,n,s,r,a,l,c),this.apiId=o}async acquireToken(e){if(!e.code)throw(0,Ji.bD)(en.R3);const t=await Nn(this.initializeAuthorizationRequest.bind(this),ui,this.logger,this.performanceClient,e.correlationId)(e,Zi.X8.Silent),i=this.initializeServerTelemetryManager(this.apiId);try{const n={...t,code:e.code},s=await Nn(this.getClientConfiguration.bind(this),di,this.logger,this.performanceClient,e.correlationId)({serverTelemetryManager:i,requestAuthority:t.authority,requestAzureCloudOptions:t.azureCloudOptions,requestExtraQueryParameters:t.extraQueryParameters,account:t.account}),r=new hr(s);this.logger.verbose("Auth code client created");const o=new Xs(r,this.browserStorage,n,this.logger,this.performanceClient);return await Nn(o.handleCodeResponseFromServer.bind(o),fi,this.logger,this.performanceClient,e.correlationId)({code:e.code,msgraph_host:e.msGraphHost,cloud_graph_host_name:e.cloudGraphHostName,cloud_instance_host_name:e.cloudInstanceHostName},t,!1)}catch(e){throw e instanceof l.lR&&(e.setCorrelationId(this.correlationId),i.cacheFailedRequest(e)),e}}logout(){return Promise.reject((0,Ji.bD)(en.v7))}}function ur(e){const t=e?.idTokenClaims;return t?.tfp||t?.acr?"B2C":t?.tid?"9188040d-6c67-4c5b-b112-36a304b66dad"===t?.tid?"MSA":"AAD":void 0}function pr(e,t){try{os(e)}catch(e){throw t.end({success:!1},e),e}}class gr{constructor(e){this.operatingContext=e,this.isBrowserEnvironment=this.operatingContext.isBrowserEnvironment(),this.config=e.getConfig(),this.initialized=!1,this.logger=this.operatingContext.getLogger(),this.networkClient=this.config.system.networkClient,this.navigationClient=this.config.system.navigationClient,this.redirectResponse=new Map,this.hybridAuthCodeResponses=new Map,this.performanceClient=this.config.telemetry.client,this.browserCrypto=this.isBrowserEnvironment?new Ln(this.logger,this.performanceClient):ie,this.eventHandler=new hs(this.logger),this.browserStorage=this.isBrowserEnvironment?new ts(this.config.auth.clientId,this.config.cache,this.browserCrypto,this.logger,function(e){const t=e.cloudDiscoveryMetadata;let i;if(t)try{i=JSON.parse(t)}catch(e){throw Xe(Ge)}return{canonicalAuthority:e.authority?Fn(e.authority):void 0,knownAuthorities:e.knownAuthorities,cloudDiscoveryMetadata:i}}(this.config.auth),this.performanceClient):((e,t)=>{const i={cacheLocation:Zi.Al.MemoryStorage,temporaryCacheLocation:Zi.Al.MemoryStorage,storeAuthStateInCookie:!1,secureCookies:!1,cacheMigrationEnabled:!1,claimsBasedCachingEnabled:!1};return new ts(e,i,ie,t)})(this.config.auth.clientId,this.logger);const t={cacheLocation:Zi.Al.MemoryStorage,temporaryCacheLocation:Zi.Al.MemoryStorage,storeAuthStateInCookie:!1,secureCookies:!1,cacheMigrationEnabled:!1,claimsBasedCachingEnabled:!1};this.nativeInternalStorage=new ts(this.config.auth.clientId,t,this.browserCrypto,this.logger,void 0,this.performanceClient),this.tokenCache=new cr(this.config,this.browserStorage,this.logger,this.browserCrypto),this.activeSilentTokenRequests=new Map,this.trackPageVisibility=this.trackPageVisibility.bind(this),this.trackPageVisibilityWithMeasurement=this.trackPageVisibilityWithMeasurement.bind(this),this.listeningToStorageEvents=!1,this.handleAccountCacheChange=this.handleAccountCacheChange.bind(this)}static async createController(e,t){const i=new gr(e);return await i.initialize(t),i}trackPageVisibility(e){e&&(this.logger.info("Perf: Visibility change detected"),this.performanceClient.incrementFields({visibilityChangeCount:1},e))}async initialize(e){if(this.logger.trace("initialize called"),this.initialized)return void this.logger.info("initialize has already been called, exiting early.");if(!this.isBrowserEnvironment)return this.logger.info("in non-browser environment, exiting early."),this.initialized=!0,void this.eventHandler.emitEvent(cs.B.INITIALIZE_END);const t=e?.correlationId||this.getRequestCorrelationId(),i=this.config.system.allowNativeBroker,n=this.performanceClient.startMeasurement(si,t);if(this.eventHandler.emitEvent(cs.B.INITIALIZE_START),i)try{this.nativeExtensionProvider=await qs.createProvider(this.logger,this.config.system.nativeBrokerHandshakeTimeout,this.performanceClient)}catch(e){this.logger.verbose(e)}this.config.cache.claimsBasedCachingEnabled||(this.logger.verbose("Claims-based caching is disabled. Clearing the previous cache with claims"),await Nn(this.browserStorage.clearTokensAndKeysWithClaims.bind(this.browserStorage),Hi,this.logger,this.performanceClient,t)(this.performanceClient,t)),this.initialized=!0,this.eventHandler.emitEvent(cs.B.INITIALIZE_END),n.end({allowNativeBroker:i,success:!0})}async handleRedirectPromise(e){if(this.logger.verbose("handleRedirectPromise called"),rs(this.initialized),this.isBrowserEnvironment){const t=e||"";let i=this.redirectResponse.get(t);return void 0===i?(i=this.handleRedirectPromiseInternal(e),this.redirectResponse.set(t,i),this.logger.verbose("handleRedirectPromise has been called for the first time, storing the promise")):this.logger.verbose("handleRedirectPromise has been called previously, returning the result from the first call"),i}return this.logger.verbose("handleRedirectPromise returns null, not browser environment"),null}async handleRedirectPromiseInternal(e){const t=this.getAllAccounts(),i=this.browserStorage.getCachedNativeRequest(),n=i&&qs.isNativeAvailable(this.config,this.logger,this.nativeExtensionProvider)&&this.nativeExtensionProvider&&!e,s=n?i?.correlationId:this.browserStorage.getTemporaryCache(Zi._p.CORRELATION_ID,!0)||"",r=this.performanceClient.startMeasurement(Ot,s);let o;if(this.eventHandler.emitEvent(cs.B.HANDLE_REDIRECT_START,Zi.X8.Redirect),n&&this.nativeExtensionProvider){this.logger.trace("handleRedirectPromise - acquiring token from native platform");const e=new Ys(this.config,this.browserStorage,this.browserCrypto,this.logger,this.eventHandler,this.navigationClient,Zi.sA.handleRedirectPromise,this.performanceClient,this.nativeExtensionProvider,i.accountId,this.nativeInternalStorage,i.correlationId);o=Nn(e.handleRedirectPromise.bind(e),Gi,this.logger,this.performanceClient,r.event.correlationId)(this.performanceClient,r.event.correlationId)}else{this.logger.trace("handleRedirectPromise - acquiring token from web flow");const t=this.createRedirectClient(s);o=Nn(t.handleRedirectPromise.bind(t),Fi,this.logger,this.performanceClient,r.event.correlationId)(e,r)}return o.then(e=>(e?(t.length<this.getAllAccounts().length?(this.eventHandler.emitEvent(cs.B.LOGIN_SUCCESS,Zi.X8.Redirect,e),this.logger.verbose("handleRedirectResponse returned result, login success")):(this.eventHandler.emitEvent(cs.B.ACQUIRE_TOKEN_SUCCESS,Zi.X8.Redirect,e),this.logger.verbose("handleRedirectResponse returned result, acquire token success")),r.end({success:!0,accountType:ur(e.account)})):r.event.errorCode?r.end({success:!1}):r.discard(),this.eventHandler.emitEvent(cs.B.HANDLE_REDIRECT_END,Zi.X8.Redirect),e)).catch(e=>{const i=e;throw t.length>0?this.eventHandler.emitEvent(cs.B.ACQUIRE_TOKEN_FAILURE,Zi.X8.Redirect,null,i):this.eventHandler.emitEvent(cs.B.LOGIN_FAILURE,Zi.X8.Redirect,null,i),this.eventHandler.emitEvent(cs.B.HANDLE_REDIRECT_END,Zi.X8.Redirect),r.end({success:!1},i),e})}async acquireTokenRedirect(e){const t=this.getRequestCorrelationId(e);this.logger.verbose("acquireTokenRedirect called",t);const i=this.performanceClient.startMeasurement("acquireTokenPreRedirect",t);i.add({accountType:ur(e.account),scenarioId:e.scenarioId});const n=e.onRedirectNavigate;if(n)e.onRedirectNavigate=e=>{const t="function"==typeof n?n(e):void 0;return!1!==t?i.end({success:!0}):i.discard(),t};else{const e=this.config.auth.onRedirectNavigate;this.config.auth.onRedirectNavigate=t=>{const n="function"==typeof e?e(t):void 0;return!1!==n?i.end({success:!0}):i.discard(),n}}const s=this.getAllAccounts().length>0;try{let n;return as(this.initialized,this.config),this.browserStorage.setInteractionInProgress(!0),s?this.eventHandler.emitEvent(cs.B.ACQUIRE_TOKEN_START,Zi.X8.Redirect,e):this.eventHandler.emitEvent(cs.B.LOGIN_START,Zi.X8.Redirect,e),n=this.nativeExtensionProvider&&this.canUseNative(e)?new Ys(this.config,this.browserStorage,this.browserCrypto,this.logger,this.eventHandler,this.navigationClient,Zi.sA.acquireTokenRedirect,this.performanceClient,this.nativeExtensionProvider,this.getNativeAccountId(e),this.nativeInternalStorage,t).acquireTokenRedirect(e,i).catch(i=>{if(i instanceof Hs&&zs(i))return this.nativeExtensionProvider=void 0,this.createRedirectClient(t).acquireToken(e);if(i instanceof jn)return this.logger.verbose("acquireTokenRedirect - Resolving interaction required error thrown by native broker by falling back to web flow"),this.createRedirectClient(t).acquireToken(e);throw this.browserStorage.setInteractionInProgress(!1),i}):this.createRedirectClient(t).acquireToken(e),await n}catch(e){throw i.end({success:!1},e),s?this.eventHandler.emitEvent(cs.B.ACQUIRE_TOKEN_FAILURE,Zi.X8.Redirect,null,e):this.eventHandler.emitEvent(cs.B.LOGIN_FAILURE,Zi.X8.Redirect,null,e),e}}acquireTokenPopup(e){const t=this.getRequestCorrelationId(e),i=this.performanceClient.startMeasurement(Nt,t);i.add({scenarioId:e.scenarioId,accountType:ur(e.account)});try{this.logger.verbose("acquireTokenPopup called",t),pr(this.initialized,i),this.browserStorage.setInteractionInProgress(!0)}catch(e){return Promise.reject(e)}const n=this.getAllAccounts();let s;return n.length>0?this.eventHandler.emitEvent(cs.B.ACQUIRE_TOKEN_START,Zi.X8.Popup,e):this.eventHandler.emitEvent(cs.B.LOGIN_START,Zi.X8.Popup,e),s=this.canUseNative(e)?this.acquireTokenNative({...e,correlationId:t},Zi.sA.acquireTokenPopup).then(e=>(this.browserStorage.setInteractionInProgress(!1),i.end({success:!0,isNativeBroker:!0,requestId:e.requestId,accountType:ur(e.account)}),e)).catch(i=>{if(i instanceof Hs&&zs(i))return this.nativeExtensionProvider=void 0,this.createPopupClient(t).acquireToken(e);if(i instanceof jn)return this.logger.verbose("acquireTokenPopup - Resolving interaction required error thrown by native broker by falling back to web flow"),this.createPopupClient(t).acquireToken(e);throw this.browserStorage.setInteractionInProgress(!1),i}):this.createPopupClient(t).acquireToken(e),s.then(e=>(n.length<this.getAllAccounts().length?this.eventHandler.emitEvent(cs.B.LOGIN_SUCCESS,Zi.X8.Popup,e):this.eventHandler.emitEvent(cs.B.ACQUIRE_TOKEN_SUCCESS,Zi.X8.Popup,e),i.end({success:!0,requestId:e.requestId,accessTokenSize:e.accessToken.length,idTokenSize:e.idToken.length,accountType:ur(e.account)}),e)).catch(e=>(n.length>0?this.eventHandler.emitEvent(cs.B.ACQUIRE_TOKEN_FAILURE,Zi.X8.Popup,null,e):this.eventHandler.emitEvent(cs.B.LOGIN_FAILURE,Zi.X8.Popup,null,e),i.end({success:!1},e),Promise.reject(e)))}trackPageVisibilityWithMeasurement(){const e=this.ssoSilentMeasurement||this.acquireTokenByCodeAsyncMeasurement;e&&(this.logger.info("Perf: Visibility change detected in ",e.event.name),e.increment({visibilityChangeCount:1}))}async ssoSilent(e){const t=this.getRequestCorrelationId(e),i={...e,prompt:e.prompt,correlationId:t};let n;return this.ssoSilentMeasurement=this.performanceClient.startMeasurement(Ht,t),this.ssoSilentMeasurement?.add({scenarioId:e.scenarioId,accountType:ur(e.account)}),pr(this.initialized,this.ssoSilentMeasurement),this.ssoSilentMeasurement?.increment({visibilityChangeCount:0}),document.addEventListener("visibilitychange",this.trackPageVisibilityWithMeasurement),this.logger.verbose("ssoSilent called",t),this.eventHandler.emitEvent(cs.B.SSO_SILENT_START,Zi.X8.Silent,i),n=this.canUseNative(i)?this.acquireTokenNative(i,Zi.sA.ssoSilent).catch(e=>{if(e instanceof Hs&&zs(e))return this.nativeExtensionProvider=void 0,this.createSilentIframeClient(i.correlationId).acquireToken(i);throw e}):this.createSilentIframeClient(i.correlationId).acquireToken(i),n.then(e=>(this.eventHandler.emitEvent(cs.B.SSO_SILENT_SUCCESS,Zi.X8.Silent,e),this.ssoSilentMeasurement?.end({success:!0,isNativeBroker:e.fromNativeBroker,requestId:e.requestId,accessTokenSize:e.accessToken.length,idTokenSize:e.idToken.length,accountType:ur(e.account)}),e)).catch(e=>{throw this.eventHandler.emitEvent(cs.B.SSO_SILENT_FAILURE,Zi.X8.Silent,null,e),this.ssoSilentMeasurement?.end({success:!1},e),e}).finally(()=>{document.removeEventListener("visibilitychange",this.trackPageVisibilityWithMeasurement)})}async acquireTokenByCode(e){const t=this.getRequestCorrelationId(e);this.logger.trace("acquireTokenByCode called",t);const i=this.performanceClient.startMeasurement(Rt,t);pr(this.initialized,i),this.eventHandler.emitEvent(cs.B.ACQUIRE_TOKEN_BY_CODE_START,Zi.X8.Silent,e),i.add({scenarioId:e.scenarioId});try{if(e.code&&e.nativeAccountId)throw(0,Ji.bD)(en.$c);if(e.code){const n=e.code;let s=this.hybridAuthCodeResponses.get(n);return s?(this.logger.verbose("Existing acquireTokenByCode request found",t),i.discard()):(this.logger.verbose("Initiating new acquireTokenByCode request",t),s=this.acquireTokenByCodeAsync({...e,correlationId:t}).then(e=>(this.eventHandler.emitEvent(cs.B.ACQUIRE_TOKEN_BY_CODE_SUCCESS,Zi.X8.Silent,e),this.hybridAuthCodeResponses.delete(n),i.end({success:!0,isNativeBroker:e.fromNativeBroker,requestId:e.requestId,accessTokenSize:e.accessToken.length,idTokenSize:e.idToken.length,accountType:ur(e.account)}),e)).catch(e=>{throw this.hybridAuthCodeResponses.delete(n),this.eventHandler.emitEvent(cs.B.ACQUIRE_TOKEN_BY_CODE_FAILURE,Zi.X8.Silent,null,e),i.end({success:!1},e),e}),this.hybridAuthCodeResponses.set(n,s)),await s}if(e.nativeAccountId){if(this.canUseNative(e,e.nativeAccountId)){const n=await this.acquireTokenNative({...e,correlationId:t},Zi.sA.acquireTokenByCode,e.nativeAccountId).catch(e=>{throw e instanceof Hs&&zs(e)&&(this.nativeExtensionProvider=void 0),e});return i.end({accountType:ur(n.account),success:!0}),n}throw(0,Ji.bD)(en.gU)}throw(0,Ji.bD)(en.xp)}catch(e){throw this.eventHandler.emitEvent(cs.B.ACQUIRE_TOKEN_BY_CODE_FAILURE,Zi.X8.Silent,null,e),i.end({success:!1},e),e}}async acquireTokenByCodeAsync(e){this.logger.trace("acquireTokenByCodeAsync called",e.correlationId),this.acquireTokenByCodeAsyncMeasurement=this.performanceClient.startMeasurement(_i,e.correlationId),this.acquireTokenByCodeAsyncMeasurement?.increment({visibilityChangeCount:0}),document.addEventListener("visibilitychange",this.trackPageVisibilityWithMeasurement);const t=this.createSilentAuthCodeClient(e.correlationId);return await t.acquireToken(e).then(e=>(this.acquireTokenByCodeAsyncMeasurement?.end({success:!0,fromCache:e.fromCache,isNativeBroker:e.fromNativeBroker,requestId:e.requestId}),e)).catch(e=>{throw this.acquireTokenByCodeAsyncMeasurement?.end({success:!1},e),e}).finally(()=>{document.removeEventListener("visibilitychange",this.trackPageVisibilityWithMeasurement)})}async acquireTokenFromCache(e,t){switch(this.performanceClient.addQueueMeasurement(Qt,e.correlationId),t){case Zi.nN.Default:case Zi.nN.AccessToken:case Zi.nN.AccessTokenAndRefreshToken:const t=this.createSilentCacheClient(e.correlationId);return Nn(t.acquireToken.bind(t),Gt,this.logger,this.performanceClient,e.correlationId)(e);default:throw te(H)}}async acquireTokenByRefreshToken(e,t){switch(this.performanceClient.addQueueMeasurement(Lt,e.correlationId),t){case Zi.nN.Default:case Zi.nN.AccessTokenAndRefreshToken:case Zi.nN.RefreshToken:case Zi.nN.RefreshTokenAndNetwork:const t=this.createSilentRefreshClient(e.correlationId);return Nn(t.acquireToken.bind(t),Bt,this.logger,this.performanceClient,e.correlationId)(e);default:throw te(H)}}async acquireTokenBySilentIframe(e){this.performanceClient.addQueueMeasurement(ti,e.correlationId);const t=this.createSilentIframeClient(e.correlationId);return Nn(t.acquireToken.bind(t),Vt,this.logger,this.performanceClient,e.correlationId)(e)}async logout(e){const t=this.getRequestCorrelationId(e);return this.logger.warning("logout API is deprecated and will be removed in msal-browser v3.0.0. Use logoutRedirect instead.",t),this.logoutRedirect({correlationId:t,...e})}async logoutRedirect(e){const t=this.getRequestCorrelationId(e);return as(this.initialized,this.config),this.browserStorage.setInteractionInProgress(!0),this.createRedirectClient(t).logout(e)}logoutPopup(e){try{const t=this.getRequestCorrelationId(e);return os(this.initialized),this.browserStorage.setInteractionInProgress(!0),this.createPopupClient(t).logout(e)}catch(e){return Promise.reject(e)}}async clearCache(e){if(!this.isBrowserEnvironment)return void this.logger.info("in non-browser environment, returning early.");const t=this.getRequestCorrelationId(e);return this.createSilentCacheClient(t).logout(e)}getAllAccounts(e){return function(e,t,i,n){return e.verbose("getAllAccounts called"),i?t.getAllAccounts(n):[]}(this.logger,this.browserStorage,this.isBrowserEnvironment,e)}getAccount(e){return function(e,t,i){if(t.trace("getAccount called"),0===Object.keys(e).length)return t.warning("getAccount: No accountFilter provided"),null;const n=i.getAccountInfoFilteredBy(e);return n?(t.verbose("getAccount: Account matching provided filter found, returning"),n):(t.verbose("getAccount: No matching account found, returning null"),null)}(e,this.logger,this.browserStorage)}getAccountByUsername(e){return function(e,t,i){if(t.trace("getAccountByUsername called"),!e)return t.warning("getAccountByUsername: No username provided"),null;const n=i.getAccountInfoFilteredBy({username:e});return n?(t.verbose("getAccountByUsername: Account matching username found, returning"),t.verbosePii(`getAccountByUsername: Returning signed-in accounts matching username: ${e}`),n):(t.verbose("getAccountByUsername: No matching account found, returning null"),null)}(e,this.logger,this.browserStorage)}getAccountByHomeId(e){return function(e,t,i){if(t.trace("getAccountByHomeId called"),!e)return t.warning("getAccountByHomeId: No homeAccountId provided"),null;const n=i.getAccountInfoFilteredBy({homeAccountId:e});return n?(t.verbose("getAccountByHomeId: Account matching homeAccountId found, returning"),t.verbosePii(`getAccountByHomeId: Returning signed-in accounts matching homeAccountId: ${e}`),n):(t.verbose("getAccountByHomeId: No matching account found, returning null"),null)}(e,this.logger,this.browserStorage)}getAccountByLocalId(e){return function(e,t,i){if(t.trace("getAccountByLocalId called"),!e)return t.warning("getAccountByLocalId: No localAccountId provided"),null;const n=i.getAccountInfoFilteredBy({localAccountId:e});return n?(t.verbose("getAccountByLocalId: Account matching localAccountId found, returning"),t.verbosePii(`getAccountByLocalId: Returning signed-in accounts matching localAccountId: ${e}`),n):(t.verbose("getAccountByLocalId: No matching account found, returning null"),null)}(e,this.logger,this.browserStorage)}setActiveAccount(e){!function(e,t){t.setActiveAccount(e)}(e,this.browserStorage)}getActiveAccount(){return this.browserStorage.getActiveAccount()}async hydrateCache(e,t){this.logger.verbose("hydrateCache called");const i=rt.createFromAccountInfo(e.account,e.cloudGraphHostName,e.msGraphHost);return this.browserStorage.setAccount(i),e.fromNativeBroker?(this.logger.verbose("Response was from native broker, storing in-memory"),this.nativeInternalStorage.hydrateCache(e,t)):this.browserStorage.hydrateCache(e,t)}async acquireTokenNative(e,t,i){if(this.logger.trace("acquireTokenNative called"),!this.nativeExtensionProvider)throw(0,Ji.bD)(en.XC);return new Ys(this.config,this.browserStorage,this.browserCrypto,this.logger,this.eventHandler,this.navigationClient,t,this.performanceClient,this.nativeExtensionProvider,i||this.getNativeAccountId(e),this.nativeInternalStorage,e.correlationId).acquireToken(e)}canUseNative(e,t){if(this.logger.trace("canUseNative called"),!qs.isNativeAvailable(this.config,this.logger,this.nativeExtensionProvider,e.authenticationScheme))return this.logger.trace("canUseNative: isNativeAvailable returned false, returning false"),!1;if(e.prompt)switch(e.prompt){case s._M.NONE:case s._M.CONSENT:case s._M.LOGIN:this.logger.trace("canUseNative: prompt is compatible with native flow");break;default:return this.logger.trace(`canUseNative: prompt = ${e.prompt} is not compatible with native flow, returning false`),!1}return!(!t&&!this.getNativeAccountId(e)&&(this.logger.trace("canUseNative: nativeAccountId is not available, returning false"),1))}getNativeAccountId(e){const t=e.account||this.getAccount({loginHint:e.loginHint,sid:e.sid})||this.getActiveAccount();return t&&t.nativeAccountId||""}createPopupClient(e){return new Qs(this.config,this.browserStorage,this.browserCrypto,this.logger,this.eventHandler,this.navigationClient,this.performanceClient,this.nativeInternalStorage,this.nativeExtensionProvider,e)}createRedirectClient(e){return new er(this.config,this.browserStorage,this.browserCrypto,this.logger,this.eventHandler,this.navigationClient,this.performanceClient,this.nativeInternalStorage,this.nativeExtensionProvider,e)}createSilentIframeClient(e){return new ar(this.config,this.browserStorage,this.browserCrypto,this.logger,this.eventHandler,this.navigationClient,Zi.sA.ssoSilent,this.performanceClient,this.nativeInternalStorage,this.nativeExtensionProvider,e)}createSilentCacheClient(e){return new Ks(this.config,this.browserStorage,this.browserCrypto,this.logger,this.eventHandler,this.navigationClient,this.performanceClient,this.nativeExtensionProvider,e)}createSilentRefreshClient(e){return new lr(this.config,this.browserStorage,this.browserCrypto,this.logger,this.eventHandler,this.navigationClient,this.performanceClient,this.nativeExtensionProvider,e)}createSilentAuthCodeClient(e){return new dr(this.config,this.browserStorage,this.browserCrypto,this.logger,this.eventHandler,this.navigationClient,Zi.sA.acquireTokenByCode,this.performanceClient,this.nativeExtensionProvider,e)}addEventCallback(e,t){return this.eventHandler.addEventCallback(e,t)}removeEventCallback(e){this.eventHandler.removeEventCallback(e)}addPerformanceCallback(e){return ss(),this.performanceClient.addPerformanceCallback(e)}removePerformanceCallback(e){return this.performanceClient.removePerformanceCallback(e)}enableAccountStorageEvents(){"undefined"!=typeof window&&(this.listeningToStorageEvents?this.logger.verbose("Account storage listener already registered."):(this.logger.verbose("Adding account storage listener."),this.listeningToStorageEvents=!0,window.addEventListener("storage",this.handleAccountCacheChange)))}disableAccountStorageEvents(){"undefined"!=typeof window&&(this.listeningToStorageEvents?(this.logger.verbose("Removing account storage listener."),window.removeEventListener("storage",this.handleAccountCacheChange),this.listeningToStorageEvents=!1):this.logger.verbose("No account storage listener registered."))}handleAccountCacheChange(e){try{e.key?.includes(s.Gd.ACTIVE_ACCOUNT_FILTERS)&&this.eventHandler.emitEvent(cs.B.ACTIVE_ACCOUNT_CHANGED);const t=e.newValue||e.oldValue;if(!t)return;const i=JSON.parse(t);if("object"!=typeof i||!rt.isAccountEntity(i))return;const n=yt.toObject(new rt,i).getAccountInfo();!e.oldValue&&e.newValue?(this.logger.info("Account was added to cache in a different window"),this.eventHandler.emitEvent(cs.B.ACCOUNT_ADDED,void 0,n)):!e.newValue&&e.oldValue&&(this.logger.info("Account was removed from cache in a different window"),this.eventHandler.emitEvent(cs.B.ACCOUNT_REMOVED,void 0,n))}catch(e){return}}getTokenCache(){return this.tokenCache}getLogger(){return this.logger}setLogger(e){this.logger=e}initializeWrapperLibrary(e,t){this.browserStorage.setWrapperMetadata(e,t)}setNavigationClient(e){this.navigationClient=e}getConfiguration(){return this.config}getPerformanceClient(){return this.performanceClient}isBrowserEnv(){return this.isBrowserEnvironment}getRequestCorrelationId(e){return e?.correlationId?e.correlationId:this.isBrowserEnvironment?Mn():s.YM.EMPTY_STRING}async loginRedirect(e){const t=this.getRequestCorrelationId(e);return this.logger.verbose("loginRedirect called",t),this.acquireTokenRedirect({correlationId:t,...e||Zi.uq})}loginPopup(e){const t=this.getRequestCorrelationId(e);return this.logger.verbose("loginPopup called",t),this.acquireTokenPopup({correlationId:t,...e||Zi.uq})}async acquireTokenSilent(e){const t=this.getRequestCorrelationId(e),i=this.performanceClient.startMeasurement(kt,t);i.add({cacheLookupPolicy:e.cacheLookupPolicy,scenarioId:e.scenarioId}),pr(this.initialized,i),this.logger.verbose("acquireTokenSilent called",t);const n=e.account||this.getActiveAccount();if(!n)throw(0,Ji.bD)(en.rR);i.add({accountType:ur(n)});const r={clientId:this.config.auth.clientId,authority:e.authority||s.YM.EMPTY_STRING,scopes:e.scopes,homeAccountIdentifier:n.homeAccountId,claims:e.claims,authenticationScheme:e.authenticationScheme,resourceRequestMethod:e.resourceRequestMethod,resourceRequestUri:e.resourceRequestUri,shrClaims:e.shrClaims,sshKid:e.sshKid,shrOptions:e.shrOptions},o=JSON.stringify(r),a=this.activeSilentTokenRequests.get(o);if(void 0===a){this.logger.verbose("acquireTokenSilent called for the first time, storing active request",t);const s=Nn(this.acquireTokenSilentAsync.bind(this),Pt,this.logger,this.performanceClient,t)({...e,correlationId:t},n).then(t=>(this.activeSilentTokenRequests.delete(o),i.end({success:!0,fromCache:t.fromCache,isNativeBroker:t.fromNativeBroker,cacheLookupPolicy:e.cacheLookupPolicy,requestId:t.requestId,accessTokenSize:t.accessToken.length,idTokenSize:t.idToken.length}),t)).catch(e=>{throw this.activeSilentTokenRequests.delete(o),i.end({success:!1},e),e});return this.activeSilentTokenRequests.set(o,s),{...await s,state:e.state}}return this.logger.verbose("acquireTokenSilent has been called previously, returning the result from the first call",t),i.discard(),{...await a,state:e.state}}async acquireTokenSilentAsync(e,t){const i=()=>this.trackPageVisibility(e.correlationId);this.performanceClient.addQueueMeasurement(Pt,e.correlationId),this.eventHandler.emitEvent(cs.B.ACQUIRE_TOKEN_START,Zi.X8.Silent,e),e.correlationId&&this.performanceClient.incrementFields({visibilityChangeCount:0},e.correlationId),document.addEventListener("visibilitychange",i);const n=await Nn(_s,ni,this.logger,this.performanceClient,e.correlationId)(e,t,this.config,this.performanceClient,this.logger),s=e.cacheLookupPolicy||Zi.nN.Default;return this.acquireTokenSilentNoIframe(n,s).catch(async e=>{const t=function(e,t){const i=!(e instanceof jn&&e.subError!==Hn),n=e.errorCode===Zi.Q1.INVALID_GRANT_ERROR||e.errorCode===H,s=i&&n||e.errorCode===Gn||e.errorCode===Bn,r=Zi.JE.includes(t);return s&&r}(e,s);if(t){if(this.activeIframeRequest){if(s!==Zi.nN.Skip){const[t,i]=this.activeIframeRequest;this.logger.verbose(`Iframe request is already in progress, awaiting resolution for request with correlationId: ${i}`,n.correlationId);const r=this.performanceClient.startMeasurement("awaitConcurrentIframe",n.correlationId);r.add({awaitIframeCorrelationId:i});const o=await t;if(r.end({success:o}),o)return this.logger.verbose(`Parallel iframe request with correlationId: ${i} succeeded. Retrying cache and/or RT redemption`,n.correlationId),this.acquireTokenSilentNoIframe(n,s);throw this.logger.info(`Iframe request with correlationId: ${i} failed. Interaction is required.`),e}return this.logger.warning("Another iframe request is currently in progress and CacheLookupPolicy is set to Skip. This may result in degraded performance and/or reliability for both calls. Please consider changing the CacheLookupPolicy to take advantage of request queuing and token cache.",n.correlationId),Nn(this.acquireTokenBySilentIframe.bind(this),ti,this.logger,this.performanceClient,n.correlationId)(n)}{let e;return this.activeIframeRequest=[new Promise(t=>{e=t}),n.correlationId],this.logger.verbose("Refresh token expired/invalid or CacheLookupPolicy is set to Skip, attempting acquire token by iframe.",n.correlationId),Nn(this.acquireTokenBySilentIframe.bind(this),ti,this.logger,this.performanceClient,n.correlationId)(n).then(t=>(e(!0),t)).catch(t=>{throw e(!1),t}).finally(()=>{this.activeIframeRequest=void 0})}}throw e}).then(t=>(this.eventHandler.emitEvent(cs.B.ACQUIRE_TOKEN_SUCCESS,Zi.X8.Silent,t),e.correlationId&&this.performanceClient.addFields({fromCache:t.fromCache,isNativeBroker:t.fromNativeBroker,requestId:t.requestId},e.correlationId),t)).catch(e=>{throw this.eventHandler.emitEvent(cs.B.ACQUIRE_TOKEN_FAILURE,Zi.X8.Silent,null,e),e}).finally(()=>{document.removeEventListener("visibilitychange",i)})}async acquireTokenSilentNoIframe(e,t){return qs.isNativeAvailable(this.config,this.logger,this.nativeExtensionProvider,e.authenticationScheme)&&e.account.nativeAccountId?(this.logger.verbose("acquireTokenSilent - attempting to acquire token from native platform"),this.acquireTokenNative(e,Zi.sA.acquireTokenSilent_silentFlow).catch(async e=>{if(e instanceof Hs&&zs(e))throw this.logger.verbose("acquireTokenSilent - native platform unavailable, falling back to web flow"),this.nativeExtensionProvider=void 0,te(H);throw e})):(this.logger.verbose("acquireTokenSilent - attempting to acquire token from web flow"),Nn(this.acquireTokenFromCache.bind(this),Qt,this.logger,this.performanceClient,e.correlationId)(e,t).catch(i=>{if(t===Zi.nN.AccessToken)throw i;return this.eventHandler.emitEvent(cs.B.ACQUIRE_TOKEN_NETWORK_START,Zi.X8.Silent,e),Nn(this.acquireTokenByRefreshToken.bind(this),Lt,this.logger,this.performanceClient,e.correlationId)(e,t)}))}}class fr{static async createPublicClientApplication(e){const t=await async function(e){const t=new rn(e);return await t.initialize(),gr.createController(t,void 0)}(e);return new fr(e,t)}constructor(e,t){this.controller=t||new gr(new rn(e))}async initialize(e){return this.controller.initialize(e)}async acquireTokenPopup(e){return this.controller.acquireTokenPopup(e)}acquireTokenRedirect(e){return this.controller.acquireTokenRedirect(e)}acquireTokenSilent(e){return this.controller.acquireTokenSilent(e)}acquireTokenByCode(e){return this.controller.acquireTokenByCode(e)}addEventCallback(e,t){return this.controller.addEventCallback(e,t)}removeEventCallback(e){return this.controller.removeEventCallback(e)}addPerformanceCallback(e){return this.controller.addPerformanceCallback(e)}removePerformanceCallback(e){return this.controller.removePerformanceCallback(e)}enableAccountStorageEvents(){this.controller.enableAccountStorageEvents()}disableAccountStorageEvents(){this.controller.disableAccountStorageEvents()}getAccount(e){return this.controller.getAccount(e)}getAccountByHomeId(e){return this.controller.getAccountByHomeId(e)}getAccountByLocalId(e){return this.controller.getAccountByLocalId(e)}getAccountByUsername(e){return this.controller.getAccountByUsername(e)}getAllAccounts(e){return this.controller.getAllAccounts(e)}handleRedirectPromise(e){return this.controller.handleRedirectPromise(e)}loginPopup(e){return this.controller.loginPopup(e)}loginRedirect(e){return this.controller.loginRedirect(e)}logout(e){return this.controller.logout(e)}logoutRedirect(e){return this.controller.logoutRedirect(e)}logoutPopup(e){return this.controller.logoutPopup(e)}ssoSilent(e){return this.controller.ssoSilent(e)}getTokenCache(){return this.controller.getTokenCache()}getLogger(){return this.controller.getLogger()}setLogger(e){this.controller.setLogger(e)}setActiveAccount(e){this.controller.setActiveAccount(e)}getActiveAccount(){return this.controller.getActiveAccount()}initializeWrapperLibrary(e,t){return this.controller.initializeWrapperLibrary(e,t)}setNavigationClient(e){this.controller.setNavigationClient(e)}getConfiguration(){return this.controller.getConfiguration()}async hydrateCache(e,t){return this.controller.hydrateCache(e,t)}clearCache(e){return this.controller.clearCache(e)}}},75970(e,t,i){"use strict";i.d(t,{bD:()=>l,jT:()=>a});var n=i(90865),s=i(2919);const r="For more visit: aka.ms/msaljs/browser-errors",o={[s.p5]:"The PKCE code challenge and verifier could not be generated.",[s.rc]:"The crypto object or function is not available.",[s.B2]:"Navigation URI is empty. Please check stack trace for more info.",[s.wv]:`Hash value cannot be processed because it is empty. Please verify that your redirectUri is not clearing the hash. ${r}`,[s.c$]:"Hash does not contain state. Please verify that the request originated from msal.",[s.Lm]:`Hash does not contain known properites. Please verify that your redirectUri is not changing the hash.  ${r}`,[s.fA]:"Unable to parse state. Please verify that the request originated from msal.",[s.oe]:"Hash contains state but the interaction type does not match the caller.",[s.b]:`Interaction is currently in progress. Please ensure that this interaction has been completed before calling an interactive API.   ${r}`,[s.hs]:"Error opening popup window. This can happen if you are using IE or if popups are blocked in the browser.",[s.MP]:"window.open returned null or undefined window object.",[s.fN]:"User cancelled the flow.",[s.OM]:`Token acquisition in popup failed due to timeout.  ${r}`,[s.Uf]:`Token acquisition in iframe failed due to timeout.  ${r}`,[s.OT]:"Redirects are not supported for iframed or brokered applications. Please ensure you are using MSAL.js in a top frame of the window if using the redirect APIs, or use the popup APIs.",[s.tZ]:`Request was blocked inside an iframe because MSAL detected an authentication response.  ${r}`,[s.aH]:"Request was blocked inside a popup because MSAL detected it was running in a popup.",[s.lg]:"The iframe being monitored was closed prematurely.",[s.v7]:"Silent logout not supported. Please call logoutRedirect or logoutPopup instead.",[s.rR]:"No account object provided to acquireTokenSilent and no active account has been set. Please call setActiveAccount or provide an account on the request.",[s.hZ]:"The value given for the prompt value is not valid for silent requests - must be set to 'none' or 'no_session'.",[s.y6]:"No token request found in cache.",[s.ot]:"The cached token request could not be parsed.",[s.Ne]:"No cached authority found.",[s.LW]:"Auth Request not set. Please ensure initiateAuthRequest was called from the InteractionHandler",[s.Mm]:"Invalid cache type",[s.tI]:"Login and token requests are not supported in non-browser environments.",[s.rn]:"Database is not open!",[s.l7]:"No network connectivity. Check your internet connection.",[s.zv]:"Network request failed: If the browser threw a CORS error, check that the redirectUri is registered in the Azure App Portal as type 'SPA'",[s.Zw]:"Network request failed. Please check the network trace to determine root cause.",[s.db]:"Failed to parse network response. Check network trace.",[s.s9]:"Error loading token to cache.",[s.e0]:"Cryptographic Key or Keypair not found in browser storage.",[s.R3]:"An authorization code must be provided (as the `code` property on the request) to this flow.",[s.xp]:"An authorization code or nativeAccountId must be provided to this flow.",[s.$c]:"Request cannot contain both spa code and native account id.",[s.MG]:"IndexedDB, which is required for persistent cryptographic key storage, is unavailable. This may be caused by browser privacy features which block persistent storage in third-party contexts.",[s.gU]:`Unable to acquire token from native platform.  ${r}`,[s.y3]:"Timed out while attempting to establish connection to browser extension",[s.cq]:"Native extension is not installed. If you think this is a mistake call the initialize function.",[s.XC]:`Connection to native platform has not been established. Please install a compatible browser extension and run initialize().  ${r}`,[s.IR]:`You must call and await the initialize function before attempting to call any other MSAL API.  ${r}`,[s.nF]:"The provided prompt is not supported by the native platform. This request should be routed to the web based flow.",[s._t]:"Invalid base64 encoded string.",[s.bT]:"Invalid PoP token request. The request should not have both a popKid value and signPopToken set to true."};s.p5,s.p5,s.rc,s.rc,s.B2,s.B2,s.wv,s.wv,s.c$,s.c$,s.Lm,s.Lm,s.fA,s.fA,s.oe,s.oe,s.b,s.b,s.hs,s.hs,s.MP,s.MP,s.fN,s.fN,s.OM,s.OM,s.Uf,s.Uf,s.OT,s.OT,s.tZ,s.tZ,s.aH,s.aH,s.lg,s.lg,s.v7,s.v7,s.rR,s.rR,s.hZ,s.hZ,s.y6,s.y6,s.ot,s.ot,s.Ne,s.Ne,s.LW,s.LW,s.Mm,s.Mm,s.tI,s.tI,s.rn,s.rn,s.l7,s.l7,s.zv,s.zv,s.Zw,s.Zw,s.db,s.db,s.s9,s.s9,s.e0,s.e0,s.R3,s.R3,s.xp,s.xp,s.$c,s.$c,s.MG,s.MG,s.gU,s.gU,s.y3,s.y3,s.cq,s.cq,s.XC,s.XC,s.IR,s.IR,s.nF,s.nF,s._t,s._t,s.bT,s.bT;class a extends n.lR{constructor(e){super(e,o[e]),Object.setPrototypeOf(this,a.prototype),this.name="BrowserAuthError"}}function l(e){return new a(e)}},2919(e,t,i){"use strict";i.d(t,{$c:()=>V,B2:()=>r,IR:()=>j,LW:()=>T,Lm:()=>l,MG:()=>B,MP:()=>p,Mm:()=>D,Ne:()=>A,OM:()=>f,OT:()=>v,R3:()=>F,Uf:()=>m,XC:()=>W,Zw:()=>P,_t:()=>$,aH:()=>C,b:()=>d,bT:()=>Y,c$:()=>a,cq:()=>U,db:()=>N,e0:()=>_,fA:()=>c,fN:()=>g,gU:()=>H,hZ:()=>x,hs:()=>u,l7:()=>L,lg:()=>b,nF:()=>K,oe:()=>h,ot:()=>M,p5:()=>n,rR:()=>w,rc:()=>s,rn:()=>R,s9:()=>O,tI:()=>I,tZ:()=>y,v7:()=>S,wv:()=>o,xp:()=>G,y3:()=>z,y6:()=>E,zv:()=>k});const n="pkce_not_created",s="crypto_nonexistent",r="empty_navigate_uri",o="hash_empty_error",a="no_state_in_hash",l="hash_does_not_contain_known_properties",c="unable_to_parse_state",h="state_interaction_type_mismatch",d="interaction_in_progress",u="popup_window_error",p="empty_window_error",g="user_cancelled",f="monitor_popup_timeout",m="monitor_window_timeout",v="redirect_in_iframe",y="block_iframe_reload",C="block_nested_popups",b="iframe_closed_prematurely",S="silent_logout_unsupported",w="no_account_error",x="silent_prompt_value_error",E="no_token_request_cache_error",M="unable_to_parse_token_request_cache_error",A="no_cached_authority_error",T="auth_request_not_set_error",D="invalid_cache_type",I="non_browser_environment",R="database_not_open",L="no_network_connectivity",k="post_request_failed",P="get_request_failed",N="failed_to_parse_response",O="unable_to_load_token",_="crypto_key_not_found",F="auth_code_required",G="auth_code_or_nativeAccountId_required",V="spa_code_and_nativeAccountId_present",B="database_unavailable",H="unable_to_acquire_token_from_native_platform",z="native_handshake_timeout",U="native_extension_not_installed",W="native_connection_not_established",j="uninitialized_public_client_application",K="native_prompt_not_supported",$="invalid_base64_string",Y="invalid_pop_token_request"},24680(e,t,i){"use strict";i.d(t,{jz:()=>a});var n=i(90865),s=i(85362);const r={[s.xz]:"Given storage configuration option was not supported.",[s.dg]:"Stub instance of Public Client Application was called. If using msal-react, please ensure context is not used without a provider. For more visit: aka.ms/msaljs/browser-errors",[s.jE]:"Redirect cannot be supported. In-memory storage was selected and storeAuthStateInCookie=false, which would cause the library to be unable to handle the incoming hash. If you would like to use the redirect API, please use session/localStorage or set storeAuthStateInCookie=true."};s.xz,s.xz,s.dg,s.dg,s.jE,s.jE;class o extends n.lR{constructor(e,t){super(e,t),this.name="BrowserConfigurationAuthError",Object.setPrototypeOf(this,o.prototype)}}function a(e){return new o(e,r[e])}},85362(e,t,i){"use strict";i.d(t,{dg:()=>s,jE:()=>r,xz:()=>n});const n="storage_not_supported",s="stubbed_public_client_application_called",r="in_mem_redirect_unavailable"},99268(e,t,i){"use strict";i.d(t,{B:()=>n});const n={INITIALIZE_START:"msal:initializeStart",INITIALIZE_END:"msal:initializeEnd",ACCOUNT_ADDED:"msal:accountAdded",ACCOUNT_REMOVED:"msal:accountRemoved",ACTIVE_ACCOUNT_CHANGED:"msal:activeAccountChanged",LOGIN_START:"msal:loginStart",LOGIN_SUCCESS:"msal:loginSuccess",LOGIN_FAILURE:"msal:loginFailure",ACQUIRE_TOKEN_START:"msal:acquireTokenStart",ACQUIRE_TOKEN_SUCCESS:"msal:acquireTokenSuccess",ACQUIRE_TOKEN_FAILURE:"msal:acquireTokenFailure",ACQUIRE_TOKEN_NETWORK_START:"msal:acquireTokenFromNetworkStart",SSO_SILENT_START:"msal:ssoSilentStart",SSO_SILENT_SUCCESS:"msal:ssoSilentSuccess",SSO_SILENT_FAILURE:"msal:ssoSilentFailure",ACQUIRE_TOKEN_BY_CODE_START:"msal:acquireTokenByCodeStart",ACQUIRE_TOKEN_BY_CODE_SUCCESS:"msal:acquireTokenByCodeSuccess",ACQUIRE_TOKEN_BY_CODE_FAILURE:"msal:acquireTokenByCodeFailure",HANDLE_REDIRECT_START:"msal:handleRedirectStart",HANDLE_REDIRECT_END:"msal:handleRedirectEnd",POPUP_OPENED:"msal:popupOpened",LOGOUT_START:"msal:logoutStart",LOGOUT_SUCCESS:"msal:logoutSuccess",LOGOUT_FAILURE:"msal:logoutFailure",LOGOUT_END:"msal:logoutEnd",RESTORE_FROM_BFCACHE:"msal:restoreFromBFCache"}},58090(e,t,i){"use strict";i.d(t,{$u:()=>y,Al:()=>a,CC:()=>l,Ct:()=>o,G8:()=>C,H3:()=>d,JD:()=>r,JE:()=>w,L$:()=>x,P3:()=>E,Q1:()=>s,T$:()=>g,WJ:()=>b,X8:()=>p,_p:()=>c,dh:()=>h,f7:()=>v,jb:()=>m,nN:()=>S,sA:()=>u,uq:()=>f});var n=i(14927);const s={INTERACTION_IN_PROGRESS_VALUE:"interaction_in_progress",INVALID_GRANT_ERROR:"invalid_grant",POPUP_WIDTH:483,POPUP_HEIGHT:600,POPUP_NAME_PREFIX:"msal",DEFAULT_POLL_INTERVAL_MS:30,MSAL_SKU:"msal.js.browser"},r={CHANNEL_ID:"53ee284d-920a-4b59-9d30-a60315b26836",PREFERRED_EXTENSION_ID:"ppnbnpeolgkicgegkbkbjmhlideopiji",MATS_TELEMETRY:"MATS"},o={HandshakeRequest:"Handshake",HandshakeResponse:"HandshakeResponse",GetToken:"GetToken",Response:"Response"},a={LocalStorage:"localStorage",SessionStorage:"sessionStorage",MemoryStorage:"memoryStorage"},l={GET:"GET",POST:"POST"},c={AUTHORITY:"authority",ACQUIRE_TOKEN_ACCOUNT:"acquireToken.account",SESSION_STATE:"session.state",REQUEST_STATE:"request.state",NONCE_IDTOKEN:"nonce.id_token",ORIGIN_URI:"request.origin",RENEW_STATUS:"token.renew.status",URL_HASH:"urlHash",REQUEST_PARAMS:"request.params",SCOPES:"scopes",INTERACTION_STATUS_KEY:"interaction.status",CCS_CREDENTIAL:"ccs.credential",CORRELATION_ID:"request.correlationId",NATIVE_REQUEST:"request.native",REDIRECT_CONTEXT:"request.redirect.context"},h={ACCOUNT_KEYS:"msal.account.keys",TOKEN_KEYS:"msal.token.keys"},d={WRAPPER_SKU:"wrapper.sku",WRAPPER_VER:"wrapper.version"},u={acquireTokenRedirect:861,acquireTokenPopup:862,ssoSilent:863,acquireTokenSilent_authCode:864,handleRedirectPromise:865,acquireTokenByCode:866,acquireTokenSilent_silentFlow:61,logout:961,logoutPopup:962};var p;!function(e){e.Redirect="redirect",e.Popup="popup",e.Silent="silent",e.None="none"}(p||(p={}));const g={Startup:"startup",Login:"login",Logout:"logout",AcquireToken:"acquireToken",SsoSilent:"ssoSilent",HandleRedirect:"handleRedirect",None:"none"},f={scopes:n.aZ},m="jwk",v={React:"@azure/msal-react",Angular:"@azure/msal-angular"},y="msal.db",C=1,b=`${y}.keys`,S={Default:0,AccessToken:1,AccessTokenAndRefreshToken:2,RefreshToken:3,RefreshTokenAndNetwork:4,Skip:5},w=[S.Default,S.Skip,S.RefreshTokenAndNetwork],x="msal.browser.log.level",E="msal.browser.log.pii"},90865(e,t,i){"use strict";i.d(t,{lR:()=>o,pz:()=>a});var n=i(14927),s=i(5841);const r={[s.W]:"Unexpected error in authentication.",[s.z]:"Post request failed from the network, could be a 4xx/5xx or a network unavailability. Please check the exact error code for details."};s.W,s.W,s.z,s.z;class o extends Error{constructor(e,t,i){super(t?`${e}: ${t}`:e),Object.setPrototypeOf(this,o.prototype),this.errorCode=e||n.YM.EMPTY_STRING,this.errorMessage=t||n.YM.EMPTY_STRING,this.subError=i||n.YM.EMPTY_STRING,this.name="AuthError"}setCorrelationId(e){this.correlationId=e}}function a(e,t){return new o(e,t?`${r[e]} ${t}`:r[e])}},5841(e,t,i){"use strict";i.d(t,{W:()=>n,z:()=>s});const n="unexpected_error",s="post_request_failed"},95177(e,t,i){"use strict";i.d(t,{$:()=>n,V:()=>r});var n,s=i(14927);!function(e){e[e.Error=0]="Error",e[e.Warning=1]="Warning",e[e.Info=2]="Info",e[e.Verbose=3]="Verbose",e[e.Trace=4]="Trace"}(n||(n={}));class r{constructor(e,t,i){this.level=n.Info;const o=e||r.createDefaultLoggerOptions();this.localCallback=o.loggerCallback||(()=>{}),this.piiLoggingEnabled=o.piiLoggingEnabled||!1,this.level="number"==typeof o.logLevel?o.logLevel:n.Info,this.correlationId=o.correlationId||s.YM.EMPTY_STRING,this.packageName=t||s.YM.EMPTY_STRING,this.packageVersion=i||s.YM.EMPTY_STRING}static createDefaultLoggerOptions(){return{loggerCallback:()=>{},piiLoggingEnabled:!1,logLevel:n.Info}}clone(e,t,i){return new r({loggerCallback:this.localCallback,piiLoggingEnabled:this.piiLoggingEnabled,logLevel:this.level,correlationId:i||this.correlationId},e,t)}logMessage(e,t){if(t.logLevel>this.level||!this.piiLoggingEnabled&&t.containsPii)return;const i=`[${(new Date).toUTCString()}] : [${t.correlationId||this.correlationId||""}] : ${this.packageName}@${this.packageVersion} : ${n[t.logLevel]} - ${e}`;this.executeCallback(t.logLevel,i,t.containsPii||!1)}executeCallback(e,t,i){this.localCallback&&this.localCallback(e,t,i)}error(e,t){this.logMessage(e,{logLevel:n.Error,containsPii:!1,correlationId:t||s.YM.EMPTY_STRING})}errorPii(e,t){this.logMessage(e,{logLevel:n.Error,containsPii:!0,correlationId:t||s.YM.EMPTY_STRING})}warning(e,t){this.logMessage(e,{logLevel:n.Warning,containsPii:!1,correlationId:t||s.YM.EMPTY_STRING})}warningPii(e,t){this.logMessage(e,{logLevel:n.Warning,containsPii:!0,correlationId:t||s.YM.EMPTY_STRING})}info(e,t){this.logMessage(e,{logLevel:n.Info,containsPii:!1,correlationId:t||s.YM.EMPTY_STRING})}infoPii(e,t){this.logMessage(e,{logLevel:n.Info,containsPii:!0,correlationId:t||s.YM.EMPTY_STRING})}verbose(e,t){this.logMessage(e,{logLevel:n.Verbose,containsPii:!1,correlationId:t||s.YM.EMPTY_STRING})}verbosePii(e,t){this.logMessage(e,{logLevel:n.Verbose,containsPii:!0,correlationId:t||s.YM.EMPTY_STRING})}trace(e,t){this.logMessage(e,{logLevel:n.Trace,containsPii:!1,correlationId:t||s.YM.EMPTY_STRING})}tracePii(e,t){this.logMessage(e,{logLevel:n.Trace,containsPii:!0,correlationId:t||s.YM.EMPTY_STRING})}isPiiLoggingEnabled(){return this.piiLoggingEnabled||!1}}},14927(e,t,i){"use strict";i.d(t,{$x:()=>f,E_:()=>x,F0:()=>N,Fq:()=>h,GU:()=>C,Gd:()=>l,I:()=>T,IO:()=>M,JR:()=>b,Kk:()=>I,LR:()=>v,Lz:()=>P,OK:()=>a,Qd:()=>m,Rv:()=>k,Tq:()=>D,Xw:()=>A,YM:()=>n,_2:()=>L,_A:()=>o,_M:()=>d,aG:()=>y,aZ:()=>r,gT:()=>E,hB:()=>S,iF:()=>u,jZ:()=>R,p:()=>g,t3:()=>s,u0:()=>w,v2:()=>c,zL:()=>p});const n={LIBRARY_NAME:"MSAL.JS",SKU:"msal.js.common",CACHE_PREFIX:"msal",DEFAULT_AUTHORITY:"https://login.microsoftonline.com/common/",DEFAULT_AUTHORITY_HOST:"login.microsoftonline.com",DEFAULT_COMMON_TENANT:"common",ADFS:"adfs",DSTS:"dstsv2",AAD_INSTANCE_DISCOVERY_ENDPT:"https://login.microsoftonline.com/common/discovery/instance?api-version=1.1&authorization_endpoint=",CIAM_AUTH_URL:".ciamlogin.com",AAD_TENANT_DOMAIN_SUFFIX:".onmicrosoft.com",RESOURCE_DELIM:"|",NO_ACCOUNT:"NO_ACCOUNT",CLAIMS:"claims",CONSUMER_UTID:"9188040d-6c67-4c5b-b112-36a304b66dad",OPENID_SCOPE:"openid",PROFILE_SCOPE:"profile",OFFLINE_ACCESS_SCOPE:"offline_access",EMAIL_SCOPE:"email",CODE_RESPONSE_TYPE:"code",CODE_GRANT_TYPE:"authorization_code",RT_GRANT_TYPE:"refresh_token",FRAGMENT_RESPONSE_MODE:"fragment",S256_CODE_CHALLENGE_METHOD:"S256",URL_FORM_CONTENT_TYPE:"application/x-www-form-urlencoded;charset=utf-8",AUTHORIZATION_PENDING:"authorization_pending",NOT_DEFINED:"not_defined",EMPTY_STRING:"",NOT_APPLICABLE:"N/A",NOT_AVAILABLE:"Not Available",FORWARD_SLASH:"/",IMDS_ENDPOINT:"http://169.254.169.254/metadata/instance/compute/location",IMDS_VERSION:"2020-06-01",IMDS_TIMEOUT:2e3,AZURE_REGION_AUTO_DISCOVER_FLAG:"TryAutoDetect",REGIONAL_AUTH_PUBLIC_CLOUD_SUFFIX:"login.microsoft.com",KNOWN_PUBLIC_CLOUDS:["login.microsoftonline.com","login.windows.net","login.microsoft.com","sts.windows.net"],TOKEN_RESPONSE_TYPE:"token",ID_TOKEN_RESPONSE_TYPE:"id_token",SHR_NONCE_VALIDITY:240,INVALID_INSTANCE:"invalid_instance"},s={SUCCESS:200,SUCCESS_RANGE_START:200,SUCCESS_RANGE_END:299,REDIRECT:302,CLIENT_ERROR:400,CLIENT_ERROR_RANGE_START:400,BAD_REQUEST:400,UNAUTHORIZED:401,NOT_FOUND:404,REQUEST_TIMEOUT:408,TOO_MANY_REQUESTS:429,CLIENT_ERROR_RANGE_END:499,SERVER_ERROR:500,SERVER_ERROR_RANGE_START:500,SERVICE_UNAVAILABLE:503,GATEWAY_TIMEOUT:504,SERVER_ERROR_RANGE_END:599,MULTI_SIDED_ERROR:600},r=[n.OPENID_SCOPE,n.PROFILE_SCOPE,n.OFFLINE_ACCESS_SCOPE],o=[...r,n.EMAIL_SCOPE],a={CONTENT_TYPE:"Content-Type",RETRY_AFTER:"Retry-After",CCS_HEADER:"X-AnchorMailbox",WWWAuthenticate:"WWW-Authenticate",AuthenticationInfo:"Authentication-Info",X_MS_REQUEST_ID:"x-ms-request-id",X_MS_HTTP_VERSION:"x-ms-httpver"},l={ID_TOKEN:"idtoken",CLIENT_INFO:"client.info",ADAL_ID_TOKEN:"adal.idtoken",ERROR:"error",ERROR_DESC:"error.description",ACTIVE_ACCOUNT:"active-account",ACTIVE_ACCOUNT_FILTERS:"active-account-filters"},c={COMMON:"common",ORGANIZATIONS:"organizations",CONSUMERS:"consumers"},h={ACCESS_TOKEN:"access_token",XMS_CC:"xms_cc"},d={LOGIN:"login",SELECT_ACCOUNT:"select_account",CONSENT:"consent",NONE:"none",CREATE:"create",NO_SESSION:"no_session"},u={PLAIN:"plain",S256:"S256"},p={QUERY:"query",FRAGMENT:"fragment"},g={...p,FORM_POST:"form_post"},f={IMPLICIT_GRANT:"implicit",AUTHORIZATION_CODE_GRANT:"authorization_code",CLIENT_CREDENTIALS_GRANT:"client_credentials",RESOURCE_OWNER_PASSWORD_GRANT:"password",REFRESH_TOKEN_GRANT:"refresh_token",DEVICE_CODE_GRANT:"device_code",JWT_BEARER:"urn:ietf:params:oauth:grant-type:jwt-bearer"},m={MSSTS_ACCOUNT_TYPE:"MSSTS",ADFS_ACCOUNT_TYPE:"ADFS",MSAV1_ACCOUNT_TYPE:"MSA",GENERIC_ACCOUNT_TYPE:"Generic"},v={CACHE_KEY_SEPARATOR:"-",CLIENT_INFO_SEPARATOR:"."},y={ID_TOKEN:"IdToken",ACCESS_TOKEN:"AccessToken",ACCESS_TOKEN_WITH_AUTH_SCHEME:"AccessToken_With_AuthScheme",REFRESH_TOKEN:"RefreshToken"},C="appmetadata",b="client_info",S="1",w={CACHE_KEY:"authority-metadata",REFRESH_TIME_SECONDS:86400},x={CONFIG:"config",CACHE:"cache",NETWORK:"network",HARDCODED_VALUES:"hardcoded_values"},E={SCHEMA_VERSION:5,MAX_CUR_HEADER_BYTES:80,MAX_LAST_HEADER_BYTES:330,MAX_CACHED_ERRORS:50,CACHE_KEY:"server-telemetry",CATEGORY_SEPARATOR:"|",VALUE_SEPARATOR:",",OVERFLOW_TRUE:"1",OVERFLOW_FALSE:"0",UNKNOWN_ERROR:"unknown_error"},M={BEARER:"Bearer",POP:"pop",SSH:"ssh-cert"},A={DEFAULT_THROTTLE_TIME_SECONDS:60,DEFAULT_MAX_THROTTLE_TIME_SECONDS:3600,THROTTLING_PREFIX:"throttling",X_MS_LIB_CAPABILITY_VALUE:"retry-after, h429"},T={INVALID_GRANT_ERROR:"invalid_grant",CLIENT_MISMATCH_ERROR:"client_mismatch"},D={username:"username",password:"password"},I={httpSuccess:200,httpBadRequest:400},R={FAILED_AUTO_DETECTION:"1",INTERNAL_CACHE:"2",ENVIRONMENT_VARIABLE:"3",IMDS:"4"},L={CONFIGURED_MATCHES_DETECTED:"1",CONFIGURED_NO_AUTO_DETECTION:"2",CONFIGURED_NOT_DETECTED:"3",AUTO_DETECTION_REQUESTED_SUCCESSFUL:"4",AUTO_DETECTION_REQUESTED_FAILED:"5"},k={NOT_APPLICABLE:"0",FORCE_REFRESH_OR_CLAIMS:"1",NO_CACHED_ACCESS_TOKEN:"2",CACHED_ACCESS_TOKEN_EXPIRED:"3",PROACTIVELY_REFRESHED:"4"},P={Jwt:"JWT",Jwk:"JWK",Pop:"pop"},N=300},55534(e,t,i){"use strict";i.d(t,{r7:()=>y,dk:()=>C});var n=i(22155),s=i(24680),r=i(85362);const o={initialize:()=>Promise.reject((0,s.jz)(r.dg)),acquireTokenPopup:()=>Promise.reject((0,s.jz)(r.dg)),acquireTokenRedirect:()=>Promise.reject((0,s.jz)(r.dg)),acquireTokenSilent:()=>Promise.reject((0,s.jz)(r.dg)),acquireTokenByCode:()=>Promise.reject((0,s.jz)(r.dg)),getAllAccounts:()=>[],getAccount:()=>null,getAccountByHomeId:()=>null,getAccountByUsername:()=>null,getAccountByLocalId:()=>null,handleRedirectPromise:()=>Promise.reject((0,s.jz)(r.dg)),loginPopup:()=>Promise.reject((0,s.jz)(r.dg)),loginRedirect:()=>Promise.reject((0,s.jz)(r.dg)),logout:()=>Promise.reject((0,s.jz)(r.dg)),logoutRedirect:()=>Promise.reject((0,s.jz)(r.dg)),logoutPopup:()=>Promise.reject((0,s.jz)(r.dg)),ssoSilent:()=>Promise.reject((0,s.jz)(r.dg)),addEventCallback:()=>null,removeEventCallback:()=>{},addPerformanceCallback:()=>"",removePerformanceCallback:()=>!1,enableAccountStorageEvents:()=>{},disableAccountStorageEvents:()=>{},getTokenCache:()=>{throw(0,s.jz)(r.dg)},getLogger:()=>{throw(0,s.jz)(r.dg)},setLogger:()=>{},setActiveAccount:()=>{},getActiveAccount:()=>null,initializeWrapperLibrary:()=>{},setNavigationClient:()=>{},getConfiguration:()=>{throw(0,s.jz)(r.dg)},hydrateCache:()=>Promise.reject((0,s.jz)(r.dg)),clearCache:()=>Promise.reject((0,s.jz)(r.dg))};var a=i(58090),l=i(95177);const c={instance:o,inProgress:a.T$.None,accounts:[],logger:new l.V({})},h=n.createContext(c);h.Consumer;var d=i(99268);class u{static getInteractionStatusFromEvent(e,t){switch(e.eventType){case d.B.LOGIN_START:return a.T$.Login;case d.B.SSO_SILENT_START:return a.T$.SsoSilent;case d.B.ACQUIRE_TOKEN_START:if(e.interactionType===a.X8.Redirect||e.interactionType===a.X8.Popup)return a.T$.AcquireToken;break;case d.B.HANDLE_REDIRECT_START:return a.T$.HandleRedirect;case d.B.LOGOUT_START:return a.T$.Logout;case d.B.SSO_SILENT_SUCCESS:case d.B.SSO_SILENT_FAILURE:if(t&&t!==a.T$.SsoSilent)break;return a.T$.None;case d.B.LOGOUT_END:if(t&&t!==a.T$.Logout)break;return a.T$.None;case d.B.HANDLE_REDIRECT_END:if(t&&t!==a.T$.HandleRedirect)break;return a.T$.None;case d.B.LOGIN_SUCCESS:case d.B.LOGIN_FAILURE:case d.B.ACQUIRE_TOKEN_SUCCESS:case d.B.ACQUIRE_TOKEN_FAILURE:case d.B.RESTORE_FROM_BFCACHE:if(e.interactionType===a.X8.Redirect||e.interactionType===a.X8.Popup){if(t&&t!==a.T$.Login&&t!==a.T$.AcquireToken)break;return a.T$.None}}return null}}function p(e,t){if(e.length!==t.length)return!1;const i=[...t];return e.every(e=>{const t=i.shift();return!(!e||!t)&&e.homeAccountId===t.homeAccountId&&e.localAccountId===t.localAccountId&&e.username===t.username})}const g="2.1.1",f="UNBLOCK_INPROGRESS",m="EVENT",v=(e,t)=>{const{type:i,payload:n}=t;let s=e.inProgress;switch(i){case f:e.inProgress===a.T$.Startup&&(s=a.T$.None,n.logger.info("MsalProvider - handleRedirectPromise resolved, setting inProgress to 'none'"));break;case m:const t=n.message,r=u.getInteractionStatusFromEvent(t,e.inProgress);r&&(n.logger.info(`MsalProvider - ${t.eventType} results in setting inProgress from ${e.inProgress} to ${r}`),s=r);break;default:throw new Error(`Unknown action type: ${i}`)}const r=n.instance.getAllAccounts();return s===e.inProgress||p(r,e.accounts)?s!==e.inProgress?{...e,inProgress:s}:p(r,e.accounts)?e:{...e,accounts:r}:{...e,inProgress:s,accounts:r}};function y({instance:e,children:t}){(0,n.useEffect)(()=>{e.initializeWrapperLibrary(a.f7.React,g)},[e]);const i=(0,n.useMemo)(()=>e.getLogger().clone("@azure/msal-react",g),[e]),[s,r]=(0,n.useReducer)(v,void 0,()=>({inProgress:a.T$.Startup,accounts:e.getAllAccounts()}));(0,n.useEffect)(()=>{const t=e.addEventCallback(t=>{r({payload:{instance:e,logger:i,message:t},type:m})});return i.verbose(`MsalProvider - Registered event callback with id: ${t}`),e.initialize().then(()=>{e.handleRedirectPromise().catch(()=>{}).finally(()=>{r({payload:{instance:e,logger:i},type:f})})}).catch(()=>{}),()=>{t&&(i.verbose(`MsalProvider - Removing event callback ${t}`),e.removeEventCallback(t))}},[e,i]);const o={instance:e,inProgress:s.inProgress,accounts:s.accounts,logger:i};return n.createElement(h.Provider,{value:o},t)}const C=()=>(0,n.useContext)(h);i(90865).lR},73956(e,t,i){"use strict";function n(e,t){(null==t||t>e.length)&&(t=e.length);for(var i=0,n=Array(t);i<t;i++)n[i]=e[i];return n}i.d(t,{A:()=>n})},81056(e,t,i){"use strict";function n(e){if(Array.isArray(e))return e}i.d(t,{A:()=>n})},53378(e,t,i){"use strict";function n(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}i.d(t,{A:()=>n})},40248(e,t,i){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}i.d(t,{A:()=>n})},134(e,t,i){"use strict";i.d(t,{A:()=>r});var n=i(70449);function s(e,t){for(var i=0;i<t.length;i++){var s=t[i];s.enumerable=s.enumerable||!1,s.configurable=!0,"value"in s&&(s.writable=!0),Object.defineProperty(e,(0,n.A)(s.key),s)}}function r(e,t,i){return t&&s(e.prototype,t),i&&s(e,i),Object.defineProperty(e,"prototype",{writable:!1}),e}},99427(e,t,i){"use strict";function n(e){return n=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},n(e)}function s(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(s=function(){return!!e})()}i.d(t,{A:()=>a});var r=i(35681),o=i(53378);function a(e){var t=s();return function(){var i,s=n(e);if(t){var a=n(this).constructor;i=Reflect.construct(s,arguments,a)}else i=s.apply(this,arguments);return function(e,t){if(t&&("object"==(0,r.A)(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return(0,o.A)(e)}(this,i)}}},55106(e,t,i){"use strict";i.d(t,{A:()=>s});var n=i(70449);function s(e,t,i){return(t=(0,n.A)(t))in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,e}},67311(e,t,i){"use strict";function n(){return n=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var i=arguments[t];for(var n in i)({}).hasOwnProperty.call(i,n)&&(e[n]=i[n])}return e},n.apply(null,arguments)}i.d(t,{A:()=>n})},85416(e,t,i){"use strict";i.d(t,{A:()=>s});var n=i(47191);function s(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&(0,n.A)(e,t)}},32252(e,t,i){"use strict";i.d(t,{A:()=>s});var n=i(47191);function s(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,(0,n.A)(e,t)}},97382(e,t,i){"use strict";function n(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}i.d(t,{A:()=>n})},56149(e,t,i){"use strict";function n(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}i.d(t,{A:()=>n})},7092(e,t,i){"use strict";i.d(t,{A:()=>r});var n=i(55106);function s(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),i.push.apply(i,n)}return i}function r(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?s(Object(i),!0).forEach(function(t){(0,n.A)(e,t,i[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):s(Object(i)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))})}return e}},54818(e,t,i){"use strict";i.d(t,{A:()=>s});var n=i(1110);function s(e,t){if(null==e)return{};var i,s,r=(0,n.A)(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(s=0;s<o.length;s++)i=o[s],-1===t.indexOf(i)&&{}.propertyIsEnumerable.call(e,i)&&(r[i]=e[i])}return r}},1110(e,t,i){"use strict";function n(e,t){if(null==e)return{};var i={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(-1!==t.indexOf(n))continue;i[n]=e[n]}return i}i.d(t,{A:()=>n})},47191(e,t,i){"use strict";function n(e,t){return n=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},n(e,t)}i.d(t,{A:()=>n})},42761(e,t,i){"use strict";i.d(t,{A:()=>o});var n=i(81056),s=i(55913),r=i(56149);function o(e,t){return(0,n.A)(e)||function(e,t){var i=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=i){var n,s,r,o,a=[],l=!0,c=!1;try{if(r=(i=i.call(e)).next,0===t){if(Object(i)!==i)return;l=!1}else for(;!(l=(n=r.call(i)).done)&&(a.push(n.value),a.length!==t);l=!0);}catch(e){c=!0,s=e}finally{try{if(!l&&null!=i.return&&(o=i.return(),Object(o)!==o))return}finally{if(c)throw s}}return a}}(e,t)||(0,s.A)(e,t)||(0,r.A)()}},43519(e,t,i){"use strict";function n(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}i.d(t,{A:()=>n})},46980(e,t,i){"use strict";i.d(t,{A:()=>a});var n=i(81056),s=i(97382),r=i(55913),o=i(56149);function a(e){return(0,n.A)(e)||(0,s.A)(e)||(0,r.A)(e)||(0,o.A)()}},58337(e,t,i){"use strict";i.d(t,{A:()=>o});var n=i(73956),s=i(97382),r=i(55913);function o(e){return function(e){if(Array.isArray(e))return(0,n.A)(e)}(e)||(0,s.A)(e)||(0,r.A)(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}},70449(e,t,i){"use strict";i.d(t,{A:()=>s});var n=i(35681);function s(e){var t=function(e){if("object"!=(0,n.A)(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var i=t.call(e,"string");if("object"!=(0,n.A)(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==(0,n.A)(t)?t:t+""}},35681(e,t,i){"use strict";function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}i.d(t,{A:()=>n})},55913(e,t,i){"use strict";i.d(t,{A:()=>s});var n=i(73956);function s(e,t){if(e){if("string"==typeof e)return(0,n.A)(e,t);var i={}.toString.call(e).slice(8,-1);return"Object"===i&&e.constructor&&(i=e.constructor.name),"Map"===i||"Set"===i?Array.from(e):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?(0,n.A)(e,t):void 0}}},97767(e,t,i){"use strict";i.d(t,{UE:()=>_,RK:()=>L,ll:()=>D,rD:()=>V,__:()=>I,UU:()=>P,jD:()=>O,mG:()=>F,ER:()=>G,cY:()=>R,iD:()=>A,BN:()=>k,Ej:()=>N});var n=i(67500);function s(e,t,i){let{reference:s,floating:r}=e;const o=(0,n.TV)(t),a=(0,n.Dz)(t),l=(0,n.sq)(a),c=(0,n.C0)(t),h="y"===o,d=s.x+s.width/2-r.width/2,u=s.y+s.height/2-r.height/2,p=s[l]/2-r[l]/2;let g;switch(c){case"top":g={x:d,y:s.y-r.height};break;case"bottom":g={x:d,y:s.y+s.height};break;case"right":g={x:s.x+s.width,y:u};break;case"left":g={x:s.x-r.width,y:u};break;default:g={x:s.x,y:s.y}}switch((0,n.Sg)(t)){case"start":g[a]-=p*(i&&h?-1:1);break;case"end":g[a]+=p*(i&&h?-1:1)}return g}async function r(e,t){var i;void 0===t&&(t={});const{x:s,y:r,platform:o,rects:a,elements:l,strategy:c}=e,{boundary:h="clippingAncestors",rootBoundary:d="viewport",elementContext:u="floating",altBoundary:p=!1,padding:g=0}=(0,n._3)(t,e),f=(0,n.nI)(g),m=l[p?"floating"===u?"reference":"floating":u],v=(0,n.B1)(await o.getClippingRect({element:null==(i=await(null==o.isElement?void 0:o.isElement(m)))||i?m:m.contextElement||await(null==o.getDocumentElement?void 0:o.getDocumentElement(l.floating)),boundary:h,rootBoundary:d,strategy:c})),y="floating"===u?{x:s,y:r,width:a.floating.width,height:a.floating.height}:a.reference,C=await(null==o.getOffsetParent?void 0:o.getOffsetParent(l.floating)),b=await(null==o.isElement?void 0:o.isElement(C))&&await(null==o.getScale?void 0:o.getScale(C))||{x:1,y:1},S=(0,n.B1)(o.convertOffsetParentRelativeRectToViewportRelativeRect?await o.convertOffsetParentRelativeRectToViewportRelativeRect({elements:l,rect:y,offsetParent:C,strategy:c}):y);return{top:(v.top-S.top+f.top)/b.y,bottom:(S.bottom-v.bottom+f.bottom)/b.y,left:(v.left-S.left+f.left)/b.x,right:(S.right-v.right+f.right)/b.x}}function o(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function a(e){return n.r_.some(t=>e[t]>=0)}function l(e){const t=(0,n.jk)(...e.map(e=>e.left)),i=(0,n.jk)(...e.map(e=>e.top));return{x:t,y:i,width:(0,n.T9)(...e.map(e=>e.right))-t,height:(0,n.T9)(...e.map(e=>e.bottom))-i}}const c=new Set(["left","top"]);var h=i(28442);function d(e){const t=(0,h.L9)(e);let i=parseFloat(t.width)||0,s=parseFloat(t.height)||0;const r=(0,h.sb)(e),o=r?e.offsetWidth:i,a=r?e.offsetHeight:s,l=(0,n.LI)(i)!==o||(0,n.LI)(s)!==a;return l&&(i=o,s=a),{width:i,height:s,$:l}}function u(e){return(0,h.vq)(e)?e:e.contextElement}function p(e){const t=u(e);if(!(0,h.sb)(t))return(0,n.Jx)(1);const i=t.getBoundingClientRect(),{width:s,height:r,$:o}=d(t);let a=(o?(0,n.LI)(i.width):i.width)/s,l=(o?(0,n.LI)(i.height):i.height)/r;return a&&Number.isFinite(a)||(a=1),l&&Number.isFinite(l)||(l=1),{x:a,y:l}}const g=(0,n.Jx)(0);function f(e){const t=(0,h.zk)(e);return(0,h.Tc)()&&t.visualViewport?{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}:g}function m(e,t,i,s){void 0===t&&(t=!1),void 0===i&&(i=!1);const r=e.getBoundingClientRect(),o=u(e);let a=(0,n.Jx)(1);t&&(s?(0,h.vq)(s)&&(a=p(s)):a=p(e));const l=function(e,t,i){return void 0===t&&(t=!1),!(!i||t&&i!==(0,h.zk)(e))&&t}(o,i,s)?f(o):(0,n.Jx)(0);let c=(r.left+l.x)/a.x,d=(r.top+l.y)/a.y,g=r.width/a.x,m=r.height/a.y;if(o){const e=(0,h.zk)(o),t=s&&(0,h.vq)(s)?(0,h.zk)(s):s;let i=e,n=(0,h._m)(i);for(;n&&s&&t!==i;){const e=p(n),t=n.getBoundingClientRect(),s=(0,h.L9)(n),r=t.left+(n.clientLeft+parseFloat(s.paddingLeft))*e.x,o=t.top+(n.clientTop+parseFloat(s.paddingTop))*e.y;c*=e.x,d*=e.y,g*=e.x,m*=e.y,c+=r,d+=o,i=(0,h.zk)(n),n=(0,h._m)(i)}}return(0,n.B1)({width:g,height:m,x:c,y:d})}function v(e,t){const i=(0,h.CP)(e).scrollLeft;return t?t.left+i:m((0,h.ep)(e)).left+i}function y(e,t){const i=e.getBoundingClientRect();return{x:i.left+t.scrollLeft-v(e,i),y:i.top+t.scrollTop}}const C=new Set(["absolute","fixed"]);function b(e,t,i){let s;if("viewport"===t)s=function(e,t){const i=(0,h.zk)(e),n=(0,h.ep)(e),s=i.visualViewport;let r=n.clientWidth,o=n.clientHeight,a=0,l=0;if(s){r=s.width,o=s.height;const e=(0,h.Tc)();(!e||e&&"fixed"===t)&&(a=s.offsetLeft,l=s.offsetTop)}const c=v(n);if(c<=0){const e=n.ownerDocument,t=e.body,i=getComputedStyle(t),s="CSS1Compat"===e.compatMode&&parseFloat(i.marginLeft)+parseFloat(i.marginRight)||0,o=Math.abs(n.clientWidth-t.clientWidth-s);o<=25&&(r-=o)}else c<=25&&(r+=c);return{width:r,height:o,x:a,y:l}}(e,i);else if("document"===t)s=function(e){const t=(0,h.ep)(e),i=(0,h.CP)(e),s=e.ownerDocument.body,r=(0,n.T9)(t.scrollWidth,t.clientWidth,s.scrollWidth,s.clientWidth),o=(0,n.T9)(t.scrollHeight,t.clientHeight,s.scrollHeight,s.clientHeight);let a=-i.scrollLeft+v(e);const l=-i.scrollTop;return"rtl"===(0,h.L9)(s).direction&&(a+=(0,n.T9)(t.clientWidth,s.clientWidth)-r),{width:r,height:o,x:a,y:l}}((0,h.ep)(e));else if((0,h.vq)(t))s=function(e,t){const i=m(e,!0,"fixed"===t),s=i.top+e.clientTop,r=i.left+e.clientLeft,o=(0,h.sb)(e)?p(e):(0,n.Jx)(1);return{width:e.clientWidth*o.x,height:e.clientHeight*o.y,x:r*o.x,y:s*o.y}}(t,i);else{const i=f(e);s={x:t.x-i.x,y:t.y-i.y,width:t.width,height:t.height}}return(0,n.B1)(s)}function S(e,t){const i=(0,h.$4)(e);return!(i===t||!(0,h.vq)(i)||(0,h.eu)(i))&&("fixed"===(0,h.L9)(i).position||S(i,t))}function w(e,t,i){const s=(0,h.sb)(t),r=(0,h.ep)(t),o="fixed"===i,a=m(e,!0,o,t);let l={scrollLeft:0,scrollTop:0};const c=(0,n.Jx)(0);function d(){c.x=v(r)}if(s||!s&&!o)if(("body"!==(0,h.mq)(t)||(0,h.ZU)(r))&&(l=(0,h.CP)(t)),s){const e=m(t,!0,o,t);c.x=e.x+t.clientLeft,c.y=e.y+t.clientTop}else r&&d();o&&!s&&r&&d();const u=!r||s||o?(0,n.Jx)(0):y(r,l);return{x:a.left+l.scrollLeft-c.x-u.x,y:a.top+l.scrollTop-c.y-u.y,width:a.width,height:a.height}}function x(e){return"static"===(0,h.L9)(e).position}function E(e,t){if(!(0,h.sb)(e)||"fixed"===(0,h.L9)(e).position)return null;if(t)return t(e);let i=e.offsetParent;return(0,h.ep)(e)===i&&(i=i.ownerDocument.body),i}function M(e,t){const i=(0,h.zk)(e);if((0,h.Tf)(e))return i;if(!(0,h.sb)(e)){let t=(0,h.$4)(e);for(;t&&!(0,h.eu)(t);){if((0,h.vq)(t)&&!x(t))return t;t=(0,h.$4)(t)}return i}let n=E(e,t);for(;n&&(0,h.Lv)(n)&&x(n);)n=E(n,t);return n&&(0,h.eu)(n)&&x(n)&&!(0,h.sQ)(n)?i:n||(0,h.gJ)(e)||i}const A={convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{elements:t,rect:i,offsetParent:s,strategy:r}=e;const o="fixed"===r,a=(0,h.ep)(s),l=!!t&&(0,h.Tf)(t.floating);if(s===a||l&&o)return i;let c={scrollLeft:0,scrollTop:0},d=(0,n.Jx)(1);const u=(0,n.Jx)(0),g=(0,h.sb)(s);if((g||!g&&!o)&&(("body"!==(0,h.mq)(s)||(0,h.ZU)(a))&&(c=(0,h.CP)(s)),(0,h.sb)(s))){const e=m(s);d=p(s),u.x=e.x+s.clientLeft,u.y=e.y+s.clientTop}const f=!a||g||o?(0,n.Jx)(0):y(a,c);return{width:i.width*d.x,height:i.height*d.y,x:i.x*d.x-c.scrollLeft*d.x+u.x+f.x,y:i.y*d.y-c.scrollTop*d.y+u.y+f.y}},getDocumentElement:h.ep,getClippingRect:function(e){let{element:t,boundary:i,rootBoundary:s,strategy:r}=e;const o=[..."clippingAncestors"===i?(0,h.Tf)(t)?[]:function(e,t){const i=t.get(e);if(i)return i;let n=(0,h.v9)(e,[],!1).filter(e=>(0,h.vq)(e)&&"body"!==(0,h.mq)(e)),s=null;const r="fixed"===(0,h.L9)(e).position;let o=r?(0,h.$4)(e):e;for(;(0,h.vq)(o)&&!(0,h.eu)(o);){const t=(0,h.L9)(o),i=(0,h.sQ)(o);i||"fixed"!==t.position||(s=null),(r?!i&&!s:!i&&"static"===t.position&&s&&C.has(s.position)||(0,h.ZU)(o)&&!i&&S(e,o))?n=n.filter(e=>e!==o):s=t,o=(0,h.$4)(o)}return t.set(e,n),n}(t,this._c):[].concat(i),s],a=o[0],l=o.reduce((e,i)=>{const s=b(t,i,r);return e.top=(0,n.T9)(s.top,e.top),e.right=(0,n.jk)(s.right,e.right),e.bottom=(0,n.jk)(s.bottom,e.bottom),e.left=(0,n.T9)(s.left,e.left),e},b(t,a,r));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}},getOffsetParent:M,getElementRects:async function(e){const t=this.getOffsetParent||M,i=this.getDimensions,n=await i(e.floating);return{reference:w(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:n.width,height:n.height}}},getClientRects:function(e){return Array.from(e.getClientRects())},getDimensions:function(e){const{width:t,height:i}=d(e);return{width:t,height:i}},getScale:p,isElement:h.vq,isRTL:function(e){return"rtl"===(0,h.L9)(e).direction}};function T(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function D(e,t,i,s){void 0===s&&(s={});const{ancestorScroll:r=!0,ancestorResize:o=!0,elementResize:a="function"==typeof ResizeObserver,layoutShift:l="function"==typeof IntersectionObserver,animationFrame:c=!1}=s,d=u(e),p=r||o?[...d?(0,h.v9)(d):[],...(0,h.v9)(t)]:[];p.forEach(e=>{r&&e.addEventListener("scroll",i,{passive:!0}),o&&e.addEventListener("resize",i)});const g=d&&l?function(e,t){let i,s=null;const r=(0,h.ep)(e);function o(){var e;clearTimeout(i),null==(e=s)||e.disconnect(),s=null}return function a(l,c){void 0===l&&(l=!1),void 0===c&&(c=1),o();const h=e.getBoundingClientRect(),{left:d,top:u,width:p,height:g}=h;if(l||t(),!p||!g)return;const f={rootMargin:-(0,n.RI)(u)+"px "+-(0,n.RI)(r.clientWidth-(d+p))+"px "+-(0,n.RI)(r.clientHeight-(u+g))+"px "+-(0,n.RI)(d)+"px",threshold:(0,n.T9)(0,(0,n.jk)(1,c))||1};let m=!0;function v(t){const n=t[0].intersectionRatio;if(n!==c){if(!m)return a();n?a(!1,n):i=setTimeout(()=>{a(!1,1e-7)},1e3)}1!==n||T(h,e.getBoundingClientRect())||a(),m=!1}try{s=new IntersectionObserver(v,{...f,root:r.ownerDocument})}catch(e){s=new IntersectionObserver(v,f)}s.observe(e)}(!0),o}(d,i):null;let f,v=-1,y=null;a&&(y=new ResizeObserver(e=>{let[n]=e;n&&n.target===d&&y&&(y.unobserve(t),cancelAnimationFrame(v),v=requestAnimationFrame(()=>{var e;null==(e=y)||e.observe(t)})),i()}),d&&!c&&y.observe(d),y.observe(t));let C=c?m(e):null;return c&&function t(){const n=m(e);C&&!T(C,n)&&i(),C=n,f=requestAnimationFrame(t)}(),i(),()=>{var e;p.forEach(e=>{r&&e.removeEventListener("scroll",i),o&&e.removeEventListener("resize",i)}),null==g||g(),null==(e=y)||e.disconnect(),y=null,c&&cancelAnimationFrame(f)}}const I=r,R=function(e){return void 0===e&&(e=0),{name:"offset",options:e,async fn(t){var i,s;const{x:r,y:o,placement:a,middlewareData:l}=t,h=await async function(e,t){const{placement:i,platform:s,elements:r}=e,o=await(null==s.isRTL?void 0:s.isRTL(r.floating)),a=(0,n.C0)(i),l=(0,n.Sg)(i),h="y"===(0,n.TV)(i),d=c.has(a)?-1:1,u=o&&h?-1:1,p=(0,n._3)(t,e);let{mainAxis:g,crossAxis:f,alignmentAxis:m}="number"==typeof p?{mainAxis:p,crossAxis:0,alignmentAxis:null}:{mainAxis:p.mainAxis||0,crossAxis:p.crossAxis||0,alignmentAxis:p.alignmentAxis};return l&&"number"==typeof m&&(f="end"===l?-1*m:m),h?{x:f*u,y:g*d}:{x:g*d,y:f*u}}(t,e);return a===(null==(i=l.offset)?void 0:i.placement)&&null!=(s=l.arrow)&&s.alignmentOffset?{}:{x:r+h.x,y:o+h.y,data:{...h,placement:a}}}}},L=function(e){return void 0===e&&(e={}),{name:"autoPlacement",options:e,async fn(t){var i,s,r;const{rects:o,middlewareData:a,placement:l,platform:c,elements:h}=t,{crossAxis:d=!1,alignment:u,allowedPlacements:p=n.DD,autoAlignment:g=!0,...f}=(0,n._3)(e,t),m=void 0!==u||p===n.DD?function(e,t,i){return(e?[...i.filter(t=>(0,n.Sg)(t)===e),...i.filter(t=>(0,n.Sg)(t)!==e)]:i.filter(e=>(0,n.C0)(e)===e)).filter(i=>!e||(0,n.Sg)(i)===e||!!t&&(0,n.aD)(i)!==i)}(u||null,g,p):p,v=await c.detectOverflow(t,f),y=(null==(i=a.autoPlacement)?void 0:i.index)||0,C=m[y];if(null==C)return{};const b=(0,n.w7)(C,o,await(null==c.isRTL?void 0:c.isRTL(h.floating)));if(l!==C)return{reset:{placement:m[0]}};const S=[v[(0,n.C0)(C)],v[b[0]],v[b[1]]],w=[...(null==(s=a.autoPlacement)?void 0:s.overflows)||[],{placement:C,overflows:S}],x=m[y+1];if(x)return{data:{index:y+1,overflows:w},reset:{placement:x}};const E=w.map(e=>{const t=(0,n.Sg)(e.placement);return[e.placement,t&&d?e.overflows.slice(0,2).reduce((e,t)=>e+t,0):e.overflows[0],e.overflows]}).sort((e,t)=>e[1]-t[1]),M=(null==(r=E.filter(e=>e[2].slice(0,(0,n.Sg)(e[0])?2:3).every(e=>e<=0))[0])?void 0:r[0])||E[0][0];return M!==l?{data:{index:y+1,overflows:w},reset:{placement:M}}:{}}}},k=function(e){return void 0===e&&(e={}),{name:"shift",options:e,async fn(t){const{x:i,y:s,placement:r,platform:o}=t,{mainAxis:a=!0,crossAxis:l=!1,limiter:c={fn:e=>{let{x:t,y:i}=e;return{x:t,y:i}}},...h}=(0,n._3)(e,t),d={x:i,y:s},u=await o.detectOverflow(t,h),p=(0,n.TV)((0,n.C0)(r)),g=(0,n.PG)(p);let f=d[g],m=d[p];if(a){const e="y"===g?"bottom":"right",t=f+u["y"===g?"top":"left"],i=f-u[e];f=(0,n.qE)(t,f,i)}if(l){const e="y"===p?"bottom":"right",t=m+u["y"===p?"top":"left"],i=m-u[e];m=(0,n.qE)(t,m,i)}const v=c.fn({...t,[g]:f,[p]:m});return{...v,data:{x:v.x-i,y:v.y-s,enabled:{[g]:a,[p]:l}}}}}},P=function(e){return void 0===e&&(e={}),{name:"flip",options:e,async fn(t){var i,s;const{placement:r,middlewareData:o,rects:a,initialPlacement:l,platform:c,elements:h}=t,{mainAxis:d=!0,crossAxis:u=!0,fallbackPlacements:p,fallbackStrategy:g="bestFit",fallbackAxisSideDirection:f="none",flipAlignment:m=!0,...v}=(0,n._3)(e,t);if(null!=(i=o.arrow)&&i.alignmentOffset)return{};const y=(0,n.C0)(r),C=(0,n.TV)(l),b=(0,n.C0)(l)===l,S=await(null==c.isRTL?void 0:c.isRTL(h.floating)),w=p||(b||!m?[(0,n.bV)(l)]:(0,n.WJ)(l)),x="none"!==f;!p&&x&&w.push(...(0,n.lP)(l,m,f,S));const E=[l,...w],M=await c.detectOverflow(t,v),A=[];let T=(null==(s=o.flip)?void 0:s.overflows)||[];if(d&&A.push(M[y]),u){const e=(0,n.w7)(r,a,S);A.push(M[e[0]],M[e[1]])}if(T=[...T,{placement:r,overflows:A}],!A.every(e=>e<=0)){var D,I;const e=((null==(D=o.flip)?void 0:D.index)||0)+1,t=E[e];if(t&&("alignment"!==u||C===(0,n.TV)(t)||T.every(e=>(0,n.TV)(e.placement)!==C||e.overflows[0]>0)))return{data:{index:e,overflows:T},reset:{placement:t}};let i=null==(I=T.filter(e=>e.overflows[0]<=0).sort((e,t)=>e.overflows[1]-t.overflows[1])[0])?void 0:I.placement;if(!i)switch(g){case"bestFit":{var R;const e=null==(R=T.filter(e=>{if(x){const t=(0,n.TV)(e.placement);return t===C||"y"===t}return!0}).map(e=>[e.placement,e.overflows.filter(e=>e>0).reduce((e,t)=>e+t,0)]).sort((e,t)=>e[1]-t[1])[0])?void 0:R[0];e&&(i=e);break}case"initialPlacement":i=l}if(r!==i)return{reset:{placement:i}}}return{}}}},N=function(e){return void 0===e&&(e={}),{name:"size",options:e,async fn(t){var i,s;const{placement:r,rects:o,platform:a,elements:l}=t,{apply:c=()=>{},...h}=(0,n._3)(e,t),d=await a.detectOverflow(t,h),u=(0,n.C0)(r),p=(0,n.Sg)(r),g="y"===(0,n.TV)(r),{width:f,height:m}=o.floating;let v,y;"top"===u||"bottom"===u?(v=u,y=p===(await(null==a.isRTL?void 0:a.isRTL(l.floating))?"start":"end")?"left":"right"):(y=u,v="end"===p?"top":"bottom");const C=m-d.top-d.bottom,b=f-d.left-d.right,S=(0,n.jk)(m-d[v],C),w=(0,n.jk)(f-d[y],b),x=!t.middlewareData.shift;let E=S,M=w;if(null!=(i=t.middlewareData.shift)&&i.enabled.x&&(M=b),null!=(s=t.middlewareData.shift)&&s.enabled.y&&(E=C),x&&!p){const e=(0,n.T9)(d.left,0),t=(0,n.T9)(d.right,0),i=(0,n.T9)(d.top,0),s=(0,n.T9)(d.bottom,0);g?M=f-2*(0!==e||0!==t?e+t:(0,n.T9)(d.left,d.right)):E=m-2*(0!==i||0!==s?i+s:(0,n.T9)(d.top,d.bottom))}await c({...t,availableWidth:M,availableHeight:E});const A=await a.getDimensions(l.floating);return f!==A.width||m!==A.height?{reset:{rects:!0}}:{}}}},O=function(e){return void 0===e&&(e={}),{name:"hide",options:e,async fn(t){const{rects:i,platform:s}=t,{strategy:r="referenceHidden",...l}=(0,n._3)(e,t);switch(r){case"referenceHidden":{const e=o(await s.detectOverflow(t,{...l,elementContext:"reference"}),i.reference);return{data:{referenceHiddenOffsets:e,referenceHidden:a(e)}}}case"escaped":{const e=o(await s.detectOverflow(t,{...l,altBoundary:!0}),i.floating);return{data:{escapedOffsets:e,escaped:a(e)}}}default:return{}}}}},_=e=>({name:"arrow",options:e,async fn(t){const{x:i,y:s,placement:r,rects:o,platform:a,elements:l,middlewareData:c}=t,{element:h,padding:d=0}=(0,n._3)(e,t)||{};if(null==h)return{};const u=(0,n.nI)(d),p={x:i,y:s},g=(0,n.Dz)(r),f=(0,n.sq)(g),m=await a.getDimensions(h),v="y"===g,y=v?"top":"left",C=v?"bottom":"right",b=v?"clientHeight":"clientWidth",S=o.reference[f]+o.reference[g]-p[g]-o.floating[f],w=p[g]-o.reference[g],x=await(null==a.getOffsetParent?void 0:a.getOffsetParent(h));let E=x?x[b]:0;E&&await(null==a.isElement?void 0:a.isElement(x))||(E=l.floating[b]||o.floating[f]);const M=S/2-w/2,A=E/2-m[f]/2-1,T=(0,n.jk)(u[y],A),D=(0,n.jk)(u[C],A),I=T,R=E-m[f]-D,L=E/2-m[f]/2+M,k=(0,n.qE)(I,L,R),P=!c.arrow&&null!=(0,n.Sg)(r)&&L!==k&&o.reference[f]/2-(L<I?T:D)-m[f]/2<0,N=P?L<I?L-I:L-R:0;return{[g]:p[g]+N,data:{[g]:k,centerOffset:L-k-N,...P&&{alignmentOffset:N}},reset:P}}}),F=function(e){return void 0===e&&(e={}),{name:"inline",options:e,async fn(t){const{placement:i,elements:s,rects:r,platform:o,strategy:a}=t,{padding:c=2,x:h,y:d}=(0,n._3)(e,t),u=Array.from(await(null==o.getClientRects?void 0:o.getClientRects(s.reference))||[]),p=function(e){const t=e.slice().sort((e,t)=>e.y-t.y),i=[];let s=null;for(let e=0;e<t.length;e++){const n=t[e];!s||n.y-s.y>s.height/2?i.push([n]):i[i.length-1].push(n),s=n}return i.map(e=>(0,n.B1)(l(e)))}(u),g=(0,n.B1)(l(u)),f=(0,n.nI)(c),m=await o.getElementRects({reference:{getBoundingClientRect:function(){if(2===p.length&&p[0].left>p[1].right&&null!=h&&null!=d)return p.find(e=>h>e.left-f.left&&h<e.right+f.right&&d>e.top-f.top&&d<e.bottom+f.bottom)||g;if(p.length>=2){if("y"===(0,n.TV)(i)){const e=p[0],t=p[p.length-1],s="top"===(0,n.C0)(i),r=e.top,o=t.bottom,a=s?e.left:t.left,l=s?e.right:t.right;return{top:r,bottom:o,left:a,right:l,width:l-a,height:o-r,x:a,y:r}}const e="left"===(0,n.C0)(i),t=(0,n.T9)(...p.map(e=>e.right)),s=(0,n.jk)(...p.map(e=>e.left)),r=p.filter(i=>e?i.left===s:i.right===t),o=r[0].top,a=r[r.length-1].bottom;return{top:o,bottom:a,left:s,right:t,width:t-s,height:a-o,x:s,y:o}}return g}},floating:s.floating,strategy:a});return r.reference.x!==m.reference.x||r.reference.y!==m.reference.y||r.reference.width!==m.reference.width||r.reference.height!==m.reference.height?{reset:{rects:m}}:{}}}},G=function(e){return void 0===e&&(e={}),{options:e,fn(t){const{x:i,y:s,placement:r,rects:o,middlewareData:a}=t,{offset:l=0,mainAxis:h=!0,crossAxis:d=!0}=(0,n._3)(e,t),u={x:i,y:s},p=(0,n.TV)(r),g=(0,n.PG)(p);let f=u[g],m=u[p];const v=(0,n._3)(l,t),y="number"==typeof v?{mainAxis:v,crossAxis:0}:{mainAxis:0,crossAxis:0,...v};if(h){const e="y"===g?"height":"width",t=o.reference[g]-o.floating[e]+y.mainAxis,i=o.reference[g]+o.reference[e]-y.mainAxis;f<t?f=t:f>i&&(f=i)}if(d){var C,b;const e="y"===g?"width":"height",t=c.has((0,n.C0)(r)),i=o.reference[p]-o.floating[e]+(t&&(null==(C=a.offset)?void 0:C[p])||0)+(t?0:y.crossAxis),s=o.reference[p]+o.reference[e]+(t?0:(null==(b=a.offset)?void 0:b[p])||0)-(t?y.crossAxis:0);m<i?m=i:m>s&&(m=s)}return{[g]:f,[p]:m}}}},V=(e,t,i)=>{const n=new Map,o={platform:A,...i},a={...o.platform,_c:n};return(async(e,t,i)=>{const{placement:n="bottom",strategy:o="absolute",middleware:a=[],platform:l}=i,c=a.filter(Boolean),h=await(null==l.isRTL?void 0:l.isRTL(t));let d=await l.getElementRects({reference:e,floating:t,strategy:o}),{x:u,y:p}=s(d,n,h),g=n,f={},m=0;for(let i=0;i<c.length;i++){var v;const{name:a,fn:y}=c[i],{x:C,y:b,data:S,reset:w}=await y({x:u,y:p,initialPlacement:n,placement:g,strategy:o,middlewareData:f,rects:d,platform:{...l,detectOverflow:null!=(v=l.detectOverflow)?v:r},elements:{reference:e,floating:t}});u=null!=C?C:u,p=null!=b?b:p,f={...f,[a]:{...f[a],...S}},w&&m<=50&&(m++,"object"==typeof w&&(w.placement&&(g=w.placement),w.rects&&(d=!0===w.rects?await l.getElementRects({reference:e,floating:t,strategy:o}):w.rects),({x:u,y:p}=s(d,g,h))),i=-1)}return{x:u,y:p,placement:g,strategy:o,middlewareData:f}})(e,t,{...o,platform:a})}},28442(e,t,i){"use strict";function n(){return"undefined"!=typeof window}function s(e){return a(e)?(e.nodeName||"").toLowerCase():"#document"}function r(e){var t;return(null==e||null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function o(e){var t;return null==(t=(a(e)?e.ownerDocument:e.document)||window.document)?void 0:t.documentElement}function a(e){return!!n()&&(e instanceof Node||e instanceof r(e).Node)}function l(e){return!!n()&&(e instanceof Element||e instanceof r(e).Element)}function c(e){return!!n()&&(e instanceof HTMLElement||e instanceof r(e).HTMLElement)}function h(e){return!(!n()||"undefined"==typeof ShadowRoot)&&(e instanceof ShadowRoot||e instanceof r(e).ShadowRoot)}i.d(t,{$4:()=>T,CP:()=>A,L9:()=>M,Ll:()=>a,Lv:()=>g,Ng:()=>h,Tc:()=>w,Tf:()=>m,ZU:()=>u,_m:()=>R,ep:()=>o,eu:()=>E,gJ:()=>S,mq:()=>s,sQ:()=>b,sb:()=>c,v9:()=>I,vq:()=>l,zk:()=>r});const d=new Set(["inline","contents"]);function u(e){const{overflow:t,overflowX:i,overflowY:n,display:s}=M(e);return/auto|scroll|overlay|hidden|clip/.test(t+n+i)&&!d.has(s)}const p=new Set(["table","td","th"]);function g(e){return p.has(s(e))}const f=[":popover-open",":modal"];function m(e){return f.some(t=>{try{return e.matches(t)}catch(e){return!1}})}const v=["transform","translate","scale","rotate","perspective"],y=["transform","translate","scale","rotate","perspective","filter"],C=["paint","layout","strict","content"];function b(e){const t=w(),i=l(e)?M(e):e;return v.some(e=>!!i[e]&&"none"!==i[e])||!!i.containerType&&"normal"!==i.containerType||!t&&!!i.backdropFilter&&"none"!==i.backdropFilter||!t&&!!i.filter&&"none"!==i.filter||y.some(e=>(i.willChange||"").includes(e))||C.some(e=>(i.contain||"").includes(e))}function S(e){let t=T(e);for(;c(t)&&!E(t);){if(b(t))return t;if(m(t))return null;t=T(t)}return null}function w(){return!("undefined"==typeof CSS||!CSS.supports)&&CSS.supports("-webkit-backdrop-filter","none")}const x=new Set(["html","body","#document"]);function E(e){return x.has(s(e))}function M(e){return r(e).getComputedStyle(e)}function A(e){return l(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function T(e){if("html"===s(e))return e;const t=e.assignedSlot||e.parentNode||h(e)&&e.host||o(e);return h(t)?t.host:t}function D(e){const t=T(e);return E(t)?e.ownerDocument?e.ownerDocument.body:e.body:c(t)&&u(t)?t:D(t)}function I(e,t,i){var n;void 0===t&&(t=[]),void 0===i&&(i=!0);const s=D(e),o=s===(null==(n=e.ownerDocument)?void 0:n.body),a=r(s);if(o){const e=R(a);return t.concat(a,a.visualViewport||[],u(s)?s:[],e&&i?I(e):[])}return t.concat(s,I(s,[],i))}function R(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}},67500(e,t,i){"use strict";i.d(t,{B1:()=>k,C0:()=>f,DD:()=>r,Dz:()=>S,Jx:()=>h,LI:()=>l,PG:()=>v,RI:()=>c,Sg:()=>m,T9:()=>a,TV:()=>b,WJ:()=>x,_3:()=>g,aD:()=>E,bV:()=>R,jk:()=>o,lP:()=>I,nI:()=>L,qE:()=>p,r_:()=>n,sq:()=>y,w7:()=>w});const n=["top","right","bottom","left"],s=["start","end"],r=n.reduce((e,t)=>e.concat(t,t+"-"+s[0],t+"-"+s[1]),[]),o=Math.min,a=Math.max,l=Math.round,c=Math.floor,h=e=>({x:e,y:e}),d={left:"right",right:"left",bottom:"top",top:"bottom"},u={start:"end",end:"start"};function p(e,t,i){return a(e,o(t,i))}function g(e,t){return"function"==typeof e?e(t):e}function f(e){return e.split("-")[0]}function m(e){return e.split("-")[1]}function v(e){return"x"===e?"y":"x"}function y(e){return"y"===e?"height":"width"}const C=new Set(["top","bottom"]);function b(e){return C.has(f(e))?"y":"x"}function S(e){return v(b(e))}function w(e,t,i){void 0===i&&(i=!1);const n=m(e),s=S(e),r=y(s);let o="x"===s?n===(i?"end":"start")?"right":"left":"start"===n?"bottom":"top";return t.reference[r]>t.floating[r]&&(o=R(o)),[o,R(o)]}function x(e){const t=R(e);return[E(e),t,E(t)]}function E(e){return e.replace(/start|end/g,e=>u[e])}const M=["left","right"],A=["right","left"],T=["top","bottom"],D=["bottom","top"];function I(e,t,i,n){const s=m(e);let r=function(e,t,i){switch(e){case"top":case"bottom":return i?t?A:M:t?M:A;case"left":case"right":return t?T:D;default:return[]}}(f(e),"start"===i,n);return s&&(r=r.map(e=>e+"-"+s),t&&(r=r.concat(r.map(E)))),r}function R(e){return e.replace(/left|right|bottom|top/g,e=>d[e])}function L(e){return"number"!=typeof e?function(e){return{top:0,right:0,bottom:0,left:0,...e}}(e):{top:e,right:e,bottom:e,left:e}}function k(e){const{x:t,y:i,width:n,height:s}=e;return{width:n,height:s,top:i,left:t,right:t+n,bottom:i+s,x:t,y:i}}},45401(e,t,i){"use strict";i.d(t,{Ku:()=>Tv,LW:()=>ES,Mo:()=>CS,On:()=>Dv,a9:()=>TS,n1:()=>DS,uB:()=>iw,ui:()=>mS,xv:()=>$i});var n=i(26203),s=Object.defineProperty,r=Object.getOwnPropertyDescriptor,o=(e,t)=>{for(var i in t)s(e,i,{get:t[i],enumerable:!0})},a=(e,t,i,n)=>{for(var o,a=n>1?void 0:n?r(t,i):t,l=e.length-1;l>=0;l--)(o=e[l])&&(a=(n?o(t,i,a):o(a))||a);return n&&a&&s(t,i,a),a},l=class{constructor(){this.destroyFns=[]}destroy(){for(const e of this.destroyFns)e()}},c=new class{constructor(){this.modules=[],this.dependencies=new Map,this.modulesByOptionKey=new Map}register(...e){for(const t of e){this.registerDependencies(t);const e=this.modules.find(e=>!(t.type!==e.type||"optionsKey"in t&&"optionsKey"in e&&t.optionsKey!==e.optionsKey||t.identifier!==e.identifier));if(e){if("enterprise"===t.packageType&&"community"===e.packageType){const i=this.modules.indexOf(e);this.modules.splice(i,1,t),"optionsKey"in t&&this.modulesByOptionKey.set(t.optionsKey,t)}}else this.modules.push(t),"optionsKey"in t&&this.modulesByOptionKey.set(t.optionsKey,t)}}hasEnterpriseModules(){return this.modules.some(e=>"enterprise"===e.packageType)}*byType(...e){const t=new Set,i=this.modules.filter(t=>e.includes(t.type)),n=e=>{const t=this.dependencies.get(e);return t?.flatMap(n).concat(t)??[]},s=[];for(const r of i){const i="optionsKey"in r?r.optionsKey:r.contextKey;if(!t.has(i)){for(const r of n(i)){if(t.has(r))continue;const i=this.modulesByOptionKey.get(r);i?e.includes(i.type)&&(yield i,t.add(r)):s.push(r)}yield r,t.add(i)}}if(s.length>0)throw new Error(`Could not resolve module dependencies: ${s}`)}registerDependencies(e){if(null==e.dependencies||0===e.dependencies.length)return;const t="optionsKey"in e?e.optionsKey:e.contextKey;this.dependencies.set(t,e.dependencies)}},h={containsPoint:function(e,t,i){return t>=e.x&&t<=e.x+e.width&&i>=e.y&&i<=e.y+e.height},equals:function(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height},isEmpty:function(e){return null==e||0===e.height||0===e.width||isNaN(e.height)||isNaN(e.width)},normalize:function(e){let{x:t,y:i,width:n,height:s}=e;return(null==n||n>0)&&(null==s||s>0)?e:(null!=t&&null!=n&&n<0&&(n=-n,t-=n),null!=i&&null!=s&&s<0&&(s=-s,i-=s),{x:t,y:i,width:n,height:s})}},d=Symbol("interpolate"),u=e=>null!=e[d];function p(e,t,i,n=1/0){const s={nearest:void 0,distanceSquared:n};for(const n of i){const i=n.distanceSquared(e,t);if(0===i)return{nearest:n,distanceSquared:0};i<s.distanceSquared&&(s.nearest=n,s.distanceSquared=i)}return s}function g(e,t,i,n=1/0){const{x:s=e,y:r=t}=i.transformPoint?.(e,t)??{},o={nearest:void 0,distanceSquared:n};for(const e of i.children){const{nearest:t,distanceSquared:i}=e.nearestSquared(s,r,o.distanceSquared);if(0===i)return{nearest:t,distanceSquared:i};i<o.distanceSquared&&(o.nearest=t,o.distanceSquared=i)}return o}var f=class e{constructor(e,t,i,n){this.x=e,this.y=t,this.width=i,this.height=n}static fromDOMRect({x:t,y:i,width:n,height:s}){return new e(t,i,n,s)}static merge(t){let i=1/0,n=1/0,s=-1/0,r=-1/0;for(const e of t)e.x<i&&(i=e.x),e.y<n&&(n=e.y),e.x+e.width>s&&(s=e.x+e.width),e.y+e.height>r&&(r=e.y+e.height);return new e(i,n,s-i,r-n)}static nearestBox(e,t,i){return p(e,t,i)}toDOMRect(){return{x:this.x,y:this.y,width:this.width,height:this.height,top:this.y,left:this.x,right:this.x+this.width,bottom:this.y+this.height,toJSON:()=>({})}}clone(){const{x:t,y:i,width:n,height:s}=this;return new e(t,i,n,s)}equals(e){return h.equals(this,e)}containsPoint(e,t){return h.containsPoint(this,e,t)}intersection(t){if(!this.collidesBBox(t))return;const i=(0,n.qE)(t.x,this.x,t.x+t.width),s=(0,n.qE)(t.y,this.y,t.y+t.height),r=(0,n.qE)(t.x,this.x+this.width,t.x+t.width),o=(0,n.qE)(t.y,this.y+this.height,t.y+t.height);return new e(i,s,r-i,o-s)}collidesBBox(e){return this.x<e.x+e.width&&this.x+this.width>e.x&&this.y<e.y+e.height&&this.y+this.height>e.y}computeCenter(){return{x:this.x+this.width/2,y:this.y+this.height/2}}isFinite(){return Number.isFinite(this.x)&&Number.isFinite(this.y)&&Number.isFinite(this.width)&&Number.isFinite(this.height)}distanceSquared(e,t){if(this.containsPoint(e,t))return 0;const i=e-(0,n.qE)(this.x,e,this.x+this.width),s=t-(0,n.qE)(this.y,t,this.y+this.height);return i*i+s*s}shrink(e,t){if("number"==typeof e)this.applyMargin(e,t);else for(const t of Object.keys(e)){const i=e[t];"number"==typeof i&&this.applyMargin(i,t)}return this.width<0&&(this.width=0),this.height<0&&(this.height=0),this}grow(e,t){if("number"==typeof e)this.applyMargin(-e,t);else for(const t of Object.keys(e)){const i=e[t];"number"==typeof i&&this.applyMargin(-i,t)}return this}applyMargin(e,t){switch(t){case"top":this.y+=e;case"bottom":this.height-=e;break;case"left":this.x+=e;case"right":this.width-=e;break;case"vertical":this.y+=e,this.height-=2*e;break;case"horizontal":this.x+=e,this.width-=2*e;break;case void 0:this.x+=e,this.y+=e,this.width-=2*e,this.height-=2*e}}translate(e,t){return this.x+=e,this.y+=t,this}[d](t,i){return new e(this.x*(1-i)+t.x*i,this.y*(1-i)+t.y*i,this.width*(1-i)+t.width*i,this.height*(1-i)+t.height*i)}};f.zero=Object.freeze(new f(0,0,0,0)),f.NaN=Object.freeze(new f(NaN,NaN,NaN,NaN));var m=f,v=Date.now(),y={create:(...e)=>Object.assign((...t)=>{y.check(...e)&&("function"==typeof t[0]&&(t=(0,n.$r)(t[0]())),(()=>{const e=Date.now()-v;if(e>2e3){const t=(Math.floor(e/100)/10).toFixed(1);n.Vy.log(`**** ${t}s since last log message ****`)}v=Date.now()})(),n.Vy.log(...t))},{check:()=>y.check(...e),group:(t,i)=>y.check(...e)?n.Vy.logGroup(t,i):i()}),check:(...e)=>(0===e.length&&e.push(!0),(0,n.$r)((0,n.zk)("agChartsDebug")).some(t=>e.includes(t))),inDevelopmentMode(e){if(y.check("dev"))return e()}};function C({context:e,pixelRatio:t,width:i,height:n}){e.save(),e.resetTransform(),e.clearRect(0,0,Math.ceil(i*t),Math.ceil(n*t)),e.restore()}function b(e){if(y.check("canvas")){const t=e.save.bind(e),i=e.restore.bind(e);let n=0;Object.assign(e,{save(){t(),n++},restore(){if(0===n)throw new Error("AG Charts - Unable to restore() past depth 0");i(),n--},verifyDepthZero(){if(0!==n)throw new Error(`AG Charts - Save/restore depth is non-zero: ${n}`)}})}}function S(e,t,i){return[Math.floor(e*i),Math.floor(t*i)]}var w=class{constructor(e){const{width:t,height:i,pixelRatio:n,willReadFrequently:s=!1}=e;this.width=t,this.height=i,this.pixelRatio=n;const[r,o]=S(t,i,n);this.canvas=new OffscreenCanvas(r,o),this.context=this.canvas.getContext("2d",{willReadFrequently:s}),this.context.setTransform(n,0,0,n,0,0),b(this.context)}drawImage(e,t=0,i=0){return e.drawImage(this.canvas,t,i)}transferToImageBitmap(){return this.canvas.transferToImageBitmap()}resize(e,t,i){if(!(e>0&&t>0))return;const{canvas:n,context:s}=this;if(e!==this.width||t!==this.height||i!==this.pixelRatio){const[s,r]=S(e,t,i);n.width=s,n.height=r}s.setTransform(i,0,0,i,0,0),this.width=e,this.height=t,this.pixelRatio=i}clear(){C(this)}destroy(){this.canvas.width=0,this.canvas.height=0,this.context.clearRect(0,0,0,0),this.canvas=null,this.context=null,Object.freeze(this)}},x=Symbol("BREAK"),E="__decorator_config",M="__decorator_accessors";function A(e,t){if(null==Object.getOwnPropertyDescriptor(e,E)&&Object.defineProperty(e,E,{value:{}}),null==Object.getOwnPropertyDescriptor(e,M)){const t=Object.getPrototypeOf(e)?.[M],i=t?.slice()??[];Object.defineProperty(e,M,{value:i})}const i=e[E],n=t.toString();if(null!=i[n])return i[n];i[n]={setters:[],getters:[],observers:[]};const s=Object.getOwnPropertyDescriptor(e,t);let r=s?.get,o=s?.set;if(null==r||null==o){const i=e[M];let n=i.indexOf(t);-1===n&&(n=i.push(t)-1),r??(r=function(){let e=this.__accessors;return null==e&&(e=i.slice().fill(void 0),Object.defineProperty(this,"__accessors",{value:e})),e[n]}),o??(o=function(e){let t=this.__accessors;null==t&&(t=i.slice().fill(void 0),Object.defineProperty(this,"__accessors",{value:t})),t[n]=e})}return Object.defineProperty(e,t,{set:function(e){const{setters:s,observers:a}=i[n];let l;s.some(e=>e.length>2)&&(l=r.call(this));for(const i of s)if((e=i(this,t,e,l))===x)return;o.call(this,e);for(const t of a)t(this,e,l)},get:function(){let e=r.call(this);for(const s of i[n].getters)if(e=s(this,t,e),e===x)return;return e},enumerable:!0,configurable:!1}),i[n]}function T(e,t,i){return(n,s)=>{const r=A(n,s);r.setters.push(e),t&&r.getters.unshift(t),i&&Object.assign(r,i)}}function D(e){return(t,i)=>{A(t,i).observers.push(e)}}function I(e){return void 0!==e&&E in e}function R(e){const t=new Set;for(;I(e);)t.add(e?.[E]),e=Object.getPrototypeOf(e);return Array.from(t).flatMap(e=>Object.keys(e))}function L(e){return R(e).reduce((t,i)=>(t[i]=e[i]??null,t),{})}function k(e,t){return Array.isArray(e)?!!Array.isArray(t)&&e.length===t.length&&e.every((e,i)=>k(e,t[i])):(0,n.Qd)(e)?!!(0,n.Qd)(t)&&P(e,t,k):e===t}function P(e,t,i){if(Object.is(e,t))return!0;for(const i of Object.keys(t))if(!(i in e))return!1;for(const n of Object.keys(e)){if(!(n in t))return!1;if(!i(e[n],t[n]))return!1}return!0}function N(...e){const t={};for(const i of e){if(!(0,n.Gv)(i))continue;const e=I(i)?R(i):Object.keys(i);for(const s of e)(0,n.Qd)(t[s])&&(0,n.Qd)(i[s])?t[s]=N(t[s],i[s]):t[s]??(t[s]=i[s])}return t}function O(...e){const t={};for(const i of e){if(!(0,n.Gv)(i))continue;const e=I(i)?R(i):Object.keys(i);for(const s of e)(0,n.Qd)(t[s])&&(0,n.Qd)(i[s])?t[s]=O(t[s],i[s]):s in t||(t[s]??(t[s]=i[s]))}return t}function _(e,...t){return t&&(0,n.cy)(e)?e.map(e=>N(e,...t)):e}function F(e,t){const i={};for(const[s,r]of(0,n.jO)(e))i[s]=t(r,s,e);return i}function G(e,t){const i={...e};for(const e of t)delete i[e];return i}function V(e,t){return((0,n.cy)(t)?t:t.split(".")).reduce((e,t)=>e[t],e)}var B=new Set(["__proto__","constructor","prototype"]);function H(e,t,i){const s=(0,n.cy)(t)?t.slice():t.split("."),r=s.pop();if(s.some(e=>B.has(e)))return;const o=s.reduce((e,t)=>e[t],e);return o[r]=i,o[r]}function z(e,t,i){if(void 0===i)return t;for(const n of e){const e=i[n];void 0!==e&&(t[n]=e)}return t}function U(e){return null!=e&&"object"==typeof e&&(0,n.Qd)(e)?(Object.freeze(e),Object.getOwnPropertyNames(e).forEach(t=>{const i=e[t];null===i||"object"!=typeof i&&"function"!=typeof i||Object.isFrozen(i)||U(i)}),e):e}function W(e,t){return(0,n.Qd)(e)&&t in e}function j(e,t){return W(e,t)&&"string"==typeof e[t]}var K=(e,t)=>e===t;function $(e){return function(t,i){const n=`__${i}`;t[i]||function(e,t,i,n){const{changeCb:s,convertor:r,checkDirtyOnAssignment:o=!1}=n??{},a={changeCb:s,checkDirtyOnAssignment:o,convertor:r},l=function(e,t,i){const{checkDirtyOnAssignment:n}=i;return n?function(i){const n=t.call(this,i);return!0===i?._dirty&&this.markDirty(e),n}:t}(i,function(e,t){const{changeCb:i}=t;return i?function(t){const n=e.call(this,t);return n!==X&&i.call(this,this),n}:e}(function(e,t){const{convertor:i}=t;return i?function(t){e.call(this,i(t))}:e}(function(e,t){const{equals:i=K}=t;return function(t){const n=this[e];return i(t,n)?X:(this[e]=t,this.onChangeDetection(e),t)}}(i,a),a),a),a);Object.defineProperty(e,t,{set:l,get:function(){return this[i]},enumerable:!0,configurable:!0})}(t,i,n,e)}}function Y(e){return $(e)}function q(e){return(e??{}).equals=n.r1,$(e)}var X=Symbol("no-change"),Z=(e=>(e[e.All=0]="All",e[e.None=1]="None",e))(Z||{}),Q=class e{constructor(t){this.serialNumber=e._nextSerialNumber++,this.childNodeCounts={groups:0,nonGroups:0,thisComplexity:0,complexity:0},this.id=(0,n.sX)(this),this.pointerEvents=0,this.scene=void 0,this._dirty=!0,this.dirtyZIndex=!1,this.isContainerNode=!1,this.visible=!0,this.zIndex=0,this.name=t?.name,this.tag=t?.tag??NaN,this.zIndex=t?.zIndex??0,(t?.debugDirty??e._debugEnabled)&&(this._debugDirtyProperties=new Map([["__first__",[]]]))}static toSVG(e,t,i){const s=e?.toSVG();if(null==s||!s.elements.length&&!s.defs?.length)return;const r=(0,n.FJ)("svg");if(r.setAttribute("width",String(t)),r.setAttribute("height",String(i)),r.setAttribute("viewBox",`0 0 ${t} ${i}`),s.defs?.length){const e=(0,n.FJ)("defs");e.append(...s.defs),r.append(e)}return r.append(...s.elements),r.outerHTML}static*extractBBoxes(e,t){for(const i of e)if(!t||i.visible&&!i.transitionOut){const e=i.getBBox();e&&(yield e)}}get datum(){return this._datum}set datum(e){this._datum!==e&&(this._previousDatum=this._datum,this._datum=e)}get previousDatum(){return this._previousDatum}get layerManager(){return this.scene?.layersManager}get imageLoader(){return this.scene?.imageLoader}get dirty(){return this._dirty}closestDatum(){for(const{datum:e}of this.traverseUp(!0))if(null!=e)return e}preRender(e,t=1){this.childNodeCounts.groups=0,this.childNodeCounts.nonGroups=1,this.childNodeCounts.complexity=t,this.childNodeCounts.thisComplexity=t;for(const t of this.children()){const i=t.preRender(e);this.childNodeCounts.groups+=i.groups,this.childNodeCounts.nonGroups+=i.nonGroups,this.childNodeCounts.complexity+=i.complexity}return this.childNodeCounts}render(e){const{stats:t}=e;if(this._dirty=!1,this.debugDirtyProperties(),e.debugNodeSearch){const t=this.name??this.id;e.debugNodeSearch.some(e=>"string"==typeof e?e===t:e.test(t))&&(e.debugNodes[this.name??this.id]=this)}t&&(t.nodesRendered++,t.opsPerformed+=this.childNodeCounts.thisComplexity)}setScene(e){this.scene=e,this._debug=e?.layersManager?.debug;for(const t of this.children())t.setScene(e)}sortChildren(e){if(this.dirtyZIndex=!1,!this.childNodes)return;const t=[...this.childNodes].sort(e);this.childNodes.clear();for(const e of t)this.childNodes.add(e)}*traverseUp(e){let t=this;for(e&&(yield t);t=t.parentNode;)yield t}*children(){if(this.childNodes)for(const e of this.childNodes)yield e}*descendants(){for(const e of this.children())yield e,yield*e.descendants()}isLeaf(){return!this.childNodes?.size}isRoot(){return!this.parentNode}append(e){this.childNodes??(this.childNodes=new Set);for(const t of(0,n.Rp)(e))t.parentNode?.removeChild(t),this.childNodes.add(t),t.parentNode=this,t.setScene(this.scene);this.invalidateCachedBBox(),this.dirtyZIndex=!0,this.markDirty()}appendChild(e){return this.append(e),e}removeChild(e){if(!this.childNodes?.delete(e))throw new Error(`AG Charts - internal error, unknown child node ${e.name??e.id} in $${this.name??this.id}`);delete e.parentNode,e.setScene(),this.invalidateCachedBBox(),this.dirtyZIndex=!0,this.markDirty()}remove(){this.parentNode?.removeChild(this)}clear(){for(const e of this.children())delete e.parentNode,e.setScene();this.childNodes?.clear(),this.invalidateCachedBBox()}destroy(){this.parentNode?.removeChild(this)}setProperties(e,t){if(t)for(const i of t)this[i]=e[i];else Object.assign(this,e);return this}containsPoint(e,t){return!1}pickNode(e,t){if(this.visible&&1!==this.pointerEvents&&this.containsPoint(e,t))if(null!=this.childNodes&&0!==this.childNodes.size){const i=[...this.children()];for(let n=i.length-1;n>=0;n--){const s=i[n].pickNode(e,t);if(s)return s}}else if(!this.isContainerNode)return this}pickNodes(e,t,i=[]){if(!this.visible||1===this.pointerEvents||!this.containsPoint(e,t))return i;this.isContainerNode||i.push(this);for(const n of this.children())n.pickNodes(e,t,i);return i}invalidateCachedBBox(){null!=this.cachedBBox&&(this.cachedBBox=void 0,this.parentNode?.invalidateCachedBBox())}getBBox(){return null==this.cachedBBox&&(this.cachedBBox=Object.freeze(this.computeBBox())),this.cachedBBox}computeBBox(){}onChangeDetection(e){this.markDirty(e)}markDirty(e){const{_dirty:t}=this;null!=e&&this._debugDirtyProperties&&this.markDebugProperties(e),null==this.cachedBBox&&t||(this.invalidateCachedBBox(),this._dirty=!0,this.parentNode&&this.parentNode.markDirty())}markClean(){if(this._dirty){this._dirty=!1,this.debugDirtyProperties();for(const e of this.children())e.markClean()}}markDebugProperties(e){const t=this._debugDirtyProperties?.get(e)??[],i=(new Error).stack?.split("\n").filter(e=>!("Error"===e||e.includes(".markDebugProperties")||e.includes(".markDirty")||e.includes("Object.assign ")||e.includes(`${this.constructor.name}.`)))??"unknown";t.push(i[0].replace(" at ","").trim()),this._debugDirtyProperties?.set(e,t)}debugDirtyProperties(){null!=this._debugDirtyProperties&&(this._debugDirtyProperties.has("__first__")||this._debugDirtyProperties.forEach((e,t)=>{e.length>1&&(console.groupCollapsed(`Property changed multiple times before render: ${this.constructor.name}.${t} (${e.length}x)`),e.forEach(e=>console.log(e)),console.groupEnd())}),this._debugDirtyProperties.clear())}onZIndexChange(){const{parentNode:e}=this;e&&(e.dirtyZIndex=!0)}toSVG(){}};Q._nextSerialNumber=0,Q._debugEnabled=!1,a([$()],Q.prototype,"visible",2),a([Y({equals:k,changeCb:e=>e.onZIndexChange()})],Q.prototype,"zIndex",2);var J=Q,ee=2*Math.PI,te=Math.PI/2;function ie(e){return e%=ee,(e+=ee)%ee}function ne(e){return e%=ee,(e+=ee)!==ee&&(e%=ee),e}function se(e){return(e%=ee)<-Math.PI?e+=ee:e>=Math.PI&&(e-=ee),e}function re(e,t,i){const n=ie(e),s=ie(t),r=ie(i);return s<r?s<=n&&n<=r:!(s>r)||s<=n||n<=r}function oe(e){return e/180*Math.PI}function ae(e){return e/Math.PI*180}function le(e,t){return e=ie(e),(t=ie(t))-e+(e>t?ee:0)}function ce(e){const t=ie(e);return t<=te?t/te:t<=Math.PI?(Math.PI-t)/te:t<=1.5*Math.PI?(t-Math.PI)/te:(ee-t)/te}function he(e,t,i){const n=ce(i);return e*n+t*Math.abs(1-n)}function de(e){return e?ie(oe(e)):0}var ue=(e,t,i)=>e*(1-i)+t*i,pe=e=>{const t=e<0?-1:1,i=Math.abs(e);return i<=.04045?e/12.92:t*((i+.055)/1.055)**2.4},ge=e=>{const t=e<0?-1:1,i=Math.abs(e);return i>.0031308?t*(1.055*i**(1/2.4)-.055):12.92*e},fe=class e{constructor(e,t,i,s=1){this.r=(0,n.qE)(0,e||0,1),this.g=(0,n.qE)(0,t||0,1),this.b=(0,n.qE)(0,i||0,1),this.a=(0,n.qE)(0,s||0,1)}static validColorString(t){return t.indexOf("#")>=0?!!e.parseHex(t):t.indexOf("rgb")>=0?!!e.stringToRgba(t):e.nameToHex.has(t.toLowerCase())}static fromString(t){if(t.indexOf("#")>=0)return e.fromHexString(t);const i=e.nameToHex.get(t.toLowerCase());if(i)return e.fromHexString(i);if(t.indexOf("rgb")>=0)return e.fromRgbaString(t);throw new Error(`Invalid color string: '${t}'`)}static parseHex(e){let t;switch((e=e.replace(/ /g,"").slice(1)).length){case 6:case 8:t=[];for(let i=0;i<e.length;i+=2)t.push(parseInt(`${e[i]}${e[i+1]}`,16));break;case 3:case 4:t=e.split("").map(e=>parseInt(e,16)).map(e=>e+16*e)}if(t?.length>=3&&t.every(e=>e>=0))return 3===t.length&&t.push(255),t}static fromHexString(t){const i=e.parseHex(t);if(i){const[t,n,s,r]=i;return new e(t/255,n/255,s/255,r/255)}throw new Error(`Malformed hexadecimal color string: '${t}'`)}static stringToRgba(e){let t=-1,i=-1;for(let n=0;n<e.length;n++){const s=e[n];if(-1===t&&"("===s)t=n;else if(")"===s){i=n;break}}if(-1===t||-1===i)return;const s=e.substring(t+1,i).split(","),r=[];for(let e=0;e<s.length;e++){const t=s[e];let i=parseFloat(t);if(!Number.isFinite(i))return;t.indexOf("%")>=0?(i=(0,n.qE)(0,i,100),i/=100):3===e?i=(0,n.qE)(0,i,1):(i=(0,n.qE)(0,i,255),i/=255),r.push(i)}return r}static fromRgbaString(t){const i=e.stringToRgba(t);if(i){if(3===i.length)return new e(i[0],i[1],i[2]);if(4===i.length)return new e(i[0],i[1],i[2],i[3])}throw new Error(`Malformed rgb/rgba color string: '${t}'`)}static fromArray(t){if(4===t.length)return new e(t[0],t[1],t[2],t[3]);if(3===t.length)return new e(t[0],t[1],t[2]);throw new Error("The given array should contain 3 or 4 color components (numbers).")}static fromHSB(t,i,n,s=1){const r=e.HSBtoRGB(t,i,n);return new e(r[0],r[1],r[2],s)}static fromHSL(t,i,n,s=1){const r=e.HSLtoRGB(t,i,n);return new e(r[0],r[1],r[2],s)}static fromOKLCH(t,i,n,s=1){const r=e.OKLCHtoRGB(t,i,n);return new e(r[0],r[1],r[2],s)}static padHex(e){return 1===e.length?"0"+e:e}toHexString(){let t="#"+e.padHex(Math.round(255*this.r).toString(16))+e.padHex(Math.round(255*this.g).toString(16))+e.padHex(Math.round(255*this.b).toString(16));return this.a<1&&(t+=e.padHex(Math.round(255*this.a).toString(16))),t}toRgbaString(e=3){const t=[Math.round(255*this.r),Math.round(255*this.g),Math.round(255*this.b)],i=Math.pow(10,e);return 1!==this.a?(t.push(Math.round(this.a*i)/i),`rgba(${t.join(", ")})`):`rgb(${t.join(", ")})`}toString(){return 1===this.a?this.toHexString():this.toRgbaString()}toHSB(){return e.RGBtoHSB(this.r,this.g,this.b)}static RGBtoOKLCH(e,t,i){const n=pe(e),s=pe(t),r=pe(i),o=Math.cbrt(.4122214708*n+.5363325363*s+.0514459929*r),a=Math.cbrt(.2119034982*n+.6806995451*s+.1073969566*r),l=Math.cbrt(.0883024619*n+.2817188376*s+.6299787005*r),c=.2104542553*o+.793617785*a-.0040720468*l,h=1.9779984951*o-2.428592205*a+.4505937099*l,d=.0259040371*o+.7827717662*a-.808675766*l,u=180*Math.atan2(d,h)/Math.PI;return[c,Math.hypot(h,d),u>=0?u:u+360]}static OKLCHtoRGB(e,t,i){const n=e,s=t*Math.cos(i*Math.PI/180),r=t*Math.sin(i*Math.PI/180),o=(n+.3963377774*s+.2158037573*r)**3,a=(n-.1055613458*s-.0638541728*r)**3,l=(n-.0894841775*s-1.291485548*r)**3,c=-1.2684380046*o+2.6097574011*a-.3413193965*l,h=-.0041960863*o-.7034186147*a+1.707614701*l;return[ge(4.0767416621*o-3.3077115913*a+.2309699292*l),ge(c),ge(h)]}static RGBtoHSL(e,t,i){const n=Math.min(e,t,i),s=Math.max(e,t,i),r=(s+n)/2;let o,a;if(s===n)o=0,a=0;else{const l=s-n;a=r>.5?l/(2-s-n):l/(s+n),o=s===e?(t-i)/l+(t<i?6:0):s===t?(i-e)/l+2:(e-t)/l+4,o*=60}return[o,a,r]}static HSLtoRGB(e,t,i){if(0===t)return[i,i,i];const n=i<.5?i*(1+t):i+t-i*t,s=2*i-n;function r(e){return e<0&&(e+=1),e>1&&(e-=1),e<1/6?s+6*(n-s)*e:e<.5?n:e<2/3?s+(n-s)*(2/3-e)*6:s}return[r((e=(e%360+360)%360)/360+1/3),r(e/360),r(e/360-1/3)]}static RGBtoHSB(e,t,i){const n=Math.min(e,t,i),s=Math.max(e,t,i);let r=0;if(n!==s){const o=s-n,a=(s-e)/o,l=(s-t)/o,c=(s-i)/o;r=e===s?c-l:t===s?2+a-c:4+l-a,r/=6,r<0&&(r+=1)}return[360*r,0===s?0:(s-n)/s,s]}static HSBtoRGB(e,t,i){e=(e%360+360)%360/360;let n=0,s=0,r=0;if(0===t)n=s=r=i;else{const o=6*(e-Math.floor(e)),a=o-Math.floor(o),l=i*(1-t),c=i*(1-t*a),h=i*(1-t*(1-a));switch(0|o){case 0:n=i,s=h,r=l;break;case 1:n=c,s=i,r=l;break;case 2:n=l,s=i,r=h;break;case 3:n=l,s=c,r=i;break;case 4:n=h,s=l,r=i;break;case 5:n=i,s=l,r=c}}return[n,s,r]}static mix(t,i,n){return new e(ue(t.r,i.r,n),ue(t.g,i.g,n),ue(t.b,i.b,n),ue(t.a,i.a,n))}static lighten(t,i){const s=e.RGBtoOKLCH(t.r,t.g,t.b);return e.fromOKLCH((0,n.qE)(0,s[0]+i,1),s[1],s[2])}static darken(t,i){const s=e.RGBtoOKLCH(t.r,t.g,t.b);return e.fromOKLCH((0,n.qE)(0,s[0]-i,1),s[1],s[2])}static interpolate(t,i){const n=1/(t.length-1),s=t.map(t=>e.RGBtoOKLCH(t.r,t.g,t.b));return Array.from({length:i},(r,o)=>{const a=o/(i-1),l=t.length<=2?0:Math.min(Math.floor(a*(t.length-1)),t.length-2),c=(a-l*n)/n,h=s[l],d=s[l+1];return e.fromOKLCH(ue(h[0],d[0],c),ue(h[1],d[1],c),ue(h[2],d[2],c))})}};fe.nameToHex=new Map([["aliceblue","#F0F8FF"],["antiquewhite","#FAEBD7"],["aqua","#00FFFF"],["aquamarine","#7FFFD4"],["azure","#F0FFFF"],["beige","#F5F5DC"],["bisque","#FFE4C4"],["black","#000000"],["blanchedalmond","#FFEBCD"],["blue","#0000FF"],["blueviolet","#8A2BE2"],["brown","#A52A2A"],["burlywood","#DEB887"],["cadetblue","#5F9EA0"],["chartreuse","#7FFF00"],["chocolate","#D2691E"],["coral","#FF7F50"],["cornflowerblue","#6495ED"],["cornsilk","#FFF8DC"],["crimson","#DC143C"],["cyan","#00FFFF"],["darkblue","#00008B"],["darkcyan","#008B8B"],["darkgoldenrod","#B8860B"],["darkgray","#A9A9A9"],["darkgreen","#006400"],["darkgrey","#A9A9A9"],["darkkhaki","#BDB76B"],["darkmagenta","#8B008B"],["darkolivegreen","#556B2F"],["darkorange","#FF8C00"],["darkorchid","#9932CC"],["darkred","#8B0000"],["darksalmon","#E9967A"],["darkseagreen","#8FBC8F"],["darkslateblue","#483D8B"],["darkslategray","#2F4F4F"],["darkslategrey","#2F4F4F"],["darkturquoise","#00CED1"],["darkviolet","#9400D3"],["deeppink","#FF1493"],["deepskyblue","#00BFFF"],["dimgray","#696969"],["dimgrey","#696969"],["dodgerblue","#1E90FF"],["firebrick","#B22222"],["floralwhite","#FFFAF0"],["forestgreen","#228B22"],["fuchsia","#FF00FF"],["gainsboro","#DCDCDC"],["ghostwhite","#F8F8FF"],["gold","#FFD700"],["goldenrod","#DAA520"],["gray","#808080"],["green","#008000"],["greenyellow","#ADFF2F"],["grey","#808080"],["honeydew","#F0FFF0"],["hotpink","#FF69B4"],["indianred","#CD5C5C"],["indigo","#4B0082"],["ivory","#FFFFF0"],["khaki","#F0E68C"],["lavender","#E6E6FA"],["lavenderblush","#FFF0F5"],["lawngreen","#7CFC00"],["lemonchiffon","#FFFACD"],["lightblue","#ADD8E6"],["lightcoral","#F08080"],["lightcyan","#E0FFFF"],["lightgoldenrodyellow","#FAFAD2"],["lightgray","#D3D3D3"],["lightgreen","#90EE90"],["lightgrey","#D3D3D3"],["lightpink","#FFB6C1"],["lightsalmon","#FFA07A"],["lightseagreen","#20B2AA"],["lightskyblue","#87CEFA"],["lightslategray","#778899"],["lightslategrey","#778899"],["lightsteelblue","#B0C4DE"],["lightyellow","#FFFFE0"],["lime","#00FF00"],["limegreen","#32CD32"],["linen","#FAF0E6"],["magenta","#FF00FF"],["maroon","#800000"],["mediumaquamarine","#66CDAA"],["mediumblue","#0000CD"],["mediumorchid","#BA55D3"],["mediumpurple","#9370DB"],["mediumseagreen","#3CB371"],["mediumslateblue","#7B68EE"],["mediumspringgreen","#00FA9A"],["mediumturquoise","#48D1CC"],["mediumvioletred","#C71585"],["midnightblue","#191970"],["mintcream","#F5FFFA"],["mistyrose","#FFE4E1"],["moccasin","#FFE4B5"],["navajowhite","#FFDEAD"],["navy","#000080"],["oldlace","#FDF5E6"],["olive","#808000"],["olivedrab","#6B8E23"],["orange","#FFA500"],["orangered","#FF4500"],["orchid","#DA70D6"],["palegoldenrod","#EEE8AA"],["palegreen","#98FB98"],["paleturquoise","#AFEEEE"],["palevioletred","#DB7093"],["papayawhip","#FFEFD5"],["peachpuff","#FFDAB9"],["peru","#CD853F"],["pink","#FFC0CB"],["plum","#DDA0DD"],["powderblue","#B0E0E6"],["purple","#800080"],["rebeccapurple","#663399"],["red","#FF0000"],["rosybrown","#BC8F8F"],["royalblue","#4169E1"],["saddlebrown","#8B4513"],["salmon","#FA8072"],["sandybrown","#F4A460"],["seagreen","#2E8B57"],["seashell","#FFF5EE"],["sienna","#A0522D"],["silver","#C0C0C0"],["skyblue","#87CEEB"],["slateblue","#6A5ACD"],["slategray","#708090"],["slategrey","#708090"],["snow","#FFFAFA"],["springgreen","#00FF7F"],["steelblue","#4682B4"],["tan","#D2B48C"],["teal","#008080"],["thistle","#D8BFD8"],["tomato","#FF6347"],["transparent","#00000000"],["turquoise","#40E0D0"],["violet","#EE82EE"],["wheat","#F5DEB3"],["white","#FFFFFF"],["whitesmoke","#F5F5F5"],["yellow","#FFFF00"],["yellowgreen","#9ACD32"]]);var me=fe,ve=class{ticks(e,t,i){}niceDomain(e,t=this.domain){return t}tickFormatter(e){}datumFormatter(e){}get bandwidth(){}get step(){}get inset(){}},ye=(e,t)=>{const i=Symbol(String(t));e[i]=void 0,Object.defineProperty(e,t,{get(){return this[i]},set(e){this[i]!==e&&(this[i]=e,this.invalid=!0)},enumerable:!0,configurable:!1})},Ce=e=>{const t=me.fromString(e),[i,n,s]=me.RGBtoOKLCH(t.r,t.g,t.b);return{l:i,c:n,h:s,a:t.a}},be=1e-6,Se=e=>e.c<be||e.l<be||e.l>1-be,we=class extends ve{constructor(){super(...arguments),this.type="color",this.invalid=!0,this.domain=[0,1],this.range=["red","blue"],this.parsedRange=this.range.map(Ce)}update(){const{domain:e,range:t}=this;e.length<2&&(n.Vy.warnOnce("`colorDomain` should have at least 2 values."),0===e.length?e.push(0,1):1===e.length&&e.push(e[0]+1));for(let t=1;t<e.length;t++)if(e[t-1]>=e[t]){n.Vy.warnOnce("`colorDomain` values should be supplied in ascending order."),e.sort((e,t)=>e-t);break}if(t.length<e.length)for(let i=t.length;i<e.length;i++)t.push(t.length>0?t[0]:"black");this.parsedRange=this.range.map(Ce)}normalizeDomains(...e){return{domain:e.flat(),animatable:!0}}toDomain(){}convert(e){this.refresh();const{domain:t,range:i,parsedRange:s}=this,r=t[0],o=t.at(-1),a=i[0],l=i[i.length-1];if(e<=r)return a;if(e>=o)return l;let c,h;if(2===t.length){const t=(e-r)/(o-r),n=1/(i.length-1);c=i.length<=2?0:Math.min(Math.floor(t*(i.length-1)),i.length-2),h=(t-c*n)/n}else{for(c=0;c<t.length-2&&!(e<t[c+1]);c++);const i=t[c];h=(e-i)/(t[c+1]-i)}return((e,t,i)=>{let s;if(i=(0,n.qE)(0,i,1),Se(e))s=t.h;else if(Se(t))s=e.h;else{const n=e.h;let r=t.h;const o=t.h-e.h;o>180?r-=360:o<-180&&(r+=360),s=n*(1-i)+r*i}const r=e.c*(1-i)+t.c*i,o=e.l*(1-i)+t.l*i,a=e.a*(1-i)+t.a*i;return me.fromOKLCH(o,r,s,a)})(s[c],s[c+1],h).toRgbaString()}invert(){}refresh(){this.invalid&&(this.invalid=!1,this.update(),this.invalid&&n.Vy.warnOnce("Expected update to not invalidate scale"))}};a([ye],we.prototype,"domain",2),a([ye],we.prototype,"range",2);var xe=class{constructor(e,t=[],i){this.colorSpace=e,this.stops=t,this.bbox=i,this._cache=void 0}createGradient(e,t,i){const n=this.bbox??t;if(isNaN(n.x)||isNaN(n.y))return;if(null!=this._cache&&this._cache.ctx===e&&this._cache.bbox.equals(n))return this._cache.gradient;const{stops:s,colorSpace:r}=this;if(0===s.length)return;if(1===s.length)return s[0].color;let o=this.createCanvasGradient(e,n,i);if(null==o)return;const a="oklch"===r;let l=s[0];o.addColorStop(l.stop,l.color);for(let e=1;e<s.length;e+=1){const t=s[e];if(a){const e=new we;e.domain=[l.stop,t.stop],e.range=[l.color,t.color];for(let i=l.stop+.05;i<t.stop;i+=.05)o.addColorStop(i,e.convert(i))}o.addColorStop(t.stop,t.color),l=t}return"createPattern"in o&&(o=o.createPattern()),this._cache={ctx:e,bbox:n,gradient:o},o}toSvg(e){const t=this.bbox??e,i=this.createSvgGradient(t);return this.stops.forEach(({stop:e,color:t})=>{const s=(0,n.FJ)("stop");s.setAttribute("offset",`${e}`),s.setAttribute("stop-color",`${t}`),i.appendChild(s)}),i}},Ee=class extends xe{constructor(e,t,i=0,n){super(e,t,n),this.angle=i}createCanvasGradient(e,t,i){const{angle:n}=this,s=de(n+-90),r=i?.centerX??t.x+.5*t.width,o=i?.centerY??t.y+.5*t.height;return e.createConicGradient(s,r,o)}createSvgGradient(e){return(0,n.FJ)("linearGradient")}},Me=class extends xe{constructor(e,t,i=0,n){super(e,t,n),this.angle=i}getGradientPoints(e){const{angle:t}=this,i=de(t+90),n=Math.cos(i),s=Math.sin(i),r=e.width,o=e.height,a=e.x+.5*r,l=e.y+.5*o,c=Math.sqrt(o*o+r*r)/2,h=Math.atan2(o,r);let d;d=i<Math.PI/2?i:i<Math.PI?Math.PI-i:i<1.5*Math.PI?i-Math.PI:2*Math.PI-i;const u=c*Math.abs(Math.cos(d-h));return{x0:a+n*u,y0:l+s*u,x1:a-n*u,y1:l-s*u}}createCanvasGradient(e,t){const{x0:i,y0:n,x1:s,y1:r}=this.getGradientPoints(t);if(!(isNaN(i)||isNaN(n)||isNaN(s)||isNaN(r)))return e.createLinearGradient(i,n,s,r)}createSvgGradient(e){const{x0:t,y0:i,x1:s,y1:r}=this.getGradientPoints(e),o=(0,n.FJ)("linearGradient");return o.setAttribute("x1",String(t)),o.setAttribute("y1",String(i)),o.setAttribute("x2",String(s)),o.setAttribute("y2",String(r)),o.setAttribute("gradientUnits","userSpaceOnUse"),o}},Ae=class extends xe{constructor(e,t,i){super(e,t,i)}createCanvasGradient(e,t,i){const n=i?.centerX??t.x+.5*t.width,s=i?.centerY??t.y+.5*t.height,r=i?.innerRadius??0,o=i?.outerRadius??Math.hypot(.5*t.width,.5*t.height)/Math.SQRT2;return e.createRadialGradient(n,s,r,n,s,o)}createSvgGradient(e){const t=e.x+.5*e.width,i=e.y+.5*e.height,s=(0,n.FJ)("radialGradient");return s.setAttribute("cx",String(t)),s.setAttribute("cy",String(i)),s.setAttribute("r",String(Math.hypot(.5*e.width,.5*e.height)/Math.SQRT2)),s.setAttribute("gradientUnits","userSpaceOnUse"),s}},Te=function(e,t){A(e,t).optional=!0},De=class{handleUnknownProperties(e,t){}set(e){const{className:t=this.constructor.name}=this.constructor;if("object"!=typeof e)return n.Vy.warn(`unable to set ${t} - expecting a properties object`),this;const i=new Set(Object.keys(e));for(const t of R(this))if(i.has(t)){const s=e[t],r=this;if(Re(r[t]))if(r[t]instanceof Ie){const e=r[t].reset(s);null!=e?r[t]=e:n.Vy.warn(`unable to set [${t}] - expecting a properties array`)}else r[t].set(s);else(0,n.Qd)(s)?r[t]=O(s,r[t]??{}):r[t]=s;i.delete(t)}this.handleUnknownProperties(i,e);for(const e of i)n.Vy.warn(`unable to set [${e}] in ${t} - property is unknown`);return this}toJson(){return R(this).reduce((e,t)=>{const i=this[t];return e[t]=Re(i)?i.toJson():i,e},{})}},Ie=class e extends Array{constructor(e,...t){super(t.length);const i=(n=e,Boolean(n?.prototype?.constructor?.name)?t=>(new e).set(t):e);var n;Object.defineProperty(this,"itemFactory",{value:i,enumerable:!1,configurable:!1}),this.set(t)}set(e){if((0,n.cy)(e)){this.length=e.length;for(let t=0;t<e.length;t++)this[t]=this.itemFactory(e[t])}return this}reset(t){if(Array.isArray(t))return new e(this.itemFactory,...t)}toJson(){return this.map(e=>e?.toJson?.()??e)}};function Re(e){return e instanceof De||e instanceof Ie}var Le=class extends De{constructor(){super(...arguments),this.color="black"}};function ke(e){return e.flatMap((t,i)=>{const{stop:n}=t,s=e.at(i+1)?.color;return null!=s?[t,{stop:n,color:s}]:[t]})}function Pe(e,t,i,s="continuous"){const r=e.map(e=>"string"==typeof e?{color:e}:e);if(0===r.length)return function(e,t){const i="discrete"===t?1:0,n=e.map((e,t,{length:n})=>({stop:(t+i)/(n-1+i),color:e}));return"discrete"===t?ke(n):n}(t,s);if(!function(e){let t;for(const i of e)if(null!=i?.stop){if(null!=t&&i.stop<t)return!1;t=i.stop}return!0}(r))return n.Vy.warnOnce("[fills] must have the stops defined in ascending order"),[];const o=Math.min(...i),a=Math.max(...i),l="discrete"===s,c=new Float64Array(r.length);let h=0,d=-1;for(let e=0;e<r.length;e+=1){const t=r[e];if(e>=d){d=r.length-1;for(let t=e+1;t<r.length;t+=1)if(null!=r[t]?.stop){d=t;break}}let i=t?.stop;if(null==i){const t=r[h]?.stop,n=r[d]?.stop,s=t??o,c=l&&null==t?1:0;i=s+((n??a)-s)*(e-h+c)/(d-h+c)}else h=e;c[e]=Math.max(0,Math.min(1,(i-o)/(a-o)))}let u,p=r.find(e=>null!=e.color)?.color;const g=r.map((e,i)=>{let n=e?.color;const s=c[i];return null!=n?p=n:null!=p?n=p:(null==u&&(u=new we,u.domain=[0,1],u.range=t),n=u.convert(s)),{stop:s,color:n}});return"discrete"===s?ke(g):g}a([Te],Le.prototype,"stop",2),a([Te],Le.prototype,"color",2);var Ne=class{constructor(e,t){this.imageLoader=e,this._cache=void 0,this.url=t.url,this.backgroundFill=t.backgroundFill??"black",this.backgroundFillOpacity=t.backgroundFillOpacity??1,this.repeat=t.repeat??"no-repeat",this.width=t.width,this.height=t.height,this.fit=t.fit??"stretch",this.rotation=t.rotation??0}createCanvasImage(e,t,i,s){if(!t)return null;const[r,o]=this.getSize(t.width,t.height,i,s);return r<1||o<1?(n.Vy.warnOnce("Image fill is too small to render, ignoring."),null):e.createPattern(t,this.repeat)}getSize(e,t,i,n){const{fit:s}=this;let r=e,o=t,a=1;const l=i/n,c=e/t;return"stretch"===s||0===e||0===t?(r=i,o=n):"contain"===s?a=c>l?i/e:n/t:"cover"===s&&(a=c>l?n/t:i/e),[Math.max(1,r*a),Math.max(1,o*a)]}setImageTransform(e,t){if("string"==typeof e)return;const{url:i,rotation:n,width:s,height:r}=this,o=this.imageLoader?.loadImage(i);if(!o)return;const a=de(n),l=Math.cos(a),c=Math.sin(a),[h,d]=this.getSize(o.width,o.height,s??t.width,r??t.height),u=h/o.width,p=d/o.height,g=t.x+t.width/2,f=t.y+t.height/2,m=(l*h-c*d)/2,v=(c*h+l*d)/2;e?.setTransform(new DOMMatrix([l*u,c*p,-c*u,l*p,g-m,f-v]))}createPattern(e,t,i,n){const s=this.width??t,r=this.height??i,o=this._cache;if(null!=o&&o.ctx===e&&o.width===s&&o.height===r)return o.pattern;const a=this.imageLoader?.loadImage(this.url,n),l=this.createCanvasImage(e,a,s,r);return null==l?this.backgroundFill:(this._cache={ctx:e,pattern:l,width:s,height:r},l)}toSvg(e,t){const{url:i,rotation:s,backgroundFill:r,backgroundFillOpacity:o}=this,{x:a,y:l,width:c,height:h}=e,d=(0,n.FJ)("pattern");d.setAttribute("viewBox",`0 0 ${c} ${h}`),d.setAttribute("x",String(a)),d.setAttribute("y",String(l)),d.setAttribute("width",String(c)),d.setAttribute("height",String(h)),d.setAttribute("patternUnits","userSpaceOnUse");const u=(0,n.FJ)("rect");u.setAttribute("x","0"),u.setAttribute("y","0"),u.setAttribute("width",String(c)),u.setAttribute("height",String(h)),u.setAttribute("fill",r),u.setAttribute("fill-opacity",String(o)),d.appendChild(u);const p=(0,n.FJ)("image");return p.setAttribute("href",i),p.setAttribute("x","0"),p.setAttribute("y","0"),p.setAttribute("width",String(c)),p.setAttribute("height",String(h)),p.setAttribute("preserveAspectRatio","none"),p.setAttribute("transform",`scale(${1/t}) rotate(${s}, ${c/2}, ${h/2})`),d.appendChild(p),d}},Oe=/^[\t\n\f\r ]*([achlmqstvz])[\t\n\f\r ]*/i,_e=/^[+-]?((\d*\.\d+)|(\d+\.)|(\d+))(e[+-]?\d+)?/i,Fe=/[\t\n\f\r ]*,?[\t\n\f\r ]*/,Ge=/^[01]/,Ve={z:[],h:[_e],v:[_e],m:[_e,_e],l:[_e,_e],t:[_e,_e],s:[_e,_e,_e,_e],q:[_e,_e,_e,_e],c:[_e,_e,_e,_e,_e,_e],a:[_e,_e,_e,Ge,Ge,_e,_e]};function Be(e,t,i){const s=Ve[e.toLocaleLowerCase()],r={command:e,params:[]};for(const o of s){const s=t.slice(i),a=o.exec(s);if(null==a)return 1===r.params.length?[i,r]:void n.Vy.warnOnce(`Invalid SVG path, error at index ${i}: No path segment parameters for command [${e}]`);{r.params.push(parseFloat(a[0])),i+=a[0].length;const e=Fe.exec(s.slice(a[0].length));null!=e&&(i+=e[0].length)}}return[i,r]}function He(e,t,i,n){const s=e-i,r=t-n;return s*s+r*r}function ze(e,t,i,n,s,r,o){if(i===s&&n===r)return Math.min(o,He(e,t,i,n));const a=s-i,l=r-n,c=Math.max(0,Math.min(1,((e-i)*a+(t-n)*l)/(a*a+l*l))),h=i+c*a,d=n+c*l;return Math.min(o,He(e,t,h,d))}function Ue(e,t,i,n,s,r,o,a,l){if(a&&([o,r]=[r,o]),!re(Math.atan2(t-n,e-i),r,o)){const o=i+Math.cos(r)*s,a=n+Math.sin(r)*s,c=i+Math.cos(r)*s,h=n+Math.sin(r)*s;return Math.min(l,He(e,t,o,a),He(e,t,c,h))}const c=s-Math.sqrt(He(e,t,i,n));return Math.min(l,c*c)}function We(e,t,i,n,s,r,o,a){const l=(i-e)*(a-r)-(n-t)*(o-s);if(0===l)return 0;const c=((o-s)*(t-r)-(e-s)*(a-r))/l,h=((i-e)*(t-r)-(n-t)*(e-s))/l;return c>=0&&c<=1&&h>=0&&h<=1?1:0}function je(e,t,i,n,s,r,o,a,l,c,h,d){let u=0;const p=c-d,g=h-l,f=l*(d-c)-c*(h-l),m=Ke(e,i,s,o),v=Ke(t,n,r,a),y=function(e,t,i,n){if(0===e)return function(e,t,i){if(0===e)return function(e,t){const i=-t/e;return 0!==e&&i>=0&&i<=1?[i]:[]}(t,i);const n=t*t-4*e*i,s=[];if(0===n){const i=-t/(2*e);i>=0&&i<=1&&s.push(i)}else if(n>0){const i=Math.sqrt(n),r=(-t-i)/(2*e),o=(-t+i)/(2*e);r>=0&&r<=1&&s.push(r),o>=0&&o<=1&&s.push(o)}return s}(t,i,n);const s=t/e,r=i/e,o=(3*r-s*s)/9,a=(9*s*r-n/e*27-2*s*s*s)/54,l=o*o*o+a*a,c=1/3,h=[];if(l>=0){const e=Math.sqrt(l),t=Math.sign(a+e)*Math.pow(Math.abs(a+e),c),i=Math.sign(a-e)*Math.pow(Math.abs(a-e),c),n=Math.abs(Math.sqrt(3)*(t-i)/2),r=-c*s+(t+i);if(r>=0&&r<=1&&h.push(r),0===n){const e=-c*s-(t+i)/2;e>=0&&e<=1&&h.push(e)}}else{const e=Math.acos(a/Math.sqrt(-o*o*o)),t=c*s,i=2*Math.sqrt(-o),n=i*Math.cos(c*e)-t,r=i*Math.cos(c*(e+2*Math.PI))-t,l=i*Math.cos(c*(e+4*Math.PI))-t;n>=0&&n<=1&&h.push(n),r>=0&&r<=1&&h.push(r),l>=0&&l<=1&&h.push(l)}return h}(p*m[0]+g*v[0],p*m[1]+g*v[1],p*m[2]+g*v[2],p*m[3]+g*v[3]+f);for(const e of y){const t=e*e,i=e*t,n=m[0]*i+m[1]*t+m[2]*e+m[3],s=v[0]*i+v[1]*t+v[2]*e+v[3];let r;r=l===h?(s-c)/(d-c):(n-l)/(h-l),r>=0&&r<=1&&u++}return u}function Ke(e,t,i,n){return[3*t-e-3*i+n,3*e-6*t+3*i,-3*e+3*t,e]}function $e(e,t,i,n,s,r,o,a,l,c){if(isNaN(e)||isNaN(t))return 0;r&&([s,n]=[n,s]);const h=(c-a)/(l-o),d=a-h*o,u=Math.pow(h,2)+1,p=2*(h*(d-t)-e),g=Math.pow(e,2)+Math.pow(d-t,2)-Math.pow(i,2),f=Math.pow(p,2)-4*u*g;if(f<0)return 0;const m=(-p+Math.sqrt(f))/2/u,v=(-p-Math.sqrt(f))/2/u;let y=0;return[m,v].forEach(i=>{if(!(i>=Math.min(o,l)&&i<=Math.max(o,l)))return;const r=i-e,a=h*i+d-t;re(Math.atan2(a,r),n,s)&&y++}),y}function Ye(e,t,i,n,s){return(1-s)**3*e+3*(1-s)**2*s*t+3*(1-s)*s**2*i+s**3*n}function qe(e,t,i,n,s){if(s<=Math.min(e,n))return e<n?0:1;if(s>=Math.max(e,n))return e<n?1:0;let r=0,o=1,a=NaN;for(let l=0;l<12;l+=1)a=(r+o)/2,Ye(e,t,i,n,a)<s?r=a:o=a;return a}function Xe(e,t,i,n,s,r,o,a,l){const c=(1-l)*e+l*i,h=(1-l)*t+l*n,d=(1-l)*i+l*s,u=(1-l)*n+l*r,p=(1-l)*s+l*o,g=(1-l)*r+l*a,f=(1-l)*c+l*d,m=(1-l)*h+l*u,v=(1-l)*d+l*p,y=(1-l)*u+l*g,C=(1-l)*f+l*v,b=(1-l)*m+l*y;return[[{x:e,y:t},{x:c,y:h},{x:f,y:m},{x:C,y:b}],[{x:C,y:b},{x:v,y},{x:p,y:g},{x:o,y:a}]]}function Ze(e,t,i,n){const s=3*t-e-3*i+n,r=2*(e-2*t+i),o=-e+t;if(0===s){if(0!==r){const e=-o/r;if(e>0&&e<1)return[e]}return[]}const a=r*r-4*s*o;if(a>=0){const e=Math.sqrt(a);return[(-r+e)/(2*s),(-r-e)/(2*s)].filter(e=>e>0&&e<1)}return[]}function Qe(e,t,i,n,s,r,o,a){return[...Ze(e,i,s,o),...Ze(t,n,r,a)]}var Je=class{constructor(){this.path2d=new Path2D,this.previousCommands=[],this.previousParams=[],this.previousClosedPath=!1,this.commands=[],this.params=[],this.openedPath=!1,this.closedPath=!1}isEmpty(){return 0===this.commands.length}isDirty(){return this.closedPath!==this.previousClosedPath||this.previousCommands.length!==this.commands.length||this.previousParams.length!==this.params.length||this.previousCommands.toString()!==this.commands.toString()||this.previousParams.toString()!==this.params.toString()}getPath2D(){return this.path2d}moveTo(e,t){this.openedPath=!0,this.path2d.moveTo(e,t),this.commands.push(0),this.params.push(e,t)}lineTo(e,t){this.openedPath?(this.path2d.lineTo(e,t),this.commands.push(1),this.params.push(e,t)):this.moveTo(e,t)}rect(e,t,i,n){this.moveTo(e,t),this.lineTo(e+i,t),this.lineTo(e+i,t+n),this.lineTo(e,t+n),this.closePath()}appendSvg(e){let t,i,n=0,s=0,r=0,o=0;for(const{command:a,params:l}of e){t??(t=l[0]),i??(i=l[1]);const e=a===a.toLowerCase(),c=e?t:0,h=e?i:0;switch(a.toLowerCase()){case"m":this.moveTo(c+l[0],h+l[1]),t=c+l[0],i=h+l[1],n=t,s=i;break;case"c":this.cubicCurveTo(c+l[0],h+l[1],c+l[2],h+l[3],c+l[4],h+l[5]),r=c+l[2],o=h+l[3],t=c+l[4],i=h+l[5];break;case"s":this.cubicCurveTo(t+t-r,i+i-o,c+l[0],h+l[1],c+l[2],h+l[3]),r=c+l[0],o=h+l[1],t=c+l[2],i=h+l[3];break;case"q":this.cubicCurveTo((c+2*l[0])/3,(h+2*l[1])/3,(2*l[0]+l[2])/3,(2*l[1]+l[3])/3,l[2],l[3]),r=l[0],o=l[1],t=l[2],i=l[3];break;case"t":this.cubicCurveTo((t+2*(t+t-r))/3,(i+2*(i+i-o))/3,(2*(t+t-r)+l[0])/3,(2*(i+i-o)+l[1])/3,l[0],l[1]),r=t+t-r,o=i+i-o,t=l[0],i=l[1];break;case"a":this.ellipse(t,i,l[0],l[1],l[2]*Math.PI/180,l[3],l[4],c+l[5],h+l[6]),t=c+l[5],i=h+l[6];break;case"h":this.lineTo(c+l[0],i),t=c+l[0];break;case"l":this.lineTo(c+l[0],h+l[1]),t=c+l[0],i=h+l[1];break;case"v":this.lineTo(t,h+l[0]),i=h+l[0];break;case"z":this.closePath(),t=n,i=s;break;default:throw new Error(`Could not translate command '${a}' with '${l.join(" ")}'`)}}}ellipse(e,t,i,n,s,r,o,a,l){i=Math.abs(i),n=Math.abs(n);const c=(e-a)/2,h=(t-l)/2,d=Math.sin(s),u=Math.cos(s),p=u*c+d*h,g=-d*c+u*h,f=p/i,m=g/n;let v=f*f+m*m,y=(e+a)/2,C=(t+l)/2,b=0,S=0;v>=1?(v=Math.sqrt(v),i*=v,n*=v):(v=Math.sqrt(1/v-1),r===o&&(v=-v),b=v*i*m,S=-v*n*f,y+=u*b-d*S,C+=d*b+u*S);const w=Math.atan2((g-S)/n,(p-b)/i),x=w+(Math.atan2((-g-S)/n,(-p-b)/i)-w),E=!!(1-o);this.ellipticalArc(y,C,i,n,s,w,x,E)}ellipticalArc(e,t,i,n,s,r,o,a){a&&([r,o]=[o,r]);const l=[],c=.5522847498307935,h=Math.sin(r),d=Math.cos(r),u=Math.sin(s),p=Math.cos(s);let g=p*d*i-u*h*n,f=u*d*i+p*h*n,m=-p*h*i-u*d*n,v=-u*h*i+p*d*n;l.push(g+e,f+t),o=ie(o-=r);const y=Math.PI/2,C=Math.floor(o/y),b=o%y;for(let i=0;i<C;i++)l.push(g+m*c+e,f+v*c+t,g*c+m+e,f*c+v+t,m+e,v+t),[g,m]=[m,-g],[f,v]=[v,-f];if(b>0){const i=Math.sin(b),n=Math.cos(b),s=Math.tan(b/4)*(4/3),r=n+s*i,o=i-s*n;l.push(g+m*s+e,f+v*s+t,g*r+m*o+e,f*r+v*o+t,g*n+m*i+e,f*n+v*i+t)}if(a)for(let e=0,t=l.length-2;e<t;e+=2,t-=2)[l[e],l[t]]=[l[t],l[e]],[l[e+1],l[t+1]]=[l[t+1],l[e+1]];for(let e=2;e<l.length;e+=6){const[t,i,n,s,r,o]=l.slice(e,e+6);this.cubicCurveTo(t,i,n,s,r,o)}}roundRect(e,t,i,n,s){s=Math.min(s,i/2,n/2),this.moveTo(e,t+s),this.arc(e+s,t+s,s,Math.PI,1.5*Math.PI),this.lineTo(e+s,t),this.lineTo(e+i-s,t),this.arc(e+i-s,t+s,s,1.5*Math.PI,2*Math.PI),this.lineTo(e+i,t+s),this.lineTo(e+i,t+n-s),this.arc(e+i-s,t+n-s,s,0,Math.PI/2),this.lineTo(e+i-s,t+n),this.lineTo(e+s,t+n),this.arc(e+ +s,t+n-s,s,Math.PI/2,Math.PI),this.lineTo(e,t+n-s),this.closePath()}arc(e,t,i,n,s,r){this.openedPath=!0,this.path2d.arc(e,t,i,n,s,r),this.commands.push(2),this.params.push(e,t,i,n,s,r?1:0)}cubicCurveTo(e,t,i,n,s,r){this.openedPath||this.moveTo(e,t),this.path2d.bezierCurveTo(e,t,i,n,s,r),this.commands.push(3),this.params.push(e,t,i,n,s,r)}closePath(){this.openedPath&&(this.path2d.closePath(),this.commands.push(4),this.openedPath=!1,this.closedPath=!0)}clear(e){e&&(this.previousCommands=this.commands,this.previousParams=this.params,this.previousClosedPath=this.closedPath),this.path2d=new Path2D,this.openedPath=!1,this.closedPath=!1,this.commands=[],this.params=[]}isPointInPath(e,t){const i=this.commands,n=this.params,s=i.length,r=-1e4,o=-1e4;let a=NaN,l=NaN,c=0,h=0,d=0;for(let u=0,p=0;u<s;u++)switch(i[u]){case 0:d+=We(a,l,c,h,r,o,e,t),c=n[p++],a=c,h=n[p++],l=h;break;case 1:d+=We(c,h,n[p++],n[p++],r,o,e,t),c=n[p-2],h=n[p-1];break;case 3:d+=je(c,h,n[p++],n[p++],n[p++],n[p++],n[p++],n[p++],r,o,e,t),c=n[p-2],h=n[p-1];break;case 2:{const i=n[p++],s=n[p++],l=n[p++],u=n[p++],g=n[p++];d+=$e(i,s,l,u,g,Boolean(n[p++]),r,o,e,t),isNaN(a)||(d+=We(c,h,i+Math.cos(u)*l,s+Math.sin(u)*l,r,o,e,t)),c=i+Math.cos(g)*l,h=s+Math.sin(g)*l;break}case 4:d+=We(a,l,c,h,r,o,e,t)}return d%2==1}distanceSquared(e,t){let i=1/0;const s=this.commands,r=this.params,o=s.length;let a=NaN,l=NaN,c=0,h=0;for(let d=0,u=0;d<o;d++)switch(s[d]){case 0:c=a=r[u++],h=l=r[u++];break;case 1:i=ze(e,t,c,h,r[u++],r[u++],i);break;case 3:n.Vy.error("Command.Curve distanceSquare not implemented");break;case 2:{const n=r[u++],s=r[u++],o=r[u++],a=r[u++],l=r[u++],d=n+Math.cos(a)*o,p=s+Math.sin(a)*o,g=Boolean(r[u++]);i=ze(e,t,c,h,d,p,i),i=Ue(e,t,n,s,o,a,l,g,i),c=n+Math.cos(l)*o,h=s+Math.sin(l)*o;break}case 4:i=ze(e,t,c,h,a,l,i)}return i}toSVG(e=(e,t)=>({x:e,y:t})){const t=[],{commands:i,params:n}=this,s=(i,...n)=>{t.push(i);for(let i=0;i<n.length;i+=2){const{x:s,y:r}=e(n[i],n[i+1]);t.push(s,r)}};let r=0;for(const e of i)switch(e){case 0:s("M",n[r++],n[r++]);break;case 1:s("L",n[r++],n[r++]);break;case 3:s("C",n[r++],n[r++],n[r++],n[r++],n[r++],n[r++]);break;case 2:{const e=n[r++],i=n[r++],o=n[r++],a=n[r++],l=n[r++],c=n[r++];let h=c?a-l:l-a;h<0&&(h+=2*Math.ceil(-h/(2*Math.PI))*Math.PI),c&&(h=-h);const d=Math.max(Math.ceil(Math.abs(h)/(Math.PI/2)),1),u=h/d,p=4/3*Math.tan(u/4);s(0===t.length?"M":"L",e+Math.cos(a)*o,i+Math.sin(a)*o);for(let t=0;t<d;t+=1){const n=a+u*(t+0),r=a+u*(t+1),l=o*Math.sin(n),c=o*Math.cos(n),h=o*Math.sin(r),d=o*Math.cos(r);s("C",e+c-p*l,i+l+p*c,e+d+p*h,i+h-p*d,e+d,i+h)}break}case 4:t.push("Z")}return t.join(" ")}computeBBox(){const{commands:e,params:t}=this;let[i,n,s,r]=[1/0,1/0,-1/0,-1/0],[o,a]=[NaN,NaN],[l,c]=[NaN,NaN];const h=(e,t,l)=>{i=Math.min(t,i),n=Math.min(e,n),s=Math.max(e,s),r=Math.max(t,r),l&&([o,a]=[e,t])},d=(e,t,i,n,s)=>{const r=e+i*Math.cos(n),o=t+i*Math.sin(n);h(r,o,s)};let u=0;for(const i of e)switch(i){case 0:h(t[u++],t[u++],!0),[l,c]=[o,a];break;case 1:h(t[u++],t[u++],!0);break;case 3:{const e=t[u++],i=t[u++],n=t[u++],s=t[u++],r=t[u++],l=t[u++];Qe(o,a,e,i,n,s,r,l).forEach(t=>{const c=Ye(o,e,n,r,t),d=Ye(a,i,s,l,t);h(c,d)}),h(r,l,!0);break}case 2:{const e=t[u++],i=t[u++],n=t[u++],s=ie(t[u++]),r=ie(t[u++]),o=t[u++];d(e,i,n,s);const a=[0,Math.PI/2,Math.PI,3*Math.PI/2],[l,c]=o?[r,s]:[s,r];for(const t of a)(l<c&&l<=t&&t<=c||l>c&&(l<=t||t<=c))&&d(e,i,n,t);d(e,i,n,r,!0);break}case 4:[o,a]=[l,c]}return new m(n,i,s-n,r-i)}};function et(e,t,i){const n=Math.round(t*e)/e;return null==i?n:0===i?0:i<1?Math.ceil(i*e)/e:Math.round((i+t)*e)/e-n}function tt(e,t){return Math.floor(t*e)/e}function it(e,t,i){const{width:n,height:s,padding:r,strokeWidth:o}=t,a=n/2,l=s/2,c=Math.max(1,n-r-o/2),h=Math.max(1,s-r-o/2);let d=!1;for(const[t,n]of i){const i=a+(t-.5)*c,s=l+(n-.5)*h;d?e.lineTo(i,s):e.moveTo(i,s),d=!0}e.closePath()}var nt={circles(e,{width:t,strokeWidth:i,padding:n}){const s=t/2,r=Math.max(1,s-n-i/2);e.arc(s,s,r,0,2*Math.PI)},squares(e,{width:t,height:i,pixelRatio:n,padding:s,strokeWidth:r}){const o=s+r/2;e.moveTo(et(n,o),et(n,o)),e.lineTo(et(n,t-o),et(n,o)),e.lineTo(et(n,t-o),et(n,i-o)),e.lineTo(et(n,o),et(n,i-o)),e.closePath()},triangles(e,t){it(e,t,[[.5,0],[1,1],[0,1]])},diamonds(e,t){it(e,t,[[.5,0],[1,.5],[.5,1],[0,.5]])},stars(e,{width:t,height:i,padding:n}){const s=Math.max(1,(t-n)/2),r=s/2,o=Math.PI/2;for(let n=0;n<10;n++){const a=n%2==0?s:r,l=n*Math.PI/5-o,c=t/2+Math.cos(l)*a,h=i/2+Math.sin(l)*a;e.lineTo(c,h)}e.closePath()},hearts(e,{width:t,height:i,padding:n}){const s=Math.max(1,t/4-n/2),r=t/2,o=i/2+s/2;e.arc(r-s,o-s,s,oe(130),oe(330)),e.arc(r+s,o-s,s,oe(220),oe(50)),e.lineTo(r,o+s),e.closePath()},crosses(e,t){it(e,t,[[.25,0],[.5,.25],[.75,0],[1,.25],[.75,.5],[1,.75],[.75,1],[.5,.75],[.25,1],[0,.75],[.25,.5],[0,.25]])},"vertical-lines"(e,{width:t,height:i,pixelRatio:n,strokeWidth:s}){const r=et(n,t/2)-s%2/2;e.moveTo(r,0),e.lineTo(r,i)},"horizontal-lines"(e,{width:t,height:i,pixelRatio:n,strokeWidth:s}){const r=et(n,i/2)-s%2/2;e.moveTo(0,r),e.lineTo(t,r)},"forward-slanted-lines"(e,{width:t,height:i,strokeWidth:n}){const s=Math.atan2(i,t),r=n*Math.cos(s),o=n*Math.sin(s);e.moveTo(-r,o),e.lineTo(r,-o),e.moveTo(-r,i+o),e.lineTo(t+r,-o),e.moveTo(t-r,i+o),e.lineTo(t+r,i-o)},"backward-slanted-lines"(e,{width:t,height:i,strokeWidth:n}){const s=Math.atan2(i,t),r=n*Math.cos(s),o=n*Math.sin(s);e.moveTo(t-r,-o),e.lineTo(t+r,o),e.moveTo(-r,-o),e.lineTo(t+r,i+o),e.moveTo(-r,i-o),e.lineTo(r,i+o)}},st=class{constructor(e){this._cache=void 0,this.width=Math.max(e?.width??10,1),this.height=Math.max(e?.height??10,1),this.fill=e.fill??"none",this.fillOpacity=e.fillOpacity??1,this.backgroundFill=e.backgroundFill??"none",this.backgroundFillOpacity=e.backgroundFillOpacity??1,this.stroke=e.stroke??"black",this.strokeOpacity=e.strokeOpacity??1,this.strokeWidth=e.strokeWidth??1,this.padding=e.padding??1,this.pattern=e.pattern??"forward-slanted-lines",this.rotation=e.rotation??0,this.scale=e.scale??1,this.path=e.path}getPath(e){const{pattern:t,width:i,height:s,padding:r,strokeWidth:o,path:a}=this,l=new Je,c=function(e){if(!e)return;const t=[];let i,s=0;for(;s<e.length;){const r=Oe.exec(e.slice(s));let o;if(null==r){if(!i)return void n.Vy.warnOnce(`Invalid SVG path, error at index ${s}: Missing command.`);o=i}else o=r[1],s+=r[0].length;const a=Be(o,e,s);if(!a)return;s=a[0],i=o,t.push(a[1])}return t}(a);return c?l.appendSvg(c):nt[t](l,{width:i,height:s,pixelRatio:e,strokeWidth:o,padding:r}),l}renderStroke(e,t){const{stroke:i,strokeWidth:n,strokeOpacity:s}=this;n&&(t.strokeStyle=i,t.lineWidth=n,t.globalAlpha=s,t.stroke(e))}renderFill(e,t){const{fill:i,fillOpacity:n}=this;"none"!==i&&(t.fillStyle=i,t.globalAlpha=n,t.fill(e))}createCanvasPattern(e,t){const{width:i,height:s,scale:r,backgroundFill:o,backgroundFillOpacity:a}=this;if(i*r<1||s*r<1)return n.Vy.warnOnce("Pattern fill is too small to render, ignoring."),null;const l=new w({width:i,height:s,pixelRatio:t*r}),c=l.context;"none"!==o&&(c.fillStyle=o,c.globalAlpha=a,c.fillRect(0,0,i,s));const h=this.getPath(t).getPath2D();this.renderFill(h,c),this.renderStroke(h,c);const d=e.createPattern(l.canvas,"repeat");return this.setPatternTransform(d,t),l.destroy(),d}setPatternTransform(e,t,i=0,n=0){const s=de(this.rotation),r=1/t,o=Math.cos(s)*r,a=Math.sin(s)*r;e?.setTransform(new DOMMatrix([o,a,-a,o,i,n]))}createPattern(e,t){if(null!=this._cache&&this._cache.ctx===e&&this._cache.pixelRatio===t)return this._cache.pattern;const i=this.createCanvasPattern(e,t);return null!=i?(this._cache={ctx:e,pattern:i,pixelRatio:t},i):void 0}toSvg(){const{width:e,height:t,fill:i,fillOpacity:s,backgroundFill:r,backgroundFillOpacity:o,stroke:a,strokeWidth:l,strokeOpacity:c,rotation:h,scale:d}=this,u=(0,n.FJ)("pattern");u.setAttribute("viewBox",`0 0 ${e} ${t}`),u.setAttribute("width",String(e)),u.setAttribute("height",String(t)),u.setAttribute("patternUnits","userSpaceOnUse");const p=(0,n.FJ)("rect");p.setAttribute("x","0"),p.setAttribute("y","0"),p.setAttribute("width",String(e)),p.setAttribute("height",String(t)),p.setAttribute("fill",r),p.setAttribute("fill-opacity",String(o)),u.appendChild(p);const g=(0,n.FJ)("path");return g.setAttribute("fill",i),g.setAttribute("fill-opacity",String(s)),g.setAttribute("stroke-opacity",String(c)),g.setAttribute("stroke",a),g.setAttribute("stroke-width",String(l)),g.setAttribute("transform",`rotate(${h}) scale(${d})`),g.setAttribute("d",this.getPath(1).toSVG()),u.appendChild(g),u}};function rt(e){return(0,n.Gv)(e)&&"gradient"==e.type}function ot(e){return(0,n.cy)(e)&&e.every(e=>"string"==typeof e)}function at(e){return null!==e&&(0,n.Gv)(e)&&"pattern"==e.type}function lt(e){return null!==e&&(0,n.Gv)(e)&&"image"==e.type}function ct(e){return rt(e)||at(e)}var ht=class e extends J{constructor(){super(...arguments),this.fillOpacity=1,this.strokeOpacity=1,this.fill=e.defaultStyles.fill,this.stroke=e.defaultStyles.stroke,this.strokeWidth=e.defaultStyles.strokeWidth,this.lineDash=e.defaultStyles.lineDash,this.lineDashOffset=e.defaultStyles.lineDashOffset,this.lineCap=e.defaultStyles.lineCap,this.lineJoin=e.defaultStyles.lineJoin,this.miterLimit=void 0,this.opacity=e.defaultStyles.opacity,this.fillShadow=e.defaultStyles.fillShadow}restoreOwnStyles(){const{defaultStyles:e}=this.constructor;Object.assign(this,e)}getGradient(e){if(rt(e))return this.createGradient(e)}createGradient(e){const{colorSpace:t="rgb",gradient:i="linear",colorStops:n,rotation:s=0,reverse:r=!1}=e;if(null==n)return;let o=Pe(n,["black"],[0,1]);switch(r&&(o=o.map(e=>({color:e.color,stop:1-e.stop})).reverse()),i){case"linear":return new Me(t,o,s);case"radial":return new Ae(t,o);case"conic":return new Ee(t,o,s)}}getPattern(e){if(at(e))return this.createPattern(e)}createPattern(e){return new st(e)}getImage(e){if(lt(e))return this.createImage(e)}createImage(e){return new Ne(this.imageLoader,e)}onFillChange(){"object"==typeof this.fill&&k(this._cachedFill??{},this.fill)||(this.fillGradient=this.getGradient(this.fill),this.fillPattern=this.getPattern(this.fill),this.fillImage=this.getImage(this.fill),this._cachedFill=this.fill)}onStrokeChange(){this.strokeGradient=this.getGradient(this.stroke)}align(e,t){return et(this.layerManager?.canvas?.pixelRatio??1,e,t)}preRender(e,t){return this.dirty&&(this.cachedDefaultGradientFillBBox=void 0),super.preRender(e,t)}fillStroke(e,t){this.renderFill(e,t),this.renderStroke(e,t)}renderFill(e,t){const{fill:i,fillImage:n}=this;if(i&&"none"!==i){const{globalAlpha:i}=e;n&&(e.globalAlpha=n.backgroundFillOpacity,e.fillStyle=n.backgroundFill,this.executeFill(e,t),e.globalAlpha=i),this.applyFillAndAlpha(e),this.applyShadow(e),this.executeFill(e,t),e.globalAlpha=i}e.shadowColor="rgba(0, 0, 0, 0)"}executeFill(e,t){t?e.fill(t):e.fill()}applyFillAndAlpha(e){const{fill:t,fillGradient:i,fillPattern:n,fillImage:s,fillOpacity:r,opacity:o}=this;if(e.globalAlpha*=o*r,i){const{fillBBox:t=this.getDefaultGradientFillBBox()??this.getBBox(),fillParams:n}=this;e.fillStyle=i.createGradient(e,t,n)??"black"}else if(n){const{x:t,y:i}=this.getBBox(),s=this.layerManager?.canvas?.pixelRatio??1,r=n.createPattern(e,s);n.setPatternTransform(r,s,t,i),r?e.fillStyle=r:(e.fillStyle=n.fill,e.globalAlpha*=n.fillOpacity)}else if(s){const t=this.getBBox(),i=s.createPattern(e,t.width,t.height,this);s.setImageTransform(i,t),e.fillStyle=i??"transparent"}else e.fillStyle="string"==typeof t?t:"black"}applyStrokeAndAlpha(e){const{stroke:t,strokeOpacity:i,strokeGradient:n,opacity:s}=this;e.strokeStyle=n?.createGradient(e,this.getBBox())??("string"==typeof t?t:void 0)??"black",e.globalAlpha*=s*i}applyShadow(e){const t=this.layerManager?.canvas.pixelRatio??1,i=this.fillShadow;i?.enabled&&(e.shadowColor=i.color,e.shadowOffsetX=i.xOffset*t,e.shadowOffsetY=i.yOffset*t,e.shadowBlur=i.blur*t)}renderStroke(e,t){const{stroke:i,strokeWidth:n,lineDash:s,lineDashOffset:r,lineCap:o,lineJoin:a,miterLimit:l}=this;if(i&&n){const{globalAlpha:i}=e;this.applyStrokeAndAlpha(e),e.lineWidth=n,s&&e.setLineDash(s),r&&(e.lineDashOffset=r),o&&(e.lineCap=o),a&&(e.lineJoin=a),null!=l&&(e.miterLimit=l),this.executeStroke(e,t),e.globalAlpha=i}}executeStroke(e,t){t?e.stroke(t):e.stroke()}getDefaultGradientFillBBox(){return null==this.cachedDefaultGradientFillBBox&&(this.cachedDefaultGradientFillBBox=Object.freeze(this.computeDefaultGradientFillBBox())),this.cachedDefaultGradientFillBBox}computeDefaultGradientFillBBox(){}containsPoint(e,t){return this.isPointInPath(e,t)}applySvgFillAttributes(e,t){const{fill:i,fillOpacity:s}=this;if("string"==typeof i)e.setAttribute("fill",i);else if(rt(i)&&this.fillGradient){t??(t=[]);const i=this.fillGradient.toSvg(this.fillBBox??this.getBBox()),s=(0,n.lk)();i.setAttribute("id",s),t.push(i),e.setAttribute("fill",`url(#${s})`)}else if(at(i)&&this.fillPattern){t??(t=[]);const i=this.fillPattern.toSvg(),s=(0,n.lk)();i.setAttribute("id",s),t.push(i),e.setAttribute("fill",`url(#${s})`)}else if(lt(i)&&this.fillImage){t??(t=[]);const i=this.layerManager?.canvas?.pixelRatio??1,s=this.fillImage.toSvg(this.getBBox(),i),r=(0,n.lk)();s.setAttribute("id",r),t.push(s),e.setAttribute("fill",`url(#${r})`)}else e.setAttribute("fill","none");return e.setAttribute("fill-opacity",String(s)),t}applySvgStrokeAttributes(e){const{stroke:t,strokeOpacity:i,strokeWidth:n,lineDash:s,lineDashOffset:r}=this;if(null!=t&&(e.setAttribute("stroke","string"==typeof t?t:"none"),e.setAttribute("stroke-opacity",String(i)),e.setAttribute("stroke-width",String(n))),!0===s?.some(e=>0!==e)){const t=s.length%2==1?[...s,...s]:s;e.setAttribute("stroke-dasharray",t.join(" ")),e.setAttribute("stroke-dashoffset",String(r))}}};ht.defaultStyles={fill:"black",stroke:void 0,strokeWidth:0,lineDash:void 0,lineDashOffset:0,lineCap:void 0,lineJoin:void 0,opacity:1,fillShadow:void 0},a([$()],ht.prototype,"fillOpacity",2),a([$()],ht.prototype,"strokeOpacity",2),a([Y({equals:k,changeCb:e=>e.onFillChange()})],ht.prototype,"fill",2),a([Y({equals:k,changeCb:e=>e.onStrokeChange()})],ht.prototype,"stroke",2),a([$()],ht.prototype,"strokeWidth",2),a([q()],ht.prototype,"lineDash",2),a([$()],ht.prototype,"lineDashOffset",2),a([$()],ht.prototype,"lineCap",2),a([$()],ht.prototype,"lineJoin",2),a([$()],ht.prototype,"miterLimit",2),a([$({convertor:e=>(0,n.qE)(0,e,1)})],ht.prototype,"opacity",2),a([Y({equals:K,checkDirtyOnAssignment:!0})],ht.prototype,"fillShadow",2),a([Y({equals:h.equals,changeCb:e=>e.onFillChange()})],ht.prototype,"fillBBox",2),a([Y({equals:k,changeCb:e=>e.onFillChange()})],ht.prototype,"fillParams",2);var dt=ht,ut=[1,0,0,1,0,0],pt=class e{get e(){return[...this.elements]}constructor(e=ut){this.elements=[...e]}setElements(e){const t=this.elements;return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],this}get identity(){const e=this.elements;return(0,n.YX)(e[0],1)&&(0,n.YX)(e[1],0)&&(0,n.YX)(e[2],0)&&(0,n.YX)(e[3],1)&&(0,n.YX)(e[4],0)&&(0,n.YX)(e[5],0)}AxB(e,t,i){const n=e[0]*t[0]+e[2]*t[1],s=e[1]*t[0]+e[3]*t[1],r=e[0]*t[2]+e[2]*t[3],o=e[1]*t[2]+e[3]*t[3],a=e[0]*t[4]+e[2]*t[5]+e[4],l=e[1]*t[4]+e[3]*t[5]+e[5];(i=i??e)[0]=n,i[1]=s,i[2]=r,i[3]=o,i[4]=a,i[5]=l}multiplySelf(e){return this.AxB(this.elements,e.elements),this}multiply(t){const i=new Array(6);return t instanceof e?this.AxB(this.elements,t.elements,i):this.AxB(this.elements,[t.a,t.b,t.c,t.d,t.e,t.f],i),new e(i)}preMultiplySelf(e){return this.AxB(e.elements,this.elements,this.elements),this}inverse(){const t=this.elements;let i=t[0],n=t[1],s=t[2],r=t[3];const o=t[4],a=t[5],l=1/(i*r-n*s);return i*=l,n*=l,s*=l,r*=l,new e([r,-n,-s,i,s*a-r*o,n*o-i*a])}invertSelf(){const e=this.elements;let t=e[0],i=e[1],n=e[2],s=e[3];const r=e[4],o=e[5],a=1/(t*s-i*n);return t*=a,i*=a,n*=a,s*=a,e[0]=s,e[1]=-i,e[2]=-n,e[3]=t,e[4]=n*o-s*r,e[5]=i*r-t*o,this}transformPoint(e,t){const i=this.elements;return{x:e*i[0]+t*i[2]+i[4],y:e*i[1]+t*i[3]+i[5]}}transformBBox(e,t){const i=this.elements,n=i[0],s=i[1],r=i[2],o=i[3],a=.5*e.width,l=.5*e.height,c=e.x+a,h=e.y+l,d=Math.abs(a*n)+Math.abs(l*r),u=Math.abs(a*s)+Math.abs(l*o);return t??(t=new m(0,0,0,0)),t.x=c*n+h*r+i[4]-d,t.y=c*s+h*o+i[5]-u,t.width=d+d,t.height=u+u,t}toContext(e){if(this.identity)return;const t=this.elements;e.transform(t[0],t[1],t[2],t[3],t[4],t[5])}static updateTransformMatrix(e,t,i,n,s,r,o){const a=t,l=i;let c,h;1===a&&1===l?(c=0,h=0):(c=o?.scalingCenterX??0,h=o?.scalingCenterY??0);const d=n,u=Math.cos(d),p=Math.sin(d);let g,f;0===d?(g=0,f=0):(g=o?.rotationCenterX??0,f=o?.rotationCenterY??0);const m=s,v=r,y=c*(1-a)-g,C=h*(1-l)-f;return e.setElements([u*a,p*a,-p*l,u*l,u*y-p*C+g+m,p*y+u*C+f+v]),e}};function gt(e){return mt(e.constructor)}var ft=Symbol("isMatrixTransform");function mt(e){return!0===e[ft]}function vt(e){var t;const i=e;if(mt(e))return e;const s=Symbol("matrix_combined_transform");class r extends i{constructor(){super(...arguments),this[t]=new pt,this._dirtyTransform=!0}markDirtyTransform(){this._dirtyTransform=!0,super.markDirty()}onChangeDetection(e){super.onChangeDetection(e),this.markDirtyTransform()}updateMatrix(e){}computeTransformMatrix(){this._dirtyTransform&&(this[s].setElements(ut),this.updateMatrix(this[s]),this._dirtyTransform=!1)}toParent(e){return this.computeTransformMatrix(),this[s].identity?e.clone():this[s].transformBBox(e)}toParentPoint(e,t){return this.computeTransformMatrix(),this[s].identity?{x:e,y:t}:this[s].transformPoint(e,t)}fromParent(e){return this.computeTransformMatrix(),this[s].identity?e.clone():this[s].inverse().transformBBox(e)}fromParentPoint(e,t){return this.computeTransformMatrix(),this[s].identity?{x:e,y:t}:this[s].inverse().transformPoint(e,t)}computeBBox(){const e=super.computeBBox();return e?this.toParent(e):e}computeBBoxWithoutTransforms(){return super.computeBBox()}pickNode(e,t){return({x:e,y:t}=this.fromParentPoint(e,t)),super.pickNode(e,t)}pickNodes(e,t,i){return({x:e,y:t}=this.fromParentPoint(e,t)),super.pickNodes(e,t,i)}render(e){this.computeTransformMatrix();const{ctx:t}=e,i=this[s];let n=!1;i.identity||(t.save(),n=!0,i.toContext(t)),super.render(e),n&&t.restore()}toSVG(){this.computeTransformMatrix();const e=super.toSVG(),t=this[s];if(t.identity||null==e)return e;const i=(0,n.FJ)("g");i.append(...e.elements);const[r,o,a,l,c,h]=t.e;return i.setAttribute("transform",`matrix(${r} ${o} ${a} ${l} ${c} ${h})`),{elements:[i],defs:e.defs}}}return t=s,r[ft]=!0,r}function yt(e){var t;const i=e,n=Symbol("matrix_rotation");class s extends(vt(i)){constructor(){super(...arguments),this[t]=new pt,this.rotationCenterX=0,this.rotationCenterY=0,this.rotation=0}updateMatrix(e){super.updateMatrix(e);const{rotation:t,rotationCenterX:i,rotationCenterY:s}=this;0!==t&&(pt.updateTransformMatrix(this[n],1,1,t,0,0,{rotationCenterX:i,rotationCenterY:s}),e.multiplySelf(this[n]))}}return t=n,a([$()],s.prototype,"rotationCenterX",2),a([$()],s.prototype,"rotationCenterY",2),a([$()],s.prototype,"rotation",2),s}function Ct(e){var t;const i=e,n=Symbol("matrix_scale");class s extends(vt(i)){constructor(){super(...arguments),this[t]=new pt,this.scalingX=1,this.scalingY=1,this.scalingCenterX=0,this.scalingCenterY=0}updateMatrix(e){super.updateMatrix(e);const{scalingX:t,scalingY:i,scalingCenterX:s,scalingCenterY:r}=this;1===t&&1===i||(pt.updateTransformMatrix(this[n],t,i,0,0,0,{scalingCenterX:s,scalingCenterY:r}),e.multiplySelf(this[n]))}}return t=n,a([$()],s.prototype,"scalingX",2),a([$()],s.prototype,"scalingY",2),a([$()],s.prototype,"scalingCenterX",2),a([$()],s.prototype,"scalingCenterY",2),s}function bt(e){var t;const i=e,n=Symbol("matrix_translation");class s extends(vt(i)){constructor(){super(...arguments),this[t]=new pt,this.translationX=0,this.translationY=0}updateMatrix(e){super.updateMatrix(e);const{translationX:t,translationY:i}=this;0===t&&0===i||(pt.updateTransformMatrix(this[n],1,1,0,t,i),e.multiplySelf(this[n]))}}return t=n,a([$()],s.prototype,"translationX",2),a([$()],s.prototype,"translationY",2),s}var St,wt=class{static fromCanvas(e,t){const i=[];for(const t of e.traverseUp())gt(t)&&i.unshift(t);for(const e of i)t=e.fromParent(t);return gt(e)&&(t=e.fromParent(t)),t}static toCanvas(e,t){null==t?t=e.getBBox():gt(e)&&(t=e.toParent(t));for(const i of e.traverseUp())gt(i)&&(t=i.toParent(t));return t}static fromCanvasPoint(e,t,i){const n=[];for(const t of e.traverseUp())gt(t)&&n.unshift(t);for(const e of n)({x:t,y:i}=e.fromParentPoint(t,i));return gt(e)&&({x:t,y:i}=e.fromParentPoint(t,i)),{x:t,y:i}}static toCanvasPoint(e,t,i){gt(e)&&({x:t,y:i}=e.toParentPoint(t,i));for(const n of e.traverseUp())gt(n)&&({x:t,y:i}=n.toParentPoint(t,i));return{x:t,y:i}}},xt=(e,t)=>Math.sign(e-t);function Et(e,t){if("number"==typeof e&&"number"==typeof t)return xt(e,t);const i="number"==typeof e?[e]:e,n="number"==typeof t?[t]:t,s=Math.min(i.length,n.length);for(let e=0;e<s;e+=1){const t=xt(i[e],n[e]);if(0!==t)return t}return xt(i.length,n.length)}var Mt=class e extends J{constructor(e){super(e),this.opacity=1,this.renderToOffscreenCanvas=!1,this.optimizeForInfrequentRedraws=!1,this.layer=void 0,this.image=void 0,this._lastWidth=NaN,this._lastHeight=NaN,this._lastDevicePixelRatio=NaN,this.isContainerNode=!0,this.renderToOffscreenCanvas=!0===e?.renderToOffscreenCanvas}static is(t){return t instanceof e}static computeChildrenBBox(e,t=!0){return m.merge(J.extractBBoxes(e,t))}static compareChildren(e,t){return Et(e.zIndex,t.zIndex)||e.serialNumber-t.serialNumber}containsPoint(e,t){return!0}computeBBox(){return e.computeChildrenBBox(this.children())}computeSafeClippingBBox(e){const t=this.computeBBox();if(!t.isFinite())return;let i=0;for(const e of this.descendants())e instanceof dt&&(i=Math.max(i,e.strokeWidth));const n=Math.max(1,i/2*4),{x:s,y:r}=wt.toCanvasPoint(this,0,0),o=tt(e,s+t.x-n)-s,a=tt(e,r+t.y-n)-r,l=Math.ceil(t.x+t.width-o+n),c=Math.ceil(t.y+t.height-a+n);return new m(o,a,l,c)}prepareSharedCanvas(e,t,i){return null==St||St.pixelRatio!==i?St=new w({width:e,height:t,pixelRatio:i}):St.resize(e,t,i),St}isDirty(e){const{width:t,height:i,devicePixelRatio:n}=e,{dirty:s,dirtyZIndex:r,layer:o}=this,a=null!=o&&(this._lastWidth!==t||this._lastHeight!==i),l=this._lastDevicePixelRatio!==n;if(this._lastWidth=t,this._lastHeight=i,this._lastDevicePixelRatio=n,s||r||a||l)return!0;for(const e of this.children())if(e.dirty)return!0;return!1}preRender(e){const t=super.preRender(e,0);return t.groups+=1,t.nonGroups-=1,this.renderToOffscreenCanvas&&!this.optimizeForInfrequentRedraws&&t.nonGroups>0&&this.getVisibility()?this.layer??(this.layer=this.layerManager?.addLayer({name:this.name})):null!=this.layer&&(this.layerManager?.removeLayer(this.layer),this.layer=void 0),t}render(t){const{layer:i,renderToOffscreenCanvas:n}=this,s={...t};if(!n)return this.renderInContext(s),void super.render(s);const{ctx:r,stats:o,devicePixelRatio:a}=t;let{image:l}=this;if(this.isDirty(t)){l?.bitmap.close(),l=void 0;const t=i?void 0:this.computeSafeClippingBBox(a),n=(e,...t)=>{const i=e.context;s.ctx=i,e.clear(),i.save(),i.setTransform(...t),i.globalAlpha=1,this.renderInContext(s),i.restore(),i.verifyDepthZero?.()};if(i)n(i,r.getTransform());else if(t){const{x:e,y:i,width:s,height:r}=t,o=this.prepareSharedCanvas(s,r,a);n(o,a,0,0,a,-e*a,-i*a),l={bitmap:o.transferToImageBitmap(),x:e,y:i,width:s,height:r}}else this.dirtyZIndex&&this.sortChildren(e.compareChildren);this.image=l,o&&o.layersRendered++}else this.skipRender(s),o&&o.layersSkipped++;const{globalAlpha:c}=r;if(r.globalAlpha=c*this.opacity,i)r.save(),r.resetTransform(),i.drawImage(r),r.restore();else if(l){const{bitmap:e,x:t,y:i,width:n,height:s}=l;r.drawImage(e,0,0,n*a,s*a,t,i,n,s)}r.globalAlpha=c,super.render(s)}skipRender(e){const{stats:t}=e;for(const e of this.children())e.markClean(),t&&(t.nodesSkipped+=this.childNodeCounts.groups+this.childNodeCounts.nonGroups,t.opsSkipped+=this.childNodeCounts.complexity)}applyClip(e,t){const{x:i,y:n,width:s,height:r}=t;e.beginPath(),e.rect(i,n,s,r),e.clip()}renderInContext(t){const{ctx:i,stats:n}=t;this.dirtyZIndex&&this.sortChildren(e.compareChildren),i.save(),i.globalAlpha*=this.opacity,null!=this.clipRect&&(this.applyClip(i,this.clipRect),t.clipBBox=wt.toCanvas(this,this.clipRect));for(const e of this.children())e.visible?(i.save(),e.render(t),i.restore()):(e.markClean(),n&&(n.nodesSkipped+=e.childNodeCounts.nonGroups+e.childNodeCounts.groups,n.opsSkipped+=e.childNodeCounts.complexity));i.restore()}setClipRect(e){this.clipRect=e?wt.fromCanvas(this,e):void 0}setClipRectCanvasSpace(e){this.clipRect=e}setScene(e){this.layer&&(this.scene?.layersManager.removeLayer(this.layer),this.layer=void 0),super.setScene(e)}getVisibility(){for(const e of this.traverseUp(!0))if(!e.visible)return!1;return!0}toSVG(){if(!this.visible)return;const e=[],t=[];for(const i of this.children()){const n=i.toSVG();null!=n&&(t.push(...n.elements),null!=n.defs&&e.push(...n.defs))}return{elements:t,defs:e}}};Mt.className="Group",a([$({convertor:e=>(0,n.qE)(0,e,1)})],Mt.prototype,"opacity",2);var At=Mt,Tt=class extends(Ct(At)){},Dt=class extends(yt(At)){},It=class extends(bt(At)){},Rt=class extends(yt(bt(At))){};function Lt(e,t){e&&(null==(t=h.normalize(t)).width?e.style.removeProperty("width"):e.style.width=`${t.width}px`,null==t.height?e.style.removeProperty("height"):e.style.height=`${t.height}px`,null==t.x?e.style.removeProperty("left"):e.style.left=`${t.x}px`,null==t.y?e.style.removeProperty("top"):e.style.top=`${t.y}px`)}function kt(e){const t=parseFloat(e.style.width)||e.offsetWidth,i=parseFloat(e.style.height)||e.offsetHeight;return{x:parseFloat(e.style.left)||e.offsetLeft,y:parseFloat(e.style.top)||e.offsetTop,width:t,height:i}}function Pt(e){if(e.focus({preventScroll:!0}),null==e.lastChild?.textContent)return;const t=(0,n.YE)().createRange();t.setStart(e.lastChild,e.lastChild.textContent.length),t.setEnd(e.lastChild,e.lastChild.textContent.length);const i=(0,n.zk)().getSelection();i?.removeAllRanges(),i?.addRange(t)}function Nt(){const e=(0,n.zk)("navigator");if("scheduling"in e){const t=e.scheduling;if("isInputPending"in t)return t.isInputPending({includeContinuous:!0})}return!1}function Ot(e){return`ag-charts-icon ag-charts-icon-${e}`}var _t="class-instance";function Ft(e,t,i){if((0,n.cy)(t)){if(!(0,n.cy)(e)||e.length!==t.length||t.some((t,n)=>null!=Ft(e[n],t,i)))return t}else{if((0,n.Qd)(t)){if(!(0,n.Qd)(e))return t;const s={},r=new Set([...Object.keys(e),...Object.keys(t)]);for(const n of r)if(e[n]!==t[n])if(i?.has(n))s[n]=t[n];else if(typeof e[n]==typeof t[n]){const r=Ft(e[n],t[n],i);null!==r&&(s[n]=r)}else s[n]=t[n];return Object.keys(s).length?s:null}if(e!==t)return t}return null}function Gt(e,t){for(const i of Object.keys(e))if(e[i]!==t?.[i])return!1;return!0}function Vt(e,t){return(0,n.cy)(e)?function(e,t){const i=[],s=t?.seen;for(const r of e)"object"==typeof r&&s?.includes(r)?n.Vy.warn("cycle detected in array",r):(s?.push(r),i.push(Vt(r,t)),s?.pop());return i}(e,t):(0,n.Qd)(e)?function(e,t){const i={};for(const n of Object.keys(e))t?.assign?.has(n)?i[n]=e[n]:t?.shallow?.has(n)?i[n]=Bt(e[n]):i[n]=Vt(e[n],t);return i}(e,t):e instanceof Map?new Map(Vt(Array.from(e))):Bt(e)}function Bt(e){return(0,n.cy)(e)?e.slice(0):(0,n.Qd)(e)?{...e}:(0,n.$P)(e)?new Date(e):(0,n.gd)(e)?new RegExp(e.source,e.flags):e}function Ht(e,t,i,s,r,o){if((0,n.cy)(e)){o=t(e,s,r,o);let n=0;for(const a of e)o=Ht(a,t,i,s?.[n],r,o),n++}else if((0,n.Qd)(e)){o=t(e,s,r,o);for(const n of Object.keys(e))i?.has(n)||(o=Ht(e[n],t,i,s?.[n],r,o))}return o}function zt(e,t,i={}){const{path:s,matcherPath:r=s?.replace(/(\[[0-9+]+])/i,"[]"),skip:o=[]}=i;if(null==e)throw new Error(`AG Charts - target is uninitialised: ${s??"<root>"}`);if(null==t)return e;if(Re(e))return e.set(t);const a=e,l=Ut(e);for(const c of Object.keys(t)){if(B.has(c))continue;const h=`${r?r+".":""}${c}`;if(o.includes(h))continue;const d=t[c],u=`${s?s+".":""}${c}`,p=a.constructor,g=a[c];try{const t=Ut(g),s=Ut(d);if(l===_t&&!(c in e)&&"context"!==c){if(void 0===d)continue;n.Vy.warn(`unable to set [${u}] in ${p?.name} - property is unknown`);continue}if(null!=t&&null!=s&&s!==t&&(t!==_t||"object"!==s)){n.Vy.warn(`unable to set [${u}] in ${p?.name} - can't apply type of [${s}], allowed types are: [${t}]`);continue}if(Re(g))a[c].set(d);else if("object"===s&&"context"!==c){if(null==g){n.Vy.warn(`unable to set [${u}] in ${p?.name} - property is unknown`);continue}zt(g,d,{...i,path:u,matcherPath:h})}else a[c]=d}catch(e){n.Vy.warn(`unable to set [${u}] in [${p?.name}]; nested error is: ${e.message}`)}}return e}function Ut(e){return null==e?null:(0,n.uE)(e)||(0,n.$P)(e)?"primitive":(0,n.cy)(e)?"array":(0,n.Gv)(e)?(0,n.Qd)(e)?"object":_t:(0,n.Tn)(e)?"function":"primitive"}function Wt(e,t,i,n){return Kt(e,t,n??e,{matches:new Map},i)}var jt=Symbol("operation-resolved-undefined");function Kt(e,t,i,s,r,o=[],a={}){if((0,n.cy)(e)){$t(e,t,i,s,o,a);let n=0;for(const l of e)Kt(l,t,i,s,r,[...o,`${n}`],a),n++}else if((0,n.Qd)(e)){$t(e,t,i,s,o,a);for(const n of Object.keys(e)){if(r?.has(n))continue;const l=e[n];qt(l)?e[n]=Yt(l,t,i,s,[...o,n],a):Kt(l,t,i,s,r,[...o,n],a)}}return a}function $t(e,t,i,s,r,o){if((0,n.cy)(e))for(let n=0;n<e.length;n++)e[n]=Yt(e[n],t,i,s,[...r,`${n}`],o),e[n]===jt&&(e[n]=void 0);else{let n=!1;for(const a of Object.keys(e))e[a]=Yt(e[a],t,i,s,[...r,a],o),n||(n=Zt(a,ti)),e[a]===jt&&delete e[a];if(n&&Object.keys(e).length>1)for(const t of Object.keys(e))Zt(t,ti)&&delete e[t]}}function Yt(e,t,i,n,s,r){const o=qt(e);if(!o)return e;r[s.join(".")]=e;const a=Xt(o.operation,o.values,t,i,s,n);return void 0===a?jt:a}function qt(e){if(!(0,n.Qd)(e))return;const[t]=Object.keys(e);return Zt(t,ti)?{operation:t,values:e[t]}:void 0}function Xt(e,t,i,s,r,o){return o.referencedParams??(o.referencedParams=new Set),(0,n.cy)(t)&&!["$find","$map"].includes(e)&&(t=t.map(e=>{const t=qt(e);return t?Xt(t.operation,t.values,i,s,r,o):e})),(0,ti[e])(t,r,i,s,o)}function Zt(e,t){return(0,n.Kg)(e)&&((0,n.Gv)(t)||(0,n.cy)(t))&&e in t}function Qt(e){return(0,n.Et)(e)&&e>=0&&e<=1}function Jt(e){return(0,n.Gv)(e)&&"gradient"==e.type}function ei(e,t){const i=t.split("/");let n=[...e];t.startsWith("/")&&(n=[],i.shift());let s=!1;for(const t of i){if(".."===t)n.pop(),s||n.pop();else if("."===t)n.pop();else if("$index"===t){const t=e.findLast(e=>!isNaN(Number(e)));null!=t&&n.push(t)}else if("$prevIndex"===t){const t=e.findLast(e=>!isNaN(Number(e)));null!=t&&n.push(""+(Number(t)-1))}else 0!==t.length&&n.push(t);s=".."===t}return n}var ti={...{$ref:function e(t,i,s,r,o){if(!Zt(t,s))return void n.Vy.warnOnce(`\`$ref\` json operation failed on [${String(t)}] at [${i.join(".")}], expecting one of [${Object.keys(s).join(", ")}].`);const a=qt(s[t]);return"$ref"!==a?.operation?s[t]:o.referencedParams?.has(a.values)?void n.Vy.warnOnce(`\`$ref\` json operation failed on [${String(t)}] at [${i.join(".")}], circular reference detected with [${[...o.referencedParams].join(", ")}].`):(o.referencedParams?.add(a.values),e(a.values,i,s,r,o))},$path:function(e,t,i,s){let r,o=!1,a=!1,l=s;if((0,n.cy)(e))o=!0,r=e[1],a=3===e.length,l=a?e[2]:l,e=e[0];else if(!(0,n.Kg)(e))return void n.Vy.warnOnce(`\`$path\` json operation failed on [${String(e)}] at [${t.join(".")}], expecting a string.`);const c=ei(a?[]:t,e);let h=l;for(const i of c){if(!Zt(i,h))return o?r:void n.Vy.warnOnce(`\`$path\` json operation failed on [${String(e)}] at [${t.join(".")}] resolved to [${c.join(".")}], could not find path in object.`);h=h[i]}return Object.isFrozen(h)?Vt(h):h},$palette:function(e,t,i,s){if(!(0,n.Kg)(e))return;const r=i.__palette;if(["fill","fillFallback","stroke","gradient","range2"].includes(e)){const i=t.findLastIndex(e=>!isNaN(Number(e)));let o=Number(t[i]);if(isNaN(o))return;const a=t.slice(0,i),l=["map-shape-background","map-line-background"];switch(o-=V(s,a).slice(0,o).filter(e=>l.includes(e.type)).length,e){case"fill":return(0,n.XK)(r.fills,1,o)[0];case"fillFallback":return(0,n.XK)(r.fillsFallback,1,o)[0];case"stroke":return(0,n.XK)(r.strokes,1,o)[0];case"gradient":return(0,n.XK)(r.sequentialColors,1,o)[0];case"range2":return(0,n.XK)(r.fills,2,o)}return}return"gradients"===e?r.sequentialColors:V(r,e)}},$if:([e,t,i])=>e?t:i,$eq:([e,t])=>e===t,$not:([e])=>!e,$or:e=>(0,n.cy)(e)&&e.some(Boolean),$and:e=>(0,n.cy)(e)&&e.every(Boolean),$switch:()=>{},$isOperation:function(e,t,i,s){const r=(0,n.Kg)(e)?ei(t,e):t;return null!=qt(0===r.length?s:V(s,r))},$isEven:function([e],t){if("number"==typeof e)return e%2==0;n.Vy.warnOnce(`\`$isEven\` json operation failed on [${String(e)}] at [${t.join(".")}], expecting a number.`)},$mul:function([e,t],i){if("number"==typeof e&&"number"==typeof t)return e*t;n.Vy.warnOnce(`\`$mul\` json operation failed on [${String(e)}] and [${String(t)}] at [${i.join(".")}], expecting two numbers.`)},$round:function([e],t){if("number"==typeof e)return Math.round(e);n.Vy.warnOnce(`\`$round\` json operation failed on [${String(e)}] at [${t.join(".")}], expecting a number.`)},$map:function([e,t],i,s,r,o){const a=qt(t);if(a&&(t=Xt(a.operation,a.values,s,r,i,o)),!(0,n.cy)(t))return[];const l=qt(e);return l?(o.matches.set(i.join("."),t),t.map(()=>({[l.operation]:l.values}))):[]},$find:function([e,t],i,s,r,o){const a=qt(t);if(a&&(t=Xt(a.operation,a.values,s,r,i,o)),!(0,n.cy)(t))return;const l=qt(e);return l?t.find(e=>Xt(l.operation,l.values,s,e,[],o)):e?t[0]:void 0},$merge:function(e){if((0,n.cy)(e)){for(const t of e)if(!(0,n.Qd)(t))return;return N(...e)}},$omit:function([e,t]){if((0,n.cy)(e)&&(0,n.Qd)(t))return G(t,e)},$value:function(e,t,i,n,s){if("$1"!==e&&"$index"!==e)return e;const r=t.findLastIndex(e=>!isNaN(Number(e)));if(-1===r)return e;const o=Number(t[r]);if("$index"===e)return o;const a=t.slice(0,r).join(".");return s.matches.get(a)?.at(o)},$rem:function([e],t,i){const s="fontSize";if(Zt(s,i)&&"number"==typeof i[s]&&"number"==typeof e)return Math.round(e*i[s]);n.Vy.warnOnce(`\`$rem\` json operation failed on [${String(e)}] at [${t.join(".")}], expecting a number.`)},$mix:function([e,t,i],s){const r=`\`$mix\` json operation failed on [${String(e)}, ${String(t)}, ${String(i)}] at [${s.join(".")}], expecting`,o=`${r} two colors and a number between 0 and 1.`;if("string"!=typeof t||!Qt(i))return void n.Vy.warnOnce(o);if("string"==typeof e)try{return me.mix(me.fromString(e),me.fromString(t),i).toString()}catch{return void n.Vy.warnOnce(o)}if(!Jt(e))return void n.Vy.warnOnce(o);let a=e.colorStops;try{a=a?.map(e=>{let n;return"string"==typeof e.color&&(n=me.mix(me.fromString(e.color),me.fromString(t),i).toString()),{...e,color:n}})}catch{return void n.Vy.warnOnce(`${r} a gradient, a color and a number between 0 and 1.`)}return{...e,colorStops:a}},$foregroundBackgroundMix:function([e],t,i){const s="foregroundColor",r="backgroundColor";if(Zt(s,i)&&Zt(r,i)&&"string"==typeof i[s]&&"string"==typeof i[r]&&Qt(e))return me.mix(me.fromString(i[s]),me.fromString(i[r]),e).toString();n.Vy.warnOnce(`\`$foregroundBackgroundMix\` json operation failed on [${String(e)}}}] at [${t.join(".")}], expecting a number between 0 and 1.`)},$foregroundBackgroundAccentMix:function([e,t],i,s){const r="foregroundColor",o="backgroundColor",a="accentColor";if(Zt(r,s)&&Zt(o,s)&&Zt(a,s)&&"string"==typeof s[r]&&"string"==typeof s[o]&&"string"==typeof s[a]&&Qt(e)&&Qt(t))return me.mix(me.mix(me.fromString(s[r]),me.fromString(s[o]),e),me.fromString(s[a]),t).toString();n.Vy.warnOnce(`\`$foregroundBackgroundAccentMix\` json operation failed on [${String(e)}, ${String(t)}}] at [${i.join(".")}], expecting two numbers between 0 and 1.`)},$interpolate:function([e,t]){if((0,n.cy)(e)&&(0,n.Et)(t))return me.interpolate(e.map(e=>me.fromString(e)),t).map(e=>e.toString())},$isGradient:([e])=>Jt(e),$isPattern:([e])=>{return null!==(t=e)&&(0,n.Gv)(t)&&"pattern"==t.type;var t},$isImage:([e])=>{return null!==(t=e)&&(0,n.Gv)(t)&&"image"==t.type;var t}},ii=class{constructor(){this.available=!0,this.acquireQueue=[]}acquire(e){return new Promise(t=>{this.acquireQueue.push([e,t]),this.available&&this.dispatchNext().catch(e=>n.Vy.errorOnce(e))})}async acquireImmediately(e){return!!this.available&&(await this.acquire(e),!0)}async waitForClearAcquireQueue(){return this.acquire(()=>Promise.resolve(void 0))}async dispatchNext(){this.available=!1;let[e,t]=this.acquireQueue.shift()??[];for(;e;){try{await e(),t?.()}catch(e){n.Vy.error("mutex callback error",e),t?.()}[e,t]=this.acquireQueue.shift()??[]}this.available=!0}},ni=class{constructor(){this.eventListeners=new Map}addEventListener(e,t){if("function"!=typeof t)throw new Error("AG Charts - listener must be a Function");const i=this.eventListeners.get(e);i?i.add(t):this.eventListeners.set(e,new Set([t]))}removeEventListener(e,t){const i=this.eventListeners.get(e);null!=i&&(i.delete(t),0===i.size&&this.eventListeners.delete(e))}hasEventListener(e){return this.eventListeners.has(e)}clearEventListeners(){this.eventListeners.clear()}fireEvent(e){this.eventListeners.get(e.type)?.forEach(t=>t(e))}},si=class extends De{constructor(e=0,t=e,i=e,n=t){super(),this.top=e,this.right=t,this.bottom=i,this.left=n}};function ri(e,t){const i=(0,n.cy)(e)?e:e.split(".");if(1===i.length){const[e]=i;return T((t,i,n)=>t[e]=n,t=>t[e],t)}return T((e,t,n)=>H(e,i,n),e=>V(e,i),t)}function oi(e){return T((t,i,n)=>t[e]=n)}function ai(e,t){return T((i,n,s)=>i[e][t??n]=s)}function li(e){const{newValue:t,oldValue:i,changeValue:n}=e;return T((e,s,r,o)=>(r!==o&&(void 0!==o&&i?.call(e,o),void 0!==r&&t?.call(e,r),n?.call(e,r,o)),r))}function ci(e){return D(e)}function hi(e,t){let i,n,s=0,r=!1;const o=()=>r,a=()=>{r=!1,n?.(),n=void 0,i=void 0,s>0&&e(l)},l=()=>{const e=s;s=0,r=!0;const i=t({count:e});i?i.then(a,a):a()};return{schedule(t){0!==s||o()||e(l,t),s++},async await(){if(o())for(null==i&&(i=new Promise(e=>{n=e}));o();)await i}}}a([Te],si.prototype,"top",2),a([Te],si.prototype,"right",2),a([Te],si.prototype,"bottom",2),a([Te],si.prototype,"left",2);var di=["blur","change","contextmenu","focus","keydown","keyup","click","dblclick","mouseenter","mousemove","mouseleave","wheel","touchstart","touchmove","touchend","touchcancel"];function ui(e,t,i){const{offsetX:n,offsetY:s,clientX:r,clientY:o}=t,{currentX:a,currentY:l}=fi.calcCurrentXY(i,t);return{type:e,offsetX:n,offsetY:s,clientX:r,clientY:o,currentX:a,currentY:l,sourceEvent:t}}function pi(e,t,i){return{type:e,sourceEvent:t}}var gi={blur:e=>({type:"blur",sourceEvent:e}),change:e=>({type:"change",sourceEvent:e}),contextmenu:(e,t)=>ui("contextmenu",e,t),focus:e=>({type:"focus",sourceEvent:e}),keydown:e=>({type:"keydown",sourceEvent:e}),keyup:e=>({type:"keyup",sourceEvent:e}),click:(e,t)=>ui("click",e,t),dblclick:(e,t)=>ui("dblclick",e,t),mouseenter:(e,t)=>ui("mouseenter",e,t),mousemove:(e,t)=>ui("mousemove",e,t),mouseleave:(e,t)=>ui("mouseleave",e,t),wheel:e=>{const{offsetX:t,offsetY:i,clientX:n,clientY:s}=e,r=0===e.deltaMode?.01:1;return{type:"wheel",offsetX:t,offsetY:i,clientX:n,clientY:s,deltaX:e.deltaX*r,deltaY:e.deltaY*r,sourceEvent:e}},touchstart:(e,t)=>pi("touchstart",e),touchmove:(e,t)=>pi("touchmove",e),touchend:(e,t)=>pi("touchend",e),touchcancel:(e,t)=>pi("touchcancel",e)},fi=class{static alloc(e,t,i){return gi[e](t,i)}static isHTMLEvent(e){return di.includes(e)}static calcCurrentXY(e,t){const i=e.getBoundingClientRect();return{currentX:t.clientX-i.x,currentY:t.clientY-i.y}}},mi=class{constructor(){this.widgetListeners={},this.sourceListeners={}}initSourceHandler(e,t){this.sourceListeners??(this.sourceListeners={}),this.sourceListeners[e]=t}lazyGetWidgetListeners(e,t){var i;if(!(e in(this.sourceListeners??{}))){const i=i=>{const n=fi.alloc(e,i,t.getElement());for(const i of this.widgetListeners?.[e]??[])i(n,t)},n={};e.startsWith("touch")&&(n.passive=!1),this.initSourceHandler(e,i),t.getElement().addEventListener(e,i,n)}return this.widgetListeners??(this.widgetListeners={}),(i=this.widgetListeners)[e]??(i[e]=[]),this.widgetListeners[e]}add(e,t,i){this.lazyGetWidgetListeners(e,t).push(i)}remove(e,t,i){const n=this.lazyGetWidgetListeners(e,t),s=n.indexOf(i);s>-1&&n.splice(s,1)}destroy(e){for(const[t,i]of(0,n.jO)(this.sourceListeners??{}))e.getElement().removeEventListener(t,i);this.widgetListeners=void 0,this.sourceListeners=void 0}},vi=class{constructor(e,t,i,s){this.glob=e,this.self=t,this.window=(0,n.zk)(),this.mousegeneral=e=>{e.stopPropagation(),e.stopImmediatePropagation()},this.mousemove=e=>{e.stopPropagation(),e.stopImmediatePropagation(),this.glob.globalMouseDragCallbacks?.mousemove(e)},this.mouseup=e=>{0===e.button&&(e.stopPropagation(),e.stopImmediatePropagation(),this.glob.globalMouseDragCallbacks?.mouseup(e),this.destroy())};const{window:r,mousegeneral:o,mousemove:a,mouseup:l}=this;r.addEventListener("mousedown",o,{capture:!0}),r.addEventListener("mouseenter",o,{capture:!0}),r.addEventListener("mouseleave",o,{capture:!0}),r.addEventListener("mouseout",o,{capture:!0}),r.addEventListener("mouseover",o,{capture:!0}),r.addEventListener("mousemove",a,{capture:!0}),r.addEventListener("mouseup",l,{capture:!0}),t.mouseDragger=this,e.globalMouseDragCallbacks=i,e.globalMouseDragCallbacks.mousedown(s)}destroy(){const{window:e,mousegeneral:t,mousemove:i,mouseup:n}=this;e.removeEventListener("mousedown",t,{capture:!0}),e.removeEventListener("mouseenter",t,{capture:!0}),e.removeEventListener("mouseleave",t,{capture:!0}),e.removeEventListener("mouseout",t,{capture:!0}),e.removeEventListener("mouseover",t,{capture:!0}),e.removeEventListener("mousemove",i,{capture:!0}),e.removeEventListener("mouseup",n,{capture:!0}),this.glob.globalMouseDragCallbacks=void 0,this.self.mouseDragger=void 0}},yi=!1,Ci=class{constructor(e,t,i,s,r){this.glob=e,this.self=t,this.initialTouch=s,this.target=r,this.longTapInterrupted=!1,this.longtap=()=>{const{target:e,initialTouch:t}=this;if(!this.longTapInterrupted){e.dispatchEvent(new TouchEvent("touchcancel",{touches:[t],bubbles:!0})),yi=!0;const i=e=>{e.preventDefault()},s=t=>{yi=!1,t.preventDefault(),e.removeEventListener("touchmove",i),e.removeEventListener("touchend",s),e.removeEventListener("touchcancel",s)};e.addEventListener("touchmove",i,{passive:!1}),e.addEventListener("touchend",s,{passive:!1}),e.addEventListener("touchcancel",s,{passive:!1});const{clientX:r,clientY:o}=t,a=new PointerEvent("contextmenu",{bubbles:!0,cancelable:!0,view:(0,n.zk)(),clientX:r,clientY:o,pointerType:"touch"});e.dispatchEvent(a)}},this.touchmove=e=>{const{glob:t,self:i,initialTouch:n}=this,s=this.findInitialFinger(e.targetTouches);null!=s&&(this.longTapInterrupted=this.longTapInterrupted||function(e,t){const i=e.clientX-t.clientX,n=e.clientY-t.clientY;return i*i+n*n}(n,s)>100,i.dragTouchEnabled&&null!=s&&t.globalTouchDragCallbacks?.touchmove(e,s))},this.touchend=e=>{this.longTapInterrupted=!0;const t=this.findInitialFinger(e.changedTouches,e.touches);null!=t&&this.glob.globalTouchDragCallbacks?.touchend(e,t),this.destroy()},this.longtapTimer=setTimeout(this.longtap,500);const{touchmove:o,touchend:a}=this;r.addEventListener("touchmove",o,{passive:!1}),r.addEventListener("touchstart",a,{passive:!1}),r.addEventListener("touchend",a,{passive:!1}),r.addEventListener("touchcancel",a,{passive:!1}),t.touchDragger=this,e.globalTouchDragCallbacks=i}destroy(){const{longtapTimer:e,touchmove:t,touchend:i}=this;clearTimeout(e),this.target.removeEventListener("touchstart",i),this.target.removeEventListener("touchmove",t),this.target.removeEventListener("touchend",i),this.target.removeEventListener("touchcancel",i),this.glob.globalTouchDragCallbacks=void 0,this.self.touchDragger=void 0}findInitialFinger(...e){const t=e.map(e=>Array.from(e)).flat();return Array.from(t).find(e=>e.identifier===this.initialTouch.identifier)}};function bi(e,t,i,n){const{currentX:s,currentY:r}=fi.calcCurrentXY(e.getElement(),n),o=n.pageX-i.pageX,a=n.pageY-i.pageY;return{type:t,device:"mouse",offsetX:i.offsetX+o,offsetY:i.offsetY+a,clientX:n.clientX,clientY:n.clientY,currentX:s,currentY:r,originDeltaX:o,originDeltaY:a,sourceEvent:n}}function Si(e,{pageX:t,pageY:i}){const{x:n,y:s}=e.getElement().getBoundingClientRect();return{offsetX:t-n,offsetY:i-s}}function wi(e,t,i,n,s){const{currentX:r,currentY:o}=fi.calcCurrentXY(e.getElement(),s),a=s.pageX-i.pageX,l=s.pageY-i.pageY;return{type:t,device:"touch",offsetX:i.offsetX+a,offsetY:i.offsetY+l,clientX:s.clientX,clientY:s.clientY,currentX:r,currentY:o,originDeltaX:a,originDeltaY:l,sourceEvent:n}}var xi={},Ei=class{constructor(e){this.dispatchCallback=e,this.dragTouchEnabled=!0}destroy(){this.dragTriggerRemover?.(),this.dragTriggerRemover=void 0,this.listeners?.clear(),this.mouseDragger?.destroy(),this.touchDragger?.destroy()}getListenerSet(e){this.listeners??(this.listeners=new Map);let t=this.listeners.get(e);return void 0===t&&(t=new Set,this.listeners.set(e,t)),t}add(e,t,i){switch(this.getListenerSet(e).add(i),e){case"drag-start":case"drag-move":case"drag-end":this.registerDragTrigger(t)}}remove(e,t,i){this.getListenerSet(e).delete(i)}registerDragTrigger(e){if(null==this.dragTriggerRemover){const t=t=>this.triggerMouseDrag(e,t),i=t=>this.triggerTouchDrag(e,t);e.getElement().addEventListener("mousedown",t),e.getElement().addEventListener("touchstart",i,{passive:!1}),this.dragTriggerRemover=()=>{e.getElement().removeEventListener("mousedown",t),e.getElement().removeEventListener("touchstart",i)}}}triggerMouseDrag(e,t){0===t.button&&this.startMouseDrag(e,t)}startMouseDrag(e,t){const i={pageX:NaN,pageY:NaN,offsetX:NaN,offsetY:NaN};z(["pageX","pageY","offsetX","offsetY"],i,t);const n={mousedown:t=>{const n=bi(e,"drag-start",i,t);this.dispatch("drag-start",e,n)},mousemove:t=>{const n=bi(e,"drag-move",i,t);this.dispatch("drag-move",e,n)},mouseup:t=>{const n=bi(e,"drag-end",i,t);this.dispatch("drag-end",e,n),this.endDrag(e,n)}};this.mouseDragger=function(e,t,i,n){if(null==e.globalMouseDragCallbacks)return new vi(e,t,i,n)}(xi,this,n,t)}endDrag(e,{sourceEvent:t,clientX:i,clientY:n}){const s=e.getElement(),r=s.getBoundingClientRect();h.containsPoint(r,i,n)||(s.dispatchEvent(new MouseEvent("mouseleave",t)),t.target?.dispatchEvent(new MouseEvent("mouseenter",t)))}triggerTouchDrag(e,t){const i=t.targetTouches[0];1===t.targetTouches.length&&null!=i&&this.startOneFingerTouch(e,t,i)}startOneFingerTouch(e,t,i){const n={pageX:NaN,pageY:NaN,...Si(e,i)};z(["pageX","pageY"],n,i);const s={touchmove:(t,i)=>{const s=wi(e,"drag-move",n,t,i);this.dispatch("drag-move",e,s)},touchend:(t,i)=>{const s=wi(e,"drag-end",n,t,i);this.dispatch("drag-end",e,s)}},r=e.getElement();this.touchDragger=function(e,t,i,n,s){if(null==e.globalTouchDragCallbacks&&!yi)return new Ci(e,t,i,n,s)}(xi,this,s,i,r);const o=wi(e,"drag-start",n,t,i);this.dispatch("drag-start",e,o)}dispatch(e,t,i){for(const n of this.getListenerSet(e))n(i,t);this.dispatchCallback(e,i)}},Mi=class{constructor(e){this.elem=e}setBounds(e){Lt(this.elemContainer??this.elem,e)}getBounds(){return kt(this.elemContainer??this.elem)}static setElementContainer(e,t){Lt(t,e.getBounds()),(0,n.Hs)(e.elem,{width:"100%",height:"100%"}),e.elem.remove(),e.elemContainer=t,e.elemContainer.replaceChildren(e.elem)}},Ai=class extends Mi{constructor(e){super(e),this.elem=e,this.index=NaN,this.children=[]}set id(e){(0,n.Bq)(this.elem,"id",e)}get id(){return(0,n.D$)(this.elem,"id")}getElement(){return this.elem}getBoundingClientRect(){return this.elem.getBoundingClientRect()}get clientWidth(){return this.elem.clientWidth}get clientHeight(){return this.elem.clientHeight}destroy(){this.parent?.removeChild(this),this.children.forEach(e=>{e.parent=void 0,e.destroy()}),this.children.length=0,this.destructor(),this.remove(),this.internalListener?.destroy(),this.htmlListener?.destroy(this)}remove(){this.elem.remove(),this.elemContainer?.remove()}setHidden(e){(0,n.EM)(this.elem,"display",e?"none":void 0)}isHidden(){return"none"===(0,n.zk)()?.getComputedStyle?.(this.elem).display}setCursor(e){(0,n.EM)(this.elem,"cursor",e)}setTextContent(e){this.elem.textContent=e??null}setAriaDescribedBy(e){(0,n.Bq)(this.elem,"aria-describedby",e)}setAriaHidden(e){(0,n.Bq)(this.elem,"aria-hidden",e)}setAriaLabel(e){(0,n.Bq)(this.elem,"aria-label",e)}setAriaExpanded(e){(0,n.Bq)(this.elem,"aria-expanded",e)}setAriaControls(e){(0,n.Bq)(this.elem,"aria-controls",e)}setAriaHasPopup(e){(0,n.Bq)(this.elem,"aria-haspopup",e)}setInnerHTML(e){this.elem.innerHTML=e}setPointerEvents(e){(0,n.EM)(this.elem,"pointer-events",e)}isDisabled(){return(0,n.D$)(this.elem,"aria-disabled",!1)}hasPopup(){const e=(0,n.D$)(this.elem,"aria-haspopup");return void 0!==e&&"false"!==e}parseFloat(e){return""===e?0:parseFloat(e)}cssLeft(){return this.parseFloat(this.elem.style.left)}cssTop(){return this.parseFloat(this.elem.style.top)}cssWidth(){return this.parseFloat(this.elem.style.width)}cssHeight(){return this.parseFloat(this.elem.style.height)}focus(e){this.elem.focus(e)}setFocusOverride(e){(0,n.Bq)(this.elem,"data-focus-override",e)}setPreventsDefault(e){(0,n.Bq)(this.elem,"data-preventdefault",e)}setTabIndex(e){(0,n.Bq)(this.elem,"tabindex",e)}addChild(e){this.addChildToDOM(e,this.getBefore(e)),this.children.push(e),e.index=this.children.length-1,e.parent=this,this.onChildAdded(e)}removeChild(e){const t=this.children.findIndex(t=>t===e);this.children.splice(t,1),this.removeChildFromDOM(e),this.onChildRemoved(e)}moveChild(e,t){e.domIndex!==t&&(e.domIndex=t,this.removeChildFromDOM(e),this.addChildToDOM(e,this.getBefore(e)))}addClass(...e){this.elem.classList.add(...e)}removeClass(...e){this.elem.classList.remove(...e)}toggleClass(e,t){this.elem.classList.toggle(e,t)}appendOrInsert(e,t){t?t.getElement().insertAdjacentElement("beforebegin",e):this.elem.appendChild(e)}addChildToDOM(e,t){this.appendOrInsert(e.getElement(),t)}removeChildFromDOM(e){this.elem.removeChild(e.getElement())}onChildAdded(e){}onChildRemoved(e){}getBefore({domIndex:e}){if(void 0!==e)return this.children.filter(t=>void 0!==t.domIndex&&t.domIndex>e).reduce((e,t)=>!e||t.domIndex<e.domIndex?t:e,void 0)}addListener(e,t){return fi.isHTMLEvent(e)?(this.htmlListener??(this.htmlListener=new mi),this.htmlListener.add(e,this,t)):(this.internalListener??(this.internalListener=new Ei(this.onDispatch.bind(this))),this.internalListener.add(e,this,t)),()=>this.removeListener(e,t)}removeListener(e,t){fi.isHTMLEvent(e)?this.htmlListener?.remove(e,this,t):null!=this.htmlListener&&this.internalListener?.remove(e,this,t)}setDragTouchEnabled(e){this.internalListener??(this.internalListener=new Ei(this.onDispatch.bind(this))),this.internalListener.dragTouchEnabled=e}onDispatch(e,t){if(!t.sourceEvent?.bubbles)return;let{parent:i}=this;for(;null!=i;){const{internalListener:n}=i;if(null!=n){const s={...t,...fi.calcCurrentXY(i.getElement(),t)};n.dispatch(e,i,s)}i=i.parent}}static addWindowEvent(e,t){const i=e=>{e.persisted||t()};return(0,n.zk)().addEventListener("pagehide",i),()=>(0,n.zk)().removeEventListener("pagehide",i)}},Ti=class{constructor(e=5){this.maxCacheSize=e,this.store=new Map}get(e){if(!this.store.has(e))return;const t=this.store.get(e);return this.store.delete(e),this.store.set(e,t),t}has(e){return this.store.has(e)}set(e,t){if(this.store.set(e,t),this.store.size>this.maxCacheSize){const e=this.store.keys();let t=this.store.size-this.maxCacheSize;for(;t>0;){const i=e.next();i.done||this.store.delete(i.value),t--}}return t}clear(){this.store.clear()}},Di=class{static measureText(e,t){return this.getMeasurer(t).measureText(e)}static measureLines(e,t){return this.getMeasurer(t).measureLines(e)}static getMeasurer(e){const t="string"==typeof e.font?e.font:Ri.toFontString(e.font),i=`${t}-${e.textAlign??"start"}-${e.textBaseline??"alphabetic"}`;return this.instanceMap.get(i)??this.createFontMeasurer(t,e,i)}static clear(){this.instanceMap.clear()}static createFontMeasurer(e,t,i){const n=function(e=0,t=0){return new OffscreenCanvas(e,t).getContext("2d")}();n.font=e,n.textAlign=t.textAlign??"start",n.textBaseline=t.textBaseline??"alphabetic";const s=new Ii(n,t);return this.instanceMap.set(i,s),s}};Di.instanceMap=new Ti(10);var Ii=class{constructor(e,t){this.ctx=e,this.measureMap=new Ti(100),t.textAlign&&(e.textAlign=t.textAlign),t.textBaseline&&(e.textBaseline=t.textBaseline),e.font="string"==typeof t.font?t.font:Ri.toFontString(t.font),this.textMeasurer=new Li(e=>this.cachedCtxMeasureText(e),t.textBaseline??"alphabetic")}textWidth(e,t){return this.textMeasurer.textWidth(e,t)}measureText(e){return this.textMeasurer.measureText(e)}measureLines(e){return this.textMeasurer.measureLines(e)}cachedCtxMeasureText(e){if(!this.measureMap.has(e)){const t=this.ctx.measureText(e);this.measureMap.set(e,{actualBoundingBoxAscent:t.actualBoundingBoxAscent,emHeightAscent:t.emHeightAscent,emHeightDescent:t.emHeightDescent,actualBoundingBoxDescent:t.actualBoundingBoxDescent,actualBoundingBoxLeft:t.actualBoundingBoxLeft,actualBoundingBoxRight:t.actualBoundingBoxRight,alphabeticBaseline:t.alphabeticBaseline,fontBoundingBoxAscent:t.fontBoundingBoxAscent,fontBoundingBoxDescent:t.fontBoundingBoxDescent,hangingBaseline:t.hangingBaseline,ideographicBaseline:t.ideographicBaseline,width:t.width})}return this.measureMap.get(e)}},Ri=class{static toFontString({fontSize:e=10,fontStyle:t,fontWeight:i,fontFamily:n,lineHeight:s}){let r="";return t&&(r+=`${t} `),i&&(r+=`${i} `),r+=`${e}px`,s&&(r+=`/${s}px`),r+=` ${n}`,r.trim()}static getLineHeight(e){return Math.ceil(e*this.defaultLineHeight)}static getVerticalModifier(e){switch(e){case"hanging":case"top":return 0;case"middle":return.5;default:return 1}}};Ri.EllipsisChar="…",Ri.defaultLineHeight=1.15,Ri.lineSplitter=/\r?\n/g;var Li=class{constructor(e,t="alphabetic"){this.measureTextFn=e,this.textBaseline=t,this.charMap=new Map}getMetrics(e){const t=this.measureTextFn(e);return t.fontBoundingBoxAscent??(t.fontBoundingBoxAscent=t.emHeightAscent),t.fontBoundingBoxDescent??(t.fontBoundingBoxDescent=t.emHeightDescent),{width:t.width,height:t.actualBoundingBoxAscent+t.actualBoundingBoxDescent,lineHeight:t.fontBoundingBoxAscent+t.fontBoundingBoxDescent,offsetTop:t.actualBoundingBoxAscent,offsetLeft:t.actualBoundingBoxLeft}}getMultilineMetrics(e){let t=0,i=0,n=0,s=0,r=0;const o=Ri.getVerticalModifier(this.textBaseline),a=[];let l=0;const c=e.length;for(const o of e){const e=this.measureTextFn(o);e.fontBoundingBoxAscent??(e.fontBoundingBoxAscent=e.emHeightAscent),e.fontBoundingBoxDescent??(e.fontBoundingBoxDescent=e.emHeightDescent),t<e.width&&(t=e.width),s<e.actualBoundingBoxLeft&&(s=e.actualBoundingBoxLeft),0===l?(i+=e.actualBoundingBoxAscent,n+=e.actualBoundingBoxAscent):r+=e.fontBoundingBoxAscent,l===c-1?i+=e.actualBoundingBoxDescent:r+=e.fontBoundingBoxDescent,a.push({text:o,width:e.width,height:e.actualBoundingBoxAscent+e.actualBoundingBoxDescent,lineHeight:e.fontBoundingBoxAscent+e.fontBoundingBoxDescent,offsetTop:e.actualBoundingBoxAscent,offsetLeft:e.actualBoundingBoxLeft}),l++}return i+=r,n+=r*o,{width:t,height:i,offsetTop:n,offsetLeft:s,lineMetrics:a}}textWidth(e,t){if(t){let t=0;for(let i=0;i<e.length;i++)t+=this.textWidth(e.charAt(i));return t}return e.length>1?this.measureTextFn(e).width:this.charMap.get(e)??this.charWidth(e)}measureText(e){return this.getMetrics(e)}measureLines(e){const t="string"==typeof e?e.split(Ri.lineSplitter):e;return this.getMultilineMetrics(t)}charWidth(e){const{width:t}=this.measureTextFn(e);return this.charMap.set(e,t),t}},ki=class e extends dt{constructor(){super(...arguments),this.x=0,this.y=0,this.lines=[],this.text=void 0,this.fontSize=10,this.fontFamily="sans-serif",this.textAlign=e.defaultStyles.textAlign,this.textBaseline=e.defaultStyles.textBaseline}onTextChange(){this.lines=this.text?.split("\n").map(e=>e.trim())??[]}static computeBBox(e,t,i,n){const{offsetTop:s,offsetLeft:r,width:o,height:a}=Di.measureLines(e,n),l=n.lineHeight?n.lineHeight*e.length:a;return new m(t-r,i-s,o,l)}computeBBox(){const{x:t,y:i,lines:n,textBaseline:s,textAlign:r,lineHeight:o}=this;return e.computeBBox(n,t,i,{font:this,textBaseline:s,textAlign:r,lineHeight:o})}getTextMeasureBBox(){return this.computeBBox()}isPointInPath(e,t){const i=this.getBBox();return!!i&&i.containsPoint(e,t)}render(e){const{ctx:t,stats:i}=e;if(!this.lines.length||!this.layerManager)return i&&(i.nodesSkipped+=1),super.render(e);const{fill:n,stroke:s,strokeWidth:r}=this,{globalAlpha:o}=t,{pixelRatio:a}=this.layerManager.canvas;if(!(n||null!=s&&r>0))return super.render(e);const l=Ri.toFontString(this);if(t.font!==l&&(t.font=l),t.textAlign=this.textAlign,t.textBaseline=this.textBaseline,n){this.applyFillAndAlpha(t);const{fillShadow:e}=this;e?.enabled&&(t.shadowColor=e.color,t.shadowOffsetX=e.xOffset*a,t.shadowOffsetY=e.yOffset*a,t.shadowBlur=e.blur*a),this.renderLines((e,i,n)=>t.fillText(e,i,n)),t.globalAlpha=o}if(s&&r){this.applyStrokeAndAlpha(t),t.lineWidth=r;const{lineDash:e,lineDashOffset:i,lineCap:n,lineJoin:s}=this;e&&t.setLineDash([...e]),i&&(t.lineDashOffset=i),n&&(t.lineCap=n),s&&(t.lineJoin=s),this.renderLines((e,i,n)=>t.strokeText(e,i,n)),t.globalAlpha=o}super.render(e)}renderLines(e){const{lines:t,x:i,y:n}=this,s=this.lineHeight??Ri.getLineHeight(this.fontSize);let r=(s-s*t.length)*Ri.getVerticalModifier(this.textBaseline);for(const o of t)e(o,i,n+r),r+=s}setFont(e){this.fontFamily=e.fontFamily,this.fontSize=e.fontSize,this.fontStyle=e.fontStyle,this.fontWeight=e.fontWeight}setAlign(e){this.textAlign=e.textAlign,this.textBaseline=e.textBaseline}toSVG(){if(!this.visible||!this.text)return;const e=(0,n.FJ)("text");return this.applySvgFillAttributes(e),e.setAttribute("font-family",this.fontFamily?.split(",")[0]??""),e.setAttribute("font-size",String(this.fontSize)),e.setAttribute("font-style",this.fontStyle??""),e.setAttribute("font-weight",String(this.fontWeight??"")),e.setAttribute("text-anchor",{center:"middle",left:"start",right:"end",start:"start",end:"end"}[this.textAlign??"start"]),e.setAttribute("alignment-baseline",{alphabetic:"alphabetic",top:"top",bottom:"bottom",hanging:"hanging",middle:"middle",ideographic:"ideographic"}[this.textBaseline??"alphabetic"]),e.setAttribute("x",String(this.x)),e.setAttribute("y",String(this.y)),e.textContent=this.text??"",{elements:[e]}}};ki.className="Text",ki.defaultStyles={...dt.defaultStyles,textAlign:"start",fontStyle:void 0,fontWeight:void 0,fontSize:10,fontFamily:"sans-serif",textBaseline:"alphabetic"},a([$()],ki.prototype,"x",2),a([$()],ki.prototype,"y",2),a([$({convertor:e=>(0,n.vM)(e)?String(e):e,changeCb:e=>e.onTextChange()})],ki.prototype,"text",2),a([$()],ki.prototype,"fontStyle",2),a([$()],ki.prototype,"fontWeight",2),a([$()],ki.prototype,"fontSize",2),a([$()],ki.prototype,"fontFamily",2),a([$()],ki.prototype,"textAlign",2),a([$()],ki.prototype,"textBaseline",2),a([$()],ki.prototype,"lineHeight",2);var Pi=ki,Ni=class extends(yt(Pi)){},Oi=class extends(yt(bt(Pi))){},_i=class{static wrapText(e,t){return this.wrapLines(e,t).join("\n")}static wrapLines(e,t){const i=this.textWrap(e,t);return"hide"===t.overflow&&i.some(e=>e.endsWith(Ri.EllipsisChar))?[]:i}static appendEllipsis(e){return e.replace(/[.,]{1,5}$/,"")+Ri.EllipsisChar}static truncateLine(e,t,i,n){const s=t.textWidth(Ri.EllipsisChar);let r=0,o=0;for(;o<e.length;o++){const n=t.textWidth(e.charAt(o));if(r+n>i)break;r+=n}if(e.length===o&&(!n||r+s<=i))return n?e+Ri.EllipsisChar:e;for(e=e.slice(0,o).trimEnd();e.length&&t.textWidth(e)+s>i;)e=e.slice(0,-1).trimEnd();return e+Ri.EllipsisChar}static textWrap(e,t){const i=e.split(Ri.lineSplitter),n=Di.getMeasurer(t);if("never"===t.textWrap)return i.map(e=>this.truncateLine(e.trimEnd(),n,t.maxWidth));const s=[],r="hyphenate"===t.textWrap,o=null==t.textWrap||"on-space"===t.textWrap;for(const e of i){let i=e.trimEnd();if(""===i){s.push(i);continue}let a=0,l=0,c=0;for(;a<i.length;){const e=i.charAt(a);if(l+=n.textWidth(e)," "===e&&(c=a),l>t.maxWidth){if(0===a)break;const e=n.textWidth(i.slice(0,a+1));if(e<=t.maxWidth){l=e,a++;continue}if(c){const e=this.getWordAt(i,c+1),r=n.textWidth(e);if(r<=t.maxWidth){s.push(i.slice(0,c).trimEnd()),i=i.slice(c).trimStart(),a=0,l=0,c=0;continue}o&&r>t.maxWidth&&s.push(i.slice(0,c).trimEnd(),this.truncateLine(i.slice(c).trimStart(),n,t.maxWidth,!0))}else o&&s.push(this.truncateLine(i,n,t.maxWidth,!0));if(o){i="";break}const h=r?"-":"";let d=i.slice(0,a).trim();for(;d.length&&n.textWidth(d+h)>t.maxWidth;)d=d.slice(0,-1).trimEnd();if(s.push(d+h),!d.length){i="";break}i=i.slice(d.length).trimStart(),a=-1,l=0,c=0}a++}i&&s.push(i)}return this.avoidOrphans(s,n,t),this.clipLines(s,n,t)}static getWordAt(e,t){const i=e.indexOf(" ",t);return-1===i?e.slice(t):e.slice(t,i)}static clipLines(e,t,i){if(!i.maxHeight)return e;const{height:n,lineMetrics:s}=t.measureLines(e);if(n<=i.maxHeight)return e;for(let n=0,r=0;n<s.length;n++){const{lineHeight:o}=s[n];if(r+=o,r>i.maxHeight){if("hide"===i.overflow)return[];const s=e.slice(0,n||1),r=s.pop();return s.concat(this.truncateLine(r,t,i.maxWidth,!0))}}return e}static avoidOrphans(e,t,i){if(!1===i.avoidOrphans||e.length<2)return;const{length:n}=e,s=e[n-1],r=e[n-2];if(r.length<s.length)return;const o=r.lastIndexOf(" ");if(-1===o||o===r.indexOf(" ")||s.includes(" "))return;const a=r.slice(o+1);t.textWidth(s+a)<=i.maxWidth&&(e[n-2]=r.slice(0,o),e[n-1]=a+" "+s)}},Fi=class extends De{constructor(){super(...arguments),this.id=(0,n.sX)(this),this.node=new Ni({zIndex:1}).setProperties({textAlign:"center",pointerEvents:1}),this.enabled=!1,this.textAlign="center",this.fontSize=10,this.fontFamily="sans-serif",this.wrapping="always",this.padding=0,this.layoutStyle="block",this.truncated=!1}registerInteraction(e,t){return e.layoutManager.addListener("layout:complete",()=>this.updateA11yText(e,t))}computeTextWrap(e,t){const{text:i,padding:n,wrapping:s}=this,r=Math.min(this.maxWidth??1/0,e)-2*n,o=this.maxHeight??t-2*n;if(!isFinite(r)&&!isFinite(o))return void(this.node.text=i);const a=_i.wrapText(i??"",{maxWidth:r,maxHeight:o,font:this,textWrap:s});this.node.text=a,this.truncated=a.includes(Ri.EllipsisChar)}updateA11yText(e,t){const{proxyInteractionService:i}=e;if(this.enabled&&this.text){const n=wt.toCanvas(this.node);if(n){const{id:s}=this;this.proxyText??(this.proxyText=i.createProxyElement({type:"text",domManagerId:s,where:t})),this.proxyText.textContent=this.text,this.proxyText.setBounds(n),this.proxyText.addListener("mousemove",t=>this.handleMouseMove(e,t)),this.proxyText.addListener("mouseleave",t=>this.handleMouseLeave(e,t))}}else this.proxyText?.destroy(),this.proxyText=void 0}handleMouseMove(e,t){if(null!=t&&this.enabled&&this.node.visible&&this.truncated){const{x:i,y:n}=wt.toCanvas(this.node),s=t.sourceEvent.offsetX+i,r=t.sourceEvent.offsetY+n;e.tooltipManager.updateTooltip(this.id,{canvasX:s,canvasY:r,showArrow:!1},[{type:"structured",title:this.text}])}}handleMouseLeave(e,t){e.tooltipManager.removeTooltip(this.id)}};Fi.SMALL_PADDING=10,a([Te,ai("node","visible")],Fi.prototype,"enabled",2),a([Te,ai("node")],Fi.prototype,"text",2),a([Te,ai("node")],Fi.prototype,"textAlign",2),a([Te,ai("node")],Fi.prototype,"fontStyle",2),a([Te,ai("node")],Fi.prototype,"fontWeight",2),a([Te,ai("node")],Fi.prototype,"fontSize",2),a([Te,ai("node")],Fi.prototype,"fontFamily",2),a([Te,ai("node","fill")],Fi.prototype,"color",2),a([Te],Fi.prototype,"spacing",2),a([Te],Fi.prototype,"maxWidth",2),a([Te],Fi.prototype,"maxHeight",2),a([Te],Fi.prototype,"wrapping",2),a([Te],Fi.prototype,"padding",2),a([Te],Fi.prototype,"layoutStyle",2);var Gi=(e=>(e.X="x",e.Y="y",e.Angle="angle",e.Radius="radius",e))(Gi||{});function Vi(e){switch(e){case"x":case"y":case"angle":case"radius":return!0;default:return!1}}var Bi=(e=>(e[e.Caption=0]="Caption",e[e.Legend=1]="Legend",e[e.ToolbarLeft=2]="ToolbarLeft",e[e.ToolbarBottom=3]="ToolbarBottom",e[e.Navigator=4]="Navigator",e[e.Overlay=5]="Overlay",e))(Bi||{}),Hi=class{constructor(){this.events=new n.bk,this.elements=new Map}addListener(e,t){return this.events.on(e,t)}registerElement(e,t){return this.elements.has(e)?this.elements.get(e).add(t):this.elements.set(e,new Set([t])),()=>this.elements.get(e)?.delete(t)}createContext(e,t){const i=new zi(e,t);for(const e of Object.values(Bi))"number"==typeof e&&this.elements.get(e)?.forEach(e=>e(i));return i}emitLayoutComplete(e,t){const i="layout:complete",{width:n,height:s}=e;this.events.emit(i,{type:i,axes:t.axes??[],chart:{width:n,height:s},clipSeries:t.clipSeries??!1,series:t.series})}},zi=class{constructor(e,t){this.width=e,this.height=t,this.layoutBox=new m(0,0,e,t)}},Ui=class{constructor(){this.title=new Fi,this.subtitle=new Fi,this.footnote=new Fi}positionCaptions(e){const{title:t,subtitle:i,footnote:n}=this,s=e.layoutBox.height/10;if(t.enabled){const{spacing:i}=t;this.positionCaption("top",t,e.layoutBox,s),this.shrinkLayoutByCaption("top",t,e.layoutBox,i)}i.enabled&&(this.positionCaption("top",i,e.layoutBox,s),this.shrinkLayoutByCaption("top",i,e.layoutBox,i.spacing)),n.enabled&&(this.positionCaption("bottom",n,e.layoutBox,s),this.shrinkLayoutByCaption("bottom",n,e.layoutBox,n.spacing))}positionAbsoluteCaptions(e){const{title:t,subtitle:i,footnote:n}=this,{rect:s}=e.series;for(const e of[t,i,n])if("overlay"===e.layoutStyle)if("left"===e.textAlign)e.node.x=s.x+e.padding;else if("right"===e.textAlign){const t=e.node.getBBox();e.node.x=s.x+s.width-t.width-e.padding}}computeX(e,t){return"left"===e?t.x:"right"===e?t.x+t.width:t.x+t.width/2}positionCaption(e,t,i,n){const s=Math.max(Ri.getLineHeight(t.fontSize),n);t.node.x=this.computeX(t.textAlign,i)+t.padding,t.node.y=i.y+("top"===e?0:i.height)+t.padding,t.node.textBaseline=e,t.computeTextWrap(i.width,s)}shrinkLayoutByCaption(e,t,i,n=0){if("block"===t.layoutStyle){const s=t.node.getTextMeasureBBox();i.shrink("top"===e?Math.ceil(s.y-i.y+s.height+n):Math.ceil(i.y+i.height-s.y+n),e)}}};a([Te],Ui.prototype,"title",2),a([Te],Ui.prototype,"subtitle",2),a([Te],Ui.prototype,"footnote",2);var Wi=["candlestick","hollow-candlestick","ohlc","line","step-line","hlc","high-low"],ji=class{constructor(e){this.chartService=e,this.mementoOriginatorKey="chartType"}createMemento(){let e=this.chartService.publicApi?.getOptions()?.chartType;return null==e&&(e="candlestick"),e}guardMemento(e){return null==e||Wi.includes(e)}restoreMemento(e,t,i){if(null==i)return;const s={chartType:i};this.chartService.publicApi?.updateDelta(s).catch(e=>n.Vy.error("error restoring state",e))}},Ki=class{constructor(){this.destroyFns=[]}destroy(){this.destroyFns.forEach(e=>e()),this.destroyFns.length=0}setFns(e){this.destroy(),this.destroyFns=e}push(...e){this.destroyFns.push(...e)}},$i="11.3.2",Yi=Symbol("previous-memento-not-found"),qi=class{constructor(e){this.history=[],this.historyIndex=-1,this.originators=new Map,this.clearState=new Map,this.maxHistoryLength=100,this.debug=y.create(!0,"history"),this.destroyFns=new Ki,this.destroyFns.setFns([e.addListener("series-undo",this.undo.bind(this)),e.addListener("series-redo",this.redo.bind(this))])}destroy(){this.destroyFns.destroy()}addMementoOriginator(e){this.originators.set(e.mementoOriginatorKey,e),this.clearState.set(e.mementoOriginatorKey,e.createMemento()),this.debugEvent("History add originator:",e.mementoOriginatorKey)}clear(){this.debug("History clear:",Object.keys(this.originators)),this.history=[],this.historyIndex=-1;for(const[e,t]of this.originators.entries())this.clearState.set(e,t.createMemento())}record(e,...t){this.historyIndex<this.history.length-1&&(this.history=this.history.slice(0,this.historyIndex+1)),this.history.length>this.maxHistoryLength&&(this.history=this.history.slice(-this.maxHistoryLength));const i=new Map;for(const e of t){if(!this.originators.has(e.mementoOriginatorKey))throw new Error(`Originator [${e.mementoOriginatorKey}] has not been added to the HistoryManager.`);i.set(e.mementoOriginatorKey,e.createMemento())}this.history.push({label:e,mementos:i}),this.historyIndex=this.history.length-1,this.debugEvent(`History record: [${e}]`)}undo(){const e=this.history[this.historyIndex];if(e){for(const t of e.mementos.keys()){const e=this.findPreviousMemento(t);if(e===Yi)throw new Error(`Could not find previous memento for [${t}].`);this.restoreMemento(t,e)}this.historyIndex-=1,this.debugEvent(`History undo: [${e.label}]`)}}redo(){const e=this.history[this.historyIndex+1];if(e){for(const[t,i]of e.mementos.entries())this.restoreMemento(t,i);this.historyIndex+=1,this.debugEvent(`History redo: [${e.label}]`)}}findPreviousMemento(e){for(let t=this.historyIndex-1;t>=0;t--)if(this.history[t].mementos.has(e))return this.history[t].mementos.get(e);return this.clearState.has(e)?this.clearState.get(e):Yi}restoreMemento(e,t){this.originators.get(e)?.restoreMemento($i,$i,t)}debugEvent(...e){this.debug(...e,this.history.map((e,t)=>t===this.historyIndex?`** ${e.label} **`:e.label))}},Xi=class e{constructor(e){this.version=e.split("-")[0]}save(...e){const t={version:this.version};for(const i of Object.values(e))t[i.mementoOriginatorKey]=this.encode(i,i.createMemento());return t}restore(e,...t){if("object"==typeof e)if(null!=e)if("version"in e&&"string"==typeof e.version)for(const i of t){const t=this.decode(i,e[i.mementoOriginatorKey]),s=[];if(!i.guardMemento(t,s)){const e=s.length>0?`\n\n${s.join("\n\n")}\n\n`:"";return void n.Vy.warnOnce(`Could not restore [${i.mementoOriginatorKey}] data, value was invalid, ignoring.${e}`,t)}i.restoreMemento(this.version,e.version,t)}else n.Vy.warnOnce("Could not restore data, missing [version] string in object, ignoring.");else n.Vy.warnOnce("Could not restore data of type [null], expecting an object, ignoring.");else n.Vy.warnOnce(`Could not restore data of type [${typeof e}], expecting an object, ignoring.`)}encode(t,i){try{return JSON.parse(JSON.stringify(i,e.encodeTypes))}catch(e){throw new Error(`Failed to encode [${t.mementoOriginatorKey}] value [${e}].`,{cause:e})}}decode(t,i){if(null==i)return i;try{return JSON.parse(JSON.stringify(i),e.decodeTypes)}catch(e){throw new Error(`Failed to decode [${t.mementoOriginatorKey}] value [${e}].`,{cause:e})}}static encodeTypes(e,t){return(0,n.$P)(this[e])?{__type:"date",value:this[e].toISOString()}:t}static decodeTypes(e,t){return(0,n.Gv)(this[e])&&"__type"in this[e]&&"date"===this[e].__type?new Date(this[e].value):t}},Zi=class{constructor(){this.caretaker=new Xi($i),this.state=new Map}setState(e,t){k(this.state.get(e.mementoOriginatorKey),t)||this.setStateAndRestore(e,t)}setStateAndRestore(e,t){this.state.set(e.mementoOriginatorKey,t),this.restoreState(e)}restoreState(e){const{caretaker:t,state:i}=this;if(!i.has(e.mementoOriginatorKey))return;const n=i.get(e.mementoOriginatorKey);t.restore({version:t.version,[e.mementoOriginatorKey]:n},e)}},Qi=class{constructor(){this.registeredListeners=new Map}addListener(e,t){const i={symbol:Symbol(e),handler:t};return this.registeredListeners.has(e)?this.registeredListeners.get(e).push(i):this.registeredListeners.set(e,[i]),()=>this.removeListener(i.symbol)}removeListener(e){for(const[t,i]of this.registeredListeners.entries()){const n=i.findIndex(t=>t.symbol===e);if(n>=0){i.splice(n,1),0===i.length&&this.registeredListeners.delete(t);break}}}dispatch(e,...t){for(const i of this.getListenersByType(e))try{i.handler(...t)}catch(e){n.Vy.errorOnce(e)}}getListenersByType(e){return this.registeredListeners.get(e)??[]}destroy(){this.registeredListeners.clear()}},Ji=class{constructor(){this.listeners=new Qi,this.destroyFns=[],this.destroyed=!1}addListener(e,t){return this.listeners.addListener(e,t)}destroy(){this.listeners.destroy(),this.destroyFns.forEach(e=>e()),this.destroyed=!0}},en=class e{constructor(e,t,i){this.element=e,this.topTabGuard=t,this.bottomTabGuard=i,this.destroyFns=[],this.guardTabIndex=0,this.hasFocus=!1,this.initTabGuard(this.topTabGuard,e=>this.onTab(e,!1)),this.initTabGuard(this.bottomTabGuard,e=>this.onTab(e,!0)),this.element.addEventListener("focus",()=>this.onFocus(),{capture:!0}),this.element.addEventListener("blur",e=>this.onBlur(e),{capture:!0})}set tabIndex(e){this.guardTabIndex=e,0===this.guardTabIndex?this.setGuardIndices(void 0):this.hasFocus||this.setGuardIndices(this.guardTabIndex)}destroy(){for(const e of this.destroyFns)e();this.destroyFns.length=0}initTabGuard(e,t){const i=()=>t(e);e.addEventListener("focus",i),this.destroyFns.push(()=>e.removeEventListener("focus",i))}setGuardIndices(e){const t=e;(0,n.Bq)(this.topTabGuard,"tabindex",t),(0,n.Bq)(this.bottomTabGuard,"tabindex",t)}onFocus(){this.hasFocus=!0,0!==this.guardTabIndex&&this.setGuardIndices(0)}onBlur({relatedTarget:e}){const{topTabGuard:t,bottomTabGuard:i}=this;this.hasFocus=!1,0!==this.guardTabIndex&&e!==t&&e!==i&&this.setGuardIndices(this.guardTabIndex)}onTab(e,t){if(0!==this.guardTabIndex){let i;0===e.tabIndex?(i=this.findExitTarget(!t),this.setGuardIndices(this.guardTabIndex)):i=this.findEnterTarget(t),i?.focus()}}static queryFocusable(e,t){const i=(0,n.zk)();return Array.from(e.querySelectorAll(t)).filter(e=>{if(e instanceof HTMLElement){const t=i.getComputedStyle(e);return"none"!==t.display&&"none"!==t.visibility}return!1})}findEnterTarget(t){const i=e.queryFocusable(this.element,'[tabindex="0"]');return i[t?i.length-1:0]}findExitTarget(t){const i=e.queryFocusable((0,n.YE)(),"[tabindex]").filter(e=>e.tabIndex>0).sort((e,t)=>e.tabIndex-t.tabIndex),{before:s,after:r}=e.findBeforeAndAfter(i,this.guardTabIndex);return t?s:r}static findBeforeAndAfter(e,t){let i,n,s=0,r=e.length-1;for(;s<=r;){const o=Math.floor((s+r)/2),a=e[o].tabIndex;if(a===t){i=e[o-1]||void 0,n=e[o+1]||void 0;break}a<t?(i=e[o],s=o+1):(n=e[o],r=o-1)}return{before:i,after:n}}};function tn(e,t,i,n,s){t.addEventListener(i,n);const r=()=>t.removeEventListener(i,n,s);return e.push(r),r}function nn(e,t,i,n=["Escape"]){tn(e,t,"keydown",e=>{cn(e,...n)&&i(e)})}function sn(e,t,i){const n=tn(e,window,"mousedown",e=>{[0,2].includes(e.button)&&!on(t,e)&&(i(),n())});return n}function rn(e,t,i){const n=tn(e,window,"touchstart",e=>{Array.from(e.targetTouches).some(e=>!on(t,e))&&(i(),n())});return n}function on(e,t){return t.target instanceof Node&&e.contains(t.target)}function an(e,t,i,s){i.forEach(e=>(0,n.Bq)(e,"data-focus-visible-override",s)),tn(e,t,"keydown",()=>{i.forEach(e=>(0,n.Bq)(e,"data-focus-visible-override",!0))},{once:!0})}function ln(e){return!(e.shiftKey||e.altKey||e.ctrlKey||e.metaKey)}function cn(e,...t){return ln(e)&&t.some(t=>e.key===t)}function hn(e,t,i,n){i&&tn(e,t,"keydown",e=>{cn(e,n)&&i.focus()})}function dn(e,t,i,n,s,r){hn(e,t,s,r),hn(e,t,i,n),tn(e,t,"keydown",e=>{cn(e,n,r)&&e.preventDefault()})}var un={horizontal:{nextKey:"ArrowRight",prevKey:"ArrowLeft"},vertical:{nextKey:"ArrowDown",prevKey:"ArrowUp"}};function pn(e){const{orientation:t,buttons:i,wrapAround:n=!1,onEscape:s,onFocus:r,onBlur:o}=e,{nextKey:a,prevKey:l}=un[t],c=e=>{e.target&&"tabIndex"in e.target&&(i.forEach(e=>e.tabIndex=-1),e.target.tabIndex=0)},[h,d]=n?[i.length,i.length]:[0,1/0],u=[];for(let e=0;e<i.length;e++){const t=i[(h+e-1)%d],n=i[e],p=i[(h+e+1)%d];tn(u,n,"focus",c),r&&tn(u,n,"focus",r),o&&tn(u,n,"blur",o),s&&nn(u,n,s),dn(u,n,p,a,t,l),n.tabIndex=0===e?0:-1}return u}var gn=class{constructor(e,t,i){this.lastFocus=t,this.closeCallback=i,this.destroyFns=[],this.destroyFns.push(sn(this.destroyFns,e,()=>this.close(!0))),this.destroyFns.push(rn(this.destroyFns,e,()=>this.close(!0)))}close(e){this.destroyFns.forEach(e=>e()),this.destroyFns.length=0,this.closeCallback(),this.finishClosing(e)}finishClosing(e){this.destroyFns.forEach(e=>e()),this.destroyFns.length=0,(0,n.Bq)(this.lastFocus,"aria-expanded",!1),e||this.lastFocus?.focus({preventScroll:!0}),this.lastFocus=void 0}};function fn(e){const{sourceEvent:t,orientation:i,menu:s,buttons:r,closeCallback:o,overrideFocusVisible:a}=e,{nextKey:l,prevKey:c}=un[i],h=yn(t);(0,n.Bq)(h,"aria-expanded",!0);const d=new gn(s,h,o),u=()=>d.close(),{destroyFns:p}=d;return s.role="menu",s.ariaOrientation=i,p.push(...pn({orientation:i,buttons:r,onEscape:u,wrapAround:!0})),s.tabIndex=-1,nn(p,s,u),tn(p,s,"keydown",e=>{e.target!==s||e.key!==l&&e.key!==c||(e.preventDefault(),r[0]?.focus())}),r[0]?.focus({preventScroll:!0}),void 0!==a&&an(p,s,r,a),d}function mn(e,t){return i=>{if("true"===e.ariaDisabled)return i.preventDefault();t(i)}}function vn(e){return"button"in e?0===e.button:ln(e)&&("Space"===e.code||"Enter"===e.key)}function yn(e){if(e?.target instanceof HTMLElement&&"tabindex"in e.target.attributes)return e.target}function Cn(e){const t=e=>{e.defaultPrevented||(0,n.D$)(e.target,"data-preventdefault",!0)&&cn(e,"ArrowRight","ArrowLeft","ArrowDown","ArrowUp")&&e.preventDefault()};return e.addEventListener("keydown",t),()=>e.removeEventListener("keydown",t)}var bn=class{constructor(e){this.callback=e,this.devicePixelRatio=(0,n.zk)("devicePixelRatio")??1,this.devicePixelRatioMediaQuery=void 0,this.devicePixelRatioListener=e=>{e.matches||(this.devicePixelRatio=(0,n.zk)("devicePixelRatio")??1,this.unregisterDevicePixelRatioListener(),this.registerDevicePixelRatioListener(),this.callback(this.pixelRatio))}}get pixelRatio(){return this.devicePixelRatio}observe(){this.registerDevicePixelRatioListener()}disconnect(){this.unregisterDevicePixelRatioListener()}unregisterDevicePixelRatioListener(){this.devicePixelRatioMediaQuery?.removeEventListener("change",this.devicePixelRatioListener),this.devicePixelRatioMediaQuery=void 0}registerDevicePixelRatioListener(){const e=(0,n.zk)("matchMedia")?.(`(resolution: ${this.pixelRatio}dppx)`);e?.addEventListener("change",this.devicePixelRatioListener),this.devicePixelRatioMediaQuery=e}},Sn=class{constructor(){let e;this.elements=new Map,this.documentReady=!1,this.queuedObserveRequests=[],this.onLoad=()=>{this.documentReady=!0,this.queuedObserveRequests.forEach(([e,t])=>this.observe(e,t)),this.queuedObserveRequests=[],this.observeWindow()},"undefined"!=typeof ResizeObserver&&(this.resizeObserver=new ResizeObserver(e=>{for(const{target:t,contentRect:{width:i,height:n}}of e){const e=this.elements.get(t);this.checkSize(e,t,i,n)}})),this.pixelRatioObserver=new bn(()=>{clearTimeout(e),e=setTimeout(()=>this.checkPixelRatio(),0)}),this.documentReady="complete"===(0,n.YE)("readyState"),this.documentReady?this.observeWindow():(0,n.zk)()?.addEventListener("load",this.onLoad)}destroy(){(0,n.zk)()?.removeEventListener("load",this.onLoad),this.resizeObserver?.disconnect(),this.resizeObserver=void 0,this.pixelRatioObserver?.disconnect(),this.pixelRatioObserver=void 0}observeWindow(){this.pixelRatioObserver?.observe()}checkPixelRatio(){const e=this.pixelRatioObserver?.pixelRatio??1;for(const[t,i]of this.elements)if(null!=i.size&&i.size.pixelRatio!==e){const{width:n,height:s}=i.size;i.size={width:n,height:s,pixelRatio:e},i.cb(i.size,t)}}checkSize(e,t,i,n){if(e&&(i!==e.size?.width||n!==e.size?.height)){const s=this.pixelRatioObserver?.pixelRatio??1;e.size={width:i,height:n,pixelRatio:s},e.cb(e.size,t)}}observe(e,t){if(!this.documentReady)return void this.queuedObserveRequests.push([e,t]);this.elements.has(e)?this.removeFromQueue(e):this.resizeObserver?.observe(e);const i={cb:t};this.elements.set(e,i)}unobserve(e){this.resizeObserver?.unobserve(e),this.elements.delete(e),this.removeFromQueue(e),this.elements.size||this.destroy()}removeFromQueue(e){this.queuedObserveRequests=this.queuedObserveRequests.filter(([t])=>t!==e)}},wn=class extends Map{constructor(e,t){super(),this.defaultValue=e,this.defaultState=t}set(e,t){return this.delete(e),void 0!==t&&super.set(e,t),this}stateId(){return Array.from(this.keys()).pop()??this.defaultState}stateValue(){return Array.from(this.values()).pop()??this.defaultValue}},xn=["styles","canvas","canvas-center","canvas-container","canvas-overlay","canvas-proxy","series-area","tooltip-container"],En=new Set(["canvas-container","canvas","tooltip-container"]),Mn=new Map([["styles",{childElementType:"style"}],["canvas",{childElementType:"canvas"}],["canvas-proxy",{childElementType:"div"}],["canvas-overlay",{childElementType:"div"}],["canvas-center",{childElementType:"div"}],["series-area",{childElementType:"div"}],["tooltip-container",{childElementType:"div"}]]),An={x:0,y:0,width:0,height:0,top:0,bottom:0,left:0,right:0,toJSON:()=>An};function Tn(e,t){const i=(0,n.n)("div");return i.className="ag-charts-tab-guard",e.insertAdjacentElement(t,i),i}var Dn=class e extends Ji{constructor(e,t,i,s="normal"){super(),this.chart=e,this.styleContainer=i,this.mode=s,this.anchorName=`--${(0,n.sX)(this)}`,this.styles=new Map,this.pendingContainer=void 0,this.container=void 0,this.documentRoot=void 0,this.initiallyConnected=void 0,this.containerSize=void 0,this.sizeMonitor=new Sn,this.cursorState=new wn("default"),this.minWidth=0,this.minHeight=0,this.element=this.initDOM(),this.rootElements=this.initRootElements(),this.rootElements.canvas.element.style.setProperty("anchor-name",this.anchorName);let r=!1;if(this.observer=function(e,t){if("undefined"==typeof IntersectionObserver)return;const i=new IntersectionObserver(i=>{for(const n of i)n.target===e&&t(n.intersectionRatio)},{root:e});return i.observe(e),i}(this.element,e=>{0!==e||r||this.listeners.dispatch("hidden",{type:"hidden"}),r=0===e}),this.setSizeOptions(),this.updateContainerSize(),this.addStyles("ag-charts-community",'.ag-charts-wrapper,.ag-charts-wrapper:after,.ag-charts-wrapper:before,.ag-charts-wrapper *,.ag-charts-wrapper *:after,.ag-charts-wrapper *:before{box-sizing:border-box}.ag-charts-wrapper{--align-items: center;--justify-content: center;position:relative;user-select:none;-webkit-user-select:none;-webkit-tap-highlight-color:rgba(0,0,0,0)}.ag-charts-wrapper--safe-horizontal{--justify-content: flex-start}.ag-charts-wrapper--safe-vertical{--align-items: flex-start}.ag-charts-tab-guard{width:0%;height:0%;position:absolute;pointer-events:none}.ag-charts-canvas-center{width:100%;height:100%;position:absolute;touch-action:auto;pointer-events:auto;display:flex;align-items:var(--align-items);justify-content:var(--justify-content)}.ag-charts-canvas-container,.ag-charts-canvas{position:relative;user-select:none;-webkit-user-select:none}.ag-charts-canvas-container>*,.ag-charts-canvas>*{pointer-events:none}.ag-charts-canvas canvas{display:block}.ag-charts-series-area{outline:none;pointer-events:auto;position:absolute}.ag-charts-swapchain{top:0;left:0;outline:none;opacity:0;pointer-events:none;position:absolute;width:100%;height:100%}.ag-charts-swapchain:focus-visible{opacity:1}.ag-charts-canvas-proxy,.ag-charts-canvas-overlay{inset:0;pointer-events:none;position:absolute;user-select:none;-webkit-user-select:none}.ag-charts-canvas-overlay>*{position:absolute;pointer-events:auto}.ag-charts-theme-default,.ag-charts-theme-default-dark{--ag-charts-accent-color: #2196f3;--ag-charts-background-color: #fff;--ag-charts-border-color: #dddddd;--ag-charts-foreground-color: #464646;--ag-charts-font-family: Verdana, sans-serif;--ag-charts-font-size: 12px;--ag-charts-font-weight: 400;--ag-charts-padding: 20px;--ag-charts-shadow-color: #00000080;--ag-charts-subtle-text-color: #8c8c8c;--ag-charts-text-color: #464646;--ag-charts-chrome-background-color: #fafafa;--ag-charts-chrome-font-family: Verdana, sans-serif;--ag-charts-chrome-font-size: 12px;--ag-charts-chrome-font-weight: 400;--ag-charts-chrome-subtle-text-color: #8c8c8c;--ag-charts-chrome-text-color: #181d1f;--ag-charts-input-background-color: #fff;--ag-charts-input-text-color: #464646;--ag-charts-crosshair-label-background-color: #fff;--ag-charts-crosshair-label-text-color: #464646;--ag-charts-spacing: 4px;--ag-charts-border-radius: 4px;--ag-charts-icon-size: 16px;--ag-charts-shadow: 0 2px 8px 0 color-mix(in srgb, black 8%, transparent);--ag-charts-focus-shadow: 0 0 0 3px var(--ag-charts-accent-color);--ag-charts-focus-color: color-mix(in srgb, var(--ag-charts-background-color), var(--ag-charts-accent-color) 12%);--ag-charts-input-border-color: var(--ag-charts-border-color);--ag-charts-input-border-radius: var(--ag-charts-border-radius);--ag-charts-input-focus-border-color: var(--ag-charts-accent-color);--ag-charts-input-focus-text-color: var(--ag-charts-accent-color);--ag-charts-input-disabled-background-color: color-mix( in srgb, var(--ag-charts-chrome-background-color), var(--ag-charts-foreground-color) 6% );--ag-charts-input-disabled-border-color: var(--ag-charts-border-color);--ag-charts-input-disabled-text-color: color-mix( in srgb, var(--ag-charts-chrome-background-color), var(--ag-charts-input-text-color) 50% );--ag-charts-input-placeholder-text-color: color-mix( in srgb, var(--ag-charts-input-background-color), var(--ag-charts-input-text-color) 60% );--ag-charts-button-background-color: var(--ag-charts-background-color);--ag-charts-button-border-color: var(--ag-charts-border-color);--ag-charts-button-border-radius: var(--ag-charts-border-radius);--ag-charts-button-text-color: var(--ag-charts-text-color);--ag-charts-button-focus-background-color: color-mix( in srgb, var(--ag-charts-button-background-color), var(--ag-charts-accent-color) 12% );--ag-charts-button-focus-border-color: var(--ag-charts-accent-color);--ag-charts-button-focus-text-color: var(--ag-charts-accent-color);--ag-charts-button-disabled-background-color: color-mix( in srgb, var(--ag-charts-chrome-background-color), var(--ag-charts-foreground-color) 6% );--ag-charts-button-disabled-border-color: var(--ag-charts-border-color);--ag-charts-button-disabled-text-color: color-mix( in srgb, var(--ag-charts-chrome-background-color), var(--ag-charts-chrome-text-color) 50% );--ag-charts-checkbox-background-color: color-mix( in srgb, var(--ag-charts-background-color), var(--ag-charts-foreground-color) 35% );--ag-charts-checkbox-checked-background-color: var(--ag-charts-accent-color);--ag-charts-chrome-font-size-small: var(--ag-charts-chrome-font-size);--ag-charts-chrome-font-size-medium: calc(var(--ag-charts-chrome-font-size) * (13 / 12));--ag-charts-chrome-font-size-large: calc(var(--ag-charts-chrome-font-size) * (14 / 12));--ag-charts-border: solid 1px var(--ag-charts-border-color);--ag-charts-focus-border: solid 1px var(--ag-charts-accent-color);--ag-charts-focus-border-shadow: 0 0 0 3px color-mix(in srgb, transparent, var(--ag-charts-accent-color) 20%);--ag-charts-layer-menu: 6;--ag-charts-layer-ui-overlay: 5;--ag-charts-layer-tooltip: 4;--ag-charts-layer-toolbar: 3;--ag-charts-layer-crosshair: 2;--ag-charts-layer-annotations: 1}.ag-charts-theme-default-dark{--ag-charts-shadow: 0 2px 12px 0 color-mix(in srgb, black 33.3%, transparent);--ag-charts-focus-color: color-mix(in srgb, var(--ag-charts-background-color), var(--ag-charts-accent-color) 22%)}.ag-chart-canvas-wrapper .ag-charts-theme-default{--ag-charts-border-radius: var(--ag-border-radius, 4px);--ag-charts-border: var(--ag-borders-critical, solid 1px) var(--ag-charts-border-color);--ag-charts-focus-shadow: var(--ag-focus-shadow, 0 0 0 3px var(--ag-charts-accent-color));--ag-charts-focus-border-shadow: var( --ag-focus-shadow, 0 0 0 3px color-mix(in srgb, transparent, var(--ag-charts-accent-color) 20%) )}.ag-charts-icon{display:block;width:20px;height:20px;speak:none;speak:never;mask:var(--icon) center / contain no-repeat;background-color:currentColor;transition:background-color .25s ease-in-out}.ag-charts-icon-align-center{--icon: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjAiIGhlaWdodD0iMjAiIHZpZXdCb3g9IjAgMCAyMCAyMCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48cGF0aCBmaWxsPSIjMDAwIiBkPSJNNyAxMGg2djFIN3pNNCA3aDEydjFINHptMSA2aDEwdjFINXoiLz48L3N2Zz4=)}.ag-charts-icon-align-left{--icon: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjAiIGhlaWdodD0iMjAiIHZpZXdCb3g9IjAgMCAyMCAyMCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48cGF0aCBmaWxsPSIjMDAwIiBkPSJNNCAxMGg2djFINHptMC0zaDEydjFINHptMCA2aDEwdjFINHoiLz48L3N2Zz4=)}.ag-charts-icon-align-right{--icon: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjAiIGhlaWdodD0iMjAiIHZpZXdCb3g9IjAgMCAyMCAyMCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48cGF0aCBmaWxsPSIjMDAwIiBkPSJNMTAgMTBoNnYxaC02ek00IDdoMTJ2MUg0em0yIDZoMTB2MUg2eiIvPjwvc3ZnPg==)}.ag-charts-icon-arrow-drawing{--icon: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjAiIGhlaWdodD0iMjAiIHZpZXdCb3g9IjAgMCAyMCAyMCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48cGF0aCBmaWxsLXJ1bGU9ImV2ZW5vZGQiIGNsaXAtcnVsZT0iZXZlbm9kZCIgZD0iTTE1LjI5MyA0LjVIMTIuNXYtMUgxN3Y0aC0xVjUuMjA3bC05LjY0NiA5LjY0Ny0uNzA4LS43MDh6IiBmaWxsPSIjMDAwIi8+PHBhdGggZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik03IDE2YTIuNSAyLjUgMCAxIDEtNSAwIDIuNSAyLjUgMCAwIDEgNSAwbS0yLjUgMS41YTEuNSAxLjUgMCAxIDAgMC0zIDEuNSAxLjUgMCAwIDAgMCAzIiBmaWxsPSIjMDAwIi8+PC9zdmc+)}.ag-charts-icon-arrow-down-drawing{--icon: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjAiIGhlaWdodD0iMjAiIHZpZXdCb3g9IjAgMCAyMCAyMCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik02IDhMMS41IDhMMTAgMThMMTguNSA4TDE0IDhMMTQgM0w2IDNMNiA4Wk03IDRMNyA5SDMuNjYyNDRMMTAgMTYuNDU2TDE2LjMzNzYgOUwxMyA5TDEzIDRMNyA0WiIgZmlsbD0iYmxhY2siLz4KPC9zdmc+Cg==)}.ag-charts-icon-arrow-up-drawing{--icon: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjAiIGhlaWdodD0iMjAiIHZpZXdCb3g9IjAgMCAyMCAyMCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik0xNCAxMkgxOC41TDEwIDJMMS41IDEySDZMNi4wMDAwMiAxN0gxNFYxMlpNMTMgMTZWMTFIMTYuMzM3NkwxMCAzLjU0NDA1TDMuNjYyNDQgMTFIN0w3LjAwMDAyIDE2SDEzWiIgZmlsbD0iYmxhY2siLz4KPC9zdmc+Cg==)}.ag-charts-icon-callout-annotation{--icon: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyMCIgaGVpZ2h0PSIyMCIgZmlsbD0ibm9uZSI+PHBhdGggZmlsbD0iIzAwMCIgZmlsbC1ydWxlPSJldmVub2RkIiBkPSJNMyA0LjVBMS41IDEuNSAwIDAgMSA0LjUgM2gxMUExLjUgMS41IDAgMCAxIDE3IDQuNXY4YTEuNSAxLjUgMCAwIDEtMS41IDEuNWgtNC41MTRhMjYgMjYgMCAwIDAtMi4wMTcgMS41NGwtLjMxNC4yNmMtLjU1LjQ1Ny0xLjExNS45MjYtMS43NiAxLjQtLjY2OS40OTEtMS41NjItLjAxMi0xLjU2Mi0uOFYxNEg0LjVBMS41IDEuNSAwIDAgMSAzIDEyLjV6TTQuNSA0YS41LjUgMCAwIDAtLjUuNXY4YS41LjUgMCAwIDAgLjUuNWgxLjgzM3YzLjM3MmEzNiAzNiAwIDAgMCAxLjY3OC0xLjMzOGwuMzItLjI2NWEyNiAyNiAwIDAgMSAyLjIyNS0xLjY4NWwuMTI2LS4wODRIMTUuNWEuNS41IDAgMCAwIC41LS41di04YS41LjUgMCAwIDAtLjUtLjV6IiBjbGlwLXJ1bGU9ImV2ZW5vZGQiLz48L3N2Zz4=)}.ag-charts-icon-candlestick-series{--icon: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyMCIgaGVpZ2h0PSIyMCIgZmlsbD0ibm9uZSI+PHBhdGggZmlsbD0iIzEzMTcyMiIgZmlsbC1ydWxlPSJldmVub2RkIiBkPSJNNyAxdjNoMnYxMkg3djNINnYtM0g0VjRoMlYxek01IDVoM3YxMEg1ek0xMSAxNFY2aDJWMy4yNWgxVjZoMnY4aC0ydjIuNzVoLTFWMTR6bTEtN2gzdjZoLTN6IiBjbGlwLXJ1bGU9ImV2ZW5vZGQiLz48L3N2Zz4=)}.ag-charts-icon-close{--icon: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjAiIGhlaWdodD0iMjAiIHZpZXdCb3g9IjAgMCAyMCAyMCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48cGF0aCBkPSJtNSA1IDEwIDEwTTUgMTUgMTUgNSIgc3Ryb2tlPSIjMDAwIi8+PC9zdmc+)}.ag-charts-icon-comment-annotation{--icon: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyMCIgaGVpZ2h0PSIyMCIgZmlsbD0ibm9uZSI+PHBhdGggZmlsbD0iIzAwMCIgZmlsbC1ydWxlPSJldmVub2RkIiBkPSJNNy41MTMgMy45OTVhNi41IDYuNSAwIDAgMSA2LjA5OCAxMS40MWMtLjU4OC4zOTMtMS4yMTcuNTM2LTEuODI5LjU4NWExMyAxMyAwIDAgMS0xLjI3LjAxN0EyNyAyNyAwIDAgMCAxMCAxNkg0LjVhLjUuNSAwIDAgMS0uNS0uNVYxMHEwLS4yNDctLjAwNy0uNTEzYy0uMDA4LS40MTYtLjAxNi0uODU3LjAxNy0xLjI2OS4wNS0uNjEyLjE5Mi0xLjI0LjU4NS0xLjgzYTYuNSA2LjUgMCAwIDEgMi45MTgtMi4zOTNtMy41Ni42MWE1LjUgNS41IDAgMCAwLTUuNjQ2IDIuMzRjLS4yNjYuMzk3LS4zNzkuODQyLS40MiAxLjM1NC0uMDMuMzYtLjAyMi43MTgtLjAxNSAxLjEwOFE1IDkuNjg5IDUgMTB2NWg1cS4zMTEuMDAxLjU5My4wMDhjLjM5LjAwNy43NDcuMDE1IDEuMTA4LS4wMTUuNTEyLS4wNDEuOTU3LS4xNTQgMS4zNTUtLjQyYTUuNSA1LjUgMCAwIDAtMS45ODMtOS45NjciIGNsaXAtcnVsZT0iZXZlbm9kZCIvPjwvc3ZnPg==)}.ag-charts-icon-crosshair-add-line{--icon: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyMCIgaGVpZ2h0PSIyMCIgZmlsbD0ibm9uZSI+PHBhdGggZmlsbD0iIzAwMCIgZD0iTTEwIDUuNWEuNS41IDAgMCAxIC41LjV2My41aDMuODc1YS41LjUgMCAwIDEgMCAxSDEwLjV2NC4yNWEuNS41IDAgMSAxLTEgMFYxMC41SDUuNjI1YS41LjUgMCAxIDEgMC0xSDkuNVY2YS41LjUgMCAwIDEgLjUtLjUiLz48L3N2Zz4=)}.ag-charts-icon-date-range-drawing{--icon: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjAiIGhlaWdodD0iMjAiIHZpZXdCb3g9IjAgMCAyMCAyMCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48cGF0aCBkPSJNMiAyaDF2MTZIMnptMTUgMGgxdjE2aC0xeiIgZmlsbD0iIzE4MUQxRiIvPjxwYXRoIGQ9Ik0xMy4xNTcgMTFINXYtMWg3Ljc5M0wxMSA4LjIwN2wuNzA3LS43MDcgMy4xODIgMy4xODItMy4xODIgMy4xODItLjcwNy0uNzA3eiIgZmlsbD0iIzAwMCIvPjwvc3ZnPg==)}.ag-charts-icon-date-price-range-drawing{--icon: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjAiIGhlaWdodD0iMjAiIHZpZXdCb3g9IjAgMCAyMCAyMCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48cGF0aCBkPSJNMyAySDJ2MTZoMXptMy41MDcgNC44OUw4LjUgNC44OTVWMTBINXYxaDMuNXY3aDF2LTdoNS4wODhsLTEuOTU3IDEuOTU3LjcwNy43MDcgMy4xODItMy4xODJMMTMuMzM4IDcuM2wtLjcwNy43MDdMMTQuNjI0IDEwSDkuNVY0LjkzMmwxLjk1NyAxLjk1Ny43MDctLjcwN0w4Ljk4MiAzIDUuOCA2LjE4MnoiIGZpbGw9IiMxODFEMUYiLz48L3N2Zz4=)}.ag-charts-icon-delete{--icon: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyMCIgaGVpZ2h0PSIyMCIgZmlsbD0ibm9uZSI+PHBhdGggZmlsbD0iIzEzMTcyMiIgZD0iTTguNDk2IDguOTk2QS41LjUgMCAwIDEgOSA5LjQ5MnY0YS41LjUgMCAxIDEtMSAuMDA4di00YS41LjUgMCAwIDEgLjQ5Ni0uNTA0TTEyIDkuNWEuNS41IDAgMCAwLTEgMHY0YS41LjUgMCAwIDAgMSAweiIvPjxwYXRoIGZpbGw9IiMxMzE3MjIiIGZpbGwtcnVsZT0iZXZlbm9kZCIgZD0iTTYgNVYzLjVBMi41IDIuNSAwIDAgMSA4LjUgMWgzQTIuNSAyLjUgMCAwIDEgMTQgMy41VjVoMi44MzNhLjUuNSAwIDAgMSAwIDFIMTV2MTAuMjVjMCAuNDE1LS4wNjYuODYzLS4zIDEuMjIxLS4yNTcuMzk0LS42NzIuNjEyLTEuMi42MTJoLTdjLS41MjggMC0uOTQzLS4yMTgtMS4yLS42MTItLjIzNC0uMzU4LS4zLS44MDYtLjMtMS4yMjFWNkgzLjMzM2EuNS41IDAgMCAxIDAtMXptMS0xLjVBMS41IDEuNSAwIDAgMSA4LjUgMmgzQTEuNSAxLjUgMCAwIDEgMTMgMy41VjVIN3pNNiAxNi4yNVY2aDh2MTAuMjVjMCAuMzM1LS4wNTkuNTU0LS4xMzguNjc1LS4wNTUuMDg1LS4xNC4xNTgtLjM2Mi4xNThoLTdjLS4yMjIgMC0uMzA3LS4wNzMtLjM2Mi0uMTU4LS4wOC0uMTIxLS4xMzgtLjM0LS4xMzgtLjY3NSIgY2xpcC1ydWxlPSJldmVub2RkIi8+PC9zdmc+)}.ag-charts-icon-disjoint-channel,.ag-charts-icon-disjoint-channel-drawing{--icon: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyMCIgaGVpZ2h0PSIyMCIgZmlsbD0ibm9uZSI+PHBhdGggZmlsbD0iIzEzMTcyMiIgZmlsbC1ydWxlPSJldmVub2RkIiBkPSJNMTkuMDI4IDE3LjQ2YTIuMjUgMi4yNSAwIDAgMC00LjA5Mi0xLjg1bC05LjUxMS0yLjM3OGEyLjI1IDIuMjUgMCAxIDAtLjIyNS45NzRsOS40NzUgMi4zNjlhMi4yNTEgMi4yNTEgMCAwIDAgNC4zNTMuODg2bS0xLjY2Mi0xLjk2NWExLjI1IDEuMjUgMCAxIDEtLjg4NSAyLjMzOCAxLjI1IDEuMjUgMCAwIDEgLjg4NS0yLjMzOE00LjM0MyAxMy42NjlhMS4yNSAxLjI1IDAgMSAwLTIuMzM4LS44ODUgMS4yNSAxLjI1IDAgMCAwIDIuMzM4Ljg4NU0zLjk3IDguNzY5YTIuMjUgMi4yNSAwIDAgMCAxLjQ1NS0yLjExbDkuNTExLTIuMzc4YTIuMjUgMi4yNSAwIDEgMC0uMjYtLjk2NUw1LjIgNS42ODVhMi4yNSAyLjI1IDAgMSAwLTEuMjMgMy4wODRtLjM3My0yLjU0N2ExLjI1IDEuMjUgMCAxIDEtMi4zMzguODg1IDEuMjUgMS4yNSAwIDAgMSAyLjMzOC0uODg1bTEzLjc1LTMuNDM4YTEuMjUgMS4yNSAwIDEgMS0yLjMzOC44ODUgMS4yNSAxLjI1IDAgMCAxIDIuMzM4LS44ODUiIGNsaXAtcnVsZT0iZXZlbm9kZCIvPjwvc3ZnPg==)}.ag-charts-icon-drag-handle{--icon: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjAiIGhlaWdodD0iMjAiIHZpZXdCb3g9IjAgMCAyMCAyMCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48Y2lyY2xlIGN4PSI1Ljc1IiBjeT0iNy43NSIgcj0iLjc1IiBmaWxsPSIjMDAwIiBmaWxsLW9wYWNpdHk9Ii41Ii8+PGNpcmNsZSBjeD0iOS43NSIgY3k9IjcuNzUiIHI9Ii43NSIgZmlsbD0iIzAwMCIgZmlsbC1vcGFjaXR5PSIuNSIvPjxjaXJjbGUgY3g9IjEzLjc1IiBjeT0iNy43NSIgcj0iLjc1IiBmaWxsPSIjMDAwIiBmaWxsLW9wYWNpdHk9Ii41Ii8+PGNpcmNsZSBjeD0iMTMuNzUiIGN5PSIxMS43NSIgcj0iLjc1IiBmaWxsPSIjMDAwIiBmaWxsLW9wYWNpdHk9Ii41Ii8+PGNpcmNsZSBjeD0iOS43NSIgY3k9IjExLjc1IiByPSIuNzUiIGZpbGw9IiMwMDAiIGZpbGwtb3BhY2l0eT0iLjUiLz48Y2lyY2xlIGN4PSI1Ljc1IiBjeT0iMTEuNzUiIHI9Ii43NSIgZmlsbD0iIzAwMCIgZmlsbC1vcGFjaXR5PSIuNSIvPjwvc3ZnPg==)}.ag-charts-icon-fibonacci-retracement-drawing{--icon: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjAiIGhlaWdodD0iMjAiIHZpZXdCb3g9IjAgMCAyMCAyMCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48cGF0aCBmaWxsPSIjMDAwIiBkPSJNMiA1aDEydjFIMnoiLz48Y2lyY2xlIGN4PSIxNS43NSIgY3k9IjUuNSIgcj0iMS43NSIgc3Ryb2tlPSIjMDAwIi8+PGNpcmNsZSBjeD0iNC4yNSIgY3k9IjE0LjUiIHI9IjEuNzUiIHN0cm9rZT0iIzAwMCIvPjxwYXRoIGZpbGw9IiMwMDAiIGQ9Ik0xOCAxNUg2di0xaDEyem0wLTQuNUgydi0xaDE2eiIvPjwvc3ZnPg==)}.ag-charts-icon-fibonacci-retracement-trend-based-drawing{--icon: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjAiIGhlaWdodD0iMjAiIHZpZXdCb3g9IjAgMCAyMCAyMCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48cGF0aCBmaWxsPSIjMDAwIiBkPSJtNC45OTYgMTIuNjc0IDMuMjkxLTUuNzQzLjg2OC40OTctMy4yOTEgNS43NDN6Ii8+PGNpcmNsZSBjeD0iOS43NSIgY3k9IjUuNSIgcj0iMS43NSIgc3Ryb2tlPSIjMDAwIi8+PGNpcmNsZSBjeD0iNC4zNTEiIGN5PSIxNC41IiByPSIxLjc1IiBzdHJva2U9IiMwMDAiLz48cGF0aCBmaWxsPSIjMDAwIiBkPSJNMTggNmgtN1Y1aDd6bTAgNC41aC03di0xaDd6bTAgNC41SDZ2LTFoMTJ6Ii8+PC9zdmc+)}.ag-charts-icon-fill-color{--icon: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyMCIgaGVpZ2h0PSIyMCIgZmlsbD0ibm9uZSI+PHBhdGggZmlsbD0iIzAwMCIgZmlsbC1ydWxlPSJldmVub2RkIiBkPSJtOC4wNzEgNC4wNi0uOTI0LS45MjQuNzA3LS43MDcgNy4yODggNy4yODgtNC45NSA0Ljk1YTMuNSAzLjUgMCAwIDEtNC45NSAwbC0xLjQxNC0xLjQxNGEzLjUgMy41IDAgMCAxIDAtNC45NXptLjcwNy43MDhMNC41MzYgOS4wMWEyLjUgMi41IDAgMCAwIDAgMy41MzZMNS45NSAxMy45NmEyLjUgMi41IDAgMCAwIDMuNTM1IDBsNC4yNDMtNC4yNDN6bTYuOSA3LjIwMi0uMzQ1LjM2My0uMzQ0LS4zNjNhLjUuNSAwIDAgMSAuNjg4IDBtLS4zNDUgMS4wOGE4IDggMCAwIDAtLjI4LjMyMyA0LjMgNC4zIDAgMCAwLS40MDkuNTgyYy0uMTEzLjIwMS0uMTQ0LjMyNi0uMTQ0LjM3OGEuODMzLjgzMyAwIDAgMCAxLjY2NyAwYzAtLjA1Mi0uMDMxLS4xNzctLjE0NC0uMzc4YTQuMyA0LjMgMCAwIDAtLjQxLS41ODIgOCA4IDAgMCAwLS4yOC0uMzIybS0uMzQ0LTEuMDguMzQ0LjM2My4zNDQtLjM2My4wMDIuMDAyLjAwNC4wMDQuMDEzLjAxMmE2IDYgMCAwIDEgLjIwNi4yMDhjLjEzMS4xMzYuMzA4LjMyNy40ODUuNTQ1LjE3Ni4yMTUuMzYzLjQ2Ny41MDcuNzI0LjEzNy4yNDMuMjczLjU1My4yNzMuODY4YTEuODMzIDEuODMzIDAgMSAxLTMuNjY3IDBjMC0uMzE1LjEzNi0uNjI1LjI3My0uODY4LjE0NC0uMjU3LjMzLS41MDkuNTA3LS43MjRhOSA5IDAgMCAxIC42NDUtLjcwOGwuMDQ2LS4wNDUuMDEzLS4wMTIuMDA0LS4wMDR6IiBjbGlwLXJ1bGU9ImV2ZW5vZGQiLz48L3N2Zz4=)}.ag-charts-icon-hollow-candlestick-series{--icon: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyMCIgaGVpZ2h0PSIyMCIgZmlsbD0ibm9uZSI+PHBhdGggZmlsbD0iIzEzMTcyMiIgZmlsbC1vcGFjaXR5PSIuMTUiIGQ9Ik01IDVoM3YxMEg1eiIvPjxwYXRoIGZpbGw9IiMxMzE3MjIiIGZpbGwtcnVsZT0iZXZlbm9kZCIgZD0iTTcgMXYzaDJ2MTJIN3YzSDZ2LTNINFY0aDJWMXpNNSA1aDN2MTBINXptNyAyaDN2NmgtM3ptLTEgN1Y2aDJWMy4yNWgxVjZoMnY4aC0ydjIuNzVoLTFWMTR6IiBjbGlwLXJ1bGU9ImV2ZW5vZGQiLz48L3N2Zz4=)}.ag-charts-icon-horizontal-line,.ag-charts-icon-horizontal-line-drawing{--icon: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyMCIgaGVpZ2h0PSIyMCIgZmlsbD0ibm9uZSI+PHBhdGggZmlsbD0iIzEzMTcyMiIgZmlsbC1ydWxlPSJldmVub2RkIiBkPSJNLjUgOS41aDcuMzA2YTIuMjUgMi4yNSAwIDAgMSA0LjM4OCAwSDE5LjV2MWgtNy4zMDZhMi4yNSAyLjI1IDAgMCAxLTQuMzg4IDBILjV6bTkuNSAxLjc1YTEuMjUgMS4yNSAwIDEgMCAwLTIuNSAxLjI1IDEuMjUgMCAwIDAgMCAyLjUiIGNsaXAtcnVsZT0iZXZlbm9kZCIvPjwvc3ZnPg==)}.ag-charts-icon-line-color{--icon: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyMCIgaGVpZ2h0PSIyMCIgZmlsbD0ibm9uZSI+PHBhdGggZmlsbD0iIzAwMCIgZmlsbC1ydWxlPSJldmVub2RkIiBkPSJNMTQuMjQyIDIuNzIyYy0uNjEyIDAtMS4yLjI0My0xLjYzMi42NzVsLTEuMzQzIDEuMzQ0YS41LjUgMCAwIDAtLjExMi4xMTJMNC4wNSAxMS45NTljLS4yMDcuMjA3LS4zNi40Ni0uNDQ2Ljc0di4wMDFsLS42OSAyLjc2N3YuMDAyYS44Mi44MiAwIDAgMCAxLjAyMiAxLjAyMWguMDAybDIuNjM0LS44MjJjLjI4LS4wODUuNTM0LS4yMzcuNzQtLjQ0M2w3LjEwNy03LjEwOGEuNS41IDAgMCAwIC4xMTItLjExMmwxLjM0My0xLjM0M2EyLjMwOCAyLjMwOCAwIDAgMC0xLjYzMi0zLjk0TTE0LjEyMiA3bDEuMDQ0LTEuMDQ1YTEuMzA4IDEuMzA4IDAgMSAwLTEuODQ5LTEuODVMMTIuMjcxIDUuMTV6bS0yLjU1OC0xLjE0Mi02LjgwNyA2LjgwOWEuOC44IDAgMCAwLS4xOTYuMzI1bC0uNzUgMi40NjggMi40Ny0uNzQ5YS44LjggMCAwIDAgLjMyNS0uMTk0bDYuODA4LTYuODF6IiBjbGlwLXJ1bGU9ImV2ZW5vZGQiLz48L3N2Zz4=)}.ag-charts-icon-line-series{--icon: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyMCIgaGVpZ2h0PSIyMCIgZmlsbD0ibm9uZSI+PHBhdGggZmlsbD0iIzEzMTcyMiIgZmlsbC1ydWxlPSJldmVub2RkIiBkPSJtMTcuMzYyIDQuODczLTQuNTk0IDYuNjU0LTQuODUtMy4zMTctNC4yNTEgNi45NzctLjg1NC0uNTJMNy42MTIgNi43OWw0Ljg5OSAzLjM1IDQuMDI4LTUuODM2eiIgY2xpcC1ydWxlPSJldmVub2RkIi8+PC9zdmc+)}.ag-charts-icon-line-style-dashed{--icon: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjAiIGhlaWdodD0iMjAiIHZpZXdCb3g9IjAgMCAyMCAyMCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48cGF0aCBmaWxsPSIjMDAwIiBkPSJNMiA5aDR2MUgyem0xMiAwaDR2MWgtNHpNOCA5aDR2MUg4eiIvPjwvc3ZnPg==)}.ag-charts-icon-line-style-dotted{--icon: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjAiIGhlaWdodD0iMjAiIHZpZXdCb3g9IjAgMCAyMCAyMCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48Y2lyY2xlIGN4PSIyLjUiIGN5PSI5LjUiIHI9Ii41IiBmaWxsPSIjMDAwIi8+PGNpcmNsZSBjeD0iNC41IiBjeT0iOS41IiByPSIuNSIgZmlsbD0iIzAwMCIvPjxjaXJjbGUgY3g9IjYuNSIgY3k9IjkuNSIgcj0iLjUiIGZpbGw9IiMwMDAiLz48Y2lyY2xlIGN4PSI4LjUiIGN5PSI5LjUiIHI9Ii41IiBmaWxsPSIjMDAwIi8+PGNpcmNsZSBjeD0iMTAuNSIgY3k9IjkuNSIgcj0iLjUiIGZpbGw9IiMwMDAiLz48Y2lyY2xlIGN4PSIxMi41IiBjeT0iOS41IiByPSIuNSIgZmlsbD0iIzAwMCIvPjxjaXJjbGUgY3g9IjE0LjUiIGN5PSI5LjUiIHI9Ii41IiBmaWxsPSIjMDAwIi8+PGNpcmNsZSBjeD0iMTYuNSIgY3k9IjkuNSIgcj0iLjUiIGZpbGw9IiMwMDAiLz48L3N2Zz4=)}.ag-charts-icon-line-style-solid{--icon: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjAiIGhlaWdodD0iMjAiIHZpZXdCb3g9IjAgMCAyMCAyMCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48cGF0aCBmaWxsPSIjMDAwIiBkPSJNMiA5aDE2djFIMnoiLz48L3N2Zz4=)}.ag-charts-icon-line-with-markers-series{--icon: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyMCIgaGVpZ2h0PSIyMCIgZmlsbD0ibm9uZSI+PHBhdGggZmlsbD0iIzEzMTcyMiIgZmlsbC1ydWxlPSJldmVub2RkIiBkPSJtMTguMTk4IDQuODg4LTMuNTU2IDQuOTE4YTIuMjUgMi4yNSAwIDEgMS0zLjg2Ni43NWwtMS40MzItLjlhMi4yNCAyLjI0IDAgMCAxLTIuMDA5LjQzNWwtMy44MjggNi40MjgtLjg2LS41MTJMNi40NSA5LjYyM2EyLjI1IDIuMjUgMCAxIDEgMy41MS0uNzYxbDEuMzI5LjgzNWEyLjI0IDIuMjQgMCAwIDEgMi41NTctLjQ5N2wzLjU0Mi00Ljg5OHptLTQuOTYgNS4xNTNhMS4yNSAxLjI1IDAgMSAwLS42NCAyLjQxOSAxLjI1IDEuMjUgMCAwIDAgLjY0LTIuNDE5TTkuMSA4LjMyMXEuMDY2LS4xOTIuMDY3LS40MDRhMS4yNSAxLjI1IDAgMSAwLS4wNjcuNDA0IiBjbGlwLXJ1bGU9ImV2ZW5vZGQiLz48L3N2Zz4=)}.ag-charts-icon-lock,.ag-charts-icon-locked{--icon: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyMCIgaGVpZ2h0PSIyMCIgZmlsbD0ibm9uZSI+PHBhdGggZmlsbD0iIzAwMCIgZmlsbC1ydWxlPSJldmVub2RkIiBkPSJNMTAuMjA3IDMuNzY0YTIuODk0IDIuODk0IDAgMCAwLTIuODk1IDIuODk0VjloNS43ODlWNi42NThhMi44OTQgMi44OTQgMCAwIDAtMi44OTUtMi44OTRNMTQuMSA5VjYuNjU4YTMuODk0IDMuODk0IDAgMSAwLTcuNzg5IDB2Mi4zNDlBMi41IDIuNSAwIDAgMCA0IDExLjV2M0EyLjUgMi41IDAgMCAwIDYuNSAxN2g4YTIuNSAyLjUgMCAwIDAgMi41LTIuNXYtM0EyLjUgMi41IDAgMCAwIDE0LjUgOXpNNi41IDEwQTEuNSAxLjUgMCAwIDAgNSAxMS41djNBMS41IDEuNSAwIDAgMCA2LjUgMTZoOGExLjUgMS41IDAgMCAwIDEuNS0xLjV2LTNhMS41IDEuNSAwIDAgMC0xLjUtMS41eiIgY2xpcC1ydWxlPSJldmVub2RkIi8+PC9zdmc+)}.ag-charts-icon-measurer-drawing{--icon: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjAiIGhlaWdodD0iMjAiIHZpZXdCb3g9IjAgMCAyMCAyMCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48cGF0aCBmaWxsLXJ1bGU9ImV2ZW5vZGQiIGNsaXAtcnVsZT0iZXZlbm9kZCIgZD0ibTQuNDYxIDEyLjcxIDEuNTMyLTEuNTMxIDEuNDE0IDEuNDE0LjcwNy0uNzA3TDYuNyAxMC40NzJsMS41MzItMS41MzMgMiAyIC43MDctLjcwNy0yLTIgNi4wMS02LjAxIDIuODMgMi44MjhMNS4wNSAxNy43NzggMi4yMjIgMTQuOTVsMS41MzItMS41MzIgMS40MTQgMS40MTQuNzA3LS43MDd6TS44MDggMTQuOTVsLjcwNy0uNzA3TDE0LjI0MyAxLjUxNWwuNzA3LS43MDcuNzA3LjcwNyAyLjgyOCAyLjgyOC43MDcuNzA3LS43MDcuNzA3TDUuNzU3IDE4LjQ4NWwtLjcwNy43MDctLjcwNy0uNzA3LTIuODI4LTIuODI4em0xMS4wNzgtNi44MzVMMTAuNDcgNi43bC43MDctLjcwNyAxLjQxNSAxLjQxNHptLjgyNC0zLjY1NCAxIDEgLjcwOC0uNzA3LTEtMXoiIGZpbGw9IiMxODFEMUYiLz48L3N2Zz4=)}.ag-charts-icon-note-annotation{--icon: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyMCIgaGVpZ2h0PSIyMCIgZmlsbD0ibm9uZSI+PHBhdGggZmlsbD0iIzAwMCIgZmlsbC1ydWxlPSJldmVub2RkIiBkPSJNMyA0LjVBMS41IDEuNSAwIDAgMSA0LjUgM2gxMUExLjUgMS41IDAgMCAxIDE3IDQuNXY4YTEuNSAxLjUgMCAwIDEtMS41IDEuNWgtMy4yMWwtMS40NjkgMi41N2ExIDEgMCAwIDEtMS42ODIuMDg1TDcuMjQzIDE0SDQuNUExLjUgMS41IDAgMCAxIDMgMTIuNXpNNC41IDRhLjUuNSAwIDAgMC0uNS41djhhLjUuNSAwIDAgMCAuNS41aDMuMjU3bDIuMTk2IDMuMDc0TDExLjcxIDEzaDMuNzlhLjUuNSAwIDAgMCAuNS0uNXYtOGEuNS41IDAgMCAwLS41LS41eiIgY2xpcC1ydWxlPSJldmVub2RkIi8+PHBhdGggZmlsbD0iIzAwMCIgZmlsbC1ydWxlPSJldmVub2RkIiBkPSJNNi41IDYuNUEuNS41IDAgMCAxIDcgNmg2YS41LjUgMCAwIDEgMCAxSDdhLjUuNSAwIDAgMS0uNS0uNU02LjUgOS41QS41LjUgMCAwIDEgNyA5aDZhLjUuNSAwIDAgMSAwIDFIN2EuNS41IDAgMCAxLS41LS41IiBjbGlwLXJ1bGU9ImV2ZW5vZGQiLz48L3N2Zz4=)}.ag-charts-icon-ohlc-series{--icon: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyMCIgaGVpZ2h0PSIyMCIgZmlsbD0ibm9uZSI+PHBhdGggZmlsbD0iIzEzMTcyMiIgZD0iTTEzIDExaC0zdi0xaDNWM2gxdjJoNHYxaC00djExaC0xek02IDE3di0yaDN2LTFINlY0SDV2MUgydjFoM3YxMXoiLz48L3N2Zz4=)}.ag-charts-icon-pan-end{--icon: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyMCIgaGVpZ2h0PSIyMCIgZmlsbD0ibm9uZSI+PHBhdGggZmlsbD0iIzAwMCIgZD0ibTYuNjQ2IDEzLjgxMy0uMzUzLjM1NC43MDcuNzA3LjM1NC0uMzU0ek0xMS4xNjYgMTBsLjM1NC4zNTQuMzU0LS4zNTQtLjM1NC0uMzU0ek03LjM1NSA1LjQ4IDcgNS4xMjZsLS43MDcuNzA3LjM1My4zNTR6bTAgOS4wNCA0LjE2Ni00LjE2Ni0uNzA3LS43MDgtNC4xNjcgNC4xNjd6bTQuMTY2LTQuODc0TDcuMzU0IDUuNDhsLS43MDguNzA3IDQuMTY3IDQuMTY3ek0xMy4wODMgNXYxMGgxVjV6Ii8+PC9zdmc+)}.ag-charts-icon-pan-left{--icon: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyMCIgaGVpZ2h0PSIyMCIgZmlsbD0ibm9uZSI+PHBhdGggZmlsbD0iIzAwMCIgZmlsbC1ydWxlPSJldmVub2RkIiBkPSJNMTIuNzkgNS44MzMgOC42MjUgMTBsNC4xNjYgNC4xNjctLjcwNy43MDdMNy4yMSAxMGw0Ljg3My00Ljg3NHoiIGNsaXAtcnVsZT0iZXZlbm9kZCIvPjwvc3ZnPg==)}.ag-charts-icon-pan-right{--icon: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyMCIgaGVpZ2h0PSIyMCIgZmlsbD0ibm9uZSI+PHBhdGggZmlsbD0iIzAwMCIgZmlsbC1ydWxlPSJldmVub2RkIiBkPSJNNy4yMSAxNC4xNjcgMTEuMzc2IDEwIDcuMjEgNS44MzNsLjcwNy0uNzA3TDEyLjc5IDEwbC00Ljg3MyA0Ljg3NHoiIGNsaXAtcnVsZT0iZXZlbm9kZCIvPjwvc3ZnPg==)}.ag-charts-icon-pan-start{--icon: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyMCIgaGVpZ2h0PSIyMCIgZmlsbD0ibm9uZSI+PHBhdGggZmlsbD0iIzAwMCIgZD0iTTYgNXYxMGgxVjV6TTkuNjI0IDEwbDQuMTY2LTQuMTY3LS43MDctLjcwN0w4LjIxIDEwbDQuODc0IDQuODc0LjcwNy0uNzA3eiIvPjwvc3ZnPg==)}.ag-charts-icon-parallel-channel,.ag-charts-icon-parallel-channel-drawing{--icon: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyMCIgaGVpZ2h0PSIyMCIgZmlsbD0ibm9uZSI+PHBhdGggZmlsbD0iIzEzMTcyMiIgZmlsbC1ydWxlPSJldmVub2RkIiBkPSJNMTcuNzIgNS4zMzFBMi4yNSAyLjI1IDAgMSAwIDE0LjcwNSAzLjZsLTkuNDkgNC41NjJhMi4yNSAyLjI1IDAgMSAwIC4yMDkgMS4wMWw5LjY2Mi00LjY0NmEyLjI1IDIuMjUgMCAwIDAgMi42MzQuODA1bS4zNzMtMi41NDdhMS4yNSAxLjI1IDAgMSAxLTIuMzM4Ljg4NSAxLjI1IDEuMjUgMCAwIDEgMi4zMzgtLjg4NU00LjM0MyA4LjY3YTEuMjUgMS4yNSAwIDEgMS0yLjMzOC44ODUgMS4yNSAxLjI1IDAgMCAxIDIuMzM4LS44ODVNNS4zMDcgMTYuNzI4YTIuMjUgMi4yNSAwIDEgMS0uNTI1LS44NThsOS45MjMtNC43N2EyLjI1IDIuMjUgMCAxIDEgLjM4MS45MjZ6bS0uOTY0LjI3NGExLjI1IDEuMjUgMCAxIDEtMi4zMzguODg1IDEuMjUgMS4yNSAwIDAgMSAyLjMzOC0uODg1bTEzLjAyMy01LjEwNmExLjI1IDEuMjUgMCAxIDAtLjg4NS0yLjMzOSAxLjI1IDEuMjUgMCAwIDAgLjg4NSAyLjMzOSIgY2xpcC1ydWxlPSJldmVub2RkIi8+PC9zdmc+)}.ag-charts-icon-position-bottom{--icon: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjAiIGhlaWdodD0iMjAiIHZpZXdCb3g9IjAgMCAyMCAyMCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48cGF0aCBmaWxsPSIjMDAwIiBmaWxsLW9wYWNpdHk9Ii4yNSIgZD0iTTMgMTBoMTR2MUgzem0zLTNoOHYxSDZ6Ii8+PHBhdGggZmlsbD0iIzAwMCIgZD0iTTYgMTNoOHYxSDZ6Ii8+PC9zdmc+)}.ag-charts-icon-position-center{--icon: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjAiIGhlaWdodD0iMjAiIHZpZXdCb3g9IjAgMCAyMCAyMCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48cGF0aCBmaWxsPSIjMDAwIiBkPSJNMyAxMGgxNHYxSDN6Ii8+PHBhdGggZmlsbD0iIzAwMCIgZmlsbC1vcGFjaXR5PSIuMjUiIGQ9Ik02IDdoOHYxSDZ6bTAgNmg4djFINnoiLz48L3N2Zz4=)}.ag-charts-icon-position-top{--icon: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjAiIGhlaWdodD0iMjAiIHZpZXdCb3g9IjAgMCAyMCAyMCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48cGF0aCBmaWxsPSIjMDAwIiBmaWxsLW9wYWNpdHk9Ii4yNSIgZD0iTTMgMTBoMTR2MUgzeiIvPjxwYXRoIGZpbGw9IiMwMDAiIGQ9Ik02IDdoOHYxSDZ6Ii8+PHBhdGggZmlsbD0iIzAwMCIgZmlsbC1vcGFjaXR5PSIuMjUiIGQ9Ik02IDEzaDh2MUg2eiIvPjwvc3ZnPg==)}.ag-charts-icon-price-label-annotation{--icon: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyMCIgaGVpZ2h0PSIyMCIgZmlsbD0ibm9uZSI+PHBhdGggZmlsbD0iIzAwMCIgZmlsbC1ydWxlPSJldmVub2RkIiBkPSJNNC41IDNBMS41IDEuNSAwIDAgMCAzIDQuNVYxM2ExLjUgMS41IDAgMCAwIDEuNSAxLjVoLjgzM3YuMDU3Yy4yNDItLjI5OS41OTctLjUwMyAxLS41NDhWMTMuNUg0LjVBLjUuNSAwIDAgMSA0IDEzVjQuNWEuNS41IDAgMCAxIC41LS41aDExYS41LjUgMCAwIDEgLjUuNXY4YS41LjUgMCAwIDEtLjUuNWgtNC44MThsLS4xMjYuMDg0YTI2IDI2IDAgMCAwLTIuMjI1IDEuNjg1bC0uMzIuMjY1LS4wNjguMDU2YTEuNSAxLjUgMCAwIDEtMi42MDkgMS4zNTRjLjAzMy43NjMuOTA1IDEuMjM4IDEuNTYuNzU2LjY0Ni0uNDc0IDEuMjEtLjk0MyAxLjc2MS0xLjRsLjMxMy0uMjZBMjYgMjYgMCAwIDEgMTAuOTg2IDE0SDE1LjVhMS41IDEuNSAwIDAgMCAxLjUtMS41di04QTEuNSAxLjUgMCAwIDAgMTUuNSAzeiIgY2xpcC1ydWxlPSJldmVub2RkIi8+PHBhdGggZmlsbD0iIzEzMTcyMiIgZmlsbC1ydWxlPSJldmVub2RkIiBkPSJNOC43MTYgMTQuODE1YTIuMjUgMi4yNSAwIDEgMS00LjIxIDEuNTkzIDIuMjUgMi4yNSAwIDAgMSA0LjIxLTEuNTkzbS0xLjY2MiAxLjk2NmExLjI1IDEuMjUgMCAxIDAtLjg4NS0yLjMzOSAxLjI1IDEuMjUgMCAwIDAgLjg4NSAyLjMzOSIgY2xpcC1ydWxlPSJldmVub2RkIi8+PC9zdmc+)}.ag-charts-icon-price-range-drawing{--icon: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjAiIGhlaWdodD0iMjAiIHZpZXdCb3g9IjAgMCAyMCAyMCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48cGF0aCBkPSJNOS4wNDYgMTVWNS44NzdoLjk0MlYxNXoiIGZpbGw9IiMxODFEMUYiLz48cGF0aCBkPSJNOS4wNDYgMTVWNS44NzdoLjk0MlYxNXoiIGZpbGw9IiMxODFEMUYiLz48cGF0aCBkPSJNOS41IDYuMjI4IDcuMTY3IDguMzc2IDYuNSA3Ljc2MiA5LjUgNWwzIDIuNzYyLS42NjcuNjE0eiIgZmlsbD0iIzAwMCIvPjxwYXRoIGQ9Ik0yIDE4di0xaDE2djF6TTIgM1YyaDE2djF6IiBmaWxsPSIjMTgxRDFGIi8+PC9zdmc+)}.ag-charts-icon-reset{--icon: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyMCIgaGVpZ2h0PSIyMCIgZmlsbD0ibm9uZSI+PHBhdGggZmlsbD0iIzAwMCIgZmlsbC1ydWxlPSJldmVub2RkIiBkPSJNMTIuMDQgNC40NDVhNS44MSA1LjgxIDAgMCAwLTcuMjU3IDIuNDUzLjUuNSAwIDAgMS0uODY1LS41MDJBNi44MSA2LjgxIDAgMSAxIDMgOS44MTNhLjUuNSAwIDAgMSAxIDAgNS44MSA1LjgxIDAgMSAwIDguMDQtNS4zNjgiIGNsaXAtcnVsZT0iZXZlbm9kZCIvPjxwYXRoIGZpbGw9IiMwMDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIgZD0iTTQuMjg5IDMuMDAyYS41LjUgMCAwIDEgLjUuNXYyLjY1NWgyLjY1NWEuNS41IDAgMCAxIDAgMUg0LjI5YS41LjUgMCAwIDEtLjUtLjVWMy41MDJhLjUuNSAwIDAgMSAuNS0uNSIgY2xpcC1ydWxlPSJldmVub2RkIi8+PC9zdmc+)}.ag-charts-icon-settings{--icon: url(data:image/svg+xml;base64,PHN2ZyB2aWV3Qm94PSIwIDAgMjAgMjAiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sOnNwYWNlPSJwcmVzZXJ2ZSIgc3R5bGU9ImZpbGwtcnVsZTpldmVub2RkIj48cGF0aCBkPSJNMTAgMTNhMyAzIDAgMSAwIDAtNiAzIDMgMCAwIDAgMCA2bTAtMWEyIDIgMCAxIDEtLjAwMS0zLjk5OUEyIDIgMCAwIDEgMTAgMTIiLz48cGF0aCBkPSJNMi4zMSAxNC4zNDVjLS44MTctMS40OTEuMDI3LTIuNDk5LjQ3NC0yLjg2NS41MzEtLjQzNC45NjktLjM2NS45NzItMS40OC0uMDAzLTEuMTE1LS40NDEtMS4wNDYtLjk3Mi0xLjQ4MS0uNDU0LS4zNzEtMS4zMTctMS40MDUtLjQzNC0yLjkzNmwuMDA1LS4wMDljLjg4NC0xLjUyIDIuMjA3LTEuMjkgMi43NTUtMS4wODMuNjQxLjI0My44MDEuNjU2IDEuNzY4LjEwMS45NjQtLjU2LjY4Ni0uOTA0Ljc5Ni0xLjU4Mi4wOTQtLjU3OC41NTktMS44NDMgMi4zMjYtMS44NDNoLjAxYzEuNzU5LjAwNSAyLjIyMiAxLjI2NiAyLjMxNiAxLjg0My4xMS42NzgtLjE2OCAxLjAyMi43OTYgMS41ODIuOTY3LjU1NSAxLjEyNy4xNDIgMS43NjgtLjEwMS41NDktLjIwOCAxLjg3Ni0uNDM4IDIuNzYgMS4wOTJzLjAyIDIuNTY1LS40MzQgMi45MzZjLS41MzEuNDM1LS45NjkuMzY2LS45NzIgMS40ODEuMDAzIDEuMTE1LjQ0MSAxLjA0Ni45NzIgMS40OC40NTQuMzcyIDEuMzE3IDEuNDA2LjQzNCAyLjkzN2wtLjAwNS4wMDljLS44ODQgMS41Mi0yLjIwNyAxLjI5LTIuNzU1IDEuMDgzLS42NDEtLjI0My0uODAxLS42NTYtMS43NjgtLjEwMS0uOTY0LjU2LS42ODYuOTA0LS43OTYgMS41ODEtLjA5NC41NzktLjU1OSAxLjg0NC0yLjMyNiAxLjg0NGgtLjAxYy0xLjc1OS0uMDA1LTIuMjIyLTEuMjY2LTIuMzE2LTEuODQ0LS4xMS0uNjc3LjE2OC0xLjAyMS0uNzk2LTEuNTgxLS45NjctLjU1NS0xLjEyNy0uMTQyLTEuNzY4LjEwMS0uNTQ5LjIwOC0xLjg3Ni40MzgtMi43Ni0xLjA5MmwtLjAyLS4wMzZ6TTkuOTg0IDIuMTYySDEwYzEuMzU1IDAgMS4zNDIgMS4wMzkgMS4zNTMgMS40MjUuMDA4LjMxMi4wNCAxLjE2IDEuMjU5IDEuODcybC4wMTUuMDA4YzEuMjI1LjcgMS45NzYuMzA0IDIuMjUxLjE1NS4zMzctLjE4MyAxLjIyNi0uNzExIDEuOTAyLjQ0NWwuMDA4LjAxNGMuNjc4IDEuMTczLS4yMjkgMS42ODItLjU1OCAxLjg4NC0uMjY2LjE2My0uOTg0LjYxNS0uOTkxIDIuMDI3di4wMTZjLjAwNyAxLjQxMi43MjUgMS44NjQuOTkxIDIuMDI3LjMyOC4yMDEgMS4yMjkuNzA3LjU2NiAxLjg3bC0uMDA4LjAxNGMtLjY3NyAxLjE3NC0xLjU3MS42NDMtMS45MS40NTktLjI3NS0uMTQ5LTEuMDI2LS41NDUtMi4yNTEuMTU0bC0uMDE1LjAwOWMtMS4yMTkuNzEyLTEuMjUxIDEuNTYtMS4yNTkgMS44NzItLjAxMS4zODYuMDAyIDEuNDI1LTEuMzUzIDEuNDI1cy0xLjM0Mi0xLjAzOS0xLjM1My0xLjQyNWMtLjAwOC0uMzEyLS4wNC0xLjE2LTEuMjU5LTEuODcybC0uMDE1LS4wMDljLTEuMjI1LS42OTktMS45NzYtLjMwMy0yLjI1MS0uMTU0LS4zMzYuMTgzLTEuMjE5LjcwNi0xLjg5NC0uNDMybC0uMDE2LS4wMjdjLS42NzgtMS4xNzQuMjI5LTEuNjgyLjU1OC0xLjg4NC4yNjYtLjE2My45ODQtLjYxNS45OTEtMi4wMjd2LS4wMTZjLS4wMDctMS40MTItLjcyNS0xLjg2NC0uOTkxLTIuMDI3LS4zMjgtLjIwMS0xLjIyOS0uNzA3LS41NjYtMS44N2wuMDA4LS4wMTRjLjY3Ny0xLjE3NCAxLjU3MS0uNjQzIDEuOTEtLjQ1OS4yNzUuMTQ5IDEuMDI2LjU0NSAyLjI1MS0uMTU1bC4wMTUtLjAwOGMxLjIxOS0uNzEyIDEuMjUxLTEuNTYgMS4yNTktMS44NzIuMDEtLjM4NC0uMDAyLTEuNDE3IDEuMzM3LTEuNDI1Ii8+PC9zdmc+)}.ag-charts-icon-step-line-series{--icon: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyMCIgaGVpZ2h0PSIyMCIgZmlsbD0ibm9uZSI+PHBhdGggZmlsbD0iIzE4MUQxRiIgZmlsbC1ydWxlPSJldmVub2RkIiBkPSJNNiA0aDV2OGgzVjhoNXYxaC00djRoLTVWNUg3djEwSDJ2LTFoNHoiIGNsaXAtcnVsZT0iZXZlbm9kZCIvPjwvc3ZnPg==)}.ag-charts-icon-text-annotation{--icon: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjAiIGhlaWdodD0iMjAiIHZpZXdCb3g9IjAgMCAyMCAyMCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik00IDRIMTZWN0gxNVY1SDEwLjVWMTVIMTRWMTZINlYxNUg5LjVWNUg1VjdINFY0WiIgZmlsbD0iYmxhY2siLz4KPC9zdmc+Cg==)}.ag-charts-icon-trend-line,.ag-charts-icon-trend-line-drawing{--icon: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyMCIgaGVpZ2h0PSIyMCIgZmlsbD0ibm9uZSI+PHBhdGggZmlsbD0iIzEzMTcyMiIgZmlsbC1ydWxlPSJldmVub2RkIiBkPSJNNS4zMTQgMTAuOTM4YTIuMjUgMi4yNSAwIDEgMSAuMDEtMWg5LjM1MmEyLjI1IDIuMjUgMCAxIDEgLjAxIDF6bS0yLjE4OS43MjlhMS4yNSAxLjI1IDAgMSAwIDAtMi41IDEuMjUgMS4yNSAwIDAgMCAwIDIuNW0xMy43NSAwYTEuMjUgMS4yNSAwIDEgMCAwLTIuNSAxLjI1IDEuMjUgMCAwIDAgMCAyLjUiIGNsaXAtcnVsZT0iZXZlbm9kZCIvPjwvc3ZnPg==)}.ag-charts-icon-unlock,.ag-charts-icon-unlocked{--icon: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyMCIgaGVpZ2h0PSIyMCIgZmlsbD0ibm9uZSI+PHBhdGggZmlsbD0iIzAwMCIgZmlsbC1ydWxlPSJldmVub2RkIiBkPSJNMTAuNjUxIDMuNWEyLjg5NCAyLjg5NCAwIDAgMC0yLjg5NCAyLjg5NFY5SDE0LjVhMi41IDIuNSAwIDAgMSAyLjUgMi41djNhMi41IDIuNSAwIDAgMS0yLjUgMi41aC04QTIuNSAyLjUgMCAwIDEgNCAxNC41di0zQTIuNSAyLjUgMCAwIDEgNi41IDloLjI1N1Y2LjM5NGEzLjg5NCAzLjg5NCAwIDEgMSA3Ljc4OSAwIC41LjUgMCAwIDEtMSAwQTIuODk0IDIuODk0IDAgMCAwIDEwLjY1IDMuNU02LjUgMTBBMS41IDEuNSAwIDAgMCA1IDExLjV2M0ExLjUgMS41IDAgMCAwIDYuNSAxNmg4YTEuNSAxLjUgMCAwIDAgMS41LTEuNXYtM2ExLjUgMS41IDAgMCAwLTEuNS0xLjV6IiBjbGlwLXJ1bGU9ImV2ZW5vZGQiLz48L3N2Zz4=)}.ag-charts-icon-vertical-line,.ag-charts-icon-vertical-line-drawing{--icon: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyMCIgaGVpZ2h0PSIyMCIgZmlsbD0ibm9uZSI+PHBhdGggZmlsbD0iIzEzMTcyMiIgZmlsbC1ydWxlPSJldmVub2RkIiBkPSJNMTAuNSA3LjgwNmEyLjI1IDIuMjUgMCAwIDEgMCA0LjM4OFYxOS41aC0xdi03LjMwNmEyLjI1IDIuMjUgMCAwIDEgMC00LjM4OFYuNWgxem0tLjUuOTQ0YTEuMjUgMS4yNSAwIDEgMSAwIDIuNSAxLjI1IDEuMjUgMCAwIDEgMC0yLjUiIGNsaXAtcnVsZT0iZXZlbm9kZCIvPjwvc3ZnPg==)}.ag-charts-icon-zoom-in{--icon: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyMCIgaGVpZ2h0PSIyMCIgZmlsbD0ibm9uZSI+PHBhdGggZmlsbD0iIzAwMCIgZD0iTTEwIDUuNWEuNS41IDAgMCAxIC41LjV2My41aDMuODc1YS41LjUgMCAwIDEgMCAxSDEwLjV2NC4yNWEuNS41IDAgMSAxLTEgMFYxMC41SDUuNjI1YS41LjUgMCAxIDEgMC0xSDkuNVY2YS41LjUgMCAwIDEgLjUtLjUiLz48L3N2Zz4=)}.ag-charts-icon-zoom-out{--icon: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyMCIgaGVpZ2h0PSIyMCIgZmlsbD0ibm9uZSI+PHBhdGggZmlsbD0iIzAwMCIgZmlsbC1ydWxlPSJldmVub2RkIiBkPSJNNS41IDEwYS41LjUgMCAwIDEgLjUtLjVoOGEuNS41IDAgMCAxIDAgMUg2YS41LjUgMCAwIDEtLjUtLjUiIGNsaXAtcnVsZT0iZXZlbm9kZCIvPjwvc3ZnPg==)}.ag-charts-icon-high-low-series{--icon: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyMCIgaGVpZ2h0PSIyMCIgZmlsbD0ibm9uZSI+PHBhdGggZmlsbD0iIzEzMTcyMiIgZmlsbC1ydWxlPSJldmVub2RkIiBkPSJNNyA0aDJ2MTJINFY0aDNNNSA1aDN2MTBINXpNMTEgMTRWNmg1djhoLTVtMS03aDN2NmgtM3oiIGNsaXAtcnVsZT0iZXZlbm9kZCIvPjwvc3ZnPg==)}.ag-charts-icon-hlc-series{--icon: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyMCIgaGVpZ2h0PSIyMCIgZmlsbD0ibm9uZSI+PHBhdGggZmlsbD0iIzEzMTcyMiIgZmlsbC1ydWxlPSJldmVub2RkIiBkPSJtMTguMTYzIDEuODM3LTUuMzM0IDExLjYyMUw2Ljk1NyA4LjEybC00LjE5OSA5LjYyMi0uOTE2LS40IDQuNzU2LTEwLjlMMTIuNDkgMTEuOCAxNy4yNTQgMS40MnoiIGNsaXAtcnVsZT0iZXZlbm9kZCIvPjxwYXRoIGZpbGw9IiMwMDAiIGZpbGwtb3BhY2l0eT0iLjQiIGZpbGwtcnVsZT0iZXZlbm9kZCIgZD0iTTUuODI1IDIuNzA0LjU1IDEzLjc4NWwuOTAyLjQzIDQuNzI0LTkuOTE5IDYuMDM0IDUuMDI5IDMuMjU1LTguMTQtLjkyOC0uMzctMi43NDUgNi44NnptNy44NTIgMTQuNjM2IDUuNzgtMTMuMTM5LS45MTUtLjQwMi01LjIxOSAxMS44Ni02LjAwNS01LjUwNC0zLjI3OCA3LjY0OC45Mi4zOTQgMi43MjItNi4zNTJ6IiBjbGlwLXJ1bGU9ImV2ZW5vZGQiLz48L3N2Zz4=)}.ag-charts-icon-zoom-in-alt{--icon: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0IiBmaWxsPSJub25lIiBzdHJva2U9ImN1cnJlbnRDb2xvciIgc3Ryb2tlLXdpZHRoPSIyIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiIGNsYXNzPSJsdWNpZGUgbHVjaWRlLXpvb20taW4iPjxjaXJjbGUgY3g9IjExIiBjeT0iMTEiIHI9IjgiLz48bGluZSB4MT0iMjEiIHgyPSIxNi42NSIgeTE9IjIxIiB5Mj0iMTYuNjUiLz48bGluZSB4MT0iMTEiIHgyPSIxMSIgeTE9IjgiIHkyPSIxNCIvPjxsaW5lIHgxPSI4IiB4Mj0iMTQiIHkxPSIxMSIgeTI9IjExIi8+PC9zdmc+)}.ag-charts-icon-zoom-out-alt{--icon: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0IiBmaWxsPSJub25lIiBzdHJva2U9ImN1cnJlbnRDb2xvciIgc3Ryb2tlLXdpZHRoPSIyIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiIGNsYXNzPSJsdWNpZGUgbHVjaWRlLXpvb20tb3V0Ij48Y2lyY2xlIGN4PSIxMSIgY3k9IjExIiByPSI4Ii8+PGxpbmUgeDE9IjIxIiB4Mj0iMTYuNjUiIHkxPSIyMSIgeTI9IjE2LjY1Ii8+PGxpbmUgeDE9IjgiIHgyPSIxNCIgeTE9IjExIiB5Mj0iMTEiLz48L3N2Zz4=)}.ag-charts-input{--input-layer-active: 1;--input-layer-focus: 2;--input-padding: calc(var(--ag-charts-spacing) * 2);--input-padding-large: calc(var(--ag-charts-spacing) * 2.5);color:var(--ag-charts-input-text-color);font-family:var(--ag-charts-chrome-font-family);font-size:var(--ag-charts-chrome-font-size-large);transition-duration:.25s;transition-property:none;transition-timing-function:ease-out}.ag-charts-input:focus-visible{outline:var(--ag-charts-focus-border);box-shadow:var(--ag-charts-focus-border-shadow);z-index:var(--input-layer-focus)}.ag-charts-button{background:var(--ag-charts-button-background-color);border:1px solid var(--ag-charts-border-color);border-radius:var(--ag-charts-button-border-radius);color:var(--ag-charts-button-text-color);cursor:pointer;padding:var(--input-padding);transition-property:background,border-color}.ag-charts-button:hover{background:var(--ag-charts-focus-color)}.ag-charts-button:has(.ag-charts-icon){padding:2px}.ag-charts-checkbox{--checkbox-transition-duration: .1s;appearance:none;background:var(--ag-charts-checkbox-background-color);border-radius:calc(var(--ag-charts-border-radius) * 9);cursor:pointer;height:18px;margin:0;transition-duration:var(--checkbox-transition-duration);transition-property:margin;width:29px}.ag-charts-checkbox:before{display:block;background:var(--ag-charts-input-background-color);border-radius:calc(var(--ag-charts-border-radius) * 7);content:" ";height:14px;margin:2px;transition-duration:var(--checkbox-transition-duration);transition-property:margin;transition-timing-function:var(--ag-charts-input-transition-easing);width:14px}.ag-charts-checkbox:checked{background:var(--ag-charts-checkbox-checked-background-color)}.ag-charts-checkbox:checked:before{margin-left:13px}.ag-charts-select{background:var(--ag-charts-input-background-color);border:1px solid var(--ag-charts-input-border-color);border-radius:var(--ag-charts-input-border-radius);padding:3px 2px 4px;font-size:inherit}.ag-charts-textarea{--textarea-line-height: 1.38;background:var(--ag-charts-input-background-color);border:1px solid var(--ag-charts-border-color);border-radius:var(--ag-charts-input-border-radius);line-height:var(--textarea-line-height);font-family:var(--ag-charts-chrome-font-family);font-size:var(--ag-charts-chrome-font-size-large);padding:var(--input-padding-large) var(--input-padding)}.ag-charts-textarea::placeholder{color:var(--ag-charts-input-placeholder-text-color)}.ag-charts-proxy-container{pointer-events:none;position:absolute}.ag-charts-proxy-elem{-webkit-appearance:none;appearance:none;background:none;border:none;color:#0000;overflow:hidden;pointer-events:auto;position:absolute}.ag-charts-proxy-elem::-moz-range-thumb,.ag-charts-proxy-elem::-moz-range-track{opacity:0}.ag-charts-proxy-elem::-webkit-slider-runnable-track,.ag-charts-proxy-elem::-webkit-slider-thumb{opacity:0}.ag-charts-proxy-elem:focus-visible{outline:var(--ag-charts-focus-border);box-shadow:var(--ag-charts-focus-border-shadow)}.ag-charts-focus-indicator{position:absolute;display:block;pointer-events:none;user-select:none;-webkit-user-select:none;width:100%;height:100%}.ag-charts-focus-indicator>div{position:absolute;outline:solid 1px var(--ag-charts-chrome-background-color);box-shadow:var(--ag-charts-focus-shadow)}.ag-charts-focus-indicator>svg{width:100%;height:100%;fill:none;overflow:visible}.ag-charts-focus-svg-outer-path{stroke:var(--ag-charts-chrome-background-color);stroke-width:4px}.ag-charts-focus-svg-inner-path{stroke:var(--ag-charts-accent-color);stroke-width:2px}.ag-charts-overlay{color:#181d1f;pointer-events:none}.ag-charts-overlay.ag-charts-dark-overlay{color:#fff}.ag-charts-overlay--loading{color:#8c8c8c}.ag-charts-overlay__loading-background{background:#fff;pointer-events:none}.ag-charts-overlay.ag-charts-dark-overlay .ag-charts-overlay__loading-background{background:#192232}.ag-charts-tooltip{--tooltip-arrow-size: 8px;--tooltip-row-spacing: 8px;--tooltip-column-spacing: 16px;position:fixed;inset:unset;margin:0;padding:0;overflow:visible;top:var(--top, 0px);left:var(--left, 0px);width:max-content;max-width:100%;font-family:var(--ag-charts-chrome-font-family);font-size:var(--ag-charts-chrome-font-size);font-weight:var(--ag-charts-chrome-font-weight);color:var(--ag-charts-chrome-text-color);background:var(--ag-charts-chrome-background-color);border:var(--ag-charts-border);border-radius:var(--ag-charts-border-radius);box-shadow:var(--ag-charts-shadow)}.ag-charts-tooltip--compact .ag-charts-tooltip-content{--tooltip-row-spacing: 2px;--tooltip-column-spacing: 8px;padding:3px 6px}.ag-charts-tooltip--arrow-top:before,.ag-charts-tooltip--arrow-right:before,.ag-charts-tooltip--arrow-bottom:before,.ag-charts-tooltip--arrow-left:before{content:"";position:absolute;display:block;width:var(--tooltip-arrow-size);height:var(--tooltip-arrow-size);border:inherit;border-bottom-color:transparent;border-right-color:transparent;background:inherit;clip-path:polygon(0 0,100% 0,100% 1px,1px 100%,0 100%)}.ag-charts-tooltip--arrow-top:before{bottom:100%;left:50%;transform:translate(-50%) translateY(calc(var(--tooltip-arrow-size) * .5)) rotate(45deg)}.ag-charts-tooltip--arrow-bottom:before{top:100%;left:50%;transform:translate(-50%) translateY(calc(var(--tooltip-arrow-size) * -.5)) rotate(225deg)}.ag-charts-tooltip--arrow-left:before{right:100%;top:50%;transform:translateY(-50%) translate(calc(var(--tooltip-arrow-size) * .5)) rotate(315deg)}.ag-charts-tooltip--arrow-right:before{left:100%;top:50%;transform:translateY(-50%) translate(calc(var(--tooltip-arrow-size) * -.5)) rotate(135deg)}.ag-charts-tooltip--no-interaction{pointer-events:none;user-select:none;-webkit-user-select:none}.ag-charts-tooltip--wrap-always{overflow-wrap:break-word;word-break:break-word;hyphens:none}.ag-charts-tooltip--wrap-hyphenate{overflow-wrap:break-word;word-break:break-word;hyphens:auto}.ag-charts-tooltip--wrap-on-space{overflow-wrap:normal;word-break:normal}.ag-charts-tooltip--wrap-never{white-space:nowrap}.ag-charts-tooltip-heading,.ag-charts-tooltip-title,.ag-charts-tooltip-label,.ag-charts-tooltip-value{overflow:hidden;text-overflow:ellipsis}.ag-charts-tooltip-content{display:grid;grid:auto-flow minmax(1em,auto) / 1fr;padding:8px 12px;gap:var(--tooltip-row-spacing)}.ag-charts-tooltip-content:has(.ag-charts-tooltip-symbol){grid:auto-flow minmax(1em,auto) / auto 1fr}.ag-charts-tooltip-heading{grid-column:1 / -1}.ag-charts-tooltip-symbol{grid-column:1 / 2;place-self:center}.ag-charts-tooltip-symbol svg{display:block}.ag-charts-tooltip-title{grid-column:-2 / -1}.ag-charts-tooltip-row{grid-column:1 / -1;display:flex;gap:var(--tooltip-column-spacing);align-items:baseline;justify-content:space-between;overflow:hidden}.ag-charts-tooltip-row--inline{grid-column:-2 / -1}.ag-charts-tooltip-label{flex:1;min-width:0}.ag-charts-tooltip-value{min-width:0}.ag-charts-tooltip-footer{grid-column:1 / -1;color:var(--ag-charts-chrome-subtle-text-color);text-align:center}.ag-charts-popover{position:absolute;border:var(--ag-charts-border);border-radius:var(--ag-charts-border-radius);background:var(--ag-charts-chrome-background-color);color:var(--ag-charts-chrome-text-color);font-family:var(--ag-charts-chrome-font-family);font-size:var(--ag-charts-chrome-font-size);font-weight:var(--ag-charts-chrome-font-weight);box-shadow:var(--ag-charts-shadow);z-index:var(--ag-charts-layer-ui-overlay)}.ag-charts-menu{--item-padding: 6px 12px;--icon-color: var(--ag-charts-chrome-text-color);display:grid;grid:auto-flow auto / 1fr;column-gap:12px;font-size:var(--ag-charts-chrome-font-size)}.ag-charts-menu:has(.ag-charts-menu__icon,.ag-charts-menu__row--stroke-width-visible){grid:auto-flow auto / auto 1fr}.ag-charts-menu__row--stroke-width-visible:before{content:"";height:var(--strokeWidth);width:12px;background:var(--icon-color)}.ag-charts-menu__row--stroke-width-visible[aria-disabled=true]:before{filter:grayscale(1);opacity:.5}.ag-charts-menu__row{display:grid;grid-column:1 / -1;grid-template-columns:subgrid;align-items:center;padding:var(--item-padding)}.ag-charts-menu__row:not(.ag-charts-menu__row--active){cursor:pointer}.ag-charts-menu__row:first-child{border-top-left-radius:inherit;border-top-right-radius:inherit}.ag-charts-menu__row:last-child{border-bottom-left-radius:inherit;border-bottom-right-radius:inherit}.ag-charts-menu__row:focus{background:var(--ag-charts-focus-color)}.ag-charts-menu__row:focus-visible{outline:var(--ag-charts-focus-border);box-shadow:var(--ag-charts-focus-border-shadow);z-index:var(--ag-charts-layer-menu)}.ag-charts-menu__row--active{--icon-color: var(--ag-charts-accent-color);background:var(--ag-charts-focus-color);color:var(--ag-charts-accent-color)}.ag-charts-menu__label{grid-column:-1 / span 1}.ag-charts-toolbar{--toolbar-gap: calc(var(--ag-charts-spacing) * 2);--toolbar-size: 34px;--toolbar-button-padding: 6px;align-items:center;display:flex;flex-wrap:nowrap;position:absolute}.ag-charts-toolbar__button{align-items:center;background:var(--ag-charts-chrome-background-color);border:var(--ag-charts-border);color:var(--ag-charts-chrome-text-color);cursor:pointer;display:flex;font-family:var(--ag-charts-chrome-font-family);font-size:var(--ag-charts-chrome-font-size-medium);font-weight:var(--ag-charts-chrome-font-weight);justify-content:center;min-height:var(--toolbar-size);min-width:var(--toolbar-size);padding:var(--toolbar-button-padding);position:relative;transition:background-color .25s ease-in-out,border-color .25s ease-in-out,color .25s ease-in-out;white-space:nowrap}.ag-charts-toolbar__button:hover{background:var(--ag-charts-focus-color);z-index:1}.ag-charts-toolbar__button:focus-visible{outline:var(--ag-charts-focus-border);box-shadow:var(--ag-charts-focus-border-shadow);z-index:calc(var(--ag-charts-layer-ui-overlay) + 1)}.ag-charts-toolbar__button--active{background:var(--ag-charts-focus-color);border-color:var(--ag-charts-accent-color);color:var(--ag-charts-accent-color);z-index:2}.ag-charts-toolbar__button[aria-disabled=true]{background:var(--ag-charts-button-disabled-background-color);color:var(--ag-charts-button-disabled-text-color);cursor:default}.ag-charts-toolbar--horizontal{flex-direction:row;.ag-charts-toolbar__button{margin:0 0 0 -1px}.ag-charts-toolbar__button--first{border-bottom-left-radius:var(--ag-charts-border-radius);border-top-left-radius:var(--ag-charts-border-radius);margin:0}.ag-charts-toolbar__button--last{border-bottom-right-radius:var(--ag-charts-border-radius);border-top-right-radius:var(--ag-charts-border-radius)}}.ag-charts-toolbar--vertical{flex-direction:column;.ag-charts-toolbar__button{margin:-1px 0 0;max-width:100%}.ag-charts-toolbar__button--first{border-top-left-radius:var(--ag-charts-border-radius);border-top-right-radius:var(--ag-charts-border-radius);margin:0}.ag-charts-toolbar__button--last{border-bottom-left-radius:var(--ag-charts-border-radius);border-bottom-right-radius:var(--ag-charts-border-radius)}}.ag-charts-toolbar__icon+.ag-charts-toolbar__label{margin-left:var(--toolbar-gap)}.ag-charts-toolbar__icon,.ag-charts-toolbar__label{pointer-events:none}.ag-charts-floating-toolbar{border:none;display:flex;.ag-charts-toolbar{align-items:unset;position:unset}}.ag-charts-floating-toolbar__drag-handle{align-items:center;background:var(--ag-charts-chrome-background-color);border:var(--ag-charts-border);border-bottom-left-radius:var(--ag-charts-border-radius);border-top-left-radius:var(--ag-charts-border-radius);cursor:grab;display:flex;justify-content:center;min-width:24px;padding-left:0;padding-right:0}.ag-charts-floating-toolbar__drag-handle--dragging{cursor:grabbing}\n'),this.setContainer(t),this.destroyFns.push(Cn(this.element)),"normal"===this.mode){const e=this.rootElements["canvas-center"].element;if(null==e)throw new Error("Error initializing tab guards");const t=Tn(e,"beforebegin"),i=Tn(e,"afterend");this.tabGuards=new en(e,t,i)}}initDOM(){if("normal"===this.mode){const e=(0,n.n)("div");return e.innerHTML='<div role="presentation" class="ag-charts-wrapper ag-charts-styles" data-ag-charts><div role="presentation" class="ag-charts-canvas-center"><div role="presentation" class="ag-charts-canvas-container"><div role="presentation" class="ag-charts-canvas" aria-hidden="true"></div><div role="figure" class="ag-charts-canvas-proxy"><div role="presentation" class="ag-charts-series-area"></div></div><div role="presentation" class="ag-charts-canvas-overlay ag-charts-tooltip-container"></div></div></div></div>',e.firstChild}const e=(0,n.n)("div");e.role="presentation",e.dataset.agCharts="",e.classList.add("ag-charts-wrapper");const t=(0,n.n)("div");return e.appendChild(t),t.role="presentation",t.classList.add("ag-charts-series-area"),e}initRootElements(){const{mode:e,element:t}=this,i={};for(const s of xn){const r=`ag-charts-${s}`;let o;if(o="normal"===e?t.classList.contains(r)?t:t.getElementsByClassName(r)[0]:En.has(s)?t:t.getElementsByClassName(r)[0]??(0,n.n)("div"),null==o)throw new Error(`AG Charts - unable to find DOM element ${r}`);i[s]={element:o,children:new Map,listeners:[]}}return i}destroy(){super.destroy(),this.observer?.unobserve(this.element),this.container&&this.sizeMonitor.unobserve(this.container),this.pendingContainer=void 0,Object.values(this.rootElements).forEach(e=>{e.children.forEach(e=>e.remove()),e.element.remove()}),this.element.remove()}postRenderUpdate(){"minimal"!==this.mode&&null!=this.pendingContainer&&this.pendingContainer!==this.container&&(0===e.batchedUpdateContainer.length&&(0,n.zk)().setTimeout(this.applyBatchedUpdateContainer.bind(this),0),e.batchedUpdateContainer.push(this))}applyBatchedUpdateContainer(){for(const t of e.batchedUpdateContainer)t.destroyed||t.updateContainer();e.batchedUpdateContainer.splice(0)}setSizeOptions(e=300,t=300,i,n){const{style:s}=this.element;s.width=`${i??e}px`,s.height=`${n??t}px`,this.minWidth=i??e,this.minHeight=n??t,this.updateContainerClassName()}updateContainerSize(){const{style:e}=this.rootElements["canvas-center"].element;e.visibility=null==this.containerSize?"hidden":"",this.containerSize?(e.width=`${this.containerSize.width??0}px`,e.height=`${this.containerSize.height??0}px`):(e.width="",e.height=""),this.updateContainerClassName()}setTabGuardIndex(e){this.tabGuards&&(this.tabGuards.tabIndex=e)}setContainer(e){e!==this.container&&(this.pendingContainer=e,"minimal"!==this.mode&&null!=this.container||this.updateContainer())}updateContainer(){const{pendingContainer:e}=this;if(null!=e&&e!==this.container){if(this.container&&(this.container.removeChild(this.element),this.sizeMonitor.unobserve(this.container)),null!=this.documentRoot)for(const e of this.rootElements.styles.children.keys())this.removeChild("styles",e);this.container=e,this.pendingContainer=void 0,this.documentRoot=this.getShadowDocumentRoot(e),this.initiallyConnected="minimal"===this.mode||e.isConnected;for(const[e,t]of this.styles)this.addStyles(e,t);e.appendChild(this.element),this.sizeMonitor.observe(e,e=>{this.containerSize=e,this.updateContainerSize(),this.listeners.dispatch("resize",{type:"resize"})}),this.listeners.dispatch("container-changed",{type:"container-changed"})}}setThemeClass(e){this.element.classList.forEach(t=>{t.startsWith("ag-charts-theme-")&&t!==e&&this.element.classList.remove(t)}),this.element.classList.add(e)}setThemeParameters(e){const t={accentColor:"accent-color",axisColor:"axis-color",backgroundColor:"background-color",borderColor:"border-color",foregroundColor:"foreground-color",fontFamily:"font-family",fontSize:"font-size",fontWeight:"font-weight",gridLineColor:"grid-line-color",padding:"padding",subtleTextColor:"subtle-text-color",textColor:"text-color",chromeBackgroundColor:"chrome-background-color",chromeFontFamily:"chrome-font-family",chromeFontSize:"chrome-font-size",chromeFontWeight:"chrome-font-weight",chromeSubtleTextColor:"chrome-subtle-text-color",chromeTextColor:"chrome-text-color",inputBackgroundColor:"input-background-color",inputTextColor:"input-text-color",crosshairLabelBackgroundColor:"crosshair-label-background-color",crosshairLabelTextColor:"crosshair-label-text-color"},i=["fontSize","chromeFontSize"];for(const[s,r]of(0,n.jO)(e)){let e=`${r}`;i.includes(s)&&(e=`${r}px`),this.element.style.setProperty(`--ag-charts-${t[s]}`,e)}}updateCanvasLabel(e){(0,n.Bq)(this.rootElements["canvas-proxy"].element,"aria-label",e)}getEventElement(e,t){return["focus","blur","keydown","keyup"].includes(t)?this.rootElements["series-area"].element:e}addEventListener(e,t,i){this.getEventElement(this.element,e).addEventListener(e,t,i)}removeEventListener(e,t,i){this.getEventElement(this.element,e).removeEventListener(e,t,i)}getBoundingClientRect(){return this.rootElements.canvas.element.getBoundingClientRect()}getOverlayClientRect(){const e=(0,n.zk)(),t=new m(0,0,e.innerWidth,e.innerHeight),i=this.getRawOverlayClientRect();return t.intersection(i)?.toDOMRect()??An}getRawOverlayClientRect(){let e=this.element;const t=this.element.getRootNode()?.fullscreenElement;for(;null!=e;){let i;if(null!=t&&e===t)i=!0;else{const t=e.computedStyleMap?.(),n=t?.get("overflow-y")?.toString();i="auto"===n||"scroll"===n}if(i)return m.fromDOMRect(e.getBoundingClientRect());e=e.parentElement}if(null!=this.documentRoot)return m.fromDOMRect(this.documentRoot.getBoundingClientRect());const{innerWidth:i,innerHeight:s}=(0,n.zk)();return new m(0,0,i,s)}getShadowDocumentRoot(e=this.container){const t=e?.ownerDocument?.body??(0,n.YE)("body");for(;null!=e;){if(e===t)return;if(e.parentNode instanceof DocumentFragment)return e;e=e.parentNode}}getParent(e){return this.rootElements[e].element}getChildBoundingClientRect(e){const{children:t}=this.rootElements[e],i=[];for(const e of t.values())i.push(m.fromDOMRect(e.getBoundingClientRect()));return m.merge(i)}isManagedChildDOMElement(e,t,i){const{children:n}=this.rootElements[t],s=n?.get(i);return null!=s&&e.contains(s)}contains(e,t){return null==t?this.element.contains(e):this.rootElements[t].element.contains(e)}addStyles(t,i){const s="data-ag-charts";if(this.styles.set(t,i),null==this.container)return;const r=e=>e.getAttribute(s)===t,o=e=>{const t=new Set(["TITLE","META"]);let i,o=!0;for(const n of e.children)if(o&&t.has(n.tagName))i=n;else{if(o=!1,r(n))return;n.hasAttribute(s)&&(i=n)}const a=(0,n.n)("style");return null!=this.chart.styleNonce&&(a.nonce=this.chart.styleNonce),null==i?e.prepend(a):e.insertBefore(a,i.nextSibling),a};let a;this.styleContainer?a=o(this.styleContainer):!1===this.initiallyConnected?a=this.addChild("styles",t):null!=this.documentRoot||e.headStyles.has(t)?null!=this.documentRoot&&(a=this.addChild("styles",t)):(a=o((0,n.YE)("head")),e.headStyles.add(t)),null==a||r(a)||(a.setAttribute(s,t),a.innerHTML=i)}removeStyles(e){this.removeChild("styles",e)}updateCursor(e,t){this.cursorState.set(e,t),this.element.style.cursor=this.cursorState.stateValue()}getCursor(){return this.element.style.cursor}addChild(e,t,i,s){const{element:r,children:o,listeners:a}=this.rootElements[e];if(!o)throw new Error("AG Charts - unable to create DOM elements after destroy()");if(o.has(t))return o.get(t);const{childElementType:l="div"}=Mn.get(e)??{};if(i&&i.tagName.toLowerCase()!==l.toLowerCase())throw new Error("AG Charts - mismatching DOM element type");const c=i??(0,n.n)(l);for(const[e,t,i]of a)c.addEventListener(e,t,i);if(o.set(t,c),"style"===l&&null!=this.chart.styleNonce&&(c.nonce=this.chart.styleNonce),s){const e=r.querySelector(s.query);if(null==e)throw new Error(`AG Charts - addChild query failed ${s.query}`);e.insertAdjacentElement(s.where,c)}else r?.appendChild(c);return c}removeChild(e,t){const{children:i}=this.rootElements[e];i&&(i.get(t)?.remove(),i.delete(t))}incrementDataCounter(e){const{dataset:t}=this.element;t[e]??(t[e]="0"),t[e]=String(Number(t[e])+1)}setDataBoolean(e,t){this.element.dataset[e]=String(t)}updateContainerClassName(){const{element:e,containerSize:t,minWidth:i,minHeight:n}=this;e.classList.toggle("ag-charts-wrapper--safe-horizontal",i>=(t?.width??1/0)),e.classList.toggle("ag-charts-wrapper--safe-vertical",n>=(t?.height??1/0))}};Dn.batchedUpdateContainer=[],Dn.headStyles=new Set;var In=Dn,Rn=class extends Ai{constructor(){super((0,n.n)("div")),this.textElement=(0,n.FJ)("text"),this.textElement.role="presentation",this.svgElement=(0,n.FJ)("svg"),this.svgElement.appendChild(this.textElement),this.svgElement.style.width="100%",this.svgElement.style.opacity="0",this.svgElement.role="presentation",this.elem.appendChild(this.svgElement),this.elem.role="presentation"}set textContent(e){this.textElement.textContent=e;const t=this.textElement,i=t.getBBox?.();i&&this.svgElement.setAttribute("viewBox",`${i.x} ${i.y} ${i.width} ${i.height}`)}get textContent(){return this.textElement.textContent}destructor(){}},Ln=class extends Ai{constructor(e,t){super(e),(0,n.Bq)(this.elem,"role",t),this.setEnabled(!0)}destructor(){}setEnabled(e){(0,n.Bq)(this.elem,"aria-disabled",!e)}addListener(e,t){return super.addListener(e,(i,n)=>{("click"!==e&&"dblclick"!==e||!this.isDisabled())&&t(i,n)})}},kn=class extends Ln{constructor(){super((0,n.n)("button"))}},Pn=class extends Ai{constructor(){super((0,n.n)("div")),(0,n.Bq)(this.elem,"role","group")}destructor(){}},Nn=class extends Ai{constructor(e,t){super((0,n.n)("div")),this.focusedChildIndex=0,this.onChildFocus=(e,t)=>{const i=this.children[this.focusedChildIndex];this.focusedChildIndex=t.index,i?.setTabIndex(-1),t.setTabIndex(0)},this.onChildKeyDown=(e,t)=>{const i=this.orientation,[n,s]="both"===i?[un.horizontal,un.vertical]:[un[i],void 0];let r=-1;if(ln(e.sourceEvent)){const i=e.sourceEvent.key;i===n.nextKey||i===s?.nextKey?r=t.index+1:i!==n.prevKey&&i!==s?.prevKey||(r=t.index-1)}this.children[r]?.focus()},(0,n.Bq)(this.elem,"role",t),this.orientation=e}get orientation(){return(0,n.D$)(this.elem,"aria-orientation")??"both"}set orientation(e){(0,n.Bq)(this.elem,"aria-orientation","both"!==e?e:void 0)}focus(){this.children[this.focusedChildIndex]?.focus()}clear(){this.focusedChildIndex=0;for(const e of this.children)this.removeChildListeners(e),e.parent=void 0;this.elem.textContent="",this.children.length=0}addChildListeners(e){e.addListener("focus",this.onChildFocus),e.addListener("keydown",this.onChildKeyDown)}removeChildListeners(e){e.removeListener("focus",this.onChildFocus),e.removeListener("keydown",this.onChildKeyDown)}onChildAdded(e){this.addChildListeners(e),e.setTabIndex(1===this.children.length?0:-1)}onChildRemoved(e){this.removeChildListeners(e);const{focusedChildIndex:t,children:i}=this,n=t===e.index;for(let e=0;e<i.length;e++){const n=i[e];n.index===t&&(this.focusedChildIndex=e),n.index=e}if(n){const e=i[t]??i[t-1];e?(this.focusedChildIndex=e.index,e.setTabIndex(0)):this.focusedChildIndex=0}}},On=class extends Nn{constructor(){super("both","list"),this.setHidden(!0)}destructor(){this.children.forEach(e=>e.getElement().parentElement.remove())}addChildToDOM(e,t){const i=(0,n.n)("div");(0,n.Bq)(i,"role","listitem"),(0,n.EM)(i,"position","absolute"),Ai.setElementContainer(e,i),this.appendOrInsert(i,t),this.setHidden(!1)}removeChildFromDOM(e){e.getElement().parentElement.remove(),this.setHidden(0===this.children.length)}setHidden(e){0===this.children.length&&(e=!0),super.setHidden(e)}},_n=class extends Ai{constructor(e){super(e)}destructor(){}},Fn=new Intl.NumberFormat("en-US",{style:"percent"});function Gn(e,t=2){return"number"==typeof e?Hn(e,t):"string"==typeof e?e:String(e??"")}function Vn(e){return Fn.format(e)}var Bn=(new Map).set(2,new Intl.NumberFormat("en-US",{maximumFractionDigits:2,useGrouping:!1}));function Hn(e,t){let i=Bn.get(t);return i||(i=new Intl.NumberFormat("en-US",{maximumFractionDigits:t,useGrouping:!1}),Bn.set(t,i)),i.format(e)}var zn=class e extends Ai{constructor(){super((0,n.n)("input")),this._step=e.STEP_ONE,this.orientation="both"}get step(){return this._step}set step(e){this._step=e,this.getElement().step=e.attributeValue}get keyboardStep(){return this._keyboardStep?.step??this._step}set keyboardStep(e){if(e!==this._keyboardStep?.step&&(void 0!==this._keyboardStep&&(this.removeListener("keydown",this._keyboardStep.onKeyDown),this.removeListener("keyup",this._keyboardStep.onKeyUp),this.removeListener("blur",this._keyboardStep.onBlur),this._keyboardStep=void 0),void 0!==e)){const t=()=>this.getElement().step=e.attributeValue,i=()=>this.getElement().step=this._step.attributeValue;this._keyboardStep={step:e,onKeyDown:t,onKeyUp:i,onBlur:i},this.addListener("keydown",this._keyboardStep.onKeyDown),this.addListener("keyup",this._keyboardStep.onKeyUp),this.addListener("blur",this._keyboardStep.onBlur)}}get orientation(){return(0,n.D$)(this.elem,"aria-orientation")??"both"}set orientation(t){(0,n.Bq)(this.elem,"aria-orientation","both"!==t?t:void 0),e.registerDefaultPreventers(this,t)}destructor(){}clampValueRatio(e,t){const i=this.getValueRatio(),s=(0,n.qE)(e,i,t);return s!==i&&this.setValueRatio(s),s}setValueRatio(e,t){const{divider:i}=this.step,n=Math.round(1e4*e)/i,{ariaValueText:s=Vn(n/i)}=t??{},r=this.getElement();r.value=`${n}`,r.ariaValueText=s}getValueRatio(){return parseFloat(this.getElement().value)/this.step.divider}static registerDefaultPreventers(t,i){"both"===i?t.removeListener("keydown",e.onKeyDown):t.addListener("keydown",e.onKeyDown)}static onKeyDown(e,t){let i=[];const{orientation:n}=t;"horizontal"===n?i=["ArrowUp","ArrowDown"]:"vertical"===n&&(i=["ArrowLeft","ArrowRight"]),i.includes(e.sourceEvent.code)&&e.sourceEvent.preventDefault()}};zn.STEP_ONE={attributeValue:"1",divider:1},zn.STEP_HUNDRETH={attributeValue:"0.01",divider:100};var Un=zn,Wn=class extends kn{constructor(){super(),(0,n.Bq)(this.elem,"role","switch"),this.setChecked(!1)}setChecked(e){(0,n.Bq)(this.elem,"aria-checked",e)}},jn=class extends Nn{constructor(e="horizontal"){super(e,"toolbar")}destructor(){}};function Kn(e,t){return t.params?.type===e}function $n(e){const t={params:e,result:void 0};return t.result=function(e){if("button"===e)return new kn;if("slider"===e)return new Un;if("toolbar"===e)return new jn;if("group"===e)return new Pn;if("list"===e)return new On;if("region"===e)return new _n((0,n.n)("div"));if("text"===e)return new Rn;if("listswitch"===e)return new Wn;throw Error("AG Charts - error allocating meta")}(t.params.type),t}var Yn=class{constructor(e,t){this.localeManager=e,this.domManager=t,this.destroyFns=[]}destroy(){this.destroyFns.forEach(e=>e())}addLocalisation(e){e(),this.destroyFns.push(this.localeManager.addListener("locale-changed",e))}createProxyContainer(e){const t=$n(e),{params:i,result:n}=t,s=n.getElement();return this.domManager.addChild("canvas-proxy",i.domManagerId,s),s.classList.add(...i.classList,"ag-charts-proxy-container"),s.role=i.type,"ariaOrientation"in i&&(s.ariaOrientation=i.ariaOrientation),Kn("toolbar",t)&&(t.result.orientation=t.params.orientation),this.addLocalisation(()=>{s.ariaLabel=this.localeManager.t(i.ariaLabel.id,i.ariaLabel.params)}),n}createProxyElement(e){const t=$n(e);if(Kn("button",t)){const{params:e,result:i}=t,n=i.getElement();if(this.initInteract(e,i),"string"==typeof e.textContent)n.textContent=e.textContent;else{const{textContent:t}=e;this.addLocalisation(()=>{n.textContent=this.localeManager.t(t.id,t.params)})}this.setParent(t.params,t.result)}if(Kn("slider",t)){const{params:e,result:i}=t,n=i.getElement();this.initInteract(e,i),n.type="range",n.role="presentation",n.style.margin="0px",this.addLocalisation(()=>{n.ariaLabel=this.localeManager.t(e.ariaLabel.id,e.ariaLabel.params)}),this.setParent(t.params,t.result)}if(Kn("text",t)){const{params:e,result:i}=t;this.initElement(e,i),this.setParent(t.params,t.result)}if(Kn("listswitch",t)){const{params:e,result:i}=t;this.initInteract(e,i),i.setTextContent(e.textContent),i.setChecked(e.ariaChecked),i.setAriaDescribedBy(e.ariaDescribedBy),this.setParent(t.params,t.result)}if(Kn("region",t)){const{params:e,result:i}=t,n=i.getElement();this.initInteract(e,i),n.role="region",this.setParent(t.params,t.result)}return t.result}initElement(e,t){const i=t.getElement();return(0,n.EM)(i,"cursor",e.cursor),i.classList.toggle("ag-charts-proxy-elem",!0),i}initInteract(e,t){const{tabIndex:i,domIndex:n}=e,s=this.initElement(e,t);void 0!==i&&(s.tabIndex=i),void 0!==n&&(t.domIndex=n)}setParent(e,t){if("parent"in e)e.parent?.addChild(t);else{const i={where:e.where,query:".ag-charts-series-area"};this.domManager.addChild("canvas-proxy",e.domManagerId,t.getElement(),i)}}},qn={ariaAnnounceHoverDatum:"${datum}",ariaAnnounceChart:"chart, ${seriesCount}[number] series",ariaAnnounceHierarchyChart:"hierarchy chart, ${caption}",ariaAnnounceGaugeChart:"gauge chart, ${caption}",ariaAnnounceHierarchyDatum:"level ${level}[number], ${count}[number] children, ${description}",ariaAnnounceFlowProportionLink:"link ${index} of ${count}, from ${from} to ${to}, ${sizeName} ${size}",ariaAnnounceFlowProportionNode:"node ${index} of ${count}, ${description}",ariaDescriptionLegendItem:"Press Space or Enter to toggle visibility",ariaLabelAddHorizontalLine:"Add Horizontal Line",ariaLabelAnnotationOptionsToolbar:"Annotation Options",ariaLabelAnnotationSettingsDialog:"Annotation Settings",ariaLabelColorPicker:"Color picker",ariaLabelFinancialCharts:"Financial Charts",ariaLabelLegend:"Legend",ariaLabelLegendPagination:"Legend Pagination",ariaLabelLegendPagePrevious:"Previous Legend Page",ariaLabelLegendPageNext:"Next Legend Page",ariaLabelLegendItem:"${label}, Legend item ${index}[number] of ${count}[number]",ariaLabelLegendItemUnknown:"Unknown legend item",ariaLabelNavigator:"Navigator",ariaLabelNavigatorRange:"Range",ariaLabelNavigatorMinimum:"Minimum",ariaLabelNavigatorMaximum:"Maximum",ariaLabelRangesToolbar:"Ranges",ariaLabelSettingsTabBar:"Settings",ariaLabelZoomToolbar:"Zoom",ariaValuePanRange:"${min}[percent0to2dp] to ${max}[percent0to2dp]",iconAltTextLineStyleSolid:"Solid",iconAltTextLineStyleDashed:"Long-dashed",iconAltTextLineStyleDotted:"Short-dashed",iconAltTextPositionTop:"Top",iconAltTextPositionCenter:"Center",iconAltTextPositionBottom:"Bottom",iconAltTextAlignLeft:"Left",iconAltTextAlignCenter:"Center",iconAltTextAlignRight:"Right",iconAltTextClose:"Close",overlayLoadingData:"Loading data...",overlayNoData:"No data to display",overlayNoVisibleSeries:"No visible series",overlayUnsupportedBrowser:"Incompatible browser version. Please upgrade your browser.",seriesHistogramTooltipFrequency:"Frequency",seriesHistogramTooltipSum:"${yName} (sum)",seriesHistogramTooltipCount:"${yName} (count)",seriesHistogramTooltipMean:"${yName} (mean)",toolbarSeriesTypeDropdown:"Chart Type",toolbarSeriesTypeOHLC:"OHLC",toolbarSeriesTypeHLC:"HLC",toolbarSeriesTypeHighLow:"High Low",toolbarSeriesTypeCandles:"Candles",toolbarSeriesTypeHollowCandles:"Hollow Candles",toolbarSeriesTypeLine:"Line",toolbarSeriesTypeLineWithMarkers:"Line with Markers",toolbarSeriesTypeStepLine:"Step Line",toolbarAnnotationsTrendLine:"Trend Line",toolbarAnnotationsFibonacciRetracement:"Fib Retracement",toolbarAnnotationsFibonacciRetracementTrendBased:"Fib Trend Based",toolbarAnnotationsHorizontalLine:"Horizontal Line",toolbarAnnotationsVerticalLine:"Vertical Line",toolbarAnnotationsParallelChannel:"Parallel Channel",toolbarAnnotationsDisjointChannel:"Disjoint Channel",toolbarAnnotationsClearAll:"Clear All",toolbarAnnotationsFillColor:"Fill Color",toolbarAnnotationsLineColor:"Line Color",toolbarAnnotationsLineStyle:"Line Style",toolbarAnnotationsLineStrokeWidth:"Line Stroke Width",toolbarAnnotationsSettings:"Settings",toolbarAnnotationsTextColor:"Text Color",toolbarAnnotationsTextSize:"Text Size",toolbarAnnotationsLock:"Lock",toolbarAnnotationsUnlock:"Unlock",toolbarAnnotationsDelete:"Delete",toolbarAnnotationsDragHandle:"Drag Toolbar",toolbarAnnotationsLineAnnotations:"Trend Lines",toolbarAnnotationsFibonacciAnnotations:"Fibonacci",toolbarAnnotationsTextAnnotations:"Text Annotations",toolbarAnnotationsShapeAnnotations:"Arrows",toolbarAnnotationsMeasurerAnnotations:"Measurers",toolbarAnnotationsCallout:"Callout",toolbarAnnotationsComment:"Comment",toolbarAnnotationsNote:"Note",toolbarAnnotationsText:"Text",toolbarAnnotationsArrow:"Arrow",toolbarAnnotationsArrowUp:"Arrow Up",toolbarAnnotationsArrowDown:"Arrow Down",toolbarAnnotationsDateRange:"Date Range",toolbarAnnotationsPriceRange:"Price Range",toolbarAnnotationsDatePriceRange:"Date and Price",toolbarAnnotationsQuickDatePriceRange:"Measure",toolbarRange1Month:"1M",toolbarRange1MonthAria:"1 month",toolbarRange3Months:"3M",toolbarRange3MonthsAria:"3 months",toolbarRange6Months:"6M",toolbarRange6MonthsAria:"6 months",toolbarRangeYearToDate:"YTD",toolbarRangeYearToDateAria:"Year to date",toolbarRange1Year:"1Y",toolbarRange1YearAria:"1 year",toolbarRangeAll:"All",toolbarRangeAllAria:"All",toolbarZoomZoomOut:"Zoom out",toolbarZoomZoomIn:"Zoom in",toolbarZoomPanLeft:"Pan left",toolbarZoomPanRight:"Pan right",toolbarZoomPanStart:"Pan to the start",toolbarZoomPanEnd:"Pan to the end",toolbarZoomReset:"Reset the zoom",contextMenuDownload:"Download",contextMenuToggleSeriesVisibility:"Toggle Visibility",contextMenuToggleOtherSeries:"Toggle Other Series",contextMenuZoomToCursor:"Zoom to here",contextMenuPanToCursor:"Pan to here",dialogHeaderChannel:"Channel",dialogHeaderLine:"Line",dialogHeaderFibonacciRange:"Fib Retracement",dialogHeaderDateRange:"Date Range",dialogHeaderPriceRange:"Price Range",dialogHeaderDatePriceRange:"Date and Price",dialogHeaderText:"Text",dialogInputAlign:"Align",dialogInputColorPicker:"Color",dialogInputColorPickerAltText:"Text Color",dialogInputFillColorPicker:"Fill",dialogInputFillColorPickerAltText:"Fill Color",dialogInputExtendChannelStart:"Extend channel start",dialogInputExtendChannelEnd:"Extend channel end",dialogInputExtendLineStart:"Extend line start",dialogInputExtendLineEnd:"Extend line end",dialogInputExtendAbove:"Extend above",dialogInputExtendBelow:"Extend below",dialogInputExtendLeft:"Extend left",dialogInputExtendRight:"Extend right",dialogInputReverse:"Reverse",dialogInputShowFill:"Show Fill",dialogInputFontSize:"Size",dialogInputFontSizeAltText:"Font Size",dialogInputLineStyle:"Dash",dialogInputPosition:"Position",dialogInputStrokeWidth:"Weight",dialogInputStrokeWidthAltText:"Line Weight",dialogInputFibonacciBands:"Bands",dialogInputFibonacciBandsAltText:"Fibonacci Bands",inputTextareaPlaceholder:"Add Text",measurerDateRangeBars:"${value}[number] bars",measurerPriceRangeValue:"${value}[number]",measurerPriceRangePercent:"${value}[percent]",measurerVolume:"Vol ${value}",tooltipPaginationStatus:"${index}[number] of ${count}[number]"},Xn=/\$\{(\w+)}(?:\[(\w+)])?/gi,Zn={number:new Intl.NumberFormat("en-US"),percent:new Intl.NumberFormat("en-US",{style:"percent",minimumFractionDigits:2,maximumFractionDigits:2}),percent0to2dp:new Intl.NumberFormat("en-US",{style:"percent",minimumFractionDigits:0,maximumFractionDigits:2}),date:new Intl.DateTimeFormat("en-US",{dateStyle:"full"}),time:new Intl.DateTimeFormat("en-US",{timeStyle:"full"}),datetime:new Intl.DateTimeFormat("en-US",{dateStyle:"full",timeStyle:"full"})},Qn=class extends Qi{constructor(){super(...arguments),this.localeText=void 0,this.getLocaleText=void 0}setLocaleText(e){this.localeText!==e&&(this.localeText=e,this.dispatch("locale-changed"))}setLocaleTextFormatter(e){this.getLocaleText=e,this.getLocaleText!==e&&(this.getLocaleText=e,this.dispatch("locale-changed"))}t(e,t={}){const{localeText:i=qn,getLocaleText:s}=this,r=i[e];return s?.({key:e,defaultValue:r,variables:t})??(({defaultValue:e,variables:t})=>e?.replaceAll(Xn,(e,i,s)=>{const r=t[i],o=null!=s?Zn[s]:null;return null!=s&&null==o&&n.Vy.warnOnce(`Format style [${s}] is not supported`),null!=o?o.format(r):"number"==typeof r?Zn.number.format(r):r instanceof Date?Zn.datetime.format(r):String(r)}))({key:e,defaultValue:r,variables:t})??e}},Jn=class{constructor(e){this.enabled=!0,this.width=600,this.height=300;const{width:t,height:i,canvasElement:s,willReadFrequently:r=!1}=e;this.pixelRatio=e.pixelRatio??(0,n.zk)("devicePixelRatio")??1,this.element=s??(0,n.n)("canvas"),this.element.style.display="block",this.element.style.width=(t??this.width)+"px",this.element.style.height=(i??this.height)+"px",this.element.width=Math.round((t??this.width)*this.pixelRatio),this.element.height=Math.round((i??this.height)*this.pixelRatio),this.context=this.element.getContext("2d",{willReadFrequently:r}),this.onEnabledChange(),this.resize(t??0,i??0,this.pixelRatio),b(this.context)}drawImage(e,t=0,i=0){return e.drawImage(this.context.canvas,t,i)}toDataURL(e){return this.element.toDataURL(e)}resize(e,t,i){if(!(e>0&&t>0))return;const{element:n,context:s}=this;n.width=Math.round(e*i),n.height=Math.round(t*i),s.setTransform(i,0,0,i,0,0),n.style.width=e+"px",n.style.height=t+"px",this.width=e,this.height=t,this.pixelRatio=i}clear(){C(this)}destroy(){this.element.remove(),this.element.width=0,this.element.height=0,this.context.clearRect(0,0,0,0),Object.freeze(this)}reset(){this.context.resetTransform()}onEnabledChange(){this.element&&(this.element.style.display=this.enabled?"":"none")}};a([ci(e=>e.onEnabledChange())],Jn.prototype,"enabled",2);var es=class extends n.bk{constructor(){super(...arguments),this.cache=new Map,this.imageLoadingCount=0}loadImage(e,t){const i=this.cache.get(e);if(i?.image)return i.image;if(null!=i&&t)return void i.nodes.add(t);if(!t)return;const n={image:void 0,nodes:new Set([t])},s=new Image;return this.imageLoadingCount++,s.onload=()=>{n.image=s,n.nodes.forEach(e=>e.markDirty()),n.nodes.clear(),this.imageLoadingCount--,this.emit("image-loaded",{uri:e})},s.onerror=()=>{this.imageLoadingCount--,n.nodes.clear(),this.emit("image-error",{uri:e})},s.src=e,this.cache.set(e,n),n.image}waitingToLoad(){return this.imageLoadingCount>0}destroy(){this.cache.forEach(e=>{e.nodes.clear()}),this.cache.clear()}},ts=class{constructor(e){this.canvas=e,this.debug=y.create(!0,"scene"),this.layersMap=new Map,this.nextLayerId=0}get size(){return this.layersMap.size}resize(e,t,i){this.canvas.resize(e,t,i),this.layersMap.forEach(({canvas:n})=>n.resize(e,t,i))}addLayer(e){const{width:t,height:i,pixelRatio:n}=this.canvas,{name:s}=e,r=new w({width:t,height:i,pixelRatio:n});return this.layersMap.set(r,{id:this.nextLayerId++,name:s,canvas:r}),this.debug("Scene.addLayer() - layers",this.layersMap),r}removeLayer(e){this.layersMap.has(e)&&(this.layersMap.delete(e),e.destroy(),this.debug("Scene.removeLayer() -  layers",this.layersMap))}clear(){for(const e of this.layersMap.values())e.canvas.destroy();this.layersMap.clear()}};function is(e){for(const t of["B","KB","MB","GB"]){if(e<1536)return`${e.toFixed(1)}${t}`;e/=1024}return`${e.toFixed(1)}TB}`}function ns(e,t,i,s,r={},o=m.zero){if(!y.check("scene:stats","scene:stats:verbose"))return;const{layersRendered:a=0,layersSkipped:l=0,nodesRendered:c=0,nodesSkipped:h=0,opsPerformed:d=0,opsSkipped:u=0}=s??{},p=performance.now(),{start:g,...f}=t,v=Object.entries(f).map(([e,t])=>hs(e,t)).filter(e=>null!=e).join(" + "),C=Object.entries(r).map(([e,t])=>`${e}: ${JSON.stringify(t)}`).join(" ; "),b=y.check("scene:stats:verbose"),S=function(){if(!("memory"in performance))return;const{totalJSHeapSize:e,usedJSHeapSize:t,jsHeapSizeLimit:i}=performance.memory,n=[];for(const s of[t,e,i])"number"==typeof s&&n.push(is(s));return`Heap ${n.join(" / ")}`}(),w=[`${hs("⏱️",g,p)} (${v})`,`${C}`,`Layers: ${b?cs(a,l):e.size}`,b?`Nodes: ${cs(c,h)}`:null,b?`Ops: ${cs(d,u)}`:null,b&&S?S:null].filter(n.Kg),x=new Li(e=>i.measureText(e)),E=new Map(w.map(e=>[e,x.measureLines(e)])),M=Math.max(...Array.from(E.values(),e=>e.width)),A=function(e,t){let i=0;for(const n of e)i+=t(n);return i}(E.values(),e=>e.height),T=2+o.x;i.save(),i.fillStyle="white",i.fillRect(T,0,M,A),i.fillStyle="black";let D=0;for(const[e,t]of E.entries())D+=t.height,i.fillText(e,T,D);i.restore()}var ss=new Set,rs=new Set(["gradient","zIndex","clipRect","cachedBBox","childNodeCounts","path","__zIndex","name","__scalingCenterX","__scalingCenterY","__rotationCenterX","__rotationCenterY","_previousDatum","__fill","__lineDash","borderPath","borderClipPath","_clipPath"]);function os(e){const{...t}=e;for(const e of Object.keys(t))rs.has(e)||"number"!=typeof t[e]&&"string"!=typeof t[e]&&"boolean"!=typeof t[e]&&(ss.add(e),delete t[e]);return t}function as(e,t){if(!y.check(!0,"scene"))return{};let i=0;return{node:"json"===t?os(e):e,name:e.name??e.id,dirty:e.dirty,...Array.from(e.children(),e=>as(e,t)).reduce((e,t)=>{let{name:n}=t;const{node:{visible:s,opacity:r,zIndex:o,translationX:a,translationY:l,rotation:c,scalingX:h,scalingY:d},node:u}=t;(!s||r<=0)&&(n=`(${n})`),At.is(u)&&u.renderToOffscreenCanvas&&(n=`*${n}*`);const p=Array.isArray(o)?`(${o.join(", ")})`:o,g=[`${(i++).toString().padStart(3,"0")}|`,`${n??"<unknown>"}`,`z: ${p}`,a&&`x: ${a}`,l&&`y: ${l}`,c&&`r: ${c}`,null!=h&&1!==h&&`sx: ${h}`,null!=d&&1!==d&&`sy: ${d}`].filter(e=>!!e).join(" ");let f=g,m=1;for(;null!=e[f]&&m<100;)f=`${g} (${m++})`;return e[f]=t,e},{})}}function ls(e){if(!e.dirty)return{dirtyTree:{},paths:[]};const t=Array.from(e.children(),e=>ls(e)).filter(e=>e.paths.length>0),i=At.is(e)?e.name??e.id:e.id,n=t.length?t.flatMap(e=>e.paths).map(e=>`${i}.${e}`):[i];return{dirtyTree:{name:i,node:e,dirty:e.dirty,...t.map(e=>e.dirtyTree).filter(e=>null!=e.dirty).reduce((e,t)=>(e[t.name??"<unknown>"]=t,e),{})},paths:n}}function cs(e,t){const i=e+t;return`${e} / ${i} (${Math.round(100*e/i)}%)`}function hs(e,t,i){const n=null!=i?i-t:t;return`${e}: ${Math.round(100*n)/100}ms`}var ds=class extends n.bk{constructor(e){super(),this.debug=y.create(!0,"scene"),this.id=(0,n.sX)(this),this.imageLoader=new es,this.root=null,this.pendingSize=null,this.isDirty=!1,this.destroyFns=[],this.updateDebugFlags(),this.canvas=new Jn(e),this.layersManager=new ts(this.canvas),this.destroyFns.push(this.imageLoader.on("image-loaded",()=>{this.emit("scene-changed",{})}),this.imageLoader.on("image-error",({uri:e})=>{n.Vy.warnOnce(`Unable to load image ${e}`)}))}waitingForUpdate(){return this.imageLoader?.waitingToLoad()??!1}get width(){return this.pendingSize?.[0]??this.canvas.width}get height(){return this.pendingSize?.[1]??this.canvas.height}get pixelRatio(){return this.pendingSize?.[2]??this.canvas.pixelRatio}setContainer(e){const{element:t}=this.canvas;return t.parentElement?.removeChild(t),e.appendChild(t),this}setRoot(e){return this.root===e||(this.isDirty=!0,this.root?.setScene(),this.root=e,e&&(e.visible=!0,e.setScene(this))),this}updateDebugFlags(){y.inDevelopmentMode(()=>J._debugEnabled=!0)}clearCanvas(){this.canvas.clear()}attachNode(e){return this.appendChild(e),()=>this.removeChild(e)}appendChild(e){return this.root?.appendChild(e),this}removeChild(e){return this.root?.removeChild(e),this}download(e,t){(0,n.Is)(this.canvas.toDataURL(t),e?.trim()??"image")}getDataURL(e){return this.canvas.toDataURL(e)}resize(e,t,i){return e=Math.round(e),t=Math.round(t),i??(i=this.pixelRatio),e>0&&t>0&&(e!==this.width||t!==this.height||i!==this.pixelRatio)&&(this.pendingSize=[e,t,i],this.isDirty=!0,!0)}render(e){const{debugSplitTimes:t={start:performance.now()},extraDebugStats:i,seriesRect:s}=e??{},{canvas:r,canvas:{context:o}={},root:a,pendingSize:l,width:c,height:h,pixelRatio:d}=this;if(!o)return;const u=performance.now();let p=!1;if(l&&(p=!0,this.layersManager.resize(...l),this.pendingSize=null),a&&!a.visible)return void(this.isDirty=!1);if(!1===a?.dirty&&!this.isDirty)return this.debug.check()&&this.debug("Scene.render() - no-op",{tree:as(a,"console")}),void ns(this.layersManager,t,o,void 0,i,s);const g={ctx:o,width:c,height:h,devicePixelRatio:d,debugNodes:{}};y.check("scene:stats:verbose")&&(g.stats={layersRendered:0,layersSkipped:0,nodesRendered:0,nodesSkipped:0,opsPerformed:0,opsSkipped:0}),function(e){const t=(0,n.$r)((0,n.zk)("agChartsSceneDebug")),i=[];for(const e of t)"layout"===e?i.push("seriesRoot","legend","root",/.*Axis-\d+-axis.*/):i.push(e);e.debugNodeSearch=i}(g);let f=!1;if((!1!==a?.dirty||p)&&(f=!0,r.clear()),a&&y.check("scene:dirtyTree")){const{dirtyTree:e,paths:t}=ls(a);y.create("scene:dirtyTree")("Scene.render() - dirtyTree",{dirtyTree:e,paths:t})}if(a&&f){if(a.visible&&a.preRender(g),this.debug.check()){const e=as(a,"console");this.debug("Scene.render() - before",{canvasCleared:f,tree:e})}if(a.visible)try{o.save(),a.render(g),o.restore()}catch(e){throw this.canvas.reset(),e}}t["✍️"]=performance.now()-u,o.verifyDepthZero?.(),this.isDirty=!1,ns(this.layersManager,t,o,g.stats,i,s),function(e,t){e.save();for(const[i,s]of Object.entries(t)){const t=wt.toCanvas(s);t?(e.globalAlpha=.8,e.strokeStyle="red",e.lineWidth=1,e.strokeRect(t.x,t.y,t.width,t.height),e.fillStyle="red",e.strokeStyle="white",e.font="16px sans-serif",e.textBaseline="top",e.textAlign="left",e.lineWidth=2,e.strokeText(i,t.x,t.y,t.width),e.fillText(i,t.x,t.y,t.width)):n.Vy.log(`Scene.render() - no bbox for debugged node [${i}].`)}e.restore()}(o,g.debugNodes),a&&this.debug.check()&&this.debug("Scene.render() - after",{tree:as(a,"console"),canvasCleared:f})}toSVG(){const{root:e,width:t,height:i}=this;if(null!=e)return J.toSVG(e,t,i)}strip(){const{context:e,pixelRatio:t}=this.canvas;e.setTransform(t,0,0,t,0,0),this.layersManager.clear(),this.setRoot(null),this.isDirty=!1,this.clear()}destroy(){this.strip(),this.canvas.destroy(),this.imageLoader.destroy(),this.destroyFns.forEach(e=>e()),Object.assign(this,{canvas:void 0})}};function us(e,t){return!(!function(e){return"context"in e}(e)||null==t[0]||"object"!=typeof t[0]||(t[0].context=e.context,0))}function ps(e,t,i,n){return us(e,n)||t&&us(t,n),i(...n)}ds.className="Scene";var gs=class{constructor(){this.cache=new WeakMap}call(e,t,i,...n){let s,r=this.cache.get(i);try{s=JSON.stringify(n)}catch{return this.invoke(e,t,i,n,r)}return null==r&&(r=new Map,this.cache.set(i,r)),r.has(s)?r.get(s):this.invoke(e,t,i,n,r,s)}invoke(e,t,i,s,r,o){try{const n=ps(e,t,i,s);return r&&null!=o&&r.set(o,n),n}catch(e){return void n.Vy.warnOnce("User callback errored, ignoring",e)}}invalidateCache(){this.cache=new WeakMap}},fs=class extends Ji{constructor(e,t){super(),this.annotationRoot=e,this.fireChartEvent=t,this.mementoOriginatorKey="annotations",this.annotations=[]}createMemento(){return this.annotations}guardMemento(e){return null==e||(0,n.cy)(e)}restoreMemento(e,t,i){this.annotations=this.cleanData(i??[]).map(e=>N(e,this.getAnnotationTypeStyles(e.type))),this.listeners.dispatch("restore-annotations",{type:"restore-annotations",annotations:this.annotations})}updateData(e){this.annotations=this.cleanData(e??[])}fireChangedEvent(){this.fireChartEvent({type:"annotations",annotations:Vt([...this.annotations])})}attachNode(e){return this.annotationRoot.append(e),()=>(this.annotationRoot?.removeChild(e),this)}setAnnotationStyles(e){this.styles=e}getAnnotationTypeStyles(e){return this.styles?.[e]}cleanData(e){for(const t of e)"textAlign"in t&&delete t.textAlign;return e}},ms=(e=>(e[e.CHART_BACKGROUND=0]="CHART_BACKGROUND",e[e.AXIS_GRID=1]="AXIS_GRID",e[e.AXIS=2]="AXIS",e[e.ZOOM_SELECTION=3]="ZOOM_SELECTION",e[e.SERIES_CROSSLINE_RANGE=4]="SERIES_CROSSLINE_RANGE",e[e.SERIES_LAYER=5]="SERIES_LAYER",e[e.AXIS_FOREGROUND=6]="AXIS_FOREGROUND",e[e.SERIES_CROSSHAIR=7]="SERIES_CROSSHAIR",e[e.SERIES_CROSSLINE_LINE=8]="SERIES_CROSSLINE_LINE",e[e.SERIES_ANNOTATION=9]="SERIES_ANNOTATION",e[e.CHART_ANNOTATION=10]="CHART_ANNOTATION",e[e.CHART_ANNOTATION_FOCUSED=11]="CHART_ANNOTATION_FOCUSED",e[e.STATUS_BAR=12]="STATUS_BAR",e[e.SERIES_LABEL=13]="SERIES_LABEL",e[e.LEGEND=14]="LEGEND",e[e.NAVIGATOR=15]="NAVIGATOR",e[e.FOREGROUND=16]="FOREGROUND",e))(ms||{}),vs=class{constructor(e){this.sceneRoot=e,this.axes=new Map,this.axisGridGroup=new At({name:"Axes-Grids",zIndex:1}),this.axisGroup=new At({name:"Axes",zIndex:2}),this.axisLabelGroup=new At({name:"Axes-Labels",zIndex:13}),this.axisCrosslineRangeGroup=new At({name:"Axes-Crosslines-Range",zIndex:4}),this.axisCrosslineLineGroup=new At({name:"Axes-Crosslines-Line",zIndex:8}),this.axisCrosslineLabelGroup=new At({name:"Axes-Crosslines-Label",zIndex:13}),this.sceneRoot.appendChild(this.axisGroup),this.sceneRoot.appendChild(this.axisGridGroup),this.sceneRoot.appendChild(this.axisLabelGroup),this.sceneRoot.appendChild(this.axisCrosslineRangeGroup),this.sceneRoot.appendChild(this.axisCrosslineLineGroup),this.sceneRoot.appendChild(this.axisCrosslineLabelGroup)}updateAxes(e,t){const i={axisNode:this.axisGroup,gridNode:this.axisGridGroup,labelNode:this.axisLabelGroup,crossLineRangeNode:this.axisCrosslineRangeGroup,crossLineLineNode:this.axisCrosslineLineGroup,crossLineLabelNode:this.axisCrosslineLabelGroup};for(const n of e)t.includes(n)||(n.detachAxis(i),n.destroy());for(const n of t)e?.includes(n)||n.attachAxis(i);this.axes.clear();for(const e of t){const t=e.createAxisContext();this.axes.has(t.direction)?this.axes.get(t.direction)?.push(t):this.axes.set(t.direction,[t])}}getAxisContext(e){return this.axes.get(e)??[]}destroy(){this.axes.clear(),this.sceneRoot.removeChild(this.axisGroup),this.sceneRoot.removeChild(this.axisGridGroup)}},ys=(e=>(e[e.FULL=0]="FULL",e[e.UPDATE_DATA=1]="UPDATE_DATA",e[e.PROCESS_DATA=2]="PROCESS_DATA",e[e.PROCESS_DOMAIN=3]="PROCESS_DOMAIN",e[e.PERFORM_LAYOUT=4]="PERFORM_LAYOUT",e[e.SERIES_UPDATE=5]="SERIES_UPDATE",e[e.PRE_SCENE_RENDER=6]="PRE_SCENE_RENDER",e[e.SCENE_RENDER=7]="SCENE_RENDER",e[e.NONE=8]="NONE",e))(ys||{}),Cs=class extends Qi{constructor(e){super(),this.animationManager=e,this.dispatchOnlyLatest=!0,this.dispatchThrottle=0,this.requestThrottle=300,this.isLoadingInitialData=!1,this.isLoadingData=!1,this.freshRequests=[],this.requestCounter=0,this.debug=y.create(!0,"data-model","data-source"),this.throttledFetch=this.createThrottledFetch(this.requestThrottle),this.throttledDispatch=this.createThrottledDispatch(this.dispatchThrottle)}updateCallback(e){"function"==typeof e&&(this.debug("DataService - updated data source callback"),this.dataSourceCallback=e,this.isLoadingInitialData=!0,this.animationManager.skip(),this.dispatch("data-source-change"))}clearCallback(){this.dataSourceCallback=void 0}load(e){this.isLoadingData=!0,this.throttledFetch(e)}isLazy(){return null!=this.dataSourceCallback}isLoading(){return this.isLazy()&&(this.isLoadingInitialData||this.isLoadingData)}createThrottledFetch(e){return(0,n.nF)(e=>this.fetch(e).catch(e=>n.Vy.error("callback failed",e)),e,{leading:!1,trailing:!0})}createThrottledDispatch(e){return(0,n.nF)((e,t)=>{this.debug(`DataService - dispatching 'data-load' | ${e}`),this.dispatch("data-load",{type:"data-load",data:t})},e,{leading:!0,trailing:!0})}async fetch(e){if(!this.dataSourceCallback)throw new Error("DataService - [dataSource.getData] callback not initialised");const t=performance.now(),i=this.requestCounter++;let s;this.debug(`DataService - requesting | ${i}`),this.freshRequests.push(i);try{s=await this.dataSourceCallback(e),this.debug(`DataService - response | ${performance.now()-t}ms | ${i}`)}catch(e){this.debug(`DataService - request failed | ${i}`),n.Vy.errorOnce(`DataService - request failed | [${e}]`)}this.isLoadingInitialData=!1;const r=this.freshRequests.findIndex(e=>e===i);-1===r||this.dispatchOnlyLatest&&r!==this.freshRequests.length-1?this.debug(`DataService - discarding stale request | ${i}`):(this.freshRequests=this.freshRequests.slice(r+1),0===this.freshRequests.length&&(this.isLoadingData=!1),Array.isArray(s)?this.throttledDispatch(i,s):this.dispatch("data-error"))}};a([li({newValue(e){this.throttledDispatch=this.createThrottledDispatch(e)}})],Cs.prototype,"dispatchThrottle",2),a([li({newValue(e){this.throttledFetch=this.createThrottledFetch(e)}})],Cs.prototype,"requestThrottle",2);var bs=class{constructor(e,t){this.domManager=e,this.updateService=t,this.observers=[]}updateFonts(e){e&&0!==e.size&&(this.loadFonts(e),e.forEach(e=>{this.observeFontStatus(e)}))}destroy(){for(const e of this.observers)e.disconnect();this.observers=[]}loadFonts(e){const t=Array.from(e).map(e=>encodeURIComponent(e)),i=":wght@100;200;300;400;500;600;700;800;900",n=`${i}&family=`,s=`@import url('https://fonts.googleapis.com/css2?family=${t.join(n)}${i}&display=swap');\n`;this.domManager.addStyles(`google-font-${t.join("-")}`,s)}observeFontStatus(e){const t=window.document.createElement("div");t.style.setProperty("position","absolute"),t.style.setProperty("top","0"),t.style.setProperty("margin","0"),t.style.setProperty("padding","0"),t.style.setProperty("overflow","hidden"),t.style.setProperty("visibility","hidden"),t.style.setProperty("width","auto"),t.style.setProperty("max-width","none"),t.style.setProperty("font-synthesis","none"),t.style.setProperty("font-family",e),t.style.setProperty("font-size","16px"),t.style.setProperty("white-space","nowrap"),t.textContent="UVWxyz",this.domManager.addChild("canvas-container",`font-check-${encodeURIComponent(e)}`,t);const i=new ResizeObserver(e=>{const t=e?.at(0)?.contentBoxSize.at(0)?.inlineSize;null!=t&&t>0&&(Di.clear(),this.updateService.update(4))});i.observe(t),this.observers.push(i)}};function Ss(e,t){if("string"==typeof e)try{e=me.fromString(e)}catch{e=me.fromArray([0,0,0])}if("string"==typeof t)try{t=me.fromString(t)}catch{t=me.fromArray([0,0,0])}return i=>me.mix(e,t,i).toRgbaString()}var ws={};o(ws,{easeIn:()=>Es,easeInOut:()=>As,easeInOutQuad:()=>Is,easeInQuad:()=>Ts,easeOut:()=>Ms,easeOutQuad:()=>Ds,inverseEaseOut:()=>Rs,linear:()=>xs});var xs=e=>e,Es=e=>1-Math.cos(e*Math.PI/2),Ms=e=>Math.sin(e*Math.PI/2),As=e=>-(Math.cos(e*Math.PI)-1)/2,Ts=e=>e*e,Ds=e=>1-(1-e)**2,Is=e=>e<.5?2*e*e:1-(-2*e+2)**2/2,Rs=e=>2*Math.asin(e)/Math.PI,Ls=["initial","remove","update","add","trailing","end","none"],ks={initial:{animationDuration:1,animationDelay:0},add:{animationDuration:.25,animationDelay:.75},remove:{animationDuration:.25,animationDelay:0},update:{animationDuration:.5,animationDelay:.25},trailing:{animationDuration:.2,animationDelay:1,skipIfNoEarlierAnimations:!0},end:{animationDelay:1.2,animationDuration:0,skipIfNoEarlierAnimations:!0},none:{animationDuration:0,animationDelay:0}},Ps=(e=>(e.Loop="loop",e.Reverse="reverse",e))(Ps||{});function Ns(e){return e.every(e=>e instanceof J)?{nodes:e,selections:[]}:{nodes:[],selections:e}}function Os(e,t){return e===t||(Array.isArray(e)&&Array.isArray(t)?e.length===t.length&&e.every((e,i)=>Os(e,t[i])):u(e)&&u(t)?e.equals(t):!(!(0,n.Qd)(e)||!(0,n.Qd)(t))&&P(e,t,Os))}var _s=class{constructor(e){this.isComplete=!1,this.elapsed=0,this.iteration=0,this.isPlaying=!1,this.isReverse=!1,this.id=e.id,this.groupId=e.groupId,this.autoplay=e.autoplay??!0,this.ease=e.ease??xs,this.phase=e.phase;const t=e.duration??ks[this.phase].animationDuration;this.duration=t*e.defaultDuration,this.delay=(e.delay??0)*e.defaultDuration,this.onComplete=e.onComplete,this.onPlay=e.onPlay,this.onStop=e.onStop,this.onUpdate=e.onUpdate,this.interpolate=this.createInterpolator(e.from,e.to),this.from=e.from,!0===e.skip&&(this.onUpdate?.(e.to,!1,this),this.onStop?.(this),this.onComplete?.(this),this.isComplete=!0),!1!==e.collapsable&&(this.duration=this.checkCollapse(e,this.duration))}checkCollapse(e,t){return Os(e.from,e.to)?0:t}play(e=!1){this.isPlaying||this.isComplete||(this.isPlaying=!0,this.onPlay?.(this),this.autoplay&&(this.autoplay=!1,e&&this.onUpdate?.(this.from,!0,this)))}stop(){this.isPlaying=!1,this.isComplete||(this.isComplete=!0,this.onStop?.(this))}update(e){if(this.isComplete)return e;!this.isPlaying&&this.autoplay&&this.play(!0);const t=this.elapsed;if(this.elapsed+=e,this.delay>this.elapsed)return 0;const i=this.interpolate(this.isReverse?1-this.delta:this.delta);this.onUpdate?.(i,!1,this);const n=this.delay+this.duration;return this.elapsed>=n?(this.stop(),this.isComplete=!0,this.onComplete?.(this),e-(n-t)):0}get delta(){return this.ease((0,n.qE)(0,(this.elapsed-this.delay)/this.duration,1))}createInterpolator(e,t){if("object"!=typeof t||u(t))return this.interpolateValue(e,t);const i=[];for(const n of Object.keys(t)){const s=this.interpolateValue(e[n],t[n]);null!=s&&i.push([n,s])}return e=>{const t={};for(const[n,s]of i)t[n]=s(e);return t}}interpolateValue(e,t){if(null!=e&&null!=t){if(u(e))return i=>e[d](t,i);try{switch(typeof e){case"number":return function(e,t){return i=>Number(e)*(1-i)+Number(t)*i}(e,t);case"string":return Ss(e,t);case"boolean":if(e===t)return()=>e;break;case"object":return()=>e;default:throw new Error(`Unable to interpolate values: ${e}, ${t}`)}}catch{}throw new Error(`Unable to interpolate values: ${e}, ${t}`)}}},Fs=class{constructor(e){this.maxAnimationTime=e,this.debug=y.create(!0,"animation"),this.controllers=new Map,this.stoppedCbs=new Set,this.currentPhase=0,this.phases=new Map(Ls.map(e=>[e,[]])),this.skipAnimations=!1,this.animationTimeConsumed=0,this.isReady=!1}get size(){return this.controllers.size}get consumedTimeMs(){return this.animationTimeConsumed}isActive(){return this.controllers.size>0}getActiveControllers(){return this.phases.get(Ls[this.currentPhase])??[]}checkOverlappingId(e){null!=e&&this.controllers.has(e)&&(this.controllers.get(e).stop(),this.debug(`Skipping animation batch due to update of existing animation: ${e}`),this.skip())}addAnimation(e){if(!e.isComplete)return Ls.indexOf(e.phase)<this.currentPhase?(this.debug("Skipping animation due to being for an earlier phase",e.id),void e.stop()):(this.controllers.set(e.id,e),void this.phases.get(e.phase)?.push(e))}removeAnimation(e){this.controllers.delete(e.id);const t=this.phases.get(e.phase),i=t?.indexOf(e);null!=i&&i>=0&&t?.splice(i,1)}progress(e){if(!this.isReady)return;let t=0===e?.01:e;const i=()=>{const e=Ls[this.currentPhase];return{phaseControllers:[...this.getActiveControllers()],phase:e,phaseMeta:ks[e]}};let{phase:n,phaseControllers:s,phaseMeta:r}=i();const o=()=>null==Ls[this.currentPhase],a=()=>{for(({phase:n,phaseControllers:s,phaseMeta:r}=i());!o()&&0===s.length;)this.currentPhase++,({phase:n,phaseControllers:s,phaseMeta:r}=i()),this.debug(`AnimationBatch - phase changing to ${n}`,{unusedTime:t},s)},l=this.controllers.size;this.debug(`AnimationBatch - ${e}ms; phase ${n} with ${s?.length} of ${l}`);do{const e=t,i=r.skipIfNoEarlierAnimations&&0===this.animationTimeConsumed;let n=0;for(const r of s)i?r.stop():t=Math.min(r.update(e),t),r.isComplete&&(n++,this.removeAnimation(r));this.animationTimeConsumed+=e-t,this.debug(`AnimationBatch - updated ${s.length} controllers; ${n} completed`),this.debug(`AnimationBatch - animationTimeConsumed: ${this.animationTimeConsumed}`),a()}while(t>0&&!o());this.animationTimeConsumed>this.maxAnimationTime&&(this.debug("Animation batch exceeded max animation time, skipping",[...this.controllers]),this.stop())}ready(){if(this.isReady)return;this.isReady=!0,this.debug(`AnimationBatch - ready; skipped: ${this.skipAnimations}`,[...this.controllers]);let e=!0;for(const[,t]of this.controllers)if(t.duration>0&&!0!==ks[t.phase].skipIfNoEarlierAnimations){e=!1;break}if(!e)for(const[,e]of this.controllers)e.autoplay&&e.play(!0)}skip(e=!0){if(!1===this.skipAnimations&&!0===e){for(const e of this.controllers.values())e.stop();this.controllers.clear()}this.skipAnimations=e}play(){for(const e of this.controllers.values())e.play()}stop(){for(const e of this.controllers.values())try{e.stop(),this.removeAnimation(e)}catch(e){n.Vy.error("Error during animation stop",e)}this.dispatchStopped()}stopByAnimationId(e){if(null!=e&&this.controllers.has(e)){const t=this.controllers.get(e);t&&(t.stop(),this.removeAnimation(t))}}stopByAnimationGroupId(e){for(const t of this.controllers.values())t.groupId===e&&this.stopByAnimationId(t.id)}dispatchStopped(){this.stoppedCbs.forEach(e=>e()),this.stoppedCbs.clear()}isSkipped(){return this.skipAnimations}getRemainingTime(e){if(!this.isActive())return 0;let t=0;for(const[i,n]of this.phases)0!==n.length&&(null!=e&&e!==i||(t+=Math.max(...n.map(e=>e.isComplete?0:e.delay+e.duration-(e.elapsed??0)))));return t}destroy(){this.stop(),this.controllers.clear()}},Gs=(e=>(e[e.Default=32]="Default",e[e.ZoomDrag=16]="ZoomDrag",e[e.Annotations=8]="Annotations",e[e.ContextMenu=4]="ContextMenu",e[e.Animation=2]="Animation",e[e.AnnotationsSelected=1]="AnnotationsSelected",e[e.Clickable=41]="Clickable",e[e.Focusable=34]="Focusable",e[e.Keyable=43]="Keyable",e[e.ContextMenuable=36]="ContextMenuable",e[e.AnnotationsMoveable=9]="AnnotationsMoveable",e[e.AnnotationsDraggable=57]="AnnotationsDraggable",e[e.ZoomDraggable=50]="ZoomDraggable",e[e.ZoomClickable=34]="ZoomClickable",e[e.ZoomWheelable=59]="ZoomWheelable",e[e.All=63]="All",e))(Gs||{}),Vs=class{constructor(){this.stateQueue=34}pushState(e){this.stateQueue|=e}popState(e){this.stateQueue&=~e}isState(e){return!!(this.stateQueue&-this.stateQueue&e)}};function Bs(e){return null==e||!isNaN(e)&&e>=0&&e<=2}var Hs=class{constructor(e,t){this.interactionManager=e,this.chartUpdateMutex=t,this.defaultDuration=1e3,this.batch=new Fs(1.5*this.defaultDuration),this.debug=y.create(!0,"animation"),this.events=new n.bk,this.rafAvailable="undefined"!=typeof requestAnimationFrame,this.isPlaying=!0,this.requestId=null,this.skipAnimations=!0,this.currentAnonymousAnimationId=0}addListener(e,t){return this.events.on(e,t)}animate(e){const t=this.batch;try{t.checkOverlappingId(e.id)}catch(e){return void this.failsafeOnError(e)}let{id:i}=e;null==i&&(i=`__${this.currentAnonymousAnimationId}`,this.currentAnonymousAnimationId+=1);const n=this.isSkipped()||"none"===e.phase;n&&this.debug("AnimationManager - skipping animation");const{delay:s,duration:r}=e;if(!Bs(s))throw new Error(`Animation delay of ${s} is unsupported (${i})`);if(!Bs(r))throw new Error(`Animation duration of ${r} is unsupported (${i})`);const o=new _s({...e,id:i,skip:n,autoplay:!!this.isPlaying&&e.autoplay,phase:e.phase,defaultDuration:this.defaultDuration});if(!this.forceTimeJump(o,this.defaultDuration))return this.batch.addAnimation(o),o}play(){if(!this.isPlaying){this.isPlaying=!0,this.debug("AnimationManager.play()");try{this.batch.play()}catch(e){this.failsafeOnError(e)}this.requestAnimation()}}stop(){this.isPlaying=!1,this.cancelAnimation(),this.debug("AnimationManager.stop()"),this.batch.stop()}stopByAnimationId(e){try{this.batch.stopByAnimationId(e)}catch(e){this.failsafeOnError(e)}}stopByAnimationGroupId(e){try{this.batch.stopByAnimationGroupId(e)}catch(e){this.failsafeOnError(e)}}reset(){this.isPlaying?(this.stop(),this.play()):this.stop()}skip(e=!0){this.skipAnimations=e}isSkipped(){return!this.rafAvailable||this.skipAnimations||this.batch.isSkipped()}isActive(){return this.isPlaying&&this.batch.isActive()}getRemainingTime(e){return this.batch.getRemainingTime(e)}skipCurrentBatch(){this.debug.check()&&this.debug("AnimationManager - skipCurrentBatch()",{stack:(new Error).stack}),this.batch.skip()}isSkippingFrames(){return!0}scheduleAnimationFrame(e){this.requestId=(0,n.zk)().requestAnimationFrame(t=>{e(t).catch(e=>n.Vy.error(e))})}forceTimeJump(e,t){return!1}requestAnimation(){if(!this.rafAvailable)return;if(!this.batch.isActive()||null!==this.requestId)return;let e;const t=async i=>{const n=()=>{const t=i-(e??i);e=i,this.debug("AnimationManager - onAnimationFrame()",{controllersCount:this.batch.size,deltaTime:t}),this.interactionManager.pushState(2);try{this.batch.progress(t)}catch(e){this.failsafeOnError(e)}this.events.emit("animation-frame",{type:"animation-frame",deltaMs:t})};this.isSkippingFrames()?await this.chartUpdateMutex.acquireImmediately(n):await this.chartUpdateMutex.acquire(n),this.batch.isActive()?this.scheduleAnimationFrame(t):(this.batch.stop(),this.events.emit("animation-stop",{type:"animation-stop",deltaMs:this.batch.consumedTimeMs}))};this.events.emit("animation-start",{type:"animation-start",deltaMs:0}),this.scheduleAnimationFrame(t)}cancelAnimation(){null!==this.requestId&&(cancelAnimationFrame(this.requestId),this.requestId=null,this.startBatch())}failsafeOnError(e,t=!0){n.Vy.error("Error during animation, skipping animations",e),t&&this.cancelAnimation()}startBatch(e){this.debug(`AnimationManager - startBatch() with skipAnimations=${e}.`),this.reset(),this.batch.destroy(),this.batch=new Fs(1.5*this.defaultDuration),!0===e&&this.batch.skip()}endBatch(){this.batch.isActive()?(this.batch.ready(),this.requestAnimation()):(this.interactionManager.popState(2),this.batch.isSkipped()&&this.batch.skip(!1))}onBatchStop(e){this.batch.stoppedCbs.add(e)}destroy(){this.stop(),this.events.clear()}},zs=class extends Ji{seriesEvent(e){this.listeners.dispatch(e,{type:e})}seriesKeyNavZoom(e,t){const i={type:"series-keynav-zoom",delta:e,widgetEvent:t};this.listeners.dispatch("series-keynav-zoom",i)}legendItemClick(e,t,i,n,s){const r={type:"legend-item-click",legendType:e,series:t,itemId:i,enabled:n,legendItemName:s};this.listeners.dispatch("legend-item-click",r)}legendItemDoubleClick(e,t,i,n,s,r){const o={type:"legend-item-double-click",legendType:e,series:t,itemId:i,enabled:n,legendItemName:r,numVisibleItems:s};this.listeners.dispatch("legend-item-double-click",o)}},Us=class{constructor(){this.download={type:"action",showOn:"always",label:"contextMenuDownload",enabled:!0,action:void 0,items:void 0},this["zoom-to-cursor"]={type:"action",showOn:"series-area",label:"contextMenuZoomToCursor",enabled:!0,action:void 0,items:void 0},this["pan-to-cursor"]={type:"action",showOn:"series-area",label:"contextMenuPanToCursor",enabled:!0,action:void 0,items:void 0},this["toggle-series-visibility"]={type:"action",showOn:"legend-item",label:"contextMenuToggleSeriesVisibility",enabled:!0,action:void 0,items:void 0},this["toggle-other-series"]={type:"action",showOn:"legend-item",label:"contextMenuToggleOtherSeries",enabled:!0,action:void 0,items:void 0},this.separator={type:"separator",showOn:"always",label:"separator",enabled:!0,action:void 0,items:void 0}}},Ws=class{constructor(){this.defaults=["download","zoom-to-cursor","pan-to-cursor","toggle-series-visibility","toggle-other-series"]}},js=class{constructor(){this.items=new Us,this.lists=new Ws}},Ks=class extends Ji{constructor(){super(),this.builtins=new js,this.hiddenActions=new Set,this.setVisible("zoom-to-cursor",!1),this.setVisible("pan-to-cursor",!1)}static check(e,t){return t.showOn==e}static checkCallback(e,t,i){return e===t}dispatchContext(e,t,i,n){const{widgetEvent:s}=t;if(s.sourceEvent.defaultPrevented)return;const r={type:"context-setup",showOn:e,x:n?.x??t.canvasX,y:n?.y??t.canvasY,context:i,widgetEvent:s};this.listeners.dispatch("context-setup",r),r.type="context-complete",this.listeners.dispatch("context-complete",r)}isVisible(e){return!this.hiddenActions.has(e)}setVisible(e,t){t?this.hiddenActions.delete(e):this.hiddenActions.add(e)}},$s=class extends Ji{constructor(){super(...arguments),this.highlightStates=new wn}updateHighlight(e,t){const{activeHighlight:i}=this;this.highlightStates.set(e,t),this.activeHighlight=this.highlightStates.stateValue(),this.isEqual(this.activeHighlight,i)||this.listeners.dispatch("highlight-change",{type:"highlight-change",currentHighlight:this.activeHighlight,previousHighlight:i,callerId:e})}getActiveHighlight(){return this.activeHighlight}isEqual(e,t){return e===t||null!=e&&null!=t&&e?.series===t?.series&&e?.itemId===t?.itemId&&e?.datum===t?.datum}};function Ys(e,t){if(null==e||0===t.length)return[!1,!1];const i=e.valueOf(),n=t[0],s=t[t.length-1];if("string"==typeof n)return[i===n,i===s];let r=n.valueOf(),o=s.valueOf();return r>o&&([r,o]=[o,r]),[i===r,i===o]}function qs(e,t,i,n,s){const{xValue:r,yValue:o}=e,[a,l]=Ys(o,s),[c,h]=Ys(r,n);return{xKey:t,yKey:i,xValue:r,yValue:o,first:c,last:h,min:a,max:l}}function Xs(e,[t,i],s){const r=(0,n.S3)(0,e-1,e=>{const i=s(e)?.[1]??NaN;return!Number.isFinite(i)||i>t})??0;let o=(0,n.I5)(0,e-1,e=>{const t=s(e)?.[0]??NaN;return!Number.isFinite(t)||t<i})??e-1;return o=Math.min(o+1,e),[r,o]}function Zs(e,t,i){if(i){const{x:e,y:t,width:n,height:s}=i;return{canvasX:e+n/2,canvasY:t+s/2}}const n=t.yBar?.upperPoint??t.midPoint??e.datumMidPoint?.(t);if(n){const{x:t,y:i}=wt.toCanvasPoint(e.contentGroup,n.x,n.y);return{canvasX:Math.round(t),canvasY:Math.round(i)}}}function Qs(e,t,i,n,s){let r=-1,o=0,a=0,l=!1;for(;o<n&&r<=t-e;){r+=1;const n=i+a;l||(a*=-1),a>=0&&(a+=1),l&&a<0&&(a-=1),n<e||n>t?l=!0:s(n)&&(o+=1)}return o}var Js=class{constructor(e,t,i){this.domManager=t,this.tooltip=i,this.stateTracker=new wn,this.suppressState=new wn(!1),this.appliedState=null,this.destroyFns=[],this.destroyFns.push(i.setup(e,t),t.addListener("hidden",()=>this.tooltip.hide()))}destroy(){this.destroyFns.forEach(e=>e())}updateTooltip(e,t,i,n){i??(i=this.stateTracker.get(e)?.content),this.stateTracker.set(e,{meta:t,content:i,pagination:n}),this.applyStates()}removeTooltip(e){this.stateTracker.delete(e),this.applyStates()}suppressTooltip(e){this.suppressState.set(e,!0)}unsuppressTooltip(e){this.suppressState.delete(e)}applyStates(){const e=this.stateTracker.stateId(),t=e?this.stateTracker.get(e):void 0;if(this.suppressState.stateValue()||null==t?.meta||null==t?.content)return this.appliedState=null,void this.tooltip.hide();const i=this.domManager.getBoundingClientRect(),n="extended"===this.tooltip.bounds?this.domManager.getOverlayClientRect():i;if(this.appliedState?.content===t?.content){const e=this.tooltip.isVisible();this.tooltip.show(n,i,t?.meta,null,void 0,e)}else this.tooltip.show(n,i,t?.meta,t?.content,t?.pagination);this.appliedState=t}static makeTooltipMeta(e,t,i,n){const{canvasX:s,canvasY:r}=e,o=t.properties.tooltip,{placement:a,defaultPlacement:l,anchorTo:c,defaultAnchorTo:h,xOffset:d,yOffset:u}=o.position,p=Zs(t,i,n);return{canvasX:s,canvasY:r,nodeCanvasX:p?.canvasX??s,nodeCanvasY:p?.canvasY??r,enableInteraction:o.interaction?.enabled??!1,showArrow:o.showArrow,position:{placement:a,defaultPlacement:l,anchorTo:c,defaultAnchorTo:h,xOffset:d,yOffset:u}}}isEnteringInteractiveTooltip(e){const{tooltip:t}=this,i=e.relatedTarget;return t.interactive&&t.enabled&&t.isVisible()&&t.contains(i)}};function er(e,t,i){const{offsetX:n,offsetY:s,clientX:r,clientY:o,currentX:a,currentY:l,sourceEvent:c}=i;return{type:t,device:e,offsetX:n,offsetY:s,clientX:r,clientY:o,currentX:a,currentY:l,sourceEvent:c}}function tr(e,t){return e*e+t*t>=9}var ir=class{constructor(e){this.destroyFns=[],this.listeners=new Qi,this.isDragging=!1,this.touch={distanceTravelledX:0,distanceTravelledY:0,clientX:0,clientY:0},this.destroyFns.push(e.addListener("touchstart",this.onTouchStart.bind(this)),e.addListener("touchmove",this.onTouchMove.bind(this)),e.addListener("touchend",this.onTouchEnd.bind(this)),e.addListener("mousemove",this.onMouseMove.bind(this)),e.addListener("dblclick",this.onDblClick.bind(this)),e.addListener("drag-start",this.onDragStart.bind(this)),e.addListener("drag-move",this.onDragMove.bind(this)),e.addListener("drag-end",this.onDragEnd.bind(this)))}destroy(){this.destroyFns.forEach(e=>e()),this.listeners.destroy()}addListener(e,t){return this.listeners.addListener(e,t)}dispatch(e){this.listeners.dispatch(e.type,e)}onTouchStart(e){const{clientX:t,clientY:i}=e.sourceEvent.targetTouches[0]??{clientX:1/0,clientY:1/0};this.touch.distanceTravelledX=0,this.touch.distanceTravelledY=0,this.touch.clientX=t,this.touch.clientY=i}onTouchMove(e){const{clientX:t,clientY:i}=e.sourceEvent.targetTouches[0]??{clientX:1/0,clientY:1/0};this.touch.distanceTravelledX+=Math.abs(this.touch.clientX-t),this.touch.distanceTravelledY+=Math.abs(this.touch.clientY-i),this.touch.clientX=t,this.touch.clientY=i}onTouchEnd(e){e.sourceEvent.preventDefault()}onMouseMove(e){this.dispatch(e)}onDblClick(e){this.dispatch({device:"mouse",...e})}onDragStart(e){this.dragStartEvent=e}onDragMove(e){null!=this.dragStartEvent&&tr(e.originDeltaX,e.originDeltaY)&&(this.dispatch(this.dragStartEvent),this.dispatch({...this.dragStartEvent,type:"drag-move"}),this.dragStartEvent=void 0,this.isDragging=!0),this.isDragging&&this.dispatch(e)}onDragEnd(e){if(this.isDragging)return this.dispatch(e),void(this.isDragging=!1);if("mouse"===e.device){const t=er("mouse","click",e);this.dispatch(t)}else if("touchend"===e.sourceEvent.type){if(tr(this.touch.distanceTravelledX,this.touch.distanceTravelledY))return;const t=er("touch","click",e);this.dispatch(t);const i=Date.now();if(void 0!==this.lastClick&&i-this.lastClick.time<=505&&function(e,t){const i=e.clientX-t.clientX,n=e.clientY-t.clientY;return i*i+n*n<900}(this.lastClick,e)){const t=er(e.device,"dblclick",e);this.dispatch(t),this.lastClick=void 0}else this.lastClick={time:i,clientX:e.clientX,clientY:e.clientY}}}},nr=class extends _n{constructor(e){super(e)}addChildToDOM(){}removeChildFromDOM(){}},sr=class{constructor(e){this.seriesWidget=new nr(e.getParent("series-area")),this.chartWidget=new nr(e.getParent("canvas-proxy")),this.containerWidget=new nr(e.getParent("canvas-container")),this.containerWidget.addChild(this.chartWidget),this.chartWidget.addChild(this.seriesWidget),this.seriesDragInterpreter=new ir(this.seriesWidget)}destroy(){this.seriesDragInterpreter.destroy(),this.seriesWidget.destroy(),this.chartWidget.destroy(),this.containerWidget.destroy()}};function rr(e,t){const[i,s]=or(t);return(0,n.qE)(i,e,s)}function or(e){if(0===e.length)return[];const t=[1/0,-1/0];for(const i of e)i<t[0]&&(t[0]=i),i>t[1]&&(t[1]=i);return t}function ar(e){const[t,i]=or(e);return i-t}var lr=class e extends ve{constructor(e=[],t=[]){super(),this.domain=e,this.range=t,this.defaultClamp=!1}static is(t){return t instanceof e}normalizeDomains(...e){return hr(...e)}transform(e){return e}transformInvert(e){return e}calcBandwidth(e=1,t=1){const{domain:i}=this,n=this.getPixelRange();if(0===i.length)return n;let s=Math.abs(i[1].valueOf()-i[0].valueOf())/e+1;if(0!==t){const e=Math.floor(n);s=Math.min(s,e)}return n/Math.max(1,s)}convert(e,t){const{domain:i}=this;if(!i||i.length<2)return NaN;const n=t?.clamp??this.defaultClamp,s=Number(this.transform(i[0])),r=Number(this.transform(i[1])),o=Number(this.transform(e)),{range:a}=this,[l,c]=a;if(n){const[e,t]=or([s,r]);if(o<e)return l;if(o>t)return c}return s===r?(l+c)/2:o===s?l:o===r?c:l+(o-s)/(r-s)*(c-l)}invert(e,t){const i=this.domain.map(e=>this.transform(e)),[n,s]=i,{range:r}=this,[o,a]=r;let l;return l=o===a?this.toDomain((Number(n)+Number(s))/2):this.toDomain(Number(n)+(e-o)/(a-o)*(Number(s)-Number(n))),this.transformInvert(l)}getPixelRange(){const[e,t]=this.range;return Math.abs(t-e)}};lr.defaultTickCount=5;var cr=lr;function hr(...e){let t,i,n=1/0,s=-1/0;for(const r of e)for(const e of r){const r=e.valueOf();r<n&&(n=r,t=e),r>s&&(s=r,i=e)}return null!=t&&null!=i?{domain:[t,i],animatable:!0}:{domain:[],animatable:!1}}var dr={};o(dr,{TimeInterval:()=>Cr,day:()=>wr,friday:()=>_r,hour:()=>Ir,millisecond:()=>xr,minute:()=>Tr,monday:()=>kr,month:()=>Sr,saturday:()=>Fr,second:()=>Mr,sunday:()=>Lr,thursday:()=>Or,tuesday:()=>Pr,utcDay:()=>Br,utcHour:()=>zr,utcMinute:()=>Hr,utcMonth:()=>Vr,utcYear:()=>Gr,wednesday:()=>Nr,year:()=>br});var ur=1e3,pr=6e4,gr=36e5,fr=864e5,mr=6048e5,vr=2592e6,yr=31536e6,Cr=class e{constructor(e,t,i,n,s,r=1,o){this.unit=e,this.milliseconds=t,this.hierarchy=i,this._encode=n,this._decode=s,this.step=r,this._rangeCallback=o}static extent(e,t,i){if(e.getTime()>t.getTime()&&([e,t]=[t,e],null!=i&&(i=[1-i[1],1-i[0]])),null!=i){const n=t.getTime()-e.getTime(),s=e.getTime();e=new Date(s+i[0]*n),t=new Date(s+i[1]*n)}return[e,t]}getOffset(e,t){return Math.floor(this._encode(new Date(e)))%t}floor(e){const t=new Date(e),i=this._encode(t);return this._decode(i)}ceil(e){const t=new Date(Number(e)-1),i=this._encode(t);return this._decode(i+1)}rangeIndices(t,i,{extend:n=!1,visibleRange:s=[0,1],limit:r}){[t,i]=e.extent(t,i,s);const o=this._encode(n?this.floor(t):this.ceil(t));let a=this._encode(n?this.ceil(i):this.floor(i));return null!=r&&a-o>r&&(a=o+r),[o,a]}range(e,t,i={}){let n;n=e.getTime()>t.getTime()?this._rangeCallback?.(t,e):this._rangeCallback?.(e,t);const[s,r]=this.rangeIndices(e,t,i),o=[];for(let e=s;e<=r;e++){const t=this._decode(e);o.push(t)}return n?.(),o}previous(e){return this._decode(this._encode(this.ceil(e))-1)}next(e){return this._decode(this._encode(this.floor(e))+1)}rangeCount(e,t,i={}){const[n,s]=this.rangeIndices(e,t,i);return s-n}every(t,i){if(1===t&&null!=i?.snapTo)return this;const{unit:s,milliseconds:r,hierarchy:o,step:a}=this;let l,c=0;const h=t;h!==(t=Math.max(1,Math.round(t)))&&n.Vy.warnOnce(`interval step of [${h}] rounded to [${t}].`);const{snapTo:d="start"}=i??{};if("string"==typeof d){const e=c;l=(i,n)=>{const s="start"===d?i:n;return c=this.getOffset(s,t),()=>c=e}}else"number"==typeof d?c=this.getOffset(new Date(d),t):d instanceof Date&&(c=this.getOffset(d,t));return new e(s,r*t,o,e=>Math.floor((this._encode(e)-c)/t),e=>this._decode(e*t+c),a*t,l)}},br=new Cr("year",525949.2*60*1e3,void 0,function(e){return e.getFullYear()},function(e){const t=new Date;return t.setFullYear(e),t.setMonth(0,1),t.setHours(0,0,0,0),t}),Sr=new Cr("month",br.milliseconds/12,br,function(e){return 12*e.getFullYear()+e.getMonth()},function(e){const t=Math.floor(e/12);return new Date(t,e-12*t,1)}),wr=new Cr("day",864e5,Sr,function(e){const t=e.getTimezoneOffset()*pr;return Math.floor((e.getTime()-t)/fr)},function(e){const t=new Date(1970,0,1);return t.setDate(t.getDate()+e),t}),xr=new Cr("millisecond",1,wr,function(e){return e.getTime()},function(e){return new Date(e)}),Er=(new Date).getTimezoneOffset()*pr,Mr=new Cr("second",1e3,wr,function(e){return Math.floor((e.getTime()-Er)/ur)},function(e){return new Date(Er+e*ur)}),Ar=(new Date).getTimezoneOffset()*pr,Tr=new Cr("minute",6e4,wr,function(e){return Math.floor((e.getTime()-Ar)/pr)},function(e){return new Date(Ar+e*pr)}),Dr=(new Date).getTimezoneOffset()*pr,Ir=new Cr("hour",36e5,wr,function(e){return Math.floor((e.getTime()-Dr)/gr)},function(e){return new Date(Dr+e*gr)});function Rr(e){const t=(7+e-4)%7;return new Cr("day",6048e5,Sr,function(e){const i=e.getTimezoneOffset()*pr;return Math.floor((e.getTime()-i)/mr-t/7)},function(e){const i=new Date(1970,0,1);return i.setDate(i.getDate()+7*e+t),i},7)}var Lr=Rr(0),kr=Rr(1),Pr=Rr(2),Nr=Rr(3),Or=Rr(4),_r=Rr(5),Fr=Rr(6),Gr=new Cr("year",br.milliseconds,void 0,function(e){return e.getUTCFullYear()},function(e){const t=new Date;return t.setUTCFullYear(e),t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0),t}),Vr=new Cr("month",Sr.milliseconds,Gr,function(e){return 12*e.getUTCFullYear()+e.getUTCMonth()},function(e){const t=Math.floor(e/12),i=e-12*t;return new Date(Date.UTC(t,i,1))}),Br=new Cr("day",864e5,Vr,function(e){return Math.floor(e.getTime()/fr)},function(e){const t=new Date(0);return t.setUTCDate(t.getUTCDate()+e),t.setUTCHours(0,0,0,0),t}),Hr=new Cr("minute",6e4,Br,function(e){return Math.floor(e.getTime()/pr)},function(e){return new Date(e*pr)}),zr=new Cr("hour",36e5,Br,function(e){return Math.floor(e.getTime()/gr)},function(e){return new Date(e*gr)}),Ur={periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]};function Wr(e,t=new Date(e.getFullYear(),0,1)){const i=e.getTimezoneOffset()-t.getTimezoneOffset(),n=e.getTime()-t.getTime()+6e4*i;return Math.floor(n/864e5)}function jr(e,t){const i=(t-new Date(e.getFullYear(),0,1).getDay()+7)%7,n=new Date(e.getFullYear(),0,i+1);return n<=e?Math.floor(Wr(e,n)/7)+1:0}function Kr(e,t=e.getFullYear()){const i=new Date(t,0,1).getDay(),n=new Date(t,0,(4-i+7)%7-3+1);return n<=e?Math.floor(Wr(e,n)/7)+1:Kr(e,t-1)}var $r={a:e=>Ur.shortDays[e.getDay()],A:e=>Ur.days[e.getDay()],b:e=>Ur.shortMonths[e.getMonth()],B:e=>Ur.months[e.getMonth()],c:"%x, %X",d:(e,t)=>qr(e.getDate(),2,t??"0"),e:"%_d",f:(e,t)=>qr(1e3*e.getMilliseconds(),6,t??"0"),H:(e,t)=>qr(e.getHours(),2,t??"0"),I:(e,t)=>{const i=e.getHours()%12;return 0===i?"12":qr(i,2,t??"0")},j:(e,t)=>qr(Wr(e)+1,3,t??"0"),m:(e,t)=>qr(e.getMonth()+1,2,t??"0"),M:(e,t)=>qr(e.getMinutes(),2,t??"0"),L:(e,t)=>qr(e.getMilliseconds(),3,t??"0"),p:e=>e.getHours()<12?"AM":"PM",Q:e=>String(e.getTime()),s:e=>String(Math.floor(e.getTime()/1e3)),S:(e,t)=>qr(e.getSeconds(),2,t??"0"),u:e=>{let t=e.getDay();return t<1&&(t+=7),String(t%7)},U:(e,t)=>qr(jr(e,0),2,t??"0"),V:(e,t)=>qr(Kr(e),2,t??"0"),w:(e,t)=>qr(e.getDay(),2,t??"0"),W:(e,t)=>qr(jr(e,1),2,t??"0"),x:"%-m/%-d/%Y",X:"%-I:%M:%S %p",y:(e,t)=>qr(e.getFullYear()%100,2,t??"0"),Y:(e,t)=>qr(e.getFullYear(),4,t??"0"),Z:e=>function(e){const t=e.getTimezoneOffset(),i=Math.abs(t);return`${t>0?"-":"+"}${qr(Math.floor(i/60),2,"0")}${qr(Math.floor(i%60),2,"0")}`}(e),"%":()=>"%"},Yr={_:" ",0:"0","-":""};function qr(e,t,i){const n=String(Math.floor(e));return n.length>=t?n:`${i.repeat(t-n.length)}${n}`}function Xr(e){const t=[];for(;e.length>0;){let i=e.indexOf("%");if(0!==i){const n=i>0?e.substring(0,i):e;t.push(n)}if(i<0)break;const n=e[i+1],s=Yr[n];null!=s&&i++;const r=e[i+1],o=$r[r];if("function"==typeof o)t.push([o,s]);else if("string"==typeof o){const e=Xr(o);t.push([e,s])}else t.push(`${s??""}${r}`);e=e.substring(i+2)}return e=>{const i="number"==typeof e?new Date(e):e;return t.map(e=>"string"==typeof e?e:e[0](i,e[1])).join("")}}function Zr(e){return e instanceof Date?e.getTime():e}function Qr(e,t,i){const n=Xr(Jr(e,t,i));return e=>n(e)}function Jr(e,t,i=0){let n=1/0;for(let t=1;t<e.length;t++)n=Math.min(n,Math.abs(e[t].valueOf()-e[t-1].valueOf()));const[s,r]=0===t.length?[0,0]:or([t[0].valueOf(),t[t.length-1].valueOf()]),o=new Date(s).getFullYear(),a=new Date(r).getFullYear()-o>0,l=isFinite(n)?function(e,t){return e<ur?0:e<pr?1:e<gr?2:e<fr?3:e<mr?4:e<24192e5||e<26784e5&&function(e){let t=new Date(e[0]).getMonth();for(let i=1;i<e.length;i++){const n=new Date(e[i]).getMonth();if(t===n)return!0;t=n}return!1}(t)?5:e<yr?6:7}(n,e):(c=e[0],Mr.floor(c)<c?0:Tr.floor(c)<c?1:Ir.floor(c)<c?2:wr.floor(c)<c?3:Sr.floor(c)<c?Lr.floor(c)<c?4:5:br.floor(c)<c?6:7);var c;return function(e,t,i){const n=Zr(i[0]),s=Zr(i.at(-1)),r=Math.abs(s-n),o=[["hour",216e5,12096e5,3,"%I %p"],["hour",pr,216e5,3,"%I:%M"],["second",1e3,216e5,1,":%S"],["ms",0,216e5,0,".%L"],["am/pm",pr,216e5,3,"%p"]," ",["day",fr,mr,4,"%a"],["month",0===r?0:mr,314496e5,5,"%b %d"],["month",3024e6,31536e7,6,"%B"]," ",["year",t||7===e?0:yr,1/0,7,"%Y"]].filter(t=>{if("string"==typeof t)return!0;const[i,n,s,o]=t;return o>=e&&n<=r&&r<s}).reduce((e,t)=>("string"==typeof t?e.result.push(t):e.used.has(t[0])||(e.result.push(t),e.used.add(t[0])),e),{result:[],used:new Set}).result,a=o.findIndex(e=>"string"!=typeof e),l=o.findLastIndex(e=>"string"!=typeof e);return o.slice(a,l+1).map(e=>"string"==typeof e?e:e[4]).join("").replaceAll(/\s+/g," ").trim()}(Math.max(l-i,0),a,e)}var eo=class e extends ve{constructor(){super(...arguments),this.invalid=!0,this.range=[0,1],this.round=!1,this._bandwidth=1,this._step=1,this._inset=1,this._rawBandwidth=1,this._paddingInner=0,this._paddingOuter=0}static is(t){return t instanceof e}get bandwidth(){return this.refresh(),this._bandwidth}get step(){return this.refresh(),this._step}get inset(){return this.refresh(),this._inset}get rawBandwidth(){return this.refresh(),this._rawBandwidth}set padding(e){e=(0,n.qE)(0,e,1),this._paddingInner=e,this._paddingOuter=e}get padding(){return this._paddingInner}set paddingInner(e){this.invalid=!0,this._paddingInner=(0,n.qE)(0,e,1)}get paddingInner(){return this._paddingInner}set paddingOuter(e){this.invalid=!0,this._paddingOuter=(0,n.qE)(0,e,1)}get paddingOuter(){return this._paddingOuter}refresh(){this.invalid&&(this.invalid=!1,this.update(),this.invalid&&n.Vy.warnOnce("Expected update to not invalidate scale"))}convert(e,t){this.refresh();const i=this.findIndex(e);return null==i||i<0||i>=this.bands.length?NaN:this.ordinalRange(i)}invertNearestIndex(e){this.refresh();const t=this.bands.length;if(0===t)return-1;let i=0,n=t-1,s=1/0,r=0;for(;i<=n;){const t=(n+i)/2|0,o=this.ordinalRange(t),a=Math.abs(o-e);if(0===a)return t;a<s&&(s=a,r=t),o<e?i=t+1:n=t-1}return r}update(){const[e,t]=this.range;let{_paddingInner:i}=this;const{_paddingOuter:n,round:s,bands:r}=this,o=r.length;if(0===o)return;const a=t-e;let l;1===o?(i=0,l=a*(1-2*n)):l=a/Math.max(1,o-i+2*n);const c=s?Math.floor(l):l;let h=e+(a-c*(o-i))/2,d=c*(1-i);s&&(h=Math.round(h),d=Math.round(d)),this._step=c,this._inset=h,this._bandwidth=d,this._rawBandwidth=l*(1-i)}ordinalRange(e){const{_inset:t,_step:i,range:s}=this,r=Math.min(s[0],s[1]),o=Math.max(s[0],s[1]);return(0,n.qE)(r,t+i*e,o)}};a([ye],eo.prototype,"range",2),a([ye],eo.prototype,"round",2);var to=eo,io=class e extends to{static is(t){return t instanceof e}toDomain(e){return new Date(e)}convert(e,t){const{domain:i,bands:s}=this;if(i.length<=0)return NaN;const r=this.ordinalRange(0),o=this.ordinalRange(s.length-1),a=t?.interpolate??!1,l=i[0].valueOf()>i[i.length-1].valueOf();if(!a){const i=super.convert(e,t);return l?o-(i-r):i}if(0===s.length)return r;const c=e.valueOf();let h;h=l?((0,n.S3)(0,i.length-1,e=>i[e].valueOf()<=c)??i.length)-1:(0,n.I5)(0,i.length-1,e=>i[e].valueOf()<=c)??0,h=Math.min(Math.max(h,0),i.length-2);const d=i[h].valueOf(),u=i[h+1].valueOf();return(h+(c-d)/(u-d))/(i.length-1)*(o-r)+r}invert(e,t=!1){this.refresh();const{domain:i,bands:s}=this,r=i[0].valueOf()>i[i.length-1].valueOf();let o;return o=t?this.invertNearestIndex(e-this.bandwidth/2):(0,n.S3)(0,s.length-1,t=>this.ordinalRange(t)>=e)??0,s[r?s.length-1-o:o]}tickFormatter({domain:e,ticks:t,specifier:i},n){return null!=i?Xr(i):Qr(t,e,n)}},no={bottomCenter:function(e){return{x:(e.x1+e.x2)/2,y:Math.max(e.y1,e.y2)}},center:function(e){return{x:(e.x1+e.x2)/2,y:(e.y1+e.y2)/2}},clone:function(e){return{x1:e.x1,y1:e.y1,x2:e.x2,y2:e.y2}},collides:function(e,t){const i=so(e),n=so(t);return i.x1<=n.x2&&i.x2>=n.x1&&i.y1<=n.y2&&i.y2>=n.y1},end:function(e){return{x:e.x2,y:e.y2}},from:function(e,t,i,n){if("number"==typeof e)return{x1:e,y1:t,x2:i,y2:n};if("width"in e)return so({x1:e.x,y1:e.y,x2:e.x+e.width,y2:e.y+e.height});throw new Error(`Values can not be converted into a vector4: [${JSON.stringify(e)}] [${t}] [${i}] [${n}]`)},height:function(e){return Math.abs(e.y2-e.y1)},round:function(e){return{x1:Math.round(e.x1),y1:Math.round(e.y1),x2:Math.round(e.x2),y2:Math.round(e.y2)}},start:function(e){return{x:e.x1,y:e.y1}},topCenter:function(e){return{x:(e.x1+e.x2)/2,y:Math.min(e.y1,e.y2)}},origin:function(){return{x1:0,y1:0,x2:0,y2:0}},width:function(e){return Math.abs(e.x2-e.x1)}};function so(e){return{x1:Math.min(e.x1,e.x2),x2:Math.max(e.x1,e.x2),y1:Math.min(e.y1,e.y2),y2:Math.max(e.y1,e.y2)}}function ro(e,t,i,n,s){return t+(s-e)/(i-e)*(n-t)}function oo(e,t,i,n,s){return e+(i-e)/(n-t)*(s-t)}function ao(e,t,i){return[oo(e,i.min,t,i.max,0),oo(e,i.min,t,i.max,1)]}function lo(e,t,i,s,r,o){if(i<=r&&o<=s)return i;const a=r-i,l=o-s,c=Math.abs(a)<Math.abs(l)?a:l;return(0,n.qE)(e,i+c,t)}var co=["rangeX","rangeY","ratioX","ratioY","autoScaledAxes"],ho=class{constructor(){this.enabled=!1,this.padding=0,this.manuallyAdjusted=!1}},uo=e=>(0,n.W$)((t,{options:i})=>!cr.is(e?.scale)&&!io.is(e?.scale)||null==t||null==i.end||t<=i.end,"to be less than end"),po=class extends Ji{constructor(e,t){super(),this.fireChartEvent=e,this.mementoOriginatorKey="zoom",this.axisZoomManagers=new Map,this.state=new wn(void 0,"initial"),this.axes=[],this.didLayoutAxes=!1,this.autoScaleYAxis=new ho,this.lastRestoredState=void 0,this.independentAxes=!1,this.navigatorModule=!1,this.zoomModule=!1,this.pendingMemento=void 0,this.destroyFns.push(t.addListener("layout:complete",()=>{const{pendingMemento:e}=this,t=!this.didLayoutAxes;this.didLayoutAxes=!0,e?this.restoreMemento(e.version,e.mementoVersion,e.memento):t&&this.autoScaleYZoom("zoom-manager")}))}createMemento(){return this.getMementoRanges()}guardMemento(e,t){if(null==e)return!0;if(!(0,n.Gv)(e))return!1;for(const t of Object.keys(e))if(!co.includes(t))return!1;const i=this.getPrimaryAxis("x"),s=this.getPrimaryAxis("y"),r={rangeX:{start:(0,n.Uo)((0,n.or)(n.ai,n.p6),uo(i)),end:(0,n.or)(n.ai,n.p6)},rangeY:{start:(0,n.Uo)((0,n.or)(n.ai,n.p6),uo(s)),end:(0,n.or)(n.ai,n.p6)},ratioX:{start:(0,n.Uo)(n.CG,(0,n.Xe)("end")),end:n.CG},ratioY:{start:(0,n.Uo)(n.CG,(0,n.Xe)("end")),end:n.CG},autoScaledAxes:(0,n.jk)((0,n.KC)("y"))},{invalid:o}=(0,n.tf)(e,r);return!(o.length>0&&(t.push(...o.map(String)),1))}restoreMemento(e,t,i){const{independentAxes:n}=this;if(!this.axes||!this.didLayoutAxes)return void(this.pendingMemento={version:e,mementoVersion:t,memento:i});this.pendingMemento=void 0;const s=this.getDefinedZoom();if(s.x=i?.rangeX?this.rangeToRatio(i.rangeX,"x")??{min:0,max:1}:i?.ratioX?{min:i.ratioX.start??0,max:i.ratioX.end??1}:{min:0,max:1},!this.navigatorModule||this.zoomModule){let e=i?.autoScaledAxes?.includes("y");i?.rangeY?(s.y=this.rangeToRatio(i.rangeY,"y")??{min:0,max:1},e??(e=!1)):i?.ratioY?(s.y={min:i.ratioY.start??0,max:i.ratioY.end??1},e??(e=!1)):(s.y={min:0,max:1},e??(e=!0)),s.autoScaleYAxis=e}if(this.lastRestoredState=s,!0!==n)return void this.updateZoom("zoom-manager",s);const r=this.getPrimaryAxis("x"),o=this.getPrimaryAxis("y");for(const e of[r,o])e&&this.updateAxisZoom("zoom-manager",e.id,s[e.direction])}updateAxes(e){this.axes=e;const t=new Map(e.map(e=>[e.id,this.axisZoomManagers.get(e.id)]));this.axisZoomManagers.clear();for(const i of e)this.axisZoomManagers.set(i.id,t.get(i.id)??new go(i));this.state.size>0&&e.length>0&&this.updateZoom(this.state.stateId(),this.state.stateValue())}setIndependentAxes(e=!0){this.independentAxes=e}setAutoScaleYAxis(e,t){this.autoScaleYAxis.enabled=e,this.autoScaleYAxis.padding=t}setNavigatorEnabled(e=!0){this.navigatorModule=e}setZoomModuleEnabled(e=!0){this.zoomModule=e}isNavigatorEnabled(){return this.navigatorModule}isZoomEnabled(){return this.zoomModule}updateZoom(e,t){if(t?.x&&(t.x.min<0||t.x.max>1)&&(n.Vy.warnOnce(`Attempted to update x-axis zoom to an invalid ratio of [{ min: ${t.x.min}, max: ${t.x.max} }], expecting a ratio of 0 to 1, ignoring.`),t.x=void 0),t?.y&&(t.y.min<0||t.y.max>1)&&(n.Vy.warnOnce(`Attempted to update y-axis zoom to an invalid ratio of [{ min: ${t.y.min}, max: ${t.y.max} }], expecting a ratio of 0 to 1, ignoring.`),t.y=void 0),0===this.axisZoomManagers.size){const i=this.state.stateId();return void("initial"!==i&&i!==e||this.state.set(e,t))}this.state.set(e,t);const i=t?.autoScaleYAxis;null!=i&&(this.autoScaleYAxis.manuallyAdjusted=!i),this.axisZoomManagers.forEach(i=>{i.updateZoom(e,t?.[i.getDirection()])}),this.applyChanges(e)}updateAxisZoom(e,t,i){this.axisZoomManagers.get(t)?.updateZoom(e,i),this.applyChanges(e)}resetZoom(e){this.autoScaleYAxis.manuallyAdjusted=!1;const t=this.getRestoredZoom();this.updateZoom(e,{x:{min:t?.x?.min??0,max:t?.x?.max??1},y:{min:t?.y?.min??0,max:t?.y?.max??1},autoScaleYAxis:t?.autoScaleYAxis??!0})}resetAxisZoom(e,t){const i=this.axisZoomManagers.get(t),n=i?.getDirection();if(null==n)return;const s=this.getRestoredZoom();if("y"===n){const e=s?.autoScaleYAxis??!0;this.autoScaleYAxis.manuallyAdjusted=!e}for(const t of this.axes)t.direction===n&&this.updateAxisZoom(e,t.id,s?.[n]??{min:0,max:1})}setAxisManuallyAdjusted(e,t){const i=this.axisZoomManagers.get(t)?.getDirection();"y"===i&&(this.autoScaleYAxis.manuallyAdjusted=!0)}updatePrimaryAxisZoom(e,t,i){const n=this.getPrimaryAxis(t);n&&this.updateAxisZoom(e,n.id,i)}panToBBox(e,t,i){if(!this.isZoomEnabled()&&!this.isNavigatorEnabled())return!1;const s=this.getZoom();if(void 0===s||!s.x&&!s.y)return!1;if(!(t.width>0&&t.height>0&&Math.abs(i.width)<=Math.abs(t.width)&&Math.abs(i.height)<=Math.abs(t.height)))return n.Vy.warnOnce("cannot pan to target BBox - chart too small?"),!1;const r=function(e,t,i){const{x:s={min:0,max:1},y:r={min:0,max:1}}=t,o=no.from(i),a=no.from(e),l=function(e,t,i){const[n,s]=ao(e.x1,e.x2,t),[r,o]=ao(e.y1,e.y2,i);return{x1:n,x2:s,y1:r,y2:o}}(a,s,r),c=lo(l.x1,l.x2,a.x1,a.x2,o.x1,o.x2),h=lo(l.y1,l.y2,a.y1,a.y2,o.y1,o.y2),d={x:{min:ro(a.x1,s.min,a.x2,s.max,c),max:ro(a.x1,s.min,a.x2,s.max,c+e.width)},y:{min:ro(a.y1,r.min,a.y2,r.max,h),max:ro(a.y1,r.min,a.y2,r.max,h+e.height)}},u=d.x.max-d.x.min,p=d.y.max-d.y.min;return d.x.min=(0,n.qE)(0,d.x.min,1-u),d.x.max=d.x.min+u,d.y.min=(0,n.qE)(0,d.y.min,1-p),d.y.max=d.y.min+p,d}(t,s,i);return this.independentAxes?(this.updatePrimaryAxisZoom(e,"x",r.x),this.updatePrimaryAxisZoom(e,"y",r.y)):this.updateZoom(e,r),!0}fireZoomPanStartEvent(e){this.listeners.dispatch("zoom-pan-start",{type:"zoom-pan-start",callerId:e})}extendToEnd(e,t,i){return this.extendWith(e,t,e=>Number(e)-i)}extendWith(e,t,i){const n=this.getPrimaryAxis(t);if(!n)return;const s=this.getDomainExtents(n);if(!s)return;const[,r]=s,o=i(r),a=this.rangeToRatio({start:o,end:r},t);a&&this.updateZoom(e,{[t]:a})}updateWith(e,t,i){const n=this.getPrimaryAxis(t);if(!n)return;const s=this.getDomainExtents(n);if(!s)return;let[r,o]=s;[r,o]=i(r,o);const a=this.rangeToRatio({start:r,end:o},t);a&&this.updateZoom(e,{[t]:a})}getZoom(){let e,t;if(this.axisZoomManagers.forEach(i=>{"x"===i.getDirection()?e??(e=i.getZoom()):"y"===i.getDirection()&&(t??(t=i.getZoom()))}),e||t)return{x:e,y:t}}getAxisZoom(e){return this.axisZoomManagers.get(e)?.getZoom()??{min:0,max:1}}getAxisZooms(){const e={};for(const[t,i]of this.axisZoomManagers.entries())e[t]={direction:i.getDirection(),zoom:i.getZoom()};return e}getRestoredZoom(){return this.lastRestoredState}getPrimaryAxisId(e){return this.getPrimaryAxis(e)?.id}isVisibleItemsCountAtLeast(e,t){const i=this.getPrimaryAxis("x"),n=this.getPrimaryAxis("y"),s=new Set;let r=0;const o=[e.x.min,e.x.max],a=[e.y.min,e.y.max];for(const e of i?.boundSeries??[]){s.add(e.id);const i=t-(r??0);if(r+=e.getVisibleItems(o,a,i),r>=t)return!0}for(const e of n?.boundSeries??[]){if(s.has(e.id))continue;const i=t-(r??0);if(r+=e.getVisibleItems(o,a,i),r>=t)return!0}return 0===s.size}getMementoRanges(){const e=this.getDefinedZoom();let t;return this.autoScaleYAxis.enabled&&(t=this.autoScaleYAxis.manuallyAdjusted?[]:["y"]),{rangeX:this.getRangeDirection(e.x,"x"),rangeY:this.getRangeDirection(e.y,"y"),ratioX:{start:e.x.min,end:e.x.max},ratioY:{start:e.y.min,end:e.y.max},autoScaledAxes:t}}autoScaleYZoom(e,t=!0){if(!this.isZoomEnabled())return;const{independentAxes:i,autoScaleYAxis:n}=this,s=this.getZoom();if(null==s?.x||!n.enabled||n.manuallyAdjusted)return;const{padding:r}=n;let o;if(o=0===s.x?.min&&1===s.x?.max?{min:0,max:1}:i?this.primaryAxisZoom("y",s.x,{padding:r}):this.combinedAxisZoom("y",s.x,{padding:r}),null!=o){if(i){const e=this.getPrimaryAxis("y"),t=null==e?void 0:this.axisZoomManagers.get(e.id);t?.updateZoom("zoom-manager",o)}else for(const e of this.axisZoomManagers.values())"y"===e.getDirection()&&e.updateZoom("zoom-manager",o);t&&this.applyChanges(e)}}applyChanges(e){if(this.autoScaleYZoom(e,!1),!Array.from(this.axisZoomManagers.values(),e=>e.applyChanges()).includes(!0))return;const t={};for(const[e,i]of this.axisZoomManagers.entries())t[e]=i.getZoom();this.listeners.dispatch("zoom-change",{type:"zoom-change",...this.getZoom(),axes:t,callerId:e}),this.fireChartEvent({type:"zoom",...this.getMementoRanges()})}getRangeDirection(e,t){const i=this.getPrimaryAxis(t);if(!i||!cr.is(i.scale)&&!io.is(i.scale))return;const n=this.getDomainPixelExtents(i);if(!n)return;const[s,r]=n;let o,a;return s<=r?(o=i.scale.invert(0),a=i.scale.invert(s+(r-s)*e.max)):(o=i.scale.invert(s-(s-r)*e.min),a=i.scale.invert(0)),{start:o,end:a}}rangeToRatio(e,t){const i=this.getPrimaryAxis(t);if(!i)return;const s=this.getDomainPixelExtents(i);if(!s)return;const[r,o]=s;let a=null==e.start?r:i.scale.convert?.(e.start),l=null==e.end?o:i.scale.convert?.(e.end);if(!(0,n.Bf)(a)||!(0,n.Bf)(l))return;const[c,h]=[Math.min(r,o),Math.max(r,o)];if(a<c||a>h)return void n.Vy.warnOnce(`Invalid range start [${e.start}], expecting a value between [${i.scale.invert?.(r)}] and [${i.scale.invert?.(o)}], ignoring.`);if(l<c||l>h)return void n.Vy.warnOnce(`Invalid range end [${e.end}], expecting a value between [${i.scale.invert?.(r)}] and [${i.scale.invert?.(o)}], ignoring.`);a=Math.min(h,Math.max(c,a)),l=Math.min(h,Math.max(c,l));const d=o-r;return{min:Math.abs((a-r)/d),max:Math.abs((l-r)/d)}}getPrimaryAxis(e){return this.axes?.find(t=>t.direction===e)}getDomainExtents(e){const{domain:t}=e.scale,i=t.at(0),n=t.at(-1);if(null!=i&&null!=n)return[i,n]}getDomainPixelExtents(e){const{domain:t}=e.scale,i=e.scale.convert?.(t.at(0)),s=e.scale.convert?.(t.at(-1));if((0,n.Bf)(i)&&(0,n.Bf)(s))return[i,s]}getDefinedZoom(){const e=this.getZoom();return{x:{min:e?.x?.min??0,max:e?.x?.max??1},y:{min:e?.y?.min??0,max:e?.y?.max??1}}}zoomBounds(e,t,i,s){const r=e.scale,o=r.range;r.range=[0,1];const a=t.scale,l=a.range;a.range=[0,1];let c=1,h=!1,d=0,u=!1;for(const e of t.boundSeries){const{connectsToYAxis:t}=e,n=e.getRange("y",[i.min,i.max]);for(const e of n){const i=a.convert(e);Number.isFinite(i)&&(i<c&&(c=i,h=!t||e<0),i>d&&(d=i,u=!t||e>0))}}if((0,n.Bf)(t.min)&&(c=0),(0,n.Bf)(t.max)&&(d=1),r.range=o,a.range=l,c>=d)return;const p=(h?s:0)+(u?s:0),g=Math.min((d-c)*(1+p),1);if(!(g<=0)){if(h&&u){const e=(d+c)/2;c=e-g/2,d=e+g/2}else!h&&u?d=c+g:h&&!u&&(c=d-g);return c<0?(d+=-c,c=0):d>1&&(c-=d-1,d=1),{min:c,max:d}}}primaryAxisZoom(e,t,{padding:i=0}={}){const n="x"===e?"y":"x",s=this.getPrimaryAxis(n),r=this.getPrimaryAxis(e);if(null!=s&&null!=r)return this.zoomBounds(s,r,t,i)}combinedAxisZoom(e,t,{padding:i=0}={}){const n="x"===e?"y":"x",s=new Map;for(const e of this.axes)if(e.direction===n)for(const t of e.boundSeries)s.set(t,e);let r=1,o=0;for(const n of this.axes)if(n.direction===e)for(const e of n.boundSeries){const a=s.get(e);if(null==a)continue;const l=this.zoomBounds(a,n,t,i);if(null==l)return;r=Math.min(r,l.min),o=Math.max(o,l.max)}if(r<1e-6&&(r=0),o>.999999&&(o=1),!(r>o))return{min:r,max:o}}},go=class{constructor(e){this.axis=e;const[t=0,i=1]=e.visibleRange;this.state=new wn({min:t,max:i}),this.currentZoom=this.state.stateValue()}getDirection(){return this.axis.direction}updateZoom(e,t){this.state.set(e,t)}getZoom(){return Vt(this.state.stateValue())}hasChanges(){const e=this.currentZoom,t=this.state.stateValue();return e.min!==t.min||e.max!==t.max}applyChanges(){const e=this.hasChanges();return this.currentZoom=this.state.stateValue(),e}};function fo(e,t,i,n,s,r){if(0===e.size)return!1;let o=e.x,a=e.y;null!=t&&(o-=(t.x-.5)*e.size,a-=(t.y-.5)*e.size);let l=o;o<i?l=i:o>i+s&&(l=i+s);let c=a;a<n?c=n:a>n+r&&(c=n+r);const h=o-l,d=a-c;return Math.sqrt(h*h+d*d)<=.5*e.size}function mo(e,t,i,n,s){const r=e.x+e.width>t&&e.x<t+n,o=e.y+e.height>i&&e.y<i+s;return r&&o}function vo(e,t,i,n,s){return t+n<e.x+e.width&&t>e.x&&i>e.y&&i+s<e.y+e.height}function yo(e){return null!=e&&"object"==typeof e.point&&"object"==typeof e.label}var Co={top:{x:0,y:-1},bottom:{x:0,y:1},left:{x:-1,y:0},right:{x:1,y:0},"top-left":{x:-1,y:-1},"top-right":{x:1,y:-1},"bottom-left":{x:-1,y:1},"bottom-right":{x:1,y:1}};function bo(e,t=0){const i=[];for(let n=0;n<e.length;n++){const s=e[n],{point:{x:r,y:o},label:{text:a}}=s;let{width:l,height:c}=s.label;if(l+=t,c+=t,i.some(e=>mo(e,r,o,l,c)))return!0;i.push({index:n,text:a,x:r,y:o,width:l,height:c,datum:s})}return!1}var So=class{constructor(){this.labelData=new Map}updateLabels(e,t,i=m.zero){const n={x:-t.left,y:-t.top,width:i.width+t.left+t.right,height:i.height+t.top+t.bottom},s=new Set(e.map(e=>e.id));for(const e of this.labelData.keys())s.has(e)||this.labelData.delete(e);for(const t of e){const e=t.getLabelData();e.every(yo)&&this.labelData.set(t.id,e)}const r=function(e,t,i=5){const n=new Map,s=[],r=new Map([...e.entries()].map(([e,t])=>[e,t.toSorted((e,t)=>t.point.size-e.point.size)])),o=[...r.values()].flat();for(const[e,a]of r.entries()){const r=[];if(a[0]?.label){for(let e=0,n=a.length;e<n;e++){const n=a[e],{point:l,label:c,anchor:h}=n,{text:d,width:u,height:p}=c,g=.5*l.size;let f=0,m=0;if(g>0&&null!=n.placement){const e=Co[n.placement];f=(.5*u+g+i)*e.x,m=(.5*p+g+i)*e.y}const v=l.x-.5*u+f-((h?.x??.5)-.5)*l.size,y=l.y-.5*p+m-((h?.y??.5)-.5)*l.size;if(t&&!vo(t,v,y,u,p))continue;if(o.some(e=>fo(e.point,e.anchor,v,y,u,p)))continue;if(s.some(e=>mo(e,v,y,u,p)))continue;const C={index:e,text:d,x:v,y,width:u,height:p,datum:n};r.push(C),s.push(C)}n.set(e,r)}}return n}(this.labelData,n,5);for(const t of e)t.updatePlacedLabelData?.(r.get(t.id)??[])}},wo=class extends Ji{constructor(){super(...arguments),this.mementoOriginatorKey="legend",this.legendDataMap=new Map}createMemento(){return this.getData().filter(({hideInLegend:e,isFixed:t})=>!e&&!t).map(({enabled:e,seriesId:t,itemId:i,legendItemName:n})=>({visible:e,seriesId:t,itemId:i,legendItemName:n}))}guardMemento(e){return null==e||(0,n.cy)(e)}restoreMemento(e,t,i){i?.forEach(e=>{const{seriesId:t,data:i}=this.getRestoredData(e)??{};t&&i&&this.updateData(t,i)}),this.update()}getRestoredData(e){const{seriesId:t,itemId:i,legendItemName:n,visible:s}=e;if(t){const e=(this.legendDataMap.get(t)??[]).map(e=>{const n=e.seriesId===t&&(!i||e.itemId===i);return n&&e.isFixed&&this.warnFixed(e.seriesId,e.itemId),!e.isFixed&&n?{...e,enabled:s}:e});return{seriesId:t,data:e}}if(null!=i||null!=n)for(const e of this.getData()){if(null!=i&&e.itemId!==i||null!=n&&e.legendItemName!==n)continue;if(e.isFixed)return void this.warnFixed(e.seriesId,i);const t=(this.legendDataMap.get(e.seriesId)??[]).map(e=>e.itemId===i||e.legendItemName===n?{...e,enabled:s}:e);return{seriesId:e.seriesId,data:t}}}warnFixed(e,t){n.Vy.warnOnce(`The legend item with seriesId [${e}] and itemId [${t}] is not configurable, this series item cannot be toggled through the legend.`)}update(e){this.listeners.dispatch("legend-change",{type:"legend-change",legendData:e??this.getData()})}updateData(e,t=[]){this.legendDataMap.set(e,t)}clearData(){this.legendDataMap.clear()}toggleItem(e,t,i,n){if(n)return void this.getData().forEach(t=>{const i=(this.legendDataMap.get(t.seriesId)??[]).map(t=>t.legendItemName===n?{...t,enabled:e}:t);this.updateData(t.seriesId,i)});const s=this.getData(t),r=1===s.length,o=s.map(t=>null==i&&r||t.itemId===i?{...t,enabled:e}:t);this.updateData(t,o)}getData(e){return e?this.legendDataMap.get(e)??[]:[...this.legendDataMap].reduce((e,[t,i])=>e.concat(i),[])}getDatum({seriesId:e,itemId:t}={}){return this.getData(e).find(e=>e.itemId===t)}getSeriesEnabled(e){const t=this.getData(e);if(t.length>0)return t.some(e=>e.enabled)}getItemEnabled({seriesId:e,itemId:t}={}){return this.getDatum({seriesId:e,itemId:t})?.enabled??!0}},xo=class{constructor(){this.groups={}}registerSeries({internalId:e,seriesGrouping:t,visible:i,type:n}){var s;t&&((s=this.groups)[n]??(s[n]={}),this.groups[n][e]={grouping:t,visible:i})}updateSeries({internalId:e,seriesGrouping:t,visible:i,type:n}){if(!t)return;const s=this.groups[n]?.[e];s&&(s.grouping=t,s.visible=i)}deregisterSeries({internalId:e,type:t}){this.groups[t]&&delete this.groups[t][e],this.groups[t]&&0===Object.keys(this.groups[t]).length&&delete this.groups[t]}getVisiblePeerGroupIndex({type:e,seriesGrouping:t,visible:i}){if(!t)return{visibleGroupCount:i?1:0,visibleSameStackCount:i?1:0,index:0};const n=new Set,s=new Set;for(const i of Object.values(this.groups[e]??{}))i.visible&&(n.add(i.grouping.groupIndex),i.grouping.groupIndex===t.groupIndex&&s.add(i.grouping.stackIndex));const r=Array.from(n);return r.sort((e,t)=>e-t),{visibleGroupCount:r.length,visibleSameStackCount:s.size,index:r.indexOf(t.groupIndex)}}},Eo=class{constructor(e){this.updateCallback=e,this.events=new n.bk}addListener(e,t){return this.events.on(e,t)}removeListener(e,t){return this.events.on(e,t)}destroy(){this.events.clear()}update(e=0,t){this.updateCallback(e,t)}dispatchUpdateComplete(e){this.events.emit("update-complete",{type:"update-complete",apiUpdate:e})}dispatchPreDomUpdate(){this.events.emit("pre-dom-update",{type:"pre-dom-update"})}dispatchPreSceneRender(){this.events.emit("pre-scene-render",{type:"pre-scene-render"})}dispatchProcessData({series:e}){this.events.emit("process-data",{type:"process-data",series:e})}},Mo=class{constructor(e,t){this.callbackCache=new gs,this.chartEventManager=new zs,this.highlightManager=new $s,this.layoutManager=new Hi,this.localeManager=new Qn,this.seriesStateManager=new xo,this.stateManager=new Zi,this.seriesLabelLayoutManager=new So,this.destroyFns=[],this.contextModules=[];const{scene:i,root:n,syncManager:s,container:r,fireEvent:o,updateCallback:a,updateMutex:l,styleContainer:h,chartType:d,domMode:u}=t;this.chartService=e,this.syncManager=s,this.domManager=new In(this.chartService,r,h,u),this.widgets=new sr(this.domManager);const p=this.domManager.addChild("canvas","scene-canvas",i?.canvas.element);this.scene=i??new ds({canvasElement:p}),this.scene.setRoot(n),this.destroyFns.push(this.scene.on("scene-changed",()=>{this.updateService.update(7)})),this.axisManager=new vs(n),this.legendManager=new wo,this.annotationManager=new fs(e.annotationRoot,o),this.chartTypeOriginator=new ji(e),this.interactionManager=new Vs,this.contextMenuRegistry=new Ks,this.updateService=new Eo(a),this.proxyInteractionService=new Yn(this.localeManager,this.domManager),this.fontManager=new bs(this.domManager,this.updateService),this.historyManager=new qi(this.chartEventManager),this.animationManager=new Hs(this.interactionManager,l),this.dataService=new Cs(this.animationManager),this.tooltipManager=new Js(this.localeManager,this.domManager,e.tooltip),this.zoomManager=new po(o,this.layoutManager);for(const e of c.byType("context")){if(!e.chartTypes.includes(d))continue;const t=e.moduleFactory(this);this.contextModules.push(t),this[e.contextKey]=t}}destroy(){this.animationManager.destroy(),this.highlightManager.destroy(),this.axisManager.destroy(),this.callbackCache.invalidateCache(),this.chartEventManager.destroy(),this.domManager.destroy(),this.fontManager.destroy(),this.highlightManager.destroy(),this.proxyInteractionService.destroy(),this.syncManager.destroy(),this.tooltipManager.destroy(),this.zoomManager.destroy(),this.widgets.destroy(),this.contextModules.forEach(e=>e.destroy()),this.destroyFns.forEach(e=>e())}},Ao=class extends De{constructor(){super(...arguments),this.range="tooltip"}};function To(e,t){if(e.size!==t.size)return!1;for(const i of e)if(!t.has(i))return!1;return!0}function Do(e,t){if(null==e||null==t)return e===t;if(e.size!==t.size)return!1;for(const[i,n]of e){const e=t.get(i);if(null==e)return!1;if(!To(n,e))return!1}return!0}function Io(e,t,i,s){return t===e.data&&(0,n.r1)(i,e.ids)&&function(e,t){const{props:i,...s}=e,{props:r,...o}=t;return k(s,o)&&function(e,t){if(e.length!==t.length)return!1;for(let i=0;i<e.length;i+=1){const{type:s,idsMap:r,scopes:o,data:a,...l}=e[i],{type:c,idsMap:h,scopes:d,data:u,...p}=t[i];if(s!==c)return!1;if(o&&d&&!(0,n.r1)(o,d))return!1;if(a&&u&&a!==u)return!1;if(!k(l,p)||!Do(r,h))return!1}return!0}(i,r)}(s,e.opts)}a([Te],Ao.prototype,"range",2);var Ro=class e{constructor(){this.domain=new Set}static is(t){return t instanceof e}extend(e){this.domain.add(e)}getDomain(){return Array.from(this.domain)}},Lo=class e{constructor(){this.domain=[1/0,-1/0]}static is(t){return t instanceof e}static extendDomain(e,t=[1/0,-1/0]){for(const i of e)"number"==typeof i&&(t[0]>i&&(t[0]=i),t[1]<i&&(t[1]=i));return t}extend(e){this.domain[0]>e&&(this.domain[0]=e),this.domain[1]<e&&(this.domain[1]=e)}getDomain(){return[...this.domain]}},ko=class{constructor(e){const t=e.reduce((e,t)=>Math.max(e,t.length),0);let i=1<<32-Math.clz32(t);t===i/2&&(i>>>=1),this.maxLevelSize=i;const n=new Float64Array(2*(2*i-1)).fill(NaN);for(const t of e)for(let e=0;e<t.length;e+=1){const s=Number(t[e]),r=i+e-1,o=0+(2*r|0),a=1+(2*r|0),l=n[o],c=n[a];(!Number.isFinite(l)||s<l)&&(n[o]=s),(!Number.isFinite(c)||s>c)&&(n[a]=s)}for(let e=i/2|0;e>=1;e=e/2|0){const t=e-1|0,i=t+e|0;for(let s=0;s<e;s+=1){const e=t+s,r=i+2*s,o=r+1,a=n[0+(2*r|0)],l=n[0+(2*o|0)];n[0+(2*e|0)]=!Number.isFinite(l)||a<l?a:l;const c=n[1+(2*r|0)],h=n[1+(2*o|0)];n[1+(2*e|0)]=!Number.isFinite(h)||c>h?c:h}}this.buffer=n}computeRangeInto(e,t,i,n,s,r,o){const a=s+r-1;if(a<t||s>=i)return o;if(s>=t&&a<i){const t=e[0+(2*n|0)],i=e[1+(2*n|0)];Number.isFinite(t)&&(o[0]=Math.min(o[0],t)),Number.isFinite(i)&&(o[1]=Math.max(o[1],i))}else r>1&&(n=2*n|0,r=r/2|0,this.computeRangeInto(e,t,i,n+1|0,s,r,o),this.computeRangeInto(e,t,i,n+2|0,s+r,r,o));return o}rangeBetween(e,t){if(e>t)return[NaN,NaN];const{maxLevelSize:i,buffer:n}=this,s=[1/0,-1/0];return this.computeRangeInto(n,e,t,0,0,i,s),s}get range(){const{buffer:e}=this;return[e[0],e[1]]}},Po=Symbol("domain-ranges");function No(e){return e.map(e=>(0,n.Gv)(e)?JSON.stringify(e):e).join("-")}function Oo(e){const t=e?.map(Number);return t?.every(Number.isFinite)?t:[]}function _o(e,t){return t?.get(e.id)??0}function Fo(e){return"scopes"in e&&Array.isArray(e.scopes)}function Go(e,t){const i=[];for(let n=0;n<e;n+=1)i[n]=t;return i}function Vo(e,t,i){const n=[];for(const s of e){const e=s.get(t)?.[i];if(null==e)return;n.push(e)}return n}function Bo(e){const t=[];let i,n=0;const s=/((?:(?:^|\.)\s*\w+|\[\s*(?:'(?:[^']|(?<!\\)\\')*'|"(?:[^"]|(?<!\\)\\")*"|-?\d+)\s*\])\s*)/g;for(;i=s.exec(e);){if(i.index!==n)return;n=i.index+i[0].length;const e=i[1].trim();if(e.startsWith("."))t.push(e.slice(1).trim());else if(e.startsWith("[")){const i=e.slice(1,-1).trim();i.startsWith("'")?t.push(i.slice(1,-1).replace(/(?<!\\)\\'/g,"'")):i.startsWith('"')?t.push(i.slice(1,-1).replace(/(?<!\\)\\"/g,'"')):t.push(i)}else t.push(e)}if(n===e.length)return t}function Ho(e){return t=>{let i=t;for(const t of e)i=i[t];return i}}var zo=class{constructor(e,t="standalone",i=!1){this.opts=e,this.mode=t,this.suppressFieldDotNotation=i,this.debug=y.create(!0,"data-model"),this.scopeCache=new Map,this.keys=[],this.values=[],this.aggregates=[],this.groupProcessors=[],this.propertyProcessors=[],this.reducers=[],this.processors=[],this.markScopeDatumInvalid=function(e,t,i,n){for(const s of e)n.has(s)||n.set(s,Go(t.length,!1)),n.get(s)[i]=!0};let n=!0;for(const t of e.props){if("key"===t.type&&!n)throw new Error("AG Charts - internal config error: keys must come before values.");"value"===t.type&&n&&(n=!1)}const s=({matchGroupIds:e=[]})=>{for(const t of e)if(this.values.every(e=>e.groupId!==t))throw new Error(`AG Charts - internal config error: matchGroupIds properties must match defined groups (${t}).`)},r=new Set,o=new Set;for(const t of e.props){const e="key"===t.type?r:o;switch(Fo(t)&&t.scopes?.forEach(t=>e.add(t)),t.type){case"key":this.keys.push({...t,index:this.keys.length,missing:new Map});break;case"value":if(null==t.property)throw new Error(`AG Charts - internal config error: no properties specified for value definitions: ${JSON.stringify(t)}`);this.values.push({...t,index:this.values.length,missing:new Map});break;case"aggregate":s(t),this.aggregates.push({...t,index:this.aggregates.length});break;case"group-value-processor":s(t),this.groupProcessors.push({...t,index:this.groupProcessors.length});break;case"property-value-processor":this.propertyProcessors.push({...t,index:this.propertyProcessors.length});break;case"reducer":this.reducers.push({...t,index:this.reducers.length});break;case"processor":this.processors.push({...t,index:this.processors.length})}}if(this.opts.groupByKeys||null!=this.opts.groupByFn){const e=new Set(o.values());if(r.forEach(t=>e.delete(t)),e.size>0)throw new Error(`AG Charts - scopes missing key for grouping, illegal configuration: ${[...e.values()]}`)}}resolveProcessedDataDefById(e,t){const i=this.scopeCache.get(e.id)?.get(t);if(!i)throw new Error(`AG Charts - didn't find property definition for [${t}, ${e.id}]`);return{index:i.index,def:i}}resolveProcessedDataIndexById(e,t){return this.resolveProcessedDataDefById(e,t).index}resolveKeysById(e,t,i){const n=this.resolveProcessedDataIndexById(e,t),s=i.keys[n];if(null==s)throw new Error(`AG Charts - didn't find keys for [${t}, ${e.id}]`);return s.get(e.id)}hasColumnById(e,t){return null!=this.scopeCache.get(e.id)?.get(t)}resolveColumnById(e,t,i){const n=this.resolveProcessedDataIndexById(e,t),s=i.columns?.[n];if(null==s)throw new Error(`AG Charts - didn't find column for [${t}, ${e.id}]`);return s}*forEachDatum(e,t,i){const n=t.columnScopes.findIndex(t=>t.has(e.id));for(const e of i.datumIndices[n]??[])yield t.columns[n][e]}*forEachGroupDatum(e,t){const i=t.columnScopes.findIndex(t=>t.has(e.id)),n={groupIndex:0,columnIndex:i},s=[];for(const e of t.groups){n.group=e;let t=0;for(const r of e.datumIndices[i]??s)n.datumIndex=r,n.valueIndex=t++,yield n;n.groupIndex++}}*forEachGroupDatumTuple(e,t){const i={columnIndex:t.columnScopes.findIndex(t=>t.has(e.id)),datumIndexes:[void 0,void 0,void 0]};for(const n of this.forEachGroupDatum(e,t))i.group=i.nextGroup,i.groupIndex=i.nextGroupIndex,i.nextGroup=n.group,i.nextGroupIndex=n.groupIndex,i.datumIndexes[0]=i.datumIndexes[1],i.datumIndexes[1]=i.datumIndexes[2],i.datumIndexes[2]=n.datumIndex,null!=i.group&&null!=i.datumIndexes[1]&&(yield i);i.group=i.nextGroup,i.groupIndex=i.nextGroupIndex,i.nextGroup=void 0,i.nextGroupIndex=void 0,i.datumIndexes[0]=i.datumIndexes[1],i.datumIndexes[1]=i.datumIndexes[2],i.datumIndexes[2]=void 0,null!=i.group&&null!=i.datumIndexes[1]&&(yield i)}getDomain(e,t,i,n){const s=this.getDomainsByType(i??"value",n);return s?.[this.resolveProcessedDataIndexById(e,t)]??[]}getDomainBetweenRange(e,t,[i,n],s){const r=t.map(t=>this.resolveProcessedDataIndexById(e,t)),o=r.join(":"),a=s[Po];let l=a.get(o);if(null==l){const e=r.map(e=>s.columns[e]);l=new ko(e),a.set(o,l)}return l.rangeBetween(i,n)}getDomainsByType(e,t){switch(e){case"key":return t.domain.keys;case"value":return t.domain.values;case"aggregate":return t.domain.aggValues;case"group-value-processor":return t.domain.groups;default:return null}}processData(e){const{opts:{groupByKeys:t,groupByFn:i},aggregates:s,groupProcessors:r,reducers:o,processors:a,propertyProcessors:l}=this,c=performance.now();if(t&&0===this.keys.length)return;let h=this.extractData(e);t?h=this.groupData(h):i&&(h=this.groupData(h,i(h))),r.length>0&&"grouped"===h.type&&this.postProcessGroups(h),s.length>0&&"ungrouped"===h.type?this.aggregateUngroupedData(h):s.length>0&&"grouped"===h.type&&this.aggregateGroupedData(h),l.length>0&&this.postProcessProperties(h),o.length>0&&this.reduceData(h),a.length>0&&this.postProcessData(h),this.warnDataMissingProperties(e);const d=performance.now();return h.time=d-c,this.debug.check()&&function(e){const t=(e,t)=>{t.length>0&&(n.Vy.log(`DataModel.processData() - ${e}`),n.Vy.table(t))};n.Vy.log("DataModel.processData() - processedData",e),t("Key Domains",e.domain.keys),t("Group Domains",e.domain.groups??[]),t("Value Domains",e.domain.values),t("Aggregate Domains",e.domain.aggValues??[])}(h),this.processScopeCache(),h}warnDataMissingProperties(e){if(0!==e.size)for(const t of(0,n.nl)(this.keys,this.values))for(const[i,s]of t.missing){if(s<(e.get(i)?.length??1/0))continue;const r=null==i?"":` for ${i}`;n.Vy.warnOnce(`the key '${t.property}' was not found in any data element${r}.`)}}processScopeCache(){this.scopeCache.clear();for(const e of(0,n.nl)(this.keys,this.values,this.aggregates))if(e.idsMap)for(const[t,i]of e.idsMap)for(const n of i)if(this.scopeCache.has(t)){if(this.scopeCache.get(t)?.has(n))throw new Error("duplicate definition ids on the same scope are not allowed.");this.scopeCache.get(t).set(n,e)}else this.scopeCache.set(t,new Map([[n,e]]))}valueGroupIdxLookup({matchGroupIds:e}){const t=[];for(const[i,n]of this.values.entries())(!e||n.groupId&&e.includes(n.groupId))&&t.push(i);return t}valueIdxLookup(e,t){const i=null==e||0===e.length,n="string"==typeof t?t:t.id,s=this.values.reduce((t,s,r)=>((null==s.scopes||i&&!s.scopes.length||s.scopes.some(t=>e?.includes(t)))&&(s.property===n||s.id===n||(t=>{if(t.idsMap)for(const[i,s]of t.idsMap)if(e?.includes(i)&&s.has(n))return!0;return!1})(s))&&t.push(r),t),[]);if(0===s.length)throw new Error(`AG Charts - configuration error, unknown property ${JSON.stringify(t)} in scope(s) ${JSON.stringify(e)}`);return s}extractData(e){const{dataDomain:t,processValue:i,allScopesHaveSameDefs:n}=this.initDataDomainProcessor(),{keys:s,values:r}=this,{invalidData:o,invalidKeys:a,allKeyMappings:l}=this.extractKeys(s,e,i),{columns:c,columnScopes:h,partialValidDataCount:d,maxDataLength:u}=this.extractValues(o,r,e,a,i),p=e=>{const i=t.get(e),n=i.getDomain();return Lo.is(i)&&n[0]>n[1]?[]:n};return{type:"ungrouped",input:{count:u},scopes:new Set(e.keys()),dataSources:e,aggregation:void 0,keys:[...l.values()],columns:c,columnScopes:h,invalidKeys:a,invalidData:o,domain:{keys:s.map(p),values:r.map(p)},defs:{allScopesHaveSameDefs:n,keys:s,values:r},partialValidDataCount:d,time:0,[Po]:new Map}}extractKeys(e,t,i){const n=new Map,s=new Map,r=new Map;let o,a;const l=(e,t)=>{const i=a.get(e);o.set(t,o.get(i)),n.has(i)&&(n.set(t,n.get(i)),s.set(t,s.get(i)))};for(const c of e){const{invalidValue:e,scopes:h}=c;o=new Map,a=new Map,r.set(c,o);for(const r of h??[]){const h=t.get(r)??[];if(a.has(h)){l(h,r);continue}const d=[];let u,p;o.set(r,d),a.set(h,r);for(let t=0;t<h.length;t++){if(null==h[t]||"object"!=typeof h[t])continue;const n=i(c,h[t],t,r);n.valid?d.push(n.value):(d.push(e),u??(u=Go(h.length,!1)),p??(p=Go(h.length,!1)),u[t]=!0,p[t]=!0)}u&&p&&(n.set(r,u),s.set(r,p))}}return{invalidData:s,invalidKeys:n,allKeyMappings:r}}extractValues(e,t,i,s,r){let o=0;const a=[],l=[];let c=0;for(const h of t){const{invalidValue:t}=h;if(new Set(h.scopes.map(e=>i.get(e))).size>1)throw new Error(`AG Charts - more than one data source for: ${JSON.stringify(h)}`);const d=new Set(h.scopes),u=(0,n.$1)(h.scopes),p=i.get(u),g=new Array;for(let i=0;i<p.length;i++){if(null==p[i]||"object"!=typeof p[i])continue;const n=p[i],a=s.get(u)?.[i],l=r(h,n,i,h.scopes);let c=l.value;!a&&l.valid||this.markScopeDatumInvalid(h.scopes,p,i,e),a?c=t:l.valid||(o+=1,c=t),g[i]=c}a.push(g),l.push(d),c=Math.max(c,g.length)}return{columns:a,columnScopes:l,partialValidDataCount:o,maxDataLength:c}}groupData(e,t){var i;const s=new Map,{keys:r,columns:o,columnScopes:a,invalidKeys:l,invalidData:c}=e,h=e.scopes,d=new Set;for(const e of h){const u=o.map((e,t)=>t).filter(t=>!d.has(t)&&a[t].has(e));if(0===u.length)continue;for(const e of u)d.add(e);const p=new Set;for(const e of u)for(const t of a[e])p.add(t);const g=r.map(t=>t.get(e)).filter(e=>null!=e),f=o[(0,n.$1)(u)],m=c?.get(e),v=l?.get(e);for(let n=0;n<f.length;n++){if(!0===v?.[n])continue;const r=g.map(e=>e[n]);if(null==r||0===r.length)throw new Error("AG Charts - no keys found for scope: "+e);const o=t?.(r)??r,a=No(o),l=s.get(a)??{keys:o,datumIndices:[],validScopes:h};if(s.has(a)||s.set(a,l),!0===m?.[n]){l.validScopes===h&&(l.validScopes=new Set(h.values()));for(const e of p)l.validScopes.delete(e)}for(const e of u)(i=l.datumIndices)[e]??(i[e]=[]),l.datumIndices[e].push(n)}}const u=[],p=[];for(const{keys:e,datumIndices:t,validScopes:i}of s.values())u.push(e),p.push({datumIndices:t,keys:e,aggregation:[],validScopes:i});return{...e,type:"grouped",domain:{...e.domain,groups:u},groups:p}}aggregateUngroupedData(e){const t=this.aggregates.map(()=>[1/0,-1/0]);e.domain.aggValues=t;const{keys:i,columns:s,dataSources:r}=e,o=(0,n.$1)(r.keys()),a=r.get(o);e.aggregation=a?.map((e,n)=>{const r=[];for(const[e,a]of this.aggregates.entries()){const l=this.valueGroupIdxLookup(a);let c=a.groupAggregateFunction?.()??[1/0,-1/0];const h=l.map(e=>s[e][n]),d=Vo(i,o,n),u=null!=d?a.aggregateFunction(h,d):void 0;u&&(c=a.groupAggregateFunction?.(u,c)??Lo.extendDomain(u,c));const p=a.finalFunction?.(c)??c;r[e]=p,Lo.extendDomain(p,t[e])}return r})}aggregateGroupedData(e){const t=this.aggregates.map(()=>[1/0,-1/0]);e.domain.aggValues=t;const{columns:i}=e;for(const[n,s]of this.aggregates.entries()){const r=this.valueGroupIdxLookup(s);for(const o of e.groups){o.aggregation??(o.aggregation=[]);const e=o.keys;let a=s.groupAggregateFunction?.()??[1/0,-1/0];const l=Math.max(...r.map(e=>o.datumIndices[e]?.length??0));for(let t=0;t<l;t++){const n=r.map(e=>i[e][o.datumIndices[e]?.[t]]),l=s.aggregateFunction(n,e);l&&(a=s.groupAggregateFunction?.(l,a)??Lo.extendDomain(l,a))}const c=s.finalFunction?.(a)??a;o.aggregation[n]=c,Lo.extendDomain(c,t[n])}}}postProcessGroups(e){const{groupProcessors:t}=this,{columnScopes:i,columns:s,invalidData:r}=e;for(const o of t){const t=this.valueGroupIdxLookup(o),a=o.adjust()();for(const i of e.groups)a(s,t,i);for(const o of t){const t="category"===this.values[o].valueType,a=s[o],l=(0,n.$1)(i[o]),c=r?.get(l),h=t?new Ro:new Lo;for(let e=0;e<a.length;e+=1)!0!==c?.[e]&&h.extend(a[e]);e.domain.values[o]=h.getDomain()}}}postProcessProperties(e){for(const{adjust:t,property:i,scopes:n}of this.propertyProcessors)for(const s of this.valueIdxLookup(n,i))t()(e,s)}reduceData(e){e.reduced??(e.reduced={});const{dataSources:t,keys:i}=e;for(const s of this.reducers){const r=s.reducer();let o=s.initialValue;if("grouped"===e.type)for(const t of e.groups)o=r(o,t.keys);else{const e=(0,n.$1)(t.keys()),s=i.map(t=>t.get(e)).filter(e=>null!=e),a=s.map(()=>{}),l=t.get(e);for(let e=0;e<l.length;e+=1){for(let t=0;t<a.length;t++)a[t]=s[t]?.[e];o=r(o,a)}}e.reduced[s.property]=o}}postProcessData(e){e.reduced??(e.reduced={});for(const t of this.processors)e.reduced[t.property]=t.calculate(e,e.reduced[t.property])}initDataDomainProcessor(){const{keys:e,values:t}=this,i=new Set;for(const e of t)if(e.scopes)for(const t of e.scopes)i.add(t);const s=new Map,r=new Map;let o=!0;const a=()=>{for(const r of(0,n.nl)(e,t))"category"===r.valueType?s.set(r,new Ro):(s.set(r,new Lo),o&&(o=(r.scopes??[]).length===i.size))};a();const l=this.buildAccessors((0,n.nl)(e,t)),c={value:void 0,missing:!1,valid:!1};return{dataDomain:s,processValue:(e,t,i,o)=>{let h,d;if(l.has(e.property)){try{d=l.get(e.property)(t)}catch{}h=null!=d}else h=e.property in t,d=h?t[e.property]:e.missingValue;if(null!=e.forceValue&&(d=h&&(0,n.cI)(d)?-1*e.forceValue:e.forceValue,h=!0),c.missing=!h,!h&&!("missingValue"in e))if("string"==typeof o){const t=e.missing.get(o)??0;e.missing.set(o,t+1)}else for(const t of o){const i=e.missing.get(t)??0;e.missing.set(t,i+1)}if(s.has(e)||a(),h&&!1===e.validation?.(d,t,i)){if(c.valid=!1,!("invalidValue"in e))return"integrated"!==this.mode&&n.Vy.warnOnce(`invalid value of type [${typeof d}] for [${e.scopes} / ${e.id}] ignored:`,`[${d}]`),c.value=void 0,c;d=e.invalidValue}else c.valid=!0;if(e.processor){let t=r.get(e);null==t&&(t=e.processor(),r.set(e,t)),d=t(d,i)}return s.get(e)?.extend(d),c.value=d,c},initDataDomain:a,scopes:i,allScopesHaveSameDefs:o}}buildAccessors(e){const t=new Map;if(this.suppressFieldDotNotation)return t;for(const i of e){if(!i.property.includes(".")&&!i.property.includes("["))continue;const e=Bo(i.property);if(null==e){n.Vy.warnOnce("Invalid property path [%s]",i.property);continue}const s=Ho(e);t.set(i.property,s)}return t}},Uo=class e{constructor(e,t){this.mode=e,this.suppressFieldDotNotation=t,this.debug=y.create(!0,"data-model"),this.requested=[],this.status="setup"}async request(e,t,i){if("setup"!==this.status)throw new Error("AG Charts - data request after data setup phase.");return new Promise((n,s)=>{this.requested.push({id:e,opts:i,data:t,resolve:n,reject:s})})}execute(e){if("setup"!==this.status)throw new Error("AG Charts - data request after data setup phase.");this.status="executed",this.debug("DataController.execute() - requested",this.requested);const t=this.validateRequests(this.requested);this.debug("DataController.execute() - validated",t);const i=this.mergeRequested(t);this.debug("DataController.execute() - merged",i),this.debug.check()&&((0,n.zk)().processedData=[]);const s=[];for(const{data:r,ids:o,opts:a,resolves:l,rejects:c}of i){const i=e?.find(e=>Io(e,r,o,a));let h,d;if(null==i)try{h=new zo(a,this.mode,this.suppressFieldDotNotation);const e=new Map(t.map(e=>[e.id,e.data]));d=h.processData(e)}catch(e){c.forEach(t=>t(e));continue}else({dataModel:h,processedData:d}=i);s.push({opts:a,data:r,ids:o,dataModel:h,processedData:d}),this.debug.check()&&(0,n.zk)("processedData").push(d),0===d?.partialValidDataCount?l.forEach(e=>e({dataModel:h,processedData:d})):d?this.splitResult(h,d,o,l):c.forEach(e=>e(new Error("AG Charts - no processed data generated")))}return s}validateRequests(e){const t=[];for(const[i,n]of e.entries())i>0&&n.data.length!==e[0].data.length&&!1===n.opts.groupByData&&!1===n.opts.groupByKeys?n.reject(new Error("all series[].data arrays must be of the same length and have matching keys.")):t.push(n);return t}mergeRequested(t){const i=[];for(const n of t){const t=i.find(e.groupMatch(n));t?t.push(n):i.push([n])}return i.map(e.mergeRequests)}splitResult(e,t,i,n){for(let s=0;s<i.length;s++)(0,n[s])({dataModel:e,processedData:t})}static groupMatch({data:e,opts:t}){function i(e){return e.filter(e=>"key"===e.type).map(e=>e.property).join(";")}const{groupByData:n,groupByKeys:s=!1,groupByFn:r,props:o}=t,a=i(o);return([t])=>(!1===n||t.data===e)&&(t.opts.groupByKeys??!1)===s&&t.opts.groupByFn===r&&i(t.opts.props)===a}static mergeRequests(t){const i=new Set(["key","group-value-processor"]);return t.reduce((t,{id:n,data:s,resolve:r,reject:o,opts:{props:a,...l}})=>{t.ids.push(n),t.rejects.push(o),t.resolves.push(r),t.data??(t.data=s),t.opts??(t.opts={...l,props:[]});for(const r of a){const o={...r,scopes:[n],data:s};e.createIdsMap(n,o);const a=t.opts.props.find(t=>t.type===o.type&&(i.has(t.type)||t.data===o.data)&&e.deepEqual(t,o));a?(a.scopes??(a.scopes=[]),a.scopes.push(...o.scopes??[]),"key"!==a.type&&"value"!==a.type||!o.idsMap?.size||e.mergeIdsMap(o.idsMap,a.idsMap)):t.opts.props.push(o)}return t},{ids:[],rejects:[],resolves:[],data:null,opts:null})}static mergeIdsMap(e,t){for(const[i,n]of e){const e=t.get(i);if(null==e)t.set(i,new Set(n));else for(const t of n)e.add(t)}}static createIdsMap(e,t){null!=t.id&&(t.idsMap??(t.idsMap=new Map),t.idsMap.has(e)?t.idsMap.get(e).add(t.id):t.idsMap.set(e,new Set([t.id])))}static deepEqual(t,i){if(t===i)return!0;if(t&&i&&"object"==typeof t&&"object"==typeof i){if(t.constructor!==i.constructor)return!1;let n,s;if(Array.isArray(t)){if(s=t.length,s!==i.length)return!1;for(n=s-1;n>=0;n--)if(!e.deepEqual(t[n],i[n]))return!1;return!0}const r=Object.keys(t);if(s=r.length,s!==Object.keys(i).length)return!1;for(n=s-1;n>=0;n--){const s=r[n];if(!(e.skipKeys.has(s)||Object.hasOwn(i,s)&&e.deepEqual(t[s],i[s])))return!1}return!0}return!1}};Uo.skipKeys=new Set(["id","idsMap","type","scopes","data"]);var Wo=Uo,jo=new class{constructor(){this.axesMap=new Map,this.themeTemplates=new Map}register(e,t){this.axesMap.set(e,t.moduleFactory),t.themeTemplate&&this.setThemeTemplate(e,t.themeTemplate)}create(e,t){const i=this.axesMap.get(e);if(i)return i(t);throw new Error(`AG Charts - unknown axis type: ${e}`)}has(e){return this.axesMap.has(e)}keys(){return this.axesMap.keys()}setThemeTemplate(e,t){return this.themeTemplates.set(e,t),this}getThemeTemplate(e){return this.themeTemplates.get(e)}},Ko=[{type:"root",optionsKey:"animation",chartTypes:["cartesian","polar","hierarchy","topology","flow-proportion","standalone","gauge"]},{type:"root",optionsKey:"annotations",chartTypes:["cartesian"]},{type:"root",optionsKey:"background",chartTypes:["cartesian","polar","hierarchy","topology","flow-proportion","standalone","gauge"],optionsInnerKey:"image"},{type:"root",optionsKey:"foreground",chartTypes:["cartesian","polar","hierarchy","topology","flow-proportion","standalone","gauge"],optionsInnerKey:"image"},{type:"root",optionsKey:"chartToolbar",chartTypes:["cartesian"]},{type:"root",optionsKey:"contextMenu",chartTypes:["cartesian","polar","hierarchy","topology","flow-proportion","standalone","gauge"]},{type:"root",optionsKey:"statusBar",chartTypes:["cartesian"],identifier:"status-bar"},{type:"root",optionsKey:"dataSource",chartTypes:["cartesian","polar","hierarchy","topology","flow-proportion","standalone","gauge"]},{type:"root",optionsKey:"sync",chartTypes:["cartesian"]},{type:"root",optionsKey:"zoom",chartTypes:["cartesian","topology"]},{type:"root",optionsKey:"ranges",chartTypes:["cartesian"]},{type:"legend",optionsKey:"gradientLegend",chartTypes:["cartesian","polar","hierarchy","topology","flow-proportion","standalone","gauge"],identifier:"gradient"},{type:"root",optionsKey:"navigator",chartTypes:["cartesian"]},{type:"axis",optionsKey:"axes[]",chartTypes:["polar"],identifier:"angle-category"},{type:"axis",optionsKey:"axes[]",chartTypes:["polar"],identifier:"angle-number"},{type:"axis",optionsKey:"axes[]",chartTypes:["polar"],identifier:"radius-category"},{type:"axis",optionsKey:"axes[]",chartTypes:["polar"],identifier:"radius-number"},{type:"series",optionsKey:"series[]",chartTypes:["cartesian"],identifier:"bar",community:!0},{type:"series",optionsKey:"series[]",chartTypes:["cartesian"],identifier:"line",community:!0},{type:"axis",optionsKey:"axes[]",chartTypes:["cartesian"],identifier:"ordinal-time"},{type:"axis-option",optionsKey:"crosshair",chartTypes:["cartesian"]},{type:"series",optionsKey:"series[]",chartTypes:["cartesian"],identifier:"box-plot"},{type:"series",optionsKey:"series[]",chartTypes:["cartesian"],identifier:"candlestick"},{type:"series",optionsKey:"series[]",chartTypes:["cartesian"],identifier:"cone-funnel"},{type:"series",optionsKey:"series[]",chartTypes:["cartesian"],identifier:"funnel"},{type:"series",optionsKey:"series[]",chartTypes:["cartesian"],identifier:"ohlc"},{type:"series",optionsKey:"series[]",chartTypes:["cartesian"],identifier:"heatmap"},{type:"series",optionsKey:"series[]",chartTypes:["cartesian"],identifier:"range-area"},{type:"series",optionsKey:"series[]",chartTypes:["cartesian"],identifier:"range-bar"},{type:"series",optionsKey:"series[]",chartTypes:["cartesian"],identifier:"waterfall"},{type:"series",optionsKey:"series[]",chartTypes:["polar"],identifier:"nightingale"},{type:"series",optionsKey:"series[]",chartTypes:["polar"],identifier:"radar-area"},{type:"series",optionsKey:"series[]",chartTypes:["polar"],identifier:"radar-line"},{type:"series",optionsKey:"series[]",chartTypes:["polar"],identifier:"radial-bar"},{type:"series",optionsKey:"series[]",chartTypes:["polar"],identifier:"radial-column"},{type:"series",optionsKey:"series[]",chartTypes:["hierarchy"],identifier:"sunburst"},{type:"series",optionsKey:"series[]",chartTypes:["hierarchy"],identifier:"treemap"},{type:"series",optionsKey:"series[]",chartTypes:["topology"],identifier:"map-shape"},{type:"series",optionsKey:"series[]",chartTypes:["topology"],identifier:"map-line"},{type:"series",optionsKey:"series[]",chartTypes:["topology"],identifier:"map-marker"},{type:"series",optionsKey:"series[]",chartTypes:["topology"],identifier:"map-shape-background"},{type:"series",optionsKey:"series[]",chartTypes:["topology"],identifier:"map-line-background"},{type:"series",optionsKey:"series[]",chartTypes:["flow-proportion"],identifier:"chord"},{type:"series",optionsKey:"series[]",chartTypes:["flow-proportion"],identifier:"sankey"},{type:"series",optionsKey:"series[]",chartTypes:["standalone"],identifier:"pyramid"},{type:"series",optionsKey:"series[]",chartTypes:["gauge"],identifier:"linear-gauge"},{type:"series",optionsKey:"series[]",chartTypes:["gauge"],identifier:"radial-gauge"},{type:"series-option",optionsKey:"errorBar",chartTypes:["cartesian"],identifier:"error-bars"},{type:"context",contextKey:"sharedToolbar",chartTypes:["cartesian"]}];function $o(e){return Ko.find(t=>"series"===t.type&&t.identifier===e)?.chartTypes}function Yo(e){if(!function(e){return"enterprise"===e.packageType}(e))throw new Error("AG Charts - internal configuration error, only enterprise modules need verification.");const t=Ko.find(t=>t.type===e.type&&(!("optionsKey"in t)||!("optionsKey"in e)||t.optionsKey===e.optionsKey)&&(!("contextKey"in t)||!("contextKey"in e)||t.contextKey===e.contextKey)&&t.identifier===e.identifier&&e.chartTypes.every(e=>t.chartTypes.includes(e)));return t&&(t.useCount??(t.useCount=0),t.useCount++),null!=t}var qo=new class{constructor(){this.legendMap=new Map,this.themeTemplates=new Map}register(e,{optionsKey:t,moduleFactory:i,themeTemplate:n}){this.legendMap.set(e,{optionsKey:t,moduleFactory:i}),this.themeTemplates.set(t,n)}create(e,t){const i=this.legendMap.get(e)?.moduleFactory;if(i)return i(t);throw new Error(`AG Charts - unknown legend type: ${e}`)}getThemeTemplates(){return Object.fromEntries(this.themeTemplates)}getKeys(){return Array.from(this.legendMap.entries()).reduce((e,[t,i])=>(e[t]=i.optionsKey,e),{})}},Xo=class extends Map{get(e){return super.get(e)??"unknown"}isCartesian(e){return"cartesian"===this.get(e)}isPolar(e){return"polar"===this.get(e)}isHierarchy(e){return"hierarchy"===this.get(e)}isTopology(e){return"topology"===this.get(e)}isFlowProportion(e){return"flow-proportion"===this.get(e)}isStandalone(e){return"standalone"===this.get(e)}isGauge(e){return"gauge"===this.get(e)}get seriesTypes(){return Array.from(this.keys())}get cartesianTypes(){return this.seriesTypes.filter(e=>this.isCartesian(e))}get polarTypes(){return this.seriesTypes.filter(e=>this.isPolar(e))}get hierarchyTypes(){return this.seriesTypes.filter(e=>this.isHierarchy(e))}get topologyTypes(){return this.seriesTypes.filter(e=>this.isTopology(e))}get flowProportionTypes(){return this.seriesTypes.filter(e=>this.isFlowProportion(e))}get standaloneTypes(){return this.seriesTypes.filter(e=>this.isStandalone(e))}get gaugeTypes(){return this.seriesTypes.filter(e=>this.isGauge(e))}},Zo=class extends Map{set(e,t){return super.set(e,N(t,this.get(e)))}},Qo=new Xo,Jo=new Xo,ea=new Zo,ta=new class{constructor(){this.seriesMap=new Map,this.themeTemplates=new Map}register(e,{chartTypes:[t],moduleFactory:i,tooltipDefaults:n,defaultAxes:s,themeTemplate:r,solo:o,stackable:a,groupable:l,stackedByDefault:c,hidden:h}){this.setThemeTemplate(e,r),this.seriesMap.set(e,{moduleFactory:i,tooltipDefaults:n,defaultAxes:s,solo:o,stackable:a,groupable:l,stackedByDefault:c}),Qo.set(e,t),h||Jo.set(e,t)}create(e,t){const i=this.seriesMap.get(e)?.moduleFactory;if(i)return i(t);throw new Error(`AG Charts - unknown series type: ${e}`)}cloneDefaultAxes(e){const t=this.seriesMap.get(e)?.defaultAxes;return null==t?null:{axes:Vt(t)}}setThemeTemplate(e,t){const i=this.themeTemplates.get(e);this.themeTemplates.set(e,N(t,i))}getThemeTemplate(e){return this.themeTemplates.get(e)}getTooltipDefauls(e){return this.seriesMap.get(e)?.tooltipDefaults}isSolo(e){return this.seriesMap.get(e)?.solo??!1}isGroupable(e){return this.seriesMap.get(e)?.groupable??!1}isStackable(e){return this.seriesMap.get(e)?.stackable??!1}isStackedByDefault(e){return this.seriesMap.get(e)?.stackedByDefault??!1}},ia=class e extends Ji{constructor(e){super(),this.chart=e}subscribe(t=e.DEFAULT_GROUP){let i=this.get(t);return i||(i={members:new Set},e.chartsGroups.set(t,i)),i.members.add(this.chart),this}unsubscribe(t=e.DEFAULT_GROUP){const i=this.get(t);return i?.members.delete(this.chart),delete i?.domains?.x?.sources?.[this.chart.id],delete i?.domains?.y?.sources?.[this.chart.id],this}getChart(){return this.chart}getGroupState(t=e.DEFAULT_GROUP){return this.get(t)}getGroupMembers(t=e.DEFAULT_GROUP){const i=this.get(t);return i?Array.from(i.members):[]}getGroupSiblings(t=e.DEFAULT_GROUP){return this.getGroupMembers(t).filter(e=>e!==this.chart)}getGroupSyncMode(t=e.DEFAULT_GROUP){return this.getGroupMembers(t).some(e=>e.series.length>1)?"multi-series":"single-series"}get(t){return e.chartsGroups.get(t)}};ia.chartsGroups=new Map,ia.DEFAULT_GROUP=Symbol("sync-group-default");var na=ia,sa=class extends De{constructor(){super(...arguments),this.enabled=!1}};a([Te],sa.prototype,"enabled",2),a([Te],sa.prototype,"tabIndex",2);var ra={};o(ra,{NODE_UPDATE_STATE_TO_PHASE_MAPPING:()=>oa,fromToMotion:()=>aa,staticFromToMotion:()=>la});var oa={added:"add",updated:"update",removed:"remove",unknown:"initial","no-op":"none"};function aa(e,t,i,n,s,r,o){const{fromFn:a,toFn:l,applyFn:c=(e,t)=>e.setProperties(t)}=s,{nodes:h,selections:d}=Ns(n),u=(n,s)=>{let h,d=0,u=0;for(const p of s){const g=n[d]===p,f={last:u>=s.length-1,lastLive:d>=n.length-1,prev:s[u-1],prevFromProps:h,prevLive:n[d-1],next:s[u+1],nextLive:n[d+(g?1:0)]},m=`${e}_${t}_${p.id}`;i.stopByAnimationId(m);let v="unknown";g?r&&o&&(v=ca(p,p.datum,r,o)):v="removed",p.transitionOut="removed"===v;const{phase:y,start:C,finish:b,delay:S,duration:w,...x}=a(p,p.datum,v,f),{phase:E,start:M,finish:A,delay:T,duration:D,...I}=l(p,p.datum,v,f),R=null==b;i.animate({id:m,groupId:e,phase:y??E??"update",duration:w??D,delay:S??T,from:x,to:I,ease:Ms,collapsable:R,onPlay:()=>{const e={...C,...M,...x};c(p,e,"start")},onUpdate(e){c(p,e,"update")},onStop:()=>{const e={...C,...M,...x,...I,...b,...A};c(p,e,"end")}}),g&&d++,u++,h=x}};let p=0;for(const n of d){const s=n.nodes();u(s.filter(e=>!n.isGarbage(e)),s),i.animate({id:`${e}_${t}_selection_${p}`,groupId:e,phase:"end",from:0,to:1,ease:Ms,onStop(){n.cleanup()}}),p++}u(h,h)}function la(e,t,i,n,s,r,o){const{nodes:a,selections:l}=Ns(n),{start:c,finish:h,phase:d}=o;i.animate({id:`${e}_${t}`,groupId:e,phase:d??"update",from:s,to:r,ease:Ms,onPlay:()=>{if(c){for(const e of a)e.setProperties(c);for(const e of l)for(const t of e.nodes())t.setProperties(c)}},onUpdate(e){for(const t of a)t.setProperties(e);for(const t of l)for(const i of t.nodes())i.setProperties(e)},onStop:()=>{for(const e of a)e.setProperties({...r,...h});for(const e of l){for(const t of e.nodes())t.setProperties({...r,...h});e.cleanup()}}})}function ca(e,t,i,n){const s=i(e,t);return n.added.has(s)?"added":n.removed.has(s)?"removed":null==e.previousDatum&&null!=e.datum?"added":null!=e.previousDatum&&null==e.datum?"removed":"updated"}var ha={};function da(e,t){const{nodes:i,selections:n}=Ns(e);for(const e of n){for(const i of e.nodes()){const e=t(i,i.datum);i.setProperties(e)}e.cleanup()}for(const e of i){const i=t(e,e.datum);e.setProperties(i)}}o(ha,{resetMotion:()=>da});var ua=class e{constructor(e,t,i=!0){this.parentNode=e,this.autoCleanup=i,this.garbageBin=new Set,this._nodesMap=new Map,this._nodes=[],this.data=[],this.debug=y.create(!0,"scene","scene:selections"),this.nodeFactory=Object.prototype.isPrototypeOf.call(J,t)?()=>new t:t}static select(t,i,n=!0){return new e(t,i,n)}static selectAll(e,t){const i=[],n=e=>{t(e)&&i.push(e);for(const t of e.children())n(t)};return n(e),i}static selectByClass(t,...i){return e.selectAll(t,e=>i.some(t=>e instanceof t))}static selectByTag(t,i){return e.selectAll(t,e=>e.tag===i)}createNode(e,t,i){const n=this.nodeFactory(e);return n.datum=e,t?.(n),null==i?this._nodes.push(n):this._nodes.splice(i,0,n),this.parentNode.appendChild(n),n}update(e,t,i){if(this.garbageBin.size>0&&this.debug("Selection - update() called with pending garbage",e),i){const n=new Map(e.map((e,t)=>[i(e),[e,t]]));for(const[e,t]of this._nodesMap.entries())if(n.has(t)){const[i]=n.get(t);e.datum=i,this.garbageBin.delete(e),n.delete(t)}else this.garbageBin.add(e);for(const[e,[i,s]]of n.entries())this._nodesMap.set(this.createNode(i,t,s),e)}else{const i=Math.max(e.length,this.data.length);for(let n=0;n<i;n++)n>=e.length?this.garbageBin.add(this._nodes[n]):n>=this._nodes.length?this.createNode(e[n],t):(this._nodes[n].datum=e[n],this.garbageBin.delete(this._nodes[n]))}return this.data=e.slice(),this.autoCleanup&&this.cleanup(),this}cleanup(){return 0===this.garbageBin.size||(this._nodes=this._nodes.filter(e=>!this.garbageBin.has(e)||(this._nodesMap.delete(e),this.garbageBin.delete(e),e.destroy(),!1))),this}clear(){return this.update([]),this}isGarbage(e){return this.garbageBin.has(e)}each(e){for(const t of this._nodes.entries())e(t[1],t[1].datum,t[0]);return this}*[Symbol.iterator](){for(let e=0;e<this._nodes.length;e++){const t=this._nodes[e];yield{node:t,datum:t.datum,index:e}}}select(t){return e.selectAll(this.parentNode,t)}selectByClass(t){return e.selectByClass(this.parentNode,t)}selectByTag(t){return e.selectByTag(this.parentNode,t)}nodes(){return this._nodes}at(e){return this._nodes.at(e)}get length(){return this._nodes.length}},pa=class extends dt{constructor(e={}){super(e),this.x1=0,this.y1=0,this.x2=0,this.y2=0,this.restoreOwnStyles()}set x(e){this.x1=e,this.x2=e}set y(e){this.y1=e,this.y2=e}get midPoint(){return{x:(this.x1+this.x2)/2,y:(this.y1+this.y2)/2}}computeBBox(){return new m(Math.min(this.x1,this.x2),Math.min(this.y1,this.y2),Math.abs(this.x2-this.x1),Math.abs(this.y2-this.y1))}isPointInPath(e,t){return(this.x1===this.x2||this.y1===this.y2)&&this.getBBox().clone().grow(this.strokeWidth/2).containsPoint(e,t)}distanceSquared(e,t){const{x1:i,y1:n,x2:s,y2:r}=this;return ze(e,t,i,n,s,r,1/0)}render(e){const{ctx:t,devicePixelRatio:i}=e;let{x1:n,y1:s,x2:r,y2:o}=this;if(n===r){const{strokeWidth:e}=this,t=Math.round(n*i)/i+Math.trunc(e*i)%2/(2*i);n=t,r=t}else if(s===o){const{strokeWidth:e}=this,t=Math.round(s*i)/i+Math.trunc(e*i)%2/(2*i);s=t,o=t}t.beginPath(),t.moveTo(n,s),t.lineTo(r,o),this.fillStroke(t),this.fillShadow?.markClean(),super.render(e)}toSVG(){if(!this.visible)return;const e=(0,n.FJ)("line");return e.setAttribute("x1",String(this.x1)),e.setAttribute("y1",String(this.y1)),e.setAttribute("x2",String(this.x2)),e.setAttribute("y2",String(this.y2)),this.applySvgStrokeAttributes(e),{elements:[e]}}};pa.className="Line",pa.defaultStyles={...dt.defaultStyles,fill:void 0,strokeWidth:1},a([$()],pa.prototype,"x1",2),a([$()],pa.prototype,"y1",2),a([$()],pa.prototype,"x2",2),a([$()],pa.prototype,"y2",2);var ga="color: green",fa="color: grey";function ma(){return D(()=>{})}function va(e,t){const i=R(t);if(0===i.length)return;const n=L(e);for(const e of i)e in n&&(t[e]=n[e])}var ya=class{transitionRoot(e,t){this.parent?this.parent.transitionRoot(e,t):this.transition(e,t)}},Ca=class e extends ya{constructor(e,t,i){super(),this.defaultState=e,this.states=t,this.enterEach=i,this.debug=y.create(!0,"animation"),this.state=e,this.debug(`%c${this.constructor.name} | init -> ${e}`,ga)}transition(t,i){if(!this.transitionChild(t,i)||this.state===e.child||this.state===e.parent)return;const n=this.state,s=this.states[this.state];let r=s[t];const o=`%c${this.constructor.name} | ${this.state} -> ${t} ->`;if(Array.isArray(r))r=r.find(e=>{if(!e.guard)return!0;const t=e.guard(i);return t||this.debug(`${o} (guarded)`,e.target,fa),t});else if("object"==typeof r&&!(r instanceof e)&&r.guard&&!r.guard(i))return void this.debug(`${o} (guarded)`,r.target,fa);if(!r)return void this.debug(`${o} ${this.state}`,fa);const a=this.getDestinationState(r),l=a===this.state?void 0:s.onExit;this.debug(`${o} ${a}`,ga),this.state=a,"function"==typeof r?r(i):"object"!=typeof r||r instanceof e||r.action?.(i),l?.(),this.enterEach?.(n,a),a!==n&&a!==e.child&&a!==e.parent&&this.states[a].onEnter?.(n,i)}transitionAsync(e,t){setTimeout(()=>{this.transition(e,t)},0)}is(t){return this.state===e.child&&this.childState?this.childState.is(t):this.state===t}resetHierarchy(){this.debug(`%c${this.constructor.name} | ${this.state} -> [resetHierarchy] -> ${this.defaultState}`,"color: green"),this.state=this.defaultState}transitionChild(t,i){return this.state!==e.child||!this.childState||(va(this,this.childState),this.childState.transition(t,i),!this.childState.is(e.parent)||(this.debug(`%c${this.constructor.name} | ${this.state} -> ${t} -> ${this.defaultState}`,ga),this.state=this.defaultState,this.states[this.state].onEnter?.(),this.childState.resetHierarchy(),!1))}getDestinationState(t){let i=this.state;return"string"==typeof t?i=t:t instanceof e?(this.childState=t,this.childState.parent=this,i=e.child):"object"==typeof t&&(t.target instanceof e?(this.childState=t.target,this.childState.parent=this,i=e.child):null!=t.target&&(i=t.target)),i}};Ca.child="__child",Ca.parent="__parent";var ba=Ca,Sa=class extends ya{constructor(...e){super(),this.stateMachines=e;for(const t of e)t.parent=this}transition(e,t){for(const i of this.stateMachines)va(this,i),i.transition(e,t)}transitionAsync(e,t){for(const i of this.stateMachines)va(this,i),i.transitionAsync(e,t)}},wa=class{constructor(){this.moduleMap=new Map}*modules(){for(const e of this.moduleMap.values())yield e.moduleInstance}addModule(e,t){if(this.moduleMap.has(e.optionsKey))throw new Error(`AG Charts - module already initialised: ${e.optionsKey}`);this.moduleMap.set(e.optionsKey,{module:e,moduleInstance:t(e)})}removeModule(e){const t=(0,n.Kg)(e)?e:e.optionsKey;this.moduleMap.get(t)?.moduleInstance.destroy(),this.moduleMap.delete(t)}getModule(e){return this.moduleMap.get((0,n.Kg)(e)?e:e.optionsKey)?.moduleInstance}isEnabled(e){return this.moduleMap.has((0,n.Kg)(e)?e:e.optionsKey)}mapModules(e){return Array.from(this.moduleMap.values(),(t,i)=>e(t.moduleInstance,i))}destroy(){for(const e of this.moduleMap.keys())this.moduleMap.get(e)?.moduleInstance.destroy();this.moduleMap.clear()}};function xa(e){return"string"==typeof e?dr[e]:e}function Ea(e){return xa(e).unit}function Ma(e){return xa(e).hierarchy}function Aa(e){return xa(e).milliseconds}function Ta(e,t,i,n){return xa(e).range(t,i,n)}function Da(e,t){return xa(e).floor(t)}var Ia=class e extends io{constructor(){super(...arguments),this.type="unit-time",this._domain=[],this._bands=void 0}static is(t){return t instanceof e}set domain(e){e!==this._domain&&(this._domain=e,this._bands=void 0)}get domain(){return this._domain}get interval(){return this._interval}set interval(e){this._interval!==e&&(this._interval=e,this._bands=void 0)}get bands(){return this._bands??(this._bands=this.calculateBands(this._domain,[0,1])),this._bands}normalizeDomains(...e){return hr(...e)}convert(e,t){const{domain:i,interval:n}=this;if(i.length<2)return NaN;if(null!=n){const t=e.valueOf(),[s,r]=this.calculateBandRange(i,n),o=Math.min(s.valueOf(),r.valueOf()),a=Math.max(s.valueOf(),r.valueOf());if(t<o||t>=a+Aa(n))return NaN}return super.convert(e,t)}calculateBandRange(e,t){return[Da(t,e[0]),Da(t,e[1])]}calculateBands(e,t,i=!1){if(e===this.domain&&0===t[0]&&1===t[1]&&!i&&null!=this._bands)return this._bands;if(e.length<2)return[];const{interval:n}=this;if(null==n)return[];const[s,r]=this.calculateBandRange(e,n);return Ta(n,s,r,{visibleRange:t,extend:i})}ticks({interval:e},t=this.domain,i=[0,1],s=!1){if(t.length<2)return;const r=this.calculateBands(t,i,s),o=this.interval?Aa(this.interval):1/0;if(null==e)return{ticks:r,count:void 0};const a=Math.min(t[0].valueOf(),t[1].valueOf()),l=Math.max(t[0].valueOf(),t[1].valueOf()),c=[];let h,d,u,p,g,f;e instanceof Cr?(h=e.range(t[0],t[1],{extend:!0,visibleRange:i}),d=0,u=h.length-1):(h=r,d=(0,n.I5)(0,r.length-1,e=>r[e].valueOf()<=a)??0,u=(0,n.I5)(0,r.length-1,e=>r[e].valueOf()<=l)??r.length-1);for(let e=d;e<=u;e++){const t=h[e].valueOf(),i=(0,n.I5)(0,r.length-1,e=>r[e].valueOf()<=t),s=null!=i&&i!=p?r[i]:void 0;p=i,null!=s&&t-s.getTime()<=o&&c.push(s)}if(this.interval){const e=this.calculateBandRange([new Date(a),new Date(l)],this.interval);g=e[0].valueOf(),f=e[1].valueOf()}else g=a,f=l;let m=(0,n.S3)(0,c.length-1,e=>c[e].valueOf()>=g)??0,v=(0,n.I5)(0,c.length-1,e=>c[e].valueOf()<=f)??c.length-1;return s&&(m=Math.max(m-1,0),v=Math.min(v+1,c.length-1)),{ticks:c.slice(m,v+1),count:c.length}}findIndex(e){const{bands:t}=this,i=e.valueOf();return(0,n.I5)(0,t.length-1,e=>t[e].valueOf()<=i)}datumFormatter(e){const t=this.tickFormatter(e,1);return e=>{const i=this.findIndex(e);return t(null!=i?this.bands[i]:e)}}};Ia.defaultTickCount=12;var Ra=Ia;function La(e,t){return e.valueOf()-t.valueOf()}function ka(e){const t=e.slice().sort(La);return null==Pa(t)?function(e){let t=NaN;const i=[];for(const n of e){const e=n.valueOf();t!==e&&i.push(n),t=e}return i}(t):t}function Pa(e){if(0===e.length)return 1;const t=Number(e[e.length-1])>Number(e[0])?1:-1;let i=-1/0*t;for(const n of e){const e=n.valueOf();if(Math.sign(e-i)!==t)return;i=e}return t}var Na=(e,t,i)=>({duration:t*i,timeInterval:e,step:i}),Oa=[Na(Mr,ur,1),Na(Mr,ur,5),Na(Mr,ur,15),Na(Mr,ur,30),Na(Tr,pr,1),Na(Tr,pr,5),Na(Tr,pr,15),Na(Tr,pr,30),Na(Ir,gr,1),Na(Ir,gr,3),Na(Ir,gr,6),Na(Ir,gr,12),Na(wr,fr,1),Na(wr,fr,2),Na(Lr,mr,1),Na(Lr,mr,2),Na(Lr,mr,3),Na(Sr,vr,1),Na(Sr,vr,2),Na(Sr,vr,3),Na(Sr,vr,4),Na(Sr,vr,6),Na(br,yr,1)],_a=[1,2,5,10];function Fa(e,t){return Math.abs(Math.round(e)-e)<t}function Ga(e,t,i){return Math.abs(t-e)>=i?Math.abs(t-e)/i+1:1}function Va(e,t,i,n,s,r){if(e===t)return{ticks:[e],count:1};if(i<2)return{ticks:[e,t],count:2};const o=Ua(e,t,i,n,s);if(!Number.isFinite(o))return{ticks:[],count:0};let a=e,l=t;if(Fa(a/o,1e-12)||(a=Math.ceil(a/o)*o),Fa(l/o,1e-12)||(l=Math.floor(l/o)*o),null!=r){const i=l-a,n=t-e;r=[(e+n*r[0]-a)/i,(e+n*r[1]-a)/i]}const{ticks:c}=Ka(a,l,o,r);return{ticks:c,count:Ga(e,t,o)}}var Ba=Math.floor(2*Lr.milliseconds/Sr.milliseconds*10)/10;function Ha({timeInterval:e,step:t}){return e.milliseconds*t<=(e.hierarchy?.milliseconds??1/0)*Ba}function za(e,t,i,n,s,{weekStart:r,primaryOnly:o=!1,targetInterval:a}){if(i<=0)return;const l=a??Math.abs(t-e)/Math.max(i,1),c=Oa.findLast(e=>(!o||Ha(e))&&l>e.duration),h=Oa.find(e=>(!o||Ha(e))&&l<=e.duration);if(null==c){const r=Math.max(Ua(e,t,i,n,s),1);return xr.every(r)}if(null==h){const r=null==a?Ua(e/yr,t/yr,i,n,s):1;return br.every(r)}const{timeInterval:d,step:u}=l-c.duration<h.duration-l?c:h;return d===Lr?r?.every(u)??wr.every(7*u):d.every(u)}function Ua(e,t,i,s=0,r=1/0){if(e===t)return(0,n.qE)(1,s,r);if(i<1)return NaN;const o=Math.abs(t-e),a=10**Math.floor(Math.log10(o/i));let l=NaN,c=1/0,h=!1;for(const e of _a){const t=Math.ceil(o/(e*a)),n=t>=s&&t<=r;if(h&&!n)continue;const d=Math.abs(t-i);(c>d||h!==n)&&(h||(h=n),c=d,l=e)}return l*a}function Wa(e){for(let t=e.length-1;t>=0;t-=1)if("0"!==e[t])return t+1;return 0}function ja(e,t){const i=(0,n.sA)(t??",f");(null==i.precision||isNaN(i.precision))&&(!i.type||"eEFgGnprs".includes(i.type)?i.precision=Math.max(...e.map(e=>{if(!Number.isFinite(e))return 0;const[t,n]=e.toExponential((i.type?6:12)-1).split(/[.e]/g);return("1"!==t&&"-1"!==t?1:0)+Wa(n)+1})):"f%".includes(i.type)&&(i.precision=Math.max(...e.map(e=>{if(!Number.isFinite(e)||0===e)return 0;const t=Math.floor(Math.log10(Math.abs(e))),n=i.type?6:12,s=Wa(e.toExponential(n-1).split(/[.e]/g)[1]);return Math.max(0,s-t)}))));const s=(0,n.OR)(i);return e=>s(Number(e))}function Ka(e,t,i,s){if(!Number.isFinite(i)||i<=0)return{ticks:[],count:0};if(e===t)return{ticks:[e],count:1};const r=10**(0,n.o3)(i),o=Math.min(e,t),a=Math.max(e,t);let l,c;if(null==s||0===s[0]&&1===s[1])l=o,c=a;else{const i=t-e,n=e+i*s[0],r=t-i*(1-s[1]);l=Math.min(n,r),c=Math.max(n,r)}l=Math.floor(l*r)/r,c=Math.ceil(c*r)/r;const h=[];for(let e=0;;e+=1){const t=Math.round((o+i*e)*r)/r;if(t>a)break;t>=l&&t<=c&&h.push(t)}return{ticks:h,count:Ga(o,a,i)}}function $a(e,t){return e>=t&&(n.Vy.warnOnce("the configured interval results in more than 1 item per pixel, ignoring. Supply a larger interval or omit this configuration"),!0)}function Ya(e,t){const i=Math.abs(t-e),n=10**Math.floor(Math.log10(i));let s=1/0,r=[e,t];for(const o of _a){const a=o*n,l=Math.floor(e/a)*a,c=Math.ceil(t/a)*a,h=1-i/Math.abs(c-l);s>h&&(s=h,r=[l,c])}return r}function qa(e,t,i,s,r,o){if(e<=0)return{minTickCount:0,maxTickCount:0,tickCount:0};o=Math.max(o,e/(r+1)),i??(i=o),s??(s=e),i>s&&(i===o?i=s:s=i);const a=Math.max(1,Math.floor(e/(t*i))),l=Math.min(a,Math.ceil(e/(t*s)));return{minTickCount:l,maxTickCount:a,tickCount:(0,n.qE)(l,Math.floor(r/t),a)}}var Xa=class e extends cr{constructor(){super([],[0,1]),this.type="time"}static is(t){return t instanceof e}toDomain(e){return new Date(e)}convert(e,t){return e instanceof Date||(e=new Date(e)),super.convert(e,t)}invert(e){return new Date(super.invert(e))}niceDomain(e,t=this.domain){if(t.length<2)return[];let[i,n]=t;const s=this.getPixelRange();for(let t=0;t<4;t++){const[t,r]=Ja(i,n,e,s);if(Zr(i)===Zr(t)&&Zr(n)===Zr(r))break;i=t,n=r}return[i,n]}ticks(e,t=this.domain,i=[0,1],n=!1){const{nice:s,interval:r,tickCount:o=cr.defaultTickCount,minTickCount:a,maxTickCount:l}=e;if(t.length<2)return;const c=t.map(Zr),h=c[0],d=c[c.length-1];return null!=r?{ticks:Qa({start:h,stop:d,interval:r,availableRange:this.getPixelRange(),visibleRange:i,extend:n})??Za({start:h,stop:d,tickCount:o,minTickCount:a,maxTickCount:l,visibleRange:i,extend:n}),count:void 0}:s&&2===o?{ticks:t,count:void 0}:s&&1===o?{ticks:t.slice(0,1),count:void 0}:{ticks:Za({start:h,stop:d,tickCount:o,minTickCount:a,maxTickCount:l,visibleRange:i,extend:n}),count:void 0}}_tickFormatter({domain:e,ticks:t,specifier:i},n){return null!=i?Xr(i):Qr(t,e,n)}tickFormatter(e){return this._tickFormatter(e)}datumFormatter(e){return this._tickFormatter(e,1)}};function Za({start:e,stop:t,tickCount:i,minTickCount:n,maxTickCount:s,visibleRange:r,extend:o}){const a=za(e,t,i,n,s,{weekStart:Lr});return a?a.range(new Date(e),new Date(t),{visibleRange:r,extend:o}):[]}function Qa({start:e,stop:t,interval:i,availableRange:n,visibleRange:s,extend:r}){if(!i)return[];if(i instanceof Cr||"string"==typeof i){const o=Ta(i,new Date(e),new Date(t),{visibleRange:s,extend:r});if($a(o.length,n))return;return o}const o=Math.abs(i);if($a(Math.abs(t-e)/o,n))return;const a=Oa.findLast(e=>o%e.duration===0);if(a)return a.timeInterval.every(o/(a.duration/a.step)).range(new Date(e),new Date(t),{visibleRange:s,extend:r});let l=new Date(Math.min(e,t));const c=new Date(Math.max(e,t)),h=[];for(;l<=c;)h.push(l),l=new Date(l),l.setMilliseconds(l.getMilliseconds()+o);return h}function Ja(e,t,i,n){const{interval:s}=i,r=Math.min(Zr(e),Zr(t)),o=Math.max(Zr(e),Zr(t));let a;if(s instanceof Cr)a=s;else if("string"==typeof s)a=s;else{let e;"number"==typeof s&&(e=(o-r)/Math.max(s,1),$a(e,n)&&(e=void 0)),e??(e=i.tickCount??cr.defaultTickCount),a=za(r,o,e,i.minTickCount,i.maxTickCount,{weekStart:Lr})}if(null==a)return[e,t];const l=Ta(a,new Date(r),new Date(o),{extend:!0});if(null==l||l.length<2)return[e,t];const c=l[0],h=l[l.length-1];return e<=t?[c,h]:[h,c]}var el=class e extends io{constructor(){super(...arguments),this.type="ordinal-time",this._domain=[],this.isReversed=!1}static is(t){return t instanceof e}set domain(e){e!==this._domain&&(this.invalid=!0,this._domain=e,this._bands=void 0,this.isReversed=e.length>0&&e[0]>e[e.length-1],this.sortedTimestamps=void 0,this.precomputedSteps=void 0)}get domain(){return this._domain}get bands(){return this._bands??(this._bands=this.isReversed?this.domain.slice().reverse():this.domain),this._bands}normalizeDomains(...e){const t=e.filter(e=>e.length>0);if(0===t.length)return{domain:[],animatable:!1};if(1===t.length){let e=t[0];const i=Pa(e);return-1===i?e=e.slice().reverse():null==i&&(e=ka(e.slice())),{domain:e,animatable:!0}}return{domain:ka(t.flat()),animatable:!0}}ticks({interval:e,maxTickCount:t},i=this.domain,n=[0,1],s=!1){if(!i.length)return;this.refresh();const{isReversed:r}=this;if(null==e)return{ticks:tl(i,t,r,n,s),count:void 0};const o=i[0].valueOf(),a=i[i.length-1].valueOf(),[l,c]=this.range;let h=Qa({start:o,stop:a,interval:e,availableRange:Math.abs(c-l),visibleRange:n,extend:s})??tl(i,t,r,n,s),d=-1;return h=h.filter(e=>{const t=this.findInterval(e.valueOf()),i=t===d;return d=t,!i}),{ticks:h,count:void 0}}getSortedTimestamps(){let{sortedTimestamps:e}=this;return null==e&&(e??(e=this.bands.map(Zr)),this.sortedTimestamps=e),e}getPrecomputedSteps(){const{domain:e}=this;let{precomputedSteps:t}=this;const i=e.length<1e4?e.length:Math.ceil(e.length/16);if(null!=t||i<=1)return t;const n=this.getSortedTimestamps();t=new Int32Array(i);const s=n[0],r=n[n.length-1]-s,o=n.length-1;for(let e=0;e<t.length;e+=1)t[e]=this.findIntervalInRange(s+e/i*r,0,o);this.precomputedSteps=t}findIntervalInRange(e,t,i){const n=this.getSortedTimestamps();for(;t<=i;){const s=(t+i)/2|0;if(n[s]===e)return s;n[s]<e?t=s+1:i=s-1}return t}findInterval(e){const t=this.getPrecomputedSteps();let i,n;if(null==t)i=0,n=this.domain.length-1;else{const s=this.getSortedTimestamps(),r=s[0],o=s[s.length-1],a=Math.min((e-r)/(o-r)*t.length|0,t.length-1|0);i=t[a],n=a<t.length-2?t[a+1]:s.length-1}return this.findIntervalInRange(e,i,n)}datumFormatter(e){return this.tickFormatter(e)}findIndex(e){const t=this.getSortedTimestamps(),i=Number(e);if(!(i<t[0]))return this.findInterval(i)}};function tl(e,t,i,n,s){const r=[],o=Math.ceil(e.length/t),a=Math.floor(o/2);let l=Math.floor(n[0]*e.length),c=Math.ceil(n[1]*e.length);s&&(l>o&&(l-=o),c<e.length-o&&(c+=o));for(let t=l;t<c;t+=1){const n=i?e.length-1-t:t;(o<=0||(n+a)%o===0)&&r.push(e[t])}return r}var il=class extends dt{constructor(e={}){super(e),this.x1=0,this.y1=0,this.x2=0,this.y2=0,this.startLine=!1,this.endLine=!1,this.horizontal=!1,this.restoreOwnStyles()}computeBBox(){return new m(this.x1,this.y1,this.x2-this.x1,this.y2-this.y1)}isPointInPath(e,t){return!1}render(e){const{ctx:t}=e;let{x1:i,y1:n,x2:s,y2:r}=this;i=this.align(i),n=this.align(n),s=this.align(s),r=this.align(r);const{fill:o,horizontal:a}=this,{globalAlpha:l}=t;null!=o&&(this.applyFillAndAlpha(t),t.beginPath(),t.moveTo(i,n),t.lineTo(s,n),t.lineTo(s,r),t.lineTo(i,r),t.closePath(),t.fill(),t.globalAlpha=l);const{stroke:c,strokeWidth:h,startLine:d,endLine:u}=this;if((d||u)&&c&&h){const{lineDash:e,lineDashOffset:o,lineCap:c,lineJoin:p}=this;this.applyStrokeAndAlpha(t),t.lineWidth=h,e&&t.setLineDash([...e]),o&&(t.lineDashOffset=o),c&&(t.lineCap=c),p&&(t.lineJoin=p),t.beginPath(),d&&(t.moveTo(i,n),a?t.lineTo(i,r):t.lineTo(s,n)),u&&(t.moveTo(s,r),a?t.lineTo(s,n):t.lineTo(i,r)),t.stroke(),t.globalAlpha=l}this.fillShadow?.markClean(),super.render(e)}};function nl(e){return(0,n.Bf)(e)||(0,n.vd)(e)||function(e){return null!=e&&Object.hasOwn(e,"valueOf")&&(0,n.Bf)(e.valueOf())}(e)}function sl(e){return function(e){return null!=e&&Object.hasOwn(e,"toString")&&(0,n.Kg)(e.toString())}(e)&&Object.hasOwn(e,"id")?e.id:e}function rl(e){switch(e.type){case"line":return e.value;case"range":return e.range}}function ol(e,t){if(null==e)return!1;const i=cr.is(t)||io.is(t),s=e=>function(e,t){return null!=e&&(!t||nl(e))}(e,i)&&!isNaN(t.convert(e));if((0,n.cy)(e)){const[t,i]=e;return s(t)&&s(i)}return s(e)}il.className="Range",il.defaultStyles={...dt.defaultStyles,strokeWidth:1},a([$()],il.prototype,"x1",2),a([$()],il.prototype,"y1",2),a([$()],il.prototype,"x2",2),a([$()],il.prototype,"y2",2),a([$()],il.prototype,"startLine",2),a([$()],il.prototype,"endLine",2),a([$()],il.prototype,"horizontal",2);var al={top:{rangeH:0,rangeV:-1,labelH:0,labelV:1},"inside-top":{rangeH:0,rangeV:-1,labelH:0,labelV:1},"top-left":{rangeH:-1,rangeV:-1,labelH:-1,labelV:1},"inside-top-left":{rangeH:-1,rangeV:-1,labelH:-1,labelV:1},left:{rangeH:-1,rangeV:0,labelH:1,labelV:0},"inside-left":{rangeH:-1,rangeV:0,labelH:-1,labelV:0},"bottom-left":{rangeH:-1,rangeV:1,labelH:-1,labelV:-1},"inside-bottom-left":{rangeH:-1,rangeV:1,labelH:-1,labelV:-1},bottom:{rangeH:0,rangeV:1,labelH:0,labelV:-1},"inside-bottom":{rangeH:0,rangeV:1,labelH:0,labelV:-1},"bottom-right":{rangeH:1,rangeV:1,labelH:1,labelV:-1},"inside-bottom-right":{rangeH:1,rangeV:1,labelH:1,labelV:-1},right:{rangeH:1,rangeV:0,labelH:-1,labelV:0},"inside-right":{rangeH:1,rangeV:0,labelH:1,labelV:0},"top-right":{rangeH:1,rangeV:-1,labelH:1,labelV:1},"inside-top-right":{rangeH:1,rangeV:-1,labelH:1,labelV:1},inside:{rangeH:0,rangeV:0,labelH:0,labelV:0}},ll={top:{rangeH:0,rangeV:-1,labelH:0,labelV:1},"inside-top":{rangeH:0,rangeV:-1,labelH:0,labelV:-1},"top-left":{rangeH:-1,rangeV:-1,labelH:1,labelV:-1},"inside-top-left":{rangeH:-1,rangeV:-1,labelH:1,labelV:-1},left:{rangeH:-1,rangeV:0,labelH:1,labelV:0},"inside-left":{rangeH:-1,rangeV:0,labelH:1,labelV:0},"bottom-left":{rangeH:-1,rangeV:1,labelH:1,labelV:1},"inside-bottom-left":{rangeH:-1,rangeV:1,labelH:1,labelV:1},bottom:{rangeH:0,rangeV:1,labelH:0,labelV:-1},"inside-bottom":{rangeH:0,rangeV:1,labelH:0,labelV:1},"bottom-right":{rangeH:1,rangeV:1,labelH:-1,labelV:1},"inside-bottom-right":{rangeH:1,rangeV:1,labelH:-1,labelV:1},right:{rangeH:1,rangeV:0,labelH:-1,labelV:0},"inside-right":{rangeH:1,rangeV:0,labelH:-1,labelV:0},"top-right":{rangeH:1,rangeV:-1,labelH:-1,labelV:-1},"inside-top-right":{rangeH:-1,rangeV:-1,labelH:-1,labelV:-1},inside:{rangeH:0,rangeV:0,labelH:0,labelV:0}},cl={top:{rangeH:0,rangeV:-1,labelH:0,labelV:1},"inside-top":{rangeH:0,rangeV:-1,labelH:0,labelV:-1},"top-left":{rangeH:-1,rangeV:-1,labelH:-1,labelV:1},"inside-top-left":{rangeH:-1,rangeV:-1,labelH:-1,labelV:-1},left:{rangeH:-1,rangeV:0,labelH:1,labelV:0},"inside-left":{rangeH:-1,rangeV:0,labelH:-1,labelV:0},"bottom-left":{rangeH:-1,rangeV:1,labelH:-1,labelV:-1},"inside-bottom-left":{rangeH:-1,rangeV:1,labelH:-1,labelV:1},bottom:{rangeH:0,rangeV:1,labelH:0,labelV:-1},"inside-bottom":{rangeH:0,rangeV:1,labelH:0,labelV:1},"bottom-right":{rangeH:1,rangeV:1,labelH:1,labelV:-1},"inside-bottom-right":{rangeH:1,rangeV:1,labelH:1,labelV:1},right:{rangeH:1,rangeV:0,labelH:-1,labelV:0},"inside-right":{rangeH:1,rangeV:0,labelH:1,labelV:0},"top-right":{rangeH:1,rangeV:-1,labelH:1,labelV:1},"inside-top-right":{rangeH:1,rangeV:-1,labelH:1,labelV:-1},inside:{rangeH:0,rangeV:0,labelH:0,labelV:0}},hl={top:{rangeH:0,rangeV:-1,labelH:0,labelV:1},"inside-top":{rangeH:0,rangeV:-1,labelH:0,labelV:-1},"top-left":{rangeH:-1,rangeV:-1,labelH:1,labelV:-1},"inside-top-left":{rangeH:-1,rangeV:-1,labelH:-1,labelV:-1},left:{rangeH:-1,rangeV:0,labelH:1,labelV:0},"inside-left":{rangeH:-1,rangeV:0,labelH:-1,labelV:0},"bottom-left":{rangeH:-1,rangeV:1,labelH:1,labelV:1},"inside-bottom-left":{rangeH:-1,rangeV:1,labelH:-1,labelV:1},bottom:{rangeH:0,rangeV:1,labelH:0,labelV:-1},"inside-bottom":{rangeH:0,rangeV:1,labelH:0,labelV:1},"bottom-right":{rangeH:1,rangeV:1,labelH:-1,labelV:1},"inside-bottom-right":{rangeH:1,rangeV:1,labelH:1,labelV:1},right:{rangeH:1,rangeV:0,labelH:-1,labelV:0},"inside-right":{rangeH:1,rangeV:0,labelH:1,labelV:0},"top-right":{rangeH:1,rangeV:-1,labelH:-1,labelV:-1},"inside-top-right":{rangeH:1,rangeV:-1,labelH:1,labelV:-1},inside:{rangeH:0,rangeV:0,labelH:0,labelV:0}},dl=class extends De{constructor(){super(...arguments),this.fontSize=14,this.fontFamily="Verdana, sans-serif",this.padding=5,this.color="rgba(87, 87, 87, 1)"}};a([Te],dl.prototype,"enabled",2),a([Te],dl.prototype,"text",2),a([Te],dl.prototype,"fontStyle",2),a([Te],dl.prototype,"fontWeight",2),a([Te],dl.prototype,"fontSize",2),a([Te],dl.prototype,"fontFamily",2),a([Te],dl.prototype,"padding",2),a([Te],dl.prototype,"color",2),a([Te],dl.prototype,"position",2),a([Te],dl.prototype,"rotation",2),a([Te],dl.prototype,"parallel",2);var ul=class extends De{constructor(){super(),this.id=(0,n.sX)(this),this.defaultColorRange=[],this.fill="#c16068",this.label=new dl,this.scale=void 0,this.clippedRange=[-1/0,1/0],this.gridLength=0,this.position="top",this.rangeGroup=new At({name:this.id}),this.lineGroup=new At({name:this.id}),this.labelGroup=new At({name:this.id}),this.crossLineRange=new il,this.crossLineLabel=new Oi,this.data=void 0,this.startLine=!1,this.endLine=!1,this._isRange=void 0,this.lineGroup.append(this.crossLineRange),this.labelGroup.append(this.crossLineLabel),this.crossLineRange.pointerEvents=1}get defaultLabelPosition(){return"top"}update(e){const{enabled:t,type:i,data:n,scale:s}=this;if(!(s&&t&&e&&ol(rl(this),s)&&null!=n))return this.rangeGroup.visible=!1,this.lineGroup.visible=!1,void(this.labelGroup.visible=!1);this.rangeGroup.visible=e,this.lineGroup.visible=e,this.labelGroup.visible=e,this.updateNodes();const r="range"===i;r!==this._isRange&&(r?this.rangeGroup.appendChild(this.crossLineRange):this.lineGroup.appendChild(this.crossLineRange)),this._isRange=r}calculateLayout(e,t){if(this.data=void 0,!e)return;const{type:i,range:n,value:s,scale:r,clippedRange:o,strokeWidth:a=0}=this;if(!r)return;const l=r.bandwidth??0,c=r.step??0,h=(t?-1:1)*(r instanceof to?(c-l)/2:0);let d,u,p,g;if("line"===i){const e=l/2;d=r.convert(s)+e,u=NaN,p=r.convert(s,{clamp:!0})+e,g=NaN}else{if(!n)return;{const[e,t]=n,i=e?.valueOf()===t?.valueOf()&&el.is(r)?l/2+h:0;d=r.convert(e)+i,u=r.convert(t)+l,p=r.convert(e,{clamp:!0})+i-h,g=r.convert(t,{clamp:!0})+l+h}}p=rr(p,o),g=rr(g,o);const f=(d===p||u===g||p!==g)&&Math.abs(g-p)>0;f&&p>g&&([p,g]=[g,p],[d,u]=[u,d]),d-h>=p&&(d-=h),u+h<=g&&(u+=h),this.startLine=a>0&&d>=p&&d<=p+h,this.endLine=a>0&&u>=g-l-h&&u<=g,("range"!==i||f||this.startLine||this.endLine)&&(this.data=[p,g],!1!==this.label.enabled&&this.label.text)}updateNodes(){const{position:e,data:[t,i]=[0,0],gridLength:n}=this,s=Number.isFinite(i)?i-t:0;let r;switch(e){case"top":case"bottom":r=new m(t,"top"===e?0:-n,s,n);break;case"left":case"right":r=new m("left"===e?0:-n,t,n,s)}this.updateRangeNode(r);const{label:o}=this;!1!==o.enabled&&o.text&&(this.updateLabel(),this.positionLabel(r))}updateRangeNode(e){const{type:t,position:i,crossLineRange:n,startLine:s,endLine:r,fill:o,fillOpacity:a,stroke:l,strokeWidth:c,strokeOpacity:h,lineDash:d}=this;n.x1=e.x,n.x2=e.x+e.width,n.y1=e.y,n.y2=e.y+e.height,n.horizontal="top"===i||"bottom"===i,n.startLine=s,n.endLine=r,n.fill="range"===t?o:void 0,n.fillOpacity=a??1,n.stroke=l,n.strokeWidth=c??1,n.strokeOpacity=h??1,n.lineDash=d}updateLabel(){const{crossLineLabel:e,label:t}=this;t.text&&(e.fontStyle=t.fontStyle,e.fontWeight=t.fontWeight,e.fontSize=t.fontSize,e.fontFamily=t.fontFamily,e.fill=t.color,e.text=t.text)}get anchor(){const e="left"===this.position||"right"===this.position,t="range"===this.type,{position:i=this.defaultLabelPosition}=this.label;return t?(e?cl:hl)[i]:(e?al:ll)[i]}positionLabel(e){const{crossLineLabel:t,label:i,anchor:n}=this;t.rotation=oe(i.rotation??0),t.textBaseline="middle",t.textAlign="center";const s=t.getBBox();if(!s)return;const{width:r,height:o}=s,a=i.padding+r/2,l=i.padding+o/2,c=e.x+e.width*(n.rangeH+1)/2-a*n.labelH,h=e.y+e.height*(n.rangeV+1)/2-l*n.labelV;t.x=c,t.y=h,t.rotationCenterX=c,t.rotationCenterY=h}computeLabelSize(){const{label:e}=this;if(!1===e.enabled||!e.text)return;const t=new Oi;t.fontFamily=e.fontFamily,t.fontSize=e.fontSize,t.fontStyle=e.fontStyle,t.fontWeight=e.fontWeight,t.text=e.text,t.rotation=oe(e.rotation??0),t.textBaseline="middle",t.textAlign="center";const i=t.getBBox();if(!i)return;const{width:n,height:s}=i;return{width:n,height:s}}calculatePadding(e){const{label:t,anchor:i}=this,n=this.computeLabelSize();if(!n)return;const{width:s,height:r}=n,o=t.padding+s,a=t.padding+r,l="left"===this.position||"right"===this.position;l&&(-1===i.rangeH&&1===i.labelH?e.left=Math.max(e.left??0,o):1===i.rangeH&&-1===i.labelH&&(e.right=Math.max(e.right??0,o))),l||(-1===i.rangeV&&1===i.labelV?e.top=Math.max(e.top??0,a):1===i.rangeV&&-1===i.labelV&&(e.bottom=Math.max(e.bottom??0,a)))}};ul.className="CrossLine",a([Te],ul.prototype,"enabled",2),a([Te],ul.prototype,"type",2),a([Te],ul.prototype,"range",2),a([Te],ul.prototype,"value",2),a([Te],ul.prototype,"defaultColorRange",2),a([Te],ul.prototype,"fill",2),a([Te],ul.prototype,"fillOpacity",2),a([Te],ul.prototype,"stroke",2),a([Te],ul.prototype,"strokeWidth",2),a([Te],ul.prototype,"strokeOpacity",2),a([Te],ul.prototype,"lineDash",2),a([Te],ul.prototype,"label",2);var pl=class extends De{constructor(){super(...arguments),this.enabled=!0}getFont(){return Ri.toFontString(this)}};function gl(e,t,i,n,s){const r=t>0&&t<=Math.PI,o=i>0&&i<=Math.PI;if(e){if(!t&&!i)return"center";if(n*(r||o?-1:1)==-1)return"end"}else if(n*s===-1)return"end";return"start"}function fl(e,t){if(null!=e)return"string"==typeof e?e:(0,n.Qd)(e)&&null!=t?e[Ea(t)]:void 0}a([Te],pl.prototype,"enabled",2),a([Te],pl.prototype,"color",2),a([Te],pl.prototype,"fontStyle",2),a([Te],pl.prototype,"fontWeight",2),a([Te],pl.prototype,"fontSize",2),a([Te],pl.prototype,"fontFamily",2),a([Te],pl.prototype,"formatter",2);var ml=class{constructor(){this.enabled=!0,this.width=1,this.style=[{stroke:void 0,lineDash:[]}]}};a([Te],ml.prototype,"enabled",2),a([Te],ml.prototype,"width",2),a([Te],ml.prototype,"style",2);var vl=class extends De{};a([Te],vl.prototype,"step",2),a([Te],vl.prototype,"values",2),a([Te],vl.prototype,"minSpacing",2),a([Te],vl.prototype,"maxSpacing",2);var yl=class extends De{constructor(){super(...arguments),this.enabled=!0,this.spacing=5,this.color="#575757",this.avoidCollisions=!0,this.mirrored=!1,this.parallel=!1}getSideFlag(){return this.mirrored?1:-1}getFont(){return Ri.toFontString(this)}};a([Te],yl.prototype,"enabled",2),a([Te],yl.prototype,"fontStyle",2),a([Te],yl.prototype,"fontWeight",2),a([Te],yl.prototype,"fontSize",2),a([Te],yl.prototype,"fontFamily",2),a([Te],yl.prototype,"spacing",2),a([Te],yl.prototype,"minSpacing",2),a([Te],yl.prototype,"color",2),a([Te],yl.prototype,"rotation",2),a([Te],yl.prototype,"avoidCollisions",2),a([Te],yl.prototype,"mirrored",2),a([Te],yl.prototype,"parallel",2),a([Te],yl.prototype,"itemStyler",2),a([Te],yl.prototype,"formatter",2),a([Te],yl.prototype,"format",2);var Cl=class{constructor(){this.enabled=!0,this.width=1,this.stroke=void 0}};a([Te],Cl.prototype,"enabled",2),a([Te],Cl.prototype,"width",2),a([Te],Cl.prototype,"stroke",2);var bl=class extends De{constructor(){super(...arguments),this.enabled=!0,this.width=1,this.size=6}};a([Te],bl.prototype,"enabled",2),a([Te],bl.prototype,"width",2),a([Te],bl.prototype,"size",2),a([Te],bl.prototype,"stroke",2);var Sl=class extends De{constructor(){super(...arguments),this.caption=new Fi,this.enabled=!1,this.spacing=Fi.SMALL_PADDING,this.fontSize=10,this.fontFamily="sans-serif",this.wrapping="always"}};a([Te],Sl.prototype,"enabled",2),a([Te],Sl.prototype,"text",2),a([Te],Sl.prototype,"spacing",2),a([Te],Sl.prototype,"fontStyle",2),a([Te],Sl.prototype,"fontWeight",2),a([Te],Sl.prototype,"fontSize",2),a([Te],Sl.prototype,"fontFamily",2),a([Te],Sl.prototype,"color",2),a([Te],Sl.prototype,"wrapping",2),a([Te],Sl.prototype,"formatter",2);var wl=(e=>(e[e.TickAndDomain=0]="TickAndDomain",e[e.TicksOnly=1]="TicksOnly",e[e.Off=2]="Off",e))(wl||{});function xl(e){const[t,i]=or(e.range),n=Math.floor(t),s=Math.ceil(i);return{min:n,max:s,visible:n!==s}}var El=2*Math.PI,Ml=El/2;function Al(e){const{min:t,max:i}=e,n=e=>e<t||e>i,s={fromFn(e,t,i){let{x1:s,x2:r,y1:o,y2:a}=e,l=e.opacity;return("added"===i||n(t.offset))&&(({x1:s,x2:r,y1:o,y2:a}=t),l=0),{x1:s,x2:r,y1:o,y2:a,opacity:l,phase:oa[i]}},toFn(e,t,i){const{x1:n,x2:s,y1:r,y2:o}=t;let a=1;return"removed"===i&&(a=0),{x1:n,x2:s,y1:r,y2:o,opacity:a}},applyFn(e,t){e.setProperties(t),e.visible=!n(e.y)}},r={fromFn(e,t,i){const s=e.previousDatum??t;let{x:r,y:o,rotationCenterX:a,rotationCenterY:l,rotation:c}=s,h=e.opacity;return"removed"===i||n(s.y)?c=t.rotation:("added"===i||n(e.datum.y))&&(({x:r,y:o,rotationCenterX:a,rotationCenterY:l,rotation:c}=t),h=0),{x:r,y:o,rotationCenterX:a,rotationCenterY:l,rotation:c,opacity:h,phase:oa[i]}},toFn(e,t,i){const{x:n,y:s,rotationCenterX:r,rotationCenterY:o}=t;let a=0,l=1;var c,h;return"added"===i?a=t.rotation:"removed"===i?(l=0,a=t.rotation):(c=e.previousDatum?.rotation??t.rotation,h=t.rotation,a=Math.abs(h-c)<Ml?h:c>h?h+El:h-El),{x:n,y:s,rotationCenterX:r,rotationCenterY:o,rotation:a,opacity:l,finish:{rotation:t.rotation}}}};return{tick:s,line:{fromFn(e,t){const{x1:i,x2:n,y1:s,y2:r}=e.previousDatum??t;return{x1:i,x2:n,y1:s,y2:r,phase:oa.updated}},toFn(e,t){const{x1:i,x2:n,y1:s,y2:r}=t;return{x1:i,x2:n,y1:s,y2:r}}},label:r,group:{fromFn(e,t){const{translationX:i,translationY:n}=e;return{translationX:i,translationY:n,phase:oa.updated}},toFn(e,t){const{translationX:i,translationY:n}=t;return{translationX:i,translationY:n}}}}}function Tl(){return(e,t)=>({translationX:t.translationX,translationY:t.translationY})}function Dl(){return(e,t)=>({x:t.x,y:t.y,rotationCenterX:t.rotationCenterX,rotationCenterY:t.rotationCenterY,rotation:t.rotation})}function Il(){return(e,t)=>{const{x1:i,x2:n,y1:s,y2:r}=t;return{x1:i,x2:n,y1:s,y2:r}}}var Rl={millisecond:"%Y %b %e %H:%M:%S.%L",second:"%Y %b %e %H:%M:%S",minute:"%Y %b %e %H:%M",hour:"%Y %b %e %H:%M",day:"%Y %b %e",month:"%Y %b",year:"%Y"},Ll={year:0,month:1,day:2,hour:3,minute:4,second:5,millisecond:6},kl=/%[-_0]?L/,Pl=/%[-_0]?S/,Nl=/%[-_0]?M/,Ol=/%[-_0]?[HI]/,_l=/^%[-_0]?[de]$/,Fl=/^%[-_0]?[Bbm]$/,Gl=/^%[-_0]?[Yy]$/,Vl=class extends(bt(pa)){},Bl=(e=>(e[e.TickLines=0]="TickLines",e[e.AxisLine=1]="AxisLine",e[e.TickLabels=2]="TickLabels",e))(Bl||{}),Hl=class e{constructor(t,i){this.moduleCtx=t,this.scale=i,this.id=(0,n.sX)(this),this.nice=!0,this.reverse=!1,this.keys=[],this.interval=new vl,this.dataDomain={domain:[],clipped:!1},this.layoutConstraints={stacked:!0,align:"start",width:100,unit:"percent"},this.boundSeries=[],this.includeInvisibleDomains=!1,this.interactionEnabled=!0,this.axisGroup=new At({name:`${this.id}-axis`}),this.tickLineGroup=this.axisGroup.appendChild(new Rt({name:`${this.id}-Axis-tick-lines`,zIndex:0})),this.tickLabelGroup=this.axisGroup.appendChild(new Rt({name:`${this.id}-Axis-tick-labels`,zIndex:2})),this.labelGroup=new At({name:`${this.id}-Labels`,zIndex:9}),this.gridGroup=new It({name:`${this.id}-Axis-grid`,zIndex:1}),this.gridLineGroup=this.gridGroup.appendChild(new At({name:`${this.id}-gridLines`})),this.crossLineRangeGroup=new Rt({name:`${this.id}-CrossLines-Range`,zIndex:4}),this.crossLineLineGroup=new Rt({name:`${this.id}-CrossLines-Line`,zIndex:8}),this.crossLineLabelGroup=new Rt({name:`${this.id}-CrossLines-Label`,zIndex:13}),this.tickLabelGroupSelection=ua.select(this.tickLabelGroup,Oi,!1),this._crossLines=[],this.line=new Cl,this.tick=new bl,this.gridLine=new ml,this.label=this.createLabel(),this.defaultTickMinSpacing=e.defaultTickMinSpacing,this.translation={x:0,y:0},this.layout={label:{fractionDigits:0,spacing:this.label.spacing,format:this.label.format}},this.axisContext=void 0,this.labelFormatter=void 0,this.datumFormatter=void 0,this.scaleFormatterParams=void 0,this.destroyFns=[],this.range=[0,1],this.visibleRange=[0,1],this.title=new Sl,this.gridLength=0,this.gridPadding=0,this.seriesAreaPadding=0,this.animatable=!0,this._cachedUnzoomedInputDomain=void 0,this._cachedUnzoomedRangeExtent=NaN,this._cachedUnzoomedTickCount=0,this.moduleMap=new wa,this.range=this.scale.range.slice(),this.crossLines.forEach(e=>this.initCrossLine(e))}get type(){return this.constructor.type??""}get labelNodes(){return this.tickLabelGroupSelection.nodes()}set crossLines(e){const{CrossLineConstructor:t}=this.constructor;this._crossLines.forEach(e=>this.detachCrossLine(e)),this._crossLines=e.map(e=>{const i=new t;return i.set(e),i}),this._crossLines.forEach(e=>{this.attachCrossLine(e),this.initCrossLine(e)})}get crossLines(){return this._crossLines}resetAnimation(e){}attachCrossLine(e){this.crossLineRangeGroup.appendChild(e.rangeGroup),this.crossLineLineGroup.appendChild(e.lineGroup),this.crossLineLabelGroup.appendChild(e.labelGroup)}detachCrossLine(e){this.crossLineRangeGroup.removeChild(e.rangeGroup),this.crossLineLineGroup.removeChild(e.lineGroup),this.crossLineLabelGroup.removeChild(e.labelGroup)}destroy(){this.moduleMap.destroy(),this.destroyFns.forEach(e=>e())}updateScale(){const{range:e,visibleRange:t,scale:i}=this,n=(e[1]-e[0])/(t[1]-t[0]),s=n*t[0],r=e[0]-s;i.range=[r,r+n],this.crossLines.forEach(t=>{t.clippedRange=[e[0],e[1]]})}setCrossLinesVisible(e){this.crossLineRangeGroup.visible=e,this.crossLineLineGroup.visible=e,this.crossLineLabelGroup.visible=e}attachAxis(e){e.gridNode.appendChild(this.gridGroup),e.axisNode.appendChild(this.axisGroup),e.labelNode.appendChild(this.labelGroup),e.crossLineRangeNode.appendChild(this.crossLineRangeGroup),e.crossLineLineNode.appendChild(this.crossLineLineGroup),e.crossLineLabelNode.appendChild(this.crossLineLabelGroup)}detachAxis(e){e.gridNode.removeChild(this.gridGroup),e.axisNode.removeChild(this.axisGroup),e.labelNode.removeChild(this.labelGroup),e.crossLineRangeNode.removeChild(this.crossLineRangeGroup),e.crossLineLineNode.removeChild(this.crossLineLineGroup),e.crossLineLabelNode.removeChild(this.crossLineLabelGroup)}attachLabel(e){this.labelGroup.append(e)}inRange(e,t=0){const[i,n]=or(this.range);return e>=i-t&&e<=n+t}getRangeOverflow(e){const{range:t,visibleRange:i}=this,n=(t[1]-t[0])/(i[1]-i[0]),[s,r]=or([t[0]-n*i[0],t[0]-n*i[0]+n]);return e<s?e-s:e>r?e-r:0}defaultDatumFormatter(e,t){return Gn(e,t+1)}defaultLabelFormatter(e,t){return Gn(e,t)}onGridLengthChange(e,t){t^e&&this.onGridVisibilityChange(),this.crossLines.forEach(e=>this.initCrossLine(e))}onGridVisibilityChange(){}createLabel(){return new yl}update(){this.updatePosition(),this.updateSelections(),this.tickLineGroup.visible=this.tick.enabled,this.gridLineGroup.visible=this.gridLine.enabled,this.tickLabelGroup.visible=this.label.enabled,this.updateLabels(),this.updateCrossLines()}getLabelStyles(e,t,i=this.label){const n={color:i.color,spacing:i.spacing,fontFamily:i.fontFamily,fontSize:i.fontSize,fontStyle:i.fontStyle,fontWeight:i.fontWeight};let s;i.itemStyler&&(s=this.callWithContext(i.itemStyler,{...e,...n}));const{color:r,fontFamily:o,fontSize:a,fontStyle:l,fontWeight:c,spacing:h}=N(s,t,n);return{fill:r,fontFamily:o,fontSize:a,fontStyle:l,fontWeight:c,spacing:h}}getTickSize(e=this.tick){return e.enabled?e.size:0}processData(){const{includeInvisibleDomains:e,boundSeries:t,direction:i}=this,n=(e?t:t.filter(e=>e.isEnabled())).map(e=>e.getDomain(i));this.setDomains(...n)}setDomains(...e){let t,i;e.length>0?({domain:t,animatable:i}=this.scale.normalizeDomains(...e)):(t=[],i=!0),this.dataDomain=this.normaliseDataDomain(t),this.reverse&&this.dataDomain.domain.reverse(),this.animatable=i}calculateLayout(e,t){const{scale:i,label:s,visibleRange:r,nice:o}=this;this.chartPadding=t,this.updateScale();const a=ar(this.range),l=this.dataDomain.domain;let c,h,d;if(0===r[0]&&1===r[1])c=void 0,h=void 0;else if(this._cachedUnzoomedInputDomain===l&&this._cachedUnzoomedRangeExtent===a)c=this.scale.domain,h=this._cachedUnzoomedTickCount;else{const e=this.calculateTickLayout(l,o?0:2,[0,1]);c=e.niceDomain,h=e.rawTickCount??0}d=o?null==c?0:1:2;const{niceDomain:u,ticks:p,rawTickCount:g=0,tickDomain:f,fractionDigits:m,bbox:v}=this.calculateTickLayout(c??l,d,r,e);h??(h=g);const y=0!==g&&0!==h?{zoomed:g,unzoomed:h}:void 0,C=Ra.is(i)?i.interval:void 0;this.scale.domain=u,this._cachedUnzoomedInputDomain=l,this._cachedUnzoomedRangeExtent=a,this._cachedUnzoomedTickCount=h;const b=fl(null==C?s.format:function(e,t){if(!(0,n.Qd)(e))return e;const i=Ea(t),{millisecond:s,second:r,minute:o,hour:a,day:l,month:c,year:h}=e,d=Ll[i],u=Rl[i];if(d>=Ll.year&&!Gl.test(h)||d>=Ll.month&&!Fl.test(c)||d>=Ll.day&&!_l.test(l))return u;let p;switch(i){case"year":return h;case"month":return`${c} ${h}`;case"day":return`${c} ${l} ${h}`;case"hour":p=a;break;case"minute":p=o;break;case"second":p=r;break;case"millisecond":p=s;break;default:return u}return d>=Ll.hour&&!Ol.test(p)||d>=Ll.minute&&!Nl.test(p)||d>=Ll.second&&!Pl.test(p)||d>=Ll.millisecond&&!kl.test(p)?u:`${p} ${c} ${l} ${h}`}(s.format,C),C);return this.labelFormatter=i.tickFormatter({domain:f,specifier:b,ticks:p,fractionDigits:m})??(e=>this.defaultLabelFormatter(e,m)),this.datumFormatter=i.datumFormatter({domain:f,specifier:b,ticks:p,fractionDigits:m})??(e=>this.defaultDatumFormatter(e,m)),this.scaleFormatterParams={domain:f,ticks:p,fractionDigits:m},this.layout.label={fractionDigits:m,spacing:this.label.spacing,format:this.label.format},this.layoutCrossLines(),{primaryTickCount:y,bbox:v}}updateCrossLines(){const e=this.isAnySeriesActive();this.crossLines.forEach(t=>{t.update(e)})}updatePosition(){const{crossLineRangeGroup:e,crossLineLineGroup:t,crossLineLabelGroup:i,gridGroup:n,translation:s}=this,r=Math.floor(s.x),o=Math.floor(s.y);n.setProperties({translationX:r,translationY:o}),e.setProperties({translationX:r,translationY:o}),t.setProperties({translationX:r,translationY:o}),i.setProperties({translationX:r,translationY:o})}formatTick(e,t,i,n,s,r){const{labelFormatter:o,label:{formatter:a}}=this;let l;if(a){const r=this.getFormatterBoundSeries(),o=s?Ea(s):void 0,c=s?xa(s).step:void 0;l=this.callWithContext(a,{value:e,index:t,domain:i,fractionDigits:n,unit:o,step:c,boundSeries:r})}else r?l=r(e):o&&(l=o(e));return String(l??e)}formatDatum(e){const{label:{formatter:t},datumFormatter:i=this.labelFormatter}=this;let s;if(t){const{domain:i}=this.scale,n=this.getFormatterBoundSeries();s=this.callWithContext(t,{value:e,index:NaN,domain:i,boundSeries:n})}else i?s=this.callWithContext(i,e):(0,n.cy)(e)&&(s=e.filter(Boolean).join(" - "));return String(s??e)}getScaleValueFormatter(e){const{scaleFormatterParams:t}=this;let i;try{null!=e&&null!=t&&(i=this.scale.tickFormatter({...t,specifier:e}))}catch{n.Vy.warnOnce(`the format string ${e} is invalid, ignoring.`)}return i??(i=e=>this.formatDatum(e)),i}getBBox(){return this.axisGroup.getBBox()}initCrossLine(e){e.scale=this.scale,e.gridLength=this.gridLength}isAnySeriesActive(){return this.boundSeries.some(e=>this.includeInvisibleDomains||e.isEnabled())}clipTickLines(e,t,i,n){this.tickLineGroup.setClipRect(new m(e,t,i,n))}clipGrid(e,t,i,n){this.gridGroup.setClipRect(new m(e,t,i,n))}getFormatterBoundSeries(){const{direction:e}=this,t=[];for(const i of this.boundSeries){const n=i.getKeys(e),s=i.getNames(e);for(let e=0;e<n.length;e++)t.push({key:n[e],name:s[e]})}return t}getTitleFormatterParams(e){const{direction:t}=this;return{domain:e,direction:t,boundSeries:this.getFormatterBoundSeries(),defaultValue:this.title?.text}}normaliseDataDomain(e){return{domain:[...e],clipped:!1}}getLayoutState(){return{id:this.id,rect:this.getBBox(),gridPadding:this.gridPadding,seriesAreaPadding:this.seriesAreaPadding,tickSize:this.getTickSize(),direction:this.direction,domain:this.dataDomain.domain,scale:this.scale,...this.layout}}getModuleMap(){return this.moduleMap}createModuleContext(){return this.axisContext??(this.axisContext=this.createAxisContext()),{...this.moduleCtx,parent:this.axisContext}}createAxisContext(){const{scale:e}=this;return{axisId:this.id,scale:this.scale,direction:this.direction,continuous:cr.is(e)||io.is(e),getCanvasBounds:()=>wt.toCanvas(this.axisGroup),seriesKeyProperties:()=>this.boundSeries.reduce((e,t)=>(t.getKeyProperties(this.direction).forEach(t=>e.add(t)),e),new Set),seriesIds:()=>this.boundSeries.map(e=>e.id),scaleValueFormatter:e=>this.getScaleValueFormatter(e),scaleInvert:t=>e.invert(t,!0),scaleInvertNearest:t=>e.invert(t,!0),attachLabel:e=>this.attachLabel(e),inRange:(e,t)=>this.inRange(e,t),getRangeOverflow:e=>this.getRangeOverflow(e)}}isReversed(){return this.reverse}callWithContext(e,...t){const{callbackCache:i,chartService:n}=this.moduleCtx;return i.call(this,n,e,...t)}};Hl.defaultTickMinSpacing=50,Hl.CrossLineConstructor=ul,a([Te],Hl.prototype,"nice",2),a([Te],Hl.prototype,"reverse",2),a([Te],Hl.prototype,"keys",2),a([Te],Hl.prototype,"interval",2),a([Te],Hl.prototype,"title",2),a([ci((e,t,i)=>e.onGridLengthChange(t,i))],Hl.prototype,"gridLength",2);var zl=Hl;function Ul(){const e=new Map;return t=>{const i=e.get(t);return i?(e.set(t,i+1),`${t}_${i}`):(e.set(t,1),t)}}var Wl=class{constructor(e){this.axis=e}estimateTickCount(e,t,i){const{scale:n,range:s,defaultTickMinSpacing:r}=this.axis,o=Ra.is(n)?Ra.defaultTickCount:cr.defaultTickCount;return qa(ar(s),ar(e),t,i,o,r)}filterTicks(e,t){const{minSpacing:i,maxSpacing:n}=this.axis.interval,s=null!=i||null!=n?Math.ceil(e.length/t):2,r=e.length%s?-1:0;return e.filter((e,t)=>(t+r)%s===0)}generateTicks({domain:e,primaryTickCount:t,visibleRange:i,niceMode:n,parallelFlipRotation:s,regularFlipRotation:r,labelX:o,sideFlag:a,removeOverflowLabels:l,removeOverflowThreshold:c=0}){const{scale:h,label:d,primaryLabel:u,interval:{minSpacing:p,maxSpacing:g}}=this.axis,{parallel:f,fontFamily:v,fontSize:y,fontStyle:C,fontWeight:b}=d,S=void 0!==t,{defaultRotation:w,configuredRotation:x,parallelFlipFlag:E,regularFlipFlag:M}=function(e,t,i=0,n=0){const s=de(e),r=!s&&n>=0&&n<=Math.PI?-1:1,o=!s&&i>=0&&i<=Math.PI?-1:1;let a=0;return t?a=r*Math.PI/2:-1===o&&(a=Math.PI),{configuredRotation:s,defaultRotation:a,parallelFlipFlag:r,regularFlipFlag:o}}(d.rotation,f,r,s),{maxTickCount:A}=this.estimateTickCount(i,p,g),T=!cr.is(h)&&!io.is(h)||isNaN(A)?10:A;let D=gl(f,x,0,a,M);const I=function(e,t,i,n,s){return e&&!t?i*n===-1?s?"hanging":"top":"bottom":"middle"}(f,x,a,E,null==u),R=Ri.toFontString({fontFamily:v,fontSize:y,fontStyle:C,fontWeight:b}),L=Di.getMeasurer({font:R}),k={fontFamily:v,fontSize:y,fontStyle:C,fontWeight:b,textBaseline:I,textAlign:D},P=d.enabled&&d.avoidCollisions,N=x+w,O=new pt,_=e=>{const t=N+e;pt.updateTransformMatrix(O,1,1,t,0,0)},F=({ticks:e},t)=>(_(t),function(e,t,i,n){const s=[];for(const{tickLabel:r,translationY:o}of e){if(!r)continue;const{x:e,y:a}=i.transformBBox(new m(t,o,0,0)),{width:l,height:c}=n.measureLines(r);s.push({point:{x:e,y:a},label:{text:r,width:l,height:c}})}return s}(e,o,O,L)),G=(t,i)=>{if(!P)return!1;const n=0!==x||0!==i,s=function(e,t){return null!=e?e:t?0:10}(d.minSpacing,n);return bo(((t,i)=>{const{niceDomain:n,ticks:s,rawTicks:r,timeInterval:a}=t;if(null==a)return[];_(i);const l=function(e){if(e.length<2)return 1/0;let t=0,i=e[0].translationY;for(let n=1;n<e.length;n++){const s=e[n].translationY,r=Math.abs(s-i);t=Math.max(t,r),i=s}return t}(s),{width:c,height:p}=function(e,t,i,n,s,r,o){const a={domain:n,ticks:s,fractionDigits:0,specifier:fl(t.format,r)??("string"==typeof t.format?t.format:void 0)},l=e.tickFormatter(a),c=r?Ma(r):void 0,h=fl(i?.format,c),d=h?e.tickFormatter({...a,specifier:h}):l,u=new Date(n[0]),p=new Date(n[n.length-1]),g=c?.range(new Date(n[0]),new Date(n[n.length-1]),{extend:!0});let f=0,m=0;if(null!=l){let e,t;null!=g&&g.length>1?(e=g[0],t=g[1]):(e=u,t=p);const i=Ta(r,e,t,{limit:50});for(const e of i){const t=l(e),{width:i,height:n}=o.measureLines(t);f=Math.max(f,i),m=Math.max(m,n)}}if(null!=d&&null!=g)for(const e of g){const t=d(e),{width:i,height:n}=o.measureLines(t);f=Math.max(f,i),m=Math.max(m,n)}return{width:Math.ceil(f),height:Math.ceil(m)}}(h,d,u,n??e,r,a,L);return function({width:e,height:t,spacing:i},n,s){const r=[];for(const o of[0,i]){const{x:i,y:a}=s.transformBBox(new m(n,o,0,0));r.push({point:{x:i,y:a},label:{text:void 0,width:e,height:t}})}return r}({width:c,height:p,spacing:l},o,O)})(t,i),s)||bo(F(t,i),s)};let V={tickDomain:[],ticks:[],rawTicks:[],rawTickCount:void 0,timeInterval:void 0,fractionDigits:0,niceDomain:void 0},B=0,H=0,z=!0,U=!1;for(;!U&&z&&B<=T;){H=0;for(const s of this.getTickStrategies({domain:e,niceMode:n,secondaryAxis:S,index:B}))({tickData:V,index:B,autoRotation:H,terminate:U}=s({index:B,tickData:V,textProps:k,terminate:U,primaryTickCount:t,visibleRange:i,labelsOverlap:()=>G(V,H)}));z=G(V,H)}D=gl(f,x,H,a,M);const W=x+H;if(l&&V.ticks.length>2){const e=F(V,H),t=V.ticks.at(-1),n=e.at(-1);if(null!=t&&null!=n&&t.translationY+n.label.width/2>this.axis.range[1]+c){t.tickLabel=void 0;const e=V.ticks[0];0===e.translationY&&0===i[0]&&1===i[1]&&(e.tickLabel=void 0)}}return{tickData:V,rotation:W,textBaseline:I,textAlign:D}}getTickStrategies({domain:e,niceMode:t,index:i,secondaryAxis:n}){const{scale:s,label:r,interval:o}=this.axis,{minSpacing:a}=o,l=cr.is(s)||io.is(s),c=r.enabled&&r.avoidCollisions,h=!l&&0!==i&&c,d=!0===r.autoRotate&&void 0===r.rotation,u=[];let p;if(p=o.values?3:n?1:h?2:0,u.push(({index:i,tickData:n,primaryTickCount:s,visibleRange:r,terminate:o})=>this.createTickData(e,t,r,s,p,i,n,o)),!l&&null!=a){const i=({index:i,tickData:n,primaryTickCount:s,visibleRange:r,terminate:o})=>this.createTickData(e,t,r,s,2,i,n,o);u.push(i)}if(c&&d){const e=({index:e,tickData:t,labelsOverlap:i,terminate:n})=>({index:e,tickData:t,autoRotation:i()?de(r.autoRotateAngle):0,terminate:n});u.push(e)}return u}ticksEqual(e,t){if(e.length!==t.length)return!1;for(let i=0;i<e.length;i+=1)if(e[i]?.valueOf()!==t[i]?.valueOf())return!1;return!0}createTickData(e,t,i,n,s,r,o,a){const{scale:l,interval:c}=this.axis,{step:h,values:d,minSpacing:u,maxSpacing:p}=c,{maxTickCount:g,minTickCount:f,tickCount:m}=this.estimateTickCount(i,u,p),v=cr.is(l)||io.is(l),y=!v||isNaN(g)?10:g,C=e=>v?Math.max(m-e,f):g,b=o.rawTicks,S=null==h&&null==d&&C(r)>f&&(v||2===s),w={domain:e,niceMode:t,visibleRange:i,primaryTickCount:n,tickGenerationType:s,previousTicks:b,minTickCount:f,maxTickCount:g,tickCount:0};if(w.tickCount=C(r),o=this.getTicks(w),S&&this.ticksEqual(o.rawTicks,b)){let e=r,t=y;for(;e<=t;)r=(e+t)/2|0,w.tickCount=C(r),o=this.getTicks(w),this.ticksEqual(o.rawTicks,b)?e=r+1:t=r-1}return a||(a=null!=h||null!=d),{tickData:o,index:r+=1,autoRotation:0,terminate:a}}getTimeIntervalTicks(e,t,i){const s=Ma(i);if(null==s)return;const{scale:r,reverse:o}=this.axis;if(!Xa.is(r)&&!io.is(r))return;o&&(e=[1-e[1],1-e[0]]);const a=Math.min(r.domain[0].valueOf(),r.domain[r.domain.length-1].valueOf()),l=Math.max(r.domain[0].valueOf(),r.domain[r.domain.length-1].valueOf());let[c,h]=Cr.extent(new Date(a),new Date(l),e);c=s.floor(c),c.valueOf()>=a&&(c=s.previous(c)),h=s.ceil(h),h.valueOf()<=l&&(h=s.next(h));const d=s.range(c,h),u=Aa(i),p=Ra.is(r)&&null!=r.interval&&Aa(r.interval)<u;let g,f=new Set;if(Xa.is(r)||Ra.is(r)){g=[];const e={...t,interval:i},s=!Ra.is(r)||p;for(let t=0;t<d.length-1;t+=1){const i=d[t],o=d[t+1],c=t===d.length-2,h=o.valueOf()-i.valueOf(),p=[Math.max((a-i.valueOf())/h,0),Math.min((l-i.valueOf())/h,1)],m=s?this.timeScaleTicks(e,[i,o],p,!0):r.ticks(e,[i,o],p,!0)?.ticks??[];if((0,n.nm)(m,e=>e.valueOf()<i.valueOf()),c||(0,n.xA)(m,e=>s?e.valueOf()+u>o.valueOf():e.valueOf()>=o.valueOf()),0===m.length)continue;const v=La(m[0],i);(s?0===v:v<=u)&&f.add(g.length),g.push(...m)}}else if(el.is(r)){g=r.ticks(t,void 0,e,!0)?.ticks??[];let i=0;for(let e=0;e<g.length;e++){const t=g[e];let n=!1;for(;i<d.length&&La(d[i],t)<=0;)n=!0,i++;n&&f.add(e)}}else g=[];return(0===f.size||1===f.size&&f.has(0))&&(f=void 0),{ticks:g,tickCount:void 0,primaryTicksIndices:f,interpolate:p}}timeScaleTicks(e,t,i,n){const{interval:s}=e;if(null==s)return t;const r=t[0].valueOf(),o=t[1].valueOf();if("number"!=typeof s)return xa(s).every(1,{snapTo:t[0]}).range(t[0],t[1],{visibleRange:i,extend:n});const a=[];for(let e=r;e<=o;e+=s){const t=new Date(e);a.push(t)}return a}getTicks({domain:e,niceMode:t,visibleRange:i,tickGenerationType:s,previousTicks:r,tickCount:o,minTickCount:a,maxTickCount:l,primaryTickCount:c}){const{axis:h}=this,{label:d,primaryLabel:u,range:p,scale:g,interval:f}=h,m=Ul(),v={nice:0===t,interval:f.step,tickCount:o,minTickCount:a,maxTickCount:l},y={...v,nice:0===t||1===t};let C;1===s&&null!=c&&cr.is(g)&&(C=function(e,t,i,s,r){let[o,a]=or(t.map(Number));const l=Math.floor(i.unzoomed);if(l<=1){const[t,i]=function(e,t){let i=e,n=t,s=0;do{[i,n]=Ya(i,n);const{ticks:e}=Va(i,n,5);if(e.length%2==1)return[i,n];i-=1,n+=1}while(s++<10);return[e,t]}(o,a),n=5*Math.pow(2,-Math.ceil(Math.log2(r[1]-r[0]))),{ticks:l}=Va(t,i,n,void 0,void 0,r),c=[e.toDomain(t),e.toDomain(i)];return s&&c.reverse(),{domain:c,ticks:l}}if(o===a){const e=Math.floor(Math.log10(o)),t=Math.pow(10,e),i=Math.min(t,1),n=l-1;o-=i*Math.floor(n/2),a=o+i*n}let c=o,h=a;c=function(e,t,i){e=Math.floor(e);const n=Math.abs(t-e)/(i-1),s=Math.floor(Math.log10(n)),r=Math.pow(10,s);return Math.floor(e/r)*r}(c,h,l);const d=function(e,t,i){return function(e){const t=Math.floor(Math.log10(e)),i=Math.pow(10,t),n=e/i;return n>0&&n<=1?i:n>1&&n<=2?2*i:n>2&&n<=5?5*i:n>5&&n<=10?10*i:e}((t-e)/(i-1))}(c,h,l);h=c+(l-1)*d;const u=Math.floor(c/d)*d,p=Math.floor(h/d)*d;u<=o&&p>=a&&(c=u,h=p);const g=[e.toDomain(c),e.toDomain(h)];s&&g.reverse();const f=function(e,t,i){const s=(0,n.o3)(t),r=Math.pow(10,s),o=[];for(let n=0;n<i;n++){const i=e+t*n;o.push(Math.round(i*r)/r)}return o}(c,d*((i.unzoomed-1)/(i.zoomed-1)),Math.floor(i.zoomed));return{domain:g,ticks:f}}(g,e,c,h.reverse,i));const b=0===t?C?.domain??g.niceDomain(v,e):e;let S,w,x,E,M=b,A=!1;const T=g.domain;switch(g.domain=b,s){case 3:if(M=f.values,S=f.values,w=S.length,A=Ra.is(g),cr.is(g)){const[e,t]=or(b.map(Number));S=S.filter(i=>Number(i)>=e&&Number(i)<=t).sort((e,t)=>Number(e)-Number(t))}break;case 1:if(C)S=C.ticks,w=C.ticks.length;else{const e=g.ticks(y,b,i);S=e?.ticks??[],w=e?.count}break;case 2:S=this.filterTicks(r,o),w=void 0;break;default:{if(b.length>0&&null==y.interval&&(Ra.is(g)||null!=u&&(Xa.is(g)||el.is(g)))){const e=b;x=za(Math.min(e[0].valueOf(),e[e.length-1].valueOf()),Math.max(e[0].valueOf(),e[e.length-1].valueOf()),o,a,l,{weekStart:null==u?Lr:void 0,primaryOnly:Ra.is(g)})}const e=Ra.is(g)?g.interval:void 0;null!=e&&null!=x&&Aa(e)>Aa(x)&&(x=e);const t=x?this.getTimeIntervalTicks(i,y,x):void 0;if(t)({ticks:S,tickCount:w,primaryTicksIndices:E,interpolate:A}=t);else{const e=Ra.is(g)&&null!=x?{...y,interval:y.interval??x}:y,t=g.ticks(e,b,i);S=t?.ticks??[],w=t?.count}}}const D=S.reduce((e,t)=>Math.max(e,"number"==typeof t?(0,n.o3)(t):0),0),I={domain:M,ticks:S,fractionDigits:D,specifier:fl(d.format,x)??("string"==typeof d.format?d.format:void 0)},R=g.tickFormatter(I),L=fl(u?.format,x?Ma(x):void 0),k=L?g.tickFormatter({...I,specifier:L}):R,P=(g.bandwidth??0)/2,N=[];for(let e=0;e<S.length;e++){const t=S[e],i=g.convert(t,{interpolate:A})+P,n=E?.has(e)??!1;if(p.length>0&&!h.inRange(i,.001))continue;const s=n&&!0===u?.enabled?k:R,r=d.enabled?h.formatTick(t,e,b,D,x,s):"";N.push({tick:t,tickId:m(r),tickLabel:r,translationY:Math.floor(i),primary:n})}return g.domain=T,{tickDomain:M,rawTicks:S,rawTickCount:w,fractionDigits:D,timeInterval:x,ticks:N,niceDomain:b}}},jl=class extends yl{constructor(){super(...arguments),this.autoRotateAngle=335}};a([Te],jl.prototype,"autoRotate",2),a([Te],jl.prototype,"autoRotateAngle",2);var Kl=class e extends zl{constructor(e,t){let i;super(e,t),this.headingLabelGroup=this.axisGroup.appendChild(new It({name:`${this.id}-Axis-heading`})),this.lineNodeGroup=this.axisGroup.appendChild(new It({name:`${this.id}-Axis-line`})),this.lineNode=this.lineNodeGroup.appendChild(new pa({zIndex:1})),this.tickLineGroupSelection=ua.select(this.tickLineGroup,pa,!1),this.gridLineGroupSelection=ua.select(this.gridLineGroup,pa,!1),this.tempText=new Oi({debugDirty:!1}),this.tempCaption=new Fi,this.tickGenerator=new Wl(this),this.generatedTicks=void 0,this.animationManager=e.animationManager,this.animationState=new ba("empty",{empty:{update:{target:"ready",action:()=>this.resetSelectionNodes()},reset:"empty"},ready:{update:e=>this.animateReadyUpdate(e),resize:()=>this.resetSelectionNodes(),reset:"empty"}}),this.headingLabelGroup.appendChild(this.title.caption.node),this.destroyFns.push(e.layoutManager.addListener("layout:complete",e=>{const t=[e.chart.width,e.chart.height];null==i||(0,n.r1)(t,i)||this.animationState.transition("resize"),i=t}),this.title.caption.registerInteraction(this.moduleCtx,"afterend"))}static is(t){return t instanceof e}get primaryLabel(){}get primaryTick(){}get horizontal(){return"top"===this.position||"bottom"===this.position}onGridVisibilityChange(){this.gridLineGroupSelection.clear()}resetAnimation(e){"initial"===e&&this.animationState.transition("reset")}get direction(){return"top"===this.position||"bottom"===this.position?"x":"y"}createAxisContext(){return{...super.createAxisContext(),position:this.position}}createLabel(){return new jl}updateDirection(){switch(this.position){case"top":this.label.mirrored=!0,this.label.parallel=!0;break;case"right":this.label.mirrored=!0,this.label.parallel=!1;break;case"bottom":this.label.mirrored=!1,this.label.parallel=!0;break;case"left":this.label.mirrored=!1,this.label.parallel=!1}this.axisContext&&(this.axisContext.position=this.position,this.axisContext.direction=this.direction)}calculateLayout(e,t){return this.updateDirection(),super.calculateLayout(e,t)}layoutCrossLines(){const e=this.isAnySeriesActive();this.crossLines.forEach(t=>{t.calculateLayout?.(e,this.reverse)})}calculateTickLayout(e,t,i,n){const s=this.label.getSideFlag(),r=this.horizontal?-.5*Math.PI:0,o=ie(r),a=ie(r-Math.PI/2),l=s*(this.getTickSize()+this.label.spacing+this.seriesAreaPadding);if(2===t&&!1===this.label.enabled&&!1===this.tick.enabled&&!1===this.gridLine.enabled){const{bbox:t,spacing:i}=this.tickBBox(e,[],[]);return this.generatedTicks={ticks:[],tickLines:[],gridLines:[],labels:[],spacing:i},{ticks:[],rawTickCount:0,tickDomain:e,niceDomain:e,fractionDigits:0,timeInterval:void 0,bbox:t}}const c=this.horizontal&&cr.is(this.scale),h=this.tickGenerator.generateTicks({domain:e,niceMode:t,visibleRange:i,primaryTickCount:n,parallelFlipRotation:o,regularFlipRotation:a,labelX:l,sideFlag:s,removeOverflowLabels:c,removeOverflowThreshold:this.chartPadding?.right}),{tickData:d}=h,{ticks:u,tickDomain:p,rawTicks:g,rawTickCount:f,fractionDigits:m,timeInterval:v,niceDomain:y=e}=d,C=u.map(e=>this.getTickLabelProps(e,h)),{position:b,horizontal:S,gridPadding:w,gridLength:x}=this,E="bottom"===b||"right"===b?-1:1,M=w,A=E*x-w,{gridLine:T}=this,D=u.map(({tickId:e,translationY:t},i)=>{const[n,s,r,o]=S?[t,M,t,A]:[M,t,A,t],{style:a,width:l}=T,{stroke:c,lineDash:h}=a[i%a.length]??{};return{tickId:e,offset:t,x1:n,y1:s,x2:r,y2:o,stroke:c,strokeWidth:l,lineDash:h}}),{tick:I,primaryTick:R}=this,L=u.map(({primary:e,tickId:t,translationY:i})=>{const n=e&&R?.enabled?R:I,s=-E*this.getTickSize(n),[r,o,a,l]=S?[i,0,i,s]:[0,i,s,i],{stroke:c,width:h}=n;return{tickId:t,offset:i,x1:r,y1:o,x2:a,y2:l,stroke:c,strokeWidth:h,lineDash:void 0}}),{bbox:k,spacing:P}=this.tickBBox(p,u,C);return this.generatedTicks={ticks:u,gridLines:D,tickLines:L,labels:C,spacing:P},{ticks:g,rawTickCount:f,tickDomain:p,niceDomain:y,fractionDigits:m,timeInterval:v,bbox:k}}update(){this.updateDirection();const e=Array.from(this.tickLabelGroupSelection.nodes(),e=>e.datum.tickId);super.update(),this.tickLineGroup.visible=this.tick.enabled||(this.primaryTick?.enabled??!1),this.tickLabelGroup.visible=this.label.enabled||(this.primaryTick?.enabled??!1);const{generatedTicks:t}=this;if(this.updateTitle(this.scale.domain,t?.spacing??0),this.animatable||this.moduleCtx.animationManager.skipCurrentBatch(),this.generatedTicks){const{ticks:t}=this.generatedTicks;if(this.animationManager.isSkipped())this.resetSelectionNodes();else{const i=t.map(e=>e.tickId),s=(0,n.E3)(e,i);this.animationState.transition("update",s)}}const{enabled:i,stroke:s,width:r}=this.line;this.lineNode.setProperties({stroke:s,strokeWidth:i?r:0}),this.updateTickLines(),this.updateGridLines()}getAxisTransform(){return{translationX:Math.floor(this.translation.x),translationY:Math.floor(this.translation.y)}}updatePosition(){super.updatePosition();const e=this.getAxisTransform();this.tickLineGroup.datum=e,this.tickLabelGroup.datum=e,this.lineNodeGroup.datum=e,this.headingLabelGroup.datum=e}getAxisLineCoordinates(){const{horizontal:e}=this,[t,i]=or(this.range);return e?{x1:t,x2:i,y1:0,y2:0}:{x1:0,x2:0,y1:t,y2:i}}getTickLineBBox(e){const{position:t,primaryTick:i}=this,n=Math.max(this.getTickSize(),i?.enabled?this.getTickSize(i):0),{translationY:s}=e;switch(t){case"top":return new m(s,-n,s,n);case"bottom":return new m(s,0,s,n);case"left":return new m(-n,s,n,s);case"right":return new m(0,s,n,s)}}lineNodeBBox(){const{position:e,seriesAreaPadding:t}=this,{y1:i,y2:n}=this.getAxisLineCoordinates(),s=n-i;switch(e){case"top":return new m(i,-t,s,t);case"bottom":return new m(i,0,s,t);case"left":return new m(-t,i,t,s);case"right":return new m(0,i,t,s)}}titleBBox(e,t){const{tempCaption:i}=this;return i.node.setProperties(this.titleProps(i,e,t)),i.node.getBBox()}tickBBox(e,t,i){const{tick:s,primaryTick:r,label:o,primaryLabel:a,title:l,position:c,horizontal:h,seriesAreaPadding:d}=this,u=[];if(u.push(this.lineNodeBBox()),s.enabled||r?.enabled)for(const e of t)u.push(this.getTickLineBBox(e));const{tempText:p}=this;if(o.enabled)for(const e of i){if(!e.visible)continue;p.setProperties(e);const t=p.getBBox();t&&u.push(t)}if(a?.enabled&&null!=a.format&&"bottom"===c){const{fontSize:e,format:t}=a,i=((0,n.Qd)(t)?Object.values(t):[t]).reduce((e,t)=>Math.max(e,(0,n.lt)(t)),0),o=this.getTickSize(r??s)+a.spacing+d,l=2,c=i*Ri.getLineHeight(e)+l;u.push(new m(0,o,1,c))}let g=0;if(l.enabled){const t=m.merge(u);g=h?t.height:t.width,u.push(this.titleBBox(e,g))}return{bbox:m.merge(u),spacing:g}}titleProps(e,t,i){const{title:n}=this;if(!n.enabled)return e.enabled=!1,{visible:!1,text:"",textBaseline:"bottom",x:0,y:0,rotationCenterX:0,rotationCenterY:0,rotation:0};e.enabled=!0,e.color=n.color,e.fontFamily=n.fontFamily,e.fontSize=n.fontSize,e.fontStyle=n.fontStyle,e.fontWeight=n.fontWeight,e.wrapping=n.wrapping;const s=(n.spacing??0)+i,{range:r}=this,o=(r[0]+r[1])/2;let a,l,c,h;switch(this.position){case"top":a=o,l=-s,c=0,h="bottom";break;case"bottom":a=o,l=s,c=0,h="top";break;case"left":a=-s,l=o,c=-.5*Math.PI,h="bottom";break;case"right":a=s,l=o,c=.5*Math.PI,h="bottom"}const{formatter:d=e=>e.defaultValue}=n,u=this.callWithContext(d,this.getTitleFormatterParams(t));return e.text=u,{visible:!0,text:u,textBaseline:h,x:a,y:l,rotationCenterX:a,rotationCenterY:l,rotation:c}}getTickLabelProps(e,t){const{horizontal:i,primaryLabel:n,primaryTick:s,seriesAreaPadding:r,scale:o}=this,{tickId:a,tickLabel:l="",translationY:c,primary:h}=e,d=h&&n?.enabled?n:this.label,u=h&&s?.enabled?s:this.tick,{rotation:p,textBaseline:g,textAlign:f}=t,{range:m}=o,v=this.label.getSideFlag()*(this.getTickSize(u)+d.spacing+r),y=""!==l,C=i?c:v,b=i?-v:c;return{...this.getLabelStyles({value:l},void 0,d),tickId:a,rotation:p,text:l,textAlign:f,textBaseline:g,visible:y,x:C,y:b,rotationCenterX:C,rotationCenterY:b,range:m}}updateSelections(){if(!this.generatedTicks)return;const e=this.getAxisLineCoordinates(),{tickLines:t,gridLines:i,labels:n}=this.generatedTicks,s=e=>e.tickId;this.lineNode.datum=e,this.gridLineGroupSelection.update(this.gridLine.enabled?i:[],void 0,s),this.tickLineGroupSelection.update(t,void 0,s),this.tickLabelGroupSelection.update(n,void 0,s)}updateGridLines(){this.gridLineGroupSelection.each((e,t)=>{e.stroke=t.stroke,e.strokeWidth=t.strokeWidth,e.lineDash=t.lineDash})}updateTickLines(){this.tickLineGroupSelection.each((e,t)=>{e.stroke=t.stroke,e.strokeWidth=t.strokeWidth,e.lineDash=t.lineDash})}updateTitle(e,t){const{caption:i}=this.title,n=this.titleProps(i,e,t);i.node.visible=n.visible,i.node.text=n.text,i.node.textBaseline=n.textBaseline,i.node.datum=n}updateLabels(){this.label.enabled&&this.tickLabelGroupSelection.each((e,t)=>{e.fill=t.fill,e.fontFamily=t.fontFamily,e.fontSize=t.fontSize,e.fontStyle=t.fontStyle,e.fontWeight=t.fontWeight,e.text=t.text,e.textBaseline=t.textBaseline,e.textAlign=t.textAlign??"center"})}animateReadyUpdate(e){const{animationManager:t}=this.moduleCtx,i=Al(xl(this));aa(this.id,"axis-group",t,[this.lineNodeGroup,this.tickLabelGroup,this.tickLineGroup,this.headingLabelGroup],i.group),aa(this.id,"line",t,[this.lineNode],i.line),aa(this.id,"line-paths",t,[this.gridLineGroupSelection,this.tickLineGroupSelection],i.tick,(e,t)=>t.tickId,e),aa(this.id,"tick-labels",t,[this.tickLabelGroupSelection],i.label,(e,t)=>t.tickId,e),aa(this.id,"title",t,[this.title.caption.node],i.label,(e,t)=>t.tickId,e)}resetSelectionNodes(){da([this.lineNodeGroup,this.tickLabelGroup,this.tickLineGroup,this.headingLabelGroup],(e,t)=>({translationX:t.translationX,translationY:t.translationY})),da([this.gridLineGroupSelection,this.tickLineGroupSelection],(e,t)=>{const{x1:i,x2:n,y1:s,y2:r}=t;return{x1:i,x2:n,y1:s,y2:r}}),da([this.tickLabelGroupSelection],(e,t)=>({x:t.x,y:t.y,rotationCenterX:t.rotationCenterX,rotationCenterY:t.rotationCenterY,rotation:t.rotation})),da([this.title.caption.node],(e,t)=>({x:t.x,y:t.y,rotationCenterX:t.rotationCenterX,rotationCenterY:t.rotationCenterY,rotation:t.rotation})),da([this.lineNode],(e,t)=>{const{x1:i,x2:n,y1:s,y2:r}=t;return{x1:i,x2:n,y1:s,y2:r}})}};a([Te],Kl.prototype,"thickness",2),a([Te],Kl.prototype,"position",2);var $l=Kl,Yl=["top","right","bottom","left"];function ql(e){return"string"==typeof e&&Yl.includes(e)}var Xl=["direction","xKey","yKey","sizeKey","angleKey","radiusKey","normalizedTo"];function Zl(e){const{series:t}=e;return t?.[0]?.type??"line"}function Ql(e){const t=Zl(e);return Qo.isCartesian(t)||function(e){const t=$o(e)?.find(e=>"cartesian"===e);return"cartesian"===t}(t)}function Jl(e){const t=Zl(e);return Qo.isPolar(t)||function(e){const t=$o(e)?.find(e=>"polar"===e);return"polar"===t}(t)}function ec(e){const t=Zl(e);return Qo.isHierarchy(t)||function(e){const t=$o(e)?.find(e=>"hierarchy"===e);return"hierarchy"===t}(t)}function tc(e){const t=Zl(e);return Qo.isTopology(t)||function(e){const t=$o(e)?.find(e=>"topology"===e);return"topology"===t}(t)}function ic(e){const t=Zl(e);return Qo.isFlowProportion(t)||function(e){const t=$o(e)?.find(e=>"flow-proportion"===e);return"flow-proportion"===t}(t)}function nc(e){const t=Zl(e);return Qo.isStandalone(t)||function(e){const t=$o(e)?.find(e=>"standalone"===e);return"standalone"===t}(t)}function sc(e){const t=Zl(e);return Qo.isGauge(t)||function(e){const t=$o(e)?.find(e=>"gauge"===e);return"gauge"===t}(t)}var rc=class extends wa{applyOptions(e){for(const t of this.moduleMap.values())t.module.optionsKey in e&&Re(t.moduleInstance)&&t.moduleInstance.set(e[t.module.optionsKey])}*legends(){for(const{module:e,moduleInstance:t}of this.moduleMap.values())"legend"===e.type&&(yield{legendType:e.identifier,legend:t})}},oc="ag-charts-overlay",ac="ag-charts-dark-overlay",lc=class extends De{constructor(e,t){super(),this.className=e,this.defaultMessageId=t,this.enabled=!0}getText(e){return e.t(this.text??this.defaultMessageId)}getElement(e,t,i){if(this.content?.remove(),this.focusBox=i,this.renderer){const e=this.renderer();if(e instanceof HTMLElement)this.content=e;else{const t=(0,n.n)("div");t.innerHTML=e;const{firstElementChild:i}=t;i instanceof HTMLElement&&1===t.childElementCount?this.content=i:this.content=t}}else{const i=(0,n.n)("div",{display:"flex",alignItems:"center",justifyContent:"center",boxSizing:"border-box",height:"100%",margin:"8px",fontFamily:"var(--ag-charts-font-family)",fontSize:"var(--ag-charts-font-size)",fontWeight:"var(--ag-charts-font-weight)"});i.innerText=this.getText(t),this.content=i,e?.animate({from:0,to:1,id:"overlay",phase:"add",groupId:"opacity",onUpdate(e){i.style.opacity=String(e)},onStop(){i.style.opacity="1"}})}return this.content}removeElement(e=()=>this.content?.remove(),t){if(this.content){if(t){const{content:i}=this;t.animate({from:1,to:0,phase:"remove",id:"overlay",groupId:"opacity",onUpdate(e){i.style.opacity=String(e)},onStop(){e?.()}})}else e?.();this.content=void 0,this.focusBox=void 0}}};a([Te],lc.prototype,"enabled",2),a([Te],lc.prototype,"text",2),a([Te],lc.prototype,"renderer",2);var cc=class extends De{constructor(){super(...arguments),this.darkTheme=!1,this.loading=new lc("ag-charts-loading-overlay","overlayLoadingData"),this.noData=new lc("ag-charts-no-data-overlay","overlayNoData"),this.noVisibleSeries=new lc("ag-charts-no-visible-series","overlayNoVisibleSeries"),this.unsupportedBrowser=new lc("ag-charts-unsupported-browser","overlayUnsupportedBrowser")}getFocusInfo(e){for(const t of[this.loading,this.noData,this.noVisibleSeries,this.unsupportedBrowser])if(void 0!==t.focusBox)return{text:t.getText(e),rect:t.focusBox}}destroy(){this.loading.removeElement(),this.noData.removeElement(),this.noVisibleSeries.removeElement(),this.unsupportedBrowser.removeElement()}};a([Te],cc.prototype,"darkTheme",2),a([Te],cc.prototype,"loading",2),a([Te],cc.prototype,"noData",2),a([Te],cc.prototype,"noVisibleSeries",2),a([Te],cc.prototype,"unsupportedBrowser",2);var hc=(e=>(e[e.BACKGROUND=0]="BACKGROUND",e[e.ANY_CONTENT=1]="ANY_CONTENT",e))(hc||{}),dc=(e=>(e[e.FOREGROUND=0]="FOREGROUND",e[e.HIGHLIGHT=1]="HIGHLIGHT",e[e.LABEL=2]="LABEL",e))(dc||{});function uc(e,t,i,n){if(rt(e))return{type:"gradient",gradient:e.gradient??t.gradient,colorStops:e.colorStops??t.colorStops,bounds:e.bounds??t.bounds,rotation:e.rotation??t.rotation,reverse:e.reverse??t.reverse};if(at(e)){const t=e.pattern??i.pattern;let n=e.strokeWidth;return"backward-slanted-lines"===t||"forward-slanted-lines"===t||"horizontal-lines"===t||"vertical-lines"===t?n??(n=i.strokeWidth):n??(n=0),{type:"pattern",pattern:t,width:e.width??e.height??i.width,height:e.height??e.width??i.height,path:e.path,padding:e.padding??i.padding,fill:e.fill??i.fill,fillOpacity:e.fillOpacity??i.fillOpacity,backgroundFill:e.backgroundFill??i.backgroundFill,backgroundFillOpacity:e.backgroundFillOpacity??i.backgroundFillOpacity,stroke:e.stroke??i.stroke,strokeOpacity:e.strokeOpacity??i.strokeOpacity,strokeWidth:n,rotation:e.rotation??i.rotation,scale:e.scale??i.scale}}return lt(e)?{type:"image",url:e.url,width:e.width,height:e.height,backgroundFill:e.backgroundFill??n.backgroundFill,backgroundFillOpacity:e.backgroundFillOpacity??n.backgroundFillOpacity,rotation:e.rotation??n.rotation,repeat:e.repeat??n.repeat,fit:e.fit??n.fit}:e}function pc(e,t,i,n){return rt(e?.fill)||at(e?.fill)||lt(e?.fill)?{...e,fill:uc(e.fill,t,i,n)}:e}function gc(e,t,i,n){null!=i&&rt(t)&&null!=t.bounds&&"item"!==t.bounds?e.fillBBox=i[t.bounds]:e.fillBBox=void 0,e.fillParams=n}function fc(e,t,i,n,s){const r=i?.fill??t.fill;e.fill=r,gc(e,i?.fill??t.fill,n,s),e.fillOpacity=i?.fillOpacity??t.fillOpacity??1,e.stroke=i?.stroke??t.stroke,e.strokeOpacity=i?.strokeOpacity??t.strokeOpacity??1,e.strokeWidth=i?.strokeWidth??t.strokeWidth??0,e.lineDash=i?.lineDash??t.lineDash,e.lineDashOffset=i?.lineDashOffset??t.lineDashOffset??0}var mc=(e=>(e[e.EXACT_SHAPE_MATCH=0]="EXACT_SHAPE_MATCH",e[e.NEAREST_NODE=1]="NEAREST_NODE",e[e.AXIS_ALIGNED=2]="AXIS_ALIGNED",e))(mc||{}),vc=class{constructor(e,t,i,n){this.type=e,this.event=t,this.defaultPrevented=!1,this.datum=i.datum,this.seriesId=n.id}preventDefault(){this.defaultPrevented=!0}},yc=class{constructor(e,t,i){this.series=e,this.seriesGrouping=t,this.oldGrouping=i,this.type="groupingChanged"}},Cc=class extends ni{constructor(e){super(),this.destroyFns=[],this.usesPlacedLabels=!1,this.seriesGrouping=void 0,this.NodeEvent=vc,this.internalId=(0,n.sX)(this),this.contentGroup=new It({name:`${this.internalId}-content`,zIndex:1}),this.highlightGroup=new It({name:`${this.internalId}-highlight`,zIndex:1}),this.annotationGroup=new It({name:`${this.internalId}-annotation`}),this.labelGroup=new It({name:`${this.internalId}-series-labels`}),this.axes={},this.directions=["x","y"],this.nodeDataRefresh=!0,this.moduleMap=new wa,this.datumCallbackCache=new Map,this.connectsToYAxis=!1,this._declarationOrder=-1,this.seriesListeners=new Qi,this._pickNodeCache=new Ti;const{moduleCtx:t,pickModes:i,directionKeys:s={},directionNames:r={},canHaveAxes:o=!1,usesPlacedLabels:a=!1}=e;this.ctx=t,this.directionKeys=s,this.directionNames=r,this.canHaveAxes=o,this.usesPlacedLabels=a,this.highlightGroup=new It({name:`${this.internalId}-highlight`}),this.highlightNode=this.highlightGroup.appendChild(new At({name:"highlightNode",zIndex:0})),this.highlightLabel=this.highlightGroup.appendChild(new At({name:"highlightLabel",zIndex:10})),this.pickModes=i}get pickModeAxis(){return"main"}get id(){return this.properties?.id??this.internalId}get type(){return this.constructor.type??""}get focusable(){return!0}get data(){return this._data??this._chartData}set visible(e){this.properties.visible=e,this.ctx.legendManager.toggleItem(e,this.id),this.ctx.legendManager.update(),this.visibleMaybeChanged()}get visible(){return this.ctx.legendManager.getSeriesEnabled(this.id)??this.properties.visible}get hasData(){return null!=this.data&&this.data.length>0}get tooltipEnabled(){return this.properties.tooltip?.enabled}onDataChange(){this.nodeDataRefresh=!0,this._pickNodeCache.clear()}setOptionsData(e){this._data=e,this.onDataChange()}setChartData(e){this._chartData=e,this.data===e&&this.onDataChange()}onSeriesGroupingChange(e,t){const{internalId:i,type:n,visible:s}=this;e&&this.ctx.seriesStateManager.deregisterSeries(this),t&&this.ctx.seriesStateManager.registerSeries({internalId:i,type:n,visible:s,seriesGrouping:t}),this.fireEvent(new yc(this,t,e))}getBandScalePadding(){return{inner:1,outer:0}}attachSeries(e,t,i){e.appendChild(this.contentGroup),t.appendChild(this.highlightGroup),t.appendChild(this.labelGroup),i?.appendChild(this.annotationGroup)}detachSeries(e,t,i){e?.removeChild(this.contentGroup),t.removeChild(this.highlightGroup),t.removeChild(this.labelGroup),i?.removeChild(this.annotationGroup)}setSeriesIndex(e){return e!==this._declarationOrder&&(this._declarationOrder=e,this.contentGroup.zIndex=[1,e,0],this.highlightGroup.zIndex=[1,e,1],this.labelGroup.zIndex=[1,e,2],this.annotationGroup.zIndex=e,!0)}renderToOffscreenCanvas(){return!1}addEventListener(e,t){return super.addEventListener(e,t)}removeEventListener(e,t){return super.removeEventListener(e,t)}hasEventListener(e){return super.hasEventListener(e)}addListener(e,t){return this.seriesListeners.addListener(e,t)}dispatch(e,t){this.seriesListeners.dispatch(e,t)}addChartEventListeners(){}updatedDomains(){}destroy(){this.destroyFns.forEach(e=>e()),this.destroyFns=[],this.resetDatumCallbackCache(),this.ctx.seriesStateManager.deregisterSeries(this)}getDirectionValues(e,t){const i=this.resolveKeyDirection(e),n=t?.[i],s=[];if(!n)return s;const r=(...e)=>{for(const t of e)Array.isArray(t)?r(...t):"object"==typeof t?r(...Object.values(t)):s.push(t)};return r(...n.map(e=>this.properties[e])),s}getKeys(e){return this.getDirectionValues(e,this.directionKeys)}getKeyProperties(e){return this.directionKeys[this.resolveKeyDirection(e)]??[]}getNames(e){return this.getDirectionValues(e,this.directionNames)}resolveKeyDirection(e){return e}getDomain(e){const t=this.getSeriesDomain(e),i=this.moduleMap.mapModules(t=>t.getDomain(e)).flat();return 0!==i.length?t.concat(i):t}getRange(e,t){return this.getSeriesRange(e,t)}getVisibleItems(e,t,i){return 1/0}markNodeDataDirty(){this.nodeDataRefresh=!0,this._pickNodeCache.clear(),this.visibleMaybeChanged()}visibleMaybeChanged(){this.ctx.seriesStateManager.updateSeries(this)}getOpacity(){const{dimOpacity:e=1,enabled:t=!0}=this.properties.highlightStyle.series;if(!t||1===e)return 1;switch(this.isItemIdHighlighted()){case 0:case 1:return 1;default:return e}}getStrokeWidth(e){const{strokeWidth:t,enabled:i=!0}=this.properties.highlightStyle.series;if(!i||void 0===t)return e;switch(this.isItemIdHighlighted()){case 1:return t;case 0:case 2:return e}}isItemIdHighlighted(){const e=this.ctx.highlightManager?.getActiveHighlight()?.series;return null==e?0:e!==this?2:1}getModuleTooltipParams(){return this.moduleMap.mapModules(e=>e.getTooltipParams()).reduce((e,t)=>Object.assign(e,t),{})}pickNodes(e,t,i=!1){const{pickModes:n,pickModeAxis:s,visible:r,contentGroup:o}=this;if(!r||!o.visible)return;if("highlight"===t&&!this.properties.highlight.enabled)return;if("highlight-tooltip"===t&&!this.properties.highlight.enabled)return;let a=1/0;if("tooltip"===t||"highlight-tooltip"===t){const{tooltip:e}=this.properties;a="number"==typeof e.range?e.range:1/0,i||(i="exact"===e.range)}else if("event"===t||"context-menu"===t){const{nodeClickRange:e}=this.properties;a="number"==typeof e?e:1/0,i||(i="exact"===e)}const l=n.filter(e=>!i||0===e),{x:c,y:h}=e,d=JSON.stringify({x:c,y:h,maxDistance:a,selectedPickModes:l});if(this._pickNodeCache.has(d))return this._pickNodeCache.get(d);for(const t of l){let i;switch(t){case 0:{const t=this.pickNodesExactShape(e);i=0===t.length?void 0:{datums:t,distance:0};break}case 1:{const t=this.pickNodeClosestDatum(e),n=0===t?.distance?this.pickNodesExactShape(e):void 0;i=null!=n&&0!==n.length?{datums:n,distance:0}:t?{datums:[t.datum],distance:t.distance}:void 0;break}case 2:{const t=null!=s?this.pickNodeMainAxisFirst(e,"main-category"===s):void 0;i=null!=t?{datums:[t.datum],distance:t.distance}:void 0;break}}if(i&&i.distance<=a)return this._pickNodeCache.set(d,{pickMode:t,datums:i.datums,distance:i.distance})}return this._pickNodeCache.set(d,void 0)}pickNodesExactShape(e){const t=[];for(const i of this.contentGroup.pickNodes(e.x,e.y)){const e=i.closestDatum();null!=e&&!0!==e.missing&&t.push(e)}return t}pickNodeClosestDatum(e){throw new Error("AG Charts - Series.pickNodeClosestDatum() not implemented")}pickNodeNearestDistantObject(e,t){const i=p(e.x,e.y,t),n=i.nearest?.closestDatum();if(null!=n&&!0!==n.missing)return{datum:n,distance:Math.sqrt(i.distanceSquared)}}pickNodeMainAxisFirst(e,t){throw new Error("AG Charts - Series.pickNodeMainAxisFirst() not implemented")}getLabelData(){return[]}updatePlacedLabelData(e){}fireNodeClickEvent(e,t){const i=new this.NodeEvent("seriesNodeClick",e,t,this);return this.fireEvent(i),!i.defaultPrevented}fireNodeDoubleClickEvent(e,t){const i=new this.NodeEvent("seriesNodeDoubleClick",e,t,this);return this.fireEvent(i),!i.defaultPrevented}createNodeContextMenuActionEvent(e,t){return new this.NodeEvent("nodeContextMenuAction",e,t,this)}onLegendInitialState(e,t){const{visible:i=!0,itemId:n,legendItemName:s}=t??{};this.toggleSeriesItem(i,e,n,s)}onLegendItemClick(e){const{enabled:t,itemId:i,series:n,legendType:s}=e,r="legendItemName"in this.properties?this.properties.legendItemName:void 0,o="legendItemKey"in this.properties?this.properties.legendItemKey:void 0,a=null!=r&&r===e.legendItemName;(n.id===this.id||a||null!=o)&&this.toggleSeriesItem(t,s,i,r,e)}onLegendItemDoubleClick(e){const{enabled:t,itemId:i,series:n,numVisibleItems:s,legendType:r}=e,o="legendItemName"in this.properties?this.properties.legendItemName:void 0,a="legendItemKey"in this.properties?this.properties.legendItemKey:void 0,l=null!=o&&o===e.legendItemName;n.id===this.id||l||null!=a?this.toggleSeriesItem(!0,r,i,o,e):t&&1===s?this.toggleSeriesItem(!0,r,void 0,o):this.toggleSeriesItem(!1,r,void 0,o)}toggleSeriesItem(e,t,i,n,s){const r=this.id;(e||"category"!==t)&&(this.visible=e),this.nodeDataRefresh=!0,this._pickNodeCache.clear();const o={type:"seriesVisibilityChange",seriesId:r,itemId:i,legendItemName:s?.legendItemName??n,visible:e};this.fireEvent(o),this.ctx.legendManager.toggleItem(e,r,i,n)}isEnabled(){return this.visible}getModuleMap(){return this.moduleMap}createModuleContext(){return{...this.ctx,series:this}}getLabelText(e,t,i=Gn){return e.formatter?this.cachedCallWithContext(e.formatter,{seriesId:this.id,...t})??this.callWithContext(i,t.value):this.callWithContext(i,t.value)}getMarkerStyle(e,t,i,n=!1,s=e.size??0,r){const{itemStyler:o,fillGradientDefaults:a,fillPatternDefaults:l,fillImageDefaults:c}=e;let h=pc(N({size:s},r,e.getStyle()),a,l,c);return o&&i&&(h=pc(N(this.cachedCallWithContext(o,{seriesId:this.id,...h,...i,highlighted:n,datum:t}),h),a,l,c)),h}updateMarkerStyle(e,t,i,n,s,r,o,a,{applyTranslation:l=!0,selected:c=!0}={}){const h=this.getMarkerStyle(e,i,s,r,n?.size,o),{shape:d,size:u}=h,p=this.visible&&u>0&&n&&!isNaN(n.x)&&!isNaN(n.y);if(fc(t,h,void 0,a),l?t.setProperties({visible:p,shape:d,size:u,x:n?.x,y:n?.y,scalingCenterX:n?.x,scalingCenterY:n?.y}):t.setProperties({visible:p,shape:d,size:u}),c||(t.fillOpacity*=.25,t.strokeOpacity*=.125),"function"==typeof e.shape&&!t.dirtyPath){t.path.clear(!0),t.updatePath(),t.checkPathDirty();const e=t.getBBox();if(void 0!==n&&e.isFinite()){const t=e.computeCenter(),[i,s]=["x","y"].map(e=>(h.strokeWidth??0)+Math.abs(t[e]-n[e]));n.focusSize=Math.max(e.width+i,e.height+s)}}}get nodeDataDependencies(){return this._nodeDataDependencies??{seriesRectWidth:NaN,seriesRectHeight:NaN}}checkResize(e){const{width:t,height:i}=e??{width:NaN,height:NaN},n=e?{seriesRectWidth:t,seriesRectHeight:i}:void 0,s=null!=Ft(this.nodeDataDependencies,n);return s&&(this._nodeDataDependencies=n,this.markNodeDataDirty()),s}pickFocus(e){}resetDatumCallbackCache(){this.datumCallbackCache.clear()}cachedDatumCallback(e,t){const{datumCallbackCache:i}=this,s=i.get(e);if(null!=s)return s;try{const n=t();return i.set(e,n),n}catch(e){n.Vy.error(String(e))}}cachedCallWithContext(e,...t){return this.ctx.callbackCache.call(this.properties,this.ctx.chartService,e,...t)}callWithContext(e,...t){return ps(this.properties,this.ctx.chartService,e,t)}formatTooltipWithContext(e,t,i){return e.formatTooltip(this.properties,this.ctx.chartService,t,i)}};a([li({changeValue:function(e,t){this.onSeriesGroupingChange(t,e)}})],Cc.prototype,"seriesGrouping",2);var bc=class extends dt{constructor(){super(...arguments),this.path=new Je,this._clipX=NaN,this._clipY=NaN,this.clip=!1,this._dirtyPath=!0,this.lastPixelRatio=NaN}set clipX(e){this._clipX=e,this.dirtyPath=!0}set clipY(e){this._clipY=e,this.dirtyPath=!0}set dirtyPath(e){this._dirtyPath!==e&&(this._dirtyPath=e,e&&this.markDirty("path"))}get dirtyPath(){return this._dirtyPath}checkPathDirty(){this._dirtyPath||(this.dirtyPath=this.path.isDirty()||(this.fillShadow?.isDirty()??!1)||(this._clipPath?.isDirty()??!1))}onChangeDetection(e){this._dirtyPath||(this._dirtyPath=!0,super.onChangeDetection(e))}computeBBox(){return this.updatePathIfDirty(),this.path.computeBBox()}isPointInPath(e,t){return this.updatePathIfDirty(),this.path.closedPath&&this.path.isPointInPath(e,t)}distanceSquared(e,t){return this.distanceSquaredTransformedPoint(e,t)}svgPathData(e){return this.updatePathIfDirty(),this.path.toSVG(e)}distanceSquaredTransformedPoint(e,t){return this.updatePathIfDirty(),this.path.closedPath&&this.path.isPointInPath(e,t)?0:this.path.distanceSquared(e,t)}isDirtyPath(){return!1}updatePath(){}updatePathIfDirty(){(this.dirtyPath||this.isDirtyPath())&&(this.updatePath(),this.dirtyPath=!1)}preRender(e){return e.devicePixelRatio!==this.lastPixelRatio&&(this.dirtyPath=!0),this.lastPixelRatio=e.devicePixelRatio,this.updatePathIfDirty(),super.preRender(e,this.path.commands.length)}render(e){const{ctx:t}=e;if(!this.clip||isNaN(this._clipX)||isNaN(this._clipY))this._clipPath=void 0,this.drawPath(t);else{t.save();const e=this.strokeWidth/2;this._clipPath??(this._clipPath=new Je),this._clipPath.clear(),this._clipPath.rect(-e,-e,this._clipX+e,this._clipY+e+e),t.clip(this._clipPath?.getPath2D()),this._clipX>0&&this._clipY>0&&this.drawPath(t),t.restore()}this.fillShadow?.markClean(),super.render(e)}drawPath(e){this.fillStroke(e,this.path.getPath2D())}toSVG(){if(!this.visible)return;const e=(0,n.FJ)("path");e.setAttribute("d",this.svgPathData());const t=this.applySvgFillAttributes(e,[]);return this.applySvgStrokeAttributes(e),{elements:[e],defs:t}}};bc.className="Path",a([$()],bc.prototype,"clip",2),a([$()],bc.prototype,"clipX",1),a([$()],bc.prototype,"clipY",1);var Sc=class{constructor(e){this.swapChain=e,this.hasBeenActivated=!1,this.div=(0,n.n)("div"),this.svg=(0,n.FJ)("svg"),this.outerPath=(0,n.FJ)("path"),this.innerPath=(0,n.FJ)("path"),this.svg.append(this.outerPath),this.svg.append(this.innerPath),this.outerPath.classList.add("ag-charts-focus-svg-outer-path"),this.innerPath.classList.add("ag-charts-focus-svg-inner-path"),this.element=(0,n.n)("div","ag-charts-focus-indicator"),this.element.ariaHidden="true",this.element.append(this.svg),this.swapChain.addListener("swap",e=>this.onSwap(e))}clear(){}update(e,t,i){if(null!=t)if(e instanceof bc){const i=(i,n)=>{let{x:s,y:r}=wt.toCanvasPoint(e,i,n);return s-=t.x??0,r-=t.y??0,{x:s,y:r}},n=e.svgPathData(i);this.outerPath.setAttribute("d",n),this.innerPath.setAttribute("d",n),this.show(this.svg)}else{let n;if(i){const i=Math.max(e.x-t.x,0),s=Math.max(e.y-t.y,0),r=Math.min(e.x+e.width-t.x,t.width),o=Math.min(e.y+e.height-t.y,t.height);n=new m(i,s,r-i,o-s)}else n=new m(e.x-t.x,e.y-t.y,e.width,e.height);Lt(this.div,n),this.show(this.div)}}onSwap(e){e!==this.element.parentElement&&(this.element.remove(),e.appendChild(this.element),this.overrideFocusVisible(this.focusVisible))}show(e){this.hasBeenActivated=!0,this.element.innerHTML="",this.element.append(e)}overrideFocusVisible(e){this.focusVisible=e;const t=this.element.parentElement;t?.style.setProperty("opacity",{true:"1",false:"0",undefined:""}[`${e}`])}isFocusVisible(e=!1){if(!e&&!this.hasBeenActivated)return!1;const t=this.element.parentElement;return null!=t&&"1"===(0,n.zk)().getComputedStyle(t).opacity}},wc=class{constructor(e,t,i){this.label1=e,this.label2=t,this.hasFocus=!1,this.skipDispatch=!1,this.listeners={blur:[],focus:[],swap:[]},this.onBlur=e=>((0,n.EM)(e.target,"pointer-events",void 0),!this.skipDispatch&&this.dispatch("blur",e)),this.onFocus=e=>((0,n.EM)(e.target,"pointer-events","auto"),!this.skipDispatch&&this.dispatch("focus",e)),(0,n.Bq)(this.label1,"id",(0,n.wW)()),(0,n.Bq)(this.label2,"id",(0,n.wW)()),(0,n.EM)(this.label1,"display","none"),(0,n.EM)(this.label2,"display","none"),this.activeAnnouncer=this.createAnnouncer(i),this.inactiveAnnouncer=this.createAnnouncer(i),(0,n.Bq)(this.activeAnnouncer,"tabindex",0),this.label2.insertAdjacentElement("afterend",this.activeAnnouncer),this.label2.insertAdjacentElement("afterend",this.inactiveAnnouncer),this.swap("")}createAnnouncer(e){const t=(0,n.n)("div");return t.role=e,t.className="ag-charts-swapchain",t.addEventListener("blur",this.onBlur),t.addEventListener("focus",this.onFocus),t}destroy(){for(const e of[this.activeAnnouncer,this.inactiveAnnouncer])e.removeEventListener("blur",this.onBlur),e.removeEventListener("focus",this.onFocus),e.remove()}focus(e){this.focusOptions=e,this.activeAnnouncer.focus(e),this.focusOptions=void 0}update(e){this.skipDispatch=!0,this.swap(e),this.hasFocus&&this.activeAnnouncer.focus(this.focusOptions),this.skipDispatch=!1}addListener(e,t){this.listeners[e].push(t),"swap"===e&&t(this.activeAnnouncer)}dispatch(e,t){"focus"===e?this.hasFocus=!0:"blur"===e&&(this.hasFocus=!1),this.listeners[e].forEach(e=>e(t))}swap(e){const t=this.activeAnnouncer.tabIndex;this.label2.textContent=e,[this.inactiveAnnouncer,this.activeAnnouncer]=[this.activeAnnouncer,this.inactiveAnnouncer],[this.label1,this.label2]=[this.label2,this.label1],(0,n.Wp)(this.inactiveAnnouncer,{"aria-labelledby":this.label1.id,"aria-hidden":!0,tabindex:void 0}),(0,n.Wp)(this.activeAnnouncer,{"aria-labelledby":this.label1.id,"aria-hidden":!1,tabindex:t}),this.dispatch("swap",this.activeAnnouncer)}},xc={arrowdown:{bindings:[{code:"ArrowDown"}]},arrowleft:{bindings:[{code:"ArrowLeft"}]},arrowright:{bindings:[{code:"ArrowRight"}]},arrowup:{bindings:[{code:"ArrowUp"}]},delete:{bindings:[{key:"Backspace"},{key:"Delete"}],activatesFocusIndicator:!1},redo:{bindings:[{key:"y",ctrlOrMeta:!0},{key:"z",ctrlOrMeta:!0,shift:!0}],activatesFocusIndicator:!1},undo:{bindings:[{key:"z",ctrlOrMeta:!0}],activatesFocusIndicator:!1},submit:{bindings:[{key:"Enter"},{code:"Enter"},{code:"Space"}]},zoomin:{bindings:[{key:"+"},{code:"ZoomIn"},{code:"Add"}],activatesFocusIndicator:!1},zoomout:{bindings:[{key:"-"},{code:"ZoomOut"},{code:"Substract"}],activatesFocusIndicator:!1}};function Ec(e,t){for(const i of t)if("code"in i){if(i.code===e.code)return!0}else if(!(i.key!==e.key||void 0!==i.shift&&i.shift!==e.shiftKey||void 0!==i.ctrlOrMeta&&i.ctrlOrMeta!==e.ctrlKey&&i.ctrlOrMeta!==e.metaKey))return!0;return!1}function Mc(){return(e,t)=>{const i=[`Property [${e}] is deprecated.`,t].filter(Boolean).join(" ");n.Vy.warnOnce(i)}}function Ac(e,t){const i=Mc(),n=t?.default;return T((t,s,r)=>(r!==n&&i(s.toString(),e),r))}function Tc(e,t){const i=Mc();return T((n,s,r)=>(r!==n[e]&&(i(s.toString(),`Use [${e}] instead.`),H(n,e,t?t(r):r)),x),(t,n)=>(i(n.toString(),`Use [${e}] instead.`),V(t,e)))}function Dc(e,t,i,n){let{top:s,right:r,bottom:o,left:a,width:l,height:c}=n;return null!=a?null!=l?r=i.width-a+l:null!=r&&(l=i.width-a-r):null!=r&&null!=l&&(a=i.width-r-l),null!=s?null!=c?o=i.height-s-c:null!=o&&(c=i.height-o-s):null!=o&&null!=c&&(s=i.height-o-c),null==l?null==c?(l=e,c=t):l=Math.ceil(e*c/t):null==c&&(c=Math.ceil(t*l/e)),null==a&&(a=null==r?Math.floor((i.width-l)/2):i.width-r-l),null==s&&(s=null==o?Math.floor((i.height-c)/2):i.height-c-o),{x:a,y:s,width:l,height:c}}var Ic=class extends Qi{constructor(){super(...arguments),this.x1=NaN,this.y1=NaN,this.x=NaN,this.y=NaN,this.vx=0,this.vy=0,this.t0=NaN,this.animationFrameHandle=void 0}reset(){this.x=NaN,this.y=NaN,null!=this.animationFrameHandle&&(cancelAnimationFrame(this.animationFrameHandle),this.animationFrameHandle=void 0)}update(e,t){if(Number.isNaN(this.x)||Number.isNaN(this.y))return this.x=e,this.y=t,this.vx=0,this.vy=0,this.emitUpdate(),void(null!=this.animationFrameHandle&&(cancelAnimationFrame(this.animationFrameHandle),this.animationFrameHandle=void 0));this.x1=e,this.y1=t,this.t0=Date.now(),null==this.animationFrameHandle&&(this.animationFrameHandle=requestAnimationFrame(this.onFrame.bind(this)))}onFrame(){this.animationFrameHandle=void 0;const{x1:e,y1:t,t0:i}=this,n=Date.now(),s=n-i;this.t0=n;const r=.001,o=0|Math.ceil(s/1);let{x:a,y:l,vx:c,vy:h}=this;for(let i=0;i<o;i+=1)c+=-(200*(a-e)+12*c)/.1*r,h+=-(200*(l-t)+12*h)/.1*r,a+=c*r,l+=h*r;Math.hypot(a-e,l-t)<.5?(this.x=this.x1,this.y=this.y1,this.vx=0,this.vy=0):(this.x=a,this.y=l,this.vx=c,this.vy=h,this.animationFrameHandle=requestAnimationFrame(this.onFrame.bind(this))),this.emitUpdate()}emitUpdate(){this.dispatch("update",{type:"update",x:this.x,y:this.y})}},Rc=null;function Lc(e){return""===e?"":(Rc??(Rc=(0,n.n)("div")),Rc.textContent=String(e),Rc.innerHTML.replace(/\n/g,"<br>"))}function kc(e,t){const{path:i,size:n}=e,{x:s,y:r}=e;i.clear();let o=!1;for(const[e,a]of t){const t=s+(e-.5)*n,l=r+(a-.5)*n;o?i.lineTo(t,l):i.moveTo(t,l),o=!0}i.closePath()}var Pc={circle({path:e,x:t,y:i,size:n}){const s=n/2;e.arc(t,i,s,0,2*Math.PI),e.closePath()},cross(e){kc(e,[[.25,0],[.5,.25],[.75,0],[1,.25],[.75,.5],[1,.75],[.75,1],[.5,.75],[.25,1],[0,.75],[.25,.5],[0,.25]])},diamond(e){kc(e,[[.5,0],[1,.5],[.5,1],[0,.5]])},heart({path:e,x:t,y:i,size:n}){const s=n/4;i+=s/2,e.arc(t-s,i-s,s,oe(130),oe(330)),e.arc(t+s,i-s,s,oe(220),oe(50)),e.lineTo(t,i+s),e.closePath()},pin({path:e,x:t,y:i,size:n}){const s=.5,r=.5;e.moveTo(t+-.34375*n,i+-.15625*n),e.cubicCurveTo(t+-.34375*n,i+-.348509*n,t+-.192259*n,i+-.5*n,t+0*n,i+-.5*n),e.cubicCurveTo(t+(.692259-s)*n,i+-.5*n,t+.34375*n,i+-.348509*n,t+.34375*n,i+-.15625*n),e.cubicCurveTo(t+.34375*n,i+(.493824-r)*n,t+.284625*n,i+(.600181-r)*n,t+(.716461-s)*n,i+(.695393-r)*n),e.cubicCurveTo(t+.199009*n,i+.219769*n,t+(.681271-s)*n,i+.243104*n,t+(.663785-s)*n,i+(.766105-r)*n),e.cubicCurveTo(t+(.611893-s)*n,i+(.834367-r)*n,t+(.562228-s)*n,i+.399699*n,t+(.528896-s)*n,i+(.980648-r)*n),e.cubicCurveTo(t+(.524075-s)*n,i+(.992358-r)*n,t+(.512663-s)*n,i+.5*n,t+0*n,i+.5*n),e.cubicCurveTo(t+(.487337-s)*n,i+.5*n,t+(.475925-s)*n,i+(.992358-r)*n,t+(.471104-s)*n,i+(.980648-r)*n),e.cubicCurveTo(t+(.487337-s)*n,i+.5*n,t+(.475925-s)*n,i+(.992358-r)*n,t+(.471104-s)*n,i+(.980648-r)*n),e.cubicCurveTo(t+(.437772-s)*n,i+.399699*n,t+(.388107-s)*n,i+(.834367-r)*n,t+(.336215-s)*n,i+(.766105-r)*n),e.cubicCurveTo(t+(.318729-s)*n,i+.243104*n,t+-.199009*n,i+.219769*n,t+(.283539-s)*n,i+(.695393-r)*n),e.cubicCurveTo(t+-.284625*n,i+(.600181-r)*n,t+-.34375*n,i+(.493824-r)*n,t+-.34375*n,i+-.15625*n),e.closePath()},plus(e){kc(e,[[1/3,0],[2/3,0],[2/3,1/3],[1,1/3],[1,2/3],[2/3,2/3],[2/3,1],[1/3,1],[1/3,2/3],[0,2/3],[0,1/3],[1/3,1/3]])},square({path:e,x:t,y:i,size:n,pixelRatio:s}){const r=n/2;e.moveTo(et(s,t-r),et(s,i-r)),e.lineTo(et(s,t+r),et(s,i-r)),e.lineTo(et(s,t+r),et(s,i+r)),e.lineTo(et(s,t-r),et(s,i+r)),e.closePath()},star({path:e,x:t,y:i,size:n}){const s=n/2,r=s/2,o=Math.PI/2;for(let n=0;n<10;n++){const a=n%2==0?s:r,l=n*Math.PI/5-o,c=t+Math.cos(l)*a,h=i+Math.sin(l)*a;e.lineTo(c,h)}e.closePath()},triangle(e){kc(e,[[.5,0],[1,.87],[0,.87]])}},Nc=class extends bc{constructor(){super(...arguments),this.shape="square",this.x=0,this.y=0,this.size=12}updatePath(){const{path:e,shape:t,x:i,y:n,size:s}=this,r=this.layerManager?.canvas?.pixelRatio??1,o=Oc.anchor(t),a={path:e,x:i-(o.x-.5)*s,y:n-(o.y-.5)*s,size:s,pixelRatio:r};e.clear(),"string"==typeof t?Pc[t](a):"function"==typeof t&&t(a)}computeBBox(){const{x:e,y:t,size:i}=this,n=Oc.anchor(this.shape);return new m(e-i*n.x,t-i*n.y,i,i)}executeFill(e,t){if(t)return super.executeFill(e,t)}executeStroke(e,t){if(t)return super.executeStroke(e,t)}};a([Y({equals:K})],Nc.prototype,"shape",2),a([$()],Nc.prototype,"x",2),a([$()],Nc.prototype,"y",2),a([$({convertor:Math.abs})],Nc.prototype,"size",2);var Oc=class extends(yt(Ct(bt(Nc)))){static anchor(e){return"pin"===e?{x:.5,y:1}:"function"==typeof e&&"anchor"in e?e.anchor:{x:.5,y:.5}}constructor(e){super(e),null!=e?.shape&&(this.shape=e.shape)}};function _c(e,t,i=t*(5/3)){const n=new At,s=Math.min(e.marker.strokeWidth??1,2),r=Math.min(e.line?.strokeWidth??0,2),o=Math.max(!1===e.marker.enabled?0:t,null==e.line?0:i),a=Math.max(!1===e.marker.enabled?0:t,r);if(null!=e.line){const{stroke:t,strokeOpacity:i,lineDash:s}=e.line,l=new pa;l.x1=0,l.y1=a/2,l.x2=o,l.y2=a/2,l.stroke=t,l.strokeOpacity=i,l.strokeWidth=r,l.lineDash=s,n.append(l)}if(!1!==e.marker.enabled){const{shape:i,fill:r,fillOpacity:l,stroke:c,strokeOpacity:h,lineDash:d,lineDashOffset:u}=e.marker,p=new Oc;p.shape=i??"square",p.size=t,p.fill=r,p.fillOpacity=l??1,p.stroke=c,p.strokeOpacity=h??1,p.strokeWidth=s,p.lineDash=d,p.lineDashOffset=u??0;const g=Oc.anchor(i),f=o/2+(g.x-.5)*t,m=a/2+(g.y-.5)*t,v=t/(t+s);p.x=f,p.y=m,p.scalingCenterX=f,p.scalingCenterY=m,p.scalingX=v,p.scalingY=v,n.append(p)}return At.toSVG(n,o,a)}var Fc="ag-charts-tooltip",Gc="ag-charts-tooltip--dark";function Vc(e){const t=[],i=new Map;for(const n of e)if("structured"===n.type){const{heading:e}=n,s=null!=e?i.get(e):void 0,r={type:"structured",heading:e,items:[n]};null==s?(i.set(e,r),t.push(r)):s.items.push(n)}else t.push(n);return t}function Bc(e){const t=Vc(e),i=[];return t.forEach(e=>{if("raw"===e.type)return"";null!=e.heading&&i.push(e.heading),e.items.forEach(e=>{null!=e.title&&i.push(e.title),e.data?.forEach(e=>{i.push(e.label??e.fallbackLabel,e.value)})})}),i.join("; ")}function Hc(e,t,i){let n="";null==e?n+=`<span class="${Fc}-label">${Lc(t)}</span>`:(n+=`<span class="${Fc}-label">${Lc(e)}</span>`,n+=" ",n+=`<span class="${Fc}-value">${Lc(t)}</span>`);const s=[`${Fc}-row`];return i&&s.push(`${Fc}-row--inline`),n=`<div class="${s.join(" ")}">${n}</div>`,n}function zc(e,t){if(null==e||1===t.length)return;const i=e?.t("tooltipPaginationStatus",{index:t.index+1,count:t.length});return`<div class="${Fc}-footer">${i}</div>`}function Uc(e,t,i,n){const s=1===t.items.length?t.items[0]:void 0;let r,o,a;switch(i){case"compact":r=!0,o=s?.title;break;case"single":r=null!=s&&(null==t.heading||null==s.title)&&1===s.data?.length&&null==s.data[0].label&&null!=s.data[0].value,a=t.heading??s?.title;break;case"shared":r=!1}let l="";if(r&&null!=s?(null!=o&&(l+=Hc(void 0,o,!1)),s.data?.forEach(e=>{l+=Hc(e.label??a,e.value,!1),l+=" "})):(null!=t.heading&&(l+=`<span class="${Fc}-heading">${Lc(t.heading)}</span>`,l+=" "),t.items.forEach(e=>{l+=function(e){let t="";if(e.data?.length&&e.data.every(e=>null==e.value||""===e.value))return t;const i=null==e.title&&1===e.data?.length,n=null==e.symbol?void 0:_c(e.symbol,12);return null==n||null==e.title&&!e.data?.length||(t+=`<span class="${Fc}-symbol">${n}</span>`),null!=e.title&&(t+=`<span class="${Fc}-title">${Lc(e.title)}</span>`,t+=" "),e.data?.forEach(e=>{t+=Hc(e.label??e.fallbackLabel,e.value,i),t+=" "}),t}(e)})),0===l.length)return;const c="compact"!==i&&null!=n?zc(e,n):void 0;return c+null&&(l+=c),l=`<div class="${Fc}-content">${l.trimEnd()}</div>`,l}function Wc(e,t,i,n){const s=Vc(t);if(0!==s.length){if(1===s.length&&"structured"===s[0].type)return Uc(e,s[0],i,n);{const t=s.map(t=>"structured"===t.type?Uc(e,t,i):t.rawHtmlString);return null!=n&&t.push(function(e,t){const i=null==t?void 0:zc(e,t);return null==i?"":`<div class="${Fc}-content">${i}</div>`}(e,n)??""),t.join("")}}}var jc={left:-1,"top-left":-1,"bottom-left":-1,top:0,center:0,bottom:0,right:1,"top-right":1,"bottom-right":1},Kc={"top-left":-1,top:-1,"top-right":-1,left:0,center:0,right:0,"bottom-left":1,bottom:1,"bottom-right":1},$c={left:3,"top-left":void 0,"bottom-left":void 0,top:2,center:void 0,bottom:1,right:0,"top-right":void 0,"bottom-right":void 0},Yc={top:2,bottom:2,left:1,right:1,"top-right":3,"top-left":3,"bottom-right":3,"bottom-left":3,center:0},qc=class extends De{constructor(){super(...arguments),this.xOffset=0,this.yOffset=0}get defaultAnchorTo(){const{type:e,_seriesOverrideType:t}=this,i=e??t??"pointer";return"node"===i||"pointer"===i?i:"chart"}get defaultPlacement(){const{type:e,_seriesOverrideType:t}=this,i=e??t??"pointer";return"node"===i||"pointer"===i?"top":i}};a([Te,Ac("Use `anchorTo` and/or `placement` options instead.")],qc.prototype,"type",2),a([Te],qc.prototype,"_seriesOverrideType",2),a([Te],qc.prototype,"xOffset",2),a([Te],qc.prototype,"yOffset",2),a([Te],qc.prototype,"anchorTo",2),a([Te],qc.prototype,"placement",2);var Xc=class extends De{constructor(){super(),this.enabled=!0,this.mode="single",this.delay=0,this.range=void 0,this.wrapping="hyphenate",this.position=new qc,this.pagination=!1,this.darkTheme=!1,this.bounds="extended",this.destroyFns=[],this.springAnimation=new Ic,this.enableInteraction=!1,this.wrapTypes=["always","hyphenate","on-space","never"],this.sizeMonitor=new Sn,this._elementSize=void 0,this._showTimeout=void 0,this.arrowPosition=void 0,this._visible=!1,this.positionParams=void 0,this.localeManager=void 0,this.destroyFns.push(this.springAnimation.addListener("update",this.updateTooltipPosition.bind(this)))}get interactive(){return this.enableInteraction}setup(e,t){return"togglePopover"in(0,n.zk)().HTMLElement.prototype&&(this.element=t.addChild("tooltip-container",Fc),this.element.setAttribute("popover","manual"),this.element.className=Fc,this.element.style.positionAnchor=t.anchorName,this.sizeMonitor.observe(this.element,e=>{this._elementSize=e,this.updateTooltipPosition()})),this.localeManager=e,()=>{t.removeChild("tooltip-container",Fc),this.destroyFns.forEach(e=>e()),this.element&&this.sizeMonitor.unobserve(this.element)}}isVisible(){return this._visible}contains(e){return this.element?.contains(e)??!1}updateTooltipPosition(){const{element:e,_elementSize:t,positionParams:i}=this;if(null==e||null==t||null==i)return;const{canvasRect:s,relativeRect:r,meta:o}=i,{x:a,y:l}=this.springAnimation;let c=o.position?.placement??this.position.placement??o.position?.defaultPlacement??this.position.defaultPlacement;Array.isArray(c)||(c=[c]);const h=o.position?.anchorTo??this.position.anchorTo??o.position?.defaultAnchorTo??this.position.defaultAnchorTo,d=o.position?.xOffset??0,u=o.position?.yOffset??0,p=r.x,g=r.y,f=r.width-t.width-1+p,m=r.height-t.height+g;let v,y,C=0,b=!1;do{v=c[C],C+=1;const e=this.getTooltipBounds({elementSize:t,placement:v,anchorTo:h,canvasX:a,canvasY:l,yOffset:u,xOffset:d,canvasRect:s});y=Dc(t.width,t.height,r,e),b=!1,1&Yc[v]&&(b||(b=y.x<p||y.x>f)),2&Yc[v]&&(b||(b=y.y<g||y.y>m))}while(C<c.length&&b);const S=(0,n.qE)(p,y.x,f),w=(0,n.qE)(g,y.y,m);b||(b=S!==y.x||w!==y.y);const x="chart"!==h&&!b&&!d&&!u,E=o.showArrow??this.showArrow??x;this.arrowPosition=E?$c[v]:void 0,this.updateClassModifiers(),e.style.translate=`${S}px ${w}px`}show(e,t,i,n,s,r=!1){const{element:o}=this;if(null!=o&&null!=n&&0!==n.length){const e=Wc(this.localeManager,n,this.mode,this.pagination?s:void 0);if(null==e)return void this.toggle(!1);o.innerHTML=e}else if(null==o||""===o.innerHTML)return void this.toggle(!1);const a={x:e.x-t.x,y:e.y-t.y,width:e.width,height:e.height};switch(this.positionParams={canvasRect:t,relativeRect:a,meta:i},i.position?.anchorTo??this.position.anchorTo??i.position?.defaultAnchorTo??this.position.defaultAnchorTo){case"node":this.springAnimation.update(i.nodeCanvasX??i.canvasX,i.nodeCanvasY??i.canvasY);break;case"pointer":this.springAnimation.update(i.canvasX,i.canvasY);break;case"chart":this.springAnimation.reset()}i.enableInteraction?(this.enableInteraction=!0,o.style.pointerEvents="auto",o.removeAttribute("aria-hidden"),o.tabIndex=-1):(this.enableInteraction=!1,o.style.pointerEvents="none",o.setAttribute("aria-hidden","true"),o.removeAttribute("tabindex")),o.style.setProperty("--top",`${t.top}px`),o.style.setProperty("--left",`${t.left}px`),this.updateClassModifiers(),this.toggle(!0,r)}hide(){this.toggle(!1)}toggle(e,t=!1){const{delay:i}=this;e&&i>0&&!t?this._showTimeout??(this._showTimeout=setTimeout(()=>{this._showTimeout=void 0,this.toggleCallback(!0)},i)):(clearTimeout(this._showTimeout),this._showTimeout=void 0,this.toggleCallback(e))}toggleCallback(e){this.element?.isConnected&&this._visible!==e&&(this._visible=e,this.element.togglePopover(e),e?this.updateTooltipPosition():this.springAnimation.reset())}updateClassModifiers(){if(!this.element?.isConnected)return;const{classList:e}=this.element,t=(t,i)=>e.toggle(`${Fc}--${t}`,i);t("no-interaction",!this.enableInteraction),t("arrow-top",1===this.arrowPosition),t("arrow-right",3===this.arrowPosition),t("arrow-bottom",2===this.arrowPosition),t("arrow-left",0===this.arrowPosition),t("compact","compact"===this.mode),e.toggle(Gc,this.darkTheme);for(const t of this.wrapTypes)e.toggle(`${Fc}--wrap-${t}`,t===this.wrapping)}getTooltipBounds(e){const{elementSize:t,anchorTo:i,placement:n,canvasX:s,canvasY:r,yOffset:o,xOffset:a,canvasRect:l}=e,{width:c,height:h}=t,d={width:c,height:h};if("node"===i||"pointer"===i){const e=jc[n],t=Kc[n];return d.top=r+o+h*(t-1)/2+8*t,d.left=s+a+c*(e-1)/2+8*e,d}switch(n){case"top":return d.top=o,d.left=l.width/2-c/2+a,d;case"right":return d.top=l.height/2-h/2+o,d.left=l.width-c/2+a,d;case"left":return d.top=l.height/2-h/2+o,d.left=a,d;case"bottom":return d.top=l.height-h+o,d.left=l.width/2-c/2+a,d;case"top-left":return d.top=o,d.left=a,d;case"top-right":return d.top=o,d.left=l.width-c+a,d;case"bottom-right":return d.top=l.height-h+o,d.left=l.width-c+a,d;case"bottom-left":return d.top=l.height-h+o,d.left=a,d}return d}};function Zc(e,t){return e.series===t.series&&k(e.datumIndex,t.datumIndex)}a([Te],Xc.prototype,"enabled",2),a([Te],Xc.prototype,"mode",2),a([Te],Xc.prototype,"showArrow",2),a([Te],Xc.prototype,"delay",2),a([Te],Xc.prototype,"range",2),a([Te],Xc.prototype,"wrapping",2),a([Te],Xc.prototype,"position",2),a([Te],Xc.prototype,"pagination",2),a([Te],Xc.prototype,"darkTheme",2),a([Te],Xc.prototype,"bounds",2);var Qc=class{constructor(){this.candidates=[]}get current(){return this.active}reset(){this.candidates.length=0,this.active=void 0}update(e,t){this.candidates=e;let i=null!=t?e.findIndex(e=>Zc(e,t)):-1;return-1===i&&(i=0),this.active=e[i],{current:this.active,index:i,length:e.length}}next(){const{candidates:e,active:t}=this,i=null==t?-1:e.findIndex(e=>Zc(e,t));if(-1===i)return;let n=i+1;return n>=e.length&&(n=0),this.active=e[n],{current:this.active,index:n,length:this.candidates.length}}},Jc=class extends Ji{constructor(e){super(),this.chart=e,this.id=(0,n.sX)(this),this.series=[],this.highlight={pendingHoverEvent:void 0,appliedHoverEvent:void 0,stashedHoverEvent:void 0},this.tooltip={lastHover:void 0},this.hoverDevice="pointer",this.previousInputDevice="keyboard",this.focus={sortedSeries:[],series:void 0,seriesIndex:0,datumIndex:0,datum:void 0},this.hoverScheduler=hi((e,t)=>(0,n.zk)().requestAnimationFrame(e),()=>{(this.tooltip.lastHover||this.highlight.pendingHoverEvent)&&(this.chart.getUpdateType()<=5?this.hoverScheduler.schedule():(this.highlight.pendingHoverEvent&&this.handleHoverHighlight(!1),this.tooltip.lastHover&&this.handleHoverTooltip(this.tooltip.lastHover,!1)))}),this.tooltipCandidates=new Qc;const t=e.ctx.domManager.addChild("series-area","series-area-aria-label1"),i=e.ctx.domManager.addChild("series-area","series-area-aria-label2");this.swapChain=new wc(t,i,"img"),this.swapChain.addListener("blur",e=>this.onBlur(e)),this.swapChain.addListener("focus",()=>this.onFocus()),"normal"===e.ctx.domManager.mode&&(this.focusIndicator=new Sc(this.swapChain),this.focusIndicator.overrideFocusVisible("integrated"!==e.mode&&void 0));const{seriesDragInterpreter:s,seriesWidget:r,containerWidget:o}=e.ctx.widgets;r.setTabIndex(-1),this.destroyFns.push(()=>e.ctx.domManager.removeChild("series-area","series-area-aria-label1"),()=>e.ctx.domManager.removeChild("series-area","series-area-aria-label2"),r.addListener("focus",()=>this.swapChain.focus()),r.addListener("mousemove",e=>this.onHover(e)),r.addListener("wheel",e=>this.onWheel(e)),r.addListener("mouseleave",e=>this.onLeave(e)),r.addListener("keydown",e=>this.onKeyDown(e)),r.addListener("contextmenu",(e,t)=>this.onContextMenu(e,t)),s.addListener("drag-move",e=>this.onDragMove(e)),s.addListener("click",e=>this.onClick(e,r)),s.addListener("dblclick",e=>this.onClick(e,r)),o.addListener("contextmenu",(e,t)=>this.onContextMenu(e,t)),o.addListener("click",(e,t)=>this.onClick(e,t)),o.addListener("dblclick",(e,t)=>this.onClick(e,t)),e.ctx.animationManager.addListener("animation-start",()=>this.clearAll()),e.ctx.domManager.addListener("resize",()=>this.clearAll()),e.ctx.highlightManager.addListener("highlight-change",e=>this.changeHighlightDatum(e)),e.ctx.layoutManager.addListener("layout:complete",e=>this.layoutComplete(e)),e.ctx.updateService.addListener("pre-scene-render",()=>this.preSceneRender()),e.ctx.updateService.addListener("update-complete",()=>this.updateComplete()),e.ctx.zoomManager.addListener("zoom-change",()=>this.clearAll()),e.ctx.zoomManager.addListener("zoom-pan-start",()=>this.clearAll()))}get bbox(){return(this.seriesRect??m.zero).clone()}isState(e){return this.chart.ctx.interactionManager.isState(e)}isIgnoredTouch(e){return"touch"===e.device&&"click"!==e.type&&"hover"!==this.chart.ctx.chartService.touch.dragAction&&("drag"!==this.chart.ctx.chartService.touch.dragAction||!this.isState(9))}dataChanged(){var e;(e=this.highlight).stashedHoverEvent??(e.stashedHoverEvent=this.highlight.appliedHoverEvent),this.chart.ctx.tooltipManager.removeTooltip(this.id),this.focusIndicator?.clear(),this.clearHighlight()}preSceneRender(){null!=this.highlight.stashedHoverEvent&&(this.highlight.pendingHoverEvent=this.highlight.stashedHoverEvent,this.highlight.stashedHoverEvent=void 0,this.handleHoverHighlight(!0)),null!=this.tooltip.lastHover&&this.handleHoverTooltip(this.tooltip.lastHover,!0)}updateComplete(){this.isState(34)&&this.focusIndicator?.isFocusVisible()&&this.handleSeriesFocus(0,0,!0)}update(e,t){this.chart.ctx.updateService.update(e,t)}seriesChanged(e){this.focus.sortedSeries=[...e].sort((e,t)=>{let i=e.properties.focusPriority??1/0,n=t.properties.focusPriority??1/0;return i===n&&([i,n]=[e._declarationOrder,t._declarationOrder]),i<n?-1:i>n?1:0}),this.series=e}layoutComplete(e){this.seriesRect=e.series.rect,this.hoverRect=e.series.paddedRect,this.chart.ctx.widgets.seriesWidget.setBounds(e.series.paddedRect),"normal"===this.chart.ctx.domManager.mode&&this.chart.ctx.widgets.chartWidget.setBounds(e.chart)}onContextMenu(e,t){const{sourceEvent:i}=e;if(i.currentTarget!=t.getElement())return;if(i.target==this.chart.ctx.widgets.containerWidget.getElement()){if(this.isState(36)){const{currentX:t,currentY:i}=e;this.chart.ctx.contextMenuRegistry.dispatchContext("always",{widgetEvent:e,canvasX:t,canvasY:i},void 0)}return}let n,s;if(this.focusIndicator?.isFocusVisible())n=this.chart.ctx.highlightManager.getActiveHighlight(),n&&this.seriesRect&&n.midPoint&&(s=wt.toCanvasPoint(n.series.contentGroup,n.midPoint.x,n.midPoint.y));else if(this.isState(36)){const t=this.pickNodes({x:e.currentX,y:e.currentY},"context-menu");t&&(this.chart.ctx.highlightManager.updateHighlight(this.id),n=t.matches[0].datum)}const r=n?.series;this.clearAll();const o=e.currentX+t.cssLeft(),a=e.currentY+t.cssTop();r&&n?this.chart.ctx.contextMenuRegistry.dispatchContext("series-node",{widgetEvent:e,canvasX:o,canvasY:a},{pickedSeries:r,pickedNode:n},s):this.chart.ctx.contextMenuRegistry.dispatchContext("series-area",{widgetEvent:e,canvasX:o,canvasY:a},void 0,s)}onLeave(e){if(!this.isState(41))return;const t=e.sourceEvent.relatedTarget;"ag-charts-text-input__textarea"!==t?.className&&(this.chart.ctx.tooltipManager.isEnteringInteractiveTooltip(e.sourceEvent)||(this.chart.ctx.domManager.updateCursor(this.id),"keyboard"!==this.hoverDevice&&this.clearAll()))}onWheel(e){this.isState(41)&&(this.focusIndicator?.overrideFocusVisible(!1),this.previousInputDevice="pointer")}onDragMove(e){this.isState(41)&&(this.focusIndicator?.overrideFocusVisible(!1),this.onHoverLikeEvent(e))}onHover(e){this.isState(41)&&this.onHoverLikeEvent(e)}onHoverLikeEvent(e){if(!this.isIgnoredTouch(e)&&("touch"!==e.device&&"drag-move"===e.type||(this.tooltip.lastHover=e),"touch"===e.device&&"hover"===this.chart.ctx.chartService.touch.dragAction&&e.sourceEvent.preventDefault(),this.hoverDevice="pointer",this.previousInputDevice="pointer",this.highlight.pendingHoverEvent=e,this.hoverScheduler.schedule(),this.isState(32))){const{currentX:t,currentY:i}=e,n=this.pickNodes({x:t,y:i},"event")?.matches,s=n?.[0];s?.series.hasEventListener("seriesNodeClick")||s?.series.hasEventListener("seriesNodeDoubleClick")||null!=n&&n.length>1&&this.chart.tooltip.pagination?this.chart.ctx.domManager.updateCursor(this.id,"pointer"):this.chart.ctx.domManager.updateCursor(this.id)}}onClick(e,t){if(t===this.chart.ctx.widgets.seriesWidget&&this.chart.ctx.animationManager.isActive()&&this.chart.ctx.animationManager.skipCurrentBatch(),"touch"===e.device&&t===this.chart.ctx.widgets.seriesWidget&&this.swapChain.focus({preventScroll:!0}),!this.isState(41))return;if(t===this.chart.ctx.widgets.seriesWidget){if(!t.getElement().contains(e.sourceEvent.target))return}else if(e.sourceEvent.target!=t.getElement())return;if(this.focusIndicator?.overrideFocusVisible(!1),this.onHoverLikeEvent(e),!this.isState(32))return;if(t==this.chart.ctx.widgets.seriesWidget&&this.checkSeriesNodeClick(e))return this.update(5),void e.sourceEvent.preventDefault();const i={type:"click"===e.type?"click":"doubleClick",event:e.sourceEvent};this.chart.fireEvent(i)}onFocus(){this.isState(34)&&(this.hoverDevice=this.focusIndicator?.isFocusVisible(!0)?"keyboard":"pointer",this.handleFocus(0,0))}onBlur(e){this.isState(34)&&(this.hoverDevice="pointer",this.chart.ctx.tooltipManager.isEnteringInteractiveTooltip(e)||this.clearAll(),this.focusIndicator?.overrideFocusVisible(void 0))}onKeyDown(e){if(!this.isState(43))return;const t=function(e){for(const[t,{activatesFocusIndicator:i=!0,bindings:s}]of(0,n.jO)(xc))if(Ec(e,s))return{name:t,activatesFocusIndicator:i}}(e.sourceEvent);switch(!1===t?.activatesFocusIndicator&&this.focusIndicator?.overrideFocusVisible("keyboard"===this.previousInputDevice),t?.name){case"redo":return this.chart.ctx.chartEventManager.seriesEvent("series-redo");case"undo":return this.chart.ctx.chartEventManager.seriesEvent("series-undo");case"zoomin":return this.chart.ctx.chartEventManager.seriesKeyNavZoom(1,e);case"zoomout":return this.chart.ctx.chartEventManager.seriesKeyNavZoom(-1,e);case"arrowup":return this.onArrow(-1,0,e);case"arrowdown":return this.onArrow(1,0,e);case"arrowleft":return this.onArrow(0,-1,e);case"arrowright":return this.onArrow(0,1,e);case"submit":return this.onSubmit(e)}}onArrow(e,t,i){this.isState(34)&&(this.hoverDevice="keyboard",this.previousInputDevice="keyboard",this.focusIndicator?.overrideFocusVisible(!0),this.focus.seriesIndex+=e,this.focus.datumIndex+=t,this.handleFocus(e,t),i.sourceEvent.preventDefault(),this.chart.ctx.chartEventManager.seriesEvent("series-focus-change"))}onSubmit(e){if(!this.isState(34))return;const{series:t,datum:i}=this.focus,n=e.sourceEvent;void 0!==t&&void 0!==i?t.fireNodeClickEvent(n,i):this.chart.fireEvent({type:"click",event:n}),n.preventDefault()}checkSeriesNodeClick(e){var t;const i=this.pickNodes({x:e.currentX,y:e.currentY},"event");if(null==i||0===i.matches.length)return;const n=this.chart.tooltip.pagination?this.tooltipCandidates.update(i.matches,this.tooltipCandidates.current)?.current:void 0,{series:s,datum:r}=n??i.matches[0],o=null==n?i.distance:0;if("click"===e.type){const i=s.fireNodeClickEvent(e.sourceEvent,r)&&this.chart.tooltip.pagination?this.tooltipCandidates.next():void 0;if(null!=i){e.sourceEvent.preventDefault();const{currentX:n,currentY:s}=e,r=n+(this.hoverRect?.x??0),o=s+(this.hoverRect?.y??0);(t=this.highlight).pendingHoverEvent??(t.pendingHoverEvent=this.highlight.appliedHoverEvent),this.handleHoverHighlight(!1),this.showTooltip(i.current,r,o,{index:i.index,length:i.length})}return!0}return"dblclick"===e.type&&(e.preventZoomDblClick=0===o,s.fireNodeDoubleClickEvent(e.sourceEvent,r),!0)}handleFocus(e,t){const i=this.chart.overlays.getFocusInfo(this.chart.ctx.localeManager);null==i?this.handleSeriesFocus(e,t):this.focusIndicator?.update(i.rect,this.seriesRect,!1)}handleSeriesFocus(e,t,i=!1){if("hierarchy"===this.chart.chartType||"gauge"===this.chart.chartType)return void this.handleSoloSeriesFocus(e,t,i);const{focus:s}=this,r=s.sortedSeries.filter(e=>e.visible&&e.focusable);if(0===r.length)return;const o=s.datumIndex-t,a=s.seriesIndex-e;s.seriesIndex=(0,n.qE)(0,s.seriesIndex,r.length-1),s.series=r[s.seriesIndex];const l=this.focus.datumIndex,c=this.focus.seriesIndex;this.updatePickedFocus(l,t,o,c,e,a,i)}handleSoloSeriesFocus(e,t,i){this.focus.series=this.focus.sortedSeries[0];const n=this.focus.datumIndex,s=this.focus.seriesIndex,r=this.focus.datumIndex-t,o=this.focus.seriesIndex-e;this.updatePickedFocus(n,t,r,s,e,o,i)}updatePickedFocus(e,t,i,n,s,r,o){const{focus:a,hoverRect:l,seriesRect:c}=this;if(void 0===a.series||void 0===l)return;const h=a?.series?.pickFocus({datumIndex:e,datumIndexDelta:t,otherIndex:n,otherIndexDelta:s,seriesRect:c});if(!h)return;const{datum:d}=h;if(void 0!==h.otherIndex&&(a.seriesIndex=h.otherIndex),a.datumIndex=h.datumIndex,a.datum=d,this.focusIndicator?.isFocusVisible()&&this.chart.ctx.animationManager.reset(),this.focusIndicator?.isFocusVisible()){const e=function({bounds:e}){return e instanceof m?e:null!=e?wt.toCanvas(e):m.NaN}(h),{x:t,y:i}=e.computeCenter();if(!l.containsPoint(t,i)&&this.chart.ctx.zoomManager.panToBBox(this.id,l,e))return;const{x1:n,x2:s,y1:r,y2:o}=no.from(e),a=l.containsPoint(n,r),c=l.containsPoint(s,r),d=l.containsPoint(n,o),u=l.containsPoint(s,o);if(!(a||c||d||u)){const t=no.from(l);h.movedBounds=e.clone(),n<t.x1&&s<t.x1?(h.movedBounds.x=t.x1-2,h.movedBounds.width=4):n>t.x2&&s>t.x2&&(h.movedBounds.x=t.x2-2,h.movedBounds.width=4),r<t.y1&&o<t.y1?(h.movedBounds.y=t.y1-2,h.movedBounds.height=4):r>t.y2&&o>t.y2&&(h.movedBounds.y=t.y2-2,h.movedBounds.height=4)}}this.focusIndicator?.update(h.movedBounds??h.bounds,this.seriesRect,h.clipFocusBox);const u=function(e,t,i){const{x:n,y:s}=function(e,t,i){const n=Zs(e,i.datum,i.movedBounds);if(null!=n)return{x:n.canvasX,y:n.canvasY};const s=i.bounds;if(null!=s){if(s instanceof m){const{x:e,y:i}=s.computeCenter();return{x:t.x+e,y:t.y+i}}return wt.toCanvas(s).computeCenter()}}(e,t,i)??{};if(void 0!==n&&void 0!==s)return{type:"keyboard",canvasX:n,canvasY:s}}(a.series,l,h);if(void 0!==u&&"keyboard"===this.hoverDevice){this.tooltip.lastHover=void 0,this.highlight.appliedHoverEvent=void 0,this.highlight.pendingHoverEvent=void 0,this.highlight.stashedHoverEvent=void 0;const e=this.chart.getTooltipContent(a.series,d.datumIndex,d),n=Js.makeTooltipMeta(u,a.series,d,h.movedBounds);this.chart.ctx.highlightManager.updateHighlight(this.id,d),a.series.tooltipEnabled??this.chart.tooltip.enabled?this.chart.ctx.tooltipManager.updateTooltip(this.id,n,e):this.chart.ctx.tooltipManager.removeTooltip(this.id),o||(0===t&&0===s||i!==h.datumIndex||r!==(h.otherIndex??a.seriesIndex))&&this.swapChain.update(this.getDatumAriaText(d,e))}}getDatumAriaText(e,t){const i=null==t?"":Bc(t);return this.chart.ctx.localeManager.t("ariaAnnounceHoverDatum",{datum:e.series.getDatumAriaText?.(e,i)??i})}clearHighlight(){this.highlight.pendingHoverEvent=void 0,this.highlight.appliedHoverEvent=void 0,this.chart.ctx.highlightManager.updateHighlight(this.id)}clearTooltip(){this.chart.ctx.tooltipManager.removeTooltip(this.id),this.tooltip.lastHover=void 0}clearAll(){this.clearHighlight(),this.clearTooltip(),this.focusIndicator?.clear()}handleHoverHighlight(e){this.highlight.appliedHoverEvent=this.highlight.pendingHoverEvent,this.highlight.pendingHoverEvent=void 0;const t=this.highlight.appliedHoverEvent;if(!t||!this.isState(41))return;const{currentX:i,currentY:n}=t,s=t.currentX+(this.hoverRect?.x??0),r=t.currentY+(this.hoverRect?.y??0);if(e?this.chart.ctx.animationManager.isActive():!this.hoverRect?.containsPoint(s,r))return void this.clearHighlight();const{range:o}=this.chart.highlight,a="tooltip"===o?"highlight-tooltip":"highlight",l=this.pickNodes({x:i,y:n},a);if(!l||0===l.matches.length)return void this.chart.ctx.highlightManager.updateHighlight(this.id);const{current:c}=this.tooltipCandidates,h=null==c?void 0:l.matches.find(e=>Zc(e,c)),d=h?.datum??l.matches[0].datum;this.chart.ctx.highlightManager.updateHighlight(this.id,d),this.hoverDevice="pointer"}handleHoverTooltip(e,t){const{current:i}=this.tooltipCandidates;if(this.tooltipCandidates.reset(),!this.isState(41))return;const{currentX:n,currentY:s}=e,r=n+(this.hoverRect?.x??0),o=s+(this.hoverRect?.y??0),a=e.sourceEvent.target;if(t?this.chart.ctx.animationManager.isActive():!this.hoverRect?.containsPoint(r,o))return void("pointer"==this.hoverDevice&&this.clearTooltip());if(a&&this.chart.tooltip.interactive&&this.chart.ctx.domManager.isManagedChildDOMElement(a,"canvas-overlay",Fc))return;const l=this.pickNodes({x:e.currentX,y:e.currentY},"tooltip");if(l&&0!==l.matches.length)if(this.hoverDevice="pointer",0===l.distance){const{current:e,index:t,length:n}=this.tooltipCandidates.update(l.matches,this.chart.tooltip.pagination?i:void 0);this.showTooltip(e,r,o,{index:t,length:n})}else this.showTooltip(l.matches[0],r,o);else"pointer"==this.hoverDevice&&this.clearTooltip()}showTooltip({series:e,datum:t,datumIndex:i},n,s,r){const o=this.chart.getTooltipContent(e,i,t);if((e.tooltipEnabled??this.chart.tooltip.enabled)&&null!=o){const i=Js.makeTooltipMeta({type:"pointermove",canvasX:n,canvasY:s},e,t,void 0);this.chart.ctx.tooltipManager.updateTooltip(this.id,i,o,r)}else this.chart.ctx.tooltipManager.removeTooltip(this.id)}changeHighlightDatum(e){const t=new Set,{series:i,datum:n}=e.currentHighlight??{},{series:s,datum:r}=e.previousHighlight??{};s&&t.add(s),i&&t.add(i),s?.properties.cursor&&r&&this.chart.ctx.domManager.updateCursor(s.id),i?.properties.cursor&&"default"!==i?.properties.cursor&&n&&this.chart.ctx.domManager.updateCursor(i.id,i.properties.cursor),null==i||null==s?this.update(5):this.update(5,{seriesToUpdate:t})}pickNodes(e,t,i){const n=[...this.series].reverse();let s;for(const r of n){if(!r.visible||!r.contentGroup.visible)continue;const n=r.pickNodes(e,t,i);if(null==n||0===n.datums.length)continue;const{datums:o,distance:a}=n;if(0!==n.datums.length)if(0===a){0!==s?.distance&&(s={matches:[],distance:0});for(const e of o){const{datumIndex:t}=e;s.matches.push({series:r,datum:e,datumIndex:t})}}else if(null==s||s.distance>a){const[e]=o,{datumIndex:t}=e;s={matches:[{series:r,datum:e,datumIndex:t}],distance:a}}}return s}},eh=class{constructor(e){this.seriesRoot=e,this.groups=new Map,this.series=new Map,this.expectedSeriesCount=1,this.mode="normal"}setSeriesCount(e){this.expectedSeriesCount=e}requestGroup(e){const{internalId:t,type:i,contentGroup:n,seriesGrouping:s}=e,{groupIndex:r=t}=s??{},o=this.series.get(t);if(null!=o)throw new Error(`AG Charts - series already has an allocated layer: ${JSON.stringify(o)}`);0===this.series.size&&(this.mode=this.expectedSeriesCount>=30?"aggressive-grouping":"normal");let a=this.groups.get(i);null==a&&(a=new Map,this.groups.set(i,a));const l=this.lookupIdx(r);let c=a.get(l);return null==c&&(c={type:i,id:l,seriesIds:[],group:this.seriesRoot.appendChild(new At({name:`${e.contentGroup.name??i}-managed-layer`,zIndex:e.contentGroup.zIndex,renderToOffscreenCanvas:!1}))},a.set(l,c)),this.series.set(t,{layerState:c,seriesConfig:e}),c.seriesIds.push(t),c.group.appendChild(n),c.group}changeGroup(e){const{internalId:t,seriesGrouping:i,type:n,contentGroup:s,oldGrouping:r}=e,{groupIndex:o=t}=i??{};this.groups.get(n)?.get(o)?.seriesIds.includes(t)||(this.series.has(t)&&this.releaseGroup({internalId:t,seriesGrouping:r,type:n,contentGroup:s}),this.requestGroup(e))}releaseGroup(e){const{internalId:t,contentGroup:i,type:n}=e;if(!this.series.has(t))throw new Error(`AG Charts - series doesn't have an allocated layer: ${t}`);const s=this.series.get(t)?.layerState;s&&(s.seriesIds=s.seriesIds.filter(e=>e!==t),s.group.removeChild(i)),0===s?.seriesIds.length?(this.seriesRoot.removeChild(s.group),this.groups.get(s.type)?.delete(s.id),this.groups.get(n)?.delete(t)):null!=s&&s.seriesIds.length>0&&(s.group.zIndex=this.getLowestSeriesZIndex(s.seriesIds)),this.series.delete(t)}updateLayerCompositing(){this.groups.forEach(e=>{e.forEach(e=>{const{group:t,seriesIds:i}=e;let n;if(0===i.length)n=!1;else if(i.length>1)n=!0;else{const e=this.series.get(i[0]);n=!0===e?.seriesConfig.renderToOffscreenCanvas()}t.renderToOffscreenCanvas=n,t.zIndex=this.getLowestSeriesZIndex(i)})})}lookupIdx(e){return"normal"===this.mode?e:"string"!=typeof e||(e=Number(e.split("-").at(-1)))?Math.floor(30*(0,n.qE)(0,e/this.expectedSeriesCount,1)):0}destroy(){this.groups.forEach(e=>{e.forEach(e=>{this.seriesRoot.removeChild(e.group)})}),this.groups.clear(),this.series.clear()}getLowestSeriesZIndex(e){return e.reduce((e,t)=>{const i=this.series.get(t),n=i?.seriesConfig.contentGroup.zIndex;return null==e||null==n?n:Et(e,n)<=0?e:n},void 0)??1}},th=class extends De{constructor(){super(...arguments),this.dragAction="drag"}};a([Te],th.prototype,"dragAction",2);var ih=class{constructor(e,t,i,n,s){this.chart=e,this.dataService=t,this.updateService=i,this.zoomManager=n,this.animationManager=s,this.dirtyZoom=!1,this.dirtyDataSource=!1,this.lastAxisZooms=new Map,this.destroyFns=[],this.destroyFns.push(this.dataService.addListener("data-source-change",()=>this.onDataSourceChange()),this.dataService.addListener("data-load",()=>this.onDataLoad()),this.dataService.addListener("data-error",()=>this.onDataError()),this.updateService.addListener("update-complete",e=>this.onUpdateComplete(e)),this.zoomManager.addListener("zoom-change",()=>this.onZoomChange()))}destroy(){this.destroyFns.forEach(e=>e())}onDataLoad(){this.animationManager.skip(),this.updateService.update(1)}onDataError(){this.updateService.update(4)}onDataSourceChange(){this.dirtyDataSource=!0}onUpdateComplete(e){(e.apiUpdate||this.dirtyZoom||this.dirtyDataSource)&&this.updateWindow(e)}onZoomChange(){this.dirtyZoom=!0}updateWindow(e){if(!this.dataService.isLazy())return;const t=this.getValidAxis();let i,n=!0;if(t){const s=this.zoomManager.getAxisZoom(t.id);i=this.getAxisWindow(t,s),n=this.shouldRefresh(e,t,s)}this.dirtyZoom=!1,this.dirtyDataSource=!1,n&&this.dataService.load({windowStart:i?.min,windowEnd:i?.max})}getValidAxis(){return this.chart.axes.find(e=>"time"===e.type)}shouldRefresh(e,t,i){if(e.apiUpdate)return!0;if(this.dirtyDataSource)return!0;if(!this.dirtyZoom)return!1;const n=this.lastAxisZooms.get(t.id);return!(n&&i.min===n.min&&i.max===n.max||(this.lastAxisZooms.set(t.id,i),0))}getAxisWindow(e,t){const{domain:i}=e.scale;if(!t||0===i.length||isNaN(Number(i[0])))return;const n=Number(i[1])-Number(i[0]);return{min:new Date(Number(i[0])+n*t.min),max:new Date(Number(i[0])+n*t.max)}}},nh=/^((?!chrome|android).)*safari/i,sh=/Version\/(\d+(\.\d+)?)/,rh=/Chrome/,oh=/Chrome\/(\d+)/,ah=/Edg/,lh=/OPR/,ch=new Set(["map-shape-background","map-line-background"]),hh=class{constructor(e,t,i,n,s,r,o){this.chartLike=e,this.overlays=t,this.dataService=i,this.layoutManager=n,this.localeManager=s,this.animationManager=r,this.domManager=o,this.destroyFns=[],this.overlayElem=this.domManager.addChild("canvas-overlay","overlay"),this.overlayElem.role="status",this.overlayElem.ariaAtomic="false",this.overlayElem.ariaLive="polite",this.overlayElem.classList.toggle(oc),this.destroyFns.push(this.layoutManager.addListener("layout:complete",e=>this.onLayoutComplete(e)))}destroy(){this.destroyFns.forEach(e=>e()),this.domManager.removeChild("canvas-overlay","overlay")}onLayoutComplete({series:{rect:e}}){const t=this.dataService.isLoading(),i=this.chartLike.series.some(e=>e.hasData),s=this.chartLike.series.some(e=>e.visible&&!ch.has(e.type));this.overlays.darkTheme?this.overlayElem.classList.add(ac):this.overlayElem.classList.remove(ac),this.overlayElem.style.left=`${e.x}px`,this.overlayElem.style.top=`${e.y}px`,this.overlayElem.style.width=`${e.width}px`,this.overlayElem.style.height=`${e.height}px`;const r=t,o=!t&&!i,a=i&&!s,l=this.overlays.unsupportedBrowser.enabled&&function(){const{userAgent:e}=(0,n.zk)("navigator");if(nh.test(e)){const t=sh.exec(e);if(null==t)return!1;const i=parseFloat(t[1]),s=Math.floor(i)>16;return s||n.Vy.warnOnce(`Unsupported Safari version: ${i}; ${e}`),!s}if(rh.test(e)&&!ah.test(e)&&!lh.test(e)){const t=oh.exec(e);if(null==t)return!1;const i=parseInt(t[1],10),s=i>126;return s||n.Vy.warnOnce(`Unsupported Chrome version: ${i}; ${e}`),!s}return!1}();r?this.showOverlay(this.overlays.loading,e):this.hideOverlay(this.overlays.loading),o?this.showOverlay(this.overlays.noData,e):this.hideOverlay(this.overlays.noData),a?this.showOverlay(this.overlays.noVisibleSeries,e):this.hideOverlay(this.overlays.noVisibleSeries),l?this.showOverlay(this.overlays.unsupportedBrowser,e):this.hideOverlay(this.overlays.unsupportedBrowser);const c=r||o||a||l;(0,n.Bq)(this.overlayElem,"aria-hidden",!c)}showOverlay(e,t){if(!e.enabled)return;const i=e.getElement(this.animationManager,this.localeManager,t);this.overlayElem.appendChild(i)}hideOverlay(e){e.removeElement(()=>{this.overlayElem.innerText=" "},this.animationManager)}},dh=y.create(!0,"opts"),uh=class extends De{constructor(){super(...arguments),this.padding=new si(0)}};a([Te],uh.prototype,"clip",2),a([Te],uh.prototype,"padding",2);var ph=class e extends ni{constructor(e,t){var i;super(),this.id=(0,n.sX)(this),this.seriesRoot=new It({name:`${this.id}-series-root`,zIndex:5}),this.annotationRoot=new It({name:`${this.id}-annotation-root`,zIndex:9}),this.titleGroup=new At({name:"titles",zIndex:13}),this.debug=y.create(),this.extraDebugStats={},this.data=[],this._firstAutoSize=!0,this._autoSizeNotify=new n.iN,this.padding=new si(20),this.seriesArea=new uh,this.keyboard=new sa,this.touch=new th,this.mode="standalone",this.chartCaptions=new Ui,this.suppressFieldDotNotation=!1,this.loadGoogleFonts=!1,this.destroyed=!1,this._destroyFns=[],this.chartAnimationPhase="initial",this.modulesManager=new rc,this.processors=[],this.queuedUserOptions=[],this.queuedChartOptions=[],this.firstApply=!0,this.syncStatus="init",this.apiUpdate=!1,this._pendingFactoryUpdatesCount=0,this._performUpdateSkipAnimations=!1,this._performUpdateNotify=new n.iN,this.performUpdateType=8,this.runningUpdateType=8,this.updateShortcutCount=0,this.seriesToUpdate=new Set,this.updateMutex=new ii,this.updateRequestors={},this.performUpdateTrigger=hi((e,t=0)=>{0===t?queueMicrotask(e):setTimeout(e,t)},({count:e})=>{this.destroyed||this.updateMutex.acquire(async()=>{try{await this.performUpdate(e)}catch(e){n.Vy.error("update error",e)}}).catch(e=>n.Vy.errorOnce(e))}),this._performUpdateSplits={},this.axes=[],this.series=[],this._cachedData=void 0,this.onSeriesNodeClick=e=>{this.fireEvent(e)},this.onSeriesNodeDoubleClick=e=>{this.fireEvent(e)},this.onSeriesVisibilityChange=e=>{this.fireEvent(e)},this.seriesGroupingChanged=e=>{if(!(e instanceof yc))return;const{series:t,seriesGrouping:i,oldGrouping:n}=e;t.contentGroup.isRoot()||this.seriesLayerManager.changeGroup({internalId:t.internalId,type:t.type,contentGroup:t.contentGroup,renderToOffscreenCanvas:()=>t.renderToOffscreenCanvas(),seriesGrouping:i,oldGrouping:n})},this.chartOptions=e;const s=t?.scene,r=t?.container??e.processedOptions.container??void 0,o=t?.styleContainer??e.specialOverrides.styleContainer;s&&(this._firstAutoSize=!1,this._lastAutoSize=[s.width,s.height,s.pixelRatio]);const a=new At({name:"root"});a.visible=!1,a.append(this.seriesRoot),a.append(this.annotationRoot),a.append(this.titleGroup),this.titleGroup.append(this.title.node),this.titleGroup.append(this.subtitle.node),this.titleGroup.append(this.footnote.node),this.tooltip=new Xc,this.seriesLayerManager=new eh(this.seriesRoot),this.mode=e.userOptions.mode??this.mode,this.styleNonce=e.processedOptions.styleNonce;const l=this.ctx=new Mo(this,{chartType:this.getChartType(),scene:s,root:a,container:r,styleContainer:o,domMode:e.optionMetadata.domMode,syncManager:new na(this),fireEvent:e=>this.fireEvent(e),updateCallback:(e,t)=>this.update(e,t),updateMutex:this.updateMutex});this._destroyFns.push(l.domManager.addListener("resize",()=>this.parentResize(l.domManager.containerSize))),this.overlays=new cc,(i=this.overlays.loading).renderer??(i.renderer=()=>function(e,t){const{animationDuration:i}=ks.add,s=i*t,r=(0,n.n)("div",`${oc}--loading`,{display:"flex",alignItems:"center",justifyContent:"center",flexDirection:"column",height:"100%",boxSizing:"border-box",font:"13px Verdana, sans-serif",userSelect:"none",animation:`ag-charts-loading ${s}ms linear 50ms both`}),o=(0,n.n)("span",{width:"45px",height:"40px",backgroundImage:["linear-gradient(#0000 calc(1 * 100% / 6), #ccc 0 calc(3 * 100% / 6), #0000 0), ","linear-gradient(#0000 calc(2 * 100% / 6), #ccc 0 calc(4 * 100% / 6), #0000 0), ","linear-gradient(#0000 calc(3 * 100% / 6), #ccc 0 calc(5 * 100% / 6), #0000 0)"].join(""),backgroundSize:"10px 400%",backgroundRepeat:"no-repeat",animation:"ag-charts-loading-matrix 1s infinite linear"}),a=(0,n.n)("p",{marginTop:"1em"});a.innerText=e;const l=(0,n.n)("div",`${oc}__loading-background`,{position:"absolute",inset:"0",opacity:"0.5",zIndex:"-1"}),c=(0,n.n)("style");return c.innerText=["@keyframes ag-charts-loading { from { opacity: 0 } to { opacity: 1 } }","@keyframes ag-charts-loading-matrix {","0% { background-position: 0% 0%, 50% 0%, 100% 0%; }","100% { background-position: 0% 100%, 50% 100%, 100% 100%; }","}"].join(" "),r.replaceChildren(c,o,a,l),r}(this.overlays.loading.getText(l.localeManager),l.animationManager.defaultDuration)),this.processors=[new ih(this,l.dataService,l.updateService,l.zoomManager,l.animationManager),new hh(this,this.overlays,l.dataService,l.layoutManager,l.localeManager,l.animationManager,l.domManager)],this.highlight=new Ao,this.container=r;const c=this.getModuleContext();l.domManager.setDataBoolean("animating",!1),this.seriesAreaManager=new Jc(this.initSeriesAreaDependencies()),this._destroyFns.push(l.layoutManager.registerElement(0,e=>{e.layoutBox.shrink(this.padding.toJson()),this.chartCaptions.positionCaptions(e)}),l.layoutManager.addListener("layout:complete",e=>this.chartCaptions.positionAbsoluteCaptions(e)),l.dataService.addListener("data-load",e=>{this.data=e.data}),this.title.registerInteraction(c,"beforebegin"),this.subtitle.registerInteraction(c,"beforebegin"),this.footnote.registerInteraction(c,"afterend"),Ai.addWindowEvent("page-left",()=>this.destroy()),l.animationManager.addListener("animation-frame",()=>{this.update(7)}),l.animationManager.addListener("animation-start",()=>l.domManager.setDataBoolean("animating",!0)),l.animationManager.addListener("animation-stop",()=>l.domManager.setDataBoolean("animating",!1)),l.zoomManager.addListener("zoom-change",()=>{this.series.forEach(e=>e.animationState?.transition("updateData"));const e="initial"!==this.chartAnimationPhase;this.update(4,{forceNodeDataRefresh:!0,skipAnimations:e})})),this.parentResize(l.domManager.containerSize)}static getInstance(t){return e.chartsInstances.get(t)}get canvasElement(){return this.ctx.scene.canvas.element}download(e,t){this.ctx.scene.download(e,t)}getCanvasDataURL(e){return this.ctx.scene.getDataURL(e)}toSVG(){return this.ctx.scene.toSVG()}get seriesAreaBoundingBox(){return this.seriesAreaManager.bbox}getOptions(){return this.queuedUserOptions.at(-1)??this.chartOptions.userOptions}getChartOptions(){return this.queuedChartOptions.at(-1)??this.chartOptions}overrideFocusVisible(e){this.seriesAreaManager.focusIndicator?.overrideFocusVisible(e)}initSeriesAreaDependencies(){const{ctx:e,tooltip:t,highlight:i,overlays:n,seriesRoot:s,mode:r}=this,o=this.getChartType();return{fireEvent:this.fireEvent.bind(this),getUpdateType:()=>this.performUpdateType,getTooltipContent:(e,t,i)=>this.getTooltipContent(e,t,i),chartType:o,ctx:e,tooltip:t,highlight:i,overlays:n,seriesRoot:s,mode:r}}getModuleContext(){return this.ctx}getTooltipContent(e,t,i){const n=!1!==e.properties.tooltip.enabled?e.getTooltipContent(t,i):void 0,s=null==n?[]:[n];if("shared"!==this.tooltip.mode||1===this.series.length)return s;const r=e.getCategoryValue(t);return null==r?s:this.series.flatMap(t=>{if(t===e)return s;if(!t.isEnabled()||!1===t.properties.tooltip.enabled)return[];const i=t.datumIndexForCategoryValue(r),n=null==i?void 0:t.getTooltipContent(i,void 0);return null==n?[]:[n]})}getCaptionText(){return[this.title,this.subtitle,this.footnote].filter(e=>e.enabled&&e.text).map(e=>e.text).join(". ")}getAriaLabel(){return this.ctx.localeManager.t("ariaAnnounceChart",{seriesCount:this.series.length})}resetAnimations(){this.chartAnimationPhase="initial";for(const e of this.series)e.resetAnimation(this.chartAnimationPhase);for(const e of this.axes)e.resetAnimation(this.chartAnimationPhase);this.animationRect=void 0,this.ctx.animationManager.reset()}skipAnimations(){this.ctx.animationManager.skipCurrentBatch(),this._performUpdateSkipAnimations=!0}detachAndClear(){this.container=void 0,this.ctx.scene.clearCanvas()}destroy(e){if(this.destroyed)return;const t=e?.keepTransferableResources;let i;return this.performUpdateType=8,this._destroyFns.forEach(e=>e()),this.processors.forEach(e=>e.destroy()),this.overlays.destroy(),this.modulesManager.destroy(),t?(this.ctx.scene.strip(),i={container:this.container,scene:this.ctx.scene}):(this.ctx.scene.destroy(),this.container=void 0),this.destroySeries(this.series),this.seriesLayerManager.destroy(),this.axes.forEach(e=>e.destroy()),this.axes=[],this.animationRect=void 0,this.ctx.destroy(),this.destroyed=!0,Object.freeze(this),i}requestFactoryUpdate(e){this.destroyed||(this._pendingFactoryUpdatesCount++,this.updateMutex.acquire(async()=>{if(!this.destroyed)try{await e(this)}finally{this.destroyed||this._pendingFactoryUpdatesCount--}}).catch(e=>n.Vy.errorOnce(e)))}clearCallbackCache(){this.ctx.callbackCache.invalidateCache();for(const e of this.series)e.resetDatumCallbackCache()}update(e=0,t){if(this.destroyed)return;const{forceNodeDataRefresh:i=!1,skipAnimations:n,seriesToUpdate:s=this.series,newAnimationBatch:r,apiUpdate:o=!1}=t??{};this.apiUpdate=o,this.ctx.widgets.seriesWidget.setDragTouchEnabled("none"!==this.touch.dragAction),i&&this.series.forEach(e=>e.markNodeDataDirty());for(const e of s)this.seriesToUpdate.add(e);if(n&&(this.ctx.animationManager.skipCurrentBatch(),this._performUpdateSkipAnimations=!0),r&&this.ctx.animationManager.isActive()&&(this._performUpdateSkipAnimations=!0),this.debug.check()){let t=(new Error).stack??"<unknown>";t=t.replace(/\([^)]*/g,""),this.updateRequestors[t]=e}e<this.performUpdateType&&(this.performUpdateType=e,this.ctx.domManager.setDataBoolean("updatePending",!0),this.performUpdateTrigger.schedule(t?.backOffMs))}async performUpdate(e){const{performUpdateType:t,extraDebugStats:i,_performUpdateSplits:n,ctx:s}=this,r=[...this.seriesToUpdate];this.clearCallbackCache(),this.performUpdateType=8,this.seriesToUpdate.clear(),this.runningUpdateType=t,0===this.updateShortcutCount&&t<7&&(s.animationManager.startBatch(this._performUpdateSkipAnimations),s.animationManager.onBatchStop(()=>this.chartAnimationPhase="ready")),this.ctx.scene.updateDebugFlags(),this.debug("Chart.performUpdate() - start",ys[t]);let o=performance.now();n.start??(n.start=o);const a=e=>{n[e]??(n[e]=0),n[e]+=performance.now()-o,o=performance.now()};switch(t){case 0:if(this.checkUpdateShortcut(0))break;this.ctx.updateService.dispatchPreDomUpdate(),this.updateDOM();case 1:if(this.checkUpdateShortcut(1))break;await this.updateData(),a("⬇️");case 2:if(this.checkUpdateShortcut(2))break;await this.processData(),this.seriesAreaManager.dataChanged(),a("🏭");case 3:if(this.checkUpdateShortcut(3))break;await this.processDomains(),a("⛰️");case 4:if(await this.checkFirstAutoSize(),this.checkUpdateShortcut(4))break;await this.processLayout(),a("⌖");case 5:if(this.checkUpdateShortcut(5))break;await this.updateSeries(r),a("🤔"),this.updateAriaLabels(),this.seriesLayerManager.updateLayerCompositing();case 6:if(this.checkUpdateShortcut(6))break;s.updateService.dispatchPreSceneRender(),a("↖");case 7:if(this.checkUpdateShortcut(7))break;s.animationManager.endBatch(),i.updateShortcutCount=this.updateShortcutCount,s.scene.render({debugSplitTimes:n,extraDebugStats:i,seriesRect:this.seriesRect}),this.extraDebugStats={};for(const e of Object.keys(n))delete n[e];this.ctx.domManager.incrementDataCounter("sceneRenders"),this.ctx.domManager.postRenderUpdate();case 8:this.updateShortcutCount=0,this.updateRequestors={},this._performUpdateSkipAnimations=!1,s.animationManager.endBatch()}this.destroyed||(s.updateService.dispatchUpdateComplete(this.apiUpdate),this.apiUpdate=!1,this.ctx.domManager.setDataBoolean("updatePending",!1),this.runningUpdateType=8,this.syncStatus="ready"),this._performUpdateNotify.notify();const l=performance.now();this.debug("Chart.performUpdate() - end",{chart:this,durationMs:Math.round(100*(l-n.start))/100,count:e,performUpdateType:ys[t]})}updateThemeClassName(){const e="ag-charts-theme-",t=[`${e}default`,`${e}default-dark`];let i=t[0],n=!1,{theme:s}=this.chartOptions.processedOptions;for(;"string"!=typeof s&&null!=s;)s=s.baseTheme;"string"==typeof s&&(i=s.replace("ag-",e),n=s.includes("-dark")),t.includes(i)||(i=n?t[1]:t[0]),this.ctx.domManager.setThemeClass(i)}updateDOM(){this.updateThemeClassName();const{enabled:e,tabIndex:t}=this.keyboard;this.ctx.domManager.setTabGuardIndex(e?t??0:-1),this.ctx.domManager.setThemeParameters(this.chartOptions.themeParameters)}updateAriaLabels(){this.ctx.domManager.updateCanvasLabel(this.getAriaLabel())}checkUpdateShortcut(e){return!!this.destroyed||(this.updateShortcutCount>3?(n.Vy.warn("exceeded the maximum number of simultaneous updates (4), discarding changes and rendering",this.updateRequestors),!1):this.performUpdateType<=e&&(this.updateShortcutCount++,!0))}async checkFirstAutoSize(){null!=this.width&&null!=this.height||this._lastAutoSize||await this._autoSizeNotify.await(500)||this.debug("Chart.checkFirstAutoSize() - timeout for first size update.")}onAxisChange(e,t){null==t&&0===e.length||this.ctx.axisManager.updateAxes(t??[],e)}onSeriesChange(e,t){const i=t?.filter(t=>!e.includes(t))??[];this.destroySeries(i),this.seriesLayerManager?.setSeriesCount(e.length);for(const i of e){if(t?.includes(i))continue;const e=this.seriesLayerManager.requestGroup(i);i.attachSeries(e,this.seriesRoot,this.annotationRoot);const n=this;i.chart={get mode(){return n.mode},get isMiniChart(){return!1},get seriesRect(){return n.seriesRect}},i.resetAnimation(this.chartAnimationPhase),this.addSeriesListeners(i),i.addChartEventListeners()}this.seriesAreaManager?.seriesChanged(e)}destroySeries(e){e?.forEach(e=>{e.removeEventListener("seriesNodeClick",this.onSeriesNodeClick),e.removeEventListener("seriesNodeDoubleClick",this.onSeriesNodeDoubleClick),e.removeEventListener("groupingChanged",this.seriesGroupingChanged),e.destroy(),this.seriesLayerManager.releaseGroup(e),e.detachSeries(void 0,this.seriesRoot,this.annotationRoot),e.chart=void 0})}addSeriesListeners(e){this.hasEventListener("seriesNodeClick")&&e.addEventListener("seriesNodeClick",this.onSeriesNodeClick),this.hasEventListener("seriesNodeDoubleClick")&&e.addEventListener("seriesNodeDoubleClick",this.onSeriesNodeDoubleClick),this.hasEventListener("seriesVisibilityChange")&&e.addEventListener("seriesVisibilityChange",this.onSeriesVisibilityChange),e.addEventListener("groupingChanged",this.seriesGroupingChanged)}assignSeriesToAxes(){for(const e of this.axes)e.boundSeries=this.series.filter(t=>t.axes[e.direction]===e)}assignAxesToSeries(){const e=(0,n.$z)(this.axes,e=>e.direction);for(const t of this.series)for(const i of t.directions){const s=e[i];if(!s)return void n.Vy.warnOnce(`no available axis for direction [${i}]; check series and axes configuration.`);const r=t.getKeys(i),o=s.find(e=>!e.keys.length||r.some(t=>e.keys.includes(t)));if(!o)return void n.Vy.warnOnce(`no matching axis for direction [${i}] and keys [${r}]; check series and axes configuration.`);t.axes[i]=o}}parentResize(e){if(null==e||null!=this.width&&null!=this.height)return;let{width:t,height:i}=e;const{pixelRatio:n}=e;if(t=Math.floor(t),i=Math.floor(i),0===t&&0===i)return;const[s=0,r=0,o=1]=this._lastAutoSize??[];s===t&&r===i&&o===n||(this._lastAutoSize=[t,i,n],this.resize("SizeMonitor",{}))}resize(e,t){const{scene:i,animationManager:s}=this.ctx,{inWidth:r,inHeight:o,inMinWidth:a,inMinHeight:l,inOverrideDevicePixelRatio:c}=t;this.ctx.domManager.setSizeOptions(a??this.minWidth,l??this.minHeight,r??this.width,o??this.height);const h=r??this.width??this._lastAutoSize?.[0],d=o??this.height??this._lastAutoSize?.[1],u=c??this.overrideDevicePixelRatio??this._lastAutoSize?.[2];if(this.debug(`Chart.resize() from ${e}`,{width:h,height:d,pixelRatio:u,stack:(new Error).stack}),null!=h&&null!=d&&(0,n.Bf)(h)&&(0,n.Bf)(d)&&i.resize(h,d,u)){s.reset();let e=!0;null!=this.width&&null!=this.height||!this._firstAutoSize||(e=!1,this._firstAutoSize=!1),this.update(4,{forceNodeDataRefresh:!0,skipAnimations:e}),this._autoSizeNotify.notify()}}async updateData(){this.series.forEach(e=>e.setChartData(this.data));const e=this.modulesManager.mapModules(e=>e.updateData?.(this.data));await Promise.all(e)}async processData(){this.series.some(e=>e.canHaveAxes)&&(this.assignAxesToSeries(),this.assignSeriesToAxes());const e=new Wo(this.mode,this.suppressFieldDotNotation),t=this.series.map(t=>t.processData(e)),i=this.modulesManager.mapModules(t=>t.processData?.(e));this._cachedData=e.execute(this._cachedData),await Promise.all([...t,...i]),this.updateLegends()}async processDomains(){for(const e of this.axes)e.processData();for(const e of this.series)e.updatedDomains()}updateLegends(e){for(const{legend:t,legendType:i}of this.modulesManager.legends())"category"===i?this.setCategoryLegendData(e):this.setLegendData(i,t)}setCategoryLegendData(e){var t;const{ctx:{legendManager:i,stateManager:s}}=this;e&&this.series.forEach(t=>{const i=e.find(e=>e.seriesId===t.id);t.onLegendInitialState("category",i)});const r=this.series.flatMap(e=>{const t=e.getLegendData("category");return i.updateData(e.id,t),t});if(e)s.setStateAndRestore(i,e);else{if("integrated"!==this.mode){const e={},i=new Map(this.series.map(e=>[e.id,e.type]));for(const{seriesId:s,symbol:{marker:o},label:a}of r.filter(e=>!e.hideInLegend)){if(null==o.fill)continue;const r=i.get(s),l=e[r]??(e[r]={});l[t=a.text]??(l[t]=o.fill),l[a.text]!==o.fill&&n.Vy.warnOnce(`legend item '${a.text}' has multiple fill colors, this may cause unexpected behaviour.`)}}i.update()}}setLegendData(e,t){t.data=this.series.filter(e=>e.properties.showInLegend).flatMap(t=>t.getLegendData(e))}async processLayout(){const e=this.animationRect,{width:t,height:i}=this.ctx.scene,n=this.ctx.layoutManager.createContext(t,i);await this.performLayout(n),e&&!this.animationRect?.equals(e)&&this.ctx.animationManager.skipCurrentBatch(),this.debug("Chart.performUpdate() - seriesRect",this.seriesRect)}async updateSeries(e){const{seriesRect:t}=this;await Promise.all(e.map(e=>e.update({seriesRect:t}))),this.ctx.seriesLabelLayoutManager.updateLabels(this.series.filter(e=>e.visible&&e.usesPlacedLabels),this.padding,this.seriesRect)}async waitForUpdate(e=1e4,t=!1){const i=performance.now();for(;(this._pendingFactoryUpdatesCount>0||8!==this.performUpdateType||8!==this.runningUpdateType||this.ctx.scene.waitingForUpdate())&&!this.destroyed;){if(this._pendingFactoryUpdatesCount>0&&await this.updateMutex.waitForClearAcquireQueue(),8===this.performUpdateType&&8===this.runningUpdateType||await this._performUpdateNotify.await(),performance.now()-i>e){const i=`Chart.waitForUpdate() timeout of ${e} reached - first chart update taking too long.`;if(t)throw new Error(i);n.Vy.warnOnce(i)}Nt()&&await(0,n.v7)(),this.ctx.scene.waitingForUpdate()&&await(0,n.v7)(50)}}filterMiniChartSeries(e){return e?.filter(e=>!1!==e.showInMiniChart)}applyOptions(e){const t=this.firstApply?e.processedOptions:e.diffOptions(this.chartOptions);if(null==t||0===Object.keys(t).length)return;const i=this.firstApply?{}:this.chartOptions.processedOptions,n=e.processedOptions;dh("Chart.applyOptions() - applying delta",t);const s=this.applyModules(n);t.listeners&&this.registerListeners(this,t.listeners),zt(this,t,{skip:["type","data","series","listeners","preset","theme","legend.listeners","navigator.miniChart.series","navigator.miniChart.label","locale.localeText","axes","topology","nodes","initialState","styleContainer"]});let r=!1,o="no-op";null!=t.series&&(o=this.applySeries(this,t.series,i?.series),r=!0),"replaced"===o&&this.resetAnimations(),this.applyAxes(this,n,i,o,[])&&(r=!0),t.data&&(this.data=t.data),t.legend?.listeners&&this.modulesManager.isEnabled("legend")&&Object.assign(this.legend.listeners,t.legend.listeners),t.locale?.localeText&&(this.modulesManager.getModule("locale").localeText=t.locale?.localeText),this.chartOptions=e;const a=this.modulesManager.getModule("navigator"),l=this.modulesManager.getModule("zoom");a?.enabled||l?.enabled||this.ctx.zoomManager.updateZoom("chart");const c=a?.miniChart,h=n.navigator?.miniChart?.series??n.series;!0===c?.enabled&&null!=h?this.applyMiniChartOptions(c,h,n,i):!1===c?.enabled&&(c.series=[],c.axes=[]),this.ctx.annotationManager.setAnnotationStyles(e.annotationThemes),r||(r=this.shouldForceNodeDataRefresh(t,o));const d=r||s?0:4;this.maybeResetAnimations(o),this.shouldClearLegendData(n,i,o)&&this.ctx.legendManager.clearData(),this.applyInitialState(n),dh("Chart.applyOptions() - update type",ys[d],{seriesStatus:o,forceNodeDataRefresh:r}),this.update(d,{apiUpdate:!0,forceNodeDataRefresh:r,newAnimationBatch:!0}),this.firstApply=!1}applyInitialState(e){const{annotationManager:t,chartTypeOriginator:i,historyManager:n,stateManager:s,zoomManager:r}=this.ctx,{initialState:o}=e;if("annotations"in e&&e.annotations?.enabled&&null!=o?.annotations){const e=o.annotations.map(e=>N(e,t.getAnnotationTypeStyles(e.type)));s.setState(t,e)}null!=o?.chartType&&s.setState(i,o.chartType),(e.navigator?.enabled||e.zoom?.enabled)&&null!=o?.zoom&&s.setState(r,o.zoom),null!=o?.legend&&this.updateLegends(o.legend),null!=o&&n.clear()}maybeResetAnimations(e){if("standalone"===this.mode)switch(e){case"series-grouping-change":case"replaced":this.resetAnimations()}}shouldForceNodeDataRefresh(e,t){const i=!!e.data||"data-change"===t||"replaced"===t,n=qo.getKeys(),s=Object.values(n).some(t=>null!=e[t]),r=null!=e.title&&null!=e.subtitle;return i||s||r}shouldClearLegendData(e,t,i){const n="replaced"===i||"series-grouping-change"===i||"updated"===i&&(e.series?.length!==t.series?.length||!e.series?.every((e,i)=>e.type===t.series?.[i].type)),s=null!=t.legend&&null==e.legend;return n||s}applyMiniChartOptions(e,t,i,n){const s=n?.navigator?.miniChart?.series??n?.series,r=this.applySeries(e,this.filterMiniChartSeries(t),this.filterMiniChartSeries(s));this.applyAxes(e,i,n,r,["axes[].tick","axes[].thickness","axes[].title","axes[].crosshair","axes[].gridLine","axes[].label"]);const o=e.series;for(const e of o)e.properties.id=void 0;const a=e.axes,l=a.find(e=>"x"===e.direction);for(const e of a)e.nice=!1,e.gridLine.enabled=!1,e.label.enabled=e===l,e.tick.enabled=!1,e.interactionEnabled=!1;if(null!=l){const e=i.navigator?.miniChart,t=e?.label,n=e?.label?.interval;if(l.line.enabled=!1,l.label.set(G(t,["interval","rotation","minSpacing","autoRotate","autoRotateAngle"])),l.tick.set(G(n,["enabled","width","size","color","interval","step"])),"grouped-category"===l.type){l.label.enabled=!1,l.label.rotation=0;const{depthOptions:e}=l;if(0===e.length)e.set([{label:{enabled:!0}}]);else for(let t=1;t<e.length;t++)e[t].label.enabled=!1}else"time"!==l.type&&"unit-time"!==l.type&&"ordinal-time"!==l.type||(l.parentLevel.enabled=!1);const s=n?.step;null!=s&&(l.interval.step=s)}}applyModules(e){const{type:t}=this.constructor;let i=!1;for(const n of c.byType("root","legend")){const s=null!=e[n.optionsKey]&&n.chartTypes.includes(t);s!==this.modulesManager.isEnabled(n)&&(s?(this.modulesManager.addModule(n,e=>e.moduleFactory(this.getModuleContext())),"legend"===n.type&&this.modulesManager.getModule(n)?.attachLegend(this.ctx.scene),this[n.optionsKey]=this.modulesManager.getModule(n)):(this.modulesManager.removeModule(n),delete this[n.optionsKey]),i=!0)}return i}initSeriesDeclarationOrder(e){for(let t=0;t<e.length;t++)e[t].setSeriesIndex(t)}applySeries(e,t,i){if(!t)return"no-change";const n=function(e,t,i){const n=(e,t,i)=>{const n=[e];for(const e of Xl)e in t&&null!=t[e]&&n.push(`${e}=${t[e]}`);return i?.seriesGrouping&&n.push(`seriesGrouping.groupId=${i?.seriesGrouping.groupId}`),n.join(";")},s=new Map;let r=0;for(const t of e){const e=n(t.type,t.properties,i?.[r]);s.has(e)||s.set(e,[]),s.get(e)?.push([t,r++])}const o=new Map;r=0;for(const e of t){const t=n(e.type,e,e);o.has(t)||o.set(t,[]),o.get(t)?.push([e,r++])}if(![...s.keys()].some(e=>o.has(e)))return{status:"no-overlap",oldKeys:s.keys(),newKeys:o.keys()};const a=[];for(const[e,t]of o.entries())for(const[n,r]of t){const t=s.get(e);if(null==t||t.length<1){a.push({opts:n,targetIdx:r,idx:r,status:"add"}),s.delete(e);continue}const[o,l]=t.shift(),c=Ft(i?.[l]??{},n??{}),{groupIndex:h,stackIndex:d}=c?.seriesGrouping??{};null!=h||null!=d?a.push({opts:n,series:o,diff:c,targetIdx:r,idx:l,status:"series-grouping"}):c?a.push({opts:n,series:o,diff:c,targetIdx:r,idx:l,status:"update"}):a.push({opts:n,series:o,targetIdx:r,idx:l,status:"no-op"}),0===t.length&&s.delete(e)}for(const e of s.values())for(const[t,i]of e)a.push({series:t,idx:i,targetIdx:-1,status:"remove"});return{status:"overlap",changes:a}}(e.series,t,i);if("no-overlap"===n.status){dh(`Chart.applySeries() - creating new series instances, status: ${n.status}`,n);const i=t.map(e=>this.createSeries(e));return this.initSeriesDeclarationOrder(i),e.series=i,"replaced"}dh("Chart.applySeries() - matchResult",n);const s=[];let r=!1,o=!1,a=!1;const l=n.changes.toSorted((e,t)=>e.targetIdx-t.targetIdx);for(const e of l)switch(o||(o="series-grouping"===e.status),r||(r=null!=e.diff?.data),a||(a="no-op"!==e.status),e.status){case"add":{const t=this.createSeries(e.opts);s.push(t),dh("Chart.applySeries() - created new series",t);break}case"remove":dh(`Chart.applySeries() - removing series at previous idx ${e.idx}`,e.series);break;case"no-op":s.push(e.series),dh(`Chart.applySeries() - no change to series at previous idx ${e.idx}`,e.series);break;default:{const{series:t,diff:i,idx:n}=e;dh(`Chart.applySeries() - applying series diff previous idx ${n}`,i,t),this.applySeriesValues(t,i),t.markNodeDataDirty(),s.push(t)}}return this.initSeriesDeclarationOrder(s),dh("Chart.applySeries() - final series instances",s),e.series=s,o?"series-grouping-change":r?"data-change":a?"updated":"no-op"}applyAxes(e,t,i,n,s=[]){if(!("axes"in t)||!t.axes)return!1;s=["axes[].type",...s];const r=t.axes.map(e=>"time"===e.type&&null!=e.unit?{...e,type:"unit-time"}:e);return"replaced"!==n&&e.axes.length===r.length&&e.axes.every((e,t)=>e.type===r[t].type)&&Ql(i)?(e.axes.forEach((e,t)=>{const n=Ft(i.axes?.[t]??{},r[t]);dh(`Chart.applyAxes() - applying axis diff idx ${t}`,n),zt(e,n,{path:`axes[${t}]`,skip:s})}),!0):(dh(`Chart.applyAxes() - creating new axes instances; seriesStatus: ${n}`),e.axes=this.createAxis(r,s),!0)}createSeries(e){const t=ta.create(e.type,this.getModuleContext());return this.applySeriesOptionModules(t,e),this.applySeriesValues(t,e),t}applySeriesOptionModules(e,t){const i=e.createModuleContext(),n=e.getModuleMap();for(const s of c.byType("series-option"))s.optionsKey in t&&s.seriesTypes.includes(e.type)&&n.addModule(s,e=>e.moduleFactory(i))}applySeriesValues(e,t){const i=e.getModuleMap(),{type:n,data:s,listeners:r,seriesGrouping:o,showInMiniChart:a,...l}=t;for(const e of Ko)if("series-option"===e.type&&e.optionsKey in l){const t=i.getModule(e.optionsKey);if(t){const i=l[e.optionsKey];delete l[e.optionsKey],t.properties.set(i)}}null!=l.visible&&(e.visible=l.visible),e.properties.set(l),"data"in t&&e.setOptionsData(s),r&&this.registerListeners(e,r,{nodeClick:"seriesNodeClick",nodeDoubleClick:"seriesNodeDoubleClick"}),"seriesGrouping"in t&&(e.seriesGrouping=null==o?void 0:{...e.seriesGrouping,...o})}createAxis(e,t){const i=[],n=this.getModuleContext();for(let s=0;s<e.length;s++){const r=e[s],o=jo.create(r.type,n);this.applyAxisModules(o,r),zt(o,r,{path:`axes[${s}]`,skip:t}),i.push(o)}return function(e){const t=[],i=[],n=[...Yl];for(const n of e)n instanceof $l&&(ql(n.position)?i.push(n.position):t.push(n));for(const e of t){let t;do{t=n.pop()}while(t&&i.includes(t));if(null==t)break;e.position=t}}(i),i}applyAxisModules(e,t){const i=e.createModuleContext(),n=e.getModuleMap();for(const s of c.byType("axis-option")){const r=null!=t[s.optionsKey];r!==n.isEnabled(s)&&(r?(n.addModule(s,e=>e.moduleFactory(i)),e[s.optionsKey]=n.getModule(s)):(n.removeModule(s),delete e[s.optionsKey]))}}registerListeners(e,t,i){e.clearEventListeners();for(const[s,r]of(0,n.jO)(t))if((0,n.Tn)(r)){const t=i?.[s];null==t?e.addEventListener(s,r):e.addEventListener(t,e=>{if(e?.type===t){const t=new Proxy(e,{get:(e,t,i)=>"type"===t?s:Reflect.get(e,t,i)});r(t)}else r(e)})}}};ph.chartsInstances=new WeakMap,a([li({newValue(e){this.destroyed||(this.ctx.domManager.setContainer(e),ph.chartsInstances.set(e,this))},oldValue(e){ph.chartsInstances.delete(e)}})],ph.prototype,"container",2),a([li({newValue(e){this.resize("width option",{inWidth:e})}})],ph.prototype,"width",2),a([li({newValue(e){this.resize("height option",{inHeight:e})}})],ph.prototype,"height",2),a([li({newValue(e){this.resize("minWidth option",{inMinWidth:e})}})],ph.prototype,"minWidth",2),a([li({newValue(e){this.resize("minHeight option",{inMinHeight:e})}})],ph.prototype,"minHeight",2),a([li({newValue(e){this.resize("overrideDevicePixelRatio option",{inOverrideDevicePixelRatio:e})}})],ph.prototype,"overrideDevicePixelRatio",2),a([Te],ph.prototype,"padding",2),a([Te],ph.prototype,"seriesArea",2),a([Te],ph.prototype,"keyboard",2),a([Te],ph.prototype,"touch",2),a([Te],ph.prototype,"mode",2),a([Te],ph.prototype,"styleNonce",2),a([ri("chartCaptions.title")],ph.prototype,"title",2),a([ri("chartCaptions.subtitle")],ph.prototype,"subtitle",2),a([ri("chartCaptions.footnote")],ph.prototype,"footnote",2),a([Te],ph.prototype,"suppressFieldDotNotation",2),a([Te],ph.prototype,"loadGoogleFonts",2),a([li({changeValue(e,t){this.onAxisChange(e,t)}})],ph.prototype,"axes",2),a([li({changeValue(e,t){this.onSeriesChange(e,t)}})],ph.prototype,"series",2);var gh=ph,fh=y.create(!0,"opts"),mh="AG Charts - Chart was destroyed, cannot perform request.",vh=class{constructor(e,t,i){this.factoryApi=t,this.licenseManager=i,this.chart=e}async update(e){if(!this.chart)throw new Error(mh);return fh.group("AgChartInstance.update()",async()=>{this.factoryApi.update(e,this),await(this.chart?.waitForUpdate())})}async updateDelta(e){if(!this.chart)throw new Error(mh);return fh.group("AgChartInstance.updateDelta()",async()=>{this.factoryApi.updateUserDelta(this,e),await(this.chart?.waitForUpdate())})}getOptions(){if(!this.chart)throw new Error(mh);const e=Vt(this.chart.getOptions());for(const t of Object.keys(e))t.startsWith("_")&&delete e[t];return e}waitForUpdate(){if(!this.chart)throw new Error(mh);return this.chart.waitForUpdate()}async download(e){if(!this.chart)throw new Error(mh);const t=await this.prepareResizedChart(this,this.chart,e);try{t.chart?.download(e?.fileName,e?.fileFormat)}finally{t.destroy()}}async __toSVG(e){if(!this.chart)throw new Error(mh);const t=await this.prepareResizedChart(this,this.chart,{width:600,height:300,...e});try{return t?.chart?.toSVG()}finally{t?.destroy()}}async getImageDataURL(e){if(!this.chart)throw new Error(mh);const t=await this.prepareResizedChart(this,this.chart,e);try{return t.chart.getCanvasDataURL(e?.fileFormat)}finally{t.destroy()}}getState(){return this.factoryApi.caretaker.save(...this.getEnabledOriginators())}async setState(e){const{chart:t}=this;if(!t)return;const i=this.getEnabledOriginators();i.includes(t.ctx.legendManager)?(await this.setStateOriginators(e,i.filter(e=>e!==t.ctx.zoomManager)),await this.setStateOriginators(e,[t.ctx.zoomManager])):await this.setStateOriginators(e,i)}resetAnimations(){this.chart?.resetAnimations()}skipAnimations(){this.chart?.skipAnimations()}destroy(){this.releaseChart?(this.releaseChart(),this.releaseChart=void 0):this.chart&&(this.chart.publicApi=void 0,this.chart.destroy()),this.chart=void 0}async prepareResizedChart(e,t,i={}){const n=i.width??t.width??t.ctx.scene.canvas.width,s=i.height??t.height??t.ctx.scene.canvas.height,r=e.getState(),o=c.hasEnterpriseModules(),a={...t.chartOptions.processedOverrides,container:document.createElement("div"),width:n,height:s};null!=i.width&&null!=i.height&&(a.overrideDevicePixelRatio=1);const l=t.getOptions();o&&(a.animation={enabled:!1},this.licenseManager?.isDisplayWatermark()&&(a.foreground={text:this.licenseManager.getWatermarkMessage(),image:{url:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjU4IiBoZWlnaHQ9IjQwIiB2aWV3Qm94PSIwIDAgMjU4IDQwIiBmaWxsPSJub25lIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPgo8cGF0aCBkPSJNMjUuNzc5IDI4LjY1N0gxMy4zNTlMMTEuMTczIDM0LjAxMkg1LjY3Mjk3TDE3LjE4MiA3LjA1OTk5SDIxLjk1M0wzMy40NjIgMzQuMDEySDI3Ljk2MkwyNS43NzYgMjguNjU3SDI1Ljc3OVpNMjQuMDY4IDI0LjM5N0wxOS41ODggMTMuNDM0TDE1LjEwNyAyNC4zOTdIMjQuMDY4Wk02Mi4wOTIgMTguODIzSDQ5LjgxN1YyMy4wODZINTYuNzc1QzU2LjU1NSAyNS4yMjIgNTUuNzU1IDI2LjkyNyA1NC4zNzIgMjguMjAyQzUyLjk4OSAyOS40NzYgNTEuMTY2IDMwLjExNSA0OC45MDkgMzAuMTE1QzQ3LjYyMiAzMC4xMTUgNDYuNDUgMjkuODg1IDQ1LjM5MyAyOS40MjNDNDQuMzU4MyAyOC45NzgxIDQzLjQzMjYgMjguMzEzOCA0Mi42OCAyNy40NzZDNDEuOTI3IDI2LjYzOSA0MS4zNDQgMjUuNjMxIDQwLjkzMSAyNC40NTNDNDAuNTE5IDIzLjI3NSA0MC4zMTEgMjEuOTcgNDAuMzExIDIwLjUzN0M0MC4zMTEgMTkuMTA1IDQwLjUxNiAxNy44IDQwLjkzMSAxNi42MjFDNDEuMzQ0IDE1LjQ0MyA0MS45MjcgMTQuNDM2IDQyLjY4IDEzLjU5OEM0My40Mzc2IDEyLjc1NzcgNDQuMzY5NiAxMi4wOTMyIDQ1LjQxMSAxMS42NTFDNDYuNDc4IDExLjE4OSA0Ny42NTYgMTAuOTYgNDguOTQ2IDEwLjk2QzUxLjYxMiAxMC45NiA1My42MzcgMTEuNjAyIDU1LjAyIDEyLjg4NUw1OC4zIDkuNjA0OTlDNTUuODE3IDcuNjY5OTkgNTIuNjc2IDYuNjk5OTkgNDguODcyIDYuNjk5OTlDNDYuNzYgNi42OTk5OSA0NC44NTMgNy4wMzQ5OSA0My4xNTQgNy43MDA5OUM0MS40NTUgOC4zNjc5OSAzOS45OTggOS4zMDM5OSAzOC43ODMgMTAuNTA0QzM3LjU2NyAxMS43MDcgMzYuNjM0IDEzLjE1OCAzNS45NzcgMTQuODU3QzM1LjMxOSAxNi41NTYgMzQuOTk0IDE4LjQ1MSAzNC45OTQgMjAuNTRDMzQuOTk0IDIyLjYzIDM1LjMyOSAyNC40OTQgMzUuOTk1IDI2LjIwNUMzNi42NjIgMjcuOTE2IDM3LjYwNSAyOS4zNzQgMzguODE3IDMwLjU3N0M0MC4wMzIgMzEuNzggNDEuNDg2IDMyLjcxMyA0My4xODggMzMuMzgzQzQ0Ljg4OCAzNC4wNDkgNDYuNzgyIDM0LjM4NCA0OC44NzIgMzQuMzg0QzUwLjk2MSAzNC4zODQgNTIuNzUgMzQuMDQ5IDU0LjM5IDMzLjM4M0M1Ni4wMzEgMzIuNzE2IDU3LjQyNiAzMS43OCA1OC41NzkgMzAuNTc3QzU5LjczMyAyOS4zNzQgNjAuNjE5IDI3LjkxNiA2MS4yMzkgMjYuMjA1QzYxLjg2IDI0LjQ5NCA2Mi4xNyAyMi42MDUgNjIuMTcgMjAuNTRDNjIuMTY5NiAxOS45Njg4IDYyLjE0NDUgMTkuMzk4IDYyLjA5NSAxOC44MjlMNjIuMDkyIDE4LjgyM1pNMTUxLjgxIDE2Ljk4MUMxNTMuNDEgMTQuNjA5IDE1Ny40MTkgMTQuMzU4IDE1OS4wMjIgMTQuMzU4VjE4LjkxQzE1Ni45NTcgMTguOTEgMTU0Ljk4NSAxOC45OTYgMTUzLjc1NyAxOS44OTJDMTUyLjUyOSAyMC43OTIgMTUxLjkxOSAyMS45ODIgMTUxLjkxOSAyMy40NjRWMzMuOTlIMTQ2Ljk2NFYxNC4zNThIMTUxLjczNkwxNTEuODEgMTYuOTgxWk0xNDMuMDExIDE0LjM2MVYzNC4wMzFIMTM4LjI0TDEzOC4xMzEgMzEuMDQ1QzEzNy40NjYgMzIuMDc2IDEzNi41NTEgMzIuOTIxOSAxMzUuNDcxIDMzLjUwNEMxMzQuMzc2IDM0LjA5OSAxMzMuMDY4IDM0LjM5NiAxMzEuNTM2IDM0LjM5NkMxMzAuMiAzNC4zOTYgMTI4Ljk2MyAzNC4xNTIgMTI3LjgyMiAzMy42NjhDMTI2LjcgMzMuMTk2NCAxMjUuNjg5IDMyLjQ5NSAxMjQuODU1IDMxLjYwOUMxMjQuMDE4IDMwLjcyMiAxMjMuMzU0IDI5LjY2MiAxMjIuODcxIDI4LjQyMkMxMjIuMzg0IDI3LjE4NSAxMjIuMTQyIDI1LjgxMSAxMjIuMTQyIDI0LjMwNEMxMjIuMTQyIDIyLjc5OCAxMjIuMzg0IDIxLjM3OCAxMjIuODcxIDIwLjExNkMxMjMuMzU3IDE4Ljg1NCAxMjQuMDE4IDE3Ljc3MiAxMjQuODU1IDE2Ljg3M0MxMjUuNjg4IDE1Ljk3NjQgMTI2LjY5OCAxNS4yNjM2IDEyNy44MjIgMTQuNzhDMTI4Ljk2MyAxNC4yODEgMTMwLjIwMyAxNC4wMzMgMTMxLjUzNiAxNC4wMzNDMTMzLjA0MyAxNC4wMzMgMTM0LjMzIDE0LjMxOCAxMzUuMzk3IDE0Ljg4OEMxMzYuNDYyIDE1LjQ1ODkgMTM3LjM3NSAxNi4yNzggMTM4LjA1NyAxNy4yNzZWMTQuMzYxSDE0My4wMTFaTTEzMi42MzEgMzAuMTMzQzEzNC4yNTYgMzAuMTMzIDEzNS41NjcgMjkuNTk0IDEzNi41NjUgMjguNTEyQzEzNy41NjEgMjcuNDMgMTM4LjA2IDI1Ljk5MSAxMzguMDYgMjQuMTk2QzEzOC4wNiAyMi40MDEgMTM3LjU2MSAyMC45OSAxMzYuNTY1IDE5Ljg5OUMxMzUuNTcgMTguODA3IDEzNC4yNTkgMTguMjU4IDEzMi42MzEgMTguMjU4QzEzMS4wMDMgMTguMjU4IDEyOS43MjkgMTguODA0IDEyOC43MzQgMTkuODk5QzEyNy43MzggMjAuOTkzIDEyNy4yMzkgMjIuNDM4IDEyNy4yMzkgMjQuMjMzQzEyNy4yMzkgMjYuMDI4IDEyNy43MzUgMjcuNDMzIDEyOC43MzQgMjguNTE1QzEyOS43MjkgMjkuNTk0IDEzMS4wMjggMzAuMTM2IDEzMi42MzEgMzAuMTM2VjMwLjEzM1pNOTMuNjk4IDI3Ljg3NkM5My41Nzk1IDI4LjAwMjUgOTMuNDU2NCAyOC4xMjQ2IDkzLjMyOSAyOC4yNDJDOTEuOTQ3IDI5LjUxNiA5MC4xMjMgMzAuMTU1IDg3Ljg2NiAzMC4xNTVDODYuNTggMzAuMTU1IDg1LjQwOCAyOS45MjYgODQuMzUgMjkuNDY0QzgzLjMxNTUgMjkuMDE4OSA4Mi4zODk4IDI4LjM1NDYgODEuNjM3IDI3LjUxN0M4MC44ODQgMjYuNjc5IDgwLjMwMSAyNS42NzIgNzkuODg5IDI0LjQ5NEM3OS40NzYgMjMuMzE1IDc5LjI2OSAyMi4wMSA3OS4yNjkgMjAuNTc4Qzc5LjI2OSAxOS4xNDUgNzkuNDczIDE3Ljg0IDc5Ljg4OSAxNi42NjJDODAuMzAxIDE1LjQ4NCA4MC44ODQgMTQuNDc2IDgxLjYzNyAxMy42MzlDODIuMzk0OSAxMi43OTg3IDgzLjMyNzMgMTIuMTM0MiA4NC4zNjkgMTEuNjkyQzg1LjQzNiAxMS4yMyA4Ni42MTQgMTEgODcuOTAzIDExQzkwLjU3IDExIDkyLjU5NSAxMS42NDIgOTMuOTc3IDEyLjkyNkw5Ny4yNTggOS42NDQ5OUM5NC43NzQgNy43MTA5OSA5MS42MzMgNi43Mzk5OSA4Ny44MjkgNi43Mzk5OUM4NS43MTggNi43Mzk5OSA4My44MTEgNy4wNzQ5OSA4Mi4xMTIgNy43NDE5OUM4MC40MTMgOC40MDc5OSA3OC45NTYgOS4zNDQ5OSA3Ny43NCAxMC41NDVDNzYuNTI1IDExLjc0NyA3NS41OTIgMTMuMTk5IDc0LjkzNCAxNC44OThDNzQuMjc3IDE2LjU5NyA3My45NTEgMTguNDkxIDczLjk1MSAyMC41ODFDNzMuOTUxIDIyLjY3IDc0LjI4NiAyNC41MzQgNzQuOTUzIDI2LjI0NUM3NS42MTkgMjcuOTU3IDc2LjU2MiAyOS40MTQgNzcuNzc0IDMwLjYxN0M3OC45OSAzMS44MiA4MC40NDQgMzIuNzUzIDgyLjE0NiAzMy40MjNDODMuODQ1IDM0LjA5IDg1LjczOSAzNC40MjQgODcuODI5IDM0LjQyNEM4OS45MTkgMzQuNDI0IDkxLjcwOCAzNC4wOSA5My4zNDggMzMuNDIzQzk0LjcxOCAzMi44NjUgOTUuOTE4IDMyLjEyMSA5Ni45NDggMzEuMTkxQzk3LjE0OSAzMS4wMDggOTcuMzQ4IDMwLjgxNSA5Ny41MzcgMzAuNjJMOTMuNzAxIDI3Ljg4NUw5My42OTggMjcuODc2Wk0xMTAuODAyIDE0LjAxNUMxMDkuMTk5IDE0LjAxNSAxMDYuODM2IDE0LjQ3MSAxMDUuNjExIDE2LjE1OEwxMDUuNTM3IDYuMDE1OTlIMTAwLjc2NVYzMy45MzlIMTA1LjcyVjIyLjY0MUMxMDUuNzcxIDIxLjQ2MDcgMTA2LjI4OCAyMC4zNDg4IDEwNy4xNTcgMTkuNTQ4OUMxMDguMDI3IDE4Ljc0OTEgMTA5LjE3OCAxOC4zMjY2IDExMC4zNTggMTguMzc0QzExMy4zOTcgMTguMzc0IDExNC4yNjggMjEuMTU5IDExNC4yNjggMjIuNjQxVjMzLjkzOUgxMTkuMjIzVjIxLjA1OUMxMTkuMjIzIDIxLjA1OSAxMTkuMTQyIDE0LjAxNSAxMTAuODAyIDE0LjAxNVpNMTczLjc2MyAxNC4zNThIMTY5Ljk5OVY4LjcxNDk5SDE2NS4wNDhWMTQuMzU4SDE2MS4yODRWMTguOTE2SDE2NS4wNDhWMzQuMDAzSDE2OS45OTlWMTguOTE2SDE3My43NjNWMTQuMzU4Wk0xOTAuNzg3IDI1LjI2MkMxOTAuMTI5IDI0LjUwMTQgMTg5LjMwNyAyMy44OTk0IDE4OC4zODQgMjMuNTAxQzE4Ny40ODggMjMuMTE3IDE4Ni4zMzEgMjIuNzMyIDE4NC45NDggMjIuMzY0QzE4NC4xNjUgMjIuMTQzOSAxODMuMzkgMjEuODk3OCAxODIuNjIzIDIxLjYyNkMxODIuMTYzIDIxLjQ2MjEgMTgxLjc0MSAyMS4yMDY2IDE4MS4zODMgMjAuODc1QzE4MS4yMzUgMjAuNzQyMSAxODEuMTE4IDIwLjU3ODkgMTgxLjAzOSAyMC4zOTY0QzE4MC45NjEgMjAuMjE0IDE4MC45MjIgMjAuMDE2NiAxODAuOTI3IDE5LjgxOEMxODAuOTI3IDE5LjI3MiAxODEuMTU2IDE4Ljg0NCAxODEuNjI1IDE4LjUxQzE4Mi4xMjEgMTguMTU2IDE4Mi44NjIgMTcuOTc2IDE4My44MjYgMTcuOTc2QzE4NC43OSAxNy45NzYgMTg1LjU4NyAxOC4yMDkgMTg2LjE0OCAxOC42NjhDMTg2LjcwNiAxOS4xMjQgMTg3LjAwNyAxOS43MjUgMTg3LjA3MiAyMC41TDE4Ny4wOTQgMjAuNzgySDE5MS42MzNMMTkxLjYxNyAyMC40NkMxOTEuNTIxIDE4LjQ4NSAxOTAuNzcxIDE2LjkgMTg5LjM4NSAxNS43NUMxODguMDEyIDE0LjYxMiAxODYuMTg1IDE0LjAzMyAxODMuOTYyIDE0LjAzM0MxODIuNDc3IDE0LjAzMyAxODEuMTQxIDE0LjI4NyAxNzkuOTk0IDE0Ljc4NkMxNzguODMxIDE1LjI5MSAxNzcuOTI2IDE1Ljk5NSAxNzcuMjk2IDE2Ljg4MkMxNzYuNjczIDE3Ljc0NTUgMTc2LjMzOCAxOC43ODQgMTc2LjM0MSAxOS44NDlDMTc2LjM0MSAyMS4xNjcgMTc2LjY5OCAyMi4yNDkgMTc3LjM5OSAyMy4wNjRDMTc4LjA2IDIzLjg0MzIgMTc4Ljg5OCAyNC40NTM0IDE3OS44NDIgMjQuODQ0QzE4MC43NDQgMjUuMjE2IDE4MS45MjggMjUuNjA3IDE4My4zNjEgMjZDMTg0LjgwNiAyNi40MSAxODUuODcyIDI2Ljc4NSAxODYuNTMgMjcuMTIzQzE4Ny4xIDI3LjQxNCAxODcuMzc5IDI3Ljg0NSAxODcuMzc5IDI4LjQ0NEMxODcuMzc5IDI5LjA0MiAxODcuMTIyIDI5LjQ2NyAxODYuNTk1IDI5LjgzOUMxODYuMDQzIDMwLjIyNiAxODUuMjM3IDMwLjQyNSAxODQuMjAxIDMwLjQyNUMxODMuMTY2IDMwLjQyNSAxODIuMzk0IDMwLjE3NCAxODEuNzQ5IDI5LjY3NEMxODEuMTEzIDI5LjE4MSAxODAuNzcyIDI4LjU4OSAxODAuNzEgMjcuODY0TDE4MC42ODUgMjcuNTgySDE3Ni4wMTNMMTc2LjAyNSAyNy45MDFDMTc2LjA2NyAyOS4wOTU1IDE3Ni40NzIgMzAuMjQ4NyAxNzcuMTg4IDMxLjIwNkMxNzcuOTA3IDMyLjE4IDE3OC44OTMgMzIuOTU4IDE4MC4xMTggMzMuNTE5QzE4MS4zMzYgMzQuMDc3IDE4Mi43MzIgMzQuMzYyIDE4NC4yNjYgMzQuMzYyQzE4NS44MDEgMzQuMzYyIDE4Ny4xMDkgMzQuMTA4IDE4OC4yMzggMzMuNjA5QzE4OS4zNzYgMzMuMTA0IDE5MC4yNzIgMzIuMzk0IDE5MC45MDEgMzEuNDk0QzE5MS41MzQgMzAuNTkyIDE5MS44NTMgMjkuNTU0IDE5MS44NTMgMjguNDAzQzE5MS44MjggMjcuMTEgMTkxLjQ2NiAyNi4wNTMgMTkwLjc3NyAyNS4yNjJIMTkwLjc4N1oiIGZpbGw9IiM5QjlCOUIiLz4KPHBhdGggZD0iTTI0MS45ODIgMjUuNjU4MlYxNy43MTE3SDIyOC40NDFMMjIwLjQ5NCAyNS42NTgySDI0MS45ODJaIiBmaWxsPSIjOUI5QjlCIi8+CjxwYXRoIGQ9Ik0yNTcuMjM5IDUuOTUwODFIMjQwLjI2NUwyMzIuMjU1IDEzLjg5NzNIMjU3LjIzOVY1Ljk1MDgxWiIgZmlsbD0iIzlCOUI5QiIvPgo8cGF0aCBkPSJNMjEyLjYxMSAzMy42MDQ4TDIxNi42OCAyOS41MzYxSDIzMC40MTJWMzcuNDgyN0gyMTIuNjExVjMzLjYwNDhaIiBmaWxsPSIjOUI5QjlCIi8+CjxwYXRoIGQ9Ik0yMTUuNTk5IDIxLjc4MDNIMjI0LjM3MkwyMzIuMzgyIDEzLjgzMzdIMjE1LjU5OVYyMS43ODAzWiIgZmlsbD0iIzlCOUI5QiIvPgo8cGF0aCBkPSJNMjA2IDMzLjYwNDdIMjEyLjYxMUwyMjAuNDk0IDI1LjY1ODJIMjA2VjMzLjYwNDdaIiBmaWxsPSIjOUI5QjlCIi8+CjxwYXRoIGQ9Ik0yNDAuMjY1IDUuOTUwODFMMjM2LjE5NyAxMC4wMTk0SDIxMC4yNTlWMi4wNzI4OEgyNDAuMjY1VjUuOTUwODFaIiBmaWxsPSIjOUI5QjlCIi8+Cjwvc3ZnPgo=",width:170,height:25,right:25,bottom:50,opacity:.7}}));const h={...t.chartOptions.specialOverrides},d={...t.chartOptions.optionMetadata},u=this.factoryApi.create(l,a,h,d);await u.setState(r),u.chart?.ctx.zoomManager.updateZoom("chartProxy",t.ctx.zoomManager.getZoom()),u.chart?.ctx.legendManager.clearData(),u.chart?.ctx.legendManager.update(t.ctx.legendManager.getData()),t.series.forEach((e,t)=>{u.chart.series[t].visible=e.visible});const p=[];for(const e of t.modulesManager.legends())p.push(e.legend.pagination?.currentPage??0);for(const e of u.chart.modulesManager.legends()){const t=p.shift()??0;e.legend.pagination&&e.legend.pagination.setPage(t)}return u.chart?.update(0,{forceNodeDataRefresh:!0}),await u.waitForUpdate(),u}getEnabledOriginators(){if(!this.chart)return[];const{chartOptions:{processedOptions:e,optionMetadata:t},ctx:{annotationManager:i,chartTypeOriginator:n,zoomManager:s,legendManager:r}}=this.chart,o=[];return"annotations"in e&&e.annotations?.enabled&&o.push(i),"price-volume"===t.presetType&&o.push(n),(e.navigator?.enabled||e.zoom?.enabled)&&o.push(s),"legend"in this.chart&&o.push(r),o}async setStateOriginators(e,t){this.factoryApi.caretaker.restore(e,...t),this.chart?.ctx.updateService.update(2,{forceNodeDataRefresh:!0}),await(this.chart?.waitForUpdate())}};vh.chartInstances=new WeakMap,a([li({oldValue(e){e.destroyed||(e.publicApi=void 0),vh.chartInstances.delete(e)},newValue(e){e&&(e.publicApi=this,vh.chartInstances.set(e,this))}})],vh.prototype,"chart",2);var yh=vh,Ch=class extends l{constructor(e){super(),this.ctx=e,this.localeText=void 0}};a([ci(e=>{e.ctx.localeManager.setLocaleText(e.localeText)}),Te],Ch.prototype,"localeText",2),a([ci(e=>{e.ctx.localeManager.setLocaleTextFormatter(e.getLocaleText)}),Te],Ch.prototype,"getLocaleText",2);var bh={type:"root",optionsKey:"locale",packageType:"community",chartTypes:["cartesian","polar","hierarchy","topology","flow-proportion","standalone","gauge"],moduleFactory:e=>new Ch(e)};function Sh(e,t,i){if(null==i||0===i[0]&&1===i[1])return{ticks:e,count:e.length};const s=(0,n.qE)(0,Math.floor(i[0]*e.length),e.length),r=(0,n.qE)(0,Math.ceil(i[1]*e.length),e.length),o=t?e.length-r:s,a=t?e.length-s:r;return{ticks:e.slice(o,a),count:e.length}}var wh=class e extends to{constructor(){super(...arguments),this.type="band",this.index=void 0,this._domain=[]}static is(t){return t instanceof e}set domain(e){this._domain!==e&&(this.invalid=!0,this._domain=e,this.index=void 0)}get domain(){return this._domain}get bands(){return this._domain}normalizeDomains(...e){let t;const i=new Set;let n=!0;for(const s of e)i.has(s)||(i.add(s),null==t?t=xh(s):(n&&(n=Eh(s,t)),t=xh([...t,...s])));return t??(t=[]),{domain:t,animatable:n}}toDomain(e){}invert(e,t=!1){this.refresh();const i=t?this.bandwidth/2:0,n=this.invertNearestIndex(Math.max(0,e-i));return t||e===this.ordinalRange(n)?this.domain[n]:void 0}ticks(e,t=this.domain,i){return Sh(t,!1,i)}findIndex(e){let{index:t}=this;if(null==t){const{domain:e}=this;t=new Map;for(let i=0;i<e.length;i++)t.set(Zr(e[i]),i);this.index=t}return t.get(Zr(e))}};function xh(e){let t;const i=new Set;for(const n of e){const s=Zr(n),r=i.size;i.add(s),i.size!==r?t?.push(n):t??(t=e.slice(0,i.size))}return t??e}function Eh(e,t){let i=-1;for(const n of e){const e=t.indexOf(n);if(-1===e)i=1/0;else{if(e<=i)return!1;i=e}}return!0}var Mh=class e extends $l{constructor(e,t=new wh){super(e,t),this.groupPaddingInner=.1,this.includeInvisibleDomains=!0,this.nice=!1}static is(t){return t instanceof e}normaliseDataDomain(e){return{domain:e,clipped:!1}}updateScale(){super.updateScale();let{paddingInner:e,paddingOuter:t}=this;if(!(0,n.Bf)(e)||!(0,n.Bf)(t)){const i=this.reduceBandScalePadding();e??(e=i.inner),t??(t=i.outer)}this.scale.paddingInner=e??0,this.scale.paddingOuter=t??0}reduceBandScalePadding(){return this.boundSeries.reduce((e,t)=>{const i=t.getBandScalePadding?.();return i&&(e.inner>i.inner&&(e.inner=i.inner),e.outer<i.outer&&(e.outer=i.outer)),e},{inner:1/0,outer:-1/0})}};Mh.className="CategoryAxis",Mh.type="category",a([Te],Mh.prototype,"groupPaddingInner",2),a([Te],Mh.prototype,"paddingInner",2),a([Te],Mh.prototype,"paddingOuter",2);var Ah=Mh,Th=class e extends wh{static is(t){return t instanceof e}normalizeDomains(...e){const{domain:t}=super.normalizeDomains(...e);return{domain:t,animatable:!1}}findIndex(e){return super.findIndex(e)??this.getMatchIndex(e)}getMatchIndex(e){const t=JSON.stringify(e),i=this._domain.find(e=>JSON.stringify(e)===t);if(null!=i)return super.findIndex(i)}};function Dh(e){if(0===e.length)return null;let t=1/0,i=-1/0;for(const n of e){const e=n instanceof Date?n.getTime():n;"number"==typeof e&&(e<t&&(t=e),e>i&&(i=e))}const n=[t,i];return n.every(isFinite)?n:null}function Ih(e,t,i){let n=!1;return e.length>2&&(e=Dh(e)??[NaN,NaN]),null!=t&&(n||(n=t>e[0]),e=[t,e[1]]),null!=i&&(n||(n=i<e[1]),e=[e[0],i]),e[0]>e[1]&&(e=[]),{extent:e,clipped:n}}var Rh=new WeakMap;function Lh(e,t){const i=JSON.stringify(e,null,0);return Rh.has(t)||Rh.set(t,new Map),Rh.get(t)?.has(i)||Rh.get(t)?.set(i,t(e)),Rh.get(t)?.get(i)}function kh(e,t){const i=new Map,n={},s=new WeakMap;return(...r)=>{const o=0===r.length?[n]:((...e)=>e.map(e=>"object"==typeof e||"symbol"==typeof e?e:(i.has(e)||i.set(e,{v:e}),i.get(e))))(...r);let a=s;for(const e of o.slice(0,-1))a.has(e)||a.set(e,new WeakMap),a=a.get(e);const l=o.at(-1);let c=a.get(l);return c?t?.("hit",e,r):(c=e(...r),a.set(l,c),t?.("miss",e,r)),c}}function Ph(e,t=[0,0]){for(const i of e)"number"==typeof i&&(i<0&&(t[0]+=i),i>0&&(t[1]+=i));return t}function Nh(e,t){return{id:e,matchGroupIds:[t],type:"aggregate",aggregateFunction:e=>Ph(e)}}function Oh(e,t){return{id:e,type:"aggregate",matchGroupIds:t?[t]:void 0,aggregateFunction:e=>Ph(e),groupAggregateFunction:(e,t=[0,0])=>(t[0]+=e?.[0]??0,t[1]+=e?.[1]??0,t)}}function _h(e){return{id:e,type:"aggregate",aggregateFunction:()=>[0,1],groupAggregateFunction:(e,t=[0,0])=>(t[0]+=e?.[0]??0,t[1]+=e?.[1]??0,t)}}function Fh(e,t){return{id:e,matchGroupIds:t?[t]:void 0,type:"aggregate",aggregateFunction:e=>Ph(e),groupAggregateFunction:(e,t=[0,0,-1])=>(t[0]+=e?.[0]??0,t[1]+=e?.[1]??0,t[2]++,t),finalFunction:(e=[0,0,0])=>{const t=e[0]+e[1];return t>=0?[0,t/e[2]]:[t/e[2],0]}}}function Gh(e,t,i){const n={id:e,matchGroupIds:i?[i]:void 0,type:"aggregate",aggregateFunction:(e,i=[])=>{const n=i[1]-i[0];return t.aggregateFunction(e).map(e=>e/n)}};return t.groupAggregateFunction&&(n.groupAggregateFunction=t.groupAggregateFunction),n}function Vh(e){return()=>{let t=0;return i=>(0,n.Bf)(i)?(t+=e?Math.max(0,i):i,t):i}}function Bh(){return()=>{let e=0;return t=>{if(!(0,n.Bf)(t))return t;const i=e;return e+=t,i}}}function Hh(e){return null!=e&&nl(e)}function zh(e){return null!=e}function Uh(e){switch(e){case"number":case"log":case"ordinal-time":case"unit-time":case"time":case"color":return Hh;default:return zh}}function Wh(e){switch(e){case"number":case"log":case"time":case"color":return"range";default:return"category"}}function jh(e,t,i={}){return{property:e,type:"key",valueType:Wh(t),validation:Uh(t),...i}}function Kh(e,t,i={}){return{property:e,type:"value",valueType:Wh(t),validation:Uh(t),...i}}function $h(e,t={}){return{property:e,type:"value",valueType:"range",missingValue:1,processor:()=>()=>1,...t}}var Yh=function(e){return e};function qh(...e){const t=e.filter(e=>null!=e);return 0===t.length?()=>Yh:1===t.length?t[0]:()=>{const e=t.map(e=>e());return(t,i)=>e.reduce((e,t)=>t(e,i),t)}}function Xh(e,t={}){const{min:i=-1/0,max:s=1/0,processor:r,...o}=t;return{type:"value",property:e,valueType:"range",validation:Hh,processor:qh(r,()=>e=>(0,n.Bf)(e)?(0,n.qE)(i,e,s):e),...o}}function Zh(e,t,i={}){const{onlyPositive:n,processor:s,...r}=i;return{...Kh(e,t,r),processor:qh(s,Vh(n))}}function Qh(e,t,i={}){return{...Kh(e,t,i),processor:Bh()}}function Jh(e,t,i,n,s){return[Kh(e,s,n),ud(n.groupId,t,i,n.separateNegative),...null!=n.rangeId?[(r=n.rangeId,o=n.groupId,{id:r,matchGroupIds:[o],type:"aggregate",aggregateFunction:e=>Lo.extendDomain(e)})]:[]];var r,o}function ed(e,t,i){return[Kh(e,t,i),gd(i.groupId)]}var td={type:"reducer",property:"smallestKeyInterval",initialValue:1/0,reducer:()=>{let e=NaN;return(t=1/0,i)=>{const n="number"==typeof i[0]?i[0]:Number(i[0]),s=Math.abs(n-e);return e=n,!isNaN(s)&&s>0&&s<t?s:t}}},id={type:"reducer",property:"largestKeyInterval",initialValue:-1/0,reducer:()=>{let e=NaN;return(t=-1/0,i)=>{const n="number"==typeof i[0]?i[0]:Number(i[0]),s=Math.abs(n-e);return e=n,!isNaN(s)&&s>0&&s>t?s:t}}},nd={type:"processor",property:"sortedGroupDomain",calculate:({domain:{groups:e}})=>e?.slice().sort((e,t)=>{for(let i=0;i<e.length;i++){const n=e[i]-t[i];if(0!==n)return n}return 0})};function sd({normaliseTo:e}){const t=(t,i)=>{if(0===i)return null;const n=(t??0)*e/i;return n>=0?Math.min(e,n):Math.max(-e,n)};return()=>()=>(e,i,n)=>{const s=function(e,t,i){const n=[0,0];for(const s of t){const t=e[s];for(const e of i.datumIndices[s]??[]){const i=t[e];if(null==i)continue;const s="number"==typeof i?i:Math.max(...i.map(e=>e??0)),r=s<0?0:1;n[r]=0===r?Math.min(n[r],s):Math.max(n[r],s)}}return Math.max(Math.abs(n[0]),n[1])}(e,i,n);for(const r of i)for(const i of n.datumIndices[r]??[]){const n=e[r],o=n[i];n[i]=null!=o?"number"==typeof o?t(o,s):o.map(e=>t(e,s)):void 0}}}function rd(e,t){return{type:"group-value-processor",matchGroupIds:e,adjust:Lh({normaliseTo:t},sd)}}function od({normaliseTo:e,zeroDomain:t,rangeMin:i,rangeMax:n}){const s=e[1]-e[0],r=(i,n,r)=>{const o=e[0]+(i-n)/r*s;return 0===r?t:o>=e[1]?e[1]:o<e[0]?e[0]:o};return()=>(t,s)=>{let[o,a]=t.domain.values[s];null!=i&&(o=i),null!=n&&(a=n);const l=a-o;t.domain.values[s]=[e[0],e[1]];const c=t.columns[s];for(let e=0;e<c.length;e+=1)c[e]=r(c[e],o,l)}}function ad(e,t,i,n,s){return{type:"property-value-processor",property:e,adjust:Lh({normaliseTo:t,rangeMin:n,rangeMax:s,zeroDomain:i},od)}}function ld(e,t,i,n){let s=3;if("category"===t.valueType)return i.length<e&&(s&=-2),s;let r=n[0]?.valueOf();for(let e=1;0!==s&&e<n.length;e++){const t=n[e]?.valueOf();(!Number.isFinite(t)||r>t)&&(s&=-3),Number.isFinite(t)&&r===t&&(s&=-2),r=t}return s}function cd(e){return{type:"processor",property:"animationValidation",calculate(t){const{keys:i,values:n}=t.defs,{input:{count:s},domain:{keys:r,values:o},keys:a,columns:l}=t;let c=3;if(0!==s){for(let e=0;0!==c&&e<i.length;e++)for(const t of i[e].scopes)c&=ld(s,i[e],r[e],a[e].get(t));for(let t=0;0!==c&&t<n.length;t++){const i=n[t];e?.includes(i.id)&&(c&=ld(s,i,o[t],l[t]))}}return{uniqueKeys:!!(1&c),orderedKeys:!!(2&c)}}}}function hd({mode:e,separateNegative:t}){return()=>()=>(i,s,r)=>{const o=[0,0];for(const a of s)for(const s of r.datumIndices[a]??[]){const r=i[a],l=r[s],c=(0,n.cI)(l)&&t?0:1;(0,n.Bf)(l)&&("normal"===e&&(o[c]+=l),r[s]=o[c],"trailing"===e&&(o[c]+=l))}}}function dd({mode:e,sum:t}){return()=>{const i=[];let s=!0;return()=>(r,o,a)=>{let l=0;for(const c of o){const o=r[c];for(const r of a.datumIndices[c]??[]){const a=o[r],h=s&&"current"===t?0:i[c];i[c]=a;const d="current"===t?a:h;(0,n.Bf)(a)&&(0,n.Bf)(h)?("normal"===e&&(l+=d),o[r]=l,"trailing"===e&&(l+=d)):o[r]=l}}s=!1}}}function ud(e,t,i,n=!1){let s;return s=t.startsWith("window")?Lh({mode:t.endsWith("-trailing")?"trailing":"normal",sum:i},dd):Lh({mode:t,separateNegative:n},hd),{type:"group-value-processor",matchGroupIds:[e],adjust:s}}function pd(){return()=>(e,t,i)=>{const n=new Float64Array(t.length);let s=0;for(const r of t){const t=e[r];for(const e of i.datumIndices[r]??[]){const i=t[e];n[s]=Number.isFinite(i)?i:NaN,s+=1,t[e]=n.subarray(0,s)}}}}function gd(e){return{type:"group-value-processor",matchGroupIds:[e],adjust:pd}}function fd(e){return e.id??e.property}function md(e,t,i,n,s){for(const{previousIndex:r,nextIndex:o}of i){const i=e[r],a=t[o];if(i[n]!==a[s])return!1}return!0}function vd(e,t,i=!0){return{type:"processor",property:"diff",calculate(n,s){const r=new Map,o=new Map,a=new Map,l=new Map,c=t.keys,h=n.keys,d=t.columns,u=n.columns,p=function(e,t,i){const n=new Map,s=t.defs.values;for(let t=0;t<s.length;t+=1){const i=s[t];if(!1===i.scopes?.includes(e))continue;const r=fd(i);if(n.has(r))return;n.set(r,t)}const r=[],o=i.defs.values;for(let t=0;t<o.length;t+=1){const i=o[t];if(!1===i.scopes?.includes(e))continue;const s=fd(i),a=n.get(s);if(null==a)return;n.delete(s),r.push({previousIndex:a,nextIndex:t})}if(0===n.size)return r}(e,t,n);if(null==p)return s;const g=Math.max(t.input.count,n.input.count);for(let s=0;s<g;s++){const g=s<t.input.count,f=s<n.input.count,m=g?Vo(c,e,s):void 0,v=null!=m?yd(m):"",y=f?Vo(h,e,s):void 0,C=null!=y?yd(y):"";if(f&&g&&v===C){md(d,u,p,s,s)||a.set(C,s);continue}const b=l.get(C);null!=b?(!i&&md(d,u,p,b,s)||(a.set(C,s),r.set(C,s)),l.delete(C)):f&&o.set(C,s);const S=o.get(v);null!=S?(!i&&md(d,u,p,S,s)||(a.set(v,s),r.set(v,s)),o.delete(v)):g&&(a.delete(v),l.set(v,s))}const f={changed:o.size>0||a.size>0||l.size>0,added:new Set(o.keys()),updated:new Set(a.keys()),removed:new Set(l.keys()),moved:new Set(r.keys())};return{...s,[e]:f}}}}function yd(e,...t){let i;return i=(0,n.cy)(e)?e.map(e=>sl(e)).join("___"):sl(e),("string"==typeof i||"number"==typeof i||"boolean"==typeof i||i instanceof Date)&&t.length>0&&(i+=`___${t.join("___")}`),i}var Cd=class{constructor(){this.top=1/0,this.right=-1/0,this.bottom=-1/0,this.left=1/0}update(e,t){e>this.right&&(this.right=e),e<this.left&&(this.left=e),t>this.bottom&&(this.bottom=t),t<this.top&&(this.top=t)}},bd=class e{constructor(e="",t,i){this.label=e,this.parent=t,this.refId=i,this.position=0,this.subtreeLeft=NaN,this.subtreeRight=NaN,this.children=[],this.leafCount=0,this.prelim=0,this.mod=0,this.ancestor=this,this.change=0,this.shift=0,this.index=0,this.screen=0,this.depth=t?t.depth+1:0}insertTick(t,i){let n=this;for(let s=0;s<t.length;s++){const r=t[s],o=s!==t.length-1,{children:a}=n,l=a.find(e=>e.label===r);if(l&&o)n=l;else{const t=new e(r,n,i);t.index=a.length,a.push(t),o&&(n=t)}}}getLeftSibling(){return this.index>0?this.parent?.children[this.index-1]:void 0}getLeftmostSibling(){return this.index>0?this.parent?.children[0]:void 0}nextLeft(){return this.children[0]}nextRight(){return this.children.at(-1)}getSiblings(){return this.parent?.children.filter((e,t)=>t!==this.index)??[]}};function Sd(e,t,i){const n=i/(t.index-e.index);t.change-=n,t.shift+=i,e.change+=n,t.prelim+=i,t.mod+=i}function wd(e,t,i){return t.getSiblings().indexOf(e.ancestor)>=0?e.ancestor:i}function xd(e,t){const i=e.getLeftSibling();if(i){let n=e,s=e,r=i,o=s.getLeftmostSibling(),a=s.mod,l=n.mod,c=r.mod,h=o.mod;for(;r.nextRight()&&s.nextLeft();){r=r.nextRight(),s=s.nextLeft(),o=o.nextLeft(),n=n.nextRight(),n.ancestor=e;const i=r.prelim+c-(s.prelim+a)+1;i>0&&(Sd(wd(r,e,t),e,i),a+=i,l+=i),c+=r.mod,a+=s.mod,h+=o.mod,l+=n.mod}r.nextRight()&&!n.nextRight()?n.mod+=c-l:(s.nextLeft()&&!o.nextLeft()&&(o.mod+=a-h),t=e)}return t}function Ed(e){const{children:t}=e;if(t.length){let[i]=t;for(const e of t)Ed(e),i=xd(e,i);!function({children:e}){let t=0,i=0;for(let n=e.length-1;n>=0;n--){const s=e[n];s.prelim+=t,s.mod+=t,i+=s.change,t+=s.shift+i}}(e);const n=(t[0].prelim+t.at(-1).prelim)/2,s=e.getLeftSibling();s?(e.prelim=s.prelim+1,e.mod=e.prelim-n):e.prelim=n}else{const t=e.getLeftSibling();e.prelim=t?t.prelim+1:0}}function Md(e,t,i){e.position=e.prelim+t,i.insertNode(e);for(const n of e.children)Md(n,t+e.mod,i)}function Ad(e){const{children:t}=e;let i=0;for(const e of t)Ad(e),e.children.length?i+=e.leafCount:i++;e.leafCount=i,t.length?(e.subtreeLeft=t[0].subtreeLeft,e.subtreeRight=t[t.length-1].subtreeRight,e.position=(e.subtreeLeft+e.subtreeRight)/2):(e.subtreeLeft=e.position,e.subtreeRight=e.position)}function Td(e){const t=new Dd,i=function(e){const t=e.reduce((e,t)=>e<t.length?t.length:e,0),i=new bd;for(let n=0;n<e.length;n++){const s=e[n];for(;s.length<t;)s.push("");i.insertTick(s,n)}return i}(e);return Ed(i),Md(i,-i.prelim,t),Ad(i),t}var Dd=class{constructor(){this.dimensions=new Cd,this.nodes=[],this.depth=0}insertNode(e){this.depth<e.depth&&(this.depth=e.depth),this.dimensions.update(e.position,e.depth),this.nodes.push(e)}scaling(e,t){let i=1;if(e>0){const{left:t,right:n}=this.dimensions;n!==t&&(i=e/(n-t))}return t&&(i*=-1),i}},Id=class extends De{constructor(){super(...arguments),this.enabled=!0}};a([Te],Id.prototype,"enabled",2),a([Te],Id.prototype,"avoidCollisions",2),a([Te],Id.prototype,"color",2),a([Te],Id.prototype,"spacing",2),a([Te],Id.prototype,"rotation",2),a([Te],Id.prototype,"fontStyle",2),a([Te],Id.prototype,"fontWeight",2),a([Te],Id.prototype,"fontSize",2),a([Te],Id.prototype,"fontFamily",2);var Rd=class extends De{constructor(){super(...arguments),this.enabled=!0}};a([Te],Rd.prototype,"enabled",2),a([Te],Rd.prototype,"width",2),a([Te],Rd.prototype,"stroke",2);var Ld=class extends De{constructor(){super(...arguments),this.label=new Id,this.tick=new Rd}};a([Te],Ld.prototype,"label",2),a([Te],Ld.prototype,"tick",2);var kd=class extends Ah{constructor(e){super(e,new Th),this.tickScale=new Th,this.depthOptions=new Ie(Ld),this.includeInvisibleDomains=!0,this.tickScale.paddingInner=1,this.tickScale.paddingOuter=0}resizeTickTree(){if(!this.tickTreeLayout)return;const{nodes:e}=this.tickTreeLayout,{range:t,step:i,inset:n,bandwidth:s}=this.scale,r=Math.abs(t[1]-t[0])-i,o=this.tickTreeLayout.scaling(r,t[0]>t[1]),a=n+s/2;let l=0;for(const t of e){const e=t.position*o;l>e&&(l=e),t.screen=e+a}for(const t of e)t.screen-=l}getDepthOptionsMap(e){const t=[],{depthOptions:i,label:n}=this,s=this.horizontal?0:-90;for(let r=0;r<e;r++)t.push(i[r]?.label.enabled??n.enabled?{enabled:!0,spacing:i[r]?.label.spacing??n.spacing,rotation:i[r]?.label.rotation??(r?s:n.rotation),avoidCollisions:i[r]?.label.avoidCollisions??n.avoidCollisions}:{enabled:!1,spacing:0,rotation:0,avoidCollisions:!1});return t}updateCategoryLabels(){this.computedLayout&&this.tickLabelGroupSelection.update(this.computedLayout.tickLabelLayout).each((e,t)=>e.setProperties(t))}updateAxisLine(){this.computedLayout&&(this.lineNode.visible=this.line.enabled,this.lineNode.stroke=this.line.stroke,this.lineNode.strokeWidth=this.line.width)}computeLayout(){if(this.updateDirection(),this.updateScale(),this.resizeTickTree(),!this.tickTreeLayout?.depth)return{bbox:m.zero,spacing:0,separatorLayout:[],tickLabelLayout:[]};const{step:e}=this.scale,{title:t,label:i,range:s,depthOptions:r,horizontal:o}=this,{depth:a,nodes:l}=this.tickTreeLayout,c=Math.ceil(i.fontSize/e),h=o?-i.getSideFlag():i.getSideFlag(),d=[],u=new Map,p=new Oi,g=this.getDepthOptionsMap(a),f=h*g[0].spacing,v=(e,t)=>{const l=a-e.depth;if(!g[l]?.enabled||t%c!==0||!(0,n.r4)(e.screen,s))return!1;const h=this.formatTick(e.label,t-1,this.scale.domain),d=this.getLabelStyles({value:h,depth:l},r[l]?.label);return p.setProperties({...d,text:h,textAlign:"center",textBaseline:i.parallel?"hanging":"bottom",lineHeight:Ri.getLineHeight(d.fontSize),x:o?e.screen:f,y:o?f:e.screen,rotation:0}),!0},y={};l.forEach((e,t)=>{const i=a-e.depth;if(!v(e,t)||!p.getBBox())return;u.set(t,p.getBBox()),p.rotation=de(g[i]?.rotation);const{width:n,height:s}=p.getBBox(),r=o?s:n;y[i]??(y[i]=0),y[i]<r&&(y[i]=r)});const C=Ul(),b=new Map;l.forEach((t,n)=>{if(0===n)return;const s=v(t,n),r=!t.children.length,l=a-t.depth;if(t.parent){const e=r?t.position:t.position-(t.leafCount-1)/2;if(!b.has(e)){const t=this.depthOptions[l]?.tick;let i=y[0];for(let e=0;e<=l;e++)i+=g[e].spacing,0!==e&&(i+=y[e]);b.set(e,{tickSize:i,tickStroke:t?.stroke,tickWidth:!1!==t?.enabled?t?.width:0})}}if(!s)return;const c=de(g[l].rotation),{width:f,height:m}=u.get(n),S=(e=>{if(0===e)return 0;let t=y[0];for(let i=1;i<=e;i++)t+=g[i].spacing,i!==e&&(t+=y[i]);return t})(l);if(p.textAlign="end",p.textBaseline="middle",p.rotation=c,o?(p.x+=f/2,p.y+=(S+he(f/2,m/2,c))*h,p.rotationCenterX=t.screen,p.rotationCenterY=p.y):(p.x+=S*h+he((g[l].spacing*h+f)/2,i.mirrored?f:0,c),p.rotationCenterX=p.x-f/2,p.rotationCenterY=t.screen),g[l].avoidCollisions){const{width:i,height:s}=p.getBBox();if((o?i:s)>(r?e:t.leafCount*e))return void u.delete(n)}const{text:w=""}=p;d.push({text:w,visible:!0,range:this.scale.range,tickId:C(w),fill:p.fill,fontFamily:p.fontFamily,fontSize:p.fontSize,fontStyle:p.fontStyle,fontWeight:p.fontWeight,rotation:p.rotation,rotationCenterX:p.rotationCenterX,rotationCenterY:p.rotationCenterY,textAlign:p.textAlign,textBaseline:p.textBaseline,x:p.x,y:p.y}),u.set(n,wt.toCanvas(p))});const{enabled:S,stroke:w,width:x}=this.line;this.lineNode.datum=o?{x1:s[0],x2:s[1],y1:0,y2:0}:{x1:0,x2:0,y1:s[0],y2:s[1]},this.lineNode.setProperties({stroke:w,strokeWidth:S?x:0});const E=[...b.values()];E.push(E[0]);const M=[this.lineNodeBBox(),m.merge(u.values()),new m(0,0,E[0].tickSize*h,0)];let A=0;if(t.enabled){const e=m.merge(M);A=o?e.height:e.width,M.push(this.titleBBox(this.scale.domain,A))}return{bbox:m.merge(M),spacing:A,separatorLayout:E,tickLabelLayout:d}}update(){if(!this.computedLayout)return;this.moduleCtx.animationManager.skipCurrentBatch();const{tickScale:e,tick:t,gridLine:i,gridLength:n}=this,{separatorLayout:s,spacing:r}=this.computedLayout,{position:o,horizontal:a,gridPadding:l}=this,c="bottom"===o||"right"===o?-1:1,h=l,d=c*n-l,u=e.ticks({nice:!1,interval:void 0,tickCount:void 0,minTickCount:0,maxTickCount:1/0}).ticks.map((t,i)=>({tickId:yd(t,i),offset:Math.round(e.convert(t))}));this.gridLineGroupSelection.update(i.enabled&&n?u.map(({tickId:e,offset:t},n)=>{const[s,r,o,l]=a?[t,t,h,d]:[h,d,t,t],{style:c,width:u}=i,{stroke:p,lineDash:g}=c[n%c.length]??{};return{tickId:e,offset:t,x1:s,y1:o,x2:r,y2:l,stroke:p,strokeWidth:u,lineDash:g}}):[]),this.tickLineGroupSelection.update(t.enabled?u.map(({tickId:e,offset:i},n)=>{const{tickSize:r=this.getTickSize(),tickStroke:o=t.stroke,tickWidth:l=t.width}=s[n]??{},h=-c*r,[d,u,p,g]=a?[i,i,0,h]:[0,h,i,i];return{tickId:e,offset:i,x1:d,y1:p,x2:u,y2:g,stroke:o,strokeWidth:l,lineDash:void 0}}):[]),this.updatePosition(),this.updateCategoryLabels(),this.updateAxisLine(),this.updateGridLines(),this.updateTickLines(),this.updateTitle(this.scale.domain,r),this.resetSelectionNodes()}calculateLayout(){const{separatorLayout:e,tickLabelLayout:t,spacing:i,bbox:n}=this.computeLayout();return this.computedLayout={separatorLayout:e,tickLabelLayout:t,spacing:i},{bbox:n,niceDomain:this.scale.domain}}onGridVisibilityChange(){this.gridLineGroupSelection.clear(),this.tickLabelGroupSelection.clear()}updateScale(){super.updateScale(),this.tickScale.range=this.scale.range,this.scale.paddingOuter=this.scale.paddingInner/2}processData(){const{direction:e}=this,t=this.boundSeries.filter(e=>e.visible).flatMap(t=>t.getDomain(e));this.dataDomain={domain:Dh(t)??this.filterDuplicateArrays(t),clipped:!1},this.isReversed()&&this.dataDomain.domain.reverse();const i=this.dataDomain.domain.map(e=>(0,n.$r)((0,n.Gv)(e)&&"value"in e?e.value:e));this.tickTreeLayout=Td(i);const s=[];for(const e of this.tickTreeLayout.nodes)e.leafCount||null==e.refId||s.push(this.dataDomain.domain[e.refId]);this.scale.domain=(0,n.EG)(this.dataDomain.domain,s),this.tickScale.domain=i.concat([[""]])}filterDuplicateArrays(e){const t=new Set;return e.filter(e=>{const i=(0,n.cy)(e)?JSON.stringify(e):e;return!t.has(i)&&(t.add(i),!0)})}};kd.className="GroupedCategoryAxis",kd.type="grouped-category",a([Te],kd.prototype,"depthOptions",2);var Pd={2:(e,t)=>Math.log2(t),[Math.E]:(e,t)=>Math.log(t),10:(e,t)=>Math.log10(t)},Nd=(e,t)=>Math.log(t)/Math.log(e);function Od(e,t,i){const n=Math.min(...t),s=Pd[e]??Nd;return n>=0?s(e,i):-s(e,-i)}var _d={[Math.E]:(e,t)=>Math.exp(t),10:(e,t)=>t>=0?10**t:1/10**-t},Fd=(e,t)=>e**t;function Gd(e,t,i){const n=Math.min(...t),s=_d[e]??Fd;return n>=0?s(e,i):-s(e,-i)}var Vd=class e extends cr{constructor(e=[1,10],t=[0,1]){super(e,t),this.type="log",this.defaultClamp=!0,this.base=10,this.log=e=>Od(this.base,this.domain,e),this.pow=e=>Gd(this.base,this.domain,e)}static is(t){return t instanceof e}toDomain(e){return e}transform(e){const[t,i]=or(this.domain);return t>=0!=i>=0?NaN:t>=0?Math.log(e):-Math.log(-e)}transformInvert(e){const[t,i]=or(this.domain);return t>=0!=i>=0?NaN:t>=0?Math.exp(e):-Math.exp(-e)}niceDomain(e,t=this.domain){if(t.length<2)return[];const{base:i}=this,[n,s]=t,r=n>s?Math.ceil:Math.floor,o=n>s?Math.floor:Math.ceil;return[Gd(i,t,r(Od(i,t,n))),Gd(i,t,o(Od(i,t,s)))]}ticks({interval:e,tickCount:t=cr.defaultTickCount},i=this.domain,s){if(!i||i.length<2||t<1)return;const r=this.base,[o,a]=i,l=Math.min(o,a),c=Math.max(o,a);let h=this.log(l),d=this.log(c);if(e){const t=e=>e>=l&&e<=c,i=Math.min(Math.abs(e),Math.abs(d-h)),{ticks:n,count:r}=Ka(h,d,i,s),o=n.map(this.pow).filter(t);if(!$a(o.length,this.getPixelRange()))return{ticks:o,count:r}}if(!(0,n.Fq)(r)||d-h>=t){const e=Math.min(d-h,t),{ticks:i,count:n}=Va(h,d,e,void 0,void 0,s);return{ticks:i.map(this.pow),count:n}}const u=[],p=l>0;h=Math.floor(h)-1,d=Math.round(d)+1;const g=ar(this.range)/t;let f=1/0;for(let e=h;e<=d;e++){const t=this.convert(this.pow(e+1));for(let i=1;i<r;i++){const n=p?i:r-i+1,s=this.pow(e)*n,o=this.convert(s),a=Math.abs(f-o),h=Math.abs(o-t);s>=l&&s<=c&&(1===i||a>=g&&h>=g||0===u.length)&&(u.push(s),f=o)}}return Sh(u,p,s)}tickFormatter({specifier:e}){return null!=e?(0,n.OR)(e):String}datumFormatter(e){return this.tickFormatter(e)}},Bd=class e extends cr{constructor(){super([0,1],[0,1]),this.type="number"}static is(t){return t instanceof e}static getTickStep(e,t,i){const{interval:n,tickCount:s=cr.defaultTickCount,minTickCount:r,maxTickCount:o}=i;return n??Ua(e,t,s,r,o)}toDomain(e){return e}ticks({interval:e,tickCount:t=cr.defaultTickCount,minTickCount:i,maxTickCount:n},s=this.domain,r){if(!s||s.length<2||t<1||!s.every(isFinite))return{ticks:[],count:0};const[o,a]=s;if(e){const t=Math.abs(e);if(!$a((a-o)/t,this.getPixelRange()))return Ka(o,a,t,r)}return Va(o,a,t,i,n,r)}niceDomain(t,i=this.domain){if(i.length<2)return[];const{tickCount:n=cr.defaultTickCount}=t;let[s,r]=i;if(1===n)[s,r]=Ya(s,r);else if(n>1){const n=s>r?Math.ceil:Math.floor,o=s>r?Math.floor:Math.ceil,a=4;for(let l=0;l<a;l++){const a=s,l=r,c=e.getTickStep(s,r,t),[h,d]=i;if(s=n(h/c)*c,r=o(d/c)*c,s===a&&r===l)break}}return[s,r]}tickFormatter({ticks:e,fractionDigits:t,specifier:i}){return null!=i?ja(e,i):e=>Gn(e,t)}datumFormatter({ticks:e,fractionDigits:t,specifier:i}){return null!=i?ja(e,i):e=>Gn(e,t+1)}},Hd=class extends $l{constructor(e,t=new Bd){super(e,t)}normaliseDataDomain(e){const{min:t,max:i}=this,{extent:n,clipped:s}=Ih(e,t,i);return{domain:n,clipped:s}}};Hd.className="NumberAxis",Hd.type="number",a([Te],Hd.prototype,"min",2),a([Te],Hd.prototype,"max",2);var zd=class extends Hd{normaliseDataDomain(e){const{min:t,max:i}=this,{extent:s,clipped:r}=Ih(e,t,i);return s[0]<0&&s[1]>0||e[0]<0&&e[1]>0?(n.Vy.warn("The log axis domain crosses zero, the chart data cannot be rendered. See log axis documentation for more information."),{domain:[],clipped:r}):0===s[0]||0===s[1]||0===e[0]||0===e[1]?(n.Vy.warn("The log axis domain contains a value of 0, the chart data cannot be rendered. See log axis documentation for more information."),{domain:[],clipped:r}):{domain:s,clipped:r}}set base(e){this.scale.base=e}get base(){return this.scale.base}constructor(e){super(e,new Vd)}defaultDatumFormatter(e,t){return String(e)}defaultLabelFormatter(e,t){return String(e)}};zd.className="LogAxis",zd.type="log";var Ud=class extends De{constructor(){super(...arguments),this.enabled=!1,this.label=new yl,this.tick=new bl}};a([Te],Ud.prototype,"enabled",2),a([Te],Ud.prototype,"label",2),a([Te],Ud.prototype,"tick",2);var Wd=class extends $l{constructor(e){super(e,new Xa),this.parentLevel=new Ud,this.min=void 0,this.max=void 0,this.groupPaddingInner=.1}get primaryLabel(){return this.parentLevel.enabled?this.parentLevel.label:void 0}get primaryTick(){return this.parentLevel.enabled?this.parentLevel.tick:void 0}normaliseDataDomain(e){return jd(e,this.min,this.max)}};function jd(e,t,i){let n=!1;return"number"==typeof t&&(t=new Date(t)),"number"==typeof i&&(i=new Date(i)),e.length>2&&(e=Dh(e)?.map(e=>new Date(e))??[]),t instanceof Date&&(n||(n=t>e[0]),e=[t,e[1]]),i instanceof Date&&(n||(n=i<e[1]),e=[e[0],i]),e[0]>e[1]&&(e=[]),{domain:e,clipped:n}}Wd.className="TimeAxis",Wd.type="time",a([Te],Wd.prototype,"parentLevel",2),a([Te],Wd.prototype,"min",2),a([Te],Wd.prototype,"max",2),a([Te],Wd.prototype,"groupPaddingInner",2),a([Te],Wd.prototype,"paddingInner",2),a([Te],Wd.prototype,"paddingOuter",2);var Kd=class extends Ah{constructor(e){super(e,new Ra),this.parentLevel=new Ud,this.min=void 0,this.max=void 0}get primaryLabel(){return this.parentLevel.enabled?this.parentLevel.label:void 0}get primaryTick(){return this.parentLevel.enabled?this.parentLevel.tick:void 0}updateScale(){super.updateScale(),this.scale.interval=this.unit}normaliseDataDomain(e){return jd(e,this.min,this.max)}};Kd.className="UnitTimeAxis",Kd.type="unit-time",a([Te],Kd.prototype,"parentLevel",2),a([Te],Kd.prototype,"min",2),a([Te],Kd.prototype,"max",2),a([Te],Kd.prototype,"unit",2);var $d=(e,{x0:t,y0:i,x1:n,y1:s,cx:r,cy:o},a,l)=>{if(l&&e.moveTo(t,i),t!==n||i!==s){const l=Math.atan2(i-o,t-r),c=Math.atan2(s-o,n-r);e.arc(r,o,a,l,c)}else e.lineTo(t,i)},Yd=1e-6,qd=(e,t,i,n,s)=>{let r=!1,o=!1,a=n-Math.sqrt(Math.max(s**2-i**2,0)),l=0,c=0,h=i-Math.sqrt(Math.max(s**2-n**2,0));return a>e?(r=!0,a=e,l=i-Math.sqrt(Math.max(s**2-(n-e)**2))):a<Yd&&(a=0),h>t?(o=!0,c=n-Math.sqrt(Math.max(s**2-(i-t)**2)),h=t):h<Yd&&(h=0),{leading0:a,leading1:l,trailing0:c,trailing1:h,leadingClipped:r,trailingClipped:o}},Xd=(e,t,i,n,s,r,o)=>{let{topLeft:a,topRight:l,bottomRight:c,bottomLeft:h}=r;const d=Math.max(a+h,l+c),u=Math.max(a+l,h+c);if(d<=0&&u<=0)return void(null==o?e.rect(t,i,n,s):e.rect(o.x,o.y,o.width,o.height));if(null==o&&a===l&&a===c&&a===h)return void e.roundRect(t,i,n,s,a);if(n<0&&(t+=n,n=Math.abs(n)),s<0&&(i+=s,s=Math.abs(s)),n<=0||s<=0)return;if(null==o)o=new m(t,i,n,s);else{const e=Math.max(t,o.x),r=Math.min(t+n,o.x+o.width),a=Math.max(i,o.y),l=Math.min(i+s,o.y+o.height);o=new m(e,a,r-e,l-a)}const p=Math.max(d/s,u/n,1);p>1&&(a/=p,l/=p,c/=p,h/=p);let g,f,v,y,C=!0,b=!0,S=!0,w=!0;if(C){const e=qd(o.height,o.width,Math.max(t+a-o.x,0),Math.max(i+a-o.y,0),a);e.leadingClipped&&(w=!1),e.trailingClipped&&(b=!1),g={x0:Math.max(o.x+e.leading1,o.x),y0:Math.max(o.y+e.leading0,o.y),x1:Math.max(o.x+e.trailing1,o.x),y1:Math.max(o.y+e.trailing0,o.y),cx:t+a,cy:i+a}}if(b){const e=qd(o.width,o.height,Math.max(i+l-o.y,0),Math.max(o.x+o.width-(t+n-l),0),l);e.leadingClipped&&(C=!1),e.trailingClipped&&(S=!1),f={x0:Math.min(o.x+o.width-e.leading0,o.x+o.width),y0:Math.max(o.y+e.leading1,o.y),x1:Math.min(o.x+o.width-e.trailing0,o.x+o.width),y1:Math.max(o.y+e.trailing1,o.y),cx:t+n-l,cy:i+l}}if(S){const e=qd(o.height,o.width,Math.max(o.x+o.width-(t+n-c),0),Math.max(o.y+o.height-(i+s-c),0),c);e.leadingClipped&&(b=!1),e.trailingClipped&&(w=!1),v={x0:Math.min(o.x+o.width-e.leading1,o.x+o.width),y0:Math.min(o.y+o.height-e.leading0,o.y+o.height),x1:Math.min(o.x+o.width-e.trailing1,o.x+o.width),y1:Math.min(o.y+o.height-e.trailing0,o.y+o.height),cx:t+n-c,cy:i+s-c}}if(w){const e=qd(o.width,o.height,Math.max(o.y+o.height-(i+s-h),0),Math.max(t+h-o.x,0),h);e.leadingClipped&&(S=!1),e.trailingClipped&&(C=!1),y={x0:Math.max(o.x+e.leading0,o.x),y0:Math.min(o.y+o.height-e.leading1,o.y+o.height),x1:Math.max(o.x+e.trailing0,o.x),y1:Math.min(o.y+o.height-e.trailing1,o.y+o.height),cx:t+h,cy:i+s-h}}let x=!1;C&&null!=g&&($d(e,g,a,!x),x||(x=!0)),b&&null!=f&&($d(e,f,l,!x),x||(x=!0)),S&&null!=v&&($d(e,v,c,!x),x||(x=!0)),w&&null!=y&&$d(e,y,h,!x),e.closePath()},Zd=class extends bc{constructor(){super(...arguments),this.borderPath=new Je,this.x=0,this.y=0,this.width=10,this.height=10,this.topLeftCornerRadius=0,this.topRightCornerRadius=0,this.bottomRightCornerRadius=0,this.bottomLeftCornerRadius=0,this.clipBBox=void 0,this.crisp=!1,this.lastUpdatePathStrokeWidth=dt.defaultStyles.strokeWidth,this.effectiveStrokeWidth=dt.defaultStyles.strokeWidth,this.hittester=super.isPointInPath.bind(this),this.distanceCalculator=super.distanceSquaredTransformedPoint.bind(this),this.microPixelEffectOpacity=1}set cornerRadius(e){this.topLeftCornerRadius=e,this.topRightCornerRadius=e,this.bottomRightCornerRadius=e,this.bottomLeftCornerRadius=e}isDirtyPath(){return this.lastUpdatePathStrokeWidth!==this.strokeWidth||Boolean(this.path.isDirty()||this.borderPath.isDirty())}updatePath(){const{path:e,borderPath:t,crisp:i,topLeftCornerRadius:n,topRightCornerRadius:s,bottomRightCornerRadius:r,bottomLeftCornerRadius:o}=this;let{x:a,y:l,width:c,height:h,strokeWidth:d,clipBBox:u}=this;const p=1/(this.layerManager?.canvas.pixelRatio??1);let g=1;if(e.clear(!0),t.clear(!0),i&&(c<=p&&(g*=c/p),h<=p&&(g*=h/p),c=this.align(a,c),h=this.align(l,h),a=this.align(a),l=this.align(l),u=null!=u?new m(this.align(u.x),this.align(u.y),this.align(u.x,u.width),this.align(u.y,u.height)):void 0),d)if(c<p){const e=a+p/2;t.moveTo(e,l),t.lineTo(e,l+h),d=p,this.borderClipPath=void 0}else if(h<p){const e=l+p/2;t.moveTo(a,e),t.lineTo(a+c,e),d=p,this.borderClipPath=void 0}else if(d<c&&d<h){const i=d/2;a+=i,l+=i,c-=d,h-=d;const p=u?.clone().shrink(i),g={topLeft:n>0?n-d:0,topRight:s>0?s-d:0,bottomRight:r>0?r-d:0,bottomLeft:o>0?o-d:0};this.borderClipPath=void 0,c>0&&h>0&&(null==p||p?.width>0&&p?.height>0)&&(Xd(e,a,l,c,h,g,p),Xd(t,a,l,c,h,g,p))}else this.borderClipPath=this.borderClipPath??new Je,this.borderClipPath.clear(!0),this.borderClipPath.rect(a,l,c,h),t.rect(a,l,c,h);else{const t={topLeft:n,topRight:s,bottomRight:r,bottomLeft:o};this.borderClipPath=void 0,Xd(e,a,l,c,h,t,u)}if([n,s,r,o].every(e=>0===e)){const e=this.getBBox();this.hittester=e.containsPoint.bind(e),this.distanceSquared=(e,t)=>this.getBBox().distanceSquared(e,t)}else this.hittester=super.isPointInPath,this.distanceCalculator=super.distanceSquaredTransformedPoint;this.effectiveStrokeWidth=d,this.lastUpdatePathStrokeWidth=d,this.microPixelEffectOpacity=g}computeBBox(){const{x:e,y:t,width:i,height:n,clipBBox:s}=this;return s?.clone()??new m(e,t,i,n)}isPointInPath(e,t){return this.hittester(e,t)}get midPoint(){return{x:this.x+this.width/2,y:this.y+this.height/2}}distanceSquared(e,t){return this.distanceCalculator(e,t)}applyFillAndAlpha(e){super.applyFillAndAlpha(e),e.globalAlpha*=this.microPixelEffectOpacity}applyStrokeAndAlpha(e){super.applyStrokeAndAlpha(e),e.globalAlpha*=this.microPixelEffectOpacity}renderStroke(e){const{stroke:t,effectiveStrokeWidth:i}=this;if(t&&i){const{globalAlpha:t}=e,{lineDash:n,lineDashOffset:s,lineCap:r,lineJoin:o,borderPath:a,borderClipPath:l}=this;l&&e.clip(l.getPath2D()),this.applyStrokeAndAlpha(e),e.lineWidth=i,n&&e.setLineDash(n),s&&(e.lineDashOffset=s),r&&(e.lineCap=r),o&&(e.lineJoin=o),e.stroke(a.getPath2D()),e.globalAlpha=t}}};Zd.className="Rect",a([$()],Zd.prototype,"x",2),a([$()],Zd.prototype,"y",2),a([$()],Zd.prototype,"width",2),a([$()],Zd.prototype,"height",2),a([$()],Zd.prototype,"topLeftCornerRadius",2),a([$()],Zd.prototype,"topRightCornerRadius",2),a([$()],Zd.prototype,"bottomRightCornerRadius",2),a([$()],Zd.prototype,"bottomLeftCornerRadius",2),a([Y({equals:h.equals})],Zd.prototype,"clipBBox",2),a([$()],Zd.prototype,"crisp",2);var Qd=class extends l{constructor(e){super(),this.ctx=e,this.rectNode=new Zd,this.textNode=new Pi,this.fill="white",this.node=this.createNode(),this.node.append([this.rectNode,this.textNode]),this.visible=!0,this.destroyFns.push(e.scene.attachNode(this.node),e.layoutManager.addListener("layout:complete",e=>this.onLayoutComplete(e)))}createNode(){return new At({name:"background",zIndex:0})}onLayoutComplete(e){const{width:t,height:i}=e.chart;this.rectNode.width=t,this.rectNode.height=i}};a([Te,ai("node","visible")],Qd.prototype,"visible",2),a([Te,ai("rectNode","fill")],Qd.prototype,"fill",2),a([Te],Qd.prototype,"image",2),a([Te,ai("textNode")],Qd.prototype,"text",2);var Jd={type:"root",optionsKey:"background",packageType:"community",chartTypes:["cartesian","polar","hierarchy","topology","flow-proportion","standalone","gauge"],moduleFactory:e=>new Qd(e)};function eu({orientation:e,bboxes:t,maxHeight:i,maxWidth:n,itemPaddingY:s=0,itemPaddingX:r=0,forceResult:o=!1}){const a="horizontal"===e,l={max:a?n:i,fn:a?e=>e.width:e=>e.height,padding:a?r:s},c={max:a?i:n,fn:a?e=>e.height:e=>e.width,padding:a?s:r};let h=0;const d=[];for(;h<t.length;){const e=tu(t.slice(h),h,l,c,o);if(!e)return;h+=e.processedBBoxCount,d.push(e.pageIndices)}return function(e,t,i,n,s){let r=0,o=0;return{pages:e.map(e=>{"horizontal"===t&&(e=function(e){const t=[];for(const i of e[0])t.push([]);return e.forEach((e,i)=>{e.forEach((e,n)=>{t[n][i]=e})}),t}(e));let a=0;const l=e.map(e=>{const t=e.map(e=>(a=Math.max(e,a),i[e]));let r=0,o=0;return t.forEach(e=>{r+=e.height+n,o=Math.max(o,e.width+s)}),{indices:e,bboxes:t,columnHeight:Math.ceil(r),columnWidth:Math.ceil(o)}});let c=0,h=0;return l.forEach(e=>{c+=e.columnWidth,h=Math.max(h,e.columnHeight)}),r=Math.max(c,r),o=Math.max(h,o),{columns:l,startIndex:e[0][0],endIndex:a,pageWidth:c,pageHeight:h}}),maxPageWidth:r,maxPageHeight:o}}(d,e,t,s,r)}function tu(e,t,i,n,s){let r=function(e,t){const i=e.length;let n=0;for(let s=0;s<i;s++)if(n+=t.fn(e[s])+t.padding,n>t.max)return i/s<2?Math.ceil(i/2):s;return i}(e,i);if(r<1){if(!s)return;r=1}let o=r;for(;o>=1;){const r=iu(e,t,o,i,n,s);if(null==r&&o<=1)return;if(null!=r){if("number"!=typeof r)return{processedBBoxCount:r.length*r[0].length,pageIndices:r};if(r<=1)return;o=r<o&&r>1?r:o,o--}else o--}}function iu(e,t,i,n,s,r){const o=[];let a=0,l=0,c=[];const h=[];for(let d=0;d<e.length;d++){const u=(d+i)%i;0===u&&(a+=l,l=0,c.length>0&&o.push(c),c=[]);const p=n.fn(e[d])+n.padding;h[u]=Math.max(h[u]??0,p),l=Math.max(l,s.fn(e[d])+s.padding);const g=a+l,f=!r||o.length>0;if(g>s.max&&f){c=[];break}if(h.reduce((e,t)=>e+t,0)>n.max&&!r)return h.length<i?h.length:void 0;c.push(d+t)}return c.length>0&&o.push(c),o.length>0?o:void 0}var nu=class extends De{constructor(){super(...arguments),this.color="black",this.fontStyle=void 0,this.fontWeight=void 0,this.fontSize=12,this.fontFamily="Verdana, sans-serif"}};a([Te],nu.prototype,"color",2),a([Te],nu.prototype,"fontStyle",2),a([Te],nu.prototype,"fontWeight",2),a([Te],nu.prototype,"fontSize",2),a([Te],nu.prototype,"fontFamily",2);var su=class extends De{constructor(){super(...arguments),this.size=15,this.fill=void 0,this.fillOpacity=void 0,this.stroke=void 0,this.strokeWidth=1,this.strokeOpacity=1}};a([Te],su.prototype,"size",2),a([Te],su.prototype,"fill",2),a([Te],su.prototype,"fillOpacity",2),a([Te],su.prototype,"stroke",2),a([Te],su.prototype,"strokeWidth",2),a([Te],su.prototype,"strokeOpacity",2);var ru=class extends De{constructor(e){super(),this.parent=e,this.shape="triangle",this.size=15,this.padding=8}};a([li({changeValue(){this.parent.marker===this&&this.parent.onMarkerShapeChange()}})],ru.prototype,"shape",2),a([Te],ru.prototype,"size",2),a([Te],ru.prototype,"padding",2);var ou=class extends De{constructor(e,t){super(),this.chartUpdateCallback=e,this.pageUpdateCallback=t,this.id=(0,n.sX)(this),this.marker=new ru(this),this.activeStyle=new su,this.inactiveStyle=new su,this.highlightStyle=new su,this.label=new nu,this.group=new It({name:"pagination"}),this.labelNode=new Pi,this.totalPages=0,this.currentPage=0,this.translationX=0,this.translationY=0,this.nextButtonDisabled=!1,this.previousButtonDisabled=!1,this._visible=!0,this._enabled=!0,this._orientation="vertical",this.nextButton=new Oc,this.previousButton=new Oc,this.labelNode.setProperties({textBaseline:"middle",fontSize:12,fontFamily:"Verdana, sans-serif",fill:"black",y:1}),this.group.append([this.nextButton,this.previousButton,this.labelNode]),this.update(),this.updateMarkers()}set visible(e){this._visible=e,this.updateGroupVisibility()}get visible(){return this._visible}set enabled(e){this._enabled=e,this.updateGroupVisibility()}get enabled(){return this._enabled}updateGroupVisibility(){this.group.visible=this.enabled&&this.visible}set orientation(e){this._orientation=e,"horizontal"===e?(this.previousButton.rotation=-Math.PI/2,this.nextButton.rotation=Math.PI/2):(this.previousButton.rotation=0,this.nextButton.rotation=Math.PI)}get orientation(){return this._orientation}update(){this.updateLabel(),this.updatePositions(),this.enableOrDisableButtons()}updatePositions(){this.group.translationX=this.translationX,this.group.translationY=this.translationY,this.updateLabelPosition(),this.updateNextButtonPosition()}updateLabelPosition(){const{size:e,padding:t}=this.marker;this.nextButton.size=e,this.previousButton.size=e,this.labelNode.x=e/2+t}updateNextButtonPosition(){const e=this.labelNode.getBBox();this.nextButton.translationX=e.width+2*(this.marker.size/2+this.marker.padding)}updateLabel(){const{currentPage:e,totalPages:t,labelNode:i,label:{color:n,fontStyle:s,fontWeight:r,fontSize:o,fontFamily:a}}=this;i.text=`${e+1} / ${t}`,i.fill=n,i.fontStyle=s,i.fontWeight=r,i.fontSize=o,i.fontFamily=a}updateMarkers(){const{nextButton:e,previousButton:t,nextButtonDisabled:i,previousButtonDisabled:n,activeStyle:s,inactiveStyle:r,highlightStyle:o,highlightActive:a}=this,l=(e,t)=>t?r:e===a?o:s;this.updateMarker(e,l("next",i)),this.updateMarker(t,l("previous",n))}updateMarker(e,t){const{shape:i,size:n}=this.marker;e.shape=i,e.size=n,e.fill=t.fill,e.fillOpacity=t.fillOpacity??1,e.stroke=t.stroke,e.strokeWidth=t.strokeWidth,e.strokeOpacity=t.strokeOpacity}enableOrDisableButtons(){const{currentPage:e,totalPages:t}=this,i=0===t,n=e===t-1,s=0===e;this.nextButtonDisabled=n||i,this.previousButtonDisabled=s||i}setPage(e){e=(0,n.qE)(0,e,Math.max(0,this.totalPages-1)),this.currentPage!==e&&(this.currentPage=e,this.onPaginationChanged())}getCursor(e){return{previous:this.previousButtonDisabled,next:this.nextButtonDisabled}[e]?void 0:"pointer"}onClick(e,t){e.preventDefault(),"next"!==t||this.nextButtonDisabled?"previous"!==t||this.previousButtonDisabled||(this.decrementPage(),this.onPaginationChanged()):(this.incrementPage(),this.onPaginationChanged())}onMouseHover(e){this.highlightActive=e,this.updateMarkers(),this.chartUpdateCallback(7)}onPaginationChanged(){this.pageUpdateCallback(this.currentPage)}incrementPage(){this.currentPage=Math.min(this.currentPage+1,this.totalPages-1)}decrementPage(){this.currentPage=Math.max(this.currentPage-1,0)}onMarkerShapeChange(){this.updatePositions(),this.updateMarkers(),this.chartUpdateCallback(7)}attachPagination(e){e.append(this.group)}getBBox(){return this.group.getBBox()}computeCSSBounds(){return{prev:wt.toCanvas(this.previousButton),next:wt.toCanvas(this.nextButton)}}};ou.className="Pagination",a([Te],ou.prototype,"marker",2),a([Te],ou.prototype,"activeStyle",2),a([Te],ou.prototype,"inactiveStyle",2),a([Te],ou.prototype,"highlightStyle",2),a([Te],ou.prototype,"label",2);var au=class{constructor(e,t){this.dirty=!0,this.destroyFns=new Ki,this.itemList=e.proxyInteractionService.createProxyContainer({type:"list",domManagerId:`${t}-toolbar`,classList:["ag-charts-proxy-legend-toolbar"],ariaLabel:{id:"ariaLabelLegend"}}),this.paginationGroup=e.proxyInteractionService.createProxyContainer({type:"group",domManagerId:`${t}-pagination`,classList:["ag-charts-proxy-legend-pagination"],ariaLabel:{id:"ariaLabelLegendPagination"},ariaOrientation:"horizontal"}),this.itemDescription=(0,n.n)("p"),this.itemDescription.style.display="none",this.itemDescription.id=(0,n.wW)(),this.itemDescription.textContent=this.getItemAriaDescription(e.localeManager),this.itemList.getElement().append(this.itemDescription)}destroy(){this.destroyFns.destroy()}initLegendList(e){if(!this.dirty)return;const{ctx:t,itemSelection:i,datumReader:n,itemListener:s}=e,r=t.localeManager,o=i.length;i.each((e,i,a)=>{e.proxyButton?.destroy(),e.proxyButton=t.proxyInteractionService.createProxyElement({type:"listswitch",textContent:this.getItemAriaText(r,n.getItemLabel(i),a,o),ariaChecked:!!e.datum.enabled,ariaDescribedBy:this.itemDescription.id,parent:this.itemList});const l=e.proxyButton;l.addListener("click",t=>s.onClick(t.sourceEvent,e.datum,l)),l.addListener("dblclick",t=>s.onDoubleClick(t.sourceEvent,e.datum)),l.addListener("mouseenter",t=>s.onHover(t.sourceEvent,e)),l.addListener("mouseleave",()=>s.onLeave()),l.addListener("contextmenu",t=>s.onContextClick(t,e)),l.addListener("blur",()=>s.onLeave()),l.addListener("focus",t=>s.onHover(t.sourceEvent,e)),l.addListener("drag-start",()=>{})}),this.dirty=!1}update(e){e.visible&&(this.initLegendList(e),this.updateItemProxyButtons(e),this.updatePaginationProxyButtons(e,!0)),this.updateVisibility(e.visible)}updateVisibility(e){this.itemList.setHidden(!e),this.paginationGroup.setHidden(!e)}updateItemProxyButtons({itemSelection:e,group:t,pagination:i,interactive:n}){const s=wt.toCanvas(t);this.itemList.setBounds(s);const r=Math.max(...e.nodes().map(e=>e.getBBox().height));e.each((e,t)=>{if(e.proxyButton){const t=e.pageIndex===i.currentPage,{x:o,y:a,height:l,width:c}=wt.toCanvas(e),h=(r-l)/2,d={x:o-s.x,y:a-h-s.y,height:r,width:c},u=n&&t;e.proxyButton.setCursor("pointer"),e.proxyButton.setEnabled(u),e.proxyButton.setPointerEvents(u?void 0:"none"),e.proxyButton.setBounds(d)}})}updatePaginationProxyButtons(e,t){const{pagination:i}=e;if(this.paginationGroup.setHidden(!i.visible),t&&"ctx"in e){const{ctx:t,oldPages:n,newPages:s}=e,r=(n?.length??s.length)>1,o=s.length>1;r!==o&&(o?(this.prevButton=t.proxyInteractionService.createProxyElement({type:"button",textContent:{id:"ariaLabelLegendPagePrevious"},tabIndex:0,parent:this.paginationGroup}),this.prevButton.addListener("click",t=>this.onPageButton(e,t,"previous")),this.prevButton.addListener("mouseenter",()=>i.onMouseHover("previous")),this.prevButton.addListener("mouseleave",()=>i.onMouseHover(void 0)),this.nextButton??(this.nextButton=t.proxyInteractionService.createProxyElement({type:"button",textContent:{id:"ariaLabelLegendPageNext"},tabIndex:0,parent:this.paginationGroup})),this.nextButton.addListener("click",t=>this.onPageButton(e,t,"next")),this.nextButton.addListener("mouseenter",()=>i.onMouseHover("next")),this.nextButton.addListener("mouseleave",()=>i.onMouseHover(void 0))):(this.nextButton?.destroy(),this.prevButton?.destroy(),this.nextButton=void 0,this.prevButton=void 0))}const{prev:n,next:s}=i.computeCSSBounds();this.prevButton?.setBounds(n),this.nextButton?.setBounds(s),this.prevButton?.setEnabled(0!==i.currentPage),this.nextButton?.setEnabled(i.currentPage!==i.totalPages-1),this.nextButton?.setCursor(i.getCursor("next")),this.prevButton?.setCursor(i.getCursor("previous"))}onPageButton(e,t,i){e.pagination.onClick(t.sourceEvent,i),this.updatePaginationProxyButtons(e,!1)}onDataUpdate(e,t){this.dirty=e.length!==t.length||e.some((i,n,s)=>{const[r,o]=[t[n],e[n]];return r.id!==o.id})}onLocaleChanged(e,t,i){const n=t.length;t.each(({proxyButton:t},s,r)=>{const o=t?.getElement();if(null!=o){const t=i.getItemLabel(s);o.textContent=this.getItemAriaText(e,t,r,n)}}),this.itemDescription.textContent=this.getItemAriaDescription(e)}onPageChange(e){this.updateItemProxyButtons(e),this.updatePaginationProxyButtons(e,!1)}getItemAriaText(e,t,i,n){return i>=0&&t?(i++,e.t("ariaLabelLegendItem",{label:t,index:i,count:n})):e.t("ariaLabelLegendItemUnknown")}getItemAriaDescription(e){return e.t("ariaDescriptionLegendItem")}};function lu(e,t,i,n){const s={defaultPrevented:!1,apiEvent:{type:e,itemId:t,seriesId:i,event:n,preventDefault:()=>s.defaultPrevented=!0}};return s}var cu=class extends(bt(At)){constructor(){super({name:"markerLabelGroup"}),this.symbolsGroup=this.appendChild(new At({name:"legend-markerLabel-symbols"})),this.label=this.appendChild(new Pi),this.enabled=!0,this.pageIndex=NaN,this.spacing=0,this.length=0,this.isCustomMarker=!1,this.marker=this.symbolsGroup.appendChild(new Oc({zIndex:1})),this.line=this.symbolsGroup.appendChild(new pa({zIndex:0}));const{label:e,line:t,symbolsGroup:i}=this;t.visible=!1,i.renderToOffscreenCanvas=!0,i.optimizeForInfrequentRedraws=!0,e.textBaseline="middle",e.fontSize=12,e.fontFamily="Verdana, sans-serif",e.fill="black",e.y=1}destroy(){super.destroy(),this.proxyButton?.destroy()}setEnabled(e){this.enabled=e,this.refreshVisibilities()}getTextMeasureBBox(){return this.layout(),m.merge([this.symbolsGroup.getBBox(),this.label.getTextMeasureBBox()])}refreshVisibilities(){const e=this.enabled?1:.5;this.label.opacity=e,this.opacity=e}layout(){const{marker:e,line:t,length:i,isCustomMarker:n}=this;let s=0,r=0;if(e.visible){const{size:t}=e,o=Oc.anchor(e.shape);s=(o.x-.5)*t+i/2,r=(o.y-.5)*t,n?(e.x=0,e.y=0,e.translationX=s,e.translationY=r):(e.x=s,e.y=r,e.translationX=0,e.translationY=0)}t.visible&&(t.x1=0,t.x2=i,t.y1=0,t.y2=0)}preRender(e){const t=super.preRender(e);return this.layout(),t}layoutLabel(){const{length:e,spacing:t}=this;this.label.x=e+t}computeBBox(){return this.layout(),super.computeBBox()}};cu.className="MarkerLabel",a([ai("label")],cu.prototype,"text",2),a([ai("label")],cu.prototype,"fontStyle",2),a([ai("label")],cu.prototype,"fontWeight",2),a([ai("label")],cu.prototype,"fontSize",2),a([ai("label")],cu.prototype,"fontFamily",2),a([ai("label","fill")],cu.prototype,"color",2),a([ci(e=>e.layoutLabel())],cu.prototype,"spacing",2),a([ci(e=>e.layoutLabel())],cu.prototype,"length",2),a([$()],cu.prototype,"isCustomMarker",2);var hu=class extends De{constructor(){super(...arguments),this.maxLength=void 0,this.color="black",this.fontStyle=void 0,this.fontWeight=void 0,this.fontSize=12,this.fontFamily="Verdana, sans-serif"}};a([Te],hu.prototype,"maxLength",2),a([Te],hu.prototype,"color",2),a([Te],hu.prototype,"fontStyle",2),a([Te],hu.prototype,"fontWeight",2),a([Te],hu.prototype,"fontSize",2),a([Te],hu.prototype,"fontFamily",2),a([Te],hu.prototype,"formatter",2);var du=class extends De{constructor(){super(...arguments),this.shape=void 0,this.size=15,this.padding=8}};a([Te],du.prototype,"shape",2),a([Te],du.prototype,"size",2),a([Te],du.prototype,"padding",2),a([Te],du.prototype,"strokeWidth",2),a([Te],du.prototype,"enabled",2);var uu=class extends De{};a([Te],uu.prototype,"strokeWidth",2),a([Te],uu.prototype,"length",2);var pu=class extends De{constructor(){super(...arguments),this.paddingX=16,this.paddingY=8,this.showSeriesStroke=!1,this.marker=new du,this.label=new hu,this.line=new uu}};a([Te],pu.prototype,"maxWidth",2),a([Te],pu.prototype,"paddingX",2),a([Te],pu.prototype,"paddingY",2),a([Te],pu.prototype,"showSeriesStroke",2),a([Te],pu.prototype,"marker",2),a([Te],pu.prototype,"label",2),a([Te],pu.prototype,"line",2);var gu=class extends De{};a([Te],gu.prototype,"legendItemClick",2),a([Te],gu.prototype,"legendItemDoubleClick",2);var fu={type:"gradient",bounds:"item",gradient:"linear",colorStops:[{color:"black"}],rotation:0,reverse:!1},mu={type:"pattern",pattern:"forward-slanted-lines",width:8,height:8,padding:1,fill:"black",fillOpacity:1,backgroundFill:"white",backgroundFillOpacity:1,stroke:"black",strokeOpacity:1,strokeWidth:0,rotation:0,scale:1},vu={type:"image",backgroundFill:"black",backgroundFillOpacity:1,rotation:0,repeat:"no-repeat",fit:"contain",width:8,height:8},yu=class extends De{constructor(e){super(),this.ctx=e,this.id=(0,n.sX)(this),this.group=new It({name:"legend",zIndex:14}),this.itemSelection=ua.select(this.group,cu),this.oldSize=[0,0],this.pages=[],this.maxPageSize=[0,0],this.paginationTrackingIndex=0,this.truncatedItems=new Set,this._data=[],this.toggleSeries=!0,this.item=new pu,this.listeners=new gu,this.enabled=!0,this.position="bottom",this.spacing=20,this.destroyFns=[],this.size=[0,0],this._visible=!0,this.pagination=new ou(t=>e.updateService.update(t),e=>this.updatePageNumber(e)),this.pagination.attachPagination(this.group);const{items:t}=e.contextMenuRegistry.builtins;t["toggle-series-visibility"].action=e=>this.contextToggleVisibility(e),t["toggle-other-series"].action=e=>this.contextToggleOtherSeries(e),this.destroyFns.push(e.legendManager.addListener("legend-change",this.onLegendDataChange.bind(this))),this.destroyFns.push(()=>delete t["toggle-series-visibility"].action,()=>delete t["toggle-other-series"].action,e.layoutManager.registerElement(1,e=>this.positionLegend(e)),e.localeManager.addListener("locale-changed",()=>this.onLocaleChanged()),()=>this.group.remove()),this.domProxy=new au(this.ctx,this.id),this.ctx.historyManager.addMementoOriginator(e.legendManager)}set data(e){k(e,this._data)||(this.domProxy.onDataUpdate(this._data,e),this._data=e,this.updateGroupVisibility())}get data(){return this._data}onLegendDataChange({legendData:e=[]}){this.enabled&&(this.data=e.filter(e=>!e.hideInLegend))}destroy(){this.ctx.domManager.removeChild("canvas-overlay",`${this.id}-toolbar`),this.ctx.domManager.removeChild("canvas-overlay",`${this.id}-pagination`),this.destroyFns.forEach(e=>e()),this.itemSelection.clear(),this.domProxy.destroy()}getOrientation(){return this.orientation??"horizontal"}set visible(e){this._visible=e,this.updateGroupVisibility()}get visible(){return this._visible}updateGroupVisibility(){this.group.visible=this.enabled&&this.visible&&this.data.length>0}attachLegend(e){e.appendChild(this.group)}getItemLabel(e){const{formatter:t}=this.item.label;if(t){const i=e.datum;return this.cachedCallWithContext(t,{itemId:e.itemId,value:e.label.text,seriesId:e.seriesId,...i&&{datum:i}})}return e.label.text}calcLayout(e,t){const{paddingX:i,paddingY:n,label:s,maxWidth:r,label:{maxLength:o=1/0,fontStyle:a,fontWeight:l,fontSize:c,fontFamily:h}}=this.item,d=[...this.data];this.reverseOrder&&d.reverse(),this.itemSelection.update(d);const u=[],p=Ri.toFontString(s),g=r??.8*e,{markerWidth:f,anyLineEnabled:m}=this.calculateMarkerWidth();if(this.itemSelection.each((e,t)=>{e.fontStyle=a,e.fontWeight=l,e.fontSize=c,e.fontFamily=h;const i=this.updateMarkerLabel(e,t,f,m),n=t.itemId??t.id,s=(this.getItemLabel(t)??"<unknown>").replace(/\r?\n/g," ");e.text=this.truncate(s,o,g,i,p,n),u.push(e.getTextMeasureBBox())}),e=Math.max(1,e),t=Math.max(1,t),!isFinite(e))return{};const v=this.size,y=this.oldSize;v[0]=e,v[1]=t,v[0]===y[0]&&v[1]===y[1]||(y[0]=v[0],y[1]=v[1]);const{pages:C,maxPageHeight:b,maxPageWidth:S}=this.updatePagination(u,e,t),w=this.pages;this.pages=C,this.maxPageSize=[S-i,b-n];const x=this.pagination.currentPage,E=this.pages[x];return this.pages.length<1||!E?(this.visible=!1,{oldPages:w}):(this.visible=!0,this.updatePositions(x),this.update(),{oldPages:w})}isCustomMarker(e,t){return e&&void 0!==t&&"string"!=typeof t}calcSymbolsEnabled(e){const{showSeriesStroke:t,marker:i}=this.item,n=!!i.enabled||!t||(e.marker.enabled??!0);return{markerEnabled:n,lineEnabled:!(!e.line||!t),isCustomMarker:this.isCustomMarker(n,e.marker.shape)}}calcSymbolsLengths(e,t,i){const{marker:n,line:s}=this.item;let r;const{shape:o}=e.marker;if(this.isCustomMarker(t,o)){const e=new Oc;e.shape=o,e.updatePath();const t=e.getBBox();r=Math.max(t.width,t.height)}return{markerLength:t?n.size:0,lineLength:i?s.length??25:0,customMarkerSize:r}}calculateMarkerWidth(){let e=0,t=!1;return this.itemSelection.each((i,n)=>{const{symbol:s}=n,{lineEnabled:r,markerEnabled:o}=this.calcSymbolsEnabled(s),{markerLength:a,lineLength:l,customMarkerSize:c=-1/0}=this.calcSymbolsLengths(s,o,r);e=Math.max(e,l,c,a),t||(t=r)}),{markerWidth:e,anyLineEnabled:t}}updateMarkerLabel(e,t,i,n){const{marker:s,paddingX:r}=this.item,{symbol:o}=t;let a=r;const{markerEnabled:l,isCustomMarker:c}=this.calcSymbolsEnabled(o),h=s.padding;(l||n)&&(a+=h+i);const{marker:d,line:u}=e;return d.visible=l,d.visible&&(d.shape=s.shape??o.marker.shape??"square",d.size=s.size,fc(d,this.getMarkerStyles(o))),u.visible=n,u.visible&&fc(u,this.getLineStyles(o)),e.length=i,e.spacing=h,e.isCustomMarker=c,a}truncate(e,t,i,n,s,r){let o=!1;e.length>t&&(e=e.substring(0,t),o=!0);const a=Di.getMeasurer({font:s}),l=_i.truncateLine(e,a,i-n,o);return l.endsWith(Ri.EllipsisChar)?this.truncatedItems.add(r):this.truncatedItems.delete(r),l}updatePagination(e,t,i){const s=this.getOrientation(),r=Math.min(this.paginationTrackingIndex,e.length);this.pagination.orientation=s,this.pagination.translationX=0,this.pagination.translationY=0;const{pages:o,maxPageHeight:a,maxPageWidth:l,paginationBBox:c,paginationVertical:h}=this.calculatePagination(e,t,i),d=o.findIndex(e=>e.endIndex>=r);this.pagination.currentPage=(0,n.qE)(0,d,o.length-1);const{paddingX:u,paddingY:p}=this.item,g=l-u,f=a-p;let m=0,v=-c.y-this.item.marker.size/2;h?v+=f+8:(m+=-c.x+g+8,v+=(f-c.height)/2),this.pagination.translationX=m,this.pagination.translationY=v,this.pagination.update(),this.pagination.updateMarkers();let y=0;return this.itemSelection.each((e,t,i)=>{i>(o[y]?.endIndex??1/0)&&y++,e.pageIndex=y}),{maxPageHeight:a,maxPageWidth:l,pages:o}}calculatePagination(e,t,i){const{paddingX:s,paddingY:r}=this.item,o=this.getOrientation(),a=["left","right"].includes(this.position);let l=this.pagination.getBBox(),c=new m(0,0,0,0),h=[],d=0,u=0,p=0;const g=e=>e.width===l.width&&e.height===l.height,f=void 0!==this.maxWidth&&void 0!==this.maxHeight;do{if(p++>10){n.Vy.warn("unable to find stable legend layout.");break}l=c;const g=t-(a?0:l.width),m=eu({orientation:o,bboxes:e,maxHeight:i-(a?l.height:0),maxWidth:g,itemPaddingY:r,itemPaddingX:s,forceResult:f});h=m?.pages??[],d=m?.maxPageWidth??0,u=m?.maxPageHeight??0;const v=h.length;if(this.pagination.visible=v>1,this.pagination.totalPages=v,this.pagination.update(),this.pagination.updateMarkers(),c=this.pagination.getBBox(),!this.pagination.visible)break}while(!g(c));return{maxPageWidth:d,maxPageHeight:u,pages:h,paginationBBox:c,paginationVertical:a}}updatePositions(e=0){const{item:{paddingY:t},itemSelection:i,pages:n}=this;if(n.length<1||!n[e])return;const{columns:s,startIndex:r,endIndex:o}=n[e];let a=0,l=0;const c=s.length,h=s[0].indices.length,d="horizontal"===this.getOrientation(),u=s[0].bboxes[0].height+t,p=[];i.each((e,t,i)=>{if(i<r||i>o)return void(e.visible=!1);const n=i-r;let g,f;d?(g=n%c,f=Math.floor(n/c)):(g=Math.floor(n/h),f=n%h),e.visible=!0;const m=s[g];m&&(l=Math.floor(u*f),a=Math.floor(p[f]??0),p[f]=(p[f]??0)+m.columnWidth,e.translationX=a,e.translationY=l)})}updatePageNumber(e){const{itemSelection:t,group:i,pagination:n,pages:s,toggleSeries:r}=this,{startIndex:o,endIndex:a}=s[e];0===o?this.paginationTrackingIndex=0:e===s.length-1?this.paginationTrackingIndex=a:this.paginationTrackingIndex=Math.floor((o+a)/2),this.pagination.update(),this.pagination.updateMarkers(),this.updatePositions(e),this.domProxy.onPageChange({itemSelection:t,group:i,pagination:n,interactive:r}),this.ctx.updateService.update(7)}update(){const{label:{color:e}}=this.item;this.itemSelection.each((t,i)=>{t.setEnabled(i.enabled),t.color=e}),this.updateContextMenu()}updateContextMenu(){this.ctx.contextMenuRegistry.setVisible("toggle-series-visibility",this.toggleSeries),this.ctx.contextMenuRegistry.setVisible("toggle-other-series",this.toggleSeries)}getLineStyles(e){const{stroke:t,strokeOpacity:i=1,strokeWidth:n,lineDash:s}=e.line??{},r=Math.min(2,n??1);return{stroke:t,strokeOpacity:i,strokeWidth:this.item.line.strokeWidth??r,lineDash:s}}getMarkerStyles({marker:e}){const{fill:t,stroke:i,strokeOpacity:n=1,fillOpacity:s=1,strokeWidth:r,lineDash:o,lineDashOffset:a}=e,l=Math.min(2,r??1);return at(t)&&(t.width=8,t.height=8,t.padding=1,t.strokeWidth=Math.min(2,t.strokeWidth??2)),lt(t)&&(t.fit="contain",t.width=void 0,t.height=void 0,t.repeat="no-repeat"),pc({fill:t,stroke:i,strokeOpacity:n,fillOpacity:s,strokeWidth:this.item.marker.strokeWidth??l,lineDash:o,lineDashOffset:a},fu,mu,vu)}computePagedBBox(){const e=At.computeChildrenBBox(this.group.children());if(this.pages.length>1){const[t,i]=this.maxPageSize;e.height=Math.max(i,e.height),e.width=Math.max(t,e.width)}return e}findNode(e){const{datum:t,proxyButton:i}=this.itemSelection.select(t=>t.datum?.itemId===e.itemId)[0]??{};if(void 0===t||void 0===i)throw new Error(`AG Charts - Missing required properties { datum: ${t}, proxyButton: ${JSON.stringify(i)} }`);return{datum:t,proxyButton:i}}contextToggleVisibility(e){const{datum:t,proxyButton:i}=this.findNode(e);this.doClick(e.event,t,i)}contextToggleOtherSeries(e){this.doDoubleClick(e.event,this.findNode(e).datum)}onContextClick(e,t){const{sourceEvent:i}=e,n=t.datum;this.preventHidingAll&&this.contextMenuDatum?.enabled&&this.getVisibleItemCount()<=1?this.ctx.contextMenuRegistry.builtins.items["toggle-series-visibility"].enabled=!1:this.ctx.contextMenuRegistry.builtins.items["toggle-series-visibility"].enabled=!0;const s=this.ctx.chartService.series.length>1&&!0!==this.ctx.chartService.series[0]?.getLegendData("category")[0]?.hideToggleOtherSeries;this.ctx.contextMenuRegistry.setVisible("toggle-other-series",s);const{offsetX:r,offsetY:o}=i,{x:a,y:l}=wt.toCanvasPoint(t,r,o);this.ctx.contextMenuRegistry.dispatchContext("legend-item",{widgetEvent:e,canvasX:a,canvasY:l},{legendItem:n})}onClick(e,t,i){this.doClick(e,t,i)&&e.preventDefault()}getVisibleItemCount(){return this.ctx.chartService.series.flatMap(e=>e.getLegendData("category")).filter(e=>e.enabled).length}doClick(e,t,i){const{listeners:{legendItemClick:n},ctx:{chartService:s,highlightManager:r},preventHidingAll:o,toggleSeries:a}=this;if(!t)return!1;const{legendType:l,seriesId:c,itemId:h,enabled:d}=t,u=s.series.find(e=>e.id===c);if(!u)return!1;let p=d;const g=lu("click",h,u.id,e);return n?.(g.apiEvent),g.defaultPrevented||(a&&(p=!d,o&&!p&&this.getVisibleItemCount()<2&&(p=!0),i.setChecked(p),this.ctx.chartEventManager.legendItemClick(l,u,h,p,t.legendItemName)),p?r.updateHighlight(this.id,{series:u,itemId:h,datum:void 0,datumIndex:void 0}):r.updateHighlight(this.id),this.ctx.legendManager.update(),this.ctx.updateService.update(2,{forceNodeDataRefresh:!0,skipAnimations:t.skipAnimations??!1})),!0}onDoubleClick(e,t){this.doDoubleClick(e,t)&&e.preventDefault()}doDoubleClick(e,t){const{listeners:{legendItemDoubleClick:i},ctx:{chartService:n},toggleSeries:s}=this;if(!t)return!1;const{legendType:r,id:o,itemId:a,seriesId:l}=t,c=n.series.find(e=>e.id===o);if(!c)return!1;const h=lu("dblclick",a,c.id,e);if(i?.(h.apiEvent),h.defaultPrevented)return!0;if(s){const e=n.series.flatMap(e=>e.getLegendData("category"));let t=0;const i=new Set;for(const n of e)n.enabled&&(t+=1,null!=n.legendItemName&&i.add(n.legendItemName));i.size>0&&(t=i.size);const s=e.find(e=>e.itemId===a&&e.seriesId===l);this.ctx.chartEventManager.legendItemDoubleClick(r,c,a,s?.enabled??!1,t,s?.legendItemName)}return this.ctx.legendManager.update(),this.ctx.updateService.update(2,{forceNodeDataRefresh:!0}),!0}toTooltipMeta(e,t){let i;return e instanceof FocusEvent?i=wt.toCanvas(t).computeCenter():(e.preventDefault(),i=wt.toCanvasPoint(t,e.offsetX,e.offsetY)),{canvasX:i.x,canvasY:i.y,showArrow:!1}}onHover(e,t){if(!this.enabled)throw new Error("AG Charts - onHover handler called on disabled legend");this.pagination.setPage(t.pageIndex);const i=t.datum,n=i?this.ctx.chartService.series.find(e=>e.id===i?.id):void 0;if(i&&this.truncatedItems.has(i.itemId??i.id)){const n=this.toTooltipMeta(e,t);this.ctx.tooltipManager.updateTooltip(this.id,n,[{type:"structured",title:this.getItemLabel(i)}])}else this.ctx.tooltipManager.removeTooltip(this.id);i?.enabled&&n?this.updateHighlight({series:n,itemId:i?.itemId,datum:void 0,datumIndex:void 0}):this.updateHighlight()}onLeave(){this.ctx.tooltipManager.removeTooltip(this.id),this.updateHighlight()}updateHighlight(e){this.ctx.interactionManager.isState(32)?this.ctx.highlightManager.updateHighlight(this.id,e):this.ctx.interactionManager.isState(2)&&(this.pendingHighlightDatum=e,this.ctx.animationManager.onBatchStop(()=>{this.ctx.highlightManager.updateHighlight(this.id,this.pendingHighlightDatum)}))}onLocaleChanged(){this.domProxy.onLocaleChanged(this.ctx.localeManager,this.itemSelection,this)}positionLegend(e){const t=this.positionLegendScene(e);this.positionLegendDOM(t)}positionLegendScene(e){if(!this.enabled||!this.data.length)return;const{layoutBox:t}=e,{x:i,y:n,width:s,height:r}=t,[o,a]=this.calculateLegendDimensions(t),{oldPages:l}=this.calcLayout(o,a),c=this.computePagedBBox(),h=()=>{switch(this.position){case"top":case"left":return 0;case"bottom":return r-c.height;default:return s-c.width}};if(this.visible){const e=this.spacing;let o,a;switch(this.position){case"top":case"bottom":o=(s-c.width)/2,a=h(),t.shrink(c.height+e,this.position);break;default:o=h(),a=(r-c.height)/2,t.shrink(c.width+e,this.position)}this.group.translationX=Math.floor(i+o-c.x),this.group.translationY=Math.floor(n+a-c.y)}return l}positionLegendDOM(e){const{ctx:t,itemSelection:i,pagination:n,pages:s,toggleSeries:r,group:o,listeners:{legendItemClick:a,legendItemDoubleClick:l}}=this,c=this.visible&&this.enabled,h=r||null!=l||null!=a;this.domProxy.update({visible:c,interactive:h,ctx:t,itemSelection:i,group:o,pagination:n,oldPages:e,newPages:s,datumReader:this,itemListener:this})}calculateLegendDimensions(e){const{width:t,height:i}=e,n=t/i;let s,r;switch(this.position){case"top":case"bottom":{const e=n<1?Math.min(.5,1/n*.2):.2;s=this.maxWidth?Math.min(this.maxWidth,t):t,r=this.maxHeight?Math.min(this.maxHeight,i):Math.round(i*e);break}default:{const e=n>1?Math.min(.5,.25*n):.25;s=this.maxWidth?Math.min(this.maxWidth,t):Math.round(t*e),r=this.maxHeight?Math.min(this.maxHeight,i):i}}return[s,r]}cachedCallWithContext(e,...t){const{callbackCache:i,chartService:n}=this.ctx;return i.call(this,n,e,...t)}};yu.className="Legend",a([Te],yu.prototype,"toggleSeries",2),a([Te],yu.prototype,"pagination",2),a([Te],yu.prototype,"item",2),a([Te],yu.prototype,"listeners",2),a([ci((e,t,i)=>{if(e.updateGroupVisibility(),t===i)return;const{ctx:{legendManager:n,stateManager:s}}=e;!1===i&&!0===t&&s.restoreState(n)}),Te],yu.prototype,"enabled",2),a([Te],yu.prototype,"position",2),a([Te],yu.prototype,"maxWidth",2),a([Te],yu.prototype,"maxHeight",2),a([Te],yu.prototype,"reverseOrder",2),a([Te],yu.prototype,"orientation",2),a([Te],yu.prototype,"preventHidingAll",2),a([Te],yu.prototype,"spacing",2);var Cu={type:"legend",optionsKey:"legend",identifier:"category",chartTypes:["cartesian","polar","hierarchy","topology","flow-proportion","standalone","gauge"],moduleFactory:e=>new yu(e),packageType:"community",removable:"standalone-only"},bu={};o(bu,{CARTESIAN_AXIS_TYPE:()=>Eu,CARTESIAN_POSITION:()=>xu,FONT_SIZE:()=>Su,FONT_SIZE_RATIO:()=>wu,POLAR_AXIS_SHAPE:()=>Au,POLAR_AXIS_TYPE:()=>Mu});var Su=(e=>(e[e.SMALLEST=8]="SMALLEST",e[e.SMALLER=10]="SMALLER",e[e.SMALL=12]="SMALL",e[e.MEDIUM=13]="MEDIUM",e[e.LARGE=14]="LARGE",e[e.LARGEST=17]="LARGEST",e))(Su||{}),wu=(e=>(e[e.SMALLEST=.6666666666666666]="SMALLEST",e[e.SMALLER=.8333333333333334]="SMALLER",e[e.SMALL=1]="SMALL",e[e.MEDIUM=1.0833333333333333]="MEDIUM",e[e.LARGE=1.1666666666666667]="LARGE",e[e.LARGEST=1.4166666666666667]="LARGEST",e))(wu||{}),xu=(e=>(e.TOP="top",e.RIGHT="right",e.BOTTOM="bottom",e.LEFT="left",e))(xu||{}),Eu=(e=>(e.CATEGORY="category",e.GROUPED_CATEGORY="grouped-category",e.ORDINAL_TIME="ordinal-time",e.UNIT_TIME="unit-time",e.NUMBER="number",e.TIME="time",e.LOG="log",e))(Eu||{}),Mu=(e=>(e.ANGLE_CATEGORY="angle-category",e.ANGLE_NUMBER="angle-number",e.RADIUS_CATEGORY="radius-category",e.RADIUS_NUMBER="radius-number",e))(Mu||{}),Au=(e=>(e.CIRCLE="circle",e.POLYGON="polygon",e))(Au||{}),Tu={};o(Tu,{DEFAULT_ANNOTATION_HANDLE_FILL:()=>Zu,DEFAULT_ANNOTATION_STATISTICS_COLOR:()=>ep,DEFAULT_ANNOTATION_STATISTICS_DIVIDER_STROKE:()=>tp,DEFAULT_ANNOTATION_STATISTICS_DOWN_FILL:()=>ip,DEFAULT_ANNOTATION_STATISTICS_DOWN_STROKE:()=>np,DEFAULT_ANNOTATION_STATISTICS_FILL:()=>Qu,DEFAULT_ANNOTATION_STATISTICS_STROKE:()=>Ju,DEFAULT_CAPTION_ALIGNMENT:()=>ku,DEFAULT_CAPTION_LAYOUT_STYLE:()=>Lu,DEFAULT_FIBONACCI_STROKES:()=>Yu,DEFAULT_FINANCIAL_CHARTS_ANNOTATION_BACKGROUND_FILL:()=>Xu,DEFAULT_FINANCIAL_CHARTS_ANNOTATION_COLOR:()=>$u,DEFAULT_GRIDLINE_ENABLED:()=>lp,DEFAULT_POLAR_SERIES_STROKE:()=>ju,DEFAULT_SEPARATION_LINES_COLOUR:()=>Iu,DEFAULT_SHADOW_COLOUR:()=>Ru,DEFAULT_SPARKLINE_CROSSHAIR_STROKE:()=>Ku,DEFAULT_TEXTBOX_COLOR:()=>op,DEFAULT_TEXTBOX_FILL:()=>sp,DEFAULT_TEXTBOX_STROKE:()=>rp,DEFAULT_TEXT_ANNOTATION_COLOR:()=>qu,DEFAULT_TOOLBAR_POSITION:()=>ap,IS_DARK_THEME:()=>Du,PALETTE_ALT_DOWN_FILL:()=>zu,PALETTE_ALT_DOWN_STROKE:()=>Bu,PALETTE_ALT_NEUTRAL_FILL:()=>Uu,PALETTE_ALT_NEUTRAL_STROKE:()=>Wu,PALETTE_ALT_UP_FILL:()=>Hu,PALETTE_ALT_UP_STROKE:()=>Vu,PALETTE_DOWN_FILL:()=>_u,PALETTE_DOWN_STROKE:()=>Nu,PALETTE_NEUTRAL_FILL:()=>Gu,PALETTE_NEUTRAL_STROKE:()=>Fu,PALETTE_UP_FILL:()=>Ou,PALETTE_UP_STROKE:()=>Pu});var Du=Symbol("is-dark-theme"),Iu=Symbol("default-separation-lines-colour"),Ru=Symbol("default-shadow-colour"),Lu=Symbol("default-caption-layout-style"),ku=Symbol("default-caption-alignment"),Pu=Symbol("palette-up-stroke"),Nu=Symbol("palette-down-stroke"),Ou=Symbol("palette-up-fill"),_u=Symbol("palette-down-fill"),Fu=Symbol("palette-neutral-stroke"),Gu=Symbol("palette-neutral-fill"),Vu=Symbol("palette-alt-up-stroke"),Bu=Symbol("palette-alt-down-stroke"),Hu=Symbol("palette-alt-up-fill"),zu=Symbol("palette-alt-down-fill"),Uu=Symbol("palette-gray-fill"),Wu=Symbol("palette-gray-stroke"),ju=Symbol("default-polar-series-stroke"),Ku=Symbol("default-sparkline-crosshair-stroke"),$u=Symbol("default-financial-charts-annotation-stroke"),Yu=Symbol("default-hierarchy-strokes"),qu=Symbol("default-text-annotation-color"),Xu=Symbol("default-financial-charts-annotation-background-fill"),Zu=Symbol("default-annotation-handle-fill"),Qu=Symbol("default-annotation-statistics-fill"),Ju=Symbol("default-annotation-statistics-stroke"),ep=Symbol("default-annotation-statistics-color"),tp=Symbol("default-annotation-statistics-divider-stroke"),ip=Symbol("default-annotation-statistics-fill"),np=Symbol("default-annotation-statistics-stroke"),sp=Symbol("default-textbox-fill"),rp=Symbol("default-textbox-stroke"),op=Symbol("default-textbox-color"),ap=Symbol("default-toolbar-position"),lp=Symbol("default-gridline-enabled"),cp=[{type:"number",position:{$if:[{$eq:[{$path:["/direction",void 0]},"horizontal"]},"bottom","left"]}},{type:"category",position:{$if:[{$eq:[{$path:["/direction",void 0]},"horizontal"]},"left","bottom"]}}],hp={$if:[{$or:[{$isGradient:[{$palette:"fill"}]},{$isPattern:[{$palette:"fill"}]},{$isImage:[{$value:"$1"}]}]},{$palette:"fillFallback"},{$palette:"fill"}]},dp={$if:[{$or:[{$isGradient:[{$palette:"fill"}]},{$isPattern:[{$palette:"fill"}]},{$isImage:[{$value:"$1"}]}]},{$palette:"fillsFallback"},{$palette:"fills"}]},up={$if:[{$isGradient:[{$palette:"fill"}]},{$palette:"fillFallback"},{$if:[{$isPattern:[{$palette:"fill"}]},{$path:["./stroke",{$palette:"fillFallback"},{$palette:"fill"}]},{$palette:"fill"}]}]},pp={$if:[{$or:[{$isGradient:[{$palette:"fill"}]},{$isPattern:[{$palette:"fill"}]},{$isImage:[{$value:"$1"}]}]},[{$palette:"fillFallback"},{$palette:"fillFallback"}],{$palette:"range2"}]},gp={type:"pattern",pattern:"forward-slanted-lines",width:10,height:10,padding:2,fill:{$if:[{$or:[{$isGradient:[{$palette:"fill"}]},{$isImage:[{$palette:"fill"}]}]},{$palette:"fillFallback"},{$if:[{$isPattern:[{$palette:"fill"}]},{$path:["./fill",{$palette:"fillFallback"},{$palette:"fill"}]},{$palette:"fill"}]}]},fillOpacity:1,stroke:up,strokeOpacity:1,strokeWidth:4,backgroundFill:"none",backgroundFillOpacity:1,rotation:0,scale:1},fp={type:"image",backgroundFill:{$palette:"fillFallback"},backgroundFillOpacity:1,repeat:"no-repeat",fit:"contain",rotation:0};function mp(e){return F(e,e=>{const t=me.fromString(e);return[me.darken(t,.15).toString(),e,me.lighten(t,.15).toString()]})}function vp(e,t,i,n,s){const{addPhaseFn:r,updatePhaseFn:o,removePhaseFn:a}=s,l=(n,s,r)=>{i.animate({id:`${e}_${t}_${s.id}_${n}`,groupId:e,from:0,to:1,ease:Ms,collapsable:!1,onUpdate(e,t){t&&"removed"!==n||(s.path.clear(!0),r(e,s),s.checkPathDirty())},onStop(){"added"===n&&(s.path.clear(!0),r(1,s),s.checkPathDirty())},phase:oa[n]})};for(const e of n)i.isSkipped()||(l("removed",e,a),l("updated",e,o)),l("added",e,r)}function yp({id:e},t,i,...n){for(const e of n)e.cleanup();la(e,t,i,n,{opacity:0},{opacity:1},{phase:"trailing"})}function Cp({id:e},t,i,...n){la(e,t,i,n,{opacity:1},{opacity:0},{phase:"remove"})}function bp(e){return{opacity:1}}var Sp=class extends De{constructor(){super(...arguments),this._dirty=!0}markDirty(){this._dirty=!0}markClean(e){this._dirty=!1}isDirty(){return this._dirty}onChangeDetection(e){this.markDirty()}},wp=class extends Sp{constructor(){super(...arguments),this.enabled=!0,this.color="rgba(0, 0, 0, 0.5)",this.xOffset=0,this.yOffset=0,this.blur=5}};a([Te,$()],wp.prototype,"enabled",2),a([Te,$()],wp.prototype,"color",2),a([Te,$()],wp.prototype,"xOffset",2),a([Te,$()],wp.prototype,"yOffset",2),a([Te,$()],wp.prototype,"blur",2);var xp=class extends De{constructor(){super(...arguments),this.fill="rgba(255,255,255, 0.33)",this.stroke="rgba(0, 0, 0, 0.4)",this.strokeWidth=2}};a([Te],xp.prototype,"fill",2),a([Te],xp.prototype,"fillOpacity",2),a([Te],xp.prototype,"stroke",2),a([Te],xp.prototype,"strokeWidth",2),a([Te],xp.prototype,"strokeOpacity",2),a([Te],xp.prototype,"lineDash",2),a([Te],xp.prototype,"lineDashOffset",2);var Ep=class extends De{};a([Te],Ep.prototype,"strokeWidth",2),a([Te],Ep.prototype,"dimOpacity",2),a([Te],Ep.prototype,"enabled",2);var Mp=class extends De{constructor(){super(...arguments),this.color="black"}};a([Te],Mp.prototype,"color",2);var Ap=class extends De{constructor(){super(...arguments),this.enabled=!0}};a([Te],Ap.prototype,"enabled",2);var Tp=class extends De{constructor(){super(...arguments),this.type="gradient",this.colorStops=[],this.bounds="item",this.gradient="linear",this.rotation=0,this.reverse=!1}};a([Te],Tp.prototype,"type",2),a([Te],Tp.prototype,"colorStops",2),a([Te],Tp.prototype,"bounds",2),a([Te],Tp.prototype,"gradient",2),a([Te],Tp.prototype,"rotation",2),a([Te],Tp.prototype,"reverse",2);var Dp=class extends De{constructor(){super(...arguments),this.type="pattern",this.colorStops=[],this.bounds="item",this.gradient="linear",this.rotation=0,this.scale=1,this.reverse=!1,this.pattern="forward-slanted-lines",this.width=26,this.height=26,this.padding=6,this.fill="black",this.fillOpacity=1,this.backgroundFill="white",this.backgroundFillOpacity=1,this.stroke="black",this.strokeOpacity=1,this.strokeWidth=0}};a([Te],Dp.prototype,"type",2),a([Te],Dp.prototype,"colorStops",2),a([Te],Dp.prototype,"bounds",2),a([Te],Dp.prototype,"gradient",2),a([Te],Dp.prototype,"rotation",2),a([Te],Dp.prototype,"scale",2),a([Te],Dp.prototype,"reverse",2),a([Te],Dp.prototype,"path",2),a([Te],Dp.prototype,"pattern",2),a([Te],Dp.prototype,"width",2),a([Te],Dp.prototype,"height",2),a([Te],Dp.prototype,"padding",2),a([Te],Dp.prototype,"fill",2),a([Te],Dp.prototype,"fillOpacity",2),a([Te],Dp.prototype,"backgroundFill",2),a([Te],Dp.prototype,"backgroundFillOpacity",2),a([Te],Dp.prototype,"stroke",2),a([Te],Dp.prototype,"strokeOpacity",2),a([Te],Dp.prototype,"strokeWidth",2);var Ip=class extends De{constructor(){super(...arguments),this.type="image",this.url="",this.rotation=0,this.scale=1,this.backgroundFill="black",this.backgroundFillOpacity=1,this.repeat="no-repeat",this.fit="contain"}};a([Te],Ip.prototype,"type",2),a([Te],Ip.prototype,"url",2),a([Te],Ip.prototype,"rotation",2),a([Te],Ip.prototype,"scale",2),a([Te],Ip.prototype,"backgroundFill",2),a([Te],Ip.prototype,"backgroundFillOpacity",2),a([Te],Ip.prototype,"repeat",2),a([Te],Ip.prototype,"fit",2);var Rp=class extends De{constructor(){super(...arguments),this.item=new xp,this.series=new Ep,this.text=new Mp}};a([Te],Rp.prototype,"item",2),a([Te],Rp.prototype,"series",2),a([Te],Rp.prototype,"text",2);var Lp=class extends De{constructor(){super(...arguments),this.visible=!0,this.focusPriority=1/0,this.showInLegend=!0,this.cursor="default",this.nodeClickRange="exact",this.highlight=new Ap,this.highlightStyle=new Rp}handleUnknownProperties(e,t){"context"in t&&(this.context=t.context,e.delete("context"))}};a([Te],Lp.prototype,"id",2),a([Te],Lp.prototype,"visible",2),a([Te],Lp.prototype,"focusPriority",2),a([Te],Lp.prototype,"showInLegend",2),a([Te],Lp.prototype,"cursor",2),a([Te],Lp.prototype,"nodeClickRange",2),a([Te],Lp.prototype,"highlight",2),a([Te],Lp.prototype,"highlightStyle",2);var kp=class extends Sp{constructor(){super(...arguments),this.enabled=!0,this.shape="circle",this.size=6,this.fillGradientDefaults=new Tp,this.fillPatternDefaults=new Dp,this.fillImageDefaults=new Ip,this.fillOpacity=1,this.strokeWidth=1,this.strokeOpacity=1,this.lineDash=[0],this.lineDashOffset=0}getStyle(){const{size:e,shape:t,fill:i,fillOpacity:n,stroke:s,strokeWidth:r,strokeOpacity:o,lineDash:a,lineDashOffset:l}=this;return{size:e,shape:t,fill:i,fillOpacity:n,stroke:s,strokeWidth:r,strokeOpacity:o,lineDash:a,lineDashOffset:l}}getDiameter(){return this.size+this.strokeWidth}};a([Te,$()],kp.prototype,"enabled",2),a([Te,Y({equals:K})],kp.prototype,"shape",2),a([Te,$()],kp.prototype,"size",2),a([Te,Y({equals:k})],kp.prototype,"fill",2),a([Te],kp.prototype,"fillGradientDefaults",2),a([Te],kp.prototype,"fillPatternDefaults",2),a([Te],kp.prototype,"fillImageDefaults",2),a([Te,$()],kp.prototype,"fillOpacity",2),a([Te,$()],kp.prototype,"stroke",2),a([Te,$()],kp.prototype,"strokeWidth",2),a([Te,$()],kp.prototype,"strokeOpacity",2),a([Te],kp.prototype,"lineDash",2),a([Te],kp.prototype,"lineDashOffset",2),a([Te,Y({equals:K})],kp.prototype,"itemStyler",2);var Pp=class extends De{constructor(){super(...arguments),this.enabled=!1}};a([Te],Pp.prototype,"enabled",2);var Np=class extends De{constructor(){super(...arguments),this.interaction=new Pp,this.position=new qc,this.range=void 0,this.class=void 0}formatTooltip(e,t,i,n){const s=null==this.renderer?void 0:ps(e,t,this.renderer,[n]);return"string"==typeof s?{type:"raw",rawHtmlString:s}:null!=s?{type:"structured",...i,...s}:{type:"structured",...i}}};a([Te],Np.prototype,"enabled",2),a([Te],Np.prototype,"showArrow",2),a([Te],Np.prototype,"renderer",2),a([Te],Np.prototype,"interaction",2),a([Te],Np.prototype,"position",2),a([Te],Np.prototype,"range",2),a([Te],Np.prototype,"class",2);var Op=class{constructor(e,t,i){this.root=new Gp(e,t,i)}clear(e){this.root.clear(e)}addValue(e,t){const i={hitTester:e,value:t,distanceSquared:(t,i)=>e.distanceSquared(t,i)};this.root.addElem(i)}find(e,t){const i={best:{nearest:void 0,distanceSquared:1/0}};return this.root.find(e,t,i),i.best}},_p=class{constructor(e,t,i,n){this.nw=e,this.ne=t,this.sw=i,this.se=n}addElem(e){this.nw.addElem(e),this.ne.addElem(e),this.sw.addElem(e),this.se.addElem(e)}find(e,t,i){this.nw.find(e,t,i),this.ne.find(e,t,i),this.sw.find(e,t,i),this.se.find(e,t,i)}},Fp=class{constructor(e,t,i){this.capacity=e,this.maxdepth=t,this.boundary=i??m.NaN,this.elems=[],this.subdivisions=void 0}clear(e){this.elems.length=0,this.boundary=e,this.subdivisions=void 0}addElem(e){this.addCondition(e)&&(void 0===this.subdivisions?0===this.maxdepth||this.elems.length<this.capacity?this.elems.push(e):this.subdivide(e):this.subdivisions.addElem(e))}find(e,t,i){this.findCondition(e,t,i)&&(void 0===this.subdivisions?this.findAction(e,t,i):this.subdivisions.find(e,t,i))}subdivide(e){this.subdivisions=this.makeSubdivisions();for(const e of this.elems)this.subdivisions.addElem(e);this.subdivisions.addElem(e),this.elems.length=0}makeSubdivisions(){const{x:e,y:t,width:i,height:n}=this.boundary,{capacity:s}=this,r=this.maxdepth-1,o=i/2,a=n/2,l=new m(e,t,o,a),c=new m(e+o,t,o,a),h=new m(e,t+a,o,a),d=new m(e+o,t+a,o,a);return new _p(this.child(s,r,l),this.child(s,r,c),this.child(s,r,h),this.child(s,r,d))}},Gp=class e extends Fp{addCondition(e){const{x:t,y:i}=e.hitTester.midPoint;return this.boundary.containsPoint(t,i)}findCondition(e,t,i){const{best:n}=i;return 0!==n.distanceSquared&&this.boundary.distanceSquared(e,t)<n.distanceSquared}findAction(e,t,i){const n=p(e,t,this.elems,i.best.distanceSquared);void 0!==n.nearest&&n.distanceSquared<i.best.distanceSquared&&(i.best=n)}child(t,i,n){return new e(t,i,n)}},Vp=class extends Cc{constructor({clipFocusBox:e,categoryKey:t,...i}){super(i),this.categoryKey=t,this.clipFocusBox=e??!0}getScaleInformation({xScale:e,yScale:t}){return{isContinuousX:cr.is(e),isContinuousY:cr.is(t),xScaleType:e?.type,yScaleType:t?.type}}getModulePropertyDefinitions(){const e=this.axes.x?.scale,t=this.axes.y?.scale;return this.moduleMap.mapModules(i=>i.getPropertyDefinitions(this.getScaleInformation({xScale:e,yScale:t}))).flat()}async requestDataModel(e,t,i){i.props.push(...this.getModulePropertyDefinitions());const{dataModel:n,processedData:s}=await e.request(this.id,t??[],i);return this.dataModel=n,this.processedData=s,this.dispatch("data-processed",{dataModel:n,processedData:s}),{dataModel:n,processedData:s}}isProcessedDataAnimatable(){const e=this.processedData?.reduced?.animationValidation;if(!e)return!0;const{orderedKeys:t,uniqueKeys:i}=e;return t&&i}checkProcessedDataAnimatable(){this.isProcessedDataAnimatable()||this.ctx.animationManager.skipCurrentBatch()}pickFocus(e){const t=this.getNodeData();if(void 0===t||0===t.length)return;const i=this.computeFocusDatumIndex(e,t);if(void 0===i)return;const{clipFocusBox:n}=this,s=t[i],r={...e,datumIndex:i},o=this.computeFocusBounds(r);return void 0!==o?{bounds:o,clipFocusBox:n,datum:s,datumIndex:i}:void 0}isDatumEnabled(e,t){const{missing:i=!1,enabled:n=!0,focusable:s=!0}=e[t];return!i&&n&&s}computeFocusDatumIndex(e,t){const i=(e,i)=>{for(;e>=0&&!this.isDatumEnabled(t,e);)e+=i;return-1===e?void 0:e},s=(e,i)=>{for(;e<t.length&&!this.isDatumEnabled(t,e);)e+=i;return e===t.length?void 0:e};let r;const o=(0,n.qE)(0,e.datumIndex,t.length-1);return r=e.datumIndexDelta<0?i(o,e.datumIndexDelta):e.datumIndexDelta>0?s(o,e.datumIndexDelta):s(o,1)??i(o,-1),void 0===r?0===e.datumIndexDelta?void 0:e.datumIndex-e.datumIndexDelta:r}keysOrValues(e){const t=this.dataModel.resolveProcessedDataIndexById(this,e);return this.processedData?.keys[t]?.get(this.id)??this.processedData?.columns[t]??[]}getCategoryKey(){return this.categoryKey}getCategoryValue(e){const{processedData:t,dataModel:i}=this,n=this.getCategoryKey();if(t&&i&&n)return t.invalidData?.get(this.id)?.[e]?void 0:this.keysOrValues(n)[e]}datumIndexForCategoryValue(e){const{processedData:t,dataModel:i}=this,n=this.getCategoryKey();if(!t||!i||!n)return;e=e.valueOf();const s=t.invalidData?.get(this.id),r=this.keysOrValues(n);for(let t=0;t<r.length;t+=1){if(!0===s?.[t])continue;const i=r[t]?.valueOf();if(k(e,i))return t}}},Bp={x:["xKey"],y:["yKey"]},Hp={x:["xName"],y:["yName"]},zp=class extends vc{constructor(e,t,i,n){super(e,t,i,n),this.xKey=n.properties.xKey,this.yKey=n.properties.yKey}},Up=class extends Lp{constructor(){super(...arguments),this.pickOutsideVisibleMinorAxis=!1}};a([Te],Up.prototype,"legendItemName",2),a([Te],Up.prototype,"pickOutsideVisibleMinorAxis",2);var Wp=100,jp=class extends Vp{constructor({pathsPerSeries:e=["path"],hasMarkers:t=!1,hasHighlightedLabels:i=!1,pathsZIndexSubOrderOffset:n=[],datumSelectionGarbageCollection:s=!0,markerSelectionGarbageCollection:r=!0,animationAlwaysUpdateSelections:o=!1,animationResetFns:a,directionKeys:l,directionNames:c,...h}){if(super({directionKeys:l,directionNames:c,canHaveAxes:!0,...h}),this.NodeEvent=zp,this.dataNodeGroup=this.contentGroup.appendChild(new At({name:`${this.id}-series-dataNodes`,zIndex:0})),this.markerGroup=this.contentGroup.appendChild(new At({name:`${this.id}-series-markers`,zIndex:1})),this.labelGroup=this.contentGroup.appendChild(new It({name:`${this.id}-series-labels`})),this.labelSelection=ua.select(this.labelGroup,Pi),this.highlightSelection=ua.select(this.highlightNode,()=>this.opts.hasMarkers?new Oc:this.nodeFactory()),this.highlightLabelSelection=ua.select(this.highlightLabel,Pi),this.annotationSelections=new Set,this.debug=y.create(),!l||!c)throw new Error(`Unable to initialise series type ${this.type}`);this.opts={pathsPerSeries:e,hasMarkers:t,hasHighlightedLabels:i,pathsZIndexSubOrderOffset:n,directionKeys:l,directionNames:c,animationResetFns:a,animationAlwaysUpdateSelections:o,datumSelectionGarbageCollection:s,markerSelectionGarbageCollection:r},this.paths=e.map(e=>new bc({name:`${this.id}-${e}`})),this.datumSelection=ua.select(this.dataNodeGroup,()=>this.nodeFactory(),s),this.markerSelection=ua.select(this.markerGroup,Oc,r),this.animationState=new ba("empty",{empty:{update:{target:"ready",action:e=>this.animateEmptyUpdateReady(e)},reset:"empty",skip:"ready",disable:"disabled"},ready:{updateData:"waiting",clear:"clearing",highlight:e=>this.animateReadyHighlight(e),highlightMarkers:e=>this.animateReadyHighlightMarkers(e),resize:e=>this.animateReadyResize(e),reset:"empty",skip:"ready",disable:"disabled"},waiting:{update:{target:"ready",action:e=>{this.ctx.animationManager.isSkipped()?this.resetAllAnimation(e):this.animateWaitingUpdateReady(e)}},reset:"empty",skip:"ready",disable:"disabled"},disabled:{update:e=>this.resetAllAnimation(e),reset:"empty"},clearing:{update:{target:"empty",action:e=>this.animateClearingUpdateEmpty(e)},reset:"empty",skip:"ready"}},()=>this.checkProcessedDataAnimatable())}get contextNodeData(){return this._contextNodeData}getNodeData(){return this.contextNodeData?.nodeData}attachSeries(e,t,i){super.attachSeries(e,t,i),this.attachPaths(this.paths,t,i)}detachSeries(e,t,i){super.detachSeries(e,t,i),this.detachPaths(this.paths,t,i)}updatedDomains(){this.animationState.transition("updateData")}attachPaths(e,t,i){for(const t of e)this.contentGroup.appendChild(t)}detachPaths(e,t,i){for(const t of e)this.contentGroup.removeChild(t)}renderToOffscreenCanvas(){const e=this.getNodeData();return null!=e&&e.length>Wp}resetAnimation(e){"initial"===e?this.animationState.transition("reset"):"ready"===e?this.animationState.transition("skip"):"disabled"===e&&this.animationState.transition("disable")}addChartEventListeners(){this.destroyFns.push(this.ctx.chartEventManager.addListener("legend-item-click",e=>this.onLegendItemClick(e)),this.ctx.chartEventManager.addListener("legend-item-double-click",e=>this.onLegendItemDoubleClick(e)))}destroy(){super.destroy(),this._contextNodeData=void 0}update({seriesRect:e}){const{visible:t,_contextNodeData:i}=this,n=this.ctx.highlightManager?.getActiveHighlight()?.series,s=n===this,r=this.checkResize(e),o=this.updateHighlightSelection(s);this.updateSelections(t),this.updateNodes(o,s,t);const a=this.getAnimationData(e,i);a&&(r&&this.animationState.transition("resize",a),this.animationState.transition("update",a))}updateSelections(e){var t;const i=!this.opts.animationAlwaysUpdateSelections&&this.ctx.animationManager.isSkipped();if((e||!i)&&(this.nodeDataRefresh||this.isPathOrSelectionDirty())){if(this.nodeDataRefresh){this.nodeDataRefresh=!1,this.debug("CartesianSeries.updateSelections() - calling createNodeData() for",this.id),this.markQuadtreeDirty(),this._contextNodeData=this.createNodeData();const e=this.isProcessedDataAnimatable();this._contextNodeData&&((t=this._contextNodeData).animationValid??(t.animationValid=e));const{dataModel:i,processedData:n}=this;void 0!==i&&void 0!==n&&this.dispatch("data-update",{dataModel:i,processedData:n})}this.updateSeriesSelections()}}updateSeriesSelections(e){const{datumSelection:t,labelSelection:i,markerSelection:n,paths:s}=this,r=this._contextNodeData;if(!r)return;const{nodeData:o,labelData:a,itemId:l}=r;this.updatePaths({seriesHighlighted:e,itemId:l,contextData:r,paths:s}),this.datumSelection=this.updateDatumSelection({nodeData:o,datumSelection:t}),this.labelSelection=this.updateLabelSelection({labelData:a,labelSelection:i})??i,this.opts.hasMarkers&&(this.markerSelection=this.updateMarkerSelection({nodeData:o,markerSelection:n}))}getShapeFillBBox(){const{axes:e}=this,t=e.x,i=e.y,[n,s]=or(t?.range??[0,1]),[r,o]=or(i?.range??[0,1]),a=this.getSeriesDomain("x"),l=[t?.scale.convert(a.at(0)),t?.scale.convert(a.at(-1))],c=this.getSeriesDomain("y"),h=[i?.scale.convert(c.at(0)),i?.scale.convert(c.at(-1))],[d,u]=or(l),[p,g]=or(h);return{axis:new m(n,r,s-n,o-r),series:new m(d,p,u-d,g-p)}}updateNodes(e,t,i){const{highlightSelection:n,highlightLabelSelection:s,opts:{hasMarkers:r,hasHighlightedLabels:o}}=this,a=!this.ctx.animationManager.isSkipped(),l=this.visible&&null!=this._contextNodeData&&i;this.contentGroup.visible=a||l,this.highlightGroup.visible=(a||l)&&t;const c=this.getOpacity();r?(this.updateMarkerNodes({markerSelection:n,isHighlight:!0}),this.animationState.transition("highlightMarkers",n)):(this.updateDatumNodes({datumSelection:n,isHighlight:!0}),this.animationState.transition("highlight",n)),o&&this.updateLabelNodes({labelSelection:s});const{dataNodeGroup:h,markerGroup:d,datumSelection:u,labelSelection:p,markerSelection:g,paths:f,labelGroup:m}=this,{itemId:v}=this.contextNodeData??{};h.opacity=c,h.visible=a||l,m.visible=l,r&&(d.opacity=c,d.visible=l),m&&(m.opacity=c),this.updatePathNodes({seriesHighlighted:t,itemId:v,paths:f,opacity:c,visible:l,animationEnabled:a}),h.visible&&(this.updateDatumNodes({datumSelection:u,highlightedItems:e,isHighlight:!1}),this.usesPlacedLabels||this.updateLabelNodes({labelSelection:p}),r&&this.updateMarkerNodes({markerSelection:g,isHighlight:!1}))}getHighlightLabelData(e,t){const i=e.filter(e=>e.datum===t.datum&&e.itemId===t.itemId);return 0===i.length?void 0:i}getHighlightData(e,t){return t?[t]:void 0}updateHighlightSelection(e){const{highlightSelection:t,highlightLabelSelection:i,_contextNodeData:n}=this;if(!n)return;const s=this.ctx.highlightManager?.getActiveHighlight(),r=e&&s?.datum?s:void 0;let o,a;if(null!=r){const e=this.isLabelEnabled(),{labelData:t,nodeData:i}=n;a=this.getHighlightData(i,r),o=e?this.getHighlightLabelData(t,r):void 0}return this.highlightSelection=this.updateHighlightSelectionItem({items:a,highlightSelection:t}),this.highlightLabelSelection=this.updateHighlightSelectionLabel({items:o,highlightLabelSelection:i}),a}markQuadtreeDirty(){this.quadtree=void 0}*datumNodesIter(){for(const{node:e}of this.datumSelection)!0!==e.datum.missing&&(yield e)}getQuadTree(){if(void 0===this.quadtree){const{width:e,height:t}=this.ctx.scene.canvas,i=new m(0,0,e,t);this.quadtree=new Op(100,10,i),this.initQuadTree(this.quadtree)}return this.quadtree}initQuadTree(e){}pickNodesExactShape(e){const t=super.pickNodesExactShape(e);if(0!==t.length)return t;const{x:i,y:n}=e,{opts:{hasMarkers:s}}=this,{dataNodeGroup:r,markerGroup:o}=this;let a=r.pickNodes(i,n).filter(e=>!0!==e.datum.missing);if(0===a.length&&s&&(a=o?.pickNodes(i,n).filter(e=>!0!==e.datum.missing)),0!==a.length)return a.map(e=>e.datum);for(const t of this.moduleMap.modules()){const{datum:i}=t.pickNodeExact(e)??{};if(null!=i&&!0!==i?.missing)return[i]}return[]}pickNodeClosestDatum(e){const{x:t,y:i}=e,{axes:n,_contextNodeData:s}=this;if(!s)return;const r=n.x,o=n.y,a=t,l=i;let c,h=1/0;for(const e of s.nodeData){const{point:{x:t=NaN,y:i=NaN}={}}=e;if(isNaN(t)||isNaN(i))continue;if(!r?.inRange(t)||!o?.inRange(i))continue;const n=Math.max((a-t)**2+(l-i)**2,0);n<h&&(h=n,c=e)}for(const t of this.moduleMap.modules()){const i=t.pickNodeNearest(e);if(void 0!==i&&i.distanceSquared<h){h=i.distanceSquared,c=i.datum;break}}return c?{datum:c,distance:Math.max(Math.sqrt(h)-(c.point?.size??0)/2,0)}:void 0}pickNodeMainAxisFirst(e,t){const{x:i,y:n}=e,{axes:s,_contextNodeData:r}=this,{pickOutsideVisibleMinorAxis:o}=this.properties;if(!r)return;const a=s.x,l=s.y,c=[a,l].filter(Ah.is).map(e=>e.direction);if(t&&0===c.length)return;const[h="x"]=c,d=[i,n];"x"!==h&&d.reverse();const u=[1/0,1/0];let p;for(const e of r.nodeData){const{x:t=NaN,y:i=NaN}=e.point??e.midPoint??{};if(isNaN(t)||isNaN(i)||!0===e.missing)continue;const n=[a?.inRange(t),l?.inRange(i)];if("x"!==h&&n.reverse(),!n[0]||!o&&!n[1])continue;const s=[t,i];"x"!==h&&s.reverse();let r=!0;for(let e=0;e<s.length;e++){const t=Math.abs(s[e]-d[e]);if(t>u[e]){r=!1;break}t<u[e]&&(u[e]=t,u.fill(1/0,e+1,u.length))}r&&(p=e)}if(p){let t=Math.max(u[0]**2+u[1]**2-(p.point?.size??0),0);for(const i of this.moduleMap.modules()){const n=i.pickNodeMainAxisFirst(e);if(void 0!==n&&n.distanceSquared<t){p=n.datum,t=n.distanceSquared;break}}return{datum:p,distance:Math.sqrt(t)}}}isPathOrSelectionDirty(){return!1}shouldFlipXY(){return!1}visibleRange(e,t,i){const n=this.keysOrValues(e);return Xs(i?.length??n.length,t,e=>{const t=i?.[e]??e;return this.xCoordinateRange(n[t],0,t)})}domainForVisibleRange(e,t,i,n,s,r){const{processedData:o,dataModel:a}=this,[l,c]=n,h=this.keysOrValues(i);if(s){const e=this.visibleRange(i,n,r);return a.getDomainBetweenRange(this,t,e,o)}const d=t.map(e=>this.keysOrValues(e));let u=1/0,p=-1/0;return h.forEach((e,i)=>{const[n,s]=this.xCoordinateRange(e,0,i);if(!(s<l||n>c))for(let e=0;e<t.length;e++){const t=d[e][i];u=Math.min(u,t),p=Math.max(p,t)}}),u>p?[NaN,NaN]:[u,p]}domainForClippedRange(e,t,i,s){const{processedData:r,dataModel:o,axes:a}=this,l=function(e){let t,i;if((e instanceof Hd||e instanceof Wd)&&({min:t,max:i}=e),null!=t||null!=i)return t??(t=-1/0),i??(i=1/0),[t,i]}(a["x"===e?"y":"x"]);if(!l)return t.flatMap(e=>o.getDomain(this,e,"value",r));const c=this.keysOrValues(i);if(s){const e=function(e,t,i){const s=t[0].valueOf(),r=t[1].valueOf(),o=(0,n.S3)(0,e-1,e=>{const t=i(e)?.valueOf();return!Number.isFinite(t)||t>=s});let a=(0,n.I5)(0,e-1,e=>{const t=i(e)?.valueOf();return!Number.isFinite(t)||t<=r});return null==o||null==a?[0,0]:(a=Math.min(a+1,e),[o,a])}(c.length,l,e=>c[e]);return o.getDomainBetweenRange(this,t,e,r)}const h=t.map(e=>this.keysOrValues(e)),d=l[0].valueOf(),u=l[1].valueOf(),p=[];return c.forEach((e,t)=>{const i=e.valueOf();if(i<d||i>u)return;const n=h.map(e=>e[t]);i>=d&&p.push(...n),i<=u&&p.push(...n)}),p}countVisibleItems(e,t,i,s,r){const{dataModel:o,processedData:a}=this;if(!o||!a)return 1/0;const l=this.keysOrValues(e),c=t.map(e=>o.resolveColumnById(this,e,a)),h=this.axes.x,d=this.axes.y,u=this.shouldFlipXY(),p=h.range,g=d.range,f=(e,t,i)=>e[0]+(i-t[0])/(t[1]-t[0])*(e[1]-e[0]),m=f(p,h.visibleRange,i[0]),v=f(p,h.visibleRange,i[1]),y=f(g,d.visibleRange,u?s[0]:s[1]),C=f(g,d.visibleRange,u?s[1]:s[0]),b=Math.round((i[0]+(i[1]-i[0])/2)*l.length);return Qs(0,l.length-1,b,r,e=>{let[t,i]=this.xCoordinateRange(l[e],0,e),[s,r]=this.yCoordinateRange(c.map(t=>t[e]),0,e);return!!((0,n.Bf)(t)&&(0,n.Bf)(i)&&(0,n.Bf)(s)&&(0,n.Bf)(r))&&(u&&([t,i,s,r]=[s,r,t,i]),t>=m&&i<=v&&s>=y&&r<=C)})}updateHighlightSelectionItem(e){const{opts:{hasMarkers:t}}=this,{items:i,highlightSelection:n}=e,s=i??[];if(t){const e=n;return this.updateMarkerSelection({nodeData:s,markerSelection:e})}return this.updateDatumSelection({nodeData:s,datumSelection:n})}updateHighlightSelectionLabel(e){return this.updateLabelSelection({labelData:e.items??[],labelSelection:e.highlightLabelSelection})}updateDatumSelection(e){return e.datumSelection}updateDatumNodes(e){}updateMarkerSelection(e){return e.markerSelection}updateMarkerNodes(e){}updatePaths(e){e.paths.forEach(e=>e.visible=!1)}updatePathNodes(e){const{paths:t,opacity:i,visible:n}=e;for(const e of t)e.opacity=i,e.visible=n}resetPathAnimation(e){const{path:t}=this.opts?.animationResetFns??{};t&&e.paths.forEach(e=>{da([e],t)})}resetDatumAnimation(e){const{datum:t}=this.opts?.animationResetFns??{};t&&da([e.datumSelection],t)}resetLabelAnimation(e){const{label:t}=this.opts?.animationResetFns??{};t&&da([e.labelSelection],t)}resetMarkerAnimation(e){const{marker:t}=this.opts?.animationResetFns??{};t&&this.opts.hasMarkers&&da([e.markerSelection],t)}resetAllAnimation(e){this.ctx.animationManager.stopByAnimationGroupId(this.id),this.resetPathAnimation(e),this.resetDatumAnimation(e),this.resetLabelAnimation(e),this.resetMarkerAnimation(e),!1===e.contextData?.animationValid&&this.ctx.animationManager.skipCurrentBatch()}animateEmptyUpdateReady(e){this.ctx.animationManager.skipCurrentBatch(),this.resetAllAnimation(e)}animateWaitingUpdateReady(e){this.ctx.animationManager.skipCurrentBatch(),this.resetAllAnimation(e)}animateReadyHighlight(e){const{datum:t}=this.opts?.animationResetFns??{};t&&da([e],t)}animateReadyHighlightMarkers(e){const{marker:t}=this.opts?.animationResetFns??{};t&&da([e],t)}animateReadyResize(e){this.resetAllAnimation(e)}animateClearingUpdateEmpty(e){this.ctx.animationManager.skipCurrentBatch(),this.resetAllAnimation(e)}getAnimationData(e,t){const{_contextNodeData:i}=this;if(i)return{datumSelection:this.datumSelection,markerSelection:this.markerSelection,labelSelection:this.labelSelection,annotationSelections:[...this.annotationSelections],contextData:i,previousContextData:t,paths:this.paths,seriesRect:e}}updateLabelSelection(e){return e.labelSelection}getScaling(e){if(e instanceof Vd){const{range:t,domain:i}=e;return{type:"log",convert:t=>e.convert(t),domain:[i[0],i[1]],range:[t[0],t[1]]}}if(e instanceof cr){const{range:t,domain:i}=e;return{type:"continuous",domain:[i[0],i[1]],range:[t[0],t[1]]}}if(e instanceof to){const{domain:t}=e;return{type:"category",domain:t,inset:e.inset,step:e.step}}}calculateScaling(){const e={};for(const t of Object.values(Gi)){const i=this.axes[t];if(!i)continue;const n=this.getScaling(i.scale);null!=n&&(e[t]=n)}return e}},Kp=class extends De{constructor(){super(...arguments),this.type="linear",this.tension=1,this.position="end"}};a([Te],Kp.prototype,"type",2),a([Te],Kp.prototype,"tension",2),a([Te],Kp.prototype,"position",2);var $p=class extends Up{constructor(){super(...arguments),this.xName=void 0,this.fill="#c16068",this.fillGradientDefaults=new Tp,this.fillPatternDefaults=new Dp,this.fillImageDefaults=new Ip,this.fillOpacity=1,this.stroke="#874349",this.strokeWidth=2,this.strokeOpacity=1,this.lineDash=[0],this.lineDashOffset=0,this.interpolation=new Kp,this.shadow=new wp,this.marker=new kp,this.label=new pl,this.tooltip=new Np,this.connectMissingData=!1}};function Yp(e){switch(e.type){case"linear":case"step":return[{x:e.x0,y:e.y0},{x:e.x1,y:e.y1}];case"cubic":return[{x:e.cp0x,y:e.cp0y},{x:e.cp3x,y:e.cp3y}]}}function qp(e,t,i){const[n,s]=Yp(e),r=s.x!==n.x?(i.x-t.x)/(s.x-n.x):0,o=s.y!==n.y?(i.y-t.y)/(s.y-n.y):0;switch(e.type){case"linear":return{type:"linear",moveTo:e.moveTo,x0:t.x,y0:t.y,x1:i.x,y1:i.y};case"cubic":return{type:"cubic",moveTo:e.moveTo,cp0x:t.x,cp0y:t.y,cp1x:i.x-(e.cp2x-n.x)*r,cp1y:i.y-(e.cp2y-n.y)*o,cp2x:i.x-(e.cp1x-n.x)*r,cp2y:i.y-(e.cp1y-n.y)*o,cp3x:i.x,cp3y:i.y};case"step":return{type:"step",moveTo:e.moveTo,x0:t.x,y0:t.y,x1:i.x,y1:i.y,stepX:i.x-(e.stepX-n.x)*r}}}function Xp(e,t,i){const{moveTo:n}=e,[s,r]=function(e){const t=Yp(e);return t[0].x>t[1].x&&t.reverse(),t}(e),{x:o,y:a}=s,{x:l,y:c}=r;if(i<o)return qp(e,s,s);if(t>l)return qp(e,r,r);switch(e.type){case"linear":{const e=a===c?void 0:(c-a)/(l-o);return{type:"linear",moveTo:n,x0:t,y0:null==e?a:e*(t-o)+a,x1:i,y1:null==e?a:e*(i-o)+a}}case"step":if(i<=e.stepX){const s=e.y0;return{type:"step",moveTo:n,x0:t,y0:s,x1:i,y1:s,stepX:i}}if(t>=e.stepX){const s=e.y1;return{type:"step",moveTo:n,x0:t,y0:s,x1:i,y1:s,stepX:t}}{const{y0:s,y1:r,stepX:o}=e;return{type:"step",moveTo:n,x0:t,y0:s,x1:i,y1:r,stepX:o}}case"cubic":{const s=qe(e.cp0x,e.cp1x,e.cp2x,e.cp3x,t);let[r,o]=Xe(e.cp0x,e.cp0y,e.cp1x,e.cp1y,e.cp2x,e.cp2y,e.cp3x,e.cp3y,s);const a=qe(o[0].x,o[1].x,o[2].x,o[3].x,i);return[o,r]=Xe(o[0].x,o[0].y,o[1].x,o[1].y,o[2].x,o[2].y,o[3].x,o[3].y,a),{type:"cubic",moveTo:n,cp0x:o[0].x,cp0y:o[0].y,cp1x:o[1].x,cp1y:o[1].y,cp2x:o[2].x,cp2y:o[2].y,cp3x:o[3].x,cp3y:o[3].y}}}}a([Te],$p.prototype,"xKey",2),a([Te],$p.prototype,"xName",2),a([Te],$p.prototype,"yKey",2),a([Te],$p.prototype,"yName",2),a([Te],$p.prototype,"yFilterKey",2),a([Te],$p.prototype,"normalizedTo",2),a([Te],$p.prototype,"fill",2),a([Te],$p.prototype,"fillGradientDefaults",2),a([Te],$p.prototype,"fillPatternDefaults",2),a([Te],$p.prototype,"fillImageDefaults",2),a([Te],$p.prototype,"fillOpacity",2),a([Te],$p.prototype,"stroke",2),a([Te],$p.prototype,"strokeWidth",2),a([Te],$p.prototype,"strokeOpacity",2),a([Te],$p.prototype,"lineDash",2),a([Te],$p.prototype,"lineDashOffset",2),a([Te],$p.prototype,"interpolation",2),a([Te],$p.prototype,"shadow",2),a([Te],$p.prototype,"marker",2),a([Te],$p.prototype,"label",2),a([Te],$p.prototype,"tooltip",2),a([Te],$p.prototype,"connectMissingData",2);var Zp={start:0,middle:.5,end:1},Qp=.05;function Jp(e,t,i){return(t-e)*i+e}function eg(e,t){return"linear"===e.type?function(e,t){const{x0:i,y0:n,x1:s,y1:r}=e,o=(r-n)/(s-i)*(t-i)+n;return{leftCp1x:i,leftCp1y:n,leftCp2x:t,leftCp2y:o,stepX:t,stepY0:o,stepY1:o,rightCp1x:t,rightCp1y:o,rightCp2x:s,rightCp2y:r}}(e,t):"cubic"===e.type?function(e,t){const{cp0x:i,cp0y:n,cp1x:s,cp1y:r,cp2x:o,cp2y:a,cp3x:l,cp3y:c}=e,h=qe(i,s,o,l,t),[d,u]=Xe(i,n,s,r,o,a,l,c,h),p=d[3].y;return{leftCp1x:d[1].x,leftCp1y:d[1].y,leftCp2x:d[2].x,leftCp2y:d[2].y,stepX:t,stepY0:p,stepY1:p,rightCp1x:u[1].x,rightCp1y:u[1].y,rightCp2x:u[2].x,rightCp2y:u[2].y}}(e,t):function(e){const{x0:t,y0:i,x1:n,y1:s,stepX:r}=e;return{leftCp1x:(t+r)/2,leftCp1y:i,leftCp2x:(t+r)/2,leftCp2y:i,stepX:r,stepY0:i,stepY1:s,rightCp1x:(r+n)/2,rightCp1y:s,rightCp2x:(r+n)/2,rightCp2y:s}}(e)}function tg(e,t,i,n,s,r,o){switch(t){case 0:o?e.moveTo(s,r):e.moveTo(i,n);break;case 1:o?e.lineTo(s,r):e.lineTo(i,n)}}function ig(e,t,i,n,s,r){r?e.lineTo(t,i):e.lineTo(n,s)}function ng(e,t,i,n,s,r,o,a,l,c){c?e.cubicCurveTo(r,o,n,s,t,i):e.cubicCurveTo(n,s,r,o,a,l)}function sg(e,t,i,n,s,r,o){o?(e.lineTo(r,s),e.lineTo(r,i),e.lineTo(t,i)):(e.lineTo(r,i),e.lineTo(r,s),e.lineTo(n,s))}function rg(e,t,i,n){const[s,r]=Yp(t);switch(tg(e,i,s.x,s.y,r.x,r.y,n),t.type){case"linear":ig(e,t.x0,t.y0,t.x1,t.y1,n);break;case"cubic":ng(e,t.cp0x,t.cp0y,t.cp1x,t.cp1y,t.cp2x,t.cp2y,t.cp3x,t.cp3y,n);break;case"step":sg(e,t.x0,t.y0,t.x1,t.y1,t.stepX,n)}}function og(e,t,i){const[n,s]=Yp(e),[r,o]=Yp(t);return[{x:Jp(n.x,r.x,i),y:Jp(n.y,r.y,i)},{x:Jp(s.x,o.x,i),y:Jp(s.y,o.y,i)}]}function ag(e,t,i,n,s,r){const[{x:o,y:a},{x:l,y:c}]=og(t,i,n);if(tg(e,s,o,a,l,c,r),"cubic"===t.type&&"cubic"===i.type)ng(e,o,a,Jp(t.cp1x,i.cp1x,n),Jp(t.cp1y,i.cp1y,n),Jp(t.cp2x,i.cp2x,n),Jp(t.cp2y,i.cp2y,n),l,c,r);else if("step"===t.type&&"step"===i.type)sg(e,o,a,l,c,Jp(t.stepX,i.stepX,n),r);else if("linear"===t.type&&"linear"===i.type)ig(e,o,a,l,c,r);else{let s;s="step"===t.type?t.stepX:"step"===i.type?i.stepX:(o+l)/2;const h=eg(t,s),d=eg(i,s),u=Jp(h.leftCp1x,d.leftCp1x,n),p=Jp(h.leftCp1y,d.leftCp1y,n),g=Jp(h.leftCp2x,d.leftCp2x,n),f=Jp(h.leftCp2y,d.leftCp2y,n),m=Jp(h.stepX,d.stepX,n),v=Jp(h.stepY0,d.stepY0,n),y=Jp(h.stepY1,d.stepY1,n),C=Jp(h.rightCp1x,d.rightCp1x,n),b=Jp(h.rightCp1y,d.rightCp1y,n),S=Jp(h.rightCp2x,d.rightCp2x,n),w=Jp(h.rightCp2y,d.rightCp2y,n);r?(e.cubicCurveTo(S,w,C,b,m,y),e.lineTo(m,v),e.cubicCurveTo(g,f,u,p,o,a)):(e.cubicCurveTo(u,p,g,f,m,v),e.lineTo(m,y),e.cubicCurveTo(C,b,S,w,l,c))}}var lg=(e=>(e[e.Zero=0]="Zero",e[e.Split=1]="Split",e))(lg||{});function cg(e,t){if(!t)return NaN;if(e instanceof Date&&(e=e.getTime()),"continuous"===t.type&&"number"==typeof e)return(e-t.domain[0])/(t.domain[1]-t.domain[0])*(t.range[1]-t.range[0])+t.range[0];if("log"===t.type&&"number"==typeof e)return t.convert(e);if("category"!==t.type)return NaN;let i=t.domain.findIndex(t=>t===e);return-1===i&&(i=t.domain.findIndex(t=>{return n=t,null!=(i=e)&&null!=n&&"object"==typeof i&&"object"==typeof n&&("id"in i&&"id"in n?i.id===n.id:i.toString()===n.toString());var i,n})),i>=0?t.inset+t.step*i:NaN}function hg(e){return sl(e).valueOf()}function dg({data:e},t){return e.map((e,i)=>({xValue0Index:t.indexOf(hg(e.xValue0)),xValue1Index:t.indexOf(hg(e.xValue1)),datumIndex:i}))}function ug(e,t,i){if(i.xValue1Index===i.xValue0Index+1)return e;const n=Yp(e),s=(n[1].x-n[0].x)/(i.xValue1Index-i.xValue0Index),r=n[0].x+(t-i.xValue0Index)*s;return Xp(e,r,r+s)}function pg(e,t){const[i,n]=Yp(e),s=cg(0,t.scales.y);return qp(e,{x:i.x,y:s},{x:n.x,y:s})}function gg(e){const[t,i]=Yp(e);return function(e,t){const{x:i,y:n}=t;switch(e.type){case"linear":return{type:"linear",moveTo:e.moveTo,x0:i,y0:n,x1:i,y1:n};case"step":return{type:"step",moveTo:e.moveTo,x0:i,y0:n,x1:i,y1:n,stepX:i};case"cubic":return{type:"cubic",moveTo:e.moveTo,cp0x:i,cp0y:n,cp1x:i,cp1y:n,cp2x:i,cp2y:n,cp3x:i,cp3y:n}}}(e,{x:(t.x+i.x)/2,y:(t.y+i.y)/2})}function fg(e,t,i,n,s,r){let o,a;if(s.xValue0Index>=r.xValue1Index){const e=n.findLast(e=>e.xValue1Index<=r.xValue1Index)?.datumIndex,t=null!=e?i.data[e]:void 0;o=t?.xValue1,a=t?.yValue1}else if(s.xValue0Index<=r.xValue0Index){const e=n.find(e=>e.xValue0Index>=r.xValue0Index)?.datumIndex,t=null!=e?i.data[e]:void 0;o=t?.xValue0,a=t?.yValue0}if(null==o||null==a)switch(t){case 0:return pg(e,i);case 1:return gg(e)}const l={x:cg(o,i.scales.x),y:cg(a,i.scales.y)};return qp(e,l,l)}function mg(e,t){if(null==t)return;const i=hg(e.xValue0),n=hg(e.xValue1);return t.find(e=>hg(e.xValue0)===i&&hg(e.xValue1)===n)?.span}function vg(e,t,i,n,s,r,o){const a=e.data[n.datumIndex],l=a.span,c=mg(a,s);if(null!=c)o.removed.push({from:c,to:c}),o.moved.push({from:c,to:l}),o.added.push({from:l,to:l});else{const s=fg(l,t,e,i,n,r);o.added.push({from:s,to:l})}}function yg(e,t,i,n,s,r,o){const a=e.data[n.datumIndex],l=a.span,c=mg(a,s);if(null!=c)o.removed.push({from:l,to:l}),o.moved.push({from:l,to:c}),o.added.push({from:c,to:c});else{const s=fg(l,t,e,i,n,r);o.removed.push({from:l,to:s})}}function Cg(e,t,i,n,s){const r=t[s.xValue0Index],o=i.data.find(e=>hg(e.xValue0)===r),a=t[s.xValue1Index],l=i.data.find(e=>hg(e.xValue1)===a);if(null==o||null==l)return;const[{x:c},{x:h}]=Yp(e),d=cg(o.xValue0,i.scales.x),u=cg(o.yValue0,i.scales.y),p=cg(l.xValue1,i.scales.x),g=cg(l.yValue1,i.scales.y);let f=n.data[s.datumIndex].span;return f=qp(f,{x:d,y:u},{x:p,y:g}),f=Xp(f,c,h),f}function bg(e,t,i,n,s,r,o,a,l){const c=s+1,h=o.find(e=>e.xValue0Index<=s&&e.xValue1Index>=c),d=r.find(e=>e.xValue0Index<=s&&e.xValue1Index>=c),u=t.zeroData,p=e.zeroData;if(null==h&&null!=d)return void vg(e,i,r,d,u,a,l);if(null!=h&&null==d)return void yg(t,i,o,h,p,a,l);if(null==h||null==d)return;let g;g=h.xValue0Index===d.xValue0Index&&h.xValue1Index===d.xValue1Index?0:h.xValue0Index<=d.xValue0Index&&h.xValue1Index>=d.xValue1Index?-1:h.xValue0Index>=d.xValue0Index&&h.xValue1Index<=d.xValue1Index?1:0;const f=ug(t.data[h.datumIndex].span,s,h),m=ug(e.data[d.datumIndex].span,s,d);if(1===g){const s=Cg(f,n,t,e,d);null!=s?(l.removed.push({from:f,to:s}),l.moved.push({from:s,to:m}),l.added.push({from:m,to:m})):yg(t,i,o,h,p,a,l)}else if(-1===g){const s=Cg(m,n,e,t,h);null!=s?(l.removed.push({from:f,to:f}),l.moved.push({from:f,to:s}),l.added.push({from:s,to:m})):vg(e,i,r,d,u,a,l)}else l.removed.push({from:f,to:f}),l.moved.push({from:f,to:m}),l.added.push({from:m,to:m})}function Sg(e,t,i){const{span:n}=t;switch(i){case 0:return mg(t,e.zeroData)??pg(n,e);case 1:return gg(n)}}function wg(e,t,i){if(!function(e,t){const i=t.scales.x,n=e.scales.x;if("category"!==i?.type||"category"!==n?.type)return!0;let s=-1/0;for(const e of i.domain){const t=cg(e,n);if(Number.isFinite(t)){if(t<s)return!1;s=t}}return!0}(e,t))return;const n=function(e,t){const i=new Map;for(const{xValue0:t,xValue1:n}of e.data){const e=hg(t),s=hg(n);i.set(e,t).set(s,n)}const n=Array.from(i,([e,t])=>({axisValue:e,value:t}));n.sort((t,i)=>cg(t.value,e.scales.x)-cg(i.value,e.scales.x));const s=[];for(const{xValue0:e,xValue1:n}of t.data){const t=hg(e),r=hg(n);i.has(t)||(i.set(t,e),s.push({axisValue:t,value:e})),i.has(r)||(i.set(r,n),s.push({axisValue:r,value:n}))}s.sort((e,i)=>cg(e.value,t.scales.x)-cg(i.value,t.scales.x));const r=n;let o=0;for(const e of s){for(let i=r.length-1;i>o;i-=1)if(cg(e.value,t.scales.x)>cg(r[i].value,t.scales.x)){o=i+1;break}r.splice(o,0,e),o+=1}if(!function(e,t){let i=-1/0;for(const n of e){const e=cg(n.value,t.scales.x);if(Number.isFinite(e)){if(e<i)return!1;i=e}}return!0}(r,t))return;const a=r.map(e=>e.axisValue);return{axisValues:a,oldDataAxisIndices:dg(t,a),newDataAxisIndices:dg(e,a)}}(e,t);return null==n?function(e,t,i){const n=[],s=[];for(const e of t.data){const n=e.span,r=Sg(t,e,i);s.push({from:n,to:r})}for(const t of e.data){const s=t.span,r=Sg(e,t,i);n.push({from:r,to:s})}return{removed:s,moved:[],added:n}}(e,t,i):function(e,t,i,n){const s={removed:[],moved:[],added:[]},{axisValues:r,oldDataAxisIndices:o,newDataAxisIndices:a}=e,l={xValue0Index:Math.max(o.at(0)?.xValue0Index??-1/0,a.at(0)?.xValue0Index??-1/0),xValue1Index:Math.min(o.at(-1)?.xValue1Index??1/0,a.at(-1)?.xValue1Index??1/0)};for(let e=0;e<r.length-1;e+=1)bg(t,i,n,r,e,a,o,l,s);return s}(n,e,t,i)}function xg(e){return"continuous"===e.type||"log"===e.type}function Eg(e){return"category"===e.type}function Mg(e,t){return void 0===e||void 0===t?void 0!==e||void 0!==t:xg(e)&&xg(t)?e.type===t.type&&(0,n.r1)(e.domain,t.domain)&&(0,n.r1)(e.range,t.range):!(!Eg(e)||!Eg(t))&&e.inset===t.inset&&e.step===t.step&&(0,n.r1)(e.domain,t.domain)}function Ag(e){return null!=e&&("category"===e.type?e.domain.every(e=>null!=e):e.domain.every(e=>Number.isFinite(e)||e instanceof Date)&&e.range.every(e=>Number.isFinite(e)))}function Tg(e,t){let i;const n=e.map(e=>e.point);switch(t.type){case"linear":i=function(e){const t=[];let i=0,n=NaN,s=NaN;for(const{x:r,y:o}of e){if(i>0){const e=1===i;t.push({type:"linear",moveTo:e,x0:n,y0:s,x1:r,y1:o})}i+=1,n=r,s=o}return t}(n);break;case"smooth":i=function(e,t){const i=Array.isArray(e)?e:Array.from(e);if(i.length<=1)return[];const n=i.map((e,t)=>{const n=0===t?e:i[t-1],s=t===i.length-1?e:i[t+1],r=0===t||t===i.length-1;if(Math.sign(n.y-e.y)===Math.sign(s.y-e.y))return 0;if(!r){const t=Math.abs(n.y-s.y),i=Math.abs(e.y-n.y)/t,r=Math.abs(e.y-s.y)/t;if(i<=Qp||1-i<=Qp||r<=Qp||1-r<=Qp)return 0}return(s.y-n.y)/(s.x-n.x)});0===n[1]&&(n[0]*=2),0===n[n.length-2]&&(n[n.length-1]*=2);const s=[];for(let e=1;e<i.length;e+=1){const r=i[e-1],o=n[e-1],a=i[e],l=n[e],c=a.x-r.x,h=a.y-r.y;let d=c*t/3,u=c*o*t/3,p=c*t/3,g=c*l*t/3;0===l&&Math.abs(u)>Math.abs(h)&&(d*=Math.abs(h/u),u=Math.sign(u)*Math.abs(h)),0===o&&Math.abs(g)>Math.abs(h)&&(p*=Math.abs(h/g),g=Math.sign(g)*Math.abs(h)),s.push({type:"cubic",moveTo:1===e,cp0x:r.x,cp0y:r.y,cp1x:r.x+d,cp1y:r.y+u,cp2x:a.x-p,cp2y:a.y-g,cp3x:a.x,cp3y:a.y})}return s}(n,t.tension);break;case"step":i=function(e,t){const i=[];let n=0,s=NaN,r=NaN;const o="number"==typeof t?t:Zp[t];for(const{x:t,y:a}of e){if(n>0){const e=1===n,l=s+(t-s)*o;i.push({type:"step",moveTo:e,x0:s,y0:r,x1:t,y1:a,stepX:l})}n+=1,s=t,r=a}return i}(n,t.position)}return i.map((t,i)=>({span:t,xValue0:e[i].xDatum,yValue0:e[i].yDatum,xValue1:e[i+1].xDatum,yValue1:e[i+1].yDatum}))}function Dg(e,t,i=.001){return Math.abs(e.x-t.x)<i&&Math.abs(e.y-t.y)<i}function Ig({path:e},t){let i;for(const{span:n}of t){const[t,s]=Yp(n);rg(e,n,null!=i&&Dg(i,t)?1:0,!1),i=s}}function Rg(e,t,i){let n;for(const s of i){const[i,r]=og(s.from,s.to,e),o=null!=n&&Dg(n,i)?1:0;ag(t.path,s.from,s.to,e,o,!1),n=r}}function Lg(e,t,i){return{status:e,path:{addPhaseFn:(e,i)=>Rg(e,i,t.added),updatePhaseFn:(e,i)=>Rg(e,i,t.moved),removePhaseFn:(e,i)=>Rg(e,i,t.removed)},pathProperties:kg(e,i)}}function kg(e,t){const i="none"===t?"updated":e,n={fromFn:t=>{let n;return n="removed"===e?{finish:{visible:!1}}:"added"===e?{start:{visible:!0}}:{},{phase:oa[i],...n}},toFn:e=>({phase:oa[i]})};return"fade"===t?{fromFn:t=>({opacity:"added"===e?0:t.opacity,...n.fromFn(t)}),toFn:t=>({opacity:"removed"===e?0:1,...n.toFn(t)})}:n}function Pg(e,t,i){if("category"===e.scales.x?.type!=("category"===t.scales.x?.type)||!Ag(e.scales.x)||!Ag(t.scales.x))return;if(null==e.strokeData||null==t.strokeData)return;let n="updated";t.visible&&!e.visible?n="removed":!t.visible&&e.visible&&(n="added");const s=wg({scales:e.scales,data:e.strokeData.spans},{scales:t.scales,data:t.strokeData.spans},1);return null!=s?{status:n,stroke:Lg(n,s,"fade"),hasMotion:(i?.changed??!0)||!Mg(e.scales.x,t.scales.x)||!Mg(e.scales.y,t.scales.y)||"updated"!==n}:void 0}function Ng({path:e},{spans:t,phantomSpans:i}){for(let n=0;n<t.length;n+=1){const{span:s}=t[n],r=i[n].span;rg(e,s,0,!1),rg(e,r,1,!0),e.closePath()}}function Og(e,{path:t},i,n){for(let s=0;s<i.length;s+=1){const r=i[s],o=n[s];ag(t,r.from,r.to,e,0,!1),ag(t,o.from,o.to,e,1,!0),t.closePath()}}function _g(e,t,i,n){return{status:e,path:{addPhaseFn:(e,n)=>Og(e,n,t.added,i.added),updatePhaseFn:(e,n)=>Og(e,n,t.moved,i.moved),removePhaseFn:(e,n)=>Og(e,n,t.removed,i.removed)},pathProperties:kg(e,n)}}function Fg(e,t){if("category"===e.scales.x?.type!=("category"===t.scales.x?.type)||!Ag(e.scales.x)||!Ag(t.scales.x))return;let i="updated";t.visible&&!e.visible?i="removed":!t.visible&&e.visible&&(i="added");const n=wg({scales:e.scales,data:e.fillData.spans},{scales:t.scales,data:t.fillData.spans},0);if(null==n)return;const s=wg({scales:e.scales,data:e.fillData.phantomSpans},{scales:t.scales,data:t.fillData.phantomSpans},0);if(null==s)return;const r=wg({scales:e.scales,data:e.strokeData.spans,zeroData:e.fillData.phantomSpans},{scales:t.scales,data:t.strokeData.spans,zeroData:t.fillData.phantomSpans},0);if(null==r)return;const o="none";return{status:i,fill:_g(i,n,s,o),stroke:Lg(i,r,o)}}function Gg({id:e},t,i,...n){la(e,"markers",t,n,{opacity:0},{opacity:1},{phase:i?oa[i]:"trailing"}),n.forEach(e=>e.cleanup())}function Vg({id:e},t,...i){la(e,"markers",t,i,{scalingX:0,scalingY:0},{scalingX:1,scalingY:1},{phase:"initial"}),i.forEach(e=>e.cleanup())}function Bg({id:e,nodeDataDependencies:t},i,...s){const r=t.seriesRectWidth;aa(e,"markers",i,s,{fromFn:(e,t)=>{const i=t.midPoint?.x??r;let s=(0,n.qE)(0,Rs(i/r),1);return isNaN(s)&&(s=0),{scalingX:0,scalingY:0,delay:s,duration:.2,phase:"initial"}},toFn:()=>({scalingX:1,scalingY:1})})}function Hg(e){return{opacity:1,scalingX:1,scalingY:1}}function zg(e,t){return{x:t.point?.x??NaN,y:t.point?.y??NaN,scalingCenterX:t.point?.x??NaN,scalingCenterY:t.point?.y??NaN}}function Ug(e,{datumIndex:t}){const i=e.getNodeData();if(void 0===i)return;const n=i[t],{point:s}=n??{};if(null==n||null==s)return;const r=4+(s.focusSize??e.getFormattedMarkerStyle(n).size),o=r/2,a=n.point.x-o,l=n.point.y-o;return wt.toCanvas(e.contentGroup,new m(a,l,r,r))}function Wg({id:e,visible:t,nodeDataDependencies:i},n,...s){const{seriesRectWidth:r,seriesRectHeight:o}=i;la(e,"path_properties",n,s,{clipX:0},{clipX:r},{phase:"initial",start:{clip:!0,clipY:o,visible:t},finish:{clip:!1,visible:t}})}function jg({id:e},t,i,n="add",...s){la(e,t,i,s,{opacity:0},{opacity:1},{phase:n})}function Kg(e){return t=>({visible:e.getVisible(),opacity:e.getOpacity(),clipScalingX:1,clip:!1})}function $g({nodeDataDependencies:e},t){const i=e=>isFinite(e)?e:0;t.clipX=i(e.seriesRectWidth),t.clipY=i(e.seriesRectHeight)}var Yg=class extends jp{constructor(e){super({moduleCtx:e,directionKeys:Bp,directionNames:Hp,categoryKey:"xValue",pathsPerSeries:["fill","stroke"],pathsZIndexSubOrderOffset:[0,1e3],hasMarkers:!0,markerSelectionGarbageCollection:!1,pickModes:[2,0],animationResetFns:{path:Kg({getVisible:()=>this.visible,getOpacity:()=>this.getOpacity()}),label:bp,marker:(e,t)=>({opacity:1,scalingX:1,scalingY:1,...zg(0,t)})},clipFocusBox:!1}),this.properties=new $p,this.connectsToYAxis=!0,this.backgroundGroup=new At({name:`${this.id}-background`,zIndex:0}),this._isStacked=void 0}get pickModeAxis(){return"main"}renderToOffscreenCanvas(){return super.renderToOffscreenCanvas()||null!=this.contextNodeData&&(this.contextNodeData.fillData.spans.length>Wp||this.contextNodeData.strokeData.spans.length>Wp)}attachSeries(e,t,i){super.attachSeries(e,t,i),e.appendChild(this.backgroundGroup)}detachSeries(e,t,i){super.detachSeries(e,t,i),e?.removeChild(this.backgroundGroup)}attachPaths([e,t]){this.backgroundGroup.appendChild(e),this.contentGroup.appendChild(t),t.zIndex=-1}detachPaths([e,t]){this.backgroundGroup.removeChild(e),this.contentGroup.removeChild(t)}isStacked(){return(this.seriesGrouping?.stackCount??1)>1}setSeriesIndex(e){const t=this.isStacked();return!(!super.setSeriesIndex(e)&&this._isStacked===t||(this._isStacked=t,t?(this.backgroundGroup.zIndex=[0,e],this.contentGroup.zIndex=[1,e,0]):(this.backgroundGroup.zIndex=[1,e,0,0],this.contentGroup.zIndex=[1,e,0,1]),0))}async processData(e){if(null==this.data)return;const{data:t,visible:i,seriesGrouping:{groupIndex:s=this.id,stackCount:r=1}={}}=this,{xKey:o,yKey:a,yFilterKey:l,connectMissingData:c,normalizedTo:h}=this.properties,d=!this.ctx.animationManager.isSkipped(),u=this.axes.x?.scale,p=this.axes.y?.scale,{xScaleType:g,yScaleType:f}=this.getScaleInformation({xScale:u,yScale:p}),m={value:`area-stack-${s}-yValue`,values:`area-stack-${s}-yValues`,stack:`area-stack-${s}-yValue-stack`,marker:`area-stack-${s}-yValues-marker`},v=[];(0,n.vM)(h)&&v.push(rd(Object.values(m),h)),d&&v.push(cd());const y={invalidValue:null};((0,n.vM)(h)||c)&&r>1&&(y.invalidValue=0),i||(y.forceValue=0),await this.requestDataModel(e,t,{props:[jh(o,g,{id:"xValue"}),Kh(a,f,{id:"yValueRaw",...y}),...null!=l?[Kh(l,f,{id:"yFilterRaw"})]:[],...ed(a,f,{id:"yValueStack",...y,groupId:m.stack}),Kh(a,f,{id:"yValue",...y,groupId:m.value}),...Jh(a,"window","current",{id:"yValueEnd",...y,groupId:m.values},f),...Jh(a,"normal","current",{id:"yValueCumulative",...y,groupId:m.marker},f),...v],groupByKeys:!0,groupByData:!1}),this.animationState.transition("updateData")}xCoordinateRange(e,t){const{marker:i}=this.properties,n=this.axes.x.scale.convert(e),s=i.enabled?.5*i.size*t:0;return[n-s,n+s]}yCoordinateRange(e,t){const{marker:i}=this.properties,n=this.axes.y.scale.convert(e[0]),s=i.enabled?.5*i.size*t:0;return[n-s,n+s]}getSeriesDomain(e){const{processedData:t,dataModel:i,axes:n}=this;if(!t||!i)return[];const s=n.y;if("x"===e){const e=i.resolveProcessedDataDefById(this,"xValue"),n=i.getDomain(this,"xValue","key",t);return"key"===e?.def.type&&"category"===e.def.valueType?n:Oo(Dh(n))}const r=this.domainForClippedRange("y",["yValueCumulative"],"xValue",!0);return Oo(s instanceof zd||s instanceof Wd?r:Number.isFinite(r[1]-r[0])?[r[0]>0?0:r[0],r[1]<0?0:r[1]]:[])}getSeriesRange(e,t){const[i,n]=this.domainForVisibleRange("y",["yValueCumulative"],"xValue",t,!0);return[Math.min(i,0),Math.max(n,0)]}getVisibleItems(e,t,i){return this.countVisibleItems("xValue",["yValueCumulative"],e,t,i)}createNodeData(){const{axes:e,data:t,processedData:i,dataModel:s}=this,r=e.x,o=e.y;if(!(r&&o&&t&&s&&"grouped"===i?.type))return;const{yKey:a,xKey:l,yFilterKey:c,marker:h,label:d,fill:u,stroke:p,connectMissingData:g,interpolation:f}=this.properties,{scale:m}=r,{scale:v}=o,{isContinuousY:y}=this.getScaleInformation({xScale:m,yScale:v}),C=(m.bandwidth??0)/2,b=s.resolveKeysById(this,"xValue",i),S=s.resolveColumnById(this,"yValueEnd",i),w=s.resolveColumnById(this,"yValueRaw",i),x=s.resolveColumnById(this,"yValueCumulative",i),E=null!=c?s.resolveColumnById(this,"yFilterRaw",i):void 0,M=s.resolveColumnById(this,"yValueStack",i),A=(e,t,i)=>{let s;return((0,n.vM)(this.properties.normalizedTo)?y&&nl(i):!isNaN(i))&&(s=t),{x:m.convert(e)+C,y:v.convert(s),size:h.size}},T=[],D=[],{visibleSameStackCount:I}=this.ctx.seriesStateManager.getVisiblePeerGroupIndex(this);let R=!1;const{dataSources:L}=i,k=L.get(this.id)??[];for(const{datumIndex:e}of s.forEachGroupDatum(this,i)){const t=b[e];if(null==t)return;const i=k[e],n=w[e],s=x[e],r=S[e],o=Number.isFinite(n),c=A(t,+s,n),g=null!=E?E[e]===n:void 0;if(!1===g&&(R=!0),o&&h&&D.push({series:this,itemId:a,datum:i,datumIndex:e,midPoint:{x:c.x,y:c.y},cumulativeValue:r,yValue:n,xValue:t,yKey:a,xKey:l,point:c,fill:h.fill??u,stroke:h.stroke??p,strokeWidth:h.strokeWidth??this.getStrokeWidth(this.properties.strokeWidth),selected:g}),o&&d){const t=this.getLabelText(d,{value:n,datum:i,xKey:l,yKey:a,xName:this.properties.xName,yName:this.properties.yName});T.push({series:this,itemId:a,datum:i,datumIndex:e,x:c.x,y:c.y,labelText:t})}}const P=(e,t)=>({point:{x:m.convert(e)+C,y:v.convert(t)},xDatum:e,yDatum:t}),N=e=>{const t=[];for(const{datumIndexes:[n,r,o]}of s.forEachGroupDatumTuple(this,i)){const i=b[r],s=M[r],a=s[e],l=Number.isFinite(a);if(g&&!l)continue;const c=null!=n?M[n]:void 0,h=null!=o?M[o]:void 0;let d=0,u=0;for(let t=0;t<=e;t+=1){const e=s[t];Number.isFinite(e)&&((null==c||Number.isFinite(c[t]))&&(d+=e),(null==h||Number.isFinite(h[t]))&&(u+=e))}const p=t[t.length-1];if(g||d===u&&l){const e=g?a:Math.max(d,u),n=P(i,e);Array.isArray(p)?p.push(n):null!=p?(p.skip+=1,t.push([n])):t.push([n])}else if(!l&&Array.isArray(p)&&1===p.length)t[t.length-1]={skip:1};else{const e=P(i,d),n=P(i,u);Array.isArray(p)?p.push(e):null!=p&&(p.skip+=1),t.push(l?[n]:{skip:0})}}return(e=>e.flatMap(e=>Array.isArray(e)?Tg(e,f):new Array(e.skip).fill(null)))(t)},O=this.seriesGrouping?.stackIndex??0,_=()=>Tg(Array.from(s.forEachGroupDatum(this,i),({datumIndex:e})=>{const t=b[e],i=M[e][O];if(!g||Number.isFinite(i))return P(t,0)}).filter(e=>null!=e),f),F=N(O),G=F.map(()=>null);for(let e=O-1;e>=-1;e-=1){let t;for(let i=0;i<G.length;i+=1)null==G[i]&&(t??(t=-1!==e?N(e):_()),G[i]=t[i])}const V=F.map((e,t)=>e??G[t]),B=F.filter(e=>null!=e);return{itemId:a,fillData:{itemId:a,spans:V,phantomSpans:G},strokeData:{itemId:a,spans:B},labelData:T,nodeData:D,scales:this.calculateScaling(),visible:this.visible,stackVisible:I>0,crossFiltering:R}}isPathOrSelectionDirty(){return this.properties.marker.isDirty()}updatePathNodes(e){const{opacity:t,visible:i,animationEnabled:n}=e,[s,r]=e.paths,o=!0===this.contextNodeData?.crossFiltering,a=this.getStrokeWidth(this.properties.strokeWidth);r.setProperties({fill:void 0,lineCap:"round",lineJoin:"round",pointerEvents:1,stroke:this.properties.stroke,strokeWidth:a,strokeOpacity:this.properties.strokeOpacity*(o?.25:1),lineDash:this.properties.lineDash,lineDashOffset:this.properties.lineDashOffset,opacity:t,visible:i||n}),fc(s,{fill:uc(this.properties.fill,this.properties.fillGradientDefaults,this.properties.fillPatternDefaults,this.properties.fillImageDefaults),stroke:void 0,fillOpacity:this.properties.fillOpacity*(o?.125:1)},void 0,this.getShapeFillBBox()),s.setProperties({lineJoin:"round",pointerEvents:1,fillShadow:this.properties.shadow,opacity:t,visible:i||n}),$g(this,r),$g(this,s)}updatePaths(e){this.updateAreaPaths(e.paths,e.contextData)}updateAreaPaths(e,t){for(const i of e)i.visible=t.visible;if(t.visible)this.updateFillPath(e,t),this.updateStrokePath(e,t);else for(const t of e)t.path.clear(),t.markDirty("AreaSeries")}updateFillPath(e,t){const[i]=e;i.path.clear(),Ng(i,t.fillData),i.markDirty("AreaSeries")}updateStrokePath(e,t){const{spans:i}=t.strokeData,[,n]=e;n.path.clear(),Ig(n,i),n.markDirty("AreaSeries")}updateMarkerSelection(e){const{nodeData:t,markerSelection:i}=e,n=this.properties.marker.enabled||!0===this.contextNodeData?.crossFiltering;return this.properties.marker.isDirty()&&(i.clear(),i.cleanup()),i.update(n?t:[])}updateMarkerNodes(e){const{markerSelection:t,isHighlight:i}=e,{xKey:n,yKey:s,marker:r,fill:o,stroke:a,strokeWidth:l,fillOpacity:c,strokeOpacity:h,highlightStyle:d}=this.properties,u=this.getSeriesDomain("x"),p=this.getSeriesDomain("y"),g=N(i&&d.item,r.getStyle(),{fill:o,stroke:a,strokeWidth:l,fillOpacity:c,strokeOpacity:h}),f=this.getShapeFillBBox();t.each((e,t)=>{this.updateMarkerStyle(r,e,t.datum,t.point,qs(t,n,s,u,p),i,g,f,{selected:t.selected})}),i||this.properties.marker.markClean()}updateLabelSelection(e){const{labelData:t,labelSelection:i}=e;return i.update(t)}updateLabelNodes(e){const{labelSelection:t}=e,{enabled:i,fontStyle:n,fontWeight:s,fontSize:r,fontFamily:o,color:a}=this.properties.label;t.each((e,t)=>{const{x:l,y:c,labelText:h}=t;h&&i&&this.visible?(e.fontStyle=n,e.fontWeight=s,e.fontSize=r,e.fontFamily=o,e.textAlign="center",e.textBaseline="bottom",e.text=h,e.x=l,e.y=c-10,e.fill=a,e.visible=!0):e.visible=!1})}getTooltipContent(e){const{id:t,dataModel:i,processedData:n,axes:s,properties:r}=this,{xKey:o,xName:a,yKey:l,yName:c,tooltip:h,marker:d}=r,u=s.x,p=s.y;if(!(i&&n&&u&&p))return;const g=n.dataSources.get(this.id)?.[e],f=i.resolveKeysById(this,"xValue",n)[e],m=i.resolveColumnById(this,"yValueRaw",n)[e],{xDomain:v,yDomain:y}=this.cachedDatumCallback("domain",()=>({xDomain:this.getSeriesDomain("x"),yDomain:this.getSeriesDomain("y")}));if(null==f)return;const C=d.getStyle(),b={datum:g,xValue:f,yValue:m},S=this.getMarkerStyle(d,g,qs(b,o,l,v,y),!1,void 0,C);return this.formatTooltipWithContext(h,{heading:u.formatDatum(f),symbol:this.legendItemSymbol(),data:[{label:c,fallbackLabel:l,value:p.formatDatum(m)}]},{seriesId:t,datum:g,title:c,xKey:o,xName:a,yKey:l,yName:c,...S,...this.getModuleTooltipParams()})}legendItemSymbol(){const{fill:e,stroke:t,fillOpacity:i,strokeOpacity:n,strokeWidth:s,lineDash:r,marker:o,fillGradientDefaults:a,fillPatternDefaults:l,fillImageDefaults:c}=this.properties,h=!o.enabled||void 0===o.fill,d=h?uc(e,a,l,c):uc(o.fill,o.fillGradientDefaults,o.fillPatternDefaults,o.fillImageDefaults);return{marker:{...this.getMarkerStyle(o,void 0,void 0,!1,void 0,{fill:d,fillOpacity:h?i:o.fillOpacity}),enabled:o.enabled||s<=0},line:{stroke:t,strokeOpacity:n,strokeWidth:s,lineDash:r}}}getLegendData(e){if("category"!==e)return[];const{id:t,ctx:{legendManager:i},visible:n}=this,{yKey:s,yName:r,legendItemName:o,showInLegend:a}=this.properties;return[{legendType:e,id:t,itemId:s,seriesId:t,enabled:n&&i.getItemEnabled({seriesId:t,itemId:s}),label:{text:o??r??s},symbol:this.legendItemSymbol(),legendItemName:o,hideInLegend:!a}]}animateEmptyUpdateReady(e){const{markerSelection:t,labelSelection:i,contextData:n,paths:s}=e,{animationManager:r}=this.ctx;this.updateAreaPaths(s,n),Wg(this,r,...s),da([t],zg),Bg(this,r,t),yp(this,"labels",r,i)}animateReadyResize(e){const{contextData:t,paths:i}=e;this.updateAreaPaths(i,t),super.animateReadyResize(e)}animateWaitingUpdateReady(e){const{animationManager:t}=this.ctx,{markerSelection:i,labelSelection:n,contextData:s,paths:r,previousContextData:o}=e,[a,l]=r;if(null==a&&null==l)return;this.resetMarkerAnimation(e),this.resetLabelAnimation(e);const c=()=>{this.resetPathAnimation(e),this.updateAreaPaths(r,s)},h=()=>{t.skipCurrentBatch(),c()};if(null==s||null==o)return c(),Gg(this,t,"added",i),jg(this,"fill_path_properties",t,"add",a),jg(this,"stroke_path_properties",t,"add",l),void yp(this,"labels",t,n);if(s.crossFiltering!==o.crossFiltering)return void h();const d=Fg(s,o);void 0!==d?"no-op"!==d.status&&(Gg(this,t,void 0,i),aa(this.id,"fill_path_properties",t,[a],d.fill.pathProperties),vp(this.id,"fill_path_update",t,[a],d.fill.path),aa(this.id,"stroke_path_properties",t,[l],d.stroke.pathProperties),vp(this.id,"stroke_path_update",t,[l],d.stroke.path),yp(this,"labels",t,n),this.ctx.animationManager.animate({id:this.id,groupId:"reset_after_animation",phase:"trailing",from:{},to:{},onComplete:()=>this.updateAreaPaths(r,s)})):h()}isLabelEnabled(){return this.properties.label.enabled}nodeFactory(){return new At}getFormattedMarkerStyle(e){const{xKey:t,yKey:i}=e,n=this.getSeriesDomain("x"),s=this.getSeriesDomain("y");return this.getMarkerStyle(this.properties.marker,e.datum,qs(e,t,i,n,s),!0)}computeFocusBounds(e){return Ug(this,e)}};Yg.className="AreaSeries",Yg.type="area";var qg=(0,n.KC)("millisecond","second","minute","hour","day","month","year"),Xg=(0,n.W$)(n.t$,"a valid number format string"),Zg={enabled:n.zM,text:n.Yj,padding:n.ai,...n.LV},Qg=(0,n.W$)({enabled:n.zM,type:(0,n.mw)((0,n.KC)("line","range")),range:(0,n.Uo)((0,n.W$)((e,{options:t})=>"range"===t.type,"crossLine type to be 'range'"),(0,n.jk)(n.sw),(0,n.O9)(2,2)),value:(0,n.Uo)((0,n.W$)((e,{options:t})=>"line"===t.type,"crossLine type to be 'line'"),n.sw),label:Zg,fill:n.Yj,fillOpacity:n.CG,...n.AF,...n.mL},"cross-line options"),Jg={...Qg,label:{...Zg,position:(0,n.KC)("top","left","right","bottom","top-left","top-right","bottom-left","bottom-right","inside","inside-left","inside-right","inside-top","inside-bottom","inside-top-left","inside-bottom-left","inside-top-right","inside-bottom-right"),rotation:n.ai}},ef={enabled:n.zM,rotation:n.ai,avoidCollisions:n.zM,minSpacing:n.Ly,spacing:n.Ly,formatter:n.E2,itemStyler:(0,n.YI)({...n.LV,spacing:n.ai}),...n.LV},tf={autoRotate:n.zM,autoRotateAngle:n.ai,...ef},nf={format:Xg,...tf},sf={format:(0,n.or)(n.Yj,n.Ik),...tf},rf={enabled:n.zM,width:n.Ly,size:n.Ly,stroke:n.yW},of={enabled:n.zM,label:sf,tick:rf},af={reverse:n.zM,gridLine:{enabled:n.zM,width:n.Ly,style:(0,n.J$)({stroke:(0,n.or)(n.yW,n.I_),lineDash:(0,n.jk)(n.Ly)},"a grid-line style object array")},interval:{values:(0,n.jk)(n.sw),minSpacing:n.Ly},label:ef,line:{enabled:n.zM,width:n.Ly,stroke:n.yW},tick:rf};af.context=(0,n._L)(()=>!0),af.layoutConstraints=(0,n._L)({stacked:(0,n.mw)(n.zM),align:(0,n.mw)((0,n.KC)("start","end")),unit:(0,n.mw)((0,n.KC)("percent","px")),width:(0,n.mw)(n.Ly)});var lf={...af,keys:(0,n.jk)(n.Yj),crossLines:(0,n.J$)(Jg,"a cross-line options array"),position:(0,n.KC)("top","right","bottom","left"),thickness:n.Ly,title:{enabled:n.zM,text:n.Yj,spacing:n.Ly,formatter:n.E2,...n.LV}};function cf(e){const t={enabled:n.zM,xOffset:n.ai,yOffset:n.ai,renderer:(0,n.R3)((0,n.or)(n.Yj,(0,n.fd)({text:n.Yj,color:n.yW,backgroundColor:n.yW,opacity:n.CG},"crosshair label renderer result object")))};return e&&(t.format=n.Yj),{enabled:n.zM,snap:n.zM,label:t,...n.AF,...n.mL}}function hf(e,t){return{min:(0,n.Uo)(e,(0,n.Xe)("max")),max:(0,n.Uo)(e,(0,n.MM)("min")),nice:n.zM,interval:{step:t?(0,n.or)(n.MX,qg,(0,n.hR)(Cr)):n.MX,values:(0,n.jk)(e),minSpacing:(0,n.Uo)(n.Ly,(0,n.Xe)("maxSpacing")),maxSpacing:(0,n.Uo)(n.Ly,(0,n.MM)("minSpacing"))}}}lf.title._enabledFromTheme=(0,n._L)(n.zM);var df=(0,n.or)((0,n.KC)("circle","cross","diamond","heart","plus","pin","square","star","triangle"),n.E2),uf=(0,n.KC)("never","always","hyphenate","on-space"),pf=(0,n.KC)("top","right","bottom","left","top-right","bottom-right","bottom-left","top-left","center"),gf=(0,n.KC)("pointer","node","top","right","bottom","left","top-left","top-right","bottom-left","bottom-right"),ff=(0,n.or)(n.Ly,(0,n.KC)("exact","nearest")),mf=(0,n.KC)("pointer","start","middle","end"),vf={enabled:n.zM,text:n.Yj,textAlign:(0,n.KC)("left","center","right"),wrapping:(0,n.KC)("never","always","hyphenate","on-space"),spacing:n.Ly,maxWidth:n.Ly,maxHeight:n.Ly,...n.LV};vf.padding=(0,n._L)(n.Ly);var yf={enabled:n.zM,text:n.Yj,renderer:(0,n.R3)((0,n.or)(n.Yj,n.Sc))},Cf=["defaults","download","zoom-to-cursor","pan-to-cursor","toggle-series-visibility","toggle-other-series","separator"],bf={type:(0,n.KC)("action","separator"),showOn:(0,n.KC)("always","series-area","series-node","legend-item"),label:(0,n.mw)(n.Yj),enabled:n.zM,action:n.E2,items:(e,t)=>xf(e,t)};bf.iconUrl=(0,n._L)(n.Yj);var Sf=(0,n.fd)(bf),wf=(0,n.W$)((e,t)=>{let i;return"string"==typeof e?Cf.includes(e)?i=!0:(i={valid:!1,invalid:[],cleared:null},i.invalid.push(new n.yI(n.By.Invalid,`a context menu item string alias: ["${Cf.join('", "')}"]`,e,t.path))):i=Sf(e,t),i},`a context menu item object or string alias: [${Cf.join(", ")}]`),xf=(0,n.jk)(wf,"a menu items array",!1),Ef=(0,n.J$)({label:(0,n.mw)(n.Yj),action:(0,n.mw)(n.E2)},"a context menu actions array"),Mf={label:n.Yj,ariaLabel:n.Yj,tooltip:n.Yj,icon:(0,n.KC)("align-center","align-left","align-right","arrow-drawing","arrow-down-drawing","arrow-up-drawing","callout-annotation","candlestick-series","close","comment-annotation","date-range-drawing","date-price-range-drawing","delete","disjoint-channel-drawing","drag-handle","fill-color","line-style-solid","line-style-dashed","line-style-dotted","high-low-series","hlc-series","hollow-candlestick-series","horizontal-line-drawing","line-color","line-series","line-with-markers-series","locked","measurer-drawing","note-annotation","ohlc-series","pan-end","pan-left","pan-right","pan-start","parallel-channel-drawing","position-bottom","position-center","position-top","price-label-annotation","price-range-drawing","reset","settings","step-line-series","text-annotation","trend-line-drawing","fibonacci-retracement-drawing","fibonacci-retracement-trend-based-drawing","unlocked","vertical-line-drawing","zoom-in","zoom-out")},Af={width:n.Ly,height:n.Ly,minWidth:n.Ly,minHeight:n.Ly,suppressFieldDotNotation:n.zM,title:vf,subtitle:vf,footnote:vf,padding:{top:n.Ly,right:n.Ly,bottom:n.Ly,left:n.Ly},seriesArea:{clip:n.zM,padding:{top:n.Ly,right:n.Ly,bottom:n.Ly,left:n.Ly}},legend:{enabled:n.zM,position:(0,n.KC)("top","right","bottom","left"),orientation:(0,n.KC)("horizontal","vertical"),maxWidth:n.Ly,maxHeight:n.Ly,spacing:n.Ly,preventHidingAll:n.zM,reverseOrder:n.zM,toggleSeries:n.zM,item:{marker:{size:n.Ly,shape:df,padding:n.Ly,strokeWidth:n.Ly},line:{length:n.Ly,strokeWidth:n.Ly},label:{maxLength:n.Ly,formatter:n.E2,...n.LV},maxWidth:n.Ly,paddingX:n.Ly,paddingY:n.Ly,showSeriesStroke:n.zM},pagination:{marker:{size:n.Ly,shape:df,padding:n.Ly},activeStyle:{...n.Fu,...n.AF},inactiveStyle:{...n.Fu,...n.AF},highlightStyle:{...n.Fu,...n.AF},label:n.LV},listeners:{legendItemClick:n.E2,legendItemDoubleClick:n.E2}},gradientLegend:{enabled:n.zM,position:(0,n.KC)("top","right","bottom","left"),spacing:n.Ly,reverseOrder:n.zM,gradient:{preferredLength:n.Ly,thickness:n.Ly},scale:{label:{...n.LV,format:Xg,formatter:n.E2},padding:n.Ly,interval:{step:n.ai,values:n.YO,minSpacing:(0,n.Uo)(n.Ly,(0,n.Xe)("maxSpacing")),maxSpacing:(0,n.Uo)(n.Ly,(0,n.MM)("minSpacing"))}}},listeners:{seriesNodeClick:n.E2,seriesNodeDoubleClick:n.E2,seriesVisibilityChange:n.E2,click:n.E2,doubleClick:n.E2,annotations:n.E2,zoom:n.E2},loadGoogleFonts:n.zM,highlight:{range:(0,n.KC)("tooltip","node")},overlays:{loading:yf,noData:yf,noVisibleSeries:yf,unsupportedBrowser:yf},tooltip:{enabled:n.zM,showArrow:n.zM,pagination:n.zM,delay:n.Ly,range:ff,wrapping:uf,mode:(0,n.KC)("single","shared","compact"),position:{type:gf,anchorTo:(0,n.KC)("pointer","node","chart"),placement:(0,n.or)(pf,(0,n.jk)(pf)),xOffset:n.ai,yOffset:n.ai}},animation:{enabled:n.zM,duration:n.Ly},contextMenu:{enabled:n.zM,items:xf,extraActions:Ef,extraSeriesAreaActions:Ef,extraNodeActions:Ef,extraLegendItemActions:Ef},dataSource:{getData:n.E2},keyboard:{enabled:n.zM,tabIndex:n.ai},touch:{dragAction:(0,n.KC)("none","drag","hover")},ranges:{enabled:n.zM,buttons:(0,n.J$)({...Mf,value:(0,n.or)(n.ai,(0,n.Uo)((0,n.jk)((0,n.or)(n.ai,n.p6)),(0,n.O9)(2,2)),n.E2)},"range button options array")},locale:{localeText:n.Ik,getLocaleText:(0,n.R3)(n.Yj)},background:{visible:n.zM,fill:n.yW,image:{url:(0,n.mw)(n.Yj),top:n.ai,right:n.ai,bottom:n.ai,left:n.ai,width:n.Ly,height:n.Ly,opacity:n.CG}},styleNonce:n.Yj,sync:{enabled:n.zM,groupId:n.Yj,axes:(0,n.KC)("x","y","xy"),nodeInteraction:n.zM,zoom:n.zM},zoom:{enabled:n.zM,enableAxisDragging:n.zM,enableDoubleClickToReset:n.zM,enablePanning:n.zM,enableScrolling:n.zM,enableSelecting:n.zM,enableTwoFingerZoom:n.zM,keepAspectRatio:n.zM,anchorPointX:mf,anchorPointY:mf,axes:(0,n.KC)("x","y","xy"),deceleration:(0,n.or)((0,n.KC)("off","short","long"),n.CG),minVisibleItems:n.Ly,minVisibleItemsX:n.Ly,minVisibleItemsY:n.Ly,panKey:(0,n.KC)("alt","ctrl","meta","shift"),scrollingStep:n.CG,autoScaling:{enabled:n.zM,padding:n.CG},buttons:{enabled:n.zM,buttons:(0,n.J$)({...Mf,value:(0,n.KC)("reset","zoom-in","zoom-out","pan-left","pan-right","pan-start","pan-end"),section:n.Yj},"zoom button options array"),visible:(0,n.KC)("always","zoomed","hover")}}};Af.dataSource.requestThrottle=(0,n._L)(n.Ly),Af.dataSource.updateThrottle=(0,n._L)(n.Ly),Af.dataSource.updateDuringInteraction=(0,n._L)(n.zM),Af.zoom.enableIndependentAxes=(0,n._L)(n.zM),Af.statusBar=(0,n._L)(n.sw),Af.foreground=(0,n._L)({visible:n.zM,text:n.Yj,image:{url:n.Yj,top:n.ai,right:n.ai,bottom:n.ai,left:n.ai,width:n.Ly,height:n.Ly,opacity:n.CG},...n.Fu}),Af.context=(0,n._L)(()=>!0),Af.overrideDevicePixelRatio=(0,n._L)(n.ai),Af.sync.domainMode=(0,n._L)((0,n.KC)("direction","position","key"));var Tf={cursor:n.Yj,showInLegend:n.zM,nodeClickRange:ff,listeners:{nodeClick:n.E2,nodeDoubleClick:n.E2},highlightStyle:{item:{...n.Fu,...n.AF},series:{enabled:n.zM,dimOpacity:n.CG,strokeWidth:n.Ly}}},Df={...Tf,id:n.Yj,visible:n.zM,data:n.YO};Df.context=(0,n._L)(()=>!0),Df.seriesGrouping=(0,n._L)(n.sw),Df.highlight=(0,n._L)({enabled:n.zM});var If={enabled:n.zM,shape:df,size:n.Ly,itemStyler:(0,n.YI)({...n.Fu,...n.AF,...n.mL,shape:df,size:n.Ly}),...n.Fu,...n.AF,...n.mL},Rf={enabled:n.zM,formatter:n.E2,...n.LV},Lf={...Rf,lineHeight:n.Ly,minimumFontSize:n.Ly,wrapping:uf,overflowStrategy:(0,n.KC)("ellipsis","hide")},kf={visible:n.zM,cap:{visible:n.zM,length:n.Ly,lengthRatio:n.CG,...n.AF,...n.mL},...n.AF,...n.mL},Pf={...kf,xLowerKey:n.Yj,xUpperKey:n.Yj,yLowerKey:n.Yj,yUpperKey:n.Yj,xLowerName:n.Yj,xUpperName:n.Yj,yLowerName:n.Yj,yUpperName:n.Yj,itemStyler:(0,n.YI)({visible:n.zM,...n.AF,...n.mL,cap:{visible:n.zM,length:n.Ly,lengthRatio:n.CG,...n.AF,...n.mL}})},Nf={enabled:n.zM,showArrow:n.zM,range:ff,renderer:(0,n.R3)((0,n.or)(n.Yj,(0,n.fd)({heading:n.Yj,title:n.Yj,data:(0,n.J$)({label:(0,n.mw)(n.Yj),value:(0,n.mw)(n.Yj)})},"tooltip renderer result object"))),position:{type:gf,anchorTo:(0,n.KC)("node","pointer","chart"),placement:(0,n.or)(pf,(0,n.jk)(pf)),xOffset:n.ai,yOffset:n.ai},interaction:{enabled:n.zM}};Nf.position._seriesOverrideType=(0,n._L)(gf);var Of={enabled:n.zM,xOffset:n.ai,yOffset:n.ai,blur:n.Ly,color:n.yW},_f=(0,n.is)({linear:{},smooth:{tension:n.CG},step:{position:(0,n.KC)("start","middle","end")}},"interpolation line options"),Ff={showInMiniChart:n.zM,connectMissingData:n.zM,interpolation:_f,label:Rf,marker:If,tooltip:Nf,shadow:Of,...Tf,...n.Fu,...n.AF,...n.mL},Gf={...Ff,...Df,type:(0,n.mw)((0,n.dY)("area")),xKey:(0,n.mw)(n.Yj),yKey:(0,n.mw)(n.Yj),xName:n.Yj,yName:n.Yj,stacked:n.zM,stackGroup:n.Yj,normalizedTo:n.ai},Vf={type:"series",optionsKey:"series[]",packageType:"community",chartTypes:["cartesian"],identifier:"area",moduleFactory:e=>new Yg(e),stackable:!0,tooltipDefaults:{range:"nearest"},defaultAxes:[{type:"number",position:"left"},{type:"category",position:"bottom"}],themeTemplate:{series:{nodeClickRange:"nearest",tooltip:{position:{_seriesOverrideType:"node"}},fill:{$palette:"fill"},fillGradientDefaults:{type:"gradient",gradient:"linear",bounds:"item",colorStops:{$palette:"gradient"},rotation:0,reverse:!1},fillPatternDefaults:gp,fillImageDefaults:fp,stroke:{$palette:"stroke"},fillOpacity:.8,strokeOpacity:1,strokeWidth:0,lineDash:[0],lineDashOffset:0,shadow:{enabled:!1,color:Ru,xOffset:3,yOffset:3,blur:5},interpolation:{type:"linear"},marker:{enabled:!1,shape:"circle",size:7,strokeWidth:0,fill:{$palette:"fill"},stroke:{$palette:"stroke"},fillGradientDefaults:{type:"gradient",gradient:"radial",bounds:"item",colorStops:{$palette:"gradient"},rotation:0,reverse:!0},fillPatternDefaults:gp},label:{enabled:!1,fontSize:{$ref:"fontSize"},fontFamily:{$ref:"fontFamily"},fontWeight:{$ref:"fontWeight"},color:{$ref:"textColor"}}}}},Bf={type:"series",name:"area",chartType:"cartesian",options:Gf,create:e=>new Yg(e)};function Hf(e,t){for(const i of t){const t=i.datum;void 0===t?n.Vy.error("undefined datum"):e.addValue(i,t)}}function zf(e,t){const{x:i,y:n}=t,{nearest:s,distanceSquared:r}=e.getQuadTree().find(i,n);if(void 0!==s)return{datum:s.value,distance:Math.sqrt(r)}}var Uf=class extends Up{constructor(){super(...arguments),this.direction="vertical"}};a([Te],Uf.prototype,"direction",2);var Wf=class extends jp{constructor(){super(...arguments),this.groupScale=new wh,this.smallestDataInterval=void 0,this.largestDataInterval=void 0}padBandExtent(e,t){const i="boolean"==typeof t?1:.5,s=(0,n.Bf)(this.smallestDataInterval)?this.smallestDataInterval*i:0,r=Dh(e)??[NaN,NaN];return"boolean"==typeof t?r[t?0:1]-=(t?1:-1)*s:(r[0]-=s,r[1]+=s),Oo(r)}getBandScalePadding(){return{inner:.3,outer:.15}}shouldFlipXY(){return!this.isVertical()}isVertical(){return"vertical"===this.properties.direction}getBarDirection(){return this.shouldFlipXY()?"x":"y"}getCategoryDirection(){return this.shouldFlipXY()?"y":"x"}getValueAxis(){const e=this.getBarDirection();return this.axes[e]}getCategoryAxis(){const e=this.getCategoryDirection();return this.axes[e]}getBandwidth(e,t){return cr.is(e.scale)?e.scale.calcBandwidth(this.smallestDataInterval,t):e.scale.bandwidth}xCoordinateRange(e){const t=this.axes[this.getCategoryDirection()],i=t.scale,n=this.getBandwidth(t,0)??0,s=cr.is(i)?-.5*n:0,r=i.convert(e)+s;return[r,r+n]}yCoordinateRange(e){const t=this.axes[this.getBarDirection()].scale,i=e.map(e=>t.convert(e));if(1===i.length){const e=t.convert(0);return[Math.min(i[0],e),Math.max(i[0],e)]}return[Math.min(...i),Math.max(...i)]}updateGroupScale(e){const t=[],{groupScale:i}=this,n=this.getBandwidth(e),{index:s,visibleGroupCount:r}=this.ctx.seriesStateManager.getVisiblePeerGroupIndex(this);for(let e=0;e<r;e++)t.push(String(e));return i.domain=t,i.range=[0,n??0],e instanceof kd?i.paddingInner=e.groupPaddingInner:e instanceof Ah?(i.paddingInner=e.groupPaddingInner,i.round=0!==i.padding):i.padding=0,{barWidth:i.bandwidth>=1?i.bandwidth:i.rawBandwidth,groupIndex:s}}resolveKeyDirection(e){return"x"===this.getBarDirection()?"x"===e?"y":"x":e}initQuadTree(e){Hf(e,this.datumNodesIter())}pickNodeClosestDatum(e){return zf(this,e)}},jf=class extends pl{constructor(){super(...arguments),this.placement="inside-center",this.padding=0}};a([Te],jf.prototype,"placement",2),a([Te],jf.prototype,"padding",2);var Kf=class extends Uf{constructor(){super(...arguments),this.fill="#c16068",this.fillGradientDefaults=new Tp,this.fillPatternDefaults=new Dp,this.fillImageDefaults=new Ip,this.fillOpacity=1,this.stroke="#874349",this.strokeWidth=1,this.strokeOpacity=1,this.lineDash=[0],this.lineDashOffset=0,this.cornerRadius=0,this.crisp=void 0,this.shadow=new wp,this.label=new jf,this.tooltip=new Np,this.sparklineMode=!1,this.fastDataProcessing=!1}};function $f(e,t,i,n){if(null!=t){const[e,i]=t;if(0!==e||1!==i)return!1}if(cr.is(e)){const t=e.calcBandwidth(n)-e.calcBandwidth(i);if(t>0&&t<1)return!1}return!0}a([Te],Kf.prototype,"xKey",2),a([Te],Kf.prototype,"xName",2),a([Te],Kf.prototype,"yKey",2),a([Te],Kf.prototype,"yName",2),a([Te],Kf.prototype,"yFilterKey",2),a([Te],Kf.prototype,"stackGroup",2),a([Te],Kf.prototype,"normalizedTo",2),a([Te],Kf.prototype,"fill",2),a([Te],Kf.prototype,"fillGradientDefaults",2),a([Te],Kf.prototype,"fillPatternDefaults",2),a([Te],Kf.prototype,"fillImageDefaults",2),a([Te],Kf.prototype,"fillOpacity",2),a([Te],Kf.prototype,"stroke",2),a([Te],Kf.prototype,"strokeWidth",2),a([Te],Kf.prototype,"strokeOpacity",2),a([Te],Kf.prototype,"lineDash",2),a([Te],Kf.prototype,"lineDashOffset",2),a([Te],Kf.prototype,"cornerRadius",2),a([Te],Kf.prototype,"crisp",2),a([Te],Kf.prototype,"itemStyler",2),a([Te],Kf.prototype,"shadow",2),a([Te],Kf.prototype,"label",2),a([Te],Kf.prototype,"tooltip",2),a([Te],Kf.prototype,"sparklineMode",2),a([Te],Kf.prototype,"fastDataProcessing",2);var Yf=e=>(0,n.cI)(e.yValue??0);function qf(e,t,i){const{startingX:n,startingY:s}=function(e,t){const i=t[e?"y":"x"];let n=1/0,s=0;return i?(e?s=i.scale.convert(cr.is(i.scale)?0:Math.max(...i.range)):n=i.scale.convert(cr.is(i.scale)?0:Math.min(...i.range)),{startingX:n,startingY:s}):{startingX:n,startingY:s}}(e,t);return{isVertical:e,calculate:(t,i)=>{let r=e?t.x:n,o=e?s:t.y,a=e?t.width:0,l=e?0:t.height;const{opacity:c=1}=t;let h;return i&&(isNaN(r)||isNaN(o))&&(({x:r,y:o}=i),a=e?i.width:0,l=e?0:i.height,e&&!Yf(i)?o+=i.height:!e&&Yf(i)&&(r+=i.width)),h=null==t.clipBBox?void 0:Yf(t)?e?new m(r,o-l,a,l):new m(r-a,o,a,l):new m(r,o,a,l),{x:r,y:o,width:a,height:l,clipBBox:h,opacity:c}},mode:i}}function Xf(e,t){return{isVertical:e,calculate:t=>({x:e?t.x:t.x+t.width/2,y:e?t.y+t.height/2:t.y,width:e?t.width:0,height:e?0:t.height,clipBBox:t.clipBBox,opacity:t.opacity??1}),mode:t}}function Zf(e){const t=e=>null==e||isNaN(e.x)||isNaN(e.y);return{toFn:(i,n,s)=>"removed"===s&&null==i.datum&&"fade"===e.mode?{...Qf(i,n),opacity:0}:"removed"===s||t(n)?e.calculate(n,i.previousDatum):{x:n.x,y:n.y,width:n.width,height:n.height,clipBBox:n.clipBBox,opacity:n.opacity??1},fromFn:(i,n,s)=>{let r;"updated"===s&&t(n)?s="removed":"updated"===s&&t(i.previousDatum)&&(s="added"),r="added"===s&&null==i.previousDatum&&"fade"===e.mode?{...Qf(i,n),opacity:0}:"unknown"===s||"added"===s?e.calculate(n,i.previousDatum):{x:i.x,y:i.y,width:i.width,height:i.height,clipBBox:i.clipBBox,opacity:i.opacity??1};const o=oa[s];return{...r,phase:o}},applyFn:(e,t,i)=>{e.setProperties(t),e.crisp="end"===i&&(e.datum?.crisp??!1)}}}function Qf(e,{x:t,y:i,width:n,height:s,clipBBox:r,opacity:o=1}){return{x:t,y:i,width:n,height:s,clipBBox:r,opacity:o,crisp:e.datum?.crisp??!1}}function Jf(e,t){if(void 0===t)return;const{x:i,y:n,width:s,height:r}=t;return wt.toCanvas(e.contentGroup,new m(i,n,s,r))}function em(e,t,i,n,s,r){let o=r?.reduced?.diff?.[e];if(o?.changed)return o;const a=function(e,t){if(!t)return!1;const i=e.scales,n=t.scales;if(!Mg(i.x,n.x))return!0;if(!Mg(i.y,n.y))return!0;if(!tm(e)||!tm(t))return!1;return!Mg(e.groupScale,t.groupScale)}(n,s);return null==o&&null!=r?.reduced?.diff?(o={changed:!0,added:new Set,updated:new Set,removed:new Set,moved:new Set},a?o.updated=new Set(Array.from(t,({datum:e})=>i(e))):o.added=new Set(Array.from(t,({datum:e})=>i(e)))):a&&(o={changed:!0,added:new Set,updated:new Set(Array.from(t,({datum:e})=>i(e))),removed:new Set,moved:new Set}),o}function tm(e){return"object"==typeof e&&null!==e&&"groupScale"in e}function im(e,t,i){if(t.enabled&&i){const{x:n,y:s,text:r,textAlign:o,textBaseline:a}=i,{color:l,fontStyle:c,fontWeight:h,fontSize:d,fontFamily:u}=t;e.setProperties({visible:!0,x:n,y:s,text:r,fill:l,fontStyle:c,fontWeight:h,fontSize:d,fontFamily:u,textAlign:o,textBaseline:a})}else e.visible=!1}var nm={"inside-start":{inside:!0,direction:-1,textAlignment:1},"inside-end":{inside:!0,direction:1,textAlignment:-1},"outside-start":{inside:!1,direction:-1,textAlignment:-1},"outside-end":{inside:!1,direction:1,textAlignment:1}};function sm({isUpward:e,isVertical:t,placement:i,padding:n=0,rect:s}){let r=s.x+s.width/2,o=s.y+s.height/2,a="center",l="middle";if("inside-center"!==i){const c=(e?1:-1)*(t?-1:1),{direction:h,textAlignment:d}=nm[i],u=.5*(h+1);t?(o=(e?s.y+s.height:s.y)+s.height*c*u+n*d*c,l=d===c?"top":"bottom"):(r=(e?s.x:s.x+s.width)+s.width*c*u+n*d*c,a=d===c?"left":"right")}return{x:r,y:o,textAlign:a,textBaseline:l}}var rm=class extends Wf{constructor(e){super({moduleCtx:e,directionKeys:Bp,directionNames:Hp,categoryKey:"xValue",pickModes:[2,1,0],pathsPerSeries:[],hasHighlightedLabels:!0,datumSelectionGarbageCollection:!1,animationAlwaysUpdateSelections:!0,animationResetFns:{datum:Qf,label:bp}}),this.properties=new Kf,this.connectsToYAxis=!0,this.dataAggregationFilters=void 0}get pickModeAxis(){return this.properties.sparklineMode?"main":void 0}crossFilteringEnabled(){return null!=this.properties.yFilterKey&&(null==this.seriesGrouping||0===this.seriesGrouping.stackIndex)}async processData(e){if(!this.data)return;const{xKey:t,yKey:i,yFilterKey:s,normalizedTo:r,fastDataProcessing:o}=this.properties,{seriesGrouping:{groupIndex:a=this.id}={},data:l}=this,c=this.seriesGrouping?.groupCount??0,h=(this.seriesGrouping?.stackCount??0)>=1||null!=r,d=!o||c>1||h,u=!this.ctx.animationManager.isSkipped(),p=this.getCategoryAxis()?.scale,g=this.getValueAxis()?.scale,{isContinuousX:f,xScaleType:m,yScaleType:v}=this.getScaleInformation({xScale:p,yScale:g}),y=`bar-stack-${a}-yValues`,C=`${y}-trailing`,b=this.visible?{}:{forceValue:0},S=[jh(t,m,{id:"xValue"}),Kh(i,v,{id:"yValue-raw",invalidValue:null,...b})];this.crossFilteringEnabled()&&S.push(Kh(s,v,{id:"yFilterValue",invalidValue:null,...b})),h&&S.push(...Jh(i,"normal","current",{id:"yValue-end",rangeId:"yValue-range",invalidValue:null,missingValue:0,groupId:y,separateNegative:!0,...b},v),...Jh(i,"trailing","current",{id:"yValue-start",invalidValue:null,missingValue:0,groupId:C,separateNegative:!0,...b},v)),f&&S.push(td,id),(0,n.Bf)(r)&&S.push(rd([y,C],Math.abs(r))),u&&this.processedData&&S.push(vd(this.id,this.processedData)),!u&&d||S.push(cd());const{dataModel:w,processedData:x}=await this.requestDataModel(e,l,{props:S,groupByKeys:d,groupByData:!d});this.dataAggregationFilters=this.aggregateData(w,x),this.smallestDataInterval=x.reduced?.smallestKeyInterval,this.largestDataInterval=x.reduced?.largestKeyInterval,this.animationState.transition("updateData")}getSeriesDomain(e){const{processedData:t,dataModel:i}=this;if(null==i||null==t)return[];if(e===this.getCategoryDirection()){const e=i.resolveProcessedDataDefById(this,"xValue"),n=i.getDomain(this,"xValue","key",t);return"key"===e?.def.type&&"category"===e.def.valueType?n:this.padBandExtent(n)}const n=this.dataModel?.hasColumnById(this,"yValue-end")?"yValue-end":"yValue-raw";let s=this.domainForClippedRange(e,[n],"xValue",!0);const r=this.crossFilteringEnabled()?i.getDomain(this,"yFilterValue","value",t):void 0;return null!=r&&(s=[Math.min(s[0],r[0]),Math.max(s[1],r[1])]),this.getValueAxis()instanceof zd?Oo(s):Oo(Number.isFinite(s[1]-s[0])?[Math.min(0,s[0]),Math.max(0,s[1])]:[])}getSeriesRange(e,t){const i=this.dataModel?.hasColumnById(this,"yValue-end")?"yValue-end":"yValue-raw",[n,s]=this.domainForVisibleRange("y",[i],"xValue",t,!0);return[Math.min(n,0),Math.max(s,0)]}getVisibleItems(e,t,i){const n=this.dataModel?.hasColumnById(this,"yValue-end")?"yValue-end":"yValue-raw";return this.countVisibleItems("xValue",[n],e,t,i)}aggregateData(e,t){}createNodeData(){const{dataModel:e,processedData:t,groupScale:i,dataAggregationFilters:n}=this,s=this.getCategoryAxis(),r=this.getValueAxis();if(!(e&&t&&s&&r))return;const o=t.dataSources?.get(this.id);if(null==o)return;const a=s.scale,l=r.scale,{xKey:c,yKey:h,xName:d,yName:u,legendItemName:p,label:g}=this.properties,f=r.isReversed(),{barWidth:v,groupIndex:y}=this.updateGroupScale(s),C=i.convert(String(y)),b=cr.is(a)?-.5*v:0,S=e.resolveKeysById(this,"xValue",t),w=e.resolveColumnById(this,"yValue-raw",t),x=this.crossFilteringEnabled()?e.resolveColumnById(this,"yFilterValue",t):void 0,E=!this.ctx.animationManager.isSkipped(),M=e=>a.convert(S[e])+C+b,A=this.properties.crisp??$f(s?.scale,s?.visibleRange,this.smallestDataInterval,this.largestDataInterval),T=l.convert(0),D=({datum:e,datumIndex:t,valueIndex:i,xValue:n,yValue:s,cumulativeValue:r,phantom:o,currY:a,prevY:d,x:u,width:p,isPositive:v,yRange:y,labelText:C,opacity:b,crossScale:S=1})=>{const w=v!==f,x=l.convert(a),E=l.convert(d),M=l.convert(y),D="x"===this.getBarDirection(),I=.5*p*(1-S),R={x:D?Math.min(x,E):u+I,y:D?u+I:Math.min(x,E),width:D?Math.abs(E-x):p*S,height:D?p*S:Math.abs(E-x)},L=new m(R.x,R.y,R.width,R.height),k={x:D?Math.min(T,M):u+I,y:D?u+I:Math.min(T,M),width:D?Math.abs(T-M):p*S,height:D?p*S:Math.abs(T-M)},P=this.shouldFlipXY()?R.height:R.width;return{series:this,itemId:o?yd(h,o):h,datum:e,datumIndex:t,valueIndex:i,cumulativeValue:r,phantom:o,xValue:n,yValue:s,yKey:h,xKey:c,capDefaults:{lengthRatioMultiplier:P,lengthMax:P},x:k.x,y:k.y,width:k.width,height:k.height,midPoint:{x:R.x+R.width/2,y:R.y+R.height/2},opacity:b,topLeftCornerRadius:D!==w,topRightCornerRadius:w,bottomRightCornerRadius:D===w,bottomLeftCornerRadius:!w,clipBBox:L,crisp:A,label:null!=C?{text:C,...sm({isUpward:w,isVertical:!D,placement:g.placement,padding:g.padding,rect:R})}:void 0,missing:null==s,focusable:!o}},I=[],R=[],L=[],k=(e,t,i,n,s,r,a,l)=>{const g=S[e];if(null==g)return;const f=w[e],m=null!=x?Number(x[e]):void 0,v=f>=0&&!Object.is(f,-0);if(!Number.isFinite(r))return;if(null!=m&&!Number.isFinite(m))return;const y=null!=f?this.getLabelText(this.properties.label,{datum:o[e],value:m??f,xKey:c,yKey:h,xName:d,yName:u,legendItemName:p}):void 0,C=null!=m&&m>f,b=D({datum:o[e],datumIndex:e,valueIndex:t,xValue:g,yValue:m??f,cumulativeValue:m??r,phantom:!1,currY:null!=m?s+m:r,prevY:s,x:i,width:n,isPositive:v,yRange:Math.max(s+(m??-1/0),a),labelText:y,opacity:l,crossScale:C?.6:void 0});if(R.push(b),L.push(b),null!=m){const c=D({datum:o[e],datumIndex:e,valueIndex:t,xValue:g,yValue:m,cumulativeValue:m,phantom:!0,currY:r,prevY:s,x:i,width:n,isPositive:v,yRange:a,labelText:void 0,opacity:l,crossScale:void 0});I.push(c)}},[P,N]=a.range,O=N-P,_=n?.find(e=>e.maxRange>O);if("grouped"===t.type){const i=v,n=e.hasColumnById(this,"yValue-start"),s=n?e.resolveColumnById(this,"yValue-start",t):void 0,r=n?e.resolveColumnById(this,"yValue-end",t):void 0,o=n?e.resolveProcessedDataIndexById(this,"yValue-range"):-1;for(const{datumIndex:a,valueIndex:l,group:{aggregation:c}}of e.forEachGroupDatum(this,t)){const e=M(a),t=w[a],h=t>=0&&!Object.is(t,-0),d=n?Number(s?.[a]):0,u=n?Number(r?.[a]):t;let p=u;n&&(p=c[o][h?1:0]),k(a,l,e,i,d,u,p,1)}}else if(null==_){const e=v;let[i,n]=this.visibleRange("xValue",s.range);t.input.count<1e3&&(i=0,n=t.input.count);for(let t=i;t<n;t+=1){const i=M(t),n=Number(w[t]);k(t,0,i,e,0,n,n,1)}}else{const{indexData:e,indices:t}=_,[i,n]=this.visibleRange("xValue",s.range,t);for(let t=i;t<n;t+=1){const i=4*t,n=e[i+0],s=e[i+1],r=e[i+2],o=e[i+3];if(-1===n)continue;const a=M((n+s)/2|0),l=Math.abs(M(s)-M(n))+v,c=null!=S[o]?Number(w[o]):NaN,h=null!=S[r]?Number(w[r]):NaN;c>0&&k(o,0,a,l,0,c,c,h>=0?h/c:1),h<0&&k(r,1,a,l,0,h,h,c<=0?c/h:1)}}return{itemId:h,nodeData:I.length>0?[...I,...R]:R,labelData:L,scales:this.calculateScaling(),visible:this.visible||E,groupScale:this.getScaling(this.groupScale)}}nodeFactory(){return new Zd}getHighlightData(e,t){const i=e.find(e=>e.datum===t.datum&&!e.phantom);return null!=i?[i]:void 0}updateDatumSelection(e){return e.datumSelection.update(e.nodeData,void 0,e=>this.getDatumId(e))}getItemBaseStyle(e){const{properties:t}=this,{cornerRadius:i,fillGradientDefaults:n,fillPatternDefaults:s,fillImageDefaults:r}=t,o=e?t.highlightStyle.item:void 0;return pc({fill:o?.fill??t.fill,fillOpacity:o?.fillOpacity??t.fillOpacity,stroke:o?.stroke??t.stroke,strokeWidth:o?.strokeWidth??this.getStrokeWidth(t.strokeWidth),strokeOpacity:o?.strokeOpacity??t.strokeOpacity,lineDash:o?.lineDash??t.lineDash??[],lineDashOffset:o?.lineDashOffset??t.lineDashOffset,cornerRadius:i},n,s,r)}getItemStyleOverrides(e,t,i,n,s,r){const{id:o,properties:a}=this,{xKey:l,yKey:c,itemStyler:h,fillGradientDefaults:d,fillPatternDefaults:u,fillImageDefaults:p}=a;if(null==h)return;const{xDomain:g,yDomain:f}=this.cachedDatumCallback("domain",()=>({xDomain:this.getSeriesDomain("x"),yDomain:this.getSeriesDomain("y")}));return pc(this.cachedDatumCallback(yd(e,r?"highlight":"node"),()=>this.callWithContext(h,{seriesId:o,...qs(t,l,c,g,f),datum:t,xValue:i,yValue:n,highlighted:r,...s})),d,u,p)}updateDatumNodes(e){const{shadow:t}=this.properties,i="x"===this.getCategoryDirection(),n=this.getItemBaseStyle(e.isHighlight),s=this.getShapeFillBBox();e.datumSelection.each((r,o)=>{const a=this.getItemStyleOverrides(String(o.datumIndex),o.datum,o.xValue,o.yValue,n,e.isHighlight);r.opacity=o.opacity??0,fc(r,n,a,s);const l=a?.cornerRadius??n.cornerRadius;r.topLeftCornerRadius=o.topLeftCornerRadius?l:0,r.topRightCornerRadius=o.topRightCornerRadius?l:0,r.bottomRightCornerRadius=o.bottomRightCornerRadius?l:0,r.bottomLeftCornerRadius=o.bottomLeftCornerRadius?l:0,r.visible=i?(o.clipBBox?.width??o.width)>0:(o.clipBBox?.height??o.height)>0,r.crisp=o.crisp,r.fillShadow=t})}updateLabelSelection(e){const t=this.isLabelEnabled()?e.labelData:[];return e.labelSelection.update(t,e=>{e.pointerEvents=1})}updateLabelNodes(e){e.labelSelection.each((e,t)=>{im(e,this.properties.label,t.label)})}getTooltipContent(e){const{id:t,dataModel:i,processedData:n,properties:s}=this,{xKey:r,xName:o,yKey:a,yName:l,legendItemName:c,stackGroup:h,tooltip:d}=s,u=this.getCategoryAxis(),p=this.getValueAxis();if(!(i&&n&&u&&p))return;const g=n.dataSources.get(this.id)?.[e],f=i.resolveKeysById(this,"xValue",n)[e],m=i.resolveColumnById(this,"yValue-raw",n)[e];if(null==f)return;const v=this.getItemBaseStyle(!1);return Object.assign(v,this.getItemStyleOverrides(String(e),g,f,m,v,!1)),this.formatTooltipWithContext(d,{heading:u.formatDatum(f),symbol:this.legendItemSymbol(),data:[{label:l,fallbackLabel:a,value:p.formatDatum(m)}]},{seriesId:t,datum:g,title:l,xKey:r,xName:o,yKey:a,yName:l,legendItemName:c,stackGroup:h,...v,...this.getModuleTooltipParams()})}legendItemSymbol(){const{fill:e,stroke:t,strokeWidth:i,fillOpacity:n,strokeOpacity:s,lineDash:r,lineDashOffset:o,fillGradientDefaults:a,fillPatternDefaults:l,fillImageDefaults:c}=this.properties;return{marker:pc({fill:e??"rgba(0, 0, 0, 0)",stroke:t??"rgba(0, 0, 0, 0)",fillOpacity:n,strokeOpacity:s,strokeWidth:i,lineDash:r,lineDashOffset:o},a,l,c)}}getLegendData(e){const{showInLegend:t}=this.properties;if("category"!==e)return[];const{id:i,ctx:{legendManager:n},visible:s}=this,{yKey:r,yName:o,legendItemName:a}=this.properties;return[{legendType:"category",id:i,itemId:r,seriesId:i,enabled:s&&n.getItemEnabled({seriesId:i,itemId:r}),label:{text:a??o??r},symbol:this.legendItemSymbol(),legendItemName:a,hideInLegend:!t}]}animateEmptyUpdateReady({datumSelection:e,labelSelection:t,annotationSelections:i}){const n=Zf(qf(this.isVertical(),this.axes,"normal"));aa(this.id,"nodes",this.ctx.animationManager,[e],n),yp(this,"labels",this.ctx.animationManager,t),yp(this,"annotations",this.ctx.animationManager,...i)}animateWaitingUpdateReady(e){const{datumSelection:t,labelSelection:i,annotationSelections:n,contextData:s,previousContextData:r}=e;this.ctx.animationManager.stopByAnimationGroupId(this.id);const o=em(this.id,t,this.getDatumId.bind(this),e.contextData,r,this.processedData),a=null==r?"fade":"normal",l=Zf(qf(this.isVertical(),this.axes,a));aa(this.id,"nodes",this.ctx.animationManager,[t],l,(e,t)=>this.getDatumId(t),o),!o?.changed&&Mg(s.groupScale,r?.groupScale)||(yp(this,"labels",this.ctx.animationManager,i),yp(this,"annotations",this.ctx.animationManager,...n))}getDatumId(e){return yd(e.xValue,e.valueIndex,e.phantom)}isLabelEnabled(){return this.properties.label.enabled}computeFocusBounds({datumIndex:e}){const t=this.contextNodeData?.nodeData[e].clipBBox;return Jf(this,t)}};rm.className="BarSeries",rm.type="bar";var om={direction:(0,n.KC)("horizontal","vertical"),showInMiniChart:n.zM,cornerRadius:n.Ly,itemStyler:(0,n.YI)({...n.Fu,...n.AF,...n.mL,cornerRadius:n.Ly}),crisp:n.zM,label:{...Rf,placement:(0,n.KC)("inside-center","inside-start","inside-end","outside-start","outside-end"),padding:n.Ly},errorBar:kf,shadow:Of,tooltip:Nf,...Tf,...n.Fu,...n.AF,...n.mL};om.sparklineMode=(0,n._L)(n.zM);var am={...om,...Df,type:(0,n.mw)((0,n.dY)("bar")),xKey:(0,n.mw)(n.Yj),yKey:(0,n.mw)(n.Yj),xName:n.Yj,yName:n.Yj,direction:(0,n.KC)("horizontal","vertical"),grouped:n.zM,stacked:n.zM,stackGroup:n.Yj,normalizedTo:n.ai,legendItemName:n.Yj,errorBar:Pf};am.pickOutsideVisibleMinorAxis=(0,n._L)(n.zM),am.fastDataProcessing=(0,n._L)(n.zM),am.focusPriority=(0,n._L)(n.ai);var lm={type:"series",optionsKey:"series[]",packageType:"community",chartTypes:["cartesian"],identifier:"bar",moduleFactory:e=>new rm(e),stackable:!0,groupable:!0,tooltipDefaults:{range:"exact"},defaultAxes:cp,themeTemplate:{series:{direction:"vertical",fill:{$palette:"fill"},stroke:{$palette:"stroke"},fillGradientDefaults:{type:"gradient",gradient:"linear",bounds:"item",colorStops:{$palette:"gradient"},rotation:0,reverse:!1},fillPatternDefaults:gp,fillImageDefaults:fp,fillOpacity:1,strokeWidth:0,lineDash:[0],lineDashOffset:0,label:{enabled:!1,fontWeight:{$ref:"fontWeight"},fontSize:{$ref:"fontSize"},fontFamily:{$ref:"fontFamily"},color:{$if:[{$or:[{$eq:[{$path:"./placement"},"outside-start"]},{$eq:[{$path:"./placement"},"outside-end"]}]},{$ref:"textColor"},{$ref:"backgroundColor"}]},placement:"inside-center"},shadow:{enabled:!1,color:Ru,xOffset:3,yOffset:3,blur:5},errorBar:{cap:{lengthRatio:.3}}}}},cm={type:"series",name:"bar",chartType:"cartesian",options:am,create:e=>new rm(e)},hm=class extends kp{constructor(){super(...arguments),this.maxSize=30}};a([Te,$()],hm.prototype,"maxSize",2),a([Te,q()],hm.prototype,"domain",2);var dm=class extends pl{constructor(){super(...arguments),this.placement="top"}};a([Te],dm.prototype,"placement",2);var um=class extends Up{constructor(){super(...arguments),this.label=new dm,this.tooltip=new Np,this.marker=new hm}};a([Te],um.prototype,"xKey",2),a([Te],um.prototype,"yKey",2),a([Te],um.prototype,"sizeKey",2),a([Te],um.prototype,"labelKey",2),a([Te],um.prototype,"xFilterKey",2),a([Te],um.prototype,"yFilterKey",2),a([Te],um.prototype,"sizeFilterKey",2),a([Te],um.prototype,"xName",2),a([Te],um.prototype,"yName",2),a([Te],um.prototype,"sizeName",2),a([Te],um.prototype,"labelName",2),a([Te],um.prototype,"title",2),a([ri("marker.shape")],um.prototype,"shape",2),a([ri("marker.size")],um.prototype,"size",2),a([ri("marker.maxSize")],um.prototype,"maxSize",2),a([ri("marker.domain")],um.prototype,"domain",2),a([ri("marker.fillGradientDefaults")],um.prototype,"fillGradientDefaults",2),a([ri("marker.fillPatternDefaults")],um.prototype,"fillPatternDefaults",2),a([ri("marker.fillImageDefaults")],um.prototype,"fillImageDefaults",2),a([ri("marker.fill")],um.prototype,"fill",2),a([ri("marker.fillOpacity")],um.prototype,"fillOpacity",2),a([ri("marker.stroke")],um.prototype,"stroke",2),a([ri("marker.strokeWidth")],um.prototype,"strokeWidth",2),a([ri("marker.strokeOpacity")],um.prototype,"strokeOpacity",2),a([ri("marker.lineDash")],um.prototype,"lineDash",2),a([ri("marker.lineDashOffset")],um.prototype,"lineDashOffset",2),a([ri("marker.itemStyler")],um.prototype,"itemStyler",2),a([Te],um.prototype,"label",2),a([Te],um.prototype,"tooltip",2);var pm=class extends zp{constructor(e,t,i,n){super(e,t,i,n),this.sizeKey=n.properties.sizeKey}},gm=class extends jp{constructor(e){super({moduleCtx:e,directionKeys:Bp,directionNames:Hp,categoryKey:void 0,pickModes:[2,1,0],pathsPerSeries:[],hasMarkers:!0,markerSelectionGarbageCollection:!1,animationResetFns:{label:bp,marker:Hg},usesPlacedLabels:!0,clipFocusBox:!1}),this.NodeEvent=pm,this.properties=new um,this.sizeScale=new Bd}get pickModeAxis(){return"main-category"}async processData(e){if(null==this.data||!this.visible)return;const t=this.axes.x?.scale,i=this.axes.y?.scale,{xScaleType:n,yScaleType:s}=this.getScaleInformation({xScale:t,yScale:i}),r=this.sizeScale.type,{xKey:o,yKey:a,sizeKey:l,xFilterKey:c,yFilterKey:h,sizeFilterKey:d,labelKey:u,marker:p}=this.properties,{dataModel:g,processedData:f}=await this.requestDataModel(e,this.data,{props:[Kh(o,n,{id:"xValue"}),Kh(a,s,{id:"yValue"}),...null!=c?[Kh(c,n,{id:"xFilterValue"})]:[],...null!=h?[Kh(h,s,{id:"yFilterValue"})]:[],...null!=d?[Kh(d,r,{id:"sizeFilterValue"})]:[],Kh(l,r,{id:"sizeValue"}),...u?[Kh(u,"band",{id:"labelValue"})]:[]]}),m=g.resolveProcessedDataIndexById(this,"sizeValue"),v=p.domain?[p.domain[0],p.domain[1]]:void 0;this.sizeScale.domain=v??f.domain.values[m]??[],this.animationState.transition("updateData")}xCoordinateRange(e,t,i){const{properties:n,sizeScale:s}=this,{size:r,sizeKey:o}=n,a=this.axes.x.scale.convert(e),l=null!=o?this.dataModel.resolveColumnById(this,"sizeValue",this.processedData):void 0,c=.5*(null!=l?s.convert(l[i]):r)*t;return[a-c,a+c]}yCoordinateRange(e,t,i){const{properties:n,sizeScale:s}=this,{size:r,sizeKey:o}=n,a=this.axes.y.scale.convert(e[0]),l=null!=o?this.dataModel.resolveColumnById(this,"sizeValue",this.processedData):void 0,c=.5*(null!=l?s.convert(l[i]):r)*t;return[a-c,a+c]}getSeriesDomain(e){const{dataModel:t,processedData:i}=this;if(!i||!t)return[];const n={x:"xValue",y:"yValue"},s=n[e],r=t.resolveProcessedDataDefById(this,s),o=t.getDomain(this,s,"value",i);if("value"===r?.def.type&&"category"===r?.def.valueType)return o;const a=n["x"===e?"y":"x"];return Oo(Dh(this.domainForClippedRange(e,[s],a,!1)))}getSeriesRange(e,t){return this.domainForVisibleRange("y",["yValue"],"xValue",t,!1)}getVisibleItems(e,t,i){return this.countVisibleItems("xValue",["yValue"],e,t,i)}createNodeData(){const{axes:e,dataModel:t,processedData:i,sizeScale:n,visible:s}=this,{xKey:r,yKey:o,sizeKey:a,xFilterKey:l,yFilterKey:c,sizeFilterKey:h,labelKey:d,xName:u,yName:p,sizeName:g,labelName:f,label:m,marker:v}=this.properties,{placement:y}=m,C=Oc.anchor(v.shape),b=e.x,S=e.y;if(!(t&&i&&s&&b&&S))return;const w=t.resolveColumnById(this,"xValue",i),x=t.resolveColumnById(this,"yValue",i),E=null!=a?t.resolveColumnById(this,"sizeValue",i):void 0,M=null!=d?t.resolveColumnById(this,"labelValue",i):void 0,A=null!=l?t.resolveColumnById(this,"xFilterValue",i):void 0,T=null!=c?t.resolveColumnById(this,"yFilterValue",i):void 0,D=null!=h?t.resolveColumnById(this,"sizeFilterValue",i):void 0,I=b.scale,R=S.scale,L=(I.bandwidth??0)/2,k=(R.bandwidth??0)/2,P=[];n.range=[v.size,v.maxSize];const N=m.getFont(),O=Di.getMeasurer({font:N});return i.dataSources.get(this.id)?.forEach((e,t)=>{const i=w[t],s=x[t],l=E?.[t],c=I.convert(i)+L,h=R.convert(s)+k;let b;null!=A&&null!=T&&(b=A[t]===i&&T[t]===s,null!=D&&b&&(b=D[t]===l));const S=this.getLabelText(m,{value:null!=M?M[t]:s,datum:e,xKey:r,yKey:o,sizeKey:a,labelKey:d,xName:u,yName:p,sizeName:g,labelName:f}),N=O.measureText(String(S)),_=null!=l?n.convert(l):v.size;P.push({series:this,itemId:o,yKey:o,xKey:r,datum:e,datumIndex:t,xValue:i,yValue:s,sizeValue:l,point:{x:c,y:h,size:_},midPoint:{x:c,y:h},label:{text:S,...N},anchor:C,placement:y,selected:b})}),{itemId:o,nodeData:P,labelData:P,scales:this.calculateScaling(),visible:this.visible}}isPathOrSelectionDirty(){return this.properties.marker.isDirty()}getLabelData(){return this.isLabelEnabled()?this.contextNodeData?.labelData??[]:[]}updateMarkerSelection(e){const{nodeData:t,markerSelection:i}=e;this.properties.marker.isDirty()&&(i.clear(),i.cleanup());const n=this.properties.marker.enabled?t:[];return i.update(n,void 0,e=>yd([e.xValue,e.yValue,e.sizeValue,e.label.text]))}updateMarkerNodes(e){const{markerSelection:t,isHighlight:i}=e,{xKey:n,yKey:s,sizeKey:r,labelKey:o,marker:a}=this.properties,l=N(i&&this.properties.highlightStyle.item,a.getStyle());this.sizeScale.range=[a.size,a.maxSize];const c=this.getShapeFillBBox();t.each((e,t)=>{this.updateMarkerStyle(a,e,t.datum,t.point,{xKey:n,yKey:s,sizeKey:r,labelKey:o},i,l,c,{selected:t.selected})}),i||this.properties.marker.markClean()}updatePlacedLabelData(e){this.labelSelection.update(e.map(e=>({...e.datum,point:{x:e.x,y:e.y,size:e.datum.point.size}})),e=>{e.pointerEvents=1}),this.updateLabelNodes({labelSelection:this.labelSelection})}updateLabelNodes(e){const{label:t}=this.properties;e.labelSelection.each((e,i)=>{e.text=i.label.text,e.fill=t.color,e.x=i.point?.x??0,e.y=i.point?.y??0,e.fontStyle=t.fontStyle,e.fontWeight=t.fontWeight,e.fontSize=t.fontSize,e.fontFamily=t.fontFamily,e.textAlign="left",e.textBaseline="top"})}getTooltipContent(e){const{id:t,dataModel:i,processedData:n,axes:s,properties:r}=this,{xKey:o,xName:a,yKey:l,yName:c,sizeKey:h,sizeName:d,labelKey:u,labelName:p,title:g,tooltip:f,marker:m}=r,v=s.x,y=s.y;if(!(i&&n&&v&&y))return;const C=n.dataSources.get(this.id)?.[e],b=i.resolveColumnById(this,"xValue",n)[e],S=i.resolveColumnById(this,"yValue",n)[e],w=this.contextNodeData?.nodeData[e];if(null==b||null==w)return;const x=[{label:a,fallbackLabel:o,value:v.formatDatum(b)},{label:c,fallbackLabel:l,value:y.formatDatum(S)}];if(null!=h){const t=i.resolveColumnById(this,"sizeValue",n)[e];x.push({label:d,fallbackLabel:h,value:String(t)})}const E=m.getStyle(),M=this.getMarkerStyle(m,C,{xKey:o,yKey:l,sizeKey:h,labelKey:u,highlighted:!0},!1,void 0,E);return this.formatTooltipWithContext(f,{title:g,symbol:this.legendItemSymbol(),data:x},{seriesId:t,datum:C,title:l,xKey:o,xName:a,yKey:l,yName:c,sizeKey:h,sizeName:d,labelKey:u,labelName:p,...M,...this.getModuleTooltipParams()})}legendItemSymbol(){return{marker:this.getMarkerStyle(this.properties.marker)}}getLegendData(){const{id:e,ctx:{legendManager:t},visible:i}=this,{yKey:n,yName:s,title:r}=this.properties;return[{legendType:"category",id:e,itemId:n,seriesId:e,enabled:i&&t.getItemEnabled({seriesId:e,itemId:n}),label:{text:r??s??n},symbol:this.legendItemSymbol()}]}animateEmptyUpdateReady({markerSelection:e,labelSelection:t}){Vg(this,this.ctx.animationManager,e),yp(this,"labels",this.ctx.animationManager,t)}isLabelEnabled(){return this.properties.label.enabled}nodeFactory(){return new At}getFormattedMarkerStyle(e){const{xKey:t,yKey:i,sizeKey:n,labelKey:s,marker:r}=this.properties;return this.getMarkerStyle(r,e,{xKey:t,yKey:i,sizeKey:n,labelKey:s},!1,e.point.size)}computeFocusBounds(e){return Ug(this,e)}};gm.className="BubbleSeries",gm.type="bubble";var fm={title:n.Yj,domain:(0,n.jk)(n.ai),maxSize:n.Ly,showInMiniChart:n.zM,label:{placement:(0,n.KC)("top","right","bottom","left"),...Rf},tooltip:Nf,...Tf,...G(If,["enabled"])},mm={...fm,...Df,type:(0,n.mw)((0,n.dY)("bubble")),xKey:(0,n.mw)(n.Yj),yKey:(0,n.mw)(n.Yj),sizeKey:(0,n.mw)(n.Yj),labelKey:n.Yj,xName:n.Yj,yName:n.Yj,sizeName:n.Yj,labelName:n.Yj},vm={type:"series",optionsKey:"series[]",packageType:"community",chartTypes:["cartesian"],identifier:"bubble",moduleFactory:e=>new gm(e),tooltipDefaults:{range:"nearest"},defaultAxes:[{type:"number",position:"bottom"},{type:"number",position:"left"}],themeTemplate:{series:{shape:"circle",size:7,maxSize:30,fill:{$palette:"fill"},stroke:{$palette:"stroke"},fillGradientDefaults:{type:"gradient",gradient:"radial",bounds:"item",colorStops:{$palette:"gradient"},rotation:0,reverse:!0},fillPatternDefaults:gp,fillImageDefaults:fp,fillOpacity:.8,tooltip:{position:{_seriesOverrideType:"node"}},label:{enabled:!1,fontSize:{$ref:"fontSize"},fontFamily:{$ref:"fontFamily"},fontWeight:{$ref:"fontWeight"},color:{$ref:"textColor"}}}}},ym={type:"series",name:"bubble",chartType:"cartesian",options:mm,create:e=>new gm(e)},Cm=class extends Up{constructor(){super(...arguments),this.fillGradientDefaults=new Tp,this.fillPatternDefaults=new Dp,this.fillImageDefaults=new Ip,this.fillOpacity=1,this.strokeWidth=1,this.strokeOpacity=1,this.lineDash=[0],this.lineDashOffset=0,this.cornerRadius=0,this.areaPlot=!1,this.aggregation="sum",this.shadow=new wp,this.label=new pl,this.tooltip=new Np}};a([Te],Cm.prototype,"xKey",2),a([Te],Cm.prototype,"yKey",2),a([Te],Cm.prototype,"xName",2),a([Te],Cm.prototype,"yName",2),a([Te],Cm.prototype,"fill",2),a([Te],Cm.prototype,"fillGradientDefaults",2),a([Te],Cm.prototype,"fillPatternDefaults",2),a([Te],Cm.prototype,"fillImageDefaults",2),a([Te],Cm.prototype,"fillOpacity",2),a([Te],Cm.prototype,"stroke",2),a([Te],Cm.prototype,"strokeWidth",2),a([Te],Cm.prototype,"strokeOpacity",2),a([Te],Cm.prototype,"lineDash",2),a([Te],Cm.prototype,"lineDashOffset",2),a([Te],Cm.prototype,"cornerRadius",2),a([Te],Cm.prototype,"areaPlot",2),a([Te],Cm.prototype,"bins",2),a([Te],Cm.prototype,"aggregation",2),a([Te],Cm.prototype,"binCount",2),a([Te],Cm.prototype,"shadow",2),a([Te],Cm.prototype,"label",2),a([Te],Cm.prototype,"tooltip",2);var bm=class extends jp{constructor(e){super({moduleCtx:e,directionKeys:Bp,directionNames:Hp,categoryKey:void 0,pickModes:[1,0],datumSelectionGarbageCollection:!1,animationResetFns:{datum:Qf,label:bp}}),this.properties=new Cm,this.calculatedBins=[]}deriveBins(e){const t=Va(e[0],e[1],10).ticks,i=Ua(e[0],e[1],10),[n]=t;return[[n-i,n],...t.map(e=>[e,e+i])]}calculateNiceBins(e,t){const i=Math.floor(e[0]),n=e[1],s=t||1,{start:r,binSize:o}=this.calculateNiceStart(i,n,s);return this.getBins(r,n,o,s)}getBins(e,t,i,n){const s=[],r=this.calculatePrecision(i);for(let o=0;o<n;o++){const a=Math.round((e+o*i)*r)/r;let l=Math.round((e+(o+1)*i)*r)/r;o===n-1&&(l=Math.max(l,t)),s[o]=[a,l]}return s}calculatePrecision(e){let t=10;if(isFinite(e)&&e>0)for(;e<1;)t*=10,e*=10;return t}calculateNiceStart(e,t,i){const n=Math.abs(t-e)/i,s=Math.floor(Math.log10(n)),r=Math.pow(10,s);return{start:Math.floor(e/r)*r,binSize:n}}async processData(e){this.visible||(this.processedData=void 0,this.animationState.transition("updateData"));const{xKey:t,yKey:i,areaPlot:s,aggregation:r}=this.properties,o=this.axes.x?.scale,a=this.axes.y?.scale,{xScaleType:l,yScaleType:c}=this.getScaleInformation({yScale:a,xScale:o}),h=[jh(t,l),nd];if(i){let e=_h("groupAgg");"count"===r||("sum"===r?e=Oh("groupAgg"):"mean"===r&&(e=Fh("groupAgg"))),s&&(e=Gh("groupAgg",e)),h.push(Kh(i,c,{invalidValue:void 0}),e)}else{h.push($h("count"));let e=_h("groupAgg");s&&(e=Gh("groupAgg",e)),h.push(e)}!this.ctx.animationManager.isSkipped()&&this.processedData&&h.push(vd(this.id,this.processedData,!1)),await this.requestDataModel(e,this.data,{props:h,groupByFn:e=>{const t=Oo(e.domain.keys[0]);if(0===t.length)return e.domain.groups=[],()=>[];const i=(0,n.Et)(this.properties.binCount)?this.calculateNiceBins(t,this.properties.binCount):this.properties.bins??this.deriveBins(t),s=i.length;return this.calculatedBins=[...i],e=>{let t=e[0];if((0,n.$P)(t)&&(t=t.getTime()),!(0,n.Et)(t))return[];for(let e=0;e<s;e++){const n=i[e];if(t>=n[0]&&t<n[1])return n;if(e===s-1&&t<=n[1])return n}return[]}}}),this.animationState.transition("updateData")}xCoordinateRange(){return[NaN,NaN]}yCoordinateRange(){return[NaN,NaN]}getSeriesDomain(e){const{processedData:t,dataModel:i}=this;if(!t||!i||!this.calculatedBins.length)return[];const n=i.getDomain(this,"groupAgg","aggregate",t),s=this.calculatedBins?.[0][0],r=this.calculatedBins?.[(this.calculatedBins?.length??0)-1][1];return Oo("x"===e?[s,r]:n)}getSeriesRange(e,[t,i]){const{dataModel:n,processedData:s}=this;if(!n||"grouped"!==s?.type)return[NaN,NaN];const r=this.axes.x.scale;let o=-1/0;return s.groups.forEach(({keys:e,aggregation:n})=>{const[[s,a]=[0,0]]=n,[l,c]=e,[h,d]=or([r.convert(l),r.convert(c)]);if(d>=t&&h<=i){const e=s+a;o=Math.max(o,e)}}),0>o?[NaN,NaN]:[0,o]}frequency(e){return e.datumIndices.reduce((e,t)=>e+t.length,0)}createNodeData(){const{id:e,axes:t,processedData:i,dataModel:n}=this,s=t.x,r=t.y;if(!s||!r||!n)return;const{scale:o}=s,{scale:a}=r,{xKey:l,yKey:c,xName:h,yName:d}=this.properties,u=this.properties.label.formatter,p=[],g={itemId:this.properties.yKey??this.id,nodeData:p,labelData:p,scales:this.calculateScaling(),animationValid:!0,visible:this.visible};return this.visible&&null!=i&&"grouped"===i.type?(i.groups.forEach((t,s)=>{const{keys:g,aggregation:f}=t,[[m,v]=[0,0]]=f,y=this.frequency(t),C=g,[b,S]=C,w=[...n.forEachDatum(this,i,t)],x=o.convert(b),E=o.convert(S),M=m+v,A=a.convert(0),T=a.convert(M),D=Math.abs(E-x),I=Math.abs(T-A),R=Math.min(x,E),L=Math.min(A,T);let k;0!==M&&(k={x:R+D/2,y:L+I/2,text:this.cachedDatumCallback(yd(s,"label"),()=>u?.({value:M,datum:w,seriesId:e,xKey:l,yKey:c,xName:h,yName:d}))??r.formatDatum(M)});const P={x:R+D/2,y:L+I/2},N=r.isReversed();p.push({series:this,datumIndex:s,datum:w,aggregatedValue:M,frequency:y,domain:C,yKey:c,xKey:l,x:R,y:L,xValue:x,yValue:T,width:D,height:I,midPoint:P,topLeftCornerRadius:!N,topRightCornerRadius:!N,bottomRightCornerRadius:N,bottomLeftCornerRadius:N,label:k,crisp:!0})}),p.sort((e,t)=>e.x-t.x),g):g}nodeFactory(){return new Zd}updateDatumSelection(e){const{nodeData:t,datumSelection:i}=e;return i.update(t,void 0,e=>e.domain.join("_"))}getItemBaseStyle(e){const{properties:t}=this,i=e?t.highlightStyle.item:void 0;return pc({fill:i?.fill??t.fill,fillOpacity:i?.fillOpacity??t.fillOpacity,stroke:i?.stroke??t.stroke,strokeWidth:i?.strokeWidth??this.getStrokeWidth(t.strokeWidth),strokeOpacity:i?.strokeOpacity??t.strokeOpacity,lineDash:i?.lineDash??t.lineDash,lineDashOffset:i?.lineDashOffset??t.lineDashOffset,cornerRadius:t.cornerRadius},t.fillGradientDefaults,t.fillPatternDefaults,t.fillImageDefaults)}updateDatumNodes(e){const{isHighlight:t}=e,{shadow:i}=this.properties,n=this.getItemBaseStyle(t),s=this.getShapeFillBBox();e.datumSelection.each((e,t)=>{const{cornerRadius:r}=n,{topLeftCornerRadius:o,topRightCornerRadius:a,bottomRightCornerRadius:l,bottomLeftCornerRadius:c}=t;fc(e,n,void 0,s),e.topLeftCornerRadius=o?r:0,e.topRightCornerRadius=a?r:0,e.bottomRightCornerRadius=l?r:0,e.bottomLeftCornerRadius=c?r:0,e.crisp=t.crisp,e.fillShadow=i,e.visible=t.height>0})}updateLabelSelection(e){const{labelData:t,labelSelection:i}=e;return i.update(t,e=>{e.pointerEvents=1,e.textAlign="center",e.textBaseline="middle"})}updateLabelNodes(e){const{fontStyle:t,fontWeight:i,fontFamily:n,fontSize:s,color:r}=this.properties.label,o=this.isLabelEnabled();e.labelSelection.each((e,a)=>{o&&a?.label?(e.text=a.label.text,e.x=a.label.x,e.y=a.label.y,e.fontStyle=t,e.fontWeight=i,e.fontFamily=n,e.fontSize=s,e.fill=r,e.visible=!0):e.visible=!1})}initQuadTree(e){const{value:t}=this.contentGroup.children().next();t&&Hf(e,t.children())}pickNodeClosestDatum(e){return zf(this,e)}getTooltipContent(e){const{id:t,dataModel:i,processedData:n,axes:s,properties:r,ctx:{localeManager:o}}=this,{xKey:a,xName:l,yKey:c,yName:h,tooltip:d}=r,u=s.x,p=s.y;if(!i||"grouped"!==n?.type||!u||!p)return;const g=n.groups[e],{aggregation:f,keys:m}=g,[[v,y]=[0,0]]=f,C=this.frequency(g),b=m,[S,w]=b,x=v+y,E={data:[...i.forEachDatum(this,n,g)],aggregatedValue:x,frequency:C,domain:b},M=[{label:l,fallbackLabel:a,value:`${u.formatDatum(S)} - ${u.formatDatum(w)}`},{label:o.t("seriesHistogramTooltipFrequency"),value:p.formatDatum(C)}];if(null!=c){let e;switch(r.aggregation){case"sum":e=o.t("seriesHistogramTooltipSum",{yName:h??c});break;case"mean":e=o.t("seriesHistogramTooltipMean",{yName:h??c});break;case"count":e=o.t("seriesHistogramTooltipCount",{yName:h??c})}M.push({label:e,value:p.formatDatum(x)})}return this.formatTooltipWithContext(d,{symbol:this.legendItemSymbol(),data:M},{seriesId:t,datum:E,title:h,xKey:a,xName:l,yKey:c,yName:h,xRange:[S,w],frequency:C,...this.getItemBaseStyle(!1)})}legendItemSymbol(){const{fill:e,fillOpacity:t,stroke:i,strokeWidth:n,strokeOpacity:s,lineDash:r,lineDashOffset:o,fillGradientDefaults:a,fillPatternDefaults:l,fillImageDefaults:c}=this.properties;return{marker:pc({fill:e??"rgba(0, 0, 0, 0)",stroke:i??"rgba(0, 0, 0, 0)",fillOpacity:t,strokeOpacity:s,strokeWidth:n,lineDash:r,lineDashOffset:o},a,l,c)}}getLegendData(e){if("category"!==e)return[];const{id:t,ctx:{legendManager:i},visible:n}=this,{xKey:s,yName:r,showInLegend:o}=this.properties;return[{legendType:"category",id:t,itemId:s,seriesId:t,enabled:n&&i.getItemEnabled({seriesId:t,itemId:s}),label:{text:r??s??"Frequency"},symbol:this.legendItemSymbol(),hideInLegend:!o}]}animateEmptyUpdateReady({datumSelection:e,labelSelection:t}){const i=Zf(qf(!0,this.axes,"normal"));aa(this.id,"datums",this.ctx.animationManager,[e],i),yp(this,"labels",this.ctx.animationManager,t)}animateWaitingUpdateReady(e){const t=Zf(qf(!0,this.axes,"normal")),i=em(this.id,e.datumSelection,e=>yd(e.domain),e.contextData,e.previousContextData,this.processedData);aa(this.id,"datums",this.ctx.animationManager,[e.datumSelection],t,(e,t)=>yd(t.domain),i),i?.changed&&yp(this,"labels",this.ctx.animationManager,e.labelSelection)}isLabelEnabled(){return this.properties.label.enabled}computeFocusBounds({datumIndex:e}){return Jf(this,this.contextNodeData?.nodeData[e])}};bm.className="HistogramSeries",bm.type="histogram";var Sm={showInMiniChart:n.zM,cornerRadius:n.Ly,label:Rf,tooltip:Nf,shadow:Of,...Tf,...n.Fu,...n.AF,...n.mL},wm={...Sm,...Df,type:(0,n.mw)((0,n.dY)("histogram")),xKey:(0,n.mw)(n.Yj),yKey:n.Yj,xName:n.Yj,yName:n.Yj,areaPlot:n.zM,aggregation:(0,n.KC)("count","sum","mean"),bins:(0,n.jk)((0,n.jk)(n.ai)),binCount:n.Ly},xm={type:"series",optionsKey:"series[]",packageType:"community",chartTypes:["cartesian"],identifier:"histogram",moduleFactory:e=>new bm(e),tooltipDefaults:{range:"exact"},defaultAxes:[{type:"number",position:"bottom"},{type:"number",position:"left"}],themeTemplate:{series:{fill:{$palette:"fill"},stroke:{$palette:"stroke"},fillGradientDefaults:{type:"gradient",gradient:"linear",bounds:"item",colorStops:{$palette:"gradient"},rotation:0,reverse:!1},fillPatternDefaults:gp,fillImageDefaults:fp,strokeWidth:1,fillOpacity:1,strokeOpacity:1,lineDash:[0],lineDashOffset:0,label:{enabled:!1,fontSize:{$ref:"fontSize"},fontFamily:{$ref:"fontFamily"},fontWeight:{$ref:"fontWeight"},color:{$ref:"backgroundColor"}},shadow:{enabled:!1,color:Ru,xOffset:3,yOffset:3,blur:5}}}},Em={type:"series",name:"histogram",chartType:"cartesian",enterprise:!0,options:wm,create:e=>new bm(e)},Mm=class extends Up{constructor(){super(...arguments),this.stroke="#874349",this.strokeWidth=2,this.strokeOpacity=1,this.lineDash=[0],this.lineDashOffset=0,this.interpolation=new Kp,this.marker=new kp,this.label=new pl,this.tooltip=new Np,this.connectMissingData=!1,this.sparklineMode=!1}};a([Te],Mm.prototype,"xKey",2),a([Te],Mm.prototype,"yKey",2),a([Te],Mm.prototype,"xName",2),a([Te],Mm.prototype,"yName",2),a([Te],Mm.prototype,"yFilterKey",2),a([Te],Mm.prototype,"stackGroup",2),a([Te],Mm.prototype,"normalizedTo",2),a([Te],Mm.prototype,"title",2),a([Te],Mm.prototype,"stroke",2),a([Te],Mm.prototype,"strokeWidth",2),a([Te],Mm.prototype,"strokeOpacity",2),a([Te],Mm.prototype,"lineDash",2),a([Te],Mm.prototype,"lineDashOffset",2),a([Te],Mm.prototype,"interpolation",2),a([Te],Mm.prototype,"marker",2),a([Te],Mm.prototype,"label",2),a([Te],Mm.prototype,"tooltip",2),a([Te],Mm.prototype,"connectMissingData",2),a([Te],Mm.prototype,"sparklineMode",2);var Am=class extends jp{constructor(e){super({moduleCtx:e,directionKeys:Bp,directionNames:Hp,categoryKey:"xValue",hasMarkers:!0,pickModes:[2,1,0],markerSelectionGarbageCollection:!1,animationResetFns:{path:Kg({getVisible:()=>this.visible,getOpacity:()=>this.getOpacity()}),label:bp,marker:(e,t)=>({opacity:1,scalingX:1,scalingY:1,...zg(0,t)})},clipFocusBox:!1}),this.properties=new Mm,this.dataAggregationFilters=void 0}get pickModeAxis(){return this.properties.sparklineMode?"main":"main-category"}async processData(e){if(null==this.data)return;const{data:t,visible:i,seriesGrouping:{groupIndex:s=this.id,stackCount:r=0}={}}=this,{xKey:o,yKey:a,yFilterKey:l,connectMissingData:c,normalizedTo:h}=this.properties,d=!this.ctx.animationManager.isSkipped(),u=this.axes.x?.scale,p=this.axes.y?.scale,{isContinuousX:g,xScaleType:f,yScaleType:m}=this.getScaleInformation({xScale:u,yScale:p}),v=r>=1||null!=h,y={invalidValue:null};c&&v&&(y.invalidValue=0),v&&!i&&(y.forceValue=0);const C=[];if(g&&!v||C.push(jh(o,f,{id:"xKey"})),C.push(Kh(o,f,{id:"xValue"}),Kh(a,m,{id:"yValueRaw",...y,invalidValue:void 0})),null!=l&&C.push(Kh(l,m,{id:"yFilterRaw"})),v){const e=[`line-stack-${s}-yValues`,`line-stack-${s}-yValues-trailing`,`line-stack-${s}-yValues-marker`];C.push(...Jh(a,"window","current",{id:"yValueEnd",...y,groupId:e[0]},m),...Jh(a,"window-trailing","current",{id:"yValueStart",...y,groupId:e[1]},m),...Jh(a,"normal","current",{id:"yValueCumulative",...y,groupId:e[2]},m)),(0,n.vM)(h)&&C.push(rd([e[0],e[1],e[2]],h))}d&&(C.push(cd(g?["xValue"]:void 0)),this.processedData&&C.push(vd(this.id,this.processedData)));const{dataModel:b,processedData:S}=await this.requestDataModel(e,t,{props:C,groupByKeys:v,groupByData:!v});this.dataAggregationFilters=this.aggregateData(b,S),this.animationState.transition("updateData")}xCoordinateRange(e,t){const{marker:i}=this.properties,n=this.axes.x.scale.convert(e),s=i.enabled?.5*i.size*t:0;return[n-s,n+s]}yCoordinateRange(e,t){const{marker:i}=this.properties,n=this.axes.y.scale.convert(e[0]),s=i.enabled?.5*i.size*t:0;return[n-s,n+s]}getSeriesDomain(e){const{dataModel:t,processedData:i}=this;if(!t||!i)return[];if("x"===e){const e=t.resolveProcessedDataDefById(this,"xValue"),n=t.getDomain(this,"xValue","value",i);return"value"===e?.def.type&&"category"===e.def.valueType?n:Oo(Dh(n))}const n=this.dataModel?.hasColumnById(this,"yValueEnd")?"yValueEnd":"yValueRaw";return Oo(this.domainForClippedRange("y",[n],"xValue",!0))}getSeriesRange(e,t){const i=this.dataModel?.hasColumnById(this,"yValueEnd")?"yValueEnd":"yValueRaw";return this.domainForVisibleRange("y",[i],"xValue",t,!0)}getVisibleItems(e,t,i){const n=this.dataModel?.hasColumnById(this,"yValueEnd")?"yValueEnd":"yValueRaw";return this.countVisibleItems("xValue",[n],e,t,i)}aggregateData(e,t){}createNodeData(){const{dataModel:e,processedData:t,axes:i,dataAggregationFilters:n}=this,s=i.x,r=i.y;if(!(e&&t&&s&&r))return;const{xKey:o,yKey:a,yFilterKey:l,xName:c,yName:h,marker:d,label:u,connectMissingData:p,interpolation:g,legendItemName:f}=this.properties,m=this.dataModel?.hasColumnById(this,"yValueEnd"),v=s.scale,y=r.scale,C=(v.bandwidth??0)/2,b=(y.bandwidth??0)/2,S=d.enabled?d.size:0,w=t.dataSources.get(this.id)??[],x=e.resolveColumnById(this,"xValue",t),E=e.resolveColumnById(this,"yValueRaw",t),M=m?e.resolveColumnById(this,"yValueEnd",t):void 0,A=m?e.resolveColumnById(this,"yValueCumulative",t):E,T=null!=l?e.resolveColumnById(this,"yFilterRaw",t):void 0,D={lengthRatioMultiplier:this.properties.marker.getDiameter(),lengthMax:1/0},I=[];let R;const L=e=>{const t=w[e],i=x[e],n=E[e],s=M?.[e],r=T?.[e],l=(d=e,v.convert(x[d])+C);var d;const g=(e=>y.convert(A[e])+b)(e);if(!Number.isFinite(l))return;if(null!=n){const d=u.enabled?this.getLabelText(u,{value:n,datum:t,xKey:o,yKey:a,xName:c,yName:h,legendItemName:f}):void 0;I.push({series:this,datum:t,datumIndex:e,yKey:a,xKey:o,point:{x:l,y:g,size:S},midPoint:{x:l,y:g},cumulativeValue:s,yValue:n,xValue:i,capDefaults:D,labelText:d,selected:r})}if(null==R)return;const m=R[R.length-1];if(null!=n){const e={point:{x:l,y:g},xDatum:i,yDatum:n};Array.isArray(m)?m.push(e):null!=m?(m.skip+=1,R.push([e])):R.push([e])}else p||(Array.isArray(m)||null==m?R.push({skip:0}):m.skip+=1)},[k,P]=v.range,N=P-k,O=n?.find(e=>e.maxRange>N),_=O?.indices;let[F,G]=this.visibleRange("xValue",s.range,_);F=Math.max(F-1,0),G=Math.min(G+1,_?.length??x.length),t.input.count<1e3&&(F=0,G=t.input.count),null==_&&(R=[]);for(let e=F;e<G;e+=1)L(_?.[e]??e);const V=R?.flatMap(e=>Array.isArray(e)?Tg(e,g):[]),B=null!=V?{itemId:a,spans:V}:void 0,H=T?.some((e,t)=>e===E[t])??!1;return{itemId:a,nodeData:I,labelData:I,strokeData:B,scales:this.calculateScaling(),visible:this.visible,crossFiltering:H}}isPathOrSelectionDirty(){return this.properties.marker.isDirty()}updatePathNodes(e){const{paths:[t],opacity:i,visible:n,animationEnabled:s}=e,r=!0===this.contextNodeData?.crossFiltering;t.setProperties({fill:void 0,lineJoin:"round",pointerEvents:1,opacity:i,stroke:this.properties.stroke,strokeWidth:this.getStrokeWidth(this.properties.strokeWidth),strokeOpacity:this.properties.strokeOpacity*(r?.25:1),lineDash:this.properties.lineDash,lineDashOffset:this.properties.lineDashOffset}),s||(t.visible=n),$g(this,t)}getMarkerItemBaseStyle(e){const{properties:t}=this,{marker:i}=t,n=e?t.highlightStyle.item:void 0;return pc({size:i.size,shape:i.shape,fill:n?.fill??i.fill,fillOpacity:n?.fillOpacity??i.fillOpacity,stroke:n?.stroke??i.stroke,strokeWidth:n?.strokeWidth??i.strokeWidth,strokeOpacity:n?.strokeOpacity??i.strokeOpacity,lineDash:n?.lineDash??i.lineDash,lineDashOffset:n?.lineDashOffset??i.lineDashOffset},i.fillGradientDefaults,i.fillPatternDefaults,i.fillImageDefaults)}getMarkerItemStyleOverrides(e,t,i,n){const{id:s,properties:r}=this,{xKey:o,yKey:a,marker:l}=r,{itemStyler:c}=l;if(null!=c)return this.cachedDatumCallback(yd(e,n?"highlight":"node"),()=>{const e=this.getSeriesDomain("x"),r=this.getSeriesDomain("y");return this.callWithContext(c,{seriesId:s,...qs(t,o,a,e,r),datum:t,highlighted:n,...i})})}updateMarkerSelection(e){let{nodeData:t}=e;const{markerSelection:i}=e;return t=this.properties.marker.enabled||!0===this.contextNodeData?.crossFiltering?t:[],this.properties.marker.isDirty()&&(i.clear(),i.cleanup()),i.update(t,void 0,e=>yd(e.xValue))}updateMarkerNodes(e){const{markerSelection:t,isHighlight:i}=e,{xKey:n,yKey:s,stroke:r,strokeWidth:o,strokeOpacity:a,marker:l,highlightStyle:c}=this.properties,h=this.getSeriesDomain("x"),d=this.getSeriesDomain("y"),u=N(i&&c.item,l.getStyle(),{stroke:r,strokeWidth:o,strokeOpacity:a}),p=this.ctx.animationManager.isSkipped(),g=this.getShapeFillBBox();t.each((e,t)=>{this.updateMarkerStyle(l,e,t.datum,t.point,qs(t,n,s,h,d),i,u,g,{applyTranslation:p,selected:t.selected})}),i||l.markClean()}updateLabelSelection(e){return e.labelSelection.update(this.isLabelEnabled()?e.labelData:[])}updateLabelNodes(e){const{enabled:t,fontStyle:i,fontWeight:n,fontSize:s,fontFamily:r,color:o}=this.properties.label;e.labelSelection.each((e,a)=>{t&&a?.labelText?(e.fontStyle=i,e.fontWeight=n,e.fontSize=s,e.fontFamily=r,e.textAlign="center",e.textBaseline="bottom",e.text=a.labelText,e.x=a.point.x,e.y=a.point.y-10,e.fill=o,e.visible=!0):e.visible=!1})}getTooltipContent(e){const{id:t,dataModel:i,processedData:n,axes:s,properties:r}=this,{xKey:o,xName:a,yKey:l,yName:c,tooltip:h}=r,d=s.x,u=s.y;if(!(i&&n&&d&&u))return;const p=n.dataSources.get(this.id)?.[e],g=i.resolveColumnById(this,"xValue",n)[e],f=i.resolveColumnById(this,"yValueRaw",n)[e];if(null==g)return;const m=this.getMarkerItemBaseStyle(!1);return Object.assign(m,this.getMarkerItemStyleOverrides(String(e),p,m,!1)),this.formatTooltipWithContext(h,{heading:d.formatDatum(g),symbol:this.legendItemSymbol(),data:[{label:c,fallbackLabel:l,value:u.formatDatum(f)}]},{seriesId:t,datum:p,title:c,xKey:o,xName:a,yKey:l,yName:c,...m,...this.getModuleTooltipParams()})}legendItemSymbol(){const e="rgba(0, 0, 0, 0)",{stroke:t,strokeOpacity:i,strokeWidth:n,lineDash:s,marker:r}=this.properties;return{marker:{...this.getMarkerStyle(r,void 0,void 0,!1,void 0,{fill:r.fill??e,stroke:r.stroke??t??e}),enabled:r.enabled},line:{stroke:t??e,strokeOpacity:i,strokeWidth:n,lineDash:s}}}getLegendData(e){if("category"!==e)return[];const{id:t,ctx:{legendManager:i},visible:n}=this,{yKey:s,yName:r,title:o,legendItemName:a,showInLegend:l}=this.properties;return[{legendType:"category",id:t,itemId:s,legendItemName:a,seriesId:t,enabled:n&&i.getItemEnabled({seriesId:t,itemId:s}),label:{text:a??o??r??s},symbol:this.legendItemSymbol(),hideInLegend:!l}]}updatePaths(e){this.updateLinePaths(e.paths,e.contextData)}plotNodeDataPoints(e,t){if(0===t.length)return;const i=t[0].point;e.moveTo(i.x,i.y);for(let i=1;i<t.length;i+=1){const{x:n,y:s}=t[i].point;e.lineTo(n,s)}}updateLinePaths(e,t){const i=t.strokeData?.spans,[n]=e;n.path.clear(),null!=i?Ig(n,i):this.plotNodeDataPoints(n.path,t.nodeData),n.markDirty("LineSeries")}animateEmptyUpdateReady(e){const{markerSelection:t,labelSelection:i,annotationSelections:n,contextData:s,paths:r}=e,{animationManager:o}=this.ctx;this.updateLinePaths(r,s),Wg(this,o,...r),da([t],zg),Bg(this,o,t),yp(this,"labels",o,i),yp(this,"annotations",o,...n)}animateReadyResize(e){const{contextData:t,paths:i}=e;this.updateLinePaths(i,t),super.animateReadyResize(e)}animateWaitingUpdateReady(e){const{animationManager:t}=this.ctx,{markerSelection:i,labelSelection:n,annotationSelections:s,contextData:r,paths:o,previousContextData:a}=e,[l]=o;this.resetMarkerAnimation(e),this.resetLabelAnimation(e);const c=()=>{this.resetPathAnimation(e),this.updateLinePaths(o,r)},h=()=>{t.skipCurrentBatch(),c()};if(null==r||null==a)return c(),Gg(this,t,"added",i),jg(this,"path_properties",t,"add",l),yp(this,"labels",t,n),void yp(this,"annotations",t,...s);if(r.crossFiltering!==a.crossFiltering)return void h();const d=Pg(r,a,this.processedData?.reduced?.diff?.[this.id]);void 0!==d?"no-op"!==d.status&&(aa(this.id,"path_properties",t,[l],d.stroke.pathProperties),"added"===d.status?this.updateLinePaths(o,r):"removed"===d.status?this.updateLinePaths(o,a):vp(this.id,"path_update",t,[l],d.stroke.path),d.hasMotion&&(Gg(this,t,void 0,i),yp(this,"labels",t,n),yp(this,"annotations",t,...s))):h()}isLabelEnabled(){return this.properties.label.enabled}getBandScalePadding(){return{inner:1,outer:.1}}nodeFactory(){return new At}getFormattedMarkerStyle(e){const{xKey:t,yKey:i}=this.properties,n=this.getSeriesDomain("x"),s=this.getSeriesDomain("y");return this.getMarkerStyle(this.properties.marker,e.datum,qs(e,t,i,n,s),!0)}computeFocusBounds(e){return Ug(this,e)}};Am.className="LineSeries",Am.type="line";var Tm={title:n.Yj,showInMiniChart:n.zM,connectMissingData:n.zM,interpolation:_f,label:Rf,marker:If,tooltip:Nf,errorBar:kf,...Tf,...n.AF,...n.mL};Tm.sparklineMode=(0,n._L)(n.zM);var Dm={...Tm,...Df,type:(0,n.dY)("line"),xKey:(0,n.mw)(n.Yj),yKey:(0,n.mw)(n.Yj),xName:n.Yj,yName:n.Yj,stacked:n.zM,stackGroup:n.Yj,normalizedTo:n.ai,legendItemName:n.Yj,errorBar:Pf};Dm.pickOutsideVisibleMinorAxis=(0,n._L)(n.zM),Dm.focusPriority=(0,n._L)(n.ai);var Im={type:"series",optionsKey:"series[]",packageType:"community",chartTypes:["cartesian"],identifier:"line",moduleFactory:e=>new Am(e),stackable:!0,tooltipDefaults:{range:"nearest"},defaultAxes:[{type:"number",position:"left"},{type:"category",position:"bottom"}],themeTemplate:{series:{tooltip:{position:{_seriesOverrideType:"node"}},stroke:up,strokeWidth:2,strokeOpacity:1,lineDash:[0],lineDashOffset:0,interpolation:{type:"linear"},marker:{shape:"circle",size:7,strokeWidth:0,fill:{$palette:"fill"},stroke:{$palette:"stroke"},fillGradientDefaults:{type:"gradient",gradient:"radial",bounds:"item",colorStops:{$palette:"gradient"},rotation:0,reverse:!0},fillPatternDefaults:gp,fillImageDefaults:fp},label:{enabled:!1,fontSize:{$ref:"fontSize"},fontFamily:{$ref:"fontFamily"},fontWeight:{$ref:"fontWeight"},color:{$ref:"textColor"}},errorBar:{cap:{lengthRatio:1}}}}},Rm={type:"series",name:"line",chartType:"cartesian",options:Dm,create:e=>new Am(e)},Lm=class extends pl{constructor(){super(...arguments),this.placement="top"}};a([Te],Lm.prototype,"placement",2);var km=class extends Up{constructor(){super(...arguments),this.label=new Lm,this.tooltip=new Np,this.marker=new kp}};a([Te],km.prototype,"xKey",2),a([Te],km.prototype,"yKey",2),a([Te],km.prototype,"labelKey",2),a([Te],km.prototype,"xFilterKey",2),a([Te],km.prototype,"yFilterKey",2),a([Te],km.prototype,"xName",2),a([Te],km.prototype,"yName",2),a([Te],km.prototype,"labelName",2),a([Te],km.prototype,"title",2),a([ri("marker.shape")],km.prototype,"shape",2),a([ri("marker.size")],km.prototype,"size",2),a([ri("marker.fill")],km.prototype,"fill",2),a([ri("marker.fillGradientDefaults")],km.prototype,"fillGradientDefaults",2),a([ri("marker.fillPatternDefaults")],km.prototype,"fillPatternDefaults",2),a([ri("marker.fillImageDefaults")],km.prototype,"fillImageDefaults",2),a([ri("marker.fillOpacity")],km.prototype,"fillOpacity",2),a([ri("marker.stroke")],km.prototype,"stroke",2),a([ri("marker.strokeWidth")],km.prototype,"strokeWidth",2),a([ri("marker.strokeOpacity")],km.prototype,"strokeOpacity",2),a([ri("marker.lineDash")],km.prototype,"lineDash",2),a([ri("marker.lineDashOffset")],km.prototype,"lineDashOffset",2),a([ri("marker.itemStyler")],km.prototype,"itemStyler",2),a([Te],km.prototype,"label",2),a([Te],km.prototype,"tooltip",2);var Pm=class extends jp{constructor(e){super({moduleCtx:e,directionKeys:Bp,directionNames:Hp,categoryKey:void 0,pickModes:[2,1,0],pathsPerSeries:[],hasMarkers:!0,markerSelectionGarbageCollection:!1,animationResetFns:{marker:Hg,label:bp},usesPlacedLabels:!0,clipFocusBox:!1}),this.properties=new km}get pickModeAxis(){return"main-category"}async processData(e){if(null==this.data||!this.visible)return;const t=this.axes.x?.scale,i=this.axes.y?.scale,{xScaleType:n,yScaleType:s}=this.getScaleInformation({xScale:t,yScale:i}),{xKey:r,yKey:o,xFilterKey:a,yFilterKey:l,labelKey:c}=this.properties;await this.requestDataModel(e,this.data,{props:[Kh(r,n,{id:"xValue"}),Kh(o,s,{id:"yValue"}),...null!=a?[Kh(a,n,{id:"xFilterValue"})]:[],...null!=l?[Kh(l,s,{id:"yFilterValue"})]:[],...c?[Kh(c,"band",{id:"labelValue"})]:[]]}),this.animationState.transition("updateData")}xCoordinateRange(e,t){const i=this.axes.x.scale.convert(e),n=.5*this.properties.size*t;return[i-n,i+n]}yCoordinateRange(e,t){const i=this.axes.y.scale.convert(e[0]),n=.5*this.properties.size*t;return[i-n,i+n]}getSeriesDomain(e){const{dataModel:t,processedData:i}=this;if(!i||!t)return[];const n={x:"xValue",y:"yValue"},s=n[e],r=t.resolveProcessedDataDefById(this,s),o=t.getDomain(this,s,"value",i);if("value"===r?.def.type&&"category"===r?.def.valueType)return o;const a=n["x"===e?"y":"x"];return Oo(Dh(this.domainForClippedRange(e,[s],a,!1)))}getSeriesRange(e,t){return this.domainForVisibleRange("y",["yValue"],"xValue",t,!1)}getVisibleItems(e,t,i){return this.countVisibleItems("xValue",["yValue"],e,t,i)}createNodeData(){const{axes:e,dataModel:t,processedData:i,visible:n}=this,{xKey:s,yKey:r,xFilterKey:o,yFilterKey:a,labelKey:l,xName:c,yName:h,labelName:d,marker:u,label:p}=this.properties,{placement:g}=p,f=Oc.anchor(u.shape),m=e.x,v=e.y;if(!(t&&i&&n&&m&&v))return;const y=t.resolveColumnById(this,"xValue",i),C=t.resolveColumnById(this,"yValue",i),b=null!=l?t.resolveColumnById(this,"labelValue",i):void 0,S=null!=o?t.resolveColumnById(this,"xFilterValue",i):void 0,w=null!=a?t.resolveColumnById(this,"yFilterValue",i):void 0,x=m.scale,E=v.scale,M=(x.bandwidth??0)/2,A=(E.bandwidth??0)/2,T=[],D=p.getFont(),I=Di.getMeasurer({font:D});return(i.dataSources.get(this.id)??[]).forEach((e,t)=>{const i=y[t],n=C[t],o=x.convert(i)+M,a=E.convert(n)+A,m=null!=S&&null!=w?S[t]===i&&w[t]===n:void 0,v=this.getLabelText(p,{value:null!=b?b?.[t]:n,datum:e,xKey:s,yKey:r,labelKey:l,xName:c,yName:h,labelName:d}),D=I.measureText(v);T.push({series:this,itemId:r,yKey:r,xKey:s,datum:e,datumIndex:t,xValue:i,yValue:n,capDefaults:{lengthRatioMultiplier:u.getDiameter(),lengthMax:1/0},point:{x:o,y:a,size:u.size},midPoint:{x:o,y:a},label:{text:v,...D},anchor:f,placement:g,selected:m})}),{itemId:r,nodeData:T,labelData:T,scales:this.calculateScaling(),visible:this.visible}}isPathOrSelectionDirty(){return this.properties.marker.isDirty()}getLabelData(){return this.isLabelEnabled()?this.contextNodeData?.labelData??[]:[]}updateMarkerSelection(e){const{nodeData:t,markerSelection:i}=e;return this.properties.marker.isDirty()&&(i.clear(),i.cleanup()),i.update(this.properties.marker.enabled?t:[])}updateMarkerNodes(e){const{markerSelection:t,isHighlight:i}=e,{xKey:n,yKey:s,labelKey:r,marker:o,highlightStyle:a}=this.properties,l=N(i&&a.item,o.getStyle()),c=this.getShapeFillBBox();t.each((e,t)=>{this.updateMarkerStyle(o,e,t.datum,t.point,{xKey:n,yKey:s,labelKey:r},i,l,c,{selected:t.selected})}),i||o.markClean()}updatePlacedLabelData(e){this.labelSelection.update(e.map(e=>({...e.datum,point:{x:e.x,y:e.y,size:e.datum.point.size}})),e=>{e.pointerEvents=1}),this.updateLabelNodes({labelSelection:this.labelSelection})}updateLabelNodes(e){const{label:t}=this.properties;e.labelSelection.each((e,i)=>{e.text=i.label.text,e.fill=t.color,e.x=i.point?.x??0,e.y=i.point?.y??0,e.fontStyle=t.fontStyle,e.fontWeight=t.fontWeight,e.fontSize=t.fontSize,e.fontFamily=t.fontFamily,e.textAlign="left",e.textBaseline="top"})}getTooltipContent(e){const{id:t,dataModel:i,processedData:n,axes:s,properties:r}=this,{xKey:o,xName:a,yKey:l,yName:c,labelKey:h,labelName:d,title:u,tooltip:p,marker:g}=r,f=s.x,m=s.y;if(!(i&&n&&f&&m))return;const v=n.dataSources.get(this.id)?.[e],y=i.resolveColumnById(this,"xValue",n)[e],C=i.resolveColumnById(this,"yValue",n)[e],b=this.contextNodeData?.nodeData[e];if(null==y||null==b)return;const S=this.getMarkerStyle(g,b.datum,{xKey:o,yKey:l,labelKey:h,highlighted:!0});return this.formatTooltipWithContext(p,{symbol:this.legendItemSymbol(),title:u,data:[{label:a,fallbackLabel:o,value:f.formatDatum(y)},{label:c,fallbackLabel:l,value:m.formatDatum(C)}]},{seriesId:t,datum:v,title:c,xKey:o,xName:a,yKey:l,yName:c,labelKey:h,labelName:d,...S,...this.getModuleTooltipParams()})}legendItemSymbol(){return{marker:this.getMarkerStyle(this.properties.marker)}}getLegendData(e){if("category"!==e)return[];const{yKey:t,yName:i,title:n,showInLegend:s}=this.properties,{id:r,ctx:{legendManager:o},visible:a}=this;return[{legendType:"category",id:r,itemId:t,seriesId:r,enabled:a&&o.getItemEnabled({seriesId:r,itemId:t}),label:{text:n??i??t},symbol:this.legendItemSymbol(),hideInLegend:!s}]}animateEmptyUpdateReady(e){const{markerSelection:t,labelSelection:i,annotationSelections:n}=e;Vg(this,this.ctx.animationManager,t),yp(this,"labels",this.ctx.animationManager,i),yp(this,"annotations",this.ctx.animationManager,...n)}isLabelEnabled(){return this.properties.label.enabled}nodeFactory(){return new At}getFormattedMarkerStyle(e){const{xKey:t,yKey:i,labelKey:n}=this.properties;return this.getMarkerStyle(this.properties.marker,e.datum,{xKey:t,yKey:i,labelKey:n},!0)}computeFocusBounds(e){return Ug(this,e)}};Pm.className="ScatterSeries",Pm.type="scatter";var Nm={title:n.Yj,showInMiniChart:n.zM,label:{placement:(0,n.KC)("top","right","bottom","left"),...Rf},tooltip:Nf,errorBar:kf,...Tf,...G(If,["enabled"])},Om={...Nm,...Df,type:(0,n.mw)((0,n.dY)("scatter")),xKey:(0,n.mw)(n.Yj),yKey:(0,n.mw)(n.Yj),labelKey:n.Yj,xName:n.Yj,yName:n.Yj,labelName:n.Yj,errorBar:Pf},_m={type:"series",optionsKey:"series[]",packageType:"community",chartTypes:["cartesian"],identifier:"scatter",moduleFactory:e=>new Pm(e),tooltipDefaults:{range:"nearest"},defaultAxes:[{type:"number",position:"bottom"},{type:"number",position:"left"}],themeTemplate:{series:{shape:"circle",size:7,fill:{$palette:"fill"},stroke:{$palette:"stroke"},fillGradientDefaults:{type:"gradient",gradient:"radial",bounds:"item",colorStops:{$palette:"gradient"},rotation:0,reverse:!0},fillPatternDefaults:gp,fillImageDefaults:fp,fillOpacity:.8,tooltip:{position:{_seriesOverrideType:"node"}},label:{enabled:!1,fontSize:{$ref:"fontSize"},fontFamily:{$ref:"fontFamily"},fontWeight:{$ref:"fontWeight"},color:{$ref:"textColor"}},errorBar:{cap:{lengthRatio:1}}}}},Fm={type:"series",name:"scatter",chartType:"cartesian",options:Om,create:e=>new Pm(e)},Gm=class e{constructor(e,t,i,n){this.startAngle=e,this.endAngle=t,this.innerRadius=i,this.outerRadius=n}clone(){const{startAngle:t,endAngle:i,innerRadius:n,outerRadius:s}=this;return new e(t,i,n,s)}equals(e){return this.startAngle===e.startAngle&&this.endAngle===e.endAngle&&this.innerRadius===e.innerRadius&&this.outerRadius===e.outerRadius}[d](t,i){return new e(this.startAngle*(1-i)+t.startAngle*i,this.endAngle*(1-i)+t.endAngle*i,this.innerRadius*(1-i)+t.innerRadius*i,this.outerRadius*(1-i)+t.outerRadius*i)}};function Vm({startAngle:e,endAngle:t,innerRadius:i,outerRadius:n}){let s=1/0,r=1/0,o=-1/0,a=-1/0;const l=(e,t)=>{s=Math.min(e,s),r=Math.min(t,r),o=Math.max(e,o),a=Math.max(t,a)};return l(i*Math.cos(e),i*Math.sin(e)),l(i*Math.cos(t),i*Math.sin(t)),l(n*Math.cos(e),n*Math.sin(e)),l(n*Math.cos(t),n*Math.sin(t)),re(0,e,t)&&l(n,0),re(.5*Math.PI,e,t)&&l(0,n),re(Math.PI,e,t)&&l(-n,0),re(1.5*Math.PI,e,t)&&l(0,-n),new m(s,r,o-s,a-r)}function Bm(e,t,i){const n=Math.sqrt(Math.pow(e,2)+Math.pow(t,2)),{innerRadius:s,outerRadius:r}=i;if(i.startAngle===i.endAngle||n<Math.min(s,r)||n>Math.max(s,r))return!1;const o=se(i.startAngle),a=se(i.endAngle),l=Math.atan2(t,e);return o<a?l<=a&&l>=o:l<=a&&l>=-Math.PI||l>=o&&l<=Math.PI}function Hm(e,t){const{startAngle:i,endAngle:n,innerRadius:s,outerRadius:r}=t,o={x:r*Math.cos(i),y:r*Math.sin(i)},a={x:r*Math.cos(n),y:r*Math.sin(n)},l=0===s?{x:0,y:0}:{x:s*Math.cos(i),y:s*Math.sin(i)},c=0===s?{x:0,y:0}:{x:s*Math.cos(n),y:s*Math.sin(n)};return We(e.start.x,e.start.y,e.end.x,e.end.y,o.x,o.y,l.x,l.y)||We(e.start.x,e.start.y,e.end.x,e.end.y,a.x,a.y,c.x,c.y)||$e(0,0,r,i,n,!0,e.start.x,e.start.y,e.end.x,e.end.y)}function zm(e,t){const i={x:e.x,y:e.y},n={x:e.x+e.width,y:e.y},s={x:e.x,y:e.y+e.height},r={x:e.x+e.width,y:e.y+e.height};return Hm({start:i,end:n},t)||Hm({start:s,end:r},t)}function Um(e,t,i,n){if(0===i&&0===n)return 0;if(Math.asin(Math.abs(1*i)/(e+1*i))+Math.asin(Math.abs(1*n)/(e+1*n))-t<0)return 1;let s=0,r=1;for(let o=0;o<8;o+=1){const o=(s+r)/2;Math.asin(Math.abs(o*i)/(e+o*i))+Math.asin(Math.abs(o*n)/(e+o*n))-t<0?s=o:r=o}return s}function Wm(e,t){return le(e,t)<1e-6?t:ie(e-t)+t}function jm(e,t,i=0){const n=Math.abs(t-e)>=2*Math.PI?2*Math.PI:ie(t-e);return{startAngle:e=Wm(e,i),endAngle:t=e+n}}function Km(e,t,i,n,s,r){const o=Math.sin(r),a=Math.cos(r),l=e**2+t**2-i**2;let c,h,d,u;if(a>.5){const i=o/a,n=1+i**2,s=-2*(e+t*i),r=s**2-4*n*l;if(r<0)return;const p=(-s+Math.sqrt(r))/(2*n),g=(-s-Math.sqrt(r))/(2*n);c=p,h=p*i,d=g,u=g*i}else{const i=a/o,n=1+i**2,s=-2*(t+e*i),r=s**2-4*n*l;if(r<0)return;const p=(-s+Math.sqrt(r))/(2*n),g=(-s-Math.sqrt(r))/(2*n);c=p*i,h=p,d=g*i,u=g}const p=d*a+u*o,g=c*a+h*o>0?Wm(Math.atan2(h-t,c-e),n):NaN,f=p>0?Wm(Math.atan2(u-t,d-e),n):NaN;return g>=n&&g<=s?g:f>=n&&f<=s?f:void 0}function $m(e,t,i,n,s,r){const o=Math.hypot(e,t),a=o-(o**2-i**2+r**2)/(2*o),l=Math.atan2(t,e),c=Math.acos(-a/i),h=Wm(l+c,n),d=Wm(l-c,n);return h>=n&&h<=s?h:d>=n&&d<=s?d:void 0}var Ym=class{constructor(e,t,i,n,s){this.cx=e,this.cy=t,this.r=i,this.a0=n,this.a1=s,this.a0>=this.a1&&(this.a0=NaN,this.a1=NaN)}isValid(){return Number.isFinite(this.a0)&&Number.isFinite(this.a1)}pointAt(e){return{x:this.cx+this.r*Math.cos(e),y:this.cy+this.r*Math.sin(e)}}clipStart(e){null==e||!this.isValid()||e<this.a0||(this.a0=e,(Number.isNaN(e)||this.a0>=this.a1)&&(this.a0=NaN,this.a1=NaN))}clipEnd(e){null==e||!this.isValid()||e>this.a1||(this.a1=e,(Number.isNaN(e)||this.a0>=this.a1)&&(this.a0=NaN,this.a1=NaN))}},qm=class extends bc{constructor(){super(...arguments),this.centerX=0,this.centerY=0,this.innerRadius=10,this.outerRadius=20,this.startAngle=0,this.endAngle=2*Math.PI,this.clipSector=void 0,this.concentricEdgeInset=0,this.radialEdgeInset=0,this.startOuterCornerRadius=0,this.endOuterCornerRadius=0,this.startInnerCornerRadius=0,this.endInnerCornerRadius=0}set inset(e){this.concentricEdgeInset=e,this.radialEdgeInset=e}set cornerRadius(e){this.startOuterCornerRadius=e,this.endOuterCornerRadius=e,this.startInnerCornerRadius=e,this.endInnerCornerRadius=e}computeBBox(){return Vm(this).translate(this.centerX,this.centerY)}normalizedRadii(){const{concentricEdgeInset:e}=this;let{innerRadius:t,outerRadius:i}=this;return t=t>0?t+e:0,i=Math.max(i-e,0),{innerRadius:t,outerRadius:i}}normalizedClipSector(){const{clipSector:e}=this;if(null==e)return;const{startAngle:t,endAngle:i}=jm(this.startAngle,this.endAngle),{innerRadius:n,outerRadius:s}=this.normalizedRadii(),r=jm(e.startAngle,e.endAngle,t);return new Gm(Math.max(t,r.startAngle),Math.min(i,r.endAngle),Math.max(n,e.innerRadius),Math.min(s,e.outerRadius))}getAngleOffset(e){return e>0?this.radialEdgeInset/e:0}arc(e,t,i,n,s,r,o,a){if(e<=0)return;const{startAngle:l,endAngle:c}=jm(this.startAngle,this.endAngle),{innerRadius:h,outerRadius:d}=this.normalizedRadii(),u=this.normalizedClipSector();if(a&&h<=0)return;const p=a?this.getAngleOffset(h+e):this.getAngleOffset(d-e),g=o?l+p+t:c-p-t,f=a?h+e:d-e,m=f*Math.cos(g),v=f*Math.sin(g);if(null!=u){const e=1e-6;if(!(o||g>=l-e&&g<=u.endAngle-e))return;if(o&&!(g>=u.startAngle+e&&g<=c-e))return;if(a&&f<u.innerRadius-e)return;if(!a&&f>u.outerRadius+e)return}const y=new Ym(m,v,e,i,n);if(null!=u){let t,c;if(a?(y.clipStart(Km(m,v,e,i,n,u.endAngle)),y.clipEnd(Km(m,v,e,i,n,u.startAngle))):(y.clipStart(Km(m,v,e,i,n,u.startAngle)),y.clipEnd(Km(m,v,e,i,n,u.endAngle))),o?(t=$m(m,v,e,i,n,u.innerRadius),c=$m(m,v,e,i,n,u.outerRadius)):(t=$m(m,v,e,i,n,u.outerRadius),c=$m(m,v,e,i,n,u.innerRadius)),y.clipStart(t),y.clipEnd(c),null!=t){const{x:e,y:i}=y.pointAt(t),n=Wm(Math.atan2(i,e),l);o?r?.clipStart(n):s.clipEnd(n)}if(null!=c){const{x:e,y:t}=y.pointAt(c),i=Wm(Math.atan2(t,e),l);o?s.clipStart(i):r?.clipEnd(i)}}if(null!=u){const{x:e,y:t}=y.pointAt((y.a0+y.a1)/2);if(!Bm(e,t,u))return}const{x:C,y:b}=y.pointAt(o===a?y.a0:y.a1),S=Wm(Math.atan2(b,C),l),w=a?r:s;return o?w?.clipStart(S):w?.clipEnd(S),y}updatePath(){const{path:e,centerX:t,centerY:i,concentricEdgeInset:n,radialEdgeInset:s}=this;let{startOuterCornerRadius:r,endOuterCornerRadius:o,startInnerCornerRadius:a,endInnerCornerRadius:l}=this;const{startAngle:c,endAngle:h}=jm(this.startAngle,this.endAngle),{innerRadius:d,outerRadius:u}=this.normalizedRadii(),p=this.normalizedClipSector(),g=h-c,f=g>=2*Math.PI-1e-6;if(e.clear(),0===d&&0===u||d>u)return;if((p?.startAngle??c)===(p?.endAngle??h))return;if(f&&null==this.clipSector&&0===r&&0===o&&0===a&&0===l)return e.moveTo(t+u*Math.cos(c),i+u*Math.sin(c)),e.arc(t,i,u,c,h),d>n&&(e.moveTo(t+d*Math.cos(h),i+d*Math.sin(h)),e.arc(t,i,d,h,c,!0)),void e.closePath();if(null==this.clipSector&&Math.abs(d-u)<1e-6)return e.arc(t,i,u,c,h,!1),e.arc(t,i,u,h,c,!0),void e.closePath();const m=this.getAngleOffset(d),v=this.getAngleOffset(u);if(g<2*v)return;const y=(p?.innerRadius??d)>n,C=d<n||g<2*m,b=u-d,S=Math.max(r,a,o,l),w=S>0?Math.min(b/S,1):1;r*=w,o*=w,a*=w,l*=w;const x=Um(u,g-2*v,-r,-o);if(r*=x,o*=x,!C&&y){const e=Um(d,g-2*m,a,l);a*=e,l*=e}else a=0,l=0;const E=Math.max(r+a,o+l),M=E>0?Math.min(b/E,1):1;r*=M,o*=M,a*=M,l*=M;let A=0,T=0;const D=r/(u-r),I=o/(u-o);if(D>=0&&D<.999999)A=Math.asin(D);else{A=g/2;const e=u/(1/Math.sin(A)+1);r=Math.min(e,r)}if(I>=0&&I<.999999)T=Math.asin(I);else{T=g/2;const e=u/(1/Math.sin(T)+1);o=Math.min(e,o)}const R=Math.asin(a/(d+a)),L=Math.asin(l/(d+l)),k=p?.outerRadius??u,P=this.getAngleOffset(k),N=new Ym(0,0,k,c+P,h-P),O=p?.innerRadius??d,_=this.getAngleOffset(O),F=y?new Ym(0,0,O,c+_,h-_):void 0;null!=p&&(N.clipStart(p.startAngle),N.clipEnd(p.endAngle),F?.clipStart(p.startAngle),F?.clipEnd(p.endAngle));const G=this.arc(r,A,c-.5*Math.PI,c+A,N,F,!0,!1),V=this.arc(o,T,h-T,h+.5*Math.PI,N,F,!1,!1),B=this.arc(l,L,h+.5*Math.PI,h+Math.PI-L,N,F,!1,!0),H=this.arc(a,R,c+Math.PI+R,c+1.5*Math.PI,N,F,!0,!0);if(C){const n=g<.5*Math.PI?s*(1+Math.cos(g))/Math.sin(g):NaN;let r;r=n>0&&n<u?Math.max(Math.hypot(s,n),d):s,r=Math.max(r,d);const o=c+.5*g;e.moveTo(t+r*Math.cos(o),i+r*Math.sin(o))}else if(!0===H?.isValid()||!0===F?.isValid());else{const n=c+g/2,s=d*Math.cos(n),r=d*Math.sin(n);e.moveTo(t+s,i+r)}if(!0===G?.isValid()){const{cx:n,cy:s,r,a0:o,a1:a}=G;e.arc(t+n,i+s,r,o,a)}if(N.isValid()){const{r:n,a0:s,a1:r}=N;e.arc(t,i,n,s,r)}if(!0===V?.isValid()){const{cx:n,cy:s,r,a0:o,a1:a}=V;e.arc(t+n,i+s,r,o,a)}if(!C){if(!0===B?.isValid()){const{cx:n,cy:s,r,a0:o,a1:a}=B;e.arc(t+n,i+s,r,o,a)}if(!0===F?.isValid()){const{r:n,a0:s,a1:r}=F;e.arc(t,i,n,r,s,!0)}if(!0===H?.isValid()){const{cx:n,cy:s,r,a0:o,a1:a}=H;e.arc(t+n,i+s,r,o,a)}}e.closePath()}isPointInPath(e,t){const{startAngle:i,endAngle:n,innerRadius:s,outerRadius:r}=this.clipSector??this;return Bm(e-this.centerX,t-this.centerY,{startAngle:i,endAngle:n,innerRadius:Math.min(s,r),outerRadius:Math.max(s,r)})}};qm.className="Sector",a([$()],qm.prototype,"centerX",2),a([$()],qm.prototype,"centerY",2),a([$()],qm.prototype,"innerRadius",2),a([$()],qm.prototype,"outerRadius",2),a([$()],qm.prototype,"startAngle",2),a([$()],qm.prototype,"endAngle",2),a([Y({equals:(e,t)=>e.equals(t)})],qm.prototype,"clipSector",2),a([$()],qm.prototype,"concentricEdgeInset",2),a([$()],qm.prototype,"radialEdgeInset",2),a([$()],qm.prototype,"startOuterCornerRadius",2),a([$()],qm.prototype,"endOuterCornerRadius",2),a([$()],qm.prototype,"startInnerCornerRadius",2),a([$()],qm.prototype,"endInnerCornerRadius",2);var Xm={BLUE:"#5090dc",ORANGE:"#ffa03a",GREEN:"#459d55",CYAN:"#34bfe1",YELLOW:"#e1cc00",VIOLET:"#9669cb",GRAY:"#b5b5b5",MAGENTA:"#bd5aa7",BROWN:"#8a6224",RED:"#ef5452"},Zm={BLUE:"#2b5c95",ORANGE:"#cc6f10",GREEN:"#1e652e",CYAN:"#18859e",YELLOW:"#a69400",VIOLET:"#603c88",GRAY:"#575757",MAGENTA:"#7d2f6d",BROWN:"#4f3508",RED:"#a82529"},Qm=class extends Fi{constructor(){super(...arguments),this.showInLegend=!1}};a([Te],Qm.prototype,"showInLegend",2);var Jm=class extends pl{constructor(){super(...arguments),this.spacing=2}set(e,t){return super.set(e)}};a([Te],Jm.prototype,"text",2),a([Te],Jm.prototype,"spacing",2);var ev=class extends De{constructor(){super(...arguments),this.fill="transparent",this.fillOpacity=1}};a([Te],ev.prototype,"fill",2),a([Te],ev.prototype,"fillOpacity",2);var tv=class extends pl{constructor(){super(...arguments),this.offset=3,this.minAngle=0,this.minSpacing=4,this.maxCollisionOffset=50,this.avoidCollisions=!0}};a([Te],tv.prototype,"offset",2),a([Te],tv.prototype,"minAngle",2),a([Te],tv.prototype,"minSpacing",2),a([Te],tv.prototype,"maxCollisionOffset",2),a([Te],tv.prototype,"avoidCollisions",2);var iv=class extends pl{constructor(){super(...arguments),this.positionOffset=0,this.positionRatio=.5}};a([Te],iv.prototype,"positionOffset",2),a([Te],iv.prototype,"positionRatio",2);var nv=class extends De{constructor(){super(...arguments),this.length=10,this.strokeWidth=1}};a([Te],nv.prototype,"colors",2),a([Te],nv.prototype,"length",2),a([Te],nv.prototype,"strokeWidth",2);var sv=class extends Lp{constructor(){super(...arguments),this.defaultColorRange=[],this.defaultPatternFills=[],this.fills=Object.values(Xm),this.strokes=Object.values(Zm),this.fillOpacity=1,this.strokeOpacity=1,this.lineDash=[0],this.lineDashOffset=0,this.cornerRadius=0,this.rotation=0,this.outerRadiusOffset=0,this.outerRadiusRatio=1,this.strokeWidth=1,this.sectorSpacing=0,this.hideZeroValueSectorsInLegend=!1,this.innerLabels=new Ie(Jm),this.title=new Qm,this.innerCircle=new ev,this.shadow=new wp,this.calloutLabel=new tv,this.sectorLabel=new iv,this.calloutLine=new nv,this.tooltip=new Np}};function rv(e,t,i,n){const s=[i.convert(0),i.convert(1)],r=[n.convert(0),n.convert(1)],o=Math.PI/-2+oe(t),a=e?"initial":"update";return{nodes:{toFn:(e,t,i,{prevLive:n})=>{let{startAngle:r,endAngle:a,innerRadius:l,outerRadius:c}=t;const{stroke:h,fill:d}=t.sectorFormat;if("removed"===i&&n?(r=n.datum?.endAngle,a=n.datum?.endAngle):"removed"!==i||n||(r=o,a=o),"removed"===i){const e=(({radius:e})=>({innerRadius:s[0],outerRadius:s[0]+(s[1]-s[0])*e}))(t);l=e.innerRadius,c=e.outerRadius}return{startAngle:r,endAngle:a,outerRadius:c,innerRadius:l,stroke:h,fill:d}},fromFn:(t,i,n,{prevFromProps:s})=>{let{startAngle:l,endAngle:c,innerRadius:h,outerRadius:d}=t,{fill:u,stroke:p}=i.sectorFormat;if("updated"===n&&null==t.previousDatum&&(n="added"),"unknown"===n||"added"===n&&!s?(l=o,c=o,h=i.innerRadius,d=i.outerRadius):"added"===n&&s&&(l=s.endAngle??o,c=s.endAngle??o,h=s.innerRadius??i.innerRadius,d=s.outerRadius??i.outerRadius),"added"===n&&!e){const e=(({radius:e})=>({innerRadius:r[0],outerRadius:r[0]+(r[1]-r[0])*e}))(i);h=e.innerRadius,d=e.outerRadius}return"updated"===n&&(u=t.fill??u,p=("string"==typeof t.stroke?t.stroke:void 0)??p),{startAngle:l,endAngle:c,innerRadius:h,outerRadius:d,fill:u,stroke:p,phase:a}}},innerCircle:{fromFn:(e,t)=>({size:e.previousDatum?.radius??e.size??0,phase:a}),toFn:(e,t)=>({size:t.radius??0})}}}function ov(e,t){return{startAngle:t.startAngle,endAngle:t.endAngle,innerRadius:t.innerRadius,outerRadius:t.outerRadius,stroke:t.sectorFormat.stroke}}function av(e,t){const i=t.y-e.centerY,n=t.x-e.centerX,s=Math.atan2(i,n),r=e.getItemNodes();for(const e of r)if(!0!==e.datum.missing&&re(s,e.startAngle,e.endAngle)){const t=Math.sqrt(n*n+i*i);let s=0;return t<e.innerRadius?s=e.innerRadius-t:t>e.outerRadius&&(s=t-e.outerRadius),{datum:e.datum,distance:s}}}a([Te],sv.prototype,"angleKey",2),a([Te],sv.prototype,"angleName",2),a([Te],sv.prototype,"angleFilterKey",2),a([Te],sv.prototype,"radiusKey",2),a([Te],sv.prototype,"radiusName",2),a([Te],sv.prototype,"radiusMin",2),a([Te],sv.prototype,"radiusMax",2),a([Te],sv.prototype,"calloutLabelKey",2),a([Te],sv.prototype,"calloutLabelName",2),a([Te],sv.prototype,"sectorLabelKey",2),a([Te],sv.prototype,"sectorLabelName",2),a([Te],sv.prototype,"legendItemKey",2),a([Te],sv.prototype,"defaultColorRange",2),a([Te],sv.prototype,"defaultPatternFills",2),a([Te],sv.prototype,"fills",2),a([Te],sv.prototype,"strokes",2),a([Te],sv.prototype,"fillOpacity",2),a([Te],sv.prototype,"strokeOpacity",2),a([Te],sv.prototype,"lineDash",2),a([Te],sv.prototype,"lineDashOffset",2),a([Te],sv.prototype,"cornerRadius",2),a([Te],sv.prototype,"itemStyler",2),a([Te],sv.prototype,"rotation",2),a([Te],sv.prototype,"outerRadiusOffset",2),a([Te],sv.prototype,"outerRadiusRatio",2),a([Te],sv.prototype,"innerRadiusOffset",2),a([Te],sv.prototype,"innerRadiusRatio",2),a([Te],sv.prototype,"strokeWidth",2),a([Te],sv.prototype,"sectorSpacing",2),a([Te],sv.prototype,"hideZeroValueSectorsInLegend",2),a([Te],sv.prototype,"innerLabels",2),a([Te],sv.prototype,"title",2),a([Te],sv.prototype,"innerCircle",2),a([Te],sv.prototype,"shadow",2),a([Te],sv.prototype,"calloutLabel",2),a([Te],sv.prototype,"sectorLabel",2),a([Te],sv.prototype,"calloutLine",2),a([Te],sv.prototype,"tooltip",2);var lv=(e=>(e[e.BACKGROUND=0]="BACKGROUND",e[e.FOREGROUND=1]="FOREGROUND",e[e.HIGHLIGHT=2]="HIGHLIGHT",e[e.LABEL=3]="LABEL",e))(lv||{}),cv=class extends Vp{constructor({categoryKey:e,useLabelLayer:t=!1,pickModes:i=[1,0],canHaveAxes:n=!1,animationResetFns:s,...r}){super({...r,categoryKey:e,useLabelLayer:t,pickModes:i,directionKeys:{angle:["angleKey"],radius:["radiusKey"]},directionNames:{angle:["angleName"],radius:["radiusName"]},canHaveAxes:n}),this.directions=["angle","radius"],this.itemGroup=this.contentGroup.appendChild(new At),this.nodeData=[],this.itemSelection=ua.select(this.itemGroup,()=>this.nodeFactory(),!1),this.labelSelection=ua.select(this.labelGroup,()=>this.labelFactory(),!1),this.highlightSelection=ua.select(this.highlightGroup,()=>this.nodeFactory()),this.highlightLabelSelection=ua.select(this.highlightLabel,()=>this.labelFactory()),this.centerX=0,this.centerY=0,this.radius=0,this.animationResetFns=s,this.animationState=new ba("empty",{empty:{update:{target:"ready",action:e=>this.animateEmptyUpdateReady(e)},reset:"empty",skip:"ready"},ready:{updateData:"waiting",clear:"clearing",highlight:e=>this.animateReadyHighlight(e),highlightMarkers:e=>this.animateReadyHighlightMarkers(e),resize:e=>this.animateReadyResize(e),reset:"empty",skip:"ready"},waiting:{update:{target:"ready",action:e=>this.animateWaitingUpdateReady(e)},reset:"empty",skip:"ready"},clearing:{update:{target:"empty",action:e=>this.animateClearingUpdateEmpty(e)},reset:"empty",skip:"ready"}},()=>this.checkProcessedDataAnimatable())}getItemNodes(){return[...this.itemGroup.children()]}getNodeData(){return this.nodeData}setSeriesIndex(e){return!!super.setSeriesIndex(e)&&(this.contentGroup.zIndex=[e,1],this.highlightGroup.zIndex=[e,2],this.labelGroup.zIndex=[e,3],!0)}resetAnimation(e){"initial"===e?this.animationState.transition("reset"):"ready"===e&&this.animationState.transition("skip")}labelFactory(){const e=new Pi;return e.pointerEvents=1,e}addChartEventListeners(){this.destroyFns.push(this.ctx.chartEventManager?.addListener("legend-item-click",e=>this.onLegendItemClick(e)),this.ctx.chartEventManager?.addListener("legend-item-double-click",e=>this.onLegendItemDoubleClick(e)))}getInnerRadius(){return 0}computeLabelsBBox(e,t){return null}getShapeFillBBox(){const e=this.radius;return{series:new m(-e,-e,2*e,2*e),axis:new m(-e,-e,2*e,2*e)}}resetAllAnimation(){const{item:e,label:t}=this.animationResetFns??{};this.ctx.animationManager.stopByAnimationGroupId(this.id),e&&da([this.itemSelection,this.highlightSelection],e),t&&da([this.labelSelection,this.highlightLabelSelection],t),this.itemSelection.cleanup(),this.labelSelection.cleanup(),this.highlightSelection.cleanup(),this.highlightLabelSelection.cleanup()}animateEmptyUpdateReady(e){this.ctx.animationManager.skipCurrentBatch(),this.resetAllAnimation()}animateWaitingUpdateReady(e){this.ctx.animationManager.skipCurrentBatch(),this.resetAllAnimation()}animateReadyHighlight(e){const{item:t,label:i}=this.animationResetFns??{};t&&da([this.highlightSelection],t),i&&da([this.highlightLabelSelection],i)}animateReadyHighlightMarkers(e){}animateReadyResize(e){this.resetAllAnimation()}animateClearingUpdateEmpty(e){this.ctx.animationManager.skipCurrentBatch(),this.resetAllAnimation()}computeFocusBounds(e){const t=this.getNodeData()?.[e.datumIndex];if(void 0!==t)return this.itemSelection.select(e=>e instanceof bc&&e.datum===t)[0]}getSeriesRange(e,t){return[NaN,NaN]}},hv=class extends vc{constructor(e,t,i,n){super(e,t,i,n),this.angleKey=n.properties.angleKey,this.radiusKey=n.properties.radiusKey,this.calloutLabelKey=n.properties.calloutLabelKey,this.sectorLabelKey=n.properties.sectorLabelKey}},dv=class extends cv{constructor(e){super({moduleCtx:e,categoryKey:void 0,pickModes:[1,0],useLabelLayer:!0,animationResetFns:{item:ov,label:bp}}),this.properties=new sv,this.phantomNodeData=void 0,this.backgroundGroup=new It({name:`${this.id}-background`,zIndex:0}),this.noVisibleData=!1,this.previousRadiusScale=new Bd,this.radiusScale=new Bd,this.phantomGroup=this.backgroundGroup.appendChild(new At({name:"phantom"})),this.phantomSelection=ua.select(this.phantomGroup,()=>this.nodeFactory(),!1),this.calloutLabelGroup=this.contentGroup.appendChild(new At({name:"pieCalloutLabels"})),this.calloutLabelSelection=new ua(this.calloutLabelGroup,At),this.zerosumRingsGroup=this.backgroundGroup.appendChild(new At({name:`${this.id}-zerosumRings`})),this.zerosumOuterRing=this.zerosumRingsGroup.appendChild(new Oc({shape:"circle"})),this.zerosumInnerRing=this.zerosumRingsGroup.appendChild(new Oc({shape:"circle"})),this.innerLabelsGroup=this.contentGroup.appendChild(new At({name:"innerLabels"})),this.innerCircleGroup=this.backgroundGroup.appendChild(new At({name:`${this.id}-innerCircle`})),this.innerLabelsSelection=ua.select(this.innerLabelsGroup,Pi),this.innerCircleSelection=ua.select(this.innerCircleGroup,()=>new Oc({shape:"circle"})),this.surroundingRadius=void 0,this.NodeEvent=hv,this.angleScale=new Bd,this.angleScale.domain=[0,1],this.angleScale.range=[-Math.PI,Math.PI].map(e=>e+Math.PI/2),this.phantomGroup.opacity=.2}get calloutNodeData(){return this.phantomNodeData??this.nodeData}attachSeries(e,t,i){super.attachSeries(e,t,i),e?.appendChild(this.backgroundGroup)}detachSeries(e,t,i){super.detachSeries(e,t,i),e?.removeChild(this.backgroundGroup)}setSeriesIndex(e){return!!super.setSeriesIndex(e)&&(this.backgroundGroup.zIndex=[0,e],!0)}nodeFactory(){return new qm}getSeriesDomain(e){return"angle"===e?this.angleScale.domain:this.radiusScale.domain}async processData(e){if(null==this.data)return;const{visible:t,id:i,ctx:{legendManager:s}}=this,{angleKey:r,angleFilterKey:o,radiusKey:a,calloutLabelKey:l,sectorLabelKey:c,legendItemKey:h}=this.properties,d=()=>(e,n)=>t&&s.getItemEnabled({seriesId:i,itemId:n})?e:0,u=!this.ctx.animationManager.isSkipped(),p=[],g=[];h?p.push(jh(h,"band",{id:"legendItemKey"})):l?p.push(jh(l,"band",{id:"calloutLabelKey"})):c&&p.push(jh(c,"band",{id:"sectorLabelKey"}));const f=this.radiusScale.type,m=this.angleScale.type;a&&g.push(Xh(a,{id:"radiusValue",min:this.properties.radiusMin??0,max:this.properties.radiusMax,missingValue:this.properties.radiusMax??1,processor:d}),Kh(a,f,{id:"radiusRaw",processor:d}),ad("radiusValue",[0,1],1,this.properties.radiusMin??0,this.properties.radiusMax)),l&&g.push(Kh(l,"band",{id:"calloutLabelValue"})),c&&g.push(Kh(c,"band",{id:"sectorLabelValue"})),h&&g.push(Kh(h,"band",{id:"legendItemValue"})),o&&g.push(Zh(o,m,{id:"angleFilterValue",onlyPositive:!0,invalidValue:0,processor:d}),Kh(o,m,{id:"angleFilterRaw"}),ad("angleFilterValue",[0,1],0,0)),u&&this.processedData&&p.length>0&&g.push(vd(this.id,this.processedData)),g.push(cd()),await this.requestDataModel(e,this.data,{props:[...p,Zh(r,m,{id:"angleValue",onlyPositive:!0,invalidValue:0,processor:d}),Kh(r,m,{id:"angleRaw"}),ad("angleValue",[0,1],0,0),...g]});for(const e of this.processedData?.defs?.values??[]){const{id:t,missing:i,property:s}=e,r=_o(this,i);"angleRaw"!==t&&r>0&&n.Vy.warnOnce(`no value was found for the key '${String(s)}' on ${r} data element${r>1?"s":""}`)}this.animationState.transition("updateData")}maybeRefreshNodeData(){if(!this.nodeDataRefresh)return;const{nodeData:e=[],phantomNodeData:t}=this.createNodeData()??{};this.nodeData=e,this.phantomNodeData=t,this.nodeDataRefresh=!1}getProcessedDataValues(e,t){return{angleValues:e.resolveColumnById(this,"angleValue",t),angleRawValues:e.resolveColumnById(this,"angleRaw",t),angleFilterValues:null!=this.properties.angleFilterKey?e.resolveColumnById(this,"angleFilterValue",t):void 0,angleFilterRawValues:null!=this.properties.angleFilterKey?e.resolveColumnById(this,"angleFilterRaw",t):void 0,radiusValues:this.properties.radiusKey?e.resolveColumnById(this,"radiusValue",t):void 0,radiusRawValues:this.properties.radiusKey?e.resolveColumnById(this,"radiusRaw",t):void 0,calloutLabelValues:this.properties.calloutLabelKey?e.resolveColumnById(this,"calloutLabelValue",t):void 0,sectorLabelValues:this.properties.sectorLabelKey?e.resolveColumnById(this,"sectorLabelValue",t):void 0,legendItemValues:this.properties.legendItemKey?e.resolveColumnById(this,"legendItemValue",t):void 0}}createNodeData(){const{id:e,processedData:t,dataModel:i,angleScale:n,ctx:{legendManager:s},visible:r}=this,{rotation:o,innerRadiusRatio:a}=this.properties;if(!i||"ungrouped"!==t?.type)return;const{angleValues:l,angleRawValues:c,angleFilterValues:h,angleFilterRawValues:d,radiusValues:u,radiusRawValues:p,calloutLabelValues:g,sectorLabelValues:f,legendItemValues:m}=this.getProcessedDataValues(i,t),v=d?.some((e,t)=>e>c[t])??!1;let y=0,C=0;const b=[],S=null!=d?[]:void 0,w=t.dataSources.get(this.id)??[],x=t.invalidData?.get(this.id);return w.forEach((t,i)=>{if(!0===x?.[i])return;const a=v?h[i]:l[i],w=null==d||v?1:Math.sqrt(d[i]/c[i]),E=n.convert(y)+oe(o);y=a,C+=a;const M=n.convert(y)+oe(o),A=Math.abs(M-E),T=E+A/2,D=c[i],I=(u?.[i]??1)*w,R=p?.[i],L=m?.[i],k=this.getLabels(t,T,A,!0,g?.[i],f?.[i],L),P=this.getSectorFormat(t,i,!1),N={itemId:i,series:this,datum:t,datumIndex:i,angleValue:D,midAngle:T,midCos:Math.cos(T),midSin:Math.sin(T),startAngle:E,endAngle:M,radius:I,innerRadius:Math.max(this.radiusScale.convert(0),0),outerRadius:Math.max(this.radiusScale.convert(I),0),sectorFormat:P,radiusValue:R,legendItemValue:L,enabled:r&&s.getItemEnabled({seriesId:e,itemId:i}),focusable:!0,...k};b.push(N),null!=S&&S.push({...N,radius:1,innerRadius:Math.max(this.radiusScale.convert(0),0),outerRadius:Math.max(this.radiusScale.convert(1),0),focusable:!1})}),this.zerosumOuterRing.visible=0===C,this.zerosumInnerRing.visible=0===C&&null!=a&&1!==a&&a>0,{itemId:e,nodeData:b,labelData:b,phantomNodeData:S}}getLabels(e,t,i,n,s,r,o){const{calloutLabel:a,sectorLabel:l,legendItemKey:c}=this.properties,h=!n||a.enabled?this.properties.calloutLabelKey:void 0,d=!n||l.enabled?this.properties.sectorLabelKey:void 0;if(!h&&!d&&!c)return{};const u={datum:e,angleKey:this.properties.angleKey,angleName:this.properties.angleName,radiusKey:this.properties.radiusKey,radiusName:this.properties.radiusName,calloutLabelKey:this.properties.calloutLabelKey,calloutLabelName:this.properties.calloutLabelName,sectorLabelKey:this.properties.sectorLabelKey,sectorLabelName:this.properties.sectorLabelName,legendItemKey:this.properties.legendItemKey},p={};return h&&i>=oe(a.minAngle)&&(p.calloutLabel={...this.getTextAlignment(t),text:this.getLabelText(a,{...u,value:s}),hidden:!1,collisionTextAlign:void 0,collisionOffsetY:0,box:void 0}),d&&(p.sectorLabel={text:this.getLabelText(l,{...u,value:r})}),null!=c&&null!=o&&(p.legendItem={key:c,text:o}),p}getTextAlignment(e){const t=[{textAlign:"center",textBaseline:"bottom"},{textAlign:"left",textBaseline:"middle"},{textAlign:"center",textBaseline:"hanging"},{textAlign:"right",textBaseline:"middle"}],i=se(e)- -.75*Math.PI,s=Math.floor(i/(Math.PI/2));return t[(0,n.GT)(s,t.length)]}getNodeFill(e,t,i){return uc(e,{type:"gradient",bounds:"series",colorStops:t.map(e=>({color:e})),gradient:"radial",rotation:0,reverse:!0},{type:"pattern",pattern:"forward-slanted-lines",fill:i,fillOpacity:1,backgroundFill:"none",backgroundFillOpacity:1,stroke:i,strokeOpacity:1,strokeWidth:4,rotation:0},{type:"image",backgroundFill:i,backgroundFillOpacity:1,fit:"contain",repeat:"no-repeat",rotation:0})}getFillParams(e,t,i){if(rt(e)&&"item"!==e.bounds)return{centerX:0,centerY:0,innerRadius:t,outerRadius:i}}getSectorFormat(e,t,i){const{angleKey:n,radiusKey:s,calloutLabelKey:r,sectorLabelKey:o,legendItemKey:a,fills:l,strokes:c,defaultColorRange:h,defaultPatternFills:d,itemStyler:u}=this.properties,p=c[t%c.length],{fill:g,fillOpacity:f,stroke:m,strokeWidth:v,strokeOpacity:y,lineDash:C,lineDashOffset:b,cornerRadius:S}=N(i&&this.properties.highlightStyle.item,{fill:l.length>0?l[t%l.length]:void 0,stroke:p,strokeWidth:this.getStrokeWidth(this.properties.strokeWidth),strokeOpacity:this.getOpacity()},this.properties),w=h[t%h.length],x=d[t%d.length],E=g??"black";let M;return u&&(M=this.cachedDatumCallback(this.getDatumId(t)+(i?"-highlight":"-hide"),()=>this.callWithContext(u,{datum:e,angleKey:n,radiusKey:s,calloutLabelKey:r,sectorLabelKey:o,legendItemKey:a,fill:this.getNodeFill(E,w,x),fillOpacity:f,stroke:m,strokeWidth:v,strokeOpacity:y,lineDash:C,lineDashOffset:b,cornerRadius:S,highlighted:i,seriesId:this.id}))),{fill:this.getNodeFill(M?.fill??E,w,x),fillOpacity:M?.fillOpacity??f,stroke:M?.stroke??m,strokeWidth:M?.strokeWidth??v,strokeOpacity:M?.strokeOpacity??y,lineDash:M?.lineDash??C,lineDashOffset:M?.lineDashOffset??b,cornerRadius:M?.cornerRadius??S}}getInnerRadius(){const{radius:e}=this,{innerRadiusRatio:t=1,innerRadiusOffset:i=0}=this.properties,n=e*t+i;return n===e||n<0?0:n}getOuterRadius(){const{outerRadiusRatio:e,outerRadiusOffset:t}=this.properties;return Math.max(this.radius*e+t,0)}updateRadiusScale(e){const t=[this.getInnerRadius(),this.getOuterRadius()];this.radiusScale.range=t,e&&(this.previousRadiusScale.range=t);const i=e=>({...e,innerRadius:Math.max(this.radiusScale.convert(0),0),outerRadius:Math.max(this.radiusScale.convert(e.radius),0)});this.nodeData=this.nodeData.map(i),this.phantomNodeData=this.phantomNodeData?.map(i)}getTitleTranslationY(){const e=Math.max(0,this.radiusScale.range[1]);return 0===e?NaN:-e-(2+(this.properties.title?.spacing??0))-Math.max(0,-e)}update({seriesRect:e}){const{title:t}=this.properties,i={seriesRectWidth:e?.width,seriesRectHeight:e?.height},n=null!=Ft(this.nodeDataDependencies,i);if(n&&(this._nodeDataDependencies=i),this.maybeRefreshNodeData(),this.updateTitleNodes(),this.updateRadiusScale(n),this.contentGroup.translationX=this.centerX,this.contentGroup.translationY=this.centerY,this.highlightGroup.translationX=this.centerX,this.highlightGroup.translationY=this.centerY,this.backgroundGroup.translationX=this.centerX,this.backgroundGroup.translationY=this.centerY,this.labelGroup&&(this.labelGroup.translationX=this.centerX,this.labelGroup.translationY=this.centerY),t){const e=this.getTitleTranslationY();t.node.y=isFinite(e)?e:0;const i=t.node.getBBox();t.node.visible=t.enabled&&isFinite(e)&&!this.bboxIntersectsSurroundingSeries(i)}for(const e of[this.zerosumInnerRing,this.zerosumOuterRing])e.fillOpacity=0,e.stroke=this.properties.calloutLabel.color,e.strokeWidth=1,e.strokeOpacity=1;this.updateNodeMidPoint(),this.updateSelections(),this.updateNodes(e)}updateTitleNodes(){const{oldTitle:e}=this,{title:t}=this.properties;e!==t&&(e&&this.labelGroup?.removeChild(e.node),t&&(t.node.textBaseline="bottom",this.labelGroup?.appendChild(t.node)),this.oldTitle=t)}updateNodeMidPoint(){const e=e=>{const t=e.innerRadius+(e.outerRadius-e.innerRadius)/2;e.midPoint={x:e.midCos*Math.max(0,t),y:e.midSin*Math.max(0,t)}};this.nodeData.forEach(e),this.phantomNodeData?.forEach(e)}updateSelections(){this.updateGroupSelection(),this.updateInnerCircleSelection()}updateGroupSelection(){const{itemSelection:e,highlightSelection:t,phantomSelection:i,highlightLabelSelection:n,calloutLabelSelection:s,labelSelection:r,innerLabelsSelection:o}=this,a=this.nodeData.map(e=>({...e,sectorFormat:{...e.sectorFormat}})),l=(e,t)=>{e.update(t,void 0,e=>this.getDatumId(e.datumIndex)),this.ctx.animationManager.isSkipped()&&e.cleanup()};l(e,this.nodeData),l(t,a),l(i,this.phantomNodeData??[]),s.update(this.calloutNodeData,e=>{const t=new pa;t.tag=0,t.pointerEvents=1,e.appendChild(t);const i=new Pi;i.tag=1,i.pointerEvents=1,e.appendChild(i)}),r.update(this.nodeData),n.update(a),o.update(this.properties.innerLabels,e=>{e.pointerEvents=1})}updateInnerCircleSelection(){const{innerCircle:e}=this.properties;let t=0;const i=this.getInnerRadius();if(i>0){const e=Math.min(i,this.getOuterRadius()),n=1;t=Math.ceil(2*e+n)}const n=e?[{radius:t}]:[];this.innerCircleSelection.update(n)}updateNodes(e){const t=this.ctx.highlightManager.getActiveHighlight(),{visible:i}=this;this.backgroundGroup.visible=i,this.contentGroup.visible=i,this.highlightGroup.visible=i&&t?.series===this,this.highlightLabel.visible=i&&t?.series===this,this.labelGroup.visible=i,this.contentGroup.opacity=this.getOpacity(),this.innerCircleSelection.each((e,{radius:t})=>{e.setProperties({fill:this.getNodeFill(this.properties.innerCircle?.fill,["black"],"black"),opacity:this.properties.innerCircle?.fillOpacity,size:t})});const n=this.radiusScale.range[0],s=this.radiusScale.range[1],r=this.getShapeFillBBox(),o=this.ctx.animationManager.isSkipped(),a=(e,t,i,a)=>{const l=this.getSectorFormat(t.datum,t.itemId,a);t.sectorFormat.fill=l.fill,t.sectorFormat.stroke=l.stroke,o&&(e.startAngle=t.startAngle,e.endAngle=t.endAngle,e.innerRadius=t.innerRadius,e.outerRadius=t.outerRadius),(a||o)&&(e.fill=l.fill,e.stroke=l.stroke);const c=this.getFillParams(l.fill,n,s);gc(e,l.fill,r,c),e.strokeWidth=l.strokeWidth,e.fillOpacity=l.fillOpacity,e.strokeOpacity=l.strokeOpacity,e.lineDash=l.lineDash,e.lineDashOffset=l.lineDashOffset,e.cornerRadius=l.cornerRadius,e.fillShadow=this.properties.shadow;const h=Math.max((this.properties.sectorSpacing+(null!=l.stroke?l.strokeWidth:0))/2,0);e.inset=h,e.lineJoin=this.properties.sectorSpacing>=0||h>0?"miter":"round"};this.itemSelection.each((e,t,i)=>a(e,t,0,!1)),this.highlightSelection.each((e,i,n)=>{a(e,i,0,!0),e.visible=i.itemId===t?.itemId}),this.phantomSelection.each((e,t,i)=>a(e,t,0,!1)),this.updateCalloutLineNodes(),this.updateCalloutLabelNodes(e),this.updateSectorLabelNodes(),this.updateInnerLabelNodes(),this.updateZerosumRings(),this.animationState.transition("update")}updateCalloutLineNodes(){const{calloutLine:{length:e,strokeWidth:t,colors:i},strokes:n}=this.properties,s=t,r=ot(i)?i??this.properties.strokes:n,{offset:o}=this.properties.calloutLabel;this.calloutLabelSelection.selectByTag(0).forEach(t=>{const i=t.closestDatum(),{calloutLabel:n,outerRadius:a,datumIndex:l}=i;if(n?.text&&!n.hidden&&0!==a){t.visible=!0,t.strokeWidth=s,t.stroke=r[l%r.length],t.fill=void 0;const c=i.midCos*a,h=i.midSin*a;let d=i.midCos*(a+e),u=i.midSin*(a+e);if((n.collisionTextAlign??0!==n.collisionOffsetY)&&null!=n.box){const e=n.box;let t=d,i=u;d<e.x?t=e.x:d>e.x+e.width&&(t=e.x+e.width),u<e.y?i=e.y:u>e.y+e.height&&(i=e.y+e.height);const s=t-d,r=i-u,a=Math.sqrt(Math.pow(s,2)+Math.pow(r,2)),l=a-o;l>0&&(d+=s*l/a,u+=r*l/a)}t.x1=c,t.y1=h,t.x2=d,t.y2=u}else t.visible=!1})}getLabelOverflow(e,t,i){const n=-this.centerX,s=n+i.width,r=-this.centerY,o=r+i.height;let a=1;t.x+1<n?a=(t.x+t.width-n)/t.width:t.x+t.width-1>s&&(a=(s-t.x)/t.width);const l=t.y+1<r||t.y+t.height-1>o;return{textLength:1===a?e.length:Math.floor(e.length*a)-1,hasVerticalOverflow:l,hasSurroundingSeriesOverflow:this.bboxIntersectsSurroundingSeries(t)}}bboxIntersectsSurroundingSeries(e){const{surroundingRadius:t}=this;if(null==t)return!1;const i=[{x:e.x,y:e.y},{x:e.x+e.width,y:e.y},{x:e.x+e.width,y:e.y+e.height},{x:e.x,y:e.y+e.height}],n=t**2;return i.some(e=>e.x**2+e.y**2>n)}computeCalloutLabelCollisionOffsets(){const{radiusScale:e}=this,{calloutLabel:t,calloutLine:i}=this.properties,{offset:n,minSpacing:s}=t,r=e.convert(0),o=this.calloutNodeData,a=o.filter(e=>{return!(!(t=e).calloutLabel||0===t.outerRadius);var t});if(a.forEach(e=>{const t=e.calloutLabel;null!=t&&(t.hidden=!1,t.collisionTextAlign=void 0,t.collisionOffsetY=0)}),a.length<=1)return;const l=a.filter(e=>e.midCos<0).sort((e,t)=>e.midSin-t.midSin),c=a.filter(e=>e.midCos>=0).sort((e,t)=>e.midSin-t.midSin),h=a.filter(e=>e.midSin<0&&"center"===e.calloutLabel?.textAlign).sort((e,t)=>e.midCos-t.midCos),d=a.filter(e=>e.midSin>=0&&"center"===e.calloutLabel?.textAlign).sort((e,t)=>e.midCos-t.midCos),u=e=>{const t=e.calloutLabel;if(null==t)return m.zero.clone();const s=e.outerRadius+i.length+n,r=e.midCos*s,o=e.midSin*s+t.collisionOffsetY,a=t.collisionTextAlign??t.textAlign,l=t.textBaseline;return Pi.computeBBox(t.text,r,o,{font:this.properties.calloutLabel,textAlign:a,textBaseline:l})},p=(e,t,i)=>{const n=u(e).grow(s/2),r=u(t).grow(s/2);n.x<r.x+r.width&&n.x+n.width>r.x&&("to-top"===i?n.y<r.y+r.height:n.y+n.height>r.y)&&(t.calloutLabel.collisionOffsetY="to-top"===i?n.y-r.y-r.height:n.y+n.height-r.y)},g=e=>{const t=e.slice().sort((e,t)=>Math.abs(e.midSin)-Math.abs(t.midSin))[0],i=e.indexOf(t);for(let t=i-1;t>=0;t--){const i=e[t+1],n=e[t];p(i,n,"to-top")}for(let t=i+1;t<e.length;t++){const i=e[t-1],n=e[t];p(i,n,"to-bottom")}},f=e=>{const t=a.some(e=>0!==e.calloutLabel.collisionOffsetY),i=e.map(e=>u(e)),n=i.map(e=>e.clone().grow(s/2));let l=!1;for(let t=0;t<n.length&&!l;t++){const i=n[t];for(let s=t+1;s<e.length;s++){const e=n[s];if(i.collidesBBox(e)){l=!0;break}}}const c=o.map(e=>{const{startAngle:t,endAngle:i,outerRadius:n}=e;return{startAngle:t,endAngle:i,innerRadius:r,outerRadius:n}}),h=i.some(e=>c.some(t=>zm(e,t)));(l||t||h)&&e.filter(e=>"center"===e.calloutLabel.textAlign).forEach(e=>{const t=e.calloutLabel;e.midCos<0?t.collisionTextAlign="right":e.midCos>0?t.collisionTextAlign="left":t.collisionTextAlign="center"})};g(l),g(c),f(h),f(d)}updateCalloutLabelNodes(e){const{radiusScale:t}=this,{calloutLabel:i,calloutLine:n}=this.properties,s=n.length,{offset:r,color:o}=i,a=new Pi;this.calloutLabelSelection.selectByTag(1).forEach(n=>{const l=n.closestDatum(),c=l.calloutLabel,h=t.convert(l.radius),d=Math.max(0,h);if(!c?.text||0===d||c.hidden)return void(n.visible=!1);const u=d+s+r,p=l.midCos*u,g=l.midSin*u+c.collisionOffsetY,f={textAlign:c.collisionTextAlign??c.textAlign,textBaseline:c.textBaseline};a.text=c.text,a.x=p,a.y=g,a.setFont(this.properties.calloutLabel),a.setAlign(f);const m=a.getBBox();let v=c.text,y=!0;if(i.avoidCollisions){const{textLength:t,hasVerticalOverflow:i}=this.getLabelOverflow(c.text,m,e);v=c.text.length===t?c.text:`${c.text.substring(0,t)}…`,y=!i}n.text=v,n.x=p,n.y=g,n.setFont(this.properties.calloutLabel),n.setAlign(f),n.fill=o,n.visible=y})}computeLabelsBBox(e,t){const{calloutLabel:i,calloutLine:n}=this.properties,s=n.length,{offset:r,maxCollisionOffset:o,minSpacing:a}=i;if(!i.avoidCollisions)return null;this.maybeRefreshNodeData(),this.updateRadiusScale(!1),this.computeCalloutLabelCollisionOffsets();const l=[],c=new Pi;let h;const{title:d}=this.properties;if(d?.text&&d.enabled){const e=this.getTitleTranslationY();isFinite(e)&&(c.text=d.text,c.x=0,c.y=e,c.setFont(d),c.setAlign({textBaseline:"bottom",textAlign:"center"}),h=c.getBBox(),l.push(h))}return this.calloutNodeData.forEach(i=>{const n=i.calloutLabel;if(!n||0===i.outerRadius)return null;const d=i.outerRadius+s+r,u=i.midCos*d,p=i.midSin*d+n.collisionOffsetY;c.text=n.text,c.x=u,c.y=p,c.setFont(this.properties.calloutLabel),c.setAlign({textAlign:n.collisionTextAlign??n.textAlign,textBaseline:n.textBaseline});const g=c.getBBox();if(n.box=g,Math.abs(n.collisionOffsetY)>o)n.hidden=!0;else{if(h){const e=-this.centerY,t=new m(h.x-a,e,h.width+2*a,h.y+h.height+a-e);if(g.collidesBBox(t))return void(n.hidden=!0)}if(e.hideWhenNecessary){const{textLength:e,hasVerticalOverflow:i,hasSurroundingSeriesOverflow:s}=this.getLabelOverflow(n.text,g,t),r=n.text.length>2&&e<2;if(i||r||s)return void(n.hidden=!0)}n.hidden=!1,l.push(g)}}),0===l.length?null:m.merge(l)}updateSectorLabelNodes(){const{radiusScale:e}=this,t=e.convert(0),{fontSize:i,fontStyle:n,fontWeight:s,fontFamily:r,positionOffset:o,positionRatio:a,color:l}=this.properties.sectorLabel,c=(e,c)=>{const{sectorLabel:h,outerRadius:d}=c;let u=!1;if(h&&0!==d){const p=t*(1-a)+d*a+o;e.fill=l,e.fontStyle=n,e.fontWeight=s,e.fontSize=i,e.fontFamily=r,e.text=h.text,e.x=c.midCos*p,e.y=c.midSin*p,e.textAlign="center",e.textBaseline="middle";const g=e.getBBox(),f=[[g.x,g.y],[g.x+g.width,g.y],[g.x+g.width,g.y+g.height],[g.x,g.y+g.height]],{startAngle:m,endAngle:v}=c,y={startAngle:m,endAngle:v,innerRadius:t,outerRadius:d};f.every(([e,t])=>Bm(e,t,y))&&(u=!0)}e.visible=u};this.labelSelection.each(c),this.highlightLabelSelection.each(c)}updateInnerLabelNodes(){const e=[],t=[];this.innerLabelsSelection.each((i,n)=>{const{fontStyle:s,fontWeight:r,fontSize:o,fontFamily:a,color:l}=n;i.fontStyle=s,i.fontWeight=r,i.fontSize=o,i.fontFamily=a,i.text=n.text,i.x=0,i.y=0,i.fill=l,i.textAlign="center",i.textBaseline="alphabetic",e.push(i.getBBox()),t.push(n.spacing)});const i=e=>0===e?0:t[e],n=e=>e===t.length-1?0:t[e],s=e.reduce((e,t,s)=>e+t.height+i(s)+n(s),0),r=Math.max(...e.map(e=>e.width)),o=this.getInnerRadius(),a=Math.sqrt(Math.pow(r/2,2)+Math.pow(s/2,2))<=(o>0?o:this.getOuterRadius()),l=[];for(let t=0,r=-s/2;t<e.length;t++){const s=e[t].height+r+i(t);l.push(s),r=s+n(t)}this.innerLabelsSelection.each((e,t,i)=>{e.y=l[i],e.visible=a})}updateZerosumRings(){this.zerosumOuterRing.size=2*this.getOuterRadius(),this.zerosumInnerRing.size=2*this.getInnerRadius()}pickNodeClosestDatum(e){return av(this,e)}getTooltipContent(e){const{id:t,dataModel:i,processedData:n,properties:s}=this,{legendItemKey:r,calloutLabelKey:o,calloutLabelName:a,sectorLabelKey:l,sectorLabelName:c,angleKey:h,angleName:d,radiusKey:u,radiusName:p,tooltip:g}=s,f=this.properties.title.text;if(!i||!n)return;const m=n.dataSources.get(this.id)?.[e],{angleRawValues:v,legendItemValues:y,calloutLabelValues:C,sectorLabelValues:b}=this.getProcessedDataValues(i,n),S=v[e],w=y?.[e]??(o===h?void 0:C?.[e])??(l===h?void 0:b?.[e])??d;return this.formatTooltipWithContext(g,{title:f,symbol:this.legendItemSymbol(e),data:[{label:w,fallbackLabel:h,value:Gn(S,3)}]},{seriesId:t,datum:m,title:d,legendItemKey:r,calloutLabelKey:o,calloutLabelName:a,sectorLabelKey:l,sectorLabelName:c,angleKey:h,angleName:d,radiusKey:u,radiusName:p,...this.getSectorFormat(m,e,!1)})}legendItemSymbol(e){const t=this.processedData?.dataSources.get(this.id)?.[e],i=this.getSectorFormat(t,e,!1),{fillOpacity:n,strokeOpacity:s,strokeWidth:r,lineDash:o,lineDashOffset:a}=this.properties;let{fill:l}=i;const{stroke:c}=i;return rt(l)&&(l={...l,gradient:"linear",rotation:0,reverse:!1}),{marker:{fill:l,stroke:c,fillOpacity:n,strokeOpacity:s,strokeWidth:r,lineDash:o,lineDashOffset:a}}}getLegendData(e){const{visible:t,processedData:i,dataModel:n,id:s,ctx:{legendManager:r}}=this;if(!n||!i||"category"!==e)return[];const{angleKey:o,calloutLabelKey:a,sectorLabelKey:l,legendItemKey:c,showInLegend:h}=this.properties;if(!(c||a&&a!==o||l&&l!==o))return[];const{angleRawValues:d,calloutLabelValues:u,sectorLabelValues:p,legendItemValues:g}=this.getProcessedDataValues(n,i),f=this.properties.title?.showInLegend&&this.properties.title.text,m=[],v=this.properties.hideZeroValueSectorsInLegend,y=i.dataSources.get(this.id),C=i.invalidData?.get(this.id);for(let e=0;e<i.input.count;e++){const i=y?.[e],n=d[e];if(!0===C?.[e]||v&&0===n)continue;const b=[];f&&b.push(f);const S=this.getLabels(i,2*Math.PI,2*Math.PI,!1,u?.[e],p?.[e],g?.[e]);c&&void 0!==S.legendItem?b.push(S.legendItem.text):a&&a!==o&&void 0!==S.calloutLabel?.text?b.push(S.calloutLabel?.text):l&&l!==o&&void 0!==S.sectorLabel?.text&&b.push(S.sectorLabel?.text),0!==b.length&&m.push({legendType:"category",id:s,datum:i,itemId:e,seriesId:s,hideToggleOtherSeries:!0,enabled:t&&r.getItemEnabled({seriesId:s,itemId:e}),label:{text:b.join(" - ")},symbol:this.legendItemSymbol(e),legendItemName:null!=c?i[c]:void 0,hideInLegend:!h})}return m}setLegendState(e){const{id:t,ctx:{legendManager:i,updateService:n}}=this;e.forEach((e,n)=>i.toggleItem(e,t,n)),i.update(),n.update(5)}animateEmptyUpdateReady(e){const{animationManager:t}=this.ctx,i=rv(!0,this.properties.rotation,this.radiusScale,this.previousRadiusScale);aa(this.id,"nodes",t,[this.itemSelection,this.highlightSelection,this.phantomSelection],i.nodes,(e,t)=>this.getDatumId(t.datumIndex)),aa(this.id,"innerCircle",t,[this.innerCircleSelection],i.innerCircle),yp(this,"callout",t,this.calloutLabelSelection),yp(this,"sector",t,this.labelSelection),yp(this,"highlight",t,this.highlightLabelSelection),yp(this,"inner",t,this.innerLabelsSelection),this.previousRadiusScale.range=this.radiusScale.range}animateWaitingUpdateReady(){const{itemSelection:e,highlightSelection:t,phantomSelection:i,processedData:n,radiusScale:s,previousRadiusScale:r}=this,{animationManager:o}=this.ctx,a=n?.reduced?.diff?.[this.id];this.ctx.animationManager.stopByAnimationGroupId(this.id);const l=0===(a?.moved.size??0),c=(n?.defs.keys.length??0)>0;l&&c&&(n?.reduced?.animationValidation?.uniqueKeys??1)||this.ctx.animationManager.skipCurrentBatch();const h=!this.nodeData.some(e=>e.enabled),d=rv(!1,this.properties.rotation,s,r);aa(this.id,"nodes",o,[e,t,i],d.nodes,(e,t)=>this.getDatumId(t.datumIndex),a),aa(this.id,"innerCircle",o,[this.innerCircleSelection],d.innerCircle),yp(this,"callout",this.ctx.animationManager,this.calloutLabelSelection),yp(this,"sector",this.ctx.animationManager,this.labelSelection),yp(this,"highlight",this.ctx.animationManager,this.highlightLabelSelection),this.noVisibleData!==h&&(this.noVisibleData=h,yp(this,"inner",this.ctx.animationManager,this.innerLabelsSelection)),this.previousRadiusScale.range=this.radiusScale.range}animateClearingUpdateEmpty(){const{itemSelection:e,highlightSelection:t,phantomSelection:i,radiusScale:n,previousRadiusScale:s}=this,{animationManager:r}=this.ctx,o=rv(!1,this.properties.rotation,n,s);aa(this.id,"nodes",r,[e,t,i],o.nodes,(e,t)=>this.getDatumId(t.datumIndex)),aa(this.id,"innerCircle",r,[this.innerCircleSelection],o.innerCircle),Cp(this,"callout",this.ctx.animationManager,this.calloutLabelSelection),Cp(this,"sector",this.ctx.animationManager,this.labelSelection),Cp(this,"highlight",this.ctx.animationManager,this.highlightLabelSelection),Cp(this,"inner",this.ctx.animationManager,this.innerLabelsSelection),this.previousRadiusScale.range=this.radiusScale.range}getDatumId(e){return`${e}`}};dv.className="DonutSeries",dv.type="donut";var uv={radiusMin:n.Ly,radiusMax:n.Ly,rotation:n.ai,outerRadiusOffset:n.ai,outerRadiusRatio:n.CG,hideZeroValueSectorsInLegend:n.zM,sectorSpacing:n.Ly,cornerRadius:n.Ly,itemStyler:(0,n.YI)({...n.Fu,...n.AF,...n.mL,cornerRadius:n.Ly}),title:{enabled:n.zM,text:n.Yj,showInLegend:n.zM,spacing:n.Ly,...n.LV},calloutLabel:{enabled:n.zM,offset:n.ai,minAngle:n.Ly,avoidCollisions:n.zM,formatter:n.E2,...n.LV},sectorLabel:{enabled:n.zM,positionOffset:n.ai,positionRatio:n.CG,formatter:n.E2,...n.LV},calloutLine:{colors:(0,n.jk)(n.yW),length:n.Ly,strokeWidth:n.Ly},fills:(0,n.jk)(n.Jp),strokes:(0,n.jk)(n.yW),tooltip:Nf,shadow:Of,...Tf,...n.mL,...G(n.Fu,["fill"]),...G(n.AF,["stroke"])},pv={...uv,...Df,type:(0,n.mw)((0,n.dY)("pie")),angleKey:(0,n.mw)(n.Yj),radiusKey:n.Yj,calloutLabelKey:n.Yj,sectorLabelKey:n.Yj,legendItemKey:n.Yj,angleName:n.Yj,radiusName:n.Yj,calloutLabelName:n.Yj,sectorLabelName:n.Yj};pv.defaultColorRange=(0,n._L)((0,n.jk)((0,n.jk)(n.yW))),pv.defaultPatternFills=(0,n._L)((0,n.jk)(n.yW)),pv.title._enabledFromTheme=(0,n._L)(n.zM),pv.calloutLabel._enabledFromTheme=(0,n._L)(n.zM),pv.sectorLabel._enabledFromTheme=(0,n._L)(n.zM);var gv={...uv,innerRadiusOffset:n.ai,innerRadiusRatio:n.CG,innerCircle:{fill:n.Yj,fillOpacity:n.CG},innerLabels:{spacing:n.Ly,...n.LV}},fv={...gv,...pv,type:(0,n.mw)((0,n.dY)("donut")),innerLabels:(0,n.J$)({text:(0,n.mw)(n.Yj),spacing:n.Ly,...n.LV},"inner label options array")},mv={type:"series",optionsKey:"series[]",packageType:"community",chartTypes:["polar"],identifier:"donut",moduleFactory:e=>new dv(e),tooltipDefaults:{range:"exact"},themeTemplate:{series:{title:{enabled:!0,fontWeight:{$ref:"fontWeight"},fontSize:{$rem:[1.1666666666666667]},fontFamily:{$ref:"fontFamily"},color:{$ref:"subtleTextColor"},spacing:5},calloutLabel:{enabled:!0,fontSize:{$ref:"fontSize"},fontFamily:{$ref:"fontFamily"},fontWeight:{$ref:"fontWeight"},color:{$ref:"textColor"},offset:3,minAngle:.001},sectorLabel:{enabled:!0,fontWeight:{$ref:"fontWeight"},fontSize:{$ref:"fontSize"},fontFamily:{$ref:"fontFamily"},color:{$ref:"backgroundColor"},positionOffset:0,positionRatio:.5},calloutLine:{length:10,strokeWidth:2,colors:{$map:[{$if:[{$or:[{$isGradient:[{$value:"$1"}]},{$isPattern:[{$value:"$1"}]},{$isImage:[{$value:"$1"}]}]},{$path:["../../strokes/$index",{$ref:"foregroundColor"}]},{$value:"$1"}]},{$if:[{$eq:[{$path:"../strokeWidth"},0]},{$path:"../fills"},{$path:"../strokes"}]}]}},fills:{$palette:"fills"},strokes:{$palette:"strokes"},defaultColorRange:{$palette:"gradients"},defaultPatternFills:dp,fillOpacity:1,strokeOpacity:1,strokeWidth:0,lineDash:[0],lineDashOffset:0,rotation:0,sectorSpacing:1,innerRadiusRatio:{$if:[{$eq:[{$path:["./innerRadiusOffset",void 0]},void 0]},.7,void 0]},shadow:{enabled:!1,color:Ru,xOffset:3,yOffset:3,blur:5},innerLabels:{fontSize:{$ref:"fontSize"},fontFamily:{$ref:"fontFamily"},fontWeight:{$ref:"fontWeight"},color:{$ref:"textColor"},spacing:2}},legend:{enabled:!0}}},vv={type:"series",name:"donut",chartType:"polar",options:fv,create:e=>new dv(e)},yv=class extends Fi{constructor(){super(...arguments),this.showInLegend=!1}};a([Te],yv.prototype,"showInLegend",2);var Cv=class extends pl{constructor(){super(...arguments),this.offset=3,this.minAngle=0,this.minSpacing=4,this.maxCollisionOffset=50,this.avoidCollisions=!0}};a([Te],Cv.prototype,"offset",2),a([Te],Cv.prototype,"minAngle",2),a([Te],Cv.prototype,"minSpacing",2),a([Te],Cv.prototype,"maxCollisionOffset",2),a([Te],Cv.prototype,"avoidCollisions",2);var bv=class extends pl{constructor(){super(...arguments),this.positionOffset=0,this.positionRatio=.5}};a([Te],bv.prototype,"positionOffset",2),a([Te],bv.prototype,"positionRatio",2);var Sv=class extends De{constructor(){super(...arguments),this.length=10,this.strokeWidth=1}};a([Te],Sv.prototype,"colors",2),a([Te],Sv.prototype,"length",2),a([Te],Sv.prototype,"strokeWidth",2);var wv=class extends Lp{constructor(){super(...arguments),this.defaultColorRange=[],this.defaultPatternFills=[],this.fills=Object.values(Xm),this.strokes=Object.values(Zm),this.fillOpacity=1,this.strokeOpacity=1,this.lineDash=[0],this.lineDashOffset=0,this.cornerRadius=0,this.rotation=0,this.outerRadiusOffset=0,this.outerRadiusRatio=1,this.strokeWidth=1,this.sectorSpacing=0,this.hideZeroValueSectorsInLegend=!1,this.title=new yv,this.shadow=new wp,this.calloutLabel=new Cv,this.sectorLabel=new bv,this.calloutLine=new Sv,this.tooltip=new Np}};a([Te],wv.prototype,"angleKey",2),a([Te],wv.prototype,"angleName",2),a([Te],wv.prototype,"angleFilterKey",2),a([Te],wv.prototype,"radiusKey",2),a([Te],wv.prototype,"radiusName",2),a([Te],wv.prototype,"radiusMin",2),a([Te],wv.prototype,"radiusMax",2),a([Te],wv.prototype,"calloutLabelKey",2),a([Te],wv.prototype,"calloutLabelName",2),a([Te],wv.prototype,"sectorLabelKey",2),a([Te],wv.prototype,"sectorLabelName",2),a([Te],wv.prototype,"legendItemKey",2),a([Te],wv.prototype,"defaultColorRange",2),a([Te],wv.prototype,"defaultPatternFills",2),a([Te],wv.prototype,"fills",2),a([Te],wv.prototype,"strokes",2),a([Te],wv.prototype,"fillOpacity",2),a([Te],wv.prototype,"strokeOpacity",2),a([Te],wv.prototype,"lineDash",2),a([Te],wv.prototype,"lineDashOffset",2),a([Te],wv.prototype,"cornerRadius",2),a([Te],wv.prototype,"itemStyler",2),a([Te],wv.prototype,"rotation",2),a([Te],wv.prototype,"outerRadiusOffset",2),a([Te],wv.prototype,"outerRadiusRatio",2),a([Te],wv.prototype,"strokeWidth",2),a([Te],wv.prototype,"sectorSpacing",2),a([Te],wv.prototype,"hideZeroValueSectorsInLegend",2),a([Te],wv.prototype,"title",2),a([Te],wv.prototype,"shadow",2),a([Te],wv.prototype,"calloutLabel",2),a([Te],wv.prototype,"sectorLabel",2),a([Te],wv.prototype,"calloutLine",2),a([Te],wv.prototype,"tooltip",2);var xv=class extends vc{constructor(e,t,i,n){super(e,t,i,n),this.angleKey=n.properties.angleKey,this.radiusKey=n.properties.radiusKey,this.calloutLabelKey=n.properties.calloutLabelKey,this.sectorLabelKey=n.properties.sectorLabelKey}},Ev=class extends cv{constructor(e){super({moduleCtx:e,categoryKey:void 0,pickModes:[1,0],useLabelLayer:!0,animationResetFns:{item:ov,label:bp}}),this.properties=new wv,this.phantomNodeData=void 0,this.backgroundGroup=new It({name:`${this.id}-background`,zIndex:0}),this.previousRadiusScale=new Bd,this.radiusScale=new Bd,this.phantomGroup=this.backgroundGroup.appendChild(new At({name:"phantom"})),this.phantomSelection=ua.select(this.phantomGroup,()=>this.nodeFactory(),!1),this.calloutLabelGroup=this.contentGroup.appendChild(new At({name:"pieCalloutLabels"})),this.calloutLabelSelection=new ua(this.calloutLabelGroup,At),this.zerosumRingsGroup=this.backgroundGroup.appendChild(new At({name:`${this.id}-zerosumRings`})),this.zerosumOuterRing=this.zerosumRingsGroup.appendChild(new Oc({shape:"circle"})),this.surroundingRadius=void 0,this.NodeEvent=xv,this.angleScale=new Bd,this.angleScale.domain=[0,1],this.angleScale.range=[-Math.PI,Math.PI].map(e=>e+Math.PI/2),this.phantomGroup.opacity=.2}get calloutNodeData(){return this.phantomNodeData??this.nodeData}attachSeries(e,t,i){super.attachSeries(e,t,i),e.appendChild(this.backgroundGroup)}detachSeries(e,t,i){super.detachSeries(e,t,i),e?.removeChild(this.backgroundGroup)}setSeriesIndex(e){return!!super.setSeriesIndex(e)&&(this.backgroundGroup.zIndex=[0,e],!0)}nodeFactory(){const e=new qm;return e.miterLimit=1e9,e}getSeriesDomain(e){return"angle"===e?this.angleScale.domain:this.radiusScale.domain}async processData(e){if(null==this.data)return;const{visible:t,id:i,ctx:{legendManager:s}}=this,{angleKey:r,angleFilterKey:o,radiusKey:a,calloutLabelKey:l,sectorLabelKey:c,legendItemKey:h}=this.properties,d=()=>(e,n)=>t&&s.getItemEnabled({seriesId:i,itemId:n})?e:0,u=!this.ctx.animationManager.isSkipped(),p=[],g=[];h?p.push(jh(h,"band",{id:"legendItemKey"})):l?p.push(jh(l,"band",{id:"calloutLabelKey"})):c&&p.push(jh(c,"band",{id:"sectorLabelKey"}));const f=this.radiusScale.type,m=this.angleScale.type;a&&g.push(Xh(a,{id:"radiusValue",min:this.properties.radiusMin??0,max:this.properties.radiusMax,missingValue:this.properties.radiusMax??1,processor:d}),Kh(a,f,{id:"radiusRaw",processor:d}),ad("radiusValue",[0,1],1,this.properties.radiusMin??0,this.properties.radiusMax)),l&&g.push(Kh(l,"band",{id:"calloutLabelValue"})),c&&g.push(Kh(c,"band",{id:"sectorLabelValue"})),h&&g.push(Kh(h,"band",{id:"legendItemValue"})),o&&g.push(Zh(o,m,{id:"angleFilterValue",onlyPositive:!0,invalidValue:0,processor:d}),Kh(o,m,{id:"angleFilterRaw"}),ad("angleFilterValue",[0,1],0,0)),u&&this.processedData?.reduced?.animationValidation?.uniqueKeys&&p.length>0&&g.push(vd(this.id,this.processedData)),g.push(cd()),await this.requestDataModel(e,this.data,{props:[...p,Zh(r,m,{id:"angleValue",onlyPositive:!0,invalidValue:0,processor:d}),Kh(r,m,{id:"angleRaw"}),ad("angleValue",[0,1],0,0),...g]});for(const e of this.processedData?.defs?.values??[]){const{id:t,missing:i,property:s}=e,r=_o(this,i);"angleRaw"!==t&&r>0&&n.Vy.warnOnce(`no value was found for the key '${String(s)}' on ${r} data element${r>1?"s":""}`)}this.animationState.transition("updateData")}maybeRefreshNodeData(){if(!this.nodeDataRefresh)return;const{nodeData:e=[],phantomNodeData:t}=this.createNodeData()??{};this.nodeData=e,this.phantomNodeData=t,this.nodeDataRefresh=!1}getProcessedDataValues(e,t){return{angleValues:e.resolveColumnById(this,"angleValue",t),angleRawValues:e.resolveColumnById(this,"angleRaw",t),angleFilterValues:null!=this.properties.angleFilterKey?e.resolveColumnById(this,"angleFilterValue",t):void 0,angleFilterRawValues:null!=this.properties.angleFilterKey?e.resolveColumnById(this,"angleFilterRaw",t):void 0,radiusValues:this.properties.radiusKey?e.resolveColumnById(this,"radiusValue",t):void 0,radiusRawValues:this.properties.radiusKey?e.resolveColumnById(this,"radiusRaw",t):void 0,calloutLabelValues:this.properties.calloutLabelKey?e.resolveColumnById(this,"calloutLabelValue",t):void 0,sectorLabelValues:this.properties.sectorLabelKey?e.resolveColumnById(this,"sectorLabelValue",t):void 0,legendItemValues:this.properties.legendItemKey?e.resolveColumnById(this,"legendItemValue",t):void 0}}createNodeData(){const{id:e,processedData:t,dataModel:i,angleScale:n,ctx:{legendManager:s},visible:r}=this,{rotation:o}=this.properties;if(!i||"ungrouped"!==t?.type)return;const{angleValues:a,angleRawValues:l,angleFilterValues:c,angleFilterRawValues:h,radiusValues:d,radiusRawValues:u,calloutLabelValues:p,sectorLabelValues:g,legendItemValues:f}=this.getProcessedDataValues(i,t),m=h?.some((e,t)=>e>l[t])??!1;let v=0,y=0;const C=[],b=null!=h?[]:void 0,S=t.dataSources.get(this.id)??[],w=t.invalidData?.get(this.id);return S.forEach((t,i)=>{if(!0===w?.[i])return;const S=m?c[i]:a[i],x=null==h||m?1:Math.sqrt(h[i]/l[i]),E=n.convert(v)+oe(o);v=S,y+=S;const M=n.convert(v)+oe(o),A=Math.abs(M-E),T=E+A/2,D=l[i],I=(d?.[i]??1)*x,R=u?.[i],L=f?.[i],k=this.getLabels(t,T,A,!0,p?.[i],g?.[i],L),P=this.getSectorFormat(t,i,!1),N={itemId:i,series:this,datum:t,datumIndex:i,angleValue:D,midAngle:T,midCos:Math.cos(T),midSin:Math.sin(T),startAngle:E,endAngle:M,radius:I,innerRadius:Math.max(this.radiusScale.convert(0),0),outerRadius:Math.max(this.radiusScale.convert(I),0),sectorFormat:P,radiusValue:R,legendItemValue:L,enabled:r&&s.getItemEnabled({seriesId:e,itemId:i}),...k};C.push(N),null!=b&&b.push({...N,radius:1,innerRadius:Math.max(this.radiusScale.convert(0),0),outerRadius:Math.max(this.radiusScale.convert(1),0)})}),this.zerosumOuterRing.visible=0===y,{itemId:e,nodeData:C,labelData:C,phantomNodeData:b}}getLabels(e,t,i,n,s,r,o){const{calloutLabel:a,sectorLabel:l,legendItemKey:c}=this.properties,h=!n||a.enabled?this.properties.calloutLabelKey:void 0,d=!n||l.enabled?this.properties.sectorLabelKey:void 0;if(!h&&!d&&!c)return{};const u={datum:e,angleKey:this.properties.angleKey,angleName:this.properties.angleName,radiusKey:this.properties.radiusKey,radiusName:this.properties.radiusName,calloutLabelKey:this.properties.calloutLabelKey,calloutLabelName:this.properties.calloutLabelName,sectorLabelKey:this.properties.sectorLabelKey,sectorLabelName:this.properties.sectorLabelName,legendItemKey:this.properties.legendItemKey},p={};return h&&i>=oe(a.minAngle)&&(p.calloutLabel={...this.getTextAlignment(t),text:this.getLabelText(a,{...u,value:s}),hidden:!1,collisionTextAlign:void 0,collisionOffsetY:0,box:void 0}),d&&(p.sectorLabel={text:this.getLabelText(l,{...u,value:r})}),null!=c&&null!=o&&(p.legendItem={key:c,text:o}),p}getTextAlignment(e){const t=[{textAlign:"center",textBaseline:"bottom"},{textAlign:"left",textBaseline:"middle"},{textAlign:"center",textBaseline:"hanging"},{textAlign:"right",textBaseline:"middle"}],i=se(e)- -.75*Math.PI,s=Math.floor(i/(Math.PI/2));return t[(0,n.GT)(s,t.length)]}getNodeFill(e,t,i){return uc(e,{type:"gradient",bounds:"series",colorStops:t.map(e=>({color:e})),gradient:"radial",rotation:0,reverse:!0},{type:"pattern",pattern:"forward-slanted-lines",fill:i,fillOpacity:1,backgroundFill:"none",backgroundFillOpacity:1,stroke:i,strokeOpacity:1,strokeWidth:4,rotation:0},{type:"image",backgroundFill:i,backgroundFillOpacity:1,fit:"contain",repeat:"no-repeat",rotation:0})}getFillParams(e,t,i){if(rt(e)&&"item"!==e.bounds)return{centerX:0,centerY:0,innerRadius:t,outerRadius:i}}getSectorFormat(e,t,i){const{angleKey:n,radiusKey:s,calloutLabelKey:r,sectorLabelKey:o,legendItemKey:a,fills:l,strokes:c,defaultColorRange:h,defaultPatternFills:d,itemStyler:u}=this.properties,p=c[t%c.length],{fill:g,fillOpacity:f,stroke:m,strokeWidth:v,strokeOpacity:y,lineDash:C,lineDashOffset:b,cornerRadius:S}=N(i&&this.properties.highlightStyle.item,{fill:l.length>0?l[t%l.length]:void 0,stroke:p,strokeWidth:this.getStrokeWidth(this.properties.strokeWidth),strokeOpacity:this.getOpacity()},this.properties),w=h[t%h.length],x=d[t%d.length],E=g??"black";let M;return u&&(M=this.cachedDatumCallback(this.getDatumId(t)+(i?"-highlight":"-hide"),()=>this.callWithContext(u,{datum:e,angleKey:n,radiusKey:s,calloutLabelKey:r,sectorLabelKey:o,legendItemKey:a,fill:this.getNodeFill(E,w,x),strokeOpacity:y,stroke:m,strokeWidth:v,fillOpacity:f,lineDash:C,lineDashOffset:b,cornerRadius:S,highlighted:i,seriesId:this.id}))),{fill:this.getNodeFill(M?.fill??E,w,x),fillOpacity:M?.fillOpacity??f,stroke:M?.stroke??m,strokeWidth:M?.strokeWidth??v,strokeOpacity:M?.strokeOpacity??y,lineDash:M?.lineDash??C,lineDashOffset:M?.lineDashOffset??b,cornerRadius:M?.cornerRadius??S}}getOuterRadius(){return Math.max(this.radius*this.properties.outerRadiusRatio+this.properties.outerRadiusOffset,0)}updateRadiusScale(e){const t=[0,this.getOuterRadius()];this.radiusScale.range=t,e&&(this.previousRadiusScale.range=t);const i=e=>({...e,innerRadius:Math.max(this.radiusScale.convert(0),0),outerRadius:Math.max(this.radiusScale.convert(e.radius),0)});this.nodeData=this.nodeData.map(i),this.phantomNodeData=this.phantomNodeData?.map(i)}getTitleTranslationY(){const e=Math.max(0,this.radiusScale.range[1]);return 0===e?NaN:-e-(2+(this.properties.title?.spacing??0))-Math.max(0,-e)}update({seriesRect:e}){const{title:t}=this.properties,i={seriesRectWidth:e?.width,seriesRectHeight:e?.height},n=null!=Ft(this.nodeDataDependencies,i);if(n&&(this._nodeDataDependencies=i),this.maybeRefreshNodeData(),this.updateTitleNodes(),this.updateRadiusScale(n),this.contentGroup.translationX=this.centerX,this.contentGroup.translationY=this.centerY,this.highlightGroup.translationX=this.centerX,this.highlightGroup.translationY=this.centerY,this.backgroundGroup.translationX=this.centerX,this.backgroundGroup.translationY=this.centerY,this.labelGroup&&(this.labelGroup.translationX=this.centerX,this.labelGroup.translationY=this.centerY),t){const e=this.getTitleTranslationY();t.node.y=isFinite(e)?e:0;const i=t.node.getBBox();t.node.visible=t.enabled&&isFinite(e)&&!this.bboxIntersectsSurroundingSeries(i)}this.zerosumOuterRing.fillOpacity=0,this.zerosumOuterRing.stroke=this.properties.calloutLabel.color,this.zerosumOuterRing.strokeWidth=1,this.zerosumOuterRing.strokeOpacity=1,this.updateNodeMidPoint(),this.updateSelections(),this.updateNodes(e)}updateTitleNodes(){const{oldTitle:e}=this,{title:t}=this.properties;e!==t&&(e&&this.labelGroup?.removeChild(e.node),t&&(t.node.textBaseline="bottom",this.labelGroup?.appendChild(t.node)),this.oldTitle=t)}updateNodeMidPoint(){const e=e=>{const t=e.innerRadius+(e.outerRadius-e.innerRadius)/2;e.midPoint={x:e.midCos*Math.max(0,t),y:e.midSin*Math.max(0,t)}};this.nodeData.forEach(e),this.phantomNodeData?.forEach(e)}updateSelections(){const{itemSelection:e,highlightSelection:t,phantomSelection:i,highlightLabelSelection:n,calloutLabelSelection:s,labelSelection:r}=this,o=this.nodeData.map(e=>({...e,sectorFormat:{...e.sectorFormat}})),a=(e,t)=>{e.update(t,void 0,e=>this.getDatumId(e.datumIndex)),this.ctx.animationManager.isSkipped()&&e.cleanup()};a(e,this.nodeData),a(t,o),a(i,this.phantomNodeData??[]),s.update(this.calloutNodeData,e=>{const t=new pa;t.tag=0,t.pointerEvents=1,e.appendChild(t);const i=new Pi;i.tag=1,i.pointerEvents=1,e.appendChild(i)}),r.update(this.nodeData),n.update(o)}updateNodes(e){const t=this.ctx.highlightManager.getActiveHighlight(),{visible:i}=this;this.backgroundGroup.visible=i,this.contentGroup.visible=i,this.highlightGroup.visible=i&&t?.series===this,this.highlightLabel.visible=i&&t?.series===this,this.labelGroup&&(this.labelGroup.visible=i),this.contentGroup.opacity=this.getOpacity();const n=this.radiusScale.range[0],s=this.radiusScale.range[1],r=this.getShapeFillBBox(),o=this.ctx.animationManager.isSkipped(),a=(e,t,i,a)=>{const l=this.getSectorFormat(t.datum,t.itemId,a);t.sectorFormat.fill=l.fill,t.sectorFormat.stroke=l.stroke,o&&(e.startAngle=t.startAngle,e.endAngle=t.endAngle,e.innerRadius=t.innerRadius,e.outerRadius=t.outerRadius),(a||o)&&(e.fill=l.fill,e.stroke=l.stroke);const c=this.getFillParams(l.fill,n,s);gc(e,l.fill,r,c),e.strokeWidth=l.strokeWidth,e.fillOpacity=l.fillOpacity,e.strokeOpacity=l.strokeOpacity,e.lineDash=l.lineDash,e.lineDashOffset=l.lineDashOffset,e.cornerRadius=l.cornerRadius,e.fillShadow=this.properties.shadow;const h=Math.max((this.properties.sectorSpacing+(null!=l.stroke?l.strokeWidth:0))/2,0);e.inset=h,e.lineJoin=this.properties.sectorSpacing>=0||h>0?"miter":"round"};this.itemSelection.each((e,t,i)=>a(e,t,0,!1)),this.highlightSelection.each((e,i,n)=>{a(e,i,0,!0),e.visible=i.itemId===t?.itemId}),this.phantomSelection.each((e,t,i)=>a(e,t,0,!1)),this.updateCalloutLineNodes(),this.updateCalloutLabelNodes(e),this.updateSectorLabelNodes(),this.updateZerosumRings(),this.animationState.transition("update")}updateCalloutLineNodes(){const{calloutLine:{length:e,strokeWidth:t,colors:i},strokes:n}=this.properties,s=t,r=ot(i)?i:n,{offset:o}=this.properties.calloutLabel;this.calloutLabelSelection.selectByTag(0).forEach(t=>{const i=t.closestDatum(),{calloutLabel:n,outerRadius:a,datumIndex:l}=i;if(n?.text&&!n.hidden&&0!==a){t.visible=!0,t.strokeWidth=s,t.stroke=r[l%r.length],t.fill=void 0;const c=i.midCos*a,h=i.midSin*a;let d=i.midCos*(a+e),u=i.midSin*(a+e);if((n.collisionTextAlign??0!==n.collisionOffsetY)&&null!=n.box){const e=n.box;let t=d,i=u;d<e.x?t=e.x:d>e.x+e.width&&(t=e.x+e.width),u<e.y?i=e.y:u>e.y+e.height&&(i=e.y+e.height);const s=t-d,r=i-u,a=Math.sqrt(Math.pow(s,2)+Math.pow(r,2)),l=a-o;l>0&&(d+=s*l/a,u+=r*l/a)}t.x1=c,t.y1=h,t.x2=d,t.y2=u}else t.visible=!1})}getLabelOverflow(e,t,i){const n=-this.centerX,s=n+i.width,r=-this.centerY,o=r+i.height;let a=1;t.x+1<n?a=(t.x+t.width-n)/t.width:t.x+t.width-1>s&&(a=(s-t.x)/t.width);const l=t.y+1<r||t.y+t.height-1>o;return{textLength:1===a?e.length:Math.floor(e.length*a)-1,hasVerticalOverflow:l,hasSurroundingSeriesOverflow:this.bboxIntersectsSurroundingSeries(t)}}bboxIntersectsSurroundingSeries(e){const{surroundingRadius:t}=this;if(null==t)return!1;const i=[{x:e.x,y:e.y},{x:e.x+e.width,y:e.y},{x:e.x+e.width,y:e.y+e.height},{x:e.x,y:e.y+e.height}],n=t**2;return i.some(e=>e.x**2+e.y**2>n)}computeCalloutLabelCollisionOffsets(){const{radiusScale:e}=this,{calloutLabel:t,calloutLine:i}=this.properties,{offset:n,minSpacing:s}=t,r=e.convert(0),o=this.calloutNodeData,a=o.filter(e=>{return!(!(t=e).calloutLabel||0===t.outerRadius);var t});if(a.forEach(e=>{const t=e.calloutLabel;null!=t&&(t.hidden=!1,t.collisionTextAlign=void 0,t.collisionOffsetY=0)}),a.length<=1)return;const l=a.filter(e=>e.midCos<0).sort((e,t)=>e.midSin-t.midSin),c=a.filter(e=>e.midCos>=0).sort((e,t)=>e.midSin-t.midSin),h=a.filter(e=>e.midSin<0&&"center"===e.calloutLabel?.textAlign).sort((e,t)=>e.midCos-t.midCos),d=a.filter(e=>e.midSin>=0&&"center"===e.calloutLabel?.textAlign).sort((e,t)=>e.midCos-t.midCos),u=e=>{const t=e.calloutLabel;if(null==t)return m.zero.clone();const s=e.outerRadius+i.length+n,r=e.midCos*s,o=e.midSin*s+t.collisionOffsetY,a=t.collisionTextAlign??t.textAlign,l=t.textBaseline;return Pi.computeBBox(t.text,r,o,{font:this.properties.calloutLabel,textAlign:a,textBaseline:l})},p=(e,t,i)=>{const n=u(e).grow(s/2),r=u(t).grow(s/2);n.x<r.x+r.width&&n.x+n.width>r.x&&("to-top"===i?n.y<r.y+r.height:n.y+n.height>r.y)&&(t.calloutLabel.collisionOffsetY="to-top"===i?n.y-r.y-r.height:n.y+n.height-r.y)},g=e=>{const t=e.slice().sort((e,t)=>Math.abs(e.midSin)-Math.abs(t.midSin))[0],i=e.indexOf(t);for(let t=i-1;t>=0;t--){const i=e[t+1],n=e[t];p(i,n,"to-top")}for(let t=i+1;t<e.length;t++){const i=e[t-1],n=e[t];p(i,n,"to-bottom")}},f=e=>{const t=a.some(e=>0!==e.calloutLabel.collisionOffsetY),i=e.map(e=>u(e)),n=i.map(e=>e.clone().grow(s/2));let l=!1;for(let t=0;t<n.length&&!l;t++){const i=n[t];for(let s=t+1;s<e.length;s++){const e=n[s];if(i.collidesBBox(e)){l=!0;break}}}const c=o.map(e=>{const{startAngle:t,endAngle:i,outerRadius:n}=e;return{startAngle:t,endAngle:i,innerRadius:r,outerRadius:n}}),h=i.some(e=>c.some(t=>zm(e,t)));(l||t||h)&&e.filter(e=>"center"===e.calloutLabel.textAlign).forEach(e=>{const t=e.calloutLabel;e.midCos<0?t.collisionTextAlign="right":e.midCos>0?t.collisionTextAlign="left":t.collisionTextAlign="center"})};g(l),g(c),f(h),f(d)}updateCalloutLabelNodes(e){const{radiusScale:t}=this,{calloutLabel:i,calloutLine:n}=this.properties,s=n.length,{offset:r,color:o}=i,a=new Pi;this.calloutLabelSelection.selectByTag(1).forEach(n=>{const l=n.closestDatum(),c=l.calloutLabel,h=t.convert(l.radius),d=Math.max(0,h);if(!c?.text||0===d||c.hidden)return void(n.visible=!1);const u=d+s+r,p=l.midCos*u,g=l.midSin*u+c.collisionOffsetY,f={textAlign:c.collisionTextAlign??c.textAlign,textBaseline:c.textBaseline};a.text=c.text,a.x=p,a.y=g,a.setFont(this.properties.calloutLabel),a.setAlign(f);const m=a.getBBox();let v=c.text,y=!0;if(i.avoidCollisions){const{textLength:t,hasVerticalOverflow:i}=this.getLabelOverflow(c.text,m,e);v=c.text.length===t?c.text:`${c.text.substring(0,t)}…`,y=!i}n.text=v,n.x=p,n.y=g,n.setFont(this.properties.calloutLabel),n.setAlign(f),n.fill=o,n.visible=y})}computeLabelsBBox(e,t){const{calloutLabel:i,calloutLine:n}=this.properties,s=n.length,{offset:r,maxCollisionOffset:o,minSpacing:a}=i;if(!i.avoidCollisions)return null;this.maybeRefreshNodeData(),this.updateRadiusScale(!1),this.computeCalloutLabelCollisionOffsets();const l=[],c=new Pi;let h;const{title:d}=this.properties;if(d?.text&&d.enabled){const e=this.getTitleTranslationY();isFinite(e)&&(c.text=d.text,c.x=0,c.y=e,c.setFont(d),c.setAlign({textBaseline:"bottom",textAlign:"center"}),h=c.getBBox(),l.push(h))}return this.calloutNodeData.forEach(i=>{const n=i.calloutLabel;if(!n||0===i.outerRadius)return null;const d=i.outerRadius+s+r,u=i.midCos*d,p=i.midSin*d+n.collisionOffsetY;c.text=n.text,c.x=u,c.y=p,c.setFont(this.properties.calloutLabel),c.setAlign({textAlign:n.collisionTextAlign??n.textAlign,textBaseline:n.textBaseline});const g=c.getBBox();if(n.box=g,Math.abs(n.collisionOffsetY)>o)n.hidden=!0;else{if(h){const e=-this.centerY,t=new m(h.x-a,e,h.width+2*a,h.y+h.height+a-e);if(g.collidesBBox(t))return void(n.hidden=!0)}if(e.hideWhenNecessary){const{textLength:e,hasVerticalOverflow:i,hasSurroundingSeriesOverflow:s}=this.getLabelOverflow(n.text,g,t),r=n.text.length>2&&e<2;if(i||r||s)return void(n.hidden=!0)}n.hidden=!1,l.push(g)}}),0===l.length?null:m.merge(l)}updateSectorLabelNodes(){const{radiusScale:e}=this,t=e.convert(0),{fontSize:i,fontStyle:n,fontWeight:s,fontFamily:r,positionOffset:o,positionRatio:a,color:l}=this.properties.sectorLabel,c=t>0,h=1===this.ctx.legendManager.getData(this.id)?.filter(e=>e.enabled).length,d=(e,d)=>{const{sectorLabel:u,outerRadius:p,startAngle:g,endAngle:f}=d;let m=!1;if(u&&0!==p){const v=t*(1-a)+p*a+o;e.fill=l,e.fontStyle=n,e.fontWeight=s,e.fontSize=i,e.fontFamily=r,e.text=u.text,!c&&h?(e.x=0,e.y=0):(e.x=d.midCos*v,e.y=d.midSin*v),e.textAlign="center",e.textBaseline="middle";const y=e.getBBox(),C=[[y.x,y.y],[y.x+y.width,y.y],[y.x+y.width,y.y+y.height],[y.x,y.y+y.height]],b={startAngle:g,endAngle:f,innerRadius:t,outerRadius:p};C.every(([e,t])=>Bm(e,t,b))&&(m=!0)}e.visible=m};this.labelSelection.each(d),this.highlightLabelSelection.each(d)}updateZerosumRings(){this.zerosumOuterRing.size=2*this.getOuterRadius()}pickNodeClosestDatum(e){return av(this,e)}getTooltipContent(e){const{id:t,dataModel:i,processedData:n,properties:s}=this,{legendItemKey:r,calloutLabelKey:o,calloutLabelName:a,sectorLabelKey:l,sectorLabelName:c,angleKey:h,angleName:d,radiusKey:u,radiusName:p,tooltip:g}=s,f=this.properties.title.text;if(!i||!n)return;const m=n.dataSources.get(this.id)?.[e],{angleRawValues:v,legendItemValues:y,calloutLabelValues:C,sectorLabelValues:b}=this.getProcessedDataValues(i,n),S=v[e],w=y?.[e]??(o===h?void 0:C?.[e])??(l===h?void 0:b?.[e])??d;return this.formatTooltipWithContext(g,{title:f,symbol:this.legendItemSymbol(e),data:[{label:w,fallbackLabel:h,value:Gn(S,3)}]},{seriesId:t,datum:m,title:d,legendItemKey:r,calloutLabelKey:o,calloutLabelName:a,sectorLabelKey:l,sectorLabelName:c,angleKey:h,angleName:d,radiusKey:u,radiusName:p,...this.getSectorFormat(m,e,!1)})}legendItemSymbol(e){const t=this.processedData?.dataSources.get(this.id)?.[e],i=this.getSectorFormat(t,e,!1),{fillOpacity:n,strokeOpacity:s,strokeWidth:r,lineDash:o,lineDashOffset:a}=this.properties;let{fill:l}=i;const{stroke:c}=i;return rt(l)&&(l={...l,gradient:"linear",rotation:0,reverse:!1}),{marker:{fill:l,stroke:c,fillOpacity:n,strokeOpacity:s,strokeWidth:r,lineDash:o,lineDashOffset:a}}}getLegendData(e){const{id:t,visible:i,processedData:n,dataModel:s,ctx:{legendManager:r}}=this;if(!s||!n||"category"!==e)return[];const{angleKey:o,calloutLabelKey:a,sectorLabelKey:l,legendItemKey:c,showInLegend:h}=this.properties;if(!(c||a&&a!==o||l&&l!==o))return[];const{calloutLabelValues:d,sectorLabelValues:u,legendItemValues:p,angleRawValues:g}=this.getProcessedDataValues(s,n),f=this.properties.title?.showInLegend&&this.properties.title.text,m=[],v=this.properties.hideZeroValueSectorsInLegend,y=n.dataSources.get(this.id),C=n.invalidData?.get(this.id);for(let e=0;e<n.input.count;e++){const n=y?.[e],s=g[e];if(!0===C?.[e]||v&&0===s)continue;const b=[];f&&b.push(f);const S=this.getLabels(n,2*Math.PI,2*Math.PI,!1,d?.[e],u?.[e],p?.[e]);c&&void 0!==S.legendItem?b.push(S.legendItem.text):a&&a!==o&&void 0!==S.calloutLabel?.text?b.push(S.calloutLabel?.text):l&&l!==o&&void 0!==S.sectorLabel?.text&&b.push(S.sectorLabel?.text),0!==b.length&&m.push({legendType:"category",id:t,datum:n,itemId:e,seriesId:t,hideToggleOtherSeries:!0,enabled:i&&r.getItemEnabled({seriesId:t,itemId:e}),label:{text:b.join(" - ")},symbol:this.legendItemSymbol(e),legendItemName:null!=c?n[c]:void 0,hideInLegend:!h})}return m}setLegendState(e){const{id:t,ctx:{legendManager:i,updateService:n}}=this;e.forEach((e,n)=>i.toggleItem(e,t,n)),i.update(),n.update(5)}animateEmptyUpdateReady(e){const{animationManager:t}=this.ctx,i=rv(!0,this.properties.rotation,this.radiusScale,this.previousRadiusScale);aa(this.id,"nodes",t,[this.itemSelection,this.highlightSelection,this.phantomSelection],i.nodes,(e,t)=>this.getDatumId(t.datumIndex)),yp(this,"callout",t,this.calloutLabelSelection),yp(this,"sector",t,this.labelSelection),yp(this,"highlight",t,this.highlightLabelSelection),this.previousRadiusScale.range=this.radiusScale.range}animateWaitingUpdateReady(){const{itemSelection:e,highlightSelection:t,phantomSelection:i,processedData:n,radiusScale:s,previousRadiusScale:r}=this,{animationManager:o}=this.ctx,a=n?.reduced?.diff?.[this.id];this.ctx.animationManager.stopByAnimationGroupId(this.id);const l=0===(a?.moved.size??0),c=(n?.defs.keys.length??0)>0;l&&c&&(n?.reduced?.animationValidation?.uniqueKeys??1)||this.ctx.animationManager.skipCurrentBatch();const h=rv(!1,this.properties.rotation,s,r);aa(this.id,"nodes",o,[e,t,i],h.nodes,(e,t)=>this.getDatumId(t.datumIndex),a),yp(this,"callout",this.ctx.animationManager,this.calloutLabelSelection),yp(this,"sector",this.ctx.animationManager,this.labelSelection),yp(this,"highlight",this.ctx.animationManager,this.highlightLabelSelection),this.previousRadiusScale.range=this.radiusScale.range}animateClearingUpdateEmpty(){const{itemSelection:e,highlightSelection:t,phantomSelection:i,radiusScale:n,previousRadiusScale:s}=this,{animationManager:r}=this.ctx,o=rv(!1,this.properties.rotation,n,s);aa(this.id,"nodes",r,[e,t,i],o.nodes,(e,t)=>this.getDatumId(t.datumIndex)),Cp(this,"callout",this.ctx.animationManager,this.calloutLabelSelection),Cp(this,"sector",this.ctx.animationManager,this.labelSelection),Cp(this,"highlight",this.ctx.animationManager,this.highlightLabelSelection),this.previousRadiusScale.range=this.radiusScale.range}getDatumId(e){return`${e}`}};Ev.className="PieSeries",Ev.type="pie";var Mv={type:"series",optionsKey:"series[]",packageType:"community",chartTypes:["polar"],identifier:"pie",moduleFactory:e=>new Ev(e),tooltipDefaults:{range:"exact"},themeTemplate:{series:{title:{enabled:!0,fontWeight:{$ref:"fontWeight"},fontSize:{$rem:[1.1666666666666667]},fontFamily:{$ref:"fontFamily"},color:{$ref:"subtleTextColor"},spacing:5},calloutLabel:{enabled:!0,fontSize:{$ref:"fontSize"},fontFamily:{$ref:"fontFamily"},fontWeight:{$ref:"fontWeight"},color:{$ref:"textColor"},offset:3,minAngle:.001},sectorLabel:{enabled:!0,fontWeight:{$ref:"fontWeight"},fontSize:{$ref:"fontSize"},fontFamily:{$ref:"fontFamily"},color:{$ref:"backgroundColor"},positionOffset:0,positionRatio:.5},calloutLine:{length:10,strokeWidth:2,colors:{$map:[{$if:[{$or:[{$isGradient:[{$value:"$1"}]},{$isPattern:[{$value:"$1"}]},{$isImage:[{$value:"$1"}]}]},{$path:["../../strokes/$index",{$ref:"foregroundColor"}]},{$value:"$1"}]},{$if:[{$eq:[{$path:"../strokeWidth"},0]},{$path:"../fills"},{$path:"../strokes"}]}]}},fills:{$palette:"fills"},strokes:{$palette:"strokes"},defaultColorRange:{$palette:"gradients"},defaultPatternFills:dp,fillOpacity:1,strokeOpacity:1,strokeWidth:0,lineDash:[0],lineDashOffset:0,rotation:0,sectorSpacing:1,shadow:{enabled:!1,color:Ru,xOffset:3,yOffset:3,blur:5}},legend:{enabled:!0}}},Av={type:"series",name:"pie",chartType:"polar",options:pv,create:e=>new Ev(e)};function Tv(){c.register(Jd,Cu,bh,Vf,lm,vm,Im,_m,mv,Mv,xm);for(const e of[Hd,Ah,Wd,kd,zd,Kd])jo.register(e.type,{moduleFactory:t=>new e(t)})}var Dv=["bar","line","scatter"],Iv=(e=>(e.POINTER="pointer",e.NODE="node",e.CHART="chart",e))(Iv||{}),Rv=(e=>(e.TOP="top",e.RIGHT="right",e.BOTTOM="bottom",e.LEFT="left",e.TOP_RIGHT="top-right",e.BOTTOM_RIGHT="bottom-right",e.BOTTOM_LEFT="bottom-left",e.TOP_LEFT="top-left",e.CENTER="center",e))(Rv||{}),Lv=(e=>(e.POINTER="pointer",e.NODE="node",e.TOP="top",e.RIGHT="right",e.BOTTOM="bottom",e.LEFT="left",e.TOP_LEFT="top-left",e.TOP_RIGHT="top-right",e.BOTTOM_RIGHT="bottom-right",e.BOTTOM_LEFT="bottom-left",e))(Lv||{}),kv=Symbol("IGNORED_PROP");function Pv(e,t){const i={};for(const n of Object.keys(t)){const s=t[n];s!==kv&&Object.hasOwn(e,n)&&(i[n]=s)}return i}function Nv(e){const{enabled:t,mode:i,showArrow:n,range:s,position:r,pagination:o,delay:a,wrapping:l,interaction:c,renderer:h,...d}=e,u=Pv(e,{enabled:t,showArrow:n,range:s,position:r,interaction:c,renderer:h,...d});return{chartTooltipOptions:Pv(e,{enabled:kv,showArrow:kv,range:kv,position:kv,mode:i,pagination:o,delay:a,wrapping:l,...d}),seriesTooltipOptions:u}}function Ov(e,t){if(null==t)return e;const{targets:i,...n}=t;return null!=(e=N(e,n)).targets&&null!=i&&(e.targets=_(e.targets,i)),e}var _v={fills:(0,n.Uo)((0,n.O9)(2),(0,n.jk)((0,n.fd)({color:n.yW,stop:n.ai},"")),n.hz),fillMode:(0,n.KC)("continuous","discrete")},Fv={value:(0,n.mw)(n.ai),text:n.Yj,shape:(0,n.or)((0,n.KC)("circle","cross","diamond","heart","plus","pin","square","star","triangle","line"),n.E2),placement:(0,n.KC)("before","after","middle"),spacing:n.Ly,size:n.Ly,rotation:n.ai,...n.Fu,...n.AF,...n.mL},Gv={value:(0,n.mw)(n.ai),text:n.Yj,shape:(0,n.or)((0,n.KC)("circle","cross","diamond","heart","plus","pin","square","star","triangle","line"),n.E2),placement:(0,n.KC)("inside","outside","middle"),spacing:n.Ly,size:n.Ly,rotation:n.ai,label:{...Rf,spacing:n.Ly},...n.Fu,...n.AF,...n.mL},Vv={direction:(0,n.KC)("horizontal","vertical"),cornerMode:(0,n.KC)("container","item"),cornerRadius:n.Ly,thickness:n.Ly,segmentation:{enabled:n.zM,spacing:n.Ly,interval:{values:(0,n.jk)(n.ai),step:n.ai,count:n.ai}},bar:{enabled:n.zM,thickness:n.Ly,thicknessRatio:n.CG,..._v,...n.Fu,...n.AF,...n.mL},label:{...Lf,text:n.Yj,spacing:n.Ly,avoidCollisions:n.zM,placement:(0,n.KC)("inside-start","outside-start","inside-end","outside-end","inside-center","bar-inside","bar-inside-end","bar-outside-end","bar-end")},tooltip:Nf,...G(Tf,["listeners"])},Bv={...Vv,...G(Df,["listeners"]),type:(0,n.mw)((0,n.dY)("linear-gauge")),value:(0,n.mw)(n.ai),scale:{min:(0,n.Uo)(n.ai,(0,n.Xe)("max")),max:(0,n.Uo)(n.ai,(0,n.MM)("min")),label:{enabled:n.zM,formatter:n.E2,rotation:n.ai,spacing:n.Ly,minSpacing:n.Ly,placement:(0,n.KC)("before","after"),avoidCollisions:n.zM,format:Xg,...n.LV},interval:{values:(0,n.jk)(n.ai),step:n.ai},..._v,...n.Fu,...n.AF,...n.mL},targets:(0,n.J$)(Fv,"target options array")};Bv.margin=(0,n._L)(n.ai),Bv.defaultColorRange=(0,n._L)((0,n.jk)(n.yW)),Bv.defaultTarget=(0,n._L)({...Fv,value:n.ai,label:{...Rf,spacing:n.ai}}),Bv.defaultScale=(0,n._L)(Bv.scale),Bv.scale.defaultFill=(0,n._L)(n.yW);var Hv={outerRadius:n.Ly,innerRadius:n.Ly,outerRadiusRatio:n.CG,innerRadiusRatio:n.CG,startAngle:n.ai,endAngle:n.ai,spacing:n.Ly,cornerMode:(0,n.KC)("container","item"),cornerRadius:n.Ly,scale:{min:(0,n.Uo)(n.ai,(0,n.Xe)("max")),max:(0,n.Uo)(n.ai,(0,n.MM)("min")),label:{enabled:n.zM,formatter:n.E2,rotation:n.ai,spacing:n.Ly,minSpacing:n.Ly,avoidCollisions:n.zM,format:Xg,...n.LV},interval:{values:(0,n.jk)(n.ai),step:n.ai},..._v,...n.Fu,...n.AF,...n.mL},segmentation:{enabled:n.zM,spacing:n.Ly,interval:{values:(0,n.jk)(n.ai),step:n.ai,count:n.ai}},bar:{enabled:n.zM,..._v,...n.Fu,...n.AF,...n.mL},needle:{enabled:n.zM,spacing:n.Ly,radiusRatio:n.CG,...n.Fu,...n.AF,...n.mL},label:{text:n.Yj,spacing:n.Ly,...Lf},secondaryLabel:{text:n.Yj,...Lf},tooltip:Nf,...Tf},zv={...Hv,...Df,type:(0,n.mw)((0,n.dY)("radial-gauge")),value:(0,n.mw)(n.ai),targets:(0,n.J$)(Gv,"target options array")};zv.defaultColorRange=(0,n._L)((0,n.jk)(n.yW)),zv.defaultTarget=(0,n._L)({...Gv,value:n.ai,label:{...Rf,spacing:n.ai}}),zv.scale.defaultFill=(0,n._L)(n.yW);var Uv={stroke:$u},Wv={fill:Zu},jv={color:"white",fill:$u},Kv={color:$u},$v={color:qu,fontSize:{$rem:[1.1666666666666667]},fontFamily:{$ref:"fontFamily"}},Yv={...$v,fontSize:{$ref:"fontSize"},color:ep,fill:Qu,stroke:Ju,strokeWidth:1,divider:{stroke:tp,strokeWidth:1,strokeOpacity:.5}},qv={...Uv,background:{fill:Xu,fillOpacity:.2},handle:{...Wv},text:{...Kv},statistics:{...Yv}},Xv={line:{...Uv,handle:{...Wv},text:{...Kv}},"horizontal-line":{...Uv,handle:{...Wv},axisLabel:{...jv},text:{...Kv}},"vertical-line":{...Uv,handle:{...Wv},axisLabel:{...jv},text:{...Kv}},"disjoint-channel":{...Uv,background:{fill:Xu,fillOpacity:.2},handle:{...Wv},text:{...Kv}},"parallel-channel":{...Uv,background:{fill:Xu,fillOpacity:.2},handle:{...Wv},text:{...Kv}},"fibonacci-retracement":{...Uv,strokes:Yu,rangeStroke:$u,handle:{...Wv},text:{...Kv,position:"center"},label:{...$v,color:void 0,fontSize:{$round:[{$mul:[{$ref:"fontSize"},10/12]}]}}},"fibonacci-retracement-trend-based":{...Uv,strokes:Yu,rangeStroke:$u,handle:{...Wv},text:{...Kv,position:"center"},label:{...$v,color:void 0,fontSize:{$round:[{$mul:[{$ref:"fontSize"},10/12]}]}}},callout:{...Uv,...$v,color:{$ref:"textColor"},handle:{...Wv},fill:Xu,fillOpacity:.2},comment:{...$v,color:"white",fontWeight:700,handle:{...Wv},fill:$u},note:{...$v,color:op,fill:$u,stroke:{$ref:"backgroundColor"},strokeWidth:1,strokeOpacity:1,handle:{...Wv},background:{fill:sp,stroke:rp,strokeWidth:1}},text:{...$v,handle:{...Wv}},arrow:{...Uv,handle:{...Wv},text:{...Kv}},"arrow-up":{fill:{$palette:"up.fill"},handle:{...Wv,stroke:$u}},"arrow-down":{fill:{$palette:"down.fill"},handle:{...Wv,stroke:$u}},"date-range":{...qv},"price-range":{...qv},"date-price-range":{...qv},"quick-date-price-range":{up:{...Uv,fill:Xu,fillOpacity:.2,handle:{...Wv},statistics:{...Yv,color:"#fff",fill:Xu,strokeWidth:0,divider:{stroke:"#fff",strokeWidth:1,strokeOpacity:.5}}},down:{...Uv,stroke:np,fill:ip,fillOpacity:.2,handle:{...Wv,stroke:np},statistics:{...Yv,color:"#fff",fill:ip,strokeWidth:0,divider:{stroke:"#fff",strokeWidth:1,strokeOpacity:.5}}}},axesButtons:{enabled:!0}},Zv=["ohlc","line","step-line","hlc","high-low","candlestick","hollow-candlestick"],Qv=[{icon:"trend-line-drawing",tooltip:"toolbarAnnotationsLineAnnotations",value:"line-menu"},{icon:"fibonacci-retracement-drawing",tooltip:"toolbarAnnotationsFibonacciAnnotations",value:"fibonacci-menu"},{icon:"text-annotation",tooltip:"toolbarAnnotationsTextAnnotations",value:"text-menu"},{icon:"arrow-drawing",tooltip:"toolbarAnnotationsShapeAnnotations",value:"shape-menu"},{icon:"measurer-drawing",tooltip:"toolbarAnnotationsMeasurerAnnotations",value:"measurer-menu"},{icon:"delete",tooltip:"toolbarAnnotationsClearAll",value:"clear"}],Jv="range-area";function ey(e,t){return[{type:"candlestick",focusPriority:0,...e,...t}]}function ty(e,t){return t[e]??t.default}var iy={title:{enabled:!1},label:{enabled:!1},line:{enabled:!1},gridLine:{enabled:!1},crosshair:{enabled:!1,stroke:Ku,lineDash:[0],label:{enabled:!1}}},ny={...iy,nice:!1},sy={mode:"compact",position:{anchorTo:"node",placement:["right","left"]},showArrow:!1},ry={style:[{stroke:{$ref:"gridLineColor"}}],width:2},oy={number:{gridLine:ry},time:{gridLine:ry},category:{gridLine:ry}},ay={overrides:{common:{animation:{enabled:!1},contextMenu:{enabled:!1},keyboard:{enabled:!1},background:{visible:!1},navigator:{enabled:!1},padding:{top:0,right:0,bottom:0,left:0},axes:{number:{...ny,interval:{values:[0]}},log:{...ny},time:{...ny},category:{...iy}}},bar:{series:{crisp:!1,label:{placement:"inside-end",padding:4},sparklineMode:!0},tooltip:{...sy,position:{...sy.position,anchorTo:"pointer"},range:"nearest"},axes:oy},line:{seriesArea:{padding:{top:2,right:2,bottom:2,left:2}},series:{sparklineMode:!0,strokeWidth:1,marker:{enabled:!1,size:3}},tooltip:sy},area:{seriesArea:{padding:{top:1,right:0,bottom:1,left:0}},series:{strokeWidth:1,fillOpacity:.4},tooltip:sy}}},ly=kh(function(e,t){return"string"==typeof e?{...t,baseTheme:e}:null!=e?{...e,baseTheme:ly(e.baseTheme,t)}:t});function cy(e){if(Array.isArray(e)&&0!==e.length){const t=e[0];if("number"==typeof t)return{data:e.map((e,t)=>({x:t,y:e})),series:[{xKey:"x",yKey:"y"}],datumKey:"y"};if(Array.isArray(t))return{data:e.map(e=>({x:e[0],y:e[1],datum:e})),series:[{xKey:"x",yKey:"y"}],datumKey:"datum"}}return{data:e}}function hy(e){switch(e?.type){case"number":{const{type:t,min:i,max:n,reverse:s}=e;return Pv(e,{type:t,reverse:s,min:i,max:n})}case"time":{const{type:t,min:i,max:n,reverse:s}=e;return Pv(e,{type:t,reverse:s,min:i,max:n})}default:const{paddingInner:t,paddingOuter:i,reverse:n}=e??{};return Pv({...e,type:"category"},{type:"category",reverse:n,paddingInner:t,paddingOuter:i})}}function dy(e,t,i){const n={};return null!=e?.stroke&&(n.style=[{stroke:e?.stroke}],n.enabled??(n.enabled=!0)),null!=e?.strokeWidth&&(n.width=e?.strokeWidth,n.enabled??(n.enabled=!0)),"bar"===i.type&&"horizontal"!==i.direction&&(n.enabled??(n.enabled=!0)),null!=e?.visible&&(n.enabled=e.visible),n.enabled??(n.enabled=t),n}var uy=kh((e,t,i)=>n=>{const s=n.datum[n.xKey],r=n.datum[n.yKey],o=null!=i?n.datum[i]:n.datum,a=t?.renderer?.({context:e,datum:o,xValue:s,yValue:r});if("string"==typeof a)return a;const l=a?.content??r.toFixed(2);return a?.title?{heading:void 0,title:void 0,data:[{label:a.title,value:l}]}:{heading:void 0,title:l,data:[]}}),py={chartType:(0,n.KC)("candlestick","hollow-candlestick","ohlc","line","step-line","hlc","high-low"),dateKey:n.Yj,openKey:n.Yj,highKey:n.Yj,lowKey:n.Yj,closeKey:n.Yj,volumeKey:n.Yj,navigator:n.zM,volume:n.zM,rangeButtons:n.zM,statusBar:n.zM,toolbar:n.zM,zoom:n.zM,sync:n.zM,theme:n.sw,container:n.sw,width:n.sw,height:n.sw,minWidth:n.sw,minHeight:n.sw,listeners:n.sw,initialState:n.sw,title:n.sw,data:n.YO},gy={theme:n.sw,container:n.sw,animation:n.sw,background:n.sw,contextMenu:n.sw,listeners:n.sw,locale:n.sw,width:n.sw,height:n.sw,minWidth:n.sw,minHeight:n.sw,title:n.sw,subtitle:n.sw,footnote:n.sw,padding:n.sw,tooltip:{...Nf,...Af.tooltip}};gy.overrideDevicePixelRatio=(0,n._L)(n.Ly);var fy=["showInLegend","showInMiniChart","grouped","stacked","stackGroup","tooltip","listeners","errorBar","xKey","yKey","type"],my={visible:n.zM,reverse:n.zM,stroke:n.yW,strokeWidth:n.Ly},vy={context:n.sw,tooltip:n.sw,theme:n.sw,background:n.sw,container:n.sw,width:n.sw,height:n.sw,minWidth:n.sw,minHeight:n.sw,padding:n.sw,listeners:n.sw,locale:n.sw,data:n.sw,styleNonce:n.Yj,axis:(0,n.is)({number:{...my,min:(0,n.Uo)(n.ai,(0,n.Xe)("max")),max:(0,n.Uo)(n.ai,(0,n.MM)("min"))},category:{...my,paddingInner:n.CG,paddingOuter:n.CG},time:{...my,min:(0,n.Uo)((0,n.or)(n.ai,n.p6),(0,n.Xe)("max")),max:(0,n.Uo)((0,n.or)(n.ai,n.p6),(0,n.MM)("min"))}},"axis options","category"),min:(0,n.Uo)(n.ai,(0,n.Xe)("max")),max:(0,n.Uo)(n.ai,(0,n.MM)("min")),crosshair:{enabled:n.zM,snap:n.zM,...n.AF,...n.mL},xKey:n.Yj,yKey:n.Yj},yy={type:"preset",name:"price-volume",enterprise:!0,options:py,create:function(e,t,i){const{dateKey:s="date",highKey:r="high",openKey:o="open",lowKey:a="low",closeKey:l="close",volumeKey:c="volume",chartType:h="candlestick",navigator:d=!1,volume:u=!0,rangeButtons:p=!0,statusBar:g=!0,toolbar:f=!0,zoom:m=!0,sync:v=!1,theme:y,data:C,...b}=e,S=function(e,t,i,s,r,o){const a={xKey:t,openKey:r,closeKey:o,highKey:i,lowKey:s},l={xKey:t,yKey:o},c={pickOutsideVisibleMinorAxis:!0};switch(e??"candlestick"){case"ohlc":return function(e,t){return[{type:"ohlc",focusPriority:0,...e,...t}]}(c,a);case"line":case"step-line":return function(e,t){return[{type:"line",focusPriority:0,...e,...t}]}(c,l);case"hlc":return function(e,t,{xKey:i,highKey:n,closeKey:s,lowKey:r}){return[{type:Jv,focusPriority:0,...e,xKey:i,yHighKey:n,yLowKey:s,fill:Ou,stroke:Pu},{type:Jv,focusPriority:0,...e,xKey:i,yHighKey:s,yLowKey:r,fill:_u,stroke:Nu},{type:"line",...e,...t}]}(c,l,a);case"high-low":return function(e,{xKey:t,highKey:i,lowKey:n}){return[{type:"range-bar",...e,xKey:t,yHighKey:i,yLowKey:n,fill:Gu,stroke:Fu,tooltip:{range:"nearest"},focusPriority:0,fastDataProcessing:!0}]}(c,a);case"candlestick":case"hollow-candlestick":return ey(c,a);default:return n.Vy.warnOnce(`unknown chart type: ${e}; expected one of: ${Zv.join(", ")}`),ey(c,a)}}(h,s,r,a,o,l),w=function(e,t,i,n,s){return n?[{type:"bar",xKey:"date",yKey:s,tooltip:{enabled:!1},itemStyler({datum:n}){const{up:s,down:r}=e().palette;return{fill:n[t]<n[i]?s?.fill:r?.fill}},focusPriority:1,fastDataProcessing:!0,highlight:{enabled:!1}}]:[]}(i,o,l,u,c),x={navigator:{enabled:d,...u?{miniChart:{enabled:d,series:[{type:"line",xKey:s,yKey:c,stroke:up,marker:{enabled:!1}}]},height:40,minHandle:{height:46},maxHandle:{height:46}}:null}},E={annotations:{enabled:f,optionsToolbar:{enabled:f},snap:!0,toolbar:{enabled:f,buttons:Qv,padding:0},data:C,xKey:s,volumeKey:u?c:void 0}},M=g?{statusBar:{enabled:!0,data:C,highKey:r,openKey:o,lowKey:a,closeKey:l,volumeKey:u?c:void 0}}:null,A={zoom:{enabled:m,autoScaling:{enabled:!0},enableIndependentAxes:!0}},T={ranges:{enabled:p}},D=v?{sync:{enabled:v,nodeInteraction:!0,zoom:!0}}:null,I=u?[{type:"number",position:"left",keys:[c],label:{enabled:!1},crosshair:{enabled:!1},gridLine:{enabled:!1},nice:!1,layoutConstraints:{stacked:!1,width:20,unit:"percent",align:"end"}}]:[];return{theme:{baseTheme:"string"==typeof y?y:"ag-financial",...N("object"==typeof y?y:null,{overrides:{common:{title:{padding:4},padding:{top:6,right:8,bottom:5},chartToolbar:{enabled:f},annotations:{...Xv},axes:{number:{interval:{maxSpacing:45},label:{format:".2f"}}}},bar:{series:{fillOpacity:.5}},line:{series:{marker:{enabled:!1},...ty(h,{hlc:{stroke:{$palette:"altNeutral.stroke"},strokeWidth:2},line:{stroke:{$palette:"neutral.stroke"}},"step-line":{stroke:{$palette:"neutral.stroke"},interpolation:{type:"step"}}})}},candlestick:{series:{...ty(h,{"hollow-candlestick":{item:{up:{fill:"transparent"}}}})}},"range-area":{series:{fillOpacity:.3,strokeWidth:2}}}})},animation:{enabled:!1},legend:{enabled:!1},series:[...w,...S],axes:[{type:"number",position:"right",keys:[o,l,r,a],crosshair:{enabled:!0,snap:!1},layoutConstraints:{stacked:!1,width:100,unit:"percent",align:"start"}},...I,{type:"ordinal-time",position:"bottom",line:{enabled:!1},label:{enabled:!0},crosshair:{enabled:!0}}],tooltip:{enabled:!1},data:C,...E,...x,...M,...A,...T,...D,...b}}},Cy={type:"preset",name:"gauge-preset",enterprise:!0,options:(0,n.is)({"linear-gauge":{...G(Bv,["type"]),...gy},"radial-gauge":{...G(zv,["type"]),...gy}},"gauge options"),create:function(e,t){if(e.listeners){const{nodeClick:t,nodeDoubleClick:i,...n}=e.listeners;e={...e,listeners:{seriesNodeClick:t,seriesNodeDoubleClick:i,...n}}}switch(e.type){case"radial-gauge":return function(e){const{animation:t,background:i,container:n,contextMenu:s,footnote:r,height:o,listeners:a,locale:l,minHeight:c,minWidth:h,overrideDevicePixelRatio:d,padding:u,subtitle:p,theme:g,title:f,width:m,type:v,cursor:y,nodeClickRange:C,tooltip:b={},value:S,scale:w={},startAngle:x,endAngle:E,highlightStyle:M,segmentation:A,bar:T,needle:D,targets:I,outerRadius:R,innerRadius:L,outerRadiusRatio:k,innerRadiusRatio:P,cornerRadius:N,cornerMode:O,label:_,secondaryLabel:F,spacing:G,...V}=e,{chartTooltipOptions:B,seriesTooltipOptions:H}=Nv(b),z=Pv(e,{animation:t,background:i,container:n,contextMenu:s,footnote:r,height:o,listeners:a,locale:l,minHeight:c,minWidth:h,overrideDevicePixelRatio:d,padding:u,subtitle:p,theme:g,title:f,tooltip:B,width:m}),U=Pv(e,{needle:null!=D?{enabled:!0,...D}:kv,startAngle:x,endAngle:E,scale:w,type:v,cursor:y,nodeClickRange:C,tooltip:H,value:S,highlightStyle:M,segmentation:A,bar:T,targets:I,outerRadius:R,innerRadius:L,outerRadiusRatio:k,innerRadiusRatio:P,cornerRadius:N,cornerMode:O,label:_,secondaryLabel:F,spacing:G,...V});return"context"in e&&(z.context=e.context),{...z,series:[U]}}(Ov(e,t));case"linear-gauge":return function(e){const{animation:t,background:i,container:n,contextMenu:s,footnote:r,height:o,listeners:a,locale:l,minHeight:c,minWidth:h,overrideDevicePixelRatio:d,padding:u,subtitle:p,theme:g,title:f,width:m,type:v,cursor:y,nodeClickRange:C,tooltip:b={},value:S,scale:w={},direction:x="vertical",thickness:E,highlightStyle:M,segmentation:A,bar:T,targets:D,cornerRadius:I,cornerMode:R,label:L,...k}=e,{chartTooltipOptions:P,seriesTooltipOptions:N}=Nv(b),O=Pv(e,{animation:t,background:i,container:n,contextMenu:s,footnote:r,height:o,listeners:a,locale:l,minHeight:c,minWidth:h,overrideDevicePixelRatio:d,padding:u,subtitle:p,theme:g,title:f,tooltip:P,width:m}),_=Pv(e,{scale:w,type:v,cursor:y,nodeClickRange:C,tooltip:N,value:S,direction:x,thickness:E,highlightStyle:M,segmentation:A,bar:T,targets:D,cornerRadius:I,cornerMode:R,label:L,...k});return"context"in e&&(O.context=e.context),{...O,series:[_]}}(Ov(e,t));default:return{}}}},by={type:"preset",name:"sparkline",options:(0,n.is)({area:{...vy,...G(Gf,fy)},bar:{...vy,...G(am,fy)},line:{...vy,...G(Dm,fy)}},"sparkline options"),create:function(e){const{background:t,container:i,height:n,listeners:s,locale:r,minHeight:o,minWidth:a,overrideDevicePixelRatio:l,padding:c,width:h,theme:d,data:u,crosshair:p,axis:g,min:f,max:m,tooltip:v,context:y,styleNonce:C,...b}=e,S=Pv(e,{background:t,container:i,height:n,listeners:s,locale:r,minHeight:o,minWidth:a,overrideDevicePixelRatio:l,padding:c,width:h,styleNonce:C,tooltip:kv,context:kv,data:kv,crosshair:kv,axis:kv,min:kv,max:kv,theme:kv}),{data:w,series:[x]=[],datumKey:E}=cy(u),M=b;null!=x&&Object.assign(M,x),M.tooltip={...v,renderer:uy(y,v,E)},S.theme=ly(d,ay),S.data=w,S.series=[M];const A="bar"!==M.type||"horizontal"!==M.direction,[T,D]=A?["bottom","left"]:["left","bottom"],I={...hy(g),position:T,...Pv(e,{crosshair:p})},R={type:"number",gridLine:dy(g,!1,e),position:D,...Pv(e,{min:f,max:m})};return S.axes=A?[R,I]:[I,R],S},processData:cy},Sy=["top","right","bottom","left"],wy=class e extends gh{constructor(e,t){super(e,t),this.paired=!0,this.lastUpdateClipRect=void 0,this.lastLayoutWidth=NaN,this.lastLayoutHeight=NaN}onAxisChange(e,t){super.onAxisChange(e,t),this.syncAxisChanges(e,t),null!=this.ctx&&this.ctx.zoomManager.updateAxes(e)}destroySeries(e){super.destroySeries(e),this.lastLayoutWidth=NaN,this.lastLayoutHeight=NaN}getChartType(){return"cartesian"}setRootClipRects(e){const{seriesRoot:t,annotationRoot:i}=this;t.setClipRect(e),i.setClipRect(e)}async processData(){await super.processData(),"init"===this.syncStatus&&(this.syncStatus="domains-calculated"),this.ctx.updateService.dispatchProcessData({series:{shouldFlipXY:this.shouldFlipXY()}})}async processDomains(){await super.processDomains();for(const e of this.axes){const t=await this.getSyncedDomain(e);null!=t&&e.setDomains(t)}}performLayout(e){const{seriesRoot:t,annotationRoot:i}=this,{clipSeries:n,seriesRect:s,visible:r}=this.updateAxes(e.layoutBox);this.seriesRoot.visible=r,this.seriesRect=s,this.animationRect=e.layoutBox;const{x:o,y:a}=s;if(e.width!==this.lastLayoutWidth||e.height!==this.lastLayoutHeight)for(const e of[t,i])e.translationX=Math.floor(o),e.translationY=Math.floor(a);else{const{translationX:e,translationY:n}=t;la(this.id,"seriesRect",this.ctx.animationManager,[t,i],{translationX:e,translationY:n},{translationX:Math.floor(o),translationY:Math.floor(a)},{phase:"update"})}this.lastLayoutWidth=e.width,this.lastLayoutHeight=e.height;const l=s.clone().grow(this.seriesArea.padding),c=this.seriesArea.clip||n?l:void 0,{lastUpdateClipRect:h}=this;this.lastUpdateClipRect=c,this.ctx.animationManager.isActive()&&null!=h?this.ctx.animationManager.animate({id:this.id,groupId:"clip-rect",phase:"update",from:h,to:l,onUpdate:e=>this.setRootClipRects(e),onComplete:()=>this.setRootClipRects(c)}):this.setRootClipRects(c),this.ctx.layoutManager.emitLayoutComplete(e,{axes:this.axes.map(e=>e.getLayoutState()),series:{visible:r,rect:s,paddedRect:l},clipSeries:n})}updateAxes(e){const{clipSeries:t,seriesRect:i,overflows:n}=this.resolveAxesLayout(e);for(const t of this.axes)t.update(),t.setCrossLinesVisible(!n),this.clipAxis(t,i,e);return{clipSeries:t,seriesRect:i,visible:!n}}resolveAxesLayout(e){let t,i,s=0;do{if(i=t??this.getDefaultState(),t=this.updateAxesPass(new Map(i.axisAreaWidths),e.clone()),s++>10){n.Vy.warn("Max iterations reached. Unable to stabilize axes layout.");break}}while(!this.isLayoutStable(t,i));return this.lastAreaWidths=t.axisAreaWidths,t}updateAxesPass(t,i){const s=new Map,r={};let o=!1,a=!1;for(const e of Sy){const t=this.seriesArea.padding[e],n=this.axes.findLast(t=>t.position===e);n?n.seriesAreaPadding=t:i.shrink(t,e)}const l=(t.get("left")??0)+(t.get("right")??0),c=(t.get("top")??0)+(t.get("bottom")??0),h=this.buildCrossLinePadding(t),d=h.left+h.right,u=h.top+h.bottom;i.width<=l+d||i.height<=c+u?o=!0:i.shrink(h);const p=i.clone().shrink(Object.fromEntries(t));for(const e of this.axes){const{position:t="left",direction:i}=e;this.sizeAxis(e,p,t);const n="y"===i,{primaryTickCount:o,bbox:l}=e.calculateLayout(e.nice?r[i]:void 0,this.padding);r[i]??(r[i]=o),a||(a=e.dataDomain.clipped||e.visibleRange[0]>0||e.visibleRange[1]<1),s.set(e.id,Math.ceil(e.thickness??(n?l?.width:l?.height)??0))}const g=(0,n.$z)(this.axes,e=>e.position??"left"),{width:f,height:m,pixelRatio:v}=this.ctx.scene,y=new Map,C=new Map;for(const[t,i]of(0,n.jO)(g)){let n="left"===t||"right"===t?m%v:f%v,r=0;for(const t of i??[]){C.set(t.id,n);const i=s.get(t.id)??0;r=Math.max(r,n+i),t.layoutConstraints.stacked&&(n+=i+e.AxesPadding)}y.set(t,Math.ceil(r))}for(const[e,t]of(0,n.jO)(g))this.positionAxes({axes:t??[],position:e,axisWidths:s,axisOffsets:C,axisAreaWidths:y,axisBound:i,seriesRect:p});return{clipSeries:a,seriesRect:p,axisAreaWidths:y,overflows:o}}buildCrossLinePadding(e){const t={top:0,right:0,bottom:0,left:0};this.axes.forEach(e=>{const{position:i,label:n}=e;e.crossLines?.forEach(e=>{var s;e instanceof ul&&(e.position=i??"top",(s=e.label).parallel??(s.parallel=n.parallel)),e.calculatePadding?.(t)})});for(const[i,s=0]of(0,n.jO)(t))t[i]=Math.max(s-(e.get(i)??0),0);return t}clampToOutsideSeriesRect(e,t,i,n){const s="x"===i?e.x:e.y,r="x"===i?e.width:e.height;return 1===n?Math.min(t,s+r):Math.max(t,s)}async getSyncedDomain(e){const t=this.modulesManager.getModule("sync");if(t?.enabled)return await t.getSyncedDomain(e)}syncAxisChanges(e,t){const i=this.modulesManager.getModule("sync");if(!i?.enabled)return;const n=new Set(t??[]);for(const t of e)n.delete(t);for(const e of n)i.removeAxis(e)}sizeAxis(e,t,i){const n=e instanceof Ah,s="left"===i||"right"===i,{width:r,height:o}=t,a=s?o:r;let l=0,c=a,{min:h,max:d}=this.ctx.zoomManager.getAxisZoom(e.id);const{width:u,unit:p,align:g}=e.layoutConstraints;c="px"===p?l+u:c*u/100,"end"===g&&(l=a-(c-l),c=a),s&&(n?[h,d]=[1-d,1-h]:[l,c]=[c,l]),e.range=[l,c],e.visibleRange=[h,d],e.gridLength=s?r:o}positionAxes(e){const{axes:t,axisBound:i,axisWidths:n,axisOffsets:s,axisAreaWidths:r,seriesRect:o,position:a}=e,l=r.get(a)??0;let c="x",h="y",d=1;"top"!==a&&"bottom"!==a||(c="y",h="x");let u=i[c];"right"!==a&&"bottom"!==a||(d=-1,u+="x"===c?i.width:i.height);for(const e of t){const t=r.get("x"===h?"left":"top")??0,a=n.get(e.id)??0,p=s.get(e.id)??0;e.gridPadding=l-p-a,e.translation[h]=i[h]+t,e.translation[c]=this.clampToOutsideSeriesRect(o,u+d*(p+a),c,d)}}shouldFlipXY(){return this.series.every(e=>e instanceof jp&&e.shouldFlipXY())}getDefaultState(){const e=new Map;if(this.lastAreaWidths)for(const{position:t="left"}of this.axes){const i=this.lastAreaWidths.get(t);null!=i&&e.set(t,i)}return{axisAreaWidths:e,clipSeries:!1,overflows:!1}}isLayoutStable(e,t){if(t.overflows!==e.overflows||t.clipSeries!==e.clipSeries)return!1;for(const i of e.axisAreaWidths.keys())if(!t.axisAreaWidths.has(i))return!1;for(const[i,n]of t.axisAreaWidths.entries()){const t=e.axisAreaWidths.get(i);if((null!=n||null!=t)&&n!==t)return!1}return!0}clipAxis(e,t,i){const n=Math.ceil(e.gridLine?.width??0),s=Math.ceil(e.line?.width??0);let{width:r,height:o}=t;switch(r+="x"===e.direction?n:s,o+="y"===e.direction?n:s,e.clipGrid(t.x,t.y,r,o),e.position){case"left":case"right":e.clipTickLines(i.x,t.y-n,i.width+n,t.height+2*n);break;case"top":case"bottom":e.clipTickLines(t.x-n,i.y,t.width+2*n,i.height+n)}}};wy.className="CartesianChart",wy.type="cartesian",wy.AxesPadding=15;var xy=wy,Ey={mode:(0,n._L)((0,n.KC)("integrated","standalone")),container:n.Sc,theme:n.sw,series:n.YO,annotations:n.sw,navigator:n.sw,initialState:{chartType:n.Yj,annotations:n.sw,legend:(0,n.J$)({visible:n.zM,seriesId:n.Yj,itemId:n.Yj,legendItemName:n.Yj},"legend state array"),zoom:n.sw}},My={...Af,...Ey,axes:n.sw,data:n.YO},Ay={...Af,...Ey,axes:n.sw,data:n.YO},Ty={...Af,...Ey,data:n.YO,topology:n.eW},Dy={...Af,...Ey,data:n.YO},Iy={...Af,...Ey,data:n.YO},Ry={...Af,...Ey,data:n.YO,nodes:n.YO},Ly={...Af,...Ey,data:n.YO},ky=new Set(["number","log","time"]),Py=e=>(0,n.Gv)(e)&&!ky.has(e.type),Ny={type:"chart",name:"cartesian",options:My,detect:Ql,create:(e,t)=>new xy(e,t),validate(e,t,i){const s=[];"histogram"===e?.series?.[0]?.type&&e?.axes?.some(Py)&&(s.push(new n.yI("invalid","only continuous axis types when histogram series is used",e.axes,i,"axes")),e=G(e,["axes"]));const r=(0,n.tf)(e,t,i);return r.invalid.push(...s),r}},Oy=()=>{throw new Error("Enterprise module placeholder cannot be initialised")},_y={type:"chart",name:"flow-proportion",placeholder:!0,options:{},detect:ic,create:Oy},Fy={type:"chart",name:"gauge",placeholder:!0,options:{},detect:sc,create:Oy},Gy={type:"chart",name:"hierarchy",placeholder:!0,options:{},detect:ec,create:Oy},Vy={type:"chart",name:"standalone",placeholder:!0,options:{},detect:nc,create:Oy},By={type:"chart",name:"topology",placeholder:!0,options:{},detect:tc,create:Oy},Hy=class extends zl{constructor(){super(...arguments),this.shape="polygon",this.innerRadiusRatio=0,this.defaultTickMinSpacing=20}layoutCrossLines(){const e=this.label.getSideFlag(),t=this.isAnySeriesActive(),{rotation:i,parallelFlipRotation:n,regularFlipRotation:s}=this.calculateRotations();this.crossLines.forEach(r=>{r.sideFlag=-e,r.direction=i===-Math.PI/2?"angle":"radius",r.parallelFlipRotation=n,r.regularFlipRotation=s,r.calculateLayout?.(t,this.reverse)})}updatePosition(){super.updatePosition();const e=Math.floor(this.translation.x),t=Math.floor(this.translation.y);this.tickLineGroup.translationX=e,this.tickLineGroup.translationY=t,this.tickLabelGroup.translationX=e,this.tickLabelGroup.translationY=t,this.crossLineRangeGroup.translationX=e,this.crossLineRangeGroup.translationY=t,this.crossLineLineGroup.translationX=e,this.crossLineLineGroup.translationY=t,this.crossLineLabelGroup.translationX=e,this.crossLineLabelGroup.translationY=t,this.tickLabelGroupSelection.each((e,t)=>({x:t.x,y:t.y,rotationCenterX:t.rotationCenterX,rotationCenterY:t.rotationCenterY,rotation:t.rotation}))}computeLabelsBBox(e,t){return null}computeRange(){}getAxisLinePoints(){}};a([Te],Hy.prototype,"shape",2),a([Te],Hy.prototype,"innerRadiusRatio",2);var zy=class extends gh{constructor(e,t){super(e,t),this.padding=new si(40),this.ctx.axisManager.axisGroup.zIndex=6}getChartType(){return"polar"}async performLayout(e){const{layoutBox:t}=e;t.shrink(this.seriesArea.padding.toJson());const i=t.clone();this.seriesRect=i,this.animationRect=i,this.seriesRoot.translationX=i.x,this.seriesRoot.translationY=i.y,await this.computeCircle(i),this.axes.forEach(e=>e.update()),this.ctx.layoutManager.emitLayoutComplete(e,{series:{visible:!0,rect:i,paddedRect:i}})}updateAxes(e,t,i,n){const s=this.axes.find(e=>"angle"===e.direction),r=this.axes.find(e=>"radius"===e.direction);if(!(s instanceof Hy&&r instanceof Hy))return;const o=s.scale,a=r.innerRadiusRatio;s.innerRadiusRatio=a,s.computeRange(),s.gridLength=n,r.gridAngles=o.ticks({nice:s.nice,interval:void 0,tickCount:void 0,minTickCount:0,maxTickCount:1/0})?.ticks?.map(e=>o.convert(e)),r.gridRange=s.range,r.range=[n,n*a],[s,r].forEach(n=>{n.translation.x=e.x+t,n.translation.y=e.y+i,n.calculateLayout()})}async computeCircle(e){const t=this.series.filter(Uy),i=this.axes.filter(Wy),s=(i,n,s)=>{this.updateAxes(e,i,n,s),t.forEach(e=>{e.centerX=i,e.centerY=n,e.radius=s});const r=t.filter(e=>"donut"===e.type||"pie"===e.type);if(r.length>1){const e=r.map(e=>{const t=e.getInnerRadius();return{series:e,innerRadius:t}}).sort((e,t)=>e.innerRadius-t.innerRadius);e.at(-1).series.surroundingRadius=void 0;for(let t=0;t<e.length-1;t++)e[t].series.surroundingRadius=e[t+1].innerRadius}},r=e.width/2,o=e.height/2,a=Math.max(0,Math.min(e.width,e.height)/2);let l=a;s(r,o,l);const c=async({hideWhenNecessary:c=!1}={})=>{const h=[];for(const s of(0,n.nl)(i,t)){const t=await s.computeLabelsBBox({hideWhenNecessary:c},e);t&&h.push(t)}if(0===h.length)return void s(r,o,a);const d=m.merge(h),u=this.refineCircle(d,l,e);s(u.centerX,u.centerY,u.radius),l=u.radius};await c(),await c(),await c(),await c({hideWhenNecessary:!0}),await c({hideWhenNecessary:!0});for(const s of(0,n.nl)(i,t))await s.computeLabelsBBox({hideWhenNecessary:!0},e);return{radius:l,centerX:r,centerY:o}}refineCircle(e,t,i){const n=-t,s=-t,r=t,o=t;let a=Math.max(0,n-e.x),l=Math.max(0,s-e.y),c=Math.max(0,e.x+e.width-r),h=Math.max(0,e.y+e.height-o);a=c=Math.max(a,c),l=h=Math.max(l,h);const d=i.width-a-c,u=i.height-l-h;let p=Math.min(d,u)/2;const g=.5*i.width/2,f=.5*i.height/2,m=Math.min(g,f);if(p<m){p=m;const e=a+c;if(2*p+(l+h)>i.height){const e=i.height-2*p;2*Math.min(l,h)>e?(l=e/2,h=e/2):l>h?l=e-h:h=e-l}if(2*p+e>i.width){const e=i.width-2*p;2*Math.min(a,c)>e?(a=e/2,c=e/2):a>c?a=e-c:c=e-a}}const v=a+2*p+c,y=l+2*p+h;return{centerX:(i.width-v)/2+a+p,centerY:(i.height-y)/2+l+p,radius:p}}};function Uy(e){return e instanceof cv}function Wy(e){return e instanceof Hy}zy.className="PolarChart",zy.type="polar";var jy={type:"chart",name:"polar",options:Ay,detect:Jl,create:(e,t)=>new zy(e,t),validate(e,t,i){const s=[],r=e?.series?.[0]?.type;"pie"!==r&&"donut"!==r||e?.axes&&(s.push(new n.Bk([],e.axes,i,"axes")),e=G(e,["axes"]));const o=(0,n.tf)(e,t,i);return o.invalid.push(...s),o}},Ky={...lf,...hf(n.ai),type:(0,n.mw)((0,n.dY)("number")),label:nf,crosshair:cf(!0)},$y={...lf,...hf(n.ai),type:(0,n.mw)((0,n.dY)("log")),base:(0,n.Uo)(n.MX,(0,n.W$)(e=>1!==e,"not equal to 1")),label:nf,crosshair:cf(!0)},Yy={...lf,...hf((0,n.or)(n.ai,n.p6),!0),type:(0,n.mw)((0,n.dY)("time")),label:sf,parentLevel:of,crosshair:cf(!0)};Yy.paddingInner=n.Ly,Yy.paddingOuter=n.Ly,Yy.groupPaddingInner=n.Ly;var qy={...lf,type:(0,n.mw)((0,n.dY)("category")),label:tf,paddingInner:n.CG,paddingOuter:n.CG,groupPaddingInner:n.CG,crosshair:cf()},Xy={...lf,type:(0,n.mw)((0,n.dY)("grouped-category")),label:tf,crosshair:cf(),paddingInner:n.CG,groupPaddingInner:n.CG,depthOptions:(0,n.J$)({label:{enabled:n.zM,avoidCollisions:n.zM,rotation:n.ai,spacing:n.ai,...n.LV},tick:{enabled:n.zM,stroke:n.yW,width:n.Ly}},"depth options objects array")},Zy={...lf,...hf((0,n.or)(n.ai,n.p6),!0),type:(0,n.mw)((0,n.dY)("unit-time")),unit:(0,n.or)((0,n.hR)(Cr),qg),label:sf,parentLevel:of,paddingInner:n.CG,paddingOuter:n.CG,groupPaddingInner:n.CG,crosshair:cf(!0)},Qy=(e,t)=>{const i={};for(const s of new Set([...Object.keys(e),...Object.keys(t)])){const r=e[s],o=t[s];(0,n.Qd)(r)&&(0,n.Qd)(o)?i[s]=Qy(r,o):i[s]=null!=r&&null!=o&&r!==o?(0,n.or)(r,o):r??o}return i},Jy=[Ny,{type:"axis",name:"number",chartType:"cartesian",options:Ky,create:e=>new Hd(e)},{type:"axis",name:"log",chartType:"cartesian",options:$y,create:e=>new zd(e)},{type:"axis",name:"time",chartType:"cartesian",options:Qy(Yy,Zy),create:e=>new Wd(e)},{type:"axis",name:"category",chartType:"cartesian",options:qy,create:e=>new Ah(e)},{type:"axis",name:"grouped-category",chartType:"cartesian",options:Xy,create:e=>new kd(e)},{type:"axis",name:"unit-time",chartType:"cartesian",options:Zy,create:e=>new Kd(e)},Bf,cm,ym,Em,Rm,Fm,jy,vv,Av,_y,Fy,Gy,Vy,By,yy,Cy,by],eC={isEnterprise:!1};function tC(e,t){let i=[];const s=sc(e),r=Zl(e),o=r?Qo.get(r):"unknown";for(const t of Ko)if("unknown"===o||t.chartTypes.includes(o))if("root"===t.type||"legend"===t.type){const n=e[t.optionsKey];if(null==n)continue;t.optionsInnerKey?n[t.optionsInnerKey]&&(i.push(`${t.optionsKey}.${t.optionsInnerKey}`),delete n[t.optionsInnerKey]):(i.push(t.optionsKey),delete e[t.optionsKey])}else if("axis"===t.type){if(!("axes"in e)||!(0,n.cy)(e.axes)||!e.axes?.some(e=>e.type===t.identifier))continue;i.push(`axis[type=${t.identifier}]`),e.axes=e.axes.filter(e=>e.type!==t.identifier)}else if("axis-option"===t.type){if(!("axes"in e)||!(0,n.cy)(e.axes)||!e.axes?.some(e=>e[t.optionsKey]))continue;i.push(`axis.${t.optionsKey}`),e.axes.forEach(e=>{e[t.optionsKey]&&delete e[t.optionsKey]})}else if("series"===t.type){if(t.community)continue;if(!(0,n.cy)(e.series)||!e.series?.some(e=>e.type===t.identifier))continue;i.push(`series[type=${t.identifier}]`),e.series=e.series.filter(e=>e.type!==t.identifier)}else if("series-option"===t.type){if(!(0,n.cy)(e.series)||!e.series?.some(e=>e[t.optionsKey]))continue;i.push(`series.${t.optionsKey}`),e.series.forEach(e=>{e[t.optionsKey]&&delete e[t.optionsKey]})}if(i.length&&!t){s&&(i=["AgCharts.createGauge"]);let t="ag-charts-enterprise",r="https://www.ag-grid.com/charts/javascript/installation/";"integrated"===e.mode&&(t="ag-grid-charts-enterprise' or 'ag-grid-enterprise/charts-enterprise",r="https://www.ag-grid.com/javascript-data-grid/integrated-charts-installation/"),n.Vy.warnOnce([`unable to use these enterprise features as '${t}' has not been loaded:`,"",...i,"",`See: ${r}`].join("\n"))}}function iC(e){return e?.up||e?.down||e?.neutral?"user-full":e?.fills||e?.strokes?"user-indexed":"inbuilt"}var nC="white",sC={get cartesian(){return{seriesTypes:Qo.cartesianTypes,commonOptions:["zoom","navigator"]}},get polar(){return{seriesTypes:Qo.polarTypes,commonOptions:[]}},get hierarchy(){return{seriesTypes:Qo.hierarchyTypes,commonOptions:[]}},get topology(){return{seriesTypes:Qo.topologyTypes,commonOptions:[]}},get"flow-proportion"(){return{seriesTypes:Qo.flowProportionTypes,commonOptions:[]}},get standalone(){return{seriesTypes:Qo.standaloneTypes,commonOptions:[]}},get gauge(){return{seriesTypes:Qo.gaugeTypes,commonOptions:[]}}},rC={"radial-gauge":!0,"linear-gauge":!0};function oC(e){return!0===rC[e]}var aC={millisecond:"%H:%M:%S.L",second:"%H:%M:%S",minute:"%H:%M",hour:"%H:%M",day:"%e %B",month:"%B",year:"%Y"},lC="%H:%M:%S.%L",cC="%H:%M:%S",hC="%H:%M",dC="%H:%M",uC=Object.values(sC).reduce((e,{commonOptions:t})=>e.concat(t),[]),pC=class e{static getDefaultColors(){return{fills:Xm,fillsFallback:Object.values(Xm),strokes:Zm,sequentialColors:mp(Xm),divergingColors:[Xm.ORANGE,Xm.YELLOW,Xm.GREEN],hierarchyColors:["#fff","#e0e5ea","#c1ccd5","#a3b4c1","#859cad"],secondSequentialColors:me.interpolate([me.fromHexString(Xm.BLUE),me.fromHexString("#cbdef5")],8).map(e=>e.toString()),secondDivergingColors:[Xm.GREEN,Xm.YELLOW,Xm.RED],secondHierarchyColors:["#fff","#c5cbd1","#a4b1bd","#8498a9","#648096"],up:{fill:Xm.GREEN,stroke:Zm.GREEN},down:{fill:Xm.RED,stroke:Zm.RED},neutral:{fill:Xm.GRAY,stroke:Zm.GRAY},altUp:{fill:Xm.BLUE,stroke:Zm.BLUE},altDown:{fill:Xm.ORANGE,stroke:Zm.ORANGE},altNeutral:{fill:Xm.GRAY,stroke:Zm.GRAY}}}static getDefaultPublicParameters(){return{accentColor:"#2196f3",axisColor:{$foregroundBackgroundMix:[.675]},backgroundColor:nC,borderColor:{$foregroundBackgroundMix:[.818]},foregroundColor:"#464646",fontFamily:"Verdana, sans-serif",fontSize:12,fontWeight:400,gridLineColor:{$foregroundBackgroundAccentMix:[.93,.085]},padding:20,subtleTextColor:{$mix:[{$ref:"textColor"},{$ref:"backgroundColor"},.38]},textColor:{$ref:"foregroundColor"},chromeBackgroundColor:{$foregroundBackgroundMix:[.975]},chromeFontFamily:{$ref:"fontFamily"},chromeFontSize:{$ref:"fontSize"},chromeFontWeight:{$ref:"fontWeight"},chromeTextColor:"#181d1f",chromeSubtleTextColor:{$mix:[{$ref:"chromeTextColor"},{$ref:"backgroundColor"},.38]},inputBackgroundColor:{$ref:"backgroundColor"},inputTextColor:{$ref:"textColor"},crosshairLabelBackgroundColor:{$ref:"foregroundColor"},crosshairLabelTextColor:{$ref:"backgroundColor"}}}static getAxisDefaults(e,{title:t,time:i}){const n="modern"===i?aC:void 0;return N(e,t&&{title:{enabled:!1,text:"Axis Title",spacing:25,fontWeight:{$ref:"fontWeight"},fontSize:{$rem:[1.0833333333333333]},fontFamily:{$ref:"fontFamily"},color:{$ref:"textColor"}}},"off"!==i&&{label:{format:{millisecond:{$if:[{$path:["../../parentLevel/enabled",{$path:"../enabled"}]},lC,n?.millisecond]},second:{$if:[{$path:["../../parentLevel/enabled",{$path:"../enabled"}]},cC,n?.second]},minute:{$if:[{$path:["../../parentLevel/enabled",{$path:"../enabled"}]},hC,n?.minute]},hour:{$if:[{$path:["../../parentLevel/enabled",{$path:"../enabled"}]},dC,n?.hour]},day:{$if:[{$path:["../../parentLevel/enabled",{$path:"../enabled"}]},"%e",n?.day]},month:{$if:[{$path:["../../parentLevel/enabled",{$path:"../enabled"}]},"%b",n?.month]},year:{$if:[{$path:["../../parentLevel/enabled",{$path:"../enabled"}]},"%Y",n?.year]}}},parentLevel:{enabled:!1,label:{enabled:{$path:"../../label/enabled"},fontSize:{$path:"../../label/fontSize"},fontFamily:{$path:"../../label/fontFamily"},fontWeight:"bold",spacing:{$path:"../../label/spacing"},color:{$path:"../../label/color"},avoidCollisions:{$path:"../../label/avoidCollisions"},format:{millisecond:{$path:["../../../label/format/millisecond",lC]},second:{$path:["../../../label/format/second",cC]},minute:{$path:["../../../label/format/minute",hC]},hour:{$path:["../../../label/format/hour",dC]},day:{$path:["../../../label/format/day","%e"]},month:{$path:["../../../label/format/month","%b"]},year:{$path:["../../../label/format/year","%Y"]}}},tick:{enabled:{$path:"../../tick/enabled"},size:{$path:"../../tick/size"},width:{$path:"../../tick/width"},stroke:{$path:"../../tick/stroke"}}}},{label:{enabled:!0,fontSize:{$ref:"fontSize"},fontFamily:{$ref:"fontFamily"},fontWeight:{$ref:"fontWeight"},spacing:11,color:{$ref:"textColor"},avoidCollisions:!0},line:{enabled:!0,width:1,stroke:{$ref:"axisColor"}},tick:{enabled:!1,size:6,width:1,stroke:{$ref:"axisColor"}},gridLine:{enabled:!0,style:[{stroke:{$ref:"gridLineColor"},lineDash:[]}]},crossLines:{enabled:!0,fill:{$ref:"foregroundColor"},stroke:{$ref:"foregroundColor"},fillOpacity:.1,strokeWidth:1,label:{fontSize:{$ref:"fontSize"},fontFamily:{$ref:"fontFamily"},fontWeight:{$ref:"fontWeight"},padding:5,color:{$ref:"textColor"}}}})}getChartDefaults(){return{minHeight:300,minWidth:300,background:{visible:!0,fill:{$ref:"backgroundColor"}},padding:{top:{$ref:"padding"},right:{$ref:"padding"},bottom:{$ref:"padding"},left:{$ref:"padding"}},seriesArea:{padding:{top:0,right:0,bottom:0,left:0}},keyboard:{enabled:!0},title:{enabled:!1,text:"Title",spacing:{$if:[{$path:"../subtitle/enabled"},10,20]},fontWeight:{$ref:"fontWeight"},fontSize:{$rem:[1.4166666666666667]},fontFamily:{$ref:"fontFamily"},color:{$ref:"textColor"},wrapping:"hyphenate",layoutStyle:Lu,textAlign:ku},subtitle:{enabled:!1,text:"Subtitle",spacing:20,fontWeight:{$ref:"fontWeight"},fontSize:{$rem:[1.0833333333333333]},fontFamily:{$ref:"fontFamily"},color:{$ref:"subtleTextColor"},wrapping:"hyphenate",layoutStyle:Lu,textAlign:ku},footnote:{enabled:!1,text:"Footnote",spacing:20,fontSize:{$rem:[1.0833333333333333]},fontFamily:{$ref:"fontFamily"},fontWeight:{$ref:"fontWeight"},color:{$ref:"subtleTextColor"},wrapping:"hyphenate",layoutStyle:Lu,textAlign:ku},legend:{position:"bottom",orientation:{$if:[{$or:[{$eq:[{$path:"./position"},"left"]},{$eq:[{$path:"./position"},"right"]}]},"vertical","horizontal"]},spacing:30,listeners:{},toggleSeries:!0,item:{paddingX:16,paddingY:8,marker:{size:15,padding:8},showSeriesStroke:!0,label:{color:{$ref:"textColor"},fontSize:{$ref:"fontSize"},fontFamily:{$ref:"fontFamily"},fontWeight:{$ref:"fontWeight"}}},reverseOrder:!1,pagination:{marker:{size:12},activeStyle:{fill:{$ref:"foregroundColor"}},inactiveStyle:{fill:{$ref:"subtleTextColor"}},highlightStyle:{fill:{$ref:"foregroundColor"}},label:{color:{$ref:"textColor"}}}},tooltip:{enabled:!0,darkTheme:Du,delay:0,pagination:!1},overlays:{darkTheme:Du},listeners:{}}}constructor(e={}){const{overrides:t,palette:i,params:n}=Vt(e),s=this.createChartConfigPerChartType(this.getDefaults()),r={};t&&this.mergeOverrides(s,r,t);const{fills:o,strokes:a,sequentialColors:l,...c}=this.getDefaultColors();this.palette=U(N(i,{fills:Object.values(o),strokes:Object.values(a),sequentialColors:Object.values(l),...c})),this.paletteType=iC(i),this.params=N(n,this.getPublicParameters()),this.config=U(this.templateTheme(s)),this.presets=U(r)}mergeOverrides(e,t,i){for(const{seriesTypes:t,commonOptions:n}of Object.values(sC)){const s={...i.common};for(const e of uC)n.includes(e)||delete s[e];for(const i of t){const t=i;oC(t)||(e[t]=N(s,e[t]))}}Qo.seriesTypes.forEach(n=>{const s=n,r=i[s];oC(s)?t[s]=r:e[s]=N(r,e[s])})}createChartConfigPerChartType(e){for(const[t,{seriesTypes:i}]of(0,n.jO)(sC)){const n=ea.get(t);for(const t of i)e[t]??(e[t]=Vt(n))}return e}getDefaults(){const t=(t,i)=>{const n={},s={axes:{},...qo.getThemeTemplates(),...this.getChartDefaults(),...ea.get(t)};for(const t of i){n[t]=N(ta.getThemeTemplate(t),n[t]??Vt(s));const{axes:i}=n[t];for(const t of jo.keys())i[t]=N(i[t],jo.getThemeTemplate(t),e.axisDefault[t])}return n};return N(t("cartesian",Qo.cartesianTypes),t("polar",Qo.polarTypes),t("hierarchy",Qo.hierarchyTypes),t("topology",Qo.topologyTypes),t("flow-proportion",Qo.flowProportionTypes),t("standalone",Qo.standaloneTypes),t("gauge",Qo.gaugeTypes))}static applyTemplateTheme(e,t,i){if((0,n.cy)(e))for(let t=0;t<e.length;t++){const n=e[t];"symbol"==typeof n&&i?.has(n)&&(e[t]=i.get(n))}else for(const t of Object.keys(e)){const n=e[t];"symbol"==typeof n&&i?.has(n)&&(e[t]=i.get(n))}}templateTheme(t,i=!0){const n=i?Vt(t):t,s=this.getTemplateParameters();return Ht(n,e.applyTemplateTheme,void 0,void 0,s),n}getDefaultColors(){return e.getDefaultColors()}getPublicParameters(){return e.getDefaultPublicParameters()}getTemplateParameters(){const e=new Map;e.set(Du,!1),e.set(Iu,"#d9d9d9"),e.set(Ru,"#00000080"),e.set(Ku,"#aaa"),e.set(Lu,"block"),e.set(ku,"center"),e.set(Yu,["#797b86","#e24c4a","#f49d2d","#65ab58","#409682","#4db9d2","#5090dc","#3068f9","#e24c4a","#913aac","#d93e64"]),e.set(ju,nC),e.set($u,Xm.BLUE),e.set(Xu,Xm.BLUE),e.set(qu,Xm.BLUE),e.set(Zu,nC),e.set(Qu,"#fafafa"),e.set(Ju,"#ddd"),e.set(ep,"#000"),e.set(tp,"#181d1f"),e.set(ip,"#e35c5c"),e.set(np,"#e35c5c"),e.set(sp,"#fafafa"),e.set(rp,"#ddd"),e.set(op,"#000"),e.set(ap,"top"),e.set(lp,!1);const t=this.getDefaultColors();return e.set(Pu,this.palette.up?.stroke??t.up.stroke),e.set(Ou,this.palette.up?.fill??t.up.fill),e.set(Nu,this.palette.down?.stroke??t.down.stroke),e.set(_u,this.palette.down?.fill??t.down.fill),e.set(Fu,this.palette.neutral?.stroke??t.neutral.stroke),e.set(Gu,this.palette.neutral?.fill??t.neutral.fill),e.set(Vu,this.palette.altUp?.stroke??t.up.stroke),e.set(Hu,this.palette.altUp?.fill??t.up.fill),e.set(Bu,this.palette.altDown?.stroke??t.down.stroke),e.set(zu,this.palette.altDown?.fill??t.down.fill),e.set(Uu,this.palette.altNeutral?.fill??t.altNeutral.fill),e.set(Wu,this.palette.altNeutral?.stroke??t.altNeutral.stroke),e}};pC.axisDefault={number:pC.getAxisDefaults({keys:[],line:{enabled:!1},crosshair:{enabled:!0}},{title:!0,time:"off"}),log:pC.getAxisDefaults({keys:[],base:10,line:{enabled:!1},crosshair:{enabled:!0}},{title:!0,time:"off"}),category:pC.getAxisDefaults({keys:[],groupPaddingInner:.1,label:{autoRotate:!0},gridLine:{enabled:lp},crosshair:{enabled:!1}},{title:!0,time:"off"}),"grouped-category":pC.getAxisDefaults({keys:[],tick:{enabled:!0,stroke:Iu},label:{spacing:10,rotation:270},paddingInner:.4,groupPaddingInner:.2,crosshair:{enabled:!1}},{title:!0,time:"off"}),time:pC.getAxisDefaults({keys:[],gridLine:{enabled:lp},crosshair:{enabled:!0}},{title:!0,time:"legacy"}),"ordinal-time":pC.getAxisDefaults({keys:[],groupPaddingInner:0,label:{autoRotate:!1},gridLine:{enabled:lp},crosshair:{enabled:!0}},{title:!0,time:"legacy"}),"unit-time":pC.getAxisDefaults({keys:[],groupPaddingInner:.1,label:{autoRotate:!1},gridLine:{enabled:lp},crosshair:{enabled:!0},parentLevel:{enabled:!0}},{title:!0,time:"modern"}),"angle-category":pC.getAxisDefaults({label:{spacing:5},gridLine:{enabled:lp},shape:{$path:["./shape",void 0,{$find:[{$not:[{$isOperation:"./shape"}]},{$path:".."}]}]}},{title:!1,time:"off"}),"angle-number":pC.getAxisDefaults({label:{spacing:5},gridLine:{enabled:lp}},{title:!1,time:"off"}),"radius-category":pC.getAxisDefaults({positionAngle:0,line:{enabled:!1}},{title:!0,time:"off"}),"radius-number":pC.getAxisDefaults({positionAngle:0,line:{enabled:!1},shape:{$path:["./shape",void 0,{$find:[{$not:[{$isOperation:"./shape"}]},{$path:".."}]}]}},{title:!0,time:"off"})};var gC=pC,fC="#192232",mC={BLUE:"#5090dc",ORANGE:"#ffa03a",GREEN:"#459d55",CYAN:"#34bfe1",YELLOW:"#e1cc00",VIOLET:"#9669cb",GRAY:"#b5b5b5",MAGENTA:"#bd5aa7",BROWN:"#8a6224",RED:"#ef5452"},vC={BLUE:"#74a8e6",ORANGE:"#ffbe70",GREEN:"#6cb176",CYAN:"#75d4ef",YELLOW:"#f6e559",VIOLET:"#aa86d8",GRAY:"#a1a1a1",MAGENTA:"#ce7ab9",BROWN:"#997b52",RED:"#ff7872"},yC=class extends gC{getDefaultColors(){return{fills:mC,fillsFallback:Object.values(mC),strokes:vC,sequentialColors:mp(mC),divergingColors:[mC.ORANGE,mC.YELLOW,mC.GREEN],hierarchyColors:["#192834","#253746","#324859","#3f596c","#4d6a80"],secondSequentialColors:["#5090dc","#4882c6","#4073b0","#38659a","#305684","#28486e","#203a58","#182b42"],secondDivergingColors:[mC.GREEN,mC.YELLOW,mC.RED],secondHierarchyColors:["#192834","#3b5164","#496275","#577287","#668399"],up:{fill:mC.GREEN,stroke:vC.GREEN},down:{fill:mC.RED,stroke:vC.RED},neutral:{fill:mC.GRAY,stroke:vC.GRAY},altUp:{fill:mC.BLUE,stroke:vC.BLUE},altDown:{fill:mC.ORANGE,stroke:vC.ORANGE},altNeutral:{fill:mC.GRAY,stroke:vC.GRAY}}}getPublicParameters(){return{...super.getPublicParameters(),axisColor:{$foregroundBackgroundMix:[.263]},backgroundColor:fC,borderColor:{$foregroundBackgroundMix:[.784]},chromeBackgroundColor:{$foregroundBackgroundMix:[.93]},foregroundColor:"#fff",gridLineColor:{$foregroundBackgroundAccentMix:[.743,.01]},subtleTextColor:{$mix:[{$ref:"textColor"},{$ref:"backgroundColor"},.57]},chromeTextColor:{$ref:"textColor"},crosshairLabelBackgroundColor:{$foregroundBackgroundAccentMix:[.35,.1]}}}getTemplateParameters(){const e=super.getTemplateParameters();return e.set(Du,!0),e.set(ju,fC),e.set(Iu,"#7f8389"),e.set($u,mC.BLUE),e.set(qu,"#fff"),e.set(Xu,mC.BLUE),e.set(Zu,fC),e.set(Qu,"#28313e"),e.set(Ju,"#4b525d"),e.set(ep,"#fff"),e.set(tp,"#fff"),e.set(sp,"#28313e"),e.set(rp,"#4b525d"),e.set(op,"#fff"),e}constructor(e){super(e)}},CC={GREEN:"#089981",RED:"#F23645",BLUE:"#5090dc",GRAY:"#A9A9A9"},bC={GREEN:"#089981",RED:"#F23645",BLUE:"#5090dc",GRAY:"#909090"},SC=class extends yC{getDefaultColors(){return{...super.getDefaultColors(),fills:{...CC},fillsFallback:Object.values({...CC}),strokes:{...bC},sequentialColors:mp(CC),divergingColors:[CC.GREEN,CC.BLUE,CC.RED],secondSequentialColors:["#5090dc","#4882c6","#4073b0","#38659a","#305684","#28486e","#203a58","#182b42"],up:{fill:CC.GREEN,stroke:bC.GREEN},down:{fill:CC.RED,stroke:bC.RED},neutral:{fill:CC.BLUE,stroke:bC.BLUE},altUp:{fill:CC.GREEN,stroke:bC.GREEN},altDown:{fill:CC.RED,stroke:bC.RED},altNeutral:{fill:CC.GRAY,stroke:bC.GRAY}}}getPublicParameters(){return{...super.getPublicParameters(),gridLineColor:{$foregroundBackgroundAccentMix:[.88,.01]},padding:0}}getTemplateParameters(){const e=super.getTemplateParameters();return e.set($u,CC.BLUE),e.set(Xu,CC.BLUE),e.set(Lu,"overlay"),e.set(ku,"left"),e.set(ap,"bottom"),e.set(lp,!0),e}},wC={GREEN:"#089981",RED:"#F23645",BLUE:"#5090dc",GRAY:"#A9A9A9"},xC={GREEN:"#089981",RED:"#F23645",BLUE:"#5090dc",GRAY:"#909090"},EC=class extends gC{getDefaultColors(){return{...super.getDefaultColors(),fills:{...wC},fillsFallback:Object.values({...wC}),strokes:{...xC},sequentialColors:mp(wC),divergingColors:[wC.GREEN,wC.BLUE,wC.RED],up:{fill:wC.GREEN,stroke:xC.GREEN},down:{fill:wC.RED,stroke:xC.RED},neutral:{fill:wC.BLUE,stroke:xC.BLUE},altUp:{fill:wC.GREEN,stroke:xC.GREEN},altDown:{fill:wC.RED,stroke:xC.RED},altNeutral:{fill:wC.GRAY,stroke:xC.GRAY}}}getPublicParameters(){return{...super.getPublicParameters(),gridLineColor:{$foregroundBackgroundAccentMix:[.94,.01]},padding:0}}getTemplateParameters(){const e=super.getTemplateParameters();return e.set($u,wC.BLUE),e.set(Xu,wC.BLUE),e.set(Lu,"overlay"),e.set(ku,"left"),e.set(ap,"bottom"),e.set(lp,!0),e}},MC={BLUE:"#2196F3",ORANGE:"#FF9800",GREEN:"#4CAF50",CYAN:"#00BCD4",YELLOW:"#FFEB3B",VIOLET:"#7E57C2",GRAY:"#9E9E9E",MAGENTA:"#F06292",BROWN:"#795548",RED:"#F44336"},AC={BLUE:"#90CAF9",ORANGE:"#FFCC80",GREEN:"#A5D6A7",CYAN:"#80DEEA",YELLOW:"#FFF9C4",VIOLET:"#B39DDB",GRAY:"#E0E0E0",MAGENTA:"#F48FB1",BROWN:"#A1887F",RED:"#EF9A9A"},TC=class extends yC{getDefaultColors(){return{...super.getDefaultColors(),fills:MC,fillsFallback:Object.values(MC),strokes:AC,sequentialColors:mp(MC),divergingColors:[MC.ORANGE,MC.YELLOW,MC.GREEN],secondSequentialColors:["#2196f3","#208FEC","#1E88E5","#1C7FDC","#1976d2","#176EC9","#1565c0"],secondDivergingColors:[MC.GREEN,MC.YELLOW,MC.RED],up:{fill:MC.GREEN,stroke:AC.GREEN},down:{fill:MC.RED,stroke:AC.RED},neutral:{fill:MC.GRAY,stroke:AC.GRAY},altUp:{fill:MC.BLUE,stroke:AC.BLUE},altDown:{fill:MC.RED,stroke:AC.RED},altNeutral:{fill:MC.GRAY,stroke:AC.GRAY}}}getTemplateParameters(){const e=super.getTemplateParameters();return e.set($u,MC.BLUE),e.set(Xu,MC.BLUE),e}},DC={BLUE:"#2196F3",ORANGE:"#FF9800",GREEN:"#4CAF50",CYAN:"#00BCD4",YELLOW:"#FFEB3B",VIOLET:"#7E57C2",GRAY:"#9E9E9E",MAGENTA:"#F06292",BROWN:"#795548",RED:"#F44336"},IC={BLUE:"#1565C0",ORANGE:"#E65100",GREEN:"#2E7D32",CYAN:"#00838F",YELLOW:"#F9A825",VIOLET:"#4527A0",GRAY:"#616161",MAGENTA:"#C2185B",BROWN:"#4E342E",RED:"#B71C1C"},RC=class extends gC{getDefaultColors(){return{...super.getDefaultColors(),fills:DC,fillsFallback:Object.values(DC),strokes:IC,sequentialColors:mp(DC),divergingColors:[DC.ORANGE,DC.YELLOW,DC.GREEN],secondSequentialColors:["#2196f3","#329EF4","#42a5f5","#53ADF6","#64b5f6","#7AC0F8","#90caf9"],secondDivergingColors:[DC.GREEN,DC.YELLOW,DC.RED],up:{fill:DC.GREEN,stroke:IC.GREEN},down:{fill:DC.RED,stroke:IC.RED},neutral:{fill:DC.GRAY,stroke:IC.GRAY},altUp:{fill:DC.BLUE,stroke:IC.BLUE},altDown:{fill:DC.RED,stroke:IC.RED},altNeutral:{fill:DC.GRAY,stroke:IC.GRAY}}}getTemplateParameters(){const e=super.getTemplateParameters();return e.set($u,DC.BLUE),e.set(Xu,DC.BLUE),e}},LC={BLUE:"#436ff4",PURPLE:"#9a7bff",MAGENTA:"#d165d2",PINK:"#f0598b",RED:"#f47348",ORANGE:"#f2a602",YELLOW:"#e9e201",GREEN:"#21b448",CYAN:"#00b9a2",MODERATE_BLUE:"#00aee4",GRAY:"#bbbbbb"},kC={BLUE:"#6698ff",PURPLE:"#c0a3ff",MAGENTA:"#fc8dfc",PINK:"#ff82b1",RED:"#ff9b70",ORANGE:"#ffcf4e",YELLOW:"#ffff58",GREEN:"#58dd70",CYAN:"#51e2c9",MODERATE_BLUE:"#4fd7ff",GRAY:"#eeeeee"},PC=class extends yC{getDefaultColors(){return{fills:LC,fillsFallback:Object.values(LC),strokes:kC,sequentialColors:mp(LC),divergingColors:[LC.BLUE,LC.RED],hierarchyColors:[],secondSequentialColors:[LC.BLUE,LC.PURPLE,LC.MAGENTA,LC.PINK,LC.RED,LC.ORANGE,LC.YELLOW,LC.GREEN],secondDivergingColors:[LC.BLUE,LC.RED],secondHierarchyColors:[],up:{fill:LC.GREEN,stroke:kC.GREEN},down:{fill:LC.RED,stroke:kC.RED},neutral:{fill:LC.GRAY,stroke:kC.GRAY},altUp:{fill:LC.BLUE,stroke:kC.BLUE},altDown:{fill:LC.RED,stroke:kC.RED},altNeutral:{fill:LC.GRAY,stroke:kC.GRAY}}}getTemplateParameters(){const e=super.getTemplateParameters();return e.set($u,LC.BLUE),e.set(Xu,LC.BLUE),e}},NC={BLUE:"#436ff4",PURPLE:"#9a7bff",MAGENTA:"#d165d2",PINK:"#f0598b",RED:"#f47348",ORANGE:"#f2a602",YELLOW:"#e9e201",GREEN:"#21b448",CYAN:"#00b9a2",MODERATE_BLUE:"#00aee4",GRAY:"#bbbbbb"},OC={BLUE:"#2346c9",PURPLE:"#7653d4",MAGENTA:"#a73da9",PINK:"#c32d66",RED:"#c84b1c",ORANGE:"#c87f00",YELLOW:"#c1b900",GREEN:"#008c1c",CYAN:"#00927c",MODERATE_BLUE:"#0087bb",GRAY:"#888888"},_C=class extends gC{getDefaultColors(){return{...super.getDefaultColors(),fills:NC,fillsFallback:Object.values(NC),strokes:OC,sequentialColors:mp(NC),divergingColors:[NC.BLUE,NC.RED],hierarchyColors:[],secondSequentialColors:[NC.BLUE,NC.PURPLE,NC.MAGENTA,NC.PINK,NC.RED,NC.ORANGE,NC.YELLOW,NC.GREEN],secondDivergingColors:[NC.BLUE,NC.RED],secondHierarchyColors:[],up:{fill:NC.GREEN,stroke:OC.GREEN},down:{fill:NC.RED,stroke:OC.RED},neutral:{fill:NC.GRAY,stroke:OC.GRAY},altUp:{fill:NC.BLUE,stroke:OC.BLUE},altDown:{fill:NC.RED,stroke:OC.RED},altNeutral:{fill:NC.GRAY,stroke:OC.GRAY}}}getTemplateParameters(){const e=super.getTemplateParameters();return e.set($u,NC.BLUE),e.set(Xu,NC.BLUE),e}},FC={BLUE:"#4472C4",ORANGE:"#ED7D31",GRAY:"#A5A5A5",YELLOW:"#FFC000",MODERATE_BLUE:"#5B9BD5",GREEN:"#70AD47",DARK_GRAY:"#7B7B7B",DARK_BLUE:"#264478",VERY_DARK_GRAY:"#636363",DARK_YELLOW:"#997300"},GC={BLUE:"#6899ee",ORANGE:"#ffa55d",GRAY:"#cdcdcd",YELLOW:"#ffea53",MODERATE_BLUE:"#82c3ff",GREEN:"#96d56f",DARK_GRAY:"#a1a1a1",DARK_BLUE:"#47689f",VERY_DARK_GRAY:"#878787",DARK_YELLOW:"#c0993d"},VC=class extends yC{getDefaultColors(){return{...super.getDefaultColors(),fills:{...FC,RED:FC.ORANGE},fillsFallback:Object.values({...FC,RED:FC.ORANGE}),strokes:{...GC,RED:GC.ORANGE},sequentialColors:mp({...FC,RED:FC.ORANGE}),divergingColors:[FC.ORANGE,FC.YELLOW,FC.GREEN],secondSequentialColors:["#5090dc","#4882c6","#4073b0","#38659a","#305684","#28486e","#203a58","#182b42"],secondDivergingColors:[FC.GREEN,FC.YELLOW,FC.ORANGE],up:{fill:FC.GREEN,stroke:GC.GREEN},down:{fill:FC.ORANGE,stroke:GC.ORANGE},neutral:{fill:FC.GRAY,stroke:GC.GRAY},altUp:{fill:FC.BLUE,stroke:GC.BLUE},altDown:{fill:FC.ORANGE,stroke:GC.ORANGE},altNeutral:{fill:FC.GRAY,stroke:GC.GRAY}}}getTemplateParameters(){const e=super.getTemplateParameters();return e.set($u,FC.BLUE),e.set(Xu,FC.BLUE),e}},BC={BLUE:"#5281d5",ORANGE:"#ff8d44",GRAY:"#b5b5b5",YELLOW:"#ffd02f",MODERATE_BLUE:"#6aabe6",GREEN:"#7fbd57",DARK_GRAY:"#8a8a8a",DARK_BLUE:"#335287",VERY_DARK_GRAY:"#717171",DARK_YELLOW:"#a98220"},HC={BLUE:"#214d9b",ORANGE:"#c25600",GRAY:"#7f7f7f",YELLOW:"#d59800",MODERATE_BLUE:"#3575ac",GREEN:"#4b861a",DARK_GRAY:"#575757",DARK_BLUE:"#062253",VERY_DARK_GRAY:"#414141",DARK_YELLOW:"#734f00"},zC=class extends gC{getDefaultColors(){return{...super.getDefaultColors(),fills:{...BC,RED:BC.ORANGE},fillsFallback:Object.values({...BC,RED:BC.ORANGE}),strokes:{...HC,RED:HC.ORANGE},sequentialColors:mp({...BC,RED:BC.ORANGE}),divergingColors:[BC.ORANGE,BC.YELLOW,BC.GREEN],secondSequentialColors:["#5090dc","#629be0","#73a6e3","#85b1e7","#96bcea","#a8c8ee","#b9d3f1","#cbdef5"],secondDivergingColors:[BC.GREEN,BC.YELLOW,BC.ORANGE],secondHierarchyColors:[],up:{fill:BC.GREEN,stroke:HC.GREEN},down:{fill:BC.ORANGE,stroke:HC.ORANGE},neutral:{fill:HC.GRAY,stroke:HC.GRAY},altUp:{fill:BC.BLUE,stroke:HC.BLUE},altDown:{fill:BC.ORANGE,stroke:HC.ORANGE},altNeutral:{fill:BC.GRAY,stroke:HC.GRAY}}}getTemplateParameters(){const e=super.getTemplateParameters();return e.set($u,BC.BLUE),e.set(Xu,BC.BLUE),e}},UC={...lf,type:(0,n.mw)((0,n.dY)("ordinal-time")),paddingInner:n.CG,paddingOuter:n.CG,groupPaddingInner:n.CG,label:sf,parentLevel:of,interval:hf((0,n.or)(n.ai,n.p6),!0).interval,crosshair:cf(!0)},WC={...af,...hf(n.ai),type:(0,n.mw)((0,n.dY)("angle-number")),crossLines:(0,n.J$)(Qg),startAngle:n.ai,endAngle:n.ai,label:{...ef,orientation:(0,n.KC)("fixed","parallel","perpendicular"),format:Xg}},jC={innerRadiusRatio:n.CG},KC={...af,...jC,type:(0,n.mw)((0,n.dY)("angle-category")),shape:(0,n.KC)("polygon","circle"),crossLines:(0,n.J$)(Qg),startAngle:n.ai,endAngle:n.ai,paddingInner:n.CG,groupPaddingInner:n.CG,label:{...ef,orientation:(0,n.KC)("fixed","parallel","perpendicular")}},$C={...af,...hf(n.ai),type:(0,n.mw)((0,n.dY)("radius-number")),shape:(0,n.KC)("polygon","circle"),positionAngle:n.ai,innerRadiusRatio:n.CG,crossLines:(0,n.J$)({...Qg,label:{...Zg,positionAngle:n.ai}},"cross-line options"),title:{enabled:n.zM,text:n.Yj,spacing:n.Ly,formatter:n.E2,...n.LV},label:{...ef,format:Xg}},YC={...af,type:(0,n.mw)((0,n.dY)("radius-category")),positionAngle:n.ai,innerRadiusRatio:n.CG,paddingInner:n.CG,paddingOuter:n.CG,groupPaddingInner:n.CG,label:ef,crossLines:(0,n.J$)({...Qg,label:{...Zg,positionAngle:n.ai}},"cross-line options"),title:{enabled:n.zM,text:n.Yj,spacing:n.Ly,formatter:n.E2,...n.LV}},qC={lineStyle:(0,n.KC)("solid","dashed","dotted"),...n.mL},XC={...n.Fu,...n.AF,...n.mL},ZC={visible:n.zM,locked:n.zM,handle:XC,...n.LV},QC={position:(0,n.KC)("top","center","bottom"),alignment:(0,n.KC)("left","center","right"),...n.LV},JC={position:(0,n.KC)("top","inside","bottom"),alignment:(0,n.KC)("left","center","right"),...n.LV},eb={enabled:n.zM,cornerRadius:n.Ly,formatter:n.E2,...n.LV,...n.Fu,...n.AF,...n.mL},tb={visible:n.zM,...qC,...n.AF},ib={divider:n.AF,...n.Fu,...n.AF,...n.LV},nb={handle:XC,statistics:ib,...qC,...n.Fu,...n.AF},sb={visible:n.zM,locked:n.zM,extendStart:n.zM,extendEnd:n.zM,handle:XC,text:QC,...qC,...n.AF},rb={visible:n.zM,locked:n.zM,axisLabel:eb,handle:XC,text:QC,...qC,...n.AF},ob={visible:n.zM,locked:n.zM,extendStart:n.zM,extendEnd:n.zM,handle:XC,text:JC,background:n.Fu,...qC,...n.AF},ab={...ob},lb={...ob,middle:tb},cb={label:n.LV,showFill:n.zM,isMultiColor:n.zM,strokes:(0,n.jk)(n.yW),rangeStroke:n.yW,bands:(0,n.KC)(4,6,10),...sb},hb={...n.Fu,...n.AF,...ZC},db={...n.Fu,...n.AF,...ZC},ub={...n.Fu,...n.AF,...ZC,background:{...n.Fu,...n.AF}},pb={visible:n.zM,locked:n.zM,handle:XC,...n.Fu},gb={visible:n.zM,locked:n.zM,extendStart:n.zM,extendEnd:n.zM,handle:XC,text:QC,background:n.Fu,statistics:ib,...qC,...n.AF},fb={visible:n.zM,up:nb,down:nb},mb={enabled:n.zM,axesButtons:{enabled:n.zM,axes:(0,n.KC)("x","y","xy")},toolbar:{enabled:n.zM,padding:n.Ly,buttons:(0,n.J$)({...Mf,value:(0,n.KC)("line-menu","fibonacci-menu","text-menu","shape-menu","measurer-menu","line","horizontal-line","vertical-line","parallel-channel","disjoint-channel","fibonacci-retracement","fibonacci-retracement-trend-based","text","comment","callout","note","clear")},"annotation toolbar buttons array")},optionsToolbar:{enabled:n.zM,buttons:(0,n.jk)((0,n.or)((0,n.fd)({...Mf,value:(0,n.mw)((0,n.KC)("line-stroke-width","line-style-type","line-color","fill-color","text-color","text-size","delete","settings"))}),(0,n.fd)({...Mf,value:(0,n.mw)((0,n.KC)("lock")),checkedOverrides:Mf})))}};mb.data=(0,n._L)(n.YO),mb.xKey=(0,n._L)(n.Yj),mb.volumeKey=(0,n._L)(n.Yj),mb.snap=(0,n._L)(n.zM);var vb={direction:(0,n.KC)("horizontal","vertical"),showInMiniChart:n.zM,cornerRadius:n.Ly,itemStyler:(0,n.YI)({...n.Fu,...n.AF,...n.mL,cornerRadius:n.Ly,whisker:{...n.AF,...n.mL},cap:{lengthRatio:n.CG}}),whisker:{...n.AF,...n.mL},cap:{lengthRatio:n.CG},tooltip:Nf,...Tf,...n.Fu,...n.AF,...n.mL},yb={cornerRadius:n.Ly,wick:{...n.AF,...n.mL},...n.Fu,...n.AF,...n.mL},Cb={item:{up:yb,down:yb},itemStyler:(0,n.YI)({...n.Fu,...n.AF,...n.mL,cornerRadius:n.Ly,wick:{...n.AF,...n.mL}}),showInMiniChart:n.zM,tooltip:Nf,...Tf},bb={fills:(0,n.jk)(n.Jp),strokes:(0,n.jk)(n.yW),label:{spacing:n.Ly,maxWidth:n.Ly,...Rf},link:{tension:n.CG,itemStyler:(0,n.YI)({...n.Fu,...n.AF,...n.mL,tension:n.CG}),...n.Fu,...n.AF,...n.mL},node:{width:n.Ly,spacing:n.Ly,itemStyler:(0,n.YI)({...n.Fu,...n.AF,...n.mL}),...n.Fu,...n.AF,...n.mL},tooltip:Nf,...Tf},Sb={direction:(0,n.KC)("horizontal","vertical"),fills:(0,n.jk)(n.Jp),strokes:(0,n.jk)(n.yW),showInMiniChart:n.zM,label:{spacing:n.Ly,placement:(0,n.KC)("before","middle","after"),...Rf},stageLabel:{rotation:n.ai,spacing:n.Ly,minSpacing:n.Ly,placement:(0,n.KC)("before","after"),avoidCollisions:n.zM,itemStyler:(0,n.YI)({...n.LV,spacing:n.ai}),format:n.Yj,...Rf},tooltip:Nf,...Tf,...G(n.Fu,["fill"]),...G(n.AF,["stroke"]),...n.mL},wb={direction:(0,n.KC)("horizontal","vertical"),fills:(0,n.jk)(n.Jp),strokes:(0,n.jk)(n.yW),showInMiniChart:n.zM,itemStyler:(0,n.YI)({...n.Fu,...n.AF,...n.mL}),spacingRatio:n.CG,crisp:n.zM,dropOff:{enabled:n.zM,...n.Fu,...n.AF,...n.mL},stageLabel:{rotation:n.ai,spacing:n.Ly,minSpacing:n.Ly,placement:(0,n.KC)("before","after"),avoidCollisions:n.zM,itemStyler:(0,n.YI)({...n.LV,spacing:n.ai}),format:n.Yj,...Rf},label:Rf,tooltip:Nf,shadow:Of,...Tf,...G(n.Fu,["fill"]),...G(n.AF,["stroke"]),...n.mL},xb={title:n.Yj,textAlign:(0,n.KC)("left","center","right"),verticalAlign:(0,n.KC)("top","middle","bottom"),itemPadding:n.Ly,itemStyler:(0,n.YI)({...n.Fu,...n.AF}),showInMiniChart:n.zM,label:Lf,tooltip:Nf,...Tf,...n.AF},Eb={showInMiniChart:n.zM,itemStyler:(0,n.YI)({...n.AF,...n.mL}),item:{up:{...n.AF,...n.mL},down:{...n.AF,...n.mL}},tooltip:Nf,...Tf},Mb={maxStrokeWidth:n.Ly,itemStyler:(0,n.YI)({...n.AF,...n.mL}),sizeDomain:(0,n.jk)(n.Ly),label:Rf,tooltip:Nf,...Tf,...n.AF,...n.mL,highlightStyle:{...Tf.highlightStyle,...n.AF}},Ab={...n.AF,...n.mL},Tb={colorRange:(0,n.jk)(n.yW),maxSize:n.Ly,sizeDomain:(0,n.jk)(n.Ly),label:{placement:(0,n.KC)("top","bottom","left","right"),...Rf},tooltip:Nf,...Tf,...G(If,["enabled"]),highlightStyle:{...Tf.highlightStyle,...n.Fu,...n.AF}},Db={colorRange:(0,n.jk)(n.yW),padding:n.Ly,itemStyler:(0,n.YI)({...n.Fu,...n.AF,...n.mL}),label:Lf,tooltip:Nf,...Tf,...n.Fu,...n.AF,...n.mL,highlightStyle:{...Tf.highlightStyle,...n.Fu,...n.AF}},Ib={...Tf,...n.Fu,...n.AF,...n.mL},Rb={cornerRadius:n.Ly,itemStyler:(0,n.YI)({...n.Fu,...n.AF,...n.mL,cornerRadius:n.Ly}),label:Rf,tooltip:Nf,...Tf,...n.Fu,...n.AF,...n.mL},Lb={direction:(0,n.KC)("horizontal","vertical"),aspectRatio:n.Ly,spacing:n.Ly,reverse:n.zM,itemStyler:(0,n.YI)({...n.Fu,...n.AF,...n.mL}),fills:(0,n.jk)(n.Jp),strokes:(0,n.jk)(n.yW),label:Rf,stageLabel:{spacing:n.Ly,placement:(0,n.KC)("before","after"),...Rf},tooltip:Nf,shadow:Of,...Tf,...G(n.Fu,["fill"]),...G(n.AF,["stroke"]),...n.mL},kb={connectMissingData:n.zM,marker:If,label:Rf,tooltip:Nf,...Tf,...n.Fu,...n.AF,...n.mL},Pb={connectMissingData:n.zM,marker:If,label:Rf,tooltip:Nf,...Tf,...n.AF,...n.mL},Nb={cornerRadius:n.Ly,itemStyler:(0,n.YI)({...n.Fu,...n.AF,...n.mL,cornerRadius:n.Ly}),label:Rf,tooltip:Nf,...Tf,...n.Fu,...n.AF,...n.mL},Ob={cornerRadius:n.Ly,columnWidthRatio:n.CG,maxColumnWidthRatio:n.CG,itemStyler:(0,n.YI)({...n.Fu,...n.AF,...n.mL,cornerRadius:n.Ly}),label:Rf,tooltip:Nf,...Tf,...n.Fu,...n.AF,...n.mL},_b={showInMiniChart:n.zM,connectMissingData:n.zM,interpolation:_f,label:{...Rf,padding:n.Ly,placement:(0,n.KC)("inside","outside")},marker:If,tooltip:Nf,shadow:Of,...Tf,...n.Fu,...n.AF,...n.mL},Fb={direction:(0,n.KC)("horizontal","vertical"),showInMiniChart:n.zM,cornerRadius:n.Ly,itemStyler:(0,n.YI)({...n.Fu,...n.AF,...n.mL,cornerRadius:n.Ly}),label:{...Rf,padding:n.Ly,placement:(0,n.KC)("inside","outside")},tooltip:Nf,shadow:Of,...Tf,...n.Fu,...n.AF,...n.mL},Gb={fills:(0,n.jk)(n.Jp),strokes:(0,n.jk)(n.yW),label:{...Rf,spacing:n.Ly},link:{itemStyler:(0,n.YI)({...n.Fu,...n.AF,...n.mL}),...n.Fu,...n.AF,...n.mL},node:{width:n.Ly,spacing:n.Ly,alignment:(0,n.KC)("left","center","right","justify"),itemStyler:(0,n.YI)({...n.Fu,...n.AF,...n.mL}),...n.Fu,...n.AF,...n.mL},tooltip:Nf,...Tf},Vb={fills:(0,n.jk)(n.Jp),strokes:(0,n.jk)(n.yW),colorRange:(0,n.jk)(n.yW),sectorSpacing:n.Ly,cornerRadius:n.Ly,padding:n.Ly,itemStyler:(0,n.YI)({...n.Fu,...n.AF}),label:{spacing:n.Ly,...Lf},secondaryLabel:Lf,tooltip:Nf,...Tf,...G(n.Fu,["fill"]),...G(n.AF,["stroke"]),highlightStyle:{label:{color:n.yW},secondaryLabel:{color:n.yW},...n.Fu,...n.AF}},Bb={fills:(0,n.jk)(n.Jp),strokes:(0,n.jk)(n.yW),colorRange:(0,n.jk)(n.yW),itemStyler:(0,n.YI)({...n.Fu,...n.AF}),group:{gap:n.Ly,padding:n.Ly,cornerRadius:n.Ly,textAlign:(0,n.KC)("left","center","right"),interactive:n.zM,label:{...Rf,spacing:n.Ly},...n.Fu,...n.AF},tile:{gap:n.Ly,padding:n.Ly,cornerRadius:n.Ly,textAlign:(0,n.KC)("left","center","right"),verticalAlign:(0,n.KC)("top","middle","bottom"),label:{...Rf,spacing:n.Ly,lineHeight:n.Ly,minimumFontSize:n.Ly,wrapping:(0,n.KC)("never","always","hyphenate","on-space"),overflowStrategy:(0,n.KC)("ellipsis","hide")},secondaryLabel:{...Rf,lineHeight:n.Ly,minimumFontSize:n.Ly,wrapping:(0,n.KC)("never","always","hyphenate","on-space"),overflowStrategy:(0,n.KC)("ellipsis","hide")},...n.Fu,...n.AF},tooltip:Nf,...Tf,highlightStyle:{group:{label:{color:n.yW},...n.Fu,...n.AF},tile:{label:{color:n.yW},secondaryLabel:{color:n.yW},...n.Fu,...n.AF}}},Hb={name:n.Yj,cornerRadius:n.Ly,itemStyler:(0,n.YI)({...n.Fu,...n.AF,...n.mL,cornerRadius:n.Ly}),label:{...Rf,padding:n.Ly,placement:(0,n.KC)("inside-start","inside-center","inside-end","outside-start","outside-end")},tooltip:Nf,shadow:Of,...n.Fu,...n.AF,...n.mL},zb={direction:(0,n.KC)("horizontal","vertical"),showInMiniChart:n.zM,item:{positive:Hb,negative:Hb,total:Hb},line:{enabled:n.zM,...n.AF,...n.mL},tooltip:Nf,...Tf},Ub=(0,n.fd)({__type:(0,n.mw)((0,n.dY)("date")),value:(0,n.or)(n.Yj,n.ai)},"a serializable date object"),Wb={width:n.Ly,height:n.Ly,grip:n.zM,fill:n.yW,stroke:n.yW,strokeWidth:n.Ly,cornerRadius:n.Ly},jb={enabled:n.zM,height:n.Ly,spacing:n.Ly,cornerRadius:n.ai,mask:{fill:n.yW,fillOpacity:n.CG,stroke:n.yW,strokeWidth:n.Ly},minHandle:Wb,maxHandle:Wb,miniChart:{enabled:n.zM,padding:{top:n.Ly,bottom:n.Ly},label:{enabled:n.zM,avoidCollisions:n.zM,spacing:n.Ly,format:Xg,formatter:n.E2,interval:{minSpacing:n.Ly,maxSpacing:n.Ly,values:n.YO,step:n.ai},...n.LV},series:n.sw}},Kb={number:{...G(Ky,["type","crossLines"]),top:G(Ky,["type","crossLines","position"]),right:G(Ky,["type","crossLines","position"]),bottom:G(Ky,["type","crossLines","position"]),left:G(Ky,["type","crossLines","position"]),crossLines:G(Jg,["type"])},log:{...G($y,["type","crossLines"]),top:G($y,["type","crossLines","position"]),right:G($y,["type","crossLines","position"]),bottom:G($y,["type","crossLines","position"]),left:G($y,["type","crossLines","position"]),crossLines:G(Jg,["type"])},category:{...G(qy,["type","crossLines"]),top:G(qy,["type","crossLines","position"]),right:G(qy,["type","crossLines","position"]),bottom:G(qy,["type","crossLines","position"]),left:G(qy,["type","crossLines","position"]),crossLines:G(Jg,["type"])},time:{...G(Yy,["type","crossLines"]),top:G(Yy,["type","crossLines","position"]),right:G(Yy,["type","crossLines","position"]),bottom:G(Yy,["type","crossLines","position"]),left:G(Yy,["type","crossLines","position"]),crossLines:G(Jg,["type"])},"grouped-category":{...G(Xy,["type"]),top:G(Xy,["type","position"]),right:G(Xy,["type","position"]),bottom:G(Xy,["type","position"]),left:G(Xy,["type","position"]),crossLines:G(Jg,["type"])},"unit-time":{...G(Zy,["type","crossLines"]),top:G(Zy,["type","crossLines","position"]),right:G(Zy,["type","crossLines","position"]),bottom:G(Zy,["type","crossLines","position"]),left:G(Zy,["type","crossLines","position"]),crossLines:G(Jg,["type"])},"ordinal-time":{...G(UC,["type","crossLines"]),top:G(UC,["type","crossLines","position"]),right:G(UC,["type","crossLines","position"]),bottom:G(UC,["type","crossLines","position"]),left:G(UC,["type","crossLines","position"]),crossLines:G(Jg,["type"])}},$b={"angle-category":{...G(KC,["type","crossLines"]),crossLines:G(Qg,["type"])},"angle-number":{...G(WC,["type","crossLines"]),crossLines:G(Qg,["type"])},"radius-category":{...G(YC,["type","crossLines"]),crossLines:{...G(Qg,["type"]),label:{...Zg,positionAngle:n.ai}}},"radius-number":{...G($C,["type","crossLines"]),crossLines:{...G(Qg,["type"]),label:{...Zg,positionAngle:n.ai}}}},Yb={visible:n.zM};function qb(e,t){const i={};for(const n of Reflect.ownKeys(e))i[n]=t(e[n],n,e);return i}var Xb=qb({common:{...Af,navigator:jb,axes:{...Kb,...$b},annotations:{...mb,line:sb,"horizontal-line":rb,"vertical-line":rb,"disjoint-channel":ab,"parallel-channel":lb,"fibonacci-retracement":cb,"fibonacci-retracement-trend-based":cb,callout:hb,comment:db,note:ub,text:ZC,arrow:sb,"arrow-up":pb,"arrow-down":pb,"date-range":gb,"price-range":gb,"date-price-range":gb,"quick-date-price-range":fb},chartToolbar:{enabled:n.zM},initialState:{legend:(0,n.J$)({visible:n.zM,seriesId:n.Yj,itemId:n.Yj,legendItemName:n.Yj},"legend state array"),zoom:{rangeX:{start:(0,n.or)(n.ai,Ub),end:(0,n.or)(n.ai,Ub)},rangeY:{start:(0,n.or)(n.ai,Ub),end:(0,n.or)(n.ai,Ub)},ratioX:{start:n.CG,end:n.CG},ratioY:{start:n.CG,end:n.CG},autoScaledAxes:(0,n.jk)((0,n.dY)("y"))}}},line:{...Af,axes:Kb,series:Tm,navigator:jb,...Yb},scatter:{...Af,axes:Kb,series:Nm,navigator:jb,...Yb},bubble:{...Af,axes:Kb,series:fm,navigator:jb,...Yb},area:{...Af,axes:Kb,series:Ff,navigator:jb,...Yb},bar:{...Af,axes:Kb,series:om,navigator:jb,...Yb},"box-plot":{...Af,axes:Kb,series:vb,navigator:jb,...Yb},candlestick:{...Af,axes:Kb,series:Cb,navigator:jb,...Yb},"cone-funnel":{...Af,axes:Kb,series:Sb,navigator:jb,...Yb},funnel:{...Af,axes:Kb,series:wb,navigator:jb,...Yb},ohlc:{...Af,axes:Kb,series:Eb,navigator:jb,...Yb},histogram:{...Af,axes:G(Kb,["category","grouped-category","ordinal-time","unit-time"]),series:Sm,navigator:jb,...Yb},heatmap:{...Af,axes:Kb,series:xb,navigator:jb,...Yb},waterfall:{...Af,axes:Kb,series:zb,navigator:jb,...Yb},"range-bar":{...Af,axes:Kb,series:Fb,navigator:jb,...Yb},"range-area":{...Af,axes:Kb,series:_b,navigator:jb,...Yb},donut:{...Af,series:gv,navigator:jb,...Yb},pie:{...Af,series:uv,navigator:jb,...Yb},"radar-line":{...Af,axes:$b,series:Pb,navigator:jb,...Yb},"radar-area":{...Af,axes:$b,series:kb,navigator:jb,...Yb},"radial-bar":{...Af,axes:$b,series:Nb,navigator:jb,...Yb},"radial-column":{...Af,axes:$b,series:Ob,navigator:jb,...Yb},nightingale:{...Af,axes:$b,series:Rb,navigator:jb,...Yb},sunburst:{...Af,series:Vb,navigator:jb,...Yb},treemap:{...Af,series:Bb,navigator:jb,...Yb},"map-shape":{...Af,series:Db,navigator:jb,...Yb},"map-line":{...Af,series:Mb,navigator:jb,...Yb},"map-marker":{...Af,series:Tb,navigator:jb,...Yb},"map-shape-background":{...Af,series:Ib,navigator:jb,...Yb},"map-line-background":{...Af,series:Ab,navigator:jb,...Yb},sankey:{...Af,series:Gb,navigator:jb,...Yb},chord:{...Af,series:bb,navigator:jb,...Yb},pyramid:{...Af,series:Lb,navigator:jb,...Yb},"radial-gauge":{...Af,...Hv,targets:G(Gv,["value"]),tooltip:{...Hv.tooltip,...Af.tooltip}},"linear-gauge":{...Af,...Vv,targets:G(Fv,["value"]),tooltip:{...Vv.tooltip,...Af.tooltip}}},function e(t,i){if((0,n.Bm)(i))return t;if((0,n.Tn)(t))return(0,n.or)(t,n.I_,n.Bm);if((0,n.Gv)(t))return(0,n.or)((0,n.fd)(n.ie in t?qb(t,t=>(0,n.Gv)(t)?qb(t,e):t):qb(t,e)),n.I_,n.Bm);throw new Error(`Invalid theme override value: ${String(t)}`)}),Zb={BLUE:"#0083ff",ORANGE:"#ff6600",GREEN:"#00af00",CYAN:"#00ccff",YELLOW:"#f7c700",VIOLET:"#ac26ff",GRAY:"#a7a7b7",MAGENTA:"#e800c5",BROWN:"#b54300",RED:"#ff0000"},Qb={BLUE:"#67b7ff",ORANGE:"#ffc24d",GREEN:"#5cc86f",CYAN:"#54ebff",VIOLET:"#fff653",YELLOW:"#c18aff",GRAY:"#aeaeae",MAGENTA:"#f078d4",BROWN:"#ba8438",RED:"#ff726e"},Jb=class extends yC{getDefaultColors(){return{fills:Zb,fillsFallback:Object.values(Zb),strokes:Qb,sequentialColors:mp(Zb),divergingColors:[Zb.ORANGE,Zb.YELLOW,Zb.GREEN],hierarchyColors:[],secondSequentialColors:["#0083ff","#0076e6","#0069cc","#005cb3","#004f99","#004280","#003466","#00274c"],secondDivergingColors:[Zb.GREEN,Zb.YELLOW,Zb.RED],secondHierarchyColors:[],up:{fill:Zb.GREEN,stroke:Qb.GREEN},down:{fill:Zb.RED,stroke:Qb.RED},neutral:{fill:Zb.GRAY,stroke:Qb.GRAY},altUp:{fill:Zb.BLUE,stroke:Qb.BLUE},altDown:{fill:Zb.ORANGE,stroke:Qb.ORANGE},altNeutral:{fill:Zb.GRAY,stroke:Qb.GRAY}}}getTemplateParameters(){const e=super.getTemplateParameters();return e.set($u,Zb.BLUE),e.set(Xu,Zb.BLUE),e}},eS={BLUE:"#0083ff",ORANGE:"#ff6600",GREEN:"#00af00",CYAN:"#00ccff",YELLOW:"#f7c700",VIOLET:"#ac26ff",GRAY:"#a7a7b7",MAGENTA:"#e800c5",BROWN:"#b54300",RED:"#ff0000"},tS={BLUE:"#0f68c0",ORANGE:"#d47100",GREEN:"#007922",CYAN:"#009ac2",VIOLET:"#bca400",YELLOW:"#753cac",GRAY:"#646464",MAGENTA:"#9b2685",BROWN:"#6c3b00",RED:"#cb0021"},iS=class extends gC{getDefaultColors(){return{...super.getDefaultColors(),fills:eS,fillsFallback:Object.values(eS),strokes:tS,sequentialColors:mp(eS),divergingColors:[eS.ORANGE,eS.YELLOW,eS.GREEN],hierarchyColors:[],secondSequentialColors:["#0083ff","#1a8fff","#339cff","#4da8ff","#66b5ff","#80c1ff","#99cdff","#b3daff"],secondDivergingColors:[eS.GREEN,eS.YELLOW,eS.RED],secondHierarchyColors:[],up:{fill:eS.GREEN,stroke:tS.GREEN},down:{fill:eS.RED,stroke:tS.RED},neutral:{fill:eS.GRAY,stroke:tS.GRAY},altUp:{fill:eS.BLUE,stroke:tS.BLUE},altDown:{fill:eS.ORANGE,stroke:tS.ORANGE},altNeutral:{fill:eS.GRAY,stroke:tS.GRAY}}}getTemplateParameters(){const e=super.getTemplateParameters();return e.set($u,eS.BLUE),e.set(Xu,eS.BLUE),e}},nS=kh(()=>new gC),sS=y.create(!0,"perf"),rS=(e,t,i)=>{sS("[CACHE] ChartTheme",e,t.name,i)},oS={"ag-default-dark":kh(()=>new yC),"ag-sheets-dark":kh(()=>new VC,rS),"ag-polychroma-dark":kh(()=>new PC,rS),"ag-vivid-dark":kh(()=>new Jb,rS),"ag-material-dark":kh(()=>new TC,rS),"ag-financial-dark":kh(()=>new SC,rS),"ag-default":nS,"ag-sheets":kh(()=>new zC,rS),"ag-polychroma":kh(()=>new _C,rS),"ag-vivid":kh(()=>new iS,rS),"ag-material":kh(()=>new RC,rS),"ag-financial":kh(()=>new EC,rS)},aS=kh(function(e){if(e instanceof gC)return e;if(!function(e){const{invalid:t}=(0,n.tf)({theme:e},{theme:(0,n.or)(cS,n.Ik)});for(const e of t)n.Vy.warnOnce(String(e));return 0===t.length}(e))return nS();if(null==e||"string"==typeof e){const t=oS[e??"ag-default"];if(t)return t();throw new Error(`Cannot find theme \`${e}\`.`)}const{cleared:t,invalid:i}=(0,n.tf)(function(e){if(!(0,n.Gv)(e)||!(0,n.Gv)(e.baseTheme))return e;let t,i,s=e;const r=[];for(;"object"==typeof s;)t??(t=s.palette),i??(i=s.params),s.overrides&&r.push(s.overrides),s=s.baseTheme;return{baseTheme:s,overrides:N(...r),params:i,palette:t}}(e),lS,"theme");for(const e of i)n.Vy.warnOnce(String(e));const s=t?.baseTheme?aS(t.baseTheme):nS();return t?new s.constructor(t):s},rS),lS={baseTheme:(0,n.or)(n.Yj,n.Ik),overrides:Xb,params:{accentColor:n.yW,axisColor:n.yW,backgroundColor:n.yW,borderColor:n.yW,foregroundColor:n.yW,fontFamily:n.jj,fontSize:n.ai,fontWeight:(0,n.or)(n.Yj,n.ai),gridLineColor:n.yW,padding:n.ai,subtleTextColor:n.yW,textColor:n.yW,chromeBackgroundColor:n.yW,chromeFontFamily:n.jj,chromeFontSize:n.ai,chromeFontWeight:(0,n.or)(n.Yj,n.ai),chromeSubtleTextColor:n.yW,chromeTextColor:n.yW,inputBackgroundColor:n.yW,inputTextColor:n.yW,crosshairLabelBackgroundColor:n.yW,crosshairLabelTextColor:n.yW},palette:{fills:(0,n.jk)(n.Jp),strokes:(0,n.jk)(n.yW),up:{fill:(0,n.or)(n.yW,n.MP),stroke:n.yW},down:{fill:(0,n.or)(n.yW,n.MP),stroke:n.yW},neutral:{fill:(0,n.or)(n.yW,n.MP),stroke:n.yW}}},cS=(0,n.KC)("ag-default","ag-default-dark","ag-sheets","ag-sheets-dark","ag-polychroma","ag-polychroma-dark","ag-vivid","ag-vivid-dark","ag-material","ag-material-dark","ag-financial","ag-financial-dark"),hS=e=>`'${e}'`,dS=class e{constructor(t,i,n,s,r,o,a=!1){this.themeParameters={},this.optionMetadata=r??{},this.processedOverrides=n??{};let l,c,h,d,u,p,g,f=null;t instanceof e?(f=t,this.specialOverrides=f.specialOverrides,void 0===o&&(o=Ft(f.userOptions,i,e.JSON_DIFF_OPTS)),this.userOptions=Vt(O(o,f.userOptions),{...e.OPTIONS_CLONE_OPTS,seen:[]})):(this.userOptions=Vt(t??i,{...e.OPTIONS_CLONE_OPTS,seen:[]}),this.specialOverrides=this.specialOverridesDefaults({...s})),a&&this.removeLeftoverSymbols(this.userOptions),!a&&void 0!==o&&e.isFastPathDelta(o)&&null!=f?(({activeTheme:l,processedOptions:c,defaultAxes:h,fastDelta:d}=this.fastSetup(o,f)),u=f.themeParameters,p=f.annotationThemes):(e.perfDebug("ChartOptions.slowSetup()"),({activeTheme:l,processedOptions:c,defaultAxes:h,themeParameters:u,annotationThemes:p,googleFonts:g}=this.slowSetup(n,o,a))),this.activeTheme=l,this.processedOptions=c,this.defaultAxes=h,this.fastDelta=d??void 0,this.themeParameters=u,this.annotationThemes=p,this.googleFonts=g,y.inDevelopmentMode(()=>U(this))}static isFastPathDelta(t){for(const i of Object.keys(t??{}))if(!this.FAST_PATH_OPTIONS.has(i))return e.perfDebug("ChartOptions.isFastPathDelta() - slow path required due to presence of: ",i),!1;return e.perfDebug("ChartOptions.isFastPathDelta() - fast path possible."),!0}fastSetup(t,i){const{activeTheme:s,defaultAxes:r,processedOptions:o}=i,{presetType:a}=this.optionMetadata;if(null!=a&&null!=t?.data){const e=n.sy.getPresetModule(a);if(e?.processData){const{series:i,data:n}=e.processData(t.data);t=N({series:i,data:n},t)}}this.fastSeriesSetup(t,o);const l=N(t,o);return e.debug("ChartOptions.fastSetup() - processed options",l),{activeTheme:s,defaultAxes:r,processedOptions:l,fastDelta:t}}fastSeriesSetup(e,t){e?.series&&(e.series?.every((e,i)=>Gt(e,t.series?.[i]??{}))?delete e.series:e.series=e.series.map((e,i)=>O(e,t.series?.[i]??{})))}slowSetup(t,i,s=!1){let r=Vt(this.userOptions,e.OPTIONS_CLONE_OPTS);i&&(r=N(i,r),s&&this.removeLeftoverSymbols(r));const{presetType:o}=this.optionMetadata;if(null!=o){const t=n.sy.getPresetModule(o);if(t){const{validate:i=n.tf}=t,s=r,o=r.type,a=null!=o?aS(r.theme).presets[o]:void 0,{cleared:l,invalid:c}=i(s,t.options,"");c.forEach(e=>n.Vy.warn(e)),(0,n.eh)(c,"")?r={}:(e.debug(">>> AgCharts.createOrUpdate() - applying preset",l),r=t.create(l,a,()=>this.activeTheme))}}this.soloSeriesIntegrity(r),eC.isEnterprise||tC(r);const a=aS(r.theme);if(null!=o&&a.templateTheme(r,!1),this.validateSeriesOptions(r),this.chartDef=n.sy.detectChartDefinition(r),!this.chartDef.placeholder){const{validate:e=n.tf}=this.chartDef,{cleared:t,invalid:i}=e(r,this.chartDef.options,"");i.forEach(e=>n.Vy.warn(e)),r=t}this.validateAxesOptions(r),this.removeDisabledOptions(r);const l=this.optionsType(r),{annotations:h={},axes:d={},series:u,...p}=this.getSeriesThemeConfig(l,a),[g,f]=this.splitAnnotationsOptions(h),m=Vt(f),v=this.getDefaultAxes(r,u);let y=N(t,r,g,p,v);this.processAxesOptions(y,d),this.processSeriesOptions(y,a),y=Vt(y,e.OPTIONS_CLONE_OPTS),(Ql(y)||nc(y)||function(e){const t=Zl(e);return Jl(e)&&"pie"!==t&&"donut"!==t}(y))&&null==y.legend?.enabled&&(y.legend??(y.legend={}),y.legend.enabled=y.series.length>1),this.enableConfiguredOptions(y,r);let C=this.processFonts(y);const b=a.params;return C=this.processFonts(b,C),b.__palette=Vt(a.palette),b.__palette.type=(0,n.Gv)(r.theme)?iC(r.theme?.palette):"inbuilt",this.resolveThemeOperations(b,b),this.resolveThemeOperations(b,y),this.resolveThemeOperations(b,m),a.templateTheme(y,!1),function(e){const t="mode"in e&&"integrated"===e.mode;for(const i of c.byType("root","legend")){const n=e[i.optionsKey],s=null!=n&&!1===n.enabled,r=!("removable"in i)||!0===i.removable||"standalone-only"===i.removable&&!t;s&&r&&delete e[i.optionsKey]}}(y),eC.isEnterprise||tC(y,!0),this.validateSeriesOptions(y),this.validateAxesOptions(y),this.validatePluginOptions(y),this.processMiniChartSeriesOptions(y),y.loadGoogleFonts||C.clear(),e.debug(()=>["ChartOptions.slowSetup() - processed options",Vt(y)]),{activeTheme:a,processedOptions:y,defaultAxes:v,themeParameters:b,annotationThemes:m,googleFonts:C}}validatePluginOptions(e){for(const t of n.sy.listModulesByType(n.nR.Plugin)){const i=t.name;if(i in e&&(!t.chartType||t.chartType===this.chartDef?.name)){const{cleared:s,invalid:r}=(0,n.tf)(e[i],t.options,t.name);r.forEach(e=>n.Vy.warn(e)),e[i]=s}}}validateSeriesOptions(e){const t=this.chartDef?.name,i=[],s=e.series?.length??0;let r;for(let o=0;o<s;o++){const s=`series[${o}]`,a=e.series[o],l=n.sy.getSeriesModule(a.type??"line");if(null==l){r??(r=(0,n.lp)(Array.from(n.sy.listModulesByType(n.nR.Series)).filter(e=>!t||e.chartType===t).map(e=>e.name),"or",hS)),n.Vy.warn(`Unknown type \`${a.type}\` at \`${s}.type\`; expecting ${r}, ignoring.`);continue}if(t&&l.chartType!==t){n.Vy.warn(`Series type \`${l.name}\` at \`${s}.type\` is not supported by chart type \`${t}\`, ignoring.`);continue}const{validate:c=n.tf}=l,{cleared:h,invalid:d}=c(a,l.options,s);d.forEach(e=>n.Vy.warn(e)),(0,n.eh)(d,s)||i.push(h)}e.series=i}validateAxesOptions(e){if(!("axes"in e)||!e.axes)return;const t=this.chartDef?.name,i=[],s=e.axes.length??0;let r;for(let o=0;o<s;o++){const s=`axes[${o}]`;let a=e.axes[o];"time"===a.type&&null!=a.unit&&(a={...a,type:"unit-time"});const l=n.sy.getAxisModule(a.type);if(null==l){r??(r=(0,n.lp)(Array.from(n.sy.listModulesByType(n.nR.Axis)).filter(e=>e.chartType===t).map(e=>e.name),"or",hS)),n.Vy.warn(`Unknown type \`${a.type}\` at  \`${s}.type\`; expecting one of ${r}, ignoring all axes options.`),delete e.axes;break}if(l.chartType!==t){n.Vy.warn(`Axis type \`${l.name}\` at  \`${s}.type\` is not supported by chart type \`${t}\`, ignoring.`);break}const{validate:c=n.tf}=l,{cleared:h,invalid:d}=c(a,l.options,s);d.forEach(e=>n.Vy.warn(e)),(0,n.eh)(d,s)||i.push(h)}e.axes=i}diffOptions(t){return this===t?{}:null==t?this.processedOptions:this.fastDelta??Ft(t.processedOptions,this.processedOptions,e.JSON_DIFF_OPTS)}getSeriesThemeConfig(e,t){return t?.config[e]??{}}getDefaultAxes(e,t){const i=this.optionsType(e),n=e.series?.find(e=>(e.type??"line")===i)??{},s=ta.cloneDefaultAxes(i);return Wt(s,{},void 0,N(n,t)),s}optionsType(e){return e.series?.[0]?.type??"line"}splitAnnotationsOptions(e){const{axesButtons:t=null,enabled:i=null,optionsToolbar:n=null,toolbar:s=null,...r}=e;return null==t&&null==i&&null==n&&null==s?[{},r]:[{annotations:{axesButtons:t,enabled:i,optionsToolbar:n,toolbar:s}},r]}processAxesOptions(e,t){"axes"in e&&(e.axes=e.axes?.map(e=>{const{crossLines:i,...n}=N(t[e.type]?.[e.position],t[e.type]);e.crossLines&&(e.crossLines=_(e.crossLines,i));const s=n.gridLine?.style;e.gridLine?.style&&s?.length&&(e.gridLine.style=e.gridLine.style.map((e,t)=>null!=e.stroke||null!=e.lineDash?N(e,s.at(t%s.length)):e));const{top:r,right:o,bottom:a,left:l,...c}=N(e,n);return c}))}processSeriesOptions(e,t){const i=this.getTooltipPositionDefaults(e),s=e.series?.map(s=>{s.type??(s.type="line");const{innerLabels:r,...o}=this.getSeriesThemeConfig(s.type,t).series??{},a=n.sy.getSeriesModule(s.type),l=Boolean(a?.options.tooltip),c=Boolean(a?.options.visible),h=l&&this.getTooltipRangeDefaults(e,s.type),d=N(this.getSeriesGroupingOptions(s),s,l&&i,h,o,c&&{visible:!0});return d.innerLabels&&(d.innerLabels=_(d.innerLabels,r)),d});e.series=this.setSeriesGroupingOptions(s??[])}processMiniChartSeriesOptions(e){let t=e.navigator?.miniChart?.series;null!=t&&(t=t.map(e=>(e.type??(e.type="line"),e)),e.navigator.miniChart.series=this.setSeriesGroupingOptions(t))}resolveThemeOperations(t,i){const n=Wt(i,t,new Set(["palette","data","theme"]));e.debug("ChartOptions.resolveTheme()",n)}getSeriesGroupingOptions(e){const t=ta.isGroupable(e.type),i=ta.isStackable(e.type),s=ta.isStackedByDefault(e.type);e.grouped&&!t&&n.Vy.warnOnce(`unsupported grouping of series type "${e.type}".`),!e.stacked&&!e.stackGroup||i||n.Vy.warnOnce(`unsupported stacking of series type "${e.type}".`);let{grouped:r,stacked:o}=e;return o??(o=(s||null!=e.stackGroup)&&!(t&&r)),r??(r=!0),{stacked:i&&o,grouped:t&&r&&!(i&&o)}}setSeriesGroupingOptions(t){const i=this.getSeriesGrouping(t);e.debug("ChartOptions.setSeriesGroupingOptions() - series grouping: ",i);const n={},s=i.reduce((e,t)=>{var i;return"default"===t.groupType||(e[i=t.seriesType]??(e[i]=0),e[t.seriesType]+="stack"===t.groupType?1:t.series.length),e},{});return i.flatMap(e=>{var t;switch(n[t=e.seriesType]??(n[t]=0),e.groupType){case"stack":{const t=n[e.seriesType]++;return e.series.map((i,n)=>Object.assign(i,{seriesGrouping:{groupId:e.groupId,groupIndex:t,groupCount:s[e.seriesType],stackIndex:n,stackCount:e.series.length}}))}case"group":return e.series.map(t=>Object.assign(t,{seriesGrouping:{groupId:e.groupId,groupIndex:n[e.seriesType]++,groupCount:s[e.seriesType],stackIndex:0,stackCount:0}}))}return e.series}).map(({stacked:e,grouped:t,...i})=>i)}getSeriesGroupId(e){return[e.type,e.xKey,e.stacked?e.stackGroup??"stacked":"grouped"].filter(Boolean).join("-")}getSeriesGrouping(e){const t=new Map;return e.reduce((e,i)=>{const n=i.type;if(i.stacked||i.grouped){const s=this.getSeriesGroupId(i);if(!t.has(s)){const r={groupType:i.stacked?"stack":"group",seriesType:n,series:[],groupId:s};t.set(s,r),e.push(r)}t.get(s).series.push(i)}else e.push({groupType:"default",seriesType:n,series:[i],groupId:"__default__"});return e},[])}getTooltipPositionDefaults(e){const t=e.tooltip?.position;if(!(0,n.Qd)(t))return;const{type:i,anchorTo:s,placement:r,xOffset:o,yOffset:a}=t,l={};return(0,n.Kg)(i)&&(0,n.Xl)(Lv,i)&&(l.type=i),(0,n.Kg)(s)&&(0,n.Xl)(Iv,s)&&(l.anchorTo=s),(0,n.Kg)(r)&&(0,n.Xl)(Rv,r)&&(l.placement=r),(0,n.Bf)(o)&&(l.xOffset=o),(0,n.Bf)(a)&&(l.yOffset=a),{tooltip:{position:l}}}getTooltipRangeDefaults(e,t){return{tooltip:{range:e.tooltip?.range??ta.getTooltipDefauls(t)?.range}}}soloSeriesIntegrity(e){if(!(0,n.cy)(e.series))return;const t=e.series;if(t&&t.length>1&&t.some(e=>ta.isSolo(e.type))){const i=this.optionsType(e);if(ta.isSolo(i))n.Vy.warn(`series[0] of type '${i}' is incompatible with other series types. Only processing series[0]`),e.series=t.slice(0,1);else{const{solo:i,nonSolo:s}=(0,n.$z)(t,e=>ta.isSolo(e.type)?"solo":"nonSolo"),r=(0,n.Am)(i.map(e=>e.type)).join(", ");n.Vy.warn(`Unable to mix these series types with the lead series type: ${r}`),e.series=s}}}static enableConfiguredJsonOptions(e,t){"object"==typeof t&&"enabled"in t&&!t._enabledFromTheme&&null==e.enabled&&(t.enabled=!0)}static cleanupEnabledFromThemeJsonOptions(e){null!=e._enabledFromTheme&&delete e._enabledFromTheme}enableConfiguredOptions(t,i){Ht(i,e.enableConfiguredJsonOptions,new Set(["data","theme"]),t),Ht(t,e.cleanupEnabledFromThemeJsonOptions,new Set(["data","theme"]))}static processFontOptions(e,t,i,n=new Set){if("object"==typeof e&&"fontFamily"in e)if(Array.isArray(e.fontFamily)){const t=[];for(const i of e.fontFamily)"object"==typeof i&&"googleFont"in i?(t.push(i.googleFont),n?.add(i.googleFont)):t.push(i);e.fontFamily=t.join(", ")}else"object"==typeof e.fontFamily&&"googleFont"in e.fontFamily&&(e.fontFamily=e.fontFamily.googleFont,n?.add(e.fontFamily));return n}processFonts(t,i=new Set){return Ht(t,e.processFontOptions,new Set(["data","theme"]),void 0,void 0,i)}static removeDisabledOptionJson(e){"enabled"in e&&!1===e.enabled&&Object.keys(e).forEach(t=>{"enabled"!==t&&delete e[t]})}removeDisabledOptions(t){Ht(t,e.removeDisabledOptionJson,new Set(["data","theme","contextMenu"]))}static removeLeftoverSymbolsJson(e){if(e&&(0,n.Gv)(e))for(const t of Object.keys(e)){const i=e[t];(0,n.Bm)(i)&&delete e[t]}}removeLeftoverSymbols(t){Ht(t,e.removeLeftoverSymbolsJson,new Set(["data"]))}specialOverridesDefaults(e){if(null==e.window?e.window=(0,n.zk)():(0,n.d1)(e.window),null==e.document?e.document=(0,n.YE)():(0,n._9)(e.document),null==e.window)throw new Error("AG Charts - unable to resolve global window");if(null==e.document)throw new Error("AG Charts - unable to resolve global document");return e}};dS.OPTIONS_CLONE_OPTS={shallow:new Set(["data","container"]),assign:new Set(["context","theme"])},dS.JSON_DIFF_OPTS=new Set(["data"]),dS.perfDebug=y.create(!0,"perf"),dS.FAST_PATH_OPTIONS=new Set(["data","width","height","container"]),dS.debug=y.create(!0,"opts");var uS=dS,pS=class e{constructor(e,t,i,n,s,r=1e3){this.name=e,this.buildItem=t,this.releaseItem=i,this.destroyItem=n,this.maxPoolSize=s,this.cleanupTimeMs=r,this.freePool=[],this.busyPool=new Set}static getPool(t,i,n,s,r){return this.pools.has(t)||this.pools.set(t,new e(t,i,n,s,r)),this.pools.get(t)}isFull(){return this.freePool.length+this.busyPool.size>=this.maxPoolSize}hasFree(){return this.freePool.length>0}obtain(t){if(!this.hasFree()&&this.isFull())throw new Error("AG Charts - pool exhausted");let i=this.freePool.pop();return null==i?(i=this.buildItem(t),e.debug(()=>[`Pool[name=${this.name}]: Created instance (${this.freePool.length} / ${this.busyPool.size+1} / ${this.maxPoolSize})`,i])):e.debug(()=>[`Pool[name=${this.name}]: Re-used instance (${this.freePool.length} / ${this.busyPool.size+1} / ${this.maxPoolSize})`,i]),this.busyPool.add(i),{item:i,release:()=>this.release(i)}}obtainFree(){const t=this.freePool.pop();if(null==t)throw new Error("AG Charts - pool has no free instances");return e.debug(()=>[`Pool[name=${this.name}]: Re-used instance (${this.freePool.length} / ${this.busyPool.size+1} / ${this.maxPoolSize})`,t]),this.busyPool.add(t),{item:t,release:()=>this.release(t)}}release(t){if(!this.busyPool.has(t))throw new Error("AG Charts - cannot free item from pool which is not tracked as busy.");e.debug(()=>[`Pool[name=${this.name}]: Releasing instance (${this.freePool.length} / ${this.busyPool.size} / ${this.maxPoolSize})`,t]),this.releaseItem(t),this.busyPool.delete(t),this.freePool.push(t),e.debug(()=>[`Pool[name=${this.name}]: Returned instance to free pool (${this.freePool.length} / ${this.busyPool.size} / ${this.maxPoolSize})`,t]);const i=Date.now(),n=i+.5*this.cleanupTimeMs;this.cleanPoolTimer&&(this.cleanPoolDue??1/0)<n&&(clearTimeout(this.cleanPoolTimer),this.cleanPoolTimer=void 0),this.cleanPoolTimer||(this.cleanPoolDue=i+this.cleanupTimeMs,this.cleanPoolTimer=setTimeout(this.cleanPool.bind(this),this.cleanupTimeMs))}cleanPool(){const t=this.freePool.splice(0);for(const e of t)this.destroyItem(e);e.debug(()=>[`Pool[name=${this.name}]: Cleaned pool of ${t.length} items (${this.freePool.length} / ${this.busyPool.size} / ${this.maxPoolSize})`])}destroy(){this.cleanPool();for(const e of this.busyPool.values())this.destroyItem(e);this.busyPool.clear()}};pS.pools=new Map,pS.debug=y.create(!0,"pool");var gS=pS;n.sy.registerMany(Jy);var fS=y.create(!0,"opts"),mS=class{static licenseCheck(e){this.licenseChecked||(this.licenseManager=eC.licenseManager?.(e),this.licenseManager?.validateLicense(),this.licenseChecked=!0)}static getLicenseDetails(e){return eC.licenseManager?.({}).getLicenseDetails(e)}static getInstance(e){return yS.getInstance(e)}static create(e,t){return fS.group("AgCharts.create()",()=>{e=y.inDevelopmentMode(()=>U(Vt(e)))??e,this.licenseCheck(e);const i=yS.createOrUpdate({userOptions:e,licenseManager:this.licenseManager,optionsMetadata:t});return this.licenseManager?.isDisplayWatermark()&&this.licenseManager&&eC.injectWatermark?.(i.chart.ctx.domManager,this.licenseManager.getWatermarkMessage()),i})}static createFinancialChart(e){return fS.group("AgCharts.createFinancialChart()",()=>this.create(e,{presetType:"price-volume"}))}static createGauge(e){return fS.group("AgCharts.createGauge()",()=>this.create(e,{presetType:"gauge-preset"}))}static __createSparkline(e){return fS.group("AgCharts.__createSparkline()",()=>{const{pool:t,...i}=e;return this.create(i,{presetType:"sparkline",pool:t??!0,domMode:"minimal"})})}};mS.licenseChecked=!1;var vS=class e{static getInstance(e){const t=gh.getInstance(e);return t?yh.chartInstances.get(t):void 0}static initialiseModules(){e.initialised||(Tv(),function(){for(const e of c.modules){if("enterprise"!==e.packageType||Yo(e)||n.Vy.errorOnce("Unexpected enterprise module registered: "+e.identifier),"root"===e.type&&e.themeTemplate)for(const t of e.chartTypes)ea.set(t,e.themeTemplate);if("series"===e.type){if(e.chartTypes.length>1)throw new Error(`AG Charts - Module definition error: ${e.identifier}`);ta.register(e.identifier,e)}if("series-option"===e.type&&e.themeTemplate)for(const t of e.seriesTypes)ta.setThemeTemplate(t,e.themeTemplate);if("axis-option"===e.type&&e.themeTemplate)for(const t of e.axisTypes){const i=jo.getThemeTemplate(t),n=N(e.themeTemplate,i);jo.setThemeTemplate(t,n)}"axis"===e.type&&jo.register(e.identifier,e),"legend"===e.type&&qo.register(e.identifier,e)}if(c.hasEnterpriseModules()){const e=Ko.filter(({useCount:e})=>null==e||0===e);e.length>0&&n.Vy.errorOnce("Enterprise modules expected but not registered: ",e)}}(),e.initialised=!0)}static createOrUpdate(t){let{proxy:i}=t;const{userOptions:s,licenseManager:r,processedOverrides:o=i?.chart?.chartOptions.processedOverrides??{},specialOverrides:a=i?.chart?.chartOptions.specialOverrides??{},optionsMetadata:l=i?.chart?.chartOptions.optionMetadata??{},deltaOptions:c,stripSymbols:h=!1}=t,d=null!=eC.styles?[["ag-charts-enterprise",eC.styles]]:[],{presetType:u}=l;e.initialiseModules(),fS(()=>[">>> AgCharts.createOrUpdate() user options",Vt(s)]);let p=s;mS.optionsMutationFn&&p&&(p=mS.optionsMutationFn(Vt(p),u),fS(()=>[">>> AgCharts.createOrUpdate() MUTATED user options",Vt(p)]));const g=this.getPool(l);let f,m=!1,v=i?.chart;null==v&&g?.hasFree()&&(f=g.obtainFree(),v=f.item);const{document:y,window:C,styleContainer:b,...S}=p??{},w=v?.getChartOptions(),x=new uS(w,S,o,{...a,document:y,window:C,styleContainer:b},l,c,h);return null!=v&&n.sy.detectChartDefinition(x.processedOptions)===n.sy.detectChartDefinition(v.chartOptions.processedOptions)||(f?.release(),f=this.getPool(x.optionMetadata)?.obtain(x),f?v=f.item:(m=!0,v=e.createChartInstance(x,v))),d.forEach(([e,t])=>{v.ctx.domManager.addStyles(e,t)}),v.ctx.fontManager.updateFonts(x.googleFonts),null==i?(i=new yh(v,e.callbackApi,r),i.releaseChart=f?.release):(f||m)&&(i.releaseChart?.(),i.chart=v,i.releaseChart=f?.release),fS.check()&&"undefined"!=typeof window&&(window.agChartInstances??(window.agChartInstances={}),window.agChartInstances[v.id]=v),v.queuedUserOptions.push(x.userOptions),v.queuedChartOptions.push(x),v.requestFactoryUpdate(e=>{fS.group(">>>> Chart.applyOptions()",()=>{e.applyOptions(x);const t=e.queuedUserOptions.indexOf(x.userOptions)+1;e.queuedUserOptions.splice(0,t),e.queuedChartOptions.splice(0,t)})}),i}static markRemovedProperties(e,t,i=!1){if("object"!=typeof e)return i;for(const t of Object.keys(e))void 0===e[t]&&(Object.assign(e,{[t]:Symbol("UNSET")}),i||(i=!0));return i}static updateUserDelta(t,i){const n=Ht(i=Vt(i,uS.OPTIONS_CLONE_OPTS),e.markRemovedProperties,new Set(["data"]),void 0,void 0,!1);fS(()=>[">>> AgCharts.updateUserDelta() user delta",Vt(i)]),e.createOrUpdate({proxy:t,deltaOptions:i,stripSymbols:n})}static createChartInstance(e,t){const i=t?.destroy({keepTransferableResources:!0});return n.sy.detectChartDefinition(e.processedOptions).create(e,i)}static getPool(e){if(!0===e.pool)return gS.getPool(e.presetType??"default",this.createChartInstance,this.detachAndClear,this.destroy,1/0)}};vS.caretaker=new Xi($i),vS.initialised=!1,vS.callbackApi={caretaker:vS.caretaker,create:(e,t,i,n)=>vS.createOrUpdate({userOptions:e,processedOverrides:t,specialOverrides:i,optionsMetadata:n}),update:(e,t)=>vS.createOrUpdate({userOptions:e,proxy:t}),updateUserDelta:(e,t)=>vS.updateUserDelta(e,t)},vS.detachAndClear=e=>e.detachAndClear(),vS.destroy=e=>e.destroy();var yS=vS,CS={};o(CS,{Arc:()=>bS,BBox:()=>m,Caption:()=>Fi,CategoryScale:()=>wh,Group:()=>At,Line:()=>pa,LinearScale:()=>Bd,Marker:()=>Oc,Path:()=>bc,RadialColumnShape:()=>wS,Rect:()=>Zd,Scene:()=>ds,Sector:()=>qm,Shape:()=>dt,TranslatableGroup:()=>It,getRadialColumnWidth:()=>xS,toRadians:()=>oe});var bS=class extends bc{constructor(){super(),this.centerX=0,this.centerY=0,this.radius=10,this.startAngle=0,this.endAngle=2*Math.PI,this.counterClockwise=!1,this.type=0,this.restoreOwnStyles()}get fullPie(){return(0,n.YX)(ie(this.startAngle),ie(this.endAngle))}updatePath(){const e=this.path;e.clear(),e.arc(this.centerX,this.centerY,this.radius,this.startAngle,this.endAngle,this.counterClockwise),1===this.type?e.closePath():2!==this.type||this.fullPie||(e.lineTo(this.centerX,this.centerY),e.closePath())}computeBBox(){return new m(this.centerX-this.radius,this.centerY-this.radius,2*this.radius,2*this.radius)}isPointInPath(e,t){const i=this.getBBox();return 0!==this.type&&i.containsPoint(e,t)&&this.path.isPointInPath(e,t)}};function SS(e,t,i){const n=Math.sqrt(e**2+t**2),s=Math.atan2(t,e)+i;return{x:Math.cos(s)*n,y:Math.sin(s)*n}}bS.className="Arc",a([$()],bS.prototype,"centerX",2),a([$()],bS.prototype,"centerY",2),a([$()],bS.prototype,"radius",2),a([$()],bS.prototype,"startAngle",2),a([$()],bS.prototype,"endAngle",2),a([$()],bS.prototype,"counterClockwise",2),a([$()],bS.prototype,"type",2);var wS=class extends bc{constructor(){super(...arguments),this.isBeveled=!0,this.columnWidth=0,this.startAngle=0,this.endAngle=0,this.outerRadius=0,this.innerRadius=0,this.axisInnerRadius=0,this.axisOuterRadius=0,this.isRadiusAxisReversed=!1}set cornerRadius(e){}computeBBox(){const{innerRadius:e,outerRadius:t,columnWidth:i}=this,n=this.getRotation(),s=-i/2,r=i/2,o=-t,a=-e;let l=1/0,c=1/0,h=-1/0,d=-1/0;for(let e=0;e<4;e+=1){const{x:t,y:i}=SS(e%2==0?s:r,e<2?o:a,n);l=Math.min(t,l),c=Math.min(i,c),h=Math.max(t,h),d=Math.max(i,d)}return new m(l,c,h-l,d-c)}getRotation(){const{startAngle:e,endAngle:t}=this;return ie(e+le(e,t)/2+Math.PI/2)}updatePath(){const{isBeveled:e}=this;e?this.updateBeveledPath():this.updateRectangularPath(),this.checkPathDirty()}updateRectangularPath(){const{columnWidth:e,innerRadius:t,outerRadius:i,path:n}=this,s=-e/2,r=e/2,o=-i,a=-t,l=this.getRotation(),c=[[s,a],[s,o],[r,o],[r,a]].map(([e,t])=>SS(e,t,l));n.clear(!0),n.moveTo(c[0].x,c[0].y),n.lineTo(c[1].x,c[1].y),n.lineTo(c[2].x,c[2].y),n.lineTo(c[3].x,c[3].y),n.closePath()}updateBeveledPath(){const{columnWidth:e,path:t,outerRadius:i,innerRadius:s,axisInnerRadius:r,axisOuterRadius:o,isRadiusAxisReversed:a}=this,l=(0,n.YX)(s,r),c=Math.asin(e/2/s),h=this.getRotation(),d=(e,t)=>SS(e,t,h),u=(e,t)=>Math.sqrt(e**2+t**2),p=(e,t)=>t>e?0:Math.sqrt(e**2-t**2),g=(e,t,i)=>i?e<t:e>t,f=l&&!isNaN(c)&&c<Math.PI/6;let m=-e/2,v=e/2;const y=-i,C=-s*(f?Math.cos(c):1),b=g(o,u(s,e/2),!a);if(b){const e=p(o,s);m=-e,v=e}t.clear(!0);const S=d(m,C);t.moveTo(S.x,S.y);const w=(0,n.YX)(s,i),x=g(o,u(i,e/2),!a);if(w&&f)t.arc(0,0,s,ie(-c-Math.PI/2)+h,ie(c-Math.PI/2)+h,!1);else if(x){const s=-p(o,e/2),r=p(o,i);if(!b){const e=d(m,s);t.lineTo(e.x,e.y)}if(t.arc(0,0,o,Math.atan2(s,m)+h,Math.atan2(y,-r)+h,!1),!(0,n.YX)(r,0)){const e=d(r,y);t.lineTo(e.x,e.y)}t.arc(0,0,o,Math.atan2(y,r)+h,Math.atan2(s,v)+h,!1)}else{const e=d(m,y),i=d(v,y);t.lineTo(e.x,e.y),t.lineTo(i.x,i.y)}const E=d(v,C);if(t.lineTo(E.x,E.y),f)t.arc(0,0,s,ie(c-Math.PI/2)+h,ie(-c-Math.PI/2)+h,!0);else{const e=d(m,C);t.lineTo(e.x,e.y)}t.closePath()}};function xS(e,t,i,n,s){const r=le(e,t),o=r*(1-n)/2;if(e+=o,t-=o,r<.001)return 2*i*s;if(r>=2*Math.PI){const i=e+r/2;e=i-Math.PI,t=i+Math.PI}const a=i*Math.cos(e),l=i*Math.sin(e),c=i*Math.cos(t),h=i*Math.sin(t),d=Math.floor(Math.sqrt((a-c)**2+(l-h)**2)),u=2*i*s;return Math.max(1,Math.min(u,d))}wS.className="RadialColumnShape",a([$()],wS.prototype,"isBeveled",2),a([$()],wS.prototype,"columnWidth",2),a([$()],wS.prototype,"startAngle",2),a([$()],wS.prototype,"endAngle",2),a([$()],wS.prototype,"outerRadius",2),a([$()],wS.prototype,"innerRadius",2),a([$()],wS.prototype,"axisInnerRadius",2),a([$()],wS.prototype,"axisOuterRadius",2),a([$()],wS.prototype,"isRadiusAxisReversed",2);var ES={};o(ES,{ChartTheme:()=>gC,DEFAULT_ANNOTATION_HANDLE_FILL:()=>Zu,DEFAULT_ANNOTATION_STATISTICS_COLOR:()=>ep,DEFAULT_ANNOTATION_STATISTICS_DIVIDER_STROKE:()=>tp,DEFAULT_ANNOTATION_STATISTICS_DOWN_FILL:()=>ip,DEFAULT_ANNOTATION_STATISTICS_DOWN_STROKE:()=>np,DEFAULT_ANNOTATION_STATISTICS_FILL:()=>Qu,DEFAULT_ANNOTATION_STATISTICS_STROKE:()=>Ju,DEFAULT_CAPTION_ALIGNMENT:()=>ku,DEFAULT_CAPTION_LAYOUT_STYLE:()=>Lu,DEFAULT_FIBONACCI_STROKES:()=>Yu,DEFAULT_FINANCIAL_CHARTS_ANNOTATION_BACKGROUND_FILL:()=>Xu,DEFAULT_FINANCIAL_CHARTS_ANNOTATION_COLOR:()=>$u,DEFAULT_GRIDLINE_ENABLED:()=>lp,DEFAULT_POLAR_SERIES_STROKE:()=>ju,DEFAULT_SEPARATION_LINES_COLOUR:()=>Iu,DEFAULT_SHADOW_COLOUR:()=>Ru,DEFAULT_SPARKLINE_CROSSHAIR_STROKE:()=>Ku,DEFAULT_TEXTBOX_COLOR:()=>op,DEFAULT_TEXTBOX_FILL:()=>sp,DEFAULT_TEXTBOX_STROKE:()=>rp,DEFAULT_TEXT_ANNOTATION_COLOR:()=>qu,DEFAULT_TOOLBAR_POSITION:()=>ap,IS_DARK_THEME:()=>Du,PALETTE_ALT_DOWN_FILL:()=>zu,PALETTE_ALT_DOWN_STROKE:()=>Bu,PALETTE_ALT_NEUTRAL_FILL:()=>Uu,PALETTE_ALT_NEUTRAL_STROKE:()=>Wu,PALETTE_ALT_UP_FILL:()=>Hu,PALETTE_ALT_UP_STROKE:()=>Vu,PALETTE_DOWN_FILL:()=>_u,PALETTE_DOWN_STROKE:()=>Nu,PALETTE_NEUTRAL_FILL:()=>Gu,PALETTE_NEUTRAL_STROKE:()=>Fu,PALETTE_UP_FILL:()=>Ou,PALETTE_UP_STROKE:()=>Pu,getChartTheme:()=>aS,resolveOperation:()=>AS,themeNames:()=>MS,themeSymbols:()=>Tu,themes:()=>oS});var MS=Object.keys(oS);function AS(e){const t=gC.getDefaultPublicParameters();t.__palette=gC.getDefaultColors();const i={operation:e};return Wt(i,t),i.operation}var TS={};o(TS,{Color:()=>me,interpolateColor:()=>Ss});var DS={};o(DS,{AbstractBarSeries:()=>Wf,AbstractBarSeriesProperties:()=>Uf,ActionOnSet:()=>li,AnchoredPopover:()=>lw,Animation:()=>_s,AnimationManager:()=>Hs,Arc:()=>bS,Axis:()=>zl,AxisGroupZIndexMap:()=>Bl,AxisInterval:()=>vl,AxisLabel:()=>yl,AxisTick:()=>bl,AxisTickGenerator:()=>Wl,AxisTicks:()=>WS,BBox:()=>m,BBoxValues:()=>h,Background:()=>Qd,BackgroundModule:()=>Jd,BandScale:()=>to,BarSeries:()=>rm,BarSeriesModule:()=>lm,BaseModuleInstance:()=>l,BaseProperties:()=>De,BaseToolbar:()=>gw,ButtonWidget:()=>kn,CachedTextMeasurer:()=>Ii,CachedTextMeasurerPool:()=>Di,CallbackCache:()=>gs,Caption:()=>Fi,CartesianAxis:()=>$l,CartesianSeries:()=>jp,CartesianSeriesNodeEvent:()=>zp,CartesianSeriesProperties:()=>Up,CategoryAxis:()=>Ah,CategoryScale:()=>wh,ChangeDetectableProperties:()=>Sp,Chart:()=>gh,ChartAxisDirection:()=>Gi,ChartEventManager:()=>zs,ChartOptions:()=>uS,ChartUpdateType:()=>ys,CollapseMode:()=>lg,Color:()=>me,ColorScale:()=>we,ConicGradient:()=>Ee,ContextMenuBuiltins:()=>js,ContextMenuRegistry:()=>Ks,ContinuousScale:()=>cr,DEFAULT_CARTESIAN_DIRECTION_KEYS:()=>Bp,DEFAULT_CARTESIAN_DIRECTION_NAMES:()=>Hp,DEFAULT_TOOLTIP_CLASS:()=>Fc,DEFAULT_TOOLTIP_DARK_CLASS:()=>Gc,DIRECTION_SWAP_AXES:()=>cp,DOMManager:()=>In,DataController:()=>Wo,DataModel:()=>zo,DataModelSeries:()=>Vp,DataService:()=>Cs,Debug:()=>y,Deprecated:()=>Ac,DeprecatedAndRenamedTo:()=>Tc,DiscreteTimeScale:()=>io,DragInterpreter:()=>ir,DraggablePopover:()=>hw,DropShadow:()=>wp,ExtendedPath2D:()=>Je,FILL_IMAGE_DEFAULTS:()=>fp,FILL_PATTERN_DEFAULTS:()=>gp,FONT_SIZE_RATIO:()=>wu,FillGradientDefaults:()=>Tp,FillImageDefaults:()=>Ip,FillPatternDefaults:()=>Dp,FloatingToolbar:()=>vw,Gradient:()=>xe,Group:()=>At,GroupedCategoryAxis:()=>kd,HdpiCanvas:()=>Jn,HierarchyNode:()=>PS,HierarchySeries:()=>NS,HierarchySeriesProperties:()=>OS,HighlightManager:()=>$s,HighlightProperties:()=>Ap,HighlightStyle:()=>Rp,Image:()=>tw,InteractionManager:()=>Vs,InteractionState:()=>Gs,InterpolationProperties:()=>Kp,Invalidating:()=>ye,LARGEST_KEY_INTERVAL:()=>id,Label:()=>pl,LayoutElement:()=>Bi,LayoutManager:()=>Hi,LegendMarkerLabel:()=>cu,Line:()=>pa,LineSeries:()=>Am,LineSeriesModule:()=>Im,LinearGradient:()=>Me,LinearScale:()=>Bd,Listeners:()=>Qi,LogScale:()=>Vd,LonLatBBox:()=>_S,Marker:()=>Oc,Menu:()=>cw,MenuItemWidget:()=>nw,MenuWidget:()=>rw,MercatorScale:()=>zS,ModuleRegistry:()=>n.sy,Motion:()=>ws,NODE_UPDATE_STATE_TO_PHASE_MAPPING:()=>oa,NativeWidget:()=>_n,NewAreaSeriesModule:()=>Bf,NewBarSeriesModule:()=>cm,NewBubbleSeriesModule:()=>ym,NewHistogramSeriesModule:()=>Em,NewLineSeriesModule:()=>Rm,NewScatterSeriesModule:()=>Fm,NiceMode:()=>wl,Node:()=>J,NumberAxis:()=>Hd,ObserveChanges:()=>ci,OrdinalTimeScale:()=>el,PHASE_METADATA:()=>ks,PHASE_ORDER:()=>Ls,PREV_NEXT_KEYS:()=>un,Padding:()=>si,ParallelStateMachine:()=>Sa,Path:()=>bc,PointerEvents:()=>Z,PolarAxis:()=>Hy,PolarSeries:()=>cv,PolarZIndexMap:()=>lv,Popover:()=>aw,PropertiesArray:()=>Ie,Property:()=>Te,ProxyInteractionService:()=>Yn,ProxyOnWrite:()=>oi,ProxyProperty:()=>ri,ProxyPropertyOnWrite:()=>ai,QUICK_TRANSITION:()=>.2,RENDER_TO_OFFSCREEN_CANVAS_THRESHOLD:()=>Wp,RadialColumnShape:()=>wS,Range:()=>il,Rect:()=>Zd,RepeatType:()=>Ps,Rotatable:()=>yt,RotatableGroup:()=>Dt,RotatableText:()=>Ni,SAFE_FILLS_OPERATION:()=>dp,SAFE_FILL_OPERATION:()=>hp,SAFE_RANGE2_OPERATION:()=>pp,SAFE_STROKE_FILL_OPERATION:()=>up,SKIP_JS_BUILTINS:()=>B,SMALLEST_KEY_INTERVAL:()=>td,SORT_DOMAIN_GROUPS:()=>nd,Scalable:()=>Ct,ScalableGroup:()=>Tt,Scene:()=>ds,SceneArrayChangeDetection:()=>q,SceneChangeDetection:()=>$,SceneObjectChangeDetection:()=>Y,Sector:()=>qm,SectorBox:()=>Gm,Selection:()=>ua,Series:()=>Cc,SeriesContentZIndexMap:()=>dc,SeriesGroupingChangedEvent:()=>yc,SeriesItemHighlightStyle:()=>xp,SeriesMarker:()=>kp,SeriesNodeEvent:()=>vc,SeriesNodePickMode:()=>mc,SeriesProperties:()=>Lp,SeriesTooltip:()=>Np,SeriesZIndexMap:()=>hc,Shape:()=>dt,SimpleTextMeasurer:()=>Li,SliderWidget:()=>Un,StateMachine:()=>ba,StateMachineProperty:()=>ma,StopProperties:()=>Le,SvgPath:()=>ew,TRIPLE_EQ:()=>K,Text:()=>Pi,TextUtils:()=>Ri,TextWrapper:()=>_i,ThemeConstants:()=>bu,ThemeSymbols:()=>Tu,TimeAxisParentLevel:()=>Ud,TimeScale:()=>Xa,Toolbar:()=>fw,ToolbarButtonProperties:()=>dw,ToolbarButtonWidget:()=>uw,ToolbarWidget:()=>jn,Tooltip:()=>Xc,TooltipManager:()=>Js,TooltipPosition:()=>qc,Transformable:()=>wt,TransformableGroup:()=>Rt,TransformableText:()=>Oi,Translatable:()=>bt,TranslatableGroup:()=>It,TranslatableLine:()=>Vl,UnitTimeScale:()=>Ra,UpdateService:()=>Eo,Vec2:()=>IS,Vec4:()=>no,WIDGET_HTML_EVENTS:()=>di,Widget:()=>Ai,WidgetEventUtil:()=>fi,ZIndexMap:()=>ms,ZoomManager:()=>po,accumulateGroup:()=>ud,accumulateStack:()=>gd,accumulatedValue:()=>Vh,accumulativeValueProperty:()=>Zh,addEscapeEventListener:()=>nn,addHitTestersToQuadtree:()=>Hf,addMouseCloseListener:()=>sn,addOverrideFocusVisibleEventListener:()=>an,addTouchCloseListener:()=>rn,adjustLabelPlacement:()=>sm,angleBetween:()=>le,angleCategoryAxisOptionsDefs:()=>KC,angleNumberAxisOptionsDefs:()=>WC,angularPadding:()=>he,animationValidation:()=>cd,annotationCalloutStylesDefs:()=>hb,annotationChannelStyleDefs:()=>ob,annotationChannelTextDefs:()=>JC,annotationCommentStylesDefs:()=>db,annotationCrossLineStyleDefs:()=>rb,annotationDisjointChannelStyleDefs:()=>ab,annotationFibonacciStylesDefs:()=>cb,annotationLineStyleDefs:()=>sb,annotationLineTextDefs:()=>QC,annotationMeasurerStylesDefs:()=>gb,annotationNoteStylesDefs:()=>ub,annotationOptionsDef:()=>mb,annotationParallelChannelStyleDefs:()=>lb,annotationQuickMeasurerStylesDefs:()=>fb,annotationShapeStylesDefs:()=>pb,annotationTextStylesDef:()=>ZC,applyShapeFillBBox:()=>gc,applyShapeStyle:()=>fc,areScalingEqual:()=>Mg,area:()=>Gh,autoSizedLabelOptionsDefs:()=>Lf,boxPlotSeriesThemeableOptionsDef:()=>vb,buildFormatter:()=>Xr,buildResetPathFn:()=>Kg,calculateDataDiff:()=>em,calculateDefaultTimeTickFormat:()=>Jr,calculateDerivativeExtrema:()=>Ze,calculateDerivativeExtremaXY:()=>Qe,calculateLabelTranslation:()=>$S,calculatePlacement:()=>Dc,callWithContext:()=>ps,candlestickSeriesThemeableOptionsDef:()=>Cb,cartesianAxisCrosshairOptions:()=>cf,cartesianAxisLabelOptionsDefs:()=>tf,cartesianAxisOptionsDefs:()=>lf,cartesianChartOptionsDefs:()=>My,cartesianCrossLineOptionsDefs:()=>Jg,cartesianNumericAxisLabel:()=>nf,cartesianTimeAxisLabel:()=>sf,cartesianTimeAxisParentLevel:()=>of,checkCrisp:()=>$f,chordSeriesThemeableOptionsDef:()=>bb,clampArray:()=>rr,clippedRoundRect:()=>Xd,collapsedStartingBarPosition:()=>qf,commonAxisLabelOptionsDefs:()=>ef,commonAxisOptionsDefs:()=>af,commonChartOptionsDefs:()=>Af,commonCrossLineLabelOptionsDefs:()=>Zg,commonCrossLineOptionsDefs:()=>Qg,commonSeriesOptionsDefs:()=>Df,commonSeriesThemeableOptionsDefs:()=>Tf,compareDates:()=>La,computeBarFocusBounds:()=>Jf,computeMarkerFocusBounds:()=>Ug,coneFunnelSeriesThemeableOptionsDef:()=>Sb,continuousAxisOptions:()=>hf,countExpandingSearch:()=>Qs,createButton:()=>YS,createCheckbox:()=>qS,createDatumId:()=>yd,createDeprecationWarning:()=>Mc,createIcon:()=>QS,createSelect:()=>XS,createTextArea:()=>ZS,dateToNumber:()=>Zr,datesSortOrder:()=>Pa,datumKeys:()=>Vo,datumStylerProperties:()=>qs,deconstructSelectionsOrNodes:()=>Ns,deepClone:()=>Vt,deepFreeze:()=>U,defaultTimeTickFormat:()=>Qr,diff:()=>vd,drawCorner:()=>$d,drawMarkerUnitPolygon:()=>kc,easing:()=>ws,enterpriseModule:()=>eC,errorBarOptionsDefs:()=>Pf,errorBarThemeableOptionsDefs:()=>kf,evaluateBezier:()=>Ye,extent:()=>Dh,extractDecoratedProperties:()=>L,fillsOptionsDef:()=>_v,findMinMax:()=>or,findQuadtreeMatch:()=>zf,findRangeExtent:()=>ar,fixNumericExtent:()=>Oo,flowProportionChartOptionsDefs:()=>Ry,focusCursorAtEnd:()=>Pt,formatNumber:()=>Hn,formatPercent:()=>Vn,formatValue:()=>Gn,fromToMotion:()=>aa,funnelSeriesThemeableOptionsDef:()=>wb,gaugeChartOptionsDefs:()=>Ly,getAngleRatioRadians:()=>ce,getColorStops:()=>Pe,getCrossLineValue:()=>rl,getDateTicksForInterval:()=>Qa,getDatumRefPoint:()=>Zs,getElementBBox:()=>kt,getIconClassNames:()=>Ot,getLastFocus:()=>yn,getMissCount:()=>_o,getPath:()=>V,getPathComponents:()=>Bo,getRadialColumnWidth:()=>xS,getSequentialColors:()=>mp,getShapeFill:()=>uc,getShapeStyle:()=>pc,groupAccumulativeValueProperty:()=>Jh,groupAverage:()=>Fh,groupCount:()=>_h,groupStackValueProperty:()=>ed,groupSum:()=>Oh,hasNoModifiers:()=>ln,heatmapSeriesThemeableOptionsDef:()=>xb,hierarchyChartOptionsDefs:()=>Iy,initMenuKeyNav:()=>fn,initRovingTabIndex:()=>pn,interpolatePoints:()=>Tg,interpolationOptionsDefs:()=>_f,isAgFlowProportionChartOptions:()=>ic,isAgGaugeChartOptions:()=>sc,isAgHierarchyChartOptions:()=>ec,isAgStandaloneChartOptions:()=>nc,isAgTopologyChartOptions:()=>tc,isBetweenAngles:()=>re,isButtonClickEvent:()=>vn,isChartAxisDirection:()=>Vi,isContinuous:()=>nl,isDecoratedObject:()=>I,isDenseInterval:()=>$a,isGradientFill:()=>rt,isGradientOrPatternFill:()=>ct,isImageFill:()=>lt,isInputPending:()=>Nt,isObjectWithProperty:()=>W,isObjectWithStringProperty:()=>j,isPatternFill:()=>at,isProperties:()=>Re,isScaleValid:()=>Ag,jsonApply:()=>zt,jsonDiff:()=>Ft,jsonPropertyCompare:()=>Gt,jsonResolveOperations:()=>Wt,jsonWalk:()=>Ht,keyProperty:()=>jh,legendSymbolSvg:()=>_c,lineDistanceSquared:()=>ze,linearGaugeSeriesOptionsDef:()=>Bv,linearGaugeSeriesThemeableOptionsDef:()=>Vv,linearGaugeTargetOptionsDef:()=>Fv,listDecoratedProperties:()=>R,makeAccessibleClickListener:()=>mn,mapLineBackgroundSeriesThemeableOptionsDef:()=>Ab,mapLineSeriesThemeableOptionsDef:()=>Mb,mapMarkerSeriesThemeableOptionsDef:()=>Tb,mapShapeBackgroundSeriesThemeableOptionsDef:()=>Ib,mapShapeSeriesThemeableOptionsDef:()=>Db,mapValues:()=>F,markerFadeInAnimation:()=>Gg,markerOptionsDefs:()=>If,markerScaleInAnimation:()=>Vg,markerSwipeScaleInAnimation:()=>Bg,merge:()=>O,mergeArrayDefaults:()=>_,mergeDefaults:()=>N,midpointStartingBarPosition:()=>Xf,moduleRegistry:()=>c,motion:()=>Cw,nearestSquared:()=>p,nearestSquaredInContainer:()=>g,nightingaleSeriesThemeableOptionsDef:()=>Rb,normaliseGroupTo:()=>rd,normalisePropertyTo:()=>ad,normalisedExtentWithMetadata:()=>Ih,normalizeAngle180:()=>se,normalizeAngle360:()=>ie,normalizeAngle360FromDegrees:()=>de,normalizeAngle360Inclusive:()=>ne,normalizeContinuousDomains:()=>hr,numberFormatValidator:()=>Xg,objectsEqual:()=>k,objectsEqualWith:()=>P,ohlcSeriesThemeableOptionsDef:()=>Eb,ordinalTimeAxisOptionsDefs:()=>UC,pairUpSpans:()=>wg,partialAssign:()=>z,pathFadeInAnimation:()=>jg,pathMotion:()=>vp,pathSwipeInAnimation:()=>Wg,pickByMatchingAngle:()=>av,plotAreaPathFill:()=>Ng,plotInterpolatedAreaSeriesFillSpans:()=>Og,plotInterpolatedLinePathStroke:()=>Rg,plotLinePathStroke:()=>Ig,polarChartOptionsDefs:()=>Ay,prepareAreaFillAnimationFns:()=>_g,prepareAreaPathAnimation:()=>Fg,prepareAxisAnimationContext:()=>xl,prepareAxisAnimationFunctions:()=>Al,prepareBarAnimationFunctions:()=>Zf,prepareLinePathAnimation:()=>Pg,prepareLinePathPropertyAnimation:()=>kg,prepareLinePathStrokeAnimationFns:()=>Lg,preparePieSeriesAnimationFunctions:()=>rv,pyramidSeriesThemeableOptionsDef:()=>Lb,radarAreaSeriesThemeableOptionsDef:()=>kb,radarLineSeriesThemeableOptionsDef:()=>Pb,radialBarSeriesThemeableOptionsDef:()=>Nb,radialColumnSeriesThemeableOptionsDef:()=>Ob,radialGaugeSeriesOptionsDef:()=>zv,radialGaugeSeriesThemeableOptionsDef:()=>Hv,radialGaugeTargetOptionsDef:()=>Gv,radiusCategoryAxisOptionsDefs:()=>YC,radiusNumberAxisOptionsDefs:()=>$C,range:()=>Ka,rangeAreaSeriesThemeableOptionsDef:()=>_b,rangeBarSeriesThemeableOptionsDef:()=>Fb,rangeValidator:()=>ff,rangedValueProperty:()=>Xh,resetAxisGroupFn:()=>Tl,resetAxisLabelSelectionFn:()=>Dl,resetAxisLineSelectionFn:()=>Il,resetBarSelectionsFn:()=>Qf,resetLabelFn:()=>bp,resetMarkerFn:()=>Hg,resetMarkerPositionFn:()=>zg,resetMotion:()=>da,resetPieSelectionsFn:()=>ov,rowCountProperty:()=>$h,sankeySeriesThemeableOptionsDef:()=>Gb,scale:()=>cg,sectorBox:()=>Vm,seriesLabelFadeInAnimation:()=>yp,seriesLabelFadeOutAnimation:()=>Cp,seriesLabelOptionsDefs:()=>Rf,setElementBBox:()=>Lt,setPath:()=>H,shadowOptionsDefs:()=>Of,shallowClone:()=>Bt,solveBezier:()=>qe,sortAndUniqueDates:()=>ka,splitBezier:()=>Xe,standaloneChartOptionsDefs:()=>Dy,staticFromToMotion:()=>la,stopPageScrolling:()=>Cn,sum:()=>Nh,sumValues:()=>Ph,sunburstSeriesThemeableOptionsDef:()=>Vb,timeIntervalUnit:()=>qg,toDegrees:()=>ae,toRadians:()=>oe,toolbarButtonOptionsDefs:()=>Mf,tooltipContentAriaLabel:()=>Bc,tooltipHtml:()=>Wc,tooltipOptionsDefs:()=>Nf,topologyChartOptionsDefs:()=>Ty,trailingAccumulatedValue:()=>Bh,trailingAccumulatedValueProperty:()=>Qh,treemapSeriesThemeableOptionsDef:()=>Bb,updateClipPath:()=>$g,updateLabelNode:()=>im,validateCrossLineValue:()=>ol,valueProperty:()=>Kh,visibleRangeIndices:()=>Xs,waterfallSeriesThemeableOptionsDef:()=>zb,without:()=>G});var IS={add:function(e,t){return"number"==typeof t?{x:e.x+t,y:e.y+t}:{x:e.x+t.x,y:e.y+t.y}},angle:function(e,t){return null==t?Math.atan2(e.y,e.x):Math.atan2(e.y,e.x)-Math.atan2(t.y,t.x)},apply:function(e,t){return e.x=t.x,e.y=t.y,e},equal:function(e,t){return e.x===t.x&&e.y===t.y},distance:function(e,t){const i=RS(e,t);return Math.sqrt(i.x*i.x+i.y*i.y)},distanceSquared:function(e,t){const i=RS(e,t);return i.x*i.x+i.y*i.y},from:function(e,t){if("number"==typeof e)return{x:e,y:t};if("currentX"in e)return{x:e.currentX,y:e.currentY};if("offsetWidth"in e)return{x:e.offsetWidth,y:e.offsetHeight};if("width"in e)return[{x:e.x,y:e.y},{x:e.x+e.width,y:e.y+e.height}];if("x1"in e)return[{x:e.x1,y:e.y1},{x:e.x2,y:e.y2}];throw new Error(`Values can not be converted into a vector: [${JSON.stringify(e)}] [${t}]`)},gradient:function(e,t,i){const n=t.x-e.x;return(null==i?t.y-e.y:i-t.y-(i-e.y))/n},intercept:function(e,t,i){return(null==i?e.y:i-e.y)-t*e.x},intersectAtX:function(e,t,i=0,n){const s=e===1/0?1/0:e*i+t;return{x:i,y:null==n?s:n-s}},intersectAtY:function(e,t,i=0,n){return{x:e===1/0?1/0:(i-t)/e,y:null==n?i:n-i}},length:LS,lengthSquared:function(e){return e.x*e.x+e.y*e.y},multiply:function(e,t){return"number"==typeof t?{x:e.x*t,y:e.y*t}:{x:e.x*t.x,y:e.y*t.y}},normalized:function(e){const t=LS(e);return{x:e.x/t,y:e.y/t}},origin:function(){return{x:0,y:0}},required:function(e){return{x:e?.x??0,y:e?.y??0}},rotate:function(e,t,i={x:0,y:0}){const n=LS(e);return{x:i.x+n*Math.cos(t),y:i.y+n*Math.sin(t)}},round:function(e,t=2){return{x:(0,n.GB)(e.x,t),y:(0,n.GB)(e.y,t)}},sub:RS};function RS(e,t){return"number"==typeof t?{x:e.x-t,y:e.y-t}:{x:e.x-t.x,y:e.y-t.y}}function LS(e){return Math.sqrt(e.x*e.x+e.y*e.y)}var kS=class e{constructor(e,t,i,n,s,r,o,a,l){this.series=e,this.datumIndex=t,this.datum=i,this.sizeValue=n,this.colorValue=s,this.sumSize=r,this.depth=o,this.parent=a,this.children=l,this.midPoint={x:0,y:0}}get hasChildren(){return this.children.length>0}walk(t,i=e.Walk.PreOrder){i===e.Walk.PreOrder&&t(this),this.children.forEach(e=>{e.walk(t,i)}),i===e.Walk.PostOrder&&t(this)}*[Symbol.iterator](){yield this;for(const e of this.children)yield*e}};kS.Walk={PreOrder:0,PostOrder:1};var PS=kS,NS=class extends Cc{constructor(e){super({moduleCtx:e,pickModes:[1,0]}),this.colorDomain=[0,0],this.maxDepth=0,this.colorScale=new we,this.animationState=new ba("empty",{empty:{update:{target:"ready",action:e=>this.animateEmptyUpdateReady(e)},reset:"empty",skip:"ready"},ready:{updateData:"waiting",clear:"clearing",highlight:e=>this.animateReadyHighlight(e),resize:e=>this.animateReadyResize(e),reset:"empty",skip:"ready"},waiting:{update:{target:"ready",action:e=>this.animateWaitingUpdateReady(e)},reset:"empty",skip:"ready"},clearing:{update:{target:"empty",action:e=>this.animateClearingUpdateEmpty(e)},reset:"empty",skip:"ready"}},()=>this.checkProcessedDataAnimatable())}resetAnimation(e){"initial"===e?this.animationState.transition("reset"):"ready"===e&&this.animationState.transition("skip")}processData(){const{NodeClass:e}=this,{childrenKey:t,sizeKey:i,colorKey:n,colorRange:s}=this.properties;let r=0,o=1/0,a=-1/0;const l=(s,l,h)=>{const d=null!=h.depth?h.depth+1:0,u=null!=t?s[t]:void 0,p=null==u||0===u.length;let g=null!=i?s[i]:void 0;g=Number.isFinite(g)?Math.max(g,0):p?1:0;const f=g;r=Math.max(r,d);const m=null!=n?s[n]:void 0;return"number"==typeof m&&(o=Math.min(o,m),a=Math.max(a,m)),c(new e(this,l,s,g,m,f,d,h,[]),u)},c=(e,t)=>{const{datumIndex:i}=e;return t?.forEach((t,n)=>{const s=l(t,i.concat(n),e);e.children.push(s),e.sumSize+=s.sumSize}),e},h=c(new e(this,[],void 0,0,void 0,0,void 0,void 0,[]),this.data),d=[o,a];this.colorScale.domain=o<a?[o,a]:[0,1],this.colorScale.range=s??["black"],this.colorScale.update(),this.rootNode=h,this.maxDepth=r,this.colorDomain=d}update({seriesRect:e}){this.updateSelections(),this.updateNodes();const t=this.getAnimationData();this.checkResize(e)&&this.animationState.transition("resize",t),this.animationState.transition("update",t)}resetAllAnimation(e){this.ctx.animationManager.stopByAnimationGroupId(this.id)}animateEmptyUpdateReady(e){this.ctx.animationManager.skipCurrentBatch(),this.resetAllAnimation(e)}animateWaitingUpdateReady(e){this.ctx.animationManager.skipCurrentBatch(),this.resetAllAnimation(e)}animateReadyHighlight(e){}animateReadyResize(e){this.resetAllAnimation(e)}animateClearingUpdateEmpty(e){this.ctx.animationManager.skipCurrentBatch(),this.resetAllAnimation(e)}getAnimationData(){return{}}isProcessedDataAnimatable(){return!0}checkProcessedDataAnimatable(){this.isProcessedDataAnimatable()||this.ctx.animationManager.skipCurrentBatch()}getSeriesDomain(){return[NaN,NaN]}getSeriesRange(e,t){return[NaN,NaN]}getLegendData(e){const{colorKey:t,colorName:i,colorRange:n}=this.properties,{id:s,ctx:{legendManager:r},visible:o}=this;return"gradient"===e&&null!=t&&null!=n?[{legendType:"gradient",enabled:o&&r.getItemEnabled({seriesId:s}),seriesId:s,colorName:i,colorRange:n,colorDomain:this.colorDomain}]:[]}getDatumIdFromData(e){return e.datumIndex.join(":")}getDatumId(e){return this.getDatumIdFromData(e)}removeMeIndexPathForIndex(e){return this.datumSelection.at(e+1)?.datum.datumIndex??[]}removeMeIndexForIndexPath(e){for(const{index:t,datum:i}of this.datumSelection)if((0,n.r1)(i.datumIndex,e))return t-1;return 0}pickFocus(e){if(!this.rootNode?.children.length)return;const t=(0,n.qE)(0,e.datumIndex-e.datumIndexDelta,this.datumSelection.length-1),{datumIndexDelta:i,otherIndexDelta:s}=e;let r=this.removeMeIndexPathForIndex(t);const o=r.reduce((e,t)=>e.children[t],this.rootNode);if(s>0&&o.hasChildren)r=[...r,0];else if(s<0&&r.length>1)r=r.slice(0,-1);else if(0===s&&0!==i){const e=o.parent.children.length-1;r=r.slice(),r[r.length-1]=(0,n.qE)(0,r[r.length-1]+i,e)}const a=r.reduce((e,t)=>e.children[t],this.rootNode),l=this.computeFocusBounds(this.datumSelection.at(t+1));return null!=l?{datum:a,datumIndex:this.removeMeIndexForIndexPath(r),otherIndex:a.depth,bounds:l,clipFocusBox:!0}:void 0}getDatumAriaText(e,t){if(e instanceof this.NodeClass)return this.ctx.localeManager.t("ariaAnnounceHierarchyDatum",{level:(e.depth??-1)+1,count:e.children.length,description:t});n.Vy.error(`datum is not HierarchyNode: ${JSON.stringify(e)}`)}getCategoryValue(e){}datumIndexForCategoryValue(e){}},OS=class extends Lp{constructor(){super(...arguments),this.childrenKey="children",this.fills=Object.values(Xm),this.fillGradientDefaults=new Tp,this.fillPatternDefaults=new Dp,this.fillImageDefaults=new Ip,this.strokes=Object.values(Zm)}};a([Te],OS.prototype,"childrenKey",2),a([Te],OS.prototype,"sizeKey",2),a([Te],OS.prototype,"colorKey",2),a([Te],OS.prototype,"colorName",2),a([Te],OS.prototype,"fills",2),a([Te],OS.prototype,"fillGradientDefaults",2),a([Te],OS.prototype,"fillPatternDefaults",2),a([Te],OS.prototype,"fillImageDefaults",2),a([Te],OS.prototype,"strokes",2),a([Te],OS.prototype,"colorRange",2);var _S=class{constructor(e,t,i,n){this.lon0=e,this.lat0=t,this.lon1=i,this.lat1=n}merge(e){this.lon0=Math.min(this.lon0,e.lon0),this.lat0=Math.min(this.lat0,e.lat0),this.lon1=Math.max(this.lon1,e.lon1),this.lat1=Math.max(this.lat1,e.lat1)}},FS=Math.PI/180,GS=e=>e*FS,VS=e=>-Math.log(Math.tan(.25*Math.PI+e*FS*.5)),BS=e=>e/FS,HS=e=>(Math.atan(Math.exp(-e))-.25*Math.PI)/(.5*FS),zS=class e extends ve{constructor(t,i){super(),this.domain=t,this.range=i,this.type="mercator",this.bounds=e.bounds(t)}static bounds(e){const[[t,i],[n,s]]=e,r=GS(t),o=VS(i),a=GS(n),l=VS(s);return new m(Math.min(r,a),Math.min(o,l),Math.abs(a-r),Math.abs(l-o))}static fixedScale(){return new e([[BS(0),HS(0)],[BS(1),HS(1)]],[[0,0],[1,1]])}toDomain(){}normalizeDomains(...e){let t=-1/0,i=1/0,n=-1/0,s=1/0;for(const r of e)for(const[e,o]of r)t=Math.min(e,t),i=Math.max(e,i),n=Math.min(o,n),s=Math.max(o,s);return{domain:[[t,n],[i,s]],animatable:!0}}convert([e,t]){const[[i,n],[s,r]]=this.range,o=(s-i)/this.bounds.width,a=(r-n)/this.bounds.height;return[(GS(e)-this.bounds.x)*o+i,(VS(t)-this.bounds.y)*a+n]}invert([e,t]){const[[i,n],[s,r]]=this.range,o=(s-i)/this.bounds.width,a=(r-n)/this.bounds.height;return[BS((e-i)/o+this.bounds.x),HS((t-n)/a+this.bounds.y)]}},US=class e{constructor(){this.id=(0,n.sX)(this),this.axisGroup=new It({name:`${this.id}-AxisTicks`,zIndex:2}),this.labelSelection=ua.select(this.axisGroup,Pi),this.interval=new vl,this.label=new yl,this.scale=new Bd,this.position="bottom",this.translationX=0,this.translationY=0,this.padding=0}attachAxis(e){e.appendChild(this.axisGroup)}calculateLayout(){const e=[],t=this.generateTicks(),{translationX:i,translationY:n}=this;return this.labelSelection.update(t.ticks.map(e=>this.createLabelDatum(e)),void 0,e=>e.tickId),this.labelSelection.each((t,i)=>{t.setProperties(i),i.visible&&e.push(t.getBBox())}),this.axisGroup.setProperties({translationX:i,translationY:n}),e.length>0?m.merge(e):void 0}getLabelParams(e){const{padding:t}=this,{translate:i}=e;switch(this.position){case"top":case"bottom":return{x:i,y:t,textAlign:"center",textBaseline:"top"};case"left":case"right":return{x:t,y:i,textAlign:"start",textBaseline:"middle"}}}inRange(e,t=.001){const[i,n]=or(this.scale.range);return e>=i-t&&e<=n+t}createLabelDatum(e){const{x:t,y:i,textBaseline:n,textAlign:s}=this.getLabelParams(e);return{visible:Boolean(e.tickLabel),tickId:e.tickId,fill:this.label.color,fontFamily:this.label.fontFamily,fontSize:this.label.fontSize,fontStyle:this.label.fontStyle,fontWeight:this.label.fontWeight,rotation:0,rotationCenterX:0,text:e.tickLabel,textAlign:s,textBaseline:n,x:t,y:i}}generateTicks(){const{minSpacing:t,maxSpacing:i}=this.interval,{maxTickCount:n,minTickCount:s,tickCount:r}=qa(ar(this.scale.range),1,t,i,e.DefaultTickCount,e.DefaultMinSpacing),o=this.getTicksData({nice:!0,interval:this.interval.step,tickCount:r,minTickCount:s,maxTickCount:n});if("bottom"===this.position||"top"===this.position){const e=Di.getMeasurer({font:this.label}),{domain:t}=this.scale,i=t[0]>t[1]?-1:1;let n=-1/0*i;o.ticks=o.ticks.filter(t=>Math.sign(t.translate-n)===i&&(n=t.translate+e.textWidth(t.tickLabel,!0)*i,!0))}return o}getTicksData(e){const t=[],i=e.nice?this.scale.niceDomain(e):this.scale.domain,s=this.scale.ticks(e,i)?.ticks??[],r=s.reduce((e,t)=>Math.max(e,(0,n.o3)(t)),0),o=[],a=Ul(),l="string"==typeof this.label.format?this.scale.tickFormatter({domain:i,ticks:s,fractionDigits:r,specifier:this.label.format}):e=>Gn(e,r);for(let e=0;e<s.length;e++){const n=s[e],c=this.scale.convert(n);if(!this.inRange(c))continue;const h=this.label.formatter?.({value:n,index:e,domain:i,fractionDigits:r,boundSeries:o})??l(n),d=a(h);t.push({tick:n,tickId:d,tickLabel:h,translate:c})}return{rawTicks:s,fractionDigits:r,ticks:t}}};US.DefaultTickCount=5,US.DefaultMinSpacing=10;var WS=US,jS={top:{xTranslationDirection:0,yTranslationDirection:-1},bottom:{xTranslationDirection:0,yTranslationDirection:1},left:{xTranslationDirection:-1,yTranslationDirection:0},right:{xTranslationDirection:1,yTranslationDirection:0},"top-left":{xTranslationDirection:1,yTranslationDirection:-1},"top-right":{xTranslationDirection:-1,yTranslationDirection:-1},"bottom-left":{xTranslationDirection:1,yTranslationDirection:1},"bottom-right":{xTranslationDirection:-1,yTranslationDirection:1},inside:{xTranslationDirection:0,yTranslationDirection:0},"inside-left":{xTranslationDirection:1,yTranslationDirection:0},"inside-right":{xTranslationDirection:-1,yTranslationDirection:0},"inside-top":{xTranslationDirection:0,yTranslationDirection:1},"inside-bottom":{xTranslationDirection:0,yTranslationDirection:-1},"inside-top-left":{xTranslationDirection:1,yTranslationDirection:1},"inside-bottom-left":{xTranslationDirection:1,yTranslationDirection:-1},"inside-top-right":{xTranslationDirection:-1,yTranslationDirection:1},"inside-bottom-right":{xTranslationDirection:-1,yTranslationDirection:-1}},KS={top:{xTranslationDirection:1,yTranslationDirection:0},bottom:{xTranslationDirection:-1,yTranslationDirection:0},left:{xTranslationDirection:0,yTranslationDirection:-1},right:{xTranslationDirection:0,yTranslationDirection:1},"top-left":{xTranslationDirection:-1,yTranslationDirection:-1},"top-right":{xTranslationDirection:-1,yTranslationDirection:1},"bottom-left":{xTranslationDirection:1,yTranslationDirection:-1},"bottom-right":{xTranslationDirection:1,yTranslationDirection:1},inside:{xTranslationDirection:0,yTranslationDirection:0},"inside-left":{xTranslationDirection:0,yTranslationDirection:1},"inside-right":{xTranslationDirection:0,yTranslationDirection:-1},"inside-top":{xTranslationDirection:-1,yTranslationDirection:0},"inside-bottom":{xTranslationDirection:1,yTranslationDirection:0},"inside-top-left":{xTranslationDirection:-1,yTranslationDirection:1},"inside-bottom-left":{xTranslationDirection:1,yTranslationDirection:1},"inside-top-right":{xTranslationDirection:-1,yTranslationDirection:-1},"inside-bottom-right":{xTranslationDirection:1,yTranslationDirection:-1}};function $S({yDirection:e,padding:t=0,position:i="top",bbox:n}){const s=e?jS:KS,{xTranslationDirection:r,yTranslationDirection:o}=s[i];return{xTranslation:r*(t+n.width/2),yTranslation:o*(t+n.height/2)}}function YS(e,t){const i=(0,n.n)("button",JS("ag-charts-input ag-charts-button",t));return void 0!==e.label?i.append(e.label):(i.append(QS(e.icon)),i.ariaLabel=e.altText),i.addEventListener("click",e.onPress),(0,n.Wp)(i,t),i}function qS(e,t){const i=(0,n.n)("input",JS("ag-charts-input ag-charts-checkbox",t));return i.type="checkbox",i.checked=e.checked,i.addEventListener("change",t=>e.onChange(i.checked,t)),i.addEventListener("keydown",e=>{vn(e)&&(e.preventDefault(),i.click())}),(0,n.Wp)(i,t),i}function XS(e,t){const i=(0,n.n)("select",JS("ag-charts-input ag-charts-select",t));return i.append(...e.options.map(e=>{const t=(0,n.n)("option");return t.value=e.value,t.textContent=e.label,t})),(0,n.Bq)(i,"data-preventdefault",!1),i.value=e.value,i.addEventListener("change",t=>e.onChange(i.value,t)),(0,n.Wp)(i,t),i}function ZS(e,t){const i=(0,n.n)("textarea",JS("ag-charts-input ag-charts-textarea",t));return i.value=e.value,i.addEventListener("input",t=>e.onChange(i.value,t)),(0,n.Wp)(i,t),(0,n.Bq)(i,"data-preventdefault",!1),i}function QS(e){const t=(0,n.n)("span",`ag-charts-icon ag-charts-icon-${e}`);return(0,n.Bq)(t,"aria-hidden",!0),t}function JS(e,t){return null==t?e:`${e} ${t.class}`}var ew=class extends bc{constructor(e=""){super(),this.x=0,this.y=0,this.commands=[],this._d="",this.d=e}get d(){return this._d}set d(e){if(e!==this._d){this._d=e,this.commands.length=0;for(const[t,i,n]of e.matchAll(/([A-Z])([0-9. ]*)/g)){const e=n.split(/\s+/g).map(Number);this.commands.push([i,e])}this.checkPathDirty()}}updatePath(){const{path:e,x:t,y:i}=this;e.clear();let n=t,s=i;for(const[r,o]of this.commands)switch(r){case"M":e.moveTo(t+o[0],i+o[1]),n=t+o[0];break;case"C":e.cubicCurveTo(t+o[0],i+o[1],t+o[2],i+o[3],t+o[4],i+o[5]),n=t+o[4],s=i+o[5];break;case"H":e.lineTo(t+o[0],s),n=i+o[0];break;case"L":e.lineTo(t+o[0],i+o[1]),n=t+o[0],s=i+o[1];break;case"V":e.lineTo(n,i+o[0]),s=i+o[0];break;case"Z":e.closePath();break;default:throw new Error(`Could not translate command '${r}' with '${o.join(" ")}'`)}e.closePath()}};a([$()],ew.prototype,"x",2),a([$()],ew.prototype,"y",2);var tw=class extends J{constructor(e){super(),this.sourceImage=e,this.x=0,this.y=0,this.width=0,this.height=0,this.opacity=1}render(e){const{ctx:t}=e,i=this.sourceImage;i&&(t.globalAlpha=this.opacity,t.drawImage(i,0,0,i.width,i.height,this.x,this.y,this.width,this.height)),super.render(e)}};a([$()],tw.prototype,"x",2),a([$()],tw.prototype,"y",2),a([$()],tw.prototype,"width",2),a([$()],tw.prototype,"height",2),a([$()],tw.prototype,"opacity",2);var iw={};o(iw,{ButtonWidget:()=>kn,MenuItemWidget:()=>nw,MenuWidget:()=>rw,NativeWidget:()=>_n,SliderWidget:()=>Un,ToolbarWidget:()=>jn,WIDGET_HTML_EVENTS:()=>di,Widget:()=>Ai,WidgetEventUtil:()=>fi});var nw=class extends Ln{constructor(){super((0,n.n)("div"),"menuitem")}},sw=["Escape","ArrowLeft"],rw=class e extends Nn{constructor(e="vertical"){super(e,"menu"),this.closeSubMenu=e=>this.openSubMenu(e,void 0)}destructor(){this.selfClose("2")}addSeparator(){const e=(0,n.YE)().createElement("div");return(0,n.Bq)(e,"role","separator"),this.elem.appendChild(e),e}onChildAdded(e){super.onChildAdded(e),e.hasPopup()||e.addListener("mouseenter",this.closeSubMenu)}onChildRemoved(e){super.onChildRemoved(e),e.hasPopup()||e.removeListener("mouseenter",this.closeSubMenu)}addSubMenu(){const t=new nw,i=(0,n.wW)(),s=new e(this.orientation),r=e=>{t.isDisabled()||this.openSubMenu(e,s)};return t.setAriaHasPopup("menu"),t.setAriaExpanded(!1),t.setAriaControls(i),t.addListener("click",r),t.addListener("mouseenter",r),t.addListener("keydown",e=>{ln(e.sourceEvent)&&"ArrowRight"===e.sourceEvent.code&&r(e)}),s.addListener("close-widget",()=>t.setAriaExpanded(!1)),s.addListener("open-widget",()=>t.setAriaExpanded(!0)),s.id=i,this.addChild(t),{subMenuButton:t,subMenu:s}}openSubMenu(e,t){const{openScope:i}=this;i&&(i.openSubMenu?.selfClose("4"),t?.open(e),i.openSubMenu=t)}open(e,t){const{overrideFocusVisible:i}=t??{};if(null!=this.openScope)return;this.openScope={lastFocus:yn(e.sourceEvent),openSubMenu:void 0,abort:()=>this.selfClose("1"),close:()=>this.selfClose("0"),removers:new Ki};const s=this.children.map(e=>e.getElement());(0,n.Bq)(this.openScope.lastFocus,"aria-expanded",!0),sn(this.openScope.removers,this.elem,this.openScope.abort),rn(this.openScope.removers,this.elem,this.openScope.abort);for(const e of this.children)nn(this.openScope.removers,e.getElement(),this.openScope.close,sw);void 0!==i&&an(this.openScope.removers,this.elem,s,i),this.internalListener?.dispatch("open-widget",this,{type:"open-widget"}),this.children[0]?.focus({preventScroll:!0})}selfClose(e){if(void 0===this.openScope)return;const{lastFocus:t,removers:i,openSubMenu:s}=this.openScope;this.openScope=void 0,s?.selfClose("3"),(0,n.Bq)(t,"aria-expanded",!1),"0"===e&&t?.focus({preventScroll:!0}),i.destroy(),this.internalListener?.dispatch("close-widget",this,{type:"close-widget"})}close(){this.selfClose("0")}},ow="canvas-overlay",aw=class extends l{constructor(e,t,i){super(),this.ctx=e,this.hideFns=[],this.moduleId=`popover-${t}`,this.element=i?.detached?(0,n.n)("div"):e.domManager.addChild(ow,this.moduleId),this.element.setAttribute("role","presentation"),this.destroyFns.push(()=>e.domManager.removeChild(ow,this.moduleId))}attachTo(e){this.element.parentElement||e.element.append(this.element)}hide(e){const{lastFocus:t=this.lastFocus}=e??{};0!==this.element.children.length&&(this.hideFns.forEach(e=>e()),t?.focus(),this.lastFocus=void 0)}removeChildren(){this.element.replaceChildren()}showWithChildren(e,t){if(!this.element.parentElement)throw new Error("Can not show popover that has not been attached to a parent.");const i=(0,n.n)("div","ag-charts-popover");if(null!=t.ariaLabel&&i.setAttribute("aria-label",t.ariaLabel),null!=t.class&&i.classList.add(t.class),i.replaceChildren(...e),this.element.replaceChildren(i),this.hideFns.push(()=>this.removeChildren()),t.onHide&&this.hideFns.push(t.onHide),t.initialFocus&&t.sourceEvent){const e=yn(t.sourceEvent);void 0!==e&&(this.lastFocus=e,this.initialFocus=t.initialFocus)}return i}getPopoverElement(){return this.element.firstElementChild}updatePosition(e){const t=this.getPopoverElement();t&&(t.style.setProperty("right","unset"),t.style.setProperty("bottom","unset"),null!=e.x&&t.style.setProperty("left",`${Math.floor(e.x)}px`),null!=e.y&&t.style.setProperty("top",`${Math.floor(e.y)}px`),this.initialFocus?.focus(),this.initialFocus=void 0)}},lw=class extends aw{setAnchor(e,t){this.anchor=e,this.fallbackAnchor=t,this.updatePosition(e),this.repositionWithinBounds()}showWithChildren(e,t){const i=t.anchor??this.anchor,s=t.fallbackAnchor??this.fallbackAnchor,r=super.showWithChildren(e,t);return i&&this.setAnchor(i,s),(0,n.zk)().requestAnimationFrame(()=>{this.repositionWithinBounds()}),r}repositionWithinBounds(){const{anchor:e,ctx:t,fallbackAnchor:i}=this,s=this.getPopoverElement();if(!e||!s)return;const r=t.domManager.getBoundingClientRect(),{offsetWidth:o,offsetHeight:a}=s;let l=(0,n.qE)(0,e.x,r.width-o),c=(0,n.qE)(0,e.y,r.height-a);l!==e.x&&null!=i?.x&&(l=(0,n.qE)(0,i.x-o,r.width-o)),c!==e.y&&null!=i?.y&&(c=(0,n.qE)(0,i.y-a,r.height-a)),this.updatePosition({x:l,y:c})}},cw=class extends lw{show(e){const t=e.items.map(t=>this.createRow(e,t)),i=this.showWithChildren(t,e);i.classList.add("ag-charts-menu"),i.setAttribute("role","menu"),this.menuCloser=fn({orientation:"vertical",menu:i,buttons:t,sourceEvent:e.sourceEvent,closeCallback:()=>this.hide()}),this.hideFns.push(()=>{this.menuCloser?.finishClosing(),this.menuCloser=void 0})}createRow(e,t){const{menuItemRole:i="menuitem"}=e,s=t.value===e.value,r=(0,n.n)("div","ag-charts-menu__row");if(r.setAttribute("role",i),"menuitemradio"===i&&r.setAttribute("aria-checked",(e.value===t.value).toString()),"string"==typeof t.value&&(r.dataset.popoverId=t.value),r.classList.toggle("ag-charts-menu__row--active",s),null!=t.icon){const e=(0,n.n)("span",`ag-charts-menu__icon ${Ot(t.icon)}`);r.appendChild(e)}const o=null!=t.strokeWidth;if(o&&(r.classList.toggle("ag-charts-menu__row--stroke-width-visible",o),r.style.setProperty("--strokeWidth",o?`${t.strokeWidth}px`:null)),null!=t.label){const e=(0,n.n)("span","ag-charts-menu__label");e.textContent=this.ctx.localeManager.t(t.label),r.appendChild(e)}"altText"in t&&(r.ariaLabel=this.ctx.localeManager.t(t.altText));const a=i=>{vn(i)&&(e.onPress?.(t),i.preventDefault(),i.stopPropagation())};return r.addEventListener("keydown",a),r.addEventListener("click",a),r.addEventListener("mousemove",()=>{r.focus({preventScroll:!0})}),r}},hw=class extends aw{constructor(){super(...arguments),this.dragged=!1}setDragHandle(e){e.addListener("drag-start",t=>{e.addClass(this.dragHandleDraggingClass),this.onDragStart(t)}),e.addListener("drag-move",this.onDragMove.bind(this)),e.addListener("drag-end",()=>{e.removeClass(this.dragHandleDraggingClass),this.onDragEnd.bind(this)})}onDragStart(e){const t=this.getPopoverElement();t&&(e.sourceEvent.preventDefault(),this.dragged=!0,this.dragStartState={client:IS.from(e.clientX,e.clientY),position:IS.from(Number(t.style.getPropertyValue("left").replace("px","")),Number(t.style.getPropertyValue("top").replace("px","")))})}onDragMove(e){const{dragStartState:t}=this,i=this.getPopoverElement();if(!t||!i)return;const n=IS.sub(IS.from(e.clientX,e.clientY),t.client),s=IS.add(t.position,n),r=this.ctx.domManager.getBoundingClientRect(),o={};s.x>=0&&s.x+i.offsetWidth<=r.width&&(o.x=s.x),s.y>=0&&s.y+i.offsetHeight<=r.height&&(o.y=s.y),this.updatePosition(o)}onDragEnd(){this.dragStartState=void 0}},dw=class extends De{};a([Te],dw.prototype,"icon",2),a([Te],dw.prototype,"label",2),a([Te],dw.prototype,"ariaLabel",2),a([Te],dw.prototype,"tooltip",2);var uw=class extends kn{constructor(e){super(),this.localeManager=e}update(e){const{localeManager:t}=this;e.tooltip&&(this.elem.title=t.t(e.tooltip));let i="";null!=e.icon&&(i=`<span class="${Ot(e.icon)} ag-charts-toolbar__icon"></span>`),null!=e.label&&(i=`${i}<span class="ag-charts-toolbar__label">${t.t(e.label)}</span>`),this.elem.innerHTML=i}setChecked(e){(0,n.Bq)(this.elem,"aria-checked",e)}},pw="ag-charts-toolbar__button--active",gw=class extends jn{constructor(e,t="horizontal"){super(t),this.localeManager=e,this.horizontalSpacing=10,this.verticalSpacing=10,this.events=new Qi,this.hasPrefix=!1,this.buttonWidgets=[],this.addClass("ag-charts-toolbar"),this.toggleClass("ag-charts-toolbar--horizontal","horizontal"===t),this.toggleClass("ag-charts-toolbar--vertical","vertical"===t)}addToolbarListener(e,t){return this.events.addListener(e,t)}clearButtons(){for(const e of this.buttonWidgets)e.destroy();this.buttonWidgets.splice(0)}updateButtons(e){const{buttonWidgets:t}=this;for(const[t,i]of e.entries())(this.buttonWidgets.at(t)??this.createButton(t,i)).update(i);for(let i=e.length;i<t.length;i++){const e=this.buttonWidgets.at(i);e?.destroy()}this.buttonWidgets.splice(e.length),this.refreshButtonClasses()}updateButtonByIndex(e,t){this.buttonWidgets.at(e)?.update(t)}clearActiveButton(){for(const e of this.buttonWidgets)e.toggleClass(pw,!1)}toggleActiveButtonByIndex(e){if(-1!==e)for(const[t,i]of this.buttonWidgets.entries())i.toggleClass(pw,null!=e&&e===t)}toggleButtonEnabledByIndex(e,t){-1!==e&&this.buttonWidgets.at(e)?.setEnabled(t)}toggleSwitchCheckedByIndex(e,t){-1!==e&&this.buttonWidgets.at(e)?.setChecked(t)}getButtonBounds(){return this.buttonWidgets.map(e=>this.getButtonWidgetBounds(e))}setButtonHiddenByIndex(e,t){this.buttonWidgets.at(e)?.setHidden(t)}getButtonWidgetBounds(e){const t=this.getBounds(),i=e.getBounds();return new m(i.x+t.x,i.y+t.y,i.width,i.height)}refreshButtonClasses(){const{buttonWidgets:e,hasPrefix:t}=this;let i,n,s;for(const[r,o]of e.entries())i=!t&&0===r||s!=o.section,n=r===e.length-1||o.section!=e.at(r+1)?.section,o.toggleClass("ag-charts-toolbar__button--first",i),o.toggleClass("ag-charts-toolbar__button--last",n),o.toggleClass("ag-charts-toolbar__button--gap",r>0&&i),s=o.section}createButton(e,t){const i=this.createButtonWidget();return i.addClass("ag-charts-toolbar__button"),i.addListener("click",n=>{const s={index:e,...t instanceof De?t.toJson():t},r=this.getButtonWidgetBounds(i);this.events.dispatch("button-pressed",{event:n,button:s,buttonBounds:r})}),i.addListener("focus",()=>{this.events.dispatch("button-focused",{button:{index:e}})}),t.section&&(i.section=t.section),this.buttonWidgets.push(i),this.addChild(i),i}},fw=class extends gw{createButtonWidget(){return new uw(this.localeManager)}},mw=class extends hw{constructor(e,t,i){super(e,t),this.onPopoverMoved=i,this.dragHandleDraggingClass="ag-charts-floating-toolbar__drag-handle--dragging"}show(e,t={}){this.showWithChildren(e,{...t,class:"ag-charts-floating-toolbar"})}hide(){this.dragged=!1,super.hide()}getBounds(){const e=this.getPopoverElement();return new m(e?.offsetLeft??0,e?.offsetTop??0,e?.offsetWidth??0,e?.offsetHeight??0)}hasBeenDragged(){return this.dragged}setAnchor(e,t,i){const n=this.getPopoverElement();if(!n)return;const s=e.position??"above",{offsetWidth:r,offsetHeight:o}=n;let a=e.y-o-i,l=e.x-r/2;"below"===s?a=e.y+i:"right"===s?(a=e.y-o/2,l=e.x+t):"above-left"===s&&(l=e.x),this.updatePosition({x:l,y:a})}ignorePointerEvents(){const e=this.getPopoverElement();e&&(e.style.pointerEvents="none")}capturePointerEvents(){const e=this.getPopoverElement();e&&(e.style.pointerEvents="unset")}updatePosition(e){const t=this.getBounds(),i=this.ctx.domManager.getBoundingClientRect();e.x=Math.floor((0,n.qE)(0,e.x,i.width-t.width)),e.y=Math.floor((0,n.qE)(0,e.y,i.height-t.height)),super.updatePosition(e),this.onPopoverMoved()}},vw=class extends gw{constructor(e,t){super(e.localeManager),this.hasPrefix=!0,this.popover=new mw(e,t,this.onPopoverMoved.bind(this)),this.dragHandle=new yw(e.localeManager.t("toolbarAnnotationsDragHandle")),this.popover.setDragHandle(this.dragHandle)}show(e={}){this.popover.show([this.dragHandle.getElement(),this.getElement()],e)}hide(){this.popover.hide()}setAnchor(e){this.popover.setAnchor(e,this.horizontalSpacing,this.verticalSpacing)}hasBeenDragged(){return this.popover.hasBeenDragged()}ignorePointerEvents(){this.popover.ignorePointerEvents()}capturePointerEvents(){this.popover.capturePointerEvents()}onPopoverMoved(){const e=this.popover.getBounds();if(this.popoverBounds?.equals(e))return;this.popoverBounds=e.clone();const t=this.getButtonBounds();this.events.dispatch("toolbar-moved",{popoverBounds:e,buttonBounds:t})}getButtonWidgetBounds(e){const t=this.popover.getBounds(),i=super.getButtonWidgetBounds(e),n=this.dragHandle.getBounds();return new m(i.x+t.x-n.width,i.y+t.y,i.width,i.height)}},yw=class extends _n{constructor(e){super((0,n.n)("div","ag-charts-floating-toolbar__drag-handle"));const t=new _n((0,n.n)("span",`${Ot("drag-handle")} ag-charts-toolbar__icon`));t.setAriaHidden(!0),this.addChild(t),this.elem.title=e}},Cw={...ra,...ha};mS.create.bind(mS),mS.__createSparkline.bind(mS)},26203(e,t,i){"use strict";i.d(t,{$1:()=>Dt,$P:()=>B,$r:()=>mt,$z:()=>yt,AF:()=>rt,Am:()=>vt,Bf:()=>Y,Bk:()=>fe,Bm:()=>Z,Bq:()=>Pt,By:()=>ue,CG:()=>He,D$:()=>Ot,E2:()=>Te,E3:()=>Ht,EG:()=>St,EM:()=>_t,Et:()=>$,F4:()=>Bt,FJ:()=>_,Fq:()=>Kt,Fu:()=>dt,GB:()=>$t,GT:()=>Yt,GY:()=>at,Gv:()=>W,Hs:()=>Ft,I5:()=>Gt,I_:()=>Je,Ik:()=>ke,Is:()=>F,J$:()=>Ye,Jp:()=>ht,KC:()=>We,Kg:()=>K,LV:()=>ft,Ly:()=>Ve,MM:()=>Ue,MP:()=>st,MX:()=>Be,O9:()=>Oe,OR:()=>ui,Qd:()=>j,R3:()=>qe,Rp:()=>Tt,S3:()=>Vt,Sc:()=>Ne,Tn:()=>U,Uo:()=>we,Vy:()=>r,W$:()=>ve,Wp:()=>Nt,XK:()=>bt,Xe:()=>ze,Xl:()=>X,YE:()=>L,YI:()=>Xe,YO:()=>Me,YX:()=>Wt,Yj:()=>Pe,Zd:()=>lt,_9:()=>P,_L:()=>Ce,ai:()=>Le,bX:()=>Q,bk:()=>I,cI:()=>jt,cy:()=>V,d1:()=>N,dY:()=>je,eW:()=>ii,eh:()=>Ze,fN:()=>Ge,fd:()=>be,gd:()=>z,hR:()=>Ke,hz:()=>tt,iN:()=>Et,ie:()=>he,is:()=>Se,jO:()=>It,jj:()=>gt,jk:()=>$e,lk:()=>ai,lp:()=>ie,lt:()=>se,mL:()=>ut,mw:()=>ye,n:()=>O,nF:()=>ee,nR:()=>v,nl:()=>At,nm:()=>wt,o3:()=>qt,or:()=>xe,p6:()=>Ie,qE:()=>zt,r1:()=>Ct,r4:()=>Ut,sA:()=>di,sX:()=>ri,sg:()=>J,sw:()=>Re,sy:()=>m,t$:()=>hi,tf:()=>me,uE:()=>q,v7:()=>Mt,vM:()=>G,vd:()=>H,wW:()=>oi,wi:()=>ot,xA:()=>xt,yI:()=>ge,yW:()=>De,zM:()=>Ae,zk:()=>k});var n=Object.defineProperty,s=(e,t)=>{for(var i in t)n(e,i,{get:t[i],enumerable:!0})},r={};s(r,{error:()=>c,errorOnce:()=>p,log:()=>a,logGroup:()=>f,reset:()=>g,table:()=>h,warn:()=>l,warnOnce:()=>u});var o=new Set;function a(...e){console.log(...e)}function l(e,...t){console.warn(`AG Charts - ${e}`,...t)}function c(e,...t){"object"==typeof e?console.error("AG Charts error",e,...t):console.error(`AG Charts - ${e}`,...t)}function h(...e){console.table(...e)}function d(e,t,i){let n;n=e instanceof Error?e.message:"string"==typeof e?e:"object"==typeof e?JSON.stringify(e):String(e);const s=`${t}: ${n}`;o.has(s)||(i(e),o.add(s))}function u(e,...t){d(e,"Logger.warn",e=>l(e,...t))}function p(e,...t){d(e,"Logger.error",e=>c(e,...t))}function g(){o.clear()}function f(e,t){console.groupCollapsed(e);try{return t()}finally{console.groupEnd()}}var m={};s(m,{detectChartDefinition:()=>E,getAxisModule:()=>M,getPresetModule:()=>A,getSeriesModule:()=>T,hasModule:()=>w,listModulesByType:()=>x,register:()=>C,registerMany:()=>b,reset:()=>S});var v=(e=>(e.Axis="axis",e.Chart="chart",e.Preset="preset",e.Plugin="plugin",e.Series="series",e))(v||{}),y=new Map;function C(e){const t=y.get(e.name);if(t&&(t.enterprise||!e.enterprise))throw new Error(`AG Charts - Module '${e.name}' already registered`);y.set(e.name,e)}function b(e){for(const t of e)C(t)}function S(){y.clear()}function w(e){return y.has(e)}function*x(e){for(const t of y.values())D(e,t)&&(yield t)}function E(e){for(const t of y.values())if(D("chart",t)&&t.detect(e))return t;throw new Error("AG Charts - Unknown chart type; Check options are correctly structured and series types are specified")}function M(e){const t=y.get(e);if(D("axis",t))return t}function A(e){const t=y.get(e);if(D("preset",t))return t}function T(e){const t=y.get(e);if(D("series",t))return t}function D(e,t){return t?.type===e}var I=class{constructor(){this.events=new Map}on(e,t){return this.events.has(e)||this.events.set(e,new Set),this.events.get(e)?.add(t),()=>this.off(e,t)}off(e,t){const i=this.events.get(e);i&&(i.delete(t),0===i.size&&this.events.delete(e))}emit(e,t){this.events.get(e)?.forEach(e=>e(t))}clear(e){e?this.events.delete(e):this.events.clear()}},R={};function L(e){return e?R.document?.[e]:R.document}function k(e){return e?R.window?.[e]:R.window}function P(e){R.document=e}function N(e){R.window=e}function O(e,t,i){const n=L().createElement(e);if("object"==typeof t&&(i=t,t=void 0),t)for(const e of t.split(" "))n.classList.add(e);return i&&Object.assign(n.style,i),n}function _(e){return L().createElementNS("http://www.w3.org/2000/svg",e)}function F(e,t){const i=L("body"),n=O("a",{display:"none"});n.href=e,n.download=t,i.appendChild(n),n.click(),setTimeout(()=>i.removeChild(n))}function G(e){return null!=e}function V(e){return Array.isArray(e)}function B(e){return e instanceof Date}function H(e){return B(e)&&!isNaN(Number(e))}function z(e){return e instanceof RegExp}function U(e){return"function"==typeof e}function W(e){return"object"==typeof e&&null!==e&&!V(e)}function j(e){return"object"==typeof e&&null!==e&&"Object"===e.constructor?.name}function K(e){return"string"==typeof e}function $(e){return"number"==typeof e}function Y(e){return Number.isFinite(e)}function q(e){return"undefined"!=typeof window&&e instanceof HTMLElement}function X(e,t){return Object.values(e).includes(t)}function Z(e){return"symbol"==typeof e}function Q(e,t){return e in t}function J(e,t=0,i){const{leading:n=!1,trailing:s=!0,maxWait:r=1/0}=i??{};let o,a;if(r<t)throw new Error("Value of maxWait cannot be lower than waitMs.");return Object.assign(function(...i){if(n&&!a)return a=Date.now(),o=setTimeout(()=>a=null,t),void e(...i);let l=t;if(r!==1/0&&a){const e=Date.now()-a;t>r-e&&(l=r-e)}clearTimeout(o),a??(a=Date.now()),o=setTimeout(()=>{a=null,s&&e(...i)},l)},{cancel(){clearTimeout(o),a=null}})}function ee(e,t,i){const{leading:n=!0,trailing:s=!0}=i??{};let r,o,a=!1;function l(){s&&o?(r=setTimeout(l,t),e(...o)):a=!1,o=null}return Object.assign(function(...i){a?o=i:(a=!0,r=setTimeout(l,t),n?e(...i):o=i)},{cancel(){clearTimeout(r),a=!1,o=null}})}function te(e,t,i=""){try{return e(...t)}catch(e){u("Uncaught exception in user callback"+(i?` \`${i}\``:""),e)}}function ie(e,t="and",i=String,n=1/0){if(0===e.length)return"";if(1===e.length)return i(e[0]);const s=(e=e.map(i)).pop();if(e.length>=n){const i=e.length-(n-1);return`${e.slice(0,n-1).join(", ")}, and ${i} more ${t} ${s}`}return`${e.join(", ")} ${t} ${s}`}function ne(e,t=1/0){if("number"==typeof e){if(isNaN(e))return"NaN";if(e===1/0)return"Infinity";if(e===-1/0)return"-Infinity"}const i=JSON.stringify(e)??typeof e;return i.length>t?`${i.slice(0,t)}... (+${i.length-t} characters)`:i}function se(e){let t=1;for(let i=0;i<e.length;i++)10===e.charCodeAt(i)&&t++;return t}function re(e,t){if(e===t)return 0;const[i,n]=e.length<t.length?[e,t]:[t,e],s=i.length,r=n.length;let o=new Array(s+1).fill(0).map((e,t)=>t),a=new Array(s+1);for(let e=1;e<=r;e++){a[0]=e;for(let t=1;t<=s;t++){const s=n[e-1]===i[t-1]?0:1;a[t]=Math.min(o[t]+1,a[t-1]+1,o[t-1]+s)}[o,a]=[a,o]}return o[s]}"undefined"!=typeof window?R.window=window:void 0!==i.g&&(R.window=i.g.window),"undefined"!=typeof document?R.document=document:void 0!==i.g&&(R.document=i.g.document);var oe=Symbol("description"),ae=Symbol("required"),le=Symbol("marked"),ce=Symbol("undocumented"),he=Symbol("union"),de=[["placement","position"],["padding","spacing","gap"],["color","fill","stroke"],["whisker","wick"],["nodeClick","seriesNodeClick"],["nodeDoubleClick","seriesNodeDoubleClick"],["src","url"]].reduce((e,t)=>{for(const i of t)e.set(i.toLowerCase(),new Set(t.filter(e=>e!==i)));return e},new Map),ue=(e=>(e.Invalid="invalid",e.Required="required",e.Unknown="unknown",e))(ue||{});function pe(e,t){return Y(t)?`${e}[${t}]`:e?`${e}.${t}`:t}var ge=class{constructor(e,t,i,n,s){this.type=e,this.description=t,this.value=i,this.path=n,this.key=s}setUnionType(e,t){if(this.path.startsWith(t)){const i=this.path.slice(t.length);this.altPath=`${t}[type=${e}]${i}`}}getPrefix(){const{altPath:e=this.path,key:t}=this;return e||t?`Option \`${t?pe(e,t):e}\``:"Value"}toString(){const{description:e="unknown",type:t,value:i}=this;return"required"===t&&null==i?`${this.getPrefix()} is required and has not been provided; expecting ${e}, ignoring.`:`${this.getPrefix()} cannot be set to \`${ne(i,50)}\`; expecting ${e}, ignoring.`}},fe=class extends ge{constructor(e,t,i,n){super("unknown",void 0,t,i,n),this.suggestions=e,this.key=n}getPrefix(){return`Unknown option \`${pe(this.path,this.key)}\``}getPostfix(){const e=ie(function(e,t,i=2){const n=[],s=e.toLowerCase(),r=de.get(s);for(const e of t){const t=e.toLowerCase();(r?.has(e)||t.includes(s)||re(s,t)<=i)&&n.push(e)}return n}(this.key,this.suggestions),"or",e=>`\`${e}\``);return e?`; Did you mean ${e}? Ignoring.`:", ignoring."}toString(){return`${this.getPrefix()}${this.getPostfix()}`}};function me(e,t,i=""){if(!W(e))return{cleared:null,invalid:[new ge("required","an object",e,i)]};const n={},s=[],r=new Set(Object.keys(e)),o=[];if(he in t){const r=Object.keys(t),o=t[he];if(null!=e.type&&r.includes(e.type)||null==e.type&&null!=o){const{type:r=o,...a}=e,l=me(a,t[r],i);Object.assign(n,{type:r},l.cleared);for(const e of l.invalid)e.setUnionType(r,i);s.push(...l.invalid)}else{const t=ie(r,"or",e=>`'${e}'`);s.push(new ge("required",`a keyword such as ${t}`,e.type,i,"type"))}return{cleared:n,invalid:s}}for(const a of Object.keys(t)){const l=t[a],c=l[ae],h=e[a];if(r.delete(a),void 0===h&&(l[ce]||o.push(a),!c))continue;const d=pe(i,a);if(U(l)){const t=l(h,{options:e,path:d});if("object"==typeof t){if(s.push(...t.invalid),t.valid){n[a]=t.cleared;continue}if(Ze(t.invalid,d))continue}else if(t){n[a]=h;continue}s.push(new ge(c?"required":"invalid",l[oe],h,i,a))}else{const e=me(h,l,d);null!=e.cleared&&(n[a]=e.cleared),s.push(...e.invalid)}}for(const t of r){const n=e[t];void 0!==n&&s.push(new fe(o,n,i,t))}return{cleared:n,invalid:s}}function ve(e,t){return Object.assign(U(e)?(t,i)=>e(t,i):{...e},{[oe]:t})}function ye(e){return Object.assign(U(e)?(t,i)=>e(t,i):be(e),{[ae]:!0,[oe]:e[oe]})}function Ce(e){return Object.assign(U(e)?(t,i)=>e(t,i):be(e),{[ce]:!0,[oe]:e[oe]})}var be=(e,t="an object")=>ve((t,i)=>{const n=me(t,e,i.path);return{valid:!Ze(n.invalid,i.path),cleared:n.cleared,invalid:n.invalid}},t),Se=(e,t,i)=>({...e,[oe]:t,[he]:i}),we=(...e)=>ve((t,i)=>{const n=[];for(const s of e){const e=s(t,i);if("object"==typeof e){if(n.push(...e.invalid),!e.valid)return{valid:!1,cleared:t,invalid:n};t=e.cleared}else if(!e)return!1}return{valid:!0,cleared:t,invalid:n}},e.map(e=>e[oe]).filter(Boolean).join(" and ")),xe=(...e)=>ve((t,i)=>{for(const n of e){const e=n(t,i);if("object"==typeof e?e.valid:e)return e}return!1},e.map(e=>e[oe]).filter(Boolean).join(" or ")),Ee=e=>Y(e)||H(e),Me=ve(V,"an array"),Ae=ve(function(e){return"boolean"==typeof e},"a boolean"),Te=ve(U,"a function"),De=ve(function(e){return K(e)&&("none"===e||null!=function(e){const t=k("Option"),{style:i}=new t;return i.color=e,i.color||null}(e))},"a color string"),Ie=ve(e=>B(e)||(Y(e)||K(e))&&H(new Date(e)),"a date"),Re=ve(G,"a defined value"),Le=ve(Y,"a number"),ke=ve(W,"an object"),Pe=ve(K,"a string"),Ne=ve(e=>"undefined"==typeof HTMLElement||e instanceof HTMLElement,"an html element"),Oe=(e,t=1/0)=>{let i;return i=t===1/0?`an array of at least ${e} items`:e===t?`an array of exactly ${e} items`:0===e?`an array of no more than ${t} items`:`an array of at least ${e} and no more than ${t} items`,ve(i=>V(i)&&i.length>=e&&i.length<=t,i)},_e=(e,t=1/0)=>{let i;return i=t===1/0?`a string of at least ${e} characters`:e===t?`an string of exactly ${e} characters`:0===e?`an string of no more than ${t} characters`:`an string of at least ${e} and no more than ${t} characters`,ve(i=>K(i)&&i.length>=e&&i.length<=t,i)},Fe=(e,t=!0)=>ve(i=>Y(i)&&(i>e||t&&i===e),`a number greater than ${t?"or equal to ":""}${e}`),Ge=(e,t)=>ve(i=>Y(i)&&i>=e&&i<=t,`a number between ${e} and ${t} inclusive`),Ve=Fe(0),Be=Fe(0,!1),He=Ge(0,1),ze=e=>ve((t,{options:i})=>!Ee(t)||!Ee(i[e])||t<i[e],`the value to be less than \`${e}\``),Ue=e=>ve((t,{options:i})=>!Ee(t)||!Ee(i[e])||t>i[e],`the value to be greater than \`${e}\``);function We(...e){return W(e[0])&&(e=Object.values(e[0])),ve(t=>e.includes(t),`a keyword such as ${ie(e,"or",e=>`'${e}'`)}`)}var je=e=>ve(t=>e===t,`the value ${JSON.stringify(e)}`),Ke=(e,t)=>ve(t=>t instanceof e,t??`an instance of ${e.name}`),$e=(e,t,i=!0)=>ve((t,n)=>{if(!V(t))return!1;let s=i;const r=[],o=[],a=e=>s=i?s&&e:s||e;if(0===t.length)return{valid:!0,cleared:r,invalid:o};for(let i=0;i<t.length;i++){const l=t[i],c=e(l,{options:l,path:`${n.path}[${i}]`});"object"==typeof c?(s=a(c.valid),o.push(...c.invalid),null!=c.cleared&&r.push(c.cleared)):(s=a(c),c&&r.push(l))}return{valid:s,cleared:s||!i?r:null,invalid:o}},t??`${e[oe]} array`),Ye=(e,t="an object array")=>ve((t,i)=>{if(!V(t))return!1;const n=[],s=[];for(let r=0;r<t.length;r++){const o=`${i.path}[${r}]`,a=me(t[r],e,o);Ze(a.invalid,o)||n.push(a.cleared),s.push(...a.invalid)}return{valid:!0,cleared:n,invalid:s}},t),qe=(e,t)=>ve((i,n)=>!!U(i)&&(le in i||{valid:!0,cleared:Object.assign((...s)=>{const r=te(i,s);if(null==r)return;const o=e(r,{options:r,path:""});if("object"==typeof o){if(o.invalid.forEach(Qe(n,t??e[oe])),o.valid)return o.cleared}else{if(o)return r;u(`Callback \`${n.path}\` returned an invalid value \`${ne(r,50)}\`; expecting ${t??e[oe]}, ignoring.`)}},{[le]:!0}),invalid:[]}),"a function"),Xe=(e,t="an object")=>ve((i,n)=>!!U(i)&&(le in i||{valid:!0,cleared:Object.assign((...s)=>{const r=te(i,s,n.path);if(null==r)return;const o=me(r,e);return o.invalid.forEach(Qe(n,t)),o.cleared},{[le]:!0}),invalid:[]}),"a function");function Ze(e,t){return e.some(e=>"required"===e.type&&e.path===t)}function Qe(e,t){return i=>{if(i instanceof fe)return u(`Callback \`${e.path}\` returned an unknown property \`${pe(i.path,i.key)}\`${i.getPostfix()}`);const n=ne(i.value,50);u(i.key?`Callback \`${e.path}\` returned an invalid property \`${pe(i.path,i.key)}\`: \`${n}\`; expecting ${i.description}, ignoring.`:`Callback \`${e.path}\` returned an invalid value \`${n}\`; expecting ${t??i.description}, ignoring.`)}}var Je=e=>{if(!W(e))return!1;const t=Object.keys(e);return 1===t.length&&t[0].startsWith("$")},et=be({color:De,stop:He},""),tt=ve(e=>{let t=-1/0;for(const i of e)if(null!=i?.stop){if(i.stop<t)return!1;t=i.stop}return!0},"color stops to be defined in ascending order"),it=we(Oe(2),$e(et),tt),nt=We("axis","item","series"),st=be({type:ye(je("gradient")),colorStops:ye(it),rotation:Le,gradient:Ce(We("linear","radial","conic")),bounds:Ce(nt),reverse:Ce(Ae)},"a gradient object with color stops"),rt={stroke:De,strokeWidth:Ve,strokeOpacity:He},ot=be({type:ye(je("gradient")),gradient:ye(We("linear","radial","conic")),bounds:ye(nt),colorStops:ye(xe(it,we(Oe(2),$e(De)))),rotation:ye(Le),reverse:ye(Ae)}),at=be({type:ye(je("pattern")),pattern:ye(We("vertical-lines","horizontal-lines","forward-slanted-lines","backward-slanted-lines","circles","squares","triangles","diamonds","stars","hearts","crosses")),path:_e(2),width:ye(Ve),height:ye(Ve),fill:ye(De),fillOpacity:ye(He),backgroundFill:ye(De),backgroundFillOpacity:ye(He),padding:ye(Ve),rotation:ye(Le),scale:ye(Ve),stroke:ye(De),strokeWidth:ye(Ve),strokeOpacity:ye(He)}),lt=be({type:ye(je("image")),url:Pe,width:Ve,height:Ve,rotation:ye(Le),backgroundFill:ye(De),backgroundFillOpacity:He,fit:ye(We("stretch","contain","cover")),repeat:ye(We("repeat","repeat-x","repeat-y","no-repeat"))}),ct=Se({gradient:{colorStops:it,rotation:Le,gradient:Ce(We("linear","radial","conic")),bounds:Ce(nt),reverse:Ce(Ae)},pattern:{pattern:We("vertical-lines","horizontal-lines","forward-slanted-lines","backward-slanted-lines","circles","squares","triangles","diamonds","stars","hearts","crosses"),path:_e(2),width:Ve,height:Ve,rotation:Le,scale:Ve,fill:De,fillOpacity:He,backgroundFill:De,backgroundFillOpacity:He,...rt,padding:Ce(Ve)},image:{url:ye(Pe),backgroundFill:De,backgroundFillOpacity:He,width:Ve,height:Ve,fit:We("stretch","contain","cover","none"),repeat:We("repeat","repeat-x","repeat-y","no-repeat"),rotation:Le}},"a color object"),ht=xe(De,be(ct,"a color object")),dt={fill:ht,fillOpacity:He};dt.fillGradientDefaults=Ce(ot),dt.fillPatternDefaults=Ce(at),dt.fillImageDefaults=Ce(lt);var ut={lineDash:$e(Ve),lineDashOffset:Le},pt=be({googleFont:Pe},"google font"),gt=xe(Pe,Je,pt,$e(xe(Pe,pt))),ft={color:De,fontFamily:gt,fontSize:Ve,fontStyle:We("normal","italic","oblique"),fontWeight:xe(Ve,We("normal","bold","bolder","lighter"))};function mt(e){return void 0===e?[]:Array.isArray(e)?e:[e]}function vt(e){return Array.from(new Set(e))}function yt(e,t){return e.reduce((e,i)=>{const n=t(i);return e[n]??(e[n]=[]),e[n].push(i),e},{})}function Ct(e,t){if(null==e||null==t||e.length!==t.length)return!1;for(let i=0;i<e.length;i++)if(Array.isArray(e[i])&&Array.isArray(t[i])){if(!Ct(e[i],t[i]))return!1}else if(e[i]!==t[i])return!1;return!0}function bt(e,t,i=0){if(0===e.length)return[];const n=[];for(let s=0;s<t;s++)n.push(e.at((s+i)%e.length));return n}function St(e,t){const i=new Map;return t.forEach((e,t)=>{i.set(e,t)}),e.sort((e,t)=>(i.get(e)??1/0)-(i.get(t)??1/0))}function wt(e,t){let i=0;for(;i<e.length&&t(e[i]);)i+=1;const n=i;0!==n&&e.splice(0,n)}function xt(e,t){let i=e.length-1;for(;i>=0&&t(e[i]);)i-=1;const n=e.length-1-i;0!==n&&e.splice(e.length-n,n)}var Et=class{constructor(){this.queue=[]}await(e=50){return new Promise(t=>{const i=()=>{clearTimeout(n),t(!0)},n=setTimeout(()=>{const e=this.queue.indexOf(i);e<0||(this.queue.splice(e,1),t(!1))},e);this.queue.push(i)})}notify(){this.queue.splice(0).forEach(e=>e())}};function Mt(e=0){return new Promise(t=>{setTimeout(t,e)})}function*At(...e){for(const t of e)yield*t}function Tt(e){return null!=e&&"object"==typeof e&&Symbol.iterator in e?e:[e]}function Dt(e){for(const t of e)return t;throw new Error("AG Charts - no first() value found")}function*It(e){const t=[void 0,void 0];for(const i of Object.keys(e))t[0]=i,t[1]=e[i],yield t}function Rt(e){return"true"===e}function Lt(e){return e}var kt={role:Lt,"aria-checked":Rt,"aria-controls":Lt,"aria-describedby":Lt,"aria-disabled":Rt,"aria-expanded":Rt,"aria-haspopup":Lt,"aria-hidden":Rt,"aria-label":Lt,"aria-labelledby":Lt,"aria-live":Lt,"aria-orientation":Lt,"aria-selected":Rt,"data-focus-override":Rt,"data-focus-visible-override":Rt,"data-preventdefault":Rt,class:Lt,for:Lt,id:Lt,tabindex:function(e){return Number(e)},title:Lt,placeholder:Lt};function Pt(e,t,i){null==i||""===i||""===i?e?.removeAttribute(t):e?.setAttribute(t,i.toString())}function Nt(e,t){if(null!=t)for(const[i,n]of It(t))"class"!==i&&Pt(e,i,n)}function Ot(e,t,i){if(!(e instanceof HTMLElement))return;const n=e.getAttribute(t);return null===n?i:kt[t]?.(n)??void 0}function _t(e,t,i){null!=e&&(null==i?e.style.removeProperty(t):e.style.setProperty(t,i.toString()))}function Ft(e,t){for(const[i,n]of It(t))_t(e,i,n)}function Gt(e,t,i){if(e>t)return;let n;for(;t>=e;){const s=Math.floor((t+e)/2);i(s)?(n=s,e=s+1):t=s-1}return n}function Vt(e,t,i){if(e>t)return;let n;for(;t>=e;){const s=Math.floor((t+e)/2);i(s)?(n=s,t=s-1):e=s+1}return n}function Bt(e,t,i){if(e>t)return;let n;for(;t>=e;){const s=Math.floor((t+e)/2),r=i(s);null==r?t=s-1:(n=r,e=s+1)}return n}function Ht(e,t){const i=Math.max(e.length,t.length),n=new Set,s=new Set;for(let r=0;r<i;r++){const i=e[r],o=t[r];i!==o&&(s.has(o)?s.delete(o):o&&n.add(o),n.has(i)?n.delete(i):i&&s.add(i))}return{changed:n.size>0||s.size>0,added:n,removed:s}}function zt(e,t,i){return Math.min(i,Math.max(e,t))}function Ut(e,t,i=1e-10){return e>=t[0]-i&&e<=t[1]+i}function Wt(e,t,i=1e-10){return e===t||Math.abs(e-t)<i}function jt(e){return-1===Math.sign(e)||Object.is(e,-0)}function Kt(e){return e%1==0}function $t(e,t=2){const i=10**t;return Math.round(e*i)/i}function Yt(e,t){return Math.floor(e%t+(e<0?Math.abs(t):0))}function qt(e){if(Math.floor(e)===e)return 0;let t=String(e),i=0;if(e<1e-6||e>=1e21){let e;[t,e]=t.split("e"),null!=e&&(i=Number(e))}const n=t.split(".")[1]?.length??0;return Math.max(n-i,0)}function Xt(e){return Array.isArray(e)&&e.length>=2&&e.every(Y)}function Zt(e){return Array.isArray(e)&&e.length>=2&&e.every(Xt)}function Qt(e){const t=e[0],i=e[e.length-1];return Wt(t[0],i[0],.001)&&Wt(t[1],i[1],.001)}function Jt(e){return Array.isArray(e)&&e.every(Zt)&&e.every(Qt)}function ei(e){if(null===e)return!0;if(!W(e)||null==e.type)return!1;const{type:t,coordinates:i}=e;switch(t){case"GeometryCollection":return Array.isArray(e.geometries)&&e.geometries.every(ei);case"MultiPolygon":return Array.isArray(i)&&i.every(Jt);case"Polygon":return Jt(i);case"MultiLineString":return Array.isArray(i)&&i.every(Zt);case"LineString":case"MultiPoint":return Zt(i);case"Point":return Xt(i);default:return!1}}function ti(e){return W(e)&&"Feature"===e.type&&ei(e.geometry)}var ii=ve(function(e){return W(e)&&"FeatureCollection"===e.type&&Array.isArray(e.features)&&e.features.every(ti)},"a GeoJSON object"),ni=new Map,si=(Symbol("ElementID"),1);function ri(e){const t=e.constructor,i=Object.hasOwn(t,"className")?t.className:t.name;if(!i)throw new Error(`The ${t} is missing the 'className' property.`);const n=(ni.get(i)??0)+1;return ni.set(i,n),`${i}-${n}`}function oi(){return"ag-charts-"+si++}function ai(){return crypto.randomUUID?.()??function(){const e=new Uint8Array(16);crypto.getRandomValues(e),e[6]=15&e[6]|64,e[8]=63&e[8]|128;let t="";for(let i=0;i<e.length;i++)4!==i&&6!==i&&8!==i&&10!==i||(t+="-"),t+=e[i].toString(16).padStart(2,"0");return t}()}var li=/^(?:(.)?([<>=^]))?([+\-( ])?([$€£¥₣₹#])?(0)?(\d+)?(,)?(?:\.(\d+))?(~)?([%a-z])?$/i,ci=/^((?:[^#]|#[^{])*)#{([^}]+)}(.*)$/;function hi(e){if(!K(e))return!1;const t=ci.exec(e);return li.test(t?t[2]:e)}function di(e){let t,i;const n=ci.exec(e);n&&([,t,e,i]=n);const s=li.exec(e);if(!s)throw new Error(`The number formatter is invalid: ${e}`);const[,r,o,a,l,c,h,d,u,p,g]=s;return{fill:r,align:o,sign:a,symbol:l,zero:c,width:parseInt(h),comma:d,precision:parseInt(u),trim:Boolean(p),type:g,prefix:t,suffix:i}}function ui(e){const t="string"==typeof e?di(e):e,{fill:i,align:n,sign:s="-",symbol:r,zero:o,width:a,comma:l,type:c,prefix:h="",suffix:d="",precision:u}=t;let{trim:p}=t;const g=null==u||isNaN(u);let f,m;if(c)if(c in gi&&c in pi)f=g?pi[c]:gi[c];else if(c in gi)f=gi[c];else{if(!(c in pi))throw new Error(`The number formatter type is invalid: ${c}`);f=pi[c]}else f=gi.g,p=!0;return m=g?c?6:12:u,e=>{let t=f(e,m);return p&&(t=t.replace(/\.0+$/,"").replace(/(\.[1-9])0+$/,"$1")),l&&(t=function(e,t){let i=e.indexOf(".");i<0&&(i=e.length);const n=e.substring(0,i).split(""),s=e.substring(i);for(let e=n.length-3;e>0;e-=3)n.splice(e,0,t);return`${n.join("")}${s}`}(t,l)),t=function(e,t,i=""){if("("===i)return e>=0?t:`(${t})`;return`${e>=0?"+"===i?"+":"":"−"}${t}`}(e,t,s),r&&"#"!==r&&(t=`${r}${t}`),"#"===r&&"x"===c&&(t=`0x${t}`),"s"===c&&(t=`${t}${function(e){return vi[Ci(e)]}(e)}`),"%"!==c&&"p"!==c||(t=`${t}%`),null==a||isNaN(a)||(t=function(e,t,i=" ",n=">"){let s=e;if(">"!==n&&n){if("<"===n)s=s.padEnd(t,i);else if("^"===n){const e=Math.max(0,t-s.length),n=Math.ceil(e/2),r=Math.floor(e/2);s=s.padStart(n+s.length,i),s=s.padEnd(r+s.length,i)}}else s=s.padStart(t,i);return s}(t,a,i??o,n)),t=`${h}${t}${d}`,t}}var pi={b:e=>yi(e).toString(2),c:e=>String.fromCharCode(e),d:e=>Math.round(Math.abs(e)).toFixed(0),o:e=>yi(e).toString(8),x:e=>yi(e).toString(16),X:e=>pi.x(e).toUpperCase(),n:e=>pi.d(e),"%":e=>`${yi(100*e).toFixed(0)}`},gi={e:(e,t)=>Math.abs(e).toExponential(t),E:(e,t)=>gi.e(e,t).toUpperCase(),f:(e,t)=>Math.abs(e).toFixed(t),F:(e,t)=>gi.f(e,t).toUpperCase(),g:(e,t)=>{if(0===e)return"0";const i=Math.abs(e),n=Math.floor(Math.log10(i));return n>=-4&&n<t?i.toFixed(t-1-n):i.toExponential(t-1)},G:(e,t)=>gi.g(e,t).toUpperCase(),n:(e,t)=>gi.g(e,t),p:(e,t)=>gi.r(100*e,t),r:(e,t)=>{if(0===e)return"0";const i=Math.abs(e),n=Math.floor(Math.log10(i))-(t-1);if(n<=0)return i.toFixed(-n);const s=10**n;return(Math.round(i/s)*s).toFixed()},s:(e,t)=>{const i=Ci(e);return gi.r(e/10**i,t)},"%":(e,t)=>gi.f(100*e,t)},fi=-24,mi=24,vi={[fi]:"y",[-21]:"z",[-18]:"a",[-15]:"f",[-12]:"p",[-9]:"n",[-6]:"µ",[-3]:"m",0:"",3:"k",6:"M",9:"G",12:"T",15:"P",18:"E",21:"Z",[mi]:"Y"};function yi(e){return Math.floor(Math.abs(e))}function Ci(e){return zt(-24,e?3*Math.floor(Math.log10(Math.abs(e))/3):0,24)}},85255(e,t,i){"use strict";i.d(t,{hF:()=>XP});var n=i(45401),s=i(26203),r=Object.defineProperty,o=Object.getOwnPropertyDescriptor,a=(e,t,i,n)=>{for(var s,a=n>1?void 0:n?o(t,i):t,l=e.length-1;l>=0;l--)(s=e[l])&&(a=(n?s(t,i,a):s(a))||a);return n&&a&&r(t,i,a),a},l=class{constructor(){this.ieCompatibility=!1}init(){this.ieCompatibility="5d41402abc4b2a76b9719d911017c592"!=this.md5("hello")}md5cycle(e,t){let i=e[0],n=e[1],s=e[2],r=e[3];i=this.ff(i,n,s,r,t[0],7,-680876936),r=this.ff(r,i,n,s,t[1],12,-389564586),s=this.ff(s,r,i,n,t[2],17,606105819),n=this.ff(n,s,r,i,t[3],22,-1044525330),i=this.ff(i,n,s,r,t[4],7,-176418897),r=this.ff(r,i,n,s,t[5],12,1200080426),s=this.ff(s,r,i,n,t[6],17,-1473231341),n=this.ff(n,s,r,i,t[7],22,-45705983),i=this.ff(i,n,s,r,t[8],7,1770035416),r=this.ff(r,i,n,s,t[9],12,-1958414417),s=this.ff(s,r,i,n,t[10],17,-42063),n=this.ff(n,s,r,i,t[11],22,-1990404162),i=this.ff(i,n,s,r,t[12],7,1804603682),r=this.ff(r,i,n,s,t[13],12,-40341101),s=this.ff(s,r,i,n,t[14],17,-1502002290),n=this.ff(n,s,r,i,t[15],22,1236535329),i=this.gg(i,n,s,r,t[1],5,-165796510),r=this.gg(r,i,n,s,t[6],9,-1069501632),s=this.gg(s,r,i,n,t[11],14,643717713),n=this.gg(n,s,r,i,t[0],20,-373897302),i=this.gg(i,n,s,r,t[5],5,-701558691),r=this.gg(r,i,n,s,t[10],9,38016083),s=this.gg(s,r,i,n,t[15],14,-660478335),n=this.gg(n,s,r,i,t[4],20,-405537848),i=this.gg(i,n,s,r,t[9],5,568446438),r=this.gg(r,i,n,s,t[14],9,-1019803690),s=this.gg(s,r,i,n,t[3],14,-187363961),n=this.gg(n,s,r,i,t[8],20,1163531501),i=this.gg(i,n,s,r,t[13],5,-1444681467),r=this.gg(r,i,n,s,t[2],9,-51403784),s=this.gg(s,r,i,n,t[7],14,1735328473),n=this.gg(n,s,r,i,t[12],20,-1926607734),i=this.hh(i,n,s,r,t[5],4,-378558),r=this.hh(r,i,n,s,t[8],11,-2022574463),s=this.hh(s,r,i,n,t[11],16,1839030562),n=this.hh(n,s,r,i,t[14],23,-35309556),i=this.hh(i,n,s,r,t[1],4,-1530992060),r=this.hh(r,i,n,s,t[4],11,1272893353),s=this.hh(s,r,i,n,t[7],16,-155497632),n=this.hh(n,s,r,i,t[10],23,-1094730640),i=this.hh(i,n,s,r,t[13],4,681279174),r=this.hh(r,i,n,s,t[0],11,-358537222),s=this.hh(s,r,i,n,t[3],16,-722521979),n=this.hh(n,s,r,i,t[6],23,76029189),i=this.hh(i,n,s,r,t[9],4,-640364487),r=this.hh(r,i,n,s,t[12],11,-421815835),s=this.hh(s,r,i,n,t[15],16,530742520),n=this.hh(n,s,r,i,t[2],23,-995338651),i=this.ii(i,n,s,r,t[0],6,-198630844),r=this.ii(r,i,n,s,t[7],10,1126891415),s=this.ii(s,r,i,n,t[14],15,-1416354905),n=this.ii(n,s,r,i,t[5],21,-57434055),i=this.ii(i,n,s,r,t[12],6,1700485571),r=this.ii(r,i,n,s,t[3],10,-1894986606),s=this.ii(s,r,i,n,t[10],15,-1051523),n=this.ii(n,s,r,i,t[1],21,-2054922799),i=this.ii(i,n,s,r,t[8],6,1873313359),r=this.ii(r,i,n,s,t[15],10,-30611744),s=this.ii(s,r,i,n,t[6],15,-1560198380),n=this.ii(n,s,r,i,t[13],21,1309151649),i=this.ii(i,n,s,r,t[4],6,-145523070),r=this.ii(r,i,n,s,t[11],10,-1120210379),s=this.ii(s,r,i,n,t[2],15,718787259),n=this.ii(n,s,r,i,t[9],21,-343485551),e[0]=this.add32(i,e[0]),e[1]=this.add32(n,e[1]),e[2]=this.add32(s,e[2]),e[3]=this.add32(r,e[3])}cmn(e,t,i,n,s,r){return t=this.add32(this.add32(t,e),this.add32(n,r)),this.add32(t<<s|t>>>32-s,i)}ff(e,t,i,n,s,r,o){return this.cmn(t&i|~t&n,e,t,s,r,o)}gg(e,t,i,n,s,r,o){return this.cmn(t&n|i&~n,e,t,s,r,o)}hh(e,t,i,n,s,r,o){return this.cmn(t^i^n,e,t,s,r,o)}ii(e,t,i,n,s,r,o){return this.cmn(i^(t|~n),e,t,s,r,o)}md51(e){const t=e.length,i=[1732584193,-271733879,-1732584194,271733878];let n;for(n=64;n<=e.length;n+=64)this.md5cycle(i,this.md5blk(e.substring(n-64,n)));e=e.substring(n-64);const s=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];for(n=0;n<e.length;n++)s[n>>2]|=e.charCodeAt(n)<<(n%4<<3);if(s[n>>2]|=128<<(n%4<<3),n>55)for(this.md5cycle(i,s),n=0;n<16;n++)s[n]=0;return s[14]=8*t,this.md5cycle(i,s),i}md5blk(e){const t=[];for(let i=0;i<64;i+=4)t[i>>2]=e.charCodeAt(i)+(e.charCodeAt(i+1)<<8)+(e.charCodeAt(i+2)<<16)+(e.charCodeAt(i+3)<<24);return t}rhex(e){const t="0123456789abcdef".split("");let i="",n=0;for(;n<4;n++)i+=t[e>>8*n+4&15]+t[e>>8*n&15];return i}hex(e){for(let t=0;t<e.length;t++)e[t]=this.rhex(e[t]);return e.join("")}md5(e){return this.hex(this.md51(e))}add32(e,t){return this.ieCompatibility?this.add32Compat(e,t):this.add32Std(e,t)}add32Std(e,t){return e+t&4294967295}add32Compat(e,t){const i=(65535&e)+(65535&t);return(e>>16)+(t>>16)+(i>>16)<<16|65535&i}};function c(e){return null==e||0===e.length}var h={"01":"GRID","02":"CHARTS","0102":"BOTH"},d="https://www.ag-grid.com/charts/licensing/",u=class e{constructor(e){this.watermarkMessage=void 0,this.totalMessageLength=124,this.document=e,this.md5=new l,this.md5.init()}validateLicense(){const t=this.getLicenseDetails(e.licenseKey,e.gridContext),i=`AG ${"BOTH"===t.currentLicenseType?"Grid and ":""}Charts Enterprise`;let n="";if("BOTH"===t.suppliedLicenseType?n="AG Grid and AG Charts Enterprise":"GRID"===t.suppliedLicenseType?n="AG Grid Enterprise":void 0!==t.suppliedLicenseType&&(n="AG Charts Enterprise"),t.missing)this.isWebsiteUrl()&&!this.isForceWatermark()||this.outputMissingLicenseKey(i);else if(t.expired){const i=e.getChartsReleaseDate(),s=e.formatDate(i);this.outputExpiredKey(t.expiry,s,n)}else t.valid?t.isTrial&&t.trialExpired&&this.outputExpiredTrialKey(t.expiry,i,n):this.outputInvalidLicenseKey(!!t.incorrectLicenseType,i,n)}static extractExpiry(t){const i=t.substring(t.lastIndexOf("_")+1,t.length);return new Date(parseInt(e.decode(i),10))}static extractLicenseComponents(t){let i=t.replace(/[\u200B-\u200D\uFEFF]/g,"");if(i=i.replace(/\r?\n|\r/g,""),t.length<=32)return{md5:null,license:t,version:null,isTrial:null};const n=i.length-32,s=i.substring(n),r=i.substring(0,n),[o,a,l]=e.extractBracketedInformation(i);return{md5:s,license:r,version:o,isTrial:a,type:l}}getLicenseDetails(t,i=!1){const n="CHARTS";if(c(t))return{licenseKey:t,valid:!1,missing:!0,currentLicenseType:n};const s=e.getChartsReleaseDate(),{md5:r,license:o,version:a,isTrial:l,type:d}=e.extractLicenseComponents(t);let u,p,g,f=r===this.md5.md5(o)&&-1===t.indexOf("For_Trialing_ag-Grid_Only"),m=null,v=!1;if(f&&(m=e.extractExpiry(o),f=!isNaN(m.getTime()),f))switch(p=s>m,a){case"legacy":case"2":f=!1;break;case"3":c(d)?f=!1:(g=d,d!==h["02"]&&d!==h["0102"]?(f=!1,v=!0):l&&(u=m<new Date,p=void 0))}return f?{licenseKey:t,valid:f,expiry:e.formatDate(m),expired:p,version:a,isTrial:l,trialExpired:u,invalidLicenseTypeForCombo:i?"BOTH"!==g:void 0,incorrectLicenseType:v,currentLicenseType:n,suppliedLicenseType:g}:{licenseKey:t,valid:f,incorrectLicenseType:v,currentLicenseType:n,suppliedLicenseType:g}}isDisplayWatermark(){return this.isForceWatermark()||!this.isLocalhost()&&!this.isE2ETest()&&!this.isWebsiteUrl()&&!c(this.watermarkMessage)}getWatermarkMessage(){return this.watermarkMessage??""}getHostname(){if(!this.document)return"localhost";const e=this.document.defaultView??window;if(!e)return"localhost";const t=e.location,{hostname:i=""}=t;return i}isForceWatermark(){if(!this.document)return!1;const e=this.document?.defaultView??"undefined"!=typeof window?window:void 0;if(!e)return!1;const{pathname:t}=e.location;return!!t&&-1!==t.indexOf("forceWatermark")}isWebsiteUrl(){const e=this.getHostname();return null!==/^((?:[\w-]+\.)?ag-grid\.com)$/.exec(e)}isLocalhost(){const e=this.getHostname();return null!==/^(?:127\.0\.0\.1|localhost)$/.exec(e)}isE2ETest(){const e=this.getHostname();return null!==/^(?:172\.17\.0\.1|host\.docker\.internal)$/.exec(e)}static formatDate(e){const t=e.getDate(),i=e.getMonth(),n=e.getFullYear();return t+" "+["January","February","March","April","May","June","July","August","September","October","November","December"][i]+" "+n}static getChartsReleaseDate(){return new Date(parseInt(e.decode(e.RELEASE_INFORMATION),10))}static decode(t){const i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";let n,s,r,o,a,l,c,h="",d=0;const u=t.replace(/[^A-Za-z0-9+/=]/g,"");for(;d<u.length;)o=i.indexOf(u.charAt(d++)),a=i.indexOf(u.charAt(d++)),l=i.indexOf(u.charAt(d++)),c=i.indexOf(u.charAt(d++)),n=o<<2|a>>4,s=(15&a)<<4|l>>2,r=(3&l)<<6|c,h+=String.fromCharCode(n),64!=l&&(h+=String.fromCharCode(s)),64!=c&&(h+=String.fromCharCode(r));return h=e.utf8_decode(h),h}static utf8_decode(e){e=e.replace(/rn/g,"n");let t="";for(let i=0;i<e.length;i++){const n=e.charCodeAt(i);n<128?t+=String.fromCharCode(n):n>127&&n<2048?(t+=String.fromCharCode(n>>6|192),t+=String.fromCharCode(63&n|128)):(t+=String.fromCharCode(n>>12|224),t+=String.fromCharCode(n>>6&63|128),t+=String.fromCharCode(63&n|128))}return t}static setGridContext(t=!1){e.gridContext=t}static setLicenseKey(t){e.licenseKey=t}static extractBracketedInformation(e){if(!e.includes("["))return["legacy",!1,void 0];const t=e.match(/\[(.*?)\]/g).map(e=>e.replace("[","").replace("]",""));if(!t||0===t.length)return["legacy",!1,void 0];const i=1===t.filter(e=>"TRIAL"===e).length,n=t.filter(e=>e.startsWith("v"))[0];return[n?n.replace("v",""):"legacy",i,h[t.filter(e=>h[e])[0]]]}centerPadAndOutput(e){const t=this.totalMessageLength-e.length;console.error(e.padStart(t/2+e.length,"*").padEnd(this.totalMessageLength,"*"))}padAndOutput(e,t="*",i=""){console.error(e.padEnd(this.totalMessageLength-i.length,t)+i)}outputInvalidLicenseKey(t,i,n){e.gridContext||(t?(this.centerPadAndOutput(""),this.centerPadAndOutput(` ${i} License `),this.centerPadAndOutput(" Incompatible License Key "),this.padAndOutput(`* Your license key is for ${n} only and does not cover you for ${i}.`," ","*"),this.padAndOutput(`* To troubleshoot your license key visit ${d}.`," ","*"),this.centerPadAndOutput(""),this.centerPadAndOutput("")):(this.centerPadAndOutput(""),this.centerPadAndOutput(` ${i} License `),this.centerPadAndOutput(" Invalid License Key "),this.padAndOutput("* Your license key is not valid."," ","*"),this.padAndOutput(`* To troubleshoot your license key visit ${d}.`," ","*"),this.centerPadAndOutput(""),this.centerPadAndOutput(""))),this.watermarkMessage="Invalid License"}outputExpiredTrialKey(t,i,n){e.gridContext||(this.centerPadAndOutput(""),this.centerPadAndOutput(` ${i} License `),this.centerPadAndOutput(" Trial Period Expired. "),this.padAndOutput(`* Your trial only license for ${n} expired on ${t}.`," ","*"),this.padAndOutput("* Please email info@ag-grid.com to purchase a license."," ","*"),this.centerPadAndOutput(""),this.centerPadAndOutput("")),this.watermarkMessage="Trial Period Expired"}outputMissingLicenseKey(t){e.gridContext||(this.centerPadAndOutput(""),this.centerPadAndOutput(` ${t} License `),this.centerPadAndOutput(" License Key Not Found "),this.padAndOutput(`* All ${t} features are unlocked for trial.`," ","*"),this.padAndOutput("* If you want to hide the watermark please email info@ag-grid.com for a trial license key."," ","*"),this.centerPadAndOutput(""),this.centerPadAndOutput("")),this.watermarkMessage="For Trial Use Only"}outputExpiredKey(t,i,n){e.gridContext||(this.centerPadAndOutput(""),this.centerPadAndOutput(` ${n} License `),this.centerPadAndOutput(" Incompatible Software Version "),this.padAndOutput(`* Your license key works with versions of ${n} released before ${t}.`," ","*"),this.padAndOutput(`* The version you are trying to use was released on ${i}.`," ","*"),this.padAndOutput("* Please contact info@ag-grid.com to renew your license key."," ","*"),this.centerPadAndOutput(""),this.centerPadAndOutput("")),this.watermarkMessage="License Expired"}};u.RELEASE_INFORMATION="MTc0OTAyMzU3MDQyNA==",u.gridContext=!1;var p=u;function g(e,t,i){const n=(t,i,n,s)=>{let r=e[0];for(let o=t;n>0?o<=i:o>i;o+=n){const t=e[o];if(s(r,t))return!0;r=t}return!1},s=Math.floor(e.length/2);return!!n(t,s,t,i)||n(e.length-t,s,-t,i)}var{AxisInterval:f,Property:m}=n.n1,v=class extends f{};a([m],v.prototype,"minSpacing",2);var{BaseProperties:y,ChartAxisDirection:C,Property:b,Group:S}=n.n1,w=class extends y{constructor(){super(...arguments),this.fontSize=14,this.fontFamily="Verdana, sans-serif",this.padding=5,this.color="rgba(87, 87, 87, 1)"}};a([b],w.prototype,"enabled",2),a([b],w.prototype,"text",2),a([b],w.prototype,"fontStyle",2),a([b],w.prototype,"fontWeight",2),a([b],w.prototype,"fontSize",2),a([b],w.prototype,"fontFamily",2),a([b],w.prototype,"padding",2),a([b],w.prototype,"color",2),a([b],w.prototype,"parallel",2);var x=class extends y{constructor(){super(...arguments),this.id=(0,s.sX)(this),this.defaultColorRange=[],this.shape="polygon",this.label=new w,this.scale=void 0,this.clippedRange=[-1/0,1/0],this.gridLength=0,this.sideFlag=-1,this.parallelFlipRotation=0,this.regularFlipRotation=0,this.direction=C.Angle,this.axisInnerRadius=0,this.axisOuterRadius=0,this.lineGroup=new S({name:this.id}),this.rangeGroup=new S({name:this.id}),this.labelGroup=new S({name:this.id}),this._isRange=void 0}assignCrossLineGroup(e,t){e!==this._isRange&&(e?this.rangeGroup.appendChild(t):this.lineGroup.appendChild(t)),this._isRange=e}setSectorNodeProps(e){e.fill=this.fill,e.fillOpacity=this.fillOpacity??1,e.stroke=this.stroke,e.strokeOpacity=this.strokeOpacity??1,e.strokeWidth=this.strokeWidth??1,e.lineDash=this.lineDash}setLabelNodeProps(e,t,i,n,s){const{label:r}=this;e.x=t,e.y=i,e.text=r.text,e.textAlign="center",e.textBaseline=n,e.rotation=s,e.rotationCenterX=t,e.rotationCenterY=i,e.fill=r.color,e.fontFamily=r.fontFamily,e.fontSize=r.fontSize,e.fontStyle=r.fontStyle,e.visible=!0}};a([b],x.prototype,"enabled",2),a([b],x.prototype,"type",2),a([b],x.prototype,"range",2),a([b],x.prototype,"value",2),a([b],x.prototype,"defaultColorRange",2),a([b],x.prototype,"fill",2),a([b],x.prototype,"fillOpacity",2),a([b],x.prototype,"stroke",2),a([b],x.prototype,"strokeWidth",2),a([b],x.prototype,"strokeOpacity",2),a([b],x.prototype,"lineDash",2),a([b],x.prototype,"shape",2),a([b],x.prototype,"label",2);var{ChartAxisDirection:E,getCrossLineValue:M,validateCrossLineValue:A,normalizeAngle360:T,Group:D,Path:I,Sector:R,RotatableText:L,ContinuousScale:k}=n.n1,P=class extends x{constructor(){super(),this.direction=E.Angle,this.polygonNode=new I,this.sectorNode=new R,this.lineNode=new I,this.crossLineRange=new D,this.labelNode=new L,this.ticks=[],this.crossLineRange.append(this.polygonNode),this.crossLineRange.append(this.sectorNode),this.crossLineRange.append(this.lineNode),this.labelGroup.append(this.labelNode)}visibilityCheck(){if(!k.is(this.scale))return!0;const[e,t]=this.scale.domain,i=M(this);if((0,s.cy)(i)){const[n,s]=i;return n>=e&&n<=t&&s>=n&&s<=t}return i>=e&&i<=t}update(e){const{scale:t}=this;if(!t||!A(M(this),t)||!this.visibilityCheck())return this.rangeGroup.visible=!1,this.lineGroup.visible=!1,void(this.labelGroup.visible=!1);this.rangeGroup.visible=e,this.lineGroup.visible=e,this.labelGroup.visible=e,this.updateLineNode(e),this.updatePolygonNode(e),this.updateSectorNode(e),this.updateLabelNode(e)}updateLineNode(e){const{scale:t,type:i,value:n,lineNode:s}=this;if(!e||"line"!==i||!t)return void(s.visible=!1);const r=t.convert(n);if(isNaN(r))return void(s.visible=!1);const{axisInnerRadius:o,axisOuterRadius:a}=this;s.visible=!0,s.stroke=this.stroke,s.strokeOpacity=this.strokeOpacity??1,s.strokeWidth=this.strokeWidth??1,s.fill=void 0,s.lineDash=this.lineDash;const l=a*Math.cos(r),c=a*Math.sin(r),h=o*Math.cos(r),d=o*Math.sin(r);s.path.clear(!0),s.path.moveTo(h,d),s.path.lineTo(l,c),this.assignCrossLineGroup(!1,this.crossLineRange)}updatePolygonNode(e){const{polygonNode:t,range:i,scale:n,shape:s,type:r,ticks:o}=this;if(!e||"range"!==r||"polygon"!==s||!n||!i)return void(t.visible=!1);const{axisInnerRadius:a,axisOuterRadius:l}=this,c=o.indexOf(i[0]),h=o.indexOf(i[1]),d=(c<=h?o.slice(c,h+1):o.slice(c).concat(o.slice(0,h+1))).map(e=>n.convert(e));t.visible=!0,this.setSectorNodeProps(t);const{path:u}=t;u.clear(!0),d.forEach((e,t)=>{const i=l*Math.cos(e),n=l*Math.sin(e);0===t?u.moveTo(i,n):u.lineTo(i,n)}),0===a?u.lineTo(0,0):d.slice().reverse().forEach(e=>{const t=a*Math.cos(e),i=a*Math.sin(e);u.lineTo(t,i)}),t.path.closePath(),this.assignCrossLineGroup(!0,this.crossLineRange)}updateSectorNode(e){const{sectorNode:t,range:i,scale:s,shape:r,type:o}=this;if(!e||"range"!==o||"circle"!==r||!s||!i)return void(t.visible=!1);const{axisInnerRadius:a,axisOuterRadius:l}=this,c=i.map(e=>s.convert(e)),h=s.step??0,d=s instanceof n.n1.BandScale?h/2:0;t.visible=!0,this.setSectorNodeProps(t),t.centerX=0,t.centerY=0,t.innerRadius=a,t.outerRadius=l,t.startAngle=c[0]-d,t.endAngle=c[1]+d,this.assignCrossLineGroup(!0,this.crossLineRange)}updateLabelNode(e){const{label:t,labelNode:i,range:n,scale:r,type:o,ticks:a}=this;if(!e||!1===t.enabled||!t.text||!r||"range"===o&&!n)return void(i.visible=!1);i.visible=!0;const{axisInnerRadius:l,axisOuterRadius:c}=this;let h,d,u,p;if("line"===o){const e=T(r.convert(this.value)),i=1.5*Math.PI,n=(0,s.YX)(e,i)||e>i||e<Math.PI/2,o=(l+c)/2*Math.cos(e),a=(l+c)/2*Math.sin(e);h=o+t.padding*Math.cos(e+Math.PI/2),d=a+t.padding*Math.sin(e+Math.PI/2),p=n?"top":"bottom",u=n?e:e-Math.PI}else{const[e,i]=n.map(e=>T(r.convert(e)));let o=(e+i)/2;e>i&&(o-=Math.PI),o=T(o);const l=((0,s.YX)(o,0)||o>0)&&o<Math.PI;let g;g="circle"===this.shape||a.length<3?c-t.padding:c*Math.cos(Math.PI/a.length)-t.padding,h=g*Math.cos(o),d=g*Math.sin(o),p=l?"bottom":"top",u=l?o-Math.PI/2:o+Math.PI/2}this.setLabelNodeProps(i,h,d,p,u)}};P.className="AngleCrossLine";var{ChartAxisDirection:N,TextWrapper:O,TextUtils:_,Property:F,toRadians:G,normalizeAngle360:V,normalizeAngle360Inclusive:B,Path:H,RotatableText:z,Transformable:U,BBox:W,Selection:j,Line:K}=n.n1,$=class extends n.n1.AxisLabel{constructor(){super(...arguments),this.orientation="fixed"}};a([F],$.prototype,"orientation",2);var Y=class extends n.n1.PolarAxis{constructor(e,t){super(e,t),this.startAngle=0,this.endAngle=void 0,this.tickLineGroupSelection=j.select(this.tickLineGroup,K,!1),this.gridLineGroupSelection=j.select(this.gridLineGroup,K,!1),this.labelData=[],this.tickData=[],this.radiusLineGroup=this.axisGroup.appendChild(new n.n1.TransformableGroup),this.radiusLine=this.radiusLineGroup.appendChild(new H),this.includeInvisibleDomains=!0}get direction(){return N.Angle}createLabel(){return new $}calculateRotations(){const e=G(this.startAngle);return{rotation:e,parallelFlipRotation:V(e),regularFlipRotation:V(e-Math.PI/2)}}calculateTickLayout(e){const{nice:t,scale:i}=this,n={nice:t,interval:void 0,tickCount:void 0,minTickCount:0,maxTickCount:1/0},r=t?i.niceDomain(n,e):e,o=this.generateAngleTicks(r);this.tickData=o;const a=o.map(e=>e.value),l=a.reduce((e,t)=>Math.max("number"==typeof t?(0,s.o3)(t):0,e),0);return{niceDomain:r,tickDomain:r,ticks:a,rawTickCount:void 0,fractionDigits:l,timeInterval:void 0,bbox:this.getBBox()}}update(){super.update(),this.updateRadiusLine(),this.updateGridLines(),this.updateTickLines()}normalizedAngles(){const e=V(-Math.PI/2+G(this.startAngle));return[e,e+(null!=this.endAngle?B(G(this.endAngle)-G(this.startAngle)):2*Math.PI)]}computeRange(){this.range=this.normalizedAngles()}updateSelections(){const e=this.tickData;this.gridLineGroupSelection.update(this.gridLength&&this.gridLine.enabled?e:[]),this.tickLineGroupSelection.update(this.tick.enabled?e:[]),this.tickLabelGroupSelection.update(this.label.enabled?e:[]),this.gridLineGroupSelection.cleanup(),this.tickLineGroupSelection.cleanup(),this.tickLabelGroupSelection.cleanup()}updatePosition(){super.updatePosition();const{translation:e,radiusLineGroup:t}=this,i=Math.floor(e.x),n=Math.floor(e.y);t.translationX=i,t.translationY=n}updateRadiusLine(){const e=this.radiusLine,{path:t}=e;t.clear(!0);const{points:i,closePath:n}=this.getAxisLinePoints();i.forEach(({x:e,y:i,moveTo:n,arc:s,radius:r=0,startAngle:o=0,endAngle:a=0})=>{s?t.arc(e,i,r,o,a):n?t.moveTo(e,i):t.lineTo(e,i)}),n&&t.closePath(),e.visible=this.line.enabled,e.stroke=this.line.stroke,e.strokeWidth=this.line.width,e.fill=void 0}getAxisLinePoints(){const{scale:e,shape:t,gridLength:i}=this,[n,r]=this.range,o=(0,s.YX)(r-n,2*Math.PI),a=[];if("circle"===t)o?a.push({x:i,y:0,moveTo:!0},{x:0,y:0,radius:i,startAngle:0,endAngle:2*Math.PI,arc:!0,moveTo:!1}):a.push({x:i*Math.cos(n),y:i*Math.sin(n),moveTo:!0},{x:0,y:0,radius:i,startAngle:V(n),endAngle:V(r),arc:!0,moveTo:!1});else if("polygon"===t){const t=e.ticks({nice:this.nice,interval:void 0,tickCount:void 0,minTickCount:0,maxTickCount:1/0})?.ticks?.map(t=>e.convert(t));t&&t.length>2&&t.forEach((e,t)=>{const n=i*Math.cos(e),s=i*Math.sin(e),r=0===t;a.push({x:n,y:s,moveTo:r})})}return{points:a,closePath:o}}updateGridLines(){const{scale:e,gridLength:t,gridLine:{style:i,width:n},innerRadiusRatio:s}=this;if(!(i&&t>0))return;const r=t*s,o=i.length;this.gridLineGroupSelection.each((s,a,l)=>{const{value:c}=a,{stroke:h,lineDash:d}=i[l%o],u=e.convert(c);s.x1=r*Math.cos(u),s.y1=r*Math.sin(u),s.x2=t*Math.cos(u),s.y2=t*Math.sin(u),s.stroke=h,s.strokeWidth=n,s.lineDash=d,s.fill=void 0}),this.gridLineGroupSelection.cleanup()}updateLabels(){const{label:e,tickLabelGroupSelection:t}=this;t.each((t,i,n)=>{const s=this.labelData[n];s&&!s.hidden?(t.text=s.text,t.setFont(e),t.fill=e.color,t.x=s.x,t.y=s.y,t.textAlign=s.textAlign,t.textBaseline=s.textBaseline,t.visible=!0,s.rotation?(t.rotation=s.rotation,t.rotationCenterX=s.x,t.rotationCenterY=s.y):t.rotation=0):t.visible=!1})}updateTickLines(){const{scale:e,gridLength:t,tick:i,tickLineGroupSelection:n}=this;n.each((n,s)=>{const{value:r}=s,o=e.convert(r),a=Math.cos(o),l=Math.sin(o);n.x1=t*a,n.y1=t*l,n.x2=(t+i.size)*a,n.y2=(t+i.size)*l,n.stroke=i.stroke,n.strokeWidth=i.width})}createLabelNodeData(e,t,i){const{label:n,gridLength:r,scale:o,tick:a}=this;if(!n.enabled)return[];const l=new z,c=i.x-this.translation.x,h=i.x+i.width-this.translation.x,d=e.map((i,d)=>{const{value:u}=i,p=r+n.spacing+a.size,g=o.convert(u),f=p*Math.cos(g),m=p*Math.sin(g),{textAlign:v,textBaseline:y}=this.getLabelAlign(g),C=d===e.length-1&&u!==e[0]&&(0,s.YX)(V(g),V(o.convert(e[0]))),b=this.getLabelRotation(g);let S=this.formatTick(u,d,o.domain);l.text=S,l.x=f,l.y=m,l.setFont(n),l.textAlign=v,l.textBaseline=y,l.rotation=b,b&&(l.rotationCenterX=f,l.rotationCenterY=m);let w=b?U.toCanvas(l):l.getBBox();if(w&&t.hideWhenNecessary&&!b){const e=c-w.x,t=w.x+w.width-h,i=1;if(e>i||t>i){const i=w.width-Math.max(e,t);S=O.wrapText(S,{maxWidth:i,font:n,textWrap:"never"}),S===_.EllipsisChar&&(S=""),l.text=S,w=l.getBBox()}}return{text:S,x:f,y:m,textAlign:v,textBaseline:y,hidden:""===S||i.hidden||C,rotation:b,box:w}});return n.avoidCollisions&&this.avoidLabelCollisions(d),d}computeLabelsBBox(e,t){this.labelData=this.createLabelNodeData(this.tickData,e,t);const i=this.labelData.map(({box:e})=>e).filter(e=>null!=e);return this.label.enabled&&0!==i.length?W.merge(i):null}getLabelOrientation(){const{label:e}=this;return e instanceof $?e.orientation:"fixed"}getLabelRotation(e){let t=G(this.label.rotation??0);e=V(e);const i=this.getLabelOrientation();return"parallel"===i?(t+=e,e>=0&&e<Math.PI?t-=Math.PI/2:t+=Math.PI/2):"perpendicular"===i&&(t+=e,e>=Math.PI/2&&e<1.5*Math.PI&&(t+=Math.PI)),t}getLabelAlign(e){const t=Math.cos(e),i=Math.sin(e);let n,r;const o=this.getLabelOrientation(),a=(0,s.YX)(t,0),l=(0,s.YX)(i,0),c=(0,s.YX)(t,1),h=(0,s.YX)(i,-1),d=t>0&&!a,u=i>0&&!l;return"parallel"===o?(n="center",r=c&&l||u?"top":"bottom"):"perpendicular"===o?(n=h||d?"left":"right",r="middle"):(n="right",a?n="center":d&&(n="left"),r="bottom",l?r="middle":u&&(r="top")),{textAlign:n,textBaseline:r}}updateCrossLines(){const{shape:e,gridLength:t,innerRadiusRatio:i}=this;this.crossLines.forEach(n=>{n instanceof P&&(n.ticks=this.tickData.map(e=>e.value),n.shape=e,n.axisOuterRadius=t,n.axisInnerRadius=t*i)}),super.updateCrossLines()}};Y.CrossLineConstructor=P,a([F],Y.prototype,"startAngle",2),a([F],Y.prototype,"endAngle",2);var{Property:q,CategoryScale:X}=n.n1,Z=class extends Y{constructor(e){super(e,new X),this.groupPaddingInner=0,this.paddingInner=0,this.interval=new v}generateAngleTicks(){const{scale:e,gridLength:t}=this,{values:i,minSpacing:n}=this.interval,s=i??e.ticks({nice:this.nice,interval:void 0,tickCount:void 0,minTickCount:0,maxTickCount:1/0})?.ticks??[];if(s.length<2||null==n)return s.map(e=>({value:e,visible:!0}));const r=s[0],o=e.convert(r),a=t*Math.cos(o),l=t*Math.sin(o);for(let i=1;i<s.length-1;i++){const c=s[i],h=e.convert(c);if(h-o>Math.PI)break;const d=t*Math.cos(h),u=t*Math.sin(h);if(Math.sqrt((d-a)**2+(u-l)**2)>n){const e=new Set([r]);return g(s,i,(t,i)=>{e.add(i)}),s.map(t=>({value:t,visible:e.has(t)}))}}return[{value:r,visible:!0}]}avoidLabelCollisions(e){const{minSpacing:t}=this.label;if(e.length<3)return;const i=(e,i)=>{if(e.hidden||i.hidden)return!1;if(null==t)return e.box.collidesBBox(i.box);const n=e.box.clone().grow(t/2),s=i.box.clone().grow(t/2);return n.collidesBBox(s)},n=e[0],r=e.at(-1),o=new Set([n]),a=(0,s.YX)(n.x,r.x)&&(0,s.YX)(n.y,r.y),l=Math.floor(e.length/2);for(let t=1;t<=l;t++){const n=a?e.slice(0,-1):e;if(!g(n,t,i)){g(n,t,(e,t)=>{o.add(t)});break}}e.forEach(e=>{o.has(e)||(e.hidden=!0,e.box=void 0)})}};Z.className="AngleCategoryAxis",Z.type="angle-category",a([q],Z.prototype,"groupPaddingInner",2),a([q],Z.prototype,"paddingInner",2),a([q],Z.prototype,"interval",2);var Q={type:"axis",optionsKey:"axes[]",packageType:"enterprise",chartTypes:["polar"],identifier:"angle-category",moduleFactory:e=>new Z(e)},{range:J,isDenseInterval:ee,LinearScale:te}=n.n1,ie=class e extends te{constructor(){super(...arguments),this.arcLength=0}static getNiceStepAndTickCount(e,t){const[i,n]=t;let s=te.getTickStep(i,n,e);const r=isNaN(e.maxTickCount)?1/0:e.maxTickCount,o=Math.abs(n-i)/s;let a=Math.pow(2,Math.ceil(Math.log(o)/Math.log(2)));return a>r&&(a/=2,s*=2),{count:a,step:s}}ticks(t,i=this.domain){const{arcLength:n}=this;if(!i||i.length<2||i.some(e=>!isFinite(e))||n<=0)return{ticks:[],count:0};const{nice:s,interval:r}=t,[o,a]=i;if(r){const e=Math.abs(r),t=this.getPixelRange();if(!ee((a-o)/e,t))return J(o,a,e)}let l;if(s&&this.hasNiceRange()){const n=super.niceDomain(t,i);l=e.getNiceStepAndTickCount(t,n).step}else l=te.getTickStep(o,a,t);return J(o,a,l)}hasNiceRange(){const e=this.range.slice().sort((e,t)=>e-t);return[Math.PI,2*Math.PI].some(t=>(0,s.YX)(t,e[1]-e[0]))}niceDomain(t,i=this.domain){const n=super.niceDomain(t,i);if(!this.hasNiceRange())return n;const s=n[0]>n[1],r=s?n[1]:n[0],{step:o,count:a}=e.getNiceStepAndTickCount(t,n),l=1/o,c=o>=1?Math.ceil(r/o+a)*o:Math.ceil((r+a*o)*l)/l;return s?[c,r]:[r,c]}getPixelRange(){return this.arcLength}},{Property:ne,angleBetween:se,normalisedExtentWithMetadata:re,findMinMax:oe}=n.n1,ae=class extends Y{constructor(e){super(e,new ie),this.shape="circle",this.interval=new v}normaliseDataDomain(e){const{min:t,max:i}=this,{extent:n,clipped:s}=re(e,t,i);return{domain:n,clipped:s}}updateScale(){super.updateScale(),this.scale.arcLength=this.getRangeArcLength()}getRangeArcLength(){const{range:e}=this,t=Math.min(...e),i=Math.max(...e);return(se(t,i)||2*Math.PI)*this.gridLength}generateAngleTicks(e){const{scale:t,range:i,nice:n}=this,{values:s,step:r,minSpacing:o,maxSpacing:a}=this.interval;let l;if(null==s){const{arcLength:s}=t,c=a?Math.floor(s/a):1,h=o?Math.floor(s/o):1/0,d=Math.floor(4/Math.PI*Math.abs(i[0]-i[1])),u={nice:n,interval:r,tickCount:Math.max(c,Math.min(h,d)),minTickCount:c,maxTickCount:h};l=t.ticks(u,e)?.ticks??[]}else{const[t,i]=oe(e.map(Number));l=s.filter(e=>e>=t&&e<=i).sort((e,t)=>e-t)}return l.map(e=>({value:e,visible:!0}))}avoidLabelCollisions(e){const{minSpacing:t}=this.label,i=(e,i)=>{if(e.hidden||i.hidden)return!1;if(null==t)return e.box.collidesBBox(i.box);const n=e.box.clone().grow(t/2),s=i.box.clone().grow(t/2);return n.collidesBBox(s)},n=e[0],r=e.at(-1);n!==r&&(0,s.YX)(n.x,r.x)&&(0,s.YX)(n.y,r.y)&&(r.hidden=!0);for(let t=1;t<e.length;t*=2){let n=!1;for(let s=t;s<e.length;s+=t){const r=e[s];if(i(e[s-t],r)){n=!0;break}}if(!n)return void e.forEach((e,i)=>{i%t>0&&(e.hidden=!0,e.box=void 0)})}e.forEach((e,t)=>{t>0&&(e.hidden=!0,e.box=void 0)})}};ae.className="AngleNumberAxis",ae.type="angle-number",a([ne],ae.prototype,"min",2),a([ne],ae.prototype,"max",2),a([ne],ae.prototype,"interval",2);var le={type:"axis",optionsKey:"axes[]",packageType:"enterprise",chartTypes:["polar"],identifier:"angle-number",moduleFactory:e=>new ae(e)},{OrdinalTimeScale:ce,Property:he,TimeAxisParentLevel:de}=n.n1,ue=class extends n.n1.CategoryAxis{constructor(e){super(e,new ce),this.parentLevel=new de}get primaryLabel(){return this.parentLevel.enabled?this.parentLevel.label:void 0}get primaryTick(){return this.parentLevel.enabled?this.parentLevel.tick:void 0}};ue.className="OrdinalTimeAxis",ue.type="ordinal-time",a([he],ue.prototype,"parentLevel",2);var pe={type:"axis",optionsKey:"axes[]",packageType:"enterprise",chartTypes:["cartesian"],identifier:"ordinal-time",moduleFactory:e=>new ue(e)},{ChartAxisDirection:ge,Property:fe,getCrossLineValue:me,validateCrossLineValue:ve,normalizeAngle360FromDegrees:ye,Group:Ce,Path:be,Sector:Se,RotatableText:we}=n.n1,xe=class extends w{constructor(){super(...arguments),this.positionAngle=void 0}};a([fe],xe.prototype,"positionAngle",2);var Ee=class extends x{constructor(){super(),this.direction=ge.Radius,this.label=new xe,this.polygonNode=new be,this.sectorNode=new Se,this.crossLineRange=new Ce,this.labelNode=new we,this.outerRadius=0,this.innerRadius=0,this.crossLineRange.append(this.polygonNode),this.crossLineRange.append(this.sectorNode),this.labelGroup.append(this.labelNode)}update(e){const{scale:t}=this;if(!t||!ve(me(this),t))return this.rangeGroup.visible=!1,this.lineGroup.visible=!1,void(this.labelGroup.visible=!1);this.updateRadii();const{innerRadius:i,outerRadius:n}=this;e&&(e=i>=this.axisInnerRadius&&n<=this.axisOuterRadius),this.rangeGroup.visible=e,this.lineGroup.visible=e,this.labelGroup.visible=e,this.updatePolygonNode(e),this.updateSectorNode(e),this.updateLabelNode(e),this.assignCrossLineGroup("range"===this.type,this.crossLineRange)}updateRadii(){const{range:e,scale:t,type:i,axisInnerRadius:n,axisOuterRadius:s}=this;if(!t)return{innerRadius:0,outerRadius:0};const r=e=>s+n-e;let o,a;if("line"===i)o=r(t.convert(this.value)),a=o;else{const i=Math.abs(t?.bandwidth??0),n=e.map(e=>t.convert(e));o=r(Math.max(...n)),a=r(Math.min(...n))+i}this.outerRadius=o,this.innerRadius=a}drawPolygon(e,t,i){t.forEach((t,n)=>{const s=e*Math.cos(t),r=e*Math.sin(t);0===n?i.path.moveTo(s,r):i.path.lineTo(s,r)}),i.path.closePath()}updatePolygonNode(e){const{gridAngles:t,polygonNode:i,scale:n,shape:s,type:r,innerRadius:o,outerRadius:a}=this;if(!e||"polygon"!==s||!n||!t)return void(i.visible=!1);i.visible=!0;const l=this.getPadding();i.path.clear(!0),this.drawPolygon(a-l,t,i);const c=t.slice().reverse(),h="line"===r?a-l:o+l;this.drawPolygon(h,c,i),this.setSectorNodeProps(i)}updateSectorNode(e){const{axisInnerRadius:t,axisOuterRadius:i,scale:n,sectorNode:r,shape:o,innerRadius:a,outerRadius:l}=this;if(!e||"circle"!==o||!n)return void(r.visible=!1);r.visible=!0,r.startAngle=0,r.endAngle=2*Math.PI;const c=this.getPadding(),h=(0,s.qE)(t,a+c,i),d=(0,s.qE)(t,l-c,i);r.innerRadius=Math.min(h,d),r.outerRadius=Math.max(h,d),this.setSectorNodeProps(r)}updateLabelNode(e){const{innerRadius:t,label:i,labelNode:n,scale:r,shape:o,type:a}=this;if(!e||!1===i.enabled||!i.text||!r)return void(n.visible=!1);const l=ye((i.positionAngle??0)-90),c=((0,s.YX)(l,0)||l>0)&&l<Math.PI,h=c?l-Math.PI/2:l+Math.PI/2;let d;const u=this.gridAngles??[];d="line"===a?t+i.padding:"circle"===o||u.length<3?t-i.padding:t*Math.cos(Math.PI/u.length)-i.padding;const p=d*Math.cos(l),g=d*Math.sin(l);let f;f="line"===a?c?"top":"bottom":c?"bottom":"top",this.setLabelNodeProps(n,p,g,f,h)}getPadding(){const{scale:e}=this;if(!e)return 0;const t=Math.abs(e.bandwidth??0),i=Math.abs(e.step??0);return e instanceof n.n1.BandScale?(i-t)/2:0}};Ee.className="RadiusCrossLine";var{ChartAxisDirection:Me,ZIndexMap:Ae,Property:Te,normalizeAngle360:De,toRadians:Ie,Caption:Re,Group:Le,TransformableGroup:ke,Path:Pe,Line:Ne,Selection:Oe,AxisTickGenerator:_e,AxisGroupZIndexMap:Fe}=n.n1,Ge=class extends n.n1.AxisLabel{constructor(){super(...arguments),this.autoRotateAngle=335}};a([Te],Ge.prototype,"autoRotate",2),a([Te],Ge.prototype,"autoRotateAngle",2);var Ve=class extends n.n1.PolarAxis{constructor(e,t){super(e,t),this.positionAngle=0,this.gridLineGroupSelection=Oe.select(this.gridLineGroup,Ne,!1),this.tickGenerator=new _e(this),this.generatedTicks=void 0,this.headingLabelGroup=this.axisGroup.appendChild(new ke({name:`${this.id}-Axis-heading`})),this.lineNodeGroup=this.axisGroup.appendChild(new ke({name:`${this.id}-Axis-line`})),this.lineNode=this.lineNodeGroup.appendChild(new Ne({name:`${this.id}-Axis-line`,zIndex:Fe.AxisLine})),this.gridPathGroup=this.gridGroup.appendChild(new Le({name:`${this.id}-gridPaths`,zIndex:Ae.AXIS_GRID})),this.gridPathSelection=Oe.select(this.gridPathGroup,Pe),this.headingLabelGroup.appendChild(this.title.caption.node),this.destroyFns.push(this.title.caption.registerInteraction(this.moduleCtx,"afterend"))}get direction(){return Me.Radius}getAxisTransform(){const e=this.scale.range[0],{translation:t,positionAngle:i,innerRadiusRatio:n}=this,s=e*n,r=Ie(i);return{translationX:t.x,translationY:t.y-e-s,rotation:r,rotationCenterX:0,rotationCenterY:e+s}}update(){super.update(),this.updateTitle(),this.updateGridLines();const{enabled:e,stroke:t,width:i}=this.line;this.lineNode.setProperties({stroke:t,strokeWidth:e?i:0,x1:0,y1:this.range[0],x2:0,y2:this.range[1]})}updatePosition(){super.updatePosition();const e=this.getAxisTransform();this.tickLineGroup.setProperties(e),this.tickLabelGroup.setProperties(e),this.lineNodeGroup.setProperties(e),this.headingLabelGroup.setProperties(e)}calculateRotations(){return{rotation:0,parallelFlipRotation:0,regularFlipRotation:-Math.PI/2}}calculateTickLayout(e,t,i){const n=-Math.PI/2,s=this.label.getSideFlag(),r=s*(this.getTickSize()+this.label.spacing+this.seriesAreaPadding),o=this.tickGenerator.generateTicks({domain:e,niceMode:t,visibleRange:[0,1],primaryTickCount:void 0,parallelFlipRotation:0,regularFlipRotation:n,labelX:r,sideFlag:s,removeOverflowLabels:!1}),{tickData:a}=o,{ticks:l,rawTicks:c,rawTickCount:h,tickDomain:d,fractionDigits:u,niceDomain:p=e}=a,g=l.map(e=>this.getTickLabelProps(e,o));return this.generatedTicks={ticks:l,labels:g},{ticks:c,tickDomain:d,niceDomain:p,rawTickCount:h,fractionDigits:u,timeInterval:void 0}}updateSelections(){const{generatedTicks:e}=this;if(!e)return;const{ticks:t,labels:i}=e;this.gridLineGroupSelection.update(this.gridLength?t:[]),this.tickLabelGroupSelection.update(i),this.gridPathSelection.update(this.gridLine.enabled?this.prepareGridPathTickData(t):[]),this.gridLineGroupSelection.cleanup(),this.tickLabelGroupSelection.cleanup(),this.gridPathSelection.cleanup()}updateLabels(){if(!this.label.enabled)return;const e=n.n1.resetAxisLabelSelectionFn();this.tickLabelGroupSelection.each((t,i)=>{t.fill=i.fill,t.fontFamily=i.fontFamily,t.fontSize=i.fontSize,t.fontStyle=i.fontStyle,t.fontWeight=i.fontWeight,t.text=i.text,t.textBaseline=i.textBaseline,t.textAlign=i.textAlign??"center",t.setProperties(e(t,i))})}updateGridLines(){const{gridLine:{style:e,width:t},shape:i,generatedTicks:n}=this;if(!e||!n)return;const r=e.length,[o,a]=this.gridRange??[0,2*Math.PI],l=(0,s.YX)(a-o,2*Math.PI),c="circle"===i?(e,t)=>{const{path:i}=e;i.clear(!0);const n=this.getTickRadius(t);l?(i.moveTo(n,0),i.arc(0,0,n,0,2*Math.PI)):(i.moveTo(n*Math.cos(o),n*Math.sin(o)),i.arc(0,0,n,De(o),De(a))),l&&i.closePath()}:(e,t)=>{const{path:i}=e,n=this.gridAngles;if(i.clear(!0),!n||n.length<3)return;const s=this.getTickRadius(t);n.forEach((e,t)=>{const r=s*Math.cos(e),o=s*Math.sin(e);0===t?i.moveTo(r,o):i.lineTo(r,o),n.forEach((e,t)=>{const n=s*Math.cos(e),r=s*Math.sin(e);0===t?i.moveTo(n,r):i.lineTo(n,r)}),i.closePath()}),i.closePath()};this.gridPathSelection.each((i,n,s)=>{((i,n)=>{const{stroke:s,lineDash:o}=e[n%r];i.stroke=s,i.strokeWidth=t,i.lineDash=o,i.fill=void 0})(i,s),c(i,n)})}updateTitle(){const e=e=>e.defaultValue,{title:t,range:i}=this,{formatter:n=e}=this.title;t.caption.enabled=t.enabled,t.caption.fontFamily=t.fontFamily,t.caption.fontSize=t.fontSize,t.caption.fontStyle=t.fontStyle,t.caption.fontWeight=t.fontWeight,t.caption.color=t.color,t.caption.wrapping=t.wrapping;let s=!1;const r=t.caption.node;t.enabled&&(s=!0,r.rotation=Math.PI/2,r.x=Math.floor((i[0]+i[1])/2),r.y=-Re.SMALL_PADDING,r.textAlign="center",r.textBaseline="bottom",r.text=this.callWithContext(n,this.getTitleFormatterParams(this.scale.domain))),r.visible=s}updateCrossLines(){this.crossLines.forEach(e=>{if(e instanceof Ee){const{shape:t,gridAngles:i,range:n,innerRadiusRatio:s}=this,r=n[0];e.shape=t,e.gridAngles=i,e.axisOuterRadius=r,e.axisInnerRadius=r*s}}),super.updateCrossLines()}createLabel(){return new Ge}getTickLabelProps(e,t){const{label:i}=this,{rotation:n,textBaseline:s,textAlign:r}=t,o=this.scale.range,a=e.tickLabel??"",l=i.getSideFlag()*(this.getTickSize()+i.spacing+this.seriesAreaPadding),c=""!==a&&null!=a,h=n;return{...this.getLabelStyles({value:e.tickLabel}),tickId:e.tickId,rotation:h,text:a,textAlign:r,textBaseline:s,visible:c,x:l,y:e.translationY,rotationCenterX:l,rotationCenterY:e.translationY,range:o}}};Ve.CrossLineConstructor=Ee,a([Te],Ve.prototype,"positionAngle",2);var{ProxyPropertyOnWrite:Be,Property:He,CategoryScale:ze}=n.n1,Ue=class extends Ve{constructor(e){super(e,new ze),this.shape="circle",this.groupPaddingInner=0,this.paddingInner=0,this.paddingOuter=0}normaliseDataDomain(e){return{domain:e,clipped:!1}}prepareGridPathTickData(e){return e.slice().reverse()}getTickRadius(e){const{scale:t,innerRadiusRatio:i}=this,n=t.range[0],s=n*i;if(ze.is(t)){const i=t.domain,n=i.length-1-i.indexOf(e.tick);return 0===n?s:t.inset+t.step*(n-.5)+t.bandwidth/2}{const i=(n-s)/t.domain.length;return n-e.translationY+s-i/2}}};Ue.className="RadiusCategoryAxis",Ue.type="radius-category",a([He],Ue.prototype,"groupPaddingInner",2),a([Be("scale","paddingInner"),He],Ue.prototype,"paddingInner",2),a([Be("scale","paddingOuter"),He],Ue.prototype,"paddingOuter",2);var We={type:"axis",optionsKey:"axes[]",packageType:"enterprise",chartTypes:["polar"],identifier:"radius-category",moduleFactory:e=>new Ue(e)},{Property:je,normalisedExtentWithMetadata:Ke,LinearScale:$e}=n.n1,Ye=class extends Ve{constructor(e){super(e,new $e),this.shape="polygon"}prepareGridPathTickData(e){const{scale:t}=this,i=t.domain[1];return e.filter(({tick:e})=>e!==i).sort((e,t)=>t.tick-e.tick)}getTickRadius(e){const{scale:t}=this,i=t.range[0],n=i*this.innerRadiusRatio;return i-e.translationY+n}normaliseDataDomain(e){const{min:t,max:i}=this,{extent:n,clipped:s}=Ke(e,t,i);return{domain:n,clipped:s}}};Ye.className="RadiusNumberAxis",Ye.type="radius-number",a([je],Ye.prototype,"min",2),a([je],Ye.prototype,"max",2);var qe={type:"axis",optionsKey:"axes[]",packageType:"enterprise",chartTypes:["polar"],identifier:"radius-number",moduleFactory:e=>new Ye(e)},{ObserveChanges:Xe,Property:Ze}=n.n1,Qe=class extends n.n1.BaseModuleInstance{constructor(e){super(),this.ctx=e,this.enabled=!0,e.animationManager.skip(!1),this.destroyFns.push(()=>{e.animationManager.skip(!0)})}};a([Xe((e,t)=>{e.ctx.animationManager.skip(!t)}),Ze],Qe.prototype,"enabled",2),a([Xe((e,t)=>{e.ctx.animationManager.defaultDuration=t}),Ze],Qe.prototype,"duration",2);var Je={type:"root",optionsKey:"animation",packageType:"enterprise",chartTypes:["cartesian","polar","hierarchy","topology","flow-proportion","standalone","gauge"],moduleFactory:e=>new Qe(e),themeTemplate:{animation:{enabled:!0}}},{focusCursorAtEnd:et}=n.n1,tt="text-input",it="canvas-overlay",nt=class extends n.n1.BaseModuleInstance{constructor(e){super(),this.ctx=e,this.layout={getTextInputCoords:()=>({x:0,y:0}),getTextPosition:()=>"center",alignment:"center",textAlign:"center"},this.visible=!1,this.element=e.domManager.addChild(it,tt),this.element.classList.add("ag-charts-text-input"),this.destroyFns.push(()=>e.domManager.removeChild(it,tt))}setKeyDownHandler(e){this.element.addEventListener("keydown",e),this.destroyFns.push(()=>this.element.removeEventListener("keydown",e))}show(e){this.element.innerHTML='<div contenteditable="plaintext-only" class="ag-charts-text-input__textarea" tabindex="0"></div>';const t=this.element.firstElementChild;(0,s.Bq)(t,"data-preventdefault",!1),t.isContentEditable||(t.contentEditable="true"),t.setAttribute("placeholder",this.ctx.localeManager.t(e.placeholderText??"inputTextareaPlaceholder")),e.styles?.placeholderColor&&t.style.setProperty("--placeholder-text-color",e.styles?.placeholderColor),t.innerText=e.text??"",t.style.color=e.styles?.color??"inherit",t.style.fontFamily=e.styles?.fontFamily??"inherit",t.style.fontSize=e.styles?.fontSize?`${e.styles.fontSize}px`:"inherit",t.style.fontStyle=e.styles?.fontStyle??"inherit",t.style.fontWeight="number"==typeof e.styles?.fontWeight?`${e.styles.fontWeight}`:e.styles?.fontWeight??"inherit",et(t),t.addEventListener("input",()=>{this.updatePosition(),e.onChange?.(this.getValue(),this.getBBox())}),t.addEventListener("click",e=>{e.stopPropagation()}),e.layout&&(this.layout=e.layout,this.updatePosition()),e.onChange?.(this.getValue(),this.getBBox()),this.visible=!0}hide(){this.element.innerHTML="",this.layout={getTextInputCoords:()=>({x:0,y:0}),getTextPosition:()=>"center",alignment:"center",textAlign:"center"},this.visible=!1}isVisible(){return this.visible}updateColor(e){this.element.firstElementChild&&(this.element.firstElementChild.style.color=e)}updateFontSize(e){if(this.element.firstElementChild)return this.element.firstElementChild.style.fontSize=`${e}px`,this.updatePosition(),this.getBBox()}getValue(){if(this.element.firstElementChild)return this.element.firstElementChild.innerText.trim()}updatePosition(){const{element:e}=this,t=e.firstElementChild;if(!t)return;const i=this.ctx.domManager.getBoundingClientRect(),{width:n,getTextInputCoords:s,getTextPosition:r,alignment:o,textAlign:a}=this.layout;e.style.setProperty("width",n?`${n}px`:"unset");const l=t.getBoundingClientRect(),c=s(l.height);let h=c.x;"center"===o?h-=(n??l.width)/2:"right"===o&&(h-=n??l.width);const d=r();let u=c.y;"center"===d?u-=l.height/2:"bottom"===d&&(u-=l.height),e.style.setProperty("top",`${u}px`),e.style.setProperty("left",`${h}px`),e.style.setProperty("max-width",i.width-h+"px"),e.style.setProperty("text-align",o),t.style.setProperty("text-align",a)}getBBox(){const{left:e,top:t,width:i,height:s}=this.element.getBoundingClientRect();return new n.n1.BBox(e,t,i,s)}},{BaseProperties:st,Property:rt}=n.n1,ot=class extends st{constructor(){super(...arguments),this.enabled=!1,this.axes="y"}};a([rt],ot.prototype,"enabled",2),a([rt],ot.prototype,"axes",2);var at=(e=>(e.Line="line",e.HorizontalLine="horizontal-line",e.VerticalLine="vertical-line",e.DisjointChannel="disjoint-channel",e.ParallelChannel="parallel-channel",e.FibonacciRetracement="fibonacci-retracement",e.FibonacciRetracementTrendBased="fibonacci-retracement-trend-based",e.Callout="callout",e.Comment="comment",e.Note="note",e.Text="text",e.Arrow="arrow",e.ArrowUp="arrow-up",e.ArrowDown="arrow-down",e.DateRange="date-range",e.PriceRange="price-range",e.DatePriceRange="date-price-range",e.QuickDatePriceRange="quick-date-price-range",e))(at||{}),lt=Object.values(at),{BaseProperties:ct,Property:ht}=n.n1,dt=class extends ct{};a([ht],dt.prototype,"x",2),a([ht],dt.prototype,"y",2);var ut=class extends(Lt(kt(It(ct)))){},pt=class extends(Lt(kt(Rt(At(Pt(ct)))))){constructor(){super(...arguments),this.cornerRadius=2}};a([ht],pt.prototype,"enabled",2),a([ht],pt.prototype,"cornerRadius",2);var gt=class extends(Rt(ct)){},ft=class extends(Lt(kt(Rt(ct)))){},mt=class extends(Pt(ct)){constructor(){super(...arguments),this.label="",this.position="top",this.alignment="left"}};a([ht],mt.prototype,"label",2),a([ht],mt.prototype,"position",2),a([ht],mt.prototype,"alignment",2);var vt=class extends(Pt(ct)){},yt=class extends(Pt(ct)){constructor(){super(...arguments),this.label=""}};function Ct(e){class t extends(function(e){class t extends e{}return a([ht],t.prototype,"locked",2),t}(It(e))){constructor(){super(...arguments),this.id=(0,s.lk)()}}return t}function bt(e){class t extends e{constructor(){super(...arguments),this.start=new dt,this.end=new dt}}return a([ht],t.prototype,"start",2),a([ht],t.prototype,"end",2),t}function St(e){class t extends e{}return a([ht],t.prototype,"x",2),a([ht],t.prototype,"y",2),t}function wt(e){class t extends e{}return a([ht],t.prototype,"value",2),t}function xt(e){class t extends e{constructor(){super(...arguments),this.background=new gt}}return a([ht],t.prototype,"background",2),t}function Et(e){class t extends e{constructor(){super(...arguments),this.handle=new ft}}return a([ht],t.prototype,"handle",2),t}function Mt(e){class t extends e{constructor(){super(...arguments),this.axisLabel=new pt}}return a([ht],t.prototype,"axisLabel",2),t}function At(e){class t extends e{constructor(){super(...arguments),this.padding=void 0,this.textAlign="center",this.formatter=void 0}}return a([ht],t.prototype,"padding",2),a([ht],t.prototype,"textAlign",2),a([ht],t.prototype,"formatter",2),t}function Tt(e){class t extends e{}return a([ht],t.prototype,"extendStart",2),a([ht],t.prototype,"extendEnd",2),t}function Dt(e){return class extends e{setLocaleManager(e){this.localeManager??(this.localeManager=e)}}}function It(e){class t extends e{}return a([ht],t.prototype,"visible",2),t}function Rt(e){class t extends e{}return a([ht],t.prototype,"fill",2),a([ht],t.prototype,"fillOpacity",2),t}function Lt(e){class t extends e{}return a([ht],t.prototype,"stroke",2),a([ht],t.prototype,"strokeOpacity",2),a([ht],t.prototype,"strokeWidth",2),t}function kt(e){class t extends e{constructor(){super(...arguments),this.lineCap=void 0,this.computedLineDash=void 0}}return a([ht],t.prototype,"lineDash",2),a([ht],t.prototype,"lineDashOffset",2),a([ht],t.prototype,"lineStyle",2),t}function Pt(e){class t extends e{constructor(){super(...arguments),this.fontSize=12,this.fontFamily="Verdana, sans-serif"}}return a([ht],t.prototype,"fontStyle",2),a([ht],t.prototype,"fontWeight",2),a([ht],t.prototype,"fontSize",2),a([ht],t.prototype,"fontFamily",2),a([ht],t.prototype,"color",2),t}function Nt(e){return(0,s.Et)(e)||(0,s.Kg)(e)||(0,s.$P)(e)?{value:e,groupPercentage:0}:e??{value:void 0,groupPercentage:0}}function Ot(e){return Nt(e)?.value}a([ht],yt.prototype,"label",2),a([ht],yt.prototype,"position",2),a([ht],yt.prototype,"alignment",2);var{clampArray:_t}=n.n1;function Ft(e,t){if(null==e.start||null==e.end)return;const i=Gt(e.start,t),n=Gt(e.end,t);return null!=i&&null!=n?{x1:i.x,y1:i.y,x2:n.x,y2:n.y}:void 0}function Gt(e,t){return{x:Vt(e.x,t.xAxis),y:Vt(e.y,t.yAxis)}}function Vt(e,t){if(null==e)return 0;const{value:i,groupPercentage:n}=Nt(e),{scale:s,snapToGroup:r}=t,o=0===s.bandwidth?s.step??0:s.bandwidth??0,a=r?o/2:o*n;return s.convert(i)+a}function Bt(e,t){return{x:Ht(e.x,t.xAxis),y:Ht(e.y,t.yAxis)}}function Ht(e,t){const{scale:i}=t;if(t.continuous&&null==i.step)return t.scaleInvert(e);const n=t.scaleInvertNearest(e),s=0===i.bandwidth?i.step:i.bandwidth??0,r=i.convert(n),o=r+s,a=_t(e,i.range);return{value:n,groupPercentage:r===o?0:(a-r)/(o-r)}}var{BaseProperties:zt}=n.n1,Ut=class extends(Ct(bt(Et(zt)))){constructor(){super(...arguments),this.snapToAngle=45}getDefaultColor(e){}getDefaultOpacity(e){}},{Property:Wt}=n.n1,jt=class extends(Dt(At(Pt(Ut)))){constructor(){super(...arguments),this.text="",this.position="top",this.alignment="left",this.placement="inside",this.placeholderText="inputTextareaPlaceholder"}getDefaultColor(e){return this.color}getDefaultOpacity(e){}getPlaceholderColor(){}getPadding(){const{padding:e=0}=this;return{top:e,right:e,bottom:e,left:e}}getText(){const e=0==this.text.length;let t=this.text;return e&&(t=this.placeholderText??"",this.localeManager&&(t=this.localeManager.t(t))),{text:t,isPlaceholder:e}}getTextInputCoords(e,t){return Gt(this.end,e)}getTextPosition(){return this.position}};a([Wt],jt.prototype,"text",2);var{Property:Kt,Color:$t}=n.n1,Yt={top:6,right:12,bottom:9,left:12},qt=class extends(Rt(Lt(jt))){constructor(){super(...arguments),this.type="callout",this.position="bottom",this.alignment="left"}static is(e){return(0,s.Gv)(e)&&"callout"===e.type}getDefaultColor(e){switch(e){case"fill-color":return this.fill;case"line-color":return this.stroke;default:return this.color}}getDefaultOpacity(e){switch(e){case"fill-color":return this.fillOpacity;case"line-color":return this.strokeOpacity;default:return}}getPlaceholderColor(){const{r:e,g:t,b:i}=$t.fromString(this.color??"#888888");return new $t(e,t,i,.66).toString()}getPadding(){const{padding:e}=this;return null==e?{...Yt}:{top:e,right:e,bottom:e,left:e}}getTextInputCoords(e,t){const i=super.getTextInputCoords(e,t),n=this.getPadding(),s=n.left??0,r=n.bottom??0;return{x:i.x+s,y:i.y-r}}};a([Kt],qt.prototype,"type",2);var{BaseProperties:Xt,Property:Zt}=n.n1,Qt=class extends(Ct(St(Et(At(Pt(Xt)))))){constructor(){super(...arguments),this.text="",this.position="top",this.alignment="left",this.placement="inside",this.placeholderText="inputTextareaPlaceholder"}getDefaultColor(e){return this.color}getDefaultOpacity(e){}getPlaceholderColor(){}getPadding(){const{padding:e=0}=this;return{top:e,right:e,bottom:e,left:e}}getText(){const e=0==this.text.length;return{text:e?this.placeholderText??"":this.text,isPlaceholder:e}}getTextInputCoords(e,t){return Gt(this,e)}getTextPosition(){return this.position}};a([Zt],Qt.prototype,"text",2);var{Property:Jt,Color:ei}=n.n1,ti=class extends(Rt(Lt(Qt))){constructor(){super(...arguments),this.type="comment",this.position="bottom",this.alignment="left"}static is(e){return(0,s.Gv)(e)&&"comment"===e.type}getDefaultColor(e){switch(e){case"fill-color":return this.fill;case"line-color":return this.stroke;default:return this.color}}getDefaultOpacity(e){switch(e){case"fill-color":return this.fillOpacity;case"line-color":return this.strokeOpacity;default:return}}getPlaceholderColor(){const{r:e,g:t,b:i}=ei.fromString(this.color??"#888888");return new ei(e,t,i,.66).toString()}getPadding(){const{padding:e,fontSize:t}=this;return null==e?{top:Math.max(.4*t,8),bottom:Math.max(.4*t,8),left:Math.max(.8*t,14),right:Math.max(.8*t,14)}:{top:e,right:e,bottom:e,left:e}}getTextInputCoords(e,t){const i=super.getTextInputCoords(e,t),n=this.getPadding();return{x:i.x+n.left,y:i.y-n.bottom}}};a([Jt],ti.prototype,"type",2);var{Vec2:ii}=n.n1;function ni(e,t){return e?"dashed":t??"solid"}function si(e,t){switch(t){case"solid":return[];case"dashed":return[4*e,2*e];case"dotted":return[0,2*e]}}function ri(e,t,i,n){const s=ni(e,i);return t??e??si(n??1,s)}function oi(e,t,i){const n=ni(t,i);return e??"dotted"===n?"round":void 0}var{BaseProperties:ai,Property:li}=n.n1,ci=class extends(Lt(ai)){},hi=class extends(Pt(Rt(Lt(ai)))){constructor(){super(...arguments),this.divider=new ci}};a([li],hi.prototype,"divider",2);var di=class extends(Rt(Lt(Et(ai)))){constructor(){super(...arguments),this.statistics=new hi}};a([li],di.prototype,"statistics",2);var ui=class extends(Dt(xt(Lt(kt(Ut))))){constructor(){super(...arguments),this.direction="both",this.hasDateRange=!1,this.hasPriceRange=!1,this.statistics=new hi,this.getVolume=()=>{},this.text=new mt}getDefaultColor(e){switch(e){case"fill-color":return this.background.fill;case"line-color":return this.stroke;case"text-color":return this.text.color}}getDefaultOpacity(e){switch(e){case"fill-color":return this.background.fillOpacity;case"line-color":return this.strokeOpacity}}getLineDash(){return ri(this.lineDash,this.computedLineDash,this.lineStyle,this.strokeWidth)}getLineCap(){return oi(this.lineCap,this.lineDash,this.lineStyle)}};function pi(e){return class extends e{constructor(){super(...arguments),this.hasDateRange=!0}}}function gi(e){return class extends e{constructor(){super(...arguments),this.hasPriceRange=!0}}}a([li],ui.prototype,"statistics",2),a([li],ui.prototype,"text",2);var fi=class extends(pi(ui)){constructor(){super(...arguments),this.type="date-range",this.direction="horizontal"}static is(e){return(0,s.Gv)(e)&&"date-range"===e.type}};a([li],fi.prototype,"type",2),a([li],fi.prototype,"extendAbove",2),a([li],fi.prototype,"extendBelow",2);var mi=class extends(gi(ui)){constructor(){super(...arguments),this.type="price-range",this.direction="vertical"}static is(e){return(0,s.Gv)(e)&&"price-range"===e.type}};a([li],mi.prototype,"type",2),a([li],mi.prototype,"extendLeft",2),a([li],mi.prototype,"extendRight",2);var vi=class extends(pi(gi(ui))){constructor(){super(...arguments),this.type="date-price-range",this.direction="both"}static is(e){return(0,s.Gv)(e)&&"date-price-range"===e.type}};a([li],vi.prototype,"type",2);var yi=class extends(pi(gi(ui))){constructor(){super(...arguments),this.type="quick-date-price-range",this.up=new di,this.down=new di,this.direction="both"}static is(e){return(0,s.Gv)(e)&&"quick-date-price-range"===e.type}};a([li],yi.prototype,"type",2),a([li],yi.prototype,"up",2),a([li],yi.prototype,"down",2);var{TextWrapper:Ci,CachedTextMeasurerPool:bi,BBox:Si}=n.n1,wi=1.38;function xi(e){return{font:{fontFamily:e.fontFamily,fontSize:e.fontSize,fontStyle:e.fontStyle,fontWeight:e.fontWeight},textAlign:e.textAlign,textBaseline:"center"==e.position?"middle":e.position,lineHeight:wi,avoidOrphans:!1,textWrap:"always"}}function Ei(e,t,i){return i?Ci.wrapText(t,{...xi(e),maxWidth:i}):t}function Mi(e,t,i,n){let s=n?.width??0,r=n?.height??0;if(!n){const i=null!=e.width?Ei(e,t,e.width):t;({width:s,height:r}=function(e,t){const i=xi(e),{lineMetrics:n,width:s}=bi.measureLines(t,i);return{width:s,height:n.length*(e.fontSize??14)*wi}}(e,i))}return new Si(i.x,i.y,s,r)}function Ai(e,t,i,n,{x:s,y:r},o){const{visible:a=!0,fontFamily:l,fontSize:c=14,fontStyle:h,fontWeight:d,textAlign:u}=n,p=c*wi;o??(o="center"==n.position?"middle":n.position);const g=i?n.getPlaceholderColor():n.color;e.setProperties({x:s,y:r,visible:a,text:t,fill:g,fontFamily:l,fontSize:c,fontStyle:h,fontWeight:d,textAlign:u,lineHeight:p,textBaseline:o})}var{BaseProperties:Ti,Property:Di}=n.n1,Ii=class extends(Rt(Lt(Ti))){},Ri=class extends(Rt(Lt(Qt))){constructor(){super(...arguments),this.type="note",this.background=new Ii,this.position="bottom",this.alignment="center",this.width=200}static is(e){return(0,s.Gv)(e)&&"note"===e.type}getDefaultColor(e){switch(e){case"line-color":return this.fill;case"text-color":return this.color}}getDefaultOpacity(e){switch(e){case"line-color":return this.fillOpacity;case"text-color":return}}getPadding(){const e=this.padding??10;return{top:e,right:e,bottom:e,left:e}}getTextInputCoords(e,t){const{width:i,text:n}=this,r=super.getTextInputCoords(e,t),o=this.getPadding().top,a=Mi(this,n,r);a.x=(0,s.qE)(i/2,a.x,e.seriesRect.width-i/2);const l=a.y-30-2*o,c=a.y+11+2*o;return l-Math.max(a.height,t)-34<0?(a.y=c,this.position="top"):(a.y=l+o,this.position="bottom"),{x:a.x,y:a.y}}};a([Di],Ri.prototype,"type",2),a([Di],Ri.prototype,"background",2);var{BaseProperties:Li}=n.n1,ki=class extends(Ct(St(Et(Li)))){getDefaultColor(e){}getDefaultOpacity(e){}},Pi=class e extends(Rt(ki)){constructor(){super(...arguments),this.size=32}static is(t){return t instanceof e}getDefaultColor(e){return"fill-color"===e?this.fill:void 0}getDefaultOpacity(e){return"fill-color"===e?this.fillOpacity:void 0}},{BaseProperties:Ni,Property:Oi}=n.n1,_i=class extends(Ct(wt(Et(Mt(Lt(kt(Ni))))))){constructor(){super(...arguments),this.direction="horizontal",this.type="horizontal-line",this.text=new mt}static is(e){return(0,s.Gv)(e)&&"horizontal-line"===e.type}getDefaultColor(){return this.stroke}getDefaultOpacity(){return this.strokeOpacity}getLineDash(){return ri(this.lineDash,this.computedLineDash,this.lineStyle,this.strokeWidth)}getLineCap(){return oi(this.lineCap,this.lineDash,this.lineStyle)}};a([Oi],_i.prototype,"type",2),a([Oi],_i.prototype,"text",2);var Fi=class extends(Ct(wt(Et(Mt(Lt(kt(Ni))))))){constructor(){super(...arguments),this.direction="vertical",this.type="vertical-line",this.text=new mt}static is(e){return(0,s.Gv)(e)&&"vertical-line"===e.type}getDefaultColor(){return this.stroke}getDefaultOpacity(){return this.strokeOpacity}getLineDash(){return ri(this.lineDash,this.computedLineDash,this.lineStyle,this.strokeWidth)}getLineCap(){return oi(this.lineCap,this.lineDash,this.lineStyle)}};a([Oi],Fi.prototype,"type",2),a([Oi],Fi.prototype,"text",2);var{BaseProperties:Gi,Property:Vi}=n.n1,Bi=class extends(Ct(xt(bt(Et(Tt(Lt(kt(Gi)))))))){constructor(){super(...arguments),this.type="disjoint-channel",this.text=new yt,this.snapToAngle=45}static is(e){return(0,s.Gv)(e)&&"disjoint-channel"===e.type}get bottom(){const e={start:{x:this.start.x,y:this.start.y},end:{x:this.end.x,y:this.end.y}};return"number"==typeof e.start.y&&"number"==typeof e.end.y?(e.start.y-=this.startHeight,e.end.y-=this.endHeight):s.Vy.warnOnce(`Annotation [${this.type}] can only be used with a numeric y-axis.`),e}getDefaultColor(e){switch(e){case"fill-color":return this.background.fill;case"line-color":return this.stroke;case"text-color":return this.text.color}}getDefaultOpacity(e){switch(e){case"fill-color":return this.background.fillOpacity;case"line-color":return this.strokeOpacity}}getLineDash(){return ri(this.lineDash,this.computedLineDash,this.lineStyle,this.strokeWidth)}getLineCap(){return oi(this.lineCap,this.lineDash,this.lineStyle)}};a([Vi],Bi.prototype,"type",2),a([Vi],Bi.prototype,"startHeight",2),a([Vi],Bi.prototype,"endHeight",2),a([Vi],Bi.prototype,"text",2);var{Property:Hi}=n.n1,zi=class extends(Dt(function(e){return class extends e{}}(Tt(Lt(kt(Ut)))))){constructor(){super(...arguments),this.text=new mt}getDefaultColor(e){switch(e){case"line-color":return this.stroke;case"text-color":return this.text.color}}getDefaultOpacity(){return this.strokeOpacity}getLineDash(){return ri(this.lineDash,this.computedLineDash,this.lineStyle,this.strokeWidth)}getLineCap(){return oi(this.lineCap,this.lineDash,this.lineStyle)}};a([Hi],zi.prototype,"text",2);var Ui=class extends zi{constructor(){super(...arguments),this.type="arrow",this.endCap="arrow"}static is(e){return(0,s.Gv)(e)&&"arrow"===e.type}};a([Hi],Ui.prototype,"type",2);var Wi=class extends zi{constructor(){super(...arguments),this.type="line"}static is(e){return(0,s.Gv)(e)&&"line"===e.type}};a([Hi],Wi.prototype,"type",2);var{Property:ji}=n.n1,Ki=class extends zi{constructor(){super(...arguments),this.label=new vt,this.reverse=!1,this.showFill=!0,this.isMultiColor=!0,this.strokes=[],this.bands=10}getDefaultColor(e){switch(e){case"line-color":return this.rangeStroke??this.stroke;case"text-color":return this.text.color}}};a([ji],Ki.prototype,"label",2),a([ji],Ki.prototype,"reverse",2),a([ji],Ki.prototype,"showFill",2),a([ji],Ki.prototype,"isMultiColor",2),a([ji],Ki.prototype,"strokes",2),a([ji],Ki.prototype,"rangeStroke",2),a([ji],Ki.prototype,"bands",2);var{Property:$i}=n.n1,Yi=class extends Ki{constructor(){super(...arguments),this.type="fibonacci-retracement-trend-based",this.endRetracement=new dt}static is(e){return(0,s.Gv)(e)&&"fibonacci-retracement-trend-based"===e.type}};a([$i],Yi.prototype,"type",2),a([$i],Yi.prototype,"endRetracement",2);var{Property:qi}=n.n1,Xi=class extends Ki{constructor(){super(...arguments),this.type="fibonacci-retracement"}static is(e){return(0,s.Gv)(e)&&"fibonacci-retracement"===e.type}};a([qi],Xi.prototype,"type",2);var{BaseProperties:Zi,Property:Qi}=n.n1,Ji=class extends(Ct(xt(bt(Et(Tt(Lt(kt(Zi)))))))){constructor(){super(...arguments),this.type="parallel-channel",this.middle=new ut,this.text=new yt,this.snapToAngle=45}static is(e){return(0,s.Gv)(e)&&"parallel-channel"===e.type}get bottom(){const e={start:{x:this.start.x,y:this.start.y},end:{x:this.end.x,y:this.end.y}};return"number"==typeof e.start.y&&"number"==typeof e.end.y?(e.start.y-=this.height,e.end.y-=this.height):s.Vy.warnOnce(`Annotation [${this.type}] can only be used with a numeric y-axis.`),e}getDefaultColor(e){switch(e){case"fill-color":return this.background.fill;case"line-color":return this.stroke;case"text-color":return this.text.color}}getDefaultOpacity(e){switch(e){case"fill-color":return this.background.fillOpacity;case"line-color":return this.strokeOpacity}}getLineDash(){return ri(this.lineDash,this.computedLineDash,this.lineStyle,this.strokeWidth)}getLineCap(){return oi(this.lineCap,this.lineDash,this.lineStyle)}};a([Qi],Ji.prototype,"type",2),a([Qi],Ji.prototype,"height",2),a([Qi],Ji.prototype,"middle",2),a([Qi],Ji.prototype,"text",2);var{Property:en}=n.n1,tn=class extends Qt{constructor(){super(...arguments),this.type="text",this.position="bottom"}static is(e){return(0,s.Gv)(e)&&"text"===e.type}};function nn(e){return yi.is(e)}function sn(e){return Wi.is(e)||_i.is(e)||Fi.is(e)||Ui.is(e)||on(e)}function rn(e){return Bi.is(e)||Ji.is(e)}function on(e){return Xi.is(e)||Yi.is(e)}function an(e){return qt.is(e)||ti.is(e)||Ri.is(e)||tn.is(e)}function ln(e){return fi.is(e)||mi.is(e)||vi.is(e)||yi.is(e)}function cn(e){return an(e)&&!Ri.is(e)}function hn(e){return sn(e)||rn(e)||ln(e)&&!yi.is(e)}function dn(e){return sn(e)||rn(e)||ln(e)||qt.is(e)||Ri.is(e)}function un(e){return rn(e)||ln(e)||qt.is(e)||ti.is(e)||Pi.is(e)}function pn(e){return an(e)&&!Ri.is(e)}function gn(e){return(sn(e)||rn(e)||ln(e))&&!nn(e)&&(0,s.Gv)(e.text)}function fn(e,t){"fontSize"in e&&(e.fontSize=t),gn(e)&&(e.text.fontSize=t)}function mn(e,t){const i=t?.strokeWidth??e.strokeWidth??1,n=t?.type??e.lineStyle,s=n??ni(e.lineDash,n),r=si(i,s);e.strokeWidth=i,e.computedLineDash=r,e.lineStyle=s,e.lineCap="dotted"===s?"round":void 0}function vn(e,t,i,n,s,r){switch(t){case"fill-color":"fill"in e&&(e.fill=n),"fillOpacity"in e&&(e.fillOpacity=s),"background"in e&&(e.background.fill=n,e.background.fillOpacity=s);break;case"line-color":"axisLabel"in e&&(e.axisLabel.fill=n,e.axisLabel.fillOpacity=s,e.axisLabel.stroke=n,e.axisLabel.strokeOpacity=s),"fill"in e&&"fillOpacity"in e&&function(e){return Ri.is(e)}(e)?(e.fill=n,e.fillOpacity=s):("strokeOpacity"in e&&(e.strokeOpacity=s),"isMultiColor"in e&&"rangeStroke"in e?(e.isMultiColor=r,e.rangeStroke=n):"stroke"in e&&(e.stroke=n));break;case"text-color":"color"in e&&(e.color=i),gn(e)&&(e.text.color=n)}}a([en],tn.prototype,"type",2);var{deepClone:yn}=n.n1,Cn=class{constructor(){this.mementoOriginatorKey="annotation-defaults",this.colors=new Map(Object.values(at).map(e=>[e,new Map([["line-color",void 0],["fill-color",void 0],["text-color",void 0]])])),this.fontSizes=new Map([["callout",void 0],["comment",void 0],["text",void 0],["arrow",void 0],["line",void 0],["disjoint-channel",void 0],["parallel-channel",void 0],["date-range",void 0],["price-range",void 0],["date-price-range",void 0]]),this.lineStyles=new Map([["line",void 0],["horizontal-line",void 0],["vertical-line",void 0],["disjoint-channel",void 0],["parallel-channel",void 0],["arrow",void 0],["date-range",void 0],["price-range",void 0],["date-price-range",void 0]]),this.lineTextAlignments=new Map([["line",void 0],["horizontal-line",void 0],["vertical-line",void 0],["disjoint-channel",void 0],["parallel-channel",void 0],["arrow",void 0],["date-range",void 0],["price-range",void 0],["date-price-range",void 0]]),this.lineTextPositions=new Map([["line",void 0],["horizontal-line",void 0],["vertical-line",void 0],["disjoint-channel",void 0],["parallel-channel",void 0],["arrow",void 0],["date-range",void 0],["price-range",void 0],["date-price-range",void 0]]),this.fibonacciOptions=new Map([["fibonacci-retracement",{bands:void 0,reverse:void 0,showFill:void 0}],["fibonacci-retracement-trend-based",{bands:void 0,reverse:void 0,showFill:void 0}]])}createMemento(){return{colors:yn(this.colors),fontSizes:yn(this.fontSizes),lineStyles:yn(this.lineStyles),lineTextAlignments:yn(this.lineTextAlignments),lineTextPositions:yn(this.lineTextPositions),fibonacciOptions:yn(this.fibonacciOptions)}}guardMemento(e){return!0}restoreMemento(e,t,i){this.colors=yn(i.colors),this.fontSizes=yn(i.fontSizes),this.lineStyles=yn(i.lineStyles),this.lineTextAlignments=yn(i.lineTextAlignments),this.lineTextPositions=yn(i.lineTextPositions),this.fibonacciOptions=yn(i.fibonacciOptions)}setDefaultColor(e,t,i,n,s,r){this.colors.get(e)?.set(t,[i,n,s,r])}setDefaultFontSize(e,t){this.fontSizes.set(e,t)}setDefaultLineStyleType(e,t){const i=this.lineStyles.get(e);i?i.type=t:this.lineStyles.set(e,{type:t})}setDefaultLineStyleWidth(e,t){const i=this.lineStyles.get(e);i?i.strokeWidth=t:this.lineStyles.set(e,{strokeWidth:t})}setDefaultLineTextAlignment(e,t){this.lineTextAlignments.set(e,t)}setDefaultLineTextPosition(e,t){this.lineTextPositions.set(e,t)}setDefaultFibonacciOptions(e,t,i){if("fibonacci-retracement"!=e&&"fibonacci-retracement-trend-based"!=e)return;const n=this.fibonacciOptions.get(e);n[t]=i,this.fibonacciOptions.set(e,n)}applyDefaults(e){for(const[t,i]of this.colors)if(e.type===t)for(const[t,[n,s,r,o]=[]]of i)n&&s&&null!=r&&null!=o&&vn(e,t,n,s,r,o);for(const[t,i]of this.fontSizes)e.type===t&&null!=i&&fn(e,i);for(const[t,i]of this.lineStyles)e.type===t&&null!=i&&mn(e,i);for(const[t,i]of this.lineTextPositions)e.type===t&&null!=i&&(e.text.position=i);for(const[t,i]of this.lineTextAlignments)e.type===t&&null!=i&&(e.text.alignment=i);for(const[t,i]of this.fibonacciOptions)e.type===t&&null!=i&&Object.keys(i).forEach(t=>{const n=i[t];null!=n&&e.set({[t]:n})})}},{Color:bn}=n.n1,Sn=e=>{try{const t=bn.fromString(e),[i,n,s]=t.toHSB();return[i,n,s,t.a]}catch{return}},wn=class extends n.n1.AnchoredPopover{constructor(e,t){super(e,"color-picker",t),this.hasChanged=!1,this.hideFns.push(()=>{this.hasChanged&&this.onChangeHide?.()})}show(e){this.hasChanged=!1,this.onChangeHide=e.onChangeHide;const{element:t,initialFocus:i}=this.createColorPicker(e),n=this.showWithChildren([t],{initialFocus:i,...e});n.classList.add("ag-charts-color-picker"),n.setAttribute("role","dialog")}createColorPicker(e){let t=e.isMultiColor??!1,[i,n,r,o]=Sn(e.color??"#f00")??[0,1,.5,1];o=e.opacity??o;const a=(0,s.n)("div","ag-charts-color-picker__content");a.innerHTML='<div class="ag-charts-color-picker__palette" tabindex="0"></div><div class="ag-charts-color-picker__color-row"><button class="ag-charts-color-picker__multi-color-button" tabindex="0" type="button"></button> <input class="ag-charts-color-picker__hue-input" tabindex="0" type="range" min="0" max="360" value="0"></div><input class="ag-charts-color-picker__alpha-input" tabindex="0" type="range" min="0" max="1" value="1" step="0.01"> <label class="ag-charts-color-picker__color-field"><span class="ag-charts-color-picker__color-label">Color</span> <input class="ag-charts-color-picker__color-input" tabindex="0" value="#000"></label>',a.ariaLabel=this.ctx.localeManager.t("ariaLabelColorPicker");const l=a.querySelector(".ag-charts-color-picker__palette"),c=a.querySelector(".ag-charts-color-picker__hue-input"),h=a.querySelector(".ag-charts-color-picker__multi-color-button"),d=a.querySelector(".ag-charts-color-picker__alpha-input"),u=a.querySelector(".ag-charts-color-picker__color-input"),p=a.querySelector(".ag-charts-color-picker__color-label");h.classList.toggle("ag-charts-color-picker__multi-color-button--hidden",!e.hasMultiColorOption);const g=(s=!0)=>{const l=bn.fromHSB(i,n,r,o).toHexString();if(a.style.setProperty("--h",`${i}`),a.style.setProperty("--s",`${n}`),a.style.setProperty("--v",`${r}`),a.style.setProperty("--a",`${o}`),a.style.setProperty("--color",l.slice(0,7)),a.style.setProperty("--color-a",l),c.value=`${i}`,d.value=`${o}`,d.classList.toggle("ag-charts-color-picker__alpha-input--opaque",1===o),h.classList.toggle("ag-charts-color-picker__multi-color-button--active",t),p.classList.toggle("ag-charts-color-picker__color-label--multi-color",t),document.activeElement!==u&&(u.value=t?"Multi Colour":l.toUpperCase()),s||null==e.color){const s=bn.fromHSB(i,n,r,1).toHexString();e.onChange?.(l,s,o,t)}s&&(this.hasChanged=!0)};g(!1);const f=e=>e.preventDefault(),m=e=>e.stopPropagation();return a.addEventListener("mousedown",m),a.addEventListener("touchstart",m),a.addEventListener("touchmove",m),a.addEventListener("keydown",e=>{switch(e.stopPropagation(),e.key){case"Enter":case"Escape":this.hide();break;default:return}e.preventDefault()}),l.addEventListener("pointerdown",e=>{e.preventDefault();const i=e.currentTarget;i.focus();const s=i.getBoundingClientRect(),o=({clientX:e,clientY:i})=>{t=!1,n=Math.min(Math.max((e-s.left)/s.width,0),1),r=1-Math.min(Math.max((i-s.top)/s.height,0),1),g()};o(e),window.addEventListener("pointermove",o),window.addEventListener("pointerup",()=>{window.removeEventListener("pointermove",o)},{once:!0})}),l.addEventListener("touchstart",f,{passive:!1}),l.addEventListener("touchmove",f,{passive:!1}),l.addEventListener("keydown",e=>{if("ArrowLeft"===e.key)n=(0,s.qE)(0,n-.01,1);else if("ArrowRight"===e.key)n=(0,s.qE)(0,n+.01,1);else if("ArrowUp"===e.key)r=(0,s.qE)(0,r+.01,1);else{if("ArrowDown"!==e.key)return;r=(0,s.qE)(0,r-.01,1)}e.preventDefault(),g()}),h.addEventListener("click",()=>{t=!t,g()}),c.addEventListener("input",e=>{t=!1,i=e.currentTarget.valueAsNumber??0,g()}),d.addEventListener("input",e=>{t=!1,o=e.currentTarget.valueAsNumber??0,g()}),u.addEventListener("input",e=>{t=!1;const s=Sn(e.currentTarget.value);null!=s&&([i,n,r,o]=s,g())}),u.addEventListener("blur",()=>g()),u.addEventListener("keydown",e=>{"Enter"===e.key&&(e.currentTarget.blur(),g())}),{element:a,initialFocus:l}}};function xn(e){return!(e instanceof n.n1.LogScale||e instanceof n.n1.BandScale)}var En=[{label:"toolbarAnnotationsTrendLine",icon:"trend-line-drawing",value:"line"},{label:"toolbarAnnotationsHorizontalLine",icon:"horizontal-line-drawing",value:"horizontal-line"},{label:"toolbarAnnotationsVerticalLine",icon:"vertical-line-drawing",value:"vertical-line"},{label:"toolbarAnnotationsParallelChannel",icon:"parallel-channel-drawing",value:"parallel-channel",visible:xn},{label:"toolbarAnnotationsDisjointChannel",icon:"disjoint-channel-drawing",value:"disjoint-channel",visible:xn}],Mn=[{label:"toolbarAnnotationsFibonacciRetracement",icon:"fibonacci-retracement-drawing",value:"fibonacci-retracement"},{label:"toolbarAnnotationsFibonacciRetracementTrendBased",icon:"fibonacci-retracement-trend-based-drawing",value:"fibonacci-retracement-trend-based"}],An=[{label:"Fibonacci - Extended",value:10},{label:"Fibonacci - 6 Band",value:6},{label:"Fibonacci - 4 Band",value:4}],Tn=[{label:"toolbarAnnotationsText",icon:"text-annotation",value:"text"},{label:"toolbarAnnotationsComment",icon:"comment-annotation",value:"comment"},{label:"toolbarAnnotationsCallout",icon:"callout-annotation",value:"callout"},{label:"toolbarAnnotationsNote",icon:"note-annotation",value:"note"}],Dn=[{label:"toolbarAnnotationsArrow",icon:"arrow-drawing",value:"arrow"},{label:"toolbarAnnotationsArrowUp",icon:"arrow-up-drawing",value:"arrow-up"},{label:"toolbarAnnotationsArrowDown",icon:"arrow-down-drawing",value:"arrow-down"}],In=[{label:"toolbarAnnotationsQuickDatePriceRange",icon:"measurer-drawing",value:"quick-date-price-range"},{label:"toolbarAnnotationsDateRange",icon:"date-range-drawing",value:"date-range"},{label:"toolbarAnnotationsPriceRange",icon:"price-range-drawing",value:"price-range"},{label:"toolbarAnnotationsDatePriceRange",icon:"date-price-range-drawing",value:"date-price-range"}],Rn=[{strokeWidth:1,label:"1",value:1},{strokeWidth:2,label:"2",value:2},{strokeWidth:3,label:"3",value:3},{strokeWidth:4,label:"4",value:4},{strokeWidth:8,label:"8",value:8}],Ln=[{icon:"line-style-solid",altText:"iconAltTextLineStyleSolid",value:"solid"},{icon:"line-style-dashed",altText:"iconAltTextLineStyleDashed",value:"dashed"},{icon:"line-style-dotted",altText:"iconAltTextLineStyleDotted",value:"dotted"}],kn=[{label:"10",value:10},{label:"12",value:12},{label:"14",value:14},{label:"16",value:16},{label:"18",value:18},{label:"22",value:22},{label:"28",value:28},{label:"36",value:36},{label:"46",value:46}],{Color:Pn,FloatingToolbar:Nn,Listeners:On,Menu:_n,PropertiesArray:Fn,ToolbarButtonProperties:Gn,ToolbarButtonWidget:Vn,Property:Bn}=n.n1,Hn=class extends Gn{constructor(){super(...arguments),this.checkedOverrides=new Gn}};a([Bn],Hn.prototype,"value",2),a([Bn],Hn.prototype,"checkedOverrides",2),a([Bn],Hn.prototype,"color",2),a([Bn],Hn.prototype,"strokeWidth",2),a([Bn],Hn.prototype,"isMultiColor",2);var zn=class extends Vn{update(e){super.update(e),"line-stroke-width"===e.value&&this.updateLineStrokeWidth(e),"fill-color"!==e.value&&"line-color"!==e.value&&"text-color"!==e.value||this.updateFillColor(e)}updateFillColor(e){const t=this.getElement();t.classList.add("ag-charts-annotations__color-picker-button"),t.classList.toggle("ag-charts-annotations__color-picker-button--multi-color",e.isMultiColor),t.style.setProperty("--color",e.color??null)}updateLineStrokeWidth(e){const t=this.getElement();t.classList.add("ag-charts-annotations__stroke-width-button"),t.style.setProperty("--stroke-width",`${e.strokeWidth}px`)}},Un=class extends Nn{createButtonWidget(){return new zn(this.localeManager)}},Wn=class extends n.n1.BaseProperties{constructor(e,t){super(),this.ctx=e,this.getActiveDatum=t,this.enabled=!0,this.buttons=new Fn(Hn),this.destroyFns=[],this.events=new On,this.visibleButtons=[],this.toolbar=new Un(this.ctx,"annotation-options"),this.colorPicker=new wn(this.ctx),this.textSizeMenu=new _n(this.ctx,"text-size"),this.lineStyleTypeMenu=new _n(this.ctx,"annotations-line-style-type"),this.lineStrokeWidthMenu=new _n(this.ctx,"annotations-line-stroke-width"),this.destroyFns.push(this.toolbar.addToolbarListener("button-pressed",this.onButtonPress.bind(this)),this.toolbar.addToolbarListener("toolbar-moved",this.onToolbarMoved.bind(this)),e.widgets.seriesWidget.addListener("drag-start",this.onDragStart.bind(this)),e.widgets.seriesWidget.addListener("drag-end",this.onDragEnd.bind(this)),()=>this.colorPicker.destroy())}onDragStart(){this.toolbar.ignorePointerEvents()}onDragEnd(){this.toolbar.capturePointerEvents()}destroy(){for(const e of this.destroyFns)e()}addListener(e,t){return this.events.addListener(e,t)}show(){this.enabled&&this.toolbar.show()}hide(){this.toolbar.hide()}updateButtons(e){if(!this.enabled)return;const t={"line-style-type":hn(e),"line-stroke-width":hn(e),"line-color":dn(e),"text-color":pn(e),"fill-color":un(e),"text-size":cn(e),settings:gn(e),lock:!0,delete:!0};this.visibleButtons=this.buttons.filter(e=>t[e.value]),this.toolbar.clearButtons(),this.toolbar.updateButtons(this.visibleButtons),this.refreshButtons(e)}setAnchorScene(e){this.toolbar.hasBeenDragged()||this.toolbar.setAnchor(e.getAnchor())}hideOverlays(){this.toolbar.clearActiveButton(),this.colorPicker.hide({lastFocus:null}),this.textSizeMenu.hide(),this.lineStyleTypeMenu.hide(),this.lineStrokeWidthMenu.hide(),this.dispatch("hid-overlays")}clearActiveButton(){this.toolbar.clearActiveButton()}updateColors(e){this.updateColorPickerColor("line-color",e.getDefaultColor("line-color"),e.getDefaultOpacity("line-color"),"isMultiColor"in e&&e?.isMultiColor),this.updateColorPickerColor("fill-color",e.getDefaultColor("fill-color"),e.getDefaultOpacity("fill-color"),"isMultiColor"in e&&e?.isMultiColor),this.updateColorPickerColor("text-color",e.getDefaultColor("text-color"),e.getDefaultOpacity("text-color"),"isMultiColor"in e&&e?.isMultiColor)}updateColorPickerColor(e,t,i,n){if(null!=t&&null!=i){const{r:e,g:n,b:s}=Pn.fromString(t);t=Pn.fromArray([e,n,s,i]).toHexString()}this.updateButtonByValue(e,{color:t,isMultiColor:n})}updateFontSize(e){this.updateButtonByValue("text-size",{label:null!=e?String(e):void 0})}updateLineStyleType(e){this.updateButtonByValue("line-style-type",{icon:e.icon})}updateStrokeWidth(e){this.updateButtonByValue("line-stroke-width",{label:e.label,strokeWidth:e.value})}dispatch(e,t){this.events.dispatch(e,t)}onButtonPress({event:e,button:t}){const i=this.getActiveDatum();if(i)switch(this.hideOverlays(),t.value){case"line-style-type":{const t=hn(i)?ni(i.lineDash,i.lineStyle):void 0;this.lineStyleTypeMenu.show({items:Ln,ariaLabel:this.ctx.localeManager.t("toolbarAnnotationsLineStyle"),value:t,sourceEvent:e.sourceEvent,onPress:e=>this.onLineStyleTypeMenuPress(e,i),class:"ag-charts-annotations__line-style-type-menu"});break}case"line-stroke-width":{const t=hn(i)?i.strokeWidth:void 0;this.lineStrokeWidthMenu.show({items:Rn,ariaLabel:this.ctx.localeManager.t("toolbarAnnotationsLineStrokeWidth"),value:t,sourceEvent:e.sourceEvent,onPress:e=>this.onLineStrokeWidthMenuPress(e,i),class:"ag-charts-annotations__line-stroke-width-menu"});break}case"line-color":case"fill-color":case"text-color":this.toolbar.toggleActiveButtonByIndex(t.index),this.colorPicker.show({color:i?.getDefaultColor(t.value),opacity:i?.getDefaultOpacity(t.value),sourceEvent:e.sourceEvent,hasMultiColorOption:"isMultiColor"in i,isMultiColor:"isMultiColor"in i&&i?.isMultiColor,onChange:null!=i?this.onColorPickerChange.bind(this,t.value,i):void 0,onChangeHide:(e=>{this.dispatch("saved-color",{type:i.type,colorPickerType:t.value,color:i.getDefaultColor(e)})}).bind(this,t.value)});break;case"text-size":{const t=an(i)?i.fontSize:void 0;this.textSizeMenu.show({items:kn,ariaLabel:this.ctx.localeManager.t("toolbarAnnotationsTextSize"),value:t,sourceEvent:e.sourceEvent,onPress:e=>this.onTextSizeMenuPress(e,i),class:"ag-charts-annotations__text-size-menu"});break}case"delete":this.dispatch("pressed-delete");break;case"lock":i.locked=!i.locked,this.refreshButtons(i),this.dispatch("pressed-lock");break;case"settings":this.toolbar.toggleActiveButtonByIndex(t.index),this.dispatch("pressed-settings",e)}}onToolbarMoved(e){const{buttonBounds:t,popoverBounds:i}=e,n={x:i.x,y:i.y+i.height+4},s={y:i.y-4};this.colorPicker.setAnchor(n,s);for(const[e,i]of t.entries()){const t=this.visibleButtons.at(e);if(!t)continue;const n={x:i.x,y:i.y+i.height-1},s={y:i.y};switch(t.value){case"line-stroke-width":this.lineStrokeWidthMenu.setAnchor(n,s);break;case"line-style-type":this.lineStyleTypeMenu.setAnchor(n,s);break;case"text-size":this.textSizeMenu.setAnchor(n,s)}}}onColorPickerChange(e,t,i,n,s,r){this.dispatch("updated-color",{type:t.type,colorPickerType:e,colorOpacity:i,color:n,opacity:s,isMultiColor:r}),this.updateColorPickerColor(e,i,s,r)}onTextSizeMenuPress(e,t){if(!cn(t))return;const i=e.value;this.dispatch("updated-font-size",{type:t.type,fontSize:i}),this.textSizeMenu.hide(),this.updateFontSize(i)}onLineStyleTypeMenuPress(e,t){if(!hn(t))return;const i=e.value;this.dispatch("updated-line-style",{type:t.type,lineStyleType:i}),this.lineStyleTypeMenu.hide(),this.updateLineStyleType(e)}onLineStrokeWidthMenuPress(e,t){if(!hn(t))return;const i=e.value;this.dispatch("updated-line-width",{type:t.type,strokeWidth:i}),this.lineStrokeWidthMenu.hide(),this.updateStrokeWidth(e)}refreshButtons(e){const t=e.locked??!1;for(const[e,i]of this.visibleButtons.entries())i&&("lock"===i.value?(this.toolbar.toggleSwitchCheckedByIndex(e,t),this.updateButtonByIndex(e,t?i.checkedOverrides.toJson():i.toJson())):this.toolbar.toggleButtonEnabledByIndex(e,!t));cn(e)&&this.updateFontSize(e.fontSize),this.updateColors(e),this.updateLineStyles(e)}updateLineStyles(e){if(!hn(e))return;const t=e.strokeWidth??1,i=ni(e.lineDash,e.lineStyle);this.updateStrokeWidth({strokeWidth:t,value:t,label:String(t)}),this.updateLineStyleType(Ln.find(e=>e.value===i)??Ln[0])}updateButtonByValue(e,t){const i=this.visibleButtons.findIndex(t=>t.value===e);-1!==i&&this.updateButtonByIndex(i,t)}updateButtonByIndex(e,t){const i=this.visibleButtons.at(e);i&&this.toolbar.updateButtonByIndex(e,{...i.toJson(),...t,value:t.value??i.value})}};a([Bn],Wn.prototype,"enabled",2),a([Bn],Wn.prototype,"buttons",2);var{StateMachine:jn,StateMachineProperty:Kn,Vec2:$n,Debug:Yn}=n.n1,qn=class extends jn{constructor(e){const t=({context:t})=>{this.node?.drag(this.datum,this.offset,t,this.snapping),e.update()};super("idle",{idle:{dragStart:{target:"dragging",action:({offset:e,context:t})=>{this.hasMoved=!1,this.dragStart=e,this.offset=e,this.node?.dragStart(this.datum,e,t)}}},dragging:{keyDown:t,keyUp:t,drag:({offset:t,context:i})=>{this.hasMoved=$n.lengthSquared($n.sub(t,this.dragStart))>0,this.offset=t,this.node?.drag(this.datum,t,i,this.snapping),e.update()},dragEnd:{target:jn.parent,action:()=>{this.node?.stopDragging(),this.hasMoved&&e.recordAction("Move annotation"),e.update()}}}}),this.debug=Yn.create(!0,"annotations"),this.hasMoved=!1,this.snapping=!1}};a([Kn()],qn.prototype,"snapping",2),a([Kn()],qn.prototype,"datum",2),a([Kn()],qn.prototype,"node",2);var{Property:Xn}=n.n1,Zn=class extends Pi{constructor(){super(...arguments),this.type="arrow-down"}static is(e){return(0,s.Gv)(e)&&"arrow-down"===e.type}};a([Xn],Zn.prototype,"type",2);var Qn=class e extends n.n1.Group{constructor(){super(...arguments),this.active=!1,this.locked=!1,this.visible=!1,this.zIndex=1}drag(e){const{handle:t,locked:i}=this;return i?{point:{x:t.x,y:t.y},offset:{x:0,y:0}}:{point:e,offset:{x:e.x-t.x,y:e.y-t.y}}}toggleActive(t){this.active=t,t||(this.handle.strokeWidth=e.INACTIVE_STROKE_WIDTH)}toggleHovered(e){this.glow.visible=!this.locked&&e,this.glow.dirtyPath=!0}toggleDragging(e){this.locked||(this.handle.visible=!e,this.glow.visible=this.glow.visible&&!e,this.handle.dirtyPath=!0,this.glow.dirtyPath=!0)}toggleLocked(e){this.locked=e}getCursor(){}containsPoint(e,t){return this.handle.containsPoint(e,t)}};Qn.INACTIVE_STROKE_WIDTH=2;var Jn=Qn,es=class e extends Jn{constructor(){super(),this.handle=new n.n1.Marker({shape:"circle"}),this.glow=new n.n1.Marker({shape:"circle"}),this.append([this.handle]),this.handle.size=e.HANDLE_SIZE,this.handle.strokeWidth=Jn.INACTIVE_STROKE_WIDTH,this.handle.zIndex=2}update(e){this.handle.setProperties({...e,strokeWidth:Jn.INACTIVE_STROKE_WIDTH})}drag(e){return{point:e,offset:{x:0,y:0}}}};es.HANDLE_SIZE=7,es.GLOW_SIZE=9;var ts=es,is=class e extends Jn{constructor(){super(),this.handle=new n.n1.Rect,this.glow=new n.n1.Rect,this.gradient="horizontal",this.append([this.glow,this.handle]),this.handle.cornerRadius=e.CORNER_RADIUS,this.handle.width=e.HANDLE_SIZE,this.handle.height=e.HANDLE_SIZE,this.handle.strokeWidth=Jn.INACTIVE_STROKE_WIDTH,this.handle.zIndex=2,this.glow.cornerRadius=e.CORNER_RADIUS,this.glow.width=e.GLOW_SIZE,this.glow.height=e.GLOW_SIZE,this.glow.strokeWidth=0,this.glow.fillOpacity=.2,this.glow.zIndex=1,this.glow.visible=!1}toggleLocked(t){if(super.toggleLocked(t),t){const t=(e.HANDLE_SIZE-ts.HANDLE_SIZE)/2;this.handle.cornerRadius=1,this.handle.fill=this.handle.stroke,this.handle.strokeWidth=0,this.handle.x+=t,this.handle.y+=t,this.handle.width=ts.HANDLE_SIZE,this.handle.height=ts.HANDLE_SIZE,this.glow.width=ts.GLOW_SIZE,this.glow.height=ts.GLOW_SIZE}else this.handle.cornerRadius=e.CORNER_RADIUS,this.handle.width=e.HANDLE_SIZE,this.handle.height=e.HANDLE_SIZE,this.glow.width=e.GLOW_SIZE,this.glow.height=e.GLOW_SIZE,this.cachedStyles&&this.handle.setProperties(this.cachedStyles)}update(t){if(this.cachedStyles={...t},this.active||delete t.strokeWidth,this.locked){delete t.fill,delete t.strokeWidth;const i=(e.HANDLE_SIZE-ts.HANDLE_SIZE)/2;t.x-=i,t.y-=i,this.cachedStyles.x-=i,this.cachedStyles.y-=i}this.handle.setProperties(t),this.glow.setProperties({...t,x:(t.x??this.glow.x)-2,y:(t.y??this.glow.y)-2,strokeWidth:0,fill:t.stroke})}drag(e){return this.locked?{point:e,offset:{x:0,y:0}}:"vertical"===this.gradient?{point:{x:e.x,y:this.handle.y},offset:{x:e.x-this.handle.x,y:0}}:{point:{x:this.handle.x,y:e.y},offset:{x:0,y:e.y-this.handle.y}}}getCursor(){if(!this.locked)return"vertical"===this.gradient?"col-resize":"row-resize"}};is.HANDLE_SIZE=12,is.GLOW_SIZE=16,is.CORNER_RADIUS=4;var ns=is,ss=class e extends Jn{constructor(){super(),this.handle=new n.n1.Marker({shape:"circle"}),this.glow=new n.n1.Marker({shape:"circle"}),this.append([this.glow,this.handle]),this.handle.size=e.HANDLE_SIZE,this.handle.strokeWidth=Jn.INACTIVE_STROKE_WIDTH,this.handle.zIndex=2,this.glow.size=e.GLOW_SIZE,this.glow.strokeWidth=0,this.glow.fillOpacity=.2,this.glow.zIndex=1,this.glow.visible=!1}toggleLocked(t){super.toggleLocked(t),t?(this.handle.fill=this.handle.stroke,this.handle.strokeWidth=0,this.handle.size=ts.HANDLE_SIZE,this.glow.size=ts.GLOW_SIZE):(this.handle.size=e.HANDLE_SIZE,this.glow.size=e.GLOW_SIZE,this.cachedStyles&&this.handle.setProperties(this.cachedStyles))}update(e){this.cachedStyles={...e},this.active||delete e.strokeWidth,this.locked&&(delete e.fill,delete e.strokeWidth),this.handle.setProperties(e),this.glow.setProperties({...e,strokeWidth:0,fill:e.stroke})}getCursor(){return"pointer"}};ss.HANDLE_SIZE=11,ss.GLOW_SIZE=17;var rs=ss,{ZIndexMap:os}=n.n1,as=class extends n.n1.Group{constructor(){super(...arguments),this.name="AnnotationScene",this.zIndex=os.CHART_ANNOTATION}static isCheck(e,t){return(0,s.Gv)(e)&&Object.hasOwn(e,"type")&&e.type===t}toggleHovered(e){this.toggleHandles(e)}*nonHandleChildren(){for(const e of this.children())e instanceof Jn||(yield e)}computeBBoxWithoutHandles(){return n.n1.Transformable.toCanvas(this,n.n1.Group.computeChildrenBBox(this.nonHandleChildren()))}updateNode(e,t,i){if(i||!t)return i&&null==t&&(t=new e,this.appendChild(t)),t;this.removeChild(t)}},{ContinuousScale:ls,Vec2:cs,toRadians:hs}=n.n1;function ds(e,t,i=!1,n,s=1){return Bt(i?us(e,n?Gt(n,t):cs.origin(),s):e,t)}function us(e,t,i){const n=cs.sub(e,t),s=hs(i),r=Math.round(cs.angle(n)/s)*s;return cs.rotate(n,r,t)}function ps(e,t){const i={};for(const[n,r]of(0,s.jO)(e))i[n]=Gt(r,t);return i}function gs(e,t,i,n={overflowContinuous:0,translateVectors:void 0,invertYVectors:void 0,snap:void 0}){const{xAxis:s,yAxis:r}=i,o=Object.keys(e),a=[],l=[],c=new Set(n.translateVectors??o),h=new Set(n.invertYVectors??[]),d=new Set([...c,...h]),u=cs.multiply(t,cs.from(1,-1));for(const i of o)d.has(i)&&(e[i]=cs.add(e[i],h.has(i)?u:t),n.snap&&(e[i]=us(e[i],n.snap.vectors[i],n.snap.angle))),a.push(s.getRangeOverflow(e[i].x)),l.push(r.getRangeOverflow(e[i].y));const p=(e,t)=>Math.abs(e)-Math.abs(t),g=(e,t,i)=>0!==n.overflowContinuous&&ls.is(e)?o.length===d.size?i.toSorted(p).at(-n.overflowContinuous-1)??0:i.filter(e=>0!==e).length<=n.overflowContinuous?0:i.filter((e,i)=>0!==e&&Math.abs(e)<=Math.abs(t)&&d.has(o[i])).toSorted(p).at(-1)??0:i.toSorted(p).at(-1)??0,f=cs.from(g(s.scale,t.x,a),g(r.scale,t.y,l));if(!cs.equal(f,cs.origin()))for(const t of o)d.has(t)&&(e[t]=cs.round(cs.sub(e[t],f),4));const m={};for(const t of o)m[t]=Bt(e[t],i);return m}var{Vec2:fs}=n.n1,ms=class extends as{constructor(){super(...arguments),this.handle=new rs,this.anchor={x:0,y:0,position:"above"}}update(e,t){const i=Gt(e,t);this.updateHandle(e,i),this.anchor=this.updateAnchor(e,i,t)}dragStart(e,t,i){this.dragState={offset:t,...ps({handle:e},i)}}drag(e,t,i){const{dragState:n}=this;if(e.locked||!n)return;const{point:s}=gs({point:n.handle},fs.sub(t,n.offset),i);e.x=s.x,e.y=s.y}translate(e,t,i){if(e.locked)return;const{point:n}=gs({point:Gt(e,i)},t,i);e.x=n.x,e.y=n.y}toggleHandles(e){this.handle.visible=Boolean(e),this.handle.toggleHovered("handle"===this.activeHandle)}toggleActive(e){this.toggleHandles(e),this.handle.toggleActive(e)}stopDragging(){this.handle.toggleDragging(!1)}copy(e,t,i){const n=Gt(e,i),s=Bt({x:n.x-30,y:n.y-30},i);return t.x=s.x,t.y=s.y,t}getAnchor(){return this.anchor}getCursor(){return"pointer"}containsPoint(e,t){const{handle:i}=this;return this.activeHandle=void 0,!!i.containsPoint(e,t)&&(this.activeHandle="handle",!0)}getNodeAtCoords(e,t){if(this.handle.containsPoint(e,t))return"handle"}updateHandle(e,t,i){const{x:n,y:s}=this.getHandleCoords(e,t,i),r=this.getHandleStyles(e);this.handle.update({...r,x:n,y:s}),this.handle.toggleLocked(e.locked??!1)}updateAnchor(e,t,i){const n=this.getHandleCoords(e,t);return{x:n.x+i.seriesRect.x,y:n.y+i.seriesRect.y,position:this.anchor.position}}getHandleCoords(e,t,i){return{x:t.x,y:t.y}}getHandleStyles(e){return{fill:e.handle.fill,stroke:e.handle.stroke,strokeOpacity:e.handle.strokeOpacity,strokeWidth:e.handle.strokeWidth}}},vs=class extends ms{constructor(){super(),this.append([this.handle])}update(e,t){super.update(e,t);const i=Gt(e,t);this.updateShape(e,i)}updateShape(e,t){this.updateShapeStyles(e),this.updateShapePath(e,t)}updateShapeStyles(e){const{shape:t}=this;t.fill=e.fill,t.fillOpacity=e.fillOpacity??1}updateShapePath(e,t){const{shape:i}=this;i.x=t.x,i.y=t.y,i.size=e.size}containsPoint(e,t){return super.containsPoint(e,t)||this.shape.containsPoint(e,t)}getNodeAtCoords(e,t){return this.shape.containsPoint(e,t)?"shape":super.getNodeAtCoords(e,t)}},ys=[[.5,0],[1,.5],[.75,.5],[.75,1],[.25,1],[.25,.5],[0,.5]];function Cs(e){n.n1.drawMarkerUnitPolygon(e,ys)}Cs.anchor={x:.5,y:0};var bs=class extends vs{constructor(){super(),this.type="arrow-up",this.shape=new n.n1.Marker({shape:Cs}),this.append([this.shape])}static is(e){return as.isCheck(e,"arrow-up")}getHandleCoords(e,t){const i=rs.HANDLE_SIZE/2,n=super.getHandleCoords(e,t);return n.y-=i,n}},Ss=ys.map(([e,t])=>[e,1-t]);function ws(e){n.n1.drawMarkerUnitPolygon(e,Ss)}ws.anchor={x:.5,y:1};var xs=class extends vs{constructor(){super(),this.type="arrow-down",this.shape=new n.n1.Marker({shape:ws}),this.append([this.shape])}static is(e){return as.isCheck(e,"arrow-down")}updateAnchor(e,t,i){const n=super.updateAnchor(e,t,i);return n.y-=e.size,n}getHandleCoords(e,t){const i=rs.HANDLE_SIZE/2,n=super.getHandleCoords(e,t);return n.y+=i,n}},{StateMachine:Es,StateMachineProperty:Ms,Debug:As}=n.n1,Ts=class extends Es{constructor(e){const t=({point:t})=>{const i=this.createDatum();i.set({x:t.x,y:t.y}),e.create(i)};super("start",{start:{click:{target:"waiting-first-render",action:t},drag:{target:"waiting-first-render",action:t},cancel:Es.parent,reset:Es.parent},"waiting-first-render":{render:{target:Es.parent,action:()=>{this.node?.toggleActive(!0),e.showAnnotationOptions(),e.update()}}}}),this.debug=As.create(!0,"annotations")}};a([Ms()],Ts.prototype,"node",2);var Ds=class extends Ts{createDatum(){return new Zn}},Is={type:"arrow-down",datum:Zn,scene:xs,isDatum:Zn.is,translate:(e,t,i,n)=>{Zn.is(t)&&xs.is(e)&&e.translate(t,i,n)},copy:(e,t,i,n)=>{if(Zn.is(t)&&Zn.is(i)&&xs.is(e))return e.copy(t,i,n)},update:(e,t,i)=>{Zn.is(t)&&xs.is(e)&&e.update(t,i)},createState:(e,{createDatum:t})=>new Ds({...e,create:t("arrow-down")}),dragState:e=>new qn(e)},{Property:Rs}=n.n1,Ls=class extends Pi{constructor(){super(...arguments),this.type="arrow-up"}static is(e){return(0,s.Gv)(e)&&"arrow-up"===e.type}};a([Rs],Ls.prototype,"type",2);var ks=class extends Ts{createDatum(){return new Ls}},Ps={type:"arrow-up",datum:Ls,scene:bs,isDatum:Ls.is,translate:(e,t,i,n)=>{Ls.is(t)&&bs.is(e)&&e.translate(t,i,n)},copy:(e,t,i,n)=>{if(Ls.is(t)&&Ls.is(i)&&bs.is(e))return e.copy(t,i,n)},update:(e,t,i)=>{Ls.is(t)&&bs.is(e)&&e.update(t,i)},createState:(e,{createDatum:t})=>new ks({...e,create:t("arrow-up")}),dragState:e=>new qn(e)},{Vec2:Ns,Vec4:Os}=n.n1,_s=class extends as{constructor(){super(...arguments),this.overflowContinuous=0}extendLine({x1:e,y1:t,x2:i,y2:n},s,r){const o={x1:e,y1:t,x2:i,y2:n};if(!s.extendStart&&!s.extendEnd)return o;const[a,l]=function(e,t){const[i,n]=ii.from(e),s=t.height,r=ii.gradient(n,i,s),o=ii.intercept(n,r,s),a=[{x:i.x,y:s??0},{x:i.x,y:null==s?t.height:s-t.height}];if(r===1/0)return a;let l=[ii.intersectAtY(r,o,0,s),ii.intersectAtY(r,o,t.height,s),ii.intersectAtX(r,o,0,s),ii.intersectAtX(r,o,t.width,s)];return l=l.filter(e=>e.x>=t.x&&e.x<=t.width&&e.y>=t.y&&e.y<=t.height).sort((e,t)=>e.x===t.x?0:e.x<t.x?-1:1),2!==l.length?a:l}(o,r.yAxis.bounds),c=o.x2<o.x1,h=o.y1>=o.y2,d=o.x2===o.x1;return s.extendEnd&&(d?o.y2=h?l.y:a.y:(o.x2=c?a.x:l.x,o.y2=c?a.y:l.y)),s.extendStart&&(d?o.y1=h?a.y:l.y:(o.x1=c?l.x:a.x,o.y1=c?l.y:a.y)),o}dragStart(e,t,i){this.dragState={offset:t,...ps({start:e.start,end:e.end},i)}}drag(e,t,i,n){e.locked||(this.activeHandle?this.dragHandle(e,t,i,n):this.dragAll(e,t,i))}dragAll(e,t,i){const{dragState:n}=this;n&&this.translatePoints(e,n.start,n.end,Ns.sub(t,n.offset),i)}translate(e,t,i){e.locked||this.translatePoints(e,Gt(e.start,i),Gt(e.end,i),t,i)}copy(e,t,i){const n=Ft(e,i);if(!n)return;const s=this.computeBBoxWithoutHandles(),r={x:-s.width/2,y:-s.height/2};return this.translatePoints(t,Os.start(n),Os.end(n),r,i),t}translatePoints(e,t,i,n,s){const r=gs(this.getTranslatePointsVectors(t,i),n,s,{overflowContinuous:this.overflowContinuous});e.start.x=r.start.x,e.end.x=r.end.x,e.start.y=r.start.y,e.end.y=r.end.y}getTranslatePointsVectors(e,t){return{start:e,end:t}}},{Vec2:Fs,Vec4:Gs}=n.n1,Vs=class extends _s{constructor(){super(...arguments),this.start=new rs,this.end=new rs,this.anchor={x:0,y:0,position:"above"}}update(e,t){const i=Ft(e,t);null!=i&&(this.updateHandles(e,i),this.updateAnchor(e,i,t))}toggleHandles(e){if("boolean"==typeof e)this.start.visible=e,this.end.visible=e;else for(const[t,i]of(0,s.jO)(e))this[t].visible=i;this.start.toggleHovered("start"===this.activeHandle),this.end.toggleHovered("end"===this.activeHandle)}toggleActive(e){this.toggleHandles(e),this.start.toggleActive(e),this.end.toggleActive(e)}dragHandle(e,t,i,n){const{activeHandle:s,dragState:r}=this;if(!s||!r)return;this[s].toggleDragging(!0);const o="start"===s?"end":"start",a=n?{vectors:{[s]:Gt(e[o],i)},angle:e.snapToAngle}:void 0,{[s]:l}=gs({[s]:r[s]},Fs.sub(t,r.offset),i,{overflowContinuous:0,snap:a});e[s].x=l.x,e[s].y=l.y}stopDragging(){this.start.toggleDragging(!1),this.end.toggleDragging(!1)}getAnchor(){return this.anchor}getCursor(){return"pointer"}containsPoint(e,t){const{start:i,end:n}=this;return this.activeHandle=void 0,i.containsPoint(e,t)?(this.activeHandle="start",!0):!!n.containsPoint(e,t)&&(this.activeHandle="end",!0)}getNodeAtCoords(e,t){if(this.start.containsPoint(e,t)||this.end.containsPoint(e,t))return"handle"}updateHandles(e,t,i){this.start.update({...this.getHandleStyles(e,"start"),...this.getHandleCoords(e,t,"start")}),this.end.update({...this.getHandleStyles(e,"end"),...this.getHandleCoords(e,t,"end",i)}),this.start.toggleLocked(e.locked??!1),this.end.toggleLocked(e.locked??!1)}updateAnchor(e,t,i,n){this.anchor={x:t.x1+i.seriesRect.x,y:t.y1+i.seriesRect.y,position:this.anchor.position}}getHandleCoords(e,t,i,n){return"start"===i?Gs.start(t):Gs.end(t)}getHandleStyles(e,t){return{fill:e.handle.fill,stroke:e.handle.stroke,strokeOpacity:e.handle.strokeOpacity,strokeWidth:e.handle.strokeWidth}}},{Vec4:Bs}=n.n1,Hs=class extends Vs{constructor(){super(...arguments),this.label=new n.n1.Text({zIndex:1}),this.anchor={x:0,y:0,position:"above-left"}}setTextInputBBox(e){this.textInputBBox=e,this.markDirty("TextualStartEndScene")}update(e,t){const i=Ft(e,t);if(null==i)return;const n=this.getTextBBox(e,i);this.updateLabel(e,n,i),this.updateHandles(e,i,n),this.updateShape(e,n,i),this.updateAnchor(e,i,t,n)}containsPoint(e,t){return super.containsPoint(e,t)||this.label.containsPoint(e,t)}getNodeAtCoords(e,t){return this.label.containsPoint(e,t)?"text":super.getNodeAtCoords(e,t)}getTextBBox(e,t){const{text:i}=e.getText();return Mi(e,i,Bs.end(t),this.textInputBBox)}updateLabel(e,t,i){const{text:n,isPlaceholder:s}=e.getText();Ai(this.label,n,s,e,this.getLabelCoords(e,t,i))}updateShape(e,t,i){}getLabelCoords(e,t,i){return Bs.end(i)}getHandleStyles(e,t){return{...super.getHandleStyles(e,t),stroke:e.handle.stroke??e.color}}},{drawCorner:zs,Path:Us}=n.n1,Ws=class extends Hs{constructor(){super(),this.type="callout",this.shape=new Us,this.append([this.shape,this.label,this.start,this.end])}static is(e){return as.isCheck(e,"callout")}drag(e,t,i,n){e.locked||("end"===this.activeHandle?this.dragHandle(e,t,i,n):this.dragAll(e,t,i))}getLabelCoords(e,t,i){const n=e.getPadding(),{bodyBounds:s={x:0,y:0,width:0,height:0}}=this.getDimensions(e,t,i)??{};return{x:s.x+n.left,y:s.y-n.bottom}}getHandleStyles(e,t){return"start"===t?{fill:e.handle.fill,stroke:e.handle.stroke??e.stroke,strokeOpacity:e.handle.strokeOpacity,strokeWidth:e.handle.strokeWidth}:{fill:void 0,strokeWidth:0}}updateAnchor(e,t,i,n){const{bodyBounds:s}=this.getDimensions(e,n,t)??{},r=s??n;this.anchor={x:r.x+i.seriesRect.x,y:r.y+i.seriesRect.y-r.height,position:this.anchor.position}}updateShape(e,t,i){const{shape:n}=this;n.fill=e.fill,n.fillOpacity=e.fillOpacity??1,n.stroke=e.stroke,n.strokeWidth=e.strokeWidth??1,n.strokeOpacity=e.strokeOpacity??1;const{tailPoint:s,bodyBounds:r}=this.getDimensions(e,t,i)??{};s&&r&&this.updatePath(s,r)}updatePath(e,t){const{x:i,y:n}=e,{x:s,y:r,width:o,height:a}=t,l=r-a,c=s+o,h=this.calculateCalloutPlacement({x:i,y:n},t),d=[{coordinates:{x0:s,x1:s+8,y0:l+8,y1:l,cx:"topLeft"===h?i:s+8,cy:"topLeft"===h?n:l+8},type:"topLeft"===h?"calloutCorner":"corner"},{coordinates:{x0:s+8,x1:c-8,y0:l,y1:l,cx:i,cy:n},type:"top"===h?"calloutSide":"side"},{coordinates:{x0:c-8,x1:c,y0:l,y1:l+8,cx:"topRight"===h?i:c-8,cy:"topRight"===h?n:l+8},type:"topRight"===h?"calloutCorner":"corner"},{coordinates:{x0:c,x1:c,y0:l+8,y1:r-8,cx:i,cy:n},type:"right"===h?"calloutSide":"side"},{coordinates:{x0:c,x1:c-8,y0:r-8,y1:r,cx:"bottomRight"===h?i:c-8,cy:"bottomRight"===h?n:r-8},type:"bottomRight"===h?"calloutCorner":"corner"},{coordinates:{x0:c-8,x1:s+8,y0:r,y1:r,cx:i,cy:n},type:"bottom"===h?"calloutSide":"side"},{coordinates:{x0:s+8,x1:s,y0:r,y1:r-8,cx:"bottomLeft"===h?i:s+8,cy:"bottomLeft"===h?n:r-8},type:"bottomLeft"===h?"calloutCorner":"corner"},{coordinates:{x0:s,x1:s,y0:r-8,y1:l+8,cx:i,cy:n},type:"left"===h?"calloutSide":"side"}],{path:u}=this.shape;u.clear(),u.moveTo(s,l+8),d.forEach(({coordinates:e,type:t})=>{this.drawPath(u,e,8,t)}),u.closePath()}drawPath(e,{x0:t,y0:i,x1:n,y1:s,cx:r,cy:o},a,l){switch(l){case"calloutCorner":e.lineTo(r,o),e.lineTo(n,s);break;case"corner":zs(e,{x0:t,x1:n,y0:i,y1:s,cx:r,cy:o},a,!1);break;case"calloutSide":if(t!==n){const a=t>n?-1:1,l=Math.min(t,n)+Math.abs(n-t)/2;e.lineTo(l-6*a,i),e.lineTo(r,o),e.lineTo(l+6*a,i),e.lineTo(n,s)}else{const a=i>s?-1:1,l=Math.min(i,s)+Math.abs(i-s)/2;e.lineTo(t,l-6*a),e.lineTo(r,o),e.lineTo(t,l+6*a),e.lineTo(n,s)}break;default:e.lineTo(n,s)}}calculateCalloutPlacement(e,t){const i=t.x+t.width,n=t.y-t.height;let s,r;return e.x>i?s="right":e.x<t.x&&(s="left"),e.y>t.y?r="bottom":e.y<n&&(r="top"),s&&r?`${r}${s[0].toUpperCase()}${s.substring(1)}`:r??s}getDimensions(e,t,i){const{fontSize:n}=e,s=e.getPadding(),r=s.left+s.right,o=s.top+s.bottom,a=t.width+r,l=Math.max(t.height+o,n+o);return{tailPoint:{x:i.x1,y:i.y1},bodyBounds:{x:t.x,y:t.y,width:a,height:l}}}containsPoint(e,t){const{start:i,end:n,shape:s}=this;if(this.activeHandle=void 0,i.containsPoint(e,t))return this.activeHandle="start",!0;const r=n.containsPoint(e,t)||s.containsPoint(e,t);return r&&(this.activeHandle="end"),r}};function js({key:e}){return"Escape"===e}function Ks({key:e,shiftKey:t}){return!t&&"Enter"===e}var{StateMachine:$s,StateMachineProperty:Ys,Debug:qs}=n.n1,Xs=class extends $s{constructor(e){const t=({point:t})=>{const i=this.createDatum();i.set({start:t,end:t,visible:!0}),e.create(i)},i=({point:t})=>{const{datum:i,node:n}=this;i?.set({end:t}),n?.toggleActive(!0),n?.toggleHandles({end:!1}),e.update()},n=()=>{e.showAnnotationOptions(),this.node?.toggleHandles({end:!0})},s=()=>{e.delete()},r=({textInputValue:t,bbox:i})=>{const{datum:n}=this;if(null!=i&&null!=t&&t.length>0){if(!an(n))return;const s=Ei(n,t,i.width);n?.set({text:s}),e.update(),e.recordAction(`Create ${n?.type} annotation`)}else e.delete()};super("start",{start:{click:{target:"waiting-first-render",action:t},dragStart:{target:"waiting-first-render",action:t},cancel:$s.parent,reset:$s.parent},"waiting-first-render":{render:{target:"end",action:()=>{const{node:e}=this;e?.toggleActive(!0),e?.toggleHandles({start:!0})}}},end:{hover:i,drag:i,click:{target:"edit",action:n},dragEnd:{target:"edit",action:n},reset:{target:$s.parent,action:s},cancel:{target:$s.parent,action:s}},edit:{onEnter:()=>{e.showTextInput(),this.datum&&(this.datum.visible=!1)},updateTextInputBBox:t=>{this.node?.setTextInputBBox(t),e.update()},color:({colorPickerType:t,colorOpacity:i,color:n,opacity:s,isMultiColor:r})=>{const{datum:o}=this;o&&("text-color"===t&&e.updateTextInputColor(n),vn(o,t,i,n,s,r),e.update())},fontSize:t=>{const{datum:i,node:n}=this;i&&n&&an(i)&&(i.fontSize=t,e.updateTextInputFontSize(t),e.update())},textInput:[{guard:js,target:$s.parent,action:s},{guard:Ks,target:$s.parent,action:r}],click:{target:$s.parent,action:r},dragStart:{target:$s.parent,action:r},resize:{target:$s.parent,action:r},onExit:()=>{e.hideTextInput(),this.datum&&(this.datum.visible=!0),e.deselect()},cancel:{target:$s.parent,action:s}}}),this.debug=qs.create(!0,"annotations")}};a([Ys()],Xs.prototype,"datum",2),a([Ys()],Xs.prototype,"node",2);var Zs=class extends Xs{createDatum(){return new qt}},Qs={type:"callout",datum:qt,scene:Ws,isDatum:qt.is,translate:(e,t,i,n)=>{if(qt.is(t)&&Ws.is(e))return e.translate(t,i,n)},copy:(e,t,i,n)=>{if(qt.is(t)&&qt.is(i)&&Ws.is(e))return e.copy(t,i,n)},update:(e,t,i)=>{qt.is(t)&&Ws.is(e)&&e.update(t,i)},createState:(e,{createDatum:t})=>new Zs({...e,create:t("callout")}),dragState:e=>new qn(e)},Js=class extends ms{constructor(){super(...arguments),this.label=new n.n1.Text({zIndex:1}),this.anchor={x:0,y:0,position:"above-left"}}setTextInputBBox(e){this.textInputBBox=e,this.markDirty("TextualPointScene")}update(e,t){const i=Gt(e,t),n=this.getTextBBox(e,i,t);this.updateLabel(e,n),this.updateHandle(e,i,n),this.updateShape(e,n),this.anchor=this.updateAnchor(e,n,t)}copy(e,t,i){const n=Gt(e,i),s=this.getTextBBox(e,n,i),r=e.getPadding(),o=r.left+r.right,a=r.top+r.bottom,l=(s.width+o)/2,c=s.height+a,h=Bt({x:n.x-l,y:n.y-c},i);return t.x=h.x,t.y=h.y,t}containsPoint(e,t){const{label:i}=this;return super.containsPoint(e,t)||i.visible&&i.containsPoint(e,t)}getNodeAtCoords(e,t){return this.label.visible&&this.label.containsPoint(e,t)?"text":super.getNodeAtCoords(e,t)}getTextBBox(e,t,i){const{text:n}=e.getText();return Mi(e,n,{x:t.x,y:t.y},this.textInputBBox)}updateLabel(e,t){const{text:i,isPlaceholder:n}=e.getText();Ai(this.label,i,n,e,this.getLabelCoords(e,t),this.getTextBaseline(e))}updateShape(e,t){}updateAnchor(e,t,i){return{x:t.x+i.seriesRect.x,y:t.y+i.seriesRect.y-t.height,position:this.anchor.position}}getLabelCoords(e,t){return t}getTextBaseline(e){return"center"==e.position?"middle":e.position}getHandleCoords(e,t,i){return i}getHandleStyles(e){const t=super.getHandleStyles(e);return t.stroke=e.handle.stroke??e.color,t}},{drawCorner:er}=n.n1,tr=class extends Js{constructor(){super(),this.type="comment",this.shape=new n.n1.Path,this.append([this.shape,this.label,this.handle])}static is(e){return as.isCheck(e,"comment")}updateShape(e,t){const{shape:i}=this;i.fill=e.fill,i.fillOpacity=e.fillOpacity??1,i.stroke=e.stroke??"transparent",i.strokeWidth=e.strokeWidth??1,i.strokeOpacity=e.strokeOpacity??1,this.updatePath(e,t)}getLabelCoords(e,t){const i=e.getPadding();return{x:t.x+i.left,y:t.y-i.bottom}}getHandleStyles(e){return{fill:e.handle.fill,stroke:e.handle.stroke??e.stroke??e.fill,strokeOpacity:e.handle.strokeOpacity,strokeWidth:e.handle.strokeWidth}}updateAnchor(e,t,i){const n=super.updateAnchor(e,t,i),s=e.getPadding();return n.y-=s.bottom+s.top,n}updatePath(e,t){const i=e.getPadding(),{x:n,y:s}=t;let{width:r,height:o}=t;const{fontSize:a}=e,l=i.left+i.right,c=i.top+i.bottom;r+=l,o=Math.max(o+c,a+c);const h=s-o,d=n+r,u=(a*wi+c)/2,{path:p}=this.shape;p.clear(),p.moveTo(n,s),p.lineTo(n,h+u),er(p,{x0:n,x1:n+u,y0:h+u,y1:h,cx:n+u,cy:h+u},u,!1),p.lineTo(d-u,h),er(p,{x0:d-u,x1:d,y0:h,y1:h+u,cx:d-u,cy:h+u},u,!1),p.lineTo(d,s-u),er(p,{x0:d,x1:d-u,y0:s-u,y1:s,cx:d-u,cy:s-u},u,!1),p.closePath()}containsPoint(e,t){return super.containsPoint(e,t)||this.shape.containsPoint(e,t)}},{StateMachine:ir,StateMachineProperty:nr,Debug:sr}=n.n1,rr=class extends ir{constructor(e){const t=({point:t})=>{const i=this.createDatum();i.set({x:t.x,y:t.y}),e.create(i)},i=()=>{e.delete()},n=({textInputValue:t,bbox:i})=>{if(null!=i&&null!=t&&t.length>0){const{datum:n}=this;if(!an(n))return;const s=Ei(n,t,i.width);n?.set({text:s}),e.update(),e.recordAction(`Create ${n?.type} annotation`)}else e.delete()};super("start",{start:{click:{target:"waiting-first-render",action:t},dragStart:{target:"waiting-first-render",action:t},cancel:ir.parent,reset:ir.parent},"waiting-first-render":{render:{target:"edit",action:()=>{this.node?.toggleActive(!0),e.showAnnotationOptions(),e.update()}}},edit:{onEnter:()=>{e.showTextInput(),this.datum&&(this.datum.visible=!1)},updateTextInputBBox:t=>{this.node?.setTextInputBBox(t),e.update()},color:({colorPickerType:t,colorOpacity:i,color:n,opacity:s,isMultiColor:r})=>{this.datum&&("text-color"===t&&e.updateTextInputColor(n),vn(this.datum,t,i,n,s,r),e.update())},fontSize:t=>{const{datum:i,node:n}=this;i&&n&&an(i)&&(i.fontSize=t,e.updateTextInputFontSize(t),e.update())},textInput:[{guard:js,target:ir.parent,action:i},{guard:Ks,target:ir.parent,action:n}],click:{target:ir.parent,action:n},dragStart:{target:ir.parent,action:n},resize:{target:ir.parent,action:n},onExit:()=>{e.hideTextInput(),this.datum&&(this.datum.visible=!0),e.deselect()},cancel:{target:ir.parent,action:i}}}),this.debug=sr.create(!0,"annotations")}};a([nr()],rr.prototype,"datum",2),a([nr()],rr.prototype,"node",2);var or=class extends rr{createDatum(){return new ti}},ar={type:"comment",datum:ti,scene:tr,isDatum:ti.is,translate:(e,t,i,n)=>{ti.is(t)&&tr.is(e)&&e.translate(t,i,n)},copy:(e,t,i,n)=>{if(ti.is(t)&&ti.is(i)&&tr.is(e))return e.copy(t,i,n)},update:(e,t,i)=>{ti.is(t)&&tr.is(e)&&e.update(t,i)},createState:(e,{createDatum:t})=>new or({...e,create:t("comment")}),dragState:e=>new qn(e)},{calculateLabelTranslation:lr,ChartAxisDirection:cr}=n.n1,hr=class extends n.n1.Group{constructor(){super({name:"AnnotationAxisLabelGroup"}),this.label=new n.n1.Text({zIndex:1}),this.rect=new n.n1.Rect;const{label:e}=this;e.fontSize=12,e.fontFamily="Verdana, sans-serif",e.fill="black",e.textBaseline="middle",e.textAlign="center",this.append([this.rect,this.label])}update(e){this.updateLabel(e),this.updateRect(e),this.updatePosition(e)}updateLabel({value:e,styles:t,context:i}){const{fontWeight:n,fontSize:s,fontStyle:r,fontFamily:o,textAlign:a,color:l="white",formatter:c}=t,h=c?c({value:e}):i.scaleValueFormatter()(e);this.label.setProperties({fontWeight:n,fontSize:s,fontStyle:r,fontFamily:o,textAlign:a,fill:l,text:h})}updateRect({styles:e}){const{rect:t}=this,{cornerRadius:i,fill:n,fillOpacity:s,stroke:r,strokeOpacity:o}=e;t.setProperties({cornerRadius:i,fill:n,fillOpacity:s,stroke:r,strokeOpacity:o})}updatePosition({x:e,y:t,context:i,styles:{padding:n}}){const{label:s,rect:r}=this,o=s.getBBox()?.clone(),a=n??8,l=n??5;o.grow(a,"horizontal"),o.grow(l,"vertical");const c=i.direction===cr.X?Math.round(l/2):a,{xTranslation:h,yTranslation:d}=lr({yDirection:!0,padding:i.labelPadding-c,position:i.position??"left",bbox:o}),u=e+h,p=t+d;s.x=u,s.y=p,r.y=p-Math.round(o.height/2),r.x=u-Math.round(o.width/2),r.height=o.height,r.width=o.width}};hr.className="AxisLabel";var{Vec2:dr}=n.n1,ur=class extends n.n1.Line{constructor(){super(...arguments),this.growCollisionBox=9,this.clipMask=new Map}setProperties(e,t){return super.setProperties(e,t),this.updateCollisionBBox(),this}updateCollisionBBox(){const{growCollisionBox:e,strokeWidth:t,x1:i,y1:s,x2:r,y2:o}=this;let a=t+e;a%2==0&&(a+=1);const l=dr.from(i,s-Math.floor(a/2)),c=dr.from(r,o),h=dr.distance(l,c);this.collisionBBox=new n.n1.BBox(l.x,l.y,h,a)}isPointInPath(e,t){const{collisionBBox:i,x1:n,y1:s,x2:r,y2:o}=this;if(!i)return!1;const a=dr.from(n,s),l=dr.from(r,o),c=dr.sub(dr.from(e,t),a),h=dr.sub(l,a),d=dr.rotate(c,dr.angle(c,h),a);return i.containsPoint(d.x,d.y)??!1}render(e){this.applyClipMask(e.ctx),super.render(e),this.closeClipMask(e.ctx)}setClipMask(e,t){const i=this.clipMask.get(e);null!=n.n1.jsonDiff(i,t)&&this.markDirty("CollidableLine"),t?this.clipMask.set(e,t):this.clipMask.delete(e)}applyClipMask(e){const{clipMask:t}=this;0!==t.size&&this.clipMask.forEach(t=>{const{x:i,y:n,radius:s}=t;e.save(),e.beginPath(),e.rect(0,0,e.canvas.width,e.canvas.height),e.ellipse(i,n,s,s,0,2*Math.PI,0,!0),e.clip()})}closeClipMask(e){0!==this.clipMask.size&&e.restore()}},pr=class extends n.n1.TransformableText{constructor(){super(...arguments),this.growCollisionBox={top:4,right:4,bottom:4,left:4}}isPointInPath(e,t){const i=this.fromParentPoint(e,t),n=this.computeBBoxWithoutTransforms();return!!n&&n.grow(this.growCollisionBox).containsPoint(i.x,i.y)}},{Vec2:gr}=n.n1;function fr(e,t,i,n,s,r,o){if(!r||!s||!n)return void t.setClipMask(e);const{alignment:a,position:l}=n,c=vr(i,n.fontSize,o),{point:h,textBaseline:d}=yr(c,l,a);Cr(s,r,n,h,c.angle,d);const{x:u,y:p,width:g,height:f}=s.getBBox(),m={x:u+g/2,y:p+f/2,radius:gr.length(gr.from(g,f))/2+gr.length(c.offset)};return"center"===l?t.setClipMask(e,m):t.setClipMask(e),{clipMask:m,numbers:c}}function mr(e,t,i,n,s,r,o){if(!o||!r)return;const{alignment:a,position:l}=n,[c,h]=t.y1<=i.y1?[t,i]:[i,t];let d=c;"bottom"===l?d=h:"inside"===l&&(d={x1:(c.x1+h.x1)/2,y1:(c.y1+h.y1)/2,x2:(c.x2+h.x2)/2,y2:(c.y2+h.y2)/2});const u=vr(d,n.fontSize,s),{point:p,textBaseline:g}=yr(u,"inside"===l?"center":l,a,e);Cr(r,o,n,p,u.angle,g)}function vr(e,t,i){let[n,s]=gr.from(e);n.x>s.x&&([n,s]=[s,n]);const r=gr.normalized(gr.sub(s,n));return{left:n,right:s,normal:r,angle:gr.angle(r),inset:gr.multiply(r,rs.HANDLE_SIZE/2+(t??14)/2),offset:gr.multiply(r,(i??2)/2+(t??14)/3)}}function yr({left:e,right:t,normal:i,angle:n,inset:s,offset:r},o,a,l){let c;c="right"===a?gr.sub(t,s):"center"===a?gr.add(e,gr.multiply(i,gr.distance(e,t)/2)):gr.add(e,s);let h="bottom";return"bottom"===o?(c=gr.rotate(r,n+Math.PI/2,c),h="top"):"center"!==o||l?c=gr.rotate(r,n-Math.PI/2,c):h="middle",{point:c,textBaseline:h}}function Cr(e,t,i,n,s,r){e.setProperties({text:t,x:n.x,y:n.y,rotation:s,rotationCenterX:n.x,rotationCenterY:n.y,fill:i.color,fontFamily:i.fontFamily,fontSize:i.fontSize,fontStyle:i.fontStyle,fontWeight:i.fontWeight,textAlign:i.alignment,textBaseline:r})}var{ChartAxisDirection:br,Vec2:Sr,Vec4:wr}=n.n1,xr=class extends as{constructor(){super(),this.type="cross-line",this.line=new ur,this.middle=new ns,this.isHorizontal=!1,this.append([this.line,this.middle])}static is(e){return as.isCheck(e,"cross-line")}update(e,t){const{seriesRect:i}=t;this.seriesRect=i,this.isHorizontal=_i.is(e);const n=this.isHorizontal?t.yAxis:t.xAxis,s=this.convertCrossLine(e,n);null!=s?(this.visible=e.visible??!0,this.visible&&(this.updateLine(e,s),this.updateHandle(e,s),this.updateText(e,s),this.updateAxisLabel(e,n,s))):this.visible=!1}updateLine(e,t){const{line:i}=this,{lineDashOffset:n,stroke:s,strokeWidth:r,strokeOpacity:o}=e,{x1:a,y1:l,x2:c,y2:h}=t;i.setProperties({x1:a,y1:l,x2:c,y2:h,lineCap:e.getLineCap(),lineDash:e.getLineDash(),lineDashOffset:n,stroke:s,strokeWidth:r,strokeOpacity:o,fillOpacity:0})}updateHandle(e,t){const{middle:i}=this,{locked:n,stroke:s,strokeWidth:r,strokeOpacity:o}=e,a={fill:e.handle.fill,stroke:e.handle.stroke??s,strokeOpacity:e.handle.strokeOpacity??o,strokeWidth:e.handle.strokeWidth??r},l=Sr.sub(wr.center(t),Sr.from(i.handle.width/2,i.handle.height/2));i.gradient=this.isHorizontal?"horizontal":"vertical",i.update({...a,...l}),i.toggleLocked(n??!1)}updateText(e,t){this.text=this.updateNode(pr,this.text,!!e.text.label),fr(this.line.id,this.line,t,e.text,this.text,e.text.label,e.strokeWidth)}createAxisLabel(e){const t=new hr;return e.attachLabel(t),t}updateAxisLabel(e,t,i){this.axisLabel||(this.axisLabel=this.createAxisLabel(t));const{axisLabel:n,seriesRect:s}=this,{direction:r,position:o}=t;if(e.axisLabel.enabled){n.visible=this.visible;const a="left"===o||"top"===o?wr.start(i):wr.end(i),l=r===br.X?a.x:a.y;if(!t.inRange(l))return void(n.visible=!1);const c=Ot(e.value);n.update({...Sr.add(a,Sr.required(s)),value:c,styles:e.axisLabel,context:t})}else n.visible=!1}setAxisLabelOpacity(e){this.axisLabel&&(this.axisLabel.opacity=e)}setAxisLabelVisible(e){this.axisLabel&&(this.axisLabel.visible=e)}toggleHandles(e){this.middle.visible=e,this.middle.toggleHovered("middle"===this.activeHandle)}destroy(){super.destroy(),this.axisLabel?.destroy()}toggleActive(e){this.toggleHandles(e),this.middle.toggleActive(e)}dragStart(e,t,i){const n=_i.is(e)?{x:t.x,y:Vt(e.value,i.yAxis)}:{x:Vt(e.value,i.xAxis),y:t.y};this.dragState={offset:t,middle:n}}drag(e,t,i){const{activeHandle:n,dragState:s}=this;!e.locked&&s&&(n&&this[n].toggleDragging(!0),this.translatePoint(e,s.middle,Sr.sub(t,s.offset),i))}translate(e,t,i){if(e.locked)return;const n=_i.is(e)?Sr.from(0,Vt(e.value,i.yAxis)):Sr.from(Vt(e.value,i.xAxis),0);this.translatePoint(e,n,t,i)}translatePoint(e,t,i,n){const s=_i.is(e);s?i.x=0:i.y=0;const{point:r}=gs({point:t},i,n);e.value=s?r.y:r.x}stopDragging(){this.middle.toggleDragging(!1)}copy(e,t,i){const n=_i.is(e),s=this.isHorizontal?i.yAxis:i.xAxis,r=this.convertCrossLine(e,s);if(!r)return;const o=n?-30:0,a=n?0:-30,l=Bt({x:r.x1+a,y:r.y1+o},i);return t.set({value:n?l.y:l.x}),t}getCursor(){return null==this.activeHandle?"pointer":this[this.activeHandle].getCursor()}containsPoint(e,t){const{middle:i,line:n,text:s}=this;return this.activeHandle=void 0,i.containsPoint(e,t)?(this.activeHandle="middle",!0):n.isPointInPath(e,t)||Boolean(s?.containsPoint(e,t))}getNodeAtCoords(e,t){return this.text?.containsPoint(e,t)?"text":this.line.isPointInPath(e,t)?"line":this.middle.containsPoint(e,t)?"handle":void 0}getAnchor(){const e=this.computeBBoxWithoutHandles();return this.isHorizontal?{x:e.x+e.width/2,y:e.y}:{x:e.x+e.width,y:e.y+e.height/2,position:"right"}}convertCrossLine(e,t){if(null==e.value)return;let i,n,s=0,r=0;const{bounds:o}=t,a=Vt(e.value,t);return _i.is(e)?(i=o.width,r=a,n=a):(s=a,i=a,n=o.height),{x1:s,y1:r,x2:i,y2:n}}},{StateMachine:Er,StateMachineProperty:Mr,Debug:Ar}=n.n1,Tr=class extends Er{constructor(e,t){const i=({point:i})=>{const n="horizontal"===e,s=n?new _i:new Fi;s.set({value:n?i.y:i.x}),t.create(s),t.recordAction(`Create ${n?"horizontal-line":"vertical-line"} annotation`)};super("start",{start:{click:{target:"waiting-first-render",action:i},drag:{target:"waiting-first-render",action:i},reset:Er.parent,cancel:Er.parent},"waiting-first-render":{render:{target:Er.parent,action:()=>{this.node?.toggleActive(!0),t.showAnnotationOptions(),t.update()}}}}),this.debug=Ar.create(!0,"annotations")}};a([Mr()],Tr.prototype,"node",2);var Dr={type:"horizontal-line",datum:_i,scene:xr,isDatum:_i.is,translate:(e,t,i,n)=>{_i.is(t)&&xr.is(e)&&e.translate(t,i,n)},copy:(e,t,i,n)=>{if(_i.is(t)&&_i.is(i)&&xr.is(e))return e.copy(t,i,n)},update:(e,t,i)=>{_i.is(t)&&xr.is(e)&&e.update(t,i)},createState:(e,{createDatum:t})=>new Tr("horizontal",{...e,create:t("horizontal-line")}),dragState:e=>new qn(e)},Ir={type:"vertical-line",datum:Fi,scene:xr,isDatum:Fi.is,translate:(e,t,i,n)=>{Fi.is(t)&&xr.is(e)&&e.translate(t,i,n)},copy:(e,t,i,n)=>{if(Fi.is(t)&&Fi.is(i)&&xr.is(e))return e.copy(t,i,n)},update:(e,t,i)=>{Fi.is(t)&&xr.is(e)&&e.update(t,i)},createState:(e,{createDatum:t})=>new Tr("vertical",{...e,create:t("vertical-line")}),dragState:e=>new qn(e)},{Vec4:Rr}=n.n1,Lr=class{static updateBackground(e,t,i,n){const{background:s}=this,{seriesRect:r}=n;s.path.clear(!0);const o=Rr.from(0,0,r.width,r.height),a=this.getBackgroundPoints(e,t,i,o);for(let e=0;e<a.length;e++){const t=a[e];0===e?s.path.moveTo(t.x,t.y):s.path.lineTo(t.x,t.y)}s.path.closePath(),s.checkPathDirty();const l=this.getBackgroundStyles?.(e)??e.background;s.setProperties({fill:l.fill,fillOpacity:l.fillOpacity})}},kr=class extends _s{constructor(){super(...arguments),this.handles={},this.overflowContinuous=2,this.topLine=new ur,this.bottomLine=new ur,this.background=new n.n1.Path({zIndex:-1}),this.anchor={x:0,y:0},this.updateBackground=Lr.updateBackground.bind(this)}update(e,t){const{locked:i,visible:n}=e,s=Ft(e,t),r=Ft(e.bottom,t);if(null==s||null==r)return void(this.visible=!1);this.visible=n??!0;const o=this.extendLine(s,e,t),a=this.extendLine(r,e,t);this.updateLines(e,o,a,t,s,r),this.updateHandles(e,s,r),this.updateText(e,s,r),this.updateBackground(e,o,a,t),this.updateAnchor(s,r);for(const e of Object.values(this.handles))e.toggleLocked(i??!1)}toggleHandles(e){const{handles:t}=this;if("boolean"!=typeof e)for(const[i,n]of Object.entries(e)){const e=t[i];e.visible=n??!0,e.toggleHovered(this.activeHandle===i)}else for(const[i,n]of Object.entries(t))n.visible=e,n.toggleHovered(this.activeHandle===i)}toggleActive(e){this.toggleHandles(e);for(const t of Object.values(this.handles))t.toggleActive(e)}stopDragging(){const{activeHandle:e,handles:t}=this;null!=e&&t[e].toggleDragging(!1)}getAnchor(){return this.anchor}getCursor(){return null==this.activeHandle?"pointer":this.handles[this.activeHandle].getCursor()}containsPoint(e,t){const{handles:i,topLine:n,bottomLine:s,text:r}=this;this.activeHandle=void 0;for(const[n,s]of Object.entries(i))if(s.containsPoint(e,t))return this.activeHandle=n,!0;return n.containsPoint(e,t)||s.containsPoint(e,t)||Boolean(r?.containsPoint(e,t))}getNodeAtCoords(e,t){if(this.text?.containsPoint(e,t))return"text";if(this.topLine.containsPoint(e,t)||this.bottomLine.containsPoint(e,t))return"line";for(const[i,n]of Object.entries(this.handles))if(n.containsPoint(e,t))return"handle"}updateAnchor(e,t){const{x:i,y:s}=n.n1.Transformable.toCanvasPoint(this.topLine,(e.x1+e.x2)/2,Math.min(e.y1,e.y2,t.y1,t.y2));this.anchor.x=i,this.anchor.y=s}},{Vec2:Pr,Vec4:Nr}=n.n1,Or=class extends kr{constructor(){super(),this.type="disjoint-channel",this.handles={topLeft:new rs,topRight:new rs,bottomLeft:new rs,bottomRight:new ns},this.append([this.background,this.topLine,this.bottomLine,...Object.values(this.handles)])}static is(e){return as.isCheck(e,"disjoint-channel")}dragHandle(e,t,i,n){const{activeHandle:s,handles:r}=this;if(null==s)return;const{offset:o}=r[s].drag(t);r[s].toggleDragging(!0),"bottomRight"===s&&(o.x=0);let a=[],l=[],c=n;switch(s){case"topLeft":a=["topLeft"],l=["bottomLeft"];break;case"bottomLeft":a=["bottomLeft"],l=["topLeft"];break;case"topRight":a=["topRight"],l=["bottomRight"];break;case"bottomRight":a=["bottomLeft","bottomRight"],c=!1}const h=Ft(e,i),d=Ft(e.bottom,i);if(!h||!d)return;const u={topLeft:Nr.start(h),topRight:Nr.end(h),bottomLeft:Nr.start(d),bottomRight:Nr.end(d)},p={vectors:{topLeft:u.topRight,bottomLeft:u.bottomRight,topRight:u.topLeft,bottomRight:u.bottomLeft},angle:e.snapToAngle},g=gs(u,o,i,{overflowContinuous:this.overflowContinuous,translateVectors:a,invertYVectors:l,snap:c?p:void 0});e.start.x=g.topLeft.x,e.start.y=g.topLeft.y,e.end.x=g.topRight.x,e.end.y=g.topRight.y,e.startHeight=g.topLeft.y-g.bottomLeft.y,e.endHeight=g.topRight.y-g.bottomRight.y}getTranslatePointsVectors(e,t){const{bottomLeft:i,bottomRight:n,topLeft:s,topRight:r}=this.handles,o=i.getBBox().y-s.getBBox().y,a=n.getBBox().y-r.getBBox().y;return{start:e,end:t,bottomStart:Pr.add(e,Pr.from(0,o)),bottomEnd:Pr.add(t,Pr.from(0,a))}}updateLines(e,t,i){const{topLine:n,bottomLine:s}=this,{lineDashOffset:r,stroke:o,strokeOpacity:a,strokeWidth:l}=e,c={lineCap:e.getLineCap(),lineDash:e.getLineDash(),lineDashOffset:r,stroke:o,strokeOpacity:a,strokeWidth:l};n.setProperties({...t,...c}),s.setProperties({...i,...c})}updateHandles(e,t,i){const{handles:{topLeft:n,topRight:s,bottomLeft:r,bottomRight:o}}=this,a={fill:e.handle.fill,stroke:e.handle.stroke??e.stroke,strokeOpacity:e.handle.strokeOpacity??e.strokeOpacity,strokeWidth:e.handle.strokeWidth??e.strokeWidth};n.update({...a,...Nr.start(t)}),s.update({...a,...Nr.end(t)}),r.update({...a,...Nr.start(i)}),o.update({...a,...Pr.sub(Nr.end(i),Pr.from(o.handle.width/2,o.handle.height/2))})}updateText(e,t,i){this.text=this.updateNode(pr,this.text,!!e.text.label),mr(!1,t,i,e.text,e.strokeWidth,this.text,e.text.label)}getBackgroundPoints(e,t,i,n){const s=t.x1>t.x2,r=t.y1>t.y2,o=r?n.y2:n.y1,a=r?n.y1:n.y2,l=Pr.from(t);return e.extendEnd&&t.y2===a&&l.push(Pr.from(s?n.x1:n.x2,r?n.y1:n.y2)),e.extendEnd&&i.y2===o&&l.push(Pr.from(s?n.x1:n.x2,r?n.y2:n.y1)),l.push(...Pr.from(i).reverse()),e.extendStart&&i.y1===a&&l.push(Pr.from(s?n.x2:n.x1,r?n.y1:n.y2)),e.extendStart&&t.y1===o&&l.push(Pr.from(s?n.x2:n.x1,r?n.y2:n.y1)),l}},{StateMachine:_r,StateMachineProperty:Fr,Debug:Gr}=n.n1,Vr=class extends _r{constructor(e){const t=({point:t})=>{const i=new Bi;i.set({start:t,end:t,startHeight:0,endHeight:0}),e.create(i)},i=({offset:t,context:i})=>{const{datum:n,snapping:s}=this;n&&(n.set({end:ds(t,i,s,n.start,n.snapToAngle)}),e.update())},n=()=>{this.node?.toggleHandles({topRight:!0}),e.update()},r=({point:t})=>{const{datum:i,node:n}=this,r=Ot(i?.end.y),o=Ot(i?.start.y),{y:a}=t;if(null==i||!(0,s.Et)(o)||!(0,s.Et)(r)||!(0,s.Et)(a))return;const l=r-(a??0),c=2*(o-r)+l,h={x:i.start.x,y:o-l},d={x:i.end.x,y:t.y};n?.toggleHandles(!0),e.validatePoint(h,{overflowContinuous:!0})&&e.validatePoint(d,{overflowContinuous:!0})&&(i.set({startHeight:c,endHeight:l}),e.recordAction("Create disjoint-channel annotation"),e.showAnnotationOptions(),e.update())},o=()=>e.delete();super("start",{start:{click:{target:"waiting-first-render",action:t},drag:{target:"waiting-first-render",action:t},reset:_r.parent},"waiting-first-render":{render:{target:"end",action:()=>{const{node:e}=this;e?.toggleActive(!0),e?.toggleHandles({topLeft:!0,topRight:!1,bottomLeft:!1,bottomRight:!1})}}},end:{hover:i,drag:i,click:{target:"height",action:n},dragEnd:{target:"height",action:n},reset:{target:_r.parent,action:o},cancel:{target:_r.parent,action:o}},height:{hover:({point:t})=>{const{datum:i,node:n}=this,r=Ot(i?.end.y),o=Ot(i?.start.y),{y:a}=t;if(null==i||!(0,s.Et)(o)||!(0,s.Et)(r)||!(0,s.Et)(a))return;const l=r-(a??0),c=2*(o-r)+l,h={x:i?.start.x,y:o-c},d={x:i?.end.x,y:t.y};n?.toggleHandles({bottomLeft:!0,bottomRight:!0}),e.validatePoint(h,{overflowContinuous:!0})&&e.validatePoint(d,{overflowContinuous:!0})&&(i.set({startHeight:c,endHeight:l}),e.update())},click:{target:_r.parent,action:r},drag:{target:_r.parent,action:r},reset:{target:_r.parent,action:o},cancel:{target:_r.parent,action:o}}}),this.debug=Gr.create(!0,"annotations"),this.snapping=!1}};a([Fr()],Vr.prototype,"datum",2),a([Fr()],Vr.prototype,"node",2),a([Fr()],Vr.prototype,"snapping",2);var Br={type:"disjoint-channel",datum:Bi,scene:Or,isDatum:Bi.is,translate:(e,t,i,n)=>{Bi.is(t)&&Or.is(e)&&e.translate(t,i,n)},copy:(e,t,i,n)=>{if(Bi.is(t)&&Bi.is(i)&&Or.is(e))return e.copy(t,i,n)},update:(e,t,i)=>{Bi.is(t)&&Or.is(e)&&e.update(t,i)},createState:(e,{createDatum:t})=>new Vr({...e,create:t("disjoint-channel")}),dragState:e=>new qn(e)},Hr=[0,23.6,38.2,50,61.8,78.6,100],zr={10:[...Hr,161.8,261.8,361.8,423.6],6:Hr,4:Hr.filter(e=>78.6!==e&&23.6!==e)};function Ur({x1:e,y1:t,x2:i,y2:n},s,r,o,a=10){const l=t-n,c=r?-1:1;let h=o;const d=[];return zr[a].forEach((t,n)=>{const r=o+l*(t/100)*c,a=s.yAxis.scaleInvert(r);d.push({id:n,x1:e,x2:i,y1:h,y2:r,tag:100==t?0:1,label:{x1:Math.min(e,i)-10,x2:i,y1:r,y2:r,text:`${(t/100).toFixed(3)} (${a.toFixed(2)})`}}),h=r}),d}var{Vec2:Wr,Vec4:jr}=n.n1,Kr=class extends as{constructor(){super(),this.trendLine=new ur,this.rangeFillsGroup=new n.n1.Group({name:`${this.id}-range-fills`}),this.rangeFillsGroupSelection=n.n1.Selection.select(this.rangeFillsGroup,n.n1.Range),this.rangeStrokesGroup=new n.n1.Group({name:`${this.id}-range-strokes`}),this.rangeStrokesGroupSelection=n.n1.Selection.select(this.rangeStrokesGroup,ur),this.labelsGroup=new n.n1.Group({name:`${this.id}-ranges-labels`}),this.labelsGroupSelection=n.n1.Selection.select(this.labelsGroup,pr),this.anchor={x:0,y:0,position:"above"},this.append([this.trendLine,this.rangeFillsGroup,this.rangeStrokesGroup,this.labelsGroup])}update(e,t){let i=Ft(e,t);if(null==i)return void(this.visible=!1);if(i=jr.round(i),this.visible=e.visible??!0,!this.visible)return;this.updateLine(e,i,this.trendLine),this.updateHandles(e,i),this.updateAnchor(e,i,t);const{reverse:n}=e,s=this.extendLine(i,e,t),r=n?s.y1:s.y2,o=n?s.y2:s.y1,a=Ur(s,t,e.reverse,r,e.bands);this.updateRanges(e,a,t);const l={...s,y1:o,y2:o};this.updateText(e,l)}extendLine({x1:e,y1:t,x2:i,y2:n},s,r){const o={x1:e,y1:t,x2:i,y2:n};if(!s.extendStart&&!s.extendEnd)return o;const{x:a,width:l}=r.xAxis.bounds;return s.extendEnd&&(o[e>i?"x1":"x2"]=a+l),s.extendStart&&(o[e>i?"x2":"x1"]=a),o}updateLine(e,t,i){if(!t||!i)return;const{lineDashOffset:n,strokeWidth:s,strokeOpacity:r,stroke:o}=e;i.setProperties({...t,lineCap:e.getLineCap(),lineDash:[3,4],lineDashOffset:n,strokeWidth:s,strokeOpacity:r,fillOpacity:0,stroke:o})}updateRangeStrokes(e){const{lineDashOffset:t,strokeWidth:i,strokeOpacity:n,strokes:s,rangeStroke:r,isMultiColor:o}=e;this.rangeStrokesGroupSelection.each((a,{x1:l,x2:c,y2:h,tag:d},u)=>{const p=h,g=o?s[u%s.length]:r;a.setProperties({x1:l,x2:c,y1:p,y2:p,stroke:g,strokeOpacity:n,strokeWidth:i,lineCap:e.getLineCap(),lineDash:e.getLineDash(),lineDashOffset:t,tag:d})})}updateRanges(e,t,i){const n=e=>e.id;this.rangeFillsGroupSelection.update(t,void 0,n),this.rangeStrokesGroupSelection.update(t,void 0,n),this.labelsGroupSelection.update(t,void 0,n),this.updateRangeFills(e),this.updateRangeStrokes(e),this.updateRangeLabels(e,i)}updateRangeFills(e){const{lineDashOffset:t,strokeWidth:i,strokeOpacity:n,strokes:s,rangeStroke:r,showFill:o,isMultiColor:a}=e;this.rangeFillsGroupSelection.each((l,{x1:c,x2:h,y1:d,y2:u},p)=>{const g=a?s[p%s.length]:r;o?l.setProperties({x1:c,x2:h,y1:d,y2:u,startLine:!1,endLine:!1,stroke:g,strokeOpacity:n,fill:g,fillOpacity:.15*(n??1),strokeWidth:i,lineCap:e.getLineCap(),lineDash:e.getLineDash(),lineDashOffset:t,visible:!0}):l.visible=!1})}updateRangeLabels(e,{xAxis:t}){const{rangeStrokesGroupSelection:i}=this,{strokes:n,strokeWidth:s,rangeStroke:r,isMultiColor:o,label:{fontFamily:a,fontSize:l,fontStyle:c,fontWeight:h,color:d}}=e,u={fontFamily:a,fontSize:l,fontStyle:c,fontWeight:h},p=this.checkWithinBounds(t,u,this.labelsGroupSelection.at(0));this.labelsGroupSelection.each((e,t,a)=>{const l=d??(o?n[a%n.length]:r),c=i.at(a);if(!c)return;const{text:h,...g}=t.label;if(p)e.setProperties({...u,text:h,x:g.x1,y:g.y1,textBaseline:"middle",textAlign:"end",fill:l}),fr(e.id,c,g);else{const t={...u,label:h,position:"center",alignment:"left",color:l};fr(e.id,c,g,t,e,h,s)}})}checkWithinBounds(e,t,i){if(!i)return!1;const{text:n,...s}=i.datum.label;i.setProperties({...t,text:n,x:s.x1,y:s.y1,textBaseline:"middle",textAlign:"end"});const{x:r}=i.getBBox();return r>=e.bounds.x&&r<=e.bounds.x+e.bounds.width}updateText(e,t){const i=this.rangeStrokesGroupSelection.selectByTag(0)[0];if(!i)return;const{text:n,strokeWidth:s}=e;this.text=this.updateNode(pr,this.text,!!n.label),fr(i.id,i,t,n,this.text,n.label,s)}updateAnchor(e,t,i,s){const r=jr.topCenter(t);Wr.apply(this.anchor,n.n1.Transformable.toCanvasPoint(this.trendLine,r.x,r.y))}containsPoint(e,t){const{trendLine:i,rangeStrokesGroupSelection:n,text:s}=this;let r=!1;return n.each(i=>r||(r=i.isPointInPath(e,t))),r||i.isPointInPath(e,t)||Boolean(s?.containsPoint(e,t))}getNodeAtCoords(e,t){return this.text?.containsPoint(e,t)?"text":this.trendLine.isPointInPath(e,t)?"line":void 0}getHandleStyles(e){return{fill:e.handle.fill,stroke:e.handle.stroke??e.stroke,strokeOpacity:e.handle.strokeOpacity??e.strokeOpacity,strokeWidth:e.handle.strokeWidth??e.strokeWidth}}drag(e,t,i,n){e.locked||(this.activeHandle?this.dragHandle(e,t,i,n):this.dragAll(e,t,i))}getAnchor(){return this.anchor}getCursor(){return"pointer"}},{ContinuousScale:$r}=n.n1;function Yr(e,t,i={overflowContinuous:!1},n){if(null==t.x||null==t.y)return n&&s.Vy.warnOnce(`${n}requires both an [x] and [y] property, ignoring.`),!1;const{xAxis:r,yAxis:o}=e,a=i.overflowContinuous&&$r.is(r.scale),l=i.overflowContinuous&&$r.is(o.scale),c=a||qr(t.x,r),h=l||qr(t.y,o);if(c&&h)return!0;if(n){let e="x & y domains";c&&(e="y domain"),h&&(e="x domain");const i=Ot(t.x),r=Ot(t.y);s.Vy.warnOnce(`${n}is outside the ${e}, ignoring. - x: [${i}], y: ${r}]`)}return!1}function qr(e,t){const{domain:i}=t.scale,n=Ot(e);return!i||null==n||!t.continuous||n>=i[0]&&n<=i.at(-1)}var{Vec2:Xr,Vec4:Zr}=n.n1,Qr=class extends Kr{constructor(){super(),this.type="fibonacci-retracement-trend-based",this.endRetracementLine=new ur,this.start=new rs,this.end=new rs,this.endRetracement=new rs,this.append([this.endRetracementLine,this.start,this.end,this.endRetracement])}static is(e){return as.isCheck(e,"fibonacci-retracement-trend-based")}update(e,t){let{coords1:i,coords2:n}=this.getCoords(e,t);if(null==i||null==n)return void(this.visible=!1);if(i=Zr.round(i),n=Zr.round(n),this.visible=e.visible??!0,!this.visible)return;null!=e.endRetracement.x&&null!=e.endRetracement.y||(n=void 0),this.updateLine(e,i,this.trendLine),this.updateLine(e,n,this.endRetracementLine),this.updateHandles(e,i,n),this.updateAnchor(e,n??i,t);const{reverse:s,bands:r}=e,o=function(e,t){const{x2:i,y1:n,y2:s}=e,r=n-s;return null==t?{x1:i,x2:i,y1:s-r,y2:s}:{x1:t.x1,x2:t.x2,y1:t.y2-r,y2:t.y2}}(i,n),a=this.extendLine(o,e,t),l=a.y2,c=a.y1,h=n?Ur(a,t,s,l,r):[];this.updateRanges(e,h,t);const d={...a,y1:c,y2:c};this.updateText(e,d)}containsPoint(e,t){const{start:i,end:n,endRetracement:s,endRetracementLine:r}=this;return this.activeHandle=void 0,i.containsPoint(e,t)?(this.activeHandle="start",!0):n.containsPoint(e,t)?(this.activeHandle="end",!0):s.containsPoint(e,t)?(this.activeHandle="endRetracement",!0):r.isPointInPath(e,t)||super.containsPoint(e,t)}getNodeAtCoords(e,t){return this.start.containsPoint(e,t)||this.end.containsPoint(e,t)||this.endRetracement.containsPoint(e,t)?"handle":this.endRetracementLine.isPointInPath(e,t)?"line":super.getNodeAtCoords(e,t)}dragStart(e,t,i){this.dragState={offset:t,...ps({start:e.start,end:e.end,endRetracement:e.endRetracement},i)}}stopDragging(){this.start.toggleDragging(!1),this.end.toggleDragging(!1),this.endRetracement.toggleDragging(!1)}dragAll(e,t,i){const{dragState:n}=this;n&&this.translatePoints({datum:e,start:n.start,end:n.end,endRetracement:n.endRetracement,translation:Xr.sub(t,n.offset),context:i})}dragHandle(e,t,i,n){const{activeHandle:s,dragState:r}=this;if(!s||!r)return;this[s].toggleDragging(!0);const o=n?this.snapToAngle(e,t,i):Bt(this[s].drag(t).point,i);o&&Yr(i,o)&&(e[s].x=o.x,e[s].y=o.y)}snapToAngle(e,t,i){const{activeHandle:n}=this,s=["start","end","endRetracement"];if(!n)return;const r=(s.indexOf(n)+1)%s.length,o=s[r];return this[n].toggleDragging(!0),Bt(us(t,Gt(e[o],i),e.snapToAngle),i)}translatePoints({datum:e,start:t,end:i,endRetracement:n,translation:s,context:r}){const o=gs({start:t,end:i,endRetracement:n},s,r,{overflowContinuous:2});e.start.x=o.start.x,e.end.x=o.end.x,e.endRetracement.x=o.endRetracement.x,e.start.y=o.start.y,e.end.y=o.end.y,e.endRetracement.y=o.endRetracement.y}translate(e,t,i){this.translatePoints({datum:e,start:Gt(e.start,i),end:Gt(e.end,i),endRetracement:Gt(e.endRetracement,i),translation:t,context:i})}copy(e,t,i){const{coords1:n,coords2:s}=this.getCoords(e,i);if(!n||!s)return;const r=this.computeBBoxWithoutHandles();return this.translatePoints({datum:t,start:Zr.start(n),end:Zr.end(n),endRetracement:Zr.end(s),translation:{x:-r.width/2,y:-r.height/2},context:i}),t}getCoords(e,t){return{coords1:Ft(e,t),coords2:Ft({start:e.end,end:e.endRetracement},t)}}toggleHandles(e){if("boolean"==typeof e)this.start.visible=e,this.end.visible=e,this.endRetracement.visible=e;else for(const[t,i]of(0,s.jO)(e))this[t].visible=i;this.start.toggleHovered("start"===this.activeHandle),this.end.toggleHovered("end"===this.activeHandle),this.endRetracement.toggleHovered("endRetracement"===this.activeHandle)}toggleActive(e){this.toggleHandles(e),this.start.toggleActive(e),this.end.toggleActive(e),this.endRetracement.toggleActive(e)}updateHandles(e,t,i,n){this.start.update({...this.getHandleStyles(e),...this.getHandleCoords(e,t,"start")}),this.end.update({...this.getHandleStyles(e),...this.getHandleCoords(e,t,"end",n)}),i&&this.endRetracement.update({...this.getHandleStyles(e),...this.getHandleCoords(e,i,"endRetracement",n)}),this.start.toggleLocked(e.locked??!1),this.end.toggleLocked(e.locked??!1),this.endRetracement.toggleLocked(e.locked??!1)}getHandleCoords(e,t,i,n){return"start"===i?Zr.start(t):Zr.end(t)}},{StateMachine:Jr,StateMachineProperty:eo,Debug:to}=n.n1,io=class extends Jr{constructor(e){const t=({point:t})=>{const i=this.createDatum();i.set({start:t,end:t}),e.create(i)},i=({offset:t,context:i})=>{const{datum:n,snapping:s}=this;n&&(n.set({end:ds(t,i,s,n.start,n.snapToAngle)}),e.update())},n=()=>{const{datum:t}=this;t&&(t.endRetracement.x=t.end.x,t.endRetracement.y=t.end.y,this.node?.toggleHandles({end:!0}),e.update())},s=()=>{this.node?.toggleHandles({endRetracement:!0}),e.update()},r=()=>e.delete();super("start",{start:{click:{target:"waiting-first-render",action:t},drag:{target:"waiting-first-render",action:t},reset:Jr.parent},"waiting-first-render":{render:{target:"end",action:()=>{const{node:e}=this;e?.toggleActive(!0),e?.toggleHandles({start:!0,end:!1,endRetracement:!1})}}},end:{hover:i,click:{target:"endRetracement",action:n},drag:i,dragEnd:{target:"endRetracement",action:n},reset:{target:Jr.parent,action:r},cancel:{target:Jr.parent,action:r},onExit:()=>{e.showAnnotationOptions(),e.recordAction(`Create ${this.datum?.type} annotation`)}},endRetracement:{hover:({offset:t,context:i})=>{const{datum:n,snapping:s}=this;n&&(n.set({endRetracement:ds(t,i,s,n.end,n.snapToAngle)}),e.update())},click:{target:Jr.parent,action:s},drag:{target:Jr.parent,action:s},reset:{target:Jr.parent,action:r},cancel:{target:Jr.parent,action:r}}}),this.debug=to.create(!0,"annotations"),this.snapping=!1}createDatum(){return new Yi}};a([eo()],io.prototype,"datum",2),a([eo()],io.prototype,"node",2),a([eo()],io.prototype,"snapping",2);var no={type:"fibonacci-retracement-trend-based",datum:Yi,scene:Qr,isDatum:Yi.is,translate:(e,t,i,n)=>{Yi.is(t)&&Qr.is(e)&&e.translate(t,i,n)},copy:(e,t,i,n)=>{if(Yi.is(t)&&Yi.is(i)&&Qr.is(e))return e.copy(t,i,n)},update:(e,t,i)=>{Yi.is(t)&&Qr.is(e)&&e.update(t,i)},createState:(e,{createDatum:t})=>new io({...e,create:t("fibonacci-retracement-trend-based")}),dragState:e=>new qn(e)},{Vec2:so,Vec4:ro}=n.n1,oo=class extends Kr{constructor(){super(),this.type="fibonacci-retracement",this.start=new rs,this.end=new rs,this.append([this.start,this.end])}static is(e){return as.isCheck(e,"fibonacci-retracement")}containsPoint(e,t){const{start:i,end:n}=this;return this.activeHandle=void 0,i.containsPoint(e,t)?(this.activeHandle="start",!0):n.containsPoint(e,t)?(this.activeHandle="end",!0):super.containsPoint(e,t)}getNodeAtCoords(e,t){return this.start.containsPoint(e,t)||this.end.containsPoint(e,t)?"handle":super.getNodeAtCoords(e,t)}dragStart(e,t,i){this.dragState={offset:t,...ps({start:e.start,end:e.end},i)}}stopDragging(){this.start.toggleDragging(!1),this.end.toggleDragging(!1)}dragAll(e,t,i){const{dragState:n}=this;n&&this.translatePoints({datum:e,start:n.start,end:n.end,translation:so.sub(t,n.offset),context:i})}dragHandle(e,t,i,n){const{activeHandle:s,dragState:r}=this;if(!s||!r)return;this[s].toggleDragging(!0);const o=n?this.snapToAngle(e,t,i):Bt(this[s].drag(t).point,i);o&&Yr(i,o)&&(e[s].x=o.x,e[s].y=o.y)}snapToAngle(e,t,i){const{activeHandle:n}=this,s=["start","end"].find(e=>e!==n);if(n&&s)return this[n].toggleDragging(!0),Bt(us(t,Gt(e[s],i),e.snapToAngle),i)}translatePoints({datum:e,start:t,end:i,translation:n,context:s}){const r=gs({start:t,end:i},n,s,{overflowContinuous:1});e.start.x=r.start.x,e.end.x=r.end.x,e.start.y=r.start.y,e.end.y=r.end.y}translate(e,t,i){this.translatePoints({datum:e,start:Gt(e.start,i),end:Gt(e.end,i),translation:t,context:i})}copy(e,t,i){const n=Ft(e,i);if(!n)return;const s=this.computeBBoxWithoutHandles();return this.translatePoints({datum:t,start:{x:n.x1,y:n.y1},end:{x:n.x2,y:n.y2},translation:{x:-s.width/2,y:-s.height/2},context:i}),t}toggleHandles(e){if("boolean"==typeof e)this.start.visible=e,this.end.visible=e;else for(const[t,i]of(0,s.jO)(e))this[t].visible=i;this.start.toggleHovered("start"===this.activeHandle),this.end.toggleHovered("end"===this.activeHandle)}toggleActive(e){this.toggleHandles(e),this.start.toggleActive(e),this.end.toggleActive(e)}updateHandles(e,t,i,n){this.start.update({...this.getHandleStyles(e),...this.getHandleCoords(e,t,"start")}),this.end.update({...this.getHandleStyles(e),...this.getHandleCoords(e,t,"end",n)}),this.start.toggleLocked(e.locked??!1),this.end.toggleLocked(e.locked??!1)}getHandleCoords(e,t,i,n){return"start"===i?ro.start(t):ro.end(t)}},{StateMachine:ao,StateMachineProperty:lo,Debug:co}=n.n1,ho=class extends ao{constructor(e){const t=({point:t})=>{const i=this.createDatum();i.set({start:t,end:t}),e.create(i)},i=({offset:t,context:i})=>{const{datum:n,snapping:s}=this;n&&(n.set({end:ds(t,i,s,n.start,n.snapToAngle)}),e.update())},n=()=>{this.node?.toggleHandles({end:!0}),e.update()},s=()=>e.delete();super("start",{start:{click:{target:"waiting-first-render",action:t},drag:{target:"waiting-first-render",action:t},reset:ao.parent},"waiting-first-render":{render:{target:"end",action:()=>{const{node:e}=this;e?.toggleActive(!0),e?.toggleHandles({start:!0,end:!1})}}},end:{hover:i,click:{target:ao.parent,action:n},drag:i,dragEnd:{target:ao.parent,action:n},reset:{target:ao.parent,action:s},cancel:{target:ao.parent,action:s},onExit:()=>{e.showAnnotationOptions(),e.recordAction(`Create ${this.datum?.type} annotation`)}}}),this.debug=co.create(!0,"annotations"),this.snapping=!1}};a([lo()],ho.prototype,"datum",2),a([lo()],ho.prototype,"node",2),a([lo()],ho.prototype,"snapping",2);var uo=class extends ho{createDatum(){return new Ui}},po=class extends ho{createDatum(){return new Wi}},go=class extends ho{createDatum(){return new Xi}},fo={type:"fibonacci-retracement",datum:Xi,scene:oo,isDatum:Xi.is,translate:(e,t,i,n)=>{Xi.is(t)&&oo.is(e)&&e.translate(t,i,n)},copy:(e,t,i,n)=>{if(Xi.is(t)&&Xi.is(i)&&oo.is(e))return e.copy(t,i,n)},update:(e,t,i)=>{Xi.is(t)&&oo.is(e)&&e.update(t,i)},createState:(e,{createDatum:t})=>new go({...e,create:t("fibonacci-retracement")}),dragState:e=>new qn(e)},{Vec2:mo}=n.n1,vo=class extends n.n1.Group{},yo=class extends vo{constructor(){super(),this.type="arrow",this.path=new n.n1.Path,this.armLength=6,this.append([this.path])}update(e){const{path:t}=this,{x:i,y:n,angle:s,...r}=e,o=mo.from(i,n),a=3*Math.PI/4,l=this.armLength+2*(e.strokeWidth??0),c=mo.rotate(mo.from(0,l),s+a,o),h=mo.rotate(mo.from(l,0),s-a,o);t.setProperties(r),t.fillOpacity=0,t.path.clear(),t.path.moveTo(c.x,c.y),t.path.lineTo(o.x,o.y),t.path.lineTo(h.x,h.y)}},{Vec2:Co,Vec4:bo}=n.n1,So=class extends Vs{constructor(){super(),this.type="line",this.line=new ur,this.append([this.line,this.start,this.end])}static is(e){return as.isCheck(e,"line")}update(e,t){let i=Ft(e,t);null!=i?(i=bo.round(i),this.visible=e.visible??!0,this.visible&&(this.updateLine(e,i,t),this.updateHandles(e,i),this.updateText(e,i),this.updateCaps(e,i),this.updateAnchor(e,i,t))):this.visible=!1}updateLine(e,t,i){const{line:n}=this,{lineDashOffset:s,stroke:r,strokeWidth:o,strokeOpacity:a}=e,l=this.extendLine(t,e,i);n.setProperties({...l,lineCap:e.getLineCap(),lineDash:e.getLineDash(),lineDashOffset:s,stroke:r,strokeWidth:o,strokeOpacity:a,fillOpacity:0})}updateText(e,t){this.text=this.updateNode(pr,this.text,!!e.text.label),fr(this.line.id,this.line,t,e.text,this.text,e.text.label,e.strokeWidth)}updateCaps(e,t){if(!e.startCap&&this.startCap&&(this.removeChild(this.startCap),this.startCap=void 0),!e.endCap&&this.endCap&&(this.removeChild(this.endCap),this.endCap=void 0),!e.startCap&&!e.endCap)return;const{stroke:i,strokeWidth:n,strokeOpacity:s}=e,[r,o]=Co.from(t),a=Co.angle(Co.sub(o,r));e.startCap&&(this.startCap&&this.startCap.type!==e.startCap&&(this.removeChild(this.startCap),this.startCap=void 0),null==this.startCap&&(this.startCap=new yo,this.append([this.startCap])),this.startCap.update({x:r.x,y:r.y,angle:a-Math.PI,stroke:i,strokeWidth:n,strokeOpacity:s})),e.endCap&&(this.endCap&&this.endCap.type!==e.endCap&&(this.removeChild(this.endCap),this.endCap=void 0),null==this.endCap&&(this.endCap=new yo,this.append([this.endCap])),this.endCap.update({x:o.x,y:o.y,angle:a,stroke:i,strokeWidth:n,strokeOpacity:s}))}updateAnchor(e,t,i,s){const r=bo.topCenter(t);Co.apply(this.anchor,n.n1.Transformable.toCanvasPoint(this.line,r.x,r.y))}containsPoint(e,t){const{line:i,text:n}=this;return super.containsPoint(e,t)||i.isPointInPath(e,t)||Boolean(n?.containsPoint(e,t))}getNodeAtCoords(e,t){return this.text?.containsPoint(e,t)?"text":this.line.isPointInPath(e,t)?"line":super.getNodeAtCoords(e,t)}getHandleCoords(e,t,i,n){const{startCap:s,endCap:r}=this;let[o,a]=Co.from(t);const l=Co.angle(Co.sub(a,o));return s&&(o=Co.rotate(Co.from(0,-rs.HANDLE_SIZE/2),l,o)),r&&(a=Co.rotate(Co.from(0,rs.HANDLE_SIZE/2),l,a)),"start"===i?o:a}getHandleStyles(e){return{fill:e.handle.fill,stroke:e.handle.stroke??e.stroke,strokeOpacity:e.handle.strokeOpacity??e.strokeOpacity,strokeWidth:e.handle.strokeWidth??e.strokeWidth}}},wo={type:"line",datum:Wi,scene:So,isDatum:Wi.is,translate:(e,t,i,n)=>{Wi.is(t)&&So.is(e)&&e.translate(t,i,n)},copy:(e,t,i,n)=>{if(Wi.is(t)&&Wi.is(i)&&So.is(e))return e.copy(t,i,n)},update:(e,t,i)=>{Wi.is(t)&&So.is(e)&&e.update(t,i)},createState:(e,{createDatum:t})=>new po({...e,create:t("line")}),dragState:e=>new qn(e)},xo={type:"arrow",datum:Ui,scene:So,isDatum:Ui.is,translate:(e,t,i,n)=>{Ui.is(t)&&So.is(e)&&e.translate(t,i,n)},copy:(e,t,i,n)=>{if(Ui.is(t)&&Ui.is(i)&&So.is(e))return e.copy(t,i,n)},update:(e,t,i)=>{Ui.is(t)&&So.is(e)&&e.update(t,i)},createState:(e,{createDatum:t})=>new uo({...e,create:t("arrow")}),dragState:e=>new qn(e)};function Eo(e,t=0,i=0){let s=t;for(const t of e)if(Array.isArray(t)){for(const e of t)Mo(e,s);s+=n.n1.Group.computeChildrenBBox(t).width+i}else Mo(t,s),s+=t.getBBox().width+i}function Mo(e,t){"x1"in e?(e.x2=t+(e.x2-e.x1),e.x1=t):e.x=t}function Ao(e,t){"y1"in e?(e.y2=t+(e.y2-e.y1),e.y1=t):e.y=t}function To(e,t){"x1"in e?(e.x1+=t,e.x2+=t):e.x+=t}function Do(e,t){"y1"in e?(e.y1+=t,e.y2+=t):e.y+=t}var{Vec4:Io}=n.n1,Ro=class extends n.n1.Group{constructor(){super(),this.name="MeasurerStatisticsScene",this.background=new n.n1.Rect,this.dateRangeBarsText=new n.n1.Text,this.dateRangeDivider=new n.n1.Line,this.dateRangeValueText=new n.n1.Text,this.priceRangeValueText=new n.n1.Text,this.priceRangeDivider=new n.n1.Line,this.priceRangePercentageText=new n.n1.Text,this.volumeText=new n.n1.Text,this.volumeFormatter=new Intl.NumberFormat("en-US",{notation:"compact",minimumFractionDigits:2,maximumFractionDigits:2}),this.append([this.background,this.dateRangeBarsText,this.dateRangeDivider,this.dateRangeValueText,this.priceRangeValueText,this.priceRangeDivider,this.priceRangePercentageText,this.volumeText])}update(e,t,i,s,r,o,a){this.verticalDirection=o;const l=this.updateStatistics(e,t,i,a),c=n.n1.Group.computeChildrenBBox(l.flat());c.grow(10),this.updateBackground(e,c,10),this.reposition(l,10,r),this.checkVisibility(e,r,s)}checkVisibility(e,t,i){const s=Io.from(new n.n1.BBox(0,0,t.seriesRect.width,t.seriesRect.height));Io.collides(i,s)?this.visible=e.visible??!0:this.visible=!1}updateStatistics(e,t,i,s){const{dateRangeBarsText:r,dateRangeDivider:o,dateRangeValueText:a,priceRangeValueText:l,priceRangeDivider:c,priceRangePercentageText:h,volumeText:d}=this,u=e.statistics.fontSize+3,p=this.getTextStyles(e),g={...this.getDividerStyles(e),x1:0,y1:0,x2:0,y2:u},f=[r,o,a],m=[l,c,h],v=[];return t.priceRange&&(l.setProperties({...p,text:this.formatPriceRangeValue(t.priceRange.value,s)}),c.setProperties(g),h.setProperties({...p,text:this.formatPriceRangePercentage(t.priceRange.percentage,s)}),Eo(m,i.x,8),v.push(m)),t.dateRange&&(r.setProperties({...p,text:this.formatDateRangeBars(t.dateRange.bars,s)}),o.setProperties(g),a.setProperties({...p,text:this.formatDateRangeValue(t.dateRange.value)}),Eo(f,i.x,8),v.push(f)),null!=t.volume?(d.setProperties({...p,x:i.x,text:this.formatVolume(t.volume,s),visible:!0}),v.push(d)):d.visible=!1,function(e,t=0,i=0){let s=t;for(const t of e)if(Array.isArray(t)){for(const e of t)Ao(e,s);s+=n.n1.Group.computeChildrenBBox(t).height+i}else Ao(t,s),s+=t.getBBox().height+i}(v,i.y,6),c.y1+=-2,c.y2+=-2,o.y1+=-2,o.y2+=-2,v}updateBackground(e,t,i){const n=this.getBackgroundStyles(e);this.background.setProperties({...n,...t,x:t.x-t.width/2+i,y:t.y})}reposition(e,t,i){const{width:s,height:r}=i.seriesRect,o=Io.from(this.background.getBBox());let a=0;o.x1<0&&(a=-o.x1),o.x2>s&&(a=s-o.x2);const l=Math.min(t,r-o.y2);for(const t of e)if(Array.isArray(t)){const e=n.n1.Group.computeChildrenBBox(t).width;for(const i of t)To(i,a-e/2),Do(i,l)}else To(t,a-t.getBBox().width/2),Do(t,l);this.background.x+=a,this.background.y+=l}getTextStyles(e){return{fill:e.statistics.color,fontFamily:e.statistics.fontFamily,fontSize:e.statistics.fontSize,fontStyle:e.statistics.fontStyle,fontWeight:e.statistics.fontWeight,textBaseline:"top"}}getDividerStyles(e){return{stroke:e.statistics.divider.stroke,strokeOpacity:e.statistics.divider.strokeOpacity,strokeWidth:e.statistics.divider.strokeWidth}}getBackgroundStyles(e){return{fill:e.statistics.fill,stroke:e.statistics.stroke,strokeOpacity:e.statistics.strokeOpacity,strokeWidth:e.statistics.strokeWidth,cornerRadius:4}}formatDateRangeBars(e,t){return t?.t("measurerDateRangeBars",{value:e})??`${e}`}formatDateRangeValue(e){const t=[],i=e>=0?"":"-";e=Math.abs(e);const n=36e5,s=24*n,r=Math.floor(e/6e4),o=Math.floor(e/n),a=Math.floor(e/s),l=o%24,c=r%60;return a>=1&&t.push(`${a}d`),o>=1&&(e<s||0!==l)&&t.push(`${l}h`),(e<n||0!==c)&&t.push(`${c}m`),t[0]=`${i}${t[0]}`,t.join(" ")}formatPriceRangeValue(e,t){return t?.t("measurerPriceRangeValue",{value:Number(e.toFixed(2))})??`${e}`}formatPriceRangePercentage(e,t){return t?.t("measurerPriceRangePercent",{value:e})??`${e}`}formatVolume(e,t){const i=isNaN(e)?"":this.volumeFormatter.format(e);return t?.t("measurerVolume",{value:i})??i}},Lo=class extends Ro{getDirectionStyles(e){return"down"===this.verticalDirection?e.down.statistics:e.up.statistics}getTextStyles(e){const t=this.getDirectionStyles(e);return{...super.getTextStyles(e),fill:t.color,fontFamily:t.fontFamily,fontSize:t.fontSize,fontStyle:t.fontStyle,fontWeight:t.fontWeight}}getDividerStyles(e){const t=this.getDirectionStyles(e);return{stroke:t.divider.stroke,strokeOpacity:t.divider.strokeOpacity,strokeWidth:t.divider.strokeWidth}}getBackgroundStyles(e){const t=this.getDirectionStyles(e);return{...super.getBackgroundStyles(e),fill:t.fill,stroke:t.stroke,strokeOpacity:t.strokeOpacity,strokeWidth:t.strokeWidth}}},{Vec2:ko,Vec4:Po}=n.n1,No=class extends Vs{constructor(){super(),this.type="measurer",this.horizontalLine=new ur,this.verticalLine=new ur,this.horizontalStartLine=new ur,this.horizontalEndLine=new ur,this.verticalStartLine=new ur,this.verticalEndLine=new ur,this.horizontalEndCap=new yo,this.verticalEndCap=new yo,this.background=new n.n1.Path({zIndex:-1}),this.updateBackground=Lr.updateBackground.bind(this),this.statistics=this.createStatisticsScene(),this.statistics.zIndex=1,this.append([this.background,this.verticalStartLine,this.verticalEndLine,this.horizontalStartLine,this.horizontalEndLine,this.horizontalLine,this.verticalLine,this.horizontalEndCap,this.verticalEndCap,this.start,this.end,this.statistics])}static is(e){return as.isCheck(e,"measurer")}createStatisticsScene(){return new Ro}update(e,t){const i=Ft(e,t);if(null==i)return void(this.visible=!1);if(this.visible=e.visible??!0,!this.visible)return;const n=this.extendPerpendicular(i,e,t),s={...n,y2:n.y1},r={...n,y1:n.y2};this.verticalDirection=i.y1<i.y2?"down":"up",this.updateVisibilities(e),this.updateLines(e,i),this.updateHandles(e,i),this.updateText(e,i),this.updateCaps(e,i),this.updateBoundingLines(e,n),this.updateBackground(e,s,r,t),this.updateStatistics(e,i,t),this.updateAnchor(e,i,t)}extendPerpendicular(e,t,i){const n={x1:Math.min(e.x1,e.x2),x2:Math.max(e.x1,e.x2),y1:Math.min(e.y1,e.y2),y2:Math.max(e.y1,e.y2)},[s,r]=ko.from(i.yAxis.bounds);return fi.is(t)?(t.extendAbove&&(n.y1=s.y),t.extendBelow&&(n.y2=r.y)):mi.is(t)&&(t.extendLeft&&(n.x1=s.x),t.extendRight&&(n.x2=r.x)),n}updateVisibilities(e){const{horizontalStartLine:t,horizontalEndLine:i,horizontalEndCap:n,verticalStartLine:s,verticalEndLine:r,verticalEndCap:o}=this,{direction:a}=e;s.visible="vertical"!==a,r.visible="vertical"!==a,n.visible="vertical"!==a,t.visible="horizontal"!==a,i.visible="horizontal"!==a,o.visible="horizontal"!==a}updateLines(e,t){const{horizontalLine:i,verticalLine:n}=this,{direction:s}=e,{x1:r,y1:o,x2:a,y2:l}=t,c=ko.round(Po.center(t),0),h=this.getLineStyles(e);"vertical"!==s&&i.setProperties({...h,x1:r,x2:a,y1:c.y,y2:c.y}),"horizontal"!==s&&n.setProperties({...h,x1:c.x,x2:c.x,y1:o,y2:l})}updateText(e,t){const{direction:i}=e,n=ko.round(Po.center(t),0);let s;const r={...t};"vertical"===i?(s=this.verticalLine,r.x1=n.x,r.x2=n.x):(s=this.horizontalLine,r.y1=n.y,r.y2=n.y),this.text=this.updateNode(pr,this.text,!!e.text.label);const{id:o}=s,a=fr(o,s,r,e.text,this.text,e.text.label,e.strokeWidth);let l;if("both"===i&&a&&this.text){const e=Po.from(this.text.getBBox()),{offset:t}=a.numbers;e.x1<=n.x+t.x&&e.x2>=n.x-t.x&&(l={x:n.x,y:a.clipMask.y,radius:this.text.getBBox().height/2+ko.length(t)})}this.verticalLine.setClipMask(o,l)}updateCaps(e,t){const{horizontalEndCap:i,verticalEndCap:n}=this,{direction:s}=e,{x1:r,y1:o,x2:a,y2:l}=t,c=ko.round(Po.center(t),0),{stroke:h,strokeWidth:d,strokeOpacity:u}=this.getLineStyles(e),p={stroke:h,strokeWidth:d,strokeOpacity:u};if("vertical"!==s){const e=r<=a?0:Math.PI;let t=a;"horizontal"===s&&(t+=r<=a?-2:2),i.update({...p,x:t,y:c.y,angle:e})}if("horizontal"!==s){const e=o<=l?Math.PI/2:Math.PI/-2;let t=l;"vertical"===s&&(t+=o<=l?-2:2),n.update({...p,x:c.x,y:t,angle:e})}}updateBoundingLines(e,t){const{verticalStartLine:i,verticalEndLine:n,horizontalStartLine:s,horizontalEndLine:r}=this,{direction:o}=e,{x1:a,y1:l,x2:c,y2:h}=t,d=this.getLineStyles(e);"horizontal"===o&&(i.setProperties({...d,x1:a,y1:l,x2:a,y2:h}),n.setProperties({...d,x1:c,y1:l,x2:c,y2:h})),"vertical"===o&&(s.setProperties({...d,x1:a,y1:l,x2:c,y2:l}),r.setProperties({...d,x1:a,y1:h,x2:c,y2:h}))}updateStatistics(e,t,i){const n=ko.add(Po.bottomCenter(t),ko.from(0,10)),s={volume:this.getVolume(e)};e.hasPriceRange&&(s.priceRange={percentage:this.getPriceRangePercentage(e),value:this.getPriceRangeValue(e)}),e.hasDateRange&&(s.dateRange={bars:this.getDateRangeBars(t,i),value:this.getDateRangeValue(e)}),this.statistics.update(e,s,n,t,i,this.verticalDirection,e.localeManager)}updateAnchor(e,t,i,s){const r=Po.topCenter(t);ko.apply(this.anchor,n.n1.Transformable.toCanvasPoint(this.horizontalLine,r.x,r.y))}getBackgroundPoints(e,t,i,n){const[s,r]=ko.from(t),[o,a]=ko.from(i);return[s,r,a,o]}getLineStyles(e){const{lineDashOffset:t,stroke:i,strokeWidth:n,strokeOpacity:s}=e;return{lineCap:e.getLineCap(),lineDash:e.getLineDash(),lineDashOffset:t,stroke:i,strokeWidth:n,strokeOpacity:s,fillOpacity:0}}getBackgroundStyles(e){const{background:t}=e;return{fill:t.fill,fillOpacity:t.fillOpacity}}getHandleStyles(e){return{fill:e.handle.fill,stroke:e.handle.stroke??e.stroke,strokeOpacity:e.handle.strokeOpacity??e.strokeOpacity,strokeWidth:e.handle.strokeWidth??e.strokeWidth}}containsPoint(e,t){const{horizontalLine:i,text:n,verticalLine:s,horizontalStartLine:r,horizontalEndLine:o,verticalStartLine:a,verticalEndLine:l}=this;return super.containsPoint(e,t)||i.isPointInPath(e,t)||s.isPointInPath(e,t)||r.visible&&r.isPointInPath(e,t)||o.visible&&o.isPointInPath(e,t)||a.visible&&a.isPointInPath(e,t)||l.visible&&l.isPointInPath(e,t)||Boolean(n?.containsPoint(e,t))}getNodeAtCoords(e,t){return this.text?.containsPoint(e,t)?"text":this.start.containsPoint(e,t)||this.end.containsPoint(e,t)?"handle":"line"}getDateRangeBars(e,t){const{step:i}=t.xAxis.scale,n=e.x1<=e.x2?1:-1;return i?Math.round(Po.width(e)/i)*n:0}getDateRangeValue(e){const t=Ot(e.start.x),i=Ot(e.end.x);if(!(0,s.$P)(t)||!(0,s.$P)(i))throw new Error("Can not create a date range measurement of non-date x-axis.");return i.getTime()-t.getTime()}getPriceRangePercentage(e){if(null==e.start.y||null==e.end.y)throw new Error("Can not create a price range measurement of a non-numeric y-axis");const t=Ot(e.end.y),i=Ot(e.start.y);if(!(0,s.Et)(t)||!(0,s.Et)(i))throw new Error("Can not create a price range measurement of a non-numeric y-axis");return(t-i)/i}getPriceRangeValue(e){if(null==e.start.y||null==e.end.y)throw new Error("Can not create a price range measurement of a non-numeric y-axis");const t=Ot(e.end.y),i=Ot(e.start.y);if(!(0,s.Et)(t)||!(0,s.Et)(i))throw new Error("Can not create a price range measurement of a non-numeric y-axis");return t-i}getVolume(e){return e.getVolume(e.start.x,e.end.x)}},Oo=class extends No{constructor(){super(...arguments),this.type="quick-measurer"}static is(e){return as.isCheck(e,"quick-measurer")}createStatisticsScene(){return new Lo}getDirectionStyles(e){return"down"===this.verticalDirection?e.down:e.up}getLineStyles(e){const t=this.getDirectionStyles(e);return{...super.getLineStyles(e),stroke:t.stroke,strokeWidth:t.strokeWidth,strokeOpacity:t.strokeOpacity}}getBackgroundStyles(e){const t=this.getDirectionStyles(e);return{fill:t.fill,fillOpacity:t.fillOpacity}}getHandleStyles(e){const t=this.getDirectionStyles(e);return{fill:t.handle.fill,stroke:t.handle.stroke??t.stroke,strokeOpacity:t.handle.strokeOpacity??t.strokeOpacity,strokeWidth:t.handle.strokeWidth??t.strokeWidth}}},{StateMachine:_o,StateMachineProperty:Fo,Debug:Go}=n.n1,Vo=class extends _o{constructor(e){const t=({point:t})=>{const i=this.createDatum();i.set({start:t,end:t}),e.create(i)},i=({point:t})=>{const{datum:i,node:n}=this;i?.set({end:t}),n?.toggleActive(!0),n?.toggleHandles({end:!1}),e.update()},n=()=>{this.node?.toggleHandles({end:!0})},s=()=>e.delete();super("start",{start:{reset:_o.parent,click:{target:"end",action:t},drag:{target:"end",action:t}},end:{hover:i,drag:i,click:{target:_o.parent,action:n},dragEnd:{target:_o.parent,action:n},reset:{target:_o.parent,action:s},cancel:{target:_o.parent,action:s},onExit:()=>{e.showAnnotationOptions(),nn(this.datum)||e.recordAction(`Create ${this.node?.type} annotation`)}}}),this.debug=Go.create(!0,"annotations")}};a([Fo()],Vo.prototype,"datum",2),a([Fo()],Vo.prototype,"node",2);var Bo=class extends Vo{createDatum(){return new fi}},Ho=class extends Vo{createDatum(){return new mi}},zo=class extends Vo{createDatum(){return new vi}},Uo=class extends Vo{createDatum(){return new yi}},Wo={type:"date-range",datum:fi,scene:No,isDatum:fi.is,translate:(e,t,i,n)=>{fi.is(t)&&No.is(e)&&e.translate(t,i,n)},copy:(e,t,i,n)=>{if(fi.is(t)&&fi.is(i)&&No.is(e))return e.copy(t,i,n)},update:(e,t,i)=>{fi.is(t)&&No.is(e)&&e.update(t,i)},createState:(e,{createDatum:t})=>new Bo({...e,create:t("date-range")}),dragState:e=>new qn(e)},jo={type:"price-range",datum:mi,scene:No,isDatum:mi.is,translate:(e,t,i,n)=>{mi.is(t)&&No.is(e)&&e.translate(t,i,n)},copy:(e,t,i,n)=>{if(mi.is(t)&&mi.is(i)&&No.is(e))return e.copy(t,i,n)},update:(e,t,i)=>{mi.is(t)&&No.is(e)&&e.update(t,i)},createState:(e,{createDatum:t})=>new Ho({...e,create:t("date-range")}),dragState:e=>new qn(e)},Ko={type:"date-price-range",datum:vi,scene:No,isDatum:vi.is,translate:(e,t,i,n)=>{vi.is(t)&&No.is(e)&&e.translate(t,i,n)},copy:(e,t,i,n)=>{if(vi.is(t)&&vi.is(i)&&No.is(e))return e.copy(t,i,n)},update:(e,t,i)=>{vi.is(t)&&No.is(e)&&e.update(t,i)},createState:(e,{createDatum:t})=>new zo({...e,create:t("date-range")}),dragState:e=>new qn(e)},$o={type:"quick-date-price-range",datum:yi,scene:Oo,isDatum:yi.is,translate:(e,t,i,n)=>{yi.is(t)&&Oo.is(e)&&e.translate(t,i,n)},copy:(e,t,i,n)=>{if(yi.is(t)&&yi.is(i)&&Oo.is(e))return e.copy(t,i,n)},update:(e,t,i)=>{yi.is(t)&&Oo.is(e)&&e.update(t,i)},createState:(e,{createDatum:t})=>new Uo({...e,create:t("quick-date-price-range")}),dragState:e=>new qn(e)},{ZIndexMap:Yo,TextWrapper:qo}=n.n1,Xo=class extends Js{constructor(){super(),this.type="note",this.shape=new n.n1.Rect,this.iconBackground=new n.n1.SvgPath("M22 1.83333C22 0.820811 21.1792 0 20.1667 0H1.83333C0.820811 0 0 0.82081 0 1.83333V13.9868C0 14.9994 0.820811 15.8202 1.83333 15.8202L5.88971 15.8202C6.44575 15.8202 6.97175 16.0725 7.31971 16.5062L9.57006 19.3112C10.304 20.2259 11.6962 20.2259 12.4301 19.3112L14.6804 16.5062C15.0284 16.0725 15.5544 15.8202 16.1104 15.8202L20.1667 15.8202C21.1792 15.8202 22 14.9994 22 13.9868V1.83333Z"),this.iconLines=new n.n1.SvgPath("M17.1114 5.75C17.1114 6.16421 16.7756 6.5 16.3614 6.5H5.63916C5.22495 6.5 4.88916 6.16421 4.88916 5.75V5.75C4.88916 5.33579 5.22495 5 5.63916 5H16.3614C16.7756 5 17.1114 5.33579 17.1114 5.75V5.75ZM17.1114 9.25C17.1114 9.66421 16.7756 10 16.3614 10H5.63916C5.22495 10 4.88916 9.66421 4.88916 9.25V9.25C4.88916 8.83579 5.22495 8.5 5.63916 8.5H16.3614C16.7756 8.5 17.1114 8.83579 17.1114 9.25V9.25Z"),this.active=!1,this.shape.visible=!1,this.label.visible=!1,this.iconBackground.fillShadow=new n.n1.DropShadow,this.append([this.shape,this.label,this.iconBackground,this.iconLines,this.handle])}static is(e){return as.isCheck(e,"note")}update(e,t){this.updateIcon(e,t),super.update(e,t)}getTextBBox(e,t,i){const n=super.getTextBBox(e,t,i);n.x-=e.width/2,n.x=(0,s.qE)(0,n.x,i.seriesRect.width-e.width);const r=e.getPadding().top,o=n.y-30-2*r,a=n.y+rs.HANDLE_SIZE+2*r;return o-n.height-34<0?(n.y=a,e.position="top"):(n.y=o+r,e.position="bottom"),n}updateLabel(e,t){const i=!1!==e.visible&&this.label.visible;super.updateLabel(e,t),this.label.visible=i,this.label.text=qo.wrapText(e.text,{font:{fontFamily:e.fontFamily,fontSize:e.fontSize,fontStyle:e.fontStyle,fontWeight:e.fontWeight},avoidOrphans:!1,textAlign:e.textAlign,textBaseline:"hanging",textWrap:"always",maxWidth:200})}updateShape(e,t){const{shape:i}=this;i.fill=e.background.fill,i.fillOpacity=e.background.fillOpacity??1,i.stroke=e.background.stroke,i.strokeOpacity=e.background.strokeOpacity??1,i.strokeWidth=e.background.strokeWidth??1,i.cornerRadius=4;const n=e.getPadding().top,s="top"===e.position;i.x=t.x-n,i.width=e.width+2*n,i.height=t.height+2*n,i.y=t.y+(s?0:-t.height)-n}updateIcon(e,t){const{active:i,iconBackground:n,iconLines:s}=this,{x:r,y:o}=Gt(e,t);n.x=r-11,n.y=o-20,s.x=n.x,s.y=n.y,n.fill=e.fill,n.fillOpacity=e.fillOpacity??1,n.stroke=e.stroke,n.strokeOpacity=e.strokeOpacity??1,n.strokeWidth=e.strokeWidth??1,s.fill=e.stroke,n.fillShadow.color=i?e.fill??"rgba(0, 0, 0, 0.22)":"rgba(0, 0, 0, 0.22)"}updateAnchor(e,t,i){const n=e.getPadding().top,s="top"===e.position,r=s?1:-1;return{x:t.x+i.seriesRect.x+e.width/2,y:t.y+i.seriesRect.y+r*(t.height+n),position:s?"below":"above"}}getLabelCoords(e,t){const i="top"===e.position,n=e.getPadding().top+e.fontSize*wi/2;return{x:t.x,y:t.y+(i?n/2:0)}}getTextBaseline(e){return"top"===e.position?"middle":e.position}getHandleCoords(e,t,i){return{x:t.x,y:t.y+rs.HANDLE_SIZE/2+4}}getHandleStyles(e){return{fill:e.handle.fill,stroke:e.handle.stroke??e.fill,strokeOpacity:e.handle.strokeOpacity,strokeWidth:e.handle.strokeWidth}}toggleHovered(e){super.toggleHovered(e),this.label.visible=e,this.shape.visible=e,this.zIndex=e?Yo.CHART_ANNOTATION_FOCUSED:Yo.CHART_ANNOTATION}toggleActive(e){super.toggleActive(e),this.label.visible=e,this.shape.visible=e,this.active=e}containsPoint(e,t){return!(!this.shape.visible||!this.shape.containsPoint(e,t))||!!this.iconBackground.containsPoint(e,t)||super.containsPoint(e,t)}},Zo=class extends rr{createDatum(){return new Ri}},Qo={type:"note",datum:Ri,scene:Xo,isDatum:Ri.is,translate:(e,t,i,n)=>{Ri.is(t)&&Xo.is(e)&&e.translate(t,i,n)},copy:(e,t,i,n)=>{if(Ri.is(t)&&Ri.is(i)&&Xo.is(e))return e.copy(t,i,n)},update:(e,t,i)=>{Ri.is(t)&&Xo.is(e)&&e.update(t,i)},createState:(e,{createDatum:t})=>new Zo({...e,create:t("note")}),dragState:e=>new qn(e)},{Vec2:Jo,Vec4:ea}=n.n1,ta=class extends kr{constructor(){super(),this.type="parallel-channel",this.handles={topLeft:new rs,topMiddle:new ns,topRight:new rs,bottomLeft:new rs,bottomMiddle:new ns,bottomRight:new rs},this.middleLine=new ur,this.append([this.background,this.topLine,this.middleLine,this.bottomLine,...Object.values(this.handles)])}static is(e){return as.isCheck(e,"parallel-channel")}dragHandle(e,t,i,n){const{activeHandle:s,handles:r}=this;if(null==s)return;const{offset:o}=r[s].drag(t);r[s].toggleDragging(!0),"topMiddle"!==s&&"bottomMiddle"!==s||(o.x=0);let a=[],l=n;switch(s){case"topLeft":case"bottomLeft":a=["topLeft","bottomLeft"];break;case"topMiddle":a=["topLeft","topRight"],o.y-=ns.HANDLE_SIZE/2,l=!1;break;case"topRight":case"bottomRight":a=["topRight","bottomRight"];break;case"bottomMiddle":a=["bottomLeft","bottomRight"],o.y-=ns.HANDLE_SIZE/2,l=!1}const c=Ft(e,i),h=Ft(e.bottom,i);if(!c||!h)return;const d={topLeft:ea.start(c),topRight:ea.end(c),bottomLeft:ea.start(h),bottomRight:ea.end(h)},u={vectors:{topLeft:d.topRight,bottomLeft:d.bottomRight,topRight:d.topLeft,bottomRight:d.bottomLeft},angle:e.snapToAngle},p=gs(d,o,i,{overflowContinuous:this.overflowContinuous,translateVectors:a,snap:l?u:void 0});e.start.x=p.topLeft.x,e.start.y=p.topLeft.y,e.end.x=p.topRight.x,e.end.y=p.topRight.y,e.height=p.topLeft.y-p.bottomLeft.y}getTranslatePointsVectors(e,t){const{bottomLeft:i,topLeft:n}=this.handles,s=i.getBBox().y-n.getBBox().y;return{start:e,end:t,bottomStart:Jo.add(e,Jo.from(0,s)),bottomEnd:Jo.add(t,Jo.from(0,s))}}containsPoint(e,t){return super.containsPoint(e,t)||this.middleLine.visible&&this.middleLine.strokeWidth>0&&this.middleLine.containsPoint(e,t)}getNodeAtCoords(e,t){return this.middleLine.visible&&this.middleLine.strokeWidth>0&&this.middleLine.containsPoint(e,t)?"line":super.getNodeAtCoords(e,t)}updateLines(e,t,i,n,s,r){const{topLine:o,middleLine:a,bottomLine:l}=this,{lineDashOffset:c,stroke:h,strokeOpacity:d,strokeWidth:u}=e,p=e.getLineDash(),g={lineCap:e.getLineCap(),lineDash:p,lineDashOffset:c,stroke:h,strokeOpacity:d,strokeWidth:u};o.setProperties({...t,...g}),l.setProperties({...i,...g});const f=this.extendLine({x1:s.x1,y1:r.y1+(s.y1-r.y1)/2,x2:s.x2,y2:r.y2+(s.y2-r.y2)/2},e,n);a.setProperties({...f,lineDash:e.middle.lineDash??p,lineDashOffset:e.middle.lineDashOffset??c,stroke:e.middle.stroke??h,strokeOpacity:e.middle.strokeOpacity??d,strokeWidth:e.middle.strokeWidth??u,visible:e.middle.visible??!0})}updateHandles(e,t,i){const{handles:{topLeft:n,topMiddle:s,topRight:r,bottomLeft:o,bottomMiddle:a,bottomRight:l}}=this,c={fill:e.handle.fill,stroke:e.handle.stroke??e.stroke,strokeOpacity:e.handle.strokeOpacity??e.strokeOpacity,strokeWidth:e.handle.strokeWidth??e.strokeWidth};n.update({...c,...ea.start(t)}),r.update({...c,...ea.end(t)}),o.update({...c,...ea.start(i)}),l.update({...c,...ea.end(i)}),s.update({...c,...Jo.sub(ea.center(t),Jo.from(s.handle.width/2,s.handle.height/2))}),a.update({...c,...Jo.sub(ea.center(i),Jo.from(a.handle.width/2,a.handle.height/2))})}updateText(e,t,i){this.text=this.updateNode(pr,this.text,!!e.text.label),mr(!0,t,i,e.text,e.strokeWidth,this.text,e.text.label)}getBackgroundPoints(e,t,i,n){const s=t.x1>t.x2,r=t.y1>t.y2,o=t.x1!==i.x1&&t.y1!==i.y1,a=t.x2!==i.x2&&t.y2!==i.y2,l=Jo.from(t);return e.extendEnd&&a&&l.push(Jo.from(s?n.x1:n.x2,r?n.y1:n.y2)),l.push(...Jo.from(i).reverse()),e.extendStart&&o&&l.push(Jo.from(s?n.x2:n.x1,r?n.y2:n.y1)),l}},{StateMachine:ia,StateMachineProperty:na,Debug:sa}=n.n1,ra=class extends ia{constructor(e){const t=({point:t})=>{const i=new Ji;i.set({start:t,end:t,height:0}),e.create(i)},i=({offset:t,context:i})=>{const{datum:n,snapping:s}=this;n&&(n.set({end:ds(t,i,s,n.start,n.snapToAngle)}),e.update())},n=()=>{this.node?.toggleHandles({topRight:!0}),e.update()},r=({point:t})=>{const{datum:i,node:n}=this,r=Ot(i?.end.y),o=Ot(i?.start.y),{y:a}=t;if(null==i||!(0,s.Et)(o)||!(0,s.Et)(r)||!(0,s.Et)(a))return;const l=r-(a??0),c=o-l;n?.toggleHandles(!0),e.validatePoint({x:i.start.x,y:c},{overflowContinuous:!0})&&e.validatePoint({x:i.end.x,y:t.y},{overflowContinuous:!0})&&(i.set({height:l}),e.recordAction("Create parallel-channel annotation"),e.showAnnotationOptions(),e.update())},o=()=>e.delete();super("start",{start:{click:{target:"waiting-first-render",action:t},drag:{target:"waiting-first-render",action:t},reset:ia.parent},"waiting-first-render":{render:{target:"end",action:()=>{const{node:e}=this;e?.toggleActive(!0),e?.toggleHandles({topLeft:!0,topMiddle:!1,topRight:!1,bottomLeft:!1,bottomMiddle:!1,bottomRight:!1})}}},end:{hover:i,drag:i,click:{target:"height",action:n},dragEnd:{target:"height",action:n},reset:{target:ia.parent,action:o},cancel:{target:ia.parent,action:o}},height:{hover:({point:t})=>{const{datum:i,node:n}=this,r=Ot(i?.end.y),o=Ot(i?.start.y),{y:a}=t;if(null==i||!(0,s.Et)(o)||!(0,s.Et)(r)||!(0,s.Et)(a))return;const l=r-(a??0),c=o-l;n?.toggleHandles({bottomLeft:!0,bottomRight:!0}),e.validatePoint({x:i.start.x,y:c},{overflowContinuous:!0})&&e.validatePoint({x:i.end.x,y:t.y},{overflowContinuous:!0})&&(i.set({height:l}),e.update())},click:{target:ia.parent,action:r},drag:{target:ia.parent,action:r},reset:{target:ia.parent,action:o},cancel:{target:ia.parent,action:o}}}),this.debug=sa.create(!0,"annotations"),this.snapping=!1}};a([na()],ra.prototype,"datum",2),a([na()],ra.prototype,"node",2),a([na()],ra.prototype,"snapping",2);var oa={type:"parallel-channel",datum:Ji,scene:ta,isDatum:Ji.is,translate:(e,t,i,n)=>{Ji.is(t)&&ta.is(e)&&e.translate(t,i,n)},copy:(e,t,i,n)=>{if(Ji.is(t)&&Ji.is(i)&&ta.is(e))return e.copy(t,i,n)},update:(e,t,i)=>{Ji.is(t)&&ta.is(e)&&e.update(t,i)},createState:(e,{createDatum:t})=>new ra({...e,create:t("parallel-channel")}),dragState:e=>new qn(e)},aa=class extends Js{constructor(){super(),this.type="text",this.append([this.label,this.handle])}static is(e){return as.isCheck(e,"text")}getHandleCoords(e,t){const i=rs.HANDLE_SIZE/2;return{x:t.x+i,y:t.y+2+i}}},la=class extends rr{createDatum(){return new tn}},ca={type:"text",datum:tn,scene:aa,isDatum:tn.is,translate:(e,t,i,n)=>{tn.is(t)&&aa.is(e)&&e.translate(t,i,n)},copy:(e,t,i,n)=>{if(tn.is(t)&&tn.is(i)&&aa.is(e))return e.copy(t,i,n)},update:(e,t,i)=>{tn.is(t)&&aa.is(e)&&e.update(t,i)},createState:(e,{createDatum:t})=>new la({...e,create:t("text")}),dragState:e=>new qn(e)},ha={[wo.type]:wo,[Dr.type]:Dr,[Ir.type]:Ir,[oa.type]:oa,[Br.type]:Br,[fo.type]:fo,[no.type]:no,[Qs.type]:Qs,[ar.type]:ar,[Qo.type]:Qo,[ca.type]:ca,[xo.type]:xo,[Ps.type]:Ps,[Is.type]:Is,[Wo.type]:Wo,[jo.type]:jo,[Ko.type]:Ko,[$o.type]:$o};function da(e){for(const{isDatum:t}of Object.values(ha))if(t(e))return e}var{ActionOnSet:ua,ParallelStateMachine:pa,StateMachine:ga,StateMachineProperty:fa,Debug:ma}=n.n1,va=class extends pa{constructor(e){super(new ya(e=>{this.snapping=e}),new Ca(()=>{this.node=null==this.active?void 0:e.node(this.active)}),new ba(e,t=>{this.active=t,this.datum=null==this.active?void 0:e.datum(this.active),this.node=null==this.active?void 0:e.node(this.active)})),this.snapping=!1}getActive(){return this.active}isActive(e){return e===this.active}};a([fa()],va.prototype,"snapping",2),a([fa()],va.prototype,"datum",2),a([fa()],va.prototype,"node",2);var ya=class extends ga{constructor(e){super("idle",{idle:{hover:({shiftKey:t})=>e(t),keyDown:({shiftKey:t})=>e(t),keyUp:({shiftKey:t})=>e(t),click:({shiftKey:t})=>e(t),drag:({shiftKey:t})=>e(t)},dragging:{},translating:{},"text-input":{}})}},Ca=class extends ga{constructor(e){super("idle",{idle:{onEnter:e,render:e},dragging:{onEnter:e,render:e},translating:{onEnter:e,render:e},"text-input":{render:e}})}},ba=class extends ga{constructor(e,t){const i=()=>{null!=this.active&&e.delete(this.active),this.active=void 0,e.select()},n={createDatum:t=>i=>{e.create(t,i),this.active=e.selectLast()}},s={...e,delete:i,showTextInput:()=>{null!=this.active&&e.showTextInput(this.active)},deselect:()=>{const t=this.active;this.active=void 0,this.hovered=void 0,e.select(this.active,t)},showAnnotationOptions:()=>{null!=this.active&&e.showAnnotationOptions(this.active)}},r=({colorPickerType:t,colorOpacity:i,color:n,opacity:s,isMultiColor:r})=>{this.datum&&("text-color"===t&&e.updateTextInputColor(n),vn(this.datum,t,i,n,s,r),e.update())},o=t=>{const{datum:i,node:n}=this;i&&n&&(an(i)?(i.fontSize=t,e.updateTextInputFontSize(t)):gn(i)&&(i.text.fontSize=t),e.update())},a=t=>{const{node:i}=this;i&&"setTextInputBBox"in i&&(i.setTextInputBBox(t),e.update())},l=({textInputValue:t,bbox:i})=>{const{datum:n}=this;if(null!=i&&null!=t&&t.length>0){if(!an(n))return;const s=Ei(n,t,i.width);n.set({text:s}),e.update(),e.recordAction(`Change ${n.type} annotation text`)}else e.delete(this.active),e.recordAction(`Delete ${n?.type} annotation`)},c=()=>{e.updateTextInputBBox(void 0)},h=()=>null!=this.active,d=()=>{const{active:e,datum:t}=this;return null!=e&&!!t&&gn(t)&&!t.locked},u=()=>null!=this.active&&!nn(this.datum);super("idle",{idle:{onEnter:()=>{e.select(this.active,this.active),this.hoverCoords&&(this.hovered=e.hoverAtCoords(this.hoverCoords,this.active,this.hovered))},hover:({offset:t})=>{this.hovered=e.hoverAtCoords(t,this.active,this.hovered),this.hoverCoords=t},translate:{guard:h,target:"translating",action:({translation:t})=>{e.startInteracting(),e.translate(this.active,t),e.update()}},copy:{guard:u,action:()=>{this.copied=e.copy(this.active)}},cut:{guard:u,action:()=>{this.copied=e.copy(this.active),i()}},paste:{guard:()=>null!=this.copied,action:()=>{e.paste(this.copied)}},selectLast:()=>{const t=this.active;this.active=e.selectLast(),e.select(this.active,t)},click:[{guard:()=>{const{active:e,hovered:t,datum:i}=this;return null!=e&&t===e&&!!i&&an(i)&&!i.locked},target:"text-input"},{action:()=>{const t=this.active;this.active=this.hovered,e.select(this.active,t)}}],dblclick:{guard:d,action:({offset:t})=>{const i="text"===e.getNodeAtCoords(t,this.active)?"text":"line";e.showAnnotationSettings(this.active,void 0,i)}},dragStart:[{guard:()=>null!=this.hovered,target:"dragging",action:()=>{const t=this.active;this.active=this.hovered,e.select(this.active,t),e.startInteracting()}},{action:()=>{const t=this.active;this.active=this.hovered,e.select(this.active,t)}}],color:{guard:h,action:r},fontSize:{guard:h,action:o},lineProps:{guard:h,action:t=>{const i=da(this.datum);i?.set(t),e.update(),e.recordAction(`Change ${i?.type} ${Object.entries(t).map(([e,t])=>`${e} to ${t}`).join(", ")}`)}},lineStyle:{guard:h,action:t=>{const{datum:i,node:n}=this;i&&n&&hn(i)&&(mn(i,t),e.update())}},lineText:{guard:h,action:t=>{const i=da(this.datum);gn(i)&&(rn(i)&&"center"===t.position&&(t.position="inside"),i.text.set(t),e.update())}},updateTextInputBBox:{guard:h,action:a},toolbarPressSettings:{guard:d,action:t=>{e.showAnnotationSettings(this.active,t)}},reset:()=>{null!=this.active&&this.node?.toggleActive(!1),this.hovered=void 0,this.active=void 0,e.select(this.active,this.active),e.resetToIdle()},delete:()=>{null!=this.active&&(e.delete(this.active),nn(this.datum)||e.recordAction(`Delete ${this.datum?.type} annotation`))},deleteAll:()=>{e.deleteAll()},...Object.fromEntries(Object.entries(ha).map(([e,t])=>[e,t.createState(s,n)]))},dragging:{onEnter:(t,i)=>{if(null==this.active)return;const n=e.getAnnotationType(this.active);n&&(this.transitionRoot(n),this.transitionRoot("dragStart",i))},...Object.fromEntries(Object.entries(ha).map(([t,i])=>[t,i.dragState(e,n)]))},translating:{onEnter:()=>{},translate:{guard:h,target:"translating",action:({translation:t})=>{e.startInteracting(),e.translate(this.active,t),e.update()}},translateEnd:{guard:h,target:"idle"},onExit:()=>{e.stopInteracting(),e.update(),e.recordAction("Translate annotation")}},"text-input":{onEnter:()=>{if(null==this.active)return;const t=da(this.datum);t&&"getTextInputCoords"in t&&(e.startInteracting(),e.showTextInput(this.active),t.visible=!1,e.update())},updateTextInputBBox:{guard:h,action:a},resize:{target:"idle",action:l},click:{target:"idle",action:l},drag:{target:"idle",action:l},textInput:[{guard:js,target:"idle",action:c},{guard:Ks,target:"idle",action:l}],color:{guard:h,action:r},fontSize:{guard:h,action:o},cancel:{target:"idle",action:c},onExit:()=>{e.stopInteracting(),e.hideTextInput();const t=this.active;if(this.active=this.hovered=void 0,e.select(this.active,t),null==t)return;const i=e.datum(t),n=e.node(t);i&&n&&(i.visible=!0)}}}),this.setActive=t,this.debug=ma.create(!0,"annotations"),this.snapping=!1}};a([ua({changeValue(e){this.setActive(e)}}),fa()],ba.prototype,"active",2),a([fa()],ba.prototype,"hovered",2),a([fa()],ba.prototype,"hoverCoords",2),a([fa()],ba.prototype,"copied",2),a([fa()],ba.prototype,"snapping",2),a([fa()],ba.prototype,"datum",2),a([fa()],ba.prototype,"node",2);var{ActionOnSet:Sa,LayoutElement:wa,Menu:xa,PropertiesArray:Ea,ToolbarButtonProperties:Ma,Property:Aa,ChartAxisDirection:Ta}=n.n1,Da=class extends Ma{};a([Aa],Da.prototype,"value",2);var Ia=class extends n.n1.BaseProperties{constructor(e){super(),this.ctx=e,this.enabled=!0,this.padding=20,this.buttons=new Ea(Da),this.events=new n.n1.Listeners,this.annotationMenu=new xa(this.ctx,"annotations"),this.destroyFns=[],this.toolbar=e.sharedToolbar.getSharedToolbar("annotations");const t=this.onKeyDown.bind(this);this.toolbar.addListener("keydown",t),this.destroyFns.push(this.toolbar.addToolbarListener("button-pressed",this.onToolbarButtonPress.bind(this)),e.layoutManager.registerElement(wa.ToolbarLeft,this.onLayoutStart.bind(this)),()=>{this.toolbar.removeListener("keydown",t),this.toolbar.destroy()})}destroy(){for(const e of this.destroyFns)e()}addListener(e,t){return this.events.addListener(e,t)}toggleVisibility(e){this.toolbar.setHidden(!e)}toggleClearButtonEnabled(e){const t=this.buttons.findIndex(e=>"clear"===e.value);this.toolbar.toggleButtonEnabledByIndex(t,e)}resetButtonIcons(){for(const[e,t]of this.buttons.entries())switch(t.value){case"line-menu":this.updateButtonByIndex(e,{icon:"trend-line-drawing",value:"line-menu"});break;case"fibonacci-menu":this.updateButtonByIndex(e,{icon:"fibonacci-retracement-drawing",value:"fibonacci-menu"});break;case"text-menu":this.updateButtonByIndex(e,{icon:"text-annotation",value:"text-menu"});break;case"shape-menu":this.updateButtonByIndex(e,{icon:"arrow-drawing",value:"shape-menu"});break;case"measurer-menu":this.updateButtonByIndex(e,{icon:"measurer-drawing",value:"measurer-menu"})}}hideOverlays(){this.annotationMenu.hide()}clearActiveButton(){this.toolbar.clearActiveButton()}dispatch(e,t){this.events.dispatch(e,t)}onLayoutStart(e){this.enabled&&(this.toolbar.updateButtons(this.buttons),this.toolbar.layout(e.layoutBox,this.padding))}refreshButtonsEnabled(e){for(const[t,i]of this.buttons.entries())i&&this.toolbar.toggleButtonEnabledByIndex(t,e)}onToolbarButtonPress({event:e,button:t,buttonBounds:i}){const n=this.ctx.axisManager.getAxisContext(Ta.Y)[0].scale;switch(t.value){case"clear":this.dispatch("pressed-clear");break;case"line-menu":this.onToolbarButtonPressShowMenu(e,i,t.value,"toolbarAnnotationsLineAnnotations",En.filter(e=>!e.visible||e.visible(n)));break;case"fibonacci-menu":this.onToolbarButtonPressShowMenu(e,i,t.value,"toolbarAnnotationsFibonacciAnnotations",Mn);break;case"text-menu":this.onToolbarButtonPressShowMenu(e,i,t.value,"toolbarAnnotationsTextAnnotations",Tn);break;case"shape-menu":this.onToolbarButtonPressShowMenu(e,i,t.value,"toolbarAnnotationsShapeAnnotations",Dn);break;case"measurer-menu":this.onToolbarButtonPressShowMenu(e,i,t.value,"toolbarAnnotationsMeasurerAnnotations",In)}}onToolbarButtonPressShowMenu(e,t,i,n,s){this.dispatch("pressed-show-menu");const r=this.buttons.findIndex(e=>e.value===i);this.toolbar.toggleActiveButtonByIndex(r),this.annotationMenu.setAnchor({x:t.x+t.width+6,y:t.y}),this.annotationMenu.show({items:s,ariaLabel:this.ctx.localeManager.t(n),class:"ag-charts-annotations__toolbar-menu",sourceEvent:e.sourceEvent,onPress:this.onButtonPressMenuCreateAnnotation.bind(this,i)})}onButtonPressMenuCreateAnnotation(e,t){const i=this.buttons.findIndex(t=>t.value===e);this.updateButtonByIndex(i,{icon:t.icon}),this.dispatch("pressed-create-annotation",{annotation:t.value}),this.annotationMenu.hide()}onKeyDown({sourceEvent:e}){"Escape"===e.key&&this.dispatch("cancel-create-annotation")}updateButtonByIndex(e,t){const i=this.buttons.at(e);i&&(i.set({...i.toJson(),...t,value:t.value??i.value}),this.toolbar.updateButtonByIndex(e,{...i.toJson()}))}};a([Aa,Sa({changeValue(e){this.toolbar?.setHidden(!e)}})],Ia.prototype,"enabled",2),a([Aa],Ia.prototype,"padding",2),a([Aa],Ia.prototype,"buttons",2);var{BaseModuleInstance:Ra,InteractionState:La,Property:ka,ChartAxisDirection:Pa,getIconClassNames:Na}=n.n1,Oa="ag-charts-annotations__axis-button",_a=class extends Ra{constructor(e,t,i,n){super(),this.ctx=e,this.axisCtx=t,this.onButtonClick=i,this.seriesRect=n,this.enabled=!0,this.snap=!1,this.padding=0,this.button=this.setup(),this.toggleVisibility(!1),this.updateButtonElement(),this.snap=Boolean(t.scale.bandwidth),e.domManager.addEventListener("focusin",({target:t})=>{const i=t instanceof HTMLElement?t:void 0;i&&e.domManager.contains(i,"series-area")||i===this.button.getElement()||this.hide()}),this.destroyFns.push(e.widgets.seriesWidget.addListener("drag-move",e=>this.onMouseDrag(e)),e.widgets.seriesWidget.addListener("mousemove",e=>this.onMouseMove(e)),e.widgets.seriesWidget.addListener("mouseleave",()=>this.onMouseLeave()),e.widgets.seriesDragInterpreter.addListener("click",e=>this.onClick(e)),e.chartEventManager.addListener("series-focus-change",()=>this.onKeyPress()),e.zoomManager.addListener("zoom-pan-start",()=>this.hide()),e.zoomManager.addListener("zoom-change",()=>this.hide()),()=>this.destroyElements(),()=>this.button.destroy())}update(e,t){this.seriesRect=e,this.padding=t}setup(){const e=new n.uB.ButtonWidget;return e.addClass(Oa),e.setTabIndex(-1),e.setAriaLabel(this.ctx.localeManager.t("ariaLabelAddHorizontalLine")),this.ctx.widgets.seriesWidget.getElement().appendChild(e.getElement()),e}destroyElements(){this.ctx.domManager.removeChild("canvas-overlay",Oa)}onMouseMove(e){this.ctx.interactionManager.isState(La.Clickable)&&this.show(e)}onMouseDrag(e){this.ctx.interactionManager.isState(La.AnnotationsMoveable)&&this.show(e)}onMouseLeave(){this.ctx.interactionManager.isState(La.Clickable)&&this.hide()}onClick(e){this.ctx.interactionManager.isState(La.Clickable)&&"touch"===e.device&&this.show(e)}show(e){const{sourceEvent:t,currentX:i,currentY:n}=e;if(!this.enabled||!this.ctx.widgets.seriesWidget.getElement().contains(t.target))return void this.hide();this.toggleVisibility(!0);const s=this.getButtonCoordinates({x:i,y:n});this.coords={x:s.x+this.button.clientWidth/2,y:s.y+this.button.clientHeight/2},this.updatePosition(s)}hide(){this.toggleVisibility(!1)}onKeyPress(){this.snap&&this.ctx.interactionManager.isState(La.Default)||this.hide()}getButtonCoordinates({x:e,y:t}){const{axisCtx:{direction:i,position:n},seriesRect:s,snap:r,axisCtx:o,padding:a}=this,{clientWidth:l,clientHeight:c}=this.button,[h,d]=[0,s.height],[u,p]=[0,s.width];if(r&&(e=Vt(Ht(e-s.x,o),o)+s.x,t=Vt(Ht(t-s.y,o),o)+s.y),i===Pa.X){const i=5,s=c-Math.max(0,a-i);e-=l/2,t="top"===n?h-c+s:d-s}else{const i=9,s=l-Math.max(0,a-i);e="left"===n?u-l+s:p-s,t-=c/2}return{x:e,y:t}}toggleVisibility(e){const{button:t}=this;if(null==t)return;const i=this.enabled&&e;this.toggleClass("-hidden",!i)}toggleClass(e,t){this.button.toggleClass(`${Oa}-${e}`,t)}updatePosition({x:e,y:t}){this.button.getElement().style.transform=`translate(${Math.round(e)}px, ${Math.round(t)}px)`}updateButtonElement(){const{button:e}=this;e.addListener("click",()=>this.onButtonClick(this.coords)),e.addListener("touchend",()=>this.onButtonClick(this.coords)),e.addListener("drag-start",()=>{}),e.setInnerHTML(`<span class="${Na("zoom-in")} ${Oa}-icon"></span>`)}};a([ka],_a.prototype,"enabled",2);var{Color:Fa,DraggablePopover:Ga,NativeWidget:Va,Vec2:Ba,createButton:Ha,createCheckbox:za,createSelect:Ua,createTextArea:Wa,initRovingTabIndex:ja,getIconClassNames:Ka,mapValues:$a}=n.n1,Ya=class e extends Ga{constructor(e,t){super(e,t),this.dragHandleDraggingClass="ag-charts-dialog__drag-handle--dragging",this.colorPicker=new wn(this.ctx,{detached:!0}),this.destroyFns.push(e.layoutManager.addListener("layout:complete",this.onLayoutComplete.bind(this)))}showWithChildren(e,t){const i=super.showWithChildren(e,t);return i.classList.add("ag-charts-dialog"),i.setAttribute("role","dialog"),i.addEventListener("mousedown",e=>{e.target.classList?.contains("ag-charts-dialog__color-picker-button")||this.colorPicker.hide()}),i.addEventListener("keydown",this.onKeyDown.bind(this)),(0,s.zk)().requestAnimationFrame(()=>this.reposition()),this.colorPicker.attachTo(this),i}updatePosition(e){super.updatePosition(e);const{anchor:t,fallbackAnchor:i}=this.getColorPickerAnchors()??{};t&&this.colorPicker.setAnchor(t,i)}createTabs(e,t,i){const n=(0,s.n)("div","ag-charts-dialog__tabs"),r=$a(i,()=>(0,s.wW)()),o=$a(i,()=>(0,s.wW)());for(const[e,t]of(0,s.jO)(i))(0,s.Wp)(t.panel,{id:o[e],role:"tabpanel","aria-labelledby":r[e]});const a=e=>{for(const[t,n]of(0,s.jO)(i))n.panel.classList.toggle("ag-charts-dialog__tab-panel--active",t===e),h[t].classList.toggle("ag-charts-dialog__tab-button--active",t===e),(0,s.Bq)(h[t],"aria-selected",t===e),t===e&&n.onShow?.()},l=new Va((0,s.n)("div","ag-charts-dialog__header"));l.addListener("drag-start",e=>{const{sourceEvent:t}=e;t.target instanceof Element&&t.target.classList.contains("ag-charts-dialog__header")&&this.onDragStart(e)}),l.addListener("drag-move",e=>this.onDragMove(e)),l.addListener("drag-end",()=>this.onDragEnd());const c=new Xa;this.setDragHandle(c);const h=$a(i,(e,t)=>Ha({label:this.ctx.localeManager.t(e.label),onPress:()=>a(t)},{id:r[t],class:"ag-charts-dialog__tab-button",role:"tab","aria-controls":o[t]})),d=(0,s.n)("div","ag-charts-dialog__tab-list");(0,s.Wp)(d,{role:"tablist","aria-label":this.ctx.localeManager.t(e)}),d.append(...Object.values(h));const u=this.createHeaderCloseButton();return l.getElement().append(c.getElement(),d,u),n.append(l.getElement(),...Object.values(i).map(e=>e.panel)),a(t),ja({orientation:"horizontal",buttons:Object.values(h)}),{tabs:n,initialFocus:h[t]}}createTabPanel(){return(0,s.n)("div","ag-charts-dialog__tab-panel")}createInputGroupLine(){return(0,s.n)("div","ag-charts-dialog__input-group-line")}createRadioGroup({label:e,options:t,value:i,onChange:n}){const r=this.createInputGroup(e);(0,s.Wp)(r,{role:"radiogroup",tabindex:-1,"aria-label":this.ctx.localeManager.t(e)});const o="ag-charts-dialog__button--active",a=[];for(const e of t){const{icon:t,altText:s}=e,l=this.ctx.localeManager.t(s),c=Ha({icon:t,altText:l,onPress:()=>{for(const e of Array.from(r.children))e.classList.remove(o),e.ariaChecked="false";c.classList.add(o),c.ariaChecked="true",n(e.value)}},{"aria-checked":e.value===i,class:"ag-charts-dialog__button",role:"radio",title:l});e.value===i&&c.classList.add(o),r.appendChild(c),a.push(c)}return ja({orientation:"horizontal",buttons:a}),r}createSelect({altText:e,label:t,options:i,value:n,onChange:s}){const r=this.createInputGroup(t),o=this.ctx.localeManager.t(e),a=Ua({value:n,options:i,onChange:s},{class:"ag-charts-dialog__select","aria-label":o,title:o});return r.append(a),r}createTextArea({placeholder:e,value:t,onChange:i}){const n=e?this.ctx.localeManager.t(e):void 0;return Wa({value:t,onChange:i},{placeholder:n})}createCheckbox({label:e,checked:t,onChange:i}){const n=(0,s.wW)(),r=this.createInputGroup(e,{for:n}),o=za({checked:t,onChange:i},{class:"ag-charts-dialog__checkbox",role:"switch",id:n});return r.append(o),r}createColorPicker({color:e,opacity:t,label:i,altText:n,onChange:s,onChangeHide:r,isMultiColor:o,hasMultiColorOption:a}){const l=this.createInputGroup(i),c=this.ctx.localeManager.t(n),h=Ha({label:c,onPress:i=>{const{anchor:n,fallbackAnchor:l}=this.getColorPickerAnchors(h)??{};this.colorPicker.show({anchor:n,fallbackAnchor:l,color:e,opacity:t,isMultiColor:o,hasMultiColorOption:a,sourceEvent:i,onChange:(e,t,i,n)=>{h.style.setProperty("--color",e),h.classList.toggle("ag-charts-dialog__color-picker-button--multi-color",n),s(e,t,i,n)},onChangeHide:r})}},{"aria-label":c,tabindex:0,class:"ag-charts-dialog__color-picker-button",title:c});if(o)h.classList.toggle("ag-charts-dialog__color-picker-button--multi-color");else if(e){const i=Fa.fromString(e),n=new Fa(i.r,i.g,i.b,t);h.style.setProperty("--color",n.toHexString())}return l.append(h),this.hideFns.push(()=>{this.colorPicker.hide()}),l}createHeaderCloseButton(){return Ha({icon:"close",altText:this.ctx.localeManager.t("iconAltTextClose"),onPress:()=>this.hide()},{class:"ag-charts-dialog__close-button"})}createInputGroup(e,t){const i=(0,s.n)("div","ag-charts-dialog__input-group"),n=(0,s.n)("label","ag-charts-dialog__input-group-label");return n.innerText=this.ctx.localeManager.t(e),(0,s.Bq)(n,"for",t?.for),i.appendChild(n),i}onLayoutComplete(e){this.seriesRect=e.series.paddedRect,this.reposition()}onKeyDown(e){e.altKey||e.ctrlKey||e.metaKey||e.isComposing||"Escape"!==e.key||this.hide()}reposition(){const{seriesRect:t,ctx:i}=this,n=i.domManager.getBoundingClientRect(),s=this.getPopoverElement();if(!t||!s)return;const r=Ba.from(0,t.y),o=Ba.from(n.width,t.height),a=Ba.from(s),l=Ba.from(.5,1);let c;if(t.width>1e3){const t=Ba.sub(Ba.add(r,Ba.multiply(o,l)),Ba.multiply(a,l));c=Ba.sub(t,Ba.from(0,e.offset))}else{const t=Ba.sub(Ba.add(r,o),a);c=Ba.sub(t,e.offset)}this.updatePosition(c)}getColorPickerAnchors(e){if(e&&(this.colorPickerAnchorElement=e),!this.colorPickerAnchorElement)return;const t=this.colorPickerAnchorElement.getBoundingClientRect(),i=this.ctx.domManager.getBoundingClientRect(),n=Ba.sub(Ba.from(t.x,t.y),Ba.from(i.left,i.top));return{anchor:Ba.add(n,Ba.from(0,t.height+5)),fallbackAnchor:Ba.sub(n,Ba.from(0,5))}}};Ya.offset=60;var qa=Ya,Xa=class extends Va{constructor(){super((0,s.n)("div","ag-charts-dialog__drag-handle"));const e=new Va((0,s.n)("span",Ka("drag-handle")));e.setAriaHidden(!0),this.addChild(e)}},{Listeners:Za,focusCursorAtEnd:Qa}=n.n1,Ja=class extends qa{constructor(e){super(e,"settings"),this.events=new Za,this.hideFns.push(()=>this.events.dispatch("hidden"))}addListener(e,t){return this.events.addListener(e,t)}show(e,t){const i=this.createLinearLineTab(e,t),n=this.createLinearTextTab(e,t);let s="dialogHeaderLine";rn(e)?s="dialogHeaderChannel":on(e)?s="dialogHeaderFibonacciRange":"date-range"===e.type?s="dialogHeaderDateRange":"price-range"===e.type?s="dialogHeaderPriceRange":"date-price-range"===e.type&&(s="dialogHeaderDatePriceRange");const{tabs:r,initialFocus:o}=this.createTabs("ariaLabelSettingsTabBar",t.initialSelectedTab,{line:{label:s,panel:i},text:{label:"dialogHeaderText",panel:n.panel,onShow:n.onShow}});t.initialFocus=o,this.showWithChildren([r],t).classList.add("ag-charts-dialog--annotation-settings")}createLinearLineTab(e,t){const i=this.createTabPanel(),n=this.createInputGroupLine(),s=this.createInputGroupLine(),r="isMultiColor"in e,o=this.createColorPickerInput("line-color",e.getDefaultColor("line-color"),e.getDefaultOpacity("line-color"),!!r&&e.isMultiColor,r,t.onChangeLineColor,t.onChangeHideLineColor),a=this.createStrokeWidthSelect(e.strokeWidth??2,t.onChangeLineStyleWidth),l=this.createLineStyleRadioGroup(e.lineStyle??"solid",t.onChangeLineStyleType);if(n.append(o),"background"in e){const i=this.createColorPickerInput("fill-color",e.getDefaultColor("fill-color"),e.getDefaultOpacity("fill-color"),!1,!1,t.onChangeFillColor,t.onChangeHideFillColor);n.append(i),s.append(a)}else"showFill"in e?(n.append(this.createCheckbox({label:"dialogInputShowFill",checked:e.showFill??!0,onChange:e=>t.onChangeLine({showFill:e})})),s.append(a)):n.append(a);return s.append(l),i.append(n,s),"bands"in e&&i.append(this.createFibonacciRatioSelect(e.bands??10,e=>t.onChangeLine({bands:e}))),"extendStart"in e&&"extendEnd"in e&&i.append(this.createCheckbox({label:rn(e)?"dialogInputExtendChannelStart":"dialogInputExtendLineStart",checked:e.extendStart??!1,onChange:e=>t.onChangeLine({extendStart:e})}),this.createCheckbox({label:rn(e)?"dialogInputExtendChannelEnd":"dialogInputExtendLineEnd",checked:e.extendEnd??!1,onChange:e=>t.onChangeLine({extendEnd:e})})),"extendAbove"in e&&"extendBelow"in e&&i.append(this.createCheckbox({label:"dialogInputExtendAbove",checked:e.extendAbove??!1,onChange:e=>t.onChangeLine({extendAbove:e})}),this.createCheckbox({label:"dialogInputExtendBelow",checked:e.extendBelow??!1,onChange:e=>t.onChangeLine({extendBelow:e})})),"extendLeft"in e&&"extendRight"in e&&i.append(this.createCheckbox({label:"dialogInputExtendLeft",checked:e.extendLeft??!1,onChange:e=>t.onChangeLine({extendLeft:e})}),this.createCheckbox({label:"dialogInputExtendRight",checked:e.extendRight??!1,onChange:e=>t.onChangeLine({extendRight:e})})),"reverse"in e&&"showFill"in e&&i.append(this.createCheckbox({label:"dialogInputReverse",checked:e.reverse??!1,onChange:e=>t.onChangeLine({reverse:e})})),i}createLinearTextTab(e,t){const i=this.createTabPanel(),n=this.createTextArea({placeholder:"inputTextareaPlaceholder",value:e.text.label,onChange:e=>t.onChangeText({label:e})}),s=this.createFontSizeSelect(e.text.fontSize,t.onChangeTextFontSize),r=this.createColorPickerInput("text-color",e.text.color,1,!1,!1,t.onChangeTextColor,t.onChangeHideTextColor),o="inside"===e.text.position?"center":e.text.position,a=this.createPositionRadioGroup(o??"top",e=>t.onChangeText({position:e})),l=this.createAlignmentRadioGroup(e.text.alignment??"center",e=>t.onChangeText({alignment:e})),c=this.createInputGroupLine();return c.append(s,r,a,l),i.append(n,c),{panel:i,onShow:()=>Qa(n)}}createColorPickerInput(e,t,i,n,s,r,o){const a="fill-color"===e?"dialogInputFillColorPicker":"dialogInputColorPicker",l="fill-color"===e?"dialogInputFillColorPickerAltText":"dialogInputColorPickerAltText";return this.createColorPicker({label:a,altText:l,color:t,opacity:i,isMultiColor:n,hasMultiColorOption:s,onChange:r,onChangeHide:o})}createStrokeWidthSelect(e,t){return this.createSelect({label:"dialogInputStrokeWidth",altText:"dialogInputStrokeWidthAltText",options:Rn.map(({label:e,value:t})=>({label:e,value:`${t}`})),value:String(e),onChange:e=>t(Number(e))})}createFibonacciRatioSelect(e,t){return this.createSelect({label:"dialogInputFibonacciBands",altText:"dialogInputFibonacciBandsAltText",options:An.map(({label:e,value:t})=>({label:e,value:`${t}`})),value:String(e),onChange:e=>t(Number(e))})}createLineStyleRadioGroup(e,t){return this.createRadioGroup({label:"dialogInputLineStyle",options:[{icon:"line-style-solid",altText:"iconAltTextLineStyleSolid",value:"solid"},{icon:"line-style-dashed",altText:"iconAltTextLineStyleDashed",value:"dashed"},{icon:"line-style-dotted",altText:"iconAltTextLineStyleDotted",value:"dotted"}],value:e,onChange:t})}createFontSizeSelect(e,t){return this.createSelect({label:"dialogInputFontSize",altText:"dialogInputFontSizeAltText",options:kn.map(({label:e,value:t})=>({label:e,value:String(t)})),value:String(e),onChange:e=>t(Number(e))})}createPositionRadioGroup(e,t){return this.createRadioGroup({label:"dialogInputPosition",options:[{icon:"position-top",altText:"iconAltTextPositionTop",value:"top"},{icon:"position-center",altText:"iconAltTextPositionCenter",value:"center"},{icon:"position-bottom",altText:"iconAltTextPositionBottom",value:"bottom"}],value:e,onChange:t})}createAlignmentRadioGroup(e,t){return this.createRadioGroup({label:"dialogInputAlign",options:[{icon:"align-left",altText:"iconAltTextAlignLeft",value:"left"},{icon:"align-center",altText:"iconAltTextAlignCenter",value:"center"},{icon:"align-right",altText:"iconAltTextAlignRight",value:"right"}],value:e,onChange:t})}};function el(e){return e.gridPadding+e.seriesAreaPadding+e.tickSize+e.label.spacing}var{ChartUpdateType:tl,InteractionState:il,ObserveChanges:nl,PropertiesArray:sl,Property:rl,ChartAxisDirection:ol,Vec2:al,keyProperty:ll,valueProperty:cl,Selection:hl,BBox:dl}=n.n1,ul=class e extends n.n1.BaseModuleInstance{constructor(t){super(),this.ctx=t,this.enabled=!0,this.toolbar=new Ia(this.ctx),this.optionsToolbar=new Wn(this.ctx,()=>{const e=this.state.getActive();if(null!=e)return da(this.annotationData.at(e))}),this.axesButtons=new ot,this.snap=!1,this.data=void 0,this.xKey=void 0,this.volumeKey=void 0,this.annotationData=new sl(e.createAnnotationDatum),this.defaults=new Cn,this.container=new n.n1.Group({name:"static-annotations"}),this.annotations=new hl(this.container,this.createAnnotationScene.bind(this)),this.settingsDialog=new Ja(this.ctx),this.textInput=new nt(this.ctx),this.postUpdateFns=[],this.state=this.setupStateMachine(),this.setupListeners(),this.setupDOM(),this.ctx.historyManager.addMementoOriginator(t.annotationManager),this.ctx.historyManager.addMementoOriginator(this.defaults),this.textInput.setKeyDownHandler(this.onTextInput.bind(this))}setupStateMachine(){const{ctx:e}=this;return new va({resetToIdle:()=>{e.domManager.updateCursor("annotations"),this.popAnnotationState(il.Annotations),this.hideOverlays(),this.optionsToolbar.hide(),this.deleteEphemeralAnnotations(),this.update()},hoverAtCoords:(t,i,n)=>{let s;return this.annotations.each((e,n,r)=>{const o=e.containsPoint(t.x,t.y);o&&(s??(s=r)),e.toggleHovered(o||i===r)}),null!=s?e.tooltipManager.suppressTooltip("annotations"):this.isAnnotationState()||e.tooltipManager.unsuppressTooltip("annotations"),this.ctx.domManager.updateCursor("annotations",null==s?void 0:this.annotations.at(s)?.getCursor()),s!==n&&this.update(),s},getNodeAtCoords:(e,t)=>{const i=this.annotations.at(t);if(i)return i.getNodeAtCoords(e.x,e.y)},translate:(e,t)=>{const i=this.annotations.at(e),n=da(this.annotationData.at(e));if(i&&n)return this.translateNode(i,n,t)},copy:e=>{const t=this.annotations.at(e),i=da(this.annotationData.at(e));if(t&&i)return this.createAnnotationDatumCopy(t,i)},paste:e=>{this.createAnnotation(e.type,e,!1),this.postUpdateFns.push(()=>{this.state.transitionAsync("selectLast"),this.state.transitionAsync("copy")})},select:(e,t)=>{const{annotations:i,optionsToolbar:n,toolbar:s}=this;this.hideOverlays(),s.clearActiveButton(),s.resetButtonIcons();const r=null!=e?i.at(e):null,o=null!=t?i.at(t):null;o===r&&null!=r||(o?.toggleActive(!1),n.hide(),r?(this.pushAnnotationState(il.AnnotationsSelected),r.toggleActive(!0),n.updateButtons(this.annotationData.at(e)),this.postUpdateFns.push(()=>{n.show(),n.setAnchorScene(r)})):(this.popAnnotationState(il.AnnotationsSelected),this.popAnnotationState(il.Annotations)),this.deleteEphemeralAnnotations(),this.update())},selectLast:()=>(this.pushAnnotationState(il.AnnotationsSelected),this.annotationData.length-1),startInteracting:()=>{this.pushAnnotationState(il.Annotations)},stopInteracting:()=>{this.popAnnotationState(il.Annotations)},create:(e,t)=>{this.createAnnotation(e,t)},delete:e=>{this.annotationData.splice(e,1)},deleteAll:()=>{this.annotationData.splice(0,this.annotationData.length)},validatePoint:(e,t)=>{const i=this.getAnnotationContext();return!i||Yr(i,e,t)},getAnnotationType:e=>function(e){for(const t of lt)if(t===e)return t}(this.annotationData[e].type),datum:e=>this.annotationData.at(e),node:e=>this.annotations.at(e),recordAction:e=>{this.recordActionAfterNextUpdate(e)},update:()=>{this.postUpdateFns.push(()=>{const e=this.state.getActive(),t=null!=e?this.annotations.at(e):null;null!=t&&this.optionsToolbar.setAnchorScene(t)}),this.update()},showTextInput:e=>{const t=da(this.annotationData.at(e));if(!(this.annotations.at(e)&&t&&"getTextInputCoords"in t&&"getTextPosition"in t))return;const i={color:t.color,fontFamily:t.fontFamily,fontSize:t.fontSize,fontStyle:t.fontStyle,fontWeight:t.fontWeight,placeholderColor:t.getPlaceholderColor()},n=this.getAnnotationContext();this.textInput.show({styles:i,layout:{getTextInputCoords:e=>al.add(t.getTextInputCoords(n,e),al.required(this.seriesRect)),getTextPosition:()=>t.getTextPosition(),alignment:t.alignment,textAlign:t.textAlign,width:t.width},text:t.text,placeholderText:t.placeholderText,onChange:(e,t)=>{this.state.transition("updateTextInputBBox",t)}}),this.ctx.domManager.updateCursor("annotations")},hideTextInput:()=>{this.textInput.hide()},updateTextInputColor:e=>{this.textInput.updateColor(e)},updateTextInputFontSize:e=>{const t=this.textInput.updateFontSize(e);this.state.transition("updateTextInputBBox",t)},updateTextInputBBox:e=>{this.state.transition("updateTextInputBBox",e)},showAnnotationOptions:e=>{const t=this.annotations.at(e);t&&!nn(this.annotationData.at(e))&&(this.optionsToolbar.updateButtons(this.annotationData.at(e)),this.optionsToolbar.show(),this.optionsToolbar.setAnchorScene(t))},showAnnotationSettings:(e,t,i="line")=>{const n=this.annotationData.at(e);if(!sn(n)&&!rn(n)&&!ln(n))return;if(nn(n))return;const s=e=>(t,i,s,r)=>{this.setColorAndDefault(n.type,e,t,i,s,r),this.optionsToolbar.updateColorPickerColor(e,i,s,r)},r=e=>()=>{this.recordActionAfterNextUpdate(`Change ${n.type} ${e} to ${n.getDefaultColor(e)}`,["annotations","defaults"]),this.update()},o={initialSelectedTab:i,ariaLabel:this.ctx.localeManager.t("ariaLabelAnnotationSettingsDialog"),sourceEvent:t,onChangeLine:e=>{this.state.transition("lineProps",e),null!=e.bands&&this.defaults.setDefaultFibonacciOptions(n.type,"bands",e.bands),null!=e.reverse&&this.defaults.setDefaultFibonacciOptions(n.type,"reverse",e.reverse),null!=e.showFill&&this.defaults.setDefaultFibonacciOptions(n.type,"showFill",e.showFill)},onChangeText:e=>{this.state.transition("lineText",e),e.alignment&&this.defaults.setDefaultLineTextAlignment(n.type,e.alignment),e.position&&this.defaults.setDefaultLineTextPosition(n.type,e.position),this.recordActionAfterNextUpdate(`Change ${n.type} text ${Object.keys(e).map(t=>`${t} to ${e[t]}`).join(", ")}`)},onChangeFillColor:s("fill-color"),onChangeHideFillColor:r("fill-color"),onChangeLineColor:s("line-color"),onChangeHideLineColor:r("line-color"),onChangeLineStyleType:e=>{this.setLineStyleTypeAndDefault(n.type,e),this.optionsToolbar.updateLineStyleType(Ln.find(t=>t.value===e)??Ln[0])},onChangeLineStyleWidth:e=>{this.setLineStyleWidthAndDefault(n.type,e),this.optionsToolbar.updateStrokeWidth({strokeWidth:e,value:e,label:String(e)})},onChangeTextColor:s("text-color"),onChangeHideTextColor:r("text-color"),onChangeTextFontSize:e=>{this.setFontSizeAndDefault(n.type,e)}};this.settingsDialog.show(n,o)}})}setupListeners(){const{ctx:e,optionsToolbar:t,settingsDialog:i,toolbar:n}=this,{seriesWidget:s,seriesDragInterpreter:r,chartWidget:o}=e.widgets;this.destroyFns.push(r.addListener("click",this.hoverTouchPreHandler.bind(this)),r.addListener("drag-start",this.hoverTouchPreHandler.bind(this)),r.addListener("drag-move",this.dragMoveTouchPreHandler.bind(this)),r.addListener("mousemove",this.onHover.bind(this)),r.addListener("click",this.onClick.bind(this)),r.addListener("dblclick",this.onDoubleClick.bind(this)),r.addListener("drag-start",this.onDragStart.bind(this)),r.addListener("drag-move",this.onDrag.bind(this)),r.addListener("drag-end",this.onDragEnd.bind(this)),s.addListener("keydown",this.onKeyDown.bind(this)),s.addListener("keyup",this.onKeyUp.bind(this)),o.addListener("click",this.onCancel.bind(this)),e.annotationManager.addListener("restore-annotations",this.onRestoreAnnotations.bind(this)),e.layoutManager.addListener("layout:complete",this.onLayoutComplete.bind(this)),e.updateService.addListener("pre-scene-render",this.onPreRender.bind(this)),e.zoomManager.addListener("zoom-change",()=>this.onResize()),e.domManager.addListener("resize",()=>this.onResize()),n.addListener("cancel-create-annotation",()=>{this.cancel(),this.reset(),this.update()}),n.addListener("pressed-create-annotation",({annotation:e})=>{this.cancel(),this.pushAnnotationState(il.Annotations),this.state.transition(e),this.update()}),n.addListener("pressed-clear",()=>{this.clear(),this.recordActionAfterNextUpdate("Clear all")}),n.addListener("pressed-show-menu",()=>{this.cancel(),this.reset()}),n.addListener("pressed-unrelated",()=>{this.reset()}),t.addListener("pressed-delete",()=>{this.cancel(),this.delete(),this.reset()}),t.addListener("pressed-settings",({sourceEvent:e})=>{this.state.transition("toolbarPressSettings",e)}),t.addListener("pressed-lock",()=>{this.update()}),t.addListener("hid-overlays",()=>{this.settingsDialog.hide()}),t.addListener("saved-color",({type:e,colorPickerType:t,color:i})=>{this.recordActionAfterNextUpdate(`Change ${e} ${t} to ${i}`,["annotations","defaults"])}),t.addListener("updated-color",({type:e,colorPickerType:t,colorOpacity:i,color:n,opacity:s,isMultiColor:r})=>{this.setColorAndDefault(e,t,i,n,s,r)}),t.addListener("updated-font-size",({type:e,fontSize:t})=>{this.setFontSizeAndDefault(e,t)}),t.addListener("updated-line-style",({type:e,lineStyleType:t})=>{this.setLineStyleTypeAndDefault(e,t)}),t.addListener("updated-line-width",({type:e,strokeWidth:t})=>{this.setLineStyleWidthAndDefault(e,t)}),i.addListener("hidden",()=>{this.optionsToolbar.clearActiveButton()}))}setupDOM(){const{ctx:e,toolbar:t}=this;this.destroyFns.push(e.annotationManager.attachNode(this.container),()=>e.domManager.removeStyles(Oa),()=>t.destroy())}async processData(e){if(!this.enabled||null==this.data||null==this.xKey||null==this.volumeKey)return;const t=[ll(this.xKey,void 0,{id:"date"}),cl(this.volumeKey,"number",{id:"volume"})],{dataModel:i,processedData:n}=await e.request("annotations",this.data,{props:t});this.dataModel=i,this.processedData=n}createAnnotationScene(e){if(e.type in ha)return new ha[e.type].scene;throw new Error(`AG Charts - Cannot create annotation scene of type [${e.type}], expected one of [${Object.keys(ha)}], ignoring.`)}static createAnnotationDatum(e){if(e.type in ha)return(new ha[e.type].datum).set(e);throw new Error(`AG Charts - Cannot create annotation datum of unknown type [${e.type}], expected one of [${Object.keys(ha)}], ignoring.`)}createAnnotation(e,t,i=!0){if(this.annotationData.push(t),i){const i=this.ctx.annotationManager.getAnnotationTypeStyles(e);i&&t.set(i),this.defaults.applyDefaults(t)}this.injectDatumDependencies(t),this.update()}injectDatumDependencies(e){"setLocaleManager"in e&&e.setLocaleManager(this.ctx.localeManager),"getVolume"in e&&(e.getVolume=this.getDatumRangeVolume.bind(this))}getDatumRangeVolume(e,t){const{dataModel:i,processedData:n}=this;let r=Ot(e),o=Ot(t);if(!((0,s.vd)(r)&&(0,s.vd)(o)&&i&&n&&null!=this.volumeKey))return;r>o&&([r,o]=[o,r]);const a=i.resolveKeysById({id:"annotations"},"date",n),l=i.resolveColumnById({id:"annotations"},"volume",n);let c=0;for(let e=0;e<n.input.count;e++){const t=a[e];(0,s.vd)(t)&&t>=r&&t<=o&&(c+=l[e])}return c}translateNode(e,t,i){const n=this.getAnnotationConfig(t),s=this.getAnnotationContext();s&&n.translate(e,t,i,s)}createAnnotationDatumCopy(e,t){const i=this.getAnnotationConfig(t),n=new i.datum;n.set(t.toJson());const s=this.getAnnotationContext();if(s)return i.copy(e,t,n,s)}getAnnotationConfig(e){if(e.type in ha)return ha[e.type];throw new Error(`AG Charts - Cannot get annotation config of unknown type [${e.type}], expected one of [${Object.keys(ha)}], ignoring.`)}onRestoreAnnotations(e){this.enabled&&(this.clear(),this.annotationData.set(e.annotations),this.postUpdateFns.push(()=>{this.ctx.annotationManager.fireChangedEvent()}),this.update())}onLayoutComplete(e){const t=e.series.paddedRect;this.seriesRect=t,this.container.setClipRect(t);for(const i of e.axes??[])i.direction===n.n1.ChartAxisDirection.X?this.xAxis=this.getAxis(i,t,this.xAxis?.button):this.yAxis=this.getAxis(i,t,this.yAxis?.button);this.showAnnotations()?this.animateAnnotations({from:0,to:1,phase:"trailing"}):this.animateAnnotations({from:1,to:0,phase:"remove"})}showAnnotations(){if(!this.yAxis||!this.xAxis)return!1;const e=this.ctx.chartService.series.some(e=>e.hasData),t=this.yAxis.context.seriesIds().some(e=>{const t=this.ctx.chartService.series.find(t=>t.id===e);return t?.visible});return e&&t}animateAnnotations({from:e,to:t,phase:i}){const{annotations:n}=this;this.ctx.animationManager?.animate({from:e,to:t,id:"chart-annotations",phase:i,groupId:"opacity",onUpdate(e){n.each(t=>{t.opacity=e,"setAxisLabelOpacity"in t&&t.setAxisLabelOpacity(e)})},onStop(){n.each(e=>{e.opacity=t,"setAxisLabelOpacity"in e&&e.setAxisLabelOpacity(t)})}})}onPreRender(){this.updateAnnotations(),this.state.transition("render")}getAxis(e,t,i){const n=this.ctx.axisManager.getAxisContext(e.direction)[0],{position:s="bottom",direction:r}=n,o=e.gridPadding+e.seriesAreaPadding,a=new dl(0,0,t.width,t.height).grow(o,s),l=n.direction===ol.X?"vertical":"horizontal",{axesButtons:c,snap:h}=this;if(this.enabled&&c.enabled&&("xy"===c.axes||c.axes===r)){i??(i=new _a(this.ctx,{...n,snapToGroup:h},e=>this.onAxisButtonClick(e,l),t));const s=el(e);i.update(t,s)}else i?.destroy(),i=void 0;return{layout:e,context:n,bounds:a,button:i}}recordActionAfterNextUpdate(e,t=["annotations"]){const{defaults:i,ctx:{annotationManager:n,historyManager:s}}=this,r=t.map(e=>"defaults"===e?i:n);this.postUpdateFns.push(()=>{s.record(e,...r),n.fireChangedEvent()})}setColorAndDefault(e,t,i,n,s,r){this.state.transition("color",{colorPickerType:t,colorOpacity:i,color:n,opacity:s,isMultiColor:r}),this.defaults.setDefaultColor(e,t,i,n,s,r)}setFontSizeAndDefault(e,t){this.state.transition("fontSize",t),this.defaults.setDefaultFontSize(e,t),this.recordActionAfterNextUpdate(`Change ${e} font size to ${t}`,["annotations","defaults"])}setLineStyleTypeAndDefault(e,t){this.state.transition("lineStyle",{type:t}),this.defaults.setDefaultLineStyleType(e,t),this.recordActionAfterNextUpdate(`Change ${e} line style to ${t}`,["annotations","defaults"])}setLineStyleWidthAndDefault(e,t){this.state.transition("lineStyle",{strokeWidth:t}),this.defaults.setDefaultLineStyleWidth(e,t),this.recordActionAfterNextUpdate(`Change ${e} stroke width to ${t}`,["annotations","defaults"])}updateAnnotations(){const{annotationData:e,annotations:t,seriesRect:i,ctx:{annotationManager:n}}=this,s=this.getAnnotationContext();if(!i||!s)return;n.updateData(e.toJson().filter(e=>!nn(e)));const r=this.showAnnotations();this.toolbar.refreshButtonsEnabled(r),this.toolbar.toggleClearButtonEnabled(e.length>0&&r),t.update(e??[],void 0,e=>e.id).each((e,t)=>{if(!r)return e.visible=!1,void("setAxisLabelVisible"in e&&e.setAxisLabelVisible(!1));"setAxisLabelVisible"in e&&e.setAxisLabelVisible(!0),this.injectDatumDependencies(t),function(e,t,i){for(const{update:n}of Object.values(ha))n(e,t,i)}(e,t,s)}),this.postUpdateFns.forEach(e=>e()),this.postUpdateFns=[]}getAnnotationContext(){const{seriesRect:e,xAxis:t,yAxis:i,snap:n}=this;if(e&&t&&i)return{seriesRect:e,xAxis:{...t.context,bounds:t.bounds,labelPadding:el(t.layout),snapToGroup:n},yAxis:{...i.context,bounds:i.bounds,labelPadding:el(t.layout),snapToGroup:n}}}onHover(e){const{state:t}=this,i=this.getAnnotationContext();if(!i)return;const n=e.sourceEvent.shiftKey,s=al.from(e),r=Bt(s,i);t.transition("hover",{offset:s,point:r,shiftKey:n,context:i})}onClick(e){const{state:t}=this,i=this.getAnnotationContext();if(!i)return;const n=e.sourceEvent.shiftKey,s=Bt(al.from(e),i),r=this.textInput.getValue(),o=this.textInput.getBBox();t.transition("click",{point:s,shiftKey:n,textInputValue:r,bbox:o})}onDoubleClick(e){const{state:t}=this;if(!this.getAnnotationContext())return;const i=al.from(e);t.transition("dblclick",{offset:i})}onAxisButtonClick(e,t){this.cancel(),this.reset();const i=this.getAnnotationContext();if(!this.annotationData||!i)return;const{state:n}=this;this.pushAnnotationState(il.Annotations);const s="horizontal"===t;if(n.transition(s?"horizontal-line":"vertical-line"),this.optionsToolbar.hide(),!e)return;const r=Bt(e,i);Yr(i,r)&&(n.transition("click",{point:r,shiftKey:!1}),this.update())}onResize(){const e=this.textInput.getValue(),t=this.textInput.getBBox();this.state.transition("resize",{textInputValue:e,bbox:t})}hoverTouchPreHandler(e){"touch"===e.device&&this.onHover(e)}dragMoveTouchPreHandler(e){"touch"===e.device&&this.ctx.interactionManager.isState(il.AnnotationsSelected)&&e.sourceEvent.preventDefault()}onDragStart(e){if(!this.ctx.interactionManager.isState(il.AnnotationsDraggable))return;const t=this.getAnnotationContext();if(!t)return;const i=al.from(e),n=Bt(i,t),s=this.textInput.getValue(),r=this.textInput.getBBox();this.state.transition("dragStart",{context:t,offset:i,point:n,textInputValue:s,bbox:r})}onDrag(e){if(!this.ctx.interactionManager.isState(il.AnnotationsDraggable))return;const t=this.getAnnotationContext();if(!t)return;const i=al.from(e),n=Bt(i,t),s=e.sourceEvent.shiftKey,r=this.textInput.getValue(),o=this.textInput.getBBox();this.state.transition("drag",{context:t,offset:i,point:n,shiftKey:s,textInputValue:r,bbox:o})}onDragEnd(){this.state.transition("dragEnd")}onCancel(e){const{sourceEvent:t}=e??{};t?.currentTarget===t?.target&&(this.cancel(),this.reset())}onDelete(){this.textInput.isVisible()||(this.cancel(),this.delete(),this.reset(),this.update())}onTextInput(e){const{state:t}=this,i=this.getAnnotationContext();if(!i)return;const{key:n,shiftKey:s}=e,r=this.textInput.getValue(),o=this.textInput.getBBox();t.transition("textInput",{key:n,shiftKey:s,textInputValue:r,bbox:o,context:i})}onKeyDown(e){const{state:t}=this,i=this.getAnnotationContext();if(!i)return;const{sourceEvent:n}=e,{shiftKey:s,ctrlKey:r,metaKey:o}=n,a=r||o,l=r||s;t.transition("keyDown",{shiftKey:s,context:i});const c={x:0,y:0},h=Math.max(i?.xAxis.scale.bandwidth??0,l?10:1),d=Math.max(i?.yAxis.scale.bandwidth??0,l?10:1);switch(n.key){case"ArrowDown":c.y=d;break;case"ArrowUp":c.y=-d;break;case"ArrowLeft":c.x=-h;break;case"ArrowRight":c.x=h;break;case"Escape":return void this.onCancel();case"Backspace":case"Delete":return void this.onDelete()}if((c.x||c.y)&&(t.transition("translate",{translation:c}),n.stopPropagation(),n.preventDefault()),a)switch(n.key){case"c":return void t.transition("copy");case"x":return t.transition("cut"),void this.recordActionAfterNextUpdate("Cut annotation");case"v":return t.transition("paste"),void this.recordActionAfterNextUpdate("Paste annotation")}}onKeyUp(e){const{shiftKey:t}=e.sourceEvent,i=this.getAnnotationContext();i&&(this.state.transition("keyUp",{shiftKey:t,context:i}),this.state.transition("translateEnd"))}clear(){this.cancel(),this.deleteAll(),this.reset()}reset(){this.state.transition("reset")}cancel(){this.state.transition("cancel")}delete(){this.state.transition("delete")}deleteAll(){this.state.transition("deleteAll")}deleteEphemeralAnnotations(){for(const[e,t]of this.annotationData.entries())nn(t)&&this.annotationData.splice(e,1)}hideOverlays(){this.settingsDialog.hide(),this.toolbar.hideOverlays(),this.optionsToolbar.hideOverlays()}pushAnnotationState(e){this.ctx.interactionManager.pushState(e),this.ctx.tooltipManager.suppressTooltip("annotations")}popAnnotationState(e){this.ctx.interactionManager.popState(e),this.ctx.tooltipManager.unsuppressTooltip("annotations")}isAnnotationState(){return this.ctx.interactionManager.isState(il.Annotations)||this.ctx.interactionManager.isState(il.AnnotationsSelected)}update(e=tl.PRE_SCENE_RENDER){this.ctx.updateService.update(e)}};a([nl((e,t,i)=>{const{ctx:{annotationManager:n,stateManager:s}}=e;t!==i&&(e.toolbar?.toggleVisibility(Boolean(t)),!1===i&&!0===t?s.restoreState(n):!1===t&&e.clear())}),rl],ul.prototype,"enabled",2),a([rl],ul.prototype,"toolbar",2),a([rl],ul.prototype,"optionsToolbar",2),a([rl],ul.prototype,"axesButtons",2),a([rl],ul.prototype,"snap",2);var pl=ul,{FONT_SIZE_RATIO:gl,ThemeSymbols:fl}=n.n1,ml={stroke:{$ref:"foregroundColor"},strokeOpacity:1,strokeWidth:2},vl={fill:fl.DEFAULT_ANNOTATION_HANDLE_FILL,strokeOpacity:1,strokeWidth:2},yl={color:{$ref:"backgroundColor"},fontSize:{$rem:[gl.LARGE]},fontFamily:{$ref:"fontFamily"}},Cl={...yl,enabled:!0,fill:{$ref:"foregroundColor"},fontSize:{$ref:"fontSize"}},bl={...yl,textAlign:"left"},Sl={...yl,position:"top",alignment:"center",color:{$ref:"textColor"}},wl={...yl,position:"top",alignment:"center",color:{$ref:"textColor"}},xl={...yl,fontSize:{$ref:"fontSize"},color:fl.DEFAULT_ANNOTATION_STATISTICS_COLOR,fill:fl.DEFAULT_ANNOTATION_STATISTICS_FILL,stroke:fl.DEFAULT_ANNOTATION_STATISTICS_STROKE,strokeWidth:1,divider:{stroke:fl.DEFAULT_ANNOTATION_STATISTICS_DIVIDER_STROKE,strokeWidth:1,strokeOpacity:.5}},El={...ml,background:{fill:{$ref:"foregroundColor"},fillOpacity:.075},handle:{...vl},text:{...Sl},statistics:{...xl}},Ml={type:"root",optionsKey:"annotations",packageType:"enterprise",chartTypes:["cartesian"],moduleFactory:e=>new pl(e),themeTemplate:{annotations:{enabled:!1,line:{...ml,handle:{...vl},text:{...Sl}},"horizontal-line":{...ml,handle:{...vl},axisLabel:{...Cl},text:{...Sl}},"vertical-line":{...ml,handle:{...vl},axisLabel:{...Cl},text:{...Sl}},"disjoint-channel":{...ml,background:{fill:{$ref:"foregroundColor"},fillOpacity:.075},handle:{...vl},text:{...wl}},"parallel-channel":{...ml,middle:{lineDash:[6,5],strokeWidth:1},background:{fill:{$ref:"foregroundColor"},fillOpacity:.075},handle:{...vl},text:{...wl}},"fibonacci-retracement":{...ml,strokes:fl.DEFAULT_FIBONACCI_STROKES,rangeStroke:{$ref:"foregroundColor"},handle:{...vl},text:{...Sl,position:"center"},label:{...yl,color:void 0,fontSize:{$round:[{$mul:[{$ref:"fontSize"},10/12]}]}}},"fibonacci-retracement-trend-based":{...ml,strokes:fl.DEFAULT_FIBONACCI_STROKES,rangeStroke:{$ref:"foregroundColor"},handle:{...vl},text:{...Sl,position:"center"},label:{...yl,color:void 0,fontSize:{$round:[{$mul:[{$ref:"fontSize"},10/12]}]}}},callout:{...ml,...bl,color:{$ref:"textColor"},handle:{...vl},fill:{$ref:"foregroundColor"},fillOpacity:.075},comment:{...bl,fontWeight:700,handle:{...vl},fill:{$ref:"foregroundColor"}},note:{...bl,color:fl.DEFAULT_TEXTBOX_COLOR,fill:fl.DEFAULT_FINANCIAL_CHARTS_ANNOTATION_COLOR,stroke:{$ref:"backgroundColor"},strokeWidth:1,strokeOpacity:1,handle:{...vl},background:{fill:fl.DEFAULT_TEXTBOX_FILL,stroke:fl.DEFAULT_TEXTBOX_STROKE,strokeWidth:1}},text:{...bl,color:{$ref:"textColor"},handle:{...vl}},arrow:{...ml,handle:{...vl},text:{...Sl}},"arrow-up":{fill:{$palette:"up.fill"},handle:{...vl,stroke:{$ref:"foregroundColor"}}},"arrow-down":{fill:{$palette:"down.fill"},handle:{...vl,stroke:{$ref:"foregroundColor"}}},"date-range":{...El},"price-range":{...El},"date-price-range":{...El},"quick-date-price-range":{up:{...ml,fill:fl.DEFAULT_FINANCIAL_CHARTS_ANNOTATION_BACKGROUND_FILL,fillOpacity:.2,handle:{...vl},statistics:{...xl,color:"#fff",fill:fl.DEFAULT_FINANCIAL_CHARTS_ANNOTATION_BACKGROUND_FILL,strokeWidth:0,divider:{stroke:"#fff",strokeWidth:1,strokeOpacity:.5}}},down:{...ml,stroke:fl.DEFAULT_ANNOTATION_STATISTICS_DOWN_STROKE,fill:fl.DEFAULT_ANNOTATION_STATISTICS_DOWN_FILL,fillOpacity:.2,handle:{...vl,stroke:fl.DEFAULT_ANNOTATION_STATISTICS_DOWN_STROKE},statistics:{...xl,color:"#fff",fill:fl.DEFAULT_ANNOTATION_STATISTICS_DOWN_FILL,strokeWidth:0,divider:{stroke:"#fff",strokeWidth:1,strokeOpacity:.5}}}},axesButtons:{},toolbar:{buttons:[{icon:"text-annotation",tooltip:"toolbarAnnotationsTextAnnotations",value:"text-menu"},{icon:"trend-line-drawing",tooltip:"toolbarAnnotationsLineAnnotations",value:"line-menu"},{icon:"arrow-drawing",tooltip:"toolbarAnnotationsShapeAnnotations",value:"shape-menu"},{icon:"delete",tooltip:"toolbarAnnotationsClearAll",value:"clear"}],padding:{$ref:"padding"}},optionsToolbar:{buttons:[{icon:"text-annotation",tooltip:"toolbarAnnotationsTextColor",value:"text-color"},{icon:"line-color",tooltip:"toolbarAnnotationsLineColor",value:"line-color"},{icon:"fill-color",tooltip:"toolbarAnnotationsFillColor",value:"fill-color"},{tooltip:"toolbarAnnotationsTextSize",value:"text-size"},{tooltip:"toolbarAnnotationsLineStrokeWidth",value:"line-stroke-width"},{icon:"line-style-solid",tooltip:"toolbarAnnotationsLineStyle",value:"line-style-type"},{icon:"settings",tooltip:"toolbarAnnotationsSettings",value:"settings"},{icon:"unlocked",tooltip:"toolbarAnnotationsLock",ariaLabel:"toolbarAnnotationsLock",checkedOverrides:{icon:"locked",tooltip:"toolbarAnnotationsUnlock"},value:"lock"},{icon:"delete",tooltip:"toolbarAnnotationsDelete",value:"delete"}]}}}},{BaseProperties:Al,ObserveChanges:Tl,ProxyProperty:Dl,Property:Il,calculatePlacement:Rl}=n.n1,Ll=class extends Al{constructor(){super(),this.opacity=1,this.loadedSynchronously=!0,this.containerWidth=0,this.containerHeight=0,this.onLoad=void 0,this.onImageLoad=()=>{this.loadedSynchronously||(this.node.visible=!1,this.performLayout(this.containerWidth,this.containerHeight),this.onLoad?.())},this.imageElement=(0,s.n)("img"),this.imageElement.onload=this.onImageLoad,this.node=new n.n1.Image(this.imageElement)}get complete(){return this.imageElement.width>0&&this.imageElement.height>0}performLayout(e,t){this.containerWidth=e,this.containerHeight=t;const i={width:e,height:t},n=Rl(this.imageElement.width,this.imageElement.height,i,this);return this.node.setProperties(this.complete?{visible:!0,opacity:this.opacity,...n}:{visible:!1}),n}};a([Il],Ll.prototype,"top",2),a([Il],Ll.prototype,"right",2),a([Il],Ll.prototype,"bottom",2),a([Il],Ll.prototype,"left",2),a([Il],Ll.prototype,"width",2),a([Il],Ll.prototype,"height",2),a([Il],Ll.prototype,"opacity",2),a([Dl("imageElement.src"),Tl(e=>e.loadedSynchronously=e.complete)],Ll.prototype,"url",2);var{ActionOnSet:kl,Property:Pl}=n.n1,Nl=class extends n.n1.Background{constructor(){super(...arguments),this.image=new Ll}onLayoutComplete(e){if(super.onLayoutComplete(e),this.image){const{width:t,height:i}=e.chart;this.image.performLayout(t,i)}}onImageLoad(){this.ctx.updateService.update(n.n1.ChartUpdateType.SCENE_RENDER)}};a([Pl,kl({newValue(e){this.node.appendChild(e.node),e.onLoad=()=>this.onImageLoad()},oldValue(e){this.node.removeChild(e.node),e.onLoad=void 0}})],Nl.prototype,"image",2);var Ol={type:"root",optionsKey:"background",packageType:"enterprise",chartTypes:["cartesian","polar","hierarchy","topology","flow-proportion","standalone","gauge"],moduleFactory:e=>new Nl(e)},{ActionOnSet:_l,LayoutElement:Fl,Menu:Gl,Property:Vl}=n.n1,Bl=[{label:"toolbarSeriesTypeOHLC",icon:"ohlc-series",value:"ohlc"},{label:"toolbarSeriesTypeCandles",icon:"candlestick-series",value:"candlestick"},{label:"toolbarSeriesTypeHollowCandles",icon:"hollow-candlestick-series",value:"hollow-candlestick"},{label:"toolbarSeriesTypeLine",icon:"line-series",value:"line"},{label:"toolbarSeriesTypeStepLine",icon:"step-line-series",value:"step-line"},{label:"toolbarSeriesTypeHLC",icon:"hlc-series",value:"hlc"},{label:"toolbarSeriesTypeHighLow",icon:"high-low-series",value:"high-low"}],Hl=class extends n.n1.BaseModuleInstance{constructor(e){super(),this.ctx=e,this.enabled=!1,this.menu=new Gl(this.ctx,"chart-toolbar"),this.toolbar=e.sharedToolbar.getSharedToolbar("chartToolbar"),this.destroyFns.push(this.toolbar.addToolbarListener("button-pressed",this.onButtonPressed.bind(this)),e.layoutManager.registerElement(Fl.ToolbarLeft,this.onLayoutStart.bind(this)),()=>this.toolbar.destroy())}onLayoutStart(e){this.enabled&&(this.updateButton(),this.toolbar.layout(e.layoutBox))}onButtonPressed({event:e,buttonBounds:t}){this.menu.setAnchor({x:t.x+t.width+6,y:t.y}),this.menu.show({items:Bl,menuItemRole:"menuitemradio",ariaLabel:this.ctx.localeManager.t("toolbarSeriesTypeDropdown"),class:"ag-charts-chart-toolbar__menu",value:this.getChartType(),sourceEvent:e.sourceEvent,onPress:e=>{this.setChartType(e.value),this.hidePopover()},onHide:()=>{this.toolbar.clearActiveButton()}}),this.toolbar.toggleActiveButtonByIndex(0)}updateButton(){const e=this.getChartType(),t=Bl.find(t=>t.value===e)?.icon;null!=t&&this.toolbar.updateButtons([{icon:t,tooltip:"toolbarSeriesTypeDropdown"}])}hidePopover(){this.toolbar.clearActiveButton(),this.menu.hide()}setChartType(e){const t={chartType:e};this.ctx.chartService.publicApi?.updateDelta(t).catch(e=>s.Vy.error(e))}getChartType(){const e=this.ctx.chartService.publicApi?.getOptions()?.chartType;return null!=e&&Bl.some(t=>t.value===e)?e:"candlestick"}};a([Vl,_l({changeValue(e){this.toolbar?.setHidden(!e)}})],Hl.prototype,"enabled",2);var zl={type:"root",optionsKey:"chartToolbar",packageType:"enterprise",chartTypes:["cartesian"],moduleFactory:e=>new Hl(e)};function Ul(e,t,i){let n=!0;if("separator"===t.type){const e=i.at(i.length-1);n=void 0!==e&&"separator"!==e.type}if(n&&(n=function(e,t){return"always"===e||("series-area"===e?"series-area"===t||"series-node"===t:e===t)}(t.showOn??"always",e)),n){const e=new $l(t);return i.push(e),e}}function Wl(e,t,i,n){t.isVisible(i)&&Ul(e,t.builtins.items[i],n)}function jl(e,t,i,n){const{builtins:r}=t;if((0,s.bX)(i,r.lists))for(const s of r.lists[i])Wl(e,t,s,n);else Wl(e,t,i,n)}function Kl(e,t,i,n){for(const s of i)if("string"==typeof s)jl(e,t,s,n);else{const i=Ul(e,s,n);s.items&&i&&s.items.length>0&&Kl(e,t,s.items,i.items)}"separator"===n[n.length-1]?.type&&n.pop()}var $l=class{constructor(e){this.type="action",this.showOn="always",this.label="",this.iconUrl=void 0,this.enabled=!0,this.items=[],this.action=void 0,e&&this.setOptions(e),this.items=[]}setField(e,t,i){t[e]=i}setOptions(e){let t;for(t in e)void 0!==e[t]&&this.setField(t,this,e[t])}},Yl="ag-charts-context-menu",ql="ag-charts-dark-context-menu",{Deprecated:Xl,Property:Zl,ContextMenuRegistry:Ql}=n.n1,Jl="context-menu",ec="Use [items] instead",tc=class extends n.n1.BaseModuleInstance{constructor(e){super(),this.ctx=e,this.enabled=!0,this.darkTheme=!1,this.items=["defaults"],this.pickedNode=void 0,this.showEvent=void 0,this.x=0,this.y=0,this.closingSubMenus=0,this.menuWidget=new n.uB.MenuWidget;const t=this;if(this.deprecationMap={extraActions:{get items(){return t.extraActions??[]},showOn:"always"},extraSeriesAreaActions:{get items(){return t.extraSeriesAreaActions??[]},showOn:"series-area"},extraNodeActions:{get items(){return t.extraNodeActions??[]},showOn:"series-node"},extraLegendItemActions:{get items(){return t.extraLegendItemActions??[]},showOn:"legend-item"}},this.interactionManager=e.interactionManager,this.registry=e.contextMenuRegistry,this.element=e.domManager.addChild("canvas-overlay",Jl),this.element.classList.add(Yl),this.element.style.display="none",this.element.addEventListener("contextmenu",e=>e.preventDefault()),this.element.addEventListener("focusout",({relatedTarget:e})=>{this.closingSubMenus>0||(null==e||e instanceof Node&&!this.element.contains(e))&&this.hide()}),this.destroyFns.push(()=>this.element.parentNode?.removeChild(this.element),()=>this.menuWidget.destroy(),e.domManager.addListener("hidden",()=>this.hide()),this.menuWidget.addListener("close-widget",()=>this.onClose())),this.menuWidget.addClass(`${Yl}__menu`),"undefined"!=typeof MutationObserver){const e=new MutationObserver(()=>{this.element.contains(this.menuWidget.getElement())&&this.reposition()});e.observe(this.element,{childList:!0}),this.mutationObserver=e,this.destroyFns.push(()=>e.disconnect())}this.ctx.contextMenuRegistry.builtins.items.download.action=()=>{const t=e.chartService.title;let i="image";t?.enabled&&void 0!==t?.text&&(i=t.text.replace(/\.+/,"")),this.ctx.chartService.publicApi?.download({fileName:i}).catch(e=>{s.Vy.error("Unable to download chart",e)})},this.destroyFns.push(this.registry.addListener("context-complete",e=>this.onContext(e)))}createDeprecatedAdaptorItems(){const e=[];for(const t of Object.keys(this.deprecationMap)){const{items:i,showOn:n}=this.deprecationMap[t];e.push("separator");for(const{action:t,label:s}of i){const i="action",r=!0;e.push({type:i,showOn:n,enabled:r,label:s,action:t})}}return e}expandItemsOptions(e){const t=[],i=this.createDeprecatedAdaptorItems();return Kl(e,this.ctx.contextMenuRegistry,this.items,t),Kl(e,this.ctx.contextMenuRegistry,i,t),t}onContext(e){if(!this.enabled)return;e.widgetEvent.sourceEvent.preventDefault(),this.showEvent=e.widgetEvent.sourceEvent,this.x=e.x,this.y=e.y,this.pickedNode=void 0,this.pickedLegendItem=void 0,Ql.check("series-node",e)?this.pickedNode=e.context.pickedNode:Ql.check("legend-item",e)&&(this.pickedLegendItem=e.context.legendItem);const t=this.expandItemsOptions(e.showOn);0!==t.length&&this.show(e.widgetEvent,t)}show(e,t){this.interactionManager.pushState(n.n1.InteractionState.ContextMenu),this.element.classList.toggle(ql,this.darkTheme),this.element.style.display="block";const i="touch"!==e.sourceEvent.pointerType&&void 0;void 0!==i&&this.ctx.chartService.overrideFocusVisible(i),this.createMenu(t),this.element.appendChild(this.menuWidget.getElement()),this.menuWidget.open(e,{overrideFocusVisible:i})}hide(){this.menuWidget.close()}onClose(){this.interactionManager.popState(n.n1.InteractionState.ContextMenu),this.element.removeChild(this.menuWidget.getElement()),this.element.style.display="none"}onSubMenuOpen(e,t){const i=e.getBounds();e.setFocusOverride(!0),e.getElement().insertAdjacentElement("afterend",t.getElement()),t.getElement().style.position="absolute";const n=this.ctx.domManager.getBoundingClientRect(),s=e.getBoundingClientRect(),r=n.right-s.right,o=s.left-n.left,{offsetWidth:a,offsetHeight:l}=t.getElement();let c=i.y;if(n.height>l){const e=n.bottom-s.top;e<l&&(c-=l-e)}if(r>=a)t.setBounds({x:i.x+i.width,y:c});else{const e=i.x-a,n=o+e;n>=0?t.setBounds({x:e,y:c}):t.setBounds({x:e-n,y:c})}}onSubMenuClose(e,t){e.setFocusOverride(void 0),this.closingSubMenus++,t.remove(),this.closingSubMenus--}createMenu(e){const{menuWidget:t}=this;t.clear(),t.toggleClass(ql,this.darkTheme),t.setTabIndex(-1),this.createMenuItems(t,e)}createMenuItems(e,t){for(const i of t)switch(i.type){case"separator":const t=e.addSeparator();t.classList.add(`${Yl}__divider`),t.classList.toggle(ql,this.darkTheme),this.initTableCells(t);break;case"action":if(0===i.items.length){const t=new n.uB.MenuItemWidget;this.initButtonElement(t,i),e.addChild(t)}else{const{subMenuButton:t,subMenu:n}=e.addSubMenu();n.addClass(`${Yl}__menu`),n.addListener("open-widget",()=>this.onSubMenuOpen(t,n)),n.addListener("close-widget",()=>this.onSubMenuClose(t,n)),this.initButtonElement(t,i),this.createMenuItems(n,i.items)}break;default:throw new Error("unhandled case")}}createButtonOnClick(e,t){return Ql.checkCallback("legend-item",e,t)?e=>{const i=e.sourceEvent;if(this.pickedLegendItem){const{seriesId:e,itemId:n}=this.pickedLegendItem;t({type:"contextmenu",seriesId:e,itemId:n,event:i}),this.hide()}else s.Vy.error("legend item not found")}:Ql.checkCallback("series-area",e,t)?()=>{t({type:"seriesContextMenuAction",event:this.showEvent}),this.hide()}:Ql.checkCallback("series-node",e,t)?()=>{const{pickedNode:e,showEvent:i}=this,n=e?.series.createNodeContextMenuActionEvent(i,e);n?t(n):s.Vy.error("series node not found"),this.hide()}:()=>{t({type:"contextMenuEvent",event:this.showEvent}),this.hide()}}initTableCells(e){const t=(0,s.n)("div"),i=(0,s.n)("div"),n=(0,s.n)("div");return t.classList.toggle("ag-charts-context-menu__icon",!0),i.classList.toggle("ag-charts-context-menu__label",!0),n.classList.toggle("ag-charts-context-menu__rightarrowhead",!0),t.ariaHidden="true",i.role="presentation",n.ariaHidden="true",e.append(t,i,n),{cellIcon:t,cellLabel:i,cellArrow:n}}initButtonElement(e,t){e.addClass(`${Yl}__item`),e.toggleClass(ql,this.darkTheme),e.setEnabled(t.enabled);const i=this.ctx.localeManager.t(t.label),r=`${Yl}__cellpadding`,{cellIcon:o,cellLabel:a,cellArrow:l}=this.initTableCells(e.getElement());if(a.textContent=i,a.classList.add(r),null!=t.iconUrl){const e=(0,s.n)("img");e.src=t.iconUrl,o.append(e),o.classList.add(r)}t.items.length>0&&(l.textContent="❯",l.classList.add(r));const{showOn:c,action:h}=t;if(null!=h){const t=this.createButtonOnClick(c,h);e.addListener("click",t),e.addListener("keydown",e=>{n.n1.isButtonClickEvent(e.sourceEvent)&&(e.sourceEvent.preventDefault(),t(e))})}e.addListener("mousemove",()=>e.focus({preventScroll:!0}))}reposition(){let{x:e,y:t}=this;this.element.style.top="unset",this.element.style.bottom="unset";const i=this.ctx.domManager.getBoundingClientRect(),{offsetWidth:n,offsetHeight:r}=this.element;e=(0,s.qE)(0,e,i.width-n),t=(0,s.qE)(0,t,i.height-r),this.element.style.left=`${e}px`,this.element.style.top=`calc(${t}px - 0.5em)`}destroy(){super.destroy(),this.mutationObserver?.disconnect(),this.ctx.domManager.removeStyles(Jl),this.ctx.domManager.removeChild("canvas-overlay",Jl)}};a([Zl],tc.prototype,"enabled",2),a([Zl],tc.prototype,"darkTheme",2),a([Zl],tc.prototype,"items",2),a([Xl(ec)],tc.prototype,"extraActions",2),a([Xl(ec)],tc.prototype,"extraNodeActions",2),a([Xl(ec)],tc.prototype,"extraSeriesAreaActions",2),a([Xl(ec)],tc.prototype,"extraLegendItemActions",2);var ic={type:"root",packageType:"enterprise",chartTypes:["cartesian","polar","hierarchy","topology","flow-proportion","standalone","gauge"],optionsKey:"contextMenu",moduleFactory:e=>new tc(e),themeTemplate:{contextMenu:{enabled:!0,darkTheme:n.n1.ThemeSymbols.IS_DARK_THEME}}},{BaseProperties:nc,Property:sc}=n.n1,rc=class extends n.n1.ChangeDetectableProperties{constructor(){super(...arguments),this.enabled=!0,this.xOffset=0,this.yOffset=0,this.format=void 0,this.renderer=void 0}};a([sc],rc.prototype,"enabled",2),a([sc],rc.prototype,"xOffset",2),a([sc],rc.prototype,"yOffset",2),a([sc],rc.prototype,"format",2),a([sc],rc.prototype,"renderer",2);var oc=class extends nc{constructor(e,t,i){super(),this.domManager=e,this.id=(0,s.sX)(this),this.enabled=!0,this.xOffset=0,this.yOffset=0,this.renderer=void 0,this.element=e.addChild("canvas-overlay",`crosshair-label-${this.id}`),this.element.classList.add("ag-charts-crosshair-label"),(0,s.Bq)(this.element,"aria-hidden",!0),this.element.setAttribute("data-key",t),this.element.setAttribute("data-axis-id",i)}show(e){const{element:t}=this,i=e.x+this.xOffset,n=e.y+this.yOffset;t.style.top=`${Math.round(n)}px`,t.style.left=`${Math.round(i)}px`,this.toggle(!0)}setLabelHtml({html:e,styles:t}){void 0!==e&&(this.element.innerHTML=e),void 0!==t&&Object.assign(this.element.style,t)}getBBox(){const{element:e}=this;return new n.n1.BBox(e.clientLeft,e.clientTop,e.clientWidth,e.clientHeight)}toggle(e){this.element.classList.toggle("ag-charts-crosshair-label--hidden",!e)}destroy(){this.domManager.removeChild("canvas-overlay",`crosshair-label-${this.id}`)}toLabelHtml(e,t){if("string"==typeof e)return{html:e,styles:{}};t=t??{};const{text:i=t.text??"",color:n=t.color,backgroundColor:s=t.backgroundColor,opacity:r=t.opacity??1}=e;return{html:`<div class="ag-charts-crosshair-label-content">\n                    <span>${i}</span>\n                </div>`,styles:{opacity:r,"background-color":s?.toLowerCase(),color:n}}}};a([sc],oc.prototype,"enabled",2),a([sc],oc.prototype,"xOffset",2),a([sc],oc.prototype,"yOffset",2),a([sc],oc.prototype,"format",2),a([sc],oc.prototype,"renderer",2);var{Group:ac,TranslatableGroup:lc,Line:cc,BBox:hc,InteractionState:dc,Property:uc,ZIndexMap:pc,formatNumber:gc,ChartAxisDirection:fc}=n.n1,mc=class extends n.n1.BaseModuleInstance{constructor(e){super(),this.ctx=e,this.id=(0,s.sX)(this),this.enabled=!1,this.stroke="rgb(195, 195, 195)",this.lineDash=[6,3],this.lineDashOffset=0,this.strokeWidth=1,this.strokeOpacity=1,this.snap=!0,this.label=new rc,this.seriesRect=new hc(0,0,0,0),this.bounds=new hc(0,0,0,0),this.crosshairGroup=new lc({name:"crosshairs",zIndex:pc.SERIES_CROSSHAIR}),this.lineGroup=this.crosshairGroup.appendChild(new ac({name:`${this.id}-crosshair-lines`,zIndex:pc.SERIES_CROSSHAIR})),this.lineGroupSelection=n.n1.Selection.select(this.lineGroup,cc,!1),this.activeHighlight=void 0,this.axisCtx=e.parent,this.labels={},this.hideCrosshairs(),e.domManager.addEventListener("focusin",({target:t})=>{const i=t instanceof HTMLElement&&e.domManager.contains(t,"series-area");this.crosshairGroup.visible&&!i&&(this.hideCrosshairs(),this.ctx.updateService.update(n.n1.ChartUpdateType.PERFORM_LAYOUT))}),this.destroyFns.push(e.scene.attachNode(this.crosshairGroup),e.widgets.seriesWidget.addListener("mousemove",e=>this.onMouseHoverLike(e)),e.widgets.seriesWidget.addListener("drag-move",e=>this.onMouseHoverLike(e)),e.widgets.seriesWidget.addListener("mouseleave",()=>this.onMouseOut()),e.widgets.seriesDragInterpreter.addListener("click",e=>this.onClick(e)),e.chartEventManager.addListener("series-focus-change",()=>this.onKeyPress()),e.zoomManager.addListener("zoom-pan-start",()=>this.onMouseOut()),e.zoomManager.addListener("zoom-change",()=>this.onMouseOut()),e.highlightManager.addListener("highlight-change",e=>this.onHighlightChange(e)),e.layoutManager.addListener("layout:complete",e=>this.layout(e)),()=>Object.values(this.labels).forEach(e=>e.destroy()))}layout({series:{rect:e,visible:t},axes:i}){if(!t||!i||!this.enabled)return;this.seriesRect=e;const{position:n="left",axisId:s}=this.axisCtx,r=i.find(e=>e.id===s);if(!r)return;this.axisLayout=r,this.bounds=e.clone().grow(r.gridPadding+r.seriesAreaPadding,n);const{crosshairGroup:o,bounds:a}=this;o.translationX=Math.round(a.x),o.translationY=Math.round(a.y);const l=["pointer",...this.axisCtx.seriesKeyProperties()];this.updateSelections(l),this.updateLines(),this.updateLabels(l)}updateSelections(e){this.lineGroupSelection.update(e,e=>e.append(new cc),e=>e)}updateLabels(e){const{labels:t,ctx:i}=this;for(const n of e)this.label.enabled&&(t[n]??(t[n]=new oc(i.domManager,n,this.axisCtx.axisId))),t[n]&&this.updateLabel(t[n]);this.labelFormatter=this.axisCtx.scaleValueFormatter(this.label.format)}updateLabel(e){const{enabled:t,xOffset:i,yOffset:n,format:s,renderer:r}=this.label;e.enabled=t,e.xOffset=i,e.yOffset=n,e.format=s,e.renderer=r}updateLines(){const{lineGroupSelection:e,bounds:t,stroke:i,strokeWidth:n,strokeOpacity:s,lineDash:r,lineDashOffset:o,axisLayout:a}=this;if(!a)return;const l=this.isVertical();e.each(e=>{e.stroke=i,e.strokeWidth=n,e.strokeOpacity=s,e.lineDash=r,e.lineDashOffset=o,e.y1=0,e.y2=l?t.height:0,e.x1=0,e.x2=l?0:t.width})}isVertical(){return this.axisCtx.direction===fc.X}isHover(e){return"mousemove"===e.type||"click"===e.type||"touch"===e.device&&"hover"===this.ctx.chartService.touch.dragAction}formatValue(e){const{labelFormatter:t,axisLayout:i}=this;if(t){const i=this.cachedCallWithContext(t,e);if(null!=i)return i}if("number"==typeof e){const t=(i?.label.fractionDigits??0)+((0,s.Fq)(e)?0:1);return gc(e,t)}return String(e??"")}onClick(e){"touch"===e.device&&this.onMouseHoverLike(e)}onMouseHoverLike(e){if(!this.enabled||this.snap)return;const t=this.isHover(e)?dc.Clickable:dc.AnnotationsMoveable;this.ctx.interactionManager.isState(t)&&(this.updatePositions(this.getData(e)),this.crosshairGroup.visible=!0,this.ctx.updateService.update(n.n1.ChartUpdateType.SCENE_RENDER))}onMouseOut(){this.ctx.interactionManager.isState(dc.Clickable)&&(this.hideCrosshairs(),this.ctx.updateService.update(n.n1.ChartUpdateType.SCENE_RENDER))}onKeyPress(){this.enabled&&!this.snap&&this.ctx.interactionManager.isState(dc.Default)&&this.hideCrosshairs()}onHighlightChange(e){if(!this.enabled)return;const{crosshairGroup:t,axisCtx:i}=this,{datum:n,series:s}=e.currentHighlight??{},r=n&&(s?.axes.x?.id===i.axisId||s?.axes.y?.id===i.axisId);if(this.activeHighlight=r?e.currentHighlight:void 0,this.activeHighlight){if(this.snap){const e=this.getActiveHighlightData(this.activeHighlight);this.updatePositions(e),t.visible=!0}}else this.hideCrosshairs()}isInRange(e){return this.axisCtx.inRange(e)}updatePositions(e){const{seriesRect:t,lineGroupSelection:i}=this;i.each((i,n)=>{const s=e[n];if(!s)return i.visible=!1,void this.hideLabel(n);i.visible=!0;const{value:r,position:o}=s;let a=0,l=0;this.isVertical()?(a=o,i.x=Math.round(a)):(l=o,i.y=Math.round(l)),this.label.enabled?this.showLabel(a+t.x,l+t.y,r,n):this.hideLabel(n)})}getData(e){const{axisCtx:t}=this,i="pointer",{datum:n,xKey:s="",yKey:r=""}=this.activeHighlight??{},{currentX:o,currentY:a}=e,l=this.isVertical(),c=l?o:a;let h=n?.[l?s:r]??"";return t.continuous&&(h=t.scaleInvert(c)),{[i]:{position:c,value:h}}}getActiveHighlightData(e){const{axisCtx:t}=this,{datum:i,series:n,xKey:s="",aggregatedValue:r,cumulativeValue:o,midPoint:a}=e,l=n.getKeyProperties(t.direction),c=(t.scale.bandwidth??0)/2,h=n.axes[t.direction]?.id===t.axisId,d=l.indexOf("yKey")>-1&&h,u=l.indexOf("xKey")>-1&&h,p=r??o;if(d&&void 0!==p){const e=t.scale.convert(p)+c;return this.isInRange(e)?{yKey:{value:p,position:e}}:{}}if(u){const e=(this.isVertical()?a?.x:a?.y)??0,n=t.continuous?t.scaleInvert(e):i[s];return this.isInRange(e)?{xKey:{value:n,position:e}}:{}}const g={};return l.forEach(e=>{const s=n.properties[e],r=i[s],o=t.scale.convert(r)+c;this.isInRange(o)&&(g[e]={value:r,position:o})}),g}getLabelHtml(e,t){const i=this.axisLayout?.label?.fractionDigits??0,n={text:this.formatValue(e)};return this.label.renderer?t.toLabelHtml(this.label.renderer({value:e,fractionDigits:i}),n):t.toLabelHtml(n)}showLabel(e,t,i,n){if(!this.axisLayout)return;const{bounds:s}=this,r=this.labels[n],o=this.getLabelHtml(i,r);r.setLabelHtml(o);const{width:a,height:l}=r.getBBox(),c=this.axisCtx.position;let h=this.axisLayout.label.spacing+this.axisLayout.tickSize;this.axisCtx.direction===fc.X?(h-=4,r.show({x:e-a/2,y:"bottom"===c?s.y+s.height+h:s.y-l-h})):(h-=8,r.show({x:"right"===c?s.x+s.width+h:s.x-a-h,y:t-l/2}))}hideCrosshairs(){this.crosshairGroup.visible=!1;for(const e of Object.keys(this.labels))this.hideLabel(e)}hideLabel(e){this.labels[e]?.toggle(!1)}cachedCallWithContext(e,...t){const{callbackCache:i,chartService:n}=this.ctx;return i.call(this.axisCtx,n,e,...t)}};a([uc],mc.prototype,"enabled",2),a([uc],mc.prototype,"stroke",2),a([uc],mc.prototype,"lineDash",2),a([uc],mc.prototype,"lineDashOffset",2),a([uc],mc.prototype,"strokeWidth",2),a([uc],mc.prototype,"strokeOpacity",2),a([uc],mc.prototype,"snap",2),a([uc],mc.prototype,"label",2);var vc={type:"axis-option",optionsKey:"crosshair",packageType:"enterprise",chartTypes:["cartesian"],axisTypes:["category","ordinal-time","unit-time","number","log","time"],moduleFactory:e=>new mc(e),themeTemplate:{crosshair:{snap:!0,stroke:{$ref:"subtleTextColor"},strokeWidth:1,strokeOpacity:1,lineDash:[5,6],lineDashOffset:0,label:{enabled:!0}}}},{ActionOnSet:yc,Property:Cc}=n.n1,bc=class extends n.n1.BaseModuleInstance{constructor(e){super(),this.enabled=!1,this.getData=()=>Promise.resolve(),this.dataService=e.dataService}updateCallback(e,t){this.dataService&&(e&&null!=t?this.dataService.updateCallback(t):this.dataService.clearCallback())}};a([yc({newValue(e){this.updateCallback(e,this.getData)}}),Cc],bc.prototype,"enabled",2),a([yc({newValue(e){this.updateCallback(this.enabled,e)}}),Cc],bc.prototype,"getData",2),a([yc({newValue(e){this.dataService.requestThrottle=e}})],bc.prototype,"requestThrottle",2),a([yc({newValue(e){this.dataService.dispatchThrottle=e}})],bc.prototype,"updateThrottle",2),a([yc({newValue(e){this.dataService.dispatchOnlyLatest=!e}})],bc.prototype,"updateDuringInteraction",2);var Sc={type:"root",optionsKey:"dataSource",packageType:"enterprise",chartTypes:["cartesian","hierarchy","polar","topology","flow-proportion","standalone","gauge"],moduleFactory:e=>new bc(e),themeTemplate:{dataSource:{enabled:!1}}},{nearestSquaredInContainer:wc,partialAssign:xc,mergeDefaults:Ec,BBox:Mc}=n.n1,Ac=class{constructor(e){this.components=e,this.union=Mc.merge(e)}containsPoint(e,t){if(!this.union.containsPoint(e,t))return!1;for(const i of this.components)if(i.containsPoint(e,t))return!0;return!1}},Tc=class extends n.n1.Group{constructor(){super(),this.capLength=NaN,this._datum=void 0,this.whiskerPath=new n.n1.Path,this.capsPath=new n.n1.Path,this.bboxes=new Ac([]),this.append([this.whiskerPath,this.capsPath])}get datum(){return this._datum}set datum(e){this._datum=e}calculateCapLength(e,t){const{lengthRatio:i=1,length:n}=e,{lengthRatioMultiplier:s,lengthMax:r}=t,o=n??i*s;return Math.min(o,r)}getItemStylerParams(e,t,i){const{datum:n}=this;if(null==n||null==e.itemStyler)return;const{xLowerKey:s,xUpperKey:r,yLowerKey:o,yUpperKey:a}=e;return{...t,datum:n.datum,seriesId:n.datum.seriesId,xKey:n.xKey,yKey:n.yKey,xLowerKey:s,xUpperKey:r,yLowerKey:o,yUpperKey:a,highlighted:i}}formatStyles(e,t,i,n){let{cap:s,...r}=e;const o=this.getItemStylerParams(t,e,n);if(null!=o&&null!=t.itemStyler){const e=i.callWithContext(t.itemStyler,o);r=Ec(e,r),s=Ec(e?.cap,e,s)}return{whiskerStyle:r,capsStyle:s}}applyStyling(e,t){xc(["visible","stroke","strokeWidth","strokeOpacity","lineDash","lineDashOffset"],e,t)}update(e,t,i,n){if(void 0===this.datum)return;const{whiskerStyle:s,capsStyle:r}=this.formatStyles(e,t,i,n),{xBar:o,yBar:a,capDefaults:l}=this.datum,c=this.whiskerPath;this.applyStyling(c,s),c.path.clear(!0),void 0!==a&&(c.path.moveTo(a.lowerPoint.x,a.lowerPoint.y),c.path.lineTo(a.upperPoint.x,a.upperPoint.y)),void 0!==o&&(c.path.moveTo(o.lowerPoint.x,o.lowerPoint.y),c.path.lineTo(o.upperPoint.x,o.upperPoint.y)),c.path.closePath(),this.capLength=this.calculateCapLength(r??{},l);const h=this.capLength/2,d=this.capsPath;this.applyStyling(d,r),d.path.clear(!0),void 0!==a&&(d.path.moveTo(a.lowerPoint.x-h,a.lowerPoint.y),d.path.lineTo(a.lowerPoint.x+h,a.lowerPoint.y),d.path.moveTo(a.upperPoint.x-h,a.upperPoint.y),d.path.lineTo(a.upperPoint.x+h,a.upperPoint.y)),void 0!==o&&(d.path.moveTo(o.lowerPoint.x,o.lowerPoint.y-h),d.path.lineTo(o.lowerPoint.x,o.lowerPoint.y+h),d.path.moveTo(o.upperPoint.x,o.upperPoint.y-h),d.path.lineTo(o.upperPoint.x,o.upperPoint.y+h)),d.path.closePath()}updateBBoxes(){const{capLength:e,whiskerPath:t,capsPath:i}=this,{yBar:n,xBar:s}=this.datum??{},r=e/2,o=[];if(void 0!==n){const s=n.lowerPoint.y-n.upperPoint.y;o.push(new Mc(n.lowerPoint.x,n.upperPoint.y,t.strokeWidth,s),new Mc(n.lowerPoint.x-r,n.lowerPoint.y,e,i.strokeWidth),new Mc(n.upperPoint.x-r,n.upperPoint.y,e,i.strokeWidth))}if(void 0!==s){const n=s.upperPoint.x-s.lowerPoint.x;o.push(new Mc(s.lowerPoint.x,s.upperPoint.y,n,t.strokeWidth),new Mc(s.lowerPoint.x,s.lowerPoint.y-r,i.strokeWidth,e),new Mc(s.upperPoint.x,s.upperPoint.y-r,i.strokeWidth,e))}this.bboxes.components=o,this.bboxes.union=Mc.merge(o)}containsPoint(e,t){return this.bboxes.containsPoint(e,t)}pickNode(e,t){return this.containsPoint(e,t)?this:void 0}nearestSquared(e,t,i){const{bboxes:n}=this;if(n.union.distanceSquared(e,t)>i)return{nearest:void 0,distanceSquared:1/0};const{distanceSquared:s}=Mc.nearestBox(e,t,n.components);return{nearest:this,distanceSquared:s}}},Dc=class extends n.n1.Group{nearestSquared(e,t){const{nearest:i,distanceSquared:n}=wc(e,t,{children:this.children()});if(void 0!==i&&!isNaN(n))return{datum:i.datum,distanceSquared:n}}},{BaseProperties:Ic,Property:Rc}=n.n1,Lc=class extends Ic{};a([Rc],Lc.prototype,"visible",2),a([Rc],Lc.prototype,"stroke",2),a([Rc],Lc.prototype,"strokeWidth",2),a([Rc],Lc.prototype,"strokeOpacity",2),a([Rc],Lc.prototype,"lineDash",2),a([Rc],Lc.prototype,"lineDashOffset",2),a([Rc],Lc.prototype,"length",2),a([Rc],Lc.prototype,"lengthRatio",2);var kc=class extends Ic{constructor(){super(...arguments),this.visible=!0,this.stroke="black",this.strokeWidth=1,this.strokeOpacity=1,this.cap=new Lc}};a([Rc],kc.prototype,"yLowerKey",2),a([Rc],kc.prototype,"yLowerName",2),a([Rc],kc.prototype,"yUpperKey",2),a([Rc],kc.prototype,"yUpperName",2),a([Rc],kc.prototype,"xLowerKey",2),a([Rc],kc.prototype,"xLowerName",2),a([Rc],kc.prototype,"xUpperKey",2),a([Rc],kc.prototype,"xUpperName",2),a([Rc],kc.prototype,"visible",2),a([Rc],kc.prototype,"stroke",2),a([Rc],kc.prototype,"strokeWidth",2),a([Rc],kc.prototype,"strokeOpacity",2),a([Rc],kc.prototype,"lineDash",2),a([Rc],kc.prototype,"lineDashOffset",2),a([Rc],kc.prototype,"itemStyler",2),a([Rc],kc.prototype,"cap",2);var{fixNumericExtent:Pc,groupAccumulativeValueProperty:Nc,mergeDefaults:Oc,valueProperty:_c,ChartAxisDirection:Fc}=n.n1,Gc=class e extends n.n1.BaseModuleInstance{constructor(e){super(),this.properties=new kc;const t=function(e){for(const t of n.On)if(t===e.series.type)return e.series;throw new Error(`AG Charts - unsupported series type '${e.series.type}', error bars supported series types: ${n.On.join(", ")}`)}(e),{annotationGroup:i,annotationSelections:s}=t;this.cartesianSeries=t,this.groupNode=new Dc({name:`${i.id}-errorBars`}),i.appendChild(this.groupNode),this.selection=n.n1.Selection.select(this.groupNode,()=>this.errorBarFactory()),s.add(this.selection),t.addEventListener("seriesVisibilityChange",e=>this.onToggleSeriesItem(e)),this.destroyFns.push(t.addListener("data-processed",e=>this.onDataProcessed(e)),t.addListener("data-update",e=>this.onDataUpdate(e)),e.highlightManager.addListener("highlight-change",e=>this.onHighlightChange(e)),()=>i.removeChild(this.groupNode),()=>s.delete(this.selection))}hasErrorBars(){const{xLowerKey:e,xUpperKey:t,yLowerKey:i,yUpperKey:n}=this.properties;return(0,s.vM)(e)&&(0,s.vM)(t)||(0,s.vM)(i)&&(0,s.vM)(n)}isStacked(){const e=this.cartesianSeries.seriesGrouping?.stackCount;return null!=e&&e>0}getUnstackPropertyDefinition(e){const t=[],{xLowerKey:i,xUpperKey:n,yLowerKey:s,yUpperKey:r,xErrorsID:o,yErrorsID:a}=this.getMaybeFlippedKeys(),{xScaleType:l,yScaleType:c}=e;return null!=s&&null!=r&&t.push(_c(s,c,{id:`${a}-lower`}),_c(r,c,{id:`${a}-upper`})),null!=i&&null!=n&&t.push(_c(i,l,{id:`${o}-lower`}),_c(n,l,{id:`${o}-upper`})),t}getStackPropertyDefinition(e){const t=[],{cartesianSeries:i}=this,{xLowerKey:n,xUpperKey:s,yLowerKey:r,yUpperKey:o,xErrorsID:a,yErrorsID:l}=this.getMaybeFlippedKeys(),{xScaleType:c,yScaleType:h}=e,d=i.seriesGrouping?.groupIndex??i.id,u={invalidValue:null,missingValue:0,separateNegative:!0,...i.visible?{}:{forceValue:0}},p=(e,t,i,n)=>Nc(e,"normal","current",{id:`${t}-${i}`,groupId:`errorGroup-${d}-${i}`,...u},n),g=(e,i,n,s)=>{t.push(...p(e,n,"lower",s),...p(i,n,"upper",s))};return null!=r&&null!=o&&g(r,o,l,h),null!=n&&null!=s&&g(n,s,a,c),t}getPropertyDefinitions(e){return this.isStacked()?this.getStackPropertyDefinition(e):this.getUnstackPropertyDefinition(e)}onDataProcessed(e){this.dataModel=e.dataModel,this.processedData=e.processedData}getDomain(e){const{xLowerKey:t,xUpperKey:i,xErrorsID:n,yLowerKey:r,yUpperKey:o,yErrorsID:a}=this.getMaybeFlippedKeys();if(e===Fc.X?(0,s.vM)(t)&&(0,s.vM)(i):(0,s.vM)(r)&&(0,s.vM)(o)){const{dataModel:t,processedData:i,cartesianSeries:s}=this;if(null!=t&&null!=i){const r={x:n,y:a}[e],o=t.getDomain(s,`${r}-lower`,"value",i),l=t.getDomain(s,`${r}-upper`,"value",i),c=[Math.min(...o,...l),Math.max(...o,...l)];return Pc(c)}}return[]}onDataUpdate(e){this.dataModel=e.dataModel,this.processedData=e.processedData,(0,s.vM)(e.dataModel)&&(0,s.vM)(e.processedData)&&(this.createNodeData(),this.update())}getNodeData(){return this.hasErrorBars()?this.cartesianSeries.contextNodeData?.nodeData:void 0}createNodeData(){const e=this.getNodeData(),t=this.cartesianSeries.axes[Fc.X]?.scale,i=this.cartesianSeries.axes[Fc.Y]?.scale;if(t&&i&&e)for(let n=0;n<e.length;n++){const{midPoint:r,xLower:o,xUpper:a,yLower:l,yUpper:c}=this.getDatum(e,n);if(null!=r){let h,d;(0,s.vM)(o)&&(0,s.vM)(a)&&(h={lowerPoint:{x:this.convert(t,o),y:r.y},upperPoint:{x:this.convert(t,a),y:r.y}}),(0,s.vM)(l)&&(0,s.vM)(c)&&(d={lowerPoint:{x:r.x,y:this.convert(i,l)},upperPoint:{x:r.x,y:this.convert(i,c)}}),e[n].xBar=h,e[n].yBar=d}}}getMaybeFlippedKeys(){let{xLowerKey:e,xUpperKey:t,yLowerKey:i,yUpperKey:n}=this.properties,[s,r]=["xValue-errors","yValue-errors"];return this.cartesianSeries.shouldFlipXY()&&([e,i]=[i,e],[t,n]=[n,t],[s,r]=[r,s]),{xLowerKey:e,xUpperKey:t,xErrorsID:s,yLowerKey:i,yUpperKey:n,yErrorsID:r}}static getDatumKey(e,t,i){if(null==t)return;const n=e.datum[t];if(null!=n){if("number"==typeof n)return n+i;s.Vy.warnOnce(`Found [${t}] error value of type ${typeof n}. Expected number type`)}}getDatum(t,i){const{xLowerKey:n,xUpperKey:s,yLowerKey:r,yUpperKey:o}=this.getMaybeFlippedKeys(),a=t[i],l=null!=a.cumulativeValue&&this.isStacked()?a.cumulativeValue-a.yValue:0,[c,h]=this.cartesianSeries.shouldFlipXY()?[l,0]:[0,l];return{midPoint:a.midPoint,xLower:e.getDatumKey(a,n,c),xUpper:e.getDatumKey(a,s,c),yLower:e.getDatumKey(a,r,h),yUpper:e.getDatumKey(a,o,h)}}convert(e,t){const i=(e.bandwidth??0)/2;return e.convert(t)+i}update(){const e=this.getNodeData();null!=e&&(this.selection.update(e),this.selection.each((e,t,i)=>this.updateNode(e,t,i)))}updateNode(e,t,i){e.datum=t,e.update(this.getDefaultStyle(),this.properties,this.cartesianSeries,!1),e.updateBBoxes()}pickNodeExact(e){const{x:t,y:i}=e,n=this.groupNode.pickNode(t,i);if(null!=n)return{datum:n.datum,distanceSquared:0}}pickNodeNearest(e){return this.groupNode.nearestSquared(e.x,e.y)}pickNodeMainAxisFirst(e){return this.groupNode.nearestSquared(e.x,e.y)}getTooltipParams(){const{xLowerKey:e,xUpperKey:t,yLowerKey:i,yUpperKey:n,xLowerName:s=e,xUpperName:r=t,yLowerName:o=i,yUpperName:a=n}=this.properties;return{xLowerKey:e,xLowerName:s,xUpperKey:t,xUpperName:r,yLowerKey:i,yLowerName:o,yUpperKey:n,yUpperName:a}}onToggleSeriesItem(e){this.groupNode.visible=e.visible}makeStyle(e){return{visible:e.visible,lineDash:e.lineDash,lineDashOffset:e.lineDashOffset,stroke:e.stroke,strokeWidth:e.strokeWidth,strokeOpacity:e.strokeOpacity,cap:Oc(this.properties.cap,e)}}getDefaultStyle(){return this.makeStyle(this.getWhiskerProperties())}getHighlightStyle(){return this.makeStyle(this.getWhiskerProperties())}restyleHighlightChange(e,t,i){const n=this.getNodeData();if(null!=n)for(let s=0;s<n.length;s++)if(e===n[s]){this.selection.at(s)?.update(t,this.properties,this.cartesianSeries,i);break}}onHighlightChange(e){const{previousHighlight:t,currentHighlight:i}=e;i?.series===this.cartesianSeries&&this.restyleHighlightChange(i,this.getHighlightStyle(),!0),t?.series===this.cartesianSeries&&this.restyleHighlightChange(t,this.getDefaultStyle(),!1),this.groupNode.opacity=this.cartesianSeries.getOpacity()}errorBarFactory(){return new Tc}getWhiskerProperties(){const{stroke:e,strokeWidth:t,visible:i,strokeOpacity:n,lineDash:s,lineDashOffset:r}=this.properties;return{stroke:e,strokeWidth:t,visible:i,strokeOpacity:n,lineDash:s,lineDashOffset:r}}},Vc={type:"series-option",identifier:"error-bars",optionsKey:"errorBar",packageType:"enterprise",chartTypes:["cartesian"],seriesTypes:n.On,moduleFactory:e=>new Gc(e),themeTemplate:{series:{errorBar:{visible:!0,stroke:{$ref:"foregroundColor"},strokeWidth:1,strokeOpacity:1,cap:{length:void 0,lengthRatio:void 0}}}}},{ZIndexMap:Bc,ActionOnSet:Hc,Property:zc,ProxyPropertyOnWrite:Uc}=n.n1,Wc=class extends n.n1.Background{constructor(){super(...arguments),this.image=new Ll,this.fill="transparent",this.fillOpacity=void 0}createNode(){return new n.n1.Group({name:"foreground",zIndex:Bc.FOREGROUND})}onLayoutComplete(e){super.onLayoutComplete(e);const{width:t,height:i}=e.chart;let n={x:0,y:0,width:t,height:i};this.image&&(n=this.image.performLayout(t,i)),this.text&&this.updateTextNode(n)}onImageLoad(){this.ctx.updateService.update(n.n1.ChartUpdateType.SCENE_RENDER)}updateTextNode(e){const{textNode:t}=this;t.fontWeight="bold",t.fontFamily="Impact, sans-serif",t.fontSize=19,t.opacity=.7,t.fill="#9b9b9b",t.textBaseline="top";const i=this.textNode.getBBox();t.x=e.x+e.width/2-i.width/2,t.y=e.y+e.height+10}};a([zc,Hc({newValue(e){this.node.appendChild(e.node),e.onLoad=()=>this.onImageLoad()},oldValue(e){this.node.removeChild(e.node),e.onLoad=void 0}})],Wc.prototype,"image",2),a([zc,Uc("rectNode","fill")],Wc.prototype,"fill",2),a([zc,Uc("rectNode","fillOpacity")],Wc.prototype,"fillOpacity",2);var jc={type:"root",optionsKey:"foreground",packageType:"enterprise",chartTypes:["cartesian","polar","hierarchy","topology","flow-proportion","standalone","gauge"],moduleFactory:e=>new Wc(e)},{TranslatableGroup:Kc,SceneChangeDetection:$c}=n.n1,Yc=class extends Kc{constructor(){super(...arguments),this.inset=0,this.cornerRadius=0}applyClip(e,t){const{cornerRadius:i,inset:n}=this,{x:s,y:r,width:o,height:a}=t;e.beginPath(),e.roundRect(s+n,r+n,o-2*n,a-2*n,i),e.clip()}};a([$c()],Yc.prototype,"inset",2),a([$c()],Yc.prototype,"cornerRadius",2);var{Property:qc,ZIndexMap:Xc,ActionOnSet:Zc,CategoryAxis:Qc,TextUtils:Jc,Padding:eh,Group:th,BBox:ih,ProxyProperty:nh}=n.n1,sh=class{constructor(){this.top=0,this.bottom=0}};a([qc],sh.prototype,"top",2),a([qc],sh.prototype,"bottom",2);var rh=class extends n.n1.BaseModuleInstance{constructor(e){super(),this.ctx=e,this.enabled=!1,this.padding=new sh,this.root=new th({name:"root"}),this.seriesRoot=this.root.appendChild(new Yc({name:"Series-root",zIndex:Xc.SERIES_LAYER,renderToOffscreenCanvas:!0})),this.axisGridGroup=this.root.appendChild(new th({name:"Axes-Grids",zIndex:Xc.AXIS_GRID})),this.axisGroup=this.root.appendChild(new th({name:"Axes-Grids",zIndex:Xc.AXIS_GRID})),this.axisLabelGroup=this.root.appendChild(new th({name:"Axes-Labels",zIndex:Xc.SERIES_LABEL})),this.axisCrosslineRangeGroup=this.root.appendChild(new th({name:"Axes-Crosslines-Range",zIndex:Xc.SERIES_CROSSLINE_RANGE})),this.axisCrosslineLineGroup=this.root.appendChild(new th({name:"Axes-Crosslines-Line",zIndex:Xc.SERIES_CROSSLINE_LINE})),this.axisCrosslineLabelGroup=this.root.appendChild(new th({name:"Axes-Crosslines-Label",zIndex:Xc.SERIES_LABEL})),this.data=[],this._destroyed=!1,this.miniChartAnimationPhase="initial",this.axes=[],this.series=[]}destroy(){this._destroyed||(this.destroySeries(this.series),this.axes.forEach(e=>e.destroy()),this.axes=[],this._destroyed=!0)}onSeriesChange(e,t){const i=t?.filter(t=>!e.includes(t))??[];this.destroySeries(i);for(const i of e){if(t?.includes(i))continue;i.attachSeries(this.seriesRoot,this.seriesRoot,void 0);const e=this;i.chart={get mode(){return"standalone"},get isMiniChart(){return!0},get seriesRect(){return e.seriesRect}},i.resetAnimation("initial"===this.miniChartAnimationPhase?"initial":"disabled")}}destroySeries(e){e?.forEach(e=>{e.destroy(),e.detachSeries(this.seriesRoot,this.seriesRoot,void 0),e.chart=void 0})}assignSeriesToAxes(){this.axes.forEach(e=>{e.boundSeries=this.series.filter(t=>t.axes[e.direction]===e)})}assignAxesToSeries(){const e={};this.axes.forEach(t=>{const i=t.direction;(e[i]??(e[i]=[])).push(t)}),this.series.forEach(t=>{t.directions.forEach(i=>{const n=e[i];if(!n)return void s.Vy.warnOnce(`no available axis for direction [${i}]; check series and axes configuration.`);const r=t.getKeys(i),o=this.findMatchingAxis(n,r);o?t.axes[i]=o:s.Vy.warnOnce(`no matching axis for direction [${i}] and keys [${r}]; check series and axes configuration.`)})})}findMatchingAxis(e,t){for(const i of e){if(!i.keys.length)return i;if(t)for(const e of t)if(i.keys.includes(e))return i}}updateData(e){this.series.forEach(t=>t.setChartData(e)),"initial"===this.miniChartAnimationPhase&&this.ctx.animationManager.onBatchStop(()=>{this.miniChartAnimationPhase="ready",this.series.forEach(e=>e.resetAnimation("disabled"))})}async processData(e){this.series.some(e=>e.canHaveAxes)&&(this.assignAxesToSeries(),this.assignSeriesToAxes()),await Promise.all(this.series.map(t=>(t.resetDatumCallbackCache(),t.processData(e))));for(const e of this.axes)e.processData()}computeAxisPadding(){const e=new eh;return this.enabled?(this.axes.forEach(({position:t,thickness:i,line:n,label:s})=>{if(null==t)return;let r;r=i||(n.enabled?n.width:0)+(s.enabled?Jc.getLineHeight(s.fontSize??0)+s.spacing:0),e[t]=Math.ceil(r)}),e):e}async layout(e,t){const{padding:i}=this,n=null!=this.seriesRect,s=new ih(0,0,e,t-(i.top+i.bottom));this.seriesRect=s,this.seriesRoot.translationY=i.top,this.seriesRoot.setClipRectCanvasSpace(new ih(0,-i.top,e,t)),this.axes.forEach(i=>{const{position:r="left"}=i;switch(r){case"top":case"bottom":i.range=[0,s.width],i.gridLength=s.height;break;case"right":case"left":{const e=i instanceof Qc;i.range=e?[0,s.height]:[s.height,0],i.gridLength=s.width;break}}i.gridPadding=0,i.translation.x=0,i.translation.y=0,"right"===r?i.translation.x=e:"bottom"===r&&(i.translation.y=t),n||i.resetAnimation("initial"),i.calculateLayout(),i.update()}),await Promise.all(this.series.map(e=>e.update({seriesRect:s})))}};a([qc],rh.prototype,"enabled",2),a([nh(["seriesRoot","inset"])],rh.prototype,"inset",2),a([nh(["seriesRoot","cornerRadius"])],rh.prototype,"cornerRadius",2),a([Zc({changeValue(e,t=[]){const i={axisNode:this.axisGroup,gridNode:this.axisGridGroup,labelNode:this.axisLabelGroup,crossLineLineNode:this.axisCrosslineLineGroup,crossLineRangeNode:this.axisCrosslineRangeGroup,crossLineLabelNode:this.axisCrosslineLabelGroup};for(const n of t)e.includes(n)||(n.detachAxis(i),n.destroy());for(const n of e)t?.includes(n)||n.attachAxis(i)}})],rh.prototype,"axes",2),a([Zc({changeValue(e,t){this.onSeriesChange(e,t)}})],rh.prototype,"series",2);var{SliderWidget:oh}=n.n1,ah=class{constructor(e,t){this.ctx=e,this.sliderHandlers=t,this._min=0,this._max=1,this.minRange=.001,this.dragStartX=0,this.ctx=e,this.toolbar=e.proxyInteractionService.createProxyContainer({type:"toolbar",domManagerId:"navigator-toolbar",classList:["ag-charts-proxy-navigator-toolbar"],orientation:"vertical",ariaLabel:{id:"ariaLabelNavigator"}}),this.sliders=[e.proxyInteractionService.createProxyElement({type:"slider",domIndex:1,ariaLabel:{id:"ariaLabelNavigatorMinimum"},parent:this.toolbar,cursor:"ew-resize"}),e.proxyInteractionService.createProxyElement({type:"slider",domIndex:-1/0,ariaLabel:{id:"ariaLabelNavigatorRange"},parent:this.toolbar,cursor:"grab"}),e.proxyInteractionService.createProxyElement({type:"slider",domIndex:2,ariaLabel:{id:"ariaLabelNavigatorMaximum"},parent:this.toolbar,cursor:"ew-resize"})];for(const[e,t]of["min","pan","max"].entries()){const i=this.sliders[e];i.step=oh.STEP_HUNDRETH,i.keyboardStep=oh.STEP_ONE,i.orientation="horizontal",i.setPreventsDefault(!1),i.addListener("drag-start",i=>this.onDragStart(e,i,t)),i.addListener("drag-move",e=>this.onDrag(i,e,t)),i.addListener("drag-end",()=>this.updateSliderRatios()),i.addListener("contextmenu",e=>this.onContextMenu(i,e))}this.sliders[0].addListener("change",()=>this.onMinSliderChange()),this.sliders[1].addListener("change",()=>this.onPanSliderChange()),this.sliders[2].addListener("change",()=>this.onMaxSliderChange()),this.updateSliderRatios(),this.updateVisibility(!1)}destroy(){this.toolbar.destroy()}updateVisibility(e){this.toolbar.setHidden(!e)}updateZoom(){const{_min:e,_max:t}=this;if(null!=e&&null!=t)return this.ctx.zoomManager.updateZoom("navigator",{x:{min:e,max:t}})}updateBounds(e){this.toolbar.setBounds(e)}updateSliderBounds(e,t){this.sliders[e].setBounds(t)}updateMinMax(e,t){this._min=e,this._max=t,this.updateSliderRatios()}updateSliderRatios(){let{_min:e,_max:t}=this;e=Math.round(100*e)/100,t=Math.round(100*t)/100;const i=this.ctx.localeManager.t("ariaValuePanRange",{min:e,max:t});this.sliders[0].setValueRatio(e),this.sliders[1].setValueRatio(e,{ariaValueText:i}),this.sliders[2].setValueRatio(t)}toCanvasOffsets(e){return{offsetX:this.dragStartX+e.originDeltaX}}moveToFront(e){if(1===e)return;const t=this.sliders[e],i=this.sliders[2-e];this.toolbar.moveChild(i,t.domIndex-1)}onDragStart(e,t,i){const n=this.sliders[e],s=this.toolbar.cssLeft(),r=n.cssLeft();this.dragStartX=s+r+t.offsetX,this.moveToFront(e),"touch"===t.device&&t.sourceEvent.preventDefault(),this.sliderHandlers.onDragStart(i,this.toCanvasOffsets(t))}onDrag(e,t,i){"touch"===t.device&&t.sourceEvent.preventDefault(),this.sliderHandlers.onDrag(i,this.toCanvasOffsets(t))}onContextMenu(e,t){const{offsetX:i,offsetY:n}=t,{x:s,y:r}=this.toolbar.getBounds(),{x:o,y:a}=e.getBounds(),l=i+s+o,c=n+r+a;this.ctx.contextMenuRegistry.dispatchContext("always",{widgetEvent:t,canvasX:l,canvasY:c},void 0)}onPanSliderChange(){const e=this.sliders[1].getValueRatio(),t=this._max-this._min;this._min=(0,s.qE)(0,e,1-t),this._max=this._min+t,this.updateZoom()}onMinSliderChange(){this._min=this.sliders[0].clampValueRatio(0,this._max-this.minRange),this.updateZoom()}onMaxSliderChange(){this._max=this.sliders[2].clampValueRatio(this._min+this.minRange,1),this.updateZoom()}},{Property:lh,SceneChangeDetection:ch,BBox:hh,ExtendedPath2D:dh}=n.n1,uh=class extends n.n1.Path{constructor(){super(...arguments),this.zIndex=3,this.centerX=0,this.centerY=0,this.width=8,this.height=16,this.cornerRadius=4,this.grip=!0,this.gripPath=new dh}setCenter(e,t){this.dirtyPath=!0,this.centerX===e&&this.centerY===t||(this.centerX=e,this.centerY=t,this.markDirty("center"))}static align(e,t,i,n,s,r,o,a,l){const c=e.align(i+s*o)+l,h=c+e.align(i+s*o,s*(a-o))-2*l,d=e.align(n+r/2);e.setCenter(c,d),t.setCenter(h,d)}computeBBox(){const{centerX:e,centerY:t,width:i,height:n}=this;return new hh(e-i/2,t-n/2,i,n)}isPointInPath(e,t){return this.getBBox().containsPoint(e,t)}updatePath(){const{centerX:e,centerY:t,path:i,gripPath:n,strokeWidth:s,cornerRadius:r,grip:o}=this,a=s/2,l=this.layerManager?.canvas?.pixelRatio??1;i.clear(),n.clear();const c=Math.floor(this.width/2*l)/l,h=Math.floor(this.height/2*l)/l;if(i.roundRect(e-c+a,t-h+a,2*(c-a),2*(h-a),r),o)for(let i=-.5;i<=.5;i+=1)for(let s=-1;s<=1;s+=1)n.arc(e+3*i,t+3*s,1,0,2*Math.PI),n.closePath()}renderFill(e,t){const{stroke:i}=this;super.renderFill(e,t),e.fillStyle="string"==typeof i?i:"black",e.fill(this.gripPath.getPath2D())}};uh.className="RangeHandle",a([lh,ch()],uh.prototype,"width",2),a([lh,ch()],uh.prototype,"height",2),a([lh,ch()],uh.prototype,"cornerRadius",2),a([lh,ch()],uh.prototype,"grip",2);var{Path:ph,BBox:gh,ExtendedPath2D:fh,clippedRoundRect:mh,Property:vh,SceneChangeDetection:yh}=n.n1,Ch=class extends ph{constructor(){super(...arguments),this.cornerRadius=4,this.zIndex=2,this.x=0,this.y=0,this.width=200,this.height=30,this.min=0,this.max=1,this.visiblePath=new fh}layout(e,t,i,n,s,r){s=isNaN(s)?this.min:s,r=isNaN(r)?this.max:r,e===this.x&&t===this.y&&i===this.width&&this.height===n&&s===this.min&&r===this.max||(this.x=e,this.y=t,this.width=i,this.height=n,this.min=s,this.max=r,this.dirtyPath=!0,this.markDirty("RangeMask.layout"))}computeBBox(){const{x:e,y:t,width:i,height:n}=this;return new gh(e,t,i,n)}computeVisibleRangeBBox(){const{x:e,y:t,width:i,height:n,min:s,max:r}=this,o=e+i*s;return new gh(o,t,e+i*r-o,n)}updatePath(){const{path:e,visiblePath:t,x:i,y:n,width:s,height:r,min:o,max:a,strokeWidth:l,cornerRadius:c}=this,h=l/2;e.clear(),t.clear();const d=this.align(i)+h,u=this.align(n)+h,p=this.align(i,s)-2*h,g=this.align(n,r)-2*h,f=this.align(i+s*o)+h,m=f+this.align(i+s*o,s*(a-o))-2*h,v={topLeft:c,topRight:c,bottomRight:c,bottomLeft:c};mh(e,d,u,p,g,v,new gh(d,u,f-d,g)),mh(e,d,u,p,g,v,new gh(m,u,p+d-m,g)),m-f>1&&mh(t,d,u,p,g,v,new gh(f,u,m-f,g))}renderStroke(e,t){super.renderStroke(e,t),super.renderStroke(e,this.visiblePath.getPath2D())}};Ch.className="RangeMask",a([vh,yh()],Ch.prototype,"cornerRadius",2);var bh=class extends n.n1.Group{constructor(e){super({name:"rangeSelectorGroup",zIndex:n.n1.ZIndexMap.NAVIGATOR}),this.x=0,this.y=0,this.width=200,this.height=30,this.lOffset=0,this.rOffset=0,this.background=this.appendChild(new n.n1.TranslatableGroup({name:"navigator-background",zIndex:1})),this.append(e)}layout(e,t,i,n,s,r){this.x=e,this.y=t,this.width=i,this.height=n,this.lOffset=s,this.rOffset=r,this.background.translationX=e,this.background.translationY=t,this.markDirty("RangeSelector")}updateBackground(e,t){null!=e&&this.background.removeChild(e),null!=t&&this.background.appendChild(t),this.markDirty("RangeSelector")}computeBBox(){const{x:e,y:t,width:i,height:s,lOffset:r,rOffset:o}=this;return new n.n1.BBox(e-r,t,i+(r+o),s)}},{BaseModuleInstance:Sh,ObserveChanges:wh,Property:xh}=n.n1,Eh=class extends Sh{constructor(e){super(),this.ctx=e,this.enabled=!1,this.mask=new Ch,this.minHandle=new uh,this.maxHandle=new uh,this.maskVisibleRange={id:"navigator-mask-visible-range",getBBox:()=>this.mask.computeVisibleRangeBBox(),toCanvasBBox:()=>this.mask.computeVisibleRangeBBox(),fromCanvasPoint:(e,t)=>({x:e,y:t})},this.height=30,this.cornerRadius=0,this.spacing=10,this.x=0,this.y=0,this.width=0,this.rangeSelector=new bh([this.mask,this.minHandle,this.maxHandle]),this.destroyFns.push(e.scene.attachNode(this.rangeSelector),this.ctx.localeManager.addListener("locale-changed",()=>this.updateZoom()),this.ctx.layoutManager.registerElement(n.n1.LayoutElement.Navigator,e=>this.onLayoutStart(e)),this.ctx.layoutManager.addListener("layout:complete",e=>this.onLayoutComplete(e)),e.zoomManager.addListener("zoom-change",e=>this.onZoomChange(e))),this.domProxy=new ah(e,this),this.updateGroupVisibility(),this.miniChart=new rh(e)}updateBackground(e,t){this.rangeSelector?.updateBackground(e,t)}updateGroupVisibility(){const{enabled:e}=this;null!=this.rangeSelector&&e!==this.rangeSelector.visible&&(this.rangeSelector.visible=e,this.domProxy.updateVisibility(e),e?this.updateZoom():this.ctx.zoomManager.updateZoom("navigator"))}onLayoutStart(e){if(this.enabled){const{layoutBox:t}=e,i=this.height+this.spacing;t.shrink(i,"bottom"),this.y=t.y+t.height+this.spacing}else this.y=0;if(this.enabled&&this.miniChart){const{top:t,bottom:i}=this.miniChart.computeAxisPadding();e.layoutBox.shrink(t+i,"bottom"),this.y-=i,this.miniChart.inset=this.mask.strokeWidth/2,this.miniChart.cornerRadius=this.mask.cornerRadius}}onLayoutComplete(e){const{x:t,width:i}=e.series.rect,{y:n,height:r}=this;if(this.domProxy.updateVisibility(this.enabled),this.enabled){const{_min:e,_max:s}=this.domProxy;this.layoutNodes(t,n,i,r,e,s),this.domProxy.updateBounds({x:t,y:n,width:i,height:r})}this.x=t,this.width=i,this.miniChart?.layout(i,r).catch(e=>s.Vy.error(e))}canDrag(){return this.enabled&&this.ctx.interactionManager.isState(n.n1.InteractionState.ZoomDraggable)}onDragStart(e,{offsetX:t}){this.canDrag()&&("pan"===e&&(this.panStart=(t-this.x)/this.width-this.domProxy._min),this.ctx.zoomManager.fireZoomPanStartEvent("navigator"))}onDrag(e,{offsetX:t}){if(!this.canDrag())return;const{panStart:i,x:n,width:r}=this,{minRange:o}=this.domProxy;let{_min:a,_max:l}=this.domProxy;const c=(t-n)/r;if("min"===e)a=(0,s.qE)(0,c,l-o);else if("max"===e)l=(0,s.qE)(a+o,c,1);else if("pan"===e&&null!=i){const e=l-a;a=(0,s.qE)(0,c-i,1-e),l=a+e}this.domProxy._min=a,this.domProxy._max=l,this.updateZoom()}onZoomChange(e){const{x:t}=e;if(!t)return;const{x:i,y:n,width:s,height:r}=this,{min:o,max:a}=t;this.domProxy.updateMinMax(o,a),this.layoutNodes(i,n,s,r,o,a)}layoutNodes(e,t,i,n,s,r){const{rangeSelector:o,mask:a,minHandle:l,maxHandle:c}=this;a.layout(e,t,i,n,s,r),o.layout(e,t,i,n,l.width/2,c.width/2),uh.align(l,c,e,t,i,n,s,r,a.strokeWidth/2),s+(r-s)/2<.5?(l.zIndex=3,c.zIndex=4):(l.zIndex=4,c.zIndex=3),[l,this.maskVisibleRange,c].forEach((i,n)=>{const s=i.getBBox(),r={x:s.x-e,y:s.y-t,height:s.height,width:s.width};this.domProxy.updateSliderBounds(n,r)})}updateZoom(){this.enabled&&this.domProxy.updateZoom()}updateData(e){return this.miniChart?.updateData(e)}async processData(e){if(this.miniChart)return this.miniChart?.processData(e)}};a([wh((e,t,i)=>{e.updateBackground(i?.root,t?.root)})],Eh.prototype,"miniChart",2),a([xh,wh((e,t)=>{e.ctx.zoomManager.setNavigatorEnabled(Boolean(t)),e.updateGroupVisibility()})],Eh.prototype,"enabled",2),a([xh],Eh.prototype,"height",2),a([xh,wh((e,t)=>{e.mask.cornerRadius=t})],Eh.prototype,"cornerRadius",2),a([xh],Eh.prototype,"spacing",2);var Mh={type:"root",optionsKey:"navigator",packageType:"enterprise",chartTypes:["cartesian"],moduleFactory:e=>new Eh(e),removable:!1,themeTemplate:{navigator:{enabled:!1,height:18,cornerRadius:4,mask:{fill:{$ref:"foregroundColor"},fillOpacity:.1,stroke:{$ref:"borderColor"},strokeWidth:1},minHandle:{fill:{$ref:"backgroundColor"},stroke:{$ref:"borderColor"},strokeWidth:1,width:12,height:24,cornerRadius:4},maxHandle:{fill:{$ref:"backgroundColor"},stroke:{$ref:"borderColor"},strokeWidth:1,width:12,height:24,cornerRadius:4},miniChart:{enabled:!1,label:{color:{$ref:"textColor"},fontSize:{$rem:[n.n1.FONT_SIZE_RATIO.SMALLER]},fontFamily:{$ref:"fontFamily"},fontWeight:{$ref:"fontWeight"},spacing:5},padding:{top:0,bottom:0}}}}},{ToolbarButtonProperties:Ah,Property:Th}=n.n1,Dh=class extends Ah{};a([Th],Dh.prototype,"value",2);var{ChartAxisDirection:Ih,LayoutElement:Rh,PropertiesArray:Lh,Toolbar:kh,Property:Ph}=n.n1,Nh=class extends n.n1.BaseModuleInstance{constructor(e){super(),this.ctx=e,this.enabled=!1,this.buttons=new Lh(Dh),this.verticalSpacing=10,this.container=e.domManager.addChild("canvas-overlay","range-buttons"),this.container.role="presentation",this.toolbar=new kh(this.ctx.localeManager),this.toolbar.addClass("ag-charts-range-buttons"),this.container.append(this.toolbar.getElement()),this.destroyFns.push(this.toolbar.addToolbarListener("button-pressed",this.onButtonPress.bind(this)),e.layoutManager.registerElement(Rh.ToolbarBottom,this.onLayoutStart.bind(this)),e.zoomManager.addListener("zoom-change",this.onZoomChanged.bind(this)),this.teardown.bind(this))}teardown(){this.container.removeChild(this.toolbar.getElement()),this.toolbar.destroy()}onLayoutStart(e){const{buttons:t,ctx:i,enabled:n,toolbar:s,verticalSpacing:r}=this,{layoutBox:o}=e;if(!n||!i.zoomManager.isZoomEnabled())return void s.setHidden(!0);s.setHidden(!1),s.updateButtons(t);const a=s.getBounds().height;s.setBounds({x:o.x,y:o.y+o.height-a,width:o.width,height:a}),o.shrink({bottom:a+r})}onZoomChanged(){this.toolbar.clearActiveButton()}onButtonPress({button:{index:e}}){const{zoomManager:t}=this.ctx,i=this.buttons.at(e);if(!i)return;const{value:n}=i;"number"==typeof n?t.extendToEnd("zoom-buttons",Ih.X,n):Array.isArray(n)?t.updateWith("zoom-buttons",Ih.X,()=>n):"function"==typeof n&&t.updateWith("zoom-buttons",Ih.X,n),this.toolbar.toggleActiveButtonByIndex(e)}};a([Ph],Nh.prototype,"enabled",2),a([Ph],Nh.prototype,"buttons",2);var Oh=864e5,_h=30*Oh,Fh={type:"root",optionsKey:"ranges",packageType:"enterprise",chartTypes:["cartesian"],moduleFactory:e=>new Nh(e),themeTemplate:{ranges:{enabled:!1,buttons:[{label:"toolbarRange1Month",ariaLabel:"toolbarRange1MonthAria",value:_h},{label:"toolbarRange3Months",ariaLabel:"toolbarRange3MonthsAria",value:3*_h},{label:"toolbarRange6Months",ariaLabel:"toolbarRange6MonthsAria",value:6*_h},{label:"toolbarRangeYearToDate",ariaLabel:"toolbarRangeYearToDateAria",value:(e,t)=>[new Date(`${new Date(t).getFullYear()}-01-01`).getTime(),t]},{label:"toolbarRange1Year",ariaLabel:"toolbarRange1YearAria",value:365*Oh},{label:"toolbarRangeAll",ariaLabel:"toolbarRangeAllAria",value:(e,t)=>[e,t]}]}}},Gh=class e extends n.n1.BaseModuleInstance{constructor(e){super(),this.ctx=e,this.activeSections=new Set,this.sectionButtons={annotations:[],chartToolbar:[]},this.container=this.ctx.domManager.addChild("canvas-overlay","shared-toolbar"),this.container.role="presentation"}getSharedToolbar(e){return this.sharedToolbar||this.createSharedToolbar(),this.toolbarWithSection(e)}createSharedToolbar(){this.sharedToolbar=new n.n1.Toolbar(this.ctx.localeManager,"vertical"),this.sharedToolbar.addClass("ag-charts-shared-toolbar"),this.container.append(this.sharedToolbar.getElement()),this.destroyFns.push(()=>{this.sharedToolbar&&(this.container.removeChild(this.sharedToolbar.getElement()),this.sharedToolbar.destroy(),this.sharedToolbar=void 0)})}toolbarWithSection(t){const i=this.sharedToolbar,n={layout:(e,n)=>{if(null!=this.firstLayoutSection&&this.firstLayoutSection!==t&&this.activeSections.has(this.firstLayoutSection))return;this.firstLayoutSection=t;const s=i.getBounds().width;i.setBounds({x:e.x,y:e.y,width:s}),e.shrink({left:s+i.horizontalSpacing+(n??0)})},addToolbarListener:(e,n)=>i.addToolbarListener(e,e=>{const i=this.getSectionIndex(t,e.button.index);if(i<0)return;const s={...e,button:this.sectionButtons[t][i]};n(s)}),updateButtons:n=>{this.sectionButtons[t]=n;const s=e.SECTION_ORDER.flatMap(e=>this.sectionButtons[e]);i.updateButtons(s)},updateButtonByIndex:(e,n)=>{i.updateButtonByIndex(this.getIndex(t,e),n)},toggleActiveButtonByIndex:e=>{i.toggleActiveButtonByIndex(this.getIndex(t,e))},toggleButtonEnabledByIndex:(e,n)=>{i.toggleButtonEnabledByIndex(this.getIndex(t,e),n)},setHidden:n=>{n?this.activeSections.delete(t):this.activeSections.add(t);let s=0;for(const r of e.SECTION_ORDER)if(r===t)for(const e of this.sectionButtons[t].keys())i.setButtonHiddenByIndex(s+e,n);else s+=this.sectionButtons[r].length},destroy:()=>{n.setHidden(!0),0===this.activeSections.size&&this.destroy()},clearActiveButton:i.clearActiveButton.bind(i),addListener:i.addListener.bind(i),removeListener:i.removeListener.bind(i)};return n.setHidden(!1),n}getIndex(t,i){let n=0;for(const s of e.SECTION_ORDER){if(s===t)return n+i;n+=this.sectionButtons[s].length}return-1}getSectionIndex(t,i){let n=0;for(const s of e.SECTION_ORDER){if(s===t)return i>=n+this.sectionButtons[t].length?-1:i-n;n+=this.sectionButtons[s].length}return-1}};Gh.SECTION_ORDER=["chartToolbar","annotations"];var Vh=Gh,Bh={type:"context",contextKey:"sharedToolbar",packageType:"enterprise",chartTypes:["cartesian"],moduleFactory:e=>new Vh(e)},{CachedTextMeasurerPool:Hh,ZIndexMap:zh,LayoutElement:Uh,Property:Wh,BaseProperties:jh,valueProperty:Kh,TextUtils:$h,Group:Yh,Label:qh,Rect:Xh,Text:Zh}=n.n1,Qh={ohlc:62,candlestick:62,"hollow-candlestick":62,line:96,"step-line":96,hlc:184,"high-low":800},Jh={up:"positive",down:"negative"},ed={hlc:"altNeutral"},td=class extends jh{constructor(){super(...arguments),this.fill="black",this.fillOpacity=1}};a([Wh],td.prototype,"fill",2),a([Wh],td.prototype,"fillOpacity",2);var id=class extends n.n1.BaseModuleInstance{constructor(e){super(),this.ctx=e,this.enabled=!1,this.openKey=void 0,this.highKey=void 0,this.lowKey=void 0,this.closeKey=void 0,this.volumeKey=void 0,this.title=new qh,this.positive=new qh,this.negative=new qh,this.neutral=new qh,this.altNeutral=new qh,this.background=new td,this.layoutStyle="block",this.id="status-bar",this.data=void 0,this.layer=new Yh({name:"StatusBar",zIndex:zh.STATUS_BAR}),this.labelGroup=this.layer.appendChild(new n.n1.TranslatableGroup),this.backgroundNode=this.labelGroup.appendChild(new Xh),this.labels=[{label:"O",configuration:2,title:this.labelGroup.appendChild(new Zh),value:this.labelGroup.appendChild(new Zh),id:"openValue",key:"openKey",domain:void 0,formatter:new Intl.NumberFormat("en-US",{minimumFractionDigits:2,maximumFractionDigits:2})},{label:"H",configuration:16,title:this.labelGroup.appendChild(new Zh),value:this.labelGroup.appendChild(new Zh),id:"highValue",key:"highKey",domain:void 0,formatter:new Intl.NumberFormat("en-US",{minimumFractionDigits:2,maximumFractionDigits:2})},{label:"H",configuration:256,title:this.labelGroup.appendChild(new Zh),value:this.labelGroup.appendChild(new Zh),style:"neutral",id:"highValue",key:"highKey",domain:void 0,formatter:new Intl.NumberFormat("en-US",{minimumFractionDigits:2,maximumFractionDigits:2})},{label:"L",configuration:8,title:this.labelGroup.appendChild(new Zh),value:this.labelGroup.appendChild(new Zh),id:"lowValue",key:"lowKey",domain:void 0,formatter:new Intl.NumberFormat("en-US",{minimumFractionDigits:2,maximumFractionDigits:2})},{label:"L",configuration:512,title:this.labelGroup.appendChild(new Zh),value:this.labelGroup.appendChild(new Zh),style:"neutral",id:"lowValue",key:"lowKey",domain:void 0,formatter:new Intl.NumberFormat("en-US",{minimumFractionDigits:2,maximumFractionDigits:2})},{label:"C",configuration:4,title:this.labelGroup.appendChild(new Zh),value:this.labelGroup.appendChild(new Zh),id:"closeValue",key:"closeKey",domain:void 0,formatter:new Intl.NumberFormat("en-US",{minimumFractionDigits:2,maximumFractionDigits:2})},{label:"C",configuration:128,title:this.labelGroup.appendChild(new Zh),value:this.labelGroup.appendChild(new Zh),id:"closeValue",key:"closeKey",style:"neutral",domain:void 0,formatter:new Intl.NumberFormat("en-US",{minimumFractionDigits:2,maximumFractionDigits:2})},{label:"",configuration:64,title:this.labelGroup.appendChild(new Zh),value:this.labelGroup.appendChild(new Zh),style:"neutral",id:"closeValue",key:"closeKey",domain:void 0,formatter:new Intl.NumberFormat("en-US",{notation:"compact",minimumFractionDigits:2,maximumFractionDigits:2})},{label:"Vol",configuration:32,title:this.labelGroup.appendChild(new Zh),value:this.labelGroup.appendChild(new Zh),id:"volumeValue",key:"volumeKey",domain:void 0,formatter:new Intl.NumberFormat("en-US",{notation:"compact",minimumFractionDigits:2,maximumFractionDigits:2})}],this.highlightManager=e.highlightManager,this.labelGroup.visible=!1,this.destroyFns.push(e.scene.attachNode(this.layer),e.layoutManager.registerElement(Uh.Overlay,e=>this.startPerformLayout(e)),e.layoutManager.addListener("layout:complete",e=>this.onLayoutComplete(e)),e.highlightManager.addListener("highlight-change",()=>this.updateHighlight()))}async processData(e){if(!this.enabled||null==this.data)return;const t=[];for(const e of this.labels){const{id:i,key:n}=e,s=this[n];null==s?e.domain=void 0:t.push(Kh(s,"number",{id:i}))}if(0===t.length)return;const{processedData:i,dataModel:n}=await e.request(this.id,this.data,{props:t});for(const e of this.labels){const{id:t,key:s}=e;null!=this[s]&&(e.domain=n.getDomain(this,t,"value",i))}}startPerformLayout(e){if(this.labelGroup.translationX=0,this.labelGroup.translationY=0,!this.enabled)return;const{layoutBox:t}=e;this.labelGroup.translationY=t.y+0;const i=Math.max(this.title.fontSize,this.positive.fontSize,this.negative.fontSize),n=$h.getLineHeight(i),s=Qh[this.getChartType()]??0;let r,o=0,a="alphabetic";if("block"===this.layoutStyle)t.shrink(0+n+8,"top"),r=i+(n-i)/2;else{const{title:e}=this.ctx.chartService;if(a="top",r=0+e.padding,e.enabled){const t=e.node.getBBox();o=t.x+t.width+12}else o=e.padding}for(const{label:e,configuration:t,title:i,value:n,domain:l,formatter:c}of this.labels){if(null==l||0===(s&t)){i.visible=!1,n.visible=!1;continue}const h=Math.max(Hh.measureText(c.format(l[0]),{font:this.positive.getFont(),textBaseline:a,textAlign:"left"}).width,Hh.measureText(c.format(l[1]),{font:this.positive.getFont(),textBaseline:a,textAlign:"left"}).width,Hh.measureText(c.format(l[0]),{font:this.negative.getFont(),textBaseline:a,textAlign:"left"}).width,Hh.measureText(c.format(l[1]),{font:this.negative.getFont(),textBaseline:a,textAlign:"left"}).width);i.visible=!0,n.visible=!0;const d=Hh.measureText(e,{font:this.title.getFont(),textBaseline:a,textAlign:"left"});i.setFont(this.title),i.fill=this.title.color,i.text=e,i.textBaseline=a,i.y=r,i.x=o,o+=d.width+4,n.textBaseline=a,n.y=r,n.x=o,o+=h+12}this.backgroundNode.x=0,this.backgroundNode.y=0,this.backgroundNode.width=o-12,this.backgroundNode.height=n+0+8,this.backgroundNode.fill=this.background.fill,this.backgroundNode.fillOpacity=this.background.fillOpacity}onLayoutComplete(e){this.labelGroup.translationX=e.series.rect.x,this.updateHighlight()}updateHighlight(){if(!this.enabled)return;const e=this.highlightManager.getActiveHighlight(),t=e?.datum??this.data?.at(-1);if(null==t)return void(this.labelGroup.visible=!1);this.labelGroup.visible=!0;const i=e?.itemId;let n=null!=i?Jh[i]:void 0;null==n&&null!=this.openKey&&null!=this.closeKey&&(n=t[this.openKey]<t[this.closeKey]?"positive":"negative");for(const{domain:e,value:i,key:s,formatter:r,style:o}of this.labels){if(null==e)continue;let a=o??n??"neutral";"neutral"===a&&(a=ed[this.getChartType()]??a);const l=this[s],c=null!=l?t?.[l]:void 0;i.setFont(this[a]),i.fill=this[a].color,i.text="number"==typeof c?r.format(c):""}}getChartType(){let e=this.ctx.chartService.publicApi?.getOptions()?.chartType;return null!=e&&null!=Qh[e]||(e="candlestick"),e}};a([Wh],id.prototype,"enabled",2),a([Wh],id.prototype,"openKey",2),a([Wh],id.prototype,"highKey",2),a([Wh],id.prototype,"lowKey",2),a([Wh],id.prototype,"closeKey",2),a([Wh],id.prototype,"volumeKey",2),a([Wh],id.prototype,"title",2),a([Wh],id.prototype,"positive",2),a([Wh],id.prototype,"negative",2),a([Wh],id.prototype,"neutral",2),a([Wh],id.prototype,"altNeutral",2),a([Wh],id.prototype,"background",2),a([Wh],id.prototype,"layoutStyle",2);var nd={type:"root",identifier:"status-bar",optionsKey:"statusBar",packageType:"enterprise",chartTypes:["cartesian"],moduleFactory:e=>new id(e),themeTemplate:{statusBar:{enabled:!1,layoutStyle:n.n1.ThemeSymbols.DEFAULT_CAPTION_LAYOUT_STYLE,title:{color:{$ref:"textColor"},fontFamily:{$ref:"fontFamily"},fontSize:{$ref:"fontSize"},fontWeight:{$ref:"fontWeight"}},positive:{color:{$palette:"up.stroke"},fontFamily:{$ref:"fontFamily"},fontSize:{$ref:"fontSize"},fontWeight:{$ref:"fontWeight"}},negative:{color:{$palette:"down.stroke"},fontFamily:{$ref:"fontFamily"},fontSize:{$ref:"fontSize"},fontWeight:{$ref:"fontWeight"}},neutral:{color:{$palette:"neutral.stroke"},fontFamily:{$ref:"fontFamily"},fontSize:{$ref:"fontSize"},fontWeight:{$ref:"fontWeight"}},background:{fill:{$ref:"backgroundColor"},fillOpacity:.5},altNeutral:{color:"gray",fontFamily:{$ref:"fontFamily"},fontSize:{$ref:"fontSize"},fontWeight:{$ref:"fontWeight"}}}}},{BaseProperties:sd,CartesianAxis:rd,ChartAxisDirection:od,ContinuousScale:ad,ChartUpdateType:ld,ObserveChanges:cd,TooltipManager:hd,Property:dd,findMinMax:ud,isObjectWithStringProperty:pd}=n.n1,gd=n.n1.Debug.create("sync");function fd(e,t,i){const n=e.getKeys(t),s=e.getKeys(i);return e.shouldFlipXY?.()?[s,n]:[n,s]}function md(e="x"){switch(e){case"x":return[od.X];case"y":return[od.Y];case"xy":return[od.X,od.Y]}}var vd=class extends sd{constructor(e){super(),this.moduleContext=e,this.enabled=!1,this.axes="x",this.nodeInteraction=!0,this.zoom=!0,this.domainMode="key",this.domainSync=new s.iN}updateSiblings(e){const{syncManager:t}=this.moduleContext;for(const i of t.getGroupSiblings(e??this.groupId))gd("ChartSync.updateSiblings()",i.id,i),this.updateChart(i)}updateChart(e,t=ld.PROCESS_DOMAIN){gd("ChartSync.updateChart()",e.id,ld[t],e),t===ld.PROCESS_DOMAIN?e.ctx.updateService.update(t,{forceNodeDataRefresh:!0}):e.ctx.updateService.update(t)}enabledZoomSync(){const{syncManager:e,zoomManager:t}=this.moduleContext;this.disableZoomSync?.(),this.disableZoomSync=t.addListener("zoom-change",()=>{for(const t of e.getGroupSiblings(this.groupId))t.modulesManager.getModule("sync")?.zoom&&t.ctx.zoomManager.updateZoom("sync",this.mergeZoom(t))})}enabledNodeInteractionSync(){const{highlightManager:e}=this.moduleContext;this.disableNodeInteractionSync?.(),this.disableNodeInteractionSync=e.addListener("highlight-change",this.onHighlightChange.bind(this))}onHighlightChange(e){const{syncManager:t}=this.moduleContext;if(e.callerId.endsWith("-sync"))return;gd("ChartSync.onHighlightChange()",e);const i=e.currentHighlight?.series,[n]=md(this.axes),r=n===od.X?od.Y:od.X,[o,a]=i?fd(i,n,r):[];let l=o?.[0]?e.currentHighlight?.datum?.[o[0]]:void 0;const c=(0,s.$P)(l);if(c&&(l=l.getTime()),!e.currentHighlight?.datum){for(const e of t.getGroupSiblings(this.groupId))e.modulesManager.getModule("sync")?.nodeInteraction&&(e.ctx.highlightManager.updateHighlight(`${e.id}-sync`),e.ctx.tooltipManager.removeTooltip(`${e.id}-sync`));return}const h="multi-series"===t.getGroupSyncMode(this.groupId);this.findMatchingHighlightNodes(n,r,h?a:[],c,l,e)}findMatchingHighlightNodes(e,t,i,n,r,o){const{syncManager:a}=this.moduleContext;gd("ChartSync.findMatchingHighlightNodes()",{mainDirection:e,secondaryKeys:i});for(const l of a.getGroupSiblings(this.groupId)){if(!l.modulesManager.getModule("sync")?.nodeInteraction)continue;let a=!1;for(const o of l.axes){if(!rd.is(o)||o.direction!==e)continue;const c=l.series.filter(n=>{if(!n.visible)return!1;if(i.length>0){const[,s]=fd(n,e,t);return i.every(e=>s.includes(e))}return!0}).map(this.findMatchingNodes(o,e,n,r)).filter(s.vM);if(1===c.length&&c[0]?.nodeDatum!==l.ctx.highlightManager.getActiveHighlight()){this.dispatchHighlightUpdate(l,c[0].nodeDatum),a=!0;break}}a||(gd("ChartSync.findMatchingHighlightNodes() - no matching nodes",l.id,o),this.dispatchHighlightUpdate(l))}}findMatchingNodes(e,t,i,n){return s=>{const r=s.getKeys(e.direction);if(e.keys.length&&!e.keys.some(e=>r.includes(e)))return;const o=s.contextNodeData?.nodeData??[];if(!o?.length)return;const a=o[0],l=`${t}Key`;if(!pd(a,l))return;const c=a[l],h=o.find(e=>{const t=e.datum[c];return i?t.getTime()===n:t===n});return h?{series:s,nodeDatum:h}:null}}dispatchHighlightUpdate(e,t){gd("ChartSync.dispatchHighlightUpdate()",e.id,t),e.ctx.highlightManager.updateHighlight(`${e.id}-sync`,t);const i=t?.series.tooltipEnabled??e.tooltip.enabled;if(t&&i){const i=e.seriesAreaBoundingBox,n=i.x+(t.midPoint?.x??t.point?.x??0),s=i.y+(t.midPoint?.y??t.point?.y??0),r=hd.makeTooltipMeta({type:"pointermove",canvasX:n,canvasY:s},t.series,t,void 0);e.ctx.tooltipManager.updateTooltip(`${e.id}-sync`,r,e.getTooltipContent(t.series,t.datumIndex,t))}else e.ctx.tooltipManager.removeTooltip(`${e.id}-sync`);this.updateChart(e,ld.SERIES_UPDATE)}async getSyncedDomain(e){if(!rd.is(e)||"xy"!==this.axes&&this.axes!==e.direction)return;const{groupState:t,directionDomains:i,domainsByKey:n,positionDomains:s}=this.updateDomainState(e);return this.validateAxis(e,t),await this.waitForDomainsToBeReady(),"position"===this.domainMode?this.calculateDerivedDomain(e,s):"direction"===this.domainMode||0===e.keys.length?this.calculateDerivedDomain(e,i):this.calculateKeyDerivedDomain(e,n)}updateDomainState(e){var t,i,n,s,r;const{syncManager:o}=this.moduleContext,a=o.getChart().id,l=e.id,c=o.getGroupState(this.groupId);if(!c)throw new Error("AG Charts - no GroupState for groupId: "+this.groupId);const h=c.domains??(c.domains={}),d=h[t=e.direction]??(h[t]={derived:[],sources:{},dirty:!0});((i=d.sources)[a]??(i[a]={}))[l]=e.dataDomain.domain,d.dirty=!0;const u=c.domainsByKey??(c.domainsByKey={});for(const t of e.keys??[]){const i=u[t]??(u[t]={derived:[],sources:{},dirty:!0});((n=i.sources)[a]??(n[a]={}))[l]=e.dataDomain.domain,i.dirty=!0}const p=c.domainsByPosition??(c.domainsByPosition={}),g=p[s=e.position]??(p[s]={derived:[],sources:{},dirty:!0});return((r=g.sources)[a]??(r[a]={}))[l]=e.dataDomain.domain,g.dirty=!0,{groupState:c,directionDomains:d,domainsByKey:u,positionDomains:g}}validateAxis(e,t){const i="multi-series"===this.moduleContext.syncManager.getGroupSyncMode(this.groupId);md(this.axes).includes(e.direction)&&(i?this.validateMultiSeries(e,t):this.validateSingleSeries(e,t))}validateMultiSeries(e,t){const{min:i,max:n,nice:r,reverse:o}=e,a=new Set(e.boundSeries.flatMap(t=>t.getKeys(e.direction)));for(const e of t.members){const{axes:t,modulesManager:l}=e,c=md(l.getModule("sync")?.axes),h=t.filter(e=>c.includes(e.direction)).filter(e=>e.boundSeries.some(t=>t.getKeys(e.direction).some(e=>a.has(e))));if(0===h.length)continue;const[d]=h;if(d.min!==i||d.max!==n||d.nice!==r||d.reverse!==o)return s.Vy.warnOnce("To allow synchronization, ensure that all synchronized axes with matching keys have matching min, max, nice, and reverse properties."),void(this.enabled=!1)}}validateSingleSeries(e,t){const i=t.members,[{axes:n}]=i,{direction:r,min:o,max:a,nice:l,reverse:c}=e;for(const e of n)if(r===e.direction&&(l!==e.nice||c!==e.reverse||o!==e.min&&((0,s.Bf)(o)||(0,s.Bf)(e.min))||a!==e.max&&((0,s.Bf)(a)||(0,s.Bf)(e.max))))return s.Vy.warnOnce("To allow synchronization, ensure that all charts have matching min, max, nice, and reverse properties on the synchronized axes."),void(this.enabled=!1)}calculateDerivedDomain(e,t){if(!t.dirty)return t.derived;const i=t.derived;return t.derived=(0,s.Am)(Object.values(t.sources).map(e=>Object.values(e)).flat(2)),ad.is(e.scale)&&(t.derived=ud(t.derived)),t.dirty=!1,(0,s.r1)(i,t.derived)||(gd(e.id,"updated",e.keys,{before:i,after:t.derived}),this.updateSiblings()),t.derived}calculateKeyDerivedDomain(e,t){let i=[],n=[],r=!1;for(const o of e.keys??[]){const a=t[o],l=a.derived;i.push(...l),a.dirty?(a.derived=(0,s.Am)(Object.values(a.sources).map(e=>Object.values(e)).flat(2)),ad.is(e.scale)&&(a.derived=ud(a.derived)),n.push(...a.derived),a.dirty=!1,r||(r=!(0,s.r1)(l,a.derived))):n.push(...a.derived)}return ad.is(e.scale)&&(i=ud(i),n=ud(n)),r&&!(0,s.r1)(i,n)&&(gd(e.id,"updated",e.keys,{before:i,after:n}),this.updateSiblings()),n}removeAxis(e){if(!rd.is(e)||"xy"!==this.axes&&this.axes!==e.direction)return;const{syncManager:t}=this.moduleContext,i=t.getGroupState(this.groupId),n=t.getChart().id,s=e.id;delete i?.domains?.[e.direction]?.sources?.[n]?.[s];for(const t of e.keys??[])delete i?.domainsByKey?.[t]?.sources?.[n]?.[s];delete i?.domainsByPosition?.[e.position]?.sources?.[n]?.[s]}async waitForDomainsToBeReady(){const{syncManager:e}=this.moduleContext;let t=0;for(;e.getGroupMembers(this.groupId).some(e=>"init"===e.syncStatus);)gd("ChartSync.waitForDomainsToBeReady() - waiting for all domains to be calculated",this.groupId),await this.domainSync.await(),t++;t>0&&gd("ChartSync.waitForDomainsToBeReady() - waited for",t,"iterations"),this.domainSync.notify()}mergeZoom(e){const{zoomManager:t}=this.moduleContext;if("xy"===this.axes)return t.getZoom();const i=e.ctx.zoomManager.getZoom()??{};return i[this.axes]=t.getZoom()?.[this.axes],i}onEnabledChange(){const{syncManager:e}=this.moduleContext;this.enabled?e.subscribe(this.groupId):e.unsubscribe(this.groupId),this.updateSiblings(),this.onNodeInteractionChange(),this.onZoomChange()}onGroupIdChange(e,t){if(!this.enabled||e===t)return;const{syncManager:i}=this.moduleContext;i.unsubscribe(t),i.subscribe(e),this.updateSiblings(t),this.updateSiblings(e)}onAxesChange(){if(!this.enabled)return;const{syncManager:e}=this.moduleContext;this.updateChart(e.getChart())}onNodeInteractionChange(){this.enabled&&this.nodeInteraction?this.enabledNodeInteractionSync():this.disableNodeInteractionSync?.()}onZoomChange(){this.enabled&&this.zoom?this.enabledZoomSync():this.disableZoomSync?.()}destroy(){const{syncManager:e}=this.moduleContext;e.unsubscribe(this.groupId),this.updateSiblings(),this.disableZoomSync?.()}};vd.className="Sync",a([dd,cd(e=>e.onEnabledChange())],vd.prototype,"enabled",2),a([dd,cd((e,t,i)=>e.onGroupIdChange(t,i))],vd.prototype,"groupId",2),a([dd,cd(e=>e.onAxesChange())],vd.prototype,"axes",2),a([dd,cd(e=>e.onNodeInteractionChange())],vd.prototype,"nodeInteraction",2),a([dd,cd(e=>e.onZoomChange())],vd.prototype,"zoom",2),a([dd,cd(e=>e.onAxesChange())],vd.prototype,"domainMode",2);var yd={type:"root",optionsKey:"sync",packageType:"enterprise",chartTypes:["cartesian"],moduleFactory:e=>new vd(e),themeTemplate:{sync:{enabled:!1}}},{Property:Cd}=n.n1,bd="#2196f3",Sd=class extends n.n1.Rect{constructor(){super(...arguments),this.fill=bd,this.fillOpacity=.2,this.zIndex=n.n1.ZIndexMap.ZOOM_SELECTION}updateValid(){this.fill=bd}updateInvalid(){this.fill="#8a8a8a"}};Sd.className="ZoomRect",a([Cd],Sd.prototype,"fill",2),a([Cd],Sd.prototype,"fillOpacity",2);var wd={min:0,max:1},xd=wd.max-wd.min,Ed="middle",Md=(e,t=wd.min,i=wd.max)=>(0,s.qE)(t,e,i);function Ad(){return{x:{...wd},y:{...wd}}}function Td(e){return e.x.max-e.x.min}function Dd(e){return e.y.max-e.y.min}function Id(e,t,i=1e-10){return(0,s.YX)(e.min,t.min,i)&&(0,s.YX)(e.max,t.max,i)}function Rd(e,t,i){return Id(e.x,t.x,i)&&Id(e.y,t.y,i)}function Ld(e){return{x:{min:e?.x?.min??wd.min,max:e?.x?.max??wd.max},y:{min:e?.y?.min??wd.min,max:e?.y?.max??wd.max}}}function kd(e,t,i){if(!e)return{x:0,y:0};const n=Md(t-e.x,0,e.x+e.width),s=Md(i-e.y,0,e.y+e.height),r=1/e.width*n,o=1-1/e.height*s;return{x:Md(r),y:Md(o)}}function Pd(e,t,i){return{x:{min:e.x.min+t,max:e.x.max+t},y:{min:e.y.min+i,max:e.y.max+i}}}function Nd(e,t,i){return{x:{min:e.x.min,max:e.x.min+Td(e)*t},y:{min:e.y.min,max:e.y.min+Dd(e)*i}}}function Od(e,t,i){const n=Td(e),s=Dd(e),r=e.x.min+n/2,o=e.y.min+s/2;return{x:{min:r-n*t/2,max:r+n*t/2},y:{min:o-s*i/2,max:o+s*i/2}}}function _d(e,t,i,n){const{min:s,max:r}=t,o=s+(r-s)/2,a=e.max-e.min;switch(i){case"start":return{min:s,max:t.min+a};case"end":return{min:t.max-a,max:r};case"middle":return{min:o-a/2,max:o+a/2};case"pointer":return function(e,t,i){const n=e.max-e.min,s=i-i*(1-(t.max-t.min-n));return{min:e.min+s,max:e.max+s}}(e,t,n??o);default:return{min:s,max:r}}}function Fd(e){return{x:Gd(e.x),y:Gd(e.y)}}function Gd(e){const t=e.max-e.min;let i=e.max>wd.max?wd.max-t:e.min,n=e.min<wd.min?t:e.max;return i=Math.max(wd.min,i),n=Math.min(wd.max,n),{min:i,max:n}}var Vd=class{update(e,t,i,s,r,o){return this.oldZoom??(this.oldZoom=Ld(t===n.n1.ChartAxisDirection.X?{...r,x:o}:{...r,y:o})),this.updateCoords(e.currentX,e.currentY),this.updateZoom(t,i,s)}stop(){this.coords=void 0,this.oldZoom=void 0}updateCoords(e,t){this.coords?(this.coords.x2=e,this.coords.y2=t):this.coords={x1:e,y1:t,x2:e,y2:t}}updateZoom(e,t,i){const{coords:s,oldZoom:r}=this;let o=Ld(r);if(!s||!r)return e===n.n1.ChartAxisDirection.X?o.x:o.y;const a=kd(i,s.x1,s.y1),l=kd(i,s.x2,s.y2);if(e===n.n1.ChartAxisDirection.X){const e=(l.x-a.x)*Td(r);return o.x.max+=e,o.x=_d(o.x,r.x,t,a.x),o=Fd(o),o.x}const c=(l.y-a.y)*Dd(r);return o.y.max-=c,o.y=_d(o.y,r.y,t,a.y),o=Fd(o),o.y}},Bd=class{constructor(e,t,i,n,s,r){this.contextMenuRegistry=e,this.zoomManager=t,this.getModuleProperties=i,this.getRect=n,this.updateZoom=s,this.isZoomValid=r}registerActions(e){const{contextMenuRegistry:t}=this;if(!e)return t.setVisible("zoom-to-cursor",!1),void t.setVisible("pan-to-cursor",!1);t.setVisible("zoom-to-cursor",!0),t.setVisible("pan-to-cursor",!0),t.builtins.items["zoom-to-cursor"].action=this.onZoomToHere.bind(this),t.builtins.items["pan-to-cursor"].action=this.onPanToHere.bind(this);const i=e=>{const t=this.getRect();if(!t)return!0;const i=kd(t,e.x,e.y);return null!=this.iterateFindNextZoomAtPoint(i)},n=()=>!Rd(Ld(this.zoomManager.getZoom()),Ad()),s=t.addListener("context-setup",e=>{t.builtins.items["zoom-to-cursor"].enabled=i(e),t.builtins.items["pan-to-cursor"].enabled=n()});return()=>{s(),t.setVisible("zoom-to-cursor",!1),t.setVisible("pan-to-cursor",!1)}}computeOrigin(e){const t=this.getRect(),{enabled:i}=this.getModuleProperties();if(i&&t&&e?.target&&e instanceof MouseEvent)return kd({x:0,y:0,width:t.width,height:t.height},e.offsetX,e.offsetY)}onZoomToHere({event:e}){const t=this.computeOrigin(e);if(!t)return;const i=this.iterateFindNextZoomAtPoint(t);null!=i&&this.updateZoom(i)}onPanToHere({event:e}){const t=this.computeOrigin(e);if(!t)return;const i=Ld(this.zoomManager.getZoom()),n=Td(i),s=Dd(i),r=t.x*n,o=t.y*s,a=xd/2;let l={x:{min:t.x-a,max:t.x+a},y:{min:t.y-a,max:t.y+a}};l=Od(l,n,s),l=Pd(l,i.x.min-t.x+r,i.y.min-t.y+o),this.updateZoom(Fd(l))}iterateFindNextZoomAtPoint(e){const{scrollingStep:t}=this.getModuleProperties();for(let i=t;i<=1-t;i+=t){const t=this.getNextZoomAtPoint(e,i);if(this.isZoomValid(t))return t}}getNextZoomAtPoint(e,t){const{isScalingX:i,isScalingY:n}=this.getModuleProperties(),s=Ld(this.zoomManager.getZoom()),r=e.x*Td(s),o=e.y*Dd(s),a=xd/2;let l={x:{min:e.x-a,max:e.x+a},y:{min:e.y-a,max:e.y+a}};return l=Od(l,i?Td(s)*t:xd,n?Dd(s)*t:xd),l=Pd(l,s.x.min-e.x+r,s.y.min-e.y+o),Fd(l)}},{BBoxValues:Hd,ChartAxisDirection:zd}=n.n1,Ud=class{constructor(e){this.axesHandlers=e,this.axes=[]}destroy(){this.axes.forEach(e=>e.div.destroy())}update(e,t){if(this.axes.forEach(t=>t.div.setHidden(!e)),!e)return;const{X:i,Y:s}=n.n1.ChartAxisDirection,r=[...t.axisManager.getAxisContext(i),...t.axisManager.getAxisContext(s)],{removed:o,added:a}=this.diffAxisIds(r);o.length>0&&(this.axes=this.axes.filter(e=>!o.includes(e.axisId)||(e.div.destroy(),!1)));for(const e of a){const{axisId:i,direction:n}=e;this.axes.push(this.initAxis(t,i,this.axesHandlers,n))}for(const e of this.axes){const t=r.find(t=>t.axisId===e.axisId).getCanvasBounds();e.div.setHidden(Hd.isEmpty(t)),void 0!==t&&e.div.setBounds(t)}}toggleAxisDraggingCursor(e,t){for(const i of this.axes)i.direction===e&&i.div.setCursor(t?this.getCursor(e):void 0)}getCursor(e){return e===zd.X?"ew-resize":"ns-resize"}initAxis(e,t,i,n){const s=e.proxyInteractionService.createProxyElement({type:"region",domManagerId:t,where:"afterend"});return s.setCursor(this.getCursor(n)),s.addListener("drag-start",e=>{"touch"===e.device&&e.sourceEvent.preventDefault(),i.onDragStart(t,n)}),s.addListener("drag-move",e=>i.onDrag(e)),s.addListener("drag-end",i.onDragEnd),s.addListener("dblclick",()=>i.onDoubleClick(t,n)),{axisId:t,div:s,direction:n}}diffAxisIds(e){const t=this.axes.map(e=>e.axisId),i=e.map(e=>e.axisId);return{removed:t.filter(e=>!i.includes(e)),added:e.filter(e=>!t.includes(e.axisId))}}},Wd={off:1,short:.01,long:.002},jd=class{constructor(){this.deceleration=1,this.zoomCoordsHistoryIndex=0,this.coordsHistory=[]}get decelerationValue(){const{deceleration:e}=this;return Math.max("number"==typeof e?e:Wd[e]??1,1e-4)}addListener(e,t){return this.onUpdate=t,()=>{this.onUpdate=void 0}}stopInteractions(){null!=this.inertiaHandle&&(cancelAnimationFrame(this.inertiaHandle),this.inertiaHandle=void 0)}update(e){this.updateCoords(e.currentX,e.currentY);const{x1:t=0,y1:i=0,x2:n=0,y2:s=0}=this.coords??{};this.onUpdate?.({type:"update",deltaX:t-n,deltaY:i-s})}start(){this.coordsMonitorTimeout=setInterval(this.recordCurrentZoomCoords.bind(this),16)}stop(){const{coordsHistory:e}=this;let t=0,i=0,n=0;if(e.length>0){const s=this.zoomCoordsHistoryIndex%16;let r=s-1;r<0&&(r=e.length-1);let o=s;o>=e.length&&(o=0);const a=e[r],l=e[o];t=a.x-l.x,i=a.y-l.y,n=a.t-l.t}if(this.coords=void 0,clearInterval(this.coordsMonitorTimeout),this.coordsMonitorTimeout=void 0,this.zoomCoordsHistoryIndex=0,this.coordsHistory.length=0,n>0&&this.decelerationValue<1){const e=t/n,r=i/n,o=Math.hypot(e,r),a=Math.atan2(r,e),l=performance.now();this.inertiaHandle=(0,s.zk)().requestAnimationFrame(e=>{this.animateInertia(e,e,l,o,a)})}}recordCurrentZoomCoords(){const{coords:e,coordsHistory:t,zoomCoordsHistoryIndex:i}=this;if(!e)return;const{x2:n,y2:s}=e,r=Date.now();t[i%16]={x:n,y:s,t:r},this.zoomCoordsHistoryIndex+=1}animateInertia(e,t,i,n,s){const r=1-this.decelerationValue,o=-n/Math.log(r),a=n*(r**(t-i)-1)/Math.log(r),l=n*(r**(e-i)-1)/Math.log(r);this.onUpdate?.({type:"update",deltaX:-Math.cos(s)*(l-a),deltaY:-Math.sin(s)*(l-a)}),l>=o-1||(this.inertiaHandle=requestAnimationFrame(t=>{this.animateInertia(t,e,i,n,s)}))}updateCoords(e,t){this.coords?this.coords={x1:this.coords.x2,y1:this.coords.y2,x2:e,y2:t}:this.coords={x1:e,y1:t,x2:e,y2:t}}translateZooms(e,t,i,n){const r=kd(e,e.x+Math.abs(i),e.y+e.height-Math.abs(n)),o=Math.sign(i)*r.x,a=-Math.sign(n)*r.y,l={};for(const[e,{direction:i,zoom:n}]of(0,s.jO)(t)){if(n&&n.min===wd.min&&n.max===wd.max)continue;let t=Ld({[i]:n});t=Fd(Pd(t,o*Td(t),a*Dd(t))),l[e]={direction:i,zoom:t[i]}}return l}},Kd=class{update(e,t,i,n){const s=e.deltaX*t*200;return this.translateZooms(i,n,s)}translateZooms(e,t,i){const r={},o=kd(e,e.x+Math.abs(i),0),a=i<0?-o.x:o.x;for(const[e,{direction:i,zoom:o}]of(0,s.jO)(t)){if(i!==n.n1.ChartAxisDirection.X)continue;let t=Ld({x:o});t=Fd(Pd(t,a*Td(t),0)),r[e]={direction:i,zoom:t.x}}return r}},$d=class{updateAxes(e,t,i,r){const o=e.sourceEvent,a={},{anchorPointX:l,anchorPointY:c,isScalingX:h,isScalingY:d,scrollingStep:u}=t,p=kd(i,o.offsetX??o.clientX,o.offsetY??o.clientY);for(const[t,{direction:i,zoom:o}]of(0,s.jO)(r)){if(null==o)continue;let s={...o};const r=u*e.deltaY*(o.max-o.min);if(i===n.n1.ChartAxisDirection.X&&h)s.max+=r,s=_d(s,o,l,p.x);else{if(i!==n.n1.ChartAxisDirection.Y||!d)continue;s.max+=r,s=_d(s,o,c,p.y)}a[t]={direction:i,zoom:Gd(s)}}return a}update(e,t,i,n){const{anchorPointX:s,anchorPointY:r,isScalingX:o,isScalingY:a,scrollingStep:l}=t,c=kd(i,e.offsetX+i.x,e.offsetY+i.y),h=e.deltaY;let d=Ld(n);return d.x.max+=o?l*h*Td(n):0,d.y.max+=a?l*h*Dd(n):0,o&&(d.x=_d(d.x,n.x,s,c.x)),a&&(d.y=_d(d.y,n.y,r,c.y)),d=Fd(d),d}updateDelta(e,t,i){const{anchorPointX:n,anchorPointY:s,isScalingX:r,isScalingY:o,scrollingStep:a}=t;let l=Ld(i);return l.x.max+=r?a*-e*Td(i):0,l.y.max+=o?a*-e*Dd(i):0,r&&(l.x=_d(l.x,i.x,n)),o&&(l.y=_d(l.y,i.y,s)),l=Fd(l),l}},Yd=class{constructor(e,t,i){this.rect=e,this.getZoom=t,this.isZoomValid=i,this.rect.visible=!1}update(e,t,i){const n=e.currentX+(i?.x??0),s=e.currentY+(i?.y??0);this.rect.visible=!0,this.updateCoords(n,s,t,i),this.updateRect(i)}stop(e,t,i){let n=Ld();return e&&t?(this.coords&&(n=this.createZoomFromCoords(t,i)),n=Fd(function(e,t,i){return{x:{min:e.x.min*t,max:e.x.max*t},y:{min:e.y.min*i,max:e.y.max*i}}}(n,t.width/e.width,t.height/e.height)),this.reset(),n):n}reset(){this.coords=void 0,this.rect.visible=!1}didUpdate(){return this.rect.visible&&this.rect.width>0&&this.rect.height>0}updateCoords(e,t,i,n){if(!this.coords)return void(this.coords={x1:e,y1:t,x2:e,y2:t});const{coords:s}=this;if(s.x2=e,s.y2=t,!n)return;const{isScalingX:r,isScalingY:o,keepAspectRatio:a}=i,l=this.getNormalisedDimensions();if(a&&r&&o){const e=n.width/n.height;s.y2<s.y1?s.y2=Math.min(s.y1-l.width/e,s.y1):s.y2=Math.max(s.y1+l.width/e,s.y1)}r||(s.x1=n.x,s.x2=n.x+n.width),o||(s.y1=n.y,s.y2=n.y+n.height)}updateRect(e){if(!e)return;const{rect:t}=this,i=this.getNormalisedDimensions(),{width:n,height:s}=i;let{x:r,y:o}=i;r=Math.max(r,e.x),r-=Math.max(0,r+n-(e.x+e.width)),o=Math.max(o,e.y),o-=Math.max(0,o+s-(e.y+e.height)),t.x=r,t.y=o,t.width=n,t.height=s;const a=this.createZoomFromCoords(e,this.getZoom());this.isZoomValid(a)?t.updateValid():t.updateInvalid()}createZoomFromCoords(e,t){const i=Ld(t),n=this.getNormalisedDimensions(),s=kd(e,n.x,n.y+n.height);let r=Nd(i,n.width/e.width,n.height/e.height);return r=Pd(r,s.x*Td(i),s.y*Dd(i)),r=Fd(r),r}getNormalisedDimensions(){const{x1:e=0,y1:t=0,x2:i=0,y2:n=0}=this.coords??{};return{x:e<=i?e:i,y:t<=n?t:n,width:e<=i?i-e:e-i,height:t<=n?n-t:t-n}}},{ActionOnSet:qd,BaseProperties:Xd,ChartAxisDirection:Zd,NativeWidget:Qd,PropertiesArray:Jd,Toolbar:eu,ToolbarButtonProperties:tu,Property:iu}=n.n1,nu=class extends tu{};a([iu],nu.prototype,"value",2),a([iu],nu.prototype,"section",2);var su=class extends Xd{constructor(e,t,i,n,r,o,a){super(),this.ctx=e,this.getModuleProperties=t,this.getResetZoom=i,this.updateZoom=n,this.updateAxisZoom=r,this.resetZoom=o,this.isZoomValid=a,this.enabled=!1,this.buttons=new Jd(nu),this.visible="hover",this.verticalSpacing=10,this.detectionRange=38,this.destroyFns=[],this.container=new Qd((0,s.n)("div")),this.container.addClass("ag-charts-zoom-buttons"),e.domManager.addChild("canvas-overlay","zoom-buttons",this.container.getElement()),this.toolbar=new eu(e.localeManager),this.container.addChild(this.toolbar),this.toolbar.getElement().style.transform="translateY(54px)",this.toggleVisibility("always"===this.visible),this.destroyFns.push(this.toolbar.addToolbarListener("button-pressed",this.onButtonPress.bind(this)),this.toolbar.addToolbarListener("button-focused",this.onButtonFocus.bind(this)),e.widgets.containerWidget.addListener("mousemove",this.onHover.bind(this)),e.widgets.containerWidget.addListener("mouseleave",this.onLeave.bind(this)),e.layoutManager.addListener("layout:complete",this.onLayoutComplete.bind(this)),this.teardown.bind(this))}destroy(){for(const e of this.destroyFns)e()}toggleVisibleZoomed(e){"zoomed"===this.visible&&this.toggleVisibility(!e)}teardown(){this.ctx.domManager.removeChild("canvas-overlay","zoom-buttons"),this.container.destroy()}onLayoutComplete(e){const{buttons:t,container:i}=this,{rect:n}=e.series;this.toolbar.updateButtons(t),this.toggleButtons();const s=i.getBounds().height;i.setBounds({y:n.y+n.height-s})}onHover(e){if(!this.enabled||"hover"!==this.visible||this.toolbar.isHidden())return;const{container:t,detectionRange:i,ctx:{scene:n}}=this,{currentY:s,sourceEvent:{target:r}}=e,o=t.getElement(),a=s>o.offsetTop-i&&s<n.canvas.element.offsetHeight||r===o;this.toggleVisibility(a)}onLeave(){"hover"===this.visible&&this.toggleVisibility(!1)}toggleVisibility(e,t=!1){const{container:i,toolbar:n,verticalSpacing:s}=this;n.toggleClass("ag-charts-zoom-buttons__toolbar--hidden",!e);const r=n.getElement();r.style.transitionDuration=t?"0s":"",r.style.transform=e?"translateY(0)":`translateY(${i.getBounds().height+s}px)`}toggleButtons(){const e=Ld(this.ctx.zoomManager.getZoom());if(!this.previousZoom||!Rd(this.previousZoom,e)){this.previousZoom=e;for(const[t,i]of this.buttons.entries()){let n=!0;switch(i?.value){case"pan-start":case"pan-left":n=e.x.min>wd.min;break;case"pan-end":case"pan-right":n=e.x.max<wd.max;break;case"zoom-out":n=!Rd(e,Ad());break;case"zoom-in":n=this.isZoomValid(this.getNextZoomStateUnified("zoom-in",e,this.getModuleProperties()));break;case"reset":n=!Rd(e,this.getResetZoom())}this.toolbar.toggleButtonEnabledByIndex(t,n)}}}onButtonPress({button:e}){if(!this.enabled||this.toolbar.isHidden())return;const t=this.getModuleProperties();if(t.independentAxes&&"reset"!==e.value){const i=this.ctx.zoomManager.getAxisZooms();for(const[n,{direction:r,zoom:o}]of(0,s.jO)(i))null!=o&&this.onButtonPressAxis(e,t,n,r,o)}else this.onButtonPressUnified(e,t)}onButtonFocus(e){this.toggleVisibility(!0,!0)}onButtonPressAxis(e,t,i,n,s){const{isScalingX:r,isScalingY:o,scrollingStep:a}=t;let l={...s};const c=s.max-s.min;switch(e.value){case"pan-start":l.max=c,l.min=0;break;case"pan-end":l.min=l.max-c,l.max=wd.max;break;case"pan-left":l.min-=c*a,l.max-=c*a;break;case"pan-right":l.min+=c*a,l.max+=c*a;break;case"zoom-in":case"zoom-out":{const i=n===Zd.X,c=i&&r||!i&&o;let h="zoom-in"===e.value?1-a:1+a;c||(h=1);const d=i?this.getAnchorPointX(t):this.getAnchorPointY(t);l.max=l.min+(l.max-l.min)*h,l=_d(l,s,d);break}}this.updateAxisZoom(i,n,Gd(l))}onButtonPressUnified(e,t){const{scrollingStep:i}=t,n=Ld(this.ctx.zoomManager.getZoom());let s=Ld(n);switch(e.value){case"reset":return void this.resetZoom();case"pan-start":s.x.max=Td(s),s.x.min=0;break;case"pan-end":s.x.min=wd.max-Td(s),s.x.max=wd.max;break;case"pan-left":s=Pd(s,-Td(s)*i,0);break;case"pan-right":s=Pd(s,Td(s)*i,0);break;case"zoom-in":case"zoom-out":s=this.getNextZoomStateUnified(e.value,n,t)}this.updateZoom(Fd(s))}getNextZoomStateUnified(e,t,i){const{isScalingX:n,isScalingY:s,scrollingStep:r}=i,o="zoom-in"===e?1-r:1+r,a=Nd(t,n?o:1,s?o:1);return a.x=_d(a.x,t.x,this.getAnchorPointX(i)),a.y=_d(a.y,t.y,this.getAnchorPointY(i)),a}getAnchorPointX(e){const t=this.anchorPointX??e.anchorPointX;return"pointer"===t?"end":t}getAnchorPointY(e){const t=this.anchorPointY??e.anchorPointY;return"pointer"===t?Ed:t}};a([iu,qd({changeValue(e){this.toolbar?.setHidden(!e)}})],su.prototype,"enabled",2),a([iu],su.prototype,"buttons",2),a([iu,qd({changeValue(e,t){null!=t&&this.toggleVisibility("always"===e)}})],su.prototype,"visible",2),a([iu],su.prototype,"anchorPointX",2),a([iu],su.prototype,"anchorPointY",2);var ru=1e6;function ou({min:e,max:t},i,n,s){return 0===s?0:ru*((i-n)/s*(t-e)+e)}function au(e,t,i,n){return 0===t&&(t=30),0===n&&(n=30),!(e+t<i-n||i+n<e-t)}var lu=class{constructor(){this.touchStart={origins:[{identifier:0,normalX:NaN,normalY:NaN},{identifier:0,normalX:NaN,normalY:NaN}]},this.initialZoom={x:{min:0,max:1},y:{min:0,max:1}},this.previous={a1:NaN,a2:NaN,b1:NaN,b2:NaN}}start(e,t,i){if(2!==e.sourceEvent.targetTouches.length)return!1;e.sourceEvent.preventDefault();const n=Array.from(e.sourceEvent.targetTouches),{x:s,y:r,width:o,height:a}=t.getBoundingClientRect();this.initialZoom.x.min=i.x?.min??0,this.initialZoom.x.max=i.x?.max??1,this.initialZoom.y.min=i.y?.min??0,this.initialZoom.y.max=i.y?.max??1,this.touchStart.origins.forEach(e=>e.identifier=0),this.previous.a1=NaN,this.previous.a2=NaN,this.previous.b1=NaN,this.previous.b2=NaN;for(const e of[0,1]){const t=n[e].clientX,i=r+a-n[e].clientY;this.touchStart.origins[e].identifier=n[e].identifier,this.touchStart.origins[e].normalX=ou(this.initialZoom.x,t,s,o),this.touchStart.origins[e].normalY=ou(this.initialZoom.y,i,r,a)}const[l,c]=n,[h,d]=this.touchStart.origins,u=au(l.clientX,l.radiusX,c.clientX,c.radiusX);return au(l.clientY,l.radiusY,c.clientY,c.radiusY)&&(h.normalY=d.normalY=(h.normalY+d.normalY)/2),u&&(h.normalX=d.normalX=(h.normalX+d.normalX)/2),!0}update(e,t){e.sourceEvent.preventDefault();const i=Array.from(e.sourceEvent.targetTouches),{x:n,y:s,width:r,height:o}=t.getBoundingClientRect(),{origins:a}=this.touchStart,l=[0,1].map(e=>i.find(t=>t.identifier===a[e].identifier)),c=a[0].normalX,h=a[1].normalX,d=l[0].clientX,u=l[1].clientX,p=a[0].normalY,g=a[1].normalY,f=s+o-l[0].clientY,m=s+o-l[1].clientY;return this.twitchTolerantZoomPan4(c,h,d,u,p,g,f,m,n,s,r,o)}end(e){const t=Array.from(e.sourceEvent.targetTouches).map(e=>e.identifier);return!t.includes(this.touchStart.origins[0].identifier)||!t.includes(this.touchStart.origins[1].identifier)}twitchTolerantZoomPan4(e,t,i,n,s,r,o,a,l,c,h,d){const{initialZoom:u,previous:p}=this;return{x:cu(e,t,i,n,p,"a1","a2",l,h,u.x),y:cu(s,r,o,a,p,"b1","b2",c,d,u.y)}}};function cu(e,t,i,n,s,r,o,a,l,c){if(e!=t){const c=s[r],h=s[o];return Math.abs(i-c)+Math.abs(n-h)<=1?(i=c,n=h):(s[r]=i,s[o]=n),function(e,t,i,n,s,r){[e,t]=[Math.min(e,t),Math.max(e,t)],[i,n]=[Math.min(i,n),Math.max(i,n)];const o=ru*(n-s)/r,a=(i-s)/(n-s),l=(e-a*t)/(ru-ru*(i-s)/r+a*(o-ru));return{min:l,max:(t+(o-ru)*l)/o}}(e,t,i,n,a,l)}{const t=(e-(ou(c,i,a,l)+ou(c,n,a,l))/2)/ru;return{min:c.min+t,max:c.max+t}}}var{ActionOnSet:hu,ChartAxisDirection:du,ChartUpdateType:uu,Deprecated:pu,Property:gu,InteractionState:fu,ProxyProperty:mu}=n.n1,vu=e=>(0,s.GB)(e,10),yu="zoom-cursor",Cu="zoom-tooltip",bu=class extends n.n1.BaseProperties{constructor(e){super(),this.onChange=e,this.enabled=!1,this.padding=0}};a([gu,hu({changeValue(e){this.onChange({enabled:e,padding:this.padding})}})],bu.prototype,"enabled",2),a([gu,hu({changeValue(e){this.onChange({enabled:this.enabled,padding:e})}})],bu.prototype,"padding",2);var Su=class extends n.n1.BaseModuleInstance{constructor(e){super(),this.ctx=e,this.enabled=!1,this.enableAxisDragging=!0,this.enableDoubleClickToReset=!0,this.enablePanning=!0,this.enableScrolling=!0,this.enableSelecting=!1,this.enableTwoFingerZoom=!0,this.panKey="alt",this.axes="x",this.scrollingStep=xd/10,this.keepAspectRatio=!1,this.minVisibleItems=2,this.anchorPointX="end",this.anchorPointY=Ed,this.autoScaling=new bu(e=>{this.ctx.zoomManager.setAutoScaleYAxis(e.enabled,e.padding)}),this.buttons=new su(this.ctx,this.getModuleProperties.bind(this),this.getResetZoom.bind(this),this.updateZoom.bind(this),this.updateAxisZoom.bind(this),this.resetZoom.bind(this),this.isZoomValid.bind(this)),this.axisDragger=new Vd,this.panner=new jd,this.scroller=new $d,this.scrollPanner=new Kd,this.twoFingers=new lu,this.deceleration="short",this.dragState=0,this.isState=e=>this.ctx.interactionManager.isState(e),this.destroyContextMenuActions=void 0,this.isFirstWheelEvent=!0,this.debouncedWheelReset=(0,s.sg)(()=>{this.isFirstWheelEvent=!0},100);const t=new Sd;this.selector=new Yd(t,this.getZoom.bind(this),this.isZoomValid.bind(this)),this.contextMenu=new Bd(e.contextMenuRegistry,e.zoomManager,this.getModuleProperties.bind(this),()=>this.paddedRect,this.updateZoom.bind(this),this.isZoomValid.bind(this)),this.domProxy=new Ud({onDragStart:(e,t)=>this.onAxisDragStart(e,t),onDrag:e=>{this.onDragMove({...e,currentX:e.offsetX,currentY:e.offsetY})},onDragEnd:()=>this.onDragEnd(),onDoubleClick:(e,t)=>{this.hoveredAxis={id:e,direction:t},this.onDoubleClick(),this.hoveredAxis=void 0}}),this.destroyFns.push(e.scene.attachNode(t),e.chartEventManager.addListener("series-keynav-zoom",e=>this.onNavZoom(e)),e.widgets.seriesDragInterpreter.addListener("dblclick",e=>this.onDoubleClick(e)),e.widgets.seriesDragInterpreter.addListener("drag-move",e=>this.onDragMove(e)),e.widgets.seriesDragInterpreter.addListener("drag-start",e=>this.onDragStart(e)),e.widgets.seriesDragInterpreter.addListener("drag-end",()=>this.onDragEnd()),e.widgets.seriesWidget.addListener("wheel",e=>this.onWheel(e)),e.widgets.seriesWidget.addListener("touchstart",(e,t)=>this.onTouchStart(e,t)),e.widgets.seriesWidget.addListener("touchmove",(e,t)=>this.onTouchMove(e,t)),e.widgets.seriesWidget.addListener("touchend",e=>this.onTouchEnd(e)),e.widgets.seriesWidget.addListener("touchcancel",e=>this.onTouchEnd(e)),e.updateService.addListener("process-data",e=>this.onProcessData(e)),e.layoutManager.addListener("layout:complete",e=>this.onLayoutComplete(e)),e.zoomManager.addListener("zoom-change",e=>this.onZoomChange(e)),e.zoomManager.addListener("zoom-pan-start",e=>this.onZoomPanStart(e)),this.panner.addListener("update",e=>this.onPanUpdate(e)),()=>this.teardown())}teardown(){this.ctx.zoomManager.setZoomModuleEnabled(!1),this.buttons.destroy(),this.destroyContextMenuActions?.()}onEnabledChange(e){this.ctx.zoomManager.setZoomModuleEnabled(e),this.contextMenu&&(this.destroyContextMenuActions?.(),this.destroyContextMenuActions=this.contextMenu.registerActions(e))}isIgnoredTouch(e){if("touch"!==e?.device)return!1;if("drag"!==this.ctx.chartService.touch.dragAction)return!0;if(this.enableSelecting)return!1;if(!this.enablePanning)return!0;const{x:t,y:i}=this.getZoom();return 0===t.min&&1===t.max&&0===i.min&&1===i.max}onDoubleClick(e){const{enabled:t,enableDoubleClickToReset:i,hoveredAxis:n,ctx:{zoomManager:s}}=this;t&&i&&this.isState(fu.ZoomClickable)&&(n?s.resetAxisZoom("zoom",n.id):e?.preventZoomDblClick||this.resetZoom())}onDragStart(e){const{enabled:t,enableAxisDragging:i,enablePanning:n,enableSelecting:s,hoveredAxis:r,ctx:{domManager:o,zoomManager:a}}=this;if(!t)return;if(!this.hoveredAxis&&(!this.isState(fu.ZoomDraggable)||0!==this.dragState||this.isIgnoredTouch(e)))return;this.panner.stopInteractions();let l=0;if(i&&r)l=1;else if(null!=e){const t=this.isPanningKeyPressed(e.sourceEvent);!n||s&&!t?s&&!t&&(l=3):(o.updateCursor(yu,"grabbing"),l=2,this.panner.start())}0!==(this.dragState=l)&&a.fireZoomPanStartEvent("zoom")}onDragMove(e){const{anchorPointX:t,anchorPointY:i,axisDragger:s,dragState:r,enabled:o,paddedRect:a,panner:l,selector:c,seriesRect:h,shouldFlipXY:d,hoveredAxis:u,ctx:{interactionManager:p,tooltipManager:g,updateService:f,zoomManager:m}}=this;if(!o||!a||!h)return;if(!u&&(!this.isState(fu.ZoomDraggable)||this.isIgnoredTouch(e)))return;p.pushState(n.n1.InteractionState.ZoomDrag),"touch"===e.device&&e.sourceEvent.preventDefault();const v=this.getZoom();switch(r){case 1:{if(!u)break;const{id:n,direction:r}=u;let o=r===du.X?t:i;d&&(o=r===du.X?i:t);const a=m.getAxisZoom(n),l=s.update(e,r,o,h,v,a);m.setAxisManuallyAdjusted("zoom",n),this.updateAxisZoom(n,r,l);break}case 2:l.update(e);break;case 3:c.update(e,this.getModuleProperties(),a);break;case 0:return}g.updateTooltip(Cu),f.update(uu.PERFORM_LAYOUT,{skipAnimations:!0})}onDragEnd(){const{axisDragger:e,dragState:t,enabled:i,panner:s,selector:r,ctx:{domManager:o,interactionManager:a,tooltipManager:l}}=this;if(a.popState(n.n1.InteractionState.ZoomDrag),i&&0!==t){switch(t){case 1:this.hoveredAxis=void 0,e.stop();break;case 2:s.stop();break;case 3:{if(!r.didUpdate())break;const e=this.getZoom(),t=r.stop(this.seriesRect,this.paddedRect,e);this.updateZoom(t);break}}this.dragState=0,o.updateCursor(yu),l.removeTooltip(Cu)}}onNavZoom(e){const{enabled:t,enableScrolling:i,scroller:s}=this;this.ctx.interactionManager.isState(n.n1.InteractionState.Default)&&t&&i&&(e.widgetEvent.sourceEvent.preventDefault(),this.updateZoom(s.updateDelta(e.delta,this.getModuleProperties(),this.getZoom())))}onWheel(e){const{enabled:t,enablePanning:i,enableScrolling:n,paddedRect:s}=this;if(!(t&&n&&s&&this.isState(fu.ZoomWheelable)))return;const{deltaX:r,deltaY:o}=e.sourceEvent,a=null!=r&&null!=o&&Math.abs(r)>Math.abs(o);i&&a?this.onWheelPanning(e):this.onWheelScrolling(e)}onWheelPanning(e){const{scrollingStep:t,scrollPanner:i,seriesRect:n,ctx:{zoomManager:r}}=this;if(!n)return;e.sourceEvent.preventDefault();const o=i.update(e,t,n,r.getAxisZooms());for(const[e,{direction:t,zoom:i}]of(0,s.jO)(o))this.updateAxisZoom(e,t,i)}onWheelScrolling(e){const{enableAxisDragging:t,enableIndependentAxes:i,hoveredAxis:r,scroller:o,seriesRect:a,ctx:{zoomManager:l}}=this;if(!a)return;const c=this.getZoom();let h=e.deltaY>0&&this.isMaxZoom(c);const d=t&&null!=r;let u=this.isScalingX(),p=this.isScalingY();d&&(u=r.direction===n.n1.ChartAxisDirection.X,p=!u);const g=this.getModuleProperties({isScalingX:u,isScalingY:p});let f=!0;if(!0===i){const t=o.updateAxes(e,g,a,l.getAxisZooms());for(const[e,{direction:i,zoom:n}]of(0,s.jO)(t))d&&r.id!==e||f&&(f=this.updateAxisZoom(e,i,n))}else{const t=o.update(e,g,a,this.getZoom());f=this.updateUnifiedZoom(t)}h||(h=e.deltaY<0&&!f),this.isFirstWheelEvent&&h||e.sourceEvent.preventDefault(),this.isFirstWheelEvent=!1,this.debouncedWheelReset()}onAxisDragStart(e,t){this.hoveredAxis={id:e,direction:t},this.onDragStart(void 0)}onTouchStart(e,t){this.enableTwoFingerZoom&&0===this.dragState&&this.twoFingers.start(e,t,this.getZoom())&&(this.dragState=4)}onTouchMove(e,t){if(!this.enableTwoFingerZoom||4!==this.dragState)return;const i=this.twoFingers.update(e,t);this.updateZoom(Fd(i))}onTouchEnd(e){this.enableTwoFingerZoom&&4===this.dragState&&(e.sourceEvent.preventDefault(),this.twoFingers.end(e)&&(this.dragState=0))}onProcessData(e){this.shouldFlipXY=e.series.shouldFlipXY}onLayoutComplete(e){this.domProxy.update(this.enableAxisDragging,this.ctx),this.enabled&&(this.seriesRect=e.series.rect,this.paddedRect=e.series.paddedRect,this.enableAxisDragging&&this.toggleAxisDraggingCursors())}onZoomChange(e){"zoom"!==e.callerId&&this.panner.stopInteractions();const t=this.getZoom();this.buttons.toggleVisibleZoomed(this.isMaxZoom(t))}onZoomPanStart(e){"zoom"===e.callerId&&this.panner.stopInteractions()}onPanUpdate(e){const{panner:t,seriesRect:i,ctx:{tooltipManager:n,zoomManager:r}}=this;if(!i)return;const o=t.translateZooms(i,r.getAxisZooms(),e.deltaX,e.deltaY);for(const[e,{direction:t,zoom:i}]of(0,s.jO)(o))this.updateAxisZoom(e,t,i);n.updateTooltip(Cu)}isPanningKeyPressed(e){switch(this.panKey){case"alt":return e.altKey;case"ctrl":return e.ctrlKey;case"shift":return e.shiftKey;case"meta":return e.metaKey}}isScalingX(){return"xy"===this.axes||(this.shouldFlipXY?"y"===this.axes:"x"===this.axes)}isScalingY(){return"xy"===this.axes||(this.shouldFlipXY?"x"===this.axes:"y"===this.axes)}getAnchorPointX(){return this.shouldFlipXY?this.anchorPointY:this.anchorPointX}getAnchorPointY(){return this.shouldFlipXY?this.anchorPointX:this.anchorPointY}isMaxZoom(e){return Rd(e,Ad())}isZoomValid(e){const{minVisibleItems:t,minVisibleItemsX:i,minVisibleItemsY:n,ctx:{zoomManager:s}}=this;if(0===t)return!0;const r=this.getZoom(),o=vu(Td(e))<vu(Td(r)),a=vu(Dd(e))<vu(Dd(r));return!o&&!a||(null!=i&&o?s.isVisibleItemsCountAtLeast(e,i):null!=n&&a?s.isVisibleItemsCountAtLeast(e,n):s.isVisibleItemsCountAtLeast(e,t))}isAxisZoomValid(e,t){const{minVisibleItems:i,minVisibleItemsX:n,minVisibleItemsY:s,ctx:{zoomManager:r}}=this,o=this.getZoom(),a=t.max-t.min,l=o[e].max-o[e].min,c={...o,[e]:t},h=e===du.X?n:s;return a>=l||r.isVisibleItemsCountAtLeast(c,h??i)}resetZoom(){this.ctx.zoomManager.resetZoom("zoom")}updateZoom(e){this.enableIndependentAxes?this.updatePrimaryAxisZooms(e):this.updateUnifiedZoom(e)}updateUnifiedZoom(e){return this.isZoomValid(e)?(this.ctx.zoomManager.updateZoom("zoom",e),!0):(this.ctx.updateService.update(uu.SCENE_RENDER,{skipAnimations:!0}),!1)}updatePrimaryAxisZooms(e){this.updatePrimaryAxisZoom(e,du.X),this.updatePrimaryAxisZoom(e,du.Y)}updatePrimaryAxisZoom(e,t){const i=this.ctx.zoomManager.getPrimaryAxisId(t);null!=i&&this.updateAxisZoom(i,t,e[t])}updateAxisZoom(e,t,i){const{enableIndependentAxes:n,ctx:{zoomManager:s}}=this;if(!i)return!1;const r=this.getZoom();return!0!==n?(r[t]=i,this.updateUnifiedZoom(r)):!!this.isAxisZoomValid(t,i)&&(s.updateAxisZoom("zoom",e,i),!0)}toggleAxisDraggingCursors(){const{anchorPointX:e,anchorPointY:t,domProxy:i}=this,n=this.getZoom();let s=Td(n)!==xd,r=Dd(n)!==xd;if(!s){const t=Nd(n,.999,1);t.x=_d(t.x,n.x,e),s=this.isZoomValid(t)}if(!r){const e=Nd(n,1,.999);e.y=_d(e.y,n.y,t),r=this.isZoomValid(e)}i.toggleAxisDraggingCursor(du.X,s),i.toggleAxisDraggingCursor(du.Y,r)}getZoom(){return Ld(this.ctx.zoomManager.getZoom())}getResetZoom(){return Ld(this.ctx.zoomManager.getRestoredZoom())}getModuleProperties(e){return{anchorPointX:e?.anchorPointX??this.getAnchorPointX(),anchorPointY:e?.anchorPointY??this.getAnchorPointY(),enabled:e?.enabled??this.enabled,independentAxes:e?.independentAxes??!0===this.enableIndependentAxes,isScalingX:e?.isScalingX??this.isScalingX(),isScalingY:e?.isScalingY??this.isScalingY(),keepAspectRatio:e?.keepAspectRatio??this.keepAspectRatio,scrollingStep:e?.scrollingStep??this.scrollingStep}}};a([hu({newValue(e){this.onEnabledChange(e)}}),gu],Su.prototype,"enabled",2),a([gu],Su.prototype,"enableAxisDragging",2),a([gu],Su.prototype,"enableDoubleClickToReset",2),a([hu({changeValue(e){this.ctx.zoomManager.setIndependentAxes(Boolean(e))}}),gu],Su.prototype,"enableIndependentAxes",2),a([gu],Su.prototype,"enablePanning",2),a([gu],Su.prototype,"enableScrolling",2),a([gu],Su.prototype,"enableSelecting",2),a([gu],Su.prototype,"enableTwoFingerZoom",2),a([gu],Su.prototype,"panKey",2),a([gu],Su.prototype,"axes",2),a([gu],Su.prototype,"scrollingStep",2),a([gu],Su.prototype,"keepAspectRatio",2),a([gu],Su.prototype,"minVisibleItems",2),a([pu("Use [minVisibleItems] instead."),gu],Su.prototype,"minVisibleItemsX",2),a([pu("Use [minVisibleItems] instead."),gu],Su.prototype,"minVisibleItemsY",2),a([gu],Su.prototype,"anchorPointX",2),a([gu],Su.prototype,"anchorPointY",2),a([gu],Su.prototype,"autoScaling",2),a([gu],Su.prototype,"buttons",2),a([mu("panner.deceleration"),gu],Su.prototype,"deceleration",2);var wu={type:"root",optionsKey:"zoom",packageType:"enterprise",chartTypes:["cartesian","topology"],moduleFactory:e=>new Su(e),themeTemplate:{zoom:{anchorPointX:"end",anchorPointY:"middle",axes:"x",buttons:{enabled:!0,visible:"hover",buttons:[{icon:"zoom-out",tooltip:"toolbarZoomZoomOut",value:"zoom-out",section:"scale"},{icon:"zoom-in",tooltip:"toolbarZoomZoomIn",value:"zoom-in",section:"scale"},{icon:"pan-left",tooltip:"toolbarZoomPanLeft",value:"pan-left",section:"pan"},{icon:"pan-right",tooltip:"toolbarZoomPanRight",value:"pan-right",section:"pan"},{icon:"reset",tooltip:"toolbarZoomReset",value:"reset",section:"reset"}]},enabled:!1,enableAxisDragging:!0,enableDoubleClickToReset:!0,enablePanning:!0,enableScrolling:!0,enableSelecting:!1,enableTwoFingerZoom:!0,deceleration:"short",minVisibleItems:2,panKey:"alt",scrollingStep:.1,autoScaling:{enabled:!1,padding:.05}}}},{BaseProperties:xu,AxisTicks:Eu,ZIndexMap:Mu,ProxyProperty:Au,Property:Tu,LayoutElement:Du,Group:Iu,Rect:Ru,Marker:Lu,TranslatableGroup:ku,BBox:Pu}=n.n1,Nu=class extends xu{constructor(){super(...arguments),this.thickness=16,this.preferredLength=100}};a([Tu],Nu.prototype,"thickness",2),a([Tu],Nu.prototype,"preferredLength",2);var Ou=class{constructor(e){this.axisTicks=e}};a([Au("axisTicks.label")],Ou.prototype,"label",2),a([Au("axisTicks.interval")],Ou.prototype,"interval",2),a([Au("axisTicks.padding")],Ou.prototype,"padding",2);var _u=class{constructor(e){this.ctx=e,this.id=(0,s.sX)(this),this.legendGroup=new ku({name:"legend",zIndex:Mu.LEGEND}),this.gradientRect=new Ru,this.arrow=new Lu({shape:"triangle"}),this.ticksGroup=new Iu({name:"legend-axis-group"}),this.destroyFns=[],this.enabled=!1,this.position="bottom",this.reverseOrder=!1,this.gradient=new Nu,this.spacing=20,this.data=[],this.highlightManager=e.highlightManager,this.axisTicks=new Eu,this.axisTicks.attachAxis(this.ticksGroup),this.scale=new Ou(this.axisTicks),this.legendGroup.append([this.gradientRect,this.arrow,this.ticksGroup]),this.destroyFns.push(e.highlightManager.addListener("highlight-change",()=>this.onChartHoverChange()),e.layoutManager.registerElement(Du.Legend,e=>this.onStartLayout(e)),()=>this.legendGroup.remove())}isVertical(){return"right"===this.position||"left"===this.position}destroy(){this.destroyFns.forEach(e=>e())}attachLegend(e){e.appendChild(this.legendGroup)}onStartLayout(e){const[t]=this.data;if(!this.enabled||!t?.enabled||"gradient"!==t.legendType)return void(this.legendGroup.visible=!1);const{colorRange:i}=this.normalizeColorArrays(t);this.updateGradientRect(e.layoutBox,i);const n=this.updateAxis(t)??new Pu(0,0,0,0),{left:s,top:r}=this.getMeasurements(e.layoutBox,n);this.updateArrow(),this.legendGroup.visible=!0,this.legendGroup.translationX=s,this.legendGroup.translationY=r}normalizeColorArrays(e){let t=e.colorDomain.slice();const i=e.colorRange.slice();if(t.length===i.length)return{colorDomain:t,colorRange:i};t.length>i.length&&i.splice(t.length);const[n,s]=t,r=i.length;return t=i.map((e,t)=>0===t?n:t===r-1?s:n+(s-n)*t/(r-1)),{colorDomain:t,colorRange:i}}updateGradientRect(e,t){const{gradientRect:i}=this,{preferredLength:n,thickness:s}=this.gradient;let r;this.isVertical()?(r=0,i.width=s,i.height=Math.min(e.height,n)):(r=90,i.width=Math.min(e.width,n),i.height=s),i.fill={type:"gradient",gradient:"linear",colorSpace:"oklch",colorStops:t.map((e,i)=>({stop:i/(t.length-1),color:e})),rotation:r}}updateAxis(e){const{axisTicks:t}=this,i=this.isVertical(),n=this.reverseOrder!==i;return t.position=this.position,t.translationX=i?this.gradient.thickness:0,t.translationY=i?0:this.gradient.thickness,t.scale.domain=n?e.colorDomain.slice().reverse():e.colorDomain,t.scale.range=i?[0,this.gradientRect.height]:[0,this.gradientRect.width],t.calculateLayout()}updateArrow(){const e=this.highlightManager.getActiveHighlight(),{arrow:t}=this;if(null==e?.colorValue)return void(t.visible=!1);const{scale:i,label:n}=this.axisTicks,s=n.fontSize??0,r=i.convert(e.colorValue);let{x:o,y:a}=this.gradientRect,l=Math.PI;this.isVertical()?(o-=s/2,a+=r,l/=2):(o+=r,a-=s/2),t.visible=!0,t.fill=n.color,t.rotation=l,t.size=s,t.translationX=o,t.translationY=a}getMeasurements(e,t){let{x:i,y:n}=e,{width:s,height:r}=this.gradientRect;switch(this.isVertical()?s+=t.width+5:r+=t.height+5,this.position){case"left":n+=e.height/2-r/2,e.shrink(s+this.spacing,"left");break;case"right":i+=e.width-s,n+=e.height/2-r/2,e.shrink(s+this.spacing,"right");break;case"top":i+=e.width/2-s/2,e.shrink(r+this.spacing,"top");break;case"bottom":i+=e.width/2-s/2,n+=e.height-r,e.shrink(r+this.spacing,"bottom")}return{top:n,left:i}}onChartHoverChange(){this.enabled&&this.updateArrow()}};_u.className="GradientLegend",a([Tu],_u.prototype,"enabled",2),a([Tu],_u.prototype,"position",2),a([Tu],_u.prototype,"reverseOrder",2),a([Tu],_u.prototype,"gradient",2),a([Tu],_u.prototype,"spacing",2);var Fu={type:"legend",optionsKey:"gradientLegend",packageType:"enterprise",chartTypes:["cartesian","polar","hierarchy","topology","flow-proportion","standalone","gauge"],identifier:"gradient",moduleFactory:e=>new _u(e),themeTemplate:{enabled:!1,position:"bottom",spacing:20,scale:{padding:13,label:{color:{$ref:"textColor"},fontSize:{$ref:"fontSize"},fontFamily:{$ref:"fontFamily"},fontWeight:{$ref:"fontWeight"}},interval:{minSpacing:15}},gradient:{preferredLength:100,thickness:16},reverseOrder:!1},removable:"standalone-only"};function Gu(e,t){const i=e.addChild("canvas-overlay","watermark"),n=(0,s.n)("span");n.innerText=t,i.addEventListener("animationend",()=>{e.removeChild("canvas-overlay","watermark"),e.removeStyles("watermark")}),i.classList.add("ag-watermark"),i.appendChild(n)}var{ordinalTimeAxisOptionsDefs:Vu,angleNumberAxisOptionsDefs:Bu,angleCategoryAxisOptionsDefs:Hu,radiusNumberAxisOptionsDefs:zu,radiusCategoryAxisOptionsDefs:Uu}=n.n1,Wu={type:"axis",name:"ordinal-time",chartType:"cartesian",enterprise:!0,options:Vu,create:e=>new ue(e)},ju={type:"axis",name:"angle-number",chartType:"polar",enterprise:!0,options:Bu,create:e=>new ae(e)},Ku={type:"axis",name:"angle-category",chartType:"polar",enterprise:!0,options:Hu,create:e=>new Z(e)},$u={type:"axis",name:"radius-number",chartType:"polar",enterprise:!0,options:zu,create:e=>new Ye(e)},Yu={type:"axis",name:"radius-category",chartType:"polar",enterprise:!0,options:Uu,create:e=>new Ue(e)},{Chart:qu,Property:Xu}=n.n1,Zu=class extends qu{getChartType(){return"flow-proportion"}async updateData(){await super.updateData();const e=this.getOptions();this.nodes!==e.nodes&&(this.nodes=e.nodes);const{nodes:t}=this;this.series.forEach(e=>{(function(e){return"sankey"===e.type||"chord"===e.type})(e)&&e.setChartNodes(t)})}performLayout(e){const{seriesRoot:t,annotationRoot:i}=this,{layoutBox:n}=e;n.shrink(this.seriesArea.padding.toJson());const s=n.clone();this.seriesRect=s,this.animationRect=s,t.visible=this.series.some(e=>e.visible);for(const e of[t,i])e.translationX=Math.floor(s.x),e.translationY=Math.floor(s.y);this.ctx.layoutManager.emitLayoutComplete(e,{series:{visible:t.visible,rect:s,paddedRect:s}})}};Zu.className="FlowProportionChart",Zu.type="flow-proportion",a([Xu],Zu.prototype,"nodes",2);var{isAgFlowProportionChartOptions:Qu,flowProportionChartOptionsDefs:Ju}=n.n1,ep={type:"chart",name:"flow-proportion",enterprise:!0,options:Ju,detect:Qu,create:(e,t)=>new Zu(e,t)},{Chart:tp}=n.n1,ip=class extends tp{getChartType(){return"gauge"}performLayout(e){const{seriesRoot:t,annotationRoot:i,series:n,seriesArea:s}=this,{layoutBox:r}=e,o=r.clone();r.shrink(s.padding.toJson()),this.seriesRect=o.clone().translate(o.x-r.x,o.y-r.y),this.animationRect=r,t.visible=n.some(e=>e.visible);for(const e of[t,i])e.translationX=Math.floor(r.x),e.translationY=Math.floor(r.y);this.ctx.layoutManager.emitLayoutComplete(e,{series:{visible:t.visible,rect:o,paddedRect:r}})}getAriaLabel(){const e=[],t=this.getCaptionText();0!==t.length&&e.push(t);for(const t of this.series)e.push(t.getCaptionText());const i=e.join(". ");return this.ctx.localeManager.t("ariaAnnounceGaugeChart",{caption:i})}};ip.className="GaugeChart",ip.type="gauge";var{isAgGaugeChartOptions:np,gaugeChartOptionsDefs:sp}=n.n1,rp={type:"chart",name:"gauge",enterprise:!0,options:sp,detect:np,create:(e,t)=>new ip(e,t)},{Chart:op}=n.n1,ap=class extends op{getChartType(){return"hierarchy"}performLayout(e){const{seriesRoot:t,annotationRoot:i}=this,{layoutBox:n}=e;n.shrink(this.seriesArea.padding.toJson());const s=n.clone();this.seriesRect=s,this.animationRect=s;for(const e of[t,i])e.translationX=Math.floor(s.x),e.translationY=Math.floor(s.y);t.visible=this.series[0].visible,t.setClipRect(s.clone()),this.ctx.layoutManager.emitLayoutComplete(e,{series:{visible:!0,rect:s,paddedRect:s}})}getAriaLabel(){const e=this.getCaptionText();return this.ctx.localeManager.t("ariaAnnounceHierarchyChart",{caption:e})}};ap.className="HierarchyChart",ap.type="hierarchy";var{isAgHierarchyChartOptions:lp,hierarchyChartOptionsDefs:cp}=n.n1,hp={type:"chart",name:"hierarchy",enterprise:!0,options:cp,detect:lp,create:(e,t)=>new ap(e,t)},{Chart:dp}=n.n1,up=class extends dp{getChartType(){return"standalone"}performLayout(e){const{seriesRoot:t,annotationRoot:i}=this,{layoutBox:n}=e;n.shrink(this.seriesArea.padding.toJson());const s=n.clone();this.seriesRect=s,this.animationRect=s;for(const e of[t,i])e.translationX=Math.floor(n.x),e.translationY=Math.floor(n.y);t.visible=this.series[0].visible,this.ctx.layoutManager.emitLayoutComplete(e,{series:{visible:!0,rect:s,paddedRect:n}})}getAriaLabel(){const e=this.getCaptionText();return this.ctx.localeManager.t("ariaAnnounceHierarchyChart",{caption:e})}};up.className="StandaloneChart",up.type="standalone";var{isAgStandaloneChartOptions:pp,standaloneChartOptionsDefs:gp}=n.n1,fp={type:"chart",name:"standalone",enterprise:!0,options:gp,detect:pp,create:(e,t)=>new up(e,t)},{Chart:mp,MercatorScale:vp,NumberAxis:yp,Property:Cp}=n.n1;function bp(e){return"map-shape"===e.type||"map-line"===e.type||"map-marker"===e.type||"map-shape-background"===e.type||"map-line-background"===e.type}var Sp=class extends mp{constructor(e,t){super(e,t),this.xAxis=new yp(this.getModuleContext()),this.xAxis.position="bottom",this.yAxis=new yp(this.getModuleContext()),this.yAxis.position="left",this.ctx.zoomManager.updateAxes([this.xAxis,this.yAxis])}getChartType(){return"topology"}async updateData(){await super.updateData();const e=this.getOptions();this.topology!==e.topology&&(this.topology=e.topology);const{topology:t}=this;this.series.forEach(e=>{bp(e)&&e.setChartTopology(t)})}performLayout(e){const{seriesRoot:t,annotationRoot:i}=this,{layoutBox:n}=e;n.shrink(this.seriesArea.padding.toJson());const s=n.clone();this.seriesRect=s,this.animationRect=s;const r=this.series.filter(bp),o=r.reduce((e,t)=>{if(!t.visible)return e;const i=t.topologyBounds;return null==i?e:null==e?i:(e.merge(i),e)},void 0);let a;if(null!=o){const{lon0:e,lat0:t,lon1:i,lat1:n}=o,r=[[e,t],[i,n]],l=vp.bounds(r),{width:c,height:h}=s,d=Math.min(c/l.width,h/l.height),u=l.width*d,p=l.height*d,g=(c-u)/2,f=(h-p)/2,m=g,v=f,y=g+u,C=f+p,b=this.ctx.zoomManager.getAxisZoom(this.xAxis.id),S=this.ctx.zoomManager.getAxisZoom(this.yAxis.id),w=(y-m)/(b.max-b.min),x=m-w*b.min,E=(C-v)/(1-S.min-(1-S.max)),M=v-E*(1-S.max);a=new vp(r,[[x,M],[x+w,M+E]])}r.forEach(e=>{e.scale=a});const l=this.series.some(e=>e.visible);t.visible=l;for(const e of[t,i])e.translationX=Math.floor(s.x),e.translationY=Math.floor(s.y),e.setClipRect(s.clone());this.ctx.layoutManager.emitLayoutComplete(e,{series:{visible:l,rect:s,paddedRect:s}})}};Sp.className="TopologyChart",Sp.type="topology",a([Cp],Sp.prototype,"topology",2);var{isAgTopologyChartOptions:wp,topologyChartOptionsDefs:xp}=n.n1,Ep={type:"chart",name:"topology",enterprise:!0,options:xp,detect:wp,create:(e,t)=>new Sp(e,t)},{annotationCalloutStylesDefs:Mp,annotationNoteStylesDefs:Ap,annotationTextStylesDef:Tp,annotationCommentStylesDefs:Dp,annotationMeasurerStylesDefs:Ip,annotationShapeStylesDefs:Rp,annotationChannelTextDefs:Lp,annotationCrossLineStyleDefs:kp,annotationFibonacciStylesDefs:Pp,annotationLineStyleDefs:Np,annotationLineTextDefs:Op,annotationDisjointChannelStyleDefs:_p,annotationParallelChannelStyleDefs:Fp}=n.n1,Gp=(0,s.fd)({__type:(0,s.mw)((0,s.dY)("date")),value:(0,s.or)(s.Yj,s.ai)},"a serializable date object"),Vp=(0,s.or)(s.Yj,s.ai,Gp),Bp=(0,s.or)(Vp,(0,s.fd)({value:Vp,groupPercentage:(0,s.fN)(-1,1)})),Hp={...Lp,label:s.Yj},zp={...Op,label:s.Yj},Up={x:Bp,y:s.ai},Wp=(0,s.is)({line:{...Np,start:Up,end:Up,text:zp},"horizontal-line":{...kp,value:Bp,text:zp},"vertical-line":{...kp,value:Bp,text:zp},"disjoint-channel":{..._p,startHeight:s.Ly,endHeight:s.Ly,start:Up,end:Up,text:Hp},"parallel-channel":{...Fp,height:s.Ly,start:Up,end:Up,text:Hp},"fibonacci-retracement":{...Pp,start:Up,end:Up,text:zp,reverse:s.zM},"fibonacci-retracement-trend-based":{...Pp,start:Up,end:Up,endRetracement:Up,text:zp,reverse:s.zM},callout:{...Mp,start:Up,end:Up,text:s.Yj},comment:{...Dp,...Up,text:s.Yj},note:{...Ap,...Up,text:s.Yj},text:{...Tp,...Up,text:s.Yj},arrow:{...Np,text:zp,start:Up,end:Up},"arrow-up":{...Rp,...Up},"arrow-down":{...Rp,...Up},"date-range":{...Ip,extendAbove:s.zM,extendBelow:s.zM,text:zp,start:Up,end:Up},"price-range":{...Ip,extendLeft:s.zM,extendRight:s.zM,text:zp,start:Up,end:Up},"date-price-range":{...Ip,text:zp,start:Up,end:Up}},"an annotation initial state object"),jp={chartType:(0,s.KC)("candlestick","hollow-candlestick","ohlc","line","step-line","hlc","high-low"),annotations:(0,s.J$)(Wp),legend:(0,s.J$)({visible:s.zM,seriesId:s.Yj,itemId:s.Yj,legendItemName:s.Yj},"legend state array"),zoom:{rangeX:{start:(0,s.or)(s.ai,Gp),end:(0,s.or)(s.ai,Gp)},rangeY:{start:(0,s.or)(s.ai,Gp),end:(0,s.or)(s.ai,Gp)},ratioX:{start:s.CG,end:s.CG},ratioY:{start:s.CG,end:s.CG},autoScaledAxes:(0,s.jk)((0,s.dY)("y"))}},{ScalableGroup:Kp,Rect:$p,Line:Yp,BBox:qp,Selection:Xp,applyShapeFillBBox:Zp}=n.n1,Qp=class extends Kp{constructor(){super(),this.append([new $p({tag:0}),new $p({tag:2}),new $p({tag:1}),new Yp({tag:3}),new Yp({tag:3}),new Yp({tag:4}),new Yp({tag:4})])}updateDatumStyles(e,t,i,n,s){const{bandwidth:r,scaledValues:{xValue:o,medianValue:a}}=e;let{minValue:l,q1Value:c,q3Value:h,maxValue:d}=e.scaledValues;(i&&!n||!i&&n)&&([d,h,c,l]=[l,c,h,d]);const u=(e,t,n,s)=>i?{y:e,x:t,width:s,height:n}:{x:e,y:t,width:n,height:s},p=(e,t,n)=>i?{y1:e,y2:t,x:n}:{x1:e,x2:t,y:n},g=(e,t,n)=>i?{x1:t,x2:n,y:e}:{x:e,y1:t,y2:n},{fill:f,fillOpacity:m,stroke:v,strokeWidth:y,strokeOpacity:C,lineDash:b,lineDashOffset:S,cornerRadius:w,cap:x,whisker:E}=t,M=Xp.select(this,$p),[A]=M.selectByTag(0),[T]=M.selectByTag(2),[D]=M.selectByTag(1),I=M.selectByTag(3),R=M.selectByTag(4);E.strokeWidth>r&&(E.strokeWidth=r);const L=u(c,o,h-c,r);T.setProperties(L),A.setProperties(L),A.setProperties({cornerRadius:w});const k=Math.max(Math.round(a-y/2),c+y),P=Math.min(Math.round(a+y/2),h-y);var N,O,_,F;D.setProperties(L),D.setProperties({visible:k<P,cornerRadius:w,clipBBox:(N=k,O=o+y,_=P-k,F=Math.max(0,r-2*y),({x:N,y:O,width:_,height:F}=u(N,O,_,F)),new qp(N,O,_,F))});const G=Math.floor(o+r*(1-x.lengthRatio)/2),V=Math.ceil(o+r*(1+x.lengthRatio)/2);R[0].setProperties(g(l,G,V)),R[1].setProperties(g(d,G,V)),I[0].setProperties(p(Math.round(l+E.strokeWidth/2),c,Math.floor(o+r/2))),I[1].setProperties(p(h,Math.round(d-E.strokeWidth/2),Math.floor(o+r/2))),Zp(A,f,s),A.setProperties({fill:f,fillOpacity:m,strokeWidth:2*y,strokeOpacity:0}),D.setProperties({fill:v,fillOpacity:C,strokeWidth:0});for(const e of[...I,...R])e.setProperties(E);T.setProperties({stroke:v,strokeWidth:y,strokeOpacity:C,lineDash:b,lineDashOffset:S,cornerRadius:w,fillOpacity:0})}distanceSquared(e,t){const i=Xp.selectByClass(this,$p,Yp);return n.n1.nearestSquared(e,t,i).distanceSquared}get midPoint(){const e=this.datum;return void 0===e.midPoint?(s.Vy.error("BoxPlotGroup.datum.midPoint is undefined"),{x:NaN,y:NaN}):e.midPoint}},{BaseProperties:Jp,FillGradientDefaults:eg,FillPatternDefaults:tg,FillImageDefaults:ig,AbstractBarSeriesProperties:ng,SeriesTooltip:sg,Property:rg,mergeDefaults:og}=n.n1,ag=class extends Jp{constructor(){super(...arguments),this.lengthRatio=.5}};a([rg],ag.prototype,"lengthRatio",2);var lg=class extends Jp{};a([rg],lg.prototype,"stroke",2),a([rg],lg.prototype,"strokeWidth",2),a([rg],lg.prototype,"strokeOpacity",2),a([rg],lg.prototype,"lineDash",2),a([rg],lg.prototype,"lineDashOffset",2);var cg=class extends ng{constructor(){super(...arguments),this.fill="#c16068",this.fillGradientDefaults=new eg,this.fillPatternDefaults=new tg,this.fillImageDefaults=new ig,this.fillOpacity=1,this.stroke="#333",this.strokeWidth=1,this.strokeOpacity=1,this.lineDash=[0],this.lineDashOffset=0,this.cornerRadius=0,this.cap=new ag,this.whisker=new lg,this.tooltip=new sg}toJson(){const{stroke:e,strokeWidth:t,strokeOpacity:i,lineDash:n,lineDashOffset:s}=this,r=super.toJson();return r.whisker=og(r.whisker,{stroke:e,strokeWidth:t,strokeOpacity:i,lineDash:n,lineDashOffset:s}),r}};a([rg],cg.prototype,"xKey",2),a([rg],cg.prototype,"minKey",2),a([rg],cg.prototype,"q1Key",2),a([rg],cg.prototype,"medianKey",2),a([rg],cg.prototype,"q3Key",2),a([rg],cg.prototype,"maxKey",2),a([rg],cg.prototype,"xName",2),a([rg],cg.prototype,"yName",2),a([rg],cg.prototype,"minName",2),a([rg],cg.prototype,"q1Name",2),a([rg],cg.prototype,"medianName",2),a([rg],cg.prototype,"q3Name",2),a([rg],cg.prototype,"maxName",2),a([rg],cg.prototype,"fill",2),a([rg],cg.prototype,"fillGradientDefaults",2),a([rg],cg.prototype,"fillPatternDefaults",2),a([rg],cg.prototype,"fillImageDefaults",2),a([rg],cg.prototype,"fillOpacity",2),a([rg],cg.prototype,"stroke",2),a([rg],cg.prototype,"strokeWidth",2),a([rg],cg.prototype,"strokeOpacity",2),a([rg],cg.prototype,"lineDash",2),a([rg],cg.prototype,"lineDashOffset",2),a([rg],cg.prototype,"cornerRadius",2),a([rg],cg.prototype,"itemStyler",2),a([rg],cg.prototype,"cap",2),a([rg],cg.prototype,"whisker",2),a([rg],cg.prototype,"tooltip",2);var{extractDecoratedProperties:hg,fixNumericExtent:dg,keyProperty:ug,mergeDefaults:pg,SeriesNodePickMode:gg,SMALLEST_KEY_INTERVAL:fg,valueProperty:mg,diff:vg,animationValidation:yg,computeBarFocusBounds:Cg,createDatumId:bg,ContinuousScale:Sg,ChartAxisDirection:wg,motion:xg,isGradientFill:Eg,getShapeStyle:Mg}=n.n1,Ag=class extends n.n1.SeriesNodeEvent{constructor(e,t,i,n){super(e,t,i,n),this.xKey=n.properties.xKey,this.minKey=n.properties.minKey,this.q1Key=n.properties.q1Key,this.medianKey=n.properties.medianKey,this.q3Key=n.properties.q3Key,this.maxKey=n.properties.maxKey}},Tg=class extends n.n1.AbstractBarSeries{constructor(e){super({moduleCtx:e,pickModes:[gg.NEAREST_NODE,gg.EXACT_SHAPE_MATCH],directionKeys:{x:["xKey"],y:["medianKey","q1Key","q3Key","minKey","maxKey"]},directionNames:{x:["xName"],y:["medianName","q1Name","q3Name","minName","maxName"]},categoryKey:"xValue",pathsPerSeries:[],hasHighlightedLabels:!0}),this.properties=new cg,this.NodeEvent=Ag}async processData(e){if(!this.visible)return;const{xKey:t,minKey:i,q1Key:n,medianKey:s,q3Key:r,maxKey:o}=this.properties,a=!this.ctx.animationManager.isSkipped(),l=this.getCategoryAxis()?.scale,c=this.getValueAxis()?.scale,{isContinuousX:h,xScaleType:d,yScaleType:u}=this.getScaleInformation({xScale:l,yScale:c}),p=[];a&&this.processedData&&p.push(vg(this.id,this.processedData)),a&&p.push(yg());const{processedData:g}=await this.requestDataModel(e,this.data,{props:[ug(t,d,{id:"xValue"}),mg(i,u,{id:"minValue"}),mg(n,u,{id:"q1Value"}),mg(s,u,{id:"medianValue"}),mg(r,u,{id:"q3Value"}),mg(o,u,{id:"maxValue"}),...h?[fg]:[],...p]});this.smallestDataInterval=g.reduced?.smallestKeyInterval,this.animationState.transition("updateData")}getSeriesDomain(e){const{processedData:t,dataModel:i}=this;if(!t||!i)return[];if(e!==this.getBarDirection()){const{index:e,def:n}=i.resolveProcessedDataDefById(this,"xValue"),s=t.domain.keys[e];return"key"===n.type&&"category"===n.valueType?s:this.padBandExtent(s)}const n=this.domainForClippedRange(e,["minValue","maxValue"],"xValue",!0);return dg(n)}getSeriesRange(e,t){return this.domainForVisibleRange(wg.Y,["maxValue","minValue"],"xValue",t,!0)}createNodeData(){const{visible:e,dataModel:t,processedData:i}=this,n=this.getCategoryAxis(),s=this.getValueAxis();if(!(t&&i&&n&&s))return;const{xKey:r,fill:o,fillOpacity:a,stroke:l,strokeWidth:c,strokeOpacity:h,lineDash:d,lineDashOffset:u,cap:p,whisker:g}=this.properties,f=[],m=t.resolveKeysById(this,"xValue",i),v=t.resolveColumnById(this,"minValue",i),y=t.resolveColumnById(this,"q1Value",i),C=t.resolveColumnById(this,"medianValue",i),b=t.resolveColumnById(this,"q3Value",i),S=t.resolveColumnById(this,"maxValue",i),{barWidth:w,groupIndex:x}=this.updateGroupScale(n),E=Sg.is(n.scale)?-.5*w:0,{groupScale:M}=this,A=this.isVertical(),T={itemId:r,nodeData:f,labelData:[],scales:this.calculateScaling(),groupScale:this.getScaling(this.groupScale),visible:this.visible};return e?((i.dataSources.get(this.id)??[]).forEach((e,t)=>{const i=m[t];if(null==i)return;const T=v[t],D=y[t],I=C[t],R=b[t],L=S[t];if([T,D,I,R,L].some(e=>"number"!=typeof e)||T>D||D>I||I>R||R>L)return;const k={xValue:Math.round(n.scale.convert(i)),minValue:Math.round(s.scale.convert(T)),q1Value:Math.round(s.scale.convert(D)),medianValue:Math.round(s.scale.convert(I)),q3Value:Math.round(s.scale.convert(R)),maxValue:Math.round(s.scale.convert(L))};k.xValue+=Math.round(M.convert(String(x)))+E;const P=Math.round(w),N=Math.abs(k.q3Value-k.q1Value),O=k.xValue+P/2,_=Math.min(k.q3Value,k.q1Value)+N/2,F={x:A?O:_,y:A?_:O};let G;G=A?{x:F.x-P/2,y:k.minValue,width:P,height:k.maxValue-k.minValue}:{x:k.minValue,y:F.y-P/2,width:k.maxValue-k.minValue,height:P},f.push({series:this,itemId:i,datum:e,datumIndex:t,xKey:r,bandwidth:P,scaledValues:k,cap:p,whisker:g,fill:o,fillOpacity:a,stroke:l,strokeWidth:c,strokeOpacity:h,lineDash:d,lineDashOffset:u,midPoint:F,focusRect:G})}),T):T}legendItemSymbol(){const{fill:e,fillOpacity:t,stroke:i,strokeWidth:n,strokeOpacity:s,lineDash:r,lineDashOffset:o,fillGradientDefaults:a,fillPatternDefaults:l,fillImageDefaults:c}=this.properties;return{marker:Mg({fill:e,fillOpacity:t,stroke:i,strokeOpacity:s,strokeWidth:n,lineDash:r,lineDashOffset:o},a,l,c)}}getLegendData(e){const{id:t,ctx:{legendManager:i},visible:n}=this,{xKey:s,yName:r,showInLegend:o,legendItemName:a}=this.properties;return s&&"category"===e?[{legendType:"category",id:t,itemId:t,seriesId:t,enabled:n&&i.getItemEnabled({seriesId:t,itemId:t}),label:{text:a??r??t},symbol:this.legendItemSymbol(),legendItemName:a,hideInLegend:!o}]:[]}getTooltipContent(e){const{id:t,dataModel:i,processedData:n,properties:s}=this,{xKey:r,xName:o,yName:a,medianKey:l,medianName:c,q1Key:h,q1Name:d,q3Key:u,q3Name:p,minKey:g,minName:f,maxKey:m,maxName:v,legendItemName:y,tooltip:C}=s,b=this.getCategoryAxis(),S=this.getValueAxis();if(!(i&&n&&b&&S))return;const w=n.dataSources.get(this.id)?.[e],x=i.resolveKeysById(this,"xValue",n)[e],E=i.resolveColumnById(this,"minValue",n)[e],M=i.resolveColumnById(this,"q1Value",n)[e],A=i.resolveColumnById(this,"medianValue",n)[e],T=i.resolveColumnById(this,"q3Value",n)[e],D=i.resolveColumnById(this,"maxValue",n)[e];if(null==x)return;const I=this.getItemBaseStyle(!1);return Object.assign(I,this.getItemStyleOverrides(String(e),w,I,!1)),this.formatTooltipWithContext(C,{heading:b.formatDatum(x),title:y??a,symbol:this.legendItemSymbol(),data:[{label:f,fallbackLabel:g,value:S.formatDatum(E)},{label:d,fallbackLabel:h,value:S.formatDatum(M)},{label:c,fallbackLabel:l,value:S.formatDatum(A)},{label:p,fallbackLabel:u,value:S.formatDatum(T)},{label:v,fallbackLabel:m,value:S.formatDatum(D)}]},{seriesId:t,datum:w,title:a,xKey:r,xName:o,yName:a,medianKey:l,medianName:c,q1Key:h,q1Name:d,q3Key:u,q3Name:p,minKey:g,minName:f,maxKey:m,maxName:v,...I})}animateEmptyUpdateReady({datumSelection:e}){const t=this.isVertical(),{from:i,to:n}=function(e){return{from:e?{scalingX:1,scalingY:0}:{scalingX:0,scalingY:1},to:{scalingX:1,scalingY:1}}}(t);xg.resetMotion([e],function(e){return(t,i)=>e?{scalingCenterY:i.scaledValues.medianValue}:{scalingCenterX:i.scaledValues.medianValue}}(t)),xg.staticFromToMotion(this.id,"datums",this.ctx.animationManager,[e],i,n,{phase:"initial"})}isLabelEnabled(){return!1}updateDatumSelection(e){const t=e.nodeData??[];return e.datumSelection.update(t)}getItemBaseStyle(e){const{properties:t}=this,{cornerRadius:i,cap:n,whisker:s,fillGradientDefaults:r,fillPatternDefaults:o,fillImageDefaults:a}=t,l=e?t.highlightStyle.item:void 0,c=this.getStrokeWidth(t.strokeWidth);return Mg({fill:l?.fill??t.fill,fillOpacity:l?.fillOpacity??t.fillOpacity,stroke:l?.stroke??t.stroke,strokeWidth:l?.strokeWidth??c,strokeOpacity:l?.strokeOpacity??t.strokeOpacity,lineDash:l?.lineDash??t.lineDash??[],lineDashOffset:l?.lineDashOffset??t.lineDashOffset,cornerRadius:i,cap:n,whisker:s},r,o,a)}getItemStyleOverrides(e,t,i,n){const{id:s,properties:r}=this,{xKey:o,minKey:a,q1Key:l,medianKey:c,q3Key:h,maxKey:d,fillGradientDefaults:u,fillPatternDefaults:p,fillImageDefaults:g,itemStyler:f}=r;if(null==f)return;const m=this.cachedDatumCallback(bg(e,n?"highlight":"node"),()=>this.callWithContext(f,{seriesId:s,datum:t,xKey:o,minKey:a,q1Key:l,medianKey:c,q3Key:h,maxKey:d,highlighted:n,...i}));return Mg(m,u,p,g)}updateDatumNodes({datumSelection:e,isHighlight:t}){const i=this.isVertical(),n=this.getValueAxis()?.isReversed(),{highlightStyle:s}=this.properties;e.each((e,r)=>{let o=this.getFormattedStyles(r,t?"highlight":"node");t&&(o=pg(s.item,o));const{stroke:a,strokeWidth:l,strokeOpacity:c,lineDash:h,lineDashOffset:d}=o;o.whisker=pg(o.whisker,{stroke:a,strokeWidth:l,strokeOpacity:c,lineDash:h,lineDashOffset:d});const u=this.getShapeFillBBox();e.updateDatumStyles(r,o,i,n,u)})}updateLabelNodes(){}updateLabelSelection(e){const{labelData:t,labelSelection:i}=e;return i.update(t)}nodeFactory(){return new Qp}getFormattedStyles(e,t){const{id:i,properties:n}=this,{xKey:s,minKey:r,q1Key:o,medianKey:a,q3Key:l,maxKey:c,itemStyler:h,cornerRadius:d,fillGradientDefaults:u,fillPatternDefaults:p,fillImageDefaults:g}=n,{datum:f,stroke:m,strokeWidth:v,strokeOpacity:y,lineDash:C,lineDashOffset:b,cap:S,whisker:w}=e;let x,E=1;Eg(e.fill)?x=e.fill:(x=e.fill,E=n.fillOpacity);let M=Mg({fill:x,fillOpacity:E,stroke:m,strokeWidth:v,strokeOpacity:y,lineDash:C,lineDashOffset:b,cornerRadius:d,cap:hg(S),whisker:hg(w)},u,p,g);if(h){const e=this.cachedDatumCallback(bg(f.index,t),()=>this.callWithContext(h,{datum:f,seriesId:i,highlighted:"highlight"===t,...M,xKey:s,minKey:r,q1Key:o,medianKey:a,q3Key:l,maxKey:c}));e&&(M=Mg(pg(e,M),u,p,g))}return M}computeFocusBounds({datumIndex:e}){return Cg(this,this.contextNodeData?.nodeData[e].focusRect)}};Tg.className="BoxPlotSeries",Tg.type="box-plot";var{boxPlotSeriesThemeableOptionsDef:Dg,commonSeriesOptionsDefs:Ig}=n.n1,Rg={...Dg,...Ig,type:(0,s.mw)((0,s.dY)("box-plot")),xKey:(0,s.mw)(s.Yj),minKey:(0,s.mw)(s.Yj),q1Key:(0,s.mw)(s.Yj),medianKey:(0,s.mw)(s.Yj),q3Key:(0,s.mw)(s.Yj),maxKey:(0,s.mw)(s.Yj),xName:s.Yj,yName:s.Yj,minName:s.Yj,q1Name:s.Yj,medianName:s.Yj,q3Name:s.Yj,maxName:s.Yj,grouped:s.zM,legendItemName:s.Yj},{CARTESIAN_AXIS_TYPE:Lg}=n.n1.ThemeConstants,kg={series:{direction:"vertical",fill:{$if:[{$or:[{$isGradient:[{$palette:"fill"}]},{$isPattern:[{$palette:"fill"}]},{$isImage:[{$palette:"fill"}]}]},{$palette:"fill"},{$mix:[n.n1.SAFE_FILL_OPERATION,{$ref:"backgroundColor"},.7]}]},stroke:{$palette:"stroke"},fillGradientDefaults:{type:"gradient",gradient:"linear",bounds:"item",colorStops:{$palette:"gradient"},rotation:0,reverse:!1},fillPatternDefaults:n.n1.FILL_PATTERN_DEFAULTS,fillImageDefaults:n.n1.FILL_IMAGE_DEFAULTS,strokeWidth:2},axes:{[Lg.NUMBER]:{crosshair:{snap:!1}},[Lg.CATEGORY]:{groupPaddingInner:.2,crosshair:{enabled:!1,snap:!1}}}},Pg={type:"series",optionsKey:"series[]",packageType:"enterprise",chartTypes:["cartesian"],identifier:"box-plot",moduleFactory:e=>new Tg(e),tooltipDefaults:{range:"exact"},defaultAxes:n.n1.DIRECTION_SWAP_AXES,themeTemplate:kg,groupable:!0},Ng={type:"series",name:"box-plot",chartType:"cartesian",enterprise:!0,options:Rg,create:e=>new Tg(e)},{findMinMax:Og}=n.n1;function _g(e,t=1){let i=Math.ceil(Math.log2(e.length/t))-1;return i=Math.min(Math.max(i,0),16),2**i|0}function Fg(e){return Og(e.map(e=>Number(e)))}function Gg(e,t,i){return(e.valueOf()-t)/(i-t)}function Vg(e,t){return 4*Math.min(Math.floor(e*t),t-1)|0}function Bg(e,t,i,n,s,r){const o=new Int32Array(4*r).fill(-1),a=new Float64Array(4*r).fill(NaN);for(let l=0;l<e.length;l+=1){const c=e[l],h=t[l],d=i[l];if(null==c||null==h||null==d)continue;const u=Gg(c,n,s),p=h.valueOf(),g=d.valueOf(),f=Vg(u,r),m=-1===o[f+0];(m||u<a[f+0])&&(o[f+0]=l,a[f+0]=u),(m||u>a[f+1])&&(o[f+1]=l,a[f+1]=u),(m||g<a[f+2])&&(o[f+2]=l,a[f+2]=g),(m||p>a[f+3])&&(o[f+3]=l,a[f+3]=p)}return{indexData:o,valueData:a}}function Hg(e,t,i,{inPlace:n=!1}={}){const s=i/2|0,r=n?e:new Int32Array(4*s),o=n?t:new Float64Array(4*s);for(let i=0;i<s;i+=1){const n=4*i|0,s=2*n|0,a=s+4|0,l=-1===e[a+0],c=l||t[s+0]<t[a+0]?s:a;r[n+0]=e[c+0],o[n+0]=t[c+0];const h=l||t[s+1]>t[a+1]?s:a;r[n+1]=e[h+1],o[n+1]=t[h+1];const d=l||t[s+2]<t[a+2]?s:a;r[n+2]=e[d+2],o[n+2]=t[d+2];const u=l||t[s+3]>t[a+3]?s:a;r[n+3]=e[u+3],o[n+3]=t[u+3]}return{maxRange:s,indexData:r,valueData:o}}var{fixNumericExtent:zg,keyProperty:Ug,createDatumId:Wg,SeriesNodePickMode:jg,ChartAxisDirection:Kg,SMALLEST_KEY_INTERVAL:$g,valueProperty:Yg,diff:qg,animationValidation:Xg,computeBarFocusBounds:Zg,visibleRangeIndices:Qg,ContinuousScale:Jg,DiscreteTimeScale:ef,BandScale:tf,getShapeStyle:nf}=n.n1,sf=class extends n.n1.SeriesNodeEvent{constructor(e,t,i,n){super(e,t,i,n),this.xKey=n.properties.xKey,this.openKey=n.properties.openKey,this.closeKey=n.properties.closeKey,this.highKey=n.properties.highKey,this.lowKey=n.properties.lowKey}},rf=class extends n.n1.AbstractBarSeries{constructor(e){super({moduleCtx:e,pickModes:[jg.AXIS_ALIGNED,jg.EXACT_SHAPE_MATCH],directionKeys:{x:["xKey"],y:["lowKey","highKey","openKey","closeKey"]},directionNames:{x:["xName"],y:["lowName","highName","openName","closeName"]},categoryKey:"xValue",pathsPerSeries:[]}),this.NodeEvent=sf,this.dataAggregationFilters=void 0}async processData(e){if(!this.visible)return;const{xKey:t,openKey:i,closeKey:n,highKey:s,lowKey:r}=this.properties,o=!this.ctx.animationManager.isSkipped(),a=this.getCategoryAxis()?.scale,l=this.getValueAxis()?.scale,{isContinuousX:c,xScaleType:h,yScaleType:d}=this.getScaleInformation({xScale:a,yScale:l}),u=[];o&&(this.processedData&&u.push(qg(this.id,this.processedData)),u.push(Xg())),i&&u.push(Yg(i,d,{id:"openValue",invalidValue:void 0,missingValue:void 0}));const{dataModel:p,processedData:g}=await this.requestDataModel(e,this.data,{props:[Ug(t,h,{id:"xValue"}),Yg(n,d,{id:"closeValue"}),Yg(s,d,{id:"highValue"}),Yg(r,d,{id:"lowValue"}),...c?[$g]:[],...u]});this.smallestDataInterval=g.reduced?.smallestKeyInterval,this.dataAggregationFilters=this.aggregateData(p,g),this.animationState.transition("updateData")}aggregateData(e,t){const i=this.axes[Kg.X];if(null==i||!Jg.is(i.scale)&&!ef.is(i.scale))return;const n=e.resolveKeysById(this,"xValue",t),s=e.resolveColumnById(this,"highValue",t),r=e.resolveColumnById(this,"lowValue",t),{index:o}=e.resolveProcessedDataDefById(this,"xValue");return function(e,t,i,n){if(e.length<1e3)return;const[s,r]=Fg(n);let o=_g(e),{indexData:a,valueData:l}=Bg(e,t,i,s,r,o);const c=[{maxRange:o,indexData:a}];for(;o>64;)({indexData:a,valueData:l,maxRange:o}=Hg(a,l,o)),c.push({maxRange:o,indexData:a});return c.reverse(),c}(n,s,r,t.domain.keys[o])}getSeriesDomain(e){const{processedData:t,dataModel:i}=this;if(!t||!i)return[];if(e!==this.getBarDirection()){const{index:e,def:n}=i.resolveProcessedDataDefById(this,"xValue"),s=t.domain.keys[e];return"key"===n.type&&"category"===n.valueType?s:this.padBandExtent(s)}const n=this.domainForClippedRange(e,["highValue","lowValue"],"xValue",!0);return zg(n)}getSeriesRange(e,t){return this.domainForVisibleRange(Kg.Y,["highValue","lowValue"],"xValue",t,!0)}getVisibleItems(e,t,i){return this.countVisibleItems("xValue",["highValue","lowValue"],e,t,i)}createNodeData(){const{visible:e,dataModel:t,processedData:i}=this,n=this.getCategoryAxis(),r=this.getValueAxis();if(!(t&&i&&n&&r))return;const o=[],{xKey:a,highKey:l,lowKey:c}=this.properties,h=i.dataSources.get(this.id)??[],d=t.resolveKeysById(this,"xValue",i),u=t.resolveColumnById(this,"openValue",i),p=t.resolveColumnById(this,"closeValue",i),g=t.resolveColumnById(this,"highValue",i),f=t.resolveColumnById(this,"lowValue",i),{groupScale:m}=this,{barWidth:v,groupIndex:y}=this.updateGroupScale(n),C=m.convert(String(y)),b=v>=1?v:m.rawBandwidth,S=tf.is(n.scale),w={itemId:a,nodeData:o,labelData:[],scales:this.calculateScaling(),groupScale:this.getScaling(this.groupScale),visible:this.visible};if(!e)return w;const x=(e,t,i,s,l,c,d,u)=>{const p=h[e],g=S?d/2:0,f=n.scale.convert(t)+C+g,m=r.scale.convert(i),v=r.scale.convert(s),y=r.scale.convert(l),b=r.scale.convert(c),w=s>i,x=w?"up":"down",E=Math.min(y,b),M=Math.max(y,b)-E,A={x:f,y:E+M/2};o.push({series:this,itemId:x,datum:p,datumIndex:e,xKey:a,xValue:t,openValue:i,closeValue:s,highValue:l,lowValue:c,midPoint:A,aggregatedValue:s,isRising:w,centerX:f,width:d,y:E,height:M,yOpen:m,yClose:v,crisp:u})},{dataAggregationFilters:E}=this,M=n.scale,[A,T]=M.range,D=T-A,I=e=>M.convert(d[e])+C,R=E?.find(e=>e.maxRange>D);if(null==R){let[e,t]=Qg(h.length,n.range,e=>{const t=I(e);return[t,t+b]});i.input.count<1e3&&(e=0,t=i.input.count);for(let i=e;i<t;i+=1){const e=d[i];if(null==e)continue;const t=u[i],n=p[i],r=g[i],o=f[i];null!=o&&o<=t&&o<=n?null!=r&&r>=t&&r>=n?x(i,e,t,n,r,o,b,!0):s.Vy.warnOnce(`invalid high value for key [${l}] in data element, high value cannot be lower than datum open or close values.`):s.Vy.warnOnce(`invalid low value for key [${c}] in data element, low value cannot be higher than datum open or close values`)}}else{const{maxRange:e,indexData:t}=R,[i,s]=Qg(e,n.range,e=>{const i=4*e,n=t[i+0],s=t[i+1];if(-1!==n)return[I(n),I(s)+b]});for(let e=i;e<s;e+=1){const i=4*e,n=t[i+0],s=t[i+1],r=t[i+3],o=t[i+2];if(-1===n)continue;const a=(n+s)/2|0,l=d[a];null!=l&&x(a,l,u[n],p[s],g[r],f[o],Math.abs(I(s)-I(n))+b,!1)}}return w}isVertical(){return!0}isLabelEnabled(){return!1}updateDatumSelection(e){const t=e.nodeData??[];return e.datumSelection.update(t)}updateLabelNodes(e){}updateLabelSelection(e){const{labelData:t,labelSelection:i}=e;return i.update(t)}getItemBaseStyle(e,t){const{properties:i}=this,n=i.item[e],s=t?i.highlightStyle.item:void 0,r={fill:s?.fill??n.fill,fillOpacity:s?.fillOpacity??n.fillOpacity,stroke:s?.stroke??n.stroke,strokeWidth:s?.strokeWidth??n.strokeWidth,strokeOpacity:s?.strokeOpacity??n.strokeOpacity,lineDash:s?.lineDash??n.lineDash,lineDashOffset:s?.lineDashOffset??n.lineDashOffset};return n.fillGradientDefaults&&n.fillPatternDefaults&&n.fillImageDefaults?nf(r,n.fillGradientDefaults,n.fillPatternDefaults,n.fillImageDefaults):r}getItemStyleOverrides(e,t,i,n,s){const{id:r,properties:o}=this,a=o.item[i],{itemStyler:l}=o;if(null==l)return;const{xKey:c,openKey:h,closeKey:d,highKey:u,lowKey:p}=o,g=this.cachedDatumCallback(Wg(e,s?"highlight":"node"),()=>this.callWithContext(l,{seriesId:r,datum:t,itemId:i,xKey:c,openKey:h,closeKey:d,highKey:u,lowKey:p,highlighted:s,...n}));return a.fillGradientDefaults&&a.fillPatternDefaults&&a.fillImageDefaults?nf(g,a.fillGradientDefaults,a.fillPatternDefaults,a.fillImageDefaults):g}getTooltipContent(e){const{id:t,dataModel:i,processedData:n,properties:s}=this,{xKey:r,xName:o,yName:a,openKey:l,openName:c,highKey:h,highName:d,lowKey:u,lowName:p,closeKey:g,closeName:f,legendItemName:m,tooltip:v}=s,y=this.getCategoryAxis(),C=this.getValueAxis();if(!(i&&n&&y&&C))return;const b=n.dataSources.get(this.id)?.[e],S=i.resolveKeysById(this,"xValue",n)[e],w=i.resolveColumnById(this,"openValue",n)[e],x=i.resolveColumnById(this,"highValue",n)[e],E=i.resolveColumnById(this,"lowValue",n)[e],M=i.resolveColumnById(this,"closeValue",n)[e];if(null==S)return;const A=M>=w?"up":"down",T=this.properties.item[A],D=this.getItemBaseStyle(A,!1);Object.assign(D,this.getItemStyleOverrides(String(e),b,A,D,!1));let I={fill:T.fill??T.stroke,fillOpacity:T.fillOpacity??T.strokeOpacity??1,stroke:T.stroke,strokeWidth:T.strokeWidth??1,strokeOpacity:T.strokeOpacity??1,lineDash:T.lineDash??[0],lineDashOffset:T.lineDashOffset??0};return T.fillGradientDefaults&&T.fillPatternDefaults&&T.fillImageDefaults&&(I=nf(I,T.fillGradientDefaults,T.fillPatternDefaults,T.fillImageDefaults)),this.formatTooltipWithContext(v,{heading:y.formatDatum(S),title:m,symbol:{marker:I},data:[{label:c,fallbackLabel:l,value:C.formatDatum(w)},{label:d,fallbackLabel:h,value:C.formatDatum(x)},{label:p,fallbackLabel:u,value:C.formatDatum(E)},{label:f,fallbackLabel:g,value:C.formatDatum(M)}]},{seriesId:t,datum:b,title:a,itemId:A,xKey:r,xName:o,yName:a,openKey:l,openName:c,highKey:h,highName:d,lowKey:u,lowName:p,closeKey:g,closeName:f,...D})}getDatumId(e){return Wg(e.xValue)}computeFocusBounds(e){const t=this.getNodeData()?.at(e.datumIndex);if(null==t)return;const{centerX:i,y:n,width:s,height:r}=t;return Zg(this,{x:i-s/2,y:n,width:s,height:r})}},{Path:of,SceneChangeDetection:af,BBox:lf}=n.n1,cf=class extends of{constructor(){super(...arguments),this.centerX=0,this.y=0,this.width=0,this.height=0,this.yOpen=0,this.yClose=0,this.crisp=!1,this.strokeAlignment=0}computeBBox(){const{centerX:e,y:t,width:i,height:n}=this;return new lf(e-i/2,t,i,n)}isPointInPath(e,t){return this.getBBox().containsPoint(e,t)}distanceSquared(e,t){return this.getBBox().distanceSquared(e,t)}get midPoint(){return{x:this.centerX,y:this.y+this.height/2}}alignedCoordinates(){const{y:e,width:t,height:i,crisp:n,strokeAlignment:s}=this;let{centerX:r,yOpen:o,yClose:a}=this,l=r-t/2,c=r+t/2,h=e,d=e+i;if(n&&t>1){r=this.align(r),o=this.align(o),a=this.align(a);const n=this.align(t/2);l=r-n,c=r+n,h=this.align(e),d=h+this.align(h,i)}const u=(h+d)/2;return r+=s,l+=s,c+=s,h-=s,d+=s,o+=o<u?s:-s,a+=a<u?s:-s,{centerX:r,x0:l,x1:c,y0:h,y1:d,yOpen:o,yClose:a}}executeStroke(e,t){const{width:i,strokeWidth:n}=this;i<n&&(e.lineWidth=i),super.executeStroke(e,t)}};a([af()],cf.prototype,"centerX",2),a([af()],cf.prototype,"y",2),a([af()],cf.prototype,"width",2),a([af()],cf.prototype,"height",2),a([af()],cf.prototype,"yOpen",2),a([af()],cf.prototype,"yClose",2),a([af()],cf.prototype,"crisp",2),a([af()],cf.prototype,"strokeAlignment",2);var hf=class extends cf{updatePath(){const{path:e}=this,{centerX:t,x0:i,x1:n,y0:s,y1:r,yOpen:o,yClose:a}=this.alignedCoordinates();e.clear(),e.moveTo(t,s),e.lineTo(t,r),Math.abs(n-i)>1&&(e.moveTo(i,o),e.lineTo(t,o),e.moveTo(t,a),e.lineTo(n,a))}},{SceneArrayChangeDetection:df,SceneChangeDetection:uf,ExtendedPath2D:pf,BBox:gf}=n.n1,ff=class extends cf{constructor(){super(...arguments),this.wickPath=new pf,this.wickStroke=void 0,this.wickStrokeWidth=void 0,this.wickStrokeOpacity=void 0}computeDefaultGradientFillBBox(){const{width:e,centerX:t,yOpen:i,yClose:n}=this,s=Math.min(i,n),r=Math.max(i,n),o=t-e/2;return new gf(o,s,t+e/2-o,r-s)}updatePath(){const{path:e,stroke:t,strokeWidth:i,strokeOpacity:n,lineDash:s,lineDashOffset:r,wickStroke:o,wickStrokeWidth:a,wickStrokeOpacity:l,wickLineDash:c,wickLineDashOffset:h,strokeAlignment:d}=this,{centerX:u,x0:p,x1:g,y0:f,y1:m,yOpen:v,yClose:y}=this.alignedCoordinates();this.path.clear(),this.wickPath.clear();const C=null!=o&&o!==t||null!=a&&a!==i||null!=l&&l!==n||null!=c&&c!==s||null!=h&&h!==r?this.wickPath:e;if(Math.abs(g-p)<=3)return C.moveTo(u,f),void C.lineTo(u,m);const b=Math.min(v,y),S=Math.max(v,y);C.moveTo(u,f),C.lineTo(u,b+i/2),C.moveTo(u,m),C.lineTo(u,S-i/2);const w=d+i/2,x=S-b-2*w;if(x>0)e.rect(p+w,b+w,g-p-2*w,x);else{const t=(b+S)/2;e.moveTo(p,t),e.lineTo(g,t)}}drawPath(e){super.drawPath(e);const{wickPath:t}=this;if(t.isEmpty())return;const{stroke:i,strokeWidth:n,strokeOpacity:s,lineDash:r,lineDashOffset:o,wickStroke:a=i,wickStrokeWidth:l=n,wickStrokeOpacity:c=s,wickLineDash:h=r,wickLineDashOffset:d=o}=this;0!==l&&(e.globalAlpha*=c,"string"==typeof a&&(e.strokeStyle=a),e.lineWidth=l,null!=h&&e.setLineDash([...h]),e.lineDashOffset=d,e.stroke(t.getPath2D()))}};a([uf()],ff.prototype,"wickStroke",2),a([uf()],ff.prototype,"wickStrokeWidth",2),a([uf()],ff.prototype,"wickStrokeOpacity",2),a([df()],ff.prototype,"wickLineDash",2),a([uf()],ff.prototype,"wickLineDashOffset",2);var{BaseProperties:mf,Property:vf,AbstractBarSeriesProperties:yf,SeriesTooltip:Cf}=n.n1,bf=class extends mf{constructor(){super(...arguments),this.stroke="#333",this.strokeWidth=1,this.strokeOpacity=1,this.lineDash=[0],this.lineDashOffset=0}};a([vf],bf.prototype,"stroke",2),a([vf],bf.prototype,"strokeWidth",2),a([vf],bf.prototype,"strokeOpacity",2),a([vf],bf.prototype,"lineDash",2),a([vf],bf.prototype,"lineDashOffset",2);var Sf=class extends mf{constructor(){super(...arguments),this.up=new bf,this.down=new bf}};a([vf],Sf.prototype,"up",2),a([vf],Sf.prototype,"down",2);var wf=class extends yf{};a([vf],wf.prototype,"xKey",2),a([vf],wf.prototype,"openKey",2),a([vf],wf.prototype,"closeKey",2),a([vf],wf.prototype,"highKey",2),a([vf],wf.prototype,"lowKey",2),a([vf],wf.prototype,"xName",2),a([vf],wf.prototype,"yName",2),a([vf],wf.prototype,"openName",2),a([vf],wf.prototype,"closeName",2),a([vf],wf.prototype,"highName",2),a([vf],wf.prototype,"lowName",2);var xf=class extends wf{constructor(){super(...arguments),this.tooltip=new Cf,this.item=new Sf}};a([vf],xf.prototype,"tooltip",2),a([vf],xf.prototype,"item",2),a([vf],xf.prototype,"itemStyler",2);var{FillGradientDefaults:Ef,FillPatternDefaults:Mf,FillImageDefaults:Af,BaseProperties:Tf,SeriesTooltip:Df,Property:If}=n.n1,Rf=class extends Tf{};a([If],Rf.prototype,"stroke",2),a([If],Rf.prototype,"strokeWidth",2),a([If],Rf.prototype,"strokeOpacity",2),a([If],Rf.prototype,"lineDash",2),a([If],Rf.prototype,"lineDashOffset",2);var Lf=class extends Tf{constructor(){super(...arguments),this.fill="#c16068",this.fillGradientDefaults=new Ef,this.fillPatternDefaults=new Mf,this.fillImageDefaults=new Af,this.fillOpacity=1,this.stroke="#333",this.strokeWidth=1,this.strokeOpacity=1,this.lineDash=[0],this.lineDashOffset=0,this.cornerRadius=0,this.wick=new Rf}};a([If],Lf.prototype,"fill",2),a([If],Lf.prototype,"fillGradientDefaults",2),a([If],Lf.prototype,"fillPatternDefaults",2),a([If],Lf.prototype,"fillImageDefaults",2),a([If],Lf.prototype,"fillOpacity",2),a([If],Lf.prototype,"stroke",2),a([If],Lf.prototype,"strokeWidth",2),a([If],Lf.prototype,"strokeOpacity",2),a([If],Lf.prototype,"lineDash",2),a([If],Lf.prototype,"lineDashOffset",2),a([If],Lf.prototype,"cornerRadius",2),a([If],Lf.prototype,"wick",2);var kf=class extends Tf{constructor(){super(...arguments),this.up=new Lf,this.down=new Lf}};a([If],kf.prototype,"up",2),a([If],kf.prototype,"down",2);var Pf=class extends wf{constructor(){super(...arguments),this.item=new kf,this.tooltip=new Df}};a([If],Pf.prototype,"item",2),a([If],Pf.prototype,"tooltip",2),a([If],Pf.prototype,"itemStyler",2);var{createDatumId:Nf,isGradientFill:Of,isPatternFill:_f,isImageFill:Ff,getShapeFill:Gf,applyShapeStyle:Vf,getShapeStyle:Bf}=n.n1,Hf=class extends rf{constructor(){super(...arguments),this.properties=new Pf}nodeFactory(){return new ff}updateDatumNodes({datumSelection:e,isHighlight:t}){const{id:i,properties:n}=this,{xKey:s,highKey:r,lowKey:o,openKey:a,closeKey:l,item:c,itemStyler:h}=n,{up:d,down:u}=c,p=Bf({fill:d.fill,fillOpacity:d.fillOpacity,stroke:d.stroke,strokeWidth:d.strokeWidth,strokeOpacity:d.strokeOpacity,lineDash:d.lineDash,lineDashOffset:d.lineDashOffset},d.fillGradientDefaults,d.fillPatternDefaults,d.fillImageDefaults),g=Bf({fill:u.fill,fillOpacity:u.fillOpacity,stroke:u.stroke,strokeWidth:u.strokeWidth,strokeOpacity:u.strokeOpacity,lineDash:u.lineDash,lineDashOffset:u.lineDashOffset},u.fillGradientDefaults,u.fillPatternDefaults,u.fillImageDefaults),f=t?n.highlightStyle.item:void 0;e.each((e,n)=>{const{isRising:c,centerX:m,width:v,y,height:C,yOpen:b,yClose:S,crisp:w}=n;let x;if(null!=h){const{fill:e,fillOpacity:f,stroke:m,strokeWidth:v,strokeOpacity:y,lineDash:C,lineDashOffset:b}=c?p:g;x=Bf(this.cachedDatumCallback(Nf(this.getDatumId(n),t?"highlight":"node"),()=>this.callWithContext(h,{seriesId:i,itemId:n.itemId,xKey:s,highKey:r,lowKey:o,openKey:a,closeKey:l,datum:n.datum,fill:e,fillOpacity:f,strokeOpacity:y,stroke:m,strokeWidth:v,lineDash:C,lineDashOffset:b,highlighted:t})),c?d.fillGradientDefaults:u.fillGradientDefaults,c?d.fillPatternDefaults:u.fillPatternDefaults,c?d.fillImageDefaults:u.fillImageDefaults)}e.centerX=m,e.width=v,e.y=y,e.height=C,e.yOpen=b,e.yClose=S,e.crisp=w;const E=c?p:g,M=c?d.wick:u.wick;Vf(e,{fill:f?.fill??x?.fill??E.fill,fillOpacity:f?.fillOpacity??x?.fillOpacity??E.fillOpacity,stroke:f?.stroke??x?.stroke??E.stroke,strokeWidth:f?.strokeWidth??x?.strokeWidth??E.strokeWidth,strokeOpacity:f?.strokeOpacity??x?.strokeOpacity??E.strokeOpacity,lineDash:f?.lineDash??x?.lineDash??E.lineDash,lineDashOffset:f?.lineDashOffset??x?.lineDashOffset??E.lineDashOffset},void 0,this.getShapeFillBBox());const A=x?.wick;e.wickStroke=f?.stroke??A?.stroke??M.stroke,e.wickStrokeWidth=f?.strokeWidth??A?.strokeWidth??M.strokeWidth,e.wickStrokeOpacity=f?.strokeOpacity??A?.strokeOpacity??M.strokeOpacity,e.wickLineDash=f?.lineDash??A?.lineDash??M.lineDash,e.wickLineDashOffset=f?.lineDashOffset??A?.lineDashOffset??M.lineDashOffset,e.strokeAlignment=(x?.strokeWidth??E.strokeWidth)/2})}legendItemSymbol(){const{up:e,down:t}=this.properties.item,i=Gf(e.fill,e.fillGradientDefaults,e.fillPatternDefaults,e.fillImageDefaults),n=Of(i)?i.colorStops.map(e=>"string"==typeof e?e:{color:e.color,stop:null!=e.stop?.5*e.stop:void 0}):[{color:_f(i)||Ff(i)?e.stroke:i,stop:0},{color:_f(i)||Ff(i)?e.stroke:i,stop:.5}],s=Gf(t.fill,t.fillGradientDefaults,t.fillPatternDefaults,t.fillImageDefaults),r={type:"gradient",gradient:"linear",rotation:90,colorStops:[...n,...Of(s)?s.colorStops.map(e=>"string"==typeof e?e:{color:e.color,stop:null!=e.stop?.5*e.stop:void 0}):[{color:_f(s)||Ff(s)?t.stroke:s,stop:.5}]],reverse:!1},o={type:"gradient",gradient:"linear",rotation:90,colorStops:[{color:e.stroke,stop:0},{color:e.stroke,stop:.5},{color:t.stroke,stop:.5}],reverse:!1};return{marker:{fill:r,fillOpacity:e.fillOpacity,stroke:o,strokeWidth:e.strokeWidth??1,strokeOpacity:e.strokeOpacity??1,lineDash:e.lineDash,lineDashOffset:e.lineDashOffset}}}getLegendData(e){const{id:t,data:i,visible:n,ctx:{legendManager:s}}=this,{xKey:r,yName:o,showInLegend:a,legendItemName:l}=this.properties;return i?.length&&r&&"category"===e?[{legendType:"category",id:t,itemId:t,seriesId:t,enabled:n&&s.getItemEnabled({seriesId:t,itemId:t}),label:{text:l??o??t},symbol:this.legendItemSymbol(),legendItemName:l,hideInLegend:!a}]:[]}};Hf.className="CandleStickSeries",Hf.type="candlestick";var{commonSeriesOptionsDefs:zf,candlestickSeriesThemeableOptionsDef:Uf}=n.n1,Wf={...Uf,...zf,type:(0,s.mw)((0,s.dY)("candlestick")),xKey:(0,s.mw)(s.Yj),openKey:(0,s.mw)(s.Yj),highKey:(0,s.mw)(s.Yj),lowKey:(0,s.mw)(s.Yj),closeKey:(0,s.mw)(s.Yj),xName:s.Yj,yName:s.Yj,openName:s.Yj,highName:s.Yj,lowName:s.Yj,closeName:s.Yj};Wf.pickOutsideVisibleMinorAxis=(0,s._L)(s.zM),Wf.focusPriority=(0,s._L)(s.ai);var{CARTESIAN_AXIS_TYPE:jf}=n.n1.ThemeConstants;function Kf(e){return{fill:{$if:[{$eq:[{$palette:"type"},"user-indexed"]},"up"===e?"transparent":{$palette:"fill"},{$palette:`${e}.fill`}]},stroke:{$if:[{$eq:[{$palette:"type"},"user-indexed"]},{$palette:"stroke"},{$palette:`${e}.stroke`}]},fillGradientDefaults:{type:"gradient",gradient:"linear",bounds:"item",colorStops:{$if:[{$or:[{$isGradient:[{$palette:`${e}.fill`}]},{$isPattern:[{$palette:`${e}.fill`}]},{$isImage:[{$palette:`${e}.fill`}]}]},{$map:[{$path:["./color",void 0,{$value:"$1"}]},{$path:["./colorStops",void 0,{$palette:`${e}.fill`}]}]},[{$mix:[{$palette:`${e}.fill`},"black",.15]},{$mix:[{$palette:`${e}.fill`},"white",.15]}]]},rotation:0,reverse:!1},fillPatternDefaults:n.n1.FILL_PATTERN_DEFAULTS,fillImageDefaults:n.n1.FILL_IMAGE_DEFAULTS}}var $f={series:{item:{up:Kf("up"),down:Kf("down")},highlightStyle:{item:{strokeWidth:3}}},animation:{enabled:!1},axes:{[jf.NUMBER]:{crosshair:{snap:!1}},[jf.ORDINAL_TIME]:{groupPaddingInner:0,crosshair:{enabled:!0}}}},{CARTESIAN_AXIS_TYPE:Yf,CARTESIAN_POSITION:qf}=n.n1.ThemeConstants,Xf={type:"series",optionsKey:"series[]",packageType:"enterprise",chartTypes:["cartesian"],identifier:"candlestick",moduleFactory:e=>new Hf(e),tooltipDefaults:{range:"nearest"},defaultAxes:[{type:Yf.NUMBER,position:qf.LEFT},{type:Yf.ORDINAL_TIME,position:qf.BOTTOM}],themeTemplate:$f,groupable:!1},Zf={type:"series",name:"candlestick",chartType:"cartesian",enterprise:!0,options:Wf,create:e=>new Hf(e)},{CachedTextMeasurerPool:Qf,TextUtils:Jf,TextWrapper:em}=n.n1;function tm(e,t){return null!=e.lineHeight&&null!=e.fontSize?e.lineHeight*t/e.fontSize:Jf.getLineHeight(t)}function im(e,t,i,n,{padding:r},o){const{spacing:a=0}=t,l=2*r,c=2*r+a,h=(t.minimumFontSize??t.fontSize)+(n.minimumFontSize??n.fontSize);if(h>o(h+c,!1).height-c)return;const d=function(e,t){const{fontSize:i,minimumFontSize:n=i}=e,{fontSize:s,minimumFontSize:r=s}=t,o=i-n,a=s-r;let l=e.fontSize,c=t.fontSize;const h=[{labelFontSize:i,secondaryLabelFontSize:s}];for(;l>n||c>r;)(o>0?(l-n)/o:-1)>(a>0?(c-r)/a:-1)?l--:c--,h.push({labelFontSize:l,secondaryLabelFontSize:c});return h.reverse(),h}(t,n),u={fontFamily:t.fontFamily,fontSize:t.fontSize,fontStyle:t.fontStyle,fontWeight:t.fontWeight},p={fontFamily:n.fontFamily,fontSize:n.fontSize,fontStyle:n.fontStyle,fontWeight:n.fontWeight};let g,f;return(0,s.F4)(0,d.length-1,s=>{const{labelFontSize:r,secondaryLabelFontSize:h}=d[s],m=0===s,v=tm(t,r),y=tm(n,h),C=o(v+y+c,m),b=C.width-l,S=C.height-c;if(v+y>S)return;if(null!=g&&g.fontSize===r||(u.fontSize=r,g=om(t,e,b,S,u,t.wrapping,m?t.overflowStrategy:"hide")),null==g||g.width>b||g.height>S)return;if(null!=f&&f.fontSize===h||(p.fontSize=h,f=om(n,i,b,S,p,n.wrapping,m?n.overflowStrategy:"hide")),null==f)return;const w=g.height+f.height;return f.width>b||w>S?void 0:{width:Math.max(g.width,f.width),height:w+a,meta:C.meta,label:g,secondaryLabel:f}})}function nm(e,t,{padding:i},n){const r=2*i,o=Math.min(t.minimumFontSize??t.fontSize,t.fontSize),a={fontFamily:t.fontFamily,fontSize:t.fontSize,fontStyle:t.fontStyle,fontWeight:t.fontWeight};return(0,s.F4)(o,t.fontSize,i=>{const s=tm(t,i),l=i===o,c=n(s+r,l),h=c.width-r,d=c.height-r;if(s>d)return;a.fontSize=i;const u=em.wrapLines(e,{maxWidth:h,maxHeight:d,font:a,textWrap:t.wrapping,overflow:(l?t.overflowStrategy:void 0)??"hide"});if(!u.length)return;const p=function(e,{font:t,lineHeight:i=Jf.defaultLineHeight,maxWidth:n,maxHeight:s=1/0}){let r=i*e.length;for(;r>s;){if(1===e.length)return;e.pop(),e[e.length-1]=em.appendEllipsis(e.at(-1)),r=i*e.length}const o=Qf.measureLines(e,{font:t});let a,l;if(o.width>n){const e=[];l=0;for(const t of o.lineMetrics){if(t.width>n){if(!e.length)return;break}e.push(t.text),l=Math.max(l,t.width)}a=em.appendEllipsis(e.join("\n"))}else a=e.join("\n"),l=o.width;return{text:a,width:l,height:r}}(u,{lineHeight:s,font:a,maxWidth:h,maxHeight:d});return p?[{fontSize:i,lineHeight:s,...p},c.meta]:void 0})}function sm(e){return null!=e?.minimumFontSize&&null!=e?.fontSize&&e?.minimumFontSize>e?.fontSize}function rm(e,t,i,n,r,o){const a=t.enabled?e:void 0,l=n.enabled?i:void 0;let c,h,d;if((sm(t)||sm(n))&&s.Vy.warnOnce("minimumFontSize should be set to a value less than or equal to the font size"),null!=a&&null!=l&&(c=im(a,t,l,n,r,o)),null==c&&null!=a&&(h=nm(a,t,r,o)),null!=h){const[e,t]=h;c={width:e.width,height:e.height,meta:t,label:e,secondaryLabel:void 0}}if(null==c&&null==a&&null!=l&&(d=nm(l,n,r,o)),null!=d){const[e,t]=d;c={width:e.width,height:e.height,meta:t,label:void 0,secondaryLabel:e}}return c}function om(e,t,i,n,s,r,o){const a=em.wrapLines(t,{maxWidth:i,maxHeight:n,font:s,textWrap:r,overflow:o});if(!a.length)return;const l=tm(e,s.fontSize),{width:c}=Qf.measureLines(a,{font:s});return{width:c,lineHeight:l,text:a.join("\n"),height:a.length*l,fontSize:s.fontSize}}var{Property:am}=n.n1,lm=class extends n.n1.Label{constructor(){super(...arguments),this.wrapping="on-space",this.overflowStrategy="ellipsis"}};a([am],lm.prototype,"wrapping",2),a([am],lm.prototype,"overflowStrategy",2),a([am],lm.prototype,"lineHeight",2),a([am],lm.prototype,"minimumFontSize",2);var cm=class extends lm{constructor(){super(...arguments),this.spacing=0}};a([am],cm.prototype,"spacing",2);var hm=class extends lm{},{CartesianSeriesProperties:dm,SeriesTooltip:um,Property:pm}=n.n1,gm=class extends dm{constructor(){super(...arguments),this.colorRange=["black","black"],this.stroke="black",this.strokeOpacity=1,this.strokeWidth=0,this.textAlign="center",this.verticalAlign="middle",this.itemPadding=0,this.label=new cm,this.tooltip=new um}};a([pm],gm.prototype,"title",2),a([pm],gm.prototype,"xKey",2),a([pm],gm.prototype,"yKey",2),a([pm],gm.prototype,"colorKey",2),a([pm],gm.prototype,"xName",2),a([pm],gm.prototype,"yName",2),a([pm],gm.prototype,"colorName",2),a([pm],gm.prototype,"colorRange",2),a([pm],gm.prototype,"stroke",2),a([pm],gm.prototype,"strokeOpacity",2),a([pm],gm.prototype,"strokeWidth",2),a([pm],gm.prototype,"textAlign",2),a([pm],gm.prototype,"verticalAlign",2),a([pm],gm.prototype,"itemPadding",2),a([pm],gm.prototype,"itemStyler",2),a([pm],gm.prototype,"label",2),a([pm],gm.prototype,"tooltip",2);var{SeriesNodePickMode:fm,computeBarFocusBounds:mm,getMissCount:vm,valueProperty:ym,ChartAxisDirection:Cm,DEFAULT_CARTESIAN_DIRECTION_KEYS:bm,DEFAULT_CARTESIAN_DIRECTION_NAMES:Sm,createDatumId:wm,ColorScale:xm,Rect:Em,PointerEvents:Mm,applyShapeStyle:Am}=n.n1,Tm=class extends n.n1.CartesianSeriesNodeEvent{constructor(e,t,i,n){super(e,t,i,n),this.colorKey=n.properties.colorKey}},Dm={left:-.5,center:0,right:-.5},Im={top:-.5,middle:0,bottom:-.5},Rm=class extends n.n1.CartesianSeries{constructor(e){super({moduleCtx:e,directionKeys:bm,directionNames:Sm,categoryKey:void 0,pickModes:[fm.NEAREST_NODE,fm.EXACT_SHAPE_MATCH],pathsPerSeries:[],hasMarkers:!1,hasHighlightedLabels:!0}),this.properties=new gm,this.NodeEvent=Tm,this.colorScale=new xm}async processData(e){const t=this.axes[Cm.X],i=this.axes[Cm.Y];if(!t||!i||!this.data?.length)return;const{xKey:n,yKey:s,colorRange:r,colorKey:o}=this.properties,a=this.axes[Cm.X]?.scale,l=this.axes[Cm.Y]?.scale,{xScaleType:c,yScaleType:h}=this.getScaleInformation({xScale:a,yScale:l}),d=this.colorScale.type,{dataModel:u,processedData:p}=await this.requestDataModel(e,this.data,{props:[ym(n,c,{id:"xValue"}),ym(s,h,{id:"yValue"}),...o?[ym(o,d,{id:"colorValue",invalidValue:null})]:[]]});if(this.isColorScaleValid()){const e=u.resolveProcessedDataIndexById(this,"colorValue");this.colorScale.domain=p.domain.values[e],this.colorScale.range=r,this.colorScale.update()}}isColorScaleValid(){const{colorKey:e}=this.properties;if(!e)return!1;const{dataModel:t,processedData:i}=this;if(!t||!i)return!1;const n=t.resolveProcessedDataIndexById(this,"colorValue"),s=i.input.count,r=vm(this,i.defs.values[n].missing);return!(0===s||s===r)}xCoordinateRange(e,t){const i=this.axes[Cm.X].scale,n=t*(i.bandwidth??0)/2,s=i.convert(e)+n;return[s,s+t*(i.bandwidth??10)]}yCoordinateRange(e,t){const i=this.axes[Cm.Y].scale,n=t*(i.bandwidth??0)/2,s=i.convert(e[0])+n;return[s,s+t*(i.bandwidth??10)]}getSeriesDomain(e){const{dataModel:t,processedData:i}=this;return t&&i?e===Cm.X?t.getDomain(this,"xValue","value",i):t.getDomain(this,"yValue","value",i):[]}getSeriesRange(e,t){return[NaN,NaN]}createNodeData(){const{data:e,visible:t,axes:i,dataModel:n,processedData:r}=this,o=i[Cm.X],a=i[Cm.Y];if(!(e&&n&&r&&t&&o&&a))return;if("category"!==o.type||"category"!==a.type)return void s.Vy.warnOnce(`Heatmap series expected axes to have "category" type, but received "${o.type}" and "${a.type}" instead.`);const{xKey:l,xName:c,yKey:h,yName:d,colorKey:u,colorName:p,textAlign:g,verticalAlign:f,itemPadding:m,label:v}=this.properties,y=n.resolveColumnById(this,"xValue",r),C=n.resolveColumnById(this,"yValue",r),b=u?n.resolveColumnById(this,"colorValue",r):void 0,S=o.scale,w=a.scale,x=(S.bandwidth??0)/2,E=(w.bandwidth??0)/2,M=[],A=[],T=S.bandwidth??10,D=w.bandwidth??10,I=(T-2*m)*Dm[g],R=(D-2*m)*Im[f],L=()=>({width:T,height:D,meta:null});return(r.dataSources.get(this.id)??[]).forEach((e,t)=>{const i=y[t],n=C[t],s=S.convert(i)+x,r=w.convert(n)+E,o=b?.[t],a=rm(null==o?void 0:this.getLabelText(v,{value:o,datum:e,colorKey:u,colorName:p,xKey:l,yKey:h,xName:c,yName:d}),this.properties.label,void 0,this.properties.label,{padding:m},L),k={x:s,y:r,size:0};if(M.push({series:this,itemId:h,datumIndex:t,yKey:h,xKey:l,xValue:i,yValue:n,colorValue:o,datum:e,point:k,width:T,height:D,midPoint:{x:s,y:r},missing:null!=b&&null==o}),null!=a?.label){const{text:i,fontSize:n,lineHeight:s,height:r}=a.label,{fontStyle:o,fontFamily:l,fontWeight:c,color:d}=this.properties.label,u=k.x+I*(T-2*m),p=k.y+R*(D-2*m)-.5*(a.height-r);A.push({series:this,itemId:h,datum:e,datumIndex:t,text:i,fontSize:n,lineHeight:s,fontStyle:o,fontFamily:l,fontWeight:c,color:d,textAlign:g,verticalAlign:f,x:u,y:p})}}),{itemId:this.properties.yKey??this.id,nodeData:M,labelData:A,scales:this.calculateScaling(),visible:this.visible}}nodeFactory(){return new Em}update(e){return this.ctx.animationManager.skipCurrentBatch(),super.update(e)}updateDatumSelection(e){const{nodeData:t,datumSelection:i}=e,n=t??[];return i.update(n)}getItemBaseStyle(e){const{properties:t}=this,i=e?t.highlightStyle.item:void 0;return{fill:i?.fill,fillOpacity:i?.fillOpacity??1,stroke:i?.stroke??t.stroke,strokeWidth:i?.strokeWidth??this.getStrokeWidth(t.strokeWidth),strokeOpacity:i?.strokeOpacity??t.strokeOpacity}}getItemStyleOverrides(e,t,i,n,s){const{id:r,properties:o}=this,{xKey:a,yKey:l,itemStyler:c}=o,h=this.isColorScaleValid()&&null!=i?this.colorScale.convert(i):"transparent";let d=null==n.fill?{fill:h}:void 0;if(null!=c){d??(d={});const i=this.cachedDatumCallback(wm(e,s?"highlight":"node"),()=>this.callWithContext(c,{seriesId:r,datum:t,xKey:a,yKey:l,highlighted:s,...n,fill:h}));Object.assign(d,i)}return d}updateDatumNodes(e){const{isHighlight:t}=e,i=this.axes[Cm.X],[n,s]=i?.visibleRange??[],r=!(0!==n||1!==s),o=this.getItemBaseStyle(t);e.datumSelection.each((e,i)=>{const{datumIndex:n,colorValue:s,datum:a,point:l,width:c,height:h}=i,d=this.getItemStyleOverrides(String(n),a,s,o,t);e.crisp=r,e.x=Math.floor(l.x-c/2),e.y=Math.floor(l.y-h/2),e.width=Math.ceil(c),e.height=Math.ceil(h),Am(e,o,d)})}updateLabelSelection(e){const{labelData:t,labelSelection:i}=e,{enabled:n}=this.properties.label,s=n?t:[];return i.update(s)}updateLabelNodes(e){e.labelSelection.each((e,t)=>{e.text=t.text,e.fontSize=t.fontSize,e.lineHeight=t.lineHeight,e.fontStyle=t.fontStyle,e.fontFamily=t.fontFamily,e.fontWeight=t.fontWeight,e.fill=t.color,e.textAlign=t.textAlign,e.textBaseline=t.verticalAlign,e.x=t.x,e.y=t.y,e.pointerEvents=Mm.None})}getTooltipContent(e){const{id:t,dataModel:i,processedData:n,axes:s,properties:r,colorScale:o}=this,{xKey:a,xName:l,yKey:c,yName:h,colorKey:d,colorName:u,colorRange:p,title:g,legendItemName:f,tooltip:m}=r,v=s[Cm.X],y=s[Cm.Y];if(!(i&&n&&v&&y))return;const C=n.dataSources.get(this.id)?.[e],b=i.resolveColumnById(this,"xValue",n)[e],S=i.resolveColumnById(this,"yValue",n)[e],w=null!=d&&this.isColorScaleValid()?i.resolveColumnById(this,"colorValue",n)[e]:void 0;if(null==b)return;const x=[];let E;null==w?E=p[0]:(E=o.convert(w),x.push({label:u,fallbackLabel:d,value:String(w)})),x.push({label:l,fallbackLabel:a,value:v.formatDatum(b)},{label:h,fallbackLabel:c,value:y.formatDatum(S)});const M=this.getItemBaseStyle(!1);Object.assign(M,this.getItemStyleOverrides(String(e),C,w,M,!1)),null!=M.fill&&(E=M.fill);const A=null!=E?{marker:{shape:"square",fill:E,fillOpacity:1,stroke:void 0,strokeWidth:0,strokeOpacity:1,lineDash:[0],lineDashOffset:0}}:void 0;return this.formatTooltipWithContext(m,{title:g??f,symbol:A,data:x},{seriesId:t,datum:C,title:g,xKey:a,xName:l,yKey:c,yName:h,colorKey:d,colorName:u,...M})}getLegendData(e){return"gradient"===e&&this.isColorScaleValid()&&this.dataModel?[{legendType:"gradient",enabled:this.visible,seriesId:this.id,colorName:this.properties.colorName,colorDomain:this.processedData.domain.values[this.dataModel.resolveProcessedDataIndexById(this,"colorValue")],colorRange:this.properties.colorRange}]:[]}isLabelEnabled(){return this.properties.label.enabled&&Boolean(this.properties.colorKey)}getBandScalePadding(){return{inner:0,outer:0}}computeFocusBounds({datumIndex:e}){const t=this.contextNodeData?.nodeData[e];if(void 0===t)return;const{width:i,height:n,midPoint:s}=t,r={x:s.x-i/2,y:s.y-n/2,width:i,height:n};return mm(this,r)}};Rm.className="HeatmapSeries",Rm.type="heatmap";var{commonSeriesOptionsDefs:Lm,heatmapSeriesThemeableOptionsDef:km}=n.n1,Pm={...km,...Lm,type:(0,s.mw)((0,s.dY)("heatmap")),xKey:(0,s.mw)(s.Yj),yKey:(0,s.mw)(s.Yj),colorKey:s.Yj,xName:s.Yj,yName:s.Yj,colorName:s.Yj,colorRange:(0,s.jk)(s.yW)},Nm={series:{stroke:{$if:[{$eq:[{$palette:"type"},"inbuilt"]},{$ref:"backgroundColor"},{$path:["./0",{$palette:"stroke"},{$palette:"strokes"}]}]},colorRange:{$if:[{$eq:[{$palette:"type"},"inbuilt"]},{$palette:"divergingColors"},n.n1.SAFE_RANGE2_OPERATION]},label:{enabled:!1,color:{$ref:"textColor"},fontSize:{$ref:"fontSize"},fontFamily:{$ref:"fontFamily"},fontWeight:{$ref:"fontWeight"},wrapping:"on-space",overflowStrategy:"ellipsis"},itemPadding:3},gradientLegend:{enabled:!0}},{ThemeConstants:{CARTESIAN_AXIS_TYPE:Om,CARTESIAN_POSITION:_m}}=n.n1,Fm={type:"series",optionsKey:"series[]",packageType:"enterprise",chartTypes:["cartesian"],identifier:"heatmap",moduleFactory:e=>new Rm(e),tooltipDefaults:{range:"exact"},defaultAxes:[{type:Om.CATEGORY,position:_m.LEFT},{type:Om.CATEGORY,position:_m.BOTTOM}],themeTemplate:Nm},Gm={type:"series",name:"heatmap",chartType:"cartesian",enterprise:!0,options:Pm,create:e=>new Rm(e)},{createDatumId:Vm}=n.n1,Bm=class extends rf{constructor(){super(...arguments),this.properties=new xf}nodeFactory(){return new hf}updateDatumNodes({datumSelection:e,isHighlight:t}){const{id:i,properties:n}=this,{xKey:s,highKey:r,lowKey:o,openKey:a,closeKey:l,item:c,itemStyler:h}=n,{up:d,down:u}=c,{stroke:p,strokeWidth:g,strokeOpacity:f,lineDash:m,lineDashOffset:v}=d,{stroke:y,strokeWidth:C,strokeOpacity:b,lineDash:S,lineDashOffset:w}=u,x=t?n.highlightStyle.item:void 0;e.each((e,n)=>{const{isRising:c,centerX:E,width:M,y:A,height:T,yOpen:D,yClose:I,crisp:R}=n;let L;if(null!=h){const{stroke:e,strokeWidth:p,strokeOpacity:g,lineDash:f,lineDashOffset:m}=c?d:u;L=this.cachedDatumCallback(Vm(this.getDatumId(n),t?"highlight":"node"),()=>this.callWithContext(h,{seriesId:i,itemId:n.itemId,xKey:s,highKey:r,lowKey:o,openKey:a,closeKey:l,datum:n.datum,strokeOpacity:g,stroke:e,strokeWidth:p,lineDash:f,lineDashOffset:m,highlighted:t}))}e.centerX=E,e.width=M,e.y=A,e.height=T,e.yOpen=D,e.yClose=I,e.crisp=R,e.stroke=x?.stroke??L?.stroke??(c?p:y),e.strokeWidth=x?.strokeWidth??L?.strokeWidth??(c?g:C),e.strokeOpacity=x?.strokeOpacity??L?.strokeOpacity??(c?f:b),e.lineDash=x?.lineDash??L?.lineDash??(c?m:S),e.lineDashOffset=x?.lineDashOffset??L?.lineDashOffset??(c?v:w),e.strokeAlignment=(L?.strokeWidth??(c?g:C))/2})}getLegendData(e){const{id:t,data:i,ctx:{legendManager:n},visible:s}=this,{xKey:r,yName:o,item:{up:a,down:l},showInLegend:c,legendItemName:h}=this.properties;if(!i?.length||!r||"category"!==e)return[];const d={type:"gradient",gradient:"linear",colorSpace:"rgb",colorStops:[{color:a.stroke,stop:0},{color:a.stroke,stop:.5},{color:l.stroke,stop:.5}],rotation:90};return[{legendType:"category",id:t,itemId:t,seriesId:t,enabled:s&&n.getItemEnabled({seriesId:t,itemId:t}),label:{text:h??o??t},symbol:{marker:{fill:d,fillOpacity:a.strokeOpacity,stroke:void 0,strokeWidth:0,strokeOpacity:1,lineDash:[0],lineDashOffset:0}},legendItemName:h,hideInLegend:!c}]}};Bm.className="ohlc",Bm.type="ohlc";var{commonSeriesOptionsDefs:Hm,ohlcSeriesThemeableOptionsDef:zm}=n.n1,Um={...zm,...Hm,type:(0,s.mw)((0,s.dY)("ohlc")),xKey:(0,s.mw)(s.Yj),openKey:(0,s.mw)(s.Yj),highKey:(0,s.mw)(s.Yj),lowKey:(0,s.mw)(s.Yj),closeKey:(0,s.mw)(s.Yj),xName:s.Yj,yName:s.Yj,openName:s.Yj,highName:s.Yj,lowName:s.Yj,closeName:s.Yj};Um.pickOutsideVisibleMinorAxis=(0,s._L)(s.zM),Um.focusPriority=(0,s._L)(s.ai);var{CARTESIAN_AXIS_TYPE:Wm,CARTESIAN_POSITION:jm}=n.n1.ThemeConstants,Km={type:"series",optionsKey:"series[]",packageType:"enterprise",chartTypes:["cartesian"],identifier:"ohlc",moduleFactory:e=>new Bm(e),tooltipDefaults:{range:"nearest"},defaultAxes:[{type:Wm.NUMBER,position:jm.LEFT},{type:Wm.ORDINAL_TIME,position:jm.BOTTOM}],themeTemplate:{animation:{enabled:!1},series:{item:{up:{stroke:{$if:[{$eq:[{$palette:"type"},"user-indexed"]},{$palette:"stroke"},{$palette:"up.stroke"}]}},down:{stroke:{$if:[{$eq:[{$palette:"type"},"user-indexed"]},{$palette:"stroke"},{$palette:"down.stroke"}]}}}},axes:{[Wm.NUMBER]:{crosshair:{snap:!1}},[Wm.ORDINAL_TIME]:{groupPaddingInner:0,crosshair:{enabled:!0}}}},groupable:!1},$m={type:"series",name:"ohlc",chartType:"cartesian",enterprise:!0,options:Um,create:e=>new Bm(e)};function Ym(e,t,i,n,s,r){const o=e[r];return null!=o&&r===n[Vg(Gg(o,t,i),s)+3]}function qm(e,t,i,n,s,r){const o=e[r];return null!=o&&r===n[Vg(Gg(o,t,i),s)+2]}var{CartesianSeriesProperties:Xm,FillGradientDefaults:Zm,FillPatternDefaults:Qm,FillImageDefaults:Jm,InterpolationProperties:ev,SeriesMarker:tv,SeriesTooltip:iv,Property:nv,DropShadow:sv,Label:rv}=n.n1,ov=class extends rv{constructor(){super(...arguments),this.placement="outside",this.padding=6}};a([nv],ov.prototype,"placement",2),a([nv],ov.prototype,"padding",2);var av=class extends Xm{constructor(){super(...arguments),this.fill="#99CCFF",this.fillGradientDefaults=new Zm,this.fillPatternDefaults=new Qm,this.fillImageDefaults=new Jm,this.fillOpacity=1,this.stroke="#99CCFF",this.strokeWidth=1,this.strokeOpacity=1,this.lineDash=[0],this.lineDashOffset=0,this.interpolation=new ev,this.shadow=(new sv).set({enabled:!1}),this.marker=new tv,this.label=new ov,this.tooltip=new iv,this.connectMissingData=!1}};a([nv],av.prototype,"xKey",2),a([nv],av.prototype,"yLowKey",2),a([nv],av.prototype,"yHighKey",2),a([nv],av.prototype,"xName",2),a([nv],av.prototype,"yName",2),a([nv],av.prototype,"yLowName",2),a([nv],av.prototype,"yHighName",2),a([nv],av.prototype,"fill",2),a([nv],av.prototype,"fillGradientDefaults",2),a([nv],av.prototype,"fillPatternDefaults",2),a([nv],av.prototype,"fillImageDefaults",2),a([nv],av.prototype,"fillOpacity",2),a([nv],av.prototype,"stroke",2),a([nv],av.prototype,"strokeWidth",2),a([nv],av.prototype,"strokeOpacity",2),a([nv],av.prototype,"lineDash",2),a([nv],av.prototype,"lineDashOffset",2),a([nv],av.prototype,"interpolation",2),a([nv],av.prototype,"shadow",2),a([nv],av.prototype,"marker",2),a([nv],av.prototype,"label",2),a([nv],av.prototype,"tooltip",2),a([nv],av.prototype,"connectMissingData",2);var{CollapseMode:lv,isScaleValid:cv,pairUpSpans:hv,prepareAreaFillAnimationFns:dv,plotInterpolatedLinePathStroke:uv,prepareLinePathPropertyAnimation:pv,areScalingEqual:gv}=n.n1;var{valueProperty:fv,keyProperty:mv,ChartAxisDirection:vv,mergeDefaults:yv,updateLabelNode:Cv,fixNumericExtent:bv,buildResetPathFn:Sv,resetLabelFn:wv,resetMarkerFn:xv,resetMarkerPositionFn:Ev,pathSwipeInAnimation:Mv,resetMotion:Av,markerSwipeScaleInAnimation:Tv,seriesLabelFadeInAnimation:Dv,animationValidation:Iv,diff:Rv,updateClipPath:Lv,computeMarkerFocusBounds:kv,plotAreaPathFill:Pv,plotLinePathStroke:Nv,interpolatePoints:Ov,pathFadeInAnimation:_v,markerFadeInAnimation:Fv,fromToMotion:Gv,pathMotion:Vv,extent:Bv,createDatumId:Hv,applyShapeFillBBox:zv,PointerEvents:Uv,Group:Wv,BBox:jv,ContinuousScale:Kv,DiscreteTimeScale:$v,findMinMax:Yv,getShapeStyle:qv,getShapeFill:Xv,applyShapeStyle:Zv}=n.n1,Qv=class extends n.n1.SeriesNodeEvent{constructor(e,t,i,n){super(e,t,i,n),this.xKey=n.properties.xKey,this.yLowKey=n.properties.yLowKey,this.yHighKey=n.properties.yHighKey}},Jv=class extends n.n1.CartesianSeries{constructor(e){super({moduleCtx:e,hasMarkers:!0,pathsPerSeries:["fill","stroke"],pickModes:[n.n1.SeriesNodePickMode.AXIS_ALIGNED],directionKeys:{[vv.X]:["xKey"],[vv.Y]:["yLowKey","yHighKey"]},directionNames:{[vv.X]:["xName"],[vv.Y]:["yLowName","yHighName","yName"]},categoryKey:"xValue",animationResetFns:{path:Sv({getVisible:()=>this.visible,getOpacity:()=>this.getOpacity()}),label:wv,marker:(e,t)=>({...xv(e),...Ev(e,t)})},clipFocusBox:!1}),this.properties=new av,this.NodeEvent=Qv,this.dataAggregationFilters=void 0}async processData(e){const{xKey:t,yLowKey:i,yHighKey:n}=this.properties,s=this.axes[vv.X]?.scale,r=this.axes[vv.Y]?.scale,{xScaleType:o,yScaleType:a}=this.getScaleInformation({xScale:s,yScale:r}),l=[],c=!this.ctx.animationManager.isSkipped();!this.ctx.animationManager.isSkipped()&&this.processedData&&l.push(Rv(this.id,this.processedData)),c&&l.push(Iv());const{dataModel:h,processedData:d}=await this.requestDataModel(e,this.data,{props:[mv(t,o,{id:"xValue"}),fv(i,a,{id:"yLowValue"}),fv(n,a,{id:"yHighValue"}),...l]});this.dataAggregationFilters=this.aggregateData(h,d),this.animationState.transition("updateData")}aggregateData(e,t){const i=this.axes[vv.X];if(null==i||!Kv.is(i.scale)&&!$v.is(i.scale))return;const n=e.resolveKeysById(this,"xValue",t),s=e.resolveColumnById(this,"yHighValue",t),r=e.resolveColumnById(this,"yLowValue",t),{index:o}=e.resolveProcessedDataDefById(this,"xValue");return function(e,t,i,n){if(e.length<1e3)return;const[s,r]=Fg(n);let o=_g(e);const{indexData:a,valueData:l}=Bg(e,t,i,s,r,o);let c=[],h=[];for(let t=0;t<e.length;t+=1)Ym(e,s,r,a,o,t)&&c.push(t),qm(e,s,r,a,o,t)&&h.push(t);const d=[{maxRange:o,topIndices:c,bottomIndices:h}];for(;o>64;)({maxRange:o}=Hg(a,l,o,{inPlace:!0})),c=c.filter(Ym.bind(null,e,s,r,a,o)),h=h.filter(qm.bind(null,e,s,r,a,o)),d.push({maxRange:o,topIndices:c,bottomIndices:h});return d.reverse(),d}(n,s,r,t.domain.keys[o])}xCoordinateRange(e){const t=this.axes[vv.X].scale.convert(e);return[t,t]}yCoordinateRange(e){const t=this.axes[vv.Y].scale.convert(e[0]);return[t,t]}getSeriesDomain(e){const{processedData:t,dataModel:i}=this;if(!t||!i)return[];const{domain:{keys:[n]}}=t;if(e===vv.X){const e=i.resolveProcessedDataDefById(this,"xValue");return"key"===e?.def.type&&"category"===e.def.valueType?n:bv(Bv(n))}{const e=this.domainForClippedRange(vv.Y,["yHighValue","yLowValue"],"xValue",!0),t=Yv(e);return bv(t)}}getSeriesRange(e,t){return this.domainForVisibleRange(vv.Y,["yHighValue","yLowValue"],"xValue",t,!0)}createNodeData(){const{data:e,dataModel:t,processedData:i,axes:n}=this,s=n[vv.X],r=n[vv.Y];if(!(e&&s&&r&&t&&i))return;const o=s.scale,a=r.scale,{xKey:l,yLowKey:c,yHighKey:h,connectMissingData:d,marker:u,interpolation:p}=this.properties,g=i.dataSources.get(this.id)??[],f=(o.bandwidth??0)/2,m=t.resolveKeysById(this,"xValue",i),v=t.resolveColumnById(this,"yHighValue",i),y=t.resolveColumnById(this,"yLowValue",i),C=[],b=[],S=[],w=(e,t,i)=>{const n=g[e],s=m[e];if(null==s)return;const r=S[S.length-1];if(Number.isFinite(t)&&Number.isFinite(i)){const d=(r,o,a)=>{b.push({index:e,series:this,itemId:r,datum:n,datumIndex:e,midPoint:{x:v,y:a},yHighValue:t,yLowValue:i,xValue:s,xKey:l,yLowKey:c,yHighKey:h,point:{x:v,y:a,size:x},enabled:!0});const d=this.createLabelData({datumIndex:e,point:{x:v,y:a},value:o,yLowValue:i,yHighValue:t,itemId:r,inverted:g,datum:n,series:this});C.push(d)},g=i>t,v=(p=e,o.convert(m[p])+f),y=a.convert(t),w=a.convert(i),{size:x}=u;d("high",t,y),d("low",i,w);const E={high:{point:{x:v,y},xDatum:s,yDatum:t},low:{point:{x:v,y:w},xDatum:s,yDatum:i}};Array.isArray(r)?r.push(E):null!=r?(r.skip+=1,S.push([E])):S.push([E])}else d||(Array.isArray(r)||null==r?S.push({skip:0}):r.skip+=1);var p},{dataAggregationFilters:x}=this,[E,M]=o.range,A=M-E,T=x?.find(e=>e.maxRange>A),D=T?.topIndices,I=T?.bottomIndices;let[R,L]=this.visibleRange("xValue",s.range,D);R=Math.max(R-1,0),L=Math.min(L+1,D?.length??m.length),i.input.count<1e3&&(R=0,L=i.input.count);for(let e=R;e<L;e+=1){const t=D?.[e]??e,i=I?.[e]??e;w(t,v[t],y[i])}const k=S.flatMap(e=>{if(!Array.isArray(e))return[];const t=e.map(e=>e.high);return Ov(t,p)}),P=S.flatMap(e=>{if(!Array.isArray(e))return[];const t=e.map(e=>e.low);return Ov(t,p)});return{itemId:`${c}-${h}`,labelData:C,nodeData:b,fillData:{itemId:"high",spans:k,phantomSpans:P},highStrokeData:{itemId:"high",spans:k},lowStrokeData:{itemId:"low",spans:P},scales:this.calculateScaling(),visible:this.visible}}createLabelData({datumIndex:e,point:t,value:i,itemId:n,inverted:s,datum:r,series:o}){const{xKey:a,yLowKey:l,yHighKey:c,xName:h,yName:d,yLowName:u,yHighName:p,label:g}=this.properties,{placement:f,padding:m=10}=g;let v=n;s&&(v="low"===n?"high":"low");const y="outside"===f&&"high"===v||"inside"===f&&"low"===v?-1:1;return{x:t.x,y:t.y+m*y,series:o,itemId:n,datum:r,datumIndex:e,text:this.getLabelText(g,{value:i,datum:r,itemId:n,xKey:a,yLowKey:l,yHighKey:c,xName:h,yLowName:u,yHighName:p,yName:d}),textAlign:"center",textBaseline:-1===y?"bottom":"top"}}isPathOrSelectionDirty(){return this.properties.marker.isDirty()}updatePathNodes(e){const{opacity:t,visible:i}=e,[n,s]=e.paths,r=this.getStrokeWidth(this.properties.strokeWidth);s.setProperties({fill:void 0,lineCap:"round",lineJoin:"round",pointerEvents:Uv.None,stroke:this.properties.stroke,strokeWidth:r,strokeOpacity:this.properties.strokeOpacity,lineDash:this.properties.lineDash,lineDashOffset:this.properties.lineDashOffset,opacity:t,visible:i});const o=Xv(this.properties.fill,this.properties.fillGradientDefaults,this.properties.fillPatternDefaults,this.properties.fillImageDefaults),a=this.getShapeFillBBox();zv(n,o,a),Zv(n,{stroke:void 0,fill:o,fillOpacity:this.properties.fillOpacity,lineDash:this.properties.lineDash,lineDashOffset:this.properties.lineDashOffset,strokeOpacity:this.properties.strokeOpacity,strokeWidth:r},void 0,a),n.setProperties({pointerEvents:Uv.None,lineJoin:"round",fillShadow:this.properties.shadow,opacity:t,visible:i}),Lv(this,s),Lv(this,n)}updatePaths(e){this.updateAreaPaths(e.paths,e.contextData)}updateAreaPaths(e,t){for(const i of e)i.visible=t.visible;if(t.visible)this.updateFillPath(e,t),this.updateStrokePath(e,t);else for(const t of e)t.path.clear(),t.markDirty("RangeArea")}updateFillPath(e,t){const[i]=e;i.path.clear(),Pv(i,t.fillData),i.markDirty("RangeArea")}updateStrokePath(e,t){const[,i]=e;i.path.clear(),Nv(i,t.highStrokeData.spans),Nv(i,t.lowStrokeData.spans),i.markDirty("RangeArea")}updateMarkerSelection(e){const{nodeData:t,markerSelection:i}=e;return this.properties.marker.isDirty()&&(i.clear(),i.cleanup()),i.update(this.properties.marker.enabled?t:[])}getMarkerItemBaseStyle(e){const{properties:t}=this,{marker:i}=t,n=e?t.highlightStyle.item:void 0;return{shape:i.shape,size:i.size,fill:n?.fill??i.fill,fillOpacity:n?.fillOpacity??i.fillOpacity,stroke:n?.stroke??i.stroke,strokeWidth:n?.strokeWidth??this.getStrokeWidth(i.strokeWidth),strokeOpacity:n?.strokeOpacity??i.strokeOpacity,lineDash:n?.lineDash??i.lineDash,lineDashOffset:n?.lineDashOffset??i.lineDashOffset}}getMarkerItemStyleOverrides(e,t,i,n){const{id:s,properties:r}=this,{xKey:o,yHighKey:a,yLowKey:l,marker:c}=r,{itemStyler:h}=c;if(null!=h)return this.cachedDatumCallback(Hv(e,n?"highlight":"node"),()=>this.callWithContext(h,{seriesId:s,datum:t,xKey:o,yHighKey:a,yLowKey:l,highlighted:n,...i}))}updateMarkerNodes(e){const{markerSelection:t,isHighlight:i}=e,{xKey:n,yLowKey:s,yHighKey:r,marker:o,fill:a,stroke:l,strokeWidth:c,fillOpacity:h,strokeOpacity:d}=this.properties,u=yv(i&&this.properties.highlightStyle.item,o.getStyle(),{fill:a,fillOpacity:h,stroke:l,strokeWidth:c,strokeOpacity:d}),p=this.getShapeFillBBox();t.each((e,t)=>{this.updateMarkerStyle(o,e,t.datum,t.point,{xKey:n,yHighKey:r,yLowKey:s},i,u,p)}),i||this.properties.marker.markClean()}updateLabelSelection(e){const{labelData:t,labelSelection:i}=e;return i.update(t,e=>{e.pointerEvents=Uv.None})}updateLabelNodes(e){e.labelSelection.each((e,t)=>{Cv(e,this.properties.label,t)})}getHighlightLabelData(e,t){const i=e.filter(e=>e.datum===t.datum);return i.length>0?i:void 0}getHighlightData(e,t){const i=e.filter(e=>e.datum===t.datum);return i.length>0?i:void 0}getTooltipContent(e,t){const{id:i,dataModel:n,processedData:s,axes:r,properties:o}=this,{xName:a,yName:l,yLowKey:c,yLowName:h,xKey:d,yHighKey:u,yHighName:p,tooltip:g}=o,f=r[vv.X],m=r[vv.Y];if(!(n&&s&&f&&m))return;const v=s.dataSources.get(this.id)?.[e],y=n.resolveKeysById(this,"xValue",s)[e],C=n.resolveColumnById(this,"yHighValue",s)[e],b=n.resolveColumnById(this,"yLowValue",s)[e];if(null==y)return;const S=this.getMarkerItemBaseStyle(!1);Object.assign(S,this.getMarkerItemStyleOverrides(String(e),e,S,!1));const w=`${m.formatDatum(b)} - ${m.formatDatum(C)}`;return this.formatTooltipWithContext(g,{heading:f.formatDatum(y),symbol:this.legendItemSymbol(),data:[{label:l,fallbackLabel:`${h??c} - ${p??u}`,value:w}]},{seriesId:i,datum:v,title:l,itemId:t?.itemId??"unknown",xName:a,yName:l,yLowKey:c,yLowName:h,xKey:d,yHighKey:u,yHighName:p,...S})}legendItemSymbol(){const{fill:e,stroke:t,strokeWidth:i,strokeOpacity:n,lineDash:s,marker:r}=this.properties;return{marker:qv({shape:r.shape,fill:r.fill??e,stroke:r.stroke??t,fillOpacity:r.fillOpacity,strokeOpacity:r.strokeOpacity,strokeWidth:r.strokeWidth,lineDash:r.lineDash,lineDashOffset:r.lineDashOffset},r.fillGradientDefaults,r.fillPatternDefaults,r.fillImageDefaults),line:{stroke:t,strokeOpacity:n,strokeWidth:i,lineDash:s}}}getLegendData(e){if("category"!==e)return[];const{id:t,visible:i}=this,{yLowKey:n,yHighKey:s,yName:r,yLowName:o,yHighName:a,showInLegend:l}=this.properties;return[{legendType:"category",id:t,itemId:`${n}-${s}`,seriesId:t,enabled:i,label:{text:`${r??`${o??n} - ${a??s}`}`},symbol:this.legendItemSymbol(),hideInLegend:!l}]}isLabelEnabled(){return this.properties.label.enabled}onDataChange(){}nodeFactory(){return new Wv}animateEmptyUpdateReady(e){const{markerSelection:t,labelSelection:i,contextData:n,paths:s}=e,{animationManager:r}=this.ctx;this.updateAreaPaths(s,n),Mv(this,r,...s),Av([t],Ev),Tv(this,r,t),Dv(this,"labels",r,i)}animateReadyResize(e){const{contextData:t,paths:i}=e;this.updateAreaPaths(i,t),super.animateReadyResize(e)}animateWaitingUpdateReady(e){const{animationManager:t}=this.ctx,{markerSelection:i,labelSelection:n,contextData:s,paths:r,previousContextData:o}=e,[a,l]=r;if(null==a&&null==l)return;this.resetMarkerAnimation(e),this.resetLabelAnimation(e);const c=()=>{this.resetPathAnimation(e),this.updateAreaPaths(r,s)};if(null==s||null==o)return c(),Fv(this,t,"added",i),_v(this,"fill_path_properties",t,"add",a),_v(this,"stroke_path_properties",t,"add",l),void Dv(this,"labels",t,n);const h=function(e,t,i){if("category"===e.scales.x?.type!=("category"===t.scales.x?.type)||!cv(e.scales.x)||!cv(t.scales.x))return;let n="updated";t.visible&&!e.visible?n="removed":!t.visible&&e.visible&&(n="added");const s=hv({scales:e.scales,data:e.fillData.spans},{scales:t.scales,data:t.fillData.spans},lv.Split);if(null==s)return;const r=hv({scales:e.scales,data:e.fillData.phantomSpans},{scales:t.scales,data:t.fillData.phantomSpans},lv.Split);if(null==r)return;const o=hv({scales:e.scales,data:e.highStrokeData.spans},{scales:t.scales,data:t.highStrokeData.spans},lv.Split);if(null==o)return;const a=hv({scales:e.scales,data:e.lowStrokeData.spans},{scales:t.scales,data:t.lowStrokeData.spans},lv.Split);if(null==a)return;const l="fade",c=dv(n,s,r,l),h=function(e,t,i,n){return{status:e,path:{addPhaseFn:(e,n)=>{uv(e,n,t.added),uv(e,n,i.added)},updatePhaseFn:(e,n)=>{uv(e,n,t.moved),uv(e,n,i.moved)},removePhaseFn:(e,n)=>{uv(e,n,t.removed),uv(e,n,i.removed)}},pathProperties:pv(e,n)}}(n,o,a,l);return{status:n,fill:c,stroke:h,hasMotion:(i?.changed??!0)||!gv(e.scales.x,t.scales.x)||!gv(e.scales.y,t.scales.y)||"updated"!==n}}(s,o,this.processedData?.reduced?.diff?.[this.id]);if(void 0===h)return t.skipCurrentBatch(),void c();"no-op"!==h.status&&(Gv(this.id,"fill_path_properties",t,[a],h.fill.pathProperties),Gv(this.id,"stroke_path_properties",t,[l],h.stroke.pathProperties),"added"===h.status?this.updateAreaPaths(r,s):"removed"===h.status?this.updateAreaPaths(r,o):(Vv(this.id,"fill_path_update",t,[a],h.fill.path),Vv(this.id,"stroke_path_update",t,[l],h.stroke.path)),h.hasMotion&&(Fv(this,t,void 0,i),Dv(this,"labels",t,n)),this.ctx.animationManager.animate({id:this.id,groupId:"reset_after_animation",phase:"trailing",from:{},to:{},onComplete:()=>this.updateAreaPaths(r,s)}))}getFormattedMarkerStyle(e){const{xKey:t,yLowKey:i,yHighKey:n}=this.properties;return this.getMarkerStyle(this.properties.marker,e.datum,{xKey:t,yLowKey:i,yHighKey:n},!0)}computeFocusBounds(e){const t=kv(this,e),i=kv(this,{...e,datumIndex:e.datumIndex+1});if(t&&i)return jv.merge([t,i])}isDatumEnabled(e,t){return t%2==0&&super.isDatumEnabled(e,t)}};Jv.className="RangeAreaSeries",Jv.type="range-area";var{commonSeriesOptionsDefs:ey,rangeAreaSeriesThemeableOptionsDef:ty}=n.n1,iy={...ty,...ey,type:(0,s.mw)((0,s.dY)("range-area")),xKey:(0,s.mw)(s.Yj),yLowKey:(0,s.mw)(s.Yj),yHighKey:(0,s.mw)(s.Yj),xName:s.Yj,yName:s.Yj,yLowName:s.Yj,yHighName:s.Yj};iy.pickOutsideVisibleMinorAxis=(0,s._L)(s.zM),iy.focusPriority=(0,s._L)(s.ai);var ny={series:{fill:{$palette:"fill"},fillGradientDefaults:{type:"gradient",gradient:"linear",bounds:"item",colorStops:{$palette:"gradient"},rotation:0,reverse:!1},fillPatternDefaults:n.n1.FILL_PATTERN_DEFAULTS,stroke:{$palette:"stroke"},fillOpacity:.7,nodeClickRange:"nearest",marker:{enabled:!1,fill:{$palette:"fill"},stroke:{$palette:"stroke"},fillGradientDefaults:{type:"gradient",gradient:"radial",bounds:"item",colorStops:{$palette:"gradient"},rotation:0,reverse:!0},fillPatternDefaults:n.n1.FILL_PATTERN_DEFAULTS,fillImageDefaults:n.n1.FILL_IMAGE_DEFAULTS,size:6,strokeWidth:2},label:{enabled:!1,placement:"outside",padding:10,fontSize:{$ref:"fontSize"},fontFamily:{$ref:"fontFamily"},fontWeight:{$ref:"fontWeight"},color:{$ref:"textColor"}},interpolation:{type:"linear"}},axes:{[n.n1.ThemeConstants.CARTESIAN_AXIS_TYPE.NUMBER]:{crosshair:{enabled:!0}}}},{ThemeConstants:{CARTESIAN_AXIS_TYPE:sy,CARTESIAN_POSITION:ry}}=n.n1,oy={type:"series",optionsKey:"series[]",packageType:"enterprise",chartTypes:["cartesian"],identifier:"range-area",moduleFactory:e=>new Jv(e),tooltipDefaults:{range:"nearest"},defaultAxes:[{type:sy.NUMBER,position:ry.LEFT},{type:sy.CATEGORY,position:ry.BOTTOM}],themeTemplate:ny},ay={type:"series",name:"range-area",chartType:"cartesian",enterprise:!0,options:iy,create:e=>new Jv(e)},{AbstractBarSeriesProperties:ly,FillGradientDefaults:cy,FillPatternDefaults:hy,FillImageDefaults:dy,SeriesTooltip:uy,Property:py,DropShadow:gy,Label:fy}=n.n1,my=class extends fy{constructor(){super(...arguments),this.placement="inside",this.padding=6}};a([py],my.prototype,"placement",2),a([py],my.prototype,"padding",2);var vy=class extends ly{constructor(){super(...arguments),this.fill="#99CCFF",this.fillGradientDefaults=new cy,this.fillPatternDefaults=new hy,this.fillImageDefaults=new dy,this.fillOpacity=1,this.stroke="#99CCFF",this.strokeWidth=1,this.strokeOpacity=1,this.lineDash=[0],this.lineDashOffset=0,this.cornerRadius=0,this.shadow=(new gy).set({enabled:!1}),this.label=new my,this.tooltip=new uy,this.fastDataProcessing=!1}};a([py],vy.prototype,"xKey",2),a([py],vy.prototype,"yLowKey",2),a([py],vy.prototype,"yHighKey",2),a([py],vy.prototype,"xName",2),a([py],vy.prototype,"yName",2),a([py],vy.prototype,"yLowName",2),a([py],vy.prototype,"yHighName",2),a([py],vy.prototype,"fill",2),a([py],vy.prototype,"fillGradientDefaults",2),a([py],vy.prototype,"fillPatternDefaults",2),a([py],vy.prototype,"fillImageDefaults",2),a([py],vy.prototype,"fillOpacity",2),a([py],vy.prototype,"stroke",2),a([py],vy.prototype,"strokeWidth",2),a([py],vy.prototype,"strokeOpacity",2),a([py],vy.prototype,"lineDash",2),a([py],vy.prototype,"lineDashOffset",2),a([py],vy.prototype,"cornerRadius",2),a([py],vy.prototype,"itemStyler",2),a([py],vy.prototype,"shadow",2),a([py],vy.prototype,"label",2),a([py],vy.prototype,"tooltip",2),a([py],vy.prototype,"fastDataProcessing",2);var{SeriesNodePickMode:yy,valueProperty:Cy,keyProperty:by,ChartAxisDirection:Sy,checkCrisp:wy,updateLabelNode:xy,SMALLEST_KEY_INTERVAL:Ey,LARGEST_KEY_INTERVAL:My,diff:Ay,prepareBarAnimationFunctions:Ty,midpointStartingBarPosition:Dy,resetBarSelectionsFn:Iy,fixNumericExtent:Ry,seriesLabelFadeInAnimation:Ly,resetLabelFn:ky,animationValidation:Py,computeBarFocusBounds:Ny,visibleRangeIndices:Oy,createDatumId:_y,ContinuousScale:Fy,DiscreteTimeScale:Gy,Rect:Vy,PointerEvents:By,motion:Hy,applyShapeStyle:zy,findMinMax:Uy,getShapeStyle:Wy,areScalingEqual:jy}=n.n1,Ky=class extends n.n1.SeriesNodeEvent{constructor(e,t,i,n){super(e,t,i,n),this.xKey=n.properties.xKey,this.yLowKey=n.properties.yLowKey,this.yHighKey=n.properties.yHighKey}},$y=class extends n.n1.AbstractBarSeries{constructor(e){super({moduleCtx:e,pickModes:[yy.AXIS_ALIGNED,yy.EXACT_SHAPE_MATCH],hasHighlightedLabels:!0,directionKeys:{x:["xKey"],y:["yLowKey","yHighKey"]},directionNames:{x:["xName"],y:["yLowName","yHighName","yName"]},categoryKey:"xValue",datumSelectionGarbageCollection:!1,animationResetFns:{datum:Iy,label:ky}}),this.properties=new vy,this.dataAggregationFilters=void 0,this.NodeEvent=Ky}async processData(e){const{xKey:t,yLowKey:i,yHighKey:n,fastDataProcessing:s}=this.properties,r=!s,o=this.getCategoryAxis()?.scale,a=this.getValueAxis()?.scale,{isContinuousX:l,xScaleType:c,yScaleType:h}=this.getScaleInformation({xScale:o,yScale:a}),d=[];this.ctx.animationManager.isSkipped()||(this.processedData&&d.push(Ay(this.id,this.processedData)),d.push(Py()));const u=this.visible?{}:{forceValue:0},{dataModel:p,processedData:g}=await this.requestDataModel(e,this.data,{props:[by(t,c,{id:"xValue"}),Cy(i,h,{id:"yLowValue",invalidValue:null,...u}),Cy(n,h,{id:"yHighValue",invalidValue:null,...u}),...l?[Ey,My]:[],...d],groupByKeys:r});this.smallestDataInterval=g.reduced?.smallestKeyInterval,this.largestDataInterval=g.reduced?.largestKeyInterval,this.dataAggregationFilters=this.aggregateData(p,g),this.animationState.transition("updateData")}aggregateData(e,t){if("grouped"!==t.type)return;const i=this.axes[Sy.X];if(null==i||!Fy.is(i.scale)&&!Gy.is(i.scale))return;const n=e.resolveKeysById(this,"xValue",t),s=e.resolveColumnById(this,"yHighValue",t),r=e.resolveColumnById(this,"yLowValue",t),{index:o}=e.resolveProcessedDataDefById(this,"xValue");return function(e,t,i,n){if(e.length<1e3)return;const[s,r]=Fg(n);let o=_g(e,5),{indexData:a,valueData:l}=Bg(e,t,i,s,r,o);const c=[{maxRange:o,indexData:a}];for(;o>64;)({indexData:a,valueData:l,maxRange:o}=Hg(a,l,o)),c.push({maxRange:o,indexData:a});return c.reverse(),c}(n,s,r,t.domain.keys[o])}getSeriesDomain(e){const{processedData:t,dataModel:i}=this;if(!t||!i)return[];const{keys:[n]}=t.domain;if(e===this.getCategoryDirection()){const e=i.resolveProcessedDataDefById(this,"xValue");return"key"===e?.def.type&&"category"===e?.def.valueType?n:this.padBandExtent(n)}{const t=this.domainForClippedRange(e,["yHighValue","yLowValue"],"xValue",!0),i=Uy(t);return Ry(i)}}getSeriesRange(e,t){return this.domainForVisibleRange(Sy.Y,["yHighValue","yLowValue"],"xValue",t,!0)}createNodeData(){const{data:e,dataModel:t,groupScale:i,processedData:n,visible:s}=this,r=this.getCategoryAxis(),o=this.getValueAxis();if(!(e&&r&&o&&t&&n?.dataSources))return;const a=r.scale,l=o.scale,c=this.getBarDirection()===Sy.X,{xKey:h,yLowKey:d,yHighKey:u,strokeWidth:p}=this.properties,g=`${d}-${u}`,f={itemId:g,nodeData:[],labelData:[],scales:this.calculateScaling(),groupScale:this.getScaling(this.groupScale),visible:this.visible};if(!s)return f;const m=n.dataSources.get(this.id)??[],v=t.resolveKeysById(this,"xValue",n),y=t.resolveColumnById(this,"yLowValue",n),C=t.resolveColumnById(this,"yHighValue",n),{barWidth:b,groupIndex:S}=this.updateGroupScale(r),w=Fy.is(a)?-.5*b:0,x=i.convert(String(S)),E=wy(r?.scale,r?.visibleRange,this.smallestDataInterval,this.largestDataInterval),M=e=>Math.round(a.convert(v[e]))+x+w,A=(e,t,i,n,s,r,o)=>{const a=m[e],b=v[e];if(null==b)return;const S=y[e],w=C[e];if(!Number.isFinite(S?.valueOf())||!Number.isFinite(w?.valueOf()))return;const[x,E]=S<w?[S,w]:[w,S],M=Math.round(l.convert(r)),A=Math.round(l.convert(s)),T=Math.max(p,Math.abs(A-M)),D={x:c?Math.min(M,A):i,y:c?i:Math.min(M,A),width:c?T:n,height:c?n:T},I={x:D.x+D.width/2,y:D.y+D.height/2},R=this.createLabelData({datumIndex:e,rect:D,barAlongX:c,yLowValue:x,yHighValue:E,datum:a,series:this}),L={index:t,valueIndex:e,series:this,itemId:g,datum:a,datumIndex:e,xValue:b,yLowValue:S,yHighValue:w,yLowKey:d,yHighKey:u,xKey:h,x:D.x,y:D.y,width:D.width,height:D.height,midPoint:I,crisp:o,labels:R};f.nodeData.push(L),f.labelData.push(...R)},{dataAggregationFilters:T}=this,[D,I]=a.range,R=I-D,L=T?.find(e=>e.maxRange>R);if(null!=L){const{maxRange:e,indexData:t}=L,[i,n]=Oy(e,r.range,e=>{const i=4*e,n=t[i+0],s=t[i+1];if(-1!==n)return[M((n+s)/2|0),M(s)+b]});for(let e=i;e<n;e+=1){const i=4*e,n=t[i+0],s=t[i+1],r=t[i+2],o=t[i+3];if(-1===n)continue;const a=(n+s)/2|0;null!=v[a]&&A(a,0,M(a),Math.abs(M(n)-M(s))+b,y[r],C[o],!1)}}else if("ungrouped"===n.type){let[e,t]=Oy(m.length,r.range,e=>[M(e),b]);n.input.count<1e3&&(e=0,t=n.input.count);for(let i=e;i<t;i+=1)A(i,0,M(i),b,y[i],C[i],E)}else for(const{datumIndex:e,groupIndex:i}of t.forEachGroupDatum(this,n))A(e,i,M(e),b,y[e],C[e],E);return f}createLabelData({datumIndex:e,rect:t,barAlongX:i,yLowValue:n,yHighValue:s,datum:r,series:o}){const{xKey:a,yLowKey:l,yHighKey:c,xName:h,yLowName:d,yHighName:u,yName:p,label:g}=this.properties,f={datum:r,xKey:a,yLowKey:l,yHighKey:c,xName:h,yLowName:d,yHighName:u,yName:p},{placement:m,padding:v}=g,y=v*("outside"===m?1:-1),C={datumIndex:e,x:t.x+(i?-y:t.width/2),y:t.y+(i?t.height/2:t.height+y),textAlign:i?"left":"center",textBaseline:i?"middle":"bottom",text:this.getLabelText(g,{itemId:"low",value:n,...f}),itemId:"low",datum:r,series:o},b={datumIndex:e,x:t.x+(i?t.width+y:t.width/2),y:t.y+(i?t.height/2:-y),textAlign:i?"right":"center",textBaseline:i?"middle":"top",text:this.getLabelText(g,{itemId:"high",value:s,...f}),itemId:"high",datum:r,series:o};return"outside"===m&&(C.textAlign=i?"right":"center",C.textBaseline=i?"middle":"top",b.textAlign=i?"left":"center",b.textBaseline=i?"middle":"bottom"),[C,b]}nodeFactory(){return new Vy}updateDatumSelection(e){const{nodeData:t,datumSelection:i}=e,n=t??[];return i.update(n,void 0,e=>this.getDatumId(e))}getItemBaseStyle(e){const{properties:t}=this,{cornerRadius:i,fillGradientDefaults:n,fillPatternDefaults:s,fillImageDefaults:r}=t,o=e?t.highlightStyle.item:void 0;return Wy({fill:o?.fill??t.fill,fillOpacity:o?.fillOpacity??t.fillOpacity,stroke:o?.stroke??t.stroke,strokeWidth:o?.strokeWidth??this.getStrokeWidth(t.strokeWidth),strokeOpacity:o?.strokeOpacity??t.strokeOpacity,lineDash:o?.lineDash??t.lineDash??[],lineDashOffset:o?.lineDashOffset??t.lineDashOffset,cornerRadius:i},n,s,r)}getItemStyleOverrides(e,t,i,n){const{id:s,properties:r}=this,{xKey:o,yHighKey:a,yLowKey:l,itemStyler:c,fillGradientDefaults:h,fillPatternDefaults:d,fillImageDefaults:u}=r;if(null==c)return;const p=this.cachedDatumCallback(_y(e,n?"highlight":"node"),()=>this.callWithContext(c,{seriesId:s,datum:t,xKey:o,yHighKey:a,yLowKey:l,highlighted:n,...i}));return Wy(p,h,d,u)}updateDatumNodes(e){const{datumSelection:t,isHighlight:i}=e,n=this.getCategoryDirection()===Sy.X,s=this.getItemBaseStyle(i),r=this.getShapeFillBBox();t.each((e,t)=>{const o=this.getItemStyleOverrides(String(t.datumIndex),t.datum,s,i);zy(e,s,o,r),e.cornerRadius=o?.cornerRadius??s.cornerRadius,e.visible=n?t.width>0:t.height>0,e.crisp=t.crisp})}getHighlightLabelData(e,t){const i=e.filter(e=>e.datum===t.datum);return i.length>0?i:void 0}updateLabelSelection(e){const t=this.properties.label.enabled?e.labelData:[];return e.labelSelection.update(t,e=>{e.pointerEvents=By.None})}updateLabelNodes(e){e.labelSelection.each((e,t)=>{xy(e,this.properties.label,t)})}getTooltipContent(e){const{id:t,dataModel:i,processedData:n,properties:s}=this,{xKey:r,xName:o,yName:a,yLowKey:l,yHighKey:c,yLowName:h,yHighName:d,tooltip:u}=s,p=this.getCategoryAxis(),g=this.getValueAxis();if(!(i&&n&&p&&g))return;const f=n.dataSources.get(this.id)?.[e],m=i.resolveKeysById(this,"xValue",n)[e],v=i.resolveColumnById(this,"yHighValue",n)[e],y=i.resolveColumnById(this,"yLowValue",n)[e];if(null==m)return;const C=this.getItemBaseStyle(!1);Object.assign(C,this.getItemStyleOverrides(String(e),f,C,!1));const b=`${g.formatDatum(y)} - ${g.formatDatum(v)}`;return this.formatTooltipWithContext(u,{heading:p.formatDatum(m),symbol:this.legendItemSymbol(),data:[{label:a,fallbackLabel:`${h??l} - ${d??c}`,value:b}]},{seriesId:t,datum:f,title:a,xKey:r,xName:o,yName:a,yLowKey:l,yHighKey:c,yLowName:h,yHighName:d,...C})}legendItemSymbol(){const{fill:e,stroke:t,strokeWidth:i,fillOpacity:n,strokeOpacity:s,lineDash:r,lineDashOffset:o,fillGradientDefaults:a,fillPatternDefaults:l,fillImageDefaults:c}=this.properties;return{marker:Wy({fill:e,stroke:t,fillOpacity:n,strokeOpacity:s,strokeWidth:i,lineDash:r,lineDashOffset:o},a,l,c)}}getLegendData(e){if("category"!==e)return[];const{id:t,visible:i}=this,{yName:n,yLowName:s,yHighName:r,yLowKey:o,yHighKey:a,showInLegend:l}=this.properties;return[{legendType:"category",id:t,itemId:`${o}-${a}`,seriesId:t,enabled:i,label:{text:`${n??`${s??o} - ${r??a}`}`},symbol:this.legendItemSymbol(),hideInLegend:!l}]}animateEmptyUpdateReady({datumSelection:e,labelSelection:t}){const i=Ty(Dy(this.isVertical(),"normal"));Hy.fromToMotion(this.id,"datums",this.ctx.animationManager,[e],i),Ly(this,"labels",this.ctx.animationManager,t)}animateWaitingUpdateReady(e){const{datumSelection:t,labelSelection:i,contextData:s,previousContextData:r}=e,o=n.n1.calculateDataDiff(this.id,t,this.getDatumId.bind(this),s,r,this.processedData);this.ctx.animationManager.stopByAnimationGroupId(this.id);const a=null==r?"fade":"normal",l=Ty(Dy(this.isVertical(),a));Hy.fromToMotion(this.id,"datums",this.ctx.animationManager,[t],l,(e,t)=>this.getDatumId(t),o),!o?.changed&&jy(s.groupScale,r?.groupScale)||Ly(this,"labels",this.ctx.animationManager,i)}getDatumId(e){return`${e.xValue}-${e.valueIndex}`}isLabelEnabled(){return this.properties.label.enabled}onDataChange(){}computeFocusBounds({datumIndex:e}){return Ny(this,this.contextNodeData?.nodeData[e])}};$y.className="RangeBarSeries",$y.type="range-bar";var{commonSeriesOptionsDefs:Yy,rangeBarSeriesThemeableOptionsDef:qy}=n.n1,Xy={...qy,...Yy,type:(0,s.mw)((0,s.dY)("range-bar")),xKey:(0,s.mw)(s.Yj),yLowKey:(0,s.mw)(s.Yj),yHighKey:(0,s.mw)(s.Yj),xName:s.Yj,yName:s.Yj,yLowName:s.Yj,yHighName:s.Yj};Xy.pickOutsideVisibleMinorAxis=(0,s._L)(s.zM),Xy.fastDataProcessing=(0,s._L)(s.zM),Xy.focusPriority=(0,s._L)(s.ai);var Zy={series:{direction:"vertical",fill:{$palette:"fill"},stroke:{$palette:"stroke"},fillGradientDefaults:{type:"gradient",gradient:"linear",bounds:"item",colorStops:{$palette:"gradient"},rotation:0,reverse:!1},fillPatternDefaults:n.n1.FILL_PATTERN_DEFAULTS,fillImageDefaults:n.n1.FILL_IMAGE_DEFAULTS,strokeWidth:0,label:{enabled:!1,fontSize:{$ref:"fontSize"},fontFamily:{$ref:"fontFamily"},fontWeight:{$ref:"fontWeight"},color:{$ref:"backgroundColor"},placement:"inside"}},axes:{[n.n1.ThemeConstants.CARTESIAN_AXIS_TYPE.NUMBER]:{crosshair:{enabled:!0}}}},Qy={type:"series",optionsKey:"series[]",packageType:"enterprise",chartTypes:["cartesian"],identifier:"range-bar",moduleFactory:e=>new $y(e),tooltipDefaults:{range:"exact"},defaultAxes:n.n1.DIRECTION_SWAP_AXES,themeTemplate:Zy,groupable:!0},Jy={type:"series",name:"range-bar",chartType:"cartesian",enterprise:!0,options:Xy,create:e=>new $y(e)},{AbstractBarSeriesProperties:eC,BaseProperties:tC,FillGradientDefaults:iC,FillPatternDefaults:nC,FillImageDefaults:sC,PropertiesArray:rC,SeriesTooltip:oC,Property:aC,DropShadow:lC,Label:cC}=n.n1,hC=class extends tC{};a([aC],hC.prototype,"totalType",2),a([aC],hC.prototype,"index",2),a([aC],hC.prototype,"axisLabel",2);var dC=class extends tC{};a([aC],dC.prototype,"renderer",2);var uC=class extends cC{constructor(){super(...arguments),this.placement="outside-end",this.padding=6}};a([aC],uC.prototype,"placement",2),a([aC],uC.prototype,"padding",2);var pC=class extends tC{constructor(){super(...arguments),this.fill="#c16068",this.fillGradientDefaults=new iC,this.fillPatternDefaults=new nC,this.fillImageDefaults=new sC,this.stroke="#c16068",this.fillOpacity=1,this.strokeOpacity=1,this.lineDash=[0],this.lineDashOffset=0,this.strokeWidth=1,this.cornerRadius=0,this.shadow=(new lC).set({enabled:!1}),this.label=new uC,this.tooltip=new dC}};a([aC],pC.prototype,"name",2),a([aC],pC.prototype,"fill",2),a([aC],pC.prototype,"fillGradientDefaults",2),a([aC],pC.prototype,"fillPatternDefaults",2),a([aC],pC.prototype,"fillImageDefaults",2),a([aC],pC.prototype,"stroke",2),a([aC],pC.prototype,"fillOpacity",2),a([aC],pC.prototype,"strokeOpacity",2),a([aC],pC.prototype,"lineDash",2),a([aC],pC.prototype,"lineDashOffset",2),a([aC],pC.prototype,"strokeWidth",2),a([aC],pC.prototype,"cornerRadius",2),a([aC],pC.prototype,"itemStyler",2),a([aC],pC.prototype,"shadow",2),a([aC],pC.prototype,"label",2),a([aC],pC.prototype,"tooltip",2);var gC=class extends tC{constructor(){super(...arguments),this.enabled=!0,this.stroke="black",this.strokeOpacity=1,this.lineDash=[0],this.lineDashOffset=0,this.strokeWidth=2}};a([aC],gC.prototype,"enabled",2),a([aC],gC.prototype,"stroke",2),a([aC],gC.prototype,"strokeOpacity",2),a([aC],gC.prototype,"lineDash",2),a([aC],gC.prototype,"lineDashOffset",2),a([aC],gC.prototype,"strokeWidth",2);var fC=class extends tC{constructor(){super(...arguments),this.positive=new pC,this.negative=new pC,this.total=new pC}};a([aC],fC.prototype,"positive",2),a([aC],fC.prototype,"negative",2),a([aC],fC.prototype,"total",2);var mC=class extends eC{constructor(){super(...arguments),this.item=new fC,this.totals=new rC(hC),this.line=new gC,this.tooltip=new oC}};a([aC],mC.prototype,"xKey",2),a([aC],mC.prototype,"yKey",2),a([aC],mC.prototype,"xName",2),a([aC],mC.prototype,"yName",2),a([aC],mC.prototype,"item",2),a([aC],mC.prototype,"totals",2),a([aC],mC.prototype,"line",2),a([aC],mC.prototype,"tooltip",2);var{adjustLabelPlacement:vC,SeriesNodePickMode:yC,fixNumericExtent:CC,valueProperty:bC,keyProperty:SC,accumulativeValueProperty:wC,trailingAccumulatedValueProperty:xC,ChartAxisDirection:EC,createDatumId:MC,checkCrisp:AC,updateLabelNode:TC,prepareBarAnimationFunctions:DC,collapsedStartingBarPosition:IC,resetBarSelectionsFn:RC,seriesLabelFadeInAnimation:LC,resetLabelFn:kC,animationValidation:PC,DEFAULT_CARTESIAN_DIRECTION_KEYS:NC,DEFAULT_CARTESIAN_DIRECTION_NAMES:OC,computeBarFocusBounds:_C,isContinuous:FC,Rect:GC,motion:VC,applyShapeStyle:BC,getShapeStyle:HC}=n.n1,zC=class extends n.n1.AbstractBarSeries{constructor(e){super({moduleCtx:e,directionKeys:NC,directionNames:OC,categoryKey:void 0,pickModes:[yC.NEAREST_NODE,yC.EXACT_SHAPE_MATCH],pathsPerSeries:["connector"],hasHighlightedLabels:!0,pathsZIndexSubOrderOffset:[-1,-1],animationResetFns:{datum:RC,label:kC}}),this.properties=new mC,this.seriesItemTypes=new Set(["positive","negative","total"])}async processData(e){const{xKey:t,yKey:i,totals:s}=this.properties,{data:r=[]}=this;if(!this.visible)return;const o={missingValue:void 0,invalidValue:void 0},a=[],l=s.reduce((e,t)=>{const i=e.get(t.index);return i?i.push(t):e.set(t.index,[t]),e},new Map);r.forEach((e,i)=>{a.push(e),l.get(i)?.forEach(e=>a.push({...e.toJson(),[t]:e.axisLabel}))});const c=[];this.ctx.animationManager.isSkipped()||c.push(PC());const h=this.getCategoryAxis()?.scale,d=this.getValueAxis()?.scale,{isContinuousX:u,xScaleType:p,yScaleType:g}=this.getScaleInformation({xScale:h,yScale:d}),{processedData:f}=await this.requestDataModel(e,a,{props:[SC(t,p,{id:"xValue"}),wC(i,g,{...o,id:"yCurrent"}),wC(i,g,{...o,missingValue:0,id:"yCurrentTotal"}),wC(i,g,{...o,id:"yCurrentPositive",validation:e=>FC(e)&&Number(e)>=0}),wC(i,g,{...o,id:"yCurrentNegative",validation:e=>FC(e)&&Number(e)>=0}),xC(i,g,{...o,id:"yPrevious"}),bC(i,g,{id:"yRaw"}),bC("totalType","band",{id:"totalTypeValue",missingValue:void 0,validation:e=>"total"===e||"subtotal"===e}),...u?[n.n1.SMALLEST_KEY_INTERVAL,n.n1.LARGEST_KEY_INTERVAL]:[],...c]});this.smallestDataInterval=f.reduced?.smallestKeyInterval,this.largestDataInterval=f.reduced?.largestKeyInterval,this.updateSeriesItemTypes(),this.animationState.transition("updateData")}getSeriesDomain(e){const{processedData:t,dataModel:i}=this;if(!t||!i)return[];const{keys:[n],values:s}=t.domain;if(e===this.getCategoryDirection()){const t=i.resolveProcessedDataDefById(this,"xValue");if("key"===t?.def.type&&"category"===t?.def.valueType)return n;const s=e===EC.Y,r=this.getCategoryAxis().isReversed();return this.padBandExtent(n,r!==s)}{const e=s[i.resolveProcessedDataIndexById(this,"yCurrent")],t=[Math.min(0,e[0]),Math.max(0,e[1])];return CC(t)}}getSeriesRange(e,t){return[NaN,NaN]}createNodeData(){const{data:e,dataModel:t,processedData:i}=this,n=this.getCategoryAxis(),s=this.getValueAxis();if(!(e&&n&&s&&t&&i))return;const{line:r}=this.properties,o=n.scale,a=s.scale,l=this.getBarDirection()===EC.X,c=this.getBandwidth(n)??10,h=n.isReversed(),d=s.isReversed();if("ungrouped"!==i.type)return;const u={itemId:this.properties.yKey,nodeData:[],labelData:[],pointData:[],scales:this.calculateScaling(),groupScale:this.getScaling(this.groupScale),visible:this.visible};if(!this.visible)return u;const p=[],g=t.resolveKeysById(this,"xValue",i),f=t.resolveColumnById(this,"yRaw",i),m=t.resolveColumnById(this,"totalTypeValue",i),v=t.resolveColumnById(this,"yCurrent",i),y=t.resolveColumnById(this,"yPrevious",i),C=t.resolveColumnById(this,"yCurrentTotal",i),b=AC(n?.scale,n?.visibleRange,this.smallestDataInterval,this.largestDataInterval);let S=0;const{xKey:w,yKey:x,xName:E,yName:M}=this.properties;(i.dataSources.get(this.id)??[]).forEach((e,t)=>{const i=m[t],n=this.isSubtotal(i),s=this.isTotal(i),A=s||n,T=g[t];if(null==T)return;const D=Math.round(o.convert(T)),I=f[t],{cumulativeValue:R,trailingValue:L}=function(e,t,i){return e||t?{cumulativeValue:C[i],trailingValue:t?S:0}:{cumulativeValue:v[i],trailingValue:y[i]}}(s,n,t);A&&(S=R??0);const k=Math.round(a.convert(R)),P=Math.round(a.convert(L)),N=function(e,t,i,n,s){return e?n:t?(n??0)-(s??0):i}(s,n,I,R,L),O=(N??0)>=0,_=this.getSeriesItemType(O,i),{strokeWidth:F,label:G}=this.getItemConfig(_),V=O?k:P,B=O?P:k,H=Math.max(F,Math.abs(B-V)),z={x:l?Math.min(V,B):D,y:l?D:Math.min(V,B),width:l?H:c,height:l?c:H},U={x:z.x+z.width/2,y:z.y+z.height/2},W=A?k:P,j=Math.floor(r.strokeWidth)%2/2,K=h?k:W,$=h?W:k;let Y,q;l?(Y={x:K+j,y:z.y},q={x:$+j,y:z.y+z.height}):(Y={x:z.x,y:K+j},q={x:z.x+z.width,y:$+j});const X={x:h?q.x:Y.x,y:h?q.y:Y.y,x2:h?Y.x:q.x,y2:h?Y.y:q.y,size:0};p.push(X);const Z="subtotal"===_?"total":_,Q=this.getLabelText(G,{itemId:Z,value:N,datum:e,xKey:w,yKey:x,xName:E,yName:M}),J={index:t,series:this,itemId:_,datum:e,datumIndex:t,cumulativeValue:R??0,xValue:T,yValue:N,yKey:x,xKey:w,x:z.x,y:z.y,width:z.width,height:z.height,midPoint:U,crisp:b,label:{text:Q,...vC({isUpward:(N??-1)>=0!==d,isVertical:!l,placement:G.placement,padding:G.padding,rect:z})}};u.nodeData.push(J),u.labelData.push(J)});const A=this.properties.line.enabled;return null!=v&&A&&(u.pointData=p),u}updateSeriesItemTypes(){const{dataModel:e,seriesItemTypes:t,processedData:i}=this;if(!e||!i)return;t.clear();const n=e.resolveProcessedDataIndexById(this,"yCurrentPositive"),s=e.resolveProcessedDataIndexById(this,"yCurrentNegative"),r=e.resolveProcessedDataIndexById(this,"totalTypeValue"),o=i.domain.values[n]??[],a=i.domain.values[s]??[];o.length>0&&t.add("positive"),a.length>0&&t.add("negative");const l=i?.domain.values[r];l&&l.forEach(e=>{"total"!==e&&"subtotal"!==e||t.add("total")})}isSubtotal(e){return"subtotal"===e}isTotal(e){return"total"===e}nodeFactory(){return new GC}getSeriesItemType(e,t){return t??(e?"positive":"negative")}getItemConfig(e){switch(e){case"positive":return this.properties.item.positive;case"negative":return this.properties.item.negative;case"subtotal":case"total":return this.properties.item.total}}updateDatumSelection(e){const{nodeData:t,datumSelection:i}=e,n=t??[];return i.update(n)}getItemStyle(e,t,i,n){const{id:s,properties:r}=this,o=r.item["subtotal"===i?"total":i],a=n?r.highlightStyle.item:void 0,{itemStyler:l,fillGradientDefaults:c,fillPatternDefaults:h,fillImageDefaults:d}=o,{xKey:u,yKey:p}=r,g=HC({fill:a?.fill??o.fill,fillOpacity:a?.fillOpacity??o.fillOpacity,stroke:a?.stroke??o.stroke,strokeWidth:a?.strokeWidth??o.strokeWidth,strokeOpacity:a?.strokeOpacity??o.strokeOpacity,lineDash:a?.lineDash??o.lineDash??[],lineDashOffset:a?.lineDashOffset??o.lineDashOffset,cornerRadius:o.cornerRadius},c,h,d);if(null!=l){let r=this.cachedDatumCallback(MC(e,n?"highlight":"node"),()=>this.callWithContext(l,{seriesId:s,itemId:i,datum:t,xKey:u,yKey:p,highlighted:n,...g}));r=HC(r,c,h,d),Object.assign(g,r)}return g}updateDatumNodes(e){const{datumSelection:t,isHighlight:i}=e,n=this.getCategoryDirection()===EC.X,s=this.getShapeFillBBox();t.each((e,t)=>{const r=t.itemId,o=this.getItemStyle(String(t.datumIndex),t.datum,r,i);BC(e,o,void 0,s),e.visible=n?t.width>0:t.height>0,e.crisp=t.crisp})}updateLabelSelection(e){const{labelData:t,labelSelection:i}=e;if(0===t.length)return i.update([]);const n=t.filter(e=>{const{label:t}=this.getItemConfig(e.itemId);return t.enabled});return i.update(n)}updateLabelNodes(e){e.labelSelection.each((e,t)=>{TC(e,this.getItemConfig(t.itemId).label,t.label)})}getTooltipContent(e){const{id:t,dataModel:i,processedData:n,properties:s}=this,{xKey:r,xName:o,yKey:a,yName:l,tooltip:c}=s,h=this.getCategoryAxis(),d=this.getValueAxis();if(!(i&&n&&h&&d))return;const u=n.dataSources.get(this.id)?.[e],p=i.resolveKeysById(this,"xValue",n)[e],g=i.resolveColumnById(this,"yRaw",n)[e],f=i.resolveColumnById(this,"yCurrentTotal",n),m=i.resolveColumnById(this,"totalTypeValue",n);if(null==p)return;const v=m[e],y=(g??0)>=0,C=this.getSeriesItemType(y,v);let b;if(this.isTotal(v))b=f[e];else if(this.isSubtotal(v)){b=f[e];for(let t=e-1;t>=0;t-=1)if(this.isSubtotal(m[t])){b-=f[t];break}}else b=g;const S=this.getItemStyle(String(e),u,C,!1);return this.formatTooltipWithContext(c,{heading:h.formatDatum(p),symbol:this.legendItemSymbol(C),data:[{label:l,fallbackLabel:a,value:d.formatDatum(b)}]},{seriesId:t,datum:u,title:l,itemId:C,xKey:r,xName:o,yKey:a,yName:l,...S})}legendItemSymbol(e){const{fill:t,stroke:i,fillOpacity:n,strokeOpacity:s,strokeWidth:r,lineDash:o,lineDashOffset:a,fillGradientDefaults:l,fillPatternDefaults:c,fillImageDefaults:h}=this.getItemConfig(e);return{marker:HC({fill:t,stroke:i,fillOpacity:n,strokeOpacity:s,strokeWidth:r,lineDash:o,lineDashOffset:a},l,c,h)}}getLegendData(e){if("category"!==e)return[];const{id:t,seriesItemTypes:i}=this,n=[],{showInLegend:s}=this.properties;return i.forEach(e=>{const{name:i}=this.getItemConfig(e);var r;n.push({legendType:"category",id:t,itemId:e,seriesId:t,enabled:!0,label:{text:i??(r=e,r.charAt(0).toUpperCase()+r.substring(1))},symbol:this.legendItemSymbol(e),hideInLegend:!s,isFixed:!0})}),n}toggleSeriesItem(){}animateEmptyUpdateReady(e){const{datumSelection:t,labelSelection:i,contextData:n}=e,s=DC(IC(this.isVertical(),this.axes,"normal"));VC.fromToMotion(this.id,"datums",this.ctx.animationManager,[t],s),LC(this,"labels",this.ctx.animationManager,i);const{pointData:r}=n;r&&(this.isVertical()?this.animateConnectorLinesVertical(e):this.animateConnectorLinesHorizontal(e))}animateConnectorLinesHorizontal(e){const{pointData:t=[]}=e.contextData,[i]=e.paths,{path:s}=i;this.updateLineNode(i);const r=this.getValueAxis(),o=r?.isReversed(),a=o?(e,t)=>e<t:(e,t)=>e>t,l=r?.scale.convert(0),c=t.reduce((e,t)=>(a(t.x,e)&&(e=t.x),e),o?1/0:0),h=(e,t,i,n,s)=>(e-t)/(i-t)*(s-n)+n;this.ctx.animationManager.animate({id:`${this.id}_connectors`,groupId:this.id,phase:"initial",from:l,to:c,ease:n.n1.Motion.easeOut,collapsable:!1,onUpdate(e){s.clear(!0),t.forEach((t,i)=>{const n=h(e,l,c,l,t.x),r=h(e,l,c,l,t.x2);0!==i&&s.lineTo(n,t.y),s.moveTo(r,t.y2)}),i.checkPathDirty()},onStop:()=>this.resetConnectorLinesPath(e)})}animateConnectorLinesVertical(e){const{pointData:t=[]}=e.contextData,[i]=e.paths,{path:s}=i;this.updateLineNode(i);const r=this.getValueAxis(),o=r?.isReversed(),a=o?(e,t)=>e>t:(e,t)=>e<t,l=r?.scale.convert(0),c=t.reduce((e,t)=>(a(t.y,e)&&(e=t.y),e),o?0:1/0),h=(e,t,i,n,s)=>(e-t)/(i-t)*(s-n)+n;this.ctx.animationManager.animate({id:`${this.id}_connectors`,groupId:this.id,phase:"initial",from:l,to:c,ease:n.n1.Motion.easeOut,collapsable:!1,onUpdate(e){s.clear(!0),t.forEach((t,i)=>{const n=h(e,l,c,l,t.y),r=h(e,l,c,l,t.y2);0!==i&&s.lineTo(t.x,n),s.moveTo(t.x2,r)}),i.checkPathDirty()},onStop:()=>this.resetConnectorLinesPath(e)})}animateReadyResize(e){super.animateReadyResize(e),this.resetConnectorLinesPath(e)}updatePaths(e){this.resetConnectorLinesPath({contextData:e.contextData,paths:e.paths})}resetConnectorLinesPath({contextData:e,paths:t}){if(0===t.length)return;const[i]=t;this.updateLineNode(i);const{path:n}=i;n.clear(!0);const{pointData:s}=e;s&&(s.forEach((e,t)=>{0!==t&&n.lineTo(e.x,e.y),n.moveTo(e.x2,e.y2)}),i.checkPathDirty())}updateLineNode(e){const{stroke:t,strokeWidth:i,strokeOpacity:s,lineDash:r,lineDashOffset:o}=this.properties.line;e.setProperties({fill:void 0,stroke:t,strokeWidth:this.getStrokeWidth(i),strokeOpacity:s,lineDash:r,lineDashOffset:o,lineJoin:"round",pointerEvents:n.n1.PointerEvents.None})}isLabelEnabled(){const{positive:e,negative:t,total:i}=this.properties.item;return e.label.enabled||t.label.enabled||i.label.enabled}onDataChange(){}computeFocusBounds({datumIndex:e}){return _C(this,this.contextNodeData?.nodeData[e])}};zC.className="WaterfallSeries",zC.type="waterfall";var{commonSeriesOptionsDefs:UC,waterfallSeriesThemeableOptionsDef:WC}=n.n1,jC={...WC,...UC,type:(0,s.mw)((0,s.dY)("waterfall")),xKey:(0,s.mw)(s.Yj),yKey:(0,s.mw)(s.Yj),xName:s.Yj,yName:s.Yj,totals:(0,s.J$)({totalType:(0,s.mw)((0,s.KC)("total","subtotal")),index:(0,s.mw)(s.Ly),axisLabel:(0,s.mw)(s.Yj)},"a total definition options array")};function KC(e,t){return{fill:{$if:[{$eq:[{$palette:"type"},"user-indexed"]},{$path:[`./${t}`,{$palette:"fill"},{$palette:"fills"}]},{$palette:`${e}.fill`}]},fillGradientDefaults:{type:"gradient",gradient:"linear",bounds:"item",colorStops:{$if:[{$or:[{$isGradient:[{$palette:`${e}.fill`}]},{$isPattern:[{$palette:`${e}.fill`}]},{$isImage:[{$palette:`${e}.fill`}]}]},{$map:[{$path:["./color",void 0,{$value:"$1"}]},{$path:["./colorStops",void 0,{$palette:`${e}.fill`}]}]},[{$mix:[{$palette:`${e}.fill`},"black",.15]},{$mix:[{$palette:`${e}.fill`},"white",.15]}]]},rotation:0,reverse:!1},fillPatternDefaults:n.n1.FILL_PATTERN_DEFAULTS,fillImageDefaults:n.n1.FILL_IMAGE_DEFAULTS,stroke:{$palette:`${e}.stroke`},strokeWidth:0,label:{enabled:!1,fontStyle:void 0,fontWeight:{$ref:"fontWeight"},fontSize:{$ref:"fontSize"},fontFamily:{$ref:"fontFamily"},color:{$ref:"textColor"},formatter:void 0,placement:"outside-end"}}}var $C={series:{item:{positive:KC("altUp",0),negative:KC("altDown",1),total:KC("neutral",2)},line:{stroke:{$palette:"neutral.stroke"},strokeOpacity:1,lineDash:[0],lineDashOffset:0,strokeWidth:2}},legend:{enabled:!0,toggleSeries:!1}},YC={type:"series",optionsKey:"series[]",packageType:"enterprise",chartTypes:["cartesian"],identifier:"waterfall",solo:!0,moduleFactory:e=>new zC(e),tooltipDefaults:{range:"exact"},defaultAxes:n.n1.DIRECTION_SWAP_AXES,themeTemplate:$C},qC={type:"series",name:"waterfall",chartType:"cartesian",enterprise:!0,options:jC,create:e=>new zC(e)},{NewAreaSeriesModule:XC,NewBarSeriesModule:ZC,NewBubbleSeriesModule:QC,NewHistogramSeriesModule:JC,NewLineSeriesModule:eb,NewScatterSeriesModule:tb,numberFormatValidator:ib,without:nb}=n.n1,sb={width:s.Ly,height:s.Ly,grip:s.zM,fill:s.yW,stroke:s.yW,strokeWidth:s.Ly,cornerRadius:s.Ly},rb=["cursor","highlightStyle","listeners","nodeClickRange","showInLegend","showInMiniChart","tooltip","visible","xName","yName"],ob={enabled:s.zM,height:s.Ly,spacing:s.Ly,cornerRadius:s.ai,mask:{fill:s.yW,fillOpacity:s.CG,stroke:s.yW,strokeWidth:s.Ly},minHandle:sb,maxHandle:sb,miniChart:{enabled:s.zM,padding:{top:s.Ly,bottom:s.Ly},label:{enabled:s.zM,avoidCollisions:s.zM,spacing:s.Ly,format:ib,formatter:s.E2,interval:{minSpacing:s.Ly,maxSpacing:s.Ly,values:s.YO,step:s.ai},...s.LV},series:(0,s.J$)((0,s.is)({area:nb(XC.options,rb),bar:nb(ZC.options,[...rb,"errorBar","label","legendItemName","direction"]),"box-plot":nb(Ng.options,[...rb,"direction","legendItemName","minName","q1Name","medianName","q3Name","maxName"]),bubble:nb(QC.options,[...rb,"title","label","labelKey","labelName","sizeName"]),candlestick:nb(Zf.options,rb),heatmap:nb(Gm.options,[...rb,"title","label","colorName","textAlign","verticalAlign","itemPadding","colorRange"]),histogram:nb(JC.options,[...rb,"label"]),line:nb(eb.options,[...rb,"errorBar","title","label"]),ohlc:nb($m.options,rb),"range-area":nb(ay.options,[...rb,"label","yLowName","yHighName"]),"range-bar":nb(Jy.options,[...rb,"direction","label","yLowName","yHighName"]),scatter:nb(tb.options,[...rb,"errorBar","title","label","labelKey","labelName"]),waterfall:nb(qC.options,[...rb,"direction"])},"miniChart series options"))}},{annotationOptionsDef:ab}=n.n1,lb={type:"plugin",name:"annotations",chartType:"cartesian",options:ab,create:()=>null},cb={type:"plugin",name:"navigator",chartType:"cartesian",options:ob,create:()=>null},hb={type:"plugin",name:"initialState",options:jp,create:()=>null};function db(e,t,i){i||(t=function(e){const t=new Set;for(const i of e)ub(e,i,t,[]);return 0!==t.size&&s.Vy.warnOnce("Some links formed circular references. These will be removed from the output."),0===t.size?e:e.filter(e=>!t.has(e))}(t));const n=new Map;for(const t of e)n.set(t.id,{datum:t,linksBefore:[],linksAfter:[],maxPathLengthBefore:-1,maxPathLengthAfter:-1});let r=0;return n.forEach((e,i)=>{r=Math.max(r,pb(n,t,e,i,-1,[])+pb(n,t,e,i,1,[])+1)}),{links:t,nodeGraph:n,maxPathLength:r}}function ub(e,t,i,n){const s=n.indexOf(t);if(-1!==s){for(let e=s;e<n.length;e+=1)i.add(n[e]);return}n.push(t);const{toNode:r}=t;for(const t of e)t.fromNode===r&&ub(e,t,i,n);n.pop()}function pb(e,t,i,n,s,r){if(r.includes(n))return 1/0;let o=-1===s?i.maxPathLengthBefore:i.maxPathLengthAfter;if(-1===o){o=0;const a=-1===s?i.linksBefore:i.linksAfter;for(const i of t){const{fromNode:l,toNode:c}=i,h=-1===s?c.id:l.id,d=-1===s?l.id:c.id,u=n===h?e.get(d):void 0;null!=u&&(a.push({node:u,link:i}),r?.push(n),o=Math.max(o,pb(e,t,u,d,s,r)+1),r?.pop())}-1===s?i.maxPathLengthBefore=o:i.maxPathLengthAfter=o}return o}var{Series:gb,DataController:fb,keyProperty:mb,valueProperty:vb,Selection:yb,Group:Cb,TransformableText:bb}=n.n1,Sb=class extends n.n1.SeriesNodeEvent{constructor(e,t,i,n){super(e,t,i,n);const{datumIndex:s}=i,r=n.contextNodeData?.nodeData.find(e=>e.datumIndex.type===s.type&&e.datumIndex.index===s.index);this.size=r?.size,this.label=1===r?.type?r?.label:void 0}},wb=class extends gb{constructor(){super(...arguments),this.NodeEvent=Sb,this._chartNodes=void 0,this.nodeCount=0,this.linkCount=0,this.linksDataModel=void 0,this.linksProcessedData=void 0,this.nodesDataModel=void 0,this.nodesProcessedData=void 0,this.processedNodes=new Map,this.linkGroup=this.contentGroup.appendChild(new Cb({name:"linkGroup"})),this.nodeGroup=this.contentGroup.appendChild(new Cb({name:"nodeGroup"})),this.focusLinkGroup=this.highlightNode.appendChild(new Cb({name:"linkGroup"})),this.focusNodeGroup=this.highlightNode.appendChild(new Cb({name:"nodeGroup"})),this.highlightLinkGroup=this.highlightNode.appendChild(new Cb({name:"linkGroup"})),this.highlightNodeGroup=this.highlightNode.appendChild(new Cb({name:"nodeGroup"})),this.labelSelection=yb.select(this.labelGroup,bb),this.linkSelection=yb.select(this.linkGroup,()=>this.linkFactory()),this.nodeSelection=yb.select(this.nodeGroup,()=>this.nodeFactory()),this.focusLinkSelection=yb.select(this.focusLinkGroup,()=>this.linkFactory()),this.focusNodeSelection=yb.select(this.focusNodeGroup,()=>this.nodeFactory()),this.highlightLinkSelection=yb.select(this.highlightLinkGroup,()=>this.linkFactory()),this.highlightNodeSelection=yb.select(this.highlightNodeGroup,()=>this.nodeFactory())}get nodes(){return this.properties.nodes??this._chartNodes}setChartNodes(e){this._chartNodes=e,this.nodes===e&&(this.nodeDataRefresh=!0)}async processData(e){const{data:t,nodes:i}=this;if(null==t)return;const{fromKey:n,toKey:s,sizeKey:r,idKey:o,labelKey:a}=this.properties,l=new fb("standalone",e.suppressFieldDotNotation),c=null!=i?l.request(this.id,i,{props:[mb(o,void 0,{id:"idValue",includeProperty:!1}),...null!=a?[vb(a,void 0,{id:"labelValue",includeProperty:!1})]:[]],groupByKeys:!0}):null,h=e.request(this.id,t,{props:[vb(n,void 0,{id:"fromValue",includeProperty:!1}),vb(s,void 0,{id:"toValue",includeProperty:!1}),...null!=r?[vb(r,void 0,{id:"sizeValue",includeProperty:!1,missingValue:0})]:[]],groupByKeys:!1});null!=i&&l.execute();const[d,u]=await Promise.all([c,h]);this.nodesDataModel=d?.dataModel,this.nodesProcessedData=d?.processedData,this.linksDataModel=u?.dataModel,this.linksProcessedData=u?.processedData;const p=new Map;if(null==d){const e=u.dataModel.resolveColumnById(this,"fromValue",u.processedData),t=u.dataModel.resolveColumnById(this,"toValue",u.processedData),i=e=>{const t=p.size;return{series:this,itemId:void 0,datum:{},datumIndex:{type:1,index:t},type:1,index:t,linksBefore:[],linksAfter:[],id:e,size:0,label:e}};u.processedData.dataSources.get(this.id)?.forEach((n,s)=>{const r=e[s],o=t[s];null!=r&&null!=o&&(p.has(r)||p.set(r,i(r)),p.has(o)||p.set(o,i(o)))})}else{const e=d.dataModel.resolveColumnById(this,"idValue",d.processedData),t=null!=a?d.dataModel.resolveColumnById(this,"labelValue",d.processedData):void 0;d.processedData.dataSources.get(this.id)?.forEach((i,n)=>{const s=e[n],r=t?.[n];p.set(s,{series:this,itemId:void 0,datum:i,datumIndex:{type:1,index:n},type:1,index:n,linksBefore:[],linksAfter:[],id:s,size:0,label:r})})}this.processedNodes=p}getNodeGraph(e,t,{includeCircularReferences:i}){const{linksDataModel:n,linksProcessedData:s}=this;if(null==n||null==s){const{links:e,nodeGraph:t,maxPathLength:n}=db((new Map).values(),[],i);return this.nodeCount=0,this.linkCount=0,{nodeGraph:t,links:e,maxPathLength:n}}const{sizeKey:r}=this.properties,o=n.resolveColumnById(this,"fromValue",s),a=n.resolveColumnById(this,"toValue",s),l=null!=r?n.resolveColumnById(this,"sizeValue",s):void 0,c=new Map;this.processedNodes.forEach(t=>{const i=e(t);c.set(t.id,i)});const h=[];s.dataSources.get(this.id)?.forEach((e,i)=>{const n=o[i],s=a[i],r=null!=l?l[i]:1,d=c.get(n),u=c.get(s);if(r<=0||null==d||null==u)return;const p=t({series:this,itemId:void 0,datum:e,datumIndex:{type:0,index:i},type:0,index:i,fromNode:d,toNode:u,size:r});h.push(p)});const{links:d,nodeGraph:u,maxPathLength:p}=db(c.values(),h,i);return u.forEach(e=>{e.datum.linksBefore=e.linksBefore.map(e=>e.link),e.datum.linksAfter=e.linksAfter.map(e=>e.link)}),this.nodeCount=u.size,this.linkCount=d.length,{nodeGraph:u,links:d,maxPathLength:p}}updateSelections(){this.nodeDataRefresh&&(this.contextNodeData=this.createNodeData(),this.nodeDataRefresh=!1)}update(e){const{seriesRect:t}=e,i={seriesRectWidth:t?.width??0,seriesRectHeight:t?.height??0};null!=this._nodeDataDependencies&&this._nodeDataDependencies.seriesRectWidth===i.seriesRectWidth&&this._nodeDataDependencies.seriesRectHeight===i.seriesRectHeight||(this._nodeDataDependencies=i),this.updateSelections();const n=this.contextNodeData?.nodeData??[],s=this.contextNodeData?.labelData??[];let r,o,a,l,c=this.ctx.highlightManager?.getActiveHighlight();if(c?.series===this&&null==c.type){const{itemId:e}=c;c=null!=e?n.find(t=>1===t.type&&t.id===e):void 0}else c?.series!==this&&(c=void 0);this.contentGroup.visible=this.visible,this.contentGroup.opacity=null!=c?this.properties.highlightStyle.series.dimOpacity??1:1,this.labelSelection=this.updateLabelSelection({labelData:s,labelSelection:this.labelSelection}),this.updateLabelNodes({labelSelection:this.labelSelection}),this.linkSelection=this.updateLinkSelection({nodeData:n.filter(e=>0===e.type),datumSelection:this.linkSelection}),this.updateLinkNodes({datumSelection:this.linkSelection,isHighlight:!1}),this.nodeSelection=this.updateNodeSelection({nodeData:n.filter(e=>1===e.type),datumSelection:this.nodeSelection}),this.updateNodeNodes({datumSelection:this.nodeSelection,isHighlight:!1}),1===c?.type?(r=n.filter(e=>0===e.type&&(e.toNode===c||e.fromNode===c)),o=r.map(e=>e.fromNode===c?e.toNode:e.fromNode),o.push(c),a=[],l=[c]):0===c?.type?(r=[c],o=[c.fromNode,c.toNode],a=[c],l=[]):(r=[],o=[],a=[],l=[]),this.focusLinkSelection=this.updateLinkSelection({nodeData:r,datumSelection:this.focusLinkSelection}),this.updateLinkNodes({datumSelection:this.focusLinkSelection,isHighlight:!1}),this.focusNodeSelection=this.updateNodeSelection({nodeData:o,datumSelection:this.focusNodeSelection}),this.updateNodeNodes({datumSelection:this.focusNodeSelection,isHighlight:!1}),this.highlightLinkSelection=this.updateLinkSelection({nodeData:a,datumSelection:this.highlightLinkSelection}),this.updateLinkNodes({datumSelection:this.highlightLinkSelection,isHighlight:!0}),this.highlightNodeSelection=this.updateNodeSelection({nodeData:l,datumSelection:this.highlightNodeSelection}),this.updateNodeNodes({datumSelection:this.highlightNodeSelection,isHighlight:!0})}resetAnimation(e){}getSeriesDomain(e){return[]}getSeriesRange(e,t){return[NaN,NaN]}legendItemSymbol(e,t,i={}){const{fills:n,strokes:s}=this.properties,{fill:r=n[t%n.length],fillOpacity:o=1,stroke:a=s[t%s.length],strokeWidth:l=0,strokeOpacity:c=1,lineDash:h=[0],lineDashOffset:d=0}=i;return{marker:{fill:r,fillOpacity:o,stroke:a,strokeWidth:l,strokeOpacity:c,lineDash:h,lineDashOffset:d}}}getLegendData(e){if("category"!==e)return[];const{showInLegend:t}=this.properties;return Array.from(this.processedNodes.values(),({id:e,label:i},n)=>({legendType:"category",id:this.id,itemId:e,seriesId:this.id,enabled:!0,label:{text:i??e},symbol:this.legendItemSymbol(1,n),hideInLegend:!t,isFixed:!0}))}pickNodeClosestDatum({x:e,y:t}){let i,n=1/0;return this.linkSelection.each((s,r)=>{const o=s.containsPoint(e,t)?0:1/0;o<n&&(n=o,i=r)}),this.nodeSelection.each((s,r)=>{const o=s.distanceSquared(e,t);o<n&&(n=o,i=r)}),null!=i?{datum:i,distance:Math.sqrt(n)}:void 0}getDatumAriaText(e,t){return 0===e.type?this.ctx.localeManager.t("ariaAnnounceFlowProportionLink",{index:e.index+1,count:this.linkCount,from:e.fromNode.id,to:e.toNode.id,size:e.size,sizeName:this.properties.sizeName??this.properties.sizeKey}):1===e.type?this.ctx.localeManager.t("ariaAnnounceFlowProportionNode",{index:e.index+1,count:this.nodeCount,description:t}):void 0}pickFocus(e){const{datumIndexDelta:t,otherIndexDelta:i}=e,n=this.contextNodeData?.nodeData[e.datumIndex-e.datumIndexDelta];let s=n;if(0!==i||0===t)return;if(0===n?.type){const e=Array.from(this.linkSelection,e=>e.datum),i=e.indexOf(n)+t;if(i>=0&&i<e.length)s=e[i];else if(i>0)s=e[e.length-1];else{const e=Array.from(this.nodeSelection,e=>e.datum);s=e[e.length-1]}}else if(1===n?.type){const e=Array.from(this.nodeSelection,e=>e.datum),i=e.indexOf(n)+t;if(i>=0&&i<e.length)s=e[i];else if(i<0)s=e[0];else{const e=Array.from(this.linkSelection,e=>e.datum);s=e[0]}}if(null==s)return;const r=1===s.type?Array.from(this.nodeSelection).find(e=>e.datum===s):Array.from(this.linkSelection).find(e=>e.datum===s);if(null==r)return;const o=this.computeFocusBounds(r.node);return null!=o?{datum:r.datum,datumIndex:this.contextNodeData?.nodeData.indexOf(r.datum)??0,otherIndex:0,bounds:o,clipFocusBox:!0}:void 0}getCategoryValue(e){}datumIndexForCategoryValue(e){}},{Path:xb,SceneChangeDetection:Eb}=n.n1;function Mb({radius:e,startAngle:t,endAngle:i,tension:n}){const s=e*Math.cos(t),r=e*Math.sin(t),o=e*Math.cos(i),a=e*Math.sin(i);return{x:[s,s*n,o*n,o],y:[r,r*n,a*n,a]}}var Ab=class extends xb{constructor(){super(...arguments),this.centerX=0,this.centerY=0,this.radius=0,this.startAngle1=0,this.endAngle1=0,this.startAngle2=0,this.endAngle2=0,this.tension=1}tensionedCurveTo(e,t,i,n,s,r,o,a){const{path:l,tension:c}=this,h=1-c;l.cubicCurveTo((i-e)*h+e,(n-t)*h+t,(s-o)*h+o,(r-a)*h+a,o,a)}updatePath(){const{path:e,centerX:t,centerY:i,radius:n}=this;let{startAngle1:s,endAngle1:r,startAngle2:o,endAngle2:a}=this;s>o&&([s,o]=[o,s],[r,a]=[a,r]),e.clear();const l=t+n*Math.cos(s),c=i+n*Math.sin(s);e.moveTo(l,c),this.tensionedCurveTo(l,c,t,i,t,i,t+n*Math.cos(a),i+n*Math.sin(a)),e.arc(t,i,n,a,o,!0),this.tensionedCurveTo(t+n*Math.cos(o),i+n*Math.sin(o),t,i,t,i,t+n*Math.cos(r),i+n*Math.sin(r)),e.arc(t,i,n,r,s,!0),e.closePath()}};a([Eb()],Ab.prototype,"centerX",2),a([Eb()],Ab.prototype,"centerY",2),a([Eb()],Ab.prototype,"radius",2),a([Eb()],Ab.prototype,"startAngle1",2),a([Eb()],Ab.prototype,"endAngle1",2),a([Eb()],Ab.prototype,"startAngle2",2),a([Eb()],Ab.prototype,"endAngle2",2),a([Eb()],Ab.prototype,"tension",2);var{FillGradientDefaults:Tb,FillPatternDefaults:Db,FillImageDefaults:Ib,BaseProperties:Rb,SeriesTooltip:Lb,SeriesProperties:kb,Property:Pb,Label:Nb}=n.n1,Ob=class extends Nb{constructor(){super(...arguments),this.spacing=1,this.maxWidth=1}};a([Pb],Ob.prototype,"spacing",2),a([Pb],Ob.prototype,"maxWidth",2);var _b=class extends Rb{constructor(){super(...arguments),this.fill=void 0,this.fillOpacity=1,this.stroke=void 0,this.strokeOpacity=1,this.strokeWidth=1,this.lineDash=[0],this.lineDashOffset=0,this.tension=0}};a([Pb],_b.prototype,"fill",2),a([Pb],_b.prototype,"fillOpacity",2),a([Pb],_b.prototype,"stroke",2),a([Pb],_b.prototype,"strokeOpacity",2),a([Pb],_b.prototype,"strokeWidth",2),a([Pb],_b.prototype,"lineDash",2),a([Pb],_b.prototype,"lineDashOffset",2),a([Pb],_b.prototype,"tension",2),a([Pb],_b.prototype,"itemStyler",2);var Fb=class extends Rb{constructor(){super(...arguments),this.spacing=1,this.width=1,this.fill=void 0,this.fillOpacity=1,this.stroke=void 0,this.strokeOpacity=1,this.strokeWidth=1,this.lineDash=[0],this.lineDashOffset=0}};a([Pb],Fb.prototype,"spacing",2),a([Pb],Fb.prototype,"width",2),a([Pb],Fb.prototype,"fill",2),a([Pb],Fb.prototype,"fillOpacity",2),a([Pb],Fb.prototype,"stroke",2),a([Pb],Fb.prototype,"strokeOpacity",2),a([Pb],Fb.prototype,"strokeWidth",2),a([Pb],Fb.prototype,"lineDash",2),a([Pb],Fb.prototype,"lineDashOffset",2),a([Pb],Fb.prototype,"itemStyler",2);var Gb=class extends kb{constructor(){super(...arguments),this.idKey="",this.idName=void 0,this.labelKey=void 0,this.labelName=void 0,this.sizeKey=void 0,this.sizeName=void 0,this.nodes=void 0,this.fillGradientDefaults=new Tb,this.fillPatternDefaults=new Db,this.fillImageDefaults=new Ib,this.fills=[],this.strokes=[],this.label=new Ob,this.link=new _b,this.node=new Fb,this.tooltip=new Lb}};a([Pb],Gb.prototype,"fromKey",2),a([Pb],Gb.prototype,"toKey",2),a([Pb],Gb.prototype,"idKey",2),a([Pb],Gb.prototype,"idName",2),a([Pb],Gb.prototype,"labelKey",2),a([Pb],Gb.prototype,"labelName",2),a([Pb],Gb.prototype,"sizeKey",2),a([Pb],Gb.prototype,"sizeName",2),a([Pb],Gb.prototype,"nodes",2),a([Pb],Gb.prototype,"fillGradientDefaults",2),a([Pb],Gb.prototype,"fillPatternDefaults",2),a([Pb],Gb.prototype,"fillImageDefaults",2),a([Pb],Gb.prototype,"fills",2),a([Pb],Gb.prototype,"strokes",2),a([Pb],Gb.prototype,"label",2),a([Pb],Gb.prototype,"link",2),a([Pb],Gb.prototype,"node",2),a([Pb],Gb.prototype,"tooltip",2);var{SeriesNodePickMode:Vb,CachedTextMeasurerPool:Bb,TextWrapper:Hb,TextUtils:zb,createDatumId:Ub,angleBetween:Wb,normalizeAngle360:jb,isBetweenAngles:Kb,Sector:$b,evaluateBezier:Yb,applyShapeStyle:qb,getShapeStyle:Xb,BBox:Zb}=n.n1,Qb=e=>e.startAngle+Wb(e.startAngle,e.endAngle)/2,Jb=class extends wb{constructor(e){super({moduleCtx:e,pickModes:[Vb.NEAREST_NODE,Vb.EXACT_SHAPE_MATCH]}),this.properties=new Gb}isLabelEnabled(){return(null!=this.properties.labelKey||null==this.nodes)&&this.properties.label.enabled}linkFactory(){return new Ab}nodeFactory(){return new $b}createNodeData(){const{id:e,_nodeDataDependencies:{seriesRectWidth:t,seriesRectHeight:i}={seriesRectWidth:0,seriesRectHeight:0}}=this,{fromKey:n,toKey:r,sizeKey:o,label:{spacing:a,maxWidth:l,fontSize:c},node:{width:h,spacing:d}}=this.properties,u=t/2,p=i/2;let g=[];const{nodeGraph:f,links:m}=this.getNodeGraph(e=>({...e,centerX:u,centerY:p,innerRadius:NaN,outerRadius:NaN,startAngle:NaN,endAngle:NaN}),e=>({...e,centerX:u,centerY:p,radius:NaN,startAngle1:NaN,endAngle1:NaN,startAngle2:NaN,endAngle2:NaN}),{includeCircularReferences:!0});let v=0;f.forEach(({datum:e,linksBefore:t,linksAfter:i},s)=>{const a=t.reduce((e,{link:t})=>e+t.size,0)+i.reduce((e,{link:t})=>e+t.size,0);if(0===a)f.delete(s);else{e.size=a,v+=e.size;const t=this.getLabelText(this.properties.label,{datum:e.datum,value:e.label,fromKey:n,toKey:r,sizeKey:o,size:e.size});e.label=String(t)}});let y=0;if(this.isLabelEnabled()){const e=this.properties.label.getFont();let t=0;f.forEach(({datum:i})=>{const{id:n,label:s}=i;if(null==s)return;const r=Hb.wrapText(s,{maxWidth:l,font:this.properties.label,textWrap:"never"}),{width:o}=Bb.measureText(r,{font:e,textAlign:"left",textBaseline:"middle"});t=Math.max(o,t),g.push({id:n,text:r,centerX:u,centerY:p,angle:NaN,radius:NaN})}),y=t+a}const C=f.size;let b=Math.min(t,i)/2-h-y,S=d/b;if(0!==y&&(C*S>=1.5*Math.PI||b<=0)&&(g=[],b=Math.min(t,i)/2-h,S=d/b),C*S>=2*Math.PI||b<=0)return void s.Vy.warnOnce("There was insufficient space to display the Chord Series.");const w=b,x=b+h,E=Math.max((2*Math.PI-C*S)/v,0);let M=0;f.forEach(({datum:e})=>{e.innerRadius=w,e.outerRadius=x,e.startAngle=M,e.endAngle=M+e.size*E,M=e.endAngle+S;const t=(e.innerRadius+e.outerRadius)/2,i=Qb(e);e.midPoint={x:e.centerX+t*Math.cos(i),y:e.centerY+t*Math.sin(i)}});const A=[];f.forEach(({datum:e,linksBefore:t,linksAfter:i})=>{const n=Qb(e),s=[...t.map(e=>({link:e.link,distance:Wb(Qb(e.node.datum),n),after:!1})),...i.map(e=>({link:e.link,distance:Wb(Qb(e.node.datum),n),after:!0}))];let r=e.startAngle;s.toSorted((e,t)=>e.distance-t.distance).forEach(({link:e,after:t})=>{const i=e.size*E;t?(e.startAngle1=r,e.endAngle1=r+i):(e.startAngle2=r,e.endAngle2=r+i),r+=e.size*E}),A.push(e)});const{tension:T}=this.properties.link;m.forEach(e=>{e.radius=b;const t=Mb({radius:b,startAngle:e.startAngle1,endAngle:e.endAngle2,tension:T}),i=Mb({radius:b,startAngle:e.startAngle2,endAngle:e.endAngle1,tension:T}),n=Yb(...t.x,.5),s=Yb(...t.y,.5),r=Yb(...i.x,.5),o=Yb(...i.y,.5);e.midPoint={x:e.centerX+(n+r)/2,y:e.centerY+(s+o)/2},A.push(e)}),g.forEach(e=>{const t=f.get(e.id)?.datum;null!=t&&(e.radius=x+a,e.angle=jb(t.startAngle+Wb(t.startAngle,t.endAngle)/2))}),g.sort((e,t)=>e.angle-t.angle);let D=1/0,I=-1/0;return g=g.filter(e=>{const t=zb.getLineHeight(c),i=Math.atan2(t/2,e.radius),n=e.angle-i,s=e.angle+i;return!Kb(D,n,s)&&!Kb(I,n,s)&&(D=Math.min(n,D),I=Math.max(s,I),!0)}),{itemId:e,nodeData:A,labelData:g}}updateLabelSelection(e){const t=this.isLabelEnabled()?e.labelData:[];return e.labelSelection.update(t)}updateLabelNodes(e){const{labelSelection:t}=e,{color:i,fontStyle:n,fontWeight:s,fontSize:r,fontFamily:o}=this.properties.label;t.each((e,{text:t,centerX:a,centerY:l,radius:c,angle:h})=>{e.visible=!0,e.translationX=a+c*Math.cos(h),e.translationY=l+c*Math.sin(h),e.text=t,e.fill=i,e.fontStyle=n,e.fontWeight=s,e.fontSize=r,e.fontFamily=o,e.textBaseline="middle",Math.cos(h)>=0?(e.textAlign="left",e.rotation=h):(e.textAlign="right",e.rotation=h-Math.PI)})}updateNodeSelection(e){return e.datumSelection.update(e.nodeData,void 0,e=>Ub([e.type,e.id]))}getBaseNodeStyle(e){const{properties:t}=this,{fill:i,fillOpacity:n,stroke:s,strokeOpacity:r,lineDash:o,lineDashOffset:a}=t.node,l=e?t.highlightStyle.item:void 0;return Xb({fill:l?.fill??i,fillOpacity:l?.fillOpacity??n,stroke:l?.stroke??s,strokeOpacity:l?.strokeOpacity??r,strokeWidth:l?.strokeWidth??this.getStrokeWidth(t.node.strokeWidth),lineDash:l?.lineDash??o,lineDashOffset:l?.lineDashOffset??a},this.properties.fillGradientDefaults,this.properties.fillPatternDefaults,this.properties.fillImageDefaults)}getNodeStyleOverrides(e,t,i,n,s,r,o){const{id:a,properties:l}=this,{fills:c,strokes:h}=l,{itemStyler:d}=l.node,u=r.fill??c[i%c.length],p=r.stroke??h[i%h.length];let g;if(o||(g??(g={}),g.fill=u,g.stroke=p),null!=d){const i=this.cachedDatumCallback(Ub(e,"node",o?"highlight":"node"),()=>{const{fillOpacity:e=1,strokeOpacity:i=1,strokeWidth:l=0,lineDash:c=[],lineDashOffset:h=0}=r;return this.callWithContext(d,{seriesId:a,datum:t,highlighted:o,label:s,size:n,fill:u,fillOpacity:e,stroke:p,strokeOpacity:i,strokeWidth:l,lineDash:c,lineDashOffset:h})});g??(g={}),Object.assign(g,i)}return Xb(g,this.properties.fillGradientDefaults,this.properties.fillPatternDefaults,this.properties.fillImageDefaults)}updateNodeNodes(e){const{datumSelection:t,isHighlight:i}=e,n=this.getBaseNodeStyle(i),s=this.getShapeFillBBox();t.each((e,t)=>{const{datumIndex:r,size:o,label:a}=t,l=this.getNodeStyleOverrides(String(r.index),t.datum,r.index,o,a,n,i);qb(e,n,l,s),e.centerX=t.centerX,e.centerY=t.centerY,e.innerRadius=t.innerRadius,e.outerRadius=t.outerRadius,e.startAngle=t.startAngle,e.endAngle=t.endAngle,e.inset=e.strokeWidth/2})}updateLinkSelection(e){return e.datumSelection.update(e.nodeData,void 0,e=>Ub([e.type,e.index,e.fromNode.id,e.toNode.id]))}getBaseLinkStyle(e){const{properties:t}=this,{fill:i,fillOpacity:n,stroke:s,strokeOpacity:r,lineDash:o,lineDashOffset:a,tension:l}=t.link,c=e?t.highlightStyle.item:void 0;return Xb({fill:c?.fill??i,fillOpacity:c?.fillOpacity??n,stroke:c?.stroke??s,strokeOpacity:c?.strokeOpacity??r,strokeWidth:c?.strokeWidth??this.getStrokeWidth(t.link.strokeWidth),lineDash:c?.lineDash??o,lineDashOffset:c?.lineDashOffset??a,tension:l},this.properties.fillGradientDefaults,this.properties.fillPatternDefaults,this.properties.fillImageDefaults)}getLinkStyleOverrides(e,t,i,n,s){const{id:r,properties:o}=this,{fills:a,strokes:l}=o,{itemStyler:c}=o.link,h=n.fill??a[i%a.length],d=n.stroke??l[i%l.length];let u;if(s||(u??(u={}),u.fill=h,u.stroke=d),null!=c){const i=this.cachedDatumCallback(Ub(e,"link",s?"highlight":"node"),()=>{const{fillOpacity:e=1,strokeOpacity:i=1,strokeWidth:o=0,lineDash:a=[],lineDashOffset:l=0,tension:u}=n;return this.callWithContext(c,{seriesId:r,datum:t,highlighted:s,tension:u,fill:h,fillOpacity:e,stroke:d,strokeOpacity:i,strokeWidth:o,lineDash:a,lineDashOffset:l})});u??(u={}),Object.assign(u,i)}return Xb(u,this.properties.fillGradientDefaults,this.properties.fillPatternDefaults,this.properties.fillImageDefaults)}updateLinkNodes(e){const{datumSelection:t,isHighlight:i}=e,n=this.getBaseLinkStyle(i),s=this.getShapeFillBBox();t.each((e,t)=>{const{datumIndex:r}=t,o=t.fromNode.datumIndex,a=this.getLinkStyleOverrides(String(r.index),t.datum,o.index,n,i);e.centerX=t.centerX,e.centerY=t.centerY,e.radius=t.radius,e.startAngle1=t.startAngle1,e.endAngle1=t.endAngle1,e.startAngle2=t.startAngle2,e.endAngle2=t.endAngle2,qb(e,n,a,s),e.tension=a?.tension??n.tension})}getShapeFillBBox(){const e=this._nodeDataDependencies?.seriesRectWidth??0,t=this._nodeDataDependencies?.seriesRectHeight??0,i=Math.min(e,t),n=new Zb((e-i)/2,(t-i)/2,e,t);return{series:n,axis:n}}getTooltipContent(e){const{id:t,linksProcessedData:i,nodesProcessedData:n,properties:s}=this,{fromKey:r,toKey:o,sizeKey:a,sizeName:l,tooltip:c}=s,h=this.contextNodeData?.nodeData.find(t=>t.datumIndex.type===e.type&&t.datumIndex.index===e.index);if(null==h)return;const d=0===h.type?h.fromNode.index:h.index,u=0===h.type?`${h.fromNode.label} - ${h.toNode.label}`:h.label,p=0===e.type?i?.dataSources.get(this.id)?.[e.index]:n?.dataSources.get(this.id)?.[e.index],g=h.size;let f;if(0===h.type){const t=h.fromNode.datumIndex,i=this.getBaseLinkStyle(!1);Object.assign(i,this.getLinkStyleOverrides(String(e.index),p,t.index,i,!1)),f=i}else{const t=h.label,i=this.getBaseNodeStyle(!1);Object.assign(i,this.getNodeStyleOverrides(String(e.index),p,e.index,g,t,i,!1)),f=i}return this.formatTooltipWithContext(c,{title:u,symbol:this.legendItemSymbol(h.type,d,f),data:null!=a?[{label:l,fallbackLabel:a,value:String(g)}]:[]},{seriesId:t,datum:p,title:u,fromKey:r,toKey:o,sizeKey:a,sizeName:l,size:g,...f})}computeFocusBounds(e){return e}};Jb.className="ChordSeries",Jb.type="chord";var{commonSeriesOptionsDefs:eS,chordSeriesThemeableOptionsDef:tS}=n.n1,iS={...tS,...eS,type:(0,s.mw)((0,s.dY)("chord")),fromKey:(0,s.mw)(s.Yj),toKey:(0,s.mw)(s.Yj),sizeKey:s.Yj,sizeName:s.Yj};iS.fillGradientDefaults=(0,s._L)(s.wi),iS.fillPatternDefaults=(0,s._L)(s.GY),iS.fillImageDefaults=(0,s._L)(s.Zd);var nS={type:"series",optionsKey:"series[]",packageType:"enterprise",chartTypes:["flow-proportion"],solo:!0,identifier:"chord",tooltipDefaults:{range:"exact"},moduleFactory:e=>new Jb(e),themeTemplate:{series:{fills:{$palette:"fills"},strokes:{$palette:"strokes"},fillGradientDefaults:{type:"gradient",gradient:"linear",bounds:"item",colorStops:{$palette:"gradient"},rotation:0,reverse:!1},fillPatternDefaults:n.n1.FILL_PATTERN_DEFAULTS,fillImageDefaults:n.n1.FILL_IMAGE_DEFAULTS,highlightStyle:{series:{dimOpacity:.2}},label:{fontFamily:{$ref:"fontFamily"},fontSize:{$ref:"fontSize"},fontWeight:{$ref:"fontWeight"},color:{$ref:"textColor"},spacing:5,maxWidth:100},node:{spacing:8,width:10,strokeWidth:0},link:{fillOpacity:.5,strokeWidth:0,tension:.4}},legend:{enabled:!1,toggleSeries:!1}}},sS={type:"series",name:"chord",chartType:"flow-proportion",enterprise:!0,options:iS,create:e=>new Jb(e)},{ThemeConstants:{CARTESIAN_AXIS_TYPE:rS,CARTESIAN_POSITION:oS},ThemeSymbols:{DEFAULT_SHADOW_COLOUR:aS}}=n.n1,lS={$if:[{$eq:[{$path:["/direction",void 0]},"horizontal"]},[{type:rS.NUMBER,position:oS.LEFT},{type:rS.CATEGORY,position:{$if:[{$eq:[{$path:["/stageLabel/placement",void 0]},"before"]},oS.TOP,oS.BOTTOM]},label:{$omit:[["placement"],{$path:["/stageLabel",void 0]}]}}],[{type:rS.CATEGORY,position:{$if:[{$eq:[{$path:["/stageLabel/placement",void 0]},"after"]},oS.RIGHT,oS.LEFT]},label:{$omit:[["placement"],{$path:["/stageLabel",void 0]}]}},{type:rS.NUMBER,position:oS.BOTTOM}]]},cS={series:{direction:"vertical",strokeWidth:0,spacingRatio:.25,fills:[{$palette:"fill"}],strokes:[{$palette:"stroke"}],fillGradientDefaults:{type:"gradient",gradient:"linear",bounds:"item",colorStops:{$palette:"gradient"},rotation:0,reverse:!1},fillPatternDefaults:n.n1.FILL_PATTERN_DEFAULTS,fillImageDefaults:n.n1.FILL_IMAGE_DEFAULTS,label:{enabled:!0,fontSize:{$ref:"fontSize"},fontFamily:{$ref:"fontFamily"},fontWeight:{$ref:"fontWeight"},color:{$ref:"backgroundColor"}},dropOff:{enabled:!0,fillOpacity:.2,strokeWidth:0},shadow:{enabled:!1,color:aS,xOffset:3,yOffset:3,blur:5}},axes:{[rS.NUMBER]:{nice:!1,gridLine:{enabled:!1},crosshair:{enabled:!1},label:{enabled:!1,formatter:e=>Math.abs(e.value).toFixed(e.fractionDigits??0)}},[rS.CATEGORY]:{line:{enabled:!1}}}},{lineDistanceSquared:hS,BBox:dS,Path:uS,SceneChangeDetection:pS}=n.n1,gS=1e-6;function fS([e,t],[i,n]){return Math.abs(e-i)<=gS&&Math.abs(t-n)<=gS}var mS=class extends uS{constructor(){super(...arguments),this.x0=0,this.y0=0,this.x1=0,this.y1=0,this.x2=0,this.y2=0,this.x3=0,this.y3=0}get midPoint(){const{x0:e,y0:t,x1:i,y1:n,x2:s,y2:r,x3:o,y3:a}=this;return{x:(e+i+s+o)/4,y:(t+n+r+a)/4}}distanceSquared(e,t){if(this.containsPoint(e,t))return 0;const{x0:i,y0:n,x1:s,y1:r,x2:o,y2:a,x3:l,y3:c}=this;return Math.min(hS(e,t,i,n,s,r,1/0),hS(e,t,s,r,o,a,1/0),hS(e,t,o,a,l,c,1/0),hS(e,t,l,c,i,n,1/0))}computeBBox(){const{x0:e,y0:t,x1:i,y1:n,x2:s,y2:r,x3:o,y3:a}=this,l=Math.min(e,i,s,o),c=Math.max(e,i,s,o)-l,h=Math.min(t,n,r,a),d=Math.max(t,n,r,a)-h;return new dS(l,h,c,d)}updatePath(){const{path:e,x0:t,y0:i,x1:n,y1:s,x2:r,y2:o,x3:a,y3:l}=this,c=[[t,i],[n,s],[r,o],[a,l]];let h,d;e.clear(),c.forEach(t=>{if(null!=h&&fS(h,t)||null!=d&&fS(d,t))return;const[i,n]=t;null==h?e.moveTo(i,n):e.lineTo(i,n),h??(h=t),d=t}),e.closePath()}};a([pS()],mS.prototype,"x0",2),a([pS()],mS.prototype,"y0",2),a([pS()],mS.prototype,"x1",2),a([pS()],mS.prototype,"y1",2),a([pS()],mS.prototype,"x2",2),a([pS()],mS.prototype,"y2",2),a([pS()],mS.prototype,"x3",2),a([pS()],mS.prototype,"y3",2);var{NODE_UPDATE_STATE_TO_PHASE_MAPPING:vS}=n.n1;function yS(e,t,i,n){const{x0:s,y0:r,x1:o,y1:a,x2:l,y2:c,x3:h,y3:d,opacity:u}=e;return i?{x0:(s+h)/2,y0:(r+d)/2,x1:(o+l)/2,y1:(a+c)/2,x2:(o+l)/2,y2:(a+c)/2,x3:(s+h)/2,y3:(r+d)/2,opacity:u}:{x0:(s+o)/2,y0:(r+a)/2,x1:(s+o)/2,y1:(r+a)/2,x2:(l+h)/2,y2:(c+d)/2,x3:(l+h)/2,y3:(c+d)/2,opacity:u}}function CS(e,t){const{x0:i,y0:n,x1:s,y1:r,x2:o,y2:a,x3:l,y3:c,opacity:h}=t;return{x0:i,y0:n,x1:s,y1:r,x2:o,y2:a,x3:l,y3:c,opacity:h}}var{SeriesNodePickMode:bS,SeriesZIndexMap:SS,valueProperty:wS,keyProperty:xS,ChartAxisDirection:ES,updateLabelNode:MS,SMALLEST_KEY_INTERVAL:AS,LARGEST_KEY_INTERVAL:TS,diff:DS,fixNumericExtent:IS,seriesLabelFadeInAnimation:RS,resetMotion:LS,resetLabelFn:kS,animationValidation:PS,computeBarFocusBounds:NS,ContinuousScale:OS,Group:_S,Selection:FS,PointerEvents:GS,motion:VS,checkCrisp:BS,createDatumId:HS,applyShapeStyle:zS,getShapeStyle:US,getShapeFill:WS}=n.n1,jS=class extends n.n1.SeriesNodeEvent{constructor(e,t,i,n){super(e,t,i,n),this.xKey=n.properties.stageKey,this.yKey=n.properties.valueKey}},KS=class extends n.n1.AbstractBarSeries{constructor({moduleCtx:e,animationResetFns:t}){super({moduleCtx:e,pickModes:[bS.AXIS_ALIGNED,bS.EXACT_SHAPE_MATCH],hasHighlightedLabels:!0,directionKeys:{x:["stageKey"],y:["valueKey"]},directionNames:{x:[],y:[]},categoryKey:"xValue",datumSelectionGarbageCollection:!1,animationResetFns:{datum:t.datum,label:kS}}),this.NodeEvent=jS,this.connectorNodeGroup=this.contentGroup.appendChild(new _S({name:`${this.id}-series-connectorNodes`,zIndex:SS.BACKGROUND})),this.connectorSelection=FS.select(this.connectorNodeGroup,()=>this.connectionFactory()),this.connectorNodeGroup.pointerEvents=GS.None}get pickModeAxis(){return"main-category"}setSeriesIndex(e){return!!super.setSeriesIndex(e)&&(this.connectorNodeGroup.zIndex=[SS.BACKGROUND,e],!0)}isVertical(){return!super.isVertical()}connectionFactory(){return new mS}async processData(e){const{stageKey:t,valueKey:i}=this.properties,{visible:n,id:s}=this,r=this.getCategoryAxis()?.scale,o=this.getValueAxis()?.scale,{isContinuousX:a,xScaleType:l,yScaleType:c}=this.getScaleInformation({xScale:r,yScale:o}),h=[];this.ctx.animationManager.isSkipped()||(this.processedData&&h.push(DS(this.id,this.processedData)),h.push(PS()));const d=this.visible?{}:{forceValue:0},{processedData:u}=await this.requestDataModel(e,this.data,{props:[xS(t,l,{id:"xValue"}),wS(i,c,{id:"yValue",...d,validation:(e,t,i)=>n&&this.ctx.legendManager.getItemEnabled({seriesId:s,itemId:i}),invalidValue:0}),...a?[AS,TS]:[],...h],groupByKeys:!1});this.smallestDataInterval=u.reduced?.smallestKeyInterval,this.largestDataInterval=u.reduced?.largestKeyInterval,this.animationState.transition("updateData")}getSeriesDomain(e){const{processedData:t,dataModel:i,id:n,ctx:{legendManager:s}}=this;if(!t||!i)return[];const{keys:[r]}=t.domain;if(e===this.getCategoryDirection()){const e=i.resolveProcessedDataDefById(this,"xValue");return"key"===e?.def.type&&"category"===e?.def.valueType?this.hasData?r.filter((e,t)=>s.getItemEnabled({seriesId:n,itemId:t})):[]:this.padBandExtent(r)}{const t=this.domainForClippedRange(e,["yValue"],"xValue",!0),i=Math.max(...t);return IS([-i,i])}}getSeriesRange(e,t){return[NaN,NaN]}createNodeData(){const{hasData:e,data:t,dataModel:i,groupScale:n,processedData:s,id:r,ctx:{legendManager:o}}=this,a=this.getCategoryAxis(),l=this.getValueAxis();if(!(e&&t&&a&&l&&i&&"ungrouped"===s?.type))return;const c=a.scale,h=l.scale,d=this.getBarDirection()===ES.X,{stageKey:u,valueKey:p}=this.properties,{strokeWidth:g}=this.barStyle(),f=`${p}`,m={itemId:f,nodeData:[],labelData:[],connectorData:[],scales:this.calculateScaling(),groupScale:this.getScaling(this.groupScale),visible:this.visible},v=this.visible;if(!v)return m;const y=i.resolveKeysById(this,"xValue",s),C=i.resolveColumnById(this,"yValue",s),{barWidth:b,groupIndex:S}=this.updateGroupScale(a),w=OS.is(c)?-.5*b:0,x=BS(a?.scale,a?.visibleRange,this.smallestDataInterval,this.largestDataInterval);let E;return(s.dataSources.get(this.id)??[]).forEach((e,t)=>{const i=v&&o.getItemEnabled({seriesId:r,itemId:t}),s=y[t];if(null==s)return;const a=Math.round(c.convert(s))+n.convert(String(S))+w,l=C[t],M=Math.round(h.convert(-l)),A=Math.round(h.convert(l)),T=Math.max(g,Math.abs(A-M)),D={x:d?Math.min(A,M):a,y:d?a:Math.min(A,M),width:d?T:b,height:d?b:T},I={x:D.x+D.width/2,y:D.y+D.height/2},R=this.createLabelData({datumIndex:t,rect:D,barAlongX:d,yDatum:l,datum:e,visible:i}),L={index:t,series:this,itemId:f,datum:e,datumIndex:t,xValue:s,yValue:l,xKey:u,yKey:p,x:D.x,y:D.y,width:D.width,height:D.height,midPoint:I,strokeWidth:g,crisp:x,label:R,visible:i};if(m.nodeData.push(L),null!=R&&m.labelData.push(R),null!=E){const e=E.rect,t=E.nodeDatum,i=E.datumIndex;d?m.connectorData.push({datum:t,datumIndex:i,x0:e.x,y0:e.y+e.height,x1:e.x+e.width,y1:e.y+e.height,x2:D.x+D.width,y2:D.y,x3:D.x,y3:D.y,opacity:1}):m.connectorData.push({datum:t,datumIndex:i,x0:e.x+e.width,y0:e.y,x1:D.x,y1:D.y,x2:D.x,y2:D.y+D.height,x3:e.x+e.width,y3:e.y+e.height,opacity:1})}i&&(E={itemId:f,rect:D,nodeDatum:L,datumIndex:t})}),m}updateNodes(e,t,i){super.updateNodes(e,t,i);const{connectorSelection:n}=this,s=this.contextNodeData?.connectorData??[];this.connectorSelection=this.updateConnectorSelection({connectorSelection:n,connectorData:s}),this.updateConnectorNodes({connectorSelection:n})}updateDatumSelection(e){const{nodeData:t,datumSelection:i}=e,n=t??[];return i.update(n,void 0,e=>this.getDatumId(e))}updateConnectorSelection(e){const{connectorData:t,connectorSelection:i}=e;return i.update(this.connectorEnabled()?t:[],void 0,e=>this.getDatumId(e.datum))}updateConnectorNodes(e){const{fills:t,strokes:i,fillGradientDefaults:n,fillPatternDefaults:s,fillImageDefaults:r}=this.properties,{fill:o,fillOpacity:a,stroke:l,strokeOpacity:c,strokeWidth:h,lineDash:d,lineDashOffset:u}=this.connectorStyle(),p=this.getShapeFillBBox();e.connectorSelection.each((e,g)=>{const{datumIndex:f}=g;e.setProperties(CS(0,g));const m=WS(o??t[f%t.length],n,s,r);zS(e,{fill:m,stroke:l??i[f%i.length],fillOpacity:a,strokeOpacity:c,strokeWidth:h,lineDash:d,lineDashOffset:u},void 0,p)})}getHighlightLabelData(e,t){const i=e.filter(e=>e.datum===t.datum);return i.length>0?i:void 0}updateLabelSelection(e){const t=this.properties.label.enabled?e.labelData:[];return e.labelSelection.update(t,e=>{e.pointerEvents=GS.None})}updateLabelNodes(e){e.labelSelection.each((e,t)=>{MS(e,this.properties.label,t)})}getTooltipContent(e){const{id:t,dataModel:i,processedData:n,properties:s}=this,{stageKey:r,valueKey:o,tooltip:a}=s,l=this.getCategoryAxis(),c=this.getValueAxis();if(!(i&&n&&l&&c))return;const h=n.dataSources.get(this.id)?.[e],d=i.resolveKeysById(this,"xValue",n)[e],u=i.resolveColumnById(this,"yValue",n)[e];return null!=d?this.formatTooltipWithContext(a,{symbol:this.legendItemSymbol(e),data:[{label:l.formatDatum(d),value:c.formatDatum(u)}]},{seriesId:t,datum:h,title:r,stageKey:r,valueKey:o,...this.tooltipStyle(h,e)}):void 0}resetAllAnimation(e){super.resetAllAnimation(e),LS([this.connectorSelection],CS)}animateEmptyUpdateReady({labelSelection:e}){const{connectorSelection:t}=this,i=function(e){const t=e=>null==e;return{fromFn:(i,n,s)=>{let r;"updated"===s&&t(n)?s="removed":"updated"===s&&t(i.previousDatum)&&(s="added"),"added"===s&&i.previousDatum,r="unknown"===s||"added"===s?yS(n,i.previousDatum,e):{x0:i.x0,y0:i.y0,x1:i.x1,y1:i.y1,x2:i.x2,y2:i.y2,x3:i.x3,y3:i.y3,opacity:i.opacity};const o=vS[s];return{...r,phase:o}},toFn:(i,n,s)=>{let r;return"removed"===s&&i.datum,r="removed"===s||t(n)?yS(n,i.previousDatum,e):CS(0,n),r}}}(this.isVertical());VS.fromToMotion(this.id,"connectors",this.ctx.animationManager,[t],i),RS(this,"labels",this.ctx.animationManager,e)}animateWaitingUpdateReady(e){const{labelSelection:t}=e;this.ctx.animationManager.stopByAnimationGroupId(this.id),RS(this,"labels",this.ctx.animationManager,t)}getDatumId(e){return HS(e.xValue)}isLabelEnabled(){return this.properties.label.enabled}computeFocusBounds({datumIndex:e}){return NS(this,this.contextNodeData?.nodeData[e])}legendItemSymbol(e){const{strokeWidth:t,fillOpacity:i,strokeOpacity:n,lineDash:s,lineDashOffset:r,fillGradientDefaults:o,fillPatternDefaults:a,fillImageDefaults:l}=this.barStyle(),{fills:c,strokes:h}=this.properties,d=c[e%c.length]??"black",u=h[e%h.length]??"black";return{marker:US({fill:d,fillOpacity:i,stroke:u,strokeWidth:t,strokeOpacity:n,lineDash:s,lineDashOffset:r},o,a,l)}}getLegendData(e){const{id:t,processedData:i,dataModel:n,ctx:{legendManager:s},visible:r}=this;if(!n||!i||"category"!==e)return[];const{showInLegend:o}=this.properties,a=n.resolveKeysById(this,"xValue",i);return(i.dataSources.get(this.id)??[]).map((e,i)=>{const n=a[i];if(null!=n)return{legendType:"category",id:t,datum:e,itemId:i,seriesId:t,enabled:r&&s.getItemEnabled({seriesId:t,itemId:i}),label:{text:String(n)},symbol:this.legendItemSymbol(i),skipAnimations:!0,hideInLegend:!o}}).filter(e=>null!=e)}},{FillGradientDefaults:$S,FillPatternDefaults:YS,FillImageDefaults:qS,Label:XS,AbstractBarSeriesProperties:ZS,SeriesTooltip:QS,AxisLabel:JS,Property:ew}=n.n1,tw=class extends XS{constructor(){super(...arguments),this.spacing=0}};a([ew],tw.prototype,"placement",2),a([ew],tw.prototype,"spacing",2);var iw=class extends JS{};a([ew],iw.prototype,"placement",2);var nw=class extends ZS{constructor(){super(...arguments),this.fills=[],this.fillGradientDefaults=new $S,this.fillPatternDefaults=new YS,this.fillImageDefaults=new qS,this.fillOpacity=1,this.strokes=[],this.strokeWidth=1,this.strokeOpacity=1,this.lineDash=[0],this.lineDashOffset=0,this.label=new tw,this.stageLabel=new iw,this.tooltip=new QS}};function sw(e,{x:t,y:i,width:n,height:s,opacity:r}){return{x1:t,y1:i,x2:t+n,y2:i+s,opacity:r}}a([ew],nw.prototype,"stageKey",2),a([ew],nw.prototype,"valueKey",2),a([ew],nw.prototype,"fills",2),a([ew],nw.prototype,"fillGradientDefaults",2),a([ew],nw.prototype,"fillPatternDefaults",2),a([ew],nw.prototype,"fillImageDefaults",2),a([ew],nw.prototype,"fillOpacity",2),a([ew],nw.prototype,"strokes",2),a([ew],nw.prototype,"strokeWidth",2),a([ew],nw.prototype,"strokeOpacity",2),a([ew],nw.prototype,"lineDash",2),a([ew],nw.prototype,"lineDashOffset",2),a([ew],nw.prototype,"label",2),a([ew],nw.prototype,"stageLabel",2),a([ew],nw.prototype,"tooltip",2);var{formatValue:rw,Line:ow}=n.n1,aw=class extends KS{constructor(e){super({moduleCtx:e,animationResetFns:{datum:sw}}),this.properties=new nw}get hasData(){const{id:e,ctx:{legendManager:t}}=this,i=this.data?.reduce((i,n,s)=>i+(t.getItemEnabled({seriesId:e,itemId:s})?1:0),0);return null!=i&&i>1}getBandScalePadding(){return{inner:1,outer:0}}connectorEnabled(){return!0}barStyle(){return{fillOpacity:1,strokeOpacity:1,strokeWidth:0,lineDash:[],lineDashOffset:0,fillGradientDefaults:this.properties.fillGradientDefaults,fillPatternDefaults:this.properties.fillPatternDefaults,fillImageDefaults:this.properties.fillImageDefaults}}connectorStyle(){const{fillOpacity:e,strokeOpacity:t,strokeWidth:i,lineDash:n,lineDashOffset:s,fillGradientDefaults:r,fillPatternDefaults:o,fillImageDefaults:a}=this.properties;return{fillOpacity:e,strokeOpacity:t,strokeWidth:i,lineDash:n,lineDashOffset:s,fillGradientDefaults:r,fillPatternDefaults:o,fillImageDefaults:a}}nodeFactory(){return new ow}createLabelData({datumIndex:e,rect:t,barAlongX:i,yDatum:n,datum:s,visible:r}){const{stageKey:o,valueKey:a,label:l}=this.properties,{spacing:c,placement:h}=l;let d,u,p,g;if(i)switch(d=t.x+t.width/2,p="center",h){case"before":u=t.y-c,g="bottom";break;case"after":u=t.y+t.height+c,g="top";break;default:u=t.y+t.height/2,g="middle"}else switch(u=t.y+t.height/2,g="middle",h){case"before":d=t.x-c,p="right";break;case"after":d=t.x+t.width+c,p="left";break;default:d=t.x+t.width/2,p="center"}return{x:d,y:u,textAlign:p,textBaseline:g,text:this.getLabelText(l,{itemId:a,value:n,datum:s,stageKey:o,valueKey:a},e=>rw(e,0)),itemId:a,datum:s,datumIndex:e,series:this,visible:r}}updateDatumNodes(e){const t=e.isHighlight?this.properties.highlightStyle.item:void 0;e.datumSelection.each((e,i)=>{e.setProperties(sw(0,i)),e.stroke=t?.stroke,e.strokeWidth=t?.strokeWidth??0,e.strokeOpacity=t?.strokeOpacity??1,e.lineDash=t?.lineDash,e.lineDashOffset=t?.lineDashOffset??0})}tooltipStyle(e,t){const{fills:i,strokes:n}=this.properties,s=i[t%i.length]??"black",r=n[t%n.length]??"black",{fillOpacity:o,strokeOpacity:a,strokeWidth:l,lineDash:c,lineDashOffset:h}=this.barStyle();return{fill:s,fillOpacity:o,stroke:r,strokeOpacity:a,strokeWidth:l,lineDash:c,lineDashOffset:h}}};aw.className="ConeFunnelSeries",aw.type="cone-funnel";var{commonSeriesOptionsDefs:lw,coneFunnelSeriesThemeableOptionsDef:cw}=n.n1,hw={...cw,...lw,type:(0,s.mw)((0,s.dY)("cone-funnel")),stageKey:(0,s.mw)(s.Yj),valueKey:(0,s.mw)(s.Yj)},{ThemeConstants:{CARTESIAN_AXIS_TYPE:dw}}=n.n1,uw={type:"series",optionsKey:"series[]",packageType:"enterprise",chartTypes:["cartesian"],identifier:"cone-funnel",moduleFactory:e=>new aw(e),solo:!0,tooltipDefaults:{range:"nearest"},defaultAxes:lS,themeTemplate:{series:{direction:"vertical",fills:{$if:[{$eq:[{$palette:"type"},"inbuilt"]},{$palette:"secondSequentialColors"},n.n1.SAFE_RANGE2_OPERATION]},strokes:{$if:[{$eq:[{$palette:"type"},"inbuilt"]},{$palette:"secondSequentialColors"},n.n1.SAFE_RANGE2_OPERATION]},fillGradientDefaults:{type:"gradient",gradient:"linear",bounds:"item",colorStops:{$palette:"gradient"},rotation:0,reverse:!1},fillPatternDefaults:n.n1.FILL_PATTERN_DEFAULTS,fillImageDefaults:n.n1.FILL_IMAGE_DEFAULTS,strokeWidth:0,label:{enabled:!0,fontSize:{$ref:"fontSize"},fontFamily:{$ref:"fontFamily"},fontWeight:{$ref:"fontWeight"},color:{$ref:"textColor"},placement:"before",spacing:4}},seriesArea:{padding:{top:20,bottom:20}},axes:{[dw.NUMBER]:{nice:!1,gridLine:{enabled:!1},crosshair:{enabled:!1},label:{enabled:!1,formatter:e=>Math.abs(e.value).toFixed(e.fractionDigits??0)}},[dw.CATEGORY]:{line:{enabled:!1}}}}},pw={type:"series",name:"cone-funnel",chartType:"cartesian",enterprise:!0,options:hw,create:e=>new aw(e)},{FillGradientDefaults:gw,FillPatternDefaults:fw,FillImageDefaults:mw,Label:vw,DropShadow:yw,AbstractBarSeriesProperties:Cw,BaseProperties:bw,SeriesTooltip:Sw,AxisLabel:ww,Property:xw}=n.n1,Ew=class extends vw{},Mw=class extends ww{};a([xw],Mw.prototype,"placement",2);var Aw=class extends bw{constructor(){super(...arguments),this.enabled=!0,this.fill=void 0,this.fillOpacity=1,this.strokeWidth=1,this.strokeOpacity=1,this.lineDash=[0],this.lineDashOffset=0}};a([xw],Aw.prototype,"enabled",2),a([xw],Aw.prototype,"fill",2),a([xw],Aw.prototype,"fillOpacity",2),a([xw],Aw.prototype,"stroke",2),a([xw],Aw.prototype,"strokeWidth",2),a([xw],Aw.prototype,"strokeOpacity",2),a([xw],Aw.prototype,"lineDash",2),a([xw],Aw.prototype,"lineDashOffset",2);var Tw=class extends Cw{constructor(){super(...arguments),this.fills=[],this.fillGradientDefaults=new gw,this.fillPatternDefaults=new fw,this.fillImageDefaults=new mw,this.fillOpacity=1,this.strokes=[],this.strokeWidth=1,this.strokeOpacity=1,this.lineDash=[0],this.lineDashOffset=0,this.spacingRatio=0,this.dropOff=new Aw,this.shadow=(new yw).set({enabled:!1}),this.label=new Ew,this.stageLabel=new Mw,this.tooltip=new Sw}};a([xw],Tw.prototype,"stageKey",2),a([xw],Tw.prototype,"valueKey",2),a([xw],Tw.prototype,"fills",2),a([xw],Tw.prototype,"fillGradientDefaults",2),a([xw],Tw.prototype,"fillPatternDefaults",2),a([xw],Tw.prototype,"fillImageDefaults",2),a([xw],Tw.prototype,"fillOpacity",2),a([xw],Tw.prototype,"strokes",2),a([xw],Tw.prototype,"strokeWidth",2),a([xw],Tw.prototype,"strokeOpacity",2),a([xw],Tw.prototype,"lineDash",2),a([xw],Tw.prototype,"lineDashOffset",2),a([xw],Tw.prototype,"spacingRatio",2),a([xw],Tw.prototype,"itemStyler",2),a([xw],Tw.prototype,"dropOff",2),a([xw],Tw.prototype,"shadow",2),a([xw],Tw.prototype,"label",2),a([xw],Tw.prototype,"stageLabel",2),a([xw],Tw.prototype,"tooltip",2);var{ChartAxisDirection:Dw,resetBarSelectionsFn:Iw,prepareBarAnimationFunctions:Rw,midpointStartingBarPosition:Lw,createDatumId:kw,formatValue:Pw,Rect:Nw,motion:Ow,applyShapeStyle:_w,getShapeStyle:Fw}=n.n1,Gw=class extends KS{constructor(e){super({moduleCtx:e,animationResetFns:{datum:Iw}}),this.properties=new Tw}getBandScalePadding(){return{inner:this.properties.spacingRatio,outer:0}}connectorEnabled(){return this.properties.dropOff.enabled}barStyle(){const{fillOpacity:e,strokeOpacity:t,strokeWidth:i,lineDash:n,lineDashOffset:s,fillGradientDefaults:r,fillPatternDefaults:o,fillImageDefaults:a}=this.properties;return{fillOpacity:e,strokeOpacity:t,strokeWidth:i,lineDash:n,lineDashOffset:s,fillGradientDefaults:r,fillPatternDefaults:o,fillImageDefaults:a}}connectorStyle(){const{fill:e,fillOpacity:t,stroke:i,strokeOpacity:n,strokeWidth:s,lineDash:r,lineDashOffset:o}=this.properties.dropOff;return{fill:e,fillOpacity:t,stroke:i,strokeOpacity:n,strokeWidth:s,lineDash:r,lineDashOffset:o,fillGradientDefaults:this.properties.fillGradientDefaults,fillPatternDefaults:this.properties.fillPatternDefaults,fillImageDefaults:this.properties.fillImageDefaults}}nodeFactory(){return new Nw}createLabelData({datumIndex:e,rect:t,yDatum:i,datum:n,visible:s}){const{valueKey:r,stageKey:o,label:a}=this.properties;return{x:t.x+t.width/2,y:t.y+t.height/2,textAlign:"center",textBaseline:"middle",text:this.getLabelText(a,{itemId:o,value:i,datum:n,valueKey:r,stageKey:o},e=>Pw(e,0)),itemId:o,datum:n,datumIndex:e,series:this,visible:s}}getItemBaseStyle(e){const{properties:t}=this,i=e?t.highlightStyle.item:void 0;return Fw({fill:i?.fill,fillOpacity:i?.fillOpacity??t.fillOpacity,stroke:i?.stroke,strokeWidth:i?.strokeWidth??this.getStrokeWidth(t.strokeWidth),strokeOpacity:i?.strokeOpacity??t.strokeOpacity,lineDash:i?.lineDash??t.lineDash,lineDashOffset:i?.lineDashOffset??t.lineDashOffset},t.fillGradientDefaults,t.fillPatternDefaults,t.fillImageDefaults)}getItemStyleOverrides(e,t,i,n,s){const{id:r,properties:o}=this,{stageKey:a,valueKey:l,fills:c,strokes:h,itemStyler:d}=o,u=n.fill??c[i%c.length]??"black",p=n.stroke??h[i%h.length]??"black",g={};if(s||(g.fill=u,g.stroke=p),null!=d){const i=this.cachedDatumCallback(kw(e,s?"highlight":"node"),()=>{const{fillOpacity:e,strokeOpacity:i,strokeWidth:o,lineDash:c,lineDashOffset:h}=n;return this.callWithContext(d,{seriesId:r,datum:t,highlighted:s,stageKey:a,valueKey:l,fill:u,fillOpacity:e,stroke:p,strokeOpacity:i,strokeWidth:o,lineDash:c,lineDashOffset:h})});Object.assign(g,i)}return Fw(g,o.fillGradientDefaults,o.fillPatternDefaults,o.fillImageDefaults)}updateDatumNodes(e){const{shadow:t}=this.properties,{datumSelection:i,isHighlight:n}=e,s=this.getCategoryDirection()===Dw.X,r=this.getItemBaseStyle(n),o=this.getShapeFillBBox();i.each((e,i)=>{const{datumIndex:a}=i,l=this.getItemStyleOverrides(String(i.datumIndex),i.datum,a,r,n);_w(e,r,l,o),e.visible=s?i.width>0:i.height>0,e.crisp=i.crisp,e.fillShadow=t})}tooltipStyle(e,t){const i=this.getItemBaseStyle(!1);return Object.assign(i,this.getItemStyleOverrides(String(t),e,t,i,!1)),i}animateEmptyUpdateReady(e){super.animateEmptyUpdateReady(e);const{datumSelection:t}=e,i=this.isVertical(),n=Rw(Lw(i,"normal"));Ow.fromToMotion(this.id,"datums",this.ctx.animationManager,[t],n)}animateWaitingUpdateReady(e){super.animateWaitingUpdateReady(e);const{datumSelection:t}=e,{processedData:i}=this,n=i?.reduced?.diff?.[this.id],s=Rw(Lw(this.isVertical(),"fade"));Ow.fromToMotion(this.id,"datums",this.ctx.animationManager,[t],s,(e,t)=>t.xValue,n)}};Gw.className="FunnelSeries",Gw.type="funnel";var{commonSeriesOptionsDefs:Vw,funnelSeriesThemeableOptionsDef:Bw}=n.n1,Hw={...Bw,...Vw,type:(0,s.mw)((0,s.dY)("funnel")),stageKey:(0,s.mw)(s.Yj),valueKey:(0,s.mw)(s.Yj)},zw={type:"series",optionsKey:"series[]",packageType:"enterprise",chartTypes:["cartesian"],identifier:"funnel",moduleFactory:e=>new Gw(e),solo:!0,tooltipDefaults:{range:"exact"},defaultAxes:lS,themeTemplate:cS},Uw={type:"series",name:"funnel",chartType:"cartesian",enterprise:!0,options:Hw,create:e=>new Gw(e)},Ww=class{*[Symbol.iterator](){const{node:e,datum:t}=this;e&&t&&(yield{node:e,datum:t})}nodes(){return this.node?[this.node]:[]}update(e,t,i,n){const s=e.nodes();if(0===s.length)this.node?.remove(),this.node=void 0;else{void 0===this.node&&(this.node=new i,this.node.fillOpacity=0,this.node.strokeOpacity=0,t.appendChild(this.node));const e=s[0],r=s.toReversed().find(e=>e.datum.datum.value>e.datum.datum.segmentStart)??s[s.length-1];this.node.datum=this.datum=e.datum,n(this.node,e,r)}}},jw={fromFn:()=>({opacity:0,phase:"initial"}),toFn:()=>({opacity:1})};function Kw(e,t){if(null==e)return"";const{min:i,max:n}=t,s=0!==i?Math.ceil(Math.log10(Math.abs(i))):0,r=0!==n?Math.ceil(Math.log10(Math.abs(n))):0,o=Math.max(2-Math.max(s,r),0);return e.toFixed(o)}function $w(e,t,i,n){if(null!=i.text)return i.text;const s=n??i.value;let r;return null!=i?.formatter&&(r=Yw(t,i.formatter,{seriesId:e,datum:void 0,value:s})),null!=r?String(r):void 0}function Yw(e,t,i){return n.n1.callWithContext(e.chartService,void 0,t,[i])}function qw({path:e,x:t,y:i,size:n}){e.moveTo(t,i-n/2),e.lineTo(t,i+n/2)}function Xw(e,t){const i=(0,s.nl)(e.datumUnion.nodes(),e.targetSelection.nodes());return e.pickNodeNearestDistantObject(t,i)}function Zw(e,t){const i=[{data:e.contextNodeData?.nodeData,selection:e.datumUnion},{data:e.contextNodeData?.targetData,selection:e.targetSelection}].filter(e=>e.data&&e.data.length>0),n=(0,s.qE)(0,t.otherIndex+t.otherIndexDelta,i.length-1);if(0===i.length)return;const{data:r,selection:o}=i[n];if(null==r||0===r.length)return;const a=(0,s.qE)(0,t.datumIndex,r.length-1),l=r[a];for(const e of o)if(e.datum===l)return{bounds:e.node,clipFocusBox:!0,datum:l,datumIndex:a,otherIndex:n}}var{BaseProperties:Qw,Property:Jw}=n.n1,ex=class extends Qw{getSegments(e,t){const{values:i,step:n,count:r}=this,o=Math.min(...e.domain),a=Math.max(...e.domain);let l;if(null!=i){const e=i.filter(e=>e>o&&e<a).sort((e,t)=>e-t);l=[o,...e,a]}else if(null!=n){const e=[];for(let t=o;t<a;t+=n)e.push(t);e.push(a),l=e}else if(null!=r){const e=r+1;l=Array.from({length:e+1},(t,i)=>i/e*(a-o)+o)}else{const t=e.ticks({nice:!0,interval:void 0,tickCount:void 0,minTickCount:0,maxTickCount:1/0})?.ticks?.filter(e=>e>o&&e<a);l=null!=t?[o,...t,a]:void 0}return null!=l&&l.length>t&&(s.Vy.warnOnce("the configured segmentation results in more than 1 item per pixel, ignoring. Supply a segmentation configuration that results in larger segments or omit this configuration"),l=void 0),l??(l=[o,a]),l}};a([Jw],ex.prototype,"values",2),a([Jw],ex.prototype,"step",2),a([Jw],ex.prototype,"count",2);var tx=class extends Qw{constructor(){super(...arguments),this.enabled=!1,this.interval=new ex,this.spacing=0}};a([Jw],tx.prototype,"enabled",2),a([Jw],tx.prototype,"interval",2),a([Jw],tx.prototype,"spacing",2);var{BaseProperties:ix,SeriesTooltip:nx,SeriesProperties:sx,PropertiesArray:rx,Property:ox,Label:ax,AxisLabel:lx}=n.n1,cx=class extends ax{};a([ox],cx.prototype,"spacing",2);var hx=class extends ix{constructor(){super(...arguments),this.value=0,this.label=new cx}};a([ox],hx.prototype,"text",2),a([ox],hx.prototype,"value",2),a([ox],hx.prototype,"shape",2),a([ox],hx.prototype,"placement",2),a([ox],hx.prototype,"spacing",2),a([ox],hx.prototype,"size",2),a([ox],hx.prototype,"rotation",2),a([ox],hx.prototype,"fill",2),a([ox],hx.prototype,"fillOpacity",2),a([ox],hx.prototype,"stroke",2),a([ox],hx.prototype,"strokeWidth",2),a([ox],hx.prototype,"strokeOpacity",2),a([ox],hx.prototype,"lineDash",2),a([ox],hx.prototype,"lineDashOffset",2),a([ox],hx.prototype,"label",2);var dx=class extends ix{constructor(){super(...arguments),this.enabled=!0,this.thicknessRatio=1,this.fills=new rx(n.n1.StopProperties),this.fillMode="continuous",this.fillOpacity=1,this.stroke="black",this.strokeWidth=0,this.strokeOpacity=1,this.lineDash=[0],this.lineDashOffset=0}};a([ox],dx.prototype,"enabled",2),a([ox],dx.prototype,"thickness",2),a([ox],dx.prototype,"thicknessRatio",2),a([ox],dx.prototype,"fills",2),a([ox],dx.prototype,"fillMode",2),a([ox],dx.prototype,"fill",2),a([ox],dx.prototype,"fillOpacity",2),a([ox],dx.prototype,"stroke",2),a([ox],dx.prototype,"strokeWidth",2),a([ox],dx.prototype,"strokeOpacity",2),a([ox],dx.prototype,"lineDash",2),a([ox],dx.prototype,"lineDashOffset",2);var ux=class extends ix{constructor(){super(...arguments),this.values=void 0,this.step=void 0,this.minSpacing=0,this.maxSpacing=1e3}};a([ox],ux.prototype,"values",2),a([ox],ux.prototype,"step",2),a([ox],ux.prototype,"minSpacing",2),a([ox],ux.prototype,"maxSpacing",2);var px=class extends lx{constructor(){super(...arguments),this.placement=void 0}};a([ox],px.prototype,"placement",2);var gx=class extends ix{constructor(){super(...arguments),this.min=0,this.max=1,this.fills=new rx(n.n1.StopProperties),this.fillMode="continuous",this.fillOpacity=1,this.stroke="black",this.strokeWidth=0,this.strokeOpacity=1,this.lineDash=[0],this.lineDashOffset=0,this.defaultFill="black",this.interval=new ux,this.label=new px}};a([ox],gx.prototype,"min",2),a([ox],gx.prototype,"max",2),a([ox],gx.prototype,"fills",2),a([ox],gx.prototype,"fillMode",2),a([ox],gx.prototype,"fill",2),a([ox],gx.prototype,"fillOpacity",2),a([ox],gx.prototype,"stroke",2),a([ox],gx.prototype,"strokeWidth",2),a([ox],gx.prototype,"strokeOpacity",2),a([ox],gx.prototype,"lineDash",2),a([ox],gx.prototype,"lineDashOffset",2),a([ox],gx.prototype,"defaultFill",2),a([ox],gx.prototype,"interval",2),a([ox],gx.prototype,"label",2);var fx=class extends cm{constructor(){super(...arguments),this.placement="inside-center",this.avoidCollisions=!0}};a([ox],fx.prototype,"text",2),a([ox],fx.prototype,"placement",2),a([ox],fx.prototype,"avoidCollisions",2);var mx=class extends sx{constructor(){super(...arguments),this.value=0,this.segmentation=new tx,this.defaultColorRange=[],this.targets=new rx(hx),this.defaultTarget=new hx,this.defaultScale=new gx,this.direction="vertical",this.thickness=1,this.cornerRadius=0,this.cornerMode="container",this.margin=0,this.scale=new gx,this.bar=new dx,this.label=new fx,this.tooltip=new nx}};a([ox],mx.prototype,"value",2),a([ox],mx.prototype,"segmentation",2),a([ox],mx.prototype,"defaultColorRange",2),a([ox],mx.prototype,"targets",2),a([ox],mx.prototype,"defaultTarget",2),a([ox],mx.prototype,"defaultScale",2),a([ox],mx.prototype,"direction",2),a([ox],mx.prototype,"thickness",2),a([ox],mx.prototype,"cornerRadius",2),a([ox],mx.prototype,"cornerMode",2),a([ox],mx.prototype,"margin",2),a([ox],mx.prototype,"scale",2),a([ox],mx.prototype,"bar",2),a([ox],mx.prototype,"label",2),a([ox],mx.prototype,"tooltip",2);var{CachedTextMeasurerPool:vx,BBox:yx}=n.n1;function Cx(e){const{x0:t,y0:i,x1:n,y1:s,horizontalInset:r,verticalInset:o}=e;return{x:Math.min(t,n)+r,y:Math.min(i,s)+o,width:Math.max(Math.abs(n-t)-2*r,0),height:Math.max(Math.abs(s-i)-2*o,0)}}function bx(e){const{clipX0:t,clipX1:i,clipY0:n,clipY1:s}=e;return null!=t&&null!=i||null!=n&&null!=s}function Sx(e,t){const i=e?"initial":"update";return{node:{fromFn(n,s){const r=n.previousDatum;let{x0:o,y0:a,x1:l,y1:c,clipX0:h,clipY0:d,clipX1:u,clipY1:p}=r??s;const{horizontalInset:g,verticalInset:f}=s,m=null!=r&&bx(r),v=bx(s);return m&&v||(!m&&v?(({x0:o,y0:a,x1:l,y1:c,clipX0:h,clipY0:d,clipX1:u,clipY1:p}=s),e&&(t?u=s.clipX0:p=s.clipY0)):m&&!v?(({x0:o,y0:a,x1:l,y1:c}=s),h=void 0,d=void 0,u=void 0,p=void 0):e&&(t?l=o:c=a)),{x0:o,y0:a,x1:l,y1:c,clipX0:h,clipY0:d,clipX1:u,clipY1:p,horizontalInset:g,verticalInset:f,phase:i}},toFn(e,t){const{x0:i,y0:n,x1:s,y1:r,clipX0:o,clipY0:a,clipX1:l,clipY1:c,horizontalInset:h,verticalInset:d}=t;return{x0:i,y0:n,x1:s,y1:r,clipX0:o,clipY0:a,clipX1:l,clipY1:c,horizontalInset:h,verticalInset:d}},applyFn(e,t){e.setProperties(wx(0,t))}}}}function wx(e,t){const{x:i,y:n,width:s,height:r}=Cx(t),o=function(e){if(!bx(e))return;const{x0:t,y0:i,x1:n,y1:s}=e,{x:r,y:o,width:a,height:l}=Cx(e);let{clipX0:c,clipX1:h,clipY0:d,clipY1:u}=e;null!=c&&null!=h||(c=t,h=n),null!=d&&null!=u||(d=i,u=s);const p=Math.min(c,h),g=Math.min(d,u),f=Math.abs(h-c),m=Math.abs(u-d);return c=Math.max(r,p),d=Math.max(o,g),h=Math.min(r+a,p+f),u=Math.min(o+l,g+m),new yx(Math.min(c,h),Math.min(d,u),Math.abs(h-c),Math.abs(u-d))}(t),a=function(e,t){if(null==t)return!0;const i=Cx(e),n=1e-6,s=i.x+n,r=i.y+n,o=i.x+i.width-n,a=i.y+i.height-n,l=t.x,c=t.x+t.width,h=t.y,d=t.y+t.height;return Math.max(s,l)<=Math.min(o,c)&&Math.max(r,h)<=Math.min(a,d)}(t,o);return{x:i,y:n,width:s,height:r,clipBBox:o,visible:a}}var xx={Before:"right",Center:"center",After:"left"},Ex={Before:"top",Center:"middle",After:"bottom"},Mx={Before:-1,Center:-.5,After:0},Ax={Before:0,Center:-.5,After:-1},{fromToMotion:Tx,resetMotion:Dx,SeriesNodePickMode:Ix,StateMachine:Rx,createDatumId:Lx,CachedTextMeasurerPool:kx,toRadians:Px,BBox:Nx,Group:Ox,PointerEvents:_x,Selection:Fx,Rect:Gx,Text:Vx,TransformableText:Bx,Marker:Hx,LinearScale:zx,AxisTickGenerator:Ux,NiceMode:Wx,easing:jx,getColorStops:Kx,findRangeExtent:$x}=n.n1,Yx={before:180,middle:0,after:0},qx={before:90,middle:0,after:-90},Xx=class{constructor(e,t){this.gauge=e,this.ctx=t}get defaultTickMinSpacing(){return 0}get range(){return this.gauge.range}get reverse(){return!1}get scale(){return this.gauge.scale}get label(){return this.gauge.properties.scale.label}get interval(){return this.gauge.properties.scale.interval}formatTick(e,t,i,n,s,r){const{label:o}=this;return this.formatWithContext(e,t,i)??(null!=o.format?r?.(e):void 0)??this.gauge.formatLabel(e)}formatWithContext(e,t,i){let n;return this.label.formatter&&(n=Yw(this.ctx,this.label.formatter,{value:e,index:t,domain:i,boundSeries:void 0})),n}inRange(){return!0}},Zx=class extends n.n1.Series{constructor(e){super({moduleCtx:e,useLabelLayer:!0,pickModes:[Ix.EXACT_SHAPE_MATCH,Ix.NEAREST_NODE]}),this.properties=new mx,this.seriesRect=Nx.NaN,this.gaugeRect=Nx.NaN,this.scale=new zx,this.originX=0,this.originY=0,this.scaleGroup=this.contentGroup.appendChild(new Ox({name:"scaleGroup"})),this.itemGroup=this.contentGroup.appendChild(new Ox({name:"itemGroup"})),this.itemTargetGroup=this.contentGroup.appendChild(new Ox({name:"itemTargetGroup"})),this.itemTargetLabelGroup=this.contentGroup.appendChild(new Ox({name:"itemTargetLabelGroup"})),this.itemLabelGroup=this.contentGroup.appendChild(new Ox({name:"itemLabelGroup"})),this.highlightTargetGroup=this.highlightGroup.appendChild(new Ox({name:"itemTargetLabelGroup"})),this.tickGroup=this.contentGroup.appendChild(new Ox({name:"tickGroup"})),this.scaleSelection=Fx.select(this.scaleGroup,()=>this.nodeFactory()),this.datumSelection=Fx.select(this.itemGroup,()=>this.nodeFactory()),this.targetSelection=Fx.select(this.itemTargetGroup,()=>this.markerFactory()),this.targetLabelSelection=Fx.select(this.itemTargetLabelGroup,Vx),this.labelSelection=Fx.select(this.itemLabelGroup,Vx),this.highlightTargetSelection=Fx.select(this.highlightTargetGroup,()=>this.markerFactory()),this.tickSelection=Fx.select(this.tickGroup,Bx),this.datumUnion=new Ww,this.axis=new Xx(this,e),this.tickGenerator=new Ux(this.axis),this.animationState=new Rx("empty",{empty:{update:{target:"ready",action:()=>this.animateEmptyUpdateReady()},reset:"empty",skip:"ready"},ready:{updateData:"waiting",clear:"clearing",resize:()=>this.animateReadyResize(),reset:"empty",skip:"ready"},waiting:{update:{target:"ready",action:()=>this.animateWaitingUpdateReady()},reset:"empty",skip:"ready"},clearing:{update:{target:"empty"},reset:"empty",skip:"ready"}}),this.scaleGroup.pointerEvents=_x.None,this.tickGroup.pointerEvents=_x.None}get range(){return this.horizontal?[0,this.gaugeRect.width]:[0,this.gaugeRect.height]}get horizontal(){return"horizontal"===this.properties.direction}get hasData(){return!0}nodeFactory(){const e=new Gx;return e.crisp=!0,e}markerFactory(){return new Hx}processData(){this.nodeDataRefresh=!0,this.animationState.transition("updateData")}formatLabel(e){return Kw(e,this.properties.scale)}createLinearGradient(e,t,i){const{properties:n,horizontal:s}=this,{defaultColorRange:r}=n;return{type:"gradient",gradient:"linear",colorSpace:"oklch",colorStops:Kx(t,r,e.domain,i),rotation:s?90:0}}getShapeFillBBox(){const{properties:e,originX:t,originY:i,horizontal:n,scale:s}=this,{thickness:r}=e,o=$x(s.range);return new Nx(t,i,n?o:r,n?r:o)}getTargets(){const{properties:e}=this,t=e.defaultTarget;return Array.from(e.targets).map(e=>{const{text:i=t.text,value:n=t.value??0,shape:s=t.shape??"triangle",rotation:r=t.rotation??0,strokeWidth:o=t.strokeWidth??0,placement:a=t.placement??"middle",spacing:l=t.spacing??0,size:c=t.size??0,fill:h=t.fill??"black",fillOpacity:d=t.fillOpacity??1,stroke:u=t.stroke??"black",strokeOpacity:p=t.strokeOpacity??1,lineDash:g=t.lineDash??[0],lineDashOffset:f=t.lineDashOffset??0}=e,{enabled:m=t.label.enabled,color:v=t.label.color??"black",fontStyle:y=t.label.fontStyle??"normal",fontWeight:C=t.label.fontWeight??"normal",fontSize:b=t.label.fontSize,fontFamily:S=t.label.fontFamily,spacing:w=t.label.spacing??0}=e.label;return{text:i,value:n,shape:s,placement:a,spacing:l,size:c,rotation:r,fill:h,fillOpacity:d,stroke:u,strokeWidth:o,strokeOpacity:p,lineDash:g,lineDashOffset:f,label:{enabled:m,color:v,fontStyle:y,fontWeight:C,fontSize:b,fontFamily:S,spacing:w}}})}getTargetPoint(e){const{properties:t,originX:i,originY:n,horizontal:s,scale:r,gaugeRect:o}=this,{thickness:a}=t,{value:l,placement:c,spacing:h,size:d}=e,u=r.convert(l);let p;switch(c){case"before":p=-(h+d/2);break;case"after":p=a+h+d/2;break;default:p=a/2}return{x:i+o.x+(s?u:p),y:n+o.y+(s?p:u)}}getTargetLabel(e){const{size:t,placement:i,label:n}=e,{spacing:s,color:r,fontStyle:o,fontWeight:a,fontSize:l,fontFamily:c}=n,h=t/2+s;let d,u,p=0,g=0;return this.horizontal?(d="center","after"===i?(u="top",g=h):(u="bottom",g=-h)):(u="middle","before"===i?(d="right",p=-h):(d="left",p=h)),{offsetX:p,offsetY:g,fill:r,textAlign:d,textBaseline:u,fontStyle:o,fontWeight:a,fontSize:l,fontFamily:c,lineHeight:void 0}}labelDatum(e,t){const{placement:i,avoidCollisions:n,spacing:s,text:r,color:o,fontSize:a,minimumFontSize:l,fontStyle:c,fontWeight:h,fontFamily:d,lineHeight:u,wrapping:p,overflowStrategy:g,formatter:f=e=>this.formatLabel(e.value)}=e;return{placement:i,avoidCollisions:n,spacing:s,text:r,value:t,fill:o,fontSize:a,minimumFontSize:l,fontStyle:c,fontWeight:h,fontFamily:d,lineHeight:u,wrapping:p,overflowStrategy:g,formatter:f}}verticalLabelInset(){const{properties:e}=this,{label:t}=e,i=t.text?.split("\n"),n=tm(t,t.fontSize)*(i?.length??1);return t.spacing+n}horizontalLabelInset(){const{scale:e,properties:t}=this,{scale:i,label:n}=t,s=n.text?.split("\n"),r=n.getFont(),o=i.interval.values??e.ticks({nice:!1,interval:i.interval.step,minTickCount:0,maxTickCount:6,tickCount:5})?.ticks??[],a=(s??o?.map(e=>$w(this.id,this.ctx,this.labelDatum(n,e))??"")).reduce((e,t)=>{const{width:i}=kx.measureText(t,{font:r});return Math.max(e,i)},0);return n.spacing+a}createNodeData(){const{id:e,properties:t,horizontal:i,scale:n,seriesRect:s}=this,{value:r,segmentation:o,thickness:a,cornerRadius:l,cornerMode:c,bar:h,scale:d,label:u}=t;let p,g;n.domain=[d.min,d.max],n.range=i?[0,s.width]:[s.height,0],i?(g=1,p=Math.PI/2):"before"===d.label.placement?(g=1,p=0):(g=-1,p=0);const f=p-Math.PI/2;let m,v,y,C;i?(m=0,v=s.width,y=(s.height-a)/2,C=y+a,"outside-start"===u.placement?m+=this.horizontalLabelInset():"outside-end"===u.placement&&(v-=this.horizontalLabelInset())):(m=(s.width-a)/2,v=m+a,C=0,y=s.height,"outside-start"===u.placement?y-=this.verticalLabelInset():"outside-end"===u.placement&&(C+=this.verticalLabelInset())),this.gaugeRect=new Nx(Math.min(m,v),Math.min(y,C),Math.abs(v-m),Math.abs(C-y)),n.domain=[d.min,d.max],n.range=i?[m,v]:[y,C];const{ticks:b}=this.tickGenerator.generateTicks({domain:n.domain,primaryTickCount:void 0,visibleRange:[0,1],niceMode:Wx.Off,labelX:0,parallelFlipRotation:p,regularFlipRotation:f,sideFlag:g,removeOverflowLabels:!1}).tickData,S=this.getTargets(),w=[],x=[],E=[],M=[],[A,T]=n.range,D=Math.abs(T-A),I=i?n.convert(r):v,R=i?C:n.convert(r),L=o.enabled?o.spacing/2:0,k=i?L:0,P=i?0:L,N=Math.min(h.thickness??Math.round(h.thicknessRatio*a),a),O=-(a-N)/2,_=i?0:O,F=i?O:0,G="item"===c,V=Math.ceil(D);let B=o.enabled?o.interval.getSegments(n,V):void 0;const H=h.fill??this.createLinearGradient(n,h.fills,h.fillMode),z=d.fill??(h.enabled&&0===d.fills.length?d.defaultFill:void 0)??this.createLinearGradient(n,d.fills,d.fillMode);if(null==B&&G){const e={value:r,segmentStart:Math.min(...n.domain),segmentEnd:Math.max(...n.domain)};if(h.enabled){const t=1*Math.min(l,N/2,D/2),n=i?t:0,s=i?0:t;w.push({series:this,itemId:"value",datum:e,datumIndex:{type:0},type:0,x0:0+m-n-_,y0:0+y-s-F,x1:0+I+n+_,y1:0+R+s+F,clipX0:void 0,clipY0:void 0,clipX1:void 0,clipY1:void 0,topLeftCornerRadius:l,topRightCornerRadius:l,bottomRightCornerRadius:l,bottomLeftCornerRadius:l,fill:H,horizontalInset:k,verticalInset:P})}const t=1*Math.min(l,a/2,D/2),s=i?t:0,o=i?0:t;M.push({series:this,itemId:"scale",datum:e,datumIndex:{type:0},type:0,x0:0+m-s,y0:0+y-o,x1:0+v+s,y1:0+C+o,clipX0:void 0,clipY0:void 0,clipX1:void 0,clipY1:void 0,topLeftCornerRadius:l,topRightCornerRadius:l,bottomRightCornerRadius:l,bottomLeftCornerRadius:l,fill:z,horizontalInset:k,verticalInset:P})}else{B??(B=n.domain);const e=0+m-_,t=0+y-F,s=0+I+_,o=0+R+F;for(let a=0;a<B.length-1;a+=1){const c=B[a+0],d=B[a+1],u={value:r,segmentStart:c,segmentEnd:d},p=0===a,g=a===B.length-2,f=n.convert(c),b=n.convert(d),S=G||p?l:0,x=G||g?l:0,E=i?S:x,A=x,T=i?x:S,D=S;h.enabled&&w.push({series:this,itemId:`value-${a}`,datum:u,datumIndex:{type:0},type:0,x0:0+(i?f:m),y0:0+(i?y:f),x1:0+(i?b:v),y1:0+(i?C:b),clipX0:e,clipY0:t,clipX1:s,clipY1:o,topLeftCornerRadius:E,topRightCornerRadius:A,bottomRightCornerRadius:T,bottomLeftCornerRadius:D,fill:H,horizontalInset:k,verticalInset:P}),M.push({series:this,itemId:`scale-${a}`,datum:u,datumIndex:{type:0},type:0,x0:0+(i?f:m),y0:0+(i?y:f),x1:0+(i?b:v),y1:0+(i?C:b),clipX0:void 0,clipY0:void 0,clipX1:void 0,clipY1:void 0,topLeftCornerRadius:E,topRightCornerRadius:A,bottomRightCornerRadius:T,bottomLeftCornerRadius:D,fill:z,horizontalInset:k,verticalInset:P})}}u.enabled&&E.push(this.labelDatum(u,r));const U=i?Yx:qx;for(let e=0;e<S.length;e+=1){const t=S[e],{value:i,text:n,shape:s,size:r,fill:o,fillOpacity:a,stroke:l,strokeWidth:c,strokeOpacity:h,lineDash:d,lineDashOffset:u}=t,p=this.getTargetPoint(t),g=Px(t.rotation+U[t.placement]);x.push({series:this,itemId:`target-${e}`,midPoint:p,datum:{value:i},datumIndex:{type:1,index:e},type:1,value:i,text:n,x:p.x,y:p.y,shape:s,size:r,rotation:g,fill:o,fillOpacity:a,stroke:l,strokeOpacity:h,strokeWidth:c,lineDash:d,lineDashOffset:u,label:this.getTargetLabel(t)})}return{itemId:e,nodeData:w,tickData:b,targetData:x,labelData:E,scaleData:M}}updateSelections(e){(this.nodeDataRefresh||e)&&(this.contextNodeData=this.createNodeData(),this.nodeDataRefresh=!1)}highlightDatum(e){if(null!=e&&e.series===this&&1===e.type)return e}update({seriesRect:e}){const{datumSelection:t,labelSelection:i,targetSelection:n,targetLabelSelection:s,scaleSelection:r,highlightTargetSelection:o,tickSelection:a}=this;this.seriesRect=e??Nx.NaN;const l=this.checkResize(e);this.updateSelections(l),this.contentGroup.visible=this.visible,this.contentGroup.opacity=this.getOpacity();const c=this.contextNodeData?.nodeData??[],h=this.contextNodeData?.labelData??[],d=this.contextNodeData?.targetData??[],u=this.contextNodeData?.scaleData??[],p=this.contextNodeData?.tickData??[],g=this.highlightDatum(this.ctx.highlightManager.getActiveHighlight());this.scaleSelection=this.updateScaleSelection({scaleData:u,scaleSelection:r}),this.updateScaleNodes({scaleSelection:r}),this.targetSelection=this.updateTargetSelection({targetData:d,targetSelection:n}),this.updateTargetNodes({targetSelection:n,isHighlight:!1}),this.targetLabelSelection=this.updateTargetLabelSelection({targetData:d,targetLabelSelection:s}),this.updateTargetLabelNodes({targetLabelSelection:s}),this.datumSelection=this.updateDatumSelection({nodeData:c,datumSelection:t}),this.updateDatumNodes({datumSelection:t}),this.labelSelection=this.updateLabelSelection({labelData:h,labelSelection:i}),this.updateLabelNodes({labelSelection:i}),this.highlightTargetSelection=this.updateTargetSelection({targetData:null!=g?[g]:[],targetSelection:o}),this.updateTargetNodes({targetSelection:o,isHighlight:!0}),this.tickSelection=this.updateTickSelection({tickData:p,tickSelection:a}),this.updateTickNodes({tickSelection:a}),l&&this.animationState.transition("resize"),this.animationState.transition("update")}updateDatumSelection(e){return e.datumSelection.update(e.nodeData,void 0,t=>Lx(e.nodeData.length,t.itemId))}updateDatumNodes(e){const{datumSelection:t}=e,{ctx:i,properties:s}=this,{bar:r}=s,{fillOpacity:o,stroke:a,strokeOpacity:l,lineDash:c,lineDashOffset:h}=r,d=this.getStrokeWidth(r.strokeWidth),u=i.animationManager.isSkipped(),p=this.getShapeFillBBox();t.each((e,t)=>{const{topLeftCornerRadius:i,topRightCornerRadius:s,bottomRightCornerRadius:r,bottomLeftCornerRadius:g,fill:f}=t;e.fill=f,e.fillBBox=p,e.fillOpacity=o,e.stroke=a,e.strokeOpacity=l,e.strokeWidth=d,e.lineDash=c,e.lineDashOffset=h,e.topLeftCornerRadius=i,e.topRightCornerRadius=s,e.bottomRightCornerRadius=r,e.bottomLeftCornerRadius=g,e.pointerEvents=this.properties.bar.enabled?n.n1.PointerEvents.All:n.n1.PointerEvents.None,(u||null==e.previousDatum)&&e.setProperties(wx(0,t))}),this.datumUnion.update(t,this.itemGroup,n.n1.Rect,(e,t,i)=>{e.pointerEvents=n.n1.PointerEvents.None,e.clipBBox??(e.clipBBox=new Nx(NaN,NaN,NaN,NaN)),e.x=t.x,e.y=t.y,e.clipBBox.x=t.clipBBox?.x??t.x,e.clipBBox.y=t.clipBBox?.y??t.y,this.horizontal?(e.height=e.clipBBox.height=i.height,e.width=i===t?i.width:i.x+i.width,e.clipBBox.width=e.width-(i.width-(i.clipBBox?.width??i.width)),e.topLeftCornerRadius=t.topLeftCornerRadius,e.bottomLeftCornerRadius=t.bottomLeftCornerRadius,e.topRightCornerRadius=i.topRightCornerRadius,e.bottomRightCornerRadius=i.bottomRightCornerRadius):(e.width=e.clipBBox.width=i.width,e.height=i===t?i.height:i.x+i.height,e.clipBBox.height=e.height-(i.height-(i.clipBBox?.height??i.height)),e.topLeftCornerRadius=t.topLeftCornerRadius,e.topRightCornerRadius=t.topRightCornerRadius,e.bottomLeftCornerRadius=i.bottomLeftCornerRadius,e.bottomRightCornerRadius=i.bottomRightCornerRadius)})}updateScaleSelection(e){return e.scaleSelection.update(e.scaleData,void 0,t=>Lx(e.scaleData.length,t.itemId))}updateScaleNodes(e){const{scaleSelection:t}=e,{scale:i}=this.properties,{fillOpacity:n,stroke:s,strokeOpacity:r,strokeWidth:o,lineDash:a,lineDashOffset:l}=i,c=this.getShapeFillBBox();t.each((e,t)=>{const{topLeftCornerRadius:i,topRightCornerRadius:h,bottomRightCornerRadius:d,bottomLeftCornerRadius:u,fill:p}=t;e.fill=p,e.fillBBox=c,e.fillOpacity=n,e.stroke=s,e.strokeOpacity=r,e.strokeWidth=o,e.lineDash=a,e.lineDashOffset=l,e.topLeftCornerRadius=i,e.topRightCornerRadius=h,e.bottomRightCornerRadius=d,e.bottomLeftCornerRadius=u,e.setProperties(wx(0,t))})}updateTargetSelection(e){return e.targetSelection.update(e.targetData,void 0,e=>e.itemId)}updateTargetNodes(e){const{targetSelection:t,isHighlight:i}=e,n=i?this.properties.highlightStyle.item:void 0;t.each((e,t)=>{const{x:i,y:s,shape:r,size:o,rotation:a,fill:l,fillOpacity:c,stroke:h,strokeOpacity:d,strokeWidth:u,lineDash:p,lineDashOffset:g}=t;e.size=o,e.shape="line"===r?qw:r,e.fill=n?.fill??l,e.fillOpacity=n?.fillOpacity??c,e.stroke=n?.stroke??h,e.strokeOpacity=n?.strokeOpacity??d,e.strokeWidth=n?.strokeWidth??u,e.lineDash=n?.lineDash??p,e.lineDashOffset=n?.lineDashOffset??g,e.translationX=i,e.translationY=s,e.rotation=a})}updateTargetLabelSelection(e){return e.targetLabelSelection.update(e.targetData)}updateTargetLabelNodes(e){const{targetLabelSelection:t}=e;t.each((e,t)=>{const{x:i,y:n,text:s}=t,{offsetX:r,offsetY:o,fill:a,fontStyle:l,fontWeight:c,fontSize:h,fontFamily:d,textAlign:u,textBaseline:p}=t.label;e.visible=!0,e.x=i+r,e.y=n+o,e.text=s,e.fill=a,e.fontStyle=l,e.fontWeight=c,e.fontSize=h,e.fontFamily=d,e.textAlign=u,e.textBaseline=p})}updateTickSelection(e){return e.tickSelection.update(e.tickData,void 0,e=>e.tickId)}updateTickNodes(e){const{gaugeRect:t,properties:i}=this,n=i.defaultScale,{enabled:s,color:r,fontFamily:o=n.label.fontFamily,fontSize:a=n.label.fontSize,fontStyle:l,fontWeight:c=n.label.fontWeight,spacing:h}=i.scale.label;let{placement:d}=i.scale.label;const u=Px(i.scale.label.rotation??0);let p,g,f,m;this.horizontal?(d??(d="after"),p="center",g="before"===d?"bottom":"top",m=this.originY+t.y+("before"===d?-h:t.height+h)):(d??(d="before"),p="before"===d?"end":"start",g="middle",f=this.originX+t.x+("before"===d?-h:t.width+h)),e.tickSelection.each((e,t)=>{if(!s)return void(e.visible=!1);const i=f??t.translationY,n=m??t.translationY;e.visible=!0,e.text=t.tickLabel,e.fill=r,e.fontFamily=o,e.fontSize=a,e.fontStyle=l,e.fontWeight=c,e.textBaseline=g,e.textAlign=p,e.x=i,e.y=n,e.rotationCenterX=i,e.rotationCenterY=n,e.rotation=u})}updateLabelSelection(e){return e.labelSelection.update(e.labelData,void 0,e=>"primary")}updateLabelNodes(e){const{labelSelection:t}=e,i=this.ctx.animationManager.isSkipped();t.each((e,t)=>{e.fill=t.fill,e.fontStyle=t.fontStyle,e.fontWeight=t.fontWeight,e.fontFamily=t.fontFamily}),(i||this.labelsHaveExplicitText())&&this.formatLabelText()}labelsHaveExplicitText(){for(const{datum:e}of this.labelSelection)if(null==e.text)return!1;return!0}formatLabelText(e){const{labelSelection:t,horizontal:i,scale:n,seriesRect:s,gaugeRect:r}=this,{x:o,y:a,width:l,height:c}=r,h=e?.label??this.properties.value;let d;if(i){const e=n.convert(h);d=new Nx(o,a,e-o,c)}else{const e=n.convert(h);d=new Nx(o,e,l,c-e)}const u={seriesRect:s,gaugeRect:r,barRect:d},{margin:p}=this.properties;!function(e,t,i,n,s,r){const{seriesRect:o,gaugeRect:a,barRect:l}=s,{padding:c,horizontal:h}=n;i.each((i,n)=>{const s=$w(e.id,t,n,r?.label);let d,u,p;if("outside-start"===n.placement?h?(d=a.x,u=o.height):(d=o.width,u=o.height-(a.y+a.height)):"outside-end"===n.placement?h?(d=o.width-(a.x+a.width),u=o.height):(d=o.width,u=a.y):n.avoidCollisions&&(d=a.width,u=a.height),null==s)return;if(null!=d&&null!=u){const e=nm(s,n,{padding:c},()=>({width:d,height:u,meta:null}));p=e?.[0]}else{const e={fontSize:n.fontSize,fontStyle:n.fontStyle,fontWeight:n.fontWeight,fontFamily:n.fontFamily,lineHeight:n.lineHeight},{width:t,height:i}=vx.measureText(s,{font:e});p={text:s,fontSize:n.fontSize,lineHeight:tm(n,n.fontSize),width:t,height:i}}if(null==p)return void(i.visible=!1);const g=h?a.x:a.y+a.height,f=h?a.x+a.width:a.y,m=h?l.x:l.y+l.height,v=h?l.x+l.width:l.y,y=n.spacing*(h?1:-1);let C,b,S,w;switch(n.placement){case"outside-start":C=-1/0,b=1/0,S=g-y,w="Before";break;case"outside-end":C=-1/0,b=1/0,S=f+y,w="After";break;case"inside-start":C=g,b=v,S=g+y,w="After";break;case"inside-end":C=v,b=f,S=f-y,w="Before";break;case"inside-center":C=g,b=f,S=(g+f)/2,w="Center";break;case"bar-inside":C=m,b=v,S=(m+v)/2,w="Center";break;case"bar-inside-end":C=m,b=v,S=v-y,w="Before";break;case"bar-outside-end":C=v,b=f,S=v+y,w="After";break;case"bar-end":C=-1/0,b=1/0,S=v,w="Center"}const x=h?S:a.x+a.width/2,E=h?a.y+a.height/2:S;let M,A;h?(M=x+Mx[w]*p.width,A=M+p.width):(M=E+Ax[w]*p.height,A=M+p.height);const T=Math.min(M,A)>=Math.min(C,b)&&Math.max(M,A)<=Math.max(C,b);!n.avoidCollisions||T?(i.visible=!0,i.text=p.text,i.fontSize=p.fontSize,i.lineHeight=p.lineHeight,i.textAlign=h?xx[w]:"center",i.textBaseline=h?"middle":Ex[w],i.x=x,i.y=E):i.visible=!1})}(this,this.ctx,t,{padding:p,horizontal:i},u,e)}resetAllAnimation(){this.ctx.animationManager.stopByAnimationGroupId(this.id),Dx([this.datumSelection],wx),this.formatLabelText()}resetAnimation(e){"initial"===e?this.animationState.transition("reset"):"ready"===e&&this.animationState.transition("skip")}animateLabelText(e={}){const{animationManager:t}=this.ctx;let i=0,n=0;if(this.labelSelection.each((t,s)=>{t.opacity=1,i=t.previousDatum?.value??e.from??s.value,n=s.value}),this.labelsHaveExplicitText());else if(i===n)this.formatLabelText({label:n});else{const s=`${this.id}_labels`;t.animate({id:s,groupId:"label",from:{label:i},to:{label:n},phase:e.phase??"update",ease:jx.easeOut,onUpdate:e=>this.formatLabelText(e)})}}animateEmptyUpdateReady(){const{animationManager:e}=this.ctx,{node:t}=Sx(!0,this.horizontal);Tx(this.id,"node",e,[this.datumSelection],t,(e,t)=>t.itemId),Tx(this.id,"label",e,[this.labelSelection],jw,()=>"primary"),this.animateLabelText({from:0,phase:"initial"})}animateWaitingUpdateReady(){const{animationManager:e}=this.ctx,{node:t}=Sx(!1,this.horizontal);Tx(this.id,"node",e,[this.datumSelection],t,(e,t)=>t.itemId),this.animateLabelText()}animateReadyResize(){this.resetAllAnimation()}getSeriesDomain(){return[0,1]}getSeriesRange(e,t){return[NaN,NaN]}getLegendData(){return[]}getTooltipContent(e){const{id:t,properties:i}=this,{tooltip:n}=i;let s,r;if(0===e.type?(s=i.value,r=i.label.text):({value:s,text:r}=i.targets[e.index]),null!=s)return this.formatTooltipWithContext(n,{data:[{label:r,fallbackLabel:"Value",value:this.formatLabel(s)}]},{seriesId:t,title:void 0,datum:void 0,value:s})}pickNodeClosestDatum(e){return Xw(this,e)}pickFocus(e){return Zw(this,e)}getCaptionText(){return this.formatLabel(this.properties.value)}getCategoryValue(e){}datumIndexForCategoryValue(e){}};Zx.className="LinearGaugeSeries",Zx.type="linear-gauge";var Qx={type:"series",optionsKey:"series[]",packageType:"enterprise",chartTypes:["gauge"],identifier:"linear-gauge",moduleFactory:e=>new Zx(e),tooltipDefaults:{range:10},themeTemplate:{minWidth:200,minHeight:200,tooltip:{enabled:!1},series:{thickness:50,defaultColorRange:{$if:[{$eq:[{$palette:"type"},"inbuilt"]},{$interpolate:[{$palette:"secondDivergingColors"},5]},n.n1.SAFE_RANGE2_OPERATION]},scale:{defaultFill:{$path:["./1",{$palette:"fill"},{$palette:"hierarchyColors"}]},stroke:{$path:["./2",n.n1.SAFE_STROKE_FILL_OPERATION,{$palette:"hierarchyColors"}]},label:{spacing:11}},bar:{strokeWidth:0},segmentation:{enabled:!1,interval:{},spacing:1},defaultTarget:{fill:{$ref:"foregroundColor"},stroke:{$ref:"foregroundColor"},size:10,shape:"triangle",placement:"after",spacing:5,label:{enabled:!0,fontWeight:{$ref:"fontWeight"},fontSize:{$ref:"fontSize"},fontFamily:{$ref:"fontFamily"},color:{$ref:"textColor"},spacing:5}},defaultScale:{label:{fontWeight:{$ref:"fontWeight"},fontSize:{$ref:"fontSize"},fontFamily:{$ref:"fontFamily"},color:{$ref:"textColor"}}},label:{enabled:!1,placement:"inside-start",fontFamily:{$ref:"fontFamily"},fontWeight:{$ref:"fontWeight"},fontSize:{$rem:[2]},minimumFontSize:12,spacing:18,color:{$ref:"backgroundColor"}},margin:4}}},Jx={type:"series",name:"linear-gauge",chartType:"gauge",enterprise:!0,options:n.n1.linearGaugeSeriesOptionsDef,create:e=>new Zx(e)},eE={zoom:{axes:"xy",anchorPointX:"pointer",anchorPointY:"pointer",buttons:{anchorPointX:"middle",anchorPointY:"middle"}},legend:{enabled:!1},gradientLegend:{enabled:!1}};function tE(e,t,i,n){const[s,r]=e,[o,a]=t,l=o-s,c=a-r,h=l*l+c*c;let d,u;if(Math.abs(h)<1e-9)d=s,u=r;else{let e=((i-s)*l+(n-r)*c)/h;e=Math.max(0,Math.min(1,e)),d=s+e*(o-s),u=r+e*(a-r)}const p=i-d,g=n-u;return p*p+g*g}function iE(e,t,i){let n=1/0,s=e[e.length-1];for(const r of e)n=Math.min(n,tE(s,r,t,i)),s=r;return Math.sqrt(n)}function nE(e){let[t,i]=e[0],n=0;for(let s=1;s<e.length;s+=1){const[r,o]=e[s];n+=Math.hypot(r-t,o-i),t=r,i=o}return n}function sE(e){if(0===e.length)return;const t=nE(e)/2;let[i,n]=e[0],s=0;for(let r=1;r<e.length;r+=1){const[o,a]=e[r],l=Math.hypot(o-i,a-n),c=s+l;if(c>t){const e=(t-s)/l;return{point:[i+(o-i)*e,n+(a-n)*e],angle:Math.atan2(a-n,o-i)}}s=c,i=o,n=a}}var{LonLatBBox:rE}=n.n1;function oE(e,t,i,n,s){return null==e?e=new rE(t,i,n,s):(e.lon0=Math.min(e.lon0,t),e.lat0=Math.min(e.lat0,i),e.lon1=Math.max(e.lon1,n),e.lat1=Math.max(e.lat1,s)),e}function aE(e,t){return e.forEach(e=>{const[i,n]=e;t=oE(t,i,n,i,n)}),t}function lE(e,t,i){let n=!1,s=1/0;for(const r of e){let e=r[r.length-1],[o,a]=e;for(const l of r){const[r,c]=l;c>i!=a>i&&t<(o-r)*(i-c)/(a-c)+r&&(n=!n),s=Math.min(s,tE(e,l,t,i)),e=l,o=r,a=c}}return(n?-1:1)*Math.sqrt(s)}var{Path:cE,ExtendedPath2D:hE,BBox:dE,SceneChangeDetection:uE,SceneObjectChangeDetection:pE,objectsEqual:gE}=n.n1,fE=class extends cE{constructor(){super(...arguments),this.projectedGeometry=void 0,this.renderMode=3,this.strokePath=new hE}computeBBox(){return(this.dirtyPath||this.isDirtyPath())&&(this.updatePath(),this.dirtyPath=!1),this.bbox?.clone()}updatePath(){const{projectedGeometry:e}=this;this.strokePath.clear(),this.path.clear(),this.bbox=null!=e?this.drawGeometry(e,void 0):void 0}drawPath(e){super.drawPath(e),this.renderStroke(e,this.strokePath.getPath2D())}containsPoint(e,t){const{projectedGeometry:i}=this;return null!=i&&!!this.getBBox().containsPoint(e,t)&&this.geometryDistance(i,e,t)<=0}distanceSquared(e,t){const{projectedGeometry:i}=this;if(null==i)return 1/0;const n=this.geometryDistance(i,e,t);return n>0?n*n:0}geometryDistance(e,t,i){const{renderMode:n,strokeWidth:s}=this,r=!!(1&n),o=!!(2&n),a=Math.max(s/2,1)+1;switch(e.type){case"GeometryCollection":return e.geometries.reduce((e,n)=>Math.min(e,this.geometryDistance(n,t,i)),1/0);case"MultiPolygon":return r?e.coordinates.reduce((e,n)=>Math.min(e,Math.max(lE(n,t,i),0)),1/0):1/0;case"Polygon":return r?Math.max(lE(e.coordinates,t,i),0):1/0;case"MultiLineString":return o?e.coordinates.reduce((e,n)=>Math.min(e,Math.max(iE(n,t,i)-a,0)),1/0):1/0;case"LineString":return o?Math.max(iE(e.coordinates,t,i)-a,0):1/0;default:return 1/0}}drawGeometry(e,t){const{renderMode:i,path:n,strokePath:s}=this,r=!!(1&i),o=!!(2&i);switch(e.type){case"GeometryCollection":e.geometries.forEach(e=>{t=this.drawGeometry(e,t)});break;case"MultiPolygon":r&&e.coordinates.forEach(e=>{t=this.drawPolygon(n,e,t)});break;case"Polygon":r&&(t=this.drawPolygon(n,e.coordinates,t));break;case"LineString":o&&(t=this.drawLineString(s,e.coordinates,t,!1));break;case"MultiLineString":o&&e.coordinates.forEach(e=>{t=this.drawLineString(s,e,t,!1)})}return t}drawPolygon(e,t,i){if(t.length<1)return i;i=this.drawLineString(e,t[0],i,!0);for(let i=1;i<t.length;i+=1){const n=t[i];this.drawLineString(e,n,void 0,!0)}return i}drawLineString(e,t,i,n){if(t.length<2)return i;const s=n?t.length-1:t.length;for(let n=0;n<s;n+=1){const[s,r]=t[n];if(0===n?e.moveTo(s,r):e.lineTo(s,r),null==i)i=new dE(s,r,0,0);else{const{x:e,y:t}=i,n=e+i.width,o=t+i.height;i.x=Math.min(e,s),i.y=Math.min(t,r),i.width=Math.max(n,s)-i.x,i.height=Math.max(o,r)-i.y}}return n&&e.closePath(),i}};function mE(e,t){if(null!=e.bbox){const[i,n,s,r]=e.bbox;return t=oE(t,i,n,s,r)}switch(e.type){case"GeometryCollection":e.geometries.forEach(e=>{t=mE(e,t)});break;case"MultiPolygon":e.coordinates.forEach(e=>{e.length>0&&(t=aE(e[0],t))});break;case"Polygon":e.coordinates.length>0&&(t=aE(e.coordinates[0],t));break;case"MultiLineString":e.coordinates.forEach(e=>{t=aE(e,t)});break;case"LineString":t=aE(e.coordinates,t);break;case"MultiPoint":e.coordinates.forEach(e=>{const[i,n]=e;t=oE(t,i,n,i,n)});break;case"Point":{const[i,n]=e.coordinates;t=oE(t,i,n,i,n);break}}return t}function vE(e){switch(e.type){case"GeometryCollection":{let t,i;return e.geometries.forEach(e=>{const n=vE(e);if(null==n)return;const s=aE(n[0],void 0);if(null==s)return;const r=Math.abs(s.lat1-s.lat0)*Math.abs(s.lon1-s.lon0);(null==t||r>t)&&(t=r,i=n)}),i}case"MultiPolygon":{let t,i;return e.coordinates.forEach(e=>{const n=aE(e[0],void 0);if(null==n)return;const s=Math.abs(n.lat1-n.lat0)*Math.abs(n.lon1-n.lon0);(null==t||s>t)&&(t=s,i=e)}),i}case"Polygon":return e.coordinates;case"MultiLineString":case"LineString":case"MultiPoint":case"Point":return}}function yE(e){switch(e.type){case"GeometryCollection":{let t,i;return e.geometries.forEach(e=>{const n=yE(e);if(null==n)return;const s=nE(n);null!=s&&(null==t||s>t)&&(t=s,i=n)}),i}case"MultiLineString":{let t,i=0;return e.coordinates.forEach(e=>{const n=nE(e);n>i&&(i=n,t=e)}),t}case"LineString":return e.coordinates;case"MultiPolygon":case"Polygon":case"MultiPoint":case"Point":return}}function CE(e,t){if(null==e)return!1;switch(e.type){case"GeometryCollection":return e.geometries.some(e=>CE(e,t));case"MultiPolygon":case"Polygon":return!!(1&t);case"MultiLineString":case"LineString":return!!(2&t);case"MultiPoint":case"Point":return!!(4&t)}}function bE(e,t){switch(e.type){case"GeometryCollection":return{type:"GeometryCollection",geometries:e.geometries.map(e=>bE(e,t))};case"Polygon":return{type:"Polygon",coordinates:wE(e.coordinates,t)};case"MultiPolygon":return{type:"MultiPolygon",coordinates:SE(e.coordinates,t)};case"MultiLineString":return{type:"MultiLineString",coordinates:wE(e.coordinates,t)};case"LineString":return{type:"LineString",coordinates:xE(e.coordinates,t)};case"MultiPoint":return{type:"MultiPoint",coordinates:xE(e.coordinates,t)};case"Point":return{type:"Point",coordinates:t.convert(e.coordinates)}}}function SE(e,t){return e.map(e=>wE(e,t))}function wE(e,t){return e.map(e=>xE(e,t))}function xE(e,t){return e.map(e=>t.convert(e))}function EE(e,t){const i=e.contextNodeData?.nodeData[t.datumIndex];if(void 0!==i)for(const t of e.datumSelection.nodes())if(t.datum===i)return t}a([pE({equals:gE})],fE.prototype,"projectedGeometry",2),a([uE()],fE.prototype,"renderMode",2),n.n1.SeriesProperties;var ME=class extends n.n1.DataModelSeries{addChartEventListeners(){this.destroyFns.push(this.ctx.chartEventManager.addListener("legend-item-click",e=>{this.onLegendItemClick(e)}),this.ctx.chartEventManager.addListener("legend-item-double-click",e=>{this.onLegendItemDoubleClick(e)}))}getSeriesDomain(){return[NaN,NaN]}getSeriesRange(e,t){return[NaN,NaN]}},{Property:AE,SeriesProperties:TE,SeriesTooltip:DE,Label:IE}=n.n1,RE=class extends TE{constructor(){super(...arguments),this.topology=void 0,this.idKey="",this.topologyIdKey="name",this.idName=void 0,this.labelKey=void 0,this.labelName=void 0,this.colorRange=void 0,this.maxStrokeWidth=void 0,this.stroke="black",this.strokeOpacity=1,this.strokeWidth=0,this.lineDash=[0],this.lineDashOffset=0,this.label=new IE,this.tooltip=new DE}};a([AE],RE.prototype,"topology",2),a([AE],RE.prototype,"title",2),a([AE],RE.prototype,"legendItemName",2),a([AE],RE.prototype,"idKey",2),a([AE],RE.prototype,"topologyIdKey",2),a([AE],RE.prototype,"idName",2),a([AE],RE.prototype,"labelKey",2),a([AE],RE.prototype,"labelName",2),a([AE],RE.prototype,"sizeKey",2),a([AE],RE.prototype,"sizeName",2),a([AE],RE.prototype,"colorKey",2),a([AE],RE.prototype,"colorName",2),a([AE],RE.prototype,"sizeDomain",2),a([AE],RE.prototype,"colorRange",2),a([AE],RE.prototype,"maxStrokeWidth",2),a([AE],RE.prototype,"stroke",2),a([AE],RE.prototype,"strokeOpacity",2),a([AE],RE.prototype,"strokeWidth",2),a([AE],RE.prototype,"lineDash",2),a([AE],RE.prototype,"lineDashOffset",2),a([AE],RE.prototype,"itemStyler",2),a([AE],RE.prototype,"label",2),a([AE],RE.prototype,"tooltip",2);var{getMissCount:LE,createDatumId:kE,SeriesNodePickMode:PE,valueProperty:NE,CachedTextMeasurerPool:OE,ColorScale:_E,LinearScale:FE,Selection:GE,Text:VE,Transformable:BE}=n.n1,HE=class extends ME{constructor(e){super({moduleCtx:e,categoryKey:void 0,useLabelLayer:!0,pickModes:[PE.EXACT_SHAPE_MATCH,PE.NEAREST_NODE],usesPlacedLabels:!0}),this.properties=new RE,this._chartTopology=void 0,this.colorScale=new _E,this.sizeScale=new FE,this.datumSelection=GE.select(this.contentGroup,()=>this.nodeFactory()),this.labelSelection=GE.select(this.labelGroup,VE),this.highlightDatumSelection=GE.select(this.highlightNode,()=>this.nodeFactory()),this._previousDatumMidPoint=void 0}getNodeData(){return this.contextNodeData?.nodeData}get topology(){return this.properties.topology??this._chartTopology}get hasData(){return super.hasData&&null!=this.topology}renderToOffscreenCanvas(){return!0}setSeriesIndex(e){return!!super.setSeriesIndex(e)&&(this.contentGroup.zIndex=[1,e],this.highlightGroup.zIndex=[2,e],!0)}setChartTopology(e){this._chartTopology=e,this.topology===e&&(this.nodeDataRefresh=!0)}isLabelEnabled(){return null!=this.properties.labelKey&&this.properties.label.enabled}nodeFactory(){const e=new fE;return e.renderMode=2,e.lineJoin="round",e.lineCap="round",e}async processData(e){if(null==this.data)return;const{data:t,topology:i,sizeScale:n,colorScale:r}=this,{topologyIdKey:o,idKey:a,sizeKey:l,colorKey:c,labelKey:h,sizeDomain:d,colorRange:u}=this.properties,p=new Map;i?.features.forEach(e=>{const t=e.properties?.[o];null!=t&&CE(e.geometry,2)&&p.set(t,e)});const g=this.sizeScale.type,f=this.colorScale.type,m=this.scale?.type,{dataModel:v,processedData:y}=await this.requestDataModel(e,t,{props:[NE(a,m,{id:"idValue",includeProperty:!1}),NE(a,m,{id:"featureValue",includeProperty:!1,processor:()=>e=>p.get(e)}),...null!=h?[NE(h,"band",{id:"labelValue"})]:[],...null!=l?[NE(l,g,{id:"sizeValue"})]:[],...null!=c?[NE(c,f,{id:"colorValue"})]:[]]}),C=v.resolveColumnById(this,"featureValue",y);if(this.topologyBounds=C.reduce((e,t)=>{const i=t?.geometry;return null==i?e:mE(i,e)},void 0),null!=l){const e=v.resolveProcessedDataIndexById(this,"sizeValue"),t=y.domain.values[e]??[];n.domain=d??t}if(null!=u&&this.isColorScaleValid()){const e=v.resolveProcessedDataIndexById(this,"colorValue");r.domain=y.domain.values[e],r.range=u,r.update()}null==i&&s.Vy.warnOnce("no topology was provided for [MapLineSeries]; nothing will be rendered.")}isColorScaleValid(){const{colorKey:e}=this.properties;if(!e)return!1;const{dataModel:t,processedData:i}=this;if(!t||!i)return!1;const n=t.resolveProcessedDataIndexById(this,"colorValue"),s=i.input.count,r=LE(this,i.defs.values[n].missing);return!(0===s||s===r)}getLabelDatum(e,t,i,n){if(null==t||null==i)return;const s=yE(i);if(null==s)return;const{idKey:r,idName:o,sizeKey:a,sizeName:l,colorKey:c,colorName:h,labelKey:d,labelName:u,label:p}=this.properties,g=this.getLabelText(p,{value:t,datum:e,idKey:r,idName:o,sizeKey:a,sizeName:l,colorKey:c,colorName:h,labelKey:d,labelName:u});if(null==g)return;const f=OE.measureText(String(g),{font:n}),m=sE(s);if(null==m)return;const[v,y]=m.point,{width:C,height:b}=f;return{point:{x:v,y,size:0},label:{width:C,height:b,text:g},anchor:void 0,placement:void 0}}createNodeData(){const{id:e,dataModel:t,processedData:i,sizeScale:n,properties:r,scale:o}=this,{idKey:a,sizeKey:l,colorKey:c,labelKey:h,label:d}=r;if(null==t||null==i)return;const u=t.resolveColumnById(this,"idValue",i),p=t.resolveColumnById(this,"featureValue",i),g=null!=h?t.resolveColumnById(this,"labelValue",i):void 0,f=null!=l?t.resolveColumnById(this,"sizeValue",i):void 0,m=null!=c?t.resolveColumnById(this,"colorValue",i):void 0,v=r.maxStrokeWidth??r.strokeWidth;n.range=[Math.min(r.strokeWidth,v),v];const y=d.getFont(),C=new Map;i.dataSources.get(this.id)?.forEach((e,t)=>{const i=u[t],n=p[t]?.geometry??void 0,s=null!=n&&null!=o?bE(n,o):void 0;null!=i&&null!=s&&C.set(i,s)});const b=[],S=[],w=[];if((i.dataSources.get(this.id)??[]).forEach((e,t)=>{const i=u[t],n=m?.[t],s=f?.[t],r=g?.[t],o=C.get(i);null==o&&w.push(i);const l=this.getLabelDatum(e,r,o,y);null!=l&&S.push(l),b.push({series:this,itemId:a,datum:e,datumIndex:t,idValue:i,labelValue:r,colorValue:n,sizeValue:s,projectedGeometry:o})}),w.length>10){const e=w.length-10;w.length=10,w.push(`(+${e} more)`)}return w.length>0&&s.Vy.warnOnce("some data items do not have matches in the provided topology",w),{itemId:e,nodeData:b,labelData:S}}updateSelections(){this.nodeDataRefresh&&(this.contextNodeData=this.createNodeData(),this.nodeDataRefresh=!1)}update(){const{datumSelection:e,highlightDatumSelection:t}=this;this.updateSelections(),this.contentGroup.visible=this.visible,this.contentGroup.opacity=this.getOpacity();let i=this.ctx.highlightManager?.getActiveHighlight();null==i||i.series===this&&null!=i.datum||(i=void 0);const n=this.contextNodeData?.nodeData??[];this.datumSelection=this.updateDatumSelection({nodeData:n,datumSelection:e}),this.updateDatumNodes({datumSelection:e,isHighlight:!1}),this.highlightDatumSelection=this.updateDatumSelection({nodeData:null!=i?[i]:[],datumSelection:t}),this.updateDatumNodes({datumSelection:t,isHighlight:!0})}updateDatumSelection(e){return e.datumSelection.update(e.nodeData,void 0,e=>kE(e.idValue))}getItemBaseStyle(e){const{properties:t}=this,i=e?t.highlightStyle.item:void 0;return{stroke:i?.stroke??t.stroke,strokeWidth:i?.strokeWidth??this.getStrokeWidth(t.strokeWidth),strokeOpacity:i?.strokeOpacity??t.strokeOpacity,lineDash:i?.lineDash??t.lineDash,lineDashOffset:i?.lineDashOffset??t.lineDashOffset}}getItemStyleOverrides(e,t,i,n,s,r){const{id:o,properties:a,colorScale:l,sizeScale:c}=this,{colorRange:h,itemStyler:d}=a;let u;if(r||null==i||(u??(u={}),u.stroke=this.isColorScaleValid()?l.convert(i):h?.[0]??a.stroke),null!=n&&(u??(u={}),u.strokeWidth=c.convert(n,{clamp:!0})),null!=d){const i=this.cachedDatumCallback(kE(e,r?"highlight":"node"),()=>this.callWithContext(d,{seriesId:o,datum:t,highlighted:r,...s,...u}));u??(u={}),Object.assign(u,i)}return u}updateDatumNodes(e){const{datumSelection:t,isHighlight:i}=e,n=this.getItemBaseStyle(i);t.each((e,t)=>{const{datum:s,datumIndex:r,colorValue:o,sizeValue:a,projectedGeometry:l}=t;if(null==l)return e.visible=!1,void(e.projectedGeometry=void 0);const c=this.getItemStyleOverrides(String(r),s,o,a,n,i);e.visible=!0,e.projectedGeometry=l,e.stroke=c?.stroke??n.stroke,e.strokeWidth=c?.strokeWidth??n.strokeWidth,e.strokeOpacity=c?.strokeOpacity??n.strokeOpacity,e.lineDash=c?.lineDash??n.lineDash,e.lineDashOffset=c?.lineDashOffset??n.lineDashOffset})}updatePlacedLabelData(e){this.labelSelection=this.labelSelection.update(e,e=>{e.pointerEvents=n.n1.PointerEvents.None}),this.updateLabelNodes({labelSelection:this.labelSelection})}updateLabelNodes(e){const{labelSelection:t}=e,{color:i,fontStyle:n,fontWeight:s,fontSize:r,fontFamily:o}=this.properties.label;t.each((e,{x:t,y:a,width:l,height:c,text:h})=>{e.visible=!0,e.x=t+l/2,e.y=a+c/2,e.text=h,e.fill=i,e.fontStyle=n,e.fontWeight=s,e.fontSize=r,e.fontFamily=o,e.textAlign="center",e.textBaseline="middle"})}resetAnimation(){}getLabelData(){return this.isLabelEnabled()?this.contextNodeData?.labelData??[]:[]}pickNodeClosestDatum({x:e,y:t}){let i,n=1/0;return this.datumSelection.each((s,r)=>{const o=s.distanceSquared(e,t);o<n&&(n=o,i=r)}),null!=i?{datum:i,distance:Math.sqrt(n)}:void 0}datumMidPoint(e){const{_previousDatumMidPoint:t}=this;if(t?.datum===e)return t.point;const i=e.projectedGeometry,n=null!=i?yE(i):void 0,s=null!=n?sE(n)?.point:void 0,r=null!=s?{x:s[0],y:s[1]}:void 0;return this._previousDatumMidPoint={datum:e,point:r},r}legendItemSymbol(e){const{dataModel:t,processedData:i,properties:n}=this,{strokeWidth:s,strokeOpacity:r,lineDash:o}=n;let{stroke:a}=n;if(null!=e&&this.isColorScaleValid()){const n=t.resolveColumnById(this,"colorValue",i)[e];a=this.colorScale.convert(n)}return{marker:{fill:void 0,fillOpacity:0,stroke:void 0,strokeWidth:0,strokeOpacity:0,lineDash:[0],lineDashOffset:0,enabled:!1},line:{stroke:a,strokeWidth:s,strokeOpacity:r,lineDash:o}}}getLegendData(e){const{processedData:t,dataModel:i}=this;if(null==t||null==i)return[];const{id:n,visible:s}=this,{title:r,legendItemName:o,idKey:a,idName:l,colorKey:c,colorName:h,colorRange:d,showInLegend:u}=this.properties;return"gradient"===e&&null!=c&&null!=d?[{legendType:"gradient",enabled:s,seriesId:n,colorName:h,colorRange:d,colorDomain:t.domain.values[i.resolveProcessedDataIndexById(this,"colorValue")]}]:"category"===e?[{legendType:"category",id:n,itemId:n,seriesId:n,enabled:s,label:{text:o??r??l??a},symbol:this.legendItemSymbol(),legendItemName:o,hideInLegend:!u}]:[]}getTooltipContent(e){const{id:t,dataModel:i,processedData:n,properties:s}=this,{idKey:r,idName:o,colorKey:a,colorName:l,sizeKey:c,sizeName:h,labelKey:d,labelName:u,title:p,legendItemName:g,tooltip:f}=s;if(!i||!n)return;const m=n.dataSources.get(this.id)?.[e],v=i.resolveColumnById(this,"idValue",n),y=[],C=null!=c?i.resolveColumnById(this,"sizeValue",n)[e]:void 0,b=null!=a?i.resolveColumnById(this,"colorValue",n)[e]:void 0;if(null!=c&&y.push({label:h,fallbackLabel:c,value:String(C)}),null!=a&&y.push({label:l,fallbackLabel:a,value:String(b)}),null!=d&&d!==r){const t=i.resolveColumnById(this,"labelValue",n)[e];y.push({label:u,fallbackLabel:d,value:t})}const S=this.getItemBaseStyle(!1);return Object.assign(S,this.getItemStyleOverrides(String(e),e,b,C,S,!1)),this.formatTooltipWithContext(f,{heading:v[e],title:p??g,symbol:this.legendItemSymbol(e),data:y},{seriesId:t,datum:m,title:p,idKey:r,idName:o,colorKey:a,colorName:l,sizeKey:c,sizeName:h,labelKey:d,labelName:u,...S})}computeFocusBounds(e){const t=EE(this,e);return t?BE.toCanvas(this.contentGroup,t.getBBox()):void 0}};HE.className="MapLineSeries",HE.type="map-line";var{commonSeriesOptionsDefs:zE,mapLineSeriesThemeableOptionsDef:UE,without:WE}=n.n1,jE={...UE,...WE(zE,["highlightStyle"]),type:(0,s.mw)((0,s.dY)("map-line")),idKey:(0,s.mw)(s.Yj),sizeKey:s.Yj,colorKey:s.Yj,labelKey:s.Yj,idName:s.Yj,sizeName:s.Yj,colorName:s.Yj,labelName:s.Yj,topology:s.eW,topologyIdKey:s.Yj,legendItemName:s.Yj,title:s.Yj};jE.colorRange=(0,s._L)((0,s.Uo)((0,s.jk)(s.yW),(0,s.O9)(1)));var KE={type:"series",optionsKey:"series[]",packageType:"enterprise",chartTypes:["topology"],identifier:"map-line",moduleFactory:e=>new HE(e),tooltipDefaults:{range:"exact"},themeTemplate:{...eE,series:{stroke:n.n1.SAFE_STROKE_FILL_OPERATION,colorRange:{$if:[{$eq:[{$palette:"type"},"inbuilt"]},{$palette:"divergingColors"},n.n1.SAFE_RANGE2_OPERATION]},strokeWidth:1,maxStrokeWidth:3,lineDash:[0],lineDashOffset:0,label:{enabled:!0,fontSize:{$ref:"fontSize"},fontFamily:{$ref:"fontFamily"},fontWeight:{$ref:"fontWeight"},color:{$ref:"textColor"}}},tooltip:{range:"exact"}}},$E={type:"series",name:"map-line",chartType:"topology",enterprise:!0,options:jE,create:e=>new HE(e)},{Property:YE,SeriesProperties:qE,SeriesTooltip:XE}=n.n1,ZE=class extends qE{constructor(){super(...arguments),this.topology=void 0,this.stroke="black",this.strokeOpacity=1,this.strokeWidth=0,this.lineDash=[0],this.lineDashOffset=0,this.tooltip=new XE}};a([YE],ZE.prototype,"topology",2),a([YE],ZE.prototype,"stroke",2),a([YE],ZE.prototype,"strokeOpacity",2),a([YE],ZE.prototype,"strokeWidth",2),a([YE],ZE.prototype,"lineDash",2),a([YE],ZE.prototype,"lineDashOffset",2),a([YE],ZE.prototype,"tooltip",2);var{createDatumId:QE,SeriesNodePickMode:JE,Group:eM,Selection:tM,PointerEvents:iM}=n.n1,nM=class extends ME{constructor(e){super({moduleCtx:e,categoryKey:void 0,useLabelLayer:!0,pickModes:[JE.EXACT_SHAPE_MATCH]}),this.properties=new ZE,this._chartTopology=void 0,this.itemGroup=this.contentGroup.appendChild(new eM({name:"itemGroup"})),this.datumSelection=tM.select(this.itemGroup,()=>this.nodeFactory())}getNodeData(){return this.contextNodeData?.nodeData}get topology(){return this.properties.topology??this._chartTopology}get focusable(){return!1}setOptionsData(){}setChartData(){}get hasData(){return!1}renderToOffscreenCanvas(){return!0}setChartTopology(e){this._chartTopology=e,this.topology===e&&(this.nodeDataRefresh=!0)}setSeriesIndex(e){return!!super.setSeriesIndex(e)&&(this.contentGroup.zIndex=[0,e,0],this.highlightGroup.zIndex=[0,e,1],!0)}nodeFactory(){const e=new fE;return e.renderMode=2,e.lineJoin="round",e.lineCap="round",e.pointerEvents=iM.None,e}processData(){const{topology:e}=this;this.topologyBounds=e?.features.reduce((e,t)=>{const i=t.geometry;return null==i?e:mE(i,e)},void 0),null==e&&s.Vy.warnOnce("no topology was provided for [MapShapeBackgroundSeries]; nothing will be rendered.")}createNodeData(){const{id:e,topology:t,scale:i}=this;if(null==t)return;const n=[];return t.features.forEach((e,t)=>{const{geometry:s}=e,r=null!=s&&null!=i?bE(s,i):void 0;null!=r&&n.push({series:this,itemId:t,datum:e,datumIndex:0,index:t,projectedGeometry:r})}),{itemId:e,nodeData:n,labelData:[]}}updateSelections(){this.nodeDataRefresh&&(this.contextNodeData=this.createNodeData(),this.nodeDataRefresh=!1)}update(){const{datumSelection:e}=this;this.updateSelections(),this.contentGroup.visible=this.visible;const{nodeData:t=[]}=this.contextNodeData??{};this.datumSelection=this.updateDatumSelection({nodeData:t,datumSelection:e}),this.updateDatumNodes({datumSelection:e})}updateDatumSelection(e){return e.datumSelection.update(e.nodeData,void 0,e=>QE(e.index))}updateDatumNodes(e){const{properties:t}=this,{datumSelection:i}=e,{stroke:n,strokeOpacity:s,lineDash:r,lineDashOffset:o}=t,a=this.getStrokeWidth(t.strokeWidth);i.each((e,t)=>{const{projectedGeometry:i}=t;if(null==i)return e.visible=!1,void(e.projectedGeometry=void 0);e.visible=!0,e.projectedGeometry=i,e.stroke=n,e.strokeWidth=a,e.strokeOpacity=s,e.lineDash=r,e.lineDashOffset=o})}resetAnimation(){}getLegendData(){return[]}getTooltipContent(e){}computeFocusBounds(e){}};nM.className="MapLineBackgroundSeries",nM.type="map-line-background";var{mapLineBackgroundSeriesThemeableOptionsDef:sM}=n.n1,rM={...sM,type:(0,s.mw)((0,s.dY)("map-line-background")),topology:s.eW},oM={type:"series",optionsKey:"series[]",packageType:"enterprise",chartTypes:["topology"],identifier:"map-line-background",moduleFactory:e=>new nM(e),tooltipDefaults:{range:"exact"},themeTemplate:{...eE,series:{stroke:{$path:["./1",{$palette:"stroke"},{$palette:"secondHierarchyColors"}]},strokeWidth:1,lineDash:[0],lineDashOffset:0}}},aM={type:"series",name:"map-line-background",chartType:"topology",enterprise:!0,options:rM,create:e=>new nM(e)},lM=(e,t,i)=>{let n=e,s=n;for(const e of t)if(null==n||i(n.value,e)>0)n={value:e,next:n},s=n;else{for(;null!=s.next&&i(s.next.value,e)<=0;)s=s.next;s.next={value:e,next:s.next}}return n};function cM(e,t,i){const n=aE(e[0],void 0);if(null==n)return;const s=(n.lon0+n.lon1)/2,r=(n.lat0+n.lat1)/2,o=Math.abs(n.lon1-n.lon0),a=Math.abs(n.lat1-n.lat0),l=function(e){if(0===e.length)return;let t=0,i=0,n=0,[s,r]=e[e.length-1];for(const[o,a]of e){const e=s*a-o*r;n+=e,t+=(s+o)*e,i+=(r+a)*e,s=o,r=a}return n*=3,[t/n,i/n]}(e[0]),[c,h]=l,d=-lE(e,c,h);let u;const p=(e,t)=>e-.5*Math.max(t-d,0),g=(t,n,s)=>{const{distance:r,maxDistance:o}=i(e,t,n,s),a=Math.hypot(c-t,h-n),l=Math.min(Math.max(c,t-s/2),t+s/2),d=Math.min(Math.max(h,n-s/2),n+s/2),u=Math.hypot(c-l,h-d);return{distance:r,maxDistance:o,value:p(r,a),maxValue:p(o,u),x:t,y:n,stride:s}},f=(e,t,i,n)=>{const s=g(t,i,n);s.maxDistance>=0&&e.push(s)},m=Math.min(o,a)/2;let v={value:g(s,r,m),next:null};for(;null!=v;){const e=v.value,{distance:i,value:n,maxValue:s,x:r,y:o,stride:a}=e;if(v=v.next,i>0&&(null==u||n>u.value)&&(u=e),null!=u&&s-u.value<=t)continue;const l=a/2,c=[];f(c,r-l,o-l,l),f(c,r+l,o-l,l),f(c,r-l,o+l,l),f(c,r+l,o+l,l),c.sort(hM),v=lM(v,c,hM)}if(null==u)return;const{distance:y,x:C,y:b}=u;return{x:C,y:b,distance:y}}var hM=(e,t)=>t.maxValue-e.maxValue;function dM(e,t){const i=cM(e,t,(e,t,i,n)=>{const s=-lE(e,t,i);return{distance:s,maxDistance:s+n*Math.SQRT2}});if(null==i)return;const{x:n,y:s}=i;return[n,s]}function uM(e,t){let i;switch(e.type){case"GeometryCollection":return e.geometries.flatMap(e=>uM(e,t));case"MultiPoint":return e.coordinates;case"Point":return[e.coordinates];case"MultiPolygon":{const n=vE(e);i=null!=n?dM(n,t):void 0;break}case"Polygon":{const n=e.coordinates;i=null!=n?dM(n,t):void 0;break}case"MultiLineString":{const t=yE(e);i=null!=t?sE(t)?.point:void 0;break}case"LineString":{const t=e.coordinates;i=sE(t)?.point;break}}return null!=i?[i]:[]}var{BBox:pM}=n.n1;function gM(e){if(!e)return;const{range:t}=e,i=t[0][0],n=t[0][1],s=t[1][0]-i,r=t[1][1]-n,o=new pM(i,n,s,r);return{series:o,axis:o}}var{FillGradientDefaults:fM,FillPatternDefaults:mM,FillImageDefaults:vM,Property:yM,SeriesProperties:CM,SeriesTooltip:bM,Label:SM}=n.n1,wM=class extends SM{constructor(){super(...arguments),this.placement="bottom"}};a([yM],wM.prototype,"placement",2);var xM=class extends CM{constructor(){super(...arguments),this.topology=void 0,this.idKey=void 0,this.topologyIdKey="name",this.idName=void 0,this.latitudeKey=void 0,this.latitudeName=void 0,this.longitudeKey=void 0,this.longitudeName=void 0,this.labelKey=void 0,this.labelName=void 0,this.colorRange=void 0,this.shape="circle",this.size=6,this.fill="black",this.fillGradientDefaults=new fM,this.fillPatternDefaults=new mM,this.fillImageDefaults=new vM,this.fillOpacity=1,this.stroke="black",this.strokeWidth=1,this.strokeOpacity=1,this.lineDash=[0],this.lineDashOffset=0,this.label=new wM,this.tooltip=new bM}};a([yM],xM.prototype,"topology",2),a([yM],xM.prototype,"title",2),a([yM],xM.prototype,"legendItemName",2),a([yM],xM.prototype,"idKey",2),a([yM],xM.prototype,"topologyIdKey",2),a([yM],xM.prototype,"idName",2),a([yM],xM.prototype,"latitudeKey",2),a([yM],xM.prototype,"latitudeName",2),a([yM],xM.prototype,"longitudeKey",2),a([yM],xM.prototype,"longitudeName",2),a([yM],xM.prototype,"labelKey",2),a([yM],xM.prototype,"labelName",2),a([yM],xM.prototype,"sizeKey",2),a([yM],xM.prototype,"sizeName",2),a([yM],xM.prototype,"colorKey",2),a([yM],xM.prototype,"colorName",2),a([yM],xM.prototype,"colorRange",2),a([yM],xM.prototype,"shape",2),a([yM],xM.prototype,"size",2),a([yM],xM.prototype,"maxSize",2),a([yM],xM.prototype,"sizeDomain",2),a([yM],xM.prototype,"fill",2),a([yM],xM.prototype,"fillGradientDefaults",2),a([yM],xM.prototype,"fillPatternDefaults",2),a([yM],xM.prototype,"fillImageDefaults",2),a([yM],xM.prototype,"fillOpacity",2),a([yM],xM.prototype,"stroke",2),a([yM],xM.prototype,"strokeWidth",2),a([yM],xM.prototype,"strokeOpacity",2),a([yM],xM.prototype,"lineDash",2),a([yM],xM.prototype,"lineDashOffset",2),a([yM],xM.prototype,"itemStyler",2),a([yM],xM.prototype,"label",2),a([yM],xM.prototype,"tooltip",2);var{CachedTextMeasurerPool:EM,fromToMotion:MM,StateMachine:AM,getMissCount:TM,createDatumId:DM,SeriesNodePickMode:IM,valueProperty:RM,computeMarkerFocusBounds:LM,ColorScale:kM,LinearScale:PM,Group:NM,Selection:OM,Text:_M,Marker:FM,applyShapeStyle:GM,getShapeStyle:VM}=n.n1,BM=class extends ME{constructor(e){super({moduleCtx:e,categoryKey:void 0,useLabelLayer:!0,pickModes:[IM.EXACT_SHAPE_MATCH,IM.NEAREST_NODE],usesPlacedLabels:!0}),this.properties=new xM,this._chartTopology=void 0,this.colorScale=new kM,this.sizeScale=new PM,this.markerGroup=this.contentGroup.appendChild(new NM({name:"markerGroup"})),this.labelSelection=OM.select(this.labelGroup,_M,!1),this.markerSelection=OM.select(this.markerGroup,FM,!1),this.highlightMarkerSelection=OM.select(this.highlightNode,FM),this.animationState=new AM("empty",{empty:{update:{target:"ready",action:()=>this.animateMarkers()},reset:"empty",skip:"ready"},ready:{updateData:"waiting",clear:"clearing",resize:()=>this.resetAllAnimation(),reset:"empty",skip:"ready"},waiting:{update:{target:"ready",action:()=>this.animateMarkers()},resize:{target:"ready",action:()=>this.resetAllAnimation()},reset:"empty",skip:"ready"},clearing:{update:{target:"empty",action:()=>this.resetAllAnimation()},reset:"empty",skip:"ready"}},()=>this.checkProcessedDataAnimatable())}getNodeData(){return this.contextNodeData?.nodeData}get topology(){return this.properties.topology??this._chartTopology}get hasData(){const e=null!=this.properties.latitudeKey&&null!=this.properties.longitudeKey;return super.hasData&&(null!=this.topology||e)}renderToOffscreenCanvas(){return!0}setChartTopology(e){this._chartTopology=e,this.topology===e&&(this.nodeDataRefresh=!0)}setSeriesIndex(e){return!!super.setSeriesIndex(e)&&(this.contentGroup.zIndex=[3,e],this.highlightGroup.zIndex=[4,e],!0)}isLabelEnabled(){return null!=this.properties.labelKey&&this.properties.label.enabled}async processData(e){if(null==this.data)return;const{data:t,topology:i,sizeScale:n,colorScale:s}=this,{topologyIdKey:r,idKey:o,latitudeKey:a,longitudeKey:l,sizeKey:c,colorKey:h,labelKey:d,sizeDomain:u,colorRange:p}=this.properties,g=new Map;i?.features.forEach(e=>{const t=e.properties?.[r];null!=t&&g.set(t,e)});const f=this.sizeScale.type,m=this.colorScale.type,v=this.scale?.type,y=null!=a&&null!=l,{dataModel:C,processedData:b}=await this.requestDataModel(e,t,{props:[...null!=o?[RM(o,v,{id:"idValue",includeProperty:!1}),RM(o,v,{id:"featureValue",includeProperty:!1,processor:()=>e=>g.get(e)})]:[],...y?[RM(a,v,{id:"latValue"}),RM(l,v,{id:"lonValue"})]:[],...d?[RM(d,"band",{id:"labelValue"})]:[],...c?[RM(c,f,{id:"sizeValue"})]:[],...h?[RM(h,m,{id:"colorValue"})]:[]]}),S=null!=o?C.resolveColumnById(this,"featureValue",b):void 0,w=y?C.resolveColumnById(this,"latValue",b):void 0,x=y?C.resolveColumnById(this,"lonValue",b):void 0;if(this.topologyBounds=b.dataSources.get(this.id)?.reduce((e,t,i)=>{const n=S?.[i],s=n?.geometry;if(null!=s&&(e=mE(s,e)),null!=w&&null!=x){const t=x[i],n=w[i];e=oE(e,t,n,t,n)}return e},void 0),null!=c){const e=C.resolveProcessedDataIndexById(this,"sizeValue"),t=b.domain.values[e]??[];n.domain=u??t}if(null!=p&&this.isColorScaleValid()){const e=C.resolveProcessedDataIndexById(this,"colorValue");s.domain=b.domain.values[e],s.range=p,s.update()}this.animationState.transition("updateData")}isColorScaleValid(){const{colorKey:e}=this.properties;if(!e)return!1;const{dataModel:t,processedData:i}=this;if(!t||!i)return!1;const n=t.resolveProcessedDataIndexById(this,"colorValue"),s=i.input.count,r=TM(this,i.defs.values[n].missing);return!(0===s||s===r)}getLabelDatum(e,t,i,n,s,r){if(null==t)return;const{idKey:o,idName:a,latitudeKey:l,latitudeName:c,longitudeKey:h,longitudeName:d,sizeKey:u,sizeName:p,colorKey:g,colorName:f,labelKey:m,labelName:v,label:y,shape:C}=this.properties,{placement:b}=y,S=this.getLabelText(y,{value:t,datum:e,idKey:o,idName:a,latitudeKey:l,latitudeName:c,longitudeKey:h,longitudeName:d,sizeKey:u,sizeName:p,colorKey:g,colorName:f,labelKey:m,labelName:v});if(null==S)return;const{width:w,height:x}=EM.measureText(String(S),{font:r});return{point:{x:i,y:n,size:s},label:{width:w,height:x,text:S},anchor:FM.anchor(C),placement:b}}createNodeData(){const{id:e,dataModel:t,processedData:i,sizeScale:n,properties:r,scale:o}=this,{idKey:a,latitudeKey:l,longitudeKey:c,sizeKey:h,colorKey:d,labelKey:u,label:p}=r;if(null==t||null==i||null==o)return;const g=null!=l&&null!=c,f=null!=a?t.resolveColumnById(this,"idValue",i):void 0,m=null!=a?t.resolveColumnById(this,"featureValue",i):void 0,v=g?t.resolveColumnById(this,"latValue",i):void 0,y=g?t.resolveColumnById(this,"lonValue",i):void 0,C=null!=u?t.resolveColumnById(this,"labelValue",i):void 0,b=null!=h?t.resolveColumnById(this,"sizeValue",i):void 0,S=null!=d?t.resolveColumnById(this,"colorValue",i):void 0,w=r.maxSize??r.size;n.range=[Math.min(r.size,w),w];const x=p.getFont();let E;null!=f&&null!=m&&(E=new Map,i.dataSources.get(this.id)?.forEach((e,t)=>{const i=f[t],n=m[t]?.geometry??void 0,s=null!=n&&null!=o?bE(n,o):void 0;null!=i&&null!=s&&E.set(i,s)}));const M=[],A=[],T=[];if((i.dataSources.get(this.id)??[]).forEach((e,t)=>{const i=f?.[t],s=y?.[t],a=v?.[t],c=S?.[t],h=b?.[t],d=C?.[t],u=null!=h?n.convert(h,{clamp:!0}):r.size,p=null!=i?E?.get(i):void 0;if(null!=i&&null==bE&&T.push(i),null!=s&&null!=a){const[n,r]=o.convert([s,a]),p=this.getLabelDatum(e,d,n,r,u,x);p&&A.push(p),M.push({series:this,itemId:l,datum:e,datumIndex:t,index:-1,idValue:i,lonValue:s,latValue:a,labelValue:d,sizeValue:h,colorValue:c,point:{x:n,y:r,size:u},midPoint:{x:n,y:r}})}else null!=p&&uM(p,1).forEach(([n,r],o)=>{const p=this.getLabelDatum(e,d,n,r,u,x);p&&A.push(p),M.push({series:this,itemId:l,datum:e,datumIndex:t,index:o,idValue:i,lonValue:s,latValue:a,labelValue:d,sizeValue:h,colorValue:c,point:{x:n,y:r,size:u},midPoint:{x:n,y:r}})})}),T.length>10){const e=T.length-10;T.length=10,T.push(`(+${e} more)`)}return T.length>0&&s.Vy.warnOnce("some data items do not have matches in the provided topology",T),{itemId:e,nodeData:M,labelData:A}}updateSelections(){this.nodeDataRefresh&&(this.contextNodeData=this.createNodeData(),this.nodeDataRefresh=!1)}checkScaleChange(){return this.previousScale!==this.scale&&(this.previousScale=this.scale,!0)}update({seriesRect:e}){const t=this.checkResize(e),i=this.checkScaleChange(),{markerSelection:n,highlightMarkerSelection:s}=this;this.updateSelections(),this.contentGroup.visible=this.visible,this.contentGroup.opacity=this.getOpacity();let r=this.ctx.highlightManager?.getActiveHighlight();null==r||r.series===this&&null!=r.datum||(r=void 0);const o=this.contextNodeData?.nodeData??[];this.markerSelection=this.updateMarkerSelection({markerData:o,markerSelection:n}),this.updateMarkerNodes({markerSelection:n,isHighlight:!1,highlightedDatum:r}),this.highlightMarkerSelection=this.updateMarkerSelection({markerData:null!=r?[r]:[],markerSelection:s}),this.updateMarkerNodes({markerSelection:s,isHighlight:!0,highlightedDatum:r}),(i||t)&&this.animationState.transition("resize"),this.animationState.transition("update")}updatePlacedLabelData(e){this.labelSelection=this.labelSelection.update(e,e=>{e.pointerEvents=n.n1.PointerEvents.None}),this.updateLabelNodes({labelSelection:this.labelSelection})}updateLabelNodes(e){const{labelSelection:t}=e,{color:i,fontStyle:n,fontWeight:s,fontSize:r,fontFamily:o}=this.properties.label;t.each((e,{x:t,y:a,width:l,height:c,text:h})=>{e.visible=!0,e.x=t+l/2,e.y=a+c/2,e.text=h,e.fill=i,e.fontStyle=n,e.fontWeight=s,e.fontSize=r,e.fontFamily=o,e.textAlign="center",e.textBaseline="middle"})}updateMarkerSelection(e){const{markerData:t,markerSelection:i}=e;return i.update(t,void 0,e=>DM([e.index,e.idValue,e.lonValue,e.latValue]))}getMarkerItemBaseStyle(e){const{properties:t}=this,i=e?t.highlightStyle.item:void 0;return VM({shape:t.shape,size:t.size,fill:i?.fill??t.fill,fillOpacity:i?.fillOpacity??t.fillOpacity,stroke:i?.stroke??t.stroke,strokeWidth:i?.strokeWidth??this.getStrokeWidth(t.strokeWidth),strokeOpacity:i?.strokeOpacity??t.strokeOpacity,lineDash:i?.lineDash??t.lineDash,lineDashOffset:i?.lineDashOffset??t.lineDashOffset},this.properties.fillGradientDefaults,this.properties.fillPatternDefaults,this.properties.fillImageDefaults)}getMarkerItemStyleOverrides(e,t,i,n,s,r){const{id:o,properties:a,colorScale:l,sizeScale:c}=this,{colorRange:h,itemStyler:d}=a;let u;if(u??(u={}),r||null==i||(u.fill=this.isColorScaleValid()?l.convert(i):h?.[0]??a.fill),null!=n&&(u.size=c.convert(n,{clamp:!0})),null!=d){const i=this.cachedDatumCallback(DM(e,r?"highlight":"node"),()=>this.callWithContext(d,{seriesId:o,datum:t,highlighted:r,...s,...u}));u??(u={}),Object.assign(u,i)}return u}updateMarkerNodes(e){const{markerSelection:t,isHighlight:i,highlightedDatum:n}=e,s=this.getMarkerItemBaseStyle(i),r=gM(this.scale);t.each((e,t)=>{const{datumIndex:o,datum:a,point:l,colorValue:c,sizeValue:h}=t,d=this.getMarkerItemStyleOverrides(String(o),a,c,h,s,i);e.shape=d?.shape??s.shape,e.size=d?.size??s.size,GM(e,s,d,r),e.x=l.x,e.y=l.y,e.scalingCenterX=l.x,e.scalingCenterY=l.y,e.zIndex=i||null==n||a!==n.datum?0:1})}isProcessedDataAnimatable(){return!0}resetAnimation(e){"initial"===e?this.animationState.transition("reset"):"ready"===e&&this.animationState.transition("skip")}resetAllAnimation(){this.ctx.animationManager.stopByAnimationGroupId(this.id),this.ctx.animationManager.skipCurrentBatch(),this.labelSelection.cleanup(),this.markerSelection.cleanup(),this.highlightMarkerSelection.cleanup()}animateMarkers(){const{animationManager:e}=this.ctx;MM(this.id,"markers",e,[this.markerSelection,this.highlightMarkerSelection],{fromFn:(e,t,i)=>"removed"===i?{scalingX:1,scalingY:1}:null==e.previousDatum?{scalingX:0,scalingY:0}:{scalingX:e.scalingX,scalingY:e.scalingY},toFn:(e,t,i)=>"removed"===i?{scalingX:0,scalingY:0}:{scalingX:1,scalingY:1}})}getLabelData(){return this.isLabelEnabled()?this.contextNodeData?.labelData??[]:[]}pickNodeClosestDatum(e){const{x:t,y:i}=e;let n,s=1/0;return this.contextNodeData?.nodeData.forEach(e=>{const{x:r,y:o,size:a}=e.point,l=Math.max(Math.abs(r-t)-a,0),c=Math.max(Math.abs(o-i)-a,0),h=l*l+c*c;h<s&&(s=h,n=e)}),null!=n?{datum:n,distance:Math.sqrt(s)}:void 0}legendItemSymbol(e){const{dataModel:t,processedData:i,properties:n}=this,{shape:s,fillOpacity:r,stroke:o,strokeWidth:a,strokeOpacity:l,lineDash:c,lineDashOffset:h}=n;let{fill:d}=n;if(null!=e&&this.isColorScaleValid()){const n=t.resolveColumnById(this,"colorValue",i)[e];d=this.colorScale.convert(n)}return{marker:VM({shape:s,fill:d,fillOpacity:r,stroke:o,strokeWidth:a,strokeOpacity:l,lineDash:c,lineDashOffset:h},this.properties.fillGradientDefaults,this.properties.fillPatternDefaults,this.properties.fillImageDefaults)}}getLegendData(e){const{processedData:t,dataModel:i}=this;if(null==t||null==i)return[];const{id:n,visible:s}=this,{title:r,legendItemName:o,idName:a,idKey:l,colorKey:c,colorName:h,colorRange:d,showInLegend:u}=this.properties;return"gradient"===e&&null!=c&&null!=d?[{legendType:"gradient",enabled:s,seriesId:n,colorName:h,colorRange:d,colorDomain:t.domain.values[i.resolveProcessedDataIndexById(this,"colorValue")]}]:"category"===e?[{legendType:"category",id:n,itemId:n,seriesId:n,enabled:s,label:{text:o??r??a??l??n},symbol:this.legendItemSymbol(),legendItemName:o,hideInLegend:!u}]:[]}getTooltipContent(e){const{id:t,dataModel:i,processedData:n,properties:s}=this,{idKey:r,idName:o,latitudeKey:a,latitudeName:l,longitudeKey:c,longitudeName:h,colorKey:d,colorName:u,sizeKey:p,sizeName:g,labelKey:f,labelName:m,title:v,legendItemName:y,tooltip:C}=s;if(!i||!n)return;const b=n.dataSources.get(this.id)?.[e],S=null!=p?i.resolveColumnById(this,"sizeValue",n)[e]:void 0,w=null!=d?i.resolveColumnById(this,"colorValue",n)[e]:void 0,x=[];if(null!=S&&x.push({label:g,fallbackLabel:p,value:String(S)}),null!=w&&x.push({label:u,fallbackLabel:d,value:String(w)}),null!=f&&f!==r){const t=i.resolveColumnById(this,"labelValue",n)[e];x.push({label:m,fallbackLabel:f,value:t})}let E;if(null!=r)E=i.resolveColumnById(this,"idValue",n)[e];else if(null!=a&&null!=c){const t=i.resolveColumnById(this,"latValue",n)[e],s=i.resolveColumnById(this,"lonValue",n)[e];E=`${Math.abs(t).toFixed(4)}° ${t>=0?"N":"S"}, ${Math.abs(s).toFixed(4)}° ${s>=0?"W":"E"}`}const M=this.getMarkerItemBaseStyle(!1);return Object.assign(M,this.getMarkerItemStyleOverrides(String(e),e,w,S,M,!1)),this.formatTooltipWithContext(C,{heading:E,title:v??y,symbol:this.legendItemSymbol(e),data:x},{seriesId:t,datum:b,title:v,idKey:r,idName:o,latitudeKey:a,latitudeName:l,longitudeKey:c,longitudeName:h,colorKey:d,colorName:u,sizeKey:p,sizeName:g,labelKey:f,labelName:m,...M})}getFormattedMarkerStyle(e){const{datumIndex:t,colorValue:i,sizeValue:n}=e,s=this.getMarkerItemBaseStyle(!1);return Object.assign(s,this.getMarkerItemStyleOverrides(String(t),t,i,n,s,!1)),{size:s.size}}computeFocusBounds(e){return LM(this,e)}};BM.className="MapMarkerSeries",BM.type="map-marker";var{commonSeriesOptionsDefs:HM,mapMarkerSeriesThemeableOptionsDef:zM,without:UM}=n.n1,WM={...zM,...UM(HM,["highlightStyle"]),type:(0,s.mw)((0,s.dY)("map-marker")),idKey:s.Yj,latitudeKey:s.Yj,longitudeKey:s.Yj,sizeKey:s.Yj,colorKey:s.Yj,labelKey:s.Yj,idName:s.Yj,latitudeName:s.Yj,longitudeName:s.Yj,sizeName:s.Yj,colorName:s.Yj,labelName:s.Yj,topology:s.eW,topologyIdKey:s.Yj,legendItemName:s.Yj,title:s.Yj},jM={type:"series",optionsKey:"series[]",packageType:"enterprise",chartTypes:["topology"],identifier:"map-marker",moduleFactory:e=>new BM(e),tooltipDefaults:{range:"exact"},themeTemplate:{...eE,series:{shape:"circle",maxSize:30,fill:{$palette:"fill"},stroke:{$palette:"stroke"},colorRange:{$if:[{$eq:[{$palette:"type"},"inbuilt"]},{$palette:"divergingColors"},n.n1.SAFE_RANGE2_OPERATION]},fillGradientDefaults:{type:"gradient",gradient:"radial",bounds:"item",colorStops:{$palette:"gradient"},rotation:0,reverse:!0},fillPatternDefaults:n.n1.FILL_PATTERN_DEFAULTS,fillImageDefaults:n.n1.FILL_IMAGE_DEFAULTS,fillOpacity:.5,label:{enabled:!1,fontSize:{$ref:"fontSize"},fontFamily:{$ref:"fontFamily"},fontWeight:{$ref:"fontWeight"},color:{$ref:"textColor"}}},tooltip:{range:"exact"}}},KM={type:"series",name:"map-marker",chartType:"topology",enterprise:!0,options:WM,create:e=>new BM(e),validate(e,t,i){const n=(0,s.tf)(e,t,i),{cleared:r,invalid:o}=n;if(null==r?.idKey&&(null==r?.latitudeKey||null==r?.longitudeKey)){const e=e=>i?`${i}.${e}`:e,t=`Either \`${e("idKey")}\` or both \`${e("latitudeKey")}\` and \`${e("longitudeKey")}\` are required.`;o.push(new s.yI("required",t,null,i))}return n}};function $M(e,t,i,n,s){const[r,o]=e,[a,l]=t,c=1/s,h=a-r,d=l-o,[u,p]=o<=l?e:t,[g,f]=r<=a?e:t,[m,v]=o<=l?t:e,[y,C]=r<=a?t:e;let b=1/0;if(0!==h){const e=d/h;for(let t=0;t<=1;t+=1){const s=0===t?c:-c,a=(e*r-o-s*i+n)/(e-s);if(a>=g&&a<=y){const e=2*Math.abs(i-a);b=Math.min(b,e)}}}else for(let e=0;e<=1;e+=1){const t=(0===e?c:-c)*(r-i)+n;if(t>=p&&t<=v){const e=2*Math.abs(n-t)*s;b=Math.min(b,e)}}const S=s,w=Math.abs((u-i)/(p-n)),x=Math.abs((m-i)/(v-n));if(v<n&&x<S){const e=2*Math.abs(n-v)*s;b=Math.min(b,e)}else if(p>n&&w<S){const e=2*Math.abs(n-p)*s;b=Math.min(b,e)}const E=Math.abs((f-n)/(g-i)),M=Math.abs((C-n)/(y-i));if(y<i&&M<c){const e=2*Math.abs(i-y);b=Math.min(b,e)}else if(g>i&&E<c){const e=2*Math.abs(i-g);b=Math.min(b,e)}return b}function YM(e,t,i){i>=t&&(e.maxX=Math.min(e.maxX,i-t)),i<=t&&(e.minX=Math.max(e.minX,i-t))}function qM(e,t,i,n,s,r){const o=s-r/2,a=s+r/2,[l,c]=t,[h,d]=i,u=h-l,p=d-c,[g,f]=l<=h?t:i,[m,v]=l<=h?i:t;if(0!==u){const t=p/u;for(let i=0;i<=1;i+=1){const s=((0===i?o:a)-c)/t+l;s>=g&&s<=m&&YM(e,n,s)}}else Math.max(o,Math.min(c,d))<=Math.min(a,Math.max(c,d))&&YM(e,n,l);return m<n&&v>=o&&v<=a?YM(e,n,m):g>n&&f>=o&&f<=a&&YM(e,n,g),e}var{Property:XM,SeriesProperties:ZM,SeriesTooltip:QM,FillGradientDefaults:JM,FillPatternDefaults:eA,FillImageDefaults:tA}=n.n1,iA=class extends ZM{constructor(){super(...arguments),this.topology=void 0,this.idKey="",this.idName=void 0,this.topologyIdKey="name",this.labelKey=void 0,this.labelName=void 0,this.colorRange=void 0,this.fill="black",this.fillGradientDefaults=new JM,this.fillPatternDefaults=new eA,this.fillImageDefaults=new tA,this.fillOpacity=1,this.stroke="black",this.strokeOpacity=1,this.strokeWidth=0,this.lineDash=[0],this.lineDashOffset=0,this.padding=0,this.label=new hm,this.tooltip=new QM}};a([XM],iA.prototype,"topology",2),a([XM],iA.prototype,"title",2),a([XM],iA.prototype,"legendItemName",2),a([XM],iA.prototype,"idKey",2),a([XM],iA.prototype,"idName",2),a([XM],iA.prototype,"topologyIdKey",2),a([XM],iA.prototype,"labelKey",2),a([XM],iA.prototype,"labelName",2),a([XM],iA.prototype,"colorKey",2),a([XM],iA.prototype,"colorName",2),a([XM],iA.prototype,"colorRange",2),a([XM],iA.prototype,"fill",2),a([XM],iA.prototype,"fillGradientDefaults",2),a([XM],iA.prototype,"fillPatternDefaults",2),a([XM],iA.prototype,"fillImageDefaults",2),a([XM],iA.prototype,"fillOpacity",2),a([XM],iA.prototype,"stroke",2),a([XM],iA.prototype,"strokeOpacity",2),a([XM],iA.prototype,"strokeWidth",2),a([XM],iA.prototype,"lineDash",2),a([XM],iA.prototype,"lineDashOffset",2),a([XM],iA.prototype,"padding",2),a([XM],iA.prototype,"itemStyler",2),a([XM],iA.prototype,"label",2),a([XM],iA.prototype,"tooltip",2);var{getMissCount:nA,createDatumId:sA,SeriesNodePickMode:rA,valueProperty:oA,CachedTextMeasurerPool:aA,TextUtils:lA,ColorScale:cA,Group:hA,Selection:dA,Text:uA,PointerEvents:pA,applyShapeStyle:gA,getShapeStyle:fA}=n.n1,mA=n.n1.MercatorScale.fixedScale(),vA=class extends ME{constructor(e){super({moduleCtx:e,categoryKey:void 0,useLabelLayer:!0,pickModes:[rA.EXACT_SHAPE_MATCH,rA.NEAREST_NODE]}),this.properties=new iA,this._chartTopology=void 0,this.colorScale=new cA,this.itemGroup=this.contentGroup.appendChild(new hA({name:"itemGroup"})),this.itemLabelGroup=this.contentGroup.appendChild(new hA({name:"itemLabelGroup"})),this.datumSelection=dA.select(this.itemGroup,()=>this.nodeFactory()),this.labelSelection=dA.select(this.itemLabelGroup,uA),this.highlightDatumSelection=dA.select(this.highlightNode,()=>this.nodeFactory()),this.previousLabelLayouts=void 0,this._previousDatumMidPoint=void 0,this.itemLabelGroup.pointerEvents=pA.None}getNodeData(){return this.contextNodeData?.nodeData}get topology(){return this.properties.topology??this._chartTopology}get hasData(){return super.hasData&&null!=this.topology}renderToOffscreenCanvas(){return!0}setChartTopology(e){this._chartTopology=e,this.topology===e&&(this.nodeDataRefresh=!0)}setSeriesIndex(e){return!!super.setSeriesIndex(e)&&(this.contentGroup.zIndex=[1,e],this.highlightGroup.zIndex=[2,e],!0)}isLabelEnabled(){return null!=this.properties.labelKey&&this.properties.label.enabled}nodeFactory(){const e=new fE;return e.renderMode=1,e.lineJoin="round",e}async processData(e){if(null==this.data)return;const{data:t,topology:i,colorScale:n}=this,{topologyIdKey:r,idKey:o,colorKey:a,labelKey:l,colorRange:c}=this.properties,h=new Map;i?.features.forEach(e=>{const t=e.properties?.[r];null!=t&&CE(e.geometry,1)&&h.set(t,e)});const d=this.colorScale.type,u=this.scale?.type,{dataModel:p,processedData:g}=await this.requestDataModel(e,t,{props:[oA(o,u,{id:"idValue",includeProperty:!1}),oA(o,u,{id:"featureValue",includeProperty:!1,processor:()=>e=>h.get(e)}),...l?[oA(l,"band",{id:"labelValue"})]:[],...a?[oA(a,d,{id:"colorValue"})]:[]]}),f=p.resolveColumnById(this,"featureValue",g);if(this.topologyBounds=f.reduce((e,t)=>{const i=t?.geometry;return null==i?e:mE(i,e)},void 0),null!=c&&this.isColorScaleValid()){const e=p.resolveProcessedDataIndexById(this,"colorValue");n.domain=g.domain.values[e],n.range=c,n.update()}null==i&&s.Vy.warnOnce("no topology was provided for [MapShapeSeries]; nothing will be rendered.")}isColorScaleValid(){const{colorKey:e}=this.properties;if(!e)return!1;const{dataModel:t,processedData:i}=this;if(!t||!i)return!1;const n=t.resolveProcessedDataIndexById(this,"colorValue"),s=i.input.count,r=nA(this,i.defs.values[n].missing);return!(0===s||s===r)}getLabelLayout(e,t,i,n,s){if(null==t||null==n)return;const{idKey:r,idName:o,colorKey:a,colorName:l,labelKey:c,labelName:h,padding:d,label:u}=this.properties,p=this.getLabelText(u,{value:t,datum:e,idKey:r,idName:o,colorKey:a,colorName:l,labelKey:c,labelName:h});if(null==p)return;const g=aA.measureText(String(p),{font:i}),f=p.split("\n").length,m=(g.width+2*d)/(f*lA.getLineHeight(u.fontSize)+2*d);if(s?.geometry===n&&s?.labelText===p&&s?.aspectRatio===m)return s;const v=vE(bE(n,mA));if(null==v)return;const y=function(e,{aspectRatio:t,precision:i}){const n=cM(e,i,(e,i,n,s)=>{const r=function(e,t,i,n){let s=!1,r=1/0;for(const o of e){let e=o[o.length-1],[a,l]=e;for(const c of o){const[o,h]=c;h>i!=l>i&&t<(a-o)*(i-h)/(l-h)+o&&(s=!s);const d=$M(e,c,t,i,n);r=Math.min(r,d),e=c,a=o,l=h}}return(s?1:-1)*r}(e,i,n,t),o=r+2*s*t;return{distance:r*Math.SQRT2,maxDistance:o*Math.SQRT2}});if(null==n)return;const{x:s,y:r,distance:o}=n;return{x:s,y:r,maxWidth:o/Math.SQRT2}}(v,{aspectRatio:m,precision:.001});if(null==y)return;const{x:C,y:b,maxWidth:S}=y;return{geometry:n,labelText:p,aspectRatio:m,x:C,y:b,maxWidth:S,fixedPolygon:v}}getLabelDatum(e,t){const{scale:i}=this;if(null==i)return;const{padding:n,label:s}=this.properties,{labelText:r,aspectRatio:o,x:a,y:l,maxWidth:c,fixedPolygon:h}=e,d={width:Math.ceil(c*t),height:Math.ceil(c*t/o),meta:a},u=nm(r,s,{padding:n},(e,i)=>{if(!i)return d;const n=function(e,t,i,n){const s={minX:-1/0,maxX:1/0};for(const r of e){let e=r[r.length-1];for(const o of r)qM(s,e,o,t,i,n),e=o}const{minX:r,maxX:o}=s;return Number.isFinite(r)&&Number.isFinite(o)?{x:t+(r+o)/2,width:o-r}:{x:t,width:0}}(h,a,l,e/t);return{width:n.width*t,height:e,meta:n.x}});if(null==u)return;const[{text:p,fontSize:g,lineHeight:f,width:m},v]=u;if(p===lA.EllipsisChar)return;const y=m<d.width?a:v,C=this.scale.convert(mA.invert([y,l]));return{x:C[0],y:C[1],text:p,fontSize:g,lineHeight:f}}createNodeData(){const{id:e,dataModel:t,processedData:i,properties:n,scale:r,previousLabelLayouts:o}=this,{idKey:a,colorKey:l,labelKey:c,label:h}=n;if(null==t||null==i)return;const d=null!=r?(r.range[1][0]-r.range[0][0])/r.bounds.width:NaN,u=t.resolveColumnById(this,"idValue",i),p=t.resolveColumnById(this,"featureValue",i),g=null!=c?t.resolveColumnById(this,"labelValue",i):void 0,f=null!=l?t.resolveColumnById(this,"colorValue",i):void 0,m=h.getFont(),v=new Map;this.previousLabelLayouts=v;const y=[],C=[],b=[];if((i.dataSources.get(this.id)??[]).forEach((e,t)=>{const i=u[t],n=f?.[t],s=g?.[t],l=p[t]?.geometry??void 0;null==l&&b.push(i);const c=this.getLabelLayout(e,s,m,l,o?.get(i));null!=c&&v.set(i,c);const h=null!=c&&null!=r?this.getLabelDatum(c,d):void 0;null!=h&&C.push(h);const S=null!=l&&null!=r?bE(l,r):void 0;y.push({series:this,itemId:a,datum:e,datumIndex:t,idValue:i,colorValue:n,labelValue:s,projectedGeometry:S})}),b.length>10){const e=b.length-10;b.length=10,b.push(`(+${e} more)`)}return b.length>0&&s.Vy.warnOnce("some data items do not have matches in the provided topology",b),{itemId:e,nodeData:y,labelData:C}}updateSelections(){this.nodeDataRefresh&&(this.contextNodeData=this.createNodeData(),this.nodeDataRefresh=!1)}update(){const{datumSelection:e,labelSelection:t,highlightDatumSelection:i}=this;this.updateSelections(),this.contentGroup.visible=this.visible,this.contentGroup.opacity=this.getOpacity();let n=this.ctx.highlightManager?.getActiveHighlight();null==n||n.series===this&&null!=n.datum||(n=void 0);const s=this.contextNodeData?.nodeData??[],r=this.contextNodeData?.labelData??[];this.datumSelection=this.updateDatumSelection({nodeData:s,datumSelection:e}),this.updateDatumNodes({datumSelection:e,isHighlight:!1}),this.labelSelection=this.updateLabelSelection({labelData:r,labelSelection:t}),this.updateLabelNodes({labelSelection:t}),this.highlightDatumSelection=this.updateDatumSelection({nodeData:null!=n?[n]:[],datumSelection:i}),this.updateDatumNodes({datumSelection:i,isHighlight:!0})}updateDatumSelection(e){return e.datumSelection.update(e.nodeData,void 0,e=>sA(e.idValue))}getItemBaseStyle(e){const{properties:t}=this,i=e?t.highlightStyle.item:void 0;return fA({fill:i?.fill??t.fill,fillOpacity:i?.fillOpacity??t.fillOpacity,stroke:i?.stroke??t.stroke,strokeWidth:i?.strokeWidth??this.getStrokeWidth(t.strokeWidth),strokeOpacity:i?.strokeOpacity??t.strokeOpacity,lineDash:i?.lineDash??t.lineDash,lineDashOffset:i?.lineDashOffset??t.lineDashOffset},this.properties.fillGradientDefaults,this.properties.fillPatternDefaults,this.properties.fillImageDefaults)}getItemStyleOverrides(e,t,i,n,s){const{id:r,properties:o,colorScale:a}=this,{colorRange:l,itemStyler:c}=o;let h;if(s||null==i||(h??(h={}),h.fill=this.isColorScaleValid()?a.convert(i):l?.[0]??o.fill),null!=c){const i=this.cachedDatumCallback(sA(e,s?"highlight":"node"),()=>this.callWithContext(c,{seriesId:r,datum:t,highlighted:s,...n,...h}));h??(h={}),Object.assign(h,i)}return fA(h,this.properties.fillGradientDefaults,this.properties.fillPatternDefaults,this.properties.fillImageDefaults)}updateDatumNodes(e){const{datumSelection:t,isHighlight:i}=e,n=this.getItemBaseStyle(i),s=gM(this.scale);t.each((e,t)=>{const{datum:r,datumIndex:o,colorValue:a,projectedGeometry:l}=t;if(null==l)return e.visible=!1,void(e.projectedGeometry=void 0);const c=this.getItemStyleOverrides(String(o),r,a,n,i);e.visible=!0,e.projectedGeometry=l,gA(e,n,c,s)})}updateLabelSelection(e){const t=this.isLabelEnabled()?e.labelData:[];return e.labelSelection.update(t)}updateLabelNodes(e){const{labelSelection:t}=e,{color:i,fontStyle:n,fontWeight:s,fontFamily:r}=this.properties.label;t.each((e,{x:t,y:o,text:a,fontSize:l,lineHeight:c})=>{e.visible=!0,e.x=t,e.y=o,e.text=a,e.fill=i,e.fontStyle=n,e.fontWeight=s,e.fontSize=l,e.lineHeight=c,e.fontFamily=r,e.textAlign="center",e.textBaseline="middle"})}resetAnimation(){}pickNodeClosestDatum({x:e,y:t}){let i,n=1/0;return this.datumSelection.each((s,r)=>{const o=s.distanceSquared(e,t);o<n&&(n=o,i=r)}),null!=i?{datum:i,distance:Math.sqrt(n)}:void 0}datumMidPoint(e){const{_previousDatumMidPoint:t}=this;if(t?.datum===e)return t.point;const i=e.projectedGeometry,n=null!=i?vE(i):void 0,s=null!=n?dM(n,2):void 0,r=null!=s?{x:s[0],y:s[1]}:void 0;return this._previousDatumMidPoint={datum:e,point:r},r}legendItemSymbol(e){const{dataModel:t,processedData:i,properties:n}=this,{fillOpacity:s,stroke:r,strokeWidth:o,strokeOpacity:a,lineDash:l,lineDashOffset:c}=n;let{fill:h}=n;if(null!=e&&this.isColorScaleValid()){const n=t.resolveColumnById(this,"colorValue",i)[e];h=this.colorScale.convert(n)}return{marker:fA({fill:h,fillOpacity:s,stroke:r,strokeWidth:o,strokeOpacity:a,lineDash:l,lineDashOffset:c},this.properties.fillGradientDefaults,this.properties.fillPatternDefaults,this.properties.fillImageDefaults)}}getLegendData(e){const{processedData:t,dataModel:i}=this;if(null==t||null==i)return[];const{id:n,visible:s}=this,{title:r,legendItemName:o,idKey:a,idName:l,colorKey:c,colorName:h,colorRange:d,showInLegend:u}=this.properties;return"gradient"===e&&null!=c&&null!=d?[{legendType:"gradient",enabled:s,seriesId:n,colorName:h,colorRange:d,colorDomain:t.domain.values[i.resolveProcessedDataIndexById(this,"colorValue")]}]:"category"===e?[{legendType:"category",id:n,itemId:n,seriesId:n,enabled:s,label:{text:o??r??l??a},symbol:this.legendItemSymbol(),legendItemName:o,hideInLegend:!u}]:[]}getTooltipContent(e){const{id:t,dataModel:i,processedData:n,properties:s}=this,{idKey:r,idName:o,colorKey:a,colorName:l,labelKey:c,labelName:h,legendItemName:d,title:u,tooltip:p}=s;if(!i||!n)return;const g=n.dataSources.get(this.id)?.[e],f=i.resolveColumnById(this,"idValue",n)[e],m=null!=a?i.resolveColumnById(this,"colorValue",n)[e]:void 0,v=[];if(null!=m&&v.push({label:l,fallbackLabel:a,value:String(m)}),null!=c&&c!==r){const t=i.resolveColumnById(this,"labelValue",n)[e];v.push({label:h,fallbackLabel:c,value:t})}const y=this.getItemBaseStyle(!1);return Object.assign(y,this.getItemStyleOverrides(String(e),e,m,y,!1)),this.formatTooltipWithContext(p,{heading:f,title:u??d,symbol:this.legendItemSymbol(e),data:v},{seriesId:t,datum:g,title:u,idKey:r,idName:o,colorKey:a,colorName:l,labelKey:c,labelName:h,...y})}computeFocusBounds(e){return EE(this,e)}};vA.className="MapShapeSeries",vA.type="map-shape";var{commonSeriesOptionsDefs:yA,mapShapeSeriesThemeableOptionsDef:CA,without:bA}=n.n1,SA={...CA,...bA(yA,["highlightStyle"]),type:(0,s.mw)((0,s.dY)("map-shape")),idKey:(0,s.mw)(s.Yj),colorKey:s.Yj,labelKey:s.Yj,idName:s.Yj,colorName:s.Yj,labelName:s.Yj,topology:s.eW,topologyIdKey:s.Yj,legendItemName:s.Yj,title:s.Yj},wA={type:"series",optionsKey:"series[]",packageType:"enterprise",chartTypes:["topology"],identifier:"map-shape",moduleFactory:e=>new vA(e),tooltipDefaults:{range:"exact"},themeTemplate:{...eE,series:{fill:{$palette:"fill"},stroke:{$ref:"backgroundColor"},colorRange:{$if:[{$eq:[{$palette:"type"},"inbuilt"]},{$palette:"divergingColors"},n.n1.SAFE_RANGE2_OPERATION]},fillGradientDefaults:{type:"gradient",gradient:"linear",bounds:"item",colorStops:{$palette:"gradient"},rotation:0,reverse:!1},fillPatternDefaults:n.n1.FILL_PATTERN_DEFAULTS,fillImageDefaults:n.n1.FILL_IMAGE_DEFAULTS,fillOpacity:1,strokeWidth:1,lineDash:[0],lineDashOffset:0,padding:2,label:{color:{$ref:"backgroundColor"},fontFamily:{$ref:"fontFamily"},fontSize:{$ref:"fontSize"},fontWeight:"bold",overflowStrategy:"hide"}},tooltip:{range:"exact"}}},xA={type:"series",name:"map-shape",chartType:"topology",enterprise:!0,options:SA,create:e=>new vA(e)},{FillGradientDefaults:EA,FillPatternDefaults:MA,FillImageDefaults:AA,Property:TA,SeriesProperties:DA,SeriesTooltip:IA}=n.n1,RA=class extends DA{constructor(){super(...arguments),this.topology=void 0,this.fill="black",this.fillGradientDefaults=new EA,this.fillPatternDefaults=new MA,this.fillImageDefaults=new AA,this.fillOpacity=1,this.stroke="black",this.strokeOpacity=1,this.strokeWidth=0,this.lineDash=[0],this.lineDashOffset=0,this.tooltip=new IA}};a([TA],RA.prototype,"topology",2),a([TA],RA.prototype,"fill",2),a([TA],RA.prototype,"fillGradientDefaults",2),a([TA],RA.prototype,"fillPatternDefaults",2),a([TA],RA.prototype,"fillImageDefaults",2),a([TA],RA.prototype,"fillOpacity",2),a([TA],RA.prototype,"stroke",2),a([TA],RA.prototype,"strokeOpacity",2),a([TA],RA.prototype,"strokeWidth",2),a([TA],RA.prototype,"lineDash",2),a([TA],RA.prototype,"lineDashOffset",2),a([TA],RA.prototype,"tooltip",2);var{createDatumId:LA,SeriesNodePickMode:kA,Selection:PA,Group:NA,PointerEvents:OA,getShapeStyle:_A}=n.n1,FA=class extends ME{constructor(e){super({moduleCtx:e,categoryKey:void 0,useLabelLayer:!0,pickModes:[kA.EXACT_SHAPE_MATCH]}),this.properties=new RA,this._chartTopology=void 0,this.itemGroup=this.contentGroup.appendChild(new NA({name:"itemGroup"})),this.datumSelection=PA.select(this.itemGroup,()=>this.nodeFactory())}get topology(){return this.properties.topology??this._chartTopology}get focusable(){return!1}setOptionsData(){}setChartData(){}getNodeData(){}get hasData(){return!1}renderToOffscreenCanvas(){return!0}setChartTopology(e){this._chartTopology=e,this.topology===e&&(this.nodeDataRefresh=!0)}setSeriesIndex(e){return!!super.setSeriesIndex(e)&&(this.contentGroup.zIndex=[0,e,0],this.highlightGroup.zIndex=[0,e,1],!0)}nodeFactory(){const e=new fE;return e.renderMode=1,e.lineJoin="round",e.pointerEvents=OA.None,e}processData(){const{topology:e}=this;this.topologyBounds=e?.features.reduce((e,t)=>{const i=t.geometry;return null==i?e:mE(i,e)},void 0),null==e&&s.Vy.warnOnce("no topology was provided for [MapShapeBackgroundSeries]; nothing will be rendered.")}createNodeData(){const{id:e,topology:t,scale:i}=this;if(null==t)return;const n=[];return t.features.forEach((e,t)=>{const{geometry:s}=e,r=null!=s&&null!=i?bE(s,i):void 0;null!=r&&n.push({series:this,itemId:t,datum:e,datumIndex:0,index:t,projectedGeometry:r})}),{itemId:e,nodeData:n,labelData:[]}}updateSelections(){this.nodeDataRefresh&&(this.contextNodeData=this.createNodeData(),this.nodeDataRefresh=!1)}update(){const{datumSelection:e}=this;this.updateSelections(),this.contentGroup.visible=this.visible;const{nodeData:t=[]}=this.contextNodeData??{};this.datumSelection=this.updateDatumSelection({nodeData:t,datumSelection:e}),this.updateDatumNodes({datumSelection:e})}updateDatumSelection(e){return e.datumSelection.update(e.nodeData,void 0,e=>LA(e.index))}updateDatumNodes(e){const{properties:t}=this,{datumSelection:i}=e,{fill:n,fillOpacity:s,stroke:r,strokeOpacity:o,lineDash:a,lineDashOffset:l}=t,c=this.getStrokeWidth(t.strokeWidth);i.each((e,t)=>{const{projectedGeometry:i}=t;if(null==i)return e.visible=!1,void(e.projectedGeometry=void 0);e.visible=!0,e.projectedGeometry=i;const h=_A({fill:n,fillOpacity:s,stroke:r,strokeWidth:c,strokeOpacity:o,lineDash:a,lineDashOffset:l},this.properties.fillGradientDefaults,this.properties.fillPatternDefaults,this.properties.fillImageDefaults);e.setProperties(h)})}resetAnimation(){}getLegendData(){return[]}getTooltipContent(e){}pickFocus(){}computeFocusBounds(e){}};FA.className="MapShapeBackgroundSeries",FA.type="map-shape-background";var{commonSeriesOptionsDefs:GA,mapShapeBackgroundSeriesThemeableOptionsDef:VA}=n.n1,BA={...VA,...GA,type:(0,s.mw)((0,s.dY)("map-shape-background")),topology:s.eW},HA={type:"series",optionsKey:"series[]",packageType:"enterprise",chartTypes:["topology"],identifier:"map-shape-background",moduleFactory:e=>new FA(e),tooltipDefaults:{range:"exact"},themeTemplate:{...eE,series:{fill:{$path:["./1",{$palette:"fill"},{$palette:"hierarchyColors"}]},stroke:{$ref:"backgroundColor"},strokeWidth:1,fillGradientDefaults:{type:"gradient",gradient:"linear",bounds:"item",colorStops:[{$mix:[{$path:["./1",{$palette:"fill"},{$palette:"hierarchyColors"}]},"black",.15]},{$mix:[{$path:["./1",{$palette:"fill"},{$palette:"hierarchyColors"}]},"white",.15]}],rotation:0,reverse:!1},fillPatternDefaults:{...n.n1.FILL_PATTERN_DEFAULTS,fill:{$path:["./1",{$palette:"fill"},{$palette:"hierarchyColors"}]},stroke:{$path:["./1",{$palette:"fill"},{$palette:"hierarchyColors"}]}},fillImageDefaults:n.n1.FILL_IMAGE_DEFAULTS}}},zA={type:"series",name:"map-shape-background",chartType:"topology",enterprise:!0,options:BA,create:e=>new FA(e)},{ChartAxisDirection:UA,PolarAxis:WA,diff:jA,fixNumericExtent:KA,groupAccumulativeValueProperty:$A,keyProperty:YA,normaliseGroupTo:qA,resetLabelFn:XA,seriesLabelFadeInAnimation:ZA,seriesLabelFadeOutAnimation:QA,valueProperty:JA,animationValidation:eT,createDatumId:tT,SeriesNodePickMode:iT,normalizeAngle360:nT,CategoryScale:sT,motion:rT,applyShapeStyle:oT,isGradientFill:aT,getShapeStyle:lT}=n.n1,cT=class extends n.n1.SeriesNodeEvent{constructor(e,t,i,n){super(e,t,i,n),this.angleKey=n.properties.angleKey,this.radiusKey=n.properties.radiusKey}},hT=class extends n.n1.PolarSeries{constructor(e,{animationResetFns:t}){super({moduleCtx:e,categoryKey:"angleValue",useLabelLayer:!0,canHaveAxes:!0,pickModes:[iT.NEAREST_NODE,iT.EXACT_SHAPE_MATCH],animationResetFns:{...t,label:XA}}),this.NodeEvent=cT,this.groupScale=new sT,this.circleCache={r:0,cx:0,cy:0}}getSeriesDomain(e){const{dataModel:t,processedData:i}=this;if(!i||!t)return[];if(e===UA.Angle)return t.getDomain(this,"angleValue","key",i);{const e=t.getDomain(this,"radiusValue-end","value",i),n=Number.isFinite(e[1]-e[0])?[e[0]>0?0:e[0],e[1]<0?0:e[1]]:[];return KA(n)}}async processData(e){const{angleKey:t,radiusKey:i,normalizedTo:n}=this.properties,r=!this.ctx.animationManager.isSkipped(),o=this.getStackId(),a=`${o}-trailing`,l=[];(0,s.vM)(n)&&l.push(qA([o,a],Math.abs(n))),r&&this.processedData&&l.push(jA(this.id,this.processedData)),r&&l.push(eT());const c=this.visible?{}:{forceValue:0},h=this.axes[UA.Radius]?.scale.type,d=this.axes[UA.Angle]?.scale.type;await this.requestDataModel(e,this.data,{props:[YA(t,d,{id:"angleValue"}),JA(i,h,{id:"radiusValue-raw",invalidValue:null,...c}),...$A(i,"normal","current",{id:"radiusValue-end",rangeId:"radiusValue-range",invalidValue:null,groupId:o,separateNegative:!0,...c},h),...$A(i,"trailing","current",{id:"radiusValue-start",invalidValue:null,groupId:a,separateNegative:!0,...c},h),...l],groupByKeys:!0,groupByData:!1}),this.animationState.transition("updateData")}didCircleChange(){const e=this.radius,t=this.centerX,i=this.centerY,n=this.circleCache;return(e!==n.r||t!==n.cx||i!==n.cy)&&(this.circleCache={r:e,cx:t,cy:i},!0)}isRadiusAxisReversed(){return this.axes[UA.Radius]?.isReversed()}maybeRefreshNodeData(){if(!this.didCircleChange()&&!this.nodeDataRefresh)return;const{nodeData:e=[]}=this.createNodeData()??{};this.nodeData=e,this.nodeDataRefresh=!1}getAxisInnerRadius(){const e=this.axes[UA.Radius];return e instanceof WA?this.radius*e.innerRadiusRatio:0}createNodeData(){const{processedData:e,dataModel:t,groupScale:i}=this;if(!t||!e||"grouped"!==e.type)return;const n=this.axes[UA.Angle],s=this.axes[UA.Radius],r=n?.scale,o=s?.scale;if(!r||!o)return;const a=t.resolveKeysById(this,"angleValue",e),l=t.resolveColumnById(this,"radiusValue-start",e),c=t.resolveColumnById(this,"radiusValue-end",e),h=t.resolveColumnById(this,"radiusValue-raw",e),d=t.resolveProcessedDataIndexById(this,"radiusValue-range");let u=0,p=0;n instanceof Z&&(u=n.groupPaddingInner,p=n.paddingInner);const g=(r.bandwidth??0)*(1-p),{index:f,visibleGroupCount:m}=this.ctx.seriesStateManager.getVisiblePeerGroupIndex(this);i.domain=Array.from({length:m}).map((e,t)=>String(t)),i.range=[-g/2,g/2],i.paddingInner=m>1?u:0;const v=this.isRadiusAxisReversed(),y=v?this.radius:this.getAxisInnerRadius(),C=v?this.getAxisInnerRadius():this.radius,b=C+y,{angleKey:S,radiusKey:w,angleName:x,radiusName:E,label:M}=this.properties,A=(e,t,i,n)=>{const s=this.getLabelText(M,{value:t,datum:e,angleKey:S,radiusKey:w,angleName:x,radiusName:E});if(s)return{x:i,y:n,text:s,textAlign:"center",textBaseline:"middle"}},T=[],D={itemId:w,nodeData:T,labelData:T};if(!this.visible)return D;const{dataSources:I}=e,R=I.get(this.id)??[];for(const{datumIndex:n,group:s}of t.forEachGroupDatum(this,e)){const e=R[n],t=a[n];if(null==t)return;const u=h[n],p=u>=0&&!Object.is(u,-0),g=l[n],m=c[n],S=s.aggregation[d][p?1:0]??0,w=p===v;if(void 0===g||void 0===m)return;let x,E;if(1===R.length)x=-.5*Math.PI,E=1.5*Math.PI;else{const e=r.convert(t);x=nT(e+i.convert(String(f))),E=nT(x+i.bandwidth)}const M=x+i.bandwidth/2,D=b-o.convert(g),I=b-o.convert(m),L=(D+I)/2,k=b-o.convert(0),P=b-o.convert(S),N=Math.cos(M)*L,O=Math.sin(M)*L,_=this.properties.label.enabled?A(e,u,N,O):void 0,F=this.getColumnWidth(x,E);T.push({series:this,datum:e,datumIndex:n,point:{x:N,y:O,size:0},midPoint:{x:N,y:O},label:_,angleValue:t,radiusValue:u,negative:w,innerRadius:D,outerRadius:I,stackInnerRadius:k,stackOuterRadius:P,startAngle:x,endAngle:E,midAngle:M,axisInnerRadius:y,axisOuterRadius:C,columnWidth:F,index:n})}return{itemId:w,nodeData:T,labelData:T}}getColumnWidth(e,t){return NaN}update({seriesRect:e}){const t=this.checkResize(e);this.maybeRefreshNodeData(),this.contentGroup.translationX=this.centerX,this.contentGroup.translationY=this.centerY,this.highlightGroup.translationX=this.centerX,this.highlightGroup.translationY=this.centerY,this.labelGroup&&(this.labelGroup.translationX=this.centerX,this.labelGroup.translationY=this.centerY),this.updateSectorSelection(this.itemSelection,!1),this.updateSectorSelection(this.highlightSelection,!0),this.updateLabels(),t&&this.animationState.transition("resize"),this.animationState.transition("update")}getItemBaseStyle(e){const{properties:t}=this,i=e?t.highlightStyle.item:void 0;return lT({fill:i?.fill??t.fill,fillOpacity:i?.fillOpacity??t.fillOpacity,stroke:i?.stroke??t.stroke,strokeWidth:i?.strokeWidth??this.getStrokeWidth(t.strokeWidth),strokeOpacity:i?.strokeOpacity??t.strokeOpacity,lineDash:i?.lineDash??t.lineDash,lineDashOffset:i?.lineDashOffset??t.lineDashOffset,cornerRadius:t.cornerRadius},t.fillGradientDefaults,t.fillPatternDefaults,t.fillImageDefaults)}getItemStyleOverrides(e,t,i,n){const{id:s,properties:r}=this,{angleKey:o,radiusKey:a,itemStyler:l,fillGradientDefaults:c,fillPatternDefaults:h,fillImageDefaults:d}=r;if(null==l)return;const u=this.cachedDatumCallback(tT(e,n?"highlight":"node"),()=>this.callWithContext(l,{seriesId:s,datum:t,highlighted:n,angleKey:o,radiusKey:a,...i}));return lT(u,c,h,d)}updateSectorSelection(e,t){let i=[];if(t){const e=this.ctx.highlightManager?.getActiveHighlight();e?.datum&&e.series===this&&i.push(e)}else i=this.nodeData;const n=this.isRadiusAxisReversed(),s=n?this.radius:this.getAxisInnerRadius(),r=n?this.getAxisInnerRadius():this.radius,o=this.getShapeFillBBox(),a=this.getItemBaseStyle(t);e.update(i,void 0,e=>this.getDatumId(e)).each((e,i)=>{const{datum:n,datumIndex:l,midPoint:c}=i,h=this.getItemStyleOverrides(String(l),n,a,t),d=h?.fill??a.fill,u=aT(d)&&"item"===d.bounds?{centerX:c?.x??0,centerY:c?.y??0}:{centerX:0,centerY:0,innerRadius:s,outerRadius:r};this.updateItemPath(e,i,t),oT(e,a,h,o,u),e.cornerRadius=h?.cornerRadius??a.cornerRadius,e.lineJoin="round"})}updateLabels(){const{label:e}=this.properties;this.labelSelection.update(this.nodeData).each((t,i)=>{e.enabled&&i.label?(t.x=i.label.x,t.y=i.label.y,t.fill=e.color,t.fontFamily=e.fontFamily,t.fontSize=e.fontSize,t.fontStyle=e.fontStyle,t.fontWeight=e.fontWeight,t.text=i.label.text,t.textAlign=i.label.textAlign,t.textBaseline=i.label.textBaseline,t.visible=!0):t.visible=!1})}animateEmptyUpdateReady(){const{labelSelection:e}=this,t=this.getColumnTransitionFunctions();rT.fromToMotion(this.id,"datums",this.ctx.animationManager,[this.itemSelection],t),ZA(this,"labels",this.ctx.animationManager,e)}animateClearingUpdateEmpty(){const{itemSelection:e}=this,{animationManager:t}=this.ctx,i=this.getColumnTransitionFunctions();rT.fromToMotion(this.id,"datums",t,[e],i),QA(this,"labels",t,this.labelSelection)}getTooltipContent(e){const{id:t,dataModel:i,processedData:n,axes:s,properties:r}=this,{angleKey:o,angleName:a,radiusKey:l,radiusName:c,tooltip:h}=r,d=s[UA.Angle],u=s[UA.Radius];if(!(i&&n&&d&&u))return;const p=n.dataSources.get(this.id)?.[e],g=i.resolveKeysById(this,"angleValue",n)[e],f=i.resolveColumnById(this,"radiusValue-raw",n)[e];if(null==g)return;const m=this.getItemBaseStyle(!1);return Object.assign(m,this.getItemStyleOverrides(String(e),e,m,!1)),this.formatTooltipWithContext(h,{heading:d.formatDatum(g),symbol:this.legendItemSymbol(),data:[{label:c,fallbackLabel:l,value:u.formatDatum(f)}]},{seriesId:t,datum:p,title:a,angleKey:o,angleName:a,radiusKey:l,radiusName:c,...m})}pickNodeClosestDatum(e){return this.pickNodeNearestDistantObject(e,this.itemSelection.nodes())}legendItemSymbol(){const{fill:e,stroke:t,fillOpacity:i,strokeOpacity:s,strokeWidth:r,lineDash:o,lineDashOffset:a,fillGradientDefaults:l,fillPatternDefaults:c,fillImageDefaults:h}=this.properties,d=lT({fill:e??"rgba(0, 0, 0, 0)",stroke:t??"rgba(0, 0, 0, 0)",fillOpacity:i,strokeOpacity:s,strokeWidth:r,lineDash:o,lineDashOffset:a},l,c,h);return n.n1.isGradientFill(d.fill)&&(d.fill={...d.fill,gradient:"linear",rotation:0,reverse:!1}),{marker:d}}getLegendData(e){if("category"!==e)return[];const{id:t,visible:i}=this,{radiusKey:n,radiusName:s,showInLegend:r}=this.properties;return[{legendType:"category",id:t,itemId:n,seriesId:t,enabled:i,label:{text:s??n},symbol:this.legendItemSymbol(),hideInLegend:!r}]}getDatumId(e){return tT(e.angleValue)}computeLabelsBBox(){return null}},{SeriesProperties:dT,FillGradientDefaults:uT,FillPatternDefaults:pT,FillImageDefaults:gT,SeriesTooltip:fT,Property:mT,Label:vT}=n.n1,yT=class extends dT{constructor(){super(...arguments),this.fill="black",this.fillGradientDefaults=new uT,this.fillPatternDefaults=new pT,this.fillImageDefaults=new gT,this.fillOpacity=1,this.stroke="black",this.strokeWidth=1,this.strokeOpacity=1,this.lineDash=[0],this.lineDashOffset=0,this.cornerRadius=0,this.rotation=0,this.label=new vT,this.tooltip=new fT}};a([mT],yT.prototype,"angleKey",2),a([mT],yT.prototype,"angleName",2),a([mT],yT.prototype,"radiusKey",2),a([mT],yT.prototype,"radiusName",2),a([mT],yT.prototype,"fill",2),a([mT],yT.prototype,"fillGradientDefaults",2),a([mT],yT.prototype,"fillPatternDefaults",2),a([mT],yT.prototype,"fillImageDefaults",2),a([mT],yT.prototype,"fillOpacity",2),a([mT],yT.prototype,"stroke",2),a([mT],yT.prototype,"strokeWidth",2),a([mT],yT.prototype,"strokeOpacity",2),a([mT],yT.prototype,"lineDash",2),a([mT],yT.prototype,"lineDashOffset",2),a([mT],yT.prototype,"cornerRadius",2),a([mT],yT.prototype,"itemStyler",2),a([mT],yT.prototype,"rotation",2),a([mT],yT.prototype,"stackGroup",2),a([mT],yT.prototype,"normalizedTo",2),a([mT],yT.prototype,"label",2),a([mT],yT.prototype,"tooltip",2);var{motion:CT}=n.n1;function bT(){const e={startAngle:new Map,endAngle:new Map},t=["startAngle","endAngle"],i=(t,i)=>({startAngle:e.startAngle.get(t)[i],endAngle:e.endAngle.get(t)[i]});return{calculate:(i,n,s)=>{t.forEach(t=>{const r=e[t];let o=("removed"===s||"updated"===s?i:n)[t],a=("removed"===s?i:n)[t];isNaN(a)&&(a=i.previousDatum?.[t]??NaN);const l=o-a;Math.abs(l)>Math.PI&&(o-=2*Math.sign(l)*Math.PI),r.set(n,{from:o,to:a})})},from:e=>i(e,"from"),to:e=>i(e,"to")}}function ST(e,t,i){if("updated"===i){if(null==e.previousDatum||isNaN(e.previousDatum.startAngle)||isNaN(e.previousDatum.endAngle))return"added";if(isNaN(t.startAngle)||isNaN(t.endAngle))return"removed"}return"added"===i&&null!=e.previousDatum?"updated":i}function wT(e,{innerRadius:t,outerRadius:i,columnWidth:n,axisInnerRadius:s,axisOuterRadius:r,startAngle:o,endAngle:a}){return{innerRadius:t,outerRadius:i,columnWidth:n,axisInnerRadius:s,axisOuterRadius:r,startAngle:o,endAngle:a}}var{SectorBox:xT,motion:ET}=n.n1;function MT(e){const{negative:t,innerRadius:i,outerRadius:n,stackInnerRadius:s,stackOuterRadius:r}=e;return{innerRadius:t?r:s,outerRadius:t?s:r,clipInnerRadius:t?n:i,clipOuterRadius:t?i:n}}function AT(e,t){const{startAngle:i,endAngle:n}=t,{innerRadius:s,outerRadius:r,clipInnerRadius:o,clipOuterRadius:a}=MT(t);return{innerRadius:s,outerRadius:r,startAngle:i,endAngle:n,clipSector:new xT(i,n,o,a)}}var{Sector:TT,SectorBox:DT,PolarZIndexMap:IT}=n.n1,RT=class extends hT{constructor(e){super(e,{animationResetFns:{item:AT}}),this.properties=new yT}setSeriesIndex(e){return!!super.setSeriesIndex(e)&&(this.contentGroup.zIndex=[0,IT.FOREGROUND,e],this.highlightGroup.zIndex=[0,IT.HIGHLIGHT,e],this.labelGroup.zIndex=[0,IT.LABEL,e],!0)}getStackId(){return`nightingale-stack-${this.seriesGrouping?.groupIndex??this.id}-yValues`}nodeFactory(){return new TT}updateItemPath(e,t,i){const{negative:n}=t;if(e.centerX=0,e.centerY=0,e.startOuterCornerRadius=n?0:this.properties.cornerRadius,e.endOuterCornerRadius=n?0:this.properties.cornerRadius,e.startInnerCornerRadius=n?this.properties.cornerRadius:0,e.endInnerCornerRadius=n?this.properties.cornerRadius:0,i){const{startAngle:i,endAngle:n}=t,{innerRadius:s,outerRadius:r,clipInnerRadius:o,clipOuterRadius:a}=MT(t);e.innerRadius=s,e.outerRadius=r,e.startAngle=i,e.endAngle=n,e.clipSector=new DT(i,n,o,a)}}getColumnTransitionFunctions(){return function(e){const t=bT();return{toFn:(i,n,s)=>{const{startAngle:r,endAngle:o}=t.to(n);let a,l,c;if("removed"===s)a=e,l=e,c=new xT(r,o,a,l);else{let t,i;({innerRadius:a,outerRadius:l,clipInnerRadius:t,clipOuterRadius:i}=MT(n)),isNaN(a)&&(a=e),isNaN(l)&&(l=e),isNaN(t)&&(t=e),isNaN(i)&&(i=e),c=new xT(r,o,t,i)}return{innerRadius:a,outerRadius:l,startAngle:r,endAngle:o,clipSector:c}},fromFn:(i,n,s)=>{s=ST(i,n,s),t.calculate(i,n,s);const{startAngle:r,endAngle:o}=t.from(n);let a,l,c;return"removed"===s||"updated"===s?(a=i.innerRadius,l=i.outerRadius,c=i.clipSector):(a=e,l=e),c??(c=new xT(r,o,a,l)),{innerRadius:a,outerRadius:l,startAngle:r,endAngle:o,clipSector:c,phase:ET.NODE_UPDATE_STATE_TO_PHASE_MAPPING[s]}}}}(this.isRadiusAxisReversed()?this.radius:this.getAxisInnerRadius())}};RT.className="NightingaleSeries",RT.type="nightingale";var{commonSeriesOptionsDefs:LT,nightingaleSeriesThemeableOptionsDef:kT}=n.n1,PT={...kT,...LT,type:(0,s.mw)((0,s.dY)("nightingale")),angleKey:(0,s.mw)(s.Yj),radiusKey:(0,s.mw)(s.Yj),angleName:s.Yj,radiusName:s.Yj,grouped:s.zM,stacked:s.zM,stackGroup:s.Yj,normalizedTo:s.ai},{ThemeConstants:{POLAR_AXIS_TYPE:NT,POLAR_AXIS_SHAPE:OT}}=n.n1,_T={$path:["./shape",OT.CIRCLE,{$find:[{$not:[{$isOperation:"./shape"}]},{$path:".."}]}]},FT={series:{fill:{$palette:"fill"},stroke:{$if:[{$eq:[{$palette:"type"},"inbuilt"]},{$ref:"backgroundColor"},{$palette:"stroke"}]},fillGradientDefaults:{type:"gradient",gradient:"radial",bounds:"series",colorStops:{$palette:"gradient"},rotation:0,reverse:!1},fillPatternDefaults:n.n1.FILL_PATTERN_DEFAULTS,fillImageDefaults:n.n1.FILL_IMAGE_DEFAULTS,strokeWidth:1,label:{enabled:!1,fontSize:{$ref:"fontSize"},fontFamily:{$ref:"fontFamily"},fontWeight:{$ref:"fontWeight"},color:{$ref:"textColor"}}},axes:{[NT.ANGLE_CATEGORY]:{shape:_T,groupPaddingInner:0,paddingInner:0,label:{spacing:10}},[NT.RADIUS_NUMBER]:{shape:_T}}},{ThemeConstants:{POLAR_AXIS_TYPE:GT}}=n.n1,VT={type:"series",optionsKey:"series[]",packageType:"enterprise",chartTypes:["polar"],identifier:"nightingale",moduleFactory:e=>new RT(e),tooltipDefaults:{range:"exact"},defaultAxes:[{type:GT.ANGLE_CATEGORY},{type:GT.RADIUS_NUMBER}],themeTemplate:FT,stackable:!0,groupable:!0,stackedByDefault:!0},BT={type:"series",name:"nightingale",chartType:"polar",enterprise:!0,options:PT,create:e=>new RT(e)},{SeriesProperties:HT,FillGradientDefaults:zT,FillPatternDefaults:UT,FillImageDefaults:WT,SeriesTooltip:jT,Property:KT,Label:$T,DropShadow:YT}=n.n1,qT=class extends $T{},XT=class extends $T{constructor(){super(...arguments),this.spacing=0}};a([KT],XT.prototype,"spacing",2),a([KT],XT.prototype,"placement",2);var ZT=class extends HT{constructor(){super(...arguments),this.fills=[],this.fillGradientDefaults=new zT,this.fillPatternDefaults=new UT,this.fillImageDefaults=new WT,this.fillOpacity=1,this.strokes=[],this.strokeWidth=1,this.strokeOpacity=1,this.lineDash=[0],this.lineDashOffset=0,this.direction="vertical",this.reverse=void 0,this.spacing=0,this.aspectRatio=void 0,this.shadow=(new YT).set({enabled:!1}),this.label=new qT,this.stageLabel=new XT,this.tooltip=new jT}};function QT(e,{x:t,y:i,top:n,right:s,bottom:r,left:o}){e.x0=t-n/2,e.x1=t+n/2,e.x2=t+r/2,e.x3=t-r/2,e.y0=i-o/2,e.y1=i-s/2,e.y2=i+s/2,e.y3=i+o/2}a([KT],ZT.prototype,"stageKey",2),a([KT],ZT.prototype,"valueKey",2),a([KT],ZT.prototype,"fills",2),a([KT],ZT.prototype,"fillGradientDefaults",2),a([KT],ZT.prototype,"fillPatternDefaults",2),a([KT],ZT.prototype,"fillImageDefaults",2),a([KT],ZT.prototype,"fillOpacity",2),a([KT],ZT.prototype,"strokes",2),a([KT],ZT.prototype,"strokeWidth",2),a([KT],ZT.prototype,"strokeOpacity",2),a([KT],ZT.prototype,"lineDash",2),a([KT],ZT.prototype,"lineDashOffset",2),a([KT],ZT.prototype,"direction",2),a([KT],ZT.prototype,"reverse",2),a([KT],ZT.prototype,"spacing",2),a([KT],ZT.prototype,"aspectRatio",2),a([KT],ZT.prototype,"itemStyler",2),a([KT],ZT.prototype,"shadow",2),a([KT],ZT.prototype,"label",2),a([KT],ZT.prototype,"stageLabel",2),a([KT],ZT.prototype,"tooltip",2);var{StateMachine:JT,valueProperty:eD,SeriesNodePickMode:tD,CachedTextMeasurerPool:iD,TextUtils:nD,createDatumId:sD,BBox:rD,Group:oD,Selection:aD,Text:lD,PointerEvents:cD,applyShapeStyle:hD,fromToMotion:dD,seriesLabelFadeInAnimation:uD,getShapeStyle:pD}=n.n1,gD=class extends n.n1.DataModelSeries{constructor(e){super({moduleCtx:e,categoryKey:void 0,pickModes:[tD.EXACT_SHAPE_MATCH,tD.NEAREST_NODE]}),this.properties=new ZT,this.itemGroup=this.contentGroup.appendChild(new oD({name:"itemGroup"})),this.itemLabelGroup=this.contentGroup.appendChild(new oD({name:"itemLabelGroup"})),this.stageLabelGroup=this.contentGroup.appendChild(new oD({name:"stageLabelGroup"})),this.datumSelection=aD.select(this.itemGroup,()=>this.nodeFactory()),this.labelSelection=aD.select(this.itemLabelGroup,lD),this.stageLabelSelection=aD.select(this.stageLabelGroup,lD),this.highlightDatumSelection=aD.select(this.highlightNode,()=>this.nodeFactory()),this.animationState=new JT("empty",{empty:{update:{target:"ready",action:()=>this.animateEmptyUpdateReady()},reset:"empty",skip:"ready"},ready:{clear:"empty",reset:"empty",skip:"ready"}},()=>this.checkProcessedDataAnimatable()),this.itemLabelGroup.pointerEvents=cD.None,this.stageLabelGroup.pointerEvents=cD.None}addChartEventListeners(){this.destroyFns.push(this.ctx.chartEventManager?.addListener("legend-item-click",e=>this.onLegendItemClick(e)))}nodeFactory(){return new mS}getNodeData(){return this.contextNodeData?.nodeData}resetAnimation(e){"initial"===e?this.animationState.transition("reset"):"ready"===e&&this.animationState.transition("skip")}async processData(e){if(null==this.data)return;const{id:t,visible:i,ctx:{legendManager:n}}=this,{stageKey:s,valueKey:r}=this.properties,o=this.visible?{}:{forceValue:0};await this.requestDataModel(e,this.data,{props:[eD(s,"band",{id:"xValue"}),eD(r,"number",{id:"yValue",...o,validation:(e,s,r)=>i&&n.getItemEnabled({seriesId:t,itemId:r}),invalidValue:0})]})}createNodeData(){const{id:e,dataModel:t,processedData:i,properties:n,visible:s,ctx:{legendManager:r}}=this,{stageKey:o,valueKey:a,direction:l,reverse:c="horizontal"===l,spacing:h,aspectRatio:d,label:u,stageLabel:p}=n;if(null==t||null==i)return;const g="horizontal"===l,f=t.resolveColumnById(this,"xValue",i),m=t.resolveColumnById(this,"yValue",i),v=iD.getMeasurer({font:p.getFont()});let y,C;g?(y="center",C="before"===p.placement?"bottom":"top"):(y="after"===p.placement?"left":"right",C="middle");const b=p.enabled?[]:void 0;let S=0,w=0,x=0;const E=i.dataSources.get(this.id)??[];E.forEach((t,i)=>{const n=f[i],l=m[i],c=s&&r.getItemEnabled({seriesId:e,itemId:i});if(x+=l,null==b)return;const h=this.getLabelText(this.properties.stageLabel,{datum:t,value:n,stageKey:o,valueKey:a}),{width:d}=v.measureText(h),p=h.split("\n").length*nD.getLineHeight(u.fontSize);S=Math.max(S,d),w=Math.max(w,p),b.push({x:NaN,y:NaN,text:h,textAlign:y,textBaseline:C,visible:c})});const M=this._nodeDataDependencies?.seriesRectWidth??0,A=this._nodeDataDependencies?.seriesRectHeight??0,T=h*(i.input.count-1);let D,I,R;if(g){const e=w+p.spacing;D=new rD(0,"before"===p.placement?e:0,M,A-e)}else{const e=S+p.spacing;D=new rD("after"===p.placement?0:e,0,M-e,A)}if(null!=d&&0!==d){const e="horizontal"===l?1/d:d,t=Math.min(D.width,D.height*e),i=t/e;D=new rD(D.x+(D.width-t)/2,D.y+(D.height-i)/2,t,i)}g?R="before"===p.placement?D.y-p.spacing:D.y+D.height+p.spacing:I="after"===p.placement?D.x+D.width+p.spacing:D.x-p.spacing;const L=D.width-(g?T:0),k=D.height-(g?0:T);if(L<0||k<0)return;const P=[],N=[];let O=0;return E.forEach((t,i)=>{const n=f[i],l=m[i],d=s&&r.getItemEnabled({seriesId:e,itemId:i}),p=O+l,v=(O+p)/(2*x),y=(p-O)/x,C=g?L*v+h*i:.5*L,S=g?.5*k:k*v+h*i,w=D.x+C,E=D.y+S;if(null!=b){const e=b[i];e.x=I??w,e.y=R??E}let M,A,T,_;if(g){const e=L*y;M=e,T=e;const t=(C+e/2)*(k/D.width),i=(C-e/2)*(k/D.width);A=c?D.height-t:t,_=c?D.height-i:i}else{const e=k*y;A=e,_=e;const t=(S-e/2)*(L/D.height),i=(S+e/2)*(L/D.height);M=c?D.width-t:t,T=c?D.width-i:i}const F={x:w,y:E,text:this.getLabelText(u,{datum:t,value:l,stageKey:o,valueKey:a}),textAlign:"center",textBaseline:"middle",visible:d};N.push(F),P.push({series:this,itemId:a,datum:t,datumIndex:i,index:i,xValue:n,yValue:l,x:w,y:E,top:M,right:A,bottom:T,left:_,label:F,enabled:d,midPoint:{x:w,y:E}}),O=p}),{itemId:e,nodeData:P,labelData:N,stageLabelData:b,bounds:D}}updateSelections(){this.nodeDataRefresh&&(this.contextNodeData=this.createNodeData(),this.nodeDataRefresh=!1)}update({seriesRect:e}){this.checkResize(e);const{datumSelection:t,labelSelection:i,stageLabelSelection:n,highlightDatumSelection:s}=this;this.updateSelections(),this.contentGroup.visible=this.visible,this.contentGroup.opacity=this.getOpacity();let r=this.ctx.highlightManager?.getActiveHighlight();null==r||r.series===this&&null!=r.datum||(r=void 0);const o=this.contextNodeData?.nodeData??[],a=this.contextNodeData?.labelData??[],l=this.contextNodeData?.stageLabelData??[];this.datumSelection=this.updateDatumSelection({nodeData:o,datumSelection:t}),this.updateDatumNodes({datumSelection:t,isHighlight:!1}),this.labelSelection=this.updateLabelSelection({labelData:a,labelSelection:i}),this.updateLabelNodes({labelSelection:i,labelProperties:this.properties.label}),this.stageLabelSelection=this.updateStageLabelSelection({stageLabelData:l,stageLabelSelection:n}),this.updateLabelNodes({labelSelection:n,labelProperties:this.properties.stageLabel}),this.highlightDatumSelection=this.updateDatumSelection({nodeData:null!=r?[r]:[],datumSelection:s}),this.updateDatumNodes({datumSelection:s,isHighlight:!0}),this.animationState.transition("update")}updateDatumSelection(e){return e.datumSelection.update(e.nodeData)}getItemBaseStyle(e){const{properties:t}=this,i=e?t.highlightStyle.item:void 0;return pD({fill:i?.fill,fillOpacity:i?.fillOpacity??t.fillOpacity,stroke:i?.stroke,strokeWidth:i?.strokeWidth??this.getStrokeWidth(t.strokeWidth),strokeOpacity:i?.strokeOpacity??t.strokeOpacity,lineDash:i?.lineDash??t.lineDash,lineDashOffset:i?.lineDashOffset??t.lineDashOffset},this.properties.fillGradientDefaults,this.properties.fillPatternDefaults,this.properties.fillImageDefaults)}getItemStyleOverrides(e,t,i,n,s){const{id:r,properties:o}=this,{fills:a,strokes:l,stageKey:c,valueKey:h,itemStyler:d}=o,u=n.fill??a[i%a.length],p=n.stroke??l[i%l.length],g={};if(s||(g.fill=u,g.stroke=p),null!=d){const i=this.cachedDatumCallback(sD(e,s?"highlight":"node"),()=>this.callWithContext(d,{seriesId:r,datum:t,stageKey:c,valueKey:h,highlighted:s,fill:u,stroke:p,...n}));Object.assign(g,i)}return pD(g,this.properties.fillGradientDefaults,this.properties.fillPatternDefaults,this.properties.fillImageDefaults)}updateDatumNodes(e){const{datumSelection:t,isHighlight:i}=e,{properties:n}=this,{shadow:s}=n,r=this.getItemBaseStyle(i),o=this.contextNodeData?.bounds,a=o?{series:o,axis:o}:void 0;t.each((e,t)=>{const{datumIndex:n,datum:o}=t,l=this.getItemStyleOverrides(String(n),o,n,r,i);hD(e,r,l,a),QT(e,t),e.fillShadow=s})}updateLabelSelection(e){return e.labelSelection.update(this.properties.label.enabled?e.labelData:[])}updateStageLabelSelection(e){return e.stageLabelSelection.update(e.stageLabelData)}updateLabelNodes(e){const{labelSelection:t,labelProperties:i}=e,{color:n,fontSize:s,fontStyle:r,fontWeight:o,fontFamily:a}=i;t.each((e,{visible:t,x:i,y:l,text:c,textAlign:h,textBaseline:d})=>{e.visible=t,e.x=i,e.y=l,e.text=c,e.fill=n,e.fontStyle=r,e.fontWeight=o,e.fontSize=s,e.fontFamily=a,e.textAlign=h,e.textBaseline=d})}computeFocusBounds(e){const t=this.getNodeData()?.[e.datumIndex];if(void 0!==t)for(const e of this.datumSelection)if(e.datum===t)return e.node}getTooltipContent(e){const{id:t,dataModel:i,processedData:n,properties:s}=this,{stageKey:r,valueKey:o,tooltip:a}=s;if(!i||!n)return;const l=n.dataSources.get(this.id)?.[e],c=i.resolveColumnById(this,"xValue",n)[e],h=i.resolveColumnById(this,"yValue",n)[e];if(null==c)return;const d=this.getLabelText(this.properties.stageLabel,{datum:n.dataSources.get(this.id)?.[e],value:h,stageKey:r,valueKey:o}),u=this.getItemBaseStyle(!1);return Object.assign(u,this.getItemStyleOverrides(String(e),e,e,u,!1)),this.formatTooltipWithContext(a,{symbol:this.legendItemSymbol(e),data:[{label:String(c),value:d}]},{seriesId:t,datum:l,title:void 0,stageKey:r,valueKey:o,...u})}getSeriesDomain(){return[NaN,NaN]}getSeriesRange(e,t){return[NaN,NaN]}pickNodeClosestDatum({x:e,y:t}){let i,n=1/0;return this.datumSelection.each((s,r)=>{const o=s.distanceSquared(e,t);o<n&&(n=o,i=r)}),null!=i?{datum:i,distance:Math.sqrt(n)}:void 0}legendItemSymbol(e){const{fills:t,strokes:i,strokeWidth:n,fillOpacity:s,strokeOpacity:r,lineDash:o,lineDashOffset:a}=this.properties,l=t[e%t.length]??"black",c=i[e%i.length]??"black";return{marker:pD({fill:l,fillOpacity:s,stroke:c,strokeWidth:n,strokeOpacity:r,lineDash:o,lineDashOffset:a},this.properties.fillGradientDefaults,this.properties.fillPatternDefaults,this.properties.fillImageDefaults)}}getLegendData(e){const{processedData:t,dataModel:i,id:n,ctx:{legendManager:s},visible:r}=this;if(!i||!t||"category"!==e)return[];const{showInLegend:o}=this.properties,a=[],l=i.resolveColumnById(this,"xValue",t);return(t.dataSources.get(this.id)??[]).forEach((e,t)=>{const i=l[t];a.push({legendType:"category",id:n,itemId:t,seriesId:n,enabled:r&&s.getItemEnabled({seriesId:n,itemId:t}),label:{text:i},symbol:this.legendItemSymbol(t),hideInLegend:!o})}),a}animateReset(){this.ctx.animationManager.skipCurrentBatch(),this.ctx.animationManager.stopByAnimationGroupId(this.id)}animateEmptyUpdateReady(){const{datumSelection:e,labelSelection:t,properties:i}=this,n=(s=i.direction,{fromFn:(e,t)=>{const{x:i,y:n}=t;let{top:r,right:o,bottom:a,left:l}=t;return"vertical"===s?(r=0,a=0):(l=0,o=0),{x:i,y:n,top:r,right:o,bottom:a,left:l}},toFn:(e,t)=>{const{x:i,y:n,top:s,right:r,bottom:o,left:a}=t;return{x:i,y:n,top:s,right:r,bottom:o,left:a}},applyFn:QT});var s;dD(this.id,"nodes",this.ctx.animationManager,[e],n),uD(this,"labels",this.ctx.animationManager,t)}};gD.className="PyramidSeries",gD.type="pyramid";var{commonSeriesOptionsDefs:fD,pyramidSeriesThemeableOptionsDef:mD}=n.n1,vD={...mD,...fD,type:(0,s.mw)((0,s.dY)("pyramid")),stageKey:(0,s.mw)(s.Yj),valueKey:(0,s.mw)(s.Yj)},{ThemeSymbols:{DEFAULT_SHADOW_COLOUR:yD}}=n.n1,CD={type:"series",optionsKey:"series[]",packageType:"enterprise",chartTypes:["standalone"],identifier:"pyramid",moduleFactory:e=>new gD(e),solo:!0,tooltipDefaults:{range:"exact"},themeTemplate:{series:{direction:"vertical",strokeWidth:0,spacing:2,fills:{$palette:"fills"},strokes:{$palette:"strokes"},fillGradientDefaults:{type:"gradient",gradient:"linear",bounds:"item",colorStops:{$palette:"gradient"},rotation:0,reverse:!1},fillPatternDefaults:n.n1.FILL_PATTERN_DEFAULTS,fillImageDefaults:n.n1.FILL_IMAGE_DEFAULTS,label:{enabled:!0,fontSize:{$ref:"fontSize"},fontFamily:{$ref:"fontFamily"},fontWeight:{$ref:"fontWeight"},color:{$ref:"backgroundColor"}},stageLabel:{enabled:!0,fontSize:{$ref:"fontSize"},fontFamily:{$ref:"fontFamily"},fontWeight:{$ref:"fontWeight"},color:{$ref:"textColor"},spacing:12},shadow:{enabled:!1,color:yD,xOffset:3,yOffset:3,blur:5}}}},bD={type:"series",name:"pyramid",chartType:"standalone",enterprise:!0,options:vD,create:e=>new gD(e)},{ThemeConstants:{POLAR_AXIS_TYPE:SD}}=n.n1,wD={series:{stroke:{$palette:"stroke"},label:{enabled:!1,fontSize:{$ref:"fontSize"},fontFamily:{$ref:"fontFamily"},fontWeight:{$ref:"fontWeight"},color:{$ref:"textColor"}},marker:{enabled:!0,fill:{$palette:"fill"},stroke:{$palette:"stroke"},fillGradientDefaults:{type:"gradient",gradient:"radial",bounds:"item",colorStops:{$palette:"gradient"},rotation:0,reverse:!0},fillPatternDefaults:n.n1.FILL_PATTERN_DEFAULTS,fillImageDefaults:n.n1.FILL_IMAGE_DEFAULTS,fillOpacity:1,shape:"circle",size:6,strokeOpacity:1,strokeWidth:0}},axes:{[SD.ANGLE_CATEGORY]:{label:{spacing:10}}}},xD=n.n1.mergeDefaults({series:{stroke:n.n1.SAFE_STROKE_FILL_OPERATION,strokeWidth:2}},wD),ED=n.n1.mergeDefaults({series:{fill:{$palette:"fill"},fillGradientDefaults:{type:"gradient",gradient:"linear",bounds:"item",colorStops:{$palette:"gradient"},rotation:0,reverse:!1},fillPatternDefaults:n.n1.FILL_PATTERN_DEFAULTS,fillImageDefaults:n.n1.FILL_IMAGE_DEFAULTS,fillOpacity:.8,strokeWidth:2,marker:{enabled:!1,fillGradientDefaults:{type:"gradient",gradient:"radial",bounds:"item",colorStops:{$palette:"gradient"},rotation:0,reverse:!0},fillPatternDefaults:n.n1.FILL_PATTERN_DEFAULTS,fillImageDefaults:n.n1.FILL_IMAGE_DEFAULTS}}},wD),{Label:MD,SeriesMarker:AD,SeriesProperties:TD,SeriesTooltip:DD,Property:ID}=n.n1,RD=class extends TD{constructor(){super(...arguments),this.stroke="black",this.strokeWidth=1,this.strokeOpacity=1,this.lineDash=[0],this.lineDashOffset=0,this.rotation=0,this.marker=new AD,this.label=new MD,this.tooltip=new DD,this.connectMissingData=!1}};a([ID],RD.prototype,"angleKey",2),a([ID],RD.prototype,"radiusKey",2),a([ID],RD.prototype,"angleName",2),a([ID],RD.prototype,"radiusName",2),a([ID],RD.prototype,"stroke",2),a([ID],RD.prototype,"strokeWidth",2),a([ID],RD.prototype,"strokeOpacity",2),a([ID],RD.prototype,"lineDash",2),a([ID],RD.prototype,"lineDashOffset",2),a([ID],RD.prototype,"rotation",2),a([ID],RD.prototype,"marker",2),a([ID],RD.prototype,"label",2),a([ID],RD.prototype,"tooltip",2),a([ID],RD.prototype,"connectMissingData",2);var{ChartAxisDirection:LD,PolarAxis:kD,SeriesNodePickMode:PD,valueProperty:ND,fixNumericExtent:OD,seriesLabelFadeInAnimation:_D,markerFadeInAnimation:FD,resetMarkerFn:GD,animationValidation:VD,computeMarkerFocusBounds:BD,extent:HD,BBox:zD,Group:UD,Path:WD,PointerEvents:jD,Selection:KD,Text:$D,Marker:YD,mergeDefaults:qD,getShapeStyle:XD}=n.n1,ZD=class extends n.n1.SeriesNodeEvent{constructor(e,t,i,n){super(e,t,i,n),this.angleKey=n.properties.angleKey,this.radiusKey=n.properties.radiusKey}},QD=class extends n.n1.PolarSeries{constructor(e){super({moduleCtx:e,categoryKey:"angleValue",useLabelLayer:!0,pickModes:[PD.NEAREST_NODE,PD.EXACT_SHAPE_MATCH],canHaveAxes:!0,animationResetFns:{item:GD},clipFocusBox:!1}),this.properties=new RD,this.NodeEvent=ZD,this.lineGroup=this.contentGroup.appendChild(new UD({name:"radar-line"})),this.lineSelection=KD.select(this.lineGroup,WD),this.resetInvalidToZero=!1,this.circleCache={r:0,cx:0,cy:0},this.lineGroup.zIndex=0,this.itemGroup.zIndex=1}nodeFactory(){return new YD}getSeriesDomain(e){const{dataModel:t,processedData:i}=this;if(!i||!t)return[];if(e===LD.Angle)return t.getDomain(this,"angleValue","value",i);{const e=t.getDomain(this,"radiusValue","value",i),n=HD(0===e.length?e:[0].concat(e));return OD(n)}}async processData(e){const{angleKey:t,radiusKey:i}=this.properties,n=[];this.ctx.animationManager.isSkipped()||n.push(VD());const s=this.axes[LD.Radius]?.scale.type,r=this.axes[LD.Angle]?.scale.type;await this.requestDataModel(e,this.data,{props:[ND(t,r,{id:"angleValue"}),ND(i,s,{id:"radiusValue",invalidValue:void 0}),...n]}),this.animationState.transition("updateData")}didCircleChange(){const e=this.radius,t=this.centerX,i=this.centerY,n=this.circleCache;return(e!==n.r||t!==n.cx||i!==n.cy)&&(this.circleCache={r:e,cx:t,cy:i},!0)}getAxisInnerRadius(){const e=this.axes[LD.Radius];return e instanceof kD?this.radius*e.innerRadiusRatio:0}maybeRefreshNodeData(){if(!this.didCircleChange()&&!this.nodeDataRefresh)return;const{nodeData:e=[]}=this.createNodeData()??{};this.nodeData=e,this.nodeDataRefresh=!1}createNodeData(){const{processedData:e,dataModel:t}=this;if(!e||!t)return;const{angleKey:i,radiusKey:n,angleName:r,radiusName:o,marker:a,label:l}=this.properties,c=this.axes[LD.Angle]?.scale,h=this.axes[LD.Radius]?.scale;if(!c||!h)return;const d=t.resolveColumnById(this,"angleValue",e),u=t.resolveColumnById(this,"radiusValue",e),p=this.getAxisInnerRadius(),g=(e.dataSources.get(this.id)??[]).map((e,t)=>{const g=d[t],f=u[t],m=c.convert(g),v=this.radius+p-h.convert(f),y=Math.cos(m),C=Math.sin(m),b=y*v,S=C*v;let w;if(l.enabled){const t=this.getLabelText(l,{value:f,datum:e,angleKey:i,radiusKey:n,angleName:r,radiusName:o});if(t){let e="right";(0,s.YX)(y,0)?e="center":y>0&&(e="left");let i="bottom";(0,s.YX)(C,0)?i="middle":C>0&&(i="top"),w={x:b+y*a.size,y:S+C*a.size,text:t,textAlign:e,textBaseline:i}}}return{series:this,datum:e,datumIndex:t,index:t,point:{x:b,y:S,size:a.size},midPoint:{x:b,y:S},label:w,angleValue:g,radiusValue:f,missing:!(0,s.Bf)(m)||!(0,s.Bf)(v)}});return{itemId:n,nodeData:g,labelData:g}}update({seriesRect:e}){const t=this.checkResize(e),i=!this.ctx.animationManager.isSkipped(),{series:n}=this.ctx.highlightManager?.getActiveHighlight()??{};this.highlightGroup.visible=(i||this.visible)&&n===this,this.maybeRefreshNodeData(),this.contentGroup.translationX=this.centerX,this.contentGroup.translationY=this.centerY,this.highlightGroup.translationX=this.centerX,this.highlightGroup.translationY=this.centerY,this.labelGroup&&(this.labelGroup.translationX=this.centerX,this.labelGroup.translationY=this.centerY),this.updatePathSelections(),this.updateMarkerSelection(),this.updateMarkers(this.itemSelection,!1),this.updateMarkers(this.highlightSelection,!0),this.updateLabels(),t&&this.animationState.transition("resize"),this.animationState.transition("update")}updatePathSelections(){const e=this.visible?[!0]:[];this.lineSelection.update(e)}updateMarkerSelection(){this.properties.marker.isDirty()&&(this.itemSelection.clear(),this.itemSelection.cleanup(),this.itemSelection=KD.select(this.itemGroup,()=>this.nodeFactory(),!1)),this.itemSelection.update(this.properties.marker.enabled?this.nodeData:[])}getMarkerFill(e){return e?.fill??this.properties.marker.fill}getDatumStylerProperties(e){const{id:t,properties:i}=this,{angleKey:n,radiusKey:s}=i;return{seriesId:t,datum:e,angleKey:n,radiusKey:s}}updateMarkers(e,t){const{visible:i}=this,{marker:n,stroke:s,strokeWidth:r,strokeOpacity:o,highlightStyle:a}=this.properties;let l=[];if(i&&n.shape&&n.enabled)if(t){const e=this.ctx.highlightManager?.getActiveHighlight();e?.datum&&(l=[e])}else l=this.nodeData;const c=qD(t&&a.item,n.getStyle(),{stroke:s,strokeWidth:r,strokeOpacity:o}),h=this.getShapeFillBBox();e.update(l).each((e,i)=>{this.updateMarkerStyle(n,e,i.datum,i.point,this.getDatumStylerProperties(i),t,c,h)})}updateLabels(){const{label:e}=this.properties;this.labelSelection.update(this.nodeData).each((t,i)=>{e.enabled&&i.label?(t.x=i.label.x,t.y=i.label.y,t.fill=e.color,t.fontFamily=e.fontFamily,t.fontSize=e.fontSize,t.fontStyle=e.fontStyle,t.fontWeight=e.fontWeight,t.text=i.label.text,t.textAlign=i.label.textAlign,t.textBaseline=i.label.textBaseline,t.visible=!0):t.visible=!1})}getTooltipContent(e){const{id:t,dataModel:i,processedData:n,axes:s,properties:r}=this,{angleKey:o,angleName:a,radiusKey:l,radiusName:c,tooltip:h,marker:d}=r,u=s[LD.Angle],p=s[LD.Radius];if(!(i&&n&&u&&p))return;const g=n.dataSources.get(this.id)?.[e],f=i.resolveColumnById(this,"angleValue",n)[e],m=i.resolveColumnById(this,"radiusValue",n)[e];if(null==f)return;const v=this.getMarkerStyle(d,g,this.getDatumStylerProperties(g),!1);return this.formatTooltipWithContext(h,{heading:u.formatDatum(f),symbol:this.legendItemSymbol(),data:[{label:c,fallbackLabel:l,value:p.formatDatum(m)}]},{seriesId:t,datum:g,title:a,angleKey:o,radiusKey:l,angleName:a,radiusName:c,...v})}legendItemSymbol(){const{stroke:e,strokeWidth:t,strokeOpacity:i,lineDash:n,marker:s}=this.properties;return{marker:XD({shape:s.shape,enabled:s.enabled||t<=0,fill:this.getMarkerFill()??s.stroke??e??"rgba(0, 0, 0, 0)",stroke:s.stroke??e??"rgba(0, 0, 0, 0)",fillOpacity:s.fillOpacity,strokeOpacity:s.strokeOpacity,strokeWidth:s.strokeWidth,lineDash:s.lineDash,lineDashOffset:s.lineDashOffset},s.fillGradientDefaults,s.fillPatternDefaults,s.fillImageDefaults),line:{stroke:e,strokeOpacity:i,strokeWidth:t,lineDash:n}}}getLegendData(e){if("category"!==e)return[];const{id:t,ctx:{legendManager:i},visible:n}=this,{radiusKey:s,radiusName:r,showInLegend:o}=this.properties;return[{legendType:"category",id:t,itemId:s,seriesId:t,enabled:n&&i.getItemEnabled({seriesId:t,itemId:s}),label:{text:r??s},symbol:this.legendItemSymbol(),hideInLegend:!o}]}pickNodeClosestDatum(e){const{nodeData:t,centerX:i,centerY:n}=this,{x:s,y:r}=e,o=this.radius;if(Math.sqrt((s-i)**2+(r-n)**2)>o+this.properties.marker.size)return;let a,l=1/0;for(const s of t){const{point:{x:t=NaN,y:r=NaN}={}}=s;if(isNaN(t)||isNaN(r))continue;const o=Math.sqrt((e.x-t-i)**2+(e.y-r-n)**2);o<l&&(l=o,a=s)}return a?{datum:a,distance:Math.max(l-(a.point?.size??0),0)}:void 0}computeLabelsBBox(){const{label:e}=this.properties;this.maybeRefreshNodeData();const t=[],i=new $D;return this.nodeData.forEach(n=>{if(!e.enabled||!n.label)return;i.text=n.label.text,i.x=n.label.x,i.y=n.label.y,i.setFont(e),i.setAlign(n.label);const s=i.getBBox();t.push(s)}),0===t.length?null:zD.merge(t)}getLineNode(){return this.lineSelection?.at(0)}beforePathAnimation(){const e=this.getLineNode();e&&(e.fill=void 0,e.lineJoin="round",e.lineCap="round",e.pointerEvents=jD.None,e.stroke=this.properties.stroke,e.strokeWidth=this.getStrokeWidth(this.properties.strokeWidth),e.strokeOpacity=this.properties.strokeOpacity,e.lineDash=this.properties.lineDash,e.lineDashOffset=this.properties.lineDashOffset)}getLinePoints(){const{nodeData:e,resetInvalidToZero:t}=this,{connectMissingData:i}=this.properties;if(0===e.length)return[];const n=this.axes[LD.Radius],s=this.axes[LD.Angle],r=s?.isReversed(),o=n?.isReversed(),a=o&&!r?[...e].reverse():e,l=[];let c,h=!1;return a.forEach((e,n)=>{let{x:s,y:r}=e.point;const o=isNaN(s)||isNaN(r);o||(c??(c=e)),o&&!i&&(s=0,r=0);const a=0===n||!t&&!i&&(o||h);l.push({x:s,y:r,moveTo:a}),h=o}),void 0!==c&&l.push({x:c.point.x,y:c.point.y,moveTo:!1}),l}animateSinglePath(e,t,i){const{path:n}=e;n.clear(!0);const s=this.getAxisInnerRadius(),r=this.axes[LD.Radius],o=r?.isReversed(),a=o?this.radius+s-r?.scale.convert(0):s;t.forEach(e=>{const{x:t,y:s,arc:r,radius:o=0,startAngle:l=0,endAngle:c=0,moveTo:h}=e,d=Math.atan2(s,t),u=a*Math.cos(d),p=a*Math.sin(d),g=u*(1-i)+t*i,f=p*(1-i)+s*i;r?n.arc(t,s,o,l,c):h?n.moveTo(g,f):n.lineTo(g,f)}),e.checkPathDirty()}animatePaths(e){const t=this.getLinePoints(),i=this.getLineNode();i&&this.animateSinglePath(i,t,e)}animateEmptyUpdateReady(){const{itemSelection:e,labelSelection:t}=this,{animationManager:i}=this.ctx;this.beforePathAnimation(),i.animate({id:`${this.id}_'path`,groupId:this.id,from:0,to:1,phase:"initial",collapsable:!1,onUpdate:e=>this.animatePaths(e),onStop:()=>this.animatePaths(1)}),FD(this,i,"added",e),_D(this,"labels",i,t)}animateWaitingUpdateReady(e){super.animateWaitingUpdateReady(e),this.resetPaths()}animateReadyResize(e){super.animateReadyResize(e),this.resetPaths()}resetPaths(){const e=this.getLineNode();if(e){const{path:t}=e,i=this.getLinePoints();e.fill=void 0,e.stroke=this.properties.stroke,e.strokeWidth=this.getStrokeWidth(this.properties.strokeWidth),e.strokeOpacity=this.properties.strokeOpacity,e.lineDash=this.properties.lineDash,e.lineDashOffset=this.properties.lineDashOffset,t.clear(!0);for(const{x:e,y:n,moveTo:s}of i)s?t.moveTo(e,n):t.lineTo(e,n);e.checkPathDirty()}}getFormattedMarkerStyle(e){const{angleKey:t,radiusKey:i}=this.properties;return this.getMarkerStyle(this.properties.marker,e.datum,{angleKey:t,radiusKey:i},!0)}computeFocusBounds(e){return BD(this,e)}};QD.className="RadarSeries";var{FillGradientDefaults:JD,FillPatternDefaults:eI,FillImageDefaults:tI,Property:iI}=n.n1,nI=class extends RD{constructor(){super(...arguments),this.fill="black",this.fillGradientDefaults=new JD,this.fillPatternDefaults=new eI,this.fillImageDefaults=new tI,this.fillOpacity=1}};a([iI],nI.prototype,"fill",2),a([iI],nI.prototype,"fillGradientDefaults",2),a([iI],nI.prototype,"fillPatternDefaults",2),a([iI],nI.prototype,"fillImageDefaults",2),a([iI],nI.prototype,"fillOpacity",2);var{Group:sI,Path:rI,PointerEvents:oI,Selection:aI,ChartAxisDirection:lI,applyShapeStyle:cI,getShapeFill:hI,getShapeStyle:dI}=n.n1,uI=class extends QD{constructor(e){super(e),this.properties=new nI,this.areaGroup=this.contentGroup.appendChild(new sI({name:"radar-area"})),this.areaSelection=aI.select(this.areaGroup,rI),this.resetInvalidToZero=!0,this.areaGroup.zIndex=-1}updatePathSelections(){const e=this.visible?[!0]:[];this.areaSelection.update(e),super.updatePathSelections()}getAreaNode(){return this.areaSelection.at(0)}getMarkerFill(e){return e?.fill??this.properties.marker.fill??this.properties.fill}beforePathAnimation(){super.beforePathAnimation();const e=this.getAreaNode(),{fillOpacity:t,fill:i}=this.properties,n=dI({fill:i,fillOpacity:t},this.properties.fillGradientDefaults,this.properties.fillPatternDefaults,this.properties.fillImageDefaults);cI(e,n,void 0,this.getShapeFillBBox()),e.pointerEvents=oI.None,e.stroke=void 0}animatePaths(e){super.animatePaths(e),this.animateSinglePath(this.getAreaNode(),this.getAreaPoints(),e)}getAreaPoints(){const e=this.getLinePoints(),t=e=>{const t=this.axes[e];return t instanceof n.n1.PolarAxis?t:void 0},i=t(lI.Radius),s=t(lI.Angle),r=i?.isReversed();if(!r)return e;const o=s?.getAxisLinePoints()?.points??[];return e.concat(...o)}resetPaths(){super.resetPaths();const e=this.getAreaNode();if(e){const{path:t}=e,i=this.getAreaPoints(),n=hI(this.properties.fill,this.properties.fillGradientDefaults,this.properties.fillPatternDefaults,this.properties.fillImageDefaults),s=this.getShapeFillBBox();cI(e,{fill:n,stroke:void 0,fillOpacity:this.properties.fillOpacity,lineDash:this.properties.lineDash,lineDashOffset:this.properties.lineDashOffset},void 0,s),e.lineJoin=e.lineCap="round",t.clear(!0),i.forEach(({x:e,y:i,moveTo:n,arc:s,radius:r=0,startAngle:o=0,endAngle:a=0})=>{s?t.arc(e,i,r,o,a):n?t.moveTo(e,i):t.lineTo(e,i)}),t.closePath(),e.checkPathDirty()}}};uI.className="RadarAreaSeries",uI.type="radar-area";var{commonSeriesOptionsDefs:pI,radarAreaSeriesThemeableOptionsDef:gI}=n.n1,fI={...gI,...pI,type:(0,s.mw)((0,s.dY)("radar-area")),angleKey:(0,s.mw)(s.Yj),radiusKey:(0,s.mw)(s.Yj),angleName:s.Yj,radiusName:s.Yj},{ThemeConstants:{POLAR_AXIS_TYPE:mI}}=n.n1,vI={type:"series",optionsKey:"series[]",packageType:"enterprise",chartTypes:["polar"],identifier:"radar-area",moduleFactory:e=>new uI(e),tooltipDefaults:{range:"nearest"},defaultAxes:[{type:mI.ANGLE_CATEGORY},{type:mI.RADIUS_NUMBER}],themeTemplate:ED},yI={type:"series",name:"radar-area",chartType:"polar",enterprise:!0,options:fI,create:e=>new uI(e)},CI=class extends QD{updatePathSelections(){this.lineSelection.update(this.visible?[!0]:[])}};CI.className="RadarLineSeries",CI.type="radar-line";var{commonSeriesOptionsDefs:bI,radarLineSeriesThemeableOptionsDef:SI}=n.n1,wI={...SI,...bI,type:(0,s.mw)((0,s.dY)("radar-line")),angleKey:(0,s.mw)(s.Yj),radiusKey:(0,s.mw)(s.Yj),angleName:s.Yj,radiusName:s.Yj},{POLAR_AXIS_TYPE:xI}=n.n1.ThemeConstants,EI={type:"series",optionsKey:"series[]",packageType:"enterprise",chartTypes:["polar"],identifier:"radar-line",moduleFactory:e=>new CI(e),tooltipDefaults:{range:"nearest"},defaultAxes:[{type:xI.ANGLE_CATEGORY},{type:xI.RADIUS_NUMBER}],themeTemplate:xD},MI={type:"series",name:"radar-line",chartType:"polar",enterprise:!0,options:wI,create:e=>new CI(e)},{SeriesProperties:AI,FillGradientDefaults:TI,FillPatternDefaults:DI,FillImageDefaults:II,SeriesTooltip:RI,Property:LI,Label:kI}=n.n1,PI=class extends AI{constructor(){super(...arguments),this.fill="black",this.fillGradientDefaults=new TI,this.fillPatternDefaults=new DI,this.fillImageDefaults=new II,this.fillOpacity=1,this.stroke="black",this.strokeWidth=1,this.strokeOpacity=1,this.lineDash=[0],this.lineDashOffset=0,this.cornerRadius=0,this.rotation=0,this.label=new kI,this.tooltip=new RI}};a([LI],PI.prototype,"angleKey",2),a([LI],PI.prototype,"radiusKey",2),a([LI],PI.prototype,"angleName",2),a([LI],PI.prototype,"radiusName",2),a([LI],PI.prototype,"fill",2),a([LI],PI.prototype,"fillGradientDefaults",2),a([LI],PI.prototype,"fillPatternDefaults",2),a([LI],PI.prototype,"fillImageDefaults",2),a([LI],PI.prototype,"fillOpacity",2),a([LI],PI.prototype,"stroke",2),a([LI],PI.prototype,"strokeWidth",2),a([LI],PI.prototype,"strokeOpacity",2),a([LI],PI.prototype,"lineDash",2),a([LI],PI.prototype,"lineDashOffset",2),a([LI],PI.prototype,"cornerRadius",2),a([LI],PI.prototype,"itemStyler",2),a([LI],PI.prototype,"rotation",2),a([LI],PI.prototype,"stackGroup",2),a([LI],PI.prototype,"normalizedTo",2),a([LI],PI.prototype,"label",2),a([LI],PI.prototype,"tooltip",2);var{SectorBox:NI,motion:OI}=n.n1;function _I(e){return{toFn:(t,i,n)=>{let s,r,o,a,l;return"removed"===n?(s=e,r=e,o=i.innerRadius,a=i.outerRadius,l=new NI(s,r,o,a)):(s=i.startAngle,r=i.endAngle,o=isNaN(i.innerRadius)?t.innerRadius:i.innerRadius,a=isNaN(i.outerRadius)?t.outerRadius:i.outerRadius,l=i.clipSector),{startAngle:s,endAngle:r,innerRadius:o,outerRadius:a,clipSector:l}},fromFn:(t,i,n)=>{let s,r,o,a,l;return n=function(e,t,i){if("updated"===i){if(null==e.previousDatum||isNaN(e.previousDatum.innerRadius)||isNaN(e.previousDatum.outerRadius))return"added";if(isNaN(t.innerRadius)||isNaN(t.outerRadius))return"removed"}return"added"===i&&null!=e.previousDatum?"updated":i}(t,i,n),"removed"===n||"updated"===n?(s=t.startAngle,r=t.endAngle,o=t.innerRadius,a=t.outerRadius,l=t.clipSector):(s=e,r=e,o=i.innerRadius,a=i.outerRadius),l??(l=new NI(s,r,o,a)),{startAngle:s,endAngle:r,innerRadius:o,outerRadius:a,clipSector:l,phase:OI.NODE_UPDATE_STATE_TO_PHASE_MAPPING[n]}}}}function FI(e,t){return{centerX:0,centerY:0,innerRadius:t.innerRadius,outerRadius:t.outerRadius,startAngle:t.startAngle,endAngle:t.endAngle,clipSector:t.clipSector}}var{ChartAxisDirection:GI,PolarAxis:VI,diff:BI,groupAccumulativeValueProperty:HI,keyProperty:zI,normaliseGroupTo:UI,valueProperty:WI,fixNumericExtent:jI,resetLabelFn:KI,seriesLabelFadeInAnimation:$I,seriesLabelFadeOutAnimation:YI,animationValidation:qI,angleBetween:XI,createDatumId:ZI,CategoryScale:QI,Sector:JI,SectorBox:eR,motion:tR,isGradientFill:iR,applyShapeStyle:nR,getShapeStyle:sR}=n.n1,rR=class extends n.n1.SeriesNodeEvent{constructor(e,t,i,n){super(e,t,i,n),this.angleKey=n.properties.angleKey,this.radiusKey=n.properties.radiusKey}},oR=class extends n.n1.PolarSeries{constructor(e){super({moduleCtx:e,categoryKey:"radiusValue",useLabelLayer:!0,canHaveAxes:!0,animationResetFns:{item:FI,label:KI}}),this.properties=new PI,this.NodeEvent=rR,this.groupScale=new QI,this.circleCache={r:0,cx:0,cy:0}}get defaultShapeStyle(){const e=this.axes[GI.Angle]?.scale;return{...this.properties.fillGradientDefaults.toJson(),rotation:n.n1.toDegrees(e.range[0])+90}}nodeFactory(){return new JI}getSeriesDomain(e){const{dataModel:t,processedData:i}=this;if(!i||!t)return[];if(e===GI.Angle){const e=t.getDomain(this,"angleValue-end","value",i),n=[e[0]>0?0:e[0],e[1]<0?0:e[1]];return jI(n)}return t.getDomain(this,"radiusValue","key",i)}async processData(e){const{angleKey:t,radiusKey:i,normalizedTo:n}=this.properties,r=!this.ctx.animationManager.isSkipped(),o=this.getStackId(),a=`${o}-trailing`,l=[];(0,s.vM)(n)&&l.push(UI([o,a],Math.abs(n))),r&&(this.processedData&&l.push(BI(this.id,this.processedData)),l.push(qI()));const c=this.visible?{}:{forceValue:0},h=this.axes[GI.Radius]?.scale.type,d=this.axes[GI.Angle]?.scale.type;await this.requestDataModel(e,this.data,{props:[zI(i,h,{id:"radiusValue"}),WI(t,d,{id:"angleValue-raw",invalidValue:null,...c}),...HI(t,"normal","current",{id:"angleValue-end",rangeId:"angleValue-range",invalidValue:null,groupId:o,separateNegative:!0,...c},d),...HI(t,"trailing","current",{id:"angleValue-start",invalidValue:null,groupId:a,separateNegative:!0,...c},d),...l],groupByKeys:!0,groupByData:!1}),this.animationState.transition("updateData")}didCircleChange(){const e=this.radius,t=this.centerX,i=this.centerY,n=this.circleCache;return(e!==n.r||t!==n.cx||i!==n.cy)&&(this.circleCache={r:e,cx:t,cy:i},!0)}maybeRefreshNodeData(){if(!this.didCircleChange()&&!this.nodeDataRefresh)return;const{nodeData:e=[]}=this.createNodeData()??{};this.nodeData=e,this.nodeDataRefresh=!1}getAxisInnerRadius(){const e=this.axes[GI.Radius];return e instanceof VI?this.radius*e.innerRadiusRatio:0}createNodeData(){const{processedData:e,dataModel:t}=this;if(!t||!e||"grouped"!==e.type)return;const i=this.axes[GI.Angle],n=this.axes[GI.Radius],s=i?.scale,r=n?.scale;if(!s||!r)return;const o=t.resolveKeysById(this,"radiusValue",e),a=t.resolveColumnById(this,"angleValue-start",e),l=t.resolveColumnById(this,"angleValue-end",e),c=t.resolveColumnById(this,"angleValue-raw",e),h=t.resolveProcessedDataIndexById(this,"angleValue-range");let d=0;n instanceof Ue&&(d=n.groupPaddingInner);const{groupScale:u}=this,{index:p,visibleGroupCount:g}=this.ctx.seriesStateManager.getVisiblePeerGroupIndex(this);u.domain=Array.from({length:g}).map((e,t)=>String(t)),u.range=[0,Math.abs(r.bandwidth??0)],u.paddingInner=g>1?d:0;const f=u.bandwidth>=1?u.bandwidth:u.rawBandwidth,m=i.isReversed(),v=n.isReversed(),y=v?this.radius:this.getAxisInnerRadius(),C=(v?this.getAxisInnerRadius():this.radius)+y,{angleKey:b,radiusKey:S,angleName:w,radiusName:x,label:E}=this.properties,M=(e,t,i,n)=>{const s=this.getLabelText(E,{value:t,datum:e,angleKey:b,radiusKey:S,angleName:w,radiusName:x});if(s)return{x:i,y:n,text:s,textAlign:"center",textBaseline:"middle"}},A=[],T={itemId:S,nodeData:A,labelData:A};if(!this.visible)return T;const{dataSources:D}=e,I=D.get(this.id)??[];for(const{datumIndex:i,group:n}of t.forEachGroupDatum(this,e)){const e=I[i],t=o[i];if(null==t)return;const d=c[i],g=a[i],v=l[i],y=d>=0&&!Object.is(d,-0),b=n.aggregation[h][y?1:0],S=y===m;let w=s.convert(g,{clamp:!0}),x=s.convert(v,{clamp:!0}),E=s.convert(0,{clamp:!0}),T=s.convert(b,{clamp:!0});S&&([E,T]=[T,E],[w,x]=[x,w]);const D=C-r.convert(t)+u.convert(String(p)),R=D+f,L=(D+R)/2,k=w+XI(w,x)/2,P=Math.cos(k)*L,N=Math.sin(k)*L,O=this.properties.label.enabled?M(e,d,P,N):void 0,_=new eR(w,x,D,R);A.push({series:this,datum:e,datumIndex:i,point:{x:P,y:N,size:0},midPoint:{x:P,y:N},label:O,angleValue:d,radiusValue:t,innerRadius:D,outerRadius:R,startAngle:E,endAngle:T,clipSector:_,reversed:S,index:i})}return T}update({seriesRect:e}){const t=this.checkResize(e);this.maybeRefreshNodeData(),this.contentGroup.translationX=this.centerX,this.contentGroup.translationY=this.centerY,this.highlightGroup.translationX=this.centerX,this.highlightGroup.translationY=this.centerY,this.labelGroup&&(this.labelGroup.translationX=this.centerX,this.labelGroup.translationY=this.centerY),this.updateSectorSelection(this.itemSelection,!1),this.updateSectorSelection(this.highlightSelection,!0),this.updateLabels(),t&&this.animationState.transition("resize"),this.animationState.transition("update")}getItemBaseStyle(e){const{properties:t}=this,i=e?t.highlightStyle.item:void 0;return sR({fill:i?.fill??t.fill,fillOpacity:i?.fillOpacity??t.fillOpacity,stroke:i?.stroke??t.stroke,strokeWidth:i?.strokeWidth??this.getStrokeWidth(t.strokeWidth),strokeOpacity:i?.strokeOpacity??t.strokeOpacity,lineDash:i?.lineDash??t.lineDash,lineDashOffset:i?.lineDashOffset??t.lineDashOffset,cornerRadius:t.cornerRadius},this.defaultShapeStyle,t.fillPatternDefaults,t.fillImageDefaults)}getItemStyleOverrides(e,t,i,n){const{id:s,properties:r}=this,{angleKey:o,radiusKey:a,itemStyler:l}=r;let c;return null!=l&&(c=this.cachedDatumCallback(ZI(e,n?"highlight":"node"),()=>this.callWithContext(l,{seriesId:s,datum:t,highlighted:n,angleKey:o,radiusKey:a,...i}))),sR(c,this.defaultShapeStyle,this.properties.fillPatternDefaults,this.properties.fillImageDefaults)}updateSectorSelection(e,t){let i=[];if(t){const e=this.ctx.highlightManager?.getActiveHighlight();e?.datum&&e.series===this&&i.push(e)}else i=this.nodeData;const s=this.getItemBaseStyle(t),r=this.getShapeFillBBox();e.update(i,void 0,e=>this.getDatumId(e)).each((e,i)=>{const{datum:o,datumIndex:a}=i,l=this.getItemStyleOverrides(String(a),o,s,t),c=l?.cornerRadius??s.cornerRadius,h=l?.fill??s.fill,d=n.n1.isGradientFill(h)&&"item"!==h.bounds?{centerX:0,centerY:0}:void 0;nR(e,s,l,r,d),e.lineJoin="round",e.inset=null!=e.stroke?e.strokeWidth/2:0,e.startInnerCornerRadius=o.reversed?c:0,e.startOuterCornerRadius=o.reversed?c:0,e.endInnerCornerRadius=o.reversed?0:c,e.endOuterCornerRadius=o.reversed?0:c,t&&(e.startAngle=i.startAngle,e.endAngle=i.endAngle,e.clipSector=i.clipSector,e.innerRadius=i.innerRadius,e.outerRadius=i.outerRadius)})}updateLabels(){const{label:e}=this.properties;this.labelSelection.update(this.nodeData).each((t,i)=>{e.enabled&&i.label?(t.x=i.label.x,t.y=i.label.y,t.fill=e.color,t.fontFamily=e.fontFamily,t.fontSize=e.fontSize,t.fontStyle=e.fontStyle,t.fontWeight=e.fontWeight,t.text=i.label.text,t.textAlign=i.label.textAlign,t.textBaseline=i.label.textBaseline,t.visible=!0):t.visible=!1})}getBarTransitionFunctions(){const e=this.axes[GI.Angle]?.scale;let t=0;if(!e)return _I(t);const i=Math.min(e.domain[0],e.domain[1]),n=Math.max(e.domain[0],e.domain[1]);return i<=0&&n>=0&&(t=e.convert(0)),_I(t)}animateEmptyUpdateReady(){const{labelSelection:e}=this,t=this.getBarTransitionFunctions();tR.fromToMotion(this.id,"datums",this.ctx.animationManager,[this.itemSelection],t),$I(this,"labels",this.ctx.animationManager,e)}animateClearingUpdateEmpty(){const{itemSelection:e}=this,{animationManager:t}=this.ctx,i=this.getBarTransitionFunctions();tR.fromToMotion(this.id,"datums",t,[e],i),YI(this,"labels",t,this.labelSelection)}getTooltipContent(e){const{id:t,dataModel:i,processedData:n,axes:s,properties:r}=this,{angleKey:o,angleName:a,radiusKey:l,radiusName:c,tooltip:h}=r,d=s[GI.Angle],u=s[GI.Radius];if(!(i&&n&&d&&u))return;const p=n.dataSources.get(this.id)?.[e],g=i.resolveKeysById(this,"radiusValue",n)[e],f=i.resolveColumnById(this,"angleValue-raw",n)[e];if(null==g)return;const m=this.getItemBaseStyle(!1);return Object.assign(m,this.getItemStyleOverrides(String(e),e,m,!1)),this.formatTooltipWithContext(h,{heading:u.formatDatum(g),symbol:this.legendItemSymbol(),data:[{label:a,fallbackLabel:o,value:d.formatDatum(f)}]},{seriesId:t,datum:p,title:a,angleKey:o,angleName:a,radiusKey:l,radiusName:c,...m})}pickNodeClosestDatum(e){return this.pickNodeNearestDistantObject(e,this.itemSelection.nodes())}legendItemSymbol(){const{fill:e,stroke:t,fillOpacity:i,strokeOpacity:n,strokeWidth:s,lineDash:r,lineDashOffset:o,fillPatternDefaults:a,fillImageDefaults:l}=this.properties,c=sR({fill:e??"rgba(0, 0, 0, 0)",stroke:t??"rgba(0, 0, 0, 0)",fillOpacity:i,strokeOpacity:n,strokeWidth:s,lineDash:r,lineDashOffset:o},this.defaultShapeStyle,a,l);return iR(c.fill)&&(c.fill={...c.fill,gradient:"linear",rotation:0,reverse:!1}),{marker:c}}getLegendData(e){if("category"!==e)return[];const{id:t,visible:i}=this,{angleKey:n,angleName:s,showInLegend:r}=this.properties;return[{legendType:"category",id:t,itemId:n,seriesId:t,enabled:i,label:{text:s??n},symbol:this.legendItemSymbol(),hideInLegend:!r}]}getDatumId(e){return ZI(e.radiusValue)}computeLabelsBBox(){return null}getStackId(){return`radialBar-stack-${this.seriesGrouping?.groupIndex??this.id}-xValues`}};oR.className="RadialBarSeries",oR.type="radial-bar";var{commonSeriesOptionsDefs:aR,radialBarSeriesThemeableOptionsDef:lR}=n.n1,cR={...lR,...aR,type:(0,s.mw)((0,s.dY)("radial-bar")),angleKey:(0,s.mw)(s.Yj),radiusKey:(0,s.mw)(s.Yj),angleName:s.Yj,radiusName:s.Yj,grouped:s.zM,stacked:s.zM,stackGroup:s.Yj,normalizedTo:s.ai},{ThemeConstants:{POLAR_AXIS_TYPE:hR}}=n.n1,dR={series:{fill:{$palette:"fill"},stroke:{$palette:"stroke"},fillGradientDefaults:{type:"gradient",gradient:"conic",bounds:"series",colorStops:{$palette:"gradient"},rotation:0,reverse:!1},fillPatternDefaults:n.n1.FILL_PATTERN_DEFAULTS,fillImageDefaults:n.n1.FILL_IMAGE_DEFAULTS,strokeWidth:0,label:{enabled:!1,fontSize:{$ref:"fontSize"},fontFamily:{$ref:"fontFamily"},fontWeight:{$ref:"fontWeight"},color:{$ref:"backgroundColor"}}},axes:{[hR.RADIUS_CATEGORY]:{innerRadiusRatio:.2,groupPaddingInner:.2,paddingInner:.2,paddingOuter:.1}}},{POLAR_AXIS_TYPE:uR}=n.n1.ThemeConstants,pR={type:"series",optionsKey:"series[]",packageType:"enterprise",chartTypes:["polar"],identifier:"radial-bar",moduleFactory:e=>new oR(e),tooltipDefaults:{range:"exact"},defaultAxes:[{type:uR.ANGLE_NUMBER},{type:uR.RADIUS_CATEGORY}],themeTemplate:dR,stackable:!0,groupable:!0},gR={type:"series",name:"radial-bar",chartType:"polar",enterprise:!0,options:cR,create:e=>new oR(e)},{Property:fR}=n.n1,mR=class extends yT{};a([fR],mR.prototype,"columnWidthRatio",2),a([fR],mR.prototype,"maxColumnWidthRatio",2);var{ChartAxisDirection:vR,PolarAxis:yR,RadialColumnShape:CR,getRadialColumnWidth:bR}=n.n1,SR=class extends hT{constructor(e){super(e,{animationResetFns:{item:wT}}),this.properties=new mR}getStackId(){return`radarColumn-stack-${this.seriesGrouping?.groupIndex??this.id}-yValues`}nodeFactory(){return new CR}getColumnTransitionFunctions(){return function(e){const t=bT();return{toFn:(i,n,s)=>{const{startAngle:r,endAngle:o}=t.to(n);let a,l,c,h,d;return"removed"===s?(a=i.innerRadius,l=i.innerRadius,c=i.columnWidth,h=i.axisInnerRadius,d=i.axisOuterRadius):(a=isNaN(n.innerRadius)?e:n.innerRadius,l=isNaN(n.outerRadius)?e:n.outerRadius,c=isNaN(n.columnWidth)?i.columnWidth:n.columnWidth,h=n.axisInnerRadius,d=n.axisOuterRadius),{innerRadius:a,outerRadius:l,columnWidth:c,axisInnerRadius:h,axisOuterRadius:d,startAngle:r,endAngle:o}},fromFn:(i,n,s)=>{s=ST(i,n,s),t.calculate(i,n,s);const{startAngle:r,endAngle:o}=t.from(n);let a,l,c,h,d;return"removed"===s||"updated"===s?(a=i.innerRadius,l=i.outerRadius,c=i.columnWidth,h=i.axisInnerRadius,d=i.axisOuterRadius):(a=e,l=e,c=n.columnWidth,h=n.axisInnerRadius,d=n.axisOuterRadius),{innerRadius:a,outerRadius:l,columnWidth:c,axisInnerRadius:h,axisOuterRadius:d,startAngle:r,endAngle:o,phase:CT.NODE_UPDATE_STATE_TO_PHASE_MAPPING[s]}}}}(this.isRadiusAxisReversed()?this.radius:this.getAxisInnerRadius())}isRadiusAxisCircle(){const e=this.axes[vR.Radius];return e instanceof yR&&"circle"===e.shape}updateItemPath(e,t,i){e.isBeveled=this.isRadiusAxisCircle(),e.isRadiusAxisReversed=this.isRadiusAxisReversed(),i&&(e.innerRadius=t.innerRadius,e.outerRadius=t.outerRadius,e.startAngle=t.startAngle,e.endAngle=t.endAngle,e.columnWidth=t.columnWidth,e.axisInnerRadius=t.axisInnerRadius,e.axisOuterRadius=t.axisOuterRadius)}getColumnWidth(e,t){const{columnWidthRatio:i=.5,maxColumnWidthRatio:n=.5}=this.properties;return bR(e,t,this.radius,i,n)}};SR.className="RadialColumnSeries",SR.type="radial-column";var{commonSeriesOptionsDefs:wR,radialColumnSeriesThemeableOptionsDef:xR}=n.n1,ER={...xR,...wR,type:(0,s.mw)((0,s.dY)("radial-column")),angleKey:(0,s.mw)(s.Yj),radiusKey:(0,s.mw)(s.Yj),angleName:s.Yj,radiusName:s.Yj,grouped:s.zM,stacked:s.zM,stackGroup:s.Yj,normalizedTo:s.ai},{ThemeConstants:{POLAR_AXIS_TYPE:MR,POLAR_AXIS_SHAPE:AR}}=n.n1,TR={$path:["./shape",AR.CIRCLE,{$find:[{$not:[{$isOperation:"./shape"}]},{$path:".."}]}]},DR={series:{fill:{$palette:"fill"},stroke:{$palette:"stroke"},fillGradientDefaults:{type:"gradient",gradient:"radial",bounds:"series",colorStops:{$palette:"gradient"},rotation:0,reverse:!1},fillPatternDefaults:n.n1.FILL_PATTERN_DEFAULTS,fillImageDefaults:n.n1.FILL_IMAGE_DEFAULTS,columnWidthRatio:.5,maxColumnWidthRatio:.5,strokeWidth:0,label:{enabled:!1,fontSize:{$ref:"fontSize"},fontFamily:{$ref:"fontFamily"},fontWeight:{$ref:"fontWeight"},color:{$ref:"textColor"}}},axes:{[MR.ANGLE_CATEGORY]:{shape:TR,groupPaddingInner:0,paddingInner:0,label:{spacing:10}},[MR.RADIUS_NUMBER]:{shape:TR,innerRadiusRatio:.5}}},{POLAR_AXIS_TYPE:IR}=n.n1.ThemeConstants,RR={type:"series",optionsKey:"series[]",packageType:"enterprise",chartTypes:["polar"],identifier:"radial-column",moduleFactory:e=>new SR(e),tooltipDefaults:{range:"exact"},defaultAxes:[{type:IR.ANGLE_CATEGORY},{type:IR.RADIUS_NUMBER}],themeTemplate:DR,stackable:!0,groupable:!0},LR={type:"series",name:"radial-column",chartType:"polar",enterprise:!0,options:ER,create:e=>new SR(e)},{SvgPath:kR,Rotatable:PR,Translatable:NR,Scalable:OR}=n.n1,_R=class extends(PR(OR(NR(kR)))){constructor(){super(...arguments),this.scalingCenterX=.5,this.scalingCenterY=.5,this.rotationCenterX=.5,this.rotationCenterY=.5}};_R.defaultPathData="M0.50245 0.53745C0.481767 0.53745 0.465 0.520683 0.465 0.5C0.465 0.479317 0.481767 0.46255 0.50245 0.46255L1 0.500012L0.50245 0.53745Z";var{BaseProperties:FR,SeriesTooltip:GR,SeriesProperties:VR,PropertiesArray:BR,AxisLabel:HR,Property:zR,Label:UR}=n.n1,WR=class extends UR{};a([zR],WR.prototype,"spacing",2);var jR=class extends FR{constructor(){super(...arguments),this.label=new WR}};a([zR],jR.prototype,"text",2),a([zR],jR.prototype,"value",2),a([zR],jR.prototype,"shape",2),a([zR],jR.prototype,"placement",2),a([zR],jR.prototype,"spacing",2),a([zR],jR.prototype,"size",2),a([zR],jR.prototype,"rotation",2),a([zR],jR.prototype,"fill",2),a([zR],jR.prototype,"fillOpacity",2),a([zR],jR.prototype,"stroke",2),a([zR],jR.prototype,"strokeWidth",2),a([zR],jR.prototype,"strokeOpacity",2),a([zR],jR.prototype,"lineDash",2),a([zR],jR.prototype,"lineDashOffset",2),a([zR],jR.prototype,"label",2);var KR=class extends FR{constructor(){super(...arguments),this.enabled=!0,this.fills=new BR(n.n1.StopProperties),this.fillMode="continuous",this.fillOpacity=1,this.stroke="black",this.strokeWidth=0,this.strokeOpacity=1,this.lineDash=[0],this.lineDashOffset=0}};a([zR],KR.prototype,"enabled",2),a([zR],KR.prototype,"fills",2),a([zR],KR.prototype,"fillMode",2),a([zR],KR.prototype,"fill",2),a([zR],KR.prototype,"fillOpacity",2),a([zR],KR.prototype,"stroke",2),a([zR],KR.prototype,"strokeWidth",2),a([zR],KR.prototype,"strokeOpacity",2),a([zR],KR.prototype,"lineDash",2),a([zR],KR.prototype,"lineDashOffset",2);var $R=class extends FR{constructor(){super(...arguments),this.values=void 0,this.step=void 0,this.minSpacing=0,this.maxSpacing=1e3}};a([zR],$R.prototype,"values",2),a([zR],$R.prototype,"step",2),a([zR],$R.prototype,"minSpacing",2),a([zR],$R.prototype,"maxSpacing",2);var YR=class extends HR{},qR=class extends FR{constructor(){super(...arguments),this.min=0,this.max=1,this.fills=new BR(n.n1.StopProperties),this.fillMode="continuous",this.fillOpacity=1,this.stroke="black",this.strokeWidth=0,this.strokeOpacity=1,this.lineDash=[0],this.lineDashOffset=0,this.defaultFill="black",this.interval=new $R,this.label=new YR}};a([zR],qR.prototype,"min",2),a([zR],qR.prototype,"max",2),a([zR],qR.prototype,"fills",2),a([zR],qR.prototype,"fillMode",2),a([zR],qR.prototype,"fill",2),a([zR],qR.prototype,"fillOpacity",2),a([zR],qR.prototype,"stroke",2),a([zR],qR.prototype,"strokeWidth",2),a([zR],qR.prototype,"strokeOpacity",2),a([zR],qR.prototype,"lineDash",2),a([zR],qR.prototype,"lineDashOffset",2),a([zR],qR.prototype,"defaultFill",2),a([zR],qR.prototype,"interval",2),a([zR],qR.prototype,"label",2);var XR=class extends FR{constructor(){super(...arguments),this.enabled=!0,this.spacing=0,this.fill="black",this.fillOpacity=1,this.stroke="black",this.strokeWidth=0,this.strokeOpacity=1,this.lineDash=[0],this.lineDashOffset=0}};a([zR],XR.prototype,"enabled",2),a([zR],XR.prototype,"radiusRatio",2),a([zR],XR.prototype,"spacing",2),a([zR],XR.prototype,"fill",2),a([zR],XR.prototype,"fillOpacity",2),a([zR],XR.prototype,"stroke",2),a([zR],XR.prototype,"strokeWidth",2),a([zR],XR.prototype,"strokeOpacity",2),a([zR],XR.prototype,"lineDash",2),a([zR],XR.prototype,"lineDashOffset",2);var ZR=class extends cm{};a([zR],ZR.prototype,"text",2);var QR=class extends hm{};a([zR],QR.prototype,"text",2);var JR=class extends VR{constructor(){super(...arguments),this.startAngle=0,this.endAngle=0,this.segmentation=new tx,this.defaultColorRange=[],this.targets=new BR(jR),this.defaultTarget=new jR,this.outerRadiusRatio=1,this.innerRadiusRatio=1,this.cornerRadius=0,this.cornerMode="container",this.spacing=0,this.scale=new qR,this.bar=new KR,this.needle=new XR,this.label=new ZR,this.secondaryLabel=new QR,this.tooltip=new GR}};a([zR],JR.prototype,"value",2),a([zR],JR.prototype,"startAngle",2),a([zR],JR.prototype,"endAngle",2),a([zR],JR.prototype,"segmentation",2),a([zR],JR.prototype,"defaultColorRange",2),a([zR],JR.prototype,"targets",2),a([zR],JR.prototype,"defaultTarget",2),a([zR],JR.prototype,"outerRadiusRatio",2),a([zR],JR.prototype,"innerRadiusRatio",2),a([zR],JR.prototype,"outerRadius",2),a([zR],JR.prototype,"innerRadius",2),a([zR],JR.prototype,"cornerRadius",2),a([zR],JR.prototype,"cornerMode",2),a([zR],JR.prototype,"spacing",2),a([zR],JR.prototype,"scale",2),a([zR],JR.prototype,"bar",2),a([zR],JR.prototype,"needle",2),a([zR],JR.prototype,"label",2),a([zR],JR.prototype,"secondaryLabel",2),a([zR],JR.prototype,"tooltip",2);var{SectorBox:eL}=n.n1;function tL(e,t,i){return Math.max(e,i.startAngle)<=Math.min(t,i.endAngle)}function iL(e){return null!=e.clipStartAngle&&null!=e.clipEndAngle}function nL(e,t){const{clipStartAngle:i,clipEndAngle:n,innerRadius:s,outerRadius:r}=e;return new eL(i,t?i:n,s,r)}function sL(e,t){const i=e?"initial":"update";return{node:{fromFn(t,n){const s=t.previousDatum;let{startAngle:r,endAngle:o}=s??n;const a=null!=s&&iL(s)?nL(s,e):void 0,l=iL(n)?nL(n,e):void 0;let c;return null!=a&&null!=l?c=a:null==a&&null!=l?(c=l,r=n.startAngle,o=n.endAngle):null!=a&&null==l?(c=void 0,r=n.startAngle,o=n.endAngle):e&&(o=r),{startAngle:r,endAngle:o,clipSector:c,phase:i}},toFn(e,t){const{startAngle:i,endAngle:n}=t;let s;return iL(t)&&(s=nL(t,!1)),{startAngle:i,endAngle:n,clipSector:s}},applyFn(e,t){const{startAngle:i,endAngle:n}=t;let{clipSector:s}=t;null!=s&&(s=new eL(Math.max(i,s.startAngle),Math.min(n,s.endAngle),s.innerRadius,s.outerRadius));const r=null==s||tL(i,n,s);e.startAngle=i,e.endAngle=n,e.clipSector=s,e.visible=r}},needle:{fromFn(n){let{angle:s}=n.previousDatum??n.datum;return e&&(s=t),{rotation:s,phase:i}},toFn(e,t){const{angle:i}=t;return{rotation:i}}}}}function rL(e,t){const{startAngle:i,endAngle:n}=t,s=function(e){const{startAngle:t,endAngle:i,clipStartAngle:n,clipEndAngle:s,innerRadius:r,outerRadius:o}=e;if(null!=n&&null!=s)return new eL(Math.max(n,t),Math.min(s,i),r,o)}(t);return{startAngle:i,endAngle:n,clipSector:s,visible:null==s||tL(i,n,s)}}function oL(e,t){const{angle:i}=t;return{rotation:i}}var aL={top:0,middle:.5,bottom:1},{fromToMotion:lL,resetMotion:cL,CachedTextMeasurerPool:hL,SeriesNodePickMode:dL,StateMachine:uL,createDatumId:pL,normalizeAngle360:gL,normalizeAngle360Inclusive:fL,isBetweenAngles:mL,sectorBox:vL,toDegrees:yL,toRadians:CL,BBox:bL,Group:SL,PointerEvents:wL,Selection:xL,Sector:EL,SectorBox:ML,Text:AL,Marker:TL,getColorStops:DL}=n.n1,IL={inside:90,middle:0,outside:-90},RL=[{textAlign:"left",textBaseline:"top"},{textAlign:"right",textBaseline:"top"},{textAlign:"right",textBaseline:"bottom"},{textAlign:"left",textBaseline:"bottom"}],LL=[{textAlign:"right",textBaseline:"bottom"},{textAlign:"left",textBaseline:"bottom"},{textAlign:"left",textBaseline:"top"},{textAlign:"right",textBaseline:"top"}],kL=class extends n.n1.Series{constructor(e){super({moduleCtx:e,useLabelLayer:!0,pickModes:[dL.EXACT_SHAPE_MATCH,dL.NEAREST_NODE]}),this.centerX=0,this.centerY=0,this.radius=0,this.textAlign="center",this.verticalAlign="middle",this.properties=new JR,this.scale=new ie,this.scaleGroup=this.contentGroup.appendChild(new SL({name:"scaleGroup"})),this.itemGroup=this.contentGroup.appendChild(new SL({name:"itemGroup"})),this.itemNeedleGroup=this.contentGroup.appendChild(new SL({name:"itemNeedleGroup"})),this.itemTargetGroup=this.contentGroup.appendChild(new SL({name:"itemTargetGroup"})),this.itemTargetLabelGroup=this.contentGroup.appendChild(new SL({name:"itemTargetLabelGroup"})),this.itemLabelGroup=this.contentGroup.appendChild(new SL({name:"itemLabelGroup"})),this.highlightTargetGroup=this.highlightGroup.appendChild(new SL({name:"itemTargetLabelGroup"})),this.tickGroup=this.contentGroup.appendChild(new SL({name:"tickGroup"})),this.scaleSelection=xL.select(this.scaleGroup,()=>this.nodeFactory()),this.datumSelection=xL.select(this.itemGroup,()=>this.nodeFactory()),this.needleSelection=xL.select(this.itemNeedleGroup,_R),this.targetSelection=xL.select(this.itemTargetGroup,()=>this.markerFactory()),this.targetLabelSelection=xL.select(this.itemTargetLabelGroup,AL),this.labelSelection=xL.select(this.itemLabelGroup,AL),this.highlightTargetSelection=xL.select(this.highlightTargetGroup,()=>this.markerFactory()),this.tickSelection=xL.select(this.tickGroup,n.n1.TransformableText),this.datumUnion=new Ww,this.animationState=new uL("empty",{empty:{update:{target:"ready",action:()=>this.animateEmptyUpdateReady()},reset:"empty",skip:"ready"},ready:{updateData:"waiting",clear:"clearing",resize:()=>this.animateReadyResize(),reset:"empty",skip:"ready"},waiting:{update:{target:"ready",action:()=>this.animateWaitingUpdateReady()},reset:"empty",skip:"ready"},clearing:{update:{target:"empty"},reset:"empty",skip:"ready"}}),this.scaleGroup.pointerEvents=wL.None,this.tickGroup.pointerEvents=wL.None,this.itemNeedleGroup.pointerEvents=wL.None,this.itemLabelGroup.pointerEvents=wL.None}get hasData(){return null!=this.properties.value}nodeFactory(){return new EL}markerFactory(){const e=new TL;return e.size=1,e}processData(){this.nodeDataRefresh=!0,this.animationState.transition("updateData")}formatLabel(e){const{min:t,max:i}=this.properties.scale;return Kw(e,{min:t,max:i})}layoutScale(){const{scale:e,properties:t}=this,{seriesRectWidth:i,seriesRectHeight:n}=this.nodeDataDependencies,{scale:r,outerRadius:o}=this.properties,{min:a,max:l,label:c,interval:h}=r,d=CL(t.startAngle-90),u=CL(t.endAngle-90),p=fL(u-d)>Math.PI,g=p||mL(1.5*Math.PI,d,u),f=p||mL(0*Math.PI,d,u),m=p||mL(.5*Math.PI,d,u),v=p||mL(1*Math.PI,d,u);let y,C;y=v&&!f?"right":!v&&f?"left":"center",C=g&&!m?"bottom":!g&&m?"top":"middle";const b=vL({startAngle:d,endAngle:u,innerRadius:0,outerRadius:.5}),S=2*-(b.x+b.width/2),w=2*-(b.y+b.height/2),x=Math.min(i/b.width,n/b.height);e.domain=[a,l],e.range=[d,u],e.arcLength=x/2;const{maxSpacing:E,minSpacing:M}=h,{arcLength:A}=e,T=E?Math.floor(A/E):1,D=M?Math.floor(A/M):1/0,I=Math.floor(4/Math.PI*Math.abs(e.range[0]-e.range[1])),R=Math.max(T,Math.min(D,I)),L=h.values??e.ticks({nice:!1,interval:h.step,minTickCount:T,maxTickCount:D,tickCount:R})?.ticks??[],k=L.reduce((e,t)=>Math.max(e,"number"==typeof t?(0,s.o3)(t):0),0),P=e.tickFormatter({domain:e.domain,ticks:L,fractionDigits:k,specifier:"string"==typeof c.format?c.format:void 0}),N=c.getFont(),O=L.map((t,i)=>{let n;c.formatter&&(n=Yw(this.ctx,c.formatter,{value:t,index:i,domain:e.domain,boundSeries:void 0})),void 0===n&&(n=P(t));const{width:s,height:r}=hL.measureText(n,{font:N});return{index:i,value:t,text:n,width:s,height:r}}),_=O.reduce((e,t)=>Math.max(e,t.width),0),F=O.reduce((e,t)=>Math.max(e,t.height),0),G=c.enabled?Math.max(_,F)+c.spacing:0,V=Math.max(.5*x-G,0),B=o??V;return this.centerX=i/2+S*B,this.centerY=n/2+w*B,this.radius=B,this.textAlign=y,this.verticalAlign=C,O}createConicGradient(e,t){const{scale:i}=this,{domain:n,range:s}=i,[r,o]=s,{defaultColorRange:a}=this.properties,l=gL((r+o)/2+Math.PI),c=fL(o-r);return{type:"gradient",gradient:"conic",colorSpace:"oklch",colorStops:DL(e,a,n,t).map(({color:e,stop:t})=>(t=Math.min(Math.max(t,0),1),{stop:t=((t=(r+c*t-l)/(2*Math.PI))%1+1)%1,color:e})),rotation:yL(l)+90}}getShapeFillBBox(){const{centerX:e,centerY:t,radius:i}=this;return new bL(e-i,t-i,2*i,2*i)}getTargets(){const{properties:e}=this,t=e.defaultTarget;return Array.from(e.targets).map(e=>{const{text:i=t.text,value:n=t.value??0,shape:s=t.shape??"triangle",rotation:r=t.rotation??0,strokeWidth:o=t.strokeWidth??0,placement:a=t.placement??"middle",spacing:l=t.spacing??0,size:c=t.size??0,fill:h=t.fill??"black",fillOpacity:d=t.fillOpacity??1,stroke:u=t.stroke??"black",strokeOpacity:p=t.strokeOpacity??1,lineDash:g=t.lineDash??[0],lineDashOffset:f=t.lineDashOffset??0}=e,{enabled:m=t.label.enabled,color:v=t.label.color??"black",fontStyle:y=t.label.fontStyle??"normal",fontWeight:C=t.label.fontWeight??"normal",fontSize:b=t.label.fontSize,fontFamily:S=t.label.fontFamily,spacing:w=t.label.spacing??0}=e.label;return{text:i,value:n,shape:s,placement:a,spacing:l,size:c,rotation:r,fill:h,fillOpacity:d,stroke:u,strokeWidth:o,strokeOpacity:p,lineDash:g,lineDashOffset:f,label:{enabled:m,color:v,fontStyle:y,fontWeight:C,fontSize:b,fontFamily:S,spacing:w}}})}getTargetRadius(e){const{radius:t,properties:i}=this,{innerRadiusRatio:n,outerRadiusRatio:s}=i,{placement:r,spacing:o,size:a}=e,l=t*s,c=t*n;switch(r){case"inside":return Math.max(c-o-a/2,0);case"outside":return l+o+a/2;default:return(c+l)/2}}getTargetLabel(e){const{scale:t}=this,{value:i,size:n,placement:s,label:r}=e,{spacing:o,color:a,fontStyle:l,fontWeight:c,fontSize:h,fontFamily:d}=r,u=t.convert(i),p=gL(u)/(Math.PI/2)|0,g=n/2+o;let f,m,v,y;switch(s){case"outside":({textAlign:f,textBaseline:m}=RL[p]),v=g*Math.cos(u),y=g*Math.sin(u);break;case"inside":({textAlign:f,textBaseline:m}=LL[p]),v=-g*Math.cos(u),y=-g*Math.sin(u);break;default:f="center",m="bottom",v=0,y=-g}return{offsetX:v,offsetY:y,fill:a,textAlign:f,textBaseline:m,fontStyle:l,fontWeight:c,fontSize:h,fontFamily:d,lineHeight:void 0}}createNodeData(){const e=this.layoutScale(),{id:t,scale:i,properties:n,radius:s,centerX:r,centerY:o}=this,{value:a,innerRadiusRatio:l,outerRadiusRatio:c,segmentation:h,cornerRadius:d,cornerMode:u,needle:p,bar:g,scale:f,label:m,secondaryLabel:v}=n,{outerRadius:y=s*c,innerRadius:C=s*l}=n,b=this.getTargets(),S=[],w=[],x=[],E=[],M=[],A="item"===u,T=i.convert(i.domain[0]),D=i.convert(a),I=Math.ceil(fL(D-T)*s);let R=h.enabled?h.interval.getSegments(i,I):void 0;const L=g.enabled?g.fill??this.createConicGradient(g.fills,g.fillMode):"rgba(0,0,0,0)",k=f.fill??(g.enabled&&0===f.fills.length?f.defaultFill:void 0)??this.createConicGradient(f.fills,f.fillMode);if(null==R&&A){const e={value:a,segmentStart:Math.min(...i.domain),segmentEnd:Math.max(...i.domain)},t=Math.min(d,(y-C)/2)/((C+y)/2);S.push({series:this,itemId:"value",datum:e,datumIndex:{type:0},type:0,centerX:r,centerY:o,outerRadius:y,innerRadius:C,startAngle:T-t,endAngle:D+t,clipStartAngle:void 0,clipEndAngle:void 0,startCornerRadius:d,endCornerRadius:d,fill:L}),M.push({series:this,itemId:"scale",datum:e,datumIndex:{type:0},type:0,centerX:r,centerY:o,outerRadius:y,innerRadius:C,startAngle:i.range[0]-t,endAngle:i.range[1]+t,clipStartAngle:void 0,clipEndAngle:void 0,startCornerRadius:d,endCornerRadius:d,fill:k})}else{R??(R=i.domain);for(let e=0;e<R.length-1;e++){const t=R[e],n=R[e+1],s={value:a,segmentStart:t,segmentEnd:n},l=0===e,c=e===R.length-2,h=i.convert(t),u=i.convert(n);S.push({series:this,itemId:`value-${e}`,datum:s,datumIndex:{type:0},type:0,centerX:r,centerY:o,outerRadius:y,innerRadius:C,startAngle:h,endAngle:u,clipStartAngle:T,clipEndAngle:D,startCornerRadius:A||l?d:0,endCornerRadius:A||c?d:0,fill:L}),M.push({series:this,itemId:`scale-${e}`,datum:s,datumIndex:{type:0},type:0,centerX:r,centerY:o,outerRadius:y,innerRadius:C,startAngle:h,endAngle:u,clipStartAngle:void 0,clipEndAngle:void 0,startCornerRadius:A||l?d:0,endCornerRadius:A||c?d:0,fill:k})}}if(!p.enabled&&m.enabled){const{text:e,color:t,fontSize:i,minimumFontSize:n,fontStyle:s,fontWeight:l,fontFamily:c,lineHeight:h,formatter:d=e=>this.formatLabel(e.value)}=m;E.push({label:"primary",centerX:r,centerY:o,text:e,value:a,fill:t,fontSize:i,minimumFontSize:n,fontStyle:s,fontWeight:l,fontFamily:c,lineHeight:h,formatter:d})}if(!p.enabled&&v.enabled){const{text:e,color:t,fontSize:i,minimumFontSize:n,fontStyle:s,fontWeight:l,fontFamily:c,lineHeight:h,formatter:d}=v;E.push({label:"secondary",centerX:r,centerY:o,text:e,value:a,fill:t,fontSize:i,minimumFontSize:n,fontStyle:s,fontWeight:l,fontFamily:c,lineHeight:h,formatter:d})}if(p.enabled){let e=null!=p.radiusRatio?s*p.radiusRatio:C;e=Math.max(e-p.spacing,0);const t=i.convert(a);x.push({centerX:r,centerY:o,radius:e,angle:t,series:this})}for(let e=0;e<b.length;e+=1){const t=b[e],{value:n,text:s,size:a,shape:l,fill:c,fillOpacity:h,stroke:d,strokeWidth:u,strokeOpacity:p,lineDash:g,lineDashOffset:f}=t;if(n<Math.min(...i.domain)||n>Math.max(...i.domain))continue;const m=this.getTargetRadius(t),v=i.convert(n),y=CL(t.rotation+IL[t.placement]);w.push({series:this,itemId:`target-${e}`,midPoint:{x:m*Math.cos(v)+r,y:m*Math.sin(v)+o},datum:{value:n},datumIndex:{type:1,index:e},type:1,value:n,text:s,centerX:r,centerY:o,shape:l,radius:m,angle:v,rotation:y,size:a,fill:c,fillOpacity:h,stroke:d,strokeOpacity:p,strokeWidth:u,lineDash:g,lineDashOffset:f,label:this.getTargetLabel(t)})}return{itemId:t,nodeData:S,needleData:x,targetData:w,labelData:E,scaleData:M,tickData:e}}updateSelections(e){(this.nodeDataRefresh||e)&&(this.contextNodeData=this.createNodeData(),this.nodeDataRefresh=!1)}highlightDatum(e){if(null!=e&&e.series===this&&1===e.type)return e}update({seriesRect:e}){const{datumSelection:t,labelSelection:i,needleSelection:n,targetSelection:s,targetLabelSelection:r,scaleSelection:o,highlightTargetSelection:a,tickSelection:l}=this,c=this.checkResize(e);this.updateSelections(c),this.contentGroup.visible=this.visible,this.contentGroup.opacity=this.getOpacity();const h=this.contextNodeData?.nodeData??[],d=this.contextNodeData?.labelData??[],u=this.contextNodeData?.needleData??[],p=this.contextNodeData?.targetData??[],g=this.contextNodeData?.scaleData??[],f=this.contextNodeData?.tickData??[],m=this.highlightDatum(this.ctx.highlightManager.getActiveHighlight());this.scaleSelection=this.updateScaleSelection({scaleData:g,scaleSelection:o}),this.updateScaleNodes({scaleSelection:o}),this.needleSelection=this.updateNeedleSelection({needleData:u,needleSelection:n}),this.updateNeedleNodes({needleSelection:n}),this.targetSelection=this.updateTargetSelection({targetData:p,targetSelection:s}),this.updateTargetNodes({targetSelection:s,isHighlight:!1}),this.targetLabelSelection=this.updateTargetLabelSelection({targetData:p,targetLabelSelection:r}),this.updateTargetLabelNodes({targetLabelSelection:r}),this.datumSelection=this.updateDatumSelection({nodeData:h,datumSelection:t}),this.updateDatumNodes({datumSelection:t}),this.labelSelection=this.updateLabelSelection({labelData:d,labelSelection:i}),this.updateLabelNodes({labelSelection:i}),this.highlightTargetSelection=this.updateTargetSelection({targetData:null!=m?[m]:[],targetSelection:a}),this.updateTargetNodes({targetSelection:a,isHighlight:!0}),this.tickSelection=this.updateTickSelection({tickData:f,tickSelection:l}),this.updateTickNodes({tickSelection:l}),c&&this.animationState.transition("resize"),this.animationState.transition("update")}updateDatumSelection(e){return e.datumSelection.update(e.nodeData,void 0,t=>pL(e.nodeData.length,t.itemId))}updateDatumNodes(e){const{datumSelection:t}=e,{ctx:i,properties:s}=this,{bar:r,segmentation:o}=s,a=o.spacing??0,{fillOpacity:l,stroke:c,strokeOpacity:h,lineDash:d,lineDashOffset:u}=r,p=this.getStrokeWidth(r.strokeWidth),g=i.animationManager.isSkipped(),f=this.getShapeFillBBox();t.each((e,t)=>{const{centerX:i,centerY:s,innerRadius:r,outerRadius:o,startCornerRadius:m,endCornerRadius:v,fill:y}=t;e.centerX=i,e.centerY=s,e.innerRadius=r,e.outerRadius=o,e.pointerEvents=this.properties.bar.enabled?n.n1.PointerEvents.All:n.n1.PointerEvents.None,e.fill=y,e.fillBBox=f,e.fillOpacity=l,e.stroke=c,e.strokeOpacity=h,e.strokeWidth=p,e.lineDash=d,e.lineDashOffset=u,e.startOuterCornerRadius=m,e.startInnerCornerRadius=m,e.endOuterCornerRadius=v,e.endInnerCornerRadius=v,e.radialEdgeInset=(a+e.strokeWidth)/2,e.concentricEdgeInset=e.strokeWidth/2,(g||null==e.previousDatum)&&e.setProperties(rL(0,t))}),this.datumUnion.update(t,this.itemGroup,n.n1.Sector,(e,t,i)=>{e.clipSector??(e.clipSector=new ML(NaN,NaN,NaN,NaN)),e.centerX=t.centerX,e.centerY=t.centerY,e.outerRadius=e.clipSector.outerRadius=t.outerRadius,e.innerRadius=e.clipSector.innerRadius=t.innerRadius,e.startAngle=e.clipSector.startAngle=t.startAngle,e.startInnerCornerRadius=t.startInnerCornerRadius,e.startOuterCornerRadius=t.startOuterCornerRadius,e.endAngle=i.endAngle,e.clipSector.endAngle=i.clipSector?.endAngle??i.endAngle,e.endInnerCornerRadius=i.endInnerCornerRadius,e.endOuterCornerRadius=i.endOuterCornerRadius,e.pointerEvents=n.n1.PointerEvents.None})}updateScaleSelection(e){return e.scaleSelection.update(e.scaleData,void 0,t=>pL(e.scaleData.length,t.itemId))}updateScaleNodes(e){const{scaleSelection:t}=e,{scale:i,segmentation:n}=this.properties,s=n.spacing??0,{fillOpacity:r,stroke:o,strokeOpacity:a,strokeWidth:l,lineDash:c,lineDashOffset:h}=i,d=this.getShapeFillBBox();t.each((e,t)=>{const{centerX:i,centerY:n,innerRadius:u,outerRadius:p,startCornerRadius:g,endCornerRadius:f,fill:m}=t;e.centerX=i,e.centerY=n,e.innerRadius=u,e.outerRadius=p,e.fill=m,e.fillBBox=d,e.fillOpacity=r,e.stroke=o,e.strokeOpacity=a,e.strokeWidth=l,e.lineDash=c,e.lineDashOffset=h,e.startOuterCornerRadius=g,e.startInnerCornerRadius=g,e.endOuterCornerRadius=f,e.endInnerCornerRadius=f,e.radialEdgeInset=(s+e.strokeWidth)/2,e.concentricEdgeInset=e.strokeWidth/2,e.setProperties(rL(0,t))})}updateNeedleSelection(e){return e.needleSelection.update(e.needleData,void 0,()=>pL([]))}updateNeedleNodes(e){const{needleSelection:t}=e,{fill:i,fillOpacity:n,stroke:s,strokeOpacity:r,strokeWidth:o,lineDash:a,lineDashOffset:l}=this.properties.needle,c=this.ctx.animationManager.isSkipped();t.each((e,t)=>{const{centerX:h,centerY:d,radius:u}=t,p=2*u;e.d=_R.defaultPathData,e.fill=i,e.fillOpacity=n,e.stroke=s,e.strokeOpacity=r,e.strokeWidth=o/p,e.lineDash=a.map(e=>e/p),e.lineDashOffset=l/p,e.translationX=h,e.translationY=d,e.scalingX=p,e.scalingY=p,c&&e.setProperties(oL(0,t))})}updateTargetSelection(e){return e.targetSelection.update(e.targetData,void 0,e=>e.itemId)}updateTargetNodes(e){const{targetSelection:t,isHighlight:i}=e,n=i?this.properties.highlightStyle.item:void 0;t.each((e,t)=>{const{centerX:i,centerY:s,angle:r,radius:o,shape:a,size:l,rotation:c,fill:h,fillOpacity:d,stroke:u,strokeOpacity:p,strokeWidth:g,lineDash:f,lineDashOffset:m}=t;e.shape="line"===a?qw:a,e.size=l,e.fill=n?.fill??h,e.fillOpacity=n?.fillOpacity??d,e.stroke=n?.stroke??u,e.strokeOpacity=n?.strokeOpacity??p,e.strokeWidth=n?.strokeWidth??g,e.lineDash=n?.lineDash??f,e.lineDashOffset=n?.lineDashOffset??m,e.translationX=i+o*Math.cos(r),e.translationY=s+o*Math.sin(r),e.rotation=r+c})}updateTargetLabelSelection(e){return e.targetLabelSelection.update(e.targetData,void 0,e=>e.itemId)}updateTargetLabelNodes(e){const{targetLabelSelection:t}=e;t.each((e,t)=>{const{centerX:i,centerY:n,radius:s,angle:r,text:o}=t,{offsetX:a,offsetY:l,fill:c,fontStyle:h,fontWeight:d,fontSize:u,fontFamily:p,textAlign:g,textBaseline:f}=t.label;null!=o?(e.visible=!0,e.x=i+s*Math.cos(r)+a,e.y=n+s*Math.sin(r)+l,e.text=o,e.fill=c,e.fontStyle=h,e.fontWeight=d,e.fontSize=u,e.fontFamily=p,e.textAlign=g,e.textBaseline=f):e.visible=!1})}updateLabelSelection(e){return e.labelSelection.update(e.labelData,void 0,e=>e.label)}updateLabelNodes(e){const{labelSelection:t}=e,i=this.ctx.animationManager.isSkipped();t.each((e,t)=>{e.fill=t.fill,e.fontStyle=t.fontStyle,e.fontWeight=t.fontWeight,e.fontFamily=t.fontFamily}),(i||this.labelsHaveExplicitText())&&this.formatLabelText()}updateTickSelection(e){return e.tickSelection.update(e.tickData,void 0,e=>e.index)}updateTickNodes(e){const{scale:t,radius:i,centerX:n,centerY:s,properties:r}=this,{enabled:o,color:a,fontFamily:l,fontSize:c,fontStyle:h,fontWeight:d,spacing:u}=r.scale.label,p=CL(r.scale.label.rotation??0);e.tickSelection.each((e,r)=>{if(!o)return void(e.visible=!1);e.visible=!0,e.text=r.text,e.fill=a,e.fontFamily=l,e.fontSize=c,e.fontStyle=h,e.fontWeight=d,e.textAlign="center",e.textBaseline="middle";const g=t.convert(r.value),{width:f,height:m}=r,v=Math.abs(i*Math.cos(g)),y=Math.abs(i*Math.sin(g)),C=Math.min(Math.max(Math.abs(i/Math.tan(g)),v-f/2),v+f/2),b=Math.min(Math.max(Math.abs(i*Math.tan(g)),y-m/2),y+m/2),S=Math.hypot(C,b),w=n+(S+u)*Math.cos(g),x=s+(S+u)*Math.sin(g);e.x=w,e.y=x,e.rotationCenterX=w,e.rotationCenterY=x,e.rotation=p})}labelsHaveExplicitText(){for(const{datum:e}of this.labelSelection)if(null==e.text)return!1;return!0}formatLabelText(e){const{labelSelection:t,radius:i,textAlign:n,verticalAlign:s}=this,{spacing:r,innerRadiusRatio:o}=this.properties;!function(e,t,i,n,s,r){const{padding:o,textAlign:a,verticalAlign:l}=n;let c,h;if(i.each((e,t)=>{"primary"===t.label?c=t:"secondary"===t.label&&(h=t)}),null==c)return;const d=$w(e.id,t,c,r?.label);if(null==d)return;const u=null!=h?$w(e.id,t,h,r?.secondaryLabel):void 0,p={padding:o},g="center"===a?2:1,f="middle"===l?2:1,m=e=>({width:Math.sqrt(Math.max(s**2-(e/f)**2,0))*g,height:Math.min(e,f*s),meta:null});let v,y,C;if(null!=h&&null!=u){const e=im(d,c,u,h,p,m);v=e?.label,y=e?.secondaryLabel,C=e?.height??0}else{const e=nm(d,c,p,m);v=e?.[0],y=void 0,C=e?.[0].height??0}const b=C*aL[l];i.each((e,t)=>{let i;if("primary"===t.label?i=v:"secondary"===t.label&&(i=y),null==i)return void(e.visible=!1);e.visible=!0,e.text=i.text,e.fontSize=i.fontSize,e.lineHeight=i.lineHeight,e.textAlign=a,e.textBaseline="middle";const n="primary"===t.label?i.height/2:C-i.height/2;e.y=t.centerY+n-b,e.x=t.centerX})}(this,this.ctx,t,{padding:r,textAlign:n,verticalAlign:s},i*o,e)}resetAllAnimation(){this.ctx.animationManager.stopByAnimationGroupId(this.id),cL([this.datumSelection],rL),cL([this.needleSelection],oL),this.formatLabelText()}resetAnimation(e){"initial"===e?this.animationState.transition("reset"):"ready"===e&&this.animationState.transition("skip")}animateLabelText(e={}){const{animationManager:t}=this.ctx;let i,n,s,r;if(this.labelSelection.each((t,o)=>{t.opacity=1,"primary"===o.label?(i=t.previousDatum?.value??e.from??o.value,n=o.value):"secondary"===o.label&&(s=t.previousDatum?.value??e.from??o.value,r=o.value)}),this.labelsHaveExplicitText());else if(null==n||null==r)this.formatLabelText();else if(i===n&&s===r)this.formatLabelText({label:n,secondaryLabel:r});else{const o=`${this.id}_labels`;t.animate({id:o,groupId:"label",from:{label:i,secondaryLabel:s},to:{label:n,secondaryLabel:r},phase:e.phase??"update",onUpdate:e=>this.formatLabelText(e)})}}animateEmptyUpdateReady(){const{animationManager:e}=this.ctx,{node:t,needle:i}=sL(!0,this.scale.range[0]);lL(this.id,"node",e,[this.datumSelection],t,(e,t)=>t.itemId),lL(this.id,"needle",e,[this.needleSelection],i,()=>"needle"),lL(this.id,"label",e,[this.labelSelection],jw,(e,t)=>t.label),this.animateLabelText({from:this.properties.scale.min,phase:"initial"})}animateWaitingUpdateReady(){const{animationManager:e}=this.ctx,{node:t,needle:i}=sL(!1,this.scale.range[0]);lL(this.id,"node",e,[this.datumSelection],t,(e,t)=>t.itemId),lL(this.id,"needle",e,[this.needleSelection],i,()=>"needle"),this.animateLabelText()}animateReadyResize(){this.resetAllAnimation()}getSeriesDomain(){return[NaN,NaN]}getSeriesRange(e,t){return[NaN,NaN]}getLegendData(){return[]}getTooltipContent(e){const{id:t,properties:i}=this,{tooltip:n}=i;let s,r;if(0===e.type?(s=i.value,r=i.label.text):({value:s,text:r}=i.targets[e.index]),null!=s)return this.formatTooltipWithContext(n,{data:[{label:r,fallbackLabel:"Value",value:this.formatLabel(s)}]},{seriesId:t,title:void 0,datum:void 0,value:s})}pickNodeClosestDatum(e){return Xw(this,e)}pickFocus(e){return Zw(this,e)}getCaptionText(){const{value:e}=this.properties,t=[];return t.push(this.formatLabel(e)),this.labelSelection.each((e,i)=>{const n=$w(this.id,this.ctx,i);null!=n&&t.push(n)}),t.join(". ")}getCategoryValue(e){}datumIndexForCategoryValue(e){}};kL.className="RadialGaugeSeries",kL.type="radial-gauge";var{FONT_SIZE_RATIO:PL}=n.n1,NL={type:"series",optionsKey:"series[]",packageType:"enterprise",chartTypes:["gauge"],identifier:"radial-gauge",moduleFactory:e=>new kL(e),tooltipDefaults:{range:10},themeTemplate:{minWidth:200,minHeight:200,tooltip:{enabled:!1},series:{outerRadiusRatio:1,innerRadiusRatio:.8,startAngle:270,endAngle:450,defaultColorRange:{$if:[{$eq:[{$palette:"type"},"inbuilt"]},{$interpolate:[{$palette:"secondDivergingColors"},5]},n.n1.SAFE_RANGE2_OPERATION]},scale:{defaultFill:{$path:["./1",{$palette:"fill"},{$palette:"hierarchyColors"}]},stroke:{$path:["./2",n.n1.SAFE_STROKE_FILL_OPERATION,{$palette:"hierarchyColors"}]},label:{fontWeight:{$ref:"fontWeight"},fontSize:{$ref:"fontSize"},fontFamily:{$ref:"fontFamily"},color:{$ref:"textColor"},spacing:12}},bar:{strokeWidth:0},segmentation:{enabled:!1,interval:{},spacing:2},defaultTarget:{fill:{$ref:"foregroundColor"},stroke:{$ref:"foregroundColor"},size:10,shape:"triangle",placement:"outside",spacing:5,label:{enabled:!0,fontWeight:{$ref:"fontWeight"},fontSize:{$ref:"fontSize"},fontFamily:{$ref:"fontFamily"},color:{$ref:"textColor"},spacing:5}},needle:{enabled:!1,fill:{$ref:"foregroundColor"},spacing:10},label:{enabled:!0,fontWeight:{$ref:"fontWeight"},fontSize:56,minimumFontSize:18/56,fontFamily:{$ref:"fontFamily"},color:{$ref:"textColor"}},secondaryLabel:{enabled:!0,fontWeight:{$ref:"fontWeight"},fontSize:{$rem:[PL.LARGE]},minimumFontSize:{$ref:"fontSize"},fontFamily:{$ref:"fontFamily"},color:{$ref:"subtleTextColor"}}}}},OL={type:"series",name:"radial-gauge",chartType:"gauge",enterprise:!0,options:n.n1.radialGaugeSeriesOptionsDef,create:e=>new kL(e)};function _L(e){e.nodes.sort((e,t)=>Math.round(100*(e.datum.y-t.datum.y))/100||-(e.datum.size-t.datum.size))}function FL(e,t,i,n,s,r,o,a){const l=(i-e)/(n-t),c=(o-s)/(a-r),h=(l*c*(r-t)+e*c-s*l)/(c-l);return e<i?h>e&&h<Math.min(i,o):h<e&&h>Math.max(i,o)}function GL(e,t){let i=!1;const n=e.nodes.filter(e=>1===t(e).length);let s=!0;for(let e=0;s&&e<n.length;e+=1){s=!1;for(let e=0;e<n.length-1;e+=1){const{datum:r}=n[e],o=t(n[e])[0].node.datum,{datum:a}=n[e+1],l=t(n[e+1])[0].node.datum;if(!(FL(r.x,r.y,o.x,o.y,a.x,a.y,l.x,l.y)||FL(r.x,r.y+r.height/2,o.x,o.y+o.height/2,a.x,a.y+a.height/2,l.x,l.y+l.height/2)||FL(r.x,r.y+r.height,o.x,o.y+o.height,a.x,a.y+a.height,l.x,l.y+l.height)))continue;const c=n[e];n[e]=n[e+1],n[e+1]=c;const h=r.y;r.y=a.y+a.height-r.height,a.y=h,i=!0,s=!0}}return i}function VL(e){let t=!1;return _L(e),t=GL(e,e=>e.linksBefore)||t,t=GL(e,e=>e.linksAfter)||t,t}function BL(e,t,i,n){return e.nodes.forEach(({datum:e,linksBefore:t,linksAfter:s})=>{const r=1===n?s:t,o=function(e){if(0===e.length)return;let t=0,i=0;for(const{node:{datum:n}}of e)t+=n.y*n.size,i+=n.size;return t/i}(1===n?t:s);if(null!=o){const t=0!==r.length?i:1;e.y=e.y+(o-e.y)*t}}),function(e,t){const{nodes:i}=e,{seriesRectHeight:n,nodeSpacing:s}=t;_L(e);let r=0,o=0;for(const{datum:e}of i){const t=Math.max(o-e.y,0);e.y+=t,r+=t,o=e.y+e.height+s}if(o-s<n)return r>0;let a=n;for(let e=i.length-1;e>=0;e-=1){const{datum:t}=i[e],n=t.y+t.height,o=Math.min(a-n,0);t.y+=o,r+=o,a=t.y-s}return!0}(e,t)}function HL(e,t,i){let n=!1;for(const s of e)n=BL(s,t,i,1)||n;return n}function zL(e,t,i){let n=!1;for(let s=e.length-1;s>=0;s-=1)n=BL(e[s],t,i,-1)||n;return n}function UL(e){let t=!1;for(let i=e.length-1;i>=0;i-=1)t=VL(e[i])||t;return t}var{BBox:WL,Path:jL,SceneChangeDetection:KL,splitBezier:$L}=n.n1;function YL(e,t,i,n,s,r,o,a,l,c){let h,d;if(s!==i&&l!==o){const e=-(n-t)/(s-i),c=-(a-r)/(l-o);h=(o-i+e*t-c*r)/(e-c),d=e*(h-t)+i}else if(s===i&&l!==o)h=t,d=-(a-r)/(l-o)*(h-a)+l;else{if(s===i||l!==o)throw new Error("Offsetting flat bezier curve");h=a,d=-(n-t)/(s-i)*(h-t)+i}const u=Math.hypot(i-d,t-h),p=(u+c)/u,g=Math.hypot(l-d,a-h),f=(g+c)/g,m=h+(n-h)*p,v=d+(s-d)*p,y=h+(r-h)*f,C=d+(o-d)*f,b=h+(a-h)*f,S=d+(l-d)*f;e.cubicCurveTo(m,v,y,C,b,S)}var qL=class extends jL{constructor(){super(...arguments),this.x1=0,this.x2=0,this.y1=0,this.y2=0,this.height=0,this.inset=0}computeBBox(){const e=Math.min(this.x1,this.x2),t=Math.max(this.x1,this.x2)-e,i=Math.min(this.y1,this.y2),n=Math.max(this.y1,this.y2)-i+this.height;return new WL(e,i,t,n)}updatePath(){const{path:e,inset:t}=this;e.clear();const i=this.x1+t,n=this.x2-t,s=this.y1+t,r=this.y2+t,o=this.height-2*t;if(o<0||i>n)return;const a=i,l=s+o/2,c=(i+n)/2,h=s+o/2,d=(i+n)/2,u=r+o/2,p=n,g=r+o/2;if(e.moveTo(a,l-o/2),Math.abs(this.y2-this.y1)<1||this.x2-this.x1<this.height*Math.SQRT2)e.cubicCurveTo(c,h-o/2,d,u-o/2,p,g-o/2),e.lineTo(p,g+o/2),e.cubicCurveTo(d,u+o/2,c,h+o/2,a,l+o/2);else{const[t,i]=$L(a,l,c,h,d,u,p,g,.5),n=(r>s?1:-1)*o/2;YL(e,t[0].x,t[0].y,t[1].x,t[1].y,t[2].x,t[2].y,t[3].x,t[3].y,n),YL(e,i[0].x,i[0].y,i[1].x,i[1].y,i[2].x,i[2].y,i[3].x,i[3].y,-n),e.lineTo(p,g+o/2),YL(e,i[3].x,i[3].y,i[2].x,i[2].y,i[1].x,i[1].y,i[0].x,i[0].y,n),YL(e,t[3].x,t[3].y,t[2].x,t[2].y,t[1].x,t[1].y,t[0].x,t[0].y,-n)}e.closePath()}};a([KL()],qL.prototype,"x1",2),a([KL()],qL.prototype,"x2",2),a([KL()],qL.prototype,"y1",2),a([KL()],qL.prototype,"y2",2),a([KL()],qL.prototype,"height",2),a([KL()],qL.prototype,"inset",2);var{BaseProperties:XL,FillGradientDefaults:ZL,FillPatternDefaults:QL,FillImageDefaults:JL,SeriesTooltip:ek,SeriesProperties:tk,Property:ik,Label:nk}=n.n1,sk=class extends nk{constructor(){super(...arguments),this.spacing=1}};a([ik],sk.prototype,"spacing",2);var rk=class extends XL{constructor(){super(...arguments),this.fill=void 0,this.fillOpacity=1,this.stroke=void 0,this.strokeOpacity=1,this.strokeWidth=1,this.lineDash=[0],this.lineDashOffset=0}};a([ik],rk.prototype,"fill",2),a([ik],rk.prototype,"fillOpacity",2),a([ik],rk.prototype,"stroke",2),a([ik],rk.prototype,"strokeOpacity",2),a([ik],rk.prototype,"strokeWidth",2),a([ik],rk.prototype,"lineDash",2),a([ik],rk.prototype,"lineDashOffset",2),a([ik],rk.prototype,"itemStyler",2);var ok=class extends XL{constructor(){super(...arguments),this.spacing=1,this.width=1,this.alignment="justify",this.fill=void 0,this.fillOpacity=1,this.stroke=void 0,this.strokeOpacity=1,this.strokeWidth=1,this.lineDash=[0],this.lineDashOffset=0}};a([ik],ok.prototype,"spacing",2),a([ik],ok.prototype,"width",2),a([ik],ok.prototype,"alignment",2),a([ik],ok.prototype,"fill",2),a([ik],ok.prototype,"fillOpacity",2),a([ik],ok.prototype,"stroke",2),a([ik],ok.prototype,"strokeOpacity",2),a([ik],ok.prototype,"strokeWidth",2),a([ik],ok.prototype,"lineDash",2),a([ik],ok.prototype,"lineDashOffset",2),a([ik],ok.prototype,"itemStyler",2);var ak=class extends tk{constructor(){super(...arguments),this.nodes=void 0,this.idKey="",this.idName=void 0,this.labelKey=void 0,this.labelName=void 0,this.sizeKey=void 0,this.sizeName=void 0,this.fillGradientDefaults=new ZL,this.fillPatternDefaults=new QL,this.fillImageDefaults=new JL,this.defaultColorRange=[],this.defaultPatternFills=[],this.fills=[],this.strokes=[],this.label=new sk,this.link=new rk,this.node=new ok,this.tooltip=new ek}};a([ik],ak.prototype,"nodes",2),a([ik],ak.prototype,"fromKey",2),a([ik],ak.prototype,"toKey",2),a([ik],ak.prototype,"idKey",2),a([ik],ak.prototype,"idName",2),a([ik],ak.prototype,"labelKey",2),a([ik],ak.prototype,"labelName",2),a([ik],ak.prototype,"sizeKey",2),a([ik],ak.prototype,"sizeName",2),a([ik],ak.prototype,"fillGradientDefaults",2),a([ik],ak.prototype,"fillPatternDefaults",2),a([ik],ak.prototype,"fillImageDefaults",2),a([ik],ak.prototype,"defaultColorRange",2),a([ik],ak.prototype,"defaultPatternFills",2),a([ik],ak.prototype,"fills",2),a([ik],ak.prototype,"strokes",2),a([ik],ak.prototype,"label",2),a([ik],ak.prototype,"link",2),a([ik],ak.prototype,"node",2),a([ik],ak.prototype,"tooltip",2);var{Transformable:lk,applyShapeStyle:ck,SeriesNodePickMode:hk,CachedTextMeasurerPool:dk,TextWrapper:uk,TextUtils:pk,createDatumId:gk,getShapeStyle:fk,Rect:mk,BBox:vk}=n.n1,yk=class extends wb{constructor(e){super({moduleCtx:e,pickModes:[hk.NEAREST_NODE,hk.EXACT_SHAPE_MATCH]}),this.properties=new ak}isLabelEnabled(){return(null!=this.properties.labelKey||null==this.nodes)&&this.properties.label.enabled}linkFactory(){return new qL}nodeFactory(){return new mk}createNodeData(){const{id:e,_nodeDataDependencies:{seriesRectWidth:t,seriesRectHeight:i}={seriesRectWidth:0,seriesRectHeight:0}}=this,{fromKey:n,toKey:r,sizeKey:o,label:{spacing:a},node:{spacing:l,width:c,alignment:h}}=this.properties,{nodeGraph:d,links:u,maxPathLength:p}=this.getNodeGraph(e=>({...e,x:NaN,y:NaN,width:c,height:NaN}),e=>({...e,x1:NaN,x2:NaN,y1:NaN,y2:NaN,height:NaN}),{includeCircularReferences:!1}),g=d,f=this.isLabelEnabled()?(t-c)*(1-p/(p+1)):0,m=(t-c-2*f)/(p-1),v=[];for(let e=0;e<p;e+=1){const t=f+e*m;v.push({index:e,size:0,nodes:[],x:t})}g.forEach(e=>{const{datum:t,linksBefore:i,linksAfter:s,maxPathLengthBefore:a,maxPathLengthAfter:l}=e,c=Math.max(i.reduce((e,{link:t})=>e+t.size,0),s.reduce((e,{link:t})=>e+t.size,0));if(0===i.length&&0===s.length||0===c)return void(e.columnIndex=-1);let d;switch(h){case"left":d=v[a];break;case"right":d=v[p-1-l];break;case"center":if(0!==i.length)d=v[a];else if(0!==s.length){const e=s.reduce((e,t)=>Math.min(e,t.node.maxPathLengthBefore),p)-1;d=v[e]}else d=v[0];break;case"justify":d=0===s.length?v[p-1]:v[a]}t.x=d.x,t.size=c;const u=this.getLabelText(this.properties.label,{datum:t.datum,value:t.label,fromKey:n,toKey:r,sizeKey:o,size:c});t.label=String(u),d.nodes.push(e),d.size+=c,e.columnIndex=d.index}),g.forEach(e=>{let t=1/0,i=0;e.linksAfter.forEach(e=>{const n=e.node,{columnIndex:s}=n;s<t?(t=s,i=n.datum.size):s===t&&(i=Math.max(i,n.datum.size))}),e.closestColumnIndex=t,e.maxSizeOfClosestNodesAfter=i});const y=v.reduce((e,{size:t,nodes:n})=>{const s=(1-(n.length-1)*(l/i))/t;return Math.min(e,s)},1/0);for(let e=v.length-1;e>=0;e-=1)v[e].nodes.sort((e,t)=>e.closestColumnIndex-t.closestColumnIndex||e.maxSizeOfClosestNodesAfter-t.maxSizeOfClosestNodesAfter||e.datum.size-t.datum.size);!function(e,t){e.forEach(e=>{!function({nodes:e,size:t},{seriesRectHeight:i,nodeSpacing:n,sizeScale:s}){let r=(i-(i*t*s+n*(e.length-1)))/2;e.forEach(({datum:e})=>{const t=i*e.size*s;e.y=r,e.height=t,r+=t+n})}(e,t)});let i=!1;for(let n=0;n<6;n+=1){const n=HL(e,t,1);i=zL(e,t,.5);const s=UL(e);if(!n&&!i&&!s)break}i&&(HL(e,t,1),UL(e))}(v,{seriesRectHeight:i,nodeSpacing:l,sizeScale:y});let C=!1;if(g.forEach(({datum:e,linksBefore:t,linksAfter:n})=>{C||(C=e.height<0);const s=e.y+e.height,r=t=>t.sort((t,i)=>{const n=t.node.datum,r=i.node.datum,o=n.y+n.height,a=r.y+r.height;return Math.atan2(n.y-e.y,Math.abs(n.x-e.x))-Math.atan2(r.y-e.y,Math.abs(r.x-e.x))+(Math.atan2(o-s,Math.abs(n.x-e.x))-Math.atan2(a-s,Math.abs(r.x-e.x)))});let o=e.y;r(t).forEach(({link:e})=>{e.y2=o,o+=e.size*i*y});let a=e.y;r(n).forEach(({link:e})=>{e.y1=a,a+=e.size*i*y})}),C)return void s.Vy.warnOnce("There was insufficient space to display the Sankey Series. Reduce the node spacing, or provide a larger container.");const b=[],S=[],{fontSize:w}=this.properties.label,x=this.properties.label.getFont();return v.forEach((e,i)=>{const n=0===i,s=i===v.length-1;let r=-1/0;e.nodes.sort((e,t)=>e.datum.y-t.datum.y),e.nodes.forEach(({datum:e})=>{if(e.midPoint={x:e.x+e.width/2,y:e.y+e.height/2},b.push(e),null==e.label)return;const i=n?e.x-a:e.x+e.width+a,o=e.y+e.height/2;let l;if(!n&&!s){const i=o-pk.getLineHeight(w),n=o+pk.getLineHeight(w);let s=t;g.forEach(({datum:t})=>{t.x>e.x&&Math.max(t.y,i)<=Math.min(t.y+t.height,n)&&(s=Math.min(s,t.x-a))});const r=s-e.x-2*a;l=uk.wrapText(e.label,{maxWidth:r,maxHeight:e.height,font:this.properties.label,textWrap:"never",overflow:"hide"})}if(null==l||""===l){const t=n||s?a:2*a;l=uk.wrapText(e.label,{maxWidth:m-t,maxHeight:e.height,font:this.properties.label,textWrap:"never"})}if(""===l)return;const{height:c}=dk.measureText(l,{font:x,textAlign:"left",textBaseline:"middle"}),h=o+c/2;o-c/2>=r&&(S.push({x:i,y:o,leading:n,text:l}),r=h)})}),u.forEach(e=>{const{fromNode:t,toNode:n,size:s}=e;e.height=i*s*y,e.x1=t.x+c,e.x2=n.x,e.midPoint={x:(e.x1+e.x2)/2,y:(e.y1+e.y2)/2+e.height/2},b.push(e)}),{itemId:e,nodeData:b,labelData:S}}updateLabelSelection(e){const t=this.isLabelEnabled()?e.labelData:[];return e.labelSelection.update(t)}updateLabelNodes(e){const{labelSelection:t}=e,{color:i,fontStyle:n,fontWeight:s,fontSize:r,fontFamily:o}=this.properties.label;t.each((e,{x:t,y:a,leading:l,text:c})=>{e.visible=!0,e.x=t,e.y=a,e.text=c,e.fill=i,e.fontStyle=n,e.fontWeight=s,e.fontSize=r,e.fontFamily=o,e.textAlign=l?"right":"left",e.textBaseline="middle"})}updateNodeSelection(e){return e.datumSelection.update(e.nodeData,void 0,e=>gk([e.type,e.id]))}getBaseNodeStyle(e){const{properties:t}=this,{fill:i,fillOpacity:n,stroke:s,strokeOpacity:r,lineDash:o,lineDashOffset:a}=t.node,l=e?t.highlightStyle.item:void 0;return fk({fill:l?.fill??i,fillOpacity:l?.fillOpacity??n,stroke:l?.stroke??s,strokeOpacity:l?.strokeOpacity??r,strokeWidth:l?.strokeWidth??this.getStrokeWidth(t.node.strokeWidth),lineDash:l?.lineDash??o,lineDashOffset:l?.lineDashOffset??a},t.fillGradientDefaults,t.fillPatternDefaults,t.fillImageDefaults)}getNodeStyleOverrides(e,t,i,n,s,r,o){const{id:a,properties:l}=this,{fills:c,strokes:h,defaultColorRange:d,defaultPatternFills:u}=l,{itemStyler:p}=l.node,g=r.fill??c[i%c.length],f=r.stroke??h[i%h.length],m=d[i%d.length].map(e=>({color:e})),v=u[i%u.length];let y;if(o||(y??(y={}),y.fill=g,y.stroke=f),null!=p){const i=this.cachedDatumCallback(gk(e,"node",o?"highlight":"node"),()=>{const{fillOpacity:e=1,strokeOpacity:i=1,strokeWidth:l=0,lineDash:c=[],lineDashOffset:h=0}=r;return this.callWithContext(p,{seriesId:a,datum:t,highlighted:o,label:s,size:n,fill:g,fillOpacity:e,stroke:f,strokeOpacity:i,strokeWidth:l,lineDash:c,lineDashOffset:h})});y??(y={}),Object.assign(y,i)}return fk(y,{...this.properties.fillGradientDefaults.toJson(),colorStops:m},{...this.properties.fillPatternDefaults.toJson(),fill:v,stroke:v},this.properties.fillImageDefaults)}updateNodeNodes(e){const{datumSelection:t,isHighlight:i}=e,n=this.getBaseNodeStyle(i),s=this.getShapeFillBBox();t.each((e,t)=>{const{datumIndex:r,size:o,label:a}=t,l=this.getNodeStyleOverrides(String(r.index),t.datum,r.index,o,a,n,i);e.x=t.x,e.y=t.y,e.width=Math.max(t.width,0),e.height=Math.max(t.height,0),ck(e,n,l,s)})}getShapeFillBBox(){const e=this._nodeDataDependencies?.seriesRectWidth??0,t=this._nodeDataDependencies?.seriesRectHeight??0,i=new vk(0,0,e,t);return{series:i,axis:i}}updateLinkSelection(e){return e.datumSelection.update(e.nodeData,void 0,e=>gk([e.type,e.index,e.fromNode.id,e.toNode.id]))}getBaseLinkStyle(e){const{properties:t}=this,{fill:i,fillOpacity:n,stroke:s,strokeOpacity:r,lineDash:o,lineDashOffset:a}=t.link,l=e?t.highlightStyle.item:void 0;return fk({fill:l?.fill??i,fillOpacity:l?.fillOpacity??n,stroke:l?.stroke??s,strokeOpacity:l?.strokeOpacity??r,strokeWidth:l?.strokeWidth??this.getStrokeWidth(t.link.strokeWidth),lineDash:l?.lineDash??o,lineDashOffset:l?.lineDashOffset??a},t.fillGradientDefaults,t.fillPatternDefaults,t.fillImageDefaults)}getLinkStyleOverrides(e,t,i,n,s){const{id:r,properties:o}=this,{fills:a,strokes:l,defaultColorRange:c,defaultPatternFills:h}=o,{itemStyler:d}=o.link,u=n.fill??a[i%a.length],p=n.stroke??l[i%l.length],g=c[i%c.length].map(e=>({color:e})),f=h[i%h.length];let m;if(s||(m??(m={}),m.fill=u,m.stroke=p),null!=d){const i=this.cachedDatumCallback(gk(e,"link",s?"highlight":"node"),()=>{const{fillOpacity:e=1,strokeOpacity:i=1,strokeWidth:o=0,lineDash:a=[],lineDashOffset:l=0}=n;return this.callWithContext(d,{seriesId:r,datum:t,highlighted:s,fill:u,fillOpacity:e,stroke:p,strokeOpacity:i,strokeWidth:o,lineDash:a,lineDashOffset:l})});m??(m={}),Object.assign(m,i)}return fk(m,{...this.properties.fillGradientDefaults.toJson(),colorStops:g},{...this.properties.fillPatternDefaults.toJson(),fill:f,stroke:f},this.properties.fillImageDefaults)}updateLinkNodes(e){const{datumSelection:t,isHighlight:i}=e,n=this.getBaseLinkStyle(i),s=this.getShapeFillBBox();t.each((e,t)=>{const{datumIndex:r}=t,o=t.fromNode.datumIndex,a=this.getLinkStyleOverrides(String(r.index),t.datum,o.index,n,i);e.x1=t.x1,e.y1=t.y1,e.x2=t.x2,e.y2=t.y2,e.height=t.height,ck(e,n,a,s),e.inset=e.strokeWidth/2})}getTooltipContent(e){const{id:t,linksProcessedData:i,nodesProcessedData:n,properties:s}=this,{fromKey:r,toKey:o,sizeKey:a,sizeName:l,tooltip:c}=s,h=this.contextNodeData?.nodeData.find(t=>t.datumIndex.type===e.type&&t.datumIndex.index===e.index);if(null==h)return;const d=0===h.type?h.fromNode.index:h.index,u=0===h.type?`${h.fromNode.label} - ${h.toNode.label}`:h.label,p=0===e.type?i?.dataSources.get(this.id)?.[e.index]:n?.dataSources.get(this.id)?.[e.index],g=h.size;let f;if(0===h.type){const t=h.fromNode.datumIndex,i=this.getBaseLinkStyle(!1);Object.assign(i,this.getLinkStyleOverrides(String(e.index),p,t.index,i,!1)),f=i}else{const t=h.label,i=this.getBaseNodeStyle(!1);Object.assign(i,this.getNodeStyleOverrides(String(e.index),p,e.index,g,t,i,!1)),f=i}return this.formatTooltipWithContext(c,{title:u,symbol:this.legendItemSymbol(h.type,d,f),data:null!=a?[{label:l,fallbackLabel:a,value:String(g)}]:[]},{seriesId:t,datum:p,title:u,fromKey:r,toKey:o,sizeKey:a,sizeName:l,size:g,...f})}computeFocusBounds(e){if(e instanceof mk){const{x:t,y:i,width:n,height:s}=e,r=new vk(t,i,n,s);return lk.toCanvas(this.contentGroup,r)}return e}};yk.className="SankeySeries",yk.type="sankey";var{commonSeriesOptionsDefs:Ck,sankeySeriesThemeableOptionsDef:bk}=n.n1,Sk={...bk,...Ck,type:(0,s.mw)((0,s.dY)("sankey")),fromKey:(0,s.mw)(s.Yj),toKey:(0,s.mw)(s.Yj),sizeKey:s.Yj,sizeName:s.Yj};Sk.fillGradientDefaults=(0,s._L)(s.wi),Sk.fillPatternDefaults=(0,s._L)(s.GY),Sk.fillImageDefaults=(0,s._L)(s.Zd),Sk.defaultColorRange=(0,s._L)((0,s.jk)((0,s.jk)(s.yW))),Sk.defaultPatternFills=(0,s._L)((0,s.jk)(s.yW));var wk={type:"series",optionsKey:"series[]",packageType:"enterprise",chartTypes:["flow-proportion"],solo:!0,identifier:"sankey",moduleFactory:e=>new yk(e),tooltipDefaults:{range:"exact"},themeTemplate:{seriesArea:{padding:{top:10,bottom:10}},series:{fills:{$palette:"fills"},strokes:{$palette:"strokes"},fillGradientDefaults:{type:"gradient",gradient:"linear",bounds:"item",colorStops:{$palette:"gradient"},rotation:0,reverse:!1},fillPatternDefaults:n.n1.FILL_PATTERN_DEFAULTS,fillImageDefaults:n.n1.FILL_IMAGE_DEFAULTS,defaultColorRange:{$palette:"gradients"},defaultPatternFills:n.n1.SAFE_FILLS_OPERATION,highlightStyle:{series:{dimOpacity:.2}},label:{fontFamily:{$ref:"fontFamily"},fontSize:{$ref:"fontSize"},fontWeight:{$ref:"fontWeight"},color:{$ref:"textColor"},spacing:10},node:{spacing:20,width:10,strokeWidth:0},link:{fillOpacity:.5,strokeWidth:0}},legend:{enabled:!1,toggleSeries:!1}}},xk={type:"series",name:"sankey",chartType:"flow-proportion",enterprise:!0,options:Sk,create:e=>new yk(e)},{HierarchySeriesProperties:Ek,HighlightStyle:Mk,SeriesTooltip:Ak,Property:Tk}=n.n1,Dk=class extends Mk{constructor(){super(...arguments),this.label=new cm,this.secondaryLabel=new cm}};a([Tk],Dk.prototype,"fill",2),a([Tk],Dk.prototype,"fillOpacity",2),a([Tk],Dk.prototype,"stroke",2),a([Tk],Dk.prototype,"strokeWidth",2),a([Tk],Dk.prototype,"strokeOpacity",2),a([Tk],Dk.prototype,"label",2),a([Tk],Dk.prototype,"secondaryLabel",2);var Ik=class extends Ek{constructor(){super(...arguments),this.fillOpacity=1,this.strokeWidth=0,this.strokeOpacity=1,this.cornerRadius=0,this.highlightStyle=new Dk,this.label=new cm,this.secondaryLabel=new hm,this.tooltip=new Ak}};a([Tk],Ik.prototype,"sizeName",2),a([Tk],Ik.prototype,"labelKey",2),a([Tk],Ik.prototype,"secondaryLabelKey",2),a([Tk],Ik.prototype,"fillOpacity",2),a([Tk],Ik.prototype,"strokeWidth",2),a([Tk],Ik.prototype,"strokeOpacity",2),a([Tk],Ik.prototype,"cornerRadius",2),a([Tk],Ik.prototype,"sectorSpacing",2),a([Tk],Ik.prototype,"padding",2),a([Tk],Ik.prototype,"itemStyler",2),a([Tk],Ik.prototype,"highlightStyle",2),a([Tk],Ik.prototype,"label",2),a([Tk],Ik.prototype,"secondaryLabel",2),a([Tk],Ik.prototype,"tooltip",2);var{fromToMotion:Rk,normalizeAngle360:Lk,createDatumId:kk,Sector:Pk,Group:Nk,ScalableGroup:Ok,Selection:_k,TransformableText:Fk,BBox:Gk,applyShapeStyle:Vk,getShapeStyle:Bk}=n.n1,Hk=class extends n.n1.HierarchyNode{constructor(){super(...arguments),this.label=void 0,this.secondaryLabel=void 0,this.contentHeight=0,this.bbox=void 0,this.startAngle=0,this.endAngle=0}};function zk(e,t=0,i=2*Math.PI/e.sumSize){for(const n of e.children){const e=t+n.sumSize*i;n.startAngle=t,n.endAngle=e,zk(n,t,i),t=e}}var Uk=class extends n.n1.HierarchySeries{constructor(){super(...arguments),this.NodeClass=Hk,this.properties=new Ik,this.scalingGroup=this.contentGroup.appendChild(new Ok),this.sectorGroup=this.scalingGroup.appendChild(new Nk),this.sectorLabelGroup=this.scalingGroup.appendChild(new Nk),this.highlightSectorGroup=this.scalingGroup.appendChild(new Nk),this.datumSelection=_k.select(this.sectorGroup,Pk),this.labelSelection=_k.select(this.sectorLabelGroup,Nk),this.highlightSelection=_k.select(this.highlightSectorGroup,Pk)}processData(){super.processData(),zk(this.rootNode)}updateSelections(){const e=this.ctx.highlightManager?.getActiveHighlight();if(this.highlightSelection.update(null!=e?[e]:[],void 0,e=>this.getDatumId(e)),!this.nodeDataRefresh)return;this.nodeDataRefresh=!1;const{chart:t}=this;if(null==t)return;if(null==t.seriesRect)return;const i=Array.from(this.rootNode);this.datumSelection.update(i,void 0,e=>this.getDatumId(e)),this.labelSelection.update(i,e=>{e.append([new Fk({tag:0}),new Fk({tag:1})])},e=>this.getDatumId(e))}getItemBaseStyle(e){const{properties:t}=this,i=e?t.highlightStyle:void 0;return Bk({fill:i?.fill,fillOpacity:i?.fillOpacity??t.fillOpacity,stroke:i?.stroke,strokeWidth:i?.strokeWidth??this.getStrokeWidth(t.strokeWidth),strokeOpacity:i?.strokeOpacity??t.strokeOpacity},t.fillGradientDefaults,t.fillPatternDefaults,t.fillImageDefaults)}getItemStyleOverrides(e,t,i,n,s,r){const{id:o,properties:a,colorScale:l}=this,{fills:c,strokes:h,itemStyler:d}=a,u=e[0],p=s.fill??c[u%c.length],g=s.stroke??h[u%h.length],f={};if(r||(f.fill=null!=n?l.convert(n):p,f.stroke=g),null!=d){const n=this.cachedDatumCallback(kk(e.join(":"),r?"highlight":"node"),()=>this.callWithContext(d,{seriesId:o,datum:t,depth:i,highlighted:r,fill:p,stroke:g,...s}));Object.assign(f,n)}return Bk(f,this.properties.fillGradientDefaults,this.properties.fillPatternDefaults,this.properties.fillImageDefaults)}updateNodes(){const{chart:e,data:t,maxDepth:i}=this;if(null==e||null==t)return;const{width:s,height:r}=e.seriesRect,{sectorSpacing:o=0,padding:a=0,cornerRadius:l,childrenKey:c,colorKey:h,colorName:d,labelKey:u,secondaryLabelKey:p,sizeKey:g,sizeName:f}=this.properties;this.contentGroup.translationX=s/2,this.contentGroup.translationY=r/2;const m=.5*o,v=Math.min(s,r)/2,y=v/(i+1),C=-Math.PI/2,b={series:new Gk(-v,-v,2*v,2*v),axis:new Gk(-v,-v,2*v,2*v)};this.rootNode?.walk(e=>{const{startAngle:t,endAngle:i}=e;if(null!=e.depth){const n=(t+i)/2+C,s=(e.depth+.5)*y;e.midPoint.x=Math.cos(n)*s,e.midPoint.y=Math.sin(n)*s}}),this.rootNode?.walk(e=>{const{datum:t,depth:i,startAngle:n,endAngle:s,parent:r,sumSize:o}=e;let l,v;if(e.label=void 0,e.secondaryLabel=void 0,e.contentHeight=0,null!=t&&null!=i&&null!=u){const e=t[u];l=this.getLabelText(this.properties.label,{depth:i,datum:t,childrenKey:c,colorKey:h,colorName:d,labelKey:u,secondaryLabelKey:p,sizeKey:g,sizeName:f,value:e})}if(""===l&&(l=void 0),null!=t&&null!=i&&null!=p){const e=t[p];v=this.getLabelText(this.properties.secondaryLabel,{depth:i,datum:t,childrenKey:c,colorKey:h,colorName:d,labelKey:u,secondaryLabelKey:p,sizeKey:g,sizeName:f,value:e})}if(""===v&&(v=void 0),null==i)return;const b=i*y+m,S=(i+1)*y-m,w=b>m?m/b:m,x=S>m?m/S:m,E=s+w-(n+w),M=s+x-(n+x),A=rm(l,this.properties.label,v,this.properties.secondaryLabel,{padding:a},e=>{if(0===i&&r?.sumSize===o)return{width:2*Math.sqrt(S**2-(.5*e)**2),height:e,meta:0};const t=e,n=2*Math.sqrt(S**2-(b+t)**2),s=E<Math.PI?2*b*Math.tan(.5*E):1/0,a=Math.min(n,s),l=Math.PI/4;let c,h;return 0===i?(c=e,h=Math.sqrt(S**2-(c/2)**2)-e/(2*Math.tan(.5*M))):Lk(E)<l?(c=2*b*Math.tan(.5*E),h=Math.sqrt(S**2-(c/2)**2)-b):(h=0,c=0),a>=h?{width:a,height:t,meta:1}:{width:h,height:c,meta:2}});if(null==A)return;const{width:T,height:D,meta:I,label:R,secondaryLabel:L}=A,k=C+(n+s)/2,P=(Math.sin(k)>=0?3:12)&(Math.cos(k)>=0?6:9);let N;switch(I){case 0:N=0;break;case 1:{const e=S-.58*(y-D),t=Math.sqrt((S-a)**2-(T/2)**2);N=Math.min(e,t);break}case 2:N=0===i?.5*(D/(2*Math.tan(.5*E))+.5*T+(Math.sqrt(S**2-(.5*D)**2)-.5*T)):.5*(b+S)}if(null!=R){const{fontStyle:t="normal",fontFamily:i,fontWeight:n="normal",color:s="black"}=this.properties.label;e.label={...R,fontStyle:t,fontFamily:i,fontWeight:n,color:s,labelPlacement:I,circleQuarter:P,radius:N,theta:k}}if(null!=L){const{fontStyle:t="normal",fontFamily:i,fontWeight:n="normal",color:s="black"}=this.properties.secondaryLabel;e.secondaryLabel={...L,fontStyle:t,fontFamily:i,fontWeight:n,color:s,labelPlacement:I,circleQuarter:P,radius:N,theta:k}}e.contentHeight=A.height});const S=(e,t,i,s)=>{const{datum:r,datumIndex:o,depth:a,colorValue:c,startAngle:h,endAngle:d}=e;if(null==a)return void(t.visible=!1);t.visible=!0;const u=this.getItemStyleOverrides(o,r,a,c,i,s),p=u.fill??i.fill,g=u.strokeWidth??i.strokeWidth,f=n.n1.isGradientFill(p)&&"item"!==p.bounds?b:void 0;Vk(t,i,u,f),t.centerX=0,t.centerY=0,t.innerRadius=a*y,t.outerRadius=(a+1)*y,t.startAngle=h+C,t.endAngle=d+C,t.inset=m+.5*g,t.cornerRadius=l},w=this.getItemBaseStyle(!1);this.datumSelection.each((e,t)=>{S(t,e,w,!1)});const x=this.getItemBaseStyle(!0);this.highlightSelection.each((e,t)=>{S(t,e,x,!0)});const E=(e,t,i,n)=>{const{depth:s,contentHeight:r}=e,o=0===i,a=o?e.label:e.secondaryLabel;if(null==s||null==a)return void(t.visible=!1);const{labelPlacement:l,circleQuarter:c,radius:h,theta:d}=a;let u;switch(n&&(u=(o?this.properties.highlightStyle.label:this.properties.highlightStyle.secondaryLabel).color),t.text=a.text,t.fontSize=a.fontSize,t.lineHeight=a.lineHeight,t.fontStyle=a.fontStyle,t.fontFamily=a.fontFamily,t.fontWeight=a.fontWeight,t.fill=u??a.color,l){case 0:t.textAlign="center",t.textBaseline="top",t.translationX=0,t.translationY=(o?0:r-a.height)-.5*r,t.rotation=0;break;case 1:{const e=!!(3&c),i=o===!e?h:h-(r-a.height);t.textAlign="center",t.textBaseline=e?"bottom":"top",t.translationX=Math.cos(d)*i,t.translationY=Math.sin(d)*i,t.rotation=e?d-.5*Math.PI:d+.5*Math.PI;break}case 2:{const e=!!(6&c),i=o===!e?.5*(r-a.height):.5*(a.height-r);t.textAlign="center",t.textBaseline="middle",t.translationX=Math.cos(d)*h+Math.cos(d+Math.PI/2)*i,t.translationY=Math.sin(d)*h+Math.sin(d+Math.PI/2)*i,t.rotation=e?d:d+Math.PI;break}}t.visible=!0},M=this.ctx.highlightManager?.getActiveHighlight();this.labelSelection.selectByClass(Fk).forEach(e=>{const t=e.closestDatum();E(t,e,e.tag,t===M)})}getTooltipContent(e){const{id:t,properties:i}=this,{labelKey:s,secondaryLabelKey:r,childrenKey:o,sizeKey:a,sizeName:l,colorKey:c,colorName:h,tooltip:d}=i,u=e.reduce((e,t)=>e?.children[t],this.rootNode);if(null==u)return;const{datum:p,depth:g}=u;if(null==p||null==g)return;const f=[],m=null!=a?p[a]:void 0;null!=m&&f.push({label:l,fallbackLabel:a,value:m});const v=null!=c?p[c]:void 0;null!=v&&f.push({label:h,fallbackLabel:c,value:v});const y=this.getItemBaseStyle(!1);Object.assign(y,this.getItemStyleOverrides(e,p,g,v,y,!1));const C=y.fill,b=Bk({shape:"square",fill:C,fillOpacity:1,stroke:void 0,strokeWidth:0,strokeOpacity:1,lineDash:[0],lineDashOffset:0},i.fillGradientDefaults,i.fillPatternDefaults,i.fillImageDefaults);return n.n1.isGradientFill(b.fill)&&(b.fill={...b.fill,gradient:"linear",rotation:0,reverse:!1}),this.formatTooltipWithContext(d,{title:null!=s?p[s]:void 0,symbol:{marker:b},data:f},{seriesId:t,datum:p,title:void 0,depth:g,labelKey:s,secondaryLabelKey:r,childrenKey:o,sizeKey:a,sizeName:l,colorKey:c,colorName:h,...y})}createNodeData(){}pickNodeClosestDatum(e){return this.pickNodeNearestDistantObject(e,this.datumSelection.selectByClass(Pk))}animateEmptyUpdateReady(){Rk(this.id,"nodes",this.ctx.animationManager,[this.scalingGroup],{toFn:()=>({scalingX:1,scalingY:1}),fromFn:()=>({scalingX:0,scalingY:0})})}computeFocusBounds(e){return e}};Uk.className="SunburstSeries",Uk.type="sunburst";var{commonSeriesOptionsDefs:Wk,sunburstSeriesThemeableOptionsDef:jk,without:Kk}=n.n1,$k={...jk,...Kk(Wk,["highlightStyle"]),type:(0,s.mw)((0,s.dY)("sunburst")),labelKey:s.Yj,secondaryLabelKey:s.Yj,childrenKey:s.Yj,sizeKey:s.Yj,colorKey:s.Yj,sizeName:s.Yj,colorName:s.Yj},{FONT_SIZE_RATIO:Yk}=n.n1,qk={type:"series",optionsKey:"series[]",packageType:"enterprise",chartTypes:["hierarchy"],identifier:"sunburst",moduleFactory:e=>new Uk(e),tooltipDefaults:{range:"exact"},solo:!0,themeTemplate:{series:{fills:{$palette:"fills"},strokes:{$palette:"strokes"},colorRange:{$palette:"divergingColors"},fillGradientDefaults:{type:"gradient",gradient:"radial",bounds:"series",colorStops:{$palette:"gradient"},rotation:0,reverse:!0},fillPatternDefaults:n.n1.FILL_PATTERN_DEFAULTS,fillImageDefaults:n.n1.FILL_IMAGE_DEFAULTS,label:{fontFamily:{$ref:"fontFamily"},fontSize:{$rem:[Yk.LARGE]},minimumFontSize:{$round:[{$mul:[{$ref:"fontSize"},.75]}]},fontWeight:{$ref:"fontWeight"},color:{$ref:"backgroundColor"},overflowStrategy:"ellipsis",wrapping:"never",spacing:2},secondaryLabel:{fontFamily:{$ref:"fontFamily"},fontSize:{$rem:[Yk.SMALLEST]},minimumFontSize:{$round:[{$mul:[{$ref:"fontSize"},7/12]}]},fontWeight:{$ref:"fontWeight"},color:{$ref:"backgroundColor"},overflowStrategy:"ellipsis",wrapping:"never"},sectorSpacing:2,padding:3,highlightStyle:{label:{color:{$ref:"backgroundColor"}},secondaryLabel:{color:{$ref:"backgroundColor"}},fill:"rgba(255,255,255, 0.33)",stroke:"rgba(0, 0, 0, 0.4)",strokeWidth:2}},gradientLegend:{enabled:!0}}},Xk={type:"series",name:"sunburst",chartType:"hierarchy",enterprise:!0,options:$k,create:e=>new Uk(e)},{BaseProperties:Zk,HierarchySeriesProperties:Qk,HighlightStyle:Jk,SeriesTooltip:eP,Property:tP,Label:iP}=n.n1,nP=class extends iP{constructor(){super(...arguments),this.spacing=0}};a([tP],nP.prototype,"spacing",2);var sP=class extends Zk{constructor(){super(...arguments),this.fill=void 0,this.fillOpacity=1,this.strokeWidth=1,this.strokeOpacity=1,this.cornerRadius=0,this.textAlign="center",this.gap=0,this.padding=0,this.interactive=!0,this.label=new nP}};a([tP],sP.prototype,"fill",2),a([tP],sP.prototype,"fillOpacity",2),a([tP],sP.prototype,"stroke",2),a([tP],sP.prototype,"strokeWidth",2),a([tP],sP.prototype,"strokeOpacity",2),a([tP],sP.prototype,"cornerRadius",2),a([tP],sP.prototype,"textAlign",2),a([tP],sP.prototype,"gap",2),a([tP],sP.prototype,"padding",2),a([tP],sP.prototype,"interactive",2),a([tP],sP.prototype,"label",2);var rP=class extends Zk{constructor(){super(...arguments),this.fill=void 0,this.fillOpacity=1,this.strokeWidth=1,this.strokeOpacity=1,this.cornerRadius=0,this.textAlign="center",this.verticalAlign="middle",this.gap=0,this.padding=0,this.label=new cm,this.secondaryLabel=new hm}};a([tP],rP.prototype,"fill",2),a([tP],rP.prototype,"fillOpacity",2),a([tP],rP.prototype,"stroke",2),a([tP],rP.prototype,"strokeWidth",2),a([tP],rP.prototype,"strokeOpacity",2),a([tP],rP.prototype,"cornerRadius",2),a([tP],rP.prototype,"textAlign",2),a([tP],rP.prototype,"verticalAlign",2),a([tP],rP.prototype,"gap",2),a([tP],rP.prototype,"padding",2),a([tP],rP.prototype,"label",2),a([tP],rP.prototype,"secondaryLabel",2);var oP=class extends Zk{constructor(){super(...arguments),this.label=new cm}};a([tP],oP.prototype,"fill",2),a([tP],oP.prototype,"fillOpacity",2),a([tP],oP.prototype,"stroke",2),a([tP],oP.prototype,"strokeWidth",2),a([tP],oP.prototype,"strokeOpacity",2),a([tP],oP.prototype,"label",2);var aP=class extends Zk{constructor(){super(...arguments),this.label=new cm,this.secondaryLabel=new hm}};a([tP],aP.prototype,"fill",2),a([tP],aP.prototype,"fillOpacity",2),a([tP],aP.prototype,"stroke",2),a([tP],aP.prototype,"strokeWidth",2),a([tP],aP.prototype,"strokeOpacity",2),a([tP],aP.prototype,"label",2),a([tP],aP.prototype,"secondaryLabel",2);var lP=class extends Jk{constructor(){super(...arguments),this.group=new oP,this.tile=new aP}};a([tP],lP.prototype,"group",2),a([tP],lP.prototype,"tile",2);var cP=class extends Qk{constructor(){super(...arguments),this.highlightStyle=new lP,this.tooltip=new eP,this.group=new sP,this.tile=new rP,this.undocumentedGroupFills=[],this.undocumentedGroupStrokes=[]}};a([tP],cP.prototype,"sizeName",2),a([tP],cP.prototype,"labelKey",2),a([tP],cP.prototype,"secondaryLabelKey",2),a([tP],cP.prototype,"itemStyler",2),a([tP],cP.prototype,"highlightStyle",2),a([tP],cP.prototype,"tooltip",2),a([tP],cP.prototype,"group",2),a([tP],cP.prototype,"tile",2),a([tP],cP.prototype,"undocumentedGroupFills",2),a([tP],cP.prototype,"undocumentedGroupStrokes",2);var{TextUtils:hP,TextWrapper:dP,createDatumId:uP,Rect:pP,Group:gP,BBox:fP,Selection:mP,Text:vP,Transformable:yP,applyShapeStyle:CP,getShapeStyle:bP}=n.n1,SP=class extends n.n1.HierarchyNode{constructor(){super(...arguments),this.labelValue=void 0,this.secondaryLabelValue=void 0,this.label=void 0,this.secondaryLabel=void 0,this.bbox=void 0,this.padding=void 0}},wP=new vP;function xP(e){return e.children.length>0?e.sumSize-e.sizeValue:e.sizeValue}var EP={left:0,center:.5,right:1},MP={top:0,middle:.5,bottom:1},AP=(n.n1.Group,class extends n.n1.HierarchySeries{constructor(){super(...arguments),this.NodeClass=SP,this.properties=new cP,this.rectGroup=this.contentGroup.appendChild(new gP),this.datumSelection=mP.select(this.rectGroup,pP),this.labelSelection=mP.select(this.labelGroup,gP),this.highlightSelection=mP.select(this.rectGroup,pP)}groupTitleHeight(e,t){const{labelValue:i}=e,{label:n}=this.properties.group;if(null!=i&&!(n.fontSize>t.width/3||n.fontSize>t.height/3)){const{height:e}=function(e,t){const{fontStyle:i,fontWeight:n,fontSize:s,fontFamily:r}=t;wP.setProperties({text:e,fontStyle:i,fontWeight:n,fontSize:s,fontFamily:r,textAlign:"left",textBaseline:"top"});const{width:o,height:a}=wP.getBBox();return{width:o,height:a}}(i,n);return Math.max(e,n.fontSize)}}getNodePadding(e,t){if(null==e.parent)return{top:0,right:0,bottom:0,left:0};if(0===e.children.length){const{padding:e}=this.properties.tile;return{top:e,right:e,bottom:e,left:e}}const{label:{spacing:i},padding:n}=this.properties.group,s=this.groupTitleHeight(e,t);return{top:n+(null!=s?s+i:0),right:n,bottom:n,left:n}}sortChildren({children:e}){const t=Array.from(e,(e,t)=>t).filter(t=>xP(e[t])>0).sort((t,i)=>xP(e[i])-xP(e[t]));return{sortedChildrenIndices:t,childAt:i=>{const n=t[i];return e[n]}}}squarify(e,t){const{datum:i,children:n}=e;if(t.width<=0||t.height<=0)return e.bbox=void 0,e.padding=void 0,e.midPoint.x=NaN,void(e.midPoint.y=NaN);const s=null!=i?this.getNodePadding(e,t):{top:0,right:0,bottom:0,left:0};null==e.parent?(e.bbox=void 0,e.padding=void 0,e.midPoint.x=NaN,e.midPoint.y=NaN):(e.bbox=t,e.padding=s,e.midPoint.x=t.x+t.width/2,e.midPoint.y=t.y);const{sortedChildrenIndices:r,childAt:o}=this.sortChildren(e),a=r.every(e=>0===n[e].children.length),l=t.width-s.left-s.right,c=t.height-s.top-s.bottom;if(l<=0||c<=0)return;const h=r.length;let d=0,u=0,p=1/0,g=r.reduce((e,t)=>e+xP(n[t]),0);const f=new fP(t.x+s.left,t.y+s.top,l,c),m=f.clone();let v=0;for(;v<h;){const e=xP(o(v)),t=xP(o(u)),i=m.width<m.height;d+=e;const n=i?m.height:m.width,s=i?m.width:m.height,r=s*t/d;let l=n*d/g;const c=Math.max(r,l)/Math.min(r,l),h=Math.abs(1-c);if(h<p){p=h,v++;continue}d-=e,l=n*d/g;let y=i?m.x:m.y;for(let e=u;e<v;e++){const t=o(e),n=xP(t),r=i?y:m.x,c=i?m.y:y,h=s*n/d,u=new fP(r,c,i?h:l,i?l:h);this.applyGap(f,u,a),this.squarify(t,u),g-=n,y+=h}i?(m.y+=l,m.height-=l):(m.x+=l,m.width-=l),u=v,d=0,p=1/0}const y=m.width<m.height;let C=y?m.x:m.y;for(let e=u;e<h;e++){const t=o(e),i=y?C:m.x,n=y?m.y:C,s=xP(t)/g,r=m.width*(y?s:1),l=m.height*(y?1:s),c=new fP(i,n,r,l);this.applyGap(f,c,a),this.squarify(t,c),C+=y?r:l}}applyGap(e,t,i){const n=i?.5*this.properties.tile.gap:.5*this.properties.group.gap,r=e=>({left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height}),o=r(e),a=r(t);["top","right","bottom","left"].forEach(e=>{(0,s.YX)(o[e],a[e])||t.shrink(n,e)})}createNodeData(){}getGroupBaseStyle(e){const{properties:t}=this,{group:i}=t,n=e?t.highlightStyle.group:void 0;return bP({fill:n?.fill??i.fill,fillOpacity:n?.fillOpacity??i.fillOpacity,stroke:n?.stroke??i.stroke,strokeWidth:n?.strokeWidth??i.strokeWidth,strokeOpacity:n?.strokeOpacity??i.strokeOpacity},t.fillGradientDefaults,t.fillPatternDefaults,t.fillImageDefaults)}getGroupStyleOverrides(e,t,i,n,s){const{id:r,properties:o}=this,{undocumentedGroupFills:a,undocumentedGroupStrokes:l,itemStyler:c}=o,h=n.fill??a[Math.min(i??0,a.length)],d=n.stroke??l[Math.min(i??0,l.length)],u={};if(s||(u.fill=h,u.stroke=d),null!=c){const o=this.cachedDatumCallback(uP(e.join(":"),s?"highlight":"node"),()=>this.callWithContext(c,{seriesId:r,datum:t,depth:i,highlighted:s,fill:h,stroke:d,...n}));Object.assign(u,o)}return bP(u,this.properties.fillGradientDefaults,this.properties.fillPatternDefaults,this.properties.fillImageDefaults)}getTileBaseStyle(e){const{properties:t}=this,{tile:i}=t,n=e?t.highlightStyle.tile:void 0;return bP({fill:n?.fill??i.fill,fillOpacity:n?.fillOpacity??i.fillOpacity,stroke:n?.stroke??i.stroke,strokeWidth:n?.strokeWidth??i.strokeWidth,strokeOpacity:n?.strokeOpacity??i.strokeOpacity},t.fillGradientDefaults,t.fillPatternDefaults,t.fillImageDefaults)}getTileStyleOverrides(e,t,i,n,s,r){const{id:o,properties:a,colorScale:l}=this,{fills:c,strokes:h,itemStyler:d}=a,u=e[0],p=s.fill??c[u%c.length],g=s.stroke??h[u%h.length],f={};if(r||(f.fill=null!=n?l.convert(n):p,f.stroke=g),null!=d){const n=this.cachedDatumCallback(uP(e.join(":"),r?"highlight":"node"),()=>this.callWithContext(d,{seriesId:o,datum:t,depth:i,highlighted:r,fill:p,stroke:g,...s}));Object.assign(f,n)}return bP(f,this.properties.fillGradientDefaults,this.properties.fillPatternDefaults,this.properties.fillImageDefaults)}updateSelections(){let e=this.ctx.highlightManager?.getActiveHighlight();if(null==e||this.properties.group.interactive||0===e.children.length||(e=void 0),this.highlightSelection.update(null!=e?[e]:[],void 0,e=>this.getDatumId(e)),!this.nodeDataRefresh)return;this.nodeDataRefresh=!1;const{seriesRect:t}=this.chart??{};if(!t)return;const i=Array.from(this.rootNode);this.datumSelection.update(i,void 0,e=>this.getDatumId(e)),this.labelSelection.update(i,e=>{e.append([new vP({tag:0}),new vP({tag:1})])},e=>this.getDatumId(e))}updateNodes(){const{rootNode:e,data:t}=this,{childrenKey:i,colorKey:n,colorName:s,labelKey:r,secondaryLabelKey:o,sizeKey:a,sizeName:l,highlightStyle:c,tile:h,group:d}=this.properties,{seriesRect:u}=this.chart??{};if(!u||!t)return;this.rootNode?.walk(e=>{const{datum:t,depth:c,children:u}=e,p=0===u.length,g=p?h.label:d.label;let f,m;if(null!=t&&null!=c&&null!=r){const e=t[r];f=this.getLabelText(g,{depth:c,datum:t,childrenKey:i,colorKey:n,colorName:s,labelKey:r,secondaryLabelKey:o,sizeKey:a,sizeName:l,value:e})}if(""===f&&(f=void 0),p&&null!=t&&null!=c&&null!=o){const e=t[o];m=this.getLabelText(h.secondaryLabel,{depth:c,datum:t,childrenKey:i,colorKey:n,colorName:s,labelKey:r,secondaryLabelKey:o,sizeKey:a,sizeName:l,value:e})}""===m&&(m=void 0),e.labelValue=f,e.secondaryLabelValue=m});const{width:p,height:g}=u;this.squarify(e,new fP(0,0,p,g)),this.rootNode?.walk(e=>{const{bbox:t,children:i,labelValue:n,secondaryLabelValue:s}=e;if(e.label=void 0,e.secondaryLabel=void 0,null!=t)if(0===i.length){const i={width:t.width,height:t.height,meta:null},r=rm(n,this.properties.tile.label,s,this.properties.tile.secondaryLabel,{padding:h.padding},()=>i);if(null==r)return;const{height:o,label:a,secondaryLabel:l}=r,{textAlign:c,verticalAlign:d,padding:u}=h,p=EP[c]??.5,g=t.x+u+(t.width-2*u)*p,f=MP[d]??.5,m=t.y+u+.5*o+(t.height-2*u-o)*f;if(null!=a){const{fontStyle:t="normal",fontFamily:i,fontWeight:n="normal",color:s="black"}=this.properties.tile.label;e.label={text:a.text,fontSize:a.fontSize,lineHeight:a.lineHeight,fontStyle:t,fontFamily:i,fontWeight:n,color:s,textAlign:c,verticalAlign:"middle",x:g,y:m-.5*(o-a.height)}}if(null!=l){const{fontStyle:t="normal",fontFamily:i,fontWeight:n="normal",color:s="black"}=this.properties.tile.secondaryLabel;e.secondaryLabel={text:l.text,fontSize:l.fontSize,lineHeight:l.fontSize,fontStyle:t,fontFamily:i,fontWeight:n,color:s,textAlign:c,verticalAlign:"middle",x:g,y:m+.5*(o-l.height)}}}else{if(null==n)return;{const{padding:i,textAlign:s}=d,r=this.groupTitleHeight(e,t);if(null==r)return;const o=t.width-2*i,a=dP.wrapText(n,{maxWidth:t.width-2*i,font:d.label,textWrap:"never"}),l=EP[s]??.5,{fontStyle:c="normal",fontFamily:h,fontWeight:u="normal",color:p="black"}=this.properties.group.label;e.label={text:a,fontSize:d.label.fontSize,lineHeight:hP.getLineHeight(d.label.fontSize),fontStyle:c,fontFamily:h,fontWeight:u,color:p,textAlign:s,verticalAlign:"middle",x:t.x+i+o*l,y:t.y+i+.5*r}}}});const f={series:new fP(0,0,p,g),axis:new fP(0,0,p,g)},m=(e,t,i,n,s)=>{const{bbox:r}=e;if(null==r)return void(t.visible=!1);const{datum:o,depth:a=-1,datumIndex:l,colorValue:c}=e,u=0===e.children.length,p=u?n:i,g=u?this.getTileStyleOverrides(l,o,a,c,p,s):this.getGroupStyleOverrides(l,o,a,p,s);t.crisp=!0,CP(t,p,g,f),t.cornerRadius=u?h.cornerRadius:d.cornerRadius,t.zIndex=[0,a,s?1:0];const m=e.parent?.children.every(e=>0===e.children.length),v=null!=e.parent?e.parent.bbox:void 0,y=null!=e.parent?e.parent.padding:void 0;!0===m&&null!=v&&null!=y?(t.clipBBox=r,t.x=v.x+y.left,t.y=v.y+y.top,t.width=v.width-(y.left+y.right),t.height=v.height-(y.top+y.bottom)):(t.clipBBox=void 0,t.x=r.x,t.y=r.y,t.width=r.width,t.height=r.height),t.visible=!0},v=this.getGroupBaseStyle(!1),y=this.getTileBaseStyle(!1);this.datumSelection.each((e,t)=>m(t,e,v,y,!1));const C=this.getGroupBaseStyle(!0),b=this.getTileBaseStyle(!0);this.highlightSelection.each((e,t)=>{m(t,e,C,b,!0)});const S=this.ctx.highlightManager?.getActiveHighlight();this.labelSelection.selectByClass(vP).forEach(e=>{const t=e.closestDatum();((e,t,i,n)=>{const s=0===e.children.length,r=0===i?e.label:e.secondaryLabel;if(null==r)return void(t.visible=!1);let o;if(n){const{tile:e,group:t}=c;o=e.secondaryLabel.color,s?0===i&&(o=e.label.color):o=t.label.color}t.text=r.text,t.fontSize=r.fontSize,t.lineHeight=r.lineHeight,t.fontStyle=r.fontStyle,t.fontFamily=r.fontFamily,t.fontWeight=r.fontWeight,t.fill=o??r.color,t.textAlign=r.textAlign,t.textBaseline=r.verticalAlign,t.x=r.x,t.y=r.y,t.visible=!0,t.zIndex=1})(t,e,e.tag,t===S)})}pickNodesExactShape(e){const t=super.pickNodesExactShape(e);return t.sort((e,t)=>t.datumIndex.length-e.datumIndex.length),t}pickNodeClosestDatum(e){const t=this.pickNodesExactShape(e);return 0!==t.length?{datum:t[0],distance:0}:this.pickNodeNearestDistantObject(e,this.datumSelection.nodes())}getTooltipContent(e){const{id:t,properties:i}=this,{labelKey:s,secondaryLabelKey:r,childrenKey:o,sizeKey:a,sizeName:l,colorKey:c,colorName:h,tooltip:d}=i,u=e.reduce((e,t)=>e?.children[t],this.rootNode);if(null==u)return;const{datum:p,depth:g,children:f}=u;if(null==p||null==g)return;const m=0===f.length,v=[],y=null!=a?p[a]:void 0;null!=y&&v.push({label:l,fallbackLabel:a,value:y});const C=null!=c?p[c]:void 0;let b;null!=C&&v.push({label:h,fallbackLabel:c,value:C}),m?(b=this.getTileBaseStyle(!1),Object.assign(b,this.getTileStyleOverrides(e,p,g,C,b,!1))):(b=this.getGroupBaseStyle(!1),Object.assign(b,this.getGroupStyleOverrides(e,p,g,b,!1)));const S=b.fill,w=bP({shape:"square",fill:S,fillOpacity:1,stroke:void 0,strokeWidth:0,strokeOpacity:1,lineDash:[0],lineDashOffset:0},this.properties.fillGradientDefaults,this.properties.fillPatternDefaults,this.properties.fillImageDefaults);n.n1.isGradientFill(w.fill)&&(w.fill={...w.fill,gradient:"linear",rotation:0,reverse:!1});const x=m?{marker:w}:void 0;return this.formatTooltipWithContext(d,{title:null!=s?p[s]:void 0,symbol:x,data:v},{seriesId:t,datum:p,title:void 0,depth:g,labelKey:s,secondaryLabelKey:r,childrenKey:o,sizeKey:a,sizeName:l,colorKey:c,colorName:h,...b})}computeFocusBounds(e){return yP.toCanvas(this.contentGroup,e.getBBox())}});AP.className="TreemapSeries",AP.type="treemap";var{commonSeriesOptionsDefs:TP,treemapSeriesThemeableOptionsDef:DP,without:IP}=n.n1,RP={...DP,...IP(TP,["highlightStyle"]),type:(0,s.mw)((0,s.dY)("treemap")),labelKey:s.Yj,secondaryLabelKey:s.Yj,childrenKey:s.Yj,sizeKey:s.Yj,colorKey:s.Yj,sizeName:s.Yj,colorName:s.Yj};RP.fillGradientDefaults=(0,s._L)(s.wi),RP.fillPatternDefaults=(0,s._L)(s.GY),RP.fillImageDefaults=(0,s._L)(s.Zd),RP.undocumentedGroupFills=(0,s._L)((0,s.jk)(s.yW)),RP.undocumentedGroupStrokes=(0,s._L)((0,s.jk)(s.yW));var{FONT_SIZE_RATIO:LP}=n.n1,kP={type:"series",optionsKey:"series[]",packageType:"enterprise",chartTypes:["hierarchy"],identifier:"treemap",moduleFactory:e=>new AP(e),tooltipDefaults:{range:"exact"},solo:!0,themeTemplate:{series:{fills:{$palette:"fills"},strokes:{$palette:"strokes"},colorRange:{$palette:"divergingColors"},fillGradientDefaults:{type:"gradient",gradient:"linear",bounds:"item",colorStops:{$palette:"gradient"},rotation:0,reverse:!1},fillPatternDefaults:n.n1.FILL_PATTERN_DEFAULTS,fillImageDefaults:n.n1.FILL_IMAGE_DEFAULTS,undocumentedGroupFills:{$palette:"hierarchyColors"},undocumentedGroupStrokes:{$palette:"secondHierarchyColors"},group:{label:{enabled:!0,color:{$ref:"textColor"},fontStyle:void 0,fontWeight:{$ref:"fontWeight"},fontSize:{$ref:"fontSize"},fontFamily:{$ref:"fontFamily"},spacing:4},fill:void 0,stroke:void 0,strokeWidth:1,padding:4,gap:2,textAlign:"left"},tile:{label:{enabled:!0,color:{$ref:"backgroundColor"},fontStyle:void 0,fontWeight:{$ref:"fontWeight"},fontSize:{$rem:[1.5]},minimumFontSize:{$rem:[LP.SMALLER]},fontFamily:{$ref:"fontFamily"},wrapping:"on-space",overflowStrategy:"ellipsis",spacing:2},secondaryLabel:{enabled:!0,color:{$ref:"backgroundColor"},fontStyle:void 0,fontWeight:void 0,fontSize:{$ref:"fontSize"},minimumFontSize:{$rem:[LP.SMALLER]},fontFamily:{$ref:"fontFamily"},wrapping:"never",overflowStrategy:"ellipsis"},fill:void 0,stroke:void 0,strokeWidth:0,padding:3,gap:1},highlightStyle:{group:{label:{color:{$ref:"textColor"}},fill:"rgba(255,255,255, 0.33)",stroke:"rgba(0, 0, 0, 0.4)",strokeWidth:2},tile:{label:{color:{$ref:"backgroundColor"}},secondaryLabel:{color:{$ref:"backgroundColor"}},fill:"rgba(255,255,255, 0.33)",stroke:"rgba(0, 0, 0, 0.4)",strokeWidth:2}}},gradientLegend:{enabled:!0}}},PP={type:"series",name:"treemap",chartType:"hierarchy",enterprise:!0,options:RP,create:e=>new AP(e)},NP=(n.n1.ModuleRegistry,[Wu,Ng,Zf,pw,Uw,Gm,$m,ay,Jy,qC,ju,Ku,$u,Yu,BT,yI,MI,gR,LR,ep,sS,xk,rp,Jx,OL,hp,Xk,PP,fp,bD,Ep,$E,aM,KM,xA,zA,lb,cb,hb]),OP={xMin:0,xMax:1,yMin:2,yMax:3,span:4};function _P(e,t){return Array.from({length:e},(e,i)=>{const n=4*i;return(t[n+0]+t[n+1])/2|0})}var{ChartAxisDirection:FP,ContinuousScale:GP,DiscreteTimeScale:VP}=n.n1,BP=class extends n.n1.BarSeries{aggregateData(e,t){if("ungrouped"!==t?.type)return;const i=this.axes[FP.X];if(null==i||!GP.is(i.scale)&&!VP.is(i.scale))return;const n=e.resolveKeysById(this,"xValue",t),s=e.resolveColumnById(this,"yValue-raw",t),{index:r}=e.resolveProcessedDataDefById(this,"xValue");return function(e,t,i){if(e.length<1e3)return;const[n,s]=Fg(i);let r=_g(e,5),{indexData:o,valueData:a}=Bg(e,t,t,n,s,r),l=_P(r,o);const c=[{maxRange:r,indexData:o,indices:l,indexes:OP}];for(;r>64;)({indexData:o,valueData:a,maxRange:r}=Hg(o,a,r)),l=_P(r,o),c.push({maxRange:r,indexData:o,indices:l,indexes:OP});return c.reverse(),c}(n,s,t.domain.keys[r])}},{BarSeriesModule:HP}=n.n1,zP={...HP,type:"series",optionsKey:"series[]",packageType:"enterprise",chartTypes:["cartesian"],identifier:"bar",moduleFactory:e=>new BP(e)};function UP(e,t,i,n,s,r){const o=e[r];if(null==o)return!1;const a=Vg(Gg(o,t,i),s);return r===n[a+0]||r===n[a+1]||r===n[a+2]||r===n[a+3]}var{ChartAxisDirection:WP,ContinuousScale:jP,DiscreteTimeScale:KP}=n.n1,$P=class extends n.n1.LineSeries{aggregateData(e,t){const i=this.axes[WP.X];if(null!=i&&(jP.is(i.scale)||KP.is(i.scale)))return function(e,t,i){if(e.length<1e3)return;const[n,s]=Fg(i);let r=_g(e,10);const{indexData:o,valueData:a}=Bg(e,t,t,n,s,r);let l=[];for(let t=0;t<e.length;t+=1)UP(e,n,s,o,r,t)&&l.push(t);const c=[{maxRange:r,indices:l}];for(;l.length>10&&r>64;)({maxRange:r}=Hg(o,a,r,{inPlace:!0})),l=l.filter(UP.bind(null,e,n,s,o,r)),c.push({maxRange:r,indices:l});return c.reverse(),c}(e.resolveColumnById(this,"xValue",t),e.resolveColumnById(this,"yValueRaw",t),e.getDomain(this,"xValue","value",t))}},{LineSeriesModule:YP}=n.n1,qP={...YP,type:"series",optionsKey:"series[]",packageType:"enterprise",chartTypes:["cartesian"],identifier:"line",moduleFactory:e=>new $P(e)};n.n1.ModuleRegistry.registerMany(NP),n.n1.moduleRegistry.register(Q,le,Je,Ml,Ol,zP,jc,Pg,Xf,nS,uw,zw,Km,zl,ic,vc,Sc,Vc,Qx,qP,KE,oM,jM,wA,HA,Mh,nd,Fu,Fm,VT,pe,vI,EI,pR,RR,We,NL,qe,Qy,oy,Fh,CD,wk,Bh,qk,yd,kP,YC,wu),n.n1.enterpriseModule.isEnterprise=!0,n.n1.enterpriseModule.styles='.ag-watermark{position:absolute;bottom:20px;right:25px;font-weight:700;font-family:Impact,sans-serif;font-size:19px;opacity:.7;animation:1s ease-out 3s ag-watermark-fadeout;color:#9b9b9b;pointer-events:none;&:before{content:"";display:block;height:40px;width:170px;background-image:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjU4IiBoZWlnaHQ9IjQwIiB2aWV3Qm94PSIwIDAgMjU4IDQwIiBmaWxsPSJub25lIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPgo8cGF0aCBkPSJNMjUuNzc5IDI4LjY1N0gxMy4zNTlMMTEuMTczIDM0LjAxMkg1LjY3Mjk3TDE3LjE4MiA3LjA1OTk5SDIxLjk1M0wzMy40NjIgMzQuMDEySDI3Ljk2MkwyNS43NzYgMjguNjU3SDI1Ljc3OVpNMjQuMDY4IDI0LjM5N0wxOS41ODggMTMuNDM0TDE1LjEwNyAyNC4zOTdIMjQuMDY4Wk02Mi4wOTIgMTguODIzSDQ5LjgxN1YyMy4wODZINTYuNzc1QzU2LjU1NSAyNS4yMjIgNTUuNzU1IDI2LjkyNyA1NC4zNzIgMjguMjAyQzUyLjk4OSAyOS40NzYgNTEuMTY2IDMwLjExNSA0OC45MDkgMzAuMTE1QzQ3LjYyMiAzMC4xMTUgNDYuNDUgMjkuODg1IDQ1LjM5MyAyOS40MjNDNDQuMzU4MyAyOC45NzgxIDQzLjQzMjYgMjguMzEzOCA0Mi42OCAyNy40NzZDNDEuOTI3IDI2LjYzOSA0MS4zNDQgMjUuNjMxIDQwLjkzMSAyNC40NTNDNDAuNTE5IDIzLjI3NSA0MC4zMTEgMjEuOTcgNDAuMzExIDIwLjUzN0M0MC4zMTEgMTkuMTA1IDQwLjUxNiAxNy44IDQwLjkzMSAxNi42MjFDNDEuMzQ0IDE1LjQ0MyA0MS45MjcgMTQuNDM2IDQyLjY4IDEzLjU5OEM0My40Mzc2IDEyLjc1NzcgNDQuMzY5NiAxMi4wOTMyIDQ1LjQxMSAxMS42NTFDNDYuNDc4IDExLjE4OSA0Ny42NTYgMTAuOTYgNDguOTQ2IDEwLjk2QzUxLjYxMiAxMC45NiA1My42MzcgMTEuNjAyIDU1LjAyIDEyLjg4NUw1OC4zIDkuNjA0OTlDNTUuODE3IDcuNjY5OTkgNTIuNjc2IDYuNjk5OTkgNDguODcyIDYuNjk5OTlDNDYuNzYgNi42OTk5OSA0NC44NTMgNy4wMzQ5OSA0My4xNTQgNy43MDA5OUM0MS40NTUgOC4zNjc5OSAzOS45OTggOS4zMDM5OSAzOC43ODMgMTAuNTA0QzM3LjU2NyAxMS43MDcgMzYuNjM0IDEzLjE1OCAzNS45NzcgMTQuODU3QzM1LjMxOSAxNi41NTYgMzQuOTk0IDE4LjQ1MSAzNC45OTQgMjAuNTRDMzQuOTk0IDIyLjYzIDM1LjMyOSAyNC40OTQgMzUuOTk1IDI2LjIwNUMzNi42NjIgMjcuOTE2IDM3LjYwNSAyOS4zNzQgMzguODE3IDMwLjU3N0M0MC4wMzIgMzEuNzggNDEuNDg2IDMyLjcxMyA0My4xODggMzMuMzgzQzQ0Ljg4OCAzNC4wNDkgNDYuNzgyIDM0LjM4NCA0OC44NzIgMzQuMzg0QzUwLjk2MSAzNC4zODQgNTIuNzUgMzQuMDQ5IDU0LjM5IDMzLjM4M0M1Ni4wMzEgMzIuNzE2IDU3LjQyNiAzMS43OCA1OC41NzkgMzAuNTc3QzU5LjczMyAyOS4zNzQgNjAuNjE5IDI3LjkxNiA2MS4yMzkgMjYuMjA1QzYxLjg2IDI0LjQ5NCA2Mi4xNyAyMi42MDUgNjIuMTcgMjAuNTRDNjIuMTY5NiAxOS45Njg4IDYyLjE0NDUgMTkuMzk4IDYyLjA5NSAxOC44MjlMNjIuMDkyIDE4LjgyM1pNMTUxLjgxIDE2Ljk4MUMxNTMuNDEgMTQuNjA5IDE1Ny40MTkgMTQuMzU4IDE1OS4wMjIgMTQuMzU4VjE4LjkxQzE1Ni45NTcgMTguOTEgMTU0Ljk4NSAxOC45OTYgMTUzLjc1NyAxOS44OTJDMTUyLjUyOSAyMC43OTIgMTUxLjkxOSAyMS45ODIgMTUxLjkxOSAyMy40NjRWMzMuOTlIMTQ2Ljk2NFYxNC4zNThIMTUxLjczNkwxNTEuODEgMTYuOTgxWk0xNDMuMDExIDE0LjM2MVYzNC4wMzFIMTM4LjI0TDEzOC4xMzEgMzEuMDQ1QzEzNy40NjYgMzIuMDc2IDEzNi41NTEgMzIuOTIxOSAxMzUuNDcxIDMzLjUwNEMxMzQuMzc2IDM0LjA5OSAxMzMuMDY4IDM0LjM5NiAxMzEuNTM2IDM0LjM5NkMxMzAuMiAzNC4zOTYgMTI4Ljk2MyAzNC4xNTIgMTI3LjgyMiAzMy42NjhDMTI2LjcgMzMuMTk2NCAxMjUuNjg5IDMyLjQ5NSAxMjQuODU1IDMxLjYwOUMxMjQuMDE4IDMwLjcyMiAxMjMuMzU0IDI5LjY2MiAxMjIuODcxIDI4LjQyMkMxMjIuMzg0IDI3LjE4NSAxMjIuMTQyIDI1LjgxMSAxMjIuMTQyIDI0LjMwNEMxMjIuMTQyIDIyLjc5OCAxMjIuMzg0IDIxLjM3OCAxMjIuODcxIDIwLjExNkMxMjMuMzU3IDE4Ljg1NCAxMjQuMDE4IDE3Ljc3MiAxMjQuODU1IDE2Ljg3M0MxMjUuNjg4IDE1Ljk3NjQgMTI2LjY5OCAxNS4yNjM2IDEyNy44MjIgMTQuNzhDMTI4Ljk2MyAxNC4yODEgMTMwLjIwMyAxNC4wMzMgMTMxLjUzNiAxNC4wMzNDMTMzLjA0MyAxNC4wMzMgMTM0LjMzIDE0LjMxOCAxMzUuMzk3IDE0Ljg4OEMxMzYuNDYyIDE1LjQ1ODkgMTM3LjM3NSAxNi4yNzggMTM4LjA1NyAxNy4yNzZWMTQuMzYxSDE0My4wMTFaTTEzMi42MzEgMzAuMTMzQzEzNC4yNTYgMzAuMTMzIDEzNS41NjcgMjkuNTk0IDEzNi41NjUgMjguNTEyQzEzNy41NjEgMjcuNDMgMTM4LjA2IDI1Ljk5MSAxMzguMDYgMjQuMTk2QzEzOC4wNiAyMi40MDEgMTM3LjU2MSAyMC45OSAxMzYuNTY1IDE5Ljg5OUMxMzUuNTcgMTguODA3IDEzNC4yNTkgMTguMjU4IDEzMi42MzEgMTguMjU4QzEzMS4wMDMgMTguMjU4IDEyOS43MjkgMTguODA0IDEyOC43MzQgMTkuODk5QzEyNy43MzggMjAuOTkzIDEyNy4yMzkgMjIuNDM4IDEyNy4yMzkgMjQuMjMzQzEyNy4yMzkgMjYuMDI4IDEyNy43MzUgMjcuNDMzIDEyOC43MzQgMjguNTE1QzEyOS43MjkgMjkuNTk0IDEzMS4wMjggMzAuMTM2IDEzMi42MzEgMzAuMTM2VjMwLjEzM1pNOTMuNjk4IDI3Ljg3NkM5My41Nzk1IDI4LjAwMjUgOTMuNDU2NCAyOC4xMjQ2IDkzLjMyOSAyOC4yNDJDOTEuOTQ3IDI5LjUxNiA5MC4xMjMgMzAuMTU1IDg3Ljg2NiAzMC4xNTVDODYuNTggMzAuMTU1IDg1LjQwOCAyOS45MjYgODQuMzUgMjkuNDY0QzgzLjMxNTUgMjkuMDE4OSA4Mi4zODk4IDI4LjM1NDYgODEuNjM3IDI3LjUxN0M4MC44ODQgMjYuNjc5IDgwLjMwMSAyNS42NzIgNzkuODg5IDI0LjQ5NEM3OS40NzYgMjMuMzE1IDc5LjI2OSAyMi4wMSA3OS4yNjkgMjAuNTc4Qzc5LjI2OSAxOS4xNDUgNzkuNDczIDE3Ljg0IDc5Ljg4OSAxNi42NjJDODAuMzAxIDE1LjQ4NCA4MC44ODQgMTQuNDc2IDgxLjYzNyAxMy42MzlDODIuMzk0OSAxMi43OTg3IDgzLjMyNzMgMTIuMTM0MiA4NC4zNjkgMTEuNjkyQzg1LjQzNiAxMS4yMyA4Ni42MTQgMTEgODcuOTAzIDExQzkwLjU3IDExIDkyLjU5NSAxMS42NDIgOTMuOTc3IDEyLjkyNkw5Ny4yNTggOS42NDQ5OUM5NC43NzQgNy43MTA5OSA5MS42MzMgNi43Mzk5OSA4Ny44MjkgNi43Mzk5OUM4NS43MTggNi43Mzk5OSA4My44MTEgNy4wNzQ5OSA4Mi4xMTIgNy43NDE5OUM4MC40MTMgOC40MDc5OSA3OC45NTYgOS4zNDQ5OSA3Ny43NCAxMC41NDVDNzYuNTI1IDExLjc0NyA3NS41OTIgMTMuMTk5IDc0LjkzNCAxNC44OThDNzQuMjc3IDE2LjU5NyA3My45NTEgMTguNDkxIDczLjk1MSAyMC41ODFDNzMuOTUxIDIyLjY3IDc0LjI4NiAyNC41MzQgNzQuOTUzIDI2LjI0NUM3NS42MTkgMjcuOTU3IDc2LjU2MiAyOS40MTQgNzcuNzc0IDMwLjYxN0M3OC45OSAzMS44MiA4MC40NDQgMzIuNzUzIDgyLjE0NiAzMy40MjNDODMuODQ1IDM0LjA5IDg1LjczOSAzNC40MjQgODcuODI5IDM0LjQyNEM4OS45MTkgMzQuNDI0IDkxLjcwOCAzNC4wOSA5My4zNDggMzMuNDIzQzk0LjcxOCAzMi44NjUgOTUuOTE4IDMyLjEyMSA5Ni45NDggMzEuMTkxQzk3LjE0OSAzMS4wMDggOTcuMzQ4IDMwLjgxNSA5Ny41MzcgMzAuNjJMOTMuNzAxIDI3Ljg4NUw5My42OTggMjcuODc2Wk0xMTAuODAyIDE0LjAxNUMxMDkuMTk5IDE0LjAxNSAxMDYuODM2IDE0LjQ3MSAxMDUuNjExIDE2LjE1OEwxMDUuNTM3IDYuMDE1OTlIMTAwLjc2NVYzMy45MzlIMTA1LjcyVjIyLjY0MUMxMDUuNzcxIDIxLjQ2MDcgMTA2LjI4OCAyMC4zNDg4IDEwNy4xNTcgMTkuNTQ4OUMxMDguMDI3IDE4Ljc0OTEgMTA5LjE3OCAxOC4zMjY2IDExMC4zNTggMTguMzc0QzExMy4zOTcgMTguMzc0IDExNC4yNjggMjEuMTU5IDExNC4yNjggMjIuNjQxVjMzLjkzOUgxMTkuMjIzVjIxLjA1OUMxMTkuMjIzIDIxLjA1OSAxMTkuMTQyIDE0LjAxNSAxMTAuODAyIDE0LjAxNVpNMTczLjc2MyAxNC4zNThIMTY5Ljk5OVY4LjcxNDk5SDE2NS4wNDhWMTQuMzU4SDE2MS4yODRWMTguOTE2SDE2NS4wNDhWMzQuMDAzSDE2OS45OTlWMTguOTE2SDE3My43NjNWMTQuMzU4Wk0xOTAuNzg3IDI1LjI2MkMxOTAuMTI5IDI0LjUwMTQgMTg5LjMwNyAyMy44OTk0IDE4OC4zODQgMjMuNTAxQzE4Ny40ODggMjMuMTE3IDE4Ni4zMzEgMjIuNzMyIDE4NC45NDggMjIuMzY0QzE4NC4xNjUgMjIuMTQzOSAxODMuMzkgMjEuODk3OCAxODIuNjIzIDIxLjYyNkMxODIuMTYzIDIxLjQ2MjEgMTgxLjc0MSAyMS4yMDY2IDE4MS4zODMgMjAuODc1QzE4MS4yMzUgMjAuNzQyMSAxODEuMTE4IDIwLjU3ODkgMTgxLjAzOSAyMC4zOTY0QzE4MC45NjEgMjAuMjE0IDE4MC45MjIgMjAuMDE2NiAxODAuOTI3IDE5LjgxOEMxODAuOTI3IDE5LjI3MiAxODEuMTU2IDE4Ljg0NCAxODEuNjI1IDE4LjUxQzE4Mi4xMjEgMTguMTU2IDE4Mi44NjIgMTcuOTc2IDE4My44MjYgMTcuOTc2QzE4NC43OSAxNy45NzYgMTg1LjU4NyAxOC4yMDkgMTg2LjE0OCAxOC42NjhDMTg2LjcwNiAxOS4xMjQgMTg3LjAwNyAxOS43MjUgMTg3LjA3MiAyMC41TDE4Ny4wOTQgMjAuNzgySDE5MS42MzNMMTkxLjYxNyAyMC40NkMxOTEuNTIxIDE4LjQ4NSAxOTAuNzcxIDE2LjkgMTg5LjM4NSAxNS43NUMxODguMDEyIDE0LjYxMiAxODYuMTg1IDE0LjAzMyAxODMuOTYyIDE0LjAzM0MxODIuNDc3IDE0LjAzMyAxODEuMTQxIDE0LjI4NyAxNzkuOTk0IDE0Ljc4NkMxNzguODMxIDE1LjI5MSAxNzcuOTI2IDE1Ljk5NSAxNzcuMjk2IDE2Ljg4MkMxNzYuNjczIDE3Ljc0NTUgMTc2LjMzOCAxOC43ODQgMTc2LjM0MSAxOS44NDlDMTc2LjM0MSAyMS4xNjcgMTc2LjY5OCAyMi4yNDkgMTc3LjM5OSAyMy4wNjRDMTc4LjA2IDIzLjg0MzIgMTc4Ljg5OCAyNC40NTM0IDE3OS44NDIgMjQuODQ0QzE4MC43NDQgMjUuMjE2IDE4MS45MjggMjUuNjA3IDE4My4zNjEgMjZDMTg0LjgwNiAyNi40MSAxODUuODcyIDI2Ljc4NSAxODYuNTMgMjcuMTIzQzE4Ny4xIDI3LjQxNCAxODcuMzc5IDI3Ljg0NSAxODcuMzc5IDI4LjQ0NEMxODcuMzc5IDI5LjA0MiAxODcuMTIyIDI5LjQ2NyAxODYuNTk1IDI5LjgzOUMxODYuMDQzIDMwLjIyNiAxODUuMjM3IDMwLjQyNSAxODQuMjAxIDMwLjQyNUMxODMuMTY2IDMwLjQyNSAxODIuMzk0IDMwLjE3NCAxODEuNzQ5IDI5LjY3NEMxODEuMTEzIDI5LjE4MSAxODAuNzcyIDI4LjU4OSAxODAuNzEgMjcuODY0TDE4MC42ODUgMjcuNTgySDE3Ni4wMTNMMTc2LjAyNSAyNy45MDFDMTc2LjA2NyAyOS4wOTU1IDE3Ni40NzIgMzAuMjQ4NyAxNzcuMTg4IDMxLjIwNkMxNzcuOTA3IDMyLjE4IDE3OC44OTMgMzIuOTU4IDE4MC4xMTggMzMuNTE5QzE4MS4zMzYgMzQuMDc3IDE4Mi43MzIgMzQuMzYyIDE4NC4yNjYgMzQuMzYyQzE4NS44MDEgMzQuMzYyIDE4Ny4xMDkgMzQuMTA4IDE4OC4yMzggMzMuNjA5QzE4OS4zNzYgMzMuMTA0IDE5MC4yNzIgMzIuMzk0IDE5MC45MDEgMzEuNDk0QzE5MS41MzQgMzAuNTkyIDE5MS44NTMgMjkuNTU0IDE5MS44NTMgMjguNDAzQzE5MS44MjggMjcuMTEgMTkxLjQ2NiAyNi4wNTMgMTkwLjc3NyAyNS4yNjJIMTkwLjc4N1oiIGZpbGw9IiM5QjlCOUIiLz4KPHBhdGggZD0iTTI0MS45ODIgMjUuNjU4MlYxNy43MTE3SDIyOC40NDFMMjIwLjQ5NCAyNS42NTgySDI0MS45ODJaIiBmaWxsPSIjOUI5QjlCIi8+CjxwYXRoIGQ9Ik0yNTcuMjM5IDUuOTUwODFIMjQwLjI2NUwyMzIuMjU1IDEzLjg5NzNIMjU3LjIzOVY1Ljk1MDgxWiIgZmlsbD0iIzlCOUI5QiIvPgo8cGF0aCBkPSJNMjEyLjYxMSAzMy42MDQ4TDIxNi42OCAyOS41MzYxSDIzMC40MTJWMzcuNDgyN0gyMTIuNjExVjMzLjYwNDhaIiBmaWxsPSIjOUI5QjlCIi8+CjxwYXRoIGQ9Ik0yMTUuNTk5IDIxLjc4MDNIMjI0LjM3MkwyMzIuMzgyIDEzLjgzMzdIMjE1LjU5OVYyMS43ODAzWiIgZmlsbD0iIzlCOUI5QiIvPgo8cGF0aCBkPSJNMjA2IDMzLjYwNDdIMjEyLjYxMUwyMjAuNDk0IDI1LjY1ODJIMjA2VjMzLjYwNDdaIiBmaWxsPSIjOUI5QjlCIi8+CjxwYXRoIGQ9Ik0yNDAuMjY1IDUuOTUwODFMMjM2LjE5NyAxMC4wMTk0SDIxMC4yNTlWMi4wNzI4OEgyNDAuMjY1VjUuOTUwODFaIiBmaWxsPSIjOUI5QjlCIi8+Cjwvc3ZnPgo=);background-repeat:no-repeat;background-size:170px 40px}>span{padding-left:.7rem}}@keyframes ag-watermark-fadeout{0%{opacity:.5}to{opacity:0}}.ag-charts-dialog{display:flex;flex-direction:column;font-size:var(--ag-charts-chrome-font-size-large)}.ag-charts-dialog__tabs{display:flex;flex-direction:column}.ag-charts-dialog__header{border-bottom:1px solid var(--ag-charts-border-color);display:flex}.ag-charts-dialog__tab-list{display:flex;gap:calc(var(--ag-charts-spacing) * 2)}.ag-charts-dialog__drag-handle{align-items:center;color:inherit;cursor:grab;display:flex;padding:1px 6px;text-align:center}.ag-charts-dialog__drag-handle--dragging{cursor:grabbing}.ag-charts-dialog__tab-button{background:none;border:0;border-bottom:2px solid transparent;border-radius:0;color:var(--ag-charts-chrome-subtle-text-color);margin-bottom:-1px;padding:var(--input-padding) calc(var(--input-padding) / 2)}.ag-charts-dialog__tab-button:hover{background:none}.ag-charts-dialog__tab-button--active{border-color:var(--ag-charts-accent-color);color:inherit}.ag-charts-dialog__drag-handle+.ag-charts-dialog__tab-button{margin-left:calc(var(--ag-charts-spacing) * -2)}.ag-charts-button.ag-charts-dialog__close-button{background:none;border:0;margin-left:auto;padding:1px 6px}.ag-charts-dialog__close-button:focus-visible{outline:var(--ag-charts-focus-border);box-shadow:var(--ag-charts-focus-border-shadow);z-index:calc(var(--ag-charts-layer-ui-overlay) + 1)}.ag-charts-dialog__tab-panel{display:none;flex-direction:column;gap:calc(var(--ag-charts-spacing) * 4);margin:0 calc(var(--ag-charts-spacing) * 4);padding:calc(var(--ag-charts-spacing) * 4) 0}.ag-charts-dialog__tab-panel--active{display:flex}.ag-charts-dialog__input-group-line{display:flex;gap:16px 18px;flex-wrap:wrap}.ag-charts-dialog__input-group{align-items:center;display:flex;font-size:var(--ag-charts-chrome-font-size)}.ag-charts-dialog__input-group-label{color:var(--ag-charts-chrome-subtle-text-color);margin-right:5px}.ag-charts-dialog__input-group-label[for]{cursor:pointer}.ag-charts-dialog__button{border-radius:0;margin-right:-1px}.ag-charts-dialog__button.ag-charts-dialog__button--active{background:var(--ag-charts-button-focus-background-color);border-color:var(--ag-charts-input-focus-border-color);color:var(--ag-charts-input-focus-text-color);z-index:var(--input-layer-active)}.ag-charts-dialog__button:first-child,.ag-charts-dialog__input-group-label+.ag-charts-dialog__button{border-bottom-left-radius:var(--ag-charts-input-border-radius);border-top-left-radius:var(--ag-charts-input-border-radius)}.ag-charts-dialog__button:last-child{border-bottom-right-radius:var(--ag-charts-input-border-radius);border-top-right-radius:var(--ag-charts-input-border-radius)}.ag-charts-dialog__color-picker-button{--color: #000;background:var(--color);border:none;color:transparent;height:26px;width:26px}.ag-charts-dialog__color-picker-button:hover{background:var(--color)}.ag-charts-dialog__color-picker-button--multi-color,.ag-charts-dialog__color-picker-button--multi-color:hover{background:linear-gradient(135deg,red 0%,#ff0 calc(100% * 1 / 6),#0f0 calc(100% * 2 / 6),#0ff 50%,#00f calc(100% * 4 / 6),#f0f calc(100% * 5 / 6),red 100%)}.ag-charts-color-picker{width:190px;padding:8px;--h: 0;--s: 0;--v: 0;--a: 0;--color: #000;--color-a: #000;--thumb-size: 18px;--inner-width: 172px;--track-height: 12px;--palette-height: 136px;--checker: url(\'data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="4" height="4"><rect x="0" y="0" width="4" height="4" fill="%23fff"/><path d="M0 0H2V4H4V2H0Z" fill="%23b2b2b2"/></svg>\');--multi-color: linear-gradient( 135deg, #f00 0% , #ff0 calc(100% * 1 / 6), #0f0 calc(100% * 2 / 6), #0ff 50% , #00f calc(100% * 4 / 6), #f0f calc(100% * 5 / 6), #f00 100% )}.ag-charts-color-picker__content{display:flex;flex-direction:column}.ag-charts-color-picker__palette{position:relative;width:100%;height:var(--palette-height);margin-bottom:8px;background:linear-gradient(to bottom,#0000,#000),linear-gradient(to right,#fff,#fff0) hsl(var(--h),100%,50%);border-radius:calc(var(--ag-charts-border-radius) * 1.5);box-shadow:inset 0 0 0 1px #0003}.ag-charts-color-picker__palette:after{content:"";position:absolute;display:block;top:calc(var(--thumb-size) * -.5 + (1 - var(--v)) * 100%);left:calc(var(--thumb-size) * -.5 + var(--s) * 100%);background:var(--color);width:var(--thumb-size);height:var(--thumb-size);border-radius:calc(var(--ag-charts-border-radius) * 99);box-shadow:var(--box-shadow);--box-shadow: inset 0 0 0 3px white, inset 0 0 1px 3px #0006, 0 0 5px #00000038}.ag-charts-color-picker__palette:focus-visible:after{outline:var(--ag-charts-focus-border);box-shadow:var(--box-shadow),0 0 0 2px #fff8,var(--ag-charts-focus-border-shadow)}.ag-charts-color-picker__color-row{display:flex;gap:8px;align-items:center;margin-bottom:4px;--inset: calc((var(--thumb-size) - var(--track-height)) / 2)}.ag-charts-color-picker__hue-input,.ag-charts-color-picker__alpha-input{-webkit-appearance:none;display:block;position:relative;padding:0;margin:0 calc(var(--inset) * -1);border:0;height:var(--thumb-size);width:auto;background:transparent;--inset: calc((var(--thumb-size) - var(--track-height)) / 2)}.ag-charts-color-picker__hue-input::-webkit-slider-thumb,.ag-charts-color-picker__alpha-input::-webkit-slider-thumb{-webkit-appearance:none;width:var(--thumb-size);height:var(--thumb-size);border-radius:calc(var(--ag-charts-border-radius) * 99);box-shadow:var(--box-shadow);--box-shadow: inset 0 0 0 3px white, inset 0 0 1px 3px #0006, 0 0 5px #00000038;transform:translateZ(0)}.ag-charts-color-picker__hue-input::-webkit-slider-thumb{background:hsl(var(--h),100%,50%)}.ag-charts-color-picker__alpha-input::-webkit-slider-thumb{background:transparent}.ag-charts-color-picker__alpha-input--opaque::-webkit-slider-thumb{background:var(--color)}.ag-charts-color-picker__hue-input:focus-visible::-webkit-slider-thumb,.ag-charts-color-picker__alpha-input:focus-visible::-webkit-slider-thumb{outline:var(--ag-charts-focus-border);box-shadow:var(--box-shadow),var(--ag-charts-focus-border-shadow)}.ag-charts-color-picker__hue-input:before,.ag-charts-color-picker__alpha-input:before{position:absolute;content:"";display:block;top:calc(50% - var(--track-height) / 2);left:var(--inset);right:var(--inset);height:var(--track-height);border-radius:calc(var(--ag-charts-border-radius) * 99);box-shadow:inset 0 0 0 1px #0003}.ag-charts-color-picker__multi-color-button{width:36px;margin-left:var(--inset);height:var(--track-height);border-radius:calc(var(--ag-charts-border-radius) * 99);border:0;background:var(--multi-color);box-shadow:inset 0 0 0 1px #0003}.ag-charts-color-picker__multi-color-button--hidden{display:none}.ag-charts-color-picker__multi-color-button--active{box-shadow:inset 0 0 0 1px #0003;outline-offset:1px;outline:2px solid #2196f3}.ag-charts-color-picker__hue-input{flex:1 0 0}.ag-charts-color-picker__hue-input:before{background:linear-gradient(to right,red,red calc((100% - var(--track-height)) * 0 / 6 + var(--track-height) / 2),#ff0 calc((100% - var(--track-height)) * 1 / 6 + var(--track-height) / 2),#0f0 calc((100% - var(--track-height)) * 2 / 6 + var(--track-height) / 2),#0ff calc((100% - var(--track-height)) * 3 / 6 + var(--track-height) / 2),#00f calc((100% - var(--track-height)) * 4 / 6 + var(--track-height) / 2),#f0f calc((100% - var(--track-height)) * 5 / 6 + var(--track-height) / 2),red calc((100% - var(--track-height)) * 6 / 6 + var(--track-height) / 2))}.ag-charts-color-picker__alpha-input{margin-bottom:7px}.ag-charts-color-picker__alpha-input:before{background:linear-gradient(to right,transparent,var(--color)),var(--checker) top left / 4px 4px}.ag-charts-color-picker__color-field{display:flex;border:var(--ag-charts-border);background:var(--ag-charts-background-color);border-radius:var(--ag-charts-border-radius);overflow:hidden}.ag-charts-color-picker__color-field:has(:focus-visible){border-color:var(--ag-charts-accent-color);box-shadow:var(--ag-charts-focus-border-shadow)}.ag-charts-color-picker__color-label{width:16px;height:16px;margin:7px 0 7px 7px;color:transparent;background:linear-gradient(to right,var(--color-a),var(--color-a)),var(--checker) top left / 4px 4px;border-radius:calc(var(--ag-charts-border-radius) / 2);box-shadow:inset 0 0 0 1px #0003}.ag-charts-color-picker__color-label--multi-color{background:var(--multi-color)}.ag-charts-color-picker__color-input{flex:1;min-width:0;padding:7px 7px 7px 8px;border:0;margin:0;color:inherit;background:transparent;font-variant:tabular-nums}.ag-charts-color-picker__color-input:focus-visible{border:none;outline:none}.ag-charts-annotations__line-stroke-width-menu,.ag-charts-annotations__line-style-type-menu,.ag-charts-annotations__text-size-menu{border-top-left-radius:0;border-top-right-radius:0;.ag-charts-menu__row:first-child{border-radius:0}}.ag-charts-annotations__text-size-menu{--item-padding: 4px 8px;min-width:34px;text-align:center}.ag-charts-annotations__line-stroke-width-menu{--item-padding: 6px;column-gap:6px}.ag-charts-annotations__line-style-type-menu{--item-padding: 6px;column-gap:0}.ag-charts-annotations__stroke-width-button:before{background:var(--ag-charts-foreground-color);content:"";margin-right:var(--toolbar-button-padding);height:min(var(--stroke-width),20px);width:12px}.ag-charts-annotations__stroke-width-button[aria-disabled=true]:before{filter:grayscale(1);opacity:.5}.ag-charts-annotations__color-picker-button{--emblem: var(--color)}.ag-charts-annotations__color-picker-button--multi-color{--emblem: linear-gradient( to right, #f00 0% , #ff0 calc(100% * 1 / 6), #0f0 calc(100% * 2 / 6), #0ff 50% , #00f calc(100% * 4 / 6), #f0f calc(100% * 5 / 6), #f00 100% )}.ag-charts-annotations__color-picker-button:after{content:"";display:block;position:absolute;bottom:3px;left:5px;right:5px;height:4px;border-radius:99px;box-shadow:inset 0 0 0 1px color-mix(in srgb,var(--ag-charts-foreground-color) 10%,transparent);background:var(--emblem)}.ag-charts-annotations__color-picker-button[aria-disabled=true]:after{filter:grayscale(1);opacity:.5}.ag-charts-annotations__toolbar-menu{min-width:200px}.ag-charts-annotations__axis-button--hidden{display:none}.ag-charts-annotations__axis-button{background-color:var(--ag-charts-crosshair-label-background-color);border-radius:calc(var(--ag-charts-border-radius) / 2);border:none;box-sizing:border-box;color:var(--ag-charts-crosshair-label-text-color);cursor:pointer;font-family:var(--ag-charts-chrome-font-family);font-size:var(--ag-charts-chrome-font-size);font-weight:var(--ag-charts-chrome-font-weight);left:0;line-height:16px;overflow:hidden;padding:0;position:absolute;top:0;user-select:none;white-space:nowrap;z-index:var(--ag-charts-layer-annotations)}.ag-charts-annotations__axis-button:hover{opacity:.8;color:var(--ag-charts-background-color)}.ag-charts-dialog--annotation-settings{min-height:233px;width:289px}.ag-charts-dialog--annotation-settings .ag-charts-textarea{height:calc(10px * 2 + var(--textarea-line-height) * 1em * 3 + 2px);overflow-y:auto;resize:vertical}.ag-charts-context-menu{font-family:var(--ag-charts-chrome-font-family);font-size:calc(var(--ag-charts-chrome-font-size) * (13 / 12));font-weight:var(--ag-charts-chrome-font-weight);z-index:var(--ag-charts-layer-ui-overlay)}.ag-charts-context-menu__cover{position:fixed;left:0;top:0}.ag-charts-context-menu__menu{background:var(--ag-charts-chrome-background-color);border-radius:var(--ag-charts-border-radius);border:var(--ag-charts-border);box-shadow:var(--ag-charts-shadow);color:var(--ag-charts-chrome-text-color);display:table;flex-direction:column;padding:.5em 0;transition:transform .1s ease;white-space:nowrap}.ag-charts-context-menu__menu:focus{outline:none}.ag-charts-context-menu__item{align-items:center;background:none;border:none;box-sizing:border-box;color:inherit;display:table-row;font:inherit;justify-content:space-between;text-align:left;width:100%;-webkit-appearance:none;-moz-appearance:none}.ag-charts-context-menu__icon>img{width:var(--ag-charts-icon-size);height:var(--ag-charts-icon-size)}.ag-charts-context-menu__icon,.ag-charts-context-menu__label,.ag-charts-context-menu__rightarrowhead{display:table-cell;vertical-align:middle}.ag-charts-context-menu__cellpadding{padding:.5em 1em}.ag-charts-context-menu__icon{padding-right:0}.ag-charts-context-menu__item[data-focus-override=true],.ag-charts-context-menu__item:focus,.ag-charts-context-menu__item:active{background:var(--ag-charts-focus-color)}.ag-charts-context-menu__item[data-focus-visible-override=true]:focus,.ag-charts-context-menu__item:focus-visible{outline:var(--ag-charts-focus-border);box-shadow:var(--ag-charts-focus-border-shadow);z-index:calc(var(--ag-charts-layer-ui-overlay) + 1)}.ag-charts-context-menu__item[data-focus-visible-override=false]{outline:inherit;box-shadow:inherit;z-index:inherit}.ag-charts-context-menu__item[aria-disabled=true]{border:none;color:color-mix(in srgb,var(--ag-charts-input-text-color) 50%,transparent);text-align:left}.ag-charts-context-menu__item[aria-disabled=true]:focus{background:inherit;cursor:inherit}.ag-charts-context-menu__divider{display:table-row}.ag-charts-context-menu__divider>div{padding:5px 0}.ag-charts-context-menu__divider>div:after{content:"";display:block;border-top:1px solid #babfc7}.ag-charts-context-menu__divider.ag-charts-dark-context-menu{background:#2196f31a}.ag-charts-crosshair-label{position:absolute;left:0;top:0;user-select:none;pointer-events:none;font-family:var(--ag-charts-font-family);font-size:var(--ag-charts-font-size);font-weight:var(--ag-charts-font-weight);overflow:hidden;white-space:nowrap;z-index:var(--ag-charts-layer-crosshair);box-sizing:border-box}.ag-charts-crosshair-label-content{padding:0 8px;border-radius:calc(var(--ag-charts-border-radius) / 2);line-height:calc(var(--ag-charts-font-size) + 8px);background-color:var(--ag-charts-crosshair-label-background-color);color:var(--ag-charts-crosshair-label-text-color)}.ag-charts-crosshair-label--hidden{visibility:hidden!important}.ag-charts-text-input{position:absolute}.ag-charts-text-input__textarea{--placeholder-text-color: var(--ag-charts-input-placeholder-text-color);display:block;height:100%;width:100%;border:0;background:none;line-height:1.38;outline:none;transform:translateY(.09em)}.ag-charts-text-input__textarea[placeholder]:empty:before{content:attr(placeholder);color:var(--placeholder-text-color);font-weight:400}.ag-charts-text-input__textarea[placeholder]:not(:empty):before{content:""}.ag-charts-chart-toolbar__menu{min-width:200px}.ag-charts-range-buttons .ag-charts-toolbar__button{padding:var(--toolbar-button-padding) calc(var(--toolbar-button-padding) * 1.5)}.ag-charts-zoom-buttons{align-items:center;display:flex;height:44px;justify-content:center;overflow:hidden;padding-bottom:10px;pointer-events:none;width:100%;.ag-charts-toolbar{--toolbar-size: 24px;--toolbar-button-padding: 1px;display:flex;font-size:var(--ag-charts-chrome-font-size);height:var(--toolbar-size);justify-content:center;opacity:1;pointer-events:auto;transition:opacity .2s ease-in-out,transform .4s ease-in-out;.ag-charts-toolbar__button--first{border-bottom-left-radius:var(--ag-charts-border-radius);border-top-left-radius:var(--ag-charts-border-radius)}.ag-charts-toolbar__button--last{border-bottom-right-radius:var(--ag-charts-border-radius);border-top-right-radius:var(--ag-charts-border-radius)}.ag-charts-toolbar__label{padding-left:var(--ag-charts-spacing);padding-right:var(--ag-charts-spacing)}.ag-charts-toolbar__icon+.ag-charts-toolbar__label{padding-left:0}.ag-charts-toolbar__button--gap{margin-left:var(--toolbar-gap)}&.ag-charts-zoom-buttons__toolbar--hidden{opacity:0;transition:opacity .4s ease-in-out,transform .4s ease-in-out}}}.ag-charts-shared-toolbar{gap:var(--toolbar-gap);.ag-charts-toolbar__button{border-radius:var(--ag-charts-border-radius);margin:0}}\n',n.n1.enterpriseModule.licenseManager=e=>new p(e.container?.ownerDocument??("undefined"==typeof document?void 0:document)),n.n1.enterpriseModule.injectWatermark=Gu;var XP={setLicenseKey(e){p.setLicenseKey(e)}};n.xv,n.Mo,n.LW,n.a9,n.ui.create.bind(n.ui),n.ui.__createSparkline.bind(n.ui),p.setGridContext.bind(p),p.setLicenseKey.bind(p)},25573(e,t,i){"use strict";i.d(t,{ui:()=>a});var n=i(22155),s=i(45401);function r(e,t){return{...e,container:t.current}}function o(e,t){const i=(0,n.forwardRef)(function(t,i){const{options:s,style:o,className:a}=t,l=(0,n.useRef)(null),c=(0,n.useRef)();(0,n.useLayoutEffect)(()=>{const t=e(r(s,l));return c.current=t,()=>{t.destroy()}},[]);const h=void 0===c.current;return(0,n.useEffect)(()=>{h||c.current?.update(r(s,l)).catch(e=>console.error(e))},[s]),(0,n.useImperativeHandle)(i,()=>c.current,[]),(0,n.useMemo)(()=>(0,n.createElement)("div",{ref:l,style:o,className:a}),[o,a])});return i.displayName=t,i}var a=o(e=>s.ui.create(e),"AgCharts")},54989(e,t,i){"use strict";i.d(t,{$1h:()=>Rl,$Y_:()=>Ja,BFs:()=>gl,B_v:()=>Ba,CJG:()=>va,CS5:()=>sh,CSq:()=>Ta,Cf3:()=>Hh,CvR:()=>ms,D45:()=>xe,DDm:()=>Xn,DKR:()=>Ns,Dvw:()=>Fh,E1g:()=>zh,E3M:()=>Sh,EJF:()=>zl,FiP:()=>No,G21:()=>Ds,GPp:()=>Mr,GsR:()=>lh,HDb:()=>Dt,HHt:()=>_s,HLc:()=>Zc,HM$:()=>Qc,H_$:()=>jr,HiW:()=>il,HvL:()=>Ad,Hyp:()=>Xa,IGk:()=>Qo,IqQ:()=>ka,Iu8:()=>_r,J1w:()=>Bd,JPk:()=>dt,JWk:()=>Os,Ju4:()=>Bs,K02:()=>Mt,K42:()=>Lt,K4S:()=>$c,Kb3:()=>ll,LFT:()=>Wa,LIk:()=>ta,LT8:()=>cc,LfH:()=>Ml,Lhl:()=>rl,M4G:()=>us,MDK:()=>aa,MSA:()=>_o,MVO:()=>mr,NF5:()=>xd,Nat:()=>_h,OH$:()=>jc,OPU:()=>dl,OQA:()=>Us,OQU:()=>uc,OnL:()=>ia,PC7:()=>da,PIB:()=>Ss,PJL:()=>Ks,PLc:()=>Rc,Pk_:()=>ec,Pmj:()=>bl,Q5x:()=>Ps,Q90:()=>ed,QBm:()=>Cl,Qgm:()=>Ll,R4L:()=>Ha,RI_:()=>cs,RRV:()=>Bl,RYS:()=>jl,Rdv:()=>Na,Rlq:()=>La,Ry8:()=>fl,SEh:()=>hs,Sko:()=>cd,SpC:()=>ir,T6X:()=>Td,TJD:()=>Nr,TOO:()=>Hl,TUE:()=>Pr,TYQ:()=>Mc,TaT:()=>$s,U$F:()=>cr,U3q:()=>pl,USV:()=>fe,U_L:()=>gr,Udn:()=>wl,Ug$:()=>Bh,Unm:()=>zs,VPZ:()=>Se,Vf_:()=>pe,VyI:()=>Lc,WO_:()=>Gr,XQb:()=>nt,Xx1:()=>de,Y0b:()=>ho,YD7:()=>Ql,YEH:()=>Rr,YHi:()=>Vc,YtK:()=>qa,Yx9:()=>ct,YzF:()=>wd,ZvW:()=>Zs,_:()=>ls,_7R:()=>Ed,a1W:()=>D,a8A:()=>_l,aBp:()=>Ec,aJZ:()=>xl,aP4:()=>Ol,aS7:()=>Ld,aq:()=>ko,atK:()=>Go,auO:()=>Ua,bB5:()=>vc,bBw:()=>Dc,bLJ:()=>Ul,c4$:()=>Oc,dR4:()=>ce,dcM:()=>io,dsm:()=>he,eAL:()=>Ar,ehA:()=>Ga,fAn:()=>zo,fK3:()=>oe,fNJ:()=>hc,fNO:()=>Sc,fRK:()=>hl,fVA:()=>Pa,fnn:()=>Uh,gay:()=>qo,gvq:()=>Th,hK9:()=>Tl,hv8:()=>ps,i9O:()=>sc,iEP:()=>Vl,iH9:()=>wh,ia$:()=>Bo,ihO:()=>Ur,j19:()=>co,jf3:()=>Tc,jfj:()=>jo,k$d:()=>Fl,k4Y:()=>Ic,k7d:()=>Pl,kNx:()=>Pt,kOq:()=>Lr,kem:()=>Al,lon:()=>Ma,m20:()=>ea,m5s:()=>Oo,mE1:()=>ah,mSN:()=>fs,mqe:()=>Or,n76:()=>Id,o7C:()=>ae,oY$:()=>ds,o_p:()=>Oa,obS:()=>re,ock:()=>at,ofN:()=>so,pA9:()=>Sl,pE7:()=>yr,pK6:()=>Dd,pNP:()=>Xl,pkb:()=>Il,pow:()=>xc,qRA:()=>Fr,qdQ:()=>Pc,qh$:()=>Wo,qkt:()=>rc,qyQ:()=>Ls,rdE:()=>Yo,s1r:()=>kc,sVA:()=>lt,stt:()=>tr,syG:()=>se,tbO:()=>st,tj3:()=>lo,tyx:()=>oo,uAl:()=>Cs,uf_:()=>ht,uij:()=>el,utH:()=>uo,uvO:()=>Aa,v26:()=>Cc,vBt:()=>ml,vXh:()=>Wl,wX9:()=>ga,wjn:()=>ql,xA9:()=>Gh,xMA:()=>Po,xSC:()=>Nc,yGC:()=>xr,yLQ:()=>or,yLT:()=>bs,yOL:()=>Nt,yah:()=>le,ycK:()=>Kl,yuY:()=>ac,zCV:()=>yl,zIT:()=>Ir,zOQ:()=>Dl,zmE:()=>Fa,zsj:()=>ie});var n=Object.defineProperty,s=Object.defineProperties,r=Object.getOwnPropertyDescriptor,o=Object.getOwnPropertyDescriptors,a=Object.getOwnPropertySymbols,l=Object.prototype.hasOwnProperty,c=Object.prototype.propertyIsEnumerable,h=(e,t,i)=>t in e?n(e,t,{enumerable:!0,configurable:!0,writable:!0,value:i}):e[t]=i,d=(e,t)=>{for(var i in t||(t={}))l.call(t,i)&&h(e,i,t[i]);if(a)for(var i of a(t))c.call(t,i)&&h(e,i,t[i]);return e},u=(e,t)=>s(e,o(t)),p=(e,t)=>{for(var i in t)n(e,i,{get:t[i],enumerable:!0})},g=(e,t,i,s)=>{for(var o,a=s>1?void 0:s?r(t,i):t,l=e.length-1;l>=0;l--)(o=e[l])&&(a=(s?o(t,i,a):o(a))||a);return s&&a&&n(t,i,a),a},f=(e,t)=>(i,n)=>t(i,n,e),m={};function v(e){return null==e||""===e?null:e}function y(e,t=!1){return null!=e&&(""!==e||t)}function C(e){return!y(e)}function b(e){return null==e||0===e.length}function S(e){return null!=e&&"function"==typeof e.toString?e.toString():null}function w(e){if(void 0===e)return;if(null===e||""===e)return null;if("number"==typeof e)return isNaN(e)?void 0:e;const t=parseInt(e,10);return isNaN(t)?void 0:t}function x(e){if(void 0!==e)return null!==e&&""!==e&&("boolean"==typeof e?e:/true/i.test(e))}function E(e){if(null!=e&&""!==e)return e}function M(e,t){return(e?JSON.stringify(e):null)===(t?JSON.stringify(t):null)}function A(e,t,i=!1){const n=null==e,s=null==t;if(e&&e.toNumber&&(e=e.toNumber()),t&&t.toNumber&&(t=t.toNumber()),n&&s)return 0;if(n)return-1;if(s)return 1;function r(e,t){return e>t?1:e<t?-1:0}if("string"!=typeof e)return r(e,t);if(!i)return r(e,t);try{return e.localeCompare(t)}catch(i){return r(e,t)}}function T(e){if(e instanceof Set||e instanceof Map){const t=[];return e.forEach(e=>t.push(e)),t}return Object.values(e)}p(m,{attrToBoolean:()=>x,attrToNumber:()=>w,attrToString:()=>E,defaultComparator:()=>A,exists:()=>y,jsonEquals:()=>M,makeNull:()=>v,missing:()=>C,missingOrEmpty:()=>b,toStringOrNull:()=>S,values:()=>T});var D=class{constructor(){this.existingKeys={}}addExistingKeys(e){for(let t=0;t<e.length;t++)this.existingKeys[e[t]]=!0}getUniqueKey(e,t){e=S(e);let i=0;for(;;){let n;if(e?(n=e,0!==i&&(n+="_"+i)):t?(n=t,0!==i&&(n+="_"+i)):n=i,!this.existingKeys[n])return this.existingKeys[n]=!0,String(n);i++}}},I={};p(I,{SKIP_JS_BUILTINS:()=>R,cloneObject:()=>k,deepCloneDefinition:()=>P,getAllValuesInObject:()=>N,getValueUsingField:()=>_,isNonNullObject:()=>G,iterateObject:()=>L,mergeDeep:()=>O,removeAllReferences:()=>F});var R=new Set(["__proto__","constructor","prototype"]);function L(e,t){if(null!=e)if(Array.isArray(e))for(let i=0;i<e.length;i++)t(i.toString(),e[i]);else for(const[i,n]of Object.entries(e))t(i,n)}function k(e){const t={},i=Object.keys(e);for(let n=0;n<i.length;n++){if(R.has(i[n]))continue;const s=i[n],r=e[s];t[s]=r}return t}function P(e,t){if(!e)return;const i=e,n={};return Object.keys(i).forEach(e=>{if(t&&t.indexOf(e)>=0||R.has(e))return;const s=i[e],r=G(s)&&s.constructor===Object;n[e]=r?P(s):s}),n}function N(e){if(!e)return[];const t=Object;if("function"==typeof t.values)return t.values(e);const i=[];for(const t in e)e.hasOwnProperty(t)&&e.propertyIsEnumerable(t)&&i.push(e[t]);return i}function O(e,t,i=!0,n=!1){y(t)&&L(t,(t,s)=>{if(R.has(t))return;let r=e[t];r!==s&&(n&&null==r&&null!=s&&"object"==typeof s&&s.constructor===Object&&(r={},e[t]=r),G(s)&&G(r)&&!Array.isArray(r)?O(r,s,i,n):(i||void 0!==s)&&(e[t]=s))})}function _(e,t,i){if(!t||!e)return;if(!i)return e[t];const n=t.split(".");let s=e;for(let e=0;e<n.length;e++){if(null==s)return;s=s[n[e]]}return s}function F(e,t=[],i){Object.keys(e).forEach(i=>{"object"!=typeof e[i]||t.includes(i)||(e[i]=void 0)});const n=Object.getPrototypeOf(e),s={};Object.getOwnPropertyNames(n).forEach(e=>{if("function"==typeof n[e]&&!t.includes(e)){const t=()=>{console.warn((e=>`AG Grid: Grid API function ${e}() cannot be called as the grid has been destroyed.\n    It is recommended to remove local references to the grid api. Alternatively, check gridApi.isDestroyed() to avoid calling methods against a destroyed grid.\n    To run logic when the grid is about to be destroyed use the gridPreDestroy event. See: ${i}`)(e))};s[e]={value:t,writable:!0}}}),Object.defineProperties(e,s)}function G(e){return"object"==typeof e&&null!==e}var V={};p(V,{compose:()=>ee,debounce:()=>Z,doOnce:()=>H,errorOnce:()=>U,executeAfter:()=>X,executeInAWhile:()=>K,executeNextVMTurn:()=>q,getFunctionName:()=>W,isFunction:()=>j,noop:()=>te,throttle:()=>Q,waitUntil:()=>J,warnOnce:()=>z});var B={};function H(e,t){B[t]||(e(),B[t]=!0)}function z(e){H(()=>console.warn("AG Grid: "+e),e)}function U(e){H(()=>console.error("AG Grid: "+e),e)}function W(e){if(e.name)return e.name;const t=/function\s+([^\(]+)/.exec(e.toString());return t&&2===t.length?t[1].trim():null}function j(e){return!!(e&&e.constructor&&e.call&&e.apply)}function K(e){X(e,400)}var $=[],Y=!1;function q(e){$.push(e),Y||(Y=!0,window.setTimeout(()=>{const e=$.slice();$.length=0,Y=!1,e.forEach(e=>e())},0))}function X(e,t=0){e.length>0&&window.setTimeout(()=>e.forEach(e=>e()),t)}function Z(e,t){let i;return function(...n){const s=this;window.clearTimeout(i),i=window.setTimeout(function(){e.apply(s,n)},t)}}function Q(e,t){let i=0;return function(...n){const s=(new Date).getTime();s-i<t||(i=s,e.apply(this,n))}}function J(e,t,i=100,n){const s=(new Date).getTime();let r=null,o=!1;const a=()=>{const a=(new Date).getTime()-s>i;(e()||a)&&(t(),o=!0,null!=r&&(window.clearInterval(r),r=null),a&&n&&console.warn(n))};a(),o||(r=window.setInterval(a,10))}function ee(...e){return t=>e.reduce((e,t)=>t(e),t)}var te=()=>{},ie=(e=>(e.CommunityCoreModule="@ag-grid-community/core",e.InfiniteRowModelModule="@ag-grid-community/infinite-row-model",e.ClientSideRowModelModule="@ag-grid-community/client-side-row-model",e.CsvExportModule="@ag-grid-community/csv-export",e.EnterpriseCoreModule="@ag-grid-enterprise/core",e.RowGroupingModule="@ag-grid-enterprise/row-grouping",e.ColumnsToolPanelModule="@ag-grid-enterprise/column-tool-panel",e.FiltersToolPanelModule="@ag-grid-enterprise/filter-tool-panel",e.MenuModule="@ag-grid-enterprise/menu",e.SetFilterModule="@ag-grid-enterprise/set-filter",e.MultiFilterModule="@ag-grid-enterprise/multi-filter",e.StatusBarModule="@ag-grid-enterprise/status-bar",e.SideBarModule="@ag-grid-enterprise/side-bar",e.RangeSelectionModule="@ag-grid-enterprise/range-selection",e.MasterDetailModule="@ag-grid-enterprise/master-detail",e.RichSelectModule="@ag-grid-enterprise/rich-select",e.GridChartsModule="@ag-grid-enterprise/charts",e.ViewportRowModelModule="@ag-grid-enterprise/viewport-row-model",e.ServerSideRowModelModule="@ag-grid-enterprise/server-side-row-model",e.ExcelExportModule="@ag-grid-enterprise/excel-export",e.ClipboardModule="@ag-grid-enterprise/clipboard",e.SparklinesModule="@ag-grid-enterprise/sparklines",e.AdvancedFilterModule="@ag-grid-enterprise/advanced-filter",e.AngularModule="@ag-grid-community/angular",e.ReactModule="@ag-grid-community/react",e.VueModule="@ag-grid-community/vue",e))(ie||{}),ne=class e{static register(t){e.__register(t,!0,void 0)}static registerModules(t){e.__registerModules(t,!0,void 0)}static __register(t,i,n){e.runVersionChecks(t),void 0!==n?(e.areGridScopedModules=!0,void 0===e.gridModulesMap[n]&&(e.gridModulesMap[n]={}),e.gridModulesMap[n][t.moduleName]=t):e.globalModulesMap[t.moduleName]=t,e.setModuleBased(i)}static __unRegisterGridModules(t){delete e.gridModulesMap[t]}static __registerModules(t,i,n){e.setModuleBased(i),t&&t.forEach(t=>e.__register(t,i,n))}static isValidModuleVersion(t){const[i,n]=t.version.split(".")||[],[s,r]=e.currentModuleVersion.split(".")||[];return i===s&&n===r}static runVersionChecks(t){if(e.currentModuleVersion||(e.currentModuleVersion=t.version),t.version?e.isValidModuleVersion(t)||console.error(`AG Grid: You are using incompatible versions of AG Grid modules. Major and minor versions should always match across modules. '${t.moduleName}' is version ${t.version} but the other modules are version ${this.currentModuleVersion}. Please update all modules to the same version.`):console.error(`AG Grid: You are using incompatible versions of AG Grid modules. Major and minor versions should always match across modules. '${t.moduleName}' is incompatible. Please update all modules to the same version.`),t.validate){const e=t.validate();if(!e.isValid){const t=e;console.error(`AG Grid: ${t.message}`)}}}static setModuleBased(t){void 0===e.moduleBased?e.moduleBased=t:e.moduleBased!==t&&H(()=>{console.warn("AG Grid: You are mixing modules (i.e. @ag-grid-community/core) and packages (ag-grid-community) - you can only use one or the other of these mechanisms."),console.warn("Please see https://www.ag-grid.com/javascript-grid/modules/ for more information.")},"ModulePackageCheck")}static __setIsBundled(){e.isBundled=!0}static __assertRegistered(t,i,n){var s;if(this.__isRegistered(t,n))return!0;const r=i+t;let o;if(e.isBundled)o=`AG Grid: unable to use ${i} as 'ag-grid-enterprise' has not been loaded. Check you are using the Enterprise bundle:\n        \n        <script src="https://cdn.jsdelivr.net/npm/ag-grid-enterprise@AG_GRID_VERSION/dist/ag-grid-enterprise.min.js"><\/script>\n        \nFor more info see: https://ag-grid.com/javascript-data-grid/getting-started/#getting-started-with-ag-grid-enterprise`;else if(e.moduleBased||void 0===e.moduleBased){let r=null==(s=Object.entries(ie).find(([e,i])=>i===t))?void 0:s[0];o=`AG Grid: unable to use ${i} as the ${r} is not registered${e.areGridScopedModules?` for gridId: ${n}`:""}. Check if you have registered the module:\n           \n    import { ModuleRegistry } from '@ag-grid-community/core';\n    import { ${r} } from '${t}';\n    \n    ModuleRegistry.registerModules([ ${r} ]);\n\nFor more info see: https://www.ag-grid.com/javascript-grid/modules/`}else o=`AG Grid: unable to use ${i} as package 'ag-grid-enterprise' has not been imported. Check that you have imported the package:\n            \n    import 'ag-grid-enterprise';`;return H(()=>{console.warn(o)},r),!1}static __isRegistered(t,i){var n;return!!e.globalModulesMap[t]||!!(null==(n=e.gridModulesMap[i])?void 0:n[t])}static __getRegisteredModules(t){return[...T(e.globalModulesMap),...T(e.gridModulesMap[t]||{})]}static __getGridRegisteredModules(t){var i;return T(null!=(i=e.gridModulesMap[t])?i:{})||[]}static __isPackageBased(){return!e.moduleBased}};ne.globalModulesMap={},ne.gridModulesMap={},ne.areGridScopedModules=!1;var se=ne,re=class{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 T(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"),y(t)&&e.forEach(t),this.callLifeCycleMethods(e,"postConstructMethods")}createBeans(){this.contextParams.beanClasses.forEach(this.createBeanWrapper.bind(this)),L(this.beanWrappers,(e,t)=>{let i;t.bean.__agBeanMetaData&&t.bean.__agBeanMetaData.autowireMethods&&t.bean.__agBeanMetaData.autowireMethods.agConstructor&&(i=t.bean.__agBeanMetaData.autowireMethods.agConstructor);const n=this.getBeansForParameters(i,t.bean.name),s=new(t.bean.bind.apply(t.bean,[null,...n]));t.beanInstance=s});const e=Object.keys(this.beanWrappers).join(", ");this.logger.log(`created beans: ${e}`)}createBeanWrapper(e){const t=e.__agBeanMetaData;if(!t){let t;return t=e.prototype.constructor?W(e.prototype.constructor):""+e,void console.error(`Context item ${t} is not a bean`)}const i={bean:e,beanInstance:null,beanName:t.beanName};this.beanWrappers[t.beanName]=i}autoWireBeans(e){e.forEach(e=>{this.forEachMetaDataInHierarchy(e,(t,i)=>{const n=t.agClassAttributes;n&&n.forEach(t=>{const n=this.lookupBeanInstance(i,t.beanName,t.optional);e[t.attributeName]=n})})})}methodWireBeans(e){e.forEach(e=>{this.forEachMetaDataInHierarchy(e,(t,i)=>{L(t.autowireMethods,(t,n)=>{if("agConstructor"===t)return;const s=this.getBeansForParameters(n,i);e[t].apply(e,s)})})})}forEachMetaDataInHierarchy(e,t){let i=Object.getPrototypeOf(e);for(;null!=i;){const e=i.constructor;e.hasOwnProperty("__agBeanMetaData")&&t(e.__agBeanMetaData,this.getBeanName(e)),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&&L(e,(e,n)=>{const s=this.lookupBeanInstance(t,n);i[Number(e)]=s}),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("context"===t)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(e=>this.callLifeCycleMethodsOnBean(e,t))}callLifeCycleMethodsOnBean(e,t,i){const n={};this.forEachMetaDataInHierarchy(e,e=>{const s=e[t];s&&s.forEach(e=>{e!=i&&(n[e]=!0)})}),Object.keys(n).forEach(t=>e[t]())}getBean(e){return this.lookupBeanInstance("getBean",e,!0)}destroy(){if(this.destroyed)return;this.destroyed=!0,this.logger.log(">> Shutting down ag-Application Context");const e=this.getBeanInstances();this.destroyBeans(e),this.contextParams.providedBeanInstances=null,se.__unRegisterGridModules(this.contextParams.gridId),this.logger.log(">> ag-Application Context shut down - component is dead")}destroyBean(e){e&&this.destroyBeans([e])}destroyBeans(e){return e?(e.forEach(e=>{this.callLifeCycleMethodsOnBean(e,"preDestroyMethods","destroy");const t=e;"function"==typeof t.destroy&&t.destroy()}),[]):[]}isDestroyed(){return this.destroyed}getGridId(){return this.contextParams.gridId}};function oe(e,t,i){const n=ge(e.constructor);n.preConstructMethods||(n.preConstructMethods=[]),n.preConstructMethods.push(t)}function ae(e,t,i){const n=ge(e.constructor);n.postConstructMethods||(n.postConstructMethods=[]),n.postConstructMethods.push(t)}function le(e,t,i){const n=ge(e.constructor);n.preDestroyMethods||(n.preDestroyMethods=[]),n.preDestroyMethods.push(t)}function ce(e){return t=>{ge(t).beanName=e}}function he(e){return(t,i,n)=>{ue(t,e,!1,0,i,null)}}function de(e){return(t,i,n)=>{ue(t,e,!0,0,i,null)}}function ue(e,t,i,n,s,r){if(null===t)return void console.error("AG Grid: Autowired name should not be null");if("number"==typeof r)return void console.error("AG Grid: Autowired should be on an attribute");const o=ge(e.constructor);o.agClassAttributes||(o.agClassAttributes=[]),o.agClassAttributes.push({attributeName:s,beanName:t,optional:i})}function pe(e){return(t,i,n)=>{const s="function"==typeof t?t:t.constructor;let r;if("number"==typeof n){let t;i?(r=ge(s),t=i):(r=ge(s),t="agConstructor"),r.autowireMethods||(r.autowireMethods={}),r.autowireMethods[t]||(r.autowireMethods[t]={}),r.autowireMethods[t][n]=e}}}function ge(e){return e.hasOwnProperty("__agBeanMetaData")||(e.__agBeanMetaData={}),e.__agBeanMetaData}var fe=class{constructor(){this.allSyncListeners=new Map,this.allAsyncListeners=new Map,this.globalSyncListeners=new Set,this.globalAsyncListeners=new Set,this.asyncFunctionsQueue=[],this.scheduled=!1,this.firedEvents={}}setBeans(e,t,i=null,n=null){if(this.frameworkOverrides=t,this.gos=e,i){const t=e.useAsyncEvents();this.addGlobalListener(i,t)}n&&this.addGlobalListener(n,!1)}setFrameworkOverrides(e){this.frameworkOverrides=e}getListeners(e,t,i){const n=t?this.allAsyncListeners:this.allSyncListeners;let s=n.get(e);return!s&&i&&(s=new Set,n.set(e,s)),s}noRegisteredListenersExist(){return 0===this.allSyncListeners.size&&0===this.allAsyncListeners.size&&0===this.globalSyncListeners.size&&0===this.globalAsyncListeners.size}addEventListener(e,t,i=!1){this.getListeners(e,i,!0).add(t)}removeEventListener(e,t,i=!1){const n=this.getListeners(e,i,!1);n&&(n.delete(t),0===n.size)&&(i?this.allAsyncListeners:this.allSyncListeners).delete(e)}addGlobalListener(e,t=!1){(t?this.globalAsyncListeners:this.globalSyncListeners).add(e)}removeGlobalListener(e,t=!1){(t?this.globalAsyncListeners:this.globalSyncListeners).delete(e)}dispatchEvent(e){let t=e;this.gos&&this.gos.addGridCommonParams(t),this.dispatchToListeners(t,!0),this.dispatchToListeners(t,!1),this.firedEvents[t.type]=!0}dispatchEventOnce(e){this.firedEvents[e.type]||this.dispatchEvent(e)}dispatchToListeners(e,t){var i;const n=e.type;if(t&&"event"in e){const t=e.event;t instanceof Event&&(e.eventPath=t.composedPath())}const s=null!=(i=this.getListeners(n,t,!1))?i:new Set,r=new Set(s);r.size>0&&((i,n)=>{i.forEach(i=>{if(!n.has(i))return;const s=this.frameworkOverrides?()=>this.frameworkOverrides.wrapIncoming(()=>i(e)):()=>i(e);t?this.dispatchAsync(s):s()})})(r,s),new Set(t?this.globalAsyncListeners:this.globalSyncListeners).forEach(i=>{const s=this.frameworkOverrides?()=>this.frameworkOverrides.wrapIncoming(()=>i(n,e)):()=>i(n,e);t?this.dispatchAsync(s):s()})}dispatchAsync(e){this.asyncFunctionsQueue.push(e),this.scheduled||(this.frameworkOverrides.wrapIncoming(()=>{window.setTimeout(this.flushAsyncQueue.bind(this),0)}),this.scheduled=!0)}flushAsyncQueue(){this.scheduled=!1;const e=this.asyncFunctionsQueue.slice();this.asyncFunctionsQueue=[],e.forEach(e=>e())}};g([f(0,pe("gridOptionsService")),f(1,pe("frameworkOverrides")),f(2,pe("globalEventListener")),f(3,pe("globalSyncEventListener"))],fe.prototype,"setBeans",1),fe=g([ce("eventService")],fe);var me=class{constructor(e){this.frameworkOverrides=e,this.wrappedListeners=new Map,this.wrappedGlobalListeners=new Map}wrap(e){let t=e;return this.frameworkOverrides.shouldWrapOutgoing&&(t=t=>{this.frameworkOverrides.wrapOutgoing(()=>e(t))},this.wrappedListeners.set(e,t)),t}wrapGlobal(e){let t=e;return this.frameworkOverrides.shouldWrapOutgoing&&(t=(t,i)=>{this.frameworkOverrides.wrapOutgoing(()=>e(t,i))},this.wrappedGlobalListeners.set(e,t)),t}unwrap(e){var t;return null!=(t=this.wrappedListeners.get(e))?t:e}unwrapGlobal(e){var t;return null!=(t=this.wrappedGlobalListeners.get(e))?t:e}},ve={resizable:!0,sortable:!0},ye=0;function Ce(){return ye++}var be=class e{constructor(e,t,i,n){this.instanceId=Ce(),this.autoHeaderHeight=null,this.moving=!1,this.menuVisible=!1,this.lastLeftPinned=!1,this.firstRightPinned=!1,this.filterActive=!1,this.eventService=new fe,this.tooltipEnabled=!1,this.rowGroupActive=!1,this.pivotActive=!1,this.aggregationActive=!1,this.colDef=e,this.userProvidedColDef=t,this.colId=i,this.primary=n,this.setState(e)}getInstanceId(){return this.instanceId}setState(e){void 0!==e.sort?"asc"!==e.sort&&"desc"!==e.sort||(this.sort=e.sort):"asc"!==e.initialSort&&"desc"!==e.initialSort||(this.sort=e.initialSort);const t=e.sortIndex,i=e.initialSortIndex;void 0!==t?null!==t&&(this.sortIndex=t):null!==i&&(this.sortIndex=i);const n=e.hide,s=e.initialHide;this.visible=void 0!==n?!n:!s,void 0!==e.pinned?this.setPinned(e.pinned):this.setPinned(e.initialPinned);const r=e.flex,o=e.initialFlex;void 0!==r?this.flex=r:void 0!==o&&(this.flex=o)}setColDef(e,t,i){this.colDef=e,this.userProvidedColDef=t,this.initMinAndMaxWidths(),this.initDotNotation(),this.initTooltip(),this.eventService.dispatchEvent(this.createColumnEvent("colDefChanged",i))}getUserProvidedColDef(){return this.userProvidedColDef}setParent(e){this.parent=e}getParent(){return this.parent}setOriginalParent(e){this.originalParent=e}getOriginalParent(){return this.originalParent}initialise(){this.initMinAndMaxWidths(),this.resetActualWidth("gridInitializing"),this.initDotNotation(),this.initTooltip()}initDotNotation(){const e=this.gos.get("suppressFieldDotNotation");this.fieldContainsDots=y(this.colDef.field)&&this.colDef.field.indexOf(".")>=0&&!e,this.tooltipFieldContainsDots=y(this.colDef.tooltipField)&&this.colDef.tooltipField.indexOf(".")>=0&&!e}initMinAndMaxWidths(){var e,t;const i=this.colDef;this.minWidth=null!=(e=i.minWidth)?e:this.environment.getMinColWidth(),this.maxWidth=null!=(t=i.maxWidth)?t:Number.MAX_SAFE_INTEGER}initTooltip(){this.tooltipEnabled=y(this.colDef.tooltipField)||y(this.colDef.tooltipValueGetter)||y(this.colDef.tooltipComponent)}resetActualWidth(e){const t=this.calculateColInitialWidth(this.colDef);this.setActualWidth(t,e,!0)}calculateColInitialWidth(e){var t,i;const n=null!=(t=e.minWidth)?t:this.environment.getMinColWidth(),s=null!=(i=e.maxWidth)?i:Number.MAX_SAFE_INTEGER;let r;const o=w(e.width),a=w(e.initialWidth);return r=null!=o?o:null!=a?a:200,Math.max(Math.min(r,s),n)}isEmptyGroup(){return!1}isRowGroupDisplayed(e){if(C(this.colDef)||C(this.colDef.showRowGroup))return!1;const t=!0===this.colDef.showRowGroup,i=this.colDef.showRowGroup===e;return t||i}isPrimary(){return this.primary}isFilterAllowed(){return!!this.colDef.filter}isFieldContainsDots(){return this.fieldContainsDots}isTooltipEnabled(){return this.tooltipEnabled}isTooltipFieldContainsDots(){return this.tooltipFieldContainsDots}addEventListener(e,t){var i,n;this.frameworkOverrides.shouldWrapOutgoing&&!this.frameworkEventListenerService&&(this.eventService.setFrameworkOverrides(this.frameworkOverrides),this.frameworkEventListenerService=new me(this.frameworkOverrides));const s=null!=(n=null==(i=this.frameworkEventListenerService)?void 0:i.wrap(t))?n:t;this.eventService.addEventListener(e,s)}removeEventListener(e,t){var i,n;const s=null!=(n=null==(i=this.frameworkEventListenerService)?void 0:i.unwrap(t))?n:t;this.eventService.removeEventListener(e,s)}createColumnFunctionCallbackParams(e){return this.gos.addGridCommonParams({node:e,data:e.data,column:this,colDef:this.colDef})}isSuppressNavigable(e){if("boolean"==typeof this.colDef.suppressNavigable)return this.colDef.suppressNavigable;if("function"==typeof this.colDef.suppressNavigable){const t=this.createColumnFunctionCallbackParams(e);return(0,this.colDef.suppressNavigable)(t)}return!1}isCellEditable(e){return!(e.group&&!this.gos.get("enableGroupEdit"))&&this.isColumnFunc(e,this.colDef.editable)}isSuppressFillHandle(){return!!this.colDef.suppressFillHandle}isAutoHeight(){return!!this.colDef.autoHeight}isAutoHeaderHeight(){return!!this.colDef.autoHeaderHeight}isRowDrag(e){return this.isColumnFunc(e,this.colDef.rowDrag)}isDndSource(e){return this.isColumnFunc(e,this.colDef.dndSource)}isCellCheckboxSelection(e){return this.isColumnFunc(e,this.colDef.checkboxSelection)}isSuppressPaste(e){return this.isColumnFunc(e,this.colDef?this.colDef.suppressPaste:null)}isResizable(){return!!this.getColDefValue("resizable")}getColDefValue(e){var t;return null!=(t=this.colDef[e])?t:ve[e]}isColumnFunc(e,t){return"boolean"==typeof t?t:"function"==typeof t&&t(this.createColumnFunctionCallbackParams(e))}setMoving(e,t){this.moving=e,this.eventService.dispatchEvent(this.createColumnEvent("movingChanged",t))}createColumnEvent(e,t){return this.gos.addGridCommonParams({type:e,column:this,columns:[this],source:t})}isMoving(){return this.moving}getSort(){return this.sort}setSort(e,t){this.sort!==e&&(this.sort=e,this.eventService.dispatchEvent(this.createColumnEvent("sortChanged",t))),this.dispatchStateUpdatedEvent("sort")}setMenuVisible(e,t){this.menuVisible!==e&&(this.menuVisible=e,this.eventService.dispatchEvent(this.createColumnEvent("menuVisibleChanged",t)))}isMenuVisible(){return this.menuVisible}isSortable(){return!!this.getColDefValue("sortable")}isSortAscending(){return"asc"===this.sort}isSortDescending(){return"desc"===this.sort}isSortNone(){return C(this.sort)}isSorting(){return y(this.sort)}getSortIndex(){return this.sortIndex}setSortIndex(e){this.sortIndex=e,this.dispatchStateUpdatedEvent("sortIndex")}setAggFunc(e){this.aggFunc=e,this.dispatchStateUpdatedEvent("aggFunc")}getAggFunc(){return this.aggFunc}getLeft(){return this.left}getOldLeft(){return this.oldLeft}getRight(){return this.left+this.actualWidth}setLeft(e,t){this.oldLeft=this.left,this.left!==e&&(this.left=e,this.eventService.dispatchEvent(this.createColumnEvent("leftChanged",t)))}isFilterActive(){return this.filterActive}setFilterActive(e,t,i){this.filterActive!==e&&(this.filterActive=e,this.eventService.dispatchEvent(this.createColumnEvent("filterActiveChanged",t)));const n=this.createColumnEvent("filterChanged",t);i&&O(n,i),this.eventService.dispatchEvent(n)}isHovered(){return this.columnHoverService.isHovered(this)}setPinned(e){this.pinned=!0===e||"left"===e?"left":"right"===e?"right":null,this.dispatchStateUpdatedEvent("pinned")}setFirstRightPinned(e,t){this.firstRightPinned!==e&&(this.firstRightPinned=e,this.eventService.dispatchEvent(this.createColumnEvent("firstRightPinnedChanged",t)))}setLastLeftPinned(e,t){this.lastLeftPinned!==e&&(this.lastLeftPinned=e,this.eventService.dispatchEvent(this.createColumnEvent("lastLeftPinnedChanged",t)))}isFirstRightPinned(){return this.firstRightPinned}isLastLeftPinned(){return this.lastLeftPinned}isPinned(){return"left"===this.pinned||"right"===this.pinned}isPinnedLeft(){return"left"===this.pinned}isPinnedRight(){return"right"===this.pinned}getPinned(){return this.pinned}setVisible(e,t){const i=!0===e;this.visible!==i&&(this.visible=i,this.eventService.dispatchEvent(this.createColumnEvent("visibleChanged",t))),this.dispatchStateUpdatedEvent("hide")}isVisible(){return this.visible}isSpanHeaderHeight(){const e=this.getColDef();return!e.suppressSpanHeaderHeight&&!e.autoHeaderHeight}getColumnGroupPaddingInfo(){let e=this.getParent();if(!e||!e.isPadding())return{numberOfParents:0,isSpanningTotal:!1};const t=e.getPaddingLevel()+1;let i=!0;for(;e;){if(!e.isPadding()){i=!1;break}e=e.getParent()}return{numberOfParents:t,isSpanningTotal:i}}getColDef(){return this.colDef}getColumnGroupShow(){return this.colDef.columnGroupShow}getColId(){return this.colId}getId(){return this.colId}getUniqueId(){return this.colId}getDefinition(){return this.colDef}getActualWidth(){return this.actualWidth}getAutoHeaderHeight(){return this.autoHeaderHeight}setAutoHeaderHeight(e){const t=e!==this.autoHeaderHeight;return this.autoHeaderHeight=e,t}createBaseColDefParams(e){return this.gos.addGridCommonParams({node:e,data:e.data,colDef:this.colDef,column:this})}getColSpan(e){if(C(this.colDef.colSpan))return 1;const t=this.createBaseColDefParams(e),i=this.colDef.colSpan(t);return Math.max(i,1)}getRowSpan(e){if(C(this.colDef.rowSpan))return 1;const t=this.createBaseColDefParams(e),i=this.colDef.rowSpan(t);return Math.max(i,1)}setActualWidth(e,t,i=!1){null!=this.minWidth&&(e=Math.max(e,this.minWidth)),null!=this.maxWidth&&(e=Math.min(e,this.maxWidth)),this.actualWidth!==e&&(this.actualWidth=e,this.flex&&"flex"!==t&&"gridInitializing"!==t&&(this.flex=null),i||this.fireColumnWidthChangedEvent(t)),this.dispatchStateUpdatedEvent("width")}fireColumnWidthChangedEvent(e){this.eventService.dispatchEvent(this.createColumnEvent("widthChanged",e))}isGreaterThanMax(e){return null!=this.maxWidth&&e>this.maxWidth}getMinWidth(){return this.minWidth}getMaxWidth(){return this.maxWidth}getFlex(){return this.flex||0}setFlex(e){this.flex!==e&&(this.flex=e),this.dispatchStateUpdatedEvent("flex")}setMinimum(e){y(this.minWidth)&&this.setActualWidth(this.minWidth,e)}setRowGroupActive(e,t){this.rowGroupActive!==e&&(this.rowGroupActive=e,this.eventService.dispatchEvent(this.createColumnEvent("columnRowGroupChanged",t))),this.dispatchStateUpdatedEvent("rowGroup")}isRowGroupActive(){return this.rowGroupActive}setPivotActive(e,t){this.pivotActive!==e&&(this.pivotActive=e,this.eventService.dispatchEvent(this.createColumnEvent("columnPivotChanged",t))),this.dispatchStateUpdatedEvent("pivot")}isPivotActive(){return this.pivotActive}isAnyFunctionActive(){return this.isPivotActive()||this.isRowGroupActive()||this.isValueActive()}isAnyFunctionAllowed(){return this.isAllowPivot()||this.isAllowRowGroup()||this.isAllowValue()}setValueActive(e,t){this.aggregationActive!==e&&(this.aggregationActive=e,this.eventService.dispatchEvent(this.createColumnEvent("columnValueChanged",t)))}isValueActive(){return this.aggregationActive}isAllowPivot(){return!0===this.colDef.enablePivot}isAllowValue(){return!0===this.colDef.enableValue}isAllowRowGroup(){return!0===this.colDef.enableRowGroup}getMenuTabs(e){z("As of v31.1, 'getMenuTabs' is deprecated. Use 'getColDef().menuTabs ?? defaultValues' instead.");let t=this.getColDef().menuTabs;return null==t&&(t=e),t}dispatchStateUpdatedEvent(t){this.eventService.dispatchEvent({type:e.EVENT_STATE_UPDATED,key:t})}};be.EVENT_MOVING_CHANGED="movingChanged",be.EVENT_LEFT_CHANGED="leftChanged",be.EVENT_WIDTH_CHANGED="widthChanged",be.EVENT_LAST_LEFT_PINNED_CHANGED="lastLeftPinnedChanged",be.EVENT_FIRST_RIGHT_PINNED_CHANGED="firstRightPinnedChanged",be.EVENT_VISIBLE_CHANGED="visibleChanged",be.EVENT_FILTER_CHANGED="filterChanged",be.EVENT_FILTER_ACTIVE_CHANGED="filterActiveChanged",be.EVENT_SORT_CHANGED="sortChanged",be.EVENT_COL_DEF_CHANGED="colDefChanged",be.EVENT_MENU_VISIBLE_CHANGED="menuVisibleChanged",be.EVENT_ROW_GROUP_CHANGED="columnRowGroupChanged",be.EVENT_PIVOT_CHANGED="columnPivotChanged",be.EVENT_VALUE_CHANGED="columnValueChanged",be.EVENT_STATE_UPDATED="columnStateUpdated",g([he("gridOptionsService")],be.prototype,"gos",2),g([he("environment")],be.prototype,"environment",2),g([he("columnHoverService")],be.prototype,"columnHoverService",2),g([he("frameworkOverrides")],be.prototype,"frameworkOverrides",2),g([ae],be.prototype,"initialise",1);var Se=be,we=class e{constructor(e,t,i,n){this.localEventService=new fe,this.expandable=!1,this.instanceId=Ce(),this.expandableListenerRemoveCallback=null,this.colGroupDef=e,this.groupId=t,this.expanded=!!e&&!!e.openByDefault,this.padding=i,this.level=n}destroy(){this.expandableListenerRemoveCallback&&this.reset(null,void 0)}reset(e,t){this.colGroupDef=e,this.level=t,this.originalParent=null,this.expandableListenerRemoveCallback&&this.expandableListenerRemoveCallback(),this.children=void 0,this.expandable=void 0}getInstanceId(){return this.instanceId}setOriginalParent(e){this.originalParent=e}getOriginalParent(){return this.originalParent}getLevel(){return this.level}isVisible(){return!!this.children&&this.children.some(e=>e.isVisible())}isPadding(){return this.padding}setExpanded(t){this.expanded=void 0!==t&&t;const i={type:e.EVENT_EXPANDED_CHANGED};this.localEventService.dispatchEvent(i)}isExpandable(){return this.expandable}isExpanded(){return this.expanded}getGroupId(){return this.groupId}getId(){return this.getGroupId()}setChildren(e){this.children=e}getChildren(){return this.children}getColGroupDef(){return this.colGroupDef}getLeafColumns(){const e=[];return this.addLeafColumns(e),e}addLeafColumns(t){this.children&&this.children.forEach(i=>{i instanceof Se?t.push(i):i instanceof e&&i.addLeafColumns(t)})}getColumnGroupShow(){const e=this.colGroupDef;if(e)return e.columnGroupShow}setupExpandable(){this.setExpandable(),this.expandableListenerRemoveCallback&&this.expandableListenerRemoveCallback();const e=this.onColumnVisibilityChanged.bind(this);this.getLeafColumns().forEach(t=>t.addEventListener("visibleChanged",e)),this.expandableListenerRemoveCallback=()=>{this.getLeafColumns().forEach(t=>t.removeEventListener("visibleChanged",e)),this.expandableListenerRemoveCallback=null}}setExpandable(){if(this.isPadding())return;let t=!1,i=!1,n=!1;const s=this.findChildrenRemovingPadding();for(let e=0,r=s.length;e<r;e++){const r=s[e];if(!r.isVisible())continue;const o=r.getColumnGroupShow();"open"===o?(t=!0,n=!0):"closed"===o?(i=!0,n=!0):(t=!0,i=!0)}const r=t&&i&&n;if(this.expandable!==r){this.expandable=r;const t={type:e.EVENT_EXPANDABLE_CHANGED};this.localEventService.dispatchEvent(t)}}findChildrenRemovingPadding(){const t=[],i=n=>{n.forEach(n=>{n instanceof e&&n.isPadding()?i(n.children):t.push(n)})};return i(this.children),t}onColumnVisibilityChanged(){this.setExpandable()}addEventListener(e,t){this.localEventService.addEventListener(e,t)}removeEventListener(e,t){this.localEventService.removeEventListener(e,t)}};we.EVENT_EXPANDED_CHANGED="expandedChanged",we.EVENT_EXPANDABLE_CHANGED="expandableChanged",g([le],we.prototype,"destroy",1);var xe=we,Ee={numericColumn:{headerClass:"ag-right-aligned-header",cellClass:"ag-right-aligned-cell"},rightAligned:{headerClass:"ag-right-aligned-header",cellClass:"ag-right-aligned-cell"}},Me={};p(Me,{addSafePassiveEventListener:()=>tt,createEventPath:()=>Je,getCtrlForEventTarget:()=>Ze,getEventPath:()=>et,isElementInEventPath:()=>Qe,isEventSupported:()=>Xe,isStopPropagationForAgGrid:()=>qe,stopPropagationForAgGrid:()=>Ye});var Ae={};function Te(e){return null!=e&&e.length>0}function De(e){if(e&&e.length)return e[e.length-1]}function Ie(e,t,i){return null==e&&null==t||null!=e&&null!=t&&e.length===t.length&&e.every((e,n)=>i?i(e,t[n]):t[n]===e)}function Re(e,t){return Ie(e,t)}function Le(e){return e.sort((e,t)=>e-t)}function ke(e,t){if(e)for(let i=e.length-2;i>=0;i--){const n=e[i]===t,s=e[i+1]===t;n&&s&&e.splice(i+1,1)}}function Pe(e,t){const i=e.indexOf(t);i>=0&&(e[i]=e[e.length-1],e.pop())}function Ne(e,t){const i=e.indexOf(t);i>=0&&e.splice(i,1)}function Oe(e,t){for(let i=0;i<t.length;i++)Pe(e,t[i])}function _e(e,t){for(let i=0;i<t.length;i++)Ne(e,t[i])}function Fe(e,t,i){e.splice(i,0,t)}function Ge(e,t,i){if(null!=e&&null!=t)for(let n=t.length-1;n>=0;n--)Fe(e,t[n],i)}function Ve(e,t,i){_e(e,t),t.slice().reverse().forEach(t=>Fe(e,t,i))}function Be(e,t){return e.indexOf(t)>-1}function He(e){return[].concat.apply([],e)}function ze(e,t){null!=t&&null!=e&&t.forEach(t=>e.push(t))}function Ue(e){return e.map(S)}function We(e,t){if(null!=e)for(let i=e.length-1;i>=0;i--)t(e[i],i)}p(Ae,{areEqual:()=>Ie,existsAndNotEmpty:()=>Te,flatten:()=>He,forEachReverse:()=>We,includes:()=>Be,insertArrayIntoArray:()=>Ge,insertIntoArray:()=>Fe,last:()=>De,moveInArray:()=>Ve,pushAll:()=>ze,removeAllFromArray:()=>_e,removeAllFromUnorderedArray:()=>Oe,removeFromArray:()=>Ne,removeFromUnorderedArray:()=>Pe,removeRepeatsFromArray:()=>ke,shallowCompare:()=>Re,sortNumerically:()=>Le,toStrings:()=>Ue});var je="__ag_Grid_Stop_Propagation",Ke=["touchstart","touchend","touchmove","touchcancel","scroll"],$e={};function Ye(e){e[je]=!0}function qe(e){return!0===e[je]}var Xe=(()=>{const e={select:"input",change:"input",submit:"form",reset:"form",error:"img",load:"img",abort:"img"};return t=>{if("boolean"==typeof $e[t])return $e[t];const i=document.createElement(e[t]||"div");return $e[t="on"+t]=t in i}})();function Ze(e,t,i){let n=t;for(;n;){const t=e.getDomData(n,i);if(t)return t;n=n.parentElement}return null}function Qe(e,t){return!(!t||!e)&&et(t).indexOf(e)>=0}function Je(e){const t=[];let i=e.target;for(;i;)t.push(i),i=i.parentElement;return t}function et(e){const t=e;return t.path?t.path:t.composedPath?t.composedPath():Je(t)}function tt(e,t,i,n){const s=Be(Ke,i)?{passive:!0}:void 0;e&&e.addEventListener&&e.addEventListener(t,i,n,s)}var it=class e{constructor(){this.destroyFunctions=[],this.destroyed=!1,this.__v_skip=!0,this.lastChangeSetIdLookup={},this.propertyListenerId=0,this.isAlive=()=>!this.destroyed}getFrameworkOverrides(){return this.frameworkOverrides}getContext(){return this.context}destroy(){for(let e=0;e<this.destroyFunctions.length;e++)this.destroyFunctions[e]();this.destroyFunctions.length=0,this.destroyed=!0,this.dispatchEvent({type:e.EVENT_DESTROYED})}addEventListener(e,t){this.localEventService||(this.localEventService=new fe),this.localEventService.addEventListener(e,t)}removeEventListener(e,t){this.localEventService&&this.localEventService.removeEventListener(e,t)}dispatchEvent(e){this.localEventService&&this.localEventService.dispatchEvent(e)}addManagedListener(e,t,i){if(this.destroyed)return;e instanceof HTMLElement?tt(this.getFrameworkOverrides(),e,t,i):e.addEventListener(t,i);const n=()=>(e.removeEventListener(t,i),null);return this.destroyFunctions.push(n),()=>(n(),this.destroyFunctions=this.destroyFunctions.filter(e=>e!==n),null)}setupGridOptionListener(e,t){this.gos.addEventListener(e,t);const i=()=>(this.gos.removeEventListener(e,t),null);return this.destroyFunctions.push(i),()=>(i(),this.destroyFunctions=this.destroyFunctions.filter(e=>e!==i),null)}addManagedPropertyListener(e,t){return this.destroyed?()=>null:this.setupGridOptionListener(e,t)}addManagedPropertyListeners(e,t){if(this.destroyed)return;const i=e.join("-")+this.propertyListenerId++,n=e=>{if(e.changeSet){if(e.changeSet&&e.changeSet.id===this.lastChangeSetIdLookup[i])return;this.lastChangeSetIdLookup[i]=e.changeSet.id}const n={type:"gridPropertyChanged",changeSet:e.changeSet,source:e.source};t(n)};e.forEach(e=>this.setupGridOptionListener(e,n))}addDestroyFunc(e){this.isAlive()?this.destroyFunctions.push(e):e()}createManagedBean(e,t){const i=this.createBean(e,t);return this.addDestroyFunc(this.destroyBean.bind(this,e,t)),i}createBean(e,t,i){return(t||this.getContext()).createBean(e,i)}destroyBean(e,t){return(t||this.getContext()).destroyBean(e)}destroyBeans(e,t){if(e)for(let i=0;i<e.length;i++)this.destroyBean(e[i],t);return[]}};it.EVENT_DESTROYED="destroyed",g([he("frameworkOverrides")],it.prototype,"frameworkOverrides",2),g([he("context")],it.prototype,"context",2),g([he("eventService")],it.prototype,"eventService",2),g([he("gridOptionsService")],it.prototype,"gos",2),g([he("localeService")],it.prototype,"localeService",2),g([he("environment")],it.prototype,"environment",2),g([le],it.prototype,"destroy",1);var nt=it,st=class extends nt{setBeans(e){this.logger=e.create("ColumnFactory")}createColumnTree(e,t,i,n){const s=new D,{existingCols:r,existingGroups:o,existingColKeys:a}=this.extractExistingTreeData(i);s.addExistingKeys(a);const l=this.recursivelyCreateColumns(e,0,t,r,s,o,n),c=this.findMaxDept(l,0);this.logger.log("Number of levels for grouped columns is "+c);const h=this.balanceColumnTree(l,0,c,s);return rt(null,h,(e,t)=>{e instanceof xe&&e.setupExpandable(),e.setOriginalParent(t)}),{columnTree:h,treeDept:c}}extractExistingTreeData(e){const t=[],i=[],n=[];return e&&rt(null,e,e=>{if(e instanceof xe){const t=e;i.push(t)}else{const i=e;n.push(i.getId()),t.push(i)}}),{existingCols:t,existingGroups:i,existingColKeys:n}}createForAutoGroups(e,t){return e.map(e=>this.createAutoGroupTreeItem(t,e))}createAutoGroupTreeItem(e,t){const i=this.findDepth(e);let n=t;for(let e=i-1;e>=0;e--){const i=new xe(null,`FAKE_PATH_${t.getId()}}_${e}`,!0,e);this.createBean(i),i.setChildren([n]),n.setOriginalParent(i),n=i}return 0===i&&t.setOriginalParent(null),n}findDepth(e){let t=0,i=e;for(;i&&i[0]&&i[0]instanceof xe;)t++,i=i[0].getChildren();return t}balanceColumnTree(e,t,i,n){const s=[];for(let r=0;r<e.length;r++){const o=e[r];if(o instanceof xe){const e=o,r=this.balanceColumnTree(e.getChildren(),t+1,i,n);e.setChildren(r),s.push(e)}else{let r,a;for(let e=i-1;e>=t;e--){const e=n.getUniqueKey(null,null),i=this.createMergedColGroupDef(null),s=new xe(i,e,!0,t);this.createBean(s),a&&a.setChildren([s]),a=s,r||(r=a)}if(r&&a){if(s.push(r),e.some(e=>e instanceof xe)){a.setChildren([o]);continue}a.setChildren(e);break}s.push(o)}}return s}findMaxDept(e,t){let i=t;for(let n=0;n<e.length;n++){const s=e[n];if(s instanceof xe){const e=s,n=this.findMaxDept(e.getChildren(),t+1);i<n&&(i=n)}}return i}recursivelyCreateColumns(e,t,i,n,s,r,o){if(!e)return[];const a=new Array(e.length);for(let l=0;l<a.length;l++){const c=e[l];this.isColumnGroup(c)?a[l]=this.createColumnGroup(i,c,t,n,s,r,o):a[l]=this.createColumn(i,c,n,s,o)}return a}createColumnGroup(e,t,i,n,s,r,o){const a=this.createMergedColGroupDef(t),l=s.getUniqueKey(a.groupId||null,null),c=new xe(a,l,!1,i);this.createBean(c);const h=this.findExistingGroup(t,r);h&&r.splice(h.idx,1);let d=null==h?void 0:h.group;d&&c.setExpanded(d.isExpanded());const u=this.recursivelyCreateColumns(a.children,i+1,e,n,s,r,o);return c.setChildren(u),c}createMergedColGroupDef(e){const t={};return Object.assign(t,this.gos.get("defaultColGroupDef")),Object.assign(t,e),t}createColumn(e,t,i,n,s){const r=this.findExistingColumn(t,i);r&&(null==i||i.splice(r.idx,1));let o=null==r?void 0:r.column;if(o){const e=this.addColumnDefaultAndTypes(t,o.getColId());o.setColDef(e,t,s),this.applyColumnState(o,e,s)}else{const i=n.getUniqueKey(t.colId,t.field),s=this.addColumnDefaultAndTypes(t,i);o=new Se(s,t,i,e),this.context.createBean(o)}return this.dataTypeService.addColumnListeners(o),o}applyColumnState(e,t,i){const n=w(t.flex);if(void 0!==n&&e.setFlex(n),e.getFlex()<=0){const n=w(t.width);if(null!=n)e.setActualWidth(n,i);else{const t=e.getActualWidth();e.setActualWidth(t,i)}}void 0!==t.sort&&("asc"==t.sort||"desc"==t.sort?e.setSort(t.sort,i):e.setSort(void 0,i));const s=w(t.sortIndex);void 0!==s&&e.setSortIndex(s);const r=x(t.hide);void 0!==r&&e.setVisible(!r,i),void 0!==t.pinned&&e.setPinned(t.pinned)}findExistingColumn(e,t){if(t)for(let i=0;i<t.length;i++){const n=t[i].getUserProvidedColDef();if(n)if(null==e.colId){if(null!=e.field){if(n.field===e.field)return{idx:i,column:t[i]}}else if(n===e)return{idx:i,column:t[i]}}else if(t[i].getId()===e.colId)return{idx:i,column:t[i]}}}findExistingGroup(e,t){if(null!=e.groupId)for(let i=0;i<t.length;i++){const n=t[i];if(n.getColGroupDef()&&n.getId()===e.groupId)return{idx:i,group:n}}}addColumnDefaultAndTypes(e,t){const i={};O(i,this.gos.get("defaultColDef"),!1,!0);const n=this.dataTypeService.updateColDefAndGetColumnType(i,e,t);n&&this.assignColumnTypes(n,i),O(i,e,!1,!0);const s=this.gos.get("autoGroupColumnDef"),r=this.gos.isColumnsSortingCoupledToGroup();return e.rowGroup&&s&&r&&O(i,{sort:s.sort,initialSort:s.initialSort},!1,!0),this.dataTypeService.validateColDef(i),i}assignColumnTypes(e,t){if(!e.length)return;const i=Object.assign({},Ee);L(this.gos.get("columnTypes")||{},(e,t)=>{e in i?console.warn(`AG Grid: the column type '${e}' is a default column type and cannot be overridden.`):(t.type&&z("Column type definitions 'columnTypes' with a 'type' attribute are not supported because a column type cannot refer to another column type. Only column definitions 'columnDefs' can use the 'type' attribute to refer to a column type."),i[e]=t)}),e.forEach(e=>{const n=i[e.trim()];n?O(t,n,!1,!0):console.warn("AG Grid: colDef.type '"+e+"' does not correspond to defined gridOptions.columnTypes")})}isColumnGroup(e){return void 0!==e.children}};function rt(e,t,i){if(t)for(let n=0;n<t.length;n++){const s=t[n];s instanceof xe&&rt(s,s.getChildren(),i),i(s,e)}}g([he("dataTypeService")],st.prototype,"dataTypeService",2),g([f(0,pe("loggerFactory"))],st.prototype,"setBeans",1),st=g([ce("columnFactory")],st);var ot=class e{constructor(e,t,i,n){this.displayedChildren=[],this.localEventService=new fe,this.groupId=t,this.partId=i,this.providedColumnGroup=e,this.pinned=n}static createUniqueId(e,t){return e+"_"+t}reset(){this.parent=null,this.children=null,this.displayedChildren=null}getParent(){return this.parent}setParent(e){this.parent=e}getUniqueId(){return e.createUniqueId(this.groupId,this.partId)}isEmptyGroup(){return 0===this.displayedChildren.length}isMoving(){const e=this.getProvidedColumnGroup().getLeafColumns();return!(!e||0===e.length)&&e.every(e=>e.isMoving())}checkLeft(){if(this.displayedChildren.forEach(t=>{t instanceof e&&t.checkLeft()}),this.displayedChildren.length>0)if(this.gos.get("enableRtl")){const e=De(this.displayedChildren).getLeft();this.setLeft(e)}else{const e=this.displayedChildren[0].getLeft();this.setLeft(e)}else this.setLeft(null)}getLeft(){return this.left}getOldLeft(){return this.oldLeft}setLeft(t){this.oldLeft=this.left,this.left!==t&&(this.left=t,this.localEventService.dispatchEvent(this.createAgEvent(e.EVENT_LEFT_CHANGED)))}getPinned(){return this.pinned}createAgEvent(e){return{type:e}}addEventListener(e,t){this.localEventService.addEventListener(e,t)}removeEventListener(e,t){this.localEventService.removeEventListener(e,t)}getGroupId(){return this.groupId}getPartId(){return this.partId}isChildInThisGroupDeepSearch(t){let i=!1;return this.children.forEach(n=>{t===n&&(i=!0),n instanceof e&&n.isChildInThisGroupDeepSearch(t)&&(i=!0)}),i}getActualWidth(){let e=0;return this.displayedChildren&&this.displayedChildren.forEach(t=>{e+=t.getActualWidth()}),e}isResizable(){if(!this.displayedChildren)return!1;let e=!1;return this.displayedChildren.forEach(t=>{t.isResizable()&&(e=!0)}),e}getMinWidth(){let e=0;return this.displayedChildren.forEach(t=>{e+=t.getMinWidth()||0}),e}addChild(e){this.children||(this.children=[]),this.children.push(e)}getDisplayedChildren(){return this.displayedChildren}getLeafColumns(){const e=[];return this.addLeafColumns(e),e}getDisplayedLeafColumns(){const e=[];return this.addDisplayedLeafColumns(e),e}getDefinition(){return this.providedColumnGroup.getColGroupDef()}getColGroupDef(){return this.providedColumnGroup.getColGroupDef()}isPadding(){return this.providedColumnGroup.isPadding()}isExpandable(){return this.providedColumnGroup.isExpandable()}isExpanded(){return this.providedColumnGroup.isExpanded()}setExpanded(e){this.providedColumnGroup.setExpanded(e)}addDisplayedLeafColumns(t){this.displayedChildren.forEach(i=>{i instanceof Se?t.push(i):i instanceof e&&i.addDisplayedLeafColumns(t)})}addLeafColumns(t){this.children.forEach(i=>{i instanceof Se?t.push(i):i instanceof e&&i.addLeafColumns(t)})}getChildren(){return this.children}getColumnGroupShow(){return this.providedColumnGroup.getColumnGroupShow()}getProvidedColumnGroup(){return this.providedColumnGroup}getPaddingLevel(){const e=this.getParent();return this.isPadding()&&e&&e.isPadding()?1+e.getPaddingLevel():0}calculateDisplayedColumns(){this.displayedChildren=[];let t=this;for(;null!=t&&t.isPadding();)t=t.getParent();if(!t||!t.providedColumnGroup.isExpandable())return this.displayedChildren=this.children,void this.localEventService.dispatchEvent(this.createAgEvent(e.EVENT_DISPLAYED_CHILDREN_CHANGED));this.children.forEach(i=>{if(!(i instanceof e)||i.displayedChildren&&i.displayedChildren.length)switch(i.getColumnGroupShow()){case"open":t.providedColumnGroup.isExpanded()&&this.displayedChildren.push(i);break;case"closed":t.providedColumnGroup.isExpanded()||this.displayedChildren.push(i);break;default:this.displayedChildren.push(i)}}),this.localEventService.dispatchEvent(this.createAgEvent(e.EVENT_DISPLAYED_CHILDREN_CHANGED))}};ot.EVENT_LEFT_CHANGED="leftChanged",ot.EVENT_DISPLAYED_CHILDREN_CHANGED="displayedChildrenChanged",g([he("gridOptionsService")],ot.prototype,"gos",2);var at=ot,lt=class{};lt.EVENT_COLUMN_EVERYTHING_CHANGED="columnEverythingChanged",lt.EVENT_NEW_COLUMNS_LOADED="newColumnsLoaded",lt.EVENT_COLUMN_PIVOT_MODE_CHANGED="columnPivotModeChanged",lt.EVENT_PIVOT_MAX_COLUMNS_EXCEEDED="pivotMaxColumnsExceeded",lt.EVENT_COLUMN_ROW_GROUP_CHANGED="columnRowGroupChanged",lt.EVENT_EXPAND_COLLAPSE_ALL="expandOrCollapseAll",lt.EVENT_COLUMN_PIVOT_CHANGED="columnPivotChanged",lt.EVENT_GRID_COLUMNS_CHANGED="gridColumnsChanged",lt.EVENT_COLUMN_VALUE_CHANGED="columnValueChanged",lt.EVENT_COLUMN_MOVED="columnMoved",lt.EVENT_COLUMN_VISIBLE="columnVisible",lt.EVENT_COLUMN_PINNED="columnPinned",lt.EVENT_COLUMN_GROUP_OPENED="columnGroupOpened",lt.EVENT_COLUMN_RESIZED="columnResized",lt.EVENT_DISPLAYED_COLUMNS_CHANGED="displayedColumnsChanged",lt.EVENT_SUPPRESS_COLUMN_MOVE_CHANGED="suppressMovableColumns",lt.EVENT_SUPPRESS_MENU_HIDE_CHANGED="suppressMenuHide",lt.EVENT_SUPPRESS_FIELD_DOT_NOTATION="suppressFieldDotNotation",lt.EVENT_VIRTUAL_COLUMNS_CHANGED="virtualColumnsChanged",lt.EVENT_COLUMN_HEADER_MOUSE_OVER="columnHeaderMouseOver",lt.EVENT_COLUMN_HEADER_MOUSE_LEAVE="columnHeaderMouseLeave",lt.EVENT_COLUMN_HEADER_CLICKED="columnHeaderClicked",lt.EVENT_COLUMN_HEADER_CONTEXT_MENU="columnHeaderContextMenu",lt.EVENT_ASYNC_TRANSACTIONS_FLUSHED="asyncTransactionsFlushed",lt.EVENT_ROW_GROUP_OPENED="rowGroupOpened",lt.EVENT_ROW_DATA_UPDATED="rowDataUpdated",lt.EVENT_PINNED_ROW_DATA_CHANGED="pinnedRowDataChanged",lt.EVENT_RANGE_SELECTION_CHANGED="rangeSelectionChanged",lt.EVENT_CHART_CREATED="chartCreated",lt.EVENT_CHART_RANGE_SELECTION_CHANGED="chartRangeSelectionChanged",lt.EVENT_CHART_OPTIONS_CHANGED="chartOptionsChanged",lt.EVENT_CHART_DESTROYED="chartDestroyed",lt.EVENT_TOOL_PANEL_VISIBLE_CHANGED="toolPanelVisibleChanged",lt.EVENT_TOOL_PANEL_SIZE_CHANGED="toolPanelSizeChanged",lt.EVENT_COLUMN_PANEL_ITEM_DRAG_START="columnPanelItemDragStart",lt.EVENT_COLUMN_PANEL_ITEM_DRAG_END="columnPanelItemDragEnd",lt.EVENT_MODEL_UPDATED="modelUpdated",lt.EVENT_CUT_START="cutStart",lt.EVENT_CUT_END="cutEnd",lt.EVENT_PASTE_START="pasteStart",lt.EVENT_PASTE_END="pasteEnd",lt.EVENT_FILL_START="fillStart",lt.EVENT_FILL_END="fillEnd",lt.EVENT_RANGE_DELETE_START="rangeDeleteStart",lt.EVENT_RANGE_DELETE_END="rangeDeleteEnd",lt.EVENT_UNDO_STARTED="undoStarted",lt.EVENT_UNDO_ENDED="undoEnded",lt.EVENT_REDO_STARTED="redoStarted",lt.EVENT_REDO_ENDED="redoEnded",lt.EVENT_KEY_SHORTCUT_CHANGED_CELL_START="keyShortcutChangedCellStart",lt.EVENT_KEY_SHORTCUT_CHANGED_CELL_END="keyShortcutChangedCellEnd",lt.EVENT_CELL_CLICKED="cellClicked",lt.EVENT_CELL_DOUBLE_CLICKED="cellDoubleClicked",lt.EVENT_CELL_MOUSE_DOWN="cellMouseDown",lt.EVENT_CELL_CONTEXT_MENU="cellContextMenu",lt.EVENT_CELL_VALUE_CHANGED="cellValueChanged",lt.EVENT_CELL_EDIT_REQUEST="cellEditRequest",lt.EVENT_ROW_VALUE_CHANGED="rowValueChanged",lt.EVENT_CELL_FOCUSED="cellFocused",lt.EVENT_CELL_FOCUS_CLEARED="cellFocusCleared",lt.EVENT_FULL_WIDTH_ROW_FOCUSED="fullWidthRowFocused",lt.EVENT_ROW_SELECTED="rowSelected",lt.EVENT_SELECTION_CHANGED="selectionChanged",lt.EVENT_TOOLTIP_SHOW="tooltipShow",lt.EVENT_TOOLTIP_HIDE="tooltipHide",lt.EVENT_CELL_KEY_DOWN="cellKeyDown",lt.EVENT_CELL_MOUSE_OVER="cellMouseOver",lt.EVENT_CELL_MOUSE_OUT="cellMouseOut",lt.EVENT_FILTER_CHANGED="filterChanged",lt.EVENT_FILTER_MODIFIED="filterModified",lt.EVENT_FILTER_OPENED="filterOpened",lt.EVENT_ADVANCED_FILTER_BUILDER_VISIBLE_CHANGED="advancedFilterBuilderVisibleChanged",lt.EVENT_SORT_CHANGED="sortChanged",lt.EVENT_VIRTUAL_ROW_REMOVED="virtualRowRemoved",lt.EVENT_ROW_CLICKED="rowClicked",lt.EVENT_ROW_DOUBLE_CLICKED="rowDoubleClicked",lt.EVENT_GRID_READY="gridReady",lt.EVENT_GRID_PRE_DESTROYED="gridPreDestroyed",lt.EVENT_GRID_SIZE_CHANGED="gridSizeChanged",lt.EVENT_VIEWPORT_CHANGED="viewportChanged",lt.EVENT_SCROLLBAR_WIDTH_CHANGED="scrollbarWidthChanged",lt.EVENT_FIRST_DATA_RENDERED="firstDataRendered",lt.EVENT_DRAG_STARTED="dragStarted",lt.EVENT_DRAG_STOPPED="dragStopped",lt.EVENT_CHECKBOX_CHANGED="checkboxChanged",lt.EVENT_ROW_EDITING_STARTED="rowEditingStarted",lt.EVENT_ROW_EDITING_STOPPED="rowEditingStopped",lt.EVENT_CELL_EDITING_STARTED="cellEditingStarted",lt.EVENT_CELL_EDITING_STOPPED="cellEditingStopped",lt.EVENT_BODY_SCROLL="bodyScroll",lt.EVENT_BODY_SCROLL_END="bodyScrollEnd",lt.EVENT_HEIGHT_SCALE_CHANGED="heightScaleChanged",lt.EVENT_PAGINATION_CHANGED="paginationChanged",lt.EVENT_COMPONENT_STATE_CHANGED="componentStateChanged",lt.EVENT_STORE_REFRESHED="storeRefreshed",lt.EVENT_STATE_UPDATED="stateUpdated",lt.EVENT_COLUMN_MENU_VISIBLE_CHANGED="columnMenuVisibleChanged",lt.EVENT_CONTEXT_MENU_VISIBLE_CHANGED="contextMenuVisibleChanged",lt.EVENT_BODY_HEIGHT_CHANGED="bodyHeightChanged",lt.EVENT_COLUMN_CONTAINER_WIDTH_CHANGED="columnContainerWidthChanged",lt.EVENT_DISPLAYED_COLUMNS_WIDTH_CHANGED="displayedColumnsWidthChanged",lt.EVENT_SCROLL_VISIBILITY_CHANGED="scrollVisibilityChanged",lt.EVENT_COLUMN_HOVER_CHANGED="columnHoverChanged",lt.EVENT_FLASH_CELLS="flashCells",lt.EVENT_PAGINATION_PIXEL_OFFSET_CHANGED="paginationPixelOffsetChanged",lt.EVENT_DISPLAYED_ROWS_CHANGED="displayedRowsChanged",lt.EVENT_LEFT_PINNED_WIDTH_CHANGED="leftPinnedWidthChanged",lt.EVENT_RIGHT_PINNED_WIDTH_CHANGED="rightPinnedWidthChanged",lt.EVENT_ROW_CONTAINER_HEIGHT_CHANGED="rowContainerHeightChanged",lt.EVENT_HEADER_HEIGHT_CHANGED="headerHeightChanged",lt.EVENT_COLUMN_HEADER_HEIGHT_CHANGED="columnHeaderHeightChanged",lt.EVENT_ROW_DRAG_ENTER="rowDragEnter",lt.EVENT_ROW_DRAG_MOVE="rowDragMove",lt.EVENT_ROW_DRAG_LEAVE="rowDragLeave",lt.EVENT_ROW_DRAG_END="rowDragEnd",lt.EVENT_GRID_STYLES_CHANGED="gridStylesChanged",lt.EVENT_COLUMN_ROW_GROUP_CHANGE_REQUEST="columnRowGroupChangeRequest",lt.EVENT_COLUMN_PIVOT_CHANGE_REQUEST="columnPivotChangeRequest",lt.EVENT_COLUMN_VALUE_CHANGE_REQUEST="columnValueChangeRequest",lt.EVENT_COLUMN_AGG_FUNC_CHANGE_REQUEST="columnAggFuncChangeRequest",lt.EVENT_STORE_UPDATED="storeUpdated",lt.EVENT_FILTER_DESTROYED="filterDestroyed",lt.EVENT_ROW_DATA_UPDATE_STARTED="rowDataUpdateStarted",lt.EVENT_ROW_COUNT_READY="rowCountReady",lt.EVENT_ADVANCED_FILTER_ENABLED_CHANGED="advancedFilterEnabledChanged",lt.EVENT_DATA_TYPES_INFERRED="dataTypesInferred",lt.EVENT_FIELD_VALUE_CHANGED="fieldValueChanged",lt.EVENT_FIELD_PICKER_VALUE_SELECTED="fieldPickerValueSelected",lt.EVENT_SIDE_BAR_UPDATED="sideBarUpdated";var ct=new Set([lt.EVENT_GRID_PRE_DESTROYED,lt.EVENT_FILL_START]),ht=class{constructor(){this.existingIds={}}getInstanceIdForKey(e){const t=this.existingIds[e];let i;return i="number"!=typeof t?0:t+1,this.existingIds[e]=i,i}},dt="ag-Grid-AutoColumn",ut=class extends nt{createAutoGroupColumns(e){const t=[],i=this.gos.get("treeData");let n=this.gos.isGroupMultiAutoColumn();return i&&n&&(console.warn('AG Grid: you cannot mix groupDisplayType = "multipleColumns" with treeData, only one column can be used to display groups when doing tree data'),n=!1),n?e.forEach((e,i)=>{t.push(this.createOneAutoGroupColumn(e,i))}):t.push(this.createOneAutoGroupColumn()),t}updateAutoGroupColumns(e,t){e.forEach((e,i)=>this.updateOneAutoGroupColumn(e,i,t))}createOneAutoGroupColumn(e,t){let i;i=e?`${dt}-${e.getId()}`:dt;const n=this.createAutoGroupColDef(i,e,t);n.colId=i;const s=new Se(n,null,i,!0);return this.context.createBean(s),s}updateOneAutoGroupColumn(e,t,i){const n=e.getColDef(),s="string"==typeof n.showRowGroup?n.showRowGroup:void 0,r=null!=s?this.columnModel.getPrimaryColumn(s):void 0,o=this.createAutoGroupColDef(e.getId(),null!=r?r:void 0,t);e.setColDef(o,null,i),this.columnFactory.applyColumnState(e,o,i)}createAutoGroupColDef(e,t,i){let n=this.createBaseColDef(t);O(n,this.gos.get("autoGroupColumnDef")),n=this.columnFactory.addColumnDefaultAndTypes(n,e),this.gos.get("treeData")||C(n.field)&&C(n.valueGetter)&&C(n.filterValueGetter)&&"agGroupColumnFilter"!==n.filter&&(n.filter=!1),i&&i>0&&(n.headerCheckboxSelection=!1);const s=this.gos.isColumnsSortingCoupledToGroup(),r=n.valueGetter||null!=n.field;return s&&!r&&(n.sortIndex=void 0,n.initialSort=void 0),n}createBaseColDef(e){const t=this.gos.get("autoGroupColumnDef"),i={headerName:this.localeService.getLocaleTextFunc()("group","Group")};if(t&&(t.cellRenderer||t.cellRendererSelector)||(i.cellRenderer="agGroupCellRenderer"),e){const t=e.getColDef();Object.assign(i,{headerName:this.columnModel.getDisplayNameForColumn(e,"header"),headerValueGetter:t.headerValueGetter}),t.cellRenderer&&Object.assign(i,{cellRendererParams:{innerRenderer:t.cellRenderer,innerRendererParams:t.cellRendererParams}}),i.showRowGroup=e.getColId()}else i.showRowGroup=!0;return i}};g([he("columnModel")],ut.prototype,"columnModel",2),g([he("columnFactory")],ut.prototype,"columnFactory",2),ut=g([ce("autoGroupColService")],ut);var pt={};p(pt,{camelCaseToHumanText:()=>Ct,camelCaseToHyphenated:()=>bt,capitalise:()=>vt,escapeString:()=>yt,utf8_encode:()=>mt});var gt=/[&<>"']/g,ft={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"};function mt(e){const t=String.fromCharCode;function i(e,i){return t(e>>i&63|128)}function n(e){if(e>=0&&e<=31&&10!==e)return`_x${e.toString(16).toUpperCase().padStart(4,"0")}_`;if(!(4294967168&e))return t(e);let n="";return 4294965248&e?4294901760&e?4292870144&e||(n=t(e>>18&7|240),n+=i(e,12),n+=i(e,6)):(function(e){if(e>=55296&&e<=57343)throw Error("Lone surrogate U+"+e.toString(16).toUpperCase()+" is not a scalar value")}(e),n=t(e>>12&15|224),n+=i(e,6)):n=t(e>>6&31|192),n+=t(63&e|128),n}const s=function(e){const t=[];if(!e)return[];const i=e.length;let n,s,r=0;for(;r<i;)n=e.charCodeAt(r++),n>=55296&&n<=56319&&r<i?(s=e.charCodeAt(r++),56320==(64512&s)?t.push(((1023&n)<<10)+(1023&s)+65536):(t.push(n),r--)):t.push(n);return t}(e),r=s.length;let o,a=-1,l="";for(;++a<r;)o=s[a],l+=n(o);return l}function vt(e){return e[0].toUpperCase()+e.substring(1).toLowerCase()}function yt(e,t){if(null==e)return null;const i=e.toString().toString();return t?i:i.replace(gt,e=>ft[e])}function Ct(e){return e&&null!=e?e.replace(/([a-z])([A-Z])/g,"$1 $2").replace(/([A-Z]+)([A-Z])([a-z])/g,"$1 $2$3").replace(/\./g," ").split(" ").map(e=>e.substring(0,1).toUpperCase()+(e.length>1?e.substring(1,e.length):"")).join(" "):null}function bt(e){return e.replace(/[A-Z]/g,e=>`-${e.toLocaleLowerCase()}`)}var St={};function wt(e){const t=new Map;return e.forEach(e=>t.set(e[0],e[1])),t}function xt(e,t){const i=new Map;return e.forEach(e=>i.set(t(e),e)),i}function Et(e){const t=[];return e.forEach((e,i)=>t.push(i)),t}p(St,{convertToMap:()=>wt,keys:()=>Et,mapById:()=>xt});var Mt=class extends nt{constructor(){super(...arguments),this.primaryHeaderRowCount=0,this.secondaryHeaderRowCount=0,this.gridHeaderRowCount=0,this.displayedColumnsLeft=[],this.displayedColumnsRight=[],this.displayedColumnsCenter=[],this.displayedColumns=[],this.displayedColumnsAndGroupsMap={},this.viewportColumns=[],this.viewportColumnsHash="",this.headerViewportColumns=[],this.viewportColumnsCenter=[],this.headerViewportColumnsCenter=[],this.viewportRowLeft={},this.viewportRowRight={},this.viewportRowCenter={},this.autoHeightActiveAtLeastOnce=!1,this.rowGroupColumns=[],this.valueColumns=[],this.pivotColumns=[],this.ready=!1,this.changeEventsDispatching=!1,this.autoGroupsNeedBuilding=!1,this.forceRecreateAutoGroups=!1,this.pivotMode=!1,this.bodyWidth=0,this.leftWidth=0,this.rightWidth=0,this.bodyWidthDirty=!0,this.shouldQueueResizeOperations=!1,this.resizeOperationQueue=[]}init(){this.suppressColumnVirtualisation=this.gos.get("suppressColumnVirtualisation");const e=this.gos.get("pivotMode");this.isPivotSettingAllowed(e)&&(this.pivotMode=e),this.addManagedPropertyListeners(["groupDisplayType","treeData","treeDataDisplayType","groupHideOpenParents"],e=>this.buildAutoGroupColumns(At(e.source))),this.addManagedPropertyListener("autoGroupColumnDef",e=>this.onAutoGroupColumnDefChanged(At(e.source))),this.addManagedPropertyListeners(["defaultColDef","columnTypes","suppressFieldDotNotation"],e=>this.onSharedColDefChanged(At(e.source))),this.addManagedPropertyListener("pivotMode",e=>this.setPivotMode(this.gos.get("pivotMode"),At(e.source))),this.addManagedListener(this.eventService,lt.EVENT_FIRST_DATA_RENDERED,()=>this.onFirstDataRendered())}buildAutoGroupColumns(e){this.columnDefs&&(this.autoGroupsNeedBuilding=!0,this.forceRecreateAutoGroups=!0,this.updateGridColumns(),this.updateDisplayedColumns(e))}onAutoGroupColumnDefChanged(e){this.groupAutoColumns&&this.autoGroupColService.updateAutoGroupColumns(this.groupAutoColumns,e)}onSharedColDefChanged(e){this.gridColumns&&(this.groupAutoColumns&&this.autoGroupColService.updateAutoGroupColumns(this.groupAutoColumns,e),this.createColumnsFromColumnDefs(!0,e))}setColumnDefs(e,t){const i=!!this.columnDefs;this.columnDefs=e,this.createColumnsFromColumnDefs(i,t)}recreateColumnDefs(e){this.onSharedColDefChanged(e)}destroyOldColumns(e,t){const i={};if(!e)return;rt(null,e,e=>{i[e.getInstanceId()]=e}),t&&rt(null,t,e=>{i[e.getInstanceId()]=null});const n=Object.values(i).filter(e=>null!=e);this.destroyBeans(n)}destroyColumns(){this.destroyOldColumns(this.primaryColumnTree),this.destroyOldColumns(this.secondaryBalancedTree),this.destroyOldColumns(this.groupAutoColsBalancedTree)}createColumnsFromColumnDefs(e,t){const i=e?this.compareColumnStatesAndDispatchEvents(t):void 0;this.valueCache.expire(),this.autoGroupsNeedBuilding=!0;const n=this.primaryColumns,s=this.primaryColumnTree,r=this.columnFactory.createColumnTree(this.columnDefs,!0,s,t);this.destroyOldColumns(this.primaryColumnTree,r.columnTree),this.primaryColumnTree=r.columnTree,this.primaryHeaderRowCount=r.treeDept+1,this.primaryColumns=this.getColumnsFromTree(this.primaryColumnTree),this.primaryColumnsMap={},this.primaryColumns.forEach(e=>this.primaryColumnsMap[e.getId()]=e),this.extractRowGroupColumns(t,n),this.extractPivotColumns(t,n),this.extractValueColumns(t,n),this.ready=!0;const o=void 0===this.gridColsArePrimary;(this.gridColsArePrimary||o||this.autoGroupsNeedBuilding)&&(this.updateGridColumns(),e&&this.gridColsArePrimary&&!this.gos.get("maintainColumnOrder")&&this.orderGridColumnsLikePrimary(),this.updateDisplayedColumns(t),this.checkViewportColumns()),this.dispatchEverythingChanged(t),this.changeEventsDispatching=!0,i&&i(),this.changeEventsDispatching=!1,this.dispatchNewColumnsLoaded(t)}shouldRowModelIgnoreRefresh(){return this.changeEventsDispatching}dispatchNewColumnsLoaded(e){const t={type:lt.EVENT_NEW_COLUMNS_LOADED,source:e};this.eventService.dispatchEvent(t),"gridInitializing"===e&&this.onColumnsReady()}dispatchEverythingChanged(e){const t={type:lt.EVENT_COLUMN_EVERYTHING_CHANGED,source:e};this.eventService.dispatchEvent(t)}orderGridColumnsLikePrimary(){const e=this.primaryColumns;if(!e)return;const t=e.filter(e=>this.gridColumns.indexOf(e)>=0),i=this.gridColumns.filter(e=>t.indexOf(e)<0);this.gridColumns=[...i,...t],this.gridColumns=this.placeLockedColumns(this.gridColumns)}getAllDisplayedAutoHeightCols(){return this.displayedAutoHeightCols}setViewport(){this.gos.get("enableRtl")?(this.viewportLeft=this.bodyWidth-this.scrollPosition-this.scrollWidth,this.viewportRight=this.bodyWidth-this.scrollPosition):(this.viewportLeft=this.scrollPosition,this.viewportRight=this.scrollWidth+this.scrollPosition)}checkViewportColumns(e=!1){if(null==this.displayedColumnsCenter)return;if(!this.extractViewport())return;const t={type:lt.EVENT_VIRTUAL_COLUMNS_CHANGED,afterScroll:e};this.eventService.dispatchEvent(t)}setViewportPosition(e,t,i=!1){(e!==this.scrollWidth||t!==this.scrollPosition||this.bodyWidthDirty)&&(this.scrollWidth=e,this.scrollPosition=t,this.bodyWidthDirty=!0,this.setViewport(),this.ready&&this.checkViewportColumns(i))}isPivotMode(){return this.pivotMode}isPivotSettingAllowed(e){return!e||!this.gos.get("treeData")||(z("Pivot mode not available with treeData."),!1)}setPivotMode(e,t){if(e===this.pivotMode||!this.isPivotSettingAllowed(this.pivotMode))return;if(this.pivotMode=e,!this.gridColumns)return;this.autoGroupsNeedBuilding=!0,this.updateGridColumns(),this.updateDisplayedColumns(t);const i={type:lt.EVENT_COLUMN_PIVOT_MODE_CHANGED};this.eventService.dispatchEvent(i)}getSecondaryPivotColumn(e,t){if(C(this.secondaryColumns))return null;const i=this.getPrimaryColumn(t);let n=null;return this.secondaryColumns.forEach(t=>{const s=t.getColDef().pivotKeys,r=t.getColDef().pivotValueColumn;Ie(s,e)&&r===i&&(n=t)}),n}setBeans(e){this.logger=e.create("columnModel")}setFirstRightAndLastLeftPinned(e){let t,i;this.gos.get("enableRtl")?(t=this.displayedColumnsLeft?this.displayedColumnsLeft[0]:null,i=this.displayedColumnsRight?De(this.displayedColumnsRight):null):(t=this.displayedColumnsLeft?De(this.displayedColumnsLeft):null,i=this.displayedColumnsRight?this.displayedColumnsRight[0]:null),this.gridColumns.forEach(n=>{n.setLastLeftPinned(n===t,e),n.setFirstRightPinned(n===i,e)})}autoSizeColumns(e){if(this.shouldQueueResizeOperations)return void this.resizeOperationQueue.push(()=>this.autoSizeColumns(e));const{columns:t,skipHeader:i,skipHeaderGroups:n,stopAtGroup:s,source:r="api"}=e;this.animationFrameService.flushAllFrames();const o=[];let a=-1;const l=null!=i?i:this.gos.get("skipHeaderOnAutoSize"),c=null!=n?n:l;for(;0!==a;)a=0,this.actionOnGridColumns(t,e=>{if(o.indexOf(e)>=0)return!1;const t=this.autoWidthCalculator.getPreferredWidthForColumn(e,l);if(t>0){const i=this.normaliseColumnWidth(e,t);e.setActualWidth(i,r),o.push(e),a++}return!0},r);c||this.autoSizeColumnGroupsByColumns(t,r,s),this.dispatchColumnResizedEvent(o,!0,"autosizeColumns")}dispatchColumnResizedEvent(e,t,i,n=null){if(e&&e.length){const s={type:lt.EVENT_COLUMN_RESIZED,columns:e,column:1===e.length?e[0]:null,flexColumns:n,finished:t,source:i};this.eventService.dispatchEvent(s)}}dispatchColumnChangedEvent(e,t,i){const n={type:e,columns:t,column:t&&1==t.length?t[0]:null,source:i};this.eventService.dispatchEvent(n)}dispatchColumnMovedEvent(e){const{movedColumns:t,source:i,toIndex:n,finished:s}=e,r={type:lt.EVENT_COLUMN_MOVED,columns:t,column:t&&1===t.length?t[0]:null,toIndex:n,finished:s,source:i};this.eventService.dispatchEvent(r)}dispatchColumnPinnedEvent(e,t){if(!e.length)return;const i=1===e.length?e[0]:null,n=this.getCommonValue(e,e=>e.getPinned()),s={type:lt.EVENT_COLUMN_PINNED,pinned:null!=n?n:null,columns:e,column:i,source:t};this.eventService.dispatchEvent(s)}dispatchColumnVisibleEvent(e,t){if(!e.length)return;const i=1===e.length?e[0]:null,n=this.getCommonValue(e,e=>e.isVisible()),s={type:lt.EVENT_COLUMN_VISIBLE,visible:n,columns:e,column:i,source:t};this.eventService.dispatchEvent(s)}autoSizeColumn(e,t,i){e&&this.autoSizeColumns({columns:[e],skipHeader:i,skipHeaderGroups:!0,source:t})}autoSizeColumnGroupsByColumns(e,t,i){const n=new Set;let s;this.getGridColumns(e).forEach(e=>{let t=e.getParent();for(;t&&t!=i;)t.isPadding()||n.add(t),t=t.getParent()});for(const e of n){for(const t of this.ctrlsService.getHeaderRowContainerCtrls())if(s=t.getHeaderCtrlForColumn(e),s)break;s&&s.resizeLeafColumnsToFit(t)}return[]}autoSizeAllColumns(e,t){if(this.shouldQueueResizeOperations)return void this.resizeOperationQueue.push(()=>this.autoSizeAllColumns(e,t));const i=this.getAllDisplayedColumns();this.autoSizeColumns({columns:i,skipHeader:t,source:e})}getColumnsFromTree(e){const t=[],i=e=>{for(let n=0;n<e.length;n++){const s=e[n];s instanceof Se?t.push(s):s instanceof xe&&i(s.getChildren())}};return i(e),t}getAllDisplayedTrees(){return this.displayedTreeLeft&&this.displayedTreeRight&&this.displayedTreeCentre?this.displayedTreeLeft.concat(this.displayedTreeCentre).concat(this.displayedTreeRight):null}getPrimaryColumnTree(){return this.primaryColumnTree}getHeaderRowCount(){return this.gridHeaderRowCount}getDisplayedTreeLeft(){return this.displayedTreeLeft}getDisplayedTreeRight(){return this.displayedTreeRight}getDisplayedTreeCentre(){return this.displayedTreeCentre}isColumnDisplayed(e){return this.getAllDisplayedColumns().indexOf(e)>=0}getAllDisplayedColumns(){return this.displayedColumns}getViewportColumns(){return this.viewportColumns}getDisplayedLeftColumnsForRow(e){return this.colSpanActive?this.getDisplayedColumnsForRow(e,this.displayedColumnsLeft):this.displayedColumnsLeft}getDisplayedRightColumnsForRow(e){return this.colSpanActive?this.getDisplayedColumnsForRow(e,this.displayedColumnsRight):this.displayedColumnsRight}isColSpanActive(){return this.colSpanActive}getDisplayedColumnsForRow(e,t,i,n){const s=[];let r=null;for(let o=0;o<t.length;o++){const a=t[o],l=t.length-o,c=Math.min(a.getColSpan(e),l),h=[a];if(c>1){const e=c-1;for(let i=1;i<=e;i++)h.push(t[o+i]);o+=e}let d;i?(d=!1,h.forEach(e=>{i(e)&&(d=!0)})):d=!0,d&&(0===s.length&&r&&n&&n(a)&&s.push(r),s.push(a)),r=a}return s}getViewportCenterColumnsForRow(e){if(!this.colSpanActive)return this.viewportColumnsCenter;const t=this.isColumnVirtualisationSuppressed()?null:this.isColumnInRowViewport.bind(this);return this.getDisplayedColumnsForRow(e,this.displayedColumnsCenter,t,e=>{const t=e.getLeft();return y(t)&&t>this.viewportLeft})}isColumnAtEdge(e,t){const i=this.getAllDisplayedColumns();if(!i.length)return!1;const n="first"===t;let s;if(e instanceof at){const t=e.getDisplayedLeafColumns();if(!t.length)return!1;s=n?t[0]:De(t)}else s=e;return(n?i[0]:De(i))===s}getAriaColumnIndex(e){let t;return t=e instanceof at?e.getLeafColumns()[0]:e,this.ariaOrderColumns.indexOf(t)+1}isColumnInHeaderViewport(e){return!!e.isAutoHeaderHeight()||this.isColumnInRowViewport(e)}isColumnInRowViewport(e){if(e.isAutoHeight())return!0;const t=e.getLeft()||0,i=t+e.getActualWidth(),n=this.viewportLeft-200,s=this.viewportRight+200;return!(t<n&&i<n||t>s&&i>s)}getDisplayedColumnsLeftWidth(){return this.getWidthOfColsInList(this.displayedColumnsLeft)}getDisplayedColumnsRightWidth(){return this.getWidthOfColsInList(this.displayedColumnsRight)}updatePrimaryColumnList(e,t,i,n,s,r){if(!e||b(e))return;let o=!1;if(e.forEach(e=>{if(!e)return;const s=this.getPrimaryColumn(e);if(s){if(i){if(t.indexOf(s)>=0)return;t.push(s)}else{if(t.indexOf(s)<0)return;Ne(t,s)}n(s),o=!0}}),!o)return;this.autoGroupsNeedBuilding&&this.updateGridColumns(),this.updateDisplayedColumns(r);const a={type:s,columns:t,column:1===t.length?t[0]:null,source:r};this.eventService.dispatchEvent(a)}setRowGroupColumns(e,t){this.autoGroupsNeedBuilding=!0,this.setPrimaryColumnList(e,this.rowGroupColumns,lt.EVENT_COLUMN_ROW_GROUP_CHANGED,!0,this.setRowGroupActive.bind(this),t)}setRowGroupActive(e,t,i){e!==t.isRowGroupActive()&&(t.setRowGroupActive(e,i),e&&!this.gos.get("suppressRowGroupHidesColumns")&&this.setColumnsVisible([t],!1,i),e||this.gos.get("suppressMakeColumnVisibleAfterUnGroup")||this.setColumnsVisible([t],!0,i))}addRowGroupColumns(e,t){this.autoGroupsNeedBuilding=!0,this.updatePrimaryColumnList(e,this.rowGroupColumns,!0,this.setRowGroupActive.bind(this,!0),lt.EVENT_COLUMN_ROW_GROUP_CHANGED,t)}removeRowGroupColumns(e,t){this.autoGroupsNeedBuilding=!0,this.updatePrimaryColumnList(e,this.rowGroupColumns,!1,this.setRowGroupActive.bind(this,!1),lt.EVENT_COLUMN_ROW_GROUP_CHANGED,t)}addPivotColumns(e,t){this.updatePrimaryColumnList(e,this.pivotColumns,!0,e=>e.setPivotActive(!0,t),lt.EVENT_COLUMN_PIVOT_CHANGED,t)}setPivotColumns(e,t){this.setPrimaryColumnList(e,this.pivotColumns,lt.EVENT_COLUMN_PIVOT_CHANGED,!0,(e,i)=>{i.setPivotActive(e,t)},t)}removePivotColumns(e,t){this.updatePrimaryColumnList(e,this.pivotColumns,!1,e=>e.setPivotActive(!1,t),lt.EVENT_COLUMN_PIVOT_CHANGED,t)}setPrimaryColumnList(e,t,i,n,s,r){if(!this.gridColumns)return;const o=new Map;t.forEach((e,t)=>o.set(e,t)),t.length=0,y(e)&&e.forEach(e=>{const i=this.getPrimaryColumn(e);i&&t.push(i)}),t.forEach((e,t)=>{const i=o.get(e);void 0!==i?n&&i!==t||o.delete(e):o.set(e,0)}),(this.primaryColumns||[]).forEach(e=>{const i=t.indexOf(e)>=0;s(i,e)}),this.autoGroupsNeedBuilding&&this.updateGridColumns(),this.updateDisplayedColumns(r),this.dispatchColumnChangedEvent(i,[...o.keys()],r)}setValueColumns(e,t){this.setPrimaryColumnList(e,this.valueColumns,lt.EVENT_COLUMN_VALUE_CHANGED,!1,this.setValueActive.bind(this),t)}setValueActive(e,t,i){if(e!==t.isValueActive()&&(t.setValueActive(e,i),e&&!t.getAggFunc()&&this.aggFuncService)){const e=this.aggFuncService.getDefaultAggFunc(t);t.setAggFunc(e)}}addValueColumns(e,t){this.updatePrimaryColumnList(e,this.valueColumns,!0,this.setValueActive.bind(this,!0),lt.EVENT_COLUMN_VALUE_CHANGED,t)}removeValueColumns(e,t){this.updatePrimaryColumnList(e,this.valueColumns,!1,this.setValueActive.bind(this,!1),lt.EVENT_COLUMN_VALUE_CHANGED,t)}normaliseColumnWidth(e,t){const i=e.getMinWidth();y(i)&&t<i&&(t=i);const n=e.getMaxWidth();return y(n)&&e.isGreaterThanMax(t)&&(t=n),t}getPrimaryOrGridColumn(e){return this.getPrimaryColumn(e)||this.getGridColumn(e)}setColumnWidths(e,t,i,n){const s=[];e.forEach(e=>{const i=this.getPrimaryOrGridColumn(e.key);if(i&&(s.push({width:e.newWidth,ratios:[1],columns:[i]}),"shift"===this.gos.get("colResizeDefault")&&(t=!t),t)){const t=this.getDisplayedColAfter(i);if(!t)return;const n=i.getActualWidth()-e.newWidth,r=t.getActualWidth()+n;s.push({width:r,ratios:[1],columns:[t]})}}),0!==s.length&&this.resizeColumnSets({resizeSets:s,finished:i,source:n})}checkMinAndMaxWidthsForSet(e){const{columns:t,width:i}=e;let n=0,s=0,r=!0;return t.forEach(e=>{const t=e.getMinWidth();n+=t||0;const i=e.getMaxWidth();y(i)&&i>0?s+=i:r=!1}),i>=n&&(!r||i<=s)}resizeColumnSets(e){const{resizeSets:t,finished:i,source:n}=e;if(t&&!t.every(e=>this.checkMinAndMaxWidthsForSet(e))){if(i){const e=t&&t.length>0?t[0].columns:null;this.dispatchColumnResizedEvent(e,i,n)}return}const s=[],r=[];t.forEach(e=>{const{width:t,columns:i,ratios:o}=e,a={},l={};i.forEach(e=>r.push(e));let c=!0,h=0;for(;c;){if(h++,h>1e3){console.error("AG Grid: infinite loop in resizeColumnSets");break}c=!1;const e=[];let n=0,s=t;i.forEach((t,i)=>{if(l[t.getId()])s-=a[t.getId()];else{e.push(t);const s=o[i];n+=s}});const r=1/n;e.forEach((i,n)=>{let h;n===e.length-1?h=s:(h=Math.round(o[n]*t*r),s-=h);const d=i.getMinWidth(),u=i.getMaxWidth();y(d)&&h<d?(h=d,l[i.getId()]=!0,c=!0):y(u)&&u>0&&h>u&&(h=u,l[i.getId()]=!0,c=!0),a[i.getId()]=h})}i.forEach(e=>{const t=a[e.getId()];e.getActualWidth()!==t&&(e.setActualWidth(t,n),s.push(e))})});const o=s.length>0;let a=[];o&&(a=this.refreshFlexedColumns({resizingCols:r,skipSetLeft:!0}),this.setLeftValues(n),this.updateBodyWidths(),this.checkViewportColumns());const l=r.concat(a);(o||i)&&this.dispatchColumnResizedEvent(l,i,n,a)}setColumnAggFunc(e,t,i){if(!e)return;const n=this.getPrimaryColumn(e);n&&(n.setAggFunc(t),this.dispatchColumnChangedEvent(lt.EVENT_COLUMN_VALUE_CHANGED,[n],i))}moveRowGroupColumn(e,t,i){if(this.isRowGroupEmpty())return;const n=this.rowGroupColumns[e],s=this.rowGroupColumns.slice(e,t);this.rowGroupColumns.splice(e,1),this.rowGroupColumns.splice(t,0,n);const r={type:lt.EVENT_COLUMN_ROW_GROUP_CHANGED,columns:s,column:1===s.length?s[0]:null,source:i};this.eventService.dispatchEvent(r)}moveColumns(e,t,i,n=!0){if(!this.gridColumns)return;if(this.columnAnimationService.start(),t>this.gridColumns.length-e.length)return console.warn("AG Grid: tried to insert columns in invalid location, toIndex = "+t),void console.warn("AG Grid: remember that you should not count the moving columns when calculating the new index");const s=this.getGridColumns(e);!this.doesMovePassRules(s,t)||(Ve(this.gridColumns,s,t),this.updateDisplayedColumns(i),this.dispatchColumnMovedEvent({movedColumns:s,source:i,toIndex:t,finished:n}),this.columnAnimationService.finish())}doesMovePassRules(e,t){const i=this.getProposedColumnOrder(e,t);return this.doesOrderPassRules(i)}doesOrderPassRules(e){return!!this.doesMovePassMarryChildren(e)&&!!this.doesMovePassLockedPositions(e)}getProposedColumnOrder(e,t){const i=this.gridColumns.slice();return Ve(i,e,t),i}sortColumnsLikeGridColumns(e){!e||e.length<=1||e.filter(e=>this.gridColumns.indexOf(e)<0).length>0||e.sort((e,t)=>this.gridColumns.indexOf(e)-this.gridColumns.indexOf(t))}doesMovePassLockedPositions(e){let t=0,i=!0;return e.forEach(e=>{const n=(s=e.getColDef().lockPosition)?!0===s||"left"===s?0:2:1;var s;n<t&&(i=!1),t=n}),i}doesMovePassMarryChildren(e){let t=!0;return rt(null,this.gridBalancedTree,i=>{if(!(i instanceof xe))return;const n=i,s=n.getColGroupDef();if(!s||!s.marryChildren)return;const r=[];n.getLeafColumns().forEach(t=>{const i=e.indexOf(t);r.push(i)}),Math.max.apply(Math,r)-Math.min.apply(Math,r)>n.getLeafColumns().length-1&&(t=!1)}),t}moveColumnByIndex(e,t,i){if(!this.gridColumns)return;const n=this.gridColumns[e];this.moveColumns([n],t,i)}getColumnDefs(){if(!this.primaryColumns)return;const e=this.primaryColumns.slice();return this.gridColsArePrimary?e.sort((e,t)=>this.gridColumns.indexOf(e)-this.gridColumns.indexOf(t)):this.lastPrimaryOrder&&e.sort((e,t)=>this.lastPrimaryOrder.indexOf(e)-this.lastPrimaryOrder.indexOf(t)),this.columnDefFactory.buildColumnDefs(e,this.rowGroupColumns,this.pivotColumns)}getBodyContainerWidth(){return this.bodyWidth}getContainerWidth(e){switch(e){case"left":return this.leftWidth;case"right":return this.rightWidth;default:return this.bodyWidth}}updateBodyWidths(){const e=this.getWidthOfColsInList(this.displayedColumnsCenter),t=this.getWidthOfColsInList(this.displayedColumnsLeft),i=this.getWidthOfColsInList(this.displayedColumnsRight);if(this.bodyWidthDirty=this.bodyWidth!==e,this.bodyWidth!==e||this.leftWidth!==t||this.rightWidth!==i){this.bodyWidth=e,this.leftWidth=t,this.rightWidth=i;const n={type:lt.EVENT_COLUMN_CONTAINER_WIDTH_CHANGED};this.eventService.dispatchEvent(n);const s={type:lt.EVENT_DISPLAYED_COLUMNS_WIDTH_CHANGED};this.eventService.dispatchEvent(s)}}getValueColumns(){return this.valueColumns?this.valueColumns:[]}getPivotColumns(){return this.pivotColumns?this.pivotColumns:[]}isPivotActive(){return this.pivotColumns&&this.pivotColumns.length>0&&this.pivotMode}getRowGroupColumns(){return this.rowGroupColumns?this.rowGroupColumns:[]}getDisplayedCenterColumns(){return this.displayedColumnsCenter}getDisplayedLeftColumns(){return this.displayedColumnsLeft}getDisplayedRightColumns(){return this.displayedColumnsRight}getAllPrimaryColumns(){return this.primaryColumns?this.primaryColumns:null}getSecondaryColumns(){return this.secondaryColumns?this.secondaryColumns:null}getAllColumnsForQuickFilter(){return this.columnsForQuickFilter}getAllGridColumns(){var e;return null!=(e=this.gridColumns)?e:[]}isRowGroupEmpty(){return b(this.rowGroupColumns)}setColumnsVisible(e,t=!1,i){this.applyColumnState({state:e.map(e=>({colId:"string"==typeof e?e:e.getColId(),hide:!t}))},i)}setColumnsPinned(e,t,i){if(!this.gridColumns)return;if(this.gos.isDomLayout("print"))return void console.warn("AG Grid: Changing the column pinning status is not allowed with domLayout='print'");let n;this.columnAnimationService.start(),n=!0===t||"left"===t?"left":"right"===t?"right":null,this.actionOnGridColumns(e,e=>e.getPinned()!==n&&(e.setPinned(n),!0),i,()=>({type:lt.EVENT_COLUMN_PINNED,pinned:n,column:null,columns:null,source:i})),this.columnAnimationService.finish()}actionOnGridColumns(e,t,i,n){if(b(e))return;const s=[];if(e.forEach(e=>{if(!e)return;const i=this.getGridColumn(e);i&&!1!==t(i)&&s.push(i)}),s.length&&(this.updateDisplayedColumns(i),y(n)&&n)){const e=n();e.columns=s,e.column=1===s.length?s[0]:null,this.eventService.dispatchEvent(e)}}getDisplayedColBefore(e){const t=this.getAllDisplayedColumns(),i=t.indexOf(e);return i>0?t[i-1]:null}getDisplayedColAfter(e){const t=this.getAllDisplayedColumns(),i=t.indexOf(e);return i<t.length-1?t[i+1]:null}getDisplayedGroupAtDirection(e,t){const i=e.getProvidedColumnGroup().getLevel()+e.getPaddingLevel(),n=e.getDisplayedLeafColumns(),s="After"===t?De(n):n[0],r=`getDisplayedCol${t}`;for(;;){const t=this[r](s);if(!t)return null;const n=this.getColumnGroupAtLevel(t,i);if(n!==e)return n}}getColumnGroupAtLevel(e,t){let i,n,s=e.getParent();for(;i=s.getProvidedColumnGroup().getLevel(),n=s.getPaddingLevel(),!(i+n<=t);)s=s.getParent();return s}isPinningLeft(){return this.displayedColumnsLeft.length>0}isPinningRight(){return this.displayedColumnsRight.length>0}getPrimaryAndSecondaryAndAutoColumns(){return[].concat(this.primaryColumns||[],this.groupAutoColumns||[],this.secondaryColumns||[])}createStateItemFromColumn(e){const t=e.isRowGroupActive()?this.rowGroupColumns.indexOf(e):null,i=e.isPivotActive()?this.pivotColumns.indexOf(e):null,n=e.isValueActive()?e.getAggFunc():null,s=null!=e.getSort()?e.getSort():null,r=null!=e.getSortIndex()?e.getSortIndex():null,o=null!=e.getFlex()&&e.getFlex()>0?e.getFlex():null;return{colId:e.getColId(),width:e.getActualWidth(),hide:!e.isVisible(),pinned:e.getPinned(),sort:s,sortIndex:r,aggFunc:n,rowGroup:e.isRowGroupActive(),rowGroupIndex:t,pivot:e.isPivotActive(),pivotIndex:i,flex:o}}getColumnState(){if(C(this.primaryColumns)||!this.isAlive())return[];const e=this.getPrimaryAndSecondaryAndAutoColumns().map(this.createStateItemFromColumn.bind(this));return this.orderColumnStateList(e),e}orderColumnStateList(e){const t=wt(this.gridColumns.map((e,t)=>[e.getColId(),t]));e.sort((e,i)=>(t.has(e.colId)?t.get(e.colId):-1)-(t.has(i.colId)?t.get(i.colId):-1))}resetColumnState(e){if(b(this.primaryColumns))return;const t=this.getColumnsFromTree(this.primaryColumnTree),i=[];let n=1e3,s=1e3,r=[];this.groupAutoColumns&&(r=r.concat(this.groupAutoColumns)),t&&(r=r.concat(t)),r.forEach(e=>{const t=this.getColumnStateFromColDef(e);C(t.rowGroupIndex)&&t.rowGroup&&(t.rowGroupIndex=n++),C(t.pivotIndex)&&t.pivot&&(t.pivotIndex=s++),i.push(t)}),this.applyColumnState({state:i,applyOrder:!0},e)}getColumnStateFromColDef(e){const t=(e,t)=>null!=e?e:null!=t?t:null,i=e.getColDef(),n=t(i.sort,i.initialSort),s=t(i.sortIndex,i.initialSortIndex),r=t(i.hide,i.initialHide),o=t(i.pinned,i.initialPinned),a=t(i.width,i.initialWidth),l=t(i.flex,i.initialFlex);let c=t(i.rowGroupIndex,i.initialRowGroupIndex),h=t(i.rowGroup,i.initialRowGroup);null!=c||null!=h&&0!=h||(c=null,h=null);let d=t(i.pivotIndex,i.initialPivotIndex),u=t(i.pivot,i.initialPivot);null!=d||null!=u&&0!=u||(d=null,u=null);const p=t(i.aggFunc,i.initialAggFunc);return{colId:e.getColId(),sort:n,sortIndex:s,hide:r,pinned:o,width:a,flex:l,rowGroup:h,rowGroupIndex:c,pivot:u,pivotIndex:d,aggFunc:p}}applyColumnState(e,t){if(b(this.primaryColumns))return!1;if(e&&e.state&&!e.state.forEach)return console.warn("AG Grid: applyColumnState() - the state attribute should be an array, however an array was not found. Please provide an array of items (one for each col you want to change) for state."),!1;const i=(i,n,s)=>{const r=this.compareColumnStatesAndDispatchEvents(t);this.autoGroupsNeedBuilding=!0;const o=n.slice(),a={},l={},c=[],h=[];let d=0;const u=this.rowGroupColumns.slice(),p=this.pivotColumns.slice();i.forEach(i=>{const n=i.colId||"";if(n.startsWith(dt))return c.push(i),void h.push(i);const r=s(n);r?(this.syncColumnWithStateItem(r,i,e.defaultState,a,l,!1,t),Ne(o,r)):(h.push(i),d+=1)});const g=i=>this.syncColumnWithStateItem(i,null,e.defaultState,a,l,!1,t);o.forEach(g);const f=(e,t,i,n)=>{const s=e[i.getId()],r=e[n.getId()],o=null!=s,a=null!=r;if(o&&a)return s-r;if(o)return-1;if(a)return 1;const l=t.indexOf(i),c=t.indexOf(n),h=l>=0;return h&&c>=0?l-c:h?-1:1};this.rowGroupColumns.sort(f.bind(this,a,u)),this.pivotColumns.sort(f.bind(this,l,p)),this.updateGridColumns();const m=this.groupAutoColumns?this.groupAutoColumns.slice():[];return c.forEach(i=>{const n=this.getAutoColumn(i.colId);Ne(m,n),this.syncColumnWithStateItem(n,i,e.defaultState,null,null,!0,t)}),m.forEach(g),this.applyOrderAfterApplyState(e),this.updateDisplayedColumns(t),this.dispatchEverythingChanged(t),r(),{unmatchedAndAutoStates:h,unmatchedCount:d}};this.columnAnimationService.start();let{unmatchedAndAutoStates:n,unmatchedCount:s}=i(e.state||[],this.primaryColumns||[],e=>this.getPrimaryColumn(e));return(n.length>0||y(e.defaultState))&&(s=i(n,this.secondaryColumns||[],e=>this.getSecondaryColumn(e)).unmatchedCount),this.columnAnimationService.finish(),0===s}applyOrderAfterApplyState(e){if(!e.applyOrder||!e.state)return;let t=[];const i={};e.state.forEach(e=>{if(!e.colId||i[e.colId])return;const n=this.gridColumnsMap[e.colId];n&&(t.push(n),i[e.colId]=!0)});let n=0;this.gridColumns.forEach(e=>{const s=e.getColId();null==i[s]&&(s.startsWith(dt)?Fe(t,e,n++):t.push(e))}),t=this.placeLockedColumns(t),this.doesMovePassMarryChildren(t)?this.gridColumns=t:console.warn("AG Grid: Applying column order broke a group where columns should be married together. Applying new order has been discarded.")}compareColumnStatesAndDispatchEvents(e){const t={rowGroupColumns:this.rowGroupColumns.slice(),pivotColumns:this.pivotColumns.slice(),valueColumns:this.valueColumns.slice()},i=this.getColumnState(),n={};return i.forEach(e=>{n[e.colId]=e}),()=>{const s=this.getPrimaryAndSecondaryAndAutoColumns(),r=(t,i,n,s)=>{if(Ie(i.map(s),n.map(s)))return;const r=new Set(i);n.forEach(e=>{r.delete(e)||r.add(e)});const o=[...r],a={type:t,columns:o,column:1===o.length?o[0]:null,source:e};this.eventService.dispatchEvent(a)},o=e=>{const t=[];return s.forEach(i=>{const s=n[i.getColId()];s&&e(s,i)&&t.push(i)}),t},a=e=>e.getColId();r(lt.EVENT_COLUMN_ROW_GROUP_CHANGED,t.rowGroupColumns,this.rowGroupColumns,a),r(lt.EVENT_COLUMN_PIVOT_CHANGED,t.pivotColumns,this.pivotColumns,a);const l=o((e,t)=>{const i=null!=e.aggFunc,n=i!=t.isValueActive(),s=i&&e.aggFunc!=t.getAggFunc();return n||s});l.length>0&&this.dispatchColumnChangedEvent(lt.EVENT_COLUMN_VALUE_CHANGED,l,e),this.dispatchColumnResizedEvent(o((e,t)=>e.width!=t.getActualWidth()),!0,e),this.dispatchColumnPinnedEvent(o((e,t)=>e.pinned!=t.getPinned()),e),this.dispatchColumnVisibleEvent(o((e,t)=>e.hide==t.isVisible()),e);const c=o((e,t)=>e.sort!=t.getSort()||e.sortIndex!=t.getSortIndex());c.length>0&&this.sortController.dispatchSortChangedEvents(e,c),this.normaliseColumnMovedEventForColumnState(i,e)}}getCommonValue(e,t){if(!e||0==e.length)return;const i=t(e[0]);for(let n=1;n<e.length;n++)if(i!==t(e[n]))return;return i}normaliseColumnMovedEventForColumnState(e,t){const i=this.getColumnState(),n={};i.forEach(e=>n[e.colId]=e);const s={};e.forEach(e=>{n[e.colId]&&(s[e.colId]=!0)});const r=e.filter(e=>s[e.colId]),o=i.filter(e=>s[e.colId]),a=[];o.forEach((e,t)=>{const i=r&&r[t];if(i&&i.colId!==e.colId){const e=this.getGridColumn(i.colId);e&&a.push(e)}}),a.length&&this.dispatchColumnMovedEvent({movedColumns:a,source:t,finished:!0})}syncColumnWithStateItem(e,t,i,n,s,r,o){var a;if(!e)return;const l=(e,n)=>{const s={value1:void 0,value2:void 0};let r=!1;return t&&(void 0!==t[e]&&(s.value1=t[e],r=!0),y(n)&&void 0!==t[n]&&(s.value2=t[n],r=!0)),!r&&i&&(void 0!==i[e]&&(s.value1=i[e]),y(n)&&void 0!==i[n]&&(s.value2=i[n])),s},c=l("hide").value1;void 0!==c&&e.setVisible(!c,o);const h=l("pinned").value1;void 0!==h&&e.setPinned(h);const d=null!=(a=e.getColDef().minWidth)?a:this.environment.getMinColWidth(),u=l("flex").value1;if(void 0!==u&&e.setFlex(u),null==u){const t=l("width").value1;null!=t&&null!=d&&t>=d&&e.setActualWidth(t,o)}const p=l("sort").value1;void 0!==p&&("desc"===p||"asc"===p?e.setSort(p,o):e.setSort(void 0,o));const g=l("sortIndex").value1;if(void 0!==g&&e.setSortIndex(g),r||!e.isPrimary())return;const f=l("aggFunc").value1;void 0!==f&&("string"==typeof f?(e.setAggFunc(f),e.isValueActive()||(e.setValueActive(!0,o),this.valueColumns.push(e))):(y(f)&&console.warn("AG Grid: stateItem.aggFunc must be a string. if using your own aggregation functions, register the functions first before using them in get/set state. This is because it is intended for the column state to be stored and retrieved as simple JSON."),e.isValueActive()&&(e.setValueActive(!1,o),Ne(this.valueColumns,e))));const{value1:m,value2:v}=l("rowGroup","rowGroupIndex");void 0===m&&void 0===v||("number"==typeof v||m?(e.isRowGroupActive()||(e.setRowGroupActive(!0,o),this.rowGroupColumns.push(e)),n&&"number"==typeof v&&(n[e.getId()]=v)):e.isRowGroupActive()&&(e.setRowGroupActive(!1,o),Ne(this.rowGroupColumns,e)));const{value1:C,value2:b}=l("pivot","pivotIndex");void 0===C&&void 0===b||("number"==typeof b||C?(e.isPivotActive()||(e.setPivotActive(!0,o),this.pivotColumns.push(e)),s&&"number"==typeof b&&(s[e.getId()]=b)):e.isPivotActive()&&(e.setPivotActive(!1,o),Ne(this.pivotColumns,e)))}getGridColumns(e){return this.getColumns(e,this.getGridColumn.bind(this))}getColumns(e,t){const i=[];return e&&e.forEach(e=>{const n=t(e);n&&i.push(n)}),i}getColumnWithValidation(e){if(null==e)return null;const t=this.getGridColumn(e);return t||console.warn("AG Grid: could not find column "+e),t}getPrimaryColumn(e){return this.primaryColumns?this.getColumn(e,this.primaryColumns,this.primaryColumnsMap):null}getGridColumn(e){return this.getColumn(e,this.gridColumns,this.gridColumnsMap)}lookupGridColumn(e){return this.gridColumnsMap[e]}getSecondaryColumn(e){return this.secondaryColumns?this.getColumn(e,this.secondaryColumns,this.secondaryColumnsMap):null}getColumn(e,t,i){if(!e||!i)return null;if("string"==typeof e&&i[e])return i[e];for(let i=0;i<t.length;i++)if(this.columnsMatch(t[i],e))return t[i];return this.getAutoColumn(e)}getSourceColumnsForGroupColumn(e){const t=e.getColDef().showRowGroup;if(!t)return null;if(!0===t)return this.rowGroupColumns.slice(0);const i=this.getPrimaryColumn(t);return i?[i]:null}getAutoColumn(e){return this.groupAutoColumns&&y(this.groupAutoColumns)&&!C(this.groupAutoColumns)&&this.groupAutoColumns.find(t=>this.columnsMatch(t,e))||null}columnsMatch(e,t){const i=e===t,n=e.getColDef()===t,s=e.getColId()==t;return i||n||s}getDisplayNameForColumn(e,t,i=!1){if(!e)return null;const n=this.getHeaderName(e.getColDef(),e,null,null,t);return i?this.wrapHeaderNameWithAggFunc(e,n):n}getDisplayNameForProvidedColumnGroup(e,t,i){const n=t?t.getColGroupDef():null;return n?this.getHeaderName(n,null,e,t,i):null}getDisplayNameForColumnGroup(e,t){return this.getDisplayNameForProvidedColumnGroup(e,e.getProvidedColumnGroup(),t)}getHeaderName(e,t,i,n,s){const r=e.headerValueGetter;if(r){const o=this.gos.addGridCommonParams({colDef:e,column:t,columnGroup:i,providedColumnGroup:n,location:s});return"function"==typeof r?r(o):"string"==typeof r?this.expressionService.evaluate(r,o):(console.warn("AG Grid: headerValueGetter must be a function or a string"),"")}return null!=e.headerName?e.headerName:e.field?Ct(e.field):""}wrapHeaderNameWithAggFunc(e,t){if(this.gos.get("suppressAggFuncInHeader"))return t;const i=e.getColDef().pivotValueColumn;let n,s=null;if(y(i)){const r=this.gos.get("removePivotHeaderRowWhenSingleValueColumn")&&1===this.valueColumns.length,o=void 0!==e.getColDef().pivotTotalColumnIds;if(r&&!o)return t;s=i?i.getAggFunc():null,n=!0}else{const t=e.isValueActive(),i=this.pivotMode||!this.isRowGroupEmpty();t&&i?(s=e.getAggFunc(),n=!0):n=!1}if(n){const e="string"==typeof s?s:"func";return`${this.localeService.getLocaleTextFunc()(e,e)}(${t})`}return t}getColumnGroup(e,t){if(!e)return null;if(e instanceof at)return e;const i=this.getAllDisplayedTrees(),n="number"==typeof t;let s=null;return Tt(i,!1,i=>{if(i instanceof at){const r=i;let o;o=n?e===r.getGroupId()&&t===r.getPartId():e===r.getGroupId(),o&&(s=r)}}),s}isReady(){return this.ready}extractValueColumns(e,t){this.valueColumns=this.extractColumns(t,this.valueColumns,(t,i)=>t.setValueActive(i,e),()=>{},()=>{},e=>{const t=e.aggFunc;return null===t||""===t?null:void 0!==t?!!t:void 0},e=>null!=e.initialAggFunc&&""!=e.initialAggFunc),this.valueColumns.forEach(e=>{const t=e.getColDef();null!=t.aggFunc&&""!=t.aggFunc?e.setAggFunc(t.aggFunc):e.getAggFunc()||e.setAggFunc(t.initialAggFunc)})}extractRowGroupColumns(e,t){this.rowGroupColumns=this.extractColumns(t,this.rowGroupColumns,(t,i)=>t.setRowGroupActive(i,e),e=>e.rowGroupIndex,e=>e.initialRowGroupIndex,e=>e.rowGroup,e=>e.initialRowGroup)}extractColumns(e=[],t=[],i,n,s,r,o){const a=[],l=[];(this.primaryColumns||[]).forEach(i=>{const c=e.indexOf(i)<0,h=i.getColDef(),d=x(r(h)),u=x(o(h)),p=w(n(h)),g=w(s(h));let f;f=void 0!==d?d:void 0!==p?null!==p&&p>=0:c?void 0!==u?u:!(void 0===g)&&null!=g&&g>=0:t.indexOf(i)>=0,f&&((c?null!=p||null!=g:null!=p)?a.push(i):l.push(i))});const c=e=>{const t=n(e.getColDef()),i=s(e.getColDef());return null!=t?t:i};a.sort((e,t)=>{const i=c(e),n=c(t);return i===n?0:i<n?-1:1});const h=[].concat(a);return t.forEach(e=>{l.indexOf(e)>=0&&h.push(e)}),l.forEach(e=>{h.indexOf(e)<0&&h.push(e)}),t.forEach(e=>{h.indexOf(e)<0&&i(e,!1)}),h.forEach(e=>{t.indexOf(e)<0&&i(e,!0)}),h}extractPivotColumns(e,t){this.pivotColumns=this.extractColumns(t,this.pivotColumns,(t,i)=>t.setPivotActive(i,e),e=>e.pivotIndex,e=>e.initialPivotIndex,e=>e.pivot,e=>e.initialPivot)}resetColumnGroupState(e){if(!this.primaryColumnTree)return;const t=[];rt(null,this.primaryColumnTree,e=>{if(e instanceof xe){const i=e.getColGroupDef(),n={groupId:e.getGroupId(),open:i?i.openByDefault:void 0};t.push(n)}}),this.setColumnGroupState(t,e)}getColumnGroupState(){const e=[];return rt(null,this.gridBalancedTree,t=>{t instanceof xe&&e.push({groupId:t.getGroupId(),open:t.isExpanded()})}),e}setColumnGroupState(e,t){if(!this.gridBalancedTree)return;this.columnAnimationService.start();const i=[];if(e.forEach(e=>{const t=e.groupId,n=e.open,s=this.getProvidedColumnGroup(t);s&&s.isExpanded()!==n&&(this.logger.log("columnGroupOpened("+s.getGroupId()+","+n+")"),s.setExpanded(n),i.push(s))}),this.updateGroupsAndDisplayedColumns(t),this.setFirstRightAndLastLeftPinned(t),i.length){const e={type:lt.EVENT_COLUMN_GROUP_OPENED,columnGroup:1===xe.length?i[0]:void 0,columnGroups:i};this.eventService.dispatchEvent(e)}this.columnAnimationService.finish()}setColumnGroupOpened(e,t,i){let n;n=e instanceof xe?e.getId():e||"",this.setColumnGroupState([{groupId:n,open:t}],i)}getProvidedColumnGroup(e){"string"!=typeof e&&console.error("AG Grid: group key must be a string");let t=null;return rt(null,this.gridBalancedTree,i=>{i instanceof xe&&i.getId()===e&&(t=i)}),t}calculateColumnsForDisplay(){let e;return e=this.pivotMode&&C(this.secondaryColumns)?this.gridColumns.filter(e=>{const t=this.groupAutoColumns&&Be(this.groupAutoColumns,e),i=this.valueColumns&&Be(this.valueColumns,e);return t||i}):this.gridColumns.filter(e=>this.groupAutoColumns&&Be(this.groupAutoColumns,e)||e.isVisible()),e}checkColSpanActiveInCols(e){let t=!1;return e.forEach(e=>{y(e.getColDef().colSpan)&&(t=!0)}),t}calculateColumnsForGroupDisplay(){this.groupDisplayColumns=[],this.groupDisplayColumnsMap={},this.gridColumns.forEach(e=>{const t=e.getColDef(),i=t.showRowGroup;t&&y(i)&&(this.groupDisplayColumns.push(e),"string"==typeof i?this.groupDisplayColumnsMap[i]=e:!0===i&&this.getRowGroupColumns().forEach(t=>{this.groupDisplayColumnsMap[t.getId()]=e}))})}getGroupDisplayColumns(){return this.groupDisplayColumns}getGroupDisplayColumnForGroup(e){return this.groupDisplayColumnsMap[e]}updateDisplayedColumns(e){const t=this.calculateColumnsForDisplay();this.buildDisplayedTrees(t),this.updateGroupsAndDisplayedColumns(e),this.setFirstRightAndLastLeftPinned(e)}isSecondaryColumnsPresent(){return y(this.secondaryColumns)}setSecondaryColumns(e,t){if(!this.gridColumns)return;const i=e;if(i||!C(this.secondaryColumns)){if(i){this.processSecondaryColumnDefinitions(e);const i=this.columnFactory.createColumnTree(e,!1,this.secondaryBalancedTree||this.previousSecondaryColumns||void 0,t);this.destroyOldColumns(this.secondaryBalancedTree,i.columnTree),this.secondaryBalancedTree=i.columnTree,this.secondaryHeaderRowCount=i.treeDept+1,this.secondaryColumns=this.getColumnsFromTree(this.secondaryBalancedTree),this.secondaryColumnsMap={},this.secondaryColumns.forEach(e=>this.secondaryColumnsMap[e.getId()]=e),this.previousSecondaryColumns=null}else this.previousSecondaryColumns=this.secondaryBalancedTree,this.secondaryBalancedTree=null,this.secondaryHeaderRowCount=-1,this.secondaryColumns=null,this.secondaryColumnsMap={};this.updateGridColumns(),this.updateDisplayedColumns(t)}}processSecondaryColumnDefinitions(e){const t=this.gos.get("processPivotResultColDef"),i=this.gos.get("processPivotResultColGroupDef");if(!t&&!i)return;const n=e=>{e.forEach(e=>{if(y(e.children)){const t=e;i&&i(t),n(t.children)}else t&&t(e)})};e&&n(e)}updateGridColumns(){const e=this.gridBalancedTree;if(this.gridColsArePrimary?this.lastPrimaryOrder=this.gridColumns:this.lastSecondaryOrder=this.gridColumns,this.createGroupAutoColumnsIfNeeded()){const e=wt(this.groupAutoColumns.map(e=>[e,!0]));this.lastPrimaryOrder&&(this.lastPrimaryOrder=this.lastPrimaryOrder.filter(t=>!e.has(t)),this.lastPrimaryOrder=[...this.groupAutoColumns,...this.lastPrimaryOrder]),this.lastSecondaryOrder&&(this.lastSecondaryOrder=this.lastSecondaryOrder.filter(t=>!e.has(t)),this.lastSecondaryOrder=[...this.groupAutoColumns,...this.lastSecondaryOrder])}let t;if(this.secondaryColumns&&this.secondaryBalancedTree){const e=this.secondaryColumns.some(e=>void 0!==this.gridColumnsMap[e.getColId()]);this.gridBalancedTree=this.secondaryBalancedTree.slice(),this.gridHeaderRowCount=this.secondaryHeaderRowCount,this.gridColumns=this.secondaryColumns.slice(),this.gridColsArePrimary=!1,e&&(t=this.lastSecondaryOrder)}else this.primaryColumns&&(this.gridBalancedTree=this.primaryColumnTree.slice(),this.gridHeaderRowCount=this.primaryHeaderRowCount,this.gridColumns=this.primaryColumns.slice(),this.gridColsArePrimary=!0,t=this.lastPrimaryOrder);if(this.addAutoGroupToGridColumns(),this.orderGridColsLike(t),this.gridColumns=this.placeLockedColumns(this.gridColumns),this.calculateColumnsForGroupDisplay(),this.refreshQuickFilterColumns(),this.clearDisplayedAndViewportColumns(),this.colSpanActive=this.checkColSpanActiveInCols(this.gridColumns),this.gridColumnsMap={},this.gridColumns.forEach(e=>this.gridColumnsMap[e.getId()]=e),this.setAutoHeightActive(),!Ie(e,this.gridBalancedTree)){const e={type:lt.EVENT_GRID_COLUMNS_CHANGED};this.eventService.dispatchEvent(e)}}setAutoHeightActive(){this.autoHeightActive=this.gridColumns.filter(e=>e.isAutoHeight()).length>0,this.autoHeightActive&&(this.autoHeightActiveAtLeastOnce=!0,this.gos.isRowModelType("clientSide")||this.gos.isRowModelType("serverSide")||z("autoHeight columns only work with Client Side Row Model and Server Side Row Model."))}orderGridColsLike(e){if(C(e))return;const t=wt(e.map((e,t)=>[e,t]));let i=!0;if(this.gridColumns.forEach(e=>{t.has(e)&&(i=!1)}),i)return;const n=wt(this.gridColumns.map(e=>[e,!0])),s=e.filter(e=>n.has(e)),r=wt(s.map(e=>[e,!0])),o=this.gridColumns.filter(e=>!r.has(e)),a=s.slice();o.forEach(e=>{let t=e.getOriginalParent();if(!t)return void a.push(e);const i=[];for(;!i.length&&t;)t.getLeafColumns().forEach(e=>{const t=a.indexOf(e)>=0,n=i.indexOf(e)<0;t&&n&&i.push(e)}),t=t.getOriginalParent();if(!i.length)return void a.push(e);const n=i.map(e=>a.indexOf(e)),s=Math.max(...n);Fe(a,e,s+1)}),this.gridColumns=a}isPrimaryColumnGroupsPresent(){return this.primaryHeaderRowCount>1}refreshQuickFilterColumns(){var e;let t=null!=(e=this.isPivotMode()&&!this.gos.get("applyQuickFilterBeforePivotOrAgg")?this.secondaryColumns:this.primaryColumns)?e:[];this.groupAutoColumns&&(t=t.concat(this.groupAutoColumns)),this.columnsForQuickFilter=this.gos.get("includeHiddenColumnsInQuickFilter")?t:t.filter(e=>e.isVisible()||e.isRowGroupActive())}placeLockedColumns(e){const t=[],i=[],n=[];return e.forEach(e=>{const s=e.getColDef().lockPosition;"right"===s?n.push(e):"left"===s||!0===s?t.push(e):i.push(e)}),[...t,...i,...n]}addAutoGroupToGridColumns(){if(C(this.groupAutoColumns))return this.destroyOldColumns(this.groupAutoColsBalancedTree),void(this.groupAutoColsBalancedTree=null);this.gridColumns=this.groupAutoColumns?this.groupAutoColumns.concat(this.gridColumns):this.gridColumns;const e=this.columnFactory.createForAutoGroups(this.groupAutoColumns,this.gridBalancedTree);this.destroyOldColumns(this.groupAutoColsBalancedTree,e),this.groupAutoColsBalancedTree=e,this.gridBalancedTree=e.concat(this.gridBalancedTree)}clearDisplayedAndViewportColumns(){this.viewportRowLeft={},this.viewportRowRight={},this.viewportRowCenter={},this.displayedColumnsLeft=[],this.displayedColumnsRight=[],this.displayedColumnsCenter=[],this.displayedColumns=[],this.ariaOrderColumns=[],this.viewportColumns=[],this.headerViewportColumns=[],this.viewportColumnsHash=""}updateGroupsAndDisplayedColumns(e){this.updateOpenClosedVisibilityInColumnGroups(),this.deriveDisplayedColumns(e),this.refreshFlexedColumns(),this.extractViewport(),this.updateBodyWidths();const t={type:lt.EVENT_DISPLAYED_COLUMNS_CHANGED};this.eventService.dispatchEvent(t)}deriveDisplayedColumns(e){this.derivedDisplayedColumnsFromDisplayedTree(this.displayedTreeLeft,this.displayedColumnsLeft),this.derivedDisplayedColumnsFromDisplayedTree(this.displayedTreeCentre,this.displayedColumnsCenter),this.derivedDisplayedColumnsFromDisplayedTree(this.displayedTreeRight,this.displayedColumnsRight),this.joinColumnsAriaOrder(),this.joinDisplayedColumns(),this.setLeftValues(e),this.displayedAutoHeightCols=this.displayedColumns.filter(e=>e.isAutoHeight())}isAutoRowHeightActive(){return this.autoHeightActive}wasAutoRowHeightEverActive(){return this.autoHeightActiveAtLeastOnce}joinColumnsAriaOrder(){const e=this.getAllGridColumns(),t=[],i=[],n=[];for(const s of e){const e=s.getPinned();e?!0===e||"left"===e?t.push(s):n.push(s):i.push(s)}this.ariaOrderColumns=t.concat(i).concat(n)}joinDisplayedColumns(){this.gos.get("enableRtl")?this.displayedColumns=this.displayedColumnsRight.concat(this.displayedColumnsCenter).concat(this.displayedColumnsLeft):this.displayedColumns=this.displayedColumnsLeft.concat(this.displayedColumnsCenter).concat(this.displayedColumnsRight)}setLeftValues(e){this.setLeftValuesOfColumns(e),this.setLeftValuesOfGroups()}setLeftValuesOfColumns(e){if(!this.primaryColumns)return;const t=this.getPrimaryAndSecondaryAndAutoColumns().slice(0),i=this.gos.get("enableRtl");[this.displayedColumnsLeft,this.displayedColumnsRight,this.displayedColumnsCenter].forEach(n=>{if(i){let t=this.getWidthOfColsInList(n);n.forEach(i=>{t-=i.getActualWidth(),i.setLeft(t,e)})}else{let t=0;n.forEach(i=>{i.setLeft(t,e),t+=i.getActualWidth()})}Oe(t,n)}),t.forEach(t=>{t.setLeft(null,e)})}setLeftValuesOfGroups(){[this.displayedTreeLeft,this.displayedTreeRight,this.displayedTreeCentre].forEach(e=>{e.forEach(e=>{e instanceof at&&e.checkLeft()})})}derivedDisplayedColumnsFromDisplayedTree(e,t){t.length=0,Tt(e,!0,e=>{e instanceof Se&&t.push(e)})}isColumnVirtualisationSuppressed(){return this.suppressColumnVirtualisation||0===this.viewportRight}extractViewportColumns(){this.isColumnVirtualisationSuppressed()?(this.viewportColumnsCenter=this.displayedColumnsCenter,this.headerViewportColumnsCenter=this.displayedColumnsCenter):(this.viewportColumnsCenter=this.displayedColumnsCenter.filter(this.isColumnInRowViewport.bind(this)),this.headerViewportColumnsCenter=this.displayedColumnsCenter.filter(this.isColumnInHeaderViewport.bind(this))),this.viewportColumns=this.viewportColumnsCenter.concat(this.displayedColumnsLeft).concat(this.displayedColumnsRight),this.headerViewportColumns=this.headerViewportColumnsCenter.concat(this.displayedColumnsLeft).concat(this.displayedColumnsRight)}getVirtualHeaderGroupRow(e,t){let i;switch(e){case"left":i=this.viewportRowLeft[t];break;case"right":i=this.viewportRowRight[t];break;default:i=this.viewportRowCenter[t]}return C(i)&&(i=[]),i}calculateHeaderRows(){this.viewportRowLeft={},this.viewportRowRight={},this.viewportRowCenter={};const e={};this.headerViewportColumns.forEach(t=>e[t.getId()]=!0);const t=(i,n,s)=>{let r=!1;for(let o=0;o<i.length;o++){const a=i[o];let l=!1;if(a instanceof Se)l=!0===e[a.getId()];else{const e=a.getDisplayedChildren();e&&(l=t(e,n,s+1))}l&&(r=!0,n[s]||(n[s]=[]),n[s].push(a))}return r};t(this.displayedTreeLeft,this.viewportRowLeft,0),t(this.displayedTreeRight,this.viewportRowRight,0),t(this.displayedTreeCentre,this.viewportRowCenter,0)}extractViewport(){this.extractViewportColumns();const e=this.viewportColumns.map(e=>`${e.getId()}-${e.getPinned()||"normal"}`).join("#"),t=this.viewportColumnsHash!==e;return t&&(this.viewportColumnsHash=e,this.calculateHeaderRows()),t}refreshFlexedColumns(e={}){var t;const i=e.source?e.source:"flex";if(null!=e.viewportWidth&&(this.flexViewportWidth=e.viewportWidth),!this.flexViewportWidth)return[];let n=-1;if(e.resizingCols){const t=new Set(e.resizingCols);let i=this.displayedColumnsCenter;for(let e=i.length-1;e>=0;e--)if(t.has(i[e])){n=e;break}}let s=0,r=[],o=0,a=0;for(let e=0;e<this.displayedColumnsCenter.length;e++)this.displayedColumnsCenter[e].getFlex()&&e>n?(r.push(this.displayedColumnsCenter[e]),a+=this.displayedColumnsCenter[e].getFlex(),o+=null!=(t=this.displayedColumnsCenter[e].getMinWidth())?t:0):s+=this.displayedColumnsCenter[e].getActualWidth();if(!r.length)return[];let l=[];s+o>this.flexViewportWidth&&(r.forEach(e=>{var t;return e.setActualWidth(null!=(t=e.getMinWidth())?t:0,i)}),l=r,r=[]);const c=[];let h;e:for(;;){h=this.flexViewportWidth-s;const e=h/a;for(let t=0;t<r.length;t++){const n=r[t],o=e*n.getFlex();let h=0;const d=n.getMinWidth(),u=n.getMaxWidth();if(y(d)&&o<d?h=d:y(u)&&o>u&&(h=u),h){n.setActualWidth(h,i),Pe(r,n),a-=n.getFlex(),l.push(n),s+=n.getActualWidth();continue e}c[t]=Math.round(o)}break}let d=h;return r.forEach((e,t)=>{e.setActualWidth(Math.min(c[t],d),i),l.push(e),d-=c[t]}),e.skipSetLeft||this.setLeftValues(i),e.updateBodyWidths&&this.updateBodyWidths(),e.fireResizedEvent&&this.dispatchColumnResizedEvent(l,!0,i,r),r}sizeColumnsToFit(e,t="sizeColumnsToFit",i,n){var s,r,o,h,d;if(this.shouldQueueResizeOperations)return void this.resizeOperationQueue.push(()=>this.sizeColumnsToFit(e,t,i,n));const u={};n&&(null==(s=null==n?void 0:n.columnLimits)||s.forEach(e=>{var t=e,{key:i}=t,n=((e,t)=>{var i={};for(var n in e)l.call(e,n)&&t.indexOf(n)<0&&(i[n]=e[n]);if(null!=e&&a)for(var n of a(e))t.indexOf(n)<0&&c.call(e,n)&&(i[n]=e[n]);return i})(t,["key"]);u["string"==typeof i?i:i.getColId()]=n}));const p=this.getAllDisplayedColumns(),g=e===this.getWidthOfColsInList(p);if(e<=0||!p.length||g)return;const f=[],m=[];p.forEach(e=>{!0===e.getColDef().suppressSizeToFit?m.push(e):f.push(e)});const v=f.slice(0);let C=!1;const b=e=>{Ne(f,e),m.push(e)};for(f.forEach(e=>{var i,s;e.resetActualWidth(t);const r=null==u?void 0:u[e.getId()],o=null!=(i=null==r?void 0:r.minWidth)?i:null==n?void 0:n.defaultMinWidth,a=null!=(s=null==r?void 0:r.maxWidth)?s:null==n?void 0:n.defaultMaxWidth,l=e.getActualWidth();"number"==typeof o&&l<o?e.setActualWidth(o,t,!0):"number"==typeof a&&l>a&&e.setActualWidth(a,t,!0)});!C;){C=!0;const i=e-this.getWidthOfColsInList(m);if(i<=0)f.forEach(e=>{var i,s;const r=null!=(s=null==(i=null==u?void 0:u[e.getId()])?void 0:i.minWidth)?s:null==n?void 0:n.defaultMinWidth;"number"!=typeof r?e.setMinimum(t):e.setActualWidth(r,t,!0)});else{const e=i/this.getWidthOfColsInList(f);let s=i;for(let i=f.length-1;i>=0;i--){const a=f[i],l=null==u?void 0:u[a.getId()],c=null!=(r=null==l?void 0:l.minWidth)?r:null==n?void 0:n.defaultMinWidth,p=null!=(o=null==l?void 0:l.maxWidth)?o:null==n?void 0:n.defaultMaxWidth,g=null!=(h=a.getMinWidth())?h:0,m=null!=(d=a.getMaxWidth())?d:Number.MAX_VALUE,v="number"==typeof c&&c>g?c:a.getMinWidth(),S="number"==typeof p&&p<m?p:a.getMaxWidth();let w=Math.round(a.getActualWidth()*e);y(v)&&w<v?(w=v,b(a),C=!1):y(S)&&w>S?(w=S,b(a),C=!1):0===i&&(w=s),a.setActualWidth(w,t,!0),s-=w}}}v.forEach(e=>{e.fireColumnWidthChangedEvent(t)}),this.setLeftValues(t),this.updateBodyWidths(),i||this.dispatchColumnResizedEvent(v,!0,t)}buildDisplayedTrees(e){const t=[],i=[],n=[];e.forEach(e=>{switch(e.getPinned()){case"left":t.push(e);break;case"right":i.push(e);break;default:n.push(e)}});const s=new ht;this.displayedTreeLeft=this.displayedGroupCreator.createDisplayedGroups(t,s,"left",this.displayedTreeLeft),this.displayedTreeRight=this.displayedGroupCreator.createDisplayedGroups(i,s,"right",this.displayedTreeRight),this.displayedTreeCentre=this.displayedGroupCreator.createDisplayedGroups(n,s,null,this.displayedTreeCentre),this.updateDisplayedMap()}updateDisplayedMap(){this.displayedColumnsAndGroupsMap={};const e=e=>{this.displayedColumnsAndGroupsMap[e.getUniqueId()]=e};Tt(this.displayedTreeCentre,!1,e),Tt(this.displayedTreeLeft,!1,e),Tt(this.displayedTreeRight,!1,e)}isDisplayed(e){return this.displayedColumnsAndGroupsMap[e.getUniqueId()]===e}updateOpenClosedVisibilityInColumnGroups(){Tt(this.getAllDisplayedTrees(),!1,e=>{e instanceof at&&e.calculateDisplayedColumns()})}getGroupAutoColumns(){return this.groupAutoColumns}createGroupAutoColumnsIfNeeded(){const e=this.forceRecreateAutoGroups;if(this.forceRecreateAutoGroups=!1,!this.autoGroupsNeedBuilding)return!1;this.autoGroupsNeedBuilding=!1;const t=this.gos.isGroupUseEntireRow(this.pivotMode),i=this.pivotMode?this.gos.get("pivotSuppressAutoColumn"):this.isGroupSuppressAutoColumn();if(!(this.rowGroupColumns.length>0||this.gos.get("treeData"))||i||t)this.groupAutoColumns=null;else{const t=this.autoGroupColService.createAutoGroupColumns(this.rowGroupColumns);if(!this.autoColsEqual(t,this.groupAutoColumns)||e)return this.groupAutoColumns=t,!0}return!1}isGroupSuppressAutoColumn(){return"custom"===this.gos.get("groupDisplayType")||"custom"===this.gos.get("treeDataDisplayType")}autoColsEqual(e,t){return Ie(e,t,(e,t)=>e.getColId()===t.getColId())}getWidthOfColsInList(e){return e.reduce((e,t)=>e+t.getActualWidth(),0)}getFirstDisplayedColumn(){const e=this.gos.get("enableRtl"),t=["getDisplayedLeftColumns","getDisplayedCenterColumns","getDisplayedRightColumns"];e&&t.reverse();for(let i=0;i<t.length;i++){const n=this[t[i]]();if(n.length)return e?De(n):n[0]}return null}setColumnHeaderHeight(e,t){if(e.setAutoHeaderHeight(t)){const t={type:lt.EVENT_COLUMN_HEADER_HEIGHT_CHANGED,column:e,columns:[e],source:"autosizeColumnHeaderHeight"};this.eventService.dispatchEvent(t)}}getColumnGroupHeaderRowHeight(){return this.isPivotMode()?this.getPivotGroupHeaderHeight():this.getGroupHeaderHeight()}getColumnHeaderRowHeight(){const e=this.isPivotMode()?this.getPivotHeaderHeight():this.getHeaderHeight(),t=this.getAllDisplayedColumns().filter(e=>e.isAutoHeaderHeight()).map(e=>e.getAutoHeaderHeight()||0);return Math.max(e,...t)}getHeaderHeight(){var e;return null!=(e=this.gos.get("headerHeight"))?e:this.environment.getFromTheme(25,"headerHeight")}getFloatingFiltersHeight(){var e;return null!=(e=this.gos.get("floatingFiltersHeight"))?e:this.getHeaderHeight()}getGroupHeaderHeight(){var e;return null!=(e=this.gos.get("groupHeaderHeight"))?e:this.getHeaderHeight()}getPivotHeaderHeight(){var e;return null!=(e=this.gos.get("pivotHeaderHeight"))?e:this.getHeaderHeight()}getPivotGroupHeaderHeight(){var e;return null!=(e=this.gos.get("pivotGroupHeaderHeight"))?e:this.getGroupHeaderHeight()}queueResizeOperations(){this.shouldQueueResizeOperations=!0}processResizeOperations(){this.shouldQueueResizeOperations=!1,this.resizeOperationQueue.forEach(e=>e()),this.resizeOperationQueue=[]}resetColumnDefIntoColumn(e,t){const i=e.getUserProvidedColDef();if(!i)return!1;const n=this.columnFactory.addColumnDefaultAndTypes(i,e.getColId());return e.setColDef(n,i,t),!0}isColumnGroupingLocked(e){const t=this.gos.get("groupLockGroupColumns");return!(!e.isRowGroupActive()||0===t)&&(-1===t||t>this.rowGroupColumns.findIndex(t=>t.getColId()===e.getColId()))}generateColumnStateForRowGroupAndPivotIndexes(e,t){let i={};const n=(e,t,n,s,r,o)=>{if(!t.length||!this.primaryColumns)return[];const a=Object.keys(e),l=new Set(a),c=new Set(a),h=new Set(t.map(e=>{const t=e.getColId();return c.delete(t),t}).concat(a)),d=[],u={};let p=0;for(let e=0;e<this.primaryColumns.length;e++){const t=this.primaryColumns[e].getColId();h.has(t)&&(d.push(t),u[t]=p++)}let g=1e3,f=!1,m=0;const v=t=>{const i=u[t];for(let t=m;t<i;t++){const i=d[t];c.has(i)&&(e[i][r]=g++,c.delete(i))}m=i};t.forEach(t=>{const a=t.getColId();if(l.has(a))v(a),e[a][r]=g++;else{const l=t.getColDef();(null===l[r]||void 0===l[r]&&null==l[o])&&(f||(l[n]||void 0===l[n]&&l[s]?v(a):(c.forEach(t=>{e[t][r]=g+u[t]}),g+=d.length,f=!0)),i[a]||(i[a]={colId:a}),i[a][r]=g++)}})};return n(e,this.rowGroupColumns,"rowGroup","initialRowGroup","rowGroupIndex","initialRowGroupIndex"),n(t,this.pivotColumns,"pivot","initialPivot","pivotIndex","initialPivotIndex"),Object.values(i)}onColumnsReady(){const e=this.gos.get("autoSizeStrategy");if(!e)return;const{type:t}=e;setTimeout(()=>{if("fitGridWidth"===t){const{columnLimits:t,defaultMinWidth:i,defaultMaxWidth:n}=e,s=null==t?void 0:t.map(({colId:e,minWidth:t,maxWidth:i})=>({key:e,minWidth:t,maxWidth:i}));this.ctrlsService.getGridBodyCtrl().sizeColumnsToFit({defaultMinWidth:i,defaultMaxWidth:n,columnLimits:s})}else"fitProvidedWidth"===t&&this.sizeColumnsToFit(e.width,"sizeColumnsToFit")})}onFirstDataRendered(){const e=this.gos.get("autoSizeStrategy");if("fitCellContents"!==(null==e?void 0:e.type))return;const{colIds:t,skipHeader:i}=e;setTimeout(()=>{t?this.autoSizeColumns({columns:t,skipHeader:i,source:"autosizeColumns"}):this.autoSizeAllColumns("autosizeColumns",i)})}};function At(e){return"gridOptionsUpdated"===e?"gridOptionsChanged":e}function Tt(e,t,i){if(e)for(let n=0;n<e.length;n++){const s=e[n];s instanceof at&&Tt(t?s.getDisplayedChildren():s.getChildren(),t,i),i(s)}}g([he("expressionService")],Mt.prototype,"expressionService",2),g([he("columnFactory")],Mt.prototype,"columnFactory",2),g([he("displayedGroupCreator")],Mt.prototype,"displayedGroupCreator",2),g([he("ctrlsService")],Mt.prototype,"ctrlsService",2),g([he("autoWidthCalculator")],Mt.prototype,"autoWidthCalculator",2),g([he("columnAnimationService")],Mt.prototype,"columnAnimationService",2),g([he("autoGroupColService")],Mt.prototype,"autoGroupColService",2),g([he("valueCache")],Mt.prototype,"valueCache",2),g([he("animationFrameService")],Mt.prototype,"animationFrameService",2),g([he("sortController")],Mt.prototype,"sortController",2),g([he("columnDefFactory")],Mt.prototype,"columnDefFactory",2),g([de("aggFuncService")],Mt.prototype,"aggFuncService",2),g([ae],Mt.prototype,"init",1),g([le],Mt.prototype,"destroyColumns",1),g([f(0,pe("loggerFactory"))],Mt.prototype,"setBeans",1),Mt=g([ce("columnModel")],Mt);var Dt=class extends nt{createDisplayedGroups(e,t,i,n){const s=this.mapOldGroupsById(n),r=[];let o=e;for(;o.length;){const e=o;o=[];let n=0;const a=a=>{const l=n;n=a;const c=e[l],h=(c instanceof at?c.getProvidedColumnGroup():c).getOriginalParent();if(null==h){for(let t=l;t<a;t++)r.push(e[t]);return}const d=this.createColumnGroup(h,t,s,i);for(let t=l;t<a;t++)d.addChild(e[t]);o.push(d)};for(let t=1;t<e.length;t++){const i=e[t],s=(i instanceof at?i.getProvidedColumnGroup():i).getOriginalParent(),r=e[n];s!==(r instanceof at?r.getProvidedColumnGroup():r).getOriginalParent()&&a(t)}n<e.length&&a(e.length)}return this.setupParentsIntoColumns(r,null),r}createColumnGroup(e,t,i,n){const s=e.getGroupId(),r=t.getInstanceIdForKey(s);let o=i[at.createUniqueId(s,r)];return o&&o.getProvidedColumnGroup()!==e&&(o=null),y(o)?o.reset():(o=new at(e,s,r,n),this.context.createBean(o)),o}mapOldGroupsById(e){const t={},i=e=>{e.forEach(e=>{if(e instanceof at){const n=e;t[e.getUniqueId()]=n,i(n.getChildren())}})};return e&&i(e),t}setupParentsIntoColumns(e,t){e.forEach(e=>{if(e.setParent(t),e instanceof at){const t=e;this.setupParentsIntoColumns(t.getChildren(),t)}})}};Dt=g([ce("displayedGroupCreator")],Dt);var It={enableBrowserTooltips:!0,tooltipTrigger:!0,tooltipMouseTrack:!0,tooltipShowMode:!0,tooltipInteraction:!0,defaultColGroupDef:!0,suppressAutoSize:!0,skipHeaderOnAutoSize:!0,autoSizeStrategy:!0,components:!0,stopEditingWhenCellsLoseFocus:!0,undoRedoCellEditing:!0,undoRedoCellEditingLimit:!0,excelStyles:!0,cacheQuickFilter:!0,excludeHiddenColumnsFromQuickFilter:!0,advancedFilterModel:!0,customChartThemes:!0,chartThemeOverrides:!0,enableChartToolPanelsButton:!0,suppressChartToolPanelsButton:!0,chartToolPanelsDef:!0,loadingCellRendererSelector:!0,localeText:!0,keepDetailRows:!0,keepDetailRowsCount:!0,detailRowHeight:!0,detailRowAutoHeight:!0,tabIndex:!0,valueCache:!0,valueCacheNeverExpires:!0,enableCellExpressions:!0,suppressParentsInRowNodes:!0,suppressTouch:!0,suppressAsyncEvents:!0,suppressBrowserResizeObserver:!0,suppressPropertyNamesCheck:!0,debug:!0,loadingOverlayComponent:!0,suppressLoadingOverlay:!0,noRowsOverlayComponent:!0,paginationPageSizeSelector:!0,paginateChildRows:!0,pivotPanelShow:!0,pivotSuppressAutoColumn:!0,suppressExpandablePivotGroups:!0,aggFuncs:!0,suppressAggFuncInHeader:!0,suppressAggAtRootLevel:!0,removePivotHeaderRowWhenSingleValueColumn:!0,allowShowChangeAfterFilter:!0,ensureDomOrder:!0,enableRtl:!0,suppressColumnVirtualisation:!0,suppressMaxRenderedRowRestriction:!0,suppressRowVirtualisation:!0,rowDragText:!0,suppressGroupMaintainValueType:!0,groupLockGroupColumns:!0,rowGroupPanelSuppressSort:!0,suppressGroupRowsSticky:!0,rowModelType:!0,cacheOverflowSize:!0,infiniteInitialRowCount:!0,serverSideInitialRowCount:!0,suppressServerSideInfiniteScroll:!0,maxBlocksInCache:!0,maxConcurrentDatasourceRequests:!0,blockLoadDebounceMillis:!0,serverSideOnlyRefreshFilteredGroups:!0,serverSidePivotResultFieldSeparator:!0,viewportRowModelPageSize:!0,viewportRowModelBufferSize:!0,debounceVerticalScrollbar:!0,suppressAnimationFrame:!0,suppressPreventDefaultOnMouseWheel:!0,scrollbarWidth:!0,icons:!0,suppressRowTransform:!0,gridId:!0,functionsPassive:!0,enableGroupEdit:!0,initialState:!0,processUnpinnedColumns:!0,createChartContainer:!0,getLocaleText:!0,getRowId:!0,reactiveCustomComponents:!0,columnMenu:!0},Rt=class{};Rt.STRING_PROPERTIES=["rowSelection","overlayLoadingTemplate","overlayNoRowsTemplate","gridId","quickFilterText","rowModelType","editType","domLayout","clipboardDelimiter","rowGroupPanelShow","multiSortKey","pivotColumnGroupTotals","pivotRowTotals","pivotPanelShow","fillHandleDirection","groupDisplayType","treeDataDisplayType","colResizeDefault","tooltipTrigger","serverSidePivotResultFieldSeparator","columnMenu","tooltipShowMode","grandTotalRow"],Rt.OBJECT_PROPERTIES=["components","rowStyle","context","autoGroupColumnDef","localeText","icons","datasource","serverSideDatasource","viewportDatasource","groupRowRendererParams","aggFuncs","fullWidthCellRendererParams","defaultColGroupDef","defaultColDef","defaultCsvExportParams","defaultExcelExportParams","columnTypes","rowClassRules","detailCellRendererParams","loadingCellRendererParams","loadingOverlayComponentParams","noRowsOverlayComponentParams","popupParent","statusBar","sideBar","chartThemeOverrides","customChartThemes","chartToolPanelsDef","dataTypeDefinitions","advancedFilterModel","advancedFilterParent","advancedFilterBuilderParams","initialState","autoSizeStrategy"],Rt.ARRAY_PROPERTIES=["sortingOrder","alignedGrids","rowData","columnDefs","excelStyles","pinnedTopRowData","pinnedBottomRowData","chartThemes","rowClass","paginationPageSizeSelector"],Rt.NUMBER_PROPERTIES=["rowHeight","detailRowHeight","rowBuffer","headerHeight","groupHeaderHeight","groupLockGroupColumns","floatingFiltersHeight","pivotHeaderHeight","pivotGroupHeaderHeight","groupDefaultExpanded","pivotDefaultExpanded","viewportRowModelPageSize","viewportRowModelBufferSize","autoSizePadding","maxBlocksInCache","maxConcurrentDatasourceRequests","tooltipShowDelay","tooltipHideDelay","cacheOverflowSize","paginationPageSize","cacheBlockSize","infiniteInitialRowCount","serverSideInitialRowCount","scrollbarWidth","asyncTransactionWaitMillis","blockLoadDebounceMillis","keepDetailRowsCount","undoRedoCellEditingLimit","cellFlashDelay","cellFadeDelay","cellFlashDuration","cellFadeDuration","tabIndex","pivotMaxGeneratedColumns"],Rt.BOOLEAN_PROPERTIES=["suppressMakeColumnVisibleAfterUnGroup","suppressRowClickSelection","suppressCellFocus","suppressHeaderFocus","suppressHorizontalScroll","groupSelectsChildren","alwaysShowHorizontalScroll","alwaysShowVerticalScroll","debug","enableBrowserTooltips","enableCellExpressions","groupIncludeTotalFooter","groupSuppressBlankHeader","suppressMenuHide","suppressRowDeselection","unSortIcon","suppressMultiSort","alwaysMultiSort","singleClickEdit","suppressLoadingOverlay","suppressNoRowsOverlay","suppressAutoSize","skipHeaderOnAutoSize","suppressParentsInRowNodes","suppressColumnMoveAnimation","suppressMovableColumns","suppressFieldDotNotation","enableRangeSelection","enableRangeHandle","enableFillHandle","suppressClearOnFillReduction","deltaSort","suppressTouch","suppressAsyncEvents","allowContextMenuWithControlKey","suppressContextMenu","enableCellChangeFlash","suppressDragLeaveHidesColumns","suppressRowGroupHidesColumns","suppressMiddleClickScrolls","suppressPreventDefaultOnMouseWheel","suppressCopyRowsToClipboard","copyHeadersToClipboard","copyGroupHeadersToClipboard","pivotMode","suppressAggFuncInHeader","suppressColumnVirtualisation","alwaysAggregateAtRootLevel","suppressAggAtRootLevel","suppressFocusAfterRefresh","functionsPassive","functionsReadOnly","animateRows","groupSelectsFiltered","groupRemoveSingleChildren","groupRemoveLowestSingleChildren","enableRtl","suppressClickEdit","rowDragEntireRow","rowDragManaged","suppressRowDrag","suppressMoveWhenRowDragging","rowDragMultiRow","enableGroupEdit","embedFullWidthRows","suppressPaginationPanel","groupHideOpenParents","groupAllowUnbalanced","pagination","paginationAutoPageSize","suppressScrollOnNewData","suppressScrollWhenPopupsAreOpen","purgeClosedRowNodes","cacheQuickFilter","includeHiddenColumnsInQuickFilter","excludeHiddenColumnsFromQuickFilter","ensureDomOrder","accentedSort","suppressChangeDetection","valueCache","valueCacheNeverExpires","aggregateOnlyChangedColumns","suppressAnimationFrame","suppressExcelExport","suppressCsvExport","includeHiddenColumnsInAdvancedFilter","suppressMultiRangeSelection","enterMovesDown","enterMovesDownAfterEdit","enterNavigatesVerticallyAfterEdit","enterNavigatesVertically","suppressPropertyNamesCheck","rowMultiSelectWithClick","suppressRowHoverHighlight","suppressRowTransform","suppressClipboardPaste","suppressLastEmptyLineOnPaste","enableCharts","enableChartToolPanelsButton","suppressChartToolPanelsButton","suppressMaintainUnsortedOrder","enableCellTextSelection","suppressBrowserResizeObserver","suppressMaxRenderedRowRestriction","excludeChildrenWhenTreeDataFiltering","tooltipMouseTrack","tooltipInteraction","keepDetailRows","paginateChildRows","preventDefaultOnContextMenu","undoRedoCellEditing","allowDragFromColumnsToolPanel","pivotSuppressAutoColumn","suppressExpandablePivotGroups","debounceVerticalScrollbar","detailRowAutoHeight","serverSideFilterAllLevels","serverSideSortAllLevels","serverSideEnableClientSideSort","serverSideOnlyRefreshFilteredGroups","serverSideSortOnServer","serverSideFilterOnServer","suppressAggFilteredOnly","showOpenedGroup","suppressClipboardApi","suppressModelUpdateAfterUpdateTransaction","stopEditingWhenCellsLoseFocus","maintainColumnOrder","groupMaintainOrder","columnHoverHighlight","readOnlyEdit","suppressRowVirtualisation","enableCellEditingOnBackspace","resetRowDataOnUpdate","removePivotHeaderRowWhenSingleValueColumn","suppressCopySingleCellRanges","suppressGroupRowsSticky","suppressCutToClipboard","suppressServerSideInfiniteScroll","rowGroupPanelSuppressSort","allowShowChangeAfterFilter","enableAdvancedFilter","masterDetail","treeData","suppressGroupMaintainValueType","reactiveCustomComponents","applyQuickFilterBeforePivotOrAgg","suppressServerSideFullWidthLoadingRow","suppressAdvancedFilterEval"],Rt.OTHER_PROPERTIES=["suppressStickyTotalRow"],Rt.FUNCTIONAL_PROPERTIES=["doesExternalFilterPass","processPivotResultColDef","processPivotResultColGroupDef","getBusinessKeyForNode","isRowSelectable","rowDragText","groupRowRenderer","fullWidthCellRenderer","loadingCellRenderer","loadingOverlayComponent","noRowsOverlayComponent","detailCellRenderer","quickFilterParser","quickFilterMatcher"],Rt.CALLBACK_PROPERTIES=["getLocaleText","isExternalFilterPresent","getRowHeight","getRowClass","getRowStyle","getContextMenuItems","getMainMenuItems","processRowPostCreate","processCellForClipboard","getGroupRowAgg","isFullWidthRow","sendToClipboard","navigateToNextHeader","tabToNextHeader","navigateToNextCell","tabToNextCell","processCellFromClipboard","getDocument","postProcessPopup","getChildCount","getDataPath","isRowMaster","postSortRows","processHeaderForClipboard","processUnpinnedColumns","processGroupHeaderForClipboard","paginationNumberFormatter","processDataFromClipboard","getServerSideGroupKey","isServerSideGroup","createChartContainer","getChartToolbarItems","fillOperation","isApplyServerSideTransaction","getServerSideGroupLevelParams","isServerSideGroupOpenByDefault","isGroupOpenByDefault","initialGroupOrderComparator","groupIncludeFooter","loadingCellRendererSelector","getRowId","groupAggFiltering","chartMenuItems","groupTotalRow"],Rt.FUNCTION_PROPERTIES=[...Rt.FUNCTIONAL_PROPERTIES,...Rt.CALLBACK_PROPERTIES],Rt.ALL_PROPERTIES=[...Rt.ARRAY_PROPERTIES,...Rt.OBJECT_PROPERTIES,...Rt.STRING_PROPERTIES,...Rt.NUMBER_PROPERTIES,...Rt.FUNCTION_PROPERTIES,...Rt.BOOLEAN_PROPERTIES,...Rt.OTHER_PROPERTIES];var Lt=Rt,kt=class e{static getCallbackForEvent(e){return!e||e.length<2?e:"on"+e[0].toUpperCase()+e.substring(1)}static getGridOptionKeys(){return this.ALL_PROPERTIES_AND_CALLBACKS}static combineAttributesAndGridOptions(t,i){"object"!=typeof t&&(t={});const n=d({},t);return e.getGridOptionKeys().forEach(t=>{const s=i[t];void 0!==s&&s!==e.VUE_OMITTED_PROPERTY&&(n[t]=s)}),n}static processOnChange(t,i,n){if(!t)return;const s={};let r=!1;if(Object.keys(t).filter(t=>e.ALL_PROPERTIES_AND_CALLBACKS_SET.has(t)).forEach(e=>{s[e]=t[e],r=!0}),!r)return;i.__internalUpdateGridOptions(s,!0);const o={type:lt.EVENT_COMPONENT_STATE_CHANGED};L(s,(e,t)=>{o[e]=t}),i.dispatchEvent(o)}};kt.EVENTS=T(lt),kt.VUE_OMITTED_PROPERTY="AG-VUE-OMITTED-PROPERTY",kt.EXCLUDED_INTERNAL_EVENTS=[lt.EVENT_SCROLLBAR_WIDTH_CHANGED,lt.EVENT_CHECKBOX_CHANGED,lt.EVENT_HEIGHT_SCALE_CHANGED,lt.EVENT_BODY_HEIGHT_CHANGED,lt.EVENT_COLUMN_CONTAINER_WIDTH_CHANGED,lt.EVENT_DISPLAYED_COLUMNS_WIDTH_CHANGED,lt.EVENT_SCROLL_VISIBILITY_CHANGED,lt.EVENT_COLUMN_HOVER_CHANGED,lt.EVENT_FLASH_CELLS,lt.EVENT_PAGINATION_PIXEL_OFFSET_CHANGED,lt.EVENT_DISPLAYED_ROWS_CHANGED,lt.EVENT_LEFT_PINNED_WIDTH_CHANGED,lt.EVENT_RIGHT_PINNED_WIDTH_CHANGED,lt.EVENT_ROW_CONTAINER_HEIGHT_CHANGED,lt.EVENT_STORE_UPDATED,lt.EVENT_COLUMN_PANEL_ITEM_DRAG_START,lt.EVENT_COLUMN_PANEL_ITEM_DRAG_END,lt.EVENT_KEY_SHORTCUT_CHANGED_CELL_START,lt.EVENT_KEY_SHORTCUT_CHANGED_CELL_END,lt.EVENT_FULL_WIDTH_ROW_FOCUSED,lt.EVENT_HEADER_HEIGHT_CHANGED,lt.EVENT_COLUMN_HEADER_HEIGHT_CHANGED,lt.EVENT_CELL_FOCUS_CLEARED,lt.EVENT_GRID_STYLES_CHANGED,lt.EVENT_FILTER_DESTROYED,lt.EVENT_ROW_DATA_UPDATE_STARTED,lt.EVENT_ADVANCED_FILTER_ENABLED_CHANGED,lt.EVENT_DATA_TYPES_INFERRED,lt.EVENT_FIELD_VALUE_CHANGED,lt.EVENT_FIELD_PICKER_VALUE_SELECTED,lt.EVENT_SUPPRESS_COLUMN_MOVE_CHANGED,lt.EVENT_SUPPRESS_MENU_HIDE_CHANGED,lt.EVENT_SUPPRESS_FIELD_DOT_NOTATION,lt.EVENT_ROW_COUNT_READY,lt.EVENT_SIDE_BAR_UPDATED],kt.PUBLIC_EVENTS=kt.EVENTS.filter(e=>!Be(kt.EXCLUDED_INTERNAL_EVENTS,e)),kt.EVENT_CALLBACKS=kt.EVENTS.map(e=>kt.getCallbackForEvent(e)),kt.BOOLEAN_PROPERTIES=Lt.BOOLEAN_PROPERTIES,kt.ALL_PROPERTIES=Lt.ALL_PROPERTIES,kt.ALL_PROPERTIES_AND_CALLBACKS=[...kt.ALL_PROPERTIES,...kt.EVENT_CALLBACKS],kt.ALL_PROPERTIES_AND_CALLBACKS_SET=new Set(kt.ALL_PROPERTIES_AND_CALLBACKS);var Pt=kt,Nt=class extends nt{constructor(){super(...arguments),this.componentsMappedByName={}}setupComponents(e){e&&e.forEach(e=>this.addComponent(e))}addComponent(e){const t=e.componentName.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase().toUpperCase();this.componentsMappedByName[t]=e.componentClass}getComponentClass(e){return this.componentsMappedByName[e]}};Nt=g([ce("agStackComponentsRegistry")],Nt);var Ot={};function _t(e,t,i){null==i||"string"==typeof i&&""==i?Gt(e,t):Ft(e,t,i)}function Ft(e,t,i){e.setAttribute(Vt(t),i.toString())}function Gt(e,t){e.removeAttribute(Vt(t))}function Vt(e){return`aria-${e}`}function Bt(e,t){t?e.setAttribute("role",t):e.removeAttribute("role")}function Ht(e){let t;return t="asc"===e?"ascending":"desc"===e?"descending":"mixed"===e?"other":"none",t}function zt(e){return parseInt(e.getAttribute("aria-level"),10)}function Ut(e){return parseInt(e.getAttribute("aria-posinset"),10)}function Wt(e){return e.getAttribute("aria-label")}function jt(e,t){_t(e,"label",t)}function Kt(e,t){_t(e,"labelledby",t)}function $t(e,t){_t(e,"describedby",t)}function Yt(e,t){_t(e,"live",t)}function qt(e,t){_t(e,"atomic",t)}function Xt(e,t){_t(e,"relevant",t)}function Zt(e,t){_t(e,"level",t)}function Qt(e,t){_t(e,"disabled",t)}function Jt(e,t){_t(e,"hidden",t)}function ei(e,t){_t(e,"activedescendant",t)}function ti(e,t){Ft(e,"expanded",t)}function ii(e){Gt(e,"expanded")}function ni(e,t){Ft(e,"setsize",t)}function si(e,t){Ft(e,"posinset",t)}function ri(e,t){Ft(e,"multiselectable",t)}function oi(e,t){Ft(e,"rowcount",t)}function ai(e,t){Ft(e,"rowindex",t)}function li(e,t){Ft(e,"colcount",t)}function ci(e,t){Ft(e,"colindex",t)}function hi(e,t){Ft(e,"colspan",t)}function di(e,t){Ft(e,"sort",t)}function ui(e){Gt(e,"sort")}function pi(e,t){_t(e,"selected",t)}function gi(e,t){Ft(e,"checked",void 0===t?"mixed":t)}function fi(e,t){_t(e,"controls",t.id),Kt(t,e.id)}function mi(e,t){return void 0===t?e("ariaIndeterminate","indeterminate"):!0===t?e("ariaChecked","checked"):e("ariaUnchecked","unchecked")}p(Ot,{getAriaCheckboxStateName:()=>mi,getAriaLabel:()=>Wt,getAriaLevel:()=>zt,getAriaPosInSet:()=>Ut,getAriaSortState:()=>Ht,removeAriaExpanded:()=>ii,removeAriaSort:()=>ui,setAriaActiveDescendant:()=>ei,setAriaAtomic:()=>qt,setAriaChecked:()=>gi,setAriaColCount:()=>li,setAriaColIndex:()=>ci,setAriaColSpan:()=>hi,setAriaControls:()=>fi,setAriaDescribedBy:()=>$t,setAriaDisabled:()=>Qt,setAriaExpanded:()=>ti,setAriaHidden:()=>Jt,setAriaLabel:()=>jt,setAriaLabelledBy:()=>Kt,setAriaLevel:()=>Zt,setAriaLive:()=>Yt,setAriaMultiSelectable:()=>ri,setAriaPosInSet:()=>si,setAriaRelevant:()=>Xt,setAriaRole:()=>Bt,setAriaRowCount:()=>oi,setAriaRowIndex:()=>ai,setAriaSelected:()=>pi,setAriaSetSize:()=>ni,setAriaSort:()=>di});var vi,yi,Ci,bi,Si,wi,xi,Ei,Mi={};function Ai(){return void 0===vi&&(vi=/^((?!chrome|android).)*safari/i.test(navigator.userAgent)),vi}function Ti(){if(void 0===yi)if(Ai()){const e=navigator.userAgent.match(/version\/(\d+)/i);e&&(yi=null!=e[1]?parseFloat(e[1]):0)}else yi=0;return yi}function Di(){if(void 0===Ci){const e=window;Ci=!!e.chrome&&(!!e.chrome.webstore||!!e.chrome.runtime)||/Chrome/.test(navigator.userAgent)&&/Google Inc/.test(navigator.vendor)}return Ci}function Ii(){return void 0===bi&&(bi=/(firefox)/i.test(navigator.userAgent)),bi}function Ri(){return void 0===Si&&(Si=/(Mac|iPhone|iPod|iPad)/i.test(navigator.platform)),Si}function Li(){return void 0===wi&&(wi=/iPad|iPhone|iPod/.test(navigator.platform)||"MacIntel"===navigator.platform&&navigator.maxTouchPoints>1),wi}function ki(){return!Ai()||Ti()>=15}function Pi(e){if(!e)return null;const t=e.tabIndex,i=e.getAttribute("tabIndex");return-1!==t||null!==i&&(""!==i||Ii())?t.toString():null}function Ni(){if(!document.body)return-1;let e=1e6;const t=navigator.userAgent.toLowerCase().match(/firefox/)?6e6:1e9,i=document.createElement("div");for(document.body.appendChild(i);;){const n=2*e;if(i.style.height=n+"px",n>t||i.clientHeight!==n)break;e=n}return document.body.removeChild(i),e}function Oi(){var e,t,i;return null!=(i=null==(e=document.body)?void 0:e.clientWidth)?i:window.innerHeight||(null==(t=document.documentElement)?void 0:t.clientWidth)||-1}function _i(){var e,t,i;return null!=(i=null==(e=document.body)?void 0:e.clientHeight)?i:window.innerHeight||(null==(t=document.documentElement)?void 0:t.clientHeight)||-1}function Fi(){return null==Ei&&Gi(),Ei}function Gi(){const e=document.body,t=document.createElement("div");t.style.width=t.style.height="100px",t.style.opacity="0",t.style.overflow="scroll",t.style.msOverflowStyle="scrollbar",t.style.position="absolute",e.appendChild(t);let i=t.offsetWidth-t.clientWidth;0===i&&0===t.clientWidth&&(i=null),t.parentNode&&t.parentNode.removeChild(t),null!=i&&(Ei=i,xi=0===i)}function Vi(){return null==xi&&Gi(),xi}p(Mi,{browserSupportsPreventScroll:()=>ki,getBodyHeight:()=>_i,getBodyWidth:()=>Oi,getMaxDivHeight:()=>Ni,getSafariVersion:()=>Ti,getScrollbarWidth:()=>Fi,getTabIndex:()=>Pi,isBrowserChrome:()=>Di,isBrowserFirefox:()=>Ii,isBrowserSafari:()=>Ai,isIOSUserAgent:()=>Li,isInvisibleScrollbar:()=>Vi,isMacOsUserAgent:()=>Ri});var Bi={};p(Bi,{dateToFormattedString:()=>Zi,parseDateTimeFromString:()=>Qi,serialiseDate:()=>qi});var Hi={};function zi(e,t){return e.toString().padStart(t,"0")}function Ui(e,t){const i=[];for(let n=e;n<=t;n++)i.push(n);return i}function Wi(e){return"string"==typeof e&&(e=parseInt(e,10)),"number"==typeof e?Math.floor(e):null}function ji(e,t){let i="";for(let n=0;n<t;n++)i+=String.fromCharCode(255&e),e>>>=8;return i}function Ki(e,t,i){return"number"!=typeof e?"":$i(Math.round(100*e)/100,t,i)}function $i(e,t,i){return"number"!=typeof e?"":e.toString().replace(".",i).replace(/(\d)(?=(\d{3})+(?!\d))/g,`$1${t}`)}function Yi(e){return null==e?null:e.reduce((e,t)=>e+t,0)}function qi(e,t=!0,i="-"){if(!e)return null;let n=[e.getFullYear(),e.getMonth()+1,e.getDate()].map(e=>zi(e,2)).join(i);return t&&(n+=" "+[e.getHours(),e.getMinutes(),e.getSeconds()].map(e=>zi(e,2)).join(":")),n}p(Hi,{cleanNumber:()=>Wi,createArrayOfNumbers:()=>Ui,decToHex:()=>ji,formatNumberCommas:()=>$i,formatNumberTwoDecimalPlacesAndCommas:()=>Ki,padStartWidthZeros:()=>zi,sum:()=>Yi});var Xi=e=>{if(e>3&&e<21)return"th";switch(e%10){case 1:return"st";case 2:return"nd";case 3:return"rd"}return"th"};function Zi(e,t="YYYY-MM-DD"){const i=zi(e.getFullYear(),4),n=["January","February","March","April","May","June","July","August","September","October","November","December"],s=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],r={YYYY:()=>i.slice(i.length-4,i.length),YY:()=>i.slice(i.length-2,i.length),Y:()=>`${e.getFullYear()}`,MMMM:()=>n[e.getMonth()],MMM:()=>n[e.getMonth()].slice(0,3),MM:()=>zi(e.getMonth()+1,2),Mo:()=>`${e.getMonth()+1}${Xi(e.getMonth()+1)}`,M:()=>`${e.getMonth()+1}`,Do:()=>`${e.getDate()}${Xi(e.getDate())}`,DD:()=>zi(e.getDate(),2),D:()=>`${e.getDate()}`,dddd:()=>s[e.getDay()],ddd:()=>s[e.getDay()].slice(0,3),dd:()=>s[e.getDay()].slice(0,2),do:()=>`${e.getDay()}${Xi(e.getDay())}`,d:()=>`${e.getDay()}`},o=new RegExp(Object.keys(r).join("|"),"g");return t.replace(o,e=>e in r?r[e]():e)}function Qi(e){if(!e)return null;const[t,i]=e.split(" ");if(!t)return null;const n=t.split("-").map(e=>parseInt(e,10));if(3!==n.filter(e=>!isNaN(e)).length)return null;const[s,r,o]=n,a=new Date(s,r-1,o);if(a.getFullYear()!==s||a.getMonth()!==r-1||a.getDate()!==o)return null;if(!i||"00:00:00"===i)return a;const[l,c,h]=i.split(":").map(e=>parseInt(e,10));return l>=0&&l<24&&a.setHours(l),c>=0&&c<60&&a.setMinutes(c),h>=0&&h<60&&a.setSeconds(h),a}var Ji,en={};function tn(e,t,i){const n=e.parentElement;let s=n&&n.firstChild;for(;s;)t&&s.classList.toggle(t,s===e),i&&s.classList.toggle(i,s!==e),s=s.nextSibling}p(en,{FOCUSABLE_EXCLUDE:()=>sn,FOCUSABLE_SELECTOR:()=>nn,addOrRemoveAttribute:()=>Gn,addStylesToElement:()=>Tn,bindCellRendererToHtmlElement:()=>Bn,clearElement:()=>Cn,copyNodeList:()=>_n,ensureDomOrder:()=>En,formatSize:()=>Nn,getAbsoluteHeight:()=>pn,getAbsoluteWidth:()=>gn,getElementRectWithOffset:()=>fn,getElementSize:()=>hn,getInnerHeight:()=>dn,getInnerWidth:()=>un,getScrollLeft:()=>vn,insertWithDomOrder:()=>An,isElementChildOfClass:()=>cn,isFocusableFormField:()=>rn,isHorizontalScrollShowing:()=>Dn,isInDOM:()=>Sn,isNodeOrElement:()=>On,isRtlNegativeScroll:()=>mn,isVerticalScrollShowing:()=>In,isVisible:()=>wn,iterateNamedNodeMap:()=>Fn,loadTemplate:()=>xn,nodeListForEach:()=>Vn,radioCssClass:()=>tn,removeFromParent:()=>bn,setDisabled:()=>ln,setDisplayed:()=>on,setDomChildOrder:()=>Mn,setElementHeight:()=>kn,setElementWidth:()=>Rn,setFixedHeight:()=>Pn,setFixedWidth:()=>Ln,setScrollLeft:()=>yn,setVisible:()=>an});var nn="[tabindex], input, select, button, textarea, [href]",sn="[disabled], .ag-disabled:not(.ag-button), .ag-disabled *";function rn(e){const t=Element.prototype.matches||Element.prototype.msMatchesSelector,i=t.call(e,"input, select, button, textarea"),n=t.call(e,sn),s=wn(e);return i&&!n&&s}function on(e,t,i={}){const{skipAriaHidden:n}=i;e.classList.toggle("ag-hidden",!t),n||Jt(e,!t)}function an(e,t,i={}){const{skipAriaHidden:n}=i;e.classList.toggle("ag-invisible",!t),n||Jt(e,!t)}function ln(e,t){const i="disabled",n=t?e=>e.setAttribute(i,""):e=>e.removeAttribute(i);n(e),Vn(e.querySelectorAll("input"),e=>n(e))}function cn(e,t,i){let n=0;for(;e;){if(e.classList.contains(t))return!0;if(e=e.parentElement,"number"==typeof i){if(++n>i)break}else if(e===i)break}return!1}function hn(e){const{height:t,width:i,borderTopWidth:n,borderRightWidth:s,borderBottomWidth:r,borderLeftWidth:o,paddingTop:a,paddingRight:l,paddingBottom:c,paddingLeft:h,marginTop:d,marginRight:u,marginBottom:p,marginLeft:g,boxSizing:f}=window.getComputedStyle(e);return{height:parseFloat(t||"0"),width:parseFloat(i||"0"),borderTopWidth:parseFloat(n||"0"),borderRightWidth:parseFloat(s||"0"),borderBottomWidth:parseFloat(r||"0"),borderLeftWidth:parseFloat(o||"0"),paddingTop:parseFloat(a||"0"),paddingRight:parseFloat(l||"0"),paddingBottom:parseFloat(c||"0"),paddingLeft:parseFloat(h||"0"),marginTop:parseFloat(d||"0"),marginRight:parseFloat(u||"0"),marginBottom:parseFloat(p||"0"),marginLeft:parseFloat(g||"0"),boxSizing:f}}function dn(e){const t=hn(e);return"border-box"===t.boxSizing?t.height-t.paddingTop-t.paddingBottom:t.height}function un(e){const t=hn(e);return"border-box"===t.boxSizing?t.width-t.paddingLeft-t.paddingRight:t.width}function pn(e){const t=hn(e),i=t.marginBottom+t.marginTop;return Math.ceil(e.offsetHeight+i)}function gn(e){const t=hn(e),i=t.marginLeft+t.marginRight;return Math.ceil(e.offsetWidth+i)}function fn(e){const t=e.getBoundingClientRect(),{borderTopWidth:i,borderLeftWidth:n,borderRightWidth:s,borderBottomWidth:r}=hn(e);return{top:t.top+(i||0),left:t.left+(n||0),right:t.right+(s||0),bottom:t.bottom+(r||0)}}function mn(){if("boolean"==typeof Ji)return Ji;const e=document.createElement("div");return e.style.direction="rtl",e.style.width="1px",e.style.height="1px",e.style.position="fixed",e.style.top="0px",e.style.overflow="hidden",e.dir="rtl",e.innerHTML='<div style="width: 2px">\n            <span style="display: inline-block; width: 1px"></span>\n            <span style="display: inline-block; width: 1px"></span>\n        </div>',document.body.appendChild(e),e.scrollLeft=1,Ji=0===Math.floor(e.scrollLeft),document.body.removeChild(e),Ji}function vn(e,t){let i=e.scrollLeft;return t&&(i=Math.abs(i),Di()&&!mn()&&(i=e.scrollWidth-e.clientWidth-i)),i}function yn(e,t,i){i&&(mn()?t*=-1:(Ai()||Di())&&(t=e.scrollWidth-e.clientWidth-t)),e.scrollLeft=t}function Cn(e){for(;e&&e.firstChild;)e.removeChild(e.firstChild)}function bn(e){e&&e.parentNode&&e.parentNode.removeChild(e)}function Sn(e){return!!e.offsetParent}function wn(e){const t=e;return t.checkVisibility?t.checkVisibility({checkVisibilityCSS:!0}):!(!Sn(e)||"visible"!==window.getComputedStyle(e).visibility)}function xn(e){const t=document.createElement("div");return t.innerHTML=(e||"").trim(),t.firstChild}function En(e,t,i){i&&i.nextSibling===t||(i?i.nextSibling?e.insertBefore(t,i.nextSibling):e.appendChild(t):e.firstChild&&e.firstChild!==t&&e.insertAdjacentElement("afterbegin",t))}function Mn(e,t){for(let i=0;i<t.length;i++){const n=t[i],s=e.children[i];s!==n&&e.insertBefore(n,s)}}function An(e,t,i){i?i.insertAdjacentElement("afterend",t):e.firstChild?e.insertAdjacentElement("afterbegin",t):e.appendChild(t)}function Tn(e,t){if(t)for(const[i,n]of Object.entries(t)){if(!i||!i.length||null==n)continue;const t=bt(i),s=n.toString(),r=s.replace(/\s*!important/g,""),o=r.length!=s.length?"important":void 0;e.style.setProperty(t,r,o)}}function Dn(e){return e.clientWidth<e.scrollWidth}function In(e){return e.clientHeight<e.scrollHeight}function Rn(e,t){"flex"===t?(e.style.removeProperty("width"),e.style.removeProperty("minWidth"),e.style.removeProperty("maxWidth"),e.style.flex="1 1 auto"):Ln(e,t)}function Ln(e,t){t=Nn(t),e.style.width=t.toString(),e.style.maxWidth=t.toString(),e.style.minWidth=t.toString()}function kn(e,t){"flex"===t?(e.style.removeProperty("height"),e.style.removeProperty("minHeight"),e.style.removeProperty("maxHeight"),e.style.flex="1 1 auto"):Pn(e,t)}function Pn(e,t){t=Nn(t),e.style.height=t.toString(),e.style.maxHeight=t.toString(),e.style.minHeight=t.toString()}function Nn(e){return"number"==typeof e?`${e}px`:e}function On(e){return e instanceof Node||e instanceof HTMLElement}function _n(e){if(null==e)return[];const t=[];return Vn(e,e=>t.push(e)),t}function Fn(e,t){if(e)for(let i=0;i<e.length;i++){const n=e[i];t(n.name,n.value)}}function Gn(e,t,i){null==i?e.removeAttribute(t):e.setAttribute(t,i.toString())}function Vn(e,t){if(null!=e)for(let i=0;i<e.length;i++)t(e[i])}function Bn(e,t){e.then(e=>{const i=e.getGui();null!=i&&("object"==typeof i?t.appendChild(i):t.innerHTML=i)})}var Hn={};function zn(e,t,i){const n={},s=e.filter(e=>!t.some(t=>t===e));return s.length>0&&s.forEach(e=>n[e]=Un(e,i).values),n}function Un(e,t,i,n){let s=t.map((t,i)=>({value:t,relevance:Wn(e.toLowerCase(),t.toLocaleLowerCase()),idx:i}));if(s.sort((e,t)=>t.relevance-e.relevance),i&&(s=s.filter(e=>0!==e.relevance)),s.length>0&&n&&n>0){const e=s[0].relevance*n;s=s.filter(t=>e-t.relevance<0)}const r=[],o=[];for(const e of s)r.push(e.value),o.push(e.idx);return{values:r,indices:o}}function Wn(e,t){const i=e.replace(/\s/g,""),n=t.replace(/\s/g,"");let s=0,r=-1;for(let e=0;e<i.length;e++){const t=n.indexOf(i[e],r+1);-1!==t&&(r=t,s+=100-100*r/1e4*100)}return s}p(Hn,{fuzzyCheckStrings:()=>zn,fuzzySuggestions:()=>Un});var jn={};p(jn,{createIcon:()=>$n,createIconNoSpan:()=>Yn,iconNameClassMap:()=>Kn});var Kn={columnGroupOpened:"expanded",columnGroupClosed:"contracted",columnSelectClosed:"tree-closed",columnSelectOpen:"tree-open",columnSelectIndeterminate:"tree-indeterminate",columnMovePin:"pin",columnMoveHide:"eye-slash",columnMoveMove:"arrows",columnMoveLeft:"left",columnMoveRight:"right",columnMoveGroup:"group",columnMoveValue:"aggregation",columnMovePivot:"pivot",dropNotAllowed:"not-allowed",groupContracted:"tree-closed",groupExpanded:"tree-open",setFilterGroupClosed:"tree-closed",setFilterGroupOpen:"tree-open",setFilterGroupIndeterminate:"tree-indeterminate",chart:"chart",close:"cross",cancel:"cancel",check:"tick",first:"first",previous:"previous",next:"next",last:"last",linked:"linked",unlinked:"unlinked",colorPicker:"color-picker",groupLoading:"loading",menu:"menu",menuAlt:"menu-alt",filter:"filter",columns:"columns",maximize:"maximize",minimize:"minimize",menuPin:"pin",menuValue:"aggregation",menuAddRowGroup:"group",menuRemoveRowGroup:"group",clipboardCopy:"copy",clipboardCut:"cut",clipboardPaste:"paste",pivotPanel:"pivot",rowGroupPanel:"group",valuePanel:"aggregation",columnDrag:"grip",rowDrag:"grip",save:"save",csvExport:"csv",excelExport:"excel",smallDown:"small-down",smallLeft:"small-left",smallRight:"small-right",smallUp:"small-up",sortAscending:"asc",sortDescending:"desc",sortUnSort:"none",advancedFilterBuilder:"group",advancedFilterBuilderDrag:"grip",advancedFilterBuilderInvalid:"not-allowed",advancedFilterBuilderMoveUp:"up",advancedFilterBuilderMoveDown:"down",advancedFilterBuilderAdd:"plus",advancedFilterBuilderRemove:"minus",chartsMenuEdit:"chart",chartsMenuAdvancedSettings:"settings",chartsMenuAdd:"plus"};function $n(e,t,i){const n=Yn(e,t,i);if(n){const{className:e}=n;if("string"==typeof e&&e.indexOf("ag-icon")>-1||"object"==typeof e&&e["ag-icon"])return n}const s=document.createElement("span");return s.appendChild(n),s}function Yn(e,t,i,n){let s=null;const r=i&&i.getColDef().icons;if(r&&(s=r[e]),t&&!s){const i=t.get("icons");i&&(s=i[e])}if(!s){const t=document.createElement("span");let i=Kn[e];return i||(n?i=e:(console.warn(`AG Grid: Did not find icon ${e}`),i="")),t.setAttribute("class",`ag-icon ag-icon-${i}`),t.setAttribute("unselectable","on"),Bt(t,"presentation"),t}{let e;if("function"==typeof s)e=s();else{if("string"!=typeof s)throw new Error("icon from grid options needs to be a string or a function");e=s}if("string"==typeof e)return xn(e);if(On(e))return e;console.warn("AG Grid: iconRenderer should return back a string or a dom object")}}var qn={};p(qn,{isDeleteKey:()=>ts,isEventFromPrintableCharacter:()=>Zn,isUserSuppressingHeaderKeyboardEvent:()=>Jn,isUserSuppressingKeyboardEvent:()=>Qn,normaliseQwertyAzerty:()=>es});var Xn=class{};function Zn(e){return!(e.altKey||e.ctrlKey||e.metaKey)&&1===e.key.length}function Qn(e,t,i,n,s){const r=n?n.getColDef().suppressKeyboardEvent:void 0;if(!r)return!1;const o=e.addGridCommonParams({event:t,editing:s,column:n,node:i,data:i.data,colDef:n.getColDef()});return!(!r||!r(o))}function Jn(e,t,i,n){const s=n.getDefinition(),r=s&&s.suppressHeaderKeyboardEvent;return!!y(r)&&!!r(e.addGridCommonParams({colDef:s,column:n,headerRowIndex:i,event:t}))}function es(e){const{keyCode:t}=e;let i;switch(t){case 65:i=Xn.A;break;case 67:i=Xn.C;break;case 86:i=Xn.V;break;case 68:i=Xn.D;break;case 90:i=Xn.Z;break;case 89:i=Xn.Y;break;default:i=e.code}return i}function ts(e,t=!1){return e===Xn.DELETE||!t&&e===Xn.BACKSPACE&&Ri()}Xn.BACKSPACE="Backspace",Xn.TAB="Tab",Xn.ENTER="Enter",Xn.ESCAPE="Escape",Xn.SPACE=" ",Xn.LEFT="ArrowLeft",Xn.UP="ArrowUp",Xn.RIGHT="ArrowRight",Xn.DOWN="ArrowDown",Xn.DELETE="Delete",Xn.F2="F2",Xn.PAGE_UP="PageUp",Xn.PAGE_DOWN="PageDown",Xn.PAGE_HOME="Home",Xn.PAGE_END="End",Xn.A="KeyA",Xn.C="KeyC",Xn.D="KeyD",Xn.V="KeyV",Xn.X="KeyX",Xn.Y="KeyY",Xn.Z="KeyZ";var is={};function ns(e,t,i){if(0===i)return!1;const n=Math.abs(e.clientX-t.clientX),s=Math.abs(e.clientY-t.clientY);return Math.max(n,s)<=i}p(is,{areEventsNear:()=>ns});var ss={};function rs(e,t){if(!e)return!1;const i=(e,i)=>{const n=t[e.id],s=t[i.id],r=void 0!==n,o=void 0!==s;return r&&o?n-s:r||o?r?1:-1:e.__objectId-i.__objectId};let n,s,r=!1;for(let t=0;t<e.length-1;t++)if(n=e[t],s=e[t+1],i(n,s)>0){r=!0;break}return!!r&&(e.sort(i),!0)}p(ss,{sortRowNodesByOrder:()=>rs});var os={};function as(e){const t=new Set;return e.forEach(e=>t.add(e)),t}p(os,{convertToSet:()=>as});var ls=d(d(d(d(d(d(d(d(d(d(d(d(d(d(d(d(d(d({},Ot),Ae),Mi),Bi),en),Me),V),Hn),m),jn),qn),St),is),Hi),I),ss),os),pt),cs=class{constructor(e=0,t=1){this.nextValue=e,this.step=t}next(){const e=this.nextValue;return this.nextValue+=this.step,e}peek(){return this.nextValue}skip(e){this.nextValue+=e}},hs=(e=>(e[e.IN_PROGRESS=0]="IN_PROGRESS",e[e.RESOLVED=1]="RESOLVED",e))(hs||{}),ds=class e{constructor(e){this.status=0,this.resolution=null,this.waiters=[],e(e=>this.onDone(e),e=>this.onReject(e))}static all(t){return new e(e=>{let i=t.length;const n=new Array(i);t.forEach((t,s)=>{t.then(t=>{n[s]=t,i--,0===i&&e(n)})})})}static resolve(t=null){return new e(e=>e(t))}then(t){return new e(e=>{1===this.status?e(t(this.resolution)):this.waiters.push(i=>e(t(i)))})}resolveNow(e,t){return 1===this.status?t(this.resolution):e}onDone(e){this.status=1,this.resolution=e,this.waiters.forEach(t=>t(e))}onReject(e){console.warn("TBI")}},us=class{constructor(){this.timestamp=(new Date).getTime()}print(e){const t=(new Date).getTime()-this.timestamp;console.info(`${e} = ${t}`),this.timestamp=(new Date).getTime()}},ps=class{constructor(e){this.cssClassStates={},this.getGui=e}addCssClass(e){const t=(e||"").split(" ");if(t.length>1)t.forEach(e=>this.addCssClass(e));else if(!0!==this.cssClassStates[e]&&e.length){const t=this.getGui();t&&t.classList.add(e),this.cssClassStates[e]=!0}}removeCssClass(e){const t=(e||"").split(" ");if(t.length>1)t.forEach(e=>this.removeCssClass(e));else if(!1!==this.cssClassStates[e]&&e.length){const t=this.getGui();t&&t.classList.remove(e),this.cssClassStates[e]=!1}}containsCssClass(e){const t=this.getGui();return!!t&&t.classList.contains(e)}addOrRemoveCssClass(e,t){if(e){if(e.indexOf(" ")>=0){const i=(e||"").split(" ");if(i.length>1)return void i.forEach(e=>this.addOrRemoveCssClass(e,t))}if(this.cssClassStates[e]!==t&&e.length){const i=this.getGui();i&&i.classList.toggle(e,t),this.cssClassStates[e]=t}}}},gs=class e extends nt{constructor(e,t,i,n){super(),this.parentComp=e,this.tooltipShowDelayOverride=t,this.tooltipHideDelayOverride=i,this.shouldDisplayTooltip=n,this.SHOW_QUICK_TOOLTIP_DIFF=1e3,this.FADE_OUT_TOOLTIP_TIMEOUT=1e3,this.INTERACTIVE_HIDE_DELAY=100,this.interactionEnabled=!1,this.isInteractingWithTooltip=!1,this.state=0,this.tooltipInstanceCount=0,this.tooltipMouseTrack=!1}postConstruct(){this.gos.get("tooltipInteraction")&&(this.interactionEnabled=!0),this.tooltipTrigger=this.getTooltipTrigger(),this.tooltipMouseTrack=this.gos.get("tooltipMouseTrack");const e=this.parentComp.getGui();0===this.tooltipTrigger&&(this.addManagedListener(e,"mouseenter",this.onMouseEnter.bind(this)),this.addManagedListener(e,"mouseleave",this.onMouseLeave.bind(this))),1===this.tooltipTrigger&&(this.addManagedListener(e,"focusin",this.onFocusIn.bind(this)),this.addManagedListener(e,"focusout",this.onFocusOut.bind(this))),this.addManagedListener(e,"mousemove",this.onMouseMove.bind(this)),this.interactionEnabled||(this.addManagedListener(e,"mousedown",this.onMouseDown.bind(this)),this.addManagedListener(e,"keydown",this.onKeyDown.bind(this)))}getGridOptionsTooltipDelay(e){const t=this.gos.get(e);return t<0&&z(`${e} should not be lower than 0`),Math.max(200,t)}getTooltipDelay(e){var t,i;return"show"===e?null!=(t=this.tooltipShowDelayOverride)?t:this.getGridOptionsTooltipDelay("tooltipShowDelay"):null!=(i=this.tooltipHideDelayOverride)?i:this.getGridOptionsTooltipDelay("tooltipHideDelay")}destroy(){this.setToDoNothing(),super.destroy()}getTooltipTrigger(){const e=this.gos.get("tooltipTrigger");return e&&"hover"!==e?1:0}onMouseEnter(t){this.interactionEnabled&&this.interactiveTooltipTimeoutId&&(this.unlockService(),this.startHideTimeout()),Li()||(e.isLocked?this.showTooltipTimeoutId=window.setTimeout(()=>{this.prepareToShowTooltip(t)},this.INTERACTIVE_HIDE_DELAY):this.prepareToShowTooltip(t))}onMouseMove(e){this.lastMouseEvent&&(this.lastMouseEvent=e),this.tooltipMouseTrack&&2===this.state&&this.tooltipComp&&this.positionTooltip()}onMouseDown(){this.setToDoNothing()}onMouseLeave(){this.interactionEnabled?this.lockService():this.setToDoNothing()}onFocusIn(){this.prepareToShowTooltip()}onFocusOut(e){var t;const i=e.relatedTarget,n=this.parentComp.getGui(),s=null==(t=this.tooltipComp)?void 0:t.getGui();this.isInteractingWithTooltip||n.contains(i)||this.interactionEnabled&&(null==s?void 0:s.contains(i))||this.setToDoNothing()}onKeyDown(){this.setToDoNothing()}prepareToShowTooltip(t){if(0!=this.state||e.isLocked)return;let i=0;t&&(i=this.isLastTooltipHiddenRecently()?200:this.getTooltipDelay("show")),this.lastMouseEvent=t||null,this.showTooltipTimeoutId=window.setTimeout(this.showTooltip.bind(this),i),this.state=1}isLastTooltipHiddenRecently(){return(new Date).getTime()-e.lastTooltipHideTime<this.SHOW_QUICK_TOOLTIP_DIFF}setToDoNothing(){2===this.state&&this.hideTooltip(),this.onBodyScrollEventCallback&&(this.onBodyScrollEventCallback(),this.onBodyScrollEventCallback=void 0),this.onColumnMovedEventCallback&&(this.onColumnMovedEventCallback(),this.onColumnMovedEventCallback=void 0),this.clearTimeouts(),this.state=0,this.lastMouseEvent=null}showTooltip(){const e=d({},this.parentComp.getTooltipParams());if(!y(e.value)||this.shouldDisplayTooltip&&!this.shouldDisplayTooltip())return void this.setToDoNothing();this.state=2,this.tooltipInstanceCount++;const t=this.newTooltipComponentCallback.bind(this,this.tooltipInstanceCount);this.userComponentFactory.getTooltipCompDetails(e).newAgStackInstance().then(t)}hideTooltip(t){if(!t&&this.isInteractingWithTooltip)return;this.tooltipComp&&(this.destroyTooltipComp(),e.lastTooltipHideTime=(new Date).getTime());const i={type:lt.EVENT_TOOLTIP_HIDE,parentGui:this.parentComp.getGui()};this.eventService.dispatchEvent(i),this.state=0}newTooltipComponentCallback(e,t){if(2!==this.state||this.tooltipInstanceCount!==e)return void this.getContext().destroyBean(t);const i=t.getGui();this.tooltipComp=t,i.classList.contains("ag-tooltip")||i.classList.add("ag-tooltip-custom"),0===this.tooltipTrigger&&i.classList.add("ag-tooltip-animate"),this.interactionEnabled&&i.classList.add("ag-tooltip-interactive");const n=this.localeService.getLocaleTextFunc(),s=this.popupService.addPopup({eChild:i,ariaLabel:n("ariaLabelTooltip","Tooltip")});s&&(this.tooltipPopupDestroyFunc=s.hideFunc),this.positionTooltip(),1===this.tooltipTrigger&&(this.onBodyScrollEventCallback=this.addManagedListener(this.eventService,lt.EVENT_BODY_SCROLL,this.setToDoNothing.bind(this)),this.onColumnMovedEventCallback=this.addManagedListener(this.eventService,lt.EVENT_COLUMN_MOVED,this.setToDoNothing.bind(this))),this.interactionEnabled&&(0===this.tooltipTrigger?(this.tooltipMouseEnterListener=this.addManagedListener(i,"mouseenter",this.onTooltipMouseEnter.bind(this))||null,this.tooltipMouseLeaveListener=this.addManagedListener(i,"mouseleave",this.onTooltipMouseLeave.bind(this))||null):(this.tooltipFocusInListener=this.addManagedListener(i,"focusin",this.onTooltipFocusIn.bind(this))||null,this.tooltipFocusOutListener=this.addManagedListener(i,"focusout",this.onTooltipFocusOut.bind(this))||null));const r={type:lt.EVENT_TOOLTIP_SHOW,tooltipGui:i,parentGui:this.parentComp.getGui()};this.eventService.dispatchEvent(r),this.startHideTimeout()}onTooltipMouseEnter(){this.isInteractingWithTooltip=!0,this.unlockService()}onTooltipMouseLeave(){this.isInteractingWithTooltip=!1,this.lockService()}onTooltipFocusIn(){this.isInteractingWithTooltip=!0}onTooltipFocusOut(e){var t;const i=this.parentComp.getGui(),n=null==(t=this.tooltipComp)?void 0:t.getGui(),s=e.relatedTarget;(null==n?void 0:n.contains(s))||(this.isInteractingWithTooltip=!1,i.contains(s)?this.startHideTimeout():this.hideTooltip())}positionTooltip(){const e={type:"tooltip",ePopup:this.tooltipComp.getGui(),nudgeY:18,skipObserver:this.tooltipMouseTrack};this.lastMouseEvent?this.popupService.positionPopupUnderMouseEvent(u(d({},e),{mouseEvent:this.lastMouseEvent})):this.popupService.positionPopupByComponent(u(d({},e),{eventSource:this.parentComp.getGui(),position:"under",keepWithinBounds:!0,nudgeY:5}))}destroyTooltipComp(){this.tooltipComp.getGui().classList.add("ag-tooltip-hiding");const e=this.tooltipPopupDestroyFunc,t=this.tooltipComp,i=0===this.tooltipTrigger?this.FADE_OUT_TOOLTIP_TIMEOUT:0;window.setTimeout(()=>{e(),this.getContext().destroyBean(t)},i),this.clearTooltipListeners(),this.tooltipPopupDestroyFunc=void 0,this.tooltipComp=void 0}clearTooltipListeners(){[this.tooltipMouseEnterListener,this.tooltipMouseLeaveListener,this.tooltipFocusInListener,this.tooltipFocusOutListener].forEach(e=>{e&&e()}),this.tooltipMouseEnterListener=this.tooltipMouseLeaveListener=this.tooltipFocusInListener=this.tooltipFocusOutListener=null}lockService(){e.isLocked=!0,this.interactiveTooltipTimeoutId=window.setTimeout(()=>{this.unlockService(),this.setToDoNothing()},this.INTERACTIVE_HIDE_DELAY)}unlockService(){e.isLocked=!1,this.clearInteractiveTimeout()}startHideTimeout(){this.clearHideTimeout(),this.hideTooltipTimeoutId=window.setTimeout(this.hideTooltip.bind(this),this.getTooltipDelay("hide"))}clearShowTimeout(){this.showTooltipTimeoutId&&(window.clearTimeout(this.showTooltipTimeoutId),this.showTooltipTimeoutId=void 0)}clearHideTimeout(){this.hideTooltipTimeoutId&&(window.clearTimeout(this.hideTooltipTimeoutId),this.hideTooltipTimeoutId=void 0)}clearInteractiveTimeout(){this.interactiveTooltipTimeoutId&&(window.clearTimeout(this.interactiveTooltipTimeoutId),this.interactiveTooltipTimeoutId=void 0)}clearTimeouts(){this.clearShowTimeout(),this.clearHideTimeout(),this.clearInteractiveTimeout()}};gs.isLocked=!1,g([he("popupService")],gs.prototype,"popupService",2),g([he("userComponentFactory")],gs.prototype,"userComponentFactory",2),g([ae],gs.prototype,"postConstruct",1);var fs=gs,ms=class extends nt{constructor(e,t){super(),this.ctrl=e,t&&(this.beans=t)}postConstruct(){this.refreshToolTip()}setBrowserTooltip(e){const t="title",i=this.ctrl.getGui();i&&(null!=e&&""!=e?i.setAttribute(t,e):i.removeAttribute(t))}updateTooltipText(){this.tooltip=this.ctrl.getTooltipValue()}createTooltipFeatureIfNeeded(){var e,t,i,n;if(null!=this.tooltipManager)return;const s={getTooltipParams:()=>this.getTooltipParams(),getGui:()=>this.ctrl.getGui()};this.tooltipManager=this.createBean(new fs(s,null==(t=(e=this.ctrl).getTooltipShowDelayOverride)?void 0:t.call(e),null==(n=(i=this.ctrl).getTooltipHideDelayOverride)?void 0:n.call(i),this.ctrl.shouldDisplayTooltip),this.beans.context)}refreshToolTip(){this.browserTooltips=this.beans.gos.get("enableBrowserTooltips"),this.updateTooltipText(),this.browserTooltips?(this.setBrowserTooltip(this.tooltip),this.tooltipManager&&(this.tooltipManager=this.destroyBean(this.tooltipManager,this.beans.context))):(this.setBrowserTooltip(null),this.createTooltipFeatureIfNeeded())}getTooltipParams(){const e=this.ctrl,t=e.getColumn?e.getColumn():void 0,i=e.getColDef?e.getColDef():void 0,n=e.getRowNode?e.getRowNode():void 0;return{location:e.getLocation(),colDef:i,column:t,rowIndex:e.getRowIndex?e.getRowIndex():void 0,node:n,data:n?n.data:void 0,value:this.getTooltipText(),valueFormatted:e.getValueFormatted?e.getValueFormatted():void 0,hideTooltipCallback:()=>{var e;return null==(e=this.tooltipManager)?void 0:e.hideTooltip(!0)}}}getTooltipText(){return this.tooltip}destroy(){this.tooltipManager&&(this.tooltipManager=this.destroyBean(this.tooltipManager,this.beans.context)),super.destroy()}};g([he("beans")],ms.prototype,"beans",2),g([ae],ms.prototype,"postConstruct",1);var vs=new cs,ys=class e extends nt{constructor(e){super(),this.displayed=!0,this.visible=!0,this.compId=vs.next(),this.cssClassManager=new ps(()=>this.eGui),e&&this.setTemplate(e)}preConstructOnComponent(){this.usingBrowserTooltips=this.gos.get("enableBrowserTooltips")}getCompId(){return this.compId}getTooltipParams(){return{value:this.tooltipText,location:"UNKNOWN"}}setTooltip(e){const{newTooltipText:t,showDelayOverride:i,hideDelayOverride:n,location:s,shouldDisplayTooltip:r}=e||{};this.tooltipFeature&&(this.tooltipFeature=this.destroyBean(this.tooltipFeature)),this.tooltipText!==t&&(this.tooltipText=t);null!=t&&(this.tooltipFeature=this.createBean(new ms({getTooltipValue:()=>this.tooltipText,getGui:()=>this.getGui(),getLocation:()=>null!=s?s:"UNKNOWN",getColDef:null==e?void 0:e.getColDef,getColumn:null==e?void 0:e.getColumn,getTooltipShowDelayOverride:null!=i?()=>i:void 0,getTooltipHideDelayOverride:null!=n?()=>n:void 0,shouldDisplayTooltip:r})))}createChildComponentsFromTags(e,t){_n(e.childNodes).forEach(i=>{if(!(i instanceof HTMLElement))return;const n=this.createComponentFromElement(i,e=>{e.getGui()&&this.copyAttributesFromNode(i,e.getGui())},t);if(n){if(n.addItems&&i.children.length){this.createChildComponentsFromTags(i,t);const e=Array.prototype.slice.call(i.children);n.addItems(e)}this.swapComponentForNode(n,e,i)}else i.childNodes&&this.createChildComponentsFromTags(i,t)})}createComponentFromElement(t,i,n){const s=t.nodeName,r=n?n[t.getAttribute("ref")]:void 0,o=this.agStackComponentsRegistry.getComponentClass(s);if(o){e.elementGettingCreated=t;const n=new o(r);return n.setParentComponent(this),this.createBean(n,null,i),n}return null}copyAttributesFromNode(e,t){Fn(e.attributes,(e,i)=>t.setAttribute(e,i))}swapComponentForNode(e,t,i){const n=e.getGui();t.replaceChild(n,i),t.insertBefore(document.createComment(i.nodeName),n),this.addDestroyFunc(this.destroyBean.bind(this,e)),this.swapInComponentForQuerySelectors(e,i)}swapInComponentForQuerySelectors(e,t){const i=this;this.iterateOverQuerySelectors(n=>{i[n.attributeName]===t&&(i[n.attributeName]=e)})}iterateOverQuerySelectors(e){let t=Object.getPrototypeOf(this);for(;null!=t;){const i=t.__agComponentMetaData,n=W(t.constructor);i&&i[n]&&i[n].querySelectors&&i[n].querySelectors.forEach(t=>e(t)),t=Object.getPrototypeOf(t)}}activateTabIndex(e){const t=this.gos.get("tabIndex");e||(e=[]),e.length||e.push(this.getGui()),e.forEach(e=>e.setAttribute("tabindex",t.toString()))}setTemplate(e,t){const i=xn(e);this.setTemplateFromElement(i,t)}setTemplateFromElement(e,t){this.eGui=e,this.eGui.__agComponent=this,this.wireQuerySelectors(),this.getContext()&&this.createChildComponentsFromTags(this.getGui(),t)}createChildComponentsPreConstruct(){this.getGui()&&this.createChildComponentsFromTags(this.getGui())}wireQuerySelectors(){if(!this.eGui)return;const e=this;this.iterateOverQuerySelectors(t=>{const i=i=>e[t.attributeName]=i;if(t.refSelector&&this.getAttribute("ref")===t.refSelector)i(this.eGui);else{const e=this.eGui.querySelector(t.querySelector);e&&i(e.__agComponent||e)}})}getGui(){return this.eGui}getFocusableElement(){return this.eGui}getAriaElement(){return this.getFocusableElement()}setParentComponent(e){this.parentComponent=e}getParentComponent(){return this.parentComponent}setGui(e){this.eGui=e}queryForHtmlElement(e){return this.eGui.querySelector(e)}queryForHtmlInputElement(e){return this.eGui.querySelector(e)}appendChild(e,t){if(null!=e)if(t||(t=this.eGui),On(e))t.appendChild(e);else{const i=e;t.appendChild(i.getGui())}}isDisplayed(){return this.displayed}setVisible(e,t={}){if(e!==this.visible){this.visible=e;const{skipAriaHidden:i}=t;an(this.eGui,e,{skipAriaHidden:i})}}setDisplayed(t,i={}){if(t!==this.displayed){this.displayed=t;const{skipAriaHidden:n}=i;on(this.eGui,t,{skipAriaHidden:n});const s={type:e.EVENT_DISPLAYED_CHANGED,visible:this.displayed};this.dispatchEvent(s)}}destroy(){this.parentComponent&&(this.parentComponent=void 0),this.tooltipFeature&&(this.tooltipFeature=this.destroyBean(this.tooltipFeature));const e=this.eGui;e&&e.__agComponent&&(e.__agComponent=void 0),super.destroy()}addGuiEventListener(e,t,i){this.eGui.addEventListener(e,t,i),this.addDestroyFunc(()=>this.eGui.removeEventListener(e,t))}addCssClass(e){this.cssClassManager.addCssClass(e)}removeCssClass(e){this.cssClassManager.removeCssClass(e)}containsCssClass(e){return this.cssClassManager.containsCssClass(e)}addOrRemoveCssClass(e,t){this.cssClassManager.addOrRemoveCssClass(e,t)}getAttribute(e){const{eGui:t}=this;return t?t.getAttribute(e):null}getRefElement(e){return this.queryForHtmlElement(`[ref="${e}"]`)}};ys.EVENT_DISPLAYED_CHANGED="displayedChanged",g([he("agStackComponentsRegistry")],ys.prototype,"agStackComponentsRegistry",2),g([oe],ys.prototype,"preConstructOnComponent",1),g([oe],ys.prototype,"createChildComponentsPreConstruct",1);var Cs=ys;function bs(e){return ws.bind(this,e,void 0)}function Ss(e){return ws.bind(this,`[ref=${e}]`,e)}function ws(e,t,i,n,s){null!==e?"number"!=typeof s?function(e,t,i){const n=function(e,t){return e.__agComponentMetaData||(e.__agComponentMetaData={}),e.__agComponentMetaData[t]||(e.__agComponentMetaData[t]={}),e.__agComponentMetaData[t]}(e,W(e.constructor));n[t]||(n[t]=[]),n[t].push(i)}(i,"querySelectors",{attributeName:n,querySelector:e,refSelector:t}):console.error("AG Grid: QuerySelector should be on an attribute"):console.error("AG Grid: QuerySelector selector should not be null")}var xs=class extends Cs{constructor(){super('\n            <div class="ag-floating-filter-input" role="presentation">\n                <ag-input-text-field ref="eFloatingFilterText"></ag-input-text-field>\n            </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){null!=e?this.params.parentFilterInstance(t=>{if(t.getModelAsString){const i=t.getModelAsString(e);this.eFloatingFilterText.setValue(i)}}):this.eFloatingFilterText.setValue("")}onParamsUpdated(e){this.refresh(e)}refresh(e){this.init(e)}};g([Ss("eFloatingFilterText")],xs.prototype,"eFloatingFilterText",2),g([he("columnModel")],xs.prototype,"columnModel",2);var Es=class{constructor(e,t,i,n,s){this.alive=!0,this.context=e,this.eParent=n,t.getDateCompDetails(i).newAgStackInstance().then(t=>{this.alive?(this.dateComp=t,t&&(n.appendChild(t.getGui()),t.afterGuiAttached&&t.afterGuiAttached(),this.tempValue&&t.setDate(this.tempValue),null!=this.disabled&&this.setDateCompDisabled(this.disabled),null==s||s(this))):e.destroyBean(t)})}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){on(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&&"function"==typeof this.dateComp.afterGuiAttached&&this.dateComp.afterGuiAttached(e)}updateParams(e){var t,i;let n=!1;(null==(t=this.dateComp)?void 0:t.refresh)&&"function"==typeof this.dateComp.refresh&&null!==this.dateComp.refresh(e)&&(n=!0),!n&&(null==(i=this.dateComp)?void 0:i.onParamsUpdated)&&"function"==typeof this.dateComp.onParamsUpdated&&null!==this.dateComp.onParamsUpdated(e)&&z("Custom date component method 'onParamsUpdated' is deprecated. Use 'refresh' instead.")}setDateCompDisabled(e){null!=this.dateComp&&null!=this.dateComp.setDisabled&&this.dateComp.setDisabled(e)}},Ms=class{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=>{"string"!=typeof e&&([["displayKey"],["displayName"],["predicate","test"]].every(t=>!!t.some(t=>null!=e[t])||(console.warn(`AG Grid: ignoring FilterOptionDef as it doesn't contain one of '${t}'`),!1))?this.customFilterOptions[e.displayKey]=e:this.filterOptions=this.filterOptions.filter(t=>t===e)||[])})}selectDefaultItem(e){if(e.defaultOption)this.defaultOption=e.defaultOption;else if(this.filterOptions.length>=1){const e=this.filterOptions[0];"string"==typeof e?this.defaultOption=e:e.displayKey?this.defaultOption=e.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]}},As={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",orCondition:"OR",dateFormatOoo:"yyyy-mm-dd"},Ts=class e extends nt{constructor(e,t={}){super(),this.eFocusableElement=e,this.callbacks=t,this.callbacks=d({shouldStopEventPropagation:()=>!1,onTabKeyDown:e=>{if(e.defaultPrevented)return;const t=this.focusService.findNextFocusableElement(this.eFocusableElement,!1,e.shiftKey);t&&(t.focus(),e.preventDefault())}},t)}postConstruct(){this.eFocusableElement.classList.add(e.FOCUS_MANAGED_CLASS),this.addKeyDownListeners(this.eFocusableElement),this.callbacks.onFocusIn&&this.addManagedListener(this.eFocusableElement,"focusin",this.callbacks.onFocusIn),this.callbacks.onFocusOut&&this.addManagedListener(this.eFocusableElement,"focusout",this.callbacks.onFocusOut)}addKeyDownListeners(e){this.addManagedListener(e,"keydown",e=>{e.defaultPrevented||qe(e)||(this.callbacks.shouldStopEventPropagation(e)?Ye(e):e.key===Xn.TAB?this.callbacks.onTabKeyDown(e):this.callbacks.handleKeyDown&&this.callbacks.handleKeyDown(e))})}};Ts.FOCUS_MANAGED_CLASS="ag-focus-managed",g([he("focusService")],Ts.prototype,"focusService",2),g([ae],Ts.prototype,"postConstruct",1);var Ds=Ts,Is="ag-resizer-wrapper",Rs=`<div class="${Is}">\n        <div ref="eTopLeftResizer" class="ag-resizer ag-resizer-topLeft"></div>\n        <div ref="eTopResizer" class="ag-resizer ag-resizer-top"></div>\n        <div ref="eTopRightResizer" class="ag-resizer ag-resizer-topRight"></div>\n        <div ref="eRightResizer" class="ag-resizer ag-resizer-right"></div>\n        <div ref="eBottomRightResizer" class="ag-resizer ag-resizer-bottomRight"></div>\n        <div ref="eBottomResizer" class="ag-resizer ag-resizer-bottom"></div>\n        <div ref="eBottomLeftResizer" class="ag-resizer ag-resizer-bottomLeft"></div>\n        <div ref="eLeftResizer" class="ag-resizer ag-resizer-left"></div>\n    </div>`,Ls=class extends nt{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:s,height:r,x:o,y:a}=this.config;this.offsetParent||this.setOffsetParent();let l=0,c=0;const h=wn(this.element);if(h){const e=this.findBoundaryElement(),t=window.getComputedStyle(e);if(null!=t.minWidth){const i=e.offsetWidth-this.element.offsetWidth;c=parseInt(t.minWidth,10)-i}if(null!=t.minHeight){const i=e.offsetHeight-this.element.offsetHeight;l=parseInt(t.minHeight,10)-i}}if(this.minHeight=s||l,this.minWidth=i||c,n&&this.setWidth(n),r&&this.setHeight(r),n&&r||this.refreshSize(),e)this.center();else if(o||a)this.offsetElement(o,a);else if(h&&t){let e=this.boundaryEl,t=!0;if(e||(e=this.findBoundaryElement(),t=!1),e){const i=parseFloat(e.style.top),n=parseFloat(e.style.left);t?this.offsetElement(isNaN(n)?0:n,isNaN(i)?0:i):this.setPosition(n,i)}}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(),"boolean"==typeof e){if(!1===e)return;e={topLeft:e,top:e,topRight:e,right:e,bottomRight:e,bottom:e,bottomLeft:e,left:e}}Object.keys(e).forEach(t=>{const i=!!e[t],n=this.getResizerElement(t),s={dragStartPixels:0,eElement:n,onDragStart:e=>this.onResizeStart(e,t),onDragging:this.onResize.bind(this),onDragStop:e=>this.onResizeEnd(e,t)};(i||!this.isAlive()&&!i)&&(i?(this.dragService.addDragSource(s),this.resizeListeners.push(s),n.style.pointerEvents="all"):n.style.pointerEvents="none",this.resizable[t]=i)})}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;-1!==t&&(this.element.style.width=`${t}px`),-1!==e&&(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("string"==typeof e&&-1!==e.indexOf("%"))Pn(i,e),e=pn(i),n=!0;else if(e=Math.max(this.minHeight,e),this.positioned){const t=this.getAvailableHeight();t&&e>t&&(e=t)}this.getHeight()!==e&&(n?(i.style.maxHeight="unset",i.style.minHeight="unset"):t?Pn(i,e):(i.style.height=`${e}px`,i.style.flex="0 0 auto",this.lastSize.height="number"==typeof e?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(),s=this.offsetParent.getBoundingClientRect(),r=e?this.position.y:n.top,o=e?0:s.top;let a=0;if(t){const e=this.element.parentElement;if(e){const{bottom:t}=e.getBoundingClientRect();a=t-n.bottom}}return i+o-r-a}getWidth(){return this.element.offsetWidth}setWidth(e){const t=this.element,{popup:i}=this.config;let n=!1;if("string"==typeof e&&-1!==e.indexOf("%"))Ln(t,e),e=gn(t),n=!0;else if(this.positioned){e=Math.max(this.minWidth,e);const{clientWidth:t}=this.offsetParent,n=i?this.position.x:this.element.getBoundingClientRect().left;t&&e+n>t&&(e=t-n)}this.getWidth()!==e&&(n?(t.style.maxWidth="unset",t.style.minWidth="unset"):this.config.popup?Ln(t,e):(t.style.width=`${e}px`,t.style.flex=" unset",this.lastSize.width="number"==typeof e?e:parseFloat(e)))}offsetElement(e=0,t=0){const{forcePopupParentAsOffsetParent:i}=this.config,n=i?this.boundaryEl:this.element;n&&(this.popupService.positionPopup({ePopup:n,keepWithinBounds:!0,skipObserver:this.movable||this.isResizable(),updatePosition:()=>({x:e,y:t})}),this.setPosition(parseFloat(n.style.left),parseFloat(n.style.top)))}constrainSizeToAvailableHeight(e){if(!this.config.forcePopupParentAsOffsetParent)return;e?this.resizeObserverSubscriber=this.resizeObserverService.observeResize(this.popupService.getPopupParent(),()=>{const e=this.getAvailableHeight();this.element.style.setProperty("max-height",`${e}px`)}):(this.element.style.removeProperty("max-height"),this.resizeObserverSubscriber&&(this.resizeObserverSubscriber(),this.resizeObserverSubscriber=void 0))}setPosition(e,t){this.position.x=e,this.position.y=t}updateDragStartPosition(e,t){this.dragStartPosition={x:e,y:t}}calculateMouseMovement(e){const{e:t,isLeft:i,isTop:n,anywhereWithin:s,topBuffer:r}=e,o=t.clientX-this.dragStartPosition.x,a=t.clientY-this.dragStartPosition.y;return{movementX:this.shouldSkipX(t,!!i,!!s,o)?0:o,movementY:this.shouldSkipY(t,!!n,r,a)?0:a}}shouldSkipX(e,t,i,n){const s=this.element.getBoundingClientRect(),r=this.offsetParent.getBoundingClientRect(),o=this.boundaryEl.getBoundingClientRect(),a=this.config.popup?this.position.x:s.left;let l=a<=0&&r.left>=e.clientX||r.right<=e.clientX&&r.right<=o.right;return!!l||(l=t?n<0&&e.clientX>a+r.left||n>0&&e.clientX<a+r.left:i?n<0&&e.clientX>o.right||n>0&&e.clientX<a+r.left:n<0&&e.clientX>o.right||n>0&&e.clientX<o.right,l)}shouldSkipY(e,t,i=0,n){const s=this.element.getBoundingClientRect(),r=this.offsetParent.getBoundingClientRect(),o=this.boundaryEl.getBoundingClientRect(),a=this.config.popup?this.position.y:s.top;let l=a<=0&&r.top>=e.clientY||r.bottom<=e.clientY&&r.bottom<=o.bottom;return!!l||(l=t?n<0&&e.clientY>a+r.top+i||n>0&&e.clientY<a+r.top:n<0&&e.clientY>o.bottom||n>0&&e.clientY<o.bottom,l)}createResizeMap(){const e=this.element;this.resizerMap={topLeft:{element:e.querySelector("[ref=eTopLeftResizer]")},top:{element:e.querySelector("[ref=eTopResizer]")},topRight:{element:e.querySelector("[ref=eTopRightResizer]")},right:{element:e.querySelector("[ref=eRightResizer]")},bottomRight:{element:e.querySelector("[ref=eBottomRightResizer]")},bottom:{element:e.querySelector("[ref=eBottomResizer]")},bottomLeft:{element:e.querySelector("[ref=eBottomLeftResizer]")},left:{element:e.querySelector("[ref=eLeftResizer]")}}}addResizers(){if(this.resizersAdded)return;const e=this.element;if(!e)return;const t=(new DOMParser).parseFromString(Rs,"text/html").body;e.appendChild(t.firstChild),this.createResizeMap(),this.resizersAdded=!0}removeResizers(){this.resizerMap=void 0;const e=this.element.querySelector(`.${Is}`);e&&this.element.removeChild(e),this.resizersAdded=!1}getResizerElement(e){return this.resizerMap[e].element}onResizeStart(e,t){this.boundaryEl=this.findBoundaryElement(),this.positioned||this.initialisePosition(),this.currentResizer={isTop:!!t.match(/top/i),isRight:!!t.match(/right/i),isBottom:!!t.match(/bottom/i),isLeft:!!t.match(/left/i)},this.element.classList.add("ag-resizing"),this.resizerMap[t].element.classList.add("ag-active");const{popup:i,forcePopupParentAsOffsetParent:n}=this.config;i||n||this.applySizeToSiblings(this.currentResizer.isBottom||this.currentResizer.isTop),this.isResizing=!0,this.updateDragStartPosition(e.clientX,e.clientY)}getSiblings(){const e=this.element.parentElement;return e?Array.prototype.slice.call(e.children).filter(e=>!e.classList.contains("ag-hidden")):null}getMinSizeOfSiblings(){const e=this.getSiblings()||[];let t=0,i=0;for(let n=0;n<e.length;n++){const s=e[n],r=!!s.style.flex&&"0 0 auto"!==s.style.flex;if(s===this.element)continue;let o=this.minHeight||0,a=this.minWidth||0;if(r){const e=window.getComputedStyle(s);e.minHeight&&(o=parseInt(e.minHeight,10)),e.minWidth&&(a=parseInt(e.minWidth,10))}else o=s.offsetHeight,a=s.offsetWidth;t+=o,i+=a}return{height:t,width:i}}applySizeToSiblings(e){let t=null;const i=this.getSiblings();if(i){for(let n=0;n<i.length;n++){const s=i[n];s!==t&&(e?s.style.height=`${s.offsetHeight}px`:s.style.width=`${s.offsetWidth}px`,s.style.flex="0 0 auto",s===this.element&&(t=i[n+1]))}t&&(t.style.removeProperty("height"),t.style.removeProperty("min-height"),t.style.removeProperty("max-height"),t.style.flex="1 1 auto")}}isResizable(){return Object.values(this.resizable).some(e=>e)}onResize(e){if(!this.isResizing||!this.currentResizer)return;const{popup:t,forcePopupParentAsOffsetParent:i}=this.config,{isTop:n,isRight:s,isBottom:r,isLeft:o}=this.currentResizer,a=s||o,l=r||n,{movementX:c,movementY:h}=this.calculateMouseMovement({e,isLeft:o,isTop:n}),d=this.position.x,u=this.position.y;let p=0,g=0;if(a&&c){const e=o?-1:1,t=this.getWidth(),i=t+c*e;let n=!1;o&&(p=t-i,(d+p<=0||i<=this.minWidth)&&(n=!0,p=0)),n||this.setWidth(i)}if(l&&h){const e=n?-1:1,t=this.getHeight(),i=t+h*e;let s=!1;n?(g=t-i,(u+g<=0||i<=this.minHeight)&&(s=!0,g=0)):!this.config.popup&&!this.config.forcePopupParentAsOffsetParent&&t<i&&this.getMinSizeOfSiblings().height+i>this.element.parentElement.offsetHeight&&(s=!0),s||this.setHeight(i)}this.updateDragStartPosition(e.clientX,e.clientY),((t||i)&&p||g)&&this.offsetElement(d+p,u+g)}onResizeEnd(e,t){this.isResizing=!1,this.currentResizer=null,this.boundaryEl=null,this.element.classList.remove("ag-resizing"),this.resizerMap[t].element.classList.remove("ag-active"),this.dispatchEvent({type:"resize"})}refreshSize(){const e=this.element;this.config.popup&&(this.config.width||this.setWidth(e.offsetWidth),this.config.height||this.setHeight(e.offsetHeight))}onMoveStart(e){this.boundaryEl=this.findBoundaryElement(),this.positioned||this.initialisePosition(),this.isMoving=!0,this.element.classList.add("ag-moving"),this.updateDragStartPosition(e.clientX,e.clientY)}onMove(e){if(!this.isMoving)return;const{x:t,y:i}=this.position;let n;this.config.calculateTopBuffer&&(n=this.config.calculateTopBuffer());const{movementX:s,movementY:r}=this.calculateMouseMovement({e,isTop:!0,anywhereWithin:!0,topBuffer:n});this.offsetElement(t+s,i+r),this.updateDragStartPosition(e.clientX,e.clientY)}onMoveEnd(){this.isMoving=!1,this.boundaryEl=null,this.element.classList.remove("ag-moving")}setOffsetParent(){this.config.forcePopupParentAsOffsetParent?this.offsetParent=this.popupService.getPopupParent():this.offsetParent=this.element.offsetParent}findBoundaryElement(){let e=this.element;for(;e;){if("static"!==window.getComputedStyle(e).position)return e;e=e.parentElement}return this.element}clearResizeListeners(){for(;this.resizeListeners.length;){const e=this.resizeListeners.pop();this.dragService.removeDragSource(e)}}destroy(){super.destroy(),this.moveElementDragListener&&this.dragService.removeDragSource(this.moveElementDragListener),this.constrainSizeToAvailableHeight(!1),this.clearResizeListeners(),this.removeResizers()}};g([he("popupService")],Ls.prototype,"popupService",2),g([he("resizeObserverService")],Ls.prototype,"resizeObserverService",2),g([he("dragService")],Ls.prototype,"dragService",2);var ks=class e extends Cs{constructor(e){super(),this.filterNameKey=e,this.applyActive=!1,this.hidePopup=null,this.debouncePending=!1,this.appliedModel=null,this.buttonListeners=[]}postConstruct(){this.resetTemplate(),this.createManagedBean(new Ds(this.getFocusableElement(),{handleKeyDown:this.handleKeyDown.bind(this)})),this.positionableFeature=new Ls(this.getPositionableElement(),{forcePopupParentAsOffsetParent:!0}),this.createBean(this.positionableFeature)}handleKeyDown(e){}getFilterTitle(){return this.translate(this.filterNameKey)}isFilterActive(){return!!this.appliedModel}resetTemplate(e){let t=this.getGui();t&&t.removeEventListener("submit",this.onFormSubmit);const i=`\n            <form class="ag-filter-wrapper">\n                <div class="ag-filter-body-wrapper ag-${this.getCssIdentifier()}-body-wrapper" ref="eFilterBody">\n                    ${this.createBodyTemplate()}\n                </div>\n            </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(t){this.providedFilterParams=t,this.applyActive=e.isUseApplyButton(t),this.resetButtonsPanel()}updateParams(t){this.providedFilterParams=t,this.applyActive=e.isUseApplyButton(t),this.resetUiToActiveModel(this.getModel(),()=>{this.updateUiVisibility(),this.setupOnBtApplyDebounce()})}resetButtonsPanel(){const{buttons:e}=this.providedFilterParams,t=e&&e.length>0&&!this.isReadOnly();if(this.eButtonsPanel?(Cn(this.eButtonsPanel),this.buttonListeners.forEach(e=>null==e?void 0:e()),this.buttonListeners=[]):t&&(this.eButtonsPanel=document.createElement("div"),this.eButtonsPanel.classList.add("ag-filter-apply-panel")),!t)return void(this.eButtonsPanel&&bn(this.eButtonsPanel));const i=document.createDocumentFragment(),n=e=>{let t,n;switch(e){case"apply":t=this.translate("applyFilter"),n=e=>this.onBtApply(!1,!1,e);break;case"clear":t=this.translate("clearFilter"),n=()=>this.onBtClear();break;case"reset":t=this.translate("resetFilter"),n=()=>this.onBtReset();break;case"cancel":t=this.translate("cancelFilter"),n=e=>{this.onBtCancel(e)};break;default:return void console.warn("AG Grid: Unknown button type specified")}const s=xn(`<button\n                    type="${"apply"===e?"submit":"button"}"\n                    ref="${e}FilterButton"\n                    class="ag-button ag-standard-button ag-filter-apply-panel-button"\n                >${t}\n                </button>`);this.buttonListeners.push(this.addManagedListener(s,"click",n)),i.append(s)};as(e).forEach(e=>n(e)),this.eButtonsPanel.append(i),this.getGui().appendChild(this.eButtonsPanel)}getDefaultDebounceMs(){return 0}setupOnBtApplyDebounce(){const t=e.getDebounceMs(this.providedFilterParams,this.getDefaultDebounceMs()),i=Z(this.checkApplyDebounce.bind(this),t);this.onBtApplyDebounce=()=>{this.debouncePending=!0,i()}}checkApplyDebounce(){this.debouncePending&&(this.debouncePending=!1,this.onBtApply())}getModel(){return this.appliedModel?this.appliedModel:null}setModel(e){return(null!=e?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"),null==t||t()};null!=e?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 i="columnFilter";this.providedFilterParams.filterChangedCallback({afterFloatingFilter:e,afterDataChange:t,source:i})}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;"Enter"!==i&&"Space"!==i||(n={keyboardEvent:t}),this.hidePopup(n),this.hidePopup=null}onUiChanged(e=!1,t){if(this.updateUiVisibility(),this.providedFilterParams.filterModifiedCallback(),this.applyActive&&!this.isReadOnly()){const e=this.isModelValid(this.getModelFromUi()),t=this.getRefElement("applyFilterButton");t&&ln(t,!e)}e&&!t||"immediately"===t?this.onBtApply(e):(this.applyActive||t)&&"debounce"!==t||this.onBtApplyDebounce()}afterGuiAttached(e){e&&(this.hidePopup=e.hidePopup),this.refreshFilterResizer(null==e?void 0:e.container)}refreshFilterResizer(e){if(!this.positionableFeature||"toolPanel"===e)return;const t="floatingFilter"===e||"columnFilter"===e,{positionableFeature:i,gos: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(t,i){return e.isUseApplyButton(t)?(null!=t.debounceMs&&console.warn("AG Grid: debounceMs is ignored when apply button is present"),0):null!=t.debounceMs?t.debounceMs:i}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,As[e])}getCellValue(e){return this.providedFilterParams.getValue(e)}getPositionableElement(){return this.eFilterBody}};g([he("rowModel")],ks.prototype,"rowModel",2),g([Ss("eFilterBody")],ks.prototype,"eFilterBody",2),g([ae],ks.prototype,"postConstruct",1);var Ps=ks,Ns=class extends Cs{constructor(e,t){super(t),this.labelSeparator="",this.labelAlignment="left",this.disabled=!1,this.label="",this.config=e||{}}postConstruct(){this.addCssClass("ag-labeled"),this.eLabel.classList.add("ag-label");const{labelSeparator:e,label:t,labelWidth:i,labelAlignment:n,disabled:s}=this.config;null!=s&&this.setDisabled(s),null!=e&&this.setLabelSeparator(e),null!=t&&this.setLabel(t),null!=i&&this.setLabelWidth(i),this.setLabelAlignment(n||this.labelAlignment),this.refreshLabel()}refreshLabel(){Cn(this.eLabel),"string"==typeof this.label?this.eLabel.innerText=this.label+this.labelSeparator:this.label&&this.eLabel.appendChild(this.label),""===this.label?(on(this.eLabel,!1),Bt(this.eLabel,"presentation")):(on(this.eLabel,!0),Bt(this.eLabel,null))}setLabelSeparator(e){return this.labelSeparator===e||(this.labelSeparator=e,null!=this.label&&this.refreshLabel()),this}getLabelId(){return this.eLabel.id=this.eLabel.id||`ag-${this.getCompId()}-label`,this.eLabel.id}getLabel(){return this.label}setLabel(e){return this.label===e||(this.label=e,this.refreshLabel()),this}setLabelAlignment(e){const t=this.getGui().classList;return t.toggle("ag-label-align-left","left"===e),t.toggle("ag-label-align-right","right"===e),t.toggle("ag-label-align-top","top"===e),this}setLabelEllipsis(e){return this.eLabel.classList.toggle("ag-label-ellipsis",e),this}setLabelWidth(e){return null==this.label||Rn(this.eLabel,e),this}setDisabled(e){e=!!e;const t=this.getGui();return ln(t,e),t.classList.toggle("ag-disabled",e),this.disabled=e,this}isDisabled(){return!!this.disabled}};g([ae],Ns.prototype,"postConstruct",1);var Os=class extends Ns{constructor(e,t,i){super(e,t),this.className=i}postConstruct(){super.postConstruct();const{width:e,value:t,onValueChange:i}=this.config;null!=e&&this.setWidth(e),null!=t&&this.setValue(t),null!=i&&this.onValueChange(i),this.className&&this.addCssClass(this.className),this.refreshAriaLabelledBy()}refreshAriaLabelledBy(){const e=this.getAriaElement(),t=this.getLabelId();null!==Wt(e)?Kt(e,""):Kt(e,null!=t?t:"")}setAriaLabel(e){return jt(this.getAriaElement(),e),this.refreshAriaLabelledBy(),this}onValueChange(e){return this.addManagedListener(this,lt.EVENT_FIELD_VALUE_CHANGED,()=>e(this.getValue())),this}getWidth(){return this.getGui().clientWidth}setWidth(e){return Ln(this.getGui(),e),this}getPreviousValue(){return this.previousValue}getValue(){return this.value}setValue(e,t){return this.value===e||(this.previousValue=this.value,this.value=e,t||this.dispatchEvent({type:lt.EVENT_FIELD_VALUE_CHANGED})),this}},_s=class extends Os{constructor(e){if(super(e,(null==e?void 0:e.template)||'\n    <div class="ag-picker-field" role="presentation">\n        <div ref="eLabel"></div>\n            <div ref="eWrapper" class="ag-wrapper ag-picker-field-wrapper ag-picker-collapsed">\n            <div ref="eDisplayField" class="ag-picker-field-display"></div>\n            <div ref="eIcon" class="ag-picker-field-icon" aria-hidden="true"></div>\n        </div>\n    </div>',null==e?void 0:e.className),this.isPickerDisplayed=!1,this.skipClick=!1,this.pickerGap=4,this.hideCurrentPicker=null,this.ariaRole=null==e?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:s,maxPickerWidth:r}=e;null!=t&&(this.pickerGap=t),this.variableWidth=!!n,null!=i&&this.setPickerMaxHeight(i),null!=s&&this.setPickerMinWidth(s),null!=r&&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,inputWidth:n}=this.config;if(i){const e=Yn(i,this.gos);e&&this.eIcon.appendChild(e)}null!=n&&this.setInputWidth(n)}setupAria(){const e=this.getAriaElement();e.setAttribute("tabindex",this.gos.get("tabIndex").toString()),ti(e,!1),this.ariaRole&&Bt(e,this.ariaRole)}onLabelOrWrapperMouseDown(e){if(e){const t=this.getFocusableElement();if(t!==this.eWrapper&&(null==e?void 0:e.target)===t)return;e.preventDefault(),this.getFocusableElement().focus()}this.skipClick?this.skipClick=!1:this.isDisabled()||(this.isPickerDisplayed?this.hidePicker():this.showPicker())}onKeyDown(e){switch(e.key){case Xn.UP:case Xn.DOWN:case Xn.ENTER:case Xn.SPACE:e.preventDefault(),this.onLabelOrWrapperMouseDown();break;case Xn.ESCAPE:this.isPickerDisplayed&&(e.preventDefault(),e.stopPropagation(),this.hideCurrentPicker&&this.hideCurrentPicker())}}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.gos.getDocument(),t=this.pickerComponent.getGui();this.gos.get("suppressScrollWhenPopupsAreOpen")||(this.destroyMouseWheelFunc=this.addManagedListener(this.eventService,lt.EVENT_BODY_SCROLL,()=>{this.hidePicker()}));const i=this.localeService.getLocaleTextFunc(),{pickerAriaLabelKey:n,pickerAriaLabelValue:s,modalPicker:r=!0}=this.config,o={modal:r,eChild:t,closeOnEsc:!0,closedCallback:()=>{const t=this.gos.getActiveDomElement(),i=!t||t===e.body;this.beforeHidePicker(),i&&this.isAlive()&&this.getFocusableElement().focus()},ariaLabel:i(n,s)},a=this.popupService.addPopup(o),{maxPickerHeight:l,minPickerWidth:c,maxPickerWidth:h,variableWidth:d}=this;d?(c&&(t.style.minWidth=c),t.style.width=Nn(gn(this.eWrapper)),h&&(t.style.maxWidth=h)):Rn(t,null!=h?h:gn(this.eWrapper));const u=null!=l?l:`${dn(this.popupService.getPopupParent())}px`;return t.style.setProperty("max-height",u),t.style.position="absolute",this.alignPickerToComponent(),a.hideFunc}alignPickerToComponent(){if(!this.pickerComponent)return;const{pickerType:e}=this.config,{pickerGap:t}=this,i=this.gos.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){this.isAlive()&&(ti(this.getAriaElement(),e),this.eWrapper.classList.toggle("ag-picker-expanded",e),this.eWrapper.classList.toggle("ag-picker-collapsed",!e))}onPickerFocusIn(){this.togglePickerHasFocus(!0)}onPickerFocusOut(e){var t;(null==(t=this.pickerComponent)?void 0:t.getGui().contains(e.relatedTarget))||this.togglePickerHasFocus(!1)}togglePickerHasFocus(e){this.pickerComponent&&this.eWrapper.classList.toggle("ag-picker-has-focus",e)}hidePicker(){this.hideCurrentPicker&&this.hideCurrentPicker()}setInputWidth(e){return Rn(this.eWrapper,e),this}getFocusableElement(){return this.eWrapper}setPickerGap(e){return this.pickerGap=e,this}setPickerMinWidth(e){return"number"==typeof e&&(e=`${e}px`),this.minPickerWidth=null==e?void 0:e,this}setPickerMaxWidth(e){return"number"==typeof e&&(e=`${e}px`),this.maxPickerWidth=null==e?void 0:e,this}setPickerMaxHeight(e){return"number"==typeof e&&(e=`${e}px`),this.maxPickerHeight=null==e?void 0:e,this}destroy(){this.hidePicker(),super.destroy()}};g([he("popupService")],_s.prototype,"popupService",2),g([Ss("eLabel")],_s.prototype,"eLabel",2),g([Ss("eWrapper")],_s.prototype,"eWrapper",2),g([Ss("eDisplayField")],_s.prototype,"eDisplayField",2),g([Ss("eIcon")],_s.prototype,"eIcon",2);var Fs=class e extends Cs{constructor(e="default",t=!1){super(`<div class="ag-list ag-${e}-list" role="listbox"></div>`),this.cssIdentifier=e,this.unFocusable=t,this.options=[],this.itemEls=[]}init(){const e=this.getGui();this.addManagedListener(e,"mouseleave",()=>this.clearHighlighted()),this.unFocusable||this.addManagedListener(e,"keydown",this.handleKeyDown.bind(this))}handleKeyDown(e){const t=e.key;switch(t){case Xn.ENTER:if(this.highlightedEl){const e=this.itemEls.indexOf(this.highlightedEl);this.setValueByIndex(e)}else this.setValue(this.getValue());break;case Xn.DOWN:case Xn.UP:e.preventDefault(),this.navigate(t);break;case Xn.PAGE_DOWN:case Xn.PAGE_UP:case Xn.PAGE_HOME:case Xn.PAGE_END:e.preventDefault(),this.navigateToPage(t)}}navigate(e){const t=e===Xn.DOWN;let i;if(this.highlightedEl){let e=this.itemEls.indexOf(this.highlightedEl)+(t?1:-1);e=Math.min(Math.max(e,0),this.itemEls.length-1),i=this.itemEls[e]}else i=this.itemEls[t?0:this.itemEls.length-1];this.highlightItem(i)}navigateToPage(e){if(!this.highlightedEl||0===this.itemEls.length)return;const t=this.itemEls.indexOf(this.highlightedEl),i=this.options.length-1,n=this.itemEls[0].clientHeight,s=Math.floor(this.getGui().clientHeight/n);let r=-1;e===Xn.PAGE_HOME?r=0:e===Xn.PAGE_END?r=i:e===Xn.PAGE_DOWN?r=Math.min(t+s,i):e===Xn.PAGE_UP&&(r=Math.max(t-s,0)),-1!==r&&this.highlightItem(this.itemEls[r])}addOptions(e){return e.forEach(e=>this.addOption(e)),this}addOption(e){const{value:t,text:i}=e,n=i||t;return this.options.push({value:t,text:n}),this.renderOption(t,n),this.updateIndices(),this}clearOptions(){this.options=[],this.reset(!0),this.itemEls.forEach(e=>{bn(e)}),this.itemEls=[]}updateIndices(){const e=this.getGui().querySelectorAll(".ag-list-item");e.forEach((t,i)=>{si(t,i+1),ni(t,e.length)})}renderOption(e,t){const i=this.gos.getDocument(),n=i.createElement("div");Bt(n,"option"),n.classList.add("ag-list-item",`ag-${this.cssIdentifier}-list-item`);const s=i.createElement("span");n.appendChild(s),s.textContent=t,this.unFocusable||(n.tabIndex=-1),this.itemEls.push(n),this.addManagedListener(n,"mousemove",()=>this.highlightItem(n)),this.addManagedListener(n,"mousedown",t=>{t.preventDefault(),this.setValue(e)}),this.createManagedBean(new ms({getTooltipValue:()=>t,getGui:()=>n,getLocation:()=>"UNKNOWN",shouldDisplayTooltip:()=>s.scrollWidth>s.clientWidth})),this.getGui().appendChild(n)}setValue(e,t){if(this.value===e)return this.fireItemSelected(),this;if(null==e)return this.reset(t),this;const i=this.options.findIndex(t=>t.value===e);if(-1!==i){const e=this.options[i];this.value=e.value,this.displayValue=e.text,this.highlightItem(this.itemEls[i]),t||this.fireChangeEvent()}return this}setValueByIndex(e){return this.setValue(this.options[e].value)}getValue(){return this.value}getDisplayValue(){return this.displayValue}refreshHighlighted(){this.clearHighlighted();const e=this.options.findIndex(e=>e.value===this.value);-1!==e&&this.highlightItem(this.itemEls[e])}reset(e){this.value=null,this.displayValue=null,this.clearHighlighted(),e||this.fireChangeEvent()}highlightItem(t){if(!wn(t))return;this.clearHighlighted(),this.highlightedEl=t,this.highlightedEl.classList.add(e.ACTIVE_CLASS),pi(this.highlightedEl,!0);const i=this.getGui(),{scrollTop:n,clientHeight:s}=i,{offsetTop:r,offsetHeight:o}=t;(r+o>n+s||r<n)&&this.highlightedEl.scrollIntoView({block:"nearest"}),this.unFocusable||this.highlightedEl.focus()}clearHighlighted(){this.highlightedEl&&wn(this.highlightedEl)&&(this.highlightedEl.classList.remove(e.ACTIVE_CLASS),pi(this.highlightedEl,!1),this.highlightedEl=null)}fireChangeEvent(){this.dispatchEvent({type:lt.EVENT_FIELD_VALUE_CHANGED}),this.fireItemSelected()}fireItemSelected(){this.dispatchEvent({type:e.EVENT_ITEM_SELECTED})}};Fs.EVENT_ITEM_SELECTED="selectedItem",Fs.ACTIVE_CLASS="ag-active-item",g([ae],Fs.prototype,"init",1);var Gs=Fs,Vs=class e extends _s{constructor(e){super(d({pickerAriaLabelKey:"ariaLabelSelectField",pickerAriaLabelValue:"Select Field",pickerType:"ag-list",className:"ag-select",pickerIcon:"smallDown",ariaRole:"combobox"},e))}postConstruct(){super.postConstruct(),this.createListComponent(),this.eWrapper.tabIndex=this.gos.get("tabIndex");const{options:e,value:t,placeholder:i}=this.config;null!=e&&this.addOptions(e),null!=t&&this.setValue(t,!0),i&&null==t&&(this.eDisplayField.textContent=i),this.addManagedListener(this.eWrapper,"focusout",this.onWrapperFocusOut.bind(this))}onWrapperFocusOut(e){this.eWrapper.contains(e.relatedTarget)||this.hidePicker()}createListComponent(){this.listComponent=this.createBean(new Gs("select",!0)),this.listComponent.setParentComponent(this);const t=this.listComponent.getAriaElement(),i=`ag-select-list-${this.listComponent.getCompId()}`;t.setAttribute("id",i),fi(this.getAriaElement(),t),this.listComponent.addManagedListener(this.listComponent,Gs.EVENT_ITEM_SELECTED,()=>{this.hidePicker(),this.dispatchEvent({type:e.EVENT_ITEM_SELECTED})}),this.listComponent.addManagedListener(this.listComponent,lt.EVENT_FIELD_VALUE_CHANGED,()=>{this.listComponent&&(this.setValue(this.listComponent.getValue(),!1,!0),this.hidePicker())})}createPickerComponent(){return this.listComponent}onKeyDown(e){var t;const{key:i}=e;switch(i===Xn.TAB&&this.hidePicker(),i){case Xn.ENTER:case Xn.UP:case Xn.DOWN:case Xn.PAGE_UP:case Xn.PAGE_DOWN:case Xn.PAGE_HOME:case Xn.PAGE_END:e.preventDefault(),this.isPickerDisplayed?null==(t=this.listComponent)||t.handleKeyDown(e):super.onKeyDown(e);break;case Xn.ESCAPE:super.onKeyDown(e)}}showPicker(){this.listComponent&&(super.showPicker(),this.listComponent.refreshHighlighted())}addOptions(e){return e.forEach(e=>this.addOption(e)),this}addOption(e){return this.listComponent.addOption(e),this}clearOptions(){var e;return null==(e=this.listComponent)||e.clearOptions(),this}setValue(e,t,i){if(this.value===e||!this.listComponent)return this;if(i||this.listComponent.setValue(e,!0),this.listComponent.getValue()===this.getValue())return this;let n=this.listComponent.getDisplayValue();return null==n&&this.config.placeholder&&(n=this.config.placeholder),this.eDisplayField.textContent=n,this.setTooltip({newTooltipText:null!=n?n:null,shouldDisplayTooltip:()=>this.eDisplayField.scrollWidth>this.eDisplayField.clientWidth}),super.setValue(e,t)}destroy(){this.listComponent&&(this.destroyBean(this.listComponent),this.listComponent=void 0),super.destroy()}};Vs.EVENT_ITEM_SELECTED="selectedItem";var Bs=Vs,Hs=class extends Os{constructor(e,t,i="text",n="input"){super(e,`\n            <div role="presentation">\n                <div ref="eLabel" class="ag-input-field-label"></div>\n                <div ref="eWrapper" class="ag-wrapper ag-input-wrapper" role="presentation">\n                    <${n} ref="eInput" class="ag-input-field-input"></${n}>\n                </div>\n            </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{inputName:e,inputWidth:t}=this.config;null!=e&&this.setInputName(e),null!=t&&this.setInputWidth(t),this.addInputListeners(),this.activateTabIndex([this.eInput])}addInputListeners(){this.addManagedListener(this.eInput,"input",e=>this.setValue(e.target.value))}setInputType(){"input"===this.displayFieldTag&&this.eInput.setAttribute("type",this.inputType)}getInputElement(){return this.eInput}setInputWidth(e){return Rn(this.eWrapper,e),this}setInputName(e){return this.getInputElement().setAttribute("name",e),this}getFocusableElement(){return this.eInput}setMaxLength(e){return this.eInput.maxLength=e,this}setInputPlaceholder(e){return Gn(this.eInput,"placeholder",e),this}setInputAriaLabel(e){return jt(this.eInput,e),this.refreshAriaLabelledBy(),this}setDisabled(e){return ln(this.eInput,e),super.setDisabled(e)}setAutoComplete(e){if(!0===e)Gn(this.eInput,"autocomplete",null);else{const t="string"==typeof e?e:"off";Gn(this.eInput,"autocomplete",t)}return this}};g([Ss("eLabel")],Hs.prototype,"eLabel",2),g([Ss("eWrapper")],Hs.prototype,"eWrapper",2),g([Ss("eInput")],Hs.prototype,"eInput",2);var zs=class extends Hs{constructor(e,t="ag-checkbox",i="checkbox"){super(e,t,i),this.labelAlignment="right",this.selected=!1,this.readOnly=!1,this.passive=!1}postConstruct(){super.postConstruct();const{readOnly:e,passive:t}=this.config;"boolean"==typeof e&&this.setReadOnly(e),"boolean"==typeof t&&this.setPassive(t)}addInputListeners(){this.addManagedListener(this.eInput,"click",this.onCheckboxClick.bind(this)),this.addManagedListener(this.eLabel,"click",this.toggle.bind(this))}getNextValue(){return void 0===this.selected||!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){return this.getInputElement().name=e,this}isSelected(){return this.selected}setSelected(e,t){this.isSelected()!==e&&(this.previousValue=this.isSelected(),e=this.selected="boolean"==typeof e?e:void 0,this.eInput.checked=e,this.eInput.indeterminate=void 0===e,t||this.dispatchChange(this.selected,this.previousValue))}dispatchChange(e,t,i){this.dispatchEvent({type:lt.EVENT_FIELD_VALUE_CHANGED,selected:e,previousValue:t,event:i});const n=this.getInputElement(),s={type:lt.EVENT_CHECKBOX_CHANGED,id:n.id,name:n.name,selected:e,previousValue:t};this.eventService.dispatchEvent(s)}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",!0===e),this.eWrapper.classList.toggle("ag-indeterminate",null==e)}},Us=class extends zs{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,lt.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)}},Ws=class{constructor(e,t,i){this.localeService=e,this.optionsFactory=t,this.valueFormatter=i}getModelAsString(e){if(!e)return null;const t=null!=e.operator,i=this.localeService.getLocaleTextFunc();if(t){const t=e;let{conditions:n}=t;if(!n){const{condition1:e,condition2:i}=t;n=[e,i]}const s=n.map(e=>this.getModelAsString(e)),r="AND"===t.operator?"andCondition":"orCondition";return s.join(` ${i(r,As[r])} `)}if(e.type===Ks.BLANK||e.type===Ks.NOT_BLANK)return i(e.type,e.type);{const t=e,n=this.optionsFactory.getCustomOption(t.type),{displayKey:s,displayName:r,numberOfInputs:o}=n||{};return s&&r&&0===o?(i(s,r),r):this.conditionToString(t,n)}}updateParams(e){this.optionsFactory=e.optionsFactory}formatValue(e){var t;return this.valueFormatter?null!=(t=this.valueFormatter(null!=e?e:null))?t:"":String(e)}},js=class e extends Ps{constructor(){super(...arguments),this.eTypes=[],this.eJoinOperatorPanels=[],this.eJoinOperatorsAnd=[],this.eJoinOperatorsOr=[],this.eConditionBodies=[],this.listener=()=>this.onUiChanged(),this.lastUiCompletePosition=null,this.joinOperatorId=0}getNumberOfInputs(t){const i=this.optionsFactory.getCustomOption(t);if(i){const{numberOfInputs:e}=i;return null!=e?e:1}const n=[e.EMPTY,e.NOT_BLANK,e.BLANK];return t&&n.indexOf(t)>=0?0:t===e.IN_RANGE?2:1}onFloatingFilterChanged(e,t){this.setTypeFromFloatingFilter(e),this.setValueFromFloatingFilter(t),this.onUiChanged(!0)}setTypeFromFloatingFilter(e){this.eTypes.forEach((t,i)=>{0===i?t.setValue(e,!0):t.setValue(this.optionsFactory.getDefaultOption(),!0)})}getModelFromUi(){const e=this.getUiCompleteConditions();return 0===e.length?null:this.maxNumConditions>1&&e.length>1?{filterType:this.getFilterType(),operator:this.getJoinOperator(),condition1:e[0],condition2:e[1],conditions:e}:e[0]}getConditionTypes(){return this.eTypes.map(e=>e.getValue())}getConditionType(e){return this.eTypes[e].getValue()}getJoinOperator(){return 0===this.eJoinOperatorsOr.length?this.defaultJoinOperator:!0===this.eJoinOperatorsOr[0].getValue()?"OR":"AND"}areModelsEqual(e,t){if(!e&&!t)return!0;if(!e&&t||e&&!t)return!1;const i=!e.operator,n=!t.operator;if(!i&&n||i&&!n)return!1;let s;if(i){const i=e,n=t;s=this.areSimpleModelsEqual(i,n)}else{const i=e,n=t;s=i.operator===n.operator&&Ie(i.conditions,n.conditions,(e,t)=>this.areSimpleModelsEqual(e,t))}return s}shouldRefresh(e){var t,i,n;const s=this.getModel(),r=s?null!=(t=s.conditions)?t:[s]:null,o=null!=(n=null==(i=e.filterOptions)?void 0:i.map(e=>"string"==typeof e?e:e.displayKey))?n:this.getDefaultFilterOptions();return!(r&&!r.every(e=>void 0!==o.find(t=>t===e.type))||"number"==typeof e.maxNumConditions&&r&&r.length>e.maxNumConditions)}refresh(e){return!!this.shouldRefresh(e)&&(!!super.refresh(e)&&(this.setParams(e),this.removeConditionsAndOperators(0),this.createOption(),this.setModel(this.getModel()),!0))}setModelIntoUi(e){if(e.operator){let t=e;t.conditions||(t.conditions=[t.condition1,t.condition2]);const i=this.validateAndUpdateConditions(t.conditions),n=this.getNumConditions();if(i<n)this.removeConditionsAndOperators(i);else if(i>n)for(let e=n;e<i;e++)this.createJoinOperatorPanel(),this.createOption();const s="OR"===t.operator;this.eJoinOperatorsAnd.forEach(e=>e.setValue(!s,!0)),this.eJoinOperatorsOr.forEach(e=>e.setValue(s,!0)),t.conditions.forEach((e,t)=>{this.eTypes[t].setValue(e.type,!0),this.setConditionIntoUi(e,t)})}else{const t=e;this.getNumConditions()>1&&this.removeConditionsAndOperators(1),this.eTypes[0].setValue(t.type,!0),this.setConditionIntoUi(t,0)}return this.lastUiCompletePosition=this.getNumConditions()-1,this.createMissingConditionsAndOperators(),this.onUiChanged(),ds.resolve()}validateAndUpdateConditions(e){let t=e.length;return t>this.maxNumConditions&&(e.splice(this.maxNumConditions),z('Filter Model contains more conditions than "filterParams.maxNumConditions". Additional conditions have been ignored.'),t=this.maxNumConditions),t}doesFilterPass(e){var t;const i=this.getModel();if(null==i)return!0;const{operator:n}=i,s=[];if(n){const e=i;s.push(...null!=(t=e.conditions)?t:[])}else s.push(i);return s[n&&"OR"===n?"some":"every"](t=>this.individualConditionPasses(e,t))}setParams(e){super.setParams(e),this.setNumConditions(e),this.defaultJoinOperator=this.getDefaultJoinOperator(e.defaultJoinOperator),this.filterPlaceholder=e.filterPlaceholder,this.optionsFactory=new Ms,this.optionsFactory.init(e,this.getDefaultFilterOptions()),this.createFilterListOptions(),this.createOption(),this.createMissingConditionsAndOperators(),this.isReadOnly()&&this.eFilterBody.setAttribute("tabindex","-1")}setNumConditions(e){var t,i;null!=e.suppressAndOrCondition&&z('Since v29.2 "filterParams.suppressAndOrCondition" is deprecated. Use "filterParams.maxNumConditions = 1" instead.'),null!=e.alwaysShowBothConditions&&z('Since v29.2 "filterParams.alwaysShowBothConditions" is deprecated. Use "filterParams.numAlwaysVisibleConditions = 2" instead.'),this.maxNumConditions=null!=(t=e.maxNumConditions)?t:e.suppressAndOrCondition?1:2,this.maxNumConditions<1&&(z('"filterParams.maxNumConditions" must be greater than or equal to zero.'),this.maxNumConditions=1),this.numAlwaysVisibleConditions=null!=(i=e.numAlwaysVisibleConditions)?i:e.alwaysShowBothConditions?2:1,this.numAlwaysVisibleConditions<1&&(z('"filterParams.numAlwaysVisibleConditions" must be greater than or equal to zero.'),this.numAlwaysVisibleConditions=1),this.numAlwaysVisibleConditions>this.maxNumConditions&&(z('"filterParams.numAlwaysVisibleConditions" cannot be greater than "filterParams.maxNumConditions".'),this.numAlwaysVisibleConditions=this.maxNumConditions)}createOption(){const e=this.createManagedBean(new Bs);this.eTypes.push(e),e.addCssClass("ag-filter-select"),this.eFilterBody.appendChild(e.getGui());const t=this.createValueElement();this.eConditionBodies.push(t),this.eFilterBody.appendChild(t),this.putOptionsIntoDropdown(e),this.resetType(e);const i=this.getNumConditions()-1;this.forEachPositionInput(i,e=>this.resetInput(e)),this.addChangedListeners(e,i)}createJoinOperatorPanel(){const e=document.createElement("div");this.eJoinOperatorPanels.push(e),e.classList.add("ag-filter-condition");const t=this.createJoinOperator(this.eJoinOperatorsAnd,e,"and"),i=this.createJoinOperator(this.eJoinOperatorsOr,e,"or");this.eFilterBody.appendChild(e);const n=this.eJoinOperatorPanels.length-1,s=this.joinOperatorId++;this.resetJoinOperatorAnd(t,n,s),this.resetJoinOperatorOr(i,n,s),this.isReadOnly()||(t.onValueChange(this.listener),i.onValueChange(this.listener))}createJoinOperator(e,t,i){const n=this.createManagedBean(new Us);return e.push(n),n.addCssClass("ag-filter-condition-operator"),n.addCssClass(`ag-filter-condition-operator-${i}`),t.appendChild(n.getGui()),n}getDefaultJoinOperator(e){return"AND"===e||"OR"===e?e:"AND"}createFilterListOptions(){const e=this.optionsFactory.getFilterOptions();this.filterListOptions=e.map(e=>"string"==typeof e?this.createBoilerplateListOption(e):this.createCustomListOption(e))}putOptionsIntoDropdown(e){this.filterListOptions.forEach(t=>{e.addOption(t)}),e.setDisabled(this.filterListOptions.length<=1)}createBoilerplateListOption(e){return{value:e,text:this.translate(e)}}createCustomListOption(e){const{displayKey:t}=e,i=this.optionsFactory.getCustomOption(e.displayKey);return{value:t,text:i?this.localeService.getLocaleTextFunc()(i.displayKey,i.displayName):this.translate(t)}}isAllowTwoConditions(){return this.maxNumConditions>=2}createBodyTemplate(){return""}getCssIdentifier(){return"simple-filter"}updateUiVisibility(){const e=this.getJoinOperator();this.updateNumConditions(),this.updateConditionStatusesAndValues(this.lastUiCompletePosition,e)}updateNumConditions(){var e;let t=-1,i=!0;for(let e=0;e<this.getNumConditions();e++)this.isConditionUiComplete(e)?t=e:i=!1;if(this.shouldAddNewConditionAtEnd(i))this.createJoinOperatorPanel(),this.createOption();else{const i=null!=(e=this.lastUiCompletePosition)?e:this.getNumConditions()-2;if(t<i){this.removeConditionsAndOperators(i+1);const e=t+1,n=i-e;n>0&&this.removeConditionsAndOperators(e,n),this.createMissingConditionsAndOperators()}}this.lastUiCompletePosition=t}updateConditionStatusesAndValues(e,t){this.eTypes.forEach((t,i)=>{const n=this.isConditionDisabled(i,e);t.setDisabled(n||this.filterListOptions.length<=1),1===i&&(ln(this.eJoinOperatorPanels[0],n),this.eJoinOperatorsAnd[0].setDisabled(n),this.eJoinOperatorsOr[0].setDisabled(n))}),this.eConditionBodies.forEach((e,t)=>{on(e,this.isConditionBodyVisible(t))});const i="OR"===(null!=t?t:this.getJoinOperator());this.eJoinOperatorsAnd.forEach((e,t)=>{e.setValue(!i,!0)}),this.eJoinOperatorsOr.forEach((e,t)=>{e.setValue(i,!0)}),this.forEachInput((t,i,n,s)=>{this.setElementDisplayed(t,i<s),this.setElementDisabled(t,this.isConditionDisabled(n,e))}),this.resetPlaceholder()}shouldAddNewConditionAtEnd(e){return e&&this.getNumConditions()<this.maxNumConditions&&!this.isReadOnly()}removeConditionsAndOperators(e,t){if(e>=this.getNumConditions())return;this.removeComponents(this.eTypes,e,t),this.removeElements(this.eConditionBodies,e,t),this.removeValueElements(e,t);const i=Math.max(e-1,0);this.removeElements(this.eJoinOperatorPanels,i,t),this.removeComponents(this.eJoinOperatorsAnd,i,t),this.removeComponents(this.eJoinOperatorsOr,i,t)}removeElements(e,t,i){this.removeItems(e,t,i).forEach(e=>bn(e))}removeComponents(e,t,i){this.removeItems(e,t,i).forEach(e=>{bn(e.getGui()),this.destroyBean(e)})}removeItems(e,t,i){return null==i?e.splice(t):e.splice(t,i)}afterGuiAttached(e){if(super.afterGuiAttached(e),this.resetPlaceholder(),!(null==e?void 0:e.suppressFocus))if(this.isReadOnly())this.eFilterBody.focus();else{const e=this.getInputs(0)[0];if(!e)return;e instanceof Hs&&e.getInputElement().focus()}}afterGuiDetached(){super.afterGuiDetached();const e=this.getModel();this.resetUiToActiveModel(e);let t=-1,i=-1,n=!1;const s=this.getJoinOperator();for(let e=this.getNumConditions()-1;e>=0;e--)if(this.isConditionUiComplete(e))-1===t&&(t=e,i=e);else{const s=e<t;(e>=this.numAlwaysVisibleConditions&&!this.isConditionUiComplete(e-1)||s)&&(this.removeConditionsAndOperators(e,1),n=!0,s&&i--)}let r=!1;this.getNumConditions()<this.numAlwaysVisibleConditions&&(this.createMissingConditionsAndOperators(),r=!0),this.shouldAddNewConditionAtEnd(i===this.getNumConditions()-1)&&(this.createJoinOperatorPanel(),this.createOption(),r=!0),r&&this.updateConditionStatusesAndValues(i,s),n&&this.updateJoinOperatorsDisabled(),this.lastUiCompletePosition=i}getPlaceholderText(e,t){let i=this.translate(e);if(j(this.filterPlaceholder)){const e=this.filterPlaceholder,n=this.eTypes[t].getValue();i=e({filterOptionKey:n,filterOption:this.translate(n),placeholder:i})}else"string"==typeof this.filterPlaceholder&&(i=this.filterPlaceholder);return i}resetPlaceholder(){const e=this.localeService.getLocaleTextFunc();this.forEachInput((t,i,n,s)=>{if(!(t instanceof Hs))return;const r=0===i&&s>1?"inRangeStart":0===i?"filterOoo":"inRangeEnd",o=0===i&&s>1?e("ariaFilterFromValue","Filter from value"):0===i?e("ariaFilterValue","Filter Value"):e("ariaFilterToValue","Filter to Value");t.setInputPlaceholder(this.getPlaceholderText(r,n)),t.setInputAriaLabel(o)})}setElementValue(e,t,i){e instanceof Hs&&e.setValue(null!=t?String(t):null,!0)}setElementDisplayed(e,t){e instanceof Cs&&on(e.getGui(),t)}setElementDisabled(e,t){e instanceof Cs&&ln(e.getGui(),t)}attachElementOnChange(e,t){e instanceof Hs&&e.onValueChange(t)}forEachInput(e){this.getConditionTypes().forEach((t,i)=>{this.forEachPositionTypeInput(i,t,e)})}forEachPositionInput(e,t){const i=this.getConditionType(e);this.forEachPositionTypeInput(e,i,t)}forEachPositionTypeInput(e,t,i){const n=this.getNumberOfInputs(t),s=this.getInputs(e);for(let t=0;t<s.length;t++){const r=s[t];null!=r&&i(r,t,e,n)}}isConditionDisabled(e,t){return!!this.isReadOnly()||0!==e&&e>t+1}isConditionBodyVisible(e){const t=this.getConditionType(e);return this.getNumberOfInputs(t)>0}isConditionUiComplete(t){return!(t>=this.getNumConditions())&&(this.getConditionType(t)!==e.EMPTY&&!this.getValues(t).some(e=>null==e))}getNumConditions(){return this.eTypes.length}getUiCompleteConditions(){const e=[];for(let t=0;t<this.getNumConditions();t++)this.isConditionUiComplete(t)&&e.push(this.createCondition(t));return e}createMissingConditionsAndOperators(){if(!this.isReadOnly())for(let e=this.getNumConditions();e<this.numAlwaysVisibleConditions;e++)this.createJoinOperatorPanel(),this.createOption()}resetUiToDefaults(e){return this.removeConditionsAndOperators(this.isReadOnly()?1:this.numAlwaysVisibleConditions),this.eTypes.forEach(e=>this.resetType(e)),this.eJoinOperatorsAnd.forEach((e,t)=>this.resetJoinOperatorAnd(e,t,this.joinOperatorId+t)),this.eJoinOperatorsOr.forEach((e,t)=>this.resetJoinOperatorOr(e,t,this.joinOperatorId+t)),this.joinOperatorId++,this.forEachInput(e=>this.resetInput(e)),this.resetPlaceholder(),this.createMissingConditionsAndOperators(),this.lastUiCompletePosition=null,e||this.onUiChanged(),ds.resolve()}resetType(e){const t=this.localeService.getLocaleTextFunc()("ariaFilteringOperator","Filtering operator");e.setValue(this.optionsFactory.getDefaultOption(),!0).setAriaLabel(t).setDisabled(this.isReadOnly()||this.filterListOptions.length<=1)}resetJoinOperatorAnd(e,t,i){this.resetJoinOperator(e,t,this.isDefaultOperator("AND"),this.translate("andCondition"),i)}resetJoinOperatorOr(e,t,i){this.resetJoinOperator(e,t,this.isDefaultOperator("OR"),this.translate("orCondition"),i)}resetJoinOperator(e,t,i,n,s){this.updateJoinOperatorDisabled(e.setValue(i,!0).setName(`ag-simple-filter-and-or-${this.getCompId()}-${s}`).setLabel(n),t)}updateJoinOperatorsDisabled(){this.eJoinOperatorsAnd.forEach((e,t)=>this.updateJoinOperatorDisabled(e,t)),this.eJoinOperatorsOr.forEach((e,t)=>this.updateJoinOperatorDisabled(e,t))}updateJoinOperatorDisabled(e,t){e.setDisabled(this.isReadOnly()||t>0)}resetInput(e){this.setElementValue(e,null),this.setElementDisabled(e,this.isReadOnly())}setConditionIntoUi(e,t){const i=this.mapValuesFromModel(e);this.forEachInput((e,n,s,r)=>{s===t&&this.setElementValue(e,null!=i[n]?i[n]:null)})}setValueFromFloatingFilter(e){this.forEachInput((t,i,n,s)=>{this.setElementValue(t,0===i&&0===n?e:null,!0)})}isDefaultOperator(e){return e===this.defaultJoinOperator}addChangedListeners(e,t){this.isReadOnly()||(e.onValueChange(this.listener),this.forEachPositionInput(t,e=>{this.attachElementOnChange(e,this.listener)}))}individualConditionPasses(e,t){const i=this.getCellValue(e.node),n=this.mapValuesFromModel(t),s=this.optionsFactory.getCustomOption(t.type),r=this.evaluateCustomFilter(s,n,i);return null!=r?r:null==i?this.evaluateNullValue(t.type):this.evaluateNonNullValue(n,i,t,e)}evaluateCustomFilter(e,t,i){if(null==e)return;const{predicate:n}=e;return null==n||t.some(e=>null==e)?void 0:n(t,i)}isBlank(e){return null==e||"string"==typeof e&&0===e.trim().length}hasInvalidInputs(){return!1}};js.EMPTY="empty",js.BLANK="blank",js.NOT_BLANK="notBlank",js.EQUALS="equals",js.NOT_EQUAL="notEqual",js.LESS_THAN="lessThan",js.LESS_THAN_OR_EQUAL="lessThanOrEqual",js.GREATER_THAN="greaterThan",js.GREATER_THAN_OR_EQUAL="greaterThanOrEqual",js.IN_RANGE="inRange",js.CONTAINS="contains",js.NOT_CONTAINS="notContains",js.STARTS_WITH="startsWith",js.ENDS_WITH="endsWith";var Ks=js,$s=class e extends Ks{setParams(e){super.setParams(e),this.scalarFilterParams=e}evaluateNullValue(t){switch(t){case e.EQUALS:case e.NOT_EQUAL:if(this.scalarFilterParams.includeBlanksInEquals)return!0;break;case e.GREATER_THAN:case e.GREATER_THAN_OR_EQUAL:if(this.scalarFilterParams.includeBlanksInGreaterThan)return!0;break;case e.LESS_THAN:case e.LESS_THAN_OR_EQUAL:if(this.scalarFilterParams.includeBlanksInLessThan)return!0;break;case e.IN_RANGE:if(this.scalarFilterParams.includeBlanksInRange)return!0;break;case e.BLANK:return!0;case e.NOT_BLANK:return!1}return!1}evaluateNonNullValue(t,i,n){const s=this.comparator(),r=null!=t[0]?s(t[0],i):0;switch(n.type){case e.EQUALS:return 0===r;case e.NOT_EQUAL:return 0!==r;case e.GREATER_THAN:return r>0;case e.GREATER_THAN_OR_EQUAL:return r>=0;case e.LESS_THAN:return r<0;case e.LESS_THAN_OR_EQUAL:return r<=0;case e.IN_RANGE:{const e=s(t[1],i);return this.scalarFilterParams.inRangeInclusive?r>=0&&e<=0:r>0&&e<0}case e.BLANK:return this.isBlank(i);case e.NOT_BLANK:return!this.isBlank(i);default:return console.warn('AG Grid: Unexpected type of filter "'+n.type+'", it looks like the filter was configured with incorrect Filter Options'),!0}}},Ys=1/0,qs=class extends Ws{constructor(e,t,i){super(t,i),this.dateFilterParams=e}conditionToString(e,t){const{type:i}=e,{numberOfInputs:n}=t||{},s=i==Ks.IN_RANGE||2===n,r=Qi(e.dateFrom),o=Qi(e.dateTo),a=this.dateFilterParams.inRangeFloatingFilterDateFormat;return s?`${null!==r?Zi(r,a):"null"}-${null!==o?Zi(o,a):"null"}`:null!=r?Zi(r,a):`${i}`}updateParams(e){super.updateParams(e),this.dateFilterParams=e.dateFilterParams}},Xs=class e extends $s{constructor(){super("dateFilter"),this.eConditionPanelsFrom=[],this.eConditionPanelsTo=[],this.dateConditionFromComps=[],this.dateConditionToComps=[],this.minValidYear=1e3,this.maxValidYear=Ys,this.minValidDate=null,this.maxValidDate=null}afterGuiAttached(e){super.afterGuiAttached(e),this.dateConditionFromComps[0].afterGuiAttached(e)}mapValuesFromModel(e){const{dateFrom:t,dateTo:i,type:n}=e||{};return[t&&Qi(t)||null,i&&Qi(i)||null].slice(0,this.getNumberOfInputs(n))}comparator(){return this.dateFilterParams.comparator?this.dateFilterParams.comparator:this.defaultComparator.bind(this)}defaultComparator(e,t){return null==t||t<e?-1:t>e?1:0}setParams(e){this.dateFilterParams=e,super.setParams(e);const t=(t,i)=>{if(null!=e[t]){if(!isNaN(e[t]))return null==e[t]?i:Number(e[t]);console.warn(`AG Grid: DateFilter ${t} is not a number`)}return i};this.minValidYear=t("minValidYear",1e3),this.maxValidYear=t("maxValidYear",Ys),this.minValidYear>this.maxValidYear&&console.warn("AG Grid: DateFilter minValidYear should be <= maxValidYear"),e.minValidDate?this.minValidDate=e.minValidDate instanceof Date?e.minValidDate:Qi(e.minValidDate):this.minValidDate=null,e.maxValidDate?this.maxValidDate=e.maxValidDate instanceof Date?e.maxValidDate:Qi(e.maxValidDate):this.maxValidDate=null,this.minValidDate&&this.maxValidDate&&this.minValidDate>this.maxValidDate&&console.warn("AG Grid: DateFilter minValidDate should be <= maxValidDate"),this.filterModelFormatter=new qs(this.dateFilterParams,this.localeService,this.optionsFactory)}createDateCompWrapper(e){const t=new Es(this.getContext(),this.userComponentFactory,{onDateChanged:()=>this.onUiChanged(),filterParams:this.dateFilterParams},e);return this.addDestroyFunc(()=>t.destroy()),t}setElementValue(e,t){e.setDate(t)}setElementDisplayed(e,t){e.setDisplayed(t)}setElementDisabled(e,t){e.setDisabled(t)}getDefaultFilterOptions(){return e.DEFAULT_FILTER_OPTIONS}createValueElement(){const e=this.gos.getDocument().createElement("div");return e.classList.add("ag-filter-body"),this.createFromToElement(e,this.eConditionPanelsFrom,this.dateConditionFromComps,"from"),this.createFromToElement(e,this.eConditionPanelsTo,this.dateConditionToComps,"to"),e}createFromToElement(e,t,i,n){const s=this.gos.getDocument().createElement("div");s.classList.add(`ag-filter-${n}`),s.classList.add(`ag-filter-date-${n}`),t.push(s),e.appendChild(s),i.push(this.createDateCompWrapper(s))}removeValueElements(e,t){this.removeDateComps(this.dateConditionFromComps,e,t),this.removeDateComps(this.dateConditionToComps,e,t),this.removeItems(this.eConditionPanelsFrom,e,t),this.removeItems(this.eConditionPanelsTo,e,t)}removeDateComps(e,t,i){this.removeItems(e,t,i).forEach(e=>e.destroy())}isValidDateValue(e){if(null===e)return!1;if(this.minValidDate){if(e<this.minValidDate)return!1}else if(e.getUTCFullYear()<this.minValidYear)return!1;if(this.maxValidDate){if(e>this.maxValidDate)return!1}else if(e.getUTCFullYear()>this.maxValidYear)return!1;return!0}isConditionUiComplete(e){if(!super.isConditionUiComplete(e))return!1;let t=!0;return this.forEachInput((i,n,s,r)=>{s!==e||!t||n>=r||(t=t&&this.isValidDateValue(i.getDate()))}),t}areSimpleModelsEqual(e,t){return e.dateFrom===t.dateFrom&&e.dateTo===t.dateTo&&e.type===t.type}getFilterType(){return"date"}createCondition(e){const t=this.getConditionType(e),i={},n=this.getValues(e);return n.length>0&&(i.dateFrom=qi(n[0])),n.length>1&&(i.dateTo=qi(n[1])),d({dateFrom:null,dateTo:null,filterType:this.getFilterType(),type:t},i)}resetPlaceholder(){const e=this.localeService.getLocaleTextFunc(),t=this.translate("dateFormatOoo"),i=e("ariaFilterValue","Filter Value");this.forEachInput(e=>{e.setInputPlaceholder(t),e.setInputAriaLabel(i)})}getInputs(e){return e>=this.dateConditionFromComps.length?[null,null]:[this.dateConditionFromComps[e],this.dateConditionToComps[e]]}getValues(e){const t=[];return this.forEachPositionInput(e,(e,i,n,s)=>{i<s&&t.push(e.getDate())}),t}translate(e){return e===$s.LESS_THAN?super.translate("before"):e===$s.GREATER_THAN?super.translate("after"):super.translate(e)}getModelAsString(e){var t;return null!=(t=this.filterModelFormatter.getModelAsString(e))?t:""}};Xs.DEFAULT_FILTER_OPTIONS=[$s.EQUALS,$s.NOT_EQUAL,$s.LESS_THAN,$s.GREATER_THAN,$s.IN_RANGE,$s.BLANK,$s.NOT_BLANK],g([he("userComponentFactory")],Xs.prototype,"userComponentFactory",2);var Zs=Xs,Qs=class extends Cs{getDefaultDebounceMs(){return 0}destroy(){super.destroy()}isEventFromFloatingFilter(e){return e&&e.afterFloatingFilter}isEventFromDataChange(e){return null==e?void 0:e.afterDataChange}getLastType(){return this.lastType}isReadOnly(){return this.readOnly}setLastTypeFromModel(e){if(!e)return void(this.lastType=this.optionsFactory.getDefaultOption());let t;t=e.operator?e.conditions[0]:e,this.lastType=t.type}canWeEditAfterModelFromParentFilter(e){if(!e)return this.isTypeEditable(this.lastType);if(e.operator)return!1;const t=e;return this.isTypeEditable(t.type)}init(e){this.setSimpleParams(e,!1)}setSimpleParams(e,t=!0){this.optionsFactory=new Ms,this.optionsFactory.init(e.filterParams,this.getDefaultFilterOptions()),t||(this.lastType=this.optionsFactory.getDefaultOption()),this.readOnly=!!e.filterParams.readOnly;const i=this.isTypeEditable(this.optionsFactory.getDefaultOption());this.setEditable(i)}onParamsUpdated(e){this.refresh(e)}refresh(e){this.setSimpleParams(e)}doesFilterHaveSingleInput(e){const t=this.optionsFactory.getCustomOption(e),{numberOfInputs:i}=t||{};return null==i||1==i}isTypeEditable(e){const t=[Ks.IN_RANGE,Ks.EMPTY,Ks.BLANK,Ks.NOT_BLANK];return!!e&&!this.isReadOnly()&&this.doesFilterHaveSingleInput(e)&&t.indexOf(e)<0}getAriaLabel(e){return`${this.columnModel.getDisplayNameForColumn(e.column,"header",!0)} ${this.localeService.getLocaleTextFunc()("ariaFilterInput","Filter Input")}`}};g([he("columnModel")],Qs.prototype,"columnModel",2);var Js=class extends Qs{constructor(){super('\n            <div class="ag-floating-filter-input" role="presentation">\n                <ag-input-text-field ref="eReadOnlyText"></ag-input-text-field>\n                <div ref="eDateWrapper" style="display: flex;"></div>\n            </div>')}getDefaultFilterOptions(){return Zs.DEFAULT_FILTER_OPTIONS}init(e){super.init(e),this.params=e,this.filterParams=e.filterParams,this.createDateComponent(),this.filterModelFormatter=new qs(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 t=e;this.dateComp.setDate(Qi(t.dateFrom))}else this.dateComp.setDate(null);this.eReadOnlyText.setValue("")}else this.eReadOnlyText.setValue(this.filterModelFormatter.getModelAsString(e)),this.dateComp.setDate(null)}setEditable(e){on(this.eDateWrapper,e),on(this.eReadOnlyText.getGui(),!e)}onParentModelChanged(e,t){this.isEventFromFloatingFilter(t)||this.isEventFromDataChange(t)||(super.setLastTypeFromModel(e),this.updateCompOnModelChange(e))}onDateChanged(){const e=qi(this.dateComp.getDate());this.params.parentFilterInstance(t=>{if(t){const i=Qi(e);t.onFloatingFilterChanged(this.getLastType()||null,i)}})}getDateComponentParams(){const e=Ps.getDebounceMs(this.params.filterParams,this.getDefaultDebounceMs());return{onDateChanged:Z(this.onDateChanged.bind(this),e),filterParams:this.params.column.getColDef().filterParams}}createDateComponent(){this.dateComp=new Es(this.getContext(),this.userComponentFactory,this.getDateComponentParams(),this.eDateWrapper,e=>{e.setInputAriaLabel(this.getAriaLabel(this.params))}),this.addDestroyFunc(()=>this.dateComp.destroy())}updateDateComponent(){const e=this.gos.addGridCommonParams(this.getDateComponentParams());this.dateComp.updateParams(e)}getFilterModelFormatter(){return this.filterModelFormatter}};g([he("userComponentFactory")],Js.prototype,"userComponentFactory",2),g([Ss("eReadOnlyText")],Js.prototype,"eReadOnlyText",2),g([Ss("eDateWrapper")],Js.prototype,"eDateWrapper",2);var er=class extends Cs{constructor(){super('\n            <div class="ag-filter-filter">\n                <ag-input-text-field class="ag-date-filter" ref="eDateInput"></ag-input-text-field>\n            </div>')}destroy(){super.destroy()}init(e){this.params=e,this.setParams(e);const t=this.eDateInput.getInputElement();this.addManagedListener(t,"mousedown",()=>{this.eDateInput.isDisabled()||this.usingSafariDatePicker||t.focus()}),this.addManagedListener(t,"input",e=>{e.target===this.gos.getActiveDomElement()&&(this.eDateInput.isDisabled()||this.params.onDateChanged())})}setParams(e){const t=this.eDateInput.getInputElement(),i=this.shouldUseBrowserDatePicker(e);this.usingSafariDatePicker=i&&Ai(),t.type=i?"date":"text";const{minValidYear:n,maxValidYear:s,minValidDate:r,maxValidDate:o}=e.filterParams||{};if(r&&n&&z("DateFilter should not have both minValidDate and minValidYear parameters set at the same time! minValidYear will be ignored."),o&&s&&z("DateFilter should not have both maxValidDate and maxValidYear parameters set at the same time! maxValidYear will be ignored."),r&&o){const[e,t]=[r,o].map(e=>e instanceof Date?e:Qi(e));e&&t&&e.getTime()>t.getTime()&&z("DateFilter parameter minValidDate should always be lower than or equal to parameter maxValidDate.")}r?r instanceof Date?t.min=Zi(r):t.min=r:n&&(t.min=`${n}-01-01`),o?o instanceof Date?t.max=Zi(o):t.max=o:s&&(t.max=`${s}-12-31`)}onParamsUpdated(e){this.refresh(e)}refresh(e){this.params=e,this.setParams(e)}getDate(){return Qi(this.eDateInput.getValue())}setDate(e){this.eDateInput.setValue(qi(e,!1))}setInputPlaceholder(e){this.eDateInput.setInputPlaceholder(e)}setInputAriaLabel(e){this.eDateInput.setAriaLabel(e)}setDisabled(e){this.eDateInput.setDisabled(e)}afterGuiAttached(e){e&&e.suppressFocus||this.eDateInput.getInputElement().focus()}shouldUseBrowserDatePicker(e){return e.filterParams&&null!=e.filterParams.browserDatePicker?e.filterParams.browserDatePicker:Di()||Ii()||Ai()&&Ti()>=14.1}};g([Ss("eDateInput")],er.prototype,"eDateInput",2);var tr=class extends Hs{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=y(e)?e:""),super.setValue(e,t)}setStartValue(e){this.setValue(e,!0)}preventDisallowedCharacters(){const e=new RegExp(`[${this.config.allowedCharPattern}]`);this.addManagedListener(this.eInput,"keydown",t=>{Zn(t)&&t.key&&!e.test(t.key)&&t.preventDefault()}),this.addManagedListener(this.eInput,"paste",t=>{var i;const n=null==(i=t.clipboardData)?void 0:i.getData("text");n&&n.split("").some(t=>!e.test(t))&&t.preventDefault()})}},ir=class extends tr{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";const{precision:e,min:t,max:i,step:n}=this.config;"number"==typeof e&&this.setPrecision(e),"number"==typeof t&&this.setMin(t),"number"==typeof i&&this.setMax(i),"number"==typeof n&&this.setStep(n)}onWheel(e){this.gos.getActiveDomElement()===this.eInput&&e.preventDefault()}normalizeValue(e){if(""===e)return"";null!=this.precision&&(e=this.adjustPrecision(e));const t=parseFloat(e);return null!=this.min&&t<this.min?e=this.min.toString():null!=this.max&&t>this.max&&(e=this.max.toString()),e}adjustPrecision(e,t){if(null==this.precision)return e;if(t){const t=parseFloat(e).toFixed(this.precision);return parseFloat(t).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.min=e,Gn(this.eInput,"min",e)),this}setMax(e){return this.max===e||(this.max=e,Gn(this.eInput,"max",e)),this}setPrecision(e){return this.precision=e,this}setStep(e){return this.step===e||(this.step=e,Gn(this.eInput,"step",e)),this}setValue(e,t){return this.setValueOrInputValue(e=>super.setValue(e,t),()=>this,e)}setStartValue(e){return this.setValueOrInputValue(e=>super.setValue(e,!0),e=>{this.eInput.value=e},e)}setValueOrInputValue(e,t,i){if(y(i)){let n=this.isScientificNotation(i);if(n&&this.eInput.validity.valid)return e(i);if(n||(n=(i=this.adjustPrecision(i))!=this.normalizeValue(i)),n)return t(i)}return e(i)}getValue(){if(!this.eInput.validity.valid)return;const e=this.eInput.value;return this.isScientificNotation(e)?this.adjustPrecision(e,!0):super.getValue()}isScientificNotation(e){return"string"==typeof e&&e.includes("e")}},nr=class extends Ws{conditionToString(e,t){const{numberOfInputs:i}=t||{};return e.type==Ks.IN_RANGE||2===i?`${this.formatValue(e.filter)}-${this.formatValue(e.filterTo)}`:null!=e.filter?this.formatValue(e.filter):`${e.type}`}};function sr(e){const{allowedCharPattern:t}=null!=e?e:{};return null!=t?t:null}var rr=class e extends $s{constructor(){super("numberFilter"),this.eValuesFrom=[],this.eValuesTo=[]}refresh(e){return this.numberFilterParams.allowedCharPattern===e.allowedCharPattern&&super.refresh(e)}mapValuesFromModel(e){const{filter:t,filterTo:i,type:n}=e||{};return[this.processValue(t),this.processValue(i)].slice(0,this.getNumberOfInputs(n))}getDefaultDebounceMs(){return 500}comparator(){return(e,t)=>e===t?0:e<t?1:-1}setParams(e){this.numberFilterParams=e,super.setParams(e),this.filterModelFormatter=new nr(this.localeService,this.optionsFactory,this.numberFilterParams.numberFormatter)}getDefaultFilterOptions(){return e.DEFAULT_FILTER_OPTIONS}setElementValue(e,t,i){const n=!i&&this.numberFilterParams.numberFormatter?this.numberFilterParams.numberFormatter(null!=t?t:null):t;super.setElementValue(e,n)}createValueElement(){const e=sr(this.numberFilterParams),t=document.createElement("div");return t.classList.add("ag-filter-body"),Bt(t,"presentation"),this.createFromToElement(t,this.eValuesFrom,"from",e),this.createFromToElement(t,this.eValuesTo,"to",e),t}createFromToElement(e,t,i,n){const s=this.createManagedBean(n?new tr({allowedCharPattern:n}):new ir);s.addCssClass(`ag-filter-${i}`),s.addCssClass("ag-filter-filter"),t.push(s),e.appendChild(s.getGui())}removeValueElements(e,t){this.removeComponents(this.eValuesFrom,e,t),this.removeComponents(this.eValuesTo,e,t)}getValues(e){const t=[];return this.forEachPositionInput(e,(e,i,n,s)=>{i<s&&t.push(this.processValue(this.stringToFloat(e.getValue())))}),t}areSimpleModelsEqual(e,t){return e.filter===t.filter&&e.filterTo===t.filterTo&&e.type===t.type}getFilterType(){return"number"}processValue(e){return null==e||isNaN(e)?null:e}stringToFloat(e){if("number"==typeof e)return e;let t=v(e);return null!=t&&""===t.trim()&&(t=null),this.numberFilterParams.numberParser?this.numberFilterParams.numberParser(t):null==t||"-"===t.trim()?null:parseFloat(t)}createCondition(e){const t=this.getConditionType(e),i={filterType:this.getFilterType(),type:t},n=this.getValues(e);return n.length>0&&(i.filter=n[0]),n.length>1&&(i.filterTo=n[1]),i}getInputs(e){return e>=this.eValuesFrom.length?[null,null]:[this.eValuesFrom[e],this.eValuesTo[e]]}getModelAsString(e){var t;return null!=(t=this.filterModelFormatter.getModelAsString(e))?t:""}hasInvalidInputs(){let e=!1;return this.forEachInput(t=>{t.getInputElement().validity.valid||(e=!0)}),e}};rr.DEFAULT_FILTER_OPTIONS=[$s.EQUALS,$s.NOT_EQUAL,$s.GREATER_THAN,$s.GREATER_THAN_OR_EQUAL,$s.LESS_THAN,$s.LESS_THAN_OR_EQUAL,$s.IN_RANGE,$s.BLANK,$s.NOT_BLANK];var or=rr,ar=class extends Ws{conditionToString(e,t){const{numberOfInputs:i}=t||{};return e.type==Ks.IN_RANGE||2===i?`${e.filter}-${e.filterTo}`:null!=e.filter?`${e.filter}`:`${e.type}`}},lr=class e extends Ks{constructor(){super("textFilter"),this.eValuesFrom=[],this.eValuesTo=[]}static trimInput(e){const t=e&&e.trim();return""===t?e:t}getDefaultDebounceMs(){return 500}setParams(t){this.textFilterParams=t,super.setParams(t),this.matcher=this.getTextMatcher(),this.formatter=this.textFilterParams.textFormatter||(this.textFilterParams.caseSensitive?e.DEFAULT_FORMATTER:e.DEFAULT_LOWERCASE_FORMATTER),this.filterModelFormatter=new ar(this.localeService,this.optionsFactory)}getTextMatcher(){const t=this.textFilterParams.textCustomComparator;return t?(ls.warnOnce("textCustomComparator is deprecated, use textMatcher instead."),({filterOption:e,value:i,filterText:n})=>t(e,i,n)):this.textFilterParams.textMatcher||e.DEFAULT_MATCHER}createCondition(e){const t=this.getConditionType(e),i={filterType:this.getFilterType(),type:t},n=this.getValuesWithSideEffects(e,!0);return n.length>0&&(i.filter=n[0]),n.length>1&&(i.filterTo=n[1]),i}getFilterType(){return"text"}areSimpleModelsEqual(e,t){return e.filter===t.filter&&e.filterTo===t.filterTo&&e.type===t.type}getInputs(e){return e>=this.eValuesFrom.length?[null,null]:[this.eValuesFrom[e],this.eValuesTo[e]]}getValues(e){return this.getValuesWithSideEffects(e,!1)}getValuesWithSideEffects(t,i){const n=[];return this.forEachPositionInput(t,(t,s,r,o)=>{var a;if(s<o){let s=v(t.getValue());i&&this.textFilterParams.trimInput&&(s=null!=(a=e.trimInput(s))?a:null,t.setValue(s,!0)),n.push(s)}}),n}getDefaultFilterOptions(){return e.DEFAULT_FILTER_OPTIONS}createValueElement(){const e=document.createElement("div");return e.classList.add("ag-filter-body"),Bt(e,"presentation"),this.createFromToElement(e,this.eValuesFrom,"from"),this.createFromToElement(e,this.eValuesTo,"to"),e}createFromToElement(e,t,i){const n=this.createManagedBean(new tr);n.addCssClass(`ag-filter-${i}`),n.addCssClass("ag-filter-filter"),t.push(n),e.appendChild(n.getGui())}removeValueElements(e,t){this.removeComponents(this.eValuesFrom,e,t),this.removeComponents(this.eValuesTo,e,t)}mapValuesFromModel(e){const{filter:t,filterTo:i,type:n}=e||{};return[t||null,i||null].slice(0,this.getNumberOfInputs(n))}evaluateNullValue(e){const t=[Ks.NOT_EQUAL,Ks.NOT_CONTAINS,Ks.BLANK];return!!e&&t.indexOf(e)>=0}evaluateNonNullValue(e,t,i,n){const s=e.map(e=>this.formatter(e))||[],r=this.formatter(t),{api:o,colDef:a,column:l,columnApi:c,context:h,textFormatter:p}=this.textFilterParams;if(i.type===Ks.BLANK)return this.isBlank(t);if(i.type===Ks.NOT_BLANK)return!this.isBlank(t);const g={api:o,colDef:a,column:l,columnApi:c,context:h,node:n.node,data:n.data,filterOption:i.type,value:r,textFormatter:p};return s.some(e=>this.matcher(u(d({},g),{filterText:e})))}getModelAsString(e){var t;return null!=(t=this.filterModelFormatter.getModelAsString(e))?t:""}};lr.DEFAULT_FILTER_OPTIONS=[Ks.CONTAINS,Ks.NOT_CONTAINS,Ks.EQUALS,Ks.NOT_EQUAL,Ks.STARTS_WITH,Ks.ENDS_WITH,Ks.BLANK,Ks.NOT_BLANK],lr.DEFAULT_FORMATTER=e=>e,lr.DEFAULT_LOWERCASE_FORMATTER=e=>null==e?null:e.toString().toLowerCase(),lr.DEFAULT_MATCHER=({filterOption:e,value:t,filterText:i})=>{if(null==i)return!1;switch(e){case lr.CONTAINS:return t.indexOf(i)>=0;case lr.NOT_CONTAINS:return t.indexOf(i)<0;case lr.EQUALS:return t===i;case lr.NOT_EQUAL:return t!=i;case lr.STARTS_WITH:return 0===t.indexOf(i);case lr.ENDS_WITH:const e=t.lastIndexOf(i);return e>=0&&e===t.length-i.length;default:return!1}};var cr=lr,hr=class extends nt{constructor(e){super(),this.params=e,this.valueChangedListener=()=>{}}setupGui(e){var t;this.eFloatingFilterTextInput=this.createManagedBean(new tr(null==(t=this.params)?void 0:t.config));const i=this.eFloatingFilterTextInput.getGui();e.appendChild(i),this.addManagedListener(i,"input",e=>this.valueChangedListener(e)),this.addManagedListener(i,"keydown",e=>this.valueChangedListener(e))}setEditable(e){this.eFloatingFilterTextInput.setDisabled(!e)}setAutoComplete(e){this.eFloatingFilterTextInput.setAutoComplete(e)}getValue(){return this.eFloatingFilterTextInput.getValue()}setValue(e,t){this.eFloatingFilterTextInput.setValue(e,t)}setValueChangedListener(e){this.valueChangedListener=e}setParams(e){this.setAriaLabel(e.ariaLabel),void 0!==e.autoComplete&&this.setAutoComplete(e.autoComplete)}setAriaLabel(e){this.eFloatingFilterTextInput.setInputAriaLabel(e)}},dr=class extends Qs{postConstruct(){this.setTemplate('\n            <div class="ag-floating-filter-input" role="presentation" ref="eFloatingFilterInputContainer"></div>\n        ')}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=null!=(t=e.browserAutoComplete)&&t;if(this.floatingFilterInputService.setParams({ariaLabel:this.getAriaLabel(e),autoComplete:i}),this.applyActive=Ps.isUseApplyButton(this.params.filterParams),!this.isReadOnly()){const e=Ps.getDebounceMs(this.params.filterParams,this.getDefaultDebounceMs()),t=Z(this.syncUpWithParentFilter.bind(this),e);this.floatingFilterInputService.setValueChangedListener(t)}}onParamsUpdated(e){this.refresh(e)}refresh(e){super.refresh(e),this.setTextInputParams(e)}recreateFloatingFilterInputService(e){const t=this.floatingFilterInputService.getValue();Cn(this.eFloatingFilterInputContainer),this.destroyBean(this.floatingFilterInputService),this.setupFloatingFilterInputService(e),this.floatingFilterInputService.setValue(t,!0)}syncUpWithParentFilter(e){const t=e.key===Xn.ENTER;if(this.applyActive&&!t)return;let i=this.floatingFilterInputService.getValue();this.params.filterParams.trimInput&&(i=cr.trimInput(i),this.floatingFilterInputService.setValue(i,!0)),this.params.parentFilterInstance(e=>{e&&e.onFloatingFilterChanged(this.getLastType()||null,i||null)})}setEditable(e){this.floatingFilterInputService.setEditable(e)}};g([Ss("eFloatingFilterInputContainer")],dr.prototype,"eFloatingFilterInputContainer",2),g([ae],dr.prototype,"postConstruct",1);var ur=class extends nt{constructor(){super(...arguments),this.valueChangedListener=()=>{},this.numberInputActive=!0}setupGui(e){this.eFloatingFilterNumberInput=this.createManagedBean(new ir),this.eFloatingFilterTextInput=this.createManagedBean(new tr),this.eFloatingFilterTextInput.setDisabled(!0);const t=this.eFloatingFilterNumberInput.getGui(),i=this.eFloatingFilterTextInput.getGui();e.appendChild(t),e.appendChild(i),this.setupListeners(t,e=>this.valueChangedListener(e)),this.setupListeners(i,e=>this.valueChangedListener(e))}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),void 0!==e.autoComplete&&this.setAutoComplete(e.autoComplete)}setAriaLabel(e){this.eFloatingFilterNumberInput.setInputAriaLabel(e),this.eFloatingFilterTextInput.setInputAriaLabel(e)}},pr=class extends dr{init(e){var t;super.init(e),this.filterModelFormatter=new nr(this.localeService,this.optionsFactory,null==(t=e.filterParams)?void 0:t.numberFormatter)}onParamsUpdated(e){this.refresh(e)}refresh(e){sr(e.filterParams)!==this.allowedCharPattern&&this.recreateFloatingFilterInputService(e),super.refresh(e),this.filterModelFormatter.updateParams({optionsFactory:this.optionsFactory})}getDefaultFilterOptions(){return or.DEFAULT_FILTER_OPTIONS}getFilterModelFormatter(){return this.filterModelFormatter}createFloatingFilterInputService(e){return this.allowedCharPattern=sr(e.filterParams),this.allowedCharPattern?this.createManagedBean(new hr({config:{allowedCharPattern:this.allowedCharPattern}})):this.createManagedBean(new ur)}},gr=class extends dr{init(e){super.init(e),this.filterModelFormatter=new ar(this.localeService,this.optionsFactory)}onParamsUpdated(e){this.refresh(e)}refresh(e){super.refresh(e),this.filterModelFormatter.updateParams({optionsFactory:this.optionsFactory})}getDefaultFilterOptions(){return cr.DEFAULT_FILTER_OPTIONS}getFilterModelFormatter(){return this.filterModelFormatter}createFloatingFilterInputService(){return this.createManagedBean(new hr)}},fr=class e{constructor(e,t=!1){this.destroyFuncs=[],this.touching=!1,this.eventService=new fe,this.eElement=e,this.preventMouseClick=t;const i=this.onTouchStart.bind(this),n=this.onTouchMove.bind(this),s=this.onTouchEnd.bind(this);this.eElement.addEventListener("touchstart",i,{passive:!0}),this.eElement.addEventListener("touchmove",n,{passive:!0}),this.eElement.addEventListener("touchend",s,{passive:!1}),this.destroyFuncs.push(()=>{this.eElement.removeEventListener("touchstart",i,{passive:!0}),this.eElement.removeEventListener("touchmove",n,{passive:!0}),this.eElement.removeEventListener("touchend",s,{passive:!1})})}getActiveTouch(e){for(let t=0;t<e.length;t++)if(e[t].identifier===this.touchStart.identifier)return e[t];return null}addEventListener(e,t){this.eventService.addEventListener(e,t)}removeEventListener(e,t){this.eventService.removeEventListener(e,t)}onTouchStart(t){if(this.touching)return;this.touchStart=t.touches[0],this.touching=!0,this.moved=!1;const i=this.touchStart;window.setTimeout(()=>{const n=this.touchStart===i;if(this.touching&&n&&!this.moved){this.moved=!0;const i={type:e.EVENT_LONG_TAP,touchStart:this.touchStart,touchEvent:t};this.eventService.dispatchEvent(i)}},500)}onTouchMove(e){if(!this.touching)return;const t=this.getActiveTouch(e.touches);t&&!ns(t,this.touchStart,4)&&(this.moved=!0)}onTouchEnd(t){if(this.touching){if(!this.moved){const t={type:e.EVENT_TAP,touchStart:this.touchStart};this.eventService.dispatchEvent(t),this.checkForDoubleTap()}this.preventMouseClick&&t.cancelable&&t.preventDefault(),this.touching=!1}}checkForDoubleTap(){const t=(new Date).getTime();if(this.lastTapTime&&this.lastTapTime>0)if(t-this.lastTapTime>e.DOUBLE_TAP_MILLIS){const t={type:e.EVENT_DOUBLE_TAP,touchStart:this.touchStart};this.eventService.dispatchEvent(t),this.lastTapTime=null}else this.lastTapTime=t;else this.lastTapTime=t}destroy(){this.destroyFuncs.forEach(e=>e())}};fr.EVENT_TAP="tap",fr.EVENT_DOUBLE_TAP="doubleTap",fr.EVENT_LONG_TAP="longTap",fr.DOUBLE_TAP_MILLIS=500;var mr=fr,vr=class e extends Cs{constructor(t){super(),t||this.setTemplate(e.TEMPLATE)}attachCustomElements(e,t,i,n,s){this.eSortOrder=e,this.eSortAsc=t,this.eSortDesc=i,this.eSortMixed=n,this.eSortNone=s}setupSort(e,t=!1){this.column=e,this.suppressOrder=t,this.setupMultiSortIndicator(),(this.column.isSortable()||this.column.getColDef().showRowGroup)&&(this.addInIcon("sortAscending",this.eSortAsc,e),this.addInIcon("sortDescending",this.eSortDesc,e),this.addInIcon("sortUnSort",this.eSortNone,e),this.addManagedPropertyListener("unSortIcon",()=>this.updateIcons()),this.addManagedListener(this.eventService,lt.EVENT_NEW_COLUMNS_LOADED,()=>this.updateIcons()),this.addManagedListener(this.eventService,lt.EVENT_SORT_CHANGED,()=>this.onSortChanged()),this.addManagedListener(this.eventService,lt.EVENT_COLUMN_ROW_GROUP_CHANGED,()=>this.onSortChanged()),this.onSortChanged())}addInIcon(e,t,i){if(null==t)return;const n=Yn(e,this.gos,i);n&&t.appendChild(n)}onSortChanged(){this.updateIcons(),this.suppressOrder||this.updateSortOrder()}updateIcons(){const e=this.sortController.getDisplaySortForColumn(this.column);if(this.eSortAsc){const t="asc"===e;on(this.eSortAsc,t,{skipAriaHidden:!0})}if(this.eSortDesc){const t="desc"===e;on(this.eSortDesc,t,{skipAriaHidden:!0})}if(this.eSortNone){const t=!this.column.getColDef().unSortIcon&&!this.gos.get("unSortIcon"),i=null==e;on(this.eSortNone,!t&&i,{skipAriaHidden:!0})}}setupMultiSortIndicator(){this.addInIcon("sortUnSort",this.eSortMixed,this.column);const e=this.column.getColDef().showRowGroup;this.gos.isColumnsSortingCoupledToGroup()&&e&&(this.addManagedListener(this.eventService,lt.EVENT_SORT_CHANGED,()=>this.updateMultiSortIndicator()),this.addManagedListener(this.eventService,lt.EVENT_COLUMN_ROW_GROUP_CHANGED,()=>this.updateMultiSortIndicator()),this.updateMultiSortIndicator())}updateMultiSortIndicator(){if(this.eSortMixed){const e="mixed"===this.sortController.getDisplaySortForColumn(this.column);on(this.eSortMixed,e,{skipAriaHidden:!0})}}updateSortOrder(){var e;if(!this.eSortOrder)return;const t=this.sortController.getColumnsWithSortingOrdered(),i=null!=(e=this.sortController.getDisplaySortIndexForColumn(this.column))?e:-1,n=t.some(e=>{var t;return null!=(t=this.sortController.getDisplaySortIndexForColumn(e))&&t}),s=i>=0&&n;on(this.eSortOrder,s,{skipAriaHidden:!0}),i>=0?this.eSortOrder.textContent=(i+1).toString():Cn(this.eSortOrder)}};vr.TEMPLATE='<span class="ag-sort-indicator-container">\n            <span ref="eSortOrder" class="ag-sort-indicator-icon ag-sort-order ag-hidden" aria-hidden="true"></span>\n            <span ref="eSortAsc" class="ag-sort-indicator-icon ag-sort-ascending-icon ag-hidden" aria-hidden="true"></span>\n            <span ref="eSortDesc" class="ag-sort-indicator-icon ag-sort-descending-icon ag-hidden" aria-hidden="true"></span>\n            <span ref="eSortMixed" class="ag-sort-indicator-icon ag-sort-mixed-icon ag-hidden" aria-hidden="true"></span>\n            <span ref="eSortNone" class="ag-sort-indicator-icon ag-sort-none-icon ag-hidden" aria-hidden="true"></span>\n        </span>',g([Ss("eSortOrder")],vr.prototype,"eSortOrder",2),g([Ss("eSortAsc")],vr.prototype,"eSortAsc",2),g([Ss("eSortDesc")],vr.prototype,"eSortDesc",2),g([Ss("eSortMixed")],vr.prototype,"eSortMixed",2),g([Ss("eSortNone")],vr.prototype,"eSortNone",2),g([he("columnModel")],vr.prototype,"columnModel",2),g([he("sortController")],vr.prototype,"sortController",2);var yr=vr,Cr=class e extends Cs{constructor(){super(...arguments),this.lastMovingChanged=0}destroy(){super.destroy()}refresh(e){const t=this.params;return this.params=e,this.workOutTemplate()==this.currentTemplate&&this.workOutShowMenu()==this.currentShowMenu&&this.workOutSort()==this.currentSort&&this.shouldSuppressMenuHide()==this.currentSuppressMenuHide&&t.enableFilterButton==e.enableFilterButton&&t.enableFilterIcon==e.enableFilterIcon&&(this.setDisplayName(e),!0)}workOutTemplate(){var t;let i=null!=(t=this.params.template)?t:e.TEMPLATE;return i=i&&i.trim?i.trim():i,i}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=yt(this.currentDisplayName,!0);this.eText&&(this.eText.textContent=t)}}addInIcon(e,t,i){if(null==t)return;const n=Yn(e,this.gos,i);n&&t.appendChild(n)}setupTap(){const{gos:e}=this;if(e.get("suppressTouch"))return;const t=new mr(this.getGui(),!0),i=this.shouldSuppressMenuHide(),n=i&&y(this.eMenu),s=n?new mr(this.eMenu,!0):t;if(this.params.enableMenu){const e=n?"EVENT_TAP":"EVENT_LONG_TAP",t=e=>this.params.showColumnMenuAfterMouseClick(e.touchStart);this.addManagedListener(s,mr[e],t)}if(this.params.enableSorting){const e=e=>{var t,n;const s=e.touchStart.target;i&&((null==(t=this.eMenu)?void 0:t.contains(s))||(null==(n=this.eFilterButton)?void 0:n.contains(s)))||this.sortController.progressSort(this.params.column,!1,"uiColumnSorted")};this.addManagedListener(t,mr.EVENT_TAP,e)}if(this.params.enableFilterButton){const e=new mr(this.eFilterButton,!0);this.addManagedListener(e,"tap",()=>this.params.showFilter(this.eFilterButton)),this.addDestroyFunc(()=>e.destroy())}this.addDestroyFunc(()=>t.destroy()),n&&this.addDestroyFunc(()=>s.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)return bn(this.eMenu),void(this.eMenu=void 0);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,s;const{column:r}=this.params,o=this.menuService.isLegacyMenuEnabled();if(e&&!o){if(this.menuService.isFilterMenuInHeaderEnabled(r))return this.params.showFilter(null!=(i=null!=(t=this.eFilterButton)?t:this.eMenu)?i:this.getGui()),!0}else if(this.params.enableMenu)return this.params.showColumnMenu(null!=(s=null!=(n=this.eMenu)?n:this.eFilterButton)?s:this.getGui()),!0;return!1}workOutSort(){return this.params.enableSorting}setupSort(){if(this.currentSort=this.params.enableSorting,this.eSortIndicator||(this.eSortIndicator=this.context.createBean(new yr(!0)),this.eSortIndicator.attachCustomElements(this.eSortOrder,this.eSortAsc,this.eSortDesc,this.eSortMixed,this.eSortNone)),this.eSortIndicator.setupSort(this.params.column),!this.currentSort)return;this.addManagedListener(this.params.column,Se.EVENT_MOVING_CHANGED,()=>{this.lastMovingChanged=(new Date).getTime()}),this.eLabel&&this.addManagedListener(this.eLabel,"click",e=>{const t=this.params.column.isMoving(),i=(new Date).getTime()-this.lastMovingChanged<50;if(!t&&!i){const t="ctrl"===this.gos.get("multiSortKey")?e.ctrlKey||e.metaKey:e.shiftKey;this.params.progressSort(t)}});const e=()=>{if(this.addOrRemoveCssClass("ag-header-cell-sorted-asc",this.params.column.isSortAscending()),this.addOrRemoveCssClass("ag-header-cell-sorted-desc",this.params.column.isSortDescending()),this.addOrRemoveCssClass("ag-header-cell-sorted-none",this.params.column.isSortNone()),this.params.column.getColDef().showRowGroup){const e=this.columnModel.getSourceColumnsForGroupColumn(this.params.column),t=!(null==e?void 0:e.every(e=>this.params.column.getSort()==e.getSort()));this.addOrRemoveCssClass("ag-header-cell-sorted-mixed",t)}};this.addManagedListener(this.eventService,lt.EVENT_SORT_CHANGED,e),this.addManagedListener(this.eventService,lt.EVENT_COLUMN_ROW_GROUP_CHANGED,e)}setupFilterIcon(){this.eFilter&&this.configureFilter(this.params.enableFilterIcon,this.eFilter,this.onFilterChangedIcon.bind(this))}setupFilterButton(){this.eFilterButton&&(this.configureFilter(this.params.enableFilterButton,this.eFilterButton,this.onFilterChangedButton.bind(this))?this.addManagedListener(this.eFilterButton,"click",()=>this.params.showFilter(this.eFilterButton)):this.eFilterButton=void 0)}configureFilter(e,t,i){if(!e)return bn(t),!1;const{column:n}=this.params;return this.addInIcon("filter",t,n),this.addManagedListener(n,Se.EVENT_FILTER_CHANGED,i),i(),!0}onFilterChangedIcon(){const e=this.params.column.isFilterActive();on(this.eFilter,e,{skipAriaHidden:!0})}onFilterChangedButton(){const e=this.params.column.isFilterActive();this.eFilterButton.classList.toggle("ag-filter-active",e)}getAnchorElementForMenu(e){var t,i,n,s;return e?null!=(i=null!=(t=this.eFilterButton)?t:this.eMenu)?i:this.getGui():null!=(s=null!=(n=this.eMenu)?n:this.eFilterButton)?s:this.getGui()}};Cr.TEMPLATE='<div class="ag-cell-label-container" role="presentation">\n            <span ref="eMenu" class="ag-header-icon ag-header-cell-menu-button" aria-hidden="true"></span>\n            <span ref="eFilterButton" class="ag-header-icon ag-header-cell-filter-button" aria-hidden="true"></span>\n            <div ref="eLabel" class="ag-header-cell-label" role="presentation">\n                <span ref="eText" class="ag-header-cell-text"></span>\n                <span ref="eFilter" class="ag-header-icon ag-header-label-icon ag-filter-icon" aria-hidden="true"></span>\n                <ag-sort-indicator ref="eSortIndicator"></ag-sort-indicator>\n            </div>\n        </div>',g([he("sortController")],Cr.prototype,"sortController",2),g([he("menuService")],Cr.prototype,"menuService",2),g([he("columnModel")],Cr.prototype,"columnModel",2),g([Ss("eFilter")],Cr.prototype,"eFilter",2),g([Ss("eFilterButton")],Cr.prototype,"eFilterButton",2),g([Ss("eSortIndicator")],Cr.prototype,"eSortIndicator",2),g([Ss("eMenu")],Cr.prototype,"eMenu",2),g([Ss("eLabel")],Cr.prototype,"eLabel",2),g([Ss("eText")],Cr.prototype,"eText",2),g([Ss("eSortOrder")],Cr.prototype,"eSortOrder",2),g([Ss("eSortAsc")],Cr.prototype,"eSortAsc",2),g([Ss("eSortDesc")],Cr.prototype,"eSortDesc",2),g([Ss("eSortMixed")],Cr.prototype,"eSortMixed",2),g([Ss("eSortNone")],Cr.prototype,"eSortNone",2);var br=Cr,Sr=class e extends Cs{constructor(){super(e.TEMPLATE)}destroy(){super.destroy()}init(e){this.params=e,this.checkWarnings(),this.setupLabel(),this.addGroupExpandIcon(),this.setupExpandIcons()}checkWarnings(){this.params.template&&z("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=e=>{if(qe(e))return;const t=!this.params.columnGroup.isExpanded();this.columnModel.setColumnGroupOpened(this.params.columnGroup.getProvidedColumnGroup(),t,"uiColumnExpanded")};this.addTouchAndClickListeners(this.eCloseIcon,e),this.addTouchAndClickListeners(this.eOpenIcon,e);const t=e=>{Ye(e)};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,xe.EVENT_EXPANDED_CHANGED,this.updateIconVisibility.bind(this)),this.addManagedListener(i,xe.EVENT_EXPANDABLE_CHANGED,this.updateIconVisibility.bind(this))}addTouchAndClickListeners(e,t){const i=new mr(e,!0);this.addManagedListener(i,mr.EVENT_TAP,t),this.addDestroyFunc(()=>i.destroy()),this.addManagedListener(e,"click",t)}updateIconVisibility(){if(this.params.columnGroup.isExpandable()){const e=this.params.columnGroup.isExpanded();on(this.eOpenIcon,e),on(this.eCloseIcon,!e)}else on(this.eOpenIcon,!1),on(this.eCloseIcon,!1)}addInIcon(e,t){const i=Yn(e,this.gos,null);i&&this.getRefElement(t).appendChild(i)}addGroupExpandIcon(){if(!this.params.columnGroup.isExpandable())return on(this.eOpenIcon,!1),void on(this.eCloseIcon,!1)}setupLabel(){var e;const{displayName:t,columnGroup:i}=this.params;if(y(t)){const e=yt(t,!0);this.getRefElement("agLabel").textContent=e}this.addOrRemoveCssClass("ag-sticky-label",!(null==(e=i.getColGroupDef())?void 0:e.suppressStickyLabel))}};Sr.TEMPLATE='<div class="ag-header-group-cell-label" ref="agContainer" role="presentation">\n            <span ref="agLabel" class="ag-header-group-text" role="presentation"></span>\n            <span ref="agOpened" class="ag-header-icon ag-header-expand-icon ag-header-expand-icon-expanded"></span>\n            <span ref="agClosed" class="ag-header-icon ag-header-expand-icon ag-header-expand-icon-collapsed"></span>\n        </div>',g([he("columnModel")],Sr.prototype,"columnModel",2),g([Ss("agOpened")],Sr.prototype,"eOpenIcon",2),g([Ss("agClosed")],Sr.prototype,"eCloseIcon",2);var wr=Sr,xr=class extends Cs{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()}},Er=class e extends xr{constructor(){super(e.TEMPLATE)}init(e){this.params=e,this.focusAfterAttached=e.cellStartedEdit,this.eTextArea.setMaxLength(e.maxLength||200).setCols(e.cols||60).setRows(e.rows||10),y(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===Xn.LEFT||t===Xn.UP||t===Xn.RIGHT||t===Xn.DOWN||e.shiftKey&&t===Xn.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 y(e)||y(this.params.value)?this.params.parseValue(e):this.params.value}};Er.TEMPLATE='<div class="ag-large-text">\n            <ag-input-text-area ref="eTextArea" class="ag-large-text-input"></ag-input-text-area>\n        </div>',g([Ss("eTextArea")],Er.prototype,"eTextArea",2);var Mr=Er,Ar=class extends xr{constructor(){super('<div class="ag-cell-edit-wrapper">\n                <ag-select class="ag-cell-editor" ref="eSelect"></ag-select>\n            </div>'),this.startedByEnter=!1}init(e){this.focusAfterAttached=e.cellStartedEdit;const{eSelect:t,valueService:i,gos:n}=this,{values:s,value:r,eventKey:o}=e;if(C(s))return void console.warn("AG Grid: no values found for select cellEditor");this.startedByEnter=null!=o&&o===Xn.ENTER;let a=!1;s.forEach(n=>{const s={value:n},o=i.formatValue(e.column,null,n),l=null!=o;s.text=l?o:n,t.addOption(s),a=a||r===n}),a?t.setValue(e.value,!0):e.values.length&&t.setValue(e.values[0],!0);const{valueListGap:l,valueListMaxWidth:c,valueListMaxHeight:h}=e;null!=l&&t.setPickerGap(l),null!=h&&t.setPickerMaxHeight(h),null!=c&&t.setPickerMaxWidth(c),"fullRow"!==n.get("editType")&&this.addManagedListener(this.eSelect,Bs.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}};g([he("valueService")],Ar.prototype,"valueService",2),g([Ss("eSelect")],Ar.prototype,"eSelect",2);var Tr=class extends xr{constructor(e){super(`\n            <div class="ag-cell-edit-wrapper">\n                ${e.getTemplate()}\n            </div>`),this.cellEditorInput=e}init(e){this.params=e;const t=this.eInput;let i;if(this.cellEditorInput.init(t,e),e.cellStartedEdit){this.focusAfterAttached=!0;const t=e.eventKey;t===Xn.BACKSPACE||e.eventKey===Xn.DELETE?i="":t&&1===t.length?i=t:(i=this.cellEditorInput.getStartValue(),t!==Xn.F2&&(this.highlightAllOnFocus=!0))}else this.focusAfterAttached=!1,i=this.cellEditorInput.getStartValue();null!=i&&t.setStartValue(i),this.addManagedListener(t.getGui(),"keydown",e=>{const{key:t}=e;t!==Xn.PAGE_UP&&t!==Xn.PAGE_DOWN||e.preventDefault()})}afterGuiAttached(){var e,t;const i=this.localeService.getLocaleTextFunc(),n=this.eInput;if(n.setInputAriaLabel(i("ariaInputEditor","Input Editor")),!this.focusAfterAttached)return;Ai()||n.getFocusableElement().focus();const s=n.getInputElement();this.highlightAllOnFocus?s.select():null==(t=(e=this.cellEditorInput).setCaret)||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}};g([Ss("eInput")],Tr.prototype,"eInput",2);var Dr=class{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,null!=t.maxLength&&e.setMaxLength(t.maxLength)}getValue(){const e=this.eInput.getValue();return y(e)||y(this.params.value)?this.params.parseValue(e):this.params.value}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=y(e)&&e.length||0;t&&this.eInput.getInputElement().setSelectionRange(t,t)}},Ir=class extends Tr{constructor(){super(new Dr)}},Rr=class extends Cs{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),s=y(n)?n:i,r=t>=0;this.eDelta.textContent=r?"↑"+s:"↓"+s,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"),Cn(this.eDelta)}refresh(e,t=!1){const i=e.value;if(i===this.lastValue)return!1;if(y(e.valueFormatted)?this.eValue.textContent=e.valueFormatted:y(e.value)?this.eValue.textContent=i:Cn(this.eValue),this.filterManager.isSuppressFlashingCellsBecauseFiltering())return!1;if("number"==typeof i&&"number"==typeof this.lastValue){const t=i-this.lastValue;this.showDelta(e,t)}return this.lastValue&&this.eValue.classList.add("ag-value-change-value-highlight"),t||this.setTimerToRemoveDelta(),this.lastValue=i,!0}};g([he("filterManager")],Rr.prototype,"filterManager",2);var Lr=class extends Cs{constructor(){super(),this.refreshCount=0;const e=document.createElement("span"),t=document.createElement("span");t.setAttribute("class","ag-value-slide-current"),e.appendChild(t),this.setTemplateFromElement(e),this.eCurrent=this.queryForHtmlElement(".ag-value-slide-current")}init(e){this.refresh(e,!0)}addSlideAnimation(){this.refreshCount++;const e=this.refreshCount;this.ePrevious&&this.getGui().removeChild(this.ePrevious);const t=document.createElement("span");t.setAttribute("class","ag-value-slide-previous ag-value-slide-out"),this.ePrevious=t,this.ePrevious.textContent=this.eCurrent.textContent,this.getGui().insertBefore(this.ePrevious,this.eCurrent),this.getFrameworkOverrides().wrapIncoming(()=>{window.setTimeout(()=>{e===this.refreshCount&&this.ePrevious.classList.add("ag-value-slide-out-end")},50),window.setTimeout(()=>{e===this.refreshCount&&(this.getGui().removeChild(this.ePrevious),this.ePrevious=null)},3e3)})}refresh(e,t=!1){let i=e.value;return C(i)&&(i=""),i!==this.lastValue&&!this.filterManager.isSuppressFlashingCellsBecauseFiltering()&&(t||this.addSlideAnimation(),this.lastValue=i,y(e.valueFormatted)?this.eCurrent.textContent=e.valueFormatted:y(e.value)?this.eCurrent.textContent=i:Cn(this.eCurrent),!0)}};g([he("filterManager")],Lr.prototype,"filterManager",2);var kr=class e{constructor(t){this.rowIndex=null,this.key=null,this.childrenMapped={},this.displayed=!1,this.rowTop=null,this.oldRowTop=null,this.selectable=!0,this.__objectId=e.OBJECT_ID_SEQUENCE++,this.__autoHeights={},this.alreadyRendered=!1,this.highlighted=null,this.hovered=!1,this.selected=!1,this.beans=t}setData(e){this.setDataCommon(e,!1)}updateData(e){this.setDataCommon(e,!0)}setDataCommon(e,t){const i=this.data;this.data=e,this.beans.valueCache.onDataChanged(),this.updateDataOnDetailNode(),this.checkRowSelectable(),this.resetQuickFilterAggregateText();const n=this.createDataChangedEvent(e,i,t);this.dispatchLocalEvent(n)}updateDataOnDetailNode(){this.detailNode&&(this.detailNode.data=this.data)}createDataChangedEvent(t,i,n){return{type:e.EVENT_DATA_CHANGED,node:this,oldData:i,newData:t,update:n}}createLocalRowEvent(e){return{type:e,node:this}}getRowIndexString(){return"top"===this.rowPinned?"t-"+this.rowIndex:"bottom"===this.rowPinned?"b-"+this.rowIndex:this.rowIndex.toString()}createDaemonNode(){const t=new e(this.beans);return t.id=this.id,t.data=this.data,t.__daemon=!0,t.selected=this.selected,t.level=this.level,t}setDataAndId(e,t){const i=y(this.id)?this.createDaemonNode():null,n=this.data;this.data=e,this.updateDataOnDetailNode(),this.setId(t),this.checkRowSelectable(),this.beans.selectionService.syncInRowNode(this,i);const s=this.createDataChangedEvent(e,n,!1);this.dispatchLocalEvent(s)}checkRowSelectable(){const e=this.beans.gos.get("isRowSelectable");this.setRowSelectable(!e||e(this))}setRowSelectable(t,i){if(this.selectable!==t){if(this.selectable=t,this.eventService&&this.eventService.dispatchEvent(this.createLocalRowEvent(e.EVENT_SELECTABLE_CHANGED)),i)return;if(this.beans.gos.get("groupSelectsChildren")){const e=this.calculateSelectedFromChildren();return void this.setSelectedParams({newValue:null!=e&&e,source:"selectableChanged"})}this.isSelected()&&!this.selectable&&this.setSelectedParams({newValue:!1,source:"selectableChanged"})}}setId(t){const i=this.beans.gos.getCallback("getRowId");if(i)if(this.data){const t=this.getGroupKeys(!0);this.id=i({data:this.data,parentKeys:t.length>0?t:void 0,level:this.level}),null!==this.id&&"string"==typeof this.id&&this.id.startsWith(e.ID_PREFIX_ROW_GROUP)&&console.error(`AG Grid: Row IDs cannot start with ${e.ID_PREFIX_ROW_GROUP}, this is a reserved prefix for AG Grid's row grouping feature.`),null!==this.id&&"string"!=typeof this.id&&(this.id=""+this.id)}else this.id=void 0;else this.id=t}getGroupKeys(e=!1){const t=[];let i=this;for(e&&(i=i.parent);i&&i.level>=0;)t.push(i.key),i=i.parent;return t.reverse(),t}isPixelInRange(e){return!(!y(this.rowTop)||!y(this.rowHeight))&&e>=this.rowTop&&e<this.rowTop+this.rowHeight}setFirstChild(t){this.firstChild!==t&&(this.firstChild=t,this.eventService&&this.eventService.dispatchEvent(this.createLocalRowEvent(e.EVENT_FIRST_CHILD_CHANGED)))}setLastChild(t){this.lastChild!==t&&(this.lastChild=t,this.eventService&&this.eventService.dispatchEvent(this.createLocalRowEvent(e.EVENT_LAST_CHILD_CHANGED)))}setChildIndex(t){this.childIndex!==t&&(this.childIndex=t,this.eventService&&this.eventService.dispatchEvent(this.createLocalRowEvent(e.EVENT_CHILD_INDEX_CHANGED)))}setRowTop(t){this.oldRowTop=this.rowTop,this.rowTop!==t&&(this.rowTop=t,this.eventService&&this.eventService.dispatchEvent(this.createLocalRowEvent(e.EVENT_TOP_CHANGED)),this.setDisplayed(null!==t))}clearRowTopAndRowIndex(){this.oldRowTop=null,this.setRowTop(null),this.setRowIndex(null)}setDisplayed(t){this.displayed!==t&&(this.displayed=t,this.eventService&&this.eventService.dispatchEvent(this.createLocalRowEvent(e.EVENT_DISPLAYED_CHANGED)))}setDragging(t){this.dragging!==t&&(this.dragging=t,this.eventService&&this.eventService.dispatchEvent(this.createLocalRowEvent(e.EVENT_DRAGGING_CHANGED)))}setHighlighted(t){t!==this.highlighted&&(this.highlighted=t,this.eventService&&this.eventService.dispatchEvent(this.createLocalRowEvent(e.EVENT_HIGHLIGHT_CHANGED)))}setHovered(e){this.hovered!==e&&(this.hovered=e)}isHovered(){return this.hovered}setAllChildrenCount(t){this.allChildrenCount!==t&&(this.allChildrenCount=t,this.eventService&&this.eventService.dispatchEvent(this.createLocalRowEvent(e.EVENT_ALL_CHILDREN_COUNT_CHANGED)))}setMaster(t){this.master!==t&&(this.master&&!t&&(this.expanded=!1),this.master=t,this.eventService&&this.eventService.dispatchEvent(this.createLocalRowEvent(e.EVENT_MASTER_CHANGED)))}setGroup(t){this.group!==t&&(this.group&&!t&&(this.expanded=!1),this.group=t,this.updateHasChildren(),this.eventService&&this.eventService.dispatchEvent(this.createLocalRowEvent(e.EVENT_GROUP_CHANGED)))}setRowHeight(t,i=!1){this.rowHeight=t,this.rowHeightEstimated=i,this.eventService&&this.eventService.dispatchEvent(this.createLocalRowEvent(e.EVENT_HEIGHT_CHANGED))}setRowAutoHeight(e,t){this.__autoHeights||(this.__autoHeights={}),this.__autoHeights[t.getId()]=e,null!=e&&(null==this.checkAutoHeightsDebounced&&(this.checkAutoHeightsDebounced=Z(this.checkAutoHeights.bind(this),1)),this.checkAutoHeightsDebounced())}checkAutoHeights(){let e=!1,t=!0,i=0;const n=this.__autoHeights;if(null==n)return;if(this.beans.columnModel.getAllDisplayedAutoHeightCols().forEach(s=>{let r=n[s.getId()];if(null==r){if(!this.beans.columnModel.isColSpanActive())return void(e=!0);{let t=[];switch(s.getPinned()){case"left":t=this.beans.columnModel.getDisplayedLeftColumnsForRow(this);break;case"right":t=this.beans.columnModel.getDisplayedRightColumnsForRow(this);break;case null:t=this.beans.columnModel.getViewportCenterColumnsForRow(this)}if(t.includes(s))return void(e=!0);r=-1}}else t=!1;r>i&&(i=r)}),e)return;if((t||i<10)&&(i=this.beans.gos.getRowHeightForNode(this).height),i==this.rowHeight)return;this.setRowHeight(i);const s=this.beans.rowModel;s.onRowHeightChangedDebounced&&s.onRowHeightChangedDebounced()}setRowIndex(t){this.rowIndex!==t&&(this.rowIndex=t,this.eventService&&this.eventService.dispatchEvent(this.createLocalRowEvent(e.EVENT_ROW_INDEX_CHANGED)))}setUiLevel(t){this.uiLevel!==t&&(this.uiLevel=t,this.eventService&&this.eventService.dispatchEvent(this.createLocalRowEvent(e.EVENT_UI_LEVEL_CHANGED)))}setExpanded(t,i,n){if(this.expanded===t)return;this.expanded=t,this.eventService&&this.eventService.dispatchEvent(this.createLocalRowEvent(e.EVENT_EXPANDED_CHANGED));const s=Object.assign({},this.createGlobalRowEvent(lt.EVENT_ROW_GROUP_OPENED),{expanded:t,event:i||null});this.beans.rowNodeEventThrottle.dispatchExpanded(s,n),this.beans.rowRenderer.refreshCells({rowNodes:[this]})}createGlobalRowEvent(e){return this.beans.gos.addGridCommonParams({type:e,node:this,data:this.data,rowIndex:this.rowIndex,rowPinned:this.rowPinned})}dispatchLocalEvent(e){this.eventService&&this.eventService.dispatchEvent(e)}setDataValue(e,t,i){const n=(()=>{var t;return"string"!=typeof e?e:null!=(t=this.beans.columnModel.getGridColumn(e))?t:this.beans.columnModel.getPrimaryColumn(e)})(),s=this.getValueFromValueService(n);if(this.beans.gos.get("readOnlyEdit"))return this.dispatchEventForSaveValueReadOnly(n,s,t,i),!1;const r=this.beans.valueService.setValue(this,n,t,i);return this.dispatchCellChangedEvent(n,t,s),this.checkRowSelectable(),r}getValueFromValueService(e){var t,i;const n=this.leafGroup&&this.beans.columnModel.isPivotMode(),s=this.group&&this.expanded&&!this.footer&&!n;let r=!1;const o=null!=(t=this.beans.gos.get("groupTotalRow"))?t:this.beans.gos.get("groupIncludeFooter");r="function"!=typeof o?!!o:!!(null!=(i=this.beans.gos.getCallback("groupTotalRow"))?i:this.beans.gos.getCallback("groupIncludeFooter"))({node:this});const a=this.beans.gos.get("groupSuppressBlankHeader"),l=s&&r&&!a;return this.beans.valueService.getValue(e,this,!1,l)}dispatchEventForSaveValueReadOnly(e,t,i,n){const s=this.beans.gos.addGridCommonParams({type:lt.EVENT_CELL_EDIT_REQUEST,event:null,rowIndex:this.rowIndex,rowPinned:this.rowPinned,column:e,colDef:e.getColDef(),data:this.data,node:this,oldValue:t,newValue:i,value:i,source:n});this.beans.eventService.dispatchEvent(s)}setGroupValue(e,t){const i=this.beans.columnModel.getGridColumn(e);C(this.groupData)&&(this.groupData={});const n=i.getColId(),s=this.groupData[n];s!==t&&(this.groupData[n]=t,this.dispatchCellChangedEvent(i,t,s))}setAggData(e){const t=this.aggData;if(this.aggData=e,this.eventService){const i=e=>{const i=this.aggData?this.aggData[e]:void 0,n=t?t[e]:void 0;if(i===n)return;const s=this.beans.columnModel.lookupGridColumn(e);s&&this.dispatchCellChangedEvent(s,i,n)};for(const e in this.aggData)i(e);for(const t in e)t in this.aggData||i(t)}}updateHasChildren(){let t=this.group&&!this.footer||this.childrenAfterGroup&&this.childrenAfterGroup.length>0;if(this.beans.gos.isRowModelType("serverSide")){const e=this.beans.gos.get("treeData"),i=this.beans.gos.get("isServerSideGroup");t=!this.stub&&!this.footer&&(e?!!i&&i(this.data):!!this.group)}t!==this.__hasChildren&&(this.__hasChildren=!!t,this.eventService&&this.eventService.dispatchEvent(this.createLocalRowEvent(e.EVENT_HAS_CHILDREN_CHANGED)))}hasChildren(){return null==this.__hasChildren&&this.updateHasChildren(),this.__hasChildren}isEmptyRowGroupNode(){return this.group&&b(this.childrenAfterGroup)}dispatchCellChangedEvent(t,i,n){const s={type:e.EVENT_CELL_CHANGED,node:this,column:t,newValue:i,oldValue:n};this.dispatchLocalEvent(s)}resetQuickFilterAggregateText(){this.quickFilterAggregateText=null}isExpandable(){return!this.footer&&(this.beans.columnModel.isPivotMode()?this.hasChildren()&&!this.leafGroup:this.hasChildren()||!!this.master)}isSelected(){return this.footer?this.sibling.isSelected():this.selected}depthFirstSearch(e){this.childrenAfterGroup&&this.childrenAfterGroup.forEach(t=>t.depthFirstSearch(e)),e(this)}calculateSelectedFromChildren(){var e;let t=!1,i=!1,n=!1;if(!(null==(e=this.childrenAfterGroup)?void 0:e.length))return this.selectable?this.selected:null;for(let e=0;e<this.childrenAfterGroup.length;e++){const s=this.childrenAfterGroup[e];let r=s.isSelected();if(!s.selectable){const e=s.calculateSelectedFromChildren();if(null===e)continue;r=e}switch(r){case!0:t=!0;break;case!1:i=!0;break;default:n=!0}}return n||t&&i?void 0:!!t||!i&&(this.selectable?this.selected:null)}setSelectedInitialValue(e){this.selected=e}selectThisNode(t,i,n="api"){const s=!this.selectable&&t,r=this.selected===t;if(s||r)return!1;this.selected=t,this.eventService&&this.dispatchLocalEvent(this.createLocalRowEvent(e.EVENT_ROW_SELECTED));const o=this.sibling;o&&o.footer&&o.eventService&&o.dispatchLocalEvent(o.createLocalRowEvent(e.EVENT_ROW_SELECTED));const a=u(d({},this.createGlobalRowEvent(lt.EVENT_ROW_SELECTED)),{event:i||null,source:n});return this.beans.eventService.dispatchEvent(a),!0}setSelected(e,t=!1,i="api"){"boolean"!=typeof i?this.setSelectedParams({newValue:e,clearSelection:t,rangeSelect:!1,source:i}):console.warn("AG Grid: since version v30, rowNode.setSelected() property `suppressFinishActions` has been removed, please use `gridApi.setNodesSelected()` for bulk actions, and the event `source` property for ignoring events instead.")}setSelectedParams(e){return this.rowPinned?(console.warn("AG Grid: cannot select pinned rows"),0):void 0===this.id?(console.warn("AG Grid: cannot select node until id for node is known"),0):this.beans.selectionService.setNodesSelected(u(d({},e),{nodes:[this.footer?this.sibling:this]}))}isRowPinned(){return"top"===this.rowPinned||"bottom"===this.rowPinned}isParentOfNode(e){let t=this.parent;for(;t;){if(t===e)return!0;t=t.parent}return!1}addEventListener(e,t){var i,n;this.eventService||(this.eventService=new fe),this.beans.frameworkOverrides.shouldWrapOutgoing&&!this.frameworkEventListenerService&&(this.eventService.setFrameworkOverrides(this.beans.frameworkOverrides),this.frameworkEventListenerService=new me(this.beans.frameworkOverrides));const s=null!=(n=null==(i=this.frameworkEventListenerService)?void 0:i.wrap(t))?n:t;this.eventService.addEventListener(e,s)}removeEventListener(e,t){var i,n;if(!this.eventService)return;const s=null!=(n=null==(i=this.frameworkEventListenerService)?void 0:i.unwrap(t))?n:t;this.eventService.removeEventListener(e,s),this.eventService.noRegisteredListenersExist()&&(this.eventService=null)}onMouseEnter(){this.dispatchLocalEvent(this.createLocalRowEvent(e.EVENT_MOUSE_ENTER))}onMouseLeave(){this.dispatchLocalEvent(this.createLocalRowEvent(e.EVENT_MOUSE_LEAVE))}getFirstChildOfFirstChild(e){let t=this,i=!0,n=!1,s=null;for(;i&&!n;){const r=t.parent;y(r)&&t.firstChild?r.rowGroupColumn===e&&(n=!0,s=r):i=!1,t=r}return n?s:null}isFullWidthCell(){if(this.detail)return!0;const e=this.beans.gos.getCallback("isFullWidthRow");return!!e&&e({rowNode:this})}getRoute(){if(null==this.key)return;const e=[];let t=this;for(;null!=t.key;)e.push(t.key),t=t.parent;return e.reverse()}createFooter(){if(this.sibling)return;const t=new Set(["eventService","__objectId","sticky"]),i=new e(this.beans);Object.keys(this).forEach(e=>{t.has(e)||(i[e]=this[e])}),i.footer=!0,i.setRowTop(null),i.setRowIndex(null),i.oldRowTop=null,i.id="rowGroupFooter_"+this.id,i.sibling=this,this.sibling=i}destroyFooter(){this.sibling&&(this.sibling.setRowTop(null),this.sibling.setRowIndex(null),this.sibling=void 0)}};kr.ID_PREFIX_ROW_GROUP="row-group-",kr.ID_PREFIX_TOP_PINNED="t-",kr.ID_PREFIX_BOTTOM_PINNED="b-",kr.OBJECT_ID_SEQUENCE=0,kr.EVENT_ROW_SELECTED="rowSelected",kr.EVENT_DATA_CHANGED="dataChanged",kr.EVENT_CELL_CHANGED="cellChanged",kr.EVENT_ALL_CHILDREN_COUNT_CHANGED="allChildrenCountChanged",kr.EVENT_MASTER_CHANGED="masterChanged",kr.EVENT_GROUP_CHANGED="groupChanged",kr.EVENT_MOUSE_ENTER="mouseEnter",kr.EVENT_MOUSE_LEAVE="mouseLeave",kr.EVENT_HEIGHT_CHANGED="heightChanged",kr.EVENT_TOP_CHANGED="topChanged",kr.EVENT_DISPLAYED_CHANGED="displayedChanged",kr.EVENT_FIRST_CHILD_CHANGED="firstChildChanged",kr.EVENT_LAST_CHILD_CHANGED="lastChildChanged",kr.EVENT_CHILD_INDEX_CHANGED="childIndexChanged",kr.EVENT_ROW_INDEX_CHANGED="rowIndexChanged",kr.EVENT_EXPANDED_CHANGED="expandedChanged",kr.EVENT_HAS_CHILDREN_CHANGED="hasChildrenChanged",kr.EVENT_SELECTABLE_CHANGED="selectableChanged",kr.EVENT_UI_LEVEL_CHANGED="uiLevelChanged",kr.EVENT_HIGHLIGHT_CHANGED="rowHighlightChanged",kr.EVENT_DRAGGING_CHANGED="draggingChanged";var Pr=kr,Nr=class extends Cs{constructor(){super('\n            <div class="ag-selection-checkbox" role="presentation">\n                <ag-checkbox role="presentation" ref="eCheckbox"></ag-checkbox>\n            </div>')}postConstruct(){this.eCheckbox.setPassive(!0)}getCheckboxId(){return this.eCheckbox.getInputElement().id}onDataChanged(){this.onSelectionChanged()}onSelectableChanged(){this.showOrHideSelect()}onSelectionChanged(){const e=this.localeService.getLocaleTextFunc(),t=this.rowNode.isSelected(),i=mi(e,t),[n,s]=this.rowNode.selectable?["ariaRowToggleSelection","Press Space to toggle row selection"]:["ariaRowSelectionDisabled","Row Selection is disabled for this row"],r=e(n,s);this.eCheckbox.setValue(t,!0),this.eCheckbox.setInputAriaLabel(`${r} (${i})`)}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",e=>{Ye(e)}),this.addManagedListener(this.eCheckbox.getInputElement(),"click",e=>{Ye(e);const t=this.gos.get("groupSelectsFiltered"),i=this.eCheckbox.getValue();this.shouldHandleIndeterminateState(i,t)?0===this.onClicked(!0,t,e||{})&&this.onClicked(!1,t,e):i?this.onClicked(!1,t,e):this.onClicked(!0,t,e||{})}),this.addManagedListener(this.rowNode,Pr.EVENT_ROW_SELECTED,this.onSelectionChanged.bind(this)),this.addManagedListener(this.rowNode,Pr.EVENT_DATA_CHANGED,this.onDataChanged.bind(this)),this.addManagedListener(this.rowNode,Pr.EVENT_SELECTABLE_CHANGED,this.onSelectableChanged.bind(this)),this.gos.get("isRowSelectable")||"function"==typeof this.getIsVisible()){const e=this.showOrHideSelect.bind(this);this.addManagedListener(this.eventService,lt.EVENT_DISPLAYED_COLUMNS_CHANGED,e),this.addManagedListener(this.rowNode,Pr.EVENT_DATA_CHANGED,e),this.addManagedListener(this.rowNode,Pr.EVENT_CELL_CHANGED,e),this.showOrHideSelect()}this.eCheckbox.getInputElement().setAttribute("tabindex","-1")}shouldHandleIndeterminateState(e,t){return t&&(void 0===this.eCheckbox.getPreviousValue()||void 0===e)&&this.gos.isRowModelType("clientSide")}showOrHideSelect(){var e,t,i;let n=this.rowNode.selectable;const s=this.getIsVisible();if(n)if("function"==typeof s){const t=null==(e=this.overrides)?void 0:e.callbackParams;if(this.column){const e=this.column.createColumnFunctionCallbackParams(this.rowNode);n=s(d(d({},t),e))}else n=s(u(d({},t),{node:this.rowNode,data:this.rowNode.data}))}else n=null!=s&&s;if(null==(t=this.column)?void 0:t.getColDef().showDisabledCheckboxes)return this.eCheckbox.setDisabled(!n),this.setVisible(!0),void this.setDisplayed(!0);(null==(i=this.overrides)?void 0:i.removeHidden)?this.setDisplayed(n):this.setVisible(n)}getIsVisible(){var e,t;return this.overrides?this.overrides.isVisible:null==(t=null==(e=this.column)?void 0:e.getColDef())?void 0:t.checkboxSelection}};g([Ss("eCheckbox")],Nr.prototype,"eCheckbox",2),g([ae],Nr.prototype,"postConstruct",1);var Or=(e=>(e[e.Up=0]="Up",e[e.Down=1]="Down",e))(Or||{}),_r=(e=>(e[e.Left=0]="Left",e[e.Right=1]="Right",e))(_r||{}),Fr=(e=>(e[e.ToolPanel=0]="ToolPanel",e[e.HeaderCell=1]="HeaderCell",e[e.RowDrag=2]="RowDrag",e[e.ChartPanel=3]="ChartPanel",e[e.AdvancedFilterBuilder=4]="AdvancedFilterBuilder",e))(Fr||{}),Gr=class extends nt{constructor(){super(...arguments),this.dragSourceAndParamsList=[],this.dropTargets=[]}init(){this.ePinnedIcon=$n("columnMovePin",this.gos,null),this.eHideIcon=$n("columnMoveHide",this.gos,null),this.eMoveIcon=$n("columnMoveMove",this.gos,null),this.eLeftIcon=$n("columnMoveLeft",this.gos,null),this.eRightIcon=$n("columnMoveRight",this.gos,null),this.eGroupIcon=$n("columnMoveGroup",this.gos,null),this.eAggregateIcon=$n("columnMoveValue",this.gos,null),this.ePivotIcon=$n("columnMovePivot",this.gos,null),this.eDropNotAllowedIcon=$n("dropNotAllowed",this.gos,null)}addDragSource(e,t=!1){const i={eElement:e.eElement,dragStartPixels:e.dragStartPixels,onDragStart:this.onDragStart.bind(this,e),onDragStop:this.onDragStop.bind(this),onDragging:this.onDragging.bind(this),includeTouch:t};this.dragSourceAndParamsList.push({params:i,dragSource:e}),this.dragService.addDragSource(i)}removeDragSource(e){const t=this.dragSourceAndParamsList.find(t=>t.dragSource===e);t&&(this.dragService.removeDragSource(t.params),Ne(this.dragSourceAndParamsList,t))}clearDragSourceParamsList(){this.dragSourceAndParamsList.forEach(e=>this.dragService.removeDragSource(e.params)),this.dragSourceAndParamsList.length=0,this.dropTargets.length=0}nudge(){this.dragging&&this.onDragging(this.eventLastTime,!0)}onDragStart(e,t){this.dragging=!0,this.dragSource=e,this.eventLastTime=t,this.dragItem=this.dragSource.getDragItem(),this.lastDropTarget=void 0,this.dragSource.onDragStarted&&this.dragSource.onDragStarted(),this.createGhost()}onDragStop(e){if(this.eventLastTime=null,this.dragging=!1,this.dragSource.onDragStopped&&this.dragSource.onDragStopped(),this.lastDropTarget&&this.lastDropTarget.onDragStop){const t=this.createDropTargetEvent(this.lastDropTarget,e,null,null,!1);this.lastDropTarget.onDragStop(t)}this.lastDropTarget=null,this.dragItem=null,this.removeGhost()}onDragging(e,t){var i,n,s,r;const o=this.getHorizontalDirection(e),a=this.getVerticalDirection(e);this.eventLastTime=e,this.positionGhost(e);const l=this.dropTargets.filter(t=>this.isMouseOnDropTarget(e,t)),c=this.findCurrentDropTarget(e,l);if(c!==this.lastDropTarget)this.leaveLastTargetIfExists(e,o,a,t),null!==this.lastDropTarget&&null===c&&(null==(n=(i=this.dragSource).onGridExit)||n.call(i,this.dragItem)),null===this.lastDropTarget&&null!==c&&(null==(r=(s=this.dragSource).onGridEnter)||r.call(s,this.dragItem)),this.enterDragTargetIfExists(c,e,o,a,t),this.lastDropTarget=c;else if(c&&c.onDragging){const i=this.createDropTargetEvent(c,e,o,a,t);c.onDragging(i)}}getAllContainersFromDropTarget(e){const t=e.getSecondaryContainers?e.getSecondaryContainers():null,i=[[e.getContainer()]];return t?i.concat(t):i}allContainersIntersect(e,t){for(const i of t){const t=i.getBoundingClientRect();if(0===t.width||0===t.height)return!1;const n=e.clientX>=t.left&&e.clientX<t.right,s=e.clientY>=t.top&&e.clientY<t.bottom;if(!n||!s)return!1}return!0}isMouseOnDropTarget(e,t){const i=this.getAllContainersFromDropTarget(t);let n=!1;for(const t of i)if(this.allContainersIntersect(e,t)){n=!0;break}return!(t.targetContainsSource&&!t.getContainer().contains(this.dragSource.eElement))&&n&&t.isInterestedIn(this.dragSource.type,this.dragSource.eElement)}findCurrentDropTarget(e,t){const i=t.length;if(0===i)return null;if(1===i)return t[0];const n=this.gos.getRootNode().elementsFromPoint(e.clientX,e.clientY);for(const e of n)for(const i of t)if(-1!==He(this.getAllContainersFromDropTarget(i)).indexOf(e))return i;return null}enterDragTargetIfExists(e,t,i,n,s){if(e){if(e.onDragEnter){const r=this.createDropTargetEvent(e,t,i,n,s);e.onDragEnter(r)}this.setGhostIcon(e.getIconName?e.getIconName():null)}}leaveLastTargetIfExists(e,t,i,n){if(this.lastDropTarget){if(this.lastDropTarget.onDragLeave){const s=this.createDropTargetEvent(this.lastDropTarget,e,t,i,n);this.lastDropTarget.onDragLeave(s)}this.setGhostIcon(null)}}addDropTarget(e){this.dropTargets.push(e)}removeDropTarget(e){this.dropTargets=this.dropTargets.filter(t=>t.getContainer()!==e.getContainer())}hasExternalDropZones(){return this.dropTargets.some(e=>e.external)}findExternalZone(e){return this.dropTargets.filter(e=>e.external).find(t=>t.getContainer()===e.getContainer())||null}getHorizontalDirection(e){const t=this.eventLastTime&&this.eventLastTime.clientX,i=e.clientX;return t===i?null:t>i?0:1}getVerticalDirection(e){const t=this.eventLastTime&&this.eventLastTime.clientY,i=e.clientY;return t===i?null:t>i?0:1}createDropTargetEvent(e,t,i,n,s){const r=e.getContainer(),o=r.getBoundingClientRect(),{gridApi:a,columnApi:l,dragItem:c,dragSource:h}=this;return{event:t,x:t.clientX-o.left,y:t.clientY-o.top,vDirection:n,hDirection:i,dragSource:h,fromNudge:s,dragItem:c,api:a,columnApi:l,dropZoneTarget:r}}positionGhost(e){const t=this.eGhost;if(!t)return;const i=t.getBoundingClientRect().height,n=Oi()-2,s=_i()-2,r=fn(t.offsetParent),{clientY:o,clientX:a}=e;let l=o-r.top-i/2,c=a-r.left-10;const h=this.gos.getDocument(),d=h.defaultView||window,u=d.pageYOffset||h.documentElement.scrollTop,p=d.pageXOffset||h.documentElement.scrollLeft;n>0&&c+t.clientWidth>n+p&&(c=n+p-t.clientWidth),c<0&&(c=0),s>0&&l+t.clientHeight>s+u&&(l=s+u-t.clientHeight),l<0&&(l=0),t.style.left=`${c}px`,t.style.top=`${l}px`}removeGhost(){this.eGhost&&this.eGhostParent&&this.eGhostParent.removeChild(this.eGhost),this.eGhost=null}createGhost(){this.eGhost=xn(Gr.GHOST_TEMPLATE),this.mouseEventService.stampTopLevelGridCompWithGridInstance(this.eGhost);const{theme:e}=this.environment.getTheme();e&&this.eGhost.classList.add(e),this.eGhostIcon=this.eGhost.querySelector(".ag-dnd-ghost-icon"),this.setGhostIcon(null);const t=this.eGhost.querySelector(".ag-dnd-ghost-label");let i=this.dragSource.dragItemName;j(i)&&(i=i()),t.innerHTML=yt(i)||"",this.eGhost.style.height="25px",this.eGhost.style.top="20px",this.eGhost.style.left="20px";const n=this.gos.getDocument();let s=null,r=null;try{s=n.fullscreenElement}catch(e){}finally{s||(s=this.gos.getRootNode());r=s.querySelector("body")||(s instanceof ShadowRoot?s:s instanceof Document?null==s?void 0:s.documentElement:s)}this.eGhostParent=r,this.eGhostParent?this.eGhostParent.appendChild(this.eGhost):console.warn("AG Grid: could not find document body, it is needed for dragging columns")}setGhostIcon(e,t=!1){Cn(this.eGhostIcon);let i=null;switch(e||(e=this.dragSource.getDefaultIconName?this.dragSource.getDefaultIconName():Gr.ICON_NOT_ALLOWED),e){case Gr.ICON_PINNED:i=this.ePinnedIcon;break;case Gr.ICON_MOVE:i=this.eMoveIcon;break;case Gr.ICON_LEFT:i=this.eLeftIcon;break;case Gr.ICON_RIGHT:i=this.eRightIcon;break;case Gr.ICON_GROUP:i=this.eGroupIcon;break;case Gr.ICON_AGGREGATE:i=this.eAggregateIcon;break;case Gr.ICON_PIVOT:i=this.ePivotIcon;break;case Gr.ICON_NOT_ALLOWED:i=this.eDropNotAllowedIcon;break;case Gr.ICON_HIDE:i=this.eHideIcon}this.eGhostIcon.classList.toggle("ag-shake-left-to-right",t),i===this.eHideIcon&&this.gos.get("suppressDragLeaveHidesColumns")||i&&this.eGhostIcon.appendChild(i)}};Gr.ICON_PINNED="pinned",Gr.ICON_MOVE="move",Gr.ICON_LEFT="left",Gr.ICON_RIGHT="right",Gr.ICON_GROUP="group",Gr.ICON_AGGREGATE="aggregate",Gr.ICON_PIVOT="pivot",Gr.ICON_NOT_ALLOWED="notAllowed",Gr.ICON_HIDE="hide",Gr.GHOST_TEMPLATE='<div class="ag-dnd-ghost ag-unselectable">\n            <span class="ag-dnd-ghost-icon ag-shake-left-to-right"></span>\n            <div class="ag-dnd-ghost-label"></div>\n        </div>',g([he("dragService")],Gr.prototype,"dragService",2),g([he("mouseEventService")],Gr.prototype,"mouseEventService",2),g([he("columnApi")],Gr.prototype,"columnApi",2),g([he("gridApi")],Gr.prototype,"gridApi",2),g([ae],Gr.prototype,"init",1),g([le],Gr.prototype,"clearDragSourceParamsList",1),Gr=g([ce("dragAndDropService")],Gr);var Vr=class extends Cs{constructor(e,t,i,n,s,r){super(),this.cellValueFn=e,this.rowNode=t,this.column=i,this.customGui=n,this.dragStartPixels=s,this.suppressVisibilityChange=r,this.dragSource=null}isCustomGui(){return null!=this.customGui}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(Yn("rowDrag",this.gos,null)),this.addDragSource()),this.checkCompatibility(),!this.suppressVisibilityChange){const e=this.gos.get("rowDragManaged")?new zr(this,this.beans,this.rowNode,this.column):new Hr(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.gos.get("rowDragMultiRow"))return[this.rowNode];const e=this.beans.selectionService.getSelectedNodes();return-1!==e.indexOf(this.rowNode)?e:[this.rowNode]}checkCompatibility(){const e=this.gos.get("rowDragManaged");this.gos.get("treeData")&&e&&z("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.gos.get("rowDragText")}addDragSource(e=4){this.dragSource&&this.removeDragSource();const t=this.localeService.getLocaleTextFunc();this.dragSource={type:2,eElement:this.getGui(),dragItemName:()=>{var e;const i=this.getDragItem(),n=(null==(e=i.rowNodes)?void 0:e.length)||1,s=this.getRowDragText(this.column);return s?s(i,n):1===n?this.cellValueFn():`${n} ${t("rowDragRows","rows")}`},getDragItem:()=>this.getDragItem(),dragStartPixels:e,dragSourceDomDataKey:this.gos.getDomDataKey()},this.beans.dragAndDropService.addDragSource(this.dragSource,!0)}removeDragSource(){this.dragSource&&this.beans.dragAndDropService.removeDragSource(this.dragSource),this.dragSource=null}};g([he("beans")],Vr.prototype,"beans",2),g([ae],Vr.prototype,"postConstruct",1),g([le],Vr.prototype,"removeDragSource",1);var Br=class extends nt{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 e=!0,i=!1;this.column&&(e=this.column.isRowDrag(this.rowNode)||this.parent.isCustomGui(),i=j(this.column.getColDef().rowDrag)),i?(this.parent.setDisplayed(!0,t),this.parent.setVisible(e,t)):(this.parent.setDisplayed(e,t),this.parent.setVisible(!0,t))}}},Hr=class extends Br{constructor(e,t,i,n){super(e,i,n),this.beans=t}postConstruct(){this.addManagedPropertyListener("suppressRowDrag",this.onSuppressRowDrag.bind(this)),this.addManagedListener(this.rowNode,Pr.EVENT_DATA_CHANGED,this.workOutVisibility.bind(this)),this.addManagedListener(this.rowNode,Pr.EVENT_CELL_CHANGED,this.workOutVisibility.bind(this)),this.addManagedListener(this.rowNode,Pr.EVENT_CELL_CHANGED,this.workOutVisibility.bind(this)),this.addManagedListener(this.beans.eventService,lt.EVENT_NEW_COLUMNS_LOADED,this.workOutVisibility.bind(this)),this.workOutVisibility()}onSuppressRowDrag(){this.workOutVisibility()}workOutVisibility(){const e=this.gos.get("suppressRowDrag");this.setDisplayedOrVisible(e)}};g([ae],Hr.prototype,"postConstruct",1);var zr=class extends Br{constructor(e,t,i,n){super(e,i,n),this.beans=t}postConstruct(){this.addManagedListener(this.beans.eventService,lt.EVENT_SORT_CHANGED,this.workOutVisibility.bind(this)),this.addManagedListener(this.beans.eventService,lt.EVENT_FILTER_CHANGED,this.workOutVisibility.bind(this)),this.addManagedListener(this.beans.eventService,lt.EVENT_COLUMN_ROW_GROUP_CHANGED,this.workOutVisibility.bind(this)),this.addManagedListener(this.beans.eventService,lt.EVENT_NEW_COLUMNS_LOADED,this.workOutVisibility.bind(this)),this.addManagedListener(this.rowNode,Pr.EVENT_DATA_CHANGED,this.workOutVisibility.bind(this)),this.addManagedListener(this.rowNode,Pr.EVENT_CELL_CHANGED,this.workOutVisibility.bind(this)),this.addManagedPropertyListener("suppressRowDrag",this.onSuppressRowDrag.bind(this)),this.workOutVisibility()}onSuppressRowDrag(){this.workOutVisibility()}workOutVisibility(){const e=this.beans.ctrlsService.getGridBodyCtrl().getRowDragFeature(),t=e&&e.shouldPreventRowMove(),i=this.gos.get("suppressRowDrag"),n=this.beans.dragAndDropService.hasExternalDropZones(),s=t&&!n||i;this.setDisplayedOrVisible(s)}};g([ae],zr.prototype,"postConstruct",1);var Ur=class extends nt{init(e,t,i,n,s,r,o){var a,l,c,h;this.params=o,this.eGui=t,this.eCheckbox=i,this.eExpanded=n,this.eContracted=s,this.comp=e,this.compClass=r;const{node:d,value:u,colDef:p}=o,g=this.isTopLevelFooter();if(!g){if(this.isEmbeddedRowMismatch())return;if(d.footer&&this.gos.get("groupHideOpenParents")&&(p&&p.showRowGroup)!==(d.rowGroupColumn&&d.rowGroupColumn.getColId()))return}if(this.setupShowingValueForOpenedParent(),this.findDisplayedGroupNode(),!g){const e=o.node.footer&&o.node.rowGroupIndex===this.columnModel.getRowGroupColumns().findIndex(e=>{var t;return e.getColId()===(null==(t=o.colDef)?void 0:t.showRowGroup)}),t="multipleColumns"!=this.gos.get("groupDisplayType")||this.gos.get("treeData")||this.gos.get("showOpenedGroup")&&!o.node.footer&&(!o.node.group||null!=o.node.rowGroupIndex&&o.node.rowGroupIndex>this.columnModel.getRowGroupColumns().findIndex(e=>{var t;return e.getColId()===(null==(t=o.colDef)?void 0:t.showRowGroup)})),i=!d.group&&((null==(a=this.params.colDef)?void 0:a.field)||(null==(l=this.params.colDef)?void 0:l.valueGetter)),n=this.isExpandable(),s=this.columnModel.isPivotMode()&&d.leafGroup&&(null==(c=d.rowGroupColumn)?void 0:c.getColId())===(null==(h=o.column)?void 0:h.getColDef().showRowGroup);if(!(this.showingValueForOpenedParent||n||i||t||e||s))return}this.addExpandAndContract(),this.addFullWidthRowDraggerIfNeeded(),this.addCheckboxIfNeeded(),this.addValueElement(),this.setupIndent(),this.refreshAriaExpanded()}getCellAriaRole(){var e,t;const i=null==(e=this.params.colDef)?void 0:e.cellAriaRole,n=null==(t=this.params.column)?void 0:t.getColDef().cellAriaRole;return i||n||"gridcell"}destroy(){super.destroy(),this.expandListener=null}refreshAriaExpanded(){const{node:e,eGridCell:t}=this.params;if(this.expandListener&&(this.expandListener=this.expandListener()),!this.isExpandable())return void ii(t);const i=()=>{ti(t,!!e.expanded)};this.expandListener=this.addManagedListener(e,Pr.EVENT_EXPANDED_CHANGED,i)||null,i()}isTopLevelFooter(){if(!this.gos.getGrandTotalRow())return!1;if(null!=this.params.value||-1!=this.params.node.level)return!1;const e=this.params.colDef;if(null==e)return!0;if(!0===e.showRowGroup)return!0;const t=this.columnModel.getRowGroupColumns();return!t||0===t.length||t[0].getId()===e.showRowGroup}isEmbeddedRowMismatch(){if(!this.params.fullWidth||!this.gos.get("embedFullWidthRows"))return!1;const e="left"===this.params.pinned,t="right"===this.params.pinned,i=!e&&!t;return this.gos.get("enableRtl")?this.columnModel.isPinningLeft()?!t:!i:this.columnModel.isPinningLeft()?!e:!i}findDisplayedGroupNode(){const e=this.params.column,t=this.params.node;if(this.showingValueForOpenedParent){let i=t.parent;for(;null!=i;){if(i.rowGroupColumn&&e.isRowGroupDisplayed(i.rowGroupColumn.getId())){this.displayedGroupNode=i;break}i=i.parent}}C(this.displayedGroupNode)&&(this.displayedGroupNode=t)}setupShowingValueForOpenedParent(){const e=this.params.node,t=this.params.column;if(!this.gos.get("groupHideOpenParents"))return void(this.showingValueForOpenedParent=!1);if(!e.groupData)return void(this.showingValueForOpenedParent=!1);if(null!=e.rowGroupColumn){const i=e.rowGroupColumn.getId();if(t.isRowGroupDisplayed(i))return void(this.showingValueForOpenedParent=!1)}const i=null!=e.groupData[t.getId()];this.showingValueForOpenedParent=i}addValueElement(){this.displayedGroupNode.footer?this.addFooterValue():(this.addGroupValue(),this.addChildCount())}addGroupValue(){var e;const t=this.adjustParamsWithDetailsFromRelatedColumn(),i=this.getInnerCompDetails(t),{valueFormatted:n,value:s}=t;let r=n;if(null==r){const t=this.displayedGroupNode.rowGroupColumn&&(null==(e=this.params.column)?void 0:e.isRowGroupDisplayed(this.displayedGroupNode.rowGroupColumn.getId()));r=""===this.displayedGroupNode.key&&this.displayedGroupNode.group&&t?this.localeService.getLocaleTextFunc()("blanks","(Blanks)"):null!=s?s:null}this.comp.setInnerRenderer(i,r)}adjustParamsWithDetailsFromRelatedColumn(){const e=this.displayedGroupNode.rowGroupColumn,t=this.params.column;if(!e)return this.params;if(null!=t&&!t.isRowGroupDisplayed(e.getId()))return this.params;const i=this.params,{value:n,node:s}=this.params,r=this.valueService.formatValue(e,s,n);return u(d({},i),{valueFormatted:r})}addFooterValue(){let e=this.params.totalValueGetter;if(!e){const t=this.params.footerValueGetter;t&&(e=t,z("As of v31.3, footerValueGetter is deprecated. Use `totalValueGetter` instead."))}let t="";if(e){const i=k(this.params);i.value=this.params.value,"function"==typeof e?t=e(i):"string"==typeof e?t=this.expressionService.evaluate(e,i):console.warn("AG Grid: footerValueGetter should be either a function or a string (expression)")}else t=this.localeService.getLocaleTextFunc()("footerTotal","Total")+" "+(null!=this.params.value?this.params.value:"");const i=this.getInnerCompDetails(this.params);this.comp.setInnerRenderer(i,t)}getInnerCompDetails(e){if(e.fullWidth)return this.userComponentFactory.getFullWidthGroupRowInnerCellRenderer(this.gos.get("groupRowRendererParams"),e);const t=this.userComponentFactory.getInnerRendererDetails(e,e),i=e=>e&&e.componentClass==this.compClass;if(t&&!i(t))return t;const n=this.displayedGroupNode.rowGroupColumn,s=n?n.getColDef():void 0;if(!s)return;const r=this.userComponentFactory.getCellRendererDetails(s,e);return r&&!i(r)?r:i(r)&&s.cellRendererParams&&s.cellRendererParams.innerRenderer?this.userComponentFactory.getInnerRendererDetails(s.cellRendererParams,e):void 0}addChildCount(){this.params.suppressCount||(this.addManagedListener(this.displayedGroupNode,Pr.EVENT_ALL_CHILDREN_COUNT_CHANGED,this.updateChildCount.bind(this)),this.updateChildCount())}updateChildCount(){const e=this.displayedGroupNode.allChildrenCount,t=this.isShowRowGroupForThisRow()&&null!=e&&e>=0?`(${e})`:"";this.comp.setChildCount(t)}isShowRowGroupForThisRow(){if(this.gos.get("treeData"))return!0;const e=this.displayedGroupNode.rowGroupColumn;if(!e)return!1;const t=this.params.column;return null==t||t.isRowGroupDisplayed(e.getId())}addExpandAndContract(){var e;const t=this.params,i=Yn("groupExpanded",this.gos,null),n=Yn("groupContracted",this.gos,null);i&&this.eExpanded.appendChild(i),n&&this.eContracted.appendChild(n);const s=t.eGridCell;(null==(e=this.params.column)?void 0:e.isCellEditable(t.node))&&this.gos.get("enableGroupEdit")||!this.isExpandable()||t.suppressDoubleClickExpand||this.addManagedListener(s,"dblclick",this.onCellDblClicked.bind(this)),this.addManagedListener(this.eExpanded,"click",this.onExpandClicked.bind(this)),this.addManagedListener(this.eContracted,"click",this.onExpandClicked.bind(this)),this.addManagedListener(s,"keydown",this.onKeyDown.bind(this)),this.addManagedListener(t.node,Pr.EVENT_EXPANDED_CHANGED,this.showExpandAndContractIcons.bind(this)),this.showExpandAndContractIcons();const r=this.onRowNodeIsExpandableChanged.bind(this);this.addManagedListener(this.displayedGroupNode,Pr.EVENT_ALL_CHILDREN_COUNT_CHANGED,r),this.addManagedListener(this.displayedGroupNode,Pr.EVENT_MASTER_CHANGED,r),this.addManagedListener(this.displayedGroupNode,Pr.EVENT_GROUP_CHANGED,r),this.addManagedListener(this.displayedGroupNode,Pr.EVENT_HAS_CHILDREN_CHANGED,r)}onExpandClicked(e){qe(e)||(Ye(e),this.onExpandOrContract(e))}onExpandOrContract(e){const t=this.displayedGroupNode,i=!t.expanded;!i&&t.sticky&&this.scrollToStickyNode(t),t.setExpanded(i,e)}scrollToStickyNode(e){this.ctrlsService.getGridBodyCtrl().getScrollFeature().setVerticalScrollPosition(e.rowTop-e.stickyRowTop)}isExpandable(){if(this.showingValueForOpenedParent)return!0;const e=this.displayedGroupNode,t=this.columnModel.isPivotMode()&&e.leafGroup;if(!e.isExpandable()||e.footer||t)return!1;const i=this.params.column;return null==i||"string"!=typeof i.getColDef().showRowGroup||this.isShowRowGroupForThisRow()}showExpandAndContractIcons(){const{params:e,displayedGroupNode:t,columnModel:i}=this,{node:n}=e,s=this.isExpandable();if(s){const e=!!this.showingValueForOpenedParent||n.expanded;this.comp.setExpandedDisplayed(e),this.comp.setContractedDisplayed(!e)}else this.comp.setExpandedDisplayed(!1),this.comp.setContractedDisplayed(!1);const r=i.isPivotMode(),o=r&&t.leafGroup,a=s&&!o,l=n.footer&&-1===n.level;this.comp.addOrRemoveCssClass("ag-cell-expandable",a),this.comp.addOrRemoveCssClass("ag-row-group",a),r?this.comp.addOrRemoveCssClass("ag-pivot-leaf-group",o):l||this.comp.addOrRemoveCssClass("ag-row-group-leaf-indent",!a)}onRowNodeIsExpandableChanged(){this.showExpandAndContractIcons(),this.setIndent(),this.refreshAriaExpanded()}setupIndent(){const e=this.params.node;this.params.suppressPadding||(this.addManagedListener(e,Pr.EVENT_UI_LEVEL_CHANGED,this.setIndent.bind(this)),this.setIndent())}setIndent(){if(this.gos.get("groupHideOpenParents"))return;const e=this.params,t=e.node,i=!!e.colDef,n=this.gos.get("treeData"),s=!i||n||!0===e.colDef.showRowGroup?t.uiLevel:0;this.indentClass&&this.comp.addOrRemoveCssClass(this.indentClass,!1),this.indentClass="ag-row-group-indent-"+s,this.comp.addOrRemoveCssClass(this.indentClass,!0)}addFullWidthRowDraggerIfNeeded(){if(!this.params.fullWidth||!this.params.rowDrag)return;const e=new Vr(()=>this.params.value,this.params.node);this.createManagedBean(e,this.context),this.eGui.insertAdjacentElement("afterbegin",e.getGui())}isUserWantsSelected(){const e=this.params.checkbox;return"function"==typeof e||!0===e}addCheckboxIfNeeded(){const e=this.displayedGroupNode,t=this.isUserWantsSelected()&&!e.footer&&!e.rowPinned&&!e.detail;if(t){const e=new Nr;this.getContext().createBean(e),e.init({rowNode:this.params.node,column:this.params.column,overrides:{isVisible:this.params.checkbox,callbackParams:this.params,removeHidden:!0}}),this.eCheckbox.appendChild(e.getGui()),this.addDestroyFunc(()=>this.getContext().destroyBean(e))}this.comp.setCheckboxVisible(t)}onKeyDown(e){e.key!==Xn.ENTER||this.params.suppressEnterExpand||this.params.column&&this.params.column.isCellEditable(this.params.node)||this.onExpandOrContract(e)}onCellDblClicked(e){qe(e)||Qe(this.eExpanded,e)||Qe(this.eContracted,e)||this.onExpandOrContract(e)}};g([he("expressionService")],Ur.prototype,"expressionService",2),g([he("valueService")],Ur.prototype,"valueService",2),g([he("columnModel")],Ur.prototype,"columnModel",2),g([he("userComponentFactory")],Ur.prototype,"userComponentFactory",2),g([he("ctrlsService")],Ur.prototype,"ctrlsService",2);var Wr=class e extends Cs{constructor(){super(e.TEMPLATE)}init(e){const t={setInnerRenderer:(e,t)=>this.setRenderDetails(e,t),setChildCount:e=>this.eChildCount.textContent=e,addOrRemoveCssClass:(e,t)=>this.addOrRemoveCssClass(e,t),setContractedDisplayed:e=>on(this.eContracted,e),setExpandedDisplayed:e=>on(this.eExpanded,e),setCheckboxVisible:e=>this.eCheckbox.classList.toggle("ag-invisible",!e)},i=this.createManagedBean(new Ur),n=!e.colDef,s=this.getGui();i.init(t,s,this.eCheckbox,this.eExpanded,this.eContracted,this.constructor,e),n&&Bt(s,i.getCellAriaRole())}setRenderDetails(e,t){if(e){const t=e.newAgStackInstance();if(!t)return;t.then(e=>{if(!e)return;const t=()=>this.context.destroyBean(e);this.isAlive()?(this.eValue.appendChild(e.getGui()),this.addDestroyFunc(t)):t()})}else this.eValue.innerText=t}destroy(){this.getContext().destroyBean(this.innerCellRenderer),super.destroy()}refresh(){return!1}};Wr.TEMPLATE='<span class="ag-cell-wrapper">\n            <span class="ag-group-expanded" ref="eExpanded"></span>\n            <span class="ag-group-contracted" ref="eContracted"></span>\n            <span class="ag-group-checkbox ag-invisible" ref="eCheckbox"></span>\n            <span class="ag-group-value" ref="eValue"></span>\n            <span class="ag-group-child-count" ref="eChildCount"></span>\n        </span>',g([Ss("eExpanded")],Wr.prototype,"eExpanded",2),g([Ss("eContracted")],Wr.prototype,"eContracted",2),g([Ss("eCheckbox")],Wr.prototype,"eCheckbox",2),g([Ss("eValue")],Wr.prototype,"eValue",2),g([Ss("eChildCount")],Wr.prototype,"eChildCount",2);var jr=Wr,Kr=class e extends Cs{constructor(){super(e.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=Yn("groupLoading",this.gos,null);e&&this.eLoadingIcon.appendChild(e);const t=this.localeService.getLocaleTextFunc();this.eLoadingText.innerText=t("loadingOoo","Loading")}refresh(e){return!1}destroy(){super.destroy()}};Kr.TEMPLATE='<div class="ag-loading">\n            <span class="ag-loading-icon" ref="eLoadingIcon"></span>\n            <span class="ag-loading-text" ref="eLoadingText"></span>\n        </div>',g([Ss("eLoadingIcon")],Kr.prototype,"eLoadingIcon",2),g([Ss("eLoadingText")],Kr.prototype,"eLoadingText",2);var $r=Kr,Yr=class e extends Cs{constructor(){super(e.TEMPLATE)}init(e){const t=`ag-cell-skeleton-renderer-${this.getCompId()}`;this.getGui().setAttribute("id",t),this.addDestroyFunc(()=>Kt(e.eParentOfValue)),Kt(e.eParentOfValue,t),e.node.failedLoad?this.setupFailed():this.setupLoading()}setupFailed(){const e=this.localeService.getLocaleTextFunc();this.getGui().innerText=e("loadingError","ERR");const t=e("ariaSkeletonCellLoadingFailed","Row failed to load");jt(this.getGui(),t)}setupLoading(){const e=this.gos.getDocument().createElement("div");e.classList.add("ag-skeleton-effect"),this.getGui().appendChild(e);const t=this.localeService.getLocaleTextFunc()("ariaSkeletonCellLoading","Row data is loading");jt(this.getGui(),t)}refresh(e){return!1}destroy(){super.destroy()}};Yr.TEMPLATE='<div class="ag-skeleton-container"></div>';var qr=Yr,Xr=class e extends Cs{constructor(){super()}destroy(){super.destroy()}init(t){const i=this.gos.get("overlayLoadingTemplate");if(this.setTemplate(null!=i?i:e.DEFAULT_LOADING_OVERLAY_TEMPLATE),!i){const e=this.localeService.getLocaleTextFunc();setTimeout(()=>{this.getGui().textContent=e("loadingOoo","Loading...")})}}};Xr.DEFAULT_LOADING_OVERLAY_TEMPLATE='<span aria-live="polite" aria-atomic="true" class="ag-overlay-loading-center"></span>';var Zr=Xr,Qr=class e extends Cs{constructor(){super()}destroy(){super.destroy()}init(t){const i=this.gos.get("overlayNoRowsTemplate");if(this.setTemplate(null!=i?i:e.DEFAULT_NO_ROWS_TEMPLATE),!i){const e=this.localeService.getLocaleTextFunc();setTimeout(()=>{this.getGui().textContent=e("noRowsToShow","No Rows To Show")})}}};Qr.DEFAULT_NO_ROWS_TEMPLATE='<span class="ag-overlay-no-rows-center"></span>';var Jr=Qr,eo=class extends xr{constructor(){super('<div class="ag-tooltip"></div>')}init(e){const{value:t}=e;this.getGui().textContent=yt(t,!0)}},to=class{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,null!=t.max&&e.setMax(t.max),null!=t.min&&e.setMin(t.min),null!=t.precision&&e.setPrecision(t.precision),null!=t.step&&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!==Xn.UP&&e.key!==Xn.DOWN||e.preventDefault()}getValue(){const e=this.eInput.getValue();if(!y(e)&&!y(this.params.value))return this.params.value;let t=this.params.parseValue(e);if(null==t)return t;if("string"==typeof t){if(""===t)return null;t=Number(t)}return isNaN(t)?null:t}getStartValue(){return this.params.value}},io=class extends Tr{constructor(){super(new to)}},no=class{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,null!=t.min&&e.setMin(t.min),null!=t.max&&e.setMax(t.max),null!=t.step&&e.setStep(t.step)}getValue(){const e=this.eInput.getDate();return y(e)||y(this.params.value)?null!=e?e:null:this.params.value}getStartValue(){const{value:e}=this.params;if(e instanceof Date)return qi(e,!1)}},so=class extends Tr{constructor(){super(new no)}},ro=class{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,null!=t.min&&e.setMin(t.min),null!=t.max&&e.setMax(t.max),null!=t.step&&e.setStep(t.step)}getValue(){const e=this.formatDate(this.eInput.getDate());return y(e)||y(this.params.value)?this.params.parseValue(null!=e?e:""):this.params.value}getStartValue(){var e,t;return qi(null!=(t=this.parseDate(null!=(e=this.params.value)?e: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)}},oo=class extends Tr{constructor(){super(new ro(()=>this.dataTypeService))}};g([he("dataTypeService")],oo.prototype,"dataTypeService",2);var ao=class e extends Cs{constructor(){super(e.TEMPLATE)}init(e){this.params=e,this.updateCheckbox(e);const t=this.eCheckbox.getInputElement();t.setAttribute("tabindex","-1"),Yt(t,"polite"),this.addManagedListener(t,"click",e=>{if(Ye(e),this.eCheckbox.isDisabled())return;const t=this.eCheckbox.getValue();this.onCheckboxChanged(t)}),this.addManagedListener(t,"dblclick",e=>{Ye(e)}),this.addManagedListener(this.params.eGridCell,"keydown",e=>{if(e.key===Xn.SPACE&&!this.eCheckbox.isDisabled()){this.params.eGridCell===this.gos.getActiveDomElement()&&this.eCheckbox.toggle();const t=this.eCheckbox.getValue();this.onCheckboxChanged(t),e.preventDefault()}})}refresh(e){return this.params=e,this.updateCheckbox(e),!0}updateCheckbox(e){var t,i,n;let s,r=!0;if(e.node.group&&e.column){const i=e.column.getColId();i.startsWith(dt)?s=null==e.value||""===e.value?void 0:"true"===e.value:e.node.aggData&&void 0!==e.node.aggData[i]?s=null!=(t=e.value)?t:void 0:r=!1}else s=null!=(i=e.value)?i:void 0;if(!r)return void this.eCheckbox.setDisplayed(!1);this.eCheckbox.setValue(s);const o=null!=e.disabled?e.disabled:!(null==(n=e.column)?void 0:n.isCellEditable(e.node));this.eCheckbox.setDisabled(o);const a=this.localeService.getLocaleTextFunc(),l=mi(a,s),c=o?l:`${a("ariaToggleCellValue","Press SPACE to toggle cell value")} (${l})`;this.eCheckbox.setInputAriaLabel(c)}onCheckboxChanged(e){const{column:t,node:i,rowIndex:n,value:s}=this.params,r={type:lt.EVENT_CELL_EDITING_STARTED,column:t,colDef:null==t?void 0:t.getColDef(),data:i.data,node:i,rowIndex:n,rowPinned:i.rowPinned,value:s};this.eventService.dispatchEvent(r);const o=this.params.node.setDataValue(this.params.column,e,"edit"),a={type:lt.EVENT_CELL_EDITING_STOPPED,column:t,colDef:null==t?void 0:t.getColDef(),data:i.data,node:i,rowIndex:n,rowPinned:i.rowPinned,value:s,oldValue:s,newValue:e,valueChanged:o};this.eventService.dispatchEvent(a)}};ao.TEMPLATE='\n        <div class="ag-cell-wrapper ag-checkbox-cell" role="presentation">\n            <ag-checkbox role="presentation" ref="eCheckbox"></ag-checkbox>\n        </div>',g([Ss("eCheckbox")],ao.prototype,"eCheckbox",2);var lo=ao,co=class extends xr{constructor(){super('\n            <div class="ag-cell-wrapper ag-cell-edit-wrapper ag-checkbox-edit">\n                <ag-checkbox role="presentation" ref="eCheckbox"></ag-checkbox>\n            </div>')}init(e){var t;this.params=e;const i=null!=(t=e.value)?t:void 0;this.eCheckbox.setValue(i),this.eCheckbox.getInputElement().setAttribute("tabindex","-1"),this.setAriaLabel(i),this.addManagedListener(this.eCheckbox,lt.EVENT_FIELD_VALUE_CHANGED,e=>this.setAriaLabel(e.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=mi(t,e),n=t("ariaToggleCellValue","Press SPACE to toggle cell value");this.eCheckbox.setInputAriaLabel(`${n} (${i})`)}};g([Ss("eCheckbox")],co.prototype,"eCheckbox",2);var ho=class extends Cs{constructor(){super(),this.setTemplate("<div></div>")}init(e){var t;this.params=e,this.cssClassPrefix=null!=(t=this.params.cssClassPrefix)?t:"ag-menu-option",this.addIcon(),this.addName(),this.addShortcut(),this.addSubMenu()}configureDefaults(){return!0}addIcon(){if(this.params.isCompact)return;const e=xn(`<span ref="eIcon" class="${this.getClassName("part")} ${this.getClassName("icon")}" role="presentation"></span>`);this.params.checked?e.appendChild(Yn("check",this.gos)):this.params.icon&&(On(this.params.icon)?e.appendChild(this.params.icon):"string"==typeof this.params.icon?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=xn(`<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=xn(`<span ref="eShortcut" class="${this.getClassName("part")} ${this.getClassName("shortcut")}">${this.params.shortcut||""}</span>`);this.getGui().appendChild(e)}addSubMenu(){const e=xn(`<span ref="ePopupPointer" class="${this.getClassName("part")} ${this.getClassName("popup-pointer")}"></span>`),t=this.getGui();if(this.params.subMenu){const i=this.gos.get("enableRtl")?"smallLeft":"smallRight";ti(t,!1),e.appendChild(Yn(i,this.gos))}t.appendChild(e)}getClassName(e){return`${this.cssClassPrefix}-${e}`}destroy(){super.destroy()}},uo=class extends nt{constructor(){super(...arguments),this.agGridDefaults={agDateInput:er,agColumnHeader:br,agColumnGroupHeader:wr,agSortIndicator:yr,agTextColumnFloatingFilter:gr,agNumberColumnFloatingFilter:pr,agDateColumnFloatingFilter:Js,agReadOnlyFloatingFilter:xs,agAnimateShowChangeCellRenderer:Rr,agAnimateSlideCellRenderer:Lr,agGroupCellRenderer:jr,agGroupRowRenderer:jr,agLoadingCellRenderer:$r,agSkeletonCellRenderer:qr,agCheckboxCellRenderer:lo,agCellEditor:Ir,agTextCellEditor:Ir,agNumberCellEditor:io,agDateCellEditor:so,agDateStringCellEditor:oo,agSelectCellEditor:Ar,agLargeTextCellEditor:Mr,agCheckboxCellEditor:co,agTextColumnFilter:cr,agNumberColumnFilter:or,agDateColumnFilter:Zs,agLoadingOverlay:Zr,agNoRowsOverlay:Jr,agTooltipComponent:eo,agMenuItem:ho},this.enterpriseAgDefaultCompsModule={agSetColumnFilter:"@ag-grid-enterprise/set-filter",agSetColumnFloatingFilter:"@ag-grid-enterprise/set-filter",agMultiColumnFilter:"@ag-grid-enterprise/multi-filter",agMultiColumnFloatingFilter:"@ag-grid-enterprise/multi-filter",agGroupColumnFilter:"@ag-grid-enterprise/row-grouping",agGroupColumnFloatingFilter:"@ag-grid-enterprise/row-grouping",agRichSelect:"@ag-grid-enterprise/rich-select",agRichSelectCellEditor:"@ag-grid-enterprise/rich-select",agDetailCellRenderer:"@ag-grid-enterprise/master-detail",agSparklineCellRenderer:"@ag-grid-enterprise/sparklines"},this.jsComps={}}init(){const e=this.gos.get("components");null!=e&&L(e,(e,t)=>this.registerJsComponent(e,t))}registerDefaultComponent(e,t){this.agGridDefaults[e]?console.error("Trying to overwrite a default component. You should call registerComponent"):this.agGridDefaults[e]=t}registerJsComponent(e,t){this.jsComps[e]=t}retrieve(e,t){const i=(e,t)=>({componentFromFramework:t,component:e}),n=this.getFrameworkOverrides().frameworkComponent(t,this.gos.get("components"));if(null!=n)return i(n,!0);const s=this.jsComps[t];if(s)return i(s,this.getFrameworkOverrides().isFrameworkComponent(s));const r=this.agGridDefaults[t];if(r)return i(r,!1);const o=this.enterpriseAgDefaultCompsModule[t];return o?se.__assertRegistered(o,`AG Grid '${e}' component: ${t}`,this.context.getGridId()):H(()=>{this.warnAboutMissingComponent(e,t)},"MissingComp"+t),null}warnAboutMissingComponent(e,t){const i=Un(t,[...Object.keys(this.agGridDefaults).filter(e=>!["agCellEditor","agGroupRowRenderer","agSortIndicator"].includes(e)),...Object.keys(this.jsComps)],!0,.8).values;console.warn(`AG Grid: Could not find '${t}' component. It was configured as "${e}: '${t}'" but it wasn't found in the list of registered components.`),i.length>0&&console.warn(`         Did you mean: [${i.slice(0,3)}]?`),console.warn(`If using a custom component check it has been registered as described in: ${this.getFrameworkOverrides().getDocLink("components/")}`)}};g([ae],uo.prototype,"init",1),uo=g([ce("userComponentRegistry")],uo);var po={propertyName:"dateComponent",cellRenderer:!1},go={propertyName:"headerComponent",cellRenderer:!1},fo={propertyName:"headerGroupComponent",cellRenderer:!1},mo={propertyName:"cellRenderer",cellRenderer:!0},vo={propertyName:"loadingCellRenderer",cellRenderer:!0},yo={propertyName:"cellEditor",cellRenderer:!1},Co={propertyName:"innerRenderer",cellRenderer:!0},bo={propertyName:"loadingOverlayComponent",cellRenderer:!1},So={propertyName:"noRowsOverlayComponent",cellRenderer:!1},wo={propertyName:"tooltipComponent",cellRenderer:!1},xo={propertyName:"filter",cellRenderer:!1},Eo={propertyName:"floatingFilterComponent",cellRenderer:!1},Mo={propertyName:"toolPanel",cellRenderer:!1},Ao={propertyName:"statusPanel",cellRenderer:!1},To={propertyName:"fullWidthCellRenderer",cellRenderer:!0},Do={propertyName:"loadingCellRenderer",cellRenderer:!0},Io={propertyName:"groupRowRenderer",cellRenderer:!0},Ro={propertyName:"detailCellRenderer",cellRenderer:!0},Lo={propertyName:"menuItem",cellRenderer:!1},ko=class{static getFloatingFilterType(e){return this.filterToFloatingFilterMapping[e]}};ko.filterToFloatingFilterMapping={set:"agSetColumnFloatingFilter",agSetColumnFilter:"agSetColumnFloatingFilter",multi:"agMultiColumnFloatingFilter",agMultiColumnFilter:"agMultiColumnFloatingFilter",group:"agGroupColumnFloatingFilter",agGroupColumnFilter:"agGroupColumnFloatingFilter",number:"agNumberColumnFloatingFilter",agNumberColumnFilter:"agNumberColumnFloatingFilter",date:"agDateColumnFloatingFilter",agDateColumnFilter:"agDateColumnFloatingFilter",text:"agTextColumnFloatingFilter",agTextColumnFilter:"agTextColumnFloatingFilter"};var Po=class extends nt{getHeaderCompDetails(e,t){return this.getCompDetails(e,go,"agColumnHeader",t)}getHeaderGroupCompDetails(e){const t=e.columnGroup.getColGroupDef();return this.getCompDetails(t,fo,"agColumnGroupHeader",e)}getFullWidthCellRendererDetails(e){return this.getCompDetails(this.gridOptions,To,null,e,!0)}getFullWidthLoadingCellRendererDetails(e){return this.getCompDetails(this.gridOptions,Do,"agLoadingCellRenderer",e,!0)}getFullWidthGroupCellRendererDetails(e){return this.getCompDetails(this.gridOptions,Io,"agGroupRowRenderer",e,!0)}getFullWidthDetailCellRendererDetails(e){return this.getCompDetails(this.gridOptions,Ro,"agDetailCellRenderer",e,!0)}getInnerRendererDetails(e,t){return this.getCompDetails(e,Co,null,t)}getFullWidthGroupRowInnerCellRenderer(e,t){return this.getCompDetails(e,Co,null,t)}getCellRendererDetails(e,t){return this.getCompDetails(e,mo,null,t)}getLoadingCellRendererDetails(e,t){return this.getCompDetails(e,vo,"agSkeletonCellRenderer",t,!0)}getCellEditorDetails(e,t){return this.getCompDetails(e,yo,"agCellEditor",t,!0)}getFilterDetails(e,t,i){return this.getCompDetails(e,xo,i,t,!0)}getDateCompDetails(e){return this.getCompDetails(this.gridOptions,po,"agDateInput",e,!0)}getLoadingOverlayCompDetails(e){return this.getCompDetails(this.gridOptions,bo,"agLoadingOverlay",e,!0)}getNoRowsOverlayCompDetails(e){return this.getCompDetails(this.gridOptions,So,"agNoRowsOverlay",e,!0)}getTooltipCompDetails(e){return this.getCompDetails(e.colDef,wo,"agTooltipComponent",e,!0)}getSetFilterCellRendererDetails(e,t){return this.getCompDetails(e,mo,null,t)}getFloatingFilterCompDetails(e,t,i){return this.getCompDetails(e,Eo,i,t)}getToolPanelCompDetails(e,t){return this.getCompDetails(e,Mo,null,t,!0)}getStatusPanelCompDetails(e,t){return this.getCompDetails(e,Ao,null,t,!0)}getMenuItemCompDetails(e,t){return this.getCompDetails(e,Lo,"agMenuItem",t,!0)}getCompDetails(e,t,i,n,s=!1){const{propertyName:r,cellRenderer:o}=t;let{compName:a,jsComp:l,fwComp:c,paramsFromSelector:h,popupFromSelector:d,popupPositionFromSelector:u}=this.getCompKeys(e,t,n);const p=e=>{const t=this.userComponentRegistry.retrieve(r,e);t&&(l=t.componentFromFramework?void 0:t.component,c=t.componentFromFramework?t.component:void 0)};if(null!=a&&p(a),null==l&&null==c&&null!=i&&p(i),l&&o&&!this.agComponentUtils.doesImplementIComponent(l)&&(l=this.agComponentUtils.adaptFunction(r,l)),!l&&!c)return void(s&&console.error(`AG Grid: Could not find component ${a}, did you forget to configure this component?`));const g=this.mergeParamsWithApplicationProvidedParams(e,t,n,h),f=null==l,m=l||c;return{componentFromFramework:f,componentClass:m,params:g,type:t,popupFromSelector:d,popupPositionFromSelector:u,newAgStackInstance:()=>this.newAgStackInstance(m,f,g,t)}}getCompKeys(e,t,i){const{propertyName:n}=t;let s,r,o,a,l,c;if(e){const t=e,h=t[n+"Selector"],d=h?h(i):null,u=e=>{"string"==typeof e?s=e:null!=e&&!0!==e&&(this.getFrameworkOverrides().isFrameworkComponent(e)?o=e:r=e)};d?(u(d.component),a=d.params,l=d.popup,c=d.popupPosition):u(t[n])}return{compName:s,jsComp:r,fwComp:o,paramsFromSelector:a,popupFromSelector:l,popupPositionFromSelector:c}}newAgStackInstance(e,t,i,n){const s=n.propertyName;let r;if(t){const t=this.componentMetadataProvider.retrieve(s);r=this.frameworkComponentWrapper.wrap(e,t.mandatoryMethodList,t.optionalMethodList,n)}else r=new e;const o=this.initComponent(r,i);return null==o?ds.resolve(r):o.then(()=>r)}mergeParamsWithApplicationProvidedParams(e,t,i,n=null){const s=this.gos.getGridCommonParams();O(s,i);const r=e&&e[t.propertyName+"Params"];return"function"==typeof r?O(s,r(i)):"object"==typeof r&&O(s,r),O(s,n),s}initComponent(e,t){if(this.context.createBean(e),null!=e.init)return e.init(t)}getDefaultFloatingFilterType(e,t){if(null==e)return null;let i=null,{compName:n,jsComp:s,fwComp:r}=this.getCompKeys(e,xo);return n?i=ko.getFloatingFilterType(n):null==s&&null==r&&!0===e.filter&&(i=t()),i}};g([he("gridOptions")],Po.prototype,"gridOptions",2),g([he("agComponentUtils")],Po.prototype,"agComponentUtils",2),g([he("componentMetadataProvider")],Po.prototype,"componentMetadataProvider",2),g([he("userComponentRegistry")],Po.prototype,"userComponentRegistry",2),g([de("frameworkComponentWrapper")],Po.prototype,"frameworkComponentWrapper",2),Po=g([ce("userComponentFactory")],Po);var No=(e=>(e[e.SINGLE_SHEET=0]="SINGLE_SHEET",e[e.MULTI_SHEET=1]="MULTI_SHEET",e))(No||{}),Oo=(e=>(e[e.Above=0]="Above",e[e.Below=1]="Below",e))(Oo||{}),_o=class{constructor(e){this.tickingInterval=null,this.onScrollCallback=null,this.scrollContainer=e.scrollContainer,this.scrollHorizontally=-1!==e.scrollAxis.indexOf("x"),this.scrollVertically=-1!==e.scrollAxis.indexOf("y"),this.scrollByTick=null!=e.scrollByTick?e.scrollByTick:20,e.onScrollCallback&&(this.onScrollCallback=e.onScrollCallback),this.scrollVertically&&(this.getVerticalPosition=e.getVerticalPosition,this.setVerticalPosition=e.setVerticalPosition),this.scrollHorizontally&&(this.getHorizontalPosition=e.getHorizontalPosition,this.setHorizontalPosition=e.setHorizontalPosition),this.shouldSkipVerticalScroll=e.shouldSkipVerticalScroll||(()=>!1),this.shouldSkipHorizontalScroll=e.shouldSkipHorizontalScroll||(()=>!1)}check(e,t=!1){const i=t||this.shouldSkipVerticalScroll();if(i&&this.shouldSkipHorizontalScroll())return;const n=this.scrollContainer.getBoundingClientRect(),s=this.scrollByTick;this.tickLeft=e.clientX<n.left+s,this.tickRight=e.clientX>n.right-s,this.tickUp=e.clientY<n.top+s&&!i,this.tickDown=e.clientY>n.bottom-s&&!i,this.tickLeft||this.tickRight||this.tickUp||this.tickDown?this.ensureTickingStarted():this.ensureCleared()}ensureTickingStarted(){null===this.tickingInterval&&(this.tickingInterval=window.setInterval(this.doTick.bind(this),100),this.tickCount=0)}doTick(){let e;if(this.tickCount++,e=this.tickCount>20?200:this.tickCount>10?80:40,this.scrollVertically){const t=this.getVerticalPosition();this.tickUp&&this.setVerticalPosition(t-e),this.tickDown&&this.setVerticalPosition(t+e)}if(this.scrollHorizontally){const t=this.getHorizontalPosition();this.tickLeft&&this.setHorizontalPosition(t-e),this.tickRight&&this.setHorizontalPosition(t+e)}this.onScrollCallback&&this.onScrollCallback()}ensureCleared(){this.tickingInterval&&(window.clearInterval(this.tickingInterval),this.tickingInterval=null)}},Fo=class extends nt{constructor(e){super(),this.eContainer=e}postConstruct(){this.gos.isRowModelType("clientSide")&&(this.clientSideRowModel=this.rowModel),this.ctrlsService.whenReady(e=>{const t=e.gridBodyCtrl;this.autoScrollService=new _o({scrollContainer:t.getBodyViewportElement(),scrollAxis:"y",getVerticalPosition:()=>t.getScrollFeature().getVScrollPosition().top,setVerticalPosition:e=>t.getScrollFeature().setVerticalScrollPosition(e),onScrollCallback:()=>{this.onDragging(this.lastDraggingEvent)}})})}getContainer(){return this.eContainer}isInterestedIn(e){return 2===e}getIconName(){return this.gos.get("rowDragManaged")&&this.shouldPreventRowMove()?Gr.ICON_NOT_ALLOWED:Gr.ICON_MOVE}shouldPreventRowMove(){return!!this.columnModel.getRowGroupColumns().length||(!!this.filterManager.isAnyFilterPresent()||!!this.sortController.isSortActive())}getRowNodes(e){if(!this.isFromThisGrid(e))return e.dragItem.rowNodes||[];const t=e.dragItem.rowNode;if(this.gos.get("rowDragMultiRow")){const e=[...this.selectionService.getSelectedNodes()].sort((e,t)=>null==e.rowIndex||null==t.rowIndex?0:this.getRowIndexNumber(e)-this.getRowIndexNumber(t));if(-1!==e.indexOf(t))return e}return[t]}onDragEnter(e){e.dragItem.rowNodes=this.getRowNodes(e),this.dispatchGridEvent(lt.EVENT_ROW_DRAG_ENTER,e),this.getRowNodes(e).forEach(e=>{e.setDragging(!0)}),this.onEnterOrDragging(e)}onDragging(e){this.onEnterOrDragging(e)}isFromThisGrid(e){const{dragSourceDomDataKey:t}=e.dragSource;return t===this.gos.getDomDataKey()}isDropZoneWithinThisGrid(e){const t=this.ctrlsService.getGridBodyCtrl().getGui(),{dropZoneTarget:i}=e;return!t.contains(i)}onEnterOrDragging(e){this.dispatchGridEvent(lt.EVENT_ROW_DRAG_MOVE,e),this.lastDraggingEvent=e;const t=this.mouseEventService.getNormalisedPosition(e).y;this.gos.get("rowDragManaged")&&this.doManagedDrag(e,t),this.autoScrollService.check(e.event)}doManagedDrag(e,t){const i=this.isFromThisGrid(e),n=this.gos.get("rowDragManaged"),s=e.dragItem.rowNodes;n&&this.shouldPreventRowMove()||(this.gos.get("suppressMoveWhenRowDragging")||!i?this.isDropZoneWithinThisGrid(e)||this.clientSideRowModel.highlightRowAtPixel(s[0],t):this.moveRows(s,t))}getRowIndexNumber(e){return parseInt(De(e.getRowIndexString().split("-")),10)}moveRowAndClearHighlight(e){const t=this.clientSideRowModel.getLastHighlightedRowNode(),i=t&&1===t.highlighted,n=this.mouseEventService.getNormalisedPosition(e).y,s=e.dragItem.rowNodes;let r=i?1:0;if(this.isFromThisGrid(e))s.forEach(e=>{e.rowTop<n&&(r-=1)}),this.moveRows(s,n,r);else{const e=this.gos.getCallback("getRowId");let t=this.clientSideRowModel.getRowIndexAtPixel(n)+1;0===this.clientSideRowModel.getHighlightPosition(n)&&t--,this.clientSideRowModel.updateRowData({add:s.map(e=>e.data).filter(t=>!this.clientSideRowModel.getRowNode(e?e({data:t,level:0}):t.id)),addIndex:t})}this.clearRowHighlight()}clearRowHighlight(){this.clientSideRowModel.highlightRowAtPixel(null)}moveRows(e,t,i=0){var n;this.clientSideRowModel.ensureRowsAtPixel(e,t,i)&&(this.focusService.clearFocusedCell(),null==(n=this.rangeService)||n.removeAllCellRanges())}addRowDropZone(e){if(!e.getContainer())return void z("addRowDropZone - A container target needs to be provided");if(this.dragAndDropService.findExternalZone(e))return void console.warn("AG Grid: addRowDropZone - target already exists in the list of DropZones. Use `removeRowDropZone` before adding it again.");let t={getContainer:e.getContainer};e.fromGrid?t=e:(e.onDragEnter&&(t.onDragEnter=t=>{e.onDragEnter(this.draggingToRowDragEvent(lt.EVENT_ROW_DRAG_ENTER,t))}),e.onDragLeave&&(t.onDragLeave=t=>{e.onDragLeave(this.draggingToRowDragEvent(lt.EVENT_ROW_DRAG_LEAVE,t))}),e.onDragging&&(t.onDragging=t=>{e.onDragging(this.draggingToRowDragEvent(lt.EVENT_ROW_DRAG_MOVE,t))}),e.onDragStop&&(t.onDragStop=t=>{e.onDragStop(this.draggingToRowDragEvent(lt.EVENT_ROW_DRAG_END,t))})),this.dragAndDropService.addDropTarget(d({isInterestedIn:e=>2===e,getIconName:()=>Gr.ICON_MOVE,external:!0},t))}getRowDropZone(e){const t=this.getContainer.bind(this),i=this.onDragEnter.bind(this),n=this.onDragLeave.bind(this),s=this.onDragging.bind(this),r=this.onDragStop.bind(this);return e?{getContainer:t,onDragEnter:e.onDragEnter?t=>{i(t),e.onDragEnter(this.draggingToRowDragEvent(lt.EVENT_ROW_DRAG_ENTER,t))}:i,onDragLeave:e.onDragLeave?t=>{n(t),e.onDragLeave(this.draggingToRowDragEvent(lt.EVENT_ROW_DRAG_LEAVE,t))}:n,onDragging:e.onDragging?t=>{s(t),e.onDragging(this.draggingToRowDragEvent(lt.EVENT_ROW_DRAG_MOVE,t))}:s,onDragStop:e.onDragStop?t=>{r(t),e.onDragStop(this.draggingToRowDragEvent(lt.EVENT_ROW_DRAG_END,t))}:r,fromGrid:!0}:{getContainer:t,onDragEnter:i,onDragLeave:n,onDragging:s,onDragStop:r,fromGrid:!0}}draggingToRowDragEvent(e,t){const i=this.mouseEventService.getNormalisedPosition(t).y;let n,s,r=-1;switch(i>this.paginationProxy.getCurrentPageHeight()||(r=this.rowModel.getRowIndexAtPixel(i),n=this.rowModel.getRow(r)),t.vDirection){case 1:s="down";break;case 0:s="up";break;default:s=null}return this.gos.addGridCommonParams({type:e,event:t.event,node:t.dragItem.rowNode,nodes:t.dragItem.rowNodes,overIndex:r,overNode:n,y:i,vDirection:s})}dispatchGridEvent(e,t){const i=this.draggingToRowDragEvent(e,t);this.eventService.dispatchEvent(i)}onDragLeave(e){this.dispatchGridEvent(lt.EVENT_ROW_DRAG_LEAVE,e),this.stopDragging(e),this.gos.get("rowDragManaged")&&this.clearRowHighlight()}onDragStop(e){this.dispatchGridEvent(lt.EVENT_ROW_DRAG_END,e),this.stopDragging(e),!this.gos.get("rowDragManaged")||!this.gos.get("suppressMoveWhenRowDragging")&&this.isFromThisGrid(e)||this.isDropZoneWithinThisGrid(e)||this.moveRowAndClearHighlight(e)}stopDragging(e){this.autoScrollService.ensureCleared(),this.getRowNodes(e).forEach(e=>{e.setDragging(!1)})}};g([he("dragAndDropService")],Fo.prototype,"dragAndDropService",2),g([he("rowModel")],Fo.prototype,"rowModel",2),g([he("paginationProxy")],Fo.prototype,"paginationProxy",2),g([he("columnModel")],Fo.prototype,"columnModel",2),g([he("focusService")],Fo.prototype,"focusService",2),g([he("sortController")],Fo.prototype,"sortController",2),g([he("filterManager")],Fo.prototype,"filterManager",2),g([he("selectionService")],Fo.prototype,"selectionService",2),g([he("mouseEventService")],Fo.prototype,"mouseEventService",2),g([he("ctrlsService")],Fo.prototype,"ctrlsService",2),g([de("rangeService")],Fo.prototype,"rangeService",2),g([ae],Fo.prototype,"postConstruct",1);var Go=class extends nt{constructor(){super(...arguments),this.dragEndFunctions=[],this.dragSources=[]}removeAllListeners(){this.dragSources.forEach(this.removeListener.bind(this)),this.dragSources.length=0}removeListener(e){const t=e.dragSource.eElement,i=e.mouseDownListener;if(t.removeEventListener("mousedown",i),e.touchEnabled){const i=e.touchStartListener;t.removeEventListener("touchstart",i,{passive:!0})}}removeDragSource(e){const t=this.dragSources.find(t=>t.dragSource===e);t&&(this.removeListener(t),Ne(this.dragSources,t))}isDragging(){return this.dragging}addDragSource(e){const t=this.onMouseDown.bind(this,e),{eElement:i,includeTouch:n,stopPropagationForTouch:s}=e;i.addEventListener("mousedown",t);let r=null;const o=this.gos.get("suppressTouch");n&&!o&&(r=t=>{rn(t.target)||(t.cancelable&&(t.preventDefault(),s&&t.stopPropagation()),this.onTouchStart(e,t))},i.addEventListener("touchstart",r,{passive:!1})),this.dragSources.push({dragSource:e,mouseDownListener:t,touchStartListener:r,touchEnabled:!!n})}getStartTarget(){return this.startTarget}onTouchStart(e,t){this.currentDragParams=e,this.dragging=!1;const i=t.touches[0];this.touchLastTime=i,this.touchStart=i;const n=t=>this.onTouchUp(t,e.eElement),s=t.target,r=[{target:this.gos.getRootNode(),type:"touchmove",listener:e=>{e.cancelable&&e.preventDefault()},options:{passive:!1}},{target:s,type:"touchmove",listener:t=>this.onTouchMove(t,e.eElement),options:{passive:!0}},{target:s,type:"touchend",listener:n,options:{passive:!0}},{target:s,type:"touchcancel",listener:n,options:{passive:!0}}];this.addTemporaryEvents(r),0===e.dragStartPixels&&this.onCommonMove(i,this.touchStart,e.eElement)}onMouseDown(e,t){const i=t;if(e.skipMouseEvent&&e.skipMouseEvent(t))return;if(i._alreadyProcessedByDragService)return;if(i._alreadyProcessedByDragService=!0,0!==t.button)return;this.shouldPreventMouseEvent(t)&&t.preventDefault(),this.currentDragParams=e,this.dragging=!1,this.mouseStartEvent=t,this.startTarget=t.target;const n=this.gos.getRootNode(),s=[{target:n,type:"mousemove",listener:t=>this.onMouseMove(t,e.eElement)},{target:n,type:"mouseup",listener:t=>this.onMouseUp(t,e.eElement)},{target:n,type:"contextmenu",listener:e=>e.preventDefault()}];this.addTemporaryEvents(s),0===e.dragStartPixels&&this.onMouseMove(t,e.eElement)}addTemporaryEvents(e){e.forEach(e=>{const{target:t,type:i,listener:n,options:s}=e;t.addEventListener(i,n,s)}),this.dragEndFunctions.push(()=>{e.forEach(e=>{const{target:t,type:i,listener:n,options:s}=e;t.removeEventListener(i,n,s)})})}isEventNearStartEvent(e,t){const{dragStartPixels:i}=this.currentDragParams;return ns(e,t,y(i)?i:4)}getFirstActiveTouch(e){for(let t=0;t<e.length;t++)if(e[t].identifier===this.touchStart.identifier)return e[t];return null}onCommonMove(e,t,i){if(!this.dragging){if(!this.dragging&&this.isEventNearStartEvent(e,t))return;this.dragging=!0;const n={type:lt.EVENT_DRAG_STARTED,target:i};this.eventService.dispatchEvent(n),this.currentDragParams.onDragStart(t),this.currentDragParams.onDragging(t)}this.currentDragParams.onDragging(e)}onTouchMove(e,t){const i=this.getFirstActiveTouch(e.touches);i&&this.onCommonMove(i,this.touchStart,t)}onMouseMove(e,t){var i;Ai()&&(null==(i=this.gos.getDocument().getSelection())||i.removeAllRanges()),this.shouldPreventMouseEvent(e)&&e.preventDefault(),this.onCommonMove(e,this.mouseStartEvent,t)}shouldPreventMouseEvent(e){const t=this.gos.get("enableCellTextSelection"),i="mousemove"===e.type;return t&&i&&e.cancelable&&this.mouseEventService.isEventFromThisGrid(e)&&!this.isOverFormFieldElement(e)}isOverFormFieldElement(e){const t=e.target,i=null==t?void 0:t.tagName.toLocaleLowerCase();return!!(null==i?void 0:i.match("^a$|textarea|input|select|button"))}onTouchUp(e,t){let i=this.getFirstActiveTouch(e.changedTouches);i||(i=this.touchLastTime),this.onUpCommon(i,t)}onMouseUp(e,t){this.onUpCommon(e,t)}onUpCommon(e,t){if(this.dragging){this.dragging=!1,this.currentDragParams.onDragStop(e);const i={type:lt.EVENT_DRAG_STOPPED,target:t};this.eventService.dispatchEvent(i)}this.mouseStartEvent=null,this.startTarget=null,this.touchStart=null,this.touchLastTime=null,this.currentDragParams=null,this.dragEndFunctions.forEach(e=>e()),this.dragEndFunctions.length=0}};g([he("mouseEventService")],Go.prototype,"mouseEventService",2),g([le],Go.prototype,"removeAllListeners",1),Go=g([ce("dragService")],Go);var Vo="ag-list-item-hovered",Bo=class extends nt{constructor(e,t,i){super(),this.comp=e,this.virtualList=t,this.params=i,this.currentDragValue=null,this.lastHoveredListItem=null}postConstruct(){this.addManagedListener(this.params.eventSource,this.params.listItemDragStartEvent,this.listItemDragStart.bind(this)),this.addManagedListener(this.params.eventSource,this.params.listItemDragEndEvent,this.listItemDragEnd.bind(this)),this.createDropTarget(),this.createAutoScrollService()}listItemDragStart(e){this.currentDragValue=this.params.getCurrentDragValue(e),this.moveBlocked=this.params.isMoveBlocked(this.currentDragValue)}listItemDragEnd(){window.setTimeout(()=>{this.currentDragValue=null,this.moveBlocked=!1},10)}createDropTarget(){const e={isInterestedIn:e=>e===this.params.dragSourceType,getIconName:()=>this.moveBlocked?Gr.ICON_PINNED:Gr.ICON_MOVE,getContainer:()=>this.comp.getGui(),onDragging:e=>this.onDragging(e),onDragStop:()=>this.onDragStop(),onDragLeave:()=>this.onDragLeave()};this.dragAndDropService.addDropTarget(e)}createAutoScrollService(){const e=this.virtualList.getGui();this.autoScrollService=new _o({scrollContainer:e,scrollAxis:"y",getVerticalPosition:()=>e.scrollTop,setVerticalPosition:t=>e.scrollTop=t})}onDragging(e){if(!this.currentDragValue||this.moveBlocked)return;const t=this.getListDragItem(e),i=this.virtualList.getComponentAt(t.rowIndex);if(!i)return;const n=i.getGui().parentElement;this.lastHoveredListItem&&this.lastHoveredListItem.rowIndex===t.rowIndex&&this.lastHoveredListItem.position===t.position||(this.autoScrollService.check(e.event),this.clearHoveredItems(),this.lastHoveredListItem=t,tn(n,Vo),tn(n,`ag-item-highlight-${t.position}`))}getListDragItem(e){const t=this.virtualList.getGui(),i=parseFloat(window.getComputedStyle(t).paddingTop),n=this.virtualList.getRowHeight(),s=this.virtualList.getScrollTop(),r=Math.max(0,(e.y-i+s)/n),o=this.params.getNumRows(this.comp)-1,a=0|Math.min(o,r);return{rowIndex:a,position:Math.round(r)>r||r>o?"bottom":"top",component:this.virtualList.getComponentAt(a)}}onDragStop(){this.moveBlocked||(this.params.moveItem(this.currentDragValue,this.lastHoveredListItem),this.clearHoveredItems(),this.autoScrollService.ensureCleared())}onDragLeave(){this.clearHoveredItems(),this.autoScrollService.ensureCleared()}clearHoveredItems(){this.virtualList.getGui().querySelectorAll(`.${Vo}`).forEach(e=>{[Vo,"ag-item-highlight-top","ag-item-highlight-bottom"].forEach(t=>{e.classList.remove(t)})}),this.lastHoveredListItem=null}};function Ho(e){const t=e;return null!=t&&null!=t.getFrameworkComponentInstance?t.getFrameworkComponentInstance():e}g([he("dragAndDropService")],Bo.prototype,"dragAndDropService",2),g([ae],Bo.prototype,"postConstruct",1);var zo=class{constructor(){this.detailGridInfoMap={},this.destroyCalled=!1}init(){switch(this.rowModel.getType()){case"clientSide":this.clientSideRowModel=this.rowModel;break;case"infinite":this.infiniteRowModel=this.rowModel;break;case"serverSide":this.serverSideRowModel=this.rowModel}this.ctrlsService.whenReady(e=>{this.gridBodyCtrl=e.gridBodyCtrl})}__getAlignedGridService(){return this.alignedGridsService}getGridId(){return this.context.getGridId()}addDetailGridInfo(e,t){this.detailGridInfoMap[e]=t}removeDetailGridInfo(e){delete this.detailGridInfoMap[e]}getDetailGridInfo(e){return this.detailGridInfoMap[e]}forEachDetailGridInfo(e){let t=0;L(this.detailGridInfoMap,(i,n)=>{y(n)&&(e(n,t),t++)})}getDataAsCsv(e){if(se.__assertRegistered("@ag-grid-community/csv-export","api.getDataAsCsv",this.context.getGridId()))return this.csvCreator.getDataAsCsv(e)}exportDataAsCsv(e){se.__assertRegistered("@ag-grid-community/csv-export","api.exportDataAsCsv",this.context.getGridId())&&this.csvCreator.exportDataAsCsv(e)}assertNotExcelMultiSheet(e,t){return!(!se.__assertRegistered("@ag-grid-enterprise/excel-export","api."+e,this.context.getGridId())||1===this.excelCreator.getFactoryMode()&&(console.warn("AG Grid: The Excel Exporter is currently on Multi Sheet mode. End that operation by calling 'api.getMultipleSheetAsExcel()' or 'api.exportMultipleSheetsAsExcel()'"),1))}getDataAsExcel(e){if(this.assertNotExcelMultiSheet("getDataAsExcel",e))return this.excelCreator.getDataAsExcel(e)}exportDataAsExcel(e){this.assertNotExcelMultiSheet("exportDataAsExcel",e)&&this.excelCreator.exportDataAsExcel(e)}getSheetDataForExcel(e){if(se.__assertRegistered("@ag-grid-enterprise/excel-export","api.getSheetDataForExcel",this.context.getGridId()))return this.excelCreator.setFactoryMode(1),this.excelCreator.getSheetDataForExcel(e)}getMultipleSheetsAsExcel(e){if(se.__assertRegistered("@ag-grid-enterprise/excel-export","api.getMultipleSheetsAsExcel",this.context.getGridId()))return this.excelCreator.getMultipleSheetsAsExcel(e)}exportMultipleSheetsAsExcel(e){se.__assertRegistered("@ag-grid-enterprise/excel-export","api.exportMultipleSheetsAsExcel",this.context.getGridId())&&this.excelCreator.exportMultipleSheetsAsExcel(e)}setGridAriaProperty(e,t){if(!e)return;const i=this.ctrlsService.getGridBodyCtrl().getGui(),n=`aria-${e}`;null===t?i.removeAttribute(n):i.setAttribute(n,t)}logMissingRowModel(e,...t){console.error(`AG Grid: api.${e} can only be called when gridOptions.rowModelType is ${t.join(" or ")}`)}logDeprecation(e,t,i,n){z(`Since ${e} api.${t} is deprecated. Please use ${i} instead. ${null!=n?n:""}`)}getPinnedTopRowCount(){return this.pinnedRowModel.getPinnedTopRowCount()}getPinnedBottomRowCount(){return this.pinnedRowModel.getPinnedBottomRowCount()}getPinnedTopRow(e){return this.pinnedRowModel.getPinnedTopRow(e)}getPinnedBottomRow(e){return this.pinnedRowModel.getPinnedBottomRow(e)}expireValueCache(){this.valueCache.expire()}getVerticalPixelRange(){return this.gridBodyCtrl.getScrollFeature().getVScrollPosition()}getHorizontalPixelRange(){return this.gridBodyCtrl.getScrollFeature().getHScrollPosition()}refreshCells(e={}){this.frameworkOverrides.wrapIncoming(()=>this.rowRenderer.refreshCells(e))}flashCells(e={}){const t=e=>z(`Since v31.1 api.flashCells parameter '${e}Delay' is deprecated. Please use '${e}Duration' instead.`);y(e.fadeDelay)&&t("fade"),y(e.flashDelay)&&t("flash"),this.frameworkOverrides.wrapIncoming(()=>this.rowRenderer.flashCells(e))}redrawRows(e={}){const t=e?e.rowNodes:void 0;this.frameworkOverrides.wrapIncoming(()=>this.rowRenderer.redrawRows(t))}refreshHeader(){this.frameworkOverrides.wrapIncoming(()=>this.ctrlsService.getHeaderRowContainerCtrls().forEach(e=>e.refresh()))}isAnyFilterPresent(){return this.filterManager.isAnyFilterPresent()}isColumnFilterPresent(){return this.filterManager.isColumnFilterPresent()||this.filterManager.isAggregateFilterPresent()}isQuickFilterPresent(){return this.filterManager.isQuickFilterPresent()}getModel(){return z("Since v31.1 getModel() is deprecated. Please use the appropriate grid API methods instead."),this.rowModel}setRowNodeExpanded(e,t,i,n){this.expansionService.setRowNodeExpanded(e,t,i,n)}onGroupExpandedOrCollapsed(){C(this.clientSideRowModel)?this.logMissingRowModel("onGroupExpandedOrCollapsed","clientSide"):this.expansionService.onGroupExpandedOrCollapsed()}refreshClientSideRowModel(e){C(this.clientSideRowModel)?this.logMissingRowModel("refreshClientSideRowModel","clientSide"):this.clientSideRowModel.refreshModel(e)}isAnimationFrameQueueEmpty(){return this.animationFrameService.isQueueEmpty()}flushAllAnimationFrames(){this.animationFrameService.flushAllFrames()}getRowNode(e){return this.rowModel.getRowNode(e)}getSizesForCurrentTheme(){return{rowHeight:this.gos.getRowHeightAsNumber(),headerHeight:this.columnModel.getHeaderHeight()}}expandAll(){this.clientSideRowModel||this.serverSideRowModel?this.expansionService.expandAll(!0):this.logMissingRowModel("expandAll","clientSide","serverSide")}collapseAll(){this.clientSideRowModel||this.serverSideRowModel?this.expansionService.expandAll(!1):this.logMissingRowModel("collapseAll","clientSide","serverSide")}addRenderedRowListener(e,t,i){this.rowRenderer.addRenderedRowListener(e,t,i)}getQuickFilter(){return this.gos.get("quickFilterText")}getAdvancedFilterModel(){return se.__assertRegistered("@ag-grid-enterprise/advanced-filter","api.getAdvancedFilterModel",this.context.getGridId())?this.filterManager.getAdvancedFilterModel():null}setAdvancedFilterModel(e){this.filterManager.setAdvancedFilterModel(e)}showAdvancedFilterBuilder(){se.__assertRegistered("@ag-grid-enterprise/advanced-filter","api.setAdvancedFilterModel",this.context.getGridId())&&this.filterManager.showAdvancedFilterBuilder("api")}setNodesSelected(e){if(!e.nodes.every(e=>e.rowPinned?(console.warn("AG Grid: cannot select pinned rows"),!1):void 0!==e.id||(console.warn("AG Grid: cannot select node until id for node is known"),!1)))return;const{nodes:t,source:i,newValue:n}=e,s=t;this.selectionService.setNodesSelected({nodes:s,source:null!=i?i:"api",newValue:n})}selectAll(e="apiSelectAll"){this.selectionService.selectAllRowNodes({source:e})}deselectAll(e="apiSelectAll"){this.selectionService.deselectAllRowNodes({source:e})}selectAllFiltered(e="apiSelectAllFiltered"){this.selectionService.selectAllRowNodes({source:e,justFiltered:!0})}deselectAllFiltered(e="apiSelectAllFiltered"){this.selectionService.deselectAllRowNodes({source:e,justFiltered:!0})}getServerSideSelectionState(){return C(this.serverSideRowModel)?(this.logMissingRowModel("getServerSideSelectionState","serverSide"),null):this.selectionService.getSelectionState()}setServerSideSelectionState(e){C(this.serverSideRowModel)?this.logMissingRowModel("setServerSideSelectionState","serverSide"):this.selectionService.setSelectionState(e,"api")}selectAllOnCurrentPage(e="apiSelectAllCurrentPage"){this.selectionService.selectAllRowNodes({source:e,justCurrentPage:!0})}deselectAllOnCurrentPage(e="apiSelectAllCurrentPage"){this.selectionService.deselectAllRowNodes({source:e,justCurrentPage:!0})}showLoadingOverlay(){this.overlayService.showLoadingOverlay()}showNoRowsOverlay(){this.overlayService.showNoRowsOverlay()}hideOverlay(){this.overlayService.hideOverlay()}getSelectedNodes(){return this.selectionService.getSelectedNodes()}getSelectedRows(){return this.selectionService.getSelectedRows()}getBestCostNodeSelection(){if(!C(this.clientSideRowModel))return this.selectionService.getBestCostNodeSelection();this.logMissingRowModel("getBestCostNodeSelection","clientSide")}getRenderedNodes(){return this.rowRenderer.getRenderedNodes()}ensureColumnVisible(e,t="auto"){this.frameworkOverrides.wrapIncoming(()=>this.gridBodyCtrl.getScrollFeature().ensureColumnVisible(e,t),"ensureVisible")}ensureIndexVisible(e,t){this.frameworkOverrides.wrapIncoming(()=>this.gridBodyCtrl.getScrollFeature().ensureIndexVisible(e,t),"ensureVisible")}ensureNodeVisible(e,t=null){this.frameworkOverrides.wrapIncoming(()=>this.gridBodyCtrl.getScrollFeature().ensureNodeVisible(e,t),"ensureVisible")}forEachLeafNode(e){C(this.clientSideRowModel)?this.logMissingRowModel("forEachLeafNode","clientSide"):this.clientSideRowModel.forEachLeafNode(e)}forEachNode(e,t){this.rowModel.forEachNode(e,t)}forEachNodeAfterFilter(e){C(this.clientSideRowModel)?this.logMissingRowModel("forEachNodeAfterFilter","clientSide"):this.clientSideRowModel.forEachNodeAfterFilter(e)}forEachNodeAfterFilterAndSort(e){C(this.clientSideRowModel)?this.logMissingRowModel("forEachNodeAfterFilterAndSort","clientSide"):this.clientSideRowModel.forEachNodeAfterFilterAndSort(e)}getFilterInstance(e,t){return z("'getFilterInstance' is deprecated. To get/set individual filter models, use 'getColumnFilterModel' or 'setColumnFilterModel' instead. To get hold of the filter instance, use 'getColumnFilterInstance' which returns the instance asynchronously."),this.filterManager.getFilterInstance(e,t)}getColumnFilterInstance(e){return this.filterManager.getColumnFilterInstance(e)}destroyFilter(e){const t=this.columnModel.getPrimaryColumn(e);if(t)return this.filterManager.destroyFilter(t,"api")}getStatusPanel(e){if(se.__assertRegistered("@ag-grid-enterprise/status-bar","api.getStatusPanel",this.context.getGridId()))return Ho(this.statusBarService.getStatusPanel(e))}getColumnDef(e){const t=this.columnModel.getPrimaryColumn(e);return t?t.getColDef():null}getColumnDefs(){return this.columnModel.getColumnDefs()}onFilterChanged(e="api"){this.filterManager.onFilterChanged({source:e})}onSortChanged(){this.sortController.onSortChanged("api")}setFilterModel(e){this.frameworkOverrides.wrapIncoming(()=>this.filterManager.setFilterModel(e))}getFilterModel(){return this.filterManager.getFilterModel()}getColumnFilterModel(e){return this.filterManager.getColumnFilterModel(e)}setColumnFilterModel(e,t){return this.filterManager.setColumnFilterModel(e,t)}getFocusedCell(){return this.focusService.getFocusedCell()}clearFocusedCell(){return this.focusService.clearFocusedCell()}setFocusedCell(e,t,i){this.focusService.setFocusedCell({rowIndex:e,column:t,rowPinned:i,forceBrowserFocus:!0})}addRowDropZone(e){this.gridBodyCtrl.getRowDragFeature().addRowDropZone(e)}removeRowDropZone(e){const t=this.dragAndDropService.findExternalZone(e);t&&this.dragAndDropService.removeDropTarget(t)}getRowDropZoneParams(e){return this.gridBodyCtrl.getRowDragFeature().getRowDropZone(e)}assertSideBarLoaded(e){return se.__assertRegistered("@ag-grid-enterprise/side-bar","api."+e,this.context.getGridId())}isSideBarVisible(){return this.assertSideBarLoaded("isSideBarVisible")&&this.sideBarService.getSideBarComp().isDisplayed()}setSideBarVisible(e){this.assertSideBarLoaded("setSideBarVisible")&&this.sideBarService.getSideBarComp().setDisplayed(e)}setSideBarPosition(e){this.assertSideBarLoaded("setSideBarPosition")&&this.sideBarService.getSideBarComp().setSideBarPosition(e)}openToolPanel(e){this.assertSideBarLoaded("openToolPanel")&&this.sideBarService.getSideBarComp().openToolPanel(e,"api")}closeToolPanel(){this.assertSideBarLoaded("closeToolPanel")&&this.sideBarService.getSideBarComp().close("api")}getOpenedToolPanel(){return this.assertSideBarLoaded("getOpenedToolPanel")?this.sideBarService.getSideBarComp().openedItem():null}refreshToolPanel(){this.assertSideBarLoaded("refreshToolPanel")&&this.sideBarService.getSideBarComp().refresh()}isToolPanelShowing(){return this.assertSideBarLoaded("isToolPanelShowing")&&this.sideBarService.getSideBarComp().isToolPanelShowing()}getToolPanelInstance(e){if(this.assertSideBarLoaded("getToolPanelInstance"))return Ho(this.sideBarService.getSideBarComp().getToolPanelInstance(e))}getSideBar(){if(this.assertSideBarLoaded("getSideBar"))return this.sideBarService.getSideBarComp().getDef()}resetRowHeights(){if(y(this.clientSideRowModel)){if(this.columnModel.isAutoRowHeightActive())return void console.warn("AG Grid: calling gridApi.resetRowHeights() makes no sense when using Auto Row Height.");this.clientSideRowModel.resetRowHeights()}}setRowCount(e,t){if(this.serverSideRowModel)return this.columnModel.isRowGroupEmpty()?void this.serverSideRowModel.setRowCount(e,t):void console.error("AG Grid: setRowCount cannot be used while using row grouping.");this.infiniteRowModel?this.infiniteRowModel.setRowCount(e,t):this.logMissingRowModel("setRowCount","infinite","serverSide")}onRowHeightChanged(){this.clientSideRowModel?this.clientSideRowModel.onRowHeightChanged():this.serverSideRowModel&&this.serverSideRowModel.onRowHeightChanged()}getValue(e,t){return this.logDeprecation("31.3","getValue","getCellValue"),this.getCellValue({colKey:e,rowNode:t})}getCellValue(e){var t;const{colKey:i,rowNode:n,useFormatter:s}=e;let r=null!=(t=this.columnModel.getPrimaryColumn(i))?t:this.columnModel.getGridColumn(i);if(C(r))return null;const o=this.valueService.getValue(r,n);if(s){const e=this.valueService.formatValue(r,n,o);return null!=e?e:yt(o,!0)}return o}addEventListener(e,t){this.apiEventService.addEventListener(e,t)}addGlobalListener(e){this.apiEventService.addGlobalListener(e)}removeEventListener(e,t){this.apiEventService.removeEventListener(e,t)}removeGlobalListener(e){this.apiEventService.removeGlobalListener(e)}dispatchEvent(e){this.eventService.dispatchEvent(e)}destroy(){var e;const t=`See ${this.frameworkOverrides.getDocLink("grid-lifecycle/#grid-pre-destroyed")}`;if(this.destroyCalled)return;const i={type:lt.EVENT_GRID_PRE_DESTROYED,state:this.getState()};this.dispatchEvent(i),this.destroyCalled=!0,null==(e=this.ctrlsService.get("gridCtrl"))||e.destroyGridUi(),this.context.destroy(),this.detailGridInfoMap={},F(this,["isDestroyed"],t)}isDestroyed(){return this.destroyCalled}resetQuickFilter(){this.filterManager.resetQuickFilterCache()}getCellRanges(){return this.rangeService?this.rangeService.getCellRanges():(se.__assertRegistered("@ag-grid-enterprise/range-selection","api.getCellRanges",this.context.getGridId()),null)}addCellRange(e){this.rangeService?this.rangeService.addCellRange(e):se.__assertRegistered("@ag-grid-enterprise/range-selection","api.addCellRange",this.context.getGridId())}clearRangeSelection(){this.rangeService&&this.rangeService.removeAllCellRanges(),se.__assertRegistered("@ag-grid-enterprise/range-selection","gridApi.clearRangeSelection",this.context.getGridId())}undoCellEditing(){this.undoRedoService.undo("api")}redoCellEditing(){this.undoRedoService.redo("api")}getCurrentUndoSize(){return this.undoRedoService.getCurrentUndoStackSize()}getCurrentRedoSize(){return this.undoRedoService.getCurrentRedoStackSize()}assertChart(e,t){if(se.__assertRegistered("@ag-grid-enterprise/charts","api."+e,this.context.getGridId()))return this.frameworkOverrides.wrapIncoming(()=>t())}getChartModels(){return this.assertChart("getChartModels",()=>this.chartService.getChartModels())}getChartRef(e){return this.assertChart("getChartRef",()=>this.chartService.getChartRef(e))}getChartImageDataURL(e){return this.assertChart("getChartImageDataURL",()=>this.chartService.getChartImageDataURL(e))}downloadChart(e){return this.assertChart("downloadChart",()=>this.chartService.downloadChart(e))}openChartToolPanel(e){return this.assertChart("openChartToolPanel",()=>this.chartService.openChartToolPanel(e))}closeChartToolPanel(e){return this.assertChart("closeChartToolPanel",()=>this.chartService.closeChartToolPanel(e.chartId))}createRangeChart(e){return this.assertChart("createRangeChart",()=>this.chartService.createRangeChart(e))}createPivotChart(e){return this.assertChart("createPivotChart",()=>this.chartService.createPivotChart(e))}createCrossFilterChart(e){return this.assertChart("createCrossFilterChart",()=>this.chartService.createCrossFilterChart(e))}updateChart(e){return this.assertChart("updateChart",()=>this.chartService.updateChart(e))}restoreChart(e,t){return this.assertChart("restoreChart",()=>this.chartService.restoreChart(e,t))}assertClipboard(e,t){se.__assertRegistered("@ag-grid-enterprise/clipboard","api"+e,this.context.getGridId())&&t()}copyToClipboard(e){this.assertClipboard("copyToClipboard",()=>this.clipboardService.copyToClipboard(e))}cutToClipboard(e){this.assertClipboard("cutToClipboard",()=>this.clipboardService.cutToClipboard(e))}copySelectedRowsToClipboard(e){this.assertClipboard("copySelectedRowsToClipboard",()=>this.clipboardService.copySelectedRowsToClipboard(e))}copySelectedRangeToClipboard(e){this.assertClipboard("copySelectedRangeToClipboard",()=>this.clipboardService.copySelectedRangeToClipboard(e))}copySelectedRangeDown(){this.assertClipboard("copySelectedRangeDown",()=>this.clipboardService.copyRangeDown())}pasteFromClipboard(){this.assertClipboard("pasteFromClipboard",()=>this.clipboardService.pasteFromClipboard())}showColumnMenuAfterButtonClick(e,t){z("'showColumnMenuAfterButtonClick' is deprecated. Use 'IHeaderParams.showColumnMenu' within a header component, or 'api.showColumnMenu' elsewhere.");const i=this.columnModel.getGridColumn(e);this.menuService.showColumnMenu({column:i,buttonElement:t,positionBy:"button"})}showColumnMenuAfterMouseClick(e,t){z("'showColumnMenuAfterMouseClick' is deprecated. Use 'IHeaderParams.showColumnMenuAfterMouseClick' within a header component, or 'api.showColumnMenu' elsewhere.");let i=this.columnModel.getGridColumn(e);i||(i=this.columnModel.getPrimaryColumn(e)),i?this.menuService.showColumnMenu({column:i,mouseEvent:t,positionBy:"mouse"}):console.error(`AG Grid: column '${e}' not found`)}showContextMenu(e){const{rowNode:t,column:i,value:n,x:s,y:r}=e||{};let{x:o,y:a}=this.menuService.getContextMenuPosition(t,i);null!=s&&(o=s),null!=r&&(a=r),this.menuService.showContextMenu({mouseEvent:new MouseEvent("mousedown",{clientX:o,clientY:a}),rowNode:t,column:i,value:n})}showColumnChooser(e){this.menuService.showColumnChooser({chooserParams:e})}showColumnFilter(e){const t=this.columnModel.getGridColumn(e);t?this.menuService.showFilterMenu({column:t,containerType:"columnFilter",positionBy:"auto"}):console.error(`AG Grid: column '${e}' not found`)}showColumnMenu(e){const t=this.columnModel.getGridColumn(e);t?this.menuService.showColumnMenu({column:t,positionBy:"auto"}):console.error(`AG Grid: column '${e}' not found`)}hidePopupMenu(){this.menuService.hidePopupMenu()}hideColumnChooser(){this.menuService.hideColumnChooser()}tabToNextCell(e){return this.navigationService.tabToNextCell(!1,e)}tabToPreviousCell(e){return this.navigationService.tabToNextCell(!0,e)}getCellRendererInstances(e={}){return this.rowRenderer.getCellRendererInstances(e).map(Ho)}getCellEditorInstances(e={}){return this.rowRenderer.getCellEditorInstances(e).map(Ho)}getEditingCells(){return this.rowRenderer.getEditingCells()}stopEditing(e=!1){this.rowRenderer.stopEditing(e)}startEditingCell(e){const t=this.columnModel.getGridColumn(e.colKey);if(!t)return void console.warn(`AG Grid: no column found for ${e.colKey}`);const i={rowIndex:e.rowIndex,rowPinned:e.rowPinned||null,column:t};null==e.rowPinned&&this.ensureIndexVisible(e.rowIndex),this.ensureColumnVisible(e.colKey);const n=this.navigationService.getCellByPosition(i);n&&(this.focusService.isCellFocused(i)||this.focusService.setFocusedCell(i),n.startRowOrCellEdit(e.key))}addAggFunc(e,t){this.logDeprecation("v31.1","addAggFunc(key, func)","addAggFuncs({ key: func })"),this.aggFuncService&&this.aggFuncService.addAggFuncs({key:t})}addAggFuncs(e){this.aggFuncService&&this.aggFuncService.addAggFuncs(e)}clearAggFuncs(){this.aggFuncService&&this.aggFuncService.clear()}applyServerSideTransaction(e){if(this.serverSideTransactionManager)return this.serverSideTransactionManager.applyTransaction(e);this.logMissingRowModel("applyServerSideTransaction","serverSide")}applyServerSideTransactionAsync(e,t){if(this.serverSideTransactionManager)return this.serverSideTransactionManager.applyTransactionAsync(e,t);this.logMissingRowModel("applyServerSideTransactionAsync","serverSide")}applyServerSideRowData(e){var t,i;const n=null!=(t=e.startRow)?t:0,s=null!=(i=e.route)?i:[];n<0?console.warn(`AG Grid: invalid value ${e.startRow} for startRow, the value should be >= 0`):this.serverSideRowModel?this.serverSideRowModel.applyRowData(e.successParams,n,s):this.logMissingRowModel("setServerSideDatasource","serverSide")}retryServerSideLoads(){this.serverSideRowModel?this.serverSideRowModel.retryLoads():this.logMissingRowModel("retryServerSideLoads","serverSide")}flushServerSideAsyncTransactions(){if(this.serverSideTransactionManager)return this.serverSideTransactionManager.flushAsyncTransactions();this.logMissingRowModel("flushServerSideAsyncTransactions","serverSide")}applyTransaction(e){if(this.clientSideRowModel)return this.frameworkOverrides.wrapIncoming(()=>this.clientSideRowModel.updateRowData(e));this.logMissingRowModel("applyTransaction","clientSide")}applyTransactionAsync(e,t){this.clientSideRowModel?this.frameworkOverrides.wrapIncoming(()=>this.clientSideRowModel.batchUpdateRowData(e,t)):this.logMissingRowModel("applyTransactionAsync","clientSide")}flushAsyncTransactions(){this.clientSideRowModel?this.frameworkOverrides.wrapIncoming(()=>this.clientSideRowModel.flushAsyncTransactions()):this.logMissingRowModel("flushAsyncTransactions","clientSide")}refreshInfiniteCache(){this.infiniteRowModel?this.infiniteRowModel.refreshCache():this.logMissingRowModel("refreshInfiniteCache","infinite")}purgeInfiniteCache(){this.infiniteRowModel?this.infiniteRowModel.purgeCache():this.logMissingRowModel("purgeInfiniteCache","infinite")}refreshServerSide(e){this.serverSideRowModel?this.serverSideRowModel.refreshStore(e):this.logMissingRowModel("refreshServerSide","serverSide")}getServerSideGroupLevelState(){return this.serverSideRowModel?this.serverSideRowModel.getStoreState():(this.logMissingRowModel("getServerSideGroupLevelState","serverSide"),[])}getInfiniteRowCount(){if(this.infiniteRowModel)return this.infiniteRowModel.getRowCount();this.logMissingRowModel("getInfiniteRowCount","infinite")}isLastRowIndexKnown(){if(this.infiniteRowModel)return this.infiniteRowModel.isLastRowIndexKnown();this.logMissingRowModel("isLastRowIndexKnown","infinite")}getCacheBlockState(){return this.rowNodeBlockLoader.getBlockState()}getFirstDisplayedRow(){return this.logDeprecation("v31.1","getFirstDisplayedRow","getFirstDisplayedRowIndex"),this.getFirstDisplayedRowIndex()}getFirstDisplayedRowIndex(){return this.rowRenderer.getFirstVirtualRenderedRow()}getLastDisplayedRow(){return this.logDeprecation("v31.1","getLastDisplayedRow","getLastDisplayedRowIndex"),this.getLastDisplayedRowIndex()}getLastDisplayedRowIndex(){return this.rowRenderer.getLastVirtualRenderedRow()}getDisplayedRowAtIndex(e){return this.rowModel.getRow(e)}getDisplayedRowCount(){return this.rowModel.getRowCount()}paginationIsLastPageFound(){return this.paginationProxy.isLastPageFound()}paginationGetPageSize(){return this.paginationProxy.getPageSize()}paginationGetCurrentPage(){return this.paginationProxy.getCurrentPage()}paginationGetTotalPages(){return this.paginationProxy.getTotalPages()}paginationGetRowCount(){return this.paginationProxy.getMasterRowCount()}paginationGoToNextPage(){this.paginationProxy.goToNextPage()}paginationGoToPreviousPage(){this.paginationProxy.goToPreviousPage()}paginationGoToFirstPage(){this.paginationProxy.goToFirstPage()}paginationGoToLastPage(){this.paginationProxy.goToLastPage()}paginationGoToPage(e){this.paginationProxy.goToPage(e)}sizeColumnsToFit(e){"number"==typeof e?this.columnModel.sizeColumnsToFit(e,"api"):this.gridBodyCtrl.sizeColumnsToFit(e)}setColumnGroupOpened(e,t){this.columnModel.setColumnGroupOpened(e,t,"api")}getColumnGroup(e,t){return this.columnModel.getColumnGroup(e,t)}getProvidedColumnGroup(e){return this.columnModel.getProvidedColumnGroup(e)}getDisplayNameForColumn(e,t){return this.columnModel.getDisplayNameForColumn(e,t)||""}getDisplayNameForColumnGroup(e,t){return this.columnModel.getDisplayNameForColumnGroup(e,t)||""}getColumn(e){return this.columnModel.getPrimaryColumn(e)}getColumns(){return this.columnModel.getAllPrimaryColumns()}applyColumnState(e){return this.columnModel.applyColumnState(e,"api")}getColumnState(){return this.columnModel.getColumnState()}resetColumnState(){this.columnModel.resetColumnState("api")}getColumnGroupState(){return this.columnModel.getColumnGroupState()}setColumnGroupState(e){this.columnModel.setColumnGroupState(e,"api")}resetColumnGroupState(){this.columnModel.resetColumnGroupState("api")}isPinning(){return this.columnModel.isPinningLeft()||this.columnModel.isPinningRight()}isPinningLeft(){return this.columnModel.isPinningLeft()}isPinningRight(){return this.columnModel.isPinningRight()}getDisplayedColAfter(e){return this.columnModel.getDisplayedColAfter(e)}getDisplayedColBefore(e){return this.columnModel.getDisplayedColBefore(e)}setColumnVisible(e,t){this.logDeprecation("v31.1","setColumnVisible(key,visible)","setColumnsVisible([key],visible)"),this.columnModel.setColumnsVisible([e],t,"api")}setColumnsVisible(e,t){this.columnModel.setColumnsVisible(e,t,"api")}setColumnPinned(e,t){this.logDeprecation("v31.1","setColumnPinned(key,pinned)","setColumnsPinned([key],pinned)"),this.columnModel.setColumnsPinned([e],t,"api")}setColumnsPinned(e,t){this.columnModel.setColumnsPinned(e,t,"api")}getAllGridColumns(){return this.columnModel.getAllGridColumns()}getDisplayedLeftColumns(){return this.columnModel.getDisplayedLeftColumns()}getDisplayedCenterColumns(){return this.columnModel.getDisplayedCenterColumns()}getDisplayedRightColumns(){return this.columnModel.getDisplayedRightColumns()}getAllDisplayedColumns(){return this.columnModel.getAllDisplayedColumns()}getAllDisplayedVirtualColumns(){return this.columnModel.getViewportColumns()}moveColumn(e,t){this.logDeprecation("v31.1","moveColumn(key, toIndex)","moveColumns([key], toIndex)"),this.columnModel.moveColumns([e],t,"api")}moveColumnByIndex(e,t){this.columnModel.moveColumnByIndex(e,t,"api")}moveColumns(e,t){this.columnModel.moveColumns(e,t,"api")}moveRowGroupColumn(e,t){this.columnModel.moveRowGroupColumn(e,t,"api")}setColumnAggFunc(e,t){this.columnModel.setColumnAggFunc(e,t,"api")}setColumnWidth(e,t,i=!0,n="api"){this.logDeprecation("v31.1","setColumnWidth(col, width)","setColumnWidths([{key: col, newWidth: width}])"),this.columnModel.setColumnWidths([{key:e,newWidth:t}],!1,i,n)}setColumnWidths(e,t=!0,i="api"){this.columnModel.setColumnWidths(e,!1,t,i)}isPivotMode(){return this.columnModel.isPivotMode()}getPivotResultColumn(e,t){return this.columnModel.getSecondaryPivotColumn(e,t)}setValueColumns(e){this.columnModel.setValueColumns(e,"api")}getValueColumns(){return this.columnModel.getValueColumns()}removeValueColumn(e){this.logDeprecation("v31.1","removeValueColumn(colKey)","removeValueColumns([colKey])"),this.columnModel.removeValueColumns([e],"api")}removeValueColumns(e){this.columnModel.removeValueColumns(e,"api")}addValueColumn(e){this.logDeprecation("v31.1","addValueColumn(colKey)","addValueColumns([colKey])"),this.columnModel.addValueColumns([e],"api")}addValueColumns(e){this.columnModel.addValueColumns(e,"api")}setRowGroupColumns(e){this.columnModel.setRowGroupColumns(e,"api")}removeRowGroupColumn(e){this.logDeprecation("v31.1","removeRowGroupColumn(colKey)","removeRowGroupColumns([colKey])"),this.columnModel.removeRowGroupColumns([e],"api")}removeRowGroupColumns(e){this.columnModel.removeRowGroupColumns(e,"api")}addRowGroupColumn(e){this.logDeprecation("v31.1","addRowGroupColumn(colKey)","addRowGroupColumns([colKey])"),this.columnModel.addRowGroupColumns([e],"api")}addRowGroupColumns(e){this.columnModel.addRowGroupColumns(e,"api")}getRowGroupColumns(){return this.columnModel.getRowGroupColumns()}setPivotColumns(e){this.columnModel.setPivotColumns(e,"api")}removePivotColumn(e){this.logDeprecation("v31.1","removePivotColumn(colKey)","removePivotColumns([colKey])"),this.columnModel.removePivotColumns([e],"api")}removePivotColumns(e){this.columnModel.removePivotColumns(e,"api")}addPivotColumn(e){this.logDeprecation("v31.1","addPivotColumn(colKey)","addPivotColumns([colKey])"),this.columnModel.addPivotColumns([e],"api")}addPivotColumns(e){this.columnModel.addPivotColumns(e,"api")}getPivotColumns(){return this.columnModel.getPivotColumns()}getLeftDisplayedColumnGroups(){return this.columnModel.getDisplayedTreeLeft()}getCenterDisplayedColumnGroups(){return this.columnModel.getDisplayedTreeCentre()}getRightDisplayedColumnGroups(){return this.columnModel.getDisplayedTreeRight()}getAllDisplayedColumnGroups(){return this.columnModel.getAllDisplayedTrees()}autoSizeColumn(e,t){return this.logDeprecation("v31.1","autoSizeColumn(key, skipHeader)","autoSizeColumns([key], skipHeader)"),this.columnModel.autoSizeColumns({columns:[e],skipHeader:t,source:"api"})}autoSizeColumns(e,t){this.columnModel.autoSizeColumns({columns:e,skipHeader:t,source:"api"})}autoSizeAllColumns(e){this.columnModel.autoSizeAllColumns("api",e)}setPivotResultColumns(e){this.columnModel.setSecondaryColumns(e,"api")}getPivotResultColumns(){return this.columnModel.getSecondaryColumns()}getState(){return this.stateService.getState()}getGridOption(e){return this.gos.get(e)}setGridOption(e,t){this.updateGridOptions({[e]:t})}updateGridOptions(e){this.gos.updateGridOptions({options:e})}__internalUpdateGridOptions(e,t){this.gos.updateGridOptions({options:e,force:t,source:"gridOptionsUpdated"})}deprecatedUpdateGridOption(e,t){z(`set${e.charAt(0).toUpperCase()}${e.slice(1,e.length)} is deprecated. Please use 'api.setGridOption('${e}', newValue)' or 'api.updateGridOptions({ ${e}: newValue })' instead.`),this.setGridOption(e,t)}setPivotMode(e){this.deprecatedUpdateGridOption("pivotMode",e)}setPinnedTopRowData(e){this.deprecatedUpdateGridOption("pinnedTopRowData",e)}setPinnedBottomRowData(e){this.deprecatedUpdateGridOption("pinnedBottomRowData",e)}setPopupParent(e){this.deprecatedUpdateGridOption("popupParent",e)}setSuppressModelUpdateAfterUpdateTransaction(e){this.deprecatedUpdateGridOption("suppressModelUpdateAfterUpdateTransaction",e)}setDataTypeDefinitions(e){this.deprecatedUpdateGridOption("dataTypeDefinitions",e)}setPagination(e){this.deprecatedUpdateGridOption("pagination",e)}paginationSetPageSize(e){this.deprecatedUpdateGridOption("paginationPageSize",e)}setSideBar(e){this.deprecatedUpdateGridOption("sideBar",e)}setSuppressClipboardPaste(e){this.deprecatedUpdateGridOption("suppressClipboardPaste",e)}setGroupRemoveSingleChildren(e){this.deprecatedUpdateGridOption("groupRemoveSingleChildren",e)}setGroupRemoveLowestSingleChildren(e){this.deprecatedUpdateGridOption("groupRemoveLowestSingleChildren",e)}setGroupDisplayType(e){this.deprecatedUpdateGridOption("groupDisplayType",e)}setGroupIncludeFooter(e){this.deprecatedUpdateGridOption("groupIncludeFooter",e)}setGroupIncludeTotalFooter(e){this.deprecatedUpdateGridOption("groupIncludeTotalFooter",e)}setRowClass(e){this.deprecatedUpdateGridOption("rowClass",e)}setDeltaSort(e){this.deprecatedUpdateGridOption("deltaSort",e)}setSuppressRowDrag(e){this.deprecatedUpdateGridOption("suppressRowDrag",e)}setSuppressMoveWhenRowDragging(e){this.deprecatedUpdateGridOption("suppressMoveWhenRowDragging",e)}setSuppressRowClickSelection(e){this.deprecatedUpdateGridOption("suppressRowClickSelection",e)}setEnableAdvancedFilter(e){this.deprecatedUpdateGridOption("enableAdvancedFilter",e)}setIncludeHiddenColumnsInAdvancedFilter(e){this.deprecatedUpdateGridOption("includeHiddenColumnsInAdvancedFilter",e)}setAdvancedFilterParent(e){this.deprecatedUpdateGridOption("advancedFilterParent",e)}setAdvancedFilterBuilderParams(e){this.deprecatedUpdateGridOption("advancedFilterBuilderParams",e)}setQuickFilter(e){z("setQuickFilter is deprecated. Please use 'api.setGridOption('quickFilterText', newValue)' or 'api.updateGridOptions({ quickFilterText: newValue })' instead."),this.gos.updateGridOptions({options:{quickFilterText:e}})}setExcludeHiddenColumnsFromQuickFilter(e){this.deprecatedUpdateGridOption("includeHiddenColumnsInQuickFilter",!e)}setIncludeHiddenColumnsInQuickFilter(e){this.deprecatedUpdateGridOption("includeHiddenColumnsInQuickFilter",e)}setQuickFilterParser(e){this.deprecatedUpdateGridOption("quickFilterParser",e)}setQuickFilterMatcher(e){this.deprecatedUpdateGridOption("quickFilterMatcher",e)}setAlwaysShowHorizontalScroll(e){this.deprecatedUpdateGridOption("alwaysShowHorizontalScroll",e)}setAlwaysShowVerticalScroll(e){this.deprecatedUpdateGridOption("alwaysShowVerticalScroll",e)}setFunctionsReadOnly(e){this.deprecatedUpdateGridOption("functionsReadOnly",e)}setColumnDefs(e,t="api"){z("setColumnDefs is deprecated. Please use 'api.setGridOption('columnDefs', newValue)' or 'api.updateGridOptions({ columnDefs: newValue })' instead."),this.gos.updateGridOptions({options:{columnDefs:e},source:t})}setAutoGroupColumnDef(e,t="api"){z("setAutoGroupColumnDef is deprecated. Please use 'api.setGridOption('autoGroupColumnDef', newValue)' or 'api.updateGridOptions({ autoGroupColumnDef: newValue })' instead."),this.gos.updateGridOptions({options:{autoGroupColumnDef:e},source:t})}setDefaultColDef(e,t="api"){z("setDefaultColDef is deprecated. Please use 'api.setGridOption('defaultColDef', newValue)' or 'api.updateGridOptions({ defaultColDef: newValue })' instead."),this.gos.updateGridOptions({options:{defaultColDef:e},source:t})}setColumnTypes(e,t="api"){z("setColumnTypes is deprecated. Please use 'api.setGridOption('columnTypes', newValue)' or 'api.updateGridOptions({ columnTypes: newValue })' instead."),this.gos.updateGridOptions({options:{columnTypes:e},source:t})}setTreeData(e){this.deprecatedUpdateGridOption("treeData",e)}setServerSideDatasource(e){this.deprecatedUpdateGridOption("serverSideDatasource",e)}setCacheBlockSize(e){this.deprecatedUpdateGridOption("cacheBlockSize",e)}setDatasource(e){this.deprecatedUpdateGridOption("datasource",e)}setViewportDatasource(e){this.deprecatedUpdateGridOption("viewportDatasource",e)}setRowData(e){this.deprecatedUpdateGridOption("rowData",e)}setEnableCellTextSelection(e){this.deprecatedUpdateGridOption("enableCellTextSelection",e)}setHeaderHeight(e){this.deprecatedUpdateGridOption("headerHeight",e)}setDomLayout(e){this.deprecatedUpdateGridOption("domLayout",e)}setFillHandleDirection(e){this.deprecatedUpdateGridOption("fillHandleDirection",e)}setGroupHeaderHeight(e){this.deprecatedUpdateGridOption("groupHeaderHeight",e)}setFloatingFiltersHeight(e){this.deprecatedUpdateGridOption("floatingFiltersHeight",e)}setPivotHeaderHeight(e){this.deprecatedUpdateGridOption("pivotHeaderHeight",e)}setPivotGroupHeaderHeight(e){this.deprecatedUpdateGridOption("pivotGroupHeaderHeight",e)}setAnimateRows(e){this.deprecatedUpdateGridOption("animateRows",e)}setIsExternalFilterPresent(e){this.deprecatedUpdateGridOption("isExternalFilterPresent",e)}setDoesExternalFilterPass(e){this.deprecatedUpdateGridOption("doesExternalFilterPass",e)}setNavigateToNextCell(e){this.deprecatedUpdateGridOption("navigateToNextCell",e)}setTabToNextCell(e){this.deprecatedUpdateGridOption("tabToNextCell",e)}setTabToNextHeader(e){this.deprecatedUpdateGridOption("tabToNextHeader",e)}setNavigateToNextHeader(e){this.deprecatedUpdateGridOption("navigateToNextHeader",e)}setRowGroupPanelShow(e){this.deprecatedUpdateGridOption("rowGroupPanelShow",e)}setGetGroupRowAgg(e){this.deprecatedUpdateGridOption("getGroupRowAgg",e)}setGetBusinessKeyForNode(e){this.deprecatedUpdateGridOption("getBusinessKeyForNode",e)}setGetChildCount(e){this.deprecatedUpdateGridOption("getChildCount",e)}setProcessRowPostCreate(e){this.deprecatedUpdateGridOption("processRowPostCreate",e)}setGetRowId(e){z("getRowId is a static property and can no longer be updated.")}setGetRowClass(e){this.deprecatedUpdateGridOption("getRowClass",e)}setIsFullWidthRow(e){this.deprecatedUpdateGridOption("isFullWidthRow",e)}setIsRowSelectable(e){this.deprecatedUpdateGridOption("isRowSelectable",e)}setIsRowMaster(e){this.deprecatedUpdateGridOption("isRowMaster",e)}setPostSortRows(e){this.deprecatedUpdateGridOption("postSortRows",e)}setGetDocument(e){this.deprecatedUpdateGridOption("getDocument",e)}setGetContextMenuItems(e){this.deprecatedUpdateGridOption("getContextMenuItems",e)}setGetMainMenuItems(e){this.deprecatedUpdateGridOption("getMainMenuItems",e)}setProcessCellForClipboard(e){this.deprecatedUpdateGridOption("processCellForClipboard",e)}setSendToClipboard(e){this.deprecatedUpdateGridOption("sendToClipboard",e)}setProcessCellFromClipboard(e){this.deprecatedUpdateGridOption("processCellFromClipboard",e)}setProcessPivotResultColDef(e){this.deprecatedUpdateGridOption("processPivotResultColDef",e)}setProcessPivotResultColGroupDef(e){this.deprecatedUpdateGridOption("processPivotResultColGroupDef",e)}setPostProcessPopup(e){this.deprecatedUpdateGridOption("postProcessPopup",e)}setInitialGroupOrderComparator(e){this.deprecatedUpdateGridOption("initialGroupOrderComparator",e)}setGetChartToolbarItems(e){this.deprecatedUpdateGridOption("getChartToolbarItems",e)}setPaginationNumberFormatter(e){this.deprecatedUpdateGridOption("paginationNumberFormatter",e)}setGetServerSideGroupLevelParams(e){this.deprecatedUpdateGridOption("getServerSideGroupLevelParams",e)}setIsServerSideGroupOpenByDefault(e){this.deprecatedUpdateGridOption("isServerSideGroupOpenByDefault",e)}setIsApplyServerSideTransaction(e){this.deprecatedUpdateGridOption("isApplyServerSideTransaction",e)}setIsServerSideGroup(e){this.deprecatedUpdateGridOption("isServerSideGroup",e)}setGetServerSideGroupKey(e){this.deprecatedUpdateGridOption("getServerSideGroupKey",e)}setGetRowStyle(e){this.deprecatedUpdateGridOption("getRowStyle",e)}setGetRowHeight(e){this.deprecatedUpdateGridOption("getRowHeight",e)}};g([he("rowRenderer")],zo.prototype,"rowRenderer",2),g([he("navigationService")],zo.prototype,"navigationService",2),g([he("filterManager")],zo.prototype,"filterManager",2),g([he("columnModel")],zo.prototype,"columnModel",2),g([he("selectionService")],zo.prototype,"selectionService",2),g([he("gridOptionsService")],zo.prototype,"gos",2),g([he("valueService")],zo.prototype,"valueService",2),g([he("alignedGridsService")],zo.prototype,"alignedGridsService",2),g([he("eventService")],zo.prototype,"eventService",2),g([he("pinnedRowModel")],zo.prototype,"pinnedRowModel",2),g([he("context")],zo.prototype,"context",2),g([he("rowModel")],zo.prototype,"rowModel",2),g([he("sortController")],zo.prototype,"sortController",2),g([he("paginationProxy")],zo.prototype,"paginationProxy",2),g([he("focusService")],zo.prototype,"focusService",2),g([he("dragAndDropService")],zo.prototype,"dragAndDropService",2),g([he("menuService")],zo.prototype,"menuService",2),g([he("valueCache")],zo.prototype,"valueCache",2),g([he("animationFrameService")],zo.prototype,"animationFrameService",2),g([he("ctrlsService")],zo.prototype,"ctrlsService",2),g([he("overlayService")],zo.prototype,"overlayService",2),g([he("stateService")],zo.prototype,"stateService",2),g([he("expansionService")],zo.prototype,"expansionService",2),g([he("apiEventService")],zo.prototype,"apiEventService",2),g([he("frameworkOverrides")],zo.prototype,"frameworkOverrides",2),g([he("undoRedoService")],zo.prototype,"undoRedoService",2),g([he("rowNodeBlockLoader")],zo.prototype,"rowNodeBlockLoader",2),g([de("csvCreator")],zo.prototype,"csvCreator",2),g([de("excelCreator")],zo.prototype,"excelCreator",2),g([de("rangeService")],zo.prototype,"rangeService",2),g([de("clipboardService")],zo.prototype,"clipboardService",2),g([de("aggFuncService")],zo.prototype,"aggFuncService",2),g([de("statusBarService")],zo.prototype,"statusBarService",2),g([de("chartService")],zo.prototype,"chartService",2),g([de("ssrmTransactionManager")],zo.prototype,"serverSideTransactionManager",2),g([de("sideBarService")],zo.prototype,"sideBarService",2),g([ae],zo.prototype,"init",1),zo=g([ce("gridApi")],zo);var Uo=class extends nt{constructor(){super(...arguments),this.quickFilter=null,this.quickFilterParts=null}postConstruct(){this.addManagedListener(this.eventService,lt.EVENT_COLUMN_PIVOT_MODE_CHANGED,()=>this.resetQuickFilterCache()),this.addManagedListener(this.eventService,lt.EVENT_NEW_COLUMNS_LOADED,()=>this.resetQuickFilterCache()),this.addManagedListener(this.eventService,lt.EVENT_COLUMN_ROW_GROUP_CHANGED,()=>this.resetQuickFilterCache()),this.addManagedListener(this.eventService,lt.EVENT_COLUMN_VISIBLE,()=>{this.gos.get("includeHiddenColumnsInQuickFilter")||this.resetQuickFilterCache()}),this.addManagedPropertyListener("quickFilterText",e=>this.setQuickFilter(e.currentValue)),this.addManagedPropertyListeners(["includeHiddenColumnsInQuickFilter","applyQuickFilterBeforePivotOrAgg"],()=>this.onQuickFilterColumnConfigChanged()),this.quickFilter=this.parseQuickFilter(this.gos.get("quickFilterText")),this.parser=this.gos.get("quickFilterParser"),this.matcher=this.gos.get("quickFilterMatcher"),this.setQuickFilterParts(),this.addManagedPropertyListeners(["quickFilterMatcher","quickFilterParser"],()=>this.setQuickFilterParserAndMatcher())}isQuickFilterPresent(){return null!==this.quickFilter}doesRowPassQuickFilter(e){const t=this.gos.get("cacheQuickFilter");return this.matcher?this.doesRowPassQuickFilterMatcher(t,e):this.quickFilterParts.every(i=>t?this.doesRowPassQuickFilterCache(e,i):this.doesRowPassQuickFilterNoCache(e,i))}resetQuickFilterCache(){this.rowModel.forEachNode(e=>e.quickFilterAggregateText=null)}setQuickFilterParts(){const{quickFilter:e,parser:t}=this;this.quickFilterParts=e?t?t(e):e.split(" "):null}parseQuickFilter(e){return y(e)?this.gos.isRowModelType("clientSide")?e.toUpperCase():(console.warn("AG Grid - Quick filtering only works with the Client-Side Row Model"),null):null}setQuickFilter(e){if(null!=e&&"string"!=typeof e)return void console.warn("AG Grid - Grid option quickFilterText only supports string inputs, received: "+typeof e);const t=this.parseQuickFilter(e);this.quickFilter!==t&&(this.quickFilter=t,this.setQuickFilterParts(),this.dispatchEvent({type:Uo.EVENT_QUICK_FILTER_CHANGED}))}setQuickFilterParserAndMatcher(){const e=this.gos.get("quickFilterParser"),t=this.gos.get("quickFilterMatcher"),i=e!==this.parser||t!==this.matcher;this.parser=e,this.matcher=t,i&&(this.setQuickFilterParts(),this.dispatchEvent({type:Uo.EVENT_QUICK_FILTER_CHANGED}))}onQuickFilterColumnConfigChanged(){this.columnModel.refreshQuickFilterColumns(),this.resetQuickFilterCache(),this.isQuickFilterPresent()&&this.dispatchEvent({type:Uo.EVENT_QUICK_FILTER_CHANGED})}doesRowPassQuickFilterNoCache(e,t){return this.columnModel.getAllColumnsForQuickFilter().some(i=>{const n=this.getQuickFilterTextForColumn(i,e);return y(n)&&n.indexOf(t)>=0})}doesRowPassQuickFilterCache(e,t){return this.checkGenerateQuickFilterAggregateText(e),e.quickFilterAggregateText.indexOf(t)>=0}doesRowPassQuickFilterMatcher(e,t){let i;e?(this.checkGenerateQuickFilterAggregateText(t),i=t.quickFilterAggregateText):i=this.getQuickFilterAggregateText(t);const{quickFilterParts:n,matcher:s}=this;return s(n,i)}checkGenerateQuickFilterAggregateText(e){e.quickFilterAggregateText||(e.quickFilterAggregateText=this.getQuickFilterAggregateText(e))}getQuickFilterTextForColumn(e,t){let i=this.valueService.getValue(e,t,!0);const n=e.getColDef();if(n.getQuickFilterText){const s=this.gos.addGridCommonParams({value:i,node:t,data:t.data,column:e,colDef:n});i=n.getQuickFilterText(s)}return y(i)?i.toString().toUpperCase():null}getQuickFilterAggregateText(e){const t=[];return this.columnModel.getAllColumnsForQuickFilter().forEach(i=>{const n=this.getQuickFilterTextForColumn(i,e);y(n)&&t.push(n)}),t.join(Uo.QUICK_FILTER_SEPARATOR)}};Uo.EVENT_QUICK_FILTER_CHANGED="quickFilterChanged",Uo.QUICK_FILTER_SEPARATOR="\n",g([he("valueService")],Uo.prototype,"valueService",2),g([he("columnModel")],Uo.prototype,"columnModel",2),g([he("rowModel")],Uo.prototype,"rowModel",2),g([ae],Uo.prototype,"postConstruct",1),Uo=g([ce("quickFilterService")],Uo);var Wo=class extends nt{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,lt.EVENT_GRID_COLUMNS_CHANGED,()=>this.onColumnsChanged()),this.addManagedListener(this.eventService,lt.EVENT_COLUMN_VALUE_CHANGED,()=>this.refreshFiltersForAggregations()),this.addManagedListener(this.eventService,lt.EVENT_COLUMN_PIVOT_CHANGED,()=>this.refreshFiltersForAggregations()),this.addManagedListener(this.eventService,lt.EVENT_COLUMN_PIVOT_MODE_CHANGED,()=>this.refreshFiltersForAggregations()),this.addManagedListener(this.eventService,lt.EVENT_NEW_COLUMNS_LOADED,()=>this.updateAdvancedFilterColumns()),this.addManagedListener(this.eventService,lt.EVENT_COLUMN_VISIBLE,()=>this.updateAdvancedFilterColumns()),this.addManagedListener(this.eventService,lt.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",e=>this.setAdvancedFilterModel(e.currentValue)),this.addManagedListener(this.eventService,lt.EVENT_ADVANCED_FILTER_ENABLED_CHANGED,({enabled:e})=>this.onAdvancedFilterEnabledChanged(e)),this.addManagedListener(this.eventService,lt.EVENT_DATA_TYPES_INFERRED,()=>this.processFilterModelUpdateQueue()),this.addManagedListener(this.quickFilterService,Uo.EVENT_QUICK_FILTER_CHANGED,()=>this.onFilterChanged({source:"quickFilter"})),this.initialFilterModel=d({},null!=(i=null==(t=null==(e=this.gos.get("initialState"))?void 0:e.filter)?void 0:t.filterModel)?i:{})}isExternalFilterPresentCallback(){const e=this.gos.getCallback("isExternalFilterPresent");return"function"==typeof e&&e({})}doesExternalFilterPass(e){const t=this.gos.get("doesExternalFilterPass");return"function"==typeof t&&t(e)}setFilterModel(e,t="api"){if(this.isAdvancedFilterEnabled())return void this.warnAdvancedFilters();if(this.dataTypeService.isPendingInference())return void this.filterModelUpdateQueue.push({model:e,source:t});const i=[],n=this.getFilterModel();if(e){const t=as(Object.keys(e));this.allColumnFilters.forEach((n,s)=>{const r=e[s];i.push(this.setModelOnFilterWrapper(n.filterPromise,r)),t.delete(s)}),t.forEach(t=>{const n=this.columnModel.getPrimaryColumn(t)||this.columnModel.getGridColumn(t);if(!n)return void console.warn("AG Grid: setFilterModel() - no column found for colId: "+t);if(!n.isFilterAllowed())return void console.warn("AG Grid: setFilterModel() - unable to fully apply model, filtering disabled for colId: "+t);const s=this.getOrCreateFilterWrapper(n,"NO_UI");s?i.push(this.setModelOnFilterWrapper(s.filterPromise,e[t])):console.warn("AG-Grid: setFilterModel() - unable to fully apply model, unable to create filter for colId: "+t)})}else this.allColumnFilters.forEach(e=>{i.push(this.setModelOnFilterWrapper(e.filterPromise,null))});ds.all(i).then(()=>{const e=this.getFilterModel(),i=[];this.allColumnFilters.forEach((t,s)=>{const r=n?n[s]:null,o=e?e[s]:null;ls.jsonEquals(r,o)||i.push(t.column)}),i.length>0&&this.onFilterChanged({columns:i,source:t})})}setModelOnFilterWrapper(e,t){return new ds(i=>{e.then(e=>{"function"!=typeof e.setModel&&(console.warn("AG Grid: filter missing setModel method, which is needed for setFilterModel"),i()),(e.setModel(t)||ds.resolve()).then(()=>i())})})}getFilterModel(){const e={};return this.allColumnFilters.forEach((t,i)=>{const n=this.getModelFromFilterWrapper(t);y(n)&&(e[i]=n)}),e}getModelFromFilterWrapper(e){var t;const i=e.filterPromise.resolveNow(null,e=>e);return null==i?null!=(t=this.initialFilterModel[e.column.getColId()])?t:null:"function"!=typeof i.getModel?(console.warn("AG Grid: filter API missing getModel method, which is needed for getFilterModel"),null):i.getModel()}isColumnFilterPresent(){return this.activeColumnFilters.length>0}isAggregateFilterPresent(){return!!this.activeAggregateFilters.length}isExternalFilterPresent(){return this.externalFilterPresent}isChildFilterPresent(){return this.isColumnFilterPresent()||this.isQuickFilterPresent()||this.isExternalFilterPresent()||this.isAdvancedFilterPresent()}isAdvancedFilterPresent(){return this.isAdvancedFilterEnabled()&&this.advancedFilterService.isFilterPresent()}onAdvancedFilterEnabledChanged(e){var t;e?this.allColumnFilters.size&&(this.allColumnFilters.forEach(e=>this.disposeFilterWrapper(e,"advancedFilterEnabled")),this.onFilterChanged({source:"advancedFilter"})):(null==(t=this.advancedFilterService)?void 0:t.isFilterPresent())&&(this.advancedFilterService.setModel(null),this.onFilterChanged({source:"advancedFilter"}))}isAdvancedFilterEnabled(){var e;return!!(null==(e=this.advancedFilterService)?void 0:e.isEnabled())}isAdvancedFilterHeaderActive(){return this.isAdvancedFilterEnabled()&&this.advancedFilterService.isHeaderActive()}doAggregateFiltersPass(e,t){return this.doColumnFiltersPass(e,t,!0)}updateActiveFilters(){this.activeColumnFilters.length=0,this.activeAggregateFilters.length=0;const e=e=>!!e&&(e.isFilterActive?e.isFilterActive():(console.warn("AG Grid: Filter is missing isFilterActive() method"),!1)),t=!!this.gos.getGroupAggFiltering(),i=e=>{if(!e.isPrimary())return!0;const i=!this.columnModel.isPivotActive();return!(!e.isValueActive()||!i)&&(!!this.columnModel.isPivotMode()||t)};this.allColumnFilters.forEach(t=>{if(t.filterPromise.resolveNow(!1,e)){const e=t.filterPromise.resolveNow(null,e=>e);i(t.column)?this.activeAggregateFilters.push(e):this.activeColumnFilters.push(e)}})}updateFilterFlagInColumns(e,t){this.allColumnFilters.forEach(i=>{const n=i.filterPromise.resolveNow(!1,e=>e.isFilterActive());i.column.setFilterActive(n,e,t)})}isAnyFilterPresent(){return this.isQuickFilterPresent()||this.isColumnFilterPresent()||this.isAggregateFilterPresent()||this.isExternalFilterPresent()||this.isAdvancedFilterPresent()}doColumnFiltersPass(e,t,i){const{data:n,aggData:s}=e,r=i?this.activeAggregateFilters:this.activeColumnFilters,o=i?s:n;for(let i=0;i<r.length;i++){const n=r[i];if(null!=n&&n!==t){if("function"!=typeof n.doesFilterPass)throw new Error("Filter is missing method doesFilterPass");if(!n.doesFilterPass({node:e,data:o}))return!1}}return!0}resetQuickFilterCache(){this.quickFilterService.resetQuickFilterCache()}refreshFiltersForAggregations(){this.gos.getGroupAggFiltering()&&this.onFilterChanged()}callOnFilterChangedOutsideRenderCycle(e){const t=()=>this.onFilterChanged(e);this.rowRenderer.isRefreshInProgress()?setTimeout(t,0):t()}onFilterChanged(e={}){const{source:t,filterInstance:i,additionalEventAttributes:n,columns:s}=e;this.updateDependantFilters(),this.updateActiveFilters(),this.updateFilterFlagInColumns("filterChanged",n),this.externalFilterPresent=this.isExternalFilterPresentCallback(),this.allColumnFilters.forEach(e=>{e.filterPromise&&e.filterPromise.then(e=>{e&&e!==i&&e.onAnyFilterChanged&&e.onAnyFilterChanged()})});const r={source:t,type:lt.EVENT_FILTER_CHANGED,columns:s||[]};n&&O(r,n),this.processingFilterChange=!0,this.eventService.dispatchEvent(r),this.processingFilterChange=!1}isSuppressFlashingCellsBecauseFiltering(){var e;return!(null!=(e=this.gos.get("allowShowChangeAfterFilter"))&&e)&&this.processingFilterChange}isQuickFilterPresent(){return this.quickFilterService.isQuickFilterPresent()}updateAggFiltering(){this.aggFiltering=!!this.gos.getGroupAggFiltering()}isAggregateQuickFilterPresent(){return this.isQuickFilterPresent()&&this.shouldApplyQuickFilterAfterAgg()}isNonAggregateQuickFilterPresent(){return this.isQuickFilterPresent()&&!this.shouldApplyQuickFilterAfterAgg()}shouldApplyQuickFilterAfterAgg(){return(this.aggFiltering||this.columnModel.isPivotMode())&&!this.gos.get("applyQuickFilterBeforePivotOrAgg")}doesRowPassOtherFilters(e,t){return this.doesRowPassFilter({rowNode:t,filterInstanceToSkip:e})}doesRowPassAggregateFilters(e){return!(this.isAggregateQuickFilterPresent()&&!this.quickFilterService.doesRowPassQuickFilter(e.rowNode)||this.isAggregateFilterPresent()&&!this.doAggregateFiltersPass(e.rowNode,e.filterInstanceToSkip))}doesRowPassFilter(e){return!(this.isNonAggregateQuickFilterPresent()&&!this.quickFilterService.doesRowPassQuickFilter(e.rowNode)||this.isExternalFilterPresent()&&!this.doesExternalFilterPass(e.rowNode)||this.isColumnFilterPresent()&&!this.doColumnFiltersPass(e.rowNode,e.filterInstanceToSkip)||this.isAdvancedFilterPresent()&&!this.advancedFilterService.doesFilterPass(e.rowNode))}onNewRowsLoaded(e){this.allColumnFilters.forEach(e=>{e.filterPromise.then(e=>{e.onNewRowsLoaded&&e.onNewRowsLoaded()})}),this.updateFilterFlagInColumns(e,{afterDataChange:!0}),this.updateActiveFilters()}createValueGetter(e){return({node:t})=>this.valueService.getValue(e,t,!0)}createGetValue(e){return(t,i)=>{const n=i?this.columnModel.getGridColumn(i):e;return n?this.valueService.getValue(n,t,!0):void 0}}getFilterComponent(e,t,i=!0){var n;if(i)return(null==(n=this.getOrCreateFilterWrapper(e,t))?void 0:n.filterPromise)||null;const s=this.cachedFilter(e);return s?s.filterPromise:null}isFilterActive(e){const t=this.cachedFilter(e);return!!t&&t.filterPromise.resolveNow(!1,e=>e.isFilterActive())}getOrCreateFilterWrapper(e,t){if(!e.isFilterAllowed())return null;let i=this.cachedFilter(e);return i||(i=this.createFilterWrapper(e,t),this.setColumnFilterWrapper(e,i)),i}cachedFilter(e){return this.allColumnFilters.get(e.getColId())}getDefaultFilter(e){let t;if(se.__isRegistered("@ag-grid-enterprise/set-filter",this.context.getGridId()))t="agSetColumnFilter";else{const i=this.dataTypeService.getBaseDataType(e);t="number"===i?"agNumberColumnFilter":"date"===i||"dateString"===i?"agDateColumnFilter":"agTextColumnFilter"}return t}getDefaultFloatingFilter(e){let t;if(se.__isRegistered("@ag-grid-enterprise/set-filter",this.context.getGridId()))t="agSetColumnFloatingFilter";else{const i=this.dataTypeService.getBaseDataType(e);t="number"===i?"agNumberColumnFloatingFilter":"date"===i||"dateString"===i?"agDateColumnFloatingFilter":"agTextColumnFloatingFilter"}return t}createFilterInstance(e){const t=this.getDefaultFilter(e),i=e.getColDef();let n;const s=u(d({},this.createFilterParams(e,i)),{filterModifiedCallback:()=>this.filterModifiedCallbackFactory(n,e)(),filterChangedCallback:t=>this.filterChangedCallbackFactory(n,e)(t),doesRowPassOtherFilter:e=>this.doesRowPassOtherFilters(n,e)}),r=this.userComponentFactory.getFilterDetails(i,s,t);return r?{filterPromise:()=>{const e=r.newAgStackInstance();return e&&e.then(e=>n=e),e},compDetails:r}:{filterPromise:null,compDetails:null}}createFilterParams(e,t){return this.gos.addGridCommonParams({column:e,colDef:k(t),rowModel:this.rowModel,filterChangedCallback:()=>{},filterModifiedCallback:()=>{},valueGetter:this.createValueGetter(e),getValue:this.createGetValue(e),doesRowPassOtherFilter:()=>!0})}createFilterWrapper(e,t){var i;const n={column:e,filterPromise:null,compiledElement:null,compDetails:null},{filterPromise:s,compDetails:r}=this.createFilterInstance(e);return n.filterPromise=null!=(i=null==s?void 0:s())?i:null,n.compDetails=r,n}onColumnsChanged(){const e=[];this.allColumnFilters.forEach((t,i)=>{let n;n=t.column.isPrimary()?this.columnModel.getPrimaryColumn(i):this.columnModel.getGridColumn(i),n&&n===t.column||(e.push(t.column),this.disposeFilterWrapper(t,"columnChanged"),this.disposeColumnListener(i))}),e.length>0?this.onFilterChanged({columns:e,source:"api"}):this.updateDependantFilters()}updateDependantFilters(){const e=this.columnModel.getGroupAutoColumns();null==e||e.forEach(e=>{"agGroupColumnFilter"===e.getColDef().filter&&this.getOrCreateFilterWrapper(e,"NO_UI")})}isFilterAllowed(e){var t,i;if(this.isAdvancedFilterEnabled())return!1;if(!e.isFilterAllowed())return!1;const n=this.allColumnFilters.get(e.getColId());return null==(i=null==(t=null==n?void 0:n.filterPromise)?void 0:t.resolveNow(!0,e=>"function"!=typeof(null==e?void 0:e.isFilterAllowed)||(null==e?void 0:e.isFilterAllowed())))||i}getFloatingFilterCompDetails(e,t){const i=t=>{const i=this.getFilterComponent(e,"NO_UI");null!=i&&i.then(e=>{t(Ho(e))})},n=e.getColDef(),s=u(d({},this.createFilterParams(e,n)),{filterChangedCallback:()=>i(t=>this.filterChangedCallbackFactory(t,e)())}),r=this.userComponentFactory.mergeParamsWithApplicationProvidedParams(n,xo,s);let o=this.userComponentFactory.getDefaultFloatingFilterType(n,()=>this.getDefaultFloatingFilter(e));null==o&&(o="agReadOnlyFloatingFilter");const a={column:e,filterParams:r,currentParentModel:()=>this.getCurrentFloatingFilterParentModel(e),parentFilterInstance:i,showParentFilter:t,suppressFilterButton:!1};return this.userComponentFactory.getFloatingFilterCompDetails(n,a,o)}getCurrentFloatingFilterParentModel(e){const t=this.getFilterComponent(e,"NO_UI",!1);return t?t.resolveNow(null,e=>e&&e.getModel()):null}destroyFilter(e,t="api"){const i=e.getColId(),n=this.allColumnFilters.get(i);this.disposeColumnListener(i),delete this.initialFilterModel[i],n&&(this.disposeFilterWrapper(n,t),this.onFilterChanged({columns:[e],source:"api"}))}disposeColumnListener(e){const t=this.allColumnListeners.get(e);t&&(this.allColumnListeners.delete(e),t())}disposeFilterWrapper(e,t){e.filterPromise.then(i=>{this.getContext().destroyBean(i),e.column.setFilterActive(!1,"filterDestroyed"),this.allColumnFilters.delete(e.column.getColId());const n={type:lt.EVENT_FILTER_DESTROYED,source:t,column:e.column};this.eventService.dispatchEvent(n)})}filterModifiedCallbackFactory(e,t){return()=>{const i={type:lt.EVENT_FILTER_MODIFIED,column:t,filterInstance:e};this.eventService.dispatchEvent(i)}}filterChangedCallbackFactory(e,t){return i=>{var n;const s=null!=(n=null==i?void 0:i.source)?n:"api",r={filter:e,additionalEventAttributes:i,columns:[t],source:s};this.callOnFilterChangedOutsideRenderCycle(r)}}checkDestroyFilter(e){const t=this.allColumnFilters.get(e);if(!t)return;const i=t.column,{compDetails:n}=i.isFilterAllowed()?this.createFilterInstance(i):{compDetails:null};if(this.areFilterCompsDifferent(t.compDetails,n))return void this.destroyFilter(i,"paramsUpdated");const s=i.getColDef().filterParams;t.filterPromise?t.filterPromise.then(e=>{!1===(!(null==e?void 0:e.refresh)||e.refresh(d(u(d({},this.createFilterParams(i,i.getColDef())),{filterModifiedCallback:this.filterModifiedCallbackFactory(e,i),filterChangedCallback:this.filterChangedCallbackFactory(e,i),doesRowPassOtherFilter:t=>this.doesRowPassOtherFilters(e,t)}),s)))&&this.destroyFilter(i,"paramsUpdated")}):this.destroyFilter(i,"paramsUpdated")}setColumnFilterWrapper(e,t){const i=e.getColId();this.allColumnFilters.set(i,t),this.allColumnListeners.set(i,this.addManagedListener(e,Se.EVENT_COL_DEF_CHANGED,()=>this.checkDestroyFilter(i)))}areFilterCompsDifferent(e,t){if(!t||!e)return!0;const{componentClass:i}=e,{componentClass:n}=t;return!(i===n||(null==i?void 0:i.render)&&(null==n?void 0:n.render)&&i.render===n.render)}getAdvancedFilterModel(){return this.isAdvancedFilterEnabled()?this.advancedFilterService.getModel():null}setAdvancedFilterModel(e){this.isAdvancedFilterEnabled()&&(this.dataTypeService.isPendingInference()?this.advancedFilterModelUpdateQueue.push(e):(this.advancedFilterService.setModel(null!=e?e:null),this.onFilterChanged({source:"advancedFilter"})))}showAdvancedFilterBuilder(e){this.isAdvancedFilterEnabled()&&this.advancedFilterService.getCtrl().toggleFilterBuilder(e,!0)}updateAdvancedFilterColumns(){this.isAdvancedFilterEnabled()&&this.advancedFilterService.updateValidity()&&this.onFilterChanged({source:"advancedFilter"})}hasFloatingFilters(){return!this.isAdvancedFilterEnabled()&&this.columnModel.getAllGridColumns().some(e=>e.getColDef().floatingFilter)}getFilterInstance(e,t){if(this.isAdvancedFilterEnabled())return void this.warnAdvancedFilters();const i=this.getFilterInstanceImpl(e,e=>{if(!t)return;const i=Ho(e);t(i)});return Ho(i)}getColumnFilterInstance(e){return new Promise(t=>{this.getFilterInstance(e,e=>{t(e)})})}getFilterInstanceImpl(e,t){const i=this.columnModel.getPrimaryColumn(e);if(!i)return;const n=this.getFilterComponent(i,"NO_UI"),s=n&&n.resolveNow(null,e=>e);return s?setTimeout(t,0,s):n&&n.then(e=>{t(e)}),s}warnAdvancedFilters(){z("Column Filter API methods have been disabled as Advanced Filters are enabled.")}setupAdvancedFilterHeaderComp(e){var t;null==(t=this.advancedFilterService)||t.getCtrl().setupHeaderComp(e)}getHeaderRowCount(){return this.isAdvancedFilterHeaderActive()?1:0}getHeaderHeight(){return this.isAdvancedFilterHeaderActive()?this.advancedFilterService.getCtrl().getHeaderHeight():0}processFilterModelUpdateQueue(){this.filterModelUpdateQueue.forEach(({model:e,source:t})=>this.setFilterModel(e,t)),this.filterModelUpdateQueue=[],this.columnFilterModelUpdateQueue.forEach(({key:e,model:t,resolve:i})=>{this.setColumnFilterModel(e,t).then(()=>i())}),this.columnFilterModelUpdateQueue=[],this.advancedFilterModelUpdateQueue.forEach(e=>this.setAdvancedFilterModel(e)),this.advancedFilterModelUpdateQueue=[]}getColumnFilterModel(e){const t=this.getFilterWrapper(e);return t?this.getModelFromFilterWrapper(t):null}setColumnFilterModel(e,t){if(this.isAdvancedFilterEnabled())return this.warnAdvancedFilters(),Promise.resolve();if(this.dataTypeService.isPendingInference()){let i=()=>{};const n=new Promise(e=>{i=e});return this.columnFilterModelUpdateQueue.push({key:e,model:t,resolve:i}),n}const i=this.columnModel.getPrimaryColumn(e),n=i?this.getOrCreateFilterWrapper(i,"NO_UI"):null;return n?(s=this.setModelOnFilterWrapper(n.filterPromise,t),new Promise(e=>{s.then(t=>e(t))})):Promise.resolve();var s}getFilterWrapper(e){var t;const i=this.columnModel.getPrimaryColumn(e);return i&&null!=(t=this.cachedFilter(i))?t:null}destroy(){super.destroy(),this.allColumnFilters.forEach(e=>this.disposeFilterWrapper(e,"gridDestroyed")),this.allColumnListeners.clear()}};g([he("valueService")],Wo.prototype,"valueService",2),g([he("columnModel")],Wo.prototype,"columnModel",2),g([he("rowModel")],Wo.prototype,"rowModel",2),g([he("userComponentFactory")],Wo.prototype,"userComponentFactory",2),g([he("rowRenderer")],Wo.prototype,"rowRenderer",2),g([he("dataTypeService")],Wo.prototype,"dataTypeService",2),g([he("quickFilterService")],Wo.prototype,"quickFilterService",2),g([de("advancedFilterService")],Wo.prototype,"advancedFilterService",2),g([ae],Wo.prototype,"init",1),Wo=g([ce("filterManager")],Wo);var jo=class extends Cs{constructor(e,t){super('<div class="ag-filter"></div>'),this.column=e,this.source=t,this.filterWrapper=null}postConstruct(){this.createFilter(!0),this.addManagedListener(this.eventService,lt.EVENT_FILTER_DESTROYED,this.onFilterDestroyed.bind(this))}hasFilter(){return!!this.filterWrapper}getFilter(){var e,t;return null!=(t=null==(e=this.filterWrapper)?void 0:e.filterPromise)?t:null}afterInit(){var e,t,i;return null!=(i=null==(t=null==(e=this.filterWrapper)?void 0:e.filterPromise)?void 0:t.then(()=>{}))?i:ds.resolve()}afterGuiAttached(e){var t,i;null==(i=null==(t=this.filterWrapper)?void 0:t.filterPromise)||i.then(t=>{var i;null==(i=null==t?void 0:t.afterGuiAttached)||i.call(t,e)})}afterGuiDetached(){var e,t;null==(t=null==(e=this.filterWrapper)?void 0:e.filterPromise)||t.then(e=>{var t;null==(t=null==e?void 0:e.afterGuiDetached)||t.call(e)})}createFilter(e){var t;const{column:i,source:n}=this;this.filterWrapper=this.filterManager.getOrCreateFilterWrapper(i,n),(null==(t=this.filterWrapper)?void 0:t.filterPromise)&&this.filterWrapper.filterPromise.then(t=>{let s=t.getGui();if(y(s)||console.warn(`AG Grid: getGui method from filter returned ${s}, it should be a DOM element or an HTML template string.`),"string"==typeof s&&(s=xn(s)),this.appendChild(s),e){const e={type:lt.EVENT_FILTER_OPENED,column:i,source:n,eGui:this.getGui()};this.eventService.dispatchEvent(e)}})}onFilterDestroyed(e){"api"!==e.source&&"paramsUpdated"!==e.source||e.column.getId()!==this.column.getId()||!this.columnModel.getPrimaryColumn(this.column)||(Cn(this.getGui()),this.createFilter())}destroy(){this.filterWrapper=null,super.destroy()}};g([he("filterManager")],jo.prototype,"filterManager",2),g([he("columnModel")],jo.prototype,"columnModel",2),g([ae],jo.prototype,"postConstruct",1);var Ko=class extends Cs{constructor(e,t){super(e),this.ctrl=t}getCtrl(){return this.ctrl}},$o=class e extends Ko{constructor(t){super(e.TEMPLATE,t)}postConstruct(){const e=this.getGui(),t={addOrRemoveCssClass:(e,t)=>this.addOrRemoveCssClass(e,t),addOrRemoveBodyCssClass:(e,t)=>this.eFloatingFilterBody.classList.toggle(e,t),setButtonWrapperDisplayed:e=>on(this.eButtonWrapper,e),setCompDetails:e=>this.setCompDetails(e),getFloatingFilterComp:()=>this.compPromise,setWidth:t=>e.style.width=t,setMenuIcon:e=>this.eButtonShowMainFilter.appendChild(e)};this.ctrl.setComp(t,e,this.eButtonShowMainFilter,this.eFloatingFilterBody)}setCompDetails(e){if(!e)return this.destroyFloatingFilterComp(),void(this.compPromise=null);this.compPromise=e.newAgStackInstance(),this.compPromise.then(e=>this.afterCompCreated(e))}destroyFloatingFilterComp(){this.floatingFilterComp&&(this.eFloatingFilterBody.removeChild(this.floatingFilterComp.getGui()),this.floatingFilterComp=this.destroyBean(this.floatingFilterComp))}afterCompCreated(e){e&&(this.isAlive()?(this.destroyFloatingFilterComp(),this.floatingFilterComp=e,this.eFloatingFilterBody.appendChild(e.getGui()),e.afterGuiAttached&&e.afterGuiAttached()):this.destroyBean(e))}};$o.TEMPLATE='<div class="ag-header-cell ag-floating-filter" role="gridcell">\n            <div ref="eFloatingFilterBody" role="presentation"></div>\n            <div class="ag-floating-filter-button ag-hidden" ref="eButtonWrapper" role="presentation">\n                <button type="button" class="ag-button ag-floating-filter-button-button" ref="eButtonShowMainFilter" tabindex="-1"></button>\n            </div>\n        </div>',g([Ss("eFloatingFilterBody")],$o.prototype,"eFloatingFilterBody",2),g([Ss("eButtonWrapper")],$o.prototype,"eButtonWrapper",2),g([Ss("eButtonShowMainFilter")],$o.prototype,"eButtonShowMainFilter",2),g([ae],$o.prototype,"postConstruct",1),g([le],$o.prototype,"destroyFloatingFilterComp",1);var Yo=$o,qo=(e=>(e.AUTO_HEIGHT="ag-layout-auto-height",e.NORMAL="ag-layout-normal",e.PRINT="ag-layout-print",e))(qo||{}),Xo=class extends nt{constructor(e){super(),this.view=e}postConstruct(){this.addManagedPropertyListener("domLayout",this.updateLayoutClasses.bind(this)),this.updateLayoutClasses()}updateLayoutClasses(){const e=this.getDomLayout(),t={autoHeight:"autoHeight"===e,normal:"normal"===e,print:"print"===e},i=t.autoHeight?"ag-layout-auto-height":t.print?"ag-layout-print":"ag-layout-normal";this.view.updateLayoutClasses(i,t)}getDomLayout(){var e;const t=null!=(e=this.gos.get("domLayout"))?e:"normal";return-1===["normal","print","autoHeight"].indexOf(t)?(z(`${t} is not valid for DOM Layout, valid values are 'normal', 'autoHeight', 'print'.`),"normal"):t}};g([ae],Xo.prototype,"postConstruct",1);var Zo=class extends nt{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=Z(()=>this.lastScrollSource[1]=null,500),this.resetLastVScrollDebounced=Z(()=>this.lastScrollSource[0]=null,500)}postConstruct(){this.enableRtl=this.gos.get("enableRtl"),this.addManagedListener(this.eventService,lt.EVENT_DISPLAYED_COLUMNS_WIDTH_CHANGED,this.onDisplayedColumnsWidthChanged.bind(this)),this.ctrlsService.whenReady(e=>{this.centerRowsCtrl=e.center,this.onDisplayedColumnsWidthChanged(),this.addScrollListener()})}addScrollListener(){const{fakeHScrollComp:e,fakeVScrollComp:t}=this.ctrlsService.getParams();this.addManagedListener(this.centerRowsCtrl.getViewportElement(),"scroll",this.onHScroll.bind(this)),e.onScrollCallback(this.onFakeHScroll.bind(this));const i=this.gos.get("debounceVerticalScrollbar"),n=i?Z(this.onVScroll.bind(this),100):this.onVScroll.bind(this),s=i?Z(this.onFakeVScroll.bind(this),100):this.onFakeVScroll.bind(this);this.addManagedListener(this.eBodyViewport,"scroll",n),t.onScrollCallback(s)}onDisplayedColumnsWidthChanged(){this.enableRtl&&this.horizontallyScrollHeaderCenterAndFloatingCenter()}horizontallyScrollHeaderCenterAndFloatingCenter(e){if(null==this.centerRowsCtrl)return;void 0===e&&(e=this.centerRowsCtrl.getCenterViewportScrollLeft());const t=this.enableRtl?e:-e,{topCenter:i,stickyTopCenter:n,stickyBottomCenter:s,centerHeader:r,bottomCenter:o,fakeHScrollComp:a}=this.ctrlsService.getParams();r.setHorizontalScroll(-t),o.setContainerTranslateX(t),i.setContainerTranslateX(t),n.setContainerTranslateX(t),s.setContainerTranslateX(t);const l=this.centerRowsCtrl.getViewportElement(),c=0===this.lastScrollSource[1];e=Math.abs(e),c?a.setScrollPosition(e):yn(l,e,this.enableRtl)}isControllingScroll(e,t){return null==this.lastScrollSource[t]?(this.lastScrollSource[t]=e,!0):this.lastScrollSource[t]===e}onFakeHScroll(){this.isControllingScroll(1,1)&&this.onHScrollCommon(1)}onHScroll(){this.isControllingScroll(0,1)&&this.onHScrollCommon(0)}onHScrollCommon(e){const t=this.centerRowsCtrl.getViewportElement(),{scrollLeft:i}=t;if(this.shouldBlockScrollUpdate(1,i,!0))return;let n;n=0===e?vn(t,this.enableRtl):this.ctrlsService.get("fakeHScrollComp").getScrollPosition(),this.doHorizontalScroll(Math.round(n)),this.resetLastHScrollDebounced()}onFakeVScroll(){this.isControllingScroll(1,0)&&this.onVScrollCommon(1)}onVScroll(){this.isControllingScroll(0,0)&&this.onVScrollCommon(0)}onVScrollCommon(e){let t;t=0===e?this.eBodyViewport.scrollTop:this.ctrlsService.get("fakeVScrollComp").getScrollPosition(),this.shouldBlockScrollUpdate(0,t,!0)||(this.animationFrameService.setScrollTop(t),this.nextScrollTop=t,0===e?this.ctrlsService.get("fakeVScrollComp").setScrollPosition(t):this.eBodyViewport.scrollTop=t,this.gos.get("suppressAnimationFrame")?this.scrollGridIfNeeded():this.animationFrameService.schedule(),this.resetLastVScrollDebounced())}doHorizontalScroll(e){const t=this.ctrlsService.get("fakeHScrollComp").getScrollPosition();this.scrollLeft===e&&e===t||(this.scrollLeft=e,this.fireScrollEvent(1),this.horizontallyScrollHeaderCenterAndFloatingCenter(e),this.centerRowsCtrl.onHorizontalViewportChanged(!0))}fireScrollEvent(e){const t={type:lt.EVENT_BODY_SCROLL,direction:1===e?"horizontal":"vertical",left:this.scrollLeft,top:this.scrollTop};this.eventService.dispatchEvent(t),window.clearTimeout(this.scrollTimer),this.scrollTimer=void 0,this.scrollTimer=window.setTimeout(()=>{const e=u(d({},t),{type:lt.EVENT_BODY_SCROLL_END});this.eventService.dispatchEvent(e)},100)}shouldBlockScrollUpdate(e,t,i=!1){return!(i&&!Li())&&(0===e?this.shouldBlockVerticalScroll(t):this.shouldBlockHorizontalScroll(t))}shouldBlockVerticalScroll(e){const t=dn(this.eBodyViewport),{scrollHeight:i}=this.eBodyViewport;return e<0||e+t>i}shouldBlockHorizontalScroll(e){const t=this.centerRowsCtrl.getCenterWidth(),{scrollWidth:i}=this.centerRowsCtrl.getViewportElement();if(this.enableRtl&&mn()){if(e>0)return!0}else if(e<0)return!0;return Math.abs(e)+t>i}redrawRowsAfterScroll(){this.fireScrollEvent(0)}checkScrollLeft(){this.scrollLeft!==this.centerRowsCtrl.getCenterViewportScrollLeft()&&this.onHScrollCommon(0)}scrollGridIfNeeded(){const e=this.scrollTop!=this.nextScrollTop;return e&&(this.scrollTop=this.nextScrollTop,this.redrawRowsAfterScroll()),e}setHorizontalScrollPosition(e,t=!1){const i=this.centerRowsCtrl.getViewportElement().scrollWidth-this.centerRowsCtrl.getCenterWidth();!t&&this.shouldBlockScrollUpdate(1,e)&&(e=this.enableRtl&&mn()?e>0?0:i:Math.min(Math.max(e,0),i)),yn(this.centerRowsCtrl.getViewportElement(),Math.abs(e),this.enableRtl),this.doHorizontalScroll(e)}setVerticalScrollPosition(e){this.eBodyViewport.scrollTop=e}getVScrollPosition(){return this.lastScrollTop=this.eBodyViewport.scrollTop,this.lastOffsetHeight=this.eBodyViewport.offsetHeight,{top:this.lastScrollTop,bottom:this.lastScrollTop+this.lastOffsetHeight}}getApproximateVScollPosition(){return this.lastScrollTop>=0&&this.lastOffsetHeight>=0?{top:this.scrollTop,bottom:this.scrollTop+this.lastOffsetHeight}:this.getVScrollPosition()}getHScrollPosition(){return this.centerRowsCtrl.getHScrollPosition()}isHorizontalScrollShowing(){return this.centerRowsCtrl.isHorizontalScrollShowing()}scrollHorizontally(e){const t=this.centerRowsCtrl.getViewportElement().scrollLeft;return this.setHorizontalScrollPosition(t+e),this.centerRowsCtrl.getViewportElement().scrollLeft-t}scrollToTop(){this.eBodyViewport.scrollTop=0}ensureNodeVisible(e,t=null){const i=this.rowModel.getRowCount();let n=-1;for(let t=0;t<i;t++){const i=this.rowModel.getRow(t);if("function"==typeof e){if(i&&e(i)){n=t;break}}else if(e===i||e===i.data){n=t;break}}n>=0&&this.ensureIndexVisible(n,t)}ensureIndexVisible(e,t){if(this.gos.isDomLayout("print"))return;const i=this.paginationProxy.getRowCount();if("number"!=typeof e||e<0||e>=i)return void console.warn("AG Grid: Invalid row index for ensureIndexVisible: "+e);const n=this.gos.get("pagination")&&!this.gos.get("suppressPaginationPanel");this.getFrameworkOverrides().wrapIncoming(()=>{n||this.paginationProxy.goToPageWithIndex(e);const i=this.ctrlsService.getGridBodyCtrl(),s=i.getStickyTopHeight(),r=i.getStickyBottomHeight(),o=this.paginationProxy.getRow(e);let a;do{const e=o.rowTop,i=o.rowHeight,n=this.paginationProxy.getPixelOffset(),l=o.rowTop-n,c=l+o.rowHeight,h=this.getVScrollPosition(),d=this.heightScaler.getDivStretchOffset(),u=h.top+d,p=h.bottom+d,g=p-u,f=this.heightScaler.getScrollPositionForPixel(l),m=this.heightScaler.getScrollPositionForPixel(c-g),v=Math.min((f+m)/2,l);let y=null;"top"===t?y=f:"bottom"===t?y=m:"middle"===t?y=v:u+s>l?y=f-s:p-r<c&&(y=m+r),null!==y&&(this.setVerticalScrollPosition(y),this.rowRenderer.redraw({afterScroll:!0})),a=e!==o.rowTop||i!==o.rowHeight}while(a);this.animationFrameService.flushAllFrames()})}ensureColumnVisible(e,t="auto"){const i=this.columnModel.getGridColumn(e);if(!i)return;if(i.isPinned())return;if(!this.columnModel.isColumnDisplayed(i))return;const n=this.getPositionedHorizontalScroll(i,t);this.getFrameworkOverrides().wrapIncoming(()=>{null!==n&&this.centerRowsCtrl.setCenterViewportScrollLeft(n),this.centerRowsCtrl.onHorizontalViewportChanged(),this.animationFrameService.flushAllFrames()})}setScrollPosition(e,t){this.getFrameworkOverrides().wrapIncoming(()=>{this.centerRowsCtrl.setCenterViewportScrollLeft(t),this.setVerticalScrollPosition(e),this.rowRenderer.redraw({afterScroll:!0}),this.animationFrameService.flushAllFrames()})}getPositionedHorizontalScroll(e,t){const{columnBeforeStart:i,columnAfterEnd:n}=this.isColumnOutsideViewport(e),s=this.centerRowsCtrl.getCenterWidth()<e.getActualWidth(),r=this.centerRowsCtrl.getCenterWidth(),o=this.enableRtl;let a=(o?i:n)||s,l=o?n:i;"auto"!==t&&(a="start"===t,l="end"===t);const c="middle"===t;if(a||l||c){const{colLeft:t,colMiddle:i,colRight:n}=this.getColumnBounds(e);return c?i-r/2:a?o?n:t:o?t-r:n-r}return null}isColumnOutsideViewport(e){const{start:t,end:i}=this.getViewportBounds(),{colLeft:n,colRight:s}=this.getColumnBounds(e),r=this.enableRtl;return{columnBeforeStart:r?t>s:i<s,columnAfterEnd:r?i<n:t>n}}getColumnBounds(e){const t=this.enableRtl,i=this.columnModel.getBodyContainerWidth(),n=e.getActualWidth(),s=e.getLeft(),r=t?-1:1,o=t?i-s:s;return{colLeft:o,colMiddle:o+n/2*r,colRight:o+n*r}}getViewportBounds(){const e=this.centerRowsCtrl.getCenterWidth(),t=this.centerRowsCtrl.getCenterViewportScrollLeft();return{start:t,end:e+t,width:e}}};g([he("ctrlsService")],Zo.prototype,"ctrlsService",2),g([he("animationFrameService")],Zo.prototype,"animationFrameService",2),g([he("paginationProxy")],Zo.prototype,"paginationProxy",2),g([he("rowModel")],Zo.prototype,"rowModel",2),g([he("rowContainerHeightService")],Zo.prototype,"heightScaler",2),g([he("rowRenderer")],Zo.prototype,"rowRenderer",2),g([he("columnModel")],Zo.prototype,"columnModel",2),g([ae],Zo.prototype,"postConstruct",1);var Qo=(e=>(e.ANIMATION_ON="ag-row-animation",e.ANIMATION_OFF="ag-row-no-animation",e))(Qo||{}),Jo="ag-force-vertical-scroll",ea=class extends nt{constructor(){super(...arguments),this.stickyTopHeight=0,this.stickyBottomHeight=0}getScrollFeature(){return this.bodyScrollFeature}getBodyViewportElement(){return this.eBodyViewport}setComp(e,t,i,n,s,r,o){this.comp=e,this.eGridBody=t,this.eBodyViewport=i,this.eTop=n,this.eBottom=s,this.eStickyTop=r,this.eStickyBottom=o,this.setCellTextSelection(this.gos.get("enableCellTextSelection")),this.addManagedPropertyListener("enableCellTextSelection",e=>this.setCellTextSelection(e.currentValue)),this.createManagedBean(new Xo(this.comp)),this.bodyScrollFeature=this.createManagedBean(new Zo(this.eBodyViewport)),this.addRowDragListener(),this.setupRowAnimationCssClass(),this.addEventListeners(),this.addFocusListeners([n,i,s,r,o]),this.onGridColumnsChanged(),this.addBodyViewportListener(),this.setFloatingHeights(),this.disableBrowserDragging(),this.addStopEditingWhenGridLosesFocus(),this.filterManager.setupAdvancedFilterHeaderComp(n),this.ctrlsService.register("gridBodyCtrl",this)}getComp(){return this.comp}addEventListeners(){this.addManagedListener(this.eventService,lt.EVENT_GRID_COLUMNS_CHANGED,this.onGridColumnsChanged.bind(this)),this.addManagedListener(this.eventService,lt.EVENT_SCROLL_VISIBILITY_CHANGED,this.onScrollVisibilityChanged.bind(this)),this.addManagedListener(this.eventService,lt.EVENT_PINNED_ROW_DATA_CHANGED,this.onPinnedRowDataChanged.bind(this)),this.addManagedListener(this.eventService,lt.EVENT_HEADER_HEIGHT_CHANGED,this.onHeaderHeightChanged.bind(this))}addFocusListeners(e){e.forEach(e=>{this.addManagedListener(e,"focusin",t=>{const{target:i}=t,n=cn(i,"ag-root",e);e.classList.toggle("ag-has-focus",!n)}),this.addManagedListener(e,"focusout",t=>{const{target:i,relatedTarget:n}=t,s=e.contains(n),r=cn(n,"ag-root",e);cn(i,"ag-root",e)||s&&!r||e.classList.remove("ag-has-focus")})})}setColumnMovingCss(e){this.comp.setColumnMovingCss("ag-column-moving",e)}setCellTextSelection(e=!1){this.comp.setCellSelectableCss("ag-selectable",e)}onScrollVisibilityChanged(){const e=this.scrollVisibleService.isVerticalScrollShowing();this.setVerticalScrollPaddingVisible(e),this.setStickyWidth(e),this.setStickyBottomOffsetBottom();const t=`calc(100% + ${(e&&this.gos.getScrollbarWidth()||0)+(Vi()?16:0)}px)`;this.animationFrameService.requestAnimationFrame(()=>this.comp.setBodyViewportWidth(t))}onGridColumnsChanged(){const e=this.columnModel.getAllGridColumns();this.comp.setColumnCount(e.length)}disableBrowserDragging(){this.addManagedListener(this.eGridBody,"dragstart",e=>{if(e.target instanceof HTMLImageElement)return e.preventDefault(),!1})}addStopEditingWhenGridLosesFocus(){if(!this.gos.get("stopEditingWhenCellsLoseFocus"))return;const e=e=>{const i=e.relatedTarget;if(null===Pi(i))return void this.rowRenderer.stopEditing();let n=t.some(e=>e.contains(i))&&this.mouseEventService.isElementInThisGrid(i);if(!n){const e=this.popupService;n=e.getActivePopups().some(e=>e.contains(i))||e.isElementWithinCustomPopup(i)}n||this.rowRenderer.stopEditing()},t=[this.eBodyViewport,this.eBottom,this.eTop,this.eStickyTop,this.eStickyBottom];t.forEach(t=>this.addManagedListener(t,"focusout",e))}updateRowCount(){const e=this.headerNavigationService.getHeaderRowCount()+this.filterManager.getHeaderRowCount(),t=this.rowModel.isLastRowIndexKnown()?this.rowModel.getRowCount():-1,i=-1===t?-1:e+t;this.comp.setRowCount(i)}registerBodyViewportResizeListener(e){this.comp.registerBodyViewportResizeListener(e)}setVerticalScrollPaddingVisible(e){const t=e?"scroll":"hidden";this.comp.setPinnedTopBottomOverflowY(t)}isVerticalScrollShowing(){const e=this.gos.get("alwaysShowVerticalScroll"),t=e?Jo:null,i=this.gos.isDomLayout("normal");return this.comp.setAlwaysVerticalScrollClass(t,e),e||i&&In(this.eBodyViewport)}setupRowAnimationCssClass(){const e=()=>{const e=this.gos.isAnimateRows()&&!this.rowContainerHeightService.isStretching(),t=e?"ag-row-animation":"ag-row-no-animation";this.comp.setRowAnimationCssOnBodyViewport(t,e)};e(),this.addManagedListener(this.eventService,lt.EVENT_HEIGHT_SCALE_CHANGED,e),this.addManagedPropertyListener("animateRows",e)}getGridBodyElement(){return this.eGridBody}addBodyViewportListener(){const e=this.onBodyViewportContextMenu.bind(this);this.addManagedListener(this.eBodyViewport,"contextmenu",e),this.mockContextMenuForIPad(e),this.addManagedListener(this.eBodyViewport,"wheel",this.onBodyViewportWheel.bind(this)),this.addManagedListener(this.eStickyTop,"wheel",this.onStickyWheel.bind(this)),this.addManagedListener(this.eStickyBottom,"wheel",this.onStickyWheel.bind(this)),this.addFullWidthContainerWheelListener()}addFullWidthContainerWheelListener(){const e=this.eBodyViewport.querySelector(".ag-full-width-container"),t=this.eBodyViewport.querySelector(".ag-center-cols-viewport");e&&t&&this.addManagedListener(e,"wheel",e=>this.onFullWidthContainerWheel(e,t))}onFullWidthContainerWheel(e,t){!e.deltaX||Math.abs(e.deltaY)>Math.abs(e.deltaX)||!this.mouseEventService.isEventFromThisGrid(e)||(e.preventDefault(),t.scrollBy({left:e.deltaX}))}onBodyViewportContextMenu(e,t,i){if(!e&&!i)return;this.gos.get("preventDefaultOnContextMenu")&&(e||i).preventDefault();const{target:n}=e||t;n!==this.eBodyViewport&&n!==this.ctrlsService.get("center").getViewportElement()||this.menuService.showContextMenu({mouseEvent:e,touchEvent:i,value:null,anchorToElement:this.eGridBody})}mockContextMenuForIPad(e){if(!Li())return;const t=new mr(this.eBodyViewport);this.addManagedListener(t,mr.EVENT_LONG_TAP,t=>{e(void 0,t.touchStart,t.touchEvent)}),this.addDestroyFunc(()=>t.destroy())}onBodyViewportWheel(e){this.gos.get("suppressScrollWhenPopupsAreOpen")&&this.popupService.hasAnchoredPopup()&&e.preventDefault()}onStickyWheel(e){e.preventDefault(),e.offsetY&&this.scrollVertically(e.deltaY)}getGui(){return this.eGridBody}scrollVertically(e){const t=this.eBodyViewport.scrollTop;return this.bodyScrollFeature.setVerticalScrollPosition(t+e),this.eBodyViewport.scrollTop-t}addRowDragListener(){this.rowDragFeature=this.createManagedBean(new Fo(this.eBodyViewport)),this.dragAndDropService.addDropTarget(this.rowDragFeature)}getRowDragFeature(){return this.rowDragFeature}onPinnedRowDataChanged(){this.setFloatingHeights()}setFloatingHeights(){const{pinnedRowModel:e}=this;let t=e.getPinnedTopTotalHeight(),i=e.getPinnedBottomTotalHeight();this.comp.setTopHeight(t),this.comp.setBottomHeight(i),this.comp.setTopDisplay(t?"inherit":"none"),this.comp.setBottomDisplay(i?"inherit":"none"),this.setStickyTopOffsetTop(),this.setStickyBottomOffsetBottom()}setStickyTopHeight(e=0){this.comp.setStickyTopHeight(`${e}px`),this.stickyTopHeight=e}getStickyTopHeight(){return this.stickyTopHeight}setStickyBottomHeight(e=0){this.comp.setStickyBottomHeight(`${e}px`),this.stickyBottomHeight=e}getStickyBottomHeight(){return this.stickyBottomHeight}setStickyWidth(e){if(e){const e=this.gos.getScrollbarWidth();this.comp.setStickyTopWidth(`calc(100% - ${e}px)`),this.comp.setStickyBottomWidth(`calc(100% - ${e}px)`)}else this.comp.setStickyTopWidth("100%"),this.comp.setStickyBottomWidth("100%")}onHeaderHeightChanged(){this.setStickyTopOffsetTop()}setStickyTopOffsetTop(){const e=this.ctrlsService.get("gridHeaderCtrl").getHeaderHeight()+this.filterManager.getHeaderHeight(),t=this.pinnedRowModel.getPinnedTopTotalHeight();let i=0;e>0&&(i+=e),t>0&&(i+=t),i>0&&(i+=1),this.comp.setStickyTopTop(`${i}px`)}setStickyBottomOffsetBottom(){const e=this.pinnedRowModel.getPinnedBottomTotalHeight()+(this.scrollVisibleService.isHorizontalScrollShowing()&&this.gos.getScrollbarWidth()||0);this.comp.setStickyBottomBottom(`${e}px`)}sizeColumnsToFit(e,t){const i=this.isVerticalScrollShowing()?this.gos.getScrollbarWidth():0,n=un(this.eGridBody)-i;n>0?this.columnModel.sizeColumnsToFit(n,"sizeColumnsToFit",!1,e):void 0===t?window.setTimeout(()=>{this.sizeColumnsToFit(e,100)},0):100===t?window.setTimeout(()=>{this.sizeColumnsToFit(e,500)},100):500===t?window.setTimeout(()=>{this.sizeColumnsToFit(e,-1)},500):console.warn("AG Grid: tried to call sizeColumnsToFit() but the grid is coming back with zero width, maybe the grid is not visible yet on the screen?")}addScrollEventListener(e){this.eBodyViewport.addEventListener("scroll",e,{passive:!0})}removeScrollEventListener(e){this.eBodyViewport.removeEventListener("scroll",e)}};g([he("animationFrameService")],ea.prototype,"animationFrameService",2),g([he("rowContainerHeightService")],ea.prototype,"rowContainerHeightService",2),g([he("ctrlsService")],ea.prototype,"ctrlsService",2),g([he("columnModel")],ea.prototype,"columnModel",2),g([he("scrollVisibleService")],ea.prototype,"scrollVisibleService",2),g([he("menuService")],ea.prototype,"menuService",2),g([he("headerNavigationService")],ea.prototype,"headerNavigationService",2),g([he("dragAndDropService")],ea.prototype,"dragAndDropService",2),g([he("pinnedRowModel")],ea.prototype,"pinnedRowModel",2),g([he("rowRenderer")],ea.prototype,"rowRenderer",2),g([he("popupService")],ea.prototype,"popupService",2),g([he("mouseEventService")],ea.prototype,"mouseEventService",2),g([he("rowModel")],ea.prototype,"rowModel",2),g([he("filterManager")],ea.prototype,"filterManager",2);var ta=(e=>(e[e.FILL=0]="FILL",e[e.RANGE=1]="RANGE",e))(ta||{}),ia=(e=>(e[e.VALUE=0]="VALUE",e[e.DIMENSION=1]="DIMENSION",e))(ia||{}),na="ag-cell-range-selected",sa=class{constructor(e,t){this.beans=e,this.rangeService=e.rangeService,this.selectionHandleFactory=e.selectionHandleFactory,this.cellCtrl=t}setComp(e,t){this.cellComp=e,this.eGui=t,this.onRangeSelectionChanged()}onRangeSelectionChanged(){this.cellComp&&(this.rangeCount=this.rangeService.getCellRangeCount(this.cellCtrl.getCellPosition()),this.hasChartRange=this.getHasChartRange(),this.cellComp.addOrRemoveCssClass(na,0!==this.rangeCount),this.cellComp.addOrRemoveCssClass(`${na}-1`,1===this.rangeCount),this.cellComp.addOrRemoveCssClass(`${na}-2`,2===this.rangeCount),this.cellComp.addOrRemoveCssClass(`${na}-3`,3===this.rangeCount),this.cellComp.addOrRemoveCssClass(`${na}-4`,this.rangeCount>=4),this.cellComp.addOrRemoveCssClass("ag-cell-range-chart",this.hasChartRange),pi(this.eGui,this.rangeCount>0||void 0),this.cellComp.addOrRemoveCssClass("ag-cell-range-single-cell",this.isSingleCell()),this.updateRangeBorders(),this.refreshHandle())}updateRangeBorders(){const e=this.getRangeBorders(),t=this.isSingleCell(),i=!t&&e.top,n=!t&&e.right,s=!t&&e.bottom,r=!t&&e.left;this.cellComp.addOrRemoveCssClass("ag-cell-range-top",i),this.cellComp.addOrRemoveCssClass("ag-cell-range-right",n),this.cellComp.addOrRemoveCssClass("ag-cell-range-bottom",s),this.cellComp.addOrRemoveCssClass("ag-cell-range-left",r)}isSingleCell(){const{rangeService:e}=this.beans;return 1===this.rangeCount&&!!e&&!e.isMoreThanOneCell()}getHasChartRange(){const{rangeService:e}=this.beans;if(!this.rangeCount||!e)return!1;const t=e.getCellRanges();return t.length>0&&t.every(e=>Be([1,0],e.type))}updateRangeBordersIfRangeCount(){this.rangeCount>0&&(this.updateRangeBorders(),this.refreshHandle())}getRangeBorders(){const e=this.beans.gos.get("enableRtl");let t=!1,i=!1,n=!1,s=!1;const r=this.cellCtrl.getCellPosition().column,o=this.beans.columnModel;let a,l;e?(a=o.getDisplayedColAfter(r),l=o.getDisplayedColBefore(r)):(a=o.getDisplayedColBefore(r),l=o.getDisplayedColAfter(r));const c=this.rangeService.getCellRanges().filter(e=>this.rangeService.isCellInSpecificRange(this.cellCtrl.getCellPosition(),e));a||(s=!0),l||(i=!0);for(let e=0;e<c.length&&!(t&&i&&n&&s);e++){const r=c[e],o=this.rangeService.getRangeStartRow(r),h=this.rangeService.getRangeEndRow(r);!t&&this.beans.rowPositionUtils.sameRow(o,this.cellCtrl.getCellPosition())&&(t=!0),!n&&this.beans.rowPositionUtils.sameRow(h,this.cellCtrl.getCellPosition())&&(n=!0),!s&&a&&r.columns.indexOf(a)<0&&(s=!0),!i&&l&&r.columns.indexOf(l)<0&&(i=!0)}return{top:t,right:i,bottom:n,left:s}}refreshHandle(){if(this.beans.context.isDestroyed())return;const e=this.shouldHaveSelectionHandle();this.selectionHandle&&!e&&(this.selectionHandle=this.beans.context.destroyBean(this.selectionHandle)),e&&this.addSelectionHandle(),this.cellComp.addOrRemoveCssClass("ag-cell-range-handle",!!this.selectionHandle)}shouldHaveSelectionHandle(){const e=this.beans.gos,t=this.rangeService.getCellRanges(),i=t.length;if(this.rangeCount<1||i<1)return!1;const n=De(t),s=this.cellCtrl.getCellPosition(),r=e.get("enableFillHandle")&&!this.cellCtrl.isSuppressFillHandle(),o=e.get("enableRangeHandle");let a=1===i&&!this.cellCtrl.isEditing()&&(r||o);if(this.hasChartRange){const e=1===t[0].type&&this.rangeService.isCellInSpecificRange(s,t[0]);this.cellComp.addOrRemoveCssClass("ag-cell-range-chart-category",e),a=0===n.type}return a&&null!=n.endRow&&this.rangeService.isContiguousRange(n)&&this.rangeService.isBottomRightCell(n,s)}addSelectionHandle(){const e=this.beans.gos,t=De(this.rangeService.getCellRanges()).type,i=e.get("enableFillHandle")&&C(t)?0:1;this.selectionHandle&&this.selectionHandle.getType()!==i&&(this.selectionHandle=this.beans.context.destroyBean(this.selectionHandle)),this.selectionHandle||(this.selectionHandle=this.selectionHandleFactory.createSelectionHandle(i)),this.selectionHandle.refresh(this.cellCtrl)}destroy(){this.beans.context.destroyBean(this.selectionHandle)}},ra=class extends nt{constructor(e,t){super(),this.cellCtrl=e,this.beans=t,this.column=e.getColumn(),this.rowNode=e.getRowNode()}setupRowSpan(){this.rowSpan=this.column.getRowSpan(this.rowNode),this.addManagedListener(this.beans.eventService,lt.EVENT_NEW_COLUMNS_LOADED,()=>this.onNewColumnsLoaded())}setComp(e){this.eGui=e,this.setupColSpan(),this.setupRowSpan(),this.onLeftChanged(),this.onWidthChanged(),this.applyRowSpan()}onNewColumnsLoaded(){const e=this.column.getRowSpan(this.rowNode);this.rowSpan!==e&&(this.rowSpan=e,this.applyRowSpan(!0))}onDisplayColumnsChanged(){const e=this.getColSpanningList();Ie(this.colsSpanning,e)||(this.colsSpanning=e,this.onWidthChanged(),this.onLeftChanged())}setupColSpan(){null!=this.column.getColDef().colSpan&&(this.colsSpanning=this.getColSpanningList(),this.addManagedListener(this.beans.eventService,lt.EVENT_DISPLAYED_COLUMNS_CHANGED,this.onDisplayColumnsChanged.bind(this)),this.addManagedListener(this.beans.eventService,lt.EVENT_DISPLAYED_COLUMNS_WIDTH_CHANGED,this.onWidthChanged.bind(this)))}onWidthChanged(){if(!this.eGui)return;const e=this.getCellWidth();this.eGui.style.width=`${e}px`}getCellWidth(){return this.colsSpanning?this.colsSpanning.reduce((e,t)=>e+t.getActualWidth(),0):this.column.getActualWidth()}getColSpanningList(){const e=this.column.getColSpan(this.rowNode),t=[];if(1===e)t.push(this.column);else{let i=this.column;const n=this.column.getPinned();for(let s=0;i&&s<e&&(t.push(i),i=this.beans.columnModel.getDisplayedColAfter(i),i&&!C(i))&&n===i.getPinned();s++);}return t}onLeftChanged(){if(!this.eGui)return;const e=this.modifyLeftForPrintLayout(this.getCellLeft());this.eGui.style.left=e+"px"}getCellLeft(){let e;return e=this.beans.gos.get("enableRtl")&&this.colsSpanning?De(this.colsSpanning):this.column,e.getLeft()}modifyLeftForPrintLayout(e){if(!this.cellCtrl.isPrintLayout()||"left"===this.column.getPinned())return e;const t=this.beans.columnModel.getDisplayedColumnsLeftWidth();return"right"===this.column.getPinned()?t+this.beans.columnModel.getBodyContainerWidth()+(e||0):t+(e||0)}applyRowSpan(e){if(1===this.rowSpan&&!e)return;const t=this.beans.gos.getRowHeightAsNumber()*this.rowSpan;this.eGui.style.height=`${t}px`,this.eGui.style.zIndex="1"}destroy(){super.destroy()}},oa=class extends nt{constructor(e,t){super(),this.staticClasses=[],this.cellCtrl=e,this.beans=t,this.column=e.getColumn(),this.rowNode=e.getRowNode()}setComp(e){this.cellComp=e,this.applyUserStyles(),this.applyCellClassRules(),this.applyClassesFromColDef()}applyCellClassRules(){const e=this.column.getColDef(),{cellClassRules:t}=e,i=this.beans.gos.addGridCommonParams({value:this.cellCtrl.getValue(),data:this.rowNode.data,node:this.rowNode,colDef:e,column:this.column,rowIndex:this.rowNode.rowIndex});this.beans.stylingService.processClassRules(t===this.cellClassRules?void 0:this.cellClassRules,t,i,e=>this.cellComp.addOrRemoveCssClass(e,!0),e=>this.cellComp.addOrRemoveCssClass(e,!1)),this.cellClassRules=t}applyUserStyles(){const e=this.column.getColDef();if(!e.cellStyle)return;let t;if("function"==typeof e.cellStyle){const i=this.beans.gos.addGridCommonParams({column:this.column,value:this.cellCtrl.getValue(),colDef:e,data:this.rowNode.data,node:this.rowNode,rowIndex:this.rowNode.rowIndex});t=(0,e.cellStyle)(i)}else t=e.cellStyle;t&&this.cellComp.setUserStyles(t)}applyClassesFromColDef(){const e=this.column.getColDef(),t=this.beans.gos.addGridCommonParams({value:this.cellCtrl.getValue(),data:this.rowNode.data,node:this.rowNode,column:this.column,colDef:e,rowIndex:this.rowNode.rowIndex});this.staticClasses.length&&this.staticClasses.forEach(e=>this.cellComp.addOrRemoveCssClass(e,!1)),this.staticClasses=this.beans.stylingService.getStaticCellClasses(e,t),this.staticClasses.length&&this.staticClasses.forEach(e=>this.cellComp.addOrRemoveCssClass(e,!0))}destroy(){super.destroy()}},aa=class{postConstruct(){this.gos.isRowModelType("clientSide")&&(this.clientSideRowModel=this.rowModel),this.gos.isRowModelType("serverSide")&&(this.serverSideRowModel=this.rowModel)}};g([he("resizeObserverService")],aa.prototype,"resizeObserverService",2),g([he("paginationProxy")],aa.prototype,"paginationProxy",2),g([he("context")],aa.prototype,"context",2),g([he("gridOptionsService")],aa.prototype,"gos",2),g([he("environment")],aa.prototype,"environment",2),g([he("rowRenderer")],aa.prototype,"rowRenderer",2),g([he("valueService")],aa.prototype,"valueService",2),g([he("eventService")],aa.prototype,"eventService",2),g([he("columnModel")],aa.prototype,"columnModel",2),g([he("headerNavigationService")],aa.prototype,"headerNavigationService",2),g([he("navigationService")],aa.prototype,"navigationService",2),g([he("columnAnimationService")],aa.prototype,"columnAnimationService",2),g([he("focusService")],aa.prototype,"focusService",2),g([he("popupService")],aa.prototype,"popupService",2),g([he("stylingService")],aa.prototype,"stylingService",2),g([he("columnHoverService")],aa.prototype,"columnHoverService",2),g([he("userComponentFactory")],aa.prototype,"userComponentFactory",2),g([he("userComponentRegistry")],aa.prototype,"userComponentRegistry",2),g([he("animationFrameService")],aa.prototype,"animationFrameService",2),g([he("dragService")],aa.prototype,"dragService",2),g([he("dragAndDropService")],aa.prototype,"dragAndDropService",2),g([he("sortController")],aa.prototype,"sortController",2),g([he("filterManager")],aa.prototype,"filterManager",2),g([he("rowContainerHeightService")],aa.prototype,"rowContainerHeightService",2),g([he("frameworkOverrides")],aa.prototype,"frameworkOverrides",2),g([he("cellPositionUtils")],aa.prototype,"cellPositionUtils",2),g([he("rowPositionUtils")],aa.prototype,"rowPositionUtils",2),g([he("selectionService")],aa.prototype,"selectionService",2),g([he("rowCssClassCalculator")],aa.prototype,"rowCssClassCalculator",2),g([he("rowModel")],aa.prototype,"rowModel",2),g([he("ctrlsService")],aa.prototype,"ctrlsService",2),g([he("ctrlsFactory")],aa.prototype,"ctrlsFactory",2),g([he("agStackComponentsRegistry")],aa.prototype,"agStackComponentsRegistry",2),g([he("valueCache")],aa.prototype,"valueCache",2),g([he("rowNodeEventThrottle")],aa.prototype,"rowNodeEventThrottle",2),g([he("localeService")],aa.prototype,"localeService",2),g([he("syncService")],aa.prototype,"syncService",2),g([he("ariaAnnouncementService")],aa.prototype,"ariaAnnouncementService",2),g([de("rangeService")],aa.prototype,"rangeService",2),g([de("selectionHandleFactory")],aa.prototype,"selectionHandleFactory",2),g([ae],aa.prototype,"postConstruct",1),aa=g([ce("beans")],aa);var la=class extends aa{constructor(e,t,i){super(),this.cellCtrl=e,this.beans=t,this.column=i}onMouseEvent(e,t){if(!qe(t))switch(e){case"click":this.onCellClicked(t);break;case"mousedown":case"touchstart":this.onMouseDown(t);break;case"dblclick":this.onCellDoubleClicked(t);break;case"mouseout":this.onMouseOut(t);break;case"mouseover":this.onMouseOver(t)}}onCellClicked(e){if(this.isDoubleClickOnIPad())return this.onCellDoubleClicked(e),void e.preventDefault();const{eventService:t,rangeService:i,gos:n}=this.beans,s=e.ctrlKey||e.metaKey;i&&s&&i.getCellRangeCount(this.cellCtrl.getCellPosition())>1&&i.intersectLastRange(!0);const r=this.cellCtrl.createEvent(e,lt.EVENT_CELL_CLICKED);t.dispatchEvent(r);const o=this.column.getColDef();o.onCellClicked&&window.setTimeout(()=>{this.beans.frameworkOverrides.wrapOutgoing(()=>{o.onCellClicked(r)})},0),!n.get("singleClickEdit")&&!o.singleClickEdit||n.get("suppressClickEdit")||e.shiftKey&&0!=(null==i?void 0:i.getCellRanges().length)||this.cellCtrl.startRowOrCellEdit()}isDoubleClickOnIPad(){if(!Li()||Xe("dblclick"))return!1;const e=(new Date).getTime(),t=e-this.lastIPadMouseClickEvent<200;return this.lastIPadMouseClickEvent=e,t}onCellDoubleClicked(e){const t=this.column.getColDef(),i=this.cellCtrl.createEvent(e,lt.EVENT_CELL_DOUBLE_CLICKED);this.beans.eventService.dispatchEvent(i),"function"==typeof t.onCellDoubleClicked&&window.setTimeout(()=>{this.beans.frameworkOverrides.wrapOutgoing(()=>{t.onCellDoubleClicked(i)})},0),!this.beans.gos.get("singleClickEdit")&&!this.beans.gos.get("suppressClickEdit")&&this.cellCtrl.startRowOrCellEdit(null,e)}onMouseDown(e){const{ctrlKey:t,metaKey:i,shiftKey:n}=e,s=e.target,{cellCtrl:r,beans:o}=this,{eventService:a,rangeService:l,focusService:c}=o;if(this.isRightClickInExistingRange(e))return;const h=l&&0!=l.getCellRanges().length;if(!n||!h){const e=Ai()&&!r.isEditing()&&!rn(s);r.focusCell(e)}if(n&&h&&!c.isCellFocused(r.getCellPosition())){e.preventDefault();const t=c.getFocusedCell();if(t){const{column:e,rowIndex:i,rowPinned:n}=t,s=o.rowRenderer.getRowByPosition({rowIndex:i,rowPinned:n}),r=null==s?void 0:s.getCellCtrl(e);(null==r?void 0:r.isEditing())&&r.stopEditing(),c.setFocusedCell({column:e,rowIndex:i,rowPinned:n,forceBrowserFocus:!0,preventScrollOnBrowserFocus:!0})}}if(!this.containsWidget(s)){if(l){const e=this.cellCtrl.getCellPosition();if(n)l.extendLatestRangeToCell(e);else{const n=t||i;l.setRangeToCell(e,n)}}a.dispatchEvent(this.cellCtrl.createEvent(e,lt.EVENT_CELL_MOUSE_DOWN))}}isRightClickInExistingRange(e){const{rangeService:t}=this.beans;if(t){const i=t.isCellInAnyRange(this.cellCtrl.getCellPosition()),n=2===e.button||e.ctrlKey&&this.beans.gos.get("allowContextMenuWithControlKey");if(i&&n)return!0}return!1}containsWidget(e){return cn(e,"ag-selection-checkbox",3)}onMouseOut(e){if(this.mouseStayingInsideCell(e))return;const t=this.cellCtrl.createEvent(e,lt.EVENT_CELL_MOUSE_OUT);this.beans.eventService.dispatchEvent(t),this.beans.columnHoverService.clearMouseOver()}onMouseOver(e){if(this.mouseStayingInsideCell(e))return;const t=this.cellCtrl.createEvent(e,lt.EVENT_CELL_MOUSE_OVER);this.beans.eventService.dispatchEvent(t),this.beans.columnHoverService.setMouseOver([this.column])}mouseStayingInsideCell(e){if(!e.target||!e.relatedTarget)return!1;const t=this.cellCtrl.getGui(),i=t.contains(e.target),n=t.contains(e.relatedTarget);return i&&n}destroy(){}},ca=class extends nt{constructor(e,t,i,n,s){super(),this.cellCtrl=e,this.beans=t,this.rowNode=n,this.rowCtrl=s}setComp(e){this.eGui=e}onKeyDown(e){const t=e.key;switch(t){case Xn.ENTER:this.onEnterKeyDown(e);break;case Xn.F2:this.onF2KeyDown(e);break;case Xn.ESCAPE:this.onEscapeKeyDown(e);break;case Xn.TAB:this.onTabKeyDown(e);break;case Xn.BACKSPACE:case Xn.DELETE:this.onBackspaceOrDeleteKeyDown(t,e);break;case Xn.DOWN:case Xn.UP:case Xn.RIGHT:case Xn.LEFT:this.onNavigationKeyDown(e,t)}}onNavigationKeyDown(e,t){this.cellCtrl.isEditing()||(e.shiftKey&&this.cellCtrl.isRangeSelectionEnabled()?this.onShiftRangeSelect(e):this.beans.navigationService.navigateToNextCell(e,t,this.cellCtrl.getCellPosition(),!0),e.preventDefault())}onShiftRangeSelect(e){if(!this.beans.rangeService)return;const t=this.beans.rangeService.extendLatestRangeInDirection(e);t&&this.beans.navigationService.ensureCellVisible(t)}onTabKeyDown(e){this.beans.navigationService.onTabKeyDown(this.cellCtrl,e)}onBackspaceOrDeleteKeyDown(e,t){var i;const{cellCtrl:n,beans:s,rowNode:r}=this,{gos:o,rangeService:a,eventService:l}=s;if(!n.isEditing()){if(l.dispatchEvent({type:lt.EVENT_KEY_SHORTCUT_CHANGED_CELL_START}),ts(e,o.get("enableCellEditingOnBackspace"))){if(a&&o.get("enableRangeSelection"))a.clearCellRangeCellValues({dispatchWrapperEvents:!0,wrapperEventSource:"deleteKey"});else if(n.isCellEditable()){const e=n.getColumn(),t=null!=(i=this.beans.valueService.parseValue(e,r,"",r.getValueFromValueService(e)))?i:null;r.setDataValue(e,t,"cellClear")}}else n.startRowOrCellEdit(e,t);l.dispatchEvent({type:lt.EVENT_KEY_SHORTCUT_CHANGED_CELL_END})}}onEnterKeyDown(e){if(this.cellCtrl.isEditing()||this.rowCtrl.isEditing())this.cellCtrl.stopEditingAndFocus(!1,e.shiftKey);else if(this.beans.gos.get("enterNavigatesVertically")){const t=e.shiftKey?Xn.UP:Xn.DOWN;this.beans.navigationService.navigateToNextCell(null,t,this.cellCtrl.getCellPosition(),!1)}else this.cellCtrl.startRowOrCellEdit(Xn.ENTER,e),this.cellCtrl.isEditing()&&e.preventDefault()}onF2KeyDown(e){this.cellCtrl.isEditing()||this.cellCtrl.startRowOrCellEdit(Xn.F2,e)}onEscapeKeyDown(e){this.cellCtrl.isEditing()&&(this.cellCtrl.stopRowOrCellEdit(!0),this.cellCtrl.focusCell(!0))}processCharacter(e){if(e.target!==this.eGui||this.cellCtrl.isEditing())return;const t=e.key;" "===t?this.onSpaceKeyDown(e):(this.cellCtrl.startRowOrCellEdit(t,e),e.preventDefault())}onSpaceKeyDown(e){const{gos:t}=this.beans;if(!this.cellCtrl.isEditing()&&t.isRowSelection()){const i=this.rowNode.isSelected(),n=!i;if(n||!t.get("suppressRowDeselection")){const t=this.beans.gos.get("groupSelectsFiltered"),s=this.rowNode.setSelectedParams({newValue:n,rangeSelect:e.shiftKey,groupSelectsFiltered:t,event:e,source:"spaceKey"});void 0===i&&0===s&&this.rowNode.setSelectedParams({newValue:!1,rangeSelect:e.shiftKey,groupSelectsFiltered:t,event:e,source:"spaceKey"})}}e.preventDefault()}destroy(){super.destroy()}},ha=class extends Cs{constructor(e,t,i){super('<div class="ag-drag-handle ag-row-drag" draggable="true"></div>'),this.rowNode=e,this.column=t,this.eCell=i}postConstruct(){this.getGui().appendChild(Yn("rowDrag",this.gos,null)),this.addGuiEventListener("mousedown",e=>{e.stopPropagation()}),this.addDragSource(),this.checkVisibility()}addDragSource(){this.addGuiEventListener("dragstart",this.onDragStart.bind(this))}onDragStart(e){const t=this.column.getColDef().dndSourceOnRowDrag;e.dataTransfer.setDragImage(this.eCell,0,0);t?t(this.gos.addGridCommonParams({rowNode:this.rowNode,dragEvent:e})):(()=>{try{const t=JSON.stringify(this.rowNode.data);e.dataTransfer.setData("application/json",t),e.dataTransfer.setData("text/plain",t)}catch(e){}})()}checkVisibility(){const e=this.column.isDndSource(this.rowNode);this.setDisplayed(e)}};g([ae],ha.prototype,"postConstruct",1);var da=class{static getHeaderClassesFromColDef(e,t,i,n){return C(e)?[]:this.getColumnClassesFromCollDef(e.headerClass,e,t,i,n)}static getToolPanelClassesFromColDef(e,t,i,n){return C(e)?[]:this.getColumnClassesFromCollDef(e.toolPanelClass,e,t,i,n)}static refreshFirstAndLastStyles(e,t,i){e.addOrRemoveCssClass("ag-column-first",i.isColumnAtEdge(t,"first")),e.addOrRemoveCssClass("ag-column-last",i.isColumnAtEdge(t,"last"))}static getClassParams(e,t,i,n){return t.addGridCommonParams({colDef:e,column:i,columnGroup:n})}static getColumnClassesFromCollDef(e,t,i,n,s){if(C(e))return[];let r;return r="function"==typeof e?e(this.getClassParams(t,i,n,s)):e,"string"==typeof r?[r]:Array.isArray(r)?[...r]:[]}},ua=0,pa=class e extends nt{constructor(e,t,i,n){super(),this.cellRangeFeature=null,this.cellPositionFeature=null,this.cellCustomStyleFeature=null,this.tooltipFeature=null,this.cellMouseListenerFeature=null,this.cellKeyboardListenerFeature=null,this.suppressRefreshCell=!1,this.onCellCompAttachedFuncs=[],this.column=e,this.rowNode=t,this.beans=i,this.rowCtrl=n,this.instanceId=e.getId()+"-"+ua++,this.colIdSanitised=yt(this.column.getId()),i.gos.get("suppressCellFocus")||(this.tabIndex=-1),this.createCellPosition(),this.addFeatures(),this.updateAndFormatValue(!1)}shouldRestoreFocus(){return this.beans.focusService.shouldRestoreFocus(this.cellPosition)}addFeatures(){this.cellPositionFeature=new ra(this,this.beans),this.addDestroyFunc(()=>{var e;null==(e=this.cellPositionFeature)||e.destroy(),this.cellPositionFeature=null}),this.cellCustomStyleFeature=new oa(this,this.beans),this.addDestroyFunc(()=>{var e;null==(e=this.cellCustomStyleFeature)||e.destroy(),this.cellCustomStyleFeature=null}),this.cellMouseListenerFeature=new la(this,this.beans,this.column),this.addDestroyFunc(()=>{var e;null==(e=this.cellMouseListenerFeature)||e.destroy(),this.cellMouseListenerFeature=null}),this.cellKeyboardListenerFeature=new ca(this,this.beans,this.column,this.rowNode,this.rowCtrl),this.addDestroyFunc(()=>{var e;null==(e=this.cellKeyboardListenerFeature)||e.destroy(),this.cellKeyboardListenerFeature=null}),this.column.isTooltipEnabled()&&(this.enableTooltipFeature(),this.addDestroyFunc(()=>{this.disableTooltipFeature()})),this.beans.rangeService&&this.beans.gos.get("enableRangeSelection")&&(this.cellRangeFeature=new sa(this.beans,this),this.addDestroyFunc(()=>{var e;null==(e=this.cellRangeFeature)||e.destroy(),this.cellRangeFeature=null}))}enableTooltipFeature(e,t){const i="whenTruncated"===this.beans.gos.get("tooltipShowMode");t||!i||this.isCellRenderer()||(t=()=>{const e=this.getGui(),t=0===e.children.length?e:e.querySelector(".ag-cell-value");return!t||t.scrollWidth>t.clientWidth});const n={getColumn:()=>this.column,getColDef:()=>this.column.getColDef(),getRowIndex:()=>this.cellPosition.rowIndex,getRowNode:()=>this.rowNode,getGui:()=>this.getGui(),getLocation:()=>"cell",getTooltipValue:null!=e?()=>e:()=>{const e=this.column.getColDef(),t=this.rowNode.data;if(e.tooltipField&&y(t))return _(t,e.tooltipField,this.column.isTooltipFieldContainsDots());const i=e.tooltipValueGetter;return i?i(this.beans.gos.addGridCommonParams({location:"cell",colDef:this.column.getColDef(),column:this.column,rowIndex:this.cellPosition.rowIndex,node:this.rowNode,data:this.rowNode.data,value:this.value,valueFormatted:this.valueFormatted})):null},getValueFormatted:()=>this.valueFormatted,shouldDisplayTooltip:t};this.tooltipFeature=new ms(n,this.beans)}disableTooltipFeature(){this.tooltipFeature&&(this.tooltipFeature.destroy(),this.tooltipFeature=null)}setComp(e,t,i,n,s){var r,o,a,l;this.cellComp=e,this.eGui=t,this.printLayout=n,this.addDomData(),this.onCellFocused(this.focusEventToRestore),this.applyStaticCssClasses(),this.setWrapText(),this.onFirstRightPinnedChanged(),this.onLastLeftPinnedChanged(),this.onColumnHover(),this.setupControlComps(),this.setupAutoHeight(i),this.refreshFirstAndLastStyles(),this.refreshAriaColIndex(),null==(r=this.cellPositionFeature)||r.setComp(t),null==(o=this.cellCustomStyleFeature)||o.setComp(e),null==(a=this.tooltipFeature)||a.refreshToolTip(),null==(l=this.cellKeyboardListenerFeature)||l.setComp(this.eGui),this.cellRangeFeature&&this.cellRangeFeature.setComp(e,t),s&&this.isCellEditable()?this.startEditing():this.showValue(),this.onCellCompAttachedFuncs.length&&(this.onCellCompAttachedFuncs.forEach(e=>e()),this.onCellCompAttachedFuncs=[])}setupAutoHeight(e){if(this.isAutoHeight=this.column.isAutoHeight(),!this.isAutoHeight||!e)return;const t=e.parentElement,i=this.beans.gos.getRowHeightForNode(this.rowNode).height,n=s=>{if(this.editing)return;if(!this.isAlive())return;const{paddingTop:r,paddingBottom:o,borderBottomWidth:a,borderTopWidth:l}=hn(t),c=r+o+a+l,h=e.offsetHeight+c;if(s<5){const t=this.beans.gos.getDocument();if(!t||!t.contains(e)||0==h)return void window.setTimeout(()=>n(s+1),0)}const d=Math.max(h,i);this.rowNode.setRowAutoHeight(d,this.column)},s=()=>n(0);s();const r=this.beans.resizeObserverService.observeResize(e,s);this.addDestroyFunc(()=>{r(),this.rowNode.setRowAutoHeight(void 0,this.column)})}getCellAriaRole(){var e;return null!=(e=this.column.getColDef().cellAriaRole)?e:"gridcell"}getInstanceId(){return this.instanceId}getColumnIdSanitised(){return this.colIdSanitised}getTabIndex(){return this.tabIndex}isCellRenderer(){const e=this.column.getColDef();return null!=e.cellRenderer||null!=e.cellRendererSelector}getValueToDisplay(){var e;return null!=(e=this.valueFormatted)?e:this.value}showValue(e=!1){var t;const i=this.getValueToDisplay();let n;if(this.rowNode.stub){const e=this.createCellRendererParams();n=this.beans.userComponentFactory.getLoadingCellRendererDetails(this.column.getColDef(),e)}else if(this.isCellRenderer()){const e=this.createCellRendererParams();n=this.beans.userComponentFactory.getCellRendererDetails(this.column.getColDef(),e)}this.cellComp.setRenderDetails(n,i,e),null==(t=this.cellRangeFeature)||t.refreshHandle()}setupControlComps(){const e=this.column.getColDef();this.includeSelection=this.isIncludeControl(e.checkboxSelection),this.includeRowDrag=this.isIncludeControl(e.rowDrag),this.includeDndSource=this.isIncludeControl(e.dndSource),this.cellComp.setIncludeSelection(this.includeSelection),this.cellComp.setIncludeDndSource(this.includeDndSource),this.cellComp.setIncludeRowDrag(this.includeRowDrag)}isForceWrapper(){return this.beans.gos.get("enableCellTextSelection")||this.column.isAutoHeight()}isIncludeControl(e){return!(null!=this.rowNode.rowPinned||"function"!=typeof e&&!0!==e)}refreshShouldDestroy(){const e=this.column.getColDef(),t=this.includeSelection!=this.isIncludeControl(e.checkboxSelection),i=this.includeRowDrag!=this.isIncludeControl(e.rowDrag),n=this.includeDndSource!=this.isIncludeControl(e.dndSource),s=this.isAutoHeight!=this.column.isAutoHeight();return t||i||n||s}startEditing(e=null,t=!1,i=null){if(!this.isCellEditable()||this.editing)return;if(!this.cellComp)return void this.onCellCompAttachedFuncs.push(()=>{this.startEditing(e,t,i)});const n=this.createCellEditorParams(e,t),s=this.column.getColDef(),r=this.beans.userComponentFactory.getCellEditorDetails(s,n);this.editCompDetails=r;const o=null!=(null==r?void 0:r.popupFromSelector)?r.popupFromSelector:!!s.cellEditorPopup,a=null!=(null==r?void 0:r.popupPositionFromSelector)?r.popupPositionFromSelector:s.cellEditorPopupPosition;this.setEditing(!0),this.cellComp.setEditDetails(r,o,a,this.beans.gos.get("reactiveCustomComponents"));const l=this.createEvent(i,lt.EVENT_CELL_EDITING_STARTED);this.beans.eventService.dispatchEvent(l)}setEditing(e){var t;this.editing!==e&&(this.editing=e,null==(t=this.cellRangeFeature)||t.refreshHandle())}stopRowOrCellEdit(e=!1){"fullRow"===this.beans.gos.get("editType")?this.rowCtrl.stopEditing(e):this.stopEditing(e)}onPopupEditorClosed(){this.isEditing()&&this.stopEditingAndFocus()}takeValueFromCellEditor(e){const t={newValueExists:!1};if(e)return t;const i=this.cellComp.getCellEditor();return i?i.isCancelAfterEnd&&i.isCancelAfterEnd()?t:{newValue:i.getValue(),newValueExists:!0}:t}saveNewValue(e,t){if(t===e)return!1;this.suppressRefreshCell=!0;const i=this.rowNode.setDataValue(this.column,t,"edit");return this.suppressRefreshCell=!1,i}stopEditing(e=!1){if(!this.editing)return!1;const{newValue:t,newValueExists:i}=this.takeValueFromCellEditor(e),n=this.rowNode.getValueFromValueService(this.column);let s=!1;return i&&(s=this.saveNewValue(n,t)),this.setEditing(!1),this.cellComp.setEditDetails(),this.editCompDetails=void 0,this.updateAndFormatValue(!1),this.refreshCell({forceRefresh:!0,suppressFlash:!0}),this.dispatchEditingStoppedEvent(n,t,!e&&!!s),s}dispatchEditingStoppedEvent(e,t,i){const n=u(d({},this.createEvent(null,lt.EVENT_CELL_EDITING_STOPPED)),{oldValue:e,newValue:t,valueChanged:i});this.beans.eventService.dispatchEvent(n)}createCellEditorParams(e,t){return this.beans.gos.addGridCommonParams({value:this.rowNode.getValueFromValueService(this.column),eventKey:e,column:this.column,colDef:this.column.getColDef(),rowIndex:this.getCellPosition().rowIndex,node:this.rowNode,data:this.rowNode.data,cellStartedEdit:t,onKeyDown:this.onKeyDown.bind(this),stopEditing:this.stopEditingAndFocus.bind(this),eGridCell:this.getGui(),parseValue:this.parseValue.bind(this),formatValue:this.formatValue.bind(this)})}createCellRendererParams(){return this.beans.gos.addGridCommonParams({value:this.value,valueFormatted:this.valueFormatted,getValue:()=>this.rowNode.getValueFromValueService(this.column),setValue:e=>this.beans.valueService.setValue(this.rowNode,this.column,e),formatValue:this.formatValue.bind(this),data:this.rowNode.data,node:this.rowNode,pinned:this.column.getPinned(),colDef:this.column.getColDef(),column:this.column,rowIndex:this.getCellPosition().rowIndex,refreshCell:this.refreshCell.bind(this),eGridCell:this.getGui(),eParentOfValue:this.cellComp.getParentOfValue(),registerRowDragger:(e,t,i,n)=>this.registerRowDragger(e,t,n),setTooltip:(e,t)=>{var i;this.tooltipFeature&&this.disableTooltipFeature(),this.enableTooltipFeature(e,t),null==(i=this.tooltipFeature)||i.refreshToolTip()}})}parseValue(e){return this.beans.valueService.parseValue(this.column,this.rowNode,e,this.getValue())}setFocusOutOnEditor(){if(!this.editing)return;const e=this.cellComp.getCellEditor();e&&e.focusOut&&e.focusOut()}setFocusInOnEditor(){if(!this.editing)return;const e=this.cellComp.getCellEditor();e&&e.focusIn?e.focusIn():this.focusCell(!0)}onCellChanged(e){e.column===this.column&&this.refreshCell({})}refreshOrDestroyCell(e){var t;this.refreshShouldDestroy()?null==(t=this.rowCtrl)||t.recreateCell(this):this.refreshCell(e)}refreshCell(e){var t,i,n,s;if(this.suppressRefreshCell||this.editing)return;const r=this.column.getColDef(),o=null!=e&&!!e.newData,a=null!=e&&!!e.suppressFlash||!!r.suppressCellFlash,l=null==r.field&&null==r.valueGetter&&null==r.showRowGroup,c=e&&e.forceRefresh||l||o,h=!!this.cellComp,d=this.updateAndFormatValue(h);if(h){if(c||d){this.showValue(o);const e=this.beans.filterManager.isSuppressFlashingCellsBecauseFiltering();!a&&!e&&(this.beans.gos.get("enableCellChangeFlash")||r.enableCellChangeFlash)&&this.flashCell(),null==(t=this.cellCustomStyleFeature)||t.applyUserStyles(),null==(i=this.cellCustomStyleFeature)||i.applyClassesFromColDef()}null==(n=this.tooltipFeature)||n.refreshToolTip(),null==(s=this.cellCustomStyleFeature)||s.applyCellClassRules()}}stopEditingAndFocus(e=!1,t=!1){this.stopRowOrCellEdit(),this.focusCell(!0),e||this.navigateAfterEdit(t)}navigateAfterEdit(e){if(this.beans.gos.get("enterNavigatesVerticallyAfterEdit")){const t=e?Xn.UP:Xn.DOWN;this.beans.navigationService.navigateToNextCell(null,t,this.getCellPosition(),!1)}}flashCell(e){var t,i;const n=null!=(t=null==e?void 0:e.flashDuration)?t:null==e?void 0:e.flashDelay,s=null!=(i=null==e?void 0:e.fadeDuration)?i:null==e?void 0:e.fadeDelay;this.animateCell("data-changed",n,s)}animateCell(e,t,i){if(!this.cellComp)return;const n=`ag-cell-${e}`,s=`ag-cell-${e}-animation`,{gos:r}=this.beans;t||(t=r.get("cellFlashDuration")),y(i)||(i=r.get("cellFadeDuration")),this.cellComp.addOrRemoveCssClass(n,!0),this.cellComp.addOrRemoveCssClass(s,!1),this.beans.frameworkOverrides.wrapIncoming(()=>{window.setTimeout(()=>{this.isAlive()&&(this.cellComp.addOrRemoveCssClass(n,!1),this.cellComp.addOrRemoveCssClass(s,!0),this.eGui.style.transition=`background-color ${i}ms`,window.setTimeout(()=>{this.isAlive()&&(this.cellComp.addOrRemoveCssClass(s,!1),this.eGui.style.transition="")},i))},t)})}onFlashCells(e){if(!this.cellComp)return;const t=this.beans.cellPositionUtils.createId(this.getCellPosition());e.cells[t]&&this.animateCell("highlight")}isCellEditable(){return this.column.isCellEditable(this.rowNode)}isSuppressFillHandle(){return this.column.isSuppressFillHandle()}formatValue(e){var t;return null!=(t=this.callValueFormatter(e))?t:e}callValueFormatter(e){return this.beans.valueService.formatValue(this.column,this.rowNode,e)}updateAndFormatValue(e){const t=this.value,i=this.valueFormatted;return this.value=this.rowNode.getValueFromValueService(this.column),this.valueFormatted=this.callValueFormatter(this.value),!e||!this.valuesAreEqual(t,this.value)||this.valueFormatted!=i}valuesAreEqual(e,t){const i=this.column.getColDef();return i.equals?i.equals(e,t):e===t}getComp(){return this.cellComp}getValue(){return this.value}addDomData(){const t=this.getGui();this.beans.gos.setDomData(t,e.DOM_DATA_KEY_CELL_CTRL,this),this.addDestroyFunc(()=>this.beans.gos.setDomData(t,e.DOM_DATA_KEY_CELL_CTRL,null))}createEvent(e,t){return this.beans.gos.addGridCommonParams({type:t,node:this.rowNode,data:this.rowNode.data,value:this.value,column:this.column,colDef:this.column.getColDef(),rowPinned:this.rowNode.rowPinned,event:e,rowIndex:this.rowNode.rowIndex})}processCharacter(e){var t;null==(t=this.cellKeyboardListenerFeature)||t.processCharacter(e)}onKeyDown(e){var t;null==(t=this.cellKeyboardListenerFeature)||t.onKeyDown(e)}onMouseEvent(e,t){var i;null==(i=this.cellMouseListenerFeature)||i.onMouseEvent(e,t)}getGui(){return this.eGui}getColSpanningList(){return this.cellPositionFeature.getColSpanningList()}onLeftChanged(){var e;this.cellComp&&(null==(e=this.cellPositionFeature)||e.onLeftChanged())}onDisplayedColumnsChanged(){this.eGui&&(this.refreshAriaColIndex(),this.refreshFirstAndLastStyles())}refreshFirstAndLastStyles(){const{cellComp:e,column:t,beans:i}=this;da.refreshFirstAndLastStyles(e,t,i.columnModel)}refreshAriaColIndex(){const e=this.beans.columnModel.getAriaColumnIndex(this.column);ci(this.getGui(),e)}isSuppressNavigable(){return this.column.isSuppressNavigable(this.rowNode)}onWidthChanged(){var e;return null==(e=this.cellPositionFeature)?void 0:e.onWidthChanged()}getColumn(){return this.column}getRowNode(){return this.rowNode}isPrintLayout(){return this.printLayout}getCellPosition(){return this.cellPosition}isEditing(){return this.editing}startRowOrCellEdit(e,t=null){this.cellComp?"fullRow"===this.beans.gos.get("editType")?this.rowCtrl.startRowEditing(e,this):this.startEditing(e,!0,t):this.onCellCompAttachedFuncs.push(()=>{this.startRowOrCellEdit(e,t)})}getRowCtrl(){return this.rowCtrl}getRowPosition(){return{rowIndex:this.cellPosition.rowIndex,rowPinned:this.cellPosition.rowPinned}}updateRangeBordersIfRangeCount(){this.cellComp&&this.cellRangeFeature&&this.cellRangeFeature.updateRangeBordersIfRangeCount()}onRangeSelectionChanged(){this.cellComp&&this.cellRangeFeature&&this.cellRangeFeature.onRangeSelectionChanged()}isRangeSelectionEnabled(){return null!=this.cellRangeFeature}focusCell(e=!1){this.beans.focusService.setFocusedCell({rowIndex:this.getCellPosition().rowIndex,column:this.column,rowPinned:this.rowNode.rowPinned,forceBrowserFocus:e})}onRowIndexChanged(){this.createCellPosition(),this.onCellFocused(),this.cellRangeFeature&&this.cellRangeFeature.onRangeSelectionChanged()}onFirstRightPinnedChanged(){if(!this.cellComp)return;const e=this.column.isFirstRightPinned();this.cellComp.addOrRemoveCssClass("ag-cell-first-right-pinned",e)}onLastLeftPinnedChanged(){if(!this.cellComp)return;const e=this.column.isLastLeftPinned();this.cellComp.addOrRemoveCssClass("ag-cell-last-left-pinned",e)}onCellFocused(e){if(this.beans.gos.get("suppressCellFocus"))return;const t=this.beans.focusService.isCellFocused(this.cellPosition);if(!this.cellComp)return void(t&&(null==e?void 0:e.forceBrowserFocus)&&(this.focusEventToRestore=e));this.focusEventToRestore=void 0,this.cellComp.addOrRemoveCssClass("ag-cell-focus",t),t&&e&&e.forceBrowserFocus&&this.cellComp.getFocusableElement().focus({preventScroll:!!e.preventScrollOnBrowserFocus});const i="fullRow"===this.beans.gos.get("editType");t||i||!this.editing||this.stopRowOrCellEdit(),t&&this.rowCtrl.announceDescription()}createCellPosition(){this.cellPosition={rowIndex:this.rowNode.rowIndex,rowPinned:v(this.rowNode.rowPinned),column:this.column}}applyStaticCssClasses(){this.cellComp.addOrRemoveCssClass("ag-cell",!0),this.cellComp.addOrRemoveCssClass("ag-cell-not-inline-editing",!0);const e=1==this.column.isAutoHeight();this.cellComp.addOrRemoveCssClass("ag-cell-auto-height",e),this.cellComp.addOrRemoveCssClass("ag-cell-normal-height",!e)}onColumnHover(){if(!this.cellComp)return;if(!this.beans.gos.get("columnHoverHighlight"))return;const e=this.beans.columnHoverService.isHovered(this.column);this.cellComp.addOrRemoveCssClass("ag-column-hover",e)}onColDefChanged(){if(this.cellComp)if(this.column.isTooltipEnabled()?(this.disableTooltipFeature(),this.enableTooltipFeature()):this.disableTooltipFeature(),this.setWrapText(),this.editing){const e=this.getCellEditor();if(null==e?void 0:e.refresh){const{eventKey:t,cellStartedEdit:i}=this.editCompDetails.params,n=this.createCellEditorParams(t,i),s=this.column.getColDef(),r=this.beans.userComponentFactory.getCellEditorDetails(s,n);e.refresh(r.params)}}else this.refreshOrDestroyCell({forceRefresh:!0,suppressFlash:!0})}setWrapText(){const e=1==this.column.getColDef().wrapText;this.cellComp.addOrRemoveCssClass("ag-cell-wrap-text",e)}dispatchCellContextMenuEvent(e){const t=this.column.getColDef(),i=this.createEvent(e,lt.EVENT_CELL_CONTEXT_MENU);this.beans.eventService.dispatchEvent(i),t.onCellContextMenu&&window.setTimeout(()=>{this.beans.frameworkOverrides.wrapOutgoing(()=>{t.onCellContextMenu(i)})},0)}getCellRenderer(){return this.cellComp?this.cellComp.getCellRenderer():null}getCellEditor(){return this.cellComp?this.cellComp.getCellEditor():null}destroy(){this.onCellCompAttachedFuncs=[],super.destroy()}createSelectionCheckbox(){const e=new Nr;return this.beans.context.createBean(e),e.init({rowNode:this.rowNode,column:this.column}),e}createDndSource(){const e=new ha(this.rowNode,this.column,this.eGui);return this.beans.context.createBean(e),e}registerRowDragger(e,t,i){if(this.customRowDragComp)return void this.customRowDragComp.setDragElement(e,t);const n=this.createRowDragComp(e,t,i);n&&(this.customRowDragComp=n,this.addDestroyFunc(()=>{this.beans.context.destroyBean(n),this.customRowDragComp=null}))}createRowDragComp(e,t,i){const n=this.beans.gos.get("pagination"),s=this.beans.gos.get("rowDragManaged"),r=this.beans.gos.isRowModelType("clientSide");if(s){if(!r)return void z("managed row dragging is only allowed in the Client Side Row Model");if(n)return void z("managed row dragging is not possible when doing pagination")}const o=new Vr(()=>this.value,this.rowNode,this.column,e,t,i);return this.beans.context.createBean(o),o}};pa.DOM_DATA_KEY_CELL_CTRL="cellCtrl";var ga=pa,fa=0,ma=class e extends nt{constructor(e,t,i,n,s){super(),this.allRowGuis=[],this.active=!0,this.centerCellCtrls={list:[],map:{}},this.leftCellCtrls={list:[],map:{}},this.rightCellCtrls={list:[],map:{}},this.slideInAnimation={left:!1,center:!1,right:!1,fullWidth:!1},this.fadeInAnimation={left:!1,center:!1,right:!1,fullWidth:!1},this.rowDragComps=[],this.lastMouseDownOnDragger=!1,this.emptyStyle={},this.updateColumnListsPending=!1,this.rowId=null,this.businessKeySanitised=null,this.beans=t,this.gos=t.gos,this.rowNode=e,this.paginationPage=t.paginationProxy.getCurrentPage(),this.useAnimationFrameForCreate=n,this.printLayout=s,this.suppressRowTransform=this.gos.get("suppressRowTransform"),this.instanceId=e.id+"-"+fa++,this.rowId=yt(e.id),this.initRowBusinessKey(),this.rowFocused=t.focusService.isRowFocused(this.rowNode.rowIndex,this.rowNode.rowPinned),this.rowLevel=t.rowCssClassCalculator.calculateRowLevel(this.rowNode),this.setRowType(),this.setAnimateFlags(i),this.rowStyles=this.processStylesFromGridOptions(),this.isFullWidth()&&!this.gos.get("suppressCellFocus")&&(this.tabIndex=-1),this.addListeners()}initRowBusinessKey(){this.businessKeyForNodeFunc=this.gos.get("getBusinessKeyForNode"),this.updateRowBusinessKey()}updateRowBusinessKey(){if("function"!=typeof this.businessKeyForNodeFunc)return;const e=this.businessKeyForNodeFunc(this.rowNode);this.businessKeySanitised=yt(e)}getRowId(){return this.rowId}getRowStyles(){return this.rowStyles}getTabIndex(){return this.tabIndex}isSticky(){return this.rowNode.sticky}getInstanceId(){return this.instanceId}setComp(e,t,i){const n={rowComp:e,element:t,containerType:i};this.allRowGuis.push(n),"left"===i?this.leftGui=n:"right"===i?this.rightGui=n:"fullWidth"===i?this.fullWidthGui=n:this.centerGui=n,this.initialiseRowComp(n),"FullWidthLoading"===this.rowType||this.rowNode.rowPinned||this.beans.rowRenderer.dispatchFirstDataRenderedEvent()}unsetComp(e){switch(this.allRowGuis=this.allRowGuis.filter(t=>t.containerType!==e),e){case"left":this.leftGui=void 0;break;case"right":this.rightGui=void 0;break;case"fullWidth":this.fullWidthGui=void 0;break;case"center":this.centerGui=void 0}}isCacheable(){return"FullWidthDetail"===this.rowType&&this.gos.get("keepDetailRows")}setCached(e){const t=e?"none":"";this.allRowGuis.forEach(e=>e.element.style.display=t)}initialiseRowComp(t){const i=this.gos;this.listenOnDomOrder(t),this.beans.columnModel.wasAutoRowHeightEverActive()&&this.rowNode.checkAutoHeights(),this.onRowHeightChanged(t),this.updateRowIndexes(t),this.setFocusedClasses(t),this.setStylesFromGridOptions(!1,t),i.isRowSelection()&&this.rowNode.selectable&&this.onRowSelected(t),this.updateColumnLists(!this.useAnimationFrameForCreate);const n=t.rowComp;this.getInitialRowClasses(t.containerType).forEach(e=>n.addOrRemoveCssClass(e,!0)),this.executeSlideAndFadeAnimations(t),this.rowNode.group&&ti(t.element,1==this.rowNode.expanded),this.setRowCompRowId(n),this.setRowCompRowBusinessKey(n),i.setDomData(t.element,e.DOM_DATA_KEY_ROW_CTRL,this),this.addDestroyFunc(()=>i.setDomData(t.element,e.DOM_DATA_KEY_ROW_CTRL,null)),this.useAnimationFrameForCreate?this.beans.animationFrameService.createTask(this.addHoverFunctionality.bind(this,t.element),this.rowNode.rowIndex,"createTasksP2"):this.addHoverFunctionality(t.element),this.isFullWidth()&&this.setupFullWidth(t),i.get("rowDragEntireRow")&&this.addRowDraggerToRow(t),this.useAnimationFrameForCreate&&this.beans.animationFrameService.addDestroyTask(()=>{this.isAlive()&&t.rowComp.addOrRemoveCssClass("ag-after-created",!0)}),this.executeProcessRowPostCreateFunc()}setRowCompRowBusinessKey(e){null!=this.businessKeySanitised&&e.setRowBusinessKey(this.businessKeySanitised)}getBusinessKey(){return this.businessKeySanitised}setRowCompRowId(e){this.rowId=yt(this.rowNode.id),null!=this.rowId&&e.setRowId(this.rowId)}executeSlideAndFadeAnimations(e){const{containerType:t}=e;this.slideInAnimation[t]&&(q(()=>{this.onTopChanged()}),this.slideInAnimation[t]=!1),this.fadeInAnimation[t]&&(q(()=>{e.rowComp.addOrRemoveCssClass("ag-opacity-zero",!1)}),this.fadeInAnimation[t]=!1)}addRowDraggerToRow(e){if(this.gos.get("enableRangeSelection"))return void z("Setting `rowDragEntireRow: true` in the gridOptions doesn't work with `enableRangeSelection: true`");const t=this.beans.localeService.getLocaleTextFunc(),i=new Vr(()=>`1 ${t("rowDragRow","row")}`,this.rowNode,void 0,e.element,void 0,!0),n=this.createBean(i,this.beans.context);this.rowDragComps.push(n)}setupFullWidth(e){const t=this.getPinnedForContainer(e.containerType);if("FullWidthDetail"==this.rowType&&!se.__assertRegistered("@ag-grid-enterprise/master-detail","cell renderer 'agDetailCellRenderer' (for master detail)",this.beans.context.getGridId()))return;const i=this.createFullWidthCompDetails(e.element,t);e.rowComp.showFullWidth(i)}isPrintLayout(){return this.printLayout}getFullWidthCellRenderers(){var e,t;return this.gos.get("embedFullWidthRows")?this.allRowGuis.map(e=>{var t;return null==(t=null==e?void 0:e.rowComp)?void 0:t.getFullWidthCellRenderer()}):[null==(t=null==(e=this.fullWidthGui)?void 0:e.rowComp)?void 0:t.getFullWidthCellRenderer()]}getCellElement(e){const t=this.getCellCtrl(e);return t?t.getGui():null}executeProcessRowPostCreateFunc(){const e=this.gos.getCallback("processRowPostCreate");e&&this.areAllContainersReady()&&e({eRow:this.centerGui.element,ePinnedLeftRow:this.leftGui?this.leftGui.element:void 0,ePinnedRightRow:this.rightGui?this.rightGui.element:void 0,node:this.rowNode,rowIndex:this.rowNode.rowIndex,addRenderedRowListener:this.addEventListener.bind(this)})}areAllContainersReady(){const e=!!this.leftGui||!this.beans.columnModel.isPinningLeft(),t=!!this.centerGui,i=!!this.rightGui||!this.beans.columnModel.isPinningRight();return e&&t&&i}setRowType(){const e=this.rowNode.stub&&!this.gos.get("suppressServerSideFullWidthLoadingRow"),t=this.rowNode.isFullWidthCell(),i=this.gos.get("masterDetail")&&this.rowNode.detail,n=this.beans.columnModel.isPivotMode(),s=!!this.rowNode.group&&!this.rowNode.footer&&this.gos.isGroupUseEntireRow(n);this.rowType=e?"FullWidthLoading":i?"FullWidthDetail":t?"FullWidth":s?"FullWidthGroup":"Normal"}updateColumnLists(e=!1,t=!1){this.isFullWidth()||(e||this.gos.get("suppressAnimationFrame")||this.printLayout?this.updateColumnListsImpl(t):this.updateColumnListsPending||(this.beans.animationFrameService.createTask(()=>{this.active&&this.updateColumnListsImpl(!0)},this.rowNode.rowIndex,"createTasksP1"),this.updateColumnListsPending=!0))}createCellCtrls(e,t,i=null){const n={list:[],map:{}},s=(e,t)=>{n.list.push(t),n.map[e]=t};return t.forEach(t=>{const i=t.getInstanceId();let n=e.map[i];n||(n=new ga(t,this.rowNode,this.beans,this)),s(i,n)}),e.list.forEach(e=>{null==n.map[e.getColumn().getInstanceId()]&&(this.isCellEligibleToBeRemoved(e,i)?e.destroy():s(e.getColumn().getInstanceId(),e))}),n}updateColumnListsImpl(e){this.updateColumnListsPending=!1,this.createAllCellCtrls(),this.setCellCtrls(e)}setCellCtrls(e){this.allRowGuis.forEach(t=>{const i=this.getCellCtrlsForContainer(t.containerType);t.rowComp.setCellCtrls(i,e)})}getCellCtrlsForContainer(e){switch(e){case"left":return this.leftCellCtrls.list;case"right":return this.rightCellCtrls.list;case"fullWidth":return[];case"center":return this.centerCellCtrls.list;default:throw new Error(`Unhandled case: ${e}`)}}createAllCellCtrls(){const e=this.beans.columnModel;if(this.printLayout)this.centerCellCtrls=this.createCellCtrls(this.centerCellCtrls,e.getAllDisplayedColumns()),this.leftCellCtrls={list:[],map:{}},this.rightCellCtrls={list:[],map:{}};else{const t=e.getViewportCenterColumnsForRow(this.rowNode);this.centerCellCtrls=this.createCellCtrls(this.centerCellCtrls,t);const i=e.getDisplayedLeftColumnsForRow(this.rowNode);this.leftCellCtrls=this.createCellCtrls(this.leftCellCtrls,i,"left");const n=e.getDisplayedRightColumnsForRow(this.rowNode);this.rightCellCtrls=this.createCellCtrls(this.rightCellCtrls,n,"right")}}isCellEligibleToBeRemoved(e,t){const i=!0;if(e.getColumn().getPinned()!=t)return i;const n=e.isEditing(),s=this.beans.focusService.isCellFocused(e.getCellPosition());if(n||s){const t=e.getColumn();return!(this.beans.columnModel.getAllDisplayedColumns().indexOf(t)>=0)&&i}return i}getDomOrder(){return this.gos.get("ensureDomOrder")||this.gos.isDomLayout("print")}listenOnDomOrder(e){const t=()=>{e.rowComp.setDomOrder(this.getDomOrder())};this.addManagedPropertyListener("domLayout",t),this.addManagedPropertyListener("ensureDomOrder",t)}setAnimateFlags(e){if(this.isSticky()||!e)return;const t=y(this.rowNode.oldRowTop),i=this.beans.columnModel.isPinningLeft(),n=this.beans.columnModel.isPinningRight();if(t){if(this.isFullWidth()&&!this.gos.get("embedFullWidthRows"))return void(this.slideInAnimation.fullWidth=!0);this.slideInAnimation.center=!0,this.slideInAnimation.left=i,this.slideInAnimation.right=n}else{if(this.isFullWidth()&&!this.gos.get("embedFullWidthRows"))return void(this.fadeInAnimation.fullWidth=!0);this.fadeInAnimation.center=!0,this.fadeInAnimation.left=i,this.fadeInAnimation.right=n}}isEditing(){return this.editingRow}isFullWidth(){return"Normal"!==this.rowType}refreshFullWidth(){const e=(e,t)=>!e||e.rowComp.refreshFullWidth(()=>this.createFullWidthCompDetails(e.element,t).params),t=e(this.fullWidthGui,null),i=e(this.centerGui,null),n=e(this.leftGui,"left"),s=e(this.rightGui,"right");return t&&i&&n&&s}addListeners(){this.addManagedListener(this.rowNode,Pr.EVENT_HEIGHT_CHANGED,()=>this.onRowHeightChanged()),this.addManagedListener(this.rowNode,Pr.EVENT_ROW_SELECTED,()=>this.onRowSelected()),this.addManagedListener(this.rowNode,Pr.EVENT_ROW_INDEX_CHANGED,this.onRowIndexChanged.bind(this)),this.addManagedListener(this.rowNode,Pr.EVENT_TOP_CHANGED,this.onTopChanged.bind(this)),this.addManagedListener(this.rowNode,Pr.EVENT_EXPANDED_CHANGED,this.updateExpandedCss.bind(this)),this.addManagedListener(this.rowNode,Pr.EVENT_HAS_CHILDREN_CHANGED,this.updateExpandedCss.bind(this)),this.rowNode.detail&&this.addManagedListener(this.rowNode.parent,Pr.EVENT_DATA_CHANGED,this.onRowNodeDataChanged.bind(this)),this.addManagedListener(this.rowNode,Pr.EVENT_DATA_CHANGED,this.onRowNodeDataChanged.bind(this)),this.addManagedListener(this.rowNode,Pr.EVENT_CELL_CHANGED,this.postProcessCss.bind(this)),this.addManagedListener(this.rowNode,Pr.EVENT_HIGHLIGHT_CHANGED,this.onRowNodeHighlightChanged.bind(this)),this.addManagedListener(this.rowNode,Pr.EVENT_DRAGGING_CHANGED,this.postProcessRowDragging.bind(this)),this.addManagedListener(this.rowNode,Pr.EVENT_UI_LEVEL_CHANGED,this.onUiLevelChanged.bind(this));const e=this.beans.eventService;this.addManagedListener(e,lt.EVENT_PAGINATION_PIXEL_OFFSET_CHANGED,this.onPaginationPixelOffsetChanged.bind(this)),this.addManagedListener(e,lt.EVENT_HEIGHT_SCALE_CHANGED,this.onTopChanged.bind(this)),this.addManagedListener(e,lt.EVENT_DISPLAYED_COLUMNS_CHANGED,this.onDisplayedColumnsChanged.bind(this)),this.addManagedListener(e,lt.EVENT_VIRTUAL_COLUMNS_CHANGED,this.onVirtualColumnsChanged.bind(this)),this.addManagedListener(e,lt.EVENT_CELL_FOCUSED,this.onCellFocusChanged.bind(this)),this.addManagedListener(e,lt.EVENT_CELL_FOCUS_CLEARED,this.onCellFocusChanged.bind(this)),this.addManagedListener(e,lt.EVENT_PAGINATION_CHANGED,this.onPaginationChanged.bind(this)),this.addManagedListener(e,lt.EVENT_MODEL_UPDATED,this.refreshFirstAndLastRowStyles.bind(this)),this.addManagedListener(e,lt.EVENT_COLUMN_MOVED,this.updateColumnLists.bind(this)),this.addDestroyFunc(()=>{this.destroyBeans(this.rowDragComps,this.beans.context),this.tooltipFeature&&(this.tooltipFeature=this.destroyBean(this.tooltipFeature,this.beans.context))}),this.addManagedPropertyListeners(["rowDragEntireRow"],()=>{this.gos.get("rowDragEntireRow")?this.allRowGuis.forEach(e=>{this.addRowDraggerToRow(e)}):(this.destroyBeans(this.rowDragComps,this.beans.context),this.rowDragComps=[])}),this.addListenersForCellComps()}addListenersForCellComps(){this.addManagedListener(this.rowNode,Pr.EVENT_ROW_INDEX_CHANGED,()=>{this.getAllCellCtrls().forEach(e=>e.onRowIndexChanged())}),this.addManagedListener(this.rowNode,Pr.EVENT_CELL_CHANGED,e=>{this.getAllCellCtrls().forEach(t=>t.onCellChanged(e))})}onRowNodeDataChanged(e){if(this.isFullWidth()!==!!this.rowNode.isFullWidthCell())this.beans.rowRenderer.redrawRow(this.rowNode);else{if(this.isFullWidth())return void(this.refreshFullWidth()||this.beans.rowRenderer.redrawRow(this.rowNode));this.getAllCellCtrls().forEach(t=>t.refreshCell({suppressFlash:!e.update,newData:!e.update})),this.allRowGuis.forEach(e=>{this.setRowCompRowId(e.rowComp),this.updateRowBusinessKey(),this.setRowCompRowBusinessKey(e.rowComp)}),this.onRowSelected(),this.postProcessCss()}}postProcessCss(){this.setStylesFromGridOptions(!0),this.postProcessClassesFromGridOptions(),this.postProcessRowClassRules(),this.postProcessRowDragging()}onRowNodeHighlightChanged(){const e=this.rowNode.highlighted;this.allRowGuis.forEach(t=>{const i=0===e,n=1===e;t.rowComp.addOrRemoveCssClass("ag-row-highlight-above",i),t.rowComp.addOrRemoveCssClass("ag-row-highlight-below",n)})}postProcessRowDragging(){const e=this.rowNode.dragging;this.allRowGuis.forEach(t=>t.rowComp.addOrRemoveCssClass("ag-row-dragging",e))}updateExpandedCss(){const e=this.rowNode.isExpandable(),t=1==this.rowNode.expanded;this.allRowGuis.forEach(i=>{i.rowComp.addOrRemoveCssClass("ag-row-group",e),i.rowComp.addOrRemoveCssClass("ag-row-group-expanded",e&&t),i.rowComp.addOrRemoveCssClass("ag-row-group-contracted",e&&!t),ti(i.element,e&&t)})}onDisplayedColumnsChanged(){this.updateColumnLists(!0),this.beans.columnModel.wasAutoRowHeightEverActive()&&this.rowNode.checkAutoHeights()}onVirtualColumnsChanged(){this.updateColumnLists(!1,!0)}getRowPosition(){return{rowPinned:v(this.rowNode.rowPinned),rowIndex:this.rowNode.rowIndex}}onKeyboardNavigate(e){const t=this.allRowGuis.find(t=>t.element.contains(e.target));if((t?t.element:null)!==e.target)return;const i=this.rowNode,n=this.beans.focusService.getFocusedCell(),s={rowIndex:i.rowIndex,rowPinned:i.rowPinned,column:n&&n.column};this.beans.navigationService.navigateToNextCell(e,e.key,s,!0),e.preventDefault()}onTabKeyDown(e){if(e.defaultPrevented||qe(e))return;const t=this.allRowGuis.find(t=>t.element.contains(e.target)),i=t?t.element:null,n=i===e.target;let s=null;n||(s=this.beans.focusService.findNextFocusableElement(i,!1,e.shiftKey)),(this.isFullWidth()&&n||!s)&&this.beans.navigationService.onTabKeyDown(this,e)}getFullWidthElement(){return this.fullWidthGui?this.fullWidthGui.element:null}getRowYPosition(){var e;const t=null==(e=this.allRowGuis.find(e=>wn(e.element)))?void 0:e.element;return t?t.getBoundingClientRect().top:0}onFullWidthRowFocused(e){var t;const i=this.rowNode,n=!!e&&this.isFullWidth()&&e.rowIndex===i.rowIndex&&e.rowPinned==i.rowPinned,s=this.fullWidthGui?this.fullWidthGui.element:null==(t=this.centerGui)?void 0:t.element;s&&(s.classList.toggle("ag-full-width-focus",n),n&&s.focus({preventScroll:!0}))}recreateCell(e){this.centerCellCtrls=this.removeCellCtrl(this.centerCellCtrls,e),this.leftCellCtrls=this.removeCellCtrl(this.leftCellCtrls,e),this.rightCellCtrls=this.removeCellCtrl(this.rightCellCtrls,e),e.destroy(),this.updateColumnLists()}removeCellCtrl(e,t){const i={list:[],map:{}};return e.list.forEach(e=>{e!==t&&(i.list.push(e),i.map[e.getColumn().getInstanceId()]=e)}),i}onMouseEvent(e,t){switch(e){case"dblclick":this.onRowDblClick(t);break;case"click":this.onRowClick(t);break;case"touchstart":case"mousedown":this.onRowMouseDown(t)}}createRowEvent(e,t){return this.gos.addGridCommonParams({type:e,node:this.rowNode,data:this.rowNode.data,rowIndex:this.rowNode.rowIndex,rowPinned:this.rowNode.rowPinned,event:t})}createRowEventWithSource(e,t){const i=this.createRowEvent(e,t);return i.source=this,i}onRowDblClick(e){if(qe(e))return;const t=this.createRowEventWithSource(lt.EVENT_ROW_DOUBLE_CLICKED,e);this.beans.eventService.dispatchEvent(t)}onRowMouseDown(e){if(this.lastMouseDownOnDragger=cn(e.target,"ag-row-drag",3),!this.isFullWidth())return;const t=this.rowNode,i=this.beans.columnModel;this.beans.rangeService&&this.beans.rangeService.removeAllCellRanges(),this.beans.focusService.setFocusedCell({rowIndex:t.rowIndex,column:i.getAllDisplayedColumns()[0],rowPinned:t.rowPinned,forceBrowserFocus:!0})}onRowClick(e){if(qe(e)||this.lastMouseDownOnDragger)return;const t=this.createRowEventWithSource(lt.EVENT_ROW_CLICKED,e);this.beans.eventService.dispatchEvent(t);const i=e.ctrlKey||e.metaKey,n=e.shiftKey;if(this.gos.get("groupSelectsChildren")&&this.rowNode.group||this.isRowSelectionBlocked()||this.gos.get("suppressRowClickSelection"))return;const s=this.gos.get("rowMultiSelectWithClick"),r=!this.gos.get("suppressRowDeselection"),o="rowClicked";if(this.rowNode.isSelected())s?this.rowNode.setSelectedParams({newValue:!1,event:e,source:o}):i?r&&this.rowNode.setSelectedParams({newValue:!1,event:e,source:o}):this.rowNode.setSelectedParams({newValue:!0,clearSelection:!n,rangeSelect:n,event:e,source:o});else{const t=!s&&!i;this.rowNode.setSelectedParams({newValue:!0,clearSelection:t,rangeSelect:n,event:e,source:o})}}isRowSelectionBlocked(){return!this.rowNode.selectable||!!this.rowNode.rowPinned||!this.gos.isRowSelection()}setupDetailRowAutoHeight(e){if("FullWidthDetail"!==this.rowType)return;if(!this.gos.get("detailRowAutoHeight"))return;const t=()=>{const t=e.clientHeight;if(null!=t&&t>0){const e=()=>{this.rowNode.setRowHeight(t),this.beans.clientSideRowModel?this.beans.clientSideRowModel.onRowHeightChanged():this.beans.serverSideRowModel&&this.beans.serverSideRowModel.onRowHeightChanged()};window.setTimeout(e,0)}},i=this.beans.resizeObserverService.observeResize(e,t);this.addDestroyFunc(i),t()}createFullWidthCompDetails(e,t){const i=this.gos.addGridCommonParams({fullWidth:!0,data:this.rowNode.data,node:this.rowNode,value:this.rowNode.key,valueFormatted:this.rowNode.key,rowIndex:this.rowNode.rowIndex,eGridCell:e,eParentOfValue:e,pinned:t,addRenderedRowListener:this.addEventListener.bind(this),registerRowDragger:(e,t,i,n)=>this.addFullWidthRowDragging(e,t,i,n),setTooltip:(e,t)=>this.refreshRowTooltip(e,t)});switch(this.rowType){case"FullWidthDetail":return this.beans.userComponentFactory.getFullWidthDetailCellRendererDetails(i);case"FullWidthGroup":return this.beans.userComponentFactory.getFullWidthGroupCellRendererDetails(i);case"FullWidthLoading":return this.beans.userComponentFactory.getFullWidthLoadingCellRendererDetails(i);default:return this.beans.userComponentFactory.getFullWidthCellRendererDetails(i)}}refreshRowTooltip(e,t){if(!this.fullWidthGui)return;const i={getGui:()=>this.fullWidthGui.element,getTooltipValue:()=>e,getLocation:()=>"fullWidthRow",shouldDisplayTooltip:t};this.tooltipFeature&&this.destroyBean(this.tooltipFeature,this.beans.context),this.tooltipFeature=this.createBean(new ms(i,this.beans))}addFullWidthRowDragging(e,t,i="",n){if(!this.isFullWidth())return;const s=new Vr(()=>i,this.rowNode,void 0,e,t,n);this.createBean(s,this.beans.context),this.addDestroyFunc(()=>{this.destroyBean(s,this.beans.context)})}onUiLevelChanged(){const e=this.beans.rowCssClassCalculator.calculateRowLevel(this.rowNode);if(this.rowLevel!=e){const t="ag-row-level-"+e,i="ag-row-level-"+this.rowLevel;this.allRowGuis.forEach(e=>{e.rowComp.addOrRemoveCssClass(t,!0),e.rowComp.addOrRemoveCssClass(i,!1)})}this.rowLevel=e}isFirstRowOnPage(){return this.rowNode.rowIndex===this.beans.paginationProxy.getPageFirstRow()}isLastRowOnPage(){return this.rowNode.rowIndex===this.beans.paginationProxy.getPageLastRow()}refreshFirstAndLastRowStyles(){const e=this.isFirstRowOnPage(),t=this.isLastRowOnPage();this.firstRowOnPage!==e&&(this.firstRowOnPage=e,this.allRowGuis.forEach(t=>t.rowComp.addOrRemoveCssClass("ag-row-first",e))),this.lastRowOnPage!==t&&(this.lastRowOnPage=t,this.allRowGuis.forEach(e=>e.rowComp.addOrRemoveCssClass("ag-row-last",t)))}stopEditing(e=!1){if(this.stoppingRowEdit)return;const t=this.getAllCellCtrls(),i=this.editingRow;this.stoppingRowEdit=!0;let n=!1;for(const s of t){const t=s.stopEditing(e);i&&!e&&!n&&t&&(n=!0)}if(n){const e=this.createRowEvent(lt.EVENT_ROW_VALUE_CHANGED);this.beans.eventService.dispatchEvent(e)}i&&this.setEditingRow(!1),this.stoppingRowEdit=!1}setInlineEditingCss(e){this.allRowGuis.forEach(t=>{t.rowComp.addOrRemoveCssClass("ag-row-inline-editing",e),t.rowComp.addOrRemoveCssClass("ag-row-not-inline-editing",!e)})}setEditingRow(e){this.editingRow=e,this.allRowGuis.forEach(t=>t.rowComp.addOrRemoveCssClass("ag-row-editing",e));const t=e?this.createRowEvent(lt.EVENT_ROW_EDITING_STARTED):this.createRowEvent(lt.EVENT_ROW_EDITING_STOPPED);this.beans.eventService.dispatchEvent(t)}startRowEditing(e=null,t=null,i=null){this.editingRow||this.getAllCellCtrls().reduce((n,s)=>{const r=s===t;return r?s.startEditing(e,r,i):s.startEditing(null,r,i),!!n||s.isEditing()},!1)&&this.setEditingRow(!0)}getAllCellCtrls(){return 0===this.leftCellCtrls.list.length&&0===this.rightCellCtrls.list.length?this.centerCellCtrls.list:[...this.centerCellCtrls.list,...this.leftCellCtrls.list,...this.rightCellCtrls.list]}postProcessClassesFromGridOptions(){const e=this.beans.rowCssClassCalculator.processClassesFromGridOptions(this.rowNode);e&&e.length&&e.forEach(e=>{this.allRowGuis.forEach(t=>t.rowComp.addOrRemoveCssClass(e,!0))})}postProcessRowClassRules(){this.beans.rowCssClassCalculator.processRowClassRules(this.rowNode,e=>{this.allRowGuis.forEach(t=>t.rowComp.addOrRemoveCssClass(e,!0))},e=>{this.allRowGuis.forEach(t=>t.rowComp.addOrRemoveCssClass(e,!1))})}setStylesFromGridOptions(e,t){e&&(this.rowStyles=this.processStylesFromGridOptions()),this.forEachGui(t,e=>e.rowComp.setUserStyles(this.rowStyles))}getPinnedForContainer(e){return"left"===e?"left":"right"===e?"right":null}getInitialRowClasses(e){const t=this.getPinnedForContainer(e),i={rowNode:this.rowNode,rowFocused:this.rowFocused,fadeRowIn:this.fadeInAnimation[e],rowIsEven:this.rowNode.rowIndex%2==0,rowLevel:this.rowLevel,fullWidthRow:this.isFullWidth(),firstRowOnPage:this.isFirstRowOnPage(),lastRowOnPage:this.isLastRowOnPage(),printLayout:this.printLayout,expandable:this.rowNode.isExpandable(),pinned:t};return this.beans.rowCssClassCalculator.getInitialRowClasses(i)}processStylesFromGridOptions(){const e=this.gos.get("rowStyle");if(e&&"function"==typeof e)return void console.warn("AG Grid: rowStyle should be an object of key/value styles, not be a function, use getRowStyle() instead");const t=this.gos.getCallback("getRowStyle");let i;return t&&(i=t({data:this.rowNode.data,node:this.rowNode,rowIndex:this.rowNode.rowIndex})),i||e?Object.assign({},e,i):this.emptyStyle}onRowSelected(e){const t=!!this.rowNode.isSelected();this.forEachGui(e,e=>{e.rowComp.addOrRemoveCssClass("ag-row-selected",t),pi(e.element,t),!e.element.contains(this.beans.gos.getActiveDomElement())||e!==this.centerGui&&e!==this.fullWidthGui||this.announceDescription()})}announceDescription(){if(this.isRowSelectionBlocked())return;const e=this.rowNode.isSelected();if(e&&this.beans.gos.get("suppressRowDeselection"))return;const t=this.beans.localeService.getLocaleTextFunc()(e?"ariaRowDeselect":"ariaRowSelect",`Press SPACE to ${e?"deselect":"select"} this row.`);this.beans.ariaAnnouncementService.announceValue(t)}addHoverFunctionality(e){this.active&&(this.addManagedListener(e,"mouseenter",()=>this.rowNode.onMouseEnter()),this.addManagedListener(e,"mouseleave",()=>this.rowNode.onMouseLeave()),this.addManagedListener(this.rowNode,Pr.EVENT_MOUSE_ENTER,()=>{this.beans.dragService.isDragging()||this.gos.get("suppressRowHoverHighlight")||(e.classList.add("ag-row-hover"),this.rowNode.setHovered(!0))}),this.addManagedListener(this.rowNode,Pr.EVENT_MOUSE_LEAVE,()=>{e.classList.remove("ag-row-hover"),this.rowNode.setHovered(!1)}))}roundRowTopToBounds(e){const t=this.beans.ctrlsService.getGridBodyCtrl().getScrollFeature().getApproximateVScollPosition(),i=this.applyPaginationOffset(t.top,!0)-100,n=this.applyPaginationOffset(t.bottom,!0)+100;return Math.min(Math.max(i,e),n)}getFrameworkOverrides(){return this.beans.frameworkOverrides}forEachGui(e,t){e?t(e):this.allRowGuis.forEach(t)}onRowHeightChanged(e){if(null==this.rowNode.rowHeight)return;const t=this.rowNode.rowHeight,i=this.beans.environment.getDefaultRowHeight(),n=this.gos.isGetRowHeightFunction()?this.gos.getRowHeightForNode(this.rowNode).height:void 0,s=n?Math.min(i,n)-2+"px":void 0;this.forEachGui(e,e=>{e.element.style.height=`${t}px`,s&&e.element.style.setProperty("--ag-line-height",s)})}addEventListener(e,t){super.addEventListener(e,t)}removeEventListener(e,t){super.removeEventListener(e,t)}destroyFirstPass(e=!1){if(this.active=!1,!e&&this.gos.isAnimateRows()&&!this.isSticky())if(null!=this.rowNode.rowTop){const e=this.roundRowTopToBounds(this.rowNode.rowTop);this.setRowTop(e)}else this.allRowGuis.forEach(e=>e.rowComp.addOrRemoveCssClass("ag-opacity-zero",!0));this.rowNode.setHovered(!1);const t=this.createRowEvent(lt.EVENT_VIRTUAL_ROW_REMOVED);this.dispatchEvent(t),this.beans.eventService.dispatchEvent(t),super.destroy()}destroySecondPass(){this.allRowGuis.length=0,this.stopEditing();const e=e=>(e.list.forEach(e=>e.destroy()),{list:[],map:{}});this.centerCellCtrls=e(this.centerCellCtrls),this.leftCellCtrls=e(this.leftCellCtrls),this.rightCellCtrls=e(this.rightCellCtrls)}setFocusedClasses(e){this.forEachGui(e,e=>{e.rowComp.addOrRemoveCssClass("ag-row-focus",this.rowFocused),e.rowComp.addOrRemoveCssClass("ag-row-no-focus",!this.rowFocused)})}onCellFocusChanged(){const e=this.beans.focusService.isRowFocused(this.rowNode.rowIndex,this.rowNode.rowPinned);e!==this.rowFocused&&(this.rowFocused=e,this.setFocusedClasses()),!e&&this.editingRow&&this.stopEditing(!1)}onPaginationChanged(){const e=this.beans.paginationProxy.getCurrentPage();this.paginationPage!==e&&(this.paginationPage=e,this.onTopChanged()),this.refreshFirstAndLastRowStyles()}onTopChanged(){this.setRowTop(this.rowNode.rowTop)}onPaginationPixelOffsetChanged(){this.onTopChanged()}applyPaginationOffset(e,t=!1){return this.rowNode.isRowPinned()||this.rowNode.sticky?e:e+this.beans.paginationProxy.getPixelOffset()*(t?1:-1)}setRowTop(e){if(!this.printLayout&&y(e)){const t=this.applyPaginationOffset(e),i=`${this.rowNode.isRowPinned()||this.rowNode.sticky?t:this.beans.rowContainerHeightService.getRealPixelPosition(t)}px`;this.setRowTopStyle(i)}}getInitialRowTop(e){return this.suppressRowTransform?this.getInitialRowTopShared(e):void 0}getInitialTransform(e){return this.suppressRowTransform?void 0:`translateY(${this.getInitialRowTopShared(e)})`}getInitialRowTopShared(e){if(this.printLayout)return"";let t;if(this.isSticky())t=this.rowNode.stickyRowTop;else{const i=this.slideInAnimation[e]?this.roundRowTopToBounds(this.rowNode.oldRowTop):this.rowNode.rowTop,n=this.applyPaginationOffset(i);t=this.rowNode.isRowPinned()?n:this.beans.rowContainerHeightService.getRealPixelPosition(n)}return t+"px"}setRowTopStyle(e){this.allRowGuis.forEach(t=>this.suppressRowTransform?t.rowComp.setTop(e):t.rowComp.setTransform(`translateY(${e})`))}getRowNode(){return this.rowNode}getCellCtrl(e){let t=null;return this.getAllCellCtrls().forEach(i=>{i.getColumn()==e&&(t=i)}),null!=t||this.getAllCellCtrls().forEach(i=>{i.getColSpanningList().indexOf(e)>=0&&(t=i)}),t}onRowIndexChanged(){null!=this.rowNode.rowIndex&&(this.onCellFocusChanged(),this.updateRowIndexes(),this.postProcessCss())}getRowIndex(){return this.rowNode.getRowIndexString()}updateRowIndexes(e){const t=this.rowNode.getRowIndexString(),i=this.beans.headerNavigationService.getHeaderRowCount()+this.beans.filterManager.getHeaderRowCount(),n=this.rowNode.rowIndex%2==0,s=i+this.rowNode.rowIndex+1;this.forEachGui(e,e=>{e.rowComp.setRowIndex(t),e.rowComp.addOrRemoveCssClass("ag-row-even",n),e.rowComp.addOrRemoveCssClass("ag-row-odd",!n),ai(e.element,s)})}};ma.DOM_DATA_KEY_ROW_CTRL="renderedRow";var va=ma,ya=class extends nt{constructor(e){super(),this.element=e}postConstruct(){this.addKeyboardListeners(),this.addMouseListeners(),this.mockContextMenuForIPad()}addKeyboardListeners(){const e="keydown",t=this.processKeyboardEvent.bind(this,e);this.addManagedListener(this.element,e,t)}addMouseListeners(){["dblclick","contextmenu","mouseover","mouseout","click",Xe("touchstart")?"touchstart":"mousedown"].forEach(e=>{const t=this.processMouseEvent.bind(this,e);this.addManagedListener(this.element,e,t)})}processMouseEvent(e,t){if(!this.mouseEventService.isEventFromThisGrid(t)||qe(t))return;const i=this.getRowForEvent(t),n=this.mouseEventService.getRenderedCellForEvent(t);"contextmenu"===e?this.handleContextMenuMouseEvent(t,void 0,i,n):(n&&n.onMouseEvent(e,t),i&&i.onMouseEvent(e,t))}mockContextMenuForIPad(){if(!Li())return;const e=new mr(this.element);this.addManagedListener(e,mr.EVENT_LONG_TAP,e=>{const t=this.getRowForEvent(e.touchEvent),i=this.mouseEventService.getRenderedCellForEvent(e.touchEvent);this.handleContextMenuMouseEvent(void 0,e.touchEvent,t,i)}),this.addDestroyFunc(()=>e.destroy())}getRowForEvent(e){let t=e.target;for(;t;){const e=this.gos.getDomData(t,va.DOM_DATA_KEY_ROW_CTRL);if(e)return e;t=t.parentElement}return null}handleContextMenuMouseEvent(e,t,i,n){const s=i?i.getRowNode():null,r=n?n.getColumn():null;let o=null;if(r){const i=e||t;n.dispatchCellContextMenuEvent(null!=i?i:null),o=this.valueService.getValue(r,s)}const a=this.ctrlsService.getGridBodyCtrl(),l=n?n.getGui():a.getGridBodyElement();this.menuService.showContextMenu({mouseEvent:e,touchEvent:t,rowNode:s,column:r,value:o,anchorToElement:l})}getControlsForEventTarget(e){return{cellCtrl:Ze(this.gos,e,ga.DOM_DATA_KEY_CELL_CTRL),rowCtrl:Ze(this.gos,e,va.DOM_DATA_KEY_ROW_CTRL)}}processKeyboardEvent(e,t){const{cellCtrl:i,rowCtrl:n}=this.getControlsForEventTarget(t.target);t.defaultPrevented||(i?this.processCellKeyboardEvent(i,e,t):n&&n.isFullWidth()&&this.processFullWidthRowKeyboardEvent(n,e,t))}processCellKeyboardEvent(e,t,i){const n=e.getRowNode(),s=e.getColumn(),r=e.isEditing();if(Qn(this.gos,i,n,s,r)||"keydown"!==t||(!r&&this.navigationService.handlePageScrollingKey(i)||e.onKeyDown(i),this.doGridOperations(i,e.isEditing()),Zn(i)&&e.processCharacter(i)),"keydown"===t){const t=e.createEvent(i,lt.EVENT_CELL_KEY_DOWN);this.eventService.dispatchEvent(t)}}processFullWidthRowKeyboardEvent(e,t,i){const n=e.getRowNode(),s=this.focusService.getFocusedCell(),r=s&&s.column;if(!Qn(this.gos,i,n,r,!1)){const n=i.key;if("keydown"===t)switch(n){case Xn.PAGE_HOME:case Xn.PAGE_END:case Xn.PAGE_UP:case Xn.PAGE_DOWN:this.navigationService.handlePageScrollingKey(i,!0);break;case Xn.UP:case Xn.DOWN:e.onKeyboardNavigate(i);break;case Xn.TAB:e.onTabKeyDown(i)}}if("keydown"===t){const t=e.createRowEvent(lt.EVENT_CELL_KEY_DOWN,i);this.eventService.dispatchEvent(t)}}doGridOperations(e,t){if(!e.ctrlKey&&!e.metaKey)return;if(t)return;if(!this.mouseEventService.isEventFromThisGrid(e))return;const i=es(e);return i===Xn.A?this.onCtrlAndA(e):i===Xn.C?this.onCtrlAndC(e):i===Xn.D?this.onCtrlAndD(e):i===Xn.V?this.onCtrlAndV(e):i===Xn.X?this.onCtrlAndX(e):i===Xn.Y?this.onCtrlAndY():i===Xn.Z?this.onCtrlAndZ(e):void 0}onCtrlAndA(e){const{pinnedRowModel:t,paginationProxy:i,rangeService:n}=this;if(n&&i.isRowsToRender()){const[e,i]=[t.isEmpty("top"),t.isEmpty("bottom")],s=e?null:"top";let r,o;i?(r=null,o=this.paginationProxy.getRowCount()-1):(r="bottom",o=t.getPinnedBottomRowData().length-1);const a=this.columnModel.getAllDisplayedColumns();if(b(a))return;n.setCellRange({rowStartIndex:0,rowStartPinned:s,rowEndIndex:o,rowEndPinned:r,columnStart:a[0],columnEnd:De(a)})}e.preventDefault()}onCtrlAndC(e){if(!this.clipboardService||this.gos.get("enableCellTextSelection"))return;const{cellCtrl:t,rowCtrl:i}=this.getControlsForEventTarget(e.target);(null==t?void 0:t.isEditing())||(null==i?void 0:i.isEditing())||(e.preventDefault(),this.clipboardService.copyToClipboard())}onCtrlAndX(e){if(!this.clipboardService||this.gos.get("enableCellTextSelection")||this.gos.get("suppressCutToClipboard"))return;const{cellCtrl:t,rowCtrl:i}=this.getControlsForEventTarget(e.target);(null==t?void 0:t.isEditing())||(null==i?void 0:i.isEditing())||(e.preventDefault(),this.clipboardService.cutToClipboard(void 0,"ui"))}onCtrlAndV(e){const{cellCtrl:t,rowCtrl:i}=this.getControlsForEventTarget(e.target);(null==t?void 0:t.isEditing())||(null==i?void 0:i.isEditing())||this.clipboardService&&!this.gos.get("suppressClipboardPaste")&&this.clipboardService.pasteFromClipboard()}onCtrlAndD(e){this.clipboardService&&!this.gos.get("suppressClipboardPaste")&&this.clipboardService.copyRangeDown(),e.preventDefault()}onCtrlAndZ(e){this.gos.get("undoRedoCellEditing")&&(e.preventDefault(),e.shiftKey?this.undoRedoService.redo("ui"):this.undoRedoService.undo("ui"))}onCtrlAndY(){this.undoRedoService.redo("ui")}};g([he("mouseEventService")],ya.prototype,"mouseEventService",2),g([he("valueService")],ya.prototype,"valueService",2),g([he("menuService")],ya.prototype,"menuService",2),g([he("ctrlsService")],ya.prototype,"ctrlsService",2),g([he("navigationService")],ya.prototype,"navigationService",2),g([he("focusService")],ya.prototype,"focusService",2),g([he("undoRedoService")],ya.prototype,"undoRedoService",2),g([he("columnModel")],ya.prototype,"columnModel",2),g([he("paginationProxy")],ya.prototype,"paginationProxy",2),g([he("pinnedRowModel")],ya.prototype,"pinnedRowModel",2),g([de("rangeService")],ya.prototype,"rangeService",2),g([de("clipboardService")],ya.prototype,"clipboardService",2),g([ae],ya.prototype,"postConstruct",1);var Ca=class extends nt{constructor(e){super(),this.centerContainerCtrl=e}postConstruct(){this.ctrlsService.whenReady(e=>{this.gridBodyCtrl=e.gridBodyCtrl,this.listenForResize()}),this.addManagedListener(this.eventService,lt.EVENT_SCROLLBAR_WIDTH_CHANGED,this.onScrollbarWidthChanged.bind(this)),this.addManagedPropertyListeners(["alwaysShowHorizontalScroll","alwaysShowVerticalScroll"],()=>{this.checkViewportAndScrolls()})}listenForResize(){const e=()=>this.onCenterViewportResized();this.centerContainerCtrl.registerViewportResizeListener(e),this.gridBodyCtrl.registerBodyViewportResizeListener(e)}onScrollbarWidthChanged(){this.checkViewportAndScrolls()}onCenterViewportResized(){if(this.centerContainerCtrl.isViewportInTheDOMTree()){this.keepPinnedColumnsNarrowerThanViewport(),this.checkViewportAndScrolls();const e=this.centerContainerCtrl.getCenterWidth();e!==this.centerWidth&&(this.centerWidth=e,this.columnModel.refreshFlexedColumns({viewportWidth:this.centerWidth,updateBodyWidths:!0,fireResizedEvent:!0}))}else this.bodyHeight=0}keepPinnedColumnsNarrowerThanViewport(){const e=un(this.gridBodyCtrl.getBodyViewportElement());if(e<=50)return;let t=this.getPinnedColumnsOverflowingViewport(e-50);const i=this.gos.getCallback("processUnpinnedColumns");t.length&&(i&&(t=i({columns:t,viewportWidth:e})),this.columnModel.setColumnsPinned(t,null,"viewportSizeFeature"))}getPinnedColumnsOverflowingViewport(e){const t=this.pinnedWidthService.getPinnedRightWidth()+this.pinnedWidthService.getPinnedLeftWidth();if(t<e)return[];const i=[...this.columnModel.getDisplayedLeftColumns()],n=[...this.columnModel.getDisplayedRightColumns()];let s=0,r=0;const o=[];let a=t-0-e;for(;(r<i.length||s<n.length)&&a>0;){if(s<n.length){const e=n[s++];a-=e.getActualWidth(),o.push(e)}if(r<i.length&&a>0){const e=i[r++];a-=e.getActualWidth(),o.push(e)}}return o}checkViewportAndScrolls(){this.updateScrollVisibleService(),this.checkBodyHeight(),this.onHorizontalViewportChanged(),this.gridBodyCtrl.getScrollFeature().checkScrollLeft()}getBodyHeight(){return this.bodyHeight}checkBodyHeight(){const e=dn(this.gridBodyCtrl.getBodyViewportElement());if(this.bodyHeight!==e){this.bodyHeight=e;const t={type:lt.EVENT_BODY_HEIGHT_CHANGED};this.eventService.dispatchEvent(t)}}updateScrollVisibleService(){this.updateScrollVisibleServiceImpl(),setTimeout(this.updateScrollVisibleServiceImpl.bind(this),500)}updateScrollVisibleServiceImpl(){const e={horizontalScrollShowing:this.isHorizontalScrollShowing(),verticalScrollShowing:this.gridBodyCtrl.isVerticalScrollShowing()};this.scrollVisibleService.setScrollsVisible(e)}isHorizontalScrollShowing(){return this.centerContainerCtrl.isHorizontalScrollShowing()}onHorizontalViewportChanged(){const e=this.centerContainerCtrl.getCenterWidth(),t=this.centerContainerCtrl.getViewportScrollLeft();this.columnModel.setViewportPosition(e,t)}};g([he("ctrlsService")],Ca.prototype,"ctrlsService",2),g([he("pinnedWidthService")],Ca.prototype,"pinnedWidthService",2),g([he("columnModel")],Ca.prototype,"columnModel",2),g([he("scrollVisibleService")],Ca.prototype,"scrollVisibleService",2),g([ae],Ca.prototype,"postConstruct",1);var ba=class extends nt{constructor(e){super(),this.element=e}postConstruct(){this.addManagedListener(this.eventService,lt.EVENT_LEFT_PINNED_WIDTH_CHANGED,this.onPinnedLeftWidthChanged.bind(this))}onPinnedLeftWidthChanged(){const e=this.pinnedWidthService.getPinnedLeftWidth(),t=e>0;on(this.element,t),Ln(this.element,e)}getWidth(){return this.pinnedWidthService.getPinnedLeftWidth()}};g([he("pinnedWidthService")],ba.prototype,"pinnedWidthService",2),g([ae],ba.prototype,"postConstruct",1);var Sa=class extends nt{constructor(e){super(),this.element=e}postConstruct(){this.addManagedListener(this.eventService,lt.EVENT_RIGHT_PINNED_WIDTH_CHANGED,this.onPinnedRightWidthChanged.bind(this))}onPinnedRightWidthChanged(){const e=this.pinnedWidthService.getPinnedRightWidth(),t=e>0;on(this.element,t),Ln(this.element,e)}getWidth(){return this.pinnedWidthService.getPinnedRightWidth()}};g([he("pinnedWidthService")],Sa.prototype,"pinnedWidthService",2),g([ae],Sa.prototype,"postConstruct",1);var wa=class extends nt{constructor(e,t){super(),this.eContainer=e,this.eViewport=t}postConstruct(){this.addManagedListener(this.eventService,lt.EVENT_ROW_CONTAINER_HEIGHT_CHANGED,this.onHeightChanged.bind(this))}onHeightChanged(){const e=this.maxDivHeightScaler.getUiContainerHeight(),t=null!=e?`${e}px`:"";this.eContainer.style.height=t,this.eViewport&&(this.eViewport.style.height=t)}};g([he("rowContainerHeightService")],wa.prototype,"maxDivHeightScaler",2),g([ae],wa.prototype,"postConstruct",1);var xa=class extends nt{constructor(e){super(),this.eContainer=e}postConstruct(){this.rangeService&&(this.params={eElement:this.eContainer,onDragStart:this.rangeService.onDragStart.bind(this.rangeService),onDragStop:this.rangeService.onDragStop.bind(this.rangeService),onDragging:this.rangeService.onDragging.bind(this.rangeService)},this.addManagedPropertyListener("enableRangeSelection",e=>{e.currentValue?this.enableFeature():this.disableFeature()}),this.addDestroyFunc(()=>this.disableFeature()),this.gos.get("enableRangeSelection")&&this.enableFeature())}enableFeature(){this.dragService.addDragSource(this.params)}disableFeature(){this.dragService.removeDragSource(this.params)}};g([he("dragService")],xa.prototype,"dragService",2),g([de("rangeService")],xa.prototype,"rangeService",2),g([ae],xa.prototype,"postConstruct",1);var Ea=class extends nt{constructor(e,t=!1){super(),this.callback=e,this.addSpacer=t}postConstruct(){const e=this.setWidth.bind(this);this.addManagedPropertyListener("domLayout",e),this.addManagedListener(this.eventService,lt.EVENT_COLUMN_CONTAINER_WIDTH_CHANGED,e),this.addManagedListener(this.eventService,lt.EVENT_DISPLAYED_COLUMNS_CHANGED,e),this.addManagedListener(this.eventService,lt.EVENT_LEFT_PINNED_WIDTH_CHANGED,e),this.addSpacer&&(this.addManagedListener(this.eventService,lt.EVENT_RIGHT_PINNED_WIDTH_CHANGED,e),this.addManagedListener(this.eventService,lt.EVENT_SCROLL_VISIBILITY_CHANGED,e),this.addManagedListener(this.eventService,lt.EVENT_SCROLLBAR_WIDTH_CHANGED,e)),this.setWidth()}setWidth(){const{columnModel:e}=this,t=this.gos.isDomLayout("print"),i=e.getBodyContainerWidth(),n=e.getDisplayedColumnsLeftWidth(),s=e.getDisplayedColumnsRightWidth();let r;t?r=i+n+s:(r=i,this.addSpacer&&0===(this.gos.get("enableRtl")?n:s)&&this.scrollVisibleService.isVerticalScrollShowing()&&(r+=this.gos.getScrollbarWidth())),this.callback(r)}};g([he("columnModel")],Ea.prototype,"columnModel",2),g([he("scrollVisibleService")],Ea.prototype,"scrollVisibleService",2),g([ae],Ea.prototype,"postConstruct",1);var Ma=(e=>(e.LEFT="left",e.RIGHT="right",e.CENTER="center",e.FULL_WIDTH="fullWidth",e.TOP_LEFT="topLeft",e.TOP_RIGHT="topRight",e.TOP_CENTER="topCenter",e.TOP_FULL_WIDTH="topFullWidth",e.STICKY_TOP_LEFT="stickyTopLeft",e.STICKY_TOP_RIGHT="stickyTopRight",e.STICKY_TOP_CENTER="stickyTopCenter",e.STICKY_TOP_FULL_WIDTH="stickyTopFullWidth",e.STICKY_BOTTOM_LEFT="stickyBottomLeft",e.STICKY_BOTTOM_RIGHT="stickyBottomRight",e.STICKY_BOTTOM_CENTER="stickyBottomCenter",e.STICKY_BOTTOM_FULL_WIDTH="stickyBottomFullWidth",e.BOTTOM_LEFT="bottomLeft",e.BOTTOM_RIGHT="bottomRight",e.BOTTOM_CENTER="bottomCenter",e.BOTTOM_FULL_WIDTH="bottomFullWidth",e))(Ma||{}),Aa=(e=>(e.LEFT="left",e.RIGHT="right",e.CENTER="center",e.FULL_WIDTH="fullWidth",e))(Aa||{});function Ta(e){switch(e){case"center":case"topCenter":case"stickyTopCenter":case"bottomCenter":case"stickyBottomCenter":return"center";case"left":case"topLeft":case"stickyTopLeft":case"bottomLeft":case"stickyBottomLeft":return"left";case"right":case"topRight":case"stickyTopRight":case"bottomRight":case"stickyBottomRight":return"right";case"fullWidth":case"topFullWidth":case"stickyTopFullWidth":case"bottomFullWidth":case"stickyBottomFullWidth":return"fullWidth";default:throw Error("Invalid Row Container Type")}}var Da=wt([["center","ag-center-cols-container"],["left","ag-pinned-left-cols-container"],["right","ag-pinned-right-cols-container"],["fullWidth","ag-full-width-container"],["topCenter","ag-floating-top-container"],["topLeft","ag-pinned-left-floating-top"],["topRight","ag-pinned-right-floating-top"],["topFullWidth","ag-floating-top-full-width-container"],["stickyTopCenter","ag-sticky-top-container"],["stickyTopLeft","ag-pinned-left-sticky-top"],["stickyTopRight","ag-pinned-right-sticky-top"],["stickyTopFullWidth","ag-sticky-top-full-width-container"],["stickyBottomCenter","ag-sticky-bottom-container"],["stickyBottomLeft","ag-pinned-left-sticky-bottom"],["stickyBottomRight","ag-pinned-right-sticky-bottom"],["stickyBottomFullWidth","ag-sticky-bottom-full-width-container"],["bottomCenter","ag-floating-bottom-container"],["bottomLeft","ag-pinned-left-floating-bottom"],["bottomRight","ag-pinned-right-floating-bottom"],["bottomFullWidth","ag-floating-bottom-full-width-container"]]),Ia=wt([["center","ag-center-cols-viewport"],["topCenter","ag-floating-top-viewport"],["stickyTopCenter","ag-sticky-top-viewport"],["bottomCenter","ag-floating-bottom-viewport"],["stickyBottomCenter","ag-sticky-bottom-viewport"]]),Ra=class e extends nt{constructor(e){super(),this.visible=!0,this.EMPTY_CTRLS=[],this.name=e,this.isFullWithContainer="topFullWidth"===this.name||"stickyTopFullWidth"===this.name||"stickyBottomFullWidth"===this.name||"bottomFullWidth"===this.name||"fullWidth"===this.name}static getRowContainerCssClasses(e){return{container:Da.get(e),viewport:Ia.get(e)}}static getPinned(e){switch(e){case"bottomLeft":case"topLeft":case"stickyTopLeft":case"stickyBottomLeft":case"left":return"left";case"bottomRight":case"topRight":case"stickyTopRight":case"stickyBottomRight":case"right":return"right";default:return null}}postConstruct(){this.enableRtl=this.gos.get("enableRtl"),this.forContainers(["center"],()=>this.viewportSizeFeature=this.createManagedBean(new Ca(this)))}registerWithCtrlsService(){switch(this.name){case"fullWidth":case"topFullWidth":case"stickyTopFullWidth":case"bottomFullWidth":case"stickyBottomFullWidth":return;default:this.ctrlsService.register(this.name,this)}}forContainers(e,t){e.indexOf(this.name)>=0&&t()}getContainerElement(){return this.eContainer}getViewportSizeFeature(){return this.viewportSizeFeature}setComp(e,t,i){this.comp=e,this.eContainer=t,this.eViewport=i,this.createManagedBean(new ya(this.eContainer)),this.addPreventScrollWhileDragging(),this.listenOnDomOrder(),this.stopHScrollOnPinnedRows();this.forContainers(["left","bottomLeft","topLeft","stickyTopLeft","stickyBottomLeft"],()=>{this.pinnedWidthFeature=this.createManagedBean(new ba(this.eContainer)),this.addManagedListener(this.eventService,lt.EVENT_LEFT_PINNED_WIDTH_CHANGED,()=>this.onPinnedWidthChanged())}),this.forContainers(["right","bottomRight","topRight","stickyTopRight","stickyBottomRight"],()=>{this.pinnedWidthFeature=this.createManagedBean(new Sa(this.eContainer)),this.addManagedListener(this.eventService,lt.EVENT_RIGHT_PINNED_WIDTH_CHANGED,()=>this.onPinnedWidthChanged())}),this.forContainers(["center","left","right","fullWidth"],()=>this.createManagedBean(new wa(this.eContainer,"center"===this.name?i:void 0))),this.forContainers(["topCenter","topLeft","topRight","bottomCenter","bottomLeft","bottomRight","center","left","right","stickyTopCenter","stickyTopLeft","stickyTopRight","stickyBottomCenter","stickyBottomLeft","stickyBottomRight"],()=>this.createManagedBean(new xa(this.eContainer))),this.forContainers(["center","topCenter","stickyTopCenter","bottomCenter","stickyBottomCenter"],()=>this.createManagedBean(new Ea(e=>this.comp.setContainerWidth(`${e}px`)))),this.addListeners(),this.registerWithCtrlsService()}addListeners(){this.addManagedListener(this.eventService,lt.EVENT_DISPLAYED_COLUMNS_CHANGED,()=>this.onDisplayedColumnsChanged()),this.addManagedListener(this.eventService,lt.EVENT_DISPLAYED_COLUMNS_WIDTH_CHANGED,()=>this.onDisplayedColumnsWidthChanged()),this.addManagedListener(this.eventService,lt.EVENT_DISPLAYED_ROWS_CHANGED,e=>this.onDisplayedRowsChanged(e.afterScroll)),this.onDisplayedColumnsChanged(),this.onDisplayedColumnsWidthChanged(),this.onDisplayedRowsChanged()}listenOnDomOrder(){if(["stickyTopCenter","stickyTopLeft","stickyTopRight","stickyTopFullWidth","stickyBottomCenter","stickyBottomLeft","stickyBottomRight","stickyBottomFullWidth"].indexOf(this.name)>=0)return void this.comp.setDomOrder(!0);const e=()=>{const e=this.gos.get("ensureDomOrder"),t=this.gos.isDomLayout("print");this.comp.setDomOrder(e||t)};this.addManagedPropertyListener("domLayout",e),e()}stopHScrollOnPinnedRows(){this.forContainers(["topCenter","stickyTopCenter","bottomCenter","stickyBottomCenter"],()=>{this.addManagedListener(this.eViewport,"scroll",()=>this.eViewport.scrollLeft=0)})}onDisplayedColumnsChanged(){this.forContainers(["center"],()=>this.onHorizontalViewportChanged())}onDisplayedColumnsWidthChanged(){this.forContainers(["center"],()=>this.onHorizontalViewportChanged())}addPreventScrollWhileDragging(){const e=e=>{this.dragService.isDragging()&&e.cancelable&&e.preventDefault()};this.eContainer.addEventListener("touchmove",e,{passive:!1}),this.addDestroyFunc(()=>this.eContainer.removeEventListener("touchmove",e))}onHorizontalViewportChanged(e=!1){const t=this.getCenterWidth(),i=this.getCenterViewportScrollLeft();this.columnModel.setViewportPosition(t,i,e)}getCenterWidth(){return un(this.eViewport)}getCenterViewportScrollLeft(){return vn(this.eViewport,this.enableRtl)}registerViewportResizeListener(e){const t=this.resizeObserverService.observeResize(this.eViewport,e);this.addDestroyFunc(()=>t())}isViewportInTheDOMTree(){return Sn(this.eViewport)}getViewportScrollLeft(){return vn(this.eViewport,this.enableRtl)}isHorizontalScrollShowing(){return this.gos.get("alwaysShowHorizontalScroll")||Dn(this.eViewport)}getViewportElement(){return this.eViewport}setContainerTranslateX(e){this.eContainer.style.transform=`translateX(${e}px)`}getHScrollPosition(){return{left:this.eViewport.scrollLeft,right:this.eViewport.scrollLeft+this.eViewport.offsetWidth}}setCenterViewportScrollLeft(e){yn(this.eViewport,e,this.enableRtl)}isContainerVisible(){return!e.getPinned(this.name)||!!this.pinnedWidthFeature&&this.pinnedWidthFeature.getWidth()>0}onPinnedWidthChanged(){const e=this.isContainerVisible();this.visible!=e&&(this.visible=e,this.onDisplayedRowsChanged())}onDisplayedRowsChanged(e=!1){const t=this.getRowCtrls();if(!this.visible||0===t.length)return void this.comp.setRowCtrls({rowCtrls:this.EMPTY_CTRLS});const i=this.gos.isDomLayout("print"),n=this.gos.get("embedFullWidthRows")||i,s=t.filter(e=>{const t=e.isFullWidth();return this.isFullWithContainer?!n&&t:n||!t});this.comp.setRowCtrls({rowCtrls:s,useFlushSync:e})}getRowCtrls(){switch(this.name){case"topCenter":case"topLeft":case"topRight":case"topFullWidth":return this.rowRenderer.getTopRowCtrls();case"stickyTopCenter":case"stickyTopLeft":case"stickyTopRight":case"stickyTopFullWidth":return this.rowRenderer.getStickyTopRowCtrls();case"stickyBottomCenter":case"stickyBottomLeft":case"stickyBottomRight":case"stickyBottomFullWidth":return this.rowRenderer.getStickyBottomRowCtrls();case"bottomCenter":case"bottomLeft":case"bottomRight":case"bottomFullWidth":return this.rowRenderer.getBottomRowCtrls();default:return this.rowRenderer.getCentreRowCtrls()}}};g([he("dragService")],Ra.prototype,"dragService",2),g([he("ctrlsService")],Ra.prototype,"ctrlsService",2),g([he("columnModel")],Ra.prototype,"columnModel",2),g([he("resizeObserverService")],Ra.prototype,"resizeObserverService",2),g([he("rowRenderer")],Ra.prototype,"rowRenderer",2),g([ae],Ra.prototype,"postConstruct",1);var La=Ra,ka=class extends Cs{constructor(){super('<div class="ag-root ag-unselectable" role="treegrid">\n        <ag-header-root ref="gridHeader"></ag-header-root>\n        <div class="ag-floating-top" ref="eTop" role="presentation">\n            <ag-row-container ref="topLeftContainer" name="topLeft"></ag-row-container>\n            <ag-row-container ref="topCenterContainer" name="topCenter"></ag-row-container>\n            <ag-row-container ref="topRightContainer" name="topRight"></ag-row-container>\n            <ag-row-container ref="topFullWidthContainer" name="topFullWidth"></ag-row-container>\n        </div>\n        <div class="ag-body" ref="eBody" role="presentation">\n            <div class="ag-body-viewport" ref="eBodyViewport" role="presentation">\n                <ag-row-container ref="leftContainer" name="left"></ag-row-container>\n                <ag-row-container ref="centerContainer" name="center"></ag-row-container>\n                <ag-row-container ref="rightContainer" name="right"></ag-row-container>\n                <ag-row-container ref="fullWidthContainer" name="fullWidth"></ag-row-container>\n            </div>\n            <ag-fake-vertical-scroll></ag-fake-vertical-scroll>\n        </div>\n        <div class="ag-sticky-top" ref="eStickyTop" role="presentation">\n            <ag-row-container ref="stickyTopLeftContainer" name="stickyTopLeft"></ag-row-container>\n            <ag-row-container ref="stickyTopCenterContainer" name="stickyTopCenter"></ag-row-container>\n            <ag-row-container ref="stickyTopRightContainer" name="stickyTopRight"></ag-row-container>\n            <ag-row-container ref="stickyTopFullWidthContainer" name="stickyTopFullWidth"></ag-row-container>\n        </div>\n        <div class="ag-sticky-bottom" ref="eStickyBottom" role="presentation">\n            <ag-row-container ref="stickyBottomLeftContainer" name="stickyBottomLeft"></ag-row-container>\n            <ag-row-container ref="stickyBottomCenterContainer" name="stickyBottomCenter"></ag-row-container>\n            <ag-row-container ref="stickyBottomRightContainer" name="stickyBottomRight"></ag-row-container>\n            <ag-row-container ref="stickyBottomFullWidthContainer" name="stickyBottomFullWidth"></ag-row-container>\n        </div>\n        <div class="ag-floating-bottom" ref="eBottom" role="presentation">\n            <ag-row-container ref="bottomLeftContainer" name="bottomLeft"></ag-row-container>\n            <ag-row-container ref="bottomCenterContainer" name="bottomCenter"></ag-row-container>\n            <ag-row-container ref="bottomRightContainer" name="bottomRight"></ag-row-container>\n            <ag-row-container ref="bottomFullWidthContainer" name="bottomFullWidth"></ag-row-container>\n        </div>\n        <ag-fake-horizontal-scroll></ag-fake-horizontal-scroll>\n        <ag-overlay-wrapper></ag-overlay-wrapper>\n    </div>')}init(){const e=(e,t)=>{const i=`${e}px`;t.style.minHeight=i,t.style.height=i},t={setRowAnimationCssOnBodyViewport:(e,t)=>this.setRowAnimationCssOnBodyViewport(e,t),setColumnCount:e=>li(this.getGui(),e),setRowCount:e=>oi(this.getGui(),e),setTopHeight:t=>e(t,this.eTop),setBottomHeight:t=>e(t,this.eBottom),setTopDisplay:e=>this.eTop.style.display=e,setBottomDisplay:e=>this.eBottom.style.display=e,setStickyTopHeight:e=>this.eStickyTop.style.height=e,setStickyTopTop:e=>this.eStickyTop.style.top=e,setStickyTopWidth:e=>this.eStickyTop.style.width=e,setStickyBottomHeight:e=>this.eStickyBottom.style.height=e,setStickyBottomBottom:e=>this.eStickyBottom.style.bottom=e,setStickyBottomWidth:e=>this.eStickyBottom.style.width=e,setColumnMovingCss:(e,t)=>this.addOrRemoveCssClass(e,t),updateLayoutClasses:(e,t)=>{[this.eBodyViewport.classList,this.eBody.classList].forEach(e=>{e.toggle("ag-layout-auto-height",t.autoHeight),e.toggle("ag-layout-normal",t.normal),e.toggle("ag-layout-print",t.print)}),this.addOrRemoveCssClass("ag-layout-auto-height",t.autoHeight),this.addOrRemoveCssClass("ag-layout-normal",t.normal),this.addOrRemoveCssClass("ag-layout-print",t.print)},setAlwaysVerticalScrollClass:(e,t)=>this.eBodyViewport.classList.toggle(Jo,t),registerBodyViewportResizeListener:e=>{const t=this.resizeObserverService.observeResize(this.eBodyViewport,e);this.addDestroyFunc(()=>t())},setPinnedTopBottomOverflowY:e=>this.eTop.style.overflowY=this.eBottom.style.overflowY=e,setCellSelectableCss:(e,t)=>{[this.eTop,this.eBodyViewport,this.eBottom].forEach(i=>i.classList.toggle(e,t))},setBodyViewportWidth:e=>this.eBodyViewport.style.width=e};this.ctrl=this.createManagedBean(new ea),this.ctrl.setComp(t,this.getGui(),this.eBodyViewport,this.eTop,this.eBottom,this.eStickyTop,this.eStickyBottom),(this.rangeService&&this.gos.get("enableRangeSelection")||"multiple"===this.gos.get("rowSelection"))&&ri(this.getGui(),!0)}setRowAnimationCssOnBodyViewport(e,t){const i=this.eBodyViewport.classList;i.toggle("ag-row-animation",t),i.toggle("ag-row-no-animation",!t)}getFloatingTopBottom(){return[this.eTop,this.eBottom]}};g([he("resizeObserverService")],ka.prototype,"resizeObserverService",2),g([de("rangeService")],ka.prototype,"rangeService",2),g([Ss("eBodyViewport")],ka.prototype,"eBodyViewport",2),g([Ss("eStickyTop")],ka.prototype,"eStickyTop",2),g([Ss("eStickyBottom")],ka.prototype,"eStickyBottom",2),g([Ss("eTop")],ka.prototype,"eTop",2),g([Ss("eBottom")],ka.prototype,"eBottom",2),g([Ss("gridHeader")],ka.prototype,"headerRootComp",2),g([Ss("eBody")],ka.prototype,"eBody",2),g([ae],ka.prototype,"init",1);var Pa=class extends nt{postConstruct(){this.addManagedListener(this.eventService,lt.EVENT_DISPLAYED_COLUMNS_CHANGED,this.onDisplayedColumnsChanged.bind(this)),this.addManagedListener(this.eventService,lt.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.get("center");if(!e||this.columnAnimationService.isActive())return;const t={horizontalScrollShowing:e.isHorizontalScrollShowing(),verticalScrollShowing:this.isVerticalScrollShowing()};this.setScrollsVisible(t)}setScrollsVisible(e){if(this.horizontalScrollShowing!==e.horizontalScrollShowing||this.verticalScrollShowing!==e.verticalScrollShowing){this.horizontalScrollShowing=e.horizontalScrollShowing,this.verticalScrollShowing=e.verticalScrollShowing;const t={type:lt.EVENT_SCROLL_VISIBILITY_CHANGED};this.eventService.dispatchEvent(t)}}isHorizontalScrollShowing(){return this.horizontalScrollShowing}isVerticalScrollShowing(){return this.verticalScrollShowing}};g([he("ctrlsService")],Pa.prototype,"ctrlsService",2),g([he("columnAnimationService")],Pa.prototype,"columnAnimationService",2),g([ae],Pa.prototype,"postConstruct",1),Pa=g([ce("scrollVisibleService")],Pa);var Na=class extends nt{constructor(){super(...arguments),this.gridInstanceId=Na.gridInstanceSequence.next()}stampTopLevelGridCompWithGridInstance(e){e[Na.GRID_DOM_KEY]=this.gridInstanceId}getRenderedCellForEvent(e){return Ze(this.gos,e.target,ga.DOM_DATA_KEY_CELL_CTRL)}isEventFromThisGrid(e){return this.isElementInThisGrid(e.target)}isElementInThisGrid(e){let t=e;for(;t;){const e=t[Na.GRID_DOM_KEY];if(y(e))return e===this.gridInstanceId;t=t.parentElement}return!1}getCellPositionForEvent(e){const t=this.getRenderedCellForEvent(e);return t?t.getCellPosition():null}getNormalisedPosition(e){const t=this.gos.isDomLayout("normal"),i=e;let n,s;if(null!=i.clientX||null!=i.clientY?(n=i.clientX,s=i.clientY):(n=i.x,s=i.y),t){const e=this.ctrlsService.getGridBodyCtrl(),t=e.getScrollFeature().getVScrollPosition();n+=e.getScrollFeature().getHScrollPosition().left,s+=t.top}return{x:n,y:s}}};Na.gridInstanceSequence=new cs,Na.GRID_DOM_KEY="__ag_grid_instance",g([he("ctrlsService")],Na.prototype,"ctrlsService",2),Na=g([ce("mouseEventService")],Na);var Oa=class extends nt{constructor(){super(),this.onPageDown=Q(this.onPageDown,100),this.onPageUp=Q(this.onPageUp,100)}postConstruct(){this.ctrlsService.whenReady(e=>{this.gridBodyCon=e.gridBodyCtrl})}handlePageScrollingKey(e,t=!1){const i=e.key,n=e.altKey,s=e.ctrlKey||e.metaKey,r=!!this.rangeService&&e.shiftKey,o=this.mouseEventService.getCellPositionForEvent(e);let a=!1;switch(i){case Xn.PAGE_HOME:case Xn.PAGE_END:s||n||(this.onHomeOrEndKey(i),a=!0);break;case Xn.LEFT:case Xn.RIGHT:case Xn.UP:case Xn.DOWN:if(!o)return!1;!s||n||r||(this.onCtrlUpDownLeftRight(i,o),a=!0);break;case Xn.PAGE_DOWN:case Xn.PAGE_UP:s||n||(a=this.handlePageUpDown(i,o,t))}return a&&e.preventDefault(),a}handlePageUpDown(e,t,i){return i&&(t=this.focusService.getFocusedCell()),!!t&&(e===Xn.PAGE_UP?this.onPageUp(t):this.onPageDown(t),!0)}navigateTo(e){var t;const{scrollIndex:i,scrollType:n,scrollColumn:s,focusIndex:r,focusColumn:o}=e;y(s)&&!s.isPinned()&&this.gridBodyCon.getScrollFeature().ensureColumnVisible(s),y(i)&&this.gridBodyCon.getScrollFeature().ensureIndexVisible(i,n),e.isAsync||this.gridBodyCon.getScrollFeature().ensureIndexVisible(r),this.focusService.setFocusedCell({rowIndex:r,column:o,rowPinned:null,forceBrowserFocus:!0}),null==(t=this.rangeService)||t.setRangeToCell({rowIndex:r,rowPinned:null,column:o})}onPageDown(e){const t=this.ctrlsService.getGridBodyCtrl().getScrollFeature().getVScrollPosition(),i=this.getViewportHeight(),n=this.paginationProxy.getPixelOffset(),s=t.top+i,r=this.paginationProxy.getRowIndexAtPixel(s+n);this.columnModel.isAutoRowHeightActive()?this.navigateToNextPageWithAutoHeight(e,r):this.navigateToNextPage(e,r)}onPageUp(e){const t=this.ctrlsService.getGridBodyCtrl().getScrollFeature().getVScrollPosition(),i=this.paginationProxy.getPixelOffset(),n=t.top,s=this.paginationProxy.getRowIndexAtPixel(n+i);this.columnModel.isAutoRowHeightActive()?this.navigateToNextPageWithAutoHeight(e,s,!0):this.navigateToNextPage(e,s,!0)}navigateToNextPage(e,t,i=!1){const n=this.getViewportHeight(),s=this.paginationProxy.getPageFirstRow(),r=this.paginationProxy.getPageLastRow(),o=this.paginationProxy.getPixelOffset(),a=this.paginationProxy.getRow(e.rowIndex),l=i?(null==a?void 0:a.rowHeight)-n-o:n-o,c=(null==a?void 0:a.rowTop)+l;let h,d=this.paginationProxy.getRowIndexAtPixel(c+o);if(d===e.rowIndex){const n=i?-1:1;t=d=e.rowIndex+n}i?(h="bottom",d<s&&(d=s),t<s&&(t=s)):(h="top",d>r&&(d=r),t>r&&(t=r)),this.isRowTallerThanView(d)&&(t=d,h="top"),this.navigateTo({scrollIndex:t,scrollType:h,scrollColumn:null,focusIndex:d,focusColumn:e.column})}navigateToNextPageWithAutoHeight(e,t,i=!1){this.navigateTo({scrollIndex:t,scrollType:i?"bottom":"top",scrollColumn:null,focusIndex:t,focusColumn:e.column}),setTimeout(()=>{const n=this.getNextFocusIndexForAutoHeight(e,i);this.navigateTo({scrollIndex:t,scrollType:i?"bottom":"top",scrollColumn:null,focusIndex:n,focusColumn:e.column,isAsync:!0})},50)}getNextFocusIndexForAutoHeight(e,t=!1){var i;const n=t?-1:1,s=this.getViewportHeight(),r=this.paginationProxy.getPageLastRow();let o=0,a=e.rowIndex;for(;a>=0&&a<=r;){const e=this.paginationProxy.getRow(a);if(e){const t=null!=(i=e.rowHeight)?i:0;if(o+t>s)break;o+=t}a+=n}return Math.max(0,Math.min(a,r))}getViewportHeight(){const{gridBodyCtrl:e,center:t}=this.ctrlsService.getParams(),i=e.getScrollFeature().getVScrollPosition(),n=this.gos.getScrollbarWidth();let s=i.bottom-i.top;return t.isHorizontalScrollShowing()&&(s-=n),s}isRowTallerThanView(e){const t=this.paginationProxy.getRow(e);if(!t)return!1;const i=t.rowHeight;return"number"==typeof i&&i>this.getViewportHeight()}onCtrlUpDownLeftRight(e,t){const i=this.cellNavigationService.getNextCellToFocus(e,t,!0),{rowIndex:n,column:s}=i;this.navigateTo({scrollIndex:n,scrollType:null,scrollColumn:s,focusIndex:n,focusColumn:s})}onHomeOrEndKey(e){const t=e===Xn.PAGE_HOME,i=this.columnModel.getAllDisplayedColumns(),n=t?i[0]:De(i),s=t?this.paginationProxy.getPageFirstRow():this.paginationProxy.getPageLastRow();this.navigateTo({scrollIndex:s,scrollType:null,scrollColumn:n,focusIndex:s,focusColumn:n})}onTabKeyDown(e,t){const i=t.shiftKey,n=this.tabToNextCellCommon(e,i,t);if(!1===n)if(i){const{rowIndex:i,rowPinned:n}=e.getRowPosition();(n?0===i:i===this.paginationProxy.getPageFirstRow())&&(0===this.gos.get("headerHeight")||this.gos.get("suppressHeaderFocus")?this.focusService.focusNextGridCoreContainer(!0,!0):(t.preventDefault(),this.focusService.focusPreviousFromFirstCell(t)))}else e instanceof ga&&e.focusCell(!0),this.focusService.focusNextGridCoreContainer(i)&&t.preventDefault();else n&&t.preventDefault()}tabToNextCell(e,t){const i=this.focusService.getFocusedCell();if(!i)return!1;let n=this.getCellByPosition(i);return!!(n||(n=this.rowRenderer.getRowByPosition(i),n&&n.isFullWidth()))&&!!this.tabToNextCellCommon(n,e,t)}tabToNextCellCommon(e,t,i){let n,s=e.isEditing();if(!s&&e instanceof ga){const t=e.getRowCtrl();t&&(s=t.isEditing())}return n=s?"fullRow"===this.gos.get("editType")?this.moveToNextEditingRow(e,t,i):this.moveToNextEditingCell(e,t,i):this.moveToNextCellNotEditing(e,t),null===n?n:n||!!this.focusService.getFocusedHeader()}moveToNextEditingCell(e,t,i=null){const n=e.getCellPosition();e.getGui().focus(),e.stopEditing();const s=this.findNextCellToFocusOn(n,t,!0);return!1===s?null:null!=s&&(s.startEditing(null,!0,i),s.focusCell(!1),!0)}moveToNextEditingRow(e,t,i=null){const n=e.getCellPosition(),s=this.findNextCellToFocusOn(n,t,!0);if(!1===s)return null;if(null==s)return!1;const r=s.getCellPosition(),o=this.isCellEditable(n),a=this.isCellEditable(r),l=r&&n.rowIndex===r.rowIndex&&n.rowPinned===r.rowPinned;return o&&e.setFocusOutOnEditor(),l||(e.getRowCtrl().stopEditing(),s.getRowCtrl().startRowEditing(void 0,void 0,i)),a?(s.setFocusInOnEditor(),s.focusCell()):s.focusCell(!0),!0}moveToNextCellNotEditing(e,t){const i=this.columnModel.getAllDisplayedColumns();let n;n=e instanceof va?u(d({},e.getRowPosition()),{column:t?i[0]:De(i)}):e.getCellPosition();const s=this.findNextCellToFocusOn(n,t,!1);if(!1===s)return null;if(s instanceof ga)s.focusCell(!0);else if(s)return this.tryToFocusFullWidthRow(s.getRowPosition(),t);return y(s)}findNextCellToFocusOn(e,t,i){var n;let s=e;for(;;){e!==s&&(e=s),t||(s=this.getLastCellOfColSpan(s)),s=this.cellNavigationService.getNextTabbedCell(s,t);const r=this.gos.getCallback("tabToNextCell");if(y(r)){const n=r({backwards:t,editing:i,previousCellPosition:e,nextCellPosition:s||null});if(!0===n||null===n)null===n&&z("Returning `null` from tabToNextCell is deprecated. Return `true` to stay on the current cell, or `false` to let the browser handle the tab behaviour."),s=e;else{if(!1===n)return!1;n.floating&&(z("tabToNextCellFunc return type should have attributes: rowIndex, rowPinned, column. However you had 'floating', maybe you meant 'rowPinned'?"),n.rowPinned=n.floating),s={rowIndex:n.rowIndex,column:n.column,rowPinned:n.rowPinned}}}if(!s)return null;if(s.rowIndex<0){const e=this.headerNavigationService.getHeaderRowCount();return this.focusService.focusHeaderPosition({headerPosition:{headerRowIndex:e+s.rowIndex,column:s.column},fromCell:!0}),null}const o="fullRow"===this.gos.get("editType");if(i&&!o&&!this.isCellEditable(s))continue;this.ensureCellVisible(s);const a=this.getCellByPosition(s);if(!a){const e=this.rowRenderer.getRowByPosition(s);if(!e||!e.isFullWidth()||i)continue;return e}if(!a.isSuppressNavigable())return null==(n=this.rangeService)||n.setRangeToCell(s),a}}isCellEditable(e){const t=this.lookupRowNodeForCell(e);return!!t&&e.column.isCellEditable(t)}getCellByPosition(e){const t=this.rowRenderer.getRowByPosition(e);return t?t.getCellCtrl(e.column):null}lookupRowNodeForCell(e){return"top"===e.rowPinned?this.pinnedRowModel.getPinnedTopRow(e.rowIndex):"bottom"===e.rowPinned?this.pinnedRowModel.getPinnedBottomRow(e.rowIndex):this.paginationProxy.getRow(e.rowIndex)}navigateToNextCell(e,t,i,n){let s=i,r=!1;for(;s&&(s===i||!this.isValidNavigateCell(s));)this.gos.get("enableRtl")?t===Xn.LEFT&&(s=this.getLastCellOfColSpan(s)):t===Xn.RIGHT&&(s=this.getLastCellOfColSpan(s)),s=this.cellNavigationService.getNextCellToFocus(t,s),r=C(s);if(r&&e&&e.key===Xn.UP&&(s={rowIndex:-1,rowPinned:null,column:i.column}),n){const n=this.gos.getCallback("navigateToNextCell");if(y(n)){const r=n({key:t,previousCellPosition:i,nextCellPosition:s||null,event:e});y(r)?(r.floating&&(z("tabToNextCellFunc return type should have attributes: rowIndex, rowPinned, column. However you had 'floating', maybe you meant 'rowPinned'?"),r.rowPinned=r.floating),s={rowPinned:r.rowPinned,rowIndex:r.rowIndex,column:r.column}):s=null}}if(!s)return;if(s.rowIndex<0){const t=this.headerNavigationService.getHeaderRowCount();return void this.focusService.focusHeaderPosition({headerPosition:{headerRowIndex:t+s.rowIndex,column:i.column},event:e||void 0,fromCell:!0})}const o=this.getNormalisedPosition(s);o?this.focusPosition(o):this.tryToFocusFullWidthRow(s)}getNormalisedPosition(e){this.ensureCellVisible(e);const t=this.getCellByPosition(e);return t?(e=t.getCellPosition(),this.ensureCellVisible(e),e):null}tryToFocusFullWidthRow(e,t=!1){const i=this.columnModel.getAllDisplayedColumns(),n=this.rowRenderer.getRowByPosition(e);if(!n||!n.isFullWidth())return!1;const s=this.focusService.getFocusedCell(),r={rowIndex:e.rowIndex,rowPinned:e.rowPinned,column:e.column||(t?De(i):i[0])};this.focusPosition(r);const o=null!=s&&this.rowPositionUtils.before(r,s),a={type:lt.EVENT_FULL_WIDTH_ROW_FOCUSED,rowIndex:r.rowIndex,rowPinned:r.rowPinned,column:r.column,isFullWidthCell:!0,floating:r.rowPinned,fromBelow:o};return this.eventService.dispatchEvent(a),!0}focusPosition(e){var t;this.focusService.setFocusedCell({rowIndex:e.rowIndex,column:e.column,rowPinned:e.rowPinned,forceBrowserFocus:!0}),null==(t=this.rangeService)||t.setRangeToCell(e)}isValidNavigateCell(e){return!!this.rowPositionUtils.getRowNode(e)}getLastCellOfColSpan(e){const t=this.getCellByPosition(e);if(!t)return e;const i=t.getColSpanningList();return 1===i.length?e:{rowIndex:e.rowIndex,column:De(i),rowPinned:e.rowPinned}}ensureCellVisible(e){const t=this.gos.isGroupRowsSticky(),i=this.rowModel.getRow(e.rowIndex);!(t&&(null==i?void 0:i.sticky))&&C(e.rowPinned)&&this.gridBodyCon.getScrollFeature().ensureIndexVisible(e.rowIndex),e.column.isPinned()||this.gridBodyCon.getScrollFeature().ensureColumnVisible(e.column)}};g([he("mouseEventService")],Oa.prototype,"mouseEventService",2),g([he("paginationProxy")],Oa.prototype,"paginationProxy",2),g([he("focusService")],Oa.prototype,"focusService",2),g([he("columnModel")],Oa.prototype,"columnModel",2),g([he("rowModel")],Oa.prototype,"rowModel",2),g([he("ctrlsService")],Oa.prototype,"ctrlsService",2),g([he("rowRenderer")],Oa.prototype,"rowRenderer",2),g([he("headerNavigationService")],Oa.prototype,"headerNavigationService",2),g([he("rowPositionUtils")],Oa.prototype,"rowPositionUtils",2),g([he("cellNavigationService")],Oa.prototype,"cellNavigationService",2),g([he("pinnedRowModel")],Oa.prototype,"pinnedRowModel",2),g([de("rangeService")],Oa.prototype,"rangeService",2),g([ae],Oa.prototype,"postConstruct",1),Oa=g([ce("navigationService")],Oa);var _a=class e extends xr{constructor(e){super('<div class="ag-popup-editor" tabindex="-1"/>'),this.params=e}postConstruct(){this.gos.setDomData(this.getGui(),e.DOM_KEY_POPUP_EDITOR_WRAPPER,!0),this.addKeyDownListener()}addKeyDownListener(){const e=this.getGui(),t=this.params;this.addManagedListener(e,"keydown",e=>{Qn(this.gos,e,t.node,t.column,!0)||t.onKeyDown(e)})}};_a.DOM_KEY_POPUP_EDITOR_WRAPPER="popupEditorWrapper",g([ae],_a.prototype,"postConstruct",1);var Fa=_a,Ga=class extends Cs{constructor(e,t,i,n,s){super(),this.rendererVersion=0,this.editorVersion=0,this.beans=e,this.column=t.getColumn(),this.rowNode=t.getRowNode(),this.rowCtrl=t.getRowCtrl(),this.eRow=n,this.cellCtrl=t;const r=document.createElement("div");r.setAttribute("comp-id",`${this.getCompId()}`),this.setTemplateFromElement(r);const o=this.getGui();this.forceWrapper=t.isForceWrapper(),this.refreshWrapper(!1);const a=(e,t)=>{null!=t&&""!=t?o.setAttribute(e,t):o.removeAttribute(e)};Bt(o,t.getCellAriaRole()),a("col-id",t.getColumnIdSanitised());const l=t.getTabIndex();void 0!==l&&a("tabindex",l.toString());const c={addOrRemoveCssClass:(e,t)=>this.addOrRemoveCssClass(e,t),setUserStyles:e=>Tn(o,e),getFocusableElement:()=>this.getFocusableElement(),setIncludeSelection:e=>this.includeSelection=e,setIncludeRowDrag:e=>this.includeRowDrag=e,setIncludeDndSource:e=>this.includeDndSource=e,setRenderDetails:(e,t,i)=>this.setRenderDetails(e,t,i),setEditDetails:(e,t,i)=>this.setEditDetails(e,t,i),getCellEditor:()=>this.cellEditor||null,getCellRenderer:()=>this.cellRenderer||null,getParentOfValue:()=>this.getParentOfValue()};t.setComp(c,this.getGui(),this.eCellWrapper,i,s)}getParentOfValue(){return this.eCellValue?this.eCellValue:this.eCellWrapper?this.eCellWrapper:this.getGui()}setRenderDetails(e,t,i){if(this.cellEditor&&!this.cellEditorPopupWrapper)return;this.firstRender=null==this.firstRender;const n=this.refreshWrapper(!1);this.refreshEditStyles(!1),e?!i&&!n&&this.refreshCellRenderer(e)||(this.destroyRenderer(),this.createCellRendererInstance(e)):(this.destroyRenderer(),this.insertValueWithoutCellRenderer(t))}setEditDetails(e,t,i){e?this.createCellEditorInstance(e,t,i):this.destroyEditor()}removeControls(){this.checkboxSelectionComp=this.beans.context.destroyBean(this.checkboxSelectionComp),this.dndSourceComp=this.beans.context.destroyBean(this.dndSourceComp),this.rowDraggingComp=this.beans.context.destroyBean(this.rowDraggingComp)}refreshWrapper(e){const t=this.includeRowDrag||this.includeDndSource||this.includeSelection,i=t||this.forceWrapper,n=i&&null==this.eCellWrapper;if(n){const e=document.createElement("div");e.setAttribute("role","presentation"),e.setAttribute("class","ag-cell-wrapper"),this.eCellWrapper=e,this.getGui().appendChild(this.eCellWrapper)}const s=!i&&null!=this.eCellWrapper;s&&(bn(this.eCellWrapper),this.eCellWrapper=void 0),this.addOrRemoveCssClass("ag-cell-value",!i);const r=!e&&i,o=r&&null==this.eCellValue;if(o){const e=document.createElement("span");e.setAttribute("role","presentation"),e.setAttribute("class","ag-cell-value"),this.eCellValue=e,this.eCellWrapper.appendChild(this.eCellValue)}const a=!r&&null!=this.eCellValue;a&&(bn(this.eCellValue),this.eCellValue=void 0);const l=n||s||o||a;return l&&this.removeControls(),e||t&&this.addControls(),l}addControls(){this.includeRowDrag&&null==this.rowDraggingComp&&(this.rowDraggingComp=this.cellCtrl.createRowDragComp(),this.rowDraggingComp&&this.eCellWrapper.insertBefore(this.rowDraggingComp.getGui(),this.eCellValue)),this.includeDndSource&&null==this.dndSourceComp&&(this.dndSourceComp=this.cellCtrl.createDndSource(),this.eCellWrapper.insertBefore(this.dndSourceComp.getGui(),this.eCellValue)),this.includeSelection&&null==this.checkboxSelectionComp&&(this.checkboxSelectionComp=this.cellCtrl.createSelectionCheckbox(),this.eCellWrapper.insertBefore(this.checkboxSelectionComp.getGui(),this.eCellValue))}createCellEditorInstance(e,t,i){const n=this.editorVersion,s=e.newAgStackInstance();if(!s)return;const{params:r}=e;s.then(e=>this.afterCellEditorCreated(n,e,r,t,i)),C(this.cellEditor)&&r.cellStartedEdit&&this.cellCtrl.focusCell(!0)}insertValueWithoutCellRenderer(e){const t=this.getParentOfValue();Cn(t);const i=null!=e?yt(e,!0):null;null!=i&&(t.textContent=i)}destroyEditorAndRenderer(){this.destroyRenderer(),this.destroyEditor()}destroyRenderer(){const{context:e}=this.beans;this.cellRenderer=e.destroyBean(this.cellRenderer),bn(this.cellRendererGui),this.cellRendererGui=null,this.rendererVersion++}destroyEditor(){const{context:e}=this.beans;this.hideEditorPopup&&this.hideEditorPopup(),this.hideEditorPopup=void 0,this.cellEditor=e.destroyBean(this.cellEditor),this.cellEditorPopupWrapper=e.destroyBean(this.cellEditorPopupWrapper),bn(this.cellEditorGui),this.cellEditorGui=null,this.editorVersion++}refreshCellRenderer(e){if(null==this.cellRenderer||null==this.cellRenderer.refresh)return!1;if(this.cellRendererClass!==e.componentClass)return!1;const t=this.cellRenderer.refresh(e.params);return!0===t||void 0===t}createCellRendererInstance(e){const t=!this.beans.gos.get("suppressAnimationFrame"),i=this.rendererVersion,{componentClass:n}=e,s=()=>{if(this.rendererVersion!==i||!this.isAlive())return;const t=e.newAgStackInstance(),s=this.afterCellRendererCreated.bind(this,i,n);t&&t.then(s)};t&&this.firstRender?this.beans.animationFrameService.createTask(s,this.rowNode.rowIndex,"createTasksP2"):s()}getCtrl(){return this.cellCtrl}getRowCtrl(){return this.rowCtrl}getCellRenderer(){return this.cellRenderer}getCellEditor(){return this.cellEditor}afterCellRendererCreated(e,t,i){if(this.isAlive()&&e===this.rendererVersion){if(this.cellRenderer=i,this.cellRendererClass=t,this.cellRendererGui=this.cellRenderer.getGui(),null!=this.cellRendererGui){const e=this.getParentOfValue();Cn(e),e.appendChild(this.cellRendererGui)}}else this.beans.context.destroyBean(i)}afterCellEditorCreated(e,t,i,n,s){if(e!==this.editorVersion)return void this.beans.context.destroyBean(t);if(t.isCancelBeforeStart&&t.isCancelBeforeStart())return this.beans.context.destroyBean(t),void this.cellCtrl.stopEditing(!0);if(!t.getGui)return console.warn(`AG Grid: cellEditor for column ${this.column.getId()} is missing getGui() method`),void this.beans.context.destroyBean(t);this.cellEditor=t,this.cellEditorGui=t.getGui();const r=n||void 0!==t.isPopup&&t.isPopup();r?this.addPopupCellEditor(i,s):this.addInCellEditor(),this.refreshEditStyles(!0,r),t.afterGuiAttached&&t.afterGuiAttached()}refreshEditStyles(e,t){var i;this.addOrRemoveCssClass("ag-cell-inline-editing",e&&!t),this.addOrRemoveCssClass("ag-cell-popup-editing",e&&!!t),this.addOrRemoveCssClass("ag-cell-not-inline-editing",!e||!!t),null==(i=this.rowCtrl)||i.setInlineEditingCss(e)}addInCellEditor(){const e=this.getGui();e.contains(this.beans.gos.getActiveDomElement())&&e.focus(),this.destroyRenderer(),this.refreshWrapper(!0),this.clearParentOfValue(),this.cellEditorGui&&this.getParentOfValue().appendChild(this.cellEditorGui)}addPopupCellEditor(e,t){"fullRow"===this.beans.gos.get("editType")&&console.warn("AG Grid: popup cellEditor does not work with fullRowEdit - you cannot use them both - either turn off fullRowEdit, or stop using popup editors.");const i=this.cellEditor;this.cellEditorPopupWrapper=this.beans.context.createBean(new Fa(e));const n=this.cellEditorPopupWrapper.getGui();this.cellEditorGui&&n.appendChild(this.cellEditorGui);const s=this.beans.popupService,r=this.beans.gos.get("stopEditingWhenCellsLoseFocus"),o=null!=t?t:i.getPopupPosition?i.getPopupPosition():"over",a=this.beans.gos.get("enableRtl"),l={ePopup:n,column:this.column,rowNode:this.rowNode,type:"popupCellEditor",eventSource:this.getGui(),position:o,alignSide:a?"right":"left",keepWithinBounds:!0},c=s.positionPopupByComponent.bind(s,l),h=this.beans.localeService.getLocaleTextFunc(),d=s.addPopup({modal:r,eChild:n,closeOnEsc:!0,closedCallback:()=>{this.cellCtrl.onPopupEditorClosed()},anchorToElement:this.getGui(),positionCallback:c,ariaLabel:h("ariaLabelCellEditor","Cell Editor")});d&&(this.hideEditorPopup=d.hideFunc)}detach(){this.eRow.removeChild(this.getGui())}destroy(){this.cellCtrl.stopEditing(),this.destroyEditorAndRenderer(),this.removeControls(),super.destroy()}clearParentOfValue(){const e=this.getGui();e.contains(this.beans.gos.getActiveDomElement())&&ki()&&e.focus({preventScroll:!0}),Cn(this.getParentOfValue())}},Va=class extends Cs{constructor(e,t,i){super(),this.cellComps={},this.beans=t,this.rowCtrl=e;const n=document.createElement("div");n.setAttribute("comp-id",`${this.getCompId()}`),n.setAttribute("style",this.getInitialStyle(i)),this.setTemplateFromElement(n);const s=this.getGui(),r=s.style;this.domOrder=this.rowCtrl.getDomOrder(),Bt(s,"row");const o=this.rowCtrl.getTabIndex();null!=o&&s.setAttribute("tabindex",o.toString());const a={setDomOrder:e=>this.domOrder=e,setCellCtrls:e=>this.setCellCtrls(e),showFullWidth:e=>this.showFullWidth(e),getFullWidthCellRenderer:()=>this.getFullWidthCellRenderer(),addOrRemoveCssClass:(e,t)=>this.addOrRemoveCssClass(e,t),setUserStyles:e=>Tn(s,e),setTop:e=>r.top=e,setTransform:e=>r.transform=e,setRowIndex:e=>s.setAttribute("row-index",e),setRowId:e=>s.setAttribute("row-id",e),setRowBusinessKey:e=>s.setAttribute("row-business-key",e),refreshFullWidth:e=>this.refreshFullWidth(e)};e.setComp(a,this.getGui(),i),this.addDestroyFunc(()=>{e.unsetComp(i)})}getInitialStyle(e){const t=this.rowCtrl.getInitialTransform(e);return t?`transform: ${t}`:`top: ${this.rowCtrl.getInitialRowTop(e)}`}showFullWidth(e){const t=e.newAgStackInstance();t&&t.then(e=>{if(this.isAlive()){const t=e.getGui();this.getGui().appendChild(t),this.rowCtrl.setupDetailRowAutoHeight(t),this.setFullWidthRowComp(e)}else this.beans.context.destroyBean(e)})}setCellCtrls(e){const t=Object.assign({},this.cellComps);e.forEach(e=>{const i=e.getInstanceId();null==this.cellComps[i]?this.newCellComp(e):t[i]=null});const i=N(t).filter(e=>null!=e);this.destroyCells(i),this.ensureDomOrder(e)}ensureDomOrder(e){if(!this.domOrder)return;const t=[];e.forEach(e=>{const i=this.cellComps[e.getInstanceId()];i&&t.push(i.getGui())}),Mn(this.getGui(),t)}newCellComp(e){const t=new Ga(this.beans,e,this.rowCtrl.isPrintLayout(),this.getGui(),this.rowCtrl.isEditing());this.cellComps[e.getInstanceId()]=t,this.getGui().appendChild(t.getGui())}destroy(){super.destroy(),this.destroyAllCells()}destroyAllCells(){const e=N(this.cellComps).filter(e=>null!=e);this.destroyCells(e)}setFullWidthRowComp(e){this.fullWidthCellRenderer&&console.error("AG Grid - should not be setting fullWidthRowComponent twice"),this.fullWidthCellRenderer=e,this.addDestroyFunc(()=>{this.fullWidthCellRenderer=this.beans.context.destroyBean(this.fullWidthCellRenderer)})}getFullWidthCellRenderer(){return this.fullWidthCellRenderer}destroyCells(e){e.forEach(e=>{if(!e)return;const t=e.getCtrl().getInstanceId();this.cellComps[t]===e&&(e.detach(),e.destroy(),this.cellComps[t]=null)})}refreshFullWidth(e){const{fullWidthCellRenderer:t}=this;if(!t||!t.refresh)return!1;const i=e();return t.refresh(i)}},Ba=class extends Cs{constructor(){super(function(){const e=Cs.elementGettingCreated.getAttribute("name"),t=La.getRowContainerCssClasses(e);let i;return i="center"===e||"topCenter"===e||"stickyTopCenter"===e||"bottomCenter"===e||"stickyBottomCenter"===e?`<div class="${t.viewport}" ref="eViewport" role="presentation">\n                <div class="${t.container}" ref="eContainer"></div>\n            </div>`:`<div class="${t.container}" ref="eContainer"></div>`,i}()),this.rowComps={},this.name=Cs.elementGettingCreated.getAttribute("name"),this.type=Ta(this.name)}postConstruct(){const e={setViewportHeight:e=>this.eViewport.style.height=e,setRowCtrls:({rowCtrls:e})=>this.setRowCtrls(e),setDomOrder:e=>{this.domOrder=e},setContainerWidth:e=>this.eContainer.style.width=e};this.createManagedBean(new La(this.name)).setComp(e,this.eContainer,this.eViewport)}preDestroy(){this.setRowCtrls([])}setRowCtrls(e){const t=d({},this.rowComps);this.rowComps={},this.lastPlacedElement=null,e.forEach(e=>{const i=e.getInstanceId(),n=t[i];if(n)this.rowComps[i]=n,delete t[i],this.ensureDomOrder(n.getGui());else{if(!e.getRowNode().displayed)return;const t=new Va(e,this.beans,this.type);this.rowComps[i]=t,this.appendRow(t.getGui())}}),N(t).forEach(e=>{this.eContainer.removeChild(e.getGui()),e.destroy()}),Bt(this.eContainer,"rowgroup")}appendRow(e){this.domOrder?An(this.eContainer,e,this.lastPlacedElement):this.eContainer.appendChild(e),this.lastPlacedElement=e}ensureDomOrder(e){this.domOrder&&(En(this.eContainer,e,this.lastPlacedElement),this.lastPlacedElement=e)}};g([he("beans")],Ba.prototype,"beans",2),g([Ss("eViewport")],Ba.prototype,"eViewport",2),g([Ss("eContainer")],Ba.prototype,"eContainer",2),g([ae],Ba.prototype,"postConstruct",1),g([le],Ba.prototype,"preDestroy",1);var Ha=class{constructor(e){this.columnsToAggregate=[],this.columnsToGroup=[],this.columnsToPivot=[],this.pinned=e}onDragEnter(e){if(this.clearColumnsList(),this.gos.get("functionsReadOnly"))return;const t=e.dragItem.columns;t&&t.forEach(e=>{e.isPrimary()&&(e.isAnyFunctionActive()||(e.isAllowValue()?this.columnsToAggregate.push(e):e.isAllowRowGroup()?this.columnsToGroup.push(e):e.isAllowPivot()&&this.columnsToPivot.push(e)))})}getIconName(){return this.columnsToAggregate.length+this.columnsToGroup.length+this.columnsToPivot.length>0?this.pinned?Gr.ICON_PINNED:Gr.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")}};g([he("columnModel")],Ha.prototype,"columnModel",2),g([he("gridOptionsService")],Ha.prototype,"gos",2);var za=class{static attemptMoveColumns(e){const{isFromHeader:t,hDirection:i,xPosition:n,fromEnter:s,fakeEvent:r,pinned:o,gos:a,columnModel:l}=e,c=0===i,h=1===i;let{allMovingColumns:d}=e;if(t){let e=[];d.forEach(t=>{var i;let n=null,s=t.getParent();for(;null!=s&&1===s.getDisplayedLeafColumns().length;)n=s,s=s.getParent();null!=n?((null==(i=n.getColGroupDef())?void 0:i.marryChildren)?n.getProvidedColumnGroup().getLeafColumns():n.getLeafColumns()).forEach(t=>{e.includes(t)||e.push(t)}):e.includes(t)||e.push(t)}),d=e}const u=d.slice();l.sortColumnsLikeGridColumns(u);const p=this.calculateValidMoves({movingCols:u,draggingRight:h,xPosition:n,pinned:o,gos:a,columnModel:l}),g=this.calculateOldIndex(u,l);if(0===p.length)return;const f=p[0];let m=null!==g&&!s;if(t&&(m=null!==g),m&&!r){if(c&&f>=g)return;if(h&&f<=g)return}const v=l.getAllDisplayedColumns();let y=[],C=null;for(let e=0;e<p.length;e++){const t=p[e],i=l.getProposedColumnOrder(u,t);if(!l.doesOrderPassRules(i))continue;const n=i.filter(e=>v.includes(e));if(null===C)C=n;else if(!Ie(n,C))break;const s=this.groupFragCount(i);y.push({move:t,fragCount:s})}return 0!==y.length?(y.sort((e,t)=>e.fragCount-t.fragCount),this.moveColumns(d,y[0].move,"uiColumnMoved",!1,l)):void 0}static moveColumns(e,t,i,n,s){return s.moveColumns(e,t,i,n),n?null:{columns:e,toIndex:t}}static calculateOldIndex(e,t){const i=t.getAllGridColumns(),n=Le(e.map(e=>i.indexOf(e))),s=n[0];return De(n)-s!==n.length-1?null:s}static groupFragCount(e){function t(e){let t=[],i=e.getOriginalParent();for(;null!=i;)t.push(i),i=i.getOriginalParent();return t}let i=0;for(let n=0;n<e.length-1;n++){let s=t(e[n]),r=t(e[n+1]);[s,r]=s.length>r.length?[s,r]:[r,s],s.forEach(e=>{-1===r.indexOf(e)&&i++})}return i}static getDisplayedColumns(e,t){switch(t){case"left":return e.getDisplayedLeftColumns();case"right":return e.getDisplayedRightColumns();default:return e.getDisplayedCenterColumns()}}static calculateValidMoves(e){const{movingCols:t,draggingRight:i,xPosition:n,pinned:s,gos:r,columnModel:o}=e;if(r.get("suppressMovableColumns")||t.some(e=>e.getColDef().suppressMovable))return[];const a=this.getDisplayedColumns(o,s),l=o.getAllGridColumns(),c=a.filter(e=>Be(t,e)),h=a.filter(e=>!Be(t,e)),d=l.filter(e=>!Be(t,e));let u,p=0,g=n;if(i){let e=0;c.forEach(t=>e+=t.getActualWidth()),g-=e}if(g>0){for(let e=0;e<h.length&&(g-=h[e].getActualWidth(),!(g<0));e++)p++;i&&p++}if(p>0){const e=h[p-1];u=d.indexOf(e)+1}else u=d.indexOf(h[0]),-1===u&&(u=0);const f=[u],m=(e,t)=>e-t;if(i){let e=u+1;const t=l.length-1;for(;e<=t;)f.push(e),e++;f.sort(m)}else{let e=u;const t=l.length-1;let i=l[e];for(;e<=t&&a.indexOf(i)<0;)e++,f.push(e),i=l[e];e=u-1;const n=0;for(;e>=n;)f.push(e),e--;f.sort(m).reverse()}return f}static normaliseX(e,t,i,n,s){const r=s.getHeaderRowContainerCtrl(t).getViewport();return i&&(e-=r.getBoundingClientRect().left),n.get("enableRtl")&&(e=r.clientWidth-e),null==t&&(e+=s.get("center").getCenterViewportScrollLeft()),e}},Ua=class{constructor(e){this.needToMoveLeft=!1,this.needToMoveRight=!1,this.lastMovedInfo=null,this.pinned=e,this.isCenterContainer=!y(e)}init(){this.ctrlsService.whenReady(e=>{this.gridBodyCon=e.gridBodyCtrl})}getIconName(){return this.pinned?Gr.ICON_PINNED:Gr.ICON_MOVE}onDragEnter(e){const t=e.dragItem.columns;if(0===e.dragSource.type)this.setColumnsVisible(t,!0,"uiColumnDragged");else{const i=e.dragItem.visibleState,n=(t||[]).filter(e=>i[e.getId()]);this.setColumnsVisible(n,!0,"uiColumnDragged")}this.setColumnsPinned(t,this.pinned,"uiColumnDragged"),this.onDragging(e,!0,!0)}onDragLeave(){this.ensureIntervalCleared(),this.lastMovedInfo=null}setColumnsVisible(e,t,i){if(e){const n=e.filter(e=>!e.getColDef().lockVisible);this.columnModel.setColumnsVisible(n,t,i)}}setColumnsPinned(e,t,i){if(e){const n=e.filter(e=>!e.getColDef().lockPinned);this.columnModel.setColumnsPinned(n,t,i)}}onDragStop(){this.onDragging(this.lastDraggingEvent,!1,!0,!0),this.ensureIntervalCleared(),this.lastMovedInfo=null}checkCenterForScrolling(e){if(this.isCenterContainer){const t=this.ctrlsService.get("center"),i=t.getCenterViewportScrollLeft(),n=i+t.getCenterWidth();this.gos.get("enableRtl")?(this.needToMoveRight=e<i+50,this.needToMoveLeft=e>n-50):(this.needToMoveLeft=e<i+50,this.needToMoveRight=e>n-50),this.needToMoveLeft||this.needToMoveRight?this.ensureIntervalStarted():this.ensureIntervalCleared()}}onDragging(e=this.lastDraggingEvent,t=!1,i=!1,n=!1){var s;if(n){if(this.lastMovedInfo){const{columns:e,toIndex:t}=this.lastMovedInfo;za.moveColumns(e,t,"uiColumnMoved",!0,this.columnModel)}return}if(this.lastDraggingEvent=e,C(e.hDirection))return;const r=za.normaliseX(e.x,this.pinned,!1,this.gos,this.ctrlsService);t||this.checkCenterForScrolling(r);const o=this.normaliseDirection(e.hDirection),a=e.dragSource.type,l=(null==(s=e.dragSource.getDragItem().columns)?void 0:s.filter(e=>!e.getColDef().lockPinned||e.getPinned()==this.pinned))||[],c=za.attemptMoveColumns({allMovingColumns:l,isFromHeader:1===a,hDirection:o,xPosition:r,pinned:this.pinned,fromEnter:t,fakeEvent:i,gos:this.gos,columnModel:this.columnModel});c&&(this.lastMovedInfo=c)}normaliseDirection(e){if(!this.gos.get("enableRtl"))return e;switch(e){case 0:return 1;case 1:return 0;default:console.error(`AG Grid: Unknown direction ${e}`)}}ensureIntervalStarted(){this.movingIntervalId||(this.intervalCount=0,this.failedMoveAttempts=0,this.movingIntervalId=window.setInterval(this.moveInterval.bind(this),100),this.needToMoveLeft?this.dragAndDropService.setGhostIcon(Gr.ICON_LEFT,!0):this.dragAndDropService.setGhostIcon(Gr.ICON_RIGHT,!0))}ensureIntervalCleared(){this.movingIntervalId&&(window.clearInterval(this.movingIntervalId),this.movingIntervalId=null,this.dragAndDropService.setGhostIcon(Gr.ICON_MOVE))}moveInterval(){let e;this.intervalCount++,e=10+5*this.intervalCount,e>100&&(e=100);let t=null;const i=this.gridBodyCon.getScrollFeature();if(this.needToMoveLeft?t=i.scrollHorizontally(-e):this.needToMoveRight&&(t=i.scrollHorizontally(e)),0!==t)this.onDragging(this.lastDraggingEvent),this.failedMoveAttempts=0;else{this.failedMoveAttempts++;const e=this.lastDraggingEvent.dragItem.columns.filter(e=>!e.getColDef().lockPinned);if(e.length>0&&(this.dragAndDropService.setGhostIcon(Gr.ICON_PINNED),this.failedMoveAttempts>7)){const t=this.needToMoveLeft?"left":"right";this.setColumnsPinned(e,t,"uiColumnDragged"),this.dragAndDropService.nudge()}}}};g([he("columnModel")],Ua.prototype,"columnModel",2),g([he("dragAndDropService")],Ua.prototype,"dragAndDropService",2),g([he("gridOptionsService")],Ua.prototype,"gos",2),g([he("ctrlsService")],Ua.prototype,"ctrlsService",2),g([ae],Ua.prototype,"init",1);var Wa=class extends nt{constructor(e,t){super(),this.pinned=e,this.eContainer=t}postConstruct(){this.ctrlsService.whenReady(e=>{switch(this.pinned){case"left":this.eSecondaryContainers=[[e.gridBodyCtrl.getBodyViewportElement(),e.left.getContainerElement()],[e.bottomLeft.getContainerElement()],[e.topLeft.getContainerElement()]];break;case"right":this.eSecondaryContainers=[[e.gridBodyCtrl.getBodyViewportElement(),e.right.getContainerElement()],[e.bottomRight.getContainerElement()],[e.topRight.getContainerElement()]];break;default:this.eSecondaryContainers=[[e.gridBodyCtrl.getBodyViewportElement(),e.center.getViewportElement()],[e.bottomCenter.getViewportElement()],[e.topCenter.getViewportElement()]]}})}isInterestedIn(e){return 1===e||0===e&&this.gos.get("allowDragFromColumnsToolPanel")}getSecondaryContainers(){return this.eSecondaryContainers}getContainer(){return this.eContainer}init(){this.moveColumnFeature=this.createManagedBean(new Ua(this.pinned)),this.bodyDropPivotTarget=this.createManagedBean(new Ha(this.pinned)),this.dragAndDropService.addDropTarget(this)}getIconName(){return this.currentDropListener.getIconName()}isDropColumnInPivotMode(e){return this.columnModel.isPivotMode()&&0===e.dragSource.type}onDragEnter(e){this.currentDropListener=this.isDropColumnInPivotMode(e)?this.bodyDropPivotTarget:this.moveColumnFeature,this.currentDropListener.onDragEnter(e)}onDragLeave(e){this.currentDropListener.onDragLeave(e)}onDragging(e){this.currentDropListener.onDragging(e)}onDragStop(e){this.currentDropListener.onDragStop(e)}};g([he("dragAndDropService")],Wa.prototype,"dragAndDropService",2),g([he("columnModel")],Wa.prototype,"columnModel",2),g([he("ctrlsService")],Wa.prototype,"ctrlsService",2),g([ae],Wa.prototype,"postConstruct",1),g([ae],Wa.prototype,"init",1);var ja=class e extends Ko{constructor(t){super(e.TEMPLATE,t),this.headerCompVersion=0,this.column=t.getColumnGroupChild(),this.pinned=t.getPinned()}postConstruct(){const e=this.getGui();var t,i;t="col-id",null!=(i=this.column.getColId())&&""!=i?e.setAttribute(t,i):e.removeAttribute(t);const n={setWidth:t=>e.style.width=t,addOrRemoveCssClass:(e,t)=>this.addOrRemoveCssClass(e,t),setAriaSort:t=>t?di(e,t):ui(e),setUserCompDetails:e=>this.setUserCompDetails(e),getUserCompInstance:()=>this.headerComp};this.ctrl.setComp(n,this.getGui(),this.eResize,this.eHeaderCompWrapper);const s=this.ctrl.getSelectAllGui();this.eResize.insertAdjacentElement("afterend",s)}destroyHeaderComp(){this.headerComp&&(this.eHeaderCompWrapper.removeChild(this.headerCompGui),this.headerComp=this.destroyBean(this.headerComp),this.headerCompGui=void 0)}setUserCompDetails(e){this.headerCompVersion++;const t=this.headerCompVersion;e.newAgStackInstance().then(e=>this.afterCompCreated(t,e))}afterCompCreated(e,t){e==this.headerCompVersion&&this.isAlive()?(this.destroyHeaderComp(),this.headerComp=t,this.headerCompGui=t.getGui(),this.eHeaderCompWrapper.appendChild(this.headerCompGui),this.ctrl.setDragSource(this.getGui())):this.destroyBean(t)}};ja.TEMPLATE='<div class="ag-header-cell" role="columnheader">\n            <div ref="eResize" class="ag-header-cell-resize" role="presentation"></div>\n            <div ref="eHeaderCompWrapper" class="ag-header-cell-comp-wrapper" role="presentation"></div>\n        </div>',g([Ss("eResize")],ja.prototype,"eResize",2),g([Ss("eHeaderCompWrapper")],ja.prototype,"eHeaderCompWrapper",2),g([ae],ja.prototype,"postConstruct",1),g([le],ja.prototype,"destroyHeaderComp",1);var Ka=ja,$a=class e extends Ko{constructor(t){super(e.TEMPLATE,t)}postConstruct(){const e=this.getGui();e.setAttribute("col-id",this.ctrl.getColId());const t={addOrRemoveCssClass:(e,t)=>this.addOrRemoveCssClass(e,t),setResizableDisplayed:e=>on(this.eResize,e),setWidth:t=>e.style.width=t,setAriaExpanded:t=>{return i="aria-expanded",null!=(n=t)?e.setAttribute(i,n):e.removeAttribute(i);var i,n},setUserCompDetails:e=>this.setUserCompDetails(e),getUserCompInstance:()=>this.headerGroupComp};this.ctrl.setComp(t,e,this.eResize)}setUserCompDetails(e){e.newAgStackInstance().then(e=>this.afterHeaderCompCreated(e))}afterHeaderCompCreated(e){const t=()=>this.destroyBean(e);if(!this.isAlive())return void t();const i=this.getGui(),n=e.getGui();i.appendChild(n),this.addDestroyFunc(t),this.headerGroupComp=e,this.ctrl.setDragSource(i)}};$a.TEMPLATE='<div class="ag-header-group-cell" role="columnheader">\n            <div ref="eResize" class="ag-header-cell-resize" role="presentation"></div>\n        </div>',g([Ss("eResize")],$a.prototype,"eResize",2),g([ae],$a.prototype,"postConstruct",1);var Ya=$a,qa=(e=>(e.COLUMN_GROUP="group",e.COLUMN="column",e.FLOATING_FILTER="filter",e))(qa||{}),Xa=class extends Cs{constructor(e){super(),this.headerComps={},this.ctrl=e,this.setTemplate(`<div class="${this.ctrl.getHeaderRowClass()}" role="row"></div>`)}init(){ai(this.getGui(),this.ctrl.getAriaRowIndex());const e={setHeight:e=>this.getGui().style.height=e,setTop:e=>this.getGui().style.top=e,setHeaderCtrls:(e,t)=>this.setHeaderCtrls(e,t),setWidth:e=>this.getGui().style.width=e};this.ctrl.setComp(e)}destroyHeaderCtrls(){this.setHeaderCtrls([],!1)}setHeaderCtrls(e,t){if(!this.isAlive())return;const i=this.headerComps;if(this.headerComps={},e.forEach(e=>{const t=e.getInstanceId();let n=i[t];delete i[t],null==n&&(n=this.createHeaderComp(e),this.getGui().appendChild(n.getGui())),this.headerComps[t]=n}),L(i,(e,t)=>{this.getGui().removeChild(t.getGui()),this.destroyBean(t)}),t){const e=N(this.headerComps);e.sort((e,t)=>e.getCtrl().getColumnGroupChild().getLeft()-t.getCtrl().getColumnGroupChild().getLeft());const t=e.map(e=>e.getGui());Mn(this.getGui(),t)}}createHeaderComp(e){let t;switch(this.ctrl.getType()){case"group":t=new Ya(e);break;case"filter":t=new Yo(e);break;default:t=new Ka(e)}return this.createBean(t),t.setParentComponent(this),t}};g([ae],Xa.prototype,"init",1),g([le],Xa.prototype,"destroyHeaderCtrls",1);var Za=0,Qa=class e extends nt{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()+"-"+Za++}postConstruct(){this.addManagedPropertyListeners(["suppressHeaderFocus"],()=>this.refreshTabIndex())}shouldStopEventPropagation(e){const{headerRowIndex:t,column:i}=this.focusService.getFocusedHeader();return Jn(this.gos,e,t,i)}getWrapperHasFocus(){return this.gos.getActiveDomElement()===this.eGui}setGui(e){this.eGui=e,this.addDomData(),this.addManagedListener(this.beans.eventService,lt.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;da.refreshFirstAndLastStyles(e,t,i.columnModel)}refreshAriaColIndex(){const{beans:e,column:t}=this,i=e.columnModel.getAriaColumnIndex(t);ci(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.gos.get("suppressHeaderFocus")?this.eGui.removeAttribute("tabindex"):this.eGui.setAttribute("tabindex","-1")}onGuiKeyDown(e){var t;const i=this.gos.getActiveDomElement(),n=e.key===Xn.LEFT||e.key===Xn.RIGHT;if(this.isResizing&&(e.preventDefault(),e.stopImmediatePropagation()),i!==this.eGui||!e.shiftKey&&!e.altKey)return;if((this.isResizing||n)&&(e.preventDefault(),e.stopImmediatePropagation()),!n)return;const s=e.key===Xn.LEFT!==this.gos.get("enableRtl"),r=_r[s?"Left":"Right"];if(e.altKey){this.isResizing=!0,this.resizeMultiplier+=1;const i=this.getViewportAdjustedResizeDiff(e);this.resizeHeader(i,e.shiftKey),null==(t=this.resizeFeature)||t.toggleColumnResizing(!0)}else this.moveHeader(r)}getViewportAdjustedResizeDiff(e){let t=this.getResizeDiff(e);if(this.column.getPinned()){const e=this.pinnedWidthService.getPinnedLeftWidth(),i=this.pinnedWidthService.getPinnedRightWidth(),n=un(this.ctrlsService.getGridBodyCtrl().getBodyViewportElement())-50;if(e+i+t>n){if(!(n>e+i))return 0;t=n-e-i}}return t}getResizeDiff(e){let t=e.key===Xn.LEFT!==this.gos.get("enableRtl");const i=this.column.getPinned(),n=this.gos.get("enableRtl");return i&&n!==("right"===i)&&(t=!t),(t?-1:1)*this.resizeMultiplier}onGuiKeyUp(){this.isResizing&&(this.resizeToggleTimeout&&(window.clearTimeout(this.resizeToggleTimeout),this.resizeToggleTimeout=0),this.isResizing=!1,this.resizeMultiplier=1,this.resizeToggleTimeout=setTimeout(()=>{var e;null==(e=this.resizeFeature)||e.toggleColumnResizing(!1)},150))}handleKeyDown(e){const t=this.getWrapperHasFocus();switch(e.key){case Xn.PAGE_DOWN:case Xn.PAGE_UP:case Xn.PAGE_HOME:case Xn.PAGE_END:t&&e.preventDefault()}}addDomData(){const t=e.DOM_DATA_KEY_HEADER_CTRL;this.gos.setDomData(this.eGui,t,this),this.addDestroyFunc(()=>this.gos.setDomData(this.eGui,t,null))}getGui(){return this.eGui}focus(e){return!!this.eGui&&(this.lastFocusEvent=e||null,this.eGui.focus(),!0)}getRowIndex(){return this.parentRowCtrl.getRowIndex()}getParentRowCtrl(){return this.parentRowCtrl}getPinned(){return this.parentRowCtrl.getPinned()}getInstanceId(){return this.instanceId}getColumnGroupChild(){return this.columnGroupChild}removeDragSource(){this.dragSource&&(this.dragAndDropService.removeDragSource(this.dragSource),this.dragSource=null)}handleContextMenuMouseEvent(e,t,i){const n=null!=e?e:t;this.gos.get("preventDefaultOnContextMenu")&&n.preventDefault();const s=i instanceof Se?i:void 0;this.menuService.isHeaderContextMenuEnabled(s)&&this.menuService.showHeaderContextMenu(s,e,t),this.dispatchColumnMouseEvent(lt.EVENT_COLUMN_HEADER_CONTEXT_MENU,i)}dispatchColumnMouseEvent(e,t){const i={type:e,column:t};this.eventService.dispatchEvent(i)}destroy(){super.destroy(),this.removeDragSource(),this.comp=null,this.column=null,this.resizeFeature=null,this.lastFocusEvent=null,this.columnGroupChild=null,this.parentRowCtrl=null,this.eGui=null}};Qa.DOM_DATA_KEY_HEADER_CTRL="headerCtrl",g([he("pinnedWidthService")],Qa.prototype,"pinnedWidthService",2),g([he("focusService")],Qa.prototype,"focusService",2),g([he("userComponentFactory")],Qa.prototype,"userComponentFactory",2),g([he("ctrlsService")],Qa.prototype,"ctrlsService",2),g([he("dragAndDropService")],Qa.prototype,"dragAndDropService",2),g([he("menuService")],Qa.prototype,"menuService",2),g([ae],Qa.prototype,"postConstruct",1);var Ja=Qa,el=class extends nt{constructor(e,t,i,n){super(),this.columnOrGroup=e,this.eCell=t,this.ariaEl=this.eCell.querySelector("[role=columnheader]")||this.eCell,this.colsSpanning=n,this.beans=i}setColsSpanning(e){this.colsSpanning=e,this.onLeftChanged()}getColumnOrGroup(){return this.beans.gos.get("enableRtl")&&this.colsSpanning?De(this.colsSpanning):this.columnOrGroup}postConstruct(){this.addManagedListener(this.columnOrGroup,Se.EVENT_LEFT_CHANGED,this.onLeftChanged.bind(this)),this.setLeftFirstTime(),this.addManagedListener(this.eventService,lt.EVENT_DISPLAYED_COLUMNS_WIDTH_CHANGED,this.onLeftChanged.bind(this)),this.addManagedPropertyListener("domLayout",this.onLeftChanged.bind(this))}setLeftFirstTime(){const e=this.beans.gos.get("suppressColumnMoveAnimation"),t=y(this.columnOrGroup.getOldLeft());this.beans.columnAnimationService.isActive()&&t&&!e?this.animateInLeft():this.onLeftChanged()}animateInLeft(){const e=this.getColumnOrGroup(),t=e.getLeft(),i=e.getOldLeft(),n=this.modifyLeftForPrintLayout(e,i),s=this.modifyLeftForPrintLayout(e,t);this.setLeft(n),this.actualLeft=s,this.beans.columnAnimationService.executeNextVMTurn(()=>{this.actualLeft===s&&this.setLeft(s)})}onLeftChanged(){const e=this.getColumnOrGroup(),t=e.getLeft();this.actualLeft=this.modifyLeftForPrintLayout(e,t),this.setLeft(this.actualLeft)}modifyLeftForPrintLayout(e,t){if(!this.beans.gos.isDomLayout("print"))return t;if("left"===e.getPinned())return t;const i=this.beans.columnModel.getDisplayedColumnsLeftWidth();return"right"===e.getPinned()?i+this.beans.columnModel.getBodyContainerWidth()+t:i+t}setLeft(e){let t;if(y(e)&&(this.eCell.style.left=`${e}px`),this.columnOrGroup instanceof Se)t=this.columnOrGroup;else{const e=this.columnOrGroup.getLeafColumns();if(!e.length)return;e.length>1&&hi(this.ariaEl,e.length),t=e[0]}}};g([ae],el.prototype,"postConstruct",1);var tl=class extends nt{constructor(e,t){super(),this.columns=e,this.element=t}postConstruct(){this.gos.get("columnHoverHighlight")&&this.addMouseHoverListeners()}addMouseHoverListeners(){this.addManagedListener(this.element,"mouseout",this.onMouseOut.bind(this)),this.addManagedListener(this.element,"mouseover",this.onMouseOver.bind(this))}onMouseOut(){this.columnHoverService.clearMouseOver()}onMouseOver(){this.columnHoverService.setMouseOver(this.columns)}};g([he("columnHoverService")],tl.prototype,"columnHoverService",2),g([ae],tl.prototype,"postConstruct",1);var il=class extends Ja{constructor(e,t,i){super(e,t,i),this.iconCreated=!1,this.column=e}setComp(e,t,i,n){this.comp=e,this.eButtonShowMainFilter=i,this.eFloatingFilterBody=n,this.setGui(t),this.setupActive(),this.setupWidth(),this.setupLeft(),this.setupHover(),this.setupFocus(),this.setupAria(),this.setupFilterButton(),this.setupUserComp(),this.setupSyncWithFilter(),this.setupUi(),this.addManagedListener(this.eButtonShowMainFilter,"click",this.showParentFilter.bind(this)),this.setupFilterChangedListener(),this.addManagedListener(this.column,Se.EVENT_COL_DEF_CHANGED,this.onColDefChanged.bind(this))}resizeHeader(){}moveHeader(){}setupActive(){const e=this.column.getColDef(),t=!!e.filter,i=!!e.floatingFilter;this.active=t&&i}setupUi(){if(this.comp.setButtonWrapperDisplayed(!this.suppressFilterButton&&this.active),this.comp.addOrRemoveBodyCssClass("ag-floating-filter-full-body",this.suppressFilterButton),this.comp.addOrRemoveBodyCssClass("ag-floating-filter-body",!this.suppressFilterButton),!this.active||this.iconCreated)return;const e=Yn("filter",this.gos,this.column);e&&(this.iconCreated=!0,this.eButtonShowMainFilter.appendChild(e))}setupFocus(){this.createManagedBean(new Ds(this.eGui,{shouldStopEventPropagation:this.shouldStopEventPropagation.bind(this),onTabKeyDown:this.onTabKeyDown.bind(this),handleKeyDown:this.handleKeyDown.bind(this),onFocusIn:this.onFocusIn.bind(this)}))}setupAria(){const e=this.localeService.getLocaleTextFunc();jt(this.eButtonShowMainFilter,e("ariaFilterMenuOpen","Open Filter Menu"))}onTabKeyDown(e){if(this.gos.getActiveDomElement()===this.eGui)return;const t=this.focusService.findNextFocusableElement(this.eGui,null,e.shiftKey);if(t)return this.beans.headerNavigationService.scrollToColumn(this.column),e.preventDefault(),void t.focus();const i=this.findNextColumnWithFloatingFilter(e.shiftKey);i&&this.focusService.focusHeaderPosition({headerPosition:{headerRowIndex:this.getParentRowCtrl().getRowIndex(),column:i},event:e})&&e.preventDefault()}findNextColumnWithFloatingFilter(e){const t=this.beans.columnModel;let i=this.column;do{if(i=e?t.getDisplayedColBefore(i):t.getDisplayedColAfter(i),!i)break}while(!i.getColDef().filter||!i.getColDef().floatingFilter);return i}handleKeyDown(e){super.handleKeyDown(e);const t=this.getWrapperHasFocus();switch(e.key){case Xn.UP:case Xn.DOWN:t||e.preventDefault();case Xn.LEFT:case Xn.RIGHT:if(t)return;e.stopPropagation();case Xn.ENTER:t&&this.focusService.focusInto(this.eGui)&&e.preventDefault();break;case Xn.ESCAPE:t||this.eGui.focus()}}onFocusIn(e){if(this.eGui.contains(e.relatedTarget))return;const t=!!e.relatedTarget&&!e.relatedTarget.classList.contains("ag-floating-filter"),i=!!e.relatedTarget&&cn(e.relatedTarget,"ag-floating-filter");if(t&&i&&e.target===this.eGui){const e=this.lastFocusEvent,t=!(!e||e.key!==Xn.TAB);if(e&&t){const t=e.shiftKey;this.focusService.focusInto(this.eGui,t)}}const n=this.getRowIndex();this.beans.focusService.setFocusedHeader(n,this.column)}setupHover(){this.createManagedBean(new tl([this.column],this.eGui));const e=()=>{if(!this.gos.get("columnHoverHighlight"))return;const e=this.beans.columnHoverService.isHovered(this.column);this.comp.addOrRemoveCssClass("ag-column-hover",e)};this.addManagedListener(this.eventService,lt.EVENT_COLUMN_HOVER_CHANGED,e),e()}setupLeft(){const e=new el(this.column,this.eGui,this.beans);this.createManagedBean(e)}setupFilterButton(){this.suppressFilterButton=!this.menuService.isFloatingFilterButtonEnabled(this.column),this.highlightFilterButtonWhenActive=!this.menuService.isLegacyMenuEnabled()}setupUserComp(){if(!this.active)return;const e=this.beans.filterManager.getFloatingFilterCompDetails(this.column,()=>this.showParentFilter());e&&this.setCompDetails(e)}setCompDetails(e){this.userCompDetails=e,this.comp.setCompDetails(e)}showParentFilter(){const e=this.suppressFilterButton?this.eFloatingFilterBody:this.eButtonShowMainFilter;this.menuService.showFilterMenu({column:this.column,buttonElement:e,containerType:"floatingFilter",positionBy:"button"})}setupSyncWithFilter(){if(!this.active)return;const{filterManager:e}=this.beans,t=t=>{if("filterDestroyed"===(null==t?void 0:t.source)&&this.context.isDestroyed())return;const i=this.comp.getFloatingFilterComp();i&&i.then(i=>{var n;if(i){const s=e.getCurrentFloatingFilterParentModel(this.column);i.onParentModelChanged(s,t?this.gos.addGridCommonParams({columns:null!=(n=t.columns)?n:[],type:lt.EVENT_FILTER_CHANGED,source:"api"===t.source?"api":"columnFilter"}):null)}})};this.destroySyncListener=this.addManagedListener(this.column,Se.EVENT_FILTER_CHANGED,t),e.isFilterActive(this.column)&&t(null)}setupWidth(){const e=()=>{const e=`${this.column.getActualWidth()}px`;this.comp.setWidth(e)};this.addManagedListener(this.column,Se.EVENT_WIDTH_CHANGED,e),e()}setupFilterChangedListener(){this.active&&(this.destroyFilterChangedListener=this.addManagedListener(this.column,Se.EVENT_FILTER_CHANGED,this.updateFilterButton.bind(this)),this.updateFilterButton())}updateFilterButton(){if(!this.suppressFilterButton&&this.comp){const e=this.beans.filterManager.isFilterAllowed(this.column);this.comp.setButtonWrapperDisplayed(e),this.highlightFilterButtonWhenActive&&e&&this.eButtonShowMainFilter.classList.toggle("ag-filter-active",this.column.isFilterActive())}}onColDefChanged(){var e,t;const i=this.active;this.setupActive();const n=!i&&this.active;i&&!this.active&&(null==(e=this.destroySyncListener)||e.call(this),null==(t=this.destroyFilterChangedListener)||t.call(this));const s=this.active?this.beans.filterManager.getFloatingFilterCompDetails(this.column,()=>this.showParentFilter()):null,r=this.comp.getFloatingFilterComp();r&&s?r.then(e=>{var t;!e||this.beans.filterManager.areFilterCompsDifferent(null!=(t=this.userCompDetails)?t:null,s)?this.updateCompDetails(s,n):this.updateFloatingFilterParams(s)}):this.updateCompDetails(s,n)}updateCompDetails(e,t){this.isAlive()&&(this.setCompDetails(e),this.setupFilterButton(),this.setupUi(),t&&(this.setupSyncWithFilter(),this.setupFilterChangedListener()))}updateFloatingFilterParams(e){var t;if(!e)return;const i=e.params;null==(t=this.comp.getFloatingFilterComp())||t.then(e=>{let t=!1;(null==e?void 0:e.refresh)&&"function"==typeof e.refresh&&null!==e.refresh(i)&&(t=!0),!t&&(null==e?void 0:e.onParamsUpdated)&&"function"==typeof e.onParamsUpdated&&null!==e.onParamsUpdated(i)&&z("Custom floating filter method 'onParamsUpdated' is deprecated. Use 'refresh' instead.")})}destroy(){super.destroy(),this.eButtonShowMainFilter=null,this.eFloatingFilterBody=null,this.userCompDetails=null,this.destroySyncListener=null,this.destroyFilterChangedListener=null}},nl=class extends nt{constructor(e,t,i,n,s){super(),this.pinned=e,this.column=t,this.eResize=i,this.comp=n,this.ctrl=s}postConstruct(){const e=[];let t,i;const n=()=>{if(on(this.eResize,t),!t)return;const n=this.horizontalResizeService.addResizeBar({eResizeBar:this.eResize,onResizeStart:this.onResizeStart.bind(this),onResizing:this.onResizing.bind(this,!1),onResizeEnd:this.onResizing.bind(this,!0)});if(e.push(n),i){const t=this.gos.get("skipHeaderOnAutoSize"),i=()=>{this.columnModel.autoSizeColumn(this.column,"uiColumnResized",t)};this.eResize.addEventListener("dblclick",i);const n=new mr(this.eResize);n.addEventListener(mr.EVENT_DOUBLE_TAP,i),e.push(()=>{this.eResize.removeEventListener("dblclick",i),n.removeEventListener(mr.EVENT_DOUBLE_TAP,i),n.destroy()})}},s=()=>{e.forEach(e=>e()),e.length=0},r=()=>{const e=this.column.isResizable(),r=!this.gos.get("suppressAutoSize")&&!this.column.getColDef().suppressAutoSize;(e!==t||r!==i)&&(t=e,i=r,s(),n())};r(),this.addDestroyFunc(s),this.ctrl.addRefreshFunction(r)}onResizing(e,t){const{column:i,lastResizeAmount:n,resizeStartWidth:s}=this,r=this.normaliseResizeAmount(t),o=[{key:i,newWidth:s+r}];this.column.getPinned()&&this.pinnedWidthService.getPinnedLeftWidth()+this.pinnedWidthService.getPinnedRightWidth()+(r-n)>un(this.ctrlsService.getGridBodyCtrl().getBodyViewportElement())-50||(this.lastResizeAmount=r,this.columnModel.setColumnWidths(o,this.resizeWithShiftKey,e,"uiColumnResized"),e&&this.toggleColumnResizing(!1))}onResizeStart(e){this.resizeStartWidth=this.column.getActualWidth(),this.lastResizeAmount=0,this.resizeWithShiftKey=e,this.toggleColumnResizing(!0)}toggleColumnResizing(e){this.comp.addOrRemoveCssClass("ag-column-resizing",e)}normaliseResizeAmount(e){let t=e;const i="left"!==this.pinned,n="right"===this.pinned;return this.gos.get("enableRtl")?i&&(t*=-1):n&&(t*=-1),t}};g([he("horizontalResizeService")],nl.prototype,"horizontalResizeService",2),g([he("pinnedWidthService")],nl.prototype,"pinnedWidthService",2),g([he("ctrlsService")],nl.prototype,"ctrlsService",2),g([he("columnModel")],nl.prototype,"columnModel",2),g([ae],nl.prototype,"postConstruct",1);var sl=class extends nt{constructor(e){super(),this.cbSelectAllVisible=!1,this.processingEventFromCheckbox=!1,this.column=e}onSpaceKeyDown(e){const t=this.cbSelectAll;t.isDisplayed()&&!t.getGui().contains(this.gos.getActiveDomElement())&&(e.preventDefault(),t.setValue(!t.getValue()))}getCheckboxGui(){return this.cbSelectAll.getGui()}setComp(e){this.headerCellCtrl=e,this.cbSelectAll=this.createManagedBean(new zs),this.cbSelectAll.addCssClass("ag-header-select-all"),Bt(this.cbSelectAll.getGui(),"presentation"),this.showOrHideSelectAll(),this.addManagedListener(this.eventService,lt.EVENT_NEW_COLUMNS_LOADED,this.onNewColumnsLoaded.bind(this)),this.addManagedListener(this.eventService,lt.EVENT_DISPLAYED_COLUMNS_CHANGED,this.onDisplayedColumnsChanged.bind(this)),this.addManagedListener(this.eventService,lt.EVENT_SELECTION_CHANGED,this.onSelectionChanged.bind(this)),this.addManagedListener(this.eventService,lt.EVENT_PAGINATION_CHANGED,this.onSelectionChanged.bind(this)),this.addManagedListener(this.eventService,lt.EVENT_MODEL_UPDATED,this.onModelChanged.bind(this)),this.addManagedListener(this.cbSelectAll,lt.EVENT_FIELD_VALUE_CHANGED,this.onCbSelectAll.bind(this)),Jt(this.cbSelectAll.getGui(),!0),this.cbSelectAll.getInputElement().setAttribute("tabindex","-1"),this.refreshSelectAllLabel()}onNewColumnsLoaded(){this.showOrHideSelectAll()}onDisplayedColumnsChanged(){this.isAlive()&&this.showOrHideSelectAll()}showOrHideSelectAll(){this.cbSelectAllVisible=this.isCheckboxSelection(),this.cbSelectAll.setDisplayed(this.cbSelectAllVisible,{skipAriaHidden:!0}),this.cbSelectAllVisible&&(this.checkRightRowModelType("selectAllCheckbox"),this.checkSelectionType("selectAllCheckbox"),this.updateStateOfCheckbox()),this.refreshSelectAllLabel()}onModelChanged(){this.cbSelectAllVisible&&this.updateStateOfCheckbox()}onSelectionChanged(){this.cbSelectAllVisible&&this.updateStateOfCheckbox()}updateStateOfCheckbox(){if(this.processingEventFromCheckbox)return;this.processingEventFromCheckbox=!0;const e=this.selectionService.getSelectAllState(this.isFilteredOnly(),this.isCurrentPageOnly());this.cbSelectAll.setValue(e);const t=this.selectionService.hasNodesToSelect(this.isFilteredOnly(),this.isCurrentPageOnly());this.cbSelectAll.setDisabled(!t),this.refreshSelectAllLabel(),this.processingEventFromCheckbox=!1}refreshSelectAllLabel(){const e=this.localeService.getLocaleTextFunc(),t=this.cbSelectAll.getValue()?e("ariaChecked","checked"):e("ariaUnchecked","unchecked"),i=e("ariaRowSelectAll","Press Space to toggle all rows selection");this.cbSelectAllVisible?this.headerCellCtrl.setAriaDescriptionProperty("selectAll",`${i} (${t})`):this.headerCellCtrl.setAriaDescriptionProperty("selectAll",null),this.cbSelectAll.setInputAriaLabel(`${i} (${t})`),this.headerCellCtrl.announceAriaDescription()}checkSelectionType(e){return!("multiple"!==this.gos.get("rowSelection")&&(console.warn(`AG Grid: ${e} is only available if using 'multiple' rowSelection.`),1))}checkRightRowModelType(e){const t=this.rowModel.getType();return!("clientSide"!==t&&"serverSide"!==t&&(console.warn(`AG Grid: ${e} is only available if using 'clientSide' or 'serverSide' rowModelType, you are using ${t}.`),1))}onCbSelectAll(){if(this.processingEventFromCheckbox)return;if(!this.cbSelectAllVisible)return;const e=this.cbSelectAll.getValue(),t=this.isFilteredOnly(),i=this.isCurrentPageOnly();let n="uiSelectAll";i?n="uiSelectAllCurrentPage":t&&(n="uiSelectAllFiltered");const s={source:n,justFiltered:t,justCurrentPage:i};e?this.selectionService.selectAllRowNodes(s):this.selectionService.deselectAllRowNodes(s)}isCheckboxSelection(){let e=this.column.getColDef().headerCheckboxSelection;return"function"==typeof e&&(e=e(this.gos.addGridCommonParams({column:this.column,colDef:this.column.getColDef()}))),!!e&&this.checkRightRowModelType("headerCheckboxSelection")&&this.checkSelectionType("headerCheckboxSelection")}isFilteredOnly(){return!!this.column.getColDef().headerCheckboxSelectionFilteredOnly}isCurrentPageOnly(){return!!this.column.getColDef().headerCheckboxSelectionCurrentPageOnly}};g([he("rowModel")],sl.prototype,"rowModel",2),g([he("selectionService")],sl.prototype,"selectionService",2);var rl=class extends Ja{constructor(e,t,i){super(e,t,i),this.refreshFunctions=[],this.userHeaderClasses=new Set,this.ariaDescriptionProperties=new Map,this.column=e}setComp(e,t,i,n){this.comp=e,this.setGui(t),this.updateState(),this.setupWidth(),this.setupMovingCss(),this.setupMenuClass(),this.setupSortableClass(),this.setupWrapTextClass(),this.refreshSpanHeaderHeight(),this.setupAutoHeight(n),this.addColumnHoverListener(),this.setupFilterClass(),this.setupClassesFromColDef(),this.setupTooltip(),this.addActiveHeaderMouseListeners(),this.setupSelectAll(),this.setupUserComp(),this.refreshAria(),this.resizeFeature=this.createManagedBean(new nl(this.getPinned(),this.column,i,e,this)),this.createManagedBean(new tl([this.column],t)),this.createManagedBean(new el(this.column,t,this.beans)),this.createManagedBean(new Ds(t,{shouldStopEventPropagation:e=>this.shouldStopEventPropagation(e),onTabKeyDown:()=>null,handleKeyDown:this.handleKeyDown.bind(this),onFocusIn:this.onFocusIn.bind(this),onFocusOut:this.onFocusOut.bind(this)})),this.addResizeAndMoveKeyboardListeners(),this.addManagedPropertyListeners(["suppressMovableColumns","suppressMenuHide","suppressAggFuncInHeader"],this.refresh.bind(this)),this.addManagedListener(this.column,Se.EVENT_COL_DEF_CHANGED,this.refresh.bind(this)),this.addManagedListener(this.eventService,lt.EVENT_COLUMN_VALUE_CHANGED,this.onColumnValueChanged.bind(this)),this.addManagedListener(this.eventService,lt.EVENT_COLUMN_ROW_GROUP_CHANGED,this.onColumnRowGroupChanged.bind(this)),this.addManagedListener(this.eventService,lt.EVENT_COLUMN_PIVOT_CHANGED,this.onColumnPivotChanged.bind(this)),this.addManagedListener(this.eventService,lt.EVENT_HEADER_HEIGHT_CHANGED,this.onHeaderHeightChanged.bind(this))}resizeHeader(e,t){var i,n;if(!this.column.isResizable())return;const s=this.column.getActualWidth(),r=null!=(i=this.column.getMinWidth())?i:0,o=null!=(n=this.column.getMaxWidth())?n:Number.MAX_SAFE_INTEGER,a=Math.min(Math.max(s+e,r),o);this.beans.columnModel.setColumnWidths([{key:this.column,newWidth:a}],t,!0,"uiColumnResized")}moveHeader(e){const{eGui:t,column:i,gos:n,ctrlsService:s}=this,r=this.getPinned(),o=t.getBoundingClientRect().left,a=i.getActualWidth(),l=0===e!==n.get("enableRtl"),c=za.normaliseX(l?o-20:o+a+20,r,!0,n,s);za.attemptMoveColumns({allMovingColumns:[i],isFromHeader:!0,hDirection:e,xPosition:c,pinned:r,fromEnter:!1,fakeEvent:!1,gos:n,columnModel:this.beans.columnModel}),s.getGridBodyCtrl().getScrollFeature().ensureColumnVisible(i,"auto")}setupUserComp(){const e=this.lookupUserCompDetails();this.setCompDetails(e)}setCompDetails(e){this.userCompDetails=e,this.comp.setUserCompDetails(e)}lookupUserCompDetails(){const e=this.createParams(),t=this.column.getColDef();return this.userComponentFactory.getHeaderCompDetails(t,e)}createParams(){return this.gos.addGridCommonParams({column:this.column,displayName:this.displayName,enableSorting:this.column.isSortable(),enableMenu:this.menuEnabled,enableFilterButton:this.openFilterEnabled&&this.menuService.isHeaderFilterButtonEnabled(this.column),enableFilterIcon:!this.openFilterEnabled||this.menuService.isLegacyMenuEnabled(),showColumnMenu:e=>{this.menuService.showColumnMenu({column:this.column,buttonElement:e,positionBy:"button"})},showColumnMenuAfterMouseClick:e=>{this.menuService.showColumnMenu({column:this.column,mouseEvent:e,positionBy:"mouse"})},showFilter:e=>{this.menuService.showFilterMenu({column:this.column,buttonElement:e,containerType:"columnFilter",positionBy:"button"})},progressSort:e=>{this.beans.sortController.progressSort(this.column,!!e,"uiColumnSorted")},setSort:(e,t)=>{this.beans.sortController.setSortForColumn(this.column,e,!!t,"uiColumnSorted")},eGridHeader:this.getGui(),setTooltip:(e,t)=>{this.setupTooltip(e,t)}})}setupSelectAll(){this.selectAllFeature=this.createManagedBean(new sl(this.column)),this.selectAllFeature.setComp(this)}getSelectAllGui(){return this.selectAllFeature.getCheckboxGui()}handleKeyDown(e){super.handleKeyDown(e),e.key===Xn.SPACE&&this.selectAllFeature.onSpaceKeyDown(e),e.key===Xn.ENTER&&this.onEnterKeyDown(e),e.key===Xn.DOWN&&e.altKey&&this.showMenuOnKeyPress(e,!1)}onEnterKeyDown(e){if(e.ctrlKey||e.metaKey)this.showMenuOnKeyPress(e,!0);else if(this.sortable){const t=e.shiftKey;this.beans.sortController.progressSort(this.column,t,"uiColumnSorted")}}showMenuOnKeyPress(e,t){const i=this.comp.getUserCompInstance();i&&i instanceof br&&i.onMenuKeyboardShortcut(t)&&e.preventDefault()}onFocusIn(e){if(!this.getGui().contains(e.relatedTarget)){const e=this.getRowIndex();this.focusService.setFocusedHeader(e,this.column),this.announceAriaDescription()}this.focusService.isKeyboardMode()&&this.setActiveHeader(!0)}onFocusOut(e){this.getGui().contains(e.relatedTarget)||this.setActiveHeader(!1)}setupTooltip(e,t){this.tooltipFeature&&(this.tooltipFeature=this.destroyBean(this.tooltipFeature));const i="whenTruncated"===this.gos.get("tooltipShowMode"),n=this.eGui,s=this.column.getColDef();t||!i||s.headerComponent||(t=()=>{const e=n.querySelector(".ag-header-cell-text");return!e||e.scrollWidth>e.clientWidth});const r={getColumn:()=>this.column,getColDef:()=>this.column.getColDef(),getGui:()=>n,getLocation:()=>"header",getTooltipValue:()=>null!=e?e:this.column.getColDef().headerTooltip,shouldDisplayTooltip:t},o=this.createManagedBean(new ms(r));this.refreshFunctions.push(()=>o.refreshToolTip())}setupClassesFromColDef(){const e=()=>{const e=this.column.getColDef(),t=da.getHeaderClassesFromColDef(e,this.gos,this.column,null),i=this.userHeaderClasses;this.userHeaderClasses=new Set(t),t.forEach(e=>{i.has(e)?i.delete(e):this.comp.addOrRemoveCssClass(e,!0)}),i.forEach(e=>this.comp.addOrRemoveCssClass(e,!1))};this.refreshFunctions.push(e),e()}setDragSource(e){if(this.dragSourceElement=e,this.removeDragSource(),!e||!this.draggable)return;const{column:t,beans:i,displayName:n,dragAndDropService:s,gos:r}=this,{columnModel:o}=i;let a=!this.gos.get("suppressDragLeaveHidesColumns");const l=this.dragSource={type:1,eElement:e,getDefaultIconName:()=>a?Gr.ICON_HIDE:Gr.ICON_NOT_ALLOWED,getDragItem:()=>this.createDragItem(t),dragItemName:n,onDragStarted:()=>{a=!r.get("suppressDragLeaveHidesColumns"),t.setMoving(!0,"uiColumnMoved")},onDragStopped:()=>t.setMoving(!1,"uiColumnMoved"),onGridEnter:e=>{var t;if(a){const i=(null==(t=null==e?void 0:e.columns)?void 0:t.filter(e=>!e.getColDef().lockVisible))||[];o.setColumnsVisible(i,!0,"uiColumnMoved")}},onGridExit:e=>{var t;if(a){const i=(null==(t=null==e?void 0:e.columns)?void 0:t.filter(e=>!e.getColDef().lockVisible))||[];o.setColumnsVisible(i,!1,"uiColumnMoved")}}};s.addDragSource(l,!0)}createDragItem(e){const t={};return t[e.getId()]=e.isVisible(),{columns:[e],visibleState:t}}updateState(){this.menuEnabled=this.menuService.isColumnMenuInHeaderEnabled(this.column),this.openFilterEnabled=this.menuService.isFilterMenuInHeaderEnabled(this.column),this.sortable=this.column.isSortable(),this.displayName=this.calculateDisplayName(),this.draggable=this.workOutDraggable()}addRefreshFunction(e){this.refreshFunctions.push(e)}refresh(){this.updateState(),this.refreshHeaderComp(),this.refreshAria(),this.refreshFunctions.forEach(e=>e())}refreshHeaderComp(){const e=this.lookupUserCompDetails();null!=this.comp.getUserCompInstance()&&this.userCompDetails.componentClass==e.componentClass&&this.attemptHeaderCompRefresh(e.params)?this.setDragSource(this.dragSourceElement):this.setCompDetails(e)}attemptHeaderCompRefresh(e){const t=this.comp.getUserCompInstance();return!!t&&(!!t.refresh&&t.refresh(e))}calculateDisplayName(){return this.beans.columnModel.getDisplayNameForColumn(this.column,"header",!0)}checkDisplayName(){this.displayName!==this.calculateDisplayName()&&this.refresh()}workOutDraggable(){const e=this.column.getColDef();return!(this.gos.get("suppressMovableColumns")||e.suppressMovable||e.lockPosition)||!!e.enableRowGroup||!!e.enablePivot}onColumnRowGroupChanged(){this.checkDisplayName()}onColumnPivotChanged(){this.checkDisplayName()}onColumnValueChanged(){this.checkDisplayName()}setupWidth(){const e=()=>{const e=this.column.getActualWidth();this.comp.setWidth(`${e}px`)};this.addManagedListener(this.column,Se.EVENT_WIDTH_CHANGED,e),e()}setupMovingCss(){const e=()=>{this.comp.addOrRemoveCssClass("ag-header-cell-moving",this.column.isMoving())};this.addManagedListener(this.column,Se.EVENT_MOVING_CHANGED,e),e()}setupMenuClass(){const e=()=>{this.comp.addOrRemoveCssClass("ag-column-menu-visible",this.column.isMenuVisible())};this.addManagedListener(this.column,Se.EVENT_MENU_VISIBLE_CHANGED,e),e()}setupSortableClass(){const e=()=>{this.comp.addOrRemoveCssClass("ag-header-cell-sortable",!!this.sortable)};e(),this.addRefreshFunction(e),this.addManagedListener(this.eventService,Se.EVENT_SORT_CHANGED,this.refreshAriaSort.bind(this))}setupFilterClass(){const e=()=>{const e=this.column.isFilterActive();this.comp.addOrRemoveCssClass("ag-header-cell-filtered",e),this.refreshAria()};this.addManagedListener(this.column,Se.EVENT_FILTER_ACTIVE_CHANGED,e),e()}setupWrapTextClass(){const e=()=>{const e=!!this.column.getColDef().wrapHeaderText;this.comp.addOrRemoveCssClass("ag-header-cell-wrap-text",e)};e(),this.addRefreshFunction(e)}onDisplayedColumnsChanged(){super.onDisplayedColumnsChanged(),this.isAlive()&&this.onHeaderHeightChanged()}onHeaderHeightChanged(){this.refreshSpanHeaderHeight()}refreshSpanHeaderHeight(){const{eGui:e,column:t,comp:i,beans:n}=this;if(!t.isSpanHeaderHeight())return e.style.removeProperty("top"),e.style.removeProperty("height"),i.addOrRemoveCssClass("ag-header-span-height",!1),void i.addOrRemoveCssClass("ag-header-span-total",!1);const{numberOfParents:s,isSpanningTotal:r}=this.column.getColumnGroupPaddingInfo();i.addOrRemoveCssClass("ag-header-span-height",s>0);const{columnModel:o}=n,a=o.getColumnHeaderRowHeight();if(0===s)return i.addOrRemoveCssClass("ag-header-span-total",!1),e.style.setProperty("top","0px"),void e.style.setProperty("height",`${a}px`);i.addOrRemoveCssClass("ag-header-span-total",r);const l=s*(o.isPivotMode()?o.getPivotGroupHeaderHeight():o.getGroupHeaderHeight());e.style.setProperty("top",-l+"px"),e.style.setProperty("height",`${a+l}px`)}setupAutoHeight(e){const{columnModel:t,resizeObserverService:i}=this.beans,n=i=>{if(!this.isAlive())return;const{paddingTop:s,paddingBottom:r,borderBottomWidth:o,borderTopWidth:a}=hn(this.getGui()),l=s+r+o+a,c=e.offsetHeight+l;if(i<5){const t=this.beans.gos.getDocument();if(!t||!t.contains(e)||0==c)return void window.setTimeout(()=>n(i+1),0)}t.setColumnHeaderHeight(this.column,c)};let s,r=!1;const o=()=>{const e=this.column.isAutoHeaderHeight();e&&!r&&a(),!e&&r&&l()},a=()=>{r=!0,n(0),this.comp.addOrRemoveCssClass("ag-header-cell-auto-height",!0),s=i.observeResize(e,()=>n(0))},l=()=>{r=!1,s&&s(),this.comp.addOrRemoveCssClass("ag-header-cell-auto-height",!1),s=void 0};o(),this.addDestroyFunc(()=>l()),this.addManagedListener(this.column,Se.EVENT_WIDTH_CHANGED,()=>r&&n(0)),this.addManagedListener(this.eventService,Se.EVENT_SORT_CHANGED,()=>{r&&window.setTimeout(()=>n(0))}),this.addRefreshFunction(o)}refreshAriaSort(){if(this.sortable){const e=this.localeService.getLocaleTextFunc(),t=this.beans.sortController.getDisplaySortForColumn(this.column)||null;this.comp.setAriaSort(Ht(t)),this.setAriaDescriptionProperty("sort",e("ariaSortableColumn","Press ENTER to sort"))}else this.comp.setAriaSort(),this.setAriaDescriptionProperty("sort",null)}refreshAriaMenu(){if(this.menuEnabled){const e=this.localeService.getLocaleTextFunc();this.setAriaDescriptionProperty("menu",e("ariaMenuColumn","Press ALT DOWN to open column menu"))}else this.setAriaDescriptionProperty("menu",null)}refreshAriaFilterButton(){if(this.openFilterEnabled&&!this.menuService.isLegacyMenuEnabled()){const e=this.localeService.getLocaleTextFunc();this.setAriaDescriptionProperty("filterButton",e("ariaFilterColumn","Press CTRL ENTER to open filter"))}else this.setAriaDescriptionProperty("filterButton",null)}refreshAriaFiltered(){const e=this.localeService.getLocaleTextFunc();this.column.isFilterActive()?this.setAriaDescriptionProperty("filter",e("ariaColumnFiltered","Column Filtered")):this.setAriaDescriptionProperty("filter",null)}setAriaDescriptionProperty(e,t){null!=t?this.ariaDescriptionProperties.set(e,t):this.ariaDescriptionProperties.delete(e)}announceAriaDescription(){if(!this.eGui.contains(this.beans.gos.getActiveDomElement()))return;const e=Array.from(this.ariaDescriptionProperties.keys()).sort((e,t)=>"filter"===e?-1:t.charCodeAt(0)-e.charCodeAt(0)).map(e=>this.ariaDescriptionProperties.get(e)).join(". ");this.beans.ariaAnnouncementService.announceValue(e)}refreshAria(){this.refreshAriaSort(),this.refreshAriaMenu(),this.refreshAriaFilterButton(),this.refreshAriaFiltered()}addColumnHoverListener(){const e=()=>{if(!this.gos.get("columnHoverHighlight"))return;const e=this.beans.columnHoverService.isHovered(this.column);this.comp.addOrRemoveCssClass("ag-column-hover",e)};this.addManagedListener(this.eventService,lt.EVENT_COLUMN_HOVER_CHANGED,e),e()}getColId(){return this.column.getColId()}addActiveHeaderMouseListeners(){const e=e=>this.handleMouseOverChange("mouseenter"===e.type);this.addManagedListener(this.getGui(),"mouseenter",e),this.addManagedListener(this.getGui(),"mouseleave",e),this.addManagedListener(this.getGui(),"click",()=>this.dispatchColumnMouseEvent(lt.EVENT_COLUMN_HEADER_CLICKED,this.column)),this.addManagedListener(this.getGui(),"contextmenu",e=>this.handleContextMenuMouseEvent(e,void 0,this.column))}handleMouseOverChange(e){this.setActiveHeader(e);const t={type:e?lt.EVENT_COLUMN_HEADER_MOUSE_OVER:lt.EVENT_COLUMN_HEADER_MOUSE_LEAVE,column:this.column};this.eventService.dispatchEvent(t)}setActiveHeader(e){this.comp.addOrRemoveCssClass("ag-header-active",e)}getAnchorElementForMenu(e){const t=this.comp.getUserCompInstance();return t instanceof br?t.getAnchorElementForMenu(e):this.getGui()}destroy(){super.destroy(),this.refreshFunctions=null,this.selectAllFeature=null,this.dragSourceElement=null,this.userCompDetails=null,this.userHeaderClasses=null,this.ariaDescriptionProperties=null}},ol=class extends nt{constructor(e,t,i,n){super(),this.eResize=t,this.comp=e,this.pinned=i,this.columnGroup=n}postConstruct(){if(!this.columnGroup.isResizable())return void this.comp.setResizableDisplayed(!1);const e=this.horizontalResizeService.addResizeBar({eResizeBar:this.eResize,onResizeStart:this.onResizeStart.bind(this),onResizing:this.onResizing.bind(this,!1),onResizeEnd:this.onResizing.bind(this,!0)});if(this.addDestroyFunc(e),!this.gos.get("suppressAutoSize")){const e=this.gos.get("skipHeaderOnAutoSize");this.eResize.addEventListener("dblclick",()=>{const t=[];this.columnGroup.getDisplayedLeafColumns().forEach(e=>{e.getColDef().suppressAutoSize||t.push(e.getColId())}),t.length>0&&this.columnModel.autoSizeColumns({columns:t,skipHeader:e,stopAtGroup:this.columnGroup,source:"uiColumnResized"}),this.resizeLeafColumnsToFit("uiColumnResized")})}}onResizeStart(e){const t=this.getInitialValues(e);this.storeLocalValues(t),this.toggleColumnResizing(!0)}onResizing(e,t,i="uiColumnResized"){const n=this.normaliseDragChange(t),s=this.resizeStartWidth+n;this.resizeColumnsFromLocalValues(s,i,e)}getInitialValues(e){const t=this.getColumnsToResize(),i=this.getInitialSizeOfColumns(t),n={columnsToResize:t,resizeStartWidth:i,resizeRatios:this.getSizeRatiosOfColumns(t,i)};let s=null;if(e&&(s=this.columnModel.getDisplayedGroupAtDirection(this.columnGroup,"After")),s){const e=s.getDisplayedLeafColumns(),t=n.groupAfterColumns=e.filter(e=>e.isResizable()),i=n.groupAfterStartWidth=this.getInitialSizeOfColumns(t);n.groupAfterRatios=this.getSizeRatiosOfColumns(t,i)}else n.groupAfterColumns=void 0,n.groupAfterStartWidth=void 0,n.groupAfterRatios=void 0;return n}storeLocalValues(e){const{columnsToResize:t,resizeStartWidth:i,resizeRatios:n,groupAfterColumns:s,groupAfterStartWidth:r,groupAfterRatios:o}=e;this.resizeCols=t,this.resizeStartWidth=i,this.resizeRatios=n,this.resizeTakeFromCols=s,this.resizeTakeFromStartWidth=r,this.resizeTakeFromRatios=o}clearLocalValues(){this.resizeCols=void 0,this.resizeRatios=void 0,this.resizeTakeFromCols=void 0,this.resizeTakeFromRatios=void 0}resizeLeafColumnsToFit(e){const t=this.autoWidthCalculator.getPreferredWidthForColumnGroup(this.columnGroup),i=this.getInitialValues();t>i.resizeStartWidth&&this.resizeColumns(i,t,e,!0)}resizeColumnsFromLocalValues(e,t,i=!0){var n,s,r;if(!this.resizeCols||!this.resizeRatios)return;const o={columnsToResize:this.resizeCols,resizeStartWidth:this.resizeStartWidth,resizeRatios:this.resizeRatios,groupAfterColumns:null!=(n=this.resizeTakeFromCols)?n:void 0,groupAfterStartWidth:null!=(s=this.resizeTakeFromStartWidth)?s:void 0,groupAfterRatios:null!=(r=this.resizeTakeFromRatios)?r:void 0};this.resizeColumns(o,e,t,i)}resizeColumns(e,t,i,n=!0){const{columnsToResize:s,resizeStartWidth:r,resizeRatios:o,groupAfterColumns:a,groupAfterStartWidth:l,groupAfterRatios:c}=e,h=[];if(h.push({columns:s,ratios:o,width:t}),a){const e=t-r;h.push({columns:a,ratios:c,width:l-e})}this.columnModel.resizeColumnSets({resizeSets:h,finished:n,source:i}),n&&this.toggleColumnResizing(!1)}toggleColumnResizing(e){this.comp.addOrRemoveCssClass("ag-column-resizing",e)}getColumnsToResize(){return this.columnGroup.getDisplayedLeafColumns().filter(e=>e.isResizable())}getInitialSizeOfColumns(e){return e.reduce((e,t)=>e+t.getActualWidth(),0)}getSizeRatiosOfColumns(e,t){return e.map(e=>e.getActualWidth()/t)}normaliseDragChange(e){let t=e;return this.gos.get("enableRtl")?"left"!==this.pinned&&(t*=-1):"right"===this.pinned&&(t*=-1),t}destroy(){super.destroy(),this.clearLocalValues()}};g([he("horizontalResizeService")],ol.prototype,"horizontalResizeService",2),g([he("autoWidthCalculator")],ol.prototype,"autoWidthCalculator",2),g([he("columnModel")],ol.prototype,"columnModel",2),g([ae],ol.prototype,"postConstruct",1);var al=class extends nt{constructor(e,t){super(),this.removeChildListenersFuncs=[],this.columnGroup=t,this.comp=e}postConstruct(){this.addListenersToChildrenColumns(),this.addManagedListener(this.columnGroup,at.EVENT_DISPLAYED_CHILDREN_CHANGED,this.onDisplayedChildrenChanged.bind(this)),this.onWidthChanged(),this.addDestroyFunc(this.removeListenersOnChildrenColumns.bind(this))}addListenersToChildrenColumns(){this.removeListenersOnChildrenColumns();const e=this.onWidthChanged.bind(this);this.columnGroup.getLeafColumns().forEach(t=>{t.addEventListener("widthChanged",e),t.addEventListener("visibleChanged",e),this.removeChildListenersFuncs.push(()=>{t.removeEventListener("widthChanged",e),t.removeEventListener("visibleChanged",e)})})}removeListenersOnChildrenColumns(){this.removeChildListenersFuncs.forEach(e=>e()),this.removeChildListenersFuncs=[]}onDisplayedChildrenChanged(){this.addListenersToChildrenColumns(),this.onWidthChanged()}onWidthChanged(){const e=this.columnGroup.getActualWidth();this.comp.setWidth(`${e}px`),this.comp.addOrRemoveCssClass("ag-hidden",0===e)}};g([ae],al.prototype,"postConstruct",1);var ll=class extends Ja{constructor(e,t,i){super(e,t,i),this.onSuppressColMoveChange=()=>{if(!this.isAlive()||this.isSuppressMoving())this.removeDragSource();else if(!this.dragSource){const e=this.getGui();this.setDragSource(e)}},this.column=e}setComp(e,t,i){this.comp=e,this.setGui(t),this.displayName=this.beans.columnModel.getDisplayNameForColumnGroup(this.column,"header"),this.addClasses(),this.setupMovingCss(),this.setupExpandable(),this.setupTooltip(),this.addDestroyFunc(()=>{this.tooltipFeature&&(this.tooltipFeature=this.destroyBean(this.tooltipFeature))}),this.setupUserComp(),this.addHeaderMouseListeners();const n=this.getParentRowCtrl().getPinned(),s=this.column.getProvidedColumnGroup().getLeafColumns();this.createManagedBean(new tl(s,t)),this.createManagedBean(new el(this.column,t,this.beans)),this.createManagedBean(new al(e,this.column)),this.resizeFeature=this.createManagedBean(new ol(e,i,n,this.column)),this.createManagedBean(new Ds(t,{shouldStopEventPropagation:this.shouldStopEventPropagation.bind(this),onTabKeyDown:()=>{},handleKeyDown:this.handleKeyDown.bind(this),onFocusIn:this.onFocusIn.bind(this)})),this.addManagedPropertyListener(lt.EVENT_SUPPRESS_COLUMN_MOVE_CHANGED,this.onSuppressColMoveChange),this.addResizeAndMoveKeyboardListeners()}resizeHeader(e,t){if(!this.resizeFeature)return;const i=this.resizeFeature.getInitialValues(t);this.resizeFeature.resizeColumns(i,i.resizeStartWidth+e,"uiColumnResized",!0)}moveHeader(e){const{beans:t,eGui:i,column:n,gos:s,ctrlsService:r}=this,o=s.get("enableRtl"),a=0===e,l=this.getPinned(),c=i.getBoundingClientRect(),h=c.left,d=c.width,u=za.normaliseX(a!==o?h-20:h+d+20,l,!0,s,r),p=n.getGroupId(),g=this.focusService.getFocusedHeader();za.attemptMoveColumns({allMovingColumns:this.column.getLeafColumns(),isFromHeader:!0,hDirection:e,xPosition:u,pinned:l,fromEnter:!1,fakeEvent:!1,gos:s,columnModel:t.columnModel});const f=n.getDisplayedLeafColumns(),m=a?f[0]:De(f);this.ctrlsService.getGridBodyCtrl().getScrollFeature().ensureColumnVisible(m,"auto"),!this.isAlive()&&g&&this.restoreFocus(p,n,g)}restoreFocus(e,t,i){const n=t.getLeafColumns();if(!n.length)return;const s=n[0].getParent();if(!s)return;const r=this.findGroupWidthId(s,e);r&&this.focusService.focusHeaderPosition({headerPosition:u(d({},i),{column:r})})}findGroupWidthId(e,t){for(;e;){if(e.getGroupId()===t)return e;e=e.getParent()}return null}resizeLeafColumnsToFit(e){this.resizeFeature&&this.resizeFeature.resizeLeafColumnsToFit(e)}setupUserComp(){const e=this.gos.addGridCommonParams({displayName:this.displayName,columnGroup:this.column,setExpanded:e=>{this.beans.columnModel.setColumnGroupOpened(this.column.getProvidedColumnGroup(),e,"gridInitializing")},setTooltip:(e,t)=>{this.setupTooltip(e,t)}}),t=this.userComponentFactory.getHeaderGroupCompDetails(e);this.comp.setUserCompDetails(t)}addHeaderMouseListeners(){const e=e=>this.handleMouseOverChange("mouseenter"===e.type);this.addManagedListener(this.getGui(),"mouseenter",e),this.addManagedListener(this.getGui(),"mouseleave",e),this.addManagedListener(this.getGui(),"click",()=>this.dispatchColumnMouseEvent(lt.EVENT_COLUMN_HEADER_CLICKED,this.column.getProvidedColumnGroup())),this.addManagedListener(this.getGui(),"contextmenu",e=>this.handleContextMenuMouseEvent(e,void 0,this.column.getProvidedColumnGroup()))}handleMouseOverChange(e){const t={type:e?lt.EVENT_COLUMN_HEADER_MOUSE_OVER:lt.EVENT_COLUMN_HEADER_MOUSE_LEAVE,column:this.column.getProvidedColumnGroup()};this.eventService.dispatchEvent(t)}setupTooltip(e,t){this.tooltipFeature&&(this.tooltipFeature=this.destroyBean(this.tooltipFeature));const i=this.column.getColGroupDef(),n="whenTruncated"===this.gos.get("tooltipShowMode"),s=this.eGui;t||!n||(null==i?void 0:i.headerGroupComponent)||(t=()=>{const e=s.querySelector(".ag-header-group-text");return!e||e.scrollWidth>e.clientWidth});const r={getColumn:()=>this.column,getGui:()=>s,getLocation:()=>"headerGroup",getTooltipValue:()=>null!=e?e:i&&i.headerTooltip,shouldDisplayTooltip:t};i&&(r.getColDef=()=>i),this.createBean(new ms(r))}setupExpandable(){const e=this.column.getProvidedColumnGroup();this.refreshExpanded(),this.addManagedListener(e,xe.EVENT_EXPANDABLE_CHANGED,this.refreshExpanded.bind(this)),this.addManagedListener(e,xe.EVENT_EXPANDED_CHANGED,this.refreshExpanded.bind(this))}refreshExpanded(){const e=this.column;this.expandable=e.isExpandable();const t=e.isExpanded();this.expandable?this.comp.setAriaExpanded(t?"true":"false"):this.comp.setAriaExpanded(void 0)}getColId(){return this.column.getUniqueId()}addClasses(){const e=this.column.getColGroupDef(),t=da.getHeaderClassesFromColDef(e,this.gos,null,this.column);this.column.isPadding()?(t.push("ag-header-group-cell-no-group"),this.column.getLeafColumns().every(e=>e.isSpanHeaderHeight())&&t.push("ag-header-span-height")):t.push("ag-header-group-cell-with-group"),t.forEach(e=>this.comp.addOrRemoveCssClass(e,!0))}setupMovingCss(){const e=this.column.getProvidedColumnGroup().getLeafColumns(),t=()=>this.comp.addOrRemoveCssClass("ag-header-cell-moving",this.column.isMoving());e.forEach(e=>{this.addManagedListener(e,Se.EVENT_MOVING_CHANGED,t)}),t()}onFocusIn(e){if(!this.eGui.contains(e.relatedTarget)){const e=this.getRowIndex();this.beans.focusService.setFocusedHeader(e,this.column)}}handleKeyDown(e){super.handleKeyDown(e);const t=this.getWrapperHasFocus();if(this.expandable&&t&&e.key===Xn.ENTER){const e=this.column,t=!e.isExpanded();this.beans.columnModel.setColumnGroupOpened(e.getProvidedColumnGroup(),t,"uiColumnExpanded")}}setDragSource(e){if(!this.isAlive()||this.isSuppressMoving())return;if(this.removeDragSource(),!e)return;const{beans:t,column:i,displayName:n,gos:s,dragAndDropService:r}=this,{columnModel:o}=t,a=i.getProvidedColumnGroup().getLeafColumns();let l=!s.get("suppressDragLeaveHidesColumns");const c=this.dragSource={type:1,eElement:e,getDefaultIconName:()=>l?Gr.ICON_HIDE:Gr.ICON_NOT_ALLOWED,dragItemName:n,getDragItem:()=>this.getDragItemForGroup(i),onDragStarted:()=>{l=!s.get("suppressDragLeaveHidesColumns"),a.forEach(e=>e.setMoving(!0,"uiColumnDragged"))},onDragStopped:()=>a.forEach(e=>e.setMoving(!1,"uiColumnDragged")),onGridEnter:e=>{var t;if(l){const i=(null==(t=null==e?void 0:e.columns)?void 0:t.filter(e=>!e.getColDef().lockVisible))||[];o.setColumnsVisible(i,!0,"uiColumnMoved")}},onGridExit:e=>{var t;if(l){const i=(null==(t=null==e?void 0:e.columns)?void 0:t.filter(e=>!e.getColDef().lockVisible))||[];o.setColumnsVisible(i,!1,"uiColumnMoved")}}};r.addDragSource(c,!0)}getDragItemForGroup(e){const t=e.getProvidedColumnGroup().getLeafColumns(),i={};t.forEach(e=>i[e.getId()]=e.isVisible());const n=[];return this.beans.columnModel.getAllDisplayedColumns().forEach(e=>{t.indexOf(e)>=0&&(n.push(e),Ne(t,e))}),t.forEach(e=>n.push(e)),{columns:n,visibleState:i}}isSuppressMoving(){let e=!1;return this.column.getLeafColumns().forEach(t=>{(t.getColDef().suppressMovable||t.getColDef().lockPosition)&&(e=!0)}),e||this.gos.get("suppressMovableColumns")}},cl=0,hl=class extends nt{constructor(e,t,i){super(),this.instanceId=cl++,this.rowIndex=e,this.pinned=t,this.type=i;const n="group"==i?"ag-header-row-column-group":"filter"==i?"ag-header-row-column-filter":"ag-header-row-column";this.headerRowClass=`ag-header-row ${n}`}postConstruct(){this.isPrintLayout=this.gos.isDomLayout("print"),this.isEnsureDomOrder=this.gos.get("ensureDomOrder")}getInstanceId(){return this.instanceId}setComp(e,t=!0){this.comp=e,t&&(this.onRowHeightChanged(),this.onVirtualColumnsChanged()),this.setWidth(),this.addEventListeners()}getHeaderRowClass(){return this.headerRowClass}getAriaRowIndex(){return this.rowIndex+1}addEventListeners(){this.addManagedListener(this.eventService,lt.EVENT_COLUMN_RESIZED,this.onColumnResized.bind(this)),this.addManagedListener(this.eventService,lt.EVENT_DISPLAYED_COLUMNS_CHANGED,this.onDisplayedColumnsChanged.bind(this)),this.addManagedListener(this.eventService,lt.EVENT_VIRTUAL_COLUMNS_CHANGED,e=>this.onVirtualColumnsChanged(e.afterScroll)),this.addManagedListener(this.eventService,lt.EVENT_COLUMN_HEADER_HEIGHT_CHANGED,this.onRowHeightChanged.bind(this)),this.addManagedListener(this.eventService,lt.EVENT_GRID_STYLES_CHANGED,this.onRowHeightChanged.bind(this)),this.addManagedListener(this.eventService,lt.EVENT_ADVANCED_FILTER_ENABLED_CHANGED,this.onRowHeightChanged.bind(this)),this.addManagedPropertyListener("domLayout",this.onDisplayedColumnsChanged.bind(this)),this.addManagedPropertyListener("ensureDomOrder",e=>this.isEnsureDomOrder=e.currentValue),this.addManagedPropertyListener("headerHeight",this.onRowHeightChanged.bind(this)),this.addManagedPropertyListener("pivotHeaderHeight",this.onRowHeightChanged.bind(this)),this.addManagedPropertyListener("groupHeaderHeight",this.onRowHeightChanged.bind(this)),this.addManagedPropertyListener("pivotGroupHeaderHeight",this.onRowHeightChanged.bind(this)),this.addManagedPropertyListener("floatingFiltersHeight",this.onRowHeightChanged.bind(this))}getHeaderCellCtrl(e){if(this.headerCellCtrls)return T(this.headerCellCtrls).find(t=>t.getColumnGroupChild()===e)}onDisplayedColumnsChanged(){this.isPrintLayout=this.gos.isDomLayout("print"),this.onVirtualColumnsChanged(),this.setWidth(),this.onRowHeightChanged()}getType(){return this.type}onColumnResized(){this.setWidth()}setWidth(){const e=this.getWidthForRow();this.comp.setWidth(`${e}px`)}getWidthForRow(){const{columnModel:e}=this.beans;return this.isPrintLayout?null!=this.pinned?0:e.getContainerWidth("right")+e.getContainerWidth("left")+e.getContainerWidth(null):e.getContainerWidth(this.pinned)}onRowHeightChanged(){var{topOffset:e,rowHeight:t}=this.getTopAndHeight();this.comp.setTop(e+"px"),this.comp.setHeight(t+"px")}getTopAndHeight(){const{columnModel:e,filterManager:t}=this.beans;let i=e.getHeaderRowCount();const n=[];let s=0;t.hasFloatingFilters()&&(i++,s=1);const r=e.getColumnGroupHeaderRowHeight(),o=e.getColumnHeaderRowHeight(),a=i-(1+s);for(let e=0;e<a;e++)n.push(r);n.push(o);for(let t=0;t<s;t++)n.push(e.getFloatingFiltersHeight());let l=0;for(let e=0;e<this.rowIndex;e++)l+=n[e];return{topOffset:l,rowHeight:n[this.rowIndex]}}getPinned(){return this.pinned}getRowIndex(){return this.rowIndex}onVirtualColumnsChanged(e=!1){const t=this.getHeaderCtrls(),i=this.isEnsureDomOrder||this.isPrintLayout;this.comp.setHeaderCtrls(t,i,e)}getHeaderCtrls(){const e=this.headerCellCtrls;this.headerCellCtrls=new Map;const t=this.getColumnsInViewport();for(const i of t)this.recycleAndCreateHeaderCtrls(i,e);const i=e=>{const{focusService:t,columnModel:i}=this.beans;return!!t.isHeaderWrapperFocused(e)&&i.isDisplayed(e.getColumnGroupChild())};if(e)for(const[t,n]of e)i(n)?this.headerCellCtrls.set(t,n):this.destroyBean(n);return Array.from(this.headerCellCtrls.values())}recycleAndCreateHeaderCtrls(e,t){if(!this.headerCellCtrls)return;if(e.isEmptyGroup())return;const i=e.getUniqueId();let n;if(t&&(n=t.get(i),t.delete(i)),n&&n.getColumnGroupChild()!=e&&(this.destroyBean(n),n=void 0),null==n)switch(this.type){case"filter":n=this.createBean(new il(e,this.beans,this));break;case"group":n=this.createBean(new ll(e,this.beans,this));break;default:n=this.createBean(new rl(e,this.beans,this))}this.headerCellCtrls.set(i,n)}getColumnsInViewport(){return this.isPrintLayout?this.getColumnsInViewportPrintLayout():this.getColumnsInViewportNormalLayout()}getColumnsInViewportPrintLayout(){if(null!=this.pinned)return[];let e=[];const t=this.getActualDepth(),{columnModel:i}=this.beans;return["left",null,"right"].forEach(n=>{const s=i.getVirtualHeaderGroupRow(n,t);e=e.concat(s)}),e}getActualDepth(){return"filter"==this.type?this.rowIndex-1:this.rowIndex}getColumnsInViewportNormalLayout(){return this.beans.columnModel.getVirtualHeaderGroupRow(this.pinned,this.getActualDepth())}focusHeader(e,t){if(!this.headerCellCtrls)return!1;const i=Array.from(this.headerCellCtrls.values()).find(t=>t.getColumnGroupChild()==e);return!!i&&i.focus(t)}destroy(){this.headerCellCtrls&&this.headerCellCtrls.forEach(e=>{this.destroyBean(e)}),this.headerCellCtrls=void 0,super.destroy()}};g([he("beans")],hl.prototype,"beans",2),g([ae],hl.prototype,"postConstruct",1);var dl=class extends nt{constructor(e){super(),this.hidden=!1,this.includeFloatingFilter=!1,this.groupsRowCtrls=[],this.pinned=e}setComp(e,t){this.comp=e,this.eViewport=t,this.setupCenterWidth(),this.setupPinnedWidth(),this.setupDragAndDrop(this.eViewport),this.addManagedListener(this.eventService,lt.EVENT_GRID_COLUMNS_CHANGED,this.onGridColumnsChanged.bind(this)),this.addManagedListener(this.eventService,lt.EVENT_DISPLAYED_COLUMNS_CHANGED,this.onDisplayedColumnsChanged.bind(this)),this.addManagedListener(this.eventService,lt.EVENT_ADVANCED_FILTER_ENABLED_CHANGED,this.onDisplayedColumnsChanged.bind(this)),this.ctrlsService.registerHeaderContainer(this,this.pinned),this.columnModel.isReady()&&this.refresh()}setupDragAndDrop(e){const t=new Wa(this.pinned,e);this.createManagedBean(t)}refresh(e=!1){const t=new cs,i=this.focusService.getFocusHeaderToUseAfterRefresh();(()=>{const e=this.columnModel.getHeaderRowCount()-1;this.groupsRowCtrls=this.destroyBeans(this.groupsRowCtrls);for(let i=0;i<e;i++){const e=this.createBean(new hl(t.next(),this.pinned,"group"));this.groupsRowCtrls.push(e)}})(),(()=>{const i=t.next(),n=!(this.hidden||null!=this.columnsRowCtrl&&e&&this.columnsRowCtrl.getRowIndex()===i);(n||this.hidden)&&(this.columnsRowCtrl=this.destroyBean(this.columnsRowCtrl)),n&&(this.columnsRowCtrl=this.createBean(new hl(i,this.pinned,"column")))})(),(()=>{this.includeFloatingFilter=this.filterManager.hasFloatingFilters()&&!this.hidden;const i=()=>{this.filtersRowCtrl=this.destroyBean(this.filtersRowCtrl)};if(!this.includeFloatingFilter)return void i();const n=t.next();if(this.filtersRowCtrl){const t=this.filtersRowCtrl.getRowIndex()!==n;e&&!t||i()}this.filtersRowCtrl||(this.filtersRowCtrl=this.createBean(new hl(n,this.pinned,"filter")))})();const n=this.getAllCtrls();this.comp.setCtrls(n),this.restoreFocusOnHeader(i)}restoreFocusOnHeader(e){null!=e&&e.column.getPinned()==this.pinned&&this.focusService.focusHeaderPosition({headerPosition:e})}getAllCtrls(){const e=[...this.groupsRowCtrls];return this.columnsRowCtrl&&e.push(this.columnsRowCtrl),this.filtersRowCtrl&&e.push(this.filtersRowCtrl),e}onGridColumnsChanged(){this.refresh(!0)}onDisplayedColumnsChanged(){const e=this.filterManager.hasFloatingFilters()&&!this.hidden;this.includeFloatingFilter!==e&&this.refresh(!0)}setupCenterWidth(){null==this.pinned&&this.createManagedBean(new Ea(e=>this.comp.setCenterWidth(`${e}px`),!0))}setHorizontalScroll(e){this.comp.setViewportScrollLeft(e)}setupPinnedWidth(){if(null==this.pinned)return;const e="left"===this.pinned,t="right"===this.pinned;this.hidden=!0;const i=()=>{const i=e?this.pinnedWidthService.getPinnedLeftWidth():this.pinnedWidthService.getPinnedRightWidth();if(null==i)return;const n=0==i,s=this.hidden!==n,r=this.gos.get("enableRtl"),o=this.gos.getScrollbarWidth(),a=this.scrollVisibleService.isVerticalScrollShowing()&&(r&&e||!r&&t)?i+o:i;this.comp.setPinnedContainerWidth(`${a}px`),this.comp.setDisplayed(!n),s&&(this.hidden=n,this.refresh())};this.addManagedListener(this.eventService,lt.EVENT_LEFT_PINNED_WIDTH_CHANGED,i),this.addManagedListener(this.eventService,lt.EVENT_RIGHT_PINNED_WIDTH_CHANGED,i),this.addManagedListener(this.eventService,lt.EVENT_SCROLL_VISIBILITY_CHANGED,i),this.addManagedListener(this.eventService,lt.EVENT_SCROLLBAR_WIDTH_CHANGED,i)}getHeaderCtrlForColumn(e){if(e instanceof Se){if(!this.columnsRowCtrl)return;return this.columnsRowCtrl.getHeaderCellCtrl(e)}if(0!==this.groupsRowCtrls.length)for(let t=0;t<this.groupsRowCtrls.length;t++){const i=this.groupsRowCtrls[t].getHeaderCellCtrl(e);if(i)return i}}getHtmlElementForColumnHeader(e){const t=this.getHeaderCtrlForColumn(e);return t?t.getGui():null}getRowType(e){const t=this.getAllCtrls()[e];return t?t.getType():void 0}focusHeader(e,t,i){const n=this.getAllCtrls()[e];return!!n&&n.focusHeader(t,i)}getViewport(){return this.eViewport}getRowCount(){return this.groupsRowCtrls.length+(this.columnsRowCtrl?1:0)+(this.filtersRowCtrl?1:0)}destroy(){this.filtersRowCtrl&&(this.filtersRowCtrl=this.destroyBean(this.filtersRowCtrl)),this.columnsRowCtrl&&(this.columnsRowCtrl=this.destroyBean(this.columnsRowCtrl)),this.groupsRowCtrls&&this.groupsRowCtrls.length&&(this.groupsRowCtrls=this.destroyBeans(this.groupsRowCtrls)),super.destroy()}};g([he("ctrlsService")],dl.prototype,"ctrlsService",2),g([he("scrollVisibleService")],dl.prototype,"scrollVisibleService",2),g([he("pinnedWidthService")],dl.prototype,"pinnedWidthService",2),g([he("columnModel")],dl.prototype,"columnModel",2),g([he("focusService")],dl.prototype,"focusService",2),g([he("filterManager")],dl.prototype,"filterManager",2);var ul=class e extends Cs{constructor(e){super(),this.headerRowComps={},this.rowCompsList=[],this.pinned=e}init(){this.selectAndSetTemplate();const e={setDisplayed:e=>this.setDisplayed(e),setCtrls:e=>this.setCtrls(e),setCenterWidth:e=>this.eCenterContainer.style.width=e,setViewportScrollLeft:e=>this.getGui().scrollLeft=e,setPinnedContainerWidth:e=>{const t=this.getGui();t.style.width=e,t.style.maxWidth=e,t.style.minWidth=e}};this.createManagedBean(new dl(this.pinned)).setComp(e,this.getGui())}selectAndSetTemplate(){const t="left"==this.pinned,i="right"==this.pinned,n=t?e.PINNED_LEFT_TEMPLATE:i?e.PINNED_RIGHT_TEMPLATE:e.CENTER_TEMPLATE;this.setTemplate(n),this.eRowContainer=this.eCenterContainer?this.eCenterContainer:this.getGui()}destroyRowComps(){this.setCtrls([])}destroyRowComp(e){this.destroyBean(e),this.eRowContainer.removeChild(e.getGui())}setCtrls(e){const t=this.headerRowComps;let i;this.headerRowComps={},this.rowCompsList=[];const n=e=>{const t=e.getGui();t.parentElement!=this.eRowContainer&&this.eRowContainer.appendChild(t),i&&En(this.eRowContainer,t,i),i=t};e.forEach(e=>{const i=e.getInstanceId(),s=t[i];delete t[i];const r=s||this.createBean(new Xa(e));this.headerRowComps[i]=r,this.rowCompsList.push(r),n(r)}),N(t).forEach(e=>this.destroyRowComp(e))}};ul.PINNED_LEFT_TEMPLATE='<div class="ag-pinned-left-header" role="rowgroup"></div>',ul.PINNED_RIGHT_TEMPLATE='<div class="ag-pinned-right-header" role="rowgroup"></div>',ul.CENTER_TEMPLATE='<div class="ag-header-viewport" role="presentation">\n            <div class="ag-header-container" ref="eCenterContainer" role="rowgroup"></div>\n        </div>',g([Ss("eCenterContainer")],ul.prototype,"eCenterContainer",2),g([ae],ul.prototype,"init",1),g([le],ul.prototype,"destroyRowComps",1);var pl=ul,gl=(e=>(e[e.UP=0]="UP",e[e.DOWN=1]="DOWN",e[e.LEFT=2]="LEFT",e[e.RIGHT=3]="RIGHT",e))(gl||{}),fl=class extends nt{constructor(){super(...arguments),this.currentHeaderRowWithoutSpan=-1}postConstruct(){this.ctrlsService.whenReady(e=>{this.gridBodyCon=e.gridBodyCtrl});const e=this.gos.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:s}=t,r=this.getHeaderRowCount(),o=0===e;let{headerRowIndex:a,column:l,headerRowIndexWithoutSpan:c}=o?this.headerPositionUtils.getColumnVisibleParent(s,n):this.headerPositionUtils.getColumnVisibleChild(s,n),h=!1;return a<0&&(a=0,l=s,h=!0),a>=r?(a=-1,this.setCurrentHeaderRowWithoutSpan(-1)):void 0!==c&&(this.currentHeaderRowWithoutSpan=c),!(!h&&!l)&&this.focusService.focusHeaderPosition({headerPosition:{headerRowIndex:a,column:l},allowUserOverride:!0,event:i})}setCurrentHeaderRowWithoutSpan(e){this.currentHeaderRowWithoutSpan=e}navigateHorizontally(e,t=!1,i){const n=this.focusService.getFocusedHeader(),s=2===e,r=this.gos.get("enableRtl");let o,a;if(-1!==this.currentHeaderRowWithoutSpan?n.headerRowIndex=this.currentHeaderRowWithoutSpan:this.currentHeaderRowWithoutSpan=n.headerRowIndex,s!==r?(a="Before",o=this.headerPositionUtils.findHeader(n,a)):(a="After",o=this.headerPositionUtils.findHeader(n,a)),o||!t)return this.focusService.focusHeaderPosition({headerPosition:o,direction:a,fromTab:t,allowUserOverride:!0,event:i});if(t){const e=this.gos.getCallback("tabToNextHeader");if(e)return this.focusService.focusHeaderPositionFromUserFunc({userFunc:e,headerPosition:o,direction:a})}return this.focusNextHeaderRow(n,a,i)}focusNextHeaderRow(e,t,i){const n=e.headerRowIndex;let s,r=null;if("Before"===t?n>0&&(s=n-1,this.currentHeaderRowWithoutSpan-=1,r=this.headerPositionUtils.findColAtEdgeForHeaderRow(s,"end")):(s=n+1,this.currentHeaderRowWithoutSpan<this.getHeaderRowCount()?this.currentHeaderRowWithoutSpan+=1:this.setCurrentHeaderRowWithoutSpan(-1),r=this.headerPositionUtils.findColAtEdgeForHeaderRow(s,"start")),!r)return!1;const{column:o,headerRowIndex:a}=this.headerPositionUtils.getHeaderIndexToFocus(r.column,null==r?void 0:r.headerRowIndex);return this.focusService.focusHeaderPosition({headerPosition:{column:o,headerRowIndex:a},direction:t,fromTab:!0,allowUserOverride:!0,event:i})}scrollToColumn(e,t="After"){if(e.getPinned())return;let i;if(e instanceof at){const n=e.getDisplayedLeafColumns();i="Before"===t?De(n):n[0]}else i=e;this.gridBodyCon.getScrollFeature().ensureColumnVisible(i)}};g([he("focusService")],fl.prototype,"focusService",2),g([he("headerPositionUtils")],fl.prototype,"headerPositionUtils",2),g([he("ctrlsService")],fl.prototype,"ctrlsService",2),g([ae],fl.prototype,"postConstruct",1),fl=g([ce("headerNavigationService")],fl);var ml=class extends nt{setComp(e,t,i){this.comp=e,this.eGui=t,this.createManagedBean(new Ds(i,{onTabKeyDown:this.onTabKeyDown.bind(this),handleKeyDown:this.handleKeyDown.bind(this),onFocusOut:this.onFocusOut.bind(this)})),this.addManagedListener(this.eventService,lt.EVENT_COLUMN_PIVOT_MODE_CHANGED,this.onPivotModeChanged.bind(this)),this.addManagedListener(this.eventService,lt.EVENT_DISPLAYED_COLUMNS_CHANGED,this.onDisplayedColumnsChanged.bind(this)),this.onPivotModeChanged(),this.setupHeaderHeight();const n=this.onHeaderContextMenu.bind(this);this.addManagedListener(this.eGui,"contextmenu",n),this.mockContextMenuForIPad(n),this.ctrlsService.register("gridHeaderCtrl",this)}setupHeaderHeight(){const e=this.setHeaderHeight.bind(this);e(),this.addManagedPropertyListener("headerHeight",e),this.addManagedPropertyListener("pivotHeaderHeight",e),this.addManagedPropertyListener("groupHeaderHeight",e),this.addManagedPropertyListener("pivotGroupHeaderHeight",e),this.addManagedPropertyListener("floatingFiltersHeight",e),this.addManagedListener(this.eventService,lt.EVENT_DISPLAYED_COLUMNS_CHANGED,e),this.addManagedListener(this.eventService,lt.EVENT_COLUMN_HEADER_HEIGHT_CHANGED,e),this.addManagedListener(this.eventService,lt.EVENT_GRID_STYLES_CHANGED,e),this.addManagedListener(this.eventService,lt.EVENT_ADVANCED_FILTER_ENABLED_CHANGED,e)}getHeaderHeight(){return this.headerHeight}setHeaderHeight(){const{columnModel:e}=this;let t,i=0,n=e.getHeaderRowCount();this.filterManager.hasFloatingFilters()&&(n++,i=1);const s=this.columnModel.getColumnGroupHeaderRowHeight(),r=this.columnModel.getColumnHeaderRowHeight(),o=n-(1+i);if(t=i*e.getFloatingFiltersHeight(),t+=o*s,t+=r,this.headerHeight===t)return;this.headerHeight=t;const a=`${t+1}px`;this.comp.setHeightAndMinHeight(a),this.eventService.dispatchEvent({type:lt.EVENT_HEADER_HEIGHT_CHANGED})}onPivotModeChanged(){const e=this.columnModel.isPivotMode();this.comp.addOrRemoveCssClass("ag-pivot-on",e),this.comp.addOrRemoveCssClass("ag-pivot-off",!e)}onDisplayedColumnsChanged(){const e=this.columnModel.getAllDisplayedColumns().some(e=>e.isSpanHeaderHeight());this.comp.addOrRemoveCssClass("ag-header-allow-overflow",e)}onTabKeyDown(e){const t=this.gos.get("enableRtl"),i=e.shiftKey!==t?2:3;(this.headerNavigationService.navigateHorizontally(i,!0,e)||this.focusService.focusNextGridCoreContainer(e.shiftKey))&&e.preventDefault()}handleKeyDown(e){let t=null;switch(e.key){case Xn.LEFT:t=2;case Xn.RIGHT:y(t)||(t=3),this.headerNavigationService.navigateHorizontally(t,!1,e);break;case Xn.UP:t=0;case Xn.DOWN:y(t)||(t=1),this.headerNavigationService.navigateVertically(t,null,e)&&e.preventDefault();break;default:return}}onFocusOut(e){const{relatedTarget:t}=e;!t&&this.eGui.contains(this.gos.getActiveDomElement())||this.eGui.contains(t)||this.focusService.clearFocusedHeader()}onHeaderContextMenu(e,t,i){if(!e&&!i||!this.menuService.isHeaderContextMenuEnabled())return;const{target:n}=null!=e?e:t;n!==this.eGui&&n!==this.ctrlsService.getHeaderRowContainerCtrl().getViewport()||this.menuService.showHeaderContextMenu(void 0,e,i)}mockContextMenuForIPad(e){if(!Li())return;const t=new mr(this.eGui);this.addManagedListener(t,mr.EVENT_LONG_TAP,t=>{e(void 0,t.touchStart,t.touchEvent)}),this.addDestroyFunc(()=>t.destroy())}};g([he("headerNavigationService")],ml.prototype,"headerNavigationService",2),g([he("focusService")],ml.prototype,"focusService",2),g([he("columnModel")],ml.prototype,"columnModel",2),g([he("ctrlsService")],ml.prototype,"ctrlsService",2),g([he("filterManager")],ml.prototype,"filterManager",2),g([he("menuService")],ml.prototype,"menuService",2);var vl=class e extends Cs{constructor(){super(e.TEMPLATE)}postConstruct(){const e={addOrRemoveCssClass:(e,t)=>this.addOrRemoveCssClass(e,t),setHeightAndMinHeight:e=>{this.getGui().style.height=e,this.getGui().style.minHeight=e}};this.createManagedBean(new ml).setComp(e,this.getGui(),this.getFocusableElement());const t=e=>{this.createManagedBean(e),this.appendChild(e)};t(new pl("left")),t(new pl(null)),t(new pl("right"))}};vl.TEMPLATE='<div class="ag-header" role="presentation"/>',g([ae],vl.prototype,"postConstruct",1);var yl=vl,Cl=class extends nt{addResizeBar(e){const t={dragStartPixels:e.dragStartPixels||0,eElement:e.eResizeBar,onDragStart:this.onDragStart.bind(this,e),onDragStop:this.onDragStop.bind(this,e),onDragging:this.onDragging.bind(this,e),includeTouch:!0,stopPropagationForTouch:!0};return this.dragService.addDragSource(t),()=>this.dragService.removeDragSource(t)}onDragStart(e,t){this.dragStartX=t.clientX,this.setResizeIcons();const i=t instanceof MouseEvent&&!0===t.shiftKey;e.onResizeStart(i)}setResizeIcons(){const e=this.ctrlsService.get("gridCtrl");e.setResizeCursor(!0),e.disableUserSelect(!0)}onDragStop(e,t){e.onResizeEnd(this.resizeAmount),this.resetIcons()}resetIcons(){const e=this.ctrlsService.get("gridCtrl");e.setResizeCursor(!1),e.disableUserSelect(!1)}onDragging(e,t){this.resizeAmount=t.clientX-this.dragStartX,e.onResizing(this.resizeAmount)}};g([he("dragService")],Cl.prototype,"dragService",2),g([he("ctrlsService")],Cl.prototype,"ctrlsService",2),Cl=g([ce("horizontalResizeService")],Cl);var bl=class extends nt{hideActiveMenu(){this.hidePopup&&this.hidePopup()}showMenuAfterMouseEvent(e,t,i){this.showPopup(e,n=>{this.popupService.positionPopupUnderMouseEvent({column:e,type:i,mouseEvent:t,ePopup:n})},i,t.target,this.menuService.isLegacyMenuEnabled())}showMenuAfterButtonClick(e,t,i){let n=-1,s="left";const r=this.menuService.isLegacyMenuEnabled();!r&&this.gos.get("enableRtl")&&(n=1,s="right");let o=r?void 0:4*n,a=r?void 0:4;this.showPopup(e,n=>{this.popupService.positionPopupByComponent({type:i,eventSource:t,ePopup:n,nudgeX:o,nudgeY:a,alignSide:s,keepWithinBounds:!0,position:"under",column:e})},i,t,r)}showPopup(e,t,i,n,s){const r=e?this.createBean(new jo(e,"COLUMN_MENU")):void 0;if(this.activeMenu=r,!(null==r?void 0:r.hasFilter())||!e)throw new Error("AG Grid - unable to show popup filter, filter instantiation failed");const o=document.createElement("div");let a;Bt(o,"presentation"),o.classList.add("ag-menu"),s||o.classList.add("ag-filter-menu"),this.tabListener=this.addManagedListener(o,"keydown",e=>this.trapFocusWithin(e,o)),o.appendChild(null==r?void 0:r.getGui());const l=this.menuService.isColumnMenuAnchoringEnabled()?null!=n?n:this.ctrlsService.getGridBodyCtrl().getGui():void 0,c=this.localeService.getLocaleTextFunc(),h=s&&"columnFilter"!==i?c("ariaLabelColumnMenu","Column Menu"):c("ariaLabelColumnFilter","Column Filter"),d=this.popupService.addPopup({modal:!0,eChild:o,closeOnEsc:!0,closedCallback:t=>{e.setMenuVisible(!1,"contextMenu");const s=t instanceof KeyboardEvent;if(this.tabListener&&(this.tabListener=this.tabListener()),s&&n&&wn(n)){const e=this.focusService.findTabbableParent(n);e&&e.focus()}null==r||r.afterGuiDetached(),this.destroyBean(this.activeMenu),this.dispatchVisibleChangedEvent(!1,i,e)},positionCallback:()=>t(o),anchorToElement:l,ariaLabel:h});d&&(this.hidePopup=a=d.hideFunc),r.afterInit().then(()=>{t(o),r.afterGuiAttached({container:i,hidePopup:a})}),e.setMenuVisible(!0,"contextMenu"),this.dispatchVisibleChangedEvent(!0,i,e)}trapFocusWithin(e,t){e.key!==Xn.TAB||e.defaultPrevented||this.focusService.findNextFocusableElement(t,!1,e.shiftKey)||(e.preventDefault(),this.focusService.focusInto(t,e.shiftKey))}dispatchVisibleChangedEvent(e,t,i){const n={type:lt.EVENT_COLUMN_MENU_VISIBLE_CHANGED,visible:e,switchingTab:!1,key:t,column:null!=i?i:null};this.eventService.dispatchEvent(n)}isMenuEnabled(e){var t;return e.isFilterAllowed()&&(null!=(t=e.getColDef().menuTabs)?t:["filterMenuTab"]).includes("filterMenuTab")}showMenuAfterContextMenuEvent(){}destroy(){this.destroyBean(this.activeMenu),super.destroy()}};g([he("filterManager")],bl.prototype,"filterManager",2),g([he("popupService")],bl.prototype,"popupService",2),g([he("focusService")],bl.prototype,"focusService",2),g([he("ctrlsService")],bl.prototype,"ctrlsService",2),g([he("menuService")],bl.prototype,"menuService",2),bl=g([ce("filterMenuFactory")],bl);var Sl=(e=>(e.TAB_GUARD="ag-tab-guard",e.TAB_GUARD_TOP="ag-tab-guard-top",e.TAB_GUARD_BOTTOM="ag-tab-guard-bottom",e))(Sl||{}),wl=class extends nt{constructor(e){super(),this.skipTabGuardFocus=!1,this.forcingFocusOut=!1;const{comp:t,eTopGuard:i,eBottomGuard:n,focusTrapActive:s,forceFocusOutWhenTabGuardsAreEmpty:r,focusInnerElement:o,onFocusIn:a,onFocusOut:l,shouldStopEventPropagation:c,onTabKeyDown:h,handleKeyDown:d,eFocusableElement:u}=e;this.comp=t,this.eTopGuard=i,this.eBottomGuard=n,this.providedFocusInnerElement=o,this.eFocusableElement=u,this.focusTrapActive=!!s,this.forceFocusOutWhenTabGuardsAreEmpty=!!r,this.providedFocusIn=a,this.providedFocusOut=l,this.providedShouldStopEventPropagation=c,this.providedOnTabKeyDown=h,this.providedHandleKeyDown=d}postConstruct(){this.createManagedBean(new Ds(this.eFocusableElement,{shouldStopEventPropagation:()=>this.shouldStopEventPropagation(),onTabKeyDown:e=>this.onTabKeyDown(e),handleKeyDown:e=>this.handleKeyDown(e),onFocusIn:e=>this.onFocusIn(e),onFocusOut:e=>this.onFocusOut(e)})),this.activateTabGuards(),[this.eTopGuard,this.eBottomGuard].forEach(e=>this.addManagedListener(e,"focus",this.onFocus.bind(this)))}handleKeyDown(e){this.providedHandleKeyDown&&this.providedHandleKeyDown(e)}tabGuardsAreActive(){return!!this.eTopGuard&&this.eTopGuard.hasAttribute("tabIndex")}shouldStopEventPropagation(){return!!this.providedShouldStopEventPropagation&&this.providedShouldStopEventPropagation()}activateTabGuards(){if(this.forcingFocusOut)return;const e=this.gos.get("tabIndex");this.comp.setTabIndex(e.toString())}deactivateTabGuards(){this.comp.setTabIndex()}onFocus(e){if(this.skipTabGuardFocus)return void(this.skipTabGuardFocus=!1);if(this.forceFocusOutWhenTabGuardsAreEmpty&&0===this.focusService.findFocusableElements(this.eFocusableElement,".ag-tab-guard").length)return void this.findNextElementOutsideAndFocus(e.target===this.eBottomGuard);const t=e.target===this.eBottomGuard;this.providedFocusInnerElement?this.providedFocusInnerElement(t):this.focusInnerElement(t)}findNextElementOutsideAndFocus(e){const t=this.gos.getDocument(),i=this.focusService.findFocusableElements(t.body,null,!0),n=i.indexOf(e?this.eTopGuard:this.eBottomGuard);if(-1===n)return;let s,r;e?(s=0,r=n):(s=n+1,r=i.length);const o=i.slice(s,r),a=this.gos.get("tabIndex");o.sort((e,t)=>{const i=parseInt(e.getAttribute("tabindex")||"0"),n=parseInt(t.getAttribute("tabindex")||"0");return n===a?1:i===a?-1:0===i?1:0===n?-1:i-n}),o[e?o.length-1:0].focus()}onFocusIn(e){this.focusTrapActive||(this.providedFocusIn&&this.providedFocusIn(e),this.deactivateTabGuards())}onFocusOut(e){this.focusTrapActive||(this.providedFocusOut&&this.providedFocusOut(e),this.eFocusableElement.contains(e.relatedTarget)||this.activateTabGuards())}onTabKeyDown(e){if(this.providedOnTabKeyDown)return void this.providedOnTabKeyDown(e);if(this.focusTrapActive)return;if(e.defaultPrevented)return;const t=this.tabGuardsAreActive();t&&this.deactivateTabGuards();const i=this.getNextFocusableElement(e.shiftKey);t&&setTimeout(()=>this.activateTabGuards(),0),i&&(i.focus(),e.preventDefault())}focusInnerElement(e=!1){const t=this.focusService.findFocusableElements(this.eFocusableElement);this.tabGuardsAreActive()&&(t.splice(0,1),t.splice(t.length-1,1)),t.length&&t[e?t.length-1:0].focus({preventScroll:!0})}getNextFocusableElement(e){return this.focusService.findNextFocusableElement(this.eFocusableElement,!1,e)}forceFocusOutOfContainer(e=!1){if(this.forcingFocusOut)return;const t=e?this.eTopGuard:this.eBottomGuard;this.activateTabGuards(),this.skipTabGuardFocus=!0,this.forcingFocusOut=!0,t.focus(),window.setTimeout(()=>{this.forcingFocusOut=!1,this.activateTabGuards()})}isTabGuard(e){return e===this.eTopGuard||e===this.eBottomGuard}};g([he("focusService")],wl.prototype,"focusService",2),g([ae],wl.prototype,"postConstruct",1);var xl=class extends Cs{initialiseTabGuard(e){this.eTopGuard=this.createTabGuard("top"),this.eBottomGuard=this.createTabGuard("bottom"),this.eFocusableElement=this.getFocusableElement();const t=[this.eTopGuard,this.eBottomGuard],i={setTabIndex:e=>{t.forEach(t=>null!=e?t.setAttribute("tabindex",e):t.removeAttribute("tabindex"))}};this.addTabGuards(this.eTopGuard,this.eBottomGuard),this.tabGuardCtrl=this.createManagedBean(new wl({comp:i,focusTrapActive:!!e.focusTrapActive,eTopGuard:this.eTopGuard,eBottomGuard:this.eBottomGuard,eFocusableElement:this.eFocusableElement,onFocusIn:e.onFocusIn,onFocusOut:e.onFocusOut,focusInnerElement:e.focusInnerElement,handleKeyDown:e.handleKeyDown,onTabKeyDown:e.onTabKeyDown,shouldStopEventPropagation:e.shouldStopEventPropagation,forceFocusOutWhenTabGuardsAreEmpty:e.forceFocusOutWhenTabGuardsAreEmpty}))}createTabGuard(e){const t=document.createElement("div"),i="top"===e?"ag-tab-guard-top":"ag-tab-guard-bottom";return t.classList.add("ag-tab-guard",i),Bt(t,"presentation"),t}addTabGuards(e,t){this.eFocusableElement.insertAdjacentElement("afterbegin",e),this.eFocusableElement.insertAdjacentElement("beforeend",t)}removeAllChildrenExceptTabGuards(){const e=[this.eTopGuard,this.eBottomGuard];Cn(this.getFocusableElement()),this.addTabGuards(...e)}forceFocusOutOfContainer(e=!1){this.tabGuardCtrl.forceFocusOutOfContainer(e)}appendChild(e,t){On(e)||(e=e.getGui());const{eBottomGuard:i}=this;i?i.insertAdjacentElement("beforebegin",e):super.appendChild(e,t)}},El=class e extends xl{constructor(t){super(e.getTemplate(t.cssClass)),this.items=[],this.tabbedItemScrollMap=new Map,this.params=t}postConstruct(){this.setupHeader(),this.params.items&&this.params.items.forEach(e=>this.addItem(e)),this.initialiseTabGuard({onTabKeyDown:this.onTabKeyDown.bind(this),handleKeyDown:this.handleKeyDown.bind(this),focusInnerElement:this.focusInnerElement.bind(this),focusTrapActive:!0}),this.addDestroyFunc(()=>{var e,t,i;return null==(i=null==(t=null==(e=this.activeItem)?void 0:e.tabbedItem)?void 0:t.afterDetachedCallback)?void 0:i.call(t)})}static getTemplate(e){return`<div class="ag-tabs ${e}">\n            <div ref="eHeader"></div>\n            <div ref="eBody" role="presentation" class="ag-tabs-body ${e?`${e}-body`:""}"></div>\n        </div>`}setupHeader(){const{enableCloseButton:e,cssClass:t}=this.params,i=(e,i)=>{e.classList.add(`ag-tabs-${i}`),t&&e.classList.add(`${t}-${i}`)};e?(this.setupCloseButton(i),this.eTabHeader=this.gos.getDocument().createElement("div"),i(this.eHeader,"header-wrapper"),Bt(this.eHeader,"presentation"),this.eHeader.appendChild(this.eTabHeader)):this.eTabHeader=this.eHeader,Bt(this.eTabHeader,"tablist"),i(this.eTabHeader,"header")}setupCloseButton(e){const t=this.gos.getDocument(),i=t.createElement("button");e(i,"close-button");const n=Yn("close",this.gos,void 0,!0);jt(i,this.params.closeButtonAriaLabel),i.appendChild(n),this.addManagedListener(i,"click",()=>{var e,t;return null==(t=(e=this.params).onCloseClicked)?void 0:t.call(e)});const s=t.createElement("div");e(s,"close-button-wrapper"),Bt(s,"presentation"),s.appendChild(i),this.eHeader.appendChild(s),this.eCloseButton=i}handleKeyDown(e){switch(e.key){case Xn.RIGHT:case Xn.LEFT:if(!this.eTabHeader.contains(this.gos.getActiveDomElement()))return;const t=e.key===Xn.RIGHT,i=this.gos.get("enableRtl"),n=this.items.indexOf(this.activeItem),s=t!==i?Math.min(n+1,this.items.length-1):Math.max(n-1,0);if(n===s)return;e.preventDefault();const r=this.items[s];this.showItemWrapper(r),r.eHeaderButton.focus();break;case Xn.UP:case Xn.DOWN:e.stopPropagation()}}onTabKeyDown(e){var t,i,n,s;if(e.defaultPrevented)return;const{focusService:r,eHeader:o,eBody:a,activeItem:l,params:c}=this,{suppressTrapFocus:h,enableCloseButton:d}=c,u=this.gos.getActiveDomElement(),p=e.target,g=e.shiftKey;if(o.contains(u))return e.preventDefault(),void(d&&g&&!(null==(t=this.eCloseButton)?void 0:t.contains(u))?null==(i=this.eCloseButton)||i.focus():h&&g?null==(n=this.focusService.findFocusableElementBeforeTabGuard(this.gos.getDocument().body,p))||n.focus():this.focusBody(e.shiftKey));let f=null;if(r.isTargetUnderManagedComponent(a,p)&&(g&&(f=this.focusService.findFocusableElementBeforeTabGuard(a,p)),f||h||(f=l.eHeaderButton)),!f&&a.contains(u)&&(f=r.findNextFocusableElement(a,!1,g),!f))return e.preventDefault(),void(h&&!g?this.forceFocusOutOfContainer(g):d&&!g?null==(s=this.eCloseButton)||s.focus():this.focusHeader());f&&(e.preventDefault(),f.focus())}focusInnerElement(e){e?this.focusHeader():this.focusBody(!0)}focusHeader(e){this.activeItem.eHeaderButton.focus({preventScroll:e})}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");Bt(t,"tab"),t.setAttribute("tabindex","-1"),t.appendChild(e.title),t.classList.add("ag-tab"),this.eTabHeader.appendChild(t),jt(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(t=>t.tabbedItem===e);t&&this.showItemWrapper(t)}showItemWrapper(e){var t,i,n,s,r,o;const{tabbedItem:a,eHeaderButton:l}=e;null==(i=(t=this.params).onItemClicked)||i.call(t,{item:a}),this.activeItem!==e?(this.lastScrollListener&&(this.lastScrollListener=this.lastScrollListener()),Cn(this.eBody),a.bodyPromise.then(e=>{this.eBody.appendChild(e);const t=!this.focusService.isKeyboardMode();if(this.params.suppressFocusBodyOnOpen||this.focusService.focusInto(this.eBody,!1,t),a.afterAttachedCallback&&a.afterAttachedCallback(this.afterAttachedParams),this.params.keepScrollPosition){const t=a.getScrollableContainer&&a.getScrollableContainer()||e;this.lastScrollListener=this.addManagedListener(t,"scroll",()=>{this.tabbedItemScrollMap.set(a.name,t.scrollTop)});const i=this.tabbedItemScrollMap.get(a.name);void 0!==i&&setTimeout(()=>{t.scrollTop=i},0)}}),this.activeItem&&(this.activeItem.eHeaderButton.classList.remove("ag-tab-selected"),null==(o=(r=this.activeItem.tabbedItem).afterDetachedCallback)||o.call(r)),l.classList.add("ag-tab-selected"),this.activeItem=e):null==(s=(n=this.params).onActiveItemClicked)||s.call(n)}};g([he("focusService")],El.prototype,"focusService",2),g([Ss("eHeader")],El.prototype,"eHeader",2),g([Ss("eBody")],El.prototype,"eBody",2),g([ae],El.prototype,"postConstruct",1);var Ml=El,Al=class extends nt{constructor(){super(...arguments),this.polyfillFunctions=[]}observeResize(e,t){const i=this.gos.getWindow(),n=()=>{var i,n;let s=null!=(i=null==e?void 0:e.clientWidth)?i:0,r=null!=(n=null==e?void 0:e.clientHeight)?n:0,o=!0;const a=()=>{var i,n;if(o){const o=null!=(i=null==e?void 0:e.clientWidth)?i:0,l=null!=(n=null==e?void 0:e.clientHeight)?n:0;(o!==s||l!==r)&&(s=o,r=l,t()),this.doNextPolyfillTurn(a)}};return a(),()=>o=!1},s=this.gos.get("suppressBrowserResizeObserver");return i.ResizeObserver&&!s?(()=>{const n=new i.ResizeObserver(t);return n.observe(e),()=>n.disconnect()})():this.getFrameworkOverrides().wrapIncoming(()=>n(),"resize-observer")}doNextPolyfillTurn(e){this.polyfillFunctions.push(e),this.schedulePolyfill()}schedulePolyfill(){this.polyfillScheduled||(this.polyfillScheduled=!0,window.setTimeout(()=>{const e=this.polyfillFunctions;this.polyfillScheduled=!1,this.polyfillFunctions=[],e.forEach(e=>e())},50))}};Al=g([ce("resizeObserverService")],Al);var Tl=class extends nt{constructor(){super(...arguments),this.createTasksP1={list:[],sorted:!1},this.createTasksP2={list:[],sorted:!1},this.destroyTasks=[],this.ticking=!1,this.scrollGoingDown=!0,this.lastPage=0,this.lastScrollTop=0,this.taskCount=0,this.cancelledTasks=new Set}setScrollTop(e){const t=this.gos.get("pagination");if(this.scrollGoingDown=e>=this.lastScrollTop,t&&0===e){const e=this.paginationProxy.getCurrentPage();e!==this.lastPage&&(this.lastPage=e,this.scrollGoingDown=!0)}this.lastScrollTop=e}init(){this.useAnimationFrame=!this.gos.get("suppressAnimationFrame")}isOn(){return this.useAnimationFrame}verifyAnimationFrameOn(e){!1===this.useAnimationFrame&&console.warn(`AG Grid: AnimationFrameService.${e} called but animation frames are off`)}createTask(e,t,i){this.verifyAnimationFrameOn(i);const n={task:e,index:t,createOrder:++this.taskCount};this.addTaskToList(this[i],n),this.schedule()}cancelTask(e){this.cancelledTasks.add(e)}addTaskToList(e,t){e.list.push(t),e.sorted=!1}sortTaskList(e){if(e.sorted)return;const t=this.scrollGoingDown?1:-1;e.list.sort((e,i)=>e.index!==i.index?t*(i.index-e.index):i.createOrder-e.createOrder),e.sorted=!0}addDestroyTask(e){this.verifyAnimationFrameOn("createTasksP3"),this.destroyTasks.push(e),this.schedule()}executeFrame(e){this.verifyAnimationFrameOn("executeFrame");const t=this.createTasksP1,i=t.list,n=this.createTasksP2,s=n.list,r=this.destroyTasks,o=(new Date).getTime();let a=(new Date).getTime()-o;const l=e<=0,c=this.ctrlsService.getGridBodyCtrl();for(;l||a<e;){if(!c.getScrollFeature().scrollGridIfNeeded()){let e;if(i.length)this.sortTaskList(t),e=i.pop().task;else if(s.length)this.sortTaskList(n),e=s.pop().task;else{if(!r.length){this.cancelledTasks.clear();break}e=r.pop()}this.cancelledTasks.has(e)||e()}a=(new Date).getTime()-o}i.length||s.length||r.length?this.requestFrame():this.stopTicking()}stopTicking(){this.ticking=!1}flushAllFrames(){this.useAnimationFrame&&this.executeFrame(-1)}schedule(){this.useAnimationFrame&&(this.ticking||(this.ticking=!0,this.requestFrame()))}requestFrame(){const e=this.executeFrame.bind(this,60);this.requestAnimationFrame(e)}requestAnimationFrame(e){const t=this.gos.getWindow();t.requestAnimationFrame?t.requestAnimationFrame(e):t.webkitRequestAnimationFrame?t.webkitRequestAnimationFrame(e):t.setTimeout(e,0)}isQueueEmpty(){return!this.ticking}debounce(e){let t=!1;return()=>{this.isOn()?t||(t=!0,this.addDestroyTask(()=>{t=!1,e()})):window.setTimeout(e,0)}}};g([he("ctrlsService")],Tl.prototype,"ctrlsService",2),g([he("paginationProxy")],Tl.prototype,"paginationProxy",2),g([ae],Tl.prototype,"init",1),Tl=g([ce("animationFrameService")],Tl);var Dl=(e=>(e.EVERYTHING="group",e.FILTER="filter",e.SORT="sort",e.MAP="map",e.AGGREGATE="aggregate",e.FILTER_AGGREGATES="filter_aggregates",e.PIVOT="pivot",e.NOTHING="nothing",e))(Dl||{}),Il=class extends nt{postConstruct(){this.isClientSideRowModel="clientSide"===this.rowModel.getType()}expandRows(e){if(!this.isClientSideRowModel)return;const t=new Set(e);this.rowModel.forEachNode(e=>{e.id&&t.has(e.id)&&(e.expanded=!0)}),this.onGroupExpandedOrCollapsed()}getExpandedRows(){const e=[];return this.rowModel.forEachNode(({expanded:t,id:i})=>{t&&i&&e.push(i)}),e}expandAll(e){this.isClientSideRowModel&&this.rowModel.expandOrCollapseAll(e)}setRowNodeExpanded(e,t,i,n){e&&(i&&e.parent&&-1!==e.parent.level&&this.setRowNodeExpanded(e.parent,t,i,n),e.setExpanded(t,void 0,n))}onGroupExpandedOrCollapsed(){this.isClientSideRowModel&&this.rowModel.refreshModel({step:"map"})}};g([he("rowModel")],Il.prototype,"rowModel",2),g([ae],Il.prototype,"postConstruct",1),Il=g([ce("expansionService")],Il);var Rl=class extends nt{postConstruct(){var e;this.activeMenuFactory=null!=(e=this.enterpriseMenuFactory)?e:this.filterMenuFactory}showColumnMenu(e){this.showColumnMenuCommon(this.activeMenuFactory,e,"columnMenu")}showFilterMenu(e){const t=this.enterpriseMenuFactory&&this.isLegacyMenuEnabled()?this.enterpriseMenuFactory:this.filterMenuFactory;this.showColumnMenuCommon(t,e,e.containerType,!0)}showHeaderContextMenu(e,t,i){this.activeMenuFactory.showMenuAfterContextMenuEvent(e,t,i)}getContextMenuPosition(e,t){const i=this.getRowCtrl(e),n=this.getCellGui(i,t);if(!n)return i?{x:0,y:i.getRowYPosition()}:{x:0,y:0};const s=n.getBoundingClientRect();return{x:s.x+s.width/2,y:s.y+s.height/2}}showContextMenu(e){var t,i,n;const{column:s,rowNode:r}=e;let{anchorToElement:o,value:a}=e;r&&s&&null==a&&(a=r.getValueFromValueService(s)),null==o&&(o=this.getContextMenuAnchorElement(r,s)),null==(n=this.contextMenuFactory)||n.onContextMenu(null!=(t=e.mouseEvent)?t:null,null!=(i=e.touchEvent)?i:null,null!=r?r:null,null!=s?s:null,a,o)}showColumnChooser(e){var t;null==(t=this.columnChooserFactory)||t.showColumnChooser(e)}hidePopupMenu(){var e;null==(e=this.contextMenuFactory)||e.hideActiveMenu(),this.activeMenuFactory.hideActiveMenu()}hideColumnChooser(){var e;null==(e=this.columnChooserFactory)||e.hideActiveColumnChooser()}isColumnMenuInHeaderEnabled(e){const{suppressMenu:t,suppressHeaderMenuButton:i}=e.getColDef();return!(null!=i?i:t)&&this.activeMenuFactory.isMenuEnabled(e)&&(this.isLegacyMenuEnabled()||!!this.enterpriseMenuFactory)}isFilterMenuInHeaderEnabled(e){return!e.getColDef().suppressHeaderFilterButton&&this.filterManager.isFilterAllowed(e)}isHeaderContextMenuEnabled(e){return!(null==e?void 0:e.getColDef().suppressHeaderContextMenu)&&"new"===this.getColumnMenuType()}isHeaderMenuButtonAlwaysShowEnabled(){return this.isSuppressMenuHide()}isHeaderMenuButtonEnabled(){const e=!this.isSuppressMenuHide();return!(Li()&&e)}isHeaderFilterButtonEnabled(e){return this.isFilterMenuInHeaderEnabled(e)&&!this.isLegacyMenuEnabled()&&!this.isFloatingFilterButtonDisplayed(e)}isFilterMenuItemEnabled(e){return this.filterManager.isFilterAllowed(e)&&!this.isLegacyMenuEnabled()&&!this.isFilterMenuInHeaderEnabled(e)&&!this.isFloatingFilterButtonDisplayed(e)}isColumnMenuAnchoringEnabled(){return!this.isLegacyMenuEnabled()}areAdditionalColumnMenuItemsEnabled(){return"new"===this.getColumnMenuType()}isLegacyMenuEnabled(){return"legacy"===this.getColumnMenuType()}isFloatingFilterButtonEnabled(e){var t;const i=e.getColDef(),n=null==(t=i.floatingFilterComponentParams)?void 0:t.suppressFilterButton;return null!=n&&z("As of v31.1, 'colDef.floatingFilterComponentParams.suppressFilterButton' is deprecated. Use 'colDef.suppressFloatingFilterButton' instead."),null==i.suppressFloatingFilterButton?!n:!i.suppressFloatingFilterButton}getColumnMenuType(){var e;return null!=(e=this.gos.get("columnMenu"))?e:"legacy"}isFloatingFilterButtonDisplayed(e){return!!e.getColDef().floatingFilter&&this.isFloatingFilterButtonEnabled(e)}isSuppressMenuHide(){const e=this.gos.get("suppressMenuHide");return this.isLegacyMenuEnabled()?e:!this.gos.exists("suppressMenuHide")||e}showColumnMenuCommon(e,t,i,n){const{column:s,positionBy:r}=t;if("button"===r){const{buttonElement:r}=t;e.showMenuAfterButtonClick(s,r,i,n)}else if("mouse"===r){const{mouseEvent:r}=t;e.showMenuAfterMouseEvent(s,r,i,n)}else s&&(this.ctrlsService.getGridBodyCtrl().getScrollFeature().ensureColumnVisible(s,"auto"),this.animationFrameService.requestAnimationFrame(()=>{const t=this.ctrlsService.getHeaderRowContainerCtrl(s.getPinned()).getHeaderCtrlForColumn(s);e.showMenuAfterButtonClick(s,t.getAnchorElementForMenu(n),i,!0)}))}getRowCtrl(e){const{rowIndex:t,rowPinned:i}=e||{};if(null!=t)return this.rowRenderer.getRowByPosition({rowIndex:t,rowPinned:i})||void 0}getCellGui(e,t){if(!e||!t)return;const i=e.getCellCtrl(t);return(null==i?void 0:i.getGui())||void 0}getContextMenuAnchorElement(e,t){const i=this.ctrlsService.getGridBodyCtrl().getGridBodyElement(),n=this.getRowCtrl(e);if(!n)return i;return this.getCellGui(n,t)||(n.isFullWidth()?n.getFullWidthElement():i)}};g([he("filterMenuFactory")],Rl.prototype,"filterMenuFactory",2),g([he("ctrlsService")],Rl.prototype,"ctrlsService",2),g([he("animationFrameService")],Rl.prototype,"animationFrameService",2),g([he("filterManager")],Rl.prototype,"filterManager",2),g([he("rowRenderer")],Rl.prototype,"rowRenderer",2),g([de("columnChooserFactory")],Rl.prototype,"columnChooserFactory",2),g([de("contextMenuFactory")],Rl.prototype,"contextMenuFactory",2),g([de("enterpriseMenuFactory")],Rl.prototype,"enterpriseMenuFactory",2),g([ae],Rl.prototype,"postConstruct",1),Rl=g([ce("menuService")],Rl);var Ll=class extends nt{postConstruct(){this.ctrlsService.whenReady(e=>{this.centerRowContainerCtrl=e.center})}getPreferredWidthForColumn(e,t){const i=this.getHeaderCellForColumn(e);if(!i)return-1;const n=this.rowRenderer.getAllCellsForColumn(e);return t||n.push(i),this.addElementsToContainerAndGetWidth(n)}getPreferredWidthForColumnGroup(e){const t=this.getHeaderCellForColumn(e);return t?this.addElementsToContainerAndGetWidth([t]):-1}addElementsToContainerAndGetWidth(e){const t=document.createElement("form");t.style.position="fixed";const i=this.centerRowContainerCtrl.getContainerElement();e.forEach(e=>this.cloneItemIntoDummy(e,t)),i.appendChild(t);const n=t.offsetWidth;return i.removeChild(t),n+this.getAutoSizePadding()}getAutoSizePadding(){return this.gos.get("autoSizePadding")}getHeaderCellForColumn(e){let t=null;return this.ctrlsService.getHeaderRowContainerCtrls().forEach(i=>{const n=i.getHtmlElementForColumnHeader(e);null!=n&&(t=n)}),t}cloneItemIntoDummy(e,t){const i=e.cloneNode(!0);i.style.width="",i.style.position="static",i.style.left="";const n=document.createElement("div"),s=n.classList;["ag-header-cell","ag-header-group-cell"].some(e=>i.classList.contains(e))?(s.add("ag-header","ag-header-row"),n.style.position="static"):s.add("ag-row");let r=e.parentElement;for(;r;){if(["ag-header-row","ag-row"].some(e=>r.classList.contains(e))){for(let e=0;e<r.classList.length;e++){const t=r.classList[e];"ag-row-position-absolute"!=t&&s.add(t)}break}r=r.parentElement}n.appendChild(i),t.appendChild(n)}};g([he("rowRenderer")],Ll.prototype,"rowRenderer",2),g([he("ctrlsService")],Ll.prototype,"ctrlsService",2),g([he("rowCssClassCalculator")],Ll.prototype,"rowCssClassCalculator",2),g([ae],Ll.prototype,"postConstruct",1),Ll=g([ce("autoWidthCalculator")],Ll);var kl=class extends nt{constructor(e,t){super(),this.createRowCon=e,this.destroyRowCtrls=t,this.stickyTopRowCtrls=[],this.stickyBottomRowCtrls=[],this.topContainerHeight=0,this.bottomContainerHeight=0}postConstruct(){this.isClientSide="clientSide"===this.rowModel.getType(),this.ctrlsService.whenReady(e=>{this.gridBodyCtrl=e.gridBodyCtrl})}getStickyTopRowCtrls(){return this.stickyTopRowCtrls}getStickyBottomRowCtrls(){return this.stickyBottomRowCtrls}getLastPixelOfGroup(e){return this.isClientSide?this.getClientSideLastPixelOfGroup(e):this.getServerSideLastPixelOfGroup(e)}getFirstPixelOfGroup(e){return e.footer?e.sibling.rowTop+e.sibling.rowHeight-1:e.hasChildren()?e.rowTop-1:0}getServerSideLastPixelOfGroup(e){var t,i,n,s;if(this.isClientSide)throw new Error("This func should only be called in server side row model.");if(e.isExpandable()||e.footer){if(e.master)return e.detailNode.rowTop+e.detailNode.rowHeight;if(!e.sibling||1===Math.abs(e.sibling.rowIndex-e.rowIndex)){let r=null==(t=e.childStore)?void 0:t.getStoreBounds();return e.footer&&(r=null==(i=e.sibling.childStore)?void 0:i.getStoreBounds()),(null!=(n=null==r?void 0:r.heightPx)?n:0)+(null!=(s=null==r?void 0:r.topPx)?s:0)}return e.footer?e.rowTop+e.rowHeight:e.sibling.rowTop+e.sibling.rowHeight}return Number.MAX_SAFE_INTEGER}getClientSideLastPixelOfGroup(e){if(!this.isClientSide)throw new Error("This func should only be called in client side row model.");if(e.isExpandable()||e.footer){const t=e.footer&&0===e.rowIndex,i=!e.sibling||1===Math.abs(e.sibling.rowIndex-e.rowIndex);if(t||i){let t=e.footer?e.sibling:e;for(;t.isExpandable()&&t.expanded;)if(t.master)t=t.detailNode;else if(t.childrenAfterSort){if(0===t.childrenAfterSort.length)break;t=De(t.childrenAfterSort)}return t.rowTop+t.rowHeight}return e.footer?e.rowTop+e.rowHeight:e.sibling.rowTop+e.sibling.rowHeight}return Number.MAX_SAFE_INTEGER}updateStickyRows(e){const t="top"===e;let i=0;if(!this.canRowsBeSticky())return this.refreshNodesAndContainerHeight(e,new Set,i);const n=t?this.rowRenderer.getFirstVisibleVerticalPixel():this.rowRenderer.getLastVisibleVerticalPixel(),s=new Set,r=e=>{if(s.add(e),t){const t=this.getLastPixelOfGroup(e),s=n+i+e.rowHeight;e.stickyRowTop=t<s?i+(t-s):i}else{const t=this.getFirstPixelOfGroup(e),s=n-(i+e.rowHeight);e.stickyRowTop=t>s?i-(t-s):i}i=0,s.forEach(e=>{const t=e.stickyRowTop+e.rowHeight;i<t&&(i=t)})},o=this.areFooterRowsStickySuppressed(),a=this.gos.get("suppressGroupRowsSticky"),l=e=>!!e.displayed&&(e.footer?!0!==o&&(("grand"!==o||-1!==e.level)&&(!("group"===o&&e.level>-1)&&!s.has(e))):!!e.isExpandable()&&(!0!==a&&(!s.has(e)&&e.expanded)));for(let e=0;e<100;e++){let e=n+i;t||(e=n-i);const s=this.rowModel.getRowIndexAtPixel(e),o=this.rowModel.getRow(s);if(null==o)break;const a=this.getStickyAncestors(o).find(e=>(t?e.rowIndex<s:e.rowIndex>s)&&l(e));if(a)r(a);else{if(!(t?o.rowTop<e:o.rowTop+o.rowHeight>e)||!l(o))break;r(o)}}return t||s.forEach(e=>{e.stickyRowTop=i-(e.stickyRowTop+e.rowHeight)}),this.refreshNodesAndContainerHeight(e,s,i)}areFooterRowsStickySuppressed(){const e=this.gos.get("suppressStickyTotalRow");if(!0===e)return!0;const t=!!this.gos.get("groupIncludeFooter")||"group"===e,i=!!this.gos.get("groupIncludeTotalFooter")||"grand"===e;return!(!t||!i)||(i?"grand":!!t&&"group")}canRowsBeSticky(){const e=this.gos.isGroupRowsSticky(),t=this.areFooterRowsStickySuppressed(),i=this.gos.get("suppressGroupRowsSticky");return e&&(!t||!i)}getStickyAncestors(e){const t=[];let i=e.footer?e.sibling:e.parent;for(;i;)i.sibling&&t.push(i.sibling),t.push(i),i=i.parent;return t.reverse()}checkStickyRows(){const e=this.updateStickyRows("top"),t=this.updateStickyRows("bottom");return e||t}destroyStickyCtrls(){this.refreshNodesAndContainerHeight("top",new Set,0),this.refreshNodesAndContainerHeight("bottom",new Set,0)}refreshStickyNode(e){const t=new Set;if(this.stickyTopRowCtrls.some(t=>t.getRowNode()===e)){for(let i=0;i<this.stickyTopRowCtrls.length;i++){const n=this.stickyTopRowCtrls[i].getRowNode();n!==e&&t.add(n)}this.refreshNodesAndContainerHeight("top",t,this.topContainerHeight)&&this.checkStickyRows()}else{for(let i=0;i<this.stickyBottomRowCtrls.length;i++){const n=this.stickyBottomRowCtrls[i].getRowNode();n!==e&&t.add(n)}this.refreshNodesAndContainerHeight("bottom",t,this.bottomContainerHeight)&&this.checkStickyRows()}}refreshNodesAndContainerHeight(e,t,i){const n="top"===e,s=n?this.stickyTopRowCtrls:this.stickyBottomRowCtrls,r={},o=[];for(let e=0;e<s.length;e++){const i=s[e].getRowNode();t.has(i)?o.push(s[e]):(r[i.id]=s[e],i.sticky=!1)}const a=new Set;for(let e=0;e<o.length;e++)a.add(o[e].getRowNode());const l=[];t.forEach(e=>{a.has(e)||(e.sticky=!0,l.push(this.createRowCon(e,!1,!1)))});let c=!!l.length||o.length!==s.length;n?this.topContainerHeight!==i&&(this.topContainerHeight=i,this.gridBodyCtrl.setStickyTopHeight(i),c=!0):this.bottomContainerHeight!==i&&(this.bottomContainerHeight=i,this.gridBodyCtrl.setStickyBottomHeight(i),c=!0),this.destroyRowCtrls(r,!1);const h=[...o,...l];return h.sort((e,t)=>t.getRowNode().rowIndex-e.getRowNode().rowIndex),n||h.reverse(),h.forEach(e=>e.setRowTop(e.getRowNode().stickyRowTop)),!!c&&(n?this.stickyTopRowCtrls=h:this.stickyBottomRowCtrls=h,!0)}};g([he("rowModel")],kl.prototype,"rowModel",2),g([he("rowRenderer")],kl.prototype,"rowRenderer",2),g([he("ctrlsService")],kl.prototype,"ctrlsService",2),g([ae],kl.prototype,"postConstruct",1);var Pl=class extends nt{constructor(){super(...arguments),this.destroyFuncsForColumnListeners=[],this.rowCtrlsByRowIndex={},this.zombieRowCtrls={},this.allRowCtrls=[],this.topRowCtrls=[],this.bottomRowCtrls=[],this.refreshInProgress=!1,this.dataFirstRenderedFired=!1,this.setupRangeSelectionListeners=()=>{const e=()=>{this.getAllCellCtrls().forEach(e=>e.onRangeSelectionChanged())},t=()=>{this.getAllCellCtrls().forEach(e=>e.updateRangeBordersIfRangeCount())},i=()=>{this.eventService.addEventListener(lt.EVENT_RANGE_SELECTION_CHANGED,e),this.eventService.addEventListener(lt.EVENT_COLUMN_MOVED,t),this.eventService.addEventListener(lt.EVENT_COLUMN_PINNED,t),this.eventService.addEventListener(lt.EVENT_COLUMN_VISIBLE,t)},n=()=>{this.eventService.removeEventListener(lt.EVENT_RANGE_SELECTION_CHANGED,e),this.eventService.removeEventListener(lt.EVENT_COLUMN_MOVED,t),this.eventService.removeEventListener(lt.EVENT_COLUMN_PINNED,t),this.eventService.removeEventListener(lt.EVENT_COLUMN_VISIBLE,t)};this.addDestroyFunc(()=>n()),this.addManagedPropertyListener("enableRangeSelection",e=>{e.currentValue?i():n()}),this.gos.get("enableRangeSelection")&&i()}}postConstruct(){this.ctrlsService.whenReady(e=>{this.gridBodyCtrl=e.gridBodyCtrl,this.initialise()})}initialise(){if(this.addManagedListener(this.eventService,lt.EVENT_PAGINATION_CHANGED,this.onPageLoaded.bind(this)),this.addManagedListener(this.eventService,lt.EVENT_PINNED_ROW_DATA_CHANGED,this.onPinnedRowDataChanged.bind(this)),this.addManagedListener(this.eventService,lt.EVENT_DISPLAYED_COLUMNS_CHANGED,this.onDisplayedColumnsChanged.bind(this)),this.addManagedListener(this.eventService,lt.EVENT_BODY_SCROLL,this.onBodyScroll.bind(this)),this.addManagedListener(this.eventService,lt.EVENT_BODY_HEIGHT_CHANGED,this.redraw.bind(this)),this.addManagedPropertyListeners(["domLayout","embedFullWidthRows"],()=>this.onDomLayoutChanged()),this.addManagedPropertyListeners(["suppressMaxRenderedRowRestriction","rowBuffer"],()=>this.redraw()),this.addManagedPropertyListeners(["suppressCellFocus","getBusinessKeyForNode","fullWidthCellRenderer","fullWidthCellRendererParams","rowStyle","getRowStyle","rowClass","getRowClass","rowClassRules","suppressStickyTotalRow","groupRowRenderer","groupRowRendererParams","loadingCellRenderer","loadingCellRendererParams","detailCellRenderer","detailCellRendererParams","enableRangeSelection","enableCellTextSelection"],()=>this.redrawRows()),this.gos.isGroupRowsSticky()){const e=this.rowModel.getType();"clientSide"!==e&&"serverSide"!==e||(this.stickyRowFeature=this.createManagedBean(new kl(this.createRowCon.bind(this),this.destroyRowCtrls.bind(this))))}this.registerCellEventListeners(),this.initialiseCache(),this.printLayout=this.gos.isDomLayout("print"),this.embedFullWidthRows=this.printLayout||this.gos.get("embedFullWidthRows"),this.redrawAfterModelUpdate()}initialiseCache(){if(this.gos.get("keepDetailRows")){const e=this.getKeepDetailRowsCount(),t=null!=e?e:3;this.cachedRowCtrls=new Nl(t)}}getKeepDetailRowsCount(){return this.gos.get("keepDetailRowsCount")}getStickyTopRowCtrls(){return this.stickyRowFeature?this.stickyRowFeature.getStickyTopRowCtrls():[]}getStickyBottomRowCtrls(){return this.stickyRowFeature?this.stickyRowFeature.getStickyBottomRowCtrls():[]}updateAllRowCtrls(){const e=N(this.rowCtrlsByRowIndex),t=N(this.zombieRowCtrls),i=this.cachedRowCtrls?this.cachedRowCtrls.getEntries():[];t.length>0||i.length>0?this.allRowCtrls=[...e,...t,...i]:this.allRowCtrls=e}onCellFocusChanged(e){this.getAllCellCtrls().forEach(t=>t.onCellFocused(e)),this.getFullWidthRowCtrls().forEach(t=>t.onFullWidthRowFocused(e))}registerCellEventListeners(){this.addManagedListener(this.eventService,lt.EVENT_CELL_FOCUSED,e=>{this.onCellFocusChanged(e)}),this.addManagedListener(this.eventService,lt.EVENT_CELL_FOCUS_CLEARED,()=>{this.onCellFocusChanged()}),this.addManagedListener(this.eventService,lt.EVENT_FLASH_CELLS,e=>{this.getAllCellCtrls().forEach(t=>t.onFlashCells(e))}),this.addManagedListener(this.eventService,lt.EVENT_COLUMN_HOVER_CHANGED,()=>{this.getAllCellCtrls().forEach(e=>e.onColumnHover())}),this.addManagedListener(this.eventService,lt.EVENT_DISPLAYED_COLUMNS_CHANGED,()=>{this.getAllCellCtrls().forEach(e=>e.onDisplayedColumnsChanged())}),this.addManagedListener(this.eventService,lt.EVENT_DISPLAYED_COLUMNS_WIDTH_CHANGED,()=>{this.printLayout&&this.getAllCellCtrls().forEach(e=>e.onLeftChanged())}),this.setupRangeSelectionListeners(),this.refreshListenersToColumnsForCellComps(),this.addManagedListener(this.eventService,lt.EVENT_GRID_COLUMNS_CHANGED,this.refreshListenersToColumnsForCellComps.bind(this)),this.addDestroyFunc(this.removeGridColumnListeners.bind(this))}removeGridColumnListeners(){this.destroyFuncsForColumnListeners.forEach(e=>e()),this.destroyFuncsForColumnListeners.length=0}refreshListenersToColumnsForCellComps(){this.removeGridColumnListeners(),this.columnModel.getAllGridColumns().forEach(e=>{const t=t=>{this.getAllCellCtrls().forEach(i=>{i.getColumn()===e&&t(i)})},i=()=>{t(e=>e.onLeftChanged())},n=()=>{t(e=>e.onWidthChanged())},s=()=>{t(e=>e.onFirstRightPinnedChanged())},r=()=>{t(e=>e.onLastLeftPinnedChanged())},o=()=>{t(e=>e.onColDefChanged())};e.addEventListener("leftChanged",i),e.addEventListener("widthChanged",n),e.addEventListener("firstRightPinnedChanged",s),e.addEventListener("lastLeftPinnedChanged",r),e.addEventListener("colDefChanged",o),this.destroyFuncsForColumnListeners.push(()=>{e.removeEventListener("leftChanged",i),e.removeEventListener("widthChanged",n),e.removeEventListener("firstRightPinnedChanged",s),e.removeEventListener("lastLeftPinnedChanged",r),e.removeEventListener("colDefChanged",o)})})}onDomLayoutChanged(){const e=this.gos.isDomLayout("print"),t=e||this.gos.get("embedFullWidthRows"),i=t!==this.embedFullWidthRows||this.printLayout!==e;this.printLayout=e,this.embedFullWidthRows=t,i&&this.redrawAfterModelUpdate({domLayoutChanged:!0})}datasourceChanged(){this.firstRenderedRow=0,this.lastRenderedRow=-1;const e=Object.keys(this.rowCtrlsByRowIndex);this.removeRowCtrls(e)}onPageLoaded(e){const t={recycleRows:e.keepRenderedRows,animate:e.animate,newData:e.newData,newPage:e.newPage,onlyBody:!0};this.redrawAfterModelUpdate(t)}getAllCellsForColumn(e){const t=[];return this.getAllRowCtrls().forEach(i=>{const n=i.getCellElement(e);n&&t.push(n)}),t}refreshFloatingRowComps(){this.refreshFloatingRows(this.topRowCtrls,this.pinnedRowModel.getPinnedTopRowData()),this.refreshFloatingRows(this.bottomRowCtrls,this.pinnedRowModel.getPinnedBottomRowData())}getTopRowCtrls(){return this.topRowCtrls}getCentreRowCtrls(){return this.allRowCtrls}getBottomRowCtrls(){return this.bottomRowCtrls}refreshFloatingRows(e,t){e.forEach(e=>{e.destroyFirstPass(),e.destroySecondPass()}),e.length=0,t&&t.forEach(t=>{const i=new va(t,this.beans,!1,!1,this.printLayout);e.push(i)})}onPinnedRowDataChanged(){this.redrawAfterModelUpdate({recycleRows:!0})}redrawRow(e,t=!1){var i;if(e.sticky)this.stickyRowFeature.refreshStickyNode(e);else{if(null==(i=this.cachedRowCtrls)?void 0:i.has(e))return void this.cachedRowCtrls.removeRow(e);{const t=t=>{const i=t[e.rowIndex];i&&i.getRowNode()===e&&(i.destroyFirstPass(),i.destroySecondPass(),t[e.rowIndex]=this.createRowCon(e,!1,!1))};switch(e.rowPinned){case"top":t(this.topRowCtrls);break;case"bottom":t(this.bottomRowCtrls);break;default:t(this.rowCtrlsByRowIndex),this.updateAllRowCtrls()}}}t||this.dispatchDisplayedRowsChanged(!1)}redrawRows(e){if(null!=e)return null==e||e.forEach(e=>this.redrawRow(e,!0)),void this.dispatchDisplayedRowsChanged(!1);this.redrawAfterModelUpdate()}getCellToRestoreFocusToAfterRefresh(e){const t=(null==e?void 0:e.suppressKeepFocus)?null:this.focusService.getFocusCellToUseAfterRefresh();if(null==t)return null;const i=this.gos.getActiveDomElement(),n=this.gos.getDomData(i,ga.DOM_DATA_KEY_CELL_CTRL),s=this.gos.getDomData(i,va.DOM_DATA_KEY_ROW_CTRL);return n||s?t:null}redrawAfterModelUpdate(e={}){this.getLockOnRefresh();const t=this.getCellToRestoreFocusToAfterRefresh(e);this.updateContainerHeights(),this.scrollToTopIfNewData(e);const i=!e.domLayoutChanged&&!!e.recycleRows,n=e.animate&&this.gos.isAnimateRows(),s=i?this.getRowsToRecycle():null;i||this.removeAllRowComps(),this.workOutFirstAndLastRowsToRender(),this.stickyRowFeature&&this.stickyRowFeature.checkStickyRows(),this.recycleRows(s,n),this.gridBodyCtrl.updateRowCount(),e.onlyBody||this.refreshFloatingRowComps(),this.dispatchDisplayedRowsChanged(),null!=t&&this.restoreFocusedCell(t),this.releaseLockOnRefresh()}scrollToTopIfNewData(e){const t=e.newData||e.newPage,i=this.gos.get("suppressScrollOnNewData");t&&!i&&this.gridBodyCtrl.getScrollFeature().scrollToTop()}updateContainerHeights(){if(this.printLayout)return void this.rowContainerHeightService.setModelHeight(null);let e=this.paginationProxy.getCurrentPageHeight();0===e&&(e=1),this.rowContainerHeightService.setModelHeight(e)}getLockOnRefresh(){if(this.refreshInProgress)throw new Error("AG Grid: cannot get grid to draw rows when it is in the middle of drawing rows. Your code probably called a grid API method while the grid was in the render stage. To overcome this, put the API call into a timeout, e.g. instead of api.redrawRows(), call setTimeout(function() { api.redrawRows(); }, 0). To see what part of your code that caused the refresh check this stacktrace.");this.refreshInProgress=!0}releaseLockOnRefresh(){this.refreshInProgress=!1}isRefreshInProgress(){return this.refreshInProgress}restoreFocusedCell(e){e&&(this.focusService.setRestoreFocusedCell(e),this.onCellFocusChanged(this.beans.gos.addGridCommonParams({rowIndex:e.rowIndex,column:e.column,rowPinned:e.rowPinned,forceBrowserFocus:!0,preventScrollOnBrowserFocus:!0,type:"mock"})))}stopEditing(e=!1){this.getAllRowCtrls().forEach(t=>{t.stopEditing(e)})}getAllCellCtrls(){const e=[],t=this.getAllRowCtrls(),i=t.length;for(let n=0;n<i;n++){const i=t[n].getAllCellCtrls(),s=i.length;for(let t=0;t<s;t++)e.push(i[t])}return e}getAllRowCtrls(){const e=this.stickyRowFeature&&this.stickyRowFeature.getStickyTopRowCtrls()||[],t=this.stickyRowFeature&&this.stickyRowFeature.getStickyBottomRowCtrls()||[],i=[...this.topRowCtrls,...this.bottomRowCtrls,...e,...t];for(const e in this.rowCtrlsByRowIndex)i.push(this.rowCtrlsByRowIndex[e]);return i}addRenderedRowListener(e,t,i){const n=this.rowCtrlsByRowIndex[t];n&&n.addEventListener(e,i)}flashCells(e={}){this.getCellCtrls(e.rowNodes,e.columns).forEach(t=>t.flashCell(e))}refreshCells(e={}){const t={forceRefresh:e.force,newData:!1,suppressFlash:e.suppressFlash};this.getCellCtrls(e.rowNodes,e.columns).forEach(e=>e.refreshOrDestroyCell(t)),e.rowNodes&&(this.getRowCtrls(e.rowNodes).forEach(e=>{e.isFullWidth()&&(e.refreshFullWidth()||this.redrawRow(e.getRowNode(),!0))}),this.dispatchDisplayedRowsChanged(!1))}getCellRendererInstances(e){var t;const i=this.getCellCtrls(e.rowNodes,e.columns).map(e=>e.getCellRenderer()).filter(e=>null!=e);if(null==(t=e.columns)?void 0:t.length)return i;const n=[],s=this.mapRowNodes(e.rowNodes);return this.getAllRowCtrls().forEach(e=>{if(s&&!this.isRowInMap(e.getRowNode(),s))return;if(!e.isFullWidth())return;const t=e.getFullWidthCellRenderers();for(let e=0;e<t.length;e++){const i=t[e];null!=i&&n.push(i)}}),[...n,...i]}getCellEditorInstances(e){const t=[];return this.getCellCtrls(e.rowNodes,e.columns).forEach(e=>{const i=e.getCellEditor();i&&t.push(i)}),t}getEditingCells(){const e=[];return this.getAllCellCtrls().forEach(t=>{if(t.isEditing()){const i=t.getCellPosition();e.push(i)}}),e}mapRowNodes(e){if(!e)return;const t={top:{},bottom:{},normal:{}};return e.forEach(e=>{const i=e.id;switch(e.rowPinned){case"top":t.top[i]=e;break;case"bottom":t.bottom[i]=e;break;default:t.normal[i]=e}}),t}isRowInMap(e,t){const i=e.id;switch(e.rowPinned){case"top":return null!=t.top[i];case"bottom":return null!=t.bottom[i];default:return null!=t.normal[i]}}getRowCtrls(e){const t=this.mapRowNodes(e),i=this.getAllRowCtrls();return e&&t?i.filter(e=>{const i=e.getRowNode();return this.isRowInMap(i,t)}):i}getCellCtrls(e,t){let i;y(t)&&(i={},t.forEach(e=>{const t=this.columnModel.getGridColumn(e);y(t)&&(i[t.getId()]=!0)}));const n=[];return this.getRowCtrls(e).forEach(e=>{e.getAllCellCtrls().forEach(e=>{const t=e.getColumn().getId();i&&!i[t]||n.push(e)})}),n}destroy(){this.removeAllRowComps(),super.destroy()}removeAllRowComps(){const e=Object.keys(this.rowCtrlsByRowIndex);this.removeRowCtrls(e),this.stickyRowFeature&&this.stickyRowFeature.destroyStickyCtrls()}getRowsToRecycle(){const e=[];L(this.rowCtrlsByRowIndex,(t,i)=>{null==i.getRowNode().id&&e.push(t)}),this.removeRowCtrls(e);const t={};return L(this.rowCtrlsByRowIndex,(e,i)=>{const n=i.getRowNode();t[n.id]=i}),this.rowCtrlsByRowIndex={},t}removeRowCtrls(e,t=!1){e.forEach(e=>{const i=this.rowCtrlsByRowIndex[e];i&&(i.destroyFirstPass(t),i.destroySecondPass()),delete this.rowCtrlsByRowIndex[e]})}onBodyScroll(e){"vertical"===e.direction&&this.redraw({afterScroll:!0})}redraw(e={}){const{afterScroll:t}=e;let i;this.stickyRowFeature&&ki()&&(i=this.getCellToRestoreFocusToAfterRefresh()||void 0);const n=this.firstRenderedRow,s=this.lastRenderedRow;this.workOutFirstAndLastRowsToRender();let r=!1;this.stickyRowFeature&&(r=this.stickyRowFeature.checkStickyRows());const o=this.firstRenderedRow!==n||this.lastRenderedRow!==s;if((!t||r||o)&&(this.getLockOnRefresh(),this.recycleRows(null,!1,t),this.releaseLockOnRefresh(),this.dispatchDisplayedRowsChanged(t&&!r),null!=i)){const e=this.getCellToRestoreFocusToAfterRefresh();null!=i&&null==e&&(this.animationFrameService.flushAllFrames(),this.restoreFocusedCell(i))}}removeRowCompsNotToDraw(e,t){const i={};e.forEach(e=>i[e]=!0);const n=Object.keys(this.rowCtrlsByRowIndex).filter(e=>!i[e]);this.removeRowCtrls(n,t)}calculateIndexesToDraw(e){let t=Ui(this.firstRenderedRow,this.lastRenderedRow);const i=(e,i)=>{const n=i.getRowNode().rowIndex;null!=n&&(n<this.firstRenderedRow||n>this.lastRenderedRow)&&this.doNotUnVirtualiseRow(i)&&t.push(n)};L(this.rowCtrlsByRowIndex,i),L(e,i),t.sort((e,t)=>e-t);const n=[];for(let e=0;e<t.length;e++){const i=t[e],s=this.paginationProxy.getRow(i);s&&!s.sticky&&n.push(i)}return n}recycleRows(e,t=!1,i=!1){const n=this.calculateIndexesToDraw(e);(this.printLayout||i)&&(t=!1),this.removeRowCompsNotToDraw(n,!t);const s=[];n.forEach(n=>{const r=this.createOrUpdateRowCtrl(n,e,t,i);y(r)&&s.push(r)}),e&&(!i||this.gos.get("suppressAnimationFrame")||this.printLayout?this.destroyRowCtrls(e,t):this.beans.animationFrameService.addDestroyTask(()=>{this.destroyRowCtrls(e,t),this.updateAllRowCtrls(),this.dispatchDisplayedRowsChanged()})),this.updateAllRowCtrls()}dispatchDisplayedRowsChanged(e=!1){const t={type:lt.EVENT_DISPLAYED_ROWS_CHANGED,afterScroll:e};this.eventService.dispatchEvent(t)}onDisplayedColumnsChanged(){const e=this.columnModel.isPinningLeft(),t=this.columnModel.isPinningRight();(this.pinningLeft!==e||t!==this.pinningRight)&&(this.pinningLeft=e,this.pinningRight=t,this.embedFullWidthRows&&this.redrawFullWidthEmbeddedRows())}redrawFullWidthEmbeddedRows(){const e=[];this.getFullWidthRowCtrls().forEach(t=>{const i=t.getRowNode().rowIndex;e.push(i.toString())}),this.refreshFloatingRowComps(),this.removeRowCtrls(e),this.redraw({afterScroll:!0})}getFullWidthRowCtrls(e){const t=this.mapRowNodes(e);return this.getAllRowCtrls().filter(e=>{if(!e.isFullWidth())return!1;const i=e.getRowNode();return!(null!=t&&!this.isRowInMap(i,t))})}createOrUpdateRowCtrl(e,t,i,n){let s,r=this.rowCtrlsByRowIndex[e];if(r||(s=this.paginationProxy.getRow(e),y(s)&&y(t)&&t[s.id]&&s.alreadyRendered&&(r=t[s.id],t[s.id]=null)),!r){if(s||(s=this.paginationProxy.getRow(e)),!y(s))return;r=this.createRowCon(s,i,n)}return s&&(s.alreadyRendered=!0),this.rowCtrlsByRowIndex[e]=r,r}destroyRowCtrls(e,t){const i=[];L(e,(e,n)=>{n&&(this.cachedRowCtrls&&n.isCacheable()?this.cachedRowCtrls.addRow(n):(n.destroyFirstPass(!t),t?(this.zombieRowCtrls[n.getInstanceId()]=n,i.push(()=>{n.destroySecondPass(),delete this.zombieRowCtrls[n.getInstanceId()]})):n.destroySecondPass()))}),t&&(i.push(()=>{this.updateAllRowCtrls(),this.dispatchDisplayedRowsChanged()}),K(i))}getRowBuffer(){return this.gos.get("rowBuffer")}getRowBufferInPixels(){return this.getRowBuffer()*this.gos.getRowHeightAsNumber()}workOutFirstAndLastRowsToRender(){let e,t;if(this.rowContainerHeightService.updateOffset(),this.paginationProxy.isRowsToRender())if(this.printLayout)this.environment.refreshRowHeightVariable(),e=this.paginationProxy.getPageFirstRow(),t=this.paginationProxy.getPageLastRow();else{const i=this.getRowBufferInPixels(),n=this.ctrlsService.getGridBodyCtrl(),s=this.gos.get("suppressRowVirtualisation");let r,o,a=!1;do{const e=this.paginationProxy.getPixelOffset(),{pageFirstPixel:t,pageLastPixel:l}=this.paginationProxy.getCurrentPagePixelRange(),c=this.rowContainerHeightService.getDivStretchOffset(),h=n.getScrollFeature().getVScrollPosition(),d=h.top,u=h.bottom;s?(r=t+c,o=l+c):(r=Math.max(d+e-i,t)+c,o=Math.min(u+e+i,l)+c),this.firstVisibleVPixel=Math.max(d+e,t)+c,this.lastVisibleVPixel=Math.min(u+e,l)+c,a=this.ensureAllRowsInRangeHaveHeightsCalculated(r,o)}while(a);let l=this.paginationProxy.getRowIndexAtPixel(r),c=this.paginationProxy.getRowIndexAtPixel(o);const h=this.paginationProxy.getPageFirstRow(),d=this.paginationProxy.getPageLastRow();l<h&&(l=h),c>d&&(c=d),e=l,t=c}else e=0,t=-1;const i=this.gos.isDomLayout("normal"),n=this.gos.get("suppressMaxRenderedRowRestriction"),s=Math.max(this.getRowBuffer(),500);i&&!n&&t-e>s&&(t=e+s);const r=e!==this.firstRenderedRow,o=t!==this.lastRenderedRow;if(r||o){this.firstRenderedRow=e,this.lastRenderedRow=t;const i={type:lt.EVENT_VIEWPORT_CHANGED,firstRow:e,lastRow:t};this.eventService.dispatchEvent(i)}}dispatchFirstDataRenderedEvent(){if(this.dataFirstRenderedFired)return;this.dataFirstRenderedFired=!0;const e={type:lt.EVENT_FIRST_DATA_RENDERED,firstRow:this.firstRenderedRow,lastRow:this.lastRenderedRow};window.requestAnimationFrame(()=>{this.beans.eventService.dispatchEvent(e)})}ensureAllRowsInRangeHaveHeightsCalculated(e,t){const i=this.paginationProxy.ensureRowHeightsValid(e,t,-1,-1);return i&&this.updateContainerHeights(),i}getFirstVisibleVerticalPixel(){return this.firstVisibleVPixel}getLastVisibleVerticalPixel(){return this.lastVisibleVPixel}getFirstVirtualRenderedRow(){return this.firstRenderedRow}getLastVirtualRenderedRow(){return this.lastRenderedRow}doNotUnVirtualiseRow(e){const t=!1,i=e.getRowNode(),n=this.focusService.isRowNodeFocused(i),s=e.isEditing(),r=i.detail;return(n||s||r)&&!!this.paginationProxy.isRowPresent(i)||t}createRowCon(e,t,i){const n=this.cachedRowCtrls?this.cachedRowCtrls.getRow(e):null;if(n)return n;const s=this.gos.get("suppressAnimationFrame"),r=i&&!s&&!this.printLayout;return new va(e,this.beans,t,r,this.printLayout)}getRenderedNodes(){const e=this.rowCtrlsByRowIndex;return Object.values(e).map(e=>e.getRowNode())}getRowByPosition(e){let t;const{rowIndex:i}=e;switch(e.rowPinned){case"top":t=this.topRowCtrls[i];break;case"bottom":t=this.bottomRowCtrls[i];break;default:t=this.rowCtrlsByRowIndex[i],t||(t=this.getStickyTopRowCtrls().find(e=>e.getRowNode().rowIndex===i)||null,t||(t=this.getStickyBottomRowCtrls().find(e=>e.getRowNode().rowIndex===i)||null))}return t}isRangeInRenderedViewport(e,t){if(null==e||null==t)return!1;const i=e>this.lastRenderedRow;return!(t<this.firstRenderedRow||i)}};g([he("animationFrameService")],Pl.prototype,"animationFrameService",2),g([he("paginationProxy")],Pl.prototype,"paginationProxy",2),g([he("columnModel")],Pl.prototype,"columnModel",2),g([he("pinnedRowModel")],Pl.prototype,"pinnedRowModel",2),g([he("rowModel")],Pl.prototype,"rowModel",2),g([he("focusService")],Pl.prototype,"focusService",2),g([he("beans")],Pl.prototype,"beans",2),g([he("rowContainerHeightService")],Pl.prototype,"rowContainerHeightService",2),g([he("ctrlsService")],Pl.prototype,"ctrlsService",2),g([ae],Pl.prototype,"postConstruct",1),Pl=g([ce("rowRenderer")],Pl);var Nl=class{constructor(e){this.entriesMap={},this.entriesList=[],this.maxCount=e}addRow(e){if(this.entriesMap[e.getRowNode().id]=e,this.entriesList.push(e),e.setCached(!0),this.entriesList.length>this.maxCount){const e=this.entriesList[0];e.destroyFirstPass(),e.destroySecondPass(),this.removeFromCache(e)}}getRow(e){if(null==e||null==e.id)return null;const t=this.entriesMap[e.id];return t?(this.removeFromCache(t),t.setCached(!1),t.getRowNode()!=e?null:t):null}has(e){return null!=this.entriesMap[e.id]}removeRow(e){const t=e.id,i=this.entriesMap[t];delete this.entriesMap[t],Ne(this.entriesList,i)}removeFromCache(e){const t=e.getRowNode().id;delete this.entriesMap[t],Ne(this.entriesList,e)}getEntries(){return this.entriesList}},Ol=class extends nt{init(){this.setPinnedTopRowData(),this.setPinnedBottomRowData(),this.addManagedPropertyListener("pinnedTopRowData",()=>this.setPinnedTopRowData()),this.addManagedPropertyListener("pinnedBottomRowData",()=>this.setPinnedBottomRowData())}isEmpty(e){return b("top"===e?this.pinnedTopRows:this.pinnedBottomRows)}isRowsToRender(e){return!this.isEmpty(e)}getRowAtPixel(e,t){const i="top"===t?this.pinnedTopRows:this.pinnedBottomRows;if(b(i))return 0;for(let t=0;t<i.length;t++){const n=i[t];if(n.rowTop+n.rowHeight-1>=e)return t}return i.length-1}setPinnedTopRowData(){const e=this.gos.get("pinnedTopRowData");this.pinnedTopRows=this.createNodesFromData(e,!0);const t={type:lt.EVENT_PINNED_ROW_DATA_CHANGED};this.eventService.dispatchEvent(t)}setPinnedBottomRowData(){const e=this.gos.get("pinnedBottomRowData");this.pinnedBottomRows=this.createNodesFromData(e,!1);const t={type:lt.EVENT_PINNED_ROW_DATA_CHANGED};this.eventService.dispatchEvent(t)}createNodesFromData(e,t){const i=[];if(e){let n=0;e.forEach((e,s)=>{const r=new Pr(this.beans);r.data=e;const o=t?Pr.ID_PREFIX_TOP_PINNED:Pr.ID_PREFIX_BOTTOM_PINNED;r.id=o+s,r.rowPinned=t?"top":"bottom",r.setRowTop(n),r.setRowHeight(this.gos.getRowHeightForNode(r).height),r.setRowIndex(s),n+=r.rowHeight,i.push(r)})}return i}getPinnedTopRowData(){return this.pinnedTopRows}getPinnedBottomRowData(){return this.pinnedBottomRows}getPinnedTopTotalHeight(){return this.getTotalHeight(this.pinnedTopRows)}getPinnedTopRowCount(){return this.pinnedTopRows?this.pinnedTopRows.length:0}getPinnedBottomRowCount(){return this.pinnedBottomRows?this.pinnedBottomRows.length:0}getPinnedTopRow(e){return this.pinnedTopRows[e]}getPinnedBottomRow(e){return this.pinnedBottomRows[e]}forEachPinnedTopRow(e){b(this.pinnedTopRows)||this.pinnedTopRows.forEach(e)}forEachPinnedBottomRow(e){b(this.pinnedBottomRows)||this.pinnedBottomRows.forEach(e)}getPinnedBottomTotalHeight(){return this.getTotalHeight(this.pinnedBottomRows)}getTotalHeight(e){if(!e||0===e.length)return 0;const t=De(e);return t.rowTop+t.rowHeight}};g([he("beans")],Ol.prototype,"beans",2),g([ae],Ol.prototype,"init",1),Ol=g([ce("pinnedRowModel")],Ol);var _l=(e=>(e.Applied="Applied",e.StoreNotFound="StoreNotFound",e.StoreLoading="StoreLoading",e.StoreWaitingToLoad="StoreWaitingToLoad",e.StoreLoadingFailed="StoreLoadingFailed",e.StoreWrongType="StoreWrongType",e.Cancelled="Cancelled",e.StoreNotStarted="StoreNotStarted",e))(_l||{}),Fl=class{constructor(e,t){this.active=!0,this.nodeIdsToColumns={},this.mapToItems={},this.keepingColumns=e,this.pathRoot={rowNode:t,children:null},this.mapToItems[t.id]=this.pathRoot}setInactive(){this.active=!1}isActive(){return this.active}depthFirstSearchChangedPath(e,t){if(e.children)for(let i=0;i<e.children.length;i++)this.depthFirstSearchChangedPath(e.children[i],t);t(e.rowNode)}depthFirstSearchEverything(e,t,i){if(e.childrenAfterGroup)for(let n=0;n<e.childrenAfterGroup.length;n++){const s=e.childrenAfterGroup[n];s.childrenAfterGroup?this.depthFirstSearchEverything(e.childrenAfterGroup[n],t,i):i&&t(s)}t(e)}forEachChangedNodeDepthFirst(e,t=!1,i=!1){this.active&&!i?this.depthFirstSearchChangedPath(this.pathRoot,e):this.depthFirstSearchEverything(this.pathRoot.rowNode,e,t)}executeFromRootNode(e){e(this.pathRoot.rowNode)}createPathItems(e){let t=e,i=0;for(;!this.mapToItems[t.id];){const e={rowNode:t,children:null};this.mapToItems[t.id]=e,i++,t=t.parent}return i}populateColumnsMap(e,t){if(!this.keepingColumns||!t)return;let i=e;for(;i;)this.nodeIdsToColumns[i.id]||(this.nodeIdsToColumns[i.id]={}),t.forEach(e=>this.nodeIdsToColumns[i.id][e.getId()]=!0),i=i.parent}linkPathItems(e,t){let i=e;for(let e=0;e<t;e++){const e=this.mapToItems[i.id],t=this.mapToItems[i.parent.id];t.children||(t.children=[]),t.children.push(e),i=i.parent}}addParentNode(e,t){if(!e||e.isRowPinned())return;const i=this.createPathItems(e);this.linkPathItems(e,i),this.populateColumnsMap(e,t)}canSkip(e){return this.active&&!this.mapToItems[e.id]}getValueColumnsForNode(e,t){if(!this.keepingColumns)return t;const i=this.nodeIdsToColumns[e.id];return t.filter(e=>i[e.getId()])}getNotValueColumnsForNode(e,t){if(!this.keepingColumns)return null;const i=this.nodeIdsToColumns[e.id];return t.filter(e=>!i[e.getId()])}},Gl=class e extends nt{constructor(t){super(),this.state=e.STATE_WAITING_TO_LOAD,this.version=0,this.id=t}getId(){return this.id}load(){this.state=e.STATE_LOADING,this.loadFromDatasource()}getVersion(){return this.version}setStateWaitingToLoad(){this.version++,this.state=e.STATE_WAITING_TO_LOAD}getState(){return this.state}pageLoadFailed(t){this.isRequestMostRecentAndLive(t)&&(this.state=e.STATE_FAILED,this.processServerFail()),this.dispatchLoadCompleted(!1)}success(e,t){this.successCommon(e,t)}pageLoaded(e,t,i){this.successCommon(e,{rowData:t,rowCount:i})}isRequestMostRecentAndLive(e){const t=e===this.version,i=this.isAlive();return t&&i}successCommon(t,i){this.dispatchLoadCompleted(),this.isRequestMostRecentAndLive(t)&&(this.state=e.STATE_LOADED,this.processServerResult(i))}dispatchLoadCompleted(t=!0){const i={type:e.EVENT_LOAD_COMPLETE,success:t,block:this};this.dispatchEvent(i)}};Gl.EVENT_LOAD_COMPLETE="loadComplete",Gl.STATE_WAITING_TO_LOAD="needsLoading",Gl.STATE_LOADING="loading",Gl.STATE_LOADED="loaded",Gl.STATE_FAILED="failed";var Vl=Gl,Bl=class extends nt{constructor(){super(...arguments),this.activeBlockLoadsCount=0,this.blocks=[],this.active=!0}postConstruct(){this.maxConcurrentRequests=this.getMaxConcurrentDatasourceRequests();const e=this.gos.get("blockLoadDebounceMillis");e&&e>0&&(this.checkBlockToLoadDebounce=ls.debounce(this.performCheckBlocksToLoad.bind(this),e))}setBeans(e){this.logger=e.create("RowNodeBlockLoader")}getMaxConcurrentDatasourceRequests(){const e=this.gos.get("maxConcurrentDatasourceRequests");return null==e?2:e<=0?void 0:e}addBlock(e){this.blocks.push(e),e.addEventListener(Vl.EVENT_LOAD_COMPLETE,this.loadComplete.bind(this)),this.checkBlockToLoad()}removeBlock(e){ls.removeFromArray(this.blocks,e)}destroy(){super.destroy(),this.active=!1}loadComplete(){this.activeBlockLoadsCount--,this.checkBlockToLoad(),this.dispatchEvent({type:Bl.BLOCK_LOADED_EVENT}),0==this.activeBlockLoadsCount&&this.dispatchEvent({type:Bl.BLOCK_LOADER_FINISHED_EVENT})}checkBlockToLoad(){this.checkBlockToLoadDebounce?this.checkBlockToLoadDebounce():this.performCheckBlocksToLoad()}performCheckBlocksToLoad(){if(!this.active)return;if(this.printCacheStatus(),null!=this.maxConcurrentRequests&&this.activeBlockLoadsCount>=this.maxConcurrentRequests)return void this.logger.log("checkBlockToLoad: max loads exceeded");const e=this.getAvailableLoadingCount(),t=this.blocks.filter(e=>e.getState()===Vl.STATE_WAITING_TO_LOAD).slice(0,e);this.registerLoads(t.length),t.forEach(e=>e.load()),this.printCacheStatus()}getBlockState(){if(this.gos.isRowModelType("serverSide"))return this.rowModel.getBlockStates();const e={};return this.blocks.forEach(t=>{const{id:i,state:n}=t.getBlockStateJson();e[i]=n}),e}printCacheStatus(){this.logger.isLogging()&&this.logger.log(`printCacheStatus: activePageLoadsCount = ${this.activeBlockLoadsCount}, blocks = ${JSON.stringify(this.getBlockState())}`)}isLoading(){return this.activeBlockLoadsCount>0}registerLoads(e){this.activeBlockLoadsCount+=e}getAvailableLoadingCount(){return void 0!==this.maxConcurrentRequests?this.maxConcurrentRequests-this.activeBlockLoadsCount:void 0}};Bl.BLOCK_LOADED_EVENT="blockLoaded",Bl.BLOCK_LOADER_FINISHED_EVENT="blockLoaderFinished",g([he("rowModel")],Bl.prototype,"rowModel",2),g([ae],Bl.prototype,"postConstruct",1),g([f(0,pe("loggerFactory"))],Bl.prototype,"setBeans",1),Bl=g([ce("rowNodeBlockLoader")],Bl);var Hl=class extends nt{constructor(){super(...arguments),this.currentPage=0,this.topDisplayedRowIndex=0,this.bottomDisplayedRowIndex=0,this.pixelOffset=0,this.masterRowCount=0}postConstruct(){this.active=this.gos.get("pagination"),this.pageSizeFromGridOptions=this.gos.get("paginationPageSize"),this.paginateChildRows=this.isPaginateChildRows(),this.addManagedListener(this.eventService,lt.EVENT_MODEL_UPDATED,this.onModelUpdated.bind(this)),this.addManagedPropertyListener("pagination",this.onPaginationGridOptionChanged.bind(this)),this.addManagedPropertyListener("paginationPageSize",this.onPageSizeGridOptionChanged.bind(this)),this.onModelUpdated()}ensureRowHeightsValid(e,t,i,n){const s=this.rowModel.ensureRowHeightsValid(e,t,this.getPageFirstRow(),this.getPageLastRow());return s&&this.calculatePages(),s}isPaginateChildRows(){return!(!this.gos.get("groupRemoveSingleChildren")&&!this.gos.get("groupRemoveLowestSingleChildren"))||this.gos.get("paginateChildRows")}onModelUpdated(e){this.calculatePages();const t={type:lt.EVENT_PAGINATION_CHANGED,animate:!!e&&e.animate,newData:!!e&&e.newData,newPage:!!e&&e.newPage,newPageSize:!!e&&e.newPageSize,keepRenderedRows:!!e&&e.keepRenderedRows};this.eventService.dispatchEvent(t)}onPaginationGridOptionChanged(){this.active=this.gos.get("pagination"),this.calculatePages();const e={type:lt.EVENT_PAGINATION_CHANGED,animate:!1,newData:!1,newPage:!1,newPageSize:!1,keepRenderedRows:!0};this.eventService.dispatchEvent(e)}onPageSizeGridOptionChanged(){this.setPageSize(this.gos.get("paginationPageSize"),"gridOptions")}goToPage(e){if(!this.active||this.currentPage===e||"number"!=typeof this.currentPage)return;this.currentPage=e,this.calculatePages();const t={type:lt.EVENT_PAGINATION_CHANGED,animate:!1,newData:!1,newPage:!0,newPageSize:!1,keepRenderedRows:!1};this.eventService.dispatchEvent(t)}getPixelOffset(){return this.pixelOffset}getRow(e){return this.rowModel.getRow(e)}getRowNode(e){return this.rowModel.getRowNode(e)}getRowIndexAtPixel(e){return this.rowModel.getRowIndexAtPixel(e)}getCurrentPageHeight(){return C(this.topRowBounds)||C(this.bottomRowBounds)?0:Math.max(this.bottomRowBounds.rowTop+this.bottomRowBounds.rowHeight-this.topRowBounds.rowTop,0)}getCurrentPagePixelRange(){return{pageFirstPixel:this.topRowBounds?this.topRowBounds.rowTop:0,pageLastPixel:this.bottomRowBounds?this.bottomRowBounds.rowTop+this.bottomRowBounds.rowHeight:0}}isRowPresent(e){return!!this.rowModel.isRowPresent(e)&&(e.rowIndex>=this.topDisplayedRowIndex&&e.rowIndex<=this.bottomDisplayedRowIndex)}isEmpty(){return this.rowModel.isEmpty()}isRowsToRender(){return this.rowModel.isRowsToRender()}forEachNode(e){return this.rowModel.forEachNode(e)}forEachNodeOnPage(e){const t=this.getPageFirstRow(),i=this.getPageLastRow();for(let n=t;n<=i;n++){const t=this.getRow(n);t&&e(t)}}getType(){return this.rowModel.getType()}getRowBounds(e){const t=this.rowModel.getRowBounds(e);return t.rowIndex=e,t}getPageFirstRow(){return this.topRowBounds?this.topRowBounds.rowIndex:-1}getPageLastRow(){return this.bottomRowBounds?this.bottomRowBounds.rowIndex:-1}getRowCount(){return this.rowModel.getRowCount()}getPageForIndex(e){return Math.floor(e/this.pageSize)}goToPageWithIndex(e){if(!this.active)return;const t=this.getPageForIndex(e);this.goToPage(t)}isRowInPage(e){return!this.active||this.getPageForIndex(e.rowIndex)===this.currentPage}isLastPageFound(){return this.rowModel.isLastRowIndexKnown()}getCurrentPage(){return this.currentPage}goToNextPage(){this.goToPage(this.currentPage+1)}goToPreviousPage(){this.goToPage(this.currentPage-1)}goToFirstPage(){this.goToPage(0)}goToLastPage(){const e=this.rowModel.getRowCount(),t=Math.floor(e/this.pageSize);this.goToPage(t)}getPageSize(){return this.pageSize}getTotalPages(){return this.totalPages}setPage(e){this.currentPage=e}get pageSize(){return y(this.pageSizeAutoCalculated)?this.pageSizeAutoCalculated:y(this.pageSizeFromPageSizeSelector)?this.pageSizeFromPageSizeSelector:y(this.pageSizeFromInitialState)?this.pageSizeFromInitialState:y(this.pageSizeFromGridOptions)?this.pageSizeFromGridOptions:this.defaultPageSize}unsetAutoCalculatedPageSize(){if(void 0===this.pageSizeAutoCalculated)return;const e=this.pageSizeAutoCalculated;if(this.pageSizeAutoCalculated=void 0,this.pageSize===e)return;this.calculatePages();const t={type:lt.EVENT_PAGINATION_CHANGED,animate:!1,newData:!1,newPage:!1,newPageSize:!0,keepRenderedRows:!1};this.eventService.dispatchEvent(t)}setPageSize(e,t){const i=this.pageSize;switch(t){case"autoCalculated":this.pageSizeAutoCalculated=e;break;case"pageSizeSelector":this.pageSizeFromPageSizeSelector=e,0!==this.currentPage&&this.goToFirstPage();break;case"initialState":this.pageSizeFromInitialState=e;break;case"gridOptions":this.pageSizeFromGridOptions=e,this.pageSizeFromInitialState=void 0,this.pageSizeFromPageSizeSelector=void 0,0!==this.currentPage&&this.goToFirstPage()}if(i!==this.pageSize){this.calculatePages();const e={type:lt.EVENT_PAGINATION_CHANGED,animate:!1,newData:!1,newPage:!1,newPageSize:!0,keepRenderedRows:!0};this.eventService.dispatchEvent(e)}}calculatePages(){this.active?this.paginateChildRows?this.calculatePagesAllRows():this.calculatePagesMasterRowsOnly():this.calculatedPagesNotActive(),this.topRowBounds=this.rowModel.getRowBounds(this.topDisplayedRowIndex),this.topRowBounds&&(this.topRowBounds.rowIndex=this.topDisplayedRowIndex),this.bottomRowBounds=this.rowModel.getRowBounds(this.bottomDisplayedRowIndex),this.bottomRowBounds&&(this.bottomRowBounds.rowIndex=this.bottomDisplayedRowIndex),this.setPixelOffset(y(this.topRowBounds)?this.topRowBounds.rowTop:0)}setPixelOffset(e){this.pixelOffset!==e&&(this.pixelOffset=e,this.eventService.dispatchEvent({type:lt.EVENT_PAGINATION_PIXEL_OFFSET_CHANGED}))}setZeroRows(){this.masterRowCount=0,this.topDisplayedRowIndex=0,this.bottomDisplayedRowIndex=-1,this.currentPage=0,this.totalPages=0}adjustCurrentPageIfInvalid(){this.currentPage>=this.totalPages&&(this.currentPage=this.totalPages-1),(!isFinite(this.currentPage)||isNaN(this.currentPage)||this.currentPage<0)&&(this.currentPage=0)}calculatePagesMasterRowsOnly(){if(this.masterRowCount=this.rowModel.getTopLevelRowCount(),this.masterRowCount<=0)return void this.setZeroRows();const e=this.masterRowCount-1;this.totalPages=Math.floor(e/this.pageSize)+1,this.adjustCurrentPageIfInvalid();const t=this.pageSize*this.currentPage;let i=this.pageSize*(this.currentPage+1)-1;if(i>e&&(i=e),this.topDisplayedRowIndex=this.rowModel.getTopLevelRowDisplayedIndex(t),i===e)this.bottomDisplayedRowIndex=this.rowModel.getRowCount()-1;else{const e=this.rowModel.getTopLevelRowDisplayedIndex(i+1);this.bottomDisplayedRowIndex=e-1}}getMasterRowCount(){return this.masterRowCount}calculatePagesAllRows(){if(this.masterRowCount=this.rowModel.getRowCount(),0===this.masterRowCount)return void this.setZeroRows();const e=this.masterRowCount-1;this.totalPages=Math.floor(e/this.pageSize)+1,this.adjustCurrentPageIfInvalid(),this.topDisplayedRowIndex=this.pageSize*this.currentPage,this.bottomDisplayedRowIndex=this.pageSize*(this.currentPage+1)-1,this.bottomDisplayedRowIndex>e&&(this.bottomDisplayedRowIndex=e)}calculatedPagesNotActive(){this.setPageSize(void 0,"autoCalculated"),this.totalPages=1,this.currentPage=0,this.topDisplayedRowIndex=0,this.bottomDisplayedRowIndex=this.rowModel.getRowCount()-1}};g([he("rowModel")],Hl.prototype,"rowModel",2),g([ae],Hl.prototype,"postConstruct",1),Hl=g([ce("paginationProxy")],Hl);var zl=class extends nt{processAllCellClasses(e,t,i,n){this.processClassRules(void 0,e.cellClassRules,t,i,n),this.processStaticCellClasses(e,t,i)}processClassRules(e,t,i,n,s){if(null==t&&null==e)return;const r={},o={},a=(e,t)=>{e.split(" ").forEach(e=>{""!=e.trim()&&t(e)})};if(t){const e=Object.keys(t);for(let n=0;n<e.length;n++){const s=e[n],l=t[s];let c;"string"==typeof l?c=this.expressionService.evaluate(l,i):"function"==typeof l&&(c=l(i)),a(s,e=>{c?r[e]=!0:o[e]=!0})}}e&&s&&Object.keys(e).forEach(e=>a(e,e=>{r[e]||(o[e]=!0)})),s&&Object.keys(o).forEach(s),Object.keys(r).forEach(n)}getStaticCellClasses(e,t){const{cellClass:i}=e;if(!i)return[];let n;return n="function"==typeof i?i(t):i,"string"==typeof n&&(n=[n]),n||[]}processStaticCellClasses(e,t,i){this.getStaticCellClasses(e,t).forEach(e=>{i(e)})}};g([he("expressionService")],zl.prototype,"expressionService",2),zl=g([ce("stylingService")],zl);var Ul=class extends zs{constructor(e){super(e,"ag-toggle-button")}setValue(e,t){return super.setValue(e,t),this.addOrRemoveCssClass("ag-selected",this.getValue()),this}},Wl=class extends Hs{constructor(e){super(e,"ag-text-area",null,"textarea")}setValue(e,t){const i=super.setValue(e,t);return this.eInput.value=e,i}setCols(e){return this.eInput.cols=e,this}setRows(e){return this.eInput.rows=e,this}},jl=class extends tr{constructor(e){super(e,"ag-date-field","date")}postConstruct(){super.postConstruct(),this.addManagedListener(this.eInput,"wheel",this.onWheel.bind(this));const e=Ai();this.addManagedListener(this.eInput,"mousedown",()=>{this.isDisabled()||e||this.eInput.focus()}),this.eInput.step="any"}onWheel(e){this.gos.getActiveDomElement()===this.eInput&&e.preventDefault()}setMin(e){var t;const i=e instanceof Date?null!=(t=qi(null!=e?e:null,!1))?t:void 0:e;return this.min===i||(this.min=i,Gn(this.eInput,"min",i)),this}setMax(e){var t;const i=e instanceof Date?null!=(t=qi(null!=e?e:null,!1))?t:void 0:e;return this.max===i||(this.max=i,Gn(this.eInput,"max",i)),this}setStep(e){return this.step===e||(this.step=e,Gn(this.eInput,"step",e)),this}getDate(){var e;if(this.eInput.validity.valid)return null!=(e=Qi(this.getValue()))?e:void 0}setDate(e,t){this.setValue(qi(null!=e?e:null,!1),t)}},Kl=class extends Hs{constructor(e){super(e,"ag-range-field","range")}postConstruct(){super.postConstruct();const{min:e,max:t,step:i}=this.config;null!=e&&this.setMinValue(e),null!=t&&this.setMaxValue(t),this.setStep(i||1)}addInputListeners(){this.addManagedListener(this.eInput,"input",e=>{const t=e.target.value;this.setValue(t)})}setMinValue(e){return this.min=e,this.eInput.setAttribute("min",e.toString()),this}setMaxValue(e){return this.max=e,this.eInput.setAttribute("max",e.toString()),this}setStep(e){return this.eInput.setAttribute("step",e.toString()),this}setValue(e,t){null!=this.min&&(e=Math.max(parseFloat(e),this.min).toString()),null!=this.max&&(e=Math.min(parseFloat(e),this.max).toString());const i=super.setValue(e,t);return this.eInput.value=e,i}},$l=class extends Cs{constructor(e,t){super('<div class="ag-rich-select-row" role="presentation"></div>'),this.params=e,this.wrapperEl=t}postConstruct(){this.addManagedListener(this.getGui(),"click",this.onClick.bind(this))}setState(e){let t="";this.params.valueFormatter&&(t=this.params.valueFormatter(e)),this.populateWithRenderer(e,t)||this.populateWithoutRenderer(e,t),this.value=e}highlightString(e){const{parsedValue:t}=this;if(this.params.cellRenderer||!y(t))return;let i=y(e);if(i){const n=null==t?void 0:t.toLocaleLowerCase().indexOf(e.toLocaleLowerCase());if(n>=0){const i=n+e.length,s=yt(t.slice(0,n),!0),r=yt(t.slice(n,i),!0),o=yt(t.slice(i));this.renderValueWithoutRenderer(`${s}<span class="ag-rich-select-row-text-highlight">${r}</span>${o}`)}else i=!1}i||this.renderValueWithoutRenderer(t)}updateHighlighted(e){var t;const i=this.getGui(),n=`ag-rich-select-row-${this.getCompId()}`;null==(t=i.parentElement)||t.setAttribute("id",n),e&&(ei(this.getParentComponent().getAriaElement(),n),this.wrapperEl.setAttribute("data-active-option",n)),pi(i.parentElement,e),this.addOrRemoveCssClass("ag-rich-select-row-selected",e)}populateWithoutRenderer(e,t){const i=this.gos.getDocument(),n=this.getGui(),s=i.createElement("span");s.style.overflow="hidden",s.style.textOverflow="ellipsis";const r=yt(y(t)?t:e,!0);this.parsedValue=y(r)?r:null,n.appendChild(s),this.renderValueWithoutRenderer(r),this.setTooltip({newTooltipText:this.parsedValue,shouldDisplayTooltip:()=>s.scrollWidth>s.clientWidth})}renderValueWithoutRenderer(e){const t=this.getGui().querySelector("span");t&&(t.innerHTML=y(e)?e:"&nbsp;")}populateWithRenderer(e,t){let i,n;return this.params.cellRenderer&&(n=this.userComponentFactory.getCellRendererDetails(this.params,{value:e,valueFormatted:t,setTooltip:(e,t)=>{this.setTooltip({newTooltipText:e,shouldDisplayTooltip:t})}})),n&&(i=n.newAgStackInstance()),i&&Bn(i,this.getGui()),!!i&&(i.then(e=>{this.addDestroyFunc(()=>{this.getContext().destroyBean(e)})}),!0)}onClick(){const e=this.getParentComponent(),t={type:lt.EVENT_FIELD_PICKER_VALUE_SELECTED,fromEnterKey:!1,value:this.value};null==e||e.dispatchEvent(t)}};g([he("userComponentFactory")],$l.prototype,"userComponentFactory",2),g([ae],$l.prototype,"postConstruct",1);var Yl=class e extends xl{constructor(t){super(e.getTemplate((null==t?void 0:t.cssIdentifier)||"default")),this.renderedRows=new Map,this.rowHeight=20,this.pageSize=-1,this.isScrolling=!1,this.isHeightFromTheme=!0;const{cssIdentifier:i="default",ariaRole:n="listbox",listName:s}=t||{};this.cssIdentifier=i,this.ariaRole=n,this.listName=s}postConstruct(){this.addScrollListener(),this.rowHeight=this.getItemHeight(),this.addResizeObserver(),this.initialiseTabGuard({onFocusIn:e=>this.onFocusIn(e),onFocusOut:e=>this.onFocusOut(e),focusInnerElement:e=>this.focusInnerElement(e),onTabKeyDown:e=>this.onTabKeyDown(e),handleKeyDown:e=>this.handleKeyDown(e)}),this.setAriaProperties(),this.addManagedListener(this.eventService,lt.EVENT_GRID_STYLES_CHANGED,this.onGridStylesChanged.bind(this))}onGridStylesChanged(){this.rowHeight=this.getItemHeight(),this.refresh()}setAriaProperties(){const e=this.localeService.getLocaleTextFunc()("ariaDefaultListName",this.listName||"List"),t=this.eContainer;Bt(t,this.ariaRole),jt(t,e)}addResizeObserver(){const e=this.resizeObserverService.observeResize(this.getGui(),()=>this.animationFrameService.requestAnimationFrame(()=>this.drawVirtualRows()));this.addDestroyFunc(e)}focusInnerElement(e){this.focusRow(e?this.model.getRowCount()-1:0)}onFocusIn(e){const t=e.target;t.classList.contains("ag-virtual-list-item")&&(this.lastFocusedRowIndex=Ut(t)-1)}onFocusOut(e){this.getFocusableElement().contains(e.relatedTarget)||(this.lastFocusedRowIndex=null)}handleKeyDown(e){switch(e.key){case Xn.UP:case Xn.DOWN:this.navigate(e.key===Xn.UP)&&e.preventDefault();break;case Xn.PAGE_HOME:case Xn.PAGE_END:case Xn.PAGE_UP:case Xn.PAGE_DOWN:null!==this.navigateToPage(e.key)&&e.preventDefault()}}onTabKeyDown(e){this.navigate(e.shiftKey)?e.preventDefault():(Ye(e),this.forceFocusOutOfContainer(e.shiftKey))}navigate(e){if(null==this.lastFocusedRowIndex)return!1;const t=this.lastFocusedRowIndex+(e?-1:1);return!(t<0||t>=this.model.getRowCount()||(this.focusRow(t),0))}navigateToPage(e,t="focused"){let i=!1;"focused"===t&&(t=this.getLastFocusedRow(),i=!0);const n=this.model.getRowCount()-1;let s=-1;return e===Xn.PAGE_HOME?s=0:e===Xn.PAGE_END?s=n:e===Xn.PAGE_DOWN?s=Math.min(t+this.pageSize,n):e===Xn.PAGE_UP&&(s=Math.max(t-this.pageSize,0)),-1===s?null:(i?this.focusRow(s):this.ensureIndexVisible(s),s)}getLastFocusedRow(){return this.lastFocusedRowIndex}focusRow(e){this.isScrolling||(this.isScrolling=!0,this.ensureIndexVisible(e),this.animationFrameService.requestAnimationFrame(()=>{if(this.isScrolling=!1,!this.isAlive())return;const t=this.renderedRows.get(e);t&&t.eDiv.focus()}))}getComponentAt(e){const t=this.renderedRows.get(e);return t&&t.rowComponent}forEachRenderedRow(e){this.renderedRows.forEach((t,i)=>e(t.rowComponent,i))}static getTemplate(e){return`<div class="ag-virtual-list-viewport ag-${e}-virtual-list-viewport" role="presentation">\n                <div class="ag-virtual-list-container ag-${e}-virtual-list-container" ref="eContainer"></div>\n            </div>`}getItemHeight(){return this.isHeightFromTheme?this.environment.getListItemHeight():this.rowHeight}ensureIndexVisible(e,t=!0){const i=this.model.getRowCount();if("number"!=typeof e||e<0||e>=i)return console.warn("AG Grid: invalid row index for ensureIndexVisible: "+e),!1;const n=e*this.rowHeight,s=n+this.rowHeight,r=this.getGui(),o=r.scrollTop,a=r.offsetHeight,l=o+a,c=t?0:this.rowHeight,h=l<s-c;if(o>n+c)return r.scrollTop=n,!0;if(h){const e=s-a;return r.scrollTop=e,!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.isHeightFromTheme=!1,this.rowHeight=e,this.refresh()}refresh(e){if(null==this.model||!this.isAlive())return;const t=this.model.getRowCount();this.eContainer.style.height=t*this.rowHeight+"px",J(()=>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&&"function"==typeof this.model.areRowsEqual&&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,s=Math.floor(i/this.rowHeight),r=Math.floor(n/this.rowHeight);this.pageSize=Math.floor((n-i)/this.rowHeight),this.ensureRowsRendered(s,r,e)}ensureRowsRendered(e,t,i){this.renderedRows.forEach((i,n)=>{(n<e||n>t)&&n!==this.lastFocusedRowIndex&&this.removeRow(n)}),i&&this.refreshRows();for(let i=e;i<=t;i++)this.renderedRows.has(i)||i<this.model.getRowCount()&&this.insertRow(i)}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`),Bt(i,"tree"===this.ariaRole?"treeitem":"option"),ni(i,this.model.getRowCount()),si(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,s;if(i>=e)this.removeRow(i);else{const e=this.model.getRow(i);(null==(s=(n=this.model).areRowsEqual)?void 0:s.call(n,t.value,e))?this.componentUpdater(e,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())}};g([he("resizeObserverService")],Yl.prototype,"resizeObserverService",2),g([he("animationFrameService")],Yl.prototype,"animationFrameService",2),g([Ss("eContainer")],Yl.prototype,"eContainer",2),g([ae],Yl.prototype,"postConstruct",1);var ql=Yl,Xl=class extends _s{constructor(e){var t,i;super(u(d({pickerAriaLabelKey:"ariaLabelRichSelectField",pickerAriaLabelValue:"Rich Select Field",pickerType:"ag-list",className:"ag-rich-select",pickerIcon:"smallDown",ariaRole:"combobox",template:null!=(t=null==e?void 0:e.template)?t:'\n    <div class="ag-picker-field" role="presentation">\n        <div ref="eLabel"></div>\n            <div ref="eWrapper" class="ag-wrapper ag-picker-field-wrapper ag-rich-select-value ag-picker-collapsed">\n            <div ref="eDisplayField" class="ag-picker-field-display"></div>\n            <ag-input-text-field ref="eInput" class="ag-rich-select-field-input"></ag-input-text-field>\n            <div ref="eIcon" class="ag-picker-field-icon" aria-hidden="true"></div>\n        </div>\n    </div>',modalPicker:!1},e),{maxPickerHeight:null!=(i=null==e?void 0:e.maxPickerHeight)?i:"calc(var(--ag-row-height) * 6.5)"})),this.searchString="",this.highlightedItem=-1,this.lastRowHovered=-1,this.searchStringCreator=null;const{cellRowHeight:n,value:s,valueList:r,searchStringCreator:o}=e||{};null!=n&&(this.cellRowHeight=n),void 0!==s&&(this.value=s),null!=r&&(this.values=r),o&&(this.searchStringCreator=o)}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.gos.get("tabIndex");const{searchDebounceDelay:i=300}=this.config;this.clearSearchString=Z(this.clearSearchString,i),this.renderSelectedValue(),e&&(this.eInput.onValueChange(e=>this.searchTextFromString(e)),this.addManagedListener(this.eWrapper,"focus",this.onWrapperFocus.bind(this))),this.addManagedListener(this.eWrapper,"focusout",this.onWrapperFocusOut.bind(this))}createLoadingElement(){const e=this.gos.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 ql({cssIdentifier:"rich-select"})),this.listComponent.setComponentCreator(this.createRowComponent.bind(this)),this.listComponent.setComponentUpdater((e,t)=>{}),this.listComponent.setParentComponent(this),this.addManagedListener(this.listComponent,lt.EVENT_FIELD_PICKER_VALUE_SELECTED,e=>{this.onListValueSelected(e.value,e.fromEnterKey)});const{cellRowHeight:e}=this;e&&this.listComponent.setRowHeight(e);const t=this.listComponent.getGui(),i=this.listComponent.getAriaElement();this.addManagedListener(t,"mousemove",this.onPickerMouseMove.bind(this)),this.addManagedListener(t,"mousedown",e=>e.preventDefault()),t.classList.add("ag-rich-select-list");const n=`ag-rich-select-list-${this.listComponent.getCompId()}`;i.setAttribute("id",n),jt(i,this.localeService.getLocaleTextFunc()(this.config.pickerAriaLabelKey,this.config.pickerAriaLabelValue)),fi(this.eWrapper,i)}renderSelectedValue(){const{value:e,eDisplayField:t,config:i}=this,{allowTyping:n,initialInputValue:s}=this.config,r=this.config.valueFormatter?this.config.valueFormatter(e):e;if(n)return void this.eInput.setValue(null!=s?s:r);let o,a;if(i.cellRenderer&&(o=this.userComponentFactory.getCellRendererDetails(this.config,{value:e,valueFormatted:r})),o&&(a=o.newAgStackInstance()),a)Cn(t),Bn(a,t),a.then(e=>{this.addDestroyFunc(()=>this.getContext().destroyBean(e))});else{if(y(this.value))t.innerText=r,t.classList.remove("ag-display-as-placeholder");else{const{placeholder:e}=i;y(e)?(t.innerHTML=`${yt(e)}`,t.classList.add("ag-display-as-placeholder")):Cn(t)}this.setTooltip({newTooltipText:null!=r?r:null,shouldDisplayTooltip:()=>this.eDisplayField.scrollWidth>this.eDisplayField.clientWidth})}}getCurrentValueIndex(){const{currentList:e,value:t}=this;if(null==t||!e)return-1;for(let i=0;i<e.length;i++)if(e[i]===t)return i;return-1}highlightFilterMatch(){var e;null==(e=this.listComponent)||e.forEachRenderedRow((e,t)=>{e.highlightString(this.searchString)})}highlightSelectedValue(e){var t;null==e&&(e=this.getCurrentValueIndex()),this.highlightedItem=e,null==(t=this.listComponent)||t.forEachRenderedRow((t,i)=>{const n=-1!==e&&this.highlightedItem===i;t.updateHighlighted(n)})}setRowHeight(e){e!==this.cellRowHeight&&(this.cellRowHeight=e),this.listComponent&&this.listComponent.setRowHeight(e)}createPickerComponent(){const{values:e}=this;return e&&this.setValueList({valueList:e}),this.listComponent}setSearchStringCreator(e){this.searchStringCreator=e}setValueList(e){const{valueList:t,refresh:i}=e;this.listComponent&&this.currentList!==t&&(this.currentList=t,this.listComponent.setModel({getRowCount:()=>t.length,getRow:e=>t[e],areRowsEqual:(e,t)=>e===t}),i&&(this.values?this.listComponent.refresh(!0):(this.values=t,this.isPickerDisplayed&&this.showCurrentValueInPicker())))}showPicker(){super.showPicker(),this.showCurrentValueInPicker(),this.displayOrHidePicker()}showCurrentValueInPicker(){var e,t;if(!this.listComponent)return;if(!this.currentList)return void(this.isPickerDisplayed&&this.eLoading&&this.listComponent.appendChild(this.eLoading));(null==(e=this.eLoading)?void 0:e.offsetParent)&&(null==(t=this.eLoading.parentElement)||t.removeChild(this.eLoading));const i=this.getCurrentValueIndex();-1!==i?(this.listComponent.refresh(),this.listComponent.ensureIndexVisible(i),this.listComponent.refresh(!0),this.highlightSelectedValue(i)):this.listComponent.refresh()}beforeHidePicker(){this.highlightedItem=-1,super.beforeHidePicker()}onWrapperFocus(){if(!this.eInput)return;const e=this.eInput.getFocusableElement();e.focus(),e.select()}onWrapperFocusOut(e){this.eWrapper.contains(e.relatedTarget)||this.hidePicker()}buildSearchStringFromKeyboardEvent(e){let{key:t}=e;if(t===Xn.BACKSPACE)this.searchString=this.searchString.slice(0,-1),t="";else if(!Zn(e))return;e.preventDefault(),this.searchTextFromCharacter(t)}searchTextFromCharacter(e){this.searchString+=e,this.runSearch(),this.clearSearchString()}searchTextFromString(e){null==e&&(e=""),this.searchString=e,this.runSearch()}buildSearchStrings(e){const{valueFormatter:t=e=>e}=this.config;let i;return"number"==typeof e[0]||"string"==typeof e[0]?i=e.map(e=>t(e)):"object"==typeof e[0]&&this.searchStringCreator&&(i=this.searchStringCreator(e)),i}getSuggestionsAndFilteredValues(e,t){let i=[],n=[];if(!e.length)return{suggestions:i,filteredValues:n};const{searchType:s="fuzzy",filterList:r}=this.config;if("fuzzy"===s){const e=Un(this.searchString,t,!0);i=e.values;const s=e.indices;if(r&&s.length)for(let e=0;e<s.length;e++)n.push(this.values[s[e]])}else i=t.filter((e,t)=>{const i=e.toLocaleLowerCase(),o=this.searchString.toLocaleLowerCase(),a="match"===s?i.startsWith(o):-1!==i.indexOf(o);return r&&a&&n.push(this.values[t]),a});return{suggestions:i,filteredValues:n}}filterListModel(e){const{filterList:t}=this.config;t&&(this.setValueList({valueList:e,refresh:!0}),this.alignPickerToComponent())}runSearch(){var e,t;const{values:i}=this,n=this.buildSearchStrings(i);if(!n)return void this.highlightSelectedValue(-1);const{suggestions:s,filteredValues:r}=this.getSuggestionsAndFilteredValues(this.searchString,n),{filterList:o,highlightMatch:a,searchType:l="fuzzy"}=this.config,c=r.length,h=!(!o||""===this.searchString);if(this.filterListModel(h?r:i),s.length){const e=h?0:n.indexOf(s[0]);this.selectListItem(e)}else if(this.highlightSelectedValue(-1),!h||c)null==(e=this.listComponent)||e.ensureIndexVisible(0);else if(h){this.getAriaElement().removeAttribute("data-active-option");const e=null==(t=this.listComponent)?void 0:t.getAriaElement();e&&ei(e,null)}a&&"fuzzy"!==l&&this.highlightFilterMatch(),this.displayOrHidePicker()}displayOrHidePicker(){var e;const t=null==(e=this.listComponent)?void 0:e.getGui(),i=!!this.currentList&&0===this.currentList.length;null==t||t.classList.toggle("ag-hidden",i)}clearSearchString(){this.searchString=""}selectListItem(e,t){!this.isPickerDisplayed||!this.currentList||!this.listComponent||e<0||e>=this.currentList.length||(this.listComponent.ensureIndexVisible(e,!t)&&!t&&this.listComponent.refresh(!0),this.highlightSelectedValue(e))}setValue(e,t,i){const n=this.currentList?this.currentList.indexOf(e):-1;return-1===n?this:(this.value=e,i||this.selectListItem(n),this.renderSelectedValue(),super.setValue(e,t))}createRowComponent(e){const t=new $l(this.config,this.eWrapper);t.setParentComponent(this.listComponent),this.getContext().createBean(t),t.setState(e);const{highlightMatch:i,searchType:n="fuzzy"}=this.config;return i&&"fuzzy"!==n&&t.highlightString(this.searchString),t}getRowForMouseEvent(e){const{listComponent:t}=this;if(!t)return-1;const i=(null==t?void 0:t.getGui()).getBoundingClientRect(),n=t.getScrollTop(),s=e.clientY-i.top+n;return Math.floor(s/t.getRowHeight())}onPickerMouseMove(e){if(!this.listComponent)return;const t=this.getRowForMouseEvent(e);-1!==t&&t!=this.lastRowHovered&&(this.lastRowHovered=t,this.selectListItem(t,!0))}onNavigationKeyDown(e,t){e.preventDefault();const i=t===Xn.DOWN;if(!this.isPickerDisplayed&&i)return void this.showPicker();const n=this.highlightedItem,s=-1===n?0:n+(i?1:-1);this.selectListItem(s)}onPageNavigation(e){var t;if(!this.isPickerDisplayed)return;const i=null==(t=this.listComponent)?void 0:t.navigateToPage(e,this.highlightedItem);null!=i&&this.animationFrameService.requestAnimationFrame(()=>{if(!this.isAlive())return null;this.highlightSelectedValue(i)})}onEnterKeyDown(e){this.isPickerDisplayed&&(e.preventDefault(),this.currentList&&this.onListValueSelected(this.currentList[this.highlightedItem],!0))}onTabKeyDown(){this.isPickerDisplayed&&this.currentList&&this.setValue(this.currentList[this.highlightedItem],!1,!0)}onListValueSelected(e,t){this.setValue(e,!1,!0),this.dispatchPickerEvent(e,t),this.hidePicker()}dispatchPickerEvent(e,t){const i={type:lt.EVENT_FIELD_PICKER_VALUE_SELECTED,fromEnterKey:t,value:e};this.dispatchEvent(i)}getFocusableElement(){const{allowTyping:e}=this.config;return e?this.eInput.getFocusableElement():super.getFocusableElement()}onKeyDown(e){const t=e.key,{allowTyping:i}=this.config;switch(t){case Xn.LEFT:case Xn.RIGHT:i||e.preventDefault();break;case Xn.PAGE_HOME:case Xn.PAGE_END:if(i){e.preventDefault();const i=this.eInput.getInputElement(),n=t===Xn.PAGE_HOME?0:i.value.length;i.setSelectionRange(n,n);break}case Xn.PAGE_UP:case Xn.PAGE_DOWN:e.preventDefault(),this.onPageNavigation(t);break;case Xn.DOWN:case Xn.UP:this.onNavigationKeyDown(e,t);break;case Xn.ESCAPE:this.isPickerDisplayed&&(wn(this.listComponent.getGui())&&(e.preventDefault(),Ye(e)),this.hidePicker());break;case Xn.ENTER:this.onEnterKeyDown(e);break;case Xn.TAB:this.onTabKeyDown();break;default:i||this.buildSearchStringFromKeyboardEvent(e)}}destroy(){this.listComponent&&(this.destroyBean(this.listComponent),this.listComponent=void 0),this.eLoading=void 0,super.destroy()}};g([he("userComponentFactory")],Xl.prototype,"userComponentFactory",2),g([he("animationFrameService")],Xl.prototype,"animationFrameService",2),g([Ss("eInput")],Xl.prototype,"eInput",2);var Zl=class e extends Ns{constructor(t){super(t,e.TEMPLATE),this.labelAlignment="top"}init(){this.eSlider.addCssClass("ag-slider-field");const{minValue:e,maxValue:t,textFieldWidth:i,step:n,value:s,onValueChange:r}=this.config;null!=e&&this.setMinValue(e),null!=t&&this.setMaxValue(t),null!=i&&this.setTextFieldWidth(i),null!=n&&this.setStep(n),null!=s&&this.setValue(s),null!=r&&this.onValueChange(r)}onValueChange(e){const t=lt.EVENT_FIELD_VALUE_CHANGED;return this.addManagedListener(this.eText,t,()=>{const t=parseFloat(this.eText.getValue());this.eSlider.setValue(t.toString(),!0),e(t||0)}),this.addManagedListener(this.eSlider,t,()=>{const t=this.eSlider.getValue();this.eText.setValue(t,!0),e(parseFloat(t))}),this}setSliderWidth(e){return this.eSlider.setWidth(e),this}setTextFieldWidth(e){return this.eText.setWidth(e),this}setMinValue(e){return this.eSlider.setMinValue(e),this.eText.setMin(e),this}setMaxValue(e){return this.eSlider.setMaxValue(e),this.eText.setMax(e),this}getValue(){return this.eText.getValue()}setValue(e,t){return this.getValue()===e||(this.eText.setValue(e,!0),this.eSlider.setValue(e,!0),t||this.dispatchEvent({type:lt.EVENT_FIELD_VALUE_CHANGED})),this}setStep(e){return this.eSlider.setStep(e),this.eText.setStep(e),this}};Zl.TEMPLATE='<div class="ag-slider">\n            <label ref="eLabel"></label>\n            <div class="ag-wrapper ag-slider-wrapper">\n                <ag-input-range ref="eSlider"></ag-input-range>\n                <ag-input-number-field ref="eText"></ag-input-number-field>\n            </div>\n        </div>',g([Ss("eLabel")],Zl.prototype,"eLabel",2),g([Ss("eSlider")],Zl.prototype,"eSlider",2),g([Ss("eText")],Zl.prototype,"eText",2),g([ae],Zl.prototype,"init",1);var Ql=Zl,Jl=class e extends Cs{constructor(t={}){super(e.getTemplate(t)),this.params=t,this.suppressEnabledCheckbox=!0,this.suppressToggleExpandOnEnableChange=!1;const{enabled:i,items:n,suppressEnabledCheckbox:s,expanded:r,suppressToggleExpandOnEnableChange:o,useToggle:a}=t;this.cssIdentifier=t.cssIdentifier||"default",this.enabled=null==i||i,this.items=n||[],this.useToggle=null!=a&&a,this.alignItems=t.alignItems||"center",this.expanded=null==r||r,null!=s&&(this.suppressEnabledCheckbox=s),null!=o&&(this.suppressToggleExpandOnEnableChange=o)}static getTemplate(e){const t=e.cssIdentifier||"default";return`\n            <div class="ag-group ag-${t}-group" role="presentation">\n                <div ref="eToolbar" class="ag-group-toolbar ag-${t}-group-toolbar">\n                    <ag-checkbox ref="cbGroupEnabled"></ag-checkbox>\n                </div>\n                <div ref="eContainer" class="ag-group-container ag-group-container-${e.direction||"vertical"} ag-${t}-group-container"></div>\n            </div>\n        `}postConstruct(){if(this.setupTitleBar(),this.items.length){const e=this.items;this.items=[],this.addItems(e)}const e=this.localeService.getLocaleTextFunc();this.cbGroupEnabled.setLabel(e("enabled","Enabled")),this.enabled&&this.setEnabled(this.enabled,void 0,!0),this.setAlignItems(this.alignItems);const{onEnableChange:t,suppressOpenCloseIcons:i}=this.params;this.hideEnabledCheckbox(this.suppressEnabledCheckbox),this.hideOpenCloseIcons(null!=i&&i),this.refreshChildDisplay(),on(this.eContainer,this.expanded),this.cbGroupEnabled.onValueChange(e=>{this.setEnabled(e,!0,this.suppressToggleExpandOnEnableChange),this.dispatchEnableChangeEvent(e)}),null!=t&&this.onEnableChange(t)}refreshChildDisplay(){var e;on(this.eToolbar,this.expanded&&!this.suppressEnabledCheckbox),null==(e=this.eTitleBar)||e.refreshOnExpand(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(t){var i;let n=!1;if((null==(i=this.eTitleBar)?void 0:i.isSuppressCollapse())&&!this.useToggle)t=!0,n=!0;else if(t=null!=t?t:!this.expanded,this.expanded===t)return this;return this.expanded=t,this.refreshChildDisplay(),on(this.eContainer,t),n||this.dispatchEvent({type:t?e.EVENT_EXPANDED:e.EVENT_COLLAPSED}),this}addItems(e){e.forEach(e=>this.addItem(e))}prependItem(e){this.insertItem(e,!0)}addItem(e){this.insertItem(e,!1)}insertItem(e,t){const i=this.eContainer,n=e instanceof Cs?e.getGui():e;n.classList.add("ag-group-item",`ag-${this.cssIdentifier}-group-item`),t?(i.insertAdjacentElement("afterbegin",n),this.items.unshift(n)):(i.appendChild(n),this.items.push(n))}hideItem(e,t){on(this.items[t],!e)}getItemIndex(e){const t=e instanceof Cs?e.getGui():e;return this.items.indexOf(t)}setTitle(e){var t;return null==(t=this.eTitleBar)||t.setTitle(e),this}addTitleBarWidget(e){var t;return null==(t=this.eTitleBar)||t.addWidget(e),this}addCssClassToTitleBar(e){var t;null==(t=this.eTitleBar)||t.addCssClass(e)}dispatchEnableChangeEvent(t){const i={type:e.EVENT_ENABLE_CHANGE,enabled:t};this.dispatchEvent(i)}setEnabled(e,t,i){var n;return this.enabled=e,this.refreshDisabledStyles(),i||this.toggleGroupExpand(e),t||(this.cbGroupEnabled.setValue(e),null==(n=this.eToggle)||n.setValue(e)),this}isEnabled(){return this.enabled}onEnableChange(t){return this.addManagedListener(this,e.EVENT_ENABLE_CHANGE,e=>t(e.enabled)),this}hideEnabledCheckbox(e){return this.suppressEnabledCheckbox=e,this.refreshChildDisplay(),this.refreshDisabledStyles(),this}hideOpenCloseIcons(e){var t;return null==(t=this.eTitleBar)||t.hideOpenCloseIcons(e),this}refreshDisabledStyles(){var e;const t=!this.enabled;this.eContainer.classList.toggle("ag-disabled",t),null==(e=this.eTitleBar)||e.refreshDisabledStyles(this.suppressEnabledCheckbox&&t),this.eContainer.classList.toggle("ag-disabled-group-container",t)}setupTitleBar(){const e=this.useToggle?this.createToggleTitleBar():this.createDefaultTitleBar();this.eToolbar.insertAdjacentElement("beforebegin",e.getGui())}createDefaultTitleBar(){const e=this.createManagedBean(new nc(this.params));return this.eTitleBar=e,e.refreshOnExpand(this.expanded),this.addManagedListener(e,nc.EVENT_EXPAND_CHANGED,e=>this.toggleGroupExpand(e.expanded)),e}createToggleTitleBar(){var e;const t=this.createManagedBean(new Ul({value:this.enabled,label:this.params.title,labelAlignment:"left",labelWidth:"flex",onValueChange:e=>{this.setEnabled(e,!0),this.dispatchEnableChangeEvent(e)}}));return t.addCssClass("ag-group-title-bar"),t.addCssClass(`ag-${null!=(e=this.params.cssIdentifier)?e:"default"}-group-title-bar ag-unselectable`),this.eToggle=t,this.toggleGroupExpand(this.enabled),t}};Jl.EVENT_EXPANDED="expanded",Jl.EVENT_COLLAPSED="collapsed",Jl.EVENT_ENABLE_CHANGE="enableChange",g([Ss("eToolbar")],Jl.prototype,"eToolbar",2),g([Ss("cbGroupEnabled")],Jl.prototype,"cbGroupEnabled",2),g([Ss("eContainer")],Jl.prototype,"eContainer",2),g([ae],Jl.prototype,"postConstruct",1);var ec=Jl,tc="ag-disabled-group-title-bar",ic=class e extends Cs{constructor(t={}){super(e.getTemplate(t)),this.suppressOpenCloseIcons=!1;const{title:i,suppressOpenCloseIcons:n}=t;i&&i.length>0&&(this.title=i),null!=n&&(this.suppressOpenCloseIcons=n)}static getTemplate(e){var t;const i=null!=(t=e.cssIdentifier)?t:"default";return`\n            <div class="ag-group-title-bar ag-${i}-group-title-bar ag-unselectable" role="button">\n                <span class="ag-group-title-bar-icon ag-${i}-group-title-bar-icon" ref="eGroupOpenedIcon" role="presentation"></span>\n                <span class="ag-group-title-bar-icon ag-${i}-group-title-bar-icon" ref="eGroupClosedIcon" role="presentation"></span>\n                <span ref="eTitle" class="ag-group-title ag-${i}-group-title"></span>\n            </div>\n        `}postConstruct(){this.setTitle(this.title),this.hideOpenCloseIcons(this.suppressOpenCloseIcons),this.setupExpandContract()}setupExpandContract(){this.eGroupClosedIcon.appendChild($n("columnSelectClosed",this.gos,null)),this.eGroupOpenedIcon.appendChild($n("columnSelectOpen",this.gos,null)),this.addManagedListener(this.getGui(),"click",()=>this.dispatchExpandChanged()),this.addManagedListener(this.getGui(),"keydown",e=>{switch(e.key){case Xn.ENTER:case Xn.SPACE:e.preventDefault(),this.dispatchExpandChanged();break;case Xn.RIGHT:case Xn.LEFT:e.preventDefault(),this.dispatchExpandChanged(e.key===Xn.RIGHT)}})}refreshOnExpand(e){this.refreshAriaStatus(e),this.refreshOpenCloseIcons(e)}refreshAriaStatus(e){this.suppressOpenCloseIcons||ti(this.getGui(),e)}refreshOpenCloseIcons(e){const t=!this.suppressOpenCloseIcons;on(this.eGroupOpenedIcon,t&&e),on(this.eGroupClosedIcon,t&&!e)}isSuppressCollapse(){return this.suppressOpenCloseIcons}dispatchExpandChanged(t){const i={type:e.EVENT_EXPAND_CHANGED,expanded:t};this.dispatchEvent(i)}setTitle(e){const t=this.getGui(),i=!!e&&e.length>0;e=i?e:void 0,this.eTitle.textContent=null!=e?e:"",on(t,i),e!==this.title&&(this.title=e);const n=t.classList.contains(tc);return this.refreshDisabledStyles(n),this}addWidget(e){return this.getGui().appendChild(e),this}hideOpenCloseIcons(e){return this.suppressOpenCloseIcons=e,e&&this.dispatchExpandChanged(!0),this}refreshDisabledStyles(e){const t=this.getGui();e?(t.classList.add(tc),t.removeAttribute("tabindex")):(t.classList.remove(tc),"string"==typeof this.title?t.setAttribute("tabindex","0"):t.removeAttribute("tabindex"))}};ic.EVENT_EXPAND_CHANGED="expandedChanged",g([Ss("eGroupOpenedIcon")],ic.prototype,"eGroupOpenedIcon",2),g([Ss("eGroupClosedIcon")],ic.prototype,"eGroupClosedIcon",2),g([Ss("eTitle")],ic.prototype,"eTitle",2),g([ae],ic.prototype,"postConstruct",1);var nc=ic,sc=class extends xl{constructor(e=0,t){super('<div class="ag-menu-list" role="tree"></div>'),this.level=e,this.menuItems=[],this.params=null!=t?t:{column:null,node:null,value:null}}postConstruct(){this.initialiseTabGuard({onTabKeyDown:e=>this.onTabKeyDown(e),handleKeyDown:e=>this.handleKeyDown(e),onFocusIn:e=>this.handleFocusIn(e),onFocusOut:e=>this.handleFocusOut(e)})}onTabKeyDown(e){const t=this.getParentComponent(),i=t&&t.getGui();i&&i.classList.contains("ag-focus-managed")||e.preventDefault(),e.shiftKey&&this.closeIfIsChild(e)}handleKeyDown(e){switch(e.key){case Xn.UP:case Xn.RIGHT:case Xn.DOWN:case Xn.LEFT:e.preventDefault(),this.handleNavKey(e.key);break;case Xn.ESCAPE:this.closeIfIsChild()&&Ye(e)}}handleFocusIn(e){var t,i;const n=e.relatedTarget;(this.tabGuardCtrl.isTabGuard(n)||!this.getGui().contains(n)&&!(null==(i=null==(t=this.activeMenuItem)?void 0:t.getSubMenuGui())?void 0:i.contains(n)))&&(this.activeMenuItem?this.activeMenuItem.activate():this.activateFirstItem())}handleFocusOut(e){var t;const i=e.relatedTarget;!this.activeMenuItem||this.getGui().contains(i)||(null==(t=this.activeMenuItem.getSubMenuGui())?void 0:t.contains(i))||this.activeMenuItem.isSubMenuOpening()||this.activeMenuItem.deactivate()}clearActiveItem(){this.activeMenuItem&&(this.activeMenuItem.deactivate(),this.activeMenuItem=null)}addMenuItems(e){null!=e&&ds.all(e.map(e=>"separator"===e?ds.resolve({eGui:this.createSeparator()}):"string"==typeof e?(console.warn(`AG Grid: unrecognised menu item ${e}`),ds.resolve({eGui:null})):this.addItem(e))).then(e=>{e.forEach(e=>{(null==e?void 0:e.eGui)&&(this.appendChild(e.eGui),e.comp&&this.menuItems.push(e.comp))})})}addItem(e){const t=this.createManagedBean(new ac);return t.init({menuItemDef:e,isAnotherSubMenuOpen:()=>this.menuItems.some(e=>e.isSubMenuOpen()),level:this.level,contextParams:this.params}).then(()=>(t.setParentComponent(this),this.addManagedListener(t,ac.EVENT_CLOSE_MENU,e=>{this.dispatchEvent(e)}),this.addManagedListener(t,ac.EVENT_MENU_ITEM_ACTIVATED,e=>{this.activeMenuItem&&this.activeMenuItem!==e.menuItem&&this.activeMenuItem.deactivate(),this.activeMenuItem=e.menuItem}),{comp:t,eGui:t.getGui()}))}activateFirstItem(){const e=this.menuItems.filter(e=>!e.isDisabled())[0];e&&e.activate()}createSeparator(){return xn('\n            <div class="ag-menu-separator" aria-hidden="true">\n                <div class="ag-menu-separator-part"></div>\n                <div class="ag-menu-separator-part"></div>\n                <div class="ag-menu-separator-part"></div>\n                <div class="ag-menu-separator-part"></div>\n            </div>')}handleNavKey(e){switch(e){case Xn.UP:case Xn.DOWN:const t=this.findNextItem(e===Xn.UP);return void(t&&t!==this.activeMenuItem&&t.activate())}e===(this.gos.get("enableRtl")?Xn.RIGHT:Xn.LEFT)?this.closeIfIsChild():this.openChild()}closeIfIsChild(e){const t=this.getParentComponent();return!!(t&&t instanceof ac)&&(e&&e.preventDefault(),t.closeSubMenu(),t.getGui().focus(),!0)}openChild(){this.activeMenuItem&&this.activeMenuItem.openSubMenu(!0)}findNextItem(e){const t=this.menuItems.filter(e=>!e.isDisabled());if(!t.length)return;if(!this.activeMenuItem)return e?De(t):t[0];let i;e&&t.reverse();let n=!1;for(let e=0;e<t.length;e++){const s=t[e];if(n){i=s;break}s===this.activeMenuItem&&(n=!0)}return n&&!i?t[0]:i||this.activeMenuItem}destroy(){this.clearActiveItem(),super.destroy()}};g([he("focusService")],sc.prototype,"focusService",2),g([ae],sc.prototype,"postConstruct",1);var rc=class extends xl{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===Xn.ESCAPE&&this.closePanel()}onTabKeyDown(e){e.defaultPrevented||(this.closePanel(),e.preventDefault())}closePanel(){const e=this.parentComponent;e.closeSubMenu(),setTimeout(()=>e.getGui().focus(),0)}};g([ae],rc.prototype,"postConstruct",1);var oc=class e extends nt{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:s,level:r,childComponent:o,contextParams:a}=e;return this.params=e.menuItemDef,this.level=r,this.isAnotherSubMenuOpen=s,this.childComponent=o,this.contextParams=a,this.cssClassPrefix=null!=(i=null==(t=this.params.menuItemParams)?void 0:t.cssClassPrefix)?i:"ag-menu-option",this.userComponentFactory.getMenuItemCompDetails(this.params,u(d({},n),{level:r,isAnotherSubMenuOpen:s,openSubMenu:e=>this.openSubMenu(e),closeSubMenu:()=>this.closeSubMenu(),closeMenu:e=>this.closeMenu(e),updateTooltip:(e,t)=>this.refreshTooltip(e,t),onItemActivated:()=>this.onItemActivated()})).newAgStackInstance().then(e=>{var t;this.menuItemComp=e;const i=null==(t=e.configureDefaults)?void 0:t.call(e);i&&this.configureDefaults(!0===i?void 0:i)})}addListeners(e,t){(null==t?void 0:t.suppressClick)||this.addManagedListener(e,"click",e=>this.onItemSelected(e)),(null==t?void 0:t.suppressKeyboardSelect)||this.addManagedListener(e,"keydown",e=>{e.key!==Xn.ENTER&&e.key!==Xn.SPACE||(e.preventDefault(),this.onItemSelected(e))}),(null==t?void 0:t.suppressMouseDown)||this.addManagedListener(e,"mousedown",e=>{e.stopPropagation(),e.preventDefault()}),(null==t?void 0:t.suppressMouseOver)||(this.addManagedListener(e,"mouseenter",()=>this.onMouseEnter()),this.addManagedListener(e,"mouseleave",()=>this.onMouseLeave()))}isDisabled(){return!!this.params.disabled}openSubMenu(t=!1){var i,n;if(this.closeSubMenu(),!this.params.subMenu)return;this.subMenuIsOpening=!0;const s=xn('<div class="ag-menu" role="presentation"></div>');let r;this.eSubMenuGui=s;let o=()=>{this.subMenuIsOpening=!1};if(this.childComponent){const e=this.createBean(new rc(this.childComponent));e.setParentComponent(this);const t=e.getGui(),i="mouseenter",n=()=>this.cancelDeactivate();t.addEventListener(i,n),r=()=>t.removeEventListener(i,n),s.appendChild(t),this.childComponent.afterGuiAttached&&(o=()=>{this.childComponent.afterGuiAttached(),this.subMenuIsOpening=!1})}else if(this.params.subMenu){const i=this.createBean(new sc(this.level+1,this.contextParams));i.setParentComponent(this),i.addMenuItems(this.params.subMenu),s.appendChild(i.getGui()),this.addManagedListener(i,e.EVENT_CLOSE_MENU,e=>this.dispatchEvent(e)),i.addGuiEventListener("mouseenter",()=>this.cancelDeactivate()),r=()=>this.destroyBean(i),t&&(o=()=>{i.activateFirstItem(),this.subMenuIsOpening=!1})}const a=this.popupService.positionPopupForMenu.bind(this.popupService,{eventSource:this.eGui,ePopup:s}),l=this.localeService.getLocaleTextFunc(),c=this.popupService.addPopup({modal:!0,eChild:s,positionCallback:a,anchorToElement:this.eGui,ariaLabel:l("ariaLabelSubMenu","SubMenu"),afterGuiAttached:o});this.subMenuIsOpen=!0,this.setAriaExpanded(!0),this.hideSubMenu=()=>{var e,t;c&&c.hideFunc(),this.subMenuIsOpen=!1,this.setAriaExpanded(!1),r(),null==(t=(e=this.menuItemComp).setExpanded)||t.call(e,!1),this.eSubMenuGui=void 0},null==(n=(i=this.menuItemComp).setExpanded)||n.call(i,!0)}setAriaExpanded(e){this.suppressAria||ti(this.eGui,e)}closeSubMenu(){this.hideSubMenu&&(this.hideSubMenu(),this.hideSubMenu=null,this.setAriaExpanded(!1))}isSubMenuOpen(){return this.subMenuIsOpen}isSubMenuOpening(){return this.subMenuIsOpening}activate(e){var t,i;this.cancelActivate(),this.params.disabled||(this.isActive=!0,this.suppressRootStyles||this.eGui.classList.add(`${this.cssClassPrefix}-active`),null==(i=(t=this.menuItemComp).setActive)||i.call(t,!0),this.suppressFocus||this.eGui.focus({preventScroll:!0}),e&&this.params.subMenu&&window.setTimeout(()=>{this.isAlive()&&this.isActive&&this.openSubMenu()},300),this.onItemActivated())}deactivate(){var e,t;this.cancelDeactivate(),this.suppressRootStyles||this.eGui.classList.remove(`${this.cssClassPrefix}-active`),null==(t=(e=this.menuItemComp).setActive)||t.call(e,!1),this.isActive=!1,this.subMenuIsOpen&&this.hideSubMenu()}getGui(){return this.menuItemComp.getGui()}getParentComponent(){return this.parentComponent}setParentComponent(e){this.parentComponent=e}getSubMenuGui(){return this.eSubMenuGui}onItemSelected(e){var t,i;null==(i=(t=this.menuItemComp).select)||i.call(t),this.params.action?this.getFrameworkOverrides().wrapOutgoing(()=>this.params.action(this.gos.addGridCommonParams(d({},this.contextParams)))):this.openSubMenu(e&&"keydown"===e.type),this.params.subMenu&&!this.params.action||this.params.suppressCloseOnSelect||this.closeMenu(e)}closeMenu(t){const i={type:e.EVENT_CLOSE_MENU};t&&(t instanceof MouseEvent?i.mouseEvent=t:i.keyboardEvent=t),this.dispatchEvent(i)}onItemActivated(){const t={type:e.EVENT_MENU_ITEM_ACTIVATED,menuItem:this};this.dispatchEvent(t)}cancelActivate(){this.activateTimeoutId&&(window.clearTimeout(this.activateTimeoutId),this.activateTimeoutId=0)}cancelDeactivate(){this.deactivateTimeoutId&&(window.clearTimeout(this.deactivateTimeoutId),this.deactivateTimeoutId=0)}onMouseEnter(){this.cancelDeactivate(),this.isAnotherSubMenuOpen()?this.activateTimeoutId=window.setTimeout(()=>this.activate(!0),e.ACTIVATION_DELAY):this.activate(!0)}onMouseLeave(){this.cancelActivate(),this.isSubMenuOpen()?this.deactivateTimeoutId=window.setTimeout(()=>this.deactivate(),e.ACTIVATION_DELAY):this.deactivate()}configureDefaults(e){var t,i,n;if(!this.menuItemComp)return void setTimeout(()=>this.configureDefaults(e));let s=this.menuItemComp.getGui();const r=null==(i=(t=this.menuItemComp).getRootElement)?void 0:i.call(t);r&&((null==e?void 0:e.suppressRootStyles)||s.classList.add("ag-menu-option-custom"),s=r),this.eGui=s,this.suppressRootStyles=!!(null==e?void 0:e.suppressRootStyles),this.suppressRootStyles||(s.classList.add(this.cssClassPrefix),null==(n=this.params.cssClasses)||n.forEach(e=>s.classList.add(e)),this.params.disabled&&s.classList.add(`${this.cssClassPrefix}-disabled`)),(null==e?void 0:e.suppressTooltip)||this.refreshTooltip(this.params.tooltip),this.suppressAria=!!(null==e?void 0:e.suppressAria),this.suppressAria||(Bt(s,"treeitem"),Zt(s,this.level+1),this.params.disabled&&Qt(s,!0)),(null==e?void 0:e.suppressTabIndex)||s.setAttribute("tabindex","-1"),this.params.disabled||this.addListeners(s,e),this.suppressFocus=!!(null==e?void 0:e.suppressFocus)}refreshTooltip(e,t){this.tooltip=e,this.tooltipFeature&&(this.tooltipFeature=this.destroyBean(this.tooltipFeature)),e&&this.menuItemComp&&(this.tooltipFeature=this.createBean(new ms({getGui:()=>this.getGui(),getTooltipValue:()=>this.tooltip,getLocation:()=>"menu",shouldDisplayTooltip:t})))}destroy(){this.tooltipFeature&&(this.tooltipFeature=this.destroyBean(this.tooltipFeature)),super.destroy()}};oc.EVENT_CLOSE_MENU="closeMenu",oc.EVENT_MENU_ITEM_ACTIVATED="menuItemActivated",oc.ACTIVATION_DELAY=80,g([he("popupService")],oc.prototype,"popupService",2),g([he("userComponentFactory")],oc.prototype,"userComponentFactory",2);var ac=oc,lc=class e extends Cs{constructor(t){super(e.getTemplate(t)),this.config=t,this.closable=!0}static getTemplate(e){const t=e.cssIdentifier||"default";return`<div class="ag-panel ag-${t}-panel" tabindex="-1">\n            <div ref="eTitleBar" class="ag-panel-title-bar ag-${t}-panel-title-bar ag-unselectable">\n                <span ref="eTitle" class="ag-panel-title-bar-title ag-${t}-panel-title-bar-title"></span>\n                <div ref="eTitleBarButtons" class="ag-panel-title-bar-buttons ag-${t}-panel-title-bar-buttons"></div>\n            </div>\n            <div ref="eContentWrapper" class="ag-panel-content-wrapper ag-${t}-panel-content-wrapper"></div>\n        </div>`}postConstruct(){const{component:e,closable:t,hideTitleBar:i,title:n,minWidth:s=250,width:r,minHeight:o=250,height:a,centered:l,popup:c,x:h,y:d}=this.config;this.positionableFeature=new Ls(this.getGui(),{minWidth:s,width:r,minHeight:o,height:a,centered:l,x:h,y:d,popup:c,calculateTopBuffer:()=>this.positionableFeature.getHeight()-this.getBodyHeight()}),this.createManagedBean(this.positionableFeature);const u=this.getGui();e&&this.setBodyComponent(e),i?on(this.eTitleBar,!1):(n&&this.setTitle(n),this.setClosable(null!=t?t:this.closable)),this.addManagedListener(this.eTitleBar,"mousedown",e=>{if(u.contains(e.relatedTarget)||u.contains(this.gos.getActiveDomElement())||this.eTitleBarButtons.contains(e.target))return void e.preventDefault();const t=this.eContentWrapper.querySelector("button, [href], input, select, textarea, [tabindex]");t&&t.focus()}),c&&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(t){if(t!==this.closable&&(this.closable=t),t){const t=this.closeButtonComp=new Cs(e.CLOSE_BTN_TEMPLATE);this.getContext().createBean(t);const i=t.getGui(),n=Yn("close",this.gos);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 e=this.closeButtonComp.getGui();e.parentElement.removeChild(e),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,s=n.length;null==t&&(t=s),t=Math.max(0,Math.min(t,s)),e.addCssClass("ag-panel-title-bar-button");const r=e.getGui();0===t?i.insertAdjacentElement("afterbegin",r):t===s?i.insertAdjacentElement("beforeend",r):n[t-1].insertAdjacentElement("afterend",r),e.setParentComponent(this)}getBodyHeight(){return dn(this.eContentWrapper)}getBodyWidth(){return un(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&&wn(e)&&this.close(),super.destroy()}};lc.CLOSE_BTN_TEMPLATE='<div class="ag-button"></div>',g([Ss("eContentWrapper")],lc.prototype,"eContentWrapper",2),g([Ss("eTitleBar")],lc.prototype,"eTitleBar",2),g([Ss("eTitleBarButtons")],lc.prototype,"eTitleBarButtons",2),g([Ss("eTitle")],lc.prototype,"eTitle",2),g([ae],lc.prototype,"postConstruct",1);var cc=lc,hc=class extends cc{constructor(e){super(u(d({},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",t=>{this.popupService.bringPopupToFront(e)}),t&&this.setMovable(t),n&&this.setMaximizable(n),i&&this.setResizable(i)}renderComponent(){const e=this.getGui(),{alwaysOnTop:t,modal:i,title:n,afterGuiAttached:s}=this.config,r=this.localeService.getLocaleTextFunc(),o=this.popupService.addPopup({modal:i,eChild:e,closeOnEsc:!0,closedCallback:this.onClosed.bind(this),alwaysOnTop:t,ariaLabel:n||r("ariaLabelDialog","Dialog"),afterGuiAttached:s});o&&(this.close=o.hideFunc)}onClosed(e){var t,i;this.destroy(),null==(i=(t=this.config).closedCallback)||i.call(t,e)}toggleMaximize(){const e=this.positionableFeature.getPosition();if(this.isMaximized){const{x:e,y:t,width:i,height:n}=this.lastPosition;this.setWidth(i),this.setHeight(n),this.positionableFeature.offsetElement(e,t)}else this.lastPosition.width=this.getWidth(),this.lastPosition.height=this.getHeight(),this.lastPosition.x=e.x,this.lastPosition.y=e.y,this.positionableFeature.offsetElement(0,0),this.setHeight("100%"),this.setWidth("100%");this.isMaximized=!this.isMaximized,this.refreshMaximizeIcon()}refreshMaximizeIcon(){on(this.maximizeIcon,!this.isMaximized),on(this.minimizeIcon,this.isMaximized)}clearMaximizebleListeners(){this.maximizeListeners.length&&(this.maximizeListeners.forEach(e=>e()),this.maximizeListeners.length=0),this.resizeListenerDestroy&&(this.resizeListenerDestroy(),this.resizeListenerDestroy=null)}destroy(){this.maximizeButtonComp=this.destroyBean(this.maximizeButtonComp),this.clearMaximizebleListeners(),super.destroy()}setResizable(e){this.positionableFeature.setResizable(e)}setMovable(e){this.positionableFeature.setMovable(e,this.eTitleBar)}setMaximizable(e){if(!e)return this.clearMaximizebleListeners(),void(this.maximizeButtonComp&&(this.destroyBean(this.maximizeButtonComp),this.maximizeButtonComp=this.maximizeIcon=this.minimizeIcon=void 0));const t=this.eTitleBar;if(!t||e===this.isMaximizable)return;const i=this.buildMaximizeAndMinimizeElements();this.refreshMaximizeIcon(),i.addManagedListener(i.getGui(),"click",this.toggleMaximize.bind(this)),this.addTitleBarButton(i,0),this.maximizeListeners.push(this.addManagedListener(t,"dblclick",this.toggleMaximize.bind(this))),this.resizeListenerDestroy=this.addManagedListener(this,"resize",()=>{this.isMaximized=!1,this.refreshMaximizeIcon()})}buildMaximizeAndMinimizeElements(){const e=this.maximizeButtonComp=this.createBean(new Cs('<div class="ag-dialog-button"></span>')),t=e.getGui();return this.maximizeIcon=Yn("maximize",this.gos),t.appendChild(this.maximizeIcon),this.maximizeIcon.classList.add("ag-panel-title-bar-button-icon"),this.minimizeIcon=Yn("minimize",this.gos),t.appendChild(this.minimizeIcon),this.minimizeIcon.classList.add("ag-panel-title-bar-button-icon"),e}};g([he("popupService")],hc.prototype,"popupService",2);var dc=0,uc=class extends nt{constructor(){super(...arguments),this.popupList=[]}postConstruct(){this.ctrlsService.whenReady(e=>{this.gridCtrl=e.gridCtrl}),this.addManagedListener(this.eventService,lt.EVENT_GRID_STYLES_CHANGED,this.handleThemeChange.bind(this))}getPopupParent(){return this.gos.get("popupParent")||this.gridCtrl.getGui()}positionPopupForMenu(e){const{eventSource:t,ePopup:i}=e,n=this.getPopupIndex(i);-1!==n&&(this.popupList[n].alignedToElement=t);const s=t.getBoundingClientRect(),r=this.getParentRect(),o=this.keepXYWithinBounds(i,s.top-r.top,0),a=i.clientWidth>0?i.clientWidth:200;i.style.minWidth=`${a}px`;const l=r.right-r.left-a;let c;function h(){return s.right-r.left-2}function d(){return s.left-r.left-a}this.gos.get("enableRtl")?(c=d(),c<0&&(c=h(),this.setAlignedStyles(i,"left")),c>l&&(c=0,this.setAlignedStyles(i,"right"))):(c=h(),c>l&&(c=d(),this.setAlignedStyles(i,"right")),c<0&&(c=0,this.setAlignedStyles(i,"left"))),i.style.left=`${c}px`,i.style.top=`${o}px`}positionPopupUnderMouseEvent(e){const{ePopup:t,nudgeX:i,nudgeY:n,skipObserver:s}=e;this.positionPopup({ePopup:t,nudgeX:i,nudgeY:n,keepWithinBounds:!0,skipObserver:s,updatePosition:()=>this.calculatePointerAlign(e.mouseEvent),postProcessCallback:()=>this.callPostProcessPopup(e.type,e.ePopup,null,e.mouseEvent,e.column,e.rowNode)})}calculatePointerAlign(e){const t=this.getParentRect();return{x:e.clientX-t.left,y:e.clientY-t.top}}positionPopupByComponent(e){const{ePopup:t,nudgeX:i,nudgeY:n,keepWithinBounds:s,eventSource:r,alignSide:o="left",position:a="over",column:l,rowNode:c,type:h}=e,d=r.getBoundingClientRect(),u=this.getParentRect(),p=this.getPopupIndex(t);-1!==p&&(this.popupList[p].alignedToElement=r),this.positionPopup({ePopup:t,nudgeX:i,nudgeY:n,keepWithinBounds:s,updatePosition:()=>{let i,s=d.left-u.left;return"right"===o&&(s-=t.offsetWidth-d.width),"over"===a?(i=d.top-u.top,this.setAlignedStyles(t,"over")):(this.setAlignedStyles(t,"under"),i="under"===this.shouldRenderUnderOrAbove(t,d,u,e.nudgeY||0)?d.top-u.top+d.height:d.top-t.offsetHeight-2*(n||0)-u.top),{x:s,y:i}},postProcessCallback:()=>this.callPostProcessPopup(h,t,r,null,l,c)})}shouldRenderUnderOrAbove(e,t,i,n){const s=i.bottom-t.bottom,r=t.top-i.top,o=e.offsetHeight+n;return s>o?"under":r>o||r>s?"above":"under"}setAlignedStyles(e,t){const i=this.getPopupIndex(e);if(-1===i)return;const n=this.popupList[i],{alignedToElement:s}=n;s&&(["right","left","over","above","under"].forEach(t=>{s.classList.remove(`ag-has-popup-positioned-${t}`),e.classList.remove(`ag-popup-positioned-${t}`)}),t&&(s.classList.add(`ag-has-popup-positioned-${t}`),e.classList.add(`ag-popup-positioned-${t}`)))}callPostProcessPopup(e,t,i,n,s,r){const o=this.gos.getCallback("postProcessPopup");o&&o({column:s,rowNode:r,ePopup:t,type:e,eventSource:i,mouseEvent:n})}positionPopup(e){const{ePopup:t,keepWithinBounds:i,nudgeX:n,nudgeY:s,skipObserver:r,updatePosition:o}=e,a={width:0,height:0},l=(r=!1)=>{let{x:l,y:c}=o();r&&t.clientWidth===a.width&&t.clientHeight===a.height||(a.width=t.clientWidth,a.height=t.clientHeight,n&&(l+=n),s&&(c+=s),i&&(l=this.keepXYWithinBounds(t,l,1),c=this.keepXYWithinBounds(t,c,0)),t.style.left=`${l}px`,t.style.top=`${c}px`,e.postProcessCallback&&e.postProcessCallback())};if(l(),!r){const e=this.resizeObserverService.observeResize(t,()=>l(!0));setTimeout(()=>e(),uc.WAIT_FOR_POPUP_CONTENT_RESIZE)}}getActivePopups(){return this.popupList.map(e=>e.element)}getPopupList(){return this.popupList}getParentRect(){const e=this.gos.getDocument();let t=this.getPopupParent();return t===e.body?t=e.documentElement:"static"===getComputedStyle(t).position&&(t=t.offsetParent),fn(t)}keepXYWithinBounds(e,t,i){const n=0===i,s=n?"clientHeight":"clientWidth",r=n?"top":"left",o=n?"offsetHeight":"offsetWidth",a=n?"scrollTop":"scrollLeft",l=this.gos.getDocument(),c=l.documentElement,h=this.getPopupParent(),d=h.getBoundingClientRect(),u=l.documentElement.getBoundingClientRect(),p=h===l.body,g=e[o];let f=p?(n?pn:gn)(c)+c[a]:h[s];p&&(f-=Math.abs(u[r]-d[r]));const m=f-g;return Math.min(Math.max(t,0),Math.abs(m))}addPopup(e){const t=this.gos.getDocument(),{eChild:i,ariaLabel:n,alwaysOnTop:s,positionCallback:r,anchorToElement:o}=e;if(!t)return console.warn("AG Grid: could not find the document, document is empty"),{hideFunc:()=>{}};const a=this.getPopupIndex(i);if(-1!==a)return{hideFunc:this.popupList[a].hideFunc};this.initialisePopupPosition(i);const l=this.createPopupWrapper(i,n,!!s),c=this.addEventListenersToPopup(u(d({},e),{wrapperEl:l}));return r&&r(),this.addPopupToPopupList(i,l,c,o),{hideFunc:c}}initialisePopupPosition(e){const t=this.getPopupParent().getBoundingClientRect();y(e.style.top)||(e.style.top=-1*t.top+"px"),y(e.style.left)||(e.style.left=-1*t.left+"px")}createPopupWrapper(e,t,i){const n=this.getPopupParent(),s=document.createElement("div"),{allThemes:r}=this.environment.getTheme();return r.length&&s.classList.add(...r),s.classList.add("ag-popup"),e.classList.add(this.gos.get("enableRtl")?"ag-rtl":"ag-ltr","ag-popup-child"),e.hasAttribute("role")||Bt(e,"dialog"),jt(e,t),s.appendChild(e),n.appendChild(s),i?this.setAlwaysOnTop(e,!0):this.bringPopupToFront(e),s}handleThemeChange(){const{allThemes:e}=this.environment.getTheme();for(const t of this.popupList){for(const e of Array.from(t.wrapper.classList))e.startsWith("ag-theme-")&&t.wrapper.classList.remove(e);e.length&&t.wrapper.classList.add(...e)}}addEventListenersToPopup(e){const t=this.gos.getDocument(),i=this.getPopupParent(),{wrapperEl:n,eChild:s,closedCallback:r,afterGuiAttached:o,closeOnEsc:a,modal:l}=e;let c=!1;const h=e=>{n.contains(this.gos.getActiveDomElement())&&(e.key!==Xn.ESCAPE||qe(e)||p({keyboardEvent:e}))},d=e=>p({mouseEvent:e}),u=e=>p({touchEvent:e}),p=(e={})=>{const{mouseEvent:o,touchEvent:a,keyboardEvent:l,forceHide:p}=e;(p||!this.isEventFromCurrentPopup({mouseEvent:o,touchEvent:a},s)&&!c)&&(c=!0,i.removeChild(n),t.removeEventListener("keydown",h),t.removeEventListener("mousedown",d),t.removeEventListener("touchstart",u),t.removeEventListener("contextmenu",d),this.eventService.removeEventListener(lt.EVENT_DRAG_STARTED,d),r&&r(o||a||l),this.removePopupFromPopupList(s))};return o&&o({hidePopup:p}),window.setTimeout(()=>{a&&t.addEventListener("keydown",h),l&&(t.addEventListener("mousedown",d),this.eventService.addEventListener(lt.EVENT_DRAG_STARTED,d),t.addEventListener("touchstart",u),t.addEventListener("contextmenu",d))},0),p}addPopupToPopupList(e,t,i,n){this.popupList.push({element:e,wrapper:t,hideFunc:i,instanceId:dc++,isAnchored:!!n}),n&&this.setPopupPositionRelatedToElement(e,n)}getPopupIndex(e){return this.popupList.findIndex(t=>t.element===e)}setPopupPositionRelatedToElement(e,t){const i=this.getPopupIndex(e);if(-1===i)return;const n=this.popupList[i];if(n.stopAnchoringPromise&&n.stopAnchoringPromise.then(e=>e&&e()),n.stopAnchoringPromise=void 0,n.isAnchored=!1,!t)return;const s=this.keepPopupPositionedRelativeTo({element:t,ePopup:e,hidePopup:n.hideFunc});return n.stopAnchoringPromise=s,n.isAnchored=!0,s}removePopupFromPopupList(e){this.setAlignedStyles(e,null),this.setPopupPositionRelatedToElement(e,null),this.popupList=this.popupList.filter(t=>t.element!==e)}keepPopupPositionedRelativeTo(e){const t=this.getPopupParent(),i=t.getBoundingClientRect(),{element:n,ePopup:s}=e,r=n.getBoundingClientRect(),o=i.top-r.top,a=i.left-r.left;let l=o,c=a;const h=s.style.top,d=parseInt(h.substring(0,h.length-1),10),u=s.style.left,p=parseInt(u.substring(0,u.length-1),10);return new ds(i=>{this.getFrameworkOverrides().setInterval(()=>{const i=t.getBoundingClientRect(),r=n.getBoundingClientRect();if(0==r.top&&0==r.left&&0==r.height&&0==r.width)return void e.hidePopup();const h=i.top-r.top;if(h!=l){const e=this.keepXYWithinBounds(s,d+o-h,0);s.style.top=`${e}px`}l=h;const u=i.left-r.left;if(u!=c){const e=this.keepXYWithinBounds(s,p+a-u,1);s.style.left=`${e}px`}c=u},200).then(e=>{i(()=>{null!=e&&window.clearInterval(e)})})})}hasAnchoredPopup(){return this.popupList.some(e=>e.isAnchored)}isEventFromCurrentPopup(e,t){const{mouseEvent:i,touchEvent:n}=e,s=i||n;if(!s)return!1;const r=this.getPopupIndex(t);if(-1===r)return!1;for(let e=r;e<this.popupList.length;e++)if(Qe(this.popupList[e].element,s))return!0;return this.isElementWithinCustomPopup(s.target)}isElementWithinCustomPopup(e){const t=this.gos.getDocument();for(;e&&e!==t.body;){if(e.classList.contains("ag-custom-component-popup")||null===e.parentElement)return!0;e=e.parentElement}return!1}getWrapper(e){for(;!e.classList.contains("ag-popup")&&e.parentElement;)e=e.parentElement;return e.classList.contains("ag-popup")?e:null}setAlwaysOnTop(e,t){const i=this.getWrapper(e);i&&(i.classList.toggle("ag-always-on-top",!!t),t&&this.bringPopupToFront(i))}bringPopupToFront(e){const t=this.getPopupParent(),i=Array.prototype.slice.call(t.querySelectorAll(".ag-popup")),n=i.length,s=Array.prototype.slice.call(t.querySelectorAll(".ag-popup.ag-always-on-top")),r=s.length,o=this.getWrapper(e);if(!o||n<=1||!t.contains(e))return;const a=i.indexOf(o),l=o.querySelectorAll("div"),c=[];for(l.forEach(e=>{0!==e.scrollTop&&c.push([e,e.scrollTop])}),r?o.classList.contains("ag-always-on-top")?a!==n-1&&De(s).insertAdjacentElement("afterend",o):a!==n-r-1&&s[0].insertAdjacentElement("beforebegin",o):a!==n-1&&De(i).insertAdjacentElement("afterend",o);c.length;){const e=c.pop();e[0].scrollTop=e[1]}}};uc.WAIT_FOR_POPUP_CONTENT_RESIZE=200,g([he("focusService")],uc.prototype,"focusService",2),g([he("ctrlsService")],uc.prototype,"ctrlsService",2),g([he("resizeObserverService")],uc.prototype,"resizeObserverService",2),g([ae],uc.prototype,"postConstruct",1),uc=g([ce("popupService")],uc);var pc=class extends Cs{constructor(){super('\n        <div class="ag-autocomplete-row" role="presentation">\n            <div class="ag-autocomplete-row-label"></div>\n        </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(y(e)){const n=null==(t=this.value)?void 0:t.toLocaleLowerCase().indexOf(e.toLocaleLowerCase());if(n>=0){i=!0,this.hasHighlighting=!0;const t=n+e.length,s=yt(this.value.slice(0,n)),r=yt(this.value.slice(n,t)),o=yt(this.value.slice(t));this.getGui().lastElementChild.innerHTML=`${s}<b>${r}</b>${o}`}}!i&&this.hasHighlighting&&(this.hasHighlighting=!1,this.render())}render(){var e;this.getGui().lastElementChild.innerHTML=null!=(e=yt(this.value))?e:"&nbsp;"}},gc=class e extends xr{constructor(t){super(e.TEMPLATE),this.params=t,this.searchString=""}destroy(){super.destroy()}init(){this.autocompleteEntries=this.params.autocompleteEntries,this.virtualList=this.createManagedBean(new ql({cssIdentifier:"autocomplete"})),this.virtualList.setComponentCreator(this.createRowComponent.bind(this)),this.eList.appendChild(this.virtualList.getGui()),this.virtualList.setModel({getRowCount:()=>this.autocompleteEntries.length,getRow:e=>this.autocompleteEntries[e]});const e=this.virtualList.getGui();this.addManagedListener(e,"click",()=>this.params.onConfirmed()),this.addManagedListener(e,"mousemove",this.onMouseMove.bind(this)),this.addManagedListener(e,"mousedown",e=>e.preventDefault()),this.setSelectedValue(0)}onNavigationKeyDown(e,t){e.preventDefault();const i=this.autocompleteEntries.indexOf(this.selectedValue),n=t===Xn.UP?i-1:i+1;this.checkSetSelectedValue(n)}setSearch(e){this.searchString=e,y(e)?this.runSearch():(this.autocompleteEntries=this.params.autocompleteEntries,this.virtualList.refresh(),this.checkSetSelectedValue(0)),this.updateSearchInList()}runContainsSearch(e,t){let i,n=!1;const s=e.toLocaleLowerCase(),r=t.filter(e=>{const t=e.toLocaleLowerCase().indexOf(s),r=0===t,o=t>=0;return o&&(!i||!n&&r||n===r&&e.length<i.length)&&(i=e,n=r),o});return!i&&r.length&&(i=r[0]),{topMatch:i,allMatches:r}}runSearch(){var e,t;const{autocompleteEntries:i}=this.params,n=i.map(e=>{var t;return null!=(t=e.displayValue)?t:e.key});let s,r;if(this.params.useFuzzySearch)s=Un(this.searchString,n,!0).values,r=s.length?s[0]:void 0;else{const e=this.runContainsSearch(this.searchString,n);s=e.allMatches,r=e.topMatch}let o=i.filter(({key:e,displayValue:t})=>s.includes(null!=t?t:e));if(!o.length&&this.selectedValue&&(null==(t=null==(e=this.params)?void 0:e.forceLastSelection)?void 0:t.call(e,this.selectedValue,this.searchString))&&(o=[this.selectedValue]),this.autocompleteEntries=o,this.virtualList.refresh(),!r)return;const a=s.indexOf(r);this.checkSetSelectedValue(a)}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((t,i)=>{t.updateSelected(e===i)}))}createRowComponent(e){var t;const i=new pc;return this.getContext().createBean(i),i.setState(null!=(t=e.displayValue)?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,s=Math.floor(n/this.virtualList.getRowHeight());this.checkSetSelectedValue(s)}afterGuiAttached(){this.virtualList.refresh()}getSelectedValue(){var e;return this.autocompleteEntries.length&&null!=(e=this.selectedValue)?e:null}};gc.TEMPLATE='<div class="ag-autocomplete-list-popup">\n            <div ref="eList" class="ag-autocomplete-list"></div>\n        <div>',g([Ss("eList")],gc.prototype,"eList",2),g([ae],gc.prototype,"init",1);var fc=gc,mc=class e extends Cs{constructor(){super('\n            <div class="ag-autocomplete" role="presentation">\n                <ag-input-text-field ref="eAutocompleteInput"></ag-input-text-field>\n            </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=v(e);this.updateValue(t),this.updateAutocompleteList(t)}updateValue(t){this.updateLastPosition(),this.dispatchEvent({type:e.EVENT_VALUE_CHANGED,value:t}),this.validate(t)}updateAutocompleteList(e){var t,i,n,s;const r=null!=(i=null==(t=this.listGenerator)?void 0:t.call(this,e,this.lastPosition))?i:{enabled:!1};if(r.type&&r.type===(null==(n=this.autocompleteListParams)?void 0:n.type)||this.isListOpen&&this.closeList(),this.autocompleteListParams=r,null==(s=this.autocompleteListParams)?void 0:s.enabled){this.isListOpen||this.openList();const{searchString:e}=this.autocompleteListParams;this.autocompleteList.setSearch(null!=e?e:"")}else this.isListOpen&&this.closeList()}onKeyDown(e){const t=e.key;switch(this.updateLastPosition(),t){case Xn.ENTER:this.onEnterKeyDown(e);break;case Xn.TAB:this.onTabKeyDown(e);break;case Xn.DOWN:case Xn.UP:this.onUpDownKeyDown(e,t);break;case Xn.LEFT:case Xn.RIGHT:case Xn.PAGE_HOME:case Xn.PAGE_END:setTimeout(()=>{this.updatePositionAndList()});break;case Xn.ESCAPE:this.onEscapeKeyDown(e);break;case Xn.SPACE:e.ctrlKey&&!this.isListOpen&&(e.preventDefault(),this.forceOpenList())}}confirmSelection(){var t;const i=null==(t=this.autocompleteList)?void 0:t.getSelectedValue();i&&(this.closeList(),this.dispatchEvent({type:e.EVENT_OPTION_SELECTED,value:this.getValue(),position:this.lastPosition,updateEntry:i,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?null==(i=this.autocompleteList)||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(null!=(e=this.eAutocompleteInput.getValue())?e:null)}setCaret(e,t){const i=this.gos.getDocument(),n=this.gos.getActiveDomElement();!t||n&&n!==i.body||this.eAutocompleteInput.getFocusableElement().focus();const s=this.eAutocompleteInput.getInputElement();s.setSelectionRange(e,e),e===s.value.length&&(s.scrollLeft=s.scrollWidth)}forceOpenList(){this.onValueChanged(this.eAutocompleteInput.getValue())}updateLastPosition(){var e;this.lastPosition=null!=(e=this.eAutocompleteInput.getInputElement().selectionStart)?e:0}validate(t){var i;this.validator&&(this.validationMessage=this.validator(t),this.eAutocompleteInput.getInputElement().setCustomValidity(null!=(i=this.validationMessage)?i:""),this.valid=!this.validationMessage,this.dispatchEvent({type:e.EVENT_VALID_CHANGED,isValid:this.valid,validationMessage:this.validationMessage}))}openList(){this.isListOpen=!0,this.autocompleteList=this.createBean(new fc({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.gos.get("enableRtl")?"right":"left",keepWithinBounds:!0},i=this.popupService.addPopup({eChild:e,anchorToElement:this.getGui(),positionCallback:()=>this.popupService.positionPopupByComponent(t),ariaLabel:this.listAriaLabel});this.hidePopup=i.hideFunc,this.autocompleteList.afterGuiAttached()}closeList(){this.isListOpen=!1,this.hidePopup(),this.destroyBean(this.autocompleteList),this.autocompleteList=null}onCompleted(){this.isListOpen&&this.closeList(),this.dispatchEvent({type:e.EVENT_VALUE_CONFIRMED,value:this.getValue(),isValid:this.isValid()})}getValue(){return v(this.eAutocompleteInput.getValue())}setInputPlaceholder(e){return this.eAutocompleteInput.setInputPlaceholder(e),this}setInputAriaLabel(e){return this.eAutocompleteInput.setInputAriaLabel(e),this}setListAriaLabel(e){return this.listAriaLabel=e,this}setListGenerator(e){return this.listGenerator=e,this}setValidator(e){return this.validator=e,this}isValid(){return this.valid}setValue(e){const{value:t,position:i,silent:n,updateListOnlyIfOpen:s,restoreFocus:r}=e;this.eAutocompleteInput.setValue(t,!0),this.setCaret(null!=i?i:this.lastPosition,r),n||this.updateValue(t),s&&!this.isListOpen||this.updateAutocompleteList(t)}setForceLastSelection(e){return this.forceLastSelection=e,this}setInputDisabled(e){return this.eAutocompleteInput.setDisabled(e),this}};mc.EVENT_VALUE_CHANGED="eventValueChanged",mc.EVENT_VALUE_CONFIRMED="eventValueConfirmed",mc.EVENT_OPTION_SELECTED="eventOptionSelected",mc.EVENT_VALID_CHANGED="eventValidChanged",g([he("popupService")],mc.prototype,"popupService",2),g([Ss("eAutocompleteInput")],mc.prototype,"eAutocompleteInput",2),g([ae],mc.prototype,"postConstruct",1);var vc=mc,yc=class e extends Cs{constructor(e,t,i,n){super(),this.dragSourceDropTarget=e,this.ghost=t,this.horizontal=i,this.template=n}init(){var t;this.setTemplate(null!=(t=this.template)?t:e.TEMPLATE);const i=this.getGui();this.addElementClasses(i),this.addElementClasses(this.eDragHandle,"drag-handle"),this.addElementClasses(this.eText,"text"),this.addElementClasses(this.eButton,"button"),this.eDragHandle.appendChild(Yn("columnDrag",this.gos)),this.eButton.appendChild(Yn("cancel",this.gos)),this.setupComponents(),!this.ghost&&this.isDraggable()&&this.addDragSource(),this.setupAria(),this.setupTooltip(),this.activateTabIndex(),this.refreshDraggable()}isDraggable(){return!0}refreshDraggable(){this.eDragHandle.classList.toggle("ag-column-select-column-readonly",!this.isDraggable())}setupAria(){const e=this.localeService.getLocaleTextFunc(),t=[this.getAriaDisplayName()];this.addAdditionalAriaInstructions(t,e),jt(this.getGui(),t.join(". "))}addAdditionalAriaInstructions(e,t){if(this.isRemovable()){const i=t("ariaDropZoneColumnComponentDescription","Press DELETE to remove");e.push(i)}}setupTooltip(){const e=()=>{const e=this.getTooltip();this.setTooltip({newTooltipText:e})};e(),this.addManagedListener(this.eventService,lt.EVENT_NEW_COLUMNS_LOADED,e)}getDragSourceId(){}getDefaultIconName(){return Gr.ICON_NOT_ALLOWED}addDragSource(){const{dragAndDropService:e,eDragHandle:t}=this,i=this.createGetDragItem(),n=this.getDefaultIconName(),s={type:this.getDragSourceType(),sourceId:this.getDragSourceId(),eElement:t,getDefaultIconName:()=>n,getDragItem:i,dragItemName:this.getDisplayName()};e.addDragSource(s,!0),this.addDestroyFunc(()=>e.removeDragSource(s))}setupComponents(){this.setTextValue(),this.setupRemove(),this.ghost&&this.addCssClass("ag-column-drop-cell-ghost")}isRemovable(){return!0}refreshRemove(){on(this.eButton,this.isRemovable())}setupRemove(){this.refreshRemove();const t={type:e.EVENT_COLUMN_REMOVE};this.addGuiEventListener("keydown",e=>this.onKeyDown(e)),this.addManagedListener(this.eButton,"click",e=>{this.dispatchEvent(t),e.stopPropagation()});const i=new mr(this.eButton);this.addManagedListener(i,mr.EVENT_TAP,()=>{this.dispatchEvent(t)}),this.addDestroyFunc(i.destroy.bind(i))}onKeyDown(t){t.key===Xn.DELETE&&this.isRemovable()&&(t.preventDefault(),this.dispatchEvent({type:e.EVENT_COLUMN_REMOVE}))}getDisplayValue(){return this.getDisplayName()}setTextValue(){const e=yt(this.getDisplayValue());this.eText.innerHTML=e}addElementClasses(e,t){t=t?`-${t}`:"";const i=this.horizontal?"horizontal":"vertical";e.classList.add(`ag-column-drop-cell${t}`,`ag-column-drop-${i}-cell${t}`)}destroy(){super.destroy(),this.dragSourceDropTarget=null}};yc.EVENT_COLUMN_REMOVE="columnRemove",yc.TEMPLATE='<span role="option">\n          <span ref="eDragHandle" class="ag-drag-handle ag-column-drop-cell-drag-handle" role="presentation"></span>\n          <span ref="eText" class="ag-column-drop-cell-text" aria-hidden="true"></span>\n          <span ref="eButton" class="ag-column-drop-cell-button" role="presentation"></span>\n        </span>',g([he("dragAndDropService")],yc.prototype,"dragAndDropService",2),g([Ss("eText")],yc.prototype,"eText",2),g([Ss("eDragHandle")],yc.prototype,"eDragHandle",2),g([Ss("eButton")],yc.prototype,"eButton",2),g([ae],yc.prototype,"init",1);var Cc=yc,bc=class e extends Cs{constructor(t){super('<div class="ag-unselectable" role="presentation"></div>'),this.horizontal=t,this.state=e.STATE_NOT_DRAGGING,this.guiDestroyFunctions=[],this.childPillComponents=[],this.resizeEnabled=!1,this.addElementClasses(this.getGui()),this.ePillDropList=document.createElement("div"),this.addElementClasses(this.ePillDropList,"list"),Bt(this.ePillDropList,"listbox")}isHorizontal(){return this.horizontal}toggleResizable(e){this.positionableFeature.setResizable(!!e&&{bottom:!0}),this.resizeEnabled=e}isSourceEventFromTarget(e){const{dropZoneTarget:t,dragSource:i}=e;return t.contains(i.eElement)}destroy(){this.destroyGui(),super.destroy()}destroyGui(){this.guiDestroyFunctions.forEach(e=>e()),this.guiDestroyFunctions.length=0,this.childPillComponents.length=0,Cn(this.getGui()),Cn(this.ePillDropList)}init(e){this.params=null!=e?e:{},this.createManagedBean(new Ds(this.getFocusableElement(),{handleKeyDown:this.handleKeyDown.bind(this)})),this.setupDropTarget(),this.positionableFeature=new Ls(this.getGui(),{minHeight:100}),this.createManagedBean(this.positionableFeature),this.refreshGui(),jt(this.ePillDropList,this.getAriaLabel())}handleKeyDown(e){const t=!this.horizontal;let i=e.key===Xn.DOWN,n=e.key===Xn.UP;if(!t){const t=this.gos.get("enableRtl");i=!t&&e.key===Xn.RIGHT||t&&e.key===Xn.LEFT,n=!t&&e.key===Xn.LEFT||t&&e.key===Xn.RIGHT}if(!i&&!n)return;const s=this.focusService.findNextFocusableElement(this.getFocusableElement(),!1,n);s&&(e.preventDefault(),s.focus())}addElementClasses(e,t){t=t?`-${t}`:"";const i=this.horizontal?"horizontal":"vertical";e.classList.add(`ag-column-drop${t}`,`ag-column-drop-${i}${t}`)}setupDropTarget(){this.dropTarget={getContainer:this.getGui.bind(this),getIconName:this.getIconName.bind(this),onDragging:this.onDragging.bind(this),onDragEnter:this.onDragEnter.bind(this),onDragLeave:this.onDragLeave.bind(this),onDragStop:this.onDragStop.bind(this),isInterestedIn:this.isInterestedIn.bind(this)},this.dragAndDropService.addDropTarget(this.dropTarget)}minimumAllowedNewInsertIndex(){return 0}checkInsertIndex(e){const t=this.getNewInsertIndex(e);if(t<0)return!1;const i=this.minimumAllowedNewInsertIndex(),n=Math.max(i,t),s=n!==this.insertIndex;return s&&(this.insertIndex=n),s}getNewInsertIndex(e){const t=e.event,i=this.horizontal?t.clientX:t.clientY,n=this.childPillComponents.map(e=>e.getGui().getBoundingClientRect()),s=n.findIndex(e=>this.horizontal?e.right>i&&e.left<i:e.top<i&&e.bottom>i);if(-1===s){const e=this.gos.get("enableRtl");return n.every(e=>i>(this.horizontal?e.right:e.bottom))?e&&this.horizontal?0:this.childPillComponents.length:n.every(e=>i<(this.horizontal?e.left:e.top))?e&&this.horizontal?this.childPillComponents.length:0:this.insertIndex}return this.insertIndex<=s?s+1:s}checkDragStartedBySelf(t){this.state===e.STATE_NOT_DRAGGING&&(this.state=e.STATE_REARRANGE_ITEMS,this.potentialDndItems=this.getItems(t.dragSource.getDragItem()),this.refreshGui(),this.checkInsertIndex(t),this.refreshGui())}onDragging(e){this.checkDragStartedBySelf(e),this.checkInsertIndex(e)&&this.refreshGui()}handleDragEnterEnd(e){}onDragEnter(t){const i=this.getItems(t.dragSource.getDragItem());this.state=e.STATE_NEW_ITEMS_IN;const n=i.filter(e=>this.isItemDroppable(e,t)),s=n.every(e=>-1!==this.childPillComponents.map(e=>e.getItem()).indexOf(e));0!==n.length&&(this.potentialDndItems=n,s?this.state=e.STATE_NOT_DRAGGING:(this.handleDragEnterEnd(t),this.checkInsertIndex(t),this.refreshGui()))}isPotentialDndItems(){return Te(this.potentialDndItems)}handleDragLeaveEnd(e){}onDragLeave(t){if(this.state===e.STATE_REARRANGE_ITEMS){const e=this.getItems(t.dragSource.getDragItem());this.removeItems(e)}this.isPotentialDndItems()&&(this.handleDragLeaveEnd(t),this.potentialDndItems=[],this.refreshGui()),this.state=e.STATE_NOT_DRAGGING}refreshOnDragStop(){return!0}onDragStop(){if(this.isPotentialDndItems()){let t=!1;this.state===e.STATE_NEW_ITEMS_IN?(this.addItems(this.potentialDndItems),t=!0):t=this.rearrangeItems(this.potentialDndItems),this.potentialDndItems=[],!this.refreshOnDragStop()&&t||this.refreshGui()}this.state=e.STATE_NOT_DRAGGING}removeItems(e){const t=this.getExistingItems().filter(t=>!Be(e,t));this.updateItems(t)}addItems(e){if(!e)return;const t=this.getExistingItems().slice(),i=e.filter(e=>t.indexOf(e)<0);Ge(t,i,this.insertIndex),this.updateItems(t)}addItem(e){this.insertIndex=this.getExistingItems().length,this.addItems([e]),this.refreshGui()}rearrangeItems(e){const t=this.getNonGhostItems().slice();return Ge(t,e,this.insertIndex),!Ie(t,this.getExistingItems())&&(this.updateItems(t),!0)}refreshGui(){const e=this.ePillDropList.scrollTop,t=this.resizeEnabled,i=this.getFocusedItem();let n=this.focusService.findNextFocusableElement();n||(n=this.focusService.findNextFocusableElement(void 0,!1,!0)),this.toggleResizable(!1),this.destroyGui(),this.addIconAndTitleToGui(),this.addEmptyMessageToGui(),this.addItemsToGui(),this.isHorizontal()||(this.ePillDropList.scrollTop=e),t&&this.toggleResizable(t),this.focusService.isKeyboardMode()&&this.restoreFocus(i,n)}getFocusedItem(){const e=this.getGui(),t=this.gos.getActiveDomElement();return e.contains(t)?Array.from(e.querySelectorAll(".ag-column-drop-cell")).indexOf(t):-1}restoreFocus(e,t){const i=this.getGui(),n=Array.from(i.querySelectorAll(".ag-column-drop-cell"));if(-1===e)return;0===n.length&&t.focus();const s=n[Math.min(n.length-1,e)];s&&s.focus()}focusList(e){const t=e?this.childPillComponents.length-1:0;this.restoreFocus(t,this.getFocusableElement())}getNonGhostItems(){const e=this.getExistingItems();return this.isPotentialDndItems()?e.filter(e=>!Be(this.potentialDndItems,e)):e}addItemsToGui(){const e=this.getNonGhostItems().map(e=>this.createItemComponent(e,!1));if(this.isPotentialDndItems()){const t=this.potentialDndItems.map(e=>this.createItemComponent(e,!0));this.insertIndex>=e.length?e.push(...t):e.splice(this.insertIndex,0,...t)}this.appendChild(this.ePillDropList),e.forEach((e,t)=>{t>0&&this.addArrow(this.ePillDropList),this.ePillDropList.appendChild(e.getGui())}),this.addAriaLabelsToComponents()}addAriaLabelsToComponents(){this.childPillComponents.forEach((e,t)=>{const i=e.getGui();si(i,t+1),ni(i,this.childPillComponents.length)})}createItemComponent(e,t){const i=this.createPillComponent(e,this.dropTarget,t,this.horizontal);return i.addEventListener(Cc.EVENT_COLUMN_REMOVE,this.removeItems.bind(this,[e])),this.context.createBean(i),this.guiDestroyFunctions.push(()=>this.destroyBean(i)),t||this.childPillComponents.push(i),i}addIconAndTitleToGui(){const{title:e,icon:t}=this.params;if(!e||!t)return;const i=document.createElement("div");if(Jt(i,!0),this.addElementClasses(i,"title-bar"),this.addElementClasses(t,"icon"),this.addOrRemoveCssClass("ag-column-drop-empty",this.isExistingItemsEmpty()),i.appendChild(t),!this.horizontal){const t=document.createElement("span");this.addElementClasses(t,"title"),t.innerHTML=e,i.appendChild(t)}this.appendChild(i)}isExistingItemsEmpty(){return 0===this.getExistingItems().length}addEmptyMessageToGui(){const{emptyMessage:e}=this.params;if(!e||!this.isExistingItemsEmpty()||this.isPotentialDndItems())return;const t=document.createElement("span");t.innerHTML=e,this.addElementClasses(t,"empty-message"),this.ePillDropList.appendChild(t)}addArrow(e){if(this.horizontal){const t=Yn(this.gos.get("enableRtl")?"smallLeft":"smallRight",this.gos);this.addElementClasses(t,"cell-separator"),e.appendChild(t)}}};bc.STATE_NOT_DRAGGING="notDragging",bc.STATE_NEW_ITEMS_IN="newItemsIn",bc.STATE_REARRANGE_ITEMS="rearrangeItems",g([he("focusService")],bc.prototype,"focusService",2),g([he("dragAndDropService")],bc.prototype,"dragAndDropService",2);var Sc=bc,wc=["touchstart","touchend","touchmove","touchcancel"],xc=class{constructor(e="javascript"){this.frameworkName=e,this.renderingEngine="vanilla",this.wrapIncoming=e=>e(),this.wrapOutgoing=e=>e()}setInterval(e,t){return new ds(i=>{i(window.setInterval(e,t))})}addEventListener(e,t,i,n){const s=Be(wc,t);e.addEventListener(t,i,{capture:!!n,passive:s})}get shouldWrapOutgoing(){return!1}frameworkComponent(e){return null}isFrameworkComponent(e){return!1}getDocLink(e){return`https://www.ag-grid.com/${"solid"===this.frameworkName?"react":this.frameworkName}-data-grid${e?`/${e}`:""}`}},Ec=class extends nt{getNextCellToFocus(e,t,i=!1){return i?this.getNextCellToFocusWithCtrlPressed(e,t):this.getNextCellToFocusWithoutCtrlPressed(e,t)}getNextCellToFocusWithCtrlPressed(e,t){const i=e===Xn.UP,n=e===Xn.DOWN,s=e===Xn.LEFT;let r,o;if(i||n)o=i?this.paginationProxy.getPageFirstRow():this.paginationProxy.getPageLastRow(),r=t.column;else{const e=this.columnModel.getAllDisplayedColumns(),i=this.gos.get("enableRtl");o=t.rowIndex,r=s!==i?e[0]:De(e)}return{rowIndex:o,rowPinned:null,column:r}}getNextCellToFocusWithoutCtrlPressed(e,t){let i=t,n=!1;for(;!n;){switch(e){case Xn.UP:i=this.getCellAbove(i);break;case Xn.DOWN:i=this.getCellBelow(i);break;case Xn.RIGHT:i=this.gos.get("enableRtl")?this.getCellToLeft(i):this.getCellToRight(i);break;case Xn.LEFT:i=this.gos.get("enableRtl")?this.getCellToRight(i):this.getCellToLeft(i);break;default:i=null,console.warn("AG Grid: unknown key for navigation "+e)}n=!i||this.isCellGoodToFocusOn(i)}return i}isCellGoodToFocusOn(e){const t=e.column;let i;switch(e.rowPinned){case"top":i=this.pinnedRowModel.getPinnedTopRow(e.rowIndex);break;case"bottom":i=this.pinnedRowModel.getPinnedBottomRow(e.rowIndex);break;default:i=this.rowModel.getRow(e.rowIndex)}return!!i&&!t.isSuppressNavigable(i)}getCellToLeft(e){if(!e)return null;const t=this.columnModel.getDisplayedColBefore(e.column);return t?{rowIndex:e.rowIndex,column:t,rowPinned:e.rowPinned}:null}getCellToRight(e){if(!e)return null;const t=this.columnModel.getDisplayedColAfter(e.column);return t?{rowIndex:e.rowIndex,column:t,rowPinned:e.rowPinned}:null}getRowBelow(e){const t=e.rowIndex,i=e.rowPinned;if(this.isLastRowInContainer(e))switch(i){case"bottom":return null;case"top":return this.rowModel.isRowsToRender()?{rowIndex:this.paginationProxy.getPageFirstRow(),rowPinned:null}:this.pinnedRowModel.isRowsToRender("bottom")?{rowIndex:0,rowPinned:"bottom"}:null;default:return this.pinnedRowModel.isRowsToRender("bottom")?{rowIndex:0,rowPinned:"bottom"}:null}const n=this.rowModel.getRow(e.rowIndex);return this.getNextStickyPosition(n)||{rowIndex:t+1,rowPinned:i}}getNextStickyPosition(e,t){if(!this.gos.isGroupRowsSticky()||!e||!e.sticky)return;let i=[];i=this.rowRenderer.getStickyTopRowCtrls().some(t=>t.getRowNode().rowIndex===e.rowIndex)?[...this.rowRenderer.getStickyTopRowCtrls()].sort((e,t)=>e.getRowNode().rowIndex-t.getRowNode().rowIndex):[...this.rowRenderer.getStickyBottomRowCtrls()].sort((e,t)=>t.getRowNode().rowIndex-e.getRowNode().rowIndex);const n=t?-1:1,s=i.findIndex(t=>t.getRowNode().rowIndex===e.rowIndex),r=i[s+n];return r?{rowIndex:r.getRowNode().rowIndex,rowPinned:null}:void 0}getCellBelow(e){if(!e)return null;const t=this.getRowBelow(e);return t?{rowIndex:t.rowIndex,column:e.column,rowPinned:t.rowPinned}:null}isLastRowInContainer(e){const t=e.rowPinned,i=e.rowIndex;return"top"===t?this.pinnedRowModel.getPinnedTopRowData().length-1<=i:"bottom"===t?this.pinnedRowModel.getPinnedBottomRowData().length-1<=i:this.paginationProxy.getPageLastRow()<=i}getRowAbove(e){const t=e.rowIndex,i=e.rowPinned;if(i?0===t:t===this.paginationProxy.getPageFirstRow())return"top"===i?null:i&&this.rowModel.isRowsToRender()?this.getLastBodyCell():this.pinnedRowModel.isRowsToRender("top")?this.getLastFloatingTopRow():null;const n=this.rowModel.getRow(e.rowIndex);return this.getNextStickyPosition(n,!0)||{rowIndex:t-1,rowPinned:i}}getCellAbove(e){if(!e)return null;const t=this.getRowAbove({rowIndex:e.rowIndex,rowPinned:e.rowPinned});return t?{rowIndex:t.rowIndex,column:e.column,rowPinned:t.rowPinned}:null}getLastBodyCell(){return{rowIndex:this.paginationProxy.getPageLastRow(),rowPinned:null}}getLastFloatingTopRow(){return{rowIndex:this.pinnedRowModel.getPinnedTopRowData().length-1,rowPinned:"top"}}getNextTabbedCell(e,t){return t?this.getNextTabbedCellBackwards(e):this.getNextTabbedCellForwards(e)}getNextTabbedCellForwards(e){const t=this.columnModel.getAllDisplayedColumns();let i=e.rowIndex,n=e.rowPinned,s=this.columnModel.getDisplayedColAfter(e.column);if(!s){s=t[0];const r=this.getRowBelow(e);if(C(r))return null;if(!r.rowPinned&&!this.paginationProxy.isRowInPage(r))return null;i=r?r.rowIndex:null,n=r?r.rowPinned:null}return{rowIndex:i,column:s,rowPinned:n}}getNextTabbedCellBackwards(e){const t=this.columnModel.getAllDisplayedColumns();let i=e.rowIndex,n=e.rowPinned,s=this.columnModel.getDisplayedColBefore(e.column);if(!s){s=De(t);const r=this.getRowAbove({rowIndex:e.rowIndex,rowPinned:e.rowPinned});if(C(r))return null;if(!r.rowPinned&&!this.paginationProxy.isRowInPage(r))return null;i=r?r.rowIndex:null,n=r?r.rowPinned:null}return{rowIndex:i,column:s,rowPinned:n}}};g([he("columnModel")],Ec.prototype,"columnModel",2),g([he("rowModel")],Ec.prototype,"rowModel",2),g([he("rowRenderer")],Ec.prototype,"rowRenderer",2),g([he("pinnedRowModel")],Ec.prototype,"pinnedRowModel",2),g([he("paginationProxy")],Ec.prototype,"paginationProxy",2),Ec=g([ce("cellNavigationService")],Ec);var Mc=class extends nt{constructor(){super(...arguments),this.consuming=!1}setBeans(e){this.logger=e.create("AlignedGridsService")}getAlignedGridApis(){var e;let t=null!=(e=this.gos.get("alignedGrids"))?e:[];const i="function"==typeof t;"function"==typeof t&&(t=t());const n=()=>`See ${this.getFrameworkOverrides().getDocLink("aligned-grids")}`;return t.map(e=>{var t;if(!e)return U("alignedGrids contains an undefined option."),i||U('You may want to configure via a callback to avoid setup race conditions:\n                     "alignedGrids: () => [linkedGrid]"'),void U(n());if(e instanceof zo)return e;const s=e;return"current"in s?null==(t=s.current)?void 0:t.api:(s.api||U(`alignedGrids - No api found on the linked grid. If you are passing gridOptions to alignedGrids since v31 this is no longer valid. ${n()}`),s.api)}).filter(e=>!!e&&!e.isDestroyed())}init(){this.addManagedListener(this.eventService,lt.EVENT_COLUMN_MOVED,this.fireColumnEvent.bind(this)),this.addManagedListener(this.eventService,lt.EVENT_COLUMN_VISIBLE,this.fireColumnEvent.bind(this)),this.addManagedListener(this.eventService,lt.EVENT_COLUMN_PINNED,this.fireColumnEvent.bind(this)),this.addManagedListener(this.eventService,lt.EVENT_COLUMN_GROUP_OPENED,this.fireColumnEvent.bind(this)),this.addManagedListener(this.eventService,lt.EVENT_COLUMN_RESIZED,this.fireColumnEvent.bind(this)),this.addManagedListener(this.eventService,lt.EVENT_BODY_SCROLL,this.fireScrollEvent.bind(this))}fireEvent(e){this.consuming||this.getAlignedGridApis().forEach(t=>{if(t.isDestroyed())return;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){"horizontal"===e.direction&&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(e=>{t.push(e)}):e.column&&t.push(e.column),t}getColumnIds(e){const t=[];return e.columns?e.columns.forEach(e=>{t.push(e.getColId())}):e.column&&t.push(e.column.getColId()),t}onColumnEvent(e){this.onEvent(()=>{switch(e.type){case lt.EVENT_COLUMN_MOVED:case lt.EVENT_COLUMN_VISIBLE:case lt.EVENT_COLUMN_PINNED:case lt.EVENT_COLUMN_RESIZED:const t=e;this.processColumnEvent(t);break;case lt.EVENT_COLUMN_GROUP_OPENED:const i=e;this.processGroupOpenedEvent(i);break;case lt.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.")}})}processGroupOpenedEvent(e){e.columnGroups.forEach(t=>{let i=null;if(t){const e=t.getGroupId();i=this.columnModel.getProvidedColumnGroup(e)}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 s=this.getMasterColumns(e);switch(e.type){case lt.EVENT_COLUMN_MOVED:{const t=e,i=e.api.getColumnState().map(e=>({colId:e.colId}));this.columnModel.applyColumnState({state:i,applyOrder:!0},"alignedGridChanged"),this.logger.log(`onColumnEvent-> processing ${e.type} toIndex = ${t.toIndex}`)}break;case lt.EVENT_COLUMN_VISIBLE:{const t=e,i=e.api.getColumnState().map(e=>({colId:e.colId,hide:e.hide}));this.columnModel.applyColumnState({state:i},"alignedGridChanged"),this.logger.log(`onColumnEvent-> processing ${e.type} visible = ${t.visible}`)}break;case lt.EVENT_COLUMN_PINNED:{const t=e,i=e.api.getColumnState().map(e=>({colId:e.colId,pinned:e.pinned}));this.columnModel.applyColumnState({state:i},"alignedGridChanged"),this.logger.log(`onColumnEvent-> processing ${e.type} pinned = ${t.pinned}`)}break;case lt.EVENT_COLUMN_RESIZED:const i=e,n={};s.forEach(t=>{this.logger.log(`onColumnEvent-> processing ${e.type} actualWidth = ${t.getActualWidth()}`),n[t.getId()]={key:t.getColId(),newWidth:t.getActualWidth()}}),null==(t=i.flexColumns)||t.forEach(e=>{n[e.getId()]&&delete n[e.getId()]}),this.columnModel.setColumnWidths(Object.values(n),!1,i.finished,"alignedGridChanged")}const r=this.ctrlsService.getGridBodyCtrl().isVerticalScrollShowing();this.getAlignedGridApis().forEach(e=>{e.setGridOption("alwaysShowVerticalScroll",r)})}};g([he("columnModel")],Mc.prototype,"columnModel",2),g([he("ctrlsService")],Mc.prototype,"ctrlsService",2),g([f(0,pe("loggerFactory"))],Mc.prototype,"setBeans",1),g([ae],Mc.prototype,"init",1),Mc=g([ce("alignedGridsService")],Mc);var Ac=class extends nt{constructor(){super(...arguments),this.selectedNodes=new Map,this.lastRowNode=null}init(){this.rowSelection=this.gos.get("rowSelection"),this.groupSelectsChildren=this.gos.get("groupSelectsChildren"),this.addManagedPropertyListeners(["groupSelectsChildren","rowSelection"],()=>{this.groupSelectsChildren=this.gos.get("groupSelectsChildren"),this.rowSelection=this.gos.get("rowSelection"),this.deselectAllRowNodes({source:"api"})}),this.addManagedListener(this.eventService,lt.EVENT_ROW_SELECTED,this.onRowSelected.bind(this))}destroy(){super.destroy(),this.resetNodes(),this.lastRowNode=null}isMultiselect(){return"multiple"===this.rowSelection}setNodesSelected(e){var t;const{newValue:i,clearSelection:n,suppressFinishActions:s,rangeSelect:r,nodes:o,event:a,source:l="api"}=e;if(0===o.length)return 0;if(o.length>1&&!this.isMultiselect())return console.warn("AG Grid: cannot multi select while rowSelection='single'"),0;const c=this.groupSelectsChildren&&!0===e.groupSelectsFiltered,h=o.map(e=>e.footer?e.sibling:e);if(r){if(o.length>1)return console.warn("AG Grid: cannot range select while selecting multiple rows"),0;let e=null;if("checkboxSelected"===l&&!1===i&&this.lastRowNode&&(this.lastRowNode.id?e=this.lastRowNode:this.lastRowNode=null),null==e&&(e=this.getLastSelectedNode()),e){const t=h[0];if(t!==e&&this.isMultiselect())return this.selectRange(t,e,i,l)}}this.lastRowNode=i?null:h[0];let d=0;for(let e=0;e<h.length;e++){const n=h[e];c&&n.group||n.selectThisNode(i,a,l)&&d++,this.groupSelectsChildren&&(null==(t=n.childrenAfterGroup)?void 0:t.length)&&(d+=this.selectChildren(n,i,c,l))}if(!s&&(i&&(n||!this.isMultiselect())&&(d+=this.clearOtherNodes(h[0],l)),d>0)){this.updateGroupsFromChildrenSelections(l);const e={type:lt.EVENT_SELECTION_CHANGED,source:l};this.eventService.dispatchEvent(e)}return d}selectRange(e,t,i=!0,n){const s=this.rowModel.getNodesInRangeForSelection(e,t);let r=0;s.forEach(e=>{e.group&&this.groupSelectsChildren||e.selectThisNode(i,void 0,n)&&r++}),this.updateGroupsFromChildrenSelections(n);const o={type:lt.EVENT_SELECTION_CHANGED,source:n};return this.eventService.dispatchEvent(o),r}selectChildren(e,t,i,n){const s=i?e.childrenAfterAggFilter:e.childrenAfterGroup;return C(s)?0:this.setNodesSelected({newValue:t,clearSelection:!1,suppressFinishActions:!0,groupSelectsFiltered:i,source:n,nodes:s})}getLastSelectedNode(){const e=Array.from(this.selectedNodes.keys());if(0==e.length)return null;return this.selectedNodes.get(De(e))||null}getSelectedNodes(){const e=[];return this.selectedNodes.forEach(t=>{t&&e.push(t)}),e}getSelectedRows(){const e=[];return this.selectedNodes.forEach(t=>{t&&t.data&&e.push(t.data)}),e}getSelectionCount(){return this.selectedNodes.size}filterFromSelection(e){const t=new Map;this.selectedNodes.forEach((i,n)=>{i&&e(i)&&t.set(n,i)}),this.selectedNodes=t}updateGroupsFromChildrenSelections(e,t){if(!this.groupSelectsChildren)return!1;if("clientSide"!==this.rowModel.getType())return!1;const i=this.rowModel.getRootNode();t||(t=new Fl(!0,i)).setInactive();let n=!1;return t.forEachChangedNodeDepthFirst(t=>{if(t!==i){const i=t.calculateSelectedFromChildren();n=t.selectThisNode(null!==i&&i,void 0,e)||n}}),n}clearOtherNodes(e,t){const i=new Map;let n=0;return this.selectedNodes.forEach(s=>{if(s&&s.id!==e.id){const e=this.selectedNodes.get(s.id);n+=e.setSelectedParams({newValue:!1,clearSelection:!1,suppressFinishActions:!0,source:t}),this.groupSelectsChildren&&s.parent&&i.set(s.parent.id,s.parent)}}),i.forEach(e=>{const i=e.calculateSelectedFromChildren();e.selectThisNode(null!==i&&i,void 0,t)}),n}onRowSelected(e){const t=e.node;this.groupSelectsChildren&&t.group||(t.isSelected()?this.selectedNodes.set(t.id,t):this.selectedNodes.delete(t.id))}syncInRowNode(e,t){this.syncInOldRowNode(e,t),this.syncInNewRowNode(e)}syncInOldRowNode(e,t){if(y(t)&&e.id!==t.id&&t){const i=t.id;this.selectedNodes.get(i)==e&&this.selectedNodes.set(t.id,t)}}syncInNewRowNode(e){this.selectedNodes.has(e.id)?(e.setSelectedInitialValue(!0),this.selectedNodes.set(e.id,e)):e.setSelectedInitialValue(!1)}reset(e){const t=this.getSelectionCount();if(this.resetNodes(),t){const t={type:lt.EVENT_SELECTION_CHANGED,source:e};this.eventService.dispatchEvent(t)}}resetNodes(){var e;null==(e=this.selectedNodes)||e.clear()}getBestCostNodeSelection(){if("clientSide"!==this.rowModel.getType())return;const e=this.rowModel.getTopLevelNodes();if(null===e)return;const t=[];return function e(i){for(let n=0,s=i.length;n<s;n++){const s=i[n];if(s.isSelected())t.push(s);else{const t=s;t.group&&t.children&&e(t.children)}}}(e),t}isEmpty(){let e=0;return this.selectedNodes.forEach(t=>{t&&e++}),0===e}deselectAllRowNodes(e){const t=e=>e.selectThisNode(!1,void 0,n),i="clientSide"===this.rowModel.getType(),{source:n,justFiltered:s,justCurrentPage:r}=e;if(r||s){if(!i)return void console.error("AG Grid: selecting just filtered only works when gridOptions.rowModelType='clientSide'");this.getNodesToSelect(s,r).forEach(t)}else this.selectedNodes.forEach(e=>{e&&t(e)}),this.reset(n);i&&this.groupSelectsChildren&&this.updateGroupsFromChildrenSelections(n);const o={type:lt.EVENT_SELECTION_CHANGED,source:n};this.eventService.dispatchEvent(o)}getSelectedCounts(e,t){let i=0,n=0;return this.getNodesToSelect(e,t).forEach(e=>{this.groupSelectsChildren&&e.group||(e.isSelected()?i++:e.selectable&&n++)}),{selectedCount:i,notSelectedCount:n}}getSelectAllState(e,t){const{selectedCount:i,notSelectedCount:n}=this.getSelectedCounts(e,t);return(0!==i||0!==n)&&(i>0&&n>0?null:i>0)}hasNodesToSelect(e=!1,t=!1){return this.getNodesToSelect(e,t).filter(e=>e.selectable).length>0}getNodesToSelect(e=!1,t=!1){if("clientSide"!==this.rowModel.getType())throw new Error(`selectAll only available when rowModelType='clientSide', ie not ${this.rowModel.getType()}`);const i=[];if(t)return this.paginationProxy.forEachNodeOnPage(e=>{if(e.group){if(!e.expanded){const t=e=>{var n;i.push(e),(null==(n=e.childrenAfterFilter)?void 0:n.length)&&e.childrenAfterFilter.forEach(t)};return void t(e)}this.groupSelectsChildren||i.push(e)}else i.push(e)}),i;const n=this.rowModel;return e?(n.forEachNodeAfterFilter(e=>{i.push(e)}),i):(n.forEachNode(e=>{i.push(e)}),i)}selectAllRowNodes(e){if("clientSide"!==this.rowModel.getType())throw new Error(`selectAll only available when rowModelType='clientSide', ie not ${this.rowModel.getType()}`);const{source:t,justFiltered:i,justCurrentPage:n}=e;this.getNodesToSelect(i,n).forEach(e=>e.selectThisNode(!0,void 0,t)),"clientSide"===this.rowModel.getType()&&this.groupSelectsChildren&&this.updateGroupsFromChildrenSelections(t);const s={type:lt.EVENT_SELECTION_CHANGED,source:t};this.eventService.dispatchEvent(s)}getSelectionState(){const e=[];return this.selectedNodes.forEach(t=>{(null==t?void 0:t.id)&&e.push(t.id)}),e.length?e:null}setSelectionState(e,t){if(!Array.isArray(e))return;const i=new Set(e),n=[];this.rowModel.forEachNode(e=>{i.has(e.id)&&n.push(e)}),this.setNodesSelected({newValue:!0,nodes:n,source:t})}};g([he("rowModel")],Ac.prototype,"rowModel",2),g([he("paginationProxy")],Ac.prototype,"paginationProxy",2),g([ae],Ac.prototype,"init",1),Ac=g([ce("selectionService")],Ac);var Tc=class{constructor(e){this.viaApi=(e,...t)=>(z(`Since v31, 'columnApi.${e}' is deprecated and moved to 'api.${e}'.`),this.api[e](...t)),this.api=e}sizeColumnsToFit(e){this.viaApi("sizeColumnsToFit",e)}setColumnGroupOpened(e,t){this.viaApi("setColumnGroupOpened",e,t)}getColumnGroup(e,t){return this.viaApi("getColumnGroup",e,t)}getProvidedColumnGroup(e){return this.viaApi("getProvidedColumnGroup",e)}getDisplayNameForColumn(e,t){return this.viaApi("getDisplayNameForColumn",e,t)}getDisplayNameForColumnGroup(e,t){return this.viaApi("getDisplayNameForColumnGroup",e,t)}getColumn(e){return this.viaApi("getColumn",e)}getColumns(){return this.viaApi("getColumns")}applyColumnState(e){return this.viaApi("applyColumnState",e)}getColumnState(){return this.viaApi("getColumnState")}resetColumnState(){this.viaApi("resetColumnState")}getColumnGroupState(){return this.viaApi("getColumnGroupState")}setColumnGroupState(e){this.viaApi("setColumnGroupState",e)}resetColumnGroupState(){this.viaApi("resetColumnGroupState")}isPinning(){return this.viaApi("isPinning")}isPinningLeft(){return this.viaApi("isPinningLeft")}isPinningRight(){return this.viaApi("isPinningRight")}getDisplayedColAfter(e){return this.viaApi("getDisplayedColAfter",e)}getDisplayedColBefore(e){return this.viaApi("getDisplayedColBefore",e)}setColumnVisible(e,t){this.viaApi("setColumnVisible",e,t)}setColumnsVisible(e,t){this.viaApi("setColumnsVisible",e,t)}setColumnPinned(e,t){this.viaApi("setColumnPinned",e,t)}setColumnsPinned(e,t){this.viaApi("setColumnsPinned",e,t)}getAllGridColumns(){return this.viaApi("getAllGridColumns")}getDisplayedLeftColumns(){return this.viaApi("getDisplayedLeftColumns")}getDisplayedCenterColumns(){return this.viaApi("getDisplayedCenterColumns")}getDisplayedRightColumns(){return this.viaApi("getDisplayedRightColumns")}getAllDisplayedColumns(){return this.viaApi("getAllDisplayedColumns")}getAllDisplayedVirtualColumns(){return this.viaApi("getAllDisplayedVirtualColumns")}moveColumn(e,t){this.viaApi("moveColumn",e,t)}moveColumnByIndex(e,t){this.viaApi("moveColumnByIndex",e,t)}moveColumns(e,t){this.viaApi("moveColumns",e,t)}moveRowGroupColumn(e,t){this.viaApi("moveRowGroupColumn",e,t)}setColumnAggFunc(e,t){this.viaApi("setColumnAggFunc",e,t)}setColumnWidth(e,t,i=!0,n){this.viaApi("setColumnWidth",e,t,i,n)}setColumnWidths(e,t=!0,i){this.viaApi("setColumnWidths",e,t,i)}setPivotMode(e){this.viaApi("setPivotMode",e)}isPivotMode(){return this.viaApi("isPivotMode")}getPivotResultColumn(e,t){return this.viaApi("getPivotResultColumn",e,t)}setValueColumns(e){this.viaApi("setValueColumns",e)}getValueColumns(){return this.viaApi("getValueColumns")}removeValueColumn(e){this.viaApi("removeValueColumn",e)}removeValueColumns(e){this.viaApi("removeValueColumns",e)}addValueColumn(e){this.viaApi("addValueColumn",e)}addValueColumns(e){this.viaApi("addValueColumns",e)}setRowGroupColumns(e){this.viaApi("setRowGroupColumns",e)}removeRowGroupColumn(e){this.viaApi("removeRowGroupColumn",e)}removeRowGroupColumns(e){this.viaApi("removeRowGroupColumns",e)}addRowGroupColumn(e){this.viaApi("addRowGroupColumn",e)}addRowGroupColumns(e){this.viaApi("addRowGroupColumns",e)}getRowGroupColumns(){return this.viaApi("getRowGroupColumns")}setPivotColumns(e){this.viaApi("setPivotColumns",e)}removePivotColumn(e){this.viaApi("removePivotColumn",e)}removePivotColumns(e){this.viaApi("removePivotColumns",e)}addPivotColumn(e){this.viaApi("addPivotColumn",e)}addPivotColumns(e){this.viaApi("addPivotColumns",e)}getPivotColumns(){return this.viaApi("getPivotColumns")}getLeftDisplayedColumnGroups(){return this.viaApi("getLeftDisplayedColumnGroups")}getCenterDisplayedColumnGroups(){return this.viaApi("getCenterDisplayedColumnGroups")}getRightDisplayedColumnGroups(){return this.viaApi("getRightDisplayedColumnGroups")}getAllDisplayedColumnGroups(){return this.viaApi("getAllDisplayedColumnGroups")}autoSizeColumn(e,t){return this.viaApi("autoSizeColumn",e,t)}autoSizeColumns(e,t){this.viaApi("autoSizeColumns",e,t)}autoSizeAllColumns(e){this.viaApi("autoSizeAllColumns",e)}setPivotResultColumns(e){this.viaApi("setPivotResultColumns",e)}getPivotResultColumns(){return this.viaApi("getPivotResultColumns")}};g([he("gridApi")],Tc.prototype,"api",2),Tc=g([ce("columnApi")],Tc);var Dc=class extends nt{constructor(){super(...arguments),this.initialised=!1,this.isSsrm=!1}init(){this.isSsrm=this.gos.isRowModelType("serverSide"),this.cellExpressions=this.gos.get("enableCellExpressions"),this.isTreeData=this.gos.get("treeData"),this.initialised=!0;const e=e=>this.callColumnCellValueChangedHandler(e),t=this.gos.useAsyncEvents();this.eventService.addEventListener(lt.EVENT_CELL_VALUE_CHANGED,e,t),this.addDestroyFunc(()=>this.eventService.removeEventListener(lt.EVENT_CELL_VALUE_CHANGED,e,t)),this.addManagedPropertyListener("treeData",e=>this.isTreeData=e.currentValue)}getValue(e,t,i=!1,n=!1){if(this.initialised||this.init(),!t)return;const s=e.getColDef(),r=s.field,o=e.getColId(),a=t.data;let l;const c=t.groupData&&void 0!==t.groupData[o],h=!n&&t.aggData&&void 0!==t.aggData[o],d=this.isSsrm&&n&&!!e.getColDef().aggFunc,u=this.isSsrm&&t.footer&&t.field&&(!0===e.getColDef().showRowGroup||e.getColDef().showRowGroup===t.field);if(i&&s.filterValueGetter?l=this.executeFilterValueGetter(s.filterValueGetter,a,e,t):this.isTreeData&&h?l=t.aggData[o]:this.isTreeData&&s.valueGetter?l=this.executeValueGetter(s.valueGetter,a,e,t):this.isTreeData&&r&&a?l=_(a,r,e.isFieldContainsDots()):c?l=t.groupData[o]:h?l=t.aggData[o]:s.valueGetter?l=this.executeValueGetter(s.valueGetter,a,e,t):u?l=_(a,t.field,e.isFieldContainsDots()):r&&a&&!d&&(l=_(a,r,e.isFieldContainsDots())),this.cellExpressions&&"string"==typeof l&&0===l.indexOf("=")){const i=l.substring(1);l=this.executeValueGetter(i,a,e,t)}if(null==l){const i=this.getOpenedGroup(t,e);if(null!=i)return i}return l}parseValue(e,t,i,n){const s=e.getColDef(),r=this.gos.addGridCommonParams({node:t,data:null==t?void 0:t.data,oldValue:n,newValue:i,colDef:s,column:e}),o=s.valueParser;return y(o)?"function"==typeof o?o(r):this.expressionService.evaluate(o,r):i}formatValue(e,t,i,n,s=!0){let r,o=null;const a=e.getColDef();if(n?r=n:s&&(r=a.valueFormatter),r){const n=this.gos.addGridCommonParams({value:i,node:t,data:t?t.data:null,colDef:a,column:e});o="function"==typeof r?r(n):this.expressionService.evaluate(r,n)}else if(a.refData)return a.refData[i]||"";return null==o&&Array.isArray(i)&&(o=i.join(", ")),o}getOpenedGroup(e,t){if(!this.gos.get("showOpenedGroup"))return;if(!t.getColDef().showRowGroup)return;const i=t.getColDef().showRowGroup;let n=e.parent;for(;null!=n;){if(n.rowGroupColumn&&(!0===i||i===n.rowGroupColumn.getColId()))return n.key;n=n.parent}}setValue(e,t,i,n){const s=this.columnModel.getPrimaryColumn(t);if(!e||!s)return!1;C(e.data)&&(e.data={});const{field:r,valueSetter:o}=s.getColDef();if(C(r)&&C(o))return console.warn("AG Grid: you need either field or valueSetter set on colDef for editing to work"),!1;if(!this.dataTypeService.checkType(s,i))return console.warn("AG Grid: Data type of the new value does not match the cell data type of the column"),!1;const a=this.gos.addGridCommonParams({node:e,data:e.data,oldValue:this.getValue(s,e),newValue:i,colDef:s.getColDef(),column:s});let l;if(a.newValue=i,l=y(o)?"function"==typeof o?o(a):this.expressionService.evaluate(o,a):this.setValueUsingField(e.data,r,i,s.isFieldContainsDots()),void 0===l&&(l=!0),!l)return!1;e.resetQuickFilterAggregateText(),this.valueCache.onDataChanged(),a.newValue=this.getValue(s,e);const c={type:lt.EVENT_CELL_VALUE_CHANGED,event:null,rowIndex:e.rowIndex,rowPinned:e.rowPinned,column:a.column,api:a.api,columnApi:a.columnApi,colDef:a.colDef,context:a.context,data:e.data,node:e,oldValue:a.oldValue,newValue:a.newValue,value:a.newValue,source:n};return this.eventService.dispatchEvent(c),!0}callColumnCellValueChangedHandler(e){const t=e.colDef.onCellValueChanged;"function"==typeof t&&this.getFrameworkOverrides().wrapOutgoing(()=>{t({node:e.node,data:e.data,oldValue:e.oldValue,newValue:e.newValue,colDef:e.colDef,column:e.column,api:e.api,columnApi:e.columnApi,context:e.context})})}setValueUsingField(e,t,i,n){if(!t)return!1;let s=!1;if(n){const n=t.split(".");let r=e;for(;n.length>0&&r;){const e=n.shift();0===n.length?(s=r[e]===i,s||(r[e]=i)):r=r[e]}}else s=e[t]===i,s||(e[t]=i);return!s}executeFilterValueGetter(e,t,i,n){const s=this.gos.addGridCommonParams({data:t,node:n,column:i,colDef:i.getColDef(),getValue:this.getValueCallback.bind(this,n)});return"function"==typeof e?e(s):this.expressionService.evaluate(e,s)}executeValueGetter(e,t,i,n){const s=i.getColId(),r=this.valueCache.getValue(n,s);if(void 0!==r)return r;const o=this.gos.addGridCommonParams({data:t,node:n,column:i,colDef:i.getColDef(),getValue:this.getValueCallback.bind(this,n)});let a;return a="function"==typeof e?e(o):this.expressionService.evaluate(e,o),this.valueCache.setValue(n,s,a),a}getValueCallback(e,t){const i=this.columnModel.getPrimaryColumn(t);return i?this.getValue(i,e):null}getKeyForNode(e,t){const i=this.getValue(e,t),n=e.getColDef().keyCreator;let s=i;return n&&(s=n(this.gos.addGridCommonParams({value:i,colDef:e.getColDef(),column:e,node:t,data:t.data}))),"string"==typeof s||null==s||(s=String(s),"[object Object]"===s&&z("a column you are grouping or pivoting by has objects as values. If you want to group by complex objects then either a) use a colDef.keyCreator (se AG Grid docs) or b) to toString() on the object to return a key")),s}};g([he("expressionService")],Dc.prototype,"expressionService",2),g([he("columnModel")],Dc.prototype,"columnModel",2),g([he("valueCache")],Dc.prototype,"valueCache",2),g([he("dataTypeService")],Dc.prototype,"dataTypeService",2),g([ae],Dc.prototype,"init",1),Dc=g([ce("valueService")],Dc);var Ic=class extends nt{constructor(){super(...arguments),this.expressionToFunctionCache={}}setBeans(e){this.logger=e.create("ExpressionService")}evaluate(e,t){if("string"==typeof e)return this.evaluateExpression(e,t);console.error("AG Grid: value should be either a string or a function",e)}evaluateExpression(e,t){try{return this.createExpressionFunction(e)(t.value,t.context,t.oldValue,t.newValue,t.value,t.node,t.data,t.colDef,t.rowIndex,t.api,t.columnApi,t.getValue,t.column,t.columnGroup)}catch(i){return console.log("Processing of the expression failed"),console.log("Expression = "+e),console.log("Params =",t),console.log("Exception = "+i),null}}createExpressionFunction(e){if(this.expressionToFunctionCache[e])return this.expressionToFunctionCache[e];const t=this.createFunctionBody(e),i=new Function("x, ctx, oldValue, newValue, value, node, data, colDef, rowIndex, api, columnApi, getValue, column, columnGroup",t);return this.expressionToFunctionCache[e]=i,i}createFunctionBody(e){return e.indexOf("return")>=0?e:"return "+e+";"}};g([f(0,pe("loggerFactory"))],Ic.prototype,"setBeans",1),Ic=g([ce("expressionService")],Ic);var Rc=class extends nt{setBeans(e){this.logging=e.get("debug")}create(e){return new Lc(e,this.isLogging.bind(this))}isLogging(){return this.logging}};g([f(0,pe("gridOptionsService"))],Rc.prototype,"setBeans",1),Rc=g([ce("loggerFactory")],Rc);var Lc=class{constructor(e,t){this.name=e,this.isLoggingFunc=t}isLogging(){return this.isLoggingFunc()}log(e){this.isLoggingFunc()&&console.log("AG Grid."+this.name+": "+e)}},kc=class extends nt{setComp(e,t,i){this.view=e,this.eGridHostDiv=t,this.eGui=i,this.eGui.setAttribute("grid-id",this.context.getGridId()),this.dragAndDropService.addDropTarget({getContainer:()=>this.eGui,isInterestedIn:e=>1===e||0===e,getIconName:()=>Gr.ICON_NOT_ALLOWED}),this.mouseEventService.stampTopLevelGridCompWithGridInstance(t),this.createManagedBean(new Xo(this.view)),this.addRtlSupport();const n=this.resizeObserverService.observeResize(this.eGridHostDiv,this.onGridSizeChanged.bind(this));this.addDestroyFunc(()=>n()),this.ctrlsService.register("gridCtrl",this)}isDetailGrid(){var e;const t=this.focusService.findTabbableParent(this.getGui());return(null==(e=null==t?void 0:t.getAttribute("row-id"))?void 0:e.startsWith("detail"))||!1}showDropZones(){return se.__isRegistered("@ag-grid-enterprise/row-grouping",this.context.getGridId())}showSideBar(){return se.__isRegistered("@ag-grid-enterprise/side-bar",this.context.getGridId())}showStatusBar(){return se.__isRegistered("@ag-grid-enterprise/status-bar",this.context.getGridId())}showWatermark(){return se.__isRegistered("@ag-grid-enterprise/core",this.context.getGridId())}onGridSizeChanged(){const e={type:lt.EVENT_GRID_SIZE_CHANGED,clientWidth:this.eGridHostDiv.clientWidth,clientHeight:this.eGridHostDiv.clientHeight};this.eventService.dispatchEvent(e)}addRtlSupport(){const e=this.gos.get("enableRtl")?"ag-rtl":"ag-ltr";this.view.setRtlClass(e)}destroyGridUi(){this.view.destroyGridUi()}getGui(){return this.eGui}setResizeCursor(e){this.view.setCursor(e?"ew-resize":null)}disableUserSelect(e){this.view.setUserSelect(e?"none":null)}focusNextInnerContainer(e){const t=this.view.getFocusableContainers(),i=this.gos.getActiveDomElement(),n=t.findIndex(e=>e.contains(i))+(e?-1:1);return!(n<=0||n>=t.length)&&this.focusService.focusInto(t[n])}focusInnerElement(e){const t=this.view.getFocusableContainers(),i=this.columnModel.getAllDisplayedColumns();if(e){if(t.length>1)return this.focusService.focusInto(De(t),!0);const e=De(i);if(this.focusService.focusGridView(e,!0))return!0}if(0===this.gos.get("headerHeight")||this.gos.get("suppressHeaderFocus")){if(this.focusService.focusGridView(i[0]))return!0;for(let e=1;e<t.length;e++)if(this.focusService.focusInto(t[e]))return!0;return!1}return this.focusService.focusFirstHeader()}forceFocusOutOfContainer(e=!1){this.view.forceFocusOutOfContainer(e)}};g([he("focusService")],kc.prototype,"focusService",2),g([he("resizeObserverService")],kc.prototype,"resizeObserverService",2),g([he("columnModel")],kc.prototype,"columnModel",2),g([he("ctrlsService")],kc.prototype,"ctrlsService",2),g([he("mouseEventService")],kc.prototype,"mouseEventService",2),g([he("dragAndDropService")],kc.prototype,"dragAndDropService",2);var Pc=class extends xl{constructor(e){super(),this.eGridDiv=e}postConstruct(){this.logger=this.loggerFactory.create("GridComp");const e={destroyGridUi:()=>this.destroyBean(this),setRtlClass:e=>this.addCssClass(e),forceFocusOutOfContainer:this.forceFocusOutOfContainer.bind(this),updateLayoutClasses:this.updateLayoutClasses.bind(this),getFocusableContainers:this.getFocusableContainers.bind(this),setUserSelect:e=>{this.getGui().style.userSelect=null!=e?e:"",this.getGui().style.webkitUserSelect=null!=e?e:""},setCursor:e=>{this.getGui().style.cursor=null!=e?e:""}};this.ctrl=this.createManagedBean(new kc);const t=this.createTemplate();this.setTemplate(t),this.ctrl.setComp(e,this.eGridDiv,this.getGui()),this.insertGridIntoDom(),this.initialiseTabGuard({onTabKeyDown:()=>{},focusInnerElement:e=>this.ctrl.focusInnerElement(e),forceFocusOutWhenTabGuardsAreEmpty:!0})}insertGridIntoDom(){const e=this.getGui();this.eGridDiv.appendChild(e),this.addDestroyFunc(()=>{this.eGridDiv.removeChild(e),this.logger.log("Grid removed from DOM")})}updateLayoutClasses(e,t){const i=this.eRootWrapperBody.classList;i.toggle("ag-layout-auto-height",t.autoHeight),i.toggle("ag-layout-normal",t.normal),i.toggle("ag-layout-print",t.print),this.addOrRemoveCssClass("ag-layout-auto-height",t.autoHeight),this.addOrRemoveCssClass("ag-layout-normal",t.normal),this.addOrRemoveCssClass("ag-layout-print",t.print)}createTemplate(){return`<div class="ag-root-wrapper" role="presentation">\n                ${this.ctrl.showDropZones()?"<ag-grid-header-drop-zones></ag-grid-header-drop-zones>":""}\n                <div class="ag-root-wrapper-body" ref="rootWrapperBody" role="presentation">\n                    <ag-grid-body ref="gridBody"></ag-grid-body>\n                    ${this.ctrl.showSideBar()?'<ag-side-bar ref="sideBar"></ag-side-bar>':""}\n                </div>\n                ${this.ctrl.showStatusBar()?'<ag-status-bar ref="statusBar"></ag-status-bar>':""}\n                <ag-pagination></ag-pagination>\n                ${this.ctrl.showWatermark()?"<ag-watermark></ag-watermark>":""}\n            </div>`}getFocusableElement(){return this.eRootWrapperBody}getFocusableContainers(){const e=[this.gridBodyComp.getGui()];return this.sideBarComp&&e.push(this.sideBarComp.getGui()),e.filter(e=>wn(e))}};g([he("loggerFactory")],Pc.prototype,"loggerFactory",2),g([Ss("gridBody")],Pc.prototype,"gridBodyComp",2),g([Ss("sideBar")],Pc.prototype,"sideBarComp",2),g([Ss("rootWrapperBody")],Pc.prototype,"eRootWrapperBody",2),g([ae],Pc.prototype,"postConstruct",1);var Nc=class extends nt{progressSort(e,t,i){const n=this.getNextSortDirection(e);this.setSortForColumn(e,n,t,i)}setSortForColumn(e,t,i,n){"asc"!==t&&"desc"!==t&&(t=null);let s=[e];if(this.gos.isColumnsSortingCoupledToGroup()&&e.getColDef().showRowGroup){const t=this.columnModel.getSourceColumnsForGroupColumn(e),i=null==t?void 0:t.filter(e=>e.isSortable());i&&(s=[e,...i])}s.forEach(e=>e.setSort(t,n));const r=[];if(!i&&!this.gos.get("alwaysMultiSort")||this.gos.get("suppressMultiSort")){const e=this.clearSortBarTheseColumns(s,n);r.push(...e)}this.updateSortIndex(e),r.push(...s),this.dispatchSortChangedEvents(n,r)}updateSortIndex(e){const t=this.gos.isColumnsSortingCoupledToGroup(),i=this.columnModel.getGroupDisplayColumnForGroup(e.getId()),n=t&&i||e,s=this.getColumnsWithSortingOrdered();this.columnModel.getPrimaryAndSecondaryAndAutoColumns().forEach(e=>e.setSortIndex(null));const r=s.filter(e=>!(t&&e.getColDef().showRowGroup||e===n));(n.getSort()?[...r,n]:r).forEach((e,t)=>{e.setSortIndex(t)})}onSortChanged(e,t){this.dispatchSortChangedEvents(e,t)}isSortActive(){const e=this.columnModel.getPrimaryAndSecondaryAndAutoColumns().filter(e=>!!e.getSort());return e&&e.length>0}dispatchSortChangedEvents(e,t){const i={type:lt.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(t=e.getColDef().sortingOrder?e.getColDef().sortingOrder:this.gos.get("sortingOrder")?this.gos.get("sortingOrder"):Nc.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,s=i==t.length-1;let r;return r=n||s?t[0]:t[i+1],Nc.DEFAULT_SORTING_ORDER.indexOf(r)<0?(console.warn("AG Grid: invalid sort type "+r),null):r}getIndexedSortMap(){let e=this.columnModel.getPrimaryAndSecondaryAndAutoColumns().filter(e=>!!e.getSort());if(this.columnModel.isPivotMode()){const t=this.gos.isColumnsSortingCoupledToGroup();e=e.filter(e=>{const i=!!e.getAggFunc(),n=!e.isPrimary(),s=t?this.columnModel.getGroupDisplayColumnForGroup(e.getId()):e.getColDef().showRowGroup;return i||n||s})}const t=this.columnModel.getRowGroupColumns().filter(e=>!!e.getSort()),i={};e.forEach((e,t)=>i[e.getId()]=t),e.sort((e,t)=>{const n=e.getSortIndex(),s=t.getSortIndex();return null!=n&&null!=s?n-s:null==n&&null==s?i[e.getId()]>i[t.getId()]?1:-1:null==s?-1:1});const n=this.gos.isColumnsSortingCoupledToGroup()&&!!t.length;n&&(e=[...new Set(e.map(e=>{var t;return null!=(t=this.columnModel.getGroupDisplayColumnForGroup(e.getId()))?t:e}))]);const s=new Map;return e.forEach((e,t)=>s.set(e,t)),n&&t.forEach(e=>{const t=this.columnModel.getGroupDisplayColumnForGroup(e.getId());s.set(e,s.get(t))}),s}getColumnsWithSortingOrdered(){return[...this.getIndexedSortMap().entries()].sort(([e,t],[i,n])=>t-n).map(([e])=>e)}getSortModel(){return this.getColumnsWithSortingOrdered().filter(e=>e.getSort()).map(e=>({sort:e.getSort(),colId:e.getId()}))}getSortOptions(){return this.getColumnsWithSortingOrdered().filter(e=>e.getSort()).map(e=>({sort:e.getSort(),column:e}))}canColumnDisplayMixedSort(e){const t=this.gos.isColumnsSortingCoupledToGroup(),i=!!e.getColDef().showRowGroup;return t&&i}getDisplaySortForColumn(e){const t=this.columnModel.getSourceColumnsForGroupColumn(e);if(!this.canColumnDisplayMixedSort(e)||!(null==t?void 0:t.length))return e.getSort();const i=null!=e.getColDef().field||e.getColDef().valueGetter?[e,...t]:t,n=i[0].getSort();return i.every(e=>e.getSort()==n)?n:"mixed"}getDisplaySortIndexForColumn(e){return this.getIndexedSortMap().get(e)}};Nc.DEFAULT_SORTING_ORDER=["asc","desc",null],g([he("columnModel")],Nc.prototype,"columnModel",2),Nc=g([ce("sortController")],Nc);var Oc=class extends nt{static addKeyboardModeEvents(e){this.instanceCount>0||(e.addEventListener("keydown",Oc.toggleKeyboardMode),e.addEventListener("mousedown",Oc.toggleKeyboardMode))}static removeKeyboardModeEvents(e){this.instanceCount>0||(e.addEventListener("keydown",Oc.toggleKeyboardMode),e.addEventListener("mousedown",Oc.toggleKeyboardMode))}static toggleKeyboardMode(e){const t=Oc.keyboardModeActive,i="keydown"===e.type;i&&(e.ctrlKey||e.metaKey||e.altKey)||t!==i&&(Oc.keyboardModeActive=i)}static unregisterGridCompController(e){Oc.removeKeyboardModeEvents(e)}init(){const e=this.clearFocusedCell.bind(this);this.addManagedListener(this.eventService,lt.EVENT_COLUMN_PIVOT_MODE_CHANGED,e),this.addManagedListener(this.eventService,lt.EVENT_NEW_COLUMNS_LOADED,this.onColumnEverythingChanged.bind(this)),this.addManagedListener(this.eventService,lt.EVENT_COLUMN_GROUP_OPENED,e),this.addManagedListener(this.eventService,lt.EVENT_COLUMN_ROW_GROUP_CHANGED,e),this.registerKeyboardFocusEvents(),this.ctrlsService.whenReady(e=>{this.gridCtrl=e.gridCtrl})}registerKeyboardFocusEvents(){const e=this.gos.getDocument();Oc.addKeyboardModeEvents(e),Oc.instanceCount++,this.addDestroyFunc(()=>{Oc.instanceCount--,Oc.unregisterGridCompController(e)})}onColumnEverythingChanged(){if(!this.focusedCellPosition)return;const e=this.focusedCellPosition.column,t=this.columnModel.getGridColumn(e.getId());e!==t&&this.clearFocusedCell()}isKeyboardMode(){return Oc.keyboardModeActive}getFocusCellToUseAfterRefresh(){return this.gos.get("suppressFocusAfterRefresh")||!this.focusedCellPosition||this.isDomDataMissingInHierarchy(this.gos.getActiveDomElement(),va.DOM_DATA_KEY_ROW_CTRL)?null:this.focusedCellPosition}getFocusHeaderToUseAfterRefresh(){return this.gos.get("suppressFocusAfterRefresh")||!this.focusedHeaderPosition||this.isDomDataMissingInHierarchy(this.gos.getActiveDomElement(),Ja.DOM_DATA_KEY_HEADER_CTRL)?null:this.focusedHeaderPosition}isDomDataMissingInHierarchy(e,t){let i=e;for(;i;){if(this.gos.getDomData(i,t))return!1;i=i.parentNode}return!0}getFocusedCell(){return this.focusedCellPosition}shouldRestoreFocus(e){return!!this.isCellRestoreFocused(e)&&(setTimeout(()=>{this.restoredFocusedCellPosition=null},0),!0)}isCellRestoreFocused(e){return null!=this.restoredFocusedCellPosition&&this.cellPositionUtils.equals(e,this.restoredFocusedCellPosition)}setRestoreFocusedCell(e){"react"===this.getFrameworkOverrides().renderingEngine&&(this.restoredFocusedCellPosition=e)}getFocusEventParams(){const{rowIndex:e,rowPinned:t,column:i}=this.focusedCellPosition,n={rowIndex:e,rowPinned:t,column:i,isFullWidthCell:!1},s=this.rowRenderer.getRowByPosition({rowIndex:e,rowPinned:t});return s&&(n.isFullWidthCell=s.isFullWidth()),n}clearFocusedCell(){if(this.restoredFocusedCellPosition=null,null==this.focusedCellPosition)return;const e=d({type:lt.EVENT_CELL_FOCUS_CLEARED},this.getFocusEventParams());this.focusedCellPosition=null,this.eventService.dispatchEvent(e)}setFocusedCell(e){const{column:t,rowIndex:i,rowPinned:n,forceBrowserFocus:s=!1,preventScrollOnBrowserFocus:r=!1}=e,o=this.columnModel.getGridColumn(t);if(!o)return void(this.focusedCellPosition=null);this.focusedCellPosition=o?{rowIndex:i,rowPinned:v(n),column:o}:null;const a=u(d({type:lt.EVENT_CELL_FOCUSED},this.getFocusEventParams()),{forceBrowserFocus:s,preventScrollOnBrowserFocus:r,floating:null});this.eventService.dispatchEvent(a)}isCellFocused(e){return null!=this.focusedCellPosition&&this.cellPositionUtils.equals(e,this.focusedCellPosition)}isRowNodeFocused(e){return this.isRowFocused(e.rowIndex,e.rowPinned)}isHeaderWrapperFocused(e){if(null==this.focusedHeaderPosition)return!1;const t=e.getColumnGroupChild(),i=e.getRowIndex(),n=e.getPinned(),{column:s,headerRowIndex:r}=this.focusedHeaderPosition;return t===s&&i===r&&n==s.getPinned()}clearFocusedHeader(){this.focusedHeaderPosition=null}getFocusedHeader(){return this.focusedHeaderPosition}setFocusedHeader(e,t){this.focusedHeaderPosition={headerRowIndex:e,column:t}}focusHeaderPosition(e){if(this.gos.get("suppressHeaderFocus"))return!1;const{direction:t,fromTab:i,allowUserOverride:n,event:s,fromCell:r,rowWithoutSpanValue:o}=e;let{headerPosition:a}=e;if(r&&this.filterManager.isAdvancedFilterHeaderActive())return this.focusAdvancedFilter(a);if(n){const e=this.getFocusedHeader(),n=this.headerNavigationService.getHeaderRowCount();if(i){const i=this.gos.getCallback("tabToNextHeader");i&&(a=this.getHeaderPositionFromUserFunc({userFunc:i,direction:t,currentPosition:e,headerPosition:a,headerRowCount:n}))}else{const t=this.gos.getCallback("navigateToNextHeader");t&&s&&(a=t({key:s.key,previousHeaderPosition:e,nextHeaderPosition:a,headerRowCount:n,event:s}))}}return!!a&&this.focusProvidedHeaderPosition({headerPosition:a,direction:t,event:s,fromCell:r,rowWithoutSpanValue:o})}focusHeaderPositionFromUserFunc(e){if(this.gos.get("suppressHeaderFocus"))return!1;const{userFunc:t,headerPosition:i,direction:n,event:s}=e,r=this.getFocusedHeader(),o=this.headerNavigationService.getHeaderRowCount(),a=this.getHeaderPositionFromUserFunc({userFunc:t,direction:n,currentPosition:r,headerPosition:i,headerRowCount:o});return!!a&&this.focusProvidedHeaderPosition({headerPosition:a,direction:n,event:s})}getHeaderPositionFromUserFunc(e){const{userFunc:t,direction:i,currentPosition:n,headerPosition:s,headerRowCount:r}=e,o=t({backwards:"Before"===i,previousHeaderPosition:n,nextHeaderPosition:s,headerRowCount:r});return!0===o||null===o?(null===o&&z("Returning `null` from tabToNextHeader is deprecated. Return `true` to stay on the current header, or `false` to let the browser handle the tab behaviour."),n):!1===o?null:o}focusProvidedHeaderPosition(e){const{headerPosition:t,direction:i,fromCell:n,rowWithoutSpanValue:s,event:r}=e;if(-1===t.headerRowIndex)return this.filterManager.isAdvancedFilterHeaderActive()?this.focusAdvancedFilter(t):this.focusGridView(t.column);this.headerNavigationService.scrollToColumn(t.column,i);const o=this.ctrlsService.getHeaderRowContainerCtrl(t.column.getPinned()).focusHeader(t.headerRowIndex,t.column,r);return o&&(null!=s||n)&&this.headerNavigationService.setCurrentHeaderRowWithoutSpan(null!=s?s:-1),o}focusFirstHeader(){let e=this.columnModel.getAllDisplayedColumns()[0];if(!e)return!1;e.getParent()&&(e=this.columnModel.getColumnGroupAtLevel(e,0));const t=this.headerPositionUtils.getHeaderIndexToFocus(e,0);return this.focusHeaderPosition({headerPosition:t,rowWithoutSpanValue:0})}focusLastHeader(e){const t=this.headerNavigationService.getHeaderRowCount()-1,i=De(this.columnModel.getAllDisplayedColumns());return this.focusHeaderPosition({headerPosition:{headerRowIndex:t,column:i},rowWithoutSpanValue:-1,event:e})}focusPreviousFromFirstCell(e){return this.filterManager.isAdvancedFilterHeaderActive()?this.focusAdvancedFilter(null):this.focusLastHeader(e)}isAnyCellFocused(){return!!this.focusedCellPosition}isRowFocused(e,t){return null!=this.focusedCellPosition&&this.focusedCellPosition.rowIndex===e&&this.focusedCellPosition.rowPinned===v(t)}findFocusableElements(e,t,i=!1){const n=nn;let s=sn;t&&(s+=", "+t),i&&(s+=', [tabindex="-1"]');const r=Array.prototype.slice.apply(e.querySelectorAll(n)).filter(e=>wn(e)),o=Array.prototype.slice.apply(e.querySelectorAll(s));return o.length?(a=o,r.filter(e=>-1===a.indexOf(e))):r;var a}focusInto(e,t=!1,i=!1){const n=this.findFocusableElements(e,null,i),s=t?De(n):n[0];return!!s&&(s.focus({preventScroll:!0}),!0)}findFocusableElementBeforeTabGuard(e,t){if(!t)return null;const i=this.findFocusableElements(e),n=i.indexOf(t);if(-1===n)return null;let s=-1;for(let e=n-1;e>=0;e--)if(i[e].classList.contains("ag-tab-guard-top")){s=e;break}return s<=0?null:i[s-1]}findNextFocusableElement(e=this.eGridDiv,t,i){const n=this.findFocusableElements(e,t?':not([tabindex="-1"])':null),s=this.gos.getActiveDomElement();let r;r=t?n.findIndex(e=>e.contains(s)):n.indexOf(s);const o=r+(i?-1:1);return o<0||o>=n.length?null:n[o]}isTargetUnderManagedComponent(e,t){if(!t)return!1;const i=e.querySelectorAll(`.${Ds.FOCUS_MANAGED_CLASS}`);if(!i.length)return!1;for(let e=0;e<i.length;e++)if(i[e].contains(t))return!0;return!1}findTabbableParent(e,t=5){let i=0;for(;e&&null===Pi(e)&&++i<=t;)e=e.parentElement;return null===Pi(e)?null:e}focusGridView(e,t){var i;if(this.gos.get("suppressCellFocus"))return t?this.gos.get("suppressHeaderFocus")?this.focusNextGridCoreContainer(!0,!0):this.focusLastHeader():this.focusNextGridCoreContainer(!1);const n=t?this.rowPositionUtils.getLastRow():this.rowPositionUtils.getFirstRow();if(!n)return!1;const{rowIndex:s,rowPinned:r}=n,o=this.getFocusedHeader();return!e&&o&&(e=o.column),!(null==s||!e||(this.navigationService.ensureCellVisible({rowIndex:s,column:e,rowPinned:r}),this.setFocusedCell({rowIndex:s,column:e,rowPinned:v(r),forceBrowserFocus:!0}),null==(i=this.rangeService)||i.setRangeToCell({rowIndex:s,rowPinned:r,column:e}),0))}focusNextGridCoreContainer(e,t=!1){return!(t||!this.gridCtrl.focusNextInnerContainer(e))||((t||!e&&!this.gridCtrl.isDetailGrid())&&this.gridCtrl.forceFocusOutOfContainer(e),!1)}focusAdvancedFilter(e){var t,i;return this.advancedFilterFocusColumn=null==e?void 0:e.column,null!=(i=null==(t=this.advancedFilterService)?void 0:t.getCtrl().focusHeaderComp())&&i}focusNextFromAdvancedFilter(e,t){var i,n;const s=null!=(n=t?void 0:this.advancedFilterFocusColumn)?n:null==(i=this.columnModel.getAllDisplayedColumns())?void 0:i[0];return e?this.focusHeaderPosition({headerPosition:{column:s,headerRowIndex:this.headerNavigationService.getHeaderRowCount()-1}}):this.focusGridView(s)}clearAdvancedFilterColumn(){this.advancedFilterFocusColumn=void 0}};Oc.keyboardModeActive=!1,Oc.instanceCount=0,g([he("eGridDiv")],Oc.prototype,"eGridDiv",2),g([he("columnModel")],Oc.prototype,"columnModel",2),g([he("headerNavigationService")],Oc.prototype,"headerNavigationService",2),g([he("headerPositionUtils")],Oc.prototype,"headerPositionUtils",2),g([he("rowRenderer")],Oc.prototype,"rowRenderer",2),g([he("rowPositionUtils")],Oc.prototype,"rowPositionUtils",2),g([he("cellPositionUtils")],Oc.prototype,"cellPositionUtils",2),g([he("navigationService")],Oc.prototype,"navigationService",2),g([he("ctrlsService")],Oc.prototype,"ctrlsService",2),g([he("filterManager")],Oc.prototype,"filterManager",2),g([de("rangeService")],Oc.prototype,"rangeService",2),g([de("advancedFilterService")],Oc.prototype,"advancedFilterService",2),g([ae],Oc.prototype,"init",1),Oc=g([ce("focusService")],Oc);var _c=class extends nt{setMouseOver(e){this.selectedColumns=e;const t={type:lt.EVENT_COLUMN_HOVER_CHANGED};this.eventService.dispatchEvent(t)}clearMouseOver(){this.selectedColumns=null;const e={type:lt.EVENT_COLUMN_HOVER_CHANGED};this.eventService.dispatchEvent(e)}isHovered(e){return!!this.selectedColumns&&this.selectedColumns.indexOf(e)>=0}};_c=g([ce("columnHoverService")],_c);var Fc=class extends nt{constructor(){super(...arguments),this.executeNextFuncs=[],this.executeLaterFuncs=[],this.active=!1,this.suppressAnimation=!1,this.animationThreadCount=0}postConstruct(){this.ctrlsService.whenReady(e=>this.gridBodyCtrl=e.gridBodyCtrl)}isActive(){return this.active&&!this.suppressAnimation}setSuppressAnimation(e){this.suppressAnimation=e}start(){this.active||this.gos.get("suppressColumnMoveAnimation")||this.gos.get("enableRtl")||(this.ensureAnimationCssClassPresent(),this.active=!0)}finish(){this.active&&this.flush(()=>{this.active=!1})}executeNextVMTurn(e){this.active?this.executeNextFuncs.push(e):e()}executeLaterVMTurn(e){this.active?this.executeLaterFuncs.push(e):e()}ensureAnimationCssClassPresent(){this.animationThreadCount++;const e=this.animationThreadCount;this.gridBodyCtrl.setColumnMovingCss(!0),this.executeLaterFuncs.push(()=>{this.animationThreadCount===e&&this.gridBodyCtrl.setColumnMovingCss(!1)})}flush(e){if(0===this.executeNextFuncs.length&&0===this.executeLaterFuncs.length)return void e();const t=e=>{for(;e.length;){const t=e.pop();t&&t()}};this.getFrameworkOverrides().wrapIncoming(()=>{window.setTimeout(()=>t(this.executeNextFuncs),0),window.setTimeout(()=>{e(),t(this.executeLaterFuncs)},200)})}};g([he("ctrlsService")],Fc.prototype,"ctrlsService",2),g([ae],Fc.prototype,"postConstruct",1),Fc=g([ce("columnAnimationService")],Fc);var Gc=class extends nt{postConstruct(){this.ctrlsService.whenReady(e=>{this.centerRowsCtrl=e.center,this.addManagedListener(this.eventService,lt.EVENT_BODY_HEIGHT_CHANGED,this.checkPageSize.bind(this)),this.addManagedListener(this.eventService,lt.EVENT_SCROLL_VISIBILITY_CHANGED,this.checkPageSize.bind(this)),this.addManagedPropertyListener("paginationAutoPageSize",this.onPaginationAutoSizeChanged.bind(this)),this.checkPageSize()})}notActive(){return!this.gos.get("paginationAutoPageSize")||null==this.centerRowsCtrl}onPaginationAutoSizeChanged(){this.notActive()?this.paginationProxy.unsetAutoCalculatedPageSize():this.checkPageSize()}checkPageSize(){if(this.notActive())return;const e=this.centerRowsCtrl.getViewportSizeFeature().getBodyHeight();if(e>0){const t=()=>{const t=this.gos.getRowHeightAsNumber(),i=Math.floor(e/t);this.paginationProxy.setPageSize(i,"autoCalculated")};this.isBodyRendered?Z(()=>t(),50)():(t(),this.isBodyRendered=!0)}else this.isBodyRendered=!1}};g([he("ctrlsService")],Gc.prototype,"ctrlsService",2),g([he("paginationProxy")],Gc.prototype,"paginationProxy",2),g([ae],Gc.prototype,"postConstruct",1),Gc=g([ce("paginationAutoPageSizeService")],Gc);var Vc=class extends nt{constructor(){super(...arguments),this.cacheVersion=0}init(){this.active=this.gos.get("valueCache"),this.neverExpires=this.gos.get("valueCacheNeverExpires")}onDataChanged(){this.neverExpires||this.expire()}expire(){this.cacheVersion++}setValue(e,t,i){this.active&&(e.__cacheVersion!==this.cacheVersion&&(e.__cacheVersion=this.cacheVersion,e.__cacheData={}),e.__cacheData[t]=i)}getValue(e,t){if(this.active&&e.__cacheVersion===this.cacheVersion)return e.__cacheData[t]}};g([ae],Vc.prototype,"init",1),Vc=g([ce("valueCache")],Vc);var Bc=class extends nt{init(){"clientSide"===this.rowModel.getType()&&(this.clientSideRowModel=this.rowModel),this.addManagedListener(this.eventService,lt.EVENT_CELL_VALUE_CHANGED,this.onCellValueChanged.bind(this))}onCellValueChanged(e){"paste"!==e.source&&this.doChangeDetection(e.node,e.column)}doChangeDetection(e,t){if(this.gos.get("suppressChangeDetection"))return;const i=[e];if(this.clientSideRowModel&&!e.isRowPinned()){const n=this.gos.get("aggregateOnlyChangedColumns"),s=new Fl(n,this.clientSideRowModel.getRootNode());s.addParentNode(e.parent,[t]),this.clientSideRowModel.doAggregate(s),s.forEachChangedNodeDepthFirst(e=>{i.push(e)})}this.rowRenderer.refreshCells({rowNodes:i})}};g([he("rowModel")],Bc.prototype,"rowModel",2),g([he("rowRenderer")],Bc.prototype,"rowRenderer",2),g([ae],Bc.prototype,"init",1),Bc=g([ce("changeDetectionService")],Bc);var Hc=class extends nt{adaptFunction(e,t){const i=this.componentMetadataProvider.retrieve(e);return i&&i.functionAdapter?i.functionAdapter(t):null}adaptCellRendererFunction(e){return class{refresh(e){return!1}getGui(){return this.eGui}init(t){const i=e(t),n=typeof i;this.eGui="string"!==n&&"number"!==n&&"boolean"!==n?null!=i?i:xn("<span></span>"):xn("<span>"+i+"</span>")}}}doesImplementIComponent(e){return!!e&&e.prototype&&"getGui"in e.prototype}};g([he("componentMetadataProvider")],Hc.prototype,"componentMetadataProvider",2),Hc=g([ce("agComponentUtils")],Hc);var zc=class extends nt{postConstruct(){this.componentMetaData={dateComponent:{mandatoryMethodList:["getDate","setDate"],optionalMethodList:["afterGuiAttached","setInputPlaceholder","setInputAriaLabel","setDisabled","onParamsUpdated","refresh"]},detailCellRenderer:{mandatoryMethodList:[],optionalMethodList:["refresh"],functionAdapter:this.agComponentUtils.adaptCellRendererFunction.bind(this.agComponentUtils)},headerComponent:{mandatoryMethodList:[],optionalMethodList:["refresh"]},headerGroupComponent:{mandatoryMethodList:[],optionalMethodList:[]},loadingCellRenderer:{mandatoryMethodList:[],optionalMethodList:[],functionAdapter:this.agComponentUtils.adaptCellRendererFunction.bind(this.agComponentUtils)},loadingOverlayComponent:{mandatoryMethodList:[],optionalMethodList:["refresh"]},noRowsOverlayComponent:{mandatoryMethodList:[],optionalMethodList:["refresh"]},floatingFilterComponent:{mandatoryMethodList:["onParentModelChanged"],optionalMethodList:["afterGuiAttached","onParamsUpdated","refresh"]},cellRenderer:{mandatoryMethodList:[],optionalMethodList:["refresh","afterGuiAttached"],functionAdapter:this.agComponentUtils.adaptCellRendererFunction.bind(this.agComponentUtils)},cellEditor:{mandatoryMethodList:["getValue"],optionalMethodList:["isPopup","isCancelBeforeStart","isCancelAfterEnd","getPopupPosition","focusIn","focusOut","afterGuiAttached","refresh"]},innerRenderer:{mandatoryMethodList:[],optionalMethodList:["afterGuiAttached"],functionAdapter:this.agComponentUtils.adaptCellRendererFunction.bind(this.agComponentUtils)},fullWidthCellRenderer:{mandatoryMethodList:[],optionalMethodList:["refresh","afterGuiAttached"],functionAdapter:this.agComponentUtils.adaptCellRendererFunction.bind(this.agComponentUtils)},groupRowRenderer:{mandatoryMethodList:[],optionalMethodList:["afterGuiAttached"],functionAdapter:this.agComponentUtils.adaptCellRendererFunction.bind(this.agComponentUtils)},filter:{mandatoryMethodList:["isFilterActive","doesFilterPass","getModel","setModel"],optionalMethodList:["afterGuiAttached","afterGuiDetached","onNewRowsLoaded","getModelAsString","onFloatingFilterChanged","onAnyFilterChanged","refresh"]},statusPanel:{mandatoryMethodList:[],optionalMethodList:["refresh"]},toolPanel:{mandatoryMethodList:[],optionalMethodList:["refresh","getState"]},tooltipComponent:{mandatoryMethodList:[],optionalMethodList:[]},menuItem:{mandatoryMethodList:[],optionalMethodList:["setActive","select","setExpanded","configureDefaults"]}}}retrieve(e){return this.componentMetaData[e]}};g([he("agComponentUtils")],zc.prototype,"agComponentUtils",2),g([ae],zc.prototype,"postConstruct",1),zc=g([ce("componentMetadataProvider")],zc);var Uc={"ag-theme-custom":{headerHeight:25,headerCellMinWidth:24,listItemHeight:20,rowHeight:25,chartMenuPanelWidth:220},"ag-theme-material":{headerHeight:56,headerCellMinWidth:48,listItemHeight:32,rowHeight:48,chartMenuPanelWidth:240},"ag-theme-balham":{headerHeight:32,headerCellMinWidth:24,listItemHeight:24,rowHeight:28,chartMenuPanelWidth:220},"ag-theme-alpine":{headerHeight:48,headerCellMinWidth:36,listItemHeight:24,rowHeight:42,chartMenuPanelWidth:240},"ag-theme-quartz":{headerHeight:48,headerCellMinWidth:36,listItemHeight:24,rowHeight:42,chartMenuPanelWidth:260}},Wc={headerHeight:["ag-header-row"],headerCellMinWidth:["ag-header-cell"],listItemHeight:["ag-virtual-list-item"],rowHeight:["ag-row"],chartMenuPanelWidth:["ag-chart-docked-container"]},jc=class extends nt{constructor(){super(...arguments),this.calculatedSizes={},this.calculatedTheme=null}postConstruct(){var e;const t=null!=(e=this.getTheme().el)?e:this.eGridDiv;this.addManagedPropertyListener("rowHeight",()=>this.refreshRowHeightVariable()),this.mutationObserver=new MutationObserver(()=>{this.calculatedSizes={},this.calculatedTheme=null,this.calculatedTheme=this.getTheme(),this.fireGridStylesChangedEvent()}),this.mutationObserver.observe(t||this.eGridDiv,{attributes:!0,attributeFilter:["class"]})}fireGridStylesChangedEvent(){const e={type:lt.EVENT_GRID_STYLES_CHANGED};this.eventService.dispatchEvent(e)}getSassVariable(e){const{themeFamily:t,el:i}=this.getTheme();if(!t||0!==t.indexOf("ag-theme"))return;this.calculatedSizes||(this.calculatedSizes={}),this.calculatedSizes[t]||(this.calculatedSizes[t]={});const n=this.calculatedSizes[t][e];return null!=n?n:(this.calculatedSizes[t][e]=this.calculateValueForSassProperty(e,t,i),this.calculatedSizes[t][e])}calculateValueForSassProperty(e,t,i){const n="ag-theme-"+(t.match("material")?"material":t.match("balham")?"balham":t.match("alpine")?"alpine":"custom"),s=Uc[n][e],r=this.gos.getDocument();if(i||(i=this.eGridDiv),!Wc[e])return s;const o=Wc[e],a=r.createElement("div"),l=Array.from(i.classList);a.classList.add(t,...l),a.style.position="absolute";const c=o.reduce((e,t)=>{const i=r.createElement("div");return i.style.position="static",i.classList.add(t),e.appendChild(i),i},a);let h=0;if(r.body){r.body.appendChild(a);const t=-1!==e.toLowerCase().indexOf("height")?"height":"width";h=parseInt(window.getComputedStyle(c)[t],10),r.body.removeChild(a)}return h||s}isThemeDark(){const{theme:e}=this.getTheme();return!!e&&e.indexOf("dark")>=0}chartMenuPanelWidth(){return this.getSassVariable("chartMenuPanelWidth")}getTheme(){if(this.calculatedTheme)return this.calculatedTheme;const e=/\bag-(material|(?:theme-([\w\-]*)))\b/g;let t=this.eGridDiv,i=null,n=[];for(;t;){if(i=e.exec(t.className),i){const i=t.className.match(e);i&&(n=i);break}t=t.parentElement||void 0}if(!i)return{allThemes:n};const s=i[0];return this.calculatedTheme={theme:s,el:t,themeFamily:s.replace(/-dark$/,""),allThemes:n},this.calculatedTheme}getFromTheme(e,t){var i;return null!=(i=this.getSassVariable(t))?i:e}getDefaultRowHeight(){return this.getFromTheme(25,"rowHeight")}getListItemHeight(){return this.getFromTheme(20,"listItemHeight")}refreshRowHeightVariable(){const e=this.eGridDiv.style.getPropertyValue("--ag-line-height").trim(),t=this.gos.get("rowHeight");if(null==t||isNaN(t)||!isFinite(t))return null!==e&&this.eGridDiv.style.setProperty("--ag-line-height",null),-1;const i=`${t}px`;return e!=i?(this.eGridDiv.style.setProperty("--ag-line-height",i),t):""!=e?parseFloat(e):-1}getMinColWidth(){const e=this.getFromTheme(null,"headerCellMinWidth");return y(e)?Math.max(e,10):10}destroy(){this.calculatedSizes=null,this.mutationObserver&&this.mutationObserver.disconnect(),super.destroy()}};g([he("eGridDiv")],jc.prototype,"eGridDiv",2),g([ae],jc.prototype,"postConstruct",1),jc=g([ce("environment")],jc);var Kc=class extends nt{constructor(){super(...arguments),this.scrollY=0,this.uiBodyHeight=0}agWire(e){this.logger=e.create("RowContainerHeightService")}postConstruct(){this.addManagedListener(this.eventService,lt.EVENT_BODY_HEIGHT_CHANGED,this.updateOffset.bind(this)),this.maxDivHeight=Ni(),this.logger.log("maxDivHeight = "+this.maxDivHeight)}isStretching(){return this.stretching}getDivStretchOffset(){return this.divStretchOffset}updateOffset(){if(!this.stretching)return;const e=this.ctrlsService.getGridBodyCtrl().getScrollFeature().getVScrollPosition().top,t=this.getUiBodyHeight();(e!==this.scrollY||t!==this.uiBodyHeight)&&(this.scrollY=e,this.uiBodyHeight=t,this.calculateOffset())}calculateOffset(){this.setUiContainerHeight(this.maxDivHeight),this.pixelsToShave=this.modelHeight-this.uiContainerHeight,this.maxScrollY=this.uiContainerHeight-this.uiBodyHeight;const e=this.scrollY/this.maxScrollY,t=e*this.pixelsToShave;this.logger.log(`Div Stretch Offset = ${t} (${this.pixelsToShave} * ${e})`),this.setDivStretchOffset(t)}setUiContainerHeight(e){e!==this.uiContainerHeight&&(this.uiContainerHeight=e,this.eventService.dispatchEvent({type:lt.EVENT_ROW_CONTAINER_HEIGHT_CHANGED}))}clearOffset(){this.setUiContainerHeight(this.modelHeight),this.pixelsToShave=0,this.setDivStretchOffset(0)}setDivStretchOffset(e){const t="number"==typeof e?Math.floor(e):null;this.divStretchOffset!==t&&(this.divStretchOffset=t,this.eventService.dispatchEvent({type:lt.EVENT_HEIGHT_SCALE_CHANGED}))}setModelHeight(e){this.modelHeight=e,this.stretching=null!=e&&this.maxDivHeight>0&&e>this.maxDivHeight,this.stretching?this.calculateOffset():this.clearOffset()}getUiContainerHeight(){return this.uiContainerHeight}getRealPixelPosition(e){return e-this.divStretchOffset}getUiBodyHeight(){const e=this.ctrlsService.getGridBodyCtrl().getScrollFeature().getVScrollPosition();return e.bottom-e.top}getScrollPositionForPixel(e){if(this.pixelsToShave<=0)return e;const t=e/(this.modelHeight-this.getUiBodyHeight());return this.maxScrollY*t}};g([he("ctrlsService")],Kc.prototype,"ctrlsService",2),g([f(0,pe("loggerFactory"))],Kc.prototype,"agWire",1),g([ae],Kc.prototype,"postConstruct",1),Kc=g([ce("rowContainerHeightService")],Kc);var $c=class extends nt{init(){this.addManagedPropertyListener("isRowSelectable",()=>this.updateSelectable())}updateSelectableAfterGrouping(){this.updateSelectable(!0)}updateSelectable(e=!1){const t=!!this.gos.get("rowSelection"),i=this.gos.get("isRowSelectable");if(!t||!i)return;const n=this.gos.get("groupSelectsChildren"),s="clientSide"===this.rowModel.getType()&&n,r=[],o=t=>{if(e&&!t.group)return;if(s&&t.group){const e=t.childrenAfterGroup.some(e=>!0===e.selectable);return void t.setRowSelectable(e,!0)}const n=!i||i(t);t.setRowSelectable(n,!0),!n&&t.isSelected()&&r.push(t)};if(s){const e=this.rowModel;new Fl(!1,e.getRootNode()).forEachChangedNodeDepthFirst(o,!0,!0)}else this.rowModel.forEachNode(o);r.length&&this.selectionService.setNodesSelected({nodes:r,newValue:!1,source:"selectableChanged"}),s&&this.selectionService instanceof Ac&&this.selectionService.updateGroupsFromChildrenSelections("selectableChanged")}};g([he("rowModel")],$c.prototype,"rowModel",2),g([he("selectionService")],$c.prototype,"selectionService",2),g([ae],$c.prototype,"init",1),$c=g([ce("selectableService")],$c);var Yc=class extends Cs{constructor(){super(),this.previousAndFirstButtonsDisabled=!1,this.nextButtonDisabled=!1,this.lastButtonDisabled=!1,this.areListenersSetup=!1}postConstruct(){const e=this.gos.get("enableRtl");this.setTemplate(this.getTemplate());const{btFirst:t,btPrevious:i,btNext:n,btLast:s,pageSizeComp:r}=this;this.activateTabIndex([t,i,n,s]),t.insertAdjacentElement("afterbegin",Yn(e?"last":"first",this.gos)),i.insertAdjacentElement("afterbegin",Yn(e?"next":"previous",this.gos)),n.insertAdjacentElement("afterbegin",Yn(e?"previous":"next",this.gos)),s.insertAdjacentElement("afterbegin",Yn(e?"first":"last",this.gos)),this.addManagedPropertyListener("pagination",this.onPaginationChanged.bind(this)),this.addManagedPropertyListener("suppressPaginationPanel",this.onPaginationChanged.bind(this)),this.addManagedPropertyListeners(["paginationPageSizeSelector","paginationAutoPageSize","suppressPaginationPanel"],()=>this.onPageSizeRelatedOptionsChange()),this.pageSizeComp.toggleSelectDisplay(this.pageSizeComp.shouldShowPageSizeSelector()),this.onPaginationChanged()}onPaginationChanged(){const e=this.gos.get("pagination")&&!this.gos.get("suppressPaginationPanel");this.setDisplayed(e),e&&(this.setupListeners(),this.enableOrDisableButtons(),this.updateRowLabels(),this.setCurrentPageLabel(),this.setTotalLabels(),this.onPageSizeRelatedOptionsChange())}onPageSizeRelatedOptionsChange(){this.pageSizeComp.toggleSelectDisplay(this.pageSizeComp.shouldShowPageSizeSelector())}setupListeners(){this.areListenersSetup||(this.addManagedListener(this.eventService,lt.EVENT_PAGINATION_CHANGED,this.onPaginationChanged.bind(this)),[{el:this.btFirst,fn:this.onBtFirst.bind(this)},{el:this.btPrevious,fn:this.onBtPrevious.bind(this)},{el:this.btNext,fn:this.onBtNext.bind(this)},{el:this.btLast,fn:this.onBtLast.bind(this)}].forEach(e=>{const{el:t,fn:i}=e;this.addManagedListener(t,"click",i),this.addManagedListener(t,"keydown",e=>{e.key!==Xn.ENTER&&e.key!==Xn.SPACE||(e.preventDefault(),i())})}),this.areListenersSetup=!0)}onBtFirst(){this.previousAndFirstButtonsDisabled||this.paginationProxy.goToFirstPage()}setCurrentPageLabel(){const e=this.paginationProxy.getTotalPages()>0,t=this.paginationProxy.getCurrentPage(),i=e?t+1:0;this.lbCurrent.textContent=this.formatNumber(i)}formatNumber(e){const t=this.gos.getCallback("paginationNumberFormatter");if(t)return t({value:e});const i=this.localeService.getLocaleTextFunc();return $i(e,i("thousandSeparator",","),i("decimalSeparator","."))}getTemplate(){const e=this.localeService.getLocaleTextFunc(),t=e("page","Page"),i=e("to","to"),n=e("of","of"),s=e("firstPage","First Page"),r=e("previousPage","Previous Page"),o=e("nextPage","Next Page"),a=e("lastPage","Last Page"),l=this.getCompId();return`<div class="ag-paging-panel ag-unselectable" id="ag-${l}">\n                <ag-page-size-selector ref="pageSizeComp"></ag-page-size-selector>\n                <span class="ag-paging-row-summary-panel" role="status">\n                    <span id="ag-${l}-first-row" ref="lbFirstRowOnPage" class="ag-paging-row-summary-panel-number"></span>\n                    <span id="ag-${l}-to">${i}</span>\n                    <span id="ag-${l}-last-row" ref="lbLastRowOnPage" class="ag-paging-row-summary-panel-number"></span>\n                    <span id="ag-${l}-of">${n}</span>\n                    <span id="ag-${l}-row-count" ref="lbRecordCount" class="ag-paging-row-summary-panel-number"></span>\n                </span>\n                <span class="ag-paging-page-summary-panel" role="presentation">\n                    <div ref="btFirst" class="ag-button ag-paging-button" role="button" aria-label="${s}"></div>\n                    <div ref="btPrevious" class="ag-button ag-paging-button" role="button" aria-label="${r}"></div>\n                    <span class="ag-paging-description" role="status">\n                        <span id="ag-${l}-start-page">${t}</span>\n                        <span id="ag-${l}-start-page-number" ref="lbCurrent" class="ag-paging-number"></span>\n                        <span id="ag-${l}-of-page">${n}</span>\n                        <span id="ag-${l}-of-page-number" ref="lbTotal" class="ag-paging-number"></span>\n                    </span>\n                    <div ref="btNext" class="ag-button ag-paging-button" role="button" aria-label="${o}"></div>\n                    <div ref="btLast" class="ag-button ag-paging-button" role="button" aria-label="${a}"></div>\n                </span>\n            </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=0===e,this.toggleButtonDisabled(this.btFirst,this.previousAndFirstButtonsDisabled),this.toggleButtonDisabled(this.btPrevious,this.previousAndFirstButtonsDisabled);const n=this.isZeroPagesToDisplay(),s=e===i-1;this.nextButtonDisabled=s||n,this.lastButtonDisabled=!t||n||e===i-1,this.toggleButtonDisabled(this.btNext,this.nextButtonDisabled),this.toggleButtonDisabled(this.btLast,this.lastButtonDisabled)}toggleButtonDisabled(e,t){Qt(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 s,r;if(this.isZeroPagesToDisplay()?s=r=0:(s=t*e+1,r=s+t-1,i&&r>n&&(r=n)),this.lbFirstRowOnPage.textContent=this.formatNumber(s),this.rowNodeBlockLoader.isLoading()){const e=this.localeService.getLocaleTextFunc();this.lbLastRowOnPage.innerHTML=e("pageLastRowUnknown","?")}else this.lbLastRowOnPage.textContent=this.formatNumber(r)}isZeroPagesToDisplay(){const e=this.paginationProxy.isLastPageFound(),t=this.paginationProxy.getTotalPages();return e&&0===t}setTotalLabels(){const e=this.paginationProxy.isLastPageFound(),t=this.paginationProxy.getTotalPages(),i=e?this.paginationProxy.getMasterRowCount():null;if(1===i){const e=this.paginationProxy.getRow(0);if(e&&e.group&&!e.groupData&&!e.aggData)return void this.setTotalLabelsToZero()}if(e)this.lbTotal.textContent=this.formatNumber(t),this.lbRecordCount.textContent=this.formatNumber(i);else{const e=this.localeService.getLocaleTextFunc()("more","more");this.lbTotal.innerHTML=e,this.lbRecordCount.innerHTML=e}}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)}};g([he("paginationProxy")],Yc.prototype,"paginationProxy",2),g([he("rowNodeBlockLoader")],Yc.prototype,"rowNodeBlockLoader",2),g([Ss("btFirst")],Yc.prototype,"btFirst",2),g([Ss("btPrevious")],Yc.prototype,"btPrevious",2),g([Ss("btNext")],Yc.prototype,"btNext",2),g([Ss("btLast")],Yc.prototype,"btLast",2),g([Ss("lbRecordCount")],Yc.prototype,"lbRecordCount",2),g([Ss("lbFirstRowOnPage")],Yc.prototype,"lbFirstRowOnPage",2),g([Ss("lbLastRowOnPage")],Yc.prototype,"lbLastRowOnPage",2),g([Ss("lbCurrent")],Yc.prototype,"lbCurrent",2),g([Ss("lbTotal")],Yc.prototype,"lbTotal",2),g([Ss("pageSizeComp")],Yc.prototype,"pageSizeComp",2),g([ae],Yc.prototype,"postConstruct",1);var qc=class e extends Cs{constructor(){super(e.TEMPLATE),this.inProgress=!1,this.destroyRequested=!1}updateLayoutClasses(e,t){const i=this.eOverlayWrapper.classList;i.toggle("ag-layout-auto-height",t.autoHeight),i.toggle("ag-layout-normal",t.normal),i.toggle("ag-layout-print",t.print)}postConstruct(){this.createManagedBean(new Xo(this)),this.setDisplayed(!1,{skipAriaHidden:!0}),this.overlayService.registerOverlayWrapperComp(this)}setWrapperTypeClass(e){const t=this.eOverlayWrapper.classList;this.activeOverlayWrapperCssClass&&t.toggle(this.activeOverlayWrapperCssClass,!1),this.activeOverlayWrapperCssClass=e,t.toggle(e,!0)}showOverlay(e,t,i){this.inProgress||(this.setWrapperTypeClass(t),this.destroyActiveOverlay(),this.inProgress=!0,e&&e.then(e=>{this.inProgress=!1,this.eOverlayWrapper.appendChild(e.getGui()),this.activeOverlay=e,this.updateListenerDestroyFunc=i,this.destroyRequested&&(this.destroyRequested=!1,this.destroyActiveOverlay())}),this.setDisplayed(!0,{skipAriaHidden:!0}))}destroyActiveOverlay(){var e;this.inProgress?this.destroyRequested=!0:this.activeOverlay&&(this.activeOverlay=this.getContext().destroyBean(this.activeOverlay),null==(e=this.updateListenerDestroyFunc)||e.call(this),Cn(this.eOverlayWrapper))}hideOverlay(){this.destroyActiveOverlay(),this.setDisplayed(!1,{skipAriaHidden:!0})}destroy(){this.destroyActiveOverlay(),super.destroy()}};qc.TEMPLATE='\n        <div class="ag-overlay" role="presentation">\n            <div class="ag-overlay-panel" role="presentation">\n                <div class="ag-overlay-wrapper" ref="eOverlayWrapper" role="presentation"></div>\n            </div>\n        </div>',g([he("overlayService")],qc.prototype,"overlayService",2),g([Ss("eOverlayWrapper")],qc.prototype,"eOverlayWrapper",2),g([ae],qc.prototype,"postConstruct",1);var Xc=qc,Zc=class extends nt{getFirstRow(){let e,t=0;return this.pinnedRowModel.getPinnedTopRowCount()?e="top":this.rowModel.getRowCount()?(e=null,t=this.paginationProxy.getPageFirstRow()):this.pinnedRowModel.getPinnedBottomRowCount()&&(e="bottom"),void 0===e?null:{rowIndex:t,rowPinned:e}}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),void 0===e?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||!(e&&!t||!e&&t)&&e.rowIndex===t.rowIndex&&e.rowPinned==t.rowPinned}before(e,t){switch(e.rowPinned){case"top":if("top"!==t.rowPinned)return!0;break;case"bottom":if("bottom"!==t.rowPinned)return!1;break;default:if(y(t.rowPinned))return"top"!==t.rowPinned}return e.rowIndex<t.rowIndex}};g([he("rowModel")],Zc.prototype,"rowModel",2),g([he("pinnedRowModel")],Zc.prototype,"pinnedRowModel",2),g([he("paginationProxy")],Zc.prototype,"paginationProxy",2),Zc=g([ce("rowPositionUtils")],Zc);var Qc=class extends nt{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}.${null==i?"null":i}.${n.getId()}`}equals(e,t){const i=e.column===t.column,n=e.rowPinned===t.rowPinned,s=e.rowIndex===t.rowIndex;return i&&n&&s}};Qc=g([ce("cellPositionUtils")],Qc);var Jc=class{constructor(e){this.cellValueChanges=e}},eh=class extends Jc{constructor(e,t,i,n){super(e),this.initialRange=t,this.finalRange=i,this.ranges=n}},th=class e{constructor(t){this.actionStack=[],this.maxStackSize=t||e.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}};th.DEFAULT_STACK_SIZE=10;var ih=th,nh=class extends nt{constructor(){super(...arguments),this.cellValueChanges=[],this.activeCellEdit=null,this.activeRowEdit=null,this.isPasting=!1,this.isRangeInAction=!1,this.onCellValueChanged=e=>{const t={column:e.column,rowIndex:e.rowIndex,rowPinned:e.rowPinned},i=null!==this.activeCellEdit&&this.cellPositionUtils.equals(this.activeCellEdit,t),n=null!==this.activeRowEdit&&this.rowPositionUtils.sameRow(this.activeRowEdit,t);if(!(i||n||this.isPasting||this.isRangeInAction))return;const{rowPinned:s,rowIndex:r,column:o,oldValue:a,value:l}=e,c={rowPinned:s,rowIndex:r,columnId:o.getColId(),newValue:l,oldValue:a};this.cellValueChanges.push(c)},this.clearStacks=()=>{this.undoStack.clear(),this.redoStack.clear()}}init(){if(!this.gos.get("undoRedoCellEditing"))return;const e=this.gos.get("undoRedoCellEditingLimit");e<=0||(this.undoStack=new ih(e),this.redoStack=new ih(e),this.addRowEditingListeners(),this.addCellEditingListeners(),this.addPasteListeners(),this.addFillListeners(),this.addCellKeyListeners(),this.addManagedListener(this.eventService,lt.EVENT_CELL_VALUE_CHANGED,this.onCellValueChanged),this.addManagedListener(this.eventService,lt.EVENT_MODEL_UPDATED,e=>{e.keepUndoRedoStack||this.clearStacks()}),this.addManagedListener(this.eventService,lt.EVENT_COLUMN_PIVOT_MODE_CHANGED,this.clearStacks),this.addManagedListener(this.eventService,lt.EVENT_NEW_COLUMNS_LOADED,this.clearStacks),this.addManagedListener(this.eventService,lt.EVENT_COLUMN_GROUP_OPENED,this.clearStacks),this.addManagedListener(this.eventService,lt.EVENT_COLUMN_ROW_GROUP_CHANGED,this.clearStacks),this.addManagedListener(this.eventService,lt.EVENT_COLUMN_MOVED,this.clearStacks),this.addManagedListener(this.eventService,lt.EVENT_COLUMN_PINNED,this.clearStacks),this.addManagedListener(this.eventService,lt.EVENT_COLUMN_VISIBLE,this.clearStacks),this.addManagedListener(this.eventService,lt.EVENT_ROW_DRAG_END,this.clearStacks),this.ctrlsService.whenReady(e=>{this.gridBodyCtrl=e.gridBodyCtrl}))}getCurrentUndoStackSize(){return this.undoStack?this.undoStack.getCurrentStackSize():0}getCurrentRedoStackSize(){return this.redoStack?this.redoStack.getCurrentStackSize():0}undo(e){const t={type:lt.EVENT_UNDO_STARTED,source:e};this.eventService.dispatchEvent(t);const i=this.undoRedo(this.undoStack,this.redoStack,"initialRange","oldValue","undo"),n={type:lt.EVENT_UNDO_ENDED,source:e,operationPerformed:i};this.eventService.dispatchEvent(n)}redo(e){const t={type:lt.EVENT_REDO_STARTED,source:e};this.eventService.dispatchEvent(t);const i=this.undoRedo(this.redoStack,this.undoStack,"finalRange","newValue","redo"),n={type:lt.EVENT_REDO_ENDED,source:e,operationPerformed:i};this.eventService.dispatchEvent(n)}undoRedo(e,t,i,n,s){if(!e)return!1;const r=e.pop();return!(!r||!r.cellValueChanges||(this.processAction(r,e=>e[n],s),r instanceof eh?this.processRange(this.rangeService,r.ranges||[r[i]]):this.processCell(r.cellValueChanges),t.push(r),0))}processAction(e,t,i){e.cellValueChanges.forEach(e=>{const{rowIndex:n,rowPinned:s,columnId:r}=e,o={rowIndex:n,rowPinned:s},a=this.rowPositionUtils.getRowNode(o);a.displayed&&a.setDataValue(r,t(e),i)})}processRange(e,t){let i;e.removeAllCellRanges(!0),t.forEach((n,s)=>{if(!n)return;const r=n.startRow,o=n.endRow;s===t.length-1&&(i={rowPinned:r.rowPinned,rowIndex:r.rowIndex,columnId:n.startColumn.getColId()},this.setLastFocusedCell(i));const a={rowStartIndex:r.rowIndex,rowStartPinned:r.rowPinned,rowEndIndex:o.rowIndex,rowEndPinned:o.rowPinned,columnStart:n.startColumn,columns:n.columns};e.addCellRange(a)})}processCell(e){const t=e[0],{rowIndex:i,rowPinned:n}=t,s={rowIndex:i,rowPinned:n},r=this.rowPositionUtils.getRowNode(s),o={rowPinned:t.rowPinned,rowIndex:r.rowIndex,columnId:t.columnId};this.setLastFocusedCell(o,this.rangeService)}setLastFocusedCell(e,t){const{rowIndex:i,columnId:n,rowPinned:s}=e,r=this.gridBodyCtrl.getScrollFeature(),o=this.columnModel.getGridColumn(n);if(!o)return;r.ensureIndexVisible(i),r.ensureColumnVisible(o);const a={rowIndex:i,column:o,rowPinned:s};this.focusService.setFocusedCell(u(d({},a),{forceBrowserFocus:!0})),null==t||t.setRangeToCell(a)}addRowEditingListeners(){this.addManagedListener(this.eventService,lt.EVENT_ROW_EDITING_STARTED,e=>{this.activeRowEdit={rowIndex:e.rowIndex,rowPinned:e.rowPinned}}),this.addManagedListener(this.eventService,lt.EVENT_ROW_EDITING_STOPPED,()=>{const e=new Jc(this.cellValueChanges);this.pushActionsToUndoStack(e),this.activeRowEdit=null})}addCellEditingListeners(){this.addManagedListener(this.eventService,lt.EVENT_CELL_EDITING_STARTED,e=>{this.activeCellEdit={column:e.column,rowIndex:e.rowIndex,rowPinned:e.rowPinned}}),this.addManagedListener(this.eventService,lt.EVENT_CELL_EDITING_STOPPED,e=>{if(this.activeCellEdit=null,e.valueChanged&&!this.activeRowEdit&&!this.isPasting&&!this.isRangeInAction){const e=new Jc(this.cellValueChanges);this.pushActionsToUndoStack(e)}})}addPasteListeners(){this.addManagedListener(this.eventService,lt.EVENT_PASTE_START,()=>{this.isPasting=!0}),this.addManagedListener(this.eventService,lt.EVENT_PASTE_END,()=>{const e=new Jc(this.cellValueChanges);this.pushActionsToUndoStack(e),this.isPasting=!1})}addFillListeners(){this.addManagedListener(this.eventService,lt.EVENT_FILL_START,()=>{this.isRangeInAction=!0}),this.addManagedListener(this.eventService,lt.EVENT_FILL_END,e=>{const t=new eh(this.cellValueChanges,e.initialRange,e.finalRange);this.pushActionsToUndoStack(t),this.isRangeInAction=!1})}addCellKeyListeners(){this.addManagedListener(this.eventService,lt.EVENT_KEY_SHORTCUT_CHANGED_CELL_START,()=>{this.isRangeInAction=!0}),this.addManagedListener(this.eventService,lt.EVENT_KEY_SHORTCUT_CHANGED_CELL_END,()=>{let e;e=this.rangeService&&this.gos.get("enableRangeSelection")?new eh(this.cellValueChanges,void 0,void 0,[...this.rangeService.getCellRanges()]):new Jc(this.cellValueChanges),this.pushActionsToUndoStack(e),this.isRangeInAction=!1})}pushActionsToUndoStack(e){this.undoStack.push(e),this.cellValueChanges=[],this.redoStack.clear()}};g([he("focusService")],nh.prototype,"focusService",2),g([he("ctrlsService")],nh.prototype,"ctrlsService",2),g([he("cellPositionUtils")],nh.prototype,"cellPositionUtils",2),g([he("rowPositionUtils")],nh.prototype,"rowPositionUtils",2),g([he("columnModel")],nh.prototype,"columnModel",2),g([de("rangeService")],nh.prototype,"rangeService",2),g([ae],nh.prototype,"init",1),nh=g([ce("undoRedoService")],nh);var sh=class extends nt{findHeader(e,t){let i,n;if(e.column instanceof at?i=this.columnModel.getDisplayedGroupAtDirection(e.column,t):(n=`getDisplayedCol${t}`,i=this.columnModel[n](e.column)),!i)return;let{headerRowIndex:s}=e;if("filter"!==this.getHeaderRowType(s)){const e=[i];for(;i.getParent();)i=i.getParent(),e.push(i);i=e[e.length-1-s]}const{column:r,headerRowIndex:o}=this.getHeaderIndexToFocus(i,s);return{column:r,headerRowIndex:o}}getHeaderIndexToFocus(e,t){let i;if(e instanceof at&&this.isAnyChildSpanningHeaderHeight(e)&&e.isPadding()){const n=e;i=n.getLeafColumns()[0];let s=i;for(;s!==n;)t++,s=s.getParent()}return{column:i||e,headerRowIndex:t}}isAnyChildSpanningHeaderHeight(e){return!!e&&e.getLeafColumns().some(e=>e.isSpanHeaderHeight())}getColumnVisibleParent(e,t){const i=this.getHeaderRowType(t),n="column"===i;let s="filter"===i?e:e.getParent(),r=t-1,o=r;if(n&&this.isAnyChildSpanningHeaderHeight(e.getParent())){for(;s&&s.isPadding();)s=s.getParent(),r--;o=r,r<0&&(s=e,r=t,o=void 0)}return{column:s,headerRowIndex:r,headerRowIndexWithoutSpan:o}}getColumnVisibleChild(e,t,i="After"){let n=e,s=t+1,r=s;if("group"===this.getHeaderRowType(t)){const t=e.getDisplayedLeafColumns(),r="After"===i?t[0]:De(t),o=[];let a=r;for(;a.getParent()!==e;)a=a.getParent(),o.push(a);if(n=r,r.isSpanHeaderHeight())for(let e=o.length-1;e>=0;e--){const t=o[e];if(!t.isPadding()){n=t;break}s++}else n=De(o),n||(n=r)}return{column:n,headerRowIndex:s,headerRowIndexWithoutSpan:r}}getHeaderRowType(e){const t=this.ctrlsService.getHeaderRowContainerCtrl();if(t)return t.getRowType(e)}findColAtEdgeForHeaderRow(e,t){const i=this.columnModel.getAllDisplayedColumns(),n=i["start"===t?0:i.length-1];if(!n)return;const s=this.ctrlsService.getHeaderRowContainerCtrl(n.getPinned()).getRowType(e);return"group"==s?{headerRowIndex:e,column:this.columnModel.getColumnGroupAtLevel(n,e)}:{headerRowIndex:null==s?-1:e,column:n}}};g([he("columnModel")],sh.prototype,"columnModel",2),g([he("ctrlsService")],sh.prototype,"ctrlsService",2),sh=g([ce("headerPositionUtils")],sh);var rh=class{buildColumnDefs(e,t,i){const n=[],s={};return e.forEach(e=>{let r=!0,o=this.createDefFromColumn(e,t,i),a=e.getOriginalParent(),l=null;for(;a;){let e=null;if(a.isPadding()){a=a.getOriginalParent();continue}const t=s[a.getGroupId()];if(t){t.children.push(o),r=!1;break}if(e=this.createDefFromGroup(a),e&&(e.children=[o],s[e.groupId]=e,o=e,a=a.getOriginalParent()),null!=a&&l===a){r=!1;break}l=a}r&&n.push(o)}),n}createDefFromGroup(e){const t=P(e.getColGroupDef(),["children"]);return t&&(t.groupId=e.getGroupId()),t}createDefFromColumn(e,t,i){const n=P(e.getColDef());return n.colId=e.getColId(),n.width=e.getActualWidth(),n.rowGroup=e.isRowGroupActive(),n.rowGroupIndex=e.isRowGroupActive()?t.indexOf(e):null,n.pivot=e.isPivotActive(),n.pivotIndex=e.isPivotActive()?i.indexOf(e):null,n.aggFunc=e.isValueActive()?e.getAggFunc():null,n.hide=!e.isVisible()||void 0,n.pinned=e.isPinned()?e.getPinned():null,n.sort=e.getSort()?e.getSort():null,n.sortIndex=null!=e.getSortIndex()?e.getSortIndex():null,n}};rh=g([ce("columnDefFactory")],rh);var oh=class{getInitialRowClasses(e){const t=[];return y(e.extraCssClass)&&t.push(e.extraCssClass),t.push("ag-row"),t.push(e.rowFocused?"ag-row-focus":"ag-row-no-focus"),e.fadeRowIn&&t.push("ag-opacity-zero"),t.push(e.rowIsEven?"ag-row-even":"ag-row-odd"),e.rowNode.isRowPinned()&&t.push("ag-row-pinned"),e.rowNode.isSelected()&&t.push("ag-row-selected"),e.rowNode.footer&&t.push("ag-row-footer"),t.push("ag-row-level-"+e.rowLevel),e.rowNode.stub&&t.push("ag-row-loading"),e.fullWidthRow&&t.push("ag-full-width-row"),e.expandable&&(t.push("ag-row-group"),t.push(e.rowNode.expanded?"ag-row-group-expanded":"ag-row-group-contracted")),e.rowNode.dragging&&t.push("ag-row-dragging"),ze(t,this.processClassesFromGridOptions(e.rowNode)),ze(t,this.preProcessRowClassRules(e.rowNode)),t.push(e.printLayout?"ag-row-position-relative":"ag-row-position-absolute"),e.firstRowOnPage&&t.push("ag-row-first"),e.lastRowOnPage&&t.push("ag-row-last"),e.fullWidthRow&&("left"===e.pinned&&t.push("ag-cell-last-left-pinned"),"right"===e.pinned&&t.push("ag-cell-first-right-pinned")),t}processClassesFromGridOptions(e){const t=[],i=e=>{"string"==typeof e?t.push(e):Array.isArray(e)&&e.forEach(e=>t.push(e))},n=this.gos.get("rowClass");if(n){if("function"==typeof n)return console.warn("AG Grid: rowClass should not be a function, please use getRowClass instead"),[];i(n)}const s=this.gos.getCallback("getRowClass");return s&&i(s({data:e.data,node:e,rowIndex:e.rowIndex})),t}preProcessRowClassRules(e){const t=[];return this.processRowClassRules(e,e=>{t.push(e)},e=>{}),t}processRowClassRules(e,t,i){const n=this.gos.addGridCommonParams({data:e.data,node:e,rowIndex:e.rowIndex});this.stylingService.processClassRules(void 0,this.gos.get("rowClassRules"),n,t,i)}calculateRowLevel(e){return e.group?e.level:e.parent?e.parent.level+1:0}};g([he("stylingService")],oh.prototype,"stylingService",2),g([he("gridOptionsService")],oh.prototype,"gos",2),oh=g([ce("rowCssClassCalculator")],oh);var ah=class extends nt{init(){this.isAccentedSort=this.gos.get("accentedSort"),this.primaryColumnsSortGroups=this.gos.isColumnsSortingCoupledToGroup(),this.addManagedPropertyListener("accentedSort",e=>this.isAccentedSort=e.currentValue),this.addManagedPropertyListener("autoGroupColumnDef",()=>this.primaryColumnsSortGroups=this.gos.isColumnsSortingCoupledToGroup())}doFullSort(e,t){const i=e.map((e,t)=>({currentPos:t,rowNode:e}));return i.sort(this.compareRowNodes.bind(this,t)),i.map(e=>e.rowNode)}compareRowNodes(e,t,i){const n=t.rowNode,s=i.rowNode;for(let t=0,i=e.length;t<i;t++){const i=e[t],r="desc"===i.sort,o=this.getValue(n,i.column),a=this.getValue(s,i.column);let l;const c=this.getComparator(i,n);if(l=c?c(o,a,n,s,r):ls.defaultComparator(o,a,this.isAccentedSort),!isNaN(l)&&0!==l)return"asc"===i.sort?l:-1*l}return t.currentPos-i.currentPos}getComparator(e,t){const i=e.column,n=i.getColDef().comparator;if(null!=n)return n;if(!i.getColDef().showRowGroup)return;const s=!t.group&&i.getColDef().field;if(!s)return;const r=this.columnModel.getPrimaryColumn(s);return r?r.getColDef().comparator:void 0}getValue(e,t){var i,n;if(!this.primaryColumnsSortGroups)return this.valueService.getValue(t,e,!1,!1);if(e.rowGroupColumn===t){if(this.gos.isGroupUseEntireRow(this.columnModel.isPivotActive())){const n=null==(i=e.allLeafChildren)?void 0:i[0];return n?this.valueService.getValue(t,n,!1,!1):void 0}const s=this.columnModel.getGroupDisplayColumnForGroup(t.getId());if(!s)return;return null==(n=e.groupData)?void 0:n[s.getId()]}return e.group&&t.getColDef().showRowGroup?void 0:this.valueService.getValue(t,e,!1,!1)}};g([he("valueService")],ah.prototype,"valueService",2),g([he("columnModel")],ah.prototype,"columnModel",2),g([ae],ah.prototype,"init",1),ah=g([ce("rowNodeSorter")],ah);var lh=class extends nt{constructor(){super(...arguments),this.params={},this.ready=!1,this.readyCallbacks=[]}checkReady(){const e=this.params;this.ready=null!=e.gridCtrl&&null!=e.gridBodyCtrl&&null!=e.center&&null!=e.left&&null!=e.right&&null!=e.bottomCenter&&null!=e.bottomLeft&&null!=e.bottomRight&&null!=e.topCenter&&null!=e.topLeft&&null!=e.topRight&&null!=e.stickyTopCenter&&null!=e.stickyTopLeft&&null!=e.stickyTopRight&&null!=e.stickyBottomCenter&&null!=e.stickyBottomLeft&&null!=e.stickyBottomRight&&null!=e.centerHeader&&null!=e.leftHeader&&null!=e.rightHeader&&null!=e.fakeHScrollComp&&null!=e.fakeVScrollComp&&null!=e.gridHeaderCtrl,this.ready&&(this.readyCallbacks.forEach(t=>t(e)),this.readyCallbacks.length=0)}whenReady(e){this.ready?e(this.params):this.readyCallbacks.push(e)}register(e,t){this.params[e]=t,this.checkReady()}registerHeaderContainer(e,t){switch(t){case"left":this.params.leftHeader=e;break;case"right":this.params.rightHeader=e;break;default:this.params.centerHeader=e}this.checkReady()}get(e){return this.params[e]}getParams(){return this.params}getGridBodyCtrl(){return this.params.gridBodyCtrl}getHeaderRowContainerCtrls(){return[this.params.leftHeader,this.params.rightHeader,this.params.centerHeader]}getHeaderRowContainerCtrl(e){switch(e){case"left":return this.params.leftHeader;case"right":return this.params.rightHeader;default:return this.params.centerHeader}}};lh.NAME="ctrlsService",lh=g([ce(lh.NAME)],lh);var ch=class extends nt{constructor(){super(...arguments),this.registry={}}register(e){this.registry[e.controllerName]=e.controllerClass}getInstance(e){const t=this.registry[e];if(null!=t)return new t}};ch=g([ce("ctrlsFactory")],ch);var hh=class extends Cs{constructor(e,t){super(e),this.direction=t,this.hideTimeout=null}postConstruct(){this.addManagedListener(this.eventService,lt.EVENT_SCROLL_VISIBILITY_CHANGED,this.onScrollVisibilityChanged.bind(this)),this.onScrollVisibilityChanged(),this.addOrRemoveCssClass("ag-apple-scrollbar",Ri()||Li())}initialiseInvisibleScrollbar(){void 0===this.invisibleScrollbar&&(this.invisibleScrollbar=Vi(),this.invisibleScrollbar&&(this.hideAndShowInvisibleScrollAsNeeded(),this.addActiveListenerToggles()))}addActiveListenerToggles(){const e=this.getGui();["mouseenter","mousedown","touchstart"].forEach(t=>this.addManagedListener(e,t,()=>this.addOrRemoveCssClass("ag-scrollbar-active",!0))),["mouseleave","touchend"].forEach(t=>this.addManagedListener(e,t,()=>this.addOrRemoveCssClass("ag-scrollbar-active",!1)))}onScrollVisibilityChanged(){void 0===this.invisibleScrollbar&&this.initialiseInvisibleScrollbar(),this.animationFrameService.requestAnimationFrame(()=>this.setScrollVisible())}hideAndShowInvisibleScrollAsNeeded(){this.addManagedListener(this.eventService,lt.EVENT_BODY_SCROLL,e=>{e.direction===this.direction&&(null!==this.hideTimeout&&(window.clearTimeout(this.hideTimeout),this.hideTimeout=null),this.addOrRemoveCssClass("ag-scrollbar-scrolling",!0))}),this.addManagedListener(this.eventService,lt.EVENT_BODY_SCROLL_END,()=>{this.hideTimeout=window.setTimeout(()=>{this.addOrRemoveCssClass("ag-scrollbar-scrolling",!1),this.hideTimeout=null},400)})}attemptSettingScrollPosition(e){const t=this.getViewport();J(()=>wn(t),()=>this.setScrollPosition(e),100)}getViewport(){return this.eViewport}getContainer(){return this.eContainer}onScrollCallback(e){this.addManagedListener(this.getViewport(),"scroll",e)}};g([Ss("eViewport")],hh.prototype,"eViewport",2),g([Ss("eContainer")],hh.prototype,"eContainer",2),g([he("scrollVisibleService")],hh.prototype,"scrollVisibleService",2),g([he("ctrlsService")],hh.prototype,"ctrlsService",2),g([he("animationFrameService")],hh.prototype,"animationFrameService",2);var dh=class e extends hh{constructor(){super(e.TEMPLATE,"horizontal")}postConstruct(){super.postConstruct();const e=this.setFakeHScrollSpacerWidths.bind(this);this.addManagedListener(this.eventService,lt.EVENT_DISPLAYED_COLUMNS_CHANGED,e),this.addManagedListener(this.eventService,lt.EVENT_DISPLAYED_COLUMNS_WIDTH_CHANGED,e),this.addManagedListener(this.eventService,lt.EVENT_PINNED_ROW_DATA_CHANGED,this.onPinnedRowDataChanged.bind(this)),this.addManagedPropertyListener("domLayout",e),this.ctrlsService.register("fakeHScrollComp",this),this.createManagedBean(new Ea(e=>this.eContainer.style.width=`${e}px`)),this.addManagedPropertyListeners(["suppressHorizontalScroll"],this.onScrollVisibilityChanged.bind(this))}initialiseInvisibleScrollbar(){void 0===this.invisibleScrollbar&&(this.enableRtl=this.gos.get("enableRtl"),super.initialiseInvisibleScrollbar(),this.invisibleScrollbar&&this.refreshCompBottom())}onPinnedRowDataChanged(){this.refreshCompBottom()}refreshCompBottom(){if(!this.invisibleScrollbar)return;const e=this.pinnedRowModel.getPinnedBottomTotalHeight();this.getGui().style.bottom=`${e}px`}onScrollVisibilityChanged(){super.onScrollVisibilityChanged(),this.setFakeHScrollSpacerWidths()}setFakeHScrollSpacerWidths(){const e=this.scrollVisibleService.isVerticalScrollShowing();let t=this.columnModel.getDisplayedColumnsRightWidth();const i=!this.enableRtl&&e,n=this.gos.getScrollbarWidth();i&&(t+=n),Ln(this.eRightSpacer,t),this.eRightSpacer.classList.toggle("ag-scroller-corner",t<=n);let s=this.columnModel.getDisplayedColumnsLeftWidth();this.enableRtl&&e&&(s+=n),Ln(this.eLeftSpacer,s),this.eLeftSpacer.classList.toggle("ag-scroller-corner",s<=n)}setScrollVisible(){const e=this.scrollVisibleService.isHorizontalScrollShowing(),t=this.invisibleScrollbar,i=this.gos.get("suppressHorizontalScroll"),n=e&&this.gos.getScrollbarWidth()||0,s=i?0:0===n&&t?16:n;this.addOrRemoveCssClass("ag-scrollbar-invisible",t),Pn(this.getGui(),s),Pn(this.eViewport,s),Pn(this.eContainer,s),this.setDisplayed(e,{skipAriaHidden:!0})}getScrollPosition(){return vn(this.getViewport(),this.enableRtl)}setScrollPosition(e){wn(this.getViewport())||this.attemptSettingScrollPosition(e),yn(this.getViewport(),e,this.enableRtl)}};dh.TEMPLATE='<div class="ag-body-horizontal-scroll" aria-hidden="true">\n            <div class="ag-horizontal-left-spacer" ref="eLeftSpacer"></div>\n            <div class="ag-body-horizontal-scroll-viewport" ref="eViewport">\n                <div class="ag-body-horizontal-scroll-container" ref="eContainer"></div>\n            </div>\n            <div class="ag-horizontal-right-spacer" ref="eRightSpacer"></div>\n        </div>',g([Ss("eLeftSpacer")],dh.prototype,"eLeftSpacer",2),g([Ss("eRightSpacer")],dh.prototype,"eRightSpacer",2),g([he("columnModel")],dh.prototype,"columnModel",2),g([he("pinnedRowModel")],dh.prototype,"pinnedRowModel",2),g([ae],dh.prototype,"postConstruct",1);var uh=dh,ph=class extends nt{postConstruct(){const e=this.checkContainerWidths.bind(this);this.addManagedListener(this.eventService,lt.EVENT_DISPLAYED_COLUMNS_CHANGED,e),this.addManagedListener(this.eventService,lt.EVENT_DISPLAYED_COLUMNS_WIDTH_CHANGED,e),this.addManagedPropertyListener("domLayout",e)}checkContainerWidths(){const e=this.gos.isDomLayout("print"),t=e?0:this.columnModel.getDisplayedColumnsLeftWidth(),i=e?0:this.columnModel.getDisplayedColumnsRightWidth();t!=this.leftWidth&&(this.leftWidth=t,this.eventService.dispatchEvent({type:lt.EVENT_LEFT_PINNED_WIDTH_CHANGED})),i!=this.rightWidth&&(this.rightWidth=i,this.eventService.dispatchEvent({type:lt.EVENT_RIGHT_PINNED_WIDTH_CHANGED}))}getPinnedRightWidth(){return this.rightWidth}getPinnedLeftWidth(){return this.leftWidth}};g([he("columnModel")],ph.prototype,"columnModel",2),g([ae],ph.prototype,"postConstruct",1),ph=g([ce("pinnedWidthService")],ph);var gh=class extends nt{constructor(){super(...arguments),this.events=[]}postConstruct(){"clientSide"==this.rowModel.getType()&&(this.clientSideRowModel=this.rowModel)}dispatchExpanded(e,t){if(null==this.clientSideRowModel)return void this.eventService.dispatchEvent(e);this.events.push(e);const i=()=>{this.clientSideRowModel&&this.clientSideRowModel.onRowGroupOpened(),this.events.forEach(e=>this.eventService.dispatchEvent(e)),this.events=[]};t?i():(null==this.dispatchExpandedDebounced&&(this.dispatchExpandedDebounced=this.animationFrameService.debounce(i)),this.dispatchExpandedDebounced())}};g([he("animationFrameService")],gh.prototype,"animationFrameService",2),g([he("rowModel")],gh.prototype,"rowModel",2),g([ae],gh.prototype,"postConstruct",1),gh=g([ce("rowNodeEventThrottle")],gh);var fh=(e,t)=>{var i;return"clientSide"===(null!=(i=t.rowModelType)?i:"clientSide")?{module:"@ag-grid-enterprise/row-grouping"}:null},mh={enableRowGroup:fh,rowGroup:fh,rowGroupIndex:fh,enablePivot:fh,enableValue:fh,pivot:fh,pivotIndex:fh,aggFunc:fh,cellEditor:e=>"agRichSelect"===e.cellEditor||"agRichSelectCellEditor"===e.cellEditor?{module:"@ag-grid-enterprise/rich-select"}:null,menuTabs:e=>{var t;const i=["columnsMenuTab","generalMenuTab"];return(null==(t=e.menuTabs)?void 0:t.some(e=>i.includes(e)))?{module:"@ag-grid-enterprise/menu"}:null},columnsMenuParams:{module:["@ag-grid-enterprise/menu","@ag-grid-enterprise/column-tool-panel"]},columnChooserParams:{module:["@ag-grid-enterprise/menu","@ag-grid-enterprise/column-tool-panel"]},headerCheckboxSelection:{supportedRowModels:["clientSide","serverSide"],dependencies:(e,{rowSelection:t})=>"multiple"===t?null:"headerCheckboxSelection is only supported with rowSelection=multiple"},headerCheckboxSelectionFilteredOnly:{supportedRowModels:["clientSide"],dependencies:(e,{rowSelection:t})=>"multiple"===t?null:"headerCheckboxSelectionFilteredOnly is only supported with rowSelection=multiple"},headerCheckboxSelectionCurrentPageOnly:{supportedRowModels:["clientSide"],dependencies:(e,{rowSelection:t})=>"multiple"===t?null:"headerCheckboxSelectionCurrentPageOnly is only supported with rowSelection=multiple"},children:()=>vh},vh={objectName:"colDef",allProperties:Object.keys({headerName:void 0,columnGroupShow:void 0,headerClass:void 0,toolPanelClass:void 0,headerValueGetter:void 0,pivotKeys:void 0,groupId:void 0,colId:void 0,sort:void 0,initialSort:void 0,field:void 0,type:void 0,cellDataType:void 0,tooltipComponent:void 0,tooltipField:void 0,headerTooltip:void 0,cellClass:void 0,showRowGroup:void 0,filter:void 0,initialAggFunc:void 0,defaultAggFunc:void 0,aggFunc:void 0,pinned:void 0,initialPinned:void 0,chartDataType:void 0,cellAriaRole:void 0,cellEditorPopupPosition:void 0,headerGroupComponent:void 0,headerGroupComponentParams:void 0,cellStyle:void 0,cellRenderer:void 0,cellRendererParams:void 0,cellEditor:void 0,cellEditorParams:void 0,filterParams:void 0,pivotValueColumn:void 0,headerComponent:void 0,headerComponentParams:void 0,floatingFilterComponent:void 0,floatingFilterComponentParams:void 0,tooltipComponentParams:void 0,refData:void 0,columnsMenuParams:void 0,columnChooserParams:void 0,children:void 0,sortingOrder:void 0,allowedAggFuncs:void 0,menuTabs:void 0,pivotTotalColumnIds:void 0,cellClassRules:void 0,icons:void 0,sortIndex:void 0,initialSortIndex:void 0,flex:void 0,initialFlex:void 0,width:void 0,initialWidth:void 0,minWidth:void 0,maxWidth:void 0,rowGroupIndex:void 0,initialRowGroupIndex:void 0,pivotIndex:void 0,initialPivotIndex:void 0,suppressCellFlash:void 0,suppressColumnsToolPanel:void 0,suppressFiltersToolPanel:void 0,openByDefault:void 0,marryChildren:void 0,suppressStickyLabel:void 0,hide:void 0,initialHide:void 0,rowGroup:void 0,initialRowGroup:void 0,pivot:void 0,initialPivot:void 0,checkboxSelection:void 0,showDisabledCheckboxes:void 0,headerCheckboxSelection:void 0,headerCheckboxSelectionFilteredOnly:void 0,headerCheckboxSelectionCurrentPageOnly:void 0,suppressMenu:void 0,suppressHeaderMenuButton:void 0,suppressMovable:void 0,lockPosition:void 0,lockVisible:void 0,lockPinned:void 0,unSortIcon:void 0,suppressSizeToFit:void 0,suppressAutoSize:void 0,enableRowGroup:void 0,enablePivot:void 0,enableValue:void 0,editable:void 0,suppressPaste:void 0,suppressNavigable:void 0,enableCellChangeFlash:void 0,rowDrag:void 0,dndSource:void 0,autoHeight:void 0,wrapText:void 0,sortable:void 0,resizable:void 0,singleClickEdit:void 0,floatingFilter:void 0,cellEditorPopup:void 0,suppressFillHandle:void 0,wrapHeaderText:void 0,autoHeaderHeight:void 0,dndSourceOnRowDrag:void 0,valueGetter:void 0,valueSetter:void 0,filterValueGetter:void 0,keyCreator:void 0,valueFormatter:void 0,valueParser:void 0,comparator:void 0,equals:void 0,pivotComparator:void 0,suppressKeyboardEvent:void 0,suppressHeaderKeyboardEvent:void 0,colSpan:void 0,rowSpan:void 0,getQuickFilterText:void 0,onCellValueChanged:void 0,onCellClicked:void 0,onCellDoubleClicked:void 0,onCellContextMenu:void 0,rowDragText:void 0,tooltipValueGetter:void 0,cellRendererSelector:void 0,cellEditorSelector:void 0,suppressSpanHeaderHeight:void 0,useValueFormatterForExport:void 0,useValueParserForImport:void 0,mainMenuItems:void 0,contextMenuItems:void 0,suppressFloatingFilterButton:void 0,suppressHeaderFilterButton:void 0,suppressHeaderContextMenu:void 0,loadingCellRenderer:void 0,loadingCellRendererParams:void 0,loadingCellRendererSelector:void 0}),docsUrl:"column-properties/",deprecations:{columnsMenuParams:{version:"31.1",message:"Use `columnChooserParams` instead."},suppressMenu:{version:"31.1",message:"Use `suppressHeaderMenuButton` instead."},suppressCellFlash:{version:"31.2",message:"Use `enableCellChangeFlash={false}` in the ColDef"},dndSource:{version:"31.2",message:"This feature has been replaced by `Row Dragging to an External DropZone`."},dndSourceOnRowDrag:{version:"31.2",message:"This feature has been replaced by `Row Dragging to an External DropZone`."}},validations:mh},yh={suppressContextMenu:!1,preventDefaultOnContextMenu:!1,allowContextMenuWithControlKey:!1,suppressMenuHide:!1,enableBrowserTooltips:!1,tooltipTrigger:"hover",tooltipShowDelay:2e3,tooltipHideDelay:1e4,tooltipMouseTrack:!1,tooltipShowMode:"standard",tooltipInteraction:!1,copyHeadersToClipboard:!1,copyGroupHeadersToClipboard:!1,clipboardDelimiter:"\t",suppressCopyRowsToClipboard:!1,suppressCopySingleCellRanges:!1,suppressLastEmptyLineOnPaste:!1,suppressClipboardPaste:!1,suppressClipboardApi:!1,suppressCutToClipboard:!1,maintainColumnOrder:!1,suppressFieldDotNotation:!1,allowDragFromColumnsToolPanel:!1,suppressMovableColumns:!1,suppressColumnMoveAnimation:!1,suppressDragLeaveHidesColumns:!1,suppressRowGroupHidesColumns:!1,suppressAutoSize:!1,autoSizePadding:20,skipHeaderOnAutoSize:!1,singleClickEdit:!1,suppressClickEdit:!1,readOnlyEdit:!1,stopEditingWhenCellsLoseFocus:!1,enterNavigatesVertically:!1,enterNavigatesVerticallyAfterEdit:!1,enableCellEditingOnBackspace:!1,undoRedoCellEditing:!1,undoRedoCellEditingLimit:10,suppressCsvExport:!1,suppressExcelExport:!1,cacheQuickFilter:!1,includeHiddenColumnsInQuickFilter:!1,excludeChildrenWhenTreeDataFiltering:!1,enableAdvancedFilter:!1,includeHiddenColumnsInAdvancedFilter:!1,enableCharts:!1,suppressChartToolPanelsButton:!1,masterDetail:!1,keepDetailRows:!1,keepDetailRowsCount:10,detailRowAutoHeight:!1,tabIndex:0,rowBuffer:10,valueCache:!1,valueCacheNeverExpires:!1,enableCellExpressions:!1,suppressTouch:!1,suppressFocusAfterRefresh:!1,suppressAsyncEvents:!1,suppressBrowserResizeObserver:!1,suppressPropertyNamesCheck:!1,suppressChangeDetection:!1,debug:!1,suppressLoadingOverlay:!1,suppressNoRowsOverlay:!1,pagination:!1,paginationPageSize:100,paginationPageSizeSelector:!0,paginationAutoPageSize:!1,paginateChildRows:!1,suppressPaginationPanel:!1,pivotMode:!1,pivotPanelShow:"never",pivotDefaultExpanded:0,pivotSuppressAutoColumn:!1,suppressExpandablePivotGroups:!1,functionsReadOnly:!1,suppressAggFuncInHeader:!1,alwaysAggregateAtRootLevel:!1,aggregateOnlyChangedColumns:!1,suppressAggFilteredOnly:!1,removePivotHeaderRowWhenSingleValueColumn:!1,animateRows:!0,enableCellChangeFlash:!1,cellFlashDelay:500,cellFlashDuration:500,cellFadeDelay:1e3,cellFadeDuration:1e3,allowShowChangeAfterFilter:!1,domLayout:"normal",ensureDomOrder:!1,enableRtl:!1,suppressColumnVirtualisation:!1,suppressMaxRenderedRowRestriction:!1,suppressRowVirtualisation:!1,rowDragManaged:!1,suppressRowDrag:!1,suppressMoveWhenRowDragging:!1,rowDragEntireRow:!1,rowDragMultiRow:!1,embedFullWidthRows:!1,groupDisplayType:"singleColumn",groupDefaultExpanded:0,groupMaintainOrder:!1,groupSelectsChildren:!1,groupIncludeTotalFooter:!1,groupSuppressBlankHeader:!1,groupSelectsFiltered:!1,showOpenedGroup:!1,groupRemoveSingleChildren:!1,groupRemoveLowestSingleChildren:!1,groupHideOpenParents:!1,groupAllowUnbalanced:!1,rowGroupPanelShow:"never",suppressMakeColumnVisibleAfterUnGroup:!1,treeData:!1,rowGroupPanelSuppressSort:!1,suppressGroupRowsSticky:!1,rowModelType:"clientSide",asyncTransactionWaitMillis:50,suppressModelUpdateAfterUpdateTransaction:!1,cacheOverflowSize:1,infiniteInitialRowCount:1,serverSideInitialRowCount:1,suppressServerSideInfiniteScroll:!1,cacheBlockSize:100,maxBlocksInCache:-1,maxConcurrentDatasourceRequests:2,blockLoadDebounceMillis:0,purgeClosedRowNodes:!1,serverSideSortAllLevels:!1,serverSideOnlyRefreshFilteredGroups:!1,serverSideSortOnServer:!1,serverSideFilterOnServer:!1,serverSidePivotResultFieldSeparator:"_",viewportRowModelPageSize:5,viewportRowModelBufferSize:5,alwaysShowHorizontalScroll:!1,alwaysShowVerticalScroll:!1,debounceVerticalScrollbar:!1,suppressHorizontalScroll:!1,suppressScrollOnNewData:!1,suppressScrollWhenPopupsAreOpen:!1,suppressAnimationFrame:!1,suppressMiddleClickScrolls:!1,suppressPreventDefaultOnMouseWheel:!1,rowMultiSelectWithClick:!1,suppressRowDeselection:!1,suppressRowClickSelection:!1,suppressCellFocus:!1,suppressHeaderFocus:!1,suppressMultiRangeSelection:!1,enableCellTextSelection:!1,enableRangeSelection:!1,enableRangeHandle:!1,enableFillHandle:!1,fillHandleDirection:"xy",suppressClearOnFillReduction:!1,accentedSort:!1,unSortIcon:!1,suppressMultiSort:!1,alwaysMultiSort:!1,suppressMaintainUnsortedOrder:!1,suppressRowHoverHighlight:!1,suppressRowTransform:!1,columnHoverHighlight:!1,deltaSort:!1,enableGroupEdit:!1,suppressGroupMaintainValueType:!1,functionsPassive:!1,groupLockGroupColumns:0,serverSideEnableClientSideSort:!1,suppressServerSideFullWidthLoadingRow:!1,pivotMaxGeneratedColumns:-1},Ch={sideBar:{module:"@ag-grid-enterprise/side-bar"},statusBar:{module:"@ag-grid-enterprise/status-bar"},enableCharts:{module:"@ag-grid-enterprise/charts"},getMainMenuItems:{module:"@ag-grid-enterprise/menu"},getContextMenuItems:{module:"@ag-grid-enterprise/menu"},allowContextMenuWithControlKey:{module:"@ag-grid-enterprise/menu"},enableAdvancedFilter:{module:"@ag-grid-enterprise/advanced-filter"},treeData:{supportedRowModels:["clientSide","serverSide"],module:"@ag-grid-enterprise/row-grouping",dependencies:e=>{var t;const i=null!=(t=e.rowModelType)?t:"clientSide";switch(i){case"clientSide":const t=`treeData requires 'getDataPath' in the ${i} row model.`;return e.getDataPath?null:t;case"serverSide":const n=`treeData requires 'isServerSideGroup' and 'getServerSideGroupKey' in the ${i} row model.`;return e.isServerSideGroup&&e.getServerSideGroupKey?null:n}return null}},masterDetail:{module:"@ag-grid-enterprise/master-detail"},enableRangeSelection:{module:"@ag-grid-enterprise/range-selection"},enableRangeHandle:{dependencies:{enableRangeSelection:[!0]}},enableFillHandle:{dependencies:{enableRangeSelection:[!0]}},groupDefaultExpanded:{supportedRowModels:["clientSide"]},groupIncludeFooter:{supportedRowModels:["clientSide","serverSide"],dependencies:e=>{var t;switch(null!=(t=e.rowModelType)?t:"clientSide"){case"clientSide":return null;case"serverSide":const t="groupIncludeFooter is not supported alongside suppressServerSideInfiniteScroll";return e.suppressServerSideInfiniteScroll?t:null}return null}},groupIncludeTotalFooter:{supportedRowModels:["clientSide"]},groupRemoveSingleChildren:{dependencies:{groupHideOpenParents:[void 0,!1],groupRemoveLowestSingleChildren:[void 0,!1]}},groupRemoveLowestSingleChildren:{dependencies:{groupHideOpenParents:[void 0,!1],groupRemoveSingleChildren:[void 0,!1]}},groupSelectsChildren:{dependencies:{rowSelection:["multiple"]}},suppressParentsInRowNodes:{dependencies:{groupSelectsChildren:[void 0,!1]}},viewportDatasource:{supportedRowModels:["viewport"],module:"@ag-grid-enterprise/viewport-row-model"},serverSideDatasource:{supportedRowModels:["serverSide"],module:"@ag-grid-enterprise/server-side-row-model"},cacheBlockSize:{supportedRowModels:["serverSide","infinite"]},datasource:{supportedRowModels:["infinite"],module:"@ag-grid-community/infinite-row-model"},rowData:{supportedRowModels:["clientSide"],module:"@ag-grid-community/client-side-row-model"},columnDefs:()=>vh,defaultColDef:()=>vh,defaultColGroupDef:()=>vh,autoGroupColumnDef:()=>vh},bh={objectName:"gridOptions",allProperties:[...Lt.ALL_PROPERTIES,...Pt.EVENT_CALLBACKS],propertyExceptions:["api","columnApi"],docsUrl:"grid-options/",deprecations:{enableChartToolPanelsButton:{version:"29"},functionsPassive:{version:"29.2"},onColumnRowGroupChangeRequest:{version:"29.2"},onColumnPivotChangeRequest:{version:"29.2"},onColumnValueChangeRequest:{version:"29.2"},onColumnAggFuncChangeRequest:{version:"29.2"},serverSideFilterAllLevels:{version:"30",message:"All server-side group levels are now filtered by default. This can be toggled using `serverSideOnlyRefreshFilteredGroups`."},suppressAggAtRootLevel:{version:"30",message:"The root level aggregation is now suppressed by default. This can be toggled using  `alwaysAggregateAtRootLevel`."},excludeHiddenColumnsFromQuickFilter:{version:"30",message:"Hidden columns are now excluded from the Quick Filter by default. This can be toggled using `includeHiddenColumnsInQuickFilter`."},enterMovesDown:{version:"30",renamed:"enterNavigatesVertically"},enterMovesDownAfterEdit:{version:"30",renamed:"enterNavigatesVerticallyAfterEdit"},suppressParentsInRowNodes:{version:"30.2",message:"Using suppressParentsInRowNodes is no longer recommended. To serialize nodes it is now recommended to instead remove the parent node reference before serialization."},advancedFilterModel:{version:"31",message:"Use `initialState.filter.advancedFilterModel` instead."},suppressAsyncEvents:{version:"31",message:"Events should be handled asynchronously."},cellFadeDelay:{version:"31.1",renamed:"cellFadeDuration"},cellFlashDelay:{version:"31.1",renamed:"cellFlashDuration"},suppressServerSideInfiniteScroll:{version:"31.1"},serverSideSortOnServer:{version:"31.1"},serverSideFilterOnServer:{version:"31.1"},enableCellChangeFlash:{version:"31.2",message:"Use `enableCellChangeFlash` in the `ColDef` or `defaultColDef` for all columns."},groupIncludeFooter:{version:"31.3",message:"Use `groupTotalRow` instead."},groupIncludeTotalFooter:{version:"31.3",message:"Use `grandTotalRow` instead."}},validations:Ch},Sh=class{constructor(){this.destroyed=!1,this.domDataKey="__AG_"+Math.random().toString(),this.propertyEventService=new fe,this.globalEventHandlerFactory=e=>(t,i)=>{if(this.destroyed)return;const n=ct.has(t);if(n&&!e||!n&&e)return;const s=Pt.getCallbackForEvent(t),r=this.gridOptions[s];"function"==typeof r&&this.frameworkOverrides.wrapOutgoing(()=>{r(i)})}}get context(){return this.gridOptions.context}init(){this.columnApi=new Tc(this.api);const e=!this.get("suppressAsyncEvents");this.eventService.addGlobalListener(this.globalEventHandlerFactory().bind(this),e),this.eventService.addGlobalListener(this.globalEventHandlerFactory(!0).bind(this),!1),this.propertyEventService.setFrameworkOverrides(this.frameworkOverrides),this.getScrollbarWidth()}destroy(){this.destroyed=!0,this.columnApi=void 0}get(e){var t;return null!=(t=this.gridOptions[e])?t:yh[e]}getCallback(e){return this.mergeGridCommonParams(this.gridOptions[e])}exists(e){return y(this.gridOptions[e])}mergeGridCommonParams(e){return e?t=>{const i=t;return i.api=this.api,i.columnApi=this.columnApi,i.context=this.context,e(i)}:e}static toBoolean(e){return"boolean"==typeof e?e:"string"==typeof e&&("TRUE"===e.toUpperCase()||""==e)}static toNumber(e){if("number"==typeof e)return e;if("string"==typeof e){const t=parseInt(e);if(isNaN(t))return;return t}}static toConstrainedNum(e,t){return i=>{const n=Sh.toNumber(i);if(!(null==n||n<e||n>t))return n}}static getCoercedValue(e,t){const i=Sh.PROPERTY_COERCIONS.get(e);return i?i(t):t}static getCoercedGridOptions(e){const t={};return Object.entries(e).forEach(([e,i])=>{const n=Sh.getCoercedValue(e,i);t[e]=n}),t}updateGridOptions({options:e,force:t,source:i="api"}){const n={id:Sh.changeSetId++,properties:[]},s=[];Object.entries(e).forEach(([e,r])=>{"api"===i&&It[e]&&z(`${e} is an initial property and cannot be updated.`);const o=Sh.getCoercedValue(e,r),a=t||"object"==typeof o&&"api"===i,l=this.gridOptions[e];if(a||l!==o){this.gridOptions[e]=o;const t={type:e,currentValue:o,previousValue:l,changeSet:n,source:i};s.push(t)}}),this.validationService.processGridOptions(this.gridOptions),n.properties=s.map(e=>e.type),s.forEach(e=>{this.gridOptions.debug&&console.log(`AG Grid: Updated property ${e.type} from `,e.previousValue," to  ",e.currentValue),this.propertyEventService.dispatchEvent(e)})}addEventListener(e,t){this.propertyEventService.addEventListener(e,t)}removeEventListener(e,t){this.propertyEventService.removeEventListener(e,t)}getScrollbarWidth(){if(null==this.scrollbarWidth){const e="number"==typeof this.gridOptions.scrollbarWidth&&this.gridOptions.scrollbarWidth>=0?this.gridOptions.scrollbarWidth:Fi();null!=e&&(this.scrollbarWidth=e,this.eventService.dispatchEvent({type:lt.EVENT_SCROLLBAR_WIDTH_CHANGED}))}return this.scrollbarWidth}isRowModelType(e){return this.gridOptions.rowModelType===e||"clientSide"===e&&C(this.gridOptions.rowModelType)}isDomLayout(e){var t;return(null!=(t=this.gridOptions.domLayout)?t:"normal")===e}isRowSelection(){return"single"===this.gridOptions.rowSelection||"multiple"===this.gridOptions.rowSelection}useAsyncEvents(){return!this.get("suppressAsyncEvents")}isGetRowHeightFunction(){return"function"==typeof this.gridOptions.getRowHeight}getRowHeightForNode(e,t=!1,i){if(null==i&&(i=this.environment.getDefaultRowHeight()),this.isGetRowHeightFunction()){if(t)return{height:i,estimated:!0};const n={node:e,data:e.data},s=this.getCallback("getRowHeight")(n);if(this.isNumeric(s))return 0===s&&z("The return of `getRowHeight` cannot be zero. If the intention is to hide rows, use a filter instead."),{height:Math.max(1,s),estimated:!1}}return e.detail&&this.get("masterDetail")?this.getMasterDetailRowHeight():{height:this.gridOptions.rowHeight&&this.isNumeric(this.gridOptions.rowHeight)?this.gridOptions.rowHeight:i,estimated:!1}}getMasterDetailRowHeight(){return this.get("detailRowAutoHeight")?{height:1,estimated:!1}:this.isNumeric(this.gridOptions.detailRowHeight)?{height:this.gridOptions.detailRowHeight,estimated:!1}:{height:300,estimated:!1}}getRowHeightAsNumber(){if(!this.gridOptions.rowHeight||C(this.gridOptions.rowHeight))return this.environment.getDefaultRowHeight();const e=this.environment.refreshRowHeightVariable();return-1!==e?e:(console.warn("AG Grid row height must be a number if not using standard row model"),this.environment.getDefaultRowHeight())}isNumeric(e){return!isNaN(e)&&"number"==typeof e&&isFinite(e)}getDomDataKey(){return this.domDataKey}getDomData(e,t){const i=e[this.getDomDataKey()];return i?i[t]:void 0}setDomData(e,t,i){const n=this.getDomDataKey();let s=e[n];C(s)&&(s={},e[n]=s),s[t]=i}getDocument(){let e=null;return this.gridOptions.getDocument&&y(this.gridOptions.getDocument)?e=this.gridOptions.getDocument():this.eGridDiv&&(e=this.eGridDiv.ownerDocument),e&&y(e)?e:document}getWindow(){return this.getDocument().defaultView||window}getRootNode(){return this.eGridDiv.getRootNode()}getActiveDomElement(){return this.getRootNode().activeElement}getAsyncTransactionWaitMillis(){return y(this.gridOptions.asyncTransactionWaitMillis)?this.gridOptions.asyncTransactionWaitMillis:50}isAnimateRows(){return!this.get("ensureDomOrder")&&this.get("animateRows")}isGroupRowsSticky(){return!(this.get("paginateChildRows")||this.get("groupHideOpenParents")||this.isDomLayout("print"))}isColumnsSortingCoupledToGroup(){const e=this.gridOptions.autoGroupColumnDef;return!(null==e?void 0:e.comparator)&&!this.get("treeData")}getGroupAggFiltering(){const e=this.gridOptions.groupAggFiltering;return"function"==typeof e?this.getCallback("groupAggFiltering"):!0===e?()=>!0:void 0}getGrandTotalRow(){const e=this.gridOptions.grandTotalRow;return e||(this.gridOptions.groupIncludeTotalFooter?"bottom":void 0)}getGroupTotalRowCallback(){const e=this.get("groupTotalRow");if("function"==typeof e)return this.getCallback("groupTotalRow");if(e)return()=>e;const t=this.get("groupIncludeFooter");if("function"==typeof t){const e=this.getCallback("groupIncludeFooter");return t=>e(t)?"bottom":void 0}return()=>t?"bottom":void 0}isGroupMultiAutoColumn(){return this.gridOptions.groupDisplayType?"multipleColumns"===this.gridOptions.groupDisplayType:this.get("groupHideOpenParents")}isGroupUseEntireRow(e){return!e&&"groupRows"===this.gridOptions.groupDisplayType}getGridCommonParams(){return{api:this.api,columnApi:this.columnApi,context:this.context}}addGridCommonParams(e){const t=e;return t.api=this.api,t.columnApi=this.columnApi,t.context=this.context,t}};Sh.PROPERTY_COERCIONS=new Map([...Lt.BOOLEAN_PROPERTIES.map(e=>[e,Sh.toBoolean]),...Lt.NUMBER_PROPERTIES.map(e=>[e,Sh.toNumber]),["groupAggFiltering",e=>"function"==typeof e?e:Sh.toBoolean(e)],["pageSize",Sh.toConstrainedNum(1,Number.MAX_VALUE)],["autoSizePadding",Sh.toConstrainedNum(0,Number.MAX_VALUE)],["keepDetailRowsCount",Sh.toConstrainedNum(1,Number.MAX_VALUE)],["rowBuffer",Sh.toConstrainedNum(0,Number.MAX_VALUE)],["infiniteInitialRowCount",Sh.toConstrainedNum(1,Number.MAX_VALUE)],["cacheOverflowSize",Sh.toConstrainedNum(1,Number.MAX_VALUE)],["cacheBlockSize",Sh.toConstrainedNum(1,Number.MAX_VALUE)],["serverSideInitialRowCount",Sh.toConstrainedNum(1,Number.MAX_VALUE)],["viewportRowModelPageSize",Sh.toConstrainedNum(1,Number.MAX_VALUE)],["viewportRowModelBufferSize",Sh.toConstrainedNum(0,Number.MAX_VALUE)]]),Sh.changeSetId=0,g([he("gridOptions")],Sh.prototype,"gridOptions",2),g([he("eventService")],Sh.prototype,"eventService",2),g([he("environment")],Sh.prototype,"environment",2),g([he("frameworkOverrides")],Sh.prototype,"frameworkOverrides",2),g([he("eGridDiv")],Sh.prototype,"eGridDiv",2),g([he("validationService")],Sh.prototype,"validationService",2),g([he("gridApi")],Sh.prototype,"api",2),g([ae],Sh.prototype,"init",1),g([le],Sh.prototype,"destroy",1),Sh=g([ce("gridOptionsService")],Sh);var wh=class extends nt{getLocaleTextFunc(){const e=this.gos.getCallback("getLocaleText");if(e)return(t,i,n)=>e({key:t,defaultValue:i,variableValues:n});const t=this.gos.get("localeText");return(e,i,n)=>{let s=t&&t[e];if(s&&n&&n.length){let e=0;for(;!(e>=n.length)&&-1!==s.indexOf("${variable}");)s=s.replace("${variable}",n[e++])}return null!=s?s:i}}};wh=g([ce("localeService")],wh);var xh=class e extends hh{constructor(){super(e.TEMPLATE,"vertical")}postConstruct(){super.postConstruct(),this.createManagedBean(new wa(this.eContainer)),this.ctrlsService.register("fakeVScrollComp",this),this.addManagedListener(this.eventService,lt.EVENT_ROW_CONTAINER_HEIGHT_CHANGED,this.onRowContainerHeightChanged.bind(this))}setScrollVisible(){const e=this.scrollVisibleService.isVerticalScrollShowing(),t=this.invisibleScrollbar,i=e&&this.gos.getScrollbarWidth()||0,n=0===i&&t?16:i;this.addOrRemoveCssClass("ag-scrollbar-invisible",t),Ln(this.getGui(),n),Ln(this.eViewport,n),Ln(this.eContainer,n),this.setDisplayed(e,{skipAriaHidden:!0})}onRowContainerHeightChanged(){const{ctrlsService:e}=this,t=e.getGridBodyCtrl().getBodyViewportElement(),i=this.getScrollPosition(),n=t.scrollTop;i!=n&&this.setScrollPosition(n,!0)}getScrollPosition(){return this.getViewport().scrollTop}setScrollPosition(e,t){t||wn(this.getViewport())||this.attemptSettingScrollPosition(e),this.getViewport().scrollTop=e}};xh.TEMPLATE='<div class="ag-body-vertical-scroll" aria-hidden="true">\n            <div class="ag-body-vertical-scroll-viewport" ref="eViewport">\n                <div class="ag-body-vertical-scroll-container" ref="eContainer"></div>\n            </div>\n        </div>',g([ae],xh.prototype,"postConstruct",1);var Eh=xh,Mh={january:"January",february:"February",march:"March",april:"April",may:"May",june:"June",july:"July",august:"August",september:"September",october:"October",november:"November",december:"December"},Ah=["january","february","march","april","may","june","july","august","september","october","november","december"],Th=class extends nt{constructor(){super(...arguments),this.dataTypeDefinitions={},this.isWaitingForRowData=!1,this.isColumnTypeOverrideInDataTypeDefinitions=!1,this.columnStateUpdatesPendingInference={},this.columnStateUpdateListenerDestroyFuncs=[]}init(){this.groupHideOpenParents=this.gos.get("groupHideOpenParents"),this.addManagedPropertyListener("groupHideOpenParents",()=>{this.groupHideOpenParents=this.gos.get("groupHideOpenParents")}),this.processDataTypeDefinitions(),this.addManagedPropertyListener("dataTypeDefinitions",e=>{this.processDataTypeDefinitions(),this.columnModel.recreateColumnDefs(At(e.source))})}processDataTypeDefinitions(){var e;const t=this.getDefaultDataTypes();this.dataTypeDefinitions={},Object.entries(t).forEach(([e,t])=>{this.dataTypeDefinitions[e]=u(d({},t),{groupSafeValueFormatter:this.createGroupSafeValueFormatter(t)})});const i=null!=(e=this.gos.get("dataTypeDefinitions"))?e:{};this.dataTypeMatchers={},Object.entries(i).forEach(([e,n])=>{const s=this.processDataTypeDefinition(n,i,[e],t);s&&(this.dataTypeDefinitions[e]=s,n.dataTypeMatcher&&(this.dataTypeMatchers[e]=n.dataTypeMatcher))}),this.checkObjectValueHandlers(t),["dateString","text","number","boolean","date"].forEach(e=>{const i=this.dataTypeMatchers[e];i&&delete this.dataTypeMatchers[e],this.dataTypeMatchers[e]=null!=i?i:t[e].dataTypeMatcher})}mergeDataTypeDefinitions(e,t){const i=d(d({},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 s;const r=e.extendsDataType;if(e.columnTypes&&(this.isColumnTypeOverrideInDataTypeDefinitions=!0),e.extendsDataType===e.baseDataType){let i=n[r];const o=t[r];if(i&&o&&(i=o),!this.validateDataTypeDefinition(e,i,r))return;s=this.mergeDataTypeDefinitions(i,e)}else{if(i.includes(r))return void z('Data type definition hierarchies (via the "extendsDataType" property) cannot contain circular references.');const o=t[r];if(!this.validateDataTypeDefinition(e,o,r))return;const a=this.processDataTypeDefinition(o,t,[...i,r],n);if(!a)return;s=this.mergeDataTypeDefinitions(a,e)}return u(d({},s),{groupSafeValueFormatter:this.createGroupSafeValueFormatter(s)})}validateDataTypeDefinition(e,t,i){return t?t.baseDataType===e.baseDataType||(z('The "baseDataType" property of a data type definition must match that of its parent.'),!1):(z(`The data type definition ${i} does not exist.`),!1)}createGroupSafeValueFormatter(e){if(e.valueFormatter)return t=>{var i,n;if(null==(i=t.node)?void 0:i.group){const i=t.column.getAggFunc();if(i){if("first"===i||"last"===i)return e.valueFormatter(t);if("number"===e.baseDataType&&"count"!==i){if("number"==typeof t.value)return e.valueFormatter(t);if("object"==typeof t.value){if(!t.value)return;if("toNumber"in t.value)return e.valueFormatter(u(d({},t),{value:t.value.toNumber()}));if("value"in t.value)return e.valueFormatter(u(d({},t),{value:t.value.value}))}}}if(!this.gos.get("suppressGroupMaintainValueType"))return}else if(this.groupHideOpenParents&&t.column.isRowGroupActive()){if("string"!=typeof t.value||(null==(n=e.dataTypeMatcher)?void 0:n.call(e,t.value)))return e.valueFormatter(t);if(!this.gos.get("suppressGroupMaintainValueType"))return}return e.valueFormatter(t)}}updateColDefAndGetDataTypeDefinitionColumnType(e,t,i){let{cellDataType:n}=t;const{field:s}=t;if(void 0===n&&(n=e.cellDataType),null!=n&&!0!==n||(n=!!this.canInferCellDataType(e,t)&&this.inferCellDataType(s,i)),!n)return void(e.cellDataType=!1);const r=this.dataTypeDefinitions[n];if(r)return e.cellDataType=n,r.groupSafeValueFormatter&&(e.valueFormatter=r.groupSafeValueFormatter),r.valueParser&&(e.valueParser=r.valueParser),r.suppressDefaultProperties||this.setColDefPropertiesForBaseDataType(e,r,i),r.columnTypes;z(`Missing data type definition - "${n}"`)}updateColDefAndGetColumnType(e,t,i){var n,s;const r=this.updateColDefAndGetDataTypeDefinitionColumnType(e,t,i),o=null!=(s=null!=(n=t.type)?n:r)?s:e.type;return e.type=o,o?this.convertColumnTypes(o):void 0}addColumnListeners(e){if(!this.isWaitingForRowData)return;const t=this.columnStateUpdatesPendingInference[e.getColId()];if(!t)return;const i=e=>{t.add(e.key)};e.addEventListener(Se.EVENT_STATE_UPDATED,i),this.columnStateUpdateListenerDestroyFuncs.push(()=>e.removeEventListener(Se.EVENT_STATE_UPDATED,i))}canInferCellDataType(e,t){var i;if("clientSide"!==this.rowModel.getType())return!1;const n={cellRenderer:!0,valueGetter:!0,valueParser:!0,refData:!0};if(this.doColDefPropsPreventInference(t,n))return!1;const s=null===t.type?e.type:t.type;if(s){const e=null!=(i=this.gos.get("columnTypes"))?i:{};if(this.convertColumnTypes(s).some(t=>{const i=e[t.trim()];return i&&this.doColDefPropsPreventInference(i,n)}))return!1}return!this.doColDefPropsPreventInference(e,n)}doColDefPropsPreventInference(e,t){return[["cellRenderer","agSparklineCellRenderer"],["valueGetter",void 0],["valueParser",void 0],["refData",void 0]].some(([i,n])=>this.doesColDefPropPreventInference(e,t,i,n))}doesColDefPropPreventInference(e,t,i,n){if(!t[i])return!1;const s=e[i];return null===s?(t[i]=!1,!1):void 0===n?!!s:s===n}inferCellDataType(e,t){var i;if(!e)return;let n;const s=this.getInitialData();if(s){const t=e.indexOf(".")>=0&&!this.gos.get("suppressFieldDotNotation");n=_(s,e,t)}else this.initWaitForRowData(t);if(null==n)return;const[r]=null!=(i=Object.entries(this.dataTypeMatchers).find(([e,t])=>t(n)))?i:["object"];return r}getInitialData(){const e=this.gos.get("rowData");if(null==e?void 0:e.length)return e[0];if(this.initialData)return this.initialData;{const e=this.rowModel.getRootNode().allLeafChildren;if(null==e?void 0:e.length)return e[0].data}return null}initWaitForRowData(e){if(this.columnStateUpdatesPendingInference[e]=new Set,this.isWaitingForRowData)return;this.isWaitingForRowData=!0;const t=this.isColumnTypeOverrideInDataTypeDefinitions;t&&this.columnModel.queueResizeOperations();const i=this.addManagedListener(this.eventService,lt.EVENT_ROW_DATA_UPDATE_STARTED,e=>{const{firstRowData:n}=e;if(!n)return;null==i||i(),this.isWaitingForRowData=!1,this.processColumnsPendingInference(n,t),this.columnStateUpdatesPendingInference={},t&&this.columnModel.processResizeOperations();const s={type:lt.EVENT_DATA_TYPES_INFERRED};this.eventService.dispatchEvent(s)})}isPendingInference(){return this.isWaitingForRowData}processColumnsPendingInference(e,t){this.initialData=e;const i=[];this.columnStateUpdateListenerDestroyFuncs.forEach(e=>e()),this.columnStateUpdateListenerDestroyFuncs=[];const n={},s={};Object.entries(this.columnStateUpdatesPendingInference).forEach(([e,r])=>{const o=this.columnModel.getGridColumn(e);if(!o)return;const a=o.getColDef();if(!this.columnModel.resetColumnDefIntoColumn(o,"cellDataTypeInferred"))return;const l=o.getColDef();if(t&&l.type&&l.type!==a.type){const t=this.getUpdatedColumnState(o,r);t.rowGroup&&null==t.rowGroupIndex&&(n[e]=t),t.pivot&&null==t.pivotIndex&&(s[e]=t),i.push(t)}}),t&&i.push(...this.columnModel.generateColumnStateForRowGroupAndPivotIndexes(n,s)),i.length&&this.columnModel.applyColumnState({state:i},"cellDataTypeInferred"),this.initialData=null}getUpdatedColumnState(e,t){const i=this.columnModel.getColumnStateFromColDef(e);return t.forEach(e=>{delete i[e],"rowGroup"===e?delete i.rowGroupIndex:"pivot"===e&&delete i.pivotIndex}),i}checkObjectValueHandlers(e){const t=this.dataTypeDefinitions.object,i=e.object;this.hasObjectValueParser=t.valueParser!==i.valueParser,this.hasObjectValueFormatter=t.valueFormatter!==i.valueFormatter}convertColumnTypes(e){let t=[];return e instanceof Array?e.some(e=>"string"!=typeof e)?console.warn("if colDef.type is supplied an array it should be of type 'string[]'"):t=e:"string"==typeof e?t=e.split(","):console.warn("colDef.type should be of type 'string' | 'string[]'"),t}getDateStringTypeDefinition(e){var t;return e&&null!=(t=this.getDataTypeDefinition(e))?t:this.dataTypeDefinitions.dateString}getDateParserFunction(e){return this.getDateStringTypeDefinition(e).dateParser}getDateFormatterFunction(e){return this.getDateStringTypeDefinition(e).dateFormatter}getDataTypeDefinition(e){const t=e.getColDef();if(t.cellDataType)return this.dataTypeDefinitions[t.cellDataType]}getBaseDataType(e){var t;return null==(t=this.getDataTypeDefinition(e))?void 0:t.baseDataType}checkType(e,t){var i;if(null==t)return!0;const n=null==(i=this.getDataTypeDefinition(e))?void 0:i.dataTypeMatcher;return!n||n(t)}validateColDef(e){"object"===e.cellDataType&&(e.valueFormatter!==this.dataTypeDefinitions.object.groupSafeValueFormatter||this.hasObjectValueFormatter||z('Cell data type is "object" but no value formatter has been provided. Please either provide an object data type definition with a value formatter, or set "colDef.valueFormatter"'),e.editable&&e.valueParser===this.dataTypeDefinitions.object.valueParser&&!this.hasObjectValueParser&&z('Cell data type is "object" but no value parser has been provided. Please either provide an object data type definition with a value parser, or set "colDef.valueParser"'))}setColDefPropertiesForBaseDataType(e,t,i){const n=(e,i,n)=>{let s=e.getColDef().valueFormatter;return s===t.groupSafeValueFormatter&&(s=t.valueFormatter),this.valueService.formatValue(e,i,n,s)},s=se.__isRegistered("@ag-grid-enterprise/set-filter",this.context.getGridId()),r=this.localeService.getLocaleTextFunc(),o=t=>{const{filterParams:i}=e;e.filterParams="object"==typeof i?d(d({},i),t):t};switch(t.baseDataType){case"number":e.cellEditor="agNumberCellEditor",s&&o({comparator:(e,t)=>{const i=null==e?0:parseInt(e),n=null==t?0:parseInt(t);return i===n?0:i>n?1:-1}});break;case"boolean":e.cellEditor="agCheckboxCellEditor",e.cellRenderer="agCheckboxCellRenderer",e.suppressKeyboardEvent=e=>!!e.colDef.editable&&e.event.key===Xn.SPACE,o(s?{valueFormatter:e=>y(e.value)?r(String(e.value),e.value?"True":"False"):r("blanks","(Blanks)")}:{maxNumConditions:1,debounceMs:0,filterOptions:["empty",{displayKey:"true",displayName:"True",predicate:(e,t)=>t,numberOfInputs:0},{displayKey:"false",displayName:"False",predicate:(e,t)=>!1===t,numberOfInputs:0}]});break;case"date":e.cellEditor="agDateCellEditor",e.keyCreator=e=>n(e.column,e.node,e.value),s&&o({valueFormatter:e=>{const t=n(e.column,e.node,e.value);return y(t)?t:r("blanks","(Blanks)")},treeList:!0,treeListFormatter:(e,t)=>{if(1===t&&null!=e){const t=Ah[Number(e)-1];return r(t,Mh[t])}return null!=e?e:r("blanks","(Blanks)")}});break;case"dateString":{e.cellEditor="agDateStringCellEditor",e.keyCreator=e=>n(e.column,e.node,e.value);const i=t.dateParser;o(s?{valueFormatter:e=>{const t=n(e.column,e.node,e.value);return y(t)?t:r("blanks","(Blanks)")},treeList:!0,treeListPathGetter:e=>{const t=i(null!=e?e:void 0);return t?[String(t.getFullYear()),String(t.getMonth()+1),String(t.getDate())]:null},treeListFormatter:(e,t)=>{if(1===t&&null!=e){const t=Ah[Number(e)-1];return r(t,Mh[t])}return null!=e?e:r("blanks","(Blanks)")}}:{comparator:(e,t)=>{const n=i(t);return null==t||n<e?-1:n>e?1:0}});break}case"object":e.cellEditorParams={useFormatter:!0},e.comparator=(e,t)=>{const s=this.columnModel.getPrimaryColumn(i),r=null==s?void 0:s.getColDef();if(!s||!r)return 0;const o=null==e?"":n(s,null,e),a=null==t?"":n(s,null,t);return o===a?0:o>a?1:-1},e.keyCreator=e=>n(e.column,e.node,e.value),s?o({valueFormatter:e=>{const t=n(e.column,e.node,e.value);return y(t)?t:r("blanks","(Blanks)")}}):e.filterValueGetter=e=>n(e.column,e.node,this.valueService.getValue(e.column,e.node))}}getDefaultDataTypes(){const e=e=>!!e.match("^\\d{4}-\\d{2}-\\d{2}$"),t=this.localeService.getLocaleTextFunc();return{number:{baseDataType:"number",valueParser:e=>{var t,i;return""===(null==(i=null==(t=e.newValue)?void 0:t.trim)?void 0:i.call(t))?null:Number(e.newValue)},valueFormatter:e=>null==e.value?"":"number"!=typeof e.value||isNaN(e.value)?t("invalidNumber","Invalid Number"):String(e.value),dataTypeMatcher:e=>"number"==typeof e},text:{baseDataType:"text",valueParser:e=>""===e.newValue?null:S(e.newValue),dataTypeMatcher:e=>"string"==typeof e},boolean:{baseDataType:"boolean",valueParser:e=>{var t,i;return null==e.newValue?e.newValue:""===(null==(i=null==(t=e.newValue)?void 0:t.trim)?void 0:i.call(t))?null:"true"===String(e.newValue).toLowerCase()},valueFormatter:e=>null==e.value?"":String(e.value),dataTypeMatcher:e=>"boolean"==typeof e},date:{baseDataType:"date",valueParser:e=>Qi(null==e.newValue?null:String(e.newValue)),valueFormatter:e=>{var i;return null==e.value?"":e.value instanceof Date&&!isNaN(e.value.getTime())?null!=(i=qi(e.value,!1))?i:"":t("invalidDate","Invalid Date")},dataTypeMatcher:e=>e instanceof Date},dateString:{baseDataType:"dateString",dateParser:e=>{var t;return null!=(t=Qi(e))?t:void 0},dateFormatter:e=>{var t;return null!=(t=qi(null!=e?e:null,!1))?t:void 0},valueParser:t=>e(String(t.newValue))?t.newValue:null,valueFormatter:t=>e(String(t.value))?t.value:"",dataTypeMatcher:t=>"string"==typeof t&&e(t)},object:{baseDataType:"object",valueParser:()=>null,valueFormatter:e=>{var t;return null!=(t=S(e.value))?t:""}}}}};g([he("rowModel")],Th.prototype,"rowModel",2),g([he("columnModel")],Th.prototype,"columnModel",2),g([he("valueService")],Th.prototype,"valueService",2),g([ae],Th.prototype,"init",1),Th=g([ce("dataTypeService")],Th);var Dh=class extends nt{constructor(){super(...arguments),this.waitingForColumns=!1}postConstruct(){this.addManagedPropertyListener("columnDefs",e=>this.setColumnDefs(e))}start(){this.ctrlsService.whenReady(()=>{const e=this.gos.get("columnDefs");e?this.setColumnsAndData(e):this.waitingForColumns=!0,this.gridReady()})}setColumnsAndData(e){this.columnModel.setColumnDefs(null!=e?e:[],"gridInitializing"),this.rowModel.start()}gridReady(){this.dispatchGridReadyEvent();const e=se.__isRegistered("@ag-grid-enterprise/core",this.context.getGridId());new Lc("AG Grid",()=>this.gos.get("debug")).log(`initialised successfully, enterprise = ${e}`)}dispatchGridReadyEvent(){const e={type:lt.EVENT_GRID_READY};this.eventService.dispatchEvent(e)}setColumnDefs(e){const t=this.gos.get("columnDefs");if(t)return this.waitingForColumns?(this.waitingForColumns=!1,void this.setColumnsAndData(t)):void this.columnModel.setColumnDefs(t,At(e.source))}};g([he("ctrlsService")],Dh.prototype,"ctrlsService",2),g([he("columnModel")],Dh.prototype,"columnModel",2),g([he("rowModel")],Dh.prototype,"rowModel",2),g([ae],Dh.prototype,"postConstruct",1),Dh=g([ce("syncService")],Dh);var Ih=class extends nt{constructor(){super(...arguments),this.manuallyDisplayed=!1}postConstruct(){this.addManagedListener(this.eventService,lt.EVENT_ROW_DATA_UPDATED,()=>this.onRowDataUpdated()),this.addManagedListener(this.eventService,lt.EVENT_NEW_COLUMNS_LOADED,()=>this.onNewColumnsLoaded())}registerOverlayWrapperComp(e){this.overlayWrapperComp=e,(!this.gos.get("columnDefs")||this.gos.isRowModelType("clientSide")&&!this.gos.get("rowData"))&&this.showLoadingOverlay()}showLoadingOverlay(){if(this.gos.get("suppressLoadingOverlay"))return;const e=this.userComponentFactory.getLoadingOverlayCompDetails({});this.showOverlay(e,"ag-overlay-loading-wrapper","loadingOverlayComponentParams")}showNoRowsOverlay(){if(this.gos.get("suppressNoRowsOverlay"))return;const e=this.userComponentFactory.getNoRowsOverlayCompDetails({});this.showOverlay(e,"ag-overlay-no-rows-wrapper","noRowsOverlayComponentParams")}showOverlay(e,t,i){const n=e.newAgStackInstance(),s=this.addManagedPropertyListener(i,({currentValue:e})=>{n.then(t=>{t.refresh&&t.refresh(this.gos.addGridCommonParams(d({},null!=e?e:{})))})});this.manuallyDisplayed=this.columnModel.isReady()&&!this.paginationProxy.isEmpty(),this.overlayWrapperComp.showOverlay(n,t,s)}hideOverlay(){this.manuallyDisplayed=!1,this.overlayWrapperComp.hideOverlay()}showOrHideOverlay(){const e=this.paginationProxy.isEmpty(),t=this.gos.get("suppressNoRowsOverlay");e&&!t?this.showNoRowsOverlay():this.hideOverlay()}onRowDataUpdated(){this.showOrHideOverlay()}onNewColumnsLoaded(){!this.columnModel.isReady()||this.paginationProxy.isEmpty()||this.manuallyDisplayed||this.hideOverlay()}};g([he("userComponentFactory")],Ih.prototype,"userComponentFactory",2),g([he("paginationProxy")],Ih.prototype,"paginationProxy",2),g([he("columnModel")],Ih.prototype,"columnModel",2),g([ae],Ih.prototype,"postConstruct",1),Ih=g([ce("overlayService")],Ih);var Rh=class extends nt{constructor(){super(...arguments),this.suppressEvents=!0,this.queuedUpdateSources=new Set,this.dispatchStateUpdateEventDebounced=Z(()=>this.dispatchQueuedStateUpdateEvents(),0),this.onRowGroupOpenedDebounced=Z(()=>this.updateCachedState("rowGroupExpansion",this.getRowGroupExpansionState()),0),this.onRowSelectedDebounced=Z(()=>{this.staleStateKeys.delete("rowSelection"),this.updateCachedState("rowSelection",this.getRowSelectionState())},0),this.staleStateKeys=new Set}postConstruct(){var e;this.isClientSideRowModel="clientSide"===this.rowModel.getType(),this.cachedState=null!=(e=this.gos.get("initialState"))?e:{},this.ctrlsService.whenReady(()=>this.suppressEventsAndDispatchInitEvent(()=>this.setupStateOnGridReady()));const t=this.addManagedListener(this.eventService,lt.EVENT_NEW_COLUMNS_LOADED,({source:e})=>{"gridInitializing"===e&&(null==t||t(),this.suppressEventsAndDispatchInitEvent(()=>this.setupStateOnColumnsInitialised()))}),i=this.addManagedListener(this.eventService,lt.EVENT_ROW_COUNT_READY,()=>{null==i||i(),this.suppressEventsAndDispatchInitEvent(()=>this.setupStateOnRowCountReady())}),n=this.addManagedListener(this.eventService,lt.EVENT_FIRST_DATA_RENDERED,()=>{null==n||n(),this.suppressEventsAndDispatchInitEvent(()=>this.setupStateOnFirstDataRendered())})}getState(){return this.staleStateKeys.size&&this.refreshStaleState(),this.cachedState}setupStateOnGridReady(){this.updateCachedState("sideBar",this.getSideBarState()),this.addManagedListener(this.eventService,lt.EVENT_TOOL_PANEL_VISIBLE_CHANGED,()=>this.updateCachedState("sideBar",this.getSideBarState())),this.addManagedListener(this.eventService,lt.EVENT_SIDE_BAR_UPDATED,()=>this.updateCachedState("sideBar",this.getSideBarState()))}setupStateOnColumnsInitialised(){var e;const t=null!=(e=this.gos.get("initialState"))?e:{};this.setColumnState(t),this.setColumnGroupState(t),this.updateColumnState(["aggregation","columnOrder","columnPinning","columnSizing","columnVisibility","pivot","pivot","rowGroup","sort"]),this.updateCachedState("columnGroup",this.getColumnGroupState()),this.addManagedListener(this.eventService,lt.EVENT_COLUMN_VALUE_CHANGED,()=>this.updateColumnState(["aggregation"])),this.addManagedListener(this.eventService,lt.EVENT_COLUMN_MOVED,()=>this.updateColumnState(["columnOrder"])),this.addManagedListener(this.eventService,lt.EVENT_COLUMN_PINNED,()=>this.updateColumnState(["columnPinning"])),this.addManagedListener(this.eventService,lt.EVENT_COLUMN_RESIZED,()=>this.updateColumnState(["columnSizing"])),this.addManagedListener(this.eventService,lt.EVENT_COLUMN_VISIBLE,()=>this.updateColumnState(["columnVisibility"])),this.addManagedListener(this.eventService,lt.EVENT_COLUMN_PIVOT_CHANGED,()=>this.updateColumnState(["pivot"])),this.addManagedListener(this.eventService,lt.EVENT_COLUMN_PIVOT_MODE_CHANGED,()=>this.updateColumnState(["pivot"])),this.addManagedListener(this.eventService,lt.EVENT_COLUMN_ROW_GROUP_CHANGED,()=>this.updateColumnState(["rowGroup"])),this.addManagedListener(this.eventService,lt.EVENT_SORT_CHANGED,()=>this.updateColumnState(["sort"])),this.addManagedListener(this.eventService,lt.EVENT_NEW_COLUMNS_LOADED,()=>this.updateColumnState(["aggregation","columnOrder","columnPinning","columnSizing","columnVisibility","pivot","pivot","rowGroup","sort"])),this.addManagedListener(this.eventService,lt.EVENT_COLUMN_GROUP_OPENED,()=>this.updateCachedState("columnGroup",this.getColumnGroupState()))}setupStateOnRowCountReady(){var e;const{filter:t,rowGroupExpansion:i,rowSelection:n,pagination:s}=null!=(e=this.gos.get("initialState"))?e:{},r=this.gos.get("advancedFilterModel");(t||r)&&this.setFilterState(t,r),i&&this.setRowGroupExpansionState(i),n&&this.setRowSelectionState(n),s&&this.setPaginationState(s),this.updateCachedState("filter",this.getFilterState()),this.updateCachedState("rowGroupExpansion",this.getRowGroupExpansionState()),this.updateCachedState("rowSelection",this.getRowSelectionState()),this.updateCachedState("pagination",this.getPaginationState()),this.addManagedListener(this.eventService,lt.EVENT_FILTER_CHANGED,()=>this.updateCachedState("filter",this.getFilterState())),this.addManagedListener(this.eventService,lt.EVENT_ROW_GROUP_OPENED,()=>this.onRowGroupOpenedDebounced()),this.addManagedListener(this.eventService,lt.EVENT_EXPAND_COLLAPSE_ALL,()=>this.updateCachedState("rowGroupExpansion",this.getRowGroupExpansionState())),this.addManagedListener(this.eventService,lt.EVENT_SELECTION_CHANGED,()=>{this.staleStateKeys.add("rowSelection"),this.onRowSelectedDebounced()}),this.addManagedListener(this.eventService,lt.EVENT_PAGINATION_CHANGED,e=>{(e.newPage||e.newPageSize)&&this.updateCachedState("pagination",this.getPaginationState())})}setupStateOnFirstDataRendered(){var e;const{scroll:t,rangeSelection:i,focusedCell:n,columnOrder:s}=null!=(e=this.gos.get("initialState"))?e:{};n&&this.setFocusedCellState(n),i&&this.setRangeSelectionState(i),t&&this.setScrollState(t),this.setColumnPivotState(!!(null==s?void 0:s.orderedColIds)),this.updateCachedState("sideBar",this.getSideBarState()),this.updateCachedState("focusedCell",this.getFocusedCellState()),this.updateCachedState("rangeSelection",this.getRangeSelectionState()),this.updateCachedState("scroll",this.getScrollState()),this.addManagedListener(this.eventService,lt.EVENT_CELL_FOCUSED,()=>this.updateCachedState("focusedCell",this.getFocusedCellState())),this.addManagedListener(this.eventService,lt.EVENT_RANGE_SELECTION_CHANGED,e=>{e.finished&&this.updateCachedState("rangeSelection",this.getRangeSelectionState())}),this.addManagedListener(this.eventService,lt.EVENT_BODY_SCROLL_END,()=>this.updateCachedState("scroll",this.getScrollState()))}getColumnState(){const e=this.columnModel.isPivotMode(),t=[],i=[],n=[],s=[],r=[],o=[],a=[],l=[],c=[],h=this.columnModel.getColumnState();for(let e=0;e<h.length;e++){const{colId:d,sort:u,sortIndex:p,rowGroup:g,rowGroupIndex:f,aggFunc:m,pivot:v,pivotIndex:y,pinned:C,hide:b,width:S,flex:w}=h[e];c.push(d),u&&(t[null!=p?p:0]={colId:d,sort:u}),g&&(i[null!=f?f:0]=d),"string"==typeof m&&n.push({colId:d,aggFunc:m}),v&&(s[null!=y?y:0]=d),C&&("right"===C?o:r).push(d),b&&a.push(d),(w||S)&&l.push({colId:d,flex:null!=w?w:void 0,width:S})}return{sort:t.length?{sortModel:t}:void 0,rowGroup:i.length?{groupColIds:i}:void 0,aggregation:n.length?{aggregationModel:n}:void 0,pivot:s.length||e?{pivotMode:e,pivotColIds:s}:void 0,columnPinning:r.length||o.length?{leftColIds:r,rightColIds:o}:void 0,columnVisibility:a.length?{hiddenColIds:a}:void 0,columnSizing:l.length?{columnSizingModel:l}:void 0,columnOrder:c.length?{orderedColIds:c}:void 0}}setColumnState(e){const{sort:t,rowGroup:i,aggregation:n,pivot:s,columnPinning:r,columnVisibility:o,columnSizing:a,columnOrder:l}=e,c={},h=e=>{let t=c[e];return t||(t={colId:e},c[e]=t,t)};t&&t.sortModel.forEach(({colId:e,sort:t},i)=>{const n=h(e);n.sort=t,n.sortIndex=i}),i&&i.groupColIds.forEach((e,t)=>{const i=h(e);i.rowGroup=!0,i.rowGroupIndex=t}),n&&n.aggregationModel.forEach(({colId:e,aggFunc:t})=>{h(e).aggFunc=t}),s&&(s.pivotColIds.forEach((e,t)=>{const i=h(e);i.pivot=!0,i.pivotIndex=t}),this.gos.updateGridOptions({options:{pivotMode:s.pivotMode},source:"gridInitializing"})),r&&(r.leftColIds.forEach(e=>{h(e).pinned="left"}),r.rightColIds.forEach(e=>{h(e).pinned="right"})),o&&o.hiddenColIds.forEach(e=>{h(e).hide=!0}),a&&a.columnSizingModel.forEach(({colId:e,flex:t,width:i})=>{const n=h(e);n.flex=null!=t?t:null,n.width=i});const d=null==l?void 0:l.orderedColIds,u=!!(null==d?void 0:d.length),p=u?d.map(e=>h(e)):Object.values(c);if(p.length){this.columnStates=p;const e={sort:null,sortIndex:null,rowGroup:null,rowGroupIndex:null,aggFunc:null,pivot:null,pivotIndex:null,pinned:null,hide:null,flex:null};this.columnModel.applyColumnState({state:p,applyOrder:u,defaultState:e},"gridInitializing")}}setColumnPivotState(e){const t=this.columnStates;this.columnStates=void 0;const i=this.columnGroupStates;if(this.columnGroupStates=void 0,this.columnModel.isSecondaryColumnsPresent()){if(t){let i=[];for(const e of t)this.columnModel.getSecondaryColumn(e.colId)&&i.push(e);this.columnModel.applyColumnState({state:i,applyOrder:e},"gridInitializing")}i&&this.columnModel.setColumnGroupState(i,"gridInitializing")}}getColumnGroupState(){const e=this.columnModel.getColumnGroupState(),t=[];return e.forEach(({groupId:e,open:i})=>{i&&t.push(e)}),t.length?{openColumnGroupIds:t}:void 0}setColumnGroupState(e){var t;if(!e.hasOwnProperty("columnGroup"))return;const i=new Set(null==(t=e.columnGroup)?void 0:t.openColumnGroupIds),n=this.columnModel.getColumnGroupState().map(({groupId:e})=>{const t=i.has(e);return t&&i.delete(e),{groupId:e,open:t}});i.forEach(e=>{n.push({groupId:e,open:!0})}),n.length&&(this.columnGroupStates=n),this.columnModel.setColumnGroupState(n,"gridInitializing")}getFilterState(){var e;let t=this.filterManager.getFilterModel();t&&0===Object.keys(t).length&&(t=void 0);const i=null!=(e=this.filterManager.getAdvancedFilterModel())?e:void 0;return t||i?{filterModel:t,advancedFilterModel:i}:void 0}setFilterState(e,t){const{filterModel:i,advancedFilterModel:n}=null!=e?e:{advancedFilterModel:t};i&&this.filterManager.setFilterModel(i,"columnFilter"),n&&this.filterManager.setAdvancedFilterModel(n)}getRangeSelectionState(){var e;const t=null==(e=this.rangeService)?void 0:e.getCellRanges().map(e=>{const{id:t,type:i,startRow:n,endRow:s,columns:r,startColumn:o}=e;return{id:t,type:i,startRow:n,endRow:s,colIds:r.map(e=>e.getColId()),startColId:o.getColId()}});return(null==t?void 0:t.length)?{cellRanges:t}:void 0}setRangeSelectionState(e){if(!this.gos.get("enableRangeSelection")||!this.rangeService)return;const t=[];e.cellRanges.forEach(e=>{const i=[];if(e.colIds.forEach(e=>{const t=this.columnModel.getGridColumn(e);t&&i.push(t)}),!i.length)return;let n=this.columnModel.getGridColumn(e.startColId);if(!n){const e=this.columnModel.getAllDisplayedColumns(),t=new Set(i);n=e.find(e=>t.has(e))}t.push(u(d({},e),{columns:i,startColumn:n}))}),this.rangeService.setCellRanges(t)}getScrollState(){var e,t,i;if(!this.isClientSideRowModel)return;const n=null==(e=this.ctrlsService.getGridBodyCtrl())?void 0:e.getScrollFeature(),{left:s}=null!=(t=null==n?void 0:n.getHScrollPosition())?t:{left:0},{top:r}=null!=(i=null==n?void 0:n.getVScrollPosition())?i:{top:0};return r||s?{top:r,left:s}:void 0}setScrollState(e){var t;if(!this.isClientSideRowModel)return;const{top:i,left:n}=e;null==(t=this.ctrlsService.getGridBodyCtrl())||t.getScrollFeature().setScrollPosition(i,n)}getSideBarState(){var e,t;return null==(t=null==(e=this.sideBarService)?void 0:e.getSideBarComp())?void 0:t.getState()}getFocusedCellState(){if(!this.isClientSideRowModel)return;const e=this.focusService.getFocusedCell();if(e){const{column:t,rowIndex:i,rowPinned:n}=e;return{colId:t.getColId(),rowIndex:i,rowPinned:n}}}setFocusedCellState(e){if(!this.isClientSideRowModel)return;const{colId:t,rowIndex:i,rowPinned:n}=e;this.focusService.setFocusedCell({column:this.columnModel.getGridColumn(t),rowIndex:i,rowPinned:n,forceBrowserFocus:!0,preventScrollOnBrowserFocus:!0})}getPaginationState(){const e=this.paginationProxy.getCurrentPage(),t=this.gos.get("paginationAutoPageSize")?void 0:this.paginationProxy.getPageSize();if(e||t)return{page:e,pageSize:t}}setPaginationState(e){e.pageSize&&!this.gos.get("paginationAutoPageSize")&&this.paginationProxy.setPageSize(e.pageSize,"initialState"),"number"==typeof e.page&&this.paginationProxy.setPage(e.page)}getRowSelectionState(){var e;const t=this.selectionService.getSelectionState();return t&&(Array.isArray(t)||!1!==t.selectAll&&!1!==t.selectAllChildren||(null==(e=null==t?void 0:t.toggledNodes)?void 0:e.length))?t:void 0}setRowSelectionState(e){this.selectionService.setSelectionState(e,"gridInitializing")}getRowGroupExpansionState(){const e=this.expansionService.getExpandedRows();return e.length?{expandedRowGroupIds:e}:void 0}setRowGroupExpansionState(e){this.expansionService.expandRows(e.expandedRowGroupIds)}updateColumnState(e){const t=this.getColumnState();let i=!1;Object.entries(t).forEach(([e,t])=>{M(t,this.cachedState[e])||(i=!0)}),this.cachedState=d(d({},this.cachedState),t),i&&this.dispatchStateUpdateEvent(e)}updateCachedState(e,t){const i=this.cachedState[e];this.setCachedStateValue(e,t),M(t,i)||this.dispatchStateUpdateEvent([e])}setCachedStateValue(e,t){this.cachedState=u(d({},this.cachedState),{[e]:t})}refreshStaleState(){this.staleStateKeys.forEach(e=>{"rowSelection"===e&&this.setCachedStateValue(e,this.getRowSelectionState())}),this.staleStateKeys.clear()}dispatchStateUpdateEvent(e){this.suppressEvents||(e.forEach(e=>this.queuedUpdateSources.add(e)),this.dispatchStateUpdateEventDebounced())}dispatchQueuedStateUpdateEvents(){const e=Array.from(this.queuedUpdateSources);this.queuedUpdateSources.clear();const t={type:lt.EVENT_STATE_UPDATED,sources:e,state:this.cachedState};this.eventService.dispatchEvent(t)}suppressEventsAndDispatchInitEvent(e){this.suppressEvents=!0,this.columnAnimationService.setSuppressAnimation(!0),e(),setTimeout(()=>{this.suppressEvents=!1,this.queuedUpdateSources.clear(),this.isAlive()&&(this.columnAnimationService.setSuppressAnimation(!1),this.dispatchStateUpdateEvent(["gridInitializing"]))})}};g([he("filterManager")],Rh.prototype,"filterManager",2),g([he("ctrlsService")],Rh.prototype,"ctrlsService",2),g([he("focusService")],Rh.prototype,"focusService",2),g([he("columnModel")],Rh.prototype,"columnModel",2),g([he("paginationProxy")],Rh.prototype,"paginationProxy",2),g([he("rowModel")],Rh.prototype,"rowModel",2),g([he("selectionService")],Rh.prototype,"selectionService",2),g([he("expansionService")],Rh.prototype,"expansionService",2),g([he("columnAnimationService")],Rh.prototype,"columnAnimationService",2),g([de("sideBarService")],Rh.prototype,"sideBarService",2),g([de("rangeService")],Rh.prototype,"rangeService",2),g([ae],Rh.prototype,"postConstruct",1),Rh=g([ce("stateService")],Rh);var Lh=class extends nt{init(){this.processGridOptions(this.gridOptions)}processGridOptions(e){this.processOptions(e,bh)}processColumnDefs(e){this.processOptions(e,vh)}processOptions(e,t){const{validations:i,deprecations:n,allProperties:s,propertyExceptions:r,objectName:o,docsUrl:a}=t;s&&!0!==this.gridOptions.suppressPropertyNamesCheck&&this.checkProperties(e,[...null!=r?r:[],...Object.keys(n)],s,o,a);const l=new Set;Object.keys(e).forEach(t=>{var s;const r=n[t];if(r)if("renamed"in r){const{renamed:i,version:n}=r;l.add(`As of v${n}, ${String(t)} is deprecated. Please use ${String(i)} instead.`),e[i]=e[t]}else{const{message:e,version:i}=r;l.add(`As of v${i}, ${String(t)} is deprecated. ${null!=e?e:""}`)}const o=e[t];if(null==o||!1===o)return;const a=i[t];let c;if(!a)return;if("function"==typeof a){const i=a(e,this.gridOptions);if(!i)return;if("objectName"in i){const n=e[t];return Array.isArray(n)?void n.forEach(e=>{this.processOptions(e,i)}):void this.processOptions(e[t],i)}c=i}else c=a;const{module:h,dependencies:d,supportedRowModels:u}=c;if(u){const e=null!=(s=this.gridOptions.rowModelType)?s:"clientSide";if(!u.includes(e))return void l.add(`${String(t)} is not supported with the '${e}' row model.`)}if(h){const e=Array.isArray(h)?h:[h];let i=!0;if(e.forEach(e=>{se.__assertRegistered(e,String(t),this.context.getGridId())||(i=!1,l.add(`${String(t)} is only available when ${e} is loaded.`))}),!i)return}if(d){const i=this.checkForWarning(t,d,e);if(i)return void l.add(i)}}),l.size>0&&l.forEach(e=>{z(e)})}checkForWarning(e,t,i){if("function"==typeof t)return t(i,this.gridOptions);const n=Object.entries(t).find(([e,t])=>{const n=i[e];return!t.includes(n)});if(!n)return null;const[s,r]=n;return r.length>1?`'${String(e)}' requires '${s}' to be one of [${r.join(", ")}].`:`'${String(e)}' requires '${s}' to be ${r[0]}.`}checkProperties(e,t,i,n,s){const r=zn(Object.getOwnPropertyNames(e),["__ob__","__v_skip","__metadata__",...t,...i],i);if(L(r,(e,t)=>{z(`invalid ${n} property '${e}' did you mean any of these: ${t.slice(0,8).join(", ")}`)}),Object.keys(r).length>0&&s){const e=this.getFrameworkOverrides().getDocLink(s);z(`to see all the valid ${n} properties please check: ${e}`)}}};g([he("gridOptions")],Lh.prototype,"gridOptions",2),g([ae],Lh.prototype,"init",1),Lh=g([ce("validationService")],Lh);var kh=class extends nt{constructor(){super(...arguments),this.syncEventListeners=new Map,this.asyncEventListeners=new Map,this.syncGlobalEventListeners=new Set,this.globalEventListenerPairs=new Map}postConstruct(){this.frameworkEventWrappingService=new me(this.getFrameworkOverrides())}addEventListener(e,t){const i=this.frameworkEventWrappingService.wrap(t),n=this.gos.useAsyncEvents()&&!ct.has(e),s=n?this.asyncEventListeners:this.syncEventListeners;s.has(e)||s.set(e,new Set),s.get(e).add(i),this.eventService.addEventListener(e,i,n)}removeEventListener(e,t){var i;const n=this.frameworkEventWrappingService.unwrap(t),s=this.asyncEventListeners.get(e),r=!!(null==s?void 0:s.delete(n));r||null==(i=this.syncEventListeners.get(e))||i.delete(n),this.eventService.removeEventListener(e,n,r)}addGlobalListener(e){const t=this.frameworkEventWrappingService.wrapGlobal(e);if(this.gos.useAsyncEvents()){const i=(e,i)=>{ct.has(e)&&t(e,i)},n=(e,i)=>{ct.has(e)||t(e,i)};this.globalEventListenerPairs.set(e,{syncListener:i,asyncListener:n}),this.eventService.addGlobalListener(i,!1),this.eventService.addGlobalListener(n,!0)}else this.syncGlobalEventListeners.add(t),this.eventService.addGlobalListener(t,!1)}removeGlobalListener(e){const t=this.frameworkEventWrappingService.unwrapGlobal(e);if(this.globalEventListenerPairs.has(t)){const{syncListener:i,asyncListener:n}=this.globalEventListenerPairs.get(t);this.eventService.removeGlobalListener(i,!1),this.eventService.removeGlobalListener(n,!0),this.globalEventListenerPairs.delete(e)}else this.syncGlobalEventListeners.delete(t),this.eventService.removeGlobalListener(t,!1)}destroyEventListeners(e,t){e.forEach((e,i)=>{e.forEach(e=>this.eventService.removeEventListener(i,e,t)),e.clear()}),e.clear()}destroyGlobalListeners(e,t){e.forEach(e=>this.eventService.removeGlobalListener(e,t)),e.clear()}destroy(){super.destroy(),this.destroyEventListeners(this.syncEventListeners,!1),this.destroyEventListeners(this.asyncEventListeners,!0),this.destroyGlobalListeners(this.syncGlobalEventListeners,!1),this.globalEventListenerPairs.forEach(({syncListener:e,asyncListener:t})=>{this.eventService.removeGlobalListener(e,!1),this.eventService.removeGlobalListener(t,!0)}),this.globalEventListenerPairs.clear()}};g([ae],kh.prototype,"postConstruct",1),kh=g([ce("apiEventService")],kh);var Ph=class extends Cs{constructor(){super('<span class="ag-paging-page-size"></span>'),this.hasEmptyOption=!1,this.handlePageSizeItemSelected=()=>{if(!this.selectPageSizeComp)return;const e=this.selectPageSizeComp.getValue();if(!e)return;const t=Number(e);isNaN(t)||t<1||t===this.paginationProxy.getPageSize()||(this.paginationProxy.setPageSize(t,"pageSizeSelector"),this.hasEmptyOption&&this.toggleSelectDisplay(!0),this.selectPageSizeComp.getFocusableElement().focus())}}init(){this.addManagedPropertyListener("paginationPageSizeSelector",()=>{this.onPageSizeSelectorValuesChange()}),this.addManagedListener(this.eventService,lt.EVENT_PAGINATION_CHANGED,e=>this.handlePaginationChanged(e))}handlePaginationChanged(e){if(!this.selectPageSizeComp||!(null==e?void 0:e.newPageSize))return;const t=this.paginationProxy.getPageSize();this.getPageSizeSelectorValues().includes(t)?this.selectPageSizeComp.setValue(t.toString()):this.hasEmptyOption?this.selectPageSizeComp.setValue(""):this.toggleSelectDisplay(!0)}toggleSelectDisplay(e){this.selectPageSizeComp&&this.reset(),e&&(this.reloadPageSizesSelector(),this.selectPageSizeComp&&this.appendChild(this.selectPageSizeComp))}reset(){Cn(this.getGui()),this.selectPageSizeComp&&(this.destroyBean(this.selectPageSizeComp),this.selectPageSizeComp=void 0)}onPageSizeSelectorValuesChange(){this.selectPageSizeComp&&this.shouldShowPageSizeSelector()&&this.reloadPageSizesSelector()}shouldShowPageSizeSelector(){return this.gos.get("pagination")&&!this.gos.get("suppressPaginationPanel")&&!this.gos.get("paginationAutoPageSize")&&!1!==this.gos.get("paginationPageSizeSelector")}reloadPageSizesSelector(){const e=this.getPageSizeSelectorValues(),t=this.paginationProxy.getPageSize(),i=!t||!e.includes(t);i&&(e.unshift(""),z("The paginationPageSize grid option is set to a value that is not in the list of page size options.\n                Please make sure that the paginationPageSize grid option is set to one of the values in the \n                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(),s=n("pageSizeSelectorLabel","Page Size:"),r=e.map(e=>({value:String(e),text:String(e)})),o=n("ariaPageSizeSelectorLabel","Page Size");this.selectPageSizeComp=this.createManagedBean(new Bs).addOptions(r).setValue(String(i?"":t)).setAriaLabel(o).setLabel(s).onValueChange(()=>this.handlePageSizeItemSelected()),this.hasEmptyOption=i}getPageSizeSelectorValues(){const e=this.gos.get("paginationPageSizeSelector");return Array.isArray(e)&&this.validateValues(e)?[...e].sort((e,t)=>e-t):[20,50,100]}validateValues(e){if(!e.length)return z("The paginationPageSizeSelector grid option is an empty array. This is most likely a mistake.\n                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=i>0;if("number"!=typeof i)return z("The paginationPageSizeSelector grid option contains a non-numeric value.\n                    Please make sure that all values in the paginationPageSizeSelector array are numbers."),!1;if(!n)return z("The paginationPageSizeSelector grid option contains a negative number or zero.\n                    Please make sure that all values in the paginationPageSizeSelector array are positive."),!1}return!0}destroy(){this.toggleSelectDisplay(!1),super.destroy()}};g([he("paginationProxy")],Ph.prototype,"paginationProxy",2),g([ae],Ph.prototype,"init",1);var Nh=class extends nt{constructor(){super(),this.descriptionContainer=null,this.announceValue=Z(this.announceValue.bind(this),200)}postConstruct(){const e=this.gos.getDocument(),t=this.descriptionContainer=e.createElement("div");t.classList.add("ag-aria-description-container"),Yt(t,"polite"),Xt(t,"additions text"),qt(t,!0),this.eGridDiv.appendChild(t)}announceValue(e){this.descriptionContainer&&(this.descriptionContainer.textContent="",setTimeout(()=>{this.isAlive()&&this.descriptionContainer&&(this.descriptionContainer.textContent=e)},50))}destroy(){super.destroy();const{descriptionContainer:e}=this;e&&(Cn(e),e.parentElement&&e.parentElement.removeChild(e)),this.descriptionContainer=null,this.eGridDiv=null}};g([he("eGridDiv")],Nh.prototype,"eGridDiv",2),g([ae],Nh.prototype,"postConstruct",1),Nh=g([ce("ariaAnnouncementService")],Nh);var Oh=class{};function _h(e){Oh.gridOptions=e}function Fh(e,t,i){if(!t)return U("No gridOptions provided to createGrid"),{};const n=(new Bh).create(e,t,t=>{const i=new Pc(e);t.createBean(i)},void 0,i);if(!Object.isFrozen(t)&&!(null==i?void 0:i.frameworkOverrides)){const e="https://ag-grid.com/javascript-data-grid/grid-interface/#grid-api";Object.defineProperty(t,"api",{get:()=>{U(`gridOptions.api is no longer supported. See ${e}.`)},configurable:!0}),Object.defineProperty(t,"columnApi",{get:()=>{U(`gridOptions.columnApi is no longer supported and all methods moved to the grid api. See ${e}.`)},configurable:!0})}return n}Oh.gridOptions=void 0;var Gh=class{constructor(e,t,i){if(z("Since v31 new Grid(...) is deprecated. Use createGrid instead: `const gridApi = createGrid(...)`. The grid api is returned from createGrid and will not be available on gridOptions."),!t)return void U("No gridOptions provided to the grid");this.gridOptions=t;const n=(new Bh).create(e,t,t=>{const i=new Pc(e);t.createBean(i).addDestroyFunc(()=>{this.destroy()})},void 0,i);this.gridOptions.api=n,this.gridOptions.columnApi=new Tc(n)}destroy(){var e;this.gridOptions&&(null==(e=this.gridOptions.api)||e.destroy(),delete this.gridOptions.api,delete this.gridOptions.columnApi)}},Vh=1,Bh=class{create(e,t,i,n,s){var r;let o={};Oh.gridOptions?(O(o,Oh.gridOptions,!0,!0),o=d(d({},o),t)):o=t;const a=Sh.getCoercedGridOptions(o),l=!!a.debug,c=null!=(r=a.gridId)?r:String(Vh++),h=this.getRegisteredModules(s,c),u=this.createBeansList(a.rowModelType,h,c),p=this.createProvidedBeans(e,a,s);if(!u)return void U("Failed to create grid.");const g={providedBeanInstances:p,beanClasses:u,debug:l,gridId:c},f=new Lc("Context",()=>g.debug),m=new re(g,f),v=m.getBean("beans");return this.registerModuleUserComponents(v,h),this.registerStackComponents(v,h),this.registerControllers(v,h),i(m),v.syncService.start(),n&&n(m),m.getBean("gridApi")}registerControllers(e,t){t.forEach(t=>{t.controllers&&t.controllers.forEach(t=>e.ctrlsFactory.register(t))})}registerStackComponents(e,t){const i=this.createAgStackComponentsList(t);e.agStackComponentsRegistry.setupComponents(i)}getRegisteredModules(e,t){const i=e?e.modules:null,n=se.__getRegisteredModules(t),s=[],r={},o=(e,t,i)=>{var n;r[(n=t).moduleName]||(r[n.moduleName]=!0,s.push(n),se.__register(n,e,i)),t.dependantModules&&t.dependantModules.forEach(t=>o(e,t,i))};return i&&i.forEach(e=>o(!0,e,t)),n&&n.forEach(e=>o(!se.__isPackageBased(),e,void 0)),s}registerModuleUserComponents(e,t){this.extractModuleEntity(t,e=>e.userComponents?e.userComponents:[]).forEach(t=>{e.userComponentRegistry.registerDefaultComponent(t.componentName,t.componentClass)})}createProvidedBeans(e,t,i){let n=i?i.frameworkOverrides:null;C(n)&&(n=new xc);const s={gridOptions:t,eGridDiv:e,globalEventListener:i?i.globalEventListener:null,globalSyncEventListener:i?i.globalSyncEventListener:null,frameworkOverrides:n};return i&&i.providedBeanInstances&&Object.assign(s,i.providedBeanInstances),s}createAgStackComponentsList(e){let t=[{componentName:"AgCheckbox",componentClass:zs},{componentName:"AgRadioButton",componentClass:Us},{componentName:"AgToggleButton",componentClass:Ul},{componentName:"AgInputTextField",componentClass:tr},{componentName:"AgInputTextArea",componentClass:Wl},{componentName:"AgInputNumberField",componentClass:ir},{componentName:"AgInputDateField",componentClass:jl},{componentName:"AgInputRange",componentClass:Kl},{componentName:"AgRichSelect",componentClass:Xl},{componentName:"AgSelect",componentClass:Bs},{componentName:"AgSlider",componentClass:Ql},{componentName:"AgGridBody",componentClass:ka},{componentName:"AgHeaderRoot",componentClass:yl},{componentName:"AgSortIndicator",componentClass:yr},{componentName:"AgPagination",componentClass:Yc},{componentName:"AgPageSizeSelector",componentClass:Ph},{componentName:"AgOverlayWrapper",componentClass:Xc},{componentName:"AgGroupComponent",componentClass:ec},{componentName:"AgRowContainer",componentClass:Ba},{componentName:"AgFakeHorizontalScroll",componentClass:uh},{componentName:"AgFakeVerticalScroll",componentClass:Eh},{componentName:"AgAutocomplete",componentClass:vc}];const i=this.extractModuleEntity(e,e=>e.agStackComponents?e.agStackComponents:[]);return t=t.concat(i),t}createBeansList(e="clientSide",t,i){const n=t.filter(t=>!t.rowModel||t.rowModel===e),s={clientSide:"@ag-grid-community/client-side-row-model",infinite:"@ag-grid-community/infinite-row-model",serverSide:"@ag-grid-enterprise/server-side-row-model",viewport:"@ag-grid-enterprise/viewport-row-model"};if(!s[e])return void U("Could not find row model for rowModelType = "+e);if(!se.__assertRegistered(s[e],`rowModelType = '${e}'`,i))return;const r=[aa,Zc,Qc,sh,Gc,zo,uo,Hc,zc,Al,Po,Kc,Cl,wh,Lh,Ol,Go,Dt,fe,Sh,uc,Ac,Wo,Mt,fl,Hl,Pl,Ic,st,Mc,Oa,Vc,Dc,Rc,Ll,bl,Gr,Tc,Oc,Na,jc,Ec,zl,Pa,Nc,_c,Fc,$c,ut,Bc,Tl,nh,Nt,rh,oh,Bl,ah,lh,ph,gh,ch,Th,Uo,Dh,Ih,Rh,Il,kh,Nh,Rl],o=this.extractModuleEntity(n,e=>e.beans?e.beans:[]);r.push(...o);const a=[];return r.forEach(e=>{a.indexOf(e)<0&&a.push(e)}),a}extractModuleEntity(e,t){return[].concat(...e.map(t))}},Hh=class{wrap(e,t,i=[],n){const s=this.createWrapper(e,n);return t.forEach(e=>{this.createMethod(s,e,!0)}),i.forEach(e=>{this.createMethod(s,e,!1)}),s}unwrap(e){return e}createMethod(e,t,i){e.addMethod(t,this.createMethodProxy(e,t,i))}createMethodProxy(e,t,i){return function(){return e.hasMethod(t)?e.callMethod(t,arguments):(i&&console.warn("AG Grid: Framework component is missing the method "+t+"()"),null)}}},zh=class{};zh.CHART_TYPE_TO_SERIES_TYPE={column:"bar",groupedColumn:"bar",stackedColumn:"bar",normalizedColumn:"bar",bar:"bar",groupedBar:"bar",stackedBar:"bar",normalizedBar:"bar",line:"line",scatter:"scatter",bubble:"bubble",pie:"pie",donut:"donut",doughnut:"donut",area:"area",stackedArea:"area",normalizedArea:"area",histogram:"histogram",radarLine:"radar-line",radarArea:"radar-area",nightingale:"nightingale",radialColumn:"radial-column",radialBar:"radial-bar",sunburst:"sunburst",rangeBar:"range-bar",rangeArea:"range-area",boxPlot:"box-plot",treemap:"treemap",heatmap:"heatmap",waterfall:"waterfall"},zh.COMBO_CHART_TYPES=["columnLineCombo","areaColumnCombo","customCombo"],zh.SERIES_GROUP_TYPES=["grouped","stacked","normalized"];var Uh=(e=>(e.InsideBase="insideBase",e.InsideEnd="insideEnd",e.Center="center",e.OutsideEnd="outsideEnd",e))(Uh||{}),Wh=void 0===i.g?{}:i.g;Wh.HTMLElement="undefined"==typeof HTMLElement?{}:HTMLElement,Wh.HTMLButtonElement="undefined"==typeof HTMLButtonElement?{}:HTMLButtonElement,Wh.HTMLSelectElement="undefined"==typeof HTMLSelectElement?{}:HTMLSelectElement,Wh.HTMLInputElement="undefined"==typeof HTMLInputElement?{}:HTMLInputElement,Wh.Node="undefined"==typeof Node?{}:Node,Wh.MouseEvent="undefined"==typeof MouseEvent?{}:MouseEvent;var jh=class e{constructor(t,i,n,s,r,o){this.nextId=0,this.rowCountReady=!1,this.allNodesMap={},this.rootNode=t,this.gos=i,this.eventService=n,this.columnModel=s,this.beans=o,this.selectionService=r,this.rootNode.group=!0,this.rootNode.level=-1,this.rootNode.id=e.ROOT_NODE_ID,this.rootNode.allLeafChildren=[],this.rootNode.childrenAfterGroup=[],this.rootNode.childrenAfterSort=[],this.rootNode.childrenAfterAggFilter=[],this.rootNode.childrenAfterFilter=[]}getCopyOfNodesMap(){return ls.cloneObject(this.allNodesMap)}getRowNode(e){return this.allNodesMap[e]}setRowData(t){if("string"==typeof t)return void console.warn("AG Grid: rowData must be an array.");this.rowCountReady=!0,this.dispatchRowDataUpdateStartedEvent(t);const i=this.rootNode,n=this.rootNode.sibling;i.childrenAfterFilter=null,i.childrenAfterGroup=null,i.childrenAfterAggFilter=null,i.childrenAfterSort=null,i.childrenMapped=null,i.updateHasChildren(),this.nextId=0,this.allNodesMap={},t?i.allLeafChildren=t.map(t=>this.createNode(t,this.rootNode,e.TOP_LEVEL)):(i.allLeafChildren=[],i.childrenAfterGroup=[]),n&&(n.childrenAfterFilter=i.childrenAfterFilter,n.childrenAfterGroup=i.childrenAfterGroup,n.childrenAfterAggFilter=i.childrenAfterAggFilter,n.childrenAfterSort=i.childrenAfterSort,n.childrenMapped=i.childrenMapped,n.allLeafChildren=i.allLeafChildren)}updateRowData(e,t){this.rowCountReady=!0,this.dispatchRowDataUpdateStartedEvent(e.add);const i={remove:[],update:[],add:[]},n=[];return this.executeRemove(e,i,n),this.executeUpdate(e,i,n),this.executeAdd(e,i),this.updateSelection(n,"rowDataChanged"),t&&ls.sortRowNodesByOrder(this.rootNode.allLeafChildren,t),i}isRowCountReady(){return this.rowCountReady}dispatchRowDataUpdateStartedEvent(e){const t={type:lt.EVENT_ROW_DATA_UPDATE_STARTED,firstRowData:(null==e?void 0:e.length)?e[0]:null};this.eventService.dispatchEvent(t)}updateSelection(e,t){const i=e.length>0;if(i&&this.selectionService.setNodesSelected({newValue:!1,nodes:e,suppressFinishActions:!0,source:t}),this.selectionService.updateGroupsFromChildrenSelections(t),i){const e={type:lt.EVENT_SELECTION_CHANGED,source:t};this.eventService.dispatchEvent(e)}}executeAdd(t,i){var n;const{add:s,addIndex:r}=t;if(ls.missingOrEmpty(s))return;const o=s.map(t=>this.createNode(t,this.rootNode,e.TOP_LEVEL));if("number"==typeof r&&r>=0){const{allLeafChildren:e}=this.rootNode,t=e.length;let i=r;if(this.gos.get("treeData")&&r>0&&t>0)for(let s=0;s<t;s++)if((null==(n=e[s])?void 0:n.rowIndex)==r-1){i=s+1;break}const s=e.slice(0,i),a=e.slice(i,e.length);this.rootNode.allLeafChildren=[...s,...o,...a]}else this.rootNode.allLeafChildren=[...this.rootNode.allLeafChildren,...o];this.rootNode.sibling&&(this.rootNode.sibling.allLeafChildren=this.rootNode.allLeafChildren),i.add=o}executeRemove(e,t,i){const{remove:n}=e;if(ls.missingOrEmpty(n))return;const s={};n.forEach(e=>{const n=this.lookupRowNode(e);n&&(n.isSelected()&&i.push(n),n.clearRowTopAndRowIndex(),s[n.id]=!0,delete this.allNodesMap[n.id],t.remove.push(n))}),this.rootNode.allLeafChildren=this.rootNode.allLeafChildren.filter(e=>!s[e.id]),this.rootNode.sibling&&(this.rootNode.sibling.allLeafChildren=this.rootNode.allLeafChildren)}executeUpdate(t,i,n){const{update:s}=t;ls.missingOrEmpty(s)||s.forEach(t=>{const s=this.lookupRowNode(t);s&&(s.updateData(t),!s.selectable&&s.isSelected()&&n.push(s),this.setMasterForRow(s,t,e.TOP_LEVEL,!1),i.update.push(s))})}lookupRowNode(e){const t=this.gos.getCallback("getRowId");let i;if(t){const n=t({data:e,level:0});if(i=this.allNodesMap[n],!i)return console.error(`AG Grid: could not find row id=${n}, data item was not found for this id`),null}else if(i=this.rootNode.allLeafChildren.find(t=>t.data===e),!i)return console.error("AG Grid: could not find data item as object was not found",e),console.error("Consider using getRowId to help the Grid find matching row data"),null;return i||null}createNode(e,t,i){const n=new Pr(this.beans);n.group=!1,this.setMasterForRow(n,e,i,!0);const s=this.gos.get("suppressParentsInRowNodes");return t&&!s&&(n.parent=t),n.level=i,n.setDataAndId(e,this.nextId.toString()),this.allNodesMap[n.id]&&console.warn(`AG Grid: duplicate node id '${n.id}' detected from getRowId callback, this could cause issues in your grid.`),this.allNodesMap[n.id]=n,this.nextId++,n}setMasterForRow(e,t,i,n){if(this.gos.get("treeData"))e.setMaster(!1),n&&(e.expanded=!1);else{if(this.gos.get("masterDetail")){const i=this.gos.get("isRowMaster");i?e.setMaster(i(t)):e.setMaster(!0)}else e.setMaster(!1);if(n){const t=this.columnModel.getRowGroupColumns(),n=i+(t?t.length:0);e.expanded=!!e.master&&this.isExpanded(n)}}}isExpanded(e){const t=this.gos.get("groupDefaultExpanded");return-1===t||e<t}};jh.TOP_LEVEL=0,jh.ROOT_NODE_ID="ROOT_NODE_ID";var Kh=jh,$h=class extends nt{constructor(){super(...arguments),this.onRowHeightChanged_debounced=ls.debounce(this.onRowHeightChanged.bind(this),100),this.rowsToDisplay=[],this.hasStarted=!1,this.shouldSkipSettingDataOnStart=!1,this.isRefreshingModel=!1,this.rowCountReady=!1}init(){const e=this.refreshModel.bind(this,{step:"group"}),t=!this.gos.get("suppressAnimationFrame"),i=this.refreshModel.bind(this,{step:"group",afterColumnsChanged:!0,keepRenderedRows:!0,animate:t});this.addManagedListener(this.eventService,lt.EVENT_NEW_COLUMNS_LOADED,i),this.addManagedListener(this.eventService,lt.EVENT_COLUMN_ROW_GROUP_CHANGED,e),this.addManagedListener(this.eventService,lt.EVENT_COLUMN_VALUE_CHANGED,this.onValueChanged.bind(this)),this.addManagedListener(this.eventService,lt.EVENT_COLUMN_PIVOT_CHANGED,this.refreshModel.bind(this,{step:"pivot"})),this.addManagedListener(this.eventService,lt.EVENT_FILTER_CHANGED,this.onFilterChanged.bind(this)),this.addManagedListener(this.eventService,lt.EVENT_SORT_CHANGED,this.onSortChanged.bind(this)),this.addManagedListener(this.eventService,lt.EVENT_COLUMN_PIVOT_MODE_CHANGED,e),this.addManagedListener(this.eventService,lt.EVENT_GRID_STYLES_CHANGED,this.onGridStylesChanges.bind(this)),this.addManagedListener(this.eventService,lt.EVENT_GRID_READY,()=>this.onGridReady()),this.addPropertyListeners(),this.rootNode=new Pr(this.beans),this.nodeManager=new Kh(this.rootNode,this.gos,this.eventService,this.columnModel,this.selectionService,this.beans)}addPropertyListeners(){const e=new Set(["treeData","masterDetail"]),t=new Set(["suppressParentsInRowNodes","groupDefaultExpanded","groupAllowUnbalanced","initialGroupOrderComparator","groupHideOpenParents","groupDisplayType"]),i=new Set(["excludeChildrenWhenTreeDataFiltering"]),n=new Set(["removePivotHeaderRowWhenSingleValueColumn","pivotRowTotals","pivotColumnGroupTotals","suppressExpandablePivotGroups"]),s=new Set(["getGroupRowAgg","alwaysAggregateAtRootLevel","groupIncludeTotalFooter","suppressAggFilteredOnly","grandTotalRow"]),r=new Set(["postSortRows","groupDisplayType","accentedSort"]),o=new Set([]),a=new Set(["groupRemoveSingleChildren","groupRemoveLowestSingleChildren","groupIncludeFooter","groupTotalRow"]),l=[...e,...t,...i,...n,...n,...s,...r,...o,...a];this.addManagedPropertyListeners(l,l=>{var c;const h=null==(c=l.changeSet)?void 0:c.properties;if(!h)return;const d=e=>h.some(t=>e.has(t));d(e)?this.setRowData(this.rootNode.allLeafChildren.map(e=>e.data)):d(t)?this.refreshModel({step:"group"}):d(i)?this.refreshModel({step:"filter"}):d(n)?this.refreshModel({step:"pivot"}):d(s)?this.refreshModel({step:"aggregate"}):d(r)?this.refreshModel({step:"sort"}):d(o)?this.refreshModel({step:"filter_aggregates"}):d(a)&&this.refreshModel({step:"map"})}),this.addManagedPropertyListener("rowHeight",()=>this.resetRowHeights())}start(){this.hasStarted=!0,this.shouldSkipSettingDataOnStart?this.dispatchUpdateEventsAndRefresh():this.setInitialData()}setInitialData(){const e=this.gos.get("rowData");e&&(this.shouldSkipSettingDataOnStart=!0,this.setRowData(e))}ensureRowHeightsValid(e,t,i,n){let s,r=!1;do{s=!1;const o=this.getRowIndexAtPixel(e),a=this.getRowIndexAtPixel(t),l=Math.max(o,i),c=Math.min(a,n);for(let e=l;e<=c;e++){const t=this.getRow(e);if(t.rowHeightEstimated){const e=this.gos.getRowHeightForNode(t);t.setRowHeight(e.height),s=!0,r=!0}}s&&this.setRowTopAndRowIndex()}while(s);return r}setRowTopAndRowIndex(){const e=this.environment.getDefaultRowHeight();let t=0;const i=new Set,n=this.gos.isDomLayout("normal");for(let s=0;s<this.rowsToDisplay.length;s++){const r=this.rowsToDisplay[s];if(null!=r.id&&i.add(r.id),null==r.rowHeight){const t=this.gos.getRowHeightForNode(r,n,e);r.setRowHeight(t.height,t.estimated)}r.setRowTop(t),r.setRowIndex(s),t+=r.rowHeight}return i}clearRowTopAndRowIndex(e,t){const i=e.isActive(),n=e=>{e&&null!=e.id&&!t.has(e.id)&&e.clearRowTopAndRowIndex()},s=e=>{if(n(e),n(e.detailNode),n(e.sibling),e.hasChildren()&&e.childrenAfterGroup){const t=-1==e.level;i&&!t&&!e.expanded||e.childrenAfterGroup.forEach(s)}};s(this.rootNode)}ensureRowsAtPixel(e,t,i=0){const n=this.getRowIndexAtPixel(t),s=this.getRow(n),r=!this.gos.get("suppressAnimationFrame");return s!==e[0]&&(e.forEach(e=>{ls.removeFromArray(this.rootNode.allLeafChildren,e)}),e.forEach((e,t)=>{ls.insertIntoArray(this.rootNode.allLeafChildren,e,Math.max(n+i,0)+t)}),this.refreshModel({step:"group",keepRenderedRows:!0,keepEditingRows:!0,animate:r}),!0)}highlightRowAtPixel(e,t){const i=null!=t?this.getRowIndexAtPixel(t):null,n=null!=i?this.getRow(i):null;if(!n||!e||n===e||null==t)return void(this.lastHighlightedRow&&(this.lastHighlightedRow.setHighlighted(null),this.lastHighlightedRow=null));const s=this.getHighlightPosition(t,n);this.lastHighlightedRow&&this.lastHighlightedRow!==n&&(this.lastHighlightedRow.setHighlighted(null),this.lastHighlightedRow=null),n.setHighlighted(s),this.lastHighlightedRow=n}getHighlightPosition(e,t){if(!t){const i=this.getRowIndexAtPixel(e);if(!(t=this.getRow(i||0)))return 1}const{rowTop:i,rowHeight:n}=t;return e-i<n/2?0:1}getLastHighlightedRowNode(){return this.lastHighlightedRow}isLastRowIndexKnown(){return!0}getRowCount(){return this.rowsToDisplay?this.rowsToDisplay.length:0}getTopLevelRowCount(){if(this.rowsToDisplay&&this.rowsToDisplay[0]===this.rootNode)return 1;const e=this.rootNode.childrenAfterAggFilter;return e?e.length:0}getTopLevelRowDisplayedIndex(e){if(this.rowsToDisplay&&this.rowsToDisplay[0]===this.rootNode)return e;let t=this.rootNode.childrenAfterSort[e];if(this.gos.get("groupHideOpenParents"))for(;t.expanded&&t.childrenAfterSort&&t.childrenAfterSort.length>0;)t=t.childrenAfterSort[0];return t.rowIndex}getRowBounds(e){if(ls.missing(this.rowsToDisplay))return null;const t=this.rowsToDisplay[e];return t?{rowTop:t.rowTop,rowHeight:t.rowHeight}:null}onRowGroupOpened(){const e=this.gos.isAnimateRows();this.refreshModel({step:"map",keepRenderedRows:!0,animate:e})}onFilterChanged(e){if(e.afterDataChange)return;const t=this.gos.isAnimateRows(),i=0===e.columns.length||e.columns.some(e=>e.isPrimary())?"filter":"filter_aggregates";this.refreshModel({step:i,keepRenderedRows:!0,animate:t})}onSortChanged(){const e=this.gos.isAnimateRows();this.refreshModel({step:"sort",keepRenderedRows:!0,animate:e,keepEditingRows:!0})}getType(){return"clientSide"}onValueChanged(){this.columnModel.isPivotActive()?this.refreshModel({step:"pivot"}):this.refreshModel({step:"aggregate"})}createChangePath(e){const t=ls.missingOrEmpty(e),i=new Fl(!1,this.rootNode);return(t||this.gos.get("treeData"))&&i.setInactive(),i}isSuppressModelUpdateAfterUpdateTransaction(e){if(!this.gos.get("suppressModelUpdateAfterUpdateTransaction"))return!1;if(null==e.rowNodeTransactions)return!1;const t=e.rowNodeTransactions.filter(e=>null!=e.add&&e.add.length>0||null!=e.remove&&e.remove.length>0);return null==t||0==t.length}buildRefreshModelParams(e){let t="group";const i={everything:"group",group:"group",filter:"filter",map:"map",aggregate:"aggregate",sort:"sort",pivot:"pivot"};if(ls.exists(e)&&(t=i[e]),!ls.missing(t))return{step:t,keepRenderedRows:!0,keepEditingRows:!0,animate:!this.gos.get("suppressAnimationFrame")};console.error(`AG Grid: invalid step ${e}, available steps are ${Object.keys(i).join(", ")}`)}refreshModel(e){if(!this.hasStarted||this.isRefreshingModel||this.columnModel.shouldRowModelIgnoreRefresh())return;let t="object"==typeof e&&"step"in e?e:this.buildRefreshModelParams(e);if(!t)return;if(this.isSuppressModelUpdateAfterUpdateTransaction(t))return;const i=this.createChangePath(t.rowNodeTransactions);switch(this.isRefreshingModel=!0,t.step){case"group":this.doRowGrouping(t.rowNodeTransactions,t.rowNodeOrder,i,!!t.afterColumnsChanged);case"filter":this.doFilter(i);case"pivot":this.doPivot(i);case"aggregate":this.doAggregate(i);case"filter_aggregates":this.doFilterAggregates(i);case"sort":this.doSort(t.rowNodeTransactions,i);case"map":this.doRowsToDisplay()}const n=this.setRowTopAndRowIndex();this.clearRowTopAndRowIndex(i,n),this.isRefreshingModel=!1;const s={type:lt.EVENT_MODEL_UPDATED,animate:t.animate,keepRenderedRows:t.keepRenderedRows,newData:t.newData,newPage:!1,keepUndoRedoStack:t.keepUndoRedoStack};this.eventService.dispatchEvent(s)}isEmpty(){const e=ls.missing(this.rootNode.allLeafChildren)||0===this.rootNode.allLeafChildren.length;return ls.missing(this.rootNode)||e||!this.columnModel.isReady()}isRowsToRender(){return ls.exists(this.rowsToDisplay)&&this.rowsToDisplay.length>0}getNodesInRangeForSelection(e,t){let i=!t,n=!1;const s=[],r=this.gos.get("groupSelectsChildren");return this.forEachNodeAfterFilterAndSort(o=>{if(!n)if(i&&(o===t||o===e)&&(n=!0,o.group&&r))s.push(...o.allLeafChildren);else{if(!i){if(o!==t&&o!==e)return;i=!0}(!o.group||!r)&&s.push(o)}}),s}setDatasource(e){console.error("AG Grid: should never call setDatasource on clientSideRowController")}getTopLevelNodes(){return this.rootNode?this.rootNode.childrenAfterGroup:null}getRootNode(){return this.rootNode}getRow(e){return this.rowsToDisplay[e]}isRowPresent(e){return this.rowsToDisplay.indexOf(e)>=0}getRowIndexAtPixel(e){if(this.isEmpty()||0===this.rowsToDisplay.length)return-1;let t=0,i=this.rowsToDisplay.length-1;if(e<=0)return 0;if(ls.last(this.rowsToDisplay).rowTop<=e)return this.rowsToDisplay.length-1;let n=-1,s=-1;for(;;){const r=Math.floor((t+i)/2),o=this.rowsToDisplay[r];if(this.isRowInPixel(o,e))return r;if(o.rowTop<e?t=r+1:o.rowTop>e&&(i=r-1),n===t&&s===i)return r;n=t,s=i}}isRowInPixel(e,t){const i=e.rowTop,n=e.rowTop+e.rowHeight;return i<=t&&n>t}forEachLeafNode(e){this.rootNode.allLeafChildren&&this.rootNode.allLeafChildren.forEach((t,i)=>e(t,i))}forEachNode(e,t=!1){this.recursivelyWalkNodesAndCallback({nodes:[...this.rootNode.childrenAfterGroup||[]],callback:e,recursionType:0,index:0,includeFooterNodes:t})}forEachNodeAfterFilter(e,t=!1){this.recursivelyWalkNodesAndCallback({nodes:[...this.rootNode.childrenAfterAggFilter||[]],callback:e,recursionType:1,index:0,includeFooterNodes:t})}forEachNodeAfterFilterAndSort(e,t=!1){this.recursivelyWalkNodesAndCallback({nodes:[...this.rootNode.childrenAfterSort||[]],callback:e,recursionType:2,index:0,includeFooterNodes:t})}forEachPivotNode(e,t=!1){this.recursivelyWalkNodesAndCallback({nodes:[this.rootNode],callback:e,recursionType:3,index:0,includeFooterNodes:t})}recursivelyWalkNodesAndCallback(e){const{nodes:t,callback:i,recursionType:n,includeFooterNodes:s}=e;let{index:r}=e;const o=e=>{var n;const o=null==(n=t[0])?void 0:n.parent;if(!o)return;const a=s&&this.gos.getGrandTotalRow(),l=this.gos.getGroupTotalRowCallback(),c=s&&l({node:o});o===this.rootNode?a===e&&(o.createFooter(),i(o.sibling,r++)):c===e&&(o.createFooter(),i(o.sibling,r++))};o("top");for(let e=0;e<t.length;e++){const o=t[e];if(i(o,r++),o.hasChildren()&&!o.footer){let e=null;switch(n){case 0:e=o.childrenAfterGroup;break;case 1:e=o.childrenAfterAggFilter;break;case 2:e=o.childrenAfterSort;break;case 3:e=o.leafGroup?null:o.childrenAfterSort}e&&(r=this.recursivelyWalkNodesAndCallback({nodes:[...e],callback:i,recursionType:n,index:r,includeFooterNodes:s}))}}return o("bottom"),r}doAggregate(e){var t;null==(t=this.aggregationStage)||t.execute({rowNode:this.rootNode,changedPath:e})}doFilterAggregates(e){this.filterAggregatesStage?this.filterAggregatesStage.execute({rowNode:this.rootNode,changedPath:e}):this.rootNode.childrenAfterAggFilter=this.rootNode.childrenAfterFilter}expandOrCollapseAll(e){const t=this.gos.get("treeData"),i=this.columnModel.isPivotActive(),n=s=>{s&&s.forEach(s=>{const r=()=>{s.expanded=e,n(s.childrenAfterGroup)};t?ls.exists(s.childrenAfterGroup)&&r():i?!s.leafGroup&&r():s.group&&r()})};this.rootNode&&n(this.rootNode.childrenAfterGroup),this.refreshModel({step:"map"});const s=e?"expandAll":"collapseAll",r={type:lt.EVENT_EXPAND_COLLAPSE_ALL,source:s};this.eventService.dispatchEvent(r)}doSort(e,t){this.sortStage.execute({rowNode:this.rootNode,rowNodeTransactions:e,changedPath:t})}doRowGrouping(e,t,i,n){if(this.groupStage){if(e?this.groupStage.execute({rowNode:this.rootNode,rowNodeTransactions:e,rowNodeOrder:t,changedPath:i}):this.groupStage.execute({rowNode:this.rootNode,changedPath:i,afterColumnsChanged:n}),this.gos.get("groupSelectsChildren")&&this.selectionService.updateGroupsFromChildrenSelections("rowGroupChanged",i)){const e={type:lt.EVENT_SELECTION_CHANGED,source:"rowGroupChanged"};this.eventService.dispatchEvent(e)}}else this.rootNode.childrenAfterGroup=this.rootNode.allLeafChildren,this.rootNode.sibling&&(this.rootNode.sibling.childrenAfterGroup=this.rootNode.childrenAfterGroup),this.rootNode.updateHasChildren();this.nodeManager.isRowCountReady()&&(this.rowCountReady=!0,this.eventService.dispatchEventOnce({type:lt.EVENT_ROW_COUNT_READY}))}doFilter(e){this.filterStage.execute({rowNode:this.rootNode,changedPath:e})}doPivot(e){var t;null==(t=this.pivotStage)||t.execute({rowNode:this.rootNode,changedPath:e})}getCopyOfNodesMap(){return this.nodeManager.getCopyOfNodesMap()}getRowNode(e){if("string"==typeof e&&0==e.indexOf(Pr.ID_PREFIX_ROW_GROUP)){let t;return this.forEachNode(i=>{i.id===e&&(t=i)}),t}return this.nodeManager.getRowNode(e)}setRowData(e){this.selectionService.reset("rowDataChanged"),this.nodeManager.setRowData(e),this.hasStarted&&this.dispatchUpdateEventsAndRefresh()}dispatchUpdateEventsAndRefresh(){const e={type:lt.EVENT_ROW_DATA_UPDATED};this.eventService.dispatchEvent(e),this.refreshModel({step:"group",newData:!0})}batchUpdateRowData(e,t){if(null==this.applyAsyncTransactionsTimeout){this.rowDataTransactionBatch=[];const e=this.gos.getAsyncTransactionWaitMillis();this.applyAsyncTransactionsTimeout=window.setTimeout(()=>{this.executeBatchUpdateRowData()},e)}this.rowDataTransactionBatch.push({rowDataTransaction:e,callback:t})}flushAsyncTransactions(){null!=this.applyAsyncTransactionsTimeout&&(clearTimeout(this.applyAsyncTransactionsTimeout),this.executeBatchUpdateRowData())}executeBatchUpdateRowData(){this.valueCache.onDataChanged();const e=[],t=[];let i=!1;if(this.rowDataTransactionBatch&&this.rowDataTransactionBatch.forEach(n=>{const s=this.nodeManager.updateRowData(n.rowDataTransaction,void 0);t.push(s),n.callback&&e.push(n.callback.bind(null,s)),"number"==typeof n.rowDataTransaction.addIndex&&(i=!0)}),this.commonUpdateRowData(t,void 0,i),e.length>0&&window.setTimeout(()=>{e.forEach(e=>e())},0),t.length>0){const e={type:lt.EVENT_ASYNC_TRANSACTIONS_FLUSHED,results:t};this.eventService.dispatchEvent(e)}this.rowDataTransactionBatch=null,this.applyAsyncTransactionsTimeout=void 0}updateRowData(e,t){this.valueCache.onDataChanged();const i=this.nodeManager.updateRowData(e,t),n="number"==typeof e.addIndex;return this.commonUpdateRowData([i],t,n),i}createRowNodeOrder(){if(this.gos.get("suppressMaintainUnsortedOrder"))return;const e={};if(this.rootNode&&this.rootNode.allLeafChildren)for(let t=0;t<this.rootNode.allLeafChildren.length;t++)e[this.rootNode.allLeafChildren[t].id]=t;return e}commonUpdateRowData(e,t,i){if(!this.hasStarted)return;const n=!this.gos.get("suppressAnimationFrame");i&&(t=this.createRowNodeOrder());const s={type:lt.EVENT_ROW_DATA_UPDATED};this.eventService.dispatchEvent(s),this.refreshModel({step:"group",rowNodeTransactions:e,rowNodeOrder:t,keepRenderedRows:!0,keepEditingRows:!0,animate:n})}doRowsToDisplay(){this.rowsToDisplay=this.flattenStage.execute({rowNode:this.rootNode})}onRowHeightChanged(){this.refreshModel({step:"map",keepRenderedRows:!0,keepEditingRows:!0,keepUndoRedoStack:!0})}onRowHeightChangedDebounced(){this.onRowHeightChanged_debounced()}resetRowHeights(){const e=this.resetRowHeightsForAllRowNodes();this.rootNode.setRowHeight(this.rootNode.rowHeight,!0),this.rootNode.sibling&&this.rootNode.sibling.setRowHeight(this.rootNode.sibling.rowHeight,!0),e&&this.onRowHeightChanged()}resetRowHeightsForAllRowNodes(){let e=!1;return this.forEachNode(t=>{t.setRowHeight(t.rowHeight,!0);const i=t.detailNode;i&&i.setRowHeight(i.rowHeight,!0),t.sibling&&t.sibling.setRowHeight(t.sibling.rowHeight,!0),e=!0}),e}onGridStylesChanges(){this.columnModel.isAutoRowHeightActive()||this.resetRowHeights()}onGridReady(){this.hasStarted||this.setInitialData()}isRowDataLoaded(){return this.rowCountReady}};g([he("columnModel")],$h.prototype,"columnModel",2),g([he("selectionService")],$h.prototype,"selectionService",2),g([he("valueCache")],$h.prototype,"valueCache",2),g([he("beans")],$h.prototype,"beans",2),g([he("filterStage")],$h.prototype,"filterStage",2),g([he("sortStage")],$h.prototype,"sortStage",2),g([he("flattenStage")],$h.prototype,"flattenStage",2),g([de("groupStage")],$h.prototype,"groupStage",2),g([de("aggregationStage")],$h.prototype,"aggregationStage",2),g([de("pivotStage")],$h.prototype,"pivotStage",2),g([de("filterAggregatesStage")],$h.prototype,"filterAggregatesStage",2),g([ae],$h.prototype,"init",1),$h=g([ce("rowModel")],$h);var Yh=class extends nt{execute(e){const{changedPath:t}=e;this.filterService.filter(t)}};g([he("filterService")],Yh.prototype,"filterService",2),Yh=g([ce("filterStage")],Yh);var qh=class extends nt{execute(e){const t=this.sortController.getSortOptions(),i=ls.exists(t)&&t.length>0,n=i&&ls.exists(e.rowNodeTransactions)&&this.gos.get("deltaSort"),s=t.some(e=>this.gos.isColumnsSortingCoupledToGroup()?e.column.isPrimary()&&e.column.isRowGroupActive():!!e.column.getColDef().showRowGroup);this.sortService.sort(t,i,n,e.rowNodeTransactions,e.changedPath,s)}};g([he("sortService")],qh.prototype,"sortService",2),g([he("sortController")],qh.prototype,"sortController",2),qh=g([ce("sortStage")],qh);var Xh=class extends nt{execute(e){const t=e.rowNode,i=[],n=this.beans.columnModel.isPivotMode(),s=n&&t.leafGroup,r=s?[t]:t.childrenAfterSort,o=this.getFlattenDetails();if(this.recursivelyAddToRowsToDisplay(o,r,i,n,0),!s&&i.length>0&&o.grandTotalRow){t.createFooter();const e="top"===o.grandTotalRow;this.addRowNodeToRowsToDisplay(o,t.sibling,i,0,e)}return i}getFlattenDetails(){const e=this.gos.get("groupRemoveSingleChildren");return{groupRemoveLowestSingleChildren:!e&&this.gos.get("groupRemoveLowestSingleChildren"),groupRemoveSingleChildren:e,isGroupMultiAutoColumn:this.gos.isGroupMultiAutoColumn(),hideOpenParents:this.gos.get("groupHideOpenParents"),grandTotalRow:this.gos.getGrandTotalRow(),groupTotalRow:this.gos.getGroupTotalRowCallback()}}recursivelyAddToRowsToDisplay(e,t,i,n,s){if(!ls.missingOrEmpty(t))for(let r=0;r<t.length;r++){const o=t[r],a=o.hasChildren(),l=n&&!a,c=e.groupRemoveSingleChildren&&a&&1===o.childrenAfterGroup.length,h=e.groupRemoveLowestSingleChildren&&a&&o.leafGroup&&1===o.childrenAfterGroup.length,d=n&&o.leafGroup,u=e.hideOpenParents&&o.expanded&&!o.master&&!d;if(!(l||u||c||h)&&this.addRowNodeToRowsToDisplay(e,o,i,s),!n||!o.leafGroup)if(a){const t=c||h;if(o.expanded||t){const r=e.groupTotalRow({node:o});r||o.destroyFooter();const a=t?s:s+1;"top"===r&&(o.createFooter(),this.addRowNodeToRowsToDisplay(e,o.sibling,i,a)),this.recursivelyAddToRowsToDisplay(e,o.childrenAfterSort,i,n,a),"bottom"===r&&(o.createFooter(),this.addRowNodeToRowsToDisplay(e,o.sibling,i,a))}}else if(o.master&&o.expanded){const t=this.createDetailNode(o);this.addRowNodeToRowsToDisplay(e,t,i,s)}}}addRowNodeToRowsToDisplay(e,t,i,n,s){s?i.unshift(t):i.push(t),t.setUiLevel(e.isGroupMultiAutoColumn?0:n)}createDetailNode(e){if(ls.exists(e.detailNode))return e.detailNode;const t=new Pr(this.beans);return t.detail=!0,t.selectable=!1,t.parent=e,ls.exists(e.id)&&(t.id="detail_"+e.id),t.data=e.data,t.level=e.level+1,e.detailNode=t,t}};g([he("beans")],Xh.prototype,"beans",2),Xh=g([ce("flattenStage")],Xh);var Zh=class extends nt{sort(e,t,i,n,s,r){const o=this.gos.get("groupMaintainOrder"),a=this.columnModel.getAllGridColumns().some(e=>e.isRowGroupActive());let l={};i&&n&&(l=this.calculateDirtyNodes(n));const c=this.columnModel.isPivotMode(),h=this.gos.getCallback("postSortRows");s&&s.forEachChangedNodeDepthFirst(n=>{var d;this.pullDownGroupDataForHideOpenParents(n.childrenAfterAggFilter,!0);const u=c&&n.leafGroup;if(o&&a&&!n.leafGroup&&!r){const e=null==(d=this.columnModel.getRowGroupColumns())?void 0:d[n.level+1],t=null===(null==e?void 0:e.getSort()),i=n.childrenAfterAggFilter.slice(0);if(n.childrenAfterSort&&!t){const e={};n.childrenAfterSort.forEach((t,i)=>{e[t.id]=i}),i.sort((t,i)=>{var n,s;return(null!=(n=e[t.id])?n:0)-(null!=(s=e[i.id])?s:0)})}n.childrenAfterSort=i}else n.childrenAfterSort=!t||u?n.childrenAfterAggFilter.slice(0):i?this.doDeltaSort(n,l,s,e):this.rowNodeSorter.doFullSort(n.childrenAfterAggFilter,e);if(n.sibling&&(n.sibling.childrenAfterSort=n.childrenAfterSort),this.updateChildIndexes(n),h){const e={nodes:n.childrenAfterSort};h(e)}}),this.updateGroupDataForHideOpenParents(s)}calculateDirtyNodes(e){const t={},i=e=>{e&&e.forEach(e=>t[e.id]=!0)};return e&&e.forEach(e=>{i(e.add),i(e.update),i(e.remove)}),t}doDeltaSort(e,t,i,n){const s=e.childrenAfterAggFilter,r=e.childrenAfterSort;if(!r)return this.rowNodeSorter.doFullSort(s,n);const o={},a=[];s.forEach(e=>{t[e.id]||!i.canSkip(e)?a.push(e):o[e.id]=!0});const l=r.filter(e=>o[e.id]),c=(e,t)=>({currentPos:t,rowNode:e}),h=a.map(c).sort((e,t)=>this.rowNodeSorter.compareRowNodes(n,e,t));return this.mergeSortedArrays(n,h,l.map(c)).map(({rowNode:e})=>e)}mergeSortedArrays(e,t,i){const n=[];let s=0,r=0;for(;s<t.length&&r<i.length;)this.rowNodeSorter.compareRowNodes(e,t[s],i[r])<0?n.push(t[s++]):n.push(i[r++]);for(;s<t.length;)n.push(t[s++]);for(;r<i.length;)n.push(i[r++]);return n}updateChildIndexes(e){if(ls.missing(e.childrenAfterSort))return;const t=e.childrenAfterSort;for(let i=0;i<t.length;i++){const n=t[i],s=0===i,r=i===e.childrenAfterSort.length-1;n.setFirstChild(s),n.setLastChild(r),n.setChildIndex(i)}}updateGroupDataForHideOpenParents(e){if(!this.gos.get("groupHideOpenParents"))return;if(this.gos.get("treeData"))return ls.warnOnce("The property hideOpenParents dose not work with Tree Data. This is because Tree Data has values at the group level, it doesn't make sense to hide them."),!1;const t=e=>{this.pullDownGroupDataForHideOpenParents(e.childrenAfterSort,!1),e.childrenAfterSort.forEach(e=>{e.hasChildren()&&t(e)})};e&&e.executeFromRootNode(e=>t(e))}pullDownGroupDataForHideOpenParents(e,t){this.gos.get("groupHideOpenParents")&&!ls.missing(e)&&e.forEach(e=>{this.columnModel.getGroupDisplayColumns().forEach(i=>{const n=i.getColDef().showRowGroup;if("string"!=typeof n)return void console.error("AG Grid: groupHideOpenParents only works when specifying specific columns for colDef.showRowGroup");const s=n,r=this.columnModel.getPrimaryColumn(s);if(r!==e.rowGroupColumn)if(t)e.setGroupValue(i.getId(),void 0);else{const t=e.getFirstChildOfFirstChild(r);t&&e.setGroupValue(i.getId(),t.key)}})})}};g([he("columnModel")],Zh.prototype,"columnModel",2),g([he("rowNodeSorter")],Zh.prototype,"rowNodeSorter",2),Zh=g([ce("sortService")],Zh);var Qh=class extends nt{filter(e){const t=this.filterManager.isChildFilterPresent();this.filterNodes(t,e)}filterNodes(e,t){const i=(t,i)=>{t.hasChildren()?t.childrenAfterFilter=e&&!i?t.childrenAfterGroup.filter(e=>{const t=e.childrenAfterFilter&&e.childrenAfterFilter.length>0,i=e.data&&this.filterManager.doesRowPassFilter({rowNode:e});return t||i}):t.childrenAfterGroup:t.childrenAfterFilter=t.childrenAfterGroup,t.sibling&&(t.sibling.childrenAfterFilter=t.childrenAfterFilter)};if(this.doingTreeDataFiltering()){const e=(t,n)=>{if(t.childrenAfterGroup)for(let s=0;s<t.childrenAfterGroup.length;s++){const r=t.childrenAfterGroup[s],o=n||this.filterManager.doesRowPassFilter({rowNode:r});r.childrenAfterGroup?e(t.childrenAfterGroup[s],o):i(r,o)}i(t,n)},n=t=>e(t,!1);t.executeFromRootNode(n)}else{const e=e=>i(e,!1);t.forEachChangedNodeDepthFirst(e,!0)}}doingTreeDataFiltering(){return this.gos.get("treeData")&&!this.gos.get("excludeChildrenWhenTreeDataFiltering")}};g([he("filterManager")],Qh.prototype,"filterManager",2),Qh=g([ce("filterService")],Qh);var Jh=class extends nt{postConstruct(){"clientSide"===this.rowModel.getType()&&(this.clientSideRowModel=this.rowModel,this.addManagedPropertyListener("rowData",()=>this.onRowDataUpdated()))}isActive(){const e=this.gos.exists("getRowId");return!this.gos.get("resetRowDataOnUpdate")&&e}setRowData(e){const t=this.createTransactionForRowData(e);if(!t)return;const[i,n]=t;this.clientSideRowModel.updateRowData(i,n)}createTransactionForRowData(e){if(ls.missing(this.clientSideRowModel))return void console.error("AG Grid: ImmutableService only works with ClientSideRowModel");const t=this.gos.getCallback("getRowId");if(null==t)return void console.error("AG Grid: ImmutableService requires getRowId() callback to be implemented, your row data needs IDs!");const i={remove:[],update:[],add:[]},n=this.clientSideRowModel.getCopyOfNodesMap(),s=this.gos.get("suppressMaintainUnsortedOrder")?void 0:{};return ls.exists(e)&&e.forEach((e,r)=>{const o=t({data:e,level:0}),a=n[o];s&&(s[o]=r),a?(a.data!==e&&i.update.push(e),n[o]=void 0):i.add.push(e)}),ls.iterateObject(n,(e,t)=>{t&&i.remove.push(t.data)}),[i,s]}onRowDataUpdated(){const e=this.gos.get("rowData");e&&(this.isActive()?this.setRowData(e):(this.selectionService.reset("rowDataChanged"),this.clientSideRowModel.setRowData(e)))}};g([he("rowModel")],Jh.prototype,"rowModel",2),g([he("rowRenderer")],Jh.prototype,"rowRenderer",2),g([he("selectionService")],Jh.prototype,"selectionService",2),g([ae],Jh.prototype,"postConstruct",1);var ed={version:"31.3.4",moduleName:"@ag-grid-community/client-side-row-model",rowModel:"clientSide",beans:[$h,Yh,qh,Xh,Zh,Qh,Jh=g([ce("immutableService")],Jh)]},td=Object.defineProperty,id=Object.getOwnPropertyDescriptor,nd=(e,t,i,n)=>{for(var s,r=n>1?void 0:n?id(t,i):t,o=e.length-1;o>=0;o--)(s=e[o])&&(r=(n?s(t,i,r):s(r))||r);return n&&r&&td(t,i,r),r},sd=class extends Vl{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){ls.exists(t)?e.setDataAndId(t,i.toString()):e.setDataAndId(void 0,void 0)}loadFromDatasource(){const e=this.createLoadParams();ls.missing(this.params.datasource.getRows)?console.warn("AG Grid: datasource is missing getRows method"):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.gos.getGridCommonParams().context}}forEachNode(e,t,i){this.rowNodes.forEach((n,s)=>{this.startRow+s<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 Pr(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((t,i)=>{const n=e.rowData?e.rowData[i]:void 0;!t.id&&t.alreadyRendered&&n&&(this.rowNodes[i]=new Pr(this.beans),this.rowNodes[i].setRowIndex(t.rowIndex),this.rowNodes[i].setRowTop(t.rowTop),this.rowNodes[i].setRowHeight(t.rowHeight),t.clearRowTopAndRowIndex()),this.setDataAndId(this.rowNodes[i],n,this.startRow+i)});const t=null!=e.rowCount&&e.rowCount>=0?e.rowCount:void 0;this.parentCache.pageLoaded(this,t)}destroyRowNodes(){this.rowNodes.forEach(e=>{e.clearRowTopAndRowIndex()})}};nd([he("beans")],sd.prototype,"beans",2),nd([ae],sd.prototype,"postConstruct",1),nd([le],sd.prototype,"destroyRowNodes",1);var rd,od=class e extends nt{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 sd(e,this,this.params));return this.blocks[t.getId()]=t,this.blockCount++,this.purgeBlocksIfNeeded(t),this.params.rowNodeBlockLoader.addBlock(t),t}refreshCache(){0==this.blockCount?this.purgeCache():(this.getBlocksInOrder().forEach(e=>e.setStateWaitingToLoad()),this.params.rowNodeBlockLoader.checkBlockToLoad())}destroyAllBlocks(){this.getBlocksInOrder().forEach(e=>this.destroyBlock(e))}getRowCount(){return this.rowCount}isLastRowIndexKnown(){return this.lastRowIndexKnown}pageLoaded(e,t){this.isAlive()&&(this.logger.log(`onPageLoaded: page = ${e.getId()}, lastRow = ${t}`),this.checkRowCount(e,t),this.onCacheUpdated())}purgeBlocksIfNeeded(t){const i=this.getBlocksInOrder().filter(e=>e!=t);i.sort((e,t)=>t.getLastAccessed()-e.getLastAccessed());const n=this.params.maxBlocksInCache>0,s=n?this.params.maxBlocksInCache-1:null,r=e.MAX_EMPTY_BLOCKS_TO_KEEP-1;i.forEach((e,t)=>{if(e.getState()===sd.STATE_WAITING_TO_LOAD&&t>=r||n&&t>=s){if(this.isBlockCurrentlyDisplayed(e))return;if(this.isBlockFocused(e))return;this.removeBlockFromCache(e)}})}isBlockFocused(e){const t=this.focusService.getFocusCellToUseAfterRefresh();if(!t)return!1;if(null!=t.rowPinned)return!1;const i=e.getStartRow(),n=e.getEndRow();return t.rowIndex>=i&&t.rowIndex<n}isBlockCurrentlyDisplayed(e){const t=e.getStartRow(),i=e.getEndRow()-1;return this.rowRenderer.isRangeInRenderedViewport(t,i)}removeBlockFromCache(e){e&&this.destroyBlock(e)}checkRowCount(e,t){if("number"==typeof t&&t>=0)this.rowCount=t,this.lastRowIndexKnown=!0;else if(!this.lastRowIndexKnown){const t=(e.getId()+1)*this.params.blockSize+this.params.overflowSize;this.rowCount<t&&(this.rowCount=t)}}setRowCount(e,t){this.rowCount=e,ls.exists(t)&&(this.lastRowIndexKnown=t),this.lastRowIndexKnown||this.rowCount%this.params.blockSize===0&&this.rowCount++,this.onCacheUpdated()}forEachNodeDeep(e){const t=new cs;this.getBlocksInOrder().forEach(i=>i.forEachNode(e,t,this.rowCount))}getBlocksInOrder(){return ls.getAllValuesInObject(this.blocks).sort((e,t)=>e.getId()-t.getId())}destroyBlock(e){delete this.blocks[e.getId()],this.destroyBean(e),this.blockCount--,this.params.rowNodeBlockLoader.removeBlock(e)}onCacheUpdated(){if(this.isAlive()){this.destroyAllBlocksPastVirtualRowCount();const e={type:lt.EVENT_STORE_UPDATED};this.eventService.dispatchEvent(e)}}destroyAllBlocksPastVirtualRowCount(){const e=[];this.getBlocksInOrder().forEach(t=>{t.getId()*this.params.blockSize>=this.rowCount&&e.push(t)}),e.length>0&&e.forEach(e=>this.destroyBlock(e))}purgeCache(){this.getBlocksInOrder().forEach(e=>this.removeBlockFromCache(e)),this.lastRowIndexKnown=!1,0===this.rowCount&&(this.rowCount=this.params.initialRowCount),this.onCacheUpdated()}getRowNodesInRange(e,t){const i=[];let n=-1,s=!1;const r=new cs;ls.missing(e)&&(s=!0);let o=!1;return this.getBlocksInOrder().forEach(a=>{o||(s&&n+1!==a.getId()?o=!0:(n=a.getId(),a.forEachNode(n=>{const r=n===e||n===t;(s||r)&&i.push(n),r&&(s=!s)},r,this.rowCount)))}),o||s?[]:i}};od.MAX_EMPTY_BLOCKS_TO_KEEP=2,nd([he("rowRenderer")],od.prototype,"rowRenderer",2),nd([he("focusService")],od.prototype,"focusService",2),nd([(rd=pe("loggerFactory"),(e,t)=>rd(e,t,0))],od.prototype,"setBeans",1),nd([le],od.prototype,"destroyAllBlocks",1);var ad=od,ld=class extends nt{getRowBounds(e){return{rowHeight:this.rowHeight,rowTop:this.rowHeight*e}}ensureRowHeightsValid(e,t,i,n){return!1}init(){this.gos.isRowModelType("infinite")&&(this.rowHeight=this.gos.getRowHeightAsNumber(),this.addEventListeners(),this.addDestroyFunc(()=>this.destroyCache()),this.verifyProps())}verifyProps(){this.gos.exists("initialGroupOrderComparator")&&ls.warnOnce("initialGroupOrderComparator cannot be used with Infinite Row Model as sorting is done on the server side")}start(){this.setDatasource(this.gos.get("datasource"))}destroyDatasource(){this.datasource&&(this.getContext().destroyBean(this.datasource),this.rowRenderer.datasourceChanged(),this.datasource=null)}addEventListeners(){this.addManagedListener(this.eventService,lt.EVENT_FILTER_CHANGED,this.onFilterChanged.bind(this)),this.addManagedListener(this.eventService,lt.EVENT_SORT_CHANGED,this.onSortChanged.bind(this)),this.addManagedListener(this.eventService,lt.EVENT_NEW_COLUMNS_LOADED,this.onColumnEverything.bind(this)),this.addManagedListener(this.eventService,lt.EVENT_STORE_UPDATED,this.onCacheUpdated.bind(this)),this.addManagedPropertyListener("datasource",()=>this.setDatasource(this.gos.get("datasource"))),this.addManagedPropertyListener("cacheBlockSize",()=>this.resetCache()),this.addManagedPropertyListener("rowHeight",()=>{this.rowHeight=this.gos.getRowHeightAsNumber(),this.cacheParams.rowHeight=this.rowHeight,this.updateRowHeights()})}onFilterChanged(){this.reset()}onSortChanged(){this.reset()}onColumnEverything(){let e;e=!this.cacheParams||this.isSortModelDifferent(),e&&this.reset()}isSortModelDifferent(){return!ls.jsonEquals(this.cacheParams.sortModel,this.sortController.getSortModel())}getType(){return"infinite"}setDatasource(e){this.destroyDatasource(),this.datasource=e,e&&this.reset()}isEmpty(){return!this.infiniteCache}isRowsToRender(){return!!this.infiniteCache}getNodesInRangeForSelection(e,t){return this.infiniteCache?this.infiniteCache.getRowNodesInRange(e,t):[]}reset(){this.datasource&&(null!=this.gos.getCallback("getRowId")||this.selectionService.reset("rowDataChanged"),this.resetCache())}createModelUpdatedEvent(){return{type:lt.EVENT_MODEL_UPDATED,newPage:!1,newPageSize:!1,newData:!1,keepRenderedRows:!0,animate:!1}}resetCache(){this.destroyCache(),this.cacheParams={datasource:this.datasource,filterModel:this.filterManager.getFilterModel(),sortModel:this.sortController.getSortModel(),rowNodeBlockLoader:this.rowNodeBlockLoader,initialRowCount:this.gos.get("infiniteInitialRowCount"),maxBlocksInCache:this.gos.get("maxBlocksInCache"),rowHeight:this.gos.getRowHeightAsNumber(),overflowSize:this.gos.get("cacheOverflowSize"),blockSize:this.gos.get("cacheBlockSize"),lastAccessedSequence:new cs},this.infiniteCache=this.createBean(new ad(this.cacheParams)),this.eventService.dispatchEventOnce({type:lt.EVENT_ROW_COUNT_READY});const e=this.createModelUpdatedEvent();this.eventService.dispatchEvent(e)}updateRowHeights(){this.forEachNode(e=>{e.setRowHeight(this.rowHeight),e.setRowTop(this.rowHeight*e.rowIndex)});const e=this.createModelUpdatedEvent();this.eventService.dispatchEvent(e)}destroyCache(){this.infiniteCache&&(this.infiniteCache=this.destroyBean(this.infiniteCache))}onCacheUpdated(){const e=this.createModelUpdatedEvent();this.eventService.dispatchEvent(e)}getRow(e){if(this.infiniteCache&&!(e>=this.infiniteCache.getRowCount()))return this.infiniteCache.getRow(e)}getRowNode(e){let t;return this.forEachNode(i=>{i.id===e&&(t=i)}),t}forEachNode(e){this.infiniteCache&&this.infiniteCache.forEachNodeDeep(e)}getTopLevelRowCount(){return this.getRowCount()}getTopLevelRowDisplayedIndex(e){return e}getRowIndexAtPixel(e){if(0!==this.rowHeight){const t=Math.floor(e/this.rowHeight),i=this.getRowCount()-1;return t>i?i:t}return 0}getRowCount(){return this.infiniteCache?this.infiniteCache.getRowCount():0}isRowPresent(e){return!!this.getRowNode(e.id)}refreshCache(){this.infiniteCache&&this.infiniteCache.refreshCache()}purgeCache(){this.infiniteCache&&this.infiniteCache.purgeCache()}isLastRowIndexKnown(){return!!this.infiniteCache&&this.infiniteCache.isLastRowIndexKnown()}setRowCount(e,t){this.infiniteCache&&this.infiniteCache.setRowCount(e,t)}};nd([he("filterManager")],ld.prototype,"filterManager",2),nd([he("sortController")],ld.prototype,"sortController",2),nd([he("selectionService")],ld.prototype,"selectionService",2),nd([he("rowRenderer")],ld.prototype,"rowRenderer",2),nd([he("rowNodeBlockLoader")],ld.prototype,"rowNodeBlockLoader",2),nd([ae],ld.prototype,"init",1),nd([le],ld.prototype,"destroyDatasource",1);var cd={version:"31.3.4",moduleName:"@ag-grid-community/infinite-row-model",rowModel:"infinite",beans:[ld=nd([ce("rowModel")],ld)]},hd=Object.defineProperty,dd=Object.defineProperties,ud=Object.getOwnPropertyDescriptor,pd=Object.getOwnPropertyDescriptors,gd=Object.getOwnPropertySymbols,fd=Object.prototype.hasOwnProperty,md=Object.prototype.propertyIsEnumerable,vd=(e,t,i)=>t in e?hd(e,t,{enumerable:!0,configurable:!0,writable:!0,value:i}):e[t]=i,yd=(e,t)=>{for(var i in t||(t={}))fd.call(t,i)&&vd(e,i,t[i]);if(gd)for(var i of gd(t))md.call(t,i)&&vd(e,i,t[i]);return e},Cd=(e,t)=>dd(e,pd(t)),bd=(e,t,i,n)=>{for(var s,r=n>1?void 0:n?ud(t,i):t,o=e.length-1;o>=0;o--)(s=e[o])&&(r=(n?s(t,i,r):s(r))||r);return n&&r&&hd(t,i,r),r},Sd=(e,t,i)=>new Promise((n,s)=>{var r=e=>{try{a(i.next(e))}catch(e){s(e)}},o=e=>{try{a(i.throw(e))}catch(e){s(e)}},a=e=>e.done?n(e.value):Promise.resolve(e.value).then(r,o);a((i=i.apply(e,t)).next())}),wd=class{setBeans(e){this.beans=e}getFileName(e){const t=this.getDefaultFileExtension();return null!=e&&e.length||(e=this.getDefaultFileName()),-1===e.indexOf(".")?`${e}.${t}`:e}getData(e){const t=this.createSerializingSession(e);return this.beans.gridSerializer.serialize(t,e)}getDefaultFileName(){return`export.${this.getDefaultFileExtension()}`}},xd=class{constructor(e){this.groupColumns=[];const{columnModel:t,valueService:i,gos:n,processCellCallback:s,processHeaderCallback:r,processGroupHeaderCallback:o,processRowGroupCallback:a}=e;this.columnModel=t,this.valueService=i,this.gos=n,this.processCellCallback=s,this.processHeaderCallback=r,this.processGroupHeaderCallback=o,this.processRowGroupCallback=a}prepare(e){this.groupColumns=e.filter(e=>!!e.getColDef().showRowGroup)}extractHeaderValue(e){const t=this.getHeaderName(this.processHeaderCallback,e);return null!=t?t:""}extractRowCellValue(e,t,i,n,s){const r=this.gos.get("groupHideOpenParents")&&!s.footer||!this.shouldRenderGroupSummaryCell(s,e,t)?this.valueService.getValue(e,s):this.createValueForGroupNode(e,s);return this.processCell({accumulatedRowIndex:i,rowNode:s,column:e,value:r,processCellCallback:this.processCellCallback,type:n})}shouldRenderGroupSummaryCell(e,t,i){var n;if(!e||!e.group)return!1;if(-1!==this.groupColumns.indexOf(t)){if(null!=(null==(n=e.groupData)?void 0:n[t.getId()]))return!0;if(this.gos.isRowModelType("serverSide")&&e.group)return!0;if(e.footer&&-1===e.level){const e=t.getColDef();return null==e||!0===e.showRowGroup||e.showRowGroup===this.columnModel.getRowGroupColumns()[0].getId()}}const s=this.gos.isGroupUseEntireRow(this.columnModel.isPivotMode());return 0===i&&s}getHeaderName(e,t){return e?e(this.gos.addGridCommonParams({column:t})):this.columnModel.getDisplayNameForColumn(t,"csv",!0)}createValueForGroupNode(e,t){if(this.processRowGroupCallback)return this.processRowGroupCallback(this.gos.addGridCommonParams({column:e,node:t}));const i=this.gos.get("treeData"),n=this.gos.get("suppressGroupMaintainValueType"),s=t=>{var s,r;if(i||n)return t.key;const o=null==(s=t.groupData)?void 0:s[e.getId()];return o&&t.rowGroupColumn&&!1!==t.rowGroupColumn.getColDef().useValueFormatterForExport&&null!=(r=this.valueService.formatValue(t.rowGroupColumn,t,o))?r:o},r=t.footer,o=[s(t)];if(!this.gos.isGroupMultiAutoColumn())for(;t.parent;)t=t.parent,o.push(s(t));const a=o.reverse().join(" -> ");return r?`Total ${a}`:a}processCell(e){var t;const{accumulatedRowIndex:i,rowNode:n,column:s,value:r,processCellCallback:o,type:a}=e;return o?{value:null!=(t=o(this.gos.addGridCommonParams({accumulatedRowIndex:i,column:s,node:n,value:r,type:a,parseValue:e=>this.valueService.parseValue(s,n,e,this.valueService.getValue(s,n)),formatValue:e=>{var t;return null!=(t=this.valueService.formatValue(s,n,e))?t:e}})))?t:""}:!1!==s.getColDef().useValueFormatterForExport?{value:null!=r?r:"",valueFormatted:this.valueService.formatValue(s,n,r)}:{value:null!=r?r:""}}},Ed=class{static download(e,t){const i=document.defaultView||window;if(!i)return void console.warn("AG Grid: There is no `window` associated with the current `document`");const n=document.createElement("a"),s=i.URL.createObjectURL(t);n.setAttribute("href",s),n.setAttribute("download",e),n.style.display="none",document.body.appendChild(n),n.dispatchEvent(new MouseEvent("click",{bubbles:!1,cancelable:!0,view:i})),document.body.removeChild(n),i.setTimeout(()=>{i.URL.revokeObjectURL(s)},0)}},Md=class extends xd{constructor(e){super(e),this.isFirstLine=!0,this.result="";const{suppressQuotes:t,columnSeparator:i}=e;this.suppressQuotes=t,this.columnSeparator=i}addCustomContent(e){e&&("string"==typeof e?(/^\s*\n/.test(e)||this.beginNewLine(),e=e.replace(/\r?\n/g,"\r\n"),this.result+=e):e.forEach(e=>{this.beginNewLine(),e.forEach((e,t)=>{0!==t&&(this.result+=this.columnSeparator),this.result+=this.putInQuotes(e.data.value||""),e.mergeAcross&&this.appendEmptyCells(e.mergeAcross)})}))}onNewHeaderGroupingRow(){return this.beginNewLine(),{onColumn:this.onNewHeaderGroupingRowColumn.bind(this)}}onNewHeaderGroupingRowColumn(e,t,i,n){0!=i&&(this.result+=this.columnSeparator),this.result+=this.putInQuotes(t),this.appendEmptyCells(n)}appendEmptyCells(e){for(let t=1;t<=e;t++)this.result+=this.columnSeparator+this.putInQuotes("")}onNewHeaderRow(){return this.beginNewLine(),{onColumn:this.onNewHeaderRowColumn.bind(this)}}onNewHeaderRowColumn(e,t){0!=t&&(this.result+=this.columnSeparator),this.result+=this.putInQuotes(this.extractHeaderValue(e))}onNewBodyRow(){return this.beginNewLine(),{onColumn:this.onNewBodyRowColumn.bind(this)}}onNewBodyRowColumn(e,t,i){var n;0!=t&&(this.result+=this.columnSeparator);const s=this.extractRowCellValue(e,t,t,"csv",i);this.result+=this.putInQuotes(null!=(n=s.valueFormatted)?n:s.value)}putInQuotes(e){if(this.suppressQuotes)return e;if(null==e)return'""';let t;return"string"==typeof e?t=e:"function"==typeof e.toString?t=e.toString():(console.warn("AG Grid: unknown value type during csv conversion"),t=""),'"'+t.replace(/"/g,'""')+'"'}parse(){return this.result}beginNewLine(){this.isFirstLine||(this.result+="\r\n"),this.isFirstLine=!1}},Ad=class extends wd{postConstruct(){this.setBeans({gridSerializer:this.gridSerializer,gos:this.gos})}getMergedParams(e){const t=this.gos.get("defaultCsvExportParams");return Object.assign({},t,e)}export(e){if(this.isExportSuppressed())return void console.warn("AG Grid: Export cancelled. Export is not allowed as per your configuration.");const t=this.getMergedParams(e),i=this.getData(t),n=new Blob(["\ufeff",i],{type:"text/plain"}),s="function"==typeof t.fileName?t.fileName(this.gos.getGridCommonParams()):t.fileName;Ed.download(this.getFileName(s),n)}exportDataAsCsv(e){this.export(e)}getDataAsCsv(e,t=!1){const i=t?Object.assign({},e):this.getMergedParams(e);return this.getData(i)}getDefaultFileExtension(){return"csv"}createSerializingSession(e){const{columnModel:t,valueService:i,gos:n}=this,{processCellCallback:s,processHeaderCallback:r,processGroupHeaderCallback:o,processRowGroupCallback:a,suppressQuotes:l,columnSeparator:c}=e;return new Md({columnModel:t,valueService:i,gos:n,processCellCallback:s||void 0,processHeaderCallback:r||void 0,processGroupHeaderCallback:o||void 0,processRowGroupCallback:a||void 0,suppressQuotes:l||!1,columnSeparator:c||","})}isExportSuppressed(){return this.gos.get("suppressCsvExport")}};bd([he("columnModel")],Ad.prototype,"columnModel",2),bd([he("valueService")],Ad.prototype,"valueService",2),bd([he("gridSerializer")],Ad.prototype,"gridSerializer",2),bd([he("gridOptionsService")],Ad.prototype,"gos",2),bd([ae],Ad.prototype,"postConstruct",1),Ad=bd([ce("csvCreator")],Ad);var Td=(e=>(e[e.HEADER_GROUPING=0]="HEADER_GROUPING",e[e.HEADER=1]="HEADER",e[e.BODY=2]="BODY",e))(Td||{}),Dd=class extends nt{serialize(e,t={}){const{allColumns:i,columnKeys:n,skipRowGroups:s}=t,r=this.getColumnsToExport(i,s,n);return ls.compose(this.prepareSession(r),this.prependContent(t),this.exportColumnGroups(t,r),this.exportHeaders(t,r),this.processPinnedTopRows(t,r),this.processRows(t,r),this.processPinnedBottomRows(t,r),this.appendContent(t))(e).parse()}processRow(e,t,i,n){const s=t.shouldRowBeSkipped||(()=>!1),r=this.gos.get("groupRemoveSingleChildren"),o=this.gos.get("groupRemoveLowestSingleChildren"),a=null!=t.rowPositions||!!t.onlySelected,l=this.gos.get("groupHideOpenParents")&&!a,c=this.columnModel.isPivotMode()?n.leafGroup:!n.group,h=!!n.footer,d=(t.skipRowGroups,o&&n.leafGroup),u=1===n.allChildrenCount&&(r||d);if(!c&&!h&&(t.skipRowGroups||u||l)||t.onlySelected&&!n.isSelected()||t.skipPinnedTop&&"top"===n.rowPinned||t.skipPinnedBottom&&"bottom"===n.rowPinned)return;if(-1===n.level&&!c&&!h)return;if(s(this.gos.addGridCommonParams({node:n})))return;const p=e.onNewBodyRow(n);if(i.forEach((e,t)=>{p.onColumn(e,t,n)}),t.getCustomContentBelowRow){const i=t.getCustomContentBelowRow(this.gos.addGridCommonParams({node:n}));i&&e.addCustomContent(i)}}appendContent(e){return t=>{const i=e.appendContent;return i&&t.addCustomContent(i),t}}prependContent(e){return t=>{const i=e.prependContent;return i&&t.addCustomContent(i),t}}prepareSession(e){return t=>(t.prepare(e),t)}exportColumnGroups(e,t){return i=>{if(!e.skipColumnGroupHeaders){const n=new ht,s=this.displayedGroupCreator.createDisplayedGroups(t,n,null);this.recursivelyAddHeaderGroups(s,i,e.processGroupHeaderCallback)}return i}}exportHeaders(e,t){return i=>{if(!e.skipColumnHeaders){const e=i.onNewHeaderRow();t.forEach((t,i)=>{e.onColumn(t,i,void 0)})}return i}}processPinnedTopRows(e,t){return i=>{const n=this.processRow.bind(this,i,e,t);return e.rowPositions?e.rowPositions.filter(e=>"top"===e.rowPinned).sort((e,t)=>e.rowIndex-t.rowIndex).map(e=>this.pinnedRowModel.getPinnedTopRow(e.rowIndex)).forEach(n):this.pinnedRowModel.forEachPinnedTopRow(n),i}}processRows(e,t){return i=>{const n=this.rowModel,s=n.getType(),r="clientSide"===s,o="serverSide"===s,a=!r&&e.onlySelected,l=this.processRow.bind(this,i,e,t),{exportedRows:c="filteredAndSorted"}=e;if(e.rowPositions)e.rowPositions.filter(e=>null==e.rowPinned).sort((e,t)=>e.rowIndex-t.rowIndex).map(e=>n.getRow(e.rowIndex)).forEach(l);else if(this.columnModel.isPivotMode())r?n.forEachPivotNode(l,!0):o?n.forEachNodeAfterFilterAndSort(l,!0):n.forEachNode(l);else if(e.onlySelectedAllPages||a){const e=this.selectionService.getSelectedNodes();this.replicateSortedOrder(e),e.forEach(l)}else"all"===c?n.forEachNode(l):r||o?n.forEachNodeAfterFilterAndSort(l,!0):n.forEachNode(l);return i}}replicateSortedOrder(e){const t=this.sortController.getSortOptions(),i=(e,n)=>{var s,r,o,a;return null!=e.rowIndex&&null!=n.rowIndex?e.rowIndex-n.rowIndex:e.level===n.level?(null==(s=e.parent)?void 0:s.id)===(null==(r=n.parent)?void 0:r.id)?this.rowNodeSorter.compareRowNodes(t,{rowNode:e,currentPos:null!=(o=e.rowIndex)?o:-1},{rowNode:n,currentPos:null!=(a=n.rowIndex)?a:-1}):i(e.parent,n.parent):e.level>n.level?i(e.parent,n):i(e,n.parent)};e.sort(i)}processPinnedBottomRows(e,t){return i=>{const n=this.processRow.bind(this,i,e,t);return e.rowPositions?e.rowPositions.filter(e=>"bottom"===e.rowPinned).sort((e,t)=>e.rowIndex-t.rowIndex).map(e=>this.pinnedRowModel.getPinnedBottomRow(e.rowIndex)).forEach(n):this.pinnedRowModel.forEachPinnedBottomRow(n),i}}getColumnsToExport(e=!1,t=!1,i){const n=this.columnModel.isPivotMode();if(i&&i.length)return this.columnModel.getGridColumns(i);const s=this.gos.get("treeData");let r=[];return r=e&&!n?this.columnModel.getAllGridColumns():this.columnModel.getAllDisplayedColumns(),t&&!s&&(r=r.filter(e=>e.getColId()!==dt)),r}recursivelyAddHeaderGroups(e,t,i){const n=[];e.forEach(e=>{const t=e;t.getChildren&&t.getChildren().forEach(e=>n.push(e))}),e.length>0&&e[0]instanceof at&&this.doAddHeaderHeader(t,e,i),n&&n.length>0&&this.recursivelyAddHeaderGroups(n,t,i)}doAddHeaderHeader(e,t,i){const n=e.onNewHeaderGroupingRow();let s=0;t.forEach(e=>{const t=e;let r;r=i?i(this.gos.addGridCommonParams({columnGroup:t})):this.columnModel.getDisplayNameForColumnGroup(t,"header");const o=t.getLeafColumns().reduce((e,t,i,n)=>{let s=ls.last(e);return"open"===t.getColumnGroupShow()?s&&null==s[1]||(s=[i],e.push(s)):s&&null==s[1]&&(s[1]=i-1),i===n.length-1&&s&&null==s[1]&&(s[1]=i),e},[]);n.onColumn(t,r||"",s++,t.getLeafColumns().length-1,o)})}};bd([he("displayedGroupCreator")],Dd.prototype,"displayedGroupCreator",2),bd([he("columnModel")],Dd.prototype,"columnModel",2),bd([he("rowModel")],Dd.prototype,"rowModel",2),bd([he("pinnedRowModel")],Dd.prototype,"pinnedRowModel",2),bd([he("selectionService")],Dd.prototype,"selectionService",2),bd([he("rowNodeSorter")],Dd.prototype,"rowNodeSorter",2),bd([he("sortController")],Dd.prototype,"sortController",2),Dd=bd([ce("gridSerializer")],Dd);var Id={version:"31.3.4",moduleName:"@ag-grid-community/csv-export",beans:[Ad,Dd]},Rd="\r\n",Ld=class{static createHeader(e={}){const t=["version"];return e.version||(e.version="1.0"),e.encoding&&t.push("encoding"),e.standalone&&t.push("standalone"),`<?xml ${t.map(t=>`${t}="${e[t]}"`).join(" ")} ?>`}static createXml(e,t){let i="";e.properties&&(e.properties.prefixedAttributes&&e.properties.prefixedAttributes.forEach(e=>{Object.keys(e.map).forEach(n=>{i+=this.returnAttributeIfPopulated(e.prefix+n,e.map[n],t)})}),e.properties.rawMap&&Object.keys(e.properties.rawMap).forEach(n=>{i+=this.returnAttributeIfPopulated(n,e.properties.rawMap[n],t)}));let n="<"+e.name+i;return e.children||null!=e.textNode?null!=e.textNode?n+">"+e.textNode+"</"+e.name+">"+Rd:(n+=">\r\n",e.children&&e.children.forEach(e=>{n+=this.createXml(e,t)}),n+"</"+e.name+">"+Rd):n+"/>"+Rd}static returnAttributeIfPopulated(e,t,i){if(!t&&""!==t&&0!==t)return"";let n=t;return"boolean"==typeof t&&i&&(n=i(t)),` ${e}="${n}"`}};function kd(e,t){let i="";for(let n=0;n<t;n++)i+=String.fromCharCode(255&e),e>>>=8;return i}var Pd=e=>e.length?(e=>{if(!e.length)return 0;let t=-1,i=0,n=0,s=0;for(let r=0;r<e.length;r++)i=e[r],n=255&(t^i),s=Nd[n],t=t>>>8^s;return-1^t})("string"==typeof e?(new TextEncoder).encode(e):e):0,Nd=new Uint32Array([0,1996959894,3993919788,2567524794,124634137,1886057615,3915621685,2657392035,249268274,2044508324,3772115230,2547177864,162941995,2125561021,3887607047,2428444049,498536548,1789927666,4089016648,2227061214,450548861,1843258603,4107580753,2211677639,325883990,1684777152,4251122042,2321926636,335633487,1661365465,4195302755,2366115317,997073096,1281953886,3579855332,2724688242,1006888145,1258607687,3524101629,2768942443,901097722,1119000684,3686517206,2898065728,853044451,1172266101,3705015759,2882616665,651767980,1373503546,3369554304,3218104598,565507253,1454621731,3485111705,3099436303,671266974,1594198024,3322730930,2970347812,795835527,1483230225,3244367275,3060149565,1994146192,31158534,2563907772,4023717930,1907459465,112637215,2680153253,3904427059,2013776290,251722036,2517215374,3775830040,2137656763,141376813,2439277719,3865271297,1802195444,476864866,2238001368,4066508878,1812370925,453092731,2181625025,4111451223,1706088902,314042704,2344532202,4240017532,1658658271,366619977,2362670323,4224994405,1303535960,984961486,2747007092,3569037538,1256170817,1037604311,2765210733,3554079995,1131014506,879679996,2909243462,3663771856,1141124467,855842277,2852801631,3708648649,1342533948,654459306,3188396048,3373015174,1466479909,544179635,3110523913,3462522015,1591671054,702138776,2966460450,3352799412,1504918807,783551873,3082640443,3233442989,3988292384,2596254646,62317068,1957810842,3939845945,2647816111,81470997,1943803523,3814918930,2489596804,225274430,2053790376,3826175755,2466906013,167816743,2097651377,4027552580,2265490386,503444072,1762050814,4150417245,2154129355,426522225,1852507879,4275313526,2312317920,282753626,1742555852,4189708143,2394877945,397917763,1622183637,3604390888,2714866558,953729732,1340076626,3518719985,2797360999,1068828381,1219638859,3624741850,2936675148,906185462,1090812512,3747672003,2825379669,829329135,1181335161,3412177804,3160834842,628085408,1382605366,3423369109,3138078467,570562233,1426400815,3317316542,2998733608,733239954,1555261956,3268935591,3050360625,752459403,1541320221,2607071920,3965973030,1969922972,40735498,2617837225,3943577151,1913087877,83908371,2512341634,3803740692,2075208622,213261112,2463272603,3855990285,2094854071,198958881,2262029012,4057260610,1759359992,534414190,2176718541,4139329115,1873836001,414664567,2282248934,4279200368,1711684554,285281116,2405801727,4167216745,1634467795,376229701,2685067896,3608007406,1308918612,956543938,2808555105,3495958263,1231636301,1047427035,2932959818,3654703836,1088359270,936918e3,2847714899,3736837829,1202900863,817233897,3183342108,3401237130,1404277552,615818150,3134207493,3453421203,1423857449,601450431,3009837614,3294710456,1567103746,711928724,3020668471,3272380065,1510334235,755167117]),{utf8_encode:Od}=ls,_d=(e,t)=>Sd(void 0,null,function*(){const{content:i}=e,{size:n,content:s}=i?Vd(i):{size:0,content:Uint8Array.from([])};let r,o,a=!1;if("file"===e.type&&s&&n>0){const e=yield(e=>Sd(void 0,null,function*(){const t=new Blob([e]),{size:i,content:n}=yield(s=t,Sd(void 0,null,function*(){let e=0;const t=[],i=new WritableStream({write:i=>{t.push(i),e+=i.length}}),n=new ReadableStream({start:e=>{const t=new FileReader;t.onload=t=>{var i;(null==(i=t.target)?void 0:i.result)&&e.enqueue(t.target.result),e.close()},t.readAsArrayBuffer(s)}}),r=new window.CompressionStream("deflate-raw");return yield n.pipeThrough(r).pipeTo(i),{size:e,content:new Blob(t)}}));var s;return{size:i,content:new Uint8Array(yield n.arrayBuffer())}}))(s);r=e.content,o=e.size,a=!0}const l=Gd(e,a,t,n,s,o);return Cd(yd({},l),{content:r||s,isCompressed:a})}),Fd=(e,t)=>{const{content:i}=e,{content:n}=i?Vd(i):{content:Uint8Array.from([])},s=Gd(e,!1,t,n.length,n,void 0);return Cd(yd({},s),{content:n,isCompressed:!1})},Gd=(e,t,i,n,s,r)=>{const{content:o,path:a,created:l}=e,c=(e=>{let t=e.getHours();return t<<=6,t|=e.getMinutes(),t<<=5,t|=e.getSeconds()/2,t})(l),h=(e=>{let t=e.getFullYear()-1980;return t<<=4,t|=e.getMonth()+1,t<<=5,t|=e.getDate(),t})(l),d=Pd(s),u=void 0!==r?r:n,p=Od(a),g=p!==a;let f="";if(g){const e=kd(1,1)+kd(Pd(p),4)+p;f="up"+kd(e.length,2)+e}const m="\0"+(g?"\0\b":"\0\0")+kd(t?8:0,2)+kd(c,2)+kd(h,2)+kd(u?d:0,4)+kd(null!=r?r:n,4)+kd(n,4)+kd(p.length,2)+kd(f.length,2),v="PK"+m+p+f,y="PK\0"+m+"\0\0\0\0\0\0"+(o?"\0\0\0\0":"\0\0\0")+kd(i,4)+p+f;return{localFileHeader:Uint8Array.from(v,e=>e.charCodeAt(0)),centralDirectoryHeader:Uint8Array.from(y,e=>e.charCodeAt(0))}},Vd=e=>{let t;return t="string"==typeof e?(e=>{const t=new Uint8Array(e.length);for(let i=0;i<e.length;i++)t[i]=e.charCodeAt(i);return t})(atob(e.split(";base64,")[1])):e,{size:t.length,content:t}},Bd=class{static addFolders(e){e.forEach(this.addFolder.bind(this))}static addFolder(e){this.folders.push({path:e,created:new Date,isBase64:!1,type:"folder"})}static addFile(e,t,i=!1){this.files.push({path:e,created:new Date,content:i?t:(new TextEncoder).encode(t),isBase64:i,type:"file"})}static getZipFile(e="application/zip"){return Sd(this,null,function*(){const t=yield this.buildCompressedFileStream();return this.clearStream(),new Blob([t],{type:e})})}static getUncompressedZipFile(e="application/zip"){const t=this.buildFileStream();return this.clearStream(),new Blob([t],{type:e})}static clearStream(){this.folders=[],this.files=[]}static packageFiles(e){let t=new Uint8Array(0),i=new Uint8Array(0),n=0,s=0;for(const r of e){const{localFileHeader:e,centralDirectoryHeader:o,content:a}=r,l=new Uint8Array(t.length+e.length);l.set(t),l.set(e,t.length),t=l;const c=new Uint8Array(t.length+a.length);c.set(t),c.set(a,t.length),t=c;const h=new Uint8Array(i.length+o.length);h.set(i),h.set(o,i.length),i=h,n+=e.length+a.length,s+=o.length}const r=((e,t,i)=>{const n="PK\0\0\0\0"+kd(e,2)+kd(e,2)+kd(t,4)+kd(i,4)+"\0\0";return Uint8Array.from(n,e=>e.charCodeAt(0))})(e.length,s,n),o=new Uint8Array(t.length+i.length+r.length);return o.set(t),o.set(i,t.length),o.set(r,t.length+i.length),o}static buildCompressedFileStream(){return Sd(this,null,function*(){const e=[...this.folders,...this.files],t=[];let i=0;for(const n of e){const e=yield _d(n,i),{localFileHeader:s,content:r}=e;t.push(e),i+=s.length+r.length}return this.packageFiles(t)})}static buildFileStream(){const e=[...this.folders,...this.files],t=[];let i=0;for(const n of e){const e=Fd(n,i),{localFileHeader:s,content:r}=e;t.push(e),i+=s.length+r.length}return this.packageFiles(t)}};Bd.folders=[],Bd.files=[],se.__registerModules([ed,cd,Id],!1,void 0)},28621(e,t,i){"use strict";i.d(t,{hFV:()=>pm});var n={};i.r(n),i.d(n,{AgChart:()=>Df,AgCharts:()=>Tf,AgErrorBarSupportedSeriesTypes:()=>A,AgTooltipPositionType:()=>T,Marker:()=>vd,VERSION:()=>Lf,_ModuleSupport:()=>jf,_Scale:()=>zf,_Scene:()=>kf,_Theme:()=>Bf,_Util:()=>Uf,__FORCE_MODULE_DETECTION:()=>D,time:()=>I});var s=i(54989),r=Object.defineProperty,o=Object.defineProperties,a=Object.getOwnPropertyDescriptor,l=Object.getOwnPropertyDescriptors,c=Object.getOwnPropertySymbols,h=Object.getPrototypeOf,d=Object.prototype.hasOwnProperty,u=Object.prototype.propertyIsEnumerable,p=Reflect.get,g=(e,t)=>(t=Symbol[e])?t:Symbol.for("Symbol."+e),f=Math.pow,m=(e,t,i)=>t in e?r(e,t,{enumerable:!0,configurable:!0,writable:!0,value:i}):e[t]=i,v=(e,t)=>{for(var i in t||(t={}))d.call(t,i)&&m(e,i,t[i]);if(c)for(var i of c(t))u.call(t,i)&&m(e,i,t[i]);return e},y=(e,t)=>o(e,l(t)),C=(e,t)=>{var i={};for(var n in e)d.call(e,n)&&t.indexOf(n)<0&&(i[n]=e[n]);if(null!=e&&c)for(var n of c(e))t.indexOf(n)<0&&u.call(e,n)&&(i[n]=e[n]);return i},b=(e,t)=>{for(var i in t)r(e,i,{get:t[i],enumerable:!0})},S=(e,t,i,n)=>{for(var s,o=n>1?void 0:n?a(t,i):t,l=e.length-1;l>=0;l--)(s=e[l])&&(o=(n?s(t,i,o):s(o))||o);return n&&o&&r(t,i,o),o},w=(e,t,i)=>p(h(e),i,t),x=(e,t,i)=>new Promise((n,s)=>{var r=e=>{try{a(i.next(e))}catch(e){s(e)}},o=e=>{try{a(i.throw(e))}catch(e){s(e)}},a=e=>e.done?n(e.value):Promise.resolve(e.value).then(r,o);a((i=i.apply(e,t)).next())}),E=function(e,t){this[0]=e,this[1]=t},M=e=>{var t,i=e[g("asyncIterator")],n=!1,s={};return null==i?(i=e[g("iterator")](),t=e=>s[e]=t=>i[e](t)):(i=i.call(e),t=e=>s[e]=t=>{if(n){if(n=!1,"throw"===e)throw t;return t}return n=!0,{done:!1,value:new E(new Promise(n=>{var s=i[e](t);if(!(s instanceof Object))throw TypeError("Object expected");n(s)}),1)}}),s[g("iterator")]=()=>s,t("next"),"throw"in i?t("throw"):s.throw=e=>{throw e},"return"in i&&t("return"),s},A=["bar","line","scatter"],T=(e=>(e.POINTER="pointer",e.NODE="node",e.TOP="top",e.RIGHT="right",e.BOTTOM="bottom",e.LEFT="left",e.TOP_LEFT="top-left",e.TOP_RIGHT="top-right",e.BOTTOM_RIGHT="bottom-right",e.BOTTOM_LEFT="bottom-left",e))(T||{}),D=0,I={};b(I,{day:()=>te,friday:()=>ce,hour:()=>J,millisecond:()=>G,minute:()=>X,monday:()=>re,month:()=>ue,saturday:()=>he,second:()=>$,sunday:()=>se,thursday:()=>le,tuesday:()=>oe,utcDay:()=>ye,utcHour:()=>ve,utcMinute:()=>me,utcMonth:()=>Ce,utcYear:()=>be,wednesday:()=>ae,year:()=>ge});var R=new Map;function L(e,t){R.has(t)||(R.set(t,!0),e())}function k(e){return e}function*P(...e){for(const t of e)yield*M(t)}function N(e,t=0,i){const{leading:n=!0,trailing:s=!0}=null!=i?i:{};let r,o,a=!1;function l(){s&&o?(r=setTimeout(l,t),e(...o)):a=!1,o=null}return Object.assign(function(...i){a?o=i:(a=!0,r=setTimeout(l,t),n?e(...i):o=i)},{cancel(){clearTimeout(r),a=!1,o=null}})}L.clear=()=>R.clear();var O={log(...e){console.log(...e)},warn(e,...t){console.warn(`AG Charts - ${e}`,...t)},error(e,...t){"object"==typeof e?console.error("AG Charts error",e,...t):console.error(`AG Charts - ${e}`,...t)},table(...e){console.table(...e)},warnOnce(e,...t){L(()=>O.warn(e,...t),`Logger.warn: ${e}`)},errorOnce(e,...t){L(()=>O.error(e,...t),`Logger.error: ${e}`)}},_=class{constructor(e,t,i){this._encode=e,this._decode=t,this._rangeCallback=i}floor(e){const t=new Date(e),i=this._encode(t);return this._decode(i)}ceil(e){const t=new Date(Number(e)-1),i=this._encode(t);return this._decode(i+1)}range(e,t,i){var n;const s=null==(n=this._rangeCallback)?void 0:n.call(this,e,t),r=this._encode(i?this.floor(e):this.ceil(e)),o=this._encode(i?this.ceil(t):this.floor(t));if(o<r)return[];const a=[];for(let e=r;e<=o;e++){const t=this._decode(e);a.push(t)}return null==s||s(),a}},F=class extends _{getOffset(e,t){const i="number"==typeof e||e instanceof Date?this._encode(new Date(e)):0;return Math.floor(i)%t}every(e,t){let i,n=0;const s=e;s!==(e=Math.max(1,Math.round(e)))&&O.warnOnce(`interval step of [${s}] rounded to [${e}].`);const{snapTo:r="start"}=null!=t?t:{};if("string"==typeof r){const t=n;i=(i,s)=>{const o="start"===r?i:s;return n=this.getOffset(o,e),()=>n=t}}else"number"==typeof r?n=this.getOffset(new Date(r),e):r instanceof Date&&(n=this.getOffset(r,e));return new _(t=>{const i=this._encode(t);return Math.floor((i-n)/e)},t=>this._decode(t*e+n),i)}},G=new F(function(e){return e.getTime()},function(e){return new Date(e)}),V=G,B=(new Date(0).getFullYear(),1e3),H=6e4,z=36e5,U=864e5,W=6048e5,j=31536e6,K=(new Date).getTimezoneOffset()*H,$=new F(function(e){return Math.floor((e.getTime()-K)/B)},function(e){return new Date(K+e*B)}),Y=$,q=(new Date).getTimezoneOffset()*H,X=new F(function(e){return Math.floor((e.getTime()-q)/H)},function(e){return new Date(q+e*H)}),Z=X,Q=(new Date).getTimezoneOffset()*H,J=new F(function(e){return Math.floor((e.getTime()-Q)/z)},function(e){return new Date(Q+e*z)}),ee=J,te=new F(function(e){const t=e.getTimezoneOffset()*H;return Math.floor((e.getTime()-t)/U)},function(e){const t=new Date(1970,0,1);return t.setDate(t.getDate()+e),t}),ie=te;function ne(e){const t=(7+e-4)%7;return new F(function(e){const i=e.getTimezoneOffset()*H;return Math.floor((e.getTime()-i)/W-t/7)},function(e){const i=new Date(1970,0,1);return i.setDate(i.getDate()+7*e+t),i})}var se=ne(0),re=ne(1),oe=ne(2),ae=ne(3),le=ne(4),ce=ne(5),he=ne(6),de=se,ue=new F(function(e){return 12*e.getFullYear()+e.getMonth()},function(e){const t=Math.floor(e/12);return new Date(t,e-12*t,1)}),pe=ue,ge=new F(function(e){return e.getFullYear()},function(e){const t=new Date;return t.setFullYear(e),t.setMonth(0,1),t.setHours(0,0,0,0),t}),fe=ge,me=new F(function(e){return Math.floor(e.getTime()/H)},function(e){return new Date(e*H)}),ve=new F(function(e){return Math.floor(e.getTime()/z)},function(e){return new Date(e*z)}),ye=new F(function(e){return Math.floor(e.getTime()/U)},function(e){const t=new Date(0);return t.setUTCDate(t.getUTCDate()+e),t.setUTCHours(0,0,0,0),t}),Ce=new F(function(e){return 12*e.getUTCFullYear()+e.getUTCMonth()},function(e){const t=Math.floor(e/12),i=e-12*t;return new Date(Date.UTC(t,i,1))}),be=new F(function(e){return e.getUTCFullYear()},function(e){const t=new Date;return t.setUTCFullYear(e),t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0),t}),Se={isEnterprise:!1},we=class{constructor(){this.destroyFns=[]}destroy(){for(const e of this.destroyFns)e()}},xe=new class{constructor(){this.modules=[],this.dependencies=new Set,this.dependents=new Set}register(...e){for(const t of e){this.registerDependencies(t);const e=this.modules.find(e=>t.type===e.type&&t.optionsKey===e.optionsKey&&t.identifier===e.identifier);if(e){if("enterprise"===t.packageType&&"community"===e.packageType){const i=this.modules.indexOf(e);this.modules.splice(i,1,t)}}else this.modules.push(t)}}hasEnterpriseModules(){return this.modules.some(e=>"enterprise"===e.packageType)}*byType(...e){for(const t of this.modules)e.includes(t.type)&&this.dependencies.has(t.optionsKey)&&(yield t);for(const t of this.modules)!e.includes(t.type)||this.dependencies.has(t.optionsKey)||this.dependents.has(t.optionsKey)||(yield t);for(const t of this.modules)e.includes(t.type)&&this.dependents.has(t.optionsKey)&&(yield t)}registerDependencies(e){if(null!=e.dependencies&&0!==e.dependencies.length){if(this.dependencies.has(e.optionsKey))throw new Error(`Module [${e.optionsKey}] can not both be depended upon by any module and have dependencies of [${e.dependencies}].`);for(const t of e.dependencies){if(this.dependents.has(t))throw new Error(`Module [${t}] can not both be depended upon by any module and have dependencies of [${e.optionsKey}].`);this.dependencies.add(t)}this.dependents.add(e.optionsKey)}}},Ee=new class{constructor(){this.axesMap=new Map,this.hidden=new Set,this.themeTemplates=new Map}register(e,t){this.axesMap.set(e,t.instanceConstructor),t.themeTemplate&&this.setThemeTemplate(e,t.themeTemplate),t.hidden&&this.hidden.add(e)}create(e,t){const i=this.axesMap.get(e);if(i)return new i(t);throw new Error(`AG Charts - unknown axis type: ${e}`)}has(e){return this.axesMap.has(e)}keys(){return this.axesMap.keys()}publicKeys(){return[...this.keys()].filter(e=>!this.hidden.has(e))}setThemeTemplate(e,t){return this.themeTemplates.set(e,t),this}getThemeTemplate(e){return this.themeTemplates.get(e)}},Me=Symbol("BREAK"),Ae="__decorator_config";function Te(e,t){null==Object.getOwnPropertyDescriptor(e,Ae)&&Object.defineProperty(e,Ae,{value:{}});const i=e[Ae],n=t.toString();if(void 0!==i[n])return i[n];const s=new WeakMap;i[n]={setters:[],getters:[],observers:[],valuesMap:s};const r=Object.getOwnPropertyDescriptor(e,t),o=null==r?void 0:r.set,a=null==r?void 0:r.get;return Object.defineProperty(e,t,{set:function(e){const{setters:r,observers:l}=i[n];let c;r.some(e=>e.length>2)&&(c=a?a.call(this):s.get(this));for(const i of r)if((e=i(this,t,e,c))===Me)return;o?o.call(this,e):s.set(this,e);for(const t of l)t(this,e,c)},get:function(){let e=a?a.call(this):s.get(this);for(const s of i[n].getters)if(e=s(this,t,e),e===Me)return;return e},enumerable:!0,configurable:!1}),i[n]}function De(e,t,i){return(n,s)=>{const r=Te(n,s);r.setters.push(e),t&&r.getters.unshift(t),i&&Object.assign(r,i)}}function Ie(e){return void 0!==e&&Ae in e}function Re(e){const t=new Set;for(;Ie(e);)t.add(null==e?void 0:e[Ae]),e=Object.getPrototypeOf(e);return Array.from(t).flatMap(e=>Object.keys(e))}function Le(e){return Re(e).reduce((t,i)=>{var n;return t[i]=null!=(n=e[i])?n:null,t},{})}function ke(e){return null!=e}function Pe(e){return Array.isArray(e)}function Ne(e){return"boolean"==typeof e}function Oe(e){return e instanceof Date}function _e(e){return Oe(e)&&!isNaN(Number(e))}function Fe(e){return e instanceof RegExp}function Ge(e){return"function"==typeof e}function Ve(e){return"object"==typeof e&&null!==e&&!Pe(e)}function Be(e){return Pe(e)||He(e)}function He(e){return"object"==typeof e&&null!==e&&e.constructor===Object}function ze(e){return"string"==typeof e}function Ue(e){return"number"==typeof e}function We(e){return Ue(e)&&Number.isFinite(e)}function je(e){return"undefined"!=typeof window&&e instanceof HTMLElement}function Ke(e,t){return ze(t)&&Object.keys(e).includes(t)}function $e(e,t){return Object.values(e).includes(t)}function Ye(e){return"symbol"==typeof e}function qe(...e){return Xe(...e.reverse())}function Xe(...e){const t={};for(const i of e){if(!Ve(i))continue;const e=Ie(i)?Re(i):Object.keys(i);for(const n of e)He(t[n])&&He(i[n])?t[n]=Xe(t[n],i[n]):null!=t[n]||(t[n]=i[n])}return t}function Ze(e,...t){return t&&Pe(e)?e.map(e=>Xe(e,...t)):e}function Qe(e,t){return Object.entries(e).reduce((i,[n,s])=>(i[n]=t(s,n,e),i),{})}function Je(e,t){const i=v({},e);for(const e of t)delete i[e];return i}function et(e,t){return(Pe(t)?t:t.split(".")).reduce((e,t)=>e[t],e)}var tt=new Set(["__proto__","constructor","prototype"]);function it(e,t,i){const n=Pe(t)?t.slice():t.split("."),s=n.pop();n.some(e=>tt.has(e))||(n.reduce((e,t)=>e[t],e)[s]=i)}function nt(e,t,i){if(void 0===i)return t;for(const n of e){const e=i[n];void 0!==e&&(t[n]=e)}return t}var st=class extends Map{get(e){var t;return null!=(t=super.get(e))?t:"unknown"}isCartesian(e){return"cartesian"===this.get(e)}isPolar(e){return"polar"===this.get(e)}isHierarchy(e){return"hierarchy"===this.get(e)}isTopology(e){return"topology"===this.get(e)}get seriesTypes(){return Array.from(this.keys())}get cartesianTypes(){return this.seriesTypes.filter(e=>this.isCartesian(e))}get polarTypes(){return this.seriesTypes.filter(e=>this.isPolar(e))}get hierarchyTypes(){return this.seriesTypes.filter(e=>this.isHierarchy(e))}get topologyTypes(){return this.seriesTypes.filter(e=>this.isTopology(e))}},rt=class extends Map{set(e,t){return super.set(e,Xe(t,this.get(e)))}},ot=new st,at=new st,lt=new rt,ct=[{type:"root",optionsKey:"animation",chartTypes:["cartesian","polar","hierarchy","topology"]},{type:"root",optionsKey:"annotations",chartTypes:["cartesian"]},{type:"root",optionsKey:"background",chartTypes:["cartesian","polar","hierarchy","topology"],optionsInnerKey:"image"},{type:"root",optionsKey:"contextMenu",chartTypes:["cartesian","polar","hierarchy","topology"]},{type:"root",optionsKey:"dataSource",chartTypes:["cartesian","polar","hierarchy","topology"]},{type:"root",optionsKey:"sync",chartTypes:["cartesian"]},{type:"root",optionsKey:"zoom",chartTypes:["cartesian","topology"]},{type:"legend",optionsKey:"gradientLegend",chartTypes:["cartesian","polar","hierarchy","topology"],identifier:"gradient"},{type:"root",optionsKey:"navigator",chartTypes:["cartesian"],optionsInnerKey:"miniChart"},{type:"axis",optionsKey:"axes[]",chartTypes:["polar"],identifier:"angle-category"},{type:"axis",optionsKey:"axes[]",chartTypes:["polar"],identifier:"angle-number"},{type:"axis",optionsKey:"axes[]",chartTypes:["polar"],identifier:"radius-category"},{type:"axis",optionsKey:"axes[]",chartTypes:["polar"],identifier:"radius-number"},{type:"axis",optionsKey:"axes[]",chartTypes:["cartesian"],identifier:"ordinal-time"},{type:"axis-option",optionsKey:"crosshair",chartTypes:["cartesian"]},{type:"series",optionsKey:"series[]",chartTypes:["cartesian"],identifier:"box-plot"},{type:"series",optionsKey:"series[]",chartTypes:["cartesian"],identifier:"candlestick"},{type:"series",optionsKey:"series[]",chartTypes:["cartesian"],identifier:"ohlc"},{type:"series",optionsKey:"series[]",chartTypes:["cartesian"],identifier:"bullet"},{type:"series",optionsKey:"series[]",chartTypes:["cartesian"],identifier:"heatmap"},{type:"series",optionsKey:"series[]",chartTypes:["cartesian"],identifier:"range-area"},{type:"series",optionsKey:"series[]",chartTypes:["cartesian"],identifier:"range-bar"},{type:"series",optionsKey:"series[]",chartTypes:["cartesian"],identifier:"waterfall"},{type:"series",optionsKey:"series[]",chartTypes:["polar"],identifier:"nightingale"},{type:"series",optionsKey:"series[]",chartTypes:["polar"],identifier:"radar-area"},{type:"series",optionsKey:"series[]",chartTypes:["polar"],identifier:"radar-line"},{type:"series",optionsKey:"series[]",chartTypes:["polar"],identifier:"radial-bar"},{type:"series",optionsKey:"series[]",chartTypes:["polar"],identifier:"radial-column"},{type:"series",optionsKey:"series[]",chartTypes:["hierarchy"],identifier:"sunburst"},{type:"series",optionsKey:"series[]",chartTypes:["hierarchy"],identifier:"treemap"},{type:"series",optionsKey:"series[]",chartTypes:["topology"],identifier:"map-shape"},{type:"series",optionsKey:"series[]",chartTypes:["topology"],identifier:"map-line"},{type:"series",optionsKey:"series[]",chartTypes:["topology"],identifier:"map-marker"},{type:"series",optionsKey:"series[]",chartTypes:["topology"],identifier:"map-shape-background"},{type:"series",optionsKey:"series[]",chartTypes:["topology"],identifier:"map-line-background"},{type:"series-option",optionsKey:"errorBar",chartTypes:["cartesian"],identifier:"error-bars"}];function ht(e){var t;return null==(t=ct.find(t=>"series"===t.type&&t.identifier===e))?void 0:t.chartTypes}function dt(e){if(!function(e){return"enterprise"===e.packageType}(e))throw new Error("AG Charts - internal configuration error, only enterprise modules need verification.");const t=ct.find(t=>t.type===e.type&&t.optionsKey===e.optionsKey&&t.identifier===e.identifier&&e.chartTypes.every(e=>t.chartTypes.includes(e)));return t&&(null!=t.useCount||(t.useCount=0),t.useCount++),null!=t}function ut(e){var t,i,n;return null!=(n=null==(i=null==(t=e.series)?void 0:t[0])?void 0:i.type)?n:"line"}function pt(e){const t=ut(e);return null==t||("cartesian"===t?(O.warnOnce(`type '${t}' is deprecated, use a series type instead`),!0):ot.isCartesian(t)||"cartesian"===(null==(i=ht(t))?void 0:i.find(e=>"cartesian"===e)));var i}function gt(e){const t=ut(e);return null!=t&&("polar"===t?(O.warnOnce(`type '${t}' is deprecated, use a series type instead`),!0):ot.isPolar(t)||"polar"===(null==(i=ht(t))?void 0:i.find(e=>"polar"===e)));var i}function ft(e){const t=ut(e);return null!=t&&("hierarchy"===t?(O.warnOnce(`type '${t}' is deprecated, use a series type instead`),!0):ot.isHierarchy(t)||"hierarchy"===(null==(i=ht(t))?void 0:i.find(e=>"hierarchy"===e)));var i}function mt(e){const t=ut(e);return null!=t&&("topology"===t?(O.warnOnce(`type '${t}' is deprecated, use a series type instead`),!0):ot.isTopology(t)||"topology"===(null==(i=ht(t))?void 0:i.find(e=>"topology"===e)));var i}function vt(e){return null!=e&&Ee.has(e)}var yt=class{set(e){const{className:t=this.constructor.name}=this.constructor;if("object"!=typeof e)return O.warn(`unable to set ${t} - expecting a properties object`),this;const i=new Set(Object.keys(e));for(const t of Re(this))if(i.has(t)){const n=e[t],s=this;bt(s[t])?s[t]=s[t]instanceof Ct?s[t].reset(n):s[t].set(n):s[t]=n,i.delete(t)}for(const e of i)O.warn(`unable to set [${e}] in ${t} - property is unknown`);return this}isValid(){return Re(this).every(e=>{const{optional:t}=function(e,t){const i=t.toString();for(;Ie(e);){const t=e[Ae];if(Object.hasOwn(t,i))return t[i];e=Object.getPrototypeOf(e)}}(this,e),i=t||void 0!==this[e];return i||O.warnOnce(`[${e}] is required.`),i})}toJson(){return Re(this).reduce((e,t)=>{const i=this[t];return e[t]=bt(i)?i.toJson():i,e},{})}},Ct=class e extends Array{constructor(e,...t){super(t.length),Object.defineProperty(this,"itemFactory",{value:e,enumerable:!1,configurable:!1}),this.set(t)}set(e){if(Pe(e)){this.length=e.length;for(let t=0;t<e.length;t++)this[t]=(new this.itemFactory).set(e[t])}return this}reset(t){return new e(this.itemFactory,...t)}toJson(){return this.map(e=>{var t,i;return null!=(i=null==(t=null==e?void 0:e.toJson)?void 0:t.call(e))?i:e})}};function bt(e){return e instanceof yt||e instanceof Ct}var St="class-instance";function wt(e,t,i){if(Pe(t)){if(!Pe(e)||e.length!==t.length||t.some((t,i)=>null!=wt(e[i],t)))return t}else{if(He(t)){if(!He(e))return t;const n={},s=new Set([...Object.keys(e),...Object.keys(t)]);for(const r of s)if(e[r]!==t[r]&&!(null==i?void 0:i.includes(r)))if(typeof e[r]==typeof t[r]){const i=wt(e[r],t[r]);null!==i&&(n[r]=i)}else n[r]=t[r];return Object.keys(n).length?n:null}if(e!==t)return t}return null}function xt(e,t){return Pe(e)?e.map(e=>xt(e,t)):He(e)?Qe(e,(e,i)=>{var n;return(null==(n=null==t?void 0:t.shallow)?void 0:n.includes(i))?Et(e):xt(e,t)}):Et(e)}function Et(e){return Pe(e)?[...e]:He(e)?v({},e):Oe(e)?new Date(e):Fe(e)?new RegExp(e.source,e.flags):e}function Mt(e,t,i,...n){var s;if(Pe(e))t(e,...n),e.forEach((e,s)=>{Mt(e,t,i,...Tt(n,s))});else if(He(e)){t(e,...n);for(const r of Object.keys(e)){if(null==(s=null==i?void 0:i.skip)?void 0:s.includes(r))continue;const o=e[r];(Pe(o)||He(o))&&Mt(o,t,i,...Tt(n,r))}}}function At(e,t,i={}){const{path:n,constructedArrays:s,matcherPath:r=(null==n?void 0:n.replace(/(\[[0-9+]+])/i,"[]")),skip:o=[]}=i;if(null==e)throw new Error(`AG Charts - target is uninitialised: ${null!=n?n:"<root>"}`);if(null==t)return e;if(bt(e))return e.set(t);const a=e,l=Dt(e);for(const c in t){if(tt.has(c))continue;const h=`${r?r+".":""}${c}`;if(o.includes(h))continue;const d=t[c],u=`${n?n+".":""}${c}`,p=a.constructor,g=a[c];let f;try{const t=Dt(g),n=Dt(d);if(l===St&&!(c in e)){O.warn(`unable to set [${u}] in ${null==p?void 0:p.name} - property is unknown`);continue}if(null!=t&&null!=n&&n!==t&&(t!==St||"object"!==n)){O.warn(`unable to set [${u}] in ${null==p?void 0:p.name} - can't apply type of [${n}], allowed types are: [${t}]`);continue}if(bt(g))a[c].set(d);else if("array"===n)if(null!=f||(f=null==s?void 0:s.get(g)),null==f)a[c]=d;else{const e=d;a[c]=e.map(e=>At(new f,e,y(v({},i),{path:u,matcherPath:h+"[]"})))}else n===St?a[c]=d:"object"===n?null!=g?At(g,d,y(v({},i),{path:u,matcherPath:h})):null==f?(a[c]={},At(a[c],d,y(v({},i),{path:u,matcherPath:h}))):a[c]=At(new f,d,y(v({},i),{path:u,matcherPath:h})):a[c]=d}catch(e){O.warn(`unable to set [${u}] in [${null==p?void 0:p.name}]; nested error is: ${e.message}`)}}return e}function Tt(e,t){return e.map(e=>null==e?void 0:e[t])}function Dt(e){return null==e?null:je(e)||Oe(e)?"primitive":Pe(e)?"array":Ve(e)?He(e)?"object":St:Ge(e)?"function":"primitive"}var It=new class{constructor(){this.seriesMap=new Map,this.themeTemplates=new Map}register(e,{chartTypes:[t],instanceConstructor:i,defaultAxes:n,themeTemplate:s,enterpriseThemeTemplate:r,paletteFactory:o,solo:a,stackable:l,groupable:c,stackedByDefault:h,swapDefaultAxesCondition:d,hidden:u}){this.setThemeTemplate(e,s,r),this.seriesMap.set(e,{instanceConstructor:i,defaultAxes:n,paletteFactory:o,solo:a,stackable:l,groupable:c,stackedByDefault:h,swapDefaultAxesCondition:d}),ot.set(e,t),u||at.set(e,t)}create(e,t){var i;const n=null==(i=this.seriesMap.get(e))?void 0:i.instanceConstructor;if(n)return new n(t);throw new Error(`AG Charts - unknown series type: ${e}`)}cloneDefaultAxes(e){var t;const i=null==(t=this.seriesMap.get(e))?void 0:t.defaultAxes;return i?{axes:xt(i)}:null}setThemeTemplate(e,t,i={}){const n=this.themeTemplates.get(e);this.themeTemplates.set(e,{community:Xe(t,null==n?void 0:n.community),enterprise:Xe(i,t,null==n?void 0:n.community)})}getThemeTemplate(e){const t=this.themeTemplates.get(e);return Se.isEnterprise?null==t?void 0:t.enterprise:null==t?void 0:t.community}getPaletteFactory(e){var t;return null==(t=this.seriesMap.get(e))?void 0:t.paletteFactory}isSolo(e){var t,i;return null!=(i=null==(t=this.seriesMap.get(e))?void 0:t.solo)&&i}isGroupable(e){var t,i;return null!=(i=null==(t=this.seriesMap.get(e))?void 0:t.groupable)&&i}isStackable(e){var t,i;return null!=(i=null==(t=this.seriesMap.get(e))?void 0:t.stackable)&&i}isStackedByDefault(e){var t,i;return null!=(i=null==(t=this.seriesMap.get(e))?void 0:t.stackedByDefault)&&i}isDefaultAxisSwapNeeded(e){var t,i,n;let s;for(const r of null!=(t=e.series)?t:[]){const{type:e="line"}=r,t=null==(n=null==(i=this.seriesMap.get(e))?void 0:i.swapDefaultAxesCondition)?void 0:n.call(i,r);if(null!=t){if(null!=s&&s!=t)throw new Error("AG Charts - The provided series have incompatible directions");s=t}}return s}},Rt=new class{constructor(){this.legendMap=new Map,this.themeTemplates=new Map}register(e,{optionsKey:t,instanceConstructor:i,themeTemplate:n}){this.legendMap.set(e,{optionsKey:t,instanceConstructor:i}),this.themeTemplates.set(t,n)}create(e,t){var i;const n=null==(i=this.legendMap.get(e))?void 0:i.instanceConstructor;if(n)return new n(t);throw new Error(`AG Charts - unknown legend type: ${e}`)}getThemeTemplates(){return Object.fromEntries(this.themeTemplates)}getKeys(){return Array.from(this.legendMap.entries()).reduce((e,[t,i])=>(e[t]=i.optionsKey,e),{})}},Lt=(e=>(e[e.SMALL=12]="SMALL",e[e.MEDIUM=13]="MEDIUM",e[e.LARGE=17]="LARGE",e))(Lt||{}),kt=(e=>(e.NORMAL="normal",e.BOLD="bold",e.BOLDER="bolder",e.LIGHTER="lighter",e))(kt||{}),Pt=(e=>(e.TOP="top",e.RIGHT="right",e.BOTTOM="bottom",e.LEFT="left",e))(Pt||{}),Nt=(e=>(e.CATEGORY="category",e.ORDINAL_TIME="ordinal-time",e.NUMBER="number",e.TIME="time",e.LOG="log",e))(Nt||{}),Ot=(e=>(e.ANGLE_CATEGORY="angle-category",e.ANGLE_NUMBER="angle-number",e.RADIUS_CATEGORY="radius-category",e.RADIUS_NUMBER="radius-number",e))(Ot||{}),_t=(e=>(e.CIRCLE="circle",e.POLYGON="polygon",e))(_t||{}),Ft={BLUE:"#5090dc",ORANGE:"#ffa03a",GREEN:"#459d55",CYAN:"#34bfe1",YELLOW:"#e1cc00",VIOLET:"#9669cb",GRAY:"#b5b5b5",MAGENTA:"#bd5aa7",BROWN:"#8a6224",RED:"#ef5452"},Gt={BLUE:"#2b5c95",ORANGE:"#cc6f10",GREEN:"#1e652e",CYAN:"#18859e",YELLOW:"#a69400",VIOLET:"#603c88",GRAY:"#575757",MAGENTA:"#7d2f6d",BROWN:"#4f3508",RED:"#a82529"},Vt=Symbol("is-dark-theme"),Bt=Symbol("extends-axes-defaults"),Ht=Symbol("extends-axes-line-defaults"),zt=Symbol("extends-axes-tick-defaults"),Ut=Symbol("extends-axes-grid-line-defaults"),Wt=Symbol("extends-series-defaults"),jt=Symbol("extends-cartesian-marker-defaults"),Kt=Symbol("default-font"),$t=Symbol("default-label-colour"),Yt=Symbol("default-inverted-label-colour"),qt=Symbol("default-inside-series-label-colour"),Xt=Symbol("default-muted-label-colour"),Zt=Symbol("default-axis-grid-colour"),Qt=Symbol("default-axis-line-colour"),Jt=Symbol("default-cross-lines-colour"),ei=Symbol("default-background-colour"),ti=Symbol("default-shadow-colour"),ii=Symbol("default-colours"),ni=Symbol("default-waterfall-series-positive-colors"),si=Symbol("default-waterfall-series-negative-colors"),ri=Symbol("default-waterfall-series-total-colors"),oi=Symbol("default-waterfall-series-connector-line-stroke"),ai=Symbol("default-polar-series-stroke"),li=Symbol("default-diverging-series-colour-range"),ci=Symbol("default-hierarchy-fills"),hi=Symbol("default-hierarchy-strokes"),di=Symbol("default-annotation-stroke"),ui=Symbol("default-annotation-background-fill"),pi=Symbol("default-annotation-handle-fill"),gi="white",fi={fills:Object.values(Ft),strokes:Object.values(Gt)},mi={get cartesian(){return{seriesTypes:ot.cartesianTypes,commonOptions:["zoom","navigator"]}},get polar(){return{seriesTypes:ot.polarTypes,commonOptions:[]}},get hierarchy(){return{seriesTypes:ot.hierarchyTypes,commonOptions:[]}},get topology(){return{seriesTypes:ot.topologyTypes,commonOptions:[]}}},vi=Object.values(mi).reduce((e,{commonOptions:t})=>e.concat(t),[]),yi=class e{getPalette(){return fi}static getAxisDefaults(e){return Xe(e,{title:{enabled:!1,text:"Axis Title",spacing:25,fontWeight:"normal",fontSize:13,fontFamily:Kt,color:$t},label:{fontSize:12,fontFamily:Kt,padding:5,color:$t,avoidCollisions:!0},line:{enabled:!0,width:1,color:Qt},tick:{enabled:!1,width:1,color:Qt},gridLine:{enabled:!0,style:[{stroke:Zt,lineDash:[]}]},crossLines:{enabled:!1,fill:Jt,stroke:Jt,fillOpacity:.1,strokeWidth:1,label:{enabled:!1,fontSize:12,fontFamily:Kt,padding:5,color:$t}}})}static getSeriesDefaults(){return{visible:!0,showInLegend:!0,highlightStyle:{item:{fill:"#ffffff54",stroke:"#0006",strokeWidth:2},series:{dimOpacity:1}},nodeClickRange:"exact",tooltip:{enabled:!0}}}static getCartesianSeriesMarkerDefaults(){return{enabled:!0,shape:"circle",size:7,strokeWidth:1}}static getChartDefaults(){return{background:{visible:!0,fill:ei},padding:{top:20,right:20,bottom:20,left:20},keyboard:{enabled:!0},title:{enabled:!1,text:"Title",fontWeight:"normal",fontSize:17,fontFamily:Kt,color:$t,wrapping:"hyphenate"},subtitle:{enabled:!1,text:"Subtitle",spacing:20,fontSize:13,fontFamily:Kt,color:Xt,wrapping:"hyphenate"},footnote:{enabled:!1,text:"Footnote",spacing:20,fontSize:13,fontFamily:Kt,color:"rgb(140, 140, 140)",wrapping:"hyphenate"},legend:{position:"bottom",spacing:30,listeners:{},item:{paddingX:16,paddingY:8,marker:{size:15,padding:8},toggleSeriesVisible:!0,label:{color:$t,fontSize:12,fontFamily:Kt}},reverseOrder:!1,pagination:{marker:{size:12},activeStyle:{fill:$t},inactiveStyle:{fill:Xt},highlightStyle:{fill:$t},label:{color:$t}}},tooltip:{enabled:!0,darkTheme:Vt,range:"nearest",delay:0},overlays:{loading:{darkTheme:Vt},noData:{darkTheme:Vt},noVisibleSeries:{darkTheme:Vt}},listeners:{}}}constructor(e={}){const{overrides:t,palette:i}=xt(e),n=this.createChartConfigPerChartType(this.getDefaults());t&&this.mergeOverrides(n,t),this.config=Object.freeze(this.templateTheme(n)),this.palette=Xe(i,this.getPalette())}mergeOverrides(e,t){for(const{seriesTypes:i,commonOptions:n}of Object.values(mi)){const s=v({},t.common);for(const e of vi)n.includes(e)||delete s[e];if(s)for(const t of i){const i=t;e[i]=Xe(s,e[i])}}ot.seriesTypes.forEach(i=>{const n=i;t[n]&&(e[n]=Xe(t[n],e[n]))})}createChartConfigPerChartType(e){for(const[t,{seriesTypes:i}]of Object.entries(mi)){const n=lt.get(t);for(const t of i)e[t]||(e[t]=xt(n))}return e}getDefaults(){const t=(t,i)=>{var n;const s={},r=v(v(v({axes:{}},Rt.getThemeTemplates()),e.getChartDefaults()),lt.get(t));for(const o of i){s[o]=Xe(It.getThemeTemplate(o),null!=(n=s[o])?n:xt(r));const{axes:i}=s[o];for(const n of Ee.keys())i[n]=Xe(i[n],Ee.getThemeTemplate(n),"cartesian"===t&&e.cartesianAxisDefault[n])}return s};return Xe(t("cartesian",ot.cartesianTypes),t("polar",ot.polarTypes),t("hierarchy",ot.hierarchyTypes),t("topology",ot.topologyTypes))}templateTheme(e){const t=xt(e),{extensions:i,properties:n}=this.getTemplateParameters();return Mt(t,e=>{if(e.__extends__){const t=e.__extends__,n=i.get(t);if(null==n)throw new Error(`AG Charts - no template variable provided for: ${t}`);Object.keys(n).forEach(t=>{t in e?Ve(e[t])&&(e[t]=Xe(e[t],n[t])):e[t]=n[t]}),delete e.__extends__}if(Pe(e))for(let t=0;t<e.length;t++){const i=e[t];n.has(i)&&(e[t]=n.get(i))}else for(const[t,i]of Object.entries(e))n.has(i)&&(e[t]=n.get(i))}),xt(t)}static getDefaultColors(){return{fills:Ft,strokes:Gt}}static getWaterfallSeriesDefaultPositiveColors(){return{fill:Ft.BLUE,stroke:Gt.BLUE,label:{color:$t}}}static getWaterfallSeriesDefaultNegativeColors(){return{fill:Ft.ORANGE,stroke:Gt.ORANGE,label:{color:$t}}}static getWaterfallSeriesDefaultTotalColors(){return{fill:Ft.GRAY,stroke:Gt.GRAY,label:{color:$t}}}getTemplateParameters(){const t=new Map;t.set(Bt,e.getAxisDefaults()),t.set(Ht,e.getAxisDefaults().line),t.set(zt,e.getAxisDefaults().tick),t.set(Ut,e.getAxisDefaults().gridLine),t.set(Wt,e.getSeriesDefaults()),t.set(jt,e.getCartesianSeriesMarkerDefaults());const i=new Map;return i.set(Vt,!1),i.set(Kt,"Verdana, sans-serif"),i.set($t,"rgb(70, 70, 70)"),i.set(Yt,"white"),i.set(Xt,"rgb(140, 140, 140)"),i.set(Zt,"rgb(224,234,241)"),i.set(Qt,"rgb(195, 195, 195)"),i.set(Jt,"rgb(70, 70, 70)"),i.set(qt,gi),i.set(ei,gi),i.set(ti,"rgba(0, 0, 0, 0.5)"),i.set(li,[Ft.ORANGE,Ft.YELLOW,Ft.GREEN]),i.set(ci,["#ffffff","#e0e5ea","#c1ccd5","#a3b4c1","#859cad"]),i.set(hi,["#ffffff","#c5cbd1","#a4b1bd","#8498a9","#648096"]),i.set(ai,gi),i.set(ii,e.getDefaultColors()),i.set(ni,e.getWaterfallSeriesDefaultPositiveColors()),i.set(si,e.getWaterfallSeriesDefaultNegativeColors()),i.set(ri,e.getWaterfallSeriesDefaultTotalColors()),i.set(oi,e.getWaterfallSeriesDefaultTotalColors().stroke),i.set(di,Gt.BLUE),i.set(ui,Ft.BLUE),i.set(pi,gi),{extensions:t,properties:i}}};yi.cartesianAxisDefault={number:yi.getAxisDefaults({line:{enabled:!1}}),log:yi.getAxisDefaults({base:10,line:{enabled:!1}}),category:yi.getAxisDefaults({groupPaddingInner:.1,label:{autoRotate:!0},gridLine:{enabled:!1}}),time:yi.getAxisDefaults({gridLine:{enabled:!1}}),"grouped-category":yi.getAxisDefaults()};var Ci=yi,bi="#192232",Si={BLUE:"#5090dc",ORANGE:"#ffa03a",GREEN:"#459d55",CYAN:"#34bfe1",YELLOW:"#e1cc00",VIOLET:"#9669cb",GRAY:"#b5b5b5",MAGENTA:"#bd5aa7",BROWN:"#8a6224",RED:"#ef5452"},wi={BLUE:"#74a8e6",ORANGE:"#ffbe70",GREEN:"#6cb176",CYAN:"#75d4ef",YELLOW:"#f6e559",VIOLET:"#aa86d8",GRAY:"#a1a1a1",MAGENTA:"#ce7ab9",BROWN:"#997b52",RED:"#ff7872"},xi={fills:Object.values(Si),strokes:Object.values(wi)},Ei=class e extends Ci{static getDefaultColors(){return{fills:Si,strokes:wi}}static getWaterfallSeriesDefaultPositiveColors(){return{fill:Si.BLUE,stroke:wi.BLUE,label:{color:"white"}}}static getWaterfallSeriesDefaultNegativeColors(){return{fill:Si.ORANGE,stroke:wi.ORANGE,label:{color:"white"}}}static getWaterfallSeriesDefaultTotalColors(){return{fill:Si.GRAY,stroke:wi.GRAY,label:{color:"white"}}}getTemplateParameters(){const t=super.getTemplateParameters();return t.properties.set(Vt,!0),t.properties.set(ii,e.getDefaultColors()),t.properties.set(ni,e.getWaterfallSeriesDefaultPositiveColors()),t.properties.set(si,e.getWaterfallSeriesDefaultNegativeColors()),t.properties.set(ri,e.getWaterfallSeriesDefaultTotalColors()),t.properties.set(oi,e.getWaterfallSeriesDefaultTotalColors().stroke),t.properties.set(ai,bi),t.properties.set($t,"white"),t.properties.set(Xt,"#7D91A0"),t.properties.set(Zt,"#545A6E"),t.properties.set(Jt,"white"),t.properties.set(li,[Si.ORANGE,Si.YELLOW,Si.GREEN]),t.properties.set(ci,["#192834","#253746","#324859","#3f596c","#4d6a80"]),t.properties.set(hi,["#192834","#3b5164","#496275","#577287","#668399"]),t.properties.set(ei,bi),t.properties.set(qt,bi),t.properties.set(di,wi.BLUE),t.properties.set(ui,Si.BLUE),t.properties.set(pi,bi),t}getPalette(){return xi}constructor(e){super(e)}},Mi={BLUE:"#2196F3",ORANGE:"#FF9800",GREEN:"#4CAF50",CYAN:"#00BCD4",YELLOW:"#FFEB3B",VIOLET:"#7E57C2",GRAY:"#9E9E9E",MAGENTA:"#F06292",BROWN:"#795548",RED:"#F44336"},Ai={BLUE:"#90CAF9",ORANGE:"#FFCC80",GREEN:"#A5D6A7",CYAN:"#80DEEA",YELLOW:"#FFF9C4",VIOLET:"#B39DDB",GRAY:"#E0E0E0",MAGENTA:"#F48FB1",BROWN:"#A1887F",RED:"#EF9A9A"},Ti={fills:Object.values(Mi),strokes:Object.values(Ai)},Di=class e extends Ei{static getDefaultColors(){return{fills:Mi,strokes:Ai}}static getWaterfallSeriesDefaultPositiveColors(){return{fill:Mi.BLUE,stroke:Ai.BLUE,label:{color:"white"}}}static getWaterfallSeriesDefaultNegativeColors(){return{fill:Mi.RED,stroke:Ai.RED,label:{color:"white"}}}static getWaterfallSeriesDefaultTotalColors(){return{fill:Mi.GRAY,stroke:Ai.GRAY,label:{color:"white"}}}getTemplateParameters(){const t=super.getTemplateParameters();return t.properties.set(ii,e.getDefaultColors()),t.properties.set(ni,e.getWaterfallSeriesDefaultPositiveColors()),t.properties.set(si,e.getWaterfallSeriesDefaultNegativeColors()),t.properties.set(ri,e.getWaterfallSeriesDefaultTotalColors()),t.properties.set(li,[Mi.ORANGE,Mi.YELLOW,Mi.GREEN]),t.properties.set(oi,e.getWaterfallSeriesDefaultTotalColors().stroke),t.properties.set(di,Ai.BLUE),t.properties.set(ui,Mi.BLUE),t}getPalette(){return Ti}},Ii={BLUE:"#2196F3",ORANGE:"#FF9800",GREEN:"#4CAF50",CYAN:"#00BCD4",YELLOW:"#FFEB3B",VIOLET:"#7E57C2",GRAY:"#9E9E9E",MAGENTA:"#F06292",BROWN:"#795548",RED:"#F44336"},Ri={BLUE:"#1565C0",ORANGE:"#E65100",GREEN:"#2E7D32",CYAN:"#00838F",YELLOW:"#F9A825",VIOLET:"#4527A0",GRAY:"#616161",MAGENTA:"#C2185B",BROWN:"#4E342E",RED:"#B71C1C"},Li={fills:Object.values(Ii),strokes:Object.values(Ri)},ki=class e extends Ci{static getDefaultColors(){return{fills:Ii,strokes:Ri}}static getWaterfallSeriesDefaultPositiveColors(){return{fill:Ii.BLUE,stroke:Ri.BLUE,label:{color:$t}}}static getWaterfallSeriesDefaultNegativeColors(){return{fill:Ii.RED,stroke:Ri.RED,label:{color:$t}}}static getWaterfallSeriesDefaultTotalColors(){return{fill:Ii.GRAY,stroke:Ri.GRAY,label:{color:$t}}}getTemplateParameters(){const t=super.getTemplateParameters();return t.properties.set(ii,e.getDefaultColors()),t.properties.set(ni,e.getWaterfallSeriesDefaultPositiveColors()),t.properties.set(si,e.getWaterfallSeriesDefaultNegativeColors()),t.properties.set(ri,e.getWaterfallSeriesDefaultTotalColors()),t.properties.set(li,[Ii.ORANGE,Ii.YELLOW,Ii.GREEN]),t.properties.set(oi,e.getWaterfallSeriesDefaultTotalColors().stroke),t.properties.set(di,Ri.BLUE),t.properties.set(ui,Ii.BLUE),t}getPalette(){return Li}},Pi={BLUE:"#436ff4",PURPLE:"#9a7bff",MAGENTA:"#d165d2",PINK:"#f0598b",RED:"#f47348",ORANGE:"#f2a602",YELLOW:"#e9e201",GREEN:"#21b448",CYAN:"#00b9a2",MODERATE_BLUE:"#00aee4"},Ni={BLUE:"#6698ff",PURPLE:"#c0a3ff",MAGENTA:"#fc8dfc",PINK:"#ff82b1",RED:"#ff9b70",ORANGE:"#ffcf4e",YELLOW:"#ffff58",GREEN:"#58dd70",CYAN:"#51e2c9",MODERATE_BLUE:"#4fd7ff"},Oi={fills:Object.values(Pi),strokes:Object.values(Ni)},_i=class e extends Ei{static getDefaultColors(){return{fills:Pi,strokes:Ni}}static getWaterfallSeriesDefaultPositiveColors(){return{fill:Pi.BLUE,stroke:Ni.BLUE,label:{color:"white"}}}static getWaterfallSeriesDefaultNegativeColors(){return{fill:Pi.RED,stroke:Ni.RED,label:{color:"white"}}}static getWaterfallSeriesDefaultTotalColors(){return{fill:"#bbbbbb",stroke:"#eeeeee",label:{color:"white"}}}getTemplateParameters(){const t=super.getTemplateParameters();return t.properties.set(ii,e.getDefaultColors()),t.properties.set(ni,e.getWaterfallSeriesDefaultPositiveColors()),t.properties.set(si,e.getWaterfallSeriesDefaultNegativeColors()),t.properties.set(ri,e.getWaterfallSeriesDefaultTotalColors()),t.properties.set(li,[Pi.BLUE,Pi.RED]),t.properties.set(oi,e.getWaterfallSeriesDefaultTotalColors().stroke),t.properties.set(di,Ni.BLUE),t.properties.set(ui,Pi.BLUE),t}getPalette(){return Oi}},Fi={BLUE:"#436ff4",PURPLE:"#9a7bff",MAGENTA:"#d165d2",PINK:"#f0598b",RED:"#f47348",ORANGE:"#f2a602",YELLOW:"#e9e201",GREEN:"#21b448",CYAN:"#00b9a2",MODERATE_BLUE:"#00aee4"},Gi={BLUE:"#2346c9",PURPLE:"#7653d4",MAGENTA:"#a73da9",PINK:"#c32d66",RED:"#c84b1c",ORANGE:"#c87f00",YELLOW:"#c1b900",GREEN:"#008c1c",CYAN:"#00927c",MODERATE_BLUE:"#0087bb"},Vi={fills:Object.values(Fi),strokes:Object.values(Gi)},Bi=class e extends Ci{static getDefaultColors(){return{fills:Fi,strokes:Gi}}static getWaterfallSeriesDefaultPositiveColors(){return{fill:Fi.BLUE,stroke:Gi.BLUE,label:{color:$t}}}static getWaterfallSeriesDefaultNegativeColors(){return{fill:Fi.RED,stroke:Gi.RED,label:{color:$t}}}static getWaterfallSeriesDefaultTotalColors(){return{fill:"#bbbbbb",stroke:"#888888",label:{color:$t}}}getTemplateParameters(){const t=super.getTemplateParameters();return t.properties.set(ii,e.getDefaultColors()),t.properties.set(ni,e.getWaterfallSeriesDefaultPositiveColors()),t.properties.set(si,e.getWaterfallSeriesDefaultNegativeColors()),t.properties.set(ri,e.getWaterfallSeriesDefaultTotalColors()),t.properties.set(li,[Fi.BLUE,Fi.RED]),t.properties.set(oi,e.getWaterfallSeriesDefaultTotalColors().stroke),t.properties.set(di,Gi.BLUE),t.properties.set(ui,Fi.BLUE),t}getPalette(){return Vi}},Hi={BLUE:"#4472C4",ORANGE:"#ED7D31",GRAY:"#A5A5A5",YELLOW:"#FFC000",MODERATE_BLUE:"#5B9BD5",GREEN:"#70AD47",DARK_GRAY:"#7B7B7B",DARK_BLUE:"#264478",VERY_DARK_GRAY:"#636363",DARK_YELLOW:"#997300"},zi={BLUE:"#6899ee",ORANGE:"#ffa55d",GRAY:"#cdcdcd",YELLOW:"#ffea53",MODERATE_BLUE:"#82c3ff",GREEN:"#96d56f",DARK_GRAY:"#a1a1a1",DARK_BLUE:"#47689f",VERY_DARK_GRAY:"#878787",DARK_YELLOW:"#c0993d"},Ui={fills:Object.values(Hi),strokes:Object.values(zi)},Wi=class e extends Ei{static getDefaultColors(){return{fills:y(v({},Hi),{RED:Hi.ORANGE}),strokes:y(v({},zi),{RED:zi.ORANGE})}}static getWaterfallSeriesDefaultPositiveColors(){return{fill:Hi.BLUE,stroke:zi.BLUE,label:{color:"white"}}}static getWaterfallSeriesDefaultNegativeColors(){return{fill:Hi.ORANGE,stroke:zi.ORANGE,label:{color:"white"}}}static getWaterfallSeriesDefaultTotalColors(){return{fill:Hi.GRAY,stroke:zi.GRAY,label:{color:"white"}}}getTemplateParameters(){const t=super.getTemplateParameters();return t.properties.set(ii,e.getDefaultColors()),t.properties.set(ni,e.getWaterfallSeriesDefaultPositiveColors()),t.properties.set(si,e.getWaterfallSeriesDefaultNegativeColors()),t.properties.set(ri,e.getWaterfallSeriesDefaultTotalColors()),t.properties.set(li,[Hi.ORANGE,Hi.YELLOW,Hi.GREEN]),t.properties.set(oi,e.getWaterfallSeriesDefaultTotalColors().stroke),t.properties.set(di,zi.BLUE),t.properties.set(ui,Hi.BLUE),t}getPalette(){return Ui}},ji={BLUE:"#5281d5",ORANGE:"#ff8d44",GRAY:"#b5b5b5",YELLOW:"#ffd02f",MODERATE_BLUE:"#6aabe6",GREEN:"#7fbd57",DARK_GRAY:"#8a8a8a",DARK_BLUE:"#335287",VERY_DARK_GRAY:"#717171",DARK_YELLOW:"#a98220"},Ki={BLUE:"#214d9b",ORANGE:"#c25600",GRAY:"#7f7f7f",YELLOW:"#d59800",MODERATE_BLUE:"#3575ac",GREEN:"#4b861a",DARK_GRAY:"#575757",DARK_BLUE:"#062253",VERY_DARK_GRAY:"#414141",DARK_YELLOW:"#734f00"},$i={fills:Object.values(ji),strokes:Object.values(Ki)},Yi=class e extends Ci{static getDefaultColors(){return{fills:y(v({},ji),{RED:ji.ORANGE}),strokes:y(v({},Ki),{RED:Ki.ORANGE})}}static getWaterfallSeriesDefaultPositiveColors(){return{fill:ji.BLUE,stroke:Ki.BLUE,label:{color:$t}}}static getWaterfallSeriesDefaultNegativeColors(){return{fill:ji.ORANGE,stroke:Ki.ORANGE,label:{color:$t}}}static getWaterfallSeriesDefaultTotalColors(){return{fill:ji.GRAY,stroke:Ki.GRAY,label:{color:$t}}}getTemplateParameters(){const t=super.getTemplateParameters();return t.properties.set(ii,e.getDefaultColors()),t.properties.set(ni,e.getWaterfallSeriesDefaultPositiveColors()),t.properties.set(si,e.getWaterfallSeriesDefaultNegativeColors()),t.properties.set(ri,e.getWaterfallSeriesDefaultTotalColors()),t.properties.set(li,[ji.ORANGE,ji.YELLOW,ji.GREEN]),t.properties.set(oi,e.getWaterfallSeriesDefaultTotalColors().stroke),t.properties.set(di,Ki.BLUE),t.properties.set(ui,ji.BLUE),t}getPalette(){return $i}},qi={BLUE:"#0083ff",ORANGE:"#ff6600",GREEN:"#00af00",CYAN:"#00ccff",YELLOW:"#f7c700",VIOLET:"#ac26ff",GRAY:"#a7a7b7",MAGENTA:"#e800c5",BROWN:"#b54300",RED:"#ff0000"},Xi={BLUE:"#67b7ff",ORANGE:"#ffc24d",GREEN:"#5cc86f",CYAN:"#54ebff",VIOLET:"#c18aff",YELLOW:"#fff653",GRAY:"#aeaeae",MAGENTA:"#f078d4",BROWN:"#ba8438",RED:"#ff726e"},Zi={fills:Object.values(qi),strokes:Object.values(Xi)},Qi=class e extends Ei{static getDefaultColors(){return{fills:qi,strokes:Xi}}static getWaterfallSeriesDefaultPositiveColors(){return{fill:qi.BLUE,stroke:Xi.BLUE,label:{color:"white"}}}static getWaterfallSeriesDefaultNegativeColors(){return{fill:qi.ORANGE,stroke:Xi.ORANGE,label:{color:"white"}}}static getWaterfallSeriesDefaultTotalColors(){return{fill:qi.GRAY,stroke:Xi.GRAY,label:{color:"white"}}}getTemplateParameters(){const t=super.getTemplateParameters();return t.properties.set(ii,e.getDefaultColors()),t.properties.set(ni,e.getWaterfallSeriesDefaultPositiveColors()),t.properties.set(si,e.getWaterfallSeriesDefaultNegativeColors()),t.properties.set(ri,e.getWaterfallSeriesDefaultTotalColors()),t.properties.set(li,[qi.ORANGE,qi.YELLOW,qi.GREEN]),t.properties.set(oi,e.getWaterfallSeriesDefaultTotalColors().stroke),t.properties.set(di,Xi.BLUE),t.properties.set(ui,qi.BLUE),t}getPalette(){return Zi}},Ji={BLUE:"#0083ff",ORANGE:"#ff6600",GREEN:"#00af00",CYAN:"#00ccff",YELLOW:"#f7c700",VIOLET:"#ac26ff",GRAY:"#a7a7b7",MAGENTA:"#e800c5",BROWN:"#b54300",RED:"#ff0000"},en={BLUE:"#0f68c0",ORANGE:"#d47100",GREEN:"#007922",CYAN:"#009ac2",VIOLET:"#bca400",YELLOW:"#753cac",GRAY:"#646464",MAGENTA:"#9b2685",BROWN:"#6c3b00",RED:"#cb0021"},tn={fills:Object.values(Ji),strokes:Object.values(en)},nn=class e extends Ci{static getDefaultColors(){return{fills:Ji,strokes:en}}static getWaterfallSeriesDefaultPositiveColors(){return{fill:Ji.BLUE,stroke:en.BLUE,label:{color:$t}}}static getWaterfallSeriesDefaultNegativeColors(){return{fill:Ji.ORANGE,stroke:en.ORANGE,label:{color:$t}}}static getWaterfallSeriesDefaultTotalColors(){return{fill:Ji.GRAY,stroke:en.GRAY,label:{color:$t}}}getTemplateParameters(){const t=super.getTemplateParameters();return t.properties.set(ii,e.getDefaultColors()),t.properties.set(ni,e.getWaterfallSeriesDefaultPositiveColors()),t.properties.set(si,e.getWaterfallSeriesDefaultNegativeColors()),t.properties.set(ri,e.getWaterfallSeriesDefaultTotalColors()),t.properties.set(li,[Ji.ORANGE,Ji.YELLOW,Ji.GREEN]),t.properties.set(oi,e.getWaterfallSeriesDefaultTotalColors().stroke),t.properties.set(di,en.BLUE),t.properties.set(ui,Ji.BLUE),t}getPalette(){return tn}},sn=()=>new Ci,rn=()=>new Ei,on={undefined:sn,null:sn,"ag-default":sn,"ag-sheets":()=>new Yi,"ag-polychroma":()=>new Bi,"ag-vivid":()=>new nn,"ag-material":()=>new ki},an=v(v({},{undefined:rn,null:rn,"ag-default-dark":rn,"ag-sheets-dark":()=>new Wi,"ag-polychroma-dark":()=>new _i,"ag-vivid-dark":()=>new Qi,"ag-material-dark":()=>new Di}),on);function ln(e){let t=function(e){return void 0===e||"string"==typeof e||e instanceof Ci?e:"object"==typeof e?function(e){if(null===e)return;let t=!0;const{baseTheme:i,palette:n,overrides:s}=e;if(void 0!==i&&"string"!=typeof i&&"object"!=typeof i&&(O.warn(`invalid theme.baseTheme type ${typeof i}, expected (string | object).`),t=!1),void 0!==s&&"object"!=typeof s&&(O.warn(`invalid theme.overrides type ${typeof s}, expected object.`),t=!1),"object"==typeof n){if(null!==n){const{fills:e,strokes:i}=n;void 0===e||Array.isArray(e)||(O.warn("theme.overrides.fills must be undefined or an array"),t=!1),void 0===i||Array.isArray(i)||(O.warn("theme.overrides.strokes must be undefined or an array"),t=!1)}}else void 0!==n&&(O.warn(`invalid theme.palette type ${typeof n}, expected object.`),t=!1);return t?e:void 0}(e):void O.warn(`invalid theme value type ${typeof e}, expected object or string.`)}(e);if(t instanceof Ci)return t;if(null==t||"string"==typeof t){const e=an[t];return e?e():(O.warnOnce(`the theme [${t}] is invalid, using [ag-default] instead.`),sn())}const i=[];let n;for(;"object"==typeof t;)i.push(t.overrides),null!=n||(n=t.palette),t=t.baseTheme;const s={baseTheme:t,overrides:Xe(...i),palette:n};return new((s.baseTheme?ln(s.baseTheme):sn()).constructor)(s)}function cn(e){if(0===e.length)return;let t=1/0,i=-1/0;for(let n of e)n instanceof Date&&(n=n.getTime()),"number"==typeof n&&(n<t&&(t=n),n>i&&(i=n));const n=[t,i];return n.every(isFinite)?n:void 0}function hn(e,t,i){return dn(e,t,i).extent}function dn(e,t,i){var n;let s=!1;return e.length>2&&(e=null!=(n=cn(e))?n:[NaN,NaN]),isNaN(t)||(s||(s=t>e[0]),e=[t,e[1]]),isNaN(i)||(s||(s=i<e[1]),e=[e[0],i]),e[0]>e[1]&&(e=[]),{extent:e,clipped:s}}function un(e,t){if(null==e||null==t||e.length!==t.length)return!1;for(let i=0;i<e.length;i++)if(Array.isArray(e[i])&&Array.isArray(t[i])){if(!un(e[i],t[i]))return!1}else if(e[i]!==t[i])return!1;return!0}function pn(e){return void 0===e?[]:Array.isArray(e)?e:[e]}function gn(e){return Array.from(new Set(e))}function fn(e,t){return e.reduce((e,i)=>{const n=t(i);return null!=e[n]||(e[n]=[]),e[n].push(i),e},{})}function mn(e,t,i=0){if(0===e.length)return[];const n=[];for(let s=0;s<t;s++)n.push(e.at((s+i)%e.length));return n}function vn(e,t){return t.reduce(([t,i],n)=>e(n)?[[...t,n],i]:[t,[...i,n]],[[],[]])}function*yn(e,t){for(const i of e)yield t(i)}function Cn(e,t){return!t.some(t=>!function(e,t){return function(e,t){return e.includes(t)}(e,t)}(e,t))}var bn={},Sn=new WeakMap;function wn(e){var t;return e?null==(t=bn.document)?void 0:t[e]:bn.document}function xn(e){var t;return e?null==(t=bn.window)?void 0:t[e]:bn.window}function En(e,t,i){const n=wn().createElement(e);return"object"==typeof t&&(i=t,t=void 0),t&&n.classList.add(t),i&&Object.assign(n.style,i),n}function Mn(e,t){const{body:i}=wn(),n=En("a",{display:"none"});n.href=e,n.download=t,i.appendChild(n),n.click(),setTimeout(()=>i.removeChild(n))}function An(e,t){var i,n;const s=wn();if(t&&(null==(i=Sn.get(s))?void 0:i.has(t)))return;const r=En("style");r.innerHTML=e,s.head.insertBefore(r,s.head.querySelector("style")),t&&!Sn.has(s)?Sn.set(s,new Set([t])):t&&(null==(n=Sn.get(s))||n.add(t))}function Tn(e){bn.document=e}function Dn(e){bn.window=e}"undefined"!=typeof window?bn.window=window:void 0!==i.g&&(bn.window=i.g.window),"undefined"!=typeof document?bn.document=document:void 0!==i.g&&(bn.document=i.g.document);var In=Date.now(),Rn={create:(...e)=>Object.assign((...t)=>{Rn.check(...e)&&("function"==typeof t[0]&&(t=pn(t[0]())),(()=>{const e=Date.now()-In;if(e>2e3){const t=(Math.floor(e/100)/10).toFixed(1);O.log(`**** ${t}s since last log message ****`)}In=Date.now()})(),O.log(...t))},{check:()=>Rn.check(...e)}),check:(...e)=>(0===e.length&&e.push(!0),pn(xn("agChartsDebug")).some(t=>e.includes(t)))},Ln=new Set(["map-shape-background","map-line-background"]),kn=class{constructor(e,t){var i,n;const s={shallow:["data"]},r=xt(e,s),o=this.optionsType(r);this.sanityCheckAndCleanup(r),this.userOptions=r,this.activeTheme=ln(r.theme),this.defaultAxes=this.getDefaultAxes(r),this.specialOverrides=this.specialOverridesDefaults(v({},t));const a=this.getSeriesThemeConfig(o),{axes:l={},annotations:c={},series:h}=a,d=C(a,["axes","annotations","series"]);this.processedOptions=xt(Xe(this.userOptions,d,this.defaultAxes),s),this.processAxesOptions(this.processedOptions,l),this.processSeriesOptions(this.processedOptions),this.processMiniChartSeriesOptions(this.processedOptions),this.processAnnotationsOptions(this.processedOptions,c),(pt(this.processedOptions)||function(e){const t=ut(e);return gt(e)&&"pie"!==t&&"donut"!==t}(this.processedOptions))&&null==(null==(i=this.processedOptions.legend)?void 0:i.enabled)&&(null!=(n=this.processedOptions).legend||(n.legend={}),this.processedOptions.legend.enabled=this.processedOptions.series.length>1),this.enableConfiguredOptions(this.processedOptions),Se.isEnterprise||function(e){var t,i,n,s;const r=[],o=ot.get(ut(e));for(const{type:a,chartTypes:l,optionsKey:c,optionsInnerKey:h,identifier:d}of ct)if("unknown"===o||l.includes(o))if("root"===a||"legend"===a){const t=e[c];if(null==t)continue;h?t[h]&&(r.push(`${c}.${h}`),delete t[h]):(r.push(c),delete e[c])}else if("axis"===a){if(!("axes"in e)||!(null==(t=e.axes)?void 0:t.some(e=>e.type===d)))continue;r.push(`axis[type=${d}]`),e.axes=e.axes.filter(e=>e.type!==d)}else if("axis-option"===a){if(!("axes"in e)||!(null==(i=e.axes)?void 0:i.some(e=>e[c])))continue;r.push(`axis.${c}`),e.axes.forEach(e=>{e[c]&&delete e[c]})}else if("series"===a){if(!(null==(n=e.series)?void 0:n.some(e=>e.type===d)))continue;r.push(`series[type=${d}]`),e.series=e.series.filter(e=>e.type!==d)}else if("series-option"===a){if(!(null==(s=e.series)?void 0:s.some(e=>e[c])))continue;r.push(`series.${c}`),e.series.forEach(e=>{e[c]&&delete e[c]})}if(r.length){let t="ag-charts-enterprise",i="https://charts.ag-grid.com/javascript/installation/";"integrated"===e.mode&&(t="ag-grid-charts-enterprise' or 'ag-grid-enterprise/charts-enterprise",i="https://www.ag-grid.com/javascript-data-grid/integrated-charts-installation/"),O.warnOnce([`unable to use these enterprise features as '${t}' has not been loaded:`,"",...r,"",`See: ${i}`].join("\n"))}}(this.processedOptions)}getOptions(){var e;return null!=(e=this.processedOptions)?e:{}}diffOptions(e){return wt(e,this.processedOptions)}getSeriesThemeConfig(e){var t,i;return xt(null!=(i=null==(t=this.activeTheme)?void 0:t.config[e])?i:{})}getDefaultAxes(e){const t=this.optionsType(e),i=It.cloneDefaultAxes(t);return It.isDefaultAxisSwapNeeded(e)&&this.swapAxesPosition(i),i}optionsType(e){var t,i,n;return null!=(n=null==(i=null==(t=e.series)?void 0:t[0])?void 0:i.type)?n:"line"}sanityCheckAndCleanup(e){var t;this.deprecationWarnings(e),this.axesTypeIntegrity(e),this.seriesTypeIntegrity(e),this.soloSeriesIntegrity(e),this.removeDisabledOptions(e),this.removeLeftoverSymbols(e),(null==(t=e.series)?void 0:t.some(e=>"bullet"===e.type))&&null!=e.sync&&!1!==e.sync.enabled&&(O.warnOnce("bullet series cannot be synced, disabling synchronization."),delete e.sync)}swapAxesPosition(e){var t;if(pt(e)){const[i,n]=null!=(t=e.axes)?t:[];e.axes=[y(v({},i),{position:n.position}),y(v({},n),{position:i.position})]}}processAxesOptions(e,t){"axes"in e&&(e.axes=e.axes.map(e=>{var i,n,s;const r=Xe(null==(i=t[e.type])?void 0:i[e.position],t[e.type]),{crossLines:o}=r,a=C(r,["crossLines"]);e.crossLines&&(e.crossLines=Ze(e.crossLines,o));const l=null==(n=a.gridLine)?void 0:n.style;(null==(s=e.gridLine)?void 0:s.style)&&(null==l?void 0:l.length)&&(e.gridLine.style=e.gridLine.style.map((e,t)=>null!=e.stroke||null!=e.lineDash?Xe(e,l.at(t%l.length)):e));const c=Xe(e,a),{top:h,right:d,bottom:u,left:p}=c;return C(c,["top","right","bottom","left"])}))}processSeriesOptions(e){const t=this.getDefaultSeriesType(e),i=this.getTooltipPositionDefaults(e),n=Boolean(Ve(e.theme)&&e.theme.palette),s={colourIndex:0,userPalette:n},r=e.series.map(e=>{var r;null!=e.type||(e.type=t);const o=null!=(r=this.getSeriesThemeConfig(e.type).series)?r:{},{innerLabels:a}=o,l=C(o,["innerLabels"]),c=Ln.has(e.type)?{colourIndex:0,userPalette:n}:s,h=this.getSeriesPalette(e.type,c),d=Xe(this.getSeriesGroupingOptions(e),e,i,l,h);return d.innerLabels&&(d.innerLabels=Ze(d.innerLabels,a)),this.activeTheme.templateTheme(d)});e.series=this.setSeriesGroupingOptions(r)}processMiniChartSeriesOptions(e){var t,i;let n=null==(i=null==(t=e.navigator)?void 0:t.miniChart)?void 0:i.series;if(null==n)return;const s={colourIndex:0,userPalette:Boolean(Ve(e.theme)&&e.theme.palette)};n=n.map(e=>{var t;null!=e.type||(e.type="line");const i=null!=(t=this.getSeriesThemeConfig(e.type).series)?t:{},{innerLabels:n}=i,r=C(i,["innerLabels"]),o=Xe(this.getSeriesGroupingOptions(e),e,r,this.getSeriesPalette(e.type,s));return this.activeTheme.templateTheme(o)}),e.navigator.miniChart.series=this.setSeriesGroupingOptions(n)}processAnnotationsOptions(e,t){pt(e)}getSeriesPalette(e,t){const i=It.getPaletteFactory(e),{colourIndex:n,userPalette:s}=t,{fills:r=[],strokes:o=[]}=this.activeTheme.palette;return null==i?void 0:i({userPalette:s,colorsCount:Math.max(r.length,o.length),themeTemplateParameters:this.activeTheme.getTemplateParameters(),takeColors:e=>(t.colourIndex+=e,{fills:mn(r,e,n),strokes:mn(o,e,n)})})}getSeriesGroupingOptions(e){const t=It.isGroupable(e.type),i=It.isStackable(e.type),n=It.isStackedByDefault(e.type);e.grouped&&!t&&O.warnOnce(`unsupported grouping of series type "${e.type}".`),!e.stacked&&!e.stackGroup||i||O.warnOnce(`unsupported stacking of series type "${e.type}".`);let{grouped:s,stacked:r}=e;return null!=r||(r=(n||null!=e.stackGroup)&&!(t&&s)),null!=s||(s=!0),{stacked:i&&r,grouped:t&&s&&!(i&&r)}}setSeriesGroupingOptions(e){const t=this.getSeriesGrouping(e);Rn.create(!0,"opts")("setSeriesGroupingOptions() - series grouping: ",t);const i={},n=t.reduce((e,t)=>{var i;return"default"===t.groupType||(null!=e[i=t.seriesType]||(e[i]=0),e[t.seriesType]+="stack"===t.groupType?1:t.series.length),e},{});return t.flatMap(e=>{var t;switch(null!=i[t=e.seriesType]||(i[t]=0),e.groupType){case"stack":const t=i[e.seriesType]++;return e.series.map((i,s)=>Object.assign(i,{seriesGrouping:{groupIndex:t,groupCount:n[e.seriesType],stackIndex:s,stackCount:e.series.length}}));case"group":return e.series.map(t=>Object.assign(t,{seriesGrouping:{groupIndex:i[e.seriesType]++,groupCount:n[e.seriesType],stackIndex:0,stackCount:0}}))}return e.series}).map(e=>{var t=e,{stacked:i,grouped:n}=t;return C(t,["stacked","grouped"])})}getSeriesGroupId(e){var t;return[e.type,e.xKey,e.stacked?null!=(t=e.stackGroup)?t:"stacked":"grouped"].filter(Boolean).join("-")}getSeriesGrouping(e){const t=new Map;return e.reduce((e,i)=>{const n=i.type;if(i.stacked||i.grouped){const s=this.getSeriesGroupId(i);if(!t.has(s)){const r={groupType:i.stacked?"stack":"group",seriesType:n,series:[]};t.set(s,r),e.push(r)}t.get(s).series.push(i)}else e.push({groupType:"default",seriesType:n,series:[i]});return e},[])}getDefaultSeriesType(e){if(pt(e))return"line";if(gt(e))return"pie";if(ft(e))return"treemap";if(mt(e))return"map-shape";throw new Error("Invalid chart options type detected.")}getTooltipPositionDefaults(e){var t;const i=null==(t=e.tooltip)?void 0:t.position;if(!He(i))return;const{type:n,xOffset:s,yOffset:r}=i,o={};return ze(n)&&$e(T,n)&&(o.type=n),We(s)&&(o.xOffset=s),We(r)&&(o.yOffset=r),{tooltip:{position:o}}}deprecationWarnings(e){Object.entries({yKeys:"yKey",yNames:"yName"}).forEach(([t,i])=>{var n;(null==(n=e.series)?void 0:n.some(e=>null!=e[t]))&&O.warnOnce(`Property [series.${t}] is deprecated, please use [series.${i}] and multiple series instead.`)})}axesTypeIntegrity(e){var t;if("axes"in e){const i=null!=(t=e.axes)?t:[];for(const{type:t}of i)if(!vt(t)){delete e.axes;const i=Array.from(Ee.publicKeys()).join(", ");O.warnOnce(`unknown axis type: ${t}; expected one of: ${i}`)}}}seriesTypeIntegrity(e){var t;const i=null!=(t=e.series)?t:[];e.series=i.filter(({type:e})=>{if(null==e||null!=(t=e)&&ot.has(t)||function(e){return ct.some(t=>"series"===t.type&&t.identifier===e)}(e))return!0;var t;O.warnOnce(`unknown series type: ${e}; expected one of: ${at.seriesTypes.join(", ")}`)})}soloSeriesIntegrity(e){const t=e.series;if(t&&t.length>1&&t.some(e=>It.isSolo(e.type))){const i=this.optionsType(e);if(It.isSolo(i))O.warn(`series[0] of type '${i}' is incompatible with other series types. Only processing series[0]`),e.series=t.slice(0,1);else{const{solo:i,nonSolo:n}=fn(t,e=>It.isSolo(e.type)?"solo":"nonSolo"),s=gn(i.map(e=>e.type)).join(", ");O.warn(`Unable to mix these series types with the lead series type: ${s}`),e.series=n}}}enableConfiguredOptions(e){Mt(this.userOptions,(e,t)=>{t&&"enabled"in t&&!t._enabledFromTheme&&null==e.enabled&&(t.enabled=!0)},{skip:["data","theme"]},e),Mt(e,e=>{null!=e._enabledFromTheme&&delete e._enabledFromTheme},{skip:["data","theme"]})}removeDisabledOptions(e){Mt(e,e=>{"enabled"in e&&!1===e.enabled&&Object.keys(e).forEach(t=>{"enabled"!==t&&delete e[t]})},{skip:["data","theme"]})}removeLeftoverSymbols(e){Mt(e,e=>{if(e&&Ve(e))for(const[t,i]of Object.entries(e))Ye(i)&&delete e[t]},{skip:["data"]})}specialOverridesDefaults(e){if(null!=e.window?Dn(e.window):"undefined"!=typeof window?e.window=window:void 0!==i.g&&(e.window=i.g.window),null!=e.document?Tn(e.document):"undefined"!=typeof document?e.document=document:void 0!==i.g&&(e.document=i.g.document),null==e.window)throw new Error("AG Charts - unable to resolve global window");if(null==e.document)throw new Error("AG Charts - unable to resolve global document");return e}};function Pn(){return(e,t)=>{const i=[`Property [${e}] is deprecated.`,t].filter(Boolean).join(" ");O.warnOnce(i)}}function Nn(e,t){const i=Pn(),n=null==t?void 0:t.default;return De((t,s,r)=>(r!==n&&i(s.toString(),e),r))}function On(e,t){const i=Pn();return De((n,s,r)=>(r!==n[e]&&(i(s.toString(),`Use [${e}] instead.`),it(n,e,t?t(r):r)),Me),(t,n)=>(i(n.toString(),`Use [${e}] instead.`),et(t,e)))}var _n={};b(_n,{NODE_UPDATE_STATE_TO_PHASE_MAPPING:()=>Rs,fromToMotion:()=>Ls,staticFromToMotion:()=>ks});var Fn=new Map;function Gn(){Fn.clear()}function Vn(e){var t;const i=e.constructor,n=Object.hasOwn(i,"className")?i.className:i.name;if(!n)throw new Error(`The ${i} is missing the 'className' property.`);const s=(null!=(t=Fn.get(n))?t:0)+1;return Fn.set(n,s),`${n}-${s}`}var Bn="$interpolate",Hn=e=>null!=e[Bn];function zn(e,t,i){return Math.min(i,Math.max(e,t))}function Un(e,t){const[i,n]=Wn(t);return zn(i,e,n)}function Wn(e){return e.length?[Math.min(...e),Math.max(...e)]:[]}function jn(e){const[t,i]=Wn(e);return i-t}function Kn(e,t,i=1e-10){return Math.abs(e-t)<i}function $n(e){return-1===Math.sign(e)||Object.is(e,-0)}function Yn(e,t=2){const i=f(10,t);return Math.round(e*i)/i}function qn(e,t=2){const i=Math.floor(Math.log(Math.abs(e))/Math.LN10);return i>=0||!isFinite(i)?e.toFixed(t):e.toFixed(Math.abs(i)-1+t)}function Xn(e,t){return Math.floor(e%t+(e<0?t:0))}function Zn(e,t=10){const[,i=""]=(Math.abs(e)%1).toLocaleString("en-GB",{minimumFractionDigits:0,maximumFractionDigits:t}).split(".");return i.length}function Qn(e,t,i,n=1/0){const s={nearest:void 0,distanceSquared:n};for(const n of i){const i=n.distanceSquared(e,t);if(0===i)return{nearest:n,distanceSquared:0};i<s.distanceSquared&&(s.nearest=n,s.distanceSquared=i)}return s}function Jn(e,t,i,n=1/0){const{x:s,y:r}=i.transformPoint(e,t),o={nearest:void 0,distanceSquared:n};for(const e of i.children){const{nearest:t,distanceSquared:i}=e.nearestSquared(s,r,o.distanceSquared);if(0===i)return{nearest:t,distanceSquared:i};i<o.distanceSquared&&(o.nearest=t,o.distanceSquared=i)}return o}var es=class e{constructor(e,t,i,n){this.x=e,this.y=t,this.width=i,this.height=n}clone(){const{x:t,y:i,width:n,height:s}=this;return new e(t,i,n,s)}equals(e){return this.x===e.x&&this.y===e.y&&this.width===e.width&&this.height===e.height}containsPoint(e,t){return e>=this.x&&e<=this.x+this.width&&t>=this.y&&t<=this.y+this.height}collidesBBox(e){return this.x<e.x+e.width&&this.x+this.width>e.x&&this.y<e.y+e.height&&this.y+this.height>e.y}computeCenter(){return{x:this.x+this.width/2,y:this.y+this.height/2}}isFinite(){return Number.isFinite(this.x)&&Number.isFinite(this.y)&&Number.isFinite(this.width)&&Number.isFinite(this.height)}distanceSquared(e,t){if(this.containsPoint(e,t))return 0;const i=e-zn(this.x,e,this.x+this.width),n=t-zn(this.y,t,this.y+this.height);return i*i+n*n}static nearestBox(e,t,i){return Qn(e,t,i)}clip(e){if(void 0===e)return this;const t=Math.max(this.x,e.x),i=Math.max(this.y,e.y),n=Math.min(this.x+this.width,e.x+e.width),s=Math.min(this.y+this.height,e.y+e.height);return this.x=t,this.y=i,this.width=Math.max(0,n-t),this.height=Math.max(0,s-i),this}shrink(e,t){const i=(e,t)=>{switch(e){case"top":this.y+=t;case"bottom":this.height-=t;break;case"left":this.x+=t;case"right":this.width-=t;break;case"vertical":this.y+=t,this.height-=2*t;break;case"horizontal":this.x+=t,this.width-=2*t;break;case void 0:this.x+=t,this.width-=2*t,this.y+=t,this.height-=2*t}};return"number"==typeof e?i(t,e):"object"==typeof e&&Object.entries(e).forEach(([e,t])=>i(e,t)),this}grow(e,t){if("number"==typeof e)this.shrink(-e,t);else{const t=v({},e);for(const e in t)t[e]*=-1;this.shrink(t)}return this}combine(e){const{x:t,y:i,width:n,height:s}=this;this.x=Math.min(t,e.x),this.y=Math.min(i,e.y),this.width=Math.max(t+n,e.x+e.width)-this.x,this.height=Math.max(i+s,e.y+e.height)-this.y}static merge(t){let i=1/0,n=1/0,s=-1/0,r=-1/0;for(const e of t)e.x<i&&(i=e.x),e.y<n&&(n=e.y),e.x+e.width>s&&(s=e.x+e.width),e.y+e.height>r&&(r=e.y+e.height);return new e(i,n,s-i,r-n)}[Bn](t,i){return new e(this.x*(1-i)+t.x*i,this.y*(1-i)+t.y*i,this.width*(1-i)+t.width*i,this.height*(1-i)+t.height*i)}};es.zero=new es(0,0,0,0),es.NaN=new es(NaN,NaN,NaN,NaN);var ts=es,is=(e=>(e[e.NONE=0]="NONE",e[e.TRIVIAL=1]="TRIVIAL",e[e.MINOR=2]="MINOR",e[e.MAJOR=3]="MAJOR",e))(is||{}),ns=function(){try{return new Function("return true"),!0}catch(e){return!1}}();function ss(e){const{changeCb:t,convertor:i}=null!=e?e:{};return function(n,s){const r=`__${s}`;n[s]||(ns&&null==t&&null==i?function(e,t,i,n){const{redraw:s=1,type:r="normal",checkDirtyOnAssignment:o=!1}=null!=n?n:{},a=new Function("value",`\n        const oldValue = this.${i};\n        if (value !== oldValue) {\n            this.${i} = value;\n            ${"normal"===r?`this.markDirty(this, ${s});`:""}\n            ${"transform"===r?`this.markDirtyTransform(${s});`:""}\n            ${"path"===r?`if (!this._dirtyPath) { this._dirtyPath = true; this.markDirty(this, ${s}); }`:""}\n            ${"font"===r?`if (!this._dirtyFont) { this._dirtyFont = true; this.markDirty(this, ${s}); }`:""}\n        }\n        ${o?"if (value != null && value._dirty > 0) { this.markDirty(value, value._dirty); }":""}\n`),l=new Function(`return this.${i};`);Object.defineProperty(e,t,{set:a,get:l,enumerable:!0,configurable:!0})}(n,s,r,e):function(e,t,i,n){const{redraw:s=1,type:r="normal",changeCb:o,convertor:a,checkDirtyOnAssignment:l=!1}=null!=n?n:{};Object.defineProperty(e,t,{set:function(e){const t=this[i];(e=a?a(e):e)!==t&&(this[i]=e,"normal"===r&&this.markDirty(this,s),"transform"===r&&this.markDirtyTransform(s),"path"!==r||this._dirtyPath||(this._dirtyPath=!0,this.markDirty(this,s)),"font"!==r||this._dirtyFont||(this._dirtyFont=!0,this.markDirty(this,s)),null==o||o(this)),l&&null!=e&&e._dirty>0&&this.markDirty(e,e._dirty)},get:function(){return this[i]},enumerable:!0,configurable:!0})}(n,s,r,e))}}var rs=class{constructor(){this._dirty=3}markDirty(e,t=1){this._dirty<t&&(this._dirty=t)}markClean(e){this._dirty=0}isDirty(){return this._dirty>0}},os=class e{get e(){return[...this.elements]}constructor(e=[1,0,0,1,0,0]){this.elements=e}setElements(e){const t=this.elements;return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],this}get identity(){const e=this.elements;return 1===e[0]&&0===e[1]&&0===e[2]&&1===e[3]&&0===e[4]&&0===e[5]}AxB(e,t,i){const n=e[0]*t[0]+e[2]*t[1],s=e[1]*t[0]+e[3]*t[1],r=e[0]*t[2]+e[2]*t[3],o=e[1]*t[2]+e[3]*t[3],a=e[0]*t[4]+e[2]*t[5]+e[4],l=e[1]*t[4]+e[3]*t[5]+e[5];(i=null!=i?i:e)[0]=n,i[1]=s,i[2]=r,i[3]=o,i[4]=a,i[5]=l}multiplySelf(e){return this.AxB(this.elements,e.elements),this}multiply(t){const i=new Array(6);return this.AxB(this.elements,t.elements,i),new e(i)}preMultiplySelf(e){return this.AxB(e.elements,this.elements,this.elements),this}inverse(){const t=this.elements;let i=t[0],n=t[1],s=t[2],r=t[3];const o=t[4],a=t[5],l=1/(i*r-n*s);return i*=l,n*=l,s*=l,r*=l,new e([r,-n,-s,i,s*a-r*o,n*o-i*a])}inverseTo(e){const t=this.elements;let i=t[0],n=t[1],s=t[2],r=t[3];const o=t[4],a=t[5],l=1/(i*r-n*s);return i*=l,n*=l,s*=l,r*=l,e.setElements([r,-n,-s,i,s*a-r*o,n*o-i*a]),this}invertSelf(){const e=this.elements;let t=e[0],i=e[1],n=e[2],s=e[3];const r=e[4],o=e[5],a=1/(t*s-i*n);return t*=a,i*=a,n*=a,s*=a,e[0]=s,e[1]=-i,e[2]=-n,e[3]=t,e[4]=n*o-s*r,e[5]=i*r-t*o,this}transformPoint(e,t){const i=this.elements;return{x:e*i[0]+t*i[2]+i[4],y:e*i[1]+t*i[3]+i[5]}}transformBBox(e,t){const i=this.elements,n=i[0],s=i[1],r=i[2],o=i[3],a=.5*e.width,l=.5*e.height,c=e.x+a,h=e.y+l,d=Math.abs(a*n)+Math.abs(l*r),u=Math.abs(a*s)+Math.abs(l*o);return t||(t=new ts(0,0,0,0)),t.x=c*n+h*r+i[4]-d,t.y=c*s+h*o+i[5]-u,t.width=d+d,t.height=u+u,t}toContext(e){if(this.identity)return;const t=this.elements;e.transform(t[0],t[1],t[2],t[3],t[4],t[5])}static flyweight(t){return e.instance.setElements(t.elements)}static updateTransformMatrix(e,t,i,n,s,r,o){const[a,l]=[0,0],c=t,h=i;let d,u;1===c&&1===h?(d=0,u=0):(d=null==(null==o?void 0:o.scalingCenterX)?a:null==o?void 0:o.scalingCenterX,u=null==(null==o?void 0:o.scalingCenterY)?l:null==o?void 0:o.scalingCenterY);const p=n,g=Math.cos(p),f=Math.sin(p);let m,v;0===p?(m=0,v=0):(m=null==(null==o?void 0:o.rotationCenterX)?a:null==o?void 0:o.rotationCenterX,v=null==(null==o?void 0:o.rotationCenterY)?l:null==o?void 0:o.rotationCenterY);const y=s,C=r,b=d*(1-c)-m,S=u*(1-h)-v;return e.setElements([g*c,f*c,-f*h,g*h,g*b-f*S+m+y,f*b+g*S+v+C]),e}static fromContext(t){const i=t.getTransform();return new e([i.a,i.b,i.c,i.d,i.e,i.f])}};os.instance=new os;var as=os,ls=(e=>(e[e.All=0]="All",e[e.None=1]="None",e))(ls||{}),cs=class e extends rs{constructor({isVirtual:t,tag:i,zIndex:n}={}){super(),this.serialNumber=e._nextSerialNumber++,this.id=Vn(this),this.isContainerNode=!1,this._virtualChildren=[],this._children=[],this.childSet={},this.matrix=new as,this.dirtyTransform=!1,this.scalingX=1,this.scalingY=1,this.scalingCenterX=null,this.scalingCenterY=null,this.rotationCenterX=null,this.rotationCenterY=null,this.rotation=0,this.translationX=0,this.translationY=0,this._childNodeCounts={groups:0,nonGroups:0},this.visible=!0,this.dirtyZIndex=!1,this.zIndex=0,this.zIndexSubOrder=void 0,this.pointerEvents=0,this.isVirtual=null!=t&&t,this.tag=null!=i?i:NaN,this.zIndex=null!=n?n:0}get datum(){var e,t;return null!=(t=this._datum)?t:null==(e=this._parent)?void 0:e.datum}get previousDatum(){return this._previousDatum}set datum(e){this._datum!==e&&(this._previousDatum=this._datum),this._datum=e}_setLayerManager(e){this._layerManager=e,this._debug=null==e?void 0:e.debug;for(const t of this._children)t._setLayerManager(e);for(const t of this._virtualChildren)t._setLayerManager(e)}get layerManager(){return this._layerManager}*ancestors(){let e=this;for(;e=e.parent;)yield e}*traverseUp(){yield this,yield*M(this.ancestors())}get parent(){return this._parent}get children(){return this._virtualChildren.length?this._children.concat(this._virtualChildren.flatMap(e=>e.children)):this._children}get virtualChildren(){return this._virtualChildren}hasVirtualChildren(){return this._virtualChildren.length>0}setProperties(e,t){const i=null!=t?t:Object.keys(e);for(const t of i)this[t]=e[t];return this}append(e){Array.isArray(e)||(e=[e]);for(const t of e){if(t.parent)throw new Error(`${t} already belongs to another parent: ${t.parent}.`);if(t.layerManager)throw new Error(`${t} already belongs to a scene: ${t.layerManager}.`);if(this.childSet[t.id])throw new Error(`Duplicate ${t.constructor.name} node: ${t}`);t.isVirtual?this._virtualChildren.push(t):this._children.push(t),this.childSet[t.id]=!0,t._parent=this,t._setLayerManager(this.layerManager)}this.dirtyZIndex=!0,this.markDirty(this,3)}appendChild(e){return this.append(e),e}removeChild(e){const t=()=>{throw new Error("The node to be removed is not a child of this node.")};if(e.parent!==this&&t(),e.isVirtual){const i=this._virtualChildren.indexOf(e);i<0&&t(),this._virtualChildren.splice(i,1)}else{const i=this._children.indexOf(e);i<0&&t(),this._children.splice(i,1)}return delete this.childSet[e.id],e._parent=void 0,e._setLayerManager(),this.dirtyZIndex=!0,this.markDirty(e,3),e}calculateCumulativeMatrix(){this.computeTransformMatrix();const e=as.flyweight(this.matrix);for(const t of this.ancestors())t.computeTransformMatrix(),e.preMultiplySelf(t.matrix);return e}transformPoint(e,t){return this.calculateCumulativeMatrix().invertSelf().transformPoint(e,t)}inverseTransformPoint(e,t){return this.calculateCumulativeMatrix().transformPoint(e,t)}transformBBox(e){return this.calculateCumulativeMatrix().invertSelf().transformBBox(e)}inverseTransformBBox(e){return this.calculateCumulativeMatrix().transformBBox(e)}markDirtyTransform(){this.dirtyTransform=!0,this.markDirty(this,3)}containsPoint(e,t){return!1}pickNode(e,t){var i;if(!this.visible||1===this.pointerEvents||!this.containsPoint(e,t))return;const{children:n}=this;if(n.length>1e3)for(let s=n.length-1;s>=0;s--){const r=n[s],o=(null==(i=r.computeTransformedBBox())?void 0:i.containsPoint(e,t))?r.pickNode(e,t):void 0;if(o)return o}else if(n.length)for(let i=n.length-1;i>=0;i--){const s=n[i].pickNode(e,t);if(s)return s}else if(!this.isContainerNode)return this}getCachedBBox(){var e;return null!=(e=this.cachedBBox)?e:ts.zero}computeBBox(){}computeTransformedBBox(){const e=this.computeBBox();if(!e)return;this.computeTransformMatrix();const t=as.flyweight(this.matrix);for(const e of this.ancestors())e.computeTransformMatrix(),t.preMultiplySelf(e.matrix);return t.transformBBox(e,e),e}computeTransformMatrix(){if(!this.dirtyTransform)return;const{matrix:e,scalingX:t,scalingY:i,rotation:n,translationX:s,translationY:r,scalingCenterX:o,scalingCenterY:a,rotationCenterX:l,rotationCenterY:c}=this;as.updateTransformMatrix(e,t,i,n,s,r,{scalingCenterX:o,scalingCenterY:a,rotationCenterX:l,rotationCenterY:c}),this.dirtyTransform=!1}preRender(){this._childNodeCounts.groups=0,this._childNodeCounts.nonGroups=1;for(const e of this.children){const t=e.preRender();this._childNodeCounts.groups+=t.groups,this._childNodeCounts.nonGroups+=t.nonGroups}return this._childNodeCounts}render(e){const{stats:t}=e;this._dirty=0,this.cachedBBox=this.computeBBox(),t&&t.nodesRendered++}markDirty(e,t=1,i=t){this._dirty>t||this._dirty===t&&t===i||(this._dirty=t,this.parent?this.parent.markDirty(this,i):this.layerManager&&this.layerManager.markDirty())}get dirty(){return this._dirty}markClean(e){const{force:t=!1,recursive:i=!0}=null!=e?e:{};if(0!==this._dirty||t){if(this._dirty=0,!1!==i)for(const e of this._virtualChildren)e.markClean({force:t});if(!0===i)for(const e of this._children)e.markClean({force:t})}}onVisibleChange(){}get nodeCount(){let e=1,t=this._dirty>=0||this.dirtyTransform?1:0,i=this.visible?1:0;const n=n=>{const{count:s,visibleCount:r,dirtyCount:o}=n.nodeCount;e+=s,i+=r,t+=o};for(const e of this._children)n(e);for(const e of this._virtualChildren)n(e);return{count:e,visibleCount:i,dirtyCount:t}}onZIndexChange(){this.parent&&(this.parent.dirtyZIndex=!0)}};cs._nextSerialNumber=0,S([ss({type:"transform"})],cs.prototype,"scalingX",2),S([ss({type:"transform"})],cs.prototype,"scalingY",2),S([ss({type:"transform"})],cs.prototype,"scalingCenterX",2),S([ss({type:"transform"})],cs.prototype,"scalingCenterY",2),S([ss({type:"transform"})],cs.prototype,"rotationCenterX",2),S([ss({type:"transform"})],cs.prototype,"rotationCenterY",2),S([ss({type:"transform"})],cs.prototype,"rotation",2),S([ss({type:"transform"})],cs.prototype,"translationX",2),S([ss({type:"transform"})],cs.prototype,"translationY",2),S([ss({redraw:3,changeCb:e=>e.onVisibleChange()})],cs.prototype,"visible",2),S([ss({redraw:1,changeCb:e=>e.onZIndexChange()})],cs.prototype,"zIndex",2),S([ss({redraw:1,changeCb:e=>e.onZIndexChange()})],cs.prototype,"zIndexSubOrder",2);var hs=cs,ds=e=>{const t=e<0?-1:1,i=Math.abs(e);return i<=.04045?e/12.92:t*f((i+.055)/1.055,2.4)},us=e=>{const t=e<0?-1:1,i=Math.abs(e);return i>.0031308?t*(1.055*f(i,1/2.4)-.055):12.92*e},ps=class e{constructor(e,t,i,n=1){this.r=zn(0,e||0,1),this.g=zn(0,t||0,1),this.b=zn(0,i||0,1),this.a=zn(0,n||0,1)}static validColorString(t){return t.indexOf("#")>=0?!!e.parseHex(t):t.indexOf("rgb")>=0?!!e.stringToRgba(t):!!e.nameToHex[t.toLowerCase()]}static fromString(t){if(t.indexOf("#")>=0)return e.fromHexString(t);const i=e.nameToHex[t.toLowerCase()];if(i)return e.fromHexString(i);if(t.indexOf("rgb")>=0)return e.fromRgbaString(t);throw new Error(`Invalid color string: '${t}'`)}static tryParseFromString(t){try{return e.fromString(t)}catch(i){return O.warnOnce(`invalid color string: '${t}'.`),e.fromArray([0,0,0])}}static parseHex(e){let t;switch((e=e.replace(/ /g,"").slice(1)).length){case 6:case 8:t=[];for(let i=0;i<e.length;i+=2)t.push(parseInt(`${e[i]}${e[i+1]}`,16));break;case 3:case 4:t=e.split("").map(e=>parseInt(e,16)).map(e=>e+16*e)}if((null==t?void 0:t.length)>=3&&t.every(e=>e>=0))return 3===t.length&&t.push(255),t}static fromHexString(t){const i=e.parseHex(t);if(i){const[t,n,s,r]=i;return new e(t/255,n/255,s/255,r/255)}throw new Error(`Malformed hexadecimal color string: '${t}'`)}static stringToRgba(e){let[t,i]=[NaN,NaN];for(let n=0;n<e.length;n++){const s=e[n];if(t||"("!==s){if(")"===s){i=n;break}}else t=n}const n=t&&i&&e.substring(t+1,i);if(!n)return;const s=n.split(","),r=[];for(let e=0;e<s.length;e++){const t=s[e];let i=parseFloat(t);if(isNaN(i))return;t.indexOf("%")>=0?(i=zn(0,i,100),i/=100):3===e?i=zn(0,i,1):(i=zn(0,i,255),i/=255),r.push(i)}return r}static fromRgbaString(t){const i=e.stringToRgba(t);if(i){if(3===i.length)return new e(i[0],i[1],i[2]);if(4===i.length)return new e(i[0],i[1],i[2],i[3])}throw new Error(`Malformed rgb/rgba color string: '${t}'`)}static fromArray(t){if(4===t.length)return new e(t[0],t[1],t[2],t[3]);if(3===t.length)return new e(t[0],t[1],t[2]);throw new Error("The given array should contain 3 or 4 color components (numbers).")}static fromHSB(t,i,n,s=1){const r=e.HSBtoRGB(t,i,n);return new e(r[0],r[1],r[2],s)}static fromHSL(t,i,n,s=1){const r=e.HSLtoRGB(t,i,n);return new e(r[0],r[1],r[2],s)}static fromOKLCH(t,i,n,s=1){const r=e.OKLCHtoRGB(t,i,n);return new e(r[0],r[1],r[2],s)}static padHex(e){return 1===e.length?"0"+e:e}toHexString(){let t="#"+e.padHex(Math.round(255*this.r).toString(16))+e.padHex(Math.round(255*this.g).toString(16))+e.padHex(Math.round(255*this.b).toString(16));return this.a<1&&(t+=e.padHex(Math.round(255*this.a).toString(16))),t}toRgbaString(e=3){const t=[Math.round(255*this.r),Math.round(255*this.g),Math.round(255*this.b)],i=Math.pow(10,e);return 1!==this.a?(t.push(Math.round(this.a*i)/i),`rgba(${t.join(", ")})`):`rgb(${t.join(", ")})`}toString(){return 1===this.a?this.toHexString():this.toRgbaString()}toHSB(){return e.RGBtoHSB(this.r,this.g,this.b)}static RGBtoOKLCH(e,t,i){const n=ds(e),s=ds(t),r=ds(i),o=Math.cbrt(.4122214708*n+.5363325363*s+.0514459929*r),a=Math.cbrt(.2119034982*n+.6806995451*s+.1073969566*r),l=Math.cbrt(.0883024619*n+.2817188376*s+.6299787005*r),c=.2104542553*o+.793617785*a-.0040720468*l,h=1.9779984951*o-2.428592205*a+.4505937099*l,d=.0259040371*o+.7827717662*a-.808675766*l,u=180*Math.atan2(d,h)/Math.PI;return[c,Math.hypot(h,d),u>=0?u:u+360]}static OKLCHtoRGB(e,t,i){const n=e,s=t*Math.cos(i*Math.PI/180),r=t*Math.sin(i*Math.PI/180),o=f(n+.3963377774*s+.2158037573*r,3),a=f(n-.1055613458*s-.0638541728*r,3),l=f(n-.0894841775*s-1.291485548*r,3),c=-1.2684380046*o+2.6097574011*a-.3413193965*l,h=-.0041960863*o-.7034186147*a+1.707614701*l;return[us(4.0767416621*o-3.3077115913*a+.2309699292*l),us(c),us(h)]}static RGBtoHSL(e,t,i){const n=Math.min(e,t,i),s=Math.max(e,t,i),r=(s+n)/2;let o,a;if(s===n)o=NaN,a=0;else{const l=s-n;a=r>.5?l/(2-s-n):l/(s+n),o=s===e?(t-i)/l+(t<i?6:0):s===t?(i-e)/l+2:(e-t)/l+4,o*=60}return[o,a,r]}static HSLtoRGB(e,t,i){if(0===t)return[i,i,i];const n=i<.5?i*(1+t):i+t-i*t,s=2*i-n;function r(e){return e<0&&(e+=1),e>1&&(e-=1),e<1/6?s+6*(n-s)*e:e<.5?n:e<2/3?s+(n-s)*(2/3-e)*6:s}return[r(e/360+1/3),r(e/360),r(e/360-1/3)]}static RGBtoHSB(e,t,i){const n=Math.min(e,t,i),s=Math.max(e,t,i);let r=NaN;if(n!==s){const o=s-n,a=(s-e)/o,l=(s-t)/o,c=(s-i)/o;r=e===s?c-l:t===s?2+a-c:4+l-a,r/=6,r<0&&(r+=1)}return[360*r,0===s?0:(s-n)/s,s]}static HSBtoRGB(e,t,i){isNaN(e)&&(e=0),e=(e%360+360)%360/360;let n=0,s=0,r=0;if(0===t)n=s=r=i;else{const o=6*(e-Math.floor(e)),a=o-Math.floor(o),l=i*(1-t),c=i*(1-t*a),h=i*(1-t*(1-a));switch(0|o){case 0:n=i,s=h,r=l;break;case 1:n=c,s=i,r=l;break;case 2:n=l,s=i,r=h;break;case 3:n=l,s=c,r=i;break;case 4:n=h,s=l,r=i;break;case 5:n=i,s=l,r=c}}return[n,s,r]}derive(t,i,n,s){const r=e.RGBtoHSB(this.r,this.g,this.b);let o=r[2];0==o&&n>1&&(o=.05);const a=((r[0]+t)%360+360)%360,l=zn(0,r[1]*i,1);o=zn(0,o*n,1);const c=zn(0,this.a*s,1),h=e.HSBtoRGB(a,l,o);return h.push(c),e.fromArray(h)}brighter(){return this.derive(0,1,1/.7,1)}darker(){return this.derive(0,1,.7,1)}static interpolate(t,i){const n=e.tryParseFromString(t),s=e.tryParseFromString(i);return t=>{const i=(e,i)=>e*(1-t)+i*t;return new e(i(n.r,s.r),i(n.g,s.g),i(n.b,s.b),i(n.a,s.a)).toString()}}};ps.didDebug=!1,ps.nameToHex=Object.freeze({aliceblue:"#F0F8FF",antiquewhite:"#FAEBD7",aqua:"#00FFFF",aquamarine:"#7FFFD4",azure:"#F0FFFF",beige:"#F5F5DC",bisque:"#FFE4C4",black:"#000000",blanchedalmond:"#FFEBCD",blue:"#0000FF",blueviolet:"#8A2BE2",brown:"#A52A2A",burlywood:"#DEB887",cadetblue:"#5F9EA0",chartreuse:"#7FFF00",chocolate:"#D2691E",coral:"#FF7F50",cornflowerblue:"#6495ED",cornsilk:"#FFF8DC",crimson:"#DC143C",cyan:"#00FFFF",darkblue:"#00008B",darkcyan:"#008B8B",darkgoldenrod:"#B8860B",darkgray:"#A9A9A9",darkgreen:"#006400",darkgrey:"#A9A9A9",darkkhaki:"#BDB76B",darkmagenta:"#8B008B",darkolivegreen:"#556B2F",darkorange:"#FF8C00",darkorchid:"#9932CC",darkred:"#8B0000",darksalmon:"#E9967A",darkseagreen:"#8FBC8F",darkslateblue:"#483D8B",darkslategray:"#2F4F4F",darkslategrey:"#2F4F4F",darkturquoise:"#00CED1",darkviolet:"#9400D3",deeppink:"#FF1493",deepskyblue:"#00BFFF",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1E90FF",firebrick:"#B22222",floralwhite:"#FFFAF0",forestgreen:"#228B22",fuchsia:"#FF00FF",gainsboro:"#DCDCDC",ghostwhite:"#F8F8FF",gold:"#FFD700",goldenrod:"#DAA520",gray:"#808080",green:"#008000",greenyellow:"#ADFF2F",grey:"#808080",honeydew:"#F0FFF0",hotpink:"#FF69B4",indianred:"#CD5C5C",indigo:"#4B0082",ivory:"#FFFFF0",khaki:"#F0E68C",lavender:"#E6E6FA",lavenderblush:"#FFF0F5",lawngreen:"#7CFC00",lemonchiffon:"#FFFACD",lightblue:"#ADD8E6",lightcoral:"#F08080",lightcyan:"#E0FFFF",lightgoldenrodyellow:"#FAFAD2",lightgray:"#D3D3D3",lightgreen:"#90EE90",lightgrey:"#D3D3D3",lightpink:"#FFB6C1",lightsalmon:"#FFA07A",lightseagreen:"#20B2AA",lightskyblue:"#87CEFA",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#B0C4DE",lightyellow:"#FFFFE0",lime:"#00FF00",limegreen:"#32CD32",linen:"#FAF0E6",magenta:"#FF00FF",maroon:"#800000",mediumaquamarine:"#66CDAA",mediumblue:"#0000CD",mediumorchid:"#BA55D3",mediumpurple:"#9370DB",mediumseagreen:"#3CB371",mediumslateblue:"#7B68EE",mediumspringgreen:"#00FA9A",mediumturquoise:"#48D1CC",mediumvioletred:"#C71585",midnightblue:"#191970",mintcream:"#F5FFFA",mistyrose:"#FFE4E1",moccasin:"#FFE4B5",navajowhite:"#FFDEAD",navy:"#000080",oldlace:"#FDF5E6",olive:"#808000",olivedrab:"#6B8E23",orange:"#FFA500",orangered:"#FF4500",orchid:"#DA70D6",palegoldenrod:"#EEE8AA",palegreen:"#98FB98",paleturquoise:"#AFEEEE",palevioletred:"#DB7093",papayawhip:"#FFEFD5",peachpuff:"#FFDAB9",peru:"#CD853F",pink:"#FFC0CB",plum:"#DDA0DD",powderblue:"#B0E0E6",purple:"#800080",rebeccapurple:"#663399",red:"#FF0000",rosybrown:"#BC8F8F",royalblue:"#4169E1",saddlebrown:"#8B4513",salmon:"#FA8072",sandybrown:"#F4A460",seagreen:"#2E8B57",seashell:"#FFF5EE",sienna:"#A0522D",silver:"#C0C0C0",skyblue:"#87CEEB",slateblue:"#6A5ACD",slategray:"#708090",slategrey:"#708090",snow:"#FFFAFA",springgreen:"#00FF7F",steelblue:"#4682B4",tan:"#D2B48C",teal:"#008080",thistle:"#D8BFD8",tomato:"#FF6347",transparent:"#00000000",turquoise:"#40E0D0",violet:"#EE82EE",wheat:"#F5DEB3",white:"#FFFFFF",whitesmoke:"#F5F5F5",yellow:"#FFFF00",yellowgreen:"#9ACD32"});var gs=ps;function fs(e,t){return i=>Number(e)*(1-i)+Number(t)*i}var ms={};b(ms,{easeIn:()=>ys,easeInOut:()=>bs,easeInOutQuad:()=>xs,easeInQuad:()=>Ss,easeOut:()=>Cs,easeOutQuad:()=>ws,inverseEaseOut:()=>Es,linear:()=>vs});var vs=e=>e,ys=e=>1-Math.cos(e*Math.PI/2),Cs=e=>Math.sin(e*Math.PI/2),bs=e=>-(Math.cos(e*Math.PI)-1)/2,Ss=e=>e*e,ws=e=>1-f(1-e,2),xs=e=>e<.5?2*e*e:1-f(-2*e+2,2)/2,Es=e=>2*Math.asin(e)/Math.PI,Ms=["initial","remove","update","add","trailing","end","none"],As={initial:{animationDuration:1,animationDelay:0},add:{animationDuration:.25,animationDelay:.75},remove:{animationDuration:.25,animationDelay:0},update:{animationDuration:.5,animationDelay:.25},trailing:{animationDuration:.2,animationDelay:1,skipIfNoEarlierAnimations:!0},end:{animationDelay:1.2,animationDuration:0,skipIfNoEarlierAnimations:!0},none:{animationDuration:0,animationDelay:0}},Ts=(e=>(e.Loop="loop",e.Reverse="reverse",e))(Ts||{});function Ds(e){return e.every(e=>e instanceof hs)?{nodes:e,selections:[]}:{nodes:[],selections:e}}var Is=class{constructor(e){var t,i,n,s,r,o,a;this.isComplete=!1,this.elapsed=0,this.iteration=0,this.isPlaying=!1,this.isReverse=!1,this.id=e.id,this.groupId=e.groupId,this.autoplay=null==(t=e.autoplay)||t,this.ease=null!=(i=e.ease)?i:vs,this.phase=e.phase;const l=null!=(n=e.duration)?n:As[this.phase].animationDuration;this.duration=l*e.defaultDuration,this.delay=(null!=(s=e.delay)?s:0)*e.defaultDuration,this.onComplete=e.onComplete,this.onPlay=e.onPlay,this.onStop=e.onStop,this.onUpdate=e.onUpdate,this.interpolate=this.createInterpolator(e.from,e.to),this.from=e.from,!0===e.skip&&(null==(r=this.onUpdate)||r.call(this,e.to,!1,this),null==(o=this.onStop)||o.call(this,this),null==(a=this.onComplete)||a.call(this,this),this.isComplete=!0),!1!==e.collapsable&&(this.duration=this.checkCollapse(e,this.duration))}checkCollapse(e,t){return e.from===e.to?0:"object"==typeof e.from&&wt(e.from,e.to)?t:0}play(e=!1){var t,i;this.isPlaying||this.isComplete||(this.isPlaying=!0,null==(t=this.onPlay)||t.call(this,this),this.autoplay&&(this.autoplay=!1,e&&(null==(i=this.onUpdate)||i.call(this,this.from,!0,this))))}pause(){this.isPlaying=!1}stop(){var e;this.isPlaying=!1,this.isComplete||(this.isComplete=!0,null==(e=this.onStop)||e.call(this,this))}update(e){var t,i;if(this.isComplete)return e;!this.isPlaying&&this.autoplay&&this.play(!0);const n=this.elapsed;if(this.elapsed+=e,this.delay>this.elapsed)return 0;const s=this.interpolate(this.isReverse?1-this.delta:this.delta);null==(t=this.onUpdate)||t.call(this,s,!1,this);const r=this.delay+this.duration;return this.elapsed>=r?(this.stop(),this.isComplete=!0,null==(i=this.onComplete)||i.call(this,this),e-(r-n)):0}get delta(){return this.ease(zn(0,(this.elapsed-this.delay)/this.duration,1))}createInterpolator(e,t){if("object"!=typeof t||Hn(t))return this.interpolateValue(e,t);const i=[];for(const n in t){const s=this.interpolateValue(e[n],t[n]);null!=s&&i.push([n,s])}return e=>{const t={};for(const[n,s]of i)t[n]=s(e);return t}}interpolateValue(e,t){if(void 0!==e&&void 0!==t){if(Hn(e))return i=>e[Bn](t,i);try{switch(typeof e){case"number":return fs(e,t);case"string":return function(e,t){if("string"==typeof e)try{e=gs.fromString(e)}catch(t){e=gs.fromArray([0,0,0])}if("string"==typeof t)try{t=gs.fromString(t)}catch(e){t=gs.fromArray([0,0,0])}const i=fs(e.r,t.r),n=fs(e.g,t.g),s=fs(e.b,t.b),r=fs(e.a,t.a);return e=>gs.fromArray([i(e),n(e),s(e),r(e)]).toRgbaString()}(e,t);case"boolean":if(e===t)return()=>e}}catch(e){}throw new Error(`Unable to interpolate values: ${e}, ${t}`)}}},Rs={added:"add",updated:"update",removed:"remove",unknown:"initial","no-op":"none"};function Ls(e,t,i,n,s,r,o){const{fromFn:a,toFn:l,intermediateFn:c}=s,{nodes:h,selections:d}=Ds(n),u=(n,s)=>{var h;let d,u=0,p=0;for(const g of s){const f=n[u]===g,m={last:p>=s.length-1,lastLive:u>=n.length-1,prev:s[p-1],prevFromProps:d,prevLive:n[u-1],next:s[p+1],nextLive:n[u+(f?1:0)]},y=`${e}_${t}_${g.id}`;i.stopByAnimationId(y);let b="unknown";f?r&&o&&(b=Ps(g,g.datum,r,o)):b="removed";const S=a(g,g.datum,b,m),{phase:w,start:x,finish:E,delay:M,duration:A}=S,T=C(S,["phase","start","finish","delay","duration"]),D=l(g,g.datum,b,m),{phase:I,start:R,finish:L,delay:k,duration:P}=D,N=C(D,["phase","start","finish","delay","duration"]),O=null==E&&null==L;i.animate({id:y,groupId:e,phase:null!=(h=null!=w?w:I)?h:"update",duration:null!=A?A:P,delay:null!=M?M:k,from:T,to:N,ease:Cs,collapsable:O,onPlay:()=>{g.setProperties(v(v({},x),R))},onUpdate(e){g.setProperties(e),c&&g.setProperties(c(g,g.datum,b,m))},onStop:()=>{g.setProperties(v(v(v(v(v(v({},x),R),T),N),E),L))}}),f&&u++,p++,d=T}};let p=0;for(const n of d){const s=n.nodes();u(s.filter(e=>!n.isGarbage(e)),s),i.animate({id:`${e}_${t}_selection_${p}`,groupId:e,phase:"end",from:0,to:1,ease:Cs,onStop(){n.cleanup()}}),p++}u(h,h)}function ks(e,t,i,n,s,r,o){const{nodes:a,selections:l}=Ds(n),{start:c,finish:h,phase:d}=o,u=null==h;i.animate({id:`${e}_${t}`,groupId:e,phase:null!=d?d:"update",from:s,to:r,ease:Cs,collapsable:u,onPlay:()=>{if(c){for(const e of a)e.setProperties(c);for(const e of l)for(const t of e.nodes())t.setProperties(c)}},onUpdate(e){for(const t of a)t.setProperties(e);for(const t of l)for(const i of t.nodes())i.setProperties(e)},onStop:()=>{for(const e of a)e.setProperties(v(v({},r),h));for(const e of l)for(const t of e.nodes())t.setProperties(v(v({},r),h))}})}function Ps(e,t,i,n){const s=i(e,t);return n.added.has(s)?"added":n.removed.has(s)?"removed":"updated"}var Ns=2*Math.PI;function Os(e){return e%=Ns,(e+=Ns)%Ns}function _s(e){return e%=Ns,(e+=Ns)!==Ns&&(e%=Ns),e}function Fs(e){return(e%=Ns)<-Math.PI?e+=Ns:e>=Math.PI&&(e-=Ns),e}function Gs(e,t,i){const n=Os(e),s=Os(t),r=_s(i);return s<=r?s<=n&&n<=r:s<=n||n<=r}function Vs(e){return e/180*Math.PI}function Bs(e){return e/Math.PI*180}function Hs(e,t){return e=Os(e),(t=Os(t))-e+(e>t?2*Math.PI:0)}function zs(e,t,i,n){return{x:e+i*Math.cos(n),y:t+i*Math.sin(n)}}var Us=(e,t)=>{const i=Symbol(String(t));e[i]=void 0,Object.defineProperty(e,t,{get(){return this[i]},set(e){this[i]!==e&&(this[i]=e,this.invalid=!0)},enumerable:!0,configurable:!1})},Ws=class e{constructor(){this.type="band",this.invalid=!0,this.interval=void 0,this.index=new Map,this.ordinalRange=[],this._domain=[],this.range=[0,1],this._bandwidth=1,this._step=1,this._rawBandwidth=1,this._paddingInner=0,this._paddingOuter=0,this.round=!1}static is(t){return t instanceof e}refresh(){this.invalid&&(this.invalid=!1,this.update(),this.invalid&&O.warnOnce("Expected update to not invalidate scale"))}set domain(e){this.invalid=!0;const t=[];this.index=new Map;const i=this.index;e.forEach(e=>{void 0===this.getIndex(e)&&i.set(e,t.push(e)-1)}),this._domain=t}get domain(){return this._domain}ticks(){this.refresh();let{interval:e=1}=this;"number"!=typeof e&&(e=Number(e));const t=Math.abs(Math.round(e));return this._domain.filter((e,i)=>i%t===0)}convert(e){this.refresh();const t=this.getIndex(e);if(void 0===t)return NaN;const i=this.ordinalRange[t];return void 0===i?NaN:i}invert(e){this.refresh();const t=this.ordinalRange.findIndex(t=>t===e);return this.domain[t]}invertNearest(e){var t;this.refresh();let i=-1,n=1/0;const s=this.ordinalRange.findIndex((t,s)=>{if(t===e)return!0;const r=Math.abs(e-t);return r<n&&(n=r,i=s),!1});return null!=(t=this.domain[s])?t:this.domain[i]}get bandwidth(){return this.refresh(),this._bandwidth}get step(){return this.refresh(),this._step}get rawBandwidth(){return this.refresh(),this._rawBandwidth}set padding(e){e=zn(0,e,1),this._paddingInner=e,this._paddingOuter=e}get padding(){return this._paddingInner}set paddingInner(e){this._paddingInner=zn(0,e,1)}get paddingInner(){return this._paddingInner}set paddingOuter(e){this._paddingOuter=zn(0,e,1)}get paddingOuter(){return this._paddingOuter}update(){const e=this._domain.length;if(0===e)return;const t=this.round,i=this._paddingInner,n=this._paddingOuter,[s,r]=this.range,o=r-s,a=o/Math.max(1,e+2*n-i),l=t?Math.floor(a):a,c=s+(o-l*(e-i))/2,h=t?Math.round(c):c,d=l*(1-i),u=t?Math.round(d):d,p=a*(1-i),g=[];for(let t=0;t<e;t++)g.push(h+l*t);this._bandwidth=u,this._rawBandwidth=p,this._step=l,this.ordinalRange=g}getIndex(e){if(!(e instanceof Date))return this.index.get(e);const t=e.valueOf();let i=0;for(const e of this.index.keys()){if(e instanceof Date&&e.valueOf()===t)return i;i++}}};S([Us],Ws.prototype,"interval",2),S([Us],Ws.prototype,"range",2),S([Us],Ws.prototype,"round",2);var js=Ws;function Ks(e,t=[void 0]){return De((i,n,s)=>t.includes(s)?Ge(e)?e(s):e:s)}function $s(e,t={}){const{optional:i=!1,property:n}=t;return De((s,r,o)=>{var a;const l=y(v({},t),{target:s,property:r});if(i&&void 0===o||e(o,l))return bt(s[r])&&!bt(o)?(s[r].set(o),s[r]):o;const c=null!=n?n:String(r).replace(/^_*/,""),h=null!=(a=s.constructor.className)?a:s.constructor.name.replace(/Properties$/,"");let d=Ur(o);if(null!=d&&d.length>50){const e=d.length-50;d=d.slice(0,50)+`... (+${e} characters)`}return O.warn(`Property [${c}] of [${h}] cannot be set to [${d}]${e.message?`; expecting ${Hr(e,l)}`:""}, ignoring.`),Me},void 0,{optional:i})}var Ys,qs=(...e)=>{const t=[];return Br((i,n)=>(t.length=0,e.every(e=>{const s=e(i,n);return s||t.push(Hr(e,n)),s})),()=>t.filter(Boolean).join(" AND "))},Xs=(...e)=>Br((t,i)=>e.some(e=>e(t,i)),t=>e.map(function(e){return t=>Hr(t,e)}(t)).filter(Boolean).join(" OR ")),Zs=zr(Br((e,t)=>bt(e)||Ve(e)&&bt(t.target[t.property]),"a properties object")),Qs=zr(Br(e=>Ve(e),"an object")),Js=Br(Ne,"a boolean"),er=Br(Ge,"a function"),tr=Br(ze,"a string"),ir=(Ys=Br(We,"a number"),Object.assign(Ys,{restrict({min:e,max:t}={}){const i=["a number"],n=Ue(e),s=Ue(t);return n&&s?i.push(`between ${e} and ${t} inclusive`):n?i.push(`greater than or equal to ${e}`):s&&i.push(`less than or equal to ${t}`),Br(i=>We(i)&&(!n||i>=e)&&(!s||i<=t),i.join(" "))}})),nr=Br(e=>Ue(e)&&isNaN(e),"NaN"),sr=ir.restrict({min:0}),rr=ir.restrict({min:0,max:1}),or=ir.restrict({min:-360,max:360}),ar=Xs(ir,nr),lr=function(e){return Object.assign(e,{restrict({length:e,minLength:t}={}){let i="an array";return Ue(t)&&t>0?i="a non-empty array":Ue(e)&&(i=`an array of length ${e}`),Br(i=>Pe(i)&&(!Ue(e)||i.length===e)&&(!Ue(t)||i.length>=t),i)}})}(Br(Pe,"an array")),cr=(e,t)=>Br((t,i)=>Pe(t)&&t.every(t=>e(t,i)),e=>{var i;const n=null!=(i=Hr(lr,e))?i:"";return t?`${n} of ${t}`:n}),hr=e=>We(e)||_e(e),dr=e=>Br((t,i)=>!hr(t)||!hr(i.target[e])||t<i.target[e],`to be less than ${e}`),ur=e=>Br((t,i)=>!hr(t)||!hr(i.target[e])||t>i.target[e],`to be greater than ${e}`),pr=Br(_e,"Date object"),gr=Xs(pr,sr),fr="A color string can be in one of the following formats to be valid: #rgb, #rrggbb, rgb(r, g, b), rgba(r, g, b, a) or a CSS color name such as 'white', 'orange', 'cyan', etc",mr=Br(e=>ze(e)&&gs.validColorString(e),`color String. ${fr}`),vr=Br(cr(mr),`color strings. ${fr}`),yr=cr(Js,"boolean values"),Cr=cr(ir,"numbers"),br=cr(tr,"strings"),Sr=Br(cr(pr),"Date objects"),wr=Br(cr(Zs),"objects"),xr=Fr(["butt","round","square"],"a line cap"),Er=Fr(["round","bevel","miter"],"a line join"),Mr=Br(cr(sr),"numbers specifying the length in pixels of alternating dashes and gaps, for example, [6, 3] means dashes with a length of 6 pixels with gaps between of 3 pixels."),Ar=Fr(["top","right","bottom","left"],"a position"),Tr=Fr(["normal","italic","oblique"],"a font style"),Dr=Xs(Fr(["normal","bold","bolder","lighter"],"a font weight"),ir.restrict({min:1,max:1e3})),Ir=Fr(["never","always","hyphenate","on-space"],"a text wrap strategy"),Rr=Fr(["left","center","right"],"a text align"),Lr=Fr(["top","middle","bottom"],"a vertical align"),kr=Fr(["ellipsis","hide"],"an overflow strategy"),Pr=Fr(["horizontal","vertical"],"a direction"),Nr=Fr(["inside","outside"],"a placement"),Or=Xs(Fr(["exact","nearest"],"interaction range"),ir),_r=Fr(["top","bottom","left","right"]);function Fr(e,t="a"){return Br(t=>e.includes(t),`${t} keyword such as ${function(e){const t=e.map(e=>`'${e}'`);if(1===t.length)return t[0];const i=t.pop();return`${t.join(", ")} or ${i}`}(e)}`)}var Gr=Xs(qs(ir.restrict({min:1}),dr("maxSpacing")),nr),Vr=Xs(qs(ir.restrict({min:1}),ur("minSpacing")),nr);function Br(e,t){return e.message=t,e}function Hr(e,t){return Ge(e.message)?e.message(t):e.message}function zr(e){return Object.assign(e,{restrict:t=>Br(e=>e instanceof t,i=>{var n;return null!=(n=Hr(e,i))?n:`an instance of ${t.name}`})})}function Ur(e){if("number"==typeof e){if(isNaN(e))return"NaN";if(e===1/0)return"Infinity";if(e===-1/0)return"-Infinity"}return JSON.stringify(e)}var Wr=Br(e=>We(e)&&e>0||e instanceof _,"a non-zero positive Number value or, for a time axis, a Time Interval such as 'agCharts.time.month'"),jr=class extends yt{constructor(){super(...arguments),this.enabled=!0,this.width=1,this.size=6,this.color=void 0,this.interval=void 0,this.values=void 0}};S([$s(Js)],jr.prototype,"enabled",2),S([$s(sr)],jr.prototype,"width",2),S([$s(sr)],jr.prototype,"size",2),S([$s(mr,{optional:!0})],jr.prototype,"color",2),S([$s(Wr,{optional:!0})],jr.prototype,"interval",2),S([$s(lr,{optional:!0})],jr.prototype,"values",2);var Kr=(e=>(e.X="x",e.Y="y",e))(Kr||{}),$r={constructedArrays:new WeakMap};function Yr(e,t){var i;null==(i=$r.constructedArrays)||i.set(e,t)}var qr=class e{constructor(t,i){this.invalid=!0,this.nice=!1,this.interval=void 0,this.tickCount=e.defaultTickCount,this.minTickCount=0,this.maxTickCount=1/0,this.niceDomain=[],this.defaultClampMode="raw",this.domain=t,this.range=i}static is(t){return t instanceof e}transform(e){return e}transformInvert(e){return e}calcBandwidth(e=1){const{range:t}=this,i=this.getDomain(),n=Math.abs(t[1]-t[0]),s=Math.abs(i[1]-i[0])/e+1,r=Math.floor(n),o=Math.min(s,r);return n/Math.max(1,o)}getDomain(){return this.nice&&(this.refresh(),this.niceDomain.length)?this.niceDomain:this.domain}convert(e,t){var i;const n=null!=(i=null==t?void 0:t.clampMode)?i:this.defaultClampMode;if(!this.domain||this.domain.length<2)return NaN;this.refresh();const s=this.getDomain().map(e=>this.transform(e)),[r,o]=s,{range:a}=this,[l,c]=a;if(e=this.transform(e),"clamped"===n){const[t,i]=Wn(s.map(Number));if(Number(e)<t)return l;if(Number(e)>i)return c}return r===o?(l+c)/2:e===r?l:e===o?c:l+(Number(e)-Number(r))/(Number(o)-Number(r))*(c-l)}invert(e){this.refresh();const t=this.getDomain().map(e=>this.transform(e)),[i,n]=t,{range:s}=this,[r,o]=s,a=r>o;let l;return e<(a?o:r)?a?n:i:e>(a?r:o)?a?i:n:(l=r===o?this.toDomain((Number(i)+Number(n))/2):this.toDomain(Number(i)+(e-r)/(o-r)*(Number(n)-Number(i))),this.transformInvert(l))}refresh(){this.invalid&&(this.invalid=!1,this.update(),this.invalid&&O.warnOnce("Expected update to not invalidate scale"))}getPixelRange(){const[e,t]=this.range;return Math.abs(t-e)}};qr.defaultTickCount=5,qr.defaultMaxTickCount=6,S([Us],qr.prototype,"domain",2),S([Us],qr.prototype,"range",2),S([Us],qr.prototype,"nice",2),S([Us],qr.prototype,"interval",2),S([Us],qr.prototype,"tickCount",2),S([Us],qr.prototype,"minTickCount",2),S([Us],qr.prototype,"maxTickCount",2);var Xr=qr,Zr={periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]};function Qr(e,t=new Date(e.getFullYear(),0,1)){const i=e.getTimezoneOffset()-t.getTimezoneOffset(),n=e.getTime()-t.getTime()+6e4*i;return Math.floor(n/864e5)}function Jr(e,t){const i=(t-new Date(e.getFullYear(),0,1).getDay()+7)%7,n=new Date(e.getFullYear(),0,i+1);return n<=e?Math.floor(Qr(e,n)/7)+1:0}function eo(e,t=e.getFullYear()){const i=new Date(t,0,1).getDay(),n=new Date(t,0,(4-i+7)%7-3+1);return n<=e?Math.floor(Qr(e,n)/7)+1:eo(e,t-1)}var to={a:e=>Zr.shortDays[e.getDay()],A:e=>Zr.days[e.getDay()],b:e=>Zr.shortMonths[e.getMonth()],B:e=>Zr.months[e.getMonth()],c:"%x, %X",d:(e,t)=>no(e.getDate(),2,null!=t?t:"0"),e:"%_d",f:(e,t)=>no(1e3*e.getMilliseconds(),6,null!=t?t:"0"),H:(e,t)=>no(e.getHours(),2,null!=t?t:"0"),I:(e,t)=>{const i=e.getHours()%12;return 0===i?"12":no(i,2,null!=t?t:"0")},j:(e,t)=>no(Qr(e)+1,3,null!=t?t:"0"),m:(e,t)=>no(e.getMonth()+1,2,null!=t?t:"0"),M:(e,t)=>no(e.getMinutes(),2,null!=t?t:"0"),L:(e,t)=>no(e.getMilliseconds(),3,null!=t?t:"0"),p:e=>e.getHours()<12?"AM":"PM",Q:e=>String(e.getTime()),s:e=>String(Math.floor(e.getTime()/1e3)),S:(e,t)=>no(e.getSeconds(),2,null!=t?t:"0"),u:e=>{let t=e.getDay();return t<1&&(t+=7),String(t%7)},U:(e,t)=>no(Jr(e,0),2,null!=t?t:"0"),V:(e,t)=>no(eo(e),2,null!=t?t:"0"),w:(e,t)=>no(e.getDay(),2,null!=t?t:"0"),W:(e,t)=>no(Jr(e,1),2,null!=t?t:"0"),x:"%-m/%-d/%Y",X:"%-I:%M:%S %p",y:(e,t)=>no(e.getFullYear()%100,2,null!=t?t:"0"),Y:(e,t)=>no(e.getFullYear(),4,null!=t?t:"0"),Z:e=>function(e){const t=e.getTimezoneOffset(),i=Math.abs(t);return`${t>0?"-":"+"}${no(Math.floor(i/60),2,"0")}${no(Math.floor(i%60),2,"0")}`}(e),"%":()=>"%"},io={_:" ",0:"0","-":""};function no(e,t,i){const n=String(Math.floor(e));return n.length>=t?n:`${i.repeat(t-n.length)}${n}`}function so(e){const t=[];for(;e.length>0;){let i=e.indexOf("%");if(0!==i){const n=i>0?e.substring(0,i):e;t.push(n)}if(i<0)break;const n=e[i+1],s=io[n];null!=s&&i++;const r=e[i+1],o=to[r];if("function"==typeof o)t.push([o,s]);else if("string"==typeof o){const e=so(o);t.push([e,s])}else t.push(`${null!=s?s:""}${r}`);e=e.substring(i+2)}return e=>{const i="number"==typeof e?new Date(e):e;return t.map(e=>"string"==typeof e?e:e[0](i,e[1])).join("")}}function ro(e){return e instanceof Date?e.getTime():e}function oo(e,t){const i=ao(e,t);return e=>so(i)(e)}function ao(e=[],t=e){let i=8;const n=e=>{e<i&&(i=e)};for(const t of e)n(lo(t));const s=ro(t[0]),r=ro(t.at(-1)),o=new Date(s).getFullYear(),a=new Date(r).getFullYear();return function(e,t,i){const n=ro(i[0]),s=ro(i.at(-1)),r=Math.abs(s-n),o=[["hour",216e5,12096e5,3,"%I %p"],["hour",H,216e5,3,"%I:%M"],["second",1e3,216e5,1,":%S"],["ms",0,216e5,0,".%L"],["am/pm",H,216e5,3,"%p"]," ",["day",U,6048e5,4,"%a"],["month",0===r?0:W,314496e5,5,"%b %d"],["month",3024e6,31536e7,6,"%B"]," ",["year",t||8===e?0:j,1/0,8,"%Y"]].filter(t=>{if("string"==typeof t)return!0;const[i,n,s,o]=t;return o>=e&&n<=r&&r<s}).reduce((e,t)=>("string"==typeof t?e.result.push(t):e.used.has(t[0])||(e.result.push(t),e.used.add(t[0])),e),{result:[],used:new Set}).result,a=o.findIndex(e=>"string"!=typeof e),l=o.length-[...o].reverse().findIndex(e=>"string"!=typeof e);return o.slice(a,l).map(e=>"string"==typeof e?e:e[4]).join("").replaceAll(/\s+/g," ").trim()}(i,a-o>0,e)}function lo(e){return Y.floor(e)<e?0:Z.floor(e)<e?1:ee.floor(e)<e?2:ie.floor(e)<e?3:pe.floor(e)<e?de.floor(e)<e?4:5:fe.floor(e)<e?6:8}var co=(e,t=[])=>Object.assign(t,{fractionDigits:e});function ho(e,t,i,n,s){if(i<2)return go(e,t,t-e);const r=po(e,t,i,n,s);return isNaN(r)?co(0):go(e=Math.ceil(e/r)*r,t=Math.floor(t/r)*r,r)}var uo=[1,2,5,10];function po(e,t,i,n=0,s=1/0){const r=Math.abs(t-e),o=r/i,a=Math.floor(Math.log10(o)),l=Math.pow(10,a),c=uo.map(e=>{const t=e*l,o=Math.ceil(r/t);return{multiplier:e,isWithinBounds:o>=n&&o<=s,diffCount:Math.abs(o-i)}}).sort((e,t)=>e.isWithinBounds!==t.isWithinBounds?e.isWithinBounds?-1:1:e.diffCount-t.diffCount)[0].multiplier;return!c||isNaN(c)?NaN:c*l}function go(e,t,i){const n=Math.min(e,t),s=Math.max(e,t),r=Zn(i),o=Math.pow(10,r),a=Math.ceil((s-n)/i),l=co(r);for(let e=0;e<=a;e++){const t=n+i*e;l.push(Math.round(t*o)/o)}return l}function fo({start:e,stop:t,interval:i,count:n,availableRange:s}){return null!=n||(n=(t-e)/("number"==typeof i?i:1)),n>=s&&(O.warnOnce("the configured interval results in more than 1 item per pixel, ignoring. Supply a larger interval or omit this configuration"),!0)}var mo=class e extends Xr{constructor(){super([],[0,1]),this.type="time"}toDomain(e){return new Date(e)}static getTickInterval({start:t,stop:i,count:n,minCount:s,maxCount:r,target:o}){let a,l;const c=null!=n?n:Xr.defaultTickCount,h=null!=o?o:Math.abs(i-t)/Math.max(c,1),d=e.getIntervalIndex(h);if(0===d)l=Math.max(po(t,i,c,s,r),1),a=V;else if(d===e.tickIntervals.length)l=void 0===o?po(t/j,i/j,c,s,r):1,a=fe;else{const t=h-e.tickIntervals[d-1][2]<e.tickIntervals[d][2]-h?d-1:d;[a,l]=e.tickIntervals[t]}return a.every(l)}static getIntervalIndex(t){let i=0;for(;i<e.tickIntervals.length&&t>e.tickIntervals[i][2];)i++;return i}invert(e){return new Date(super.invert(e))}ticks(){if(!this.domain||this.domain.length<2)return[];this.refresh();const[t,i]=this.getDomain().map(ro),n=Math.min(t,i),s=Math.max(t,i),{interval:r,nice:o,tickCount:a,minTickCount:l,maxTickCount:c}=this;if(void 0!==r){const t=this.getPixelRange(),i=e.getTicksForInterval({start:n,stop:s,interval:r,availableRange:t});return null!=i?i:e.getDefaultTicks({start:n,stop:s,tickCount:a,minTickCount:l,maxTickCount:c})}if(o){if(2===a)return this.niceDomain;if(1===a)return this.niceDomain.slice(0,1)}return e.getDefaultTicks({start:n,stop:s,tickCount:a,minTickCount:l,maxTickCount:c})}static getDefaultTicks({start:t,stop:i,tickCount:n,minTickCount:s,maxTickCount:r}){const o=e.getTickInterval({start:t,stop:i,count:n,minCount:s,maxCount:r});return o?o.range(new Date(t),new Date(i)):[]}static getTicksForInterval({start:t,stop:i,interval:n,availableRange:s}){if(!n)return[];if(n instanceof _){const e=n.range(new Date(t),new Date(i));if(fo({start:t,stop:i,interval:n,count:e.length,availableRange:s}))return;return e}const r=Math.abs(n);if(fo({start:t,stop:i,interval:r,availableRange:s}))return;const o=[...e.tickIntervals];o.reverse();const a=o.find(e=>r%e[2]===0);if(a)return a[0].every(r/(a[2]/a[1])).range(new Date(t),new Date(i));let l=new Date(t);const c=new Date(i),h=[];for(;l<=c;)h.push(l),l=new Date(l),l.setMilliseconds(l.getMilliseconds()+r);return h}tickFormat({ticks:e,domain:t,specifier:i}){return null==i?oo(e,t):so(i)}update(){!this.domain||this.domain.length<2||this.nice&&this.updateNiceDomain()}updateNiceDomain(){let[e,t]=this.domain;for(let i=0;i<4;i++){this.updateNiceDomainIteration(e,t);const[i,n]=this.niceDomain;if(ro(e)===ro(i)&&ro(t)===ro(n))break;e=i,t=n}}updateNiceDomainIteration(t,i){const n=Math.min(ro(t),ro(i)),s=Math.max(ro(t),ro(i)),r=t>i,{interval:o}=this;let a;if(o instanceof _)a=o;else{const t="number"==typeof o?(s-n)/Math.max(o,1):this.tickCount;a=e.getTickInterval({start:n,stop:s,count:t,minCount:this.minTickCount,maxCount:this.maxTickCount})}if(a){const e=a.range(new Date(n),new Date(s),!0),t=r?[...e].reverse():e,i=t[0],o=t.at(-1);this.niceDomain=[i,o]}}};mo.tickIntervals=[[Y,1,B],[Y,5,5e3],[Y,15,15e3],[Y,30,3e4],[Z,1,H],[Z,5,3e5],[Z,15,9e5],[Z,30,18e5],[ee,1,z],[ee,3,108e5],[ee,6,216e5],[ee,12,432e5],[ie,1,U],[ie,2,1728e5],[de,1,W],[de,2,12096e5],[de,3,18144e5],[pe,1,2592e6],[pe,2,5184e6],[pe,3,7776e6],[pe,4,10368e6],[pe,6,15552e6],[fe,1,j]];var vo=mo,yo=class e extends js{constructor(){super(...arguments),this.type="ordinal-time",this.tickCount=Xr.defaultTickCount,this.minTickCount=0,this.maxTickCount=1/0,this.interval=void 0,this.index=new Map,this._domain=[]}static is(t){return t instanceof e}toDomain(e){return new Date(e)}set domain(e){if(this.invalid=!0,0===e.length)return void(this._domain=[]);const t=this.updateIndex(e);this._domain=t}get domain(){return this._domain}updateIndex(e){this.index=new Map;const{index:t}=this,i=[],n=[],s=e[0]>e.at(-1),r=s?0:1;e.forEach((o,a)=>{const l=e[a+1],c=s?o:this.toDomain(ro(o)+1),h=s?this.toDomain(ro(l)+1):l,d=s?[h,c]:[c,h];i.push(o),void 0!==l&&void 0===t.get(d)&&(n.push(Math.abs(ro(h)-ro(c))),t.set(d,a+r))}),n.sort((e,t)=>e-t);const o=n.length,a=Math.floor(o/2);this.medianInterval=o>2&&o%2==0?(n[a-1]+n[a+1])/2:n[a];const l=Math.max(0,vo.getIntervalIndex(this.medianInterval)-1),[c,h]=vo.tickIntervals[l],d=c.every(h),u=s?e.length-1:0,p=e[u],g=[d.floor(e[u]),p];return t.set(g,u),i}ticks(){if(!this.domain)return[];this.refresh();const[e,t]=[ro(this.domain[0]),ro(this.domain.at(-1))],i=Math.min(e,t),n=Math.max(e,t),s=e>t;let r;void 0!==this.interval&&(r=this.getTicksForInterval({start:i,stop:n,interval:this.interval}));const o=this.domain.length,{maxTickCount:a,tickCount:l}=this;let c,{minTickCount:h}=this;isFinite(a)&&o<=a&&(h=Math.max(1,o),c=this.medianInterval),null!=r||(r=this.getDefaultTicks({start:i,stop:n,tickCount:l,minTickCount:h,maxTickCount:a,isReversed:s,interval:c}));const d=new Set;return r.filter(e=>{const t=this.convert(e);return!isNaN(t)&&!d.has(t)&&(d.add(t),!0)})}getDefaultTicks({start:e,stop:t,tickCount:i,minTickCount:n,maxTickCount:s,isReversed:r,interval:o}){const a=vo.getTickInterval({start:e,stop:t,count:i,minCount:n,maxCount:s,target:o});if(!a)return[];const l=Math.ceil(this.domain.length/s),c=[];for(const[e,t]of this.index.entries()){if(t%l>0)continue;const i=r?a.ceil(e[0]):a.floor(e[1]);c.splice(t,0,i)}return c}getTicksForInterval({start:e,stop:t,interval:i}){var n;const[s,r]=this.range,o=Math.abs(r-s);return null!=(n=vo.getTicksForInterval({start:e,stop:t,interval:i,availableRange:o}))?n:[]}convert(e){if("number"==typeof e&&(e=new Date(e)),!(e instanceof Date))return NaN;let t;this.refresh();for(const[i,n]of this.index.entries())if(e>=i[0]&&e<=i[1]){t=n;break}if(void 0===t)return NaN;const i=this.ordinalRange[t];return void 0===i?NaN:i}tickFormat({ticks:e,domain:t,specifier:i}){return null==i?oo(e,t):so(i)}invert(e){return new Date(super.invert(e))}invertNearest(e){return new Date(super.invertNearest(e))}};S([Us],yo.prototype,"tickCount",2),S([Us],yo.prototype,"minTickCount",2),S([Us],yo.prototype,"maxTickCount",2),S([Us],yo.prototype,"interval",2);var Co=yo;function bo(e,t){return"number"==typeof e&&"number"==typeof t?e-t:"string"==typeof e&&"string"==typeof t?e.localeCompare(t):null==e&&null==t?0:null==e?-1:null==t?1:String(e).localeCompare(String(t))}function So(e){return"function"==typeof e?e():e}function wo(e,t,i){for(const n in e){const s=i(So(e[n]),So(t[n]));if(0!==s)return s}return 0}var xo=class e extends hs{constructor(e){var t;super({isVirtual:null==e?void 0:e.isVirtual}),this.opts=e,this.opacity=1,this.lastBBox=void 0;const{zIndex:i,zIndexSubOrder:n}=null!=e?e:{};this.isContainerNode=!0,void 0!==i&&(this.zIndex=i),void 0!==n&&(this.zIndexSubOrder=n),this.name=null==(t=this.opts)?void 0:t.name}static is(t){return t instanceof e}onZIndexChange(){var e;super.onZIndexChange(),this.layer&&(null==(e=this._layerManager)||e.moveLayer(this.layer,this.zIndex,this.zIndexSubOrder))}isLayer(){return null!=this.layer}_setLayerManager(e){if(this._layerManager&&this.layer&&(this._layerManager.removeLayer(this.layer),this.layer=void 0),this.layer)throw new Error("AG Charts - unable to deregister scene rendering layer!");super._setLayerManager(e)}initialiseLayer(){var e;this.layer||this._layerManager&&!0===(null==(e=this.opts)?void 0:e.layer)&&(this.layer=this._layerManager.addLayer({name:this.name,zIndex:this.zIndex,zIndexSubOrder:this.zIndexSubOrder,getComputedOpacity:()=>this.getComputedOpacity(),getVisibility:()=>this.getVisibility()}))}getComputedOpacity(){let t=1;for(const i of this.traverseUp())i instanceof e&&(t*=i.opacity);return t}getVisibility(){for(const e of this.traverseUp())if(!e.visible)return!1;return!0}onVisibleChange(){this.layer&&(this.layer.enabled=this.visible)}markDirty(e,t=1){if(this.isVirtual)return void super.markDirty(e,t);let i=t;(t<2||null!=this.layer)&&(i=1),super.markDirty(e,t,i)}containsPoint(e,t){return!0}computeBBox(){return this.computeTransformMatrix(),e.computeBBox(this.children)}computeTransformedBBox(){return this.computeBBox()}preRender(){var e,t;const i=super.preRender();return i.groups+=1,i.nonGroups-=1,!0!==(null==(e=this.opts)?void 0:e.layer)||null!=this.layer||(i.nonGroups>0&&this.initialiseLayer(),(null==(t=this.opts)?void 0:t.nonEmptyChildDerivedZIndex)&&i.nonGroups>0&&this.deriveZIndexFromChildren()),i}deriveZIndexFromChildren(){var e;const t=this.children.filter(e=>e._childNodeCounts.nonGroups>0);this.sortChildren(t);const i=t.at(-1);this.zIndex=null!=(e=null==i?void 0:i.zIndex)?e:-1/0,this.zIndexSubOrder=null==i?void 0:i.zIndexSubOrder}render(e){var t,i;const{opts:{name:n}={},_debug:s}=this,{dirty:r,dirtyZIndex:o,layer:a,children:l,clipRect:c,dirtyTransform:h}=this;let{ctx:d,forceRender:u,clipBBox:p}=e;const{resized:g,stats:f}=e,m=d.getTransform(),C=r>=2||o||g;let b=C,S=!1;for(const e of l)if(b||(b=null==e.layerManager&&e.dirty>=1),S||(S=null!=e.layerManager&&e.dirty>=1),b)break;if(n&&(null==s||s({name:n,group:this,isDirty:C,isChildDirty:b,dirtyTransform:h,renderCtx:e,forceRender:u})),h)u="dirtyTransform";else if(a){const e=this.computeBBox();void 0!==this.lastBBox&&this.lastBBox.equals(e)||(u="dirtyTransform",this.lastBBox=e)}if(!(C||b||S||u))return n&&f&&(null==s||s({name:n,result:"skipping",renderCtx:e,counts:this.nodeCount,group:this})),a&&f&&(f.layersSkipped++,f.nodesSkipped+=this.nodeCount.count),void this.markClean({recursive:!1});const w=this.visible;if(a){if(d=a.context,d.save(),d.setTransform(a.pixelRatio,0,0,a.pixelRatio,0,0),"dirtyTransform"!==u&&(u=b||o),u&&a.clear(),p){const{width:t,height:i,x:r,y:o}=p;null==s||s(()=>({name:n,clipBBox:p,ctxTransform:d.getTransform(),renderCtx:e,group:this})),d.beginPath(),d.rect(r,o,t,i),d.clip()}d.setTransform(m)}else d.globalAlpha*=this.opacity;if(this.computeTransformMatrix(),this.matrix.toContext(d),c){const{x:t,y:i,width:r,height:o}=c;d.save(),null==s||s(()=>({name:n,clipRect:c,ctxTransform:d.getTransform(),renderCtx:e,group:this})),d.beginPath(),d.rect(t,i,r,o),d.clip(),p=this.matrix.transformBBox(c)}const x=this.hasVirtualChildren();o?(this.sortChildren(l),"dirtyTransform"!==u&&(u=!0)):x&&this.sortChildren(l);const E=u!==e.forceRender||p!==e.clipBBox||d!==e.ctx?y(v({},e),{ctx:d,forceRender:u,clipBBox:p}):e;let M=0;for(const e of l)e.visible&&w?u||0!==e.dirty?(d.save(),e.render(E),d.restore()):f&&(M+=e.nodeCount.count):(e.markClean(),f&&(M+=e.nodeCount.count));if(f&&(f.nodesSkipped+=M),super.render(e),c&&d.restore(),x)for(const e of this.virtualChildren)e.markClean({recursive:"virtual"});a&&(f&&f.layersRendered++,d.restore(),u&&a.snapshot(),null==(i=(t=a.context).verifyDepthZero)||i.call(t)),n&&f&&(null==s||s({name:n,result:"rendered",skipped:M,renderCtx:e,counts:this.nodeCount,group:this}))}sortChildren(e){this.dirtyZIndex=!1,e.sort((e,t)=>{var i,n;return wo([e.zIndex,...null!=(i=e.zIndexSubOrder)?i:[void 0,void 0],e.serialNumber],[t.zIndex,...null!=(n=t.zIndexSubOrder)?n:[void 0,void 0],t.serialNumber],bo)})}static computeBBox(e){let t=1/0,i=-1/0,n=1/0,s=-1/0;for(const r of e){if(!r.visible)continue;const e=r.computeTransformedBBox();if(!e)continue;const{x:o,y:a,width:l,height:c}=e;o<t&&(t=o),a<n&&(n=a),o+l>i&&(i=o+l),a+c>s&&(s=a+c)}return new ts(t,n,i-t,s-n)}setClipRectInGroupCoordinateSpace(e){this.clipRect=e?this.transformBBox(e):void 0}};xo.className="Group",S([ss({redraw:3,convertor:e=>zn(0,e,1)})],xo.prototype,"opacity",2);var Eo=xo,Mo=class{constructor(e=[]){this.stops=e}},Ao=class extends Mo{constructor(e,t=0){super(e),this.angle=t}createGradient(e,t){const{stops:i,angle:n}=this,s=Os(Vs(n+90)),r=Math.cos(s),o=Math.sin(s),a=t.width,l=t.height,c=t.x+.5*a,h=t.y+.5*l;if(a>0&&l>0){const t=Math.sqrt(l*l+a*a)/2,n=Math.atan2(l,a);let d;d=s<Math.PI/2?s:s<Math.PI?Math.PI-s:s<1.5*Math.PI?s-Math.PI:2*Math.PI-s;const u=t*Math.abs(Math.cos(d-n)),p=e.createLinearGradient(c+r*u,h+o*u,c-r*u,h-o*u);for(const e of i)p.addColorStop(e.offset,e.color);return p}return"black"}},To=/^linear-gradient\((.*?)deg,\s*(.*?)\s*\)$/i,Do=class e extends hs{constructor(){super(...arguments),this.fillOpacity=1,this.strokeOpacity=1,this.fill=e.defaultStyles.fill,this.stroke=e.defaultStyles.stroke,this.strokeWidth=e.defaultStyles.strokeWidth,this.lineDash=e.defaultStyles.lineDash,this.lineDashOffset=e.defaultStyles.lineDashOffset,this.lineCap=e.defaultStyles.lineCap,this.lineJoin=e.defaultStyles.lineJoin,this.opacity=e.defaultStyles.opacity,this.fillShadow=e.defaultStyles.fillShadow}restoreOwnStyles(){const{defaultStyles:e}=this.constructor;Object.assign(this,e)}onFillChange(){const{fill:e}=this;let t;if((null==e?void 0:e.startsWith("linear-gradient"))&&(t=To.exec(e))){const e=parseFloat(t[1]),i=[],n=t[2],s=/(#[0-9a-f]+)|(rgba?\(.+?\))|([a-z]+)/gi;let r;for(;r=s.exec(n);)i.push(r[0]);this.gradient=new Ao(i.map((e,t)=>({color:e,offset:t/(i.length-1)})),e)}else this.gradient=void 0}align(e,t){var i,n,s;const r=null!=(s=null==(n=null==(i=this.layerManager)?void 0:i.canvas)?void 0:n.pixelRatio)?s:1,o=Math.round(e*r)/r;return null==t?o:0===t?0:t<1?Math.ceil(t*r)/r:Math.round((t+e)*r)/r-o}fillStroke(e,t){this.renderFill(e,t),this.renderStroke(e,t)}renderFill(e,t){if(this.fill){const{globalAlpha:i}=e;this.applyFill(e),this.applyFillAlpha(e),this.applyShadow(e),this.executeFill(e,t),e.globalAlpha=i}e.shadowColor="rgba(0, 0, 0, 0)"}executeFill(e,t){t?e.fill(t):e.fill()}applyFill(e){var t,i;e.fillStyle=null!=(i=null==(t=this.gradient)?void 0:t.createGradient(e,this.computeBBox()))?i:this.fill}applyFillAlpha(e){e.globalAlpha*=this.opacity*this.fillOpacity}applyShadow(e){var t,i;const n=null!=(i=null==(t=this.layerManager)?void 0:t.canvas.pixelRatio)?i:1,s=this.fillShadow;(null==s?void 0:s.enabled)&&(e.shadowColor=s.color,e.shadowOffsetX=s.xOffset*n,e.shadowOffsetY=s.yOffset*n,e.shadowBlur=s.blur*n)}renderStroke(e,t){if(this.stroke&&this.strokeWidth){const{globalAlpha:i}=e;e.strokeStyle=this.stroke,e.globalAlpha*=this.opacity*this.strokeOpacity,e.lineWidth=this.strokeWidth,this.lineDash&&e.setLineDash(this.lineDash),this.lineDashOffset&&(e.lineDashOffset=this.lineDashOffset),this.lineCap&&(e.lineCap=this.lineCap),this.lineJoin&&(e.lineJoin=this.lineJoin),this.executeStroke(e,t),e.globalAlpha=i}}executeStroke(e,t){t?e.stroke(t):e.stroke()}containsPoint(e,t){return this.isPointInPath(e,t)}};Do.defaultStyles={fill:"black",stroke:void 0,strokeWidth:0,lineDash:void 0,lineDashOffset:0,lineCap:void 0,lineJoin:void 0,opacity:1,fillShadow:void 0},S([ss({redraw:2})],Do.prototype,"fillOpacity",2),S([ss({redraw:2})],Do.prototype,"strokeOpacity",2),S([ss({redraw:2,changeCb:e=>e.onFillChange()})],Do.prototype,"fill",2),S([ss({redraw:2})],Do.prototype,"stroke",2),S([ss({redraw:2})],Do.prototype,"strokeWidth",2),S([ss({redraw:2})],Do.prototype,"lineDash",2),S([ss({redraw:2})],Do.prototype,"lineDashOffset",2),S([ss({redraw:2})],Do.prototype,"lineCap",2),S([ss({redraw:2})],Do.prototype,"lineJoin",2),S([ss({redraw:2,convertor:e=>zn(0,e,1)})],Do.prototype,"opacity",2),S([ss({redraw:2,checkDirtyOnAssignment:!0})],Do.prototype,"fillShadow",2);var Io=Do,Ro=class extends Io{constructor(e={}){super(e),this.x1=0,this.y1=0,this.x2=0,this.y2=0,this.startLine=!1,this.endLine=!1,this.isRange=!1,this.restoreOwnStyles()}computeBBox(){return new ts(this.x1,this.y1,this.x2-this.x1,this.y2-this.y1)}isPointInPath(e,t){return!1}render(e){var t;const{ctx:i,forceRender:n,stats:s}=e;if(0===this.dirty&&!n)return void(s&&(s.nodesSkipped+=this.nodeCount.count));this.computeTransformMatrix(),this.matrix.toContext(i);let{x1:r,y1:o,x2:a,y2:l}=this;r=this.align(r),o=this.align(o),a=this.align(a),l=this.align(l);const{fill:c,opacity:h,isRange:d}=this;if(d&&c){const{fillOpacity:e}=this;i.fillStyle=c,i.globalAlpha=h*e,i.beginPath(),i.moveTo(r,o),i.lineTo(a,o),i.lineTo(a,l),i.lineTo(r,l),i.closePath(),i.fill()}const{stroke:u,strokeWidth:p,startLine:g,endLine:f}=this;if((g||f)&&u&&p){const{strokeOpacity:e,lineDash:t,lineDashOffset:n,lineCap:s,lineJoin:c}=this;i.strokeStyle=u,i.globalAlpha=h*e,i.lineWidth=p,t&&i.setLineDash(t),n&&(i.lineDashOffset=n),s&&(i.lineCap=s),c&&(i.lineJoin=c),i.beginPath(),g&&(i.moveTo(r,o),i.lineTo(a,o)),f&&(i.moveTo(a,l),i.lineTo(r,l)),i.stroke()}null==(t=this.fillShadow)||t.markClean(),super.render(e)}};Ro.className="Range",Ro.defaultStyles=y(v({},Io.defaultStyles),{strokeWidth:1}),S([ss({redraw:2})],Ro.prototype,"x1",2),S([ss({redraw:2})],Ro.prototype,"y1",2),S([ss({redraw:2})],Ro.prototype,"x2",2),S([ss({redraw:2})],Ro.prototype,"y2",2),S([ss({redraw:2})],Ro.prototype,"startLine",2),S([ss({redraw:2})],Ro.prototype,"endLine",2),S([ss({redraw:2})],Ro.prototype,"isRange",2);var Lo=new WeakMap,ko=new WeakMap;function Po(e,t){var i,n,s;const r=JSON.stringify(e,null,0);return Lo.has(t)||Lo.set(t,new Map),(null==(i=Lo.get(t))?void 0:i.has(r))||null==(n=Lo.get(t))||n.set(r,t(e)),null==(s=Lo.get(t))?void 0:s.get(r)}function No(e){return(t,...i)=>{var n,s,r;const o=JSON.stringify(t,null,0);return ko.has(e)||ko.set(e,new Map),(null==(n=ko.get(e))?void 0:n.has(o))||null==(s=ko.get(e))||s.set(o,e(t,...i)),null==(r=ko.get(e))?void 0:r.get(o)}}function Oo(e){const{redraw:t=3,changeCb:i}=null!=e?e:{};return ss({redraw:t,type:"font",changeCb:i})}var _o=class e extends Io{constructor(){super(...arguments),this.x=0,this.y=0,this.lines=[],this.text=void 0,this._dirtyFont=!0,this.fontSize=10,this.fontFamily="sans-serif",this.textAlign=e.defaultStyles.textAlign,this.textBaseline=e.defaultStyles.textBaseline}onTextChange(){var e,t;this.lines=null!=(t=null==(e=this.text)?void 0:e.split("\n").map(e=>e.trim()))?t:[]}get font(){return(null==this._font||this._dirtyFont)&&(this._dirtyFont=!1,this._font=Vo(this)),this._font}computeBBox(){const{x:t,y:i,lines:n,lineHeight:s,textBaseline:r,textAlign:o}=this,{top:a,left:l,width:c,height:h}=e.getTextSizeMultiline(n,Vo(this),r,o,s);return new ts(t-l,i-a,c,h)}getLineHeight(t){var i,n;if(this.lineHeight)return this.lineHeight;const s=e.measureText(t,this.font,this.textBaseline,this.textAlign);return(null!=(i=s.fontBoundingBoxAscent)?i:s.emHeightAscent)+(null!=(n=s.fontBoundingBoxDescent)?n:s.emHeightDescent)}isPointInPath(e,t){const i=this.transformPoint(e,t),n=this.computeBBox();return!!n&&n.containsPoint(i.x,i.y)}render(e){const{ctx:t,forceRender:i,stats:n}=e;if(0===this.dirty&&!i)return void(n&&(n.nodesSkipped+=this.nodeCount.count));if(!this.lines.length||!this.layerManager)return void(n&&(n.nodesSkipped+=this.nodeCount.count));this.computeTransformMatrix(),this.matrix.toContext(t);const{fill:s,stroke:r,strokeWidth:o}=this;t.font=this.font,t.textAlign=this.textAlign,t.textBaseline=this.textBaseline;const a=this.layerManager.canvas.pixelRatio||1,{globalAlpha:l}=t;if(s){t.fillStyle=s,t.globalAlpha=l*this.opacity*this.fillOpacity;const{fillShadow:e}=this;(null==e?void 0:e.enabled)&&(t.shadowColor=e.color,t.shadowOffsetX=e.xOffset*a,t.shadowOffsetY=e.yOffset*a,t.shadowBlur=e.blur*a),this.renderLines((e,i,n)=>t.fillText(e,i,n))}if(r&&o){t.strokeStyle=r,t.lineWidth=o,t.globalAlpha=l*this.opacity*this.strokeOpacity;const{lineDash:e,lineDashOffset:i,lineCap:n,lineJoin:s}=this;e&&t.setLineDash(e),i&&(t.lineDashOffset=i),n&&(t.lineCap=n),s&&(t.lineJoin=s),this.renderLines((e,i,n)=>t.strokeText(e,i,n))}super.render(e)}renderLines(t){const{lines:i,x:n,y:s}=this,r=i.map(e=>this.getLineHeight(e)),o=r.reduce((e,t)=>e+t,0);let a=(r[0]-o)*e.getVerticalModifier(this.textBaseline);for(let e=0;e<i.length;e++)t(i[e],n,s+a),a+=r[e]}static wrapLines(t,i,n,s,r,o){const a="hide"!==o,l=new Go(s),c=t.split(/\r?\n/g);if(0===c.length)return{lines:void 0,truncated:!1};if("never"===r){const{text:t,truncated:n}=e.truncateLine(c[0],i,l,a?"auto":"never");return{lines:null!=t?[t]:void 0,truncated:n}}const h=[];let d=0,u=!1;for(const t of c){const o=e.wrapLine(t,i,n,l,s,r,d,a);if(null==o)return{lines:void 0,truncated:!1};if(h.push(...o.result),d=o.cumulativeHeight,o.truncated){u=!0;break}}return{lines:h,truncated:u}}static wrap(t,i,n,s,r,o="ellipsis"){var a;const{lines:l,truncated:c}=e.wrapLines(t,i,n,s,r,o);return{text:null!=(a=null==l?void 0:l.join("\n").trim())?a:"",truncated:c}}static wrapLine(t,i,n,s,r,o,a,l){if(!(t=t.trim()))return{result:[],truncated:!1,cumulativeHeight:a};const c=s.size(t);if(c.width<=i)return{result:[t],truncated:!1,cumulativeHeight:a+c.height};if(c.height>n||s.width("W")>i)return l?{result:[],truncated:!0,cumulativeHeight:a}:void 0;const h=t.split(/\s+/g),d=e.wrapLineSequentially(h,i,n,s,r,o,a,l);if(null==d)return;a=d.cumulativeHeight;let{lines:u}=d;if(!d.wordsBrokenOrTruncated&&!d.linesTruncated){const t=d.lines.length,n=e.wrapLineBalanced(h,i,s,t);n.length===u.length&&(u=n)}return{result:u.map(e=>e.join(" ")),truncated:d.linesTruncated,cumulativeHeight:a}}static breakWord(t,i,n,s,r){const o=i=>e.punctuationMarks.includes(t[i]),a=s?r.width("-"):0,l=[];let c=0,h=0;for(let e=0;e<t.length;e++){const s=t[e],o=r.width(s);c+o+a>(0===h?i:n)&&(l.push(e),c=0,h++),c+=o}const d=[];let u=0;for(const e of l){let i=t.substring(u,e);s&&i.length>0&&!o(e-1)&&!o(e)&&(i+="-"),d.push(i),u=e}return d.push(t.substring(u)),d}static truncateLine(e,t,i,n){e=e.trimEnd();const s=i.width(e);if(s>t&&"never"===n)return{text:void 0,truncated:!1};if(s<=t&&"force"!==n)return{text:e,truncated:!1};const r=i.width("…");let o=e,a=s;for(;o.length>0&&a+r>t;)o=o.slice(0,-1).trimEnd(),a=i.width(o);return a+r<=t?{text:`${o}…`,truncated:!0}:{text:void 0,truncated:!1}}static wrapLineSequentially(t,i,n,s,r,o,a,l){const{fontSize:c=0,lineHeight:h=c*e.defaultLineHeightRatio}=r,d="always"===o||"hyphenate"===o,u="hyphenate"===o,p=s.width(" ");let g=!1,f=!1;const m=[];let v=[],y=0;const C=()=>({lines:m,linesTruncated:f,wordsBrokenOrTruncated:g,cumulativeHeight:a}),b=()=>{if(!l)return;const t=v.join(" "),{text:n}=e.truncateLine(t,i,s,"force");return null!=n?(v.splice(0,v.length,n),f=!0,C()):void 0},S=()=>{const e=a+h;return!(e>=n||(v=[],y=0,a=e,m.push(v),0))};if(!S())return b();for(let n=0;n<t.length;n++){const r=t[n],o=s.width(r),a=0===v.length?0:p,c=y+a+o;if(c<=i)v.push(r),y=c;else if(o<=i){if(!S())return b();v.push(r),y=o}else{if(g=!0,!d){if(l){if(!S())return b();const{text:o}=e.truncateLine(r,i,s,"force");if(null==o)return;v.push(o),n<t.length-1&&(f=!0);break}return}{const t=i-y-a,n=e.breakWord(r,t,i,u,s);for(let e=0;e<n.length;e++){const t=n[e];if(t&&v.push(t),e===n.length-1)y=s.width(t);else if(!S())return b()}}}}return C()}static wrapLineBalanced(e,t,i,n){const s=e.reduce((e,t)=>e+i.width(t),0),r=i.width(" "),o=(s+r*(e.length-n-2))/n,a=[];let l=[],c=i.width(e[0]),h=!0;for(const n of e){const e=i.width(n);if(h){l=[],l.push(n),c=e,h=!1,a.push(l);continue}const s=c+r+e;s<=o?(l.push(n),c=s):s<=t?(l.push(n),h=!0):(l=[n],c=e,a.push(l))}return a}setFont(e){this.fontFamily=e.fontFamily,this.fontSize=e.fontSize,this.fontStyle=e.fontStyle,this.fontWeight=e.fontWeight}setAlign(e){this.textAlign=e.textAlign,this.textBaseline=e.textBaseline}static getVerticalModifier(e){switch(e){case"top":case"hanging":return 0;case"bottom":case"alphabetic":case"ideographic":return 1;case"middle":return.5}}static get textContext(){if(!this._textContext){const e=En("canvas");e.width=0,e.height=0,this._textContext=e.getContext("2d")}return this._textContext}static measureText(e,t,i,n){return this._measureText({text:e,font:t,textBaseline:i,textAlign:n})}static getTextSize(e,t){return this._getTextSize({text:e,font:t})}static getTextSizeMultiline(t,i,n=e.defaultStyles.textBaseline,s=e.defaultStyles.textAlign,r){var o,a;let l=0,c=0,h=0,d=0,u=0;for(const[e,r]of t.entries()){const p=this._measureText({text:r,font:i,textBaseline:n,textAlign:s});c=Math.max(c,p.actualBoundingBoxLeft),h=Math.max(h,p.width),0==e?(l+=p.actualBoundingBoxAscent,d+=p.actualBoundingBoxAscent):u+=null!=(o=p.fontBoundingBoxAscent)?o:p.emHeightAscent,e==t.length-1?d+=p.actualBoundingBoxDescent:u+=null!=(a=p.fontBoundingBoxDescent)?a:p.emHeightDescent}return null!=r&&(u=(t.length-1)*r),d+=u,l+=u*e.getVerticalModifier(n),{top:l,left:c,width:h,height:d}}};_o.className="Text",_o.defaultLineHeightRatio=1.15,_o.defaultStyles=Object.assign({},Io.defaultStyles,{textAlign:"start",fontStyle:void 0,fontWeight:void 0,fontSize:10,fontFamily:"sans-serif",textBaseline:"alphabetic"}),_o.ellipsis="…",_o.punctuationMarks=[".",",","-",":",";","!","?","'",'"',"(",")"],_o._measureText=No(({text:e,font:t,textBaseline:i,textAlign:n})=>{const s=_o.textContext;return s.font!==t&&(s.font=t),s.textBaseline!==i&&(s.textBaseline=i),s.textAlign!==n&&(s.textAlign=n),s.measureText(e)}),_o._getTextSize=No(({text:e,font:t})=>{const i=_o.textContext;i.font!==t&&(i.font=t);const n=i.measureText(e);return{width:n.width,height:n.actualBoundingBoxAscent+n.actualBoundingBoxDescent}}),S([ss({redraw:3})],_o.prototype,"x",2),S([ss({redraw:3})],_o.prototype,"y",2),S([ss({redraw:3,changeCb:e=>e.onTextChange()})],_o.prototype,"text",2),S([Oo()],_o.prototype,"fontStyle",2),S([Oo()],_o.prototype,"fontWeight",2),S([Oo()],_o.prototype,"fontSize",2),S([Oo()],_o.prototype,"fontFamily",2),S([ss({redraw:3})],_o.prototype,"textAlign",2),S([ss({redraw:3})],_o.prototype,"textBaseline",2),S([ss({redraw:3})],_o.prototype,"lineHeight",2);var Fo=_o,Go=class{constructor(e){this.font=ze(e)?e:Vo(e)}size(e){return e.includes("\n")?Fo.getTextSizeMultiline(e.split("\n").map(e=>e.trim()),this.font):Fo.getTextSize(e,this.font)}width(e){const{width:t}=this.size(e);return t}};function Vo(e){const{fontFamily:t,fontSize:i,fontStyle:n,fontWeight:s}=e;return[null!=n?n:"",null!=s?s:"",i+"px",t].join(" ").trim()}var Bo=class extends yt{constructor(){super(...arguments),this.enabled=!0,this.fontSize=12,this.fontFamily="Verdana, sans-serif"}getFont(){return Vo(this)}};function Ho(e){const{parallelFlipRotation:t=0,regularFlipRotation:i=0}=e,n=e.rotation?Os(Vs(e.rotation)):0,s=!n&&t>=0&&t<=Math.PI?-1:1,r=!n&&i>=0&&i<=Math.PI?-1:1;let o=0;return e.parallel?o=s*Math.PI/2:-1===r&&(o=Math.PI),{configuredRotation:n,defaultRotation:o,parallelFlipFlag:s,regularFlipFlag:r}}function zo(e,t,i,n,s){const r=t>0&&t<=Math.PI,o=i>0&&i<=Math.PI;if(e){if(!t&&!i)return"center";if(n*(r||o?-1:1)==-1)return"end"}else if(n*s===-1)return"end";return"start"}function Uo(e,t,i,n,s){const{width:r,height:o}=t,a=new ts(i,n,0,0);s.transformBBox(a,t);const{x:l,y:c}=t;return t.width=r,t.height=o,{point:{x:l,y:c},label:{text:e,width:r,height:o}}}S([$s(Js)],Bo.prototype,"enabled",2),S([$s(mr,{optional:!0})],Bo.prototype,"color",2),S([$s(Tr,{optional:!0})],Bo.prototype,"fontStyle",2),S([$s(Dr,{optional:!0})],Bo.prototype,"fontWeight",2),S([$s(sr)],Bo.prototype,"fontSize",2),S([$s(tr)],Bo.prototype,"fontFamily",2),S([$s(er,{optional:!0})],Bo.prototype,"formatter",2);var Wo=(e=>(e[e.SERIES_BACKGROUND_ZINDEX=0]="SERIES_BACKGROUND_ZINDEX",e[e.AXIS_GRID_ZINDEX=1]="AXIS_GRID_ZINDEX",e[e.AXIS_ZINDEX=2]="AXIS_ZINDEX",e[e.SERIES_CROSSLINE_RANGE_ZINDEX=3]="SERIES_CROSSLINE_RANGE_ZINDEX",e[e.SERIES_LAYER_ZINDEX=4]="SERIES_LAYER_ZINDEX",e[e.SERIES_HIGHLIGHT_ZINDEX=5]="SERIES_HIGHLIGHT_ZINDEX",e[e.AXIS_FOREGROUND_ZINDEX=6]="AXIS_FOREGROUND_ZINDEX",e[e.SERIES_CROSSHAIR_ZINDEX=7]="SERIES_CROSSHAIR_ZINDEX",e[e.SERIES_LABEL_ZINDEX=8]="SERIES_LABEL_ZINDEX",e[e.SERIES_CROSSLINE_LINE_ZINDEX=9]="SERIES_CROSSLINE_LINE_ZINDEX",e[e.SERIES_ANNOTATION_ZINDEX=10]="SERIES_ANNOTATION_ZINDEX",e[e.LEGEND_ZINDEX=11]="LEGEND_ZINDEX",e[e.NAVIGATOR_ZINDEX=12]="NAVIGATOR_ZINDEX",e))(Wo||{});function jo(e){return null!=e&&Object.hasOwn(e,"toString")&&ze(e.toString())}function Ko(e){return null!=e&&Object.hasOwn(e,"valueOf")&&We(e.valueOf())}function $o(e){return We(e)||_e(e)||Ko(e)}function Yo(e,t){return null!=e&&(!t||$o(e))}function qo(e){return jo(e)&&Object.hasOwn(e,"id")?e.id:e}var Xo=e=>"value"===e?Br((e,t)=>"line"===t.target.type,e=>"range"===e.target.type?"crossLine type 'range' to have a 'range' property instead of 'value'":"crossLine property 'type' to be 'line'"):Br((e,t)=>"range"===t.target.type,e=>"line"===e.target.type?"crossLine type 'line' to have a 'value' property instead of 'range'":"crossLine property 'type' to be 'range'"),Zo=(e,t,i,n)=>{const s="line"===e&&void 0!==t,r="range"===e&&void 0!==i;if(!s&&!r)return!0;const[o,a]=null!=i?i:[t,void 0],l=Xr.is(n)||Co.is(n),c=Yo(o,l)&&!isNaN(n.convert(o)),h=Yo(a,l)&&!isNaN(n.convert(a));if(s&&c||r&&c&&h)return!0;const d=["Expecting crossLine"];return r?(c||d.push(`range start ${Ur(o)}`),h||d.push(`${c?"":"and "}range end ${Ur(a)}`)):d.push(`value ${Ur(o)}`),d.push("to match the axis scale domain."),O.warnOnce(d.join(" ")),!1},Qo={top:{xTranslationDirection:0,yTranslationDirection:-1},bottom:{xTranslationDirection:0,yTranslationDirection:1},left:{xTranslationDirection:-1,yTranslationDirection:0},right:{xTranslationDirection:1,yTranslationDirection:0},topLeft:{xTranslationDirection:1,yTranslationDirection:-1},topRight:{xTranslationDirection:-1,yTranslationDirection:-1},bottomLeft:{xTranslationDirection:1,yTranslationDirection:1},bottomRight:{xTranslationDirection:-1,yTranslationDirection:1},inside:{xTranslationDirection:0,yTranslationDirection:0},insideLeft:{xTranslationDirection:1,yTranslationDirection:0},insideRight:{xTranslationDirection:-1,yTranslationDirection:0},insideTop:{xTranslationDirection:0,yTranslationDirection:1},insideBottom:{xTranslationDirection:0,yTranslationDirection:-1},insideTopLeft:{xTranslationDirection:1,yTranslationDirection:1},insideBottomLeft:{xTranslationDirection:1,yTranslationDirection:-1},insideTopRight:{xTranslationDirection:-1,yTranslationDirection:1},insideBottomRight:{xTranslationDirection:-1,yTranslationDirection:-1}},Jo={top:{xTranslationDirection:1,yTranslationDirection:0},bottom:{xTranslationDirection:-1,yTranslationDirection:0},left:{xTranslationDirection:0,yTranslationDirection:-1},right:{xTranslationDirection:0,yTranslationDirection:1},topLeft:{xTranslationDirection:-1,yTranslationDirection:-1},topRight:{xTranslationDirection:-1,yTranslationDirection:1},bottomLeft:{xTranslationDirection:1,yTranslationDirection:-1},bottomRight:{xTranslationDirection:1,yTranslationDirection:1},inside:{xTranslationDirection:0,yTranslationDirection:0},insideLeft:{xTranslationDirection:0,yTranslationDirection:1},insideRight:{xTranslationDirection:0,yTranslationDirection:-1},insideTop:{xTranslationDirection:-1,yTranslationDirection:0},insideBottom:{xTranslationDirection:1,yTranslationDirection:0},insideTopLeft:{xTranslationDirection:-1,yTranslationDirection:1},insideBottomLeft:{xTranslationDirection:1,yTranslationDirection:1},insideTopRight:{xTranslationDirection:-1,yTranslationDirection:-1},insideBottomRight:{xTranslationDirection:1,yTranslationDirection:-1}};function ea({yDirection:e,padding:t=0,position:i="top",bbox:n}){const s=e?Qo:Jo,{xTranslationDirection:r,yTranslationDirection:o}=s[i];return{xTranslation:r*(t+(e?n.width:n.height)/2),yTranslation:o*(t+(e?n.height:n.width)/2)}}var ta=({yDirection:e,xEnd:t,yStart:i,yEnd:n})=>e?{x:t/2,y:i}:{x:t,y:isNaN(n)?i:(i+n)/2},ia=({yDirection:e,xStart:t,xEnd:i,yStart:n,yEnd:s})=>e?{x:t,y:isNaN(s)?n:(n+s)/2}:{x:i/2,y:n},na=({yDirection:e,xEnd:t,yStart:i,yEnd:n})=>e?{x:t,y:isNaN(n)?i:(i+n)/2}:{x:t/2,y:isNaN(n)?i:n},sa=({yDirection:e,xStart:t,xEnd:i,yStart:n,yEnd:s})=>e?{x:i/2,y:isNaN(s)?n:s}:{x:t,y:isNaN(s)?n:(n+s)/2},ra=({yDirection:e,xStart:t,xEnd:i,yStart:n})=>e?{x:t/2,y:n}:{x:i,y:n},oa=({yDirection:e,xStart:t,yStart:i,yEnd:n})=>e?{x:t,y:isNaN(n)?i:n}:{x:t,y:i},aa=({yDirection:e,xEnd:t,yStart:i,yEnd:n})=>e?{x:t,y:i}:{x:t,y:isNaN(n)?i:n},la=({yDirection:e,xStart:t,xEnd:i,yStart:n,yEnd:s})=>e?{x:i,y:isNaN(s)?n:s}:{x:t,y:isNaN(s)?n:s},ca={top:{c:ta},bottom:{c:sa},left:{c:ia},right:{c:na},topLeft:{c:ra},topRight:{c:aa},bottomLeft:{c:oa},bottomRight:{c:la},inside:{c:({xEnd:e,yStart:t,yEnd:i})=>({x:e/2,y:isNaN(i)?t:(t+i)/2})},insideLeft:{c:ia},insideRight:{c:na},insideTop:{c:ta},insideBottom:{c:sa},insideTopLeft:{c:ra},insideBottomLeft:{c:oa},insideTopRight:{c:aa},insideBottomRight:{c:la}},ha=Fr(["top","left","right","bottom","topLeft","topRight","bottomLeft","bottomRight","inside","insideLeft","insideRight","insideTop","insideBottom","insideTopLeft","insideBottomLeft","insideTopRight","insideBottomRight"],"crossLine label position"),da=class{constructor(){this.enabled=void 0,this.text=void 0,this.fontStyle=void 0,this.fontWeight=void 0,this.fontSize=14,this.fontFamily="Verdana, sans-serif",this.padding=5,this.color="rgba(87, 87, 87, 1)",this.position=void 0,this.rotation=void 0,this.parallel=void 0}};S([$s(Js,{optional:!0})],da.prototype,"enabled",2),S([$s(tr,{optional:!0})],da.prototype,"text",2),S([$s(Tr,{optional:!0})],da.prototype,"fontStyle",2),S([$s(Dr,{optional:!0})],da.prototype,"fontWeight",2),S([$s(sr)],da.prototype,"fontSize",2),S([$s(tr)],da.prototype,"fontFamily",2),S([$s(ir)],da.prototype,"padding",2),S([$s(mr,{optional:!0})],da.prototype,"color",2),S([$s(ha,{optional:!0})],da.prototype,"position",2),S([$s(or,{optional:!0})],da.prototype,"rotation",2),S([$s(Js,{optional:!0})],da.prototype,"parallel",2);var ua=class e{constructor(){this.id=Vn(this),this.enabled=void 0,this.type=void 0,this.range=void 0,this.value=void 0,this.fill=void 0,this.fillOpacity=void 0,this.stroke=void 0,this.strokeWidth=void 0,this.strokeOpacity=void 0,this.lineDash=void 0,this.label=new da,this.scale=void 0,this.clippedRange=[-1/0,1/0],this.gridLength=0,this.sideFlag=-1,this.parallelFlipRotation=0,this.regularFlipRotation=0,this.direction="x",this.group=new Eo({name:`${this.id}`,layer:!0,zIndex:e.LINE_LAYER_ZINDEX}),this.labelGroup=new Eo({name:`${this.id}`,layer:!0,zIndex:e.LABEL_LAYER_ZINDEX}),this.crossLineRange=new Ro,this.crossLineLabel=new Fo,this.labelPoint=void 0,this.data=[],this.startLine=!1,this.endLine=!1,this.isRange=!1;const{group:t,labelGroup:i,crossLineRange:n,crossLineLabel:s}=this;t.append(n),i.append(s),n.pointerEvents=1}update(e){const{enabled:t,data:i,type:n,value:s,range:r,scale:o}=this;if(!(n&&o&&t&&e&&Zo(n,s,r,o)&&0!==i.length))return this.group.visible=!1,void(this.labelGroup.visible=!1);this.group.visible=e,this.labelGroup.visible=e,this.group.zIndex=this.getZIndex(this.isRange),this.updateNodes()}calculateLayout(e,t){if(!e)return;if(!this.createNodeData(t))return;const{sideFlag:i,gridLength:n,data:s}=this,r=[],o=i*n,a=s[0],l=s[1],c=new ts(Math.min(0,o),Math.min(a,l),Math.abs(0-o),Math.abs(a-l));r.push(c);const h=this.computeLabelBBox();return h&&r.push(h),ts.merge(r)}updateNodes(){this.updateRangeNode(),this.label.enabled&&(this.updateLabel(),this.positionLabel())}createNodeData(e){var t,i,n;const{scale:s,gridLength:r,sideFlag:o,direction:a,label:{position:l="top"},clippedRange:c,strokeWidth:h=0}=this;if(this.data=[],!s)return!1;const d=null!=(t=s.bandwidth)?t:0,u=null!=(i=s.step)?i:0,p=(e?-1:1)*(s instanceof js?(u-d)/2:0),[g,f]=[0,o*r];let[m,v]=this.getRange();const y=void 0===v&&Co.is(s)?d/2+p:0;let[C,b]=[Number(s.convert(m,{clampMode:"clamped"}))-p+y,s.convert(v,{clampMode:"clamped"})+d+p];C=Un(C,c),b=Un(b,c),[m,v]=[Number(s.convert(m))+y,s.convert(v)+d];const S=(m===C||v===b||C!==b)&&Math.abs(b-C)>0;if(S&&C>b&&([C,b]=[b,C],[m,v]=[v,m]),m-p>=C&&(m-=p),v+p<=b&&(v+=p),this.isRange=S,this.startLine=h>0&&m>=C&&m<=C+p,this.endLine=h>0&&v>=b-d-p&&v<=b,!S&&!this.startLine&&!this.endLine)return!1;if(this.data=[C,b],this.label.enabled){const e="y"===a,{c:t=ta}=null!=(n=ca[l])?n:{},{x:i,y:s}=t({yDirection:e,xStart:g,xEnd:f,yStart:C,yEnd:b});this.labelPoint={x:i,y:s}}return!0}updateRangeNode(){var e;const{crossLineRange:t,sideFlag:i,gridLength:n,data:s,startLine:r,endLine:o,isRange:a,fill:l,fillOpacity:c,stroke:h,strokeWidth:d,lineDash:u}=this;t.x1=0,t.x2=i*n,t.y1=s[0],t.y2=s[1],t.startLine=r,t.endLine=o,t.isRange=a,t.fill=l,t.fillOpacity=null!=c?c:1,t.stroke=h,t.strokeWidth=null!=d?d:1,t.strokeOpacity=null!=(e=this.strokeOpacity)?e:1,t.lineDash=u}updateLabel(){const{crossLineLabel:e,label:t}=this;t.text&&(e.fontStyle=t.fontStyle,e.fontWeight=t.fontWeight,e.fontSize=t.fontSize,e.fontFamily=t.fontFamily,e.fill=t.color,e.text=t.text)}positionLabel(){const{crossLineLabel:e,labelPoint:{x:t,y:i}={},label:{parallel:n,rotation:s,position:r="top",padding:o=0},direction:a,parallelFlipRotation:l,regularFlipRotation:c}=this;if(void 0===t||void 0===i)return;const{defaultRotation:h,configuredRotation:d}=Ho({rotation:s,parallel:n,regularFlipRotation:c,parallelFlipRotation:l});e.rotation=h+d,e.textBaseline="middle",e.textAlign="center";const u=e.computeTransformedBBox();if(!u)return;const p="y"===a,{xTranslation:g,yTranslation:f}=ea({yDirection:p,padding:o,position:r,bbox:u});e.translationX=t+g,e.translationY=i+f}getZIndex(t=!1){return t?e.RANGE_LAYER_ZINDEX:e.LINE_LAYER_ZINDEX}getRange(){var e;const{value:t,range:i,scale:n}=this,s=Xr.is(n)||Co.is(n),r=null!=(e=null==i?void 0:i[0])?e:t;let o=null==i?void 0:i[1];return s||void 0!==o||(o=r),s&&r===o&&(o=void 0),[r,o]}computeLabelBBox(){const{label:e}=this;if(!e.enabled)return;const t=new Fo;t.fontFamily=e.fontFamily,t.fontSize=e.fontSize,t.fontStyle=e.fontStyle,t.fontWeight=e.fontWeight,t.text=e.text;const{labelPoint:{x:i,y:n}={},label:{parallel:s,rotation:r,position:o="top",padding:a=0},direction:l,parallelFlipRotation:c,regularFlipRotation:h}=this;if(void 0===i||void 0===n)return;const{configuredRotation:d}=Ho({rotation:r,parallel:s,regularFlipRotation:h,parallelFlipRotation:c});t.rotation=d,t.textBaseline="middle",t.textAlign="center";const u=t.computeTransformedBBox();if(!u)return;const p="y"===l,{xTranslation:g,yTranslation:f}=ea({yDirection:p,padding:a,position:o,bbox:u});return t.translationX=i+g,t.translationY=n+f,t.computeTransformedBBox()}calculatePadding(e){var t,i,n,s,r,o,a,l;const{isRange:c,startLine:h,endLine:d,direction:u,label:{padding:p=0,position:g="top"}}=this;if(!c&&!h&&!d)return;const f=this.computeLabelBBox();if(null==(null==f?void 0:f.x)||null==(null==f?void 0:f.y))return;const m=function({yDirection:e,bbox:t,padding:i=0,position:n="top"}){const s={};return n.startsWith("inside")||("top"!==n||e?"bottom"!==n||e?"left"===n&&e?s.left=i+t.width:"right"===n&&e&&(s.right=i+t.width):s.bottom=i+t.height:s.top=i+t.height),s}({yDirection:"y"===u,padding:p,position:g,bbox:f});e.left=Math.max(null!=(t=e.left)?t:0,null!=(i=m.left)?i:0),e.right=Math.max(null!=(n=e.right)?n:0,null!=(s=m.right)?s:0),e.top=Math.max(null!=(r=e.top)?r:0,null!=(o=m.top)?o:0),e.bottom=Math.max(null!=(a=e.bottom)?a:0,null!=(l=m.bottom)?l:0)}};ua.LINE_LAYER_ZINDEX=9,ua.RANGE_LAYER_ZINDEX=3,ua.LABEL_LAYER_ZINDEX=8,ua.className="CrossLine",S([$s(Js,{optional:!0})],ua.prototype,"enabled",2),S([$s(Fr(["range","line"],"a crossLine type"),{optional:!0})],ua.prototype,"type",2),S([$s(qs(Xo("range"),lr.restrict({length:2})),{optional:!0})],ua.prototype,"range",2),S([$s(Xo("value"),{optional:!0})],ua.prototype,"value",2),S([$s(mr,{optional:!0})],ua.prototype,"fill",2),S([$s(rr,{optional:!0})],ua.prototype,"fillOpacity",2),S([$s(mr,{optional:!0})],ua.prototype,"stroke",2),S([$s(ir,{optional:!0})],ua.prototype,"strokeWidth",2),S([$s(rr,{optional:!0})],ua.prototype,"strokeOpacity",2),S([$s(Mr,{optional:!0})],ua.prototype,"lineDash",2);var pa=ua,ga=class{constructor(){this.moduleMap=new Map}*modules(){for(const e of this.moduleMap.values())yield e.moduleInstance}addModule(e,t){if(this.moduleMap.has(e.optionsKey))throw new Error(`AG Charts - module already initialised: ${e.optionsKey}`);this.moduleMap.set(e.optionsKey,{module:e,moduleInstance:t(e)})}removeModule(e){var t;const i=ze(e)?e:e.optionsKey;null==(t=this.moduleMap.get(i))||t.moduleInstance.destroy(),this.moduleMap.delete(i)}getModule(e){var t;return null==(t=this.moduleMap.get(ze(e)?e:e.optionsKey))?void 0:t.moduleInstance}isEnabled(e){return this.moduleMap.has(ze(e)?e:e.optionsKey)}mapModules(e){return Array.from(this.moduleMap.values(),(t,i)=>e(t.moduleInstance,i))}destroy(){var e;for(const t of this.moduleMap.keys())null==(e=this.moduleMap.get(t))||e.moduleInstance.destroy();this.moduleMap.clear()}},fa={};function ma(e,t){const{nodes:i,selections:n}=Ds(e);for(const e of n){for(const i of e.nodes()){const e=t(i,i.datum);i.setProperties(e)}e.cleanup()}for(const e of i){const i=t(e,e.datum);e.setProperties(i)}}b(fa,{resetMotion:()=>ma});var va=class{constructor(e,t,i){this.states=t,this.preTransitionCb=i,this.debug=Rn.create(!0,"animation"),this.state=e,this.debug(`%c${this.constructor.name} | init -> ${e}`,"color: green")}transition(e,t){var i,n;const s=this.states[this.state],r=null==s?void 0:s[e];if(!r)return void this.debug(`%c${this.constructor.name} | ${this.state} -> ${e} -> ${this.state}`,"color: grey");let o=this.state;return"string"==typeof r?o=r:"object"==typeof r&&(o=r.target),this.debug(`%c${this.constructor.name} | ${this.state} -> ${e} -> ${o}`,"color: green"),null==(i=this.preTransitionCb)||i.call(this,this.state,o),this.state=o,"function"==typeof r?r(t):"object"==typeof r&&(null==(n=r.action)||n.call(r,t)),this.state}},ya=e=>`(${e})`,Ca=e=>`${ya(e)}?`,ba=e=>Ca(`?:${e}`),Sa=new RegExp(["^",ba(`${Ca(".")}${ya("[<>=^]")}`),Ca("[+\\-( ]"),Ca("[$€£¥₣₹#]"),Ca("0"),Ca("\\d+"),Ca(","),ba(`\\.${ya("\\d+")}`),Ca("~"),Ca("[%a-z]"),"$"].join(""),"i"),wa=new RegExp(["^",ya(".*?"),`#\\{${ya(".+?")}\\}`,ya(".*?"),"$"].join(""));function xa(e){let t,i;const n=wa.exec(e);n&&([,t,e,i]=n);const s=Sa.exec(e);if(!s)throw new Error(`The number formatter is invalid: ${e}`);const[,r,o,a,l,c,h,d,u,p,g]=s;return{fill:r,align:o,sign:a,symbol:l,zero:c,width:parseInt(h),comma:d,precision:parseInt(u),trim:Boolean(p),type:g,prefix:t,suffix:i}}function Ea(e){const t="string"==typeof e?xa(e):e,{fill:i,align:n,sign:s="-",symbol:r,zero:o,width:a,comma:l,type:c,prefix:h="",suffix:d="",precision:u}=t;let{trim:p}=t;const g=void 0===u||isNaN(u);let f,m;if(c)if(c in Ta&&c in Aa)f=g?Aa[c]:Ta[c];else if(c in Ta)f=Ta[c];else{if(!(c in Aa))throw new Error(`The number formatter type is invalid: ${c}`);f=Aa[c]}else f=Ta.g,p=!0;return m=null==u||g?c?6:12:u,e=>{let t=f(e,m);return p&&(t=t.replace(/\.0+$/,"").replace(/(\.[1-9])0+$/,"$1")),l&&(t=function(e,t){let i=e.indexOf(".");i<0&&(i=e.length);const n=e.substring(0,i).split(""),s=e.substring(i);for(let e=n.length-3;e>0;e-=3)n.splice(e,0,t);return`${n.join("")}${s}`}(t,l)),t=function(e,t,i=""){if("("===i)return e>=0?t:`(${t})`;return`${e>=0?"+"===i?"+":"":"−"}${t}`}(e,t,s),r&&"#"!==r&&(t=`${r}${t}`),"#"===r&&"x"===c&&(t=`0x${t}`),"s"===c&&(t=`${t}${function(e){return La[Da(e)]}(e)}`),"%"!==c&&"p"!==c||(t=`${t}%`),null==a||isNaN(a)||(t=function(e,t,i=" ",n=">"){let s=e;if(">"!==n&&n){if("<"===n)s=s.padEnd(t,i);else if("^"===n){const e=Math.max(0,t-s.length),n=Math.ceil(e/2),r=Math.floor(e/2);s=s.padStart(n+s.length,i),s=s.padEnd(r+s.length,i)}}else s=s.padStart(t,i);return s}(t,a,null!=i?i:o,n)),t=`${h}${t}${d}`,t}}var Ma=e=>Math.floor(Math.abs(e)),Aa={b:e=>Ma(e).toString(2),c:e=>String.fromCharCode(e),d:e=>Math.round(Math.abs(e)).toFixed(0),o:e=>Ma(e).toString(8),x:e=>Ma(e).toString(16),X:e=>Aa.x(e).toUpperCase(),n:e=>Aa.d(e),"%":e=>`${Ma(100*e).toFixed(0)}`},Ta={e:(e,t)=>Math.abs(e).toExponential(t),E:(e,t)=>Ta.e(e,t).toUpperCase(),f:(e,t)=>Math.abs(e).toFixed(t),F:(e,t)=>Ta.f(e,t).toUpperCase(),g:(e,t)=>{if(0===e)return"0";const i=Math.abs(e),n=Math.floor(Math.log10(i));return n>=-4&&n<t?i.toFixed(t-1-n):i.toExponential(t-1)},G:(e,t)=>Ta.g(e,t).toUpperCase(),n:(e,t)=>Ta.g(e,t),p:(e,t)=>Ta.r(100*e,t),r:(e,t)=>{if(0===e)return"0";const i=Math.abs(e),n=Math.floor(Math.log10(i))-(t-1);if(n<=0)return i.toFixed(-n);const s=Math.pow(10,n);return(Math.round(i/s)*s).toFixed()},s:(e,t)=>{const i=Da(e);return Ta.r(e/Math.pow(10,i),t)},"%":(e,t)=>Ta.f(100*e,t)};function Da(e){return zn(Ia,e?3*Math.floor(Math.log10(Math.abs(e))/3):0,Ra)}var Ia=-24,Ra=24,La={[Ia]:"y",[-21]:"z",[-18]:"a",[-15]:"f",[-12]:"p",[-9]:"n",[-6]:"µ",[-3]:"m",0:"",3:"k",6:"M",9:"G",12:"T",15:"P",18:"E",21:"Z",[Ra]:"Y"};function ka(e,t){const i=xa(null!=t?t:",f"),{precision:n}=i;(null==n||isNaN(n))&&("f"===i.type||"%"===i.type?i.precision=Math.max(...e.map(e=>{if("number"!=typeof e||0===e)return 0;const t=Math.floor(Math.log10(Math.abs(e))),n=i.type?6:12,s=e.toExponential(n-1).replace(/\.?0+e/,"e"),r=s.indexOf(".");if(r<0)return t>=0?0:-t;const o=s.indexOf("e")-r;return Math.max(0,o-t-1)})):i.type&&!(i.type in Ta)||(i.precision=Math.max(...e.map(e=>{if("number"!=typeof e)return 0;const t=e.toExponential((i.type?6:12)-1).replace(/\.?0+e/,"e");return t.substring(0,t.indexOf("e")).replace(".","").length}))));const s=Ea(i);return e=>s(Number(e))}var Pa=class e extends Xr{constructor(){super([1,10],[0,1]),this.type="log",this.base=10,this.baseLog=k,this.basePow=k,this.log=e=>Math.min(...this.domain)>=0?this.baseLog(e):-this.baseLog(-e),this.pow=e=>Math.min(...this.domain)>=0?this.basePow(e):-this.basePow(-e),this.defaultClampMode="clamped"}toDomain(e){return e}transform(e){return Math.min(...this.domain)>=0?Math.log(e):-Math.log(-e)}transformInvert(e){return Math.min(...this.domain)>=0?Math.exp(e):-Math.exp(-e)}refresh(){this.base<=0&&(this.base=0,O.warnOnce("expecting a finite Number greater than to 0")),super.refresh()}update(){!this.domain||this.domain.length<2||(this.baseLog=e.getBaseLogMethod(this.base),this.basePow=e.getBasePowerMethod(this.base),this.nice&&this.updateNiceDomain())}updateNiceDomain(){const[e,t]=this.domain,i=e>t?Math.ceil:Math.floor,n=e>t?Math.floor:Math.ceil,s=this.pow(i(this.log(e))),r=this.pow(n(this.log(t)));this.niceDomain=[s,r]}ticks(){var e;const t=null!=(e=this.tickCount)?e:10;if(!this.domain||this.domain.length<2||t<1)return[];this.refresh();const i=this.base,[n,s]=this.getDomain(),r=Math.min(n,s),o=Math.max(n,s);let a=this.log(r),l=this.log(o);if(this.interval){const e=Math.abs(this.interval),t=Math.abs(l-a);let i=go(a,l,Math.min(t,e));i=co(i.fractionDigits,i.map(e=>this.pow(e)).filter(e=>e>=r&&e<=o));const n=this.getPixelRange();if(!fo({start:r,stop:o,interval:e,count:i.length,availableRange:n}))return i}if(i%1!=0||l-a>=t){let e=ho(a,l,Math.min(l-a,t));return e=co(e.fractionDigits,e.map(e=>this.pow(e))),e}const c=[],h=r>0;a=Math.floor(a)-1,l=Math.round(l)+1;const d=jn(this.range)/t;let u=1/0;for(let e=a;e<=l;e++){const t=this.convert(this.pow(e+1));for(let n=1;n<i;n++){const s=h?n:i-n+1,a=this.pow(e)*s,l=this.convert(a),p=Math.abs(u-l),g=Math.abs(l-t);a>=r&&a<=o&&(1===n||p>=d&&g>=d||0===c.length)&&(c.push(a),u=l)}}return c}tickFormat({count:e,ticks:t,specifier:i}){return e!==1/0&&null==t&&this.ticks(),null!=i||(i=10===this.base?".0e":","),ze(i)?Ea(i):i}static getBaseLogMethod(e){switch(e){case 10:return Math.log10;case Math.E:return Math.log;case 2:return Math.log2;default:const t=Math.log(e);return e=>Math.log(e)/t}}static getBasePowerMethod(e){switch(e){case 10:return e=>e>=0?f(10,e):1/f(10,-e);case Math.E:return Math.exp;default:return t=>f(e,t)}}};S([Us],Pa.prototype,"base",2);var Na=Pa,Oa=class e{constructor(e,t,i=!0){this.parentNode=e,this.autoCleanup=i,this.garbageBin=new Set,this._nodesMap=new Map,this._nodes=[],this.data=[],this.debug=Rn.create(!0,"scene","scene:selections"),this.nodeFactory=Object.prototype.isPrototypeOf.call(hs,t)?()=>new t:t}static select(t,i,n=!0){return new e(t,i,n)}static selectAll(e,t){const i=[],n=e=>{t(e)&&i.push(e),e.children.forEach(n)};return n(e),i}static selectByClass(t,i,...n){return e.selectAll(t,e=>e instanceof i||n.some(t=>e instanceof t))}static selectByTag(t,i){return e.selectAll(t,e=>e.tag===i)}createNode(e,t,i){const n=this.nodeFactory(e);return n.datum=e,null==t||t(n),null==i?this._nodes.push(n):this._nodes.splice(i,0,n),this.parentNode.appendChild(n),n}update(e,t,i){if(this.garbageBin.size>0&&this.debug(`Selection - update() called with pending garbage: ${e}`),i){const n=new Map(e.map((e,t)=>[i(e),[e,t]]));for(const[e,t]of this._nodesMap.entries())if(n.has(t)){const[i]=n.get(t);e.datum=i,this.garbageBin.delete(e),n.delete(t)}else this.garbageBin.add(e);for(const[e,[i,s]]of n.entries())this._nodesMap.set(this.createNode(i,t,s),e)}else{const i=Math.max(e.length,this.data.length);for(let n=0;n<i;n++)n>=e.length?this.garbageBin.add(this._nodes[n]):n>=this._nodes.length?this.createNode(e[n],t):(this._nodes[n].datum=e[n],this.garbageBin.delete(this._nodes[n]))}return this.data=e.slice(),this.autoCleanup&&this.cleanup(),this}cleanup(){return 0===this.garbageBin.size||(this._nodes=this._nodes.filter(e=>!this.garbageBin.has(e)||(this._nodesMap.delete(e),this.garbageBin.delete(e),this.parentNode.removeChild(e),!1))),this}clear(){return this.update([]),this}isGarbage(e){return this.garbageBin.has(e)}hasGarbage(){return this.garbageBin.size>0}each(e){for(const t of this._nodes.entries())e(t[1],t[1].datum,t[0]);return this}*[Symbol.iterator](){for(let e=0;e<this._nodes.length;e++){const t=this._nodes[e],i=this._nodes[e].datum;yield{node:t,datum:i,index:e}}}select(t){return e.selectAll(this.parentNode,t)}selectByClass(t){return e.selectByClass(this.parentNode,t)}selectByTag(t){return e.selectByTag(this.parentNode,t)}nodes(){return this._nodes}};function _a(e,t,i,n){const s=e-i,r=t-n;return s*s+r*r}function Fa(e,t,i,n,s,r,o){if(i===s&&n===r)return Math.min(o,_a(e,t,i,n));const a=s-i,l=r-n,c=Math.max(0,Math.min(1,((e-i)*a+(t-n)*l)/(a*a+l*l))),h=i+c*a,d=n+c*l;return Math.min(o,_a(e,t,h,d))}function Ga(e,t,i,n,s,r,o,a,l){if(a&&([o,r]=[r,o]),!Gs(Math.atan2(t-n,e-i),r,o)){const o=i+Math.cos(r)*s,a=n+Math.sin(r)*s,c=i+Math.cos(r)*s,h=n+Math.sin(r)*s;return Math.min(l,_a(e,t,o,a),_a(e,t,c,h))}const c=s-Math.sqrt(_a(e,t,i,n));return Math.min(l,c*c)}var Va=class extends Io{constructor(e={}){super(e),this.x1=0,this.y1=0,this.x2=0,this.y2=0,this.restoreOwnStyles()}set x(e){this.x1=e,this.x2=e}set y(e){this.y1=e,this.y2=e}computeBBox(){return new ts(Math.min(this.x1,this.x2),Math.min(this.y1,this.y2),Math.abs(this.x2-this.x1),Math.abs(this.y2-this.y1))}isPointInPath(e,t){if(this.x1===this.x2||this.y1===this.y2){const{x:i,y:n}=this.transformPoint(e,t);return this.computeBBox().grow(this.strokeWidth/2).containsPoint(i,n)}return!1}distanceSquared(e,t){const{x1:i,y1:n,x2:s,y2:r}=this;return Fa(e,t,i,n,s,r,1/0)}render(e){var t;const{ctx:i,forceRender:n,stats:s,devicePixelRatio:r}=e;if(0===this.dirty&&!n)return void(s&&(s.nodesSkipped+=this.nodeCount.count));this.computeTransformMatrix(),this.matrix.toContext(i);let{x1:o,y1:a,x2:l,y2:c}=this;if(o===l){const{strokeWidth:e}=this,t=Math.round(o*r)/r+Math.trunc(e*r)%2/(2*r);o=t,l=t}else if(a===c){const{strokeWidth:e}=this,t=Math.round(a*r)/r+Math.trunc(e*r)%2/(2*r);a=t,c=t}i.beginPath(),i.moveTo(o,a),i.lineTo(l,c),this.fillStroke(i),null==(t=this.fillShadow)||t.markClean(),super.render(e)}};function Ba(e,t,i,n,s,r){if(0===e.size)return!1;let o=e.x,a=e.y;null!=t&&(o-=(t.x-.5)*e.size,a-=(t.y-.5)*e.size);let l=o;o<i?l=i:o>i+s&&(l=i+s);let c=a;a<n?c=n:a>n+r&&(c=n+r);const h=o-l,d=a-c;return Math.sqrt(h*h+d*d)<=.5*e.size}function Ha(e,t,i,n,s){const r=e.x+e.width>t&&e.x<t+n,o=e.y+e.height>i&&e.y<i+s;return r&&o}function za(e,t,i,n,s){return t+n<e.x+e.width&&t>e.x&&i>e.y&&i+s<e.y+e.height}function Ua(e){return null!=e&&"object"==typeof e.point&&"object"==typeof e.label}Va.className="Line",Va.defaultStyles=Object.assign({},Io.defaultStyles,{fill:void 0,strokeWidth:1}),S([ss({redraw:3})],Va.prototype,"x1",2),S([ss({redraw:3})],Va.prototype,"y1",2),S([ss({redraw:3})],Va.prototype,"x2",2),S([ss({redraw:3})],Va.prototype,"y2",2);var Wa={top:{x:0,y:-1},bottom:{x:0,y:1},left:{x:-1,y:0},right:{x:1,y:0}};function ja(e,t){return e.length===t.length&&e.every((e,i)=>{const n=t[i];return Array.isArray(e)&&Array.isArray(n)?ja(e,n):e===n})}function Ka(e,t){return e.length===t.length&&e.every((e,i)=>Number(e)===Number(t[i]))}function $a(e){const t=Pe(e)?e:e.split(".");if(1===t.length){const[e]=t;return De((t,i,n)=>t[e]=n,t=>t[e])}return De((e,i,n)=>it(e,t,n),e=>et(e,t))}function Ya(e){return De((t,i,n)=>t[e]=n)}function qa(e,t){return De((i,n,s)=>i[e][null!=t?t:n]=s)}function Xa(e){const{newValue:t,oldValue:i,changeValue:n}=e;return De((e,s,r,o)=>(r!==o&&(void 0!==o&&(null==i||i.call(e,o)),void 0!==r&&(null==t||t.call(e,r)),null==n||n.call(e,r,o)),r))}function Za(e){return t=e,(e,i)=>{Te(e,i).observers.push(t)};var t}function Qa(e,t,i){void 0===i||""===i?null==e||e.removeAttribute(t):null==e||e.setAttribute(t,i.toString())}function Ja(e,t,i,n,s){let{top:r,right:o,bottom:a,left:l,width:c,height:h}=s;return null!=l?null!=c?o=i-l+c:null!=o&&(c=i-l-o):null!=o&&null!=c&&(l=i-o-c),null!=r?null!=h?a=n-r-h:null!=a&&(h=n-a-r):null!=a&&null!=h&&(r=n-a-h),null==c?null==h?(c=e,h=t):c=Math.ceil(e*h/t):null==h&&(h=Math.ceil(t*c/e)),null==l&&(l=null==o?Math.floor((i-c)/2):i-o-c),null==r&&(r=null==a?Math.floor((n-h)/2):n-h-a),{x:l,y:r,width:c,height:h}}var el="ag-chart-tooltip",tl="ag-chart-dark-tooltip",il={html:"",ariaLabel:""};function nl(e){const t=(e,t,i)=>0===t||"."!==i[t-1]?". ":" ";return e.replace(/<br\s*\/?>/g,t).replace(/<\/p\s+>/g,t).replace(/<\/li\s*\/>/g,t).replace(/<[^>]+>/g,"")}function sl(e,t){var i,n,s;if("string"==typeof e)return{html:e,ariaLabel:e};const{content:r=(null!=(i=null==t?void 0:t.content)?i:""),title:o=(null==t?void 0:t.title),color:a=(null!=(n=null==t?void 0:t.color)?n:"white"),backgroundColor:l=(null!=(s=null==t?void 0:t.backgroundColor)?s:"#888")}=e;return{html:`${o?`<div class="${el}-title"\n        style="color: ${a}; background-color: ${l}">${o}</div>`:""}${r?`<div class="${el}-content">${r}</div>`:""}`,ariaLabel:nl(`${o?`${o}: `:""}${r}`)}}var rl=class extends yt{constructor(){super(...arguments),this.type="pointer",this.xOffset=0,this.yOffset=0}};S([$s(Fr(["pointer","node","top","right","bottom","left","top-left","top-right","bottom-right","bottom-left"],"a position type"))],rl.prototype,"type",2),S([$s(ir)],rl.prototype,"xOffset",2),S([$s(ir)],rl.prototype,"yOffset",2);var ol=class extends yt{constructor(){super(),this.enabled=!0,this.delay=0,this.range="nearest",this.wrapping="hyphenate",this.position=new rl,this.darkTheme=!1,this.enableInteraction=!1,this.lastVisibilityChange=Date.now(),this.wrapTypes=["always","hyphenate","on-space","never"],this.showTimeout=0,this._showArrow=!0,this.element=En("div",el),Qa(this.element,"aria-hidden",!0),this.root=wn("body"),this.root.appendChild(this.element)}destroy(){this.element.remove()}isVisible(){return!this.element.classList.contains(el+"-hidden")}show(e,t,i,n=!1){var s,r,o,a,l,c,h,d,u;const{element:p}=this;if(null!=i)p.innerHTML=i.html;else if(!p.innerHTML)return void this.toggle(!1);const g=null!=(r=null==(s=t.position)?void 0:s.type)?r:this.position.type,f=null!=(a=null==(o=t.position)?void 0:o.xOffset)?a:0,m=null!=(c=null==(l=t.position)?void 0:l.yOffset)?c:0,v=this.getTooltipBounds({positionType:g,meta:t,yOffset:m,xOffset:f,canvasRect:e}),y=this.getWindowSize(),C=Ja(p.clientWidth,p.clientHeight,e.width,e.height,v);C.x+=e.x,C.y+=e.y;const b=zn(0,C.x,y.width-p.clientWidth-1),S=zn(0,C.y,y.height-p.clientHeight),w=b!==C.x||S!==C.y,x=!("node"!==g&&"pointer"!==g||w||f||m),E=null!=(d=null!=(h=t.showArrow)?h:this.showArrow)?d:x;this.updateShowArrow(E),p.style.transform=`translate(${Math.round(b)}px, ${Math.round(S)}px)`,this.enableInteraction=null!=(u=t.enableInteraction)&&u,this.delay>0&&!n?(this.toggle(!1),this.showTimeout=setTimeout(()=>{this.toggle(!0)},this.delay)):this.toggle(!0)}getWindowSize(){const{innerWidth:e,innerHeight:t}=xn();return{width:e,height:t}}toggle(e){const{classList:t}=this.element,i=(e,i)=>t.toggle(`${el}-${e}`,i),n=this.isVisible();let s=1/0;if(e||clearTimeout(this.showTimeout),n!==e){const e=Date.now();s=e-this.lastVisibilityChange,this.lastVisibilityChange=e}s>5&&i("no-animation",!n&&e&&s>100),i("no-interaction",!this.enableInteraction),i("hidden",!e),i("arrow",this._showArrow),t.toggle(tl,this.darkTheme);for(const e of this.wrapTypes)t.toggle(`${el}-wrap-${e}`,e===this.wrapping)}pointerLeftOntoTooltip(e){var t;if(!this.enableInteraction)return!1;const i=null==(t=e.sourceEvent.relatedTarget)?void 0:t.classList,n=Boolean(["","-title","-content"].filter(e=>null==i?void 0:i.contains(`${el}${e}`)));return void 0!==i&&n}updateShowArrow(e){this._showArrow=e}getTooltipBounds({positionType:e,meta:t,yOffset:i,xOffset:n,canvasRect:s}){const{clientWidth:r,clientHeight:o}=this.element,a={width:r,height:o};switch(e){case"node":case"pointer":return a.top=t.offsetY+i-o-8,a.left=t.offsetX+n-r/2,a;case"top":return a.top=i,a.left=s.width/2-r/2+n,a;case"right":return a.top=s.height/2-o/2+i,a.left=s.width-r/2+n,a;case"left":return a.top=s.height/2-o/2+i,a.left=n,a;case"bottom":return a.top=s.height-o+i,a.left=s.width/2-r/2+n,a;case"top-left":return a.top=i,a.left=n,a;case"top-right":return a.top=i,a.left=s.width-r+n,a;case"bottom-right":return a.top=s.height-o+i,a.left=s.width-r+n,a;case"bottom-left":return a.top=s.height-o+i,a.left=n,a}}};S([$s(Js)],ol.prototype,"enabled",2),S([$s(Js,{optional:!0})],ol.prototype,"showArrow",2),S([Za((e,t,i)=>{t&&e.element.classList.add(t),i&&e.element.classList.remove(i)}),$s(tr,{optional:!0})],ol.prototype,"class",2),S([$s(sr)],ol.prototype,"delay",2),S([$s(Or)],ol.prototype,"range",2),S([$s(Ir)],ol.prototype,"wrapping",2),S([$s(Zs)],ol.prototype,"position",2),S([$s(Js)],ol.prototype,"darkTheme",2);var al=class extends yt{constructor(){super(...arguments),this.id=Vn(this),this.node=new Fo({zIndex:1}).setProperties({textAlign:"center",pointerEvents:1}),this.enabled=!1,this.textAlign="center",this.fontSize=10,this.fontFamily="sans-serif",this.wrapping="always",this.truncated=!1}getOrAddRegion(e,t){return"root"===t?e.regionManager.getRegion("root"):e.regionManager.addRegionFromProperties({name:t,bboxproviders:[this.node],canInteraction:()=>this.enabled&&this.node.visible})}registerInteraction(e,t){const i=this.getOrAddRegion(e,t);return function(...e){return()=>{for(const t of e)t()}}(i.addListener("hover",t=>this.handleMouseMove(e,t)),i.addListener("leave",t=>this.handleMouseLeave(e,t)))}computeTextWrap(e,t){var i,n;const{text:s,wrapping:r}=this,o=Math.min(null!=(i=this.maxWidth)?i:1/0,e),a=null!=(n=this.maxHeight)?n:t;if(!isFinite(o)&&!isFinite(a))return void(this.node.text=s);const{text:l,truncated:c}=Fo.wrap(null!=s?s:"",o,a,this,r);this.node.text=l,this.truncated=c}updateTooltip(e,t){if(void 0!==t&&this.enabled&&this.node.visible&&this.truncated){const{offsetX:i,offsetY:n}=t;return e.tooltipManager.updateTooltip(this.id,{offsetX:i,offsetY:n,lastPointerEvent:t,showArrow:!1},sl({content:this.text})),!0}return!1}handleMouseMove(e,t){this.updateTooltip(e,t)&&t.consume()}handleMouseLeave(e,t){e.tooltipManager.removeTooltip(this.id)}};al.SMALL_PADDING=10,al.LARGE_PADDING=20,S([$s(Js)],al.prototype,"enabled",2),S([$s(tr,{optional:!0}),qa("node")],al.prototype,"text",2),S([$s(Rr,{optional:!0}),qa("node")],al.prototype,"textAlign",2),S([$s(Tr,{optional:!0}),qa("node")],al.prototype,"fontStyle",2),S([$s(Dr,{optional:!0}),qa("node")],al.prototype,"fontWeight",2),S([$s(sr),qa("node")],al.prototype,"fontSize",2),S([$s(tr),qa("node")],al.prototype,"fontFamily",2),S([$s(mr,{optional:!0}),qa("node","fill")],al.prototype,"color",2),S([$s(sr,{optional:!0})],al.prototype,"spacing",2),S([$s(sr,{optional:!0})],al.prototype,"lineHeight",2),S([$s(sr,{optional:!0})],al.prototype,"maxWidth",2),S([$s(sr,{optional:!0})],al.prototype,"maxHeight",2),S([$s(Ir)],al.prototype,"wrapping",2);var ll=["stroke","lineDash"],cl=cr(e=>Ve(e)&&Object.keys(e).every(e=>ll.includes(e)),"objects with gridline style properties such as 'stroke' or 'lineDash'"),hl=class{constructor(){this.enabled=!0,this.width=1,this.style=[{stroke:void 0,lineDash:[]}]}};S([$s(Js)],hl.prototype,"enabled",2),S([$s(sr)],hl.prototype,"width",2),S([$s(cl)],hl.prototype,"style",2);var dl=class extends yt{constructor(){super(...arguments),this.enabled=!0,this.autoWrap=!1,this.fontSize=12,this.fontFamily="Verdana, sans-serif",this.padding=5,this.minSpacing=NaN,this.color="rgba(87, 87, 87, 1)",this.avoidCollisions=!0,this.mirrored=!1,this.parallel=!1}getSideFlag(){return this.mirrored?1:-1}};S([$s(Js)],dl.prototype,"enabled",2),S([$s(Js,{optional:!0})],dl.prototype,"autoWrap",2),S([$s(sr,{optional:!0})],dl.prototype,"maxWidth",2),S([$s(sr,{optional:!0})],dl.prototype,"maxHeight",2),S([$s(Tr,{optional:!0})],dl.prototype,"fontStyle",2),S([$s(Dr,{optional:!0})],dl.prototype,"fontWeight",2),S([$s(ir.restrict({min:1}))],dl.prototype,"fontSize",2),S([$s(tr)],dl.prototype,"fontFamily",2),S([$s(sr)],dl.prototype,"padding",2),S([$s(ar),Ks(NaN)],dl.prototype,"minSpacing",2),S([$s(mr,{optional:!0})],dl.prototype,"color",2),S([$s(or,{optional:!0})],dl.prototype,"rotation",2),S([$s(Js)],dl.prototype,"avoidCollisions",2),S([$s(Js)],dl.prototype,"mirrored",2),S([$s(Js)],dl.prototype,"parallel",2),S([$s(er,{optional:!0})],dl.prototype,"formatter",2),S([$s(tr,{optional:!0})],dl.prototype,"format",2);var ul=class{constructor(){this.enabled=!0,this.width=1,this.color=void 0}};S([$s(Js)],ul.prototype,"enabled",2),S([$s(sr)],ul.prototype,"width",2),S([$s(mr,{optional:!0})],ul.prototype,"color",2);var pl=class extends yt{constructor(){super(...arguments),this.enabled=!1,this.spacing=al.SMALL_PADDING,this.fontSize=10,this.fontFamily="sans-serif",this.wrapping="always"}};function gl(e){const[t,i]=Wn(e.range),n=Math.floor(t),s=Math.ceil(i);return{min:n,max:s,visible:n!==s}}S([$s(Js)],pl.prototype,"enabled",2),S([$s(tr,{optional:!0})],pl.prototype,"text",2),S([$s(sr,{optional:!0})],pl.prototype,"spacing",2),S([$s(Tr,{optional:!0})],pl.prototype,"fontStyle",2),S([$s(Dr,{optional:!0})],pl.prototype,"fontWeight",2),S([$s(sr)],pl.prototype,"fontSize",2),S([$s(tr)],pl.prototype,"fontFamily",2),S([$s(mr,{optional:!0})],pl.prototype,"color",2),S([$s(Ir)],pl.prototype,"wrapping",2),S([$s(er,{optional:!0})],pl.prototype,"formatter",2);var fl=2*Math.PI,ml=fl/2;function vl(e){const t=(t,i)=>{const[n=e.min,s=e.max]=Wn(null!=i?i:[]);return t<n||t>s},i={fromFn(e,i,n){let s=e.y1+e.translationY,r=e.opacity;return("added"===n||t(e.datum.translationY,e.datum.range))&&(s=i.translationY,r=0),{y:0,translationY:s,opacity:r,phase:Rs[n]}},toFn(e,t,i){const n=t.translationY;let s=1;return"removed"===i&&(s=0),{y:0,translationY:n,opacity:s,finish:{y:n,translationY:0}}},intermediateFn:(e,i,n)=>({visible:!t(e.y)})},n={fromFn(e,i,n){var s;const r=null!=(s=e.previousDatum)?s:i,o=r.x,a=r.y,l=r.rotationCenterX;let c=Math.round(e.translationY),h=r.rotation,d=e.opacity;return"removed"===n||t(r.y,r.range)?h=i.rotation:("added"===n||t(e.datum.y,e.datum.range))&&(c=Math.round(r.translationY),d=0,h=i.rotation),{x:o,y:a,rotationCenterX:l,translationY:c,rotation:h,opacity:d,phase:Rs[n]}},toFn(e,t,i){var n,s;const r=t.x,o=t.y,a=t.rotationCenterX,l=Math.round(t.translationY);let c=0,h=1;var d,u;return"added"===i?(h=1,c=t.rotation):"removed"===i?(h=0,c=t.rotation):(d=null!=(s=null==(n=e.previousDatum)?void 0:n.rotation)?s:t.rotation,u=t.rotation,c=Math.abs(u-d)<ml?u:d>u?u+fl:u-fl),{x:r,y:o,rotationCenterX:a,translationY:l,rotation:c,opacity:h,finish:{rotation:t.rotation}}}};return{tick:i,line:{fromFn(e,t){var i;return y(v({},null!=(i=e.previousDatum)?i:t),{phase:Rs.updated})},toFn:(e,t)=>v({},t)},label:n,group:{fromFn(e,t){const{rotation:i,translationX:n,translationY:s}=e;return{rotation:i,translationX:n,translationY:s,phase:Rs.updated}},toFn(e,t){const{rotation:i,translationX:n,translationY:s}=t;return{rotation:i,translationX:n,translationY:s}}}}}function yl(){return(e,t)=>({rotation:t.rotation,rotationCenterX:t.rotationCenterX,rotationCenterY:t.rotationCenterY,translationX:t.translationX,translationY:t.translationY})}function Cl(e){const{visible:t,min:i,max:n}=e;return(e,s)=>{const r=s.translationY;return{y:r,translationY:0,opacity:1,visible:t&&r>=i&&r<=n}}}function bl(){return(e,t)=>({x:t.x,y:t.y,translationY:t.translationY,rotation:t.rotation,rotationCenterX:t.rotationCenterX})}function Sl(){return(e,t)=>v({},t)}var wl=class e{constructor(t,i,n){let s;this.moduleCtx=t,this.scale=i,this.id=Vn(this),this.nice=!0,this.reverse=!1,this.keys=[],this.dataDomain={domain:[],clipped:!1},this.boundSeries=[],this.includeInvisibleDomains=!1,this.interactionEnabled=!0,this.axisGroup=new Eo({name:`${this.id}-axis`,zIndex:2}),this.lineNode=this.axisGroup.appendChild(new Va),this.tickLineGroup=this.axisGroup.appendChild(new Eo({name:`${this.id}-Axis-tick-lines`,zIndex:2})),this.tickLabelGroup=this.axisGroup.appendChild(new Eo({name:`${this.id}-Axis-tick-labels`,zIndex:2})),this.crossLineGroup=new Eo({name:`${this.id}-CrossLines`}),this.gridGroup=new Eo({name:`${this.id}-Axis-grid`}),this.gridLineGroup=this.gridGroup.appendChild(new Eo({name:`${this.id}-gridLines`,zIndex:1})),this.tickLineGroupSelection=Oa.select(this.tickLineGroup,Va,!1),this.tickLabelGroupSelection=Oa.select(this.tickLabelGroup,Fo,!1),this.gridLineGroupSelection=Oa.select(this.gridLineGroup,Va,!1),this.line=new ul,this.tick=this.createTick(),this.gridLine=new hl,this.label=this.createLabel(),this.defaultTickMinSpacing=e.defaultTickMinSpacing,this.translation={x:0,y:0},this.rotation=0,this.layout={label:{fractionDigits:0,padding:this.label.padding,format:this.label.format}},this.destroyFns=[],this.range=[0,1],this.visibleRange=[0,1],this.title=new pl,this._titleCaption=new al,this.gridLength=0,this.fractionDigits=0,this.gridPadding=0,this.seriesAreaPadding=0,this.tickGenerationResult=void 0,this.maxThickness=1/0,this.moduleMap=new ga,this.refreshScale(),this.destroyFns.push(this._titleCaption.registerInteraction(this.moduleCtx,"root")),this._titleCaption.node.rotation=-Math.PI/2,this.axisGroup.appendChild(this._titleCaption.node),this.destroyFns.push(t.regionManager.getRegion("series").addListener("hover",e=>this.checkAxisHover(e))),this.animationManager=t.animationManager,this.animationState=new va("empty",{empty:{update:{target:"ready",action:()=>this.resetSelectionNodes()},reset:"empty"},ready:{update:e=>this.animateReadyUpdate(e),resize:()=>this.resetSelectionNodes(),reset:"empty"}}),this._crossLines=[],this.assignCrossLineArrayConstructor(this._crossLines),this.destroyFns.push(t.layoutService.addListener("layout-complete",e=>{null!=s&&null!=wt(e.chart,s)&&this.animationState.transition("resize"),s=v({},e.chart)})),!1!==(null==n?void 0:n.respondsToZoom)&&this.destroyFns.push(t.updateService.addListener("update-complete",e=>{this.minRect=e.minRect}))}get type(){var e;return null!=(e=this.constructor.type)?e:""}set crossLines(e){var t,i;null==(t=this._crossLines)||t.forEach(e=>this.detachCrossLine(e)),e&&this.assignCrossLineArrayConstructor(e),this._crossLines=e,null==(i=this._crossLines)||i.forEach(e=>{this.attachCrossLine(e),this.initCrossLine(e)})}get crossLines(){return this._crossLines}resetAnimation(e){"initial"===e&&this.animationState.transition("reset")}attachCrossLine(e){this.crossLineGroup.appendChild(e.group),this.crossLineGroup.appendChild(e.labelGroup)}detachCrossLine(e){this.crossLineGroup.removeChild(e.group),this.crossLineGroup.removeChild(e.labelGroup)}destroy(){this.moduleMap.destroy(),this.destroyFns.forEach(e=>e())}refreshScale(){var e;this.range=this.scale.range.slice(),null==(e=this.crossLines)||e.forEach(this.initCrossLine,this)}updateRange(){var e;const{range:t,visibleRange:i,scale:n}=this,s=(t[1]-t[0])/(i[1]-i[0]),r=s*i[0],o=t[0]-r;n.range=[o,o+s],null==(e=this.crossLines)||e.forEach(e=>{e.clippedRange=[t[0],t[1]]})}setCrossLinesVisible(e){this.crossLineGroup.visible=e}attachAxis(e,t){t.appendChild(this.gridGroup),e.appendChild(this.axisGroup),e.appendChild(this.crossLineGroup)}detachAxis(e,t){t.removeChild(this.gridGroup),e.removeChild(this.axisGroup),e.removeChild(this.crossLineGroup)}inRange(e,t=0,i=0){const[n,s]=Wn(this.range);return e+t>=n-i&&e<=s+i}onLabelFormatChange(e,t,i){const{scale:n,fractionDigits:s}=this,r=!(n instanceof Na)&&s>0?e=>"number"==typeof e?e.toFixed(s):String(e):e=>String(e);if(i&&n&&n.tickFormat)try{this.labelFormatter=n.tickFormat({ticks:e,specifier:i})}catch(e){this.labelFormatter=r,O.warnOnce(`the axis label format string ${i} is invalid. No formatting will be applied`)}else this.labelFormatter=r}setTickInterval(e){var t;this.scale.interval=null!=(t=this.tick.interval)?t:e}setTickCount(e,t,i){const{scale:n}=this,s=Xr.is(n)||Co.is(n);if(e&&s)return"number"==typeof e?(n.tickCount=e,n.minTickCount=null!=t?t:0,void(n.maxTickCount=null!=i?i:1/0)):void(n instanceof vo&&this.setTickInterval(e))}onGridLengthChange(e,t){var i;(t&&!e||!t&&e)&&this.onGridVisibilityChange(),null==(i=this.crossLines)||i.forEach(this.initCrossLine,this)}onGridVisibilityChange(){this.gridLineGroupSelection.clear()}createLabel(){return new dl}checkAxisHover(e){this.interactionEnabled&&this.computeBBox().containsPoint(e.offsetX,e.offsetY)&&this.moduleCtx.chartEventManager.axisHover(this.id,this.direction)}update(e=0,t=!0){if(!this.tickGenerationResult)return;const{rotation:i,parallelFlipRotation:n,regularFlipRotation:s}=this.calculateRotations(),r=this.label.getSideFlag();this.updatePosition();const o=this.getAxisLineCoordinates(),{tickData:a,combinedRotation:l,textBaseline:c,textAlign:h,primaryTickCount:d}=this.tickGenerationResult,u=this.tickLabelGroupSelection.nodes().map(e=>e.datum.tickId);if(this.updateSelections(o,a.ticks,{combinedRotation:l,textAlign:h,textBaseline:c,range:this.scale.range}),!t||this.animationManager.isSkipped())this.resetSelectionNodes();else{const e=this.calculateUpdateDiff(u,a);this.animationState.transition("update",e)}return this.updateAxisLine(),this.updateLabels(),this.updateVisibility(),this.updateGridLines(r),this.updateTickLines(),this.updateTitle({anyTickVisible:a.ticks.length>0}),this.updateCrossLines({rotation:i,parallelFlipRotation:n,regularFlipRotation:s}),this.updateLayoutState(),d}getAxisLineCoordinates(){const[e,t]=Wn(this.range);return{x:0,y1:e,y2:t}}getTickLineCoordinates(e){const t=this.label.getSideFlag()*this.getTickSize(),i=Math.min(0,t);return{x1:i,x2:i+Math.abs(t),y:e.translationY}}getTickLabelProps(e,t){const{label:i}=this,{combinedRotation:n,textBaseline:s,textAlign:r,range:o}=t,a=e.tickLabel,l=i.getSideFlag()*(this.getTickSize()+i.padding+this.seriesAreaPadding),c=""!==a&&null!=a;return{tickId:e.tickId,translationY:e.translationY,fill:i.color,fontFamily:i.fontFamily,fontSize:i.fontSize,fontStyle:i.fontStyle,fontWeight:i.fontWeight,rotation:n,rotationCenterX:l,text:a,textAlign:r,textBaseline:s,visible:c,x:l,y:0,range:o}}getTickSize(){return this.tick.enabled?this.tick.size:this.createTick().size}setTitleProps(e,t){var i;const{title:n}=this;if(n.enabled){if(e.color=n.color,e.fontFamily=n.fontFamily,e.fontSize=n.fontSize,e.fontStyle=n.fontStyle,e.fontWeight=n.fontWeight,e.enabled=n.enabled,e.wrapping=n.wrapping,n.enabled){const s=e.node,r=(null!=(i=n.spacing)?i:0)+t.spacing,o=this.label.getSideFlag(),a=Os(this.rotation),l=-1===o&&a>Math.PI&&a<2*Math.PI?-1:1,c=l*o*Math.PI/2,h=1===l?"bottom":"top",{range:d}=this,u=Math.floor(l*o*(d[0]+d[1])/2),p=-1===o?Math.floor(l*-r):Math.floor(-r),{callbackCache:g}=this.moduleCtx,{formatter:f=e=>e.defaultValue}=n,m=g.call(f,this.getTitleFormatterParams());s.setProperties({rotation:c,text:m,textBaseline:h,visible:!0,x:u,y:p})}}else e.enabled=!1}calculateLayout(e){var t,i;const{rotation:n,parallelFlipRotation:s,regularFlipRotation:r}=this.calculateRotations(),o=this.label.getSideFlag(),a=o*(this.getTickSize()+this.label.padding+this.seriesAreaPadding);this.updateScale(),this.tickGenerationResult=this.generateTicks({primaryTickCount:e,parallelFlipRotation:s,regularFlipRotation:r,labelX:a,sideFlag:o}),this.updateLayoutState();const l=this.tickGenerationResult,{tickData:c,combinedRotation:h,textBaseline:d,textAlign:u}=l,p=C(l,["tickData","combinedRotation","textBaseline","textAlign"]),g=[],{x:f,y1:m,y2:b}=this.getAxisLineCoordinates(),S=new ts(f+Math.min(o*this.seriesAreaPadding,0),m,this.seriesAreaPadding,b-m);if(g.push(S),this.tick.enabled&&c.ticks.forEach(e=>{const{x1:t,x2:i,y:n}=this.getTickLineCoordinates(e),s=new ts(t,n,i-t,0);g.push(s)}),this.label.enabled){const e=new Fo;c.ticks.forEach(t=>{const i=this.getTickLabelProps(t,{combinedRotation:h,textAlign:u,textBaseline:d,range:this.scale.range});if(!i.visible)return;e.setProperties(y(v({},i),{translationY:Math.round(t.translationY)}));const n=e.computeTransformedBBox();n&&g.push(n)})}if(null==(t=this.title)?void 0:t.enabled){const e=new al,t=ts.merge(g).width;this.setTitleProps(e,{spacing:t});const i=e.node.computeTransformedBBox();i&&g.push(i)}const w=(e=>{const t=new as,{rotation:i,translationX:n,translationY:s,rotationCenterX:r,rotationCenterY:o}=this.getAxisTransform();return as.updateTransformMatrix(t,1,1,i,n,s,{scalingCenterX:0,scalingCenterY:0,rotationCenterX:r,rotationCenterY:o}),t.transformBBox(e)})(ts.merge(g)),x=this.isAnySeriesActive();return null==(i=this.crossLines)||i.forEach(e=>{var t;e.sideFlag=-o,e.direction=n===-Math.PI/2?"x":"y",e instanceof pa&&(e.label.parallel=null!=(t=e.label.parallel)?t:this.label.parallel),e.parallelFlipRotation=s,e.regularFlipRotation=r,e.calculateLayout(x,this.reverse)}),{primaryTickCount:e=p.primaryTickCount,bbox:w}}updateLayoutState(){this.layout.label={fractionDigits:this.fractionDigits,padding:this.label.padding,format:this.label.format}}setDomain(e){this.dataDomain=this.normaliseDataDomain(e),this.reverse&&this.dataDomain.domain.reverse(),this.scale.domain=this.dataDomain.domain}updateScale(){this.updateRange(),this.calculateDomain(),this.setTickInterval(this.tick.interval);const{scale:e,nice:t}=this;Xr.is(e)&&(e.nice=t,e.update())}calculateRotations(){const e=Vs(this.rotation);return{rotation:e,parallelFlipRotation:Os(e),regularFlipRotation:Os(e-Math.PI/2)}}generateTicks({primaryTickCount:e,parallelFlipRotation:t,regularFlipRotation:i,labelX:n,sideFlag:s}){var r;const{scale:o,tick:a,label:{parallel:l,rotation:c,fontFamily:h,fontSize:d,fontStyle:u,fontWeight:p}}=this,g=void 0!==e,{defaultRotation:f,configuredRotation:m,parallelFlipFlag:C,regularFlipFlag:b}=Ho({rotation:c,parallel:l,regularFlipRotation:i,parallelFlipRotation:t}),S=m+f,w=new as,{maxTickCount:x}=this.estimateTickCount({minSpacing:a.minSpacing,maxSpacing:null!=(r=a.maxSpacing)?r:NaN}),E=!Xr.is(o)&&!Co.is(o)||isNaN(x)?10:x;let M=zo(l,m,0,s,b);const A=function(e,t,i,n){return e&&!t?i*n===-1?"hanging":"bottom":"middle"}(l,m,s,C),T={fontFamily:h,fontSize:d,fontStyle:u,fontWeight:p,textBaseline:A,textAlign:M};let D={rawTicks:[],ticks:[],labelCount:0},I=0,R=0,L=!0,k=!1;for(;L&&I<=E&&!k;){R=0,M=zo(l,m,0,s,b);const t=this.getTickStrategies({secondaryAxis:g,index:I});for(const i of t){({tickData:D,index:I,autoRotation:R,terminate:k}=i({index:I,tickData:D,textProps:T,labelOverlap:L,terminate:k,primaryTickCount:e}));const t=0!==m||0!==R,r=S+R;M=zo(l,m,R,s,b),L=!!this.label.avoidCollisions&&this.checkLabelOverlap(r,t,w,D.ticks,n,y(v({},T),{textAlign:M}))}}const P=f+m+R;return!g&&D.rawTicks.length>0&&(e=D.rawTicks.length),{tickData:D,primaryTickCount:e,combinedRotation:P,textBaseline:A,textAlign:M}}getTickStrategies({index:e,secondaryAxis:t}){const{scale:i,label:n,tick:s}=this,r=Xr.is(i)||Co.is(i),o=n.enabled&&n.avoidCollisions,a=!r&&0!==e&&o,l=!0===n.autoRotate&&void 0===n.rotation,c=[];let h;if(h=this.tick.values?3:t?1:a?2:0,c.push(({index:e,tickData:t,primaryTickCount:i,terminate:n})=>this.createTickData(h,e,t,n,i)),!r&&!isNaN(s.minSpacing)){const e=({index:e,tickData:t,primaryTickCount:i,terminate:n})=>this.createTickData(2,e,t,n,i);c.push(e)}if(!o)return c;if(n.autoWrap){const e=({index:e,tickData:t,textProps:i})=>this.wrapLabels(t,e,i);c.push(e)}else if(l){const e=({index:e,tickData:t,labelOverlap:i,terminate:n})=>({index:e,tickData:t,autoRotation:this.getAutoRotation(i),terminate:n});c.push(e)}return c}createTickData(e,t,i,n,s){var r;const{scale:o,tick:a}=this,{maxTickCount:l,minTickCount:c,defaultTickCount:h}=this.estimateTickCount({minSpacing:a.minSpacing,maxSpacing:null!=(r=a.maxSpacing)?r:NaN}),d=Xr.is(o)||Co.is(o),u=!d||isNaN(l)?10:l;let p=d?Math.max(h-t,c):l;const g=void 0===a.interval&&void 0===a.values&&p>c&&(d||2===e);let f=!0;for(;f&&t<=u;){const n=i.rawTicks;p=d?Math.max(h-t,c):l;const{rawTicks:r,ticks:o,labelCount:a}=this.getTicks({tickGenerationType:e,previousTicks:n,tickCount:p,minTickCount:c,maxTickCount:l,primaryTickCount:s});i.rawTicks=r,i.ticks=o,i.labelCount=a,f=!!g&&Ka(r,n),t++}const m=void 0!==a.interval||void 0!==a.values;return n||(n=m),{tickData:i,index:t,autoRotation:0,terminate:n}}checkLabelOverlap(e,t,i,n,s,r){as.updateTransformMatrix(i,1,1,e,0,0);const o=this.createLabelData(n,s,r,i),a=function(e,t){return isNaN(e)?t?0:10:e}(this.label.minSpacing,t);return function(e,t){const i=[];for(let n=0;n<e.length;n++){const s=e[n],{point:{x:r,y:o},label:{text:a}}=s;let{label:{width:l,height:c}}=s;if(l+=null!=t?t:0,c+=null!=t?t:0,i.some(e=>Ha(e,r,o,l,c)))return!0;i.push({index:n,text:a,x:r,y:o,width:l,height:c,datum:s})}return!1}(o,a)}createLabelData(e,t,i,n){const s=[],r=new Go(i);for(const{tickLabel:i,translationY:o}of e){if(""===i||null==i)continue;const{width:e,height:a}=r.size(i),l=Uo(i,new ts(t,o,e,a),t,o,n);s.push(l)}return s}getAutoRotation(e){var t;return e?Os(Vs(null!=(t=this.label.autoRotateAngle)?t:0)):0}getTicks({tickGenerationType:e,previousTicks:t,tickCount:i,minTickCount:n,maxTickCount:s,primaryTickCount:r}){var o;const{range:a,scale:l,visibleRange:c}=this;let h;switch(e){case 3:if(Xr.is(l)){const[e,t]=Wn(l.getDomain().map(Number));h=this.tick.values.filter(i=>i>=e&&i<=t).sort((e,t)=>e-t)}else h=this.tick.values;break;case 1:h=Xr.is(l)?this.updateSecondaryAxisTicks(r):this.createTicks(i,n,s);break;case 2:h=this.filterTicks(t,i);break;default:h=this.createTicks(i,n,s)}this.fractionDigits=h.fractionDigits>=0?h.fractionDigits:0;const d=(null!=(o=l.bandwidth)?o:0)/2,u=[];let p=0;const g=new Map,f=Math.max(0,Math.floor(c[0]*h.length)),m=Math.min(h.length,Math.ceil(c[1]*h.length)),v=h.slice(f,m);this.onLabelFormatChange(v,h,this.label.format);for(let e=0;e<v.length;e++){const t=v[e],i=l.convert(t)+d;if(a.length>0&&!this.inRange(i,0,.001))continue;const n=this.formatTick(t,f+e);let s=n;if(g.has(s)){const e=g.get(s);g.set(s,e+1),s=`${s}_${e}`}else g.set(s,1);u.push({tick:t,tickId:s,tickLabel:n,translationY:Math.floor(i)}),""!==n&&null!=n&&p++}return{rawTicks:h,ticks:u,labelCount:p}}filterTicks(e,t){var i;const n=isNaN(this.tick.minSpacing)&&isNaN(null!=(i=this.tick.maxSpacing)?i:NaN)?2:Math.ceil(e.length/t);return e.filter((e,t)=>t%n===0)}createTicks(e,t,i){var n,s,r;return this.setTickCount(e,t,i),null!=(r=null==(s=(n=this.scale).ticks)?void 0:s.call(n))?r:[]}estimateTickCount({minSpacing:e,maxSpacing:t}){const{minRect:i,label:{avoidCollisions:n}}=this;if(!n)return{minTickCount:Xr.defaultMaxTickCount,maxTickCount:Xr.defaultMaxTickCount,defaultTickCount:Xr.defaultMaxTickCount};const s=this.calculateRangeWithBleed(),r=Math.max(this.defaultTickMinSpacing,s/Xr.defaultMaxTickCount);let o=!isNaN(t);isNaN(e)&&(e=r),isNaN(t)&&(t=s),e>t&&(e===r?e=t:t=e);let a=1;i&&(a="x"===this.direction?i.width:i.height),o&&(o=a<r);const l=zn(1,Math.floor(s/e),o?Math.min(Math.floor(s/a),100):100),c=Math.min(l,Math.ceil(s/t));return{minTickCount:c,maxTickCount:l,defaultTickCount:zn(c,Xr.defaultTickCount,l)}}updateVisibility(){this.moduleCtx.animationManager.isSkipped()&&this.resetSelectionNodes(),this.tickLineGroup.visible=this.tick.enabled,this.gridLineGroup.visible=this.gridLine.enabled,this.tickLabelGroup.visible=this.label.enabled}updateCrossLines({rotation:e,parallelFlipRotation:t,regularFlipRotation:i}){var n;const s=this.label.getSideFlag(),r=this.isAnySeriesActive();null==(n=this.crossLines)||n.forEach(n=>{var o;n.sideFlag=-s,n.direction=e===-Math.PI/2?"x":"y",n instanceof pa&&(n.label.parallel=null!=(o=n.label.parallel)?o:this.label.parallel),n.parallelFlipRotation=t,n.regularFlipRotation=i,n.update(r)})}updateTickLines(){const{tick:e,label:t}=this,i=t.getSideFlag();this.tickLineGroupSelection.each(t=>{t.strokeWidth=e.width,t.stroke=e.color,t.x1=i*this.getTickSize(),t.x2=0})}calculateAvailableRange(){return jn(this.range)}calculateRangeWithBleed(){const e=1/jn(this.visibleRange);return Yn(this.calculateAvailableRange()*e,2)}calculateDomain(){const e=this.boundSeries.filter(e=>this.includeInvisibleDomains||e.isEnabled()).flatMap(e=>e.getDomain(this.direction));this.setDomain(e)}getAxisTransform(){return{rotation:Vs(this.rotation),rotationCenterX:0,rotationCenterY:0,translationX:Math.floor(this.translation.x),translationY:Math.floor(this.translation.y)}}updatePosition(){const{crossLineGroup:e,axisGroup:t,gridGroup:i,translation:n,gridLineGroupSelection:s,gridPadding:r,gridLength:o}=this,{rotation:a}=this.calculateRotations(),l=this.label.getSideFlag(),c=Math.floor(n.x),h=Math.floor(n.y);e.setProperties({rotation:a,translationX:c,translationY:h}),i.setProperties({rotation:a,translationX:c,translationY:h}),t.datum=this.getAxisTransform(),s.each(e=>{e.x1=r,e.x2=-l*o+r})}updateSecondaryAxisTicks(e){throw new Error("AG Charts - unexpected call to updateSecondaryAxisTicks() - check axes configuration.")}updateSelections(e,t,i){this.lineNode.datum=e,this.gridLineGroupSelection.update(this.gridLength?t:[],e=>e.append(new Va),e=>e.tickId),this.tickLineGroupSelection.update(t,e=>e.appendChild(new Va),e=>e.tickId),this.tickLabelGroupSelection.update(t.map(e=>this.getTickLabelProps(e,i)),e=>e.appendChild(new Fo),e=>e.tickId)}updateAxisLine(){const{line:e}=this,t=e.enabled?e.width:0;this.lineNode.setProperties({stroke:e.color,strokeWidth:t})}updateGridLines(e){const{gridLine:{style:t,width:i},gridPadding:n,gridLength:s}=this;0!==s&&0!==t.length&&this.gridLineGroupSelection.each((r,o,a)=>{const{stroke:l,lineDash:c}=t[a%t.length];r.setProperties({x1:n,x2:-e*s+n,fill:void 0,stroke:l,strokeWidth:i,lineDash:c})})}updateLabels(){const{label:e}=this;e.enabled&&this.tickLabelGroupSelection.each((e,t)=>{e.setProperties(t,["fill","fontFamily","fontSize","fontStyle","fontWeight","text","textAlign","textBaseline"])})}wrapLabels(e,t,i){const{parallel:n,maxWidth:s,maxHeight:r}=this.label;let o=this.maxThickness,a=Math.round(this.calculateAvailableRange()/e.labelCount);return n&&([o,a]=[a,o]),e.ticks.forEach(e=>{const{text:t}=Fo.wrap(e.tickLabel,null!=s?s:o,null!=r?r:a,i,"hyphenate");e.tickLabel=t}),{tickData:e,index:t,autoRotation:0,terminate:!0}}updateTitle(e){const{rotation:t,title:i,_titleCaption:n,lineNode:s,tickLineGroup:r,tickLabelGroup:o}=this;if(!i)return void(n.enabled=!1);let a=0;if(i.enabled&&e.anyTickVisible){const e=Eo.computeBBox([r,o,s]);a+=(0===t?e.width:e.height)+(this.tickLabelGroup.visible?0:this.seriesAreaPadding)}this.setTitleProps(n,{spacing:a})}formatTick(e,t){return this.datumFormatter(t)(e)}formatDatum(e){return String(e)}datumFormatter(e=0){const{label:t,labelFormatter:i,fractionDigits:n,moduleCtx:{callbackCache:s}}=this;return t.formatter?r=>{var o;return null!=(o=s.call(t.formatter,{value:n>0?r:String(r),index:e,fractionDigits:n,formatter:i}))?o:r}:i?e=>{var t;return null!=(t=s.call(i,e))?t:String(e)}:e=>String(e)}computeBBox(){return this.axisGroup.computeBBox()}initCrossLine(e){e.scale=this.scale,e.gridLength=this.gridLength}isAnySeriesActive(){return this.boundSeries.some(e=>this.includeInvisibleDomains||e.isEnabled())}clipTickLines(e,t,i,n){this.tickLineGroup.setClipRectInGroupCoordinateSpace(new ts(e,t,i,n))}clipGrid(e,t,i,n){this.gridGroup.setClipRectInGroupCoordinateSpace(new ts(e,t,i,n))}calculatePadding(e,t){const i=.01*Math.abs(this.reverse?t:e);return[i,i]}getTitleFormatterParams(){var e;const t=this.boundSeries.reduce((e,t)=>{const i=t.getKeys(this.direction),n=t.getNames(this.direction);for(let t=0;t<i.length;t++)e.push({key:i[t],name:n[t]});return e},[]);return{direction:this.direction,boundSeries:t,defaultValue:null==(e=this.title)?void 0:e.text}}normaliseDataDomain(e){return{domain:[...e],clipped:!1}}getLayoutState(){return v({rect:this.computeBBox(),gridPadding:this.gridPadding,seriesAreaPadding:this.seriesAreaPadding,tickSize:this.getTickSize(),direction:this.direction,domain:this.dataDomain.domain,scale:this.scale},this.layout)}getModuleMap(){return this.moduleMap}createModuleContext(){return null!=this.axisContext||(this.axisContext=this.createAxisContext()),y(v({},this.moduleCtx),{parent:this.axisContext})}createAxisContext(){return{axisId:this.id,direction:this.direction,continuous:Xr.is(this.scale),keys:()=>this.boundSeries.flatMap(e=>e.getKeys(this.direction)),seriesKeyProperties:()=>this.boundSeries.reduce((e,t)=>(t.getKeyProperties(this.direction).forEach(t=>{e.indexOf(t)<0&&e.push(t)}),e),[]),scaleValueFormatter:e=>{var t,i;return e?null==(i=(t=this.scale).tickFormat)?void 0:i.call(t,{specifier:e}):this.formatDatum},scaleBandwidth:()=>{var e;return null!=(e=this.scale.bandwidth)?e:0},scaleConvert:e=>this.scale.convert(e),scaleInvert:e=>{var t,i;return null==(i=(t=this.scale).invert)?void 0:i.call(t,e)}}}animateReadyUpdate(e){const{animationManager:t}=this.moduleCtx,i=vl(gl(this));Ls(this.id,"axis-group",t,[this.axisGroup],i.group),Ls(this.id,"line",t,[this.lineNode],i.line),Ls(this.id,"line-paths",t,[this.gridLineGroupSelection,this.tickLineGroupSelection],i.tick,(e,t)=>t.tickId,e),Ls(this.id,"tick-labels",t,[this.tickLabelGroupSelection],i.label,(e,t)=>t.tickId,e)}resetSelectionNodes(){const{gridLineGroupSelection:e,tickLineGroupSelection:t,tickLabelGroupSelection:i,lineNode:n}=this,s=gl(this);ma([this.axisGroup],(e,t)=>({rotation:t.rotation,rotationCenterX:t.rotationCenterX,rotationCenterY:t.rotationCenterY,translationX:t.translationX,translationY:t.translationY})),ma([e,t],Cl(s)),ma([i],(e,t)=>({x:t.x,y:t.y,translationY:t.translationY,rotation:t.rotation,rotationCenterX:t.rotationCenterX})),ma([n],Sl())}calculateUpdateDiff(e,t){const i=new Set,n=new Set,s={},r=Math.max(e.length,t.ticks.length);for(let o=0;o<r;o++){const r=t.ticks[o],a=e[o],l=null==r?void 0:r.tickId;s[null!=l?l:a]=r,a!==l&&(n.has(l)?n.delete(l):l&&i.add(l),i.has(a)?i.delete(a):a&&n.add(a))}return{changed:i.size>0||n.size>0,added:i,removed:n}}isReversed(){return this.reverse}};wl.defaultTickMinSpacing=50,S([$s(Js)],wl.prototype,"nice",2),S([$s(Js)],wl.prototype,"reverse",2),S([$s(br)],wl.prototype,"keys",2),S([$s(Zs,{optional:!0})],wl.prototype,"title",2),S([Za((e,t,i)=>e.onGridLengthChange(t,i))],wl.prototype,"gridLength",2);var xl=wl,El=class extends dl{constructor(){super(...arguments),this.autoRotateAngle=335}};S([$s(Js,{optional:!0})],El.prototype,"autoRotate",2),S([$s(or)],El.prototype,"autoRotateAngle",2);var Ml=class e extends xl{constructor(){super(...arguments),this.thickness=0,this.position="left"}static is(t){return t instanceof e}get direction(){return["top","bottom"].includes(this.position)?"x":"y"}updateDirection(){switch(this.position){case"top":this.rotation=-90,this.label.mirrored=!0,this.label.parallel=!0;break;case"right":this.rotation=0,this.label.mirrored=!0,this.label.parallel=!1;break;case"bottom":this.rotation=-90,this.label.mirrored=!1,this.label.parallel=!0;break;case"left":this.rotation=0,this.label.mirrored=!1,this.label.parallel=!1}this.axisContext&&(this.axisContext.position=this.position,this.axisContext.direction=this.direction)}update(e,t){return this.updateDirection(),super.update(e,t)}calculateLayout(e){return this.updateDirection(),super.calculateLayout(e)}createAxisContext(){return y(v({},super.createAxisContext()),{position:this.position})}assignCrossLineArrayConstructor(e){Yr(e,pa)}createLabel(){return new El}};S([$s(sr)],Ml.prototype,"thickness",2),S([$s(Ar)],Ml.prototype,"position",2);var Al=Ml,Tl=class extends jr{constructor(){super(...arguments),this.minSpacing=NaN}};S([$s(Gr),Ks(NaN)],Tl.prototype,"minSpacing",2);var Dl=class extends Al{constructor(e,t=new js){super(e,t),this._paddingOverrideEnabled=!1,this.groupPaddingInner=.1,this.includeInvisibleDomains=!0}set paddingInner(e){this._paddingOverrideEnabled=!0,this.scale.paddingInner=e}get paddingInner(){return this._paddingOverrideEnabled=!0,this.scale.paddingInner}set paddingOuter(e){this.scale.paddingOuter=e}get paddingOuter(){return this.scale.paddingOuter}createTick(){return new Tl}normaliseDataDomain(e){const t=[],i=new Set;for(const n of e){const e=n instanceof Date?n.getTime():n;i.has(e)||(i.add(e),t.push(n))}return{domain:t,clipped:!1}}calculateDomain(){if(!this._paddingOverrideEnabled){const e=this.boundSeries.map(e=>{var t;return null==(t=e.getBandScalePadding)?void 0:t.call(e)}).filter(e=>null!=e);e.length>0&&(this.scale.paddingInner=Math.min(...e.map(e=>e.inner)),this.scale.paddingOuter=Math.max(...e.map(e=>e.outer)))}return super.calculateDomain()}};Dl.className="CategoryAxis",Dl.type="category",S([$s(rr)],Dl.prototype,"groupPaddingInner",2);var Il=class{constructor(e="",t,i=0){this.x=0,this.y=0,this.subtreeLeft=NaN,this.subtreeRight=NaN,this.screenX=0,this.screenY=0,this.children=[],this.leafCount=0,this.prelim=0,this.mod=0,this.ancestor=this,this.change=0,this.shift=0,this.label=e,this.parent=t,this.depth=t?t.depth+1:0,this.number=i}getLeftSibling(){return this.number>0&&this.parent?this.parent.children[this.number-1]:void 0}getLeftmostSibling(){return this.number>0&&this.parent?this.parent.children[0]:void 0}nextLeft(){return this.children?this.children[0]:this.thread}nextRight(){return this.children?this.children[this.children.length-1]:this.thread}getSiblings(){return this.parent?this.parent.children.filter((e,t)=>t!==this.number):[]}};function Rl(e,t,i){const n=i/(t.number-e.number);t.change-=n,t.shift+=i,e.change+=n,t.prelim+=i,t.mod+=i}function Ll(e,t,i){return t.getSiblings().indexOf(e.ancestor)>=0?e.ancestor:i}function kl(e,t){const i=e.children;if(i.length){let n=i[0];i.forEach(e=>{kl(e,t),n=function(e,t,i){const n=e.getLeftSibling();if(n){let s=e,r=e,o=n,a=r.getLeftmostSibling(),l=r.mod,c=s.mod,h=o.mod,d=a.mod;for(;o.nextRight()&&r.nextLeft();){o=o.nextRight(),r=r.nextLeft(),a=a.nextLeft(),s=s.nextRight(),s.ancestor=e;const n=o.prelim+h-(r.prelim+l)+i;n>0&&(Rl(Ll(o,e,t),e,n),l+=n,c+=n),h+=o.mod,l+=r.mod,d+=a.mod,c+=s.mod}o.nextRight()&&!s.nextRight()?(s.thread=o.nextRight(),s.mod+=h-c):(r.nextLeft()&&!a.nextLeft()&&(a.thread=r.nextLeft(),a.mod+=l-d),t=e)}return t}(e,n,t)}),function(e){const t=e.children;if(t){let e=0,i=0;for(let n=t.length-1;n>=0;n--){const s=t[n];s.prelim+=e,s.mod+=e,i+=s.change,e+=s.shift+i}}}(e);const s=(i[0].prelim+i.at(-1).prelim)/2,r=e.getLeftSibling();r?(e.prelim=r.prelim+t,e.mod=e.prelim-s):e.prelim=s}else{const i=e.getLeftSibling();e.prelim=i?i.prelim+t:0}}var Pl=class{constructor(){this.top=1/0,this.right=-1/0,this.bottom=-1/0,this.left=1/0}update(e,t){const{x:i,y:n}=t(e);i>this.right&&(this.right=i),i<this.left&&(this.left=i),n>this.bottom&&(this.bottom=n),n<this.top&&(this.top=n)}};function Nl(e,t,i){e.x=e.prelim+t,e.y=e.depth,i.update(e),e.children.forEach(n=>Nl(n,t+e.mod,i))}function Ol(e){const t=e.children;let i=0;t.forEach(e=>{Ol(e),e.children.length?i+=e.leafCount:i++}),e.leafCount=i,t.length?(e.subtreeLeft=t[0].subtreeLeft,e.subtreeRight=t[e.children.length-1].subtreeRight,e.x=(e.subtreeLeft+e.subtreeRight)/2):(e.subtreeLeft=e.x,e.subtreeRight=e.x)}function _l(e){const t=new Fl;return kl(e,1),Nl(e,-e.prelim,t),Ol(e),t}var Fl=class{constructor(){this.dimensions=new Pl,this.leafCount=0,this.nodes=[],this.leafNodes=[],this.nonLeafNodes=[],this.depth=0}update(e){this.dimensions.update(e,e=>({x:e.x,y:e.y})),e.children.length?this.nonLeafNodes.push(e):(this.leafCount++,this.leafNodes.push(e)),e.depth>this.depth&&(this.depth=e.depth),this.nodes.push(e)}resize(e,t,i=0,n=0,s=!1){const r=this.leafCount-1,o=this.depth,a=this.dimensions;let l=1,c=1;if(e>0&&r){const t=(a.right-a.left)/r;l=e/r/t,s&&(l=-l)}if(t>0&&o){const e=(a.bottom-a.top)/o;c=t/o/e}const h=new Pl;this.nodes.forEach(e=>{e.screenX=e.x*l,e.screenY=e.y*c,h.update(e,e=>({x:e.screenX,y:e.screenY}))});const d=-h.left,u=-h.top;this.nodes.forEach(e=>{e.screenX+=d+i,e.screenY+=u+n})}},Gl=class extends dl{constructor(){super(...arguments),this.grid=!1}};S([$s(Js)],Gl.prototype,"grid",2);var Vl=class extends Al{constructor(e){super(e,new js),this.tickScale=new js,this.line=new ul,this.label=new Gl,this.labelColor="rgba(87, 87, 87, 1)",this.includeInvisibleDomains=!0;const{tickLineGroup:t,tickLabelGroup:i,gridLineGroup:n,tickScale:s,scale:r}=this;r.paddingOuter=.1,r.paddingInner=2*r.paddingOuter,this.refreshScale(),s.paddingInner=1,s.paddingOuter=0,this.gridLineSelection=Oa.select(n,Va),this.axisLineSelection=Oa.select(t,Va),this.separatorSelection=Oa.select(t,Va),this.labelSelection=Oa.select(i,Fo)}updateRange(){const{range:e,visibleRange:t,scale:i}=this,n=(e[1]-e[0])/(t[1]-t[0]),s=n*t[0],r=e[0]-s;this.tickScale.range=i.range=[r,r+n],this.resizeTickTree()}resizeTickTree(){var e;const t=this.scale,i=t.domain.length?[t.convert(t.domain[0]),t.convert(t.domain[t.domain.length-1])]:t.range,n=this.tickTreeLayout,s=this.lineHeight;n&&n.resize(Math.abs(i[1]-i[0]),n.depth*s,(Math.min(i[0],i[1])||0)+(null!=(e=t.bandwidth)?e:0)/2,-n.depth*s,i[1]-i[0]<0)}get lineHeight(){return 1.5*this.label.fontSize}onGridVisibilityChange(){this.gridLineSelection.clear(),this.labelSelection.clear()}createTick(){return new Tl}calculateDomain(){var e;const{direction:t}=this;let i=null;const n=this.boundSeries.filter(e=>e.visible).flatMap(e=>{if("y"===t||i)return e.getDomain(t);if(null===i){const n=e.getDomain(t);return i=Ue(n[0]),n}return[]});this.setDomain(null!=(e=cn(n))?e:gn(n));const{domain:s}=this.dataDomain;this.tickTreeLayout=_l(function(e,t=!0){const i=new Il;let n=0;return t&&e.forEach(e=>n=Math.max(n,e.labels.length)),e.forEach(e=>{if(t)for(;e.labels.length<n;)e.labels.unshift("");!function(e,t){const i=t.labels.slice().reverse(),n=i.length-1;i.forEach((t,i)=>{const s=e.children,r=s.find(e=>e.label===t),o=i!==n;if(r&&o)e=r;else{const i=new Il(t,e);i.number=s.length,s.push(i),o&&(e=i)}})}(i,e)}),i}(s)),this.tickScale.domain=s.concat(""),this.resizeTickTree()}update(){this.computedLayout&&(this.updatePosition(),this.updateTitleCaption(),this.updateCategoryLabels(),this.updateSeparators(),this.updateAxisLines(),this.updateCategoryGridLines(),this.resetSelectionNodes())}updateTitleCaption(){const{_titleCaption:e}=this;e.node.visible=!1}updateCategoryLabels(){if(!this.computedLayout)return;const{tickLabelLayout:e}=this.computedLayout;this.labelSelection.update(e).each((e,t)=>{e.setProperties(t)})}updateSeparators(){if(!this.computedLayout)return;const{separatorLayout:e}=this.computedLayout,{range:t}=this;this.separatorSelection.update(e).each((e,i)=>{e.x1=i.x1,e.x2=i.x2,e.y1=i.y,e.y2=i.y,e.visible=i.y>=t[0]-1e-7&&i.y<=t[1]+1e-7,e.stroke=this.tick.color,e.fill=void 0,e.strokeWidth=1})}updateAxisLines(){if(!this.computedLayout)return;const{axisLineLayout:e}=this.computedLayout;this.axisLineSelection.update(e).each((e,t)=>{e.setProperties(y(v({},t),{stroke:this.line.color,strokeWidth:this.line.width})),e.x1=t.x,e.x2=t.x,e.y1=t.y1,e.y2=t.y2,e.strokeWidth=this.line.width,e.stroke=this.line.color})}updateCategoryGridLines(){const{gridLength:e,gridLine:t,label:i,range:n,tickScale:s}=this,r=s.ticks(),o=i.getSideFlag(),a=this.gridLineSelection.update(e?r:[]);if(e){const{width:i,style:r}=t,l=r.length;a.each((t,a,c)=>{const h=Math.round(s.convert(a));t.x1=0,t.x2=-o*e,t.y1=h,t.y2=h,t.visible=h>=n[0]&&h<=n[1];const{stroke:d,lineDash:u}=r[c%l];t.stroke=d,t.strokeWidth=i,t.lineDash=u,t.fill=void 0})}}computeLayout(){this.updateDirection(),this.calculateDomain(),this.updateRange();const{scale:e,label:t,label:{parallel:i},moduleCtx:{callbackCache:n},range:s,title:r,title:{formatter:o=e=>e.defaultValue}={}}=this,a=e.range[0],l=e.range[1],c=Math.abs(l-a)/e.domain.length||0,h=Math.ceil(t.fontSize/c),d=Vs(this.rotation),u=Math.abs(Math.cos(d))<1e-8,p=t.getSideFlag(),g=this.lineHeight,f=this.tickTreeLayout,m=e.ticks(),C=f?f.nodes:[],b=!!f&&f.depth>1,{defaultRotation:S,configuredRotation:w,parallelFlipFlag:x}=Ho({rotation:t.rotation,parallel:i,regularFlipRotation:Os(d-Math.PI/2),parallelFlipRotation:Os(d)}),E=[],M=new Map;let A=0;const T=new Fo,D=(e,i)=>{var a;if(T.setProperties({fill:t.color,fontFamily:t.fontFamily,fontSize:t.fontSize,fontStyle:t.fontStyle,fontWeight:t.fontWeight,textAlign:"center",textBaseline:-1===x?"bottom":"hanging",translationX:e.screenY-.25*t.fontSize,translationY:e.screenX}),0===i){if(!((null==r?void 0:r.enabled)&&m.length>0))return!1;const i=n.call(o,this.getTitleFormatterParams());T.setProperties({fill:r.color,fontFamily:r.fontFamily,fontSize:r.fontSize,fontStyle:r.fontStyle,fontWeight:r.fontWeight,text:i,textBaseline:"hanging",translationX:e.screenY-.25*t.fontSize,translationY:e.screenX})}else{if(i%h!==0)return!1;if(!(e.screenX>=s[0]&&e.screenX<=s[1]))return!1;t.formatter?T.text=null!=(a=n.call(t.formatter,{value:String(e.label),index:i}))?a:String(e.label):T.text=String(e.label)}return!0};C.forEach((e,t)=>{if(!D(e,t))return;const i=T.computeTransformedBBox();i&&(M.set(t,i),!e.children.length&&i.width>A&&(A=i.width))});const I=p*t.padding,R=this.label.grid,L=[];C.forEach((e,t)=>{let i=D(e,t);const n=t;T.x=I,T.rotationCenterX=I;const s=!e.children.length;if(s)T.rotation=w,T.textAlign="end",T.textBaseline="middle";else{T.translationX-=A-g+this.label.padding;const t=e.leafCount*c,s=M.get(n);s&&s.width>t?(i=!1,M.delete(n)):T.rotation=u?S:-Math.PI/2}if(e.parent&&b){const t=s?e.screenX-c/2:e.screenX-e.leafCount*c/2;if(s)(e.number!==e.children.length-1||R)&&L.push({y:t,x1:0,x2:-A-2*this.label.padding});else{const i=-A-2*this.label.padding+e.screenY;L.push({y:t,x1:i+g,x2:i})}}let r;if(i){const e=T.computeTransformedBBox();e&&M.set(t,e),r=y(v({},{fill:(o=T).fill,fontFamily:o.fontFamily,fontSize:o.fontSize,fontStyle:o.fontStyle,fontWeight:o.fontWeight,rotation:o.rotation,rotationCenterX:o.rotationCenterX,rotationCenterY:o.rotationCenterY,text:o.text,textAlign:o.textAlign,textBaseline:o.textBaseline,translationX:o.translationX,translationY:o.translationY,visible:o.visible,x:o.x,y:o.y}),{visible:i})}else M.delete(t),r={visible:i};var o;E.push(r)});let k=0;L.forEach(e=>k=Math.min(k,e.x2)),L.push({y:Math.max(a,l),x1:0,x2:k});const P=[],N=[];L.forEach(e=>{if(e.y>=s[0]-1e-7&&e.y<=s[1]+1e-7){const{x1:t,x2:i,y:n}=e,s=new ts(Math.min(t,i),n,Math.abs(t-i),0);N.push(s),P.push({x1:t,x2:i,y:n})}});const O=[],_=[],F=f?f.depth+1:1;for(let e=0;e<F;e++){const t=m.length>0&&(0===e||R&&b),i=e>0?-A-2*this.label.padding-(e-1)*g:0,n=new ts(i,Math.min(...s),0,Math.abs(s[1]-s[0]));_.push(n),O.push({x:i,y1:s[0],y2:s[1],visible:t})}return{bbox:(e=>{const t=new as,{rotation:i,translationX:n,translationY:s,rotationCenterX:r,rotationCenterY:o}=this.getAxisTransform();return as.updateTransformMatrix(t,1,1,i,n,s,{scalingCenterX:0,scalingCenterY:0,rotationCenterX:r,rotationCenterY:o}),t.transformBBox(e)})(ts.merge([...M.values(),...N,..._])),tickLabelLayout:E,separatorLayout:P,axisLineLayout:O}}calculateLayout(){const{axisLineLayout:e,separatorLayout:t,tickLabelLayout:i,bbox:n}=this.computeLayout();return this.computedLayout={axisLineLayout:e,separatorLayout:t,tickLabelLayout:i},{bbox:n,primaryTickCount:void 0}}};Vl.className="GroupedCategoryAxis",Vl.type="grouped-category",S([$s(mr,{optional:!0})],Vl.prototype,"labelColor",2);var Bl=class e{constructor(t){this.enabled=!0,this.width=600,this.height=300;const{width:i,height:n,pixelRatio:s,position:r,insertAsFirstChild:o}=t;this.insertAsFirstChild=null!=o&&o,this.pixelRatio=function(){if("undefined"==typeof navigator)return!1;const e=navigator.userAgent.match(/\(iPhone; CPU iPhone OS (\d+_\d+_\d+) like Mac OS X\)/);if(null==e)return!1;const[t,i]=e[1].split("_").map(Number);return t<16||16===t&&i<6}()?1:null!=s?s:xn("devicePixelRatio"),this.element=En("canvas"),this.element.width=Math.round((null!=i?i:this.width)*this.pixelRatio),this.element.height=Math.round((null!=n?n:this.height)*this.pixelRatio),r&&(this.element.style.position=r),this.context=this.element.getContext("2d"),this.onEnabledChange(),this.resize(null!=i?i:0,null!=n?n:0),e.debugContext(this.context)}static is(t){return t instanceof e}drawImage(e,t=0,i=0){return e.drawImage(this.context.canvas,t,i)}toDataURL(e){return this.element.toDataURL(e)}resize(e,t){if(!(e>0&&t>0))return;const{element:i,context:n,pixelRatio:s}=this;i.width=Math.round(e*s),i.height=Math.round(t*s),n.setTransform(s,0,0,s,0,0),i.style.width=e+"px",i.style.height=t+"px",this.width=e,this.height=t}snapshot(){}clear(){this.context.save(),this.context.setTransform(this.pixelRatio,0,0,this.pixelRatio,0,0),this.context.clearRect(0,0,this.width,this.height),this.context.restore()}destroy(){this.element.remove(),this.element.width=0,this.element.height=0,this.context.clearRect(0,0,0,0),Object.freeze(this)}onContainerChange(e,t){var i,n,s,r;e!==t&&(null==(i=this.element.parentNode)||i.removeChild(this.element),this.insertAsFirstChild&&(null==(n=this.container)?void 0:n.firstChild)?null==(s=this.container)||s.insertBefore(this.element,this.container.firstChild):null==(r=this.container)||r.appendChild(this.element))}onEnabledChange(){this.element&&(this.element.style.display=this.enabled?"block":"none")}static debugContext(e){if(Rn.check("canvas")){const t=e.save.bind(e),i=e.restore.bind(e);let n=0;Object.assign(e,{save(){t(),n++},restore(){if(0===n)throw new Error("AG Charts - Unable to restore() past depth 0");i(),n--},verifyDepthZero(){if(0!==n)throw new Error(`AG Charts - Save/restore depth is non-zero: ${n}`)}})}}};S([Za(e=>e.onEnabledChange())],Bl.prototype,"enabled",2),S([Za((e,t,i)=>e.onContainerChange(t,i))],Bl.prototype,"container",2);var Hl=Bl,zl=class e{constructor(e,t){this.canvas=e,this.markDirty=t,this.debug=Rn.create(!0,"scene"),this.layersMap=new Map,this.nextZIndex=0,this.nextLayerId=0}static sortLayers(e,t){var i,n;return wo([e.zIndex,...null!=(i=e.zIndexSubOrder)?i:[void 0,void 0],e.id],[t.zIndex,...null!=(n=t.zIndexSubOrder)?n:[void 0,void 0],t.id],bo)}get size(){return this.layersMap.size}forEach(t){Array.from(this.layersMap.values()).sort(e.sortLayers).forEach(t)}resize(e,t){this.canvas.resize(e,t),this.layersMap.forEach(({canvas:i})=>i.resize(e,t))}addLayer(e){const{width:t,height:i,pixelRatio:n}=this.canvas,{zIndex:s=this.nextZIndex++,name:r,zIndexSubOrder:o,getComputedOpacity:a,getVisibility:l}=e,c=new Hl({width:t,height:i,pixelRatio:n,position:"absolute"}),h={id:this.nextLayerId++,name:r,canvas:c,zIndex:s,zIndexSubOrder:o,getComputedOpacity:a,getVisibility:l};return s>=this.nextZIndex&&(this.nextZIndex=s+1),this.layersMap.set(c,h),this.debug("Scene.addLayer() - layers",this.layersMap),h.canvas}removeLayer(e){this.layersMap.has(e)&&(this.layersMap.delete(e),e.destroy(),this.markDirty(),this.debug("Scene.removeLayer() -  layers",this.layersMap))}moveLayer(e,t,i){const n=this.layersMap.get(e);n&&(n.zIndex=t,n.zIndexSubOrder=i,this.markDirty(),this.debug("Scene.moveLayer() -  layers",this.layersMap))}clear(){this.layersMap.clear()}};function Ul(e,t,i,n,s={}){if(!Rn.check("scene:stats","scene:stats:verbose"))return;const{layersRendered:r=0,layersSkipped:o=0,nodesRendered:a=0,nodesSkipped:l=0}=null!=n?n:{},c=performance.now(),h=t,{start:d}=h,u=C(h,["start"]),p=Object.entries(u).map(([e,t])=>$l(e,t)).filter(e=>null!=e).join(" + "),g=Object.entries(s).map(([e,t])=>`${e}: ${t}`).join(" ; "),f=Rn.check("scene:stats:verbose"),m=[`${$l("⏱️",d,c)} (${p})`,`${g}`,`Layers: ${f?Kl(r,o):e.size}`,f?`Nodes: ${Kl(a,l)}`:null].filter(ze),v=new Map(m.map(e=>[e,Fo.getTextSize(e,i.font)])),y=Math.max(...Array.from(v.values(),e=>e.width)),b=function(e,t){let i=0;for(const n of e)i+=t(n);return i}(v.values(),e=>e.height);i.save(),i.fillStyle="white",i.fillRect(0,0,y,b),i.fillStyle="black";let S=0;for(const[e,t]of v.entries())S+=t.height,i.fillText(e,2,S);i.restore()}function Wl(e){var t,i;return Rn.check(!0,"scene")?v(v({node:e,name:null!=(t=e instanceof Eo?e.name:null)?t:e.id,dirty:is[e.dirty]},(null==(i=e.parent)?void 0:i.isVirtual)?{virtualParentDirty:is[e.parent.dirty],virtualParent:e.parent}:{}),e.children.map(e=>Wl(e)).reduce((e,t)=>{let{name:i}=t;const{node:{visible:n,opacity:s,zIndex:r,zIndexSubOrder:o},node:a,virtualParent:l}=t;(!n||s<=0)&&(i=`(${i})`),a instanceof Eo&&a.isLayer()&&(i=`*${i}*`);const c=[`${null!=i?i:"<unknown>"}`,`z: ${r}`,o&&`zo: ${o.map(e=>"function"==typeof e?`${e()} (fn)`:e).join(" / ")}`,l&&"(virtual parent)"].filter(e=>!!e).join(" ");let h=c,d=1;for(;null!=e[h]&&d<100;)h=`${c} (${d++})`;return e[h]=t,e},{})):{}}function jl(e){var t;if(0===e.dirty)return{dirtyTree:{},paths:[]};const i=e.children.map(e=>jl(e)).filter(e=>e.paths.length>0),n=Eo.is(e)&&null!=(t=e.name)?t:e.id,s=i.length?i.flatMap(e=>e.paths).map(e=>`${n}.${e}`):[n];return{dirtyTree:v({name:n,node:e,dirty:is[e.dirty]},i.map(e=>e.dirtyTree).filter(e=>null!=e.dirty).reduce((e,t)=>{var i;return e[null!=(i=t.name)?i:"<unknown>"]=t,e},{})),paths:s}}function Kl(e,t){const i=e+t;return`${e} / ${i} (${Math.round(100*e/i)}%)`}function $l(e,t,i){const n=null!=i?i-t:t;return`${e}: ${Math.round(100*n)/100}ms`}var Yl=class{constructor({width:e,height:t,pixelRatio:i,canvasPosition:n}){this.debug=Rn.create(!0,"scene"),this.id=Vn(this),this.root=null,this.isDirty=!1,this.canvas=new Hl({width:e,height:t,pixelRatio:i,position:n,insertAsFirstChild:"absolute"===n}),this.layersManager=new zl(this.canvas,()=>{this.isDirty=!0})}get width(){var e,t;return null!=(t=null==(e=this.pendingSize)?void 0:e[0])?t:this.canvas.width}get height(){var e,t;return null!=(t=null==(e=this.pendingSize)?void 0:e[1])?t:this.canvas.height}setContainer(e){return this.canvas.container=e,this}setRoot(e){var t;return this.root===e||(this.isDirty=!0,null==(t=this.root)||t._setLayerManager(),this.root=e,e&&(e.visible=!0,e._setLayerManager(this.layersManager))),this}attachNode(e){var t;return null==(t=this.root)||t.appendChild(e),()=>this.removeChild(e)}appendChild(e){var t;return null==(t=this.root)||t.appendChild(e),this}removeChild(e){var t;return null==(t=this.root)||t.removeChild(e),this}download(e,t){var i;Mn(this.canvas.toDataURL(t),null!=(i=null==e?void 0:e.trim())?i:"image")}getDataURL(e){return this.canvas.toDataURL(e)}resize(e,t){return e=Math.round(e),t=Math.round(t),e>0&&t>0&&(e!==this.width||t!==this.height)&&(this.pendingSize=[e,t],this.isDirty=!0,!0)}render(e){return x(this,null,function*(){var t,i;const{debugSplitTimes:n={start:performance.now()},extraDebugStats:s}=null!=e?e:{},{canvas:r,canvas:{context:o}={},root:a,pendingSize:l}=this;if(!o)return;const c=performance.now();if(l&&(this.layersManager.resize(...l),this.pendingSize=void 0),a&&!a.visible)return void(this.isDirty=!1);if(a&&!this.isDirty)return this.debug.check()&&this.debug("Scene.render() - no-op",{redrawType:is[a.dirty],tree:Wl(a)}),void Ul(this.layersManager,n,o,void 0,s);const h={ctx:o,devicePixelRatio:null!=(t=this.canvas.pixelRatio)?t:1,forceRender:!0,resized:Boolean(l),debugNodes:{}};Rn.check("scene:stats:verbose")&&(h.stats={layersRendered:0,layersSkipped:0,nodesRendered:0,nodesSkipped:0});let d=!1;if((!a||a.dirty>=1)&&(d=!0,r.clear()),a&&Rn.check("scene:dirtyTree")){const{dirtyTree:e,paths:t}=jl(a);Rn.create("scene:dirtyTree")("Scene.render() - dirtyTree",{dirtyTree:e,paths:t})}if(a&&d&&(this.debug("Scene.render() - before",{redrawType:is[a.dirty],canvasCleared:d,tree:Wl(a)}),a.visible&&(a.preRender(),o.save(),a.render(h),o.restore())),n["✍️"]=performance.now()-c,this.layersManager.size&&d){const e=performance.now();o.save(),o.resetTransform(),this.layersManager.forEach(e=>{e.canvas.enabled&&e.getVisibility()&&(o.globalAlpha=e.getComputedOpacity(),e.canvas.drawImage(o))}),o.restore(),n["⛙"]=performance.now()-e}null==(i=o.verifyDepthZero)||i.call(o),this.isDirty=!1,Ul(this.layersManager,n,o,h.stats,s),function(e,t){e.save();for(const[i,n]of Object.entries(t)){const t=n.computeTransformedBBox();t?(e.globalAlpha=.8,e.strokeStyle="red",e.lineWidth=1,e.strokeRect(t.x,t.y,t.width,t.height),e.fillStyle="red",e.strokeStyle="white",e.font="16px sans-serif",e.textBaseline="top",e.textAlign="left",e.lineWidth=2,e.strokeText(i,t.x,t.y,t.width),e.fillText(i,t.x,t.y,t.width)):O.log(`Scene.render() - no bbox for debugged node [${i}].`)}e.restore()}(o,h.debugNodes),a&&this.debug.check()&&this.debug("Scene.render() - after",{redrawType:is[a.dirty],tree:Wl(a),canvasCleared:d})})}strip(){const{context:e,pixelRatio:t}=this.canvas;e.setTransform(t,0,0,t,0,0),this.layersManager.clear(),this.setRoot(null),this.isDirty=!1}destroy(){this.canvas.container=void 0,this.strip(),this.canvas.destroy(),Object.assign(this,{canvas:void 0})}};function ql(e){return new Promise(t=>{setTimeout(()=>t(void 0),e)})}Yl.className="Scene";var Xl=class{constructor(){this.available=!0,this.acquireQueue=[]}acquire(e){return new Promise(t=>{this.acquireQueue.push([e,t]),this.available&&this.dispatchNext().catch(e=>O.errorOnce(e))})}acquireImmediately(e){return x(this,null,function*(){return!!this.available&&(yield this.acquire(e),!0)})}waitForClearAcquireQueue(){return x(this,null,function*(){return this.acquire(()=>x(this,null,function*(){}))})}dispatchNext(){return x(this,null,function*(){var e,t;this.available=!1;let[i,n]=null!=(e=this.acquireQueue.shift())?e:[];for(;i;){try{yield i(),null==n||n()}catch(e){O.error("mutex callback error",e),null==n||n()}[i,n]=null!=(t=this.acquireQueue.shift())?t:[]}this.available=!0})}},Zl=class{constructor(){this.eventListeners=new Map}addEventListener(e,t){if("function"!=typeof t)throw new Error("AG Charts - listener must be a Function");const i=this.eventListeners.get(e);i?i.add(t):this.eventListeners.set(e,new Set([t]))}removeEventListener(e,t){var i;null==(i=this.eventListeners.get(e))||i.delete(t),0===this.eventListeners.size&&this.eventListeners.delete(e)}hasEventListener(e){return this.eventListeners.has(e)}clearEventListeners(){this.eventListeners.clear()}fireEvent(e){var t;null==(t=this.eventListeners.get(e.type))||t.forEach(t=>t(e))}},Ql=class extends yt{constructor(e=0,t=e,i=e,n=t){super(),this.top=e,this.right=t,this.bottom=i,this.left=n}clear(){this.top=this.right=this.bottom=this.left=0}};function Jl(e,t){let i,n,s=0,r=!1;const o=()=>r,a=()=>{r=!1,null==n||n(),n=void 0,i=void 0,s>0&&e(l)},l=()=>{const e=s;s=0,r=!0;const i=t({count:e});i?i.then(a,a):a()};return{schedule(t){0!==s||o()||e(l,t),s++},await(){return x(this,null,function*(){if(o())for(null==i&&(i=new Promise(e=>{n=e}));o();)yield i})}}}S([$s(sr)],Ql.prototype,"top",2),S([$s(sr)],Ql.prototype,"right",2),S([$s(sr)],Ql.prototype,"bottom",2),S([$s(sr)],Ql.prototype,"left",2);var ec=class{constructor(){var e;this.elements=new Map,this.documentReady=!1,this.queuedObserveRequests=[],this.onLoad=()=>{this.documentReady=!0,this.queuedObserveRequests.forEach(([e,t])=>this.observe(e,t)),this.queuedObserveRequests=[]},"undefined"!=typeof ResizeObserver&&(this.resizeObserver=new ResizeObserver(e=>{for(const{target:t,contentRect:i}of e){const{width:e,height:n}=i;this.checkSize(this.elements.get(t),t,e,n)}}),this.documentReady="complete"===wn("readyState"),this.documentReady||null==(e=xn())||e.addEventListener("load",this.onLoad))}destroy(){var e,t;null==(e=xn())||e.removeEventListener("load",this.onLoad),null==(t=this.resizeObserver)||t.disconnect(),this.resizeObserver=null}checkSize(e,t,i,n){var s,r;e&&(i===(null==(s=e.size)?void 0:s.width)&&n===(null==(r=e.size)?void 0:r.height)||(e.size={width:i,height:n},e.cb(e.size,t)))}observe(e,t){var i;this.documentReady?(this.elements.has(e)?this.removeFromQueue(e):null==(i=this.resizeObserver)||i.observe(e),this.elements.set(e,{cb:t})):this.queuedObserveRequests.push([e,t])}unobserve(e){var t;null==(t=this.resizeObserver)||t.unobserve(e),this.elements.delete(e),this.removeFromQueue(e),this.elements.size||this.destroy()}removeFromQueue(e){this.queuedObserveRequests=this.queuedObserveRequests.filter(([t])=>t!==e)}},tc=class{constructor(){this.cache=new WeakMap}call(e,...t){let i,n=this.cache.get(e);const s=()=>{try{const s=e(...t);return n&&null!=i&&n.set(i,s),s}catch(e){return void O.warnOnce("User callback errored, ignoring",e)}};try{i=JSON.stringify(t)}catch(e){return s()}return null==n&&(n=new Map,this.cache.set(e,n)),n.has(i)?n.get(i):s()}invalidateCache(){this.cache=new WeakMap}},ic=class{constructor(e){this.annotationRoot=e}attachNode(e){return this.annotationRoot.append(e),()=>{var t;return null==(t=this.annotationRoot)||t.removeChild(e),this}}setAnnotationStyles(e){this.styles=e}getAnnotationTypeStyles(e){var t;return null==(t=this.styles)?void 0:t[e]}},nc=class{constructor(){this.registeredListeners=new Map}addListener(e,t){const i={symbol:Symbol(e),handler:t};return this.registeredListeners.has(e)?this.registeredListeners.get(e).push(i):this.registeredListeners.set(e,[i]),()=>this.removeListener(i.symbol)}removeListener(e){for(const[t,i]of this.registeredListeners.entries()){const n=i.findIndex(t=>t.symbol===e);if(n>=0){i.splice(n,1),0===i.length&&this.registeredListeners.delete(t);break}}}dispatch(e,...t){for(const i of this.getListenersByType(e))try{i.handler(...t)}catch(e){O.errorOnce(e)}}dispatchWrapHandlers(e,t,...i){for(const n of this.getListenersByType(e))try{t(n.handler,...i)}catch(e){O.errorOnce(e)}}getListenersByType(e){var t;return null!=(t=this.registeredListeners.get(e))?t:[]}destroy(){this.registeredListeners.clear()}},sc=class extends nc{constructor(e){super(),this.animationManager=e,this.dispatchOnlyLatest=!0,this.dispatchThrottle=0,this.requestThrottle=300,this.isLoadingInitialData=!1,this.isLoadingData=!1,this.freshRequests=[],this.requestCounter=0,this.debug=Rn.create(!0,"data-model","data-source"),this.throttledFetch=this.createThrottledFetch(this.requestThrottle),this.throttledDispatch=this.createThrottledDispatch(this.dispatchThrottle)}updateCallback(e){"function"==typeof e&&(this.debug("DataService - updated data source callback"),this.dataSourceCallback=e,this.isLoadingInitialData=!0,this.animationManager.skip(),this.dispatch("data-source-change"))}clearCallback(){this.dataSourceCallback=void 0}load(e){this.isLoadingData=!0,this.throttledFetch(e)}isLazy(){return null!=this.dataSourceCallback}isLoading(){return this.isLazy()&&(this.isLoadingInitialData||this.isLoadingData)}createThrottledFetch(e){return N(e=>this.fetch(e),e,{leading:!1,trailing:!0})}createThrottledDispatch(e){return N((e,t)=>{this.debug(`DataService - dispatching 'data-load' | ${e}`),this.dispatch("data-load",{type:"data-load",data:t})},e,{leading:!0,trailing:!0})}fetch(e){return x(this,null,function*(){if(!this.dataSourceCallback)throw new Error("DataService - [dataSource.getData] callback not initialised");const t=performance.now(),i=this.requestCounter++;let n;this.debug(`DataService - requesting | ${i}`),this.freshRequests.push(i);try{n=yield this.dataSourceCallback(e),this.debug(`DataService - response | ${performance.now()-t}ms | ${i}`)}catch(e){this.debug(`DataService - request failed | ${i}`),O.errorOnce(`DataService - request failed | [${e}]`)}this.isLoadingInitialData=!1;const s=this.freshRequests.findIndex(e=>e===i);-1===s||this.dispatchOnlyLatest&&s!==this.freshRequests.length-1?this.debug(`DataService - discarding stale request | ${i}`):(this.freshRequests=this.freshRequests.slice(s+1),0===this.freshRequests.length&&(this.isLoadingData=!1),Array.isArray(n)?this.throttledDispatch(i,n):this.dispatch("data-error"))})}};S([Xa({newValue(e){this.throttledDispatch=this.createThrottledDispatch(e)}})],sc.prototype,"dispatchThrottle",2),S([Xa({newValue(e){this.throttledFetch=this.createThrottledFetch(e)}})],sc.prototype,"requestThrottle",2);var rc=class{constructor(e){this.maxAnimationTime=e,this.debug=Rn.create(!0,"animation"),this.controllers=new Map,this.stoppedCbs=new Set,this.currentPhase=0,this.phases=new Map(Ms.map(e=>[e,[]])),this.skipAnimations=!1,this.animationTimeConsumed=0,this.isReady=!1}get size(){return this.controllers.size}get consumedTimeMs(){return this.animationTimeConsumed}isActive(){return this.controllers.size>0}getActiveControllers(){var e;return null!=(e=this.phases.get(Ms[this.currentPhase]))?e:[]}checkOverlappingId(e){null!=e&&this.controllers.has(e)&&(this.controllers.get(e).stop(),this.debug(`Skipping animation batch due to update of existing animation: ${e}`),this.skip())}addAnimation(e){var t;if(!e.isComplete)return Ms.indexOf(e.phase)<this.currentPhase?(this.debug("Skipping animation due to being for an earlier phase",e.id),void e.stop()):(this.controllers.set(e.id,e),void(null==(t=this.phases.get(e.phase))||t.push(e)))}removeAnimation(e){this.controllers.delete(e.id);const t=this.phases.get(e.phase),i=null==t?void 0:t.indexOf(e);null!=i&&i>=0&&(null==t||t.splice(i,1))}progress(e){if(!this.isReady)return;let t=0===e?.01:e;const i=()=>{const e=Ms[this.currentPhase];return{phaseControllers:[...this.getActiveControllers()],phase:e,phaseMeta:As[e]}};let{phase:n,phaseControllers:s,phaseMeta:r}=i();const o=()=>null==Ms[this.currentPhase],a=()=>{for(({phase:n,phaseControllers:s,phaseMeta:r}=i());!o()&&0===s.length;)this.currentPhase++,({phase:n,phaseControllers:s,phaseMeta:r}=i()),this.debug(`AnimationBatch - phase changing to ${n}`,{unusedTime:t},s)},l=this.controllers.size;this.debug(`AnimationBatch - ${e}ms; phase ${n} with ${null==s?void 0:s.length} of ${l}`);do{const e=t,i=r.skipIfNoEarlierAnimations&&0===this.animationTimeConsumed;let n=0;for(const r of s)i?r.stop():t=Math.min(r.update(e),t),r.isComplete&&(n++,this.removeAnimation(r));this.animationTimeConsumed+=e-t,this.debug(`AnimationBatch - updated ${s.length} controllers; ${n} completed`),this.debug(`AnimationBatch - animationTimeConsumed: ${this.animationTimeConsumed}`),a()}while(t>0&&!o());this.animationTimeConsumed>this.maxAnimationTime&&(O.warnOnce("Animation batch exceeded max animation time, skipping.",new Map(this.controllers.entries())),this.stop())}ready(){if(this.isReady)return;this.isReady=!0,this.debug(`AnimationBatch - ready; skipped: ${this.skipAnimations}`,[...this.controllers]);let e=!0;for(const[,t]of this.controllers)if(t.duration>0&&!0!==As[t.phase].skipIfNoEarlierAnimations){e=!1;break}if(!e)for(const[,e]of this.controllers)e.autoplay&&e.play(!0)}skip(e=!0){if(!1===this.skipAnimations&&!0===e){for(const e of this.controllers.values())e.stop();this.controllers.clear()}this.skipAnimations=e}play(){for(const e of this.controllers.values())e.play()}pause(){for(const e of this.controllers.values())e.pause()}stop(){for(const e of this.controllers.values())try{e.stop(),this.removeAnimation(e)}catch(e){O.error("Error during animation stop",e)}this.dispatchStopped()}stopByAnimationId(e){if(null!=e&&this.controllers.has(e)){const t=this.controllers.get(e);t&&(t.stop(),this.removeAnimation(t))}}stopByAnimationGroupId(e){for(const t of this.controllers.values())t.groupId===e&&this.stopByAnimationId(t.id)}dispatchStopped(){this.stoppedCbs.forEach(e=>e()),this.stoppedCbs.clear()}isSkipped(){return this.skipAnimations}destroy(){this.stop(),this.controllers.clear()}},oc=class{constructor(){this.listeners=new nc,this.destroyFns=[]}addListener(e,t){return this.listeners.addListener(e,t)}removeListener(e){this.listeners.removeListener(e)}destroy(){this.listeners.destroy(),this.destroyFns.forEach(e=>e())}};function ac(e){const t=y(v({},e),{consumed:!1,consume(){var i,n;t.consumed=!0,e.sourceEvent instanceof Event?null==(i=e.sourceEvent)||i.preventDefault():null==(n=e.sourceEvent)||n.consume()}});return t}function lc(e,t,i){e.dispatchWrapHandlers(t,(e,t)=>{t.consumed||e(t)},i)}var cc=["click","dblclick","contextmenu","hover","drag-start","drag","drag-end","leave","enter","page-left","wheel"],hc=["blur","focus"],dc=["keydown","keyup"],uc=["pagehide","mousemove","mouseup"],pc=["click","dblclick","contextmenu","mousedown","mouseout","mouseenter","touchstart","touchmove","touchend","touchcancel","wheel","blur","focus","keydown","keyup"],gc=(e=>(e[e.Default=16]="Default",e[e.ZoomDrag=8]="ZoomDrag",e[e.Annotations=4]="Annotations",e[e.ContextMenu=2]="ContextMenu",e[e.Animation=1]="Animation",e[e.All=31]="All",e))(gc||{}),fc=class e extends oc{constructor(e,t){super(),this.keyboardOptions=e,this.debug=Rn.create(!0,"interaction"),this.eventHandler=e=>this.processEvent(e),this.mouseDown=!1,this.touchDown=!1,this.clickHistory=[{offsetX:NaN,offsetY:NaN,type:"mousedown"}],this.dblclickHistory=[{offsetX:NaN,offsetY:NaN,type:"mousedown"},{offsetX:NaN,offsetY:NaN,type:"mouseup"},{offsetX:NaN,offsetY:NaN,type:"mousedown"}],this.stateQueue=17,this.rootElement=wn("body"),this.element=t;for(const e of pc)e.startsWith("touch")?t.addEventListener(e,this.eventHandler,{passive:!0}):"wheel"===e?t.addEventListener(e,this.eventHandler,{passive:!1}):t.addEventListener(e,this.eventHandler);for(const e of uc)xn().addEventListener(e,this.eventHandler);An("\n.ag-chart-wrapper {\n    touch-action: none;\n}\n","interactionManager")}destroy(){super.destroy();for(const e of uc)xn().removeEventListener(e,this.eventHandler);for(const e of pc)this.element.removeEventListener(e,this.eventHandler)}addListener(e,t,i=16){return super.addListener(e,e=>{this.getState()&i&&t(e)})}pushState(e){this.stateQueue|=e}popState(e){this.stateQueue&=~e}getState(){return this.stateQueue&-this.stateQueue}processEvent(e){const t=this.decideInteractionEventTypes(e);t.length>0&&this.dispatchEvent(e,t).catch(e=>O.errorOnce(e))}dispatchEvent(e,t){return x(this,null,function*(){if(Cn(cc,t))this.dispatchPointerEvent(e,t);else if(Cn(hc,t))for(const i of t)lc(this.listeners,i,ac({type:i,sourceEvent:e}));else if(Cn(dc,t))for(const i of t)lc(this.listeners,i,ac({type:i,sourceEvent:e}))})}dispatchPointerEvent(e,t){const i=this.calculateCoordinates(e);if(null!=i)for(const n of t)lc(this.listeners,n,this.buildPointerEvent(v({type:n,event:e},i)))}recordDown(e){e instanceof MouseEvent&&(nt(["offsetX","offsetY"],this.clickHistory[0],e),nt(["offsetX","offsetY"],this.dblclickHistory[2],this.dblclickHistory[0]),nt(["offsetX","offsetY"],this.dblclickHistory[0],e)),this.dragStartElement=e.target}recordUp(e){e instanceof MouseEvent&&nt(["offsetX","offsetY"],this.dblclickHistory[1],e),this.dragStartElement=void 0}decideInteractionEventTypes(e){const t="drag-start";switch(e.type){case"blur":case"focus":case"keydown":case"keyup":return this.keyboardOptions.enabled?[e.type]:[];case"click":case"dblclick":case"contextmenu":case"wheel":return[e.type];case"mousedown":return this.isEventOverElement(e)?(this.mouseDown=!0,this.recordDown(e),[t]):[];case"touchstart":return this.isEventOverElement(e)?(this.touchDown=!0,this.recordDown(e),[t]):[];case"touchmove":case"mousemove":return this.mouseDown||this.touchDown||this.isEventOverElement(e)?this.mouseDown||this.touchDown?["drag"]:["hover"]:[];case"mouseup":return this.mouseDown||this.isEventOverElement(e)?(this.mouseDown=!1,this.recordUp(e),["drag-end"]):[];case"touchend":return this.touchDown||this.isEventOverElement(e)?(this.touchDown=!1,this.recordUp(e),["drag-end"]):[];case"mouseout":case"touchcancel":return["leave"];case"mouseenter":const i=e instanceof MouseEvent&&!(1&~e.buttons);return this.mouseDown!==i?(this.mouseDown=i,[i?t:"drag-end"]):["enter"];case"pagehide":return["page-left"]}return[]}isEventOverElement(e){var t,i,n;return e.target===this.element||(null==(t=e.target)?void 0:t.parentElement)===this.element||(null==(n=null==(i=e.target)?void 0:i.parentElement)?void 0:n.parentElement)===this.element}calculateCoordinates(t){var i;if(t instanceof MouseEvent)return this.getMouseEventCoords(t);if("undefined"!=typeof TouchEvent&&t instanceof TouchEvent){const n=null!=(i=t.touches[0])?i:t.changedTouches[0],{clientX:s,clientY:r,pageX:o,pageY:a}=n;return y(v({},e.NULL_COORDS),{clientX:s,clientY:r,pageX:o,pageY:a})}if(t instanceof PageTransitionEvent){if(t.persisted)return;return e.NULL_COORDS}}getMouseEventCoords(e){const{clientX:t,clientY:i,pageX:n,pageY:s}=e;let{offsetX:r,offsetY:o}=e;const a=e=>{let t=0,i=0;for(;e;)t+=e.offsetLeft,i+=e.offsetTop,e=e.offsetParent;return{x:t,y:i}};if(null!=this.dragStartElement&&e.target!==this.dragStartElement){const t=a(this.dragStartElement),i=a(e.target);r-=t.x-i.x,o-=t.y-i.y}return{clientX:t,clientY:i,pageX:n,pageY:s,offsetX:r,offsetY:o}}isWheelEvent(e){return"wheel"===e.type}buildPointerEvent(e){const{type:t,event:i,clientX:n,clientY:s}=e;let{offsetX:r,offsetY:o,pageX:a,pageY:l}=e;if(!We(r)||!We(o)){const e=this.element.getBoundingClientRect();r=n-e.left,o=s-e.top}if(!We(a)||!We(l)){const e=this.rootElement.getBoundingClientRect();a=n-e.left,l=s-e.top}let[c,h]=[NaN,NaN];if(this.isWheelEvent(i)){const e=0===i.deltaMode?.01:1;c=i.deltaX*e,h=i.deltaY*e}let d=[];"click"===i.type?d=this.clickHistory:"dblclick"===i.type&&(d=this.dblclickHistory);const u=ac({type:t,offsetX:r,offsetY:o,pageX:a,pageY:l,deltaX:c,deltaY:h,pointerHistory:d,sourceEvent:i});return this.debug("InteractionManager - builtEvent: ",u),u}};fc.NULL_COORDS={clientX:-1/0,clientY:-1/0,pageX:-1/0,pageY:-1/0,offsetX:-1/0,offsetY:-1/0};var mc=fc;function vc(e){return null==e||!isNaN(e)&&e>=0&&e<=2}var yc=class extends oc{constructor(e,t){super(),this.interactionManager=e,this.chartUpdateMutex=t,this.defaultDuration=1e3,this.batch=new rc(1.5*this.defaultDuration),this.debug=Rn.create(!0,"animation"),this.rafAvailable="undefined"!=typeof requestAnimationFrame,this.isPlaying=!1,this.requestId=null,this.skipAnimations=!1}animate(e){var t,i=C(e,[]);const n=this.batch;try{n.checkOverlappingId(i.id)}catch(e){return void this.failsafeOnError(e)}const s=null!=(t=i.id)?t:Math.random().toString(),r=this.isSkipped()||"none"===i.phase;r&&this.debug("AnimationManager - skipping animation");const{delay:o,duration:a}=i;if(!vc(o))throw new Error(`Animation delay of ${o} is unsupported (${s})`);if(!vc(a))throw new Error(`Animation duration of ${a} is unsupported (${s})`);const l=new Is(y(v({},i),{id:s,skip:r,autoplay:!!this.isPlaying&&i.autoplay,phase:i.phase,defaultDuration:this.defaultDuration}));if(!this.forceTimeJump(l,this.defaultDuration))return this.batch.addAnimation(l),l}play(){if(!this.isPlaying){this.isPlaying=!0,this.debug("AnimationManager.play()");try{this.batch.play()}catch(e){this.failsafeOnError(e)}this.requestAnimation()}}pause(){if(this.isPlaying){this.isPlaying=!1,this.cancelAnimation(),this.debug("AnimationManager.pause()");try{this.batch.pause()}catch(e){this.failsafeOnError(e)}}}stop(){this.isPlaying=!1,this.cancelAnimation(),this.debug("AnimationManager.stop()"),this.batch.stop()}stopByAnimationId(e){try{this.batch.stopByAnimationId(e)}catch(e){this.failsafeOnError(e)}}stopByAnimationGroupId(e){try{this.batch.stopByAnimationGroupId(e)}catch(e){this.failsafeOnError(e)}}reset(){this.isPlaying?(this.stop(),this.play()):this.stop()}skip(e=!0){this.skipAnimations=e}isSkipped(){return!this.rafAvailable||this.skipAnimations||this.batch.isSkipped()}isActive(){return this.isPlaying&&this.batch.isActive()}skipCurrentBatch(){this.debug.check()&&this.debug("AnimationManager - skipCurrentBatch()",{stack:(new Error).stack}),this.batch.skip()}isSkippingFrames(){return!0}scheduleAnimationFrame(e){this.requestId=requestAnimationFrame(e)}forceTimeJump(e,t){return!1}requestAnimation(){if(!this.rafAvailable)return;if(!this.batch.isActive()||null!==this.requestId)return;let e;const t=i=>x(this,null,function*(){const n=()=>x(this,null,function*(){const t=i-(null!=e?e:i);e=i,this.debug("AnimationManager - onAnimationFrame()",{controllersCount:this.batch.size,deltaTime:t}),this.interactionManager.pushState(1);try{this.batch.progress(t)}catch(e){this.failsafeOnError(e)}this.listeners.dispatch("animation-frame",{type:"animation-frame",deltaMs:t})});this.isSkippingFrames()?yield this.chartUpdateMutex.acquireImmediately(n):yield this.chartUpdateMutex.acquire(n),this.batch.isActive()?this.scheduleAnimationFrame(t):(this.batch.stop(),this.listeners.dispatch("animation-stop",{type:"animation-stop",deltaMs:this.batch.consumedTimeMs}))});this.listeners.dispatch("animation-start",{type:"animation-start",deltaMs:0}),this.scheduleAnimationFrame(t)}cancelAnimation(){null!==this.requestId&&(cancelAnimationFrame(this.requestId),this.requestId=null,this.startBatch())}failsafeOnError(e,t=!0){O.error("Error during animation, skipping animations",e),t&&this.cancelAnimation()}startBatch(e){this.debug(`AnimationManager - startBatch() with skipAnimations=${e}.`),this.reset(),this.batch.stop(),this.batch.destroy(),this.batch=new rc(1.5*this.defaultDuration),!0===e&&this.batch.skip()}endBatch(){this.batch.isActive()?(this.batch.ready(),this.requestAnimation()):(this.interactionManager.popState(1),this.batch.isSkipped()&&this.batch.skip(!1))}onBatchStop(e){this.batch.stoppedCbs.add(e)}},Cc=class e{constructor(t){this.canvas=t,this.debug=Rn.create(!0,"aria"),this.canvas.appendChild(this.liveElem=e.createAnnouncer())}static createAnnouncer(){const e=wn().createElement("div");return e.classList.add("ag-charts-aria-announcer"),Qa(e,"role","status"),Qa(e,"aria-live","assertive"),e}destroy(){this.canvas.removeChild(this.liveElem)}announceValue(e){this.debug(`AriaAnnouncementService - announceValue: ${e}`),this.liveElem.textContent=e}},bc=class extends oc{legendItemClick(e,t,i,n){const s={type:"legend-item-click",series:e,itemId:t,enabled:i,legendItemName:n};this.listeners.dispatch("legend-item-click",s)}legendItemDoubleClick(e,t,i,n,s){const r={type:"legend-item-double-click",series:e,itemId:t,enabled:i,legendItemName:s,numVisibleItems:n};this.listeners.dispatch("legend-item-double-click",r)}axisHover(e,t){const i={type:"axis-hover",axisId:e,direction:t};this.listeners.dispatch("axis-hover",i)}},Sc=class{constructor(){this.defaultActions=[],this.disabledActions=new Set}copyDefaultActions(){return[...this.defaultActions]}registerDefaultAction(e){e.id&&this.defaultActions.find(({id:t})=>t===e.id)||this.defaultActions.push(e)}enableAction(e){this.disabledActions.delete(e)}disableAction(e){this.disabledActions.add(e)}isDisabled(e){return this.disabledActions.has(e)}},wc=class extends Map{constructor(e,t){super(),this.defaultValue=e,this.defaultState=t}set(e,t){return this.delete(e),void 0!==t&&super.set(e,t),this}stateId(){var e;return null!=(e=Array.from(this.keys()).pop())?e:this.defaultState}stateValue(){var e;return null!=(e=Array.from(this.values()).pop())?e:this.defaultValue}},xc=class{constructor(e){this.element=e,this.stateTracker=new wc("default")}updateCursor(e,t){this.stateTracker.set(e,t),this.element.style.cursor=this.stateTracker.stateValue()}getCursor(){return this.element.style.cursor}};function Ec(e,t){return Math.sqrt(function(e,t){const i=e.screenX-t.screenX,n=e.screenY-t.screenY;return i*i+n*n}(e,t))}var Mc=class extends oc{constructor(e){super(),this.touchstart=e=>this.onTouchStart(e),this.touchmove=e=>this.onTouchMove(e),this.touchend=e=>this.onTouchEnd(e),this.touchcancel=e=>this.onTouchCancel(e),this.pinch={finger1:{identifier:NaN,screenX:NaN,screenY:NaN},finger2:{identifier:NaN,screenX:NaN,screenY:NaN},origin:{x:NaN,y:NaN},distance:NaN,status:0},this.element=e,e.addEventListener("touchstart",this.touchstart,{passive:!0}),e.addEventListener("touchmove",this.touchmove,{passive:!0}),e.addEventListener("touchend",this.touchend),e.addEventListener("touchcancel",this.touchcancel)}destroy(){const{element:e}=this;e.removeEventListener("touchstart",this.touchstart),e.removeEventListener("touchmove",this.touchmove),e.removeEventListener("touchend",this.touchend),e.removeEventListener("touchcancel",this.touchcancel)}findPinchTouches(e){const{touches:t}=e,{finger1:i,finger2:n}=this.pinch;if(0!==this.pinch.status&&2===t.length){if(t[0].identifier===i.identifier&&t[1].identifier===n.identifier)return[t[0],t[1]];if(t[0].identifier===n.identifier&&t[1].identifier===i.identifier)return[t[1],t[0]]}}copyTouchData(e){const t=["identifier","screenX","screenY"];nt(t,this.pinch.finger1,e.touches[0]),nt(t,this.pinch.finger2,e.touches[1]),this.pinch.distance=Ec(this.pinch.finger1,this.pinch.finger2)}dispatchPinchEvent(e,t){const{finger1:i,finger2:n,origin:s}=this.pinch,r={type:e,finger1:i,finger2:n,deltaDistance:t,origin:s};this.listeners.dispatch(e,r)}onTouchStart(e){this.stopPinchTracking();const{pinch:t}=this;2===e.touches.length&&(t.status=1,this.copyTouchData(e),t.origin.x=(e.touches[0].clientX+e.touches[1].clientX)/2,t.origin.y=(e.touches[0].clientY+e.touches[1].clientY)/2)}onTouchMove(e){const t=this.findPinchTouches(e);if(void 0!==t){const[i,n]=t,{pinch:s}=this,r=Ec(i,n),o=r-s.distance;1===s.status?Math.abs(o)>1&&(s.status=2,this.copyTouchData(e),this.dispatchPinchEvent("pinch-start",0)):2===s.status?(s.distance=r,this.copyTouchData(e),this.dispatchPinchEvent("pinch-move",o)):O.error(`unexpected pinch.status: ${s.status}`)}}onTouchEnd(e){this.stopPinchTracking()}onTouchCancel(e){this.stopPinchTracking()}stopPinchTracking(){const{pinch:e}=this;2===e.status&&this.dispatchPinchEvent("pinch-end",0),this.pinch.status=0}},Ac=class extends oc{constructor(){super(...arguments),this.highlightStates=new wc,this.pickedStates=new wc}updateHighlight(e,t){const{activeHighlight:i}=this;this.highlightStates.set(e,t),this.activeHighlight=this.highlightStates.stateValue(),this.isEqual(this.activeHighlight,i)||this.listeners.dispatch("highlight-change",{type:"highlight-change",currentHighlight:this.activeHighlight,previousHighlight:i})}getActiveHighlight(){return this.activeHighlight}updatePicked(e,t){this.pickedStates.set(e,t),this.activePicked=this.pickedStates.stateValue()}getActivePicked(){return this.activePicked}isEqual(e,t){return e===t||(null==e?void 0:e.series)===(null==t?void 0:t.series)&&(null==e?void 0:e.itemId)===(null==t?void 0:t.itemId)&&(null==e?void 0:e.datum)===(null==t?void 0:t.datum)}},Tc=class extends oc{constructor(e){super(),this.hasBrowserFocus=!1,this.isMouseBlurred=!1,this.isClicking=!1,this.destroyFns.push(e.addListener("drag-start",e=>this.onClickStart(e),31),e.addListener("click",e=>this.onClickStop(e),31),e.addListener("drag-end",e=>this.onClickStop(e),31),e.addListener("wheel",e=>this.mouseBlur(e)),e.addListener("hover",e=>this.mouseBlur(e)),e.addListener("drag",e=>this.mouseBlur(e)),e.addListener("blur",e=>this.onBlur(e),31),e.addListener("focus",e=>this.onFocus(e),31),e.addListener("keydown",e=>this.onKeyDown(e),31))}destroy(){super.destroy()}onClickStart(e){this.isClicking=!0,this.mouseBlur(e)}onClickStop(e){this.isClicking=!1,this.mouseBlur(e)}mouseBlur(e){this.hasBrowserFocus&&(this.isMouseBlurred||(this.dispatch("blur",0,e),this.isMouseBlurred=!0))}onBlur(e){this.hasBrowserFocus=!1,this.isMouseBlurred=!1,this.dispatch("blur",0,e)}onFocus(e){this.hasBrowserFocus=!0,this.isClicking?this.isMouseBlurred=!0:(this.dispatch("browserfocus",1,e),this.dispatch("tab",0,e))}onKeyDown(e){if(this.hasBrowserFocus&&!this.isClicking)switch(this.isMouseBlurred=!1,e.sourceEvent.code){case"Tab":return e.sourceEvent.shiftKey?this.dispatch("tab",-1,e):this.dispatch("tab",1,e);case"ArrowDown":return this.dispatch("nav-vert",1,e);case"ArrowUp":return this.dispatch("nav-vert",-1,e);case"ArrowLeft":return this.dispatch("nav-hori",-1,e);case"ArrowRight":return this.dispatch("nav-hori",1,e);case"Space":case"Enter":return this.dispatch("submit",0,e)}}dispatch(e,t,i){const n=ac({type:e,delta:t,sourceEvent:i});lc(this.listeners,e,n)}},Dc={};b(Dc,{block:()=>Ic,css:()=>kc,elements:()=>Rc,modifiers:()=>Lc});var Ic="ag-charts-focus",Rc={wrapper:`${Ic}__wrapper`,indicator:`${Ic}__indicator`},Lc={hidden:`${Ic}--hidden`},kc=`\n.${Ic}.${Rc.wrapper} {\n    position: relative;\n    display: block;\n    pointer-events: none;\n    user-select: none;\n    overflow: hidden;\n    top: 0;\n    left: 0;\n}\n\n.${Ic}.${Rc.indicator} {\n    position: absolute;\n    display: block;\n    pointer-events: none;\n    user-select: none;\n    border: var(--ag-charts-focus-border);\n    box-shadow: var(--ag-charts-focus-border-shadow);\n}\n\n.${Lc.hidden} {\n    visibility: hidden;\n}\n`,Pc=["series","legend"],Nc=class extends nc{},Oc=class{constructor(e,t,i,n){this.interactionManager=e,this.keyNavManager=t,this.canvasElement=i,this.currentTabIndex=0,this.isDragging=!1,this.leftCanvas=!1,this.regions=new Map,this.destroyFns=[],this.destroyFns.push(...cc.map(t=>e.addListener(t,this.processPointerEvent.bind(this),31)),this.keyNavManager.addListener("blur",this.onNav.bind(this)),this.keyNavManager.addListener("browserfocus",this.onFocus.bind(this)),this.keyNavManager.addListener("tab",this.onTab.bind(this)),this.keyNavManager.addListener("nav-vert",this.onNav.bind(this)),this.keyNavManager.addListener("nav-hori",this.onNav.bind(this)),this.keyNavManager.addListener("submit",this.onNav.bind(this))),An(kc,Ic),this.focusWrapper=wn().createElement("div"),this.focusIndicator=wn().createElement("div"),this.focusWrapper.appendChild(this.focusIndicator),n.appendChild(this.focusWrapper);const{block:s,elements:r,modifiers:o}=Dc;this.focusWrapper.classList.add(s,r.wrapper),this.focusIndicator.classList.add(s,r.indicator,o.hidden)}destroy(){this.destroyFns.forEach(e=>e()),this.currentRegion=void 0;for(const e of this.regions.values())e.listeners.destroy();this.focusWrapper.remove(),this.regions.clear()}addRegionFromProperties(e){const t={properties:e,listeners:new Nc};return this.regions.set(e.name,t),this.makeObserver(t)}addRegion(e,t,...i){return this.addRegionFromProperties({name:e,bboxproviders:[t,...i],canInteraction:()=>!0})}getRegion(e){return this.makeObserver(this.regions.get(e))}find(e,t){const i=[];for(const[n,s]of this.regions.entries())for(const n of s.properties.bboxproviders){const r=n.getCachedBBox();r.containsPoint(e,t)&&i.push([s,r.width*r.height])}return i.sort((e,t)=>e[1]-t[1]).map(e=>e[0])}makeObserver(e){const{interactionManager:t}=this;return new class{addListener(i,n,s=16){var r;return null!=(r=null==e?void 0:e.listeners.addListener(i,e=>{e.consumed||t.getState()&s&&n(e)}))?r:()=>{}}}}checkPointerHistory(e,t){for(const i of t.pointerHistory){const t=this.pickRegion(i.offsetX,i.offsetY);if(e.properties.name!==(null==t?void 0:t.properties.name))return!1}return!0}dispatch(e,t){null==e||e.listeners.dispatch(t.type,t)}handleDragging(e){const{currentRegion:t}=this;switch(e.type){case"drag-start":this.isDragging=!0,this.leftCanvas=!1;break;case"leave":return this.leftCanvas=!0,this.isDragging;case"enter":return this.leftCanvas=!1,this.isDragging;case"drag":if(this.isDragging)return this.dispatch(t,e),!0;break;case"drag-end":if(this.isDragging)return this.isDragging=!1,this.dispatch(t,e),this.leftCanvas&&this.dispatch(t,y(v({},e),{type:"leave"})),!0}return!1}processPointerEvent(e){if(this.handleDragging(e))return;const{currentRegion:t}=this,i=this.pickRegion(e.offsetX,e.offsetY);void 0!==t&&(null==i?void 0:i.properties.name)!==t.properties.name&&this.dispatch(t,y(v({},e),{type:"leave"})),void 0!==i&&i.properties.name!==(null==t?void 0:t.properties.name)&&this.dispatch(i,y(v({},e),{type:"enter"})),void 0!==i&&this.checkPointerHistory(i,e)&&this.dispatch(i,e),this.currentRegion=i}pickRegion(e,t){const i=this.find(e,t);return i.length>0?i[0]:void 0}getTabRegion(e){if(void 0!==e&&e>=0&&e<Pc.length)return this.regions.get(Pc[e])}dispatchTabStart(e){const{delta:t,sourceEvent:i}=e,n=ac({type:"tab-start",delta:t,sourceEvent:i}),s=this.getTabRegion(this.currentTabIndex);return this.dispatch(s,n),!!n.consumed}getNextInteractableTabIndex(e,t){const i=t<0?-1:1;let n=e;for(;0!==t;){const e=this.getTabRegion(n+i);if(void 0===e)return;e.properties.canInteraction()&&(t-=i),n+=i}return n}validateCurrentTabIndex(){var e;const t=this.getTabRegion(this.currentTabIndex);void 0===t||t.properties.canInteraction()||(this.currentTabIndex=null!=(e=this.getNextInteractableTabIndex(-1,1))?e:0)}onFocus(e){const{delta:t,sourceEvent:i}=e,n=t>0?this.getNextInteractableTabIndex(-1,1):this.getNextInteractableTabIndex(Pc.length,-1);this.currentTabIndex=null!=n?n:0;const s=this.getTabRegion(this.currentTabIndex);s&&this.dispatch(s,ac({type:"tab",delta:t,sourceEvent:i}))}onTab(e){if(this.dispatchTabStart(e))return;this.validateCurrentTabIndex();const t=this.getNextInteractableTabIndex(this.currentTabIndex,e.delta),i=this.getTabRegion(t),n=this.getTabRegion(this.currentTabIndex);if(void 0!==t&&(this.currentTabIndex=t),void 0!==n&&(null==i?void 0:i.properties.name)!==n.properties.name){const{delta:t,sourceEvent:i}=e,s=ac({type:"blur",delta:t,sourceEvent:i});this.dispatch(n,s)}void 0!==i&&i.properties.canInteraction()?this.dispatch(i,e):this.updateFocusIndicatorRect(void 0)}onNav(e){const t=this.getTabRegion(this.currentTabIndex);this.dispatch(t,e)}updateFocusWrapperRect(){this.focusWrapper.style.width=this.canvasElement.style.width,this.focusWrapper.style.height=this.canvasElement.style.height}updateFocusIndicatorRect(e){null!=e?(this.updateFocusWrapperRect(),this.focusIndicator.classList.remove(Lc.hidden),this.focusIndicator.style.width=`${e.width}px`,this.focusIndicator.style.height=`${e.height}px`,this.focusIndicator.style.left=`${e.x}px`,this.focusIndicator.style.top=`${e.y}px`):this.focusIndicator.classList.add(Lc.hidden)}},_c=class extends oc{constructor(e){super(),this.element=e}static isGroup(e,t){return t.group===e}pressButton(e,t){this.listeners.dispatch("button-pressed",{type:"button-pressed",group:e,value:t})}toggleGroup(e,t){this.listeners.dispatch("group-toggled",{type:"group-toggled",group:e,visible:t})}toggleButton(e,t,i){this.listeners.dispatch("button-toggled",{type:"button-toggled",group:e,value:t,enabled:i})}proxyGroupOptions(e,t){this.listeners.dispatch("proxy-group-options",{type:"proxy-group-options",group:e,options:t})}},Fc=`\n.${el} {\n    transition: transform 0.1s ease;\n    max-width: 100%;\n    position: fixed;\n    left: 0px;\n    top: 0px;\n    z-index: 99999;\n    font: 12px Verdana, sans-serif;\n    color: rgb(70, 70, 70);\n    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.08);\n}\n\n.${el}-wrap-always {\n    overflow-wrap: break-word;\n    word-break: break-word;\n    hyphens: none;\n}\n\n.${el}-wrap-hyphenate {\n    overflow-wrap: break-word;\n    word-break: break-word;\n    hyphens: auto;\n}\n\n.${el}-wrap-on-space {\n    overflow-wrap: normal;\n    word-break: normal;\n}\n\n.${el}-wrap-never {\n    white-space: pre;\n    text-overflow: ellipsis;\n}\n\n.${el}-no-interaction {\n    pointer-events: none;\n    user-select: none;\n}\n\n.${el}-no-animation {\n    transition: none !important;\n}\n\n.${el}-hidden {\n    visibility: hidden;\n}\n\n.${el}-title {\n    overflow: hidden;\n    position: relative;\n    padding: 8px 14px;\n    border-top-left-radius: 2px;\n    border-top-right-radius: 2px;\n    color: white;\n    background-color: #888888;\n    z-index: 1;\n    text-overflow: inherit;\n}\n\n.${el}-title:only-child {\n    border-bottom-left-radius: 2px;\n    border-bottom-right-radius: 2px;\n}\n\n.${el}-content {\n    overflow: hidden;\n    padding: 6px 14px;\n    line-height: 1.7em;\n    background: white;\n    border-bottom-left-radius: 2px;\n    border-bottom-right-radius: 2px;\n    border: 1px solid rgba(0, 0, 0, 0.15);\n    overflow: hidden;\n    text-overflow: inherit;\n}\n\n.${el}-arrow::before {\n    content: "";\n\n    position: absolute;\n    top: 100%;\n    left: 50%;\n    transform: translateX(-50%);\n\n    border: 5px solid #d9d9d9;\n\n    border-left-color: transparent;\n    border-right-color: transparent;\n    border-bottom-color: transparent;\n\n    width: 0;\n    height: 0;\n\n    margin: 0 auto;\n}\n\n.${el}-arrow::after {\n    content: "";\n\n    position: absolute;\n    top: calc(100% - 1px);\n    left: 50%;\n    transform: translateX(-50%);\n\n    border: 5px solid white;\n\n    border-left-color: transparent;\n    border-right-color: transparent;\n    border-bottom-color: transparent;\n\n    width: 0;\n    height: 0;\n\n    margin: 0 auto;\n}\n\n.ag-chart-wrapper {\n    box-sizing: border-box;\n    overflow: hidden;\n}\n`,Gc=class{constructor(e,t){if(this.canvasElement=e,this.tooltip=t,this.stateTracker=new wc,this.appliedState=null,"undefined"!=typeof IntersectionObserver){const e=new IntersectionObserver(e=>{for(const t of e)t.target===this.canvasElement&&0===t.intersectionRatio&&this.tooltip.toggle(!1)},{root:this.tooltip.root});e.observe(this.canvasElement),this.observer=e}An(Fc,"tooltip")}updateTooltip(e,t,i){var n;this.tooltip.enabled&&(null!=i||(i=null==(n=this.stateTracker.get(e))?void 0:n.content),this.stateTracker.set(e,{content:i,meta:t}),this.applyStates())}removeTooltip(e){this.tooltip.enabled&&(this.stateTracker.delete(e),this.applyStates())}getTooltipMeta(e){var t;return null==(t=this.stateTracker.get(e))?void 0:t.meta}destroy(){var e;null==(e=this.observer)||e.unobserve(this.canvasElement)}applyStates(){var e;const t=this.stateTracker.stateId(),i=t?this.stateTracker.get(t):null;if(null==(null==i?void 0:i.meta)||null==(null==i?void 0:i.content))return this.appliedState=null,void this.tooltip.toggle(!1);const n=this.canvasElement.getBoundingClientRect();if((null==(e=this.appliedState)?void 0:e.content)===(null==i?void 0:i.content)){const e=this.tooltip.isVisible();this.tooltip.show(n,null==i?void 0:i.meta,null,e)}else this.tooltip.show(n,null==i?void 0:i.meta,null==i?void 0:i.content);this.appliedState=i}static makeTooltipMeta(e,t){var i,n,s,r,o,a,l;const{offsetX:c,offsetY:h}=e,{tooltip:d}=t.series.properties,u={offsetX:c,offsetY:h,enableInteraction:null!=(n=null==(i=d.interaction)?void 0:i.enabled)&&n,lastPointerEvent:{type:e.type,offsetX:c,offsetY:h},showArrow:d.showArrow,position:{type:d.position.type,xOffset:d.position.xOffset,yOffset:d.position.yOffset}},p=null!=(l=null!=(r=null==(s=t.yBar)?void 0:s.upperPoint)?r:t.midPoint)?l:null==(a=(o=t.series).datumMidPoint)?void 0:a.call(o,t);if("node"===d.position.type&&p){const{x:e,y:i}=p,n=t.series.contentGroup.inverseTransformPoint(e,i);return y(v({},u),{offsetX:Math.round(n.x),offsetY:Math.round(n.y)})}return u}},Vc=class extends nc{constructor(){super(...arguments),this.layoutComplete="layout-complete"}addListener(e,t){if(this.isLayoutStage(e)||this.isLayoutComplete(e))return super.addListener(e,t);throw new Error(`AG Charts - unsupported listener type: ${e}`)}dispatchPerformLayout(e,t){return this.isLayoutStage(e)?this.getListenersByType(e).reduce((e,t)=>{try{return t.handler(e)}catch(t){return O.errorOnce(t),e}},t):t}dispatchLayoutComplete(e){this.dispatch(this.layoutComplete,e)}isLayoutStage(e){return e!==this.layoutComplete}isLayoutComplete(e){return e===this.layoutComplete}},Bc=class{constructor(){this.groups={}}registerSeries({id:e,seriesGrouping:t,visible:i,type:n}){var s;t&&(null!=(s=this.groups)[n]||(s[n]={}),this.groups[n][e]={grouping:t,visible:i})}deregisterSeries({id:e,type:t}){this.groups[t]&&delete this.groups[t][e],this.groups[t]&&0===Object.keys(this.groups[t]).length&&delete this.groups[t]}getVisiblePeerGroupIndex({type:e,seriesGrouping:t,visible:i}){var n;if(!t)return{visibleGroupCount:i?1:0,visibleSameStackCount:i?1:0,index:0};const s=new Set,r=new Set;for(const i of Object.values(null!=(n=this.groups[e])?n:{}))i.visible&&(s.add(i.grouping.groupIndex),i.grouping.groupIndex===t.groupIndex&&r.add(i.grouping.stackIndex));const o=Array.from(s);return o.sort((e,t)=>e-t),{visibleGroupCount:o.length,visibleSameStackCount:r.size,index:o.indexOf(t.groupIndex)}}},Hc=(e=>(e[e.FULL=0]="FULL",e[e.UPDATE_DATA=1]="UPDATE_DATA",e[e.PROCESS_DATA=2]="PROCESS_DATA",e[e.PERFORM_LAYOUT=3]="PERFORM_LAYOUT",e[e.SERIES_UPDATE=4]="SERIES_UPDATE",e[e.TOOLTIP_RECALCULATION=5]="TOOLTIP_RECALCULATION",e[e.SCENE_RENDER=6]="SCENE_RENDER",e[e.NONE=7]="NONE",e))(Hc||{}),zc=class extends nc{constructor(e){super(),this.updateCallback=e}update(e=0,t){this.updateCallback(e,t)}dispatchUpdateComplete(e){this.dispatch("update-complete",{type:"update-complete",minRect:null==e?void 0:e.minRect,minVisibleRect:null==e?void 0:e.minVisibleRect})}},Uc=class{constructor(e,t){const{scene:i,syncManager:n,element:s,updateCallback:r,updateMutex:o}=t;this.chartService=e,this.scene=i,this.syncManager=n,this.zoomManager=e.zoomManager,this.annotationManager=new ic(e.annotationRoot),this.ariaAnnouncementService=new Cc(i.canvas.element),this.chartEventManager=new bc,this.contextMenuRegistry=new Sc,this.cursorManager=new xc(s),this.highlightManager=new Ac,this.interactionManager=new mc(e.keyboard,s),this.keyNavManager=new Tc(this.interactionManager),this.regionManager=new Oc(this.interactionManager,this.keyNavManager,this.scene.canvas.element,s),this.toolbarManager=new _c(s),this.gestureDetector=new Mc(s),this.layoutService=new Vc,this.updateService=new zc(r),this.seriesStateManager=new Bc,this.callbackCache=new tc,this.animationManager=new yc(this.interactionManager,o),this.animationManager.skip(),this.animationManager.play(),this.dataService=new sc(this.animationManager),this.tooltipManager=new Gc(this.scene.canvas.element,e.tooltip)}destroy(){this.tooltipManager.destroy(),this.regionManager.destroy(),this.keyNavManager.destroy(),this.interactionManager.destroy(),this.animationManager.stop(),this.animationManager.destroy(),this.ariaAnnouncementService.destroy(),this.chartEventManager.destroy(),this.highlightManager.destroy(),this.callbackCache.invalidateCache(),this.animationManager.reset(),this.syncManager.destroy()}},Wc=class extends yt{constructor(){super(...arguments),this.range="tooltip"}};S([$s(Fr(["tooltip","node"],"a range"))],Wc.prototype,"range",2);var jc=class e{constructor(){this.domain=new Set}static is(t){return t instanceof e}extend(e){this.domain.add(e)}getDomain(){return Array.from(this.domain)}},Kc=class e{constructor(){this.domain=[1/0,-1/0]}static is(t){return t instanceof e}static extendDomain(e,t=[1/0,-1/0]){for(const i of e)"number"==typeof i&&(t[0]>i&&(t[0]=i),t[1]<i&&(t[1]=i));return t}extend(e){this.domain[0]>e&&(this.domain[0]=e),this.domain[1]<e&&(this.domain[1]=e)}getDomain(){return[...this.domain]}};function $c(e){return e.map(e=>Ve(e)?JSON.stringify(e):e).join("-")}function Yc(e){const t=1e4;return Number.isInteger(e)?e:Math.abs(e)>t?Math.trunc(e):Math.round(e*t)/t}function qc(e,t){var i;const n=function(e){if(null==e)return[];let[t,i]=e.map(Number);return 0===t&&0===i?[0,1]:t===1/0&&i===-1/0?[]:(t===1/0?t=0:i===-1/0&&(i=0),We(t)&&We(i)?[t,i]:[])}(e);if(0===n.length)return n;let[s,r]=n;if(s===r){const[e,n]=null!=(i=null==t?void 0:t.calculatePadding(s,r))?i:[1,1];s-=e,r+=n}return[s,r]}function Xc(e,t){var i;return null!=(i=null==t?void 0:t.get(e.id))?i:0}var Zc=Symbol("invalid"),Qc=class{constructor(e,t="standalone"){this.opts=e,this.mode=t,this.debug=Rn.create(!0,"data-model"),this.scopeCache=new Map,this.keys=[],this.values=[],this.aggregates=[],this.groupProcessors=[],this.propertyProcessors=[],this.reducers=[],this.processors=[];let i=!0;for(const t of e.props){if("key"===t.type&&!i)throw new Error("AG Charts - internal config error: keys must come before values.");"value"===t.type&&i&&(i=!1)}const n=({matchGroupIds:e=[]})=>{for(const t of e)if(this.values.every(e=>e.groupId!==t))throw new Error(`AG Charts - internal config error: matchGroupIds properties must match defined groups (${t}).`)};for(const t of e.props)switch(t.type){case"key":this.keys.push(y(v({},t),{index:this.keys.length,missing:new Map}));break;case"value":if(null==t.property)throw new Error(`AG Charts - internal config error: no properties specified for value definitions: ${JSON.stringify(t)}`);this.values.push(y(v({},t),{index:this.values.length,missing:new Map}));break;case"aggregate":n(t),this.aggregates.push(y(v({},t),{index:this.aggregates.length}));break;case"group-value-processor":n(t),this.groupProcessors.push(y(v({},t),{index:this.groupProcessors.length}));break;case"property-value-processor":this.propertyProcessors.push(y(v({},t),{index:this.propertyProcessors.length}));break;case"reducer":this.reducers.push(y(v({},t),{index:this.reducers.length}));break;case"processor":this.processors.push(y(v({},t),{index:this.processors.length}))}}resolveProcessedDataDefById(e,t){var i;const n=null==(i=this.scopeCache.get(e.id))?void 0:i.get(t);if(!n)throw new Error(`AG Charts - didn't find property definition for [${t}, ${e.id}]`);return{index:n.index,def:n}}resolveProcessedDataIndexById(e,t){return this.resolveProcessedDataDefById(e,t).index}resolveProcessedDataDefsByIds(e,t){return t.map(t=>[t,this.resolveProcessedDataDefById(e,t)])}resolveProcessedDataDefsValues(e,{keys:t,values:i}){const n={};for(const[s,{index:r,def:o}]of e){const e="key"===o.type?t:i;n[s]=e[r]}return n}getDomain(e,t,i="value",n){var s;const r=this.getDomainsByType(i,n);return null!=(s=null==r?void 0:r[this.resolveProcessedDataIndexById(e,t)])?s:[]}getDomainsByType(e,t){switch(e){case"key":return t.domain.keys;case"value":return t.domain.values;case"aggregate":return t.domain.aggValues;case"group-value-processor":return t.domain.groups;default:return null}}processData(e,t){var i;const{opts:{groupByKeys:n,groupByFn:s},aggregates:r,groupProcessors:o,reducers:a,processors:l,propertyProcessors:c}=this,h=performance.now();if(n&&0===this.keys.length)return;let d=this.extractData(e,t);if(n?d=this.groupData(d):s&&(d=this.groupData(d,s(d))),o.length>0&&this.postProcessGroups(d),r.length>0&&this.aggregateData(d),c.length>0&&this.postProcessProperties(d),a.length>0&&this.reduceData(d),l.length>0&&this.postProcessData(d),e.length>0)for(const t of P(this.keys,this.values))for(const[i,n]of t.missing)if(n>=e.length){const e=null==i?"":` for ${i}`;O.warnOnce(`the key '${t.property}' was not found in any data element${e}.`)}const u=performance.now();d.time=u-h,this.debug.check()&&function(e){var t,i;const n=(e,t)=>{t.length>0&&(O.log(`DataModel.processData() - ${e}`),O.table(t))};O.log("DataModel.processData() - processedData",e),n("Key Domains",e.domain.keys),n("Group Domains",null!=(t=e.domain.groups)?t:[]),n("Value Domains",e.domain.values),n("Aggregate Domains",null!=(i=e.domain.aggValues)?i:[]),"grouped"===e.type?n("Values",e.data.reduce((e,t)=>{var i,n;const s=null!=(i=t.keys)?i:[],r=null!=(n=t.aggValues)?n:[],o=t.keys.map(()=>{}),a=null==r?void 0:r.map(()=>{});return e.push(...t.values.map((e,t)=>[...0===t?s:o,...null!=e?e:[],...0==t?r:a])),e},[])):n("Values",e.data.reduce((e,t)=>{var i;const n=null!=(i=t.aggValues)?i:[];return e.push([...t.keys,...t.values,...n]),e},[]))}(d),this.scopeCache.clear();for(const e of P(this.keys,this.values,this.aggregates))if(e.idsMap)for(const[t,n]of e.idsMap)for(const s of n)if(this.scopeCache.has(t)){if(null==(i=this.scopeCache.get(t))?void 0:i.has(s))throw new Error("duplicate definition ids on the same scope are not allowed.");this.scopeCache.get(t).set(s,e)}else this.scopeCache.set(t,new Map([[s,e]]));return d}valueGroupIdxLookup({matchGroupIds:e}){const t=[];for(const[i,n]of this.values.entries())(!e||n.groupId&&e.includes(n.groupId))&&t.push(i);return t}valueIdxLookup(e,t){const i=null==e||0===e.length,n="string"==typeof t?t:t.id,s=this.values.findIndex(t=>(null==t.scopes||i&&!t.scopes.length||t.scopes.some(t=>null==e?void 0:e.includes(t)))&&(t.property===n||t.id===n||(t=>{if(t.idsMap)for(const[i,s]of t.idsMap)if((null==e?void 0:e.includes(i))&&s.has(n))return!0;return!1})(t)));if(-1===s)throw new Error(`AG Charts - configuration error, unknown property ${JSON.stringify(t)} in scope(s) ${JSON.stringify(e)}`);return s}extractData(e,t){var i,n,s;const{dataDomain:r,processValue:o,scopes:a,allScopesHaveSameDefs:l}=this.initDataDomainProcessor(),c=new Map(null==t?void 0:t.map(e=>[e.id,e])),{keys:h,values:d}=this,u=new Array(e.length);let p=0,g=0;for(const[t,r]of e.entries()){const e={},f=a.size>0?new Set(a):void 0,m=new Array(h.length);let y,C=0;for(const e of h){if(y=o(e,r,y),y===Zc)break;m&&(m[C++]=y)}if(y===Zc)continue;const b=d.length>0?new Array(d.length):void 0;let S;for(const[h,u]of d.entries()){for(const s of null!=(i=u.scopes)?i:a){const i=c.get(s);if(S=o(u,null!=(n=null==i?void 0:i.data[t])?n:r,S,s),S!==Zc&&b){if(null!=i&&!1!==u.includeProperty){const t=u.includeProperty&&null!=u.id?u.id:u.property;null!=e[s]||(e[s]={}),e[s][t]=S}b[h]=S}}if(S===Zc){if(l)break;for(const e of null!=(s=u.scopes)?s:a)null==f||f.delete(e);if(0===(null==f?void 0:f.size))break}}if(S===Zc&&l)continue;if(0===(null==f?void 0:f.size))continue;const w={datum:v(v({},r),e),keys:m,values:b};!l&&f&&f.size<a.size&&(g++,w.validScopes=new Set(f)),u[p++]=w}u.length=p;const f=e=>{const t=r.get(e),i=t.getDomain();return Kc.is(t)&&i[0]>i[1]?[]:i};return{type:"ungrouped",input:{count:e.length},data:u,domain:{keys:h.map(f),values:d.map(f)},defs:{allScopesHaveSameDefs:l,keys:h,values:d},partialValidDataCount:g,time:0}}groupData(e,t){var i;const n=new Map;for(const s of e.data){const{keys:e,values:r,datum:o,validScopes:a}=s,l=null!=(i=null==t?void 0:t(s))?i:e,c=$c(l);if(n.has(c)){const e=n.get(c);if(e.values.push(r),e.datum.push(o),null!=a&&null!=e.validScopes)for(const t of e.validScopes)a.has(t)||e.validScopes.delete(t)}else n.set(c,{keys:l,values:[r],datum:[o],validScopes:a})}const s=new Array(n.size),r=new Array(n.size);let o=0;for(const{keys:e,values:t,datum:i,validScopes:a}of n.values())0!==(null==a?void 0:a.size)&&(r[o]=e,s[o++]={keys:e,values:t,datum:i,validScopes:a});return y(v({},e),{type:"grouped",data:s,domain:y(v({},e.domain),{groups:r})})}aggregateData(e){var t,i,n,s,r,o;const a="ungrouped"===e.type;e.domain.aggValues=[];for(const[l,c]of this.aggregates.entries()){const h=this.valueGroupIdxLookup(c),d=[1/0,-1/0];for(const u of e.data){if(null!=u.aggValues||(u.aggValues=new Array(this.aggregates.length)),u.validScopes)continue;const e=a?[u.values]:u.values;let p=null!=(i=null==(t=c.groupAggregateFunction)?void 0:t.call(c))?i:[1/0,-1/0];for(const t of e){const e=h.map(e=>t[e]),i=c.aggregateFunction(e,u.keys);i&&(p=null!=(s=null==(n=c.groupAggregateFunction)?void 0:n.call(c,i,p))?s:Kc.extendDomain(i,p))}const g=(null!=(o=null==(r=c.finalFunction)?void 0:r.call(c,p))?o:p).map(e=>Yc(e));u.aggValues[l]=g,Kc.extendDomain(g,d)}e.domain.aggValues.push(d)}}postProcessGroups(e){var t,i;const{groupProcessors:n}=this,s=new Set,r=new Map,o=new Map,a=new Map;for(const e of n){const t=this.valueGroupIdxLookup(e);o.set(e,t),a.set(e,e.adjust());for(const e of t){const t="category"===this.values[e].valueType;s.add(e),r.set(e,t?new jc:new Kc)}}const l=e=>{var t;for(const i of s)null==(t=r.get(i))||t.extend(e[i])};for(const s of e.data){for(const r of n){if(s.validScopes)continue;const n=null!=(t=o.get(r))?t:[],l=null==(i=a.get(r))?void 0:i();if(l)if("grouped"===e.type)for(const e of s.values)e&&l(e,n);else s.values&&l(s.values,n)}if("grouped"===e.type)for(const e of s.values)l(e);else l(s.values)}for(const[t,i]of r)e.domain.values[t]=i.getDomain()}postProcessProperties(e){for(const{adjust:t,property:i,scopes:n}of this.propertyProcessors)t()(e,this.valueIdxLookup(n,i))}reduceData(e){var t;null!=e.reduced||(e.reduced={});for(const i of this.reducers){const n=i.reducer();let s=i.initialValue;for(const r of e.data)r.validScopes&&!(null==(t=i.scopes)?void 0:t.some(e=>{var t;return null==(t=r.validScopes)?void 0:t.has(e)}))||(s=n(s,r));e.reduced[i.property]=s}}postProcessData(e){null!=e.reduced||(e.reduced={});for(const t of this.processors)e.reduced[t.property]=t.calculate(e)}initDataDomainProcessor(){const{keys:e,values:t}=this,i=new Set;for(const e of t)if(e.scopes)for(const t of e.scopes)i.add(t);const n=new Map,s=new Map;let r=!0;const o=()=>{var s;for(const o of P(e,t))"category"===o.valueType?n.set(o,new jc):(n.set(o,new Kc),r&&(r=(null!=(s=o.scopes)?s:[]).length===i.size))};o();const a=this.buildAccessors(P(e,t));return{dataDomain:n,processValue:(e,t,i,r)=>{var l,c,h,d,u;let p,g;if(a.has(e.property)){try{g=a.get(e.property)(t)}catch(e){}p=null!=g}else p=e.property in t,g=p?t[e.property]:e.missingValue;if(null!=e.forceValue&&(g=p&&$n(g)?-1*e.forceValue:e.forceValue,p=!0),!p&&!("missingValue"in e)){const t=null!=(l=e.missing.get(r))?l:0;e.missing.set(r,t+1)}if(n.has(e)||o(),p&&null!=(h=null==(c=e.validation)?void 0:c.call(e,g,t))&&!h){if(!("invalidValue"in e))return"integrated"!==this.mode&&O.warnOnce(`invalid value of type [${typeof g}] ignored:`,`[${g}]`),Zc;g=e.invalidValue}return e.processor&&(s.has(e)||s.set(e,e.processor()),g=null==(d=s.get(e))?void 0:d(g,i===Zc?void 0:i)),null==(u=n.get(e))||u.extend(g),g},initDataDomain:o,scopes:i,allScopesHaveSameDefs:r}}buildAccessors(e){const t=new Map;if("integrated"===this.mode)return t;for(const i of e){if(!i.property.includes(".")&&!i.property.includes("["))continue;let e;e=i.property.startsWith("[")?`return datum${i.property};`:`return datum.${i.property};`,t.set(i.property,new Function("datum",e))}return t}},Jc=class e{constructor(e){this.mode=e,this.debug=Rn.create(!0,"data-model"),this.requested=[],this.status="setup"}request(e,t,i){return x(this,null,function*(){if("setup"!==this.status)throw new Error("AG Charts - data request after data setup phase.");return new Promise((n,s)=>{this.requested.push({id:e,opts:i,data:t,resolve:n,reject:s})})})}execute(){if("setup"!==this.status)throw new Error("AG Charts - data request after data setup phase.");this.status="executed",this.debug("DataController.execute() - requested",this.requested);const e=this.validateRequests(this.requested);this.debug("DataController.execute() - validated",e);const t=this.mergeRequested(e);this.debug("DataController.execute() - merged",t),this.debug.check()&&(xn().processedData=[]);const i=this.requested.map(({id:e})=>e),n=this.hasMultipleDataSources(e);for(const{opts:s,data:r,resolves:o,rejects:a,ids:l}of t)try{const t=new Qc(s,this.mode),c=t.processData(r,e);this.debug.check()&&xn("processedData").push(c),0===(null==c?void 0:c.partialValidDataCount)?o.forEach((e,s)=>e({dataModel:t,processedData:this.processScopedData(l[s],c,i,n)})):c?this.splitResult(t,c,l,o):a.forEach(e=>e(new Error("AG Charts - no processed data generated")))}catch(e){a.forEach(t=>t(e))}}hasMultipleDataSources(e){if(e.length){const[{data:t},...i]=e;return i.some(e=>t!==e.data)}return!1}processScopedData(e,t,i,n){const s=t=>{if(Array.isArray(t))return t.map(s);const r=n?v(v({},t),t[e]):t;for(const e of i)delete r[e];return r},r=t=>{var i;return Array.isArray(t)?t.map(r):null!=(i=null==t?void 0:t[e])?i:t};return y(v({},t),{data:t.data.map(e=>{var t;return y(v({},e),{datum:s(e.datum),values:n?null==(t=e.values)?void 0:t.map(r):e.values})})})}validateRequests(e){const t=[];for(const[i,n]of e.entries())i>0&&n.data.length!==e[0].data.length&&!1===n.opts.groupByData?n.reject(new Error("all series[].data arrays must be of the same length and have matching keys.")):t.push(n);return t}mergeRequested(t){const i=[];for(const n of t){const t=i.find(e.groupMatch(n));t?t.push(n):i.push([n])}return i.map(e.mergeRequests)}splitResult(e,t,i,n){for(let s=0;s<i.length;s++){const r=i[s];(0,n[s])({dataModel:e,processedData:y(v({},t),{data:t.data.filter(({validScopes:e})=>{var t;return null==(t=null==e?void 0:e.has(r))||t})})})}}static groupMatch({data:e,opts:t}){function i(e){return e.filter(e=>"key"===e.type).map(e=>e.property).join(";")}return([n])=>(!1===t.groupByData||n.data===e)&&n.opts.groupByKeys===t.groupByKeys&&n.opts.groupByFn===t.groupByFn&&i(n.opts.props)===i(t.props)}static mergeRequests(t){return t.reduce((t,i)=>{var n,s,{id:r,data:o,resolve:a,reject:l,opts:c}=i,h=c,{props:d}=h,u=C(h,["props"]);t.ids.push(r),t.rejects.push(l),t.resolves.push(a),null!=t.data||(t.data=o),null!=t.opts||(t.opts=y(v({},u),{props:[]}));for(const i of d){const o=y(v({},i),{scopes:[r]});e.createIdsMap(r,o);const a=t.opts.props.find(t=>t.type===o.type&&e.deepEqual(t,o));a?(null!=a.scopes||(a.scopes=[]),a.scopes.push(...null!=(n=o.scopes)?n:[]),"key"!==a.type&&"value"!==a.type||!(null==(s=o.idsMap)?void 0:s.size)||e.mergeIdsMap(o.idsMap,a.idsMap)):t.opts.props.push(o)}return t},{ids:[],rejects:[],resolves:[],data:null,opts:null})}static mergeIdsMap(e,t){for(const[i,n]of e)if(t.has(i))for(const e of n)t.get(i).add(e);else t.set(i,new Set(n))}static createIdsMap(e,t){null!=t.id&&(null!=t.idsMap||(t.idsMap=new Map),t.idsMap.has(e)?t.idsMap.get(e).add(t.id):t.idsMap.set(e,new Set([t.id])))}static deepEqual(t,i){if(t===i)return!0;if(t&&i&&"object"==typeof t&&"object"==typeof i){if(t.constructor!==i.constructor)return!1;let n,s;if(Array.isArray(t)){if(s=t.length,s!==i.length)return!1;for(n=s-1;n>=0;n--)if(!e.deepEqual(t[n],i[n]))return!1;return!0}const r=Object.keys(t);if(s=r.length,s!==Object.keys(i).length)return!1;for(n=s-1;n>=0;n--){const s=r[n];if(!(e.skipKeys.has(s)||Object.hasOwn(i,s)&&e.deepEqual(t[s],i[s])))return!1}return!0}return!1}};Jc.skipKeys=new Set(["id","idsMap","type","scopes"]);var eh=Jc,th=class e extends oc{constructor(e){super(),this.chart=e}subscribe(t=e.DEFAULT_GROUP){let i=this.get(t);return i||(i=new Set,e.chartsGroups.set(t,i)),i.add(this.chart),this}unsubscribe(t=e.DEFAULT_GROUP){var i;return null==(i=this.get(t))||i.delete(this.chart),this}getChart(){return this.chart}getGroup(t=e.DEFAULT_GROUP){const i=this.get(t);return i?Array.from(i):[]}getGroupSiblings(t=e.DEFAULT_GROUP){return this.getGroup(t).filter(e=>e!==this.chart)}get(t){return e.chartsGroups.get(t)}};th.chartsGroups=new Map,th.DEFAULT_GROUP=Symbol("sync-group-default");var ih=th,nh=class extends oc{constructor(){super(...arguments),this.axisZoomManagers=new Map,this.state=new wc(void 0,"initial"),this.rejectCallbacks=new Map}updateAxes(e){var t;const i=new Map(e.map(e=>[e.id,this.axisZoomManagers.get(e.id)]));this.axisZoomManagers.clear();for(const n of e)this.axisZoomManagers.set(n.id,null!=(t=i.get(n.id))?t:new sh(n));this.state.size>0&&e.length>0&&this.updateZoom(this.state.stateId(),this.state.stateValue())}updateZoom(e,t,i=!0,n){var s;if(n&&this.rejectCallbacks.set(e,n),0===this.axisZoomManagers.size){const r=this.state.stateId();return void("initial"===r||r===e||i?(this.state.set(e,t),r!==e&&(null==(s=this.rejectCallbacks.get(r))||s(e))):null==n||n(r))}this.state.set(e,t),this.axisZoomManagers.forEach(i=>{i.updateZoom(e,null==t?void 0:t[i.getDirection()])}),this.applyChanges(e)}updateAxisZoom(e,t,i){var n;null==(n=this.axisZoomManagers.get(t))||n.updateZoom(e,i),this.applyChanges(e)}fireZoomPanStartEvent(e){this.listeners.dispatch("zoom-pan-start",{type:"zoom-pan-start",callerId:e})}getZoom(){let e,t;if(this.axisZoomManagers.forEach(i=>{"x"===i.getDirection()?null!=e||(e=i.getZoom()):"y"===i.getDirection()&&(null!=t||(t=i.getZoom()))}),e||t)return{x:e,y:t}}getAxisZoom(e){var t,i;return null!=(i=null==(t=this.axisZoomManagers.get(e))?void 0:t.getZoom())?i:{min:0,max:1}}getAxisZooms(){const e={};for(const[t,i]of this.axisZoomManagers.entries())e[t]={direction:i.getDirection(),zoom:i.getZoom()};return e}applyChanges(e){if(!Array.from(this.axisZoomManagers.values(),e=>e.applyChanges()).some(Boolean))return;const t={};for(const[e,i]of this.axisZoomManagers.entries())t[e]=i.getZoom();this.listeners.dispatch("zoom-change",y(v({type:"zoom-change"},this.getZoom()),{axes:t,callerId:e}))}},sh=class{constructor(e){this.axis=e;const[t=0,i=1]=e.visibleRange;this.state=new wc({min:t,max:i}),this.currentZoom=this.state.stateValue()}getDirection(){return this.axis.direction}updateZoom(e,t){this.state.set(e,t)}getZoom(){return xt(this.state.stateValue())}applyChanges(){const e=this.currentZoom;return this.currentZoom=this.state.stateValue(),e.min!==this.currentZoom.min||e.max!==this.currentZoom.max}},rh=class extends yt{constructor(){super(...arguments),this.enabled=!1}};function oh(e,t){const{bbox:i,showFocusBox:n}=t;if(n&&e.updateFocusIndicatorRect(t.bbox),void 0!==i){const{x:e,y:t}=i.computeCenter();return{type:"keyboard",offsetX:e,offsetY:t}}}S([$s(Js)],rh.prototype,"enabled",2),S([$s(ir)],rh.prototype,"tabIndex",2);var ah=["top","right","bottom","left"],lh=["category","grouped-category","ordinal-time","number","log","time"],ch=class{constructor(){this.result=[],this.valid=[],this.invalid=[]}push(e,t){const{result:i,valid:n,invalid:s}=this;var r;(function(e){return lh.includes(e.type)})(t)&&("string"==typeof(r=t.position)&&ah.includes(r)?n.push(e):s.push(e)),i.push(e)}guessInvalidPositions(){const e=this.valid.filter(e=>lh.includes(e.type)).map(e=>e.position).filter(e=>void 0!==e),t=["top","right","bottom","left"];for(const i of this.invalid){let n=t.pop();for(;e.includes(n)&&void 0!==n;)n=t.pop();if(void 0===n)break;i.position=n}return this.result}},hh=["direction","xKey","yKey","sizeKey","angleKey","radiusKey","normalizedTo","stacked","grouped","stackGroup"],dh=class extends ga{applyOptions(e){for(const t of this.moduleMap.values())t.module.optionsKey in e&&bt(t.moduleInstance)&&t.moduleInstance.set(e[t.module.optionsKey])}*legends(){for(const{module:e,moduleInstance:t}of this.moduleMap.values())"legend"===e.type&&(yield{legendType:e.identifier,legend:t})}},uh="ag-chart-overlay",ph="ag-chart-dark-overlay",gh=class extends yt{constructor(e,t){super(),this.className=e,this.defaultText=t,this.darkTheme=!1}getText(){var e;return null!=(e=this.text)?e:this.defaultText}getElement(e,t){null!=this.element||(this.element=En("div",uh,{position:"absolute"})),this.element.classList.toggle(ph,this.darkTheme),this.focusBox=t;const i=this.element;if(i.style.left=`${t.x}px`,i.style.top=`${t.y}px`,i.style.width=`${t.width}px`,i.style.height=`${t.height}px`,this.renderer){const e=this.renderer();e instanceof HTMLElement?i.replaceChildren(e):i.innerHTML=e}else{const t=En("div",{display:"flex",alignItems:"center",justifyContent:"center",boxSizing:"border-box",height:"100%",margin:"8px",font:"12px Verdana, sans-serif"});t.innerText=this.getText(),i.replaceChildren(t),null==e||e.animate({from:0,to:1,id:"overlay",phase:"add",groupId:"opacity",onUpdate(e){i.style.opacity=String(e)},onStop(){i.style.opacity="1"}})}return this.element}removeElement(e){if(this.element){if(e){const{element:t}=this;e.animate({from:1,to:0,phase:"remove",id:"overlay",groupId:"opacity",onUpdate(e){t.style.opacity=String(e)},onStop(){t.remove()}})}else this.element.remove();this.element=void 0,this.focusBox=void 0}}};S([$s(tr,{optional:!0})],gh.prototype,"text",2),S([$s(er,{optional:!0})],gh.prototype,"renderer",2),S([$s(Js)],gh.prototype,"darkTheme",2);var fh=class extends yt{constructor(){super(...arguments),this.loading=new gh("ag-chart-loading-overlay","Loading data..."),this.noData=new gh("ag-chart-no-data-overlay","No data to display"),this.noVisibleSeries=new gh("ag-chart-no-visible-series","No visible series")}getFocusInfo(){for(const e of[this.loading,this.noData,this.noVisibleSeries])if(void 0!==e.focusBox)return{text:e.getText(),rect:e.focusBox}}destroy(){this.loading.removeElement(),this.noData.removeElement(),this.noVisibleSeries.removeElement()}};S([$s(Zs)],fh.prototype,"loading",2),S([$s(Zs)],fh.prototype,"noData",2),S([$s(Zs)],fh.prototype,"noVisibleSeries",2);var mh=`\n.${uh} {\n    color: #181d1f;\n}\n\n.${uh}.${ph} {\n    color: #ffffff;\n}\n\n.${uh}--loading {\n    color: rgb(140, 140, 140); /* DEFAULT_MUTED_LABEL_COLOUR */\n}\n\n.${uh}__loading-background {\n    background: white; /* DEFAULT_BACKGROUND_FILL */\n}\n\n.${uh}.${ph} .${uh}__loading-background {\n    background: #192232; /* DEFAULT_DARK_BACKGROUND_FILL */\n}\n`;function vh(e,t=[0,0]){for(const i of e)"number"==typeof i&&(i<0&&(t[0]+=i),i>0&&(t[1]+=i));return t}function yh(e,t){return{id:e,matchGroupIds:[t],type:"aggregate",aggregateFunction:e=>vh(e)}}function Ch(e,t){return{id:e,type:"aggregate",matchGroupIds:t?[t]:void 0,aggregateFunction:e=>vh(e),groupAggregateFunction:(e,t=[0,0])=>{var i,n;return t[0]+=null!=(i=null==e?void 0:e[0])?i:0,t[1]+=null!=(n=null==e?void 0:e[1])?n:0,t}}}function bh(e,t){return{id:e,matchGroupIds:[t],type:"aggregate",aggregateFunction:e=>Kc.extendDomain(e)}}function Sh(e){return{id:e,type:"aggregate",aggregateFunction:()=>[0,1],groupAggregateFunction:(e,t=[0,0])=>{var i,n;return t[0]+=null!=(i=null==e?void 0:e[0])?i:0,t[1]+=null!=(n=null==e?void 0:e[1])?n:0,t}}}function wh(e,t){return{id:e,matchGroupIds:t?[t]:void 0,type:"aggregate",aggregateFunction:e=>vh(e),groupAggregateFunction:(e,t=[0,0,-1])=>{var i,n;return t[0]+=null!=(i=null==e?void 0:e[0])?i:0,t[1]+=null!=(n=null==e?void 0:e[1])?n:0,t[2]++,t},finalFunction:(e=[0,0,0])=>{const t=e[0]+e[1];return t>=0?[0,t/e[2]]:[t/e[2],0]}}}function xh(e,t,i){const n={id:e,matchGroupIds:i?[i]:void 0,type:"aggregate",aggregateFunction:(e,i=[])=>{const n=i[1]-i[0];return t.aggregateFunction(e).map(e=>e/n)}};return t.groupAggregateFunction&&(n.groupAggregateFunction=t.groupAggregateFunction),n}function Eh(e){return()=>{let t=0;return i=>We(i)?(t+=e?Math.max(0,i):i,t):i}}function Mh(){return()=>{let e=0;return t=>{if(!We(t))return t;const i=e;return e+=t,i}}}var Ah={type:"reducer",property:"smallestKeyInterval",initialValue:1/0,reducer:()=>{let e=NaN;return(t=1/0,i)=>{const n=i.keys[0],s=Math.abs(n-e);return e=n,!isNaN(s)&&s>0&&s<t?s:t}}},Th={type:"processor",property:"sortedGroupDomain",calculate:({domain:{groups:e}})=>null==e?void 0:e.slice().sort((e,t)=>{for(let i=0;i<e.length;i++){const n=e[i]-t[i];if(0!==n)return n}return 0})};function Dh({normaliseTo:e,mode:t}){const i=(t,i)=>{const n=t*e/i;return n>=0?Math.min(e,n):Math.max(-e,n)};return()=>()=>(e,n)=>{const s=[0,0];for(const i of n){const n=e[i],r=n<0?0:1;"sum"===t?s[r]+=n:s[r]=0===r?Math.min(s[r],n):Math.max(s[r],n)}const r=Math.max(Math.abs(s[0]),s[1]);for(const t of n)e[t]=i(e[t],r)}}function Ih(e,t,i="sum"){return{type:"group-value-processor",matchGroupIds:e,adjust:Po({normaliseTo:t,mode:i},Dh)}}function Rh({normaliseTo:e,zeroDomain:t,rangeMin:i,rangeMax:n}){const s=e[1]-e[0],r=(i,n,r)=>{const o=e[0]+(i-n)/r*s;return 0===r?t:o>=e[1]?e[1]:o<e[0]?e[0]:o};return()=>(t,s)=>{let[o,a]=t.domain.values[s];null!=i&&(o=i),null!=n&&(a=n);const l=a-o;t.domain.values[s]=[e[0],e[1]];for(const e of t.data){let i=e.values;"ungrouped"===t.type&&(i=[i]);for(const e of i)e[s]=r(e[s],o,l)}}}function Lh(e,t,i,n,s){return{type:"property-value-processor",property:e,adjust:Po({normaliseTo:t,rangeMin:n,rangeMax:s,zeroDomain:i},Rh)}}function kh(e){return{type:"processor",property:"animationValidation",calculate(t){const{keys:i,values:n}=t.defs,{input:s,data:r}=t;let o=!0,a=!0;const l=[];for(let t=0;t<n.length;t++)(null==e?void 0:e.includes(n[t].id))&&l.push([t,n[t]]);const c=(e,i,n)=>{var l;if("category"===i.valueType){const i=t.domain[n][e];return void(o&&(o=i.length===s.count))}let c=null==(l=r[0])?void 0:l[n][e];for(let t=1;(o||a)&&t<r.length;t++){const i=r[t][n][e];a&&(a=c<=i),o&&(o=c!==i),c=i}};for(let e=0;(o||a)&&e<i.length;e++)c(e,i[e],"keys");for(let e=0;(o||a)&&e<l.length;e++){const[t,i]=l[e];c(t,i,"values")}return{uniqueKeys:o,orderedKeys:a}}}}function Ph({mode:e,separateNegative:t}){return()=>()=>(i,n)=>{const s=[0,0];for(const r of n){const n=i[r],o=$n(n)&&t?0:1;We(n)&&("normal"===e&&(s[o]+=n),i[r]=s[o],"trailing"===e&&(s[o]+=n))}}}function Nh({mode:e,sum:t}){return()=>{const i=[];let n=!0;return()=>(s,r)=>{let o=0;for(const a of r){const r=s[a],l=n&&"current"===t?0:i[a];i[a]=r;const c="current"===t?r:l;We(r)&&We(l)?("normal"===e&&(o+=c),s[a]=o,"trailing"===e&&(o+=c)):s[a]=o}n=!1}}}function Oh(e,t,i,n=!1){let s;return s=t.startsWith("window")?Po({mode:t.endsWith("-trailing")?"trailing":"normal",sum:i},Nh):Po({mode:t,separateNegative:n},Ph),{type:"group-value-processor",matchGroupIds:[e],adjust:s}}function _h(e,t=!0){return{type:"processor",property:"diff",calculate:i=>{const n=new Map,s=new Map,r=new Map,o=new Map,a=Math.max(e.data.length,i.data.length);for(let l=0;l<a;l++){const a=e.data[l],c=i.data[l],h=a?Fh(a.keys):"",d=c?Fh(c.keys):"";c&&a&&h===d?un(a.values,c.values)||r.set(d,c):(o.has(d)?(!t&&un(o.get(d).values,c.values)||(r.set(d,c),n.set(d,c)),o.delete(d)):c&&s.set(d,c),s.has(h)?(!t&&un(s.get(h).values,a.values)||(r.set(h,a),n.set(h,a)),s.delete(h)):a&&(r.delete(h),o.set(h,a)))}return{changed:s.size>0||r.size>0||o.size>0,added:s,updated:r,removed:o,moved:n}}}}function Fh(e,...t){let i;return i=Pe(e)?e.map(e=>qo(e)).join("___"):qo(e),("string"==typeof i||"number"==typeof i||i instanceof Date)&&t.length>0&&(i+=`___${t.join("___")}`),i}var Gh=(e=>(e[e.EXACT_SHAPE_MATCH=0]="EXACT_SHAPE_MATCH",e[e.NEAREST_BY_MAIN_AXIS_FIRST=1]="NEAREST_BY_MAIN_AXIS_FIRST",e[e.NEAREST_BY_MAIN_CATEGORY_AXIS_FIRST=2]="NEAREST_BY_MAIN_CATEGORY_AXIS_FIRST",e[e.NEAREST_NODE=3]="NEAREST_NODE",e))(Gh||{});function Vh(e){return null!=e&&$o(e)}function Bh(e){return null!=e}function Hh(e){switch(e){case"number":case"log":case"ordinal-time":case"time":case"color":return Vh;default:return Bh}}function zh(e){switch(e){case"number":case"log":case"time":case"color":return"range";default:return"category"}}function Uh(e,t,i={}){return v({property:e,type:"key",valueType:zh(t),validation:Hh(t)},i)}function Wh(e,t,i={}){return v({property:e,type:"value",valueType:zh(t),validation:Hh(t)},i)}function jh(e,t={}){const i=t,{min:n=-1/0,max:s=1/0}=i,r=C(i,["min","max"]);return v({type:"value",property:e,valueType:"range",validation:Vh,processor:()=>e=>We(e)?zn(n,e,s):e},r)}function Kh(e,t,i={}){const n=i,{onlyPositive:s}=n,r=C(n,["onlyPositive"]);return y(v({},Wh(e,t,r)),{processor:Eh(s)})}function $h(e,t,i={}){return y(v({},Wh(e,t,i)),{processor:Mh()})}function Yh(e,t,i="current",n,s){return[Wh(e,s,n),Oh(n.groupId,t,i,n.separateNegative),...null!=n.rangeId?[bh(n.rangeId,n.groupId)]:[]]}var qh=class{constructor(e,t,{datum:i},n){this.type=e,this.event=t,this.datum=i,this.seriesId=n.id}},Xh=class{constructor(e,t,i){this.series=e,this.seriesGrouping=t,this.oldGrouping=i,this.type="groupingChanged"}},Zh=class extends Zl{constructor(e){super(),this.destroyFns=[],this.seriesGrouping=void 0,this.NodeEvent=qh,this.internalId=Vn(this),this.rootGroup=new Eo({name:"seriesRoot",isVirtual:!0}),this.axes={x:void 0,y:void 0},this.directions=["x","y"],this.nodeDataRefresh=!0,this.moduleMap=new ga,this._declarationOrder=-1,this.seriesListeners=new nc;const{moduleCtx:t,pickModes:i=[1],directionKeys:n={},directionNames:s={},contentGroupVirtual:r=!0,canHaveAxes:o=!1}=e;this.ctx=t,this.directionKeys=n,this.directionNames=s,this.canHaveAxes=o,this.contentGroup=this.rootGroup.appendChild(new Eo({name:`${this.internalId}-content`,isVirtual:r,zIndex:4,zIndexSubOrder:this.getGroupZIndexSubOrder("data")})),this.highlightGroup=new Eo({name:`${this.internalId}-highlight`,isVirtual:r,zIndex:4,zIndexSubOrder:this.getGroupZIndexSubOrder("highlight")}),this.highlightNode=this.highlightGroup.appendChild(new Eo({name:"highlightNode",zIndex:0})),this.highlightLabel=this.highlightGroup.appendChild(new Eo({name:"highlightLabel",zIndex:10})),this.pickModes=i,this.labelGroup=this.rootGroup.appendChild(new Eo({name:`${this.internalId}-series-labels`,zIndex:8})),this.annotationGroup=new Eo({name:`${this.id}-annotation`,isVirtual:r,zIndex:4,zIndexSubOrder:this.getGroupZIndexSubOrder("annotation")})}get id(){var e,t;return null!=(t=null==(e=this.properties)?void 0:e.id)?t:this.internalId}get type(){var e;return null!=(e=this.constructor.type)?e:""}get data(){var e;return null!=(e=this._data)?e:this._chartData}set visible(e){this.properties.visible=e,this.visibleChanged()}get visible(){return this.properties.visible}get hasData(){return null!=this.data&&this.data.length>0}get tooltipEnabled(){var e,t;return null!=(t=null==(e=this.properties.tooltip)?void 0:e.enabled)&&t}onDataChange(){this.nodeDataRefresh=!0}setOptionsData(e){this._data=e,this.onDataChange()}setChartData(e){this._chartData=e,this.data===e&&this.onDataChange()}onSeriesGroupingChange(e,t){const{internalId:i,type:n,visible:s}=this;e&&this.ctx.seriesStateManager.deregisterSeries({id:i,type:n}),t&&this.ctx.seriesStateManager.registerSeries({id:i,type:n,visible:s,seriesGrouping:t}),this.fireEvent(new Xh(this,t,e))}getBandScalePadding(){return{inner:1,outer:0}}getGroupZIndexSubOrder(e,t=0){let i=0;switch(e){case"data":case"paths":break;case"labels":i+=2e4;break;case"marker":i+=1e4;break;case"highlight":t+=15e3;break;case"annotation":i+=15e3}return[()=>this._declarationOrder+i,t]}addListener(e,t){return this.seriesListeners.addListener(e,t)}dispatch(e,t){this.seriesListeners.dispatch(e,t)}addChartEventListeners(){}destroy(){this.destroyFns.forEach(e=>e()),this.destroyFns=[],this.ctx.seriesStateManager.deregisterSeries(this)}getDirectionValues(e,t){const i=this.resolveKeyDirection(e),n=null==t?void 0:t[i],s=[];if(!n)return s;const r=(...e)=>{for(const t of e)Array.isArray(t)?r(...t):"object"==typeof t?r(...Object.values(t)):s.push(t)};return r(...n.map(e=>this.properties[e])),s}getKeys(e){return this.getDirectionValues(e,this.directionKeys)}getKeyProperties(e){var t;return null!=(t=this.directionKeys[this.resolveKeyDirection(e)])?t:[]}getNames(e){return this.getDirectionValues(e,this.directionNames)}resolveKeyDirection(e){return e}getDomain(e){const t=this.getSeriesDomain(e),i=this.moduleMap.mapModules(t=>t.getDomain(e));return t.concat(i.flat())}markNodeDataDirty(){this.nodeDataRefresh=!0}visibleChanged(){this.ctx.seriesStateManager.registerSeries(this)}getOpacity(){const{dimOpacity:e=1,enabled:t=!0}=this.properties.highlightStyle.series;if(!t||1===e)return 1;switch(this.isItemIdHighlighted()){case 0:case 1:return 1;default:return e}}getStrokeWidth(e){const{strokeWidth:t,enabled:i=!0}=this.properties.highlightStyle.series;if(!i||void 0===t)return e;switch(this.isItemIdHighlighted()){case 1:return t;case 0:case 2:return e}}isItemIdHighlighted(){var e,t;const i=null==(t=null==(e=this.ctx.highlightManager)?void 0:e.getActiveHighlight())?void 0:t.series;return null==i?0:i!==this?2:1}getModuleTooltipParams(){return this.moduleMap.mapModules(e=>e.getTooltipParams()).reduce((e,t)=>Object.assign(e,t),{})}pickNode(e,t){const{pickModes:i,visible:n,rootGroup:s}=this;if(n&&s.visible)for(const n of i){if(t&&!t.includes(n))continue;let i;switch(n){case 0:i=this.pickNodeExactShape(e);break;case 1:case 2:i=this.pickNodeMainAxisFirst(e,2===n);break;case 3:i=this.pickNodeClosestDatum(e)}if(i)return{pickMode:n,match:i.datum,distance:i.distance}}}pickNodeExactShape(e){const t=this.contentGroup.pickNode(e.x,e.y);if(t&&!0!==t.datum.missing)return{datum:t.datum,distance:0}}pickNodeClosestDatum(e){throw new Error("AG Charts - Series.pickNodeClosestDatum() not implemented")}pickNodeNearestDistantObject(e,t){const i=Qn(e.x,e.y,t);if(void 0!==i.nearest&&!0!==i.nearest.datum.missing)return{datum:i.nearest.datum,distance:Math.sqrt(i.distanceSquared)}}pickNodeMainAxisFirst(e,t){throw new Error("AG Charts - Series.pickNodeMainAxisFirst() not implemented")}fireNodeClickEvent(e,t){this.fireEvent(new this.NodeEvent("nodeClick",e,t,this))}fireNodeDoubleClickEvent(e,t){this.fireEvent(new this.NodeEvent("nodeDoubleClick",e,t,this))}createNodeContextMenuActionEvent(e,t){return new this.NodeEvent("nodeContextMenuAction",e,t,this)}toggleSeriesItem(e,t){this.visible=t,this.nodeDataRefresh=!0,this.dispatch("visibility-changed",{itemId:e,enabled:t})}isEnabled(){return this.visible}getModuleMap(){return this.moduleMap}createModuleContext(){return y(v({},this.ctx),{series:this})}getLabelText(e,t,i=String){var n;return e.formatter&&null!=(n=this.ctx.callbackCache.call(e.formatter,v({seriesId:this.id},t)))?n:i(t.value)}getMarkerStyle(e,t,i=e.getStyle()){var n,s;const r=Xe({size:null!=(s=null==(n=t.datum.point)?void 0:n.size)?s:0},i);return e.formatter?Xe(this.ctx.callbackCache.call(e.formatter,y(v(v({seriesId:this.id},r),t),{datum:t.datum.datum})),r):r}updateMarkerStyle(e,t,i,n=t.getStyle(),{applyTranslation:s=!0}={}){const{point:r}=i.datum,o=this.getMarkerStyle(t,i,n),a=this.visible&&o.size>0&&r&&!isNaN(r.x)&&!isNaN(r.y);s?e.setProperties(y(v({visible:a},o),{translationX:null==r?void 0:r.x,translationY:null==r?void 0:r.y})):e.setProperties(v({visible:a},o)),"function"!=typeof t.shape||e.dirtyPath||(e.path.clear(!0),e.updatePath(),e.checkPathDirty())}getMinRects(e,t){}get nodeDataDependencies(){var e;return null!=(e=this._nodeDataDependencies)?e:{seriesRectWidth:NaN,seriesRectHeight:NaN}}checkResize(e){const{width:t,height:i}=null!=e?e:{width:NaN,height:NaN},n=e?{seriesRectWidth:t,seriesRectHeight:i}:void 0,s=null!=wt(this.nodeDataDependencies,n);return s&&(this._nodeDataDependencies=n,this.markNodeDataDirty()),s}pickFocus(e){}};Zh.highlightedZIndex=1e12,S([Xa({changeValue:function(e,t){this.onSeriesGroupingChange(t,e)}})],Zh.prototype,"seriesGrouping",2);var Qh=class{constructor(e,t,i){this.seriesRoot=e,this.highlightRoot=t,this.annotationRoot=i,this.groups={},this.series={},this.expectedSeriesCount=1,this.mode="normal"}setSeriesCount(e){this.expectedSeriesCount=e}requestGroup(e){var t,i,n;const{internalId:s,type:r,rootGroup:o,highlightGroup:a,annotationGroup:l,seriesGrouping:c}=e,{groupIndex:h=s}=null!=c?c:{};if(null!=this.series[s])throw new Error(`AG Charts - series already has an allocated layer: ${this.series[s]}`);0===Object.keys(this.series).length&&(this.mode=this.expectedSeriesCount>=30?"aggressive-grouping":"normal"),null!=(t=this.groups)[r]||(t[r]={});const d=this.lookupIdx(h);let u=this.groups[r][d];return u||(u=null!=(n=(i=this.groups[r])[d])?n:i[d]={seriesIds:[],group:this.seriesRoot.appendChild(new Eo({name:`${r}-content`,layer:!0,zIndex:4,zIndexSubOrder:e.getGroupZIndexSubOrder("data")})),highlight:this.highlightRoot.appendChild(new Eo({name:`${r}-highlight`,zIndex:4,zIndexSubOrder:e.getGroupZIndexSubOrder("highlight")})),annotation:this.annotationRoot.appendChild(new Eo({name:`${r}-annotation`,zIndex:4,zIndexSubOrder:e.getGroupZIndexSubOrder("annotation")}))}),this.series[s]={layerState:u,seriesConfig:e},u.seriesIds.push(s),u.group.appendChild(o),u.highlight.appendChild(a),u.annotation.appendChild(l),u.group}changeGroup(e){var t,i;const{internalId:n,seriesGrouping:s,type:r,rootGroup:o,highlightGroup:a,annotationGroup:l,oldGrouping:c}=e,{groupIndex:h=n}=null!=s?s:{};(null==(i=null==(t=this.groups[r])?void 0:t[h])?void 0:i.seriesIds.includes(n))||(null!=this.series[n]&&this.releaseGroup({internalId:n,seriesGrouping:c,type:r,rootGroup:o,highlightGroup:a,annotationGroup:l}),this.requestGroup(e))}releaseGroup(e){var t,i,n,s,r;const{internalId:o,seriesGrouping:a,rootGroup:l,highlightGroup:c,annotationGroup:h,type:d}=e,{groupIndex:u=o}=null!=a?a:{};if(null==this.series[o])throw new Error(`AG Charts - series doesn't have an allocated layer: ${o}`);const p=this.lookupIdx(u),g=null!=(n=null==(t=this.groups[d])?void 0:t[p])?n:null==(i=this.series[o])?void 0:i.layerState;if(g&&(g.seriesIds=g.seriesIds.filter(e=>e!==o),g.group.removeChild(l),g.highlight.removeChild(c),g.annotation.removeChild(h)),0===(null==g?void 0:g.seriesIds.length))this.seriesRoot.removeChild(g.group),this.highlightRoot.removeChild(g.highlight),this.annotationRoot.removeChild(g.annotation),delete this.groups[d][p],delete this.groups[d][o];else if((null==g?void 0:g.seriesIds.length)>0){const e=null==(r=this.series[null==(s=null==g?void 0:g.seriesIds)?void 0:s[0]])?void 0:r.seriesConfig;g.group.zIndexSubOrder=null==e?void 0:e.getGroupZIndexSubOrder("data"),g.highlight.zIndexSubOrder=null==e?void 0:e.getGroupZIndexSubOrder("highlight"),g.annotation.zIndexSubOrder=null==e?void 0:e.getGroupZIndexSubOrder("annotation")}delete this.series[o]}lookupIdx(e){return"normal"===this.mode?e:"string"!=typeof e||(e=Number(e.split("-").slice(-1)[0]))?Math.floor(30*zn(0,e/this.expectedSeriesCount,1)):0}destroy(){for(const e of Object.values(this.groups))for(const t of Object.values(e))this.seriesRoot.removeChild(t.group),this.highlightRoot.removeChild(t.highlight),this.annotationRoot.removeChild(t.annotation);this.groups={},this.series={}}},Jh=class{constructor(e,t){this.chartLike=e,this.layoutService=t,this.destroyFns=[],this.destroyFns.push(this.layoutService.addListener("start-layout",e=>this.positionPadding(e.shrinkRect)),this.layoutService.addListener("start-layout",e=>this.positionCaptions(e.shrinkRect)))}destroy(){this.destroyFns.forEach(e=>e())}positionPadding(e){const{padding:t}=this.chartLike;return e.shrink(t.left,"left"),e.shrink(t.top,"top"),e.shrink(t.right,"right"),e.shrink(t.bottom,"bottom"),{shrinkRect:e}}positionCaptions(e){var t,i;const{title:n,subtitle:s,footnote:r}=this.chartLike,o=e.clone(),a=t=>{var i;const n=e.height/10,s=null!=(i=t.lineHeight)?i:t.fontSize*Fo.defaultLineHeightRatio,r=e.width,o=Math.max(s,n);t.computeTextWrap(r,o)},l=e=>"left"===e?o.x:"right"===e?o.x+o.width:("center"!==e&&O.error(`invalid textAlign value: ${e}`),o.x+o.width/2),c=(e,t)=>{const i=o.y;e.node.x=l(e.textAlign),e.node.y=i,e.node.textBaseline="top",a(e);const n=e.node.computeBBox(),s=Math.ceil(n.y-i+n.height+t);o.shrink(s,"top")};if(n.node.visible=n.enabled,s.node.visible=s.enabled,r.node.visible=r.enabled,n.enabled){const{spacing:e=(s.enabled?al.SMALL_PADDING:al.LARGE_PADDING)}=n;c(n,e)}return s.enabled&&c(s,null!=(t=s.spacing)?t:0),r.enabled&&((e,t)=>{const i=o.y+o.height;e.node.x=l(e.textAlign),e.node.y=i,e.node.textBaseline="bottom",a(e);const n=e.node.computeBBox(),s=Math.ceil(i-n.y+t);o.shrink(s,"bottom")})(r,null!=(i=r.spacing)?i:0),{shrinkRect:o}}},ed=class{constructor(e,t,i,n){this.chart=e,this.dataService=t,this.updateService=i,this.zoomManager=n,this.dirtyZoom=!1,this.dirtyDataSource=!1,this.lastAxisZooms=new Map,this.destroyFns=[],this.destroyFns.push(this.dataService.addListener("data-source-change",()=>this.onDataSourceChange()),this.dataService.addListener("data-load",()=>this.onDataLoad()),this.dataService.addListener("data-error",()=>this.onDataError()),this.updateService.addListener("update-complete",()=>this.onUpdateComplete()),this.zoomManager.addListener("zoom-change",()=>this.onZoomChange()))}destroy(){this.destroyFns.forEach(e=>e())}onDataLoad(){this.updateService.update(1)}onDataError(){this.updateService.update(3)}onDataSourceChange(){this.dirtyDataSource=!0}onUpdateComplete(){(this.dirtyZoom||this.dirtyDataSource)&&this.updateWindow().catch(e=>O.errorOnce(e))}onZoomChange(){this.dirtyZoom=!0}updateWindow(){return x(this,null,function*(){if(!this.dataService.isLazy())return;const e=this.getValidAxis();let t,i=!0;if(e){const n=this.zoomManager.getAxisZoom(e.id);t=this.getAxisWindow(e,n),i=this.shouldRefresh(e,n)}this.dirtyZoom=!1,this.dirtyDataSource=!1,i&&this.dataService.load({windowStart:null==t?void 0:t.min,windowEnd:null==t?void 0:t.max})})}getValidAxis(){return this.chart.axes.find(e=>"time"===e.type)}shouldRefresh(e,t){if(this.dirtyDataSource)return!0;if(!this.dirtyZoom)return!1;const i=this.lastAxisZooms.get(e.id);return!(i&&t.min===i.min&&t.max===i.max||(this.lastAxisZooms.set(e.id,t),0))}getAxisWindow(e,t){var i,n;const s=null==(n=(i=e.scale).getDomain)?void 0:n.call(i);if(!t||!s||0===s.length||isNaN(Number(s[0])))return;const r=Number(s[1])-Number(s[0]);return{min:new Date(Number(s[0])+r*t.min),max:new Date(Number(s[0])+r*t.max)}}},td=class{constructor(e,t,i,n,s){this.chartLike=e,this.overlays=t,this.dataService=i,this.layoutService=n,this.animationManager=s,this.destroyFns=[],this.destroyFns.push(this.layoutService.addListener("layout-complete",e=>this.onLayoutComplete(e)))}destroy(){this.destroyFns.forEach(e=>e())}onLayoutComplete({series:{rect:e}}){const t=this.dataService.isLoading(),i=this.chartLike.series.some(e=>e.hasData),n=this.chartLike.series.some(e=>e.visible);this.toggleOverlay(this.overlays.loading,e,t),this.toggleOverlay(this.overlays.noData,e,!t&&!i),this.toggleOverlay(this.overlays.noVisibleSeries,e,i&&!n)}toggleOverlay(e,t,i){if(i){const i=e.getElement(this.animationManager,t);this.chartLike.element.append(i)}else e.removeElement(this.animationManager)}},id=Rn.create(!0,"opts"),nd=class extends yt{constructor(){super(...arguments),this.padding=new Ql(0)}};S([$s(Js,{optional:!0})],nd.prototype,"clip",2),S([$s(Zs)],nd.prototype,"padding",2);var sd=class e extends Zl{constructor(e,t){var i,n;super(),this.id=Vn(this),this.seriesRoot=new Eo({name:`${this.id}-series-root`}),this.highlightRoot=new Eo({name:`${this.id}-highlight-root`,layer:!0,zIndex:5,nonEmptyChildDerivedZIndex:!0}),this.annotationRoot=new Eo({name:`${this.id}-annotation-root`,layer:!0,zIndex:10}),this.debug=Rn.create(),this.extraDebugStats={},this.data=[],this._firstAutoSize=!0,this.padding=new Ql(20),this.seriesArea=new nd,this.title=new al,this.subtitle=new al,this.footnote=new al,this.keyboard=new rh,this.mode="standalone",this.destroyed=!1,this._skipSync=!1,this._destroyFns=[],this.chartAnimationPhase="initial",this.modulesManager=new dh,this.zoomManager=new nh,this.processors=[],this.processedOptions={},this.userOptions={},this.queuedUserOptions=[],this._pendingFactoryUpdatesCount=0,this._performUpdateNoRenderCount=0,this._performUpdateSkipAnimations=!1,this.performUpdateType=7,this.updateShortcutCount=0,this.seriesToUpdate=new Set,this.updateMutex=new Xl,this.updateRequestors={},this.performUpdateTrigger=Jl((e,t=0)=>setTimeout(e,t),e=>x(this,[e],function*({count:e}){this.destroyed||this.updateMutex.acquire(()=>x(this,null,function*(){try{yield this.performUpdate(e)}catch(e){O.error("update error",e)}})).catch(e=>O.errorOnce(e))})),this._performUpdateSplits={},this.axes=[],this.series=[],this.focus={hasFocus:!1,series:void 0,seriesIndex:0,datumIndex:0,datum:void 0},this.pointerScheduler=Jl((e,t)=>requestAnimationFrame(e),()=>{this.lastInteractionEvent&&(this.performUpdateType<=4?this.pointerScheduler.schedule():(this.handlePointer(this.lastInteractionEvent,!1),this.lastInteractionEvent=void 0))}),this.onSeriesNodeClick=e=>{const t=y(v({},e),{type:"seriesNodeClick"});Object.defineProperty(t,"series",{enumerable:!1,get:()=>e.series}),this.fireEvent(t)},this.onSeriesNodeDoubleClick=e=>{const t=y(v({},e),{type:"seriesNodeDoubleClick"});this.fireEvent(t)},this.seriesGroupingChanged=e=>{if(!(e instanceof Xh))return;const{series:t,seriesGrouping:i,oldGrouping:n}=e;null!=t.rootGroup.parent&&this.seriesLayerManager.changeGroup({internalId:t.internalId,type:t.type,rootGroup:t.rootGroup,highlightGroup:t.highlightGroup,annotationGroup:t.annotationGroup,getGroupZIndexSubOrder:e=>t.getGroupZIndexSubOrder(e),seriesGrouping:i,oldGrouping:n})},this.dataProcessListeners=new Set,this.chartOptions=e;let s=null==t?void 0:t.scene;const r=null!=(i=null==t?void 0:t.element)?i:En("div","ag-chart-wrapper",{position:"relative",userSelect:"none"}),o=null==t?void 0:t.container;this.element=r;const a=new Eo({name:"root"});a.visible=!1,a.append(this.seriesRoot),a.append(this.highlightRoot),a.append(this.annotationRoot),this.axisGridGroup=new Eo({name:"Axes-Grids",layer:!0,zIndex:1}),a.appendChild(this.axisGridGroup),this.axisGroup=new Eo({name:"Axes",layer:!0,zIndex:2}),a.appendChild(this.axisGroup),this.sizeMonitor=new ec,this.sizeMonitor.observe(this.element,e=>this.rawResize(e));const{overrideDevicePixelRatio:l}=e.specialOverrides;null!=s||(s=new Yl({pixelRatio:l,canvasPosition:"absolute"})),s.setRoot(a).setContainer(r),this.autoSize=!0,this.tooltip=new ol,this.seriesLayerManager=new Qh(this.seriesRoot,this.highlightRoot,this.annotationRoot);const c=this.ctx=new Uc(this,{scene:s,syncManager:new ih(this),element:r,updateCallback:(e=0,t)=>this.update(e,t),updateMutex:this.updateMutex});this.overlays=new fh,null!=(n=this.overlays.loading).renderer||(n.renderer=()=>function(e,t){const{animationDuration:i}=As.add,n=En("div",`${uh}--loading`,{display:"flex",alignItems:"center",justifyContent:"center",flexDirection:"column",height:"100%",boxSizing:"border-box",font:"13px Verdana, sans-serif",userSelect:"none",animation:`ag-charts-loading ${i*t}ms linear 50ms both`}),s=En("span",{width:"45px",height:"40px",backgroundImage:["linear-gradient(#0000 calc(1 * 100% / 6), #ccc 0 calc(3 * 100% / 6), #0000 0), ","linear-gradient(#0000 calc(2 * 100% / 6), #ccc 0 calc(4 * 100% / 6), #0000 0), ","linear-gradient(#0000 calc(3 * 100% / 6), #ccc 0 calc(5 * 100% / 6), #0000 0)"].join(""),backgroundSize:"10px 400%",backgroundRepeat:"no-repeat",animation:"ag-charts-loading-matrix 1s infinite linear"}),r=En("p",{marginTop:"1em"});r.innerText=e;const o=En("div",`${uh}__loading-background`,{position:"absolute",inset:"0",opacity:"0.5",zIndex:"-1"}),a=En("style");return a.innerText=["@keyframes ag-charts-loading { from { opacity: 0 } to { opacity: 1 } }","@keyframes ag-charts-loading-matrix {","0% { background-position: 0% 0%, 50% 0%, 100% 0%; }","100% { background-position: 0% 100%, 50% 100%, 100% 100%; }","}"].join(" "),n.replaceChildren(a,s,r,o),An(mh,"chartOverlays"),n}(this.overlays.loading.getText(),c.animationManager.defaultDuration)),this.processors=[new Jh(this,c.layoutService),new ed(this,c.dataService,c.updateService,c.zoomManager),new td(this,this.overlays,c.dataService,c.layoutService,c.animationManager)],this.highlight=new Wc,this.container=o;const{All:h}=gc,d=this.getModuleContext(),u=c.regionManager.addRegion("series",this.seriesRoot,this.axisGroup);c.regionManager.addRegion("root",a),this._destroyFns.push(c.dataService.addListener("data-load",e=>{this.data=e.data}),c.scene.attachNode(this.title.node),c.scene.attachNode(this.subtitle.node),c.scene.attachNode(this.footnote.node),this.title.registerInteraction(d,"title"),this.subtitle.registerInteraction(d,"subtitle"),this.footnote.registerInteraction(d,"footnote"),c.interactionManager.addListener("click",e=>this.onClick(e)),c.interactionManager.addListener("dblclick",e=>this.onDoubleClick(e)),u.addListener("hover",e=>this.onMouseMove(e)),u.addListener("leave",e=>this.onLeave(e)),u.addListener("blur",()=>this.onBlur()),u.addListener("tab",e=>this.onTab(e)),u.addListener("nav-vert",e=>this.onNavVert(e)),u.addListener("nav-hori",e=>this.onNavHori(e)),u.addListener("submit",e=>this.onSubmit(e)),c.keyNavManager.addListener("browserfocus",e=>this.onBrowserFocus(e)),c.interactionManager.addListener("page-left",()=>this.destroy()),c.interactionManager.addListener("contextmenu",e=>this.onContextMenu(e),h),c.animationManager.addListener("animation-start",()=>this.onAnimationStart()),c.animationManager.addListener("animation-frame",()=>{this.update(6)}),c.highlightManager.addListener("highlight-change",e=>this.changeHighlightDatum(e)),c.zoomManager.addListener("zoom-pan-start",()=>this.resetPointer()),c.zoomManager.addListener("zoom-change",()=>{this.resetPointer(),this.series.map(e=>{var t;return null==(t=e.animationState)?void 0:t.transition("updateData")});const e="initial"!==this.chartAnimationPhase;this.update(3,{forceNodeDataRefresh:!0,skipAnimations:e})}))}static getInstance(t){return e.chartsInstances.get(t)}get canvasElement(){return this.ctx.scene.canvas.element}getCanvasDataURL(e){return this.ctx.scene.getDataURL(e)}onAutoSizeChange(e){const{style:t}=this.element;if(e){if(t.display="block",t.width="100%",t.height="100%",!this._lastAutoSize)return;this.resize(void 0,void 0,"autoSize option")}else t.display="inline-block",t.width="auto",t.height="auto"}download(e,t){this.ctx.scene.download(e,t)}getOptions(){var e;return null!=(e=this.queuedUserOptions.at(-1))?e:this.userOptions}getModuleContext(){return this.ctx}getAriaLabel(){var e;const t=[this.title,this.subtitle,this.footnote].filter(e=>e.enabled&&e.text).map(e=>e.text).join(". ");return`chart, ${null!=(e=this.series.length)?e:0} series, ${t}`}resetAnimations(){this.chartAnimationPhase="initial";for(const e of this.series)e.resetAnimation(this.chartAnimationPhase);for(const e of this.axes)e.resetAnimation(this.chartAnimationPhase);this.animationRect=void 0,this.ctx.animationManager.reset()}skipAnimations(){this.ctx.animationManager.skipCurrentBatch(),this._performUpdateSkipAnimations=!0}destroy(e){if(this.destroyed)return;const t=null==e?void 0:e.keepTransferableResources;let i;return this.performUpdateType=7,this._destroyFns.forEach(e=>e()),this.processors.forEach(e=>e.destroy()),this.tooltip.destroy(),this.overlays.destroy(),this.sizeMonitor.unobserve(this.element),this.modulesManager.destroy(),t?(this.ctx.scene.strip(),i={container:this.container,scene:this.ctx.scene,element:this.element}):(this.ctx.scene.destroy(),this.container=void 0),this.destroySeries(this.series),this.seriesLayerManager.destroy(),this.axes.forEach(e=>e.destroy()),this.axes=[],this.animationRect=void 0,this.ctx.destroy(),this.zoomManager.destroy(),this.destroyed=!0,Object.freeze(this),i}resetPointer(e=!1){e||this.ctx.tooltipManager.removeTooltip(this.id),this.ctx.highlightManager.updateHighlight(this.id),this.lastInteractionEvent=void 0}requestFactoryUpdate(e){this.destroyed||(this._pendingFactoryUpdatesCount++,this.updateMutex.acquire(()=>x(this,null,function*(){this.destroyed||(yield e(this),this.destroyed||this._pendingFactoryUpdatesCount--)})).catch(e=>O.errorOnce(e)))}update(e=0,t){var i,n;const{forceNodeDataRefresh:s=!1,skipAnimations:r,seriesToUpdate:o=this.series,newAnimationBatch:a}=null!=t?t:{};s&&this.series.forEach(e=>e.markNodeDataDirty());for(const e of o)this.seriesToUpdate.add(e);if(r&&(this.ctx.animationManager.skipCurrentBatch(),this._performUpdateSkipAnimations=!0),a&&this.ctx.animationManager.isActive()&&(this._performUpdateSkipAnimations=!0),this._skipSync=null!=(i=null==t?void 0:t.skipSync)&&i,this.debug.check()){let t=null!=(n=(new Error).stack)?n:"<unknown>";t=t.replace(/\([^)]*/g,""),this.updateRequestors[t]=e}e<this.performUpdateType&&(this.performUpdateType=e,this.performUpdateTrigger.schedule(null==t?void 0:t.backOffMs))}performUpdate(e){return x(this,null,function*(){const{performUpdateType:t,extraDebugStats:i,_performUpdateSplits:n,ctx:s}=this,r=[...this.seriesToUpdate];this.performUpdateType=7,this.seriesToUpdate.clear(),0===this.updateShortcutCount&&t<6&&(s.animationManager.startBatch(this._performUpdateSkipAnimations),s.animationManager.onBatchStop(()=>this.chartAnimationPhase="ready")),this.debug("Chart.performUpdate() - start",Hc[t]);let o=performance.now();null!=n.start||(n.start=o);const a=e=>{null!=n[e]||(n[e]=0),n[e]+=performance.now()-o,o=performance.now()};let l=!1;switch(t){case 0:this.updateDOM();case 1:yield this.updateData(),a("⬇️");case 2:yield this.processData(),this.resetPointer(!0),a("🏭");case 3:if(this.checkUpdateShortcut(3))break;if(!this.checkFirstAutoSize(r)){l=!0;break}yield this.processLayout(),a("⌖");case 4:if(this.checkUpdateShortcut(4))break;const{seriesRect:e}=this;yield Promise.all(r.map(t=>t.update({seriesRect:e}))),a("🤔");case 5:if(this.checkUpdateShortcut(5))break;const o=s.tooltipManager.getTooltipMeta(this.id);t<=4&&null!=(null==o?void 0:o.lastPointerEvent)&&this.handlePointer(o.lastPointerEvent,!0),a("↖");case 6:if(this.checkUpdateShortcut(6))break;s.animationManager.endBatch(),i.updateShortcutCount=this.updateShortcutCount,yield s.scene.render({debugSplitTimes:n,extraDebugStats:i}),this.ctx.regionManager.updateFocusWrapperRect(),this.extraDebugStats={};for(const e in n)delete n[e];case 7:this.updateShortcutCount=0,this.updateRequestors={},this._performUpdateSkipAnimations=!1,s.animationManager.endBatch()}l||s.updateService.dispatchUpdateComplete(this.getMinRects());const c=performance.now();this.debug("Chart.performUpdate() - end",{chart:this,durationMs:Math.round(100*(c-n.start))/100,count:e,performUpdateType:Hc[t]})})}updateThemeClassName(){const{element:e,processedOptions:{theme:t}}=this,i="ag-charts-theme-",n=[`${i}default`,`${i}default-dark`];let s=n[0],r=!1;"string"==typeof t?(s=t.replace("ag-",i),r=t.includes("-dark")):"string"==typeof(null==t?void 0:t.baseTheme)&&(s=t.baseTheme.replace("ag-",i),r=t.baseTheme.includes("-dark")),n.includes(s)||(s=r?n[1]:n[0]),e.classList.forEach(t=>{t.startsWith(i)&&t!==s&&e.classList.remove(t)}),e.classList.add(s)}updateDOM(){this.updateThemeClassName();const{enabled:e,tabIndex:t}=this.keyboard;this.element.tabIndex=e?null!=t?t:0:-1,Qa(this.ctx.scene.canvas.element,"role","figure"),Qa(this.ctx.scene.canvas.element,"aria-label",this.getAriaLabel())}checkUpdateShortcut(e){return this.updateShortcutCount>3?(O.warn("exceeded the maximum number of simultaneous updates (4), discarding changes and rendering",this.updateRequestors),!1):this.performUpdateType<=e&&(this.updateShortcutCount++,!0)}checkFirstAutoSize(e){if(this.autoSize&&!this._lastAutoSize){const t=this._performUpdateNoRenderCount++,i=40*f(t+1,2);if(t<8)return this.update(3,{seriesToUpdate:e,backOffMs:i}),this.debug("Chart.checkFirstAutoSize() - backing off until first size update",i),!1;this.debug("Chart.checkFirstAutoSize() - timeout for first size update.")}return this._performUpdateNoRenderCount=0,!0}onAxisChange(e,t=[]){for(const i of t)e.includes(i)||(i.detachAxis(this.axisGroup,this.axisGridGroup),i.destroy());for(const i of e)(null==t?void 0:t.includes(i))||i.attachAxis(this.axisGroup,this.axisGridGroup)}onSeriesChange(e,t){var i,n;const s=null!=(i=null==t?void 0:t.filter(t=>!e.includes(t)))?i:[];this.destroySeries(s),null==(n=this.seriesLayerManager)||n.setSeriesCount(e.length);for(const i of e){if(null==t?void 0:t.includes(i))continue;null==i.rootGroup.parent&&this.seriesLayerManager.requestGroup(i);const e=this;i.chart={get mode(){return e.mode},get isMiniChart(){return!1},get seriesRect(){return e.seriesRect},placeLabels:()=>e.placeLabels()},i.resetAnimation(this.chartAnimationPhase),this.addSeriesListeners(i),i.addChartEventListeners()}}destroySeries(e){null==e||e.forEach(e=>{e.removeEventListener("nodeClick",this.onSeriesNodeClick),e.removeEventListener("nodeDoubleClick",this.onSeriesNodeDoubleClick),e.removeEventListener("groupingChanged",this.seriesGroupingChanged),e.destroy(),this.seriesLayerManager.releaseGroup(e),e.chart=void 0})}addSeriesListeners(e){this.hasEventListener("seriesNodeClick")&&e.addEventListener("nodeClick",this.onSeriesNodeClick),this.hasEventListener("seriesNodeDoubleClick")&&e.addEventListener("nodeDoubleClick",this.onSeriesNodeDoubleClick),e.addEventListener("groupingChanged",this.seriesGroupingChanged)}updateAllSeriesListeners(){this.series.forEach(e=>{e.removeEventListener("nodeClick",this.onSeriesNodeClick),e.removeEventListener("nodeDoubleClick",this.onSeriesNodeDoubleClick),this.addSeriesListeners(e)})}assignSeriesToAxes(){this.axes.forEach(e=>{e.boundSeries=this.series.filter(t=>t.axes[e.direction]===e)})}assignAxesToSeries(){const e=fn(this.axes,e=>e.direction);this.series.forEach(t=>{t.directions.forEach(i=>{const n=e[i];if(!n)return void O.warnOnce(`no available axis for direction [${i}]; check series and axes configuration.`);const s=t.getKeys(i),r=n.find(e=>!e.keys.length||s.some(t=>e.keys.includes(t)));r?t.axes[i]=r:O.warnOnce(`no matching axis for direction [${i}] and keys [${s}]; check series and axes configuration.`)})})}rawResize({width:e,height:t}){var i;if(!this.autoSize)return;if(e=Math.floor(e),t=Math.floor(t),0===e&&0===t)return;const[n=0,s=0]=null!=(i=this._lastAutoSize)?i:[];n===e&&s===t||(this._lastAutoSize=[e,t],this.resize(void 0,void 0,"SizeMonitor"))}resize(e,t,i){var n,s,r,o;const{scene:a,animationManager:l}=this.ctx;if(null!=e||(e=null!=(s=this.width)?s:this.autoSize?null==(n=this._lastAutoSize)?void 0:n[0]:a.canvas.width),null!=t||(t=null!=(o=this.height)?o:this.autoSize?null==(r=this._lastAutoSize)?void 0:r[1]:a.canvas.height),this.debug(`Chart.resize() from ${i}`,{width:e,height:t,stack:(new Error).stack}),e&&t&&We(e)&&We(t)&&a.resize(e,t)){this.resetPointer(),l.reset();let e=!0;this.autoSize&&this._firstAutoSize&&(e=!1,this._firstAutoSize=!1),this.update(3,{forceNodeDataRefresh:!0,skipAnimations:e})}}updateData(){return x(this,null,function*(){this.series.forEach(e=>e.setChartData(this.data));const e=this.modulesManager.mapModules(e=>{var t;return null==(t=e.updateData)?void 0:t.call(e,{data:this.data})});yield Promise.all(e)})}processData(){return x(this,null,function*(){if(this.series.some(e=>e.canHaveAxes)){this.assignAxesToSeries();const e=this.modulesManager.getModule("sync");(null==e?void 0:e.enabled)?e.syncAxes(this._skipSync):this.assignSeriesToAxes()}const e=new eh(this.mode),t=this.series.map(t=>t.processData(e)),i=this.modulesManager.mapModules(t=>{var i;return null==(i=t.processData)?void 0:i.call(t,{dataController:e})});e.execute(),yield Promise.all([...t,...i]);for(const{legendType:e,legend:t}of this.modulesManager.legends())t.data=this.getLegendData(e,"integrated"!==this.mode);this.dataProcessListeners.forEach(e=>e()),this.dataProcessListeners.clear()})}placeLabels(){const e=[],t=[];for(const i of this.series){if(!i.visible)continue;const n=i.getLabelData();Ua(null==n?void 0:n[0])&&(t.push(n),e.push(i))}const{seriesRect:i}=this,{top:n,right:s,bottom:r,left:o}=this.seriesArea.padding,a=i&&t.length>0?function(e,t,i=5){var n,s;const r=[];e=e.map(e=>e.slice().sort((e,t)=>t.point.size-e.point.size));for(let o=0;o<e.length;o++){const a=r[o]=[],l=e[o];if((null==l?void 0:l.length)&&l[0].label)for(let o=0,c=l.length;o<c;o++){const c=l[o],{point:h,label:d,marker:u}=c,{text:p,width:g,height:f}=d,m=.5*h.size;let v=0,y=0;if(m>0&&null!=c.placement){const e=Wa[c.placement];v=(.5*g+m+i)*e.x,y=(.5*f+m+i)*e.y}const C=h.x-.5*g+v-((null!=(n=null==u?void 0:u.center.x)?n:.5)-.5)*h.size,b=h.y-.5*f+y-((null!=(s=null==u?void 0:u.center.y)?s:.5)-.5)*h.size;t&&!za(t,C,b,g,f)||e.some(e=>e.some(e=>{var t;return Ba(e.point,null==(t=e.marker)?void 0:t.center,C,b,g,f)}))||r.some(e=>e.some(e=>Ha(e,C,b,g,f)))||a.push({index:o,text:p,x:C,y:b,width:g,height:f,datum:c})}}return r}(t,{x:-o,y:-n,width:i.width+o+s,height:i.height+n+r}):[];return new Map(a.map((t,i)=>[e[i],t]))}getLegendData(e,t){var i,n;const s=this.series.filter(e=>e.properties.showInLegend).flatMap(t=>t.getLegendData(e));if(t&&s.every(e=>"category"===e.legendType)){const e={},t=new Map(this.series.map(e=>[e.id,e.type]));for(const{seriesId:r,marker:o,label:a}of s){if(null==o.fill)continue;const s=t.get(r),l=null!=(i=e[s])?i:e[s]={};null!=l[n=a.text]||(l[n]=o.fill),l[a.text]!==o.fill&&O.warnOnce(`legend item '${a.text}' has multiple fill colors, this may cause unexpected behaviour.`)}}return s}processLayout(){return x(this,null,function*(){var e;const t=this.animationRect;yield this.performLayout(),t&&!(null==(e=this.animationRect)?void 0:e.equals(t))&&this.ctx.animationManager.skipCurrentBatch(),this.debug("Chart.performUpdate() - seriesRect",this.seriesRect)})}performLayout(){return x(this,null,function*(){const{width:e,height:t}=this.ctx.scene;let i={shrinkRect:new ts(0,0,e,t)};i=this.ctx.layoutService.dispatchPerformLayout("start-layout",i),i=this.ctx.layoutService.dispatchPerformLayout("before-series",i);const n=this.modulesManager.mapModules(e=>x(this,null,function*(){null!=e.performLayout&&(i=yield e.performLayout(i))}));return yield Promise.all(n),i.shrinkRect})}pickSeriesNode(e,t,i){var n,s;const r=performance.now(),o=t?[0]:void 0,a=[...this.series].reverse();let l;for(const t of a){if(!t.visible||!t.rootGroup.visible)continue;const{match:s,distance:r}=null!=(n=t.pickNode(e,o))?n:{};if(s&&null!=r&&((!l||l.distance>r)&&r<=(null!=i?i:1/0)&&(l={series:t,distance:r,datum:s}),0===r))break}return this.extraDebugStats.pickSeriesNode=Math.round((null!=(s=this.extraDebugStats.pickSeriesNode)?s:0)+(performance.now()-r)),l}onMouseMove(e){this.lastInteractionEvent=e,this.pointerScheduler.schedule(),this.extraDebugStats.mouseX=e.offsetX,this.extraDebugStats.mouseY=e.offsetY,this.update(6)}onLeave(e){this.tooltip.pointerLeftOntoTooltip(e)||(this.resetPointer(),this.update(6),this.ctx.cursorManager.updateCursor("chart"))}onBrowserFocus(e){e.delta>0?(this.focus.datum=void 0,this.focus.series=void 0,this.focus.datumIndex=0,this.focus.seriesIndex=0):(this.focus.datum=void 0,this.focus.series=void 0,this.focus.datumIndex=1/0,this.focus.seriesIndex=1/0)}onAnimationStart(){this.focus.hasFocus&&this.onBlur()}onBlur(){this.ctx.regionManager.updateFocusIndicatorRect(void 0),this.resetPointer(),this.focus.hasFocus=!1}onTab(e){this.handleFocus(),e.consume(),this.focus.hasFocus=!0}onNavVert(e){this.focus.seriesIndex+=e.delta,this.handleFocus(),e.consume()}onNavHori(e){this.focus.datumIndex+=e.delta,this.handleFocus(e.delta),e.consume()}onSubmit(e){const{series:t,datum:i}=this.focus,n=e.sourceEvent.sourceEvent;void 0!==t&&void 0!==i?t.fireNodeClickEvent(n,i):this.fireEvent({type:"click",event:n})}onContextMenu(e){this.ctx.tooltipManager.removeTooltip(this.id);const{Default:t,ContextMenu:i}=gc;this.ctx.interactionManager.getState()&(t|i)&&this.checkSeriesNodeRange(e,()=>{this.ctx.highlightManager.updateHighlight(this.id)})}handleFocus(e){this.focus.hasFocus=!0;const t=this.overlays.getFocusInfo();null==t?this.handleSeriesFocus(null!=e?e:0):(this.ctx.regionManager.updateFocusIndicatorRect(t.rect),this.ctx.ariaAnnouncementService.announceValue(t.text))}handleSeriesFocus(e){const{series:t,seriesRect:i,focus:n}=this,s=t.filter(e=>e.visible);if(0===s.length)return;n.seriesIndex=zn(0,n.seriesIndex,s.length-1),n.series=s[n.seriesIndex];const r=n.series.pickFocus({datumIndex:n.datumIndex,datumIndexDelta:e,seriesRect:i});if(void 0===r)return;const{datum:o,datumIndex:a}=r;n.datumIndex=a,n.datum=o;const l=oh(this.ctx.regionManager,r);if(void 0!==l){this.lastInteractionEvent=l;const e=n.series.getTooltipHtml(o),t=Gc.makeTooltipMeta(this.lastInteractionEvent,o);this.ctx.highlightManager.updateHighlight(this.id,o),this.ctx.tooltipManager.updateTooltip(this.id,t,e),this.ctx.ariaAnnouncementService.announceValue(e.ariaLabel)}}static isHoverEvent(e){return void 0!==e&&"hover"===e.type}handlePointer(t,i){if(16!==this.ctx.interactionManager.getState()||!e.isHoverEvent(t))return;const{lastPick:n,hoverRect:s}=this,{offsetX:r,offsetY:o}=t,a=(e=!1)=>{n&&this.resetPointer(e)};(i?!this.ctx.animationManager.isActive():null==s?void 0:s.containsPoint(r,o))?(this.handlePointerTooltip(t,a),this.handlePointerNode(t)):a()}handlePointerTooltip(e,t){const{lastPick:i,tooltip:n}=this,{range:s}=n,{offsetX:r,offsetY:o}=e;let a;We(s)&&(a=s);const l=this.pickSeriesNode({x:r,y:o},"exact"===s,a);if(!l)return this.ctx.tooltipManager.removeTooltip(this.id),void("tooltip"===this.highlight.range&&t(!0));const c="node"===this.highlight.range||!i||i!==l.datum;let h;c&&(h=l.series.getTooltipHtml(l.datum),"tooltip"===this.highlight.range&&this.ctx.highlightManager.updateHighlight(this.id,l.datum));const d=null!=a,u=this.tooltip.enabled&&l.series.tooltipEnabled,p="exact"===s&&0===l.distance,g=u&&("nearest"===s||d||p)&&(!c||void 0!==h),f=Gc.makeTooltipMeta(e,l.datum);g&&this.ctx.tooltipManager.updateTooltip(this.id,f,h)}handlePointerNode(e){this.checkSeriesNodeRange(e,(e,t)=>{(e.hasEventListener("nodeClick")||e.hasEventListener("nodeDoubleClick"))&&this.ctx.cursorManager.updateCursor("chart","pointer"),"node"===this.highlight.range&&this.ctx.highlightManager.updateHighlight(this.id,t)})||(this.ctx.cursorManager.updateCursor("chart"),"node"===this.highlight.range&&this.ctx.highlightManager.updateHighlight(this.id))}onClick(e){this.checkSeriesNodeClick(e)?this.update(4):this.fireEvent({type:"click",event:e.sourceEvent})}onDoubleClick(e){this.checkSeriesNodeDoubleClick(e)?this.update(4):this.fireEvent({type:"doubleClick",event:e.sourceEvent})}checkSeriesNodeClick(e){return this.checkSeriesNodeRange(e,(t,i)=>t.fireNodeClickEvent(e.sourceEvent,i))}checkSeriesNodeDoubleClick(e){return this.checkSeriesNodeRange(e,(t,i)=>t.fireNodeDoubleClickEvent(e.sourceEvent,i))}checkSeriesNodeRange(e,t){var i;const n=this.pickSeriesNode({x:e.offsetX,y:e.offsetY},!1),s=null==n?void 0:n.datum,r=null==s?void 0:s.series.properties.nodeClickRange;let o;We(r)&&(o=r);let a=this.pickSeriesNode({x:e.offsetX,y:e.offsetY},!0);if(a?this.ctx.highlightManager.updatePicked(this.id,a.datum):this.ctx.highlightManager.updatePicked(this.id),s&&"nearest"===r)return t(s.series,s),!0;if("exact"!==r&&(a=this.pickSeriesNode({x:e.offsetX,y:e.offsetY},!1,o)),!a)return!1;const l=null!=o,c="exact"===r&&0===a.distance;return!(!l&&!c||void 0!==e.pointerHistory&&!(null==(i=e.pointerHistory)?void 0:i.every(e=>{const t={x:e.offsetX,y:e.offsetY},i=this.pickSeriesNode(t,!1,o);return(null==i?void 0:i.datum)===(null==a?void 0:a.datum)})))&&(t(a.series,a.datum),!0)}changeHighlightDatum(e){var t,i;const n=new Set,{series:s,datum:r}=null!=(t=e.currentHighlight)?t:{},{series:o,datum:a}=null!=(i=e.previousHighlight)?i:{};o&&n.add(o),s&&n.add(s),(null==o?void 0:o.properties.cursor)&&a&&this.ctx.cursorManager.updateCursor(o.id),(null==s?void 0:s.properties.cursor)&&r&&this.ctx.cursorManager.updateCursor(s.id,s.properties.cursor),this.lastPick=e.currentHighlight,null==s||null==o?this.update(4):this.update(4,{seriesToUpdate:n})}waitForUpdate(e=1e4,t=!1){return x(this,null,function*(){const i=performance.now();for(this._pendingFactoryUpdatesCount>0&&(yield this.updateMutex.waitForClearAcquireQueue());7!==this.performUpdateType;){if(performance.now()-i>e){const i=`Chart.waitForUpdate() timeout of ${e} reached - first chart update taking too long.`;if(t)throw new Error(i);O.warnOnce(i)}yield ql(50)}yield this.updateMutex.waitForClearAcquireQueue()})}waitForDataProcess(e){return new Promise(t=>{this.dataProcessListeners.add(t),Ue(e)&&setTimeout(()=>{this.dataProcessListeners.has(t)&&(this.dataProcessListeners.delete(t),t())},e)})}getMinRects(){const{width:e,height:t}=this.ctx.scene,i=this.series.map(i=>i.getMinRects(e,t)).filter(ke);if(0===i.length)return;let n=0,s=0,r=0,o=0;for(const{minRect:e,minVisibleRect:t}of i)n=Math.max(n,e.width),s=Math.max(s,e.height),r=Math.max(r,t.width),o=Math.max(o,t.height);const a=new ts(0,0,n,s);let l=a.clone();return r>0&&o>0&&(l=new ts(0,0,r,o)),{minRect:a,minVisibleRect:l}}filterMiniChartSeries(e){return null==e?void 0:e.filter(e=>!1!==e.showInMiniChart)}applyOptions(e){var t,i,n,s,r;const o=this.processedOptions,a=e.diffOptions(o),l=e.userOptions;if(null==a)return;id("AgChartV2.updateDelta() - applying delta",a);const c=Xe(a,o),h=this.applyModules(c);a.listeners&&this.registerListeners(this,a.listeners),At(this,a,{skip:["type","data","series","listeners","theme","legend.listeners","navigator.miniChart.series","navigator.miniChart.label","axes","topology"]});let d=!1,u="no-op";(null==(t=a.series)?void 0:t.length)&&(u=this.applySeries(this,a.series,null==o?void 0:o.series),d=!0),"replaced"===u&&this.resetAnimations(),this.applyAxes(this,c,o,u)&&(d=!0),a.data&&(this.data=a.data),(null==(i=a.legend)?void 0:i.listeners)&&this.modulesManager.isEnabled("legend")&&Object.assign(this.legend.listeners,a.legend.listeners),a.listeners&&this.updateAllSeriesListeners(),this.chartOptions=e,this.processedOptions=c,this.userOptions=Xe(l,this.userOptions);const p=this.modulesManager.getModule("navigator"),g=this.modulesManager.getModule("zoom");(null==p?void 0:p.enabled)||(null==g?void 0:g.enabled)||this.ctx.zoomManager.updateZoom("chart");const f=null==p?void 0:p.miniChart,m=null!=(r=null==(s=null==(n=c.navigator)?void 0:n.miniChart)?void 0:s.series)?r:c.series;!0===(null==f?void 0:f.enabled)&&null!=m?this.applyMiniChartOptions(f,m,c,o):!1===(null==f?void 0:f.enabled)&&(f.series=[],f.axes=[]),An("\n/* Reset */\n\n[class^='ag-charts'],\n[class^='ag-charts']:focus,\n[class^='ag-charts']:after,\n[class^='ag-charts']:before {\n    box-sizing: border-box;\n    outline: none;\n}\n\nbutton[class^='ag-charts'] {\n    background: none;\n    border: 0;\n}\n\n\n\n/* Icons */\n\n[class^='ag-charts-icon'] {\n    display: block;\n    /* speak: none; */\n    mask-size: contain;\n    mask-repeat: no-repeat;\n    background-color: currentColor;\n}\n\n.ag-charts-icon-zoom-in {\n    mask-image: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0IiBmaWxsPSJub25lIiBzdHJva2U9ImN1cnJlbnRDb2xvciIgc3Ryb2tlLXdpZHRoPSIyIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiIGNsYXNzPSJsdWNpZGUgbHVjaWRlLXpvb20taW4iPjxjaXJjbGUgY3g9IjExIiBjeT0iMTEiIHI9IjgiLz48bGluZSB4MT0iMjEiIHgyPSIxNi42NSIgeTE9IjIxIiB5Mj0iMTYuNjUiLz48bGluZSB4MT0iMTEiIHgyPSIxMSIgeTE9IjgiIHkyPSIxNCIvPjxsaW5lIHgxPSI4IiB4Mj0iMTQiIHkxPSIxMSIgeTI9IjExIi8+PC9zdmc+);\n}\n\n.ag-charts-icon-zoom-out {\n    mask-image: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0IiBmaWxsPSJub25lIiBzdHJva2U9ImN1cnJlbnRDb2xvciIgc3Ryb2tlLXdpZHRoPSIyIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiIGNsYXNzPSJsdWNpZGUgbHVjaWRlLXpvb20tb3V0Ij48Y2lyY2xlIGN4PSIxMSIgY3k9IjExIiByPSI4Ii8+PGxpbmUgeDE9IjIxIiB4Mj0iMTYuNjUiIHkxPSIyMSIgeTI9IjE2LjY1Ii8+PGxpbmUgeDE9IjgiIHgyPSIxNCIgeTE9IjExIiB5Mj0iMTEiLz48L3N2Zz4=);\n}\n\n.ag-charts-icon-reset {\n    mask-image: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0IiBmaWxsPSJub25lIiBzdHJva2U9ImN1cnJlbnRDb2xvciIgc3Ryb2tlLXdpZHRoPSIyIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiIGNsYXNzPSJsdWNpZGUgbHVjaWRlLXJvdGF0ZS1jY3ciPjxwYXRoIGQ9Ik0zIDEyYTkgOSAwIDEgMCA5LTkgOS43NSA5Ljc1IDAgMCAwLTYuNzQgMi43NEwzIDgiLz48cGF0aCBkPSJNMyAzdjVoNSIvPjwvc3ZnPg==);\n}\n\n.ag-charts-icon-pan-left {\n    mask-image: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0IiBmaWxsPSJub25lIiBzdHJva2U9ImN1cnJlbnRDb2xvciIgc3Ryb2tlLXdpZHRoPSIyIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiIGNsYXNzPSJsdWNpZGUgbHVjaWRlLWNoZXZyb24tbGVmdCI+PHBhdGggZD0ibTE1IDE4LTYtNiA2LTYiLz48L3N2Zz4=);\n}\n\n.ag-charts-icon-pan-right {\n    mask-image: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0IiBmaWxsPSJub25lIiBzdHJva2U9ImN1cnJlbnRDb2xvciIgc3Ryb2tlLXdpZHRoPSIyIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiIGNsYXNzPSJsdWNpZGUgbHVjaWRlLWNoZXZyb24tcmlnaHQiPjxwYXRoIGQ9Im05IDE4IDYtNi02LTYiLz48L3N2Zz4=);\n}\n\n.ag-charts-icon-pan-start {\n    mask-image: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0IiBmaWxsPSJub25lIiBzdHJva2U9ImN1cnJlbnRDb2xvciIgc3Ryb2tlLXdpZHRoPSIyIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiIGNsYXNzPSJsdWNpZGUgbHVjaWRlLWNoZXZyb24tZmlyc3QiPjxwYXRoIGQ9Im0xNyAxOC02LTYgNi02Ii8+PHBhdGggZD0iTTcgNnYxMiIvPjwvc3ZnPg==);\n}\n\n.ag-charts-icon-pan-end {\n    mask-image: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0IiBmaWxsPSJub25lIiBzdHJva2U9ImN1cnJlbnRDb2xvciIgc3Ryb2tlLXdpZHRoPSIyIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiIGNsYXNzPSJsdWNpZGUgbHVjaWRlLWNoZXZyb24tbGFzdCI+PHBhdGggZD0ibTcgMTggNi02LTYtNiIvPjxwYXRoIGQ9Ik0xNyA2djEyIi8+PC9zdmc+);\n}\n\n\n\n/* AG Charts Theme Default */\n\n.ag-charts-theme-default,\n.ag-charts-theme-default-dark {\n    /* Colors */\n    --ag-charts-active-color: var(--ag-active-color, #2196f3);\n    --ag-charts-background-color: var(--ag-background-color, #fff);\n    --ag-charts-foreground-color: var(--ag-foreground-color, #181d1f);\n    --ag-charts-border-color: var(--ag-border-color, #dddddd);\n\n    /* Sizing */\n    --ag-charts-font-size: var(--ag-font-size, 14px);\n    --ag-charts-size: var(--ag-grid-size, 8px);\n\n    /* Borders */\n    --ag-charts-border: var(--ag-borders, solid 1px);\n    --ag-charts-border-critical: var(--ag-borders-critical, solid 1px);\n\n    /* Toolbar */\n    --ag-charts-toolbar-foreground-color: var(--ag-header-foreground-color, var(--ag-charts-foreground-color));\n    --ag-charts-toolbar-background-color: var(\n        --ag-header-background-color,\n        color-mix(in srgb, var(--ag-charts-background-color), var(--ag-charts-foreground-color) 2%)\n    );\n    --ag-charts-toolbar-size: var(--ag-header-height, 48px);\n    --ag-charts-toolbar-padding: calc(var(--ag-charts-size) * 2);\n    --ag-charts-toolbar-border: var(--ag-charts-border, solid 1px) var(--ag-charts-border-color);\n    --ag-charts-toolbar-border-critical: var(--ag-charts-border-critical, solid 1px) var(--ag-charts-border-color);\n    --ag-charts-toolbar-hover-color: color-mix(in srgb, var(--ag-charts-background-color), var(--ag-charts-active-color) 12%);\n    --ag-charts-toolbar-disabled-foreground-color: var(\n        --ag-disabled-foreground-color,\n        color-mix(in srgb, transparent, var(--ag-charts-toolbar-foreground-color) 50%)\n    );\n    --ag-charts-toolbar-disabled-background-color: var(\n        --ag-input-disabled-background-color,\n        color-mix(in srgb, var(--ag-charts-toolbar-background-color), var(--ag-charts-toolbar-foreground-color) 6%)\n    );\n    --ag-charts-toolbar-gap: var(--ag-charts-size);\n\n    /* Buttons */\n    --ag-charts-button-padding: var(--ag-charts-size);\n    --ag-charts-button-radius: var(--ag-border-radius, 4px);\n\n    /* Focus Indicator */\n    --ag-charts-focus-border: solid 2px var(--ag-input-focus-border-color, var(--ag-charts-active-color));\n    --ag-charts-focus-border-shadow: var(--ag-input-focus-box-shadow, 0 0 0 3px color-mix(in srgb, transparent, var(--ag-charts-focus-border) 47%));\n\n    /* Icons */\n    --ag-charts-icon-font-family: 'agChartsDefault';\n    --ag-charts-icon-font-weight: normal;\n    --ag-charts-icon-font-color: color-mix(in srgb, transparent, var(--ag-charts-foreground-color), 90%);\n}\n\n\n\n/* AG Charts Theme Default Dark */\n\n.ag-charts-theme-default-dark {\n    /* Colors */\n    --ag-charts-background-color: var(--ag-background-color, color-mix(in srgb, #fff, #182230 97%));\n    --ag-charts-foreground-color: var(--ag-foreground-color, #fff);\n    --ag-charts-border-color: var(--ag-border-color, rgba(255, 255, 255, 0.16));\n    --ag-charts-hover-color: var(\n        --ag-row-hover-color,\n        color-mix(in srgb, transparent, var(--ag-charts-active-color) 20%)\n    );\n\n    /* Toolbar */\n    --ag-charts-toolbar-background-color: var(--ag-header-background-color, color-mix(in srgb, #fff, #182230 93%));\n}\n\n\n","chart"),this.ctx.annotationManager.setAnnotationStyles(e.annotationThemes),d||(d=this.shouldForceNodeDataRefresh(a,u));const v=d||h?0:3;this.maybeResetAnimations(u),id("AgChartV2.applyChartOptions() - update type",Hc[v],{seriesStatus:u,forceNodeDataRefresh:d}),this.update(v,{forceNodeDataRefresh:d,newAnimationBatch:!0})}maybeResetAnimations(e){if("standalone"===this.mode)switch(e){case"series-grouping-change":case"replaced":this.resetAnimations()}}shouldForceNodeDataRefresh(e,t){const i=!!e.data||"data-change"===t||"replaced"===t,n=Rt.getKeys(),s=Object.values(n).some(t=>null!=e[t]),r=null!=e.title&&null!=e.subtitle;return i||s||r}applyMiniChartOptions(e,t,i,n){var s,r,o,a,l;const c=null!=(o=null==(r=null==(s=null==n?void 0:n.navigator)?void 0:s.miniChart)?void 0:r.series)?o:null==n?void 0:n.series,h=this.applySeries(e,this.filterMiniChartSeries(t),this.filterMiniChartSeries(c));this.applyAxes(e,i,n,h,["axes[].tick","axes[].thickness","axes[].title","axes[].crosshair","axes[].gridLine","axes[].label"]);const d=e.axes,u=d.find(e=>"x"===e.direction);for(const e of d)e.gridLine.enabled=!1,e.label.enabled=e===u,e.tick.enabled=!1,e.interactionEnabled=!1;if(null!=u){const e=null==(a=i.navigator)?void 0:a.miniChart,t=null==e?void 0:e.label,n=null==(l=null==e?void 0:e.label)?void 0:l.interval;u.line.enabled=!1,u.label.set(Je(t,["interval","rotation","minSpacing","autoRotate","autoRotateAngle"])),u.tick.set(Je(n,["enabled","width","size","color","interval","step"]));const s=null==n?void 0:n.step;null!=s&&(u.tick.interval=s)}}applyModules(e){var t;const{type:i}=this.constructor;let n=!1;for(const s of xe.byType("root","legend")){const r=null!=e[s.optionsKey]&&s.chartTypes.includes(i);r!==this.modulesManager.isEnabled(s)&&(r?(this.modulesManager.addModule(s,e=>new e.instanceConstructor(this.getModuleContext())),"legend"===s.type&&(null==(t=this.modulesManager.getModule(s))||t.attachLegend(this.ctx.scene)),this[s.optionsKey]=this.modulesManager.getModule(s)):(this.modulesManager.removeModule(s),delete this[s.optionsKey]),n=!0)}return n}applySeries(e,t,i){var n;if(!t)return"no-change";const s=function(e,t,i){var n,s,r,o;const a=(e,t)=>{const i=[e];for(const e of hh)e in t&&null!=t[e]&&i.push(`${e}=${t[e]}`);return i.join(";")},l=new Map;let c=0;for(const t of e){const e=a(t.type,t.properties);l.has(e)||l.set(e,[]),null==(n=l.get(e))||n.push([t,c++])}const h=new Map;for(const e of t){const t=a(e.type,e);h.has(t)||h.set(t,[]),null==(s=h.get(t))||s.push(e)}if(![...l.keys()].some(e=>h.has(e)))return{status:"no-overlap",oldKeys:l.keys(),newKeys:h.keys()};const d=[];let u=-1;for(const[e,t]of h.entries())for(const n of t){u++;const t=l.get(e);if(null==t||t.length<1){d.push({opts:n,idx:u,status:"add"}),l.delete(e);continue}const[s,a]=t.shift(),c=wt(null!=(r=null==i?void 0:i[a])?r:{},null!=n?n:{}),{groupIndex:h,stackIndex:p}=null!=(o=null==c?void 0:c.seriesGrouping)?o:{};null!=h||null!=p?d.push({opts:n,series:s,diff:c,idx:a,status:"series-grouping"}):c?d.push({opts:n,series:s,diff:c,idx:a,status:"update"}):d.push({opts:n,series:s,idx:a,status:"no-op"}),0===t.length&&l.delete(e)}for(const e of l.values())for(const[t,i]of e)d.push({series:t,idx:i,status:"remove"});return{status:"overlap",changes:d}}(e.series,t,i);if("no-overlap"===s.status)return id(`AgChartV2.applySeries() - creating new series instances, status: ${s.status}`,s),e.series=t.map(e=>this.createSeries(e)),"replaced";id("AgChartV2.applySeries() - matchResult",s);const r=[];let o=!1,a=!1,l=!1;for(const e of s.changes)switch(a||(a="series-grouping"===e.status),o||(o=null!=(null==(n=e.diff)?void 0:n.data)),l||(l="no-op"!==e.status),e.status){case"add":const t=this.createSeries(e.opts);r.push(t),id("AgChartV2.applySeries() - created new series",t);break;case"remove":id(`AgChartV2.applySeries() - removing series at previous idx ${e.idx}`,e.series);break;case"no-op":r.push(e.series),id(`AgChartV2.applySeries() - no change to series at previous idx ${e.idx}`,e.series);break;default:const{series:i,diff:n,idx:s}=e;id(`AgChartV2.applySeries() - applying series diff previous idx ${s}`,n,i),this.applySeriesValues(i,n),i.markNodeDataDirty(),r.push(i)}for(let e=0;e<r.length;e++)r[e]._declarationOrder=e;return id("AgChartV2.applySeries() - final series instances",r),e.series=r,a?"series-grouping-change":o?"data-change":l?"updated":"no-op"}applyAxes(e,t,i,n,s=[]){if(!("axes"in t)||!t.axes)return!1;s=["axes[].type",...s];const{axes:r}=t;return"replaced"!==n&&e.axes.length===r.length&&e.axes.every((e,t)=>e.type===r[t].type)&&pt(i)?(e.axes.forEach((e,t)=>{var n,o;const a=wt(null!=(o=null==(n=i.axes)?void 0:n[t])?o:{},r[t]);id(`AgChartV2.applyAxes() - applying axis diff idx ${t}`,a);const l=`axes[${t}]`;At(e,a,y(v({},$r),{path:l,skip:s}))}),!0):(id(`AgChartV2.applyAxes() - creating new axes instances; seriesStatus: ${n}`),e.axes=this.createAxis(r,s),!0)}createSeries(e){const t=It.create(e.type,this.getModuleContext());return this.applySeriesOptionModules(t,e),this.applySeriesValues(t,e),t}applySeriesOptionModules(e,t){const i=e.createModuleContext(),n=e.getModuleMap();for(const s of xe.byType("series-option"))s.optionsKey in t&&s.seriesTypes.includes(e.type)&&n.addModule(s,e=>new e.instanceConstructor(i))}applySeriesValues(e,t){const i=e.getModuleMap(),n=t,{type:s,data:r,listeners:o,seriesGrouping:a,showInMiniChart:l}=n,c=C(n,["type","data","listeners","seriesGrouping","showInMiniChart"]);for(const e of ct)if("series-option"===e.type&&e.optionsKey in c){const t=i.getModule(e.optionsKey),n=c[e.optionsKey];delete c[e.optionsKey],t.properties.set(n)}e.properties.set(c),"data"in t&&e.setOptionsData(r),o&&this.registerListeners(e,o),"seriesGrouping"in t&&(e.seriesGrouping=null==a?void 0:v(v({},e.seriesGrouping),a))}createAxis(e,t){const i=new ch,n=this.getModuleContext();for(let s=0;s<e.length;s++){const r=e[s],o=Ee.create(r.type,n);this.applyAxisModules(o,r),At(o,r,y(v({},$r),{path:`axes[${s}]`,skip:t})),i.push(o,r)}return i.guessInvalidPositions()}applyAxisModules(e,t){const i=e.createModuleContext(),n=e.getModuleMap();for(const s of xe.byType("axis-option")){const r=null!=t[s.optionsKey];r!==n.isEnabled(s)&&(r?(n.addModule(s,e=>new e.instanceConstructor(i)),e[s.optionsKey]=n.getModule(s)):(n.removeModule(s),delete e[s.optionsKey]))}}registerListeners(e,t){e.clearEventListeners();for(const[i,n]of Object.entries(t))Ge(n)&&e.addEventListener(i,n)}};sd.chartsInstances=new WeakMap,S([Xa({newValue(e){this.destroyed||(e.setAttribute("data-ag-charts",""),e.appendChild(this.element),sd.chartsInstances.set(e,this))},oldValue(e){e.removeAttribute("data-ag-charts"),e.removeChild(this.element),sd.chartsInstances.delete(e)}})],sd.prototype,"container",2),S([Xa({newValue(e){this.resize(e,void 0,"width option")}})],sd.prototype,"width",2),S([Xa({newValue(e){this.resize(void 0,e,"height option")}})],sd.prototype,"height",2),S([Xa({newValue(e){this.onAutoSizeChange(e)}}),$s(Js)],sd.prototype,"autoSize",2),S([$s(Zs)],sd.prototype,"padding",2),S([$s(Zs)],sd.prototype,"seriesArea",2),S([$s(Zs)],sd.prototype,"title",2),S([$s(Zs)],sd.prototype,"subtitle",2),S([$s(Zs)],sd.prototype,"footnote",2),S([$s(Zs)],sd.prototype,"keyboard",2),S([$s(Fr(["standalone","integrated"],"a chart mode"))],sd.prototype,"mode",2),S([Xa({changeValue(e,t){this.onAxisChange(e,t)}})],sd.prototype,"axes",2),S([Xa({changeValue(e,t){this.onSeriesChange(e,t)}})],sd.prototype,"series",2);var rd=sd;function od(e,t,i,n,s,r,o,a){const l=(i-e)*(a-r)-(n-t)*(o-s);if(0===l)return 0;const c=((o-s)*(t-r)-(e-s)*(a-r))/l,h=((i-e)*(t-r)-(n-t)*(e-s))/l;return c>=0&&c<=1&&h>=0&&h<=1?1:0}function ad(e,t,i,n,s,r,o,a,l,c,h,d){let u=0;const p=c-d,g=h-l,f=l*(d-c)-c*(h-l),m=ld(e,i,s,o),v=ld(t,n,r,a),y=function(e,t,i,n){if(0===e)return function(e,t,i){if(0===e)return function(e,t){const i=-t/e;return 0!==e&&i>=0&&i<=1?[i]:[]}(t,i);const n=t*t-4*e*i,s=[];if(0===n){const i=-t/(2*e);i>=0&&i<=1&&s.push(i)}else if(n>0){const i=Math.sqrt(n),r=(-t-i)/(2*e),o=(-t+i)/(2*e);r>=0&&r<=1&&s.push(r),o>=0&&o<=1&&s.push(o)}return s}(t,i,n);const s=t/e,r=i/e,o=(3*r-s*s)/9,a=(9*s*r-n/e*27-2*s*s*s)/54,l=o*o*o+a*a,c=1/3,h=[];if(l>=0){const e=Math.sqrt(l),t=Math.sign(a+e)*Math.pow(Math.abs(a+e),c),i=Math.sign(a-e)*Math.pow(Math.abs(a-e),c),n=Math.abs(Math.sqrt(3)*(t-i)/2),r=-c*s+(t+i);if(r>=0&&r<=1&&h.push(r),0===n){const e=-c*s-(t+i)/2;e>=0&&e<=1&&h.push(e)}}else{const e=Math.acos(a/Math.sqrt(-o*o*o)),t=c*s,i=2*Math.sqrt(-o),n=i*Math.cos(c*e)-t,r=i*Math.cos(c*(e+2*Math.PI))-t,l=i*Math.cos(c*(e+4*Math.PI))-t;n>=0&&n<=1&&h.push(n),r>=0&&r<=1&&h.push(r),l>=0&&l<=1&&h.push(l)}return h}(p*m[0]+g*v[0],p*m[1]+g*v[1],p*m[2]+g*v[2],p*m[3]+g*v[3]+f);for(const e of y){const t=e*e,i=e*t,n=m[0]*i+m[1]*t+m[2]*e+m[3],s=v[0]*i+v[1]*t+v[2]*e+v[3];let r;r=l===h?(s-c)/(d-c):(n-l)/(h-l),r>=0&&r<=1&&u++}return u}function ld(e,t,i,n){return[3*t-e-3*i+n,3*e-6*t+3*i,-3*e+3*t,e]}function cd(e,t,i,n,s,r,o,a,l,c){if(isNaN(e)||isNaN(t))return 0;r&&([s,n]=[n,s]);const h=(c-a)/(l-o),d=a-h*o,u=Math.pow(h,2)+1,p=2*(h*(d-t)-e),g=Math.pow(e,2)+Math.pow(d-t,2)-Math.pow(i,2),f=Math.pow(p,2)-4*u*g;if(f<0)return 0;const m=(-p+Math.sqrt(f))/2/u,v=(-p-Math.sqrt(f))/2/u;let y=0;return[m,v].forEach(i=>{if(!(i>=Math.min(o,l)&&i<=Math.max(o,l)))return;const r=i-e,a=h*i+d-t;Gs(Math.atan2(a,r),n,s)&&y++}),y}var hd=class{constructor(){this.path2d=new Path2D,this.previousCommands=[],this.previousParams=[],this.previousClosedPath=!1,this.commands=[],this.params=[],this.openedPath=!1,this.closedPath=!1}isDirty(){return this.closedPath!==this.previousClosedPath||this.previousCommands.length!==this.commands.length||this.previousParams.length!==this.params.length||this.previousCommands.toString()!==this.commands.toString()||this.previousParams.toString()!==this.params.toString()}getPath2D(){return this.path2d}moveTo(e,t){this.openedPath=!0,this.path2d.moveTo(e,t),this.commands.push(0),this.params.push(e,t)}lineTo(e,t){this.openedPath?(this.path2d.lineTo(e,t),this.commands.push(1),this.params.push(e,t)):this.moveTo(e,t)}rect(e,t,i,n){this.moveTo(e,t),this.lineTo(e+i,t),this.lineTo(e+i,t+n),this.lineTo(e,t+n),this.closePath()}roundRect(e,t,i,n,s){s=Math.min(s,i/2,n/2),this.moveTo(e,t+s),this.arc(e+s,t+s,s,Math.PI,1.5*Math.PI),this.lineTo(e+s,t),this.lineTo(e+i-s,t),this.arc(e+i-s,t+s,s,1.5*Math.PI,2*Math.PI),this.lineTo(e+i,t+s),this.lineTo(e+i,t+n-s),this.arc(e+i-s,t+n-s,s,0,Math.PI/2),this.lineTo(e+i-s,t+n),this.lineTo(e+s,t+n),this.arc(e+ +s,t+n-s,s,Math.PI/2,Math.PI),this.lineTo(e,t+n-s),this.closePath()}arc(e,t,i,n,s,r){this.openedPath=!0,this.path2d.arc(e,t,i,n,s,r),this.commands.push(2),this.params.push(e,t,i,n,s,r?1:0)}cubicCurveTo(e,t,i,n,s,r){this.openedPath||this.moveTo(e,t),this.path2d.bezierCurveTo(e,t,i,n,s,r),this.commands.push(3),this.params.push(e,t,i,n,s,r)}closePath(){this.openedPath&&(this.path2d.closePath(),this.commands.push(4),this.openedPath=!1,this.closedPath=!0)}clear(e){e&&(this.previousCommands=this.commands,this.previousParams=this.params,this.previousClosedPath=this.closedPath),this.path2d=new Path2D,this.openedPath=!1,this.closedPath=!1,this.commands=[],this.params=[]}isPointInPath(e,t){const i=this.commands,n=this.params,s=i.length,r=-1e4,o=-1e4;let a=NaN,l=NaN,c=0,h=0,d=0;for(let u=0,p=0;u<s;u++)switch(i[u]){case 0:d+=od(a,l,c,h,r,o,e,t),c=n[p++],a=c,h=n[p++],l=h;break;case 1:d+=od(c,h,n[p++],n[p++],r,o,e,t),c=n[p-2],h=n[p-1];break;case 3:d+=ad(c,h,n[p++],n[p++],n[p++],n[p++],n[p++],n[p++],r,o,e,t),c=n[p-2],h=n[p-1];break;case 2:const i=n[p++],s=n[p++],u=n[p++],g=n[p++],f=n[p++];d+=cd(i,s,u,g,f,Boolean(n[p++]),r,o,e,t),isNaN(a)||(d+=od(c,h,i+Math.cos(g)*u,s+Math.sin(g)*u,r,o,e,t)),c=i+Math.cos(f)*u,h=s+Math.sin(f)*u;break;case 4:d+=od(a,l,c,h,r,o,e,t)}return d%2==1}distanceSquared(e,t){let i=1/0;const n=this.commands,s=this.params,r=n.length;let o=NaN,a=NaN,l=0,c=0;for(let h=0,d=0;h<r;h++)switch(n[h]){case 0:l=o=s[d++],c=a=s[d++];break;case 1:i=Fa(e,t,l,c,s[d++],s[d++],i);break;case 3:O.error("Command.Curve distanceSquare not implemented");break;case 2:{const n=s[d++],r=s[d++],o=s[d++],a=s[d++],h=s[d++],u=n+Math.cos(a)*o,p=r+Math.sin(a)*o,g=Boolean(s[d++]);i=Fa(e,t,l,c,u,p,i),i=Ga(e,t,n,r,o,a,h,g,i),l=n+Math.cos(h)*o,c=r+Math.sin(h)*o;break}case 4:i=Fa(e,t,l,c,o,a,i)}return i}getPoints(){const{commands:e,params:t}=this,i=[];let n=0;for(let s=0;s<e.length;s++)switch(e[s]){case 0:case 1:i.push({x:t[n++],y:t[n++]});break;case 3:n+=4,i.push({x:t[n++],y:t[n++]});break;case 2:i.push({x:t[n++],y:t[n++]}),n+=4}return i}};function dd(e){const{redraw:t=3,changeCb:i,convertor:n}=null!=e?e:{};return ss({redraw:t,type:"path",convertor:n,changeCb:i})}var ud=class extends Io{constructor(){super(...arguments),this.path=new hd,this._clipX=NaN,this._clipY=NaN,this._dirtyPath=!0}set clipX(e){this._clipX=e,this.dirtyPath=!0}set clipY(e){this._clipY=e,this.dirtyPath=!0}set dirtyPath(e){this._dirtyPath!==e&&(this._dirtyPath=e,e&&this.markDirty(this,3))}get dirtyPath(){return this._dirtyPath}checkPathDirty(){var e,t,i,n;this._dirtyPath||(this.dirtyPath=this.path.isDirty()||null!=(t=null==(e=this.fillShadow)?void 0:e.isDirty())&&t||null!=(n=null==(i=this._clipPath)?void 0:i.isDirty())&&n)}isPointInPath(e,t){const i=this.transformPoint(e,t);return this.path.closedPath&&this.path.isPointInPath(i.x,i.y)}distanceSquared(e,t){const i=this.transformPoint(e,t);return this.path.distanceSquared(i.x,i.y)}isDirtyPath(){return!1}updatePath(){}render(e){var t,i,n,s;const{ctx:r,forceRender:o,stats:a}=e;if(0!==this.dirty||o){if(this.computeTransformMatrix(),this.matrix.toContext(r),(this.dirtyPath||this.isDirtyPath())&&(this.updatePath(),this.dirtyPath=!1),isNaN(this._clipX)||isNaN(this._clipY)||null==this.clipMode)this.drawPath(r);else{r.save();const e=this.strokeWidth/2;if(null!=this._clipPath||(this._clipPath=new hd),this._clipPath.clear(),this._clipPath.rect(-e,-e,this._clipX+e,this._clipY+e+e),"normal"===this.clipMode&&r.clip(null==(t=this._clipPath)?void 0:t.getPath2D()),this._clipX>0&&this._clipY>0&&this.drawPath(r),"punch-out"===this.clipMode){r.clip(null==(i=this._clipPath)?void 0:i.getPath2D());const{x:e=-1e4,y:t=-1e4,width:s=2e4,height:o=2e4}=null!=(n=this.computeBBox())?n:{};r.clearRect(e,t,s,o)}r.restore()}null==(s=this.fillShadow)||s.markClean(),super.render(e)}else a&&(a.nodesSkipped+=this.nodeCount.count)}drawPath(e){this.fillStroke(e,this.path.getPath2D())}};ud.className="Path",S([dd()],ud.prototype,"clipMode",2),S([dd()],ud.prototype,"clipX",1),S([dd()],ud.prototype,"clipY",1);var pd=class{constructor(e,t,i){this.root=new md(e,t,i)}clear(e){this.root.clear(e)}addValue(e,t){const i={hitTester:e,value:t,distanceSquared:(t,i)=>e.distanceSquared(t,i)};this.root.addElem(i)}find(e,t){const i={best:{nearest:void 0,distanceSquared:1/0}};return this.root.find(e,t,i),i.best}},gd=class{constructor(e,t,i,n){this.nw=e,this.ne=t,this.sw=i,this.se=n}addElem(e){this.nw.addElem(e),this.ne.addElem(e),this.sw.addElem(e),this.se.addElem(e)}find(e,t,i){this.nw.find(e,t,i),this.ne.find(e,t,i),this.sw.find(e,t,i),this.se.find(e,t,i)}},fd=class{constructor(e,t,i){this.capacity=e,this.maxdepth=t,this.boundary=null!=i?i:ts.NaN,this.elems=[],this.subdivisions=void 0}clear(e){this.elems.length=0,this.boundary=e,this.subdivisions=void 0}addElem(e){this.addCondition(e)&&(void 0===this.subdivisions?0===this.maxdepth||this.elems.length<this.capacity?this.elems.push(e):this.subdivide(e):this.subdivisions.addElem(e))}find(e,t,i){this.findCondition(e,t,i)&&(void 0===this.subdivisions?this.findAction(e,t,i):this.subdivisions.find(e,t,i))}subdivide(e){this.subdivisions=this.makeSubdivisions();for(const e of this.elems)this.subdivisions.addElem(e);this.subdivisions.addElem(e),this.elems.length=0}makeSubdivisions(){const{x:e,y:t,width:i,height:n}=this.boundary,{capacity:s}=this,r=this.maxdepth-1,o=i/2,a=n/2,l=new ts(e,t,o,a),c=new ts(e+o,t,o,a),h=new ts(e,t+a,o,a),d=new ts(e+o,t+a,o,a);return new gd(this.child(s,r,l),this.child(s,r,c),this.child(s,r,h),this.child(s,r,d))}},md=class e extends fd{addCondition(e){const{x:t,y:i}=e.hitTester.midPoint;return this.boundary.containsPoint(t,i)}findCondition(e,t,i){const{best:n}=i;return 0!==n.distanceSquared&&this.boundary.distanceSquared(e,t)<n.distanceSquared}findAction(e,t,i){const n=Qn(e,t,this.elems,i.best.distanceSquared);void 0!==n.nearest&&n.distanceSquared<i.best.distanceSquared&&(i.best=n)}child(t,i,n){return new e(t,i,n)}},vd=class extends ud{constructor(){super(...arguments),this.x=0,this.y=0,this.size=12}computeBBox(){const{x:e,y:t,size:i}=this,{center:n}=this.constructor;return new ts(e-i*n.x,t-i*n.y,i,i)}applyPath(e,t){const{path:i}=this;let{x:n,y:s}=this;null!=this.repeat&&(n=0,s=0),i.clear();for(const{x:r,y:o,t:a}of t)n+=r*e,s+=o*e,"move"===a?i.moveTo(n,s):i.lineTo(n,s);i.closePath()}executeFill(e,t){if(!t)return;if(null==this.repeat)return super.executeFill(e,t);e.save();let i=this.translationX,n=this.translationY;for(const s of this.repeat)e.translate(s.x-i,s.y-n),e.fill(t),i=s.x,n=s.y;e.restore()}executeStroke(e,t){if(!t)return;if(null==this.repeat)return super.executeStroke(e,t);e.save();let i=this.translationX,n=this.translationY;for(const s of this.repeat)e.translate(s.x-i,s.y-n),e.stroke(t),i=s.x,n=s.y;e.restore()}};vd.center={x:.5,y:.5},S([dd()],vd.prototype,"x",2),S([dd()],vd.prototype,"y",2),S([dd({convertor:Math.abs})],vd.prototype,"size",2),S([dd()],vd.prototype,"repeat",2);var yd=class extends vd{updatePath(){const{x:e,y:t,path:i,size:n}=this,s=n/2;i.clear(),i.arc(e,t,s,0,2*Math.PI),i.closePath()}};yd.className="Circle";var Cd=class e extends vd{updatePath(){const t=this.size/4.2;super.applyPath(t,e.moves)}};Cd.className="Cross",Cd.moves=[{x:-1,y:0,t:"move"},{x:-1,y:-1},{x:1,y:-1},{x:1,y:1},{x:1,y:-1},{x:1,y:1},{x:-1,y:1},{x:1,y:1},{x:-1,y:1},{x:-1,y:-1},{x:-1,y:1},{x:-1,y:-1}];var bd=Cd,Sd=class e extends vd{updatePath(){const t=this.size/2;super.applyPath(t,e.moves)}};Sd.className="Diamond",Sd.moves=[{x:0,y:-1,t:"move"},{x:1,y:1},{x:-1,y:1},{x:-1,y:-1},{x:1,y:-1}];var wd=Sd,xd=class extends vd{rad(e){return e/180*Math.PI}updatePath(){const{x:e,path:t,size:i,rad:n}=this,s=i/4,r=this.y+s/2;t.clear(),t.arc(e-s,r-s,s,n(130),n(330)),t.arc(e+s,r-s,s,n(220),n(50)),t.lineTo(e,r+s),t.closePath()}};xd.className="Heart";var Ed=class extends vd{updatePath(){const{path:e,x:t,y:i}=this,n=this.size,s=.5;e.clear(),e.moveTo(t+-.34375*n,i+-.65625*n),e.cubicCurveTo(t+-.34375*n,i+-.848509*n,t+-.192259*n,i+-1*n,t+0*n,i+-1*n),e.cubicCurveTo(t+(.692259-s)*n,i+-1*n,t+.34375*n,i+-.848509*n,t+.34375*n,i+-.65625*n),e.cubicCurveTo(t+.34375*n,i+-.506176*n,t+.284625*n,i+(.600181-1)*n,t+(.716461-s)*n,i+(.695393-1)*n),e.cubicCurveTo(t+.199009*n,i+-.280231*n,t+(.681271-s)*n,i+-.256896*n,t+(.663785-s)*n,i+(.766105-1)*n),e.cubicCurveTo(t+(.611893-s)*n,i+(.834367-1)*n,t+(.562228-s)*n,i+(.899699-1)*n,t+(.528896-s)*n,i+(.980648-1)*n),e.cubicCurveTo(t+(.524075-s)*n,i+(.992358-1)*n,t+(.512663-s)*n,i+0*n,t+0*n,i+0*n),e.cubicCurveTo(t+(.487337-s)*n,i+0*n,t+(.475925-s)*n,i+(.992358-1)*n,t+(.471104-s)*n,i+(.980648-1)*n),e.cubicCurveTo(t+(.487337-s)*n,i+0*n,t+(.475925-s)*n,i+(.992358-1)*n,t+(.471104-s)*n,i+(.980648-1)*n),e.cubicCurveTo(t+(.437772-s)*n,i+(.899699-1)*n,t+(.388107-s)*n,i+(.834367-1)*n,t+(.336215-s)*n,i+(.766105-1)*n),e.cubicCurveTo(t+(.318729-s)*n,i+-.256896*n,t+-.199009*n,i+-.280231*n,t+(.283539-s)*n,i+(.695393-1)*n),e.cubicCurveTo(t+-.284625*n,i+(.600181-1)*n,t+-.34375*n,i+-.506176*n,t+-.34375*n,i+-.65625*n),e.closePath()}};Ed.className="MapPin",Ed.center={x:.5,y:1};var Md=class e extends vd{updatePath(){const t=this.size/3;super.applyPath(t,e.moves)}};Md.className="Plus",Md.moves=[{x:-.5,y:-.5,t:"move"},{x:0,y:-1},{x:1,y:0},{x:0,y:1},{x:1,y:0},{x:0,y:1},{x:-1,y:0},{x:0,y:1},{x:-1,y:0},{x:0,y:-1},{x:-1,y:0},{x:0,y:-1}];var Ad=Md,Td=class extends vd{updatePath(){const{path:e,x:t,y:i}=this,n=this.size/2;e.clear(),e.moveTo(this.align(t-n),this.align(i-n)),e.lineTo(this.align(t+n),this.align(i-n)),e.lineTo(this.align(t+n),this.align(i+n)),e.lineTo(this.align(t-n),this.align(i+n)),e.closePath()}};Td.className="Square";var Dd=class extends vd{updatePath(){const{x:e,y:t,path:i,size:n}=this,s=n/2,r=Math.PI/2;i.clear();for(let o=0;o<10;o++){const a=o%2==0?n:s,l=o*Math.PI/5-r,c=e+Math.cos(l)*a,h=t+Math.sin(l)*a;i.lineTo(c,h)}i.closePath()}};Dd.className="Star";var Id=class e extends vd{updatePath(){const t=1.1*this.size;super.applyPath(t,e.moves)}};Id.className="Triangle",Id.moves=[{x:0,y:-.48,t:"move"},{x:.5,y:.87},{x:-1,y:0}];var Rd=Id,Ld={circle:yd,cross:bd,diamond:wd,heart:xd,pin:Ed,plus:Ad,square:Td,star:Dd,triangle:Rd},kd=Object.keys(Ld);function Pd(e){return"string"==typeof e&&kd.includes(e)}function Nd(e=Td){return Pd(e)?Ld[e]:"function"==typeof e?e:Td}var Od=class extends Zh{constructor(){super(...arguments),this.showFocusBox=!0}getScaleInformation({xScale:e,yScale:t}){return{isContinuousX:Xr.is(e),isContinuousY:Xr.is(t),xScaleType:null==e?void 0:e.type,yScaleType:null==t?void 0:t.type}}getModulePropertyDefinitions(){var e,t;const i=null==(e=this.axes.x)?void 0:e.scale,n=null==(t=this.axes.y)?void 0:t.scale;return this.moduleMap.mapModules(e=>e.getPropertyDefinitions(this.getScaleInformation({xScale:i,yScale:n}))).flat()}requestDataModel(e,t,i){return x(this,null,function*(){i.props.push(...this.getModulePropertyDefinitions());const{dataModel:n,processedData:s}=yield e.request(this.id,null!=t?t:[],i);return this.dataModel=n,this.processedData=s,this.dispatch("data-processed",{dataModel:n,processedData:s}),{dataModel:n,processedData:s}})}isProcessedDataAnimatable(){var e,t;const i=null==(t=null==(e=this.processedData)?void 0:e.reduced)?void 0:t.animationValidation;if(!i)return!0;const{orderedKeys:n,uniqueKeys:s}=i;return n&&s}checkProcessedDataAnimatable(){this.isProcessedDataAnimatable()||this.ctx.animationManager.skipCurrentBatch()}pickFocus(e){return this.doPickFocus(e,this)}doPickFocus(e,t){const i=this.getNodeData();if(void 0===i||0===i.length)return;const{datumIndexDelta:n,seriesRect:s}=e,r=this.computeFocusDatumIndex(e,i,t.seriesItemEnabled);if(void 0===r)return;const{showFocusBox:o}=this,a=i[r],l=this.computeFocusBounds({datumIndex:r,datumIndexDelta:n,seriesRect:s});return void 0!==l?{bbox:l,showFocusBox:o,datum:a,datumIndex:r}:void 0}computeFocusDatumIndex(e,t,i){i&&t.length!==i.length&&O.error(`invalid state: nodeData.length (${t.length} !== seriesItemEnabled.length (${null==i?void 0:i.length})`);const n=e=>{const n=t[e];return(void 0===n.missing||!1===n.missing)&&(void 0===i||i[e])},s=e=>{for(;e>=0&&!n(e);)e--;return-1===e?void 0:e},r=e=>{for(;e<t.length&&!n(e);)e++;return e===t.length?void 0:e};let o;const a=zn(0,e.datumIndex,t.length-1);return e.datumIndexDelta<0?o=s(a):e.datumIndexDelta>0?o=r(a):(null!=o||(o=r(a)),null!=o||(o=s(a))),void 0===o?0===e.datumIndexDelta?void 0:e.datumIndex-e.datumIndexDelta:o}},_d=class extends yt{constructor(){super(...arguments),this.fill="rgba(255,255,255, 0.33)",this.stroke="rgba(0, 0, 0, 0.4)",this.strokeWidth=2}};S([$s(mr,{optional:!0})],_d.prototype,"fill",2),S([$s(rr,{optional:!0})],_d.prototype,"fillOpacity",2),S([$s(mr,{optional:!0})],_d.prototype,"stroke",2),S([$s(sr,{optional:!0})],_d.prototype,"strokeWidth",2),S([$s(rr,{optional:!0})],_d.prototype,"strokeOpacity",2),S([$s(Mr,{optional:!0})],_d.prototype,"lineDash",2),S([$s(sr,{optional:!0})],_d.prototype,"lineDashOffset",2);var Fd=class extends yt{};S([$s(sr,{optional:!0})],Fd.prototype,"strokeWidth",2),S([$s(rr,{optional:!0})],Fd.prototype,"dimOpacity",2),S([$s(Js,{optional:!0})],Fd.prototype,"enabled",2);var Gd=class extends yt{constructor(){super(...arguments),this.color="black"}};S([$s(mr,{optional:!0})],Gd.prototype,"color",2);var Vd=class extends yt{constructor(){super(...arguments),this.item=new _d,this.series=new Fd,this.text=new Gd}};S([$s(Zs)],Vd.prototype,"item",2),S([$s(Zs)],Vd.prototype,"series",2),S([$s(Zs)],Vd.prototype,"text",2);var Bd=class extends yt{constructor(){super(...arguments),this.visible=!0,this.showInLegend=!0,this.cursor="default",this.nodeClickRange="exact",this.highlightStyle=new Vd}};S([$s(tr,{optional:!0})],Bd.prototype,"id",2),S([$s(Js)],Bd.prototype,"visible",2),S([$s(Js)],Bd.prototype,"showInLegend",2),S([$s(tr)],Bd.prototype,"cursor",2),S([$s(Or)],Bd.prototype,"nodeClickRange",2),S([$s(Zs)],Bd.prototype,"highlightStyle",2);var Hd={x:["xKey"],y:["yKey"]},zd={x:["xName"],y:["yName"]},Ud=class extends qh{constructor(e,t,i,n){super(e,t,i,n),this.xKey=n.properties.xKey,this.yKey=n.properties.yKey}},Wd=class extends Bd{};S([$s(tr,{optional:!0})],Wd.prototype,"legendItemName",2);var jd=class extends Od{constructor(e){var t=e,{pathsPerSeries:i=1,hasMarkers:n=!1,hasHighlightedLabels:s=!1,pathsZIndexSubOrderOffset:r=[],datumSelectionGarbageCollection:o=!0,markerSelectionGarbageCollection:a=!0,animationAlwaysUpdateSelections:l=!1,animationResetFns:c,directionKeys:h,directionNames:d}=t,u=C(t,["pathsPerSeries","hasMarkers","hasHighlightedLabels","pathsZIndexSubOrderOffset","datumSelectionGarbageCollection","markerSelectionGarbageCollection","animationAlwaysUpdateSelections","animationResetFns","directionKeys","directionNames"]);if(super(v({directionKeys:h,directionNames:d,canHaveAxes:!0},u)),this.NodeEvent=Ud,this.dataNodeGroup=this.contentGroup.appendChild(new Eo({name:`${this.id}-series-dataNodes`,zIndex:4,zIndexSubOrder:this.getGroupZIndexSubOrder("data")})),this.markerGroup=this.contentGroup.appendChild(new Eo({name:`${this.id}-series-markers`,zIndex:4,zIndexSubOrder:this.getGroupZIndexSubOrder("marker")})),this.labelGroup=this.contentGroup.appendChild(new Eo({name:`${this.id}-series-labels`,zIndex:8,zIndexSubOrder:this.getGroupZIndexSubOrder("labels")})),this.labelSelection=Oa.select(this.labelGroup,Fo),this.highlightSelection=Oa.select(this.highlightNode,()=>this.opts.hasMarkers?this.markerFactory():this.nodeFactory()),this.highlightLabelSelection=Oa.select(this.highlightLabel,Fo),this.annotationSelections=new Set,this.minRectsCache={dirtyNodeData:!0},this.debug=Rn.create(),!h||!d)throw new Error(`Unable to initialise series type ${this.type}`);this.opts={pathsPerSeries:i,hasMarkers:n,hasHighlightedLabels:s,pathsZIndexSubOrderOffset:r,directionKeys:h,directionNames:d,animationResetFns:c,animationAlwaysUpdateSelections:l,datumSelectionGarbageCollection:o,markerSelectionGarbageCollection:a},this.paths=[];for(let e=0;e<i;e++)this.paths[e]=new ud,this.paths[e].zIndex=4,this.paths[e].zIndexSubOrder=this.getGroupZIndexSubOrder("paths",e),this.contentGroup.appendChild(this.paths[e]);this.datumSelection=Oa.select(this.dataNodeGroup,()=>this.nodeFactory(),o),this.markerSelection=Oa.select(this.markerGroup,()=>this.markerFactory(),a),this.animationState=new va("empty",{empty:{update:{target:"ready",action:e=>this.animateEmptyUpdateReady(e)},reset:"empty",skip:"ready",disable:"disabled"},ready:{updateData:"waiting",clear:"clearing",highlight:e=>this.animateReadyHighlight(e),highlightMarkers:e=>this.animateReadyHighlightMarkers(e),resize:e=>this.animateReadyResize(e),reset:"empty",skip:"ready",disable:"disabled"},waiting:{update:{target:"ready",action:e=>this.animateWaitingUpdateReady(e)},reset:"empty",skip:"ready",disable:"disabled"},disabled:{update:e=>this.resetAllAnimation(e),reset:"empty"},clearing:{update:{target:"empty",action:e=>this.animateClearingUpdateEmpty(e)},reset:"empty",skip:"ready"}},()=>this.checkProcessedDataAnimatable())}get contextNodeData(){return this._contextNodeData}getNodeData(){var e;return null==(e=this.contextNodeData)?void 0:e.nodeData}resetAnimation(e){"initial"===e?this.animationState.transition("reset"):"ready"===e?this.animationState.transition("skip"):"disabled"===e&&this.animationState.transition("disable")}addChartEventListeners(){this.destroyFns.push(this.ctx.chartEventManager.addListener("legend-item-click",e=>this.onLegendItemClick(e)),this.ctx.chartEventManager.addListener("legend-item-double-click",e=>this.onLegendItemDoubleClick(e)))}destroy(){super.destroy(),this._contextNodeData=void 0}update(e){return x(this,arguments,function*({seriesRect:e}){var t,i;const{visible:n,_contextNodeData:s}=this,r=(null==(i=null==(t=this.ctx.highlightManager)?void 0:t.getActiveHighlight())?void 0:i.series)===this,o=this.checkResize(e),a=yield this.updateHighlightSelection(r);yield this.updateSelections(n),yield this.updateNodes(a,r,n);const l=this.getAnimationData(e,s);l&&(o&&this.animationState.transition("resize",l),this.animationState.transition("update",l))})}updateSelections(e){return x(this,null,function*(){var t;const i=!this.opts.animationAlwaysUpdateSelections&&this.ctx.animationManager.isSkipped();if((e||!i)&&(this.nodeDataRefresh||this.isPathOrSelectionDirty())){if(this.nodeDataRefresh){this.nodeDataRefresh=!1,this.debug("CartesianSeries.updateSelections() - calling createNodeData() for",this.id),this.markQuadtreeDirty(),this._contextNodeData=yield this.createNodeData();const e=this.isProcessedDataAnimatable();this._contextNodeData&&(null!=(t=this._contextNodeData).animationValid||(t.animationValid=e)),this.minRectsCache.dirtyNodeData=!0;const{dataModel:i,processedData:n}=this;void 0!==i&&void 0!==n&&this.dispatch("data-update",{dataModel:i,processedData:n})}yield this.updateSeriesSelections()}})}updateSeriesSelections(e){return x(this,null,function*(){const{datumSelection:t,labelSelection:i,markerSelection:n,paths:s}=this,r=this._contextNodeData;if(!r)return;const{nodeData:o,labelData:a,itemId:l}=r;yield this.updatePaths({seriesHighlighted:e,itemId:l,contextData:r,paths:s}),this.datumSelection=yield this.updateDatumSelection({nodeData:o,datumSelection:t}),this.labelSelection=yield this.updateLabelSelection({labelData:a,labelSelection:i}),this.opts.hasMarkers&&(this.markerSelection=yield this.updateMarkerSelection({nodeData:o,markerSelection:n}))})}markerFactory(){return new(Nd())}getGroupZIndexSubOrder(e,t=0){var i;const n=super.getGroupZIndexSubOrder(e,t);if("paths"===e){const[e]=n,s=null!=(i=this.opts.pathsZIndexSubOrderOffset[t])?i:0;n[0]=Ge(e)?()=>Number(e())+s:Number(e)+s}return n}updateNodes(e,t,i){return x(this,null,function*(){var n;const{highlightSelection:s,highlightLabelSelection:r,opts:{hasMarkers:o,hasHighlightedLabels:a}}=this,l=!this.ctx.animationManager.isSkipped(),c=this.visible&&null!=this._contextNodeData&&i;this.rootGroup.visible=l||c,this.contentGroup.visible=l||c,this.highlightGroup.visible=(l||c)&&t;const h=this.getOpacity();o?(yield this.updateMarkerNodes({markerSelection:s,isHighlight:!0}),this.animationState.transition("highlightMarkers",s)):(yield this.updateDatumNodes({datumSelection:s,isHighlight:!0}),this.animationState.transition("highlight",s)),a&&(yield this.updateLabelNodes({labelSelection:r}));const{dataNodeGroup:d,markerGroup:u,datumSelection:p,labelSelection:g,markerSelection:f,paths:m,labelGroup:v}=this,{itemId:y}=null!=(n=this.contextNodeData)?n:{};d.opacity=h,d.visible=l||c,v.visible=c,o&&(u.opacity=h,u.zIndex=d.zIndex>=4?d.zIndex:d.zIndex+1,u.visible=c),v&&(v.opacity=h),yield this.updatePathNodes({seriesHighlighted:t,itemId:y,paths:m,opacity:h,visible:c,animationEnabled:l}),d.visible&&(yield this.updateDatumNodes({datumSelection:p,highlightedItems:e,isHighlight:!1}),yield this.updateLabelNodes({labelSelection:g}),o&&(yield this.updateMarkerNodes({markerSelection:f,isHighlight:!1})))})}getHighlightLabelData(e,t){const i=e.filter(e=>e.datum===t.datum&&e.itemId===t.itemId);return 0===i.length?void 0:i}getHighlightData(e,t){return t?[t]:void 0}updateHighlightSelection(e){return x(this,null,function*(){var t;const{highlightSelection:i,highlightLabelSelection:n,_contextNodeData:s}=this;if(!s)return;const r=null==(t=this.ctx.highlightManager)?void 0:t.getActiveHighlight(),o=e&&(null==r?void 0:r.datum)?r:void 0;let a,l;if(null!=o){const e=this.isLabelEnabled(),{labelData:t,nodeData:i}=s;l=this.getHighlightData(i,o),a=e?this.getHighlightLabelData(t,o):void 0}return this.highlightSelection=yield this.updateHighlightSelectionItem({items:l,highlightSelection:i}),this.highlightLabelSelection=yield this.updateHighlightSelectionLabel({items:a,highlightLabelSelection:n}),l})}markQuadtreeDirty(){this.quadtree=void 0}*datumNodesIter(){for(const{node:e}of this.datumSelection)!0!==e.datum.missing&&(yield e)}getQuadTree(){if(void 0===this.quadtree){const{width:e,height:t}=this.ctx.scene.canvas,i=new ts(0,0,e,t);this.quadtree=new pd(100,10,i),this.initQuadTree(this.quadtree)}return this.quadtree}initQuadTree(e){}pickNodeExactShape(e){var t;const i=super.pickNodeExactShape(e);if(i)return i;const{x:n,y:s}=e,{opts:{hasMarkers:r}}=this;let o;const{dataNodeGroup:a,markerGroup:l}=this;if(o=a.pickNode(n,s),!o&&r&&(o=null==l?void 0:l.pickNode(n,s)),o&&!0!==o.datum.missing)return{datum:o.datum,distance:0};for(const i of this.moduleMap.modules()){const{datum:n}=null!=(t=i.pickNodeExact(e))?t:{};if(null!=n&&!0!==(null==n?void 0:n.missing))return{datum:n,distance:0}}}pickNodeClosestDatum(e){var t,i;const{x:n,y:s}=e,{axes:r,rootGroup:o,_contextNodeData:a}=this;if(!a)return;const l=r.x,c=r.y,h=o.transformPoint(n,s);let d,u=1/0;for(const e of a.nodeData){const{point:{x:t=NaN,y:i=NaN}={}}=e;if(isNaN(t)||isNaN(i))continue;if(!(null==l?void 0:l.inRange(t))||!(null==c?void 0:c.inRange(i)))continue;const n=Math.max(f(h.x-t,2)+f(h.y-i,2),0);n<u&&(u=n,d=e)}for(const t of this.moduleMap.modules()){const i=t.pickNodeNearest(e);if(void 0!==i&&i.distanceSquared<u){u=i.distanceSquared,d=i.datum;break}}return d?{datum:d,distance:Math.max(Math.sqrt(u)-(null!=(i=null==(t=d.point)?void 0:t.size)?i:0),0)}:void 0}pickNodeMainAxisFirst(e,t){var i,n,s,r;const{x:o,y:a}=e,{axes:l,rootGroup:c,_contextNodeData:h}=this;if(!h)return;const d=l.x,u=l.y,p=[d,u].filter(e=>e instanceof Dl).map(e=>e.direction);if(t&&0===p.length)return;const[g="x"]=p,m=c.transformPoint(o,a),v="x"===g?[m.x,m.y]:[m.y,m.x],y=[1/0,1/0];let C;for(const e of h.nodeData){const{x:t=NaN,y:s=NaN}=null!=(n=null!=(i=e.point)?i:e.midPoint)?n:{};if(isNaN(t)||isNaN(s)||!0===e.missing)continue;if(!(null==d?void 0:d.inRange(t))||!(null==u?void 0:u.inRange(s)))continue;const r="x"===g?[t,s]:[s,t];let o=!0;for(let e=0;e<r.length;e++){const t=Math.abs(r[e]-v[e]);if(t>y[e]){o=!1;break}t<y[e]&&(y[e]=t,y.fill(1/0,e+1,y.length))}o&&(C=e)}if(C){let t=Math.max(f(y[0],2)+f(y[1],2)-(null!=(r=null==(s=C.point)?void 0:s.size)?r:0),0);for(const i of this.moduleMap.modules()){const n=i.pickNodeMainAxisFirst(e);if(void 0!==n&&n.distanceSquared<t){C=n.datum,t=n.distanceSquared;break}}return{datum:C,distance:Math.sqrt(t)}}}onLegendItemClick(e){const{legendItemName:t}=this.properties,{enabled:i,itemId:n,series:s}=e,r=null!=t&&t===e.legendItemName;(s.id===this.id||r)&&this.toggleSeriesItem(n,i)}onLegendItemDoubleClick(e){const{enabled:t,itemId:i,series:n,numVisibleItems:s}=e,{legendItemName:r}=this.properties,o=null!=r&&r===e.legendItemName;n.id===this.id||o||t&&1===s?this.toggleSeriesItem(i,!0):this.toggleSeriesItem(i,!1)}isPathOrSelectionDirty(){return!1}getLabelData(){return[]}shouldFlipXY(){return!1}getMinRects(e,t){const{dirtyNodeData:i,sizeCache:n,minRect:s,minVisibleRect:r}=this.minRectsCache,o=JSON.stringify({width:e,height:t});if(o===n&&!i&&s&&r)return{minRect:s,minVisibleRect:r};const a=this.computeMinRects(e,t);return this.minRectsCache={dirtyNodeData:!1,sizeCache:o,minRect:null==a?void 0:a.minRect,minVisibleRect:null==a?void 0:a.minVisibleRect},a}computeMinRects(e,t){var i,n;const s=this._contextNodeData;if(!(null==s?void 0:s.nodeData.length))return;const{nodeData:r}=s,o=Array(r.length),a=Array(r.length);for(const[e,{midPoint:t}]of r.entries())o[e]=null!=(i=null==t?void 0:t.x)?i:0,a[e]=null!=(n=null==t?void 0:t.y)?n:0;let l,c,h,d;o.sort((e,t)=>e-t),a.sort((e,t)=>e-t);let u=0,p=0;for(let i=1;i<r.length;i++)o[i]>=0&&(null!=l||(l=i)),o[i]>e&&(null!=c||(c=i)),a[i]>=0&&(null!=h||(h=i)),a[i]>t&&(null!=d||(d=i)),u=Math.max(u,o[i]-o[i-1]),p=Math.max(p,a[i]-a[i-1]);null!=c||(c=r.length),null!=d||(d=r.length);const g=null!=l&&null!=c?o.slice(l,c):[],f=null!=h&&null!=d?a.slice(h,d):[];let m=0,v=0;for(let e=1;e<Math.max(g.length,f.length);e++){const t=g[e],i=g[e-1],n=f[e],s=f[e-1];null!=t&&null!=i&&(m=Math.max(m,t-i)),null!=n&&null!=s&&(v=Math.max(v,n-s))}return{minRect:new ts(0,0,u,p),minVisibleRect:new ts(0,0,m,v)}}updateHighlightSelectionItem(e){const{opts:{hasMarkers:t}}=this,{items:i,highlightSelection:n}=e,s=null!=i?i:[];if(t){const e=n;return this.updateMarkerSelection({nodeData:s,markerSelection:e})}return this.updateDatumSelection({nodeData:s,datumSelection:n})}updateHighlightSelectionLabel(e){var t;return this.updateLabelSelection({labelData:null!=(t=e.items)?t:[],labelSelection:e.highlightLabelSelection})}updateDatumSelection(e){return x(this,null,function*(){return e.datumSelection})}updateDatumNodes(e){return x(this,null,function*(){})}updateMarkerSelection(e){return x(this,null,function*(){return e.markerSelection})}updateMarkerNodes(e){return x(this,null,function*(){})}updatePaths(e){return x(this,null,function*(){e.paths.forEach(e=>e.visible=!1)})}updatePathNodes(e){return x(this,null,function*(){const{paths:t,opacity:i,visible:n}=e;for(const e of t)e.opacity=i,e.visible=n})}resetAllAnimation(e){var t,i,n;const{path:s,datum:r,label:o,marker:a}=null!=(i=null==(t=this.opts)?void 0:t.animationResetFns)?i:{};this.ctx.animationManager.stopByAnimationGroupId(this.id),s&&e.paths.forEach(e=>{ma([e],s)}),r&&ma([e.datumSelection],r),o&&ma([e.labelSelection],o),a&&this.opts.hasMarkers&&ma([e.markerSelection],a),!1===(null==(n=e.contextData)?void 0:n.animationValid)&&this.ctx.animationManager.skipCurrentBatch()}animateEmptyUpdateReady(e){this.ctx.animationManager.skipCurrentBatch(),this.resetAllAnimation(e)}animateWaitingUpdateReady(e){this.ctx.animationManager.skipCurrentBatch(),this.resetAllAnimation(e)}animateReadyHighlight(e){var t,i;const{datum:n}=null!=(i=null==(t=this.opts)?void 0:t.animationResetFns)?i:{};n&&ma([e],n)}animateReadyHighlightMarkers(e){var t,i;const{marker:n}=null!=(i=null==(t=this.opts)?void 0:t.animationResetFns)?i:{};n&&ma([e],n)}animateReadyResize(e){this.resetAllAnimation(e)}animateClearingUpdateEmpty(e){this.ctx.animationManager.skipCurrentBatch(),this.resetAllAnimation(e)}animationTransitionClear(){const e=this.getAnimationData();e&&this.animationState.transition("clear",e)}getAnimationData(e,t){const{_contextNodeData:i}=this;if(i)return{datumSelection:this.datumSelection,markerSelection:this.markerSelection,labelSelection:this.labelSelection,annotationSelections:[...this.annotationSelections],contextData:i,previousContextData:t,paths:this.paths,seriesRect:e}}calculateScaling(){const e={};for(const t of Object.values(Kr)){const i=this.axes[t];if(i)if(i.scale instanceof Na){const{range:n,domain:s}=i.scale;e[t]={type:"log",convert:e=>i.scale.convert(e),domain:[s[0],s[1]],range:[n[0],n[1]]}}else if(i.scale instanceof Xr){const{range:n}=i.scale,s=i.scale.getDomain();e[t]={type:"continuous",domain:[s[0],s[1]],range:[n[0],n[1]]}}else if(i.scale){const{domain:n}=i.scale;e[t]={type:"category",domain:n,range:n.map(e=>i.scale.convert(e))}}}return e}},Kd=["top","right","bottom","left"],$d=class e extends rd{constructor(e,t){super(e,t),this.paired=!0,this.firstSeriesTranslation=!0,this._lastCrossLineIds=void 0,this._lastAxisWidths={top:0,bottom:0,left:0,right:0},this._lastClipSeries=!1,this._lastVisibility={crossLines:!0,series:!0}}onAxisChange(e,t){super.onAxisChange(e,t),this.zoomManager.updateAxes(e)}destroySeries(e){super.destroySeries(e),this.firstSeriesTranslation=!0}performLayout(){return x(this,null,function*(){const t=yield w(e.prototype,this,"performLayout").call(this),{firstSeriesTranslation:i,seriesRoot:n,annotationRoot:s,highlightRoot:r}=this,{animationRect:o,seriesRect:a,visibility:l,clipSeries:c}=this.updateAxes(t);this.seriesRoot.visible=l.series,this.seriesRect=a,this.animationRect=o;const{x:h,y:d}=a;if(i){for(const e of[n,s,r])e.translationX=Math.floor(h),e.translationY=Math.floor(d);this.firstSeriesTranslation=!1}else{const{translationX:e,translationY:t}=n;ks(this.id,"seriesRect",this.ctx.animationManager,[n,r,s],{translationX:e,translationY:t},{translationX:Math.floor(h),translationY:Math.floor(d)},{phase:"update"})}const u=a.clone().grow(this.seriesArea.padding);this.hoverRect=u;const p=this.seriesArea.clip||c?u:void 0;n.setClipRectInGroupCoordinateSpace(p),r.setClipRectInGroupCoordinateSpace(p),s.setClipRectInGroupCoordinateSpace(p),this.ctx.layoutService.dispatchLayoutComplete({type:"layout-complete",chart:{width:this.ctx.scene.width,height:this.ctx.scene.height},clipSeries:c,series:{rect:a,paddedRect:u,visible:l.series,shouldFlipXY:this.shouldFlipXY()},axes:this.axes.map(e=>v({id:e.id},e.getLayoutState()))});const g=this.modulesManager.mapModules(e=>{var t;return null==(t=e.performCartesianLayout)?void 0:t.call(e,{seriesRect:a})});return yield Promise.all(g),t})}updateAxes(e){var t;const i=this.axes.flatMap(e=>{var t;return null!=(t=e.crossLines)?t:[]}).map(e=>e.id);let n,s,r;null!=this._lastCrossLineIds&&this._lastCrossLineIds.length===i.length&&this._lastCrossLineIds.every((e,t)=>i[t]===e)?(n=v({},this._lastAxisWidths),s=this._lastClipSeries,r=v({},this._lastVisibility)):(n={top:0,bottom:0,left:0,right:0},s=!1,r={crossLines:!0,series:!0},this._lastCrossLineIds=i);const o=new Set(this.axes.map(e=>e.position));for(const e of Object.keys(n))o.has(e)||delete n[e];const a=(e,t,i)=>!Object.keys(e).some(e=>null==n[e])&&r.crossLines===i.crossLines&&r.series===i.series&&Object.entries(n).every(([t,i])=>{const n=e[t];return null==i&&null==n||i===n})&&s===t,l=e=>Qe(e,e=>e&&Math.abs(e)===1/0?0:null!=e?Math.ceil(e):e);let c={},h={},d=!1,u=null==(t=this.seriesRect)?void 0:t.clone(),p=0,g={};do{Object.assign(n,c),s=d,Object.assign(r,h);const t=this.updateAxesPass(n,e.clone(),u);if(c=l(t.axisWidths),h=t.visibility,d=t.clipSeries,u=t.seriesRect,g=t.primaryTickCounts,p++>10){O.warn("unable to find stable axis layout.");break}}while(!a(c,d,h));return this.axes.forEach(e=>{e.update(g[e.direction])}),this.axes.forEach(t=>{if(t.setCrossLinesVisible(r.crossLines),u)switch(t.clipGrid(u.x,u.y,u.width+5,u.height+5),t.position){case"left":case"right":t.clipTickLines(e.x,u.y,e.width+5,u.height+5);break;case"top":case"bottom":t.clipTickLines(u.x,e.y,u.width+5,e.height+5)}}),this._lastAxisWidths=n,this._lastVisibility=r,{seriesRect:u,animationRect:e,visibility:r,clipSeries:s}}updateAxesPass(e,t,i){const n={},s={},r={series:!0,crossLines:!0};let o=!1;const a={},l=this.applySeriesPadding(t),c=i?this.buildCrossLinePadding(e):{},h=this.buildAxisBound(l,e,c,r),d=this.buildSeriesRect(h,e);return this.axes.forEach(t=>{var i,r;const{position:c="left"}=t,{clipSeries:u,axisThickness:p,axisOffset:g}=this.calculateAxisDimensions({axis:t,seriesRect:d,paddedBounds:l,axisWidths:e,newAxisWidths:s,primaryTickCounts:a,clipSeries:o,addInterAxisPadding:(null!=(i=n[c])?i:0)>0});n[c]=(null!=(r=n[c])?r:0)+1,o=o||u,this.positionAxis({axis:t,axisBound:h,axisOffset:g,axisThickness:p,axisWidths:e,primaryTickCounts:a,seriesRect:d})}),{clipSeries:o,seriesRect:d,axisWidths:s,visibility:r,primaryTickCounts:a}}buildCrossLinePadding(e){var t;const i={};this.axes.forEach(e=>{e.crossLines&&e.crossLines.forEach(e=>{var t;null==(t=e.calculatePadding)||t.call(e,i)})});for(const[n,s=0]of Object.entries(i))i[n]=Math.max(s-(null!=(t=e[n])?t:0),0);return i}applySeriesPadding(e){const t=e.clone(),i=this.axes.slice().reverse();return Kd.forEach(e=>{const n=this.seriesArea.padding[e],s=i.find(t=>t.position===e);s?s.seriesAreaPadding=n:t.shrink(n,e)}),t}buildAxisBound(e,t,i,n){var s,r,o,a;const l=e.clone(),{top:c=0,right:h=0,bottom:d=0,left:u=0}=i,p=u+h,g=c+d,f=(null!=(s=t.left)?s:0)+(null!=(r=t.right)?r:0)+p,m=(null!=(o=t.top)?o:0)+(null!=(a=t.bottom)?a:0)+g;return l.width<=f||l.height<=m?(n.crossLines=!1,n.series=!1,l):(l.x+=u,l.y+=c,l.width-=p,l.height-=g,l)}buildSeriesRect(e,t){const i=e.clone(),{top:n,bottom:s,left:r,right:o}=t;return i.x+=null!=r?r:0,i.y+=null!=n?n:0,i.width-=(null!=r?r:0)+(null!=o?o:0),i.height-=(null!=n?n:0)+(null!=s?s:0),i.width=Math.max(0,i.width),i.height=Math.max(0,i.height),i}clampToOutsideSeriesRect(e,t,i,n){const{x:s,y:r,width:o,height:a}=e,l=[s,r,s+o,r+a][("x"===i?0:1)+(1===n?0:2)];return(1===n?Math.min:Math.max)(t,l)}calculateAxisDimensions(e){var t,i,n;const{axis:s,seriesRect:r,paddedBounds:o,axisWidths:a,newAxisWidths:l,primaryTickCounts:c,addInterAxisPadding:h}=e;let{clipSeries:d}=e;const{position:u="left",direction:p}=s,g=s instanceof Dl||s instanceof Vl,f="left"===u||"right"===u,m=null!=(t=l[u])?t:0,{min:v,max:y}=this.ctx.zoomManager.getAxisZoom(s.id);f?(g?(s.range=[0,r.height],s.visibleRange=[1-y,1-v]):(s.range=[r.height,0],s.visibleRange=[v,y]),s.gridLength=r.width):(s.range=[0,r.width],s.visibleRange=[v,y],s.gridLength=r.height);let C=s.nice?c[p]:void 0;const b="y"===p;s.thickness?s.maxThickness=s.thickness:s.maxThickness=.3*(b?o.width:o.height);const S=s.calculateLayout(C);let w;if(C=S.primaryTickCount,null!=c[p]||(c[p]=C),d||(d=s.dataDomain.clipped||s.visibleRange[0]>0||s.visibleRange[1]<1),null!=s.thickness&&s.thickness>0)w=s.thickness;else{const{bbox:e}=S;w=b?e.width:e.height}return h&&(w+=15),w=Math.ceil(w),l[u]=(null!=(i=l[u])?i:0)+w,s.gridPadding=(null!=(n=a[u])?n:0)-l[u],{clipSeries:d,axisThickness:w,axisOffset:m,primaryTickCount:C}}positionAxis(e){var t,i,n,s;const{axis:r,axisBound:o,axisWidths:a,seriesRect:l,axisOffset:c,axisThickness:h}=e,{position:d}=r;switch(d){case"top":r.translation.x=o.x+(null!=(t=a.left)?t:0),r.translation.y=this.clampToOutsideSeriesRect(l,o.y+1+c+h,"y",1);break;case"bottom":r.translation.x=o.x+(null!=(i=a.left)?i:0),r.translation.y=this.clampToOutsideSeriesRect(l,o.y+o.height+1-h-c,"y",-1);break;case"left":r.translation.y=o.y+(null!=(n=a.top)?n:0),r.translation.x=this.clampToOutsideSeriesRect(l,o.x+c+h,"x",1);break;case"right":r.translation.y=o.y+(null!=(s=a.top)?s:0),r.translation.x=this.clampToOutsideSeriesRect(l,o.x+o.width-h-c,"x",-1)}r.updatePosition({rotation:Vs(r.rotation),sideFlag:r.label.getSideFlag()})}shouldFlipXY(){return!this.series.some(e=>!(e instanceof jd&&e.shouldFlipXY()))}};$d.className="CartesianChart",$d.type="cartesian";var Yd=$d,qd=class e{static isInstance(t){var i;return t instanceof e||"AgChartInstanceProxy"===(null==(i=t.constructor)?void 0:i.name)&&null!=t.chart||null!=t.chart&&this.validateImplementation(t)}static validateImplementation(e){var t;const i=Object.keys(null!=(t=Object.getPrototypeOf(e))?t:{});return["getOptions","destroy"].every(e=>i.includes(e))}constructor(e){this.chart=e}getOptions(){return xt(this.chart.getOptions())}resetAnimations(){this.chart.resetAnimations()}skipAnimations(){this.chart.skipAnimations()}destroy(){this.chart.destroy()}};qd.chartInstances=new WeakMap,S([Xa({oldValue(e){qd.chartInstances.delete(e)},newValue(e){qd.chartInstances.set(e,this)}})],qd.prototype,"chart",2);var Xd=qd,Zd=class extends Xr{constructor(){super([0,1],[0,1]),this.type="number"}toDomain(e){return e}ticks(){var e;const t=null!=(e=this.tickCount)?e:Xr.defaultTickCount;if(!this.domain||this.domain.length<2||t<1||this.domain.some(e=>!isFinite(e)))return[];this.refresh();const[i,n]=this.getDomain(),{interval:s}=this;if(s){const e=Math.abs(s);if(!fo({start:i,stop:n,interval:e,availableRange:this.getPixelRange()}))return go(i,n,e)}return ho(i,n,t,this.minTickCount,this.maxTickCount)}update(){!this.domain||this.domain.length<2||this.nice&&this.updateNiceDomain()}getTickStep(e,t){var i,n;const s=null!=(i=this.tickCount)?i:Xr.defaultTickCount;return null!=(n=this.interval)?n:po(e,t,s,this.minTickCount,this.maxTickCount)}updateNiceDomain(){var e;const t=null!=(e=this.tickCount)?e:Xr.defaultTickCount;if(t<1)return void(this.niceDomain=[...this.domain]);let[i,n]=this.domain;if(1===t)[i,n]=function(e,t){const i=Math.abs(t-e),n=Math.floor(Math.log10(i)),s=Math.pow(10,n),r=e>t?Math.ceil:Math.floor,o=t<e?Math.floor:Math.ceil;return uo.map(n=>{const a=n*s,l=r(e/a)*a,c=o(t/a)*a;return{error:1-i/Math.abs(c-l),domain:[l,c]}}).sort((e,t)=>e.error-t.error)[0].domain}(i,n);else{const e=i>n?Math.ceil:Math.floor,t=n<i?Math.floor:Math.ceil,s=4;for(let r=0;r<s;r++){const s=i,r=n,o=this.getTickStep(i,n),[a,l]=this.domain;if(o>=1)i=e(a/o)*o,n=t(l/o)*o;else{const s=1/o;i=e(a*s)/s,n=t(l*s)/s}if(i===s&&n===r)break}}this.niceDomain=[i,n]}tickFormat({ticks:e,specifier:t}){return ka(null!=e?e:this.ticks(),t)}};var Qd=class extends jr{constructor(){super(...arguments),this.minSpacing=NaN,this.maxSpacing=NaN}};S([$s(Gr),Ks(NaN)],Qd.prototype,"minSpacing",2),S([$s(Vr),Ks(NaN)],Qd.prototype,"maxSpacing",2);var Jd=class extends Al{constructor(e,t=new Zd){super(e,t),this.min=NaN,this.max=NaN}normaliseDataDomain(e){const{min:t,max:i}=this,{extent:n,clipped:s}=dn(e,t,i);return{domain:n,clipped:s}}createTick(){return new Qd}updateSecondaryAxisTicks(e){if(null==this.dataDomain)throw new Error("AG Charts - dataDomain not calculated, cannot perform tick calculation.");if(0===this.dataDomain.domain.length)return[];const[t,i]=function(e,t,i){let[n,s]=Wn(e);n=function(e,t,i){const n=Math.abs(t-e)/(i-1),s=Math.floor(Math.log10(n)),r=Math.pow(10,s);return Math.floor(e/r)*r}(Math.floor(n),s,t);const r=function(e,t,i){return function(e){const t=Math.floor(Math.log10(e)),i=Math.pow(10,t),n=e/i*10;return n>0&&n<=1?i/10:n>1&&n<=2?2*i/10:n>1&&n<=5?5*i/10:n>5&&n<=10?10*i/10:n>10&&n<=20?20*i/10:n>20&&n<=40?40*i/10:n>40&&n<=50?50*i/10:n>50&&n<=100?100*i/10:n}((t-e)/(i-1))}(n,s,t);s=n+(t-1)*r;const o=i?[s,n]:[n,s],a=function(e,t,i){const n=Math.floor(Math.log10(t)),s=t>0&&t<1?Math.abs(n):0,r=Math.pow(10,s),o=co(s);for(let n=0;n<i;n++){const i=e+t*n;o[n]=Math.round(i*r)/r}return o}(n,r,t);return[o,a]}(this.dataDomain.domain,null!=e?e:0,this.reverse);return this.scale.nice=!1,this.scale.domain=t,this.scale.update(),i}formatDatum(e){return"number"==typeof e?e.toFixed(2):String(e)}};Jd.className="NumberAxis",Jd.type="number",S([$s(qs(ar,dr("max"))),Ks(NaN)],Jd.prototype,"min",2),S([$s(qs(ar,ur("min"))),Ks(NaN)],Jd.prototype,"max",2);var eu=Br(e=>Ue(e)&&0!==e,"a non-zero number"),tu=class extends Jd{constructor(e){super(e,new Na),this.min=NaN,this.max=NaN}normaliseDataDomain(e){const{min:t,max:i}=this,{extent:n,clipped:s}=dn(e,t,i),r=n[0]>n[1],o=n[0]<0&&n[1]>0,a=0===n[0]&&0===n[1];return(r||o||a)&&(o?O.warn("the data domain crosses zero, the chart data cannot be rendered. See log axis documentation for more information."):a&&O.warn("the data domain has 0 extent, no data is rendered.")),0===n[0]&&(n[0]=1),0===n[1]&&(n[1]=-1),{domain:n,clipped:s}}set base(e){this.scale.base=e}get base(){return this.scale.base}};tu.className="LogAxis",tu.type="log",S([$s(qs(ar,eu,dr("max"))),Ks(NaN)],tu.prototype,"min",2),S([$s(qs(ar,eu,ur("min"))),Ks(NaN)],tu.prototype,"max",2);var iu=class extends jr{constructor(){super(...arguments),this.minSpacing=NaN,this.maxSpacing=NaN}};S([$s(Gr),Ks(NaN)],iu.prototype,"minSpacing",2),S([$s(Vr),Ks(NaN)],iu.prototype,"maxSpacing",2);var nu=class extends Al{constructor(e){super(e,new vo),this.min=void 0,this.max=void 0,this.refreshScale()}normaliseDataDomain(e){var t;let{min:i,max:n}=this,s=!1;return"number"==typeof i&&(i=new Date(i)),"number"==typeof n&&(n=new Date(n)),e.length>2&&(e=(null!=(t=cn(e))?t:[0,1e3]).map(e=>new Date(e))),i instanceof Date&&(s||(s=i>e[0]),e=[i,e[1]]),n instanceof Date&&(s||(s=n<e[1]),e=[e[0],n]),e[0]>e[1]&&(e=[]),{domain:e,clipped:s}}createTick(){return new iu}onLabelFormatChange(e,t,i){i?super.onLabelFormatChange(e,t,i):this.labelFormatter=this.scale.tickFormat({ticks:e,domain:t})}calculatePadding(){return[0,0]}formatDatum(e){var t;const i=this.scale.tickFormat({specifier:"%m/%d/%y, %H:%M:%S"});return null!=(t=this.moduleCtx.callbackCache.call(i,e))?t:String(e)}};nu.className="TimeAxis",nu.type="time",S([$s(qs(gr,dr("max")),{optional:!0})],nu.prototype,"min",2),S([$s(qs(gr,ur("min")),{optional:!0})],nu.prototype,"max",2);var su=1e-6,ru=(e,t,i,n,s)=>{let r=!1,o=!1,a=n-Math.sqrt(Math.max(f(s,2)-f(i,2),0)),l=0,c=0,h=i-Math.sqrt(Math.max(f(s,2)-f(n,2),0));return a>e?(r=!0,a=e,l=i-Math.sqrt(Math.max(f(s,2)-f(n-e,2)))):a<su&&(a=0),h>t?(o=!0,c=n-Math.sqrt(Math.max(f(s,2)-f(i-t,2))),h=t):h<su&&(h=0),{leading0:a,leading1:l,trailing0:c,trailing1:h,leadingClipped:r,trailingClipped:o}},ou=(e,{x0:t,y0:i,x1:n,y1:s,cx:r,cy:o},a,l)=>{if(l&&e.moveTo(t,i),t!==n||i!==s){const l=Math.atan2(i-o,t-r),c=Math.atan2(s-o,n-r);e.arc(r,o,a,l,c)}else e.lineTo(t,i)},au=(e,t,i,n,s,r,o)=>{let{topLeft:a,topRight:l,bottomRight:c,bottomLeft:h}=r;const d=Math.max(a+h,l+c),u=Math.max(a+l,h+c);if(d<=0&&u<=0)return void(null==o?e.rect(t,i,n,s):e.rect(o.x,o.y,o.width,o.height));if(null==o&&a===l&&a===c&&a===h)return void e.roundRect(t,i,n,s,a);if(n<0&&(t+=n,n=Math.abs(n)),s<0&&(i+=s,s=Math.abs(s)),n<=0||s<=0)return;if(null==o)o=new ts(t,i,n,s);else{const e=Math.max(t,o.x),r=Math.min(t+n,o.x+o.width),a=Math.max(i,o.y),l=Math.min(i+s,o.y+o.height);o=new ts(e,a,r-e,l-a)}const p=Math.max(d/s,u/n,1);p>1&&(a/=p,l/=p,c/=p,h/=p);let g,f,m,v,y=!0,C=!0,b=!0,S=!0;if(y){const e=ru(o.height,o.width,Math.max(t+a-o.x,0),Math.max(i+a-o.y,0),a);e.leadingClipped&&(S=!1),e.trailingClipped&&(C=!1),g={x0:Math.max(o.x+e.leading1,o.x),y0:Math.max(o.y+e.leading0,o.y),x1:Math.max(o.x+e.trailing1,o.x),y1:Math.max(o.y+e.trailing0,o.y),cx:t+a,cy:i+a}}if(C){const e=ru(o.width,o.height,Math.max(i+l-o.y,0),Math.max(o.x+o.width-(t+n-l),0),l);e.leadingClipped&&(y=!1),e.trailingClipped&&(b=!1),f={x0:Math.min(o.x+o.width-e.leading0,o.x+o.width),y0:Math.max(o.y+e.leading1,o.y),x1:Math.min(o.x+o.width-e.trailing0,o.x+o.width),y1:Math.max(o.y+e.trailing1,o.y),cx:t+n-l,cy:i+l}}if(b){const e=ru(o.height,o.width,Math.max(o.x+o.width-(t+n-c),0),Math.max(o.y+o.height-(i+s-c),0),c);e.leadingClipped&&(C=!1),e.trailingClipped&&(S=!1),m={x0:Math.min(o.x+o.width-e.leading1,o.x+o.width),y0:Math.min(o.y+o.height-e.leading0,o.y+o.height),x1:Math.min(o.x+o.width-e.trailing1,o.x+o.width),y1:Math.min(o.y+o.height-e.trailing0,o.y+o.height),cx:t+n-c,cy:i+s-c}}if(S){const e=ru(o.width,o.height,Math.max(o.y+o.height-(i+s-h),0),Math.max(t+h-o.x,0),h);e.leadingClipped&&(b=!1),e.trailingClipped&&(y=!1),v={x0:Math.max(o.x+e.leading0,o.x),y0:Math.min(o.y+o.height-e.leading1,o.y+o.height),x1:Math.max(o.x+e.trailing0,o.x),y1:Math.min(o.y+o.height-e.trailing1,o.y+o.height),cx:t+h,cy:i+s-h}}let w=!1;y&&null!=g&&(ou(e,g,a,!w),w||(w=!0)),C&&null!=f&&(ou(e,f,l,!w),w||(w=!0)),b&&null!=m&&(ou(e,m,c,!w),w||(w=!0)),S&&null!=v&&(ou(e,v,h,!w),w||(w=!0)),e.closePath()},lu=class extends ud{constructor(){super(...arguments),this.borderPath=new hd,this.x=0,this.y=0,this.width=10,this.height=10,this.topLeftCornerRadius=0,this.topRightCornerRadius=0,this.bottomRightCornerRadius=0,this.bottomLeftCornerRadius=0,this.clipBBox=void 0,this.crisp=!1,this.lastUpdatePathStrokeWidth=Io.defaultStyles.strokeWidth,this.effectiveStrokeWidth=Io.defaultStyles.strokeWidth,this.hittester=super.isPointInPath,this.distanceCalculator=super.distanceSquared,this.microPixelEffectOpacity=1}set cornerRadius(e){this.topLeftCornerRadius=e,this.topRightCornerRadius=e,this.bottomRightCornerRadius=e,this.bottomLeftCornerRadius=e}isDirtyPath(){return this.lastUpdatePathStrokeWidth!==this.strokeWidth||Boolean(this.path.isDirty()||this.borderPath.isDirty())}updatePath(){var e,t,i;const{path:n,borderPath:s,crisp:r,topLeftCornerRadius:o,topRightCornerRadius:a,bottomRightCornerRadius:l,bottomLeftCornerRadius:c}=this;let{x:h,y:d,width:u,height:p,strokeWidth:g,clipBBox:f}=this;const m=1/(null!=(t=null==(e=this.layerManager)?void 0:e.canvas.pixelRatio)?t:1);let v=1;if(n.clear(!0),s.clear(!0),r&&(u<=m&&(v*=u/m),p<=m&&(v*=p/m),u=this.align(h,u),p=this.align(d,p),h=this.align(h),d=this.align(d),f=null!=f?new ts(this.align(f.x),this.align(f.y),this.align(f.x,f.width),this.align(f.y,f.height)):void 0),g)if(u<m){const e=h+m/2;s.moveTo(e,d),s.lineTo(e,d+p),g=m,this.borderClipPath=void 0}else if(p<m){const e=d+m/2;s.moveTo(h,e),s.lineTo(h+u,e),g=m,this.borderClipPath=void 0}else if(g<u&&g<p){const e=g/2;h+=e,d+=e,u-=g,p-=g;const t=null==f?void 0:f.clone().shrink(e),i={topLeft:o>0?o-g:0,topRight:a>0?a-g:0,bottomRight:l>0?l-g:0,bottomLeft:c>0?c-g:0};this.borderClipPath=void 0,u>0&&p>0&&(null==t||(null==t?void 0:t.width)>0&&(null==t?void 0:t.height)>0)&&(au(n,h,d,u,p,i,t),au(s,h,d,u,p,i,t))}else this.borderClipPath=null!=(i=this.borderClipPath)?i:new hd,this.borderClipPath.clear(!0),this.borderClipPath.rect(h,d,u,p),s.rect(h,d,u,p);else{const e={topLeft:o,topRight:a,bottomRight:l,bottomLeft:c};this.borderClipPath=void 0,au(n,h,d,u,p,e,f)}[o,a,l,c].every(e=>0===e)?(this.hittester=(e,t)=>{const i=this.transformPoint(e,t);return this.getCachedBBox().containsPoint(i.x,i.y)},this.distanceSquared=(e,t)=>this.getCachedBBox().distanceSquared(e,t)):(this.hittester=super.isPointInPath,this.distanceCalculator=super.distanceSquared),this.effectiveStrokeWidth=g,this.lastUpdatePathStrokeWidth=g,this.microPixelEffectOpacity=v}computeBBox(){var e;const{x:t,y:i,width:n,height:s,clipBBox:r}=this;return null!=(e=null==r?void 0:r.clone())?e:new ts(t,i,n,s)}isPointInPath(e,t){return this.hittester(e,t)}get midPoint(){return{x:this.x+this.width/2,y:this.y+this.height/2}}distanceSquared(e,t){return this.distanceCalculator(e,t)}applyFillAlpha(e){const{fillOpacity:t,microPixelEffectOpacity:i,opacity:n}=this;e.globalAlpha*=n*t*i}renderStroke(e){const{stroke:t,effectiveStrokeWidth:i}=this;if(t&&i){const{globalAlpha:n}=e,{strokeOpacity:s,lineDash:r,lineDashOffset:o,lineCap:a,lineJoin:l,borderPath:c,borderClipPath:h,opacity:d,microPixelEffectOpacity:u}=this;h&&e.clip(h.getPath2D()),e.strokeStyle=t,e.globalAlpha*=d*s*u,e.lineWidth=i,r&&e.setLineDash(r),o&&(e.lineDashOffset=o),a&&(e.lineCap=a),l&&(e.lineJoin=l),e.stroke(c.getPath2D()),e.globalAlpha=n}}};lu.className="Rect",S([dd()],lu.prototype,"x",2),S([dd()],lu.prototype,"y",2),S([dd()],lu.prototype,"width",2),S([dd()],lu.prototype,"height",2),S([dd()],lu.prototype,"topLeftCornerRadius",2),S([dd()],lu.prototype,"topRightCornerRadius",2),S([dd()],lu.prototype,"bottomRightCornerRadius",2),S([dd()],lu.prototype,"bottomLeftCornerRadius",2),S([dd()],lu.prototype,"clipBBox",2),S([dd()],lu.prototype,"crisp",2);var cu=class extends we{constructor(e){super(),this.node=new Eo({name:"background",zIndex:0}),this.rectNode=new lu,this.visible=!0,this.fill="white",this.node.appendChild(this.rectNode),this.destroyFns.push(e.scene.attachNode(this.node),e.layoutService.addListener("layout-complete",e=>this.onLayoutComplete(e)))}onLayoutComplete(e){const{width:t,height:i}=e.chart;this.rectNode.width=t,this.rectNode.height=i}};S([$s(Js),qa("node","visible")],cu.prototype,"visible",2),S([$s(mr,{optional:!0}),qa("rectNode","fill")],cu.prototype,"fill",2),S([$s(Zs,{optional:!0})],cu.prototype,"image",2);var hu={type:"root",optionsKey:"background",packageType:"community",chartTypes:["cartesian","polar","hierarchy","topology"],instanceConstructor:cu};function du({orientation:e,bboxes:t,maxHeight:i,maxWidth:n,itemPaddingY:s=0,itemPaddingX:r=0,forceResult:o=!1}){const a="horizontal"===e,l={max:a?n:i,fn:a?e=>e.width:e=>e.height,padding:a?r:s},c={max:a?i:n,fn:a?e=>e.height:e=>e.width,padding:a?s:r};let h=0;const d=[];for(;h<t.length;){const e=uu(t.slice(h),h,l,c,o);if(!e)return;h+=e.processedBBoxCount,d.push(e.pageIndices)}return function(e,t,i,n,s){let r=0,o=0;return{pages:e.map(e=>{"horizontal"===t&&(e=function(e){const t=[];for(const i of e[0])t.push([]);return e.forEach((e,i)=>{e.forEach((e,n)=>{t[n][i]=e})}),t}(e));let a=0;const l=e.map(e=>{const t=e.map(e=>(a=Math.max(e,a),i[e]));let r=0,o=0;return t.forEach(e=>{r+=e.height+n,o=Math.max(o,e.width+s)}),{indices:e,bboxes:t,columnHeight:Math.ceil(r),columnWidth:Math.ceil(o)}});let c=0,h=0;return l.forEach(e=>{c+=e.columnWidth,h=Math.max(h,e.columnHeight)}),r=Math.max(c,r),o=Math.max(h,o),{columns:l,startIndex:e[0][0],endIndex:a,pageWidth:c,pageHeight:h}}),maxPageWidth:r,maxPageHeight:o}}(d,e,t,s,r)}function uu(e,t,i,n,s){let r=function(e,t){const i=e.length;let n=0;for(let s=0;s<i;s++)if(n+=t.fn(e[s])+t.padding,n>t.max)return i/s<2?Math.ceil(i/2):s;return i}(e,i);if(r<1){if(!s)return;r=1}let o=r;for(;o>=1;){const r=pu(e,t,o,i,n,s);if(null==r&&o<=1)return;if(null!=r){if("number"!=typeof r)return{processedBBoxCount:r.length*r[0].length,pageIndices:r};if(r<=1)return;o=r<o&&r>1?r:o,o--}else o--}}function pu(e,t,i,n,s,r){var o;const a=[];let l=0,c=0,h=[];const d=[];for(let u=0;u<e.length;u++){const p=(u+i)%i;0===p&&(l+=c,c=0,h.length>0&&a.push(h),h=[]);const g=n.fn(e[u])+n.padding;d[p]=Math.max(null!=(o=d[p])?o:0,g),c=Math.max(c,s.fn(e[u])+s.padding);const f=l+c,m=!r||a.length>0;if(f>s.max&&m){h=[];break}if(d.reduce((e,t)=>e+t,0)>n.max&&!r)return d.length<i?d.length:void 0;h.push(u+t)}return h.length>0&&a.push(h),a.length>0?a:void 0}var gu=class extends Eo{constructor(){super({name:"markerLabelGroup"}),this.label=new Fo,this.line=new Va,this._marker=new Td,this._markerSize=15,this._spacing=8;const{marker:e,label:t,line:i}=this;t.textBaseline="middle",t.fontSize=12,t.fontFamily="Verdana, sans-serif",t.fill="black",t.y=1,this.append([i,e,t]),this.update()}set marker(e){this._marker!==e&&(this.removeChild(this._marker),this._marker=e,this.appendChild(e),this.update())}get marker(){return this._marker}set markerSize(e){this._markerSize!==e&&(this._markerSize=e,this.update())}get markerSize(){return this._markerSize}set spacing(e){this._spacing!==e&&(this._spacing=e,this.update())}get spacing(){return this._spacing}setSeriesStrokeOffset(e){const t=this.marker.size/2+e;this.line.x1=-t,this.line.x2=t,this.line.y1=0,this.line.y2=0,this.line.markDirtyTransform(),this.update()}update(){const{markerSize:e}=this,t=this.marker.constructor.center;this.marker.size=e,this.marker.x=(t.x-.5)*e,this.marker.y=(t.y-.5)*e;const i=this.line.visible?this.line.x2:-1/0,n=e/2;this.label.x=Math.max(i,n)+this.spacing}render(e){this.marker.opacity=this.opacity,this.label.opacity=this.opacity,this.line.opacity=this.opacity,super.render(e)}};gu.className="MarkerLabel",S([qa("label")],gu.prototype,"text",2),S([qa("label")],gu.prototype,"fontStyle",2),S([qa("label")],gu.prototype,"fontWeight",2),S([qa("label")],gu.prototype,"fontSize",2),S([qa("label")],gu.prototype,"fontFamily",2),S([qa("label","fill")],gu.prototype,"color",2),S([qa("marker","fill")],gu.prototype,"markerFill",2),S([qa("marker","stroke")],gu.prototype,"markerStroke",2),S([qa("marker","strokeWidth")],gu.prototype,"markerStrokeWidth",2),S([qa("marker","fillOpacity")],gu.prototype,"markerFillOpacity",2),S([qa("marker","strokeOpacity")],gu.prototype,"markerStrokeOpacity",2),S([qa("marker","visible")],gu.prototype,"markerVisible",2),S([qa("line","stroke")],gu.prototype,"lineStroke",2),S([qa("line","strokeWidth")],gu.prototype,"lineStrokeWidth",2),S([qa("line","strokeOpacity")],gu.prototype,"lineStrokeOpacity",2),S([qa("line","lineDash")],gu.prototype,"lineLineDash",2),S([qa("line","visible")],gu.prototype,"lineVisible",2);var fu=class extends yt{constructor(){super(...arguments),this.color="black",this.fontStyle=void 0,this.fontWeight=void 0,this.fontSize=12,this.fontFamily="Verdana, sans-serif"}};S([$s(mr)],fu.prototype,"color",2),S([$s(Tr,{optional:!0})],fu.prototype,"fontStyle",2),S([$s(Dr,{optional:!0})],fu.prototype,"fontWeight",2),S([$s(sr)],fu.prototype,"fontSize",2),S([$s(tr)],fu.prototype,"fontFamily",2);var mu=class extends yt{constructor(){super(...arguments),this.size=15,this.fill=void 0,this.fillOpacity=void 0,this.stroke=void 0,this.strokeWidth=1,this.strokeOpacity=1}};S([$s(sr)],mu.prototype,"size",2),S([$s(mr,{optional:!0})],mu.prototype,"fill",2),S([$s(rr,{optional:!0})],mu.prototype,"fillOpacity",2),S([$s(mr,{optional:!0})],mu.prototype,"stroke",2),S([$s(sr)],mu.prototype,"strokeWidth",2),S([$s(rr)],mu.prototype,"strokeOpacity",2);var vu=class extends yt{constructor(e){super(),this.parent=e,this.shape=Rd,this.size=15,this.padding=8}};S([Xa({changeValue(){this.parent.marker===this&&this.parent.onMarkerShapeChange()}})],vu.prototype,"shape",2),S([$s(sr)],vu.prototype,"size",2),S([$s(sr)],vu.prototype,"padding",2);var yu=class extends yt{constructor(e,t,i,n){super(),this.chartUpdateCallback=e,this.pageUpdateCallback=t,this.regionManager=i,this.cursorManager=n,this.id=Vn(this),this.marker=new vu(this),this.activeStyle=new mu,this.inactiveStyle=new mu,this.highlightStyle=new mu,this.label=new fu,this.group=new Eo({name:"pagination"}),this.labelNode=new Fo,this.destroyFns=[],this.totalPages=0,this.currentPage=0,this.translationX=0,this.translationY=0,this.nextButtonDisabled=!1,this.previousButtonDisabled=!1,this._visible=!0,this._enabled=!0,this._orientation="vertical",this._nextButton=new Rd,this._previousButton=new Rd,this.labelNode.setProperties({textBaseline:"middle",fontSize:12,fontFamily:"Verdana, sans-serif",fill:"black",y:1}),this.group.append([this.nextButton,this.previousButton,this.labelNode]);const s=this.regionManager.addRegion("pagination",this.group);this.destroyFns.push(s.addListener("click",e=>this.onPaginationClick(e)),s.addListener("hover",e=>this.onPaginationMouseMove(e))),this.update(),this.updateMarkers()}destroy(){this.destroyFns.forEach(e=>e())}set visible(e){this._visible=e,this.updateGroupVisibility()}get visible(){return this._visible}set enabled(e){this._enabled=e,this.updateGroupVisibility()}get enabled(){return this._enabled}updateGroupVisibility(){this.group.visible=this.enabled&&this.visible}set orientation(e){this._orientation=e,"horizontal"===e?(this.previousButton.rotation=-Math.PI/2,this.nextButton.rotation=Math.PI/2):(this.previousButton.rotation=0,this.nextButton.rotation=Math.PI)}get orientation(){return this._orientation}set nextButton(e){this._nextButton!==e&&(this.group.removeChild(this._nextButton),this._nextButton=e,this.group.appendChild(e))}get nextButton(){return this._nextButton}set previousButton(e){this._previousButton!==e&&(this.group.removeChild(this._previousButton),this._previousButton=e,this.group.appendChild(e))}get previousButton(){return this._previousButton}update(){this.updateLabel(),this.updatePositions(),this.enableOrDisableButtons()}updatePositions(){this.group.translationX=this.translationX,this.group.translationY=this.translationY,this.updateLabelPosition(),this.updateNextButtonPosition()}updateLabelPosition(){const{size:e,padding:t}=this.marker;this.nextButton.size=e,this.previousButton.size=e,this.labelNode.x=e/2+t}updateNextButtonPosition(){const e=this.labelNode.computeBBox();this.nextButton.translationX=e.x+e.width+this.marker.size/2+this.marker.padding}updateLabel(){const{currentPage:e,totalPages:t,labelNode:i,label:{color:n,fontStyle:s,fontWeight:r,fontSize:o,fontFamily:a}}=this;i.text=`${e+1} / ${t}`,i.fill=n,i.fontStyle=s,i.fontWeight=r,i.fontSize=o,i.fontFamily=a}updateMarkers(){const{nextButton:e,previousButton:t,nextButtonDisabled:i,previousButtonDisabled:n,activeStyle:s,inactiveStyle:r,highlightStyle:o,highlightActive:a}=this,l=(e,t)=>t?r:e===a?o:s;this.updateMarker(e,l("next",i)),this.updateMarker(t,l("previous",n))}updateMarker(e,t){var i;const{size:n}=this.marker;e.size=n,e.fill=t.fill,e.fillOpacity=null!=(i=t.fillOpacity)?i:1,e.stroke=t.stroke,e.strokeWidth=t.strokeWidth,e.strokeOpacity=t.strokeOpacity}enableOrDisableButtons(){const{currentPage:e,totalPages:t}=this,i=0===t,n=e===t-1,s=0===e;this.nextButtonDisabled=n||i,this.previousButtonDisabled=s||i}nextButtonContainsPoint(e,t){return!this.nextButtonDisabled&&this.nextButton.containsPoint(e,t)}previousButtonContainsPoint(e,t){return!this.previousButtonDisabled&&this.previousButton.containsPoint(e,t)}clickNext(){this.incrementPage(),this.onPaginationChanged()}clickPrevious(){this.decrementPage(),this.onPaginationChanged()}setPage(e){e=zn(0,e,this.totalPages-1),this.currentPage!==e&&(this.currentPage=e,this.onPaginationChanged())}onPaginationClick(e){const{offsetX:t,offsetY:i}=e;this.nextButtonContainsPoint(t,i)?(this.clickNext(),e.consume()):this.previousButtonContainsPoint(t,i)&&(this.clickPrevious(),e.consume())}onPaginationMouseMove(e){const{offsetX:t,offsetY:i}=e;this.nextButtonContainsPoint(t,i)?(this.cursorManager.updateCursor(this.id,"pointer"),this.highlightActive="next"):this.previousButtonContainsPoint(t,i)?(this.cursorManager.updateCursor(this.id,"pointer"),this.highlightActive="previous"):(this.cursorManager.updateCursor(this.id),this.highlightActive=void 0),this.updateMarkers(),this.chartUpdateCallback(6)}onPaginationChanged(){this.pageUpdateCallback(this.currentPage)}incrementPage(){this.currentPage=Math.min(this.currentPage+1,this.totalPages-1)}decrementPage(){this.currentPage=Math.max(this.currentPage-1,0)}onMarkerShapeChange(){const e=Nd(this.marker.shape||Rd);this.previousButton=new e,this.nextButton=new e,this.updatePositions(),this.updateMarkers(),this.chartUpdateCallback(6)}attachPagination(e){e.append(this.group)}computeBBox(){return this.group.computeBBox()}};yu.className="Pagination",S([$s(Zs)],yu.prototype,"marker",2),S([$s(Zs)],yu.prototype,"activeStyle",2),S([$s(Zs)],yu.prototype,"inactiveStyle",2),S([$s(Zs)],yu.prototype,"highlightStyle",2),S([$s(Zs)],yu.prototype,"label",2);var Cu=class extends yt{constructor(){super(...arguments),this.maxLength=void 0,this.color="black",this.fontStyle=void 0,this.fontWeight=void 0,this.fontSize=12,this.fontFamily="Verdana, sans-serif",this.formatter=void 0}};S([$s(sr,{optional:!0})],Cu.prototype,"maxLength",2),S([$s(mr)],Cu.prototype,"color",2),S([$s(Tr,{optional:!0})],Cu.prototype,"fontStyle",2),S([$s(Dr,{optional:!0})],Cu.prototype,"fontWeight",2),S([$s(sr)],Cu.prototype,"fontSize",2),S([$s(tr)],Cu.prototype,"fontFamily",2),S([$s(er,{optional:!0})],Cu.prototype,"formatter",2);var bu=class extends yt{constructor(){super(...arguments),this.size=15,this.padding=8,this.enabled=!0}};S([Za(e=>{var t;return null==(t=e.parent)?void 0:t.onMarkerShapeChange()})],bu.prototype,"shape",2),S([$s(sr)],bu.prototype,"size",2),S([$s(sr)],bu.prototype,"padding",2),S([$s(sr,{optional:!0})],bu.prototype,"strokeWidth",2),S([$s(Js)],bu.prototype,"enabled",2);var Su=class extends yt{};S([$s(sr,{optional:!0})],Su.prototype,"strokeWidth",2),S([$s(sr,{optional:!0})],Su.prototype,"length",2);var wu=class extends yt{constructor(){super(...arguments),this.paddingX=16,this.paddingY=8,this.toggleSeriesVisible=!0,this.showSeriesStroke=!1,this.marker=new bu,this.label=new Cu,this.line=new Su}};S([$s(sr,{optional:!0})],wu.prototype,"maxWidth",2),S([$s(sr)],wu.prototype,"paddingX",2),S([$s(sr)],wu.prototype,"paddingY",2),S([$s(Js)],wu.prototype,"toggleSeriesVisible",2),S([$s(Js)],wu.prototype,"showSeriesStroke",2),S([$s(Zs)],wu.prototype,"marker",2),S([$s(Zs)],wu.prototype,"label",2),S([$s(Zs)],wu.prototype,"line",2);var xu=class extends yt{};S([$s(er,{optional:!0})],xu.prototype,"legendItemClick",2),S([$s(er,{optional:!0})],xu.prototype,"legendItemDoubleClick",2);var Eu=class extends yt{constructor(e){super(),this.ctx=e,this.id=Vn(this),this.group=new Eo({name:"legend",layer:!0,zIndex:11}),this.itemSelection=Oa.select(this.group,gu),this.oldSize=[0,0],this.pages=[],this.maxPageSize=[0,0],this.paginationTrackingIndex=0,this.truncatedItems=new Set,this._data=[],this.item=new wu,this.listeners=new xu,this.enabled=!0,this.position="bottom",this.spacing=20,this.characterWidths=new Map,this.destroyFns=[],this.size=[0,0],this._visible=!0,this.focus={mode:"item",index:0},this.item.marker.parent=this,this.pagination=new yu(t=>e.updateService.update(t),e=>this.updatePageNumber(e),e.regionManager,e.cursorManager),this.pagination.attachPagination(this.group),this.item.marker.parent=this;const t=e.regionManager.addRegionFromProperties({name:"legend",bboxproviders:[this.group],canInteraction:()=>this.enabled&&this.group.visible});this.destroyFns.push(t.addListener("click",e=>this.checkLegendClick(e),17),t.addListener("dblclick",e=>this.checkLegendDoubleClick(e),17),t.addListener("hover",e=>this.handleLegendMouseMove(e)),t.addListener("leave",e=>this.handleLegendMouseExit(e),17),t.addListener("enter",e=>this.handleLegendMouseEnter(e),17),t.addListener("blur",e=>this.onBlur(e)),t.addListener("tab",e=>this.onTab(e)),t.addListener("tab-start",e=>this.onTabStart(e)),t.addListener("nav-vert",e=>this.onNav(e)),t.addListener("nav-hori",e=>this.onNav(e)),t.addListener("submit",e=>this.onSubmit(e)),e.layoutService.addListener("start-layout",e=>this.positionLegend(e.shrinkRect)),()=>this.detachLegend())}set data(e){this._data=e,this.updateGroupVisibility()}get data(){return this._data}destroy(){this.destroyFns.forEach(e=>e()),this.pagination.destroy()}onMarkerShapeChange(){this.itemSelection.clear(),this.group.markDirty(this.group,2)}getOrientation(){if(void 0!==this.orientation)return this.orientation;switch(this.position){case"right":case"left":return"vertical";case"bottom":case"top":return"horizontal"}}getCharacterWidths(e){const{characterWidths:t}=this;if(t.has(e))return t.get(e);const i={"...":Fo.getTextSize("...",e).width};return t.set(e,i),i}set visible(e){this._visible=e,this.updateGroupVisibility()}get visible(){return this._visible}updateGroupVisibility(){this.group.visible=this.enabled&&this.visible&&this.data.length>0}attachLegend(e){e.appendChild(this.group)}detachLegend(){var e;null==(e=this.group.parent)||e.removeChild(this.group)}getItemLabel(e){const{ctx:{callbackCache:t}}=this,{formatter:i}=this.item.label;return i?t.call(i,{itemId:e.itemId,value:e.label.text,seriesId:e.seriesId}):e.label.text}calcLayout(e,t){const{paddingX:i,paddingY:n,label:s,maxWidth:r,marker:{size:o,padding:a,shape:l},label:{maxLength:c=1/0,fontStyle:h,fontWeight:d,fontSize:u,fontFamily:p},line:g,showSeriesStroke:f}=this.item,m=[...this.data];this.reverseOrder&&m.reverse(),this.itemSelection.update(m);const v=[],y=Vo(s),C=null!=r?r:.8*e,b=o+a+i;if(this.itemSelection.each((e,t)=>{var i,n,s;const r=Nd(null!=l?l:t.marker.shape),m=null!=(i=t.marker.enabled)?i:this.item.marker.enabled;e.marker&&e.marker instanceof r||(e.marker=new r),e.markerSize=o,e.spacing=a,e.fontStyle=h,e.fontWeight=d,e.fontSize=u,e.fontFamily=p;const S=null!=(n=t.itemId)?n:t.id,w=this.getItemLabel(t),x=(null!=w?w:"<unknown>").replace(/\r?\n/g," ");e.text=this.truncate(x,c,C,b,y,S),f&&void 0!==t.line?(e.lineVisible=!0,e.markerVisible=m,e.setSeriesStrokeOffset(null!=(s=g.length)?s:5)):(e.lineVisible=!1,e.markerVisible=!0),v.push(e.computeBBox())}),e=Math.max(1,e),t=Math.max(1,t),!isFinite(e))return!1;const S=this.size,w=this.oldSize;S[0]=e,S[1]=t,S[0]===w[0]&&S[1]===w[1]||(w[0]=S[0],w[1]=S[1]);const{pages:x,maxPageHeight:E,maxPageWidth:M}=this.updatePagination(v,e,t);this.pages=x,this.maxPageSize=[M-i,E-n];const A=this.pagination.currentPage,T=this.pages[A];this.pages.length<1||!T?this.visible=!1:(this.visible=!0,this.updatePositions(A),this.update())}truncate(e,t,i,n,s,r){const o=e.split("");let a=!1;if(e.length>t&&(e=`${e.substring(0,t)}`,a=!0),Math.floor(n+Fo.getTextSize(e,s).width)>i){let t="";const r=this.getCharacterWidths(s);let l=n+r["..."];for(const e of o){if(r[e]||(r[e]=Fo.getTextSize(e,s).width),l+=r[e],l>i)break;t+=e}e=t,a=!0}return a?(e+="...",this.truncatedItems.add(r)):this.truncatedItems.delete(r),e}updatePagination(e,t,i){const n=this.getOrientation(),s=Math.min(this.paginationTrackingIndex,e.length);this.pagination.orientation=n,this.pagination.translationX=0,this.pagination.translationY=0;const{pages:r,maxPageHeight:o,maxPageWidth:a,paginationBBox:l,paginationVertical:c}=this.calculatePagination(e,t,i),h=r.findIndex(e=>e.endIndex>=s);this.pagination.currentPage=zn(0,h,r.length-1);const{paddingX:d,paddingY:u}=this.item,p=a-d,g=o-u;let f=0,m=-l.y-this.item.marker.size/2;return c?m+=g+8:(f+=-l.x+p+8,m+=(g-l.height)/2),this.pagination.translationX=f,this.pagination.translationY=m,this.pagination.update(),this.pagination.updateMarkers(),{maxPageHeight:o,maxPageWidth:a,pages:r}}calculatePagination(e,t,i){var n,s,r;const{paddingX:o,paddingY:a}=this.item,l=this.getOrientation(),c=["left","right"].includes(this.position);let h=this.pagination.computeBBox(),d=new ts(0,0,0,0),u=[],p=0,g=0,f=0;const m=e=>e.width===h.width&&e.height===h.height,v=void 0!==this.maxWidth&&void 0!==this.maxHeight;do{if(f++>10){O.warn("unable to find stable legend layout.");break}h=d;const m=t-(c?0:h.width),y=du({orientation:l,bboxes:e,maxHeight:i-(c?h.height:0),maxWidth:m,itemPaddingY:a,itemPaddingX:o,forceResult:v});u=null!=(n=null==y?void 0:y.pages)?n:[],p=null!=(s=null==y?void 0:y.maxPageWidth)?s:0,g=null!=(r=null==y?void 0:y.maxPageHeight)?r:0;const C=u.length;if(this.pagination.visible=C>1,this.pagination.totalPages=C,this.pagination.update(),d=this.pagination.computeBBox(),!this.pagination.visible)break}while(!m(d));return{maxPageWidth:p,maxPageHeight:g,pages:u,paginationBBox:h,paginationVertical:c}}getPageItemCount(e){let t=0;for(const i of this.pages[e].columns)t+=i.indices.length;return t}getNodeIndexFromFocusIndex(){const{index:e}=this.focus,t=this.pages[this.pagination.currentPage];let i=0;for(const n of t.columns){if(e<i+n.indices.length)return n.indices[e-i];i+=n.indices.length}return-1}updatePositions(e=0){const{item:{paddingY:t},itemSelection:i,pages:n}=this;if(n.length<1||!n[e])return;const{columns:s,startIndex:r,endIndex:o}=n[e];let a=0,l=0;const c=s.length,h=s[0].indices.length,d="horizontal"===this.getOrientation(),u=s[0].bboxes[0].height+t,p=[];i.each((e,t,i)=>{var n,g;if(i<r||i>o)return void(e.visible=!1);const f=i-r;let m=0,v=0;d?(m=f%c,v=Math.floor(f/c)):(m=Math.floor(f/h),v=f%h),e.visible=!0;const y=s[m];y&&(l=u*v,a=null!=(n=p[v])?n:0,p[v]=(null!=(g=p[v])?g:0)+y.columnWidth,e.translationX=Math.floor(a),e.translationY=Math.floor(l))})}updatePageNumber(e){const{pages:t}=this,{startIndex:i,endIndex:n}=t[e];0===i?this.paginationTrackingIndex=0:e===t.length-1?this.paginationTrackingIndex=n:this.paginationTrackingIndex=Math.floor((i+n)/2),this.pagination.update(),this.pagination.updateMarkers(),this.updatePositions(e),this.ctx.updateService.update(6)}update(){const{label:{color:e},marker:t,line:i,showSeriesStroke:n}=this.item;this.itemSelection.each((s,r)=>{var o,a;const l=r.marker;s.markerFill=l.fill,s.markerStroke=l.stroke,s.markerStrokeWidth=null!=(o=t.strokeWidth)?o:Math.min(2,l.strokeWidth),s.markerFillOpacity=l.fillOpacity,s.markerStrokeOpacity=l.strokeOpacity,s.opacity=r.enabled?1:.5,s.color=e;const{line:c}=r;n&&void 0!==c&&(s.lineStroke=c.stroke,s.lineStrokeOpacity=c.strokeOpacity,s.lineStrokeWidth=null!=(a=i.strokeWidth)?a:Math.min(2,c.strokeWidth),s.lineLineDash=c.lineDash)})}getDatumForPoint(e,t){const i=[],n={dist:1/0,datum:void 0};for(const s of this.group.children){if(!s.visible)continue;if(!(s instanceof gu))continue;const r=s.computeBBox();if(r.grow(this.item.paddingX/2,"horizontal"),r.grow(this.item.paddingY/2,"vertical"),r.containsPoint(e,t))return s.datum;const o=e-r.x-this.item.paddingX/2,a=t-r.y-this.item.paddingY/2,l=f(o,2)+f(a,2);o>=0&&a>=0&&l<n.dist&&(n.dist=l,n.datum=s.datum),i.push(r)}if(ts.merge(i).containsPoint(e,t))return n.datum}computePagedBBox(){const e=this.group.computeBBox();if(this.pages.length<=1)return e;const[t,i]=this.maxPageSize;return e.height=Math.max(i,e.height),e.width=Math.max(t,e.width),e}checkLegendClick(e){const t=this.getDatumForPoint(e.offsetX,e.offsetY);this.doClick(t)&&e.consume()}doClick(e){const{listeners:{legendItemClick:t},ctx:{chartService:i,highlightManager:n},item:{toggleSeriesVisible:s},preventHidingAll:r}=this;if(!e)return!1;const{id:o,itemId:a,enabled:l}=e,c=i.series.find(e=>e.id===o);if(!c)return!1;let h=l;if(s){h=!l,r&&!h&&i.series.flatMap(e=>e.getLegendData("category")).filter(e=>e.enabled).length<2&&(h=!0);const t=h?"visible":"hidden";this.ctx.ariaAnnouncementService.announceValue(`${t}`),this.ctx.chartEventManager.legendItemClick(c,a,h,e.legendItemName)}return h?n.updateHighlight(this.id,{series:c,itemId:a,datum:void 0}):n.updateHighlight(this.id),this.ctx.updateService.update(2,{forceNodeDataRefresh:!0}),null==t||t({type:"click",enabled:h,itemId:a,seriesId:c.id}),!0}checkLegendDoubleClick(e){var t;const{listeners:{legendItemDoubleClick:i},ctx:{chartService:n},item:{toggleSeriesVisible:s}}=this;if("integrated"===n.mode)return;const r=this.getDatumForPoint(e.offsetX,e.offsetY);if(!r)return;const{id:o,itemId:a,seriesId:l}=r,c=n.series.find(e=>e.id===o);if(c){if(e.consume(),s){const e=n.series.flatMap(e=>e.getLegendData("category")),i=e.filter(e=>e.enabled).length,s=e.find(e=>e.itemId===a&&e.seriesId===l);this.ctx.chartEventManager.legendItemDoubleClick(c,a,null!=(t=null==s?void 0:s.enabled)&&t,i,null==s?void 0:s.legendItemName)}this.ctx.updateService.update(2,{forceNodeDataRefresh:!0}),null==i||i({type:"dblclick",enabled:!0,itemId:a,seriesId:c.id})}}handleLegendMouseMove(e){if(!this.enabled)return;const{offsetX:t,offsetY:i}=e;e.consume();const n=this.getDatumForPoint(t,i);this.doHover(e,n)}doHover(e,t){var i;const{item:{toggleSeriesVisible:n},listeners:s}=this;if(void 0===e||void 0===t)return this.ctx.cursorManager.updateCursor(this.id),void this.ctx.highlightManager.updateHighlight(this.id);const r=t?this.ctx.chartService.series.find(e=>e.id===(null==t?void 0:t.id)):void 0;if(t&&this.truncatedItems.has(null!=(i=t.itemId)?i:t.id)){const{offsetX:i,offsetY:n}=e;this.ctx.tooltipManager.updateTooltip(this.id,{offsetX:i,offsetY:n,lastPointerEvent:e,showArrow:!1},sl({content:this.getItemLabel(t)}))}else this.ctx.tooltipManager.removeTooltip(this.id);(n||null!=s.legendItemClick||null!=s.legendItemDoubleClick)&&this.ctx.cursorManager.updateCursor(this.id,"pointer"),(null==t?void 0:t.enabled)&&r?this.ctx.highlightManager.updateHighlight(this.id,{series:r,itemId:null==t?void 0:t.itemId,datum:void 0}):this.ctx.highlightManager.updateHighlight(this.id)}handleLegendMouseExit(e){this.doMouseExit()}doMouseExit(){this.ctx.cursorManager.updateCursor(this.id),this.ctx.tooltipManager.removeTooltip(this.id),16===this.ctx.interactionManager.getState()&&this.ctx.highlightManager.updateHighlight(this.id)}handleLegendMouseEnter(e){const{enabled:t,item:{toggleSeriesVisible:i},listeners:{legendItemClick:n,legendItemDoubleClick:s}}=this,r=this.getDatumForPoint(e.offsetX,e.offsetY);t&&void 0!==r&&(i||null!=n||null!=s)&&this.ctx.cursorManager.updateCursor(this.id,"pointer")}onBlur(e){this.doMouseExit(),this.focus.mode="item",this.ctx.regionManager.updateFocusIndicatorRect(void 0)}onTab(e){this.updateFocus(),e.consume()}onTabStart(e){if(!this.pagination.visible||!this.pagination.enabled)return;const t=t=>{this.focus.mode=t,this.updateFocus(),e.consume()};"item"===this.focus.mode&&1===e.delta?(this.focus.index=0===this.pagination.currentPage?1:0,t("page")):"page"===this.focus.mode&&-1===e.delta&&(this.focus.index=0,t("item"))}onNav(e){if("item"===this.focus.mode){const t=this.focus.index+e.delta,i=this.getPageItemCount(this.pagination.currentPage);this.focus.index=zn(-1,t,i),this.updateFocus(),e.consume()}else"page"===this.focus.mode&&(e.delta<0&&(this.focus.index=0),e.delta>0&&(this.focus.index=1),this.updateFocus(),e.consume())}onSubmit(e){"item"===this.focus.mode?this.doClick(this.getFocusedItem().datum):"page"===this.focus.mode&&(0===this.focus.index&&this.pagination.clickPrevious(),1===this.focus.index&&this.pagination.clickNext(),this.ctx.ariaAnnouncementService.announceValue(`Legend page ${this.pagination.currentPage+1} of ${this.pages.length}`))}maybeChangeFocusPage(){const e=this.pagination.currentPage,t=this.getPageItemCount(e);if(-1===this.focus.index)this.pagination.setPage(e-1);else{if(this.focus.index!==t)return;this.pagination.setPage(e+1)}const{currentPage:i}=this.pagination;e===i?this.focus.index=zn(0,this.focus.index,t-1):-1===this.focus.index?this.focus.index=this.getPageItemCount(i)-1:this.focus.index=0}getFocusedItem(){if("item"!==this.focus.mode)return O.error("getFocusedItem() should be called only when focus.mode is 'item'"),{nodeIndex:-1,node:void 0,datum:void 0};this.maybeChangeFocusPage();const e=this.getNodeIndexFromFocusIndex();if(e<0)return O.error(`Cannot access negative nodeIndex ${e}`),{nodeIndex:-1,node:void 0,datum:void 0};const t=this.itemSelection.nodes()[e];let i;return e<this.data.length?i=this.data[e]:O.error(`Cannot access datum[${e}]`),{nodeIndex:e,node:t,datum:i}}updateFocus(){const{focus:e,pagination:t}=this;if("item"===e.mode){const{nodeIndex:e,node:t,datum:i}=this.getFocusedItem();if(void 0===i)return;const n=null==t?void 0:t.computeTransformedBBox();this.doHover(oh(this.ctx.regionManager,{bbox:n,showFocusBox:!0}),i);const s=i&&this.getItemLabel(i);if(s){const t=i.enabled?"visible":"hidden";this.ctx.ariaAnnouncementService.announceValue(`Legend item ${e+1} of ${this.data.length}, ${s}, ${t}`)}}else if("page"===e.mode){const i=0===e.index?t.previousButton:t.nextButton;this.ctx.regionManager.updateFocusIndicatorRect(i.computeTransformedBBox());const n=["Previous legend page","Next legend page"][e.index];this.ctx.ariaAnnouncementService.announceValue(`${n}, button`)}}positionLegend(e){const t=e.clone();if(!this.enabled||!this.data.length)return{shrinkRect:t};const[i,n]=this.calculateLegendDimensions(e);this.group.translationX=0,this.group.translationY=0,this.calcLayout(i,n);const s=this.computePagedBBox(),r=()=>{switch(this.position){case"top":case"left":return 0;case"bottom":return e.height-s.height;default:return e.width-s.width}};if(this.visible){let i,n;switch(this.position){case"top":case"bottom":i=(e.width-s.width)/2,n=r(),t.shrink(s.height,this.position);break;default:i=r(),n=(e.height-s.height)/2,t.shrink(s.width,this.position)}this.group.translationX=Math.floor(-s.x+e.x+i),this.group.translationY=Math.floor(-s.y+e.y+n)}if(this.visible&&this.enabled&&this.data.length){const e=this.spacing;t.shrink(e,this.position);const i=s.clone();i.x+=this.group.translationX,i.y+=this.group.translationY}return{shrinkRect:t}}calculateLegendDimensions(e){const{width:t,height:i}=e,n=t/i;let s,r;switch(this.position){case"top":case"bottom":const e=n<1?Math.min(.5,1/n*.2):.2;s=this.maxWidth?Math.min(this.maxWidth,t):t,r=this.maxHeight?Math.min(this.maxHeight,i):Math.round(i*e);break;default:const o=n>1?Math.min(.5,.25*n):.25;s=this.maxWidth?Math.min(this.maxWidth,t):Math.round(t*o),r=this.maxHeight?Math.min(this.maxHeight,i):i}return[s,r]}};Eu.className="Legend",S([$s(Zs)],Eu.prototype,"pagination",2),S([$s(Zs)],Eu.prototype,"item",2),S([$s(Zs)],Eu.prototype,"listeners",2),S([Za(e=>e.updateGroupVisibility()),$s(Js)],Eu.prototype,"enabled",2),S([$s(Ar)],Eu.prototype,"position",2),S([$s(sr,{optional:!0})],Eu.prototype,"maxWidth",2),S([$s(sr,{optional:!0})],Eu.prototype,"maxHeight",2),S([$s(Js,{optional:!0})],Eu.prototype,"reverseOrder",2),S([$s(Fr(["horizontal","vertical"],"an orientation"),{optional:!0})],Eu.prototype,"orientation",2),S([$s(Js,{optional:!0})],Eu.prototype,"preventHidingAll",2),S([$s(sr)],Eu.prototype,"spacing",2);var Mu={type:"legend",optionsKey:"legend",identifier:"category",chartTypes:["cartesian","polar","hierarchy","topology"],instanceConstructor:Eu,packageType:"community"},Au=class extends ud{constructor(){super(...arguments),this.zIndex=3,this._fill="#f2f2f2",this._stroke="#999999",this._strokeWidth=1,this._lineCap="square",this._centerX=0,this._centerY=0,this._width=8,this._gripLineGap=2,this._gripLineLength=8,this._height=16}set centerX(e){this._centerX!==e&&(this._centerX=e,this.dirtyPath=!0)}get centerX(){return this._centerX}set centerY(e){this._centerY!==e&&(this._centerY=e,this.dirtyPath=!0)}get centerY(){return this._centerY}set width(e){this._width!==e&&(this._width=e,this.dirtyPath=!0)}get width(){return this._width}set gripLineGap(e){this._gripLineGap!==e&&(this._gripLineGap=e,this.dirtyPath=!0)}get gripLineGap(){return this._gripLineGap}set gripLineLength(e){this._gripLineLength!==e&&(this._gripLineLength=e,this.dirtyPath=!0)}get gripLineLength(){return this._gripLineLength}set height(e){this._height!==e&&(this._height=e,this.dirtyPath=!0)}get height(){return this._height}layout(e,t){this.centerX=e,this.centerY=t}static align(e,t,i,n,s,r,o,a){const l=e.strokeWidth/2,c=e.align(i+s*o)+l,h=c+e.align(i+s*o,s*(a-o))-2*l,d=e.align(n+r/2)+l;e.layout(c,d),t.layout(h,d)}computeBBox(){const{centerX:e,centerY:t,width:i,height:n}=this;return new ts(e-i/2,t-n/2,i,n)}isPointInPath(e,t){const i=this.transformPoint(e,t);return this.computeBBox().containsPoint(i.x,i.y)}updatePath(){var e,t,i;const{centerX:n,centerY:s,path:r,strokeWidth:o,gripLineGap:a,gripLineLength:l}=this,c=null!=(i=null==(t=null==(e=this.layerManager)?void 0:e.canvas)?void 0:t.pixelRatio)?i:1;r.clear();const h=Math.floor(this.width/2*c)/c,d=Math.floor(this.height/2*c)/c;r.moveTo(n-h,s-d),r.lineTo(n+h,s-d),r.lineTo(n+h,s+d),r.lineTo(n-h,s+d),r.closePath();const u=Math.floor((a+o)/2*c)/c,p=Math.floor(l/2*c)/c;r.moveTo(n-u,s-p),r.lineTo(n-u,s+p),r.moveTo(n+u,s-p),r.lineTo(n+u,s+p)}};Au.className="RangeHandle",S([$s(mr)],Au.prototype,"_fill",2),S([$s(mr)],Au.prototype,"_stroke",2),S([$s(sr)],Au.prototype,"_strokeWidth",2),S([$s(xr)],Au.prototype,"_lineCap",2),S([$s(sr)],Au.prototype,"_width",2),S([$s(sr)],Au.prototype,"_gripLineGap",2),S([$s(sr)],Au.prototype,"_gripLineLength",2),S([$s(sr)],Au.prototype,"_height",2);var Tu=class extends ud{constructor(){super(...arguments),this.zIndex=2,this.x=0,this.y=0,this.width=200,this.height=30,this.min=0,this.max=1}layout(e,t,i,n){this.x=e,this.y=t,this.width=i,this.height=n,this.dirtyPath=!0}update(e,t){this.min=isNaN(e)?this.min:e,this.max=isNaN(t)?this.max:t,this.dirtyPath=!0}computeBBox(){const{x:e,y:t,width:i,height:n}=this;return new ts(e,t,i,n)}computeVisibleRangeBBox(){const{x:e,y:t,width:i,height:n,min:s,max:r}=this,o=e+i*s;return new ts(o,t,e+i*r-o,n)}updatePath(){const{path:e,x:t,y:i,width:n,height:s,min:r,max:o,strokeWidth:a}=this,l=a/2;e.clear();const c=this.align(t)+l,h=this.align(i)+l,d=c+this.align(t,n)-2*l,u=h+this.align(i,s)-2*l;e.moveTo(c,h),e.lineTo(d,h),e.lineTo(d,u),e.lineTo(c,u),e.closePath();const p=this.align(t+n*r)+l,g=p+this.align(t+n*r,n*(o-r))-2*l;e.moveTo(p,h),e.lineTo(p,u),e.lineTo(g,u),e.lineTo(g,h),e.closePath()}};Tu.className="RangeMask";var Du=class extends Eo{constructor(e){super({name:"rangeSelectorGroup",layer:!0,zIndex:12}),this.x=0,this.y=0,this.width=200,this.height=30,this.lOffset=0,this.rOffset=0,this.isContainerNode=!0,this.background=new Eo({name:"navigator-background"}),this.background.zIndex=1,this.appendChild(this.background),this.append(e)}layout(e,t,i,n,s,r){this.x=e,this.y=t,this.width=i,this.height=n,this.lOffset=s,this.rOffset=r,this.background.translationX=e,this.background.translationY=t}updateBackground(e,t){null!=e&&this.background.removeChild(e),null!=t&&this.background.appendChild(t)}computeBBox(){const{x:e,y:t,width:i,height:n,lOffset:s,rOffset:r}=this;return new ts(e-s,t,i+(s+r),n)}},Iu=class extends we{constructor(e){super(),this.ctx=e,this.miniChart=void 0,this.enabled=!1,this.mask=new Tu,this.minHandle=new Au,this.maxHandle=new Au,this.height=30,this.margin=10,this.x=0,this.y=0,this.width=0,this.rangeSelector=new Du([this.mask,this.minHandle,this.maxHandle]),this._min=0,this._max=1,this.minRange=.001;const t=e.regionManager.addRegion("navigator",this.rangeSelector);this.destroyFns.push(e.scene.attachNode(this.rangeSelector),t.addListener("hover",e=>this.onHover(e),25),t.addListener("drag-start",e=>this.onDragStart(e),25),t.addListener("drag",e=>this.onDrag(e),25),t.addListener("drag-end",()=>this.onDragEnd(),25),t.addListener("leave",e=>this.onLeave(e),25),e.zoomManager.addListener("zoom-change",e=>this.onZoomChange(e))),this.updateGroupVisibility()}updateBackground(e,t){var i;null==(i=this.rangeSelector)||i.updateBackground(e,t)}updateGroupVisibility(){const{enabled:e}=this;null!=this.rangeSelector&&e!==this.rangeSelector.visible&&(this.rangeSelector.visible=e,e?this.updateZoom():this.ctx.zoomManager.updateZoom("navigator"))}performLayout(e){return x(this,arguments,function*({shrinkRect:e}){if(this.enabled){const t=this.height+this.margin;e.shrink(t,"bottom"),this.y=e.y+e.height+this.margin}else this.y=0;return{shrinkRect:e}})}performCartesianLayout(e){return x(this,null,function*(){const{x:t,width:i}=e.seriesRect;if(this.enabled){const{y:e,height:n}=this;this.layoutNodes(t,e,i,n)}this.x=t,this.width=i})}onHover(e){if(!this.enabled)return;const{mask:t,minHandle:i,maxHandle:n}=this,{offsetX:s,offsetY:r}=e;i.containsPoint(s,r)||n.containsPoint(s,r)?this.ctx.cursorManager.updateCursor("navigator","ew-resize"):t.computeVisibleRangeBBox().containsPoint(s,r)?this.ctx.cursorManager.updateCursor("navigator","grab"):this.ctx.cursorManager.updateCursor("navigator")}onDragStart(e){if(!this.enabled)return;const{mask:t,minHandle:i,maxHandle:n,x:s,width:r,_min:o}=this,{offsetX:a,offsetY:l}=e;i.zIndex<n.zIndex?n.containsPoint(a,l)?this.dragging="max":i.containsPoint(a,l)&&(this.dragging="min"):i.containsPoint(a,l)?this.dragging="min":n.containsPoint(a,l)&&(this.dragging="max"),null==this.dragging&&t.computeVisibleRangeBBox().containsPoint(a,l)&&(this.dragging="pan",this.panStart=(a-s)/r-o),null!=this.dragging&&this.ctx.zoomManager.fireZoomPanStartEvent("navigator")}onDrag(e){if(!this.enabled||null==this.dragging)return;const{dragging:t,minRange:i,panStart:n,x:s,width:r}=this;let{_min:o,_max:a}=this;const{offsetX:l}=e,c=(l-s)/r;if("min"===t)o=zn(0,c,a-i);else if("max"===t)a=zn(o+i,c,1);else if("pan"===t&&null!=n){const e=a-o;o=zn(0,c-n,1-e),a=o+e}this._min=o,this._max=a,this.updateZoom()}onDragEnd(){this.dragging=void 0}onLeave(e){this.ctx.cursorManager.updateCursor("navigator")}onZoomChange(e){const{x:t}=e;t&&(this._min=t.min,this._max=t.max,this.updateNodes(t.min,t.max))}layoutNodes(e,t,i,n){const{rangeSelector:s,mask:r,minHandle:o,maxHandle:a,_min:l,_max:c}=this;s.layout(e,t,i,n,o.width/2,a.width/2),r.layout(e,t,i,n),Au.align(o,a,e,t,i,n,l,c),l+(c-l)/2<.5?(o.zIndex=3,a.zIndex=4):(o.zIndex=4,a.zIndex=3)}updateNodes(e,t){this.mask.update(e,t)}updateZoom(){if(!this.enabled)return;const{_min:e,_max:t}=this,i=this.ctx.zoomManager.getZoom();return null!=e&&null!=t?this.ctx.zoomManager.updateZoom("navigator",{x:{min:e,max:t},y:null==i?void 0:i.y},!1,e=>{null==this.min&&null==this.max||O.warnOnce(`Could not apply [navigator.min] or [navigator.max] as [${e}] has modified the initial zoom state.`)}):void 0}};S([$s(Zs,{optional:!0})],Iu.prototype,"miniChart",2),S([$s(Js),Za(e=>e.updateGroupVisibility())],Iu.prototype,"enabled",2),S([$s(sr)],Iu.prototype,"height",2),S([$s(sr)],Iu.prototype,"margin",2),S([Xa({newValue(e){this._min=e,this.updateZoom()}}),$s(qs(rr,dr("max")),{optional:!0})],Iu.prototype,"min",2),S([Xa({newValue(e){this._max=e,this.updateZoom()}}),$s(qs(rr,ur("min")),{optional:!0})],Iu.prototype,"max",2);var Ru={type:"root",optionsKey:"navigator",packageType:"community",chartTypes:["cartesian"],instanceConstructor:Iu,themeTemplate:{navigator:{enabled:!1,height:30,mask:{fill:"#999999",stroke:"#999999",strokeWidth:1,fillOpacity:.2},minHandle:{fill:"#f2f2f2",stroke:"#999999",strokeWidth:1,width:9,height:16,gripLineGap:1,gripLineLength:8},maxHandle:{fill:"#f2f2f2",stroke:"#999999",strokeWidth:1,width:9,height:16,gripLineGap:1,gripLineLength:8}}}},Lu=({takeColors:e})=>{const{fills:[t],strokes:[i]}=e(1);return{fill:t,stroke:i}},ku=e=>{const{fill:t,stroke:i}=Lu(e);return{marker:{fill:t,stroke:i}}};function Pu(e,t,i,n,s){const{addPhaseFn:r,updatePhaseFn:o,removePhaseFn:a}=s,l=(n,s,r)=>{i.animate({id:`${e}_${t}_${s.id}_${n}`,groupId:e,from:0,to:1,ease:Cs,collapsable:!1,onUpdate(e,t){t&&"removed"!==n||(s.path.clear(!0),r(e,s),s.checkPathDirty())},onStop(){"added"===n&&(s.path.clear(!0),r(1,s),s.checkPathDirty())},phase:Rs[n]})};for(const e of n)i.isSkipped()||(l("removed",e,a),l("updated",e,o)),l("added",e,r)}var Nu=null;function Ou(e){if(null!=e)return""===e?"":(null!=Nu||(Nu=En("div")),Nu.textContent=String(e),Nu.innerHTML)}function _u({id:e},t,i,...n){ks(e,t,i,n,{opacity:0},{opacity:1},{phase:"trailing"})}function Fu({id:e},t,i,...n){ks(e,t,i,n,{opacity:1},{opacity:0},{phase:"remove"})}function Gu(e){return{opacity:1}}var Vu=class extends yt{constructor(){super(...arguments),this._dirty=3}markDirty(e,t=1){this._dirty<t&&(this._dirty=t)}markClean(e){this._dirty=0}isDirty(){return this._dirty>0}},Bu=class extends Vu{constructor(){super(...arguments),this.enabled=!0,this.color="rgba(0, 0, 0, 0.5)",this.xOffset=0,this.yOffset=0,this.blur=5}};S([$s(Js),ss({redraw:3})],Bu.prototype,"enabled",2),S([$s(mr),ss({redraw:3})],Bu.prototype,"color",2),S([$s(ir),ss({redraw:3})],Bu.prototype,"xOffset",2),S([$s(ir),ss({redraw:3})],Bu.prototype,"yOffset",2),S([$s(sr),ss({redraw:3})],Bu.prototype,"blur",2);var Hu=Br(e=>Pd(e)||"function"==typeof vd&&Object.create(e.prototype)instanceof vd,"a marker shape keyword such as 'circle', 'diamond' or 'square' or an object extending the Marker class"),zu=class extends Vu{constructor(){super(...arguments),this.enabled=!0,this.shape=yd,this.size=6,this.fillOpacity=1,this.strokeWidth=1,this.strokeOpacity=1}getStyle(){const{size:e,fill:t,fillOpacity:i,stroke:n,strokeWidth:s,strokeOpacity:r}=this;return{size:e,fill:t,fillOpacity:i,stroke:n,strokeWidth:s,strokeOpacity:r}}getDiameter(){return this.size+this.strokeWidth}};S([$s(Js),ss({redraw:3})],zu.prototype,"enabled",2),S([$s(Hu),ss({redraw:3})],zu.prototype,"shape",2),S([$s(sr),ss({redraw:3})],zu.prototype,"size",2),S([$s(mr,{optional:!0}),ss({redraw:3})],zu.prototype,"fill",2),S([$s(rr),ss({redraw:3})],zu.prototype,"fillOpacity",2),S([$s(mr,{optional:!0}),ss({redraw:3})],zu.prototype,"stroke",2),S([$s(sr),ss({redraw:3})],zu.prototype,"strokeWidth",2),S([$s(rr),ss({redraw:3})],zu.prototype,"strokeOpacity",2),S([$s(er,{optional:!0}),ss({redraw:3})],zu.prototype,"formatter",2);var Uu=class extends yt{constructor(){super(...arguments),this.enabled=!1}};S([$s(Js)],Uu.prototype,"enabled",2);var Wu=class extends yt{constructor(){super(...arguments),this.enabled=!0,this.interaction=new Uu,this.position=new rl}toTooltipHtml(e,t){return this.renderer?sl(this.renderer(t),e):sl(e)}};S([$s(Js)],Wu.prototype,"enabled",2),S([$s(Js,{optional:!0})],Wu.prototype,"showArrow",2),S([$s(er,{optional:!0})],Wu.prototype,"renderer",2),S([$s(Zs)],Wu.prototype,"interaction",2),S([$s(Zs)],Wu.prototype,"position",2);var ju=class extends Wd{constructor(){super(...arguments),this.xName=void 0,this.fill="#c16068",this.fillOpacity=1,this.stroke="#874349",this.strokeWidth=2,this.strokeOpacity=1,this.lineDash=[0],this.lineDashOffset=0,this.shadow=new Bu,this.marker=new zu,this.label=new Bo,this.tooltip=new Wu,this.connectMissingData=!1}};function Ku({id:e},t,i,...n){ks(e,"markers",t,n,{opacity:0},{opacity:1},{phase:i?Rs[i]:"trailing"}),n.forEach(e=>e.cleanup())}function $u({id:e},t,...i){ks(e,"markers",t,i,{scalingX:0,scalingY:0},{scalingX:1,scalingY:1},{phase:"initial"}),i.forEach(e=>e.cleanup())}function Yu({id:e,nodeDataDependencies:t},i,...n){const s=t.seriesRectWidth;Ls(e,"markers",i,n,{fromFn:(e,t)=>{var i,n;const r=null!=(n=null==(i=t.midPoint)?void 0:i.x)?n:s;let o=zn(0,Es(r/s),1);return isNaN(o)&&(o=0),{scalingX:0,scalingY:0,delay:o,duration:.2,phase:"initial"}},toFn:()=>({scalingX:1,scalingY:1})})}function qu(e){return{opacity:1,scalingX:1,scalingY:1}}function Xu(e,t){var i,n,s,r;return{translationX:null!=(n=null==(i=t.point)?void 0:i.x)?n:NaN,translationY:null!=(r=null==(s=t.point)?void 0:s.y)?r:NaN}}function Zu(e,t){const i=(t,i)=>{const n=e[i][t];return Array.isArray(n)?n[0]:n},n=t=>{const{xValue:n}=t;return e.moved[n]?{point:i(n,"moved"),status:"updated"}:e.removed[n]?{point:i(n,"removed"),status:"removed"}:e.added[n]?{point:i(n,"added"),status:"added"}:{status:"unknown"}};return{fromFn:(e,i)=>{var s,r,o,a,l,c;const{status:h,point:d}=n(i);if("unknown"===h)return{opacity:0};const u={translationX:null!=(r=null==(s=null==d?void 0:d.from)?void 0:s.x)?r:e.translationX,translationY:null!=(a=null==(o=null==d?void 0:d.from)?void 0:o.y)?a:e.translationY,opacity:e.opacity,phase:Rs[h]};return"added"===t?y(v({},u),{opacity:0,translationX:null==(l=null==d?void 0:d.to)?void 0:l.x,translationY:null==(c=null==d?void 0:d.to)?void 0:c.y,phase:Rs.added}):("added"===h&&(u.opacity=0),u)},toFn:(e,i)=>{var s,r;const{status:o,point:a}=n(i);if("unknown"===o)return{opacity:0};const l={translationX:i.point.x,translationY:i.point.y,opacity:1,phase:Rs[o]};return"removed"===o||"removed"===t?y(v({},l),{translationX:null==(s=null==a?void 0:a.to)?void 0:s.x,translationY:null==(r=null==a?void 0:a.to)?void 0:r.y,opacity:0,phase:Rs.removed}):l}}}function Qu(e,{datumIndex:t}){const i=e.getNodeData();if(void 0===i)return;const n=i[t];if(void 0===n||void 0===n.point)return;const s=e.getFormattedMarkerStyle(n).size,r=s/2,{x:o,y:a}=e.contentGroup.inverseTransformPoint(n.point.x-r,n.point.y-r);return new ts(o,a,s,s)}function Ju(e){return e.reduce(({min:e,max:t},i)=>((null==e||e.point.x>i.point.x)&&(e=i),(null==t||t.point.x<i.point.x)&&(t=i),{min:e,max:t}),{})}function ep(e,t,i){const n=(t.y-e.y)/(t.x-e.x);return{x:i,y:(i-e.x)*n+e.y}}function tp(e,t,i,n){let s=-1,r=0;const o=[];for(;r<e.length;)e[r].change!==t?e[r].change!==i?(o.length>0&&(n(o,s,r),o.length=0),s=r,r++):r++:(o.push(e[r]),r++);o.length>0&&n(o,s,r)}function ip(e,t){tp(e,"out","in",(i,n,s)=>{var r,o;-1===n&&e[s]?i.forEach(t=>t.to=e[s].from):s===e.length&&e[n]?i.forEach(t=>t.to=e[n].from):"intersect"===t&&(null==(r=e[n])?void 0:r.from)&&(null==(o=e[s])?void 0:o.from)?i.forEach(t=>t.to=ep(e[n].from,e[s].from,t.from.x)):i.forEach(e=>e.to=e.from)}),tp(e,"in","out",(i,n,s)=>{var r,o;-1===n&&e[s]?i.forEach(t=>t.from=e[s].to):s===e.length&&e[n]?i.forEach(t=>t.from=e[n].to):"intersect"===t&&(null==(r=e[n])?void 0:r.to)&&(null==(o=e[s])?void 0:o.to)?i.forEach(t=>t.from=ep(e[n].to,e[s].to,t.to.x)):i.forEach(e=>e.from=e.to)})}function np(e,t,i){const n=isNaN(e.x)?t.x:e.x,s=isNaN(e.y)?t.y:e.y,r=t.x-e.x,o=t.y-e.y;return{x:n+(isNaN(r)?0:r*i),y:s+(isNaN(o)?0:o*i)}}function sp(e,t,i){const{path:n}=i;let s;for(const i of e){const{from:e,to:r}=i,o=t[i.change];if(null==o||null==e||null==r)continue;const{x:a,y:l}=np(e,r,o);if(!1===i.moveTo)n.lineTo(a,l);else if(!0!==i.moveTo&&s){if(s){const e="in"===i.moveTo?o:1-o,{x:t,y:r}=np(s,{x:a,y:l},e);n.lineTo(t,r),n.moveTo(a,l)}}else n.moveTo(a,l);s={x:a,y:l}}}function rp({id:e,visible:t,nodeDataDependencies:i},n,...s){const{seriesRectWidth:r,seriesRectHeight:o}=i;ks(e,"path_properties",n,s,{clipX:0},{clipX:r},{phase:"initial",start:{clipMode:"normal",clipY:o,visible:t},finish:{clipMode:void 0,visible:t}})}function op({id:e},t,i,n="add",...s){ks(e,t,i,s,{opacity:0},{opacity:1},{phase:n})}function ap({id:e},t,i,...n){ks(e,t,i,n,{opacity:1},{opacity:0},{phase:"remove"})}function lp(e){return t=>({opacity:e.getOpacity(),clipScalingX:1,clipMode:void 0})}function cp({nodeDataDependencies:e},t){const i=e=>isFinite(e)?e:0;t.clipX=i(e.seriesRectWidth),t.clipY=i(e.seriesRectHeight)}function hp(e){return"continuous"===e.type||"log"===e.type}function dp(e){return"category"===e.type}function up(e,t){return e.domain.length===t.domain.length&&e.range.length===t.range.length&&e.domain.every((e,i)=>e===t.domain[i])&&e.range.every((e,i)=>e===t.range[i])}function pp(e,t){return void 0===e||void 0===t?void 0!==e||void 0!==t:hp(e)&&hp(t)?e.type===t.type&&up(e,t):!(!dp(e)||!dp(t))&&up(e,t)}function gp(e,t){if(!t)return NaN;if(e instanceof Date&&(e=e.getTime()),"continuous"===t.type&&"number"==typeof e)return(e-t.domain[0])/(t.domain[1]-t.domain[0])*(t.range[1]-t.range[0])+t.range[0];if("log"===t.type&&"number"==typeof e)return t.convert(e);const i=t.domain.findIndex(t=>t===e);return i>=0?t.range[i]:NaN}function fp(e,t){const i=Number(e),n=Number(t);return isNaN(i)||isNaN(n)?e===t:Math.abs(n-i)<.25}function mp(e=!1,t=!1){return e===t?Boolean(e):e?"in":"out"}function vp(e,t,i={}){var n,s,r,o;const{backfillSplitMode:a="intersect"}=i,l=t=>{var i,n;return{x:gp(null!=(i=t.xValue)?i:NaN,e.scales.x),y:gp(null!=(n=t.yValue)?n:NaN,e.scales.y)}},c=e=>{var i,n;return{x:gp(null!=(i=e.xValue)?i:NaN,t.scales.x),y:gp(null!=(n=e.yValue)?n:NaN,t.scales.y)}},h=[],d={added:{},moved:{},removed:{}},u=(e,t,i,n="move")=>{e&&(isNaN(e.point.x)||isNaN(e.point.y))&&(e=t);const s={from:null==e?void 0:e.point,to:null==t?void 0:t.point,moveTo:mp(null==e?void 0:e.point.moveTo,null==t?void 0:t.point.moveTo),change:n};"move"===n?(d.moved[i]=s,v++,y++):"in"===n?(d.added[i]=s,y++):"out"===n&&(d.removed[i]=s,v++),h.push(s)},{min:p,max:g}=Ju(t.nodeData),{min:f,max:m}=Ju(e.nodeData);let v=0,y=0;for(;v<t.nodeData.length||y<e.nodeData.length;){const i=t.nodeData[v],a=e.nodeData[y],h=i?l(i):void 0,d=a?c(a):void 0,C=void 0;if(h&&fp(h.x,null==a?void 0:a.point.x))u(i,a,a.xValue,"move");else if(h&&h.x<(null!=(n=null==f?void 0:f.point.x)?n:-1/0))u(i,C,i.xValue,"out");else if(h&&h.x>(null!=(s=null==m?void 0:m.point.x)?s:1/0))u(i,C,i.xValue,"out");else if(d&&d.x<(null!=(r=null==p?void 0:p.point.x)?r:-1/0))u(C,a,a.xValue,"in");else if(d&&d.x>(null!=(o=null==g?void 0:g.point.x)?o:1/0))u(C,a,a.xValue,"in");else if(h&&h.x<(null==a?void 0:a.point.x))u(i,C,i.xValue,"out");else if(d&&d.x<(null==i?void 0:i.point.x))u(C,a,a.xValue,"in");else if(i)u(i,C,i.xValue,"out");else{if(!a)throw new Error("Unable to process points");u(C,a,a.xValue,"in")}}return ip(h,a),{result:h,resultMap:d}}function yp(e,t,i,n={}){var s,r,o;const{backfillSplitMode:a="intersect",multiDatum:l=!1}=n,c=[],h={added:{},moved:{},removed:{}},d={added:{},moved:{},removed:{}},u={in:"added",move:"moved",out:"removed"};let p,g;const f=(e,t)=>{var i;const n=u[t.change];l?(null!=(i=d[n])[e]||(i[e]=[]),d[n][e].push(t)):h[n][e]=t,p=t,g=qo(e)};let m=0,y=0,C=!1;for(;m<t.nodeData.length||y<e.nodeData.length;){const n=t.nodeData[m],a=e.nodeData[y],h=qo(null==n?void 0:n.xValue),d=qo(null==a?void 0:a.xValue);let u;if(h===d)u={change:"move",moveTo:mp(null!=(s=n.point.moveTo)&&s,a.point.moveTo),from:n.point,to:a.point},f(null==n?void 0:n.xValue,u),m++,y++;else if(null==i?void 0:i.removed.has(String(h)))u={change:"out",moveTo:null!=(r=n.point.moveTo)&&r,from:n.point},f(null==n?void 0:n.xValue,u),m++;else if(null==i?void 0:i.added.has(String(d)))u={change:"in",moveTo:null!=(o=a.point.moveTo)&&o,to:a.point},f(null==a?void 0:a.xValue,u),y++;else if(l&&p&&g===h)u=v({},p),f(null==n?void 0:n.xValue,u),m++;else{if(!l||!p||g!==d){C=!0;break}u=v({},p),f(null==a?void 0:a.xValue,u),y++}c.push(u)}let b=-1/0;return C||(C=c.some(e=>{const{change:t,to:{x:i=-1/0}={}}=e;if("out"===t)return;const n=i<b;return b=i,n})),C?{result:void 0,resultMap:void 0}:(ip(c,a),{result:c,resultMap:l?d:h})}function Cp(e,t,i){var n,s,r,o;let a="updated";const l=e=>e.visible;if(!l(t)&&l(e))a="added";else if(l(t)&&!l(e))a="removed";else for(let e=0;e<i.length&&"move"===i[e].change&&(null==(n=i[e].from)?void 0:n.x)===(null==(s=i[e].to)?void 0:s.x)&&(null==(r=i[e].from)?void 0:r.y)===(null==(o=i[e].to)?void 0:o.y);e++)if(e===i.length-1)return"no-op";return a}function bp(e,t,i,n,s){const r=Cp(e,t,i),o=function(e,t){const i="none"===t?"updated":e,n={fromFn:t=>{let n;return n="removed"===e?{finish:{visible:!1}}:"added"===e?{start:{visible:!0}}:{},v({phase:Rs[i]},n)},toFn:e=>({phase:Rs[i]})};return"fade"===t?{fromFn:t=>{const i="added"===e?0:t.opacity;return v({opacity:i},n.fromFn(t))},toFn:t=>v({opacity:"removed"===e?0:1},n.toFn(t))}:n}(r,n);return{status:r,path:{addPhaseFn:(e,t)=>{s(i,{move:1,in:e},t)},updatePhaseFn:(e,t)=>{s(i,{move:e},t)},removePhaseFn:(e,t)=>{s(i,{move:0,out:e},t)}},pathProperties:o}}function Sp(e,t,i){var n,s,r;const o="category"===(null==(n=e.scales.x)?void 0:n.type);if(o!==("category"===(null==(s=t.scales.x)?void 0:s.type)))return;const{result:a,resultMap:l}=o?yp(e,t,i):vp(e,t);let c="updated";if(t.visible&&!e.visible?c="removed":!t.visible&&e.visible&&(c="added"),void 0===a||void 0===l)return;const h=null==(r=null==i?void 0:i.changed)||r||function(e,t){return!pp(e.scales.x,t.scales.x)||!pp(e.scales.y,t.scales.y)}(e,t)||"updated"!==c,d=bp(e,t,a,"fade",sp),u=Zu(l,c);return y(v({},d),{marker:u,hasMotion:h})}S([$s(tr)],ju.prototype,"xKey",2),S([$s(tr,{optional:!0})],ju.prototype,"xName",2),S([$s(tr)],ju.prototype,"yKey",2),S([$s(tr,{optional:!0})],ju.prototype,"yName",2),S([$s(sr,{optional:!0})],ju.prototype,"normalizedTo",2),S([$s(mr)],ju.prototype,"fill",2),S([$s(rr)],ju.prototype,"fillOpacity",2),S([$s(mr)],ju.prototype,"stroke",2),S([$s(sr)],ju.prototype,"strokeWidth",2),S([$s(rr)],ju.prototype,"strokeOpacity",2),S([$s(Mr)],ju.prototype,"lineDash",2),S([$s(sr)],ju.prototype,"lineDashOffset",2),S([$s(Zs)],ju.prototype,"shadow",2),S([$s(Zs)],ju.prototype,"marker",2),S([$s(Zs)],ju.prototype,"label",2),S([$s(Zs)],ju.prototype,"tooltip",2),S([$s(Js)],ju.prototype,"connectMissingData",2);var wp=(e=>(e[e.Fill=0]="Fill",e[e.Stroke=1]="Stroke",e[e.Marker=2]="Marker",e[e.Label=3]="Label",e))(wp||{});function xp(e){const{points:t,phantomPoints:i}=e.fillData;return{top:t,bottom:i}}function Ep(e,t,i){return{scales:t.scales,nodeData:i[e],visible:t.visible}}function Mp(e,t,i){var n,s;const r="category"===(null==(n=e.scales.x)?void 0:n.type);if(r!==("category"===(null==(s=t.scales.x)?void 0:s.type)))return;let o="updated";t.visible&&!e.visible?o="removed":!t.visible&&e.visible&&(o="added");const{resultMap:a}=r?yp(e,t,i,{backfillSplitMode:"static",multiDatum:!0}):vp(e,t,{backfillSplitMode:"static"}),{top:l,bottom:c}=r?function(e,t,i){const n=xp(t),s=xp(e),r={multiDatum:!0};return{top:yp(Ep("top",e,s),Ep("top",t,n),i,r),bottom:yp(Ep("bottom",e,s),Ep("bottom",t,n),i,r)}}(e,t,i):function(e,t){const i=xp(t),n=xp(e);return{top:vp(Ep("top",e,n),Ep("top",t,i)),bottom:vp(Ep("bottom",e,n),Ep("bottom",t,i))}}(e,t);if(void 0===a||void 0===l.result||void 0===c.result)return;const h=bp(e,t,[...l.result,...c.result.reverse()],!!t.stackVisible&&e.stackVisible?"none":"fade",sp),d=Zu(a,o);return{status:h.status,fill:h,marker:d}}var Ap=class extends jd{constructor(e){super({moduleCtx:e,directionKeys:Hd,directionNames:zd,pathsPerSeries:2,pathsZIndexSubOrderOffset:[0,1e3],hasMarkers:!0,markerSelectionGarbageCollection:!1,pickModes:[1,0],animationResetFns:{path:lp({getOpacity:()=>this.getOpacity()}),label:Gu,marker:(e,t)=>v(v({},{opacity:1,scalingX:1,scalingY:1}),Xu(0,t))}}),this.properties=new ju}processData(e){return x(this,null,function*(){var t,i;if(null==this.data||!this.properties.isValid())return;const{data:n,visible:s,seriesGrouping:{groupIndex:r=this.id,stackCount:o=1}={}}=this,{xKey:a,yKey:l,connectMissingData:c,normalizedTo:h}=this.properties,d=!this.ctx.animationManager.isSkipped(),u=null==(t=this.axes.x)?void 0:t.scale,p=null==(i=this.axes.y)?void 0:i.scale,{isContinuousX:g,xScaleType:f,yScaleType:m}=this.getScaleInformation({xScale:u,yScale:p}),C=[`area-stack-${r}-yValues`,`area-stack-${r}-yValues-trailing`,`area-stack-${r}-yValues-prev`,`area-stack-${r}-yValues-trailing-prev`,`area-stack-${r}-yValues-marker`],b=[];ke(h)&&(b.push(Ih([C[0],C[1],C[4]],h,"range")),b.push(Ih([C[2],C[3]],h,"range"))),!g&&d&&this.processedData&&b.push(_h(this.processedData)),d&&b.push(kh());const S={invalidValue:null};c&&o>1&&(S.invalidValue=0),s||(S.forceValue=0),yield this.requestDataModel(e,n,{props:[Uh(a,f,{id:"xValue"}),Wh(l,m,v({id:"yValueRaw"},S)),...Yh(l,"window","current",y(v({id:"yValueEnd"},S),{groupId:C[0]}),m),...Yh(l,"window-trailing","current",y(v({id:"yValueStart"},S),{groupId:C[1]}),m),...Yh(l,"window","last",y(v({id:"yValuePreviousEnd"},S),{groupId:C[2]}),m),...Yh(l,"window-trailing","last",y(v({id:"yValuePreviousStart"},S),{groupId:C[3]}),m),...Yh(l,"normal","current",y(v({id:"yValueCumulative"},S),{groupId:C[4]}),m),...b],groupByKeys:!0,groupByData:!1}),this.animationState.transition("updateData")})}getSeriesDomain(e){const{processedData:t,dataModel:i,axes:n}=this;if(!t||!i||0===t.data.length)return[];const s=n.x,r=n.y,o=i.resolveProcessedDataDefById(this,"xValue"),a=i.getDomain(this,"xValue","key",t),l=i.getDomain(this,"yValueEnd","value",t);return"x"===e?"key"===(null==o?void 0:o.def.type)&&"category"===o.def.valueType?a:qc(cn(a),s):qc(r instanceof tu||r instanceof nu?l:[l[0]>0?0:l[0],l[1]<0?0:l[1]],r)}createNodeData(){return x(this,null,function*(){var e;const{axes:t,data:i,processedData:{data:n}={},dataModel:s}=this,r=t.x,o=t.y;if(!(r&&o&&i&&s&&this.properties.isValid()))return;const{yKey:a,xKey:l,marker:c,label:h,fill:d,stroke:u,connectMissingData:p}=this.properties,{scale:g}=r,{scale:f}=o,{isContinuousY:m}=this.getScaleInformation({xScale:g,yScale:f}),C=(null!=(e=g.bandwidth)?e:0)/2,b=s.resolveProcessedDataDefsByIds(this,["yValueStart","yValueEnd","yValueRaw","yValuePreviousStart","yValuePreviousEnd","yValueCumulative"]),S=e=>y(v({},e),{point:y(v({},e.point),{moveTo:!0})}),w=(e,t,i)=>{const n=g.convert(e)+C,s=f.convert(t);return[{point:{x:n,y:f.convert(i)},yValue:i,xValue:e},{point:{x:n,y:s},yValue:t,xValue:e}]},x=(e,t,i)=>{let n;return(ke(this.properties.normalizedTo)?m&&$o(i):!isNaN(i))&&(n=t),{x:g.convert(e)+C,y:f.convert(n),size:c.size}},E=a,M=[],A=[],{visibleSameStackCount:T}=this.ctx.seriesStateManager.getVisiblePeerGroupIndex(this),D={itemId:E,fillData:{itemId:E,points:[],phantomPoints:[]},strokeData:{itemId:E,points:[]},labelData:M,nodeData:A,scales:this.calculateScaling(),visible:this.visible,stackVisible:T>0},I=D.fillData.points,R=D.fillData.phantomPoints,L=D.strokeData.points;let k,P=-1,N=-1/0;return null==n||n.forEach(e=>{const{keys:t,keys:[i],datum:n,values:r}=e;r.forEach((e,r)=>{var o,g,f;P++;const m=n[r],v=s.resolveProcessedDataDefsValues(b,{keys:t,values:e}),{yValueRaw:y,yValueCumulative:C}=v;let{yValueStart:T,yValueEnd:D,yValuePreviousStart:O,yValuePreviousEnd:_}=v;const F=null!=y,G=x(i,+C,y);if(F&&c&&A.push({index:P,series:this,itemId:E,datum:m,midPoint:{x:G.x,y:G.y},cumulativeValue:D,yValue:y,xValue:i,yKey:a,xKey:l,point:G,fill:null!=(o=c.fill)?o:d,stroke:null!=(g=c.stroke)?g:u,strokeWidth:null!=(f=c.strokeWidth)?f:this.getStrokeWidth(this.properties.strokeWidth)}),F&&h){const e=this.getLabelText(h,{value:y,datum:m,xKey:l,yKey:a,xName:this.properties.xName,yName:this.properties.yName},e=>We(e)?e.toFixed(2):String(e));M.push({index:P,series:this,itemId:a,datum:m,x:G.x,y:G.y,label:e?{text:e,fontStyle:h.fontStyle,fontWeight:h.fontWeight,fontSize:h.fontSize,fontFamily:h.fontFamily,textAlign:"center",textBaseline:"bottom",fill:h.color}:void 0})}const V=null!=k&&null!=i,B=null!=N&&F;B||(T=null!=T?T:0,D=null!=T?T:0,O=null!=O?O:0,_=null!=O?O:0);const[H,z]=w(k,O,_),[U,W]=w(i,T,D);!V||p&&!B||(I.push(H,U),R.push(z,W)),B&&P>0&&L.push(S(H),U),k=i,N=y})}),L.length>0&&(L[0]=S(L[0])),D})}isPathOrSelectionDirty(){return this.properties.marker.isDirty()}markerFactory(){const{shape:e}=this.properties.marker;return new(Nd(e))}updatePathNodes(e){return x(this,null,function*(){const{opacity:t,visible:i,animationEnabled:n}=e,[s,r]=e.paths,o=this.getStrokeWidth(this.properties.strokeWidth);r.setProperties({tag:1,fill:void 0,lineJoin:r.lineCap="round",pointerEvents:1,stroke:this.properties.stroke,strokeWidth:o,strokeOpacity:this.properties.strokeOpacity,lineDash:this.properties.lineDash,lineDashOffset:this.properties.lineDashOffset,opacity:t,visible:i}),s.setProperties({tag:0,stroke:void 0,lineJoin:"round",pointerEvents:1,fill:this.properties.fill,fillOpacity:this.properties.fillOpacity,lineDash:this.properties.lineDash,lineDashOffset:this.properties.lineDashOffset,strokeOpacity:this.properties.strokeOpacity,fillShadow:this.properties.shadow,opacity:t,visible:i||n,strokeWidth:o}),cp(this,r),cp(this,s)})}updatePaths(e){return x(this,null,function*(){this.updateAreaPaths(e.paths,e.contextData)})}updateAreaPaths(e,t){this.updateFillPath(e,t),this.updateStrokePath(e,t)}updateFillPath(e,t){const{fillData:i}=t,[n]=e,{path:s}=n;let r;s.clear(!0);for(const{point:e}of P(i.points,function*(e){for(let t=e.length-1;t>=0;t--)yield e[t]}(i.phantomPoints)))e.moveTo?s.moveTo(e.x,e.y):(null==r?void 0:r.y)!==e.y&&(r&&s.lineTo(r.x,r.y),s.lineTo(e.x,e.y)),r=e;r&&s.lineTo(r.x,r.y),s.closePath(),n.checkPathDirty()}updateStrokePath(e,t){const{strokeData:i}=t,[,n]=e,{path:s}=n;s.clear(!0);for(const{point:e}of i.points)e.moveTo?s.moveTo(e.x,e.y):s.lineTo(e.x,e.y);n.checkPathDirty()}updateMarkerSelection(e){return x(this,null,function*(){const{nodeData:t,markerSelection:i}=e;return this.properties.marker.isDirty()&&(i.clear(),i.cleanup()),i.update(this.properties.marker.enabled?t:[])})}updateMarkerNodes(e){return x(this,null,function*(){const{markerSelection:t,isHighlight:i}=e,{xKey:n,yKey:s,marker:r,fill:o,stroke:a,strokeWidth:l,fillOpacity:c,strokeOpacity:h,highlightStyle:d}=this.properties,u=Xe(i&&d.item,r.getStyle(),{fill:o,stroke:a,strokeWidth:l,fillOpacity:c,strokeOpacity:h});t.each((e,t)=>{this.updateMarkerStyle(e,r,{datum:t,highlighted:i,xKey:n,yKey:s},u)}),i||this.properties.marker.markClean()})}updateLabelSelection(e){return x(this,null,function*(){const{labelData:t,labelSelection:i}=e;return i.update(t,e=>{e.tag=3})})}updateLabelNodes(e){return x(this,null,function*(){const{labelSelection:t}=e,{enabled:i,fontStyle:n,fontWeight:s,fontSize:r,fontFamily:o,color:a}=this.properties.label;t.each((e,t)=>{const{x:l,y:c,label:h}=t;h&&i&&this.visible?(e.fontStyle=n,e.fontWeight=s,e.fontSize=r,e.fontFamily=o,e.textAlign=h.textAlign,e.textBaseline=h.textBaseline,e.text=h.text,e.x=l,e.y=c-10,e.fill=a,e.visible=!0):e.visible=!1})})}getTooltipHtml(e){const{id:t,axes:i,dataModel:n}=this,{xKey:s,xName:r,yName:o,tooltip:a,marker:l}=this.properties,{yKey:c,xValue:h,yValue:d,datum:u,itemId:p}=e,g=i.x,f=i.y;if(!this.properties.isValid()||!(g&&f&&We(d))||!n)return il;const m=g.formatDatum(h),v=f.formatDatum(d),y=Ou(o),C=Ou(m+": "+v),b=Xe({fill:this.properties.fill},l.getStyle(),{stroke:this.properties.stroke,strokeWidth:this.properties.strokeWidth}),{fill:S}=this.getMarkerStyle(l,{datum:e,xKey:s,yKey:c,highlighted:!1},b);return a.toTooltipHtml({title:y,content:C,backgroundColor:S},{datum:u,itemId:p,xKey:s,xName:r,yKey:c,yName:o,color:S,title:y,seriesId:t})}getLegendData(e){var t,i,n,s;if(!(null==(t=this.data)?void 0:t.length)||!this.properties.isValid()||"category"!==e)return[];const{yKey:r,yName:o,fill:a,stroke:l,fillOpacity:c,strokeOpacity:h,strokeWidth:d,lineDash:u,marker:p,visible:g}=this.properties,f=!p.enabled||void 0===p.fill;return[{legendType:e,id:this.id,itemId:r,seriesId:this.id,enabled:g,label:{text:null!=o?o:r},marker:{shape:p.shape,fill:f?a:p.fill,fillOpacity:f?c:p.fillOpacity,stroke:null!=(i=p.stroke)?i:l,strokeOpacity:null!=(n=p.strokeOpacity)?n:h,strokeWidth:null!=(s=p.strokeWidth)?s:0,enabled:p.enabled||d<=0},line:{stroke:l,strokeOpacity:h,strokeWidth:d,lineDash:u}}]}animateEmptyUpdateReady(e){const{markerSelection:t,labelSelection:i,contextData:n,paths:s}=e,{animationManager:r}=this.ctx;this.updateAreaPaths(s,n),rp(this,r,...s),ma([t],Xu),Yu(this,r,t),_u(this,"labels",r,i)}animateReadyResize(e){const{contextData:t,paths:i}=e;this.updateAreaPaths(i,t),super.animateReadyResize(e)}animateWaitingUpdateReady(e){var t,i;const{animationManager:n}=this.ctx,{markerSelection:s,labelSelection:r,contextData:o,paths:a,previousContextData:l}=e,[c,h]=a;if(null==c&&null==h)return;super.resetAllAnimation(e);const d=()=>{this.updateAreaPaths(a,o),this.updateStrokePath(a,o)};if(null==o||null==l)return d(),Ku(this,n,"added",s),op(this,"fill_path_properties",n,"add",c),op(this,"stroke",n,"trailing",h),void _u(this,"labels",n,r);const u=Mp(o,l,null==(i=null==(t=this.processedData)?void 0:t.reduced)?void 0:i.diff);if(void 0===u)return n.skipCurrentBatch(),void d();"no-op"!==u.status&&(Ku(this,n,void 0,s),Ls(this.id,"fill_path_properties",n,[c],u.fill.pathProperties),Pu(this.id,"fill_path_update",n,[c],u.fill.path),this.updateStrokePath(a,o),op(this,"stroke",n,"trailing",h),_u(this,"labels",n,r))}isLabelEnabled(){return this.properties.label.enabled}nodeFactory(){return new Eo}getFormattedMarkerStyle(e){const{xKey:t,yKey:i}=e;return this.getMarkerStyle(this.properties.marker,{datum:e,xKey:t,yKey:i,highlighted:!0})}computeFocusBounds(e){return Qu(this,e)}};Ap.className="AreaSeries",Ap.type="area";var Tp={type:"series",optionsKey:"series[]",packageType:"community",chartTypes:["cartesian"],identifier:"area",instanceConstructor:Ap,stackable:!0,defaultAxes:[{type:"number",position:"left"},{type:"category",position:"bottom"}],themeTemplate:{series:{__extends__:Wt,nodeClickRange:"nearest",tooltip:{position:{type:"node"}},fillOpacity:.8,strokeOpacity:1,strokeWidth:0,lineDash:[0],lineDashOffset:0,shadow:{enabled:!1,color:ti,xOffset:3,yOffset:3,blur:5},marker:{__extends__:jt,enabled:!1,fillOpacity:1,strokeOpacity:1,strokeWidth:0},label:{enabled:!1,fontSize:12,fontFamily:Kt,color:$t}}},paletteFactory:e=>{const{marker:t}=ku(e);return{fill:t.fill,stroke:t.stroke,marker:t}}};function*Dp(e){for(const t of e.children)yield t}function Ip(e,t){for(const i of t){const t=i.datum;void 0===t?O.error("undefined datum"):e.addValue(i,t)}}function Rp(e,t){const{x:i,y:n}=e.contentGroup.transformPoint(t.x,t.y),{nearest:s,distanceSquared:r}=e.getQuadTree().find(i,n);if(void 0!==s)return{datum:s.value,distance:Math.sqrt(r)}}var Lp=class extends Wd{constructor(){super(...arguments),this.direction="vertical"}};S([$s(Pr)],Lp.prototype,"direction",2);var kp=class extends jd{constructor(){super(...arguments),this.groupScale=new js,this.smallestDataInterval=void 0}getBandScalePadding(){return{inner:.2,outer:.1}}shouldFlipXY(){return!this.isVertical()}isVertical(){return"vertical"===this.properties.direction}getBarDirection(){return this.shouldFlipXY()?"x":"y"}getCategoryDirection(){return this.shouldFlipXY()?"y":"x"}getValueAxis(){const e=this.getBarDirection();return this.axes[e]}getCategoryAxis(){const e=this.getCategoryDirection();return this.axes[e]}updateGroupScale(e){const{groupScale:t,smallestDataInterval:i,ctx:{seriesStateManager:n}}=this,s=e.scale,r=Xr.is(s)?s.calcBandwidth(i):s.bandwidth,o=[],{index:a,visibleGroupCount:l}=n.getVisiblePeerGroupIndex(this);for(let e=0;e<l;e++)o.push(String(e));return t.domain=o,t.range=[0,null!=r?r:0],e instanceof Dl?t.paddingInner=e.groupPaddingInner:t.padding=e instanceof Vl?.1:0,t.round=0!==t.padding,{barWidth:t.bandwidth>=1?t.bandwidth:t.rawBandwidth,groupIndex:a}}resolveKeyDirection(e){return"x"===this.getBarDirection()?"x"===e?"y":"x":e}initQuadTree(e){Ip(e,this.datumNodesIter())}pickNodeClosestDatum(e){return Rp(this,e)}},Pp=class extends Bo{constructor(){super(...arguments),this.placement="inside"}};S([$s(Nr)],Pp.prototype,"placement",2);var Np=class extends Lp{constructor(){super(...arguments),this.fill="#c16068",this.fillOpacity=1,this.stroke="#874349",this.strokeWidth=1,this.strokeOpacity=1,this.lineDash=[0],this.lineDashOffset=0,this.cornerRadius=0,this.shadow=new Bu,this.label=new Pp,this.tooltip=new Wu}};function Op({rect:e,config:t}){const{crisp:i=!0,fill:n,stroke:s,strokeWidth:r,fillOpacity:o,strokeOpacity:a,lineDash:l,lineDashOffset:c,fillShadow:h,cornerRadius:d=0,topLeftCornerRadius:u=!0,topRightCornerRadius:p=!0,bottomRightCornerRadius:g=!0,bottomLeftCornerRadius:f=!0,visible:m=!0}=t;e.crisp=i,e.fill=n,e.stroke=s,e.strokeWidth=r,e.fillOpacity=o,e.strokeOpacity=a,e.lineDash=l,e.lineDashOffset=c,e.fillShadow=h,e.topLeftCornerRadius=u?d:0,e.topRightCornerRadius=p?d:0,e.bottomRightCornerRadius=g?d:0,e.bottomLeftCornerRadius=f?d:0,e.visible=m}function _p(e){var t,i,n,s,r,o,a=e,{datum:l,isHighlighted:c,style:h,highlightStyle:d,formatter:u,seriesId:p,ctx:{callbackCache:g}}=a,f=C(a,["datum","isHighlighted","style","highlightStyle","formatter","seriesId","ctx"]);const{fill:m,fillOpacity:y,stroke:b,strokeWidth:S}=Xe(c&&d,h),{strokeOpacity:w,fillShadow:x,lineDash:E,lineDashOffset:M,cornerRadius:A=0,topLeftCornerRadius:T=!0,topRightCornerRadius:D=!0,bottomRightCornerRadius:I=!0,bottomLeftCornerRadius:R=!0}=h;let L;return u&&(L=g.call(u,v({datum:l.datum,xKey:l.xKey,fill:m,stroke:b,strokeWidth:S,cornerRadius:A,highlighted:c,seriesId:p},f))),{fill:null!=(t=null==L?void 0:L.fill)?t:m,stroke:null!=(i=null==L?void 0:L.stroke)?i:b,strokeWidth:null!=(n=null==L?void 0:L.strokeWidth)?n:S,fillOpacity:null!=(s=null==L?void 0:L.fillOpacity)?s:y,strokeOpacity:null!=(r=null==L?void 0:L.strokeOpacity)?r:w,lineDash:E,lineDashOffset:M,fillShadow:x,cornerRadius:null!=(o=null==L?void 0:L.cornerRadius)?o:A,topLeftCornerRadius:T,topRightCornerRadius:D,bottomRightCornerRadius:I,bottomLeftCornerRadius:R}}function Fp(e=[]){const[t,i]=e;return!(0!==t||1!==i)}S([$s(tr)],Np.prototype,"xKey",2),S([$s(tr,{optional:!0})],Np.prototype,"xName",2),S([$s(tr)],Np.prototype,"yKey",2),S([$s(tr,{optional:!0})],Np.prototype,"yName",2),S([$s(tr,{optional:!0})],Np.prototype,"stackGroup",2),S([$s(ir,{optional:!0})],Np.prototype,"normalizedTo",2),S([$s(mr)],Np.prototype,"fill",2),S([$s(rr)],Np.prototype,"fillOpacity",2),S([$s(mr)],Np.prototype,"stroke",2),S([$s(sr)],Np.prototype,"strokeWidth",2),S([$s(rr)],Np.prototype,"strokeOpacity",2),S([$s(Mr)],Np.prototype,"lineDash",2),S([$s(sr)],Np.prototype,"lineDashOffset",2),S([$s(sr)],Np.prototype,"cornerRadius",2),S([$s(er,{optional:!0})],Np.prototype,"formatter",2),S([$s(Zs,{optional:!0})],Np.prototype,"shadow",2),S([$s(Zs)],Np.prototype,"label",2),S([$s(Zs)],Np.prototype,"tooltip",2);var Gp=e=>{var t;return $n(null!=(t=e.yValue)?t:0)};function Vp(e,t,i){const{startingX:n,startingY:s}=function(e,t){const i=t[e?"y":"x"];let n=1/0,s=0;return i?(e?s=i.scale.convert(Xr.is(i.scale)?0:Math.max(...i.range)):n=i.scale.convert(Xr.is(i.scale)?0:Math.min(...i.range)),{startingX:n,startingY:s}):{startingX:n,startingY:s}}(e,t);return{isVertical:e,calculate:(t,i)=>{let r=e?t.x:n,o=e?s:t.y,a=e?t.width:0,l=e?0:t.height;const{opacity:c}=t;let h;return i&&(isNaN(r)||isNaN(o))&&(({x:r,y:o}=i),a=e?i.width:0,l=e?0:i.height,e&&!Gp(i)?o+=i.height:!e&&Gp(i)&&(r+=i.width)),h=null==t.clipBBox?void 0:Gp(t)?e?new ts(r,o-l,a,l):new ts(r-a,o,a,l):new ts(r,o,a,l),{x:r,y:o,width:a,height:l,clipBBox:h,opacity:c}},mode:i}}function Bp(e,t){return{isVertical:e,calculate:t=>({x:e?t.x:t.x+t.width/2,y:e?t.y+t.height/2:t.y,width:e?t.width:0,height:e?0:t.height,clipBBox:t.clipBBox,opacity:t.opacity}),mode:t}}function Hp(e){const t=e=>null==e||isNaN(e.x)||isNaN(e.y);return{toFn:(i,n,s)=>{let r;return r="removed"===s&&null==i.datum&&"fade"===e.mode?y(v({},zp(0,n)),{opacity:0}):"removed"===s||t(n)?e.calculate(n,i.previousDatum):{x:n.x,y:n.y,width:n.width,height:n.height,clipBBox:n.clipBBox,opacity:n.opacity},r},fromFn:(i,n,s)=>{let r;"updated"===s&&t(n)?s="removed":"updated"===s&&t(i.previousDatum)&&(s="added"),r="added"===s&&null==i.previousDatum&&"fade"===e.mode?y(v({},zp(0,n)),{opacity:0}):"unknown"===s||"added"===s?e.calculate(n,i.previousDatum):{x:i.x,y:i.y,width:i.width,height:i.height,clipBBox:i.clipBBox,opacity:i.opacity};const o=Rs[s];return y(v({},r),{phase:o})}}}function zp(e,{x:t,y:i,width:n,height:s,clipBBox:r,opacity:o}){return{x:t,y:i,width:n,height:s,clipBBox:r,opacity:o}}function Up(e,t,i){if(void 0===e)return;const{x:n,y:s,width:r,height:o}=e;return t.inverseTransformBBox(new ts(n,s,r,o)).clip(i)}function Wp(e,t,i){if(t.enabled&&i){const{x:n,y:s,text:r,textAlign:o,textBaseline:a}=i,{color:l,fontStyle:c,fontWeight:h,fontSize:d,fontFamily:u}=t;e.setProperties({visible:!0,x:n,y:s,text:r,fill:l,fontStyle:c,fontWeight:h,fontSize:d,fontFamily:u,textAlign:o,textBaseline:a})}else e.visible=!1}function jp({isPositive:e,isVertical:t,placement:i,padding:n=0,rect:s}){let r=s.x+s.width/2,o=s.y+s.height/2,a="center",l="middle";switch(i){case"start":t?(o=e?s.y+s.height+n:s.y-n,l=e?"top":"bottom"):(r=e?s.x-n:s.x+s.width+n,a=e?"start":"end");break;case"outside":case"end":t?(o=e?s.y-n:s.y+s.height+n,l=e?"bottom":"top"):(r=e?s.x+s.width+n:s.x-n,a=e?"start":"end")}return{x:r,y:o,textAlign:a,textBaseline:l}}var Kp=class extends kp{constructor(e){super({moduleCtx:e,directionKeys:Hd,directionNames:zd,pickModes:[0],pathsPerSeries:0,hasHighlightedLabels:!0,datumSelectionGarbageCollection:!1,animationAlwaysUpdateSelections:!0,animationResetFns:{datum:zp,label:Gu}}),this.properties=new Np}processData(e){return x(this,null,function*(){var t,i,n;if(!this.properties.isValid()||!this.data)return;const{seriesGrouping:{groupIndex:s=this.id}={},data:r=[]}=this,{xKey:o,yKey:a,normalizedTo:l}=this.properties,c=!this.ctx.animationManager.isSkipped(),h=null==(t=this.getCategoryAxis())?void 0:t.scale,d=null==(i=this.getValueAxis())?void 0:i.scale,{isContinuousX:u,xScaleType:p,yScaleType:g}=this.getScaleInformation({xScale:h,yScale:d}),f=`bar-stack-${s}-yValues`,m=`${f}-trailing`,y=[];We(l)&&y.push(Ih([f,m],Math.abs(l),"range")),c&&this.processedData&&y.push(_h(this.processedData)),c&&y.push(kh());const C=this.visible?{}:{forceValue:0},{processedData:b}=yield this.requestDataModel(e,r,{props:[Uh(o,p,{id:"xValue"}),Wh(a,g,v({id:"yValue-raw",invalidValue:null},C)),...Yh(a,"normal","current",v({id:"yValue-end",rangeId:"yValue-range",invalidValue:null,missingValue:0,groupId:f,separateNegative:!0},C),g),...Yh(a,"trailing","current",v({id:"yValue-start",invalidValue:null,missingValue:0,groupId:m,separateNegative:!0},C),g),...u?[Ah]:[],...y],groupByKeys:!0,groupByData:!1});this.smallestDataInterval=null==(n=b.reduced)?void 0:n.smallestKeyInterval,this.animationState.transition("updateData")})}getSeriesDomain(e){var t;const{processedData:i,dataModel:n,smallestDataInterval:s}=this;if(!i||!n||0===i.data.length)return[];const r=this.getCategoryAxis(),o=this.getValueAxis(),a=n.resolveProcessedDataDefById(this,"xValue"),l=n.getDomain(this,"xValue","key",i),c=n.getDomain(this,"yValue-end","value",i);if(e===this.getCategoryDirection()){if("key"===(null==a?void 0:a.def.type)&&"category"===a.def.valueType)return l;const e=We(s)?.5*s:0,i=null!=(t=cn(l))?t:[NaN,NaN];return qc([i[0]+-e,i[1]+e],r)}return this.getValueAxis()instanceof tu?qc(c,o):qc([Math.min(0,c[0]),Math.max(0,c[1])],o)}createNodeData(){return x(this,null,function*(){const{dataModel:e}=this,t=this.getCategoryAxis(),i=this.getValueAxis();if(!(e&&t&&i&&this.properties.isValid()))return;const n=t.scale,s=i.scale,{xKey:r,yKey:o,xName:a,yName:l,fill:c,stroke:h,strokeWidth:d,cornerRadius:u,legendItemName:p,label:g}=this.properties,f=i.isReversed(),{barWidth:m,groupIndex:y}=this.updateGroupScale(t),C=Xr.is(n)?-.5*m:0,b=e.resolveProcessedDataIndexById(this,"xValue"),S=e.resolveProcessedDataIndexById(this,"yValue-raw"),w=e.resolveProcessedDataIndexById(this,"yValue-start"),x=e.resolveProcessedDataIndexById(this,"yValue-end"),E=e.resolveProcessedDataIndexById(this,"yValue-range"),M=!this.ctx.animationManager.isSkipped(),A={itemId:o,nodeData:[],labelData:[],scales:this.calculateScaling(),visible:this.visible||M},{groupScale:T,processedData:D}=this;return null==D||D.data.forEach(({keys:e,datum:t,values:i,aggValues:M})=>{i.forEach((i,D)=>{var I;const R=e[b],L=n.convert(R),k=+i[x],P=+i[w],N=i[S],O=N>=0&&!Object.is(N,-0),_=O!==f,F=null!=(I=null==M?void 0:M[E][O?1:0])?I:0,G=L+T.convert(String(y))+C;if(isNaN(k))return;const V=s.convert(k),B=s.convert(P),H="x"===this.getBarDirection(),z=s.convert(F),U=s.convert(0),W={x:H?Math.min(V,B):G,y:H?G:Math.min(V,B),width:H?Math.abs(B-V):m,height:H?m:Math.abs(B-V)},j=new ts(W.x,W.y,W.width,W.height),K={x:H?Math.min(U,z):G,y:H?G:Math.min(U,z),width:H?Math.abs(U-z):m,height:H?m:Math.abs(U-z),clipBBox:j},{fontStyle:$,fontWeight:Y,fontSize:q,fontFamily:X,color:Z,placement:Q}=g,J=this.getLabelText(this.properties.label,{datum:t[D],value:N,xKey:r,yKey:o,xName:a,yName:l,legendItemName:p},e=>We(e)?e.toFixed(2):String(e)),ee=J?v({text:J,fill:Z,fontStyle:$,fontWeight:Y,fontSize:q,fontFamily:X},jp({isPositive:O,isVertical:!H,placement:Q,rect:W})):void 0,te=this.shouldFlipXY()?W.height:W.width,ie={series:this,itemId:o,datum:t[D],valueIndex:D,cumulativeValue:k,xValue:R,yValue:N,yKey:o,xKey:r,capDefaults:{lengthRatioMultiplier:te,lengthMax:te},x:K.x,y:K.y,width:K.width,height:K.height,midPoint:{x:W.x+W.width/2,y:W.y+W.height/2},fill:c,stroke:h,opacity:1,strokeWidth:d,cornerRadius:u,topLeftCornerRadius:H!==_,topRightCornerRadius:_,bottomRightCornerRadius:H===_,bottomLeftCornerRadius:!_,clipBBox:j,label:ee,missing:null==N};A.nodeData.push(ie),A.labelData.push(ie)})}),A})}nodeFactory(){return new lu}updateDatumSelection(e){return x(this,null,function*(){return e.datumSelection.update(e.nodeData,e=>{e.tag=0},e=>Fh(e.xValue,e.valueIndex))})}updateDatumNodes(e){return x(this,null,function*(){if(!this.properties.isValid())return;const{yKey:t,stackGroup:i,fill:n,fillOpacity:s,stroke:r,strokeWidth:o,strokeOpacity:a,lineDash:l,lineDashOffset:c,formatter:h,shadow:d,highlightStyle:{item:u}}=this.properties,p=this.axes.x,g=Fp(null==p?void 0:p.visibleRange),f="x"===this.getCategoryDirection();e.datumSelection.each((p,m)=>{var v,y,C,b;const S={fill:n,stroke:r,fillOpacity:s,strokeOpacity:a,lineDash:l,lineDashOffset:c,fillShadow:d,strokeWidth:this.getStrokeWidth(o),cornerRadius:m.cornerRadius,topLeftCornerRadius:m.topLeftCornerRadius,topRightCornerRadius:m.topRightCornerRadius,bottomRightCornerRadius:m.bottomRightCornerRadius,bottomLeftCornerRadius:m.bottomLeftCornerRadius},w=f?(null!=(y=null==(v=m.clipBBox)?void 0:v.width)?y:m.width)>0:(null!=(b=null==(C=m.clipBBox)?void 0:C.height)?b:m.height)>0,x=_p({datum:m,ctx:this.ctx,seriesId:this.id,isHighlighted:e.isHighlight,highlightStyle:u,yKey:t,style:S,formatter:h,stackGroup:i});x.crisp=g,x.visible=w,Op({rect:p,config:x})})})}updateLabelSelection(e){return x(this,null,function*(){const t=this.isLabelEnabled()?e.labelData:[];return e.labelSelection.update(t,e=>{e.tag=1,e.pointerEvents=1})})}updateLabelNodes(e){return x(this,null,function*(){e.labelSelection.each((e,t)=>{Wp(e,this.properties.label,t.label)})})}getTooltipHtml(e){var t;const{id:i,processedData:n,ctx:{callbackCache:s}}=this,r=this.getCategoryAxis(),o=this.getValueAxis();if(!(n&&this.properties.isValid()&&r&&o))return il;const{xKey:a,yKey:l,xName:c,yName:h,fill:d,stroke:u,strokeWidth:p,tooltip:g,formatter:f,stackGroup:m,legendItemName:y}=this.properties,{xValue:C,yValue:b,datum:S,itemId:w}=e,x=r.formatDatum(C),E=o.formatDatum(b),M=Ou(h),A=Ou(x+": "+E);let T;f&&(T=s.call(f,{seriesId:i,datum:S,xKey:a,yKey:l,stackGroup:m,fill:d,stroke:u,strokeWidth:this.getStrokeWidth(p),highlighted:!1}));const D=null!=(t=null==T?void 0:T.fill)?t:d;return g.toTooltipHtml({title:M,content:A,backgroundColor:D},v({seriesId:i,itemId:w,datum:S,xKey:a,yKey:l,xName:c,yName:h,stackGroup:m,title:M,color:D,legendItemName:y},this.getModuleTooltipParams()))}getLegendData(e){var t,i;const{showInLegend:n}=this.properties;if("category"!==e||!(null==(t=this.data)?void 0:t.length)||!this.properties.isValid()||!n)return[];const{yKey:s,yName:r,fill:o,stroke:a,strokeWidth:l,fillOpacity:c,strokeOpacity:h,legendItemName:d,visible:u}=this.properties;return[{legendType:"category",id:this.id,itemId:s,seriesId:this.id,enabled:u,label:{text:null!=(i=null!=d?d:r)?i:s},marker:{fill:o,fillOpacity:c,stroke:a,strokeWidth:l,strokeOpacity:h},legendItemName:d}]}animateEmptyUpdateReady({datumSelection:e,labelSelection:t,annotationSelections:i}){const n=Hp(Vp(this.isVertical(),this.axes,"normal"));Ls(this.id,"nodes",this.ctx.animationManager,[e],n),_u(this,"labels",this.ctx.animationManager,t),_u(this,"annotations",this.ctx.animationManager,...i)}animateWaitingUpdateReady(e){var t,i,n;const{datumSelection:s,labelSelection:r,annotationSelections:o,previousContextData:a}=e;this.ctx.animationManager.stopByAnimationGroupId(this.id);const l=null==(i=null==(t=this.processedData)?void 0:t.reduced)?void 0:i.diff,c=null==a?"fade":"normal",h=Hp(Vp(this.isVertical(),this.axes,c));Ls(this.id,"nodes",this.ctx.animationManager,[s],h,(e,t)=>Fh(t.xValue,t.valueIndex),l),(null==(n=null==l?void 0:l.changed)||n)&&(_u(this,"labels",this.ctx.animationManager,r),_u(this,"annotations",this.ctx.animationManager,...o))}isLabelEnabled(){return this.properties.label.enabled}computeFocusBounds({datumIndex:e,seriesRect:t}){var i;return Up(null==(i=this.contextNodeData)?void 0:i.nodeData[e].clipBBox,this.contentGroup,t)}};Kp.className="BarSeries",Kp.type="bar";var $p={type:"series",optionsKey:"series[]",packageType:"community",chartTypes:["cartesian"],identifier:"bar",instanceConstructor:Kp,stackable:!0,groupable:!0,defaultAxes:[{type:"number",position:"left"},{type:"category",position:"bottom"}],swapDefaultAxesCondition:e=>"horizontal"===(null==e?void 0:e.direction),themeTemplate:{series:{__extends__:Wt,direction:"vertical",fillOpacity:1,strokeWidth:0,lineDash:[0],lineDashOffset:0,label:{enabled:!1,fontWeight:"normal",fontSize:12,fontFamily:Kt,color:qt,placement:"inside"},shadow:{enabled:!1,color:ti,xOffset:3,yOffset:3,blur:5}}},enterpriseThemeTemplate:{series:{errorBar:{cap:{lengthRatio:.3}}}},paletteFactory:Lu},Yp=e=>{const t=gs.fromString(e),[i,n,s]=gs.RGBtoOKLCH(t.r,t.g,t.b);return{l:i,c:n,h:s,a:t.a}},qp=class{constructor(){this.type="color",this.invalid=!0,this.domain=[0,1],this.range=["red","blue"],this.parsedRange=this.range.map(Yp)}update(){const{domain:e,range:t}=this;e.length<2&&(O.warnOnce("`colorDomain` should have at least 2 values."),0===e.length?e.push(0,1):1===e.length&&e.push(e[0]+1));for(let t=1;t<e.length;t++)if(e[t-1]>=e[t]){O.warnOnce("`colorDomain` values should be supplied in ascending order."),e.sort((e,t)=>e-t);break}if(t.length<e.length)for(let i=t.length;i<e.length;i++)t.push(t.length>0?t[0]:"black");this.parsedRange=this.range.map(Yp)}convert(e){this.refresh();const{domain:t,range:i,parsedRange:n}=this,s=t[0],r=t.at(-1),o=i[0],a=i[i.length-1];if(e<=s)return o;if(e>=r)return a;let l,c;if(2===t.length){const t=(e-s)/(r-s),n=1/(i.length-1);l=i.length<=2?0:Math.min(Math.floor(t*(i.length-1)),i.length-2),c=(t-l*n)/n}else{for(l=0;l<t.length-2&&!(e<t[l+1]);l++);const i=t[l];c=(e-i)/(t[l+1]-i)}return((e,t,i)=>{let n,s;if(i=zn(0,i,1),Number.isNaN(e.h)&&Number.isNaN(t.h))n=0,s=0;else if(Number.isNaN(e.h))n=t.h,s=t.c;else if(Number.isNaN(t.h))n=e.h,s=e.c;else{const r=e.h;let o=t.h;const a=t.h-e.h;a>180?o-=360:a<-180&&(o+=360),n=r*(1-i)+o*i,s=e.c*(1-i)+t.c*i}const r=e.l*(1-i)+t.l*i,o=e.a*(1-i)+t.a*i;return gs.fromOKLCH(r,s,n,o)})(n[l],n[l+1],c).toRgbaString()}refresh(){this.invalid&&(this.invalid=!1,this.update(),this.invalid&&O.warnOnce("Expected update to not invalidate scale"))}};S([Us],qp.prototype,"domain",2),S([Us],qp.prototype,"range",2);var Xp=class extends zu{constructor(){super(...arguments),this.maxSize=30}};S([$s(sr),ss({redraw:3})],Xp.prototype,"maxSize",2),S([$s(Cr,{optional:!0}),ss({redraw:3})],Xp.prototype,"domain",2);var Zp=class extends Bo{constructor(){super(...arguments),this.placement="top"}};S([$s(_r)],Zp.prototype,"placement",2);var Qp=class extends Wd{constructor(){super(...arguments),this.colorRange=["#ffff00","#00ff00","#0000ff"],this.marker=new Xp,this.label=new Zp,this.tooltip=new Wu}};S([$s(tr)],Qp.prototype,"xKey",2),S([$s(tr)],Qp.prototype,"yKey",2),S([$s(tr)],Qp.prototype,"sizeKey",2),S([$s(tr,{optional:!0})],Qp.prototype,"labelKey",2),S([$s(tr,{optional:!0})],Qp.prototype,"colorKey",2),S([$s(tr,{optional:!0})],Qp.prototype,"xName",2),S([$s(tr,{optional:!0})],Qp.prototype,"yName",2),S([$s(tr,{optional:!0})],Qp.prototype,"sizeName",2),S([$s(tr,{optional:!0})],Qp.prototype,"labelName",2),S([$s(tr,{optional:!0})],Qp.prototype,"colorName",2),S([$s(Cr,{optional:!0})],Qp.prototype,"colorDomain",2),S([$s(vr)],Qp.prototype,"colorRange",2),S([$s(tr,{optional:!0})],Qp.prototype,"title",2),S([$s(Zs)],Qp.prototype,"marker",2),S([$s(Zs)],Qp.prototype,"label",2),S([$s(Zs)],Qp.prototype,"tooltip",2);var Jp=class extends Ud{constructor(e,t,i,n){super(e,t,i,n),this.sizeKey=n.properties.sizeKey}},eg=class extends jd{constructor(e){super({moduleCtx:e,directionKeys:Hd,directionNames:zd,pickModes:[2,3,0],pathsPerSeries:0,hasMarkers:!0,markerSelectionGarbageCollection:!1,animationResetFns:{label:Gu,marker:qu}}),this.NodeEvent=Jp,this.properties=new Qp,this.sizeScale=new Zd,this.colorScale=new qp}processData(e){return x(this,null,function*(){var t,i,n,s;if(!this.properties.isValid()||null==this.data||!this.visible)return;const r=null==(t=this.axes.x)?void 0:t.scale,o=null==(i=this.axes.y)?void 0:i.scale,{xScaleType:a,yScaleType:l}=this.getScaleInformation({xScale:r,yScale:o}),c=this.colorScale.type,h=this.sizeScale.type,{xKey:d,yKey:u,sizeKey:p,labelKey:g,colorDomain:f,colorRange:m,colorKey:v,marker:y}=this.properties,{dataModel:C,processedData:b}=yield this.requestDataModel(e,this.data,{props:[Uh(d,a,{id:"xKey-raw"}),Uh(u,l,{id:"yKey-raw"}),...g?[Uh(g,"band",{id:"labelKey-raw"})]:[],Wh(d,a,{id:"xValue"}),Wh(u,l,{id:"yValue"}),Wh(p,h,{id:"sizeValue"}),...v?[Wh(v,c,{id:"colorValue"})]:[],...g?[Wh(g,"band",{id:"labelValue"})]:[]]}),S=C.resolveProcessedDataIndexById(this,"sizeValue"),w=null!=(n=b.domain.values[S])?n:[];if(this.sizeScale.domain=y.domain?y.domain:w,v){const e=C.resolveProcessedDataIndexById(this,"colorValue");this.colorScale.domain=null!=(s=null!=f?f:b.domain.values[e])?s:[],this.colorScale.range=m,this.colorScale.update()}this.animationState.transition("updateData")})}getSeriesDomain(e){const{dataModel:t,processedData:i}=this;if(!i||!t)return[];const n="x"===e?"xValue":"yValue",s=t.resolveProcessedDataDefById(this,n),r=t.getDomain(this,n,"value",i);if("value"===(null==s?void 0:s.def.type)&&"category"===(null==s?void 0:s.def.valueType))return r;const o=this.axes[e];return qc(cn(r),o)}createNodeData(){return x(this,null,function*(){var e,t,i;const{axes:n,dataModel:s,processedData:r,colorScale:o,sizeScale:a}=this,{xKey:l,yKey:c,sizeKey:h,labelKey:d,xName:u,yName:p,sizeName:g,labelName:f,label:m,colorKey:y,marker:C,visible:b}=this.properties,S=Nd(C.shape),{placement:w}=m,x=n.x,E=n.y;if(!(s&&r&&b&&x&&E))return;const M=s.resolveProcessedDataIndexById(this,"xValue"),A=s.resolveProcessedDataIndexById(this,"yValue"),T=h?s.resolveProcessedDataIndexById(this,"sizeValue"):-1,D=y?s.resolveProcessedDataIndexById(this,"colorValue"):-1,I=d?s.resolveProcessedDataIndexById(this,"labelValue"):-1,R=x.scale,L=E.scale,k=(null!=(e=R.bandwidth)?e:0)/2,P=(null!=(t=L.bandwidth)?t:0)/2,N=[];a.range=[C.size,C.maxSize];const O=m.getFont();for(const{values:e,datum:t}of null!=(i=r.data)?i:[]){const i=e[M],n=e[A],s=R.convert(i)+k,r=L.convert(n)+P,b=this.getLabelText(m,{value:d?e[I]:n,datum:t,xKey:l,yKey:c,sizeKey:h,labelKey:d,xName:u,yName:p,sizeName:g,labelName:f}),x=Fo.getTextSize(String(b),O),E=h?a.convert(e[T]):C.size,_=y?o.convert(e[D]):void 0;N.push({series:this,itemId:c,yKey:c,xKey:l,datum:t,xValue:i,yValue:n,sizeValue:e[T],point:{x:s,y:r,size:E},midPoint:{x:s,y:r},fill:_,label:v({text:b},x),marker:S,placement:w})}return{itemId:c,nodeData:N,labelData:N,scales:this.calculateScaling(),visible:this.visible}})}isPathOrSelectionDirty(){return this.properties.marker.isDirty()}getLabelData(){var e,t;return null!=(t=null==(e=this.contextNodeData)?void 0:e.labelData)?t:[]}markerFactory(){const{shape:e}=this.properties.marker;return new(Nd(e))}updateMarkerSelection(e){return x(this,null,function*(){const{nodeData:t,markerSelection:i}=e;this.properties.marker.isDirty()&&(i.clear(),i.cleanup());const n=this.properties.marker.enabled?t:[];return i.update(n,void 0,e=>Fh([e.xValue,e.yValue,e.label.text]))})}updateMarkerNodes(e){return x(this,null,function*(){const{markerSelection:t,isHighlight:i}=e,{xKey:n,yKey:s,sizeKey:r,labelKey:o,marker:a}=this.properties,l=Xe(i&&this.properties.highlightStyle.item,a.getStyle());this.sizeScale.range=[a.size,a.maxSize],t.each((e,t)=>{this.updateMarkerStyle(e,a,{datum:t,highlighted:i,xKey:n,yKey:s,sizeKey:r,labelKey:o},l)}),i||this.properties.marker.markClean()})}updateLabelSelection(e){return x(this,null,function*(){var t,i;const n=this.properties.label.enabled&&null!=(i=null==(t=this.chart)?void 0:t.placeLabels().get(this))?i:[];return e.labelSelection.update(n.map(e=>y(v({},e.datum),{point:{x:e.x,y:e.y,size:e.datum.point.size}})))})}updateLabelNodes(e){return x(this,null,function*(){const{label:t}=this.properties;e.labelSelection.each((e,i)=>{var n,s,r,o;e.text=i.label.text,e.fill=t.color,e.x=null!=(s=null==(n=i.point)?void 0:n.x)?s:0,e.y=null!=(o=null==(r=i.point)?void 0:r.y)?o:0,e.fontStyle=t.fontStyle,e.fontWeight=t.fontWeight,e.fontSize=t.fontSize,e.fontFamily=t.fontFamily,e.textAlign="left",e.textBaseline="top"})})}getTooltipHtml(e){var t;const i=this.axes.x,n=this.axes.y;if(!this.properties.isValid()||!i||!n)return il;const{xKey:s,yKey:r,sizeKey:o,labelKey:a,xName:l,yName:c,sizeName:h,labelName:d,marker:u,tooltip:p}=this.properties,g=null!=(t=this.properties.title)?t:c,f=Xe({fill:e.fill,strokeWidth:this.getStrokeWidth(u.strokeWidth)},u.getStyle()),{fill:m="gray"}=this.getMarkerStyle(u,{datum:e,highlighted:!1,xKey:s,yKey:r,sizeKey:o,labelKey:a},f),{datum:v,xValue:y,yValue:C,sizeValue:b,label:{text:S},itemId:w}=e,x=Ou(i.formatDatum(y)),E=Ou(n.formatDatum(C));let M=`<b>${Ou(null!=l?l:s)}</b>: ${x}<br><b>${Ou(null!=c?c:r)}</b>: ${E}`;return o&&(M+=`<br><b>${Ou(null!=h?h:o)}</b>: ${Ou(String(b))}`),a&&(M=`<b>${Ou(null!=d?d:a)}</b>: ${Ou(S)}<br>`+M),p.toTooltipHtml({title:g,content:M,backgroundColor:m},{datum:v,itemId:w,xKey:s,xName:l,yKey:r,yName:c,sizeKey:o,sizeName:h,labelKey:a,labelName:d,title:g,color:m,seriesId:this.id})}getLegendData(){var e,t;if(!(null==(e=this.data)?void 0:e.length)||!this.properties.isValid())return[];const{yKey:i,yName:n,title:s,marker:r,visible:o}=this.properties,{shape:a,fill:l,stroke:c,fillOpacity:h,strokeOpacity:d,strokeWidth:u}=r;return[{legendType:"category",id:this.id,itemId:i,seriesId:this.id,enabled:o,label:{text:null!=(t=null!=s?s:n)?t:i},marker:{shape:a,fill:null!=l?l:"rgba(0, 0, 0, 0)",stroke:null!=c?c:"rgba(0, 0, 0, 0)",fillOpacity:null!=h?h:1,strokeOpacity:null!=d?d:1,strokeWidth:null!=u?u:0}}]}animateEmptyUpdateReady({markerSelection:e,labelSelection:t}){$u(this,this.ctx.animationManager,e),_u(this,"labels",this.ctx.animationManager,t)}isLabelEnabled(){return this.properties.label.enabled}nodeFactory(){return new Eo}getFormattedMarkerStyle(e){const{xKey:t,yKey:i,sizeKey:n,labelKey:s}=this.properties;return this.getMarkerStyle(this.properties.marker,{datum:e,xKey:t,yKey:i,sizeKey:n,labelKey:s,highlighted:!1})}computeFocusBounds(e){return Qu(this,e)}};eg.className="BubbleSeries",eg.type="bubble";var tg={type:"series",optionsKey:"series[]",packageType:"community",chartTypes:["cartesian"],identifier:"bubble",instanceConstructor:eg,defaultAxes:[{type:"number",position:"bottom"},{type:"number",position:"left"}],themeTemplate:{series:{__extends__:Wt,tooltip:{position:{type:"node"}},marker:{__extends__:jt,maxSize:30,fillOpacity:.8},label:{enabled:!1,fontSize:12,fontFamily:Kt,color:$t}}},paletteFactory:ku},ig=class extends Wd{constructor(){super(...arguments),this.fillOpacity=1,this.strokeWidth=1,this.strokeOpacity=1,this.lineDash=[0],this.lineDashOffset=0,this.cornerRadius=0,this.areaPlot=!1,this.aggregation="sum",this.shadow=new Bu,this.label=new Bo,this.tooltip=new Wu}};S([$s(tr)],ig.prototype,"xKey",2),S([$s(tr,{optional:!0})],ig.prototype,"yKey",2),S([$s(tr,{optional:!0})],ig.prototype,"xName",2),S([$s(tr,{optional:!0})],ig.prototype,"yName",2),S([$s(mr,{optional:!0})],ig.prototype,"fill",2),S([$s(rr)],ig.prototype,"fillOpacity",2),S([$s(mr,{optional:!0})],ig.prototype,"stroke",2),S([$s(sr)],ig.prototype,"strokeWidth",2),S([$s(rr)],ig.prototype,"strokeOpacity",2),S([$s(Mr)],ig.prototype,"lineDash",2),S([$s(sr)],ig.prototype,"lineDashOffset",2),S([$s(sr)],ig.prototype,"cornerRadius",2),S([$s(Js)],ig.prototype,"areaPlot",2),S([$s(lr,{optional:!0})],ig.prototype,"bins",2),S([$s(Fr(["count","sum","mean"],"a histogram aggregation"))],ig.prototype,"aggregation",2),S([$s(sr,{optional:!0})],ig.prototype,"binCount",2),S([$s(Zs)],ig.prototype,"shadow",2),S([$s(Zs)],ig.prototype,"label",2),S([$s(Zs)],ig.prototype,"tooltip",2);var ng=class extends jd{constructor(e){super({moduleCtx:e,directionKeys:Hd,directionNames:zd,pickModes:[0],datumSelectionGarbageCollection:!1,animationResetFns:{datum:zp,label:Gu}}),this.properties=new ig,this.calculatedBins=[]}deriveBins(e){const t=ho(e[0],e[1],10),i=po(e[0],e[1],10),[n]=t;return[[n-i,n],...t.map(e=>[e,e+i])]}calculateNiceBins(e,t){const i=Math.floor(e[0]),n=e[1],s=t||1,{start:r,binSize:o}=this.calculateNiceStart(i,n,s);return this.getBins(r,n,o,s)}getBins(e,t,i,n){const s=[],r=this.calculatePrecision(i);for(let o=0;o<n;o++){const a=Math.round((e+o*i)*r)/r;let l=Math.round((e+(o+1)*i)*r)/r;o===n-1&&(l=Math.max(l,t)),s[o]=[a,l]}return s}calculatePrecision(e){let t=10;if(isFinite(e)&&e>0)for(;e<1;)t*=10,e*=10;return t}calculateNiceStart(e,t,i){const n=Math.abs(t-e)/i,s=Math.floor(Math.log10(n)),r=Math.pow(10,s);return{start:Math.floor(e/r)*r,binSize:n}}processData(e){return x(this,null,function*(){var t,i;this.visible||(this.processedData=void 0,this.animationState.transition("updateData"));const{xKey:n,yKey:s,areaPlot:r,aggregation:o}=this.properties,a=null==(t=this.axes.x)?void 0:t.scale,l=null==(i=this.axes.y)?void 0:i.scale,{xScaleType:c,yScaleType:h}=this.getScaleInformation({yScale:l,xScale:a}),d=[Uh(n,c),Th];if(s){let e=Sh("groupAgg");"count"===o||("sum"===o?e=Ch("groupAgg"):"mean"===o&&(e=wh("groupAgg"))),r&&(e=xh("groupAgg",e)),d.push(Wh(s,h,{invalidValue:void 0}),e)}else{let e=Sh("groupAgg");r&&(e=xh("groupAgg",e)),d.push(e)}!this.ctx.animationManager.isSkipped()&&this.processedData&&d.push(_h(this.processedData,!1)),yield this.requestDataModel(e,this.data,{props:d,groupByFn:e=>{var t;const i=qc(e.domain.keys[0]);if(0===i.length)return e.domain.groups=[],()=>[];const n=Ue(this.properties.binCount)?this.calculateNiceBins(i,this.properties.binCount):null!=(t=this.properties.bins)?t:this.deriveBins(i),s=n.length;return this.calculatedBins=[...n],e=>{const t=e.keys[0];for(let e=0;e<s;e++){const i=n[e];if(t>=i[0]&&t<i[1])return i;if(e===s-1&&t<=i[1])return i}return[]}}}),this.animationState.transition("updateData")})}getSeriesDomain(e){var t,i,n,s;const{processedData:r,dataModel:o}=this;if(!r||!o||!this.calculatedBins.length)return[];const a=o.getDomain(this,"groupAgg","aggregate",r),l=null==(t=this.calculatedBins)?void 0:t[0][0],c=null==(s=this.calculatedBins)?void 0:s[(null!=(n=null==(i=this.calculatedBins)?void 0:i.length)?n:0)-1][1];return qc("x"===e?[l,c]:a)}createNodeData(){return x(this,null,function*(){var e;const{id:t,axes:i,processedData:n,ctx:{callbackCache:s}}=this,r=i.x,o=i.y;if(!r||!o)return;const{scale:a}=r,{scale:l}=o,{xKey:c,yKey:h,xName:d,yName:u,fill:p,stroke:g,strokeWidth:f,cornerRadius:m}=this.properties,{formatter:v=e=>String(e.value),fontStyle:y,fontWeight:C,fontSize:b,fontFamily:S,color:w}=this.properties.label,x=[],E={itemId:null!=(e=this.properties.yKey)?e:this.id,nodeData:x,labelData:x,scales:this.calculateScaling(),animationValid:!0,visible:this.visible};return this.visible&&n&&"grouped"===n.type?(n.data.forEach(e=>{var i;const{aggValues:[[n,r]]=[[0,0]],datum:E,datum:{length:M},keys:A,keys:[T,D]}=e,I=a.convert(T),R=a.convert(D),L=n+r,k=l.convert(0),P=l.convert(L),N=Math.abs(R-I),O=Math.abs(P-k),_=Math.min(I,R),F=Math.min(k,P);let G;0!==L&&(G={text:null!=(i=s.call(v,{value:L,datum:E,seriesId:t,xKey:c,yKey:h,xName:d,yName:u}))?i:String(L),fontStyle:y,fontWeight:C,fontSize:b,fontFamily:S,fill:w,x:_+N/2,y:F+O/2});const V={x:_+N/2,y:F+O/2},B=o.isReversed();x.push({series:this,datum:E,aggregatedValue:L,frequency:M,domain:A,yKey:h,xKey:c,x:_,y:F,xValue:I,yValue:P,width:N,height:O,midPoint:V,fill:p,stroke:g,cornerRadius:m,topLeftCornerRadius:!B,topRightCornerRadius:!B,bottomRightCornerRadius:B,bottomLeftCornerRadius:B,opacity:1,strokeWidth:f,label:G})}),x.sort((e,t)=>e.x-t.x),E):E})}nodeFactory(){return new lu}updateDatumSelection(e){return x(this,null,function*(){const{nodeData:t,datumSelection:i}=e;return i.update(t,e=>{e.tag=0,e.crisp=!0},e=>e.domain.join("_"))})}updateDatumNodes(e){return x(this,null,function*(){const{isHighlight:t}=e,{fillOpacity:i,strokeOpacity:n,lineDash:s,lineDashOffset:r,shadow:o,highlightStyle:{item:{fill:a,fillOpacity:l=i,stroke:c,strokeWidth:h}}}=this.properties;e.datumSelection.each((e,d,u)=>{var p,g;const{cornerRadius:f,topLeftCornerRadius:m,topRightCornerRadius:v,bottomRightCornerRadius:y,bottomLeftCornerRadius:C}=d,b=t&&void 0!==h?h:d.strokeWidth,S=t?l:i;e.fill=null!=(p=t?a:void 0)?p:d.fill,e.stroke=null!=(g=t?c:void 0)?g:d.stroke,e.fillOpacity=S,e.strokeOpacity=n,e.strokeWidth=b,e.lineDash=s,e.lineDashOffset=r,e.topLeftCornerRadius=m?f:0,e.topRightCornerRadius=v?f:0,e.bottomRightCornerRadius=y?f:0,e.bottomLeftCornerRadius=C?f:0,e.fillShadow=o,e.zIndex=t?Zh.highlightedZIndex:u,e.visible=d.height>0})})}updateLabelSelection(e){return x(this,null,function*(){const{labelData:t,labelSelection:i}=e;return i.update(t,e=>{e.tag=1,e.pointerEvents=1,e.textAlign="center",e.textBaseline="middle"})})}updateLabelNodes(e){return x(this,null,function*(){const t=this.isLabelEnabled();e.labelSelection.each((e,i)=>{const n=i.label;n&&t?(e.text=n.text,e.x=n.x,e.y=n.y,e.fontStyle=n.fontStyle,e.fontWeight=n.fontWeight,e.fontSize=n.fontSize,e.fontFamily=n.fontFamily,e.fill=n.fill,e.visible=!0):e.visible=!1})})}initQuadTree(e){Ip(e,Dp(this.contentGroup.children[0]))}pickNodeClosestDatum(e){return Rp(this,e)}getTooltipHtml(e){const t=this.axes.x,i=this.axes.y;if(!this.properties.isValid()||!t||!i)return il;const{xKey:n,yKey:s,xName:r,yName:o,fill:a,aggregation:l,tooltip:c}=this.properties,{aggregatedValue:h,frequency:d,domain:[u,p],itemId:g}=e,f=`${Ou(null!=r?r:n)}: ${t.formatDatum(u)} - ${t.formatDatum(p)}`;let m=s?`<b>${Ou(null!=o?o:s)} (${l})</b>: ${i.formatDatum(h)}<br>`:"";m+=`<b>Frequency</b>: ${d}`;const v={title:f,backgroundColor:a,content:m};return c.toTooltipHtml(v,{datum:{data:e.datum,aggregatedValue:e.aggregatedValue,domain:e.domain,frequency:e.frequency},itemId:g,xKey:n,xName:r,yKey:s,yName:o,color:a,title:f,seriesId:this.id})}getLegendData(e){var t,i;if(!(null==(t=this.data)?void 0:t.length)||"category"!==e)return[];const{xKey:n,yName:s,fill:r,fillOpacity:o,stroke:a,strokeWidth:l,strokeOpacity:c,visible:h}=this.properties;return[{legendType:"category",id:this.id,itemId:n,seriesId:this.id,enabled:h,label:{text:null!=(i=null!=s?s:n)?i:"Frequency"},marker:{fill:null!=r?r:"rgba(0, 0, 0, 0)",stroke:null!=a?a:"rgba(0, 0, 0, 0)",fillOpacity:o,strokeOpacity:c,strokeWidth:l}}]}animateEmptyUpdateReady({datumSelection:e,labelSelection:t}){const i=Hp(Vp(!0,this.axes,"normal"));Ls(this.id,"datums",this.ctx.animationManager,[e],i),_u(this,"labels",this.ctx.animationManager,t)}animateWaitingUpdateReady(e){var t,i;const n=null==(i=null==(t=this.processedData)?void 0:t.reduced)?void 0:i.diff,s=Hp(Vp(!0,this.axes,"normal"));Ls(this.id,"datums",this.ctx.animationManager,[e.datumSelection],s,(e,t)=>Fh(t.domain),n),_u(this,"labels",this.ctx.animationManager,e.labelSelection)}isLabelEnabled(){return this.properties.label.enabled}computeFocusBounds({datumIndex:e,seriesRect:t}){var i;return Up(null==(i=this.contextNodeData)?void 0:i.nodeData[e],this.contentGroup,t)}};ng.className="HistogramSeries",ng.type="histogram";var sg={type:"series",optionsKey:"series[]",packageType:"community",chartTypes:["cartesian"],identifier:"histogram",instanceConstructor:ng,defaultAxes:[{type:"number",position:"bottom"},{type:"number",position:"left"}],themeTemplate:{series:{__extends__:Wt,strokeWidth:1,fillOpacity:1,strokeOpacity:1,lineDash:[0],lineDashOffset:0,label:{enabled:!1,fontSize:12,fontFamily:Kt,color:qt},shadow:{enabled:!1,color:ti,xOffset:3,yOffset:3,blur:5}}},paletteFactory:({takeColors:e})=>{const{fills:[t],strokes:[i]}=e(1);return{fill:t,stroke:i}}},rg=class extends Wd{constructor(){super(...arguments),this.stroke="#874349",this.strokeWidth=2,this.strokeOpacity=1,this.lineDash=[0],this.lineDashOffset=0,this.marker=new zu,this.label=new Bo,this.tooltip=new Wu,this.connectMissingData=!1}};S([$s(tr)],rg.prototype,"xKey",2),S([$s(tr)],rg.prototype,"yKey",2),S([$s(tr,{optional:!0})],rg.prototype,"xName",2),S([$s(tr,{optional:!0})],rg.prototype,"yName",2),S([$s(tr,{optional:!0})],rg.prototype,"title",2),S([$s(mr)],rg.prototype,"stroke",2),S([$s(sr)],rg.prototype,"strokeWidth",2),S([$s(rr)],rg.prototype,"strokeOpacity",2),S([$s(Mr)],rg.prototype,"lineDash",2),S([$s(sr)],rg.prototype,"lineDashOffset",2),S([$s(Zs)],rg.prototype,"marker",2),S([$s(Zs)],rg.prototype,"label",2),S([$s(Zs)],rg.prototype,"tooltip",2),S([$s(Js)],rg.prototype,"connectMissingData",2);var og=class extends jd{constructor(e){super({moduleCtx:e,directionKeys:Hd,directionNames:zd,hasMarkers:!0,pickModes:[2,3,0],markerSelectionGarbageCollection:!1,animationResetFns:{path:lp({getOpacity:()=>this.getOpacity()}),label:Gu,marker:(e,t)=>v(v({},{opacity:1,scalingX:1,scalingY:1}),Xu(0,t))}}),this.properties=new rg}processData(e){return x(this,null,function*(){var t,i;if(!this.properties.isValid()||null==this.data)return;const{xKey:n,yKey:s}=this.properties,r=!this.ctx.animationManager.isSkipped(),o=null==(t=this.axes.x)?void 0:t.scale,a=null==(i=this.axes.y)?void 0:i.scale,{isContinuousX:l,xScaleType:c,yScaleType:h}=this.getScaleInformation({xScale:o,yScale:a}),d=[];l||d.push(Uh(n,c,{id:"xKey"})),r&&(d.push(kh(l?["xValue"]:void 0)),this.processedData&&d.push(_h(this.processedData))),d.push(Wh(n,c,{id:"xValue"}),Wh(s,h,{id:"yValue",invalidValue:void 0})),yield this.requestDataModel(e,this.data,{props:d}),this.animationState.transition("updateData")})}getSeriesDomain(e){const{axes:t,dataModel:i,processedData:n}=this;if(!n||!i)return[];const s=t.x,r=t.y,o=i.resolveProcessedDataDefById(this,"xValue");if("x"===e){const e=i.getDomain(this,"xValue","value",n);return"value"===(null==o?void 0:o.def.type)&&"category"===o.def.valueType?e:qc(cn(e),s)}return qc(i.getDomain(this,"yValue","value",n),r)}createNodeData(){return x(this,null,function*(){var e,t,i;const{processedData:n,dataModel:s,axes:r}=this,o=r.x,a=r.y;if(!(n&&s&&o&&a))return;const{xKey:l,yKey:c,xName:h,yName:d,marker:u,label:p,connectMissingData:g,legendItemName:f}=this.properties,m=o.scale,v=a.scale,y=(null!=(e=m.bandwidth)?e:0)/2,C=(null!=(t=v.bandwidth)?t:0)/2,b=[],S=u.enabled?u.size:0,w=s.resolveProcessedDataIndexById(this,"xValue"),x=s.resolveProcessedDataIndexById(this,"yValue");let E,M=!0;for(let e=0;e<n.data.length;e++){const{datum:t,values:s}=null!=E?E:n.data[e],r=s[w],o=s[x];if(void 0===o)M=!g;else{const s=m.convert(r)+y;if(isNaN(s)){M=!g,E=void 0;continue}E=void 0===(null==(i=n.data[e+1])?void 0:i.values[x])?void 0:n.data[e+1];const a=v.convert(o)+C,u=this.getLabelText(p,{value:o,datum:t,xKey:l,yKey:c,xName:h,yName:d,legendItemName:f},e=>We(e)?e.toFixed(2):String(e));b.push({series:this,datum:t,yKey:c,xKey:l,point:{x:s,y:a,moveTo:M,size:S},midPoint:{x:s,y:a},yValue:o,xValue:r,capDefaults:{lengthRatioMultiplier:this.properties.marker.getDiameter(),lengthMax:1/0},label:u?{text:u,fontStyle:p.fontStyle,fontWeight:p.fontWeight,fontSize:p.fontSize,fontFamily:p.fontFamily,textAlign:"center",textBaseline:"bottom",fill:p.color}:void 0}),M=!1}}return{itemId:c,nodeData:b,labelData:b,scales:this.calculateScaling(),visible:this.visible}})}isPathOrSelectionDirty(){return this.properties.marker.isDirty()}markerFactory(){const{shape:e}=this.properties.marker;return new(Nd(e))}updatePathNodes(e){return x(this,null,function*(){const{paths:[t],opacity:i,visible:n,animationEnabled:s}=e;t.setProperties({fill:void 0,lineJoin:"round",pointerEvents:1,opacity:i,stroke:this.properties.stroke,strokeWidth:this.getStrokeWidth(this.properties.strokeWidth),strokeOpacity:this.properties.strokeOpacity,lineDash:this.properties.lineDash,lineDashOffset:this.properties.lineDashOffset}),s||(t.visible=n),cp(this,t)})}updateMarkerSelection(e){return x(this,null,function*(){let{nodeData:t}=e;const{markerSelection:i}=e,{shape:n,enabled:s}=this.properties.marker;return t=n&&s?t:[],this.properties.marker.isDirty()&&(i.clear(),i.cleanup()),i.update(t,void 0,e=>Fh(e.xValue))})}updateMarkerNodes(e){return x(this,null,function*(){const{markerSelection:t,isHighlight:i}=e,{xKey:n,yKey:s,stroke:r,strokeWidth:o,strokeOpacity:a,marker:l,highlightStyle:c}=this.properties,h=Xe(i&&c.item,l.getStyle(),{stroke:r,strokeWidth:o,strokeOpacity:a}),d=this.ctx.animationManager.isSkipped();t.each((e,t)=>{this.updateMarkerStyle(e,l,{datum:t,highlighted:i,xKey:n,yKey:s},h,{applyTranslation:d})}),i||l.markClean()})}updateLabelSelection(e){return x(this,null,function*(){return e.labelSelection.update(this.isLabelEnabled()?e.labelData:[])})}updateLabelNodes(e){return x(this,null,function*(){const{enabled:t,fontStyle:i,fontWeight:n,fontSize:s,fontFamily:r,color:o}=this.properties.label;e.labelSelection.each((e,a)=>{const{point:l,label:c}=a;a&&c&&t?(e.fontStyle=i,e.fontWeight=n,e.fontSize=s,e.fontFamily=r,e.textAlign=c.textAlign,e.textBaseline=c.textBaseline,e.text=c.text,e.x=l.x,e.y=l.y-10,e.fill=o,e.visible=!0):e.visible=!1})})}getTooltipHtml(e){var t;const i=this.axes.x,n=this.axes.y;if(!this.properties.isValid()||!i||!n)return il;const{xKey:s,yKey:r,xName:o,yName:a,strokeWidth:l,marker:c,tooltip:h}=this.properties,{datum:d,xValue:u,yValue:p,itemId:g}=e,f=i.formatDatum(u),m=n.formatDatum(p),y=Ou(null!=(t=this.properties.title)?t:a),C=Ou(f+": "+m),b=Xe({fill:c.stroke},c.getStyle(),{strokeWidth:l}),{fill:S}=this.getMarkerStyle(c,{datum:e,xKey:s,yKey:r,highlighted:!1},b);return h.toTooltipHtml({title:y,content:C,backgroundColor:S},v({datum:d,itemId:g,xKey:s,xName:o,yKey:r,yName:a,title:y,color:S,seriesId:this.id},this.getModuleTooltipParams()))}getLegendData(e){var t,i,n,s,r,o,a,l,c,h;if(!(null==(t=this.data)?void 0:t.length)||!this.properties.isValid()||"category"!==e)return[];const{yKey:d,yName:u,stroke:p,strokeOpacity:g,strokeWidth:f,lineDash:m,title:v,marker:y,visible:C,legendItemName:b}=this.properties,S="rgba(0, 0, 0, 0)";return[{legendType:"category",id:this.id,itemId:d,legendItemName:b,seriesId:this.id,enabled:C,label:{text:null!=(n=null!=(i=null!=b?b:v)?i:u)?n:d},marker:{shape:y.shape,fill:null!=(s=y.fill)?s:S,stroke:null!=(o=null!=(r=y.stroke)?r:p)?o:S,fillOpacity:null!=(a=y.fillOpacity)?a:1,strokeOpacity:null!=(c=null!=(l=y.strokeOpacity)?l:g)?c:1,strokeWidth:null!=(h=y.strokeWidth)?h:0,enabled:y.enabled},line:{stroke:null!=p?p:S,strokeOpacity:g,strokeWidth:f,lineDash:m}}]}updatePaths(e){return x(this,null,function*(){this.updateLinePaths(e.paths,e.contextData)})}updateLinePaths(e,t){const{nodeData:i}=t,[n]=e,{path:s}=n;s.clear(!0);for(const e of i)e.point.moveTo?s.moveTo(e.point.x,e.point.y):s.lineTo(e.point.x,e.point.y);n.checkPathDirty()}animateEmptyUpdateReady(e){const{markerSelection:t,labelSelection:i,annotationSelections:n,contextData:s,paths:r}=e,{animationManager:o}=this.ctx;this.updateLinePaths(r,s),rp(this,o,...r),ma([t],Xu),Yu(this,o,t),_u(this,"labels",o,i),_u(this,"annotations",o,...n)}animateReadyResize(e){const{contextData:t,paths:i}=e;this.updateLinePaths(i,t),super.animateReadyResize(e)}animateWaitingUpdateReady(e){var t,i;const{animationManager:n}=this.ctx,{markerSelection:s,labelSelection:r,annotationSelections:o,contextData:a,paths:l,previousContextData:c}=e,[h]=l;super.resetAllAnimation(e);const d=()=>{this.updateLinePaths(l,a)};if(null==a||null==c)return d(),Ku(this,n,"added",s),op(this,"path_properties",n,"add",h),_u(this,"labels",n,r),void _u(this,"annotations",n,...o);const u=Sp(a,c,null==(i=null==(t=this.processedData)?void 0:t.reduced)?void 0:i.diff);if(void 0===u)return n.skipCurrentBatch(),void d();"no-op"!==u.status&&(Ku(this,n,void 0,s),Ls(this.id,"path_properties",n,[h],u.pathProperties),Pu(this.id,"path_update",n,[h],u.path),u.hasMotion&&(_u(this,"labels",n,r),_u(this,"annotations",n,...o)))}isLabelEnabled(){return this.properties.label.enabled}getBandScalePadding(){return{inner:1,outer:.1}}nodeFactory(){return new Eo}getFormattedMarkerStyle(e){const{xKey:t,yKey:i}=this.properties;return this.getMarkerStyle(this.properties.marker,{datum:e,xKey:t,yKey:i,highlighted:!0})}computeFocusBounds(e){return Qu(this,e)}};og.className="LineSeries",og.type="line";var ag={type:"series",optionsKey:"series[]",packageType:"community",chartTypes:["cartesian"],identifier:"line",instanceConstructor:og,defaultAxes:[{type:"number",position:"left"},{type:"category",position:"bottom"}],themeTemplate:{series:{__extends__:Wt,tooltip:{position:{type:"node"}},strokeWidth:2,strokeOpacity:1,lineDash:[0],lineDashOffset:0,marker:{__extends__:jt,fillOpacity:1,strokeOpacity:1,strokeWidth:0},label:{enabled:!1,fontSize:12,fontFamily:Kt,color:$t}}},enterpriseThemeTemplate:{series:{errorBar:{cap:{lengthRatio:1}}}},paletteFactory:e=>{const{marker:t}=ku(e);return{stroke:t.fill,marker:t}}},lg=class extends Bo{constructor(){super(...arguments),this.placement="top"}};S([$s(_r)],lg.prototype,"placement",2);var cg=class extends Wd{constructor(){super(...arguments),this.colorRange=["#ffff00","#00ff00","#0000ff"],this.marker=new zu,this.label=new lg,this.tooltip=new Wu}};S([$s(tr)],cg.prototype,"xKey",2),S([$s(tr)],cg.prototype,"yKey",2),S([$s(tr,{optional:!0})],cg.prototype,"labelKey",2),S([$s(tr,{optional:!0})],cg.prototype,"colorKey",2),S([$s(tr,{optional:!0})],cg.prototype,"xName",2),S([$s(tr,{optional:!0})],cg.prototype,"yName",2),S([$s(tr,{optional:!0})],cg.prototype,"labelName",2),S([$s(tr,{optional:!0})],cg.prototype,"colorName",2),S([$s(Cr,{optional:!0})],cg.prototype,"colorDomain",2),S([$s(vr)],cg.prototype,"colorRange",2),S([$s(tr,{optional:!0})],cg.prototype,"title",2),S([$s(Zs)],cg.prototype,"marker",2),S([$s(Zs)],cg.prototype,"label",2),S([$s(Zs)],cg.prototype,"tooltip",2);var hg=class extends jd{constructor(e){super({moduleCtx:e,directionKeys:Hd,directionNames:zd,pickModes:[2,3,0],pathsPerSeries:0,hasMarkers:!0,markerSelectionGarbageCollection:!1,animationResetFns:{marker:qu,label:Gu}}),this.properties=new cg,this.colorScale=new qp}processData(e){return x(this,null,function*(){var t,i,n;if(!this.properties.isValid()||null==this.data||!this.visible)return;const s=null==(t=this.axes.x)?void 0:t.scale,r=null==(i=this.axes.y)?void 0:i.scale,{xScaleType:o,yScaleType:a}=this.getScaleInformation({xScale:s,yScale:r}),l=this.colorScale.type,{xKey:c,yKey:h,labelKey:d,colorKey:u,colorDomain:p,colorRange:g}=this.properties,{dataModel:f,processedData:m}=yield this.requestDataModel(e,this.data,{props:[Uh(c,o,{id:"xKey-raw"}),Uh(h,a,{id:"yKey-raw"}),...d?[Uh(d,"band",{id:"labelKey-raw"})]:[],Wh(c,o,{id:"xValue"}),Wh(h,a,{id:"yValue"}),...u?[Wh(u,l,{id:"colorValue"})]:[],...d?[Wh(d,"band",{id:"labelValue"})]:[]]});if(u){const e=f.resolveProcessedDataIndexById(this,"colorValue");this.colorScale.domain=null!=(n=null!=p?p:m.domain.values[e])?n:[],this.colorScale.range=g,this.colorScale.update()}this.animationState.transition("updateData")})}getSeriesDomain(e){const{dataModel:t,processedData:i}=this;if(!i||!t)return[];const n="x"===e?"xValue":"yValue",s=t.resolveProcessedDataDefById(this,n),r=t.getDomain(this,n,"value",i);if("value"===(null==s?void 0:s.def.type)&&"category"===(null==s?void 0:s.def.valueType))return r;const o=this.axes[e];return qc(cn(r),o)}createNodeData(){return x(this,null,function*(){var e,t,i;const{axes:n,dataModel:s,processedData:r,colorScale:o}=this,{xKey:a,yKey:l,labelKey:c,colorKey:h,xName:d,yName:u,labelName:p,marker:g,label:f,visible:m}=this.properties,{placement:y}=f,C=Nd(g.shape),b=n.x,S=n.y;if(!(s&&r&&m&&b&&S))return;const w=s.resolveProcessedDataIndexById(this,"xValue"),x=s.resolveProcessedDataIndexById(this,"yValue"),E=h?s.resolveProcessedDataIndexById(this,"colorValue"):-1,M=c?s.resolveProcessedDataIndexById(this,"labelValue"):-1,A=b.scale,T=S.scale,D=(null!=(e=A.bandwidth)?e:0)/2,I=(null!=(t=T.bandwidth)?t:0)/2,R=[],L=f.getFont();for(const{values:e,datum:t}of null!=(i=r.data)?i:[]){const i=e[w],n=e[x],s=A.convert(i)+D,r=T.convert(n)+I,m=this.getLabelText(f,{value:c?e[M]:n,datum:t,xKey:a,yKey:l,labelKey:c,xName:d,yName:u,labelName:p}),b=Fo.getTextSize(m,L),S=h?o.convert(e[E]):void 0;R.push({series:this,itemId:l,yKey:l,xKey:a,datum:t,xValue:i,yValue:n,capDefaults:{lengthRatioMultiplier:g.getDiameter(),lengthMax:1/0},point:{x:s,y:r,size:g.size},midPoint:{x:s,y:r},fill:S,label:v({text:m},b),marker:C,placement:y})}return{itemId:l,nodeData:R,labelData:R,scales:this.calculateScaling(),visible:this.visible}})}isPathOrSelectionDirty(){return this.properties.marker.isDirty()}getLabelData(){var e,t;return null!=(t=null==(e=this.contextNodeData)?void 0:e.labelData)?t:[]}markerFactory(){const{shape:e}=this.properties.marker;return new(Nd(e))}updateMarkerSelection(e){return x(this,null,function*(){const{nodeData:t,markerSelection:i}=e;return this.properties.marker.isDirty()&&(i.clear(),i.cleanup()),i.update(this.properties.marker.enabled?t:[])})}updateMarkerNodes(e){return x(this,null,function*(){const{markerSelection:t,isHighlight:i}=e,{xKey:n,yKey:s,labelKey:r,marker:o,highlightStyle:a}=this.properties,l=Xe(i&&a.item,o.getStyle());t.each((e,t)=>{this.updateMarkerStyle(e,o,{datum:t,highlighted:i,xKey:n,yKey:s,labelKey:r},l)}),i||o.markClean()})}updateLabelSelection(e){return x(this,null,function*(){var t,i;const n=this.isLabelEnabled()&&null!=(i=null==(t=this.chart)?void 0:t.placeLabels().get(this))?i:[];return e.labelSelection.update(n.map(({datum:e,x:t,y:i})=>y(v({},e),{point:{x:t,y:i,size:e.point.size},placement:"top"})),e=>{e.pointerEvents=1})})}updateLabelNodes(e){return x(this,null,function*(){const{label:t}=this.properties;e.labelSelection.each((e,i)=>{var n,s,r,o;e.text=i.label.text,e.fill=t.color,e.x=null!=(s=null==(n=i.point)?void 0:n.x)?s:0,e.y=null!=(o=null==(r=i.point)?void 0:r.y)?o:0,e.fontStyle=t.fontStyle,e.fontWeight=t.fontWeight,e.fontSize=t.fontSize,e.fontFamily=t.fontFamily,e.textAlign="left",e.textBaseline="top"})})}getTooltipHtml(e){const t=this.axes.x,i=this.axes.y;if(!this.properties.isValid()||!t||!i)return il;const{xKey:n,yKey:s,labelKey:r,xName:o,yName:a,labelName:l,title:c=a,marker:h,tooltip:d}=this.properties,{datum:u,xValue:p,yValue:g,label:f,itemId:m}=e,y=Xe({fill:e.fill,strokeWidth:this.getStrokeWidth(h.strokeWidth)},h.getStyle()),{fill:C="gray"}=this.getMarkerStyle(h,{datum:e,highlighted:!1,xKey:n,yKey:s,labelKey:r},y),b=Ou(t.formatDatum(p)),S=Ou(i.formatDatum(g));let w=`<b>${Ou(null!=o?o:n)}</b>: ${b}<br><b>${Ou(null!=a?a:s)}</b>: ${S}`;return r&&(w=`<b>${Ou(null!=l?l:r)}</b>: ${Ou(f.text)}<br>`+w),d.toTooltipHtml({title:c,content:w,backgroundColor:C},v({datum:u,itemId:m,xKey:n,xName:o,yKey:s,yName:a,labelKey:r,labelName:l,title:c,color:C,seriesId:this.id},this.getModuleTooltipParams()))}getLegendData(e){var t,i,n,s,r,o;const{yKey:a,yName:l,title:c,marker:h,visible:d}=this.properties,{fill:u,stroke:p,fillOpacity:g,strokeOpacity:f,strokeWidth:m}=h;return(null==(t=this.data)?void 0:t.length)&&this.properties.isValid()&&"category"===e?[{legendType:"category",id:this.id,itemId:a,seriesId:this.id,enabled:d,label:{text:null!=(i=null!=c?c:l)?i:a},marker:{shape:h.shape,fill:null!=(s=null!=(n=h.fill)?n:u)?s:"rgba(0, 0, 0, 0)",stroke:null!=(o=null!=(r=h.stroke)?r:p)?o:"rgba(0, 0, 0, 0)",fillOpacity:null!=g?g:1,strokeOpacity:null!=f?f:1,strokeWidth:null!=m?m:0}}]:[]}animateEmptyUpdateReady(e){const{markerSelection:t,labelSelection:i,annotationSelections:n}=e;$u(this,this.ctx.animationManager,t),_u(this,"labels",this.ctx.animationManager,i),_u(this,"annotations",this.ctx.animationManager,...n)}isLabelEnabled(){return this.properties.label.enabled}nodeFactory(){return new Eo}getFormattedMarkerStyle(e){const{xKey:t,yKey:i,labelKey:n}=this.properties;return this.getMarkerStyle(this.properties.marker,{datum:e,xKey:t,yKey:i,labelKey:n,highlighted:!0})}computeFocusBounds(e){return Qu(this,e)}};hg.className="ScatterSeries",hg.type="scatter";var dg={type:"series",optionsKey:"series[]",packageType:"community",chartTypes:["cartesian"],identifier:"scatter",instanceConstructor:hg,defaultAxes:[{type:"number",position:"bottom"},{type:"number",position:"left"}],themeTemplate:{series:{__extends__:Wt,tooltip:{position:{type:"node"}},marker:{__extends__:jt,fillOpacity:.8},label:{enabled:!1,fontSize:12,fontFamily:Kt,color:$t}}},enterpriseThemeTemplate:{series:{errorBar:{cap:{lengthRatio:1}}}},paletteFactory:ku},ug=class e{constructor(e,t,i,n){this.startAngle=e,this.endAngle=t,this.innerRadius=i,this.outerRadius=n}clone(){const{startAngle:t,endAngle:i,innerRadius:n,outerRadius:s}=this;return new e(t,i,n,s)}[Bn](t,i){return new e(this.startAngle*(1-i)+t.startAngle*i,this.endAngle*(1-i)+t.endAngle*i,this.innerRadius*(1-i)+t.innerRadius*i,this.outerRadius*(1-i)+t.outerRadius*i)}};function pg(e,t,i){const n=Math.sqrt(Math.pow(e,2)+Math.pow(t,2)),{innerRadius:s,outerRadius:r}=i;if(i.startAngle===i.endAngle||n<Math.min(s,r)||n>Math.max(s,r))return!1;const o=Fs(i.startAngle),a=Fs(i.endAngle),l=Math.atan2(t,e);return o<a?l<=a&&l>=o:l<=a&&l>=-Math.PI||l>=o&&l<=Math.PI}function gg(e,t){const{startAngle:i,endAngle:n,innerRadius:s,outerRadius:r}=t,o={x:r*Math.cos(i),y:r*Math.sin(i)},a={x:r*Math.cos(n),y:r*Math.sin(n)},l=0===s?{x:0,y:0}:{x:s*Math.cos(i),y:s*Math.sin(i)},c=0===s?{x:0,y:0}:{x:s*Math.cos(n),y:s*Math.sin(n)};return od(e.start.x,e.start.y,e.end.x,e.end.y,o.x,o.y,l.x,l.y)||od(e.start.x,e.start.y,e.end.x,e.end.y,a.x,a.y,c.x,c.y)||cd(0,0,r,i,n,!0,e.start.x,e.start.y,e.end.x,e.end.y)}function fg(e,t){const i={x:e.x,y:e.y},n={x:e.x+e.width,y:e.y},s={x:e.x,y:e.y+e.height},r={x:e.x+e.width,y:e.y+e.height};return gg({start:i,end:n},t)||gg({start:s,end:r},t)}function mg(e,t,i,n){if(0===i&&0===n)return 0;if(Math.asin(Math.abs(1*i)/(e+1*i))+Math.asin(Math.abs(1*n)/(e+1*n))-t<0)return 1;let s=0,r=1;for(let o=0;o<8;o+=1){const o=(s+r)/2;Math.asin(Math.abs(o*i)/(e+o*i))+Math.asin(Math.abs(o*n)/(e+o*n))-t<0?s=o:r=o}return s}function vg(e,t){return Hs(e,t)<1e-6?t:Os(e-t)+t}function yg(e,t,i=0){const n=Math.abs(t-e)>=2*Math.PI?2*Math.PI:Os(t-e);return{startAngle:e=vg(e,i),endAngle:t=e+n}}function Cg(e,t,i,n,s,r){const o=Math.sin(r),a=Math.cos(r),l=f(e,2)+f(t,2)-f(i,2);let c=NaN,h=NaN,d=NaN,u=NaN;if(a>.5){const i=o/a,n=1+f(i,2),s=-2*(e+t*i),r=f(s,2)-4*n*l;if(r<0)return;const p=(-s+Math.sqrt(r))/(2*n),g=(-s-Math.sqrt(r))/(2*n);c=p,h=p*i,d=g,u=g*i}else{const i=a/o,n=1+f(i,2),s=-2*(t+e*i),r=f(s,2)-4*n*l;if(r<0)return;const p=(-s+Math.sqrt(r))/(2*n),g=(-s-Math.sqrt(r))/(2*n);c=p*i,h=p,d=g*i,u=g}const p=d*a+u*o,g=c*a+h*o>0?vg(Math.atan2(h-t,c-e),n):NaN,m=p>0?vg(Math.atan2(u-t,d-e),n):NaN;return g>=n&&g<=s?g:m>=n&&m<=s?m:void 0}function bg(e,t,i,n,s,r){const o=Math.hypot(e,t),a=o-(f(o,2)-f(i,2)+f(r,2))/(2*o),l=Math.atan2(t,e),c=Math.acos(-a/i),h=vg(l+c,n),d=vg(l-c,n);return h>=n&&h<=s?h:d>=n&&d<=s?d:void 0}var Sg=class{constructor(e,t,i,n,s){this.cx=e,this.cy=t,this.r=i,this.a0=n,this.a1=s,this.a0>=this.a1&&(this.a0=NaN,this.a1=NaN)}isValid(){return Number.isFinite(this.a0)&&Number.isFinite(this.a1)}pointAt(e){return{x:this.cx+this.r*Math.cos(e),y:this.cy+this.r*Math.sin(e)}}clipStart(e){null==e||!this.isValid()||e<this.a0||(this.a0=e,(Number.isNaN(e)||this.a0>=this.a1)&&(this.a0=NaN,this.a1=NaN))}clipEnd(e){null==e||!this.isValid()||e>this.a1||(this.a1=e,(Number.isNaN(e)||this.a0>=this.a1)&&(this.a0=NaN,this.a1=NaN))}},wg=class extends ud{constructor(){super(...arguments),this.centerX=0,this.centerY=0,this.innerRadius=10,this.outerRadius=20,this.startAngle=0,this.endAngle=2*Math.PI,this.clipSector=void 0,this.concentricEdgeInset=0,this.radialEdgeInset=0,this.startOuterCornerRadius=0,this.endOuterCornerRadius=0,this.startInnerCornerRadius=0,this.endInnerCornerRadius=0}set inset(e){this.concentricEdgeInset=e,this.radialEdgeInset=e}set cornerRadius(e){this.startOuterCornerRadius=e,this.endOuterCornerRadius=e,this.startInnerCornerRadius=e,this.endInnerCornerRadius=e}computeBBox(){const e=this.outerRadius;return new ts(this.centerX-e,this.centerY-e,2*e,2*e)}normalizedRadii(){const{concentricEdgeInset:e}=this;return{innerRadius:Math.max(Math.min(this.innerRadius,this.outerRadius)+e,0),outerRadius:Math.max(Math.max(this.innerRadius,this.outerRadius)-e,0)}}normalizedClipSector(){const{clipSector:e}=this;if(null==e)return;const{startAngle:t,endAngle:i}=yg(this.startAngle,this.endAngle),{innerRadius:n,outerRadius:s}=this.normalizedRadii(),r=yg(e.startAngle,e.endAngle,t);return new ug(Math.max(t,r.startAngle),Math.min(i,r.endAngle),Math.max(n,e.innerRadius),Math.min(s,e.outerRadius))}getAngleOffset(e){return e>0?this.radialEdgeInset/e:0}arc(e,t,i,n,s,r,o,a){if(e<=0)return;const{startAngle:l,endAngle:c}=yg(this.startAngle,this.endAngle),{innerRadius:h,outerRadius:d}=this.normalizedRadii(),u=this.normalizedClipSector();if(a&&h<=0)return;const p=this.getAngleOffset(h),g=this.getAngleOffset(d),f=a?this.getAngleOffset(h+e):this.getAngleOffset(d-e),m=o?l+f+t:c-f-t,v=a?h+e:d-e,y=v*Math.cos(m),C=v*Math.sin(m);if(null!=u){const e=1e-6;if(!(o||m>=l-e&&m<=u.endAngle-e))return;if(o&&!(m>=u.startAngle+e&&m<=c-e))return;if(a&&!(v>=u.innerRadius-e))return;if(!(a||v<=u.outerRadius+e))return}const b=new Sg(y,C,e,i,n);if(null!=u){let t,c;if(a?(b.clipStart(Cg(y,C,e,i,n,u.endAngle-p)),b.clipEnd(Cg(y,C,e,i,n,u.startAngle+p))):(b.clipStart(Cg(y,C,e,i,n,u.startAngle+g)),b.clipEnd(Cg(y,C,e,i,n,u.endAngle-g))),o?(t=bg(y,C,e,i,n,u.innerRadius),c=bg(y,C,e,i,n,u.outerRadius)):(t=bg(y,C,e,i,n,u.outerRadius),c=bg(y,C,e,i,n,u.innerRadius)),b.clipStart(t),b.clipEnd(c),null!=t){const{x:e,y:i}=b.pointAt(t),n=vg(Math.atan2(i,e),l);o?null==r||r.clipStart(n):s.clipEnd(n)}if(null!=c){const{x:e,y:t}=b.pointAt(c),i=vg(Math.atan2(t,e),l);o?s.clipStart(i):null==r||r.clipEnd(i)}}if(null!=u){const{x:e,y:t}=b.pointAt((b.a0+b.a1)/2);if(!pg(e,t,u))return}const{x:S,y:w}=b.pointAt(o===a?b.a0:b.a1),x=vg(Math.atan2(w,S),l),E=a?r:s;return o?null==E||E.clipStart(x):null==E||E.clipEnd(x),b}updatePath(){var e,t,i,n,s;const{path:r,centerX:o,centerY:a,concentricEdgeInset:l,radialEdgeInset:c}=this;let{startOuterCornerRadius:h,endOuterCornerRadius:d,startInnerCornerRadius:u,endInnerCornerRadius:p}=this;const{startAngle:g,endAngle:f}=yg(this.startAngle,this.endAngle),{innerRadius:m,outerRadius:v}=this.normalizedRadii(),y=this.normalizedClipSector(),C=f-g,b=C>=2*Math.PI-1e-6;if(r.clear(),(null!=(e=null==y?void 0:y.startAngle)?e:g)===(null!=(t=null==y?void 0:y.endAngle)?t:f))return;if(b&&null==this.clipSector&&0===h&&0===d&&0===u&&0===p)return r.moveTo(o+v*Math.cos(g),a+v*Math.sin(g)),r.arc(o,a,v,g,f),m>l&&(r.moveTo(o+m*Math.cos(f),a+m*Math.sin(f)),r.arc(o,a,m,f,g,!0)),void r.closePath();const S=this.getAngleOffset(m),w=this.getAngleOffset(v);if(C<2*w)return;const x=(null!=(i=null==y?void 0:y.innerRadius)?i:m)>l,E=m<l||C<2*S,M=v-m,A=Math.max(h,u,d,p),T=A>0?Math.min(M/A,1):1;h*=T,d*=T,u*=T,p*=T;const D=mg(v,C-2*w,-h,-d);if(h*=D,d*=D,!E&&x){const e=mg(m,C-2*S,u,p);u*=e,p*=e}else u=0,p=0;const I=Math.max(h+u,d+p),R=I>0?Math.min(M/I,1):1;h*=R,d*=R,u*=R,p*=R;let L=0,k=0;const P=h/(v-h),N=d/(v-d);if(P>=0&&P<.999999)L=Math.asin(P);else{L=C/2;const e=v/(1/Math.sin(L)+1);h=Math.min(e,h)}if(N>=0&&N<.999999)k=Math.asin(N);else{k=C/2;const e=v/(1/Math.sin(k)+1);d=Math.min(e,d)}const O=Math.asin(u/(m+u)),_=Math.asin(p/(m+p)),F=null!=(n=null==y?void 0:y.outerRadius)?n:v,G=this.getAngleOffset(F),V=new Sg(0,0,F,g+G,f-G),B=null!=(s=null==y?void 0:y.innerRadius)?s:m,H=this.getAngleOffset(B),z=x?new Sg(0,0,B,g+H,f-H):void 0;null!=y&&(V.clipStart(y.startAngle),V.clipEnd(y.endAngle),null==z||z.clipStart(y.startAngle),null==z||z.clipEnd(y.endAngle));const U=this.arc(h,L,g-.5*Math.PI,g+L,V,z,!0,!1),W=this.arc(d,k,f-k,f+.5*Math.PI,V,z,!1,!1),j=this.arc(p,_,f+.5*Math.PI,f+Math.PI-_,V,z,!1,!0),K=this.arc(u,O,g+Math.PI+O,g+1.5*Math.PI,V,z,!0,!0);if(E){const e=C<.5*Math.PI?c*(1+Math.cos(C))/Math.sin(C):NaN;let t;t=e>0&&e<v?Math.max(Math.hypot(c,e),m):m;const i=g+.5*C;r.moveTo(o+t*Math.cos(i),a+t*Math.sin(i))}else if(!0===(null==K?void 0:K.isValid())){const{x:e,y:t}=K.pointAt(K.a1);r.moveTo(o+e,a+t)}else if(!0===(null==z?void 0:z.isValid())){const{x:e,y:t}=z.pointAt(z.a0);r.moveTo(o+e,a+t)}else{const e=g+C/2,t=m*Math.cos(e),i=m*Math.sin(e);r.moveTo(o+t,a+i)}if(!0===(null==U?void 0:U.isValid())){const{cx:e,cy:t,r:i,a0:n,a1:s}=U;r.arc(o+e,a+t,i,n,s)}if(V.isValid()){const{r:e,a0:t,a1:i}=V;r.arc(o,a,e,t,i)}if(!0===(null==W?void 0:W.isValid())){const{cx:e,cy:t,r:i,a0:n,a1:s}=W;r.arc(o+e,a+t,i,n,s)}if(!E){if(!0===(null==j?void 0:j.isValid())){const{cx:e,cy:t,r:i,a0:n,a1:s}=j;r.arc(o+e,a+t,i,n,s)}if(!0===(null==z?void 0:z.isValid())){const{r:e,a0:t,a1:i}=z;r.arc(o,a,e,i,t,!0)}if(!0===(null==K?void 0:K.isValid())){const{cx:e,cy:t,r:i,a0:n,a1:s}=K;r.arc(o+e,a+t,i,n,s)}}r.closePath()}isPointInPath(e,t){var i;const n=this.transformPoint(e,t),{startAngle:s,endAngle:r,innerRadius:o,outerRadius:a}=null!=(i=this.clipSector)?i:this;return pg(n.x,n.y,{startAngle:s,endAngle:r,innerRadius:Math.min(o,a),outerRadius:Math.max(o,a)})}};wg.className="Sector",S([dd()],wg.prototype,"centerX",2),S([dd()],wg.prototype,"centerY",2),S([dd()],wg.prototype,"innerRadius",2),S([dd()],wg.prototype,"outerRadius",2),S([dd()],wg.prototype,"startAngle",2),S([dd()],wg.prototype,"endAngle",2),S([dd()],wg.prototype,"clipSector",2),S([dd()],wg.prototype,"concentricEdgeInset",2),S([dd()],wg.prototype,"radialEdgeInset",2),S([dd()],wg.prototype,"startOuterCornerRadius",2),S([dd()],wg.prototype,"endOuterCornerRadius",2),S([dd()],wg.prototype,"startInnerCornerRadius",2),S([dd()],wg.prototype,"endInnerCornerRadius",2);var xg=class extends al{constructor(){super(...arguments),this.showInLegend=!1}};S([$s(Js)],xg.prototype,"showInLegend",2);var Eg=class extends Bo{constructor(){super(...arguments),this.margin=2}set(e,t){return super.set(e)}};S([$s(tr)],Eg.prototype,"text",2),S([$s(ir)],Eg.prototype,"margin",2);var Mg=class extends yt{constructor(){super(...arguments),this.fill="transparent",this.fillOpacity=1}};S([$s(mr)],Mg.prototype,"fill",2),S([$s(rr)],Mg.prototype,"fillOpacity",2);var Ag=class extends Bo{constructor(){super(...arguments),this.offset=3,this.minAngle=0,this.minSpacing=4,this.maxCollisionOffset=50,this.avoidCollisions=!0}};S([$s(sr)],Ag.prototype,"offset",2),S([$s(or)],Ag.prototype,"minAngle",2),S([$s(sr)],Ag.prototype,"minSpacing",2),S([$s(sr)],Ag.prototype,"maxCollisionOffset",2),S([$s(Js)],Ag.prototype,"avoidCollisions",2);var Tg=class extends Bo{constructor(){super(...arguments),this.positionOffset=0,this.positionRatio=.5}};S([$s(ir)],Tg.prototype,"positionOffset",2),S([$s(rr)],Tg.prototype,"positionRatio",2);var Dg=class extends yt{constructor(){super(...arguments),this.length=10,this.strokeWidth=1}};S([$s(vr,{optional:!0})],Dg.prototype,"colors",2),S([$s(sr)],Dg.prototype,"length",2),S([$s(sr)],Dg.prototype,"strokeWidth",2);var Ig=class extends Bd{constructor(){super(...arguments),this.fills=Object.values(Ft),this.strokes=Object.values(Gt),this.fillOpacity=1,this.strokeOpacity=1,this.lineDash=[0],this.lineDashOffset=0,this.cornerRadius=0,this.rotation=0,this.outerRadiusOffset=0,this.outerRadiusRatio=1,this.strokeWidth=1,this.sectorSpacing=void 0,this.innerLabels=new Ct(Eg),this.title=new xg,this.innerCircle=new Mg,this.shadow=new Bu,this.calloutLabel=new Ag,this.sectorLabel=new Tg,this.calloutLine=new Dg,this.tooltip=new Wu,this.__BACKGROUND_COLOR_DO_NOT_USE=void 0}isValid(){const e=super.isValid();return null==this.innerRadiusRatio&&null==this.innerRadiusOffset?(O.warnOnce("Either an [innerRadiusRatio] or an [innerRadiusOffset] must be set to render a donut series."),!1):e}};function Rg(e,t,i,n){const s=[i.convert(0),i.convert(1)],r=[n.convert(0),n.convert(1)],o=Math.PI/-2+Vs(t),a=e?"initial":"update";return{nodes:{toFn:(e,t,i,{prevLive:n})=>{var r,a;let{startAngle:l,endAngle:c,innerRadius:h,outerRadius:d}=t;const{stroke:u,fill:p}=t.sectorFormat;if("removed"===i&&n?(l=null==(r=n.datum)?void 0:r.endAngle,c=null==(a=n.datum)?void 0:a.endAngle):"removed"!==i||n||(l=o,c=o),"removed"===i){const e=(({radius:e})=>({innerRadius:s[0],outerRadius:s[0]+(s[1]-s[0])*e}))(t);h=e.innerRadius,d=e.outerRadius}return{startAngle:l,endAngle:c,outerRadius:d,innerRadius:h,stroke:u,fill:p}},fromFn:(t,i,n,{prevFromProps:s})=>{var l,c,h,d,u,p;let{startAngle:g,endAngle:f,innerRadius:m,outerRadius:v}=t,{fill:y,stroke:C}=i.sectorFormat;if("unknown"===n||"added"===n&&!s?(g=o,f=o,m=i.innerRadius,v=i.outerRadius):"added"===n&&s&&(g=null!=(l=s.endAngle)?l:o,f=null!=(c=s.endAngle)?c:o,m=null!=(h=s.innerRadius)?h:i.innerRadius,v=null!=(d=s.outerRadius)?d:i.outerRadius),"added"===n&&!e){const e=(({radius:e})=>({innerRadius:r[0],outerRadius:r[0]+(r[1]-r[0])*e}))(i);m=e.innerRadius,v=e.outerRadius}return"updated"===n&&(y=null!=(u=t.fill)?u:y,C=null!=(p=t.stroke)?p:C),{startAngle:g,endAngle:f,innerRadius:m,outerRadius:v,fill:y,stroke:C,phase:a}}},innerCircle:{fromFn:(e,t)=>{var i,n,s;return{size:null!=(s=null!=(n=null==(i=e.previousDatum)?void 0:i.radius)?n:e.size)?s:0,phase:a}},toFn:(e,t)=>{var i;return{size:null!=(i=t.radius)?i:0}}}}}function Lg(e,t){return{startAngle:t.startAngle,endAngle:t.endAngle,innerRadius:t.innerRadius,outerRadius:t.outerRadius,fill:t.sectorFormat.fill,stroke:t.sectorFormat.stroke}}function kg(e,t){const i=t.y-e.centerY,n=t.x-e.centerX,s=Math.atan2(i,n),r=e.getItemNodes();for(const e of r)if(!0!==e.datum.missing&&Gs(s,e.startAngle,e.endAngle)){const t=Math.sqrt(n*n+i*i);let s=0;return t<e.innerRadius?s=e.innerRadius-t:t>e.outerRadius&&(s=t-e.outerRadius),{datum:e.datum,distance:s}}}function Pg(e,t){const i=e.getNodeData();if(void 0===i)return;const{centerX:n,centerY:s}=e,r=i[t.datumIndex],o=[{radius:r.innerRadius,angle:r.startAngle},{radius:r.innerRadius,angle:r.endAngle},{radius:r.outerRadius,angle:r.startAngle},{radius:r.outerRadius,angle:r.endAngle}],a=[0,Math.PI/2,Math.PI,3*Math.PI/2];for(const e of a)Gs(e,r.startAngle,r.endAngle)&&o.push({radius:r.outerRadius,angle:e});const l=o.map(({radius:e,angle:t})=>zs(n,s,e,t)),c=l.map(e=>e.x),h=l.map(e=>e.y),d=Math.min(...c),u=Math.min(...h),p=Math.max(...c)-d,g=Math.max(...h)-u;return new ts(d,u,p,g)}S([$s(tr)],Ig.prototype,"angleKey",2),S([$s(tr,{optional:!0})],Ig.prototype,"angleName",2),S([$s(tr,{optional:!0})],Ig.prototype,"radiusKey",2),S([$s(tr,{optional:!0})],Ig.prototype,"radiusName",2),S([$s(sr,{optional:!0})],Ig.prototype,"radiusMin",2),S([$s(sr,{optional:!0})],Ig.prototype,"radiusMax",2),S([$s(tr,{optional:!0})],Ig.prototype,"calloutLabelKey",2),S([$s(tr,{optional:!0})],Ig.prototype,"calloutLabelName",2),S([$s(tr,{optional:!0})],Ig.prototype,"sectorLabelKey",2),S([$s(tr,{optional:!0})],Ig.prototype,"sectorLabelName",2),S([$s(tr,{optional:!0})],Ig.prototype,"legendItemKey",2),S([$s(vr)],Ig.prototype,"fills",2),S([$s(vr)],Ig.prototype,"strokes",2),S([$s(rr)],Ig.prototype,"fillOpacity",2),S([$s(rr)],Ig.prototype,"strokeOpacity",2),S([$s(Mr)],Ig.prototype,"lineDash",2),S([$s(sr)],Ig.prototype,"lineDashOffset",2),S([$s(sr)],Ig.prototype,"cornerRadius",2),S([$s(er,{optional:!0})],Ig.prototype,"formatter",2),S([$s(or)],Ig.prototype,"rotation",2),S([$s(ir)],Ig.prototype,"outerRadiusOffset",2),S([$s(rr)],Ig.prototype,"outerRadiusRatio",2),S([$s(ir,{optional:!0})],Ig.prototype,"innerRadiusOffset",2),S([$s(rr,{optional:!0})],Ig.prototype,"innerRadiusRatio",2),S([$s(sr)],Ig.prototype,"strokeWidth",2),S([$s(sr,{optional:!0})],Ig.prototype,"sectorSpacing",2),S([$s(wr)],Ig.prototype,"innerLabels",2),S([$s(Zs)],Ig.prototype,"title",2),S([$s(Zs)],Ig.prototype,"innerCircle",2),S([$s(Zs)],Ig.prototype,"shadow",2),S([$s(Zs)],Ig.prototype,"calloutLabel",2),S([$s(Zs)],Ig.prototype,"sectorLabel",2),S([$s(Zs)],Ig.prototype,"calloutLine",2),S([$s(Zs)],Ig.prototype,"tooltip",2),S([$s(tr,{optional:!0})],Ig.prototype,"__BACKGROUND_COLOR_DO_NOT_USE",2);var Ng=class extends Od{constructor(e){var t=e,{useLabelLayer:i=!1,pickModes:n=[0],canHaveAxes:s=!1,animationResetFns:r}=t,o=C(t,["useLabelLayer","pickModes","canHaveAxes","animationResetFns"]);super(y(v({},o),{useLabelLayer:i,pickModes:n,contentGroupVirtual:!1,directionKeys:{x:["angleKey"],y:["radiusKey"]},directionNames:{x:["angleName"],y:["radiusName"]},canHaveAxes:s})),this.itemGroup=this.contentGroup.appendChild(new Eo),this.nodeData=[],this.itemSelection=Oa.select(this.itemGroup,()=>this.nodeFactory(),!1),this.labelSelection=Oa.select(this.labelGroup,Fo,!1),this.highlightSelection=Oa.select(this.highlightGroup,()=>this.nodeFactory()),this.centerX=0,this.centerY=0,this.radius=0,this.showFocusBox=!1,this.itemGroup.zIndexSubOrder=[()=>this._declarationOrder,1],this.animationResetFns=r,this.animationState=new va("empty",{empty:{update:{target:"ready",action:e=>this.animateEmptyUpdateReady(e)},reset:"empty",skip:"ready"},ready:{updateData:"waiting",clear:"clearing",highlight:e=>this.animateReadyHighlight(e),highlightMarkers:e=>this.animateReadyHighlightMarkers(e),resize:e=>this.animateReadyResize(e),reset:"empty",skip:"ready"},waiting:{update:{target:"ready",action:e=>this.animateWaitingUpdateReady(e)},reset:"empty",skip:"ready"},clearing:{update:{target:"empty",action:e=>this.animateClearingUpdateEmpty(e)},reset:"empty",skip:"ready"}},()=>this.checkProcessedDataAnimatable())}getItemNodes(){return this.itemGroup.children}getNodeData(){return this.nodeData}resetAnimation(e){"initial"===e?this.animationState.transition("reset"):"ready"===e&&this.animationState.transition("skip")}getLabelData(){return[]}computeLabelsBBox(e,t){return null}resetAllAnimation(){var e;const{item:t,label:i}=null!=(e=this.animationResetFns)?e:{};this.ctx.animationManager.stopByAnimationGroupId(this.id),t&&ma([this.itemSelection,this.highlightSelection],t),i&&ma([this.labelSelection],i),this.itemSelection.cleanup(),this.labelSelection.cleanup(),this.highlightSelection.cleanup()}animateEmptyUpdateReady(e){this.ctx.animationManager.skipCurrentBatch(),this.resetAllAnimation()}animateWaitingUpdateReady(e){this.ctx.animationManager.skipCurrentBatch(),this.resetAllAnimation()}animateReadyHighlight(e){var t;const{item:i}=null!=(t=this.animationResetFns)?t:{};i&&ma([this.highlightSelection],i)}animateReadyHighlightMarkers(e){}animateReadyResize(e){this.resetAllAnimation()}animateClearingUpdateEmpty(e){this.ctx.animationManager.skipCurrentBatch(),this.resetAllAnimation()}animationTransitionClear(){this.animationState.transition("clear",this.getAnimationData())}getAnimationData(e){return{seriesRect:e}}},Og=class extends qh{constructor(e,t,i,n){super(e,t,i,n),this.angleKey=n.properties.angleKey,this.radiusKey=n.properties.radiusKey,this.calloutLabelKey=n.properties.calloutLabelKey,this.sectorLabelKey=n.properties.sectorLabelKey}},_g=class extends Ng{constructor(e){super({moduleCtx:e,pickModes:[0],useLabelLayer:!0,animationResetFns:{item:Lg,label:Gu}}),this.properties=new Ig,this.previousRadiusScale=new Zd,this.radiusScale=new Zd,this.backgroundGroup=this.rootGroup.appendChild(new Eo({name:`${this.id}-background`,layer:!0,zIndex:0})),this.zerosumRingsGroup=this.backgroundGroup.appendChild(new Eo({name:`${this.id}-zerosumRings`})),this.zerosumOuterRing=this.zerosumRingsGroup.appendChild(new yd),this.zerosumInnerRing=this.zerosumRingsGroup.appendChild(new yd),this.innerCircleGroup=this.backgroundGroup.appendChild(new Eo({name:`${this.id}-innerCircle`})),this.seriesItemEnabled=[],this.surroundingRadius=void 0,this.NodeEvent=Og,this.angleScale=new Zd,this.angleScale.domain=[0,1],this.angleScale.range=[-Math.PI,Math.PI].map(e=>e+Math.PI/2);const t=new Eo({name:"pieCalloutLabels"}),i=new Eo({name:"pieSectorLabels"}),n=new Eo({name:"innerLabels"});this.labelGroup.append(t),this.labelGroup.append(i),this.labelGroup.append(n),this.calloutLabelSelection=Oa.select(t,Eo),this.sectorLabelSelection=Oa.select(i,Fo),this.innerLabelsSelection=Oa.select(n,Fo),this.innerCircleSelection=Oa.select(this.innerCircleGroup,yd)}addChartEventListeners(){var e;this.destroyFns.push(null==(e=this.ctx.chartEventManager)?void 0:e.addListener("legend-item-click",e=>this.onLegendItemClick(e)))}get visible(){return super.visible&&(0===this.seriesItemEnabled.length||this.seriesItemEnabled.some(e=>e))}nodeFactory(){return new wg}getSeriesDomain(e){return"x"===e?this.angleScale.domain:this.radiusScale.domain}processData(e){return x(this,null,function*(){var t,i,n,s,r;if(null==this.data||!this.properties.isValid())return;let{data:o}=this;const{visible:a,seriesItemEnabled:l}=this,{angleKey:c,radiusKey:h,calloutLabelKey:d,sectorLabelKey:u,legendItemKey:p}=this.properties,g=!this.ctx.animationManager.isSkipped(),f=[],m=[];p?f.push(Uh(p,"band",{id:"legendItemKey"})):d?f.push(Uh(d,"band",{id:"calloutLabelKey"})):u&&f.push(Uh(u,"band",{id:"sectorLabelKey"}));const C=this.radiusScale.type,b=this.radiusScale.type;h&&m.push(jh(h,{id:"radiusValue",min:null!=(t=this.properties.radiusMin)?t:0,max:this.properties.radiusMax}),Wh(h,C,{id:"radiusRaw"}),Lh({id:"radiusValue"},[0,1],1,null!=(i=this.properties.radiusMin)?i:0,this.properties.radiusMax)),d&&m.push(Wh(d,"band",{id:"calloutLabelValue"})),u&&m.push(Wh(u,"band",{id:"sectorLabelValue"})),p&&m.push(Wh(p,"band",{id:"legendItemValue"})),g&&this.processedData&&f.length>0&&m.push(_h(this.processedData)),m.push(kh()),o=o.map((e,t)=>a&&l[t]?e:y(v({},e),{[c]:0})),yield this.requestDataModel(e,o,{props:[...f,Kh(c,b,{id:"angleValue",onlyPositive:!0}),Wh(c,b,{id:"angleRaw"}),Lh({id:"angleValue"},[0,1],0,0),...m]});for(const e of null!=(r=null==(s=null==(n=this.processedData)?void 0:n.defs)?void 0:s.values)?r:[]){const{id:t,missing:i,property:n}=e,s=Xc(this,i);"angleRaw"!==t&&s>0&&O.warnOnce(`no value was found for the key '${String(n)}' on ${s} data element${s>1?"s":""}`)}this.animationState.transition("updateData")})}maybeRefreshNodeData(){return x(this,null,function*(){var e;if(!this.nodeDataRefresh)return;const{nodeData:t=[]}=null!=(e=yield this.createNodeData())?e:{};this.nodeData=t,this.nodeDataRefresh=!1})}getProcessedDataIndexes(e){return{angleIdx:e.resolveProcessedDataIndexById(this,"angleValue"),radiusIdx:this.properties.radiusKey?e.resolveProcessedDataIndexById(this,"radiusValue"):-1,calloutLabelIdx:this.properties.calloutLabelKey?e.resolveProcessedDataIndexById(this,"calloutLabelValue"):-1,sectorLabelIdx:this.properties.sectorLabelKey?e.resolveProcessedDataIndexById(this,"sectorLabelValue"):-1,legendItemIdx:this.properties.legendItemKey?e.resolveProcessedDataIndexById(this,"legendItemValue"):-1}}createNodeData(){return x(this,null,function*(){const{id:e,processedData:t,dataModel:i,angleScale:n}=this,{rotation:s,innerRadiusRatio:r}=this.properties;if(!this.properties.isValid())return this.zerosumOuterRing.visible=!0,this.zerosumInnerRing.visible=!0,{itemId:e,nodeData:[],labelData:[]};if(!t||!i||"ungrouped"!==t.type)return;const{angleIdx:o,radiusIdx:a,calloutLabelIdx:l,sectorLabelIdx:c,legendItemIdx:h}=this.getProcessedDataIndexes(i);let d=0,u=0;const p=t.data.map((e,t)=>{var i;const{datum:r,values:p}=e,g=p[o],f=n.convert(d)+Vs(s);d=g,u+=g;const m=n.convert(d)+Vs(s),y=Math.abs(m-f),C=f+y/2,b=p[o+1],S=a>=0&&null!=(i=p[a])?i:1,w=a>=0?p[a+1]:void 0,x=h>=0?p[h]:void 0,E=this.getLabels(r,C,y,!0,p[l],p[c],x),M=this.getSectorFormat(r,t,!1);return v({itemId:t,series:this,datum:r,index:t,angleValue:b,midAngle:C,midCos:Math.cos(C),midSin:Math.sin(C),startAngle:f,endAngle:m,sectorFormat:M,radiusValue:w,radius:S,innerRadius:Math.max(this.radiusScale.convert(0),0),outerRadius:Math.max(this.radiusScale.convert(S),0),legendItemValue:x},E)});return this.zerosumOuterRing.visible=0===u,this.zerosumInnerRing.visible=0===u&&null!=r&&1!==r&&r>0,{itemId:e,nodeData:p,labelData:p}})}getLabels(e,t,i,n,s,r,o){const{calloutLabel:a,sectorLabel:l,legendItemKey:c}=this.properties,h=!n||a.enabled?this.properties.calloutLabelKey:void 0,d=!n||l.enabled?this.properties.sectorLabelKey:void 0;if(!h&&!d&&!c)return{};const u={datum:e,angleKey:this.properties.angleKey,angleName:this.properties.angleName,radiusKey:this.properties.radiusKey,radiusName:this.properties.radiusName,calloutLabelKey:this.properties.calloutLabelKey,calloutLabelName:this.properties.calloutLabelName,sectorLabelKey:this.properties.sectorLabelKey,sectorLabelName:this.properties.sectorLabelName,legendItemKey:this.properties.legendItemKey},p={};return h&&i>Vs(a.minAngle)&&(p.calloutLabel=y(v({},this.getTextAlignment(t)),{text:this.getLabelText(a,y(v({},u),{value:s})),hidden:!1,collisionTextAlign:void 0,collisionOffsetY:0,box:void 0})),d&&(p.sectorLabel={text:this.getLabelText(l,y(v({},u),{value:r}))}),null!=c&&null!=o&&(p.legendItem={key:c,text:o}),p}getTextAlignment(e){const t=[{textAlign:"center",textBaseline:"bottom"},{textAlign:"left",textBaseline:"middle"},{textAlign:"center",textBaseline:"hanging"},{textAlign:"right",textBaseline:"middle"}],i=Fs(e)- -.75*Math.PI;return t[Xn(Math.floor(i/(Math.PI/2)),t.length)]}getSectorFormat(e,t,i){var n,s,r,o,a;const{callbackCache:l,highlightManager:c}=this.ctx,{angleKey:h,radiusKey:d,fills:u,strokes:p,formatter:g,sectorSpacing:f,__BACKGROUND_COLOR_DO_NOT_USE:m}=this.properties,v=c.getActiveHighlight(),y=i&&(null==v?void 0:v.series)===this&&t===v.itemId;let C=p[t%p.length];null==f&&null==C&&(C=m);const{fill:b,fillOpacity:S,stroke:w,strokeWidth:x,strokeOpacity:E}=Xe(y&&this.properties.highlightStyle.item,{fill:u.length>0?u[t%u.length]:void 0,fillOpacity:this.properties.fillOpacity,stroke:C,strokeWidth:this.getStrokeWidth(this.properties.strokeWidth),strokeOpacity:this.getOpacity()});let M;return g&&(M=l.call(g,{datum:e,angleKey:h,radiusKey:d,fill:b,stroke:w,fills:u,strokes:p,strokeWidth:x,highlighted:y,seriesId:this.id})),{fill:null!=(n=null==M?void 0:M.fill)?n:b,fillOpacity:null!=(s=null==M?void 0:M.fillOpacity)?s:S,stroke:null!=(r=null==M?void 0:M.stroke)?r:w,strokeWidth:null!=(o=null==M?void 0:M.strokeWidth)?o:x,strokeOpacity:null!=(a=null==M?void 0:M.strokeOpacity)?a:E}}getInnerRadius(){const{radius:e}=this,{innerRadiusRatio:t=1,innerRadiusOffset:i=0}=this.properties,n=e*t+i;return n===e||n<0?0:n}getOuterRadius(){const{outerRadiusRatio:e,outerRadiusOffset:t}=this.properties;return Math.max(this.radius*e+t,0)}updateRadiusScale(e){const t=[this.getInnerRadius(),this.getOuterRadius()];this.radiusScale.range=t,e&&(this.previousRadiusScale.range=t),this.nodeData=this.nodeData.map(e=>{var t=e,{radius:i}=t,n=C(t,["radius"]);return y(v({},n),{radius:i,innerRadius:Math.max(this.radiusScale.convert(0),0),outerRadius:Math.max(this.radiusScale.convert(i),0)})})}getTitleTranslationY(){var e,t;const i=Math.max(0,this.radiusScale.range[1]);return 0===i?NaN:-i-(2+(null!=(t=null==(e=this.properties.title)?void 0:e.spacing)?t:0))-Math.max(0,-i)}update(e){return x(this,arguments,function*({seriesRect:e}){const{title:t}=this.properties,i={seriesRectWidth:null==e?void 0:e.width,seriesRectHeight:null==e?void 0:e.height},n=null!=wt(this.nodeDataDependencies,i);if(n&&(this._nodeDataDependencies=i),yield this.maybeRefreshNodeData(),this.updateTitleNodes(),this.updateRadiusScale(n),this.contentGroup.translationX=this.centerX,this.contentGroup.translationY=this.centerY,this.highlightGroup.translationX=this.centerX,this.highlightGroup.translationY=this.centerY,this.backgroundGroup.translationX=this.centerX,this.backgroundGroup.translationY=this.centerY,this.labelGroup&&(this.labelGroup.translationX=this.centerX,this.labelGroup.translationY=this.centerY),t){const e=this.getTitleTranslationY(),i=t.node.computeBBox();t.node.visible=t.enabled&&isFinite(e)&&!this.bboxIntersectsSurroundingSeries(i,0,e),t.node.translationY=isFinite(e)?e:0}for(const e of[this.zerosumInnerRing,this.zerosumOuterRing])e.fillOpacity=0,e.stroke=this.properties.calloutLabel.color,e.strokeWidth=1,e.strokeOpacity=1;this.updateNodeMidPoint(),yield this.updateSelections(),yield this.updateNodes(e)})}updateTitleNodes(){var e,t;const{oldTitle:i}=this,{title:n}=this.properties;i!==n&&(i&&(null==(e=this.labelGroup)||e.removeChild(i.node)),n&&(n.node.textBaseline="bottom",null==(t=this.labelGroup)||t.appendChild(n.node)),this.oldTitle=n)}updateNodeMidPoint(){this.nodeData.forEach(e=>{const t=e.innerRadius+(e.outerRadius-e.innerRadius)/2;e.midPoint={x:e.midCos*Math.max(0,t),y:e.midSin*Math.max(0,t)}})}updateSelections(){return x(this,null,function*(){yield this.updateGroupSelection(),this.updateInnerCircleSelection()})}updateGroupSelection(){return x(this,null,function*(){const{itemSelection:e,highlightSelection:t,calloutLabelSelection:i,sectorLabelSelection:n,innerLabelsSelection:s}=this,r=(e,t)=>{let i=this.nodeData;t&&(i=i.map(e=>y(v({},e),{sectorFormat:v({},e.sectorFormat)}))),e.update(i,void 0,e=>this.getDatumId(e)),this.ctx.animationManager.isSkipped()&&e.cleanup()};r(e,!1),r(t,!0),i.update(this.nodeData,e=>{const t=new Va;t.tag=0,t.pointerEvents=1,e.appendChild(t);const i=new Fo;i.tag=1,i.pointerEvents=1,e.appendChild(i)}),n.update(this.nodeData,e=>{e.pointerEvents=1}),s.update(this.properties.innerLabels,e=>{e.pointerEvents=1})})}updateInnerCircleSelection(){const{innerCircle:e}=this.properties;let t=0;const i=this.getInnerRadius();if(i>0){const e=Math.min(i,this.getOuterRadius()),n=1;t=Math.ceil(2*e+n)}const n=e?[{radius:t}]:[];this.innerCircleSelection.update(n)}updateNodes(e){return x(this,null,function*(){const t=this.ctx.highlightManager.getActiveHighlight(),i=this.visible&&this.seriesItemEnabled.indexOf(!0)>=0;this.rootGroup.visible=i,this.backgroundGroup.visible=i,this.contentGroup.visible=i,this.highlightGroup.visible=i&&(null==t?void 0:t.series)===this,this.labelGroup&&(this.labelGroup.visible=i),this.contentGroup.opacity=this.getOpacity(),this.innerCircleSelection.each((e,{radius:t})=>{var i,n;e.setProperties({fill:null==(i=this.properties.innerCircle)?void 0:i.fill,opacity:null==(n=this.properties.innerCircle)?void 0:n.fillOpacity,size:t})});const n=(e,t,i,n)=>{const s=this.getSectorFormat(t.datum,t.itemId,n);t.sectorFormat.fill=s.fill,t.sectorFormat.stroke=s.stroke;const r=this.ctx.animationManager.isSkipped();r&&(e.startAngle=t.startAngle,e.endAngle=t.endAngle,e.innerRadius=t.innerRadius,e.outerRadius=t.outerRadius),(n||r)&&(e.fill=s.fill,e.stroke=s.stroke),e.strokeWidth=s.strokeWidth,e.fillOpacity=s.fillOpacity,e.strokeOpacity=this.properties.strokeOpacity,e.lineDash=this.properties.lineDash,e.lineDashOffset=this.properties.lineDashOffset,e.fillShadow=this.properties.shadow,e.cornerRadius=this.properties.cornerRadius,e.inset=null!=this.properties.sectorSpacing?(this.properties.sectorSpacing+(null!=s.stroke?s.strokeWidth:0))/2:0,e.lineJoin=null!=this.properties.sectorSpacing?"miter":"round"};this.itemSelection.each((e,t,i)=>n(e,t,0,!1)),this.highlightSelection.each((e,i,s)=>{const r=(null==t?void 0:t.series)===this&&e.datum.itemId===t.itemId;n(e,i,0,!0),e.visible=r}),this.updateCalloutLineNodes(),this.updateCalloutLabelNodes(e),this.updateSectorLabelNodes(),this.updateInnerLabelNodes(),this.updateZerosumRings(),this.animationState.transition("update")})}updateCalloutLineNodes(){var e;const{calloutLine:t}=this.properties,i=t.length,n=t.strokeWidth,s=null!=(e=t.colors)?e:this.properties.strokes,{offset:r}=this.properties.calloutLabel;this.calloutLabelSelection.selectByTag(0).forEach((e,t)=>{var o;const a=e.datum,{calloutLabel:l,outerRadius:c}=a;if((null==l?void 0:l.text)&&!l.hidden&&0!==c){e.visible=!0,e.strokeWidth=n,e.stroke=s[t%s.length],e.fill=void 0;const h=a.midCos*c,d=a.midSin*c;let u=a.midCos*(c+i),p=a.midSin*(c+i);if((null!=(o=l.collisionTextAlign)?o:0!==l.collisionOffsetY)&&null!=l.box){const e=l.box;let t=u,i=p;u<e.x?t=e.x:u>e.x+e.width&&(t=e.x+e.width),p<e.y?i=e.y:p>e.y+e.height&&(i=e.y+e.height);const n=t-u,s=i-p,o=Math.sqrt(Math.pow(n,2)+Math.pow(s,2)),a=o-r;a>0&&(u+=n*a/o,p+=s*a/o)}e.x1=h,e.y1=d,e.x2=u,e.y2=p}else e.visible=!1})}getLabelOverflow(e,t,i){const n=i.x-this.centerX,s=i.x+i.width-this.centerX,r=i.y-this.centerY,o=i.y+i.height-this.centerY;let a=1;t.x+1<n?a=(t.x+t.width-n)/t.width:t.x+t.width-1>s&&(a=(s-t.x)/t.width);const l=t.y+1<r||t.y+t.height-1>o;return{textLength:1===a?e.length:Math.floor(e.length*a)-1,hasVerticalOverflow:l,hasSurroundingSeriesOverflow:this.bboxIntersectsSurroundingSeries(t)}}bboxIntersectsSurroundingSeries(e,t=0,i=0){const{surroundingRadius:n}=this;if(null==n)return!1;const s=[{x:e.x+t,y:e.y+i},{x:e.x+e.width+t,y:e.y+i},{x:e.x+e.width+t,y:e.y+e.height+i},{x:e.x+t,y:e.y+e.height+i}],r=f(n,2);return s.some(e=>f(e.x,2)+f(e.y,2)>r)}computeCalloutLabelCollisionOffsets(){const{radiusScale:e}=this,{calloutLabel:t,calloutLine:i}=this.properties,{offset:n,minSpacing:s}=t,r=e.convert(0),o=this.nodeData,a=this.nodeData.filter(e=>{return!(!(t=e).calloutLabel||0===t.outerRadius);var t});if(a.forEach(e=>{const t=e.calloutLabel;null!=t&&(t.hidden=!1,t.collisionTextAlign=void 0,t.collisionOffsetY=0)}),a.length<=1)return;const l=a.filter(e=>e.midCos<0).sort((e,t)=>e.midSin-t.midSin),c=a.filter(e=>e.midCos>=0).sort((e,t)=>e.midSin-t.midSin),h=a.filter(e=>{var t;return e.midSin<0&&"center"===(null==(t=e.calloutLabel)?void 0:t.textAlign)}).sort((e,t)=>e.midCos-t.midCos),d=a.filter(e=>{var t;return e.midSin>=0&&"center"===(null==(t=e.calloutLabel)?void 0:t.textAlign)}).sort((e,t)=>e.midCos-t.midCos),u=new Fo,p=e=>{var t;const s=e.calloutLabel;if(null==s)return new ts(0,0,0,0);const r=e.outerRadius+i.length+n,o=e.midCos*r,a=e.midSin*r+s.collisionOffsetY;return u.text=s.text,u.x=o,u.y=a,u.setFont(this.properties.calloutLabel),u.setAlign({textAlign:null!=(t=s.collisionTextAlign)?t:s.textAlign,textBaseline:s.textBaseline}),u.computeBBox()},g=(e,t,i)=>{const n=p(e).grow(s/2),r=p(t).grow(s/2);if(n.x<r.x+r.width&&n.x+n.width>r.x&&("to-top"===i?n.y<r.y+r.height:n.y+n.height>r.y)){const e="to-top"===i?n.y-r.y-r.height:n.y+n.height-r.y;t.calloutLabel.collisionOffsetY=e}},f=e=>{const t=e.slice().sort((e,t)=>Math.abs(e.midSin)-Math.abs(t.midSin))[0],i=e.indexOf(t);for(let t=i-1;t>=0;t--){const i=e[t+1],n=e[t];g(i,n,"to-top")}for(let t=i+1;t<e.length;t++){const i=e[t-1],n=e[t];g(i,n,"to-bottom")}},m=e=>{const t=a.some(e=>0!==e.calloutLabel.collisionOffsetY),i=e.map(e=>p(e)),n=i.map(e=>e.clone().grow(s/2));let l=!1;for(let t=0;t<n.length&&!l;t++){const i=n[t];for(let s=t+1;s<e.length;s++){const e=n[s];if(i.collidesBBox(e)){l=!0;break}}}const c=o.map(e=>{const{startAngle:t,endAngle:i,outerRadius:n}=e;return{startAngle:t,endAngle:i,innerRadius:r,outerRadius:n}}),h=i.some(e=>c.some(t=>fg(e,t)));(l||t||h)&&e.filter(e=>"center"===e.calloutLabel.textAlign).forEach(e=>{const t=e.calloutLabel;e.midCos<0?t.collisionTextAlign="right":e.midCos>0?t.collisionTextAlign="left":t.collisionTextAlign="center"})};f(l),f(c),m(h),m(d)}updateCalloutLabelNodes(e){const{radiusScale:t}=this,{calloutLabel:i,calloutLine:n}=this.properties,s=n.length,{offset:r,color:o}=i,a=new Fo;this.calloutLabelSelection.selectByTag(1).forEach(n=>{var l;const{datum:c}=n,h=c.calloutLabel,d=t.convert(c.radius),u=Math.max(0,d);if(!(null==h?void 0:h.text)||0===u||h.hidden)return void(n.visible=!1);const p=u+s+r,g=c.midCos*p,f=c.midSin*p+h.collisionOffsetY,m={textAlign:null!=(l=h.collisionTextAlign)?l:h.textAlign,textBaseline:h.textBaseline};a.text=h.text,a.x=g,a.y=f,a.setFont(this.properties.calloutLabel),a.setAlign(m);const v=a.computeBBox();let y=h.text,C=!0;if(i.avoidCollisions){const{textLength:t,hasVerticalOverflow:i}=this.getLabelOverflow(h.text,v,e);y=h.text.length===t?h.text:`${h.text.substring(0,t)}…`,C=!i}n.text=y,n.x=g,n.y=f,n.setFont(this.properties.calloutLabel),n.setAlign(m),n.fill=o,n.visible=C})}computeLabelsBBox(e,t){return x(this,null,function*(){const{calloutLabel:i,calloutLine:n}=this.properties,s=n.length,{offset:r,maxCollisionOffset:o,minSpacing:a}=i;if(!i.avoidCollisions)return null;yield this.maybeRefreshNodeData(),this.updateRadiusScale(!1),this.computeCalloutLabelCollisionOffsets();const l=[],c=new Fo;let h;const{title:d}=this.properties;if((null==d?void 0:d.text)&&d.enabled){const e=this.getTitleTranslationY();isFinite(e)&&(c.text=d.text,c.x=0,c.y=e,c.setFont(d),c.setAlign({textBaseline:"bottom",textAlign:"center"}),h=c.computeBBox(),l.push(h))}return this.nodeData.forEach(i=>{var n;const d=i.calloutLabel;if(!d||0===i.outerRadius)return null;const u=i.outerRadius+s+r,p=i.midCos*u,g=i.midSin*u+d.collisionOffsetY;c.text=d.text,c.x=p,c.y=g,c.setFont(this.properties.calloutLabel),c.setAlign({textAlign:null!=(n=d.collisionTextAlign)?n:d.textAlign,textBaseline:d.textBaseline});const f=c.computeBBox();if(d.box=f,Math.abs(d.collisionOffsetY)>o)d.hidden=!0;else{if(h){const e=t.y-this.centerY,i=new ts(h.x-a,e,h.width+2*a,h.y+h.height+a-e);if(f.collidesBBox(i))return void(d.hidden=!0)}if(e.hideWhenNecessary){const{textLength:e,hasVerticalOverflow:i,hasSurroundingSeriesOverflow:n}=this.getLabelOverflow(d.text,f,t),s=d.text.length>2&&e<2;if(i||s||n)return void(d.hidden=!0)}d.hidden=!1,l.push(f)}}),0===l.length?null:ts.merge(l)})}updateSectorLabelNodes(){const{radiusScale:e}=this,t=e.convert(0),{fontSize:i,fontStyle:n,fontWeight:s,fontFamily:r,positionOffset:o,positionRatio:a,color:l}=this.properties.sectorLabel;this.sectorLabelSelection.each((e,c)=>{const{sectorLabel:h,outerRadius:d}=c;let u=!1;if(h&&0!==d){const p=t*(1-a)+d*a+o;e.fill=l,e.fontStyle=n,e.fontWeight=s,e.fontSize=i,e.fontFamily=r,e.text=h.text,e.x=c.midCos*p,e.y=c.midSin*p,e.textAlign="center",e.textBaseline="middle";const g=e.computeBBox(),f=[[g.x,g.y],[g.x+g.width,g.y],[g.x+g.width,g.y+g.height],[g.x,g.y+g.height]],{startAngle:m,endAngle:v}=c,y={startAngle:m,endAngle:v,innerRadius:t,outerRadius:d};f.every(([e,t])=>pg(e,t,y))&&(u=!0)}e.visible=u})}updateInnerLabelNodes(){const e=[],t=[];this.innerLabelsSelection.each((i,n)=>{const{fontStyle:s,fontWeight:r,fontSize:o,fontFamily:a,color:l}=n;i.fontStyle=s,i.fontWeight=r,i.fontSize=o,i.fontFamily=a,i.text=n.text,i.x=0,i.y=0,i.fill=l,i.textAlign="center",i.textBaseline="alphabetic",e.push(i.computeBBox()),t.push(n.margin)});const i=e=>0===e?0:t[e],n=e=>e===t.length-1?0:t[e],s=e.reduce((e,t,s)=>e+t.height+i(s)+n(s),0),r=Math.max(...e.map(e=>e.width)),o=this.getInnerRadius(),a=Math.sqrt(Math.pow(r/2,2)+Math.pow(s/2,2))<=(o>0?o:this.getOuterRadius()),l=[];for(let t=0,r=-s/2;t<e.length;t++){const s=e[t].height+r+i(t);l.push(s),r=s+n(t)}this.innerLabelsSelection.each((e,t,i)=>{e.y=l[i],e.visible=a})}updateZerosumRings(){this.zerosumOuterRing.size=2*this.getOuterRadius(),this.zerosumInnerRing.size=2*this.getInnerRadius()}getDatumLegendName(e){const{angleKey:t,calloutLabelKey:i,sectorLabelKey:n,legendItemKey:s}=this.properties,{sectorLabel:r,calloutLabel:o,legendItem:a}=e;return s&&void 0!==a?a.text:i&&i!==t&&void 0!==(null==o?void 0:o.text)?o.text:n&&n!==t&&void 0!==(null==r?void 0:r.text)?r.text:void 0}pickNodeClosestDatum(e){return kg(this,e)}getTooltipHtml(e){var t;if(!this.properties.isValid())return il;const{datum:i,angleValue:n,sectorFormat:{fill:s},itemId:r}=e,o=Ou(null==(t=this.properties.title)?void 0:t.text),a=We(n)?qn(n):String(n),l=this.getDatumLegendName(e);return this.properties.tooltip.toTooltipHtml({title:null!=o?o:l,content:o&&l?`${l}: ${a}`:a,backgroundColor:s},{datum:i,itemId:r,title:o,color:s,seriesId:this.id,angleKey:this.properties.angleKey,angleName:this.properties.angleName,radiusKey:this.properties.radiusKey,radiusName:this.properties.radiusName,calloutLabelKey:this.properties.calloutLabelKey,calloutLabelName:this.properties.calloutLabelName,sectorLabelKey:this.properties.sectorLabelKey,sectorLabelName:this.properties.sectorLabelName,legendItemKey:this.properties.legendItemKey})}getLegendData(e){var t,i,n,s,r;const{visible:o,processedData:a,dataModel:l}=this;if(!l||!(null==a?void 0:a.data.length)||!this.properties.isValid()||"category"!==e)return[];const{angleKey:c,calloutLabelKey:h,sectorLabelKey:d,legendItemKey:u}=this.properties;if(!(u||h&&h!==c||d&&d!==c))return[];const{calloutLabelIdx:p,sectorLabelIdx:g,legendItemIdx:f}=this.getProcessedDataIndexes(l),m=(null==(t=this.properties.title)?void 0:t.showInLegend)&&this.properties.title.text,v=[];for(let e=0;e<a.data.length;e++){const{datum:t,values:l}=a.data[e],y=[];m&&y.push(m);const C=this.getLabels(t,2*Math.PI,2*Math.PI,!1,l[p],l[g],l[f]);if(u&&void 0!==C.legendItem?y.push(C.legendItem.text):h&&h!==c&&void 0!==(null==(i=C.calloutLabel)?void 0:i.text)?y.push(null==(n=C.calloutLabel)?void 0:n.text):d&&d!==c&&void 0!==(null==(s=C.sectorLabel)?void 0:s.text)&&y.push(null==(r=C.sectorLabel)?void 0:r.text),0===y.length)continue;const b=this.getSectorFormat(t,e,!1);v.push({legendType:"category",id:this.id,itemId:e,seriesId:this.id,enabled:o&&this.seriesItemEnabled[e],label:{text:y.join(" - ")},marker:{fill:b.fill,stroke:b.stroke,fillOpacity:this.properties.fillOpacity,strokeOpacity:this.properties.strokeOpacity,strokeWidth:this.properties.strokeWidth},legendItemName:null!=u?t[u]:void 0})}return v}onLegendItemClick(e){const{enabled:t,itemId:i,series:n,legendItemName:s}=e;n.id===this.id?this.toggleSeriesItem(i,t):null!=s&&this.toggleOtherSeriesItems(s,t)}toggleSeriesItem(e,t){this.seriesItemEnabled[e]=t,this.nodeDataRefresh=!0}toggleOtherSeriesItems(e,t){var i;if(!this.properties.legendItemKey||!this.dataModel)return;const n=this.dataModel.resolveProcessedDataIndexById(this,"legendItemValue");null==(i=this.processedData)||i.data.forEach(({values:i},s)=>{i[n]===e&&this.toggleSeriesItem(s,t)})}animateEmptyUpdateReady(e){const{animationManager:t}=this.ctx,i=Rg(!0,this.properties.rotation,this.radiusScale,this.previousRadiusScale);Ls(this.id,"nodes",t,[this.itemSelection,this.highlightSelection],i.nodes),Ls(this.id,"innerCircle",t,[this.innerCircleSelection],i.innerCircle),_u(this,"callout",t,this.calloutLabelSelection),_u(this,"sector",t,this.sectorLabelSelection),_u(this,"inner",t,this.innerLabelsSelection),this.previousRadiusScale.range=this.radiusScale.range}animateWaitingUpdateReady(){var e,t,i,n,s,r;const{itemSelection:o,highlightSelection:a,processedData:l,radiusScale:c,previousRadiusScale:h}=this,{animationManager:d}=this.ctx,u=null==(e=null==l?void 0:l.reduced)?void 0:e.diff;this.ctx.animationManager.stopByAnimationGroupId(this.id);const p=0===(null!=(t=null==u?void 0:u.moved.size)?t:0),g=(null!=(i=null==l?void 0:l.defs.keys.length)?i:0)>0,f=null==(r=null==(s=null==(n=null==l?void 0:l.reduced)?void 0:n.animationValidation)?void 0:s.uniqueKeys)||r;p&&g&&f||this.ctx.animationManager.skipCurrentBatch();const m=Rg(!1,this.properties.rotation,c,h);Ls(this.id,"nodes",d,[o,a],m.nodes,(e,t)=>this.getDatumId(t),u),Ls(this.id,"innerCircle",d,[this.innerCircleSelection],m.innerCircle),_u(this,"callout",this.ctx.animationManager,this.calloutLabelSelection),_u(this,"sector",this.ctx.animationManager,this.sectorLabelSelection),_u(this,"inner",this.ctx.animationManager,this.innerLabelsSelection),this.previousRadiusScale.range=this.radiusScale.range}animateClearingUpdateEmpty(){const{itemSelection:e,highlightSelection:t,radiusScale:i,previousRadiusScale:n}=this,{animationManager:s}=this.ctx,r=Rg(!1,this.properties.rotation,i,n);Ls(this.id,"nodes",s,[e,t],r.nodes),Ls(this.id,"innerCircle",s,[this.innerCircleSelection],r.innerCircle),Fu(this,"callout",this.ctx.animationManager,this.calloutLabelSelection),Fu(this,"sector",this.ctx.animationManager,this.sectorLabelSelection),Fu(this,"inner",this.ctx.animationManager,this.innerLabelsSelection),this.previousRadiusScale.range=this.radiusScale.range}getDatumIdFromData(e){var t,i,n;const{calloutLabelKey:s,sectorLabelKey:r,legendItemKey:o}=this.properties;if(null==(n=null==(i=null==(t=this.processedData)?void 0:t.reduced)?void 0:i.animationValidation)?void 0:n.uniqueKeys)return o?e[o]:s?e[s]:r?e[r]:void 0}getDatumId(e){const{index:t}=e,i=this.getDatumIdFromData(e.datum);return null!=i?String(i):`${t}`}onDataChange(){var e;const{data:t,seriesItemEnabled:i}=this;this.seriesItemEnabled=null!=(e=null==t?void 0:t.map((e,t)=>{var n;return null==(n=i[t])||n}))?e:[]}computeFocusBounds(e){return Pg(this,e)}};_g.className="DonutSeries",_g.type="donut";var Fg={series:{__extends__:Wt,title:{enabled:!0,fontStyle:void 0,fontWeight:"normal",fontSize:14,fontFamily:Kt,color:Xt,spacing:5},calloutLabel:{enabled:!0,fontStyle:void 0,fontWeight:void 0,fontSize:12,fontFamily:Kt,color:$t,offset:3,minAngle:0},sectorLabel:{enabled:!0,fontStyle:void 0,fontWeight:"normal",fontSize:12,fontFamily:Kt,color:qt,positionOffset:0,positionRatio:.5},calloutLine:{length:10,strokeWidth:2},fillOpacity:1,strokeOpacity:1,strokeWidth:1,lineDash:[0],lineDashOffset:0,rotation:0,shadow:{enabled:!1,color:ti,xOffset:3,yOffset:3,blur:5},innerLabels:{fontStyle:void 0,fontWeight:void 0,fontSize:12,fontFamily:Kt,color:$t,margin:2},__BACKGROUND_COLOR_DO_NOT_USE:ei}},Gg=({takeColors:e,colorsCount:t,userPalette:i})=>{const{fills:n,strokes:s}=e(t);return{fills:n,strokes:i?s:[],calloutLine:{colors:s}}},Vg={type:"series",optionsKey:"series[]",packageType:"community",chartTypes:["polar"],identifier:"donut",instanceConstructor:_g,themeTemplate:Fg,paletteFactory:Gg},Bg=class extends al{constructor(){super(...arguments),this.showInLegend=!1}};S([$s(Js)],Bg.prototype,"showInLegend",2);var Hg=class extends Bo{set(e,t){return super.set(e)}};S([Nn("Use a Donut Series instead"),$s(tr,{optional:!0})],Hg.prototype,"text",2),S([Nn("Use a Donut Series instead"),$s(ir,{optional:!0})],Hg.prototype,"margin",2);var zg=class extends yt{};S([Nn("Use a Donut Series instead"),$s(mr,{optional:!0})],zg.prototype,"fill",2),S([Nn("Use a Donut Series instead"),$s(rr,{optional:!0})],zg.prototype,"fillOpacity",2);var Ug=class extends Bo{constructor(){super(...arguments),this.offset=3,this.minAngle=0,this.minSpacing=4,this.maxCollisionOffset=50,this.avoidCollisions=!0}};S([$s(sr)],Ug.prototype,"offset",2),S([$s(or)],Ug.prototype,"minAngle",2),S([$s(sr)],Ug.prototype,"minSpacing",2),S([$s(sr)],Ug.prototype,"maxCollisionOffset",2),S([$s(Js)],Ug.prototype,"avoidCollisions",2);var Wg=class extends Bo{constructor(){super(...arguments),this.positionOffset=0,this.positionRatio=.5}};S([$s(ir)],Wg.prototype,"positionOffset",2),S([$s(rr)],Wg.prototype,"positionRatio",2);var jg=class extends yt{constructor(){super(...arguments),this.length=10,this.strokeWidth=1}};S([$s(vr,{optional:!0})],jg.prototype,"colors",2),S([$s(sr)],jg.prototype,"length",2),S([$s(sr)],jg.prototype,"strokeWidth",2);var Kg=class extends Bd{constructor(){super(...arguments),this.fills=Object.values(Ft),this.strokes=Object.values(Gt),this.fillOpacity=1,this.strokeOpacity=1,this.lineDash=[0],this.lineDashOffset=0,this.cornerRadius=0,this.rotation=0,this.outerRadiusOffset=0,this.outerRadiusRatio=1,this.strokeWidth=1,this.sectorSpacing=void 0,this.innerLabels=new Ct(Hg),this.title=new Bg,this.innerCircle=new zg,this.shadow=new Bu,this.calloutLabel=new Ug,this.sectorLabel=new Wg,this.calloutLine=new jg,this.tooltip=new Wu,this.__BACKGROUND_COLOR_DO_NOT_USE=void 0}};S([$s(tr)],Kg.prototype,"angleKey",2),S([$s(tr,{optional:!0})],Kg.prototype,"angleName",2),S([$s(tr,{optional:!0})],Kg.prototype,"radiusKey",2),S([$s(tr,{optional:!0})],Kg.prototype,"radiusName",2),S([$s(sr,{optional:!0})],Kg.prototype,"radiusMin",2),S([$s(sr,{optional:!0})],Kg.prototype,"radiusMax",2),S([$s(tr,{optional:!0})],Kg.prototype,"calloutLabelKey",2),S([$s(tr,{optional:!0})],Kg.prototype,"calloutLabelName",2),S([$s(tr,{optional:!0})],Kg.prototype,"sectorLabelKey",2),S([$s(tr,{optional:!0})],Kg.prototype,"sectorLabelName",2),S([$s(tr,{optional:!0})],Kg.prototype,"legendItemKey",2),S([$s(vr)],Kg.prototype,"fills",2),S([$s(vr)],Kg.prototype,"strokes",2),S([$s(rr)],Kg.prototype,"fillOpacity",2),S([$s(rr)],Kg.prototype,"strokeOpacity",2),S([$s(Mr)],Kg.prototype,"lineDash",2),S([$s(sr)],Kg.prototype,"lineDashOffset",2),S([$s(sr)],Kg.prototype,"cornerRadius",2),S([$s(er,{optional:!0})],Kg.prototype,"formatter",2),S([$s(or)],Kg.prototype,"rotation",2),S([$s(ir)],Kg.prototype,"outerRadiusOffset",2),S([$s(rr)],Kg.prototype,"outerRadiusRatio",2),S([Nn("Use a Donut Series instead"),$s(ir,{optional:!0})],Kg.prototype,"innerRadiusOffset",2),S([Nn("Use a Donut Series instead"),$s(rr,{optional:!0})],Kg.prototype,"innerRadiusRatio",2),S([$s(sr)],Kg.prototype,"strokeWidth",2),S([$s(sr,{optional:!0})],Kg.prototype,"sectorSpacing",2),S([$s(wr)],Kg.prototype,"innerLabels",2),S([$s(Zs)],Kg.prototype,"title",2),S([$s(Zs)],Kg.prototype,"innerCircle",2),S([$s(Zs)],Kg.prototype,"shadow",2),S([$s(Zs)],Kg.prototype,"calloutLabel",2),S([$s(Zs)],Kg.prototype,"sectorLabel",2),S([$s(Zs)],Kg.prototype,"calloutLine",2),S([$s(Zs)],Kg.prototype,"tooltip",2),S([$s(tr,{optional:!0})],Kg.prototype,"__BACKGROUND_COLOR_DO_NOT_USE",2);var $g=class extends qh{constructor(e,t,i,n){super(e,t,i,n),this.angleKey=n.properties.angleKey,this.radiusKey=n.properties.radiusKey,this.calloutLabelKey=n.properties.calloutLabelKey,this.sectorLabelKey=n.properties.sectorLabelKey}},Yg=class extends Ng{constructor(e){super({moduleCtx:e,pickModes:[0],useLabelLayer:!0,animationResetFns:{item:Lg,label:Gu}}),this.properties=new Kg,this.previousRadiusScale=new Zd,this.radiusScale=new Zd,this.backgroundGroup=this.rootGroup.appendChild(new Eo({name:`${this.id}-background`,layer:!0,zIndex:0})),this.zerosumRingsGroup=this.backgroundGroup.appendChild(new Eo({name:`${this.id}-zerosumRings`})),this.zerosumOuterRing=this.zerosumRingsGroup.appendChild(new yd),this.zerosumInnerRing=this.zerosumRingsGroup.appendChild(new yd),this.innerCircleGroup=this.backgroundGroup.appendChild(new Eo({name:`${this.id}-innerCircle`})),this.seriesItemEnabled=[],this.surroundingRadius=void 0,this.NodeEvent=$g,this.angleScale=new Zd,this.angleScale.domain=[0,1],this.angleScale.range=[-Math.PI,Math.PI].map(e=>e+Math.PI/2);const t=new Eo({name:"pieCalloutLabels"}),i=new Eo({name:"pieSectorLabels"}),n=new Eo({name:"innerLabels"});this.labelGroup.append(t),this.labelGroup.append(i),this.labelGroup.append(n),this.calloutLabelSelection=Oa.select(t,Eo),this.sectorLabelSelection=Oa.select(i,Fo),this.innerLabelsSelection=Oa.select(n,Fo),this.innerCircleSelection=Oa.select(this.innerCircleGroup,yd)}addChartEventListeners(){var e;this.destroyFns.push(null==(e=this.ctx.chartEventManager)?void 0:e.addListener("legend-item-click",e=>this.onLegendItemClick(e)))}get visible(){return super.visible&&(0===this.seriesItemEnabled.length||this.seriesItemEnabled.some(e=>e))}nodeFactory(){return new wg}getSeriesDomain(e){return"x"===e?this.angleScale.domain:this.radiusScale.domain}processData(e){return x(this,null,function*(){var t,i,n,s,r;if(null==this.data||!this.properties.isValid())return;let{data:o}=this;const{visible:a,seriesItemEnabled:l}=this,{angleKey:c,radiusKey:h,calloutLabelKey:d,sectorLabelKey:u,legendItemKey:p}=this.properties,g=!this.ctx.animationManager.isSkipped(),f=[],m=[];p?f.push(Uh(p,"band",{id:"legendItemKey"})):d?f.push(Uh(d,"band",{id:"calloutLabelKey"})):u&&f.push(Uh(u,"band",{id:"sectorLabelKey"}));const C=this.radiusScale.type,b=this.radiusScale.type;h&&m.push(jh(h,{id:"radiusValue",min:null!=(t=this.properties.radiusMin)?t:0,max:this.properties.radiusMax}),Wh(h,C,{id:"radiusRaw"}),Lh({id:"radiusValue"},[0,1],1,null!=(i=this.properties.radiusMin)?i:0,this.properties.radiusMax)),d&&m.push(Wh(d,"band",{id:"calloutLabelValue"})),u&&m.push(Wh(u,"band",{id:"sectorLabelValue"})),p&&m.push(Wh(p,"band",{id:"legendItemValue"})),g&&this.processedData&&f.length>0&&m.push(_h(this.processedData)),m.push(kh()),o=o.map((e,t)=>a&&l[t]?e:y(v({},e),{[c]:0})),yield this.requestDataModel(e,o,{props:[...f,Kh(c,b,{id:"angleValue",onlyPositive:!0}),Wh(c,b,{id:"angleRaw"}),Lh({id:"angleValue"},[0,1],0,0),...m]});for(const e of null!=(r=null==(s=null==(n=this.processedData)?void 0:n.defs)?void 0:s.values)?r:[]){const{id:t,missing:i,property:n}=e,s=Xc(this,i);"angleRaw"!==t&&s>0&&O.warnOnce(`no value was found for the key '${String(n)}' on ${s} data element${s>1?"s":""}`)}this.animationState.transition("updateData")})}maybeRefreshNodeData(){return x(this,null,function*(){var e;if(!this.nodeDataRefresh)return;const{nodeData:t=[]}=null!=(e=yield this.createNodeData())?e:{};this.nodeData=t,this.nodeDataRefresh=!1})}getProcessedDataIndexes(e){return{angleIdx:e.resolveProcessedDataIndexById(this,"angleValue"),radiusIdx:this.properties.radiusKey?e.resolveProcessedDataIndexById(this,"radiusValue"):-1,calloutLabelIdx:this.properties.calloutLabelKey?e.resolveProcessedDataIndexById(this,"calloutLabelValue"):-1,sectorLabelIdx:this.properties.sectorLabelKey?e.resolveProcessedDataIndexById(this,"sectorLabelValue"):-1,legendItemIdx:this.properties.legendItemKey?e.resolveProcessedDataIndexById(this,"legendItemValue"):-1}}createNodeData(){return x(this,null,function*(){const{id:e,processedData:t,dataModel:i,angleScale:n}=this,{rotation:s}=this.properties;if(!t||!i||"ungrouped"!==t.type)return;const{angleIdx:r,radiusIdx:o,calloutLabelIdx:a,sectorLabelIdx:l,legendItemIdx:c}=this.getProcessedDataIndexes(i);let h=0,d=0;const u=t.data.map((e,t)=>{var i;const{datum:u,values:p}=e,g=p[r],f=n.convert(h)+Vs(s);h=g,d+=g;const m=n.convert(h)+Vs(s),y=Math.abs(m-f),C=f+y/2,b=p[r+1],S=o>=0&&null!=(i=p[o])?i:1,w=o>=0?p[o+1]:void 0,x=c>=0?p[c]:void 0,E=this.getLabels(u,C,y,!0,p[a],p[l],x),M=this.getSectorFormat(u,t,!1);return v({itemId:t,series:this,datum:u,index:t,angleValue:b,midAngle:C,midCos:Math.cos(C),midSin:Math.sin(C),startAngle:f,endAngle:m,sectorFormat:M,radiusValue:w,radius:S,innerRadius:Math.max(this.radiusScale.convert(0),0),outerRadius:Math.max(this.radiusScale.convert(S),0),legendItemValue:x},E)});this.zerosumOuterRing.visible=0===d;const{innerRadiusRatio:p=1}=this.properties;return this.zerosumInnerRing.visible=0===d&&1!==p&&p>0,{itemId:e,nodeData:u,labelData:u}})}getLabels(e,t,i,n,s,r,o){const{calloutLabel:a,sectorLabel:l,legendItemKey:c}=this.properties,h=!n||a.enabled?this.properties.calloutLabelKey:void 0,d=!n||l.enabled?this.properties.sectorLabelKey:void 0;if(!h&&!d&&!c)return{};const u={datum:e,angleKey:this.properties.angleKey,angleName:this.properties.angleName,radiusKey:this.properties.radiusKey,radiusName:this.properties.radiusName,calloutLabelKey:this.properties.calloutLabelKey,calloutLabelName:this.properties.calloutLabelName,sectorLabelKey:this.properties.sectorLabelKey,sectorLabelName:this.properties.sectorLabelName,legendItemKey:this.properties.legendItemKey},p={};return h&&i>Vs(a.minAngle)&&(p.calloutLabel=y(v({},this.getTextAlignment(t)),{text:this.getLabelText(a,y(v({},u),{value:s})),hidden:!1,collisionTextAlign:void 0,collisionOffsetY:0,box:void 0})),d&&(p.sectorLabel={text:this.getLabelText(l,y(v({},u),{value:r}))}),null!=c&&null!=o&&(p.legendItem={key:c,text:o}),p}getTextAlignment(e){const t=[{textAlign:"center",textBaseline:"bottom"},{textAlign:"left",textBaseline:"middle"},{textAlign:"center",textBaseline:"hanging"},{textAlign:"right",textBaseline:"middle"}],i=Fs(e)- -.75*Math.PI;return t[Xn(Math.floor(i/(Math.PI/2)),t.length)]}getSectorFormat(e,t,i){var n,s,r,o,a;const{callbackCache:l,highlightManager:c}=this.ctx,{angleKey:h,radiusKey:d,fills:u,strokes:p,formatter:g,sectorSpacing:f,__BACKGROUND_COLOR_DO_NOT_USE:m}=this.properties,v=c.getActiveHighlight(),y=i&&(null==v?void 0:v.series)===this&&t===v.itemId;let C=p[t%p.length];null!=f&&(null!=C||(C=m));const{fill:b,fillOpacity:S,stroke:w,strokeWidth:x,strokeOpacity:E}=Xe(y&&this.properties.highlightStyle.item,{fill:u.length>0?u[t%u.length]:void 0,fillOpacity:this.properties.fillOpacity,stroke:C,strokeWidth:this.getStrokeWidth(this.properties.strokeWidth),strokeOpacity:this.getOpacity()});let M;return g&&(M=l.call(g,{datum:e,angleKey:h,radiusKey:d,fill:b,stroke:w,fills:u,strokes:p,strokeWidth:x,highlighted:y,seriesId:this.id})),{fill:null!=(n=null==M?void 0:M.fill)?n:b,fillOpacity:null!=(s=null==M?void 0:M.fillOpacity)?s:S,stroke:null!=(r=null==M?void 0:M.stroke)?r:w,strokeWidth:null!=(o=null==M?void 0:M.strokeWidth)?o:x,strokeOpacity:null!=(a=null==M?void 0:M.strokeOpacity)?a:E}}getInnerRadius(){const{radius:e}=this,{innerRadiusRatio:t=1,innerRadiusOffset:i=0}=this.properties,n=e*t+i;return n===e||n<0?0:n}getOuterRadius(){return Math.max(this.radius*this.properties.outerRadiusRatio+this.properties.outerRadiusOffset,0)}updateRadiusScale(e){const t=[this.getInnerRadius(),this.getOuterRadius()];this.radiusScale.range=t,e&&(this.previousRadiusScale.range=t),this.nodeData=this.nodeData.map(e=>{var t=e,{radius:i}=t,n=C(t,["radius"]);return y(v({},n),{radius:i,innerRadius:Math.max(this.radiusScale.convert(0),0),outerRadius:Math.max(this.radiusScale.convert(i),0)})})}getTitleTranslationY(){var e,t;const i=Math.max(0,this.radiusScale.range[1]);return 0===i?NaN:-i-(2+(null!=(t=null==(e=this.properties.title)?void 0:e.spacing)?t:0))-Math.max(0,-i)}update(e){return x(this,arguments,function*({seriesRect:e}){const{title:t}=this.properties,i={seriesRectWidth:null==e?void 0:e.width,seriesRectHeight:null==e?void 0:e.height},n=null!=wt(this.nodeDataDependencies,i);if(n&&(this._nodeDataDependencies=i),yield this.maybeRefreshNodeData(),this.updateTitleNodes(),this.updateRadiusScale(n),this.contentGroup.translationX=this.centerX,this.contentGroup.translationY=this.centerY,this.highlightGroup.translationX=this.centerX,this.highlightGroup.translationY=this.centerY,this.backgroundGroup.translationX=this.centerX,this.backgroundGroup.translationY=this.centerY,this.labelGroup&&(this.labelGroup.translationX=this.centerX,this.labelGroup.translationY=this.centerY),t){const e=this.getTitleTranslationY(),i=t.node.computeBBox();t.node.visible=t.enabled&&isFinite(e)&&!this.bboxIntersectsSurroundingSeries(i,0,e),t.node.translationY=isFinite(e)?e:0}for(const e of[this.zerosumInnerRing,this.zerosumOuterRing])e.fillOpacity=0,e.stroke=this.properties.calloutLabel.color,e.strokeWidth=1,e.strokeOpacity=1;this.updateNodeMidPoint(),yield this.updateSelections(),yield this.updateNodes(e)})}updateTitleNodes(){var e,t;const{oldTitle:i}=this,{title:n}=this.properties;i!==n&&(i&&(null==(e=this.labelGroup)||e.removeChild(i.node)),n&&(n.node.textBaseline="bottom",null==(t=this.labelGroup)||t.appendChild(n.node)),this.oldTitle=n)}updateNodeMidPoint(){this.nodeData.forEach(e=>{const t=e.innerRadius+(e.outerRadius-e.innerRadius)/2;e.midPoint={x:e.midCos*Math.max(0,t),y:e.midSin*Math.max(0,t)}})}updateSelections(){return x(this,null,function*(){yield this.updateGroupSelection(),this.updateInnerCircleSelection()})}updateGroupSelection(){return x(this,null,function*(){const{itemSelection:e,highlightSelection:t,calloutLabelSelection:i,sectorLabelSelection:n,innerLabelsSelection:s}=this,r=(e,t)=>{let i=this.nodeData;t&&(i=i.map(e=>y(v({},e),{sectorFormat:v({},e.sectorFormat)}))),e.update(i,void 0,e=>this.getDatumId(e)),this.ctx.animationManager.isSkipped()&&e.cleanup()};r(e,!1),r(t,!0),i.update(this.nodeData,e=>{const t=new Va;t.tag=0,t.pointerEvents=1,e.appendChild(t);const i=new Fo;i.tag=1,i.pointerEvents=1,e.appendChild(i)}),n.update(this.nodeData,e=>{e.pointerEvents=1}),s.update(this.properties.innerLabels,e=>{e.pointerEvents=1})})}updateInnerCircleSelection(){const{innerCircle:e}=this.properties;let t=0;const i=this.getInnerRadius();if(i>0){const e=Math.min(i,this.getOuterRadius()),n=1;t=Math.ceil(2*e+n)}const n=e?[{radius:t}]:[];this.innerCircleSelection.update(n)}updateNodes(e){return x(this,null,function*(){const t=this.ctx.highlightManager.getActiveHighlight(),i=this.visible&&this.seriesItemEnabled.indexOf(!0)>=0;this.rootGroup.visible=i,this.backgroundGroup.visible=i,this.contentGroup.visible=i,this.highlightGroup.visible=i&&(null==t?void 0:t.series)===this,this.labelGroup&&(this.labelGroup.visible=i),this.contentGroup.opacity=this.getOpacity(),this.innerCircleSelection.each((e,{radius:t})=>{var i,n;e.setProperties({fill:null==(i=this.properties.innerCircle)?void 0:i.fill,opacity:null==(n=this.properties.innerCircle)?void 0:n.fillOpacity,size:t})});const n=(e,t,i,n)=>{const s=this.getSectorFormat(t.datum,t.itemId,n);t.sectorFormat.fill=s.fill,t.sectorFormat.stroke=s.stroke;const r=this.ctx.animationManager.isSkipped();r&&(e.startAngle=t.startAngle,e.endAngle=t.endAngle,e.innerRadius=t.innerRadius,e.outerRadius=t.outerRadius),(n||r)&&(e.fill=s.fill,e.stroke=s.stroke),e.strokeWidth=s.strokeWidth,e.fillOpacity=s.fillOpacity,e.strokeOpacity=this.properties.strokeOpacity,e.lineDash=this.properties.lineDash,e.lineDashOffset=this.properties.lineDashOffset,e.fillShadow=this.properties.shadow,e.cornerRadius=this.properties.cornerRadius,e.inset=null!=this.properties.sectorSpacing?(this.properties.sectorSpacing+(null!=s.stroke?s.strokeWidth:0))/2:0,e.lineJoin=null!=this.properties.sectorSpacing?"miter":"round"};this.itemSelection.each((e,t,i)=>n(e,t,0,!1)),this.highlightSelection.each((e,i,s)=>{const r=(null==t?void 0:t.series)===this&&e.datum.itemId===t.itemId;n(e,i,0,!0),e.visible=r}),this.updateCalloutLineNodes(),this.updateCalloutLabelNodes(e),this.updateSectorLabelNodes(),this.updateInnerLabelNodes(),this.updateZerosumRings(),this.animationState.transition("update")})}updateCalloutLineNodes(){var e;const{calloutLine:t}=this.properties,i=t.length,n=t.strokeWidth,s=null!=(e=t.colors)?e:this.properties.strokes,{offset:r}=this.properties.calloutLabel;this.calloutLabelSelection.selectByTag(0).forEach((e,t)=>{var o;const a=e.datum,{calloutLabel:l,outerRadius:c}=a;if((null==l?void 0:l.text)&&!l.hidden&&0!==c){e.visible=!0,e.strokeWidth=n,e.stroke=s[t%s.length],e.fill=void 0;const h=a.midCos*c,d=a.midSin*c;let u=a.midCos*(c+i),p=a.midSin*(c+i);if((null!=(o=l.collisionTextAlign)?o:0!==l.collisionOffsetY)&&null!=l.box){const e=l.box;let t=u,i=p;u<e.x?t=e.x:u>e.x+e.width&&(t=e.x+e.width),p<e.y?i=e.y:p>e.y+e.height&&(i=e.y+e.height);const n=t-u,s=i-p,o=Math.sqrt(Math.pow(n,2)+Math.pow(s,2)),a=o-r;a>0&&(u+=n*a/o,p+=s*a/o)}e.x1=h,e.y1=d,e.x2=u,e.y2=p}else e.visible=!1})}getLabelOverflow(e,t,i){const n=i.x-this.centerX,s=i.x+i.width-this.centerX,r=i.y-this.centerY,o=i.y+i.height-this.centerY;let a=1;t.x+1<n?a=(t.x+t.width-n)/t.width:t.x+t.width-1>s&&(a=(s-t.x)/t.width);const l=t.y+1<r||t.y+t.height-1>o;return{textLength:1===a?e.length:Math.floor(e.length*a)-1,hasVerticalOverflow:l,hasSurroundingSeriesOverflow:this.bboxIntersectsSurroundingSeries(t)}}bboxIntersectsSurroundingSeries(e,t=0,i=0){const{surroundingRadius:n}=this;if(null==n)return!1;const s=[{x:e.x+t,y:e.y+i},{x:e.x+e.width+t,y:e.y+i},{x:e.x+e.width+t,y:e.y+e.height+i},{x:e.x+t,y:e.y+e.height+i}],r=f(n,2);return s.some(e=>f(e.x,2)+f(e.y,2)>r)}computeCalloutLabelCollisionOffsets(){const{radiusScale:e}=this,{calloutLabel:t,calloutLine:i}=this.properties,{offset:n,minSpacing:s}=t,r=e.convert(0),o=this.nodeData,a=this.nodeData.filter(e=>{return!(!(t=e).calloutLabel||0===t.outerRadius);var t});if(a.forEach(e=>{const t=e.calloutLabel;null!=t&&(t.hidden=!1,t.collisionTextAlign=void 0,t.collisionOffsetY=0)}),a.length<=1)return;const l=a.filter(e=>e.midCos<0).sort((e,t)=>e.midSin-t.midSin),c=a.filter(e=>e.midCos>=0).sort((e,t)=>e.midSin-t.midSin),h=a.filter(e=>{var t;return e.midSin<0&&"center"===(null==(t=e.calloutLabel)?void 0:t.textAlign)}).sort((e,t)=>e.midCos-t.midCos),d=a.filter(e=>{var t;return e.midSin>=0&&"center"===(null==(t=e.calloutLabel)?void 0:t.textAlign)}).sort((e,t)=>e.midCos-t.midCos),u=new Fo,p=e=>{var t;const s=e.calloutLabel;if(null==s)return new ts(0,0,0,0);const r=e.outerRadius+i.length+n,o=e.midCos*r,a=e.midSin*r+s.collisionOffsetY;return u.text=s.text,u.x=o,u.y=a,u.setFont(this.properties.calloutLabel),u.setAlign({textAlign:null!=(t=s.collisionTextAlign)?t:s.textAlign,textBaseline:s.textBaseline}),u.computeBBox()},g=(e,t,i)=>{const n=p(e).grow(s/2),r=p(t).grow(s/2);if(n.x<r.x+r.width&&n.x+n.width>r.x&&("to-top"===i?n.y<r.y+r.height:n.y+n.height>r.y)){const e="to-top"===i?n.y-r.y-r.height:n.y+n.height-r.y;t.calloutLabel.collisionOffsetY=e}},f=e=>{const t=e.slice().sort((e,t)=>Math.abs(e.midSin)-Math.abs(t.midSin))[0],i=e.indexOf(t);for(let t=i-1;t>=0;t--){const i=e[t+1],n=e[t];g(i,n,"to-top")}for(let t=i+1;t<e.length;t++){const i=e[t-1],n=e[t];g(i,n,"to-bottom")}},m=e=>{const t=a.some(e=>0!==e.calloutLabel.collisionOffsetY),i=e.map(e=>p(e)),n=i.map(e=>e.clone().grow(s/2));let l=!1;for(let t=0;t<n.length&&!l;t++){const i=n[t];for(let s=t+1;s<e.length;s++){const e=n[s];if(i.collidesBBox(e)){l=!0;break}}}const c=o.map(e=>{const{startAngle:t,endAngle:i,outerRadius:n}=e;return{startAngle:t,endAngle:i,innerRadius:r,outerRadius:n}}),h=i.some(e=>c.some(t=>fg(e,t)));(l||t||h)&&e.filter(e=>"center"===e.calloutLabel.textAlign).forEach(e=>{const t=e.calloutLabel;e.midCos<0?t.collisionTextAlign="right":e.midCos>0?t.collisionTextAlign="left":t.collisionTextAlign="center"})};f(l),f(c),m(h),m(d)}updateCalloutLabelNodes(e){const{radiusScale:t}=this,{calloutLabel:i,calloutLine:n}=this.properties,s=n.length,{offset:r,color:o}=i,a=new Fo;this.calloutLabelSelection.selectByTag(1).forEach(n=>{var l;const{datum:c}=n,h=c.calloutLabel,d=t.convert(c.radius),u=Math.max(0,d);if(!(null==h?void 0:h.text)||0===u||h.hidden)return void(n.visible=!1);const p=u+s+r,g=c.midCos*p,f=c.midSin*p+h.collisionOffsetY,m={textAlign:null!=(l=h.collisionTextAlign)?l:h.textAlign,textBaseline:h.textBaseline};a.text=h.text,a.x=g,a.y=f,a.setFont(this.properties.calloutLabel),a.setAlign(m);const v=a.computeBBox();let y=h.text,C=!0;if(i.avoidCollisions){const{textLength:t,hasVerticalOverflow:i}=this.getLabelOverflow(h.text,v,e);y=h.text.length===t?h.text:`${h.text.substring(0,t)}…`,C=!i}n.text=y,n.x=g,n.y=f,n.setFont(this.properties.calloutLabel),n.setAlign(m),n.fill=o,n.visible=C})}computeLabelsBBox(e,t){return x(this,null,function*(){const{calloutLabel:i,calloutLine:n}=this.properties,s=n.length,{offset:r,maxCollisionOffset:o,minSpacing:a}=i;if(!i.avoidCollisions)return null;yield this.maybeRefreshNodeData(),this.updateRadiusScale(!1),this.computeCalloutLabelCollisionOffsets();const l=[],c=new Fo;let h;const{title:d}=this.properties;if((null==d?void 0:d.text)&&d.enabled){const e=this.getTitleTranslationY();isFinite(e)&&(c.text=d.text,c.x=0,c.y=e,c.setFont(d),c.setAlign({textBaseline:"bottom",textAlign:"center"}),h=c.computeBBox(),l.push(h))}return this.nodeData.forEach(i=>{var n;const d=i.calloutLabel;if(!d||0===i.outerRadius)return null;const u=i.outerRadius+s+r,p=i.midCos*u,g=i.midSin*u+d.collisionOffsetY;c.text=d.text,c.x=p,c.y=g,c.setFont(this.properties.calloutLabel),c.setAlign({textAlign:null!=(n=d.collisionTextAlign)?n:d.textAlign,textBaseline:d.textBaseline});const f=c.computeBBox();if(d.box=f,Math.abs(d.collisionOffsetY)>o)d.hidden=!0;else{if(h){const e=t.y-this.centerY,i=new ts(h.x-a,e,h.width+2*a,h.y+h.height+a-e);if(f.collidesBBox(i))return void(d.hidden=!0)}if(e.hideWhenNecessary){const{textLength:e,hasVerticalOverflow:i,hasSurroundingSeriesOverflow:n}=this.getLabelOverflow(d.text,f,t),s=d.text.length>2&&e<2;if(i||s||n)return void(d.hidden=!0)}d.hidden=!1,l.push(f)}}),0===l.length?null:ts.merge(l)})}updateSectorLabelNodes(){const{radiusScale:e}=this,t=e.convert(0),{fontSize:i,fontStyle:n,fontWeight:s,fontFamily:r,positionOffset:o,positionRatio:a,color:l}=this.properties.sectorLabel,c=t>0,h=1===this.seriesItemEnabled.filter(Boolean).length;this.sectorLabelSelection.each((e,d)=>{const{sectorLabel:u,outerRadius:p}=d;let g=!1;if(u&&0!==p){const f=t*(1-a)+p*a+o;e.fill=l,e.fontStyle=n,e.fontWeight=s,e.fontSize=i,e.fontFamily=r,e.text=u.text,!c&&h?(e.x=0,e.y=0):(e.x=d.midCos*f,e.y=d.midSin*f),e.textAlign="center",e.textBaseline="middle";const m=e.computeBBox(),v=[[m.x,m.y],[m.x+m.width,m.y],[m.x+m.width,m.y+m.height],[m.x,m.y+m.height]],{startAngle:y,endAngle:C}=d,b={startAngle:y,endAngle:C,innerRadius:t,outerRadius:p};v.every(([e,t])=>pg(e,t,b))&&(g=!0)}e.visible=g})}updateInnerLabelNodes(){const e=[],t=[];this.innerLabelsSelection.each((i,n)=>{const{fontStyle:s,fontWeight:r,fontSize:o,fontFamily:a,color:l,margin:c=2}=n;i.fontStyle=s,i.fontWeight=r,i.fontSize=o,i.fontFamily=a,i.text=n.text,i.x=0,i.y=0,i.fill=l,i.textAlign="center",i.textBaseline="alphabetic",e.push(i.computeBBox()),t.push(c)});const i=e=>0===e?0:t[e],n=e=>e===t.length-1?0:t[e],s=e.reduce((e,t,s)=>e+t.height+i(s)+n(s),0),r=Math.max(...e.map(e=>e.width)),o=this.getInnerRadius(),a=Math.sqrt(Math.pow(r/2,2)+Math.pow(s/2,2))<=(o>0?o:this.getOuterRadius()),l=[];for(let t=0,r=-s/2;t<e.length;t++){const s=e[t].height+r+i(t);l.push(s),r=s+n(t)}this.innerLabelsSelection.each((e,t,i)=>{e.y=l[i],e.visible=a})}updateZerosumRings(){this.zerosumOuterRing.size=2*this.getOuterRadius(),this.zerosumInnerRing.size=2*this.getInnerRadius()}getDatumLegendName(e){const{angleKey:t,calloutLabelKey:i,sectorLabelKey:n,legendItemKey:s}=this.properties,{sectorLabel:r,calloutLabel:o,legendItem:a}=e;return s&&void 0!==a?a.text:i&&i!==t&&void 0!==(null==o?void 0:o.text)?o.text:n&&n!==t&&void 0!==(null==r?void 0:r.text)?r.text:void 0}pickNodeClosestDatum(e){return kg(this,e)}getTooltipHtml(e){var t;if(!this.properties.isValid())return il;const{datum:i,angleValue:n,sectorFormat:{fill:s},itemId:r}=e,o=Ou(null==(t=this.properties.title)?void 0:t.text),a=We(n)?qn(n):String(n),l=this.getDatumLegendName(e);return this.properties.tooltip.toTooltipHtml({title:null!=o?o:l,content:o&&l?`${l}: ${a}`:a,backgroundColor:s},{datum:i,itemId:r,title:o,color:s,seriesId:this.id,angleKey:this.properties.angleKey,angleName:this.properties.angleName,radiusKey:this.properties.radiusKey,radiusName:this.properties.radiusName,calloutLabelKey:this.properties.calloutLabelKey,calloutLabelName:this.properties.calloutLabelName,sectorLabelKey:this.properties.sectorLabelKey,sectorLabelName:this.properties.sectorLabelName,legendItemKey:this.properties.legendItemKey})}getLegendData(e){var t,i,n,s,r;const{visible:o,processedData:a,dataModel:l}=this;if(!l||!(null==a?void 0:a.data.length)||"category"!==e)return[];const{angleKey:c,calloutLabelKey:h,sectorLabelKey:d,legendItemKey:u}=this.properties;if(!(u||h&&h!==c||d&&d!==c))return[];const{calloutLabelIdx:p,sectorLabelIdx:g,legendItemIdx:f}=this.getProcessedDataIndexes(l),m=(null==(t=this.properties.title)?void 0:t.showInLegend)&&this.properties.title.text,v=[];for(let e=0;e<a.data.length;e++){const{datum:t,values:l}=a.data[e],y=[];m&&y.push(m);const C=this.getLabels(t,2*Math.PI,2*Math.PI,!1,l[p],l[g],l[f]);if(u&&void 0!==C.legendItem?y.push(C.legendItem.text):h&&h!==c&&void 0!==(null==(i=C.calloutLabel)?void 0:i.text)?y.push(null==(n=C.calloutLabel)?void 0:n.text):d&&d!==c&&void 0!==(null==(s=C.sectorLabel)?void 0:s.text)&&y.push(null==(r=C.sectorLabel)?void 0:r.text),0===y.length)continue;const b=this.getSectorFormat(t,e,!1);v.push({legendType:"category",id:this.id,itemId:e,seriesId:this.id,enabled:o&&this.seriesItemEnabled[e],label:{text:y.join(" - ")},marker:{fill:b.fill,stroke:b.stroke,fillOpacity:this.properties.fillOpacity,strokeOpacity:this.properties.strokeOpacity,strokeWidth:this.properties.strokeWidth},legendItemName:null!=u?t[u]:void 0})}return v}onLegendItemClick(e){const{enabled:t,itemId:i,series:n,legendItemName:s}=e;n.id===this.id?this.toggleSeriesItem(i,t):null!=s&&this.toggleOtherSeriesItems(s,t)}toggleSeriesItem(e,t){this.seriesItemEnabled[e]=t,this.nodeDataRefresh=!0}toggleOtherSeriesItems(e,t){var i;if(!this.properties.legendItemKey||!this.dataModel)return;const n=this.dataModel.resolveProcessedDataIndexById(this,"legendItemValue");null==(i=this.processedData)||i.data.forEach(({values:i},s)=>{i[n]===e&&this.toggleSeriesItem(s,t)})}animateEmptyUpdateReady(e){const{animationManager:t}=this.ctx,i=Rg(!0,this.properties.rotation,this.radiusScale,this.previousRadiusScale);Ls(this.id,"nodes",t,[this.itemSelection,this.highlightSelection],i.nodes),Ls(this.id,"innerCircle",t,[this.innerCircleSelection],i.innerCircle),_u(this,"callout",t,this.calloutLabelSelection),_u(this,"sector",t,this.sectorLabelSelection),_u(this,"inner",t,this.innerLabelsSelection),this.previousRadiusScale.range=this.radiusScale.range}animateWaitingUpdateReady(){var e,t,i,n,s,r;const{itemSelection:o,highlightSelection:a,processedData:l,radiusScale:c,previousRadiusScale:h}=this,{animationManager:d}=this.ctx,u=null==(e=null==l?void 0:l.reduced)?void 0:e.diff;this.ctx.animationManager.stopByAnimationGroupId(this.id);const p=0===(null!=(t=null==u?void 0:u.moved.size)?t:0),g=(null!=(i=null==l?void 0:l.defs.keys.length)?i:0)>0,f=null==(r=null==(s=null==(n=null==l?void 0:l.reduced)?void 0:n.animationValidation)?void 0:s.uniqueKeys)||r;p&&g&&f||this.ctx.animationManager.skipCurrentBatch();const m=Rg(!1,this.properties.rotation,c,h);Ls(this.id,"nodes",d,[o,a],m.nodes,(e,t)=>this.getDatumId(t),u),Ls(this.id,"innerCircle",d,[this.innerCircleSelection],m.innerCircle),_u(this,"callout",this.ctx.animationManager,this.calloutLabelSelection),_u(this,"sector",this.ctx.animationManager,this.sectorLabelSelection),_u(this,"inner",this.ctx.animationManager,this.innerLabelsSelection),this.previousRadiusScale.range=this.radiusScale.range}animateClearingUpdateEmpty(){const{itemSelection:e,highlightSelection:t,radiusScale:i,previousRadiusScale:n}=this,{animationManager:s}=this.ctx,r=Rg(!1,this.properties.rotation,i,n);Ls(this.id,"nodes",s,[e,t],r.nodes),Ls(this.id,"innerCircle",s,[this.innerCircleSelection],r.innerCircle),Fu(this,"callout",this.ctx.animationManager,this.calloutLabelSelection),Fu(this,"sector",this.ctx.animationManager,this.sectorLabelSelection),Fu(this,"inner",this.ctx.animationManager,this.innerLabelsSelection),this.previousRadiusScale.range=this.radiusScale.range}getDatumIdFromData(e){var t,i,n;const{calloutLabelKey:s,sectorLabelKey:r,legendItemKey:o}=this.properties;if(null==(n=null==(i=null==(t=this.processedData)?void 0:t.reduced)?void 0:i.animationValidation)?void 0:n.uniqueKeys)return o?e[o]:s?e[s]:r?e[r]:void 0}getDatumId(e){const{index:t}=e,i=this.getDatumIdFromData(e.datum);return null!=i?String(i):`${t}`}onDataChange(){var e;const{data:t,seriesItemEnabled:i}=this;this.seriesItemEnabled=null!=(e=null==t?void 0:t.map((e,t)=>{var n;return null==(n=i[t])||n}))?e:[]}computeFocusBounds(e){return Pg(this,e)}};Yg.className="PieSeries",Yg.type="pie";var qg={type:"series",optionsKey:"series[]",packageType:"community",chartTypes:["polar"],identifier:"pie",instanceConstructor:Yg,themeTemplate:Fg,paletteFactory:Gg},Xg=["start","center","end"],Zg=["annotations","ranges","zoom"],Qg=(e=>(e.Top="top",e.Right="right",e.Bottom="bottom",e.Left="left",e.FloatingTop="floating-top",e.FloatingBottom="floating-bottom",e))(Qg||{}),Jg=Object.values(Qg),ef=class extends yt{constructor(e,t){super(),this.onChange=e,this.onButtonsChange=t,this.align="start",this.position="top"}};S([Za(e=>{e.onChange(e.enabled)}),$s(Js)],ef.prototype,"enabled",2),S([Za(e=>{e.onChange(e.enabled)}),$s(Fr(["start","center","end"]),{optional:!0})],ef.prototype,"align",2),S([Za(e=>{e.onChange(e.enabled)}),$s(Fr(["top","right","bottom","left","floating-top","floating-bottom"]),{optional:!0})],ef.prototype,"position",2),S([Za(e=>{e.onButtonsChange(e.buttons)}),$s(lr,{optional:!0})],ef.prototype,"buttons",2);var tf="ag-charts-toolbar",nf={align:`${tf}__align`,button:`${tf}__button`,icon:`${tf}__icon`,label:`${tf}__label`},sf={top:`${tf}--top`,right:`${tf}--right`,bottom:`${tf}--bottom`,left:`${tf}--left`,"floating-top":`${tf}--floating-top`,"floating-bottom":`${tf}--floating-bottom`,hidden:`${tf}--hidden`,preventFlash:`${tf}--prevent-flash`,floatingHidden:`${tf}--floating-hidden`,align:{start:`${nf.align}--start`,center:`${nf.align}--center`,end:`${nf.align}--end`},button:{hidden:`${nf.button}--hidden`}},rf=`\n.${tf} {\n    align-items: center;\n    background: var(--ag-charts-toolbar-background-color);\n    border-bottom: var(--ag-charts-toolbar-border-critical);\n    border-top: var(--ag-charts-toolbar-border-critical);\n    border-left: var(--ag-charts-toolbar-border);\n    border-right: var(--ag-charts-toolbar-border);\n    display: flex;\n    flex-wrap: nowrap;\n    opacity: 1;\n    position: absolute;\n    transform: translateY(0);\n    transition: opacity 0.2s ease-in-out, transform 0.2s ease-in-out;\n}\n\n.${sf.hidden},\n.${sf.preventFlash} {\n    visibility: hidden;\n}\n\n.${sf.floatingHidden} {\n    opacity: 0;\n    transition: opacity 0.4s ease-in-out;\n}\n\n.${sf.top},\n.${sf.bottom} {\n    flex-direction: row;\n    height: var(--ag-charts-toolbar-size);\n    padding: 0 var(--ag-charts-toolbar-padding);\n    width: 100%;\n}\n\n.${sf.left},\n.${sf.right} {\n    flex-direction: column;\n    padding: var(--ag-charts-toolbar-padding) 0;\n    width: var(--ag-charts-toolbar-size);\n}\n\n.${sf["floating-top"]},\n.${sf["floating-bottom"]} {\n    background: none;\n    border: none;\n    flex-direction: row;\n    height: var(--ag-charts-toolbar-size);\n    overflow: hidden;\n    padding: 0 var(--ag-charts-toolbar-padding);\n    pointer-events: none;\n    width: 100%;\n}\n\n.${nf.align} {\n    display: flex;\n    flex-direction: inherit;\n    flex-wrap: inherit;\n    max-width: 100%;\n}\n\n.${sf.align.center},\n.${sf.align.end} {\n    margin-left: auto;\n}\n\n.${sf.left} .${sf.align.center},\n.${sf.left} .${sf.align.end},\n.${sf.right} .${sf.align.center},\n.${sf.right} .${sf.align.end} {\n    margin-left: 0;\n    margin-top: auto;\n}\n\n.${sf["floating-top"]} .${nf.align},\n.${sf["floating-bottom"]} .${nf.align} {\n    gap: var(--ag-charts-toolbar-gap);\n    transition: transform 0.4s ease-in-out;\n}\n\n.${nf.button} {\n    align-items: center;\n    border-radius: var(--ag-charts-button-radius);\n    color: var(--ag-charts-toolbar-foreground-color);\n    display: flex;\n    font-size: 14px;\n    font-weight: 500;\n    justify-content: center;\n    margin: 0;\n    padding: var(--ag-charts-button-padding);\n    pointer-events: all;\n    transition: background-color .25s ease-in-out;\n}\n\n.${sf.left} .${nf.button},\n.${sf.right} .${nf.button} {\n    height: var(--ag-charts-toolbar-size);\n    max-width: 100%;\n    overflow: hidden;\n}\n\n.${sf["floating-top"]} .${nf.button},\n.${sf["floating-bottom"]} .${nf.button} {\n    background: var(--ag-charts-toolbar-background-color);\n    border: var(--ag-charts-toolbar-border-critical);\n}\n\n.${sf.button.hidden} {\n    display: none;\n}\n\n.${nf.button}:hover {\n    background: var(--ag-charts-toolbar-hover-color);\n}\n\n.${nf.button}:disabled {\n    background: var(--ag-charts-toolbar-disabled-background-color);\n    color: var(--ag-charts-toolbar-disabled-foreground-color);\n}\n\n.${nf.button}:not([disabled]) {\n    cursor: pointer;\n}\n\n.${nf.icon} {\n    height: 1.2em;\n    width: 1.2em;\n}\n\n.${nf.icon} + .${nf.label} {\n    margin-left: var(--ag-charts-size);\n}\n\n.${nf.icon},\n.${nf.label} {\n    pointer-events: none;\n}\n\n`,of=class extends we{constructor(e){super(),this.ctx=e,this.enabled=!0,this.annotations=new ef(this.onGroupChanged.bind(this,"annotations"),this.onGroupButtonsChanged.bind(this,"annotations")),this.ranges=new ef(this.onGroupChanged.bind(this,"ranges"),this.onGroupButtonsChanged.bind(this,"ranges")),this.zoom=new ef(this.onGroupChanged.bind(this,"zoom"),this.onGroupButtonsChanged.bind(this,"zoom")),this.margin=10,this.floatingDetectionRange=28,this.positions={top:new Set,right:new Set,bottom:new Set,left:new Set,"floating-top":new Set,"floating-bottom":new Set},this.positionAlignments={top:{},right:{},bottom:{},left:{},"floating-top":{},"floating-bottom":{}},this.groupCallers={annotations:0,ranges:0,zoom:0},this.groupButtons={annotations:[],ranges:[],zoom:[]},this.pendingButtonToggledEvents=[],this.groupProxied=new Set,this.container=e.toolbarManager.element,this.elements={top:this.container.appendChild(En("div")),right:this.container.appendChild(En("div")),bottom:this.container.appendChild(En("div")),left:this.container.appendChild(En("div")),"floating-top":this.container.appendChild(En("div")),"floating-bottom":this.container.appendChild(En("div"))},An(rf,tf),this.renderToolbar("top"),this.renderToolbar("right"),this.renderToolbar("bottom"),this.renderToolbar("left"),this.renderToolbar("floating-top"),this.renderToolbar("floating-bottom"),this.toggleVisibilities(),this.destroyFns.push(e.interactionManager.addListener("hover",this.onHover.bind(this),31),e.interactionManager.addListener("leave",this.onLeave.bind(this),31),e.toolbarManager.addListener("button-toggled",this.onButtonToggled.bind(this)),e.toolbarManager.addListener("group-toggled",this.onGroupToggled.bind(this)),e.toolbarManager.addListener("proxy-group-options",this.onProxyGroupOptions.bind(this)),e.layoutService.addListener("layout-complete",this.onLayoutComplete.bind(this)),()=>this.destroyElements())}destroyElements(){for(const e of Object.values(this.elements))e.remove()}onHover(e){const{enabled:t,elements:i,floatingDetectionRange:n,ctx:{scene:s}}=this,{offsetY:r,sourceEvent:{target:o}}=e,{FloatingBottom:a,FloatingTop:l}=Qg;if(!t)return;const c=i[a],h=i[l],d=r>c.offsetTop-n&&r<s.canvas.element.offsetHeight||o===c,u=h.offsetTop+h.offsetHeight+n,p=r>0&&r<u||o===h;c.classList.toggle(sf.floatingHidden,!d),h.classList.toggle(sf.floatingHidden,!p),this.translateFloatingElements(a,d),this.translateFloatingElements(l,p)}onLeave(e){const{enabled:t,elements:i,ctx:{scene:n}}=this,{relatedTarget:s,target:r}=e.sourceEvent,{FloatingBottom:o,FloatingTop:a}=Qg;t&&r===n.canvas.element&&(Zg.some(e=>this.groupButtons[e].some(e=>e===s))||(i[o].classList.add(sf.floatingHidden),i[a].classList.add(sf.floatingHidden),this.translateFloatingElements(o,!1),this.translateFloatingElements(a,!1)))}onGroupChanged(e){null==this[e]||this.groupProxied.has(e)||(this.createGroup(e),this.toggleVisibilities())}onGroupButtonsChanged(e,t){this.enabled&&!this.groupProxied.has(e)&&(this.createGroupButtons(e,t),this.toggleVisibilities())}onLayoutComplete(){for(const e of Jg)this.elements[e].classList.remove(sf.preventFlash)}onButtonToggled(e){const{group:t,value:i,enabled:n}=e;if(0!==this.groupButtons[t].length)for(const e of this.groupButtons[t])e.dataset.toolbarValue===`${i}`&&(e.disabled=!n);else this.pendingButtonToggledEvents.push(e)}onGroupToggled(e){const{group:t,visible:i}=e;this.toggleGroup(t,i),this.toggleVisibilities()}onProxyGroupOptions(e){const{group:t,options:i}=e;this.groupProxied.add(t),this.createGroup(t,i.enabled,i.position),this.createGroupButtons(t,i.buttons),this.toggleGroup(t,i.enabled),this[t].set(i)}createGroup(e,t,i){null!=t||(t=this[e].enabled),null!=i||(i=this[e].position);for(const n of Jg)t&&i===n?this.positions[n].add(e):this.positions[n].delete(e)}createGroupButtons(e,t){var i,n;for(const t of this.groupButtons[e])t.remove();this.groupButtons[e]=[];const s=null!=(i=this[e].align)?i:"start",r=null!=(n=this[e].position)?n:"top",o=this.positionAlignments[r][s];for(const i of null!=t?t:[]){const t=this.createButtonElement(e,i);null==o||o.appendChild(t),this.groupButtons[e].push(t)}}toggleGroup(e,t){t?this.groupCallers[e]+=1:this.groupCallers[e]=Math.max(0,this.groupCallers[e]-1)}processPendingEvents(){var e;const t=(null!=(e=this.pendingButtonToggledEvents)?e:[]).slice();for(const e of t)this.onButtonToggled(e);this.pendingButtonToggledEvents=[]}performLayout(e){return x(this,arguments,function*({shrinkRect:e}){const{elements:t,margin:i}=this;return t.top.classList.contains(sf.hidden)||e.shrink(t.top.offsetHeight+2*i,"top"),t.right.classList.contains(sf.hidden)||e.shrink(t.right.offsetWidth+i,"right"),t.bottom.classList.contains(sf.hidden)||e.shrink(t.bottom.offsetHeight+2*i,"bottom"),t.left.classList.contains(sf.hidden)||e.shrink(t.left.offsetWidth+i,"left"),{shrinkRect:e}})}performCartesianLayout(e){return x(this,null,function*(){const{elements:t,margin:i}=this,{seriesRect:n}=e,{FloatingBottom:s,FloatingTop:r}=Qg;t.top.style.top=n.y-t.top.offsetHeight-2*i+"px",t.top.style.left=`${i}px`,t.top.style.width=`calc(100% - ${2*i}px)`,t.right.style.top=`${n.y+i}px`,t.right.style.right=`${i}px`,t.right.style.height=`calc(100% - ${n.y+2*i}px)`,t.bottom.style.bottom=`${i}px`,t.bottom.style.left=`${i}px`,t.bottom.style.width=`calc(100% - ${2*i}px)`,t.left.style.top=`${n.y}px`,t.left.style.left=`${i}px`,t.left.style.height=`calc(100% - ${n.y+2*i}px)`,t[r].style.top=`${n.y}px`,t[r].style.paddingTop=`${i}px`,t[s].style.top=n.y+n.height-t[s].offsetHeight+"px",t[s].style.paddingBottom=`${i}px`})}toggleVisibilities(){var e;if(null==this.elements)return;const t=e=>this[e].enabled&&this.groupCallers[e]>0,i=e=>t=>"string"!=typeof t.value&&"number"!=typeof t.value||`${t.value}`===e.dataset.toolbarValue;for(const e of Jg){const i=this.enabled&&Array.from(this.positions[e].values()).some(t);this.elements[e].classList.toggle(sf.hidden,!i)}for(const n of Zg){if(null==this[n])continue;const s=t(n);for(const t of this.groupButtons[n]){const r=s&&(null==(e=this[n].buttons)?void 0:e.some(i(t)));t.classList.toggle(sf.button.hidden,!r)}}}translateFloatingElements(e,t){const{elements:i,margin:n,positionAlignments:s}=this,r=i[e],o=Object.values(s[e]);for(const e of o)e.style.transform=t&&""!==e.style.transform?"translateY(0)":`translateY(${r.offsetHeight+n}px)`}renderToolbar(e="top"){const t=this.elements[e];t.classList.add(tf,sf[e],sf.preventFlash),"floating-top"!==e&&"floating-bottom"!==e||t.classList.add(sf.floatingHidden);for(const i of Xg){const n=En("div");n.classList.add(nf.align,sf.align[i]),t.appendChild(n),this.positionAlignments[e][i]=n}}createButtonElement(e,t){const i=En("button");i.classList.add(nf.button),i.dataset.toolbarGroup=e,i.tabIndex=-1,"string"!=typeof t.value&&"number"!=typeof t.value||(i.dataset.toolbarValue=`${t.value}`),t.tooltip&&(i.title=t.tooltip);let n="";return null!=t.icon&&(n=`<span class="ag-charts-icon-${t.icon} ${nf.icon}"></span>`),null!=t.label&&(n=`${n}<span class="${nf.label}">${t.label}</span>`),i.innerHTML=n,i.onclick=this.onButtonPress.bind(this,e,t.value),this.destroyFns.push(()=>i.remove()),i}onButtonPress(e,t){this.ctx.toolbarManager.pressButton(e,t)}};S([Za(e=>{e.processPendingEvents(),e.toggleVisibilities()}),$s(Js)],of.prototype,"enabled",2);var af=864e5,lf=30*af,cf={type:"root",optionsKey:"toolbar",packageType:"community",chartTypes:["cartesian"],instanceConstructor:of,themeTemplate:{toolbar:{enabled:!0,annotations:{enabled:!1,position:"left",align:"start",buttons:[{label:"Li",value:"line"},{label:"PCh",value:"parallel-channel"}]},ranges:{enabled:!1,position:"top",align:"start",buttons:[{label:"1m",value:lf},{label:"3m",value:3*lf},{label:"6m",value:6*lf},{label:"YTD",value:(e,t)=>[new Date(`${new Date(t).getFullYear()}-01-01`).getTime(),t]},{label:"1y",value:365*af},{label:"All",value:(e,t)=>[e,t]}]},zoom:{enabled:!1,position:"top",align:"end",buttons:[{icon:"zoom-out",tooltip:"Zoom out",value:"zoom-out"},{icon:"zoom-in",tooltip:"Zoom in",value:"zoom-in"},{icon:"pan-left",tooltip:"Pan left",value:"pan-left"},{icon:"pan-right",tooltip:"Pan right",value:"pan-right"},{icon:"pan-start",tooltip:"Pan to the start",value:"pan-start"},{icon:"pan-end",tooltip:"Pan to the end",value:"pan-end"},{icon:"reset",tooltip:"Reset the zoom",value:"reset"}]}}}};var hf=class e extends rd{constructor(e,t){super(e,t)}performLayout(){return x(this,null,function*(){const t=yield w(e.prototype,this,"performLayout").call(this),{seriesArea:{padding:i},seriesRoot:n,annotationRoot:s,highlightRoot:r}=this,o=t.clone();t.shrink(i.left,"left"),t.shrink(i.top,"top"),t.shrink(i.right,"right"),t.shrink(i.bottom,"bottom"),this.seriesRect=t,this.animationRect=t,this.hoverRect=t;for(const e of[n,s,r])e.translationX=Math.floor(t.x),e.translationY=Math.floor(t.y);return yield Promise.all(this.series.map(e=>x(this,null,function*(){yield e.update({seriesRect:t})}))),n.visible=this.series[0].visible,n.setClipRectInGroupCoordinateSpace(new ts(t.x,t.y,t.width,t.height)),this.ctx.layoutService.dispatchLayoutComplete({type:"layout-complete",chart:{width:this.ctx.scene.width,height:this.ctx.scene.height},clipSeries:!1,series:{rect:o,paddedRect:t,visible:!0},axes:[]}),t})}};hf.className="HierarchyChart",hf.type="hierarchy";var df=hf,uf=class extends xl{constructor(){super(...arguments),this.shape="polygon",this.innerRadiusRatio=0,this.defaultTickMinSpacing=20}computeLabelsBBox(e,t){return null}};S([$s(Fr(["polygon","circle"],"a polar axis shape"))],uf.prototype,"shape",2),S([$s(rr)],uf.prototype,"innerRadiusRatio",2);var pf=class e extends rd{constructor(e,t){super(e,t),this.padding=new Ql(40),this.axisGroup.zIndex=6}performLayout(){return x(this,null,function*(){const t=yield w(e.prototype,this,"performLayout").call(this),i=t.clone();return this.computeSeriesRect(t),yield this.computeCircle(t),this.axes.forEach(e=>e.update()),this.hoverRect=t,this.ctx.layoutService.dispatchLayoutComplete({type:"layout-complete",chart:{width:this.ctx.scene.width,height:this.ctx.scene.height},clipSeries:!1,series:{rect:i,paddedRect:t,visible:!0},axes:[]}),t})}updateAxes(e,t,i){var n,s;const r=this.axes.find(e=>"x"===e.direction),o=this.axes.find(e=>"y"===e.direction);if(!(r instanceof uf&&o instanceof uf))return;const a=r.scale,l=null==(n=a.ticks)?void 0:n.call(a).map(e=>a.convert(e)),c=o.innerRadiusRatio;r.innerRadiusRatio=c,null==(s=r.computeRange)||s.call(r),r.gridLength=i,o.gridAngles=l,o.gridRange=r.range,o.range=[i,i*c],[r,o].forEach(i=>{i.translation.x=e,i.translation.y=t,i.calculateLayout()})}computeSeriesRect(e){const{seriesArea:{padding:t}}=this;e.shrink(t.left,"left"),e.shrink(t.top,"top"),e.shrink(t.right,"right"),e.shrink(t.bottom,"bottom"),this.seriesRect=e,this.animationRect=e}computeCircle(e){return x(this,null,function*(){const t=this.series.filter(e=>e instanceof Ng),i=this.axes.filter(e=>e instanceof uf),n=(e,i,n)=>{this.updateAxes(e,i,n),t.forEach(t=>{t.centerX=e,t.centerY=i,t.radius=n});const s=t.filter(e=>e instanceof Yg||e instanceof _g);if(s.length>1){const e=s.map(e=>{const t=e.getInnerRadius();return{series:e,innerRadius:t}}).sort((e,t)=>e.innerRadius-t.innerRadius);e.at(-1).series.surroundingRadius=void 0;for(let t=0;t<e.length-1;t++)e[t].series.surroundingRadius=e[t+1].innerRadius}},s=e.x+e.width/2,r=e.y+e.height/2,o=Math.max(0,Math.min(e.width,e.height)/2);let a=o;n(s,r,a);const l=(...l)=>x(this,[...l],function*({hideWhenNecessary:l=!1}={}){const c=[];for(const n of[...i,...t]){const t=yield n.computeLabelsBBox({hideWhenNecessary:l},e);t&&c.push(t)}if(0===c.length)return void n(s,r,o);const h=ts.merge(c),d=this.refineCircle(h,a,e);n(d.centerX,d.centerY,d.radius),d.radius!==a&&(a=d.radius)});return yield l(),yield l(),yield l(),yield l({hideWhenNecessary:!0}),yield l({hideWhenNecessary:!0}),{radius:a,centerX:s,centerY:r}})}refineCircle(e,t,i){const n=-t,s=-t,r=t,o=t;let a=Math.max(0,n-e.x),l=Math.max(0,s-e.y),c=Math.max(0,e.x+e.width-r),h=Math.max(0,e.y+e.height-o);a=c=Math.max(a,c),l=h=Math.max(l,h);const d=i.width-a-c,u=i.height-l-h;let p=Math.min(d,u)/2;const g=.5*i.width/2,f=.5*i.height/2,m=Math.min(g,f);if(p<m){p=m;const e=a+c;if(2*p+(l+h)>i.height){const e=i.height-2*p;2*Math.min(l,h)>e?(l=e/2,h=e/2):l>h?l=e-h:h=e-l}if(2*p+e>i.width){const e=i.width-2*p;2*Math.min(a,c)>e?(a=e/2,c=e/2):a>c?a=e-c:c=e-a}}const v=a+2*p+c,y=l+2*p+h;return{centerX:i.x+(i.width-v)/2+a+p,centerY:i.y+(i.height-y)/2+l+p,radius:p}}};pf.className="PolarChart",pf.type="polar";var gf=pf,ff=Math.PI/180,mf=e=>e*ff,vf=e=>-Math.log(Math.tan(.25*Math.PI+e*ff*.5)),yf=e=>e/ff,Cf=e=>(Math.atan(Math.exp(-e))-.25*Math.PI)/(.5*ff),bf=class e{constructor(t,i){this.domain=t,this.range=i,this.type="mercator",this.bounds=e.bounds(t)}static bounds(e){const[[t,i],[n,s]]=e,r=mf(t),o=vf(i),a=mf(n),l=vf(s);return new ts(Math.min(r,a),Math.min(o,l),Math.abs(a-r),Math.abs(l-o))}static fixedScale(){return new e([[yf(0),Cf(0)],[yf(1),Cf(1)]],[[0,0],[1,1]])}convert([e,t]){const[[i,n],[s,r]]=this.range,o=(s-i)/this.bounds.width,a=(r-n)/this.bounds.height;return[(mf(e)-this.bounds.x)*o+i,(vf(t)-this.bounds.y)*a+n]}invert([e,t]){const[[i,n],[s,r]]=this.range,o=(s-i)/this.bounds.width,a=(r-n)/this.bounds.height;return[yf((e-i)/o+this.bounds.x),Cf((t-n)/a+this.bounds.y)]}};function Sf(e){return"map-shape"===e.type||"map-line"===e.type||"map-marker"===e.type||"map-shape-background"===e.type||"map-line-background"===e.type}var wf=class e extends rd{constructor(e,t){super(e,t),this.xAxis=new Jd(this.getModuleContext()),this.xAxis.position="bottom",this.yAxis=new Jd(this.getModuleContext()),this.yAxis.position="left",this.ctx.zoomManager.updateAxes([this.xAxis,this.yAxis])}updateData(){return x(this,null,function*(){yield w(e.prototype,this,"updateData").call(this);const{topology:t}=this.getOptions();this.series.forEach(e=>{Sf(e)&&e.setChartTopology(t)})})}performLayout(){return x(this,null,function*(){const t=yield w(e.prototype,this,"performLayout").call(this),{seriesArea:{padding:i},seriesRoot:n,annotationRoot:s,highlightRoot:r}=this,o=t.clone();t.shrink(i.left,"left"),t.shrink(i.top,"top"),t.shrink(i.right,"right"),t.shrink(i.bottom,"bottom"),this.seriesRect=t,this.animationRect=t,this.hoverRect=t;const a=this.series.filter(Sf),l=a.reduce((e,t)=>{if(!t.visible)return e;const i=t.topologyBounds;return null==i?e:null==e?i:(e.merge(i),e)},void 0);let c;if(null!=l){const{lon0:e,lat0:i,lon1:n,lat1:s}=l,r=[[e,i],[n,s]],o=bf.bounds(r),{width:a,height:h}=t,d=Math.min(a/o.width,h/o.height),u=o.width*d,p=o.height*d,g=(a-u)/2,f=(h-p)/2,m=g,v=f,y=g+u,C=f+p,b=this.ctx.zoomManager.getAxisZoom(this.xAxis.id),S=this.ctx.zoomManager.getAxisZoom(this.yAxis.id),w=(y-m)/(b.max-b.min),x=m-w*b.min,E=(C-v)/(1-S.min-(1-S.max)),M=v-E*(1-S.max);c=new bf(r,[[x,M],[x+w,M+E]])}a.forEach(e=>{e.scale=c});const h=this.series.some(e=>e.visible);n.visible=h;for(const e of[n,s,r])e.translationX=Math.floor(t.x),e.translationY=Math.floor(t.y),e.setClipRectInGroupCoordinateSpace(new ts(t.x,t.y,t.width,t.height));return this.ctx.layoutService.dispatchLayoutComplete({type:"layout-complete",chart:{width:this.ctx.scene.width,height:this.ctx.scene.height},clipSeries:!1,series:{rect:o,paddedRect:t,visible:h},axes:[]}),t})}};wf.className="TopologyChart",wf.type="topology";var xf=wf,Ef=Rn.create(!0,"opts");function Mf(e){if(pt(e))return"cartesian";if(gt(e))return"polar";if(ft(e))return"hierarchy";if(mt(e))return"topology";throw new Error(`AG Chart - unknown type of chart for options with type: ${e.type}`)}var Af=class e{static licenseCheck(e){var t,i,n,s;this.licenseChecked||(this.licenseManager=null==(i=(t=Se).licenseManager)?void 0:i.call(t,e),null==(n=this.licenseManager)||n.setLicenseKey(this.licenseKey,this.gridContext),null==(s=this.licenseManager)||s.validateLicense(),this.licenseChecked=!0)}static setLicenseKey(e){this.licenseKey=e}static setGridContext(e){this.gridContext=e}static getLicenseDetails(e){var t,i;return null==(i=(t=Se).licenseManager)?void 0:i.call(t,{}).getLicenseDetails(e)}static getInstance(e){return Rf.getInstance(e)}static create(e){var t,i,n;this.licenseCheck(e);const s=Rf.createOrUpdate(e);return(null==(t=this.licenseManager)?void 0:t.isDisplayWatermark())&&(null==(n=(i=Se).injectWatermark)||n.call(i,s.chart.element,this.licenseManager.getWatermarkMessage())),s}static update(t,i){if(!Xd.isInstance(t))throw new Error(e.INVALID_CHART_REF_MESSAGE);Rf.createOrUpdate(i,t)}static updateDelta(t,i){if(!Xd.isInstance(t))throw new Error(e.INVALID_CHART_REF_MESSAGE);Rf.updateUserDelta(t,i)}static download(t,i){if(!(t instanceof Xd))throw new Error(e.INVALID_CHART_REF_MESSAGE);Rf.download(t,i).catch(e=>O.errorOnce(e))}static getImageDataURL(t,i){if(!(t instanceof Xd))throw new Error(e.INVALID_CHART_REF_MESSAGE);return Rf.getImageDataURL(t,i)}};Af.INVALID_CHART_REF_MESSAGE="AG Charts - invalid chart reference passed",Af.licenseChecked=!1,Af.gridContext=!1;var Tf=Af,Df=class{static warnDeprecated(e){Pn()(`AgChart.${e}`,`Use AgCharts.${e} instead`)}static create(e){return this.warnDeprecated("create"),Tf.create(e)}static update(e,t){return this.warnDeprecated("update"),Tf.update(e,t)}static updateDelta(e,t){return this.warnDeprecated("updateDelta"),Tf.updateDelta(e,t)}static download(e,t){return this.warnDeprecated("download"),Tf.download(e,t)}static getImageDataURL(e,t){return this.warnDeprecated("getImageDataURL"),Tf.getImageDataURL(e,t)}},If=class e{static getInstance(e){const t=rd.getInstance(e);return t?Xd.chartInstances.get(t):void 0}static initialiseModules(){e.initialised||(function(){xe.register(hu,Mu,Ru,cf,Tp,$p,tg,ag,dg,Vg,qg,sg);for(const e of[Jd,Dl,nu,Vl,tu])Ee.register(e.type,{instanceConstructor:e,hidden:e===Vl})}(),function(){for(const e of xe.modules){if("enterprise"!==e.packageType||dt(e)||O.errorOnce("Unexpected enterprise module registered: "+e.identifier),"root"===e.type&&e.themeTemplate)for(const t of e.chartTypes)lt.set(t,e.themeTemplate);if("series"===e.type){if(e.chartTypes.length>1)throw new Error(`AG Charts - Module definition error: ${e.identifier}`);It.register(e.identifier,e)}if("series-option"===e.type&&e.themeTemplate)for(const t of e.seriesTypes)It.setThemeTemplate(t,e.themeTemplate);if("axis-option"===e.type&&e.themeTemplate)for(const t of e.axisTypes){const i=e.themeTemplate[t],n=v(v({},e.themeTemplate),i);for(const t of e.axisTypes)delete n[t];Ee.setThemeTemplate(t,n)}"axis"===e.type&&Ee.register(e.identifier,e),"legend"===e.type&&Rt.register(e.identifier,e)}if(xe.hasEnterpriseModules()){const e=ct.filter(({useCount:e})=>null==e||0===e);e.length>0&&O.errorOnce("Enterprise modules expected but not registered: ",e)}}(),e.initialised=!0)}static createOrUpdate(t,i){e.initialiseModules(),Ef(">>> AgChartV2.createOrUpdate() user options",t);const n=t,{overrideDevicePixelRatio:s,document:r,window:o}=n,a=C(n,["overrideDevicePixelRatio","document","window"]),l=new kn(a,{overrideDevicePixelRatio:s,document:r,window:o});let c=null==i?void 0:i.chart;return null!=c&&Mf(a)===Mf(c.processedOptions)||(c=e.createChartInstance(l,c)),null==i?i=new Xd(c):i.chart=c,Ef.check()&&"undefined"!=typeof window&&(null!=window.agChartInstances||(window.agChartInstances={}),window.agChartInstances[c.id]=c),c.queuedUserOptions.push(a),c.requestFactoryUpdate(e=>{e.applyOptions(l),e.queuedUserOptions.splice(0,e.queuedUserOptions.indexOf(a))}),i}static updateUserDelta(t,i){Mt(i=xt(i,{shallow:["data"]}),e=>{if("object"==typeof e)for(const[t,i]of Object.entries(e))void 0===i&&Object.assign(e,{[t]:Symbol("UNSET")})},{skip:["data"]});const{chart:n}=t,s=n.getOptions(),r=Xe(i,s);Ef(">>> AgChartV2.updateUserDelta() user delta",i),Ef("AgChartV2.updateUserDelta() - base options",s),e.createOrUpdate(r,t)}static download(t,i){return x(this,null,function*(){try{const n=yield e.prepareResizedChart(t,i);n.chart.ctx.scene.download(null==i?void 0:i.fileName,null==i?void 0:i.fileFormat),n.destroy()}catch(e){O.errorOnce(e)}})}static getImageDataURL(t,i){return x(this,null,function*(){const n=yield e.prepareResizedChart(t,i),s=n.chart.ctx.scene.getDataURL(null==i?void 0:i.fileFormat);return n.destroy(),s})}static prepareResizedChart(t){return x(this,arguments,function*({chart:t},i={}){var n,s,r,o;const a=null!=(s=null!=(n=i.width)?n:t.width)?s:t.ctx.scene.canvas.width,l=null!=(o=null!=(r=i.height)?r:t.height)?o:t.ctx.scene.canvas.height,c=Xe({container:document.createElement("div"),overrideDevicePixelRatio:1,autoSize:!1,width:a,height:l},xe.hasEnterpriseModules()&&{animation:{enabled:!1}},t.userOptions),h=e.createOrUpdate(c);return h.chart.ctx.zoomManager.updateZoom("agChartV2",t.ctx.zoomManager.getZoom()),t.series.forEach((e,t)=>{e.visible||(h.chart.series[t].visible=!1)}),t.update(0,{forceNodeDataRefresh:!0}),yield h.chart.waitForUpdate(),h})}static createChartInstance(t,i){const n=null==i?void 0:i.destroy({keepTransferableResources:!0});return new(e.getChartByOptions(t.processedOptions))(t,n)}static getChartByOptions(e){if(pt(e))return Yd;if(ft(e))return df;if(gt(e))return gf;if(mt(e))return xf;throw new Error("AG Charts - couldn't apply configuration, check options are correctly structured and series types are specified")}};If.initialised=!1;var Rf=If,Lf="9.3.2",kf={};b(kf,{Arc:()=>Pf,BBox:()=>ts,BandScale:()=>js,Caption:()=>al,ChangeDetectableProperties:()=>Vu,Circle:()=>yd,ContinuousScale:()=>Xr,Diamond:()=>wd,DropShadow:()=>Bu,ExtendedPath2D:()=>hd,Group:()=>Eo,HdpiCanvas:()=>Hl,Image:()=>Gf,Label:()=>Bo,Line:()=>Va,LinearGradientFill:()=>Nf,LinearScale:()=>Zd,Marker:()=>vd,Node:()=>hs,OrdinalTimeScale:()=>Co,Path:()=>ud,PointerEvents:()=>ls,RadialColumnShape:()=>_f,Rect:()=>lu,RedrawType:()=>is,Scene:()=>Yl,SceneChangeDetection:()=>ss,ScenePathChangeDetection:()=>dd,Sector:()=>wg,SectorBox:()=>ug,Selection:()=>Oa,Shape:()=>Io,Square:()=>Td,Text:()=>Fo,Tooltip:()=>ol,Triangle:()=>Rd,easing:()=>ms,getFont:()=>Vo,getMarker:()=>Nd,getRadialColumnWidth:()=>Ff,motion:()=>Vf,nearestSquared:()=>Qn,nearestSquaredInContainer:()=>Jn,toRadians:()=>Vs,toTooltipHtml:()=>sl});var Pf=class extends ud{constructor(){super(),this.centerX=0,this.centerY=0,this.radius=10,this.startAngle=0,this.endAngle=2*Math.PI,this.counterClockwise=!1,this.type=0,this.restoreOwnStyles()}get fullPie(){return Kn(Os(this.startAngle),Os(this.endAngle))}updatePath(){const e=this.path;e.clear(),e.arc(this.centerX,this.centerY,this.radius,this.startAngle,this.endAngle,this.counterClockwise),1===this.type?e.closePath():2!==this.type||this.fullPie||(e.lineTo(this.centerX,this.centerY),e.closePath())}computeBBox(){return new ts(this.centerX-this.radius,this.centerY-this.radius,2*this.radius,2*this.radius)}isPointInPath(e,t){const i=this.transformPoint(e,t),n=this.computeBBox();return 0!==this.type&&n.containsPoint(i.x,i.y)&&this.path.isPointInPath(i.x,i.y)}};Pf.className="Arc",Pf.defaultStyles=Object.assign({},Io.defaultStyles,{lineWidth:1,fillStyle:null}),S([dd()],Pf.prototype,"centerX",2),S([dd()],Pf.prototype,"centerY",2),S([dd()],Pf.prototype,"radius",2),S([dd()],Pf.prototype,"startAngle",2),S([dd()],Pf.prototype,"endAngle",2),S([dd()],Pf.prototype,"counterClockwise",2),S([dd()],Pf.prototype,"type",2);var Nf=class extends Io{constructor(){super(...arguments),this.direction="to-right",this.stops=void 0,this._mask=void 0}get mask(){return this._mask}set mask(e){null!=this._mask&&this.removeChild(this._mask),null!=e&&this.appendChild(e),this._mask=e}isPointInPath(e,t){var i,n;return null!=(n=null==(i=this.mask)?void 0:i.isPointInPath(e,t))&&n}computeBBox(){var e;return null==(e=this.mask)?void 0:e.computeBBox()}render(e){const{mask:t,stops:i}=this,{ctx:n,devicePixelRatio:s}=e,r=1/s,o=null==t?void 0:t.computeTransformedBBox();if(null==t||null==i||null==o)return;t.dirtyPath&&(t.updatePath(),t.dirtyPath=!1),n.save(),n.clip(t.path.getPath2D()),n.setTransform(s,0,0,s,0,0);const a=Math.floor(o.x),l=Math.ceil(o.x+o.width),c=Math.floor(o.y),h=Math.ceil(o.y+o.height),d=new qp,[u,p]="to-right"===this.direction?[a,l]:[c,h];if(d.domain=i.map((e,t)=>u+(p-u)*t/(i.length-1)),d.range=i,d.update(),"to-right"===this.direction){const e=h-c;for(let t=a;t<=l;t+=r)n.fillStyle=d.convert(t),n.fillRect(t,c,r,e)}else{const e=l-a;for(let t=c;t<=h;t+=r)n.fillStyle=d.convert(t),n.fillRect(a,t,e,r)}n.restore()}};function Of(e,t,i){const n=Math.sqrt(f(e,2)+f(t,2)),s=Math.atan2(t,e)+i;return{x:Math.cos(s)*n,y:Math.sin(s)*n}}S([ss({redraw:3})],Nf.prototype,"direction",2),S([ss({redraw:3})],Nf.prototype,"stops",2),S([ss({redraw:3})],Nf.prototype,"_mask",2);var _f=class extends ud{constructor(){super(...arguments),this.borderPath=new hd,this.isBeveled=!0,this.columnWidth=0,this.startAngle=0,this.endAngle=0,this.outerRadius=0,this.innerRadius=0,this.axisInnerRadius=0,this.axisOuterRadius=0,this.isRadiusAxisReversed=!1}getRotation(){const{startAngle:e,endAngle:t}=this;return Os(e+Hs(e,t)/2+Math.PI/2)}updatePath(){const{isBeveled:e}=this;e?this.updateBeveledPath():this.updateRectangularPath(),this.checkPathDirty()}updateRectangularPath(){const{columnWidth:e,innerRadius:t,outerRadius:i,path:n}=this,s=-e/2,r=e/2,o=-i,a=-t,l=this.getRotation(),c=[[s,a],[s,o],[r,o],[r,a],[s,a]].map(([e,t])=>Of(e,t,l));n.clear(!0),n.moveTo(c[0].x,c[0].y),n.lineTo(c[1].x,c[1].y),n.lineTo(c[2].x,c[2].y),n.lineTo(c[3].x,c[3].y),n.lineTo(c[0].x,c[0].y),n.closePath()}updateBeveledPath(){const{columnWidth:e,path:t,outerRadius:i,innerRadius:n,axisInnerRadius:s,axisOuterRadius:r,isRadiusAxisReversed:o}=this,a=Kn(n,s),l=Math.asin(e/2/n),c=this.getRotation(),h=(e,t)=>Of(e,t,c),d=(e,t)=>Math.sqrt(f(e,2)+f(t,2)),u=(e,t)=>t>e?0:Math.sqrt(f(e,2)-f(t,2)),p=(e,t,i)=>i?e<t:e>t,g=a&&!isNaN(l)&&l<Math.PI/6;let m=-e/2,v=e/2;const y=-i,C=-n*(g?Math.cos(l):1),b=p(r,d(n,e/2),!o);if(b){const e=u(r,n);m=-e,v=e}t.clear(!0);const S=h(m,C);t.moveTo(S.x,S.y);const w=Kn(n,i),x=p(r,d(i,e/2),!o);if(w&&g)t.arc(0,0,n,Os(-l-Math.PI/2)+c,Os(l-Math.PI/2)+c,!1);else if(x){const n=-u(r,e/2),s=u(r,i);if(!b){const e=h(m,n);t.lineTo(e.x,e.y)}if(t.arc(0,0,r,Math.atan2(n,m)+c,Math.atan2(y,-s)+c,!1),!Kn(s,0)){const e=h(s,y);t.lineTo(e.x,e.y)}t.arc(0,0,r,Math.atan2(y,s)+c,Math.atan2(n,v)+c,!1)}else{const e=h(m,y),i=h(v,y);t.lineTo(e.x,e.y),t.lineTo(i.x,i.y)}const E=h(v,C);if(t.lineTo(E.x,E.y),g)t.arc(0,0,n,Os(l-Math.PI/2)+c,Os(-l-Math.PI/2)+c,!0);else{const e=h(m,C);t.lineTo(e.x,e.y)}t.closePath()}};function Ff(e,t,i,n,s){const r=Hs(e,t),o=r*(1-n)/2;if(e+=o,t-=o,r<.001)return 2*i*s;if(r>=2*Math.PI){const i=e+r/2;e=i-Math.PI,t=i+Math.PI}const a=i*Math.cos(e),l=i*Math.sin(e),c=i*Math.cos(t),h=i*Math.sin(t),d=Math.floor(Math.sqrt(f(a-c,2)+f(l-h,2))),u=2*i*s;return Math.max(1,Math.min(u,d))}_f.className="RadialColumnShape",S([dd()],_f.prototype,"isBeveled",2),S([dd()],_f.prototype,"columnWidth",2),S([dd()],_f.prototype,"startAngle",2),S([dd()],_f.prototype,"endAngle",2),S([dd()],_f.prototype,"outerRadius",2),S([dd()],_f.prototype,"innerRadius",2),S([dd()],_f.prototype,"axisInnerRadius",2),S([dd()],_f.prototype,"axisOuterRadius",2),S([dd()],_f.prototype,"isRadiusAxisReversed",2);var Gf=class extends hs{constructor(e){super(),this.x=0,this.y=0,this.width=0,this.height=0,this.opacity=1,this.sourceImage=e}render(e){const{ctx:t,forceRender:i,stats:n}=e;if(0===this.dirty&&!i)return void(n&&n.nodesSkipped++);this.computeTransformMatrix(),this.matrix.toContext(t);const s=this.sourceImage;t.globalAlpha=this.opacity,t.drawImage(s,0,0,s.width,s.height,this.x,this.y,this.width,this.height),super.render(e)}};S([ss({redraw:3})],Gf.prototype,"x",2),S([ss({redraw:3})],Gf.prototype,"y",2),S([ss({redraw:3})],Gf.prototype,"width",2),S([ss({redraw:3})],Gf.prototype,"height",2),S([ss({redraw:3})],Gf.prototype,"opacity",2);var Vf=v(v({},_n),fa),Bf={};b(Bf,{CARTESIAN_AXIS_TYPE:()=>Nt,ChartTheme:()=>Ci,DEFAULT_ANNOTATION_BACKGROUND_FILL:()=>ui,DEFAULT_ANNOTATION_HANDLE_FILL:()=>pi,DEFAULT_ANNOTATION_STROKE:()=>di,DEFAULT_AXIS_GRID_COLOUR:()=>Zt,DEFAULT_AXIS_LINE_COLOUR:()=>Qt,DEFAULT_BACKGROUND_COLOUR:()=>ei,DEFAULT_COLOURS:()=>ii,DEFAULT_CROSS_LINES_COLOUR:()=>Jt,DEFAULT_DIVERGING_SERIES_COLOUR_RANGE:()=>li,DEFAULT_FONT_FAMILY:()=>Kt,DEFAULT_HIERARCHY_FILLS:()=>ci,DEFAULT_HIERARCHY_STROKES:()=>hi,DEFAULT_INSIDE_SERIES_LABEL_COLOUR:()=>qt,DEFAULT_INVERTED_LABEL_COLOUR:()=>Yt,DEFAULT_LABEL_COLOUR:()=>$t,DEFAULT_MUTED_LABEL_COLOUR:()=>Xt,DEFAULT_POLAR_SERIES_STROKE:()=>ai,DEFAULT_SHADOW_COLOUR:()=>ti,DEFAULT_WATERFALL_SERIES_CONNECTOR_LINE_STROKE:()=>oi,DEFAULT_WATERFALL_SERIES_NEGATIVE_COLOURS:()=>si,DEFAULT_WATERFALL_SERIES_POSITIVE_COLOURS:()=>ni,DEFAULT_WATERFALL_SERIES_TOTAL_COLOURS:()=>ri,EXTENDS_AXES_DEFAULTS:()=>Bt,EXTENDS_AXES_GRID_LINE_DEFAULTS:()=>Ut,EXTENDS_AXES_LINE_DEFAULTS:()=>Ht,EXTENDS_AXES_TICK_DEFAULTS:()=>zt,EXTENDS_CARTESIAN_MARKER_DEFAULTS:()=>jt,EXTENDS_SERIES_DEFAULTS:()=>Wt,FONT_SIZE:()=>Lt,FONT_WEIGHT:()=>kt,IS_DARK_THEME:()=>Vt,POLAR_AXIS_SHAPE:()=>_t,POLAR_AXIS_TYPE:()=>Ot,POSITION:()=>Pt,getChartTheme:()=>ln,markerPaletteFactory:()=>ku,singleSeriesPaletteFactory:()=>Lu,themes:()=>Hf});var Hf=Qe(an,e=>null==e?void 0:e()),zf={};b(zf,{BandScale:()=>js,ColorScale:()=>qp,ContinuousScale:()=>Xr,Invalidating:()=>Us,LinearScale:()=>Zd,OrdinalTimeScale:()=>Co,TimeScale:()=>vo});var Uf={};function Wf(e,t){const i={};if(Array.isArray(t))for(let n=0;n<e.length;n++)i[`${e[n]}`]=t[n];else for(let n=0;n<e.length;n++)i[`${e[n]}`]=t;return i}b(Uf,{Color:()=>gs,Logger:()=>O,Padding:()=>Ql,angleBetween:()=>Hs,areArrayItemsStrictlyEqual:()=>ja,areArrayNumbersEqual:()=>Ka,bifurcate:()=>vn,checkDatum:()=>Yo,clamp:()=>zn,clampArray:()=>Un,countFractionDigits:()=>Zn,createId:()=>Vn,deepClone:()=>xt,displacePointFromVector:()=>zs,extent:()=>cn,findMinMax:()=>Wn,findRangeExtent:()=>jn,isBetweenAngles:()=>Gs,isContinuous:()=>$o,isDate:()=>_e,isDenseInterval:()=>fo,isEqual:()=>Kn,isNegative:()=>$n,isNumber:()=>We,isNumberEqual:()=>Kn,isNumberObject:()=>Ko,isString:()=>ze,isStringObject:()=>jo,jsonApply:()=>At,jsonDiff:()=>wt,jsonWalk:()=>Mt,mod:()=>Xn,normalisedExtent:()=>hn,normalisedExtentWithMetadata:()=>dn,normalizeAngle180:()=>Fs,normalizeAngle360:()=>Os,normalizeAngle360Inclusive:()=>_s,range:()=>go,resetIds:()=>Gn,round:()=>Yn,sanitizeHtml:()=>Ou,setAttribute:()=>Qa,shallowClone:()=>Et,tickFormat:()=>ka,tickStep:()=>po,ticks:()=>ho,toDegrees:()=>Bs,toFixed:()=>qn,toRadians:()=>Vs,transformIntegratedCategoryValue:()=>qo,zipObject:()=>Wf});var jf={};function Kf({defs:e,values:t,xAxis:i,yAxis:n}){if(!i||!n)throw new Error("Axes must be defined");const s={};for(const[r,{def:o}]of e)if(Object.hasOwn(t,r)){const{scale:e}="key"===o.type?i:n;s[r]=Math.round(e.convert(t[r]))}return s}b(jf,{AND:()=>qs,ARRAY:()=>lr,ARRAY_OF:()=>cr,AbstractBarSeries:()=>kp,AbstractBarSeriesProperties:()=>Lp,ActionOnSet:()=>Xa,Animation:()=>Is,AnimationManager:()=>yc,AreaSeriesTag:()=>wp,Axis:()=>xl,AxisLabel:()=>dl,AxisTick:()=>jr,BOOLEAN:()=>Js,BOOLEAN_ARRAY:()=>yr,Background:()=>cu,BackgroundModule:()=>hu,BaseModuleInstance:()=>we,BaseProperties:()=>yt,COLOR_STRING:()=>mr,COLOR_STRING_ARRAY:()=>vr,CartesianAxis:()=>Al,CartesianSeries:()=>jd,CartesianSeriesNodeEvent:()=>Ud,CartesianSeriesProperties:()=>Wd,CategoryAxis:()=>Dl,CategoryAxisTick:()=>Tl,ChartAxisDirection:()=>Kr,ChartEventManager:()=>bc,ChartOptions:()=>kn,ChartUpdateType:()=>Hc,ContextMenuRegistry:()=>Sc,CursorManager:()=>xc,DATE:()=>pr,DATE_ARRAY:()=>Sr,DATE_OR_DATETIME_MS:()=>gr,DEFAULT_CARTESIAN_DIRECTION_KEYS:()=>Hd,DEFAULT_CARTESIAN_DIRECTION_NAMES:()=>zd,DEFAULT_TOOLTIP_CLASS:()=>el,DEFAULT_TOOLTIP_DARK_CLASS:()=>tl,DEGREE:()=>or,DIRECTION:()=>Pr,DataController:()=>eh,DataModel:()=>Qc,DataModelSeries:()=>Od,DataService:()=>sc,Default:()=>Ks,Deprecated:()=>Nn,DeprecatedAndRenamedTo:()=>On,EMPTY_TOOLTIP_CONTENT:()=>il,FONT_STYLE:()=>Tr,FONT_WEIGHT:()=>Dr,FUNCTION:()=>er,GREATER_THAN:()=>ur,GestureDetector:()=>Mc,GroupedCategoryAxis:()=>Vl,HierarchyNode:()=>Yf,HierarchySeries:()=>qf,HierarchySeriesProperties:()=>Xf,HighlightManager:()=>Ac,HighlightStyle:()=>Vd,INTERACTION_RANGE:()=>Or,InteractionManager:()=>mc,InteractionState:()=>gc,LABEL_PLACEMENT:()=>_r,LESS_THAN:()=>dr,LINE_CAP:()=>xr,LINE_DASH:()=>Mr,LINE_JOIN:()=>Er,Layers:()=>Wo,LayoutService:()=>Vc,LonLatBBox:()=>Zf,MARKER_SHAPE:()=>Hu,MATCHING_CROSSLINE_TYPE:()=>Xo,MAX_SPACING:()=>Vr,MIN_SPACING:()=>Gr,MercatorScale:()=>bf,Motion:()=>ms,NAN:()=>nr,NODE_UPDATE_STATE_TO_PHASE_MAPPING:()=>Rs,NUMBER:()=>ir,NUMBER_ARRAY:()=>Cr,NUMBER_OR_NAN:()=>ar,Navigator:()=>Iu,NavigatorModule:()=>Ru,OBJECT:()=>Zs,OBJECT_ARRAY:()=>wr,OR:()=>Xs,OVERFLOW_STRATEGY:()=>kr,ObserveChanges:()=>Za,PHASE_METADATA:()=>As,PHASE_ORDER:()=>Ms,PLACEMENT:()=>Nr,PLAIN_OBJECT:()=>Qs,POINTER_INTERACTION_TYPES:()=>cc,POSITION:()=>Ar,POSITIVE_NUMBER:()=>sr,PolarAxis:()=>uf,PolarSeries:()=>Ng,PropertiesArray:()=>Ct,ProxyOnWrite:()=>Ya,ProxyProperty:()=>$a,ProxyPropertyOnWrite:()=>qa,QUICK_TRANSITION:()=>.2,RATIO:()=>rr,RepeatType:()=>Ts,SKIP_JS_BUILTINS:()=>tt,SMALLEST_KEY_INTERVAL:()=>Ah,SORT_DOMAIN_GROUPS:()=>Th,STRING:()=>tr,STRING_ARRAY:()=>br,Series:()=>Zh,SeriesGroupingChangedEvent:()=>Xh,SeriesItemHighlightStyle:()=>_d,SeriesMarker:()=>zu,SeriesNodeEvent:()=>qh,SeriesNodePickMode:()=>Gh,SeriesProperties:()=>Bd,SeriesTooltip:()=>Wu,StateMachine:()=>va,TEXT_ALIGN:()=>Rr,TEXT_WRAP:()=>Ir,ToolbarManager:()=>_c,Tooltip:()=>ol,TooltipManager:()=>Gc,TooltipPosition:()=>rl,UNION:()=>Fr,UpdateService:()=>zc,VERTICAL_ALIGN:()=>Lr,Validate:()=>$s,ZoomManager:()=>nh,__FORCE_MODULE_DETECTION:()=>Qf,accumulateGroup:()=>Oh,accumulatedValue:()=>Eh,accumulativeValueProperty:()=>Kh,addHitTestersToQuadtree:()=>Ip,adjustLabelPlacement:()=>jp,allInStringUnion:()=>Cn,animationValidation:()=>kh,area:()=>xh,arraysEqual:()=>un,assignJsonApplyConstructedArray:()=>Yr,backfillPathPointData:()=>ip,basicContinuousCheckDatumValidation:()=>Vh,bifurcate:()=>vn,buildFormatter:()=>so,buildResetPathFn:()=>lp,calculateDefaultTimeTickFormat:()=>ao,calculatePlacement:()=>Ja,checkCrisp:()=>Fp,childrenIter:()=>Dp,circularSliceArray:()=>mn,clamp:()=>zn,clampArray:()=>Un,collapsedStartingBarPosition:()=>Vp,computeBarFocusBounds:()=>Up,computeMarkerFocusBounds:()=>Qu,computeSectorFocusBounds:()=>Pg,convertValuesToScaleByDefs:()=>Kf,countFractionDigits:()=>Zn,createDatumId:()=>Fh,createDeprecationWarning:()=>Pn,createElement:()=>En,dateToNumber:()=>ro,deconstructSelectionsOrNodes:()=>Ds,deepClone:()=>xt,deepMerge:()=>qe,defaultTimeTickFormat:()=>oo,determinePathStatus:()=>Cp,diff:()=>_h,downloadUrl:()=>Mn,enterpriseModule:()=>Se,extent:()=>cn,extractDecoratedProperties:()=>Le,findMinMax:()=>Wn,findQuadtreeMatch:()=>Rp,findRangeExtent:()=>jn,fixNumericExtent:()=>qc,fromToMotion:()=>Ls,getDocument:()=>wn,getMissCount:()=>Xc,getPath:()=>et,getRectConfig:()=>_p,getWindow:()=>xn,groupAccumulativeValueProperty:()=>Yh,groupAverage:()=>wh,groupBy:()=>fn,groupCount:()=>Sh,groupSum:()=>Ch,injectStyle:()=>An,isArray:()=>Pe,isBoolean:()=>Ne,isDate:()=>Oe,isDecoratedObject:()=>Ie,isDefined:()=>ke,isEnumKey:()=>Ke,isEnumValue:()=>$e,isEqual:()=>Kn,isFiniteNumber:()=>We,isFunction:()=>Ge,isHtmlElement:()=>je,isNegative:()=>$n,isNumber:()=>Ue,isObject:()=>Ve,isObjectLike:()=>Be,isPlainObject:()=>He,isProperties:()=>bt,isRegExp:()=>Fe,isString:()=>ze,isSymbol:()=>Ye,isValidDate:()=>_e,jsonApply:()=>At,jsonDiff:()=>wt,jsonWalk:()=>Mt,keyProperty:()=>Uh,listDecoratedProperties:()=>Re,mapIterable:()=>yn,mapValues:()=>Qe,markerFadeInAnimation:()=>Ku,markerPaletteFactory:()=>ku,markerScaleInAnimation:()=>$u,markerSwipeScaleInAnimation:()=>Yu,mergeArrayDefaults:()=>Ze,mergeDefaults:()=>Xe,midpointStartingBarPosition:()=>Bp,minMax:()=>Ju,mod:()=>Xn,moduleRegistry:()=>xe,normaliseGroupTo:()=>Ih,normalisePropertyTo:()=>Lh,normalisedExtent:()=>hn,normalisedExtentWithMetadata:()=>dn,pairCategoryData:()=>yp,pairContinuousData:()=>vp,partialAssign:()=>nt,pathFadeInAnimation:()=>op,pathFadeOutAnimation:()=>ap,pathSwipeInAnimation:()=>rp,pickByMatchingAngle:()=>kg,predicateWithMessage:()=>Br,prepareAreaPathAnimation:()=>Mp,prepareAxisAnimationContext:()=>gl,prepareAxisAnimationFunctions:()=>vl,prepareBarAnimationFunctions:()=>Hp,prepareLinePathAnimation:()=>Sp,prepareLinePathAnimationFns:()=>bp,prepareMarkerAnimation:()=>Zu,preparePieSeriesAnimationFunctions:()=>Rg,range:()=>bh,rangedValueProperty:()=>jh,renderPartialPath:()=>sp,resetAxisGroupFn:()=>yl,resetAxisLabelSelectionFn:()=>bl,resetAxisLineSelectionFn:()=>Sl,resetAxisSelectionFn:()=>Cl,resetBarSelectionsFn:()=>zp,resetIds:()=>Gn,resetLabelFn:()=>Gu,resetMarkerFn:()=>qu,resetMarkerPositionFn:()=>Xu,resetMotion:()=>ma,resetPieSelectionsFn:()=>Lg,round:()=>Yn,seriesLabelFadeInAnimation:()=>_u,seriesLabelFadeOutAnimation:()=>Fu,setDocument:()=>Tn,setPath:()=>it,setWindow:()=>Dn,shallowClone:()=>Et,singleSeriesPaletteFactory:()=>Lu,staticFromToMotion:()=>ks,stringify:()=>Ur,sum:()=>yh,sumValues:()=>vh,toArray:()=>pn,toFixed:()=>qn,toTooltipHtml:()=>sl,trailingAccumulatedValue:()=>Mh,trailingAccumulatedValueProperty:()=>$h,unique:()=>gn,updateClipPath:()=>cp,updateLabelNode:()=>Wp,updateRect:()=>Op,validateCrossLineValues:()=>Zo,valueProperty:()=>Wh,without:()=>Je});var $f=class e{constructor(e,t,i,n,s,r,o,a,l,c,h){this.series=e,this.index=t,this.datum=i,this.size=n,this.colorValue=s,this.fill=r,this.stroke=o,this.sumSize=a,this.depth=l,this.parent=c,this.children=h,this.midPoint={x:0,y:0}}contains(e){let t=e;for(;null!=t&&t.index>=this.index;){if(t===this)return!0;t=t.parent}return!1}walk(t,i=e.Walk.PreOrder){i===e.Walk.PreOrder&&t(this),this.children.forEach(e=>{e.walk(t,i)}),i===e.Walk.PostOrder&&t(this)}*[Symbol.iterator](){yield this;for(const e of this.children)yield*M(e)}};$f.Walk={PreOrder:0,PostOrder:1};var Yf=$f,qf=class extends Zh{constructor(e){super({moduleCtx:e,pickModes:[0],contentGroupVirtual:!1}),this.rootNode=new Yf(this,0,void 0,0,void 0,void 0,void 0,0,void 0,void 0,[]),this.colorDomain=[0,0],this.maxDepth=0,this.animationState=new va("empty",{empty:{update:{target:"ready",action:e=>this.animateEmptyUpdateReady(e)},reset:"empty",skip:"ready"},ready:{updateData:"waiting",clear:"clearing",highlight:e=>this.animateReadyHighlight(e),resize:e=>this.animateReadyResize(e),reset:"empty",skip:"ready"},waiting:{update:{target:"ready",action:e=>this.animateWaitingUpdateReady(e)},reset:"empty",skip:"ready"},clearing:{update:{target:"empty",action:e=>this.animateClearingUpdateEmpty(e)},reset:"empty",skip:"ready"}},()=>this.checkProcessedDataAnimatable())}resetAnimation(e){"initial"===e?this.animationState.transition("reset"):"ready"===e&&this.animationState.transition("skip")}processData(){return x(this,null,function*(){var e,t;const{childrenKey:i,sizeKey:n,colorKey:s,fills:r,strokes:o,colorRange:a}=this.properties;let l=0,c=0,h=1/0,d=-1/0;const u=new Array((null!=(t=null==(e=this.data)?void 0:e.length)?t:0)+1).fill(void 0),p=(e,t)=>{const r=(l+=1,l),o=null!=t.depth?t.depth+1:0,a=null!=i?e[i]:void 0,p=null==a||0===a.length;let f=null!=n?e[n]:void 0;f=Number.isFinite(f)?Math.max(f,0):p?1:0;const m=f;c=Math.max(c,o);const v=null!=s?e[s]:void 0;return"number"==typeof v&&(u[r]=v,h=Math.min(h,v),d=Math.max(d,v)),g(new Yf(this,r,e,f,v,void 0,void 0,m,o,t,[]),a)},g=(e,t)=>(null==t||t.forEach(t=>{const i=p(t,e);e.children.push(i),e.sumSize+=i.sumSize}),e),f=g(new Yf(this,0,void 0,0,void 0,void 0,void 0,0,void 0,void 0,[]),this.data),m=[h,d];let v;null!=a&&Number.isFinite(h)&&Number.isFinite(d)&&(v=new qp,v.domain=m,v.range=a,v.update()),f.children.forEach((e,t)=>{e.walk(e=>{let i;const n=u[e.index];null!=n&&(i=null==v?void 0:v.convert(n)),null!=i||(i=null==r?void 0:r[t%r.length]),e.fill=i,e.stroke=null==v?null==o?void 0:o[t%o.length]:"rgba(0, 0, 0, 0.2)"})}),this.rootNode=f,this.maxDepth=c,this.colorDomain=m})}update(e){return x(this,arguments,function*({seriesRect:e}){yield this.updateSelections(),yield this.updateNodes();const t=this.getAnimationData();this.checkResize(e)&&this.animationState.transition("resize",t),this.animationState.transition("update",t)})}resetAllAnimation(e){var t;const i=null==(t=this.animationResetFns)?void 0:t.datum;this.ctx.animationManager.stopByAnimationGroupId(this.id),null!=i&&ma(e.datumSelections,i)}animateEmptyUpdateReady(e){this.ctx.animationManager.skipCurrentBatch(),this.resetAllAnimation(e)}animateWaitingUpdateReady(e){this.ctx.animationManager.skipCurrentBatch(),this.resetAllAnimation(e)}animateReadyHighlight(e){var t;const i=null==(t=this.animationResetFns)?void 0:t.datum;null!=i&&ma([e],i)}animateReadyResize(e){this.resetAllAnimation(e)}animateClearingUpdateEmpty(e){this.ctx.animationManager.skipCurrentBatch(),this.resetAllAnimation(e)}animationTransitionClear(){this.animationState.transition("clear",this.getAnimationData())}getAnimationData(){return{datumSelections:[this.groupSelection]}}isProcessedDataAnimatable(){return!0}checkProcessedDataAnimatable(){this.isProcessedDataAnimatable()||this.ctx.animationManager.skipCurrentBatch()}getLabelData(){return[]}getSeriesDomain(){return[NaN,NaN]}getLegendData(e){const{colorKey:t,colorName:i,colorRange:n,visible:s}=this.properties;return"gradient"===e&&null!=t&&null!=n?[{legendType:"gradient",enabled:s,seriesId:this.id,colorName:i,colorRange:n,colorDomain:this.colorDomain}]:[]}getDatumIdFromData(e){return`${e.index}`}getDatumId(e){return this.getDatumIdFromData(e)}},Xf=class extends Bd{constructor(){super(...arguments),this.childrenKey="children",this.fills=Object.values(Ft),this.strokes=Object.values(Gt)}};S([$s(tr)],Xf.prototype,"childrenKey",2),S([$s(tr,{optional:!0})],Xf.prototype,"sizeKey",2),S([$s(tr,{optional:!0})],Xf.prototype,"colorKey",2),S([$s(tr,{optional:!0})],Xf.prototype,"colorName",2),S([$s(vr)],Xf.prototype,"fills",2),S([$s(vr)],Xf.prototype,"strokes",2),S([$s(vr,{optional:!0})],Xf.prototype,"colorRange",2);var Zf=class{constructor(e,t,i,n){this.lon0=e,this.lat0=t,this.lon1=i,this.lat1=n}merge(e){this.lon0=Math.min(this.lon0,e.lon0),this.lat0=Math.min(this.lat0,e.lat0),this.lon1=Math.max(this.lon1,e.lon1),this.lat1=Math.max(this.lat1,e.lat1)}},Qf=0,Jf=Object.defineProperty,em=Object.getOwnPropertyDescriptor,tm=Object.getOwnPropertyNames,im=Object.prototype.hasOwnProperty,nm=(e,t)=>{for(var i in t)Jf(e,i,{get:t[i],enumerable:!0})},sm=(e,t,i,n)=>{if(t&&"object"==typeof t||"function"==typeof t)for(let s of tm(t))im.call(e,s)||s===i||Jf(e,s,{get:()=>t[s],enumerable:!(n=em(t,s))||n.enumerable});return e},rm=(e,t,i)=>(sm(e,t,"default"),i&&sm(i,t,"default")),om=(e,t,i,n)=>{for(var s,r=n>1?void 0:n?em(t,i):t,o=e.length-1;o>=0;o--)(s=e[o])&&(r=(n?s(t,i,r):s(r))||r);return n&&r&&Jf(t,i,r),r},am={};nm(am,{ALWAYS_SYNC_GLOBAL_EVENTS:()=>s.Yx9,AbstractHeaderCellCtrl:()=>s.$Y_,AdvancedFilterModule:()=>cv,AgAbstractField:()=>s.JWk,AgAbstractLabel:()=>s.DKR,AgAutocomplete:()=>s.bB5,AgCheckbox:()=>s.Unm,AgDialog:()=>s.fNJ,AgGroupComponent:()=>s.Pk_,AgInputDateField:()=>s.RYS,AgInputNumberField:()=>s.SpC,AgInputRange:()=>s.ycK,AgInputTextArea:()=>s.vXh,AgInputTextField:()=>s.stt,AgMenuItemComponent:()=>s.yuY,AgMenuItemRenderer:()=>s.Y0b,AgMenuList:()=>s.i9O,AgMenuPanel:()=>s.qkt,AgPanel:()=>s.LT8,AgPickerField:()=>s.HHt,AgPromise:()=>s.oY$,AgPromiseStatus:()=>s.SEh,AgRadioButton:()=>s.OQA,AgRichSelect:()=>s.pNP,AgSelect:()=>s.Ju4,AgSlider:()=>s.YD7,AgStackComponentsRegistry:()=>s.yOL,AgToggleButton:()=>s.bLJ,AlignedGridsService:()=>s.TYQ,AnimateShowChangeCellRenderer:()=>s.YEH,AnimateSlideCellRenderer:()=>s.kOq,AnimationFrameService:()=>s.hK9,AutoScrollService:()=>s.MSA,AutoWidthCalculator:()=>s.Qgm,Autowired:()=>s.dsm,BarColumnLabelPlacement:()=>s.fnn,BaseComponentWrapper:()=>s.Cf3,Bean:()=>s.dR4,BeanStub:()=>s.XQb,Beans:()=>s.MDK,BodyDropPivotTarget:()=>s.R4L,BodyDropTarget:()=>s.LFT,CellComp:()=>s.ehA,CellCtrl:()=>s.wX9,CellNavigationService:()=>s.aBp,CellPositionUtils:()=>s.HM$,CellRangeType:()=>s.OnL,ChangedPath:()=>s.k$d,ChartMappings:()=>s.E1g,CheckboxCellEditor:()=>s.j19,CheckboxCellRenderer:()=>s.tj3,CheckboxSelectionComponent:()=>s.TJD,ClientSideRowModelSteps:()=>s.zOQ,ClipboardModule:()=>Fw,Column:()=>s.VPZ,ColumnApi:()=>s.jf3,ColumnFactory:()=>s.tbO,ColumnGroup:()=>s.ock,ColumnKeyCreator:()=>s.a1W,ColumnModel:()=>s.K02,ColumnsToolPanelModule:()=>EE,Component:()=>s.uAl,ComponentUtil:()=>s.kNx,Context:()=>s.obS,CssClassApplier:()=>s.PC7,CssClassManager:()=>s.hv8,CtrlsService:()=>s.GsR,DataTypeService:()=>s.gvq,DateCellEditor:()=>s.ofN,DateFilter:()=>s.ZvW,DateStringCellEditor:()=>s.tyx,DisplayedGroupCreator:()=>s.HDb,DragAndDropService:()=>s.WO_,DragService:()=>s.atK,DragSourceType:()=>s.qRA,EnterpriseCoreModule:()=>fm,Environment:()=>s.OH$,EventService:()=>s.USV,Events:()=>s.sVA,ExcelExportModule:()=>wA,ExcelFactoryMode:()=>s.FiP,ExpansionService:()=>s.pkb,ExpressionService:()=>s.k4Y,FilterManager:()=>s.qh$,FilterWrapperComp:()=>s.jfj,FiltersToolPanelModule:()=>BA,FloatingFilterMapper:()=>s.aq,FocusService:()=>s.c4$,GROUP_AUTO_COLUMN_ID:()=>s.JPk,Grid:()=>s.xA9,GridApi:()=>s.fAn,GridBodyComp:()=>s.IqQ,GridBodyCtrl:()=>s.m20,GridChartsModule:()=>Aw,GridComp:()=>s.qdQ,GridCoreCreator:()=>s.Ug$,GridCtrl:()=>s.s1r,GridHeaderComp:()=>s.zCV,GridHeaderCtrl:()=>s.vBt,GridOptionsService:()=>s.E3M,GroupCellRenderer:()=>s.H_$,GroupCellRendererCtrl:()=>s.ihO,GroupInstanceIdCreator:()=>s.uf_,HeaderCellCtrl:()=>s.Lhl,HeaderFilterCellComp:()=>s.rdE,HeaderFilterCellCtrl:()=>s.HiW,HeaderGroupCellCtrl:()=>s.Kb3,HeaderNavigationDirection:()=>s.BFs,HeaderNavigationService:()=>s.Ry8,HeaderPositionUtils:()=>s.CS5,HeaderRowComp:()=>s.Hyp,HeaderRowContainerComp:()=>s.U3q,HeaderRowContainerCtrl:()=>s.OPU,HeaderRowCtrl:()=>s.fRK,HeaderRowType:()=>s.YtK,HorizontalDirection:()=>s.Iu8,HorizontalResizeService:()=>s.QBm,KeyCode:()=>s.DDm,LargeTextCellEditor:()=>s.GPp,LayoutCssClasses:()=>s.gay,LicenseManager:()=>pm,LocaleService:()=>s.iH9,Logger:()=>s.VyI,LoggerFactory:()=>s.PLc,ManagedFocusFeature:()=>s.G21,MasterDetailModule:()=>ZA,MenuModule:()=>xT,MenuService:()=>s.$1h,ModuleNames:()=>s.zsj,ModuleRegistry:()=>s.syG,MouseEventService:()=>s.Rdv,MoveColumnFeature:()=>s.auO,MultiFilter:()=>_T,MultiFilterModule:()=>GT,NavigationService:()=>s.o_p,NumberCellEditor:()=>s.dcM,NumberFilter:()=>s.yLQ,NumberSequence:()=>s.RI_,Optional:()=>s.Xx1,PaginationProxy:()=>s.TOO,PillDragComp:()=>s.v26,PillDropZonePanel:()=>s.fNO,PinnedRowModel:()=>s.aP4,PivotDropZonePanel:()=>dx,PopupComponent:()=>s.yGC,PopupEditorWrapper:()=>s.zmE,PopupService:()=>s.OQU,PositionableFeature:()=>s.qyQ,PostConstruct:()=>s.o7C,PreConstruct:()=>s.fK3,PreDestroy:()=>s.yah,PrimaryColsPanel:()=>dE,PropertyKeys:()=>s.K42,ProvidedColumnGroup:()=>s.D45,ProvidedFilter:()=>s.Q5x,Qualifier:()=>s.Vf_,QuerySelector:()=>s.yLT,RangeSelectionModule:()=>Rv,RefSelector:()=>s.PIB,ResizeObserverService:()=>s.kem,RichSelectModule:()=>BT,RowAnimationCssClasses:()=>s.IGk,RowContainerComp:()=>s.B_v,RowContainerCtrl:()=>s.Rlq,RowContainerName:()=>s.lon,RowContainerType:()=>s.uvO,RowCtrl:()=>s.CJG,RowGroupDropZonePanel:()=>hx,RowGroupingModule:()=>vx,RowHighlightPosition:()=>s.m5s,RowNode:()=>s.TUE,RowNodeBlock:()=>s.iEP,RowNodeBlockLoader:()=>s.RRV,RowNodeSorter:()=>s.mE1,RowPositionUtils:()=>s.HLc,RowRenderer:()=>s.k7d,ScalarFilter:()=>s.TaT,ScrollVisibleService:()=>s.fVA,SelectCellEditor:()=>s.eAL,SelectableService:()=>s.K4S,SelectionHandleType:()=>s.LIk,ServerSideRowModelModule:()=>vD,ServerSideTransactionResultStatus:()=>s.a8A,SetFilter:()=>PD,SetFilterModule:()=>GD,SetLeftFeature:()=>s.uij,SideBarModule:()=>Hx,SimpleFilter:()=>s.PJL,SortController:()=>s.xSC,SortIndicatorComp:()=>s.pE7,SparklinesModule:()=>jI,StandardMenuFactory:()=>s.Pmj,StatusBarModule:()=>nR,StylingService:()=>s.EJF,TabGuardClassNames:()=>s.pA9,TabGuardComp:()=>s.aJZ,TabGuardCtrl:()=>s.Udn,TabbedLayout:()=>s.LfH,TextCellEditor:()=>s.zIT,TextFilter:()=>s.U$F,TextFloatingFilter:()=>s.U_L,Timer:()=>s.M4G,ToolPanelColDefService:()=>Vx,TooltipFeature:()=>s.CvR,TooltipStateManager:()=>s.mSN,TouchListener:()=>s.MVO,UserComponentFactory:()=>s.xMA,UserComponentRegistry:()=>s.utH,ValueCache:()=>s.YHi,ValueService:()=>s.bBw,ValuesDropZonePanel:()=>yx,VanillaFrameworkOverrides:()=>s.pow,VerticalDirection:()=>s.mqe,ViewportRowModelModule:()=>lR,VirtualList:()=>s.wjn,VirtualListDragFeature:()=>s.ia$,_:()=>s._,__FORCE_MODULE_DETECTION_AG_GRID_CORE_EXT:()=>Tw,agCharts:()=>Dw,createGrid:()=>s.Dvw,exportMultipleSheetsAsExcel:()=>bA,getMultipleSheetsAsExcel:()=>CA,getRowContainerTypeForName:()=>s.CSq,provideGlobalGridOptions:()=>s.Nat});var lm=class{constructor(){this.ieCompatibility=!1}init(){this.ieCompatibility="5d41402abc4b2a76b9719d911017c592"!=this.md5("hello")}md5cycle(e,t){let i=e[0],n=e[1],s=e[2],r=e[3];i=this.ff(i,n,s,r,t[0],7,-680876936),r=this.ff(r,i,n,s,t[1],12,-389564586),s=this.ff(s,r,i,n,t[2],17,606105819),n=this.ff(n,s,r,i,t[3],22,-1044525330),i=this.ff(i,n,s,r,t[4],7,-176418897),r=this.ff(r,i,n,s,t[5],12,1200080426),s=this.ff(s,r,i,n,t[6],17,-1473231341),n=this.ff(n,s,r,i,t[7],22,-45705983),i=this.ff(i,n,s,r,t[8],7,1770035416),r=this.ff(r,i,n,s,t[9],12,-1958414417),s=this.ff(s,r,i,n,t[10],17,-42063),n=this.ff(n,s,r,i,t[11],22,-1990404162),i=this.ff(i,n,s,r,t[12],7,1804603682),r=this.ff(r,i,n,s,t[13],12,-40341101),s=this.ff(s,r,i,n,t[14],17,-1502002290),n=this.ff(n,s,r,i,t[15],22,1236535329),i=this.gg(i,n,s,r,t[1],5,-165796510),r=this.gg(r,i,n,s,t[6],9,-1069501632),s=this.gg(s,r,i,n,t[11],14,643717713),n=this.gg(n,s,r,i,t[0],20,-373897302),i=this.gg(i,n,s,r,t[5],5,-701558691),r=this.gg(r,i,n,s,t[10],9,38016083),s=this.gg(s,r,i,n,t[15],14,-660478335),n=this.gg(n,s,r,i,t[4],20,-405537848),i=this.gg(i,n,s,r,t[9],5,568446438),r=this.gg(r,i,n,s,t[14],9,-1019803690),s=this.gg(s,r,i,n,t[3],14,-187363961),n=this.gg(n,s,r,i,t[8],20,1163531501),i=this.gg(i,n,s,r,t[13],5,-1444681467),r=this.gg(r,i,n,s,t[2],9,-51403784),s=this.gg(s,r,i,n,t[7],14,1735328473),n=this.gg(n,s,r,i,t[12],20,-1926607734),i=this.hh(i,n,s,r,t[5],4,-378558),r=this.hh(r,i,n,s,t[8],11,-2022574463),s=this.hh(s,r,i,n,t[11],16,1839030562),n=this.hh(n,s,r,i,t[14],23,-35309556),i=this.hh(i,n,s,r,t[1],4,-1530992060),r=this.hh(r,i,n,s,t[4],11,1272893353),s=this.hh(s,r,i,n,t[7],16,-155497632),n=this.hh(n,s,r,i,t[10],23,-1094730640),i=this.hh(i,n,s,r,t[13],4,681279174),r=this.hh(r,i,n,s,t[0],11,-358537222),s=this.hh(s,r,i,n,t[3],16,-722521979),n=this.hh(n,s,r,i,t[6],23,76029189),i=this.hh(i,n,s,r,t[9],4,-640364487),r=this.hh(r,i,n,s,t[12],11,-421815835),s=this.hh(s,r,i,n,t[15],16,530742520),n=this.hh(n,s,r,i,t[2],23,-995338651),i=this.ii(i,n,s,r,t[0],6,-198630844),r=this.ii(r,i,n,s,t[7],10,1126891415),s=this.ii(s,r,i,n,t[14],15,-1416354905),n=this.ii(n,s,r,i,t[5],21,-57434055),i=this.ii(i,n,s,r,t[12],6,1700485571),r=this.ii(r,i,n,s,t[3],10,-1894986606),s=this.ii(s,r,i,n,t[10],15,-1051523),n=this.ii(n,s,r,i,t[1],21,-2054922799),i=this.ii(i,n,s,r,t[8],6,1873313359),r=this.ii(r,i,n,s,t[15],10,-30611744),s=this.ii(s,r,i,n,t[6],15,-1560198380),n=this.ii(n,s,r,i,t[13],21,1309151649),i=this.ii(i,n,s,r,t[4],6,-145523070),r=this.ii(r,i,n,s,t[11],10,-1120210379),s=this.ii(s,r,i,n,t[2],15,718787259),n=this.ii(n,s,r,i,t[9],21,-343485551),e[0]=this.add32(i,e[0]),e[1]=this.add32(n,e[1]),e[2]=this.add32(s,e[2]),e[3]=this.add32(r,e[3])}cmn(e,t,i,n,s,r){return t=this.add32(this.add32(t,e),this.add32(n,r)),this.add32(t<<s|t>>>32-s,i)}ff(e,t,i,n,s,r,o){return this.cmn(t&i|~t&n,e,t,s,r,o)}gg(e,t,i,n,s,r,o){return this.cmn(t&n|i&~n,e,t,s,r,o)}hh(e,t,i,n,s,r,o){return this.cmn(t^i^n,e,t,s,r,o)}ii(e,t,i,n,s,r,o){return this.cmn(i^(t|~n),e,t,s,r,o)}md51(e){const t=e.length,i=[1732584193,-271733879,-1732584194,271733878];let n;for(n=64;n<=e.length;n+=64)this.md5cycle(i,this.md5blk(e.substring(n-64,n)));e=e.substring(n-64);const s=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];for(n=0;n<e.length;n++)s[n>>2]|=e.charCodeAt(n)<<(n%4<<3);if(s[n>>2]|=128<<(n%4<<3),n>55)for(this.md5cycle(i,s),n=0;n<16;n++)s[n]=0;return s[14]=8*t,this.md5cycle(i,s),i}md5blk(e){const t=[];for(let i=0;i<64;i+=4)t[i>>2]=e.charCodeAt(i)+(e.charCodeAt(i+1)<<8)+(e.charCodeAt(i+2)<<16)+(e.charCodeAt(i+3)<<24);return t}rhex(e){const t="0123456789abcdef".split("");let i="",n=0;for(;n<4;n++)i+=t[e>>8*n+4&15]+t[e>>8*n&15];return i}hex(e){for(let t=0;t<e.length;t++)e[t]=this.rhex(e[t]);return e.join("")}md5(e){return this.hex(this.md51(e))}add32(e,t){return this.ieCompatibility?this.add32Compat(e,t):this.add32Std(e,t)}add32Std(e,t){return e+t&4294967295}add32Compat(e,t){const i=(65535&e)+(65535&t);return(e>>16)+(t>>16)+(i>>16)<<16|65535&i}};function cm(e){return null==e||0===e.length}var hm={"01":"GRID","02":"CHARTS","0102":"BOTH"},dm=class e{constructor(e){this.watermarkMessage=void 0,this.totalMessageLength=124,this.document=e,this.md5=new lm,this.md5.init()}validateLicense(){const t=this.getLicenseDetails(e.licenseKey),i=`AG Grid ${"BOTH"===t.currentLicenseType?"and AG Charts ":""}Enterprise`,n=void 0===t.suppliedLicenseType?"":`AG ${"BOTH"===t.suppliedLicenseType?"Grid and AG Charts":"GRID"===t.suppliedLicenseType?"Grid":"Charts"} Enterprise`;if(t.missing)this.isWebsiteUrl()&&!this.isForceWatermark()||this.outputMissingLicenseKey(i);else if(t.expired){const s=e.getGridReleaseDate(),r=e.formatDate(s);this.outputExpiredKey(t.expiry,r,i,n)}else t.valid?t.isTrial&&t.trialExpired&&this.outputExpiredTrialKey(t.expiry,i,n):this.outputInvalidLicenseKey(!!t.incorrectLicenseType,i,n)}static extractExpiry(t){const i=t.substring(t.lastIndexOf("_")+1,t.length);return new Date(parseInt(e.decode(i),10))}static extractLicenseComponents(t){let i=t.replace(/[\u200B-\u200D\uFEFF]/g,"");if(i=i.replace(/\r?\n|\r/g,""),t.length<=32)return{md5:null,license:t,version:null,isTrial:null};const n=i.length-32,s=i.substring(n),r=i.substring(0,n),[o,a,l]=e.extractBracketedInformation(i);return{md5:s,license:r,version:o,isTrial:a,type:l}}getLicenseDetails(t){const i=e.chartsLicenseManager?"BOTH":"GRID";if(cm(t))return{licenseKey:t,valid:!1,missing:!0,currentLicenseType:i};const n=e.getGridReleaseDate(),{md5:s,license:r,version:o,isTrial:a,type:l}=e.extractLicenseComponents(t);let c,h,d,u=s===this.md5.md5(r)&&-1===t.indexOf("For_Trialing_ag-Grid_Only"),p=null,g=!1;function f(){c=p<new Date,h=void 0}if(u&&(p=e.extractExpiry(r),u=!isNaN(p.getTime()),u))switch(h=n>p,o){case"legacy":case"2":a&&f();break;case"3":cm(l)?u=!1:(d=l,l!==hm["01"]&&l!==hm["0102"]||"BOTH"===i&&"BOTH"!==d?(u=!1,g=!0):a&&f())}return u?{licenseKey:t,valid:u,expiry:e.formatDate(p),expired:h,version:o,isTrial:a,trialExpired:c,incorrectLicenseType:g,currentLicenseType:i,suppliedLicenseType:d}:{licenseKey:t,valid:u,incorrectLicenseType:g,currentLicenseType:i,suppliedLicenseType:d}}isDisplayWatermark(){return this.isForceWatermark()||!this.isLocalhost()&&!this.isWebsiteUrl()&&!cm(this.watermarkMessage)}getWatermarkMessage(){return this.watermarkMessage||""}getHostname(){const e=(this.document.defaultView||window).location,{hostname:t=""}=e;return t}isForceWatermark(){const e=(this.document.defaultView||window).location,{pathname:t}=e;return!!t&&-1!==t.indexOf("forceWatermark")}isWebsiteUrl(){return null!==this.getHostname().match(/^((?:[\w-]+\.)?ag-grid\.com)$/)}isLocalhost(){return null!==this.getHostname().match(/^(?:127\.0\.0\.1|localhost)$/)}static formatDate(e){const t=e.getDate(),i=e.getMonth(),n=e.getFullYear();return t+" "+["January","February","March","April","May","June","July","August","September","October","November","December"][i]+" "+n}static getGridReleaseDate(){return new Date(parseInt(e.decode(e.RELEASE_INFORMATION),10))}static decode(t){const i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";let n,s,r,o,a,l,c,h="",d=0;const u=t.replace(/[^A-Za-z0-9+/=]/g,"");for(;d<u.length;)o=i.indexOf(u.charAt(d++)),a=i.indexOf(u.charAt(d++)),l=i.indexOf(u.charAt(d++)),c=i.indexOf(u.charAt(d++)),n=o<<2|a>>4,s=(15&a)<<4|l>>2,r=(3&l)<<6|c,h+=String.fromCharCode(n),64!=l&&(h+=String.fromCharCode(s)),64!=c&&(h+=String.fromCharCode(r));return h=e.utf8_decode(h),h}static utf8_decode(e){e=e.replace(/rn/g,"n");let t="";for(let i=0;i<e.length;i++){const n=e.charCodeAt(i);n<128?t+=String.fromCharCode(n):n>127&&n<2048?(t+=String.fromCharCode(n>>6|192),t+=String.fromCharCode(63&n|128)):(t+=String.fromCharCode(n>>12|224),t+=String.fromCharCode(n>>6&63|128),t+=String.fromCharCode(63&n|128))}return t}static setChartsLicenseManager(e){this.chartsLicenseManager=e}static setLicenseKey(e){this.licenseKey=e,this.chartsLicenseManager&&this.chartsLicenseManager.setLicenseKey(e,!0)}static extractBracketedInformation(e){if(!e.includes("["))return["legacy",!1,void 0];const t=e.match(/\[(.*?)\]/g).map(e=>e.replace("[","").replace("]",""));if(!t||0===t.length)return["legacy",!1,void 0];const i=1===t.filter(e=>"TRIAL"===e).length,n=t.filter(e=>0===e.indexOf("v"))[0];return[n?n.replace("v",""):"legacy",i,hm[t.filter(e=>hm[e])[0]]]}centerPadAndOutput(e){const t=this.totalMessageLength-e.length;console.error(e.padStart(t/2+e.length,"*").padEnd(this.totalMessageLength,"*"))}padAndOutput(e,t="*",i=""){console.error(e.padEnd(this.totalMessageLength-i.length,t)+i)}outputInvalidLicenseKey(e,t,i){e?(this.centerPadAndOutput(""),this.centerPadAndOutput(` ${t} License `),this.centerPadAndOutput(" Incompatible License Key "),this.padAndOutput(`* Your license key is for ${i} only and does not cover you for ${t}.`," ","*"),this.padAndOutput("* Please contact info@ag-grid.com to obtain a combined license key."," ","*"),this.centerPadAndOutput(""),this.centerPadAndOutput("")):(this.centerPadAndOutput(""),this.centerPadAndOutput(` ${t} License `),this.centerPadAndOutput(" Invalid License Key "),this.padAndOutput("* Your license key is not valid - please contact info@ag-grid.com to obtain a valid license."," ","*"),this.centerPadAndOutput(""),this.centerPadAndOutput("")),this.watermarkMessage="Invalid License"}outputExpiredTrialKey(e,t,i){this.centerPadAndOutput(""),this.centerPadAndOutput(` ${t} License `),this.centerPadAndOutput(" Trial Period Expired. "),this.padAndOutput(`* Your trial only license for ${i} expired on ${e}.`," ","*"),this.padAndOutput("* Please email info@ag-grid.com to purchase a license."," ","*"),this.centerPadAndOutput(""),this.centerPadAndOutput(""),this.watermarkMessage="Trial Period Expired"}outputMissingLicenseKey(e){this.centerPadAndOutput(""),this.centerPadAndOutput(` ${e} License `),this.centerPadAndOutput(" License Key Not Found "),this.padAndOutput(`* All ${e} features are unlocked for trial.`," ","*"),this.padAndOutput("* If you want to hide the watermark please email info@ag-grid.com for a trial license key."," ","*"),this.centerPadAndOutput(""),this.centerPadAndOutput(""),this.watermarkMessage="For Trial Use Only"}outputExpiredKey(e,t,i,n){this.centerPadAndOutput(""),this.centerPadAndOutput(` ${i} License `),this.centerPadAndOutput(" Incompatible Software Version "),this.padAndOutput(`* Your license key works with versions of ${n} released before ${e}.`," ","*"),this.padAndOutput(`* The version you are trying to use was released on ${t}.`," ","*"),this.padAndOutput("* Please contact info@ag-grid.com to renew your license key."," ","*"),this.centerPadAndOutput(""),this.centerPadAndOutput(""),this.watermarkMessage="License Expired"}};dm.RELEASE_INFORMATION="MTcxNTc3NTcyODYxNg==";var um=dm,pm=class extends s.XQb{validateLicense(){this.licenseManager=new um(this.gos.getDocument()),this.licenseManager.validateLicense()}static getLicenseDetails(e){return new um(null).getLicenseDetails(e)}isDisplayWatermark(){return this.licenseManager.isDisplayWatermark()}getWatermarkMessage(){return this.licenseManager.getWatermarkMessage()}static setLicenseKey(e){um.setLicenseKey(e)}static setChartsLicenseManager(e){um.setChartsLicenseManager(e)}};om([s.fK3],pm.prototype,"validateLicense",1),pm=om([(0,s.dR4)("licenseManager")],pm);var gm=class extends s.uAl{constructor(){super('<div class="ag-watermark">\n                <div ref="eLicenseTextRef" class="ag-watermark-text"></div>\n            </div>')}postConstruct(){const e=this.shouldDisplayWatermark();this.setDisplayed(e),e&&(this.eLicenseTextRef.innerText=this.licenseManager.getWatermarkMessage(),window.setTimeout(()=>this.addCssClass("ag-opacity-zero"),0),window.setTimeout(()=>this.setDisplayed(!1),5e3))}shouldDisplayWatermark(){return this.licenseManager.isDisplayWatermark()}};om([(0,s.dsm)("licenseManager")],gm.prototype,"licenseManager",2),om([(0,s.PIB)("eLicenseTextRef")],gm.prototype,"eLicenseTextRef",2),om([s.o7C],gm.prototype,"postConstruct",1);var fm={version:"31.3.4",moduleName:s.zsj.EnterpriseCoreModule,beans:[pm],agStackComponents:[{componentName:"AgWatermark",componentClass:gm}]},mm=Object.defineProperty,vm=Object.defineProperties,ym=Object.getOwnPropertyDescriptor,Cm=Object.getOwnPropertyDescriptors,bm=Object.getOwnPropertySymbols,Sm=Object.prototype.hasOwnProperty,wm=Object.prototype.propertyIsEnumerable,xm=(e,t,i)=>t in e?mm(e,t,{enumerable:!0,configurable:!0,writable:!0,value:i}):e[t]=i,Em=(e,t)=>{for(var i in t||(t={}))Sm.call(t,i)&&xm(e,i,t[i]);if(bm)for(var i of bm(t))wm.call(t,i)&&xm(e,i,t[i]);return e},Mm=(e,t)=>vm(e,Cm(t)),Am=(e,t,i,n)=>{for(var s,r=n>1?void 0:n?ym(t,i):t,o=e.length-1;o>=0;o--)(s=e[o])&&(r=(n?s(t,i,r):s(r))||r);return n&&r&&mm(t,i,r),r},Tm=class extends s.uAl{constructor(e){super('\n            <div class="ag-advanced-filter-header" role="row">\n            </div>'),this.enabled=e}postConstruct(){this.setupAdvancedFilter(this.enabled),this.addDestroyFunc(()=>this.destroyBean(this.eAdvancedFilter)),this.addManagedListener(this.eventService,s.sVA.EVENT_GRID_COLUMNS_CHANGED,()=>this.onGridColumnsChanged()),this.addGuiEventListener("keydown",e=>this.onKeyDown(e)),this.addGuiEventListener("focusout",e=>{this.getFocusableElement().contains(e.relatedTarget)||this.focusService.clearAdvancedFilterColumn()})}getFocusableElement(){var e,t;return null!=(t=null==(e=this.eAdvancedFilter)?void 0:e.getGui())?t:this.getGui()}setEnabled(e){e!==this.enabled&&this.setupAdvancedFilter(e)}refresh(){var e;null==(e=this.eAdvancedFilter)||e.refresh()}getHeight(){return this.height}setInputDisabled(e){var t;null==(t=this.eAdvancedFilter)||t.setInputDisabled(e)}setupAdvancedFilter(e){const t=this.getGui();if(e){this.eAdvancedFilter=this.createBean(new Um);const e=this.eAdvancedFilter.getGui();this.eAdvancedFilter.addCssClass("ag-advanced-filter-header-cell"),this.height=this.columnModel.getFloatingFiltersHeight();const i=`${this.height}px`;t.style.height=i,t.style.minHeight=i,this.setAriaRowIndex(),s._.setAriaRole(e,"gridcell"),s._.setAriaColIndex(e,1),this.setAriaColumnCount(e),t.appendChild(e)}else s._.clearElement(t),this.destroyBean(this.eAdvancedFilter),this.height=0;s._.setDisplayed(t,e),this.enabled=e}setAriaColumnCount(e){s._.setAriaColSpan(e,this.columnModel.getAllGridColumns().length)}setAriaRowIndex(){s._.setAriaRowIndex(this.getGui(),this.headerNavigationService.getHeaderRowCount())}onGridColumnsChanged(){this.eAdvancedFilter&&(this.setAriaColumnCount(this.eAdvancedFilter.getGui()),this.setAriaRowIndex())}onKeyDown(e){switch(e.key){case s.DDm.ENTER:this.hasFocus()&&this.focusService.focusInto(this.getFocusableElement())&&e.preventDefault();break;case s.DDm.ESCAPE:this.hasFocus()||this.getFocusableElement().focus();break;case s.DDm.UP:this.navigateUpDown(!0,e);break;case s.DDm.DOWN:this.navigateUpDown(!1,e);break;case s.DDm.TAB:if(this.hasFocus())this.navigateLeftRight(e);else{const t=this.focusService.findNextFocusableElement(this.getFocusableElement(),null,e.shiftKey);t?(e.preventDefault(),t.focus()):this.navigateLeftRight(e)}}}navigateUpDown(e,t){this.hasFocus()&&this.focusService.focusNextFromAdvancedFilter(e)&&t.preventDefault()}navigateLeftRight(e){(e.shiftKey?this.focusService.focusLastHeader():this.focusService.focusNextFromAdvancedFilter(!1,!0))&&e.preventDefault()}hasFocus(){return this.gos.getActiveDomElement()===this.getFocusableElement()}};Am([(0,s.dsm)("columnModel")],Tm.prototype,"columnModel",2),Am([(0,s.dsm)("focusService")],Tm.prototype,"focusService",2),Am([(0,s.dsm)("headerNavigationService")],Tm.prototype,"headerNavigationService",2),Am([s.o7C],Tm.prototype,"postConstruct",1);var Dm=class extends s.pNP{constructor(e){super(Mm(Em({},e),{template:'\n                <div class="ag-picker-field" role="presentation">\n                    <div ref="eLabel"></div>\n                    <div ref="eWrapper" class="ag-wrapper ag-picker-collapsed">\n                        <div ref="eDisplayField" class="ag-picker-field-display"></div>\n                        <ag-input-text-field ref="eInput" class="ag-rich-select-field-input"></ag-input-text-field>\n                        <div ref="eIcon" class="ag-picker-field-icon" aria-hidden="true"></div>\n                    </div>\n                </div>'})),this.params=e}showPicker(){setTimeout(()=>super.showPicker())}hidePicker(){setTimeout(()=>super.hidePicker())}postConstruct(){super.postConstruct();const{wrapperClassName:e,ariaLabel:t}=this.params;s._.setDisplayed(this.eDisplayField,!1),e&&this.eWrapper.classList.add(e),s._.setAriaLabelledBy(this.eWrapper,""),s._.setAriaLabel(this.eWrapper,t)}onEnterKeyDown(e){s._.stopPropagationForAgGrid(e),this.isPickerDisplayed?super.onEnterKeyDown(e):(e.preventDefault(),this.showPicker())}},Im=class e extends s.XQb{constructor(e,t){super(),this.comp=e,this.virtualList=t}postConstruct(){this.createManagedBean(new s.ia$(this.comp,this.virtualList,{dragSourceType:s.qRA.AdvancedFilterBuilder,listItemDragStartEvent:e.EVENT_DRAG_STARTED,listItemDragEndEvent:e.EVENT_DRAG_ENDED,eventSource:this,getCurrentDragValue:e=>this.getCurrentDragValue(e),isMoveBlocked:()=>!1,getNumRows:e=>e.getNumItems(),moveItem:(e,t)=>this.moveItem(e,t)}))}getCurrentDragValue(e){return e.item}moveItem(e,t){this.comp.moveItem(e,t)}};Im.EVENT_DRAG_STARTED="advancedFilterBuilderDragStarted",Im.EVENT_DRAG_ENDED="advancedFilterBuilderDragEnded",Am([s.o7C],Im.prototype,"postConstruct",1);var Rm=Im,Lm=class extends s.XQb{constructor(e,t,i){super(),this.eGui=e,this.focusWrapper=t,this.eFocusableComp=i}postConstruct(){this.addManagedListener(this.eGui,"keydown",e=>{switch(e.key){case s.DDm.TAB:e.defaultPrevented||s._.stopPropagationForAgGrid(e);break;case s.DDm.UP:case s.DDm.DOWN:s._.stopPropagationForAgGrid(e);break;case s.DDm.ESCAPE:if(s._.isStopPropagationForAgGrid(e))return;this.eGui.contains(this.gos.getActiveDomElement())&&(e.preventDefault(),s._.stopPropagationForAgGrid(e),this.focusWrapper.focus())}}),this.addManagedListener(this.focusWrapper,"keydown",e=>{if(e.key===s.DDm.ENTER){if(s._.isStopPropagationForAgGrid(e))return;this.gos.getActiveDomElement()===this.focusWrapper&&(e.preventDefault(),s._.stopPropagationForAgGrid(e),this.eFocusableComp.getFocusableElement().focus())}}),this.addManagedListener(this.focusWrapper,"focusin",()=>{this.focusWrapper.classList.add("ag-advanced-filter-builder-virtual-list-item-highlight")}),this.addManagedListener(this.focusWrapper,"focusout",e=>{this.focusWrapper.contains(e.relatedTarget)||this.focusWrapper.classList.remove("ag-advanced-filter-builder-virtual-list-item-highlight")})}};function km(e,t){return{pickerAriaLabelKey:"ariaLabelAdvancedFilterBuilderAddField",pickerAriaLabelValue:"Advanced Filter Builder Add Field",pickerType:"ag-list",valueList:[{key:"condition",displayValue:e("advancedFilterBuilderAddCondition")},{key:"join",displayValue:e("advancedFilterBuilderAddJoin")}],valueFormatter:e=>{var t;return null==e?null:null!=(t=e.displayValue)?t:e.key},pickerIcon:"advancedFilterBuilderAdd",maxPickerWidth:`${null!=t?t:120}px`,wrapperClassName:"ag-advanced-filter-builder-item-button",ariaLabel:e("advancedFilterBuilderAddButtonTooltip")}}Am([s.o7C],Lm.prototype,"postConstruct",1);var Pm=class{};Pm.EVENT_ADDED="advancedFilterBuilderAdded",Pm.EVENT_MOVED="advancedFilterBuilderMoved",Pm.EVENT_REMOVED="advancedFilterBuilderRemoved",Pm.EVENT_VALUE_CHANGED="advancedFilterBuilderValueChanged",Pm.EVENT_VALID_CHANGED="advancedFilterBuilderValidChanged";var Nm=class extends s.uAl{constructor(){super('\n            <div class="ag-advanced-filter-builder-item-condition" role="presentation"></div>\n        '),this.validationMessage=null}init(e){const{item:t,createPill:i}=e;this.item=t,this.createPill=i,this.filterModel=t.filterModel,this.setupColumnCondition(this.filterModel),this.validate(),this.addDestroyFunc(()=>this.destroyBeans([this.eColumnPill,this.eOperatorPill,this.eOperandPill]))}getDragName(){return this.filterModel.colId?this.advancedFilterExpressionService.parseColumnFilterModel(this.filterModel):this.getDefaultColumnDisplayValue()}getAriaLabel(){return`${this.advancedFilterExpressionService.translate("ariaAdvancedFilterBuilderFilterItem")} ${this.getDragName()}`}getValidationMessage(){return this.validationMessage}getFocusableElement(){return this.eColumnPill.getFocusableElement()}setupColumnCondition(e){var t;const i=this.advancedFilterExpressionService.getColumnDetails(e.colId);this.baseCellDataType=i.baseCellDataType,this.column=i.column,this.numOperands=this.getNumOperands(this.getOperatorKey()),this.eColumnPill=this.createPill({key:this.getColumnKey(),displayValue:null!=(t=this.getColumnDisplayValue())?t:this.getDefaultColumnDisplayValue(),cssClass:"ag-advanced-filter-builder-column-pill",isSelect:!0,getEditorParams:()=>({values:this.advancedFilterExpressionService.getColumnAutocompleteEntries()}),update:e=>this.setColumnKey(e),pickerAriaLabelKey:"ariaLabelAdvancedFilterBuilderColumnSelectField",pickerAriaLabelValue:"Advanced Filter Builder Column Select Field",ariaLabel:this.advancedFilterExpressionService.translate("ariaAdvancedFilterBuilderColumn")}),this.getGui().appendChild(this.eColumnPill.getGui()),s._.exists(this.getColumnKey())&&(this.createOperatorPill(),this.hasOperand()&&this.createOperandPill())}createOperatorPill(){var e;this.eOperatorPill=this.createPill({key:this.getOperatorKey(),displayValue:null!=(e=this.getOperatorDisplayValue())?e:this.getDefaultOptionSelectValue(),cssClass:"ag-advanced-filter-builder-option-pill",isSelect:!0,getEditorParams:()=>({values:this.getOperatorAutocompleteEntries()}),update:e=>this.setOperatorKey(e),pickerAriaLabelKey:"ariaLabelAdvancedFilterBuilderOptionSelectField",pickerAriaLabelValue:"Advanced Filter Builder Option Select Field",ariaLabel:this.advancedFilterExpressionService.translate("ariaAdvancedFilterBuilderOption")}),this.eColumnPill.getGui().insertAdjacentElement("afterend",this.eOperatorPill.getGui())}createOperandPill(){var e;const t=null!=(e=this.getOperandDisplayValue())?e:"";this.eOperandPill=this.createPill({key:t,displayValue:t,baseCellDataType:this.baseCellDataType,cssClass:"ag-advanced-filter-builder-value-pill",isSelect:!1,update:e=>this.setOperand(e),ariaLabel:this.advancedFilterExpressionService.translate("ariaAdvancedFilterBuilderValue")}),this.getGui().appendChild(this.eOperandPill.getGui())}getColumnKey(){return this.filterModel.colId}getColumnDisplayValue(){return this.advancedFilterExpressionService.getColumnDisplayValue(this.filterModel)}getOperatorKey(){return this.filterModel.type}getOperatorDisplayValue(){return this.advancedFilterExpressionService.getOperatorDisplayValue(this.filterModel)}getOperandDisplayValue(){return this.advancedFilterExpressionService.getOperandDisplayValue(this.filterModel,!0)}hasOperand(){return this.numOperands>0}getOperatorAutocompleteEntries(){return this.column?this.advancedFilterExpressionService.getOperatorAutocompleteEntries(this.column,this.baseCellDataType):[]}setColumnKey(e){this.eOperatorPill||this.createOperatorPill();const t=this.advancedFilterExpressionService.getColumnDetails(e);this.column=t.column;const i=t.baseCellDataType;this.baseCellDataType!==i&&(this.baseCellDataType=i,this.setOperatorKey(void 0),this.eOperatorPill&&(s._.removeFromParent(this.eOperatorPill.getGui()),this.destroyBean(this.eOperatorPill),this.createOperatorPill()),this.validate()),this.filterModel.colId=e,this.filterModel.filterType=this.baseCellDataType}setOperatorKey(e){const t=this.getNumOperands(e);t!==this.numOperands&&(this.numOperands=t,0===t?this.destroyOperandPill():(this.createOperandPill(),"number"!==this.baseCellDataType&&this.setOperand(""))),this.filterModel.type=e,this.validate()}setOperand(e){var t;let i=e;this.column&&(i=null!=(t=this.advancedFilterExpressionService.getOperandModelValue(e,this.baseCellDataType,this.column))?t:""),this.filterModel.filter=i,this.validate()}getNumOperands(e){var t,i;return null!=(i=null==(t=this.advancedFilterExpressionService.getExpressionOperator(this.baseCellDataType,e))?void 0:t.numOperands)?i:0}destroyOperandPill(){delete this.filterModel.filter,this.getGui().removeChild(this.eOperandPill.getGui()),this.destroyBean(this.eOperandPill),this.eOperandPill=void 0}validate(){let e=null;s._.exists(this.getColumnKey())?s._.exists(this.getOperatorKey())?this.numOperands>0&&!s._.exists(this.getOperandDisplayValue())&&(e=this.advancedFilterExpressionService.translate("advancedFilterBuilderValidationEnterValue")):e=this.advancedFilterExpressionService.translate("advancedFilterBuilderValidationSelectOption"):e=this.advancedFilterExpressionService.translate("advancedFilterBuilderValidationSelectColumn"),this.item.valid=!e,e!==this.validationMessage&&(this.validationMessage=e,this.dispatchEvent({type:Pm.EVENT_VALID_CHANGED}))}getDefaultColumnDisplayValue(){return this.advancedFilterExpressionService.translate("advancedFilterBuilderSelectColumn")}getDefaultOptionSelectValue(){return this.advancedFilterExpressionService.translate("advancedFilterBuilderSelectOption")}};Am([(0,s.dsm)("advancedFilterExpressionService")],Nm.prototype,"advancedFilterExpressionService",2),Am([(0,s.dsm)("valueService")],Nm.prototype,"valueService",2);var Om=class extends s.uAl{constructor(e){super('\n            <div class="ag-advanced-filter-builder-pill-wrapper" role="presentation">\n                <div ref="ePill" class="ag-advanced-filter-builder-pill" role="button">\n                    <span ref="eLabel" class="ag-advanced-filter-builder-pill-display"></span>\n                </div>\n            </div>\n        '),this.params=e,this.value=e.value}postConstruct(){const{cssClass:e,ariaLabel:t}=this.params;this.ePill.classList.add(e),this.activateTabIndex([this.ePill]),this.eLabel.id=`${this.getCompId()}`,s._.setAriaDescribedBy(this.ePill,this.eLabel.id),s._.setAriaLabel(this.ePill,t),this.renderValue(),this.addManagedListener(this.ePill,"click",e=>{e.preventDefault(),this.showEditor()}),this.addManagedListener(this.ePill,"keydown",e=>{e.key===s.DDm.ENTER&&(e.preventDefault(),s._.stopPropagationForAgGrid(e),this.showEditor())}),this.addDestroyFunc(()=>this.destroyBean(this.eEditor))}getFocusableElement(){return this.ePill}showEditor(){if(this.eEditor)return;s._.setDisplayed(this.ePill,!1),this.eEditor=this.createEditorComp(this.params.type),this.eEditor.setValue(this.value);const e=this.eEditor.getGui();this.eEditor.addManagedListener(e,"keydown",e=>{switch(e.key){case s.DDm.ENTER:e.preventDefault(),s._.stopPropagationForAgGrid(e),this.updateValue(!0);break;case s.DDm.ESCAPE:e.preventDefault(),s._.stopPropagationForAgGrid(e),this.hideEditor(!0)}}),this.eEditor.addManagedListener(e,"focusout",()=>{this.updateValue(!1)}),this.getGui().appendChild(e),this.eEditor.getFocusableElement().focus()}createEditorComp(e){let t;switch(e){case"text":t=new s.stt;break;case"number":t=new s.SpC;break;case"date":t=new s.RYS}return this.createBean(t)}hideEditor(e){const{eEditor:t}=this;t&&(this.eEditor=void 0,this.getGui().removeChild(t.getGui()),this.destroyBean(t),s._.setDisplayed(this.ePill,!0),e&&this.ePill.focus())}renderValue(){let e;this.eLabel.classList.remove("ag-advanced-filter-builder-value-empty","ag-advanced-filter-builder-value-number","ag-advanced-filter-builder-value-text"),s._.exists(this.value)?"number"===this.params.type?(e=this.value,this.eLabel.classList.add("ag-advanced-filter-builder-value-number")):(e=`"${this.value}"`,this.eLabel.classList.add("ag-advanced-filter-builder-value-text")):(e=this.advancedFilterExpressionService.translate("advancedFilterBuilderEnterValue"),this.eLabel.classList.add("ag-advanced-filter-builder-value-empty")),this.eLabel.innerText=e}updateValue(e){var t;if(!this.eEditor)return;const i=null!=(t=this.eEditor.getValue())?t:"";this.dispatchEvent({type:s.sVA.EVENT_FIELD_VALUE_CHANGED,value:i}),this.value=i,this.renderValue(),this.hideEditor(e)}};Am([(0,s.PIB)("ePill")],Om.prototype,"ePill",2),Am([(0,s.PIB)("eLabel")],Om.prototype,"eLabel",2),Am([(0,s.dsm)("advancedFilterExpressionService")],Om.prototype,"advancedFilterExpressionService",2),Am([s.o7C],Om.prototype,"postConstruct",1);var _m=class extends s.uAl{constructor(){super('\n            <div class="ag-advanced-filter-builder-item-condition" role="presentation"></div>\n        ')}init(e){const{item:t,createPill:i}=e,n=t.filterModel;this.filterModel=n,this.ePill=i({key:n.type,displayValue:this.advancedFilterExpressionService.parseJoinOperator(n),cssClass:"ag-advanced-filter-builder-join-pill",isSelect:!0,getEditorParams:()=>({values:this.advancedFilterExpressionService.getJoinOperatorAutocompleteEntries()}),update:e=>n.type=e,pickerAriaLabelKey:"ariaLabelAdvancedFilterBuilderJoinSelectField",pickerAriaLabelValue:"Advanced Filter Builder Join Operator Select Field",ariaLabel:this.advancedFilterExpressionService.translate("ariaAdvancedFilterBuilderJoinOperator")}),this.getGui().appendChild(this.ePill.getGui()),this.addDestroyFunc(()=>this.destroyBean(this.ePill))}getDragName(){return this.advancedFilterExpressionService.parseJoinOperator(this.filterModel)}getAriaLabel(){return`${this.advancedFilterExpressionService.translate("ariaAdvancedFilterBuilderGroupItem")} ${this.getDragName()}`}getValidationMessage(){return null}getFocusableElement(){return this.ePill.getFocusableElement()}};Am([(0,s.dsm)("advancedFilterExpressionService")],_m.prototype,"advancedFilterExpressionService",2);var Fm=class extends s.pNP{constructor(e){super(Mm(Em({},e),{template:'\n                <div class="ag-picker-field ag-advanced-filter-builder-pill-wrapper" role="presentation">\n                    <div ref="eLabel"></div>\n                    <div ref="eWrapper" class="ag-wrapper ag-advanced-filter-builder-pill ag-picker-collapsed">\n                        <div ref="eDisplayField" class="ag-picker-field-display ag-advanced-filter-builder-pill-display"></div>\n                        <ag-input-text-field ref="eInput" class="ag-rich-select-field-input"></ag-input-text-field>\n                        <div ref="eIcon" class="ag-picker-field-icon" aria-hidden="true"></div>\n                    </div>\n                </div>'})),this.params=e}getFocusableElement(){return this.eWrapper}showPicker(){setTimeout(()=>super.showPicker())}hidePicker(){setTimeout(()=>super.hidePicker())}postConstruct(){super.postConstruct();const{wrapperClassName:e,ariaLabel:t}=this.params;this.eWrapper.classList.add(e),s._.setAriaLabelledBy(this.eWrapper,""),s._.setAriaLabel(this.eWrapper,t)}createPickerComponent(){var e;if(!this.values){const{values:t}=this.params.getEditorParams();this.values=t;const i=this.value.key,n=null!=(e=t.find(e=>e.key===i))?e:{key:i,displayValue:this.value.displayValue};this.value=n}return super.createPickerComponent()}onEnterKeyDown(e){s._.stopPropagationForAgGrid(e),this.isPickerDisplayed?super.onEnterKeyDown(e):(e.preventDefault(),this.showPicker())}},Gm=class extends s.aJZ{constructor(e,t,i){super('\n            <div class="ag-advanced-filter-builder-item-wrapper" role="presentation">\n                <div ref="eItem" class="ag-advanced-filter-builder-item" role="presentation">\n                    <div ref="eTreeLines" class="ag-advanced-filter-builder-item-tree-lines" aria-hidden="true"></div>\n                    <span ref="eDragHandle" class="ag-drag-handle" aria-hidden="true"></span>\n                    <span ref="eValidation" class="ag-advanced-filter-builder-item-button ag-advanced-filter-builder-invalid" aria-hidden="true"></span>\n                </div>\n                <div ref="eButtons" class="ag-advanced-filter-builder-item-buttons">\n                    <span ref="eMoveUpButton" class="ag-advanced-filter-builder-item-button" role="button"></span>\n                    <span ref="eMoveDownButton" class="ag-advanced-filter-builder-item-button" role="button"></span>\n                    <div ref="eAddButton" role="presentation"></div>\n                    <span ref="eRemoveButton" class="ag-advanced-filter-builder-item-button" role="button"></span>\n                </div>\n            </div>\n        '),this.item=e,this.dragFeature=t,this.focusWrapper=i,this.moveUpDisabled=!1,this.moveDownDisabled=!1}postConstruct(){const{filterModel:e,level:t,showMove:i}=this.item,n="join"===e.filterType;if(this.ePillWrapper=this.createManagedBean(n?new _m:new Nm),this.ePillWrapper.init({item:this.item,createPill:e=>this.createPill(e)}),this.eDragHandle.insertAdjacentElement("afterend",this.ePillWrapper.getGui()),0===t){const e=document.createElement("div");e.classList.add("ag-advanced-filter-builder-item-tree-line-vertical-bottom"),e.classList.add("ag-advanced-filter-builder-item-tree-line-root"),this.eTreeLines.appendChild(e),s._.setDisplayed(this.eDragHandle,!1),s._.setDisplayed(this.eButtons,!1),s._.setAriaExpanded(this.focusWrapper,!0)}else this.setupTreeLines(t),this.eDragHandle.appendChild(s._.createIconNoSpan("advancedFilterBuilderDrag",this.gos)),this.setupValidation(),this.setupMoveButtons(i),this.setupAddButton(),this.setupRemoveButton(),this.setupDragging(),this.updateAriaExpanded();s._.setAriaLevel(this.focusWrapper,t+1),this.initialiseTabGuard({}),this.createManagedBean(new Lm(this.getGui(),this.focusWrapper,this.ePillWrapper)),this.updateAriaLabel(),this.addManagedListener(this.ePillWrapper,Pm.EVENT_VALUE_CHANGED,()=>this.dispatchEvent({type:Pm.EVENT_VALUE_CHANGED})),this.addManagedListener(this.ePillWrapper,Pm.EVENT_VALID_CHANGED,()=>this.updateValidity())}setState(e){const{level:t}=this.item;if(0===t)return;const{showMove:i}=this.item,{disableMoveUp:n,disableMoveDown:r,treeLines:o,showStartTreeLine:a}=e;this.updateTreeLines(o,a),this.updateAriaExpanded(),i&&(this.moveUpDisabled=!!n,this.moveDownDisabled=!!r,this.eMoveUpButton.classList.toggle("ag-advanced-filter-builder-item-button-disabled",n),this.eMoveDownButton.classList.toggle("ag-advanced-filter-builder-item-button-disabled",r),s._.setAriaDisabled(this.eMoveUpButton,!!n),s._.setAriaDisabled(this.eMoveDownButton,!!r),this.moveUpTooltipFeature.refreshToolTip(),this.moveDownTooltipFeature.refreshToolTip())}focusMoveButton(e){(e?this.eMoveUpButton:this.eMoveDownButton).focus()}afterAdd(){this.ePillWrapper.getFocusableElement().focus()}setupTreeLines(e){for(let t=0;t<e;t++){const e=document.createElement("div");this.eTreeLines.appendChild(e)}}updateTreeLines(e,t){const i=e.length-1,{children:n}=this.eTreeLines;for(let t=0;t<i;t++){const i=n.item(t);i&&i.classList.toggle("ag-advanced-filter-builder-item-tree-line-vertical",!e[t])}const s=n.item(i);if(s){s.classList.add("ag-advanced-filter-builder-item-tree-line-horizontal");const t=e[i];s.classList.toggle("ag-advanced-filter-builder-item-tree-line-vertical-top",t),s.classList.toggle("ag-advanced-filter-builder-item-tree-line-vertical",!t)}this.eDragHandle.classList.toggle("ag-advanced-filter-builder-item-tree-line-vertical-bottom",t)}setupValidation(){this.eValidation.appendChild(s._.createIconNoSpan("advancedFilterBuilderInvalid",this.gos)),this.validationTooltipFeature=this.createManagedBean(new s.CvR({getGui:()=>this.eValidation,getLocation:()=>"advancedFilter",getTooltipValue:()=>this.ePillWrapper.getValidationMessage(),getTooltipShowDelayOverride:()=>1e3})),this.updateValidity()}setupAddButton(){var e;const t=km(e=>this.advancedFilterExpressionService.translate(e),null==(e=this.gos.get("advancedFilterBuilderParams"))?void 0:e.addSelectWidth),i=this.createManagedBean(new Dm(t));this.addManagedListener(i,s.sVA.EVENT_FIELD_PICKER_VALUE_SELECTED,({value:e})=>this.dispatchEvent({type:Pm.EVENT_ADDED,item:this.item,isJoin:"join"===e.key})),this.eAddButton.appendChild(i.getGui()),this.createManagedBean(new s.CvR({getGui:()=>this.eAddButton,getLocation:()=>"advancedFilter",getTooltipValue:()=>this.advancedFilterExpressionService.translate("advancedFilterBuilderAddButtonTooltip")}))}setupRemoveButton(){this.eRemoveButton.appendChild(s._.createIconNoSpan("advancedFilterBuilderRemove",this.gos)),this.addManagedListener(this.eRemoveButton,"click",()=>this.removeItem()),this.addManagedListener(this.eRemoveButton,"keydown",e=>{e.key===s.DDm.ENTER&&(e.preventDefault(),s._.stopPropagationForAgGrid(e),this.removeItem())}),this.createManagedBean(new s.CvR({getGui:()=>this.eRemoveButton,getLocation:()=>"advancedFilter",getTooltipValue:()=>this.advancedFilterExpressionService.translate("advancedFilterBuilderRemoveButtonTooltip")})),s._.setAriaLabel(this.eRemoveButton,this.advancedFilterExpressionService.translate("advancedFilterBuilderRemoveButtonTooltip")),this.activateTabIndex([this.eRemoveButton])}setupMoveButtons(e){e?(this.eMoveUpButton.appendChild(s._.createIconNoSpan("advancedFilterBuilderMoveUp",this.gos)),this.addManagedListener(this.eMoveUpButton,"click",()=>this.moveItem(!0)),this.addManagedListener(this.eMoveUpButton,"keydown",e=>{e.key===s.DDm.ENTER&&(e.preventDefault(),s._.stopPropagationForAgGrid(e),this.moveItem(!0))}),this.moveUpTooltipFeature=this.createManagedBean(new s.CvR({getGui:()=>this.eMoveUpButton,getLocation:()=>"advancedFilter",getTooltipValue:()=>this.moveUpDisabled?null:this.advancedFilterExpressionService.translate("advancedFilterBuilderMoveUpButtonTooltip")})),s._.setAriaLabel(this.eMoveUpButton,this.advancedFilterExpressionService.translate("advancedFilterBuilderMoveUpButtonTooltip")),this.eMoveDownButton.appendChild(s._.createIconNoSpan("advancedFilterBuilderMoveDown",this.gos)),this.addManagedListener(this.eMoveDownButton,"click",()=>this.moveItem(!1)),this.addManagedListener(this.eMoveDownButton,"keydown",e=>{e.key===s.DDm.ENTER&&(e.preventDefault(),s._.stopPropagationForAgGrid(e),this.moveItem(!1))}),this.moveDownTooltipFeature=this.createManagedBean(new s.CvR({getGui:()=>this.eMoveDownButton,getLocation:()=>"advancedFilter",getTooltipValue:()=>this.moveDownDisabled?null:this.advancedFilterExpressionService.translate("advancedFilterBuilderMoveDownButtonTooltip")})),s._.setAriaLabel(this.eMoveDownButton,this.advancedFilterExpressionService.translate("advancedFilterBuilderMoveDownButtonTooltip")),this.activateTabIndex([this.eMoveUpButton,this.eMoveDownButton])):(s._.setDisplayed(this.eMoveUpButton,!1),s._.setDisplayed(this.eMoveDownButton,!1))}updateValidity(){s._.setVisible(this.eValidation,!this.item.valid),this.validationTooltipFeature.refreshToolTip(),this.updateAriaLabel()}createPill(e){var t,i;const{key:n,displayValue:r,cssClass:o,update:a,ariaLabel:l}=e,c=e=>{null!=e&&(a(e),this.dispatchEvent({type:Pm.EVENT_VALUE_CHANGED}))};if(e.isSelect){const{getEditorParams:a,pickerAriaLabelKey:h,pickerAriaLabelValue:d}=e,u=this.gos.get("advancedFilterBuilderParams"),p=`${null!=(t=null==u?void 0:u.pillSelectMinWidth)?t:140}px`,g=`${null!=(i=null==u?void 0:u.pillSelectMaxWidth)?i:200}px`,f=this.createBean(new Fm({pickerAriaLabelKey:h,pickerAriaLabelValue:d,pickerType:"ag-list",value:{key:n,displayValue:r},valueFormatter:e=>{var t;return null==e?null:null!=(t=e.displayValue)?t:e.key},variableWidth:!0,minPickerWidth:p,maxPickerWidth:g,getEditorParams:a,wrapperClassName:o,ariaLabel:l}));return this.addManagedListener(f,s.sVA.EVENT_FIELD_PICKER_VALUE_SELECTED,({value:e})=>c(null==e?void 0:e.key)),f}{const t=this.createBean(new Om({value:r,cssClass:o,type:this.getInputType(e.baseCellDataType),ariaLabel:l}));return this.addManagedListener(t,s.sVA.EVENT_FIELD_VALUE_CHANGED,({value:e})=>c(e)),t}}getInputType(e){switch(e){case"text":case"object":case"boolean":return"text";case"number":return"number";case"date":case"dateString":return"date"}}setupDragging(){const e={type:s.qRA.AdvancedFilterBuilder,eElement:this.eDragHandle,dragItemName:()=>this.ePillWrapper.getDragName(),getDefaultIconName:()=>s.WO_.ICON_NOT_ALLOWED,getDragItem:()=>({}),onDragStarted:()=>this.dragFeature.dispatchEvent({type:Rm.EVENT_DRAG_STARTED,item:this.item}),onDragStopped:()=>this.dragFeature.dispatchEvent({type:Rm.EVENT_DRAG_ENDED})};this.dragAndDropService.addDragSource(e,!0),this.addDestroyFunc(()=>this.dragAndDropService.removeDragSource(e))}updateAriaLabel(){const e=this.ePillWrapper.getAriaLabel(),t=`${this.item.level+1}`,i=this.ePillWrapper.getValidationMessage();let n;n=i?this.advancedFilterExpressionService.translate("ariaAdvancedFilterBuilderItemValidation",[e,t,i]):this.advancedFilterExpressionService.translate("ariaAdvancedFilterBuilderItem",[e,t]),s._.setAriaLabel(this.focusWrapper,n)}updateAriaExpanded(){s._.removeAriaExpanded(this.focusWrapper);const{filterModel:e}=this.item;"join"===(null==e?void 0:e.filterType)&&e.conditions.length&&s._.setAriaExpanded(this.focusWrapper,!0)}removeItem(){this.dispatchEvent({type:Pm.EVENT_REMOVED,item:this.item})}moveItem(e){this.dispatchEvent({type:Pm.EVENT_MOVED,item:this.item,backwards:e})}};Am([(0,s.PIB)("eTreeLines")],Gm.prototype,"eTreeLines",2),Am([(0,s.PIB)("eDragHandle")],Gm.prototype,"eDragHandle",2),Am([(0,s.PIB)("eItem")],Gm.prototype,"eItem",2),Am([(0,s.PIB)("eButtons")],Gm.prototype,"eButtons",2),Am([(0,s.PIB)("eValidation")],Gm.prototype,"eValidation",2),Am([(0,s.PIB)("eMoveUpButton")],Gm.prototype,"eMoveUpButton",2),Am([(0,s.PIB)("eMoveDownButton")],Gm.prototype,"eMoveDownButton",2),Am([(0,s.PIB)("eAddButton")],Gm.prototype,"eAddButton",2),Am([(0,s.PIB)("eRemoveButton")],Gm.prototype,"eRemoveButton",2),Am([(0,s.dsm)("beans")],Gm.prototype,"beans",2),Am([(0,s.dsm)("dragAndDropService")],Gm.prototype,"dragAndDropService",2),Am([(0,s.dsm)("advancedFilterExpressionService")],Gm.prototype,"advancedFilterExpressionService",2),Am([s.o7C],Gm.prototype,"postConstruct",1);var Vm=class extends s.uAl{constructor(e,t){super('\n            <div class="ag-advanced-filter-builder-item-wrapper" role="presentation">\n                <div ref="eItem" class="ag-advanced-filter-builder-item" role="presentation">\n                    <div class="ag-advanced-filter-builder-item-tree-lines" aria-hidden="true">\n                        <div class="ag-advanced-filter-builder-item-tree-line-vertical-top ag-advanced-filter-builder-item-tree-line-horizontal"></div>\n                    </div>\n                </div>\n            </div>\n        '),this.item=e,this.focusWrapper=t}postConstruct(){var e;s._.setAriaLevel(this.focusWrapper,2);const t=km(e=>this.advancedFilterExpressionService.translate(e),null==(e=this.gos.get("advancedFilterBuilderParams"))?void 0:e.addSelectWidth),i=this.createManagedBean(new Dm(t));this.addManagedListener(i,s.sVA.EVENT_FIELD_PICKER_VALUE_SELECTED,({value:e})=>{this.dispatchEvent({type:Pm.EVENT_ADDED,item:this.item,isJoin:"join"===e.key})}),this.eItem.appendChild(i.getGui()),this.createManagedBean(new s.CvR({getGui:()=>i.getGui(),getLocation:()=>"advancedFilter",getTooltipValue:()=>this.advancedFilterExpressionService.translate("advancedFilterBuilderAddButtonTooltip")})),this.createManagedBean(new Lm(this.getGui(),this.focusWrapper,i)),s._.setAriaLabel(this.focusWrapper,this.advancedFilterExpressionService.translate("ariaAdvancedFilterBuilderItem",[this.advancedFilterExpressionService.translate("advancedFilterBuilderAddButtonTooltip"),`${this.item.level+1}`]))}afterAdd(){}};Am([(0,s.dsm)("beans")],Vm.prototype,"beans",2),Am([(0,s.dsm)("advancedFilterExpressionService")],Vm.prototype,"advancedFilterExpressionService",2),Am([(0,s.PIB)("eItem")],Vm.prototype,"eItem",2),Am([s.o7C],Vm.prototype,"postConstruct",1);var Bm=class extends s.uAl{constructor(){super('\n            <div role="presentation" class="ag-advanced-filter-builder" tabindex="-1">\n                <div role="presentation" class="ag-advanced-filter-builder-list" ref="eList"></div>\n                <div role="presentation" class="ag-advanced-filter-builder-button-panel">\n                    <button class="ag-button ag-standard-button ag-advanced-filter-builder-apply-button" ref="eApplyFilterButton"></button>\n                    <button class="ag-button ag-standard-button ag-advanced-filter-builder-cancel-button" ref="eCancelFilterButton"></button>\n                </div>\n            </div>'),this.validationMessage=null}postConstruct(){var e;const{showMoveButtons:t}=null!=(e=this.gos.get("advancedFilterBuilderParams"))?e:{};this.showMove=!!t,this.addManagedPropertyListener("advancedFilterBuilderParams",({currentValue:e})=>{this.showMove=!!(null==e?void 0:e.showMoveButtons),this.refreshList(!1)}),this.filterModel=this.setupFilterModel(),this.setupVirtualList(),this.dragFeature=this.createManagedBean(new Rm(this,this.virtualList)),this.setupButtons()}refresh(){let e=this.virtualList.getLastFocusedRow();this.setupFilterModel(),this.validateItems(),this.refreshList(!1),null!=e&&(this.virtualList.getComponentAt(e)||(e=0),this.virtualList.focusRow(e))}getNumItems(){return this.items.length}moveItem(e,t){t&&e&&this.moveItemToIndex(e,t.rowIndex,t.position)}afterGuiAttached(){this.virtualList.focusRow(0)}setupVirtualList(){this.virtualList=this.createManagedBean(new s.wjn({cssIdentifier:"advanced-filter-builder",ariaRole:"tree",listName:this.advancedFilterExpressionService.translate("ariaAdvancedFilterBuilderList")})),this.virtualList.setComponentCreator(this.createItemComponent.bind(this)),this.virtualList.setComponentUpdater(this.updateItemComponent.bind(this)),this.virtualList.setRowHeight(40),this.eList.appendChild(this.virtualList.getGui()),this.virtualList.setModel({getRowCount:()=>this.items.length,getRow:e=>this.items[e],areRowsEqual:(e,t)=>e===t}),this.buildList(),this.virtualList.refresh()}setupButtons(){this.eApplyFilterButton.innerText=this.advancedFilterExpressionService.translate("advancedFilterBuilderApply"),this.activateTabIndex([this.eApplyFilterButton]),this.addManagedListener(this.eApplyFilterButton,"click",()=>{this.advancedFilterService.setModel(this.filterModel),this.filterManager.onFilterChanged({source:"advancedFilter"}),this.close()}),this.validationTooltipFeature=this.createManagedBean(new s.CvR({getGui:()=>this.eApplyFilterButton,getLocation:()=>"advancedFilter",getTooltipValue:()=>this.validationMessage,getTooltipShowDelayOverride:()=>1e3})),this.validate(),this.addManagedListener(this.eApplyFilterButton,"mouseenter",()=>this.addOrRemoveCssClass("ag-advanced-filter-builder-validation",!0)),this.addManagedListener(this.eApplyFilterButton,"mouseleave",()=>this.addOrRemoveCssClass("ag-advanced-filter-builder-validation",!1)),this.eCancelFilterButton.innerText=this.advancedFilterExpressionService.translate("advancedFilterBuilderCancel"),this.activateTabIndex([this.eCancelFilterButton]),this.addManagedListener(this.eCancelFilterButton,"click",()=>this.close())}removeItemFromParent(e){const t=e.parent.conditions.indexOf(e.filterModel);return e.parent.conditions.splice(t,1),t}moveItemToIndex(e,t,i){var n;const s=this.items[t],r="join"===(null==(n=s.filterModel)?void 0:n.filterType)&&"bottom"===i,o=r?s.filterModel:s.parent;if(!o)return;if(this.isChildOrSelf(o,e.filterModel)||s===e)return;let a;this.removeItemFromParent(e),r?a=0:(a=o.conditions.indexOf(s.filterModel),-1===a?a=o.conditions.length:"bottom"===i&&(a+=1)),o.conditions.splice(a,0,e.filterModel),this.refreshList(!1)}isChildOrSelf(e,t){return e===t||"join"===t.filterType&&t.conditions.some(t=>this.isChildOrSelf(e,t))}setupFilterModel(){const e=this.formatFilterModel(this.advancedFilterService.getModel());return this.stringifiedModel=JSON.stringify(e),e}formatFilterModel(e){return"join"!==(e=null!=e?e:{filterType:"join",type:"AND",conditions:[]}).filterType&&(e={filterType:"join",type:"AND",conditions:[e]}),e}buildList(){const e=(t,i,n,s)=>{i.push({filterModel:t,level:n,parent:s,valid:!0,showMove:this.showMove}),"join"===t.filterType&&(t.conditions.forEach(s=>e(s,i,n+1,t)),0===n&&i.push({filterModel:null,level:n+1,parent:t,valid:!0}))};this.items=[],e(this.filterModel,this.items,0)}refreshList(e){if(!e){const e=[];this.items.forEach(t=>{t.valid||e.push(t.filterModel)}),this.buildList(),e.length&&this.items.forEach(t=>{t.filterModel&&e.includes(t.filterModel)&&(t.valid=!1)})}this.virtualList.refresh(e),this.validate()}updateItemComponent(e,t){const i=this.items.indexOf(e),n=(e,t)=>{const i=this.items.find(t=>t.filterModel===e),s=null==i?void 0:i.parent;if(s){const{conditions:i}=s;n(s,t),t.push(i[i.length-1]===e)}},s=[],{filterModel:r}=e;r&&(n(r,s),s[0]=!1);const o="join"===(null==r?void 0:r.filterType)&&!!r.conditions.length;t.setState({disableMoveUp:1===i,disableMoveDown:!this.canMoveDown(e,i),treeLines:s,showStartTreeLine:o})}createItemComponent(e,t){const i=this.createBean(e.filterModel?new Gm(e,this.dragFeature,t):new Vm(e,t));return i.addManagedListener(i,Pm.EVENT_REMOVED,({item:e})=>this.removeItem(e)),i.addManagedListener(i,Pm.EVENT_VALUE_CHANGED,()=>this.validate()),i.addManagedListener(i,Pm.EVENT_ADDED,({item:e,isJoin:t})=>this.addItem(e,t)),i.addManagedListener(i,Pm.EVENT_MOVED,({item:e,backwards:t})=>this.moveItemUpDown(e,t)),i instanceof Gm&&this.updateItemComponent(e,i),i}addItem(e,t){var i;const{parent:n,level:s,filterModel:r}=e,o="join"===(null==r?void 0:r.filterType),a=t?{filterType:"join",type:"AND",conditions:[]}:{},l=o?r:n;let c=o?0:l.conditions.indexOf(r);c>=0?(o||(c+=1),l.conditions.splice(c,0,a)):l.conditions.push(a);let h=this.items.indexOf(e);const d=h>=0;if(d){e.filterModel&&h++;const i=[{filterModel:a,level:o?s+1:s,parent:l,valid:t,showMove:this.showMove}];this.items.splice(h,0,...i)}this.refreshList(d),d&&(null==(i=this.virtualList.getComponentAt(h))||i.afterAdd())}removeItem(e){var t;const i=e.parent,{filterModel:n}=e,s=i.conditions.indexOf(n);i.conditions.splice(s,1);const r="join"===(null==(t=e.filterModel)?void 0:t.filterType),o=this.items.indexOf(e),a=!r&&o>=0;a&&this.items.splice(o,1),this.refreshList(a),o>=0&&this.virtualList.focusRow(o)}moveItemUpDown(e,t){const i=this.items.indexOf(e),n=t?i-1:i+1;if(0===n||!t&&!this.canMoveDown(e,i))return;const s=this.items[n],r=this.removeItemFromParent(e),{level:o,filterModel:a,parent:l}=e,{level:c,filterModel:h,parent:d}=s;if(t)if(c===o&&"join"===h.filterType)h.conditions.push(a);else if(c<=o){const e=d.conditions.indexOf(h);d.conditions.splice(e,0,a)}else l.conditions[r-1].conditions.push(a);else if(c===o)if("join"===h.filterType)h.conditions.splice(0,0,a);else{const e=d.conditions.indexOf(h);d.conditions.splice(e+1,0,a)}else if(r<l.conditions.length)l.conditions.splice(r+1,0,a);else{const e=this.items.find(e=>e.filterModel===l),t=e.parent.conditions.indexOf(e.filterModel)+1;e.parent.conditions.splice(t,0,a)}this.refreshList(!1);const u=this.items.findIndex(({filterModel:e})=>e===a);if(u>=0){const e=this.virtualList.getComponentAt(u);e instanceof Gm&&e.focusMoveButton(t)}}canMoveDown(e,t){return!(1===e.level&&t===this.items.length-2||1===e.level&&e.parent.conditions[e.parent.conditions.length-1]===e.filterModel)}close(){this.advancedFilterService.getCtrl().toggleFilterBuilder("ui")}validate(){let e=!this.items.every(({valid:e})=>e);e?this.validationMessage=this.advancedFilterExpressionService.translate("advancedFilterBuilderValidationIncomplete"):(e=JSON.stringify(this.filterModel)===this.stringifiedModel,this.validationMessage=e?this.advancedFilterExpressionService.translate("advancedFilterBuilderValidationAlreadyApplied"):null),s._.setDisabled(this.eApplyFilterButton,e),this.validationTooltipFeature.refreshToolTip()}validateItems(){const e=e=>{e.type=void 0},t=e=>{delete e.filter};this.items.forEach(i=>{if(!i.valid||!i.filterModel||"join"===i.filterModel.filterType)return;const{filterModel:n}=i,{colId:r}=n,o=this.advancedFilterExpressionService.getColumnAutocompleteEntries().find(({key:e})=>e===r),a=this.advancedFilterExpressionService.getColumnDetails(n.colId);if(!o||!a.column)return i.valid=!1,n.colId=void 0,e(n),void t(n);const l=this.advancedFilterExpressionService.getDataTypeExpressionOperator(a.baseCellDataType).operators[n.type];if(!l)return i.valid=!1,e(n),void t(n);l.numOperands>0&&!s._.exists(n.filter)&&(i.valid=!1)})}};Am([(0,s.PIB)("eList")],Bm.prototype,"eList",2),Am([(0,s.PIB)("eApplyFilterButton")],Bm.prototype,"eApplyFilterButton",2),Am([(0,s.PIB)("eCancelFilterButton")],Bm.prototype,"eCancelFilterButton",2),Am([(0,s.dsm)("filterManager")],Bm.prototype,"filterManager",2),Am([(0,s.dsm)("advancedFilterService")],Bm.prototype,"advancedFilterService",2),Am([(0,s.dsm)("advancedFilterExpressionService")],Bm.prototype,"advancedFilterExpressionService",2),Am([(0,s.dsm)("beans")],Bm.prototype,"beans",2),Am([s.o7C],Bm.prototype,"postConstruct",1);var Hm=class e extends s.XQb{constructor(e){super(),this.enabled=e}postConstruct(){this.hasAdvancedFilterParent=!!this.gos.get("advancedFilterParent"),this.ctrlsService.whenReady(()=>this.setAdvancedFilterComp()),this.addManagedListener(this.eventService,s.sVA.EVENT_ADVANCED_FILTER_ENABLED_CHANGED,({enabled:e})=>this.onEnabledChanged(e)),this.addManagedPropertyListener("advancedFilterParent",()=>this.updateComps()),this.addDestroyFunc(()=>{this.destroyAdvancedFilterComp(),this.destroyBean(this.eBuilderComp),this.eBuilderDialog&&this.eBuilderDialog.isAlive()&&this.destroyBean(this.eBuilderDialog)})}setupHeaderComp(e){this.eHeaderComp=this.createManagedBean(new Tm(this.enabled&&!this.hasAdvancedFilterParent)),e.insertAdjacentElement("beforebegin",this.eHeaderComp.getGui())}focusHeaderComp(){return!!this.eHeaderComp&&(this.eHeaderComp.getFocusableElement().focus(),!0)}refreshComp(){var e,t;null==(e=this.eFilterComp)||e.refresh(),null==(t=this.eHeaderComp)||t.refresh()}refreshBuilderComp(){var e;null==(e=this.eBuilderComp)||e.refresh()}getHeaderHeight(){var e,t;return null!=(t=null==(e=this.eHeaderComp)?void 0:e.getHeight())?t:0}setInputDisabled(e){var t,i;null==(t=this.eFilterComp)||t.setInputDisabled(e),null==(i=this.eHeaderComp)||i.setInputDisabled(e)}toggleFilterBuilder(t,i){if(i&&this.eBuilderDialog||!1===i&&!this.eBuilderDialog)return;if(this.eBuilderDialog)return this.builderDestroySource=t,void this.destroyBean(this.eBuilderDialog);this.setInputDisabled(!0);const{width:n,height:r,minWidth:o}=this.getBuilderDialogSize();this.eBuilderComp=this.createBean(new Bm),this.eBuilderDialog=this.createBean(new s.fNJ({title:this.advancedFilterExpressionService.translate("advancedFilterBuilderTitle"),component:this.eBuilderComp,width:n,height:r,resizable:!0,movable:!0,maximizable:!0,centered:!0,closable:!0,minWidth:o,afterGuiAttached:()=>{var e;return null==(e=this.eBuilderComp)?void 0:e.afterGuiAttached()}})),this.dispatchFilterBuilderVisibleChangedEvent(t,!0),this.eBuilderDialog.addEventListener(s.fNJ.EVENT_DESTROYED,()=>{var t;this.destroyBean(this.eBuilderComp),this.eBuilderComp=void 0,this.eBuilderDialog=void 0,this.setInputDisabled(!1),this.dispatchEvent({type:e.EVENT_BUILDER_CLOSED}),this.dispatchFilterBuilderVisibleChangedEvent(null!=(t=this.builderDestroySource)?t:"ui",!1),this.builderDestroySource=void 0})}dispatchFilterBuilderVisibleChangedEvent(e,t){const i={type:s.sVA.EVENT_ADVANCED_FILTER_BUILDER_VISIBLE_CHANGED,source:e,visible:t};this.eventService.dispatchEvent(i)}getBuilderDialogSize(){var e,t;const i=null!=(t=null==(e=this.gos.get("advancedFilterBuilderParams"))?void 0:e.minWidth)?t:500,n=this.popupService.getPopupParent(),r=Math.round(s._.getAbsoluteWidth(n))-2,o=Math.round(.75*s._.getAbsoluteHeight(n))-2;return{width:Math.min(Math.max(600,i),r),height:Math.min(600,o),minWidth:i}}onEnabledChanged(e){this.enabled=e,this.updateComps()}updateComps(){this.setAdvancedFilterComp(),this.setHeaderCompEnabled(),this.eventService.dispatchEvent({type:s.sVA.EVENT_HEADER_HEIGHT_CHANGED})}setAdvancedFilterComp(){if(this.destroyAdvancedFilterComp(),!this.enabled)return;const e=this.gos.get("advancedFilterParent");if(this.hasAdvancedFilterParent=!!e,e){const t=this.createBean(new Um),i=t.getGui(),{allThemes:n}=this.environment.getTheme();n.length&&i.classList.add(...n),i.classList.add(this.gos.get("enableRtl")?"ag-rtl":"ag-ltr"),e.appendChild(i),this.eFilterComp=t}}setHeaderCompEnabled(){var e;null==(e=this.eHeaderComp)||e.setEnabled(this.enabled&&!this.hasAdvancedFilterParent)}destroyAdvancedFilterComp(){this.eFilterComp&&(s._.removeFromParent(this.eFilterComp.getGui()),this.destroyBean(this.eFilterComp))}};Hm.EVENT_BUILDER_CLOSED="advancedFilterBuilderClosed",Am([(0,s.dsm)("focusService")],Hm.prototype,"focusService",2),Am([(0,s.dsm)("ctrlsService")],Hm.prototype,"ctrlsService",2),Am([(0,s.dsm)("popupService")],Hm.prototype,"popupService",2),Am([(0,s.dsm)("advancedFilterExpressionService")],Hm.prototype,"advancedFilterExpressionService",2),Am([s.o7C],Hm.prototype,"postConstruct",1);var zm=Hm,Um=class extends s.uAl{constructor(){super('\n            <div class="ag-advanced-filter" role="presentation" tabindex="-1">\n                <ag-autocomplete ref="eAutocomplete"></ag-autocomplete>\n                <button class="ag-button ag-standard-button ag-advanced-filter-apply-button" ref="eApplyFilterButton"></button>\n                <button class="ag-advanced-filter-builder-button" ref="eBuilderFilterButton">\n                    <span ref="eBuilderFilterButtonIcon" aria-hidden="true"></span>\n                    <span class="ag-advanced-filter-builder-button-label" ref="eBuilderFilterButtonLabel"></span>\n                </button>\n            </div>'),this.expressionParser=null,this.isApplyDisabled=!0,this.builderOpen=!1}postConstruct(){this.eAutocomplete.setListGenerator((e,t)=>this.generateAutocompleteListParams(t)).setValidator(()=>this.validateValue()).setForceLastSelection((e,t)=>this.forceLastSelection(e,t)).setInputAriaLabel(this.advancedFilterExpressionService.translate("ariaAdvancedFilterInput")).setListAriaLabel(this.advancedFilterExpressionService.translate("ariaLabelAdvancedFilterAutocomplete")),this.refresh(),this.addManagedListener(this.eAutocomplete,s.bB5.EVENT_VALUE_CHANGED,({value:e})=>this.onValueChanged(e)),this.addManagedListener(this.eAutocomplete,s.bB5.EVENT_VALUE_CONFIRMED,({isValid:e})=>this.onValueConfirmed(e)),this.addManagedListener(this.eAutocomplete,s.bB5.EVENT_OPTION_SELECTED,({position:e,updateEntry:t,autocompleteType:i})=>this.onOptionSelected(e,t,i)),this.addManagedListener(this.eAutocomplete,s.bB5.EVENT_VALID_CHANGED,({isValid:e,validationMessage:t})=>this.onValidChanged(e,t)),this.setupApplyButton(),this.setupBuilderButton()}refresh(){const e=this.advancedFilterService.getExpressionDisplayValue();this.eAutocomplete.setValue({value:null!=e?e:"",position:null==e?void 0:e.length,updateListOnlyIfOpen:!0})}setInputDisabled(e){this.eAutocomplete.setInputDisabled(e),s._.setDisabled(this.eApplyFilterButton,e||this.isApplyDisabled)}getTooltipParams(){const e=super.getTooltipParams();return e.location="advancedFilter",e}setupApplyButton(){this.eApplyFilterButton.innerText=this.advancedFilterExpressionService.translate("advancedFilterApply"),this.activateTabIndex([this.eApplyFilterButton]),this.addManagedListener(this.eApplyFilterButton,"click",()=>this.onValueConfirmed(this.eAutocomplete.isValid())),s._.setDisabled(this.eApplyFilterButton,this.isApplyDisabled)}setupBuilderButton(){this.eBuilderFilterButtonIcon.appendChild(s._.createIconNoSpan("advancedFilterBuilder",this.gos)),this.eBuilderFilterButtonLabel.innerText=this.advancedFilterExpressionService.translate("advancedFilterBuilder"),this.activateTabIndex([this.eBuilderFilterButton]),this.addManagedListener(this.eBuilderFilterButton,"click",()=>this.openBuilder()),this.addManagedListener(this.advancedFilterService.getCtrl(),zm.EVENT_BUILDER_CLOSED,()=>this.closeBuilder())}onValueChanged(e){var t;e=s._.makeNull(e),this.advancedFilterService.setExpressionDisplayValue(e),this.expressionParser=this.advancedFilterService.createExpressionParser(e);const i=null==(t=this.expressionParser)?void 0:t.parseExpression();i&&i!==e&&this.eAutocomplete.setValue({value:i,silent:!0,restoreFocus:!0})}onValueConfirmed(e){e&&!this.isApplyDisabled&&(s._.setDisabled(this.eApplyFilterButton,!0),this.advancedFilterService.applyExpression(),this.filterManager.onFilterChanged({source:"advancedFilter"}))}onOptionSelected(e,t,i){const{updatedValue:n,updatedPosition:s,hideAutocomplete:r}=this.updateExpression(e,t,i);this.eAutocomplete.setValue({value:n,position:s,updateListOnlyIfOpen:r,restoreFocus:!0})}validateValue(){var e,t,i;return(null==(e=this.expressionParser)?void 0:e.isValid())?null:null!=(i=null==(t=this.expressionParser)?void 0:t.getValidationMessage())?i:null}onValidChanged(e,t){this.isApplyDisabled=!e||this.advancedFilterService.isCurrentExpressionApplied(),s._.setDisabled(this.eApplyFilterButton,this.isApplyDisabled),this.setTooltip({newTooltipText:t,showDelayOverride:1e3})}generateAutocompleteListParams(e){return this.expressionParser?this.expressionParser.getAutocompleteListParams(e):this.advancedFilterExpressionService.getDefaultAutocompleteListParams("")}updateExpression(e,t,i){var n,s;return this.advancedFilterExpressionService.updateAutocompleteCache(t,i),null!=(s=null==(n=this.expressionParser)?void 0:n.updateExpression(e,t,i))?s:this.advancedFilterService.getDefaultExpression(t)}forceLastSelection({key:e,displayValue:t},i){return!!i.toLocaleLowerCase().match(`^${(null!=t?t:e).toLocaleLowerCase()}\\s*$`)}openBuilder(){this.builderOpen||(this.builderOpen=!0,s._.setDisabled(this.eBuilderFilterButton,!0),this.advancedFilterService.getCtrl().toggleFilterBuilder("ui"))}closeBuilder(){this.builderOpen&&(this.builderOpen=!1,s._.setDisabled(this.eBuilderFilterButton,!1),this.eBuilderFilterButton.focus())}};Am([(0,s.PIB)("eAutocomplete")],Um.prototype,"eAutocomplete",2),Am([(0,s.PIB)("eApplyFilterButton")],Um.prototype,"eApplyFilterButton",2),Am([(0,s.PIB)("eBuilderFilterButton")],Um.prototype,"eBuilderFilterButton",2),Am([(0,s.PIB)("eBuilderFilterButtonIcon")],Um.prototype,"eBuilderFilterButtonIcon",2),Am([(0,s.PIB)("eBuilderFilterButtonLabel")],Um.prototype,"eBuilderFilterButtonLabel",2),Am([(0,s.dsm)("advancedFilterService")],Um.prototype,"advancedFilterService",2),Am([(0,s.dsm)("advancedFilterExpressionService")],Um.prototype,"advancedFilterExpressionService",2),Am([(0,s.dsm)("filterManager")],Um.prototype,"filterManager",2),Am([s.o7C],Um.prototype,"postConstruct",1);var Wm={ariaAdvancedFilterBuilderItem:e=>`${e[0]}. Level ${e[1]}. Press ENTER to edit.`,ariaAdvancedFilterBuilderItemValidation:e=>`${e[0]}. Level ${e[1]}. ${e[2]} Press ENTER to edit.`,ariaAdvancedFilterBuilderList:"Advanced Filter Builder List",ariaAdvancedFilterBuilderFilterItem:"Filter Condition",ariaAdvancedFilterBuilderGroupItem:"Filter Group",ariaAdvancedFilterBuilderColumn:"Column",ariaAdvancedFilterBuilderOption:"Option",ariaAdvancedFilterBuilderValue:"Value",ariaAdvancedFilterBuilderJoinOperator:"Join Operator",ariaAdvancedFilterInput:"Advanced Filter Input",ariaLabelAdvancedFilterAutocomplete:"Advanced Filter Autocomplete",advancedFilterContains:"contains",advancedFilterNotContains:"does not contain",advancedFilterTextEquals:"equals",advancedFilterTextNotEqual:"does not equal",advancedFilterStartsWith:"begins with",advancedFilterEndsWith:"ends with",advancedFilterBlank:"is blank",advancedFilterNotBlank:"is not blank",advancedFilterEquals:"=",advancedFilterNotEqual:"!=",advancedFilterGreaterThan:">",advancedFilterGreaterThanOrEqual:">=",advancedFilterLessThan:"<",advancedFilterLessThanOrEqual:"<=",advancedFilterTrue:"is true",advancedFilterFalse:"is false",advancedFilterAnd:"AND",advancedFilterOr:"OR",advancedFilterApply:"Apply",advancedFilterBuilder:"Builder",advancedFilterValidationMissingColumn:"Column is missing",advancedFilterValidationMissingOption:"Option is missing",advancedFilterValidationMissingValue:"Value is missing",advancedFilterValidationInvalidColumn:"Column not found",advancedFilterValidationInvalidOption:"Option not found",advancedFilterValidationMissingQuote:"Value is missing an end quote",advancedFilterValidationNotANumber:"Value is not a number",advancedFilterValidationInvalidDate:"Value is not a valid date",advancedFilterValidationMissingCondition:"Condition is missing",advancedFilterValidationJoinOperatorMismatch:"Join operators within a condition must be the same",advancedFilterValidationInvalidJoinOperator:"Join operator not found",advancedFilterValidationMissingEndBracket:"Missing end bracket",advancedFilterValidationExtraEndBracket:"Too many end brackets",advancedFilterValidationMessage:e=>`Expression has an error. ${e[0]} - ${e[1]}.`,advancedFilterValidationMessageAtEnd:e=>`Expression has an error. ${e[0]} at end of expression.`,advancedFilterBuilderTitle:"Advanced Filter",advancedFilterBuilderApply:"Apply",advancedFilterBuilderCancel:"Cancel",advancedFilterBuilderAddButtonTooltip:"Add Filter or Group",advancedFilterBuilderRemoveButtonTooltip:"Remove",advancedFilterBuilderMoveUpButtonTooltip:"Move Up",advancedFilterBuilderMoveDownButtonTooltip:"Move Down",advancedFilterBuilderAddJoin:"Add Group",advancedFilterBuilderAddCondition:"Add Filter",advancedFilterBuilderSelectColumn:"Select a column",advancedFilterBuilderSelectOption:"Select an option",advancedFilterBuilderEnterValue:"Enter a value...",advancedFilterBuilderValidationAlreadyApplied:"Current filter already applied.",advancedFilterBuilderValidationIncomplete:"Not all conditions are complete.",advancedFilterBuilderValidationSelectColumn:"Must select a column.",advancedFilterBuilderValidationSelectOption:"Must select an option.",advancedFilterBuilderValidationEnterValue:"Must enter a value."};function jm(e,t,i){if(!e)return"";const n=i-t;return n?e.slice(0,e.length-n):e}function Km(e,t,i,n,s,r,o){const a=i+(!e.length||o?0:1);let l=0;return s&&(" "===e[a]?l=1:(n+=" ",r&&(n+='"'))),{updatedValue:e.slice(0,t)+n+e.slice(a),updatedPosition:t+n.length+l}}function $m(e,t,i,n){let s=t,r=!1;for(;s<e.length;){const t=e[s];if("("===t){n&&" "===e[s-1]?r=!0:s-=1;break}if(" "===t||i&&")"===t){s-=1;break}s++}return{endPosition:s,isEmpty:r}}function Ym(e,t,i,n){i!==t&&(e.expression=Km(e.expression,n-t.length+1,n,i).updatedValue)}var qm=class{constructor(e,t){this.params=e,this.startPosition=t,this.type="column",this.valid=!0,this.hasStartChar=!1,this.hasEndChar=!1,this.colName=""}parse(e,t){if(e!==Qm.COL_START_CHAR||this.colName)if(e===Qm.COL_END_CHAR&&this.hasStartChar){if(this.parseColumn(!1,t))return this.hasEndChar=!0,!1;this.colName+=e}else this.colName+=e;else this.hasStartChar=!0}getDisplayValue(){return(this.hasStartChar?Qm.COL_START_CHAR:"")+this.colName+(this.hasEndChar?Qm.COL_END_CHAR:"")}getColId(){return this.colId}complete(e){this.parseColumn(!0,e)}getValidationError(){var e;return this.valid?null:{message:this.params.advancedFilterExpressionService.translate("advancedFilterValidationInvalidColumn"),startPosition:this.startPosition,endPosition:null!=(e=this.endPosition)?e:this.params.expression.length-1}}parseColumn(e,t){var i;this.endPosition=t;const n=this.params.advancedFilterExpressionService.getColId(this.colName);return n&&this.hasStartChar&&(this.colId=n.colId,Ym(this.params,this.colName,n.columnName,t-1),this.colName=n.columnName,this.column=this.params.columnModel.getPrimaryColumn(this.colId),this.column)?(this.baseCellDataType=null!=(i=this.params.dataTypeService.getBaseDataType(this.column))?i:"text",!0):(e&&(this.valid=!1),this.baseCellDataType="text",!1)}},Xm=class{constructor(e,t,i){this.params=e,this.startPosition=t,this.baseCellDataType=i,this.type="operator",this.valid=!0,this.expectedNumOperands=0,this.operator=""}parse(e,t){if(" "===e||")"===e){if(this.parseOperator(!1,t-1))return!0;this.operator+=e}else this.operator+=e}complete(e){this.parseOperator(!0,e)}getValidationError(){var e;return this.valid?null:{message:this.params.advancedFilterExpressionService.translate("advancedFilterValidationInvalidOption"),startPosition:this.startPosition,endPosition:null!=(e=this.endPosition)?e:this.params.expression.length-1}}getDisplayValue(){return this.operator}getOperatorKey(){return this.parsedOperator}parseOperator(e,t){const i=this.params.advancedFilterExpressionService.getDataTypeExpressionOperator(this.baseCellDataType),n=i.findOperator(this.operator);if(this.endPosition=t,n){this.parsedOperator=n;const e=i.operators[n];this.expectedNumOperands=e.numOperands;const s=e.displayValue;return Ym(this.params,this.operator,s,t),this.operator=s,!0}return!e&&null===n||(this.valid=!1),!1}},Zm=class{constructor(e,t,i,n){this.params=e,this.startPosition=t,this.baseCellDataType=i,this.column=n,this.type="operand",this.valid=!0,this.operand="",this.validationMessage=null}parse(e,t){if(" "===e){if(!this.quotes)return this.parseOperand(!1,t),!0;this.operand+=e}else if(")"===e){if("number"===this.baseCellDataType||!this.quotes)return this.parseOperand(!1,t-1),!0;this.operand+=e}else if(this.operand||this.quotes||"'"!==e&&'"'!==e){if(this.quotes&&e===this.quotes)return this.parseOperand(!1,t),!1;this.operand+=e}else this.quotes=e}complete(e){this.parseOperand(!0,e)}getValidationError(){var e;return this.validationMessage?{message:this.validationMessage,startPosition:this.startPosition,endPosition:null!=(e=this.endPosition)?e:this.params.expression.length-1}:null}getRawValue(){return this.operand}getModelValue(){return this.modelValue}parseOperand(e,t){const{advancedFilterExpressionService:i}=this.params;if(this.endPosition=t,this.modelValue=this.operand,e&&this.quotes)this.valid=!1,this.validationMessage=i.translate("advancedFilterValidationMissingQuote");else if(""===this.modelValue)this.valid=!1,this.validationMessage=i.translate("advancedFilterValidationMissingValue");else{const e=i.getOperandModelValue(this.operand,this.baseCellDataType,this.column);switch(null!=e&&(this.modelValue=e),this.baseCellDataType){case"number":(this.quotes||isNaN(this.modelValue))&&(this.valid=!1,this.validationMessage=i.translate("advancedFilterValidationNotANumber"));break;case"date":case"dateString":null==e&&(this.valid=!1,this.validationMessage=i.translate("advancedFilterValidationInvalidDate"))}}}},Qm=class{constructor(e,t){this.params=e,this.startPosition=t,this.isAwaiting=!0}parseExpression(){var e,t;let i=this.startPosition;const{expression:n}=this.params;for(;i<n.length;){const e=n[i];if(" "===e&&this.isAwaiting);else{if(this.isAwaiting=!1,!this.parser){let e;this.columnParser?this.operatorParser?(this.operandParser=new Zm(this.params,i,this.columnParser.baseCellDataType,this.columnParser.column),e=this.operandParser):(this.operatorParser=new Xm(this.params,i,this.columnParser.baseCellDataType),e=this.operatorParser):(this.columnParser=new qm(this.params,i),e=this.columnParser),this.parser=e}const t=this.parser.parse(e,i);if(null!=t){if(this.isComplete())return this.returnEndPosition(t?i-1:i,!0);this.parser=void 0,this.isAwaiting=!0}}i++}return null==(t=null==(e=this.parser)?void 0:e.complete)||t.call(e,i-1),this.returnEndPosition(i)}isValid(){return this.isComplete()&&this.columnParser.valid&&this.operatorParser.valid&&(!this.operandParser||this.operandParser.valid)}getValidationError(){var e,t,i,n,s;const r=null!=(s=null!=(i=null==(e=this.columnParser)?void 0:e.getValidationError())?i:null==(t=this.operatorParser)?void 0:t.getValidationError())?s:null==(n=this.operandParser)?void 0:n.getValidationError();if(r)return r;const o=this.params.expression.length;let a;return this.columnParser?this.operatorParser?this.operatorParser.expectedNumOperands&&!this.operandParser&&(a="advancedFilterValidationMissingValue"):a="advancedFilterValidationMissingOption":a="advancedFilterValidationMissingColumn",a?{message:this.params.advancedFilterExpressionService.translate(a),startPosition:o,endPosition:o}:null}getFunctionString(e){return this.getFunctionCommon(e,(e,t,i,n)=>`params.operators[${t}].evaluator(expressionProxy.getValue('${i.replace(/(['"])/,"\\$1")}', node), node, params.evaluatorParams[${n}]${null==e?"":`, params.operands[${e}]`})`)}getFunctionParsed(e){return this.getFunctionCommon(e,(e,t,i,n)=>(s,r,o)=>o.operators[t].evaluator(s.getValue(i,r),r,o.evaluatorParams[n],null==e?void 0:o.operands[e]))}getAutocompleteListParams(e){return this.isColumnPosition(e)?this.getColumnAutocompleteListParams(e):this.isOperatorPosition(e)?this.getOperatorAutocompleteListParams(e):this.isBeyondEndPosition(e)?void 0:{enabled:!1}}updateExpression(e,t,i){var n,s,r,o,a;const{expression:l}=this.params;if(this.isColumnPosition(e))return Km(this.params.expression,this.startPosition,(null==(n=this.columnParser)?void 0:n.getColId())?this.columnParser.endPosition:$m(l,e).endPosition,this.params.advancedFilterExpressionService.getColumnValue(t),!0);if(this.isOperatorPosition(e)){const n=this.getBaseCellDataTypeFromOperatorAutocompleteType(i),c=this.hasOperand(n,t.key),h=c&&this.doesOperandNeedQuotes(n);let d;if(null!=(null==(s=this.operatorParser)?void 0:s.startPosition)&&e<this.operatorParser.startPosition)d=Km(l,e,e,null!=(r=t.displayValue)?r:t.key,c,h);else{let i,n=!1;if(null==(o=this.operatorParser)?void 0:o.getOperatorKey())i=this.operatorParser.endPosition;else{const{endPosition:t,isEmpty:s}=$m(l,e,!0,!0);i=t,n=s}d=Km(l,function(e,t,i){let n=t;for(;n<i&&" "===e[n];)n++;return n}(l,this.columnParser.endPosition+1,i),i,null!=(a=t.displayValue)?a:t.key,c,h,n)}return Mm(Em({},d),{hideAutocomplete:!c})}return null}getModel(){const e=this.columnParser.getColId(),t={filterType:this.columnParser.baseCellDataType,colId:e,type:this.operatorParser.getOperatorKey()};return this.operatorParser.expectedNumOperands&&(t.filter=this.operandParser.getModelValue()),t}getFunctionCommon(e,t){var i,n;const s=this.columnParser.getColId(),r=null==(i=this.operatorParser)?void 0:i.getOperatorKey(),{operators:o,evaluatorParams:a,operands:l}=e,c=this.params.advancedFilterExpressionService.getExpressionOperator(this.columnParser.baseCellDataType,r),h=this.addToListAndGetIndex(o,c),d=this.params.advancedFilterExpressionService.getExpressionEvaluatorParams(s),u=this.addToListAndGetIndex(a,d);return t(0===(null==(n=this.operatorParser)?void 0:n.expectedNumOperands)?void 0:this.addToListAndGetIndex(l,this.getOperandValue()),h,s,u)}getOperandValue(){let e=this.operandParser.getRawValue();const{baseCellDataType:t,column:i}=this.columnParser;switch(t){case"number":e=Number(e);break;case"date":case"dateString":e=this.params.valueService.parseValue(i,null,e,void 0)}return"dateString"===t?this.params.dataTypeService.getDateParserFunction(i)(e):e}isComplete(){return!(!this.operatorParser||!(!this.operatorParser.expectedNumOperands||this.operatorParser.expectedNumOperands&&this.operandParser))}isColumnPosition(e){return!this.columnParser||null==this.columnParser.endPosition||e<=this.columnParser.endPosition+1}isOperatorPosition(e){return!this.operatorParser||null==this.operatorParser.endPosition||e<=this.operatorParser.endPosition+1}isBeyondEndPosition(e){return this.isComplete()&&null!=this.endPosition&&e>this.endPosition+1&&this.endPosition+1<this.params.expression.length}returnEndPosition(e,t){return this.endPosition=t?e:e-1,e}getColumnAutocompleteListParams(e){return this.params.advancedFilterExpressionService.generateAutocompleteListParams(this.params.advancedFilterExpressionService.getColumnAutocompleteEntries(),"column",this.getColumnSearchString(e))}getColumnSearchString(e){var t,i,n,s,r;const o=null!=(i=null==(t=this.columnParser)?void 0:t.getDisplayValue())?i:"",a=jm(o,e,null==(null==(n=this.columnParser)?void 0:n.endPosition)?this.params.expression.length:this.columnParser.endPosition+1),l=(null==(s=this.columnParser)?void 0:s.hasStartChar)&&a.length>0,c=(null==(r=this.columnParser)?void 0:r.hasEndChar)&&a.length===o.length+2;return l?a.slice(1,c?-1:void 0):a}getOperatorAutocompleteListParams(e){var t,i,n,s,r;const o=null==(t=this.columnParser)?void 0:t.column;if(!o)return{enabled:!1};const a=this.columnParser.baseCellDataType,l=null!=(null==(i=this.operatorParser)?void 0:i.startPosition)&&e<this.operatorParser.startPosition?"":jm(null!=(s=null==(n=this.operatorParser)?void 0:n.getDisplayValue())?s:"",e,null==(null==(r=this.operatorParser)?void 0:r.endPosition)?this.params.expression.length:this.operatorParser.endPosition+1);return this.params.advancedFilterExpressionService.generateAutocompleteListParams(this.params.advancedFilterExpressionService.getOperatorAutocompleteEntries(o,a),`operator-${a}`,l)}getBaseCellDataTypeFromOperatorAutocompleteType(e){return null==e?void 0:e.replace("operator-","")}hasOperand(e,t){var i,n;return!e||!t||(null!=(n=null==(i=this.params.advancedFilterExpressionService.getExpressionOperator(e,t))?void 0:i.numOperands)?n:0)>0}doesOperandNeedQuotes(e){return"number"!==e}addToListAndGetIndex(e,t){const i=e.length;return e.push(t),i}};function Jm(e,t,i){let n=!1;const s=e.toLocaleLowerCase(),r=s+" ",o=Object.entries(t).find(([e,t])=>{const o=i(t).toLocaleLowerCase();return o.startsWith(r)&&(n=!0),o===s});return o?o[0]:n?null:void 0}function ev(e,t){return(null!=t?t:Object.keys(e)).map(t=>({key:t,displayValue:e[t].displayValue}))}Qm.COL_START_CHAR="[",Qm.COL_END_CHAR="]";var tv=class{constructor(e){this.params=e,this.initOperators()}getEntries(e){return ev(this.operators,e)}findOperator(e){return Jm(e,this.operators,({displayValue:e})=>e)}initOperators(){const{translate:e}=this.params;this.operators={contains:{displayValue:e("advancedFilterContains"),evaluator:(e,t,i,n)=>this.evaluateExpression(e,t,i,n,!1,(e,t)=>e.includes(t)),numOperands:1},notContains:{displayValue:e("advancedFilterNotContains"),evaluator:(e,t,i,n)=>this.evaluateExpression(e,t,i,n,!0,(e,t)=>!e.includes(t)),numOperands:1},equals:{displayValue:e("advancedFilterTextEquals"),evaluator:(e,t,i,n)=>this.evaluateExpression(e,t,i,n,!1,(e,t)=>e===t),numOperands:1},notEqual:{displayValue:e("advancedFilterTextNotEqual"),evaluator:(e,t,i,n)=>this.evaluateExpression(e,t,i,n,!0,(e,t)=>e!=t),numOperands:1},startsWith:{displayValue:e("advancedFilterStartsWith"),evaluator:(e,t,i,n)=>this.evaluateExpression(e,t,i,n,!1,(e,t)=>e.startsWith(t)),numOperands:1},endsWith:{displayValue:e("advancedFilterEndsWith"),evaluator:(e,t,i,n)=>this.evaluateExpression(e,t,i,n,!1,(e,t)=>e.endsWith(t)),numOperands:1},blank:{displayValue:e("advancedFilterBlank"),evaluator:e=>null==e||"string"==typeof e&&0===e.trim().length,numOperands:0},notBlank:{displayValue:e("advancedFilterNotBlank"),evaluator:e=>null!=e&&("string"!=typeof e||e.trim().length>0),numOperands:0}}}evaluateExpression(e,t,i,n,s,r){return null==e?s:i.caseSensitive?r(i.valueConverter(e,t),n):r(i.valueConverter(e,t).toLocaleLowerCase(),n.toLocaleLowerCase())}},iv=class{constructor(e){this.params=e,this.initOperators()}getEntries(e){return ev(this.operators,e)}findOperator(e){return Jm(e,this.operators,({displayValue:e})=>e)}initOperators(){const{translate:e,equals:t}=this.params;this.operators={equals:{displayValue:e("advancedFilterEquals"),evaluator:(e,i,n,s)=>this.evaluateSingleOperandExpression(e,i,n,s,!!n.includeBlanksInEquals,t),numOperands:1},notEqual:{displayValue:e("advancedFilterNotEqual"),evaluator:(e,i,n,s)=>this.evaluateSingleOperandExpression(e,i,n,s,!!n.includeBlanksInEquals,(e,i)=>!t(e,i)),numOperands:1},greaterThan:{displayValue:e("advancedFilterGreaterThan"),evaluator:(e,t,i,n)=>this.evaluateSingleOperandExpression(e,t,i,n,!!i.includeBlanksInGreaterThan,(e,t)=>e>t),numOperands:1},greaterThanOrEqual:{displayValue:e("advancedFilterGreaterThanOrEqual"),evaluator:(e,t,i,n)=>this.evaluateSingleOperandExpression(e,t,i,n,!!i.includeBlanksInGreaterThan,(e,t)=>e>=t),numOperands:1},lessThan:{displayValue:e("advancedFilterLessThan"),evaluator:(e,t,i,n)=>this.evaluateSingleOperandExpression(e,t,i,n,!!i.includeBlanksInLessThan,(e,t)=>e<t),numOperands:1},lessThanOrEqual:{displayValue:e("advancedFilterLessThanOrEqual"),evaluator:(e,t,i,n)=>this.evaluateSingleOperandExpression(e,t,i,n,!!i.includeBlanksInLessThan,(e,t)=>e<=t),numOperands:1},blank:{displayValue:e("advancedFilterBlank"),evaluator:e=>null==e,numOperands:0},notBlank:{displayValue:e("advancedFilterNotBlank"),evaluator:e=>null!=e,numOperands:0}}}evaluateSingleOperandExpression(e,t,i,n,s,r){return null==e?s:r(i.valueConverter(e,t),n)}},nv=class{constructor(e){this.params=e,this.initOperators()}getEntries(e){return ev(this.operators,e)}findOperator(e){return Jm(e,this.operators,({displayValue:e})=>e)}initOperators(){const{translate:e}=this.params;this.operators={true:{displayValue:e("advancedFilterTrue"),evaluator:e=>!!e,numOperands:0},false:{displayValue:e("advancedFilterFalse"),evaluator:e=>!1===e,numOperands:0},blank:{displayValue:e("advancedFilterBlank"),evaluator:e=>null==e,numOperands:0},notBlank:{displayValue:e("advancedFilterNotBlank"),evaluator:e=>null!=e,numOperands:0}}}},sv=class extends s.XQb{constructor(){super(...arguments),this.columnNameToIdMap={},this.columnAutocompleteEntries=null,this.expressionEvaluatorParams={}}postConstruct(){this.expressionJoinOperators=this.generateExpressionJoinOperators(),this.expressionOperators=this.generateExpressionOperators()}parseJoinOperator(e){var t;const{type:i}=e;return null!=(t=this.expressionJoinOperators[i])?t:i}getColumnDisplayValue(e){const{colId:t}=e,i=this.getColumnAutocompleteEntries().find(({key:e})=>e===t);let n;return i?(n=i.displayValue,this.columnNameToIdMap[n.toLocaleUpperCase()]={colId:t,columnName:n}):n=t,n}getOperatorDisplayValue(e){var t,i;return null!=(i=null==(t=this.getExpressionOperator(e.filterType,e.type))?void 0:t.displayValue)?i:e.type}getOperandModelValue(e,t,i){var n;switch(t){case"number":return s._.exists(e)?Number(e):null;case"date":return s._.serialiseDate(this.valueService.parseValue(i,null,e,void 0),!1);case"dateString":const t=this.valueService.parseValue(i,null,e,void 0);return s._.serialiseDate(null!=(n=this.dataTypeService.getDateParserFunction(i)(t))?n:null,!1)}return e}getOperandDisplayValue(e,t){var i,n;const{colId:r,filter:o}=e,a=this.columnModel.getPrimaryColumn(r);let l="";if(null!=o){let r;switch(e.filterType){case"number":r=null!=(i=s._.toStringOrNull(o))?i:"";break;case"date":const e=s._.parseDateTimeFromString(o);r=a?this.valueService.formatValue(a,null,e):null;break;case"dateString":const t=s._.parseDateTimeFromString(o),n=a?this.dataTypeService.getDateFormatterFunction(a)(null!=t?t:void 0):null;r=a?this.valueService.formatValue(a,null,n):null}"number"!==e.filterType&&(r=null!=(n=null!=r?r:s._.toStringOrNull(o))?n:"",t||(r=`"${r}"`)),l=t?r:` ${r}`}return l}parseColumnFilterModel(e){var t,i;return`[${null!=(t=this.getColumnDisplayValue(e))?t:""}] ${null!=(i=this.getOperatorDisplayValue(e))?i:""}${this.getOperandDisplayValue(e)}`}updateAutocompleteCache(e,t){if("column"===t){const{key:t,displayValue:i}=e;this.columnNameToIdMap[e.displayValue.toLocaleUpperCase()]={colId:t,columnName:i}}}translate(e,t){let i=Wm[e];return"function"==typeof i&&(i=i(t)),this.localeService.getLocaleTextFunc()(e,i,t)}generateAutocompleteListParams(e,t,i){return{enabled:!0,type:t,searchString:i,entries:e}}getColumnAutocompleteEntries(){var e;if(this.columnAutocompleteEntries)return this.columnAutocompleteEntries;const t=null!=(e=this.columnModel.getAllPrimaryColumns())?e:[],i=[],n=this.gos.get("includeHiddenColumnsInAdvancedFilter");return t.forEach(e=>{e.getColDef().filter&&(n||e.isVisible()||e.isRowGroupActive())&&i.push({key:e.getColId(),displayValue:this.columnModel.getDisplayNameForColumn(e,"advancedFilter")})}),i.sort((e,t)=>{var i,n;const s=null!=(i=e.displayValue)?i:"",r=null!=(n=t.displayValue)?n:"";return s<r?-1:r>s?1:0}),i}getOperatorAutocompleteEntries(e,t){const i=this.getActiveOperators(e);return this.getDataTypeExpressionOperator(t).getEntries(i)}getJoinOperatorAutocompleteEntries(){return Object.entries(this.expressionJoinOperators).map(([e,t])=>({key:e,displayValue:t}))}getDefaultAutocompleteListParams(e){return this.generateAutocompleteListParams(this.getColumnAutocompleteEntries(),"column",e)}getDataTypeExpressionOperator(e){return this.expressionOperators[e]}getExpressionOperator(e,t){var i,n;return null==(n=null==(i=this.getDataTypeExpressionOperator(e))?void 0:i.operators)?void 0:n[t]}getExpressionJoinOperators(){return this.expressionJoinOperators}getColId(e){const t=e.toLocaleUpperCase(),i=this.columnNameToIdMap[t];if(i)return i;const n=this.getColumnAutocompleteEntries().find(({displayValue:e})=>e.toLocaleUpperCase()===t);if(n){const{key:e,displayValue:i}=n,s={colId:e,columnName:i};return this.columnNameToIdMap[t]=s,s}return null}getExpressionEvaluatorParams(e){let t=this.expressionEvaluatorParams[e];if(t)return t;const i=this.columnModel.getPrimaryColumn(e);if(!i)return{valueConverter:e=>e};switch(this.dataTypeService.getBaseDataType(i)){case"dateString":t={valueConverter:this.dataTypeService.getDateParserFunction(i)};break;case"object":t=i.getColDef().filterValueGetter?{valueConverter:e=>e}:{valueConverter:(e,t)=>{var n;return null!=(n=this.valueService.formatValue(i,t,e))?n:"function"==typeof e.toString?e.toString():""}};break;case"text":case void 0:t={valueConverter:e=>s._.toStringOrNull(e)};break;default:t={valueConverter:e=>e}}const{filterParams:n}=i.getColDef();return n&&["caseSensitive","includeBlanksInEquals","includeBlanksInLessThan","includeBlanksInGreaterThan"].forEach(e=>{const i=n[e];i&&(t[e]=i)}),this.expressionEvaluatorParams[e]=t,t}getColumnDetails(e){var t,i;const n=null!=(t=this.columnModel.getPrimaryColumn(e))?t:void 0;return{column:n,baseCellDataType:null!=(i=n?this.dataTypeService.getBaseDataType(n):void 0)?i:"text"}}generateExpressionOperators(){const e=(e,t)=>this.translate(e,t);return{text:new tv({translate:e}),boolean:new nv({translate:e}),object:new tv({translate:e}),number:new iv({translate:e,equals:(e,t)=>e===t}),date:new iv({translate:e,equals:(e,t)=>e.getTime()===t.getTime()}),dateString:new iv({translate:e,equals:(e,t)=>e.getTime()===t.getTime()})}}getColumnValue({displayValue:e}){return`${Qm.COL_START_CHAR}${e}${Qm.COL_END_CHAR}`}generateExpressionJoinOperators(){return{AND:this.translate("advancedFilterAnd"),OR:this.translate("advancedFilterOr")}}getActiveOperators(e){var t;const i=null==(t=e.getColDef().filterParams)?void 0:t.filterOptions;if(i)return i.every(e=>"string"==typeof e)?i:void 0}resetColumnCaches(){this.columnAutocompleteEntries=null,this.columnNameToIdMap={},this.expressionEvaluatorParams={}}};Am([(0,s.dsm)("valueService")],sv.prototype,"valueService",2),Am([(0,s.dsm)("columnModel")],sv.prototype,"columnModel",2),Am([(0,s.dsm)("dataTypeService")],sv.prototype,"dataTypeService",2),Am([s.o7C],sv.prototype,"postConstruct",1),sv=Am([(0,s.dR4)("advancedFilterExpressionService")],sv);var rv=class{constructor(e){this.params=e,this.operators=[],this.operatorStartPositions=[],this.operatorEndPositions=[],this.activeOperator=0,this.validationError=null}parseExpression(e){this.operators.push(""),this.operatorStartPositions.push(e),this.operatorEndPositions.push(void 0);const{expression:t}=this.params;for(;e<t.length;){const i=t[e];if(" "===i){if(this.parseOperator(e-1))return this.activeOperator++,e-1;this.operators[this.activeOperator]+=i}else this.operators[this.activeOperator]+=i;e++}return this.parseOperator(e-1),e}isValid(){return!(this.validationError||this.operators.length&&!this.parsedOperator)}getValidationError(){return this.validationError}getFunction(){return"OR"===this.parsedOperator?"||":"&&"}getModel(){return"OR"===this.parsedOperator?"OR":"AND"}getAutocompleteListParams(e,t){let i;if(null==t)i="";else{const n=this.operators[t],s=this.operatorEndPositions[t];i=jm(n,e,null==s?this.params.expression.length:s+1)}let n=this.params.advancedFilterExpressionService.getJoinOperatorAutocompleteEntries();return(t||null==t&&this.activeOperator)&&(n=n.filter(({key:e})=>e===this.parsedOperator)),this.params.advancedFilterExpressionService.generateAutocompleteListParams(n,"join",i)}updateExpression(e,t,i){var n,s;let{expression:r}=this.params;const o=null!=(n=t.displayValue)?n:t.key;if(0===i)for(let e=this.operatorEndPositions.length-1;e>0;e--){const t=this.operatorEndPositions[e];null!=t&&(r=Km(r,this.operatorStartPositions[e],t,o).updatedValue)}return Km(r,this.operatorStartPositions.length>i?this.operatorStartPositions[i]:e,null!=(s=this.operatorEndPositions.length>i?this.operatorEndPositions[i]:void 0)?s:$m(r,e,!0).endPosition,o,!0)}getNumOperators(){return this.operators.length}getLastOperatorEndPosition(){return this.operatorEndPositions[this.operatorEndPositions.length-1]}parseOperator(e){const t=this.operators.length>this.activeOperator?this.operators[this.activeOperator]:"",i=this.params.advancedFilterExpressionService.getExpressionJoinOperators(),n=Jm(t,i,e=>e);if(n){this.operatorEndPositions[this.activeOperator]=e;const s=i[n];if(this.activeOperator){if(n!==this.parsedOperator)return this.validationError||(this.validationError={message:this.params.advancedFilterExpressionService.translate("advancedFilterValidationJoinOperatorMismatch"),startPosition:e-t.length+1,endPosition:e}),!1}else this.parsedOperator=n;return t!==s&&(Ym(this.params,t,s,e),this.operators[this.activeOperator]=s),!0}return null!==n&&(this.validationError||(this.validationError={message:this.params.advancedFilterExpressionService.translate("advancedFilterValidationInvalidJoinOperator"),startPosition:e-t.length+1,endPosition:e}),!0)}},ov=class e{constructor(e,t){this.params=e,this.startPosition=t,this.expectingExpression=!0,this.expectingOperator=!1,this.expressionParsers=[],this.operatorParser=new rv(this.params),this.missingEndBracket=!1,this.extraEndBracket=!1}parseExpression(){let t=this.startPosition;const{expression:i}=this.params;for(;t<i.length;){const n=i[t];if("("!==n||this.expectingOperator){if(")"===n)return this.endPosition=t-1,0===this.startPosition&&(this.extraEndBracket=!0),t;if(" "===n);else if(this.expectingExpression){const e=new Qm(this.params,t);t=e.parseExpression(),this.expressionParsers.push(e),this.expectingExpression=!1,this.expectingOperator=!0}else this.expectingOperator&&(t=this.operatorParser.parseExpression(t),this.expectingOperator=!1,this.expectingExpression=!0)}else{const i=new e(this.params,t+1);t=i.parseExpression(),this.expressionParsers.push(i),this.expectingExpression=!1,this.expectingOperator=!0}t++}return this.startPosition>0&&(this.missingEndBracket=!0),t}isValid(){return!this.missingEndBracket&&!this.extraEndBracket&&this.expressionParsers.length===this.operatorParser.getNumOperators()+1&&this.operatorParser.isValid()&&this.expressionParsers.every(e=>e.isValid())}getValidationError(){const e=this.operatorParser.getValidationError();for(let t=0;t<this.expressionParsers.length;t++){const i=this.expressionParsers[t].getValidationError();if(i)return e&&e.startPosition<i.startPosition?e:i}if(e)return e;if(this.extraEndBracket)return{message:this.params.advancedFilterExpressionService.translate("advancedFilterValidationExtraEndBracket"),startPosition:this.endPosition+1,endPosition:this.endPosition+1};let t;return this.expressionParsers.length===this.operatorParser.getNumOperators()?t="advancedFilterValidationMissingCondition":this.missingEndBracket&&(t="advancedFilterValidationMissingEndBracket"),t?{message:this.params.advancedFilterExpressionService.translate(t),startPosition:this.params.expression.length,endPosition:this.params.expression.length}:null}getFunctionString(e){const t=this.expressionParsers.length>1,i=this.expressionParsers.map(t=>t.getFunctionString(e)).join(` ${this.operatorParser.getFunction()} `);return t?`(${i})`:i}getFunctionParsed(e){const t=this.operatorParser.getFunction(),i=this.expressionParsers.map(t=>t.getFunctionParsed(e)),n="&&"===t?"every":"some";return(e,t,s)=>i[n](i=>i(e,t,s))}getAutocompleteListParams(e){if(null!=this.endPosition&&e>this.endPosition+1)return;if(!this.expressionParsers.length)return this.getColumnAutocompleteListParams();const t=this.getExpressionParserIndex(e);if(null==t)return"("===this.params.expression[e]?{enabled:!1}:this.getColumnAutocompleteListParams();const i=this.expressionParsers[t].getAutocompleteListParams(e);if(!i){if(t<this.expressionParsers.length-1)return this.operatorParser.getAutocompleteListParams(e,t);if(this.expressionParsers.length===this.operatorParser.getNumOperators()){const t=this.operatorParser.getLastOperatorEndPosition();return null==t||e<=t+1?this.operatorParser.getAutocompleteListParams(e,this.operatorParser.getNumOperators()-1):this.getColumnAutocompleteListParams()}return")"===this.params.expression[e-1]?{enabled:!1}:this.operatorParser.getAutocompleteListParams(e)}return i}updateExpression(e,t,i){var n;const s=this.params.expression,r=this.getExpressionParserIndex(e);if(null==r){const e="column"===i?this.params.advancedFilterExpressionService.getColumnValue(t):null!=(n=t.displayValue)?n:t.key;return Km(s,this.startPosition,this.startPosition,e,!0)}const o=this.expressionParsers[r].updateExpression(e,t,i);return null==o?"column"===i?Km(s,e,s.length-1,this.params.advancedFilterExpressionService.getColumnValue(t),!0):null!=this.endPosition&&e>this.endPosition+1?null:this.operatorParser.updateExpression(e,t,r):o}getModel(){return this.expressionParsers.length>1?{filterType:"join",type:this.operatorParser.getModel(),conditions:this.expressionParsers.map(e=>e.getModel())}:this.expressionParsers[0].getModel()}getColumnAutocompleteListParams(){return this.params.advancedFilterExpressionService.generateAutocompleteListParams(this.params.advancedFilterExpressionService.getColumnAutocompleteEntries(),"column","")}getExpressionParserIndex(e){let t;for(let i=0;i<this.expressionParsers.length&&!(this.expressionParsers[i].startPosition>e);i++)t=i;return t}},av=class{constructor(e){this.params=e,this.valid=!1}parseExpression(){this.joinExpressionParser=new ov(this.params,0);const e=this.joinExpressionParser.parseExpression();return this.valid=e>=this.params.expression.length-1&&this.joinExpressionParser.isValid(),this.params.expression}isValid(){return this.valid}getValidationMessage(){const e=this.joinExpressionParser.getValidationError();if(!e)return null;const{message:t,startPosition:i,endPosition:n}=e;return i<this.params.expression.length?this.params.advancedFilterExpressionService.translate("advancedFilterValidationMessage",[t,this.params.expression.slice(i,n+1).trim()]):this.params.advancedFilterExpressionService.translate("advancedFilterValidationMessageAtEnd",[t])}getFunctionString(){const e=this.createFunctionParams();return{functionString:`return ${this.joinExpressionParser.getFunctionString(e)};`,params:e}}getFunctionParsed(){const e=this.createFunctionParams();return{expressionFunction:this.joinExpressionParser.getFunctionParsed(e),params:e}}getAutocompleteListParams(e){var t;return null!=(t=this.joinExpressionParser.getAutocompleteListParams(e))?t:{enabled:!1}}updateExpression(e,t,i){return this.joinExpressionParser.updateExpression(e,t,i)}getModel(){return this.isValid()?this.joinExpressionParser.getModel():null}createFunctionParams(){return{operands:[],operators:[],evaluatorParams:[]}}},lv=class extends s.XQb{constructor(){super(...arguments),this.appliedExpression=null,this.expression=null,this.isValid=!0}postConstruct(){this.setEnabled(this.gos.get("enableAdvancedFilter"),!0),this.ctrl=this.createManagedBean(new zm(this.enabled)),this.expressionProxy={getValue:(e,t)=>{const i=this.columnModel.getPrimaryColumn(e);return i?this.valueService.getValue(i,t,!0):void 0}},this.addManagedPropertyListener("enableAdvancedFilter",e=>this.setEnabled(!!e.currentValue)),this.addManagedListener(this.eventService,s.sVA.EVENT_NEW_COLUMNS_LOADED,e=>this.onNewColumnsLoaded(e)),this.addManagedPropertyListener("includeHiddenColumnsInAdvancedFilter",()=>this.updateValidity())}isEnabled(){return this.enabled}isFilterPresent(){return!!this.expressionFunction}doesFilterPass(e){return this.expressionFunction(this.expressionProxy,e,this.expressionParams)}getModel(){var e;const t=this.createExpressionParser(this.appliedExpression);return null==t||t.parseExpression(),null!=(e=null==t?void 0:t.getModel())?e:null}setModel(e){const t=(e,i)=>{if("join"===e.filterType){const n=this.advancedFilterExpressionService.parseJoinOperator(e),r=e.conditions.map(e=>t(e)).filter(e=>s._.exists(e)).join(` ${n} `);return i||e.conditions.length<=1?r:`(${r})`}return this.advancedFilterExpressionService.parseColumnFilterModel(e)},i=e?t(e,!0):null;this.setExpressionDisplayValue(i),this.applyExpression(),this.ctrl.refreshComp(),this.ctrl.refreshBuilderComp()}getExpressionDisplayValue(){return this.expression}setExpressionDisplayValue(e){this.expression=e}isCurrentExpressionApplied(){return this.appliedExpression===this.expression}createExpressionParser(e){return e?new av({expression:e,columnModel:this.columnModel,dataTypeService:this.dataTypeService,valueService:this.valueService,advancedFilterExpressionService:this.advancedFilterExpressionService}):null}getDefaultExpression(e){const t=this.advancedFilterExpressionService.getColumnValue(e)+" ";return{updatedValue:t,updatedPosition:t.length}}isHeaderActive(){return!this.gos.get("advancedFilterParent")}getCtrl(){return this.ctrl}setEnabled(e,t){const i=this.enabled,n=this.rowModel.getType(),r="clientSide"===n||"serverSide"===n;if(e&&!n&&s._.warnOnce("Advanced Filter is only supported with the Client-Side Row Model or Server-Side Row Model."),this.enabled=e&&r,!t&&this.enabled!==i){const e={type:s.sVA.EVENT_ADVANCED_FILTER_ENABLED_CHANGED,enabled:this.enabled};this.eventService.dispatchEvent(e)}}applyExpression(){const e=this.createExpressionParser(this.expression);null==e||e.parseExpression(),this.applyExpressionFromParser(e)}applyExpressionFromParser(e){if(this.isValid=!e||e.isValid(),!e||!this.isValid)return this.expressionFunction=null,this.expressionParams=null,void(this.appliedExpression=null);const{expressionFunction:t,params:i}=this.getFunction(e);this.expressionFunction=t,this.expressionParams=i,this.appliedExpression=this.expression}getFunction(e){if(this.gos.get("suppressAdvancedFilterEval"))return e.getFunctionParsed();{const{functionString:t,params:i}=e.getFunctionString();return{expressionFunction:new Function("expressionProxy","node","params",t),params:i}}}updateValidity(){this.advancedFilterExpressionService.resetColumnCaches();const e=this.createExpressionParser(this.expression);null==e||e.parseExpression();const t=(!e||e.isValid())!==this.isValid;return this.applyExpressionFromParser(e),this.ctrl.refreshComp(),this.ctrl.refreshBuilderComp(),t}onNewColumnsLoaded(e){if("gridInitializing"!==e.source||!this.dataTypeService.isPendingInference())return;this.ctrl.setInputDisabled(!0);const t=this.addManagedListener(this.eventService,s.sVA.EVENT_DATA_TYPES_INFERRED,()=>{null==t||t(),this.ctrl.setInputDisabled(!1)})}};Am([(0,s.dsm)("valueService")],lv.prototype,"valueService",2),Am([(0,s.dsm)("columnModel")],lv.prototype,"columnModel",2),Am([(0,s.dsm)("dataTypeService")],lv.prototype,"dataTypeService",2),Am([(0,s.dsm)("rowModel")],lv.prototype,"rowModel",2),Am([(0,s.dsm)("advancedFilterExpressionService")],lv.prototype,"advancedFilterExpressionService",2),Am([s.o7C],lv.prototype,"postConstruct",1),lv=Am([(0,s.dR4)("advancedFilterService")],lv);var cv={version:"31.3.4",moduleName:s.zsj.AdvancedFilterModule,beans:[lv,sv],agStackComponents:[{componentName:"agAdvancedFilter",componentClass:Um}],dependantModules:[fm]},hv={};nm(hv,{GridChartsModule:()=>Aw,__FORCE_MODULE_DETECTION_AG_GRID_CORE_EXT:()=>Tw,agCharts:()=>Dw});var dv=Object.defineProperty,uv=Object.defineProperties,pv=Object.getOwnPropertyDescriptor,gv=Object.getOwnPropertyDescriptors,fv=Object.getOwnPropertySymbols,mv=Object.prototype.hasOwnProperty,vv=Object.prototype.propertyIsEnumerable,yv=(e,t,i)=>t in e?dv(e,t,{enumerable:!0,configurable:!0,writable:!0,value:i}):e[t]=i,Cv=(e,t)=>{for(var i in t||(t={}))mv.call(t,i)&&yv(e,i,t[i]);if(fv)for(var i of fv(t))vv.call(t,i)&&yv(e,i,t[i]);return e},bv=(e,t)=>uv(e,gv(t)),Sv=(e,t,i,n)=>{for(var s,r=n>1?void 0:n?pv(t,i):t,o=e.length-1;o>=0;o--)(s=e[o])&&(r=(n?s(t,i,r):s(r))||r);return n&&r&&dv(t,i,r),r},wv=class extends s.XQb{constructor(){super(...arguments),this.cellRanges=[],this.bodyScrollListener=this.onBodyScroll.bind(this),this.dragging=!1,this.intersectionRange=!1}init(){this.addManagedListener(this.eventService,s.sVA.EVENT_NEW_COLUMNS_LOADED,()=>this.onColumnsChanged()),this.addManagedListener(this.eventService,s.sVA.EVENT_COLUMN_VISIBLE,this.onColumnsChanged.bind(this)),this.addManagedListener(this.eventService,s.sVA.EVENT_COLUMN_VALUE_CHANGED,this.onColumnsChanged.bind(this)),this.addManagedListener(this.eventService,s.sVA.EVENT_COLUMN_PIVOT_MODE_CHANGED,()=>this.removeAllCellRanges()),this.addManagedListener(this.eventService,s.sVA.EVENT_COLUMN_ROW_GROUP_CHANGED,()=>this.removeAllCellRanges()),this.addManagedListener(this.eventService,s.sVA.EVENT_COLUMN_PIVOT_CHANGED,()=>this.removeAllCellRanges()),this.addManagedListener(this.eventService,s.sVA.EVENT_COLUMN_GROUP_OPENED,this.refreshLastRangeStart.bind(this)),this.addManagedListener(this.eventService,s.sVA.EVENT_COLUMN_MOVED,this.refreshLastRangeStart.bind(this)),this.addManagedListener(this.eventService,s.sVA.EVENT_COLUMN_PINNED,this.refreshLastRangeStart.bind(this)),this.ctrlsService.whenReady(e=>{const t=e.gridBodyCtrl;this.autoScrollService=new s.MSA({scrollContainer:t.getBodyViewportElement(),scrollAxis:"xy",getVerticalPosition:()=>t.getScrollFeature().getVScrollPosition().top,setVerticalPosition:e=>t.getScrollFeature().setVerticalScrollPosition(e),getHorizontalPosition:()=>t.getScrollFeature().getHScrollPosition().left,setHorizontalPosition:e=>t.getScrollFeature().setHorizontalScrollPosition(e),shouldSkipVerticalScroll:()=>!this.gos.isDomLayout("normal"),shouldSkipHorizontalScroll:()=>!t.getScrollFeature().isHorizontalScrollShowing()})})}onColumnsChanged(){this.refreshLastRangeStart();const e=this.columnModel.getAllDisplayedColumns();this.cellRanges.forEach(t=>{const i=t.columns;t.columns=t.columns.filter(t=>t.isVisible()&&-1!==e.indexOf(t)),!s._.areEqual(i,t.columns)&&this.dispatchChangedEvent(!1,!0,t.id)});const t=this.cellRanges.length;this.cellRanges=this.cellRanges.filter(e=>e.columns.length>0),t>this.cellRanges.length&&this.dispatchChangedEvent(!1,!0)}refreshLastRangeStart(){const e=s._.last(this.cellRanges);e&&this.refreshRangeStart(e)}isContiguousRange(e){const t=e.columns;if(!t.length)return!1;const i=this.columnModel.getAllDisplayedColumns(),n=t.map(e=>i.indexOf(e)).sort((e,t)=>e-t);return s._.last(n)-n[0]+1===t.length}getRangeStartRow(e){return e.startRow&&e.endRow?this.rowPositionUtils.before(e.startRow,e.endRow)?e.startRow:e.endRow:{rowIndex:0,rowPinned:this.pinnedRowModel.getPinnedTopRowCount()>0?"top":null}}getRangeEndRow(e){if(e.startRow&&e.endRow)return this.rowPositionUtils.before(e.startRow,e.endRow)?e.endRow:e.startRow;const t=this.pinnedRowModel.getPinnedBottomRowCount();return t>0?{rowIndex:t-1,rowPinned:"bottom"}:{rowIndex:this.rowModel.getRowCount()-1,rowPinned:null}}setRangeToCell(e,t=!1){if(!this.gos.get("enableRangeSelection"))return;const i=this.calculateColumnsBetween(e.column,e.column);if(!i)return;(this.gos.get("suppressMultiRangeSelection")||!t||s._.missing(this.cellRanges))&&this.removeAllCellRanges(!0);const n={rowIndex:e.rowIndex,rowPinned:e.rowPinned},r={startRow:n,endRow:n,columns:i,startColumn:e.column};this.cellRanges.push(r),this.setNewestRangeStartCell(e),this.onDragStop(),this.dispatchChangedEvent(!0,!0)}extendLatestRangeToCell(e){if(this.isEmpty()||!this.newestRangeStartCell)return;const t=s._.last(this.cellRanges);this.updateRangeEnd(t,e)}updateRangeEnd(e,t,i=!1){const n=t.column,s=this.calculateColumnsBetween(e.startColumn,n);s&&!this.isLastCellOfRange(e,t)&&(e.columns=s,e.endRow={rowIndex:t.rowIndex,rowPinned:t.rowPinned},i||this.dispatchChangedEvent(!0,!0,e.id))}refreshRangeStart(e){const{startColumn:t,columns:i}=e,n=(t,i)=>{const n=e.columns.filter(e=>e!==t);t?(e.startColumn=t,e.columns=i?[t,...n]:[...n,t]):e.columns=n},{left:r,right:o}=this.getRangeEdgeColumns(e);t!==i[0]||t===r?t===s._.last(i)&&t===o&&n(o,!1):n(r,!0)}getRangeEdgeColumns(e){const t=this.columnModel.getAllDisplayedColumns(),i=e.columns.map(e=>t.indexOf(e)).filter(e=>e>-1).sort((e,t)=>e-t);return{left:t[i[0]],right:t[s._.last(i)]}}extendLatestRangeInDirection(e){if(this.isEmpty()||!this.newestRangeStartCell)return;const t=e.key,i=e.ctrlKey||e.metaKey,n=s._.last(this.cellRanges),r=this.newestRangeStartCell,o=n.columns[0],a=s._.last(n.columns),l=n.endRow.rowIndex,c=n.endRow.rowPinned,h={column:r.column===o?a:o,rowIndex:l,rowPinned:c},d=this.cellNavigationService.getNextCellToFocus(t,h,i);return d?(this.setCellRange({rowStartIndex:r.rowIndex,rowStartPinned:r.rowPinned,rowEndIndex:d.rowIndex,rowEndPinned:d.rowPinned,columnStart:r.column,columnEnd:d.column}),d):void 0}setCellRange(e){this.gos.get("enableRangeSelection")&&(this.removeAllCellRanges(!0),this.addCellRange(e))}setCellRanges(e){s._.shallowCompare(this.cellRanges,e)||(this.removeAllCellRanges(!0),e.forEach(e=>{e.columns&&e.startRow&&this.setNewestRangeStartCell({rowIndex:e.startRow.rowIndex,rowPinned:e.startRow.rowPinned,column:e.columns[0]}),this.cellRanges.push(e)}),this.dispatchChangedEvent(!1,!0))}setNewestRangeStartCell(e){this.newestRangeStartCell=e}clearCellRangeCellValues(e){let{cellRanges:t}=e;const{cellEventSource:i="rangeService",dispatchWrapperEvents:n,wrapperEventSource:r="deleteKey"}=e;if(n){const e={type:s.sVA.EVENT_RANGE_DELETE_START,source:r};this.eventService.dispatchEvent(e)}if(t||(t=this.cellRanges),t.forEach(e=>{this.forEachRowInRange(e,t=>{var n;const s=this.rowPositionUtils.getRowNode(t);if(s)for(let t=0;t<e.columns.length;t++){const r=this.columnModel.getGridColumn(e.columns[t]);if(!r||!r.isCellEditable(s))continue;const o=null!=(n=this.valueService.parseValue(r,s,"",s.getValueFromValueService(r)))?n:null;s.setDataValue(r,o,i)}})}),n){const e={type:s.sVA.EVENT_RANGE_DELETE_END,source:r};this.eventService.dispatchEvent(e)}}createCellRangeFromCellRangeParams(e){return this.createPartialCellRangeFromRangeParams(e,!1)}createPartialCellRangeFromRangeParams(e,t){let i,n=!1;if(e.columns)i=e.columns.map(e=>this.columnModel.getColumnWithValidation(e)).filter(e=>e);else{const t=this.columnModel.getColumnWithValidation(e.columnStart),s=this.columnModel.getColumnWithValidation(e.columnEnd);if(!t||!s)return;i=this.calculateColumnsBetween(t,s),i&&i.length&&(n=i[0]!==t)}if(i&&(t||0!==i.length))return{startRow:null!=e.rowStartIndex?{rowIndex:e.rowStartIndex,rowPinned:e.rowStartPinned||null}:void 0,endRow:null!=e.rowEndIndex?{rowIndex:e.rowEndIndex,rowPinned:e.rowEndPinned||null}:void 0,columns:i,startColumn:n?s._.last(i):i[0]}}addCellRange(e){if(!this.gos.get("enableRangeSelection"))return;const t=this.createCellRangeFromCellRangeParams(e);t&&(t.startRow&&this.setNewestRangeStartCell({rowIndex:t.startRow.rowIndex,rowPinned:t.startRow.rowPinned,column:t.startColumn}),this.cellRanges.push(t),this.dispatchChangedEvent(!1,!0,t.id))}getCellRanges(){return this.cellRanges}isEmpty(){return 0===this.cellRanges.length}isMoreThanOneCell(){const e=this.cellRanges.length;if(0===e)return!1;if(e>1)return!0;const t=this.cellRanges[0],i=this.getRangeStartRow(t),n=this.getRangeEndRow(t);return i.rowPinned!==n.rowPinned||i.rowIndex!==n.rowIndex||1!==t.columns.length}areAllRangesAbleToMerge(){const e=new Map;if(this.cellRanges.length<=1)return!0;let t;this.cellRanges.forEach(t=>{this.forEachRowInRange(t,i=>{const n=`${i.rowPinned||"normal"}_${i.rowIndex}`,s=e.get(n),r=t.columns.map(e=>e.getId());if(s){const e=r.filter(e=>-1===s.indexOf(e));s.push(...e)}else e.set(n,r)})});for(const i of e.values()){const e=i.sort().join();if(void 0!==t){if(t!==e)return!1}else t=e}return!0}forEachRowInRange(e,t){const i=this.getRangeStartRow(e),n=this.getRangeEndRow(e);let s=i;for(;s&&(t(s),!this.rowPositionUtils.sameRow(s,n));)s=this.cellNavigationService.getRowBelow(s)}removeAllCellRanges(e){this.isEmpty()||(this.onDragStop(),this.cellRanges.length=0,e||this.dispatchChangedEvent(!1,!0))}onBodyScroll(){this.dragging&&this.lastMouseEvent&&this.onDragging(this.lastMouseEvent)}isCellInAnyRange(e){return this.getCellRangeCount(e)>0}isCellInSpecificRange(e,t){const i=null!==t.columns&&s._.includes(t.columns,e.column),n=this.isRowInRange(e.rowIndex,e.rowPinned,t);return i&&n}isLastCellOfRange(e,t){const{startRow:i,endRow:n}=e,r=this.rowPositionUtils.before(i,n)?n:i,o=t.rowIndex===r.rowIndex&&t.rowPinned===r.rowPinned,a=e.columns[0],l=s._.last(e.columns),c=e.startColumn===a?l:a;return t.column===c&&o}isBottomRightCell(e,t){const i=this.columnModel.getAllDisplayedColumns(),n=e.columns.map(e=>i.indexOf(e)).sort((e,t)=>e-t),{startRow:r,endRow:o}=e,a=this.rowPositionUtils.before(r,o)?o:r,l=i.indexOf(t.column)===s._.last(n),c=t.rowIndex===a.rowIndex&&s._.makeNull(t.rowPinned)===s._.makeNull(a.rowPinned);return l&&c}getCellRangeCount(e){return this.isEmpty()?0:this.cellRanges.filter(t=>this.isCellInSpecificRange(e,t)).length}isRowInRange(e,t,i){const n=this.getRangeStartRow(i),s=this.getRangeEndRow(i),r={rowIndex:e,rowPinned:t||null},o=r.rowIndex===n.rowIndex&&r.rowPinned==n.rowPinned,a=r.rowIndex===s.rowIndex&&r.rowPinned==s.rowPinned;if(o||a)return!0;const l=!this.rowPositionUtils.before(r,n),c=this.rowPositionUtils.before(r,s);return l&&c}getDraggingRange(){return this.draggingRange}onDragStart(e){if(!this.gos.get("enableRangeSelection"))return;const{ctrlKey:t,metaKey:i,shiftKey:n}=e,r=t||i,o=!this.gos.get("suppressMultiRangeSelection")&&r,a=n&&s._.existsAndNotEmpty(this.cellRanges);o||a&&!s._.exists(s._.last(this.cellRanges).type)||this.removeAllCellRanges(!0);const l=this.dragService.getStartTarget();if(l&&this.updateValuesOnMove(l),this.lastCellHovered){if(this.dragging=!0,this.lastMouseEvent=e,this.intersectionRange=o&&this.getCellRangeCount(this.lastCellHovered)>1,a||this.setNewestRangeStartCell(this.lastCellHovered),this.cellRanges.length>0)this.draggingRange=s._.last(this.cellRanges);else{const e={rowIndex:this.lastCellHovered.rowIndex,rowPinned:this.lastCellHovered.rowPinned};this.draggingRange={startRow:e,endRow:e,columns:[this.lastCellHovered.column],startColumn:this.newestRangeStartCell.column},this.cellRanges.push(this.draggingRange)}this.ctrlsService.getGridBodyCtrl().addScrollEventListener(this.bodyScrollListener),this.dispatchChangedEvent(!0,!1,this.draggingRange.id)}}intersectLastRange(e){if(e&&this.dragging)return;if(this.gos.get("suppressMultiRangeSelection"))return;if(this.isEmpty())return;const t=this.rowPositionUtils,i=s._.last(this.cellRanges),n=this.getRangeStartRow(i),r=this.getRangeEndRow(i),o=[];this.cellRanges.slice(0,-1).forEach(e=>{const a=this.getRangeStartRow(e),l=this.getRangeEndRow(e),c=e.columns,h=c.filter(e=>-1===i.columns.indexOf(e));if(h.length===c.length)return void o.push(e);if(t.before(r,a)||t.before(l,n))return void o.push(e);const d=o.length;if(t.before(a,n)){const e={columns:[...c],startColumn:i.startColumn,startRow:Cv({},a),endRow:this.cellNavigationService.getRowAbove(n)};o.push(e)}if(h.length>0){const e={columns:h,startColumn:s._.includes(h,i.startColumn)?i.startColumn:h[0],startRow:this.rowMax([Cv({},n),Cv({},a)]),endRow:this.rowMin([Cv({},r),Cv({},l)])};o.push(e)}t.before(r,l)&&o.push({columns:[...c],startColumn:i.startColumn,startRow:this.cellNavigationService.getRowBelow(r),endRow:Cv({},l)}),o.length-d===1&&(o[o.length-1].id=e.id)}),this.cellRanges=o,e&&this.dispatchChangedEvent(!1,!0)}rowMax(e){let t;return e.forEach(e=>{(void 0===t||this.rowPositionUtils.before(t,e))&&(t=e)}),t}rowMin(e){let t;return e.forEach(e=>{(void 0===t||this.rowPositionUtils.before(e,t))&&(t=e)}),t}updateValuesOnMove(e){const t=s._.getCtrlForEventTarget(this.gos,e,s.wX9.DOM_DATA_KEY_CELL_CTRL),i=null==t?void 0:t.getCellPosition();this.cellHasChanged=!1,!i||this.lastCellHovered&&this.cellPositionUtils.equals(i,this.lastCellHovered)||(this.lastCellHovered&&(this.cellHasChanged=!0),this.lastCellHovered=i)}onDragging(e){if(!this.dragging||!e)return;this.updateValuesOnMove(e.target),this.lastMouseEvent=e;const t=this.lastCellHovered,i=e=>t&&t.rowPinned===e&&this.newestRangeStartCell.rowPinned===e,n=i("top")||i("bottom");if(this.autoScrollService.check(e,n),!this.cellHasChanged)return;const s=this.calculateColumnsBetween(this.newestRangeStartCell.column,t.column);s&&(this.draggingRange.endRow={rowIndex:t.rowIndex,rowPinned:t.rowPinned},this.draggingRange.columns=s,this.dispatchChangedEvent(!1,!1,this.draggingRange.id))}onDragStop(){if(!this.dragging)return;const{id:e}=this.draggingRange;this.autoScrollService.ensureCleared(),this.ctrlsService.getGridBodyCtrl().removeScrollEventListener(this.bodyScrollListener),this.lastMouseEvent=null,this.dragging=!1,this.draggingRange=void 0,this.lastCellHovered=void 0,this.intersectionRange&&(this.intersectionRange=!1,this.intersectLastRange()),this.dispatchChangedEvent(!1,!0,e)}dispatchChangedEvent(e,t,i){const n={type:s.sVA.EVENT_RANGE_SELECTION_CHANGED,started:e,finished:t,id:i};this.eventService.dispatchEvent(n)}calculateColumnsBetween(e,t){const i=this.columnModel.getAllDisplayedColumns(),n=e===t,s=i.indexOf(e);if(s<0)return void console.warn(`AG Grid: column ${e.getId()} is not visible`);const r=n?s:i.indexOf(t);if(r<0)return void console.warn(`AG Grid: column ${t.getId()} is not visible`);if(n)return[e];const o=Math.min(s,r),a=o===s?r:s,l=[];for(let e=o;e<=a;e++)l.push(i[e]);return l}};Sv([(0,s.dsm)("rowModel")],wv.prototype,"rowModel",2),Sv([(0,s.dsm)("dragService")],wv.prototype,"dragService",2),Sv([(0,s.dsm)("columnModel")],wv.prototype,"columnModel",2),Sv([(0,s.dsm)("cellNavigationService")],wv.prototype,"cellNavigationService",2),Sv([(0,s.dsm)("pinnedRowModel")],wv.prototype,"pinnedRowModel",2),Sv([(0,s.dsm)("rowPositionUtils")],wv.prototype,"rowPositionUtils",2),Sv([(0,s.dsm)("cellPositionUtils")],wv.prototype,"cellPositionUtils",2),Sv([(0,s.dsm)("ctrlsService")],wv.prototype,"ctrlsService",2),Sv([(0,s.dsm)("valueService")],wv.prototype,"valueService",2),Sv([s.o7C],wv.prototype,"init",1),wv=Sv([(0,s.dR4)("rangeService")],wv);var xv=class extends s.uAl{constructor(){super(...arguments),this.changedCalculatedValues=!1,this.dragging=!1,this.shouldDestroyOnEndDragging=!1}init(){this.dragService.addDragSource({dragStartPixels:0,eElement:this.getGui(),onDragStart:this.onDragStart.bind(this),onDragging:e=>{this.dragging=!0,this.rangeService.autoScrollService.check(e),this.changedCalculatedValues&&(this.onDrag(e),this.changedCalculatedValues=!1)},onDragStop:e=>{this.dragging=!1,this.onDragEnd(e),this.clearValues(),this.rangeService.autoScrollService.ensureCleared(),document.body.classList.remove(this.getDraggingCssClass()),this.shouldDestroyOnEndDragging&&this.destroy()}}),this.addManagedListener(this.getGui(),"mousedown",this.preventRangeExtension.bind(this))}isDragging(){return this.dragging}getCellCtrl(){return this.cellCtrl}setCellCtrl(e){this.cellCtrl=e}getCellRange(){return this.cellRange}setCellRange(e){this.cellRange=e}getRangeStartRow(){return this.rangeStartRow}setRangeStartRow(e){this.rangeStartRow=e}getRangeEndRow(){return this.rangeEndRow}setRangeEndRow(e){this.rangeEndRow=e}getLastCellHovered(){return this.lastCellHovered}preventRangeExtension(e){e.stopPropagation()}onDragStart(e){this.cellHoverListener=this.addManagedListener(this.ctrlsService.get("gridCtrl").getGui(),"mousemove",this.updateValuesOnMove.bind(this)),document.body.classList.add(this.getDraggingCssClass())}getDraggingCssClass(){return`ag-dragging-${this.type===s.LIk.FILL?"fill":"range"}-handle`}updateValuesOnMove(e){const t=this.mouseEventService.getCellPositionForEvent(e);!t||this.lastCellHovered&&this.cellPositionUtils.equals(t,this.lastCellHovered)||(this.lastCellHovered=t,this.changedCalculatedValues=!0)}getType(){return this.type}refresh(e){const t=this.getCellCtrl(),i=this.getGui(),n=s._.last(this.rangeService.getCellRanges()),r=n.startRow,o=n.endRow;if(r&&o&&(this.rowPositionUtils.before(o,r)?(this.setRangeStartRow(o),this.setRangeEndRow(r)):(this.setRangeStartRow(r),this.setRangeEndRow(o))),t!==e||!s._.isVisible(i)){this.setCellCtrl(e);const t=e.getComp().getParentOfValue();t&&t.appendChild(i)}this.setCellRange(n)}clearValues(){this.lastCellHovered=void 0,this.removeListeners()}removeListeners(){this.cellHoverListener&&(this.cellHoverListener(),this.cellHoverListener=void 0)}destroy(){if(!this.shouldDestroyOnEndDragging&&this.isDragging())return s._.setDisplayed(this.getGui(),!1),void(this.shouldDestroyOnEndDragging=!0);this.shouldDestroyOnEndDragging=!1,super.destroy(),this.removeListeners();const e=this.getGui();e.parentElement&&e.parentElement.removeChild(e)}};function Ev(e){const t=e.length;let i=0;if(t<=1)return e;for(let t=0;t<e.length;t++){const n=e[t],s=n.toString().split("e-");s.length>1?i=Math.max(i,parseInt(s[1],10)):Math.floor(n)!==n&&(i=Math.max(i,n.toString().split(".")[1].length))}let n=0,s=0,r=0,o=0,a=0;for(let i=0;i<t;i++)a=e[i],n+=i,s+=a,o+=i*i,r+=i*a;const l=(t*r-n*s)/(t*o-n*n),c=s/t-l*n/t,h=[];for(let e=0;e<=t;e++)h.push(parseFloat((e*l+c).toFixed(i)));return h}Sv([(0,s.dsm)("rowRenderer")],xv.prototype,"rowRenderer",2),Sv([(0,s.dsm)("dragService")],xv.prototype,"dragService",2),Sv([(0,s.dsm)("rangeService")],xv.prototype,"rangeService",2),Sv([(0,s.dsm)("mouseEventService")],xv.prototype,"mouseEventService",2),Sv([(0,s.dsm)("columnModel")],xv.prototype,"columnModel",2),Sv([(0,s.dsm)("cellNavigationService")],xv.prototype,"cellNavigationService",2),Sv([(0,s.dsm)("navigationService")],xv.prototype,"navigationService",2),Sv([(0,s.dsm)("rowPositionUtils")],xv.prototype,"rowPositionUtils",2),Sv([(0,s.dsm)("cellPositionUtils")],xv.prototype,"cellPositionUtils",2),Sv([(0,s.dsm)("ctrlsService")],xv.prototype,"ctrlsService",2),Sv([s.o7C],xv.prototype,"init",1);var Mv=class e extends xv{constructor(){super(e.TEMPLATE),this.markedCells=[],this.cellValues=[],this.isUp=!1,this.isLeft=!1,this.isReduce=!1,this.type=s.LIk.FILL}updateValuesOnMove(e){super.updateValuesOnMove(e),this.initialXY||(this.initialXY=this.mouseEventService.getNormalisedPosition(e));const{x:t,y:i}=this.initialXY,{x:n,y:s}=this.mouseEventService.getNormalisedPosition(e),r=Math.abs(t-n),o=Math.abs(i-s),a=this.getFillHandleDirection();let l;l="xy"===a?r>o?"x":"y":a,l!==this.dragAxis&&(this.dragAxis=l,this.changedCalculatedValues=!0)}onDrag(e){if(!this.initialPosition){const e=this.getCellCtrl();if(!e)return;this.initialPosition=e.getCellPosition()}const t=this.getLastCellHovered();t&&this.markPathFrom(this.initialPosition,t)}onDragEnd(e){if(this.initialXY=null,!this.markedCells.length)return;const t="x"===this.dragAxis,i=this.getCellRange(),n=i.columns.length,s=this.getRangeStartRow(),r=this.getRangeEndRow();let o;if(this.isUp||this.isLeft){const e=t?s:this.lastCellMarked;o=this.rangeService.createCellRangeFromCellRangeParams({rowStartIndex:e.rowIndex,rowStartPinned:e.rowPinned,columnStart:t?this.lastCellMarked.column:i.columns[0],rowEndIndex:r.rowIndex,rowEndPinned:r.rowPinned,columnEnd:i.columns[n-1]})}else o=this.rangeService.createCellRangeFromCellRangeParams({rowStartIndex:s.rowIndex,rowStartPinned:s.rowPinned,columnStart:i.columns[0],rowEndIndex:t?r.rowIndex:this.lastCellMarked.rowIndex,rowEndPinned:t?r.rowPinned:this.lastCellMarked.rowPinned,columnEnd:t?this.lastCellMarked.column:i.columns[n-1]});o&&(this.raiseFillStartEvent(),this.handleValueChanged(i,o,e),this.rangeService.setCellRanges([o]),this.raiseFillEndEvent(i,o))}getFillHandleDirection(){const e=this.gos.get("fillHandleDirection");return e?"x"!==e&&"y"!==e&&"xy"!==e?(s._.warnOnce("valid values for fillHandleDirection are 'x', 'y' and 'xy'. Default to 'xy'."),"xy"):e:"xy"}raiseFillStartEvent(){const e={type:s.sVA.EVENT_FILL_START};this.eventService.dispatchEvent(e)}raiseFillEndEvent(e,t){const i={type:s.sVA.EVENT_FILL_END,initialRange:e,finalRange:t};this.eventService.dispatchEvent(i)}handleValueChanged(e,t,i){const n=this.rangeService.getRangeEndRow(e),r=this.rangeService.getRangeStartRow(e),o=this.rangeService.getRangeEndRow(t),a=this.rangeService.getRangeStartRow(t),l="y"===this.dragAxis;if(this.isReduce&&!this.gos.get("suppressClearOnFillReduction")){const i=l?e.columns:e.columns.filter(e=>t.columns.indexOf(e)<0),s=l?this.cellNavigationService.getRowBelow(o):a;return void(s&&this.clearCellsInRange(s,n,i))}const c=[],h=[],d=[],u=[];let p=!0,g=0;const f=()=>{c.length=0,h.length=0,d.length=0,u.length=0,g=0},m=(t,i)=>{let h=this.isUp?n:r,d=!1;for(l&&(p=!0,f());!d&&h;){const u=this.rowPositionUtils.getRowNode(h);if(!u)break;l&&t?v(c,t,u,()=>!this.rowPositionUtils.sameRow(h,this.isUp?r:n)):i&&(p=!0,f(),i.forEach(t=>v(c,t,u,()=>t!==(this.isLeft?e.columns[0]:s._.last(e.columns))))),d=this.rowPositionUtils.sameRow(h,this.isUp?a:o),h=this.isUp?this.cellNavigationService.getRowAbove(h):this.cellNavigationService.getRowBelow(h)}},v=(e,t,n,r)=>{var o,a;let l,c=!1;if(p)l=this.valueService.getValue(t,n),h.push(l),d.push(this.valueService.getValue(t,n,void 0,!0)),u.push(this.valueService.formatValue(t,n,l)),p=r();else{const{value:r,fromUserFunction:p,sourceCol:f,sourceRowNode:m}=this.processValues({event:i,values:e,initialValues:h,initialNonAggregatedValues:d,initialFormattedValues:u,col:t,rowNode:n,idx:g++});if(l=r,t.isCellEditable(n)){const e=this.valueService.getValue(t,n);p||(f&&!1!==(null==(o=f.getColDef())?void 0:o.useValueFormatterForExport)&&(l=null!=(a=this.valueService.formatValue(f,m,l))?a:l),!1!==t.getColDef().useValueParserForImport&&(l=this.valueService.parseValue(t,n,f?l:s._.toStringOrNull(l),e))),p&&e===l?c=!0:n.setDataValue(t,l,"rangeService")}}c||e.push({value:l,column:t,rowNode:n})};if(l)e.columns.forEach(e=>{m(e)});else{const e=this.isLeft?[...t.columns].reverse():t.columns;m(void 0,e)}}clearCellsInRange(e,t,i){const n={startRow:e,endRow:t,columns:i,startColumn:i[0]};this.rangeService.clearCellRangeCellValues({cellRanges:[n]})}processValues(e){const{event:t,values:i,initialValues:n,initialNonAggregatedValues:r,initialFormattedValues:o,col:a,rowNode:l,idx:c}=e,h=this.gos.getCallback("fillOperation");let d;if(d="y"===this.dragAxis?this.isUp?"up":"down":this.isLeft?"left":"right",h){const e=h({event:t,values:i.map(({value:e})=>e),initialValues:n,initialNonAggregatedValues:r,initialFormattedValues:o,currentIndex:c,currentCellValue:this.valueService.getValue(a,l),direction:d,column:a,rowNode:l});if(!1!==e)return{value:e,fromUserFunction:!0}}const u=!i.some(({value:e})=>{const t=parseFloat(e);return isNaN(t)||t.toString()!==e.toString()});if(t.altKey||!u){if(u&&1===n.length){const e=this.isUp||this.isLeft?-1:1;return{value:parseFloat(s._.last(i).value)+1*e,fromUserFunction:!1}}const{value:e,column:t,rowNode:r}=i[c%i.length];return{value:e,fromUserFunction:!1,sourceCol:t,sourceRowNode:r}}return{value:s._.last(Ev(i.map(({value:e})=>Number(e)))),fromUserFunction:!1}}clearValues(){this.clearMarkedPath(),this.clearCellValues(),this.lastCellMarked=void 0,super.clearValues()}clearMarkedPath(){this.markedCells.forEach(e=>{if(!e.isAlive())return;const t=e.getComp();t.addOrRemoveCssClass("ag-selection-fill-top",!1),t.addOrRemoveCssClass("ag-selection-fill-right",!1),t.addOrRemoveCssClass("ag-selection-fill-bottom",!1),t.addOrRemoveCssClass("ag-selection-fill-left",!1)}),this.markedCells.length=0,this.isUp=!1,this.isLeft=!1,this.isReduce=!1}clearCellValues(){this.cellValues.length=0}markPathFrom(e,t){if(this.clearMarkedPath(),this.clearCellValues(),"y"===this.dragAxis){if(this.rowPositionUtils.sameRow(t,e))return;const i=this.rowPositionUtils.before(t,e),n=this.getRangeStartRow(),s=this.getRangeEndRow();i&&(t.rowPinned==n.rowPinned&&t.rowIndex>=n.rowIndex||n.rowPinned!=s.rowPinned&&t.rowPinned==s.rowPinned&&t.rowIndex<=s.rowIndex)?(this.reduceVertical(e,t),this.isReduce=!0):(this.extendVertical(e,t,i),this.isReduce=!1)}else{const i=e.column,n=t.column;if(i===n)return;const s=this.columnModel.getAllDisplayedColumns(),r=s.indexOf(i),o=s.indexOf(n);o<=r&&o>=s.indexOf(this.getCellRange().columns[0])?(this.reduceHorizontal(e,t),this.isReduce=!0):(this.extendHorizontal(e,t,o<r),this.isReduce=!1)}this.lastCellMarked=t}extendVertical(e,t,i){const{navigationService:n,rangeService:s}=this;let r=e;do{const o=this.getCellRange(),a=o.columns.length;for(let l=0;l<a;l++){const c=o.columns[l],h={rowIndex:r.rowIndex,rowPinned:r.rowPinned},d=bv(Cv({},h),{column:c}),u=s.isCellInSpecificRange(d,o),p=this.rowPositionUtils.sameRow(r,e);if(i&&(this.isUp=!0),!p){const e=n.getCellByPosition(d);if(e){this.markedCells.push(e);const n=e.getComp();u||(n.addOrRemoveCssClass("ag-selection-fill-left",0===l),n.addOrRemoveCssClass("ag-selection-fill-right",l===a-1)),n.addOrRemoveCssClass(i?"ag-selection-fill-top":"ag-selection-fill-bottom",this.rowPositionUtils.sameRow(r,t))}}}if(this.rowPositionUtils.sameRow(r,t))break}while(r=i?this.cellNavigationService.getRowAbove(r):this.cellNavigationService.getRowBelow(r))}reduceVertical(e,t){let i=e;do{const e=this.getCellRange(),n=e.columns.length,s=this.rowPositionUtils.sameRow(i,t);for(let s=0;s<n;s++){const n={rowIndex:i.rowIndex,rowPinned:i.rowPinned},r=bv(Cv({},n),{column:e.columns[s]}),o=this.navigationService.getCellByPosition(r);o&&(this.markedCells.push(o),o.getComp().addOrRemoveCssClass("ag-selection-fill-bottom",this.rowPositionUtils.sameRow(i,t)))}if(s)break}while(i=this.cellNavigationService.getRowAbove(i))}extendHorizontal(e,t,i){const n=this.columnModel.getAllDisplayedColumns(),r=n.indexOf(i?t.column:e.column),o=n.indexOf(i?this.getCellRange().columns[0]:t.column),a=i?0:1,l=n.slice(r+a,o+a),c=this.getRangeStartRow(),h=this.getRangeEndRow();l.forEach(e=>{let t=c,n=!1;do{n=this.rowPositionUtils.sameRow(t,h);const r=this.navigationService.getCellByPosition({rowIndex:t.rowIndex,rowPinned:t.rowPinned,column:e});if(r){this.markedCells.push(r);const n=r.getComp();n.addOrRemoveCssClass("ag-selection-fill-top",this.rowPositionUtils.sameRow(t,c)),n.addOrRemoveCssClass("ag-selection-fill-bottom",this.rowPositionUtils.sameRow(t,h)),i?(this.isLeft=!0,n.addOrRemoveCssClass("ag-selection-fill-left",e===l[0])):n.addOrRemoveCssClass("ag-selection-fill-right",e===s._.last(l))}t=this.cellNavigationService.getRowBelow(t)}while(!n)})}reduceHorizontal(e,t){const i=this.columnModel.getAllDisplayedColumns(),n=i.indexOf(t.column),s=i.indexOf(e.column),r=i.slice(n,s),o=this.getRangeStartRow(),a=this.getRangeEndRow();r.forEach(e=>{let t=o,i=!1;do{i=this.rowPositionUtils.sameRow(t,a);const n=this.navigationService.getCellByPosition({rowIndex:t.rowIndex,rowPinned:t.rowPinned,column:e});n&&(this.markedCells.push(n),n.getComp().addOrRemoveCssClass("ag-selection-fill-right",e===r[0])),t=this.cellNavigationService.getRowBelow(t)}while(!i)})}refresh(e){const t=this.rangeService.getCellRanges()[0];t.startRow&&t.endRow?super.refresh(e):this.destroy()}};Mv.TEMPLATE='<div class="ag-fill-handle"></div>',Sv([(0,s.dsm)("valueService")],Mv.prototype,"valueService",2);var Av=Mv,Tv=class e extends xv{constructor(){super(e.TEMPLATE),this.type=s.LIk.RANGE,this.rangeFixed=!1}onDrag(e){const t=this.getLastCellHovered();if(!t)return;const i=this.rangeService.getCellRanges(),n=s._.last(i);this.rangeFixed||(this.fixRangeStartEnd(n),this.rangeFixed=!0),this.endPosition={rowIndex:t.rowIndex,rowPinned:t.rowPinned,column:t.column},2===i.length&&i[0].type===s.OnL.DIMENSION&&n.type===s.OnL.VALUE&&!this.rowPositionUtils.sameRow(this.endPosition,this.rangeService.getRangeEndRow(n))&&this.rangeService.updateRangeEnd(i[0],bv(Cv({},this.endPosition),{column:i[0].columns[0]}),!0),this.rangeService.extendLatestRangeToCell(this.endPosition)}onDragEnd(e){const t=s._.last(this.rangeService.getCellRanges());this.fixRangeStartEnd(t),this.rangeFixed=!1}fixRangeStartEnd(e){const t=this.rangeService.getRangeStartRow(e),i=this.rangeService.getRangeEndRow(e),n=e.columns[0];e.startRow=t,e.endRow=i,e.startColumn=n}};Tv.TEMPLATE='<div class="ag-range-handle"></div>';var Dv=Tv,Iv=class extends s.XQb{createSelectionHandle(e){return this.createBean(e===s.LIk.RANGE?new Dv:new Av)}};Iv=Sv([(0,s.dR4)("selectionHandleFactory")],Iv);var Rv={version:"31.3.4",moduleName:s.zsj.RangeSelectionModule,beans:[wv,Iv],agStackComponents:[{componentName:"AgFillHandle",componentClass:Av},{componentName:"AgRangeHandle",componentClass:Dv}],dependantModules:[fm]};rm(hv,n);var Lv=Object.defineProperty,kv=Object.defineProperties,Pv=Object.getOwnPropertyDescriptor,Nv=Object.getOwnPropertyDescriptors,Ov=Object.getOwnPropertySymbols,_v=Object.prototype.hasOwnProperty,Fv=Object.prototype.propertyIsEnumerable,Gv=(e,t,i)=>t in e?Lv(e,t,{enumerable:!0,configurable:!0,writable:!0,value:i}):e[t]=i,Vv=(e,t)=>{for(var i in t||(t={}))_v.call(t,i)&&Gv(e,i,t[i]);if(Ov)for(var i of Ov(t))Fv.call(t,i)&&Gv(e,i,t[i]);return e},Bv=(e,t)=>kv(e,Nv(t)),Hv=(e,t)=>{var i={};for(var n in e)_v.call(e,n)&&t.indexOf(n)<0&&(i[n]=e[n]);if(null!=e&&Ov)for(var n of Ov(e))t.indexOf(n)<0&&Fv.call(e,n)&&(i[n]=e[n]);return i},zv=(e,t,i,n)=>{for(var s,r=n>1?void 0:n?Pv(t,i):t,o=e.length-1;o>=0;o--)(s=e[o])&&(r=(n?s(t,i,r):s(r))||r);return n&&r&&Lv(t,i,r),r},Uv=class e extends s.XQb{getData(e){if(e.crossFiltering){if(e.grouping)return console.warn("AG Grid: crossing filtering with row grouping is not supported."),{chartData:[],columnNames:{}};if(!this.gos.isRowModelType("clientSide"))return console.warn("AG Grid: crossing filtering is only supported in the client side row model."),{chartData:[],columnNames:{}}}this.gos.isRowModelType("serverSide")&&e.pivoting&&this.updatePivotKeysForSSRM();const t=this.extractRowsFromGridRowModel(e);return t.chartData=this.aggregateRowsByDimension(e,t.chartData),t}extractRowsFromGridRowModel(t){const{crossFiltering:i,startRow:n,endRow:r,valueCols:o,dimensionCols:a,grouping:l}=t;let c=[];const h={},d={},u={};let p,g={},f=[];if(i)g=this.getFilteredRowNodes(),f=this.getAllRowNodes(),p=f.length;else{const e=this.gridRowModel.getRowCount()-1;p=n===r&&0===n&&0===a.length&&0===o.length?0:(r>=0?Math.min(r,e):e)-n+1}p>0&&o.forEach(e=>{let t=[];const i=e.getColDef().pivotKeys;i&&(t=i.slice());const n=e.getColDef().headerName;n&&t.push(n),t.length>0&&(h[e.getId()]=t)});let m,v=0;for(let s=0;s<p;s++){const r=i?f[s]:this.gridRowModel.getRow(s+n);if(r.footer){v++;continue}const h={};a.forEach(t=>{const i=t.colId,n=this.columnModel.getGridColumn(i);if(n){const t=this.valueService.getValue(n,r);if(l){const n=t&&t.toString?String(t.toString()):"",o=e.getGroupLabels(r,n);h[i]={labels:o,toString:function(){return this.labels.filter(e=>!!e).reverse().join(" - ")}},r.group&&(d[o.toString()]=s-v);const a=o.slice(1,o.length).toString();a&&(u[a]=d[a])}else h[i]=t}else h[hy.DEFAULT_CATEGORY]=s+1}),o.forEach(e=>{const n=e.getColId();if(i){const i=n+"-filtered-out",s=this.valueService.getValue(e,r),o=null!=s&&"function"==typeof s.toNumber?s.toNumber():s;g[r.id]?(h[n]=o,h[i]=t.aggFunc||t.isScatter?void 0:0):(h[n]=t.aggFunc||t.isScatter?void 0:0,h[i]=o)}else{let t=this.valueService.getValue(e,r);t&&t.hasOwnProperty("toString")&&(t=parseFloat(t.toString())),h[n]=null!=t&&"function"==typeof t.toNumber?t.toNumber():t}}),c.push(h)}if(l){const e=s._.values(u),t=c;c=[],m=[];for(let i=0;i<t.length;i++)(s._.includes(e,i)?m:c).push(t[i])}return{chartData:c,columnNames:h,groupChartData:m}}aggregateRowsByDimension(e,t){const i=e.dimensionCols;if(!e.aggFunc||0===i.length)return t;const n=s._.last(i),r=n&&n.colId,o={},a=[];if(t.forEach(e=>{let t=o;i.forEach(n=>{const s=n.colId,o=e[s];if(s===r){let n=t[o];n||(n={__children:[]},i.forEach(t=>{const i=t.colId;n[i]=e[i]}),t[o]=n,a.push(n)),n.__children.push(e)}else t[o]||(t[o]={}),t=t[o]})}),s.syG.__assertRegistered(s.zsj.RowGroupingModule,"Charting Aggregation",this.context.getGridId())){const t=this.aggregationStage;a.forEach(i=>e.valueCols.forEach(n=>{if(e.crossFiltering)e.valueCols.forEach(n=>{const s=n.getColId(),r=i.__children.filter(e=>void 0!==e[s]).map(e=>e[s]);let o=t.aggregateValues(r,e.aggFunc);i[n.getId()]=o&&void 0!==o.value?o.value:o;const a=`${s}-filtered-out`,l=i.__children.filter(e=>void 0!==e[a]).map(e=>e[a]);let c=t.aggregateValues(l,e.aggFunc);i[a]=c&&void 0!==c.value?c.value:c});else{const s=i.__children.map(e=>e[n.getId()]);let r=t.aggregateValues(s,e.aggFunc);i[n.getId()]=r&&void 0!==r.value?r.value:r}}))}return a}updatePivotKeysForSSRM(){const e=this.columnModel.getSecondaryColumns();if(!e)return;const t=this.extractPivotKeySeparator(e);e.forEach(e=>{if(""===t)e.getColDef().pivotKeys=[];else{const i=e.getColId().split(t);e.getColDef().pivotKeys=i.slice(0,i.length-1)}})}extractPivotKeySeparator(e){if(0===e.length)return"";const t=(e,i)=>{const n=e.getGroupId();return e.getParent()?t(e.getParent(),n):i.split(n)[1][0]},i=e[0];return null==i.getParent()?"":t(i.getParent(),i.getColId())}static getGroupLabels(e,t){const i=[t];for(;e&&0!==e.level;)(e=e.parent)&&i.push(e.key);return i}getFilteredRowNodes(){const e={};return this.gridRowModel.forEachNodeAfterFilterAndSort(t=>{e[t.id]=t}),e}getAllRowNodes(){let e=[];return this.gridRowModel.forEachNode(t=>{e.push(t)}),this.sortRowNodes(e)}sortRowNodes(e){const t=this.sortController.getSortOptions();return t&&0!=t.length?this.rowNodeSorter.doFullSort(e,t):e}};zv([(0,s.dsm)("rowModel")],Uv.prototype,"gridRowModel",2),zv([(0,s.dsm)("valueService")],Uv.prototype,"valueService",2),zv([(0,s.dsm)("columnModel")],Uv.prototype,"columnModel",2),zv([(0,s.dsm)("rowNodeSorter")],Uv.prototype,"rowNodeSorter",2),zv([(0,s.dsm)("sortController")],Uv.prototype,"sortController",2),zv([(0,s.Xx1)("aggregationStage")],Uv.prototype,"aggregationStage",2);var Wv=Uv,jv=class extends s.XQb{constructor(){super(...arguments),this.valueColsWithoutSeriesType=new Set}postConstruct(){const e=()=>this.valueColsWithoutSeriesType.clear();this.addManagedListener(this.eventService,s.sVA.EVENT_NEW_COLUMNS_LOADED,e),this.addManagedListener(this.eventService,s.sVA.EVENT_ROW_DATA_UPDATED,e)}getColumn(e){return this.columnModel.getPrimaryColumn(e)}getAllDisplayedColumns(){return this.columnModel.getAllDisplayedColumns()}getColDisplayName(e){return this.columnModel.getDisplayNameForColumn(e,"chart")}getRowGroupColumns(){return this.columnModel.getRowGroupColumns()}getGroupDisplayColumns(){return this.columnModel.getGroupDisplayColumns()}isPivotMode(){return this.columnModel.isPivotMode()}isPivotActive(){return this.columnModel.isPivotActive()}getChartColumns(){const e=this.columnModel.getAllGridColumns(),t=new Set,i=new Set;return e.forEach(e=>{const n=e.getColDef(),s=n.chartDataType;if(s)switch(s){case"category":case"time":return void t.add(e);case"series":return void i.add(e);case"excluded":return;default:console.warn(`AG Grid: unexpected chartDataType value '${s}' supplied, instead use 'category', 'series' or 'excluded'`)}"ag-Grid-AutoColumn"!==n.colId?e.isPrimary()?(this.isInferredValueCol(e)?i:t).add(e):i.add(e):t.add(e)}),{dimensionCols:t,valueCols:i}}isInferredValueCol(e){const t=e.getColId();if("ag-Grid-AutoColumn"===t)return!1;const i=this.rowPositionUtils.getRowNode({rowIndex:0,rowPinned:null});if(!i)return this.valueColsWithoutSeriesType.has(t);let n=this.valueService.getValue(e,i);null==n&&(n=this.extractLeafData(i,e)),null!=n&&"function"==typeof n.toNumber&&(n=n.toNumber());const s="number"==typeof n;return s&&this.valueColsWithoutSeriesType.add(t),s}extractLeafData(e,t){if(!e.allLeafChildren)return null;for(let i=0;i<e.allLeafChildren.length;i++){const n=e.allLeafChildren[i],s=this.valueService.getValue(t,n);if(null!=s)return s}return null}destroy(){this.valueColsWithoutSeriesType.clear(),super.destroy()}};zv([(0,s.dsm)("columnModel")],jv.prototype,"columnModel",2),zv([(0,s.dsm)("valueService")],jv.prototype,"valueService",2),zv([(0,s.dsm)("rowPositionUtils")],jv.prototype,"rowPositionUtils",2),zv([s.o7C],jv.prototype,"postConstruct",1),jv=zv([(0,s.dR4)("chartColumnService")],jv);var Kv=class e extends s.XQb{constructor(e){var t;super(),this.suppressComboChartWarnings=!1,this.chartDataModel=e,this.seriesChartTypes=null!=(t=e.params.seriesChartTypes)?t:[]}init(){this.initComboCharts()}update(e){this.seriesChartTypes=null!=e?e:this.seriesChartTypes,this.initComboCharts(),this.updateSeriesChartTypes()}initComboCharts(){const e=this.seriesChartTypes&&this.seriesChartTypes.length>0;("customCombo"===this.chartDataModel.chartType||e)&&(this.chartDataModel.chartType="customCombo",this.savedCustomSeriesChartTypes=this.seriesChartTypes||[])}updateSeriesChartTypes(){this.chartDataModel.isComboChart()&&(this.seriesChartTypes=this.seriesChartTypes.map(e=>{const t=["groupedColumn","stackedColumn","stackedArea"].includes(e.chartType);return e.secondaryAxis=!t&&e.secondaryAxis,e}),"customCombo"!==this.chartDataModel.chartType?this.updateChartSeriesTypesForBuiltInCombos():this.updateSeriesChartTypesForCustomCombo())}updateSeriesChartTypesForCustomCombo(){this.seriesChartTypes&&this.seriesChartTypes.length>0||this.suppressComboChartWarnings||console.warn("AG Grid: 'seriesChartTypes' are required when the 'customCombo' chart type is specified."),this.seriesChartTypes=this.seriesChartTypes.map(t=>(e.SUPPORTED_COMBO_CHART_TYPES.includes(t.chartType)||(console.warn(`AG Grid: invalid chartType '${t.chartType}' supplied in 'seriesChartTypes', converting to 'line' instead.`),t.chartType="line"),t));const t=this.chartDataModel.valueColState.map(e=>{this.savedCustomSeriesChartTypes&&0!==this.savedCustomSeriesChartTypes.length||(this.savedCustomSeriesChartTypes=this.seriesChartTypes);return this.savedCustomSeriesChartTypes.find(t=>t.colId===e.colId)||(e.selected&&!this.suppressComboChartWarnings&&console.warn(`AG Grid: no 'seriesChartType' found for colId = '${e.colId}', defaulting to 'line'.`),{colId:e.colId,chartType:"line",secondaryAxis:!1})});this.seriesChartTypes=t,this.savedCustomSeriesChartTypes=t,this.suppressComboChartWarnings=!0}updateChartSeriesTypesForBuiltInCombos(){const{chartType:e,valueColState:t}=this.chartDataModel;let i="columnLineCombo"===e?"groupedColumn":"stackedArea",n="columnLineCombo"===e?"line":"groupedColumn";const s=t.filter(e=>e.selected),r=Math.ceil(s.length/2);this.seriesChartTypes=s.map((e,t)=>{const s=t>=r?n:i;return{colId:e.colId,chartType:s,secondaryAxis:!1}})}};Kv.SUPPORTED_COMBO_CHART_TYPES=["line","groupedColumn","stackedColumn","area","stackedArea"],zv([s.o7C],Kv.prototype,"init",1);var $v=Kv,Yv={area:{isCartesian:!0,canInvert:!0},bar:{isCartesian:!0,canInvert:!0},histogram:{isCartesian:!0},line:{isCartesian:!0,canInvert:!0},pie:{isPie:!0},donut:{isPie:!0,canInvert:!0},scatter:{isCartesian:!0},bubble:{isCartesian:!0},"radial-column":{isPolar:!0,isEnterprise:!0,isRadial:!0,canInvert:!0},"radial-bar":{isPolar:!0,isEnterprise:!0,isRadial:!0,canInvert:!0},"radar-line":{isPolar:!0,isEnterprise:!0,canInvert:!0},"radar-area":{isPolar:!0,isEnterprise:!0,canInvert:!0},nightingale:{isPolar:!0,isEnterprise:!0,canInvert:!0},"range-bar":{isCartesian:!0,isEnterprise:!0,canSwitchDirection:!0},"range-area":{isCartesian:!0,isEnterprise:!0},"box-plot":{isCartesian:!0,isEnterprise:!0,canSwitchDirection:!0},treemap:{isEnterprise:!0,isHierarchical:!0},sunburst:{isEnterprise:!0,isHierarchical:!0},heatmap:{isCartesian:!0,isEnterprise:!0},waterfall:{isCartesian:!0,isEnterprise:!0,canSwitchDirection:!0}};function qv(e){return s.E1g.COMBO_CHART_TYPES.includes(e)}function Xv(e,t){var i;return!!(null==(i=Yv[e])?void 0:i[t])}var Zv=new Set(["stackedColumn","normalizedColumn","stackedBar","normalizedBar"]);function Qv(e){return Zv.has(e)}function Jv(e){return Xv(e,"isCartesian")}function ey(e){return Xv(e,"isPolar")}function ty(e){return Xv(e,"isHierarchical")}function iy(e){return"doughnut"===e?"donut":e}function ny(e){return s.E1g.CHART_TYPE_TO_SERIES_TYPE[e]}function sy(e){var t;return null!=(t=ny(e))?t:"line"}function ry(e){return Xv(e,"isPie")}function oy(e){return ty(sy(e))?void 0:1}function ay(e){return ty(sy(e))?2:function(e){return"pie"===e||"waterfall"===e||"histogram"===e}(e)?1:void 0}function ly(e){return Xv(sy(e),"canInvert")}var cy=class e extends s.XQb{constructor(e){super(),this.unlinked=!1,this.chartData=[],this.valueColState=[],this.dimensionColState=[],this.columnNames={},this.crossFiltering=!1,this.grouping=!1,this.params=e,this.chartId=e.chartId,this.setParams(e)}setParams(e){const{chartType:t,pivotChart:i,chartThemeName:n,switchCategorySeries:s,aggFunc:r,cellRange:o,suppressChartRanges:a,unlinkChart:l,crossFiltering:c,seriesGroupType:h}=e;this.chartType=t,this.pivotChart=null!=i&&i,this.chartThemeName=n,this.switchCategorySeries=!!s,this.aggFunc=r,this.referenceCellRange=o,this.suppliedCellRange=o,this.suppressChartRanges=null!=a&&a,this.unlinked=!!l,this.crossFiltering=!!c,this.seriesGroupType=h}init(){this.datasource=this.createManagedBean(new Wv),this.chartColumnService=this.createManagedBean(new jv),this.comboChartModel=this.createManagedBean(new $v(this)),this.updateCellRanges({setColsFromRange:!0}),this.updateData()}updateModel(e){const{cellRange:t,seriesChartTypes:i}=e;t!==this.suppliedCellRange&&(this.dimensionCellRange=void 0,this.valueCellRange=void 0),this.setParams(e),this.updateSelectedDimensions(null==t?void 0:t.columns),this.updateCellRanges({setColsFromRange:!0}),(this.isComboChart()||i)&&this.comboChartModel.update(i),this.unlinked||this.updateData()}updateCellRanges(e){const{updatedColState:t,resetOrder:i,maintainColState:n,setColsFromRange:s}=null!=e?e:{};this.valueCellRange&&(this.referenceCellRange=this.valueCellRange);const{dimensionCols:r,valueCols:o}=this.chartColumnService.getChartColumns(),a=this.getAllColumnsFromRanges();t&&this.updateColumnState(t,i),this.setDimensionCellRange(r,a,t),this.setValueCellRange(o,a,s),t||n||(this.resetColumnState(),this.syncDimensionCellRange()),this.comboChartModel.updateSeriesChartTypes()}updateData(){const{startRow:e,endRow:t}=this.getRowIndexes();this.pivotChart&&this.resetColumnState(),this.grouping=this.isGrouping();const i={aggFunc:this.aggFunc,dimensionCols:this.getSelectedDimensions(),grouping:this.grouping,pivoting:this.isPivotActive(),crossFiltering:this.crossFiltering,valueCols:this.getSelectedValueCols(),startRow:e,endRow:t,isScatter:s._.includes(["scatter","bubble"],this.chartType)},{chartData:n,columnNames:r,groupChartData:o}=this.datasource.getData(i);this.chartData=n,this.groupChartData=o,this.columnNames=r,this.categoryAxisType=void 0}isGrouping(){const e=this.gos.get("treeData"),t=e?null:this.chartColumnService.getRowGroupColumns(),i=e||t&&t.length>0,n=this.getSelectedDimensions().map(({colId:e})=>e),s=this.chartColumnService.getGroupDisplayColumns().map(e=>e.getColId()).some(e=>n.includes(e));return!!i&&s}getSelectedValueCols(){return this.valueColState.filter(e=>e.selected).map(e=>e.column)}getSelectedDimensions(){return this.dimensionColState.filter(e=>e.selected)}getColDisplayName(e){return this.chartColumnService.getColDisplayName(e)}isPivotMode(){return this.chartColumnService.isPivotMode()}getChartDataType(e){const t=this.chartColumnService.getColumn(e);return t?t.getColDef().chartDataType:void 0}isPivotActive(){return this.chartColumnService.isPivotActive()}createCellRange(e,...t){return{id:this.chartId,startRow:this.referenceCellRange.startRow,endRow:this.referenceCellRange.endRow,columns:t,startColumn:e===s.OnL.DIMENSION||null==this.referenceCellRange.startColumn?t[0]:this.referenceCellRange.startColumn,type:e}}getAllColumnsFromRanges(){if(this.pivotChart)return s._.convertToSet(this.chartColumnService.getAllDisplayedColumns());const e=this.dimensionCellRange||this.valueCellRange?[]:this.referenceCellRange.columns;return this.dimensionCellRange&&e.push(...this.dimensionCellRange.columns),this.valueCellRange&&e.push(...this.valueCellRange.columns),s._.convertToSet(e)}getRowIndexes(){let e=0,t=0;const{rangeService:i,valueCellRange:n,dimensionCellRange:s}=this,r=n||s;if(i&&r){e=i.getRangeStartRow(r).rowIndex;const n=i.getRangeEndRow(r);t="bottom"===n.rowPinned?-1:n.rowIndex}return{startRow:e,endRow:t}}resetColumnState(){const{dimensionCols:t,valueCols:i}=this.chartColumnService.getChartColumns(),n=this.getAllColumnsFromRanges(),r=this.valueColState.length<1;this.dimensionColState=[],this.valueColState=[];const o=ty(sy(this.chartType));let a=!1,l=1;const c=this.suppliedCellRange.columns[0];t.forEach(e=>{const t="ag-Grid-AutoColumn"===e.getColId();let i=!1;this.crossFiltering&&this.aggFunc?c.getColId()===e.getColId()&&(i=!0):i=!!t||(!a||o)&&n.has(e),this.dimensionColState.push({column:e,colId:e.getColId(),displayName:this.getColDisplayName(e),selected:i,order:l++}),i&&(a=!0)});const h={colId:e.DEFAULT_CATEGORY,displayName:this.chartTranslationService.translate("defaultCategory"),selected:!a,order:0};this.dimensionColState.unshift(h);const d=this.referenceCellRange.columns.filter(e=>i.has(e));i.forEach(e=>{r&&s._.includes(this.referenceCellRange.columns,e)&&(e=d.shift()),this.valueColState.push({column:e,colId:e.getColId(),displayName:this.getColDisplayName(e),selected:n.has(e),order:l++})})}updateColumnState(e,t){const i=t=>t.colId===e.colId,{dimensionColState:n,valueColState:s}=this,r=n.find(i),o=s.find(i);if(r)if(ty(sy(this.chartType)))r.selected=e.selected;else{const t=e.selected?r:n.filter(e=>e!==r).find(({selected:e})=>e);n.forEach(e=>e.selected=e===t)}else o&&(o.selected=e.selected);const a=[...n,...s],l=[];t||(a.forEach((t,i)=>{i===e.order&&l.push(e.colId),t.colId!==e.colId&&l.push(t.colId)}),a.forEach(e=>{const t=l.indexOf(e.colId);e.order=t>=0?l.indexOf(e.colId):a.length-1})),this.reorderColState()}reorderColState(){const e=(e,t)=>e.order-t.order;this.dimensionColState.sort(e),this.valueColState.sort(e)}setDimensionCellRange(t,i,n){this.dimensionCellRange=void 0;const r=ty(sy(this.chartType));if(!n&&!this.dimensionColState.length){const e=new Array;return t.forEach(t=>{e.length>0&&!r||!i.has(t)||e.push(t)}),void(e.length>0&&(this.dimensionCellRange=this.createCellRange(s.OnL.DIMENSION,...e)))}let o=n?[n]:[];if(this.crossFiltering&&this.aggFunc){const e=this.suppliedCellRange.columns[0];o=this.dimensionColState.filter(t=>t.colId===e.getColId())}else(r||0===o.length||o.some(({column:e})=>!e||!t.has(e)))&&(o=this.dimensionColState.filter(e=>e.selected));const a=1===o.length&&o[0].colId===e.DEFAULT_CATEGORY,l=o.map(({column:e})=>e).filter(e=>null!=e);l.length>0&&!a&&(this.dimensionCellRange=this.createCellRange(s.OnL.DIMENSION,...l))}setValueCellRange(e,t,i){this.valueCellRange=void 0;const n=[],r=ay(this.chartType);let o=0;if(e.forEach(e=>{i?(null==r||o<r)&&t.has(e)&&(n.push(e),o++):this.valueColState.some(t=>t.selected&&t.colId===e.getColId())&&n.push(e)}),n.length>0){let e=[];this.valueColState.length>0?e=this.valueColState.map(e=>e.colId):t.forEach(t=>e.push(t.getColId())),n.sort((t,i)=>e.indexOf(t.getColId())-e.indexOf(i.getColId())),this.valueCellRange=this.createCellRange(s.OnL.VALUE,...n)}}resetCellRanges(e,t){if(!e&&!t)return;const{dimensionCols:i,valueCols:n}=this.chartColumnService.getChartColumns(),s=this.getAllColumnsFromRanges();e&&this.setDimensionCellRange(i,s),t&&this.setValueCellRange(n,s)}updateSelectedDimensions(e){const t=new Set(e.map(e=>e.getColId()));if(ty(sy(this.chartType))){const e=this.dimensionColState.filter(e=>t.has(e.colId)),i=new Set(e.map(e=>e.colId));this.dimensionColState=this.dimensionColState.map(e=>Bv(Vv({},e),{selected:i.has(e.colId)}))}else{const e=(this.dimensionColState.find(e=>t.has(e.colId))||this.dimensionColState[0]).colId;this.dimensionColState=this.dimensionColState.map(t=>Bv(Vv({},t),{selected:t.colId===e}))}}syncDimensionCellRange(){const e=this.getSelectedDimensions();if(0===e.length)return;const t=e.map(({column:e})=>e).filter(e=>null!=e);t.length>0&&(this.dimensionCellRange=this.createCellRange(s.OnL.DIMENSION,...t))}isComboChart(e){return qv(null!=e?e:this.chartType)}};cy.DEFAULT_CATEGORY="AG-GRID-DEFAULT-CATEGORY",zv([(0,s.dsm)("rangeService")],cy.prototype,"rangeService",2),zv([(0,s.dsm)("chartTranslationService")],cy.prototype,"chartTranslationService",2),zv([s.o7C],cy.prototype,"init",1);var hy=cy,dy=["number","category","grouped-category","log","time"];function uy(e,t){return!1!==t.clone&&t.isMergeableObject(e)?vy(function(e){return Array.isArray(e)?[]:{}}(e),e,t):e}function py(e,t,i){return e.concat(t).map(function(e){return uy(e,i)})}function gy(e){return Object.keys(e).concat(function(e){return Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(e).filter(function(t){return e.propertyIsEnumerable(t)}):[]}(e))}function fy(e,t){try{return t in e}catch(e){return!1}}function my(e){return function(e){return!!e&&"object"==typeof e}(e)&&!function(e){const t=Object.prototype.toString.call(e);return"[object RegExp]"===t||"[object Date]"===t}(e)}function vy(e,t,i){(i=i||{}).arrayMerge=i.arrayMerge||py,i.isMergeableObject=i.isMergeableObject||my,i.cloneUnlessOtherwiseSpecified=uy;const n=Array.isArray(t);return n===Array.isArray(e)?n?i.arrayMerge(e,t,i):function(e={},t={},i){const n={};return i.isMergeableObject(e)&&gy(e).forEach(function(t){n[t]=uy(e[t],i)}),gy(t).forEach(function(s){(function(e,t){return fy(e,t)&&!(Object.hasOwnProperty.call(e,t)&&Object.propertyIsEnumerable.call(e,t))})(e,s)||(fy(e,s)&&i.isMergeableObject(t[s])?n[s]=function(e,t){if(!t.customMerge)return vy;const i=t.customMerge(e);return"function"==typeof i?i:vy}(s,i)(e[s],t[s],i):n[s]=uy(t[s],i))}),n}(e,t,i):uy(t,i)}function yy(e,t,i){if(null==e)return i;const n=t.split(".");let s=e;for(;n.length>1;)if(s=s[n.shift()],null==s)return i;const r=s[n[0]];return null!=r?r:i}function Cy(e){return s._.includes(Object.keys(Bf.themes),e)}var by=dy.reduce((e,t)=>Bv(Vv({},e),{[t]:{title:{_enabledFromTheme:!0}}}),{});function Sy(e,t,i){const n=e.getExtraPaddingDirections();return{common:Bv(Vv({},t?{animation:{duration:500}}:void 0),{axes:by,padding:{top:!i&&n.includes("top")?40:20,right:n.includes("right")?30:20,bottom:n.includes("bottom")?40:20,left:n.includes("left")?30:20}}),pie:{series:{title:{_enabledFromTheme:!0},calloutLabel:{_enabledFromTheme:!0},sectorLabel:{enabled:!1,_enabledFromTheme:!0}}},donut:{series:{title:{_enabledFromTheme:!0},calloutLabel:{_enabledFromTheme:!0},sectorLabel:{enabled:!1,_enabledFromTheme:!0}}}}}function wy(e,t){const{customChartThemes:i}=e,n=i&&i[t];return n||console.warn(`AG Grid: no stock theme exists with the name '${t}' and no custom chart theme with that name was supplied to 'customChartThemes'`),n}var xy=e=>t=>null==t||e(t),Ey=e=>"string"==typeof e,My=e=>"boolean"==typeof e,Ay=e=>"object"==typeof e,Ty=(e,t)=>i=>`AG Grid - unable to update chart as invalid params supplied:  \`${e}: ${i}\`, expected ${t}.`,Dy=e=>`${e} is not supported in AG Charts Community (either 'ag-grid-charts-enterprise' or '@ag-grid-enterprise/charts-enterprise' hasn't been loaded). See https://www.ag-grid.com/javascript-data-grid/integrated-charts-installation/ for more details.`,Iy=class e{static isEnterprise(){return jf.enterpriseModule.isEnterprise}static isValidChartType(e){return!!ny(e)||qv(e)}static isLegacyChartType(t){return e.legacyChartTypes.includes(t)}static validateUpdateParams(t){switch(t.type){case"rangeChartUpdate":return e.validateUpdateRangeChartParams(t);case"pivotChartUpdate":return e.validateUpdatePivotChartParams(t);case"crossFilterChartUpdate":return e.validateUpdateCrossFilterChartParams(t);default:return console.warn(`AG Grid - Invalid value supplied for 'type': ${t.type}. It must be either 'rangeChartUpdate', 'pivotChartUpdate', or 'crossFilterChartUpdate'.`),!1}}static validateCreateParams(t){return e.validateProperties(t,[e.enterpriseChartTypeValidation,e.switchCategorySeriesValidation])}static validateUpdateRangeChartParams(t){const i=[...e.commonUpdateValidations,e.enterpriseChartTypeValidation,...e.cellRangeValidations,{property:"seriesChartTypes",validationFn:e=>void 0===e||Array.isArray(e)&&e.every(Ay),warnMessage:Ty("seriesChartTypes","Array of SeriesChartType")}];return e.validateProperties(t,i,[...e.baseUpdateChartParams,"cellRange","suppressChartRanges","switchCategorySeries","aggFunc","seriesChartTypes","seriesGroupType"],"UpdateRangeChartParams")}static validateUpdatePivotChartParams(t){const i=[...e.commonUpdateValidations];return e.validateProperties(t,i,[...e.baseUpdateChartParams],"UpdatePivotChartParams")}static validateUpdateCrossFilterChartParams(t){const i=[...e.commonUpdateValidations,...e.cellRangeValidations];return e.validateProperties(t,i,[...e.baseUpdateChartParams,"cellRange","suppressChartRanges","aggFunc"],"UpdateCrossFilterChartParams")}static validateProperties(e,t,i,n){let s;for(const i of t){const{property:t,validationFn:n,warnMessage:r,warnIfFixed:o}=i;if(t in e){const i=e[t],a=n(i);if(!0===a)continue;if(!1===a)return console.warn(r(i)),!1;s=s||Vv({},e),s[t]=a,o&&console.warn(r(i))}}if(i)for(const t in e)if(!i.includes(t))return console.warn(`AG Grid - Unexpected property supplied. ${n} does not contain: \`${t}\`.`),!1;return s||!0}};Iy.legacyChartTypes=["doughnut"],Iy.baseUpdateChartParams=["type","chartId","chartType","chartThemeName","chartThemeOverrides","unlinkChart"],Iy.validateChartType=xy(e=>{if(Iy.isValidChartType(e))return!0;if(Iy.isLegacyChartType(e)){const t=iy(e);return s._.warnOnce(`The chart type '${e}' has been deprecated. Please use '${t}' instead.`),t}return!1}),Iy.validateAgChartThemeOverrides=xy(e=>"object"==typeof e),Iy.validateChartParamsCellRange=xy(e=>"object"==typeof e),Iy.validateAggFunc=xy(e=>"string"==typeof e||"function"==typeof e),Iy.enterpriseChartTypeValidation={property:"chartType",validationFn:xy(e=>Iy.isEnterprise()||!e||!function(e){return Xv(sy(e),"isEnterprise")}(e)),warnMessage:e=>Dy(`The '${e}' chart type`)},Iy.switchCategorySeriesValidation={property:"switchCategorySeries",validationFn:xy(e=>{if(!e||Iy.isEnterprise())return!0}),warnMessage:()=>Dy("'switchCategorySeries' has been ignored as it"),warnIfFixed:!0},Iy.commonUpdateValidations=[{property:"chartId",validationFn:Ey,warnMessage:Ty("chartId","string")},{property:"chartType",validationFn:Iy.validateChartType,warnMessage:Ty("chartType","ChartType")},{property:"chartThemeName",validationFn:Ey,warnMessage:Ty("chartThemeName","string")},{property:"chartThemeOverrides",validationFn:Iy.validateAgChartThemeOverrides,warnMessage:Ty("chartThemeOverrides","AgChartThemeOverrides")},{property:"unlinkChart",validationFn:My,warnMessage:Ty("unlinkChart","boolean")}],Iy.cellRangeValidations=[{property:"cellRange",validationFn:Iy.validateChartParamsCellRange,warnMessage:Ty("cellRange","ChartParamsCellRange")},{property:"suppressChartRanges",validationFn:My,warnMessage:Ty("suppressChartRanges","boolean")},{property:"aggFunc",validationFn:Iy.validateAggFunc,warnMessage:Ty("aggFunc","string or IAggFunc")},Iy.switchCategorySeriesValidation];var Ry=Iy,Ly=["ag-default","ag-material","ag-sheets","ag-polychroma","ag-vivid"],ky=class e extends s.XQb{constructor(e){super(),this.model=e,this.isEnterprise=()=>jf.enterpriseModule.isEnterprise}init(){this.setChartRange(),this.addManagedListener(this.eventService,s.sVA.EVENT_RANGE_SELECTION_CHANGED,e=>{e.id&&e.id===this.model.chartId&&this.updateForRangeChange()}),this.model.unlinked&&this.rangeService&&this.rangeService.setCellRanges([]),this.addManagedListener(this.eventService,s.sVA.EVENT_COLUMN_MOVED,this.updateForGridChange.bind(this)),this.addManagedListener(this.eventService,s.sVA.EVENT_COLUMN_PINNED,this.updateForGridChange.bind(this)),this.addManagedListener(this.eventService,s.sVA.EVENT_COLUMN_VISIBLE,this.updateForGridChange.bind(this)),this.addManagedListener(this.eventService,s.sVA.EVENT_COLUMN_ROW_GROUP_CHANGED,this.updateForGridChange.bind(this)),this.addManagedListener(this.eventService,s.sVA.EVENT_MODEL_UPDATED,this.updateForGridChange.bind(this)),this.addManagedListener(this.eventService,s.sVA.EVENT_CELL_VALUE_CHANGED,this.updateForDataChange.bind(this))}update(e){if(!this.validUpdateType(e))return!1;const t=Ry.validateUpdateParams(e);if(!t)return!1;const i=!0===t?e:t;return this.applyValidatedChartParams(i),!0}applyValidatedChartParams(e){var t,i,n,s,r,o,a,l,c;const{chartId:h,chartType:d,chartThemeName:u,unlinkChart:p}=e,g={chartId:h,pivotChart:this.model.pivotChart,chartType:null!=d?d:this.model.chartType,chartThemeName:null!=u?u:this.model.chartThemeName,unlinkChart:null!=p?p:this.model.unlinked,cellRange:this.model.suppliedCellRange,switchCategorySeries:this.model.switchCategorySeries,aggFunc:this.model.aggFunc,seriesChartTypes:void 0,suppressChartRanges:!1,crossFiltering:!1};let f=Vv({},g);switch(e.type){case"rangeChartUpdate":f.cellRange=null!=(t=this.createCellRange(e))?t:this.model.suppliedCellRange,f.switchCategorySeries=null!=(i=e.switchCategorySeries)?i:this.model.switchCategorySeries,f.aggFunc=null!=(n=e.aggFunc)?n:this.model.aggFunc,f.seriesChartTypes=e.seriesChartTypes,f.suppressChartRanges=null!=(s=e.suppressChartRanges)?s:this.model.suppressChartRanges,f.seriesGroupType=null!=(r=e.seriesGroupType)?r:this.model.seriesGroupType;break;case"crossFilterChartUpdate":f.cellRange=null!=(o=this.createCellRange(e))?o:this.model.suppliedCellRange,f.switchCategorySeries=!1,f.aggFunc=null!=(a=e.aggFunc)?a:this.model.aggFunc,f.crossFiltering=!0,f.suppressChartRanges=null!=(l=e.suppressChartRanges)?l:this.model.suppressChartRanges;break;case"pivotChartUpdate":f.switchCategorySeries=!1}this.model.updateModel(f),f.unlinkChart||f.suppressChartRanges?null==(c=this.rangeService)||c.setCellRanges([]):this.setChartRange()}updateForGridChange(e){if(this.model.unlinked)return;const{maintainColState:t,setColsFromRange:i}=null!=e?e:{};this.model.updateCellRanges({maintainColState:t,setColsFromRange:i}),this.model.updateData(),this.setChartRange()}updateForDataChange(){this.model.unlinked||(this.model.updateData(),this.raiseChartModelUpdateEvent())}updateForRangeChange(){this.updateForGridChange({setColsFromRange:!0}),this.raiseChartRangeSelectionChangedEvent()}updateForPanelChange(e){this.model.updateCellRanges(e),this.model.updateData(),e.skipAnimation&&this.getChartProxy().getChartRef().skipAnimations(),this.setChartRange(),this.raiseChartRangeSelectionChangedEvent()}updateThemeOverrides(e){this.chartProxy.updateThemeOverrides(e)}getChartUpdateParams(e){const t=this.getSelectedValueColState().map(e=>({colId:e.colId,displayName:e.displayName})),i=this.getChartData(),n=this.getSelectedDimensions(),s={data:i,groupData:this.model.groupChartData,grouping:this.isGrouping(),categories:n.map(e=>{var t;return{id:e.colId,name:e.displayName,chartDataType:null!=(t=this.model.categoryAxisType)?t:this.model.getChartDataType(e.colId)}}),fields:t,chartId:this.getChartId(),getCrossFilteringContext:()=>({lastSelectedChartId:"xxx"}),seriesChartTypes:this.getSeriesChartTypes(),updatedOverrides:e,seriesGroupType:this.model.seriesGroupType};return this.isCategorySeriesSwitched()?this.invertCategorySeriesParams(s):s}invertCategorySeriesParams(e){const[t]=e.categories,i=[{id:hy.DEFAULT_CATEGORY,name:""}],n=e.data.map((e,i)=>{const n=`${t.id}:${i}`,s=e[t.id];return{colId:n,displayName:null==s?"":String(s)}}),s=e.fields.map(i=>{const n={[hy.DEFAULT_CATEGORY]:i.displayName};for(const[s,r]of e.data.entries()){const e=`${t.id}:${s}`,o=r[i.colId];n[e]=o}return n});return Bv(Vv({},e),{categories:i,fields:n,data:s})}getChartModel(){const e=this.model.pivotChart?"pivot":"range",t=this.isComboChart()?this.model.comboChartModel.seriesChartTypes:void 0;return{modelType:e,chartId:this.model.chartId,chartType:this.model.chartType,chartThemeName:this.getChartThemeName(),chartOptions:this.chartProxy.getChartThemeOverrides(),chartPalette:this.chartProxy.getChartPalette(),cellRange:this.getCellRangeParams(),switchCategorySeries:this.model.switchCategorySeries,suppressChartRanges:this.model.suppressChartRanges,aggFunc:this.model.aggFunc,unlinkChart:this.model.unlinked,seriesChartTypes:t,seriesGroupType:this.model.seriesGroupType}}getChartId(){return this.model.chartId}getChartData(){return this.model.chartData}getChartType(){return this.model.chartType}setChartType(e){this.updateMultiSeriesAndCategory(this.model.chartType,e),this.model.chartType=e,this.model.comboChartModel.updateSeriesChartTypes(),this.model.switchCategorySeries=!1,this.model.categoryAxisType=void 0,this.model.seriesGroupType=void 0,this.raiseChartModelUpdateEvent(),this.raiseChartOptionsChangedEvent()}isCategorySeriesSwitched(){return this.model.switchCategorySeries&&!this.model.isGrouping()}switchCategorySeries(e){ly(this.getChartType())&&(this.model.switchCategorySeries=e,this.raiseChartModelUpdateEvent())}getAggFunc(){return this.model.aggFunc}setAggFunc(e,t){this.model.aggFunc!==e&&(this.model.aggFunc=e,t||(this.model.updateData(),this.raiseChartModelUpdateEvent()))}updateMultiSeriesAndCategory(e,t){var i,n;const s=(e,t)=>{let i=0;for(const n of e)n.selected&&(i>=t?n.selected=!1:i++);0===i&&(e[0].selected=!0)},r=oy(t),o=ay(t),a=null!=r&&(null!=(i=oy(e))?i:100)>(null!=r?r:100),l=null!=o&&(null!=(n=ay(e))?n:100)>(null!=o?o:100);a&&s(this.model.dimensionColState,r),l&&s(this.model.valueColState,o),(a||l)&&(this.model.resetCellRanges(a,l),this.setChartRange(!0))}setChartThemeName(e,t){this.model.chartThemeName=e,t||(this.raiseChartModelUpdateEvent(),this.raiseChartOptionsChangedEvent())}getChartThemeName(){return this.model.chartThemeName}isPivotChart(){return this.model.pivotChart}isPivotMode(){return this.model.isPivotMode()}isGrouping(){return this.model.isGrouping()}isCrossFilterChart(){return this.model.crossFiltering}getThemeNames(){return this.gos.get("chartThemes")||Ly}getThemes(){return this.getThemeNames().map(e=>{const t=Cy(e)?e:this.chartProxy.lookupCustomChartTheme(e);return Bf.getChartTheme(t)})}getPalettes(){return this.getThemes().map(e=>e.palette)}getThemeTemplateParameters(){return this.getThemes().map(e=>e.getTemplateParameters())}getValueColState(){return this.model.valueColState.map(this.displayNameMapper.bind(this))}getSelectedValueColState(){return this.getValueColState().filter(e=>e.selected)}getSelectedDimensions(){return this.model.getSelectedDimensions()}displayNameMapper(e){const t=this.model.columnNames[e.colId];return e.displayName=t?t.join(" - "):this.model.getColDisplayName(e.column),e}getColStateForMenu(){return{dimensionCols:this.model.dimensionColState,valueCols:this.getValueColState()}}setChartRange(e=!1){!this.rangeService||this.model.suppressChartRanges||this.model.unlinked||this.rangeService.setCellRanges(this.getCellRanges()),e||this.raiseChartModelUpdateEvent()}detachChartRange(){this.model.unlinked=!this.model.unlinked,this.model.unlinked?this.rangeService&&this.rangeService.setCellRanges([]):this.updateForGridChange(),this.dispatchEvent({type:e.EVENT_CHART_LINKED_CHANGED})}setChartProxy(e){this.chartProxy=e}getChartProxy(){return this.chartProxy}isActiveXYChart(){return s._.includes(["scatter","bubble"],this.getChartType())}isChartLinked(){return!this.model.unlinked}customComboExists(){const e=this.model.comboChartModel.savedCustomSeriesChartTypes;return e&&e.length>0}getSeriesChartTypes(){return this.model.comboChartModel.seriesChartTypes}isComboChart(e){return this.model.isComboChart(e)}updateSeriesChartType(t,i,n){const s=this.model.comboChartModel.seriesChartTypes.find(e=>e.colId===t);if(s){const t="customCombo"!==this.model.chartType;t&&(this.model.chartType="customCombo");const r=s.chartType;null!=i&&(s.chartType=i),null!=n&&(s.secondaryAxis=n),this.model.comboChartModel.savedCustomSeriesChartTypes=this.model.comboChartModel.seriesChartTypes,this.model.comboChartModel.updateSeriesChartTypes(),this.updateForDataChange(),t&&this.dispatchEvent({type:e.EVENT_CHART_TYPE_CHANGED}),r!==i&&this.dispatchEvent({type:e.EVENT_CHART_SERIES_CHART_TYPE_CHANGED}),this.raiseChartOptionsChangedEvent()}}getActiveSeriesChartTypes(){const e=this.getSelectedValueColState().map(e=>e.colId);return this.getSeriesChartTypes().filter(t=>e.includes(t.colId))}getChartSeriesTypes(e){const t=null!=e?e:this.getChartType();return this.isComboChart(t)?["line","bar","area"]:[sy(t)]}getChartSeriesType(){const e=this.getSeriesChartTypes();if(0===e.length)return"bar";const t=e[0].chartType;return"columnLineCombo"===t?"bar":"areaColumnCombo"===t?"area":sy(t)}getCellRanges(){return[this.model.dimensionCellRange,this.model.valueCellRange].filter(e=>e)}createCellRange(e){var t;return e.cellRange&&(null==(t=this.rangeService)?void 0:t.createPartialCellRangeFromRangeParams(e.cellRange,!0))}validUpdateType(e){var t;if(!e.type)return console.warn("AG Grid - Unable to update chart as the 'type' is missing. It must be either 'rangeChartUpdate', 'pivotChartUpdate', or 'crossFilterChartUpdate'."),!1;const i={"Range Chart":()=>!this.isPivotChart()&&!this.isCrossFilterChart(),"Pivot Chart":()=>this.isPivotChart(),"Cross Filter Chart":()=>this.isCrossFilterChart()},n=null!=(t=Object.keys(i).find(e=>i[e]()))?t:"Range Chart",s=e.type===`${n[0].toLowerCase()}${n.slice(1).replace(/ /g,"")}Update`;return s||console.warn(`AG Grid - Unable to update chart as a '${e.type}' update type is not permitted on a ${n}.`),s}getCellRangeParams(){const e=this.getCellRanges(),t=e[0],i=t&&t.startRow||null,n=t&&t.endRow||null;return{rowStartIndex:i&&i.rowIndex,rowStartPinned:i&&i.rowPinned,rowEndIndex:n&&n.rowIndex,rowEndPinned:n&&n.rowPinned,columns:e.reduce((e,t)=>e.concat(t.columns.map(e=>e.getId())),[])}}setCategoryAxisType(e){this.model.categoryAxisType=e,this.raiseChartModelUpdateEvent()}getSeriesGroupType(){var e;return null!=(e=this.model.seriesGroupType)?e:this.chartProxy.getSeriesGroupType()}setSeriesGroupType(e){this.model.seriesGroupType=e,this.raiseChartModelUpdateEvent()}raiseChartModelUpdateEvent(){const t={type:e.EVENT_CHART_MODEL_UPDATE};this.dispatchEvent(t)}raiseChartUpdatedEvent(){const t={type:e.EVENT_CHART_UPDATED};this.dispatchEvent(t)}raiseChartApiUpdateEvent(){const t={type:e.EVENT_CHART_API_UPDATE};this.dispatchEvent(t)}raiseChartOptionsChangedEvent(){const{chartId:e,chartType:t}=this.getChartModel(),i={type:s.sVA.EVENT_CHART_OPTIONS_CHANGED,chartId:e,chartType:t,chartThemeName:this.getChartThemeName(),chartOptions:this.chartProxy.getChartThemeOverrides()};this.eventService.dispatchEvent(i)}raiseChartRangeSelectionChangedEvent(){const e={type:s.sVA.EVENT_CHART_RANGE_SELECTION_CHANGED,id:this.model.chartId,chartId:this.model.chartId,cellRange:this.getCellRangeParams()};this.eventService.dispatchEvent(e)}destroy(){super.destroy(),this.rangeService&&this.rangeService.setCellRanges([])}};ky.EVENT_CHART_UPDATED="chartUpdated",ky.EVENT_CHART_API_UPDATE="chartApiUpdate",ky.EVENT_CHART_MODEL_UPDATE="chartModelUpdate",ky.EVENT_CHART_TYPE_CHANGED="chartTypeChanged",ky.EVENT_CHART_SERIES_CHART_TYPE_CHANGED="chartSeriesChartTypeChanged",ky.EVENT_CHART_LINKED_CHANGED="chartLinkedChanged",zv([(0,s.dsm)("rangeService")],ky.prototype,"rangeService",2),zv([s.o7C],ky.prototype,"init",1);var Py=ky,Ny=class e extends s.uAl{constructor(t){super(e.TEMPLATE),this.config=null!=t?t:{};const{selectedValueList:i,valueFormatter:n,valueList:r}=this.config;this.selectedValues=null!=i?i:[],this.valueList=null!=r?r:[],this.valueFormatter=null!=n?n:e=>s._.escapeString(e)}init(){const{ariaLabel:e,onValuesChange:t,dragSourceId:i}=this.config;this.dropZonePanel=this.createManagedBean(new Fy({getValues:()=>this.selectedValues,setValues:e=>this.updateValues(e),isDraggable:()=>this.selectedValues.length>1},e=>this.valueFormatter(e),e,i)),this.getGui().appendChild(this.dropZonePanel.getGui()),this.initSelect(),null!=t&&(this.onValuesChange=t)}setValues(e,t){const{added:i,removed:n,updated:s}=this.getChanges(this.valueList,e);let r=!1;return(i.length||n.length||s.length)&&(r=!0),this.valueList=e,this.updateValues(t,r,!0),this}setValueFormatter(e){return this.valueFormatter=e,this}initSelect(){const e=this.createSelectOptions();if(!e.length)return!1;const{selectPlaceholder:t}=this.config;return this.eSelect=this.createBean(new s.Ju4({options:e,placeholder:t,onValueChange:e=>this.addValue(e),pickerIcon:"chartsMenuAdd"})),this.getGui().appendChild(this.eSelect.getGui()),!0}createSelectOptions(){let e=[];const{maxSelection:t}=this.config;return t&&this.selectedValues.length>=t||this.valueList.forEach(t=>{this.selectedValues.includes(t)||e.push({value:t,text:this.valueFormatter(t)})}),e}addValue(e){this.dropZonePanel.addItem(e)}updateValues(e,t,i){var n,s,r,o,a;const l=this.selectedValues;this.selectedValues=e;const c=this.getChanges(l,e),h=t||c.added.length||c.removed.length,d=this.gos.getActiveDomElement(),u=null==(n=this.eSelect)?void 0:n.getGui().contains(d),p=null==(s=this.dropZonePanel)?void 0:s.getGui().contains(d);i||null==(r=this.onValuesChange)||r.call(this,c);const g=!!h&&!this.refreshSelect();this.dropZonePanel.refreshGui(),h&&u&&(g?this.dropZonePanel.focusList(!0):null==(o=this.eSelect)||o.getFocusableElement().focus()),p&&!e.length&&(null==(a=this.eSelect)||a.getFocusableElement().focus())}getChanges(e,t){return{added:t.filter(t=>!e.includes(t)),removed:e.filter(e=>!t.includes(e)),updated:t.filter((t,i)=>e[i]!==t),selected:t}}refreshSelect(){if(!this.eSelect)return this.initSelect();const e=this.createSelectOptions();return e.length?(this.eSelect.clearOptions().addOptions(e).setValue(void 0,!0),!0):(s._.removeFromParent(this.eSelect.getGui()),this.eSelect=this.destroyBean(this.eSelect),!1)}destroy(){this.destroyBean(this.eSelect),super.destroy()}};Ny.TEMPLATE='<div class="ag-pill-select" role="presentation"></div>',zv([s.o7C],Ny.prototype,"init",1);var Oy=Ny,_y=class extends s.v26{constructor(e,t,i,n,s,r){super(t,i,!1),this.value=e,this.valueFormatter=n,this.draggable=s,this.sourceId=r}getItem(){return this.value}getDisplayName(){return this.valueFormatter(this.value)}getAriaDisplayName(){return this.getDisplayName()}getTooltip(){}createGetDragItem(){return()=>({value:this.value})}getDragSourceType(){return s.qRA.ChartPanel}getDragSourceId(){return this.sourceId}isDraggable(){return this.draggable}},Fy=class extends s.fNO{constructor(e,t,i,n){super(!1),this.model=e,this.valueFormatter=t,this.ariaLabel=i,this.sourceId=n}postConstruct(){super.init()}isItemDroppable(e,t){return this.isSourceEventFromTarget(t)||null!=this.sourceId&&this.sourceId===t.dragSource.sourceId}updateItems(e){this.model.setValues(e)}getExistingItems(){return this.model.getValues()}getIconName(){return this.isPotentialDndItems()?s.WO_.ICON_MOVE:s.WO_.ICON_NOT_ALLOWED}getAriaLabel(){return this.ariaLabel}createPillComponent(e,t,i){return new _y(e,t,i,this.valueFormatter,this.model.isDraggable(),this.sourceId)}getItems(e){return[e.value]}isInterestedIn(e){return e===s.qRA.ChartPanel}};zv([s.o7C],Fy.prototype,"postConstruct",1);var Gy=class extends s.uAl{constructor(e,t,i,n,s){super(s),this.chartController=e,this.autoScrollService=t,this.allowMultipleSelection=i,this.maxSelection=n,this.columnComps=new Map}refreshColumnComps(e){return!!s._.areEqual(s._.keys(this.columnComps),e.map(({colId:e})=>e))&&(e.forEach(e=>{this.columnComps.get(e.colId).setValue(e.selected,!0)}),!0)}createGroup(e,t,i,n,r){if(this.allowMultipleSelection){const s=e.filter(e=>e.selected);this.valuePillSelect=this.groupComp.createManagedBean(new Oy({valueList:e,selectedValueList:s,valueFormatter:t,selectPlaceholder:this.chartTranslationService.translate(i),dragSourceId:n,onValuesChange:e=>this.onValueChange(e),maxSelection:this.maxSelection})),this.groupComp.addItem(this.valuePillSelect)}else{const t=this.createValueSelectParams(e);t.onValueChange=t=>{e.forEach(e=>{e.selected=!1}),t.selected=!0,t.colId===hy.DEFAULT_CATEGORY&&this.chartController.setAggFunc(void 0,!0),this.chartController.updateForPanelChange({updatedColState:t,skipAnimation:null==r?void 0:r()})},this.valueSelect=this.groupComp.createManagedBean(new s.Ju4(t)),this.groupComp.addItem(this.valueSelect)}}refreshValueSelect(e){if(!this.valueSelect)return;const{options:t,value:i}=this.createValueSelectParams(e);this.valueSelect.clearOptions().addOptions(t).setValue(i,!0)}createValueSelectParams(e){let t;return{options:e.map(e=>{var i;const n=null!=(i=e.displayName)?i:"";return e.selected&&(t=e),{value:e,text:n}}),value:t}}onDragging(e){const t=this.checkHoveredItem(e);if(!t)return;this.lastDraggedColumn=e.dragItem.columns[0];const{comp:i,position:n}=t,{comp:s,position:r}=this.lastHoveredItem||{};i===s&&n===r||(this.autoScrollService.check(e.event),this.clearHoveredItems(),this.lastHoveredItem={comp:i,position:n},i.getGui().classList.add("ag-list-item-hovered",`ag-item-highlight-${n}`))}checkHoveredItem(e){if(s._.missing(e.vDirection))return null;const t=e.event;for(const e of this.columnComps.values()){const i=e.getGui();if(!i.querySelector(".ag-chart-data-column-drag-handle"))continue;const n=i.getBoundingClientRect();if(t.clientY>=n.top&&t.clientY<=n.bottom){const s=i.clientHeight;return{comp:e,position:t.clientY>n.top+s/2?"bottom":"top"}}}return null}onDragLeave(){this.clearHoveredItems()}onDragStop(){if(this.lastHoveredItem){const{dimensionCols:e,valueCols:t}=this.chartController.getColStateForMenu(),i=[...e,...t].find(e=>e.column===this.lastDraggedColumn);if(i){let e=Array.from(this.columnComps.values()).indexOf(this.lastHoveredItem.comp);"bottom"===this.lastHoveredItem.position&&e++,i.order=e,this.chartController.updateForPanelChange({updatedColState:i})}}this.clearHoveredItems(),this.lastDraggedColumn=void 0,this.autoScrollService.ensureCleared()}clearHoveredItems(){this.columnComps.forEach(e=>{e.getGui().classList.remove("ag-list-item-hovered","ag-item-highlight-top","ag-item-highlight-bottom")}),this.lastHoveredItem=void 0}addDragHandle(e,t){const i=s._.createIconNoSpan("columnDrag",this.gos);i.classList.add("ag-drag-handle","ag-chart-data-column-drag-handle"),e.getGui().insertAdjacentElement("beforeend",i);const n={type:s.qRA.ChartPanel,eElement:i,dragItemName:t.displayName,getDragItem:()=>({columns:[t.column]}),onDragStopped:()=>this.onDragStop()};this.dragAndDropService.addDragSource(n,!0),this.addDestroyFunc(()=>this.dragAndDropService.removeDragSource(n))}addChangeListener(e,t){this.addManagedListener(e,s.sVA.EVENT_FIELD_VALUE_CHANGED,()=>{t.selected=e.getValue(),this.chartController.updateForPanelChange({updatedColState:t})})}isInterestedIn(e){return e===s.qRA.ChartPanel}onValueChange({added:e,updated:t,removed:i,selected:n}){let s,r;const o=()=>{n.forEach((e,t)=>{e.order=t}),r=!0};e.length?(s=e[0],s.selected=!0,o()):i.length?(s=i[0],s.selected=!1):t.length&&(o(),s=t[0]),s&&this.chartController.updateForPanelChange({updatedColState:s,resetOrder:r})}destroy(){this.valuePillSelect=void 0,this.valueSelect=void 0,super.destroy()}};zv([(0,s.dsm)("dragAndDropService")],Gy.prototype,"dragAndDropService",2),zv([(0,s.dsm)("chartTranslationService")],Gy.prototype,"chartTranslationService",2);var Vy=class e extends Gy{constructor(t,i,n,s,r,o){super(t,i,s,void 0,e.TEMPLATE),this.title=n,this.dimensionCols=r,this.isOpen=o}init(){this.groupComp=this.createBean(new s.Pk_({title:this.title,enabled:!0,suppressEnabledCheckbox:!0,suppressOpenCloseIcons:!1,cssIdentifier:"charts-data",expanded:this.isOpen})),this.chartMenuService.isLegacyFormat()?(this.createLegacyCategoriesGroup(this.dimensionCols),this.clearAggFuncControls()):(this.createCategoriesGroup(this.dimensionCols),this.createAggFuncControls(this.dimensionCols)),this.getGui().appendChild(this.groupComp.getGui())}refresh(e){var t;this.chartMenuService.isLegacyFormat()?this.refreshColumnComps(e)||this.recreate(e):(null==(t=this.valuePillSelect)||t.setValues(e,e.filter(e=>e.selected)),this.refreshValueSelect(e),this.refreshAggFuncControls(e,this.chartController.getAggFunc()))}recreate(e){this.isOpen=this.groupComp.isExpanded(),s._.clearElement(this.getGui()),this.destroyBean(this.groupComp),this.dimensionCols=e,this.init()}createCategoriesGroup(e){this.createGroup(e,e=>{var t;return null!=(t=e.displayName)?t:""},"categoryAdd","categorySelect",()=>!this.chartController.getAggFunc())}createLegacyCategoriesGroup(e){const t=`chartDimension${this.groupComp.getCompId()}`,i=this.allowMultipleSelection;if(e.forEach(e=>{var n;const r={label:null!=(n=e.displayName)?n:"",value:e.selected,inputName:t},o=this.groupComp.createManagedBean(i?(()=>{const e=new s.Unm(r);return e.addCssClass("ag-data-select-checkbox"),e})():new s.OQA(r));this.addChangeListener(o,e),this.groupComp.addItem(o),this.columnComps.set(e.colId,o),i&&this.addDragHandle(o,e)}),i){const e=this.groupComp.getGui(),t={getIconName:()=>s.WO_.ICON_MOVE,getContainer:()=>e,onDragging:e=>this.onDragging(e),onDragLeave:()=>this.onDragLeave(),isInterestedIn:this.isInterestedIn.bind(this),targetContainsSource:!0};this.dragAndDropService.addDropTarget(t),this.addDestroyFunc(()=>this.dragAndDropService.removeDropTarget(t))}}createAggFuncControls(e){const t=this.chartController.getAggFunc();this.groupComp.addItem(this.aggFuncToggle=this.createBean(new s.bLJ({label:this.chartTranslationService.translate("aggregate"),labelAlignment:"left",labelWidth:"flex",inputWidth:"flex",value:null!=t,onValueChange:e=>{var t,i;const n=e?"sum":void 0;this.chartController.setAggFunc(n),null==(t=this.aggFuncSelect)||t.setValue(n,!0),null==(i=this.aggFuncSelect)||i.setDisplayed(null!=n)}}))),this.groupComp.addItem(this.aggFuncSelect=this.createBean(new s.Ju4({options:[{value:"sum",text:this.chartTranslationService.translate("sum")},{value:"first",text:this.chartTranslationService.translate("first")},{value:"last",text:this.chartTranslationService.translate("last")},{value:"min",text:this.chartTranslationService.translate("min")},{value:"max",text:this.chartTranslationService.translate("max")},{value:"count",text:this.chartTranslationService.translate("count")},{value:"avg",text:this.chartTranslationService.translate("avg")}],value:"string"==typeof t?t:void 0,onValueChange:e=>{this.chartController.setAggFunc(e)}}))),this.refreshAggFuncControls(e,t)}refreshAggFuncControls(e,t){var i,n,s,r;const o=e.filter(e=>e.selected).some(e=>e.colId!==hy.DEFAULT_CATEGORY);null==(i=this.aggFuncToggle)||i.setValue(null!=t),null==(n=this.aggFuncSelect)||n.setValue("string"==typeof t?t:void 0,!0),null==(s=this.aggFuncToggle)||s.setDisplayed(o),null==(r=this.aggFuncSelect)||r.setDisplayed(o&&null!=t)}clearAggFuncControls(){this.aggFuncToggle=this.aggFuncToggle&&this.destroyBean(this.aggFuncToggle),this.aggFuncSelect=this.aggFuncSelect&&this.destroyBean(this.aggFuncSelect)}destroy(){this.clearAggFuncControls(),this.groupComp=this.destroyBean(this.groupComp),super.destroy()}};Vy.TEMPLATE='<div id="categoriesGroup"></div>',zv([(0,s.dsm)("chartMenuService")],Vy.prototype,"chartMenuService",2),zv([s.o7C],Vy.prototype,"init",1);var By=Vy,Hy=class e extends Gy{constructor(t,i,n,s,r,o,a,l){super(t,i,r,o,e.TEMPLATE),this.chartOptionsService=n,this.title=s,this.valueCols=a,this.isOpen=l}init(){if(this.groupComp=this.createBean(new s.Pk_({title:this.title,enabled:!0,suppressEnabledCheckbox:!0,suppressOpenCloseIcons:!1,cssIdentifier:"charts-data",expanded:this.isOpen})),this.chartController.isActiveXYChart()){const e=this.groupComp.createManagedBean(new s.bLJ({label:this.chartTranslationService.translate("paired"),labelAlignment:"left",labelWidth:"flex",inputWidth:"flex",value:this.chartOptionsService.getPairedMode(),onValueChange:e=>{this.chartOptionsService.setPairedMode(!!e),this.chartController.updateForGridChange({maintainColState:!0})}}));this.groupComp.addItem(e)}this.chartMenuService.isLegacyFormat()?this.createLegacySeriesGroup(this.valueCols):this.createSeriesGroup(this.valueCols),this.getGui().appendChild(this.groupComp.getGui())}refresh(e){var t,i;if(this.chartMenuService.isLegacyFormat())if(this.refreshColumnComps(e)){if(this.chartController.isActiveXYChart()){const t=this.generateGetSeriesLabel(e);e.forEach(e=>{this.columnComps.get(e.colId).setLabel(t(e))})}}else this.recreate(e);else null==(t=this.valuePillSelect)||t.setValueFormatter(this.generateGetSeriesLabel(e)),null==(i=this.valuePillSelect)||i.setValues(e,e.filter(e=>e.selected)),this.refreshValueSelect(e)}recreate(e){this.isOpen=this.groupComp.isExpanded(),s._.clearElement(this.getGui()),this.destroyBean(this.groupComp),this.valueCols=e,this.init()}createSeriesGroup(e){this.createGroup(e,this.generateGetSeriesLabel(e),"seriesAdd","seriesSelect")}createLegacySeriesGroup(e){const t=this.generateGetSeriesLabel(e);e.forEach(e=>{const i=t(e),n=this.groupComp.createManagedBean(new s.Unm({label:i,value:e.selected}));n.addCssClass("ag-data-select-checkbox"),this.addChangeListener(n,e),this.groupComp.addItem(n),this.columnComps.set(e.colId,n),this.addDragHandle(n,e)});const i=this.groupComp.getGui(),n={getIconName:()=>s.WO_.ICON_MOVE,getContainer:()=>i,onDragging:e=>this.onDragging(e),onDragLeave:()=>this.onDragLeave(),isInterestedIn:this.isInterestedIn.bind(this),targetContainsSource:!0};this.dragAndDropService.addDropTarget(n),this.addDestroyFunc(()=>this.dragAndDropService.removeDropTarget(n))}generateGetSeriesLabel(e){if(!this.chartController.isActiveXYChart())return e=>{var t;return null!=(t=e.displayName)?t:""};const t=e.filter(e=>e.selected),i="bubble"===this.chartController.getChartType(),n=this.chartOptionsService.getPairedMode(),s=new Map;return s.set(0,"X"),s.set(1,"Y"),s.set(2,"size"),e=>{var r;const o=null!=(r=e.displayName)?r:"";if(!e.selected)return o;const a=t.indexOf(e);if(-1===a)return o;let l;return l=n?s.get(a%(i?3:2)):0===a?"X":i&&a%2==0?"size":"Y",`${o} (${l})`}}destroy(){this.groupComp=this.destroyBean(this.groupComp),super.destroy()}};Hy.TEMPLATE='<div id="seriesGroup"></div>',zv([(0,s.dsm)("chartMenuService")],Hy.prototype,"chartMenuService",2),zv([s.o7C],Hy.prototype,"init",1);var zy=Hy,Uy=class e extends s.uAl{constructor(t,i,n){super(e.TEMPLATE),this.chartController=t,this.columns=i,this.isOpen=n,this.selectedColIds=[],this.chartTypeComps=new Map,this.secondaryAxisComps=new Map}init(){this.createSeriesChartTypeGroup(this.columns)}refresh(e){s._.areEqual(this.getValidColIds(e),this.selectedColIds)?this.refreshComps():this.recreate(e)}recreate(e){this.isOpen=this.seriesChartTypeGroupComp.isExpanded(),s._.clearElement(this.getGui()),this.destroyBean(this.seriesChartTypeGroupComp),this.columns=e,this.selectedColIds=[],this.clearComps(),this.init()}getValidColIds(e){const t=this.chartController.getSeriesChartTypes();return e.filter(e=>e.selected&&!!t.filter(t=>t.colId===e.colId)[0]).map(({colId:e})=>e)}createSeriesChartTypeGroup(e){this.seriesChartTypeGroupComp=this.createBean(new s.Pk_({title:this.chartTranslationService.translate("seriesChartType"),enabled:!0,suppressEnabledCheckbox:!0,suppressOpenCloseIcons:!1,cssIdentifier:"charts-data",expanded:this.isOpen}));const t=this.chartController.getSeriesChartTypes();e.forEach(e=>{if(!e.selected)return;const i=t.filter(t=>t.colId===e.colId)[0];if(!i)return;this.selectedColIds.push(e.colId);const n=this.seriesChartTypeGroupComp.createManagedBean(new s.Pk_({title:e.displayName,enabled:!0,suppressEnabledCheckbox:!0,suppressOpenCloseIcons:!0,cssIdentifier:"charts-format-sub-level"})),r=this.seriesChartTypeGroupComp.createManagedBean(new s.Unm({label:this.chartTranslationService.translate("secondaryAxis"),labelWidth:"flex",disabled:(e=>["groupedColumn","stackedColumn","stackedArea"].includes(e))(i.chartType),value:!!i.secondaryAxis,onValueChange:t=>this.chartController.updateSeriesChartType(e.colId,void 0,t)}));n.addItem(r);const o=e=>this.chartTranslationService.translate(e),a=[{value:"line",text:o("line")},{value:"area",text:o("area")},{value:"stackedArea",text:o("stackedArea")},{value:"groupedColumn",text:o("groupedColumn")},{value:"stackedColumn",text:o("stackedColumn")}],l=n.createManagedBean(new s.Ju4({labelAlignment:"left",labelWidth:"flex",options:a,value:i.chartType,onValueChange:t=>this.chartController.updateSeriesChartType(e.colId,t)}));n.addItem(l),this.seriesChartTypeGroupComp.addItem(n),this.chartTypeComps.set(e.colId,l),this.secondaryAxisComps.set(e.colId,r)}),this.getGui().appendChild(this.seriesChartTypeGroupComp.getGui())}refreshComps(){const e=this.chartController.getSeriesChartTypes();this.selectedColIds.forEach(t=>{const i=e.find(e=>e.colId===t);if(!i)return;const n=this.chartTypeComps.get(t),s=this.secondaryAxisComps.get(t);null==n||n.setValue(i.chartType),null==s||s.setValue(!!i.secondaryAxis),null==s||s.setDisabled(this.isSecondaryAxisDisabled(i.chartType))})}clearComps(){this.chartTypeComps.clear(),this.secondaryAxisComps.clear()}isSecondaryAxisDisabled(e){return["groupedColumn","stackedColumn","stackedArea"].includes(e)}destroy(){this.clearComps(),this.seriesChartTypeGroupComp=this.destroyBean(this.seriesChartTypeGroupComp),super.destroy()}};Uy.TEMPLATE='<div id="seriesChartTypeGroup"></div>',zv([(0,s.dsm)("chartTranslationService")],Uy.prototype,"chartTranslationService",2),zv([s.o7C],Uy.prototype,"init",1);var Wy=Uy,jy=class e extends s.uAl{constructor(e,t){super(),this.getValue=e,this.setValue=t}init(){this.switchCategorySeriesToggleButton=this.createManagedBean(new s.bLJ({label:this.chartTranslationService.translate("switchCategorySeries"),labelAlignment:"left",labelWidth:"flex",inputWidth:"flex",value:this.getValue(),onValueChange:e=>{this.setValue(e)}}));const t={title:void 0,suppressEnabledCheckbox:!0,suppressOpenCloseIcons:!0,cssIdentifier:"charts-data",expanded:!0,items:[this.switchCategorySeriesToggleButton]};this.setTemplate(e.TEMPLATE,{switchCategorySeriesGroup:t})}refresh(){var e;null==(e=this.switchCategorySeriesToggleButton)||e.setValue(this.getValue(),!0)}};jy.TEMPLATE='<div>\n        <ag-group-component ref="switchCategorySeriesGroup"></ag-group-component>\n    </div>',zv([(0,s.dsm)("chartTranslationService")],jy.prototype,"chartTranslationService",2),zv([s.o7C],jy.prototype,"init",1);var Ky=jy,$y={groups:[{type:"categories",isOpen:!0},{type:"series",isOpen:!0},{type:"seriesChartType",isOpen:!0}]},Yy=class e extends s.uAl{constructor(t,i){super(e.TEMPLATE),this.chartController=t,this.chartOptionsService=i,this.isSwitchCategorySeriesToggled=!1}init(){this.switchCategorySeriesPanel=this.addComponent(this.createManagedBean(new Ky(()=>this.chartController.isCategorySeriesSwitched(),e=>this.chartController.switchCategorySeries(e)))),this.isSwitchCategorySeriesToggled=this.chartController.isCategorySeriesSwitched(),this.createAutoScrollService(),this.updatePanels(),this.addManagedListener(this.chartController,Py.EVENT_CHART_MODEL_UPDATE,this.updatePanels.bind(this)),this.addManagedListener(this.chartController,Py.EVENT_CHART_API_UPDATE,this.updatePanels.bind(this))}destroy(){this.clearPanelComponents(),super.destroy()}updatePanels(){var e,t,i,n,s;const r=this.chartType,o=this.isSwitchCategorySeriesToggled,{dimensionCols:a,valueCols:l}=this.chartController.getColStateForMenu();this.chartType=this.chartController.getChartType(),this.isSwitchCategorySeriesToggled=this.chartController.isCategorySeriesSwitched();const c=this.isSwitchCategorySeriesToggled!==o;this.canRefresh(r,this.chartType)&&!c?(null==(e=this.categoriesDataPanel)||e.refresh(a),null==(t=this.seriesDataPanel)||t.refresh(l),null==(i=this.seriesChartTypePanel)||i.refresh(l)):this.recreatePanels(a,l),null==(n=this.switchCategorySeriesPanel)||n.setDisplayed(ly(this.chartType)&&!this.chartMenuService.isLegacyFormat()&&!this.chartController.isGrouping()),c&&(null==(s=this.switchCategorySeriesPanel)||s.refresh())}canRefresh(e,t){if(void 0===e)return!1;if(e===t)return!0;const i=e=>["columnLineCombo","areaColumnCombo","customCombo"].includes(e);return!(!i(e)||!i(t))}recreatePanels(e,t){var i;this.clearPanelComponents();const{chartType:n}=this;if(!n)return;const r=this.chartController.isCategorySeriesSwitched(),o=null==(i=this.getDataPanelDef().groups)?void 0:i.map(({type:i,isOpen:o})=>i===(r?"series":"categories")?this.categoriesDataPanel=this.createBean(new By(this.chartController,this.autoScrollService,this.getCategoryGroupTitle(r),this.getCategoryGroupMultipleSelect(n,r),e,o)):i===(r?"categories":"series")?this.seriesDataPanel=this.createBean(new zy(this.chartController,this.autoScrollService,this.chartOptionsService,this.getSeriesGroupTitle(r),this.getSeriesGroupMultipleSelect(n,r),this.getSeriesGroupMaxSelection(n,r),t,o)):"seriesChartType"===i?this.chartController.isComboChart()?this.seriesChartTypePanel=this.createBean(new Wy(this.chartController,t,o)):null:(s._.warnOnce(`Invalid charts data panel group name supplied: '${i}'`),null)).filter(e=>null!=e);o&&this.addPanelComponents(o)}addPanelComponents(e){var t;const i=document.createDocumentFragment();for(const t of e)this.registerComponent(t),i.appendChild(t.getGui());const n=null==(t=this.switchCategorySeriesPanel)?void 0:t.getGui();return this.getGui().insertBefore(i,null!=n?n:null),e}clearPanelComponents(){const e=this.getGui();this.categoriesDataPanel&&e.removeChild(this.categoriesDataPanel.getGui()),this.seriesDataPanel&&e.removeChild(this.seriesDataPanel.getGui()),this.seriesChartTypePanel&&e.removeChild(this.seriesChartTypePanel.getGui()),this.categoriesDataPanel=this.destroyBean(this.categoriesDataPanel),this.seriesDataPanel=this.destroyBean(this.seriesDataPanel),this.seriesChartTypePanel=this.destroyBean(this.seriesChartTypePanel)}createAutoScrollService(){const e=this.getGui();this.autoScrollService=new s.MSA({scrollContainer:e,scrollAxis:"y",getVerticalPosition:()=>e.scrollTop,setVerticalPosition:t=>e.scrollTop=t})}addComponent(e){return this.registerComponent(e),this.getGui().appendChild(e.getGui()),e}registerComponent(e){e.addCssClass("ag-chart-data-section")}getDataPanelDef(){var e,t;return null!=(t=null==(e=this.gos.get("chartToolPanelsDef"))?void 0:e.dataPanel)?t:$y}getCategoryGroupTitle(e){return e?this.chartTranslationService.translate("seriesLabels"):this.chartTranslationService.translate(this.chartController.isActiveXYChart()?"labels":"categories")}getCategoryGroupMultipleSelect(e,t){return!t&&1!==oy(e)}getSeriesGroupTitle(e){return e?this.chartTranslationService.translate("categoryValues"):this.chartTranslationService.translate(this.chartController.isActiveXYChart()?"xyValues":"series")}getSeriesGroupMultipleSelect(e,t){return 1!==this.getSeriesGroupMaxSelection(e,t)}getSeriesGroupMaxSelection(e,t){if(!t)return ay(e)}};Yy.TEMPLATE='<div class="ag-chart-data-wrapper ag-scrollable-container"></div>',zv([(0,s.dsm)("chartTranslationService")],Yy.prototype,"chartTranslationService",2),zv([(0,s.dsm)("chartMenuService")],Yy.prototype,"chartMenuService",2),zv([s.o7C],Yy.prototype,"init",1);var qy=Yy,Xy=class e extends s.uAl{constructor(e){super(),this.activeComps=[],this.params=e,this.chartOptions=e.chartMenuUtils.getChartOptions()}init(){const t={cssIdentifier:"charts-format-sub-level",direction:"vertical",suppressOpenCloseIcons:!0,title:this.params.name||this.chartTranslationService.translate("font"),enabled:this.params.enabled,suppressEnabledCheckbox:!!this.params.suppressEnabledCheckbox,onEnableChange:e=>{this.params.onEnableChange&&this.params.onEnableChange(e)}};this.setTemplate(e.TEMPLATE,{fontGroup:t,familySelect:this.getFamilySelectParams(),weightStyleSelect:this.getWeightStyleSelectParams(),sizeSelect:this.getSizeSelectParams(),colorPicker:this.params.chartMenuUtils.getDefaultColorPickerParams(this.params.keyMapper("color"))})}addCompToPanel(e){this.fontGroup.addItem(e),this.activeComps.push(e)}setEnabled(e){this.fontGroup.setEnabled(e)}getFamilySelectParams(){const e=["Arial, sans-serif","Aria Black, sans-serif","Book Antiqua,  serif","Charcoal, sans-serif","Comic Sans MS, cursive","Courier, monospace","Courier New, monospace","Gadget, sans-serif","Geneva, sans-serif","Helvetica, sans-serif","Impact, sans-serif","Lucida Console, monospace","Lucida Grande, sans-serif","Lucida Sans Unicode,  sans-serif","Monaco, monospace","Palatino Linotype, serif","Palatino, serif","Times New Roman, serif","Times, serif","Verdana, sans-serif"],t=this.getInitialFontValue("fontFamily");let i=e[0];if(t){const n=e.map(e=>e.toLowerCase()).indexOf(t.toLowerCase());if(n>=0)i=e[n];else{const n=s._.capitalise(t);e.push(n),i=n}}return{options:e.sort().map(e=>({value:e,text:e})),inputWidth:"flex",value:`${i}`,onValueChange:e=>this.setFont({fontFamily:e})}}getSizeSelectParams(){const e=[8,10,12,14,16,18,20,22,24,26,28,30,32,34,36],t=this.getInitialFontValue("fontSize");return s._.includes(e,t)||e.push(t),{options:e.sort((e,t)=>e-t).map(e=>({value:`${e}`,text:`${e}`})),inputWidth:"flex",value:`${t}`,onValueChange:e=>this.setFont({fontSize:parseInt(e,10)}),label:this.chartTranslationService.translate("size")}}getWeightStyleSelectParams(){var e,t;const i=null!=(e=this.getInitialFontValue("fontWeight"))?e:"normal",n=null!=(t=this.getInitialFontValue("fontStyle"))?t:"normal",s=[{name:"normal",weight:"normal",style:"normal"},{name:"bold",weight:"bold",style:"normal"},{name:"italic",weight:"normal",style:"italic"},{name:"boldItalic",weight:"bold",style:"italic"}];let r=s.find(e=>e.weight===i&&e.style===n);return r||(r={name:"predefined",weight:i,style:n},s.unshift(r)),{options:s.map(e=>({value:e.name,text:this.chartTranslationService.translate(e.name)})),inputWidth:"flex",value:r.name,onValueChange:e=>{const t=s.find(t=>t.name===e);this.setFont({fontWeight:t.weight,fontStyle:t.style})}}}addItemToPanel(e){this.fontGroup.addItem(e),this.activeComps.push(e)}destroyActiveComps(){this.activeComps.forEach(e=>{s._.removeFromParent(e.getGui()),this.destroyBean(e)})}destroy(){this.destroyActiveComps(),super.destroy()}setFont(e){const{keyMapper:t}=this.params;Object.entries(e).forEach(([e,i])=>{i&&this.chartOptions.setValue(t(e),i)})}getInitialFontValue(e){const{keyMapper:t}=this.params;return this.chartOptions.getValue(t(e))}};Xy.TEMPLATE='<div class="ag-font-panel">\n            <ag-group-component ref="fontGroup">\n                <ag-select ref="familySelect"></ag-select>\n                <ag-select ref="weightStyleSelect"></ag-select>\n                <div class="ag-charts-font-size-color">\n                    <ag-select ref="sizeSelect"></ag-select>\n                    <ag-color-picker ref="colorPicker"></ag-color-picker>\n                </div>\n            </ag-group-component>\n        </div>',zv([(0,s.PIB)("fontGroup")],Xy.prototype,"fontGroup",2),zv([(0,s.dsm)("chartTranslationService")],Xy.prototype,"chartTranslationService",2),zv([s.o7C],Xy.prototype,"init",1);var Zy=Xy,Qy=class e extends s.uAl{constructor({chartMenuParamsFactory:e,isExpandedOnInit:t=!1}){super(),this.chartMenuUtils=e,this.isExpandedOnInit=t}init(){const t=this.chartMenuUtils.addEnableParams("legend.enabled",{cssIdentifier:"charts-format-top-level",direction:"vertical",title:this.chartTranslationService.translate("legend"),suppressEnabledCheckbox:!1,suppressToggleExpandOnEnableChange:!0,expanded:this.isExpandedOnInit,items:[this.createLabelPanel()]});this.setTemplate(e.TEMPLATE,{legendGroup:t,legendPositionSelect:this.chartMenuUtils.getDefaultLegendParams("legend.position"),legendPaddingSlider:this.getSliderParams("spacing","spacing",200),markerSizeSlider:this.getSliderParams("item.marker.size","markerSize",40),markerStrokeSlider:this.getSliderParams("item.marker.strokeWidth","markerStroke",10),markerPaddingSlider:this.getSliderParams("item.marker.padding","itemSpacing",20),itemPaddingXSlider:this.getSliderParams("item.paddingX","layoutHorizontalSpacing",50),itemPaddingYSlider:this.getSliderParams("item.paddingY","layoutVerticalSpacing",50)})}getSliderParams(e,t,i){return this.chartMenuUtils.getDefaultSliderParams(`legend.${e}`,t,i)}createLabelPanel(){const e={enabled:!0,suppressEnabledCheckbox:!0,chartMenuUtils:this.chartMenuUtils,keyMapper:e=>`legend.item.label.${e}`};return this.createManagedBean(new Zy(e))}};Qy.TEMPLATE='<div>\n            <ag-group-component ref="legendGroup">\n                <ag-select ref="legendPositionSelect"></ag-select>\n                <ag-slider ref="legendPaddingSlider"></ag-slider>\n                <ag-slider ref="markerSizeSlider"></ag-slider>\n                <ag-slider ref="markerStrokeSlider"></ag-slider>\n                <ag-slider ref="markerPaddingSlider"></ag-slider>\n                <ag-slider ref="itemPaddingXSlider"></ag-slider>\n                <ag-slider ref="itemPaddingYSlider"></ag-slider>\n            </ag-group-component>\n        </div>',zv([(0,s.dsm)("chartTranslationService")],Qy.prototype,"chartTranslationService",2),zv([s.o7C],Qy.prototype,"init",1);var Jy=Qy,eC=class e extends s.uAl{constructor(e){super(),this.chartMenuUtils=e}init(){const t=this.chartMenuUtils.addEnableParams("tick.enabled",{cssIdentifier:"charts-format-sub-level",direction:"vertical",suppressOpenCloseIcons:!0,title:this.chartTranslationService.translate("ticks"),suppressEnabledCheckbox:!1}),i=this.chartMenuUtils.getDefaultColorPickerParams("tick.color"),n=this.chartMenuUtils.getDefaultSliderParams("tick.width","width",10),s=this.chartMenuUtils.getDefaultSliderParams("tick.size","length",30);this.setTemplate(e.TEMPLATE,{axisTicksGroup:t,axisTicksColorPicker:i,axisTicksWidthSlider:n,axisTicksSizeSlider:s})}};eC.TEMPLATE='<div>\n            <ag-group-component ref="axisTicksGroup">\n                <ag-color-picker ref="axisTicksColorPicker"></ag-color-picker>\n                <ag-slider ref="axisTicksWidthSlider"></ag-slider>\n                <ag-slider ref="axisTicksSizeSlider"></ag-slider>\n            </ag-group-component>\n        </div>',zv([(0,s.dsm)("chartTranslationService")],eC.prototype,"chartTranslationService",2),zv([s.o7C],eC.prototype,"init",1);var tC=eC,iC=class e extends s.uAl{constructor(e){super(),this.chartMenuUtils=e,this.chartOptions=e.getChartOptions()}init(){const t=this.chartMenuUtils.addEnableParams("gridLine.enabled",{cssIdentifier:"charts-format-sub-level",direction:"vertical",suppressOpenCloseIcons:!0,title:this.chartTranslationService.translate("gridLines"),suppressEnabledCheckbox:!1}),i=this.getGridLineColorPickerParams("color"),n=this.getGridLineWidthSliderParams("thickness"),s=this.getGridLineDashSliderParams("lineDash");this.setTemplate(e.TEMPLATE,{gridLineGroup:t,gridLineColorPicker:i,gridLineWidthSlider:n,gridLineLineDashSlider:s})}getGridLineColorPickerParams(e){return this.chartMenuUtils.getDefaultColorPickerParams("gridLine.style",e,{formatInputValue:e=>{var t;return null==(t=null==e?void 0:e[0])?void 0:t.stroke},parseInputValue:e=>{var t;const i=null!=(t=this.chartOptions.getValue("gridLine.style"))?t:[];return 0===i.length?[{stroke:e,lineDash:[]}]:[Bv(Vv({},i[0]),{stroke:e})]}})}getGridLineWidthSliderParams(e){return this.chartMenuUtils.getDefaultSliderParams("gridLine.width",e,10)}getGridLineDashSliderParams(e){var t,i;const n=this.chartOptions.getValue("gridLine.style"),s=null==(i=null==(t=null==n?void 0:n[0])?void 0:t.lineDash)?void 0:i[0],r=this.chartMenuUtils.getDefaultSliderParamsWithoutValueParams(null!=s?s:0,e,30);return r.onValueChange=e=>{const t=this.chartOptions.getValue("gridLine.style.0.stroke");this.chartOptions.setValue("gridLine.style",[{lineDash:[e],stroke:t}])},r}};iC.TEMPLATE='<div>\n            <ag-group-component ref="gridLineGroup">\n                <ag-color-picker ref="gridLineColorPicker"></ag-color-picker>\n                <ag-slider ref="gridLineWidthSlider"></ag-slider>\n                <ag-slider ref="gridLineLineDashSlider"></ag-slider>\n            </ag-group-component>\n        </div>',zv([(0,s.dsm)("chartTranslationService")],iC.prototype,"chartTranslationService",2),zv([s.o7C],iC.prototype,"init",1);var nC=iC,sC=class e extends s.DKR{constructor(t){super(t,e.TEMPLATE),this.radius=0,this.offsetX=0,this.offsetY=0}postConstruct(){super.postConstruct();const{value:e,onValueChange:t}=this.config;null!=e&&this.setValue(e,void 0,!0),null!=t&&this.onValueChange(t),this.dragListener={eElement:this.eParentCircle,dragStartPixels:0,onDragStart:e=>{this.parentCircleRect=this.eParentCircle.getBoundingClientRect()},onDragging:e=>this.calculateAngleDrag(e),onDragStop:()=>{}},this.dragService.addDragSource(this.dragListener),this.eAngleValue.setLabel("").setLabelWidth(5).setInputWidth(45).setMin(0).setMax(360).setValue(`${this.degrees}`).onValueChange(e=>{null!=e&&""!==e||(e="0"),e=this.eAngleValue.normalizeValue(e);let t=parseFloat(e);t>180&&(t-=360),this.setValue(t)}),this.updateNumberInput(),s._.exists(this.getValue())&&this.eAngleValue.setValue(this.normalizeNegativeValue(this.getValue()).toString()),this.addManagedListener(this,s.sVA.EVENT_FIELD_VALUE_CHANGED,()=>{this.eAngleValue.getInputElement().contains(this.gos.getActiveDomElement())||this.updateNumberInput()})}updateNumberInput(){const e=this.normalizeNegativeValue(this.getValue());this.eAngleValue.setValue(e.toString())}positionChildCircle(e){const t=this.parentCircleRect||{width:24,height:24},i=this.eChildCircle,n=t.width/2,s=t.height/2;i.style.left=`${n+8*Math.cos(e)}px`,i.style.top=`${s+8*Math.sin(e)}px`}calculatePolar(){const e=this.offsetX,t=this.offsetY,i=Math.atan2(t,e);this.degrees=this.toDegrees(i),this.radius=Math.sqrt(e*e+t*t),this.positionChildCircle(i)}calculateCartesian(){const e=this.toRadians(this.getValue()),t=this.getRadius();this.setOffsetX(Math.cos(e)*t).setOffsetY(Math.sin(e)*t)}setOffsetX(e){return this.offsetX!==e&&(this.offsetX=e,this.calculatePolar()),this}setOffsetY(e){return this.offsetY!==e&&(this.offsetY=e,this.calculatePolar()),this}calculateAngleDrag(e){const t=this.parentCircleRect,i=t.width/2,n=t.height/2,s=e.clientX-t.left-i,r=e.clientY-t.top-n,o=Math.atan2(r,s);this.setValue(o,!0)}toDegrees(e){return e/Math.PI*180}toRadians(e){return e/180*Math.PI}normalizeNegativeValue(e){return e<0?360+e:e}normalizeAngle180(e){return(e%=2*Math.PI)<-Math.PI?e+=2*Math.PI:e>=Math.PI&&(e-=2*Math.PI),e}getRadius(){return this.radius}setRadius(e){return this.radius===e||(this.radius=e,this.calculateCartesian()),this}onValueChange(e){return this.addManagedListener(this,s.sVA.EVENT_FIELD_VALUE_CHANGED,()=>{e(this.degrees)}),this}getValue(e){return e?this.toRadians(this.degrees):this.degrees}setValue(e,t,i){let n;return n=t?e:this.normalizeAngle180(this.toRadians(e)),e=this.toDegrees(n),this.degrees!==e&&(this.degrees=Math.floor(e),this.calculateCartesian(),this.positionChildCircle(n),i||this.dispatchEvent({type:s.sVA.EVENT_FIELD_VALUE_CHANGED})),this}setWidth(e){return s._.setFixedWidth(this.getGui(),e),this}setDisabled(e){return super.setDisabled(e),this.eAngleValue.setDisabled(e),this}destroy(){this.dragService.removeDragSource(this.dragListener),super.destroy()}};sC.TEMPLATE='<div class="ag-angle-select">\n            <div ref="eLabel"></div>\n            <div class="ag-wrapper ag-angle-select-wrapper">\n                <div ref="eAngleSelectField" class="ag-angle-select-field">\n                    <div ref="eParentCircle" class="ag-angle-select-parent-circle">\n                        <div ref="eChildCircle" class="ag-angle-select-child-circle"></div>\n                    </div>\n                </div>\n                <ag-input-number-field ref="eAngleValue"></ag-input-number-field>\n            </div>\n        </div>',zv([(0,s.PIB)("eLabel")],sC.prototype,"eLabel",2),zv([(0,s.PIB)("eParentCircle")],sC.prototype,"eParentCircle",2),zv([(0,s.PIB)("eChildCircle")],sC.prototype,"eChildCircle",2),zv([(0,s.PIB)("eAngleValue")],sC.prototype,"eAngleValue",2),zv([(0,s.dsm)("dragService")],sC.prototype,"dragService",2);var rC=sC,oC=class extends s.XQb{constructor(e){super(),this.chartOptionsProxy=e}getDefaultColorPickerParams(e,t,i){return this.addValueParams(e,{label:this.chartTranslationService.translate(null!=t?t:"color"),labelWidth:"flex",inputWidth:"flex"},i)}getDefaultNumberInputParams(e,t,i){return this.addValueParams(e,{label:this.chartTranslationService.translate(t),labelWidth:"flex",inputWidth:"flex",precision:null==i?void 0:i.precision,step:null==i?void 0:i.step,min:null==i?void 0:i.min,max:null==i?void 0:i.max},{parseInputValue:e=>{const t=Number(e);return isNaN(t)?void 0:t},formatInputValue:e=>null==e?"":`${e}`})}getDefaultSliderParams(e,t,i,n){var s;let r=null!=(s=this.chartOptionsProxy.getValue(e))?s:0;n&&Array.isArray(r)&&(r=r[0]);const o=this.getDefaultSliderParamsWithoutValueParams(r,t,i);return o.onValueChange=t=>this.chartOptionsProxy.setValue(e,n?[t]:t),o}getDefaultSliderParamsWithoutValueParams(e,t,i){return{label:this.chartTranslationService.translate(t),minValue:0,maxValue:Math.max(e,i),textFieldWidth:45,value:`${e}`}}getDefaultCheckboxParams(e,t,i){const n=this.chartOptionsProxy.getValue(e),s={label:this.chartTranslationService.translate(t),value:n,readOnly:null==i?void 0:i.readOnly,passive:null==i?void 0:i.passive};return s.onValueChange=t=>{this.chartOptionsProxy.setValue(e,"boolean"==typeof t?t:void 0)},s}getDefaultSelectParams(e,t,i,n){const s=this.chartOptionsProxy.getValue(e),r={label:this.chartTranslationService.translate(t),value:s,options:i,pickerType:null==n?void 0:n.pickerType,pickerAriaLabelKey:null==n?void 0:n.pickerAriaLabelKey,pickerAriaLabelValue:null==n?void 0:n.pickerAriaLabelValue};return r.onValueChange=t=>{this.chartOptionsProxy.setValue(e,t)},r}getDefaultLegendParams(e){return this.addValueParams(e,{label:this.chartTranslationService.translate("position"),labelWidth:"flex",inputWidth:"flex",options:["top","right","bottom","left"].map(e=>({value:e,text:this.chartTranslationService.translate(e)}))})}getDefaultFontPanelParams(e,t){const i=t=>`${e}.${t}`;return this.addEnableParams(i("enabled"),{name:this.chartTranslationService.translate(t),suppressEnabledCheckbox:!1,chartMenuUtils:this,keyMapper:i})}addValueParams(e,t,i){const n=this.chartOptionsProxy.getValue(e);return t.value=(null==i?void 0:i.formatInputValue)?i.formatInputValue(n):n,t.onValueChange=t=>{const n=(null==i?void 0:i.parseInputValue)?i.parseInputValue(t):t;this.chartOptionsProxy.setValue(e,n)},t}addEnableParams(e,t){var i;return t.enabled=null!=(i=this.chartOptionsProxy.getValue(e))&&i,t.onEnableChange=t=>this.chartOptionsProxy.setValue(e,t),t}getChartOptions(){return this.chartOptionsProxy}};zv([(0,s.dsm)("chartTranslationService")],oC.prototype,"chartTranslationService",2);var aC=class e extends s.uAl{constructor(e,{chartController:t,chartOptionsService:i,isExpandedOnInit:n=!1,seriesType:s}){super(),this.activePanels=[],this.axisLabelUpdateFuncs=[],this.axisType=e,this.chartController=t,this.chartAxisOptionsProxy=i.getCartesianAxisOptionsProxy(e),this.chartAxisThemeOverridesProxy=i.getCartesianAxisThemeOverridesProxy(e),this.chartAxisAppliedThemeOverridesProxy=i.getCartesianAxisAppliedThemeOverridesProxy(e),this.chartOptionsSeriesProxy=i.getSeriesOptionsProxy(()=>null!=s?s:this.chartController.getChartSeriesType()),this.chartOptionsService=i,this.isExpandedOnInit=n}init(){var t;const i=this.axisType,n={cssIdentifier:"charts-format-top-level",direction:"vertical",title:this.translate(i),expanded:this.isExpandedOnInit,suppressEnabledCheckbox:!0},r=this.createManagedBean(new oC(this.chartAxisOptionsProxy)),o=this.createManagedBean(new oC(this.chartAxisThemeOverridesProxy)),a=this.getAxisTypeSelectParams(r,this.chartAxisAppliedThemeOverridesProxy),l=this.getAxisPositionSelectParams(r),c=this.getAxisTimeFormatSelectParams(r),h=this.getAxisColorInputParams(o),d=this.getAxisLineWidthSliderParams(o);this.setTemplate(e.TEMPLATE,{axisGroup:n,axisTypeSelect:null!=a?a:void 0,axisPositionSelect:null!=l?l:void 0,axisTimeFormatSelect:null!=c?c:void 0,axisColorInput:h,axisLineWidthSlider:d}),this.axisTypeSelect.setDisplayed(!!(null==(t=a.options)?void 0:t.length)),l||this.removeTemplateComponent(this.axisPositionSelect);const u=()=>{const e="time"===this.chartAxisOptionsProxy.getValue("type");s._.setDisplayed(this.axisTimeFormatSelect.getGui(),e)};c?(u(),this.addManagedListener(this.eventService,s.sVA.EVENT_CHART_OPTIONS_CHANGED,e=>{u()})):this.removeTemplateComponent(this.axisTimeFormatSelect),this.initGridLines(o),this.initAxisTicks(o),this.initAxisLabels(o),this.addManagedListener(this.chartController,Py.EVENT_CHART_UPDATED,()=>this.axisLabelUpdateFuncs.forEach(e=>e())),this.addManagedListener(this.chartController,Py.EVENT_CHART_MODEL_UPDATE,()=>setTimeout(()=>{this.refreshAxisTypeSelect(r),u()}))}getAxisTypeSelectParams(e,t){const i=e.getChartOptions(),n=this.getAxisTypeSelectOptions(),s=e.getDefaultSelectParams("type","axisType",n);return s.onValueChange=e=>{var n;const s=i.getValue("type");if(e===s)return;const r=t.getValue("*"),o="time"===e,a="time"===s!==o?o?"%d %B %Y":void 0:null;if(this.chartOptionsService.setCartesianCategoryAxisType(this.axisType,e),null!==a){const e=null!=(n=i.getValue("label"))?n:{};i.setValue("label",Bv(Vv({},e),{format:a}))}t.setValue("*",r)},s}refreshAxisTypeSelect(e){const t=this.getAxisTypeSelectOptions(),i=!!t.length;this.axisTypeSelect.setDisplayed(i),i&&this.axisTypeSelect.clearOptions().addOptions(t).setValue(e.getChartOptions().getValue("type"))}getAxisTypeSelectOptions(){const e=this.chartController.getChartType();return["heatmap","histogram","boxPlot","rangeBar","scatter","bubble"].includes(e)||this.chartController.isGrouping()||!this.isCategoryAxis()||this.chartController.isCategorySeriesSwitched()||!(()=>{const e=this.chartController.getChartData()[0];return!!e&&this.chartController.getSelectedDimensions().every(t=>!isNaN(parseFloat(e[t.colId])))})()?[]:["category","number","time"].map(e=>({value:e,text:this.translate(e)}))}isCategoryAxis(){const e="horizontal"===this.chartOptionsSeriesProxy.getValue("direction");return e&&"yAxis"===this.axisType||!e&&"xAxis"===this.axisType}getAxisPositionSelectParams(e){const t=((e,t)=>{if("heatmap"===e)return null;switch(t){case"xAxis":return[{value:"top",text:this.translate("top")},{value:"bottom",text:this.translate("bottom")}];case"yAxis":return[{value:"left",text:this.translate("left")},{value:"right",text:this.translate("right")}]}})(this.chartController.getChartType(),this.axisType);return t?e.getDefaultSelectParams("position","position",t):null}getAxisTimeFormatSelectParams(e){if(!this.isCategoryAxis())return null;const t=[{value:"%d/%m/%Y",text:this.translate("timeFormatSlashesDDMMYYYY")},{value:"%m/%d/%Y",text:this.translate("timeFormatSlashesMMDDYYYY")},{value:"%d/%m/%y",text:this.translate("timeFormatSlashesDDMMYY")},{value:"%m/%d/%y",text:this.translate("timeFormatSlashesMMDDYY")},{value:"%d.%e.%y",text:this.translate("timeFormatDotsDDMYY")},{value:"%e.%d.%y",text:this.translate("timeFormatDotsMDDYY")},{value:"%Y-%m-%d",text:this.translate("timeFormatDashesYYYYMMDD")},{value:"%d %B %Y",text:this.translate("timeFormatSpacesDDMMMMYYYY")},{value:"%H:%M:%S",text:this.translate("timeFormatHHMMSS")},{value:"%I:%M:%S %p",text:this.translate("timeFormatHHMMSSAmPm")}];return e.getDefaultSelectParams("label.format","timeFormat",t)}getAxisColorInputParams(e){return e.getDefaultColorPickerParams("line.color")}getAxisLineWidthSliderParams(e){var t;const i=e.getChartOptions(),n=e.getDefaultSliderParamsWithoutValueParams(null!=(t=i.getValue("line.enabled")?i.getValue("line.width"):null)?t:0,"thickness",10);return n.onValueChange=e=>{var t;t=0===e?null:e,i.setValues([{expression:"line.enabled",value:null!=t},{expression:"line.width",value:null!=t?t:0}])},n}initGridLines(e){if("heatmap"!==this.chartController.getChartType()){const t=this.createBean(new nC(e));this.axisGroup.addItem(t),this.activePanels.push(t)}}initAxisTicks(e){if(!this.hasConfigurableAxisTicks())return;const t=this.createBean(new tC(e));this.axisGroup.addItem(t),this.activePanels.push(t)}hasConfigurableAxisTicks(){switch(this.chartController.getChartType()){case"radarLine":case"radarArea":case"rangeBar":case"boxPlot":case"waterfall":return!1;default:return!0}}initAxisLabels(e){const t={name:this.translate("labels"),enabled:!0,suppressEnabledCheckbox:!0,chartMenuUtils:e,keyMapper:e=>`label.${e}`},i=this.createBean(new Zy(t));this.axisGroup.addItem(i),this.activePanels.push(i),this.addAdditionalLabelComps(i,e)}addAdditionalLabelComps(e,t){this.addLabelPadding(e,t);const i=this.createRotationWidget("labelRotation",t),n=this.initLabelRotation(i,t);e.addCompToPanel(n),e.addCompToPanel(i)}initLabelRotation(e,t){const i=t.getChartOptions(),n=()=>i.getValue("label.rotation"),r="number"!=typeof n()&&i.getValue("label.autoRotate"),o=this.createBean(new s.Unm({label:this.translate("autoRotate"),value:r,onValueChange:t=>{t&&(this.prevRotation=n()),i.setValues([{expression:"label.autoRotate",value:t},{expression:"label.rotation",value:t?void 0:this.prevRotation}]),e.setDisabled(t)}}));return e.setDisabled(r),o}createRotationWidget(e,t){var i;const n=t.getChartOptions(),s=()=>n.getValue("label.rotation"),r=String.fromCharCode(176),o=`${this.chartTranslationService.translate(e)} ${r}`,a=new rC({label:o,labelWidth:"flex",value:null!=(i=s())?i:0,onValueChange:e=>n.setValue("label.rotation",e)});return this.axisLabelUpdateFuncs.push(()=>{var e;a.setValue(null!=(e=s())?e:0)}),this.createBean(a)}addLabelPadding(e,t){const i=this.createBean(new s.YD7(t.getDefaultSliderParams("label.padding","padding",30)));e.addCompToPanel(i)}translate(e){return this.chartTranslationService.translate(e)}removeTemplateComponent(e){s._.removeFromParent(e.getGui()),this.destroyBean(e)}destroyActivePanels(){this.activePanels.forEach(e=>{s._.removeFromParent(e.getGui()),this.destroyBean(e)})}destroy(){this.destroyActivePanels(),super.destroy()}};aC.TEMPLATE='<div>\n            <ag-group-component ref="axisGroup">\n                <ag-select ref="axisTypeSelect"></ag-select>\n                <ag-select ref="axisTimeFormatSelect"></ag-select>\n                <ag-select ref="axisPositionSelect"></ag-select>\n                <ag-color-picker ref="axisColorInput"></ag-color-picker>\n                <ag-slider ref="axisLineWidthSlider"></ag-slider>\n            </ag-group-component>\n        </div>',zv([(0,s.PIB)("axisGroup")],aC.prototype,"axisGroup",2),zv([(0,s.PIB)("axisTypeSelect")],aC.prototype,"axisTypeSelect",2),zv([(0,s.PIB)("axisPositionSelect")],aC.prototype,"axisPositionSelect",2),zv([(0,s.PIB)("axisTimeFormatSelect")],aC.prototype,"axisTimeFormatSelect",2),zv([(0,s.dsm)("chartTranslationService")],aC.prototype,"chartTranslationService",2),zv([s.o7C],aC.prototype,"init",1);var lC=aC,cC=class e extends s.uAl{constructor({chartController:e,chartAxisMenuParamsFactory:t,isExpandedOnInit:i=!1}){super(),this.chartController=e,this.chartMenuUtils=t,this.isExpandedOnInit=i}init(){const t={cssIdentifier:"charts-format-top-level",direction:"vertical",title:this.translate("polarAxis"),expanded:this.isExpandedOnInit,suppressEnabledCheckbox:!0},i=this.chartMenuUtils.getDefaultColorPickerParams("line.color"),n=this.chartMenuUtils.getDefaultSliderParams("line.width","thickness",10);this.setTemplate(e.TEMPLATE,{axisGroup:t,axisColorInput:i,axisLineWidthSlider:n}),this.initAxis(),this.initAxisLabels(),this.initRadiusAxis()}initAxis(){const e=this.chartController.getChartType();if(["radarLine","radarArea"].includes(e)){const e=[{value:"circle",text:this.translate("circle")},{value:"polygon",text:this.translate("polygon")}];this.axisGroup.addItem(this.createSelect({labelKey:"shape",options:e,property:"shape"}))}"pie"!==e&&this.axisGroup.addItem(this.createSlider({labelKey:"innerRadius",defaultMaxValue:1,property:"innerRadiusRatio"}))}initAxisLabels(){const e={name:this.translate("labels"),enabled:!0,suppressEnabledCheckbox:!0,chartMenuUtils:this.chartMenuUtils,keyMapper:e=>`label.${e}`},t=this.createManagedBean(new Zy(e)),i=this.createOrientationWidget();t.addItemToPanel(i),this.axisGroup.addItem(t)}createOrientationWidget(){const e=[{value:"fixed",text:this.translate("fixed")},{value:"parallel",text:this.translate("parallel")},{value:"perpendicular",text:this.translate("perpendicular")}];return this.createSelect({labelKey:"orientation",options:e,property:"label.orientation"})}initRadiusAxis(){if(!Xv(sy(this.chartController.getChartType()),"isRadial"))return;const e=[this.createSlider({labelKey:"groupPadding",defaultMaxValue:1,property:"paddingInner"}),this.createSlider({labelKey:"seriesPadding",defaultMaxValue:1,property:"groupPaddingInner"})],t=this.createManagedBean(new s.Pk_({cssIdentifier:"charts-format-sub-level",direction:"vertical",suppressOpenCloseIcons:!0,enabled:!0,suppressEnabledCheckbox:!0,title:this.translate("padding"),items:e})).hideEnabledCheckbox(!0).hideOpenCloseIcons(!0);this.axisGroup.addItem(t)}createSlider(e){const{labelKey:t,defaultMaxValue:i,step:n=.05,property:r}=e,o=this.chartMenuUtils.getDefaultSliderParams(r,t,i);return o.step=n,this.createManagedBean(new s.YD7(o))}createSelect(e){const{labelKey:t,options:i,property:n}=e;return this.createManagedBean(new s.Ju4(this.chartMenuUtils.addValueParams(n,{label:this.chartTranslationService.translate(t),labelAlignment:"left",labelWidth:"flex",inputWidth:"flex",options:i})))}translate(e){return this.chartTranslationService.translate(e)}};cC.TEMPLATE='<div>\n            <ag-group-component ref="axisGroup">\n                <ag-color-picker ref="axisColorInput"></ag-color-picker>\n                <ag-slider ref="axisLineWidthSlider"></ag-slider>\n            </ag-group-component>\n        </div>',zv([(0,s.PIB)("axisGroup")],cC.prototype,"axisGroup",2),zv([(0,s.dsm)("chartTranslationService")],cC.prototype,"chartTranslationService",2),zv([s.o7C],cC.prototype,"init",1);var hC=cC,dC=class e extends s.uAl{constructor(e,t){super(),this.chartMenuUtils=e,this.chartController=t}init(){const t={cssIdentifier:"charts-format-sub-level",direction:"vertical",suppressOpenCloseIcons:!0,title:this.chartTranslationService.translate("padding"),suppressEnabledCheckbox:!0},i=e=>this.chartMenuUtils.getDefaultSliderParams("padding."+e,e,200);this.setTemplate(e.TEMPLATE,{chartPaddingGroup:t,paddingTopSlider:i("top"),paddingRightSlider:i("right"),paddingBottomSlider:i("bottom"),paddingLeftSlider:i("left")}),this.addManagedListener(this.eventService,s.sVA.EVENT_CHART_OPTIONS_CHANGED,e=>{this.updateTopPadding(e.chartOptions)})}updateTopPadding(e){const t=[...this.chartController.getChartSeriesTypes(),"common"].map(t=>{var i,n;return null==(n=null==(i=e[t])?void 0:i.padding)?void 0:n.top}).find(e=>null!=e);null!=t&&this.paddingTopSlider.setValue(`${t}`)}};dC.TEMPLATE='<div>\n            <ag-group-component ref="chartPaddingGroup">\n                <ag-slider ref="paddingTopSlider"></ag-slider>\n                <ag-slider ref="paddingRightSlider"></ag-slider>\n                <ag-slider ref="paddingBottomSlider"></ag-slider>\n                <ag-slider ref="paddingLeftSlider"></ag-slider>\n            </ag-group-component>\n        <div>',zv([(0,s.PIB)("paddingTopSlider")],dC.prototype,"paddingTopSlider",2),zv([(0,s.dsm)("chartTranslationService")],dC.prototype,"chartTranslationService",2),zv([s.o7C],dC.prototype,"init",1);var uC=dC,pC=class e extends s.uAl{constructor(e){super(),this.chartMenuUtils=e}init(){const t=this.chartMenuUtils.addEnableParams("background.visible",{cssIdentifier:"charts-format-sub-level",direction:"vertical",suppressOpenCloseIcons:!0,title:this.chartTranslationService.translate("background"),suppressEnabledCheckbox:!1}),i=this.chartMenuUtils.getDefaultColorPickerParams("background.fill");this.setTemplate(e.TEMPLATE,{chartBackgroundGroup:t,colorPicker:i})}};pC.TEMPLATE='<div>\n            <ag-group-component ref="chartBackgroundGroup">\n                <ag-color-picker ref="colorPicker"></ag-color-picker>\n            </ag-group-component>\n        <div>',zv([(0,s.dsm)("chartTranslationService")],pC.prototype,"chartTranslationService",2),zv([s.o7C],pC.prototype,"init",1);var gC=pC,fC=class e extends s.uAl{constructor(t,i){super(e.TEMPLATE),this.chartMenuUtils=t,this.chartController=i,this.activePanels=[],this.chartOptions=t.getChartOptions()}init(){this.initFontPanel(),this.titlePlaceholder=this.chartTranslationService.translate("titlePlaceholder")}hasTitle(){const e=this.chartOptions.getValue("title");return e&&e.enabled&&e.text&&e.text.length>0}initFontPanel(){const e=this.hasTitle(),t={name:this.chartTranslationService.translate("title"),enabled:e,suppressEnabledCheckbox:!1,chartMenuUtils:this.chartMenuUtils,keyMapper:e=>`title.${e}`,onEnableChange:e=>{if(this.chartMenuService.doesChartToolbarExist(this.chartController)){const t=this.chartOptions.getValue("padding.top");this.chartOptions.setValue("padding.top",e?t-20:t+20)}this.chartOptions.setValue("title.enabled",e);const t=this.chartOptions.getValue("title.text"),i="Title"===t||0===(null==t?void 0:t.trim().length);e&&i&&this.chartOptions.setValue("title.text",this.titlePlaceholder)}},i=this.createBean(new Zy(t));i.addItemToPanel(this.createSpacingSlicer()),this.getGui().appendChild(i.getGui()),this.activePanels.push(i),this.addManagedListener(this.eventService,"chartTitleEdit",()=>{i.setEnabled(this.hasTitle())})}createSpacingSlicer(){const e=this.chartMenuUtils.getDefaultSliderParams("title.spacing","spacing",100);return e.value="10",this.createBean(new s.YD7(e))}destroyActivePanels(){this.activePanels.forEach(e=>{s._.removeFromParent(e.getGui()),this.destroyBean(e)})}destroy(){this.destroyActivePanels(),super.destroy()}};fC.TEMPLATE="<div></div>",zv([(0,s.dsm)("chartTranslationService")],fC.prototype,"chartTranslationService",2),zv([(0,s.dsm)("chartMenuService")],fC.prototype,"chartMenuService",2),zv([s.o7C],fC.prototype,"init",1);var mC=fC,vC=class e extends s.uAl{constructor({chartController:e,chartMenuParamsFactory:t,isExpandedOnInit:i=!1,chartOptionsService:n,seriesType:s}){super(),this.chartController=e,this.chartMenuParamsFactory=t,this.chartOptionsSeriesProxy=n.getSeriesOptionsProxy(()=>null!=s?s:this.chartController.getChartSeriesType()),this.isExpandedOnInit=i}init(){this.chartSeriesMenuParamsFactory=this.createManagedBean(new oC(this.chartOptionsSeriesProxy));const t={cssIdentifier:"charts-format-top-level",direction:"vertical",title:this.chartTranslationService.translate("chart"),expanded:this.isExpandedOnInit,suppressEnabledCheckbox:!0,items:[this.createManagedBean(new mC(this.chartMenuParamsFactory,this.chartController)),this.createManagedBean(new uC(this.chartMenuParamsFactory,this.chartController)),this.createManagedBean(new gC(this.chartMenuParamsFactory)),...this.createDirectionSelect()]};this.setTemplate(e.TEMPLATE,{chartGroup:t}),this.addManagedListener(this.eventService,s.sVA.EVENT_CHART_OPTIONS_CHANGED,()=>this.refresh())}refresh(){this.updateDirectionSelect()}createDirectionSelect(){if(this.chartMenuService.isLegacyFormat())return[];const e=["horizontal","vertical"].map(e=>({value:e,text:this.chartTranslationService.translate(e)})),t=this.chartSeriesMenuParamsFactory.getDefaultSelectParams("direction","direction",e);t.labelWidth="flex",t.inputWidth="flex";const i=t.onValueChange;return t.onValueChange=e=>{i(e),this.chartController.raiseChartModelUpdateEvent()},this.directionSelect=this.createManagedBean(new s.Ju4(t)),this.updateDirectionSelect(),[this.directionSelect]}updateDirectionSelect(){var e;null==(e=this.directionSelect)||e.setDisplayed(function(e){return Xv(sy(e),"canSwitchDirection")}(this.chartController.getChartType()))}};vC.TEMPLATE='<div>\n            <ag-group-component ref="chartGroup"></ag-group-component>\n        </div>',zv([(0,s.dsm)("chartTranslationService")],vC.prototype,"chartTranslationService",2),zv([(0,s.dsm)("chartMenuService")],vC.prototype,"chartMenuService",2),zv([s.o7C],vC.prototype,"init",1);var yC=vC,CC=class e extends s.uAl{constructor(e,t="shadow"){super(),this.chartMenuUtils=e,this.propertyKey=t}init(){const t=this.propertyKey,i=this.chartMenuUtils.addEnableParams(`${t}.enabled`,{cssIdentifier:"charts-format-sub-level",direction:"vertical",suppressOpenCloseIcons:!0,title:this.chartTranslationService.translate("shadow"),suppressEnabledCheckbox:!1}),n=this.chartMenuUtils.getDefaultColorPickerParams(`${t}.color`);this.setTemplate(e.TEMPLATE,{shadowGroup:i,shadowColorPicker:n,shadowBlurSlider:this.getSliderParams("blur",0,20),shadowXOffsetSlider:this.getSliderParams("xOffset",-10,10),shadowYOffsetSlider:this.getSliderParams("yOffset",-10,10)})}getSliderParams(e,t,i){const n=`${this.propertyKey}.${e}`,s=this.chartMenuUtils.getDefaultSliderParams(n,e,i);return s.minValue=t,s}};CC.TEMPLATE='<div>\n            <ag-group-component ref="shadowGroup">\n                <ag-color-picker ref="shadowColorPicker"></ag-color-picker>\n                <ag-slider ref="shadowBlurSlider"></ag-slider>\n                <ag-slider ref="shadowXOffsetSlider"></ag-slider>\n                <ag-slider ref="shadowYOffsetSlider"></ag-slider>\n            </ag-group-component>\n        </div>',zv([(0,s.dsm)("chartTranslationService")],CC.prototype,"chartTranslationService",2),zv([s.o7C],CC.prototype,"init",1);var bC=CC,SC=class e extends s.uAl{constructor(e,t){super(),this.chartOptionsService=e,this.chartMenuUtils=t}init(){const t=this.chartOptionsService.getChartType(),i=s._.includes(["scatter","bubble"],t),n=this.chartMenuUtils.addEnableParams("marker.enabled",{cssIdentifier:"charts-format-sub-level",direction:"vertical",title:this.chartTranslationService.translate("markers"),suppressEnabledCheckbox:i,suppressOpenCloseIcons:!0}),r="bubble"===t;let o,a;r?(o=this.getSliderParams("marker.maxSize","maxSize",60),a=this.getSliderParams("marker.size","minSize",60)):(o={},a=this.getSliderParams("marker.size","size",60)),this.setTemplate(e.TEMPLATE,{seriesMarkersGroup:n,seriesMarkerShapeSelect:this.getMarkerShapeSelectParams(),seriesMarkerMinSizeSlider:o,seriesMarkerSizeSlider:a,seriesMarkerStrokeWidthSlider:this.getSliderParams("marker.strokeWidth","strokeWidth",10)}),r||this.seriesMarkerMinSizeSlider.setDisplayed(!1)}getMarkerShapeSelectParams(){return this.chartMenuUtils.addValueParams("marker.shape",{options:[{value:"square",text:"Square"},{value:"circle",text:"Circle"},{value:"cross",text:"Cross"},{value:"diamond",text:"Diamond"},{value:"plus",text:"Plus"},{value:"triangle",text:"Triangle"},{value:"heart",text:"Heart"}],label:this.chartTranslationService.translate("shape")})}getSliderParams(e,t,i){return this.chartMenuUtils.getDefaultSliderParams(e,t,i)}};SC.TEMPLATE='<div>\n            <ag-group-component ref="seriesMarkersGroup">\n                <ag-select ref="seriesMarkerShapeSelect"></ag-select>\n                <ag-slider ref="seriesMarkerMinSizeSlider"></ag-slider>\n                <ag-slider ref="seriesMarkerSizeSlider"></ag-slider>\n                <ag-slider ref="seriesMarkerStrokeWidthSlider"></ag-slider>\n            </ag-group-component>\n        </div>',zv([(0,s.PIB)("seriesMarkerMinSizeSlider")],SC.prototype,"seriesMarkerMinSizeSlider",2),zv([(0,s.dsm)("chartTranslationService")],SC.prototype,"chartTranslationService",2),zv([s.o7C],SC.prototype,"init",1);var wC=SC,xC=class e extends s.uAl{constructor(t){super(e.TEMPLATE),this.H=1,this.S=1,this.B=1,this.A=1,this.isSpectrumDragging=!1,this.isSpectrumHueDragging=!1,this.isSpectrumAlphaDragging=!1,this.colorChanged=!1,this.picker=t.picker}postConstruct(){this.initTabIndex(),this.initRecentColors(),this.addGuiEventListener("focus",()=>this.spectrumColor.focus()),this.addGuiEventListener("keydown",e=>{e.key!==s.DDm.ENTER||e.defaultPrevented||this.destroy()}),this.addManagedListener(this.spectrumColor,"keydown",e=>this.moveDragger(e)),this.addManagedListener(this.spectrumAlphaSlider,"keydown",e=>this.moveAlphaSlider(e)),this.addManagedListener(this.spectrumHueSlider,"keydown",e=>this.moveHueSlider(e)),this.addManagedListener(this.spectrumVal,"mousedown",this.onSpectrumDraggerDown.bind(this)),this.addManagedListener(this.spectrumHue,"mousedown",this.onSpectrumHueDown.bind(this)),this.addManagedListener(this.spectrumAlpha,"mousedown",this.onSpectrumAlphaDown.bind(this)),this.addGuiEventListener("mousemove",e=>{this.onSpectrumDraggerMove(e),this.onSpectrumHueMove(e),this.onSpectrumAlphaMove(e)}),this.addManagedListener(document,"mouseup",this.onMouseUp.bind(this)),this.addManagedListener(this.recentColors,"click",this.onRecentColorClick.bind(this)),this.addManagedListener(this.recentColors,"keydown",e=>{e.key!==s.DDm.ENTER&&e.key!==s.DDm.SPACE||(e.preventDefault(),this.onRecentColorClick(e))})}initTabIndex(){const e=this.tabIndex=this.gos.get("tabIndex").toString();this.spectrumColor.setAttribute("tabindex",e),this.spectrumHueSlider.setAttribute("tabindex",e),this.spectrumAlphaSlider.setAttribute("tabindex",e)}refreshSpectrumRect(){return this.spectrumValRect=this.spectrumVal.getBoundingClientRect()}refreshHueRect(){return this.spectrumHueRect=this.spectrumHue.getBoundingClientRect()}refreshAlphaRect(){return this.spectrumAlphaRect=this.spectrumAlpha.getBoundingClientRect()}onSpectrumDraggerDown(e){this.refreshSpectrumRect(),this.isSpectrumDragging=!0,this.moveDragger(e)}onSpectrumDraggerMove(e){this.isSpectrumDragging&&this.moveDragger(e)}onSpectrumHueDown(e){this.refreshHueRect(),this.isSpectrumHueDragging=!0,this.moveHueSlider(e)}onSpectrumHueMove(e){this.isSpectrumHueDragging&&this.moveHueSlider(e)}onSpectrumAlphaDown(e){this.refreshAlphaRect(),this.isSpectrumAlphaDragging=!0,this.moveAlphaSlider(e)}onSpectrumAlphaMove(e){this.isSpectrumAlphaDragging&&this.moveAlphaSlider(e)}onMouseUp(){this.isSpectrumDragging=!1,this.isSpectrumHueDragging=!1,this.isSpectrumAlphaDragging=!1}moveDragger(e){const t=this.spectrumValRect;if(!t)return;let i,n;if(e instanceof MouseEvent)i=e.clientX-t.left,n=e.clientY-t.top;else{const t=e.key===s.DDm.LEFT,r=e.key===s.DDm.RIGHT,o=e.key===s.DDm.UP,a=e.key===s.DDm.DOWN,l=o||a,c=t||r;if(!l&&!c)return;e.preventDefault();const{x:h,y:d}=this.getSpectrumValue();i=h+(c?t?-5:5:0),n=d+(l?o?-5:5:0)}i=Math.max(i,0),i=Math.min(i,t.width),n=Math.max(n,0),n=Math.min(n,t.height),this.setSpectrumValue(i/t.width,1-n/t.height)}moveHueSlider(e){const t=this.spectrumHueRect;if(!t)return;const i=this.moveSlider(this.spectrumHueSlider,e);null!=i&&(this.H=1-i/t.width,this.update())}moveAlphaSlider(e){const t=this.spectrumAlphaRect;if(!t)return;const i=this.moveSlider(this.spectrumAlphaSlider,e);null!=i&&(this.A=i/t.width,this.update())}moveSlider(e,t){var i;const n=e.getBoundingClientRect(),r=null==(i=e.parentElement)?void 0:i.getBoundingClientRect();if(!e||!r)return null;let o;if(t instanceof MouseEvent)o=t.clientX-r.left;else{const i=t.key===s.DDm.LEFT,r=t.key===s.DDm.RIGHT;if(!i&&!r)return null;t.preventDefault();const a=i?-5:5;o=parseFloat(e.style.left)-n.width/2+a}return o=Math.max(o,0),o=Math.min(o,r.width),e.style.left=o+n.width/2+"px",o}update(){const e=Uf.Color.fromHSB(360*this.H,this.S,this.B,this.A),t=Uf.Color.fromHSB(360*this.H,1,1),i=e.toRgbaString(),n=this.picker;Uf.Color.fromString(n.getValue()).toRgbaString()!==i&&(this.colorChanged=!0),n.setValue(i),this.spectrumColor.style.backgroundColor=t.toRgbaString(),this.spectrumDragger.style.backgroundColor=i}setSpectrumValue(e,t){const i=this.spectrumValRect||this.refreshSpectrumRect();if(null==i)return;const n=this.spectrumDragger,s=n.getBoundingClientRect();e=Math.max(0,e),e=Math.min(1,e),t=Math.max(0,t),t=Math.min(1,t),this.S=e,this.B=t,n.style.left=e*i.width-s.width/2+"px",n.style.top=(1-t)*i.height-s.height/2+"px",this.update()}getSpectrumValue(){const e=this.spectrumDragger,t=e.getBoundingClientRect();return{x:parseFloat(e.style.left)+t.width/2,y:parseFloat(e.style.top)+t.height/2}}initRecentColors(){const t=e.recentColors.map((e,t)=>`<div class="ag-recent-color" id=${t} style="background-color: ${e}; width: 15px; height: 15px;" recent-color="${e}" tabIndex="${this.tabIndex}"></div>`);this.recentColors.innerHTML=t.join("")}setValue(e){const t=Uf.Color.fromString(e),[i,n,s]=t.toHSB();this.H=(isNaN(i)?0:i)/360,this.A=t.a;const r=this.spectrumHueRect||this.refreshHueRect(),o=this.spectrumAlphaRect||this.refreshAlphaRect();this.spectrumHueSlider.style.left=(this.H-1)*-r.width+"px",this.spectrumAlphaSlider.style.left=this.A*o.width+"px",this.setSpectrumValue(n,s)}onRecentColorClick(t){const i=t.target;if(!s._.exists(i.id))return;const n=parseInt(i.id,10);this.setValue(e.recentColors[n]),this.destroy()}addRecentColor(){const t=Uf.Color.fromHSB(360*this.H,this.S,this.B,this.A).toRgbaString();let i=e.recentColors;this.colorChanged&&i[0]!==t&&(i=i.filter(e=>e!=t),i=[t].concat(i),i.length>e.maxRecentColors&&(i=i.slice(0,e.maxRecentColors)),e.recentColors=i)}destroy(){this.addRecentColor(),super.destroy()}};xC.maxRecentColors=8,xC.recentColors=[],xC.TEMPLATE='<div class="ag-color-panel" tabindex="-1">\n            <div ref="spectrumColor" class="ag-spectrum-color">\n                <div class="ag-spectrum-sat ag-spectrum-fill">\n                    <div ref="spectrumVal" class="ag-spectrum-val ag-spectrum-fill">\n                        <div ref="spectrumDragger" class="ag-spectrum-dragger"></div>\n                    </div>\n                </div>\n            </div>\n            <div class="ag-spectrum-tools">\n                <div ref="spectrumHue" class="ag-spectrum-hue ag-spectrum-tool">\n                    <div class="ag-spectrum-hue-background"></div>\n                    <div ref="spectrumHueSlider" class="ag-spectrum-slider"></div>\n                </div>\n                <div ref="spectrumAlpha" class="ag-spectrum-alpha ag-spectrum-tool">\n                    <div class="ag-spectrum-alpha-background"></div>\n                    <div ref="spectrumAlphaSlider" class="ag-spectrum-slider"></div>\n                </div>\n                <div ref="recentColors" class="ag-recent-colors"></div>\n            </div>\n        </div>',zv([(0,s.PIB)("spectrumColor")],xC.prototype,"spectrumColor",2),zv([(0,s.PIB)("spectrumVal")],xC.prototype,"spectrumVal",2),zv([(0,s.PIB)("spectrumDragger")],xC.prototype,"spectrumDragger",2),zv([(0,s.PIB)("spectrumHue")],xC.prototype,"spectrumHue",2),zv([(0,s.PIB)("spectrumHueSlider")],xC.prototype,"spectrumHueSlider",2),zv([(0,s.PIB)("spectrumAlpha")],xC.prototype,"spectrumAlpha",2),zv([(0,s.PIB)("spectrumAlphaSlider")],xC.prototype,"spectrumAlphaSlider",2),zv([(0,s.PIB)("recentColors")],xC.prototype,"recentColors",2),zv([s.o7C],xC.prototype,"postConstruct",1);var EC=xC,MC=class extends s.HHt{constructor(e){super(Vv({pickerAriaLabelKey:"ariaLabelColorPicker",pickerAriaLabelValue:"Color Picker",pickerType:"ag-list",className:"ag-color-picker",pickerIcon:"colorPicker"},e))}postConstruct(){super.postConstruct(),this.value&&this.setValue(this.value)}createPickerComponent(){const e=this.getGui().getBoundingClientRect();return this.createBean(new s.fNJ({closable:!1,modal:!0,hideTitleBar:!0,minWidth:190,width:190,height:250,x:e.right-190,y:e.top-250}))}renderAndPositionPicker(){const e=this.pickerComponent,t=this.createBean(new EC({picker:this}));return e.addCssClass("ag-color-dialog"),t.addDestroyFunc(()=>{e.isAlive()&&this.destroyBean(e)}),e.setParentComponent(this),e.setBodyComponent(t),t.setValue(this.getValue()),t.getGui().focus(),e.addDestroyFunc(()=>{this.isDestroyingPicker?this.isDestroyingPicker=!1:(this.beforeHidePicker(),this.isDestroyingPicker=!0,t.isAlive()&&this.destroyBean(t),this.isAlive()&&this.getFocusableElement().focus())}),()=>{var e;return null==(e=this.pickerComponent)?void 0:e.close()}}setValue(e){return this.value===e?this:(this.eDisplayField.style.backgroundColor=e,super.setValue(e))}getValue(){return this.value}},AC=class e extends s.uAl{constructor(e){super(),this.chartMenuUtils=e}init(){const t={cssIdentifier:"charts-format-sub-level",direction:"vertical",title:this.chartTranslationService.translate("callout"),enabled:!0,suppressOpenCloseIcons:!0,suppressEnabledCheckbox:!0};this.setTemplate(e.TEMPLATE,{calloutGroup:t,calloutLengthSlider:this.chartMenuUtils.getDefaultSliderParams("calloutLine.length","length",40),calloutStrokeWidthSlider:this.chartMenuUtils.getDefaultSliderParams("calloutLine.strokeWidth","strokeWidth",10),labelOffsetSlider:this.chartMenuUtils.getDefaultSliderParams("calloutLabel.offset","offset",30)})}};AC.TEMPLATE='<div>\n            <ag-group-component ref="calloutGroup">\n                <ag-slider ref="calloutLengthSlider"></ag-slider>\n                <ag-slider ref="calloutStrokeWidthSlider"></ag-slider>\n                <ag-slider ref="labelOffsetSlider"></ag-slider>\n            </ag-group-component>\n        </div>',zv([(0,s.dsm)("chartTranslationService")],AC.prototype,"chartTranslationService",2),zv([s.o7C],AC.prototype,"init",1);var TC=AC,DC=class e extends s.uAl{constructor(e){super(),this.chartMenuUtils=e}init(){const t={cssIdentifier:"charts-format-sub-level",direction:"vertical",title:this.chartTranslationService.translate("cap"),enabled:!0,suppressOpenCloseIcons:!0,suppressEnabledCheckbox:!0},i=this.chartMenuUtils.getDefaultSliderParams("cap.lengthRatio","capLengthRatio",1);i.step=.05,this.setTemplate(e.TEMPLATE,{capsGroup:t,capLengthRatioSlider:i})}};DC.TEMPLATE='<div>\n            <ag-group-component ref="capsGroup">\n                <ag-slider ref="capLengthRatioSlider"></ag-slider>\n            </ag-group-component>\n        </div>',zv([(0,s.dsm)("chartTranslationService")],DC.prototype,"chartTranslationService",2),zv([s.o7C],DC.prototype,"init",1);var IC=DC,RC=class e extends s.uAl{constructor(e){super(),this.chartMenuUtils=e}init(){const t={cssIdentifier:"charts-format-sub-level",direction:"vertical",title:this.chartTranslationService.translate("connectorLine"),enabled:!0,suppressOpenCloseIcons:!0,suppressEnabledCheckbox:!0};this.setTemplate(e.TEMPLATE,{lineGroup:t,lineColorPicker:this.chartMenuUtils.getDefaultColorPickerParams("line.stroke"),lineStrokeWidthSlider:this.getSliderParams("strokeWidth",10,"line.strokeWidth"),lineDashSlider:this.getSliderParams("lineDash",30,"line.lineDash",1,!0),lineOpacitySlider:this.getSliderParams("strokeOpacity",1,"line.strokeOpacity",.05)})}getSliderParams(e,t,i,n=1,s=!1){const r=this.chartMenuUtils.getDefaultSliderParams(i,e,t,s);return r.step=n,r}};RC.TEMPLATE='<div>\n            <ag-group-component ref="lineGroup">\n                <ag-color-picker ref="lineColorPicker"></ag-color-picker>\n                <ag-slider ref="lineStrokeWidthSlider"></ag-slider>\n                <ag-slider ref="lineOpacitySlider"></ag-slider>\n                <ag-slider ref="lineDashSlider"></ag-slider>                \n            </ag-group-component>\n        </div>',zv([(0,s.dsm)("chartTranslationService")],RC.prototype,"chartTranslationService",2),zv([s.o7C],RC.prototype,"init",1);var LC=RC,kC=class e extends s.uAl{constructor(e){super(),this.chartMenuUtils=e}init(){const t={cssIdentifier:"charts-format-sub-level",direction:"vertical",title:this.chartTranslationService.translate("whisker"),enabled:!0,suppressOpenCloseIcons:!0,suppressEnabledCheckbox:!0};this.setTemplate(e.TEMPLATE,{whiskersGroup:t,whiskerColorPicker:this.chartMenuUtils.getDefaultColorPickerParams("whisker.stroke"),whiskerThicknessSlider:this.chartMenuUtils.getDefaultSliderParams("whisker.strokeWidth","strokeWidth",10),whiskerOpacitySlider:this.chartMenuUtils.getDefaultSliderParams("whisker.strokeOpacity","strokeOpacity",1),whiskerLineDashSlider:this.chartMenuUtils.getDefaultSliderParams("whisker.lineDash","lineDash",30,!0),whiskerLineDashOffsetSlider:this.chartMenuUtils.getDefaultSliderParams("whisker.lineDashOffset","lineDashOffset",30)})}};kC.TEMPLATE='<div>\n            <ag-group-component ref="whiskersGroup">\n                <ag-color-picker ref="whiskerColorPicker"></ag-color-picker>\n                <ag-slider ref="whiskerThicknessSlider"></ag-slider>\n                <ag-slider ref="whiskerOpacitySlider"></ag-slider>\n                <ag-slider ref="whiskerLineDashSlider"></ag-slider>\n                <ag-slider ref="whiskerLineDashOffsetSlider"></ag-slider>\n            </ag-group-component>\n        </div>',zv([(0,s.dsm)("chartTranslationService")],kC.prototype,"chartTranslationService",2),zv([s.o7C],kC.prototype,"init",1);var PC=kC,NC=class e extends s.uAl{constructor(e){super(),this.chartMenuUtils=e,this.activePanels=[]}init(){const t={cssIdentifier:"charts-format-sub-level",direction:"vertical",title:this.chartTranslationService.translate("seriesItems"),enabled:!0,suppressOpenCloseIcons:!0,suppressEnabledCheckbox:!0};this.setTemplate(e.TEMPLATE,{seriesItemsGroup:t,seriesItemSelect:this.getSeriesItemsParams()}),this.initSeriesControls()}getSeriesItemsParams(){const e=[{value:"positive",text:this.chartTranslationService.translate("seriesItemPositive")},{value:"negative",text:this.chartTranslationService.translate("seriesItemNegative")}];return{label:this.chartTranslationService.translate("seriesItemType"),labelAlignment:"left",labelWidth:"flex",inputWidth:"flex",options:e,value:"positive",onValueChange:e=>{this.destroyActivePanels(),this.initSeriesControls(e)}}}initSeriesControls(e="positive"){this.initSlider("strokeWidth",10,`item.${e}.strokeWidth`),this.initSlider("lineDash",30,`item.${e}.lineDash`,1,!0),this.initSlider("strokeOpacity",1,`item.${e}.strokeOpacity`,.05,!1),this.initSlider("fillOpacity",1,`item.${e}.fillOpacity`,.05,!1),this.initItemLabels(e)}initSlider(e,t,i,n=1,r=!1){const o=this.chartMenuUtils.getDefaultSliderParams(i,e,t,r);o.step=n;const a=this.seriesItemsGroup.createManagedBean(new s.YD7(o));this.seriesItemsGroup.addItem(a),this.activePanels.push(a)}initItemLabels(e){const t=this.chartMenuUtils.getDefaultFontPanelParams(`item.${e}.label`,"seriesItemLabels"),i=this.createBean(new Zy(t));this.seriesItemsGroup.addItem(i),this.activePanels.push(i)}destroyActivePanels(){this.activePanels.forEach(e=>{s._.removeFromParent(e.getGui()),this.destroyBean(e)})}destroy(){this.destroyActivePanels(),super.destroy()}};NC.TEMPLATE='<div>\n            <ag-group-component ref="seriesItemsGroup">\n                <ag-select ref="seriesItemSelect"></ag-select>\n            </ag-group-component>\n        </div>',zv([(0,s.PIB)("seriesItemsGroup")],NC.prototype,"seriesItemsGroup",2),zv([(0,s.dsm)("chartTranslationService")],NC.prototype,"chartTranslationService",2),zv([s.o7C],NC.prototype,"init",1);var OC=NC,_C=class e extends s.uAl{constructor(e){super(),this.chartMenuUtils=e}init(){const t={cssIdentifier:"charts-format-sub-level",direction:"vertical",enabled:!0,suppressOpenCloseIcons:!0,suppressEnabledCheckbox:!0};this.setTemplate(e.TEMPLATE,{groupSpacing:Bv(Vv({},t),{title:this.chartTranslationService.translate("group")}),tileSpacing:Bv(Vv({},t),{title:this.chartTranslationService.translate("tile")}),groupPaddingSlider:this.getSliderParams("padding","group.padding"),groupSpacingSlider:this.getSliderParams("spacing","group.gap"),tilePaddingSlider:this.getSliderParams("padding","tile.padding"),tileSpacingSlider:this.getSliderParams("spacing","tile.gap")})}getSliderParams(e,t){return this.chartMenuUtils.getDefaultSliderParams(t,e,10)}};_C.TEMPLATE='<div>\n            <ag-group-component ref="groupSpacing">\n                <ag-slider ref="groupPaddingSlider"></ag-slider>\n                <ag-slider ref="groupSpacingSlider"></ag-slider>\n            </ag-group-component>\n            <ag-group-component ref="tileSpacing">\n                <ag-slider ref="tilePaddingSlider"></ag-slider>\n                <ag-slider ref="tileSpacingSlider"></ag-slider>\n            </ag-group-component>\n        </div>',zv([(0,s.dsm)("chartTranslationService")],_C.prototype,"chartTranslationService",2),zv([s.o7C],_C.prototype,"init",1);var FC=_C,GC=class e extends s.uAl{constructor({chartController:e,chartOptionsService:t,seriesType:i,isExpandedOnInit:n=!1}){super(),this.activePanels=[],this.widgetFuncs={lineWidth:()=>this.initStrokeWidth("lineWidth"),strokeWidth:()=>this.initStrokeWidth("strokeWidth"),lineColor:()=>this.initLineColor(),lineDash:()=>this.initLineDash(),lineOpacity:()=>this.initLineOpacity(),fillOpacity:()=>this.initFillOpacity(),markers:()=>this.initMarkers(),labels:()=>this.initLabels(),shadow:()=>this.initShadow(),tooltips:()=>this.initTooltips(),bins:()=>this.initBins(),whiskers:()=>this.initWhiskers(),caps:()=>this.initCaps(),connectorLine:()=>this.initConnectorLine(),seriesItems:()=>this.initSeriesItemsPanel(),tileSpacing:()=>this.initTileSpacingPanel(),groupType:()=>this.initGroupType()},this.seriesWidgetMappings={bar:["tooltips","strokeWidth","lineDash","lineOpacity","fillOpacity","labels","shadow"],pie:["tooltips","strokeWidth","lineOpacity","fillOpacity","labels","shadow"],donut:["tooltips","strokeWidth","lineOpacity","fillOpacity","labels","shadow"],line:["tooltips","lineWidth","lineDash","lineOpacity","markers","labels"],scatter:["tooltips","markers","labels"],bubble:["tooltips","markers","labels"],area:["tooltips","lineWidth","lineDash","lineOpacity","fillOpacity","markers","labels","shadow"],histogram:["tooltips","bins","strokeWidth","lineDash","lineOpacity","fillOpacity","labels","shadow"],"radial-column":["tooltips","strokeWidth","lineDash","lineOpacity","fillOpacity","labels","groupType"],"radial-bar":["tooltips","strokeWidth","lineDash","lineOpacity","fillOpacity","labels","groupType"],"radar-line":["tooltips","strokeWidth","lineDash","lineOpacity","markers","labels"],"radar-area":["tooltips","strokeWidth","lineDash","lineOpacity","fillOpacity","markers","labels"],nightingale:["tooltips","strokeWidth","lineDash","lineOpacity","fillOpacity","labels","groupType"],"box-plot":["tooltips","strokeWidth","lineDash","lineOpacity","fillOpacity","whiskers","caps"],"range-bar":["tooltips","strokeWidth","lineDash","lineOpacity","fillOpacity","labels"],"range-area":["tooltips","lineWidth","lineDash","lineOpacity","fillOpacity","markers","labels","shadow"],treemap:["tooltips","tileSpacing"],sunburst:["tooltips"],heatmap:["tooltips","labels","lineColor","lineWidth","lineOpacity"],waterfall:["tooltips","connectorLine","seriesItems"]},this.chartController=e,this.chartOptionsService=t,this.seriesType=i||this.chartController.getChartSeriesType(),this.isExpandedOnInit=n}init(){const t={cssIdentifier:"charts-format-top-level",direction:"vertical",title:this.translate("series"),expanded:this.isExpandedOnInit,suppressEnabledCheckbox:!0};this.setTemplate(e.TEMPLATE,{seriesGroup:t}),this.chartMenuUtils=this.createManagedBean(new oC(this.chartOptionsService.getSeriesOptionsProxy(()=>this.seriesType))),this.chartOptions=this.chartMenuUtils.getChartOptions(),this.addManagedListener(this.chartController,Py.EVENT_CHART_SERIES_CHART_TYPE_CHANGED,this.refreshWidgets.bind(this)),this.refreshWidgets()}refreshWidgets(){this.destroyActivePanels(),this.chartController.getChartProxy().getChart().waitForUpdate().then(()=>{var e;!this.isAlive()||(this.chartController.isComboChart()&&(this.updateSeriesType(),this.initSeriesSelect()),(null!=(e=this.seriesWidgetMappings[this.seriesType])?e:[]).forEach(e=>this.widgetFuncs[e]()))}).catch(e=>console.error("AG Grid - chart rendering failed",e))}initSeriesSelect(){const e=this.seriesGroup.createManagedBean(new s.Ju4({label:this.translate("seriesType"),labelAlignment:"left",labelWidth:"flex",inputWidth:"flex",options:this.getSeriesSelectOptions(),value:`${this.seriesType}`,onValueChange:e=>{this.seriesType=e,this.refreshWidgets()}}));this.seriesGroup.addItem(e),this.activePanels.push(e)}initTooltips(){const e=this.createBean(new s.bLJ(this.chartMenuUtils.addValueParams("tooltip.enabled",{label:this.translate("tooltips"),labelAlignment:"left",labelWidth:"flex",inputWidth:"flex"})));this.addWidget(e)}initLineColor(){const e=this.createBean(new MC(this.chartMenuUtils.getDefaultColorPickerParams("stroke","strokeColor")));this.addWidget(e)}initStrokeWidth(e){const t=this.createBean(new s.YD7(this.chartMenuUtils.getDefaultSliderParams("strokeWidth",e,10)));this.addWidget(t)}initLineDash(){const e=this.createBean(new s.YD7(this.chartMenuUtils.getDefaultSliderParams("lineDash","lineDash",30,!0)));this.addWidget(e)}initLineOpacity(){const e=this.chartMenuUtils.getDefaultSliderParams("strokeOpacity","strokeOpacity",1);e.step=.05;const t=this.createBean(new s.YD7(e));this.addWidget(t)}initFillOpacity(){const e=this.chartMenuUtils.getDefaultSliderParams("fillOpacity","fillOpacity",1);e.step=.05;const t=this.createBean(new s.YD7(e));this.addWidget(t)}initLabels(){const e=ry(this.seriesType),t=e?"calloutLabel":"label",i=e?"calloutLabels":"labels",n=this.chartMenuUtils.getDefaultFontPanelParams(t,i),r=this.createBean(new Zy(n));if(e){const e=this.createBean(new TC(this.chartMenuUtils));r.addCompToPanel(e),this.activePanels.push(e)}if(this.addWidget(r),e){const e=this.chartMenuUtils.getDefaultFontPanelParams("sectorLabel","sectorLabels"),t=this.createBean(new Zy(e)),i=this.getSectorLabelPositionRatio();t.addCompToPanel(i),this.addWidget(t)}if("range-bar"===this.seriesType){const e=[{value:"inside",text:this.translate("inside")},{value:"outside",text:this.translate("outside")}],t=r.createManagedBean(new s.Ju4(this.chartMenuUtils.addValueParams("label.placement",{label:this.translate("labelPlacement"),labelAlignment:"left",labelWidth:"flex",inputWidth:"flex",options:e})));r.addCompToPanel(t),this.activePanels.push(t);const i=r.createManagedBean(new s.YD7(this.chartMenuUtils.getDefaultSliderParams("label.padding","padding",200)));r.addCompToPanel(i),this.activePanels.push(i)}}getSectorLabelPositionRatio(){const e=this.chartMenuUtils.getDefaultSliderParams("sectorLabel.positionRatio","positionRatio",1);return e.step=.05,this.createBean(new s.YD7(e))}initShadow(){const e=this.createBean(new bC(this.chartMenuUtils));this.addWidget(e)}initMarkers(){const e=this.createBean(new wC(this.chartOptionsService,this.chartMenuUtils));this.addWidget(e)}initBins(){var e;const t=this.chartMenuUtils.getDefaultSliderParams("binCount","histogramBinCount",20),i=(null!=(e=this.chartOptions.getValue("bins"))?e:this.chartOptions.getValue("calculatedBins",!0)).length;t.value=`${i}`,t.maxValue=Math.max(i,20);const n=this.createBean(new s.YD7(t));this.addWidget(n)}initWhiskers(){const e=this.createBean(new PC(this.chartMenuUtils));this.addWidget(e)}initCaps(){const e=this.createBean(new IC(this.chartMenuUtils));this.addWidget(e)}initConnectorLine(){const e=this.createBean(new LC(this.chartMenuUtils));this.addWidget(e)}initSeriesItemsPanel(){const e=this.createBean(new OC(this.chartMenuUtils));this.addWidget(e)}initTileSpacingPanel(){const e=this.createBean(new FC(this.chartMenuUtils));this.addWidget(e)}initGroupType(){const e=this.createBean(new s.Ju4({label:this.chartTranslationService.translate("seriesGroupType"),options:s.E1g.SERIES_GROUP_TYPES.map(e=>({value:e,text:this.chartTranslationService.translate(`${e}SeriesGroupType`)})),value:this.chartController.getSeriesGroupType(),onValueChange:e=>this.chartController.setSeriesGroupType(e)}));this.addWidget(e)}addWidget(e){this.seriesGroup.addItem(e),this.activePanels.push(e)}getSeriesSelectOptions(){const e=this.getActiveSeriesTypes();return["area","bar","line"].filter(t=>e.includes(t)).map(e=>({value:e,text:this.translate(e)}))}updateSeriesType(){const e=this.getActiveSeriesTypes();!e.includes(this.seriesType)&&e.length>0&&(this.seriesType=e[0])}getActiveSeriesTypes(){return this.chartController.getActiveSeriesChartTypes().map(e=>sy(e.chartType))}translate(e){return this.chartTranslationService.translate(e)}destroyActivePanels(){this.activePanels.forEach(e=>{s._.removeFromParent(e.getGui()),this.destroyBean(e)})}destroy(){this.destroyActivePanels(),super.destroy()}};GC.TEMPLATE='<div>\n            <ag-group-component ref="seriesGroup">\n            </ag-group-component>\n        </div>',zv([(0,s.PIB)("seriesGroup")],GC.prototype,"seriesGroup",2),zv([(0,s.dsm)("chartTranslationService")],GC.prototype,"chartTranslationService",2),zv([s.o7C],GC.prototype,"init",1);var VC=GC,BC=class e extends s.uAl{constructor({chartMenuParamsFactory:e,isExpandedOnInit:t=!1}){super(),this.chartMenuUtils=e,this.isExpandedOnInit=t}init(){const t=this.chartMenuUtils.addEnableParams("gradientLegend.enabled",{cssIdentifier:"charts-format-top-level",direction:"vertical",title:this.chartTranslationService.translate("legend"),suppressEnabledCheckbox:!1,suppressToggleExpandOnEnableChange:!0,expanded:this.isExpandedOnInit,items:[this.createLabelPanel()]});this.setTemplate(e.TEMPLATE,{legendGroup:t,legendPositionSelect:this.chartMenuUtils.getDefaultLegendParams("gradientLegend.position"),gradientReverseCheckbox:this.getGradientReverseCheckboxParams(),gradientThicknessSlider:this.chartMenuUtils.getDefaultSliderParams("gradientLegend.gradient.thickness","thickness",40),gradientPreferredLengthSlider:this.chartMenuUtils.getDefaultSliderParams("gradientLegend.gradient.preferredLength","preferredLength",300),legendSpacingSlider:this.chartMenuUtils.getDefaultSliderParams("gradientLegend.spacing","spacing",200)})}getGradientReverseCheckboxParams(){return this.chartMenuUtils.addValueParams("gradientLegend.reverseOrder",{label:this.chartTranslationService.translate("reverseDirection"),labelWidth:"flex"})}createLabelPanel(){const e={enabled:!0,suppressEnabledCheckbox:!0,chartMenuUtils:this.chartMenuUtils,keyMapper:e=>`gradientLegend.scale.label.${e}`};return this.createManagedBean(new Zy(e))}};BC.TEMPLATE='<div>\n            <ag-group-component ref="legendGroup">\n                <ag-select ref="legendPositionSelect"></ag-select>\n                <ag-checkbox ref="gradientReverseCheckbox"></ag-checkbox>\n                <ag-slider ref="gradientThicknessSlider"></ag-slider>\n                <ag-slider ref="gradientPreferredLengthSlider"></ag-slider>\n                <ag-slider ref="legendSpacingSlider"></ag-slider>\n            </ag-group-component>\n        </div>',zv([(0,s.dsm)("chartTranslationService")],BC.prototype,"chartTranslationService",2),zv([s.o7C],BC.prototype,"init",1);var HC=BC,zC=class extends s.XQb{constructor(e,t,i,n){super(),this.chartController=e,this.eGui=t,this.cssClass=i,this.createPanels=n,this.panels=[]}postConstruct(){this.addManagedListener(this.chartController,Py.EVENT_CHART_UPDATED,()=>this.refreshPanels(!0)),this.addManagedListener(this.chartController,Py.EVENT_CHART_API_UPDATE,()=>this.refreshPanels(!1))}addComponent(e){this.createBean(e),this.panels.push(e),e.addCssClass(this.cssClass),this.eGui.appendChild(e.getGui())}refreshPanels(e){const t=this.chartController.getChartType(),i=this.chartController.isGrouping(),n=sy(t);e&&t===this.chartType&&i===this.isGrouping||(this.destroyPanels(),this.createPanels(t,n),this.chartType=t,this.isGrouping=i)}destroyPanels(){this.panels.forEach(e=>{s._.removeFromParent(e.getGui()),this.destroyBean(e)}),this.panels=[]}destroy(){this.destroyPanels(),super.destroy()}};zv([s.o7C],zC.prototype,"postConstruct",1);var UC={groups:[{type:"chart"},{type:"legend"},{type:"series"},{type:"axis"}]},WC=class e extends s.uAl{constructor(t){super(e.TEMPLATE),this.chartMenuContext=t}init(){this.chartPanelFeature=this.createManagedBean(new zC(this.chartMenuContext.chartController,this.getGui(),"ag-chart-format-section",(e,t)=>this.createPanels(e,t))),this.chartPanelFeature.refreshPanels()}createPanels(e,t){var i;null==(i=this.getFormatPanelDef().groups)||i.forEach(i=>{const n=i.type;if(!this.isGroupPanelShownInSeries(n,t))return;const r=Bv(Vv({},this.chartMenuContext),{isExpandedOnInit:i.isOpen,seriesType:t});switch(n){case"chart":this.chartPanelFeature.addComponent(new yC(r));break;case"legend":const n=["treemap","sunburst","heatmap"].includes(e)?new HC(r):new Jy(r);this.chartPanelFeature.addComponent(n);break;case"axis":ey(t)?this.chartPanelFeature.addComponent(new hC(r)):Jv(t)&&(this.chartPanelFeature.addComponent(new lC("xAxis",r)),this.chartPanelFeature.addComponent(new lC("yAxis",r)));break;case"horizontalAxis":this.chartPanelFeature.addComponent(new lC("xAxis",r));break;case"verticalAxis":this.chartPanelFeature.addComponent(new lC("yAxis",r));break;case"series":this.chartPanelFeature.addComponent(new VC(r));break;case"navigator":s._.warnOnce("'navigator' is now displayed in the charts advanced settings instead of the format panel, and this setting will be ignored.");default:s._.warnOnce(`Invalid charts format panel group name supplied: '${i.type}'`)}})}getFormatPanelDef(){var e;return(null==(e=this.gos.get("chartToolPanelsDef"))?void 0:e.formatPanel)||UC}isGroupPanelShownInSeries(e,t){return["chart","legend","series"].includes(e)||Jv(t)&&["axis","horizontalAxis","verticalAxis"].includes(e)||ey(t)&&"axis"===e}};WC.TEMPLATE='<div class="ag-chart-format-wrapper"></div>',zv([s.o7C],WC.prototype,"init",1);var jC=WC,KC=class extends s.uAl{constructor(e,t){super(),this.tooltipName=t,this.size=58,this.padding=5,this.root=new kf.Group;const i=new kf.Scene({width:this.size,height:this.size});i.canvas.element.classList.add("ag-chart-mini-thumbnail-canvas"),i.setRoot(this.root),i.setContainer(e),this.scene=i}init(){this.scene.canvas.element.title=this.chartTranslationService.translate(this.tooltipName),this.scene.render().catch(e=>{console.error("AG Grid - chart update failed",e)})}};zv([(0,s.dsm)("chartTranslationService")],KC.prototype,"chartTranslationService",2),zv([s.o7C],KC.prototype,"init",1);var $C=class extends KC{constructor(e,t){super(e,t),this.stroke="gray",this.axisOvershoot=3}addAxes(){const e=this.size,t=this.padding,i=new kf.Line;i.x1=t,i.y1=t,i.x2=t,i.y2=e-t+this.axisOvershoot,i.stroke=this.stroke;const n=new kf.Line;n.x1=t-this.axisOvershoot+1,n.y1=e-t,n.x2=e-t+1,n.y2=e-t,n.stroke=this.stroke;const s=this.root;s.append(i),s.append(n)}};function YC(e){const{stacked:t,size:i,padding:n,xScalePadding:s,xScaleDomain:r,yScaleDomain:o}=e,a=new kf.BandScale;a.domain=r,a.range=[n,i-n],a.paddingInner=s,a.paddingOuter=s;const l=new kf.LinearScale;l.domain=o,l.range=[i-n,n];const c=(e,t,i)=>e.map((e,n)=>{const s=i.convert(e),r=new kf.Rect;return r.x=t.convert(n),r.y=s,r.width=t.bandwidth,r.height=i.convert(0)-s,r.strokeWidth=0,r.crisp=!0,r});return t?e.data.map(e=>c(e,a,l)):c(e.data,a,l)}function qC(e,t,i,n){const s=new kf.LinearScale;s.domain=[0,4],s.range=[n,i-n];const r=new kf.LinearScale;r.domain=[0,10],r.range=[i-n,n];const o=t.map(e=>{const t=new kf.Path;return t.strokeWidth=3,t.lineCap="round",t.fill=void 0,e.forEach((e,i)=>{t.path[i>0?"lineTo":"moveTo"](s.convert(i),r.convert(e))}),t}),a=new kf.Group;return a.setClipRectInGroupCoordinateSpace(new kf.BBox(n,n,i-2*n,i-2*n)),a.append(o),e.append(a),o}function XC(e,t,i,n,s,r=0){const o=new kf.LinearScale;o.domain=[0,7],o.range=[-Math.PI,Math.PI].map(e=>e+Math.PI/2);const a=new kf.LinearScale;a.domain=[0,10],a.range=[n,s];const l=[],c=t.map(e=>{const t=new kf.Path;return t.strokeWidth=1,t.strokeOpacity=.5,t.lineCap="round",t.fill=void 0,t.fillOpacity=.8,e.forEach((e,i)=>{const c=o.convert(i),h=n+s-a.convert(e),d=h*Math.cos(c),u=h*Math.sin(c);if(t.path[i>0?"lineTo":"moveTo"](d,u),r>0){const e=new kf.Circle;e.x=d,e.y=u,e.size=r,l.push(e)}}),t.path.closePath(),t}),h=new kf.Group,d=i/2;return h.translationX=d,h.translationY=d,h.append([...c,...l]),e.append(h),{paths:c,markers:l}}function ZC(e){let[t,i]=[1/0,-1/0];return{processedData:e.reduce((e,n,s)=>{const r=s>0?e[s-1]:void 0;null!=e[s]||(e[s]=[]);const o=e[s];return n.forEach((e,n)=>{r&&(e+=r[n]),o[n]=e,o[n]<t&&(t=o[n]),o[n]>i&&(i=o[n])}),e},[]),min:t,max:i}}zv([s.o7C],$C.prototype,"addAxes",1);var QC=class extends $C{constructor(e,t,i){super(e,"groupedColumnTooltip"),this.columnData=[2,3,4];const{root:n,columnData:s,size:r,padding:o}=this;this.columns=YC({stacked:!1,root:n,data:s,size:r,padding:o,xScaleDomain:[0,1,2],yScaleDomain:[0,4],xScalePadding:.3}),n.append(this.columns),this.updateColors(t,i)}updateColors(e,t){this.columns.forEach((i,n)=>{i.fill=e[n],i.stroke=t[n]})}};QC.chartType="groupedColumn";var JC=class e extends $C{constructor(t,i,n,s,r,o=e.data,a=[0,16],l="stackedColumnTooltip"){super(t,l);const{root:c,size:h,padding:d}=this;this.stackedColumns=YC({stacked:!0,root:c,data:o,size:h,padding:d,xScaleDomain:[0,1,2],yScaleDomain:a,xScalePadding:.3}),c.append([].concat.apply([],this.stackedColumns)),this.updateColors(i,n)}updateColors(e,t){this.stackedColumns.forEach((i,n)=>i.forEach(i=>{i.fill=e[n],i.stroke=t[n]}))}};JC.chartType="stackedColumn",JC.data=[[8,12,16],[6,9,12],[2,3,4]];var eb=JC,tb=class e extends eb{constructor(t,i,n,s,r){super(t,i,n,s,r,e.data,[0,10],"normalizedColumnTooltip")}};tb.chartType="normalizedColumn",tb.data=[[10,10,10],[6,7,8],[2,4,6]];var ib=tb,nb=class extends $C{constructor(e,t,i){super(e,"groupedBarTooltip");const n=this.padding,s=this.size,r=new kf.BandScale;r.domain=[0,1,2],r.range=[n,s-n],r.paddingInner=.3,r.paddingOuter=.3;const o=new kf.LinearScale;o.domain=[0,4],o.range=[s-n,n];const a=o.convert(0),l=r.bandwidth;this.bars=[2,3,4].map((e,t)=>{const i=new kf.Rect;return i.x=n,i.y=r.convert(t),i.width=a-o.convert(e),i.height=l,i.strokeWidth=0,i.crisp=!0,i}),this.updateColors(t,i),this.root.append(this.bars)}updateColors(e,t){this.bars.forEach((i,n)=>{i.fill=e[n],i.stroke=t[n]})}};nb.chartType="groupedBar";var sb=class e extends $C{constructor(t,i,n,s,r,o=e.data,a=[0,16],l="stackedBarTooltip"){super(t,l);const c=this.size,h=this.padding,d=new kf.BandScale;d.domain=[0,1,2],d.range=[h,c-h],d.paddingInner=.3,d.paddingOuter=.3;const u=new kf.LinearScale;u.domain=a,u.range=[c-h,h];const p=u.convert(0),g=d.bandwidth;this.bars=o.map(e=>e.map((e,t)=>{const i=new kf.Rect;return i.x=h,i.y=d.convert(t),i.width=p-u.convert(e),i.height=g,i.strokeWidth=0,i.crisp=!0,i})),this.updateColors(i,n),this.root.append([].concat.apply([],this.bars))}updateColors(e,t){this.bars.forEach((i,n)=>i.forEach(i=>{i.fill=e[n],i.stroke=t[n]}))}};sb.chartType="stackedBar",sb.data=[[8,12,16],[6,9,12],[2,3,4]];var rb=sb,ob=class e extends rb{constructor(t,i,n,s,r){super(t,i,n,s,r,e.data,[0,10],"normalizedBarTooltip")}};ob.chartType="normalizedBar",ob.data=[[10,10,10],[6,7,8],[2,4,6]];var ab=ob,lb=kf.toRadians,cb=class extends KC{constructor(e,t,i,n,s,r=.6,o="donutTooltip"){super(e,o);const a=(this.size-2*this.padding)/2,l=a+this.padding,c=[[lb(-90),lb(30)],[lb(30),lb(120)],[lb(120),lb(180)],[lb(180),lb(210)],[lb(210),lb(240)],[lb(240),lb(270)]];this.sectors=c.map(([e,t])=>{const i=new kf.Sector;return i.centerX=l,i.centerY=l,i.innerRadius=a*r,i.outerRadius=a,i.startAngle=e,i.endAngle=t,i.stroke=void 0,i.strokeWidth=0,i.inset=.75,i}),this.updateColors(t,i),this.root.append(this.sectors)}updateColors(e,t){this.sectors.forEach((i,n)=>{i.fill=e[n%e.length],i.stroke=t[n%t.length]})}};cb.chartType="donut";var hb=class extends cb{constructor(e,t,i,n,s){super(e,t,i,n,s,0,"pieTooltip")}};hb.chartType="pie";var db=class extends $C{constructor(e,t,i){super(e,"lineTooltip"),this.data=[[9,7,8,5,6],[5,6,3,4,1],[1,3,4,8,7]],this.lines=qC(this.root,this.data,this.size,this.padding),this.updateColors(t,i)}updateColors(e,t){this.lines.forEach((t,i)=>{t.stroke=e[i]})}};db.chartType="line";var ub=class extends $C{constructor(e,t,i){super(e,"scatterTooltip");const n=this.size,s=this.padding,r=new kf.LinearScale;r.domain=[-.5,4],r.range=[2*s,n-s];const o=new kf.LinearScale;o.domain=[-.5,3.5],o.range=[n-s,s];const a=[];[[[.3,3],[1.1,.9],[2,.4],[3.4,2.4]],[[0,.3],[1,2],[2.4,1.4],[3,0]]].forEach(e=>{e.forEach(([e,t])=>{const i=new kf.Arc;i.strokeWidth=0,i.centerX=r.convert(e),i.centerY=o.convert(t),i.radius=2.5,a.push(i)})}),this.points=a,this.updateColors(t,i);const l=new kf.Group;l.setClipRectInGroupCoordinateSpace(new kf.BBox(s,s,n-2*s,n-2*s)),l.append(this.points),this.root.append(l)}updateColors(e,t){this.points.forEach((i,n)=>{i.stroke=t[n%t.length],i.fill=e[n%e.length]})}};ub.chartType="scatter";var pb=class extends $C{constructor(e,t,i){super(e,"bubbleTooltip");const n=this.size,s=this.padding,r=new kf.LinearScale;r.domain=[0,1],r.range=[2*s,n-s];const o=new kf.LinearScale;o.domain=[0,1],o.range=[n-s,s];const a=[];[[[.1,.3,5],[.5,.4,7],[.2,.8,7]],[[.8,.7,5],[.7,.3,9]]].forEach(e=>{e.forEach(([e,t,i])=>{const n=new kf.Arc;n.strokeWidth=0,n.centerX=r.convert(e),n.centerY=o.convert(t),n.radius=i,n.fillOpacity=.7,a.push(n)})}),this.points=a,this.updateColors(t,i);const l=new kf.Group;l.setClipRectInGroupCoordinateSpace(new kf.BBox(s,s,n-2*s,n-2*s)),l.append(this.points),this.root.append(l)}updateColors(e,t){this.points.forEach((i,n)=>{i.stroke=t[n%t.length],i.fill=e[n%e.length]})}};pb.chartType="bubble";var gb=class e extends $C{constructor(t,i,n,s,r,o=e.data){super(t,"groupedAreaTooltip");const a=this.size,l=this.padding,c=new kf.BandScale;c.domain=[0,1,2],c.paddingInner=1,c.paddingOuter=0,c.range=[l+.5,a-l-.5];const h=new kf.LinearScale;h.domain=[0,6],h.range=[a-l+.5,l];const d=2*o.length-1,u=[],p=h.convert(0);o.forEach((e,t)=>{const i=c.convert(t);e.forEach((e,n)=>{const s=h.convert(e),r=u[n]||(u[n]=[]);r[t]={x:i,y:s},r[d-t]={x:i,y:p}})}),this.areas=u.reverse().map(e=>{const t=new kf.Path;t.strokeWidth=1,t.strokeOpacity=.75,t.fillOpacity=.7;const i=t.path;return i.clear(),e.forEach((e,t)=>i[t>0?"lineTo":"moveTo"](e.x,e.y)),i.closePath(),t}),this.updateColors(i,n),this.root.append(this.areas)}updateColors(e,t){this.areas.forEach((i,n)=>{i.fill=e[n],i.stroke=t[n]})}};gb.chartType="area",gb.data=[[1,3,5],[2,6,4],[5,3,1]];var fb=gb,mb=class e extends $C{constructor(t,i,n,s,r,o=e.data,a="stackedAreaTooltip"){super(t,a);const l=this.size,c=this.padding,h=new kf.BandScale;h.domain=[0,1,2],h.paddingInner=1,h.paddingOuter=0,h.range=[c+.5,l-c-.5];const d=new kf.LinearScale;d.domain=[0,16],d.range=[l-c+.5,c+.5];const u=2*o.length-1,p=[];o.forEach((e,t)=>{const i=h.convert(t);let n=0;e.forEach((e,s)=>{const r=d.convert(n+e),o=p[s]||(p[s]=[]);o[t]={x:i,y:r},o[u-t]={x:i,y:d.convert(n)},n+=e})}),this.areas=p.map(e=>{const t=new kf.Path;t.strokeWidth=0;const i=t.path;return i.clear(),e.forEach((e,t)=>i[t>0?"lineTo":"moveTo"](e.x,e.y)),i.closePath(),t}),this.updateColors(i,n),this.root.append(this.areas)}updateColors(e,t){this.areas.forEach((i,n)=>{i.fill=e[n],i.stroke=t[n]})}};mb.chartType="stackedArea",mb.data=[[2,3,2],[3,6,5],[6,2,2]];var vb=mb,yb=class e extends vb{constructor(t,i,n,s,r,o=e.data){super(t,i,n,s,r,o,"normalizedAreaTooltip")}};yb.chartType="normalizedArea",yb.data=vb.data.map(e=>{const t=e.reduce((e,t)=>e+t,0);return e.map(e=>e/t*16)});var Cb=yb,bb=class extends $C{constructor(e,t,i){super(e,"histogramTooltip");const n=this.padding,s=this.size,r=[2,5,11,13,10,6,1],o=new kf.LinearScale;o.domain=[0,r.length],o.range=[n,s-n];const a=new kf.LinearScale;a.domain=[0,r.reduce((e,t)=>Math.max(e,t),0)],a.range=[s-n,n];const l=a.convert(0);this.bars=r.map((e,t)=>{const i=a.convert(e),n=o.convert(t),s=o.convert(t+1),r=new kf.Rect;return r.x=n,r.y=i,r.width=s-n,r.height=l-i,r.strokeWidth=1,r.strokeOpacity=.75,r.crisp=!0,r}),this.updateColors(t,i),this.root.append(this.bars)}updateColors([e],[t]){this.bars.forEach(i=>{i.fill=e,i.stroke=t})}};bb.chartType="histogram";var Sb=class extends KC{constructor(e,t){super(e,t),this.stroke="gray",this.showRadiusAxisLine=!0,this.showAngleAxisLines=!0}addAxes(){const e=this.size,t=this.padding,i=(e-2*t)/2,n=this.showAngleAxisLines?[i,.8*i,.6*i,.4*i]:[],s=new kf.Line;s.x1=e/2,s.y1=t,s.x2=e/2,s.y2=e-t-i-n[n.length-1],s.stroke=this.stroke,s.strokeOpacity=.5,s.fill=void 0,s.visible=this.showRadiusAxisLine;const r=t+i;this.gridLines=n.map((e,t)=>{const i=new kf.Path;return i.path.arc(r,r,e,0,2*Math.PI),i.strokeWidth=1,i.stroke=this.stroke,i.strokeOpacity=0===t?.5:.2,i.fill=void 0,i});const o=this.root;o.append(s),this.gridLines.length>0&&o.append(this.gridLines)}};zv([s.o7C],Sb.prototype,"addAxes",1);var wb=class extends Sb{constructor(e,t,i){super(e,"radialColumnTooltip"),this.data=[[6,8,10,2,6,5],[4,4,3,6,4,4],[5,4,2,9,8,9]],this.showRadiusAxisLine=!1;const{padding:n,size:s,data:r}=this,o=(s-2*n)/2,a=.4*o,l=new kf.BandScale;l.domain=r[0].map((e,t)=>t),l.range=[0,2*Math.PI],l.paddingInner=0,l.paddingOuter=0;const c=.7*l.bandwidth,{processedData:h,max:d}=ZC(r),u=new kf.LinearScale;u.domain=[0,d],u.range=[a,o];const p=this.size/2;this.series=h.map((e,t)=>{const i=0===t?void 0:h[t-1],n=new kf.Group({zIndex:1e6}),s=e.map((e,t)=>{const n=null==i?void 0:i[t],s=u.convert(e),r=u.convert(null!=n?n:0),h=l.convert(t),d=h+c,g=kf.getRadialColumnWidth(h,d,o,.5,.5),f=new kf.RadialColumnShape;return f.scalingCenterX=p,f.scalingCenterY=p,f.columnWidth=g,f.innerRadius=r,f.outerRadius=s,f.startAngle=h,f.endAngle=d,f.isBeveled=!0,f.axisInnerRadius=a,f.axisOuterRadius=o,f.stroke=void 0,f.strokeWidth=0,f});return n.append(s),n.translationX=p,n.translationY=p,n}),this.root.append(this.series),this.updateColors(t,i)}updateColors(e,t){this.series.forEach((i,n)=>{var s;null==(s=i.children)||s.forEach(i=>{i.fill=e[n%e.length],i.stroke=t[n%t.length]})})}};wb.chartType="radialColumn";var xb=class extends Sb{constructor(e,t,i){super(e,"radialBarTooltip"),this.data=[[6,8,10],[4,4,3],[5,4,2]],this.showRadiusAxisLine=!1;const n=(this.size-this.padding)/2,s=.4*n,r=n+s,o=new kf.BandScale;o.domain=this.data[0].map((e,t)=>t),o.range=[n,s],o.paddingInner=.5,o.paddingOuter=0;const a=o.bandwidth,{processedData:l,max:c}=ZC(this.data),h=new kf.LinearScale;h.domain=[0,Math.ceil(1.5*c)];const d=1.5*Math.PI,u=d+2*Math.PI;h.range=[d,u];const p=this.size/2;this.series=l.map((e,t)=>{const i=t<0?void 0:l[t-1],n=new kf.Group({zIndex:1e6}),s=e.map((e,t)=>{var n;const s=null!=(n=null==i?void 0:i[t])?n:0,l=r-o.convert(t),c=l+a,d=h.convert(s),u=h.convert(e),g=new kf.Sector;return g.centerX=p,g.centerY=p,g.innerRadius=l,g.outerRadius=c,g.startAngle=d,g.endAngle=u,g.stroke=void 0,g.strokeWidth=0,g});return n.append(s),n}),this.root.append(this.series),this.updateColors(t,i)}updateColors(e,t){this.series.forEach((i,n)=>{var s;null==(s=i.children)||s.forEach(i=>{i.fill=e[n%e.length],i.stroke=t[n%t.length]})})}};xb.chartType="radialBar";var Eb=class extends Sb{constructor(e,t,i){super(e,"radarLineTooltip"),this.markerSize=4,this.data=[[8,7,8,7,8,8,7,8],[6,8,5,10,6,7,4,6],[0,3,3,5,4,4,2,0]],this.showRadiusAxisLine=!1;const n=(this.size-2*this.padding)/2,{paths:s,markers:r}=XC(this.root,this.data,this.size,n,0,this.markerSize);this.lines=s,this.markers=r,this.updateColors(t,i)}updateColors(e,t){this.lines.forEach((i,n)=>{const s=this.data[n].length;i.stroke=e[n];const r=n*s,o=r+s;this.markers.slice(r,o).forEach(i=>{i.stroke=t[n],i.fill=e[n]})})}};Eb.chartType="radarLine";var Mb=class extends Sb{constructor(e,t,i){super(e,"radarAreaTooltip"),this.data=[[8,10,5,7,4,1,5,8],[1,1,2,7,7,8,10,1],[4,5,9,9,4,2,3,4]],this.showRadiusAxisLine=!1;const n=(this.size-2*this.padding)/2,s=n-.3*this.size;this.areas=XC(this.root,this.data,this.size,n,s).paths,this.updateColors(t,i)}updateColors(e,t){this.areas.forEach((i,n)=>{i.fill=e[n],i.stroke=t[n]})}};Mb.chartType="radarArea";var Ab=class extends Sb{constructor(e,t,i){super(e,"nightingaleTooltip"),this.data=[[6,10,9,8,7,8],[4,6,5,4,5,5],[3,5,4,3,4,7]],this.showRadiusAxisLine=!1;const n=(this.size-2*this.padding)/2,s=new kf.BandScale;s.domain=this.data[0].map((e,t)=>t),s.range=[-Math.PI,Math.PI],s.paddingInner=0,s.paddingOuter=0;const r=.7*s.bandwidth,{processedData:o,max:a}=ZC(this.data),l=new kf.LinearScale;l.domain=[0,a],l.range=[0,n];const c=this.size/2;this.series=o.map((e,t)=>{const i=t<0?void 0:o[t-1],n=new kf.Group({zIndex:1e6}),a=e.map((e,t)=>{const n=null==i?void 0:i[t],o=l.convert(e),a=l.convert(null!=n?n:0),h=s.convert(t),d=h+r,u=new kf.Sector;return u.centerX=c,u.centerY=c,u.innerRadius=a,u.outerRadius=o,u.startAngle=h,u.endAngle=d,u.stroke=void 0,u.strokeWidth=0,u});return n.append(a),n}),this.root.append(this.series),this.updateColors(t,i)}updateColors(e,t){this.series.forEach((i,n)=>{var s;null==(s=i.children)||s.forEach(i=>{i.fill=e[n%e.length],i.stroke=t[n%t.length]})})}};Ab.chartType="nightingale";var Tb=class extends $C{constructor(e,t,i){super(e,"rangeBarTooltip"),this.bars=this.createRangeBar(this.root,[3,3.5,3],this.size,this.padding,"vertical"),this.updateColors(t,i)}updateColors(e,t){this.bars.forEach((i,n)=>{i.fill=e[n],i.stroke=t[n]})}createRangeBar(e,t,i,n,s){const r="horizontal"===s,o=2*n,a=new kf.BandScale;a.domain=t.map((e,t)=>t),a.range=[n,i-n],a.paddingInner=.3,a.paddingOuter=.3;const l=new kf.LinearScale;l.domain=[.7*t.reduce((e,t)=>Math.min(e,t),1/0),1.3*t.reduce((e,t)=>Math.max(e,t),0)],l.range=[o,i-o];const c=a.bandwidth,h=t.map((e,t)=>{const[i,n]=[.7*e,1.3*e],s=a.convert(t),o=l.convert(i),h=l.convert(n)-o,d=new kf.Rect;return d.x=r?o:s,d.y=r?s:o,d.width=r?h:c,d.height=r?c:h,d.strokeWidth=0,d.crisp=!0,d});return e.append(h),h}};Tb.chartType="rangeBar";var Db=class extends $C{constructor(e,t,i){super(e,"rangeAreaTooltip");const n=[Ib({offset:1.5,length:4,pattern:{low:3,high:5,period:4}}),Ib({offset:1.5,length:4,pattern:{low:2.25,high:4.25,period:4}}),Ib({offset:3,length:4,pattern:{low:2.5,high:4.5,period:4}})].map(e=>e.map(([e,t])=>({x:e,low:t-.875,high:t+.875}))),{lines:s,areas:r}=this.createRangeArea(this.root,n,this.size,this.padding);this.lines=s,this.areas=r,this.updateColors(t,i)}updateColors(e,t){e=Lb(e,1,2),t=Lb(t,1,2),this.lines.forEach(([e,i],n)=>{e.fill=void 0,e.stroke=t[n],i.fill=void 0,i.stroke=t[n]}),this.areas.forEach((t,i)=>{t.fill=e[i]})}createRangeArea(e,t,i,n){const s=t.reduce((e,t)=>t.reduce((e,{x:t})=>Math.min(e,t),e),1/0),r=t.reduce((e,t)=>t.reduce((e,{x:t})=>Math.max(e,t),e),-1/0),o=t.reduce((e,t)=>t.reduce((e,{low:t})=>Math.min(e,t),e),1/0),a=t.reduce((e,t)=>t.reduce((e,{high:t})=>Math.max(e,t),e),-1/0),l=new kf.LinearScale;l.domain=[s,r],l.range=[n,i-n];const c=2*n,h=new kf.LinearScale;h.domain=[o,a],h.range=[i-c,c];const d=[],u=[];return t.map(e=>{const t=new kf.Path,i=new kf.Path,n=new kf.Path;return d.push([t,i]),u.push(n),t.strokeWidth=0,i.strokeWidth=0,n.strokeWidth=0,n.fillOpacity=.8,t.path.clear(),i.path.clear(),n.path.clear(),e.map((e,s)=>{const{x:r,low:o,high:a}=e,c=l.convert(r),d=h.convert(o),u=h.convert(a),p=s>0?"lineTo":"moveTo";return t.path[p](c,u),i.path[p](c,d),n.path[p](c,u),[c,d]})}).forEach((e,t)=>{const i=e.length-1,n=u[t];for(let t=i;t>=0;t--){const[i,s]=e[t];n.path.lineTo(i,s)}}),e.append(u.concat(...d)),{lines:d,areas:u}}};function Ib(e){const{offset:t,length:i,pattern:n}=e,s=function(e,t,i){const{period:n}=i,s=e/n,r=[0,.5].map(e=>e-s).map(Rb).sort((e,t)=>e-t);return Array.from({length:Math.floor(r.length*(n/t))},(e,t)=>r[t%r.length]+Math.floor(t/r.length)).map(e=>e*n).map(t=>o(t,e,i))}(t,i,n),r=i;return 0!==s.length&&0===s[0][0]||s.unshift(o(0,t,n)),s[s.length-1][0]!==r&&s.push(o(r,t,n)),s;function o(e,t,i){return[e,a(t+e,i)]}function a(e,t){const{low:i,high:n,period:s}=t,r=Rb(e/s);return i+(n-i)*(r>.5?1-2*(r-.5):2*r)}}function Rb(e){const t=e%1;return t<0?t+1:t}function Lb(e,t,i){const n=[...e],s=n[t];return n[t]=n[i],n[i]=s,n}Db.chartType="rangeArea";var kb=class extends $C{constructor(e,t,i,n,s){super(e,"boxPlotTooltip");const r=this.padding,o=this.size,a=[11,11.5,10.5],l=new kf.LinearScale;l.domain=[.8*a.reduce((e,t)=>Math.min(e,t),1/0),1.2*a.reduce((e,t)=>Math.max(e,t),0)],l.range=[o-1.5*r,r];const c=new kf.BandScale;c.domain=a.map((e,t)=>t),c.range=[r,o-r],c.paddingInner=.4,c.paddingOuter=.2;const h=Math.round(c.bandwidth),d=Math.round(c.bandwidth/2);this.boxPlotGroups=a.map((e,t)=>{let[i,n,s,r]=[.8*e,.9*e,1.1*e,1.2*e];const o=Math.round(l.convert(s)),a=Math.round(c.convert(t)),u=Math.round(a+h),p=Math.round(l.convert(n)),g=Math.round(l.convert(i)),f=Math.round(l.convert(e)),m=Math.round(l.convert(r)),v=a+d,y=new kf.Group,C=new kf.Rect,b=new kf.Line,S=new kf.Line,w=new kf.Line,x=new kf.Line,E=new kf.Line;return C.x=a,C.y=o,C.width=h,C.height=p-o,C.strokeWidth=1,C.strokeOpacity=.75,C.crisp=!0,this.setLineProperties(b,a,u,f,f),this.setLineProperties(S,v,v,m,o),this.setLineProperties(w,v,v,g,p),this.setLineProperties(x,a,u,m,m),this.setLineProperties(E,a,u,g,g),y.append([C,b,S,w,x,E]),y}),this.updateColors(t,i,n,s),this.root.append(this.boxPlotGroups)}updateColors(e,t,i,n){var s;const r=null==i?void 0:i.properties.get(Bf.DEFAULT_BACKGROUND_COLOUR),o=null!=(s=Array.isArray(r)?r[0]:r)?s:"white";this.boxPlotGroups.forEach((i,s)=>{var r;null==(r=i.children)||r.forEach(i=>{const r=e[s%e.length];i.fill=n?r:Uf.Color.interpolate(r,o)(.7),i.stroke=t[s%t.length]})})}setLineProperties(e,t,i,n,s){e.x1=t,e.x2=i,e.y1=n,e.y2=s,e.strokeOpacity=.75}};kb.chartType="boxPlot";var Pb=class extends KC{constructor(e,t,i,n,s){super(e,"treemapTooltip");const{size:r,padding:o}=this,a=[[1,1],[3,2,1]],l=a.length%2==0?.3:.2,c=[o,r-o],h=a.length,d=h*(h+1)/2,u=l/(h-1),p=c[1]-c[0],g=p-l;let f=c[0];this.rects=a.reduce((e,t,i)=>{null!=e||(e=[]);const n=g*((h-i)/d),s=t.length,r=t.reduce((e,t)=>e+t,0),o=l/(s-1||1),a=s>1?p-l:p;let m=c[0];const v=t.map(e=>{const t=new kf.Rect,i=a*e/r;return t.x=f,t.y=m,t.width=n,t.height=i,t.strokeWidth=.75,t.crisp=!0,m+=i+o,t});return f+=n+u,e.push(...v),e},[]),this.updateColors(t,i,n,s);const m=new kf.Group;m.setClipRectInGroupCoordinateSpace(new kf.BBox(o,o,r-o,r-o)),m.append(this.rects),this.root.append(m)}updateColors(e,t,i,n){var s;const{properties:r}=null!=i?i:{},o=null==r?void 0:r.get(Bf.DEFAULT_BACKGROUND_COLOUR),a=null!=(s=Array.isArray(o)?o[0]:o)?s:"white";this.rects.forEach((i,s)=>{i.fill=e[s%t.length],i.stroke=n?t[s%t.length]:a})}};Pb.chartType="treemap";var Nb=class extends Sb{constructor(e,t,i){super(e,"sunburstTooltip"),this.data=[[[],[]],[[],[]],[[],[]]],this.angleOffset=-Math.PI/2,this.innerRadiusRatio=0,this.showRadiusAxisLine=!1,this.showAngleAxisLines=!1;const{data:n,size:s,padding:r,angleOffset:o,innerRadiusRatio:a}=this,l=(s-2*r)/2,c=[o+0,o+2*Math.PI],h=Math.abs(c[1]-c[0]),d=[l*a,l],u=Math.abs(d[1]-d[0]);let p=0;const g=(e,t)=>{e.forEach(e=>{const i=t+1;p=Math.max(p,i),g(e,i)})};g(n,0);const f=u/p,m=this.size/2,v=c[0];this.series=[];const y=(e,t,i,n,s)=>{if(!Array.isArray(e))return;const r=t+1;let o=i;e.forEach((e,i,a)=>{let l=s;l||(l=new kf.Group,this.series.push(l));const c=d[0]+t*f,h=d[0]+r*f,u=1/a.length,p=o,g=p+n*u,v=new kf.Sector;v.centerX=m,v.centerY=m,v.innerRadius=c,v.outerRadius=h,v.startAngle=p,v.endAngle=g,v.stroke=void 0,v.strokeWidth=0,v.inset=.75,o=g,l.append(v),y(e,r,p,Math.abs(g-p),l)})};y(n,0,v,h),this.root.append(this.series),this.updateColors(t,i)}updateColors(e,t){this.series.forEach((i,n)=>{var s;null==(s=i.children)||s.forEach(i=>{i.fill=e[n%e.length],i.stroke=t[n%t.length]})})}};Nb.chartType="sunburst";var Ob=class extends KC{constructor(e,t,i,n,s){var r,o;super(e,"heatmapTooltip");const{size:a,padding:l}=this,c=Array.from({length:3},(e,t)=>Array.from({length:3},(e,t)=>t)),h=c.map((e,t)=>t),d=new kf.BandScale;d.domain=h,d.range=[l,a-l],d.paddingInner=.01,d.paddingOuter=.1;const u=new kf.BandScale;u.domain=h,u.range=[l,a-l],u.paddingInner=.01,u.paddingOuter=.1;const p=null!=(r=d.bandwidth)?r:0,g=null!=(o=u.bandwidth)?o:0;this.rects=c.reduce((e,t,i)=>{null!=e||(e=[]);const n=t.map((e,t)=>{const n=new kf.Rect;return n.x=d.convert(i),n.y=u.convert(t),n.width=p,n.height=g,n.strokeWidth=0,n.crisp=!0,n});return e.push(...n),e},[]),this.updateColors(t,i,n,s);const f=new kf.Group;f.setClipRectInGroupCoordinateSpace(new kf.BBox(l,l,a-l,a-l)),f.append(this.rects),this.root.append(f)}updateColors(e,t,i,n){var s;const{properties:r}=null!=i?i:{},o=null==r?void 0:r.get(Bf.DEFAULT_DIVERGING_SERIES_COLOUR_RANGE),a=null==r?void 0:r.get(Bf.DEFAULT_BACKGROUND_COLOUR),l=null!=(s=Array.isArray(a)?a[0]:a)?s:"white",c=n?[e[0],e[1]]:o,h=n?t[0]:l;this.rects.forEach((e,t)=>{e.fill=Uf.Color.interpolate(c[0],c[1])(.2*t),e.stroke=h})}};Ob.chartType="heatmap";var _b=class extends $C{constructor(e,t,i,n,s){super(e,"waterfallTooltip"),this.data=[4,3,-3,6,-3],this.bars=this.createWaterfall(this.root,this.data,this.size,this.padding,"vertical").bars,this.updateColors(t,i,n,s)}updateColors(e,t,i,n){var s,r;const{data:o}=this,{properties:a}=null!=i?i:{},l={fill:e[0],stroke:t[0]},c={fill:e[1],stroke:t[1]},h=n?l:null!=(s=null==a?void 0:a.get(Bf.DEFAULT_WATERFALL_SERIES_POSITIVE_COLOURS))?s:l,d=n?c:null!=(r=null==a?void 0:a.get(Bf.DEFAULT_WATERFALL_SERIES_NEGATIVE_COLOURS))?r:c;this.bars.forEach((e,t)=>{const i=o[t]>=0;e.fill=i?h.fill:d.fill,e.stroke=i?h.stroke:d.stroke})}createWaterfall(e,t,i,n,s){const r=2*n,{processedData:o,min:a,max:l}=ZC(t.map(e=>[e])),c=o.reduce((e,t)=>e.concat(t),[]),h=new kf.LinearScale;h.domain=[Math.min(a,0),l],h.range=[i-r,r];const d=new kf.BandScale;d.domain=t.map((e,t)=>t),d.range=[n,i-n],d.paddingInner=.2,d.paddingOuter=.3;const u=d.bandwidth,p=new kf.Path;p.stroke="#575757",p.strokeWidth=0;const g=Math.floor(p.strokeWidth)%2/2,f=p.path;f.clear();const m="horizontal"===s,v=c.map((e,i)=>{const n=i>0?c[i-1]:0,s=t[i]>0,r=Math.round(h.convert(e)),o=Math.round(h.convert(n)),a=(s?r:o)-g,l=(s?o:r)+g,p=Math.abs(l-a),v=d.convert(i),y=new kf.Rect;y.x=m?a:v,y.y=m?v:a,y.width=m?p:u,y.height=m?u:p,y.strokeWidth=0,y.crisp=!0;const C=r+g,b=o+g;if(i>0){const e=m?b:y.x,t=m?y.y:b;f.lineTo(e,t)}const S=m?C:y.x,w=m?y.y:C;return f.moveTo(S,w),y});return e.append([p,...v]),{bars:v}}};_b.chartType="waterfall";var Fb=class extends $C{constructor(e,t,i){super(e,"columnLineComboTooltip"),this.columnData=[3,4],this.lineData=[[5,4,6,5,4]];const{root:n,columnData:s,lineData:r,size:o,padding:a}=this;this.columns=YC({stacked:!1,root:n,data:s,size:o,padding:a,xScaleDomain:[0,1],yScaleDomain:[0,4],xScalePadding:.5}),n.append(this.columns),this.lines=qC(n,r,o,a),this.updateColors(t,i)}updateColors(e,t){this.columns.forEach((i,n)=>{i.fill=e[n],i.stroke=t[n]}),this.lines.forEach((t,i)=>{t.stroke=e[i+2]})}};Fb.chartType="columnLineCombo";var Gb=class extends $C{constructor(e,t,i){super(e,"areaColumnComboTooltip"),this.columnData=[3,4.5],this.areaData=[[5,4,6,5,4]];const{root:n,columnData:s,areaData:r,size:o,padding:a}=this;this.columns=YC({stacked:!1,root:n,data:s,size:o,padding:a,xScaleDomain:[0,1],yScaleDomain:[0,6],xScalePadding:.5});const l=new kf.BandScale;l.range=[a,o-a],l.domain=[0,1,2,3,4],l.paddingInner=1,l.paddingOuter=0;const c=new kf.LinearScale;c.range=[o-a,a],c.domain=[0,6];const h=[],d=c.convert(0),u=l.convert(0);r.forEach((e,t)=>{const i=h[t]||(h[t]=[]);e.forEach((e,t)=>{const n=e,s=t,r=l.convert(s),o=c.convert(n);i[t]={x:r,y:o}});const n=l.convert(e.length-1);h[t].push({x:n,y:d},{x:u,y:d})}),this.areas=h.map(e=>{const t=new kf.Path;t.strokeWidth=0,t.fillOpacity=.8;const i=t.path;return e.forEach((e,t)=>i[t>0?"lineTo":"moveTo"](e.x,e.y)),t}),n.append(this.areas),n.append([].concat.apply([],this.columns)),this.updateColors(t,i)}updateColors(e,t){this.areas.forEach((i,n)=>{i.fill=e[n],i.stroke=t[n]}),this.columns.forEach((i,n)=>{i.fill=e[n+1],i.stroke=t[n+1]})}};Gb.chartType="areaColumnCombo";var Vb=class extends KC{constructor(e,t,i){super(e,"customComboTooltip"),this.columnData=[3,4],this.lineData=[[5,4,6,5,4]];const{root:n,columnData:s,lineData:r,size:o,padding:a}=this;this.columns=YC({stacked:!1,root:n,data:s,size:o,padding:a,xScaleDomain:[0,1],yScaleDomain:[0,4],xScalePadding:.5}),n.append(this.columns),this.lines=qC(n,r,o,a);const l="grey",c=new kf.Line;c.x1=a,c.y1=a,c.x2=a,c.y2=o-a+3,c.stroke=l;const h=new kf.Line;h.x1=a-3+1,h.y1=o-a,h.x2=o-a+1,h.y2=o-a,h.stroke=l;const d=new kf.Path;this.buildPenIconPath(d),d.fill="whitesmoke",d.stroke="darkslategrey",d.strokeWidth=1,n.append([h,c,d]),this.updateColors(t,i)}updateColors(e,t){this.columns.forEach((i,n)=>{i.fill=e[n],i.stroke=t[n]}),this.lines.forEach((t,i)=>{t.stroke=e[i+2]})}buildPenIconPath(e){const{path:t}=e;t.moveTo(25.76,43.46),t.lineTo(31.27,48.53),t.moveTo(49.86,22),t.lineTo(49.86,22),t.cubicCurveTo(49.01994659053345,21.317514933510974,47.89593834348529,21.09645997825817,46.86,21.41),t.lineTo(46.86,21.41),t.cubicCurveTo(45.55460035985361,21.77260167850787,44.38777081121966,22.517979360321792,43.51,23.55),t.lineTo(25.51,43.8),t.lineTo(25.43,43.89),t.lineTo(23.01,51.89),t.lineTo(22.83,52.46),t.lineTo(31.02,48.86),t.lineTo(49.02,28.52),t.lineTo(49.02,28.52),t.cubicCurveTo(49.940716461596224,27.521914221246085,50.54302631059587,26.2720342455763,50.75,24.93),t.lineTo(50.75,24.93),t.cubicCurveTo(50.95363374988308,23.866379846512814,50.62080640232334,22.77066734274871,49.86,22),t.closePath(),t.moveTo(41.76,25.5),t.lineTo(47.34,30.5),t.moveTo(40.74,26.65),t.lineTo(46.25,31.71)}};Vb.chartType="customCombo";var Bb={columnGroup:{column:{range:!0,pivot:!0,enterprise:!1,icon:QC},stackedColumn:{range:!0,pivot:!0,enterprise:!1,icon:eb},normalizedColumn:{range:!0,pivot:!0,enterprise:!1,icon:ib}},barGroup:{bar:{range:!0,pivot:!0,enterprise:!1,icon:nb},stackedBar:{range:!0,pivot:!0,enterprise:!1,icon:rb},normalizedBar:{range:!0,pivot:!0,enterprise:!1,icon:ab}},pieGroup:{pie:{range:!0,pivot:!0,enterprise:!1,icon:hb},donut:{range:!0,pivot:!0,enterprise:!1,icon:cb},doughnut:{range:!0,pivot:!0,enterprise:!1,icon:cb}},lineGroup:{line:{range:!0,pivot:!0,enterprise:!1,icon:db}},scatterGroup:{scatter:{range:!0,pivot:!0,enterprise:!1,icon:ub},bubble:{range:!0,pivot:!0,enterprise:!1,icon:pb}},areaGroup:{area:{range:!0,pivot:!0,enterprise:!1,icon:fb},stackedArea:{range:!0,pivot:!0,enterprise:!1,icon:vb},normalizedArea:{range:!0,pivot:!0,enterprise:!1,icon:Cb}},polarGroup:{radarLine:{range:!0,pivot:!1,enterprise:!0,icon:Eb},radarArea:{range:!0,pivot:!1,enterprise:!0,icon:Mb},nightingale:{range:!0,pivot:!1,enterprise:!0,icon:Ab},radialColumn:{range:!0,pivot:!1,enterprise:!0,icon:wb},radialBar:{range:!0,pivot:!1,enterprise:!0,icon:xb}},statisticalGroup:{boxPlot:{range:!0,pivot:!1,enterprise:!0,icon:kb},histogram:{range:!0,pivot:!1,enterprise:!1,icon:bb},rangeBar:{range:!0,pivot:!1,enterprise:!0,icon:Tb},rangeArea:{range:!0,pivot:!1,enterprise:!0,icon:Db}},hierarchicalGroup:{treemap:{range:!0,pivot:!0,enterprise:!0,icon:Pb},sunburst:{range:!0,pivot:!0,enterprise:!0,icon:Nb}},specializedGroup:{heatmap:{range:!0,pivot:!1,enterprise:!0,icon:Ob},waterfall:{range:!0,pivot:!1,enterprise:!0,icon:_b}},combinationGroup:{columnLineCombo:{range:!0,pivot:!0,enterprise:!1,icon:Fb},areaColumnCombo:{range:!0,pivot:!0,enterprise:!1,icon:Gb},customCombo:{range:!0,pivot:!0,enterprise:!1,icon:Vb}}},Hb={columnGroup:["column","stackedColumn","normalizedColumn"],barGroup:["bar","stackedBar","normalizedBar"],pieGroup:["pie","donut"],lineGroup:["line"],scatterGroup:["scatter","bubble"],areaGroup:["area","stackedArea","normalizedArea"],polarGroup:["radarLine","radarArea","nightingale","radialColumn","radialBar"],statisticalGroup:["boxPlot","histogram","rangeBar","rangeArea"],hierarchicalGroup:["treemap","sunburst"],specializedGroup:["heatmap","waterfall"],combinationGroup:["columnLineCombo","areaColumnCombo","customCombo"]},zb=class e extends s.uAl{constructor(t,i,n,s,r,o=Hb){super(e.TEMPLATE),this.wrappers={},this.chartController=t,this.fills=i,this.strokes=n,this.themeTemplateParameters=s,this.isCustomTheme=r,this.chartGroups=Vv({},o)}init(){!this.chartController.customComboExists()&&this.chartGroups.combinationGroup&&(this.chartGroups.combinationGroup=this.chartGroups.combinationGroup.filter(e=>"customCombo"!==e));const e=this.getGui(),t=this.chartController.isEnterprise(),i=this.chartController.isPivotChart(),n=!i,r=Object.keys(this.chartGroups).map(e=>{var r;const o=e in Bb?Bb[e]:void 0;if(!o)return s._.warnOnce(`invalid chartGroupsDef config '${e}'`),null;const a=(null!=(r=this.chartGroups[e])?r:[]).map(r=>{const a=r in o?o[r]:void 0;return a?!t&&a.enterprise?null:n&&a.range||i&&a.pivot?a:null:(s._.warnOnce(`invalid chartGroupsDef config '${e}.${r}'`),null)}).filter(e=>null!=e);return 0===a.length?null:{label:this.chartTranslationService.translate(e),items:a}}).filter(e=>null!=e);for(const{label:t,items:i}of r){const n=this.createBean(new s.Pk_({title:t,suppressEnabledCheckbox:!0,enabled:!0,suppressOpenCloseIcons:!0,cssIdentifier:"charts-settings",direction:"horizontal"}));for(const e of i){const t=e.icon,i=document.createElement("div");i.classList.add("ag-chart-mini-thumbnail");const s=t.chartType;this.addManagedListener(i,"click",()=>{this.chartController.setChartType(s),this.updateSelectedMiniChart()}),this.wrappers[s]=i,this.createBean(new t(i,this.fills,this.strokes,this.themeTemplateParameters,this.isCustomTheme)),n.addItem(i)}e.appendChild(n.getGui())}this.updateSelectedMiniChart()}updateSelectedMiniChart(){const e=this.chartController.getChartType();for(const t in this.wrappers){const i=t===e;this.wrappers[t].classList.toggle("ag-selected",i)}}};zb.TEMPLATE='<div class="ag-chart-settings-mini-wrapper"></div>',zv([(0,s.dsm)("chartTranslationService")],zb.prototype,"chartTranslationService",2),zv([s.o7C],zb.prototype,"init",1);var Ub=zb,Wb=class e extends s.uAl{constructor(t){super(e.TEMPLATE),this.chartController=t,this.miniChartsContainers=[],this.cardItems=[],this.activePaletteIndex=0,this.palettes=[],this.themes=[]}postConstruct(){this.resetPalettes(),this.ePrevBtn.insertAdjacentElement("afterbegin",s._.createIconNoSpan("previous",this.gos)),this.eNextBtn.insertAdjacentElement("afterbegin",s._.createIconNoSpan("next",this.gos)),this.addManagedListener(this.ePrevBtn,"click",()=>this.setActivePalette(this.getPrev(),"left")),this.addManagedListener(this.eNextBtn,"click",()=>this.setActivePalette(this.getNext(),"right")),this.addManagedListener(this.chartController,Py.EVENT_CHART_TYPE_CHANGED,()=>this.resetPalettes(!0)),this.addManagedListener(this.chartController,Py.EVENT_CHART_API_UPDATE,()=>this.resetPalettes(!0)),this.scrollSelectedIntoView()}scrollSelectedIntoView(){setTimeout(()=>{const e=this.miniChartsContainers.find(e=>!e.getGui().classList.contains("ag-hidden")).getGui().querySelector(".ag-selected");if(e){const t=e.offsetParent;t&&this.eMiniChartsContainer.scrollTo(0,t.offsetTop)}},250)}resetPalettes(e){var t,i;const n=this.chartController.getPalettes(),r=this.chartController.getThemeTemplateParameters(),o=null==(i=null==(t=this.gos.get("chartToolPanelsDef"))?void 0:t.settingsPanel)?void 0:i.chartGroupsDef;if(s._.shallowCompare(n,this.palettes)&&!e||this.isAnimating)return;this.palettes=n,this.themes=this.chartController.getThemeNames(),this.activePaletteIndex=this.themes.findIndex(e=>e===this.chartController.getChartThemeName()),this.cardItems=[],s._.clearElement(this.eCardSelector),this.destroyMiniCharts();const{themes:a}=this;this.palettes.forEach((e,t)=>{const i=this.activePaletteIndex===t,{fills:n,strokes:s}=e,l=!Cy(a[t]),c=this.createBean(new Ub(this.chartController,n,s,r[t],l,o));this.miniChartsContainers.push(c),this.eMiniChartsContainer.appendChild(c.getGui()),this.addCardLink(t),i?c.updateSelectedMiniChart():c.setDisplayed(!1)}),s._.setDisplayed(this.eNavBar,this.palettes.length>1),s._.radioCssClass(this.cardItems[this.activePaletteIndex],"ag-selected","ag-not-selected")}addCardLink(e){const t=document.createElement("div");t.classList.add("ag-chart-settings-card-item"),this.addManagedListener(t,"click",()=>{this.setActivePalette(e,e<this.activePaletteIndex?"left":"right")}),this.eCardSelector.appendChild(t),this.cardItems.push(t)}getPrev(){let e=this.activePaletteIndex-1;return e<0&&(e=this.palettes.length-1),e}getNext(){let e=this.activePaletteIndex+1;return e>=this.palettes.length&&(e=0),e}setActivePalette(e,t){if(this.isAnimating||this.activePaletteIndex===e)return;s._.radioCssClass(this.cardItems[e],"ag-selected","ag-not-selected");const i=this.miniChartsContainers[this.activePaletteIndex],n=i.getGui(),r=this.miniChartsContainers[e],o=r.getGui();i.updateSelectedMiniChart(),r.updateSelectedMiniChart();const a="left"===t?-1:1,l=o.style.left=s._.getAbsoluteWidth(this.getGui())*a+"px";this.activePaletteIndex=e,this.isAnimating=!0;const c="ag-animating";r.setDisplayed(!0),i.addCssClass(c),r.addCssClass(c),this.chartController.setChartThemeName(this.themes[e]),window.setTimeout(()=>{n.style.left=-parseFloat(l)+"px",o.style.left="0px"},0),window.setTimeout(()=>{this.isAnimating=!1,i.removeCssClass(c),r.removeCssClass(c),i.setDisplayed(!1)},300)}destroyMiniCharts(){s._.clearElement(this.eMiniChartsContainer),this.miniChartsContainers=this.destroyBeans(this.miniChartsContainers)}destroy(){this.destroyMiniCharts(),super.destroy()}};Wb.TEMPLATE='<div class="ag-chart-settings-wrapper">\n            <div ref="eMiniChartsContainer" class="ag-chart-settings-mini-charts-container ag-scrollable-container"></div>\n            <div ref="eNavBar" class="ag-chart-settings-nav-bar">\n                <div ref="ePrevBtn" class="ag-chart-settings-prev">\n                    <button type="button" class="ag-button ag-chart-settings-prev-button"></button>\n                </div>\n                <div ref="eCardSelector" class="ag-chart-settings-card-selector"></div>\n                <div ref="eNextBtn" class="ag-chart-settings-next">\n                    <button type="button" class="ag-button ag-chart-settings-next-button"></button>\n                </div>\n            </div>\n        </div>',zv([(0,s.PIB)("eMiniChartsContainer")],Wb.prototype,"eMiniChartsContainer",2),zv([(0,s.PIB)("eNavBar")],Wb.prototype,"eNavBar",2),zv([(0,s.PIB)("eCardSelector")],Wb.prototype,"eCardSelector",2),zv([(0,s.PIB)("ePrevBtn")],Wb.prototype,"ePrevBtn",2),zv([(0,s.PIB)("eNextBtn")],Wb.prototype,"eNextBtn",2),zv([s.o7C],Wb.prototype,"postConstruct",1);var jb=Wb,Kb=class e extends s.uAl{constructor(e,t){super(),this.panels=e,this.chartMenuContext=t,this.tabs=[]}init(){this.panels.forEach(e=>{const t=e.replace("chart","").toLowerCase(),i=this.createPanel(t),n=this.createTab(e,t,i);this.tabs.push(n),this.addDestroyFunc(()=>this.destroyBean(i))}),this.tabbedLayout=new s.LfH({items:this.tabs,cssClass:"ag-chart-tabbed-menu",keepScrollPosition:!0,suppressFocusBodyOnOpen:!0,suppressTrapFocus:!0,enableCloseButton:!this.chartMenuService.isLegacyFormat(),closeButtonAriaLabel:this.chartTranslationService.translate("ariaChartMenuClose"),onCloseClicked:()=>{var t;null==(t=this.eventSource)||t.focus({preventScroll:!0}),this.dispatchEvent({type:e.EVENT_CLOSED})}}),this.getContext().createBean(this.tabbedLayout)}createTab(e,t,i){const n=document.createElement("div");n.classList.add("ag-chart-tab",`ag-chart-${t}`),this.getContext().createBean(i),n.appendChild(i.getGui());const r=document.createElement("div"),o=this.chartTranslationService.translate(t);return r.innerText=o,{title:r,titleLabel:o,bodyPromise:s.oY$.resolve(n),getScrollableContainer:()=>n.querySelector(".ag-scrollable-container")||n,name:e}}showTab(e){const t=this.tabs[e];this.tabbedLayout.showItem(t)}getGui(){return this.tabbedLayout&&this.tabbedLayout.getGui()}showMenu(e,t){var i;this.eventSource=e,t||null==(i=this.tabbedLayout)||i.focusHeader(!0)}destroy(){this.parentComponent&&this.parentComponent.isAlive()&&this.destroyBean(this.parentComponent),super.destroy()}createPanel(t){const{chartController:i,chartOptionsService:n}=this.chartMenuContext;switch(t){case e.TAB_DATA:return new qy(i,n);case e.TAB_FORMAT:return new jC(this.chartMenuContext);default:return new jb(i)}}};Kb.EVENT_CLOSED="closed",Kb.TAB_DATA="data",Kb.TAB_FORMAT="format",zv([(0,s.dsm)("chartTranslationService")],Kb.prototype,"chartTranslationService",2),zv([(0,s.dsm)("chartMenuService")],Kb.prototype,"chartMenuService",2),zv([s.o7C],Kb.prototype,"init",1);var $b=Kb,Yb=class extends s.uAl{constructor(){super('<div class="ag-chart-menu" ref="eMenu"></div>'),this.buttonListenersDestroyFuncs=[]}updateParams(e){const{buttons:t}=e;this.createButtons(t)}createButtons(e){this.buttonListenersDestroyFuncs.forEach(e=>null==e?void 0:e()),this.buttonListenersDestroyFuncs=[];const t=this.eMenu;s._.clearElement(t),e.forEach(e=>{const{buttonName:i,iconName:n,callback:s}=e,r=this.createButton(n),o=this.chartTranslationService.translate(i+"ToolbarTooltip");o&&r instanceof HTMLElement&&(r.title=o),this.buttonListenersDestroyFuncs.push(this.addManagedListener(r,"click",e=>s(e.target))),t.appendChild(r)})}createButton(e){let t=s._.createIconNoSpan(e,this.gos,void 0,!0);return t.classList.add("ag-chart-menu-icon"),this.chartMenuService.isLegacyFormat()||(t=this.wrapButton(t)),t}wrapButton(e){const t=this.gos.getDocument().createElement("button");return t.appendChild(e),t.classList.add("ag-chart-menu-toolbar-button"),t}destroy(){this.buttonListenersDestroyFuncs=[],super.destroy()}};zv([(0,s.dsm)("chartTranslationService")],Yb.prototype,"chartTranslationService",2),zv([(0,s.dsm)("chartMenuService")],Yb.prototype,"chartMenuService",2),zv([(0,s.PIB)("eMenu")],Yb.prototype,"eMenu",2);var qb=class e extends s.uAl{constructor(t,i,n){super(e.TEMPLATE),this.eChartContainer=t,this.eMenuPanelContainer=i,this.chartMenuContext=n,this.buttons={chartSettings:{iconName:"menu",callback:()=>this.showMenu({panel:this.defaultPanel})},chartData:{iconName:"menu",callback:()=>this.showMenu({panel:"chartData"})},chartFormat:{iconName:"menu",callback:()=>this.showMenu({panel:"chartFormat"})},chartLink:{iconName:"linked",callback:()=>this.chartMenuService.toggleLinked(this.chartMenuContext)},chartUnlink:{iconName:"unlinked",callback:()=>this.chartMenuService.toggleLinked(this.chartMenuContext)},chartDownload:{iconName:"save",callback:()=>this.chartMenuService.downloadChart(this.chartMenuContext)},chartMenu:{iconName:"menuAlt",callback:e=>this.showMenuList(e)}},this.panels=[],this.menuVisible=!1,this.chartController=n.chartController}postConstruct(){this.legacyFormat=this.chartMenuService.isLegacyFormat(),this.chartToolbar=this.createManagedBean(new Yb),this.getGui().appendChild(this.chartToolbar.getGui()),this.legacyFormat&&this.createLegacyToggleButton(),this.refreshToolbarAndPanels(),this.addManagedListener(this.eventService,s.sVA.EVENT_CHART_CREATED,e=>{var t;e.chartId===this.chartController.getChartId()&&Boolean(null==(t=this.gos.get("chartToolPanelsDef"))?void 0:t.defaultToolPanel)&&this.showMenu({panel:this.defaultPanel,animate:!1,suppressFocus:!0})}),this.addManagedListener(this.chartController,Py.EVENT_CHART_LINKED_CHANGED,this.refreshToolbarAndPanels.bind(this)),this.refreshMenuClasses(),this.legacyFormat&&!this.gos.get("suppressChartToolPanelsButton")&&this.panels.length>0&&(this.getGui().classList.add("ag-chart-tool-panel-button-enable"),this.eHideButton&&this.addManagedListener(this.eHideButton,"click",this.toggleMenu.bind(this))),this.legacyFormat||this.getGui().classList.add("ag-chart-menu-wrapper"),this.addManagedListener(this.chartController,Py.EVENT_CHART_API_UPDATE,this.refreshToolbarAndPanels.bind(this))}isVisible(){return this.menuVisible}getExtraPaddingDirections(){const e=[];return["chartMenu","chartLink","chartUnlink","chartDownload"].some(e=>this.chartToolbarOptions.includes(e))&&e.push("top"),["chartSettings","chartData","chartFormat"].some(e=>this.chartToolbarOptions.includes(e))&&e.push(this.gos.get("enableRtl")?"left":"right"),e}createLegacyToggleButton(){const e=this.gos.getDocument();this.eHideButton=e.createElement("button"),this.eHideButton.classList.add("ag-button","ag-chart-menu-close"),this.eHideButtonIcon=e.createElement("span"),this.eHideButtonIcon.classList.add("ag-icon","ag-icon-contracted"),this.eHideButton.appendChild(this.eHideButtonIcon),this.getGui().appendChild(this.eHideButton)}refreshToolbarAndPanels(){this.initToolbarOptionsAndPanels(),this.updateToolbar()}initToolbarOptionsAndPanels(){const{panels:e,defaultPanel:t,chartToolbarOptions:i}=this.chartMenuService.getToolbarOptionsAndPanels(this.chartController);this.panels=e,this.defaultPanel=t,this.chartToolbarOptions=i}updateToolbar(){const e=this.chartToolbarOptions.map(e=>{const{iconName:t,callback:i}=this.buttons[e];return{buttonName:e,iconName:t,callback:i}});this.chartToolbar.updateParams({buttons:e})}createMenuPanel(e){const t=this.environment.chartMenuPanelWidth(),i=this.menuPanel=this.createBean(new s.LT8({minWidth:t,width:t,height:"100%",closable:!0,hideTitleBar:!0,cssIdentifier:"chart-menu"}));return i.setParentComponent(this),this.eMenuPanelContainer.appendChild(i.getGui()),this.tabbedMenu=this.createBean(new $b(this.panels,this.chartMenuContext)),this.addManagedListener(this.tabbedMenu,$b.EVENT_CLOSED,()=>{this.hideMenu(!1)}),this.addManagedListener(i,s.uAl.EVENT_DESTROYED,()=>this.destroyBean(this.tabbedMenu)),new s.oY$(t=>{window.setTimeout(()=>{i.setBodyComponent(this.tabbedMenu),this.tabbedMenu.showTab(e),t(i),this.legacyFormat&&this.addManagedListener(this.eChartContainer,"click",e=>{this.getGui().contains(e.target)||this.menuVisible&&this.hideMenu()})},100)})}showContainer(e,t){this.menuPanel&&(this.menuVisible=!0,this.showParent(this.menuPanel.getWidth()),this.refreshMenuClasses(),this.tabbedMenu.showMenu(e,t))}toggleMenu(){this.menuVisible?this.hideMenu(this.legacyFormat):this.showMenu({animate:this.legacyFormat})}showMenu(e){const{panel:t,animate:i=!0,eventSource:n,suppressFocus:s}=e;if(i||this.eMenuPanelContainer.classList.add("ag-no-transition"),this.menuPanel&&!t)this.showContainer(n,s);else{const e=t||this.defaultPanel;let i=this.panels.indexOf(e);i<0&&(console.warn(`AG Grid: '${t}' is not a valid Chart Tool Panel name`),i=this.panels.indexOf(this.defaultPanel)),this.menuPanel?(this.tabbedMenu.showTab(i),this.showContainer(n,s)):this.createMenuPanel(i).then(()=>this.showContainer(n,s))}i||setTimeout(()=>{this.isAlive()&&this.eMenuPanelContainer.classList.remove("ag-no-transition")},500)}hideMenu(e=!0){e||this.eMenuPanelContainer.classList.add("ag-no-transition"),this.hideParent(),window.setTimeout(()=>{this.menuVisible=!1,this.refreshMenuClasses(),e||this.eMenuPanelContainer.classList.remove("ag-no-transition")},500)}refreshMenuClasses(){this.eChartContainer.classList.toggle("ag-chart-menu-visible",this.menuVisible),this.eChartContainer.classList.toggle("ag-chart-menu-hidden",!this.menuVisible),this.legacyFormat&&!this.gos.get("suppressChartToolPanelsButton")&&(this.eHideButtonIcon.classList.toggle("ag-icon-contracted",this.menuVisible),this.eHideButtonIcon.classList.toggle("ag-icon-expanded",!this.menuVisible))}showParent(e){this.eMenuPanelContainer.style.minWidth=`${e}px`}hideParent(){this.eMenuPanelContainer.style.minWidth="0"}showMenuList(e){this.chartMenuListFactory.showMenuList({eventSource:e,showMenu:()=>this.showMenu({animate:!1,eventSource:e}),chartMenuContext:this.chartMenuContext})}destroy(){super.destroy(),this.menuPanel&&this.menuPanel.isAlive()&&this.destroyBean(this.menuPanel),this.tabbedMenu&&this.tabbedMenu.isAlive()&&this.destroyBean(this.tabbedMenu)}};qb.TEMPLATE="<div></div>",zv([(0,s.dsm)("chartMenuService")],qb.prototype,"chartMenuService",2),zv([(0,s.dsm)("chartMenuListFactory")],qb.prototype,"chartMenuListFactory",2),zv([s.o7C],qb.prototype,"postConstruct",1);var Xb=qb,Zb=class e extends s.uAl{constructor(t){super(e.TEMPLATE),this.chartMenu=t,this.destroyableChartListeners=[],this.editing=!1}init(){this.addManagedListener(this.getGui(),"keydown",e=>{this.editing&&"Enter"===e.key&&!e.shiftKey&&(this.handleEndEditing(),e.preventDefault())}),this.addManagedListener(this.getGui(),"input",()=>{this.editing&&this.updateHeight()}),this.addManagedListener(this.getGui(),"blur",()=>this.endEditing())}refreshTitle(e){this.chartController=e.chartController,this.chartOptionsService=e.chartOptionsService,this.chartMenuUtils=e.chartMenuParamsFactory.getChartOptions();for(const e of this.destroyableChartListeners)e();this.destroyableChartListeners=[];const t=this.chartController.getChartProxy().getChart(),i=t.canvasElement,n=this.addManagedListener(i,"dblclick",e=>{const{title:n}=t;if(n&&n.node.containsPoint(e.offsetX,e.offsetY)){const e=n.node.computeBBox(),t=n.node.inverseTransformPoint(e.x,e.y);this.startEditing(Vv(Vv({},e),t),i.width)}});let s=!1;const r=this.addManagedListener(i,"mousemove",e=>{const{title:n}=t,r=!!(n&&n.enabled&&n.node.containsPoint(e.offsetX,e.offsetY));s!==r&&(i.style.cursor=r?"pointer":""),s=r});this.destroyableChartListeners=[n,r]}startEditing(e,t){if(this.chartMenuService.isLegacyFormat()&&this.chartMenu&&this.chartMenu.isVisible())return;if(this.editing)return;this.editing=!0;const i=Math.max(Math.min(e.width+20,t),300),n=this.getGui();n.classList.add("currently-editing");const s=n.style;s.fontFamily=this.chartMenuUtils.getValue("title.fontFamily"),s.fontWeight=this.chartMenuUtils.getValue("title.fontWeight"),s.fontStyle=this.chartMenuUtils.getValue("title.fontStyle"),s.fontSize=this.chartMenuUtils.getValue("title.fontSize")+"px",s.color=this.chartMenuUtils.getValue("title.color");const r=this.chartMenuUtils.getValue("title.text"),o=r===this.chartTranslationService.translate("titlePlaceholder");n.value=o?"":r;const a=r.split(/\r?\n/g).length;s.left=Math.round(e.x+e.width/2-i/2-1)+"px",s.top=Math.round(e.y+e.height/2-a*this.getLineHeight()/2-2)+"px",s.width=Math.round(i)+"px",s.lineHeight=this.getLineHeight()+"px",this.updateHeight(),n.focus()}updateHeight(){const e=this.getGui(),t=this.chartMenuUtils.getValue("title.text").split(/\r?\n/g).length,i=e.value.split(/\r?\n/g).length;e.style.height=Math.round(Math.max(t,i)*this.getLineHeight())+4+"px"}getLineHeight(){const e=this.chartMenuUtils.getValue("title.lineHeight");return e?parseInt(e):Math.round(1.2*parseInt(this.chartMenuUtils.getValue("title.fontSize")))}handleEndEditing(){const e=this.chartMenuUtils.getValue("title.color");this.chartMenuUtils.setValue("title.color","rgba(0, 0, 0, 0)"),this.chartOptionsService.awaitChartOptionUpdate(()=>this.endEditing()),this.chartOptionsService.awaitChartOptionUpdate(()=>{this.chartMenuUtils.setValue("title.color",e)})}endEditing(){if(!this.editing)return;this.editing=!1;const e=this.getGui().value;e&&""!==e.trim()?(this.chartMenuUtils.setValue("title.text",e),this.chartMenuUtils.setValue("title.enabled",!0)):(this.chartMenuUtils.setValue("title.text",""),this.chartMenuUtils.setValue("title.enabled",!1)),this.getGui().classList.remove("currently-editing"),this.chartOptionsService.awaitChartOptionUpdate(()=>{this.eventService.dispatchEvent({type:"chartTitleEdit"})})}};Zb.TEMPLATE='<textarea\n             class="ag-chart-title-edit"\n             style="padding:0; border:none; border-radius: 0; min-height: 0; text-align: center; resize: none;" />\n        ',zv([(0,s.dsm)("chartTranslationService")],Zb.prototype,"chartTranslationService",2),zv([(0,s.dsm)("chartMenuService")],Zb.prototype,"chartMenuService",2),zv([s.o7C],Zb.prototype,"init",1);var Qb=Zb;function Jb(e){return null!=e.chart?e.chart:e}var eS=class{constructor(e){this.chartProxyParams=e,this.clearThemeOverrides=!1,this.isEnterpriseCharts=jf.enterpriseModule.isEnterprise,this.chart=e.chartInstance,this.chartType=e.chartType,this.crossFiltering=e.crossFiltering,this.crossFilterCallback=e.crossFilterCallback,this.standaloneChartType=sy(this.chartType),null==this.chart?this.chart=Tf.create(this.getCommonChartOptions()):this.clearThemeOverrides=!0}crossFilteringReset(){}update(e){Tf.update(this.getChartRef(),this.getUpdateOptions(e,this.getCommonChartOptions(e.updatedOverrides)))}updateThemeOverrides(e){Tf.updateDelta(this.getChartRef(),{theme:{overrides:e}})}getChart(){return Jb(this.chart)}getChartRef(){return this.chart}downloadChart(e,t,i){const{chart:n}=this,s=Jb(n),r=t||(s.title?s.title.text:"chart"),{width:o,height:a}=e||{};Tf.download(n,{width:o,height:a,fileName:r,fileFormat:i})}getChartImageDataURL(e){return this.getChart().getCanvasDataURL(e)}getChartOptions(){return this.chart.getOptions()}getChartThemeOverrides(){var e;return null!=(e=this.getChartOptions().theme.overrides)?e:{}}getChartPalette(){return Bf.getChartTheme(this.getChartOptions().theme).palette}setPaired(e){const t=sy(this.chartProxyParams.chartType);Tf.updateDelta(this.chart,{theme:{overrides:{[t]:{paired:e}}}})}isPaired(){const e=sy(this.chartProxyParams.chartType);return yy(this.getChartThemeOverrides(),`${e}.paired`,!0)}lookupCustomChartTheme(e){return wy(this.chartProxyParams,e)}getSeriesGroupType(){}transformCategoryData(e,t){return e.map((e,i)=>{const n=e[t],s=n&&n.toString?n.toString():"",r=Vv({},e);return r[t]={id:i,value:n,toString:()=>s},r})}getCommonChartOptions(e){var t,i;const n=this.clearThemeOverrides?{}:null!=(i=null==(t=this.chart)?void 0:t.getOptions())?i:{},r=null!=this.chart?this.getActiveFormattingPanelOverrides():void 0;this.clearThemeOverrides=!1;const o=function(e,t,i,n,r){var o;const{chartOptionsToRestore:a,chartPaletteToRestore:l,chartThemeToRestore:c}=e,h=function(e){let t=e.getChartThemeName();const i=e.getChartThemes();return s._.includes(i,t)||(t=i[0]),t}(e),d=Cy(h),u=d?{baseTheme:h}:null!=(o=wy(e,h))?o:{},p=e.getGridOptionsChartThemeOverrides(),g=e.apiChartThemeOverrides,f=sy(e.chartType),m=e.crossFiltering?function(e,t,i){const n={listeners:{legendItemClick:t=>{e.getChart().series.forEach(e=>{e.toggleSeriesItem(t.itemId,t.enabled),e.toggleSeriesItem(`${t.itemId}-filtered-out`,t.enabled)})}}};return{[i]:{tooltip:{delay:500},legend:n,listeners:{click:e=>t.crossFilterCallback(e,!0)}}}}(t,e,f):void 0,v=[d?Sy(e,i,(()=>{const e=e=>!!e&&Object.keys(e).some(t=>yy(e[t],"title.enabled",!1));return e(p)||e(g)})()):void 0,n,m,p,g,Vv({},null!=a?a:{}),r].filter(e=>!!e).reduce((e,t)=>({baseTheme:e,overrides:t}),u);return l&&h===c&&(function(e,t){const i=(e,t)=>e.length===t.length&&e.every((e,i)=>e===t[i]);return i(e.fills,t.fills)&&i(e.strokes,t.strokes)}(l,Bf.getChartTheme(u).palette)||(v.palette=l)),v}(this.chartProxyParams,this,this.isEnterpriseCharts,this.getChartThemeDefaults(),null!=e?e:r),a=Bv(Vv({},n),{mode:"integrated"});return a.theme=o,a.container=this.chartProxyParams.parentElement,a}getChartThemeDefaults(){const e=this.getSeriesChartThemeDefaults(),t=e?{[this.standaloneChartType]:e}:{},i={enabled:!0,snap:!0,label:{enabled:!1}};return Vv({common:{navigator:{enabled:!1},zoom:{enabled:!0},animation:{enabled:!0,duration:500},axes:{number:{crosshair:i},category:{crosshair:i},log:{crosshair:i},time:{crosshair:i}}}},t)}getSeriesChartThemeDefaults(){}getActiveFormattingPanelOverrides(){var e,t;if(this.clearThemeOverrides)return{};const i=null==(e=this.chart)?void 0:e.getOptions().theme;return null!=(t=null==i?void 0:i.overrides)?t:{}}destroy({keepChartInstance:e=!1}={}){if(e)return this.chart.resetAnimations(),this.chart;this.destroyChart()}destroyChart(){this.chart&&(this.chart.destroy(),this.chart=void 0)}},tS=class extends eS{constructor(e){super(e),this.crossFilteringAllPoints=new Set,this.crossFilteringSelectedPoints=[]}getUpdateOptions(e,t){const i=this.getAxes(e,t);return Bv(Vv({},t),{data:this.getData(e,i),axes:i,series:this.getSeries(e)})}getData(e,t){const i=["area","line"].includes(this.standaloneChartType);return this.crossFiltering&&i?this.getCrossFilterData(e):this.getDataTransformedData(e,t)}getDataTransformedData(e,t){const i=t[0].type,{categories:n,data:s}=e,[r]=n;switch(i){case"category":return this.transformCategoryData(s,r.id);case"time":return this.transformTimeData(s,r.id);default:return s}}getXAxisType(e){return e.grouping?"grouped-category":this.isXAxisOfType(e,"time",e=>e instanceof Date)?"time":this.isXAxisOfType(e,"number")?"number":"category"}isXAxisOfType(e,t,i){const[n]=e.categories;if(null==n?void 0:n.chartDataType)return n.chartDataType===t;if(!i)return!1;const s=e.data[0];return!!s&&i(s[n.id])}transformTimeData(e,t){var i;return(null==(i=e[0])?void 0:i[t])instanceof Date?e:e.map(e=>{const i=e[t];return"string"==typeof i?Bv(Vv({},e),{[t]:new Date(i)}):e})}crossFilteringReset(){this.crossFilteringSelectedPoints=[],this.crossFilteringAllPoints.clear()}crossFilteringPointSelected(e){return 0==this.crossFilteringSelectedPoints.length||this.crossFilteringSelectedPoints.includes(e)}crossFilteringDeselectedPoints(){return this.crossFilteringSelectedPoints.length>0&&this.crossFilteringAllPoints.size!==this.crossFilteringSelectedPoints.length}extractLineAreaCrossFilterSeries(e,t){const[i]=t.categories,n=e=>"area"===this.standaloneChartType?t.getCrossFilteringContext().lastSelectedChartId===t.chartId?e+"-total":e:e+"-total";return e.map(e=>(e.yKey=n(e.yKey),e.listeners={nodeClick:t=>{const i=t.datum[e.xKey],n=t.event.metaKey||t.event.ctrlKey;this.crossFilteringAddSelectedPoint(n,i),this.crossFilterCallback(t)}},e.marker={formatter:e=>{const t=e.datum[i.id];return{fill:e.highlighted?"yellow":e.fill,size:e.highlighted?14:this.crossFilteringPointSelected(t)?8:0}}},"area"===this.standaloneChartType&&(e.fillOpacity=this.crossFilteringDeselectedPoints()?.3:1),"line"===this.standaloneChartType&&(e.strokeOpacity=this.crossFilteringDeselectedPoints()?.3:1),e))}getCrossFilterData(e){this.crossFilteringAllPoints.clear();const[t]=e.categories,i=e.fields[0].colId,n=`${i}-filtered-out`,s=e.getCrossFilteringContext().lastSelectedChartId;return e.data.map(r=>{const o=r[t.id];this.crossFilteringAllPoints.add(o);const a=this.crossFilteringPointSelected(o);return"area"===this.standaloneChartType&&s===e.chartId&&(r[`${i}-total`]=a?r[i]:r[i]+r[n]),"line"===this.standaloneChartType&&(r[`${i}-total`]=a?r[i]:r[i]+r[n]),r})}crossFilteringAddSelectedPoint(e,t){e?this.crossFilteringSelectedPoints.push(t):this.crossFilteringSelectedPoints=[t]}isHorizontal(e){const t=this.standaloneChartType;if("waterfall"!==t&&"box-plot"!==t&&"range-bar"!==t)return!1;const i=e.theme,n=e=>{var i,s,r;const o=null==(r=null==(s=null==(i=null==e?void 0:e.overrides)?void 0:i[t])?void 0:s.series)?void 0:r.direction;return null!=o?"horizontal"===o:"object"==typeof(null==e?void 0:e.baseTheme)&&n(e.baseTheme)};return n(i)}};function iS(e,t){const i=parseInt(e.slice(1,3),16),n=parseInt(e.slice(3,5),16),s=parseInt(e.slice(5,7),16);return t?`rgba(${i}, ${n}, ${s}, ${t})`:`rgba(${i}, ${n}, ${s})`}function nS(e,t){return e.map(e=>{const i=Uf.Color.fromString(e);return new Uf.Color(i.r,i.g,i.b,t).toHexString()})}var sS=new Set(["bar","groupedBar","stackedBar","normalizedBar"]),rS=class extends tS{constructor(e){super(e)}getAxes(e){const t=[{type:this.getXAxisType(e),position:this.isHorizontal()?"left":"bottom"},{type:"number",position:this.isHorizontal()?"bottom":"left"}];if(this.isNormalised()){const e=t[1];e.label=Bv(Vv({},e.label),{formatter:e=>Math.round(e.value)+"%"})}return t}getSeries(e){const[t]=e.categories,i=e.fields.map(e=>({type:this.standaloneChartType,direction:this.isHorizontal()?"horizontal":"vertical",stacked:this.crossFiltering||Qv(this.chartType),normalizedTo:this.isNormalised()?100:void 0,xKey:t.id,xName:t.name,yKey:e.colId,yName:e.displayName}));return this.crossFiltering?this.extractCrossFilterSeries(i):i}extractCrossFilterSeries(e){const t=this.getChartPalette(),i=(e,i)=>Bv(Vv({},e),{highlightStyle:{item:{fill:void 0}},fill:null==t?void 0:t.fills[i],stroke:null==t?void 0:t.strokes[i],listeners:{nodeClick:this.crossFilterCallback}}),n=e=>{const t=e.yKey+"-filtered-out";return Bv(Vv({},vy({},e)),{yKey:t,fill:iS(e.fill,"0.3"),stroke:iS(e.stroke,"0.3"),showInLegend:!1})},s=[];for(let t=0;t<e.length;t++){const r=i(e[t],t);s.push(r),s.push(n(r))}return s}isNormalised(){return!this.crossFiltering&&s._.includes(["normalizedColumn","normalizedBar"],this.chartType)}isHorizontal(){return sS.has(this.chartType)}},oS=class extends tS{constructor(e){super(e)}getAxes(e){const t=[{type:this.getXAxisType(e),position:"bottom"},{type:"number",position:"left"}];if(this.isNormalised()){const e=t[1];e.label=Bv(Vv({},e.label),{formatter:e=>Math.round(e.value)+"%"})}return t}getSeries(e){const[t]=e.categories,i=e.fields.map(e=>({type:this.standaloneChartType,xKey:t.id,xName:t.name,yKey:e.colId,yName:e.displayName,normalizedTo:"normalizedArea"===this.chartType?100:void 0,stacked:["normalizedArea","stackedArea"].includes(this.chartType)}));return this.crossFiltering?this.extractLineAreaCrossFilterSeries(i,e):i}isNormalised(){return!this.crossFiltering&&"normalizedArea"===this.chartType}},aS=class extends tS{constructor(e){super(e)}getAxes(e){return[{type:this.getXAxisType(e),position:"bottom"},{type:"number",position:"left"}]}getSeries(e){const[t]=e.categories,i=e.fields.map(e=>({type:this.standaloneChartType,xKey:t.id,xName:t.name,yKey:e.colId,yName:e.displayName}));return this.crossFiltering?this.extractLineAreaCrossFilterSeries(i,e):i}},lS=class extends eS{constructor(e){super(e)}getAxes(e){const t="radial-bar"===this.standaloneChartType;return[{type:t?"angle-number":"angle-category"},{type:t?"radius-category":"radius-number"}]}getSeries(e){const{fields:t,categories:i,seriesGroupType:n}=e,[s]=i,r="radial-bar"===this.standaloneChartType,o=this.getSeriesGroupTypeOptions(n);return t.map(e=>{var t,i;return Vv({type:this.standaloneChartType,angleKey:r?e.colId:s.id,angleName:r?null!=(t=e.displayName)?t:void 0:s.name,radiusKey:r?s.id:e.colId,radiusName:r?s.name:null!=(i=e.displayName)?i:void 0},o)})}getSeriesGroupType(){var e,t;const i=this.standaloneChartType;if(!["nightingale","radial-bar","radial-column"].includes(i))return;const n=null==(t=null==(e=this.getChart().series)?void 0:e[0])?void 0:t.properties.toJson(),s=()=>n.normalizedTo?"normalized":"stacked";return"nightingale"===i?n.grouped?"grouped":s():n.stacked?s():"grouped"}getUpdateOptions(e,t){const i=this.getAxes(e);return Bv(Vv({},t),{data:this.getData(e,i),axes:i,series:this.getSeries(e)})}getData(e,t){if(t.some(e=>"angle-category"===e.type||"radius-category"===e.type)){const[t]=e.categories;return this.transformCategoryData(e.data,t.id)}return e.data}getSeriesGroupTypeOptions(e){return e?{grouped:"grouped"===e||void 0,stacked:"grouped"!==e||void 0,normalizedTo:"normalized"===e?100:void 0}:{}}},cS=class e extends eS{constructor(e){super(e)}getUpdateOptions(e,t){return Bv(Vv({},t),{data:this.crossFiltering?this.getCrossFilterData(e):e.data,series:this.getSeries(e)})}getSeries(t){const[i]=t.categories,n=t.fields.length,s={currentOffset:0,offsetAmount:n>1?20:40},r=this.getFields(t).map(t=>{var r;const o={type:this.standaloneChartType,angleKey:t.colId,angleName:t.displayName,sectorLabelKey:t.colId,calloutLabelName:i.name,calloutLabelKey:i.id};if("donut"===this.chartType||"doughnut"===this.chartType){const{outerRadiusOffset:i,innerRadiusOffset:a}=e.calculateOffsets(s),l=t.displayName?{title:{text:t.displayName,showInLegend:n>1}}:void 0;return Bv(Vv(Bv(Vv({},o),{type:"donut",outerRadiusOffset:i,innerRadiusOffset:a}),l),{calloutLine:{colors:null==(r=this.getChartPalette())?void 0:r.strokes}})}return o});return this.crossFiltering?this.extractCrossFilterSeries(r):r}getCrossFilterData(e){const t=e.fields[0].colId,i=`${t}-filtered-out`;return e.data.map(e=>{const n=e[t]+e[i];return e[`${t}-total`]=n,e[i]=1,e[t]=e[t]/n,e})}extractCrossFilterSeries(e){const t=this.getChartPalette(),i=e[0],n=i.angleKey,s=(e=>Bv(Vv({},e),{legendItemKey:e.calloutLabelKey,calloutLabel:{enabled:!1},highlightStyle:{item:{fill:void 0}},radiusKey:e.angleKey,angleKey:e.angleKey+"-total",radiusMin:0,radiusMax:1,listeners:{nodeClick:this.crossFilterCallback}}))(i);return[(r=i,o=n,Bv(Vv({},vy({},s)),{radiusKey:o+"-filtered-out",fills:nS(null!=(a=r.fills)?a:t.fills,.3),strokes:nS(null!=(l=r.strokes)?l:t.strokes,.3),showInLegend:!1})),s];var r,o,a,l}static calculateOffsets(e){const t=e.currentOffset;e.currentOffset-=e.offsetAmount;const i=e.currentOffset;return e.currentOffset-=e.offsetAmount,{outerRadiusOffset:t,innerRadiusOffset:i}}getFields(e){return"pie"===this.chartType?e.fields.slice(0,1):e.fields}},hS=class extends tS{constructor(e){super(e)}getAxes(e){return[{type:"number",position:"bottom"},{type:"number",position:"left"}]}getSeries(e){const[t]=e.categories,i=this.isPaired(),n=this.getSeriesDefinitions(e.fields,i),s=t.id===hy.DEFAULT_CATEGORY?void 0:t,r=n.map(e=>{var t,i,n,r,o;return(null==e?void 0:e.sizeField)?{type:"bubble",xKey:e.xField.colId,xName:null!=(t=e.xField.displayName)?t:void 0,yKey:e.yField.colId,yName:null!=(i=e.yField.displayName)?i:void 0,title:`${e.yField.displayName} vs ${e.xField.displayName}`,sizeKey:e.sizeField.colId,sizeName:null!=(n=e.sizeField.displayName)?n:"",labelKey:s?s.id:e.yField.colId,labelName:s?s.name:void 0}:{type:"scatter",xKey:e.xField.colId,xName:null!=(r=e.xField.displayName)?r:void 0,yKey:e.yField.colId,yName:null!=(o=e.yField.displayName)?o:void 0,title:`${e.yField.displayName} vs ${e.xField.displayName}`,labelKey:s?s.id:e.yField.colId,labelName:s?s.name:void 0}});return this.crossFiltering?this.extractCrossFilterSeries(r,e):r}extractCrossFilterSeries(e,t){const{data:i}=t,n=this.getChartPalette(),s=e=>`${e}-filtered-out`,r=e.map((e,t)=>{const r=null==n?void 0:n.fills[t],o=null==n?void 0:n.strokes[t];let a;if("bubble"===e.type){const{sizeKey:t}=e;a=((e,t)=>{var i;const n=[1/0,-1/0];if(null!=t)for(const r of e){const e=null!=(i=r[t])?i:r[s(t)];e<n[0]&&(n[0]=e),e>n[1]&&(n[1]=e)}if(n[0]<=n[1])return n})(i,t)}const l=Bv(Vv({},e.marker),{fill:r,stroke:o,domain:a});return Bv(Vv({},e),{marker:l,highlightStyle:{item:{fill:"yellow"}},listeners:Bv(Vv({},e.listeners),{nodeClick:this.crossFilterCallback})})});return[...r,...r.map(e=>{let{yKey:t,xKey:i}=e,n={};return"bubble"===e.type&&(n={sizeKey:s(e.sizeKey)}),Bv(Vv(Vv({},e),n),{yKey:s(t),xKey:s(i),marker:Bv(Vv({},e.marker),{fillOpacity:.3,strokeOpacity:.3}),showInLegend:!1,listeners:Bv(Vv({},e.listeners),{nodeClick:e=>{const t=e.datum[s(i)],n=Bv(Vv({},e),{xKey:i,datum:Bv(Vv({},e.datum),{[i]:t})});this.crossFilterCallback(n)}})})})]}getSeriesDefinitions(e,t){if(e.length<2)return[];const i="bubble"===this.chartType;if(t)return i?e.map((t,i)=>i%3==0?{xField:t,yField:e[i+1],sizeField:e[i+2]}:null).filter(e=>e&&e.yField&&e.sizeField):e.map((t,i)=>i%2==0?{xField:t,yField:e[i+1]}:null).filter(e=>e&&e.yField);const n=e[0];return i?e.map((t,i)=>i%2==1?{xField:n,yField:t,sizeField:e[i+1]}:null).filter(e=>e&&e.sizeField):e.filter((e,t)=>t>0).map(e=>({xField:n,yField:e}))}},dS=class extends tS{constructor(e){super(e)}getAxes(e,t){return[{type:this.getXAxisType(e),position:this.isHorizontal(t)?"left":"bottom"},{type:"number",position:this.isHorizontal(t)?"bottom":"left"}]}computeSeriesStatistics(e,t){const{data:i,fields:n}=e,[s]=e.categories,r=s.id||hy.DEFAULT_CATEGORY,o=this.groupDataByCategory(r,i);return Array.from(o).map(([e,i])=>{const r={[s.id]:e};return n.forEach((e,n)=>{const s=i.map(t=>t[e.colId]).filter(e=>"number"==typeof e&&!isNaN(e));Object.entries(t(s)).forEach(([e,t])=>{r[`${e}:${n}`]=s.length>0?t:null})}),r})}groupDataByCategory(e,t){return t.reduce((t,i)=>{let n=(t=>{if(e===hy.DEFAULT_CATEGORY)return 1;const i=t[e];return null==i?"":i instanceof Date?i.getTime():i})(i);const s=t.get(n);return s?s.push(i):t.set(n,[i]),t},new Map)}},uS=class extends dS{constructor(e){super(e)}getSeries(e){const[t]=e.categories;return e.fields.map((e,i)=>{var n;return{type:this.standaloneChartType,xKey:t.id,xName:t.name,yName:null!=(n=e.displayName)?n:void 0,yLowName:"Min",yHighName:"Max",yLowKey:`min:${i}`,yHighKey:`max:${i}`}})}getData(e){return this.computeSeriesStatistics(e,e=>({min:Math.min(...e),max:Math.max(...e)}))}},pS=class extends tS{constructor(e){super(e)}getSeries(e){const t=e.fields[0];return[{type:this.standaloneChartType,xKey:t.colId,xName:t.displayName,yName:this.chartProxyParams.translate("histogramFrequency"),areaPlot:!1}]}getAxes(e){return[{type:"number",position:"bottom"},{type:"number",position:"left"}]}},gS=class extends dS{constructor(e){super(e)}getSeries(e){const[t]=e.categories;return e.fields.map((e,i)=>{var n;return{type:this.standaloneChartType,xKey:t.id,xName:t.name,yName:null!=(n=e.displayName)?n:void 0,minName:"Min",q1Name:"Q1",medianName:"Median",q3Name:"Q3",maxName:"Max",minKey:`min:${i}`,q1Key:`q1:${i}`,medianKey:`median:${i}`,q3Key:`q3:${i}`,maxKey:`max:${i}`}})}getData(e){return this.computeSeriesStatistics(e,e=>{const t=e.sort((e,t)=>e-t);return{min:t[0],q1:this.quantile(t,.25),median:this.quantile(t,.5),q3:this.quantile(t,.75),max:t[t.length-1]}})}quantile(e,t){const i=(e.length-1)*t,n=Math.floor(i),s=i-n;return void 0!==e[n+1]?e[n]+s*(e[n+1]-e[n]):e[n]}},fS=class extends eS{constructor(e){super(e)}getUpdateOptions(e,t){const i="AG-GRID-DEFAULT-HEATMAP-SERIES-KEY",n="AG-GRID-DEFAULT-HEATMAP-VALUE-KEY",s="AG-GRID-DEFAULT-HEATMAP-CATEGORY-KEY";return Bv(Vv({},t),{series:this.getSeries(e,i,n,s),data:this.getData(e,i,n,s)})}getSeries(e,t,i,n){const[s]=e.categories;return[{type:this.standaloneChartType,yKey:n,xKey:t,colorKey:i,yName:s.name,xName:void 0,colorName:void 0}]}getData(e,t,i,n){const[s]=e.categories;return r=e.data,o=(r,o)=>{const a=r[s.id],l=null==a?"":String(a),c={id:o,value:a,toString:()=>l};return e.fields.map(({colId:e,displayName:s})=>Bv(Vv({},r),{[t]:s,[i]:r[e],[n]:c}))},r.reduce((e,t,i,n)=>e.concat(o(t,i)),new Array);var r,o}getSeriesChartThemeDefaults(){return{gradientLegend:{gradient:{preferredLength:200}},series:{tooltip:{renderer:mS}}}}};function mS(e){const{xKey:t,yKey:i,colorKey:n,yName:s,datum:r}=e;return{title:"",content:[{label:s,value:r[i]},{label:r[t],value:n&&r[n]}].map(({label:e,value:t})=>`<b>${vS(String(e))}:</b> ${vS(String(t))}`).join("<br>")}}function vS(e){const t={"&":"&amp;","<":"&lt;",">":"&gt;"},i=`[${Object.keys(t).join("")}]`,n=new RegExp(i,"g");return e.replace(n,e=>t[e])}var yS=class extends tS{constructor(e){super(e)}getAxes(e,t){return[{type:this.getXAxisType(e),position:this.isHorizontal(t)?"left":"bottom"},{type:"number",position:this.isHorizontal(t)?"bottom":"left"}]}getSeries(e){var t;const[i]=e.categories,[n]=e.fields;return[{type:this.standaloneChartType,xKey:i.id,xName:i.name,yKey:n.colId,yName:null!=(t=n.displayName)?t:void 0}]}},CS=["number","category","time","grouped-category"],bS=[...CS,"angle-category","angle-number","radius-category","radius-number"],SS=class e extends s.XQb{constructor(e){super(),this.chartController=e}getChartThemeOverridesProxy(){return{getValue:e=>this.getChartOption(e),setValue:(e,t)=>this.setChartThemeOverrides([{expression:e,value:t}]),setValues:e=>this.setChartThemeOverrides(e)}}getAxisThemeOverridesProxy(){return{getValue:e=>this.getAxisProperty(e),setValue:(e,t)=>this.setAxisThemeOverrides([{expression:e,value:t}]),setValues:e=>this.setAxisThemeOverrides(e)}}getCartesianAxisOptionsProxy(e){return{getValue:t=>this.getCartesianAxisProperty(e,t),setValue:(t,i)=>this.setCartesianAxisOptions(e,[{expression:t,value:i}]),setValues:t=>this.setCartesianAxisOptions(e,t)}}getCartesianAxisThemeOverridesProxy(e){return{getValue:t=>this.getCartesianAxisProperty(e,t),setValue:(t,i)=>this.setCartesianAxisThemeOverrides(e,[{expression:t,value:i}]),setValues:t=>this.setCartesianAxisThemeOverrides(e,t)}}getCartesianAxisAppliedThemeOverridesProxy(e){return{getValue:t=>this.getCartesianAxisThemeOverride(e,"*"===t?null:t),setValue:(t,i)=>this.setCartesianAxisThemeOverrides(e,[{expression:"*"===t?null:t,value:i}]),setValues:t=>this.setCartesianAxisThemeOverrides(e,t)}}getSeriesOptionsProxy(e){return{getValue:(t,i)=>this.getSeriesOption(e(),t,i),setValue:(t,i)=>this.setSeriesOptions(e(),[{expression:t,value:i}]),setValues:t=>this.setSeriesOptions(e(),t)}}getPersistedChartThemeOverrides(e,t,i,n){const s=this.getRetainedChartThemeOverrideKeys(i,n),r=this.getRetainedChartAxisThemeOverrideKeys(null,i,n),o=this.createChartOptions();for(const t of s){const s=this.retrieveChartOptionsThemeOverride(e,i,t);void 0!==s&&this.assignChartOptionsThemeOverride(o,n,t,s)}return t&&this.assignPersistedAxisOverrides({existingAxes:t,retainedChartAxisThemeOverrideKeys:r,existingChartOptions:e,targetChartOptions:o,existingChartType:i,targetChartType:n}),o.theme.overrides}assignPersistedAxisOverrides(e){const{existingAxes:t,retainedChartAxisThemeOverrideKeys:i,existingChartOptions:n,targetChartOptions:s,existingChartType:r,targetChartType:o}=e;for(const{expression:e,targetAxisTypes:a}of i)for(const i of t.map(e=>e.type)){const t=this.retrieveChartOptionsThemeOverride(n,r,["axes",i,e].join("."));if(void 0!==t)for(const i of a)this.assignChartOptionsThemeOverride(s,o,["axes",i,e].join("."),t)}}getRetainedChartThemeOverrideKeys(e,t){const i=["zoom","navigator"];return["animation",...((e,t)=>{const n=new Array;return Jv(sy(e))&&Jv(sy(t))&&n.push(...i),n})(e,t)]}getRetainedChartAxisThemeOverrideKeys(e,t,i){return Jv(sy(t))&&Jv(sy(i))?this.getRetainedCartesianAxisThemeOverrideKeys(e).map(e=>({expression:e,targetAxisTypes:CS})):[]}getRetainedCartesianAxisThemeOverrideKeys(e){const t="xAxis"===e?["",".top",".bottom"]:"yAxis"===e?["",".left",".right"]:["",".left",".right",".top",".bottom"],i=["crosshair"],n=new Array;for(const e of i)for(const i of t)n.push(`${e}${i}`);return n}getChartOption(e){return yy(this.getChart(),e,void 0)}setChartThemeOverrides(e){const t=this.getChartType(),i=this.createChartOptions();for(const{expression:n,value:s}of e)this.assignChartOptionsThemeOverride(i,t,n,s);this.applyChartOptions(i)}applyChartOptions(e,t){0!==Object.keys(e).length&&(this.updateChart(e),!(null==t?void 0:t.silent)&&this.raiseChartOptionsChangedEvent())}awaitChartOptionUpdate(e){this.chartController.getChartProxy().getChart().waitForUpdate().then(()=>e()).catch(e=>console.error("AG Grid - chart update failed",e))}getAxisProperty(e){var t;return yy(null==(t=this.getChart().axes)?void 0:t[0],e,void 0)}setAxisThemeOverrides(e){var t;const i=this.getChart(),n=this.getChartType();let s=this.createChartOptions();for(const{expression:r,value:o}of e){const e=null==(t=i.axes)?void 0:t.filter(e=>{const t=r.split(".");let i=e;for(const e of t){if(!(e in i))return!1;i=i[e]}return!0});if(e)for(const t of e)this.isValidAxisType(t)&&this.assignChartAxisThemeOverride(s,n,t.type,null,r,o)}this.applyChartOptions(s)}getCartesianAxisProperty(e,t){const i=this.getChartAxes();return yy(this.getCartesianAxis(i,e),t,void 0)}getCartesianAxisThemeOverride(e,t){const i=this.getChartAxes(),n=this.getCartesianAxis(i,e);if(!n||!this.isValidAxisType(n))return;const s=this.getChartType(),r=this.getChart().getOptions();return this.retrieveChartAxisThemeOverride(r,s,n.type,"yAxis"===e?["left","right"]:["bottom","top"],t)}setCartesianAxisThemeOverrides(e,t){const i=this.getChartAxes(),n=this.getCartesianAxis(i,e);if(!n||!this.isValidAxisType(n))return;const s=this.getChartType();let r=this.createChartOptions();for(const{expression:i,value:o}of t)this.assignChartAxisThemeOverride(r,s,n.type,"yAxis"===e?["left","right"]:["bottom","top"],i,o);this.applyChartOptions(r)}setCartesianAxisOptions(e,t){this.updateCartesianAxisOptions(e,(e,i,n)=>{const s=i.indexOf(n);for(const{expression:i,value:n}of t)this.assignChartOption(e,`axes.${s}.${i}`,n)})}updateCartesianAxisOptions(e,t){const i=this.getChart().getOptions(),n="axes"in i?i.axes:void 0;if(!i||!n)return;const s=this.getChartAxes(),r=this.getCartesianAxis(s,e);if(!r)return;let o=this.createChartOptions();o.axes=n,t(o,s,r,i),this.applyChartOptions(o)}setCartesianCategoryAxisType(e,t){this.updateCartesianAxisOptions(e,(i,n,s,r)=>{const o=this.getChartType();this.assignPersistedAxisOverrides({existingAxes:[s],retainedChartAxisThemeOverrideKeys:this.getRetainedChartAxisThemeOverrideKeys(e,o,o),existingChartOptions:r,targetChartOptions:i,existingChartType:o,targetChartType:o}),this.assignChartOption(i,"axes.0.type",t),this.chartController.setCategoryAxisType(t)})}getCartesianAxis(e,t){if(!(e.length<2))switch(t){case"xAxis":return"x"===e[0].direction?e[0]:e[1];case"yAxis":return"y"===e[1].direction?e[1]:e[0]}}getSeriesOption(t,i,n){const s=this.getChart().series.find(i=>e.isMatchingSeries(t,i));return yy(n?s:null==s?void 0:s.properties.toJson(),i,void 0)}setSeriesOptions(e,t){let i=this.createChartOptions();for(const{expression:n,value:s}of t)this.assignChartOptionsSeriesThemeOverride(i,e,`series.${n}`,s);this.applyChartOptions(i)}getPairedMode(){return this.chartController.getChartProxy().isPaired()}setPairedMode(e){this.chartController.getChartProxy().setPaired(e)}getChartAxes(){var e;return null!=(e=this.getChart().axes)?e:[]}retrieveChartAxisThemeOverride(e,t,i,n,s){if(!n)return this.retrieveChartOptionsThemeOverride(e,t,["axes",i,...s?[s]:[]].join("."));for(const r of n){const n=this.retrieveChartOptionsThemeOverride(e,t,["axes",i,r,...s?[s]:[]].join("."));if(void 0!==n)return n}}assignChartAxisThemeOverride(e,t,i,n,s,r){if(n)for(const o of n)this.assignChartOptionsThemeOverride(e,t,["axes",i,o,...s?[s]:[]].join("."),r);else this.assignChartOptionsThemeOverride(e,t,["axes",i,...s?[s]:[]].join("."),r)}isValidAxisType(e){return bS.includes(e.type)}getChartType(){return this.chartController.getChartType()}getChart(){return this.chartController.getChartProxy().getChart()}updateChart(e){const t=this.chartController.getChartProxy().getChartRef();t.skipAnimations(),Tf.updateDelta(t,e)}createChartOptions(){return{theme:{overrides:{}}}}retrieveChartOptionsThemeOverride(e,t,i){const n=this.getChartThemeOverridesSeriesTypeKeys(t);for(const t of n){const n=this.retrieveChartOptionsSeriesThemeOverride(e,t,i);if(void 0!==n)return n}}assignChartOptionsThemeOverride(e,t,i,n){const s=this.getChartThemeOverridesSeriesTypeKeys(t);for(const t of s)this.assignChartOptionsSeriesThemeOverride(e,t,i,n)}retrieveChartOptionsSeriesThemeOverride(e,t,i){return this.retrieveChartOption(e,["theme","overrides",t,...i?[i]:[]].join("."))}assignChartOptionsSeriesThemeOverride(e,t,i,n){this.assignChartOption(e,["theme","overrides",t,...i?[i]:[]].join("."),n)}getChartThemeOverridesSeriesTypeKeys(e){const t=this.chartController.getChartSeriesTypes(e);return this.chartController.isComboChart()&&t.push("common"),t}retrieveChartOption(e,t){return yy(e,t,void 0)}assignChartOption(e,t,i){!function(e,t,i){if(null==e)return;const n=t.split(".");let s=e;n.forEach((e,t)=>{s[e]||(s[e]={}),t<n.length-1&&(s=s[e])}),s[n[n.length-1]]=i}(e,t,i)}raiseChartOptionsChangedEvent(){const e=this.chartController.getChartModel(),t={type:s.sVA.EVENT_CHART_OPTIONS_CHANGED,chartId:e.chartId,chartType:e.chartType,chartThemeName:this.chartController.getChartThemeName(),chartOptions:e.chartOptions};this.eventService.dispatchEvent(t)}static isMatchingSeries(e,t){return function(e){return!!Yv[e]}(e)&&t.type===e}destroy(){super.destroy()}},wS=class extends tS{constructor(e){super(e)}getAxes(e){const t=e?e.fields:[],i=new Map(t.map(e=>[e.colId,e])),{primaryYKeys:n,secondaryYKeys:s}=this.getYKeys(t,e.seriesChartTypes),r=[{type:this.getXAxisType(e),position:"bottom"}];return n.length>0&&r.push({type:"number",keys:n,position:"left"}),s.length>0&&s.forEach(e=>{const t=i.get(e);if(!t||t.colId!==e)return;const n={type:"number",keys:[e],position:"right"};r.push(n)}),r}getSeries(e){const{fields:t,seriesChartTypes:i}=e,[n]=e.categories;return t.map(e=>{const t=i.find(t=>t.colId===e.colId);if(t){const i=t.chartType,s=["groupedColumn","groupedBar"].includes(i)?{grouped:!0}:{};return Vv({type:sy(i),xKey:n.id,yKey:e.colId,yName:e.displayName,stacked:["stackedArea","stackedColumn"].includes(i)},s)}})}getYKeys(e,t){const i=[],n=[];return e.forEach(e=>{const s=e.colId,r=t.find(e=>e.colId===s);r&&(r.secondaryAxis?n.push(s):i.push(s))}),{primaryYKeys:i,secondaryYKeys:n}}},xS=["chartSettings","chartData","chartFormat"],ES=["chartUnlink","chartLink","chartDownload"],MS={settings:"chartSettings",data:"chartData",format:"chartFormat"},AS=class extends s.XQb{isLegacyFormat(){return!this.chartService.isEnterprise()}downloadChart(e,t,i,n){e.chartController.getChartProxy().downloadChart(t,i,n)}toggleLinked(e){e.chartController.detachChartRange()}openAdvancedSettings(e,t){this.advancedSettingsMenuFactory.showMenu(e,t)}hideAdvancedSettings(){this.advancedSettingsMenuFactory.hideMenu()}getToolbarOptionsAndPanels(e){var t,i,n;const r=this.isLegacyFormat();let o,a,l;if(Boolean(this.gos.get("chartToolPanelsDef"))||!r){const c=r?[e.isChartLinked()?"chartLink":"chartUnlink","chartDownload"]:["chartMenu"],h=this.gos.getCallback("getChartToolbarItems");l=h?h({defaultItems:c}).filter(e=>{if(!(r?ES:[...ES,"chartMenu"]).includes(e)){let t;return t=xS.includes(e)?`'${e}' is a Chart Tool Panel option and will be ignored since 'chartToolPanelsDef' is used. Please use 'chartToolPanelsDef.panels' grid option instead`:"chartMenu"===e?"'chartMenu' is only allowed as a Chart Toolbar Option when using AG Charts Enterprise":`'${e}' is not a valid Chart Toolbar Option`,s._.warnOnce(t),!1}return!0}):c;const d=null==(i=null==(t=this.gos.get("chartToolPanelsDef"))?void 0:t.panels)?void 0:i.map(e=>{const t=MS[e];return t||s._.warnOnce(`Invalid panel in chartToolPanelsDef.panels: '${e}'`),t}).filter(e=>Boolean(e));o=d||Object.values(MS),e.isPivotChart()&&(o=o.filter(e=>"chartData"!==e));const u=null==(n=this.gos.get("chartToolPanelsDef"))?void 0:n.defaultToolPanel;a=u&&MS[u]||o[0],r&&(l=o.length>0?[o[0],...l]:l)}else{let t=["chartSettings","chartData","chartFormat",e.isChartLinked()?"chartLink":"chartUnlink","chartDownload"];const i=this.gos.getCallback("getChartToolbarItems");if(i){const e=this.gos.get("suppressChartToolPanelsButton");t=i({defaultItems:e?t:ES}).filter(t=>{if(!xS.includes(t)&&!ES.includes(t))return s._.warnOnce(`'${t}' is not a valid Chart Toolbar Option`),!1;if(!e&&xS.includes(t)){const e=`'${t}' is a Chart Tool Panel option and will be ignored. Please use 'chartToolPanelsDef.panels' grid option instead`;return s._.warnOnce(e),!1}return!0}),e||(t=t.concat(xS))}e.isPivotChart()&&(t=t.filter(e=>"chartData"!==e));const n=["chartUnlink","chartLink","chartDownload"];o=t.filter(e=>-1===n.indexOf(e)),a=o[0],l=t.filter(e=>-1!==n.indexOf(e)||o.length&&e===o[0])}return{panels:o,defaultPanel:a,chartToolbarOptions:l}}doesChartToolbarExist(e){const{chartToolbarOptions:t}=this.getToolbarOptionsAndPanels(e);return["chartMenu",...ES].some(e=>t.includes(e))}doChartToolPanelsExist(e){const{panels:t}=this.getToolbarOptionsAndPanels(e);return t.length>0}};zv([(0,s.dsm)("chartService")],AS.prototype,"chartService",2),zv([(0,s.dsm)("advancedSettingsMenuFactory")],AS.prototype,"advancedSettingsMenuFactory",2),AS=zv([(0,s.dR4)("chartMenuService")],AS);var TS="AG-GRID-DEFAULT-LABEL-KEY";function DS(e,t=null,i){const{depth:n,rootValues:s,value:r,children:o}=e;if(s)return s.map(e=>Vv({[TS]:t},e));if(0===n)return[Vv({[TS]:t},r)];const a=[];for(const[e,t]of o.entries())a.push(...DS(t,e,!0));return i?[Vv({[TS]:t,children:a},null!=r?r:{})]:a}function IS(e,t,i){const n={depth:0,children:new Map};return e.forEach(e=>{s(e,t(e),i,0,n)}),n;function s(e,t,i,n,r){if(n===t)return 0===n?(r.rootValues||(r.rootValues=[]),r.rootValues.push(e)):r.value=e,r;{const o=i(e,n),a=s(e,t,i,n+1,r.children.get(o)||{depth:0,children:new Map});return r.children.set(o,a),r.depth=Math.max(1+a.depth,r.depth),r}}}var RS=class extends eS{constructor(e){super(e)}getUpdateOptions(e,t){const{fields:i}=e,[n,s]=i;return Bv(Vv({},t),{series:this.getSeries(n,s),data:this.getData(e,n,s)})}getSeriesChartThemeDefaults(){return{gradientLegend:{gradient:{preferredLength:200}}}}getSeries(e,t){var i,n;return[{type:this.standaloneChartType,labelKey:TS,sizeKey:null==e?void 0:e.colId,sizeName:null!=(i=null==e?void 0:e.displayName)?i:void 0,colorKey:null==t?void 0:t.colId,colorName:null!=(n=null==t?void 0:t.displayName)?n:void 0}]}getData(e,t,i){var n;const{categories:r,data:o,groupData:a,grouping:l}=e;return l?function(e,t){return DS(IS(e,function(e){var i,n;return null!=(n=null==(i=t(e))?void 0:i.length)?n:0},function(e,i){const n=t(e);return n?n[n.length-1-i]:null}))}(i?o.concat(null!=(n=null==a?void 0:a.map(e=>{const i=Vv({},e);return delete i[t.colId],i}))?n:[]):o,e=>{var t,i;return null!=(i=null==(t=e[s.JPk])?void 0:t.labels)?i:null}):function(e,t){return DS(IS(e,function(e){return t.length},function(e,i){return null==(n=e[t[i]])?null:String(n);var n}))}(o,r.map(({id:e})=>e))}},LS=class e extends s.uAl{constructor(t){super(e.TEMPLATE),this.params=t}init(){const e=Bv(Vv({},this.params),{chartType:iy(this.params.chartType),chartThemeName:this.getThemeName()}),t=this.gos.get("enableRtl");this.addCssClass(t?"ag-rtl":"ag-ltr");const i=this.createBean(new hy(e));this.chartController=this.createManagedBean(new Py(i)),this.chartOptionsService=this.createManagedBean(new SS(this.chartController)),this.validateCustomThemes(),this.createChart(),this.params.insideDialog&&this.addDialog(),this.addMenu(),this.addTitleEditComp(),this.addManagedListener(this.getGui(),"focusin",this.setActiveChartCellRange.bind(this)),this.addManagedListener(this.chartController,Py.EVENT_CHART_MODEL_UPDATE,this.update.bind(this)),this.addManagedPropertyListeners(["chartThemeOverrides","chartThemes"],this.reactivePropertyUpdate.bind(this)),this.update(),this.raiseChartCreatedEvent()}createChart(){var t;let i;this.chartProxy&&(i=this.chartProxy.destroy({keepChartInstance:!0}));const n=this.chartController.getChartType(),s={chartType:n,chartInstance:i,getChartThemeName:this.getChartThemeName.bind(this),getChartThemes:this.getChartThemes.bind(this),customChartThemes:this.gos.get("customChartThemes"),getGridOptionsChartThemeOverrides:()=>this.getGridOptionsChartThemeOverrides(),getExtraPaddingDirections:()=>{var e,t;return null!=(t=null==(e=this.chartMenu)?void 0:e.getExtraPaddingDirections())?t:[]},apiChartThemeOverrides:this.params.chartThemeOverrides,crossFiltering:null!=(t=this.params.crossFiltering)&&t,crossFilterCallback:(e,t)=>{this.params.crossFilteringContext.lastSelectedChartId=t?"":this.chartController.getChartId(),t&&this.params.crossFilteringResetCallback(),this.crossFilterService.filter(e,t)},parentElement:this.eChart,grouping:this.chartController.isGrouping(),chartThemeToRestore:this.params.chartThemeName,chartOptionsToRestore:this.params.chartOptionsToRestore,chartPaletteToRestore:this.params.chartPaletteToRestore,seriesChartTypes:this.chartController.getSeriesChartTypes(),translate:e=>this.chartTranslationService.translate(e)};if(this.params.chartOptionsToRestore=void 0,this.chartType=n,this.chartProxy=e.createChartProxy(s),!this.chartProxy)return void console.warn("AG Grid: invalid chart type supplied: ",s.chartType);const r=this.eChart.querySelector("canvas");r&&r.classList.add("ag-charts-canvas"),this.chartController.setChartProxy(this.chartProxy),this.createMenuContext(),this.titleEdit&&this.titleEdit.refreshTitle(this.chartMenuContext)}createMenuContext(){if(this.chartMenuContext)return;const e=this.createManagedBean(new oC(this.chartOptionsService.getChartThemeOverridesProxy())),t=this.createManagedBean(new oC(this.chartOptionsService.getAxisThemeOverridesProxy()));this.chartMenuContext={chartController:this.chartController,chartOptionsService:this.chartOptionsService,chartMenuParamsFactory:e,chartAxisMenuParamsFactory:t}}getChartThemeName(){return this.chartController.getChartThemeName()}getChartThemes(){return this.chartController.getThemeNames()}getGridOptionsChartThemeOverrides(){return this.gos.get("chartThemeOverrides")}static createChartProxy(e){switch(e.chartType){case"column":case"bar":case"groupedColumn":case"stackedColumn":case"normalizedColumn":case"groupedBar":case"stackedBar":case"normalizedBar":return new rS(e);case"pie":case"donut":case"doughnut":return new cS(e);case"area":case"stackedArea":case"normalizedArea":return new oS(e);case"line":return new aS(e);case"scatter":case"bubble":return new hS(e);case"histogram":return new pS(e);case"radarLine":case"radarArea":case"nightingale":case"radialColumn":case"radialBar":return new lS(e);case"rangeBar":case"rangeArea":return new uS(e);case"boxPlot":return new gS(e);case"treemap":case"sunburst":return new RS(e);case"heatmap":return new fS(e);case"waterfall":return new yS(e);case"columnLineCombo":case"areaColumnCombo":case"customCombo":return new wS(e);default:throw`AG Grid: Unable to create chart as an invalid chartType = '${e.chartType}' was supplied.`}}addDialog(){const e=this.chartTranslationService.translate(this.params.pivotChart?"pivotChartTitle":"rangeChartTitle"),{width:t,height:i}=this.getBestDialogSize();this.chartDialog=new s.fNJ({resizable:!0,movable:!0,maximizable:!0,title:e,width:t,height:i,component:this,centered:!0,closable:!0}),this.getContext().createBean(this.chartDialog),this.chartDialog.addEventListener(s.fNJ.EVENT_DESTROYED,()=>{this.destroy(),this.chartMenuService.hideAdvancedSettings()})}getBestDialogSize(){const e=this.popupService.getPopupParent(),t=.75*s._.getAbsoluteWidth(e),i=.75*s._.getAbsoluteHeight(e),n=this.chartProxy.getChart();let r=this.params.insideDialog?850:n.width,o=this.params.insideDialog?470:n.height;return(r>t||o>i)&&(r=Math.min(r,t),o=Math.round(.553*r),o>i&&(o=i,r=Math.min(r,Math.round(o/.553)))),{width:r,height:o}}addMenu(){this.params.crossFiltering||(this.chartMenu=this.createBean(new Xb(this.eChartContainer,this.eMenuContainer,this.chartMenuContext)),this.eChartContainer.appendChild(this.chartMenu.getGui()))}addTitleEditComp(){this.titleEdit=this.createBean(new Qb(this.chartMenu)),this.eTitleEditContainer.appendChild(this.titleEdit.getGui()),this.chartProxy&&this.titleEdit.refreshTitle(this.chartMenuContext)}update(e){if((null==e?void 0:e.chartId)&&!this.chartController.update(e))return;const t=this.chartTypeChanged(e),i=t||this.chartEmpty?(e=>{const t=this.chartType,i=e,n=this.chartProxy.getChart(),s=null==n?void 0:n.getOptions(),r=null==n?void 0:n.axes;return this.chartOptionsService.getPersistedChartThemeOverrides(s,r,t,null!=i?i:t)})(t):void 0;t&&this.createChart();const n=i&&(null==e?void 0:e.chartThemeOverrides)?vy(i,e.chartThemeOverrides):i||(null==e?void 0:e.chartThemeOverrides);this.updateChart(n),(null==e?void 0:e.chartId)&&this.chartProxy.getChart().waitForUpdate().then(()=>{this.chartController.raiseChartApiUpdateEvent()})}updateChart(e){const{chartProxy:t}=this,i=this.chartController.getSelectedValueColState(),n=this.chartController.getChartData(),s=this.handleEmptyChart(n,i.length);if(this.chartEmpty=s,s)return void(e&&this.chartController.updateThemeOverrides(e));let r=this.chartController.getChartUpdateParams(e);t.update(r),this.chartProxy.getChart().waitForUpdate().then(()=>{this.chartController.raiseChartUpdatedEvent()}),this.titleEdit.refreshTitle(this.chartMenuContext)}chartTypeChanged(e){const[t,i]=[this.chartController.getChartType(),null==e?void 0:e.chartType],n=i?iy(i):void 0;return this.chartType!==t?null!=n?n:t:n&&t!==n?n:null}getChartModel(){return this.chartController.getChartModel()}getChartImageDataURL(e){return this.chartProxy.getChartImageDataURL(e)}handleEmptyChart(e,t){const i=this.chartController.isPivotChart()&&!this.chartController.isPivotMode(),n=this.chartController.getChartType();let r=1;this.chartController.isActiveXYChart()?r="bubble"===n?3:2:ty(sy(n))&&(r=0);const o=t<r||0===e.length;if(this.eChart){const e=i||o;s._.setDisplayed(this.eChart,!e),s._.setDisplayed(this.eEmpty,e)}return i?(this.eEmpty.innerText=this.chartTranslationService.translate("pivotChartRequiresPivotMode"),!0):!!o&&(this.eEmpty.innerText=this.chartTranslationService.translate("noDataToChart"),!0)}downloadChart(e,t,i){this.chartProxy.downloadChart(e,t,i)}openChartToolPanel(e){const t=e?MS[e]:e;this.chartMenu.showMenu({panel:t})}closeChartToolPanel(){this.chartMenu.hideMenu()}getChartId(){return this.chartController.getChartId()}getUnderlyingChart(){return this.chartProxy.getChartRef()}crossFilteringReset(){this.chartProxy.crossFilteringReset()}setActiveChartCellRange(e){this.getGui().contains(e.relatedTarget)||(this.chartController.setChartRange(!0),this.focusService.clearFocusedCell())}getThemeName(){const e=this.gos.get("chartThemes")||Ly;if(0===e.length)throw new Error("Cannot create chart: no chart themes available.");const{chartThemeName:t}=this.params;return s._.includes(e,t)?t:e[0]}getAllKeysInObjects(e){const t={};return e.filter(e=>null!=e).forEach(e=>{Object.keys(e).forEach(e=>t[e]=null)}),Object.keys(t)}validateCustomThemes(){const e=this.getChartThemes(),t=this.gos.get("customChartThemes");t&&this.getAllKeysInObjects([t]).forEach(t=>{s._.includes(e,t)||console.warn("AG Grid: a custom chart theme with the name '"+t+"' has been supplied but not added to the 'chartThemes' list")})}reactivePropertyUpdate(){this.chartController.setChartThemeName(this.getThemeName(),!0);const e=this.getChartId(),t=this.chartController.isCrossFilterChart()?"crossFilter":this.getChartModel().modelType,i=this.gos.get("chartThemeOverrides")||{};this.update({type:`${t}ChartUpdate`,chartId:e,chartThemeOverrides:i})}raiseChartCreatedEvent(){const e={type:s.sVA.EVENT_CHART_CREATED,chartId:this.chartController.getChartId()};this.chartProxy.getChart().waitForUpdate().then(()=>{this.eventService.dispatchEvent(e)})}raiseChartDestroyedEvent(){const e={type:s.sVA.EVENT_CHART_DESTROYED,chartId:this.chartController.getChartId()};this.eventService.dispatchEvent(e)}destroy(){var e;super.destroy(),this.chartProxy&&this.chartProxy.destroy(),this.destroyBean(this.chartMenu),this.destroyBean(this.titleEdit),this.chartDialog&&this.chartDialog.isAlive()&&this.destroyBean(this.chartDialog),null==(e=this.onDestroyColorSchemeChangeListener)||e.call(this);const t=this.getGui();s._.clearElement(t),s._.removeFromParent(t),this.raiseChartDestroyedEvent()}};LS.TEMPLATE='<div class="ag-chart" tabindex="-1">\n            <div ref="eChartContainer" tabindex="-1" class="ag-chart-components-wrapper">\n                <div ref="eChart" class="ag-chart-canvas-wrapper"></div>\n                <div ref="eEmpty" class="ag-chart-empty-text ag-unselectable"></div>\n            </div>\n            <div ref="eTitleEditContainer"></div>\n            <div ref="eMenuContainer" class="ag-chart-docked-container" style="min-width: 0px;"></div>\n        </div>',zv([(0,s.PIB)("eChart")],LS.prototype,"eChart",2),zv([(0,s.PIB)("eChartContainer")],LS.prototype,"eChartContainer",2),zv([(0,s.PIB)("eMenuContainer")],LS.prototype,"eMenuContainer",2),zv([(0,s.PIB)("eEmpty")],LS.prototype,"eEmpty",2),zv([(0,s.PIB)("eTitleEditContainer")],LS.prototype,"eTitleEditContainer",2),zv([(0,s.dsm)("chartCrossFilterService")],LS.prototype,"crossFilterService",2),zv([(0,s.dsm)("chartTranslationService")],LS.prototype,"chartTranslationService",2),zv([(0,s.dsm)("chartMenuService")],LS.prototype,"chartMenuService",2),zv([(0,s.dsm)("focusService")],LS.prototype,"focusService",2),zv([(0,s.dsm)("popupService")],LS.prototype,"popupService",2),zv([s.o7C],LS.prototype,"init",1);var kS=LS,PS="31.3.4";function NS(e){return e=ew("chartOptions.legend.item.marker.type","shape",e),e=ew("chartOptions.seriesDefaults.marker.type","shape",e),ew("chartOptions.legend.padding","spacing",e)}function OS(e){var t;const i=e=tw("chartOptions.seriesDefaults.marker.minSize",e),{chartType:n,chartPalette:s,chartOptions:r}=i,o=r,{xAxis:a,yAxis:l}=o,c=Hv(o,["xAxis","yAxis"]),h=Hv(i,["chartType","chartPalette","chartOptions"]),d=function(e){switch(e){case"bar":case"stackedBar":case"normalizedBar":return["number","category"];case"groupedBar":return["number","grouped-category"];case"column":case"stackedColumn":case"normalizedColumn":case"line":case"area":case"stackedArea":case"normalizedArea":case"histogram":return["category","number"];case"groupedColumn":return["grouped-category","number"];case"scatter":case"bubble":return["number","number"];default:return}}(n),u=null==d?void 0:d.map((e,t)=>Vv({type:e},0===t?a:l));return Vv({chartType:n,chartThemeName:null!=(t={borneo:"ag-default",material:"ag-material",bright:"ag-vivid"}[s])?t:"ag-default",chartOptions:Bv(Vv({},c),{axes:u,xAxis:a,yAxis:l})},h)}function _S(e){return ew("chartOptions.seriesDefaults.label.minRequiredAngle","minAngle",e)}function FS(e){return e=tw("chart",e=nw("chartOptions.seriesDefaults.highlightStyle",e,e=>{var t=e,{dimOpacity:i}=t,n=Hv(t,["dimOpacity"]);return Vv(Vv({},n),null!=i?{series:{dimOpacity:i}}:{})})),e=tw("chartOptions.seriesDefaults.tooltipClass",e),e=qS("chartOptions.axes[].label.rotation",0,e=tw("chartOptions.seriesDefaults.tooltipTracking",e)),qS("chartOptions.axes[].label.rotation",335,e)}function GS(e){const t=e=>{var t=e,{item:i,series:n}=t,s=Hv(t,["item","series"]);return Vv({item:Vv(Vv({},s),i)},n?{series:n}:{})};return e=nw("chartOptions.seriesDefaults.highlightStyle",e,t),nw("chartOptions.series[].highlightStyle",e,t)}function VS(e){e=QS("chartOptions.seriesDefaults.fill.opacity","chartOptions.seriesDefaults.fillOpacity",e),e=QS("chartOptions.seriesDefaults.stroke.opacity","chartOptions.seriesDefaults.strokeOpacity",e),e=tw("chartOptions.seriesDefaults.fill",e=QS("chartOptions.seriesDefaults.stroke.width","chartOptions.seriesDefaults.strokeWidth",e)),e=tw("chartOptions.seriesDefaults.stroke",e),e=tw("chartOptions.seriesDefaults.callout.colors",e),e=tw("chartOptions.xAxis",e);const t=e=tw("chartOptions.yAxis",e),{chartType:i,chartOptions:n}=t,s=n,{axes:r,series:o,seriesDefaults:a}=s,l=Hv(s,["axes","series","seriesDefaults"]),c=Hv(t,["chartType","chartOptions"]),h=iy(i),d=sy(h),u=[d],p={};if(!ry(d)){const e={top:{},bottom:{},left:{},right:{}},t=r.map(t=>{var i=t,{type:n}=i,s=Hv(i,["type"]);return{[n]:Vv(Vv({},e),s)}}).reduce(sw,{});dy.filter(e=>null==t[e]).forEach(i=>{t[i]=Vv({},e)}),p.axes=t}const g=u.map(e=>({[e]:Vv(Bv(Vv({},p),{series:a}),l)})).reduce(sw,{});return Bv(Vv({},c),{chartType:h,chartOptions:g})}function BS(e){return e=tw("chartOptions.*.title.padding",e),e=tw("chartOptions.*.subtitle.padding",e),XS("chartOptions.*.axes.*.title.enabled",!1,e=tw("chartOptions.*.axes.*.title.padding",e))}function HS(e){return e=ew("chartOptions.pie.series.callout","calloutLine",e),e=ew("chartOptions.pie.series.label","calloutLabel",e),e=ew("chartOptions.pie.series.labelKey","sectorLabelKey",e),e=ew("chartOptions.pie.series.labelName","sectorLabelName",e),e=ew("chartOptions.donut.series.callout","calloutLine",e),e=ew("chartOptions.donut.series.label","calloutLabel",e),e=ew("chartOptions.donut.series.labelKey","sectorLabelKey",e),ew("chartOptions.donut.series.labelName","sectorLabelName",e)}function zS(e){return e=JS("chartOptions.scatter.series.fill","chartOptions.scatter.series.marker.fill",e),e=JS("chartOptions.scatter.series.fillOpacity","chartOptions.scatter.series.marker.fillOpacity",e),e=JS("chartOptions.scatter.series.stroke","chartOptions.scatter.series.marker.stroke",e),e=JS("chartOptions.scatter.series.strokeOpacity","chartOptions.scatter.series.marker.strokeOpacity",e),QS("chartOptions.scatter.series.paired","chartOptions.scatter.paired",e=JS("chartOptions.scatter.series.strokeWidth","chartOptions.scatter.series.marker.strokeWidth",e))}function US(e){return tw("chartOptions.axes[].tick.count",e)}function WS(e){return nw("chartOptions.*.tooltip",e,e=>{var t=e,{tracking:i}=t,n=Hv(t,["tracking"]);const s=Vv({},n);return!1===i?(null!=s.position||(s.position={type:"pointer"}),null!=s.range||(s.range="nearest")):!0===i&&(null!=s.position||(s.position={type:"node"}),null!=s.range||(s.range="nearest")),s})}function jS(e){return e=ew("chartOptions.pie.series.labelKey","sectorLabelKey",e),XS("chartOptions.common.legend.position","right",e=ZS("chartOptions.common.legend.enabled",!0,e=tw("chartOptions.*.series.flipXY",e=WS(e=US(e=ew("chartOptions.pie.series.labelName","sectorLabelName",e))))))}function KS(e){const t=ew("chartOptions.column","bar",e),i={"ag-pastel":"ag-sheets","ag-solar":"ag-polychroma"}[t.chartThemeName]||t.chartThemeName;return Bv(Vv({},t),{chartThemeName:i})}function $S(e,t,i){if(YS(e)>YS(t.version)){const n=i(t);return n.version=e,n}return t}function YS(e){const{major:t,minor:i,patch:n}=function(e){const t="string"==typeof e?e.split(".").map(e=>Number(e)):[];if(3!==t.length||t.some(e=>isNaN(e)))throw new Error("AG Grid - Illegal version string: "+e);return{major:t[0],minor:t[1],patch:t[2]}}(e);return 1e4*t+100*i+n}function qS(e,t,i){return iw(e,!0,i,(e,i)=>{e[i]===t&&delete e[i]})}function XS(e,t,i){return iw(e,!1,i,(e,i)=>{null==e[i]&&(e[i]=t)})}function ZS(e,t,i){var n;"string"==typeof e&&(e=e.split("."));const s=e[0];return e.length>1&&(i[s]=ZS(e.slice(1),t,null!=(n=i[s])?n:{})),Object.keys(i).includes(s)||(i[s]=t),i}function QS(e,t,i){let n,s=!1;return i=iw(e,!0,i,(e,t)=>{s=!0,n=e[t],delete e[t]}),s?iw(t,!1,i,(e,t)=>{e[t]=n}):i}function JS(e,t,i){let n,s=!1;return i=iw(e,!0,i,(e,t)=>{s=!0,n=e[t],delete e[t]}),s?iw(t,!1,i,(e,t)=>{void 0===e[t]&&(e[t]=n)}):i}function ew(e,t,i){return iw(e,!0,i,(e,i)=>{e[t]=e[i],delete e[i]})}function tw(e,t){return iw(e,!0,t,(e,t)=>delete e[t])}function iw(e,t,i,n){const s=e instanceof Array?e:e.split("."),r=s.slice(0,s.length-1),o=s[s.length-1];return nw(r,i,e=>{const i=Object.keys(e).includes(o);if(t&&!i)return e;const s=Vv({},e);return n(s,o),s})}function nw(e,t,i){const n=e instanceof Array?e:e.split(".");if(t=Vv({},t),0===n.length)return i(t);if(n[0].startsWith("{")){const e=n[0].substring(1,n[0].lastIndexOf("}")).split(",");for(const s of e)null!=t[s]&&(t[s]=nw(n.slice(1),t[s],i))}else if(n[0].endsWith("[]")){const s=n[0].substring(0,e[0].indexOf("["));t[s]instanceof Array&&(t[s]=t[s].map(e=>nw(n.slice(1),e,i)))}else if("*"===n[0])for(const e in t)t[e]=nw(n.slice(1),t[e],i);else null!=t[n[0]]&&(t[n[0]]=nw(n.slice(1),t[n[0]],i));return t}var sw=(e,t)=>Vv(Vv({},e),t),rw=class extends s.XQb{constructor(){super(...arguments),this.activeCharts=new Set,this.activeChartComps=new Set,this.crossFilteringContext={lastSelectedChartId:""},this.isEnterprise=()=>jf.enterpriseModule.isEnterprise}updateChart(e){if(0===this.activeChartComps.size)return void console.warn("AG Grid - No active charts to update.");const t=[...this.activeChartComps].find(t=>t.getChartId()===e.chartId);t?t.update(e):console.warn(`AG Grid - Unable to update chart. No active chart found with ID: ${e.chartId}.`)}getChartModels(){const e=[];return this.activeChartComps.forEach(t=>e.push((e=>Bv(Vv({},e),{version:PS}))(t.getChartModel()))),e}getChartRef(e){let t;return this.activeCharts.forEach(i=>{i.chartId===e&&(t=i)}),t}getChartComp(e){let t;return this.activeChartComps.forEach(i=>{i.getChartId()===e&&(t=i)}),t}getChartImageDataURL(e){let t;return this.activeChartComps.forEach(i=>{i.getChartId()===e.chartId&&(t=i.getChartImageDataURL(e.fileFormat))}),t}downloadChart(e){const t=Array.from(this.activeChartComps).find(t=>t.getChartId()===e.chartId);null==t||t.downloadChart(e.dimensions,e.fileName,e.fileFormat)}openChartToolPanel(e){const t=Array.from(this.activeChartComps).find(t=>t.getChartId()===e.chartId);null==t||t.openChartToolPanel(e.panel)}closeChartToolPanel(e){const t=Array.from(this.activeChartComps).find(t=>t.getChartId()===e);null==t||t.closeChartToolPanel()}createChartFromCurrentRange(e="groupedColumn"){const t=this.getSelectedRange();return this.createChart({cellRange:t,chartType:e})}restoreChart(e,t){if(!e)return void console.warn("AG Grid - unable to restore chart as no chart model is provided");let i,n,s,r;return e.version!==PS&&(e=function(e){return e.version,null==e.version&&(e.version=function(e){var t,i;const n=e;if(null!=e.version)return e.version;const s=(e,...t)=>Object.keys(e||{}).some(e=>t.includes(e)),r=n.chartOptions,o=s(r,"seriesDefaults")?null==r?void 0:r.seriesDefaults:null==r?void 0:r[Object.keys(r)[0]],a={"27.0.0":s(n,"seriesChartTypes"),"26.2.0":!s(r,"seriesDefaults"),"26.1.0":s(null==o?void 0:o.highlightStyle,"item"),"26.0.0":s(null==o?void 0:o.highlightStyle,"series"),"25.1.0":s(null==o?void 0:o.label,"minAngle"),"25.0.0":s(n,"modelType","aggFunc","unlinkChart","suppressChartRanges")||s(o,"lineDash","lineDashOffset"),"24.0.0":s(n,"chartThemeName","chart")||s(r,"series"),"23.2.0":s(r,"navigator"),"23.0.0":s(null==(i=null==(t=null==r?void 0:r.legend)?void 0:t.item)?void 0:i.marker,"shape"),"22.1.0":s(n,"chartPalette","chartType")},l="27.1.0",c=Object.entries(a).filter(([e,t])=>t),[h=l]=c[0];return h}(e)),e=$S("23.0.0",e,NS),e=$S("24.0.0",e,OS),e=$S("25.1.0",e,_S),e=$S("26.0.0",e,FS),e=$S("26.1.0",e,GS),e=$S("26.2.0",e,VS),e=$S("28.0.0",e,BS),e=$S("28.2.0",e,HS),e=$S("29.0.0",e,zS),e=$S("29.1.0",e,US),e=$S("29.2.0",e,WS),e=$S("30.0.0",e,jS),e=function(e){return e=tw("chartOptions.*.width",e),XS("chartOptions.*.axes.category.label.autoRotate",!0,e=tw("chartOptions.*.height",e))}(e=$S("31.0.0",e,KS)),$S(PS,e,e=>e)}(e)),"pivot"===e.modelType?(this.gos.updateGridOptions({options:{pivotMode:!0},source:"pivotChart"}),i=this.createCellRange(void 0,!0),n=!0,s=!0):(i=this.createCellRange(e.cellRange),r=e.chartPalette),i?this.createChart(Bv(Vv({},e),{cellRange:i,pivotChart:n,suppressChartRanges:s,chartContainer:t,chartOptionsToRestore:e.chartOptions,chartPaletteToRestore:r})):void 0}createRangeChart(e){const t=this.createCellRange(e.cellRange);if(t)return this.createChart(Bv(Vv({},e),{cellRange:t}))}createPivotChart(e){this.gos.updateGridOptions({options:{pivotMode:!0},source:"pivotChart"});const t=this.createCellRange(void 0,!0);if(t)return this.createChart(Bv(Vv({},e),{cellRange:t,pivotChart:!0,suppressChartRanges:!0}))}createCrossFilterChart(e){const t=this.createCellRange(e.cellRange);if(!t)return;const i=!(void 0!==e.suppressChartRanges&&null!==e.suppressChartRanges)||e.suppressChartRanges;return this.createChart(Bv(Vv({},e),{cellRange:t,suppressChartRanges:i,crossFiltering:!0}))}createChart(e){const t=Ry.validateCreateParams(e);if(!t)return;e=!0===t?e:t;const{chartType:i,chartContainer:n}=e,s=this.gos.getCallback("createChartContainer"),r=Bv(Vv({},e),{chartId:this.generateId(),chartType:iy(i),insideDialog:!(n||s),crossFilteringContext:this.crossFilteringContext,crossFilteringResetCallback:()=>this.activeChartComps.forEach(e=>e.crossFilteringReset())}),o=new kS(r);this.context.createBean(o);const a=this.createChartRef(o);if(n){n.appendChild(o.getGui());const e=this.environment.getTheme();e.el&&!e.el.contains(n)&&n.classList.add(e.theme)}else s?s(a):o.addEventListener(kS.EVENT_DESTROYED,()=>{this.activeChartComps.delete(o),this.activeCharts.delete(a)});return a}createChartRef(e){const t={destroyChart:()=>{this.activeCharts.has(t)&&(this.context.destroyBean(e),this.activeChartComps.delete(e),this.activeCharts.delete(t))},chartElement:e.getGui(),chart:e.getUnderlyingChart(),chartId:e.getChartModel().chartId};return this.activeCharts.add(t),this.activeChartComps.add(e),t}getSelectedRange(){var e,t;const i=null!=(t=null==(e=this.rangeService)?void 0:e.getCellRanges())?t:[];return i.length>0?i[0]:{columns:[]}}generateId(){return`id-${Math.random().toString(36).substring(2,18)}`}createCellRange(e,t){var i;const n=t?{rowStartIndex:null,rowStartPinned:void 0,rowEndIndex:null,rowEndPinned:void 0,columns:this.columnModel.getAllDisplayedColumns().map(e=>e.getColId())}:e,s=n&&(null==(i=this.rangeService)?void 0:i.createPartialCellRangeFromRangeParams(n,!0));return s||console.warn(`AG Grid - unable to create chart as ${t?"there are no columns in the grid":"no range is selected"}.`),s}destroyAllActiveCharts(){this.activeCharts.forEach(e=>e.destroyChart())}};rw.CHARTS_VERSION=Lf,zv([(0,s.dsm)("columnModel")],rw.prototype,"columnModel",2),zv([(0,s.Xx1)("rangeService")],rw.prototype,"rangeService",2),zv([s.yah],rw.prototype,"destroyAllActiveCharts",1),rw=zv([(0,s.dR4)("chartService")],rw);var ow=class extends s.XQb{translate(e){return this.localeService.getLocaleTextFunc()(e,ow.DEFAULT_TRANSLATIONS[e])}};ow.DEFAULT_TRANSLATIONS={pivotChartTitle:"Pivot Chart",rangeChartTitle:"Range Chart",settings:"Chart",data:"Data",format:"Format",categories:"Categories",defaultCategory:"(None)",series:"Series",switchCategorySeries:"Switch Category / Series",categoryValues:"Category Values",seriesLabels:"Series Labels",aggregate:"Aggregate",xyValues:"X Y Values",paired:"Paired Mode",axis:"Axis",xAxis:"Horizontal Axis",yAxis:"Vertical Axis",polarAxis:"Polar Axis",radiusAxis:"Radius Axis",navigator:"Navigator",zoom:"Zoom",animation:"Animation",crosshair:"Crosshair",color:"Color",thickness:"Thickness",preferredLength:"Preferred Length",xType:"X Type",axisType:"Axis Type",automatic:"Automatic",category:"Category",number:"Number",time:"Time",timeFormat:"Time Format",autoRotate:"Auto Rotate",labelRotation:"Rotation",circle:"Circle",orientation:"Orientation",polygon:"Polygon",fixed:"Fixed",parallel:"Parallel",perpendicular:"Perpendicular",radiusAxisPosition:"Position",ticks:"Ticks",gridLines:"Grid Lines",width:"Width",height:"Height",length:"Length",padding:"Padding",spacing:"Spacing",chart:"Chart",title:"Title",titlePlaceholder:"Chart title - double click to edit",background:"Background",font:"Font",top:"Top",right:"Right",bottom:"Bottom",left:"Left",labels:"Labels",calloutLabels:"Callout Labels",sectorLabels:"Sector Labels",positionRatio:"Position Ratio",size:"Size",shape:"Shape",minSize:"Minimum Size",maxSize:"Maximum Size",legend:"Legend",position:"Position",markerSize:"Marker Size",markerStroke:"Marker Stroke",markerPadding:"Marker Padding",itemSpacing:"Item Spacing",itemPaddingX:"Item Padding X",itemPaddingY:"Item Padding Y",layoutHorizontalSpacing:"Horizontal Spacing",layoutVerticalSpacing:"Vertical Spacing",strokeWidth:"Stroke Width",offset:"Offset",offsets:"Offsets",tooltips:"Tooltips",callout:"Callout",markers:"Markers",shadow:"Shadow",blur:"Blur",xOffset:"X Offset",yOffset:"Y Offset",lineWidth:"Line Width",lineDash:"Line Dash",lineDashOffset:"Dash Offset",scrollingZoom:"Scrolling",scrollingStep:"Scrolling Step",selectingZoom:"Selecting",durationMillis:"Duration (ms)",crosshairLabel:"Label",crosshairSnap:"Snap to Node",normal:"Normal",bold:"Bold",italic:"Italic",boldItalic:"Bold Italic",predefined:"Predefined",fillOpacity:"Fill Opacity",strokeColor:"Line Color",strokeOpacity:"Line Opacity",miniChart:"Mini-Chart",histogramBinCount:"Bin count",connectorLine:"Connector Line",seriesItems:"Series Items",seriesItemType:"Item Type",seriesItemPositive:"Positive",seriesItemNegative:"Negative",seriesItemLabels:"Item Labels",columnGroup:"Column",barGroup:"Bar",pieGroup:"Pie",lineGroup:"Line",scatterGroup:"X Y (Scatter)",areaGroup:"Area",polarGroup:"Polar",statisticalGroup:"Statistical",hierarchicalGroup:"Hierarchical",specializedGroup:"Specialized",combinationGroup:"Combination",groupedColumnTooltip:"Grouped",stackedColumnTooltip:"Stacked",normalizedColumnTooltip:"100% Stacked",groupedBarTooltip:"Grouped",stackedBarTooltip:"Stacked",normalizedBarTooltip:"100% Stacked",pieTooltip:"Pie",donutTooltip:"Donut",lineTooltip:"Line",groupedAreaTooltip:"Area",stackedAreaTooltip:"Stacked",normalizedAreaTooltip:"100% Stacked",scatterTooltip:"Scatter",bubbleTooltip:"Bubble",histogramTooltip:"Histogram",radialColumnTooltip:"Radial Column",radialBarTooltip:"Radial Bar",radarLineTooltip:"Radar Line",radarAreaTooltip:"Radar Area",nightingaleTooltip:"Nightingale",rangeBarTooltip:"Range Bar",rangeAreaTooltip:"Range Area",boxPlotTooltip:"Box Plot",treemapTooltip:"Treemap",sunburstTooltip:"Sunburst",heatmapTooltip:"Heatmap",waterfallTooltip:"Waterfall",columnLineComboTooltip:"Column & Line",areaColumnComboTooltip:"Area & Column",customComboTooltip:"Custom Combination",innerRadius:"Inner Radius",startAngle:"Start Angle",endAngle:"End Angle",reverseDirection:"Reverse Direction",groupPadding:"Group Padding",seriesPadding:"Series Padding",group:"Group",tile:"Tile",whisker:"Whisker",cap:"Cap",capLengthRatio:"Length Ratio",labelPlacement:"Placement",inside:"Inside",outside:"Outside",noDataToChart:"No data available to be charted.",pivotChartRequiresPivotMode:"Pivot Chart requires Pivot Mode enabled.",chartSettingsToolbarTooltip:"Menu",chartLinkToolbarTooltip:"Linked to Grid",chartUnlinkToolbarTooltip:"Unlinked from Grid",chartDownloadToolbarTooltip:"Download Chart",chartMenuToolbarTooltip:"Menu",chartEdit:"Edit Chart",chartAdvancedSettings:"Advanced Settings",chartLink:"Link to Grid",chartUnlink:"Unlink from Grid",chartDownload:"Download Chart",histogramFrequency:"Frequency",seriesChartType:"Series Chart Type",seriesType:"Series Type",secondaryAxis:"Secondary Axis",seriesAdd:"Add a series",categoryAdd:"Add a category",area:"Area",bar:"Bar",column:"Column",line:"Line",scatter:"Scatter",histogram:"Histogram",radialColumn:"Radial Column",radialBar:"Radial Bar",radarLine:"Radar Line",radarArea:"Radar Area",nightingale:"Nightingale",rangeBar:"Range Bar",rangeArea:"Range Area",treemap:"Treemap",sunburst:"Sunburst",waterfall:"Waterfall",boxPlot:"Box Plot",pie:"Pie",donut:"Donut",stackedArea:"StackedArea",groupedColumn:"Grouped Column",stackedColumn:"Stacked Column",advancedSettings:"Advanced Settings",ariaChartMenuClose:"Close Chart Edit Menu",timeFormatSlashesDDMMYYYY:"DD/MM/YYYY",timeFormatSlashesMMDDYYYY:"MM/DD/YYYY",timeFormatSlashesDDMMYY:"DD/MM/YY",timeFormatSlashesMMDDYY:"MM/DD/YY",timeFormatDotsDDMYY:"DD.M.YY",timeFormatDotsMDDYY:"M.DD.YY",timeFormatDashesYYYYMMDD:"YYYY-MM-DD",timeFormatSpacesDDMMMMYYYY:"DD MMMM YYYY",timeFormatHHMMSS:"HH:MM:SS",timeFormatHHMMSSAmPm:"HH:MM:SS AM/PM",sum:"Sum",first:"First",last:"Last",min:"Min",max:"Max",count:"Count",avg:"Average",direction:"Direction",horizontal:"Horizontal",vertical:"Vertical",seriesGroupType:"Group Type",groupedSeriesGroupType:"Grouped",stackedSeriesGroupType:"Stacked",normalizedSeriesGroupType:"100% Stacked"},ow=zv([(0,s.dR4)("chartTranslationService")],ow);var aw=class extends s.XQb{filter(e,t=!1){const i=this.gridApi.getFilterModel();if(t)return void this.resetFilters(i);let n=aw.extractFilterColId(e);this.isValidColumnFilter(n)?this.updateFilters(i,e,n):console.warn("AG Grid: cross filtering requires a 'agSetColumnFilter' or 'agMultiColumnFilter' to be defined on the column with id: '"+n+"'")}resetFilters(e){Object.keys(e).length>0&&(this.gridApi.setFilterModel(null),this.gridApi.onFilterChanged())}updateFilters(e,t,i){let n=aw.extractFilterColId(t),r=t.datum[n];if(void 0===r)return;let o=r.toString();if(t.event.metaKey||t.event.ctrlKey){const t=this.getCurrentGridValuesForCategory(i);let n;s._.includes(t,o)?n=t.filter(e=>e!==o):(n=t,n.push(o)),e[i]=this.getUpdatedFilterModel(i,n)}else{const t=[o];e={[i]:this.getUpdatedFilterModel(i,t)}}this.gridApi.setFilterModel(e)}getUpdatedFilterModel(e,t){return"agMultiColumnFilter"===this.getColumnFilterType(e)?{filterType:"multi",filterModels:[null,{filterType:"set",values:t}]}:{filterType:"set",values:t}}getCurrentGridValuesForCategory(e){let t=[];const i=this.getColumnById(e);return this.gridApi.forEachNodeAfterFilter(e=>{if(i&&!e.group){const n=this.valueService.getValue(i,e)+"";t.includes(n)||t.push(n)}}),t}static extractFilterColId(e){return e.xKey||e.calloutLabelKey}isValidColumnFilter(e){e.indexOf("-filtered-out")&&(e=e.replace("-filtered-out",""));let t=this.getColumnFilterType(e);return"boolean"==typeof t?t:s._.includes(["agSetColumnFilter","agMultiColumnFilter"],t)}getColumnFilterType(e){let t=this.getColumnById(e);if(t)return t.getColDef().filter}getColumnById(e){return this.columnModel.getGridColumn(e)}};function lw(e){return e&&e.match(/\d+\.\d+\.\d+/)}function cw({type:e,gridVersion:t,chartsVersion:i}){const n="AG Grid: AG Grid version is incompatible. Please see https://www.ag-grid.com/javascript-data-grid/modules/ for more information.";if(!t)return n;const s=function(e){if(!e||!lw(e))return;const[t,i]=e.split(".")||[],n=`${t}.${i}.x`,s=parseInt(t,10)-28+6;return s<0?void 0:{gridMajorMinor:n,chartsMajorMinor:`${s}.${i}.x`}}(t);if(!s)return n;const{gridMajorMinor:r,chartsMajorMinor:o}=s;return"incompatible"===e?`AG Grid version ${t} and AG Charts version ${i} is not supported. AG Grid version ${r} should be used with AG Chart ${o}. Please see https://www.ag-grid.com/javascript-data-grid/modules/ for more information.`:"invalidCharts"===e?`AG Grid version ${r} should be used with AG Chart ${o}. Please see https://www.ag-grid.com/javascript-data-grid/modules/ for more information.`:n}zv([(0,s.dsm)("gridApi")],aw.prototype,"gridApi",2),zv([(0,s.dsm)("columnModel")],aw.prototype,"columnModel",2),zv([(0,s.dsm)("valueService")],aw.prototype,"valueService",2),aw=zv([(0,s.dR4)("chartCrossFilterService")],aw);var hw=class extends s.XQb{showMenuList(e){const{eventSource:t,showMenu:i,chartMenuContext:n}=e,s=this.chartMenuService.doChartToolPanelsExist(n.chartController),r=this.mapWithStockItems(this.getMenuItems(n.chartController,s),n,i,t,s);if(!r.length)return;const o=this.createBean(new dw(r));this.activeChartMenuList=o;let a=-1,l="left";this.gos.get("enableRtl")&&(a=1,l="right");const c=o.getGui();this.popupService.addPopup({modal:!0,eChild:c,closeOnEsc:!0,closedCallback:()=>{this.destroyBean(o),this.activeChartMenuList=void 0;const e=this.gos.getDocument(),i=this.gos.getActiveDomElement();i&&i!==e.body||t.focus({preventScroll:!0})},afterGuiAttached:e=>o.afterGuiAttached(e),positionCallback:()=>{this.popupService.positionPopupByComponent({type:"chartMenu",eventSource:t,ePopup:c,alignSide:l,nudgeX:4*a,nudgeY:4,position:"under",keepWithinBounds:!0})},ariaLabel:"Chart Menu"})}getMenuItems(e,t){const i=[...t?["chartEdit"]:[],...e.isEnterprise()?["chartAdvancedSettings"]:[],e.isChartLinked()?"chartUnlink":"chartLink","chartDownload"],n=this.gos.get("chartMenuItems");return n?Array.isArray(n)?n:n(this.gos.addGridCommonParams({defaultItems:i})):i}mapWithStockItems(e,t,i,n,s){if(!e)return[];const r=[];return e.forEach(e=>{let o;if(o="string"==typeof e?this.getStockMenuItem(e,t,i,n,s):Vv({},e),!o)return;const{subMenu:a}=o;Array.isArray(a)&&(o.subMenu=this.mapWithStockItems(a,t,i,n,s)),r.push(o)}),r}getStockMenuItem(e,t,i,n,s){switch(e){case"chartEdit":return s?this.createMenuItem(this.chartTranslationService.translate("chartEdit"),"chartsMenuEdit",i):null;case"chartAdvancedSettings":return this.createMenuItem(this.chartTranslationService.translate("chartAdvancedSettings"),"chartsMenuAdvancedSettings",()=>this.chartMenuService.openAdvancedSettings(t,n));case"chartUnlink":return t.chartController.isChartLinked()?this.createMenuItem(this.chartTranslationService.translate("chartUnlink"),"unlinked",()=>this.chartMenuService.toggleLinked(t)):null;case"chartLink":return t.chartController.isChartLinked()?null:this.createMenuItem(this.chartTranslationService.translate("chartLink"),"linked",()=>this.chartMenuService.toggleLinked(t));case"chartDownload":return this.createMenuItem(this.chartTranslationService.translate("chartDownload"),"save",()=>this.chartMenuService.downloadChart(t))}return null}createMenuItem(e,t,i){return{name:e,icon:s._.createIconNoSpan(t,this.gos,null),action:i}}destroy(){this.destroyBean(this.activeChartMenuList),super.destroy()}};zv([(0,s.dsm)("popupService")],hw.prototype,"popupService",2),zv([(0,s.dsm)("chartMenuService")],hw.prototype,"chartMenuService",2),zv([(0,s.dsm)("chartTranslationService")],hw.prototype,"chartTranslationService",2),hw=zv([(0,s.dR4)("chartMenuListFactory")],hw);var dw=class extends s.uAl{constructor(e){super('\n            <div ref="eChartsMenu" role="presentation" class="ag-menu ag-chart-menu-popup"></div>\n        '),this.menuItems=e}init(){this.mainMenuList=this.createManagedBean(new s.i9O(0)),this.mainMenuList.addMenuItems(this.menuItems),this.mainMenuList.addEventListener(s.yuY.EVENT_CLOSE_MENU,this.onHidePopup.bind(this)),this.eChartsMenu.appendChild(this.mainMenuList.getGui())}onHidePopup(){var e;null==(e=this.hidePopupFunc)||e.call(this)}afterGuiAttached({hidePopup:e}){e&&(this.hidePopupFunc=e,this.addDestroyFunc(e)),this.focusService.focusInto(this.mainMenuList.getGui())}};zv([(0,s.dsm)("focusService")],dw.prototype,"focusService",2),zv([(0,s.PIB)("eChartsMenu")],dw.prototype,"eChartsMenu",2),zv([s.o7C],dw.prototype,"init",1);var uw=class e extends s.uAl{constructor(e){super(),this.chartMenuParamsFactory=e}init(){const t=this.chartMenuParamsFactory.addEnableParams("animation.enabled",{cssIdentifier:"charts-advanced-settings-top-level",direction:"vertical",suppressOpenCloseIcons:!0,title:this.chartTranslationService.translate("animation"),suppressEnabledCheckbox:!0,useToggle:!0}),i=this.chartMenuParamsFactory.getDefaultNumberInputParams("animation.duration","durationMillis",{min:0});this.setTemplate(e.TEMPLATE,{animationGroup:t,animationHeightInput:i})}};uw.TEMPLATE='<div>\n            <ag-group-component ref="animationGroup">\n                <ag-input-number-field ref="animationHeightInput"></ag-input>\n            </ag-group-component>\n        </div>',zv([(0,s.dsm)("chartTranslationService")],uw.prototype,"chartTranslationService",2),zv([s.o7C],uw.prototype,"init",1);var pw=uw,gw=class e extends s.uAl{constructor(e){super(),this.chartMenuParamsFactory=e}init(){const t=this.chartMenuParamsFactory.addEnableParams("crosshair.enabled",{cssIdentifier:"charts-advanced-settings-top-level",direction:"vertical",suppressOpenCloseIcons:!0,title:this.chartTranslationService.translate("crosshair"),suppressEnabledCheckbox:!0,useToggle:!0}),i=this.chartMenuParamsFactory.getDefaultCheckboxParams("crosshair.label.enabled","crosshairLabel"),n=this.chartMenuParamsFactory.getDefaultCheckboxParams("crosshair.snap","crosshairSnap"),s=this.chartMenuParamsFactory.getDefaultColorPickerParams("crosshair.stroke","color");this.setTemplate(e.TEMPLATE,{crosshairGroup:t,crosshairLabelCheckbox:i,crosshairSnapCheckbox:n,crosshairStrokeColorPicker:s})}};gw.TEMPLATE='<div>\n            <ag-group-component ref="crosshairGroup">\n                <ag-checkbox ref="crosshairLabelCheckbox"></ag-checkbox>\n                <ag-checkbox ref="crosshairSnapCheckbox"></ag-checkbox>\n                <ag-color-picker ref="crosshairStrokeColorPicker"></ag-color-picker>\n            </ag-group-component>\n        </div>',zv([(0,s.dsm)("chartTranslationService")],gw.prototype,"chartTranslationService",2),zv([s.o7C],gw.prototype,"init",1);var fw=gw,mw=class e extends s.uAl{constructor(e){super(),this.chartMenuParamsFactory=e}init(){const t=this.chartMenuParamsFactory.addEnableParams("navigator.enabled",{cssIdentifier:"charts-advanced-settings-top-level",direction:"vertical",suppressOpenCloseIcons:!0,title:this.chartTranslationService.translate("navigator"),suppressEnabledCheckbox:!0,useToggle:!0}),i=this.chartMenuParamsFactory.getDefaultSliderParams("navigator.height","height",60);i.minValue=10;const n=this.chartMenuParamsFactory.getDefaultCheckboxParams("navigator.miniChart.enabled","miniChart");this.setTemplate(e.TEMPLATE,{navigatorGroup:t,navigatorHeightSlider:i,navigatorMiniChartCheckbox:n})}};mw.TEMPLATE='<div>\n            <ag-group-component ref="navigatorGroup">\n                <ag-slider ref="navigatorHeightSlider"></ag-slider>\n                <ag-checkbox ref="navigatorMiniChartCheckbox"></ag-checkbox>\n            </ag-group-component>\n        </div>',zv([(0,s.dsm)("chartTranslationService")],mw.prototype,"chartTranslationService",2),zv([s.o7C],mw.prototype,"init",1);var vw=mw,yw=class e extends s.uAl{constructor(e){super(),this.chartMenuParamsFactory=e}init(){const t=this.chartMenuParamsFactory.addEnableParams("zoom.enabled",{cssIdentifier:"charts-advanced-settings-top-level",direction:"vertical",suppressOpenCloseIcons:!0,title:this.chartTranslationService.translate("zoom"),suppressEnabledCheckbox:!0,useToggle:!0}),i=this.chartMenuParamsFactory.getDefaultCheckboxParams("zoom.enableScrolling","scrollingZoom"),n=this.chartMenuParamsFactory.getDefaultSliderParams("zoom.scrollingStep","scrollingStep",1);n.step=.01,n.minValue=n.step;const s=this.chartMenuParamsFactory.getDefaultCheckboxParams("zoom.enableSelecting","selectingZoom");i.onValueChange=(e=>t=>{e&&(e(t),this.zoomScrollingStepInput.setDisabled(!t))})(i.onValueChange),this.setTemplate(e.TEMPLATE,{zoomGroup:t,zoomScrollingCheckbox:i,zoomScrollingStepInput:n,zoomSelectingCheckbox:s}),this.zoomScrollingStepInput.setDisabled(!i.value)}};yw.TEMPLATE='<div>\n            <ag-group-component ref="zoomGroup">\n                <ag-checkbox ref="zoomSelectingCheckbox"></ag-checkbox>\n                <ag-checkbox ref="zoomScrollingCheckbox"></ag-checkbox>\n                <ag-slider ref="zoomScrollingStepInput"></ag-slider>\n            </ag-group-component>\n        </div>',zv([(0,s.dsm)("chartTranslationService")],yw.prototype,"chartTranslationService",2),zv([(0,s.PIB)("zoomScrollingStepInput")],yw.prototype,"zoomScrollingStepInput",2),zv([s.o7C],yw.prototype,"init",1);var Cw=yw,bw=["navigator","zoom","animation","crosshair"],Sw=class e extends s.uAl{constructor(t){super(e.TEMPLATE),this.chartMenuContext=t}postConstruct(){this.chartPanelFeature=this.createManagedBean(new zC(this.chartMenuContext.chartController,this.getGui(),"ag-chart-advanced-settings-section",(e,t)=>this.createPanels(e,t))),this.chartPanelFeature.refreshPanels()}createPanels(e,t){bw.forEach(e=>{if(!this.isGroupPanelShownForSeries(e,t))return;const i=this.createPanel(e);this.chartPanelFeature.addComponent(i)})}isGroupPanelShownForSeries(e,t){return"animation"===e||Jv(t)}createPanel(e){const{chartMenuParamsFactory:t,chartAxisMenuParamsFactory:i}=this.chartMenuContext;switch(e){case"navigator":return new vw(t);case"zoom":return new Cw(t);case"animation":return new pw(t);case"crosshair":return new fw(i)}}};Sw.TEMPLATE='<div class="ag-chart-advanced-settings-wrapper"></div>',zv([s.o7C],Sw.prototype,"postConstruct",1);var ww=Sw,xw=class extends s.XQb{showMenu(e,t){this.hideMenu();const i=this.createBean(new Mw(e));this.activeDialog=this.createBean(new s.fNJ({title:this.chartTranslationService.translate("advancedSettings"),component:i,width:300,height:400,resizable:!0,movable:!0,centered:!0,closable:!0,afterGuiAttached:()=>{var e;null==(e=this.focusService.findFocusableElements(i.getGui())[0])||e.focus()},closedCallback:()=>{this.activeMenu=this.destroyBean(this.activeMenu),this.activeDialog=void 0,null==t||t.focus({preventScroll:!0})}})),this.activeMenu=i}hideMenu(){this.activeDialog&&this.destroyBean(this.activeDialog)}destroy(){this.activeMenu=this.destroyBean(this.activeMenu),this.activeDialog=this.destroyBean(this.activeDialog),super.destroy()}};zv([(0,s.dsm)("focusService")],xw.prototype,"focusService",2),zv([(0,s.dsm)("chartTranslationService")],xw.prototype,"chartTranslationService",2),xw=zv([(0,s.dR4)("advancedSettingsMenuFactory")],xw);var Ew=class e extends s.aJZ{constructor(t){super(e.TEMPLATE),this.chartMenuContext=t}postConstruct(){this.advancedSettingsPanel=this.createManagedBean(new ww(this.chartMenuContext)),this.getGui().appendChild(this.advancedSettingsPanel.getGui()),this.initialiseTabGuard({onTabKeyDown:this.onTabKeyDown.bind(this),focusTrapActive:!0})}onTabKeyDown(e){if(e.defaultPrevented)return;e.preventDefault();const t=e.shiftKey,i=this.advancedSettingsPanel.getGui(),n=this.focusService.findNextFocusableElement(i,!1,t);if(n)n.focus();else{const e=this.focusService.findFocusableElements(i);e.length&&e[t?e.length-1:0].focus()}}};Ew.TEMPLATE='<div class="ag-chart-advanced-settings"></div>',zv([(0,s.dsm)("focusService")],Ew.prototype,"focusService",2),zv([s.o7C],Ew.prototype,"postConstruct",1);var Mw=Ew,Aw={version:PS,validate:()=>function({gridVersion:e,chartsVersion:t}){if(!lw(t))return{isValid:!1,message:cw({type:"invalidCharts",gridVersion:e,chartsVersion:t})};if(!lw(e))return{isValid:!1,message:cw({type:"invalidGrid",gridVersion:e,chartsVersion:t})};const[i,n]=e.split(".")||[],[s,r,o]=t.split(".")||[],a=function({gridMajorVersion:e,chartsMajorVersion:t}){const i=parseInt(e,10)-28;return i===parseInt(t,10)-6&&i>=0}({gridMajorVersion:i,chartsMajorVersion:s});return a&&n===r||o.includes("beta")?{isValid:!0}:a&&n===r?{isValid:!1,message:cw({type:"invalid",gridVersion:e,chartsVersion:t})}:{isValid:!1,message:cw({type:"incompatible",gridVersion:e,chartsVersion:t})}}({gridVersion:PS,chartsVersion:rw.CHARTS_VERSION}),moduleName:s.zsj.GridChartsModule,beans:[rw,ow,aw,hw,AS,xw],agStackComponents:[{componentName:"AgColorPicker",componentClass:MC},{componentName:"AgAngleSelect",componentClass:rC},{componentName:"AgPillSelect",componentClass:Oy}],dependantModules:[Rv,fm]},Tw=0,Dw={time:I,AgChart:Df},Iw=Object.defineProperty,Rw=Object.getOwnPropertyDescriptor,Lw=(e,t,i,n)=>{for(var s,r=n>1?void 0:n?Rw(t,i):t,o=e.length-1;o>=0;o--)(s=e[o])&&(r=(n?s(t,i,r):s(r))||r);return n&&r&&Iw(t,i,r),r},kw="paste",Pw="dragCopy",Nw="clipboard",Ow=e=>`AG Grid: Unable to use the Clipboard API (navigator.clipboard.${e}()). The reason why it could not be used has been logged in the previous line. For this reason the grid has defaulted to using a workaround which doesn't perform as well. Either fix why Clipboard API is blocked, OR stop this message from appearing by setting grid property suppressClipboardApi=true (which will default the grid to using the workaround rather than the API.`,_w=class extends s.XQb{constructor(){super(...arguments),this.lastPasteOperationTime=0,this.navigatorApiFailed=!1}init(){this.logger=this.loggerFactory.create("ClipboardService"),"clientSide"===this.rowModel.getType()&&(this.clientSideRowModel=this.rowModel),this.ctrlsService.whenReady(e=>{this.gridCtrl=e.gridCtrl})}pasteFromClipboard(){this.logger.log("pasteFromClipboard"),!this.gos.get("suppressClipboardApi")&&!this.navigatorApiFailed&&navigator.clipboard&&navigator.clipboard.readText?navigator.clipboard.readText().then(this.processClipboardData.bind(this)).catch(e=>{s._.doOnce(()=>{console.warn(e),console.warn(Ow("readText"))},"clipboardApiError"),this.navigatorApiFailed=!0,this.pasteFromClipboardLegacy()}):this.pasteFromClipboardLegacy()}pasteFromClipboardLegacy(){let e=!1;const t=t=>{const i=(new Date).getTime();i-this.lastPasteOperationTime<50&&(e=!0,t.preventDefault()),this.lastPasteOperationTime=i};this.executeOnTempElement(e=>{e.addEventListener("paste",t),e.focus({preventScroll:!0})},i=>{const n=i.value;e?this.refocusLastFocusedCell():this.processClipboardData(n),i.removeEventListener("paste",t)})}refocusLastFocusedCell(){const e=this.focusService.getFocusedCell();e&&this.focusService.setFocusedCell({rowIndex:e.rowIndex,column:e.column,rowPinned:e.rowPinned,forceBrowserFocus:!0})}getClipboardDelimiter(){const e=this.gos.get("clipboardDelimiter");return s._.exists(e)?e:"\t"}processClipboardData(e){if(null==e)return;let t=_w.stringToArray(e,this.getClipboardDelimiter());const i=this.gos.getCallback("processDataFromClipboard");i&&(t=i({data:t})),null!=t&&(this.gos.get("suppressLastEmptyLineOnPaste")&&this.removeLastLineIfBlank(t),this.doPasteOperation((e,i,n,s)=>{var r;(null==(r=this.rangeService)?void 0:r.isMoreThanOneCell())&&!this.hasOnlyOneValueToPaste(t)?this.pasteIntoActiveRange(this.rangeService,t,e,i,s):this.pasteStartingFromFocusedCell(t,e,i,n,s)}))}static stringToArray(e,t=","){const i=[],n=e=>"\r"===e||"\n"===e;let s=!1;if(""===e)return[[""]];for(let r=0,o=0,a=0;a<e.length;a++){const l=e[a-1],c=e[a],h=e[a+1],d=()=>{i[r]||(i[r]=[]),i[r][o]||(i[r][o]="")};if(d(),'"'===c&&(s?'"'===h?(i[r][o]+='"',a++):s=!1:(void 0===l||l===t||n(l))&&(s=!0)),!s&&'"'!==c){if(c===t){o++,d();continue}if(n(c)){o=0,r++,d(),"\r"===c&&"\n"===h&&a++;continue}}i[r][o]+=c}return i}doPasteOperation(e){const t="clipboard";let i;if(this.eventService.dispatchEvent({type:s.sVA.EVENT_PASTE_START,source:t}),this.clientSideRowModel){const e=this.gos.get("aggregateOnlyChangedColumns");i=new s.k$d(e,this.clientSideRowModel.getRootNode())}const n={},r=[];e(n,r,this.focusService.getFocusedCell(),i);const o=[...r];i&&(this.clientSideRowModel.doAggregate(i),i.forEachChangedNodeDepthFirst(e=>{o.push(e)})),this.rowRenderer.refreshCells({rowNodes:o}),this.dispatchFlashCells(n),this.fireRowChanged(r),this.refocusLastFocusedCell();const a={type:s.sVA.EVENT_PASTE_END,source:t};this.eventService.dispatchEvent(a)}pasteIntoActiveRange(e,t,i,n,s){const r=this.getRangeSize(e)%t.length!=0;let o=0,a=0;this.iterateActiveRanges(!1,(e,l,c,h)=>{if(h-o>=t.length){if(r)return;o+=a,a=0}const d=t[h-o];n.push(l);const u=this.gos.getCallback("processCellFromClipboard");c.forEach((t,n)=>{if(!t.isCellEditable(l)||t.isSuppressPaste(l))return;n>=d.length&&(n%=d.length);const r=this.processCell(l,t,d[n],Pw,u,!0);l.setDataValue(t,r,kw),s&&s.addParentNode(l.parent,[t]);const{rowIndex:o,rowPinned:a}=e,c=this.cellPositionUtils.createIdFromValues({rowIndex:o,column:t,rowPinned:a});i[c]=!0}),a++})}getDisplayedColumnsStartingAt(e){let t=e;const i=[];for(;null!=t;)i.push(t),t=this.columnModel.getDisplayedColAfter(t);return i}pasteStartingFromFocusedCell(e,t,i,n,s){if(!n)return;const r={rowIndex:n.rowIndex,rowPinned:n.rowPinned},o=this.getDisplayedColumnsStartingAt(n.column);this.isPasteSingleValueIntoRange(e)?this.pasteSingleValueIntoRange(e,i,t,s):this.pasteMultipleValues(e,r,i,o,t,Nw,s)}isPasteSingleValueIntoRange(e){return this.hasOnlyOneValueToPaste(e)&&null!=this.rangeService&&!this.rangeService.isEmpty()}pasteSingleValueIntoRange(e,t,i,n){const s=e[0][0];this.iterateActiveRanges(!1,(e,r,o)=>{t.push(r),o.forEach(e=>this.updateCellValue(r,e,s,i,Nw,n))})}hasOnlyOneValueToPaste(e){return 1===e.length&&1===e[0].length}copyRangeDown(){if(!this.rangeService||this.rangeService.isEmpty())return;const e=[];this.doPasteOperation((t,i,n,s)=>{const r=this.gos.getCallback("processCellForClipboard"),o=this.gos.getCallback("processCellFromClipboard");this.iterateActiveRanges(!0,(n,a,l)=>{e.length?(i.push(a),l.forEach((i,r)=>{if(!i.isCellEditable(a)||i.isSuppressPaste(a))return;const l=this.processCell(a,i,e[r],Pw,o,!0);a.setDataValue(i,l,kw),s&&s.addParentNode(a.parent,[i]);const{rowIndex:c,rowPinned:h}=n,d=this.cellPositionUtils.createIdFromValues({rowIndex:c,column:i,rowPinned:h});t[d]=!0})):l.forEach(t=>{const i=this.processCell(a,t,this.valueService.getValue(t,a),Pw,r,!1,!0);e.push(i)})})})}removeLastLineIfBlank(e){const t=s._.last(e);if(t&&1===t.length&&""===t[0]){if(1===e.length)return;s._.removeFromArray(e,t)}}fireRowChanged(e){"fullRow"===this.gos.get("editType")&&e.forEach(e=>{const t={type:s.sVA.EVENT_ROW_VALUE_CHANGED,node:e,data:e.data,rowIndex:e.rowIndex,rowPinned:e.rowPinned};this.eventService.dispatchEvent(t)})}pasteMultipleValues(e,t,i,n,s,r,o){let a=t;const l=null!=this.clientSideRowModel&&!this.gos.get("enableGroupEdit")&&!this.gos.get("treeData"),c=()=>{for(;;){if(!a)return null;const e=this.rowPositionUtils.getRowNode(a);if(a=this.cellNavigationService.getRowBelow({rowPinned:a.rowPinned,rowIndex:a.rowIndex}),null==e)return null;if(!(e.detail||e.footer||l&&e.group))return e}};e.forEach(e=>{const t=c();t&&(e.forEach((e,i)=>this.updateCellValue(t,n[i],e,s,r,o)),i.push(t))})}updateCellValue(e,t,i,n,s,r){if(!e||!t||!t.isCellEditable(e)||t.isSuppressPaste(e))return;if(e.group&&t.isValueActive())return;const o=this.processCell(e,t,i,s,this.gos.getCallback("processCellFromClipboard"),!0);e.setDataValue(t,o,kw);const{rowIndex:a,rowPinned:l}=e;n[this.cellPositionUtils.createIdFromValues({rowIndex:a,column:t,rowPinned:l})]=!0,r&&r.addParentNode(e.parent,[t])}copyToClipboard(e={}){this.copyOrCutToClipboard(e)}cutToClipboard(e={},t="api"){if(this.gos.get("suppressCutToClipboard"))return;const i={type:s.sVA.EVENT_CUT_START,source:t};this.eventService.dispatchEvent(i),this.copyOrCutToClipboard(e,!0);const n={type:s.sVA.EVENT_CUT_END,source:t};this.eventService.dispatchEvent(n)}copyOrCutToClipboard(e,t){let{includeHeaders:i,includeGroupHeaders:n}=e;this.logger.log(`copyToClipboard: includeHeaders = ${i}`),null==i&&(i=this.gos.get("copyHeadersToClipboard")),null==n&&(n=this.gos.get("copyGroupHeadersToClipboard"));const s={includeHeaders:i,includeGroupHeaders:n},r=!this.gos.get("suppressCopyRowsToClipboard");let o=null;!this.rangeService||this.rangeService.isEmpty()||this.shouldSkipSingleCellRange(this.rangeService)?r&&!this.selectionService.isEmpty()?(this.copySelectedRowsToClipboard(s),o=1):this.focusService.isAnyCellFocused()&&(this.copyFocusedCellToClipboard(s),o=2):(this.copySelectedRangeToClipboard(s),o=0),t&&null!==o&&this.clearCellsAfterCopy(o)}clearCellsAfterCopy(e){if(this.eventService.dispatchEvent({type:s.sVA.EVENT_KEY_SHORTCUT_CHANGED_CELL_START}),0===e)this.rangeService.clearCellRangeCellValues({cellEventSource:"clipboardService"});else if(1===e)this.clearSelectedRows();else{const e=this.focusService.getFocusedCell();if(null==e)return;const t=this.rowPositionUtils.getRowNode(e);t&&this.clearCellValue(t,e.column)}this.eventService.dispatchEvent({type:s.sVA.EVENT_KEY_SHORTCUT_CHANGED_CELL_END})}clearSelectedRows(){const e=this.selectionService.getSelectedNodes(),t=this.columnModel.getAllDisplayedColumns();for(const i of e)for(const e of t)this.clearCellValue(i,e)}clearCellValue(e,t){var i;if(!t.isCellEditable(e))return;const n=null!=(i=this.valueService.parseValue(t,e,"",e.getValueFromValueService(t)))?i:null;e.setDataValue(t,n,"clipboardService")}shouldSkipSingleCellRange(e){return this.gos.get("suppressCopySingleCellRanges")&&!e.isMoreThanOneCell()}iterateActiveRanges(e,t,i){if(!this.rangeService||this.rangeService.isEmpty())return;const n=this.rangeService.getCellRanges();e?this.iterateActiveRange(n[0],t,i,!0):n.forEach((e,s)=>this.iterateActiveRange(e,t,i,s===n.length-1))}iterateActiveRange(e,t,i,n){if(!this.rangeService)return;let s=this.rangeService.getRangeStartRow(e);const r=this.rangeService.getRangeEndRow(e);i&&e.columns&&i(e.columns);let o=0,a=!1;for(;!a&&null!=s;){const i=this.rowPositionUtils.getRowNode(s);a=this.rowPositionUtils.sameRow(s,r),t(s,i,e.columns,o++,a&&n),s=this.cellNavigationService.getRowBelow(s)}}copySelectedRangeToClipboard(e={}){if(!this.rangeService||this.rangeService.isEmpty())return;const t=this.rangeService.areAllRangesAbleToMerge(),{data:i,cellsToFlash:n}=t?this.buildDataFromMergedRanges(this.rangeService,e):this.buildDataFromRanges(this.rangeService,e);this.copyDataToClipboard(i),this.dispatchFlashCells(n)}buildDataFromMergedRanges(e,t){const i=new Set,n=e.getCellRanges(),s=new Map,r=[],o={};n.forEach(t=>{t.columns.forEach(e=>i.add(e));const{rowPositions:n,cellsToFlash:a}=this.getRangeRowPositionsAndCellsToFlash(e,t);n.forEach(e=>{const t=`${e.rowIndex}-${e.rowPinned||"null"}`;s.get(t)||(s.set(t,!0),r.push(e))}),Object.assign(o,a)});const a=this.columnModel.getAllDisplayedColumns(),l=Array.from(i);return l.sort((e,t)=>a.indexOf(e)-a.indexOf(t)),{data:this.buildExportParams({columns:l,rowPositions:r,includeHeaders:t.includeHeaders,includeGroupHeaders:t.includeGroupHeaders}),cellsToFlash:o}}buildDataFromRanges(e,t){const i=e.getCellRanges(),n=[],s={};return i.forEach(i=>{const{rowPositions:r,cellsToFlash:o}=this.getRangeRowPositionsAndCellsToFlash(e,i);Object.assign(s,o),n.push(this.buildExportParams({columns:i.columns,rowPositions:r,includeHeaders:t.includeHeaders,includeGroupHeaders:t.includeGroupHeaders}))}),{data:n.join("\n"),cellsToFlash:s}}getRangeRowPositionsAndCellsToFlash(e,t){const i=[],n={},s=e.getRangeStartRow(t),r=e.getRangeEndRow(t);let o=s;for(;o&&(i.push(o),t.columns.forEach(e=>{const{rowIndex:t,rowPinned:i}=o,s=this.cellPositionUtils.createIdFromValues({rowIndex:t,column:e,rowPinned:i});n[s]=!0}),!this.rowPositionUtils.sameRow(o,r));)o=this.cellNavigationService.getRowBelow(o);return{rowPositions:i,cellsToFlash:n}}getCellsToFlashFromRowNodes(e){const t=this.columnModel.getAllDisplayedColumns(),i={};for(let n=0;n<e.length;n++){const{rowIndex:s,rowPinned:r}=e[n];if(null!=s)for(let e=0;e<t.length;e++){const n=t[e];i[this.cellPositionUtils.createIdFromValues({rowIndex:s,column:n,rowPinned:r})]=!0}}return i}copyFocusedCellToClipboard(e={}){const t=this.focusService.getFocusedCell();if(null==t)return;const i=this.cellPositionUtils.createId(t),n={rowPinned:t.rowPinned,rowIndex:t.rowIndex},s=t.column,r=this.buildExportParams({columns:[s],rowPositions:[n],includeHeaders:e.includeHeaders,includeGroupHeaders:e.includeGroupHeaders});this.copyDataToClipboard(r),this.dispatchFlashCells({[i]:!0})}copySelectedRowsToClipboard(e={}){const{columnKeys:t,includeHeaders:i,includeGroupHeaders:n}=e,s=this.buildExportParams({columns:t,includeHeaders:i,includeGroupHeaders:n});this.copyDataToClipboard(s);const r=this.selectionService.getSelectedNodes()||[];this.dispatchFlashCells(this.getCellsToFlashFromRowNodes(r))}buildExportParams(e){const{columns:t,rowPositions:i,includeHeaders:n=!1,includeGroupHeaders:s=!1}=e,r={columnKeys:t,rowPositions:i,skipColumnHeaders:!n,skipColumnGroupHeaders:!s,suppressQuotes:!0,columnSeparator:this.getClipboardDelimiter(),onlySelected:!i,processCellCallback:this.gos.getCallback("processCellForClipboard"),processRowGroupCallback:e=>this.processRowGroupCallback(e),processHeaderCallback:this.gos.getCallback("processHeaderForClipboard"),processGroupHeaderCallback:this.gos.getCallback("processGroupHeaderForClipboard")};return this.csvCreator.getDataAsCsv(r,!0)}processRowGroupCallback(e){const{node:t,column:i}=e,n=this.gos.get("treeData"),s=this.gos.get("suppressGroupMaintainValueType");let r=(()=>{var e,r;if(n||s||!i)return t.key;const o=null==(e=t.groupData)?void 0:e[i.getId()];return o&&t.rowGroupColumn&&!1!==t.rowGroupColumn.getColDef().useValueFormatterForExport&&null!=(r=this.valueService.formatValue(t.rowGroupColumn,t,o))?r:o})();if(e.node.footer){let e="";r&&r.length&&(e=` ${r}`),r=`Total${e}`}const o=this.gos.getCallback("processCellForClipboard");if(o){let e=t.rowGroupColumn;return!e&&t.footer&&-1===t.level&&(e=this.columnModel.getRowGroupColumns()[0]),o({value:r,node:t,column:e,type:"clipboard",formatValue:i=>{var n;return null!=(n=this.valueService.formatValue(e,t,i))?n:i},parseValue:i=>this.valueService.parseValue(e,t,i,this.valueService.getValue(e,t))})}return r}dispatchFlashCells(e){window.setTimeout(()=>{const t={type:s.sVA.EVENT_FLASH_CELLS,cells:e};this.eventService.dispatchEvent(t)},0)}processCell(e,t,i,n,s,r,o){var a;return s?s({column:t,node:e,value:i,type:n,formatValue:i=>{var n;return null!=(n=this.valueService.formatValue(t,null!=e?e:null,i))?n:i},parseValue:i=>this.valueService.parseValue(t,null!=e?e:null,i,this.valueService.getValue(t,e))}):r&&!1!==t.getColDef().useValueParserForImport?this.valueService.parseValue(t,null!=e?e:null,i,this.valueService.getValue(t,e)):o&&!1!==t.getColDef().useValueFormatterForExport&&null!=(a=this.valueService.formatValue(t,null!=e?e:null,i))?a:i}copyDataToClipboard(e){const t=this.gos.getCallback("sendToClipboard");t?t({data:e}):!this.gos.get("suppressClipboardApi")&&navigator.clipboard?navigator.clipboard.writeText(e).catch(t=>{s._.doOnce(()=>{console.warn(t),console.warn(Ow("writeText"))},"clipboardApiError"),this.copyDataToClipboardLegacy(e)}):this.copyDataToClipboardLegacy(e)}copyDataToClipboardLegacy(e){this.executeOnTempElement(t=>{const i=this.gos.getDocument(),n=this.gos.getActiveDomElement();t.value=e||" ",t.select(),t.focus({preventScroll:!0}),i.execCommand("copy")||console.warn("AG Grid: Browser did not allow document.execCommand('copy'). Ensure api.copySelectedRowsToClipboard() is invoked via a user event, i.e. button click, otherwise the browser will prevent it for security reasons."),null!=n&&null!=n.focus&&n.focus({preventScroll:!0})})}executeOnTempElement(e,t){const i=this.gos.getDocument(),n=i.createElement("textarea");n.style.width="1px",n.style.height="1px",n.style.top=i.documentElement.scrollTop+"px",n.style.left=i.documentElement.scrollLeft+"px",n.style.position="absolute",n.style.opacity="0";const s=this.gridCtrl.getGui();s.appendChild(n);try{e(n)}catch(e){console.warn("AG Grid: Browser does not support document.execCommand('copy') for clipboard operations")}t?window.setTimeout(()=>{t(n),s.removeChild(n)},100):s.removeChild(n)}getRangeSize(e){const t=e.getCellRanges();let i=0,n=0;return t.length>0&&(i=e.getRangeStartRow(t[0]).rowIndex,n=e.getRangeEndRow(t[0]).rowIndex),i-n+1}};Lw([(0,s.dsm)("csvCreator")],_w.prototype,"csvCreator",2),Lw([(0,s.dsm)("loggerFactory")],_w.prototype,"loggerFactory",2),Lw([(0,s.dsm)("selectionService")],_w.prototype,"selectionService",2),Lw([(0,s.dsm)("rowModel")],_w.prototype,"rowModel",2),Lw([(0,s.dsm)("ctrlsService")],_w.prototype,"ctrlsService",2),Lw([(0,s.dsm)("valueService")],_w.prototype,"valueService",2),Lw([(0,s.dsm)("focusService")],_w.prototype,"focusService",2),Lw([(0,s.dsm)("rowRenderer")],_w.prototype,"rowRenderer",2),Lw([(0,s.dsm)("columnModel")],_w.prototype,"columnModel",2),Lw([(0,s.dsm)("cellNavigationService")],_w.prototype,"cellNavigationService",2),Lw([(0,s.dsm)("cellPositionUtils")],_w.prototype,"cellPositionUtils",2),Lw([(0,s.dsm)("rowPositionUtils")],_w.prototype,"rowPositionUtils",2),Lw([(0,s.Xx1)("rangeService")],_w.prototype,"rangeService",2),Lw([s.o7C],_w.prototype,"init",1),_w=Lw([(0,s.dR4)("clipboardService")],_w);var Fw={version:"31.3.4",moduleName:s.zsj.ClipboardModule,beans:[_w],dependantModules:[fm,s.n76]},Gw=Object.defineProperty,Vw=Object.defineProperties,Bw=Object.getOwnPropertyDescriptor,Hw=Object.getOwnPropertyDescriptors,zw=Object.getOwnPropertySymbols,Uw=Object.prototype.hasOwnProperty,Ww=Object.prototype.propertyIsEnumerable,jw=(e,t,i)=>t in e?Gw(e,t,{enumerable:!0,configurable:!0,writable:!0,value:i}):e[t]=i,Kw=(e,t,i,n)=>{for(var s,r=n>1?void 0:n?Bw(t,i):t,o=e.length-1;o>=0;o--)(s=e[o])&&(r=(n?s(t,i,r):s(r))||r);return n&&r&&Gw(t,i,r),r},$w=class extends s.XQb{execute(e){const t=s._.missingOrEmpty(this.columnModel.getValueColumns()),i=!this.gos.getCallback("getGroupRowAgg"),n=e.changedPath&&e.changedPath.isActive();if(t&&i&&n)return;const r=this.createAggDetails(e);this.recursivelyCreateAggData(r)}createAggDetails(e){const t=this.columnModel.isPivotActive(),i=this.columnModel.getValueColumns(),n=t?this.columnModel.getPivotColumns():[];return{alwaysAggregateAtRootLevel:this.gos.get("alwaysAggregateAtRootLevel"),groupIncludeTotalFooter:!!this.gos.getGrandTotalRow(),changedPath:e.changedPath,valueColumns:i,pivotColumns:n,filteredOnly:!this.isSuppressAggFilteredOnly(),userAggFunc:this.gos.getCallback("getGroupRowAgg")}}isSuppressAggFilteredOnly(){return void 0!==this.gos.getGroupAggFiltering()||this.gos.get("suppressAggFilteredOnly")}recursivelyCreateAggData(e){e.changedPath.forEachChangedNodeDepthFirst(t=>{if(t.hasChildren()){if(-1===t.level&&!e.groupIncludeTotalFooter){const i=!this.columnModel.isPivotMode();if(!e.alwaysAggregateAtRootLevel&&i)return void t.setAggData(null)}this.aggregateRowNode(t,e)}else t.aggData&&t.setAggData(null)},!0)}aggregateRowNode(e,t){const i=0===t.valueColumns.length,n=0===t.pivotColumns.length;let s;s=t.userAggFunc?t.userAggFunc({nodes:e.childrenAfterFilter}):i?null:n?this.aggregateRowNodeUsingValuesOnly(e,t):this.aggregateRowNodeUsingValuesAndPivot(e),e.setAggData(s),e.sibling&&e.sibling.setAggData(s)}aggregateRowNodeUsingValuesAndPivot(e){var t,i;const n={},s=null!=(t=this.columnModel.getSecondaryColumns())?t:[];let r=!0;for(let t=0;t<s.length;t++){const o=s[t],a=o.getColDef();if(null!=a.pivotTotalColumnIds){r=!1;continue}const l=null!=(i=a.pivotKeys)?i:[];let c;c=e.leafGroup?this.getValuesFromMappedSet(e.childrenMapped,l,a.pivotValueColumn):this.getValuesPivotNonLeaf(e,a.colId),n[a.colId]=this.aggregateValues(c,a.pivotValueColumn.getAggFunc(),a.pivotValueColumn,e,o)}if(!r)for(let t=0;t<s.length;t++){const i=s[t],r=i.getColDef();if(null==r.pivotTotalColumnIds||!r.pivotTotalColumnIds.length)continue;const o=r.pivotTotalColumnIds.map(e=>n[e]);n[r.colId]=this.aggregateValues(o,r.pivotValueColumn.getAggFunc(),r.pivotValueColumn,e,i)}return n}aggregateRowNodeUsingValuesOnly(e,t){const i={},n=t.changedPath.isActive()?t.changedPath.getValueColumnsForNode(e,t.valueColumns):t.valueColumns,s=t.changedPath.isActive()?t.changedPath.getNotValueColumnsForNode(e,t.valueColumns):null,r=this.getValuesNormal(e,n,t.filteredOnly),o=e.aggData;return n.forEach((t,n)=>{i[t.getId()]=this.aggregateValues(r[n],t.getAggFunc(),t,e)}),s&&o&&s.forEach(e=>{i[e.getId()]=o[e.getId()]}),i}getValuesPivotNonLeaf(e,t){return e.childrenAfterFilter.map(e=>e.aggData[t])}getValuesFromMappedSet(e,t,i){let n=e;for(let e=0;e<t.length;e++){const i=t[e];n=n?n[i]:null}return n?n.map(e=>this.valueService.getValue(i,e)):[]}getValuesNormal(e,t,i){const n=[];t.forEach(()=>n.push([]));const s=t.length,r=i?e.childrenAfterFilter:e.childrenAfterGroup,o=r.length;for(let e=0;e<o;e++){const i=r[e];for(let e=0;e<s;e++){const s=t[e],r=this.valueService.getValue(s,i);n[e].push(r)}}return n}aggregateValues(e,t,i,n,s){const r="string"==typeof t?this.aggFuncService.getAggFunc(t):t;return"function"!=typeof r?(console.error(`AG Grid: unrecognised aggregation function ${t}`),null):r(this.gos.addGridCommonParams({values:e,column:i,colDef:i?i.getColDef():void 0,pivotResultColumn:s,rowNode:n,data:n?n.data:void 0}))}};Kw([(0,s.dsm)("columnModel")],$w.prototype,"columnModel",2),Kw([(0,s.dsm)("valueService")],$w.prototype,"valueService",2),Kw([(0,s.dsm)("aggFuncService")],$w.prototype,"aggFuncService",2),$w=Kw([(0,s.dR4)("aggregationStage")],$w);var Yw=class{constructor(){this.allSets={},this.allParents=[]}removeFromChildrenAfterGroup(e,t){this.getSet(e).removeFromChildrenAfterGroup[t.id]=!0}isRemoveFromAllLeafChildren(e,t){return!!this.getSet(e).removeFromAllLeafChildren[t.id]}preventRemoveFromAllLeafChildren(e,t){delete this.getSet(e).removeFromAllLeafChildren[t.id]}removeFromAllLeafChildren(e,t){this.getSet(e).removeFromAllLeafChildren[t.id]=!0}getSet(e){return this.allSets[e.id]||(this.allSets[e.id]={removeFromAllLeafChildren:{},removeFromChildrenAfterGroup:{}},this.allParents.push(e)),this.allSets[e.id]}getAllParents(){return this.allParents}flush(){this.allParents.forEach(e=>{const t=this.allSets[e.id];e.childrenAfterGroup=e.childrenAfterGroup.filter(e=>!t.removeFromChildrenAfterGroup[e.id]),e.allLeafChildren=e.allLeafChildren.filter(e=>!t.removeFromAllLeafChildren[e.id]),e.updateHasChildren(),e.sibling&&(e.sibling.childrenAfterGroup=e.childrenAfterGroup,e.sibling.allLeafChildren=e.allLeafChildren)}),this.allSets={},this.allParents.length=0}},qw=class extends s.XQb{execute(e){const t=this.createGroupingDetails(e);if(t.transactions)this.handleTransaction(t);else{const i=!0===e.afterColumnsChanged;this.shotgunResetEverything(t,i)}t.usingTreeData||(this.positionLeafsAndGroups(e.changedPath),this.orderGroups(t)),this.selectableService.updateSelectableAfterGrouping()}positionLeafsAndGroups(e){e.forEachChangedNodeDepthFirst(e=>{if(e.childrenAfterGroup){const t=[],i=[];let n;e.childrenAfterGroup.forEach(e=>{var s;(null==(s=e.childrenAfterGroup)?void 0:s.length)?""!==e.key||n?i.push(e):n=e:t.push(e)}),n&&i.push(n),e.childrenAfterGroup=[...t,...i]}},!1)}createGroupingDetails(e){var t;const{rowNode:i,changedPath:n,rowNodeTransactions:s,rowNodeOrder:r}=e,o=this.gos.get("treeData"),a=o?null:this.columnModel.getRowGroupColumns();return{includeParents:!this.gos.get("suppressParentsInRowNodes"),expandByDefault:this.gos.get("groupDefaultExpanded"),groupedCols:a,rootNode:i,pivotMode:this.columnModel.isPivotMode(),groupedColCount:o||!a?0:a.length,rowNodeOrder:r,transactions:s,changedPath:n,groupAllowUnbalanced:this.gos.get("groupAllowUnbalanced"),isGroupOpenByDefault:this.gos.getCallback("isGroupOpenByDefault"),initialGroupOrderComparator:this.gos.getCallback("initialGroupOrderComparator"),usingTreeData:o,suppressGroupMaintainValueType:this.gos.get("suppressGroupMaintainValueType"),getDataPath:o?this.gos.get("getDataPath"):void 0,keyCreators:null!=(t=null==a?void 0:a.map(e=>e.getColDef().keyCreator))?t:[]}}handleTransaction(e){e.transactions.forEach(t=>{const i=e.usingTreeData?void 0:new Yw;if(s._.existsAndNotEmpty(t.remove)&&this.removeNodes(t.remove,e,i),s._.existsAndNotEmpty(t.update)&&this.moveNodesInWrongPath(t.update,e,i),s._.existsAndNotEmpty(t.add)&&this.insertNodes(t.add,e,!1),i){const t=i.getAllParents().slice();i.flush(),this.removeEmptyGroups(t,e)}}),e.rowNodeOrder&&this.sortChildren(e)}sortChildren(e){e.changedPath.forEachChangedNodeDepthFirst(t=>{t.childrenAfterGroup&&s._.sortRowNodesByOrder(t.childrenAfterGroup,e.rowNodeOrder)&&e.changedPath.addParentNode(t)},!1,!0)}orderGroups(e){const t=e.initialGroupOrderComparator;s._.exists(t)&&function e(i){s._.exists(i.childrenAfterGroup)&&!i.leafGroup&&(i.childrenAfterGroup.sort((e,i)=>t({nodeA:e,nodeB:i})),i.childrenAfterGroup.forEach(t=>e(t)))}(e.rootNode)}getExistingPathForNode(e,t){const i=[];let n=t.usingTreeData?e:e.parent;for(;n&&n!==t.rootNode;)i.push({key:n.key,rowGroupColumn:n.rowGroupColumn,field:n.field}),n=n.parent;return i.reverse(),i}moveNodesInWrongPath(e,t,i){e.forEach(e=>{t.changedPath.isActive()&&t.changedPath.addParentNode(e.parent);const n=e=>e.key,r=this.getExistingPathForNode(e,t).map(n),o=this.getGroupInfo(e,t).map(n);s._.areEqual(r,o)||this.moveNode(e,t,i)})}moveNode(e,t,i){if(this.removeNodesInStages([e],t,i),this.insertOneNode(e,t,!0,i),e.setData(e.data),t.changedPath.isActive()){const i=e.parent;t.changedPath.addParentNode(i)}}removeNodes(e,t,i){this.removeNodesInStages(e,t,i),t.changedPath.isActive()&&e.forEach(e=>t.changedPath.addParentNode(e.parent))}removeNodesInStages(e,t,i){if(this.removeNodesFromParents(e,t,i),t.usingTreeData){this.postRemoveCreateFillerNodes(e,t);const i=e.map(e=>e.parent);this.removeEmptyGroups(i,t)}}forEachParentGroup(e,t,i){let n=t;for(;n&&n!==e.rootNode;)i(n),n=n.parent}removeNodesFromParents(e,t,i){const n=null==i,s=i||new Yw;e.forEach(e=>{this.removeFromParent(e,s),this.forEachParentGroup(t,e.parent,t=>{s.removeFromAllLeafChildren(t,e)})}),n&&s.flush()}postRemoveCreateFillerNodes(e,t){e.forEach(e=>{if(e.hasChildren()){const i=this.getExistingPathForNode(e,t),n=this.findParentForNode(e,i,t);n.expanded=e.expanded,n.allLeafChildren=e.allLeafChildren,n.childrenAfterGroup=e.childrenAfterGroup,n.childrenMapped=e.childrenMapped,n.updateHasChildren(),n.childrenAfterGroup.forEach(e=>e.parent=n)}})}removeEmptyGroups(e,t){let i=!0;const n=e=>{const t=this.getChildrenMappedKey(e.key,e.rowGroupColumn),i=e.parent;return!!(i&&i.childrenMapped&&i.childrenMapped[t]&&e.isEmptyRowGroupNode())};for(;i;){i=!1;const s=new Yw;e.forEach(e=>{this.forEachParentGroup(t,e,e=>{n(e)&&(i=!0,this.removeFromParent(e,s),e.setSelectedParams({newValue:!1,source:"rowGroupChanged"}))})}),s.flush()}}removeFromParent(e,t){e.parent&&(t?t.removeFromChildrenAfterGroup(e.parent,e):(s._.removeFromArray(e.parent.childrenAfterGroup,e),e.parent.updateHasChildren()));const i=this.getChildrenMappedKey(e.key,e.rowGroupColumn);e.parent&&e.parent.childrenMapped&&(e.parent.childrenMapped[i]=void 0),e.setRowTop(null),e.setRowIndex(null)}addToParent(e,t){const i=this.getChildrenMappedKey(e.key,e.rowGroupColumn);t&&(null!=t.childrenMapped&&(t.childrenMapped[i]=e),t.childrenAfterGroup.push(e),t.updateHasChildren())}areGroupColsEqual(e,t){return null!=e&&null!=t&&e.pivotMode===t.pivotMode&&s._.areEqual(e.groupedCols,t.groupedCols)&&s._.areEqual(e.keyCreators,t.keyCreators)}checkAllGroupDataAfterColsChanged(e){const t=i=>{i&&i.forEach(i=>{if(!e.usingTreeData&&!i.group)return;const n={field:i.field,key:i.key,rowGroupColumn:i.rowGroupColumn,leafNode:i.allLeafChildren[0]};this.setGroupData(i,n,e),t(i.childrenAfterGroup)})};t(e.rootNode.childrenAfterGroup)}shotgunResetEverything(e,t){if(this.noChangeInGroupingColumns(e,t))return;this.selectionService.filterFromSelection(e=>e&&!e.group);const{rootNode:i,groupedCols:n}=e;i.leafGroup=!e.usingTreeData&&0===n.length,i.childrenAfterGroup=[],i.childrenMapped={},i.updateHasChildren();const s=i.sibling;s&&(s.childrenAfterGroup=i.childrenAfterGroup,s.childrenMapped=i.childrenMapped),this.insertNodes(i.allLeafChildren,e,!1)}noChangeInGroupingColumns(e,t){let i=!1;const n=this.columnModel.getGroupDisplayColumns(),s=n?n.map(e=>e.getId()).join("-"):"";return t&&(i=e.usingTreeData||this.areGroupColsEqual(e,this.oldGroupingDetails),this.oldGroupDisplayColIds!==s&&this.checkAllGroupDataAfterColsChanged(e)),this.oldGroupingDetails=e,this.oldGroupDisplayColIds=s,i}insertNodes(e,t,i){e.forEach(e=>{this.insertOneNode(e,t,i),t.changedPath.isActive()&&t.changedPath.addParentNode(e.parent)})}insertOneNode(e,t,i,n){const s=this.getGroupInfo(e,t),r=this.findParentForNode(e,s,t,n);r.group||console.warn("AG Grid: duplicate group keys for row data, keys should be unique",[r.data,e.data]),t.usingTreeData?this.swapGroupWithUserNode(r,e,i):(e.parent=r,e.level=s.length,r.childrenAfterGroup.push(e),r.updateHasChildren())}findParentForNode(e,t,i,n){let s=i.rootNode;return t.forEach((t,r)=>{s=this.getOrCreateNextNode(s,t,r,i),(null==n?void 0:n.isRemoveFromAllLeafChildren(s,e))?null==n||n.preventRemoveFromAllLeafChildren(s,e):s.allLeafChildren.push(e)}),s}swapGroupWithUserNode(e,t,i){t.parent=e.parent,t.key=e.key,t.field=e.field,t.groupData=e.groupData,t.level=e.level,i||(t.expanded=e.expanded),t.leafGroup=e.leafGroup,t.rowGroupIndex=e.rowGroupIndex,t.allLeafChildren=e.allLeafChildren,t.childrenAfterGroup=e.childrenAfterGroup,t.childrenMapped=e.childrenMapped,t.sibling=e.sibling,t.updateHasChildren(),this.removeFromParent(e),t.childrenAfterGroup.forEach(e=>e.parent=t),this.addToParent(t,e.parent)}getOrCreateNextNode(e,t,i,n){const s=this.getChildrenMappedKey(t.key,t.rowGroupColumn);let r=e.childrenMapped?e.childrenMapped[s]:void 0;return r||(r=this.createGroup(t,e,i,n),this.addToParent(r,e)),r}createGroup(e,t,i,n){const r=new s.TUE(this.beans);return r.group=!0,r.field=e.field,r.rowGroupColumn=e.rowGroupColumn,this.setGroupData(r,e,n),r.key=e.key,r.id=this.createGroupId(r,t,n.usingTreeData,i),r.level=i,r.leafGroup=!n.usingTreeData&&i===n.groupedColCount-1,r.allLeafChildren=[],r.setAllChildrenCount(0),r.rowGroupIndex=n.usingTreeData?null:i,r.childrenAfterGroup=[],r.childrenMapped={},r.updateHasChildren(),r.parent=n.includeParents?t:null,this.setExpandedInitialValue(n,r),r}createGroupId(e,t,i,n){let r;return r=i?(e,t,i)=>{if(i<0)return null;const n=t?r(t,t.parent,i-1):null;return`${null==n?"":n+"-"}${i}-${e.key}`}:(e,t)=>{if(!e.rowGroupColumn)return null;const i=t?r(t,t.parent,0):null;return`${null==i?"":i+"-"}${e.rowGroupColumn.getColId()}-${e.key}`},s.TUE.ID_PREFIX_ROW_GROUP+r(e,t,n)}setGroupData(e,t,i){e.groupData={},this.columnModel.getGroupDisplayColumns().forEach(n=>{if(i.usingTreeData)return void(e.groupData[n.getColId()]=t.key);const s=e.rowGroupColumn;null!==s&&n.isRowGroupDisplayed(s.getId())&&(i.suppressGroupMaintainValueType?e.groupData[n.getColId()]=t.key:e.groupData[n.getColId()]=this.valueService.getValue(s,t.leafNode))})}getChildrenMappedKey(e,t){return t?t.getId()+"-"+e:e}setExpandedInitialValue(e,t){if(e.pivotMode&&t.leafGroup)return void(t.expanded=!1);const i=e.isGroupOpenByDefault;if(i){const e={rowNode:t,field:t.field,key:t.key,level:t.level,rowGroupColumn:t.rowGroupColumn};return void(t.expanded=1==i(e))}const{expandByDefault:n}=e;-1!==e.expandByDefault?t.expanded=t.level<n:t.expanded=!0}getGroupInfo(e,t){return t.usingTreeData?this.getGroupInfoFromCallback(e,t):this.getGroupInfoFromGroupColumns(e,t)}getGroupInfoFromCallback(e,t){const i=t.getDataPath?t.getDataPath(e.data):null;return null!=i&&0!==i.length||s._.warnOnce(`getDataPath() should not return an empty path for data ${e.data}`),i?i.map(e=>({key:e,field:null,rowGroupColumn:null})):[]}getGroupInfoFromGroupColumns(e,t){const i=[];return t.groupedCols.forEach(n=>{let s=this.valueService.getKeyForNode(n,e),r=null!=s&&""!==s;if((t.pivotMode||!t.groupAllowUnbalanced)&&!r&&(s="",r=!0),r){const t={key:s,field:n.getColDef().field,rowGroupColumn:n,leafNode:e};i.push(t)}}),i}};Kw([(0,s.dsm)("columnModel")],qw.prototype,"columnModel",2),Kw([(0,s.dsm)("selectableService")],qw.prototype,"selectableService",2),Kw([(0,s.dsm)("valueService")],qw.prototype,"valueService",2),Kw([(0,s.dsm)("beans")],qw.prototype,"beans",2),Kw([(0,s.dsm)("selectionService")],qw.prototype,"selectionService",2),qw=Kw([(0,s.dR4)("groupStage")],qw);var Xw=class extends s.XQb{init(){const e=()=>{var e;return null!=(e=this.gos.get("serverSidePivotResultFieldSeparator"))?e:"_"};this.fieldSeparator=e(),this.addManagedPropertyListener("serverSidePivotResultFieldSeparator",()=>{this.fieldSeparator=e()});const t=()=>this.gos.get("pivotDefaultExpanded");this.pivotDefaultExpanded=t(),this.addManagedPropertyListener("pivotDefaultExpanded",()=>{this.pivotDefaultExpanded=t()})}createPivotColumnDefs(e){const t=this.createPivotColumnsFromUniqueValues(e),i=function e(t,i=[]){return t.forEach(t=>{void 0!==t.children?e(t.children,i):i.push(t)}),i}(t);return this.addRowGroupTotals(t,i),this.addExpandablePivotGroups(t,i),this.addPivotTotalsToGroups(t,i),{pivotColumnGroupDefs:t,pivotColumnDefs:i.map(e=>s._.cloneObject(e))}}createPivotColumnsFromUniqueValues(e){const t=this.columnModel.getPivotColumns(),i=t.length;return this.recursivelyBuildGroup(0,e,[],i,t)}recursivelyBuildGroup(e,t,i,n,r){const o=this.columnModel.getValueColumns();if(e>=n)return this.buildMeasureCols(i);const a=r[e].getColDef(),l=this.headerNameComparator.bind(this,a.pivotComparator);if(1===o.length&&this.gos.get("removePivotHeaderRowWhenSingleValueColumn")&&e===n-1){const e=[];return s._.iterateObject(t,t=>{const n=[...i,t],s=this.createColDef(o[0],t,n);s.columnGroupShow="open",e.push(s)}),e.sort(l),e}const c=[];return s._.iterateObject(t,(t,s)=>{const o=-1===this.pivotDefaultExpanded||e<this.pivotDefaultExpanded,a=[...i,t];c.push({children:this.recursivelyBuildGroup(e+1,s,a,n,r),headerName:t,pivotKeys:a,columnGroupShow:"open",openByDefault:o,groupId:this.generateColumnGroupId(a)})}),c.sort(l),c}buildMeasureCols(e){const t=this.columnModel.getValueColumns();return 0===t.length?[this.createColDef(null,"-",e)]:t.map(t=>{const i=this.columnModel.getDisplayNameForColumn(t,"header");return n=((e,t)=>{for(var i in t||(t={}))Uw.call(t,i)&&jw(e,i,t[i]);if(zw)for(var i of zw(t))Ww.call(t,i)&&jw(e,i,t[i]);return e})({},this.createColDef(t,i,e)),Vw(n,Hw({columnGroupShow:"open"}));var n})}addExpandablePivotGroups(e,t){if(this.gos.get("suppressExpandablePivotGroups")||this.gos.get("pivotColumnGroupTotals"))return;const i=(e,t,n)=>{const s=e;if(s.children){const r=new Map;s.children.forEach(e=>{i(e,t,r)});const o=!s.children.some(e=>e.children);this.columnModel.getValueColumns().forEach(i=>{const n=this.columnModel.getDisplayNameForColumn(i,"header"),s=this.createColDef(i,n,e.pivotKeys);s.pivotTotalColumnIds=r.get(i.getColId()),s.columnGroupShow="closed",s.aggFunc=i.getAggFunc(),o||(e.children.push(s),t.push(s))}),this.merge(n,r)}else{const t=e;if(!t.pivotValueColumn)return;const i=t.pivotValueColumn.getColId(),s=n.has(i)?n.get(i):[];s.push(t.colId),n.set(i,s)}};e.forEach(e=>{i(e,t,new Map)})}addPivotTotalsToGroups(e,t){if(!this.gos.get("pivotColumnGroupTotals"))return;const i="after"===this.gos.get("pivotColumnGroupTotals"),n=this.columnModel.getValueColumns(),s=n.map(e=>e.getAggFunc());if(!s||s.length<1||!this.sameAggFuncs(s))return;const r=n[0];e.forEach(e=>{this.recursivelyAddPivotTotal(e,t,r,i)})}recursivelyAddPivotTotal(e,t,i,n){const s=e;if(!s.children){const t=e;return t.colId?[t.colId]:null}let r=[];if(s.children.forEach(e=>{const s=this.recursivelyAddPivotTotal(e,t,i,n);s&&(r=r.concat(s))}),s.children.length>1){const s=this.localeService.getLocaleTextFunc()("pivotColumnGroupTotals","Total"),o=this.createColDef(i,s,e.pivotKeys,!0);o.pivotTotalColumnIds=r,o.aggFunc=i.getAggFunc();const a=e.children;n?a.push(o):a.unshift(o),t.push(o)}return r}addRowGroupTotals(e,t){if(!this.gos.get("pivotRowTotals"))return;const i="after"===this.gos.get("pivotRowTotals"),n=this.columnModel.getValueColumns(),s=i?n.slice():n.slice().reverse();for(let n=0;n<s.length;n++){const r=s[n];let o=[];e.forEach(e=>{o=o.concat(this.extractColIdsForValueColumn(e,r))});const a=s.length>1||!this.gos.get("removePivotHeaderRowWhenSingleValueColumn");this.createRowGroupTotal(e,t,r,o,i,a)}}extractColIdsForValueColumn(e,t){const i=e;if(!i.children){const e=i;return e.pivotValueColumn===t&&e.colId?[e.colId]:[]}let n=[];return i.children.forEach(e=>{this.extractColIdsForValueColumn(e,t);const i=this.extractColIdsForValueColumn(e,t);n=n.concat(i)}),n}createRowGroupTotal(e,t,i,n,s,r){let o;if(0===this.columnModel.getValueColumns().length)o=this.createColDef(null,"-",[]);else{const e=this.columnModel.getDisplayNameForColumn(i,"header");o=this.createColDef(i,e,[]),o.pivotTotalColumnIds=n}o.colId=Xw.PIVOT_ROW_TOTAL_PREFIX+o.colId,t.push(o);const a=r?{children:[o],pivotKeys:[],groupId:`${Xw.PIVOT_ROW_TOTAL_PREFIX}_pivotGroup_${i.getColId()}`}:o;s?e.push(a):e.unshift(a)}createColDef(e,t,i,n=!1){const s={};if(e){const t=e.getColDef();Object.assign(s,t),s.hide=!1}return s.headerName=t,s.colId=this.generateColumnId(i||[],e&&!n?e.getColId():""),s.field=s.colId,s.valueGetter=e=>{var t;return null==(t=e.data)?void 0:t[e.colDef.field]},s.pivotKeys=i,s.pivotValueColumn=e,!0===s.filter&&(s.filter="agNumberColumnFilter"),s}sameAggFuncs(e){if(1==e.length)return!0;for(let t=1;t<e.length;t++)if(e[t]!==e[0])return!1;return!0}headerNameComparator(e,t,i){return e?e(t.headerName,i.headerName):t.headerName&&!i.headerName?1:!t.headerName&&i.headerName?-1:t.headerName&&i.headerName?t.headerName<i.headerName?-1:t.headerName>i.headerName?1:0:0}merge(e,t){t.forEach((t,i,n)=>{const s=[...e.has(i)?e.get(i):[],...t];e.set(i,s)})}generateColumnGroupId(e){return`pivotGroup_${this.columnModel.getPivotColumns().map(e=>e.getColId()).join("-")}_${e.join("-")}`}generateColumnId(e,t){return`pivot_${this.columnModel.getPivotColumns().map(e=>e.getColId()).join("-")}_${e.join("-")}_${t}`}createColDefsFromFields(e){const t={};for(let i=0;i<e.length;i++){const n=e[i].split(this.fieldSeparator);let s=t;for(let e=0;e<n.length;e++){const t=n[e];null==s[t]&&(s[t]={}),s=s[t]}}const i=(e,t,n,s)=>{var r;const o=[];for(let t in n){const r=n[t],a=i(`${e}${this.fieldSeparator}${t}`,t,r,s+1);o.push(a)}if(0===o.length){const i=this.columnModel.getPrimaryColumn(t);if(i){const n=null!=(r=this.columnModel.getDisplayNameForColumn(i,"header"))?r:t,s=this.createColDef(i,n,void 0,!1);return s.colId=e,s.aggFunc=i.getAggFunc(),s.valueGetter=t=>{var i;return null==(i=t.data)?void 0:i[e]},s}return{colId:e,headerName:t,valueGetter:t=>{var i;return null==(i=t.data)?void 0:i[e]}}}return this.gos.get("removePivotHeaderRowWhenSingleValueColumn")&&1===o.length&&"colId"in o[0]?(o[0].headerName=t,o[0]):{openByDefault:-1===this.pivotDefaultExpanded||s<this.pivotDefaultExpanded,groupId:e,headerName:t,children:o}},n=[];for(let e in t){const s=i(e,e,t[e],0);n.push(s)}return n}};Xw.PIVOT_ROW_TOTAL_PREFIX="PivotRowTotal_",Kw([(0,s.dsm)("columnModel")],Xw.prototype,"columnModel",2),Kw([s.o7C],Xw.prototype,"init",1),Xw=Kw([(0,s.dR4)("pivotColDefService")],Xw);var Zw=class extends s.XQb{constructor(){super(...arguments),this.uniqueValues={},this.lastTimeFailed=!1,this.maxUniqueValues=-1,this.currentUniqueCount=0}execute(e){const t=e.changedPath;this.columnModel.isPivotActive()?this.executePivotOn(t):this.executePivotOff(t)}executePivotOff(e){this.aggregationColumnsHashLastTime=null,this.uniqueValues={},this.columnModel.isSecondaryColumnsPresent()&&(this.columnModel.setSecondaryColumns(null,"rowModelUpdated"),e&&e.setInactive())}executePivotOn(e){var t;const i=null!=(t=this.columnModel.getValueColumns().length)?t:1,n=this.gos.get("pivotMaxGeneratedColumns");let r;this.maxUniqueValues=-1===n?-1:n/i;try{r=this.bucketUpRowNodes(e)}catch(e){if(e.message===Zw.EXCEEDED_MAX_UNIQUE_VALUES){this.columnModel.setSecondaryColumns([],"rowModelUpdated");const t={type:s.sVA.EVENT_PIVOT_MAX_COLUMNS_EXCEEDED,message:e.message};return this.eventService.dispatchEvent(t),void(this.lastTimeFailed=!0)}throw e}const o=this.setUniqueValues(r),a=this.columnModel.getValueColumns(),l=a.map(e=>`${e.getId()}-${e.getColDef().headerName}`).join("#"),c=a.map(e=>e.getAggFunc().toString()).join("#"),h=this.aggregationColumnsHashLastTime!==l,d=this.aggregationFuncsHashLastTime!==c;this.aggregationColumnsHashLastTime=l,this.aggregationFuncsHashLastTime=c;const u=this.columnModel.getRowGroupColumns().map(e=>e.getId()).join("#"),p=u!==this.groupColumnsHashLastTime;this.groupColumnsHashLastTime=u;const g=this.gos.get("pivotRowTotals"),f=this.gos.get("pivotColumnGroupTotals"),m=this.gos.get("suppressExpandablePivotGroups"),v=this.gos.get("removePivotHeaderRowWhenSingleValueColumn"),y=g!==this.pivotRowTotalsLastTime||f!==this.pivotColumnGroupTotalsLastTime||m!==this.suppressExpandablePivotGroupsLastTime||v!==this.removePivotHeaderRowWhenSingleValueColumnLastTime;if(this.pivotRowTotalsLastTime=g,this.pivotColumnGroupTotalsLastTime=f,this.suppressExpandablePivotGroupsLastTime=m,this.removePivotHeaderRowWhenSingleValueColumnLastTime=v,this.lastTimeFailed||o||h||p||d||y){const{pivotColumnGroupDefs:t,pivotColumnDefs:i}=this.pivotColDefService.createPivotColumnDefs(this.uniqueValues);this.pivotColumnDefs=i,this.columnModel.setSecondaryColumns(t,"rowModelUpdated"),e&&e.setInactive()}this.lastTimeFailed=!1}setUniqueValues(e){return!(JSON.stringify(e)===JSON.stringify(this.uniqueValues)||(this.uniqueValues=e,0))}bucketUpRowNodes(e){this.currentUniqueCount=0;const t={};e.forEachChangedNodeDepthFirst(e=>{e.leafGroup&&(e.childrenMapped=null)});const i=e=>{var n;e.leafGroup?this.bucketRowNode(e,t):null==(n=e.childrenAfterFilter)||n.forEach(i)};return e.executeFromRootNode(i),t}bucketRowNode(e,t){const i=this.columnModel.getPivotColumns();0===i.length?e.childrenMapped=null:e.childrenMapped=this.bucketChildren(e.childrenAfterFilter,i,0,t),e.sibling&&(e.sibling.childrenMapped=e.childrenMapped)}bucketChildren(e,t,i,n){const r={},o=t[i];if(e.forEach(e=>{let t=this.valueService.getKeyForNode(o,e);if(s._.missing(t)&&(t=""),!n[t]){this.currentUniqueCount+=1,n[t]={};const e=-1!==this.maxUniqueValues,i=this.currentUniqueCount>this.maxUniqueValues;if(e&&i)throw Error(Zw.EXCEEDED_MAX_UNIQUE_VALUES)}r[t]||(r[t]=[]),r[t].push(e)}),i===t.length-1)return r;{const e={};return s._.iterateObject(r,(s,r)=>{e[s]=this.bucketChildren(r,t,i+1,n[s])}),e}}getPivotColumnDefs(){return this.pivotColumnDefs}};Zw.EXCEEDED_MAX_UNIQUE_VALUES="Exceeded maximum allowed pivot column count.",Kw([(0,s.dsm)("valueService")],Zw.prototype,"valueService",2),Kw([(0,s.dsm)("columnModel")],Zw.prototype,"columnModel",2),Kw([(0,s.dsm)("pivotColDefService")],Zw.prototype,"pivotColDefService",2),Zw=Kw([(0,s.dR4)("pivotStage")],Zw);var Qw={sum:"Sum",first:"First",last:"Last",min:"Min",max:"Max",count:"Count",avg:"Average"},Jw=class extends s.XQb{constructor(){super(...arguments),this.aggFuncsMap={},this.initialised=!1}init(){this.initialised||(this.initialiseWithDefaultAggregations(),this.addAggFuncs(this.gos.get("aggFuncs")))}initialiseWithDefaultAggregations(){this.aggFuncsMap[Jw.AGG_SUM]=ex,this.aggFuncsMap[Jw.AGG_FIRST]=tx,this.aggFuncsMap[Jw.AGG_LAST]=ix,this.aggFuncsMap[Jw.AGG_MIN]=nx,this.aggFuncsMap[Jw.AGG_MAX]=sx,this.aggFuncsMap[Jw.AGG_COUNT]=rx,this.aggFuncsMap[Jw.AGG_AVG]=ox,this.initialised=!0}isAggFuncPossible(e,t){const i=this.getFuncNames(e),n=s._.includes(i,t),r=s._.exists(this.aggFuncsMap[t]);return n&&r}getDefaultFuncLabel(e){var t;return null!=(t=Qw[e])?t:e}getDefaultAggFunc(e){const t=e.getColDef().defaultAggFunc;if(s._.exists(t)&&this.isAggFuncPossible(e,t))return t;if(this.isAggFuncPossible(e,Jw.AGG_SUM))return Jw.AGG_SUM;const i=this.getFuncNames(e);return s._.existsAndNotEmpty(i)?i[0]:null}addAggFuncs(e){this.init(),s._.iterateObject(e,(e,t)=>{this.aggFuncsMap[e]=t})}getAggFunc(e){return this.init(),this.aggFuncsMap[e]}getFuncNames(e){const t=e.getColDef().allowedAggFuncs;return null==t?Object.keys(this.aggFuncsMap).sort():t}clear(){this.aggFuncsMap={}}};function ex(e){const{values:t}=e;let i=null;for(let e=0;e<t.length;e++){const n=t[e];"number"==typeof n?null===i?i=n:i+="number"==typeof i?n:BigInt(n):"bigint"==typeof n&&(i=null===i?n:("bigint"==typeof i?i:BigInt(i))+n)}return i}function tx(e){return e.values.length>0?e.values[0]:null}function ix(e){return e.values.length>0?s._.last(e.values):null}function nx(e){const{values:t}=e;let i=null;for(let e=0;e<t.length;e++){const n=t[e];"number"!=typeof n&&"bigint"!=typeof n||!(null===i||i>n)||(i=n)}return i}function sx(e){const{values:t}=e;let i=null;for(let e=0;e<t.length;e++){const n=t[e];"number"!=typeof n&&"bigint"!=typeof n||!(null===i||i<n)||(i=n)}return i}function rx(e){var t,i;const{values:n}=e;let s=0;for(let e=0;e<n.length;e++){const t=n[e];s+=null!=t&&"number"==typeof t.value?t.value:1}const r=null==(i=null==(t=e.rowNode)?void 0:t.aggData)?void 0:i[e.column.getColId()];return r&&r.value===s?r:{value:s,toString:function(){return this.value.toString()},toNumber:function(){return this.value}}}function ox(e){var t,i,n;const{values:s}=e;let r=0,o=0;for(let e=0;e<s.length;e++){const t=s[e];let i=null;"number"==typeof t||"bigint"==typeof t?(i=t,o++):null==t||"number"!=typeof t.value&&"bigint"!=typeof t.value||"number"!=typeof t.count||(i=t.value*("number"==typeof t.value?t.count:BigInt(t.count)),o+=t.count),"number"==typeof i?r+="number"==typeof r?i:BigInt(i):"bigint"==typeof i&&(r=("bigint"==typeof r?r:BigInt(r))+i)}let a=null;o>0&&(a=r/("number"==typeof r?o:BigInt(o)));const l=null==(n=null==(t=e.rowNode)?void 0:t.aggData)?void 0:n[null==(i=e.column)?void 0:i.getColId()];return l&&l.count===o&&l.value===a?l:{count:o,value:a,toString:function(){return"number"==typeof this.value||"bigint"==typeof this.value?this.value.toString():""},toNumber:function(){return this.value}}}Jw.AGG_SUM="sum",Jw.AGG_FIRST="first",Jw.AGG_LAST="last",Jw.AGG_MIN="min",Jw.AGG_MAX="max",Jw.AGG_COUNT="count",Jw.AGG_AVG="avg",Kw([s.o7C],Jw.prototype,"init",1),Jw=Kw([(0,s.dR4)("aggFuncService")],Jw);var ax=class extends s.v26{constructor(e,t,i,n,s){super(t,i,s,'\n                <span role="option">\n                    <span ref="eDragHandle" class="ag-drag-handle ag-column-drop-cell-drag-handle" role="presentation"></span>\n                    <span ref="eText" class="ag-column-drop-cell-text" aria-hidden="true"></span>\n                    <ag-sort-indicator ref="eSortIndicator"></ag-sort-indicator>\n                    <span ref="eButton" class="ag-column-drop-cell-button" role="presentation"></span>\n                </span>\n            '),this.column=e,this.dropZonePurpose=n,this.popupShowing=!1}init(){this.displayName=this.columnModel.getDisplayNameForColumn(this.column,"columnDrop"),super.init(),this.setupSort(),this.addManagedListener(this.eventService,s.VPZ.EVENT_SORT_CHANGED,()=>{this.setupAria()}),this.isGroupingZone()&&this.addManagedPropertyListener("groupLockGroupColumns",()=>{this.refreshRemove(),this.refreshDraggable(),this.setupAria()})}getItem(){return this.column}getDisplayName(){return this.displayName}getTooltip(){return this.column.getColDef().headerTooltip}addAdditionalAriaInstructions(e,t){const i=this.gos.get("rowGroupPanelSuppressSort"),n=this.gos.get("functionsReadOnly");if(this.isAggregationZone()&&!n){const i=t("ariaDropZoneColumnValueItemDescription","Press ENTER to change the aggregation type");e.push(i)}if(this.isGroupingZone()&&this.column.isSortable()&&!i){const i=t("ariaDropZoneColumnGroupItemDescription","Press ENTER to sort");e.push(i)}super.addAdditionalAriaInstructions(e,t)}isDraggable(){return this.isReadOnly()}isRemovable(){return this.isReadOnly()}isReadOnly(){return!this.isGroupingAndLocked()&&!this.gos.get("functionsReadOnly")}getAriaDisplayName(){const e=this.localeService.getLocaleTextFunc(),{name:t,aggFuncName:i}=this.getColumnAndAggFuncName(),n=e("ariaDropZoneColumnComponentAggFuncSeparator"," of "),s={asc:e("ariaDropZoneColumnComponentSortAscending","ascending"),desc:e("ariaDropZoneColumnComponentSortDescending","descending")},r=this.column.getSort(),o=this.gos.get("rowGroupPanelSuppressSort");return[i&&`${i}${n}`,t,this.isGroupingZone()&&!o&&r&&`, ${s[r]}`].filter(e=>!!e).join("")}getColumnAndAggFuncName(){const e=this.displayName;let t="";if(this.isAggregationZone()){const e=this.column.getAggFunc(),i="string"==typeof e?e:"agg";t=this.localeService.getLocaleTextFunc()(i,i)}return{name:e,aggFuncName:t}}setupSort(){const e=this.column.isSortable(),t=this.isGroupingZone();if(e&&t&&!this.gos.get("rowGroupPanelSuppressSort")){this.eSortIndicator.setupSort(this.column,!0);const e=e=>{e.preventDefault();const t="ctrl"===this.gos.get("multiSortKey")?e.ctrlKey||e.metaKey:e.shiftKey;this.sortController.progressSort(this.column,t,"uiColumnSorted")};this.addGuiEventListener("click",e),this.addGuiEventListener("keydown",t=>{t.key===s.DDm.ENTER&&this.isGroupingZone()&&e(t)})}}getDefaultIconName(){return s.WO_.ICON_HIDE}createGetDragItem(){const{column:e}=this;return()=>{const t={};return t[e.getId()]=e.isVisible(),{columns:[e],visibleState:t}}}setupComponents(){super.setupComponents(),this.isAggregationZone()&&!this.gos.get("functionsReadOnly")&&this.addGuiEventListener("click",this.onShowAggFuncSelection.bind(this))}onKeyDown(e){super.onKeyDown(e),e.key===s.DDm.ENTER&&this.isAggregationZone()&&!this.gos.get("functionsReadOnly")&&(e.preventDefault(),this.onShowAggFuncSelection())}getDisplayValue(){const{name:e,aggFuncName:t}=this.getColumnAndAggFuncName();return this.isAggregationZone()?`${t}(${e})`:e}onShowAggFuncSelection(){if(this.popupShowing)return;this.popupShowing=!0;const e=new s.wjn({cssIdentifier:"select-agg-func"}),t=this.aggFuncService.getFuncNames(this.column),i=this.getGui(),n=e.getGui();e.setModel({getRow:function(e){return t[e]},getRowCount:function(){return t.length}}),this.getContext().createBean(e);const r=s._.loadTemplate('<div class="ag-select-agg-func-popup"></div>');r.style.top="0px",r.style.left="0px",r.appendChild(n),r.style.width=`${i.clientWidth}px`;const o=this.addManagedListener(r,"focusout",e=>{!r.contains(e.relatedTarget)&&l&&l.hideFunc()}),a=this.localeService.getLocaleTextFunc(),l=this.popupService.addPopup({modal:!0,eChild:r,closeOnEsc:!0,closedCallback:t=>{this.destroyBean(e),this.popupShowing=!1,"Escape"===(null==t?void 0:t.key)&&i.focus(),o&&o()},ariaLabel:a("ariaLabelAggregationFunction","Aggregation Function")});l&&e.setComponentCreator(this.createAggSelect.bind(this,l.hideFunc)),e.addGuiEventListener("keydown",t=>{if(t.key===s.DDm.ENTER||t.key===s.DDm.SPACE){const t=e.getLastFocusedRow();if(null==t)return;const i=e.getComponentAt(t);i&&i.selectItem()}}),this.popupService.positionPopupByComponent({type:"aggFuncSelect",eventSource:i,ePopup:r,keepWithinBounds:!0,column:this.column,position:"under"}),e.refresh();let c=t.findIndex(e=>e===this.column.getAggFunc());-1===c&&(c=0),e.focusRow(c)}createAggSelect(e,t){const i=this.localeService.getLocaleTextFunc(),n=t.toString(),r=i(n,n);return new lx(()=>{if(e(),this.gos.get("functionsPassive")){const e={type:s.sVA.EVENT_COLUMN_AGG_FUNC_CHANGE_REQUEST,columns:[this.column],aggFunc:t};this.eventService.dispatchEvent(e)}else this.columnModel.setColumnAggFunc(this.column,t,"toolPanelDragAndDrop")},r)}isGroupingAndLocked(){return this.isGroupingZone()&&this.columnModel.isColumnGroupingLocked(this.column)}isAggregationZone(){return"aggregation"===this.dropZonePurpose}isGroupingZone(){return"rowGroup"===this.dropZonePurpose}getDragSourceType(){return s.qRA.ToolPanel}destroy(){super.destroy(),this.column=null}};Kw([(0,s.dsm)("popupService")],ax.prototype,"popupService",2),Kw([(0,s.dsm)("sortController")],ax.prototype,"sortController",2),Kw([(0,s.dsm)("columnModel")],ax.prototype,"columnModel",2),Kw([(0,s.Xx1)("aggFuncService")],ax.prototype,"aggFuncService",2),Kw([(0,s.PIB)("eSortIndicator")],ax.prototype,"eSortIndicator",2);var lx=class extends s.uAl{constructor(e,t){super('<div class="ag-select-agg-func-item"/>'),this.selectItem=e,this.getGui().innerText=t,this.addGuiEventListener("click",this.selectItem)}},cx=class extends s.fNO{constructor(e,t){super(e),this.dropZonePurpose=t}init(e){super.init(e),this.addManagedListener(this.eventService,s.sVA.EVENT_NEW_COLUMNS_LOADED,this.refreshGui.bind(this)),this.addManagedPropertyListeners(["functionsReadOnly","rowGroupPanelSuppressSort","groupLockGroupColumns"],this.refreshGui.bind(this))}getItems(e){var t;return null!=(t=e.columns)?t:[]}isInterestedIn(e){return e===s.qRA.HeaderCell||e===s.qRA.ToolPanel}minimumAllowedNewInsertIndex(){const e=this.gos.get("groupLockGroupColumns"),t=this.columnModel.getRowGroupColumns().length;return-1===e?t:Math.min(e,t)}showOrHideColumnOnExit(e){return this.isRowGroupPanel()&&!this.gos.get("suppressRowGroupHidesColumns")&&!e.fromNudge}handleDragEnterEnd(e){if(this.showOrHideColumnOnExit(e)){const t=e.dragSource.getDragItem().columns;this.setColumnsVisible(t,!1,"uiColumnDragged")}}handleDragLeaveEnd(e){if(this.showOrHideColumnOnExit(e)){const t=e.dragSource.getDragItem();this.setColumnsVisible(t.columns,!0,"uiColumnDragged")}}setColumnsVisible(e,t,i){if(e){const n=e.filter(e=>!e.getColDef().lockVisible);this.columnModel.setColumnsVisible(n,t,i)}}isRowGroupPanel(){return"rowGroup"===this.dropZonePurpose}refreshOnDragStop(){return!this.gos.get("functionsPassive")}createPillComponent(e,t,i,n){return new ax(e,t,i,this.dropZonePurpose,n)}};Kw([(0,s.dsm)("columnModel")],cx.prototype,"columnModel",2);var hx=class extends cx{constructor(e){super(e,"rowGroup")}passBeansUp(){const e=this.localeService.getLocaleTextFunc(),t=e("rowGroupColumnsEmptyMessage","Drag here to set row groups"),i=e("groups","Row Groups");super.init({icon:s._.createIconNoSpan("rowGroupPanel",this.gos,null),emptyMessage:t,title:i}),this.addManagedListener(this.eventService,s.sVA.EVENT_COLUMN_ROW_GROUP_CHANGED,this.refreshGui.bind(this))}getAriaLabel(){return this.localeService.getLocaleTextFunc()("ariaRowGroupDropZonePanelLabel","Row Groups")}getTooltipParams(){const e=super.getTooltipParams();return e.location="rowGroupColumnsList",e}isItemDroppable(e,t){return!(this.gos.get("functionsReadOnly")||!e.isPrimary())&&e.isAllowRowGroup()&&(!e.isRowGroupActive()||this.isSourceEventFromTarget(t))}updateItems(e){if(this.gos.get("functionsPassive")){const t={type:s.sVA.EVENT_COLUMN_ROW_GROUP_CHANGE_REQUEST,columns:e};this.eventService.dispatchEvent(t)}else this.columnModel.setRowGroupColumns(e,"toolPanelUi")}getIconName(){return this.isPotentialDndItems()?s.WO_.ICON_GROUP:s.WO_.ICON_NOT_ALLOWED}getExistingItems(){return this.columnModel.getRowGroupColumns()}};Kw([s.o7C],hx.prototype,"passBeansUp",1);var dx=class extends cx{constructor(e){super(e,"pivot")}passBeansUp(){const e=this.localeService.getLocaleTextFunc(),t=e("pivotColumnsEmptyMessage","Drag here to set column labels"),i=e("pivots","Column Labels");super.init({icon:s._.createIconNoSpan("pivotPanel",this.gos,null),emptyMessage:t,title:i}),this.addManagedListener(this.eventService,s.sVA.EVENT_NEW_COLUMNS_LOADED,this.refresh.bind(this)),this.addManagedListener(this.eventService,s.sVA.EVENT_COLUMN_PIVOT_CHANGED,this.refresh.bind(this)),this.addManagedListener(this.eventService,s.sVA.EVENT_COLUMN_PIVOT_MODE_CHANGED,this.checkVisibility.bind(this)),this.refresh()}getAriaLabel(){return this.localeService.getLocaleTextFunc()("ariaPivotDropZonePanelLabel","Column Labels")}getTooltipParams(){const e=super.getTooltipParams();return e.location="pivotColumnsList",e}refresh(){this.checkVisibility(),this.refreshGui()}checkVisibility(){const e=this.columnModel.isPivotMode();if(this.isHorizontal())switch(this.gos.get("pivotPanelShow")){case"always":this.setDisplayed(e);break;case"onlyWhenPivoting":const t=this.columnModel.isPivotActive();this.setDisplayed(e&&t);break;default:this.setDisplayed(!1)}else this.setDisplayed(e)}isItemDroppable(e,t){return!(this.gos.get("functionsReadOnly")||!e.isPrimary())&&e.isAllowPivot()&&(!e.isPivotActive()||this.isSourceEventFromTarget(t))}updateItems(e){if(this.gos.get("functionsPassive")){const t={type:s.sVA.EVENT_COLUMN_PIVOT_CHANGE_REQUEST,columns:e};this.eventService.dispatchEvent(t)}else this.columnModel.setPivotColumns(e,"toolPanelUi")}getIconName(){return this.isPotentialDndItems()?s.WO_.ICON_PIVOT:s.WO_.ICON_NOT_ALLOWED}getExistingItems(){return this.columnModel.getPivotColumns()}};Kw([s.o7C],dx.prototype,"passBeansUp",1);var ux=class extends s.uAl{constructor(){super()}postConstruct(){this.setGui(this.createNorthPanel()),this.addManagedListener(this.eventService,s.sVA.EVENT_COLUMN_ROW_GROUP_CHANGED,()=>this.onRowGroupChanged()),this.addManagedListener(this.eventService,s.sVA.EVENT_NEW_COLUMNS_LOADED,()=>this.onRowGroupChanged()),this.addManagedPropertyListener("rowGroupPanelShow",()=>this.onRowGroupChanged()),this.addManagedPropertyListener("pivotPanelShow",()=>this.onPivotPanelShow()),this.onRowGroupChanged()}createNorthPanel(){const e=document.createElement("div");return e.classList.add("ag-column-drop-wrapper"),s._.setAriaRole(e,"presentation"),this.rowGroupComp=new hx(!0),this.createManagedBean(this.rowGroupComp),this.pivotComp=new dx(!0),this.createManagedBean(this.pivotComp),e.appendChild(this.rowGroupComp.getGui()),e.appendChild(this.pivotComp.getGui()),this.addManagedListener(this.rowGroupComp,s.uAl.EVENT_DISPLAYED_CHANGED,()=>this.onDropPanelVisible()),this.addManagedListener(this.pivotComp,s.uAl.EVENT_DISPLAYED_CHANGED,()=>this.onDropPanelVisible()),this.onDropPanelVisible(),e}onDropPanelVisible(){const e=this.rowGroupComp.isDisplayed()&&this.pivotComp.isDisplayed();this.rowGroupComp.addOrRemoveCssClass("ag-column-drop-horizontal-half-width",e),this.pivotComp.addOrRemoveCssClass("ag-column-drop-horizontal-half-width",e)}onRowGroupChanged(){if(!this.rowGroupComp)return;const e=this.gos.get("rowGroupPanelShow");if("always"===e)this.rowGroupComp.setDisplayed(!0);else if("onlyWhenGrouping"===e){const e=!this.columnModel.isRowGroupEmpty();this.rowGroupComp.setDisplayed(e)}else this.rowGroupComp.setDisplayed(!1)}onPivotPanelShow(){if(!this.pivotComp)return;const e=this.gos.get("pivotPanelShow");if("always"===e)this.pivotComp.setDisplayed(!0);else if("onlyWhenPivoting"===e){const e=this.columnModel.isPivotActive();this.pivotComp.setDisplayed(e)}else this.pivotComp.setDisplayed(!1)}};Kw([(0,s.dsm)("columnModel")],ux.prototype,"columnModel",2),Kw([s.o7C],ux.prototype,"postConstruct",1);var px=class extends s.XQb{execute(e){const t=this.columnModel.isPivotMode(),i=this.filterManager.isAggregateFilterPresent()||this.filterManager.isAggregateQuickFilterPresent(),n=this.gos.getGroupAggFiltering()||(t?e=>e.node.leafGroup:e=>!e.node.group),{changedPath:s}=e,r=(e,t=!1)=>{e.childrenAfterFilter&&(e.childrenAfterAggFilter=e.childrenAfterFilter,t&&e.childrenAfterAggFilter.forEach(e=>r(e,t)),this.setAllChildrenCount(e)),e.sibling&&(e.sibling.childrenAfterAggFilter=e.childrenAfterAggFilter)};s.forEachChangedNodeDepthFirst(i?e=>{var t;e.childrenAfterAggFilter=(null==(t=e.childrenAfterFilter)?void 0:t.filter(e=>{var t;return n({node:e})&&this.filterManager.doesRowPassAggregateFilters({rowNode:e})?(r(e,!0),!0):null==(t=e.childrenAfterAggFilter)?void 0:t.length}))||null,this.setAllChildrenCount(e),e.sibling&&(e.sibling.childrenAfterAggFilter=e.childrenAfterAggFilter)}:r,!0)}setAllChildrenCountTreeData(e){let t=0;e.childrenAfterAggFilter.forEach(e=>{t++,t+=e.allChildrenCount}),e.setAllChildrenCount(t)}setAllChildrenCountGridGrouping(e){let t=0;e.childrenAfterAggFilter.forEach(e=>{e.group?t+=e.allChildrenCount:t++}),e.setAllChildrenCount(t)}setAllChildrenCount(e){e.hasChildren()?this.gos.get("treeData")?this.setAllChildrenCountTreeData(e):this.setAllChildrenCountGridGrouping(e):e.setAllChildrenCount(null)}};Kw([(0,s.dsm)("filterManager")],px.prototype,"filterManager",2),Kw([(0,s.dsm)("columnModel")],px.prototype,"columnModel",2),px=Kw([(0,s.dR4)("filterAggregatesStage")],px);var gx=class e extends s.aJZ{constructor(){super('\n            <div class="ag-group-filter">\n                <div ref="eGroupField"></div>\n                <div ref="eUnderlyingFilter"></div>\n            </div>\n        ')}postConstruct(){this.initialiseTabGuard({})}init(e){return this.params=e,this.validateParams(),this.updateGroups().then(()=>{this.addManagedListener(this.eventService,s.sVA.EVENT_COLUMN_ROW_GROUP_CHANGED,()=>this.onColumnRowGroupChanged())})}validateParams(){const{colDef:e}=this.params;e.field&&s._.warnOnce('Group Column Filter does not work with the colDef property "field". This property will be ignored.'),e.filterValueGetter&&s._.warnOnce('Group Column Filter does not work with the colDef property "filterValueGetter". This property will be ignored.'),e.filterParams&&s._.warnOnce('Group Column Filter does not work with the colDef property "filterParams". This property will be ignored.')}updateGroups(){const e=this.updateGroupField();return this.getUnderlyingFilters(e)}getSourceColumns(){if(this.groupColumn=this.params.column,this.gos.get("treeData"))return s._.warnOnce("Group Column Filter does not work with Tree Data enabled. Please disable Tree Data, or use a different filter."),[];return this.columnModel.getSourceColumnsForGroupColumn(this.groupColumn)||(s._.warnOnce("Group Column Filter only works on group columns. Please use a different filter."),[])}updateGroupField(){s._.clearElement(this.eGroupField),this.eGroupFieldSelect&&this.destroyBean(this.eGroupFieldSelect);const e=this.getSourceColumns(),t=e.filter(e=>e.isFilterAllowed());return t.length?(1===e.length?(this.selectedColumn=t[0],s._.setDisplayed(this.eGroupField,!1)):(this.selectedColumn&&t.some(e=>e.getId()===this.selectedColumn.getId())||(this.selectedColumn=t[0]),this.createGroupFieldSelectElement(t),this.eGroupField.appendChild(this.eGroupFieldSelect.getGui()),this.eGroupField.appendChild(s._.loadTemplate('<div class="ag-filter-separator"></div>')),s._.setDisplayed(this.eGroupField,!0)),t):(this.selectedColumn=void 0,s._.setDisplayed(this.eGroupField,!1),null)}createGroupFieldSelectElement(e){this.eGroupFieldSelect=this.createManagedBean(new s.Ju4);const t=this.localeService.getLocaleTextFunc();this.eGroupFieldSelect.setLabel(t("groupFilterSelect","Select field:")),this.eGroupFieldSelect.setLabelAlignment("top"),this.eGroupFieldSelect.addOptions(e.map(e=>{var t;return{value:e.getId(),text:null!=(t=this.columnModel.getDisplayNameForColumn(e,"groupFilter",!1))?t:void 0}})),this.eGroupFieldSelect.setValue(this.selectedColumn.getId()),this.eGroupFieldSelect.onValueChange(e=>this.updateSelectedColumn(e)),this.eGroupFieldSelect.addCssClass("ag-group-filter-field-select-wrapper"),1===e.length&&this.eGroupFieldSelect.setDisabled(!0)}getUnderlyingFilters(e){if(!e)return this.filterColumnPairs=void 0,this.selectedFilter=void 0,this.groupColumn.setFilterActive(!1,"columnRowGroupChanged"),s.oY$.resolve();const t=[],i=[];return e.forEach(e=>{const n=this.filterManager.getOrCreateFilterWrapper(e,"COLUMN_MENU");(null==n?void 0:n.filterPromise)&&t.push(n.filterPromise.then(t=>(t&&i.push({filter:t,column:e}),e.getId()===this.selectedColumn.getId()&&(this.selectedFilter=null!=t?t:void 0),t)))}),s.oY$.all(t).then(()=>{this.filterColumnPairs=i,this.groupColumn.setFilterActive(this.isFilterActive(),"columnRowGroupChanged")})}addUnderlyingFilterElement(){var e,t;if(s._.clearElement(this.eUnderlyingFilter),!this.selectedColumn)return s.oY$.resolve();const i=this.createManagedBean(new s.jfj(this.selectedColumn,"COLUMN_MENU"));return this.filterWrapperComp=i,i.hasFilter()?(this.eUnderlyingFilter.appendChild(i.getGui()),null!=(t=null==(e=i.getFilter())?void 0:e.then(()=>{var e,t;null==(e=i.afterGuiAttached)||e.call(i,this.afterGuiAttachedParams),(null==(t=this.afterGuiAttachedParams)?void 0:t.suppressFocus)||!this.eGroupFieldSelect||this.eGroupFieldSelect.isDisabled()||this.eGroupFieldSelect.getFocusableElement().focus()}))?t:s.oY$.resolve()):s.oY$.resolve()}updateSelectedColumn(t){var i;if(!t)return;null==(i=this.filterWrapperComp)||i.afterGuiDetached(),this.destroyBean(this.filterWrapperComp);const n=this.getFilterColumnPair(t);this.selectedColumn=null==n?void 0:n.column,this.selectedFilter=null==n?void 0:n.filter,this.dispatchEvent({type:e.EVENT_SELECTED_COLUMN_CHANGED}),this.addUnderlyingFilterElement()}isFilterActive(){var e;return!!(null==(e=this.filterColumnPairs)?void 0:e.some(({filter:e})=>e.isFilterActive()))}doesFilterPass(){return!0}getModel(){return null}setModel(){return s.oY$.resolve()}afterGuiAttached(e){this.afterGuiAttachedParams=e,this.addUnderlyingFilterElement()}afterGuiDetached(){var e,t;s._.clearElement(this.eUnderlyingFilter),null==(t=null==(e=this.selectedFilter)?void 0:e.afterGuiDetached)||t.call(e)}onColumnRowGroupChanged(){this.updateGroups().then(()=>{this.dispatchEvent({type:e.EVENT_COLUMN_ROW_GROUP_CHANGED}),this.eventService.dispatchEvent({type:"filterAllowedUpdated"})})}getFilterColumnPair(e){var t;if(e)return null==(t=this.filterColumnPairs)?void 0:t.find(({column:t})=>t.getId()===e)}getSelectedFilter(){return this.selectedFilter}getSelectedColumn(){return this.selectedColumn}isFilterAllowed(){return!!this.selectedColumn}destroy(){super.destroy()}};gx.EVENT_COLUMN_ROW_GROUP_CHANGED="columnRowGroupChanged",gx.EVENT_SELECTED_COLUMN_CHANGED="selectedColumnChanged",Kw([(0,s.dsm)("filterManager")],gx.prototype,"filterManager",2),Kw([(0,s.dsm)("columnModel")],gx.prototype,"columnModel",2),Kw([(0,s.PIB)("eGroupField")],gx.prototype,"eGroupField",2),Kw([(0,s.PIB)("eUnderlyingFilter")],gx.prototype,"eUnderlyingFilter",2),Kw([s.o7C],gx.prototype,"postConstruct",1);var fx=gx,mx=class extends s.uAl{constructor(){super('\n            <div ref="eFloatingFilter" class="ag-group-floating-filter ag-floating-filter-input" role="presentation"></div>\n        '),this.haveAddedColumnListeners=!1}init(e){this.params=e;const t="multipleColumns"===this.gos.get("groupDisplayType");return new s.oY$(e=>{this.params.parentFilterInstance(i=>{this.parentFilterInstance=i,t?this.setupUnderlyingFloatingFilterElement().then(()=>e()):(this.setupReadOnlyFloatingFilterElement(),e())})}).then(()=>{this.addManagedListener(this.parentFilterInstance,fx.EVENT_SELECTED_COLUMN_CHANGED,()=>this.onSelectedColumnChanged()),this.addManagedListener(this.parentFilterInstance,fx.EVENT_COLUMN_ROW_GROUP_CHANGED,()=>this.onColumnRowGroupChanged())})}onParamsUpdated(e){this.refresh(e)}refresh(e){this.params=e,this.setParams()}setParams(){var e;const t=this.columnModel.getDisplayNameForColumn(this.params.column,"header",!0),i=this.localeService.getLocaleTextFunc();null==(e=this.eFloatingFilterText)||e.setInputAriaLabel(`${t} ${i("ariaFilterInput","Filter Input")}`)}setupReadOnlyFloatingFilterElement(){this.eFloatingFilterText||(this.eFloatingFilterText=this.createManagedBean(new s.stt),this.eFloatingFilterText.setDisabled(!0).addGuiEventListener("click",()=>this.params.showParentFilter()),this.setParams()),this.updateDisplayedValue(),this.eFloatingFilter.appendChild(this.eFloatingFilterText.getGui())}setupUnderlyingFloatingFilterElement(){this.showingUnderlyingFloatingFilter=!1,this.underlyingFloatingFilter=void 0,s._.clearElement(this.eFloatingFilter);const e=this.parentFilterInstance.getSelectedColumn();if(e&&!e.isVisible()){const t=this.filterManager.getFloatingFilterCompDetails(e,this.params.showParentFilter);if(t)return this.compDetails=t,this.haveAddedColumnListeners||(this.haveAddedColumnListeners=!0,this.addManagedListener(e,s.VPZ.EVENT_VISIBLE_CHANGED,this.onColumnVisibleChanged.bind(this)),this.addManagedListener(e,s.VPZ.EVENT_COL_DEF_CHANGED,this.onColDefChanged.bind(this))),t.newAgStackInstance().then(e=>{var t,i;this.underlyingFloatingFilter=e,null==(i=this.underlyingFloatingFilter)||i.onParentModelChanged(null==(t=this.parentFilterInstance.getSelectedFilter())?void 0:t.getModel()),this.appendChild(e.getGui()),this.showingUnderlyingFloatingFilter=!0})}return this.setupReadOnlyFloatingFilterElement(),s.oY$.resolve()}onColumnVisibleChanged(){this.setupUnderlyingFloatingFilterElement()}onColDefChanged(e){var t,i,n;if(!e.column)return;const s=this.filterManager.getFloatingFilterCompDetails(e.column,this.params.showParentFilter);s&&((null==(t=this.underlyingFloatingFilter)?void 0:t.refresh)?this.underlyingFloatingFilter.refresh(s.params):null==(n=null==(i=this.underlyingFloatingFilter)?void 0:i.onParamsUpdated)||n.call(i,s.params))}onParentModelChanged(e,t){var i,n;this.showingUnderlyingFloatingFilter?null==(n=this.underlyingFloatingFilter)||n.onParentModelChanged(null==(i=this.parentFilterInstance.getSelectedFilter())?void 0:i.getModel(),t):this.updateDisplayedValue()}updateDisplayedValue(){if(!this.parentFilterInstance||!this.eFloatingFilterText)return;const e=this.parentFilterInstance.getSelectedFilter();if(!e)return this.eFloatingFilterText.setValue(""),void this.eFloatingFilterText.setDisplayed(!1);if(this.eFloatingFilterText.setDisplayed(!0),e.getModelAsString){const t=e.getModel();this.eFloatingFilterText.setValue(null==t?"":e.getModelAsString(t))}else this.eFloatingFilterText.setValue("")}onSelectedColumnChanged(){this.showingUnderlyingFloatingFilter||this.updateDisplayedValue()}onColumnRowGroupChanged(){this.showingUnderlyingFloatingFilter||this.updateDisplayedValue()}destroy(){super.destroy()}};Kw([(0,s.dsm)("columnModel")],mx.prototype,"columnModel",2),Kw([(0,s.dsm)("filterManager")],mx.prototype,"filterManager",2),Kw([(0,s.PIB)("eFloatingFilter")],mx.prototype,"eFloatingFilter",2);var vx={version:"31.3.4",moduleName:s.zsj.RowGroupingModule,beans:[$w,px,qw,Xw,Zw,Jw],agStackComponents:[{componentName:"AgGridHeaderDropZones",componentClass:ux}],userComponents:[{componentName:"agGroupColumnFilter",componentClass:fx},{componentName:"agGroupColumnFloatingFilter",componentClass:mx}],dependantModules:[fm]},yx=class extends cx{constructor(e){super(e,"aggregation")}passBeansUp(){const e=this.localeService.getLocaleTextFunc(),t=e("valueColumnsEmptyMessage","Drag here to aggregate"),i=e("values","Values");super.init({icon:s._.createIconNoSpan("valuePanel",this.gos,null),emptyMessage:t,title:i}),this.addManagedListener(this.eventService,s.sVA.EVENT_COLUMN_VALUE_CHANGED,this.refreshGui.bind(this))}getAriaLabel(){return this.localeService.getLocaleTextFunc()("ariaValuesDropZonePanelLabel","Values")}getTooltipParams(){const e=super.getTooltipParams();return e.location="valueColumnsList",e}getIconName(){return this.isPotentialDndItems()?s.WO_.ICON_AGGREGATE:s.WO_.ICON_NOT_ALLOWED}isItemDroppable(e,t){return!(this.gos.get("functionsReadOnly")||!e.isPrimary())&&e.isAllowValue()&&(!e.isValueActive()||this.isSourceEventFromTarget(t))}updateItems(e){if(this.gos.get("functionsPassive")){const t={type:s.sVA.EVENT_COLUMN_VALUE_CHANGE_REQUEST,columns:e};this.eventService.dispatchEvent(t)}else this.columnModel.setValueColumns(e,"toolPanelUi")}getExistingItems(){return this.columnModel.getValueColumns()}};Kw([s.o7C],yx.prototype,"passBeansUp",1);var Cx=Object.defineProperty,bx=Object.defineProperties,Sx=Object.getOwnPropertyDescriptor,wx=Object.getOwnPropertyDescriptors,xx=Object.getOwnPropertySymbols,Ex=Object.prototype.hasOwnProperty,Mx=Object.prototype.propertyIsEnumerable,Ax=(e,t,i)=>t in e?Cx(e,t,{enumerable:!0,configurable:!0,writable:!0,value:i}):e[t]=i,Tx=(e,t,i,n)=>{for(var s,r=n>1?void 0:n?Sx(t,i):t,o=e.length-1;o>=0;o--)(s=e[o])&&(r=(n?s(t,i,r):s(r))||r);return n&&r&&Cx(t,i,r),r},Dx=class extends s.uAl{constructor(){super('<div class="ag-tool-panel-horizontal-resize"></div>'),this.minWidth=100,this.maxWidth=null}setElementToResize(e){this.elementToResize=e}postConstruct(){const e=this.horizontalResizeService.addResizeBar({eResizeBar:this.getGui(),dragStartPixels:1,onResizeStart:this.onResizeStart.bind(this),onResizing:this.onResizing.bind(this),onResizeEnd:this.onResizeEnd.bind(this)});this.addDestroyFunc(e),this.setInverted(this.gos.get("enableRtl"))}dispatchResizeEvent(e,t,i){const n={type:s.sVA.EVENT_TOOL_PANEL_SIZE_CHANGED,width:i,started:e,ended:t};this.eventService.dispatchEvent(n)}onResizeStart(){this.startingWidth=this.elementToResize.offsetWidth,this.dispatchResizeEvent(!0,!1,this.startingWidth)}onResizeEnd(e){return this.onResizing(e,!0)}onResizing(e,t=!1){const i=this.inverted?-1:1;let n=Math.max(this.minWidth,Math.floor(this.startingWidth-e*i));null!=this.maxWidth&&(n=Math.min(this.maxWidth,n)),this.elementToResize.style.width=`${n}px`,this.dispatchResizeEvent(!1,t,n)}setInverted(e){this.inverted=e}setMaxWidth(e){this.maxWidth=e}setMinWidth(e){this.minWidth=null!=e?e:100}};Tx([(0,s.dsm)("horizontalResizeService")],Dx.prototype,"horizontalResizeService",2),Tx([s.o7C],Dx.prototype,"postConstruct",1);var Ix=class e extends s.uAl{constructor(e){super(),this.toolPanelDef=e}getToolPanelId(){return this.toolPanelDef.id}postConstruct(){const e=this.createTemplate();this.setTemplate(e),this.setLabel(),this.setIcon(),this.addManagedListener(this.eToggleButton,"click",this.onButtonPressed.bind(this)),this.eToggleButton.setAttribute("id",`ag-${this.getCompId()}-button`)}createTemplate(){return'<div class="ag-side-button" role="presentation">\n                <button type="button" ref="eToggleButton" tabindex="-1" role="tab" aria-expanded="false" class="ag-button ag-side-button-button">\n                    <div ref="eIconWrapper" class="ag-side-button-icon-wrapper" aria-hidden="true"></div>\n                    <span ref ="eLabel" class="ag-side-button-label"></span>\n                </button>\n            </div>'}setLabel(){const e=this.localeService.getLocaleTextFunc(),t=this.toolPanelDef,i=e(t.labelKey,t.labelDefault);this.eLabel.innerText=i}setIcon(){this.eIconWrapper.insertAdjacentElement("afterbegin",s._.createIconNoSpan(this.toolPanelDef.iconKey,this.gos))}onButtonPressed(){this.dispatchEvent({type:e.EVENT_TOGGLE_BUTTON_CLICKED})}setSelected(e){this.addOrRemoveCssClass("ag-selected",e),s._.setAriaExpanded(this.eToggleButton,e)}getButtonElement(){return this.eToggleButton}};Ix.EVENT_TOGGLE_BUTTON_CLICKED="toggleButtonClicked",Tx([(0,s.PIB)("eToggleButton")],Ix.prototype,"eToggleButton",2),Tx([(0,s.PIB)("eIconWrapper")],Ix.prototype,"eIconWrapper",2),Tx([(0,s.PIB)("eLabel")],Ix.prototype,"eLabel",2),Tx([s.o7C],Ix.prototype,"postConstruct",1);var Rx=Ix,Lx=class e extends s.uAl{constructor(){super(e.TEMPLATE),this.buttonComps=[]}postConstruct(){this.addManagedListener(this.getFocusableElement(),"keydown",this.handleKeyDown.bind(this))}handleKeyDown(e){if(e.key!==s.DDm.TAB||!e.shiftKey)return;const t=s._.last(this.columnModel.getAllDisplayedColumns());this.focusService.focusGridView(t,!0)&&e.preventDefault()}setActiveButton(e){this.buttonComps.forEach(t=>{t.setSelected(e===t.getToolPanelId())})}addButtonComp(t){const i=this.createBean(new Rx(t));return this.buttonComps.push(i),this.appendChild(i),i.addEventListener(Rx.EVENT_TOGGLE_BUTTON_CLICKED,()=>{this.dispatchEvent({type:e.EVENT_SIDE_BAR_BUTTON_CLICKED,toolPanelId:t.id})}),i}clearButtons(){this.buttonComps=this.destroyBeans(this.buttonComps),s._.clearElement(this.getGui())}};Lx.EVENT_SIDE_BAR_BUTTON_CLICKED="sideBarButtonClicked",Lx.TEMPLATE='<div class="ag-side-buttons" role="tablist"></div>',Tx([(0,s.dsm)("focusService")],Lx.prototype,"focusService",2),Tx([(0,s.dsm)("columnModel")],Lx.prototype,"columnModel",2),Tx([s.o7C],Lx.prototype,"postConstruct",1),Tx([s.yah],Lx.prototype,"clearButtons",1);var kx=Lx,Px=class e{static parse(t){if(t){if(!0===t)return{toolPanels:[e.DEFAULT_COLUMN_COMP,e.DEFAULT_FILTER_COMP],defaultToolPanel:"columns"};if("string"==typeof t)return e.parse([t]);if(Array.isArray(t)){const i=[];if(t.forEach(t=>{const n=e.DEFAULT_BY_KEY[t];n?i.push(n):console.warn(`AG Grid: the key ${t} is not a valid key for specifying a tool panel, valid keys are: ${Object.keys(e.DEFAULT_BY_KEY).join(",")}`)}),0===i.length)return;return{toolPanels:i,defaultToolPanel:i[0].id}}return{toolPanels:e.parseComponents(t.toolPanels),defaultToolPanel:t.defaultToolPanel,hiddenByDefault:t.hiddenByDefault,position:t.position}}}static parseComponents(t){const i=[];return t?(t.forEach(t=>{let n=null;if("string"==typeof t){const i=e.DEFAULT_BY_KEY[t];if(!i)return void console.warn(`AG Grid: the key ${t} is not a valid key for specifying a tool panel, valid keys are: ${Object.keys(e.DEFAULT_BY_KEY).join(",")}`);n=i}else n=t;i.push(n)}),i):i}};Px.DEFAULT_COLUMN_COMP={id:"columns",labelDefault:"Columns",labelKey:"columns",iconKey:"columns",toolPanel:"agColumnsToolPanel"},Px.DEFAULT_FILTER_COMP={id:"filters",labelDefault:"Filters",labelKey:"filters",iconKey:"filter",toolPanel:"agFiltersToolPanel"},Px.DEFAULT_BY_KEY={columns:Px.DEFAULT_COLUMN_COMP,filters:Px.DEFAULT_FILTER_COMP};var Nx=Px,Ox=class e extends s.uAl{constructor(){super(e.TEMPLATE)}setupResize(){const e=this.getGui(),t=this.resizeBar=this.createManagedBean(new Dx);e.setAttribute("id",`ag-${this.getCompId()}`),t.setElementToResize(e),this.appendChild(t)}getToolPanelId(){return this.toolPanelId}setToolPanelDef(e,t){const{id:i,minWidth:n,maxWidth:s,width:r}=e;this.toolPanelId=i,this.width=r;const o=this.userComponentFactory.getToolPanelCompDetails(e,t),a=o.newAgStackInstance();this.params=o.params,null!=a?(a.then(this.setToolPanelComponent.bind(this)),null!=n&&this.resizeBar.setMinWidth(n),null!=s&&this.resizeBar.setMaxWidth(s)):console.warn(`AG Grid: error processing tool panel component ${i}. You need to specify 'toolPanel'`)}setToolPanelComponent(e){this.toolPanelCompInstance=e,this.appendChild(e.getGui()),this.addDestroyFunc(()=>{this.destroyBean(e)}),this.width&&(this.getGui().style.width=`${this.width}px`)}getToolPanelInstance(){return this.toolPanelCompInstance}setResizerSizerSide(e){const t="left"===e,i=this.gos.get("enableRtl")?t:!t;this.resizeBar.setInverted(i)}refresh(){this.toolPanelCompInstance.refresh(this.params)}};Ox.TEMPLATE='<div class="ag-tool-panel-wrapper" role="tabpanel"/>',Tx([(0,s.dsm)("userComponentFactory")],Ox.prototype,"userComponentFactory",2),Tx([s.o7C],Ox.prototype,"setupResize",1);var _x=Ox,Fx=class e extends s.uAl{constructor(){super(e.TEMPLATE),this.toolPanelWrappers=[]}postConstruct(){var e;this.sideBarButtonsComp.addEventListener(kx.EVENT_SIDE_BAR_BUTTON_CLICKED,this.onToolPanelButtonClicked.bind(this));const{sideBar:t}=null!=(e=this.gos.get("initialState"))?e:{};this.setSideBarDef({sideBarDef:Nx.parse(this.gos.get("sideBar")),sideBarState:t}),this.addManagedPropertyListener("sideBar",this.onSideBarUpdated.bind(this)),this.sideBarService.registerSideBarComp(this),this.createManagedBean(new s.G21(this.getFocusableElement(),{onTabKeyDown:this.onTabKeyDown.bind(this),handleKeyDown:this.handleKeyDown.bind(this)}))}onTabKeyDown(e){if(e.defaultPrevented)return;const{focusService:t,sideBarButtonsComp:i}=this,n=this.getGui(),s=i.getGui(),r=this.gos.getActiveDomElement(),o=n.querySelector(".ag-tool-panel-wrapper:not(.ag-hidden)"),a=e.target;if(!o)return;if(s.contains(r))return void(t.focusInto(o,e.shiftKey)&&e.preventDefault());if(!e.shiftKey)return;let l=null;o.contains(r)?l=this.focusService.findNextFocusableElement(o,void 0,!0):t.isTargetUnderManagedComponent(o,a)&&e.shiftKey&&(l=this.focusService.findFocusableElementBeforeTabGuard(o,a)),l||(l=s.querySelector(".ag-selected button")),l&&l!==e.target&&(e.preventDefault(),l.focus())}handleKeyDown(e){const t=this.gos.getActiveDomElement();if(!this.sideBarButtonsComp.getGui().contains(t))return;const i=this.sideBarButtonsComp.getGui(),n=Array.prototype.slice.call(i.querySelectorAll(".ag-side-button")),r=n.findIndex(e=>e.contains(t));let o=null;switch(e.key){case s.DDm.LEFT:case s.DDm.UP:o=Math.max(0,r-1);break;case s.DDm.RIGHT:case s.DDm.DOWN:o=Math.min(r+1,n.length-1)}if(null===o)return;const a=n[o].querySelector("button");a&&(a.focus(),e.preventDefault())}onToolPanelButtonClicked(e){const t=e.toolPanelId;this.openedItem()===t?this.openToolPanel(void 0,"sideBarButtonClicked"):this.openToolPanel(t,"sideBarButtonClicked")}clearDownUi(){this.sideBarButtonsComp.clearButtons(),this.destroyToolPanelWrappers()}setSideBarDef({sideBarDef:e,sideBarState:t,existingToolPanelWrappers:i}){if(this.setDisplayed(!1),this.sideBar=e,this.sideBar&&this.sideBar.toolPanels){const e=this.sideBar.toolPanels;if(this.createToolPanelsAndSideButtons(e,t,i),!this.toolPanelWrappers.length)return;const n=t?t.visible:!this.sideBar.hiddenByDefault;if(this.setDisplayed(n),this.setSideBarPosition(t?t.position:this.sideBar.position),n)if(t){const{openToolPanel:e}=t;e&&this.openToolPanel(e,"sideBarInitializing")}else this.openToolPanel(this.sideBar.defaultToolPanel,"sideBarInitializing")}}getDef(){return this.sideBar}setSideBarPosition(e){e||(e="right"),this.position=e;const t="left"===e,i=t?"right":"left";return this.addOrRemoveCssClass("ag-side-bar-left",t),this.addOrRemoveCssClass("ag-side-bar-right",!t),this.toolPanelWrappers.forEach(e=>{e.setResizerSizerSide(i)}),this.eventService.dispatchEvent({type:s.sVA.EVENT_SIDE_BAR_UPDATED}),this}setDisplayed(e,t){super.setDisplayed(e,t),this.eventService.dispatchEvent({type:s.sVA.EVENT_SIDE_BAR_UPDATED})}getState(){const e={};return this.toolPanelWrappers.forEach(t=>{var i,n;e[t.getToolPanelId()]=null==(n=null==(i=t.getToolPanelInstance())?void 0:i.getState)?void 0:n.call(i)}),{visible:this.isDisplayed(),position:this.position,openToolPanel:this.openedItem(),toolPanels:e}}createToolPanelsAndSideButtons(e,t,i){var n;for(const s of e)this.createToolPanelAndSideButton(s,null==(n=null==t?void 0:t.toolPanels)?void 0:n[s.id],null==i?void 0:i[s.id])}validateDef(e){if(null==e.id)return console.warn("AG Grid: please review all your toolPanel components, it seems like at least one of them doesn't have an id"),!1;if("agColumnsToolPanel"===e.toolPanel&&!s.syG.__assertRegistered(s.zsj.ColumnsToolPanelModule,"Column Tool Panel",this.context.getGridId()))return!1;if("agFiltersToolPanel"===e.toolPanel){if(!s.syG.__assertRegistered(s.zsj.FiltersToolPanelModule,"Filters Tool Panel",this.context.getGridId()))return!1;if(this.filterManager.isAdvancedFilterEnabled())return s._.warnOnce("Advanced Filter does not work with Filters Tool Panel. Filters Tool Panel has been disabled."),!1}return!0}createToolPanelAndSideButton(e,t,i){if(!this.validateDef(e))return;const n=this.sideBarButtonsComp.addButtonComp(e);let r;i?r=i:(r=this.getContext().createBean(new _x),r.setToolPanelDef(e,{initialState:t,onStateUpdated:()=>this.eventService.dispatchEvent({type:s.sVA.EVENT_SIDE_BAR_UPDATED})})),r.setDisplayed(!1);const o=r.getGui();this.appendChild(o),this.toolPanelWrappers.push(r),s._.setAriaControls(n.getButtonElement(),o)}refresh(){this.toolPanelWrappers.forEach(e=>e.refresh())}openToolPanel(e,t="api"){const i=this.openedItem();i!==e&&(this.toolPanelWrappers.forEach(t=>{const i=e===t.getToolPanelId();t.setDisplayed(i)}),i!==this.openedItem()&&(this.sideBarButtonsComp.setActiveButton(e),this.raiseToolPanelVisibleEvent(e,null!=i?i:void 0,t)))}getToolPanelInstance(e){const t=this.toolPanelWrappers.filter(t=>t.getToolPanelId()===e)[0];if(t)return t.getToolPanelInstance();console.warn(`AG Grid: unable to lookup Tool Panel as invalid key supplied: ${e}`)}raiseToolPanelVisibleEvent(e,t,i){const n=!!e&&!!t;if(t){const e={type:s.sVA.EVENT_TOOL_PANEL_VISIBLE_CHANGED,source:i,key:t,visible:!1,switchingToolPanel:n};this.eventService.dispatchEvent(e)}if(e){const t={type:s.sVA.EVENT_TOOL_PANEL_VISIBLE_CHANGED,source:i,key:e,visible:!0,switchingToolPanel:n};this.eventService.dispatchEvent(t)}}close(e="api"){this.openToolPanel(void 0,e)}isToolPanelShowing(){return!!this.openedItem()}openedItem(){let e=null;return this.toolPanelWrappers.forEach(t=>{t.isDisplayed()&&(e=t.getToolPanelId())}),e}onSideBarUpdated(){var e;const t=Nx.parse(this.gos.get("sideBar"));let i={};t&&this.sideBar&&(null==(e=t.toolPanels)||e.forEach(e=>{var t,n;const{id:r}=e;if(!r)return;const o=null==(t=this.sideBar.toolPanels)?void 0:t.find(e=>e.id===r);if(!o||e.toolPanel!==o.toolPanel)return;const a=this.toolPanelWrappers.find(e=>e.getToolPanelId()===r);if(!a)return;const l=this.gos.addGridCommonParams((c=((e,t)=>{for(var i in t||(t={}))Ex.call(t,i)&&Ax(e,i,t[i]);if(xx)for(var i of xx(t))Mx.call(t,i)&&Ax(e,i,t[i]);return e})({},null!=(n=e.toolPanelParams)?n:{}),bx(c,wx({onStateUpdated:()=>this.eventService.dispatchEvent({type:s.sVA.EVENT_SIDE_BAR_UPDATED})}))));var c;!0===a.getToolPanelInstance().refresh(l)&&(this.toolPanelWrappers=this.toolPanelWrappers.filter(e=>e!==a),s._.removeFromParent(a.getGui()),i[r]=a)})),this.clearDownUi(),this.setSideBarDef({sideBarDef:t,existingToolPanelWrappers:i})}destroyToolPanelWrappers(){this.toolPanelWrappers.forEach(e=>{s._.removeFromParent(e.getGui()),this.destroyBean(e)}),this.toolPanelWrappers.length=0}destroy(){this.destroyToolPanelWrappers(),super.destroy()}};Fx.TEMPLATE='<div class="ag-side-bar ag-unselectable">\n            <ag-side-bar-buttons ref="sideBarButtons"></ag-side-bar-buttons>\n        </div>',Tx([(0,s.dsm)("focusService")],Fx.prototype,"focusService",2),Tx([(0,s.dsm)("filterManager")],Fx.prototype,"filterManager",2),Tx([(0,s.dsm)("sideBarService")],Fx.prototype,"sideBarService",2),Tx([(0,s.PIB)("sideBarButtons")],Fx.prototype,"sideBarButtonsComp",2),Tx([s.o7C],Fx.prototype,"postConstruct",1);var Gx=Fx,Vx=class extends s.XQb{constructor(){super(...arguments),this.isColGroupDef=e=>e&&void 0!==e.children,this.getId=e=>this.isColGroupDef(e)?e.groupId:e.colId}createColumnTree(e){const t=[],i=(e,n)=>{if(this.isColGroupDef(e)){const t=e,r=void 0!==t.groupId?t.groupId:t.headerName,o=new s.D45(t,r,!1,n),a=[];return t.children.forEach(e=>{const t=i(e,n+1);t&&a.push(t)}),o.setChildren(a),o}{const i=e,n=i.colId?i.colId:i.field,s=this.columnModel.getPrimaryColumn(n);return s||t.push(i),s}},n=[];return e.forEach(e=>{const t=i(e,0);t&&n.push(t)}),t.length>0&&console.warn("AG Grid: unable to find grid columns for the supplied colDef(s):",t),n}syncLayoutWithGrid(e){const t=this.getLeafPathTrees();e(this.mergeLeafPathTrees(t))}getLeafPathTrees(){const e=(t,i)=>{let n;if(t instanceof s.D45)if(t.isPadding())n=i;else{const e=Object.assign({},t.getColGroupDef());e.groupId=t.getGroupId(),e.children=[i],n=e}else{const e=Object.assign({},t.getColDef());e.colId=t.getColId(),n=e}const r=t.getOriginalParent();return r?e(r,n):n};return this.columnModel.getAllGridColumns().filter(e=>{const t=e.getColDef();return e.isPrimary()&&!t.showRowGroup}).map(t=>e(t,t.getColDef()))}mergeLeafPathTrees(e){const t=(e,t)=>this.isColGroupDef(e)&&this.isColGroupDef(t)&&this.getId(e)===this.getId(t),i=(e,t)=>{if(!this.isColGroupDef(t))return e;const n=e,s=t;return s.children&&s.groupId&&this.addChildrenToGroup(n,s.groupId,s.children[0])||s.children.forEach(e=>i(n,e)),n},n=[];for(let s=1;s<=e.length;s++){const r=e[s-1],o=e[s];t(r,o)?e[s]=i(r,o):n.push(r)}return n}addChildrenToGroup(e,t,i){if(!this.isColGroupDef(e))return!0;const n=e,r=i;if(((e,t)=>{const i=e.children.map(this.getId),n=s._.includes(i,this.getId(t)),r=s._.last(e.children),o=r&&this.getId(r)!==this.getId(t);return n&&o})(n,r))return n.children.push(r),!0;if(n.groupId===t){const e=n.children.map(this.getId);if(!s._.includes(e,this.getId(r)))return n.children.push(r),!0}return n.children.forEach(e=>this.addChildrenToGroup(e,t,i)),!1}};Tx([(0,s.dsm)("columnModel")],Vx.prototype,"columnModel",2),Vx=Tx([(0,s.dR4)("toolPanelColDefService")],Vx);var Bx=class extends s.XQb{registerSideBarComp(e){this.sideBarComp=e}getSideBarComp(){return this.sideBarComp}};Bx=Tx([(0,s.dR4)("sideBarService")],Bx);var Hx={version:"31.3.4",moduleName:s.zsj.SideBarModule,beans:[Vx,Bx],agStackComponents:[{componentName:"AgHorizontalResize",componentClass:Dx},{componentName:"AgSideBar",componentClass:Gx},{componentName:"AgSideBarButtons",componentClass:kx}],dependantModules:[fm]},zx=Object.defineProperty,Ux=Object.getOwnPropertyDescriptor,Wx=Object.getOwnPropertySymbols,jx=Object.prototype.hasOwnProperty,Kx=Object.prototype.propertyIsEnumerable,$x=(e,t,i)=>t in e?zx(e,t,{enumerable:!0,configurable:!0,writable:!0,value:i}):e[t]=i,Yx=(e,t)=>{for(var i in t||(t={}))jx.call(t,i)&&$x(e,i,t[i]);if(Wx)for(var i of Wx(t))Kx.call(t,i)&&$x(e,i,t[i]);return e},qx=(e,t,i,n)=>{for(var s,r=n>1?void 0:n?Ux(t,i):t,o=e.length-1;o>=0;o--)(s=e[o])&&(r=(n?s(t,i,r):s(r))||r);return n&&r&&zx(t,i,r),r},Xx=class e extends s.uAl{constructor(){super(e.TEMPLATE)}postConstruct(){this.createExpandIcons(),this.addManagedListener(this.eExpand,"click",this.onExpandClicked.bind(this)),this.addManagedListener(this.eExpand,"keydown",e=>{e.key===s.DDm.SPACE&&(e.preventDefault(),this.onExpandClicked())}),this.addManagedListener(this.eSelect.getInputElement(),"click",this.onSelectClicked.bind(this)),this.addManagedPropertyListener("functionsReadOnly",()=>this.onFunctionsReadOnlyPropChanged()),this.eFilterTextField.setAutoComplete(!1).onValueChange(()=>this.onFilterTextChanged()),this.addManagedListener(this.eFilterTextField.getInputElement(),"keydown",this.onMiniFilterKeyDown.bind(this)),this.addManagedListener(this.eventService,s.sVA.EVENT_NEW_COLUMNS_LOADED,this.showOrHideOptions.bind(this));const e=this.localeService.getLocaleTextFunc();this.eSelect.setInputAriaLabel(e("ariaColumnSelectAll","Toggle Select All Columns")),this.eFilterTextField.setInputAriaLabel(e("ariaFilterColumnsInput","Filter Columns Input")),this.activateTabIndex([this.eExpand])}onFunctionsReadOnlyPropChanged(){const e=this.gos.get("functionsReadOnly");this.eSelect.setReadOnly(e),this.eSelect.addOrRemoveCssClass("ag-column-select-column-readonly",e)}init(e){this.params=e;const t=this.gos.get("functionsReadOnly");this.eSelect.setReadOnly(t),this.eSelect.addOrRemoveCssClass("ag-column-select-column-readonly",t),this.columnModel.isReady()&&this.showOrHideOptions()}createExpandIcons(){this.eExpand.appendChild(this.eExpandChecked=s._.createIconNoSpan("columnSelectOpen",this.gos)),this.eExpand.appendChild(this.eExpandUnchecked=s._.createIconNoSpan("columnSelectClosed",this.gos)),this.eExpand.appendChild(this.eExpandIndeterminate=s._.createIconNoSpan("columnSelectIndeterminate",this.gos)),this.setExpandState(0)}showOrHideOptions(){const e=!this.params.suppressColumnFilter,t=!this.params.suppressColumnSelectAll,i=!this.params.suppressColumnExpandAll,n=this.columnModel.isPrimaryColumnGroupsPresent(),r=this.localeService.getLocaleTextFunc();this.eFilterTextField.setInputPlaceholder(r("searchOoo","Search...")),s._.setDisplayed(this.eFilterTextField.getGui(),e),s._.setDisplayed(this.eSelect.getGui(),t),s._.setDisplayed(this.eExpand,i&&n)}onFilterTextChanged(){this.onFilterTextChangedDebounced||(this.onFilterTextChangedDebounced=s._.debounce(()=>{const e=this.eFilterTextField.getValue();this.dispatchEvent({type:"filterChanged",filterText:e})},e.DEBOUNCE_DELAY)),this.onFilterTextChangedDebounced()}onMiniFilterKeyDown(t){t.key===s.DDm.ENTER&&setTimeout(()=>this.onSelectClicked(),e.DEBOUNCE_DELAY)}onSelectClicked(){this.dispatchEvent({type:this.selectState?"unselectAll":"selectAll"})}onExpandClicked(){this.dispatchEvent({type:0===this.expandState?"collapseAll":"expandAll"})}setExpandState(e){this.expandState=e,s._.setDisplayed(this.eExpandChecked,0===this.expandState),s._.setDisplayed(this.eExpandUnchecked,1===this.expandState),s._.setDisplayed(this.eExpandIndeterminate,2===this.expandState)}setSelectionState(e){this.selectState=e,this.eSelect.setValue(this.selectState)}};Xx.DEBOUNCE_DELAY=300,Xx.TEMPLATE='<div class="ag-column-select-header" role="presentation">\n            <div ref="eExpand" class="ag-column-select-header-icon"></div>\n            <ag-checkbox ref="eSelect" class="ag-column-select-header-checkbox"></ag-checkbox>\n            <ag-input-text-field class="ag-column-select-header-filter-wrapper" ref="eFilterTextField"></ag-input-text-field>\n        </div>',qx([(0,s.dsm)("columnModel")],Xx.prototype,"columnModel",2),qx([(0,s.PIB)("eExpand")],Xx.prototype,"eExpand",2),qx([(0,s.PIB)("eSelect")],Xx.prototype,"eSelect",2),qx([(0,s.PIB)("eFilterTextField")],Xx.prototype,"eFilterTextField",2),qx([s.o7C],Xx.prototype,"postConstruct",1);var Zx=Xx,Qx=class e{constructor(e,t,i,n=!1,r){this.eventService=new s.USV,this.displayName=e,this.dept=i,this.group=n,n?(this.columnGroup=t,this.expanded=r,this.children=[]):this.column=t}isGroup(){return this.group}getDisplayName(){return this.displayName}getColumnGroup(){return this.columnGroup}getColumn(){return this.column}getDept(){return this.dept}isExpanded(){return!!this.expanded}getChildren(){return this.children}isPassesFilter(){return this.passesFilter}setExpanded(t){t!==this.expanded&&(this.expanded=t,this.eventService.dispatchEvent({type:e.EVENT_EXPANDED_CHANGED}))}setPassesFilter(e){this.passesFilter=e}addEventListener(e,t){this.eventService.addEventListener(e,t)}removeEventListener(e,t){this.eventService.removeEventListener(e,t)}};Qx.EVENT_EXPANDED_CHANGED="expandedChanged";var Jx=Qx,eE=class extends s.uAl{constructor(e,t,i){super('<div class="ag-menu"></div>'),this.column=e,this.mouseEvent=t,this.parentEl=i,this.displayName=null}postConstruct(){if(this.initializeProperties(this.column),this.buildMenuItemMap(),this.column instanceof s.VPZ?this.displayName=this.columnModel.getDisplayNameForColumn(this.column,"columnToolPanel"):this.displayName=this.columnModel.getDisplayNameForProvidedColumnGroup(null,this.column,"columnToolPanel"),this.isActive()){this.mouseEvent.preventDefault();const e=this.getMappedMenuItems();if(0===e.length)return;this.displayContextMenu(e)}}initializeProperties(e){e instanceof s.D45?this.columns=e.getLeafColumns():this.columns=[e],this.allowGrouping=this.columns.some(e=>e.isPrimary()&&e.isAllowRowGroup()),this.allowValues=this.columns.some(e=>e.isPrimary()&&e.isAllowValue()),this.allowPivoting=this.columnModel.isPivotMode()&&this.columns.some(e=>e.isPrimary()&&e.isAllowPivot())}buildMenuItemMap(){const e=this.localeService.getLocaleTextFunc();this.menuItemMap=new Map,this.menuItemMap.set("rowGroup",{allowedFunction:e=>e.isPrimary()&&e.isAllowRowGroup()&&!this.columnModel.isColumnGroupingLocked(e),activeFunction:e=>e.isRowGroupActive(),activateLabel:()=>`${e("groupBy","Group by")} ${this.displayName}`,deactivateLabel:()=>`${e("ungroupBy","Un-Group by")} ${this.displayName}`,activateFunction:()=>{const e=this.columnModel.getRowGroupColumns();this.columnModel.setRowGroupColumns(this.addColumnsToList(e),"toolPanelUi")},deActivateFunction:()=>{const e=this.columnModel.getRowGroupColumns();this.columnModel.setRowGroupColumns(this.removeColumnsFromList(e),"toolPanelUi")},addIcon:"menuAddRowGroup",removeIcon:"menuRemoveRowGroup"}),this.menuItemMap.set("value",{allowedFunction:e=>e.isPrimary()&&e.isAllowValue(),activeFunction:e=>e.isValueActive(),activateLabel:()=>e("addToValues",`Add ${this.displayName} to values`,[this.displayName]),deactivateLabel:()=>e("removeFromValues",`Remove ${this.displayName} from values`,[this.displayName]),activateFunction:()=>{const e=this.columnModel.getValueColumns();this.columnModel.setValueColumns(this.addColumnsToList(e),"toolPanelUi")},deActivateFunction:()=>{const e=this.columnModel.getValueColumns();this.columnModel.setValueColumns(this.removeColumnsFromList(e),"toolPanelUi")},addIcon:"valuePanel",removeIcon:"valuePanel"}),this.menuItemMap.set("pivot",{allowedFunction:e=>this.columnModel.isPivotMode()&&e.isPrimary()&&e.isAllowPivot(),activeFunction:e=>e.isPivotActive(),activateLabel:()=>e("addToLabels",`Add ${this.displayName} to labels`,[this.displayName]),deactivateLabel:()=>e("removeFromLabels",`Remove ${this.displayName} from labels`,[this.displayName]),activateFunction:()=>{const e=this.columnModel.getPivotColumns();this.columnModel.setPivotColumns(this.addColumnsToList(e),"toolPanelUi")},deActivateFunction:()=>{const e=this.columnModel.getPivotColumns();this.columnModel.setPivotColumns(this.removeColumnsFromList(e),"toolPanelUi")},addIcon:"pivotPanel",removeIcon:"pivotPanel"})}addColumnsToList(e){return[...e].concat(this.columns.filter(t=>-1===e.indexOf(t)))}removeColumnsFromList(e){return e.filter(e=>-1===this.columns.indexOf(e))}displayContextMenu(e){const t=this.getGui(),i=this.createBean(new s.i9O),n=this.localeService.getLocaleTextFunc();let r=()=>{};t.appendChild(i.getGui()),i.addMenuItems(e),i.addManagedListener(i,s.yuY.EVENT_CLOSE_MENU,()=>{this.parentEl.focus(),r()});const o=this.popupService.addPopup({modal:!0,eChild:t,closeOnEsc:!0,afterGuiAttached:()=>this.focusService.focusInto(i.getGui()),ariaLabel:n("ariaLabelContextMenu","Context Menu"),closedCallback:e=>{e instanceof KeyboardEvent&&this.parentEl.focus(),this.destroyBean(i)}});o&&(r=o.hideFunc),this.popupService.positionPopupUnderMouseEvent({type:"columnContextMenu",mouseEvent:this.mouseEvent,ePopup:t})}isActive(){return this.allowGrouping||this.allowValues||this.allowPivoting}getMappedMenuItems(){const e=[];for(const t of this.menuItemMap.values()){const i=this.columns.some(e=>t.allowedFunction(e)&&!t.activeFunction(e)),n=this.columns.some(e=>t.allowedFunction(e)&&t.activeFunction(e));i&&e.push({name:t.activateLabel(this.displayName),icon:s._.createIconNoSpan(t.addIcon,this.gos,null),action:()=>t.activateFunction()}),n&&e.push({name:t.deactivateLabel(this.displayName),icon:s._.createIconNoSpan(t.removeIcon,this.gos,null),action:()=>t.deActivateFunction()})}return e}};qx([(0,s.dsm)("columnModel")],eE.prototype,"columnModel",2),qx([(0,s.dsm)("popupService")],eE.prototype,"popupService",2),qx([(0,s.dsm)("focusService")],eE.prototype,"focusService",2),qx([s.o7C],eE.prototype,"postConstruct",1);var tE=class e extends s.uAl{constructor(e,t,i,n){super(),this.modelItem=e,this.allowDragging=t,this.eventType=i,this.focusWrapper=n,this.processingColumnStateChange=!1,this.modelItem=e,this.columnGroup=e.getColumnGroup(),this.columnDept=e.getDept(),this.displayName=e.getDisplayName(),this.allowDragging=t}init(){this.setTemplate(e.TEMPLATE),this.eDragHandle=s._.createIconNoSpan("columnDrag",this.gos),this.eDragHandle.classList.add("ag-drag-handle","ag-column-select-column-group-drag-handle");const t=this.cbSelect.getGui(),i=this.cbSelect.getInputElement();t.insertAdjacentElement("afterend",this.eDragHandle),i.setAttribute("tabindex","-1"),this.eLabel.innerHTML=this.displayName?this.displayName:"",this.setupExpandContract(),this.addCssClass("ag-column-select-indent-"+this.columnDept),this.addManagedListener(this.eventService,s.sVA.EVENT_COLUMN_PIVOT_MODE_CHANGED,this.onColumnStateChanged.bind(this)),this.addManagedListener(this.eLabel,"click",this.onLabelClicked.bind(this)),this.addManagedListener(this.cbSelect,s.sVA.EVENT_FIELD_VALUE_CHANGED,this.onCheckboxChanged.bind(this)),this.addManagedListener(this.modelItem,Jx.EVENT_EXPANDED_CHANGED,this.onExpandChanged.bind(this)),this.addManagedListener(this.focusWrapper,"keydown",this.handleKeyDown.bind(this)),this.addManagedListener(this.focusWrapper,"contextmenu",this.onContextMenu.bind(this)),this.setOpenClosedIcons(),this.setupDragging(),this.onColumnStateChanged(),this.addVisibilityListenersToAllChildren(),this.refreshAriaExpanded(),this.refreshAriaLabel(),this.setupTooltip(),s.PC7.getToolPanelClassesFromColDef(this.columnGroup.getColGroupDef(),this.gos,null,this.columnGroup).forEach(e=>this.addOrRemoveCssClass(e,!0))}getColumns(){return this.columnGroup.getLeafColumns()}setupTooltip(){const e=this.columnGroup.getColGroupDef();if(!e)return;let t;"whenTruncated"===this.gos.get("tooltipShowMode")&&(t=()=>this.eLabel.scrollWidth>this.eLabel.clientWidth);const i=()=>{const i=e.headerTooltip;this.setTooltip({newTooltipText:i,location:"columnToolPanelColumnGroup",shouldDisplayTooltip:t})};i(),this.addManagedListener(this.eventService,s.sVA.EVENT_NEW_COLUMNS_LOADED,i)}getTooltipParams(){const e=super.getTooltipParams();return e.location="columnToolPanelColumnGroup",e}handleKeyDown(e){switch(e.key){case s.DDm.LEFT:e.preventDefault(),this.modelItem.setExpanded(!1);break;case s.DDm.RIGHT:e.preventDefault(),this.modelItem.setExpanded(!0);break;case s.DDm.SPACE:e.preventDefault(),this.isSelectable()&&this.onSelectAllChanged(!this.isSelected())}}onContextMenu(e){const{columnGroup:t,gos:i}=this;if(i.get("functionsReadOnly"))return;const n=this.createBean(new eE(t,e,this.focusWrapper));this.addDestroyFunc(()=>{n.isAlive()&&this.destroyBean(n)})}addVisibilityListenersToAllChildren(){this.columnGroup.getLeafColumns().forEach(e=>{this.addManagedListener(e,s.VPZ.EVENT_VISIBLE_CHANGED,this.onColumnStateChanged.bind(this)),this.addManagedListener(e,s.VPZ.EVENT_VALUE_CHANGED,this.onColumnStateChanged.bind(this)),this.addManagedListener(e,s.VPZ.EVENT_PIVOT_CHANGED,this.onColumnStateChanged.bind(this)),this.addManagedListener(e,s.VPZ.EVENT_ROW_GROUP_CHANGED,this.onColumnStateChanged.bind(this))})}setupDragging(){if(!this.allowDragging)return void s._.setDisplayed(this.eDragHandle,!1);let e=!this.gos.get("suppressDragLeaveHidesColumns");const t={type:s.qRA.ToolPanel,eElement:this.eDragHandle,dragItemName:this.displayName,getDefaultIconName:()=>e?s.WO_.ICON_HIDE:s.WO_.ICON_NOT_ALLOWED,getDragItem:()=>this.createDragItem(),onDragStarted:()=>{e=!this.gos.get("suppressDragLeaveHidesColumns");const t={type:s.sVA.EVENT_COLUMN_PANEL_ITEM_DRAG_START,column:this.columnGroup};this.eventService.dispatchEvent(t)},onDragStopped:()=>{const e={type:s.sVA.EVENT_COLUMN_PANEL_ITEM_DRAG_END};this.eventService.dispatchEvent(e)},onGridEnter:t=>{e&&this.modelItemUtils.updateColumns({columns:this.columnGroup.getLeafColumns(),visibleState:null==t?void 0:t.visibleState,pivotState:null==t?void 0:t.pivotState,eventType:this.eventType})},onGridExit:()=>{e&&this.onChangeCommon(!1)}};this.dragAndDropService.addDragSource(t,!0),this.addDestroyFunc(()=>this.dragAndDropService.removeDragSource(t))}createDragItem(){const e=this.columnGroup.getLeafColumns(),t={},i={};return e.forEach(e=>{const n=e.getId();t[n]=e.isVisible(),i[n]=this.modelItemUtils.createPivotState(e)}),{columns:e,visibleState:t,pivotState:i}}setupExpandContract(){this.eGroupClosedIcon.appendChild(s._.createIcon("columnSelectClosed",this.gos,null)),this.eGroupOpenedIcon.appendChild(s._.createIcon("columnSelectOpen",this.gos,null)),this.addManagedListener(this.eGroupClosedIcon,"click",this.onExpandOrContractClicked.bind(this)),this.addManagedListener(this.eGroupOpenedIcon,"click",this.onExpandOrContractClicked.bind(this));const e=new s.MVO(this.eColumnGroupIcons,!0);this.addManagedListener(e,s.MVO.EVENT_TAP,this.onExpandOrContractClicked.bind(this)),this.addDestroyFunc(e.destroy.bind(e))}onLabelClicked(){const e=!this.cbSelect.getValue();this.onChangeCommon(e)}onCheckboxChanged(e){this.onChangeCommon(e.selected)}getVisibleLeafColumns(){const e=[],t=i=>{i.forEach(i=>{i.isPassesFilter()&&(i.isGroup()?t(i.getChildren()):e.push(i.getColumn()))})};return t(this.modelItem.getChildren()),e}onChangeCommon(e){this.refreshAriaLabel(),this.processingColumnStateChange||this.modelItemUtils.selectAllChildren(this.modelItem.getChildren(),e,this.eventType)}refreshAriaLabel(){const e=this.localeService.getLocaleTextFunc(),t=e("ariaColumnGroup","Column Group"),i=this.cbSelect.getValue(),n=void 0===i?e("ariaIndeterminate","indeterminate"):i?e("ariaVisible","visible"):e("ariaHidden","hidden"),r=e("ariaToggleVisibility","Press SPACE to toggle visibility");s._.setAriaLabel(this.focusWrapper,`${this.displayName} ${t}`),this.cbSelect.setInputAriaLabel(`${r} (${n})`),s._.setAriaDescribedBy(this.focusWrapper,this.cbSelect.getInputElement().id)}onColumnStateChanged(){const e=this.workOutSelectedValue(),t=this.workOutReadOnlyValue();this.processingColumnStateChange=!0,this.cbSelect.setValue(e),this.cbSelect.setReadOnly(t),this.addOrRemoveCssClass("ag-column-select-column-group-readonly",t),this.processingColumnStateChange=!1}workOutSelectedValue(){const e=this.columnModel.isPivotMode(),t=this.getVisibleLeafColumns();let i=0,n=0;if(t.forEach(t=>{!e&&t.getColDef().lockVisible||(this.isColumnChecked(t,e)?i++:n++)}),!(i>0&&n>0))return i>0}workOutReadOnlyValue(){const e=this.columnModel.isPivotMode();let t=0;return this.columnGroup.getLeafColumns().forEach(i=>{e?i.isAnyFunctionAllowed()&&t++:i.getColDef().lockVisible||t++}),0===t}isColumnChecked(e,t){if(t){const t=e.isPivotActive(),i=e.isRowGroupActive(),n=e.isValueActive();return t||i||n}return e.isVisible()}onExpandOrContractClicked(){const e=this.modelItem.isExpanded();this.modelItem.setExpanded(!e)}onExpandChanged(){this.setOpenClosedIcons(),this.refreshAriaExpanded()}setOpenClosedIcons(){const e=this.modelItem.isExpanded();s._.setDisplayed(this.eGroupClosedIcon,!e),s._.setDisplayed(this.eGroupOpenedIcon,e)}refreshAriaExpanded(){s._.setAriaExpanded(this.focusWrapper,this.modelItem.isExpanded())}getDisplayName(){return this.displayName}onSelectAllChanged(e){const t=this.cbSelect.getValue();!this.cbSelect.isReadOnly()&&(e&&!t||!e&&t)&&this.cbSelect.toggle()}isSelected(){return this.cbSelect.getValue()}isSelectable(){return!this.cbSelect.isReadOnly()}setSelected(e){this.cbSelect.setValue(e,!0)}};tE.TEMPLATE='<div class="ag-column-select-column-group" aria-hidden="true">\n            <span class="ag-column-group-icons" ref="eColumnGroupIcons" >\n                <span class="ag-column-group-closed-icon" ref="eGroupClosedIcon"></span>\n                <span class="ag-column-group-opened-icon" ref="eGroupOpenedIcon"></span>\n            </span>\n            <ag-checkbox ref="cbSelect" class="ag-column-select-checkbox"></ag-checkbox>\n            <span class="ag-column-select-column-label" ref="eLabel"></span>\n        </div>',qx([(0,s.dsm)("columnModel")],tE.prototype,"columnModel",2),qx([(0,s.dsm)("dragAndDropService")],tE.prototype,"dragAndDropService",2),qx([(0,s.dsm)("modelItemUtils")],tE.prototype,"modelItemUtils",2),qx([(0,s.PIB)("cbSelect")],tE.prototype,"cbSelect",2),qx([(0,s.PIB)("eLabel")],tE.prototype,"eLabel",2),qx([(0,s.PIB)("eGroupOpenedIcon")],tE.prototype,"eGroupOpenedIcon",2),qx([(0,s.PIB)("eGroupClosedIcon")],tE.prototype,"eGroupClosedIcon",2),qx([(0,s.PIB)("eColumnGroupIcons")],tE.prototype,"eColumnGroupIcons",2),qx([s.o7C],tE.prototype,"init",1);var iE=tE,nE=class extends s.XQb{constructor(e,t){super(),this.comp=e,this.virtualList=t}postConstruct(){this.createManagedBean(new s.ia$(this.comp,this.virtualList,{dragSourceType:s.qRA.ToolPanel,listItemDragStartEvent:s.sVA.EVENT_COLUMN_PANEL_ITEM_DRAG_START,listItemDragEndEvent:s.sVA.EVENT_COLUMN_PANEL_ITEM_DRAG_END,eventSource:this.eventService,getCurrentDragValue:e=>this.getCurrentDragValue(e),isMoveBlocked:e=>this.isMoveBlocked(e),getNumRows:e=>e.getDisplayedColsList().length,moveItem:(e,t)=>this.moveItem(e,t)}))}getCurrentDragValue(e){return e.column}isMoveBlocked(e){return!!this.gos.get("suppressMovableColumns")||!!this.getCurrentColumns(e).find(e=>{const t=e.getColDef();return!!t.suppressMovable||!!t.lockPosition})}moveItem(e,t){const i=this.getTargetIndex(e,t),n=this.getCurrentColumns(e);null!=i&&this.columnModel.moveColumns(n,i,"toolPanelUi")}getMoveDiff(e,t){const i=this.columnModel.getAllGridColumns(),n=this.getCurrentColumns(e),s=n[0],r=n.length;return i.indexOf(s)<t?r:0}getCurrentColumns(e){return e instanceof s.D45?e.getLeafColumns():[e]}getTargetIndex(e,t){if(!t)return null;const i=t.component;let n,s="top"===t.position;if(i instanceof iE?(n=i.getColumns()[0],s=!0):n=i.getColumn(),-1!==this.getCurrentColumns(e).indexOf(n))return null;const r=this.columnModel.getAllGridColumns().indexOf(n),o=s?r:r+1;return o-this.getMoveDiff(e,o)}};qx([(0,s.dsm)("columnModel")],nE.prototype,"columnModel",2),qx([s.o7C],nE.prototype,"postConstruct",1);var sE=class e extends s.uAl{constructor(e,t,i,n){super(),this.allowDragging=t,this.groupsExist=i,this.focusWrapper=n,this.processingColumnStateChange=!1,this.column=e.getColumn(),this.columnDept=e.getDept(),this.displayName=e.getDisplayName()}init(){this.setTemplate(e.TEMPLATE),this.eDragHandle=s._.createIconNoSpan("columnDrag",this.gos),this.eDragHandle.classList.add("ag-drag-handle","ag-column-select-column-drag-handle");const t=this.cbSelect.getGui(),i=this.cbSelect.getInputElement();t.insertAdjacentElement("afterend",this.eDragHandle),i.setAttribute("tabindex","-1");const n=s._.escapeString(this.displayName);this.eLabel.innerHTML=n;const r=this.columnDept;this.groupsExist&&this.addCssClass("ag-column-select-add-group-indent"),this.addCssClass(`ag-column-select-indent-${r}`),this.setupDragging(),this.addManagedListener(this.eventService,s.sVA.EVENT_COLUMN_PIVOT_MODE_CHANGED,this.onColumnStateChanged.bind(this)),this.addManagedListener(this.column,s.VPZ.EVENT_VALUE_CHANGED,this.onColumnStateChanged.bind(this)),this.addManagedListener(this.column,s.VPZ.EVENT_PIVOT_CHANGED,this.onColumnStateChanged.bind(this)),this.addManagedListener(this.column,s.VPZ.EVENT_ROW_GROUP_CHANGED,this.onColumnStateChanged.bind(this)),this.addManagedListener(this.column,s.VPZ.EVENT_VISIBLE_CHANGED,this.onColumnStateChanged.bind(this)),this.addManagedListener(this.focusWrapper,"keydown",this.handleKeyDown.bind(this)),this.addManagedListener(this.focusWrapper,"contextmenu",this.onContextMenu.bind(this)),this.addManagedPropertyListener("functionsReadOnly",this.onColumnStateChanged.bind(this)),this.addManagedListener(this.cbSelect,s.sVA.EVENT_FIELD_VALUE_CHANGED,this.onCheckboxChanged.bind(this)),this.addManagedListener(this.eLabel,"click",this.onLabelClicked.bind(this)),this.onColumnStateChanged(),this.refreshAriaLabel(),this.setupTooltip(),s.PC7.getToolPanelClassesFromColDef(this.column.getColDef(),this.gos,this.column,null).forEach(e=>this.addOrRemoveCssClass(e,!0))}getColumn(){return this.column}setupTooltip(){let e;"whenTruncated"===this.gos.get("tooltipShowMode")&&(e=()=>this.eLabel.scrollWidth>this.eLabel.clientWidth);const t=()=>{const t=this.column.getColDef().headerTooltip;this.setTooltip({newTooltipText:t,location:"columnToolPanelColumn",shouldDisplayTooltip:e})};t(),this.addManagedListener(this.eventService,s.sVA.EVENT_NEW_COLUMNS_LOADED,t)}getTooltipParams(){const e=super.getTooltipParams();return e.location="columnToolPanelColumn",e.colDef=this.column.getColDef(),e}onContextMenu(e){const{column:t,gos:i}=this;if(i.get("functionsReadOnly"))return;const n=this.createBean(new eE(t,e,this.focusWrapper));this.addDestroyFunc(()=>{n.isAlive()&&this.destroyBean(n)})}handleKeyDown(e){e.key===s.DDm.SPACE&&(e.preventDefault(),this.isSelectable()&&this.onSelectAllChanged(!this.isSelected()))}onLabelClicked(){if(this.gos.get("functionsReadOnly"))return;const e=!this.cbSelect.getValue();this.onChangeCommon(e)}onCheckboxChanged(e){this.onChangeCommon(e.selected)}onChangeCommon(e){this.cbSelect.isReadOnly()||(this.refreshAriaLabel(),this.processingColumnStateChange||this.modelItemUtils.setColumn(this.column,e,"toolPanelUi"))}refreshAriaLabel(){const e=this.localeService.getLocaleTextFunc(),t=e("ariaColumn","Column"),i=this.cbSelect.getValue()?e("ariaVisible","visible"):e("ariaHidden","hidden"),n=e("ariaToggleVisibility","Press SPACE to toggle visibility");s._.setAriaLabel(this.focusWrapper,`${this.displayName} ${t}`),this.cbSelect.setInputAriaLabel(`${n} (${i})`),s._.setAriaDescribedBy(this.focusWrapper,this.cbSelect.getInputElement().id)}setupDragging(){if(!this.allowDragging)return void s._.setDisplayed(this.eDragHandle,!1);let e=!this.gos.get("suppressDragLeaveHidesColumns");const t={type:s.qRA.ToolPanel,eElement:this.eDragHandle,dragItemName:this.displayName,getDefaultIconName:()=>e?s.WO_.ICON_HIDE:s.WO_.ICON_NOT_ALLOWED,getDragItem:()=>this.createDragItem(),onDragStarted:()=>{e=!this.gos.get("suppressDragLeaveHidesColumns");const t={type:s.sVA.EVENT_COLUMN_PANEL_ITEM_DRAG_START,column:this.column};this.eventService.dispatchEvent(t)},onDragStopped:()=>{const e={type:s.sVA.EVENT_COLUMN_PANEL_ITEM_DRAG_END};this.eventService.dispatchEvent(e)},onGridEnter:t=>{e&&this.modelItemUtils.updateColumns({columns:[this.column],visibleState:null==t?void 0:t.visibleState,pivotState:null==t?void 0:t.pivotState,eventType:"toolPanelUi"})},onGridExit:()=>{e&&this.onChangeCommon(!1)}};this.dragAndDropService.addDragSource(t,!0),this.addDestroyFunc(()=>this.dragAndDropService.removeDragSource(t))}createDragItem(){const e=this.column.getColId(),t={[e]:this.column.isVisible()},i={[e]:this.modelItemUtils.createPivotState(this.column)};return{columns:[this.column],visibleState:t,pivotState:i}}onColumnStateChanged(){this.processingColumnStateChange=!0;const e=this.columnModel.isPivotMode();if(e){const e=this.column.isAnyFunctionActive();this.cbSelect.setValue(e)}else this.cbSelect.setValue(this.column.isVisible());let t=!0,i=!0;if(e){const e=this.gos.get("functionsReadOnly"),n=!this.column.isAnyFunctionAllowed();t=!e&&!n,i=t}else{const{enableRowGroup:e,enableValue:n,lockPosition:s,suppressMovable:r,lockVisible:o}=this.column.getColDef();t=!o,i=!!e||!!n||!(s||r)}this.cbSelect.setReadOnly(!t),this.eDragHandle.classList.toggle("ag-column-select-column-readonly",!i),this.addOrRemoveCssClass("ag-column-select-column-readonly",!i&&!t);const n=e&&this.gos.get("functionsPassive");this.cbSelect.setPassive(n),this.processingColumnStateChange=!1}getDisplayName(){return this.displayName}onSelectAllChanged(e){e!==this.cbSelect.getValue()&&(this.cbSelect.isReadOnly()||this.cbSelect.toggle())}isSelected(){return this.cbSelect.getValue()}isSelectable(){return!this.cbSelect.isReadOnly()}isExpandable(){return!1}setExpanded(e){console.warn("AG Grid: can not expand a column item that does not represent a column group header")}};sE.TEMPLATE='<div class="ag-column-select-column" aria-hidden="true">\n            <ag-checkbox ref="cbSelect" class="ag-column-select-checkbox"></ag-checkbox>\n            <span class="ag-column-select-column-label" ref="eLabel"></span>\n        </div>',qx([(0,s.dsm)("columnModel")],sE.prototype,"columnModel",2),qx([(0,s.dsm)("dragAndDropService")],sE.prototype,"dragAndDropService",2),qx([(0,s.dsm)("modelItemUtils")],sE.prototype,"modelItemUtils",2),qx([(0,s.PIB)("eLabel")],sE.prototype,"eLabel",2),qx([(0,s.PIB)("cbSelect")],sE.prototype,"cbSelect",2),qx([s.o7C],sE.prototype,"init",1);var rE=sE,oE=class{constructor(e){this.items=e}getRowCount(){return this.items.length}getRow(e){return this.items[e]}},aE=class e extends s.uAl{constructor(){super(e.TEMPLATE),this.destroyColumnItemFuncs=[],this.hasLoadedInitialState=!1,this.isInitialState=!1}destroyColumnTree(){this.allColsTree=[],this.destroyColumnItemFuncs.forEach(e=>e()),this.destroyColumnItemFuncs=[]}init(e,t,i){this.params=e,this.allowDragging=t,this.eventType=i,this.params.suppressSyncLayoutWithGrid||this.addManagedListener(this.eventService,s.sVA.EVENT_COLUMN_MOVED,this.onColumnsChanged.bind(this)),this.addManagedListener(this.eventService,s.sVA.EVENT_NEW_COLUMNS_LOADED,this.onColumnsChanged.bind(this)),[s.sVA.EVENT_COLUMN_PIVOT_CHANGED,s.sVA.EVENT_COLUMN_PIVOT_MODE_CHANGED,s.sVA.EVENT_COLUMN_ROW_GROUP_CHANGED,s.sVA.EVENT_COLUMN_VALUE_CHANGED,s.sVA.EVENT_COLUMN_VISIBLE,s.sVA.EVENT_NEW_COLUMNS_LOADED].forEach(e=>{this.addManagedListener(this.eventService,e,this.fireSelectionChangedEvent.bind(this))}),this.expandGroupsByDefault=!this.params.contractColumnSelection,this.virtualList=this.createManagedBean(new s.wjn({cssIdentifier:"column-select",ariaRole:"tree"})),this.appendChild(this.virtualList.getGui()),this.virtualList.setComponentCreator((e,t)=>(s._.setAriaLevel(t,e.getDept()+1),this.createComponentFromItem(e,t))),this.columnModel.isReady()&&this.onColumnsChanged(),this.params.suppressColumnMove||this.createManagedBean(new nE(this,this.virtualList))}createComponentFromItem(e,t){if(e.isGroup()){const i=new iE(e,this.allowDragging,this.eventType,t);return this.getContext().createBean(i),i}const i=new rE(e,this.allowDragging,this.groupsExist,t);return this.getContext().createBean(i),i}onColumnsChanged(){this.hasLoadedInitialState||(this.hasLoadedInitialState=!0,this.isInitialState=!!this.params.initialState);const e=this.getExpandedStates(),t=this.columnModel.isPivotMode();this.params.suppressSyncLayoutWithGrid||t?this.buildTreeFromProvidedColumnDefs():this.buildTreeFromWhatGridIsDisplaying(),this.setExpandedStates(e),this.markFilteredColumns(),this.flattenAndFilterModel(),this.isInitialState=!1}getDisplayedColsList(){return this.displayedColsList}getExpandedStates(){const e={};if(this.isInitialState){const{expandedGroupIds:t}=this.params.initialState;return t.forEach(t=>{e[t]=!0}),e}return this.allColsTree?(this.forEachItem(t=>{if(!t.isGroup())return;const i=t.getColumnGroup();i&&(e[i.getId()]=t.isExpanded())}),e):{}}setExpandedStates(e){if(!this.allColsTree)return;const{isInitialState:t}=this;this.forEachItem(i=>{if(!i.isGroup())return;const n=i.getColumnGroup();if(n){const s=e[n.getId()];(null!=s||t)&&i.setExpanded(!!s)}})}buildTreeFromWhatGridIsDisplaying(){this.colDefService.syncLayoutWithGrid(this.setColumnLayout.bind(this))}setColumnLayout(e){const t=this.colDefService.createColumnTree(e);this.buildListModel(t),this.groupsExist=e.some(e=>e&&void 0!==e.children),this.markFilteredColumns(),this.flattenAndFilterModel()}buildTreeFromProvidedColumnDefs(){this.buildListModel(this.columnModel.getPrimaryColumnTree()),this.groupsExist=this.columnModel.isPrimaryColumnGroupsPresent()}buildListModel(e){const t=this.onColumnExpanded.bind(this),i=e=>{e.addEventListener(Jx.EVENT_EXPANDED_CHANGED,t);const i=e.removeEventListener.bind(e,Jx.EVENT_EXPANDED_CHANGED,t);this.destroyColumnItemFuncs.push(i)},n=(e,t,i)=>{e.forEach(e=>{e instanceof s.D45?r(e,t,i):o(e,t,i)})},r=(e,t,s)=>{const r=e.getColGroupDef();if(r&&r.suppressColumnsToolPanel)return;if(e.isPadding())return void n(e.getChildren(),t,s);const o=this.columnModel.getDisplayNameForProvidedColumnGroup(null,e,"columnToolPanel"),a=new Jx(o,e,t,!0,this.expandGroupsByDefault);s.push(a),i(a),n(e.getChildren(),t+1,a.getChildren())},o=(e,t,i)=>{if(e.getColDef()&&e.getColDef().suppressColumnsToolPanel)return;const n=this.columnModel.getDisplayNameForColumn(e,"columnToolPanel");i.push(new Jx(n,e,t))};this.destroyColumnTree(),n(e,0,this.allColsTree)}onColumnExpanded(){this.flattenAndFilterModel()}flattenAndFilterModel(){this.displayedColsList=[];const e=t=>{t.isPassesFilter()&&(this.displayedColsList.push(t),t.isGroup()&&t.isExpanded()&&t.getChildren().forEach(e))};this.allColsTree.forEach(e),this.virtualList.setModel(new oE(this.displayedColsList));const t=this.virtualList.getLastFocusedRow();this.virtualList.refresh(),null!=t&&this.focusRowIfAlive(t),this.notifyListeners(),this.refreshAriaLabel()}refreshAriaLabel(){const e=this.localeService.getLocaleTextFunc(),t=e("ariaColumnPanelList","Column List"),i=e("columns","Columns"),n=this.displayedColsList.length;s._.setAriaLabel(this.virtualList.getAriaElement(),`${t} ${n} ${i}`)}focusRowIfAlive(e){window.setTimeout(()=>{this.isAlive()&&this.virtualList.focusRow(e)},0)}forEachItem(e){const t=i=>{i.forEach(i=>{e(i),i.isGroup()&&t(i.getChildren())})};this.allColsTree&&t(this.allColsTree)}doSetExpandedAll(e){this.forEachItem(t=>{t.isGroup()&&t.setExpanded(e)})}setGroupsExpanded(e,t){if(!t)return void this.doSetExpandedAll(e);const i=[];this.forEachItem(n=>{if(!n.isGroup())return;const s=n.getColumnGroup().getId();t.indexOf(s)>=0&&(n.setExpanded(e),i.push(s))});const n=t.filter(e=>!s._.includes(i,e));n.length>0&&console.warn("AG Grid: unable to find group(s) for supplied groupIds:",n)}getExpandState(){let e=0,t=0;return this.forEachItem(i=>{i.isGroup()&&(i.isExpanded()?e++:t++)}),e>0&&t>0?2:t>0?1:0}doSetSelectedAll(e){this.modelItemUtils.selectAllChildren(this.allColsTree,e,this.eventType)}getSelectionState(){let e=0,t=0;const i=this.columnModel.isPivotMode();if(this.forEachItem(n=>{if(n.isGroup())return;if(!n.isPassesFilter())return;const s=n.getColumn(),r=s.getColDef();let o;if(i){if(!s.isAllowPivot()&&!s.isAllowRowGroup()&&!s.isAllowValue())return;o=s.isValueActive()||s.isPivotActive()||s.isRowGroupActive()}else{if(r.lockVisible)return;o=s.isVisible()}o?e++:t++}),!(e>0&&t>0))return!(0===e||t>0)}setFilterText(e){this.filterText=s._.exists(e)?e.toLowerCase():null,this.markFilteredColumns(),this.flattenAndFilterModel()}markFilteredColumns(){const e=e=>{if(!s._.exists(this.filterText))return!0;const t=e.getDisplayName();return null==t||-1!==t.toLowerCase().indexOf(this.filterText)},t=(i,n)=>{let s=!1;if(i.isGroup()){const r=e(i);i.getChildren().forEach(e=>{const i=t(e,r||n);i&&(s=i)})}const r=!(!n&&!s)||e(i);return i.setPassesFilter(r),r};this.allColsTree.forEach(e=>t(e,!1))}notifyListeners(){this.fireGroupExpandedEvent(),this.fireSelectionChangedEvent()}fireGroupExpandedEvent(){const e=this.getExpandState();this.dispatchEvent({type:"groupExpanded",state:e})}fireSelectionChangedEvent(){if(!this.allColsTree)return;const e=this.getSelectionState();this.dispatchEvent({type:"selectionChanged",state:e})}getExpandedGroups(){const e=[];return this.allColsTree?(this.forEachItem(t=>{t.isGroup()&&t.isExpanded()&&e.push(t.getColumnGroup().getId())}),e):e}};aE.TEMPLATE='<div class="ag-column-select-list" role="presentation"></div>',qx([(0,s.dsm)("columnModel")],aE.prototype,"columnModel",2),qx([(0,s.dsm)("toolPanelColDefService")],aE.prototype,"colDefService",2),qx([(0,s.dsm)("modelItemUtils")],aE.prototype,"modelItemUtils",2),qx([s.yah],aE.prototype,"destroyColumnTree",1);var lE=aE,cE=class extends s.uAl{createTemplate(){return'<div class="ag-pivot-mode-panel">\n                <ag-toggle-button ref="cbPivotMode" class="ag-pivot-mode-select"></ag-toggle-button>\n            </div>'}init(){this.setTemplate(this.createTemplate()),this.cbPivotMode.setValue(this.columnModel.isPivotMode());const e=this.localeService.getLocaleTextFunc();this.cbPivotMode.setLabel(e("pivotMode","Pivot Mode")),this.addManagedListener(this.cbPivotMode,s.sVA.EVENT_FIELD_VALUE_CHANGED,this.onBtPivotMode.bind(this)),this.addManagedListener(this.eventService,s.sVA.EVENT_NEW_COLUMNS_LOADED,this.onPivotModeChanged.bind(this)),this.addManagedListener(this.eventService,s.sVA.EVENT_COLUMN_PIVOT_MODE_CHANGED,this.onPivotModeChanged.bind(this))}onBtPivotMode(){const e=!!this.cbPivotMode.getValue();if(e!==this.columnModel.isPivotMode()){this.gos.updateGridOptions({options:{pivotMode:e},source:"toolPanelUi"});const{api:t}=this;t&&t.refreshHeader()}}onPivotModeChanged(){const e=this.columnModel.isPivotMode();this.cbPivotMode.setValue(e)}};qx([(0,s.dsm)("columnModel")],cE.prototype,"columnModel",2),qx([(0,s.dsm)("gridApi")],cE.prototype,"api",2),qx([(0,s.PIB)("cbPivotMode")],cE.prototype,"cbPivotMode",2),qx([s.fK3],cE.prototype,"init",1);var hE=class e extends s.uAl{constructor(){super(e.TEMPLATE)}init(e,t,i){this.allowDragging=e,this.params=t,this.eventType=i,this.primaryColsHeaderPanel.init(this.params);const n=this.params.suppressColumnFilter,r=this.params.suppressColumnSelectAll;this.params.suppressColumnExpandAll&&n&&r&&this.primaryColsHeaderPanel.setDisplayed(!1),this.addManagedListener(this.primaryColsListPanel,"groupExpanded",this.onGroupExpanded.bind(this)),this.addManagedListener(this.primaryColsListPanel,"selectionChanged",this.onSelectionChange.bind(this)),this.primaryColsListPanel.init(this.params,this.allowDragging,this.eventType),this.addManagedListener(this.primaryColsHeaderPanel,"expandAll",this.onExpandAll.bind(this)),this.addManagedListener(this.primaryColsHeaderPanel,"collapseAll",this.onCollapseAll.bind(this)),this.addManagedListener(this.primaryColsHeaderPanel,"selectAll",this.onSelectAll.bind(this)),this.addManagedListener(this.primaryColsHeaderPanel,"unselectAll",this.onUnselectAll.bind(this)),this.addManagedListener(this.primaryColsHeaderPanel,"filterChanged",this.onFilterChanged.bind(this)),this.positionableFeature=new s.qyQ(this.getGui(),{minHeight:100}),this.createManagedBean(this.positionableFeature)}toggleResizable(e){this.positionableFeature.setResizable(!!e&&{bottom:!0})}onExpandAll(){this.primaryColsListPanel.doSetExpandedAll(!0)}onCollapseAll(){this.primaryColsListPanel.doSetExpandedAll(!1)}expandGroups(e){this.primaryColsListPanel.setGroupsExpanded(!0,e)}collapseGroups(e){this.primaryColsListPanel.setGroupsExpanded(!1,e)}setColumnLayout(e){this.primaryColsListPanel.setColumnLayout(e)}onFilterChanged(e){this.primaryColsListPanel.setFilterText(e.filterText)}syncLayoutWithGrid(){this.primaryColsListPanel.onColumnsChanged()}onSelectAll(){this.primaryColsListPanel.doSetSelectedAll(!0)}onUnselectAll(){this.primaryColsListPanel.doSetSelectedAll(!1)}onGroupExpanded(e){this.primaryColsHeaderPanel.setExpandState(e.state),this.params.onStateUpdated()}onSelectionChange(e){this.primaryColsHeaderPanel.setSelectionState(e.state)}getExpandedGroups(){return this.primaryColsListPanel.getExpandedGroups()}};hE.TEMPLATE='<div class="ag-column-select">\n            <ag-primary-cols-header ref="primaryColsHeaderPanel"></ag-primary-cols-header>\n            <ag-primary-cols-list ref="primaryColsListPanel"></ag-primary-cols-list>\n        </div>',qx([(0,s.PIB)("primaryColsHeaderPanel")],hE.prototype,"primaryColsHeaderPanel",2),qx([(0,s.PIB)("primaryColsListPanel")],hE.prototype,"primaryColsListPanel",2);var dE=hE,uE=class e extends s.uAl{constructor(){super(e.TEMPLATE),this.initialised=!1,this.childDestroyFuncs=[]}setVisible(e){super.setDisplayed(e),e&&!this.initialised&&this.init(this.params)}init(e){const t=this.gos.addGridCommonParams({suppressColumnMove:!1,suppressColumnSelectAll:!1,suppressColumnFilter:!1,suppressColumnExpandAll:!1,contractColumnSelection:!1,suppressPivotMode:!1,suppressRowGroups:!1,suppressValues:!1,suppressPivots:!1,suppressSyncLayoutWithGrid:!1});if(this.params=Yx(Yx({},t),e),this.isRowGroupingModuleLoaded()&&!this.params.suppressPivotMode&&(this.pivotModePanel=this.createBean(new cE),this.childDestroyFuncs.push(()=>this.destroyBean(this.pivotModePanel)),this.appendChild(this.pivotModePanel)),this.primaryColsPanel=this.createBean(new dE),this.childDestroyFuncs.push(()=>this.destroyBean(this.primaryColsPanel)),this.primaryColsPanel.init(!0,this.params,"toolPanelUi"),this.primaryColsPanel.addCssClass("ag-column-panel-column-select"),this.appendChild(this.primaryColsPanel),this.isRowGroupingModuleLoaded()){this.params.suppressRowGroups||(this.rowGroupDropZonePanel=this.createBean(new hx(!1)),this.childDestroyFuncs.push(()=>this.destroyBean(this.rowGroupDropZonePanel)),this.appendChild(this.rowGroupDropZonePanel)),this.params.suppressValues||(this.valuesDropZonePanel=this.createBean(new yx(!1)),this.childDestroyFuncs.push(()=>this.destroyBean(this.valuesDropZonePanel)),this.appendChild(this.valuesDropZonePanel)),this.params.suppressPivots||(this.pivotDropZonePanel=this.createBean(new dx(!1)),this.childDestroyFuncs.push(()=>this.destroyBean(this.pivotDropZonePanel)),this.appendChild(this.pivotDropZonePanel)),this.setLastVisible();const e=this.addManagedListener(this.eventService,s.sVA.EVENT_COLUMN_PIVOT_MODE_CHANGED,()=>{this.resetChildrenHeight(),this.setLastVisible()});this.childDestroyFuncs.push(()=>e())}this.initialised=!0}setPivotModeSectionVisible(e){this.isRowGroupingModuleLoaded()&&(this.pivotModePanel?this.pivotModePanel.setDisplayed(e):e&&(this.pivotModePanel=this.createBean(new cE),this.getGui().insertBefore(this.pivotModePanel.getGui(),this.getGui().firstChild),this.childDestroyFuncs.push(()=>this.destroyBean(this.pivotModePanel))),this.setLastVisible())}setRowGroupsSectionVisible(e){this.isRowGroupingModuleLoaded()&&(this.rowGroupDropZonePanel?this.rowGroupDropZonePanel.setDisplayed(e):e&&(this.rowGroupDropZonePanel=this.createManagedBean(new hx(!1)),this.appendChild(this.rowGroupDropZonePanel)),this.setLastVisible())}setValuesSectionVisible(e){this.isRowGroupingModuleLoaded()&&(this.valuesDropZonePanel?this.valuesDropZonePanel.setDisplayed(e):e&&(this.valuesDropZonePanel=this.createManagedBean(new yx(!1)),this.appendChild(this.valuesDropZonePanel)),this.setLastVisible())}setPivotSectionVisible(e){this.isRowGroupingModuleLoaded()&&(this.pivotDropZonePanel?this.pivotDropZonePanel.setDisplayed(e):e&&(this.pivotDropZonePanel=this.createManagedBean(new dx(!1)),this.appendChild(this.pivotDropZonePanel),this.pivotDropZonePanel.setDisplayed(e)),this.setLastVisible())}setResizers(){[this.primaryColsPanel,this.rowGroupDropZonePanel,this.valuesDropZonePanel,this.pivotDropZonePanel].forEach(e=>{if(!e)return;const t=e.getGui();e.toggleResizable(!t.classList.contains("ag-last-column-drop")&&!t.classList.contains("ag-hidden"))})}setLastVisible(){const e=this.getGui();Array.prototype.slice.call(e.querySelectorAll(".ag-column-drop")).forEach(e=>e.classList.remove("ag-last-column-drop"));const t=e.querySelectorAll(".ag-column-drop:not(.ag-hidden)"),i=s._.last(t);i&&i.classList.add("ag-last-column-drop"),this.setResizers()}resetChildrenHeight(){const e=this.getGui().children;for(let t=0;t<e.length;t++){const i=e[t];i.style.removeProperty("height"),i.style.removeProperty("flex")}}isRowGroupingModuleLoaded(){return s.syG.__assertRegistered(s.zsj.RowGroupingModule,"Row Grouping",this.context.getGridId())}expandColumnGroups(e){this.primaryColsPanel.expandGroups(e)}collapseColumnGroups(e){this.primaryColsPanel.collapseGroups(e)}setColumnLayout(e){this.primaryColsPanel.setColumnLayout(e)}syncLayoutWithGrid(){this.primaryColsPanel.syncLayoutWithGrid()}destroyChildren(){this.childDestroyFuncs.forEach(e=>e()),this.childDestroyFuncs.length=0,s._.clearElement(this.getGui())}refresh(e){return this.destroyChildren(),this.init(e),!0}getState(){return{expandedGroupIds:this.primaryColsPanel.getExpandedGroups()}}destroy(){this.destroyChildren(),super.destroy()}};uE.TEMPLATE='<div class="ag-column-panel"></div>';var pE=uE,gE=class{selectAllChildren(e,t,i){const n=this.extractAllLeafColumns(e);this.setAllColumns(n,t,i)}setColumn(e,t,i){this.setAllColumns([e],t,i)}setAllColumns(e,t,i){this.columnModel.isPivotMode()?this.setAllPivot(e,t,i):this.setAllVisible(e,t,i)}extractAllLeafColumns(e){const t=[],i=e=>{e.forEach(e=>{e.isPassesFilter()&&(e.isGroup()?i(e.getChildren()):t.push(e.getColumn()))})};return i(e),t}setAllVisible(e,t,i){const n=[];e.forEach(e=>{e.getColDef().lockVisible||e.isVisible()!=t&&n.push({colId:e.getId(),hide:!t})}),n.length>0&&this.columnModel.applyColumnState({state:n},i)}setAllPivot(e,t,i){this.gos.get("functionsPassive")?this.setAllPivotPassive(e,t):this.setAllPivotActive(e,t,i)}setAllPivotPassive(e,t){const i=this.columnModel.getPivotColumns().slice(),n=this.columnModel.getValueColumns().slice(),r=this.columnModel.getRowGroupColumns().slice();let o=!1,a=!1,l=!1;const c=t?e=>{e.isAnyFunctionActive()||(e.isAllowValue()?(n.push(e),a=!0):e.isAllowRowGroup()?(r.push(e),o=!0):e.isAllowPivot()&&(i.push(e),l=!0))}:e=>{e.isAnyFunctionActive()&&(i.indexOf(e)>=0&&(s._.removeFromArray(i,e),o=!0),n.indexOf(e)>=0&&(s._.removeFromArray(n,e),a=!0),r.indexOf(e)>=0&&(s._.removeFromArray(r,e),l=!0))};if(e.forEach(c),o){const e={type:s.sVA.EVENT_COLUMN_PIVOT_CHANGE_REQUEST,columns:i};this.eventService.dispatchEvent(e)}if(l){const e={type:s.sVA.EVENT_COLUMN_ROW_GROUP_CHANGE_REQUEST,columns:r};this.eventService.dispatchEvent(e)}if(a){const e={type:s.sVA.EVENT_COLUMN_VALUE_CHANGE_REQUEST,columns:r};this.eventService.dispatchEvent(e)}}setAllPivotActive(e,t,i){const n=[],s=t?e=>{if(!e.isAnyFunctionActive())if(e.isAllowValue()){const t="string"==typeof e.getAggFunc()?e.getAggFunc():this.aggFuncService.getDefaultAggFunc(e);n.push({colId:e.getId(),aggFunc:t})}else e.isAllowRowGroup()?n.push({colId:e.getId(),rowGroup:!0}):e.isAllowPivot()&&n.push({colId:e.getId(),pivot:!0})}:e=>{(e.isPivotActive()||e.isRowGroupActive()||e.isValueActive())&&n.push({colId:e.getId(),pivot:!1,rowGroup:!1,aggFunc:null})};e.forEach(s),n.length>0&&this.columnModel.applyColumnState({state:n},i)}updateColumns(e){const{columns:t,visibleState:i,pivotState:n,eventType:s}=e,r=t.map(e=>{const t=e.getColId();if(this.columnModel.isPivotMode()){const e=null==n?void 0:n[t];return{colId:t,pivot:null==e?void 0:e.pivot,rowGroup:null==e?void 0:e.rowGroup,aggFunc:null==e?void 0:e.aggFunc}}return{colId:t,hide:!(null==i?void 0:i[t])}});this.columnModel.applyColumnState({state:r},s)}createPivotState(e){return{pivot:e.isPivotActive(),rowGroup:e.isRowGroupActive(),aggFunc:e.isValueActive()?e.getAggFunc():void 0}}};qx([(0,s.dsm)("aggFuncService")],gE.prototype,"aggFuncService",2),qx([(0,s.dsm)("columnModel")],gE.prototype,"columnModel",2),qx([(0,s.dsm)("gridOptionsService")],gE.prototype,"gos",2),qx([(0,s.dsm)("eventService")],gE.prototype,"eventService",2),gE=qx([(0,s.dR4)("modelItemUtils")],gE);var fE,mE,vE,yE,CE,bE,SE,wE,xE,EE={version:"31.3.4",moduleName:s.zsj.ColumnsToolPanelModule,beans:[gE],agStackComponents:[{componentName:"AgPrimaryColsHeader",componentClass:Zx},{componentName:"AgPrimaryColsList",componentClass:lE},{componentName:"AgPrimaryCols",componentClass:dE}],userComponents:[{componentName:"agColumnsToolPanel",componentClass:pE}],dependantModules:[fm,vx,Hx]},ME=Object.defineProperty,AE=Object.defineProperties,TE=Object.getOwnPropertyDescriptor,DE=Object.getOwnPropertyDescriptors,IE=Object.getOwnPropertySymbols,RE=Object.prototype.hasOwnProperty,LE=Object.prototype.propertyIsEnumerable,kE=(e,t,i)=>t in e?ME(e,t,{enumerable:!0,configurable:!0,writable:!0,value:i}):e[t]=i,PE=(e,t)=>{for(var i in t||(t={}))RE.call(t,i)&&kE(e,i,t[i]);if(IE)for(var i of IE(t))LE.call(t,i)&&kE(e,i,t[i]);return e},NE=(e,t)=>AE(e,DE(t)),OE=(e,t,i,n)=>{for(var s,r=n>1?void 0:n?TE(t,i):t,o=e.length-1;o>=0;o--)(s=e[o])&&(r=(n?s(t,i,r):s(r))||r);return n&&r&&ME(t,i,r),r},_E={getTemplate(e){const t=(new Date).toJSON();return{name:"cp:coreProperties",properties:{prefixedAttributes:[{prefix:"xmlns:",map:{cp:"http://schemas.openxmlformats.org/package/2006/metadata/core-properties",dc:"http://purl.org/dc/elements/1.1/",dcterms:"http://purl.org/dc/terms/",dcmitype:"http://purl.org/dc/dcmitype/",xsi:"http://www.w3.org/2001/XMLSchema-instance"}}]},children:[{name:"dc:creator",textNode:e},{name:"dc:title",textNode:"Workbook"},{name:"dcterms:created",properties:{rawMap:{"xsi:type":"dcterms:W3CDTF"}},textNode:t},{name:"dcterms:modified",properties:{rawMap:{"xsi:type":"dcterms:W3CDTF"}},textNode:t}]}}},FE={getTemplate(e){const{name:t,ContentType:i,Extension:n,PartName:s}=e;return{name:t,properties:{rawMap:{Extension:n,PartName:s,ContentType:i}}}}},GE={getTemplate(e){const t=new Array(e).fill(void 0).map((e,t)=>({name:"Override",ContentType:"application/vnd.openxmlformats-officedocument.spreadsheetml.worksheet+xml",PartName:`/xl/worksheets/sheet${t+1}.xml`})),i=pA.worksheetImages.size,n=pA.worksheetHeaderFooterImages.size,s=pA.worksheetDataTables.size,r={};pA.workbookImageIds.forEach(e=>{const t="jpg"===e.type?"jpeg":e.type;r[t]=!0});const o=new Array(i).fill(void 0).map((e,t)=>({name:"Override",ContentType:"application/vnd.openxmlformats-officedocument.drawing+xml",PartName:`/xl/drawings/drawing${t+1}.xml`})),a=new Array(s).fill(void 0).map((e,t)=>({name:"Override",ContentType:"application/vnd.openxmlformats-officedocument.spreadsheetml.table+xml",PartName:`/xl/tables/${pA.getTableNameFromIndex(t)}.xml`})),l=Object.keys(r).map(e=>({name:"Default",ContentType:`image/${e}`,Extension:e}));return n&&l.push({name:"Default",Extension:"vml",ContentType:"application/vnd.openxmlformats-officedocument.vmlDrawing"}),{name:"Types",properties:{rawMap:{xmlns:"http://schemas.openxmlformats.org/package/2006/content-types"}},children:[...l,{name:"Default",Extension:"rels",ContentType:"application/vnd.openxmlformats-package.relationships+xml"},{name:"Default",ContentType:"application/xml",Extension:"xml"},{name:"Override",ContentType:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet.main+xml",PartName:"/xl/workbook.xml"},...t,{name:"Override",ContentType:"application/vnd.openxmlformats-officedocument.theme+xml",PartName:"/xl/theme/theme1.xml"},{name:"Override",ContentType:"application/vnd.openxmlformats-officedocument.spreadsheetml.styles+xml",PartName:"/xl/styles.xml"},{name:"Override",ContentType:"application/vnd.openxmlformats-officedocument.spreadsheetml.sharedStrings+xml",PartName:"/xl/sharedStrings.xml"},...o,...a,{name:"Override",ContentType:"application/vnd.openxmlformats-package.core-properties+xml",PartName:"/docProps/core.xml"}].map(e=>FE.getTemplate(e))}}},VE={0:1,"0.00":2,"#,##0":3,"#,##0.00":4,"0%":9,"0.00%":10,"0.00E+00":11,"# ?/?":12,"# ??/??":13,"mm-dd-yy":14,"d-mmm-yy":15,"d-mmm":16,"mmm-yy":17,"h:mm AM/PM":18,"h:mm:ss AM/PM":19,"h:mm":20,"h:mm:ss":21,"m/d/yy h:mm":22,"#,##0 ;(#,##0)":37,"#,##0 ;[Red](#,##0)":38,"#,##0.00;(#,##0.00)":39,"#,##0.00;[Red](#,##0.00)":40,"mm:ss":45,"[h]:mm:ss":46,"mmss.0":47,"##0.0E+0":48,"@":49},BE=e=>Math.round(96*e/72),HE=e=>Math.ceil(9525*e),zE=(e,t)=>{if(!t)return;let i;return i="number"==typeof t?t:t({rowIndex:e}),n=i,Math.round(72*n/96);var n},UE=(e,t)=>{const i=s.aS7.createHeader({encoding:"UTF-8",standalone:"yes"}),n=s.aS7.createXml(e);return t?n:`${i}${n}`},WE=e=>{const t=String.fromCharCode,i=Math.floor(e/26),n=e%26;return i&&26!==e?n?i<26?t(65+i-1)+t(65+n-1):WE(i)+t(65+n-1):WE(i-1)+"Z":t(65+e-1)},jE=(e,t)=>({name:`xdr:${e}`,children:[{name:"xdr:col",textNode:t.col.toString()},{name:"xdr:colOff",textNode:t.offsetX.toString()},{name:"xdr:row",textNode:t.row.toString()},{name:"xdr:rowOff",textNode:t.offsetY.toString()}]}),KE=e=>{const t=[{name:"a:ext",properties:{rawMap:{uri:"{FF2B5EF4-FFF2-40B4-BE49-F238E27FC236}"}},children:[{name:"a16:creationId",properties:{rawMap:{id:"{822E6D20-D7BC-2841-A643-D49A6EF008A2}","xmlns:a16":"http://schemas.microsoft.com/office/drawing/2014/main"}}}]}];switch(e.recolor&&e.recolor.toLowerCase()){case"grayscale":case"sepia":case"washout":t.push({name:"a:ext",properties:{rawMap:{uri:"{C183D7F6-B498-43B3-948B-1728B52AA6E4}"}},children:[{name:"adec:decorative",properties:{rawMap:{val:"0","xmlns:adec":"http://schemas.microsoft.com/office/drawing/2017/decorative"}}}]})}return{name:"a:extLst",children:t}},$E=(e,t)=>({name:"xdr:nvPicPr",children:[{name:"xdr:cNvPr",properties:{rawMap:{id:t,name:e.id,descr:null!=e.altText?e.altText:void 0}},children:[KE(e)]},{name:"xdr:cNvPicPr",properties:{rawMap:{preferRelativeResize:"0"}},children:[{name:"a:picLocks"}]}]}),YE=e=>{if(!e.saturation&&!e.tint)return;const t=[];return e.saturation&&t.push({name:"a:satMod",properties:{rawMap:{val:1e3*e.saturation}}}),e.tint&&t.push({name:"a:tint",properties:{rawMap:{val:1e3*e.tint}}}),t},qE=(e,t)=>{let i;if(e.transparency){const t=Math.min(Math.max(e.transparency,0),100);i=[{name:"a:alphaModFix",properties:{rawMap:{amt:1e5-Math.round(1e3*t)}}}]}if(e.recolor)switch(i||(i=[]),e.recolor.toLocaleLowerCase()){case"grayscale":i.push({name:"a:grayscl"});break;case"sepia":i.push((s={color:"D9C3A5",tint:50,saturation:180},{name:"a:duotone",children:[{name:"a:prstClr",properties:{rawMap:{val:(n={color:"black"}).color}},children:YE(n)},{name:"a:srgbClr",properties:{rawMap:{val:s.color}},children:YE(s)}]}));break;case"washout":i.push({name:"a:lum",properties:{rawMap:{bright:"70000",contrast:"-70000"}}})}var n,s;return{name:"xdr:blipFill",children:[{name:"a:blip",properties:{rawMap:{cstate:"print","r:embed":`rId${t}`,"xmlns:r":"http://schemas.openxmlformats.org/officeDocument/2006/relationships"}},children:i},{name:"a:stretch",children:[{name:"a:fillRect"}]}]}},XE=(e,t)=>{const i={name:"a:xfrm",children:[{name:"a:off",properties:{rawMap:{x:0,y:0}}},{name:"a:ext",properties:{rawMap:{cx:t.width,cy:t.height}}}]};if(e.rotation){const t=e.rotation;i.properties={rawMap:{rot:6e4*Math.min(Math.max(t,0),360)}}}return{name:"xdr:spPr",children:[i,{name:"a:prstGeom",properties:{rawMap:{prst:"rect"}},children:[{name:"a:avLst"}]}]}},ZE=(e,t,i,n)=>({name:"xdr:pic",children:[$E(e,t+1),qE(e,i+1),XE(e,n)]}),QE={getTemplate(e){const{sheetIndex:t}=e,i=pA.worksheetImages.get(t),n=pA.worksheetImageIds.get(t);return{name:"xdr:wsDr",properties:{rawMap:{"xmlns:a":"http://schemas.openxmlformats.org/drawingml/2006/main","xmlns:xdr":"http://schemas.openxmlformats.org/drawingml/2006/spreadsheetDrawing"}},children:i.map((e,t)=>{const i=(e=>{e.fitCell=!!e.fitCell||!e.width||!e.height;const{position:t={},fitCell:i,width:n=0,height:s=0,totalHeight:r,totalWidth:o}=e,{offsetX:a=0,offsetY:l=0,row:c=1,rowSpan:h=1,column:d=1,colSpan:u=1}=t;return{from:{row:c-1,col:d-1,offsetX:HE(a),offsetY:HE(l)},to:{row:c-1+(i?1:h-1),col:d-1+(i?1:u-1),offsetX:HE(n+a),offsetY:HE(s+l)},height:HE(r||s),width:HE(o||n)}})(e);return{name:"xdr:twoCellAnchor",properties:{rawMap:{editAs:"absolute"}},children:[jE("from",i.from),jE("to",i.to),ZE(e,t,n.get(e.id).index,i),{name:"xdr:clientData"}]}})}}},JE={getTemplate(e,t){const{name:i,columns:n,rowCount:s,displayName:r,headerRowIndex:o,showRowStripes:a,showColumnStripes:l,showFilterButtons:c,highlightFirstColumn:h,highlightLastColumn:d}=e||{};if(!(e&&i&&Array.isArray(n)&&n.length&&s))return{name:"table"};const u=n.map((e,t)=>({name:"filterColumn",properties:{rawMap:{colId:t.toString(),hiddenButton:c[t]?0:1}}})),p=o+1,g=(t+1).toString(),f=`A${p}:${String.fromCharCode(64+n.length)}${p+s}`;return{name:"table",properties:{rawMap:{xmlns:"http://schemas.openxmlformats.org/spreadsheetml/2006/main","xmlns:mc":"http://schemas.openxmlformats.org/markup-compatibility/2006","mc:Ignorable":"xr xr3","xmlns:xr":"http://schemas.microsoft.com/office/spreadsheetml/2014/revision","xmlns:xr3":"http://schemas.microsoft.com/office/spreadsheetml/2016/revision3",name:i,displayName:t?`${r}_${t+1}`:r,ref:f,totalsRowShown:0,id:g}},children:[{name:"autoFilter",properties:{rawMap:{ref:f}},children:u},{name:"tableColumns",properties:{rawMap:{count:n.length}},children:n.map((e,t)=>({name:"tableColumn",properties:{rawMap:{id:(t+1).toString(),name:e,dataCellStyle:"Normal"}}}))},{name:"tableStyleInfo",properties:{rawMap:{name:"TableStyleLight1",showFirstColumn:h?1:0,showLastColumn:d?1:0,showRowStripes:a?1:0,showColumnStripes:l?1:0}}}]}}},eM=e=>{const[t,i,n,s]=e;return{name:`a:${t}`,children:[{name:`a:${i}`,properties:{rawMap:{val:n,lastClr:s}}}]}},tM=()=>({name:"a:clrScheme",properties:{rawMap:{name:"Office"}},children:[eM(["dk1","sysClr","windowText","000000"]),eM(["lt1","sysClr","window","FFFFFF"]),eM(["dk2","srgbClr","44546A"]),eM(["lt2","srgbClr","E7E6E6"]),eM(["accent1","srgbClr","4472C4"]),eM(["accent2","srgbClr","ED7D31"]),eM(["accent3","srgbClr","A5A5A5"]),eM(["accent4","srgbClr","FFC000"]),eM(["accent5","srgbClr","5B9BD5"]),eM(["accent6","srgbClr","70AD47"]),eM(["hlink","srgbClr","0563C1"]),eM(["folHlink","srgbClr","954F72"])]}),iM=e=>{const[t,i,n,s]=e;return{name:`a:${t}`,properties:{rawMap:{script:n,typeface:i,panose:s}}}},nM=()=>({name:"a:fontScheme",properties:{rawMap:{name:"Office"}},children:[{name:"a:majorFont",children:[iM(["latin","Calibri Light",void 0,"020F0302020204030204"]),iM(["ea",""]),iM(["cs",""]),iM(["font","游ゴシック Light","Jpan"]),iM(["font","맑은 고딕","Hang"]),iM(["font","等线 Light","Hans"]),iM(["font","新細明體","Hant"]),iM(["font","Times New Roman","Arab"]),iM(["font","Times New Roman","Hebr"]),iM(["font","Tahoma","Thai"]),iM(["font","Nyala","Ethi"]),iM(["font","Vrinda","Beng"]),iM(["font","Shruti","Gujr"]),iM(["font","MoolBoran","Khmr"]),iM(["font","Tunga","Knda"]),iM(["font","Raavi","Guru"]),iM(["font","Euphemia","Cans"]),iM(["font","Plantagenet Cherokee","Cher"]),iM(["font","Microsoft Yi Baiti","Yiii"]),iM(["font","Microsoft Himalaya","Tibt"]),iM(["font","MV Boli","Thaa"]),iM(["font","Mangal","Deva"]),iM(["font","Gautami","Telu"]),iM(["font","Latha","Taml"]),iM(["font","Estrangelo Edessa","Syrc"]),iM(["font","Kalinga","Orya"]),iM(["font","Kartika","Mlym"]),iM(["font","DokChampa","Laoo"]),iM(["font","Iskoola Pota","Sinh"]),iM(["font","Mongolian Baiti","Mong"]),iM(["font","Times New Roman","Viet"]),iM(["font","Microsoft Uighur","Uigh"]),iM(["font","Sylfaen","Geor"]),iM(["font","Arial","Armn"]),iM(["font","Leelawadee UI","Bugi"]),iM(["font","Microsoft JhengHei","Bopo"]),iM(["font","Javanese Text","Java"]),iM(["font","Segoe UI","Lisu"]),iM(["font","Myanmar Text","Mymr"]),iM(["font","Ebrima","Nkoo"]),iM(["font","Nirmala UI","Olck"]),iM(["font","Ebrima","Osma"]),iM(["font","Phagspa","Phag"]),iM(["font","Estrangelo Edessa","Syrn"]),iM(["font","Estrangelo Edessa","Syrj"]),iM(["font","Estrangelo Edessa","Syre"]),iM(["font","Nirmala UI","Sora"]),iM(["font","Microsoft Tai Le","Tale"]),iM(["font","Microsoft New Tai Lue","Talu"]),iM(["font","Ebrima","Tfng"])]},{name:"a:minorFont",children:[iM(["latin","Calibri",void 0,"020F0502020204030204"]),iM(["ea",""]),iM(["cs",""]),iM(["font","游ゴシック","Jpan"]),iM(["font","맑은 고딕","Hang"]),iM(["font","等线","Hans"]),iM(["font","新細明體","Hant"]),iM(["font","Arial","Arab"]),iM(["font","Arial","Hebr"]),iM(["font","Tahoma","Thai"]),iM(["font","Nyala","Ethi"]),iM(["font","Vrinda","Beng"]),iM(["font","Shruti","Gujr"]),iM(["font","DaunPenh","Khmr"]),iM(["font","Tunga","Knda"]),iM(["font","Raavi","Guru"]),iM(["font","Euphemia","Cans"]),iM(["font","Plantagenet Cherokee","Cher"]),iM(["font","Microsoft Yi Baiti","Yiii"]),iM(["font","Microsoft Himalaya","Tibt"]),iM(["font","MV Boli","Thaa"]),iM(["font","Mangal","Deva"]),iM(["font","Gautami","Telu"]),iM(["font","Latha","Taml"]),iM(["font","Estrangelo Edessa","Syrc"]),iM(["font","Kalinga","Orya"]),iM(["font","Kartika","Mlym"]),iM(["font","DokChampa","Laoo"]),iM(["font","Iskoola Pota","Sinh"]),iM(["font","Mongolian Baiti","Mong"]),iM(["font","Arial","Viet"]),iM(["font","Microsoft Uighur","Uigh"]),iM(["font","Sylfaen","Geor"]),iM(["font","Arial","Armn"]),iM(["font","Leelawadee UI","Bugi"]),iM(["font","Microsoft JhengHei","Bopo"]),iM(["font","Javanese Text","Java"]),iM(["font","Segoe UI","Lisu"]),iM(["font","Myanmar Text","Mymr"]),iM(["font","Ebrima","Nkoo"]),iM(["font","Nirmala UI","Olck"]),iM(["font","Ebrima","Osma"]),iM(["font","Phagspa","Phag"]),iM(["font","Estrangelo Edessa","Syrn"]),iM(["font","Estrangelo Edessa","Syrj"]),iM(["font","Estrangelo Edessa","Syre"]),iM(["font","Nirmala UI","Sora"]),iM(["font","Microsoft Tai Le","Tale"]),iM(["font","Microsoft New Tai Lue","Talu"]),iM(["font","Ebrima","Tfng"])]}]}),sM=(e,t,i)=>({name:`a:${e}`,properties:{rawMap:{val:t}},children:i}),rM=e=>{const[t,i,n,s,r,o]=e,a=[];return a.push(sM("satMod",n)),s&&a.push(sM("lumMod",s)),r&&a.push(sM("tint",r)),o&&a.push(sM("shade",o)),{name:"a:gs",properties:{rawMap:{pos:t}},children:[{name:"a:schemeClr",properties:{rawMap:{val:i}},children:a}]}},oM=(e,t)=>({name:"a:solidFill",children:[sM("schemeClr",e,t)]}),aM=e=>{const[t,i,n,s,r]=e,[o,a]=r;return{name:"a:gradFill",properties:{rawMap:{rotWithShape:t}},children:[{name:"a:gsLst",children:[rM(i),rM(n),rM(s)]},{name:"a:lin",properties:{rawMap:{ang:o,scaled:a}}}]}},lM=e=>{const[t,i,n,s]=e;return{name:"a:ln",properties:{rawMap:{w:t,cap:i,cmpd:n,algn:s}},children:[oM("phClr"),sM("prstDash","solid"),{name:"a:miter",properties:{rawMap:{lim:"800000"}}}]}},cM=e=>{const t=[];if(e){const[i,n,s,r,o]=e;t.push({name:"a:outerShdw",properties:{rawMap:{blurRad:i,dist:n,dir:s,algn:r,rotWithShape:o}},children:[sM("srgbClr","000000",[sM("alpha","63000")])]})}return{name:"a:effectStyle",children:[Object.assign({},{name:"a:effectLst"},t.length?{children:t}:{})]}},hM=()=>({name:"a:fmtScheme",properties:{rawMap:{name:"Office"}},children:[{name:"a:fillStyleLst",children:[oM("phClr"),aM(["1",["0","phClr","105000","110000","67000"],["50000","phClr","103000","105000","73000"],["100000","phClr","109000","105000","81000"],["5400000","0"]]),aM(["1",["0","phClr","103000","102000","94000"],["50000","phClr","110000","100000",void 0,"100000"],["100000","phClr","120000","99000",void 0,"78000"],["5400000","0"]])]},{name:"a:lnStyleLst",children:[lM(["6350","flat","sng","ctr"]),lM(["12700","flat","sng","ctr"]),lM(["19050","flat","sng","ctr"])]},{name:"a:effectStyleLst",children:[cM(),cM(),cM(["57150","19050","5400000","ctr","0"])]},{name:"a:bgFillStyleLst",children:[oM("phClr"),oM("phClr",[sM("tint","95000"),sM("satMod","170000")]),aM(["1",["0","phClr","150000","102000","93000","98000"],["50000","phClr","130000","103000","98000","90000"],["100000","phClr","120000",void 0,void 0,"63000"],["5400000","0"]])]}]}),dM=()=>({name:"a:themeElements",children:[tM(),nM(),hM()]}),uM=()=>({name:"a:theme",properties:{prefixedAttributes:[{prefix:"xmlns:",map:{a:"http://schemas.openxmlformats.org/drawingml/2006/main"}}],rawMap:{name:"Office Theme"}},children:[dM(),{name:"a:objectDefaults"},{name:"a:extraClrSchemeLst"}]}),pM=e=>{const t=[];for(const i of e.keys()){const e=i.toString(),n={name:"t",textNode:s._.escapeString(e)};e.trim().length!==e.length&&(n.properties={rawMap:{"xml:space":"preserve"}}),t.push({name:"si",children:[n]})}return t},gM=e=>({name:"sst",properties:{rawMap:{xmlns:"http://schemas.openxmlformats.org/spreadsheetml/2006/main",count:e.size,uniqueCount:e.size}},children:pM(e)}),fM={getTemplate(e){let{formatCode:t,numFmtId:i}=e;return t.length&&(t=function(e){const t=e.split(/(\[[^\]]*\])/);for(let e=0;e<t.length;e++){let i=t[e];i.length&&(i.startsWith("[")||(i=i.replace(/\$/g,'"$"')),t[e]=s._.escapeString(i))}return t.join("")}(t)),{name:"numFmt",properties:{rawMap:{formatCode:t,numFmtId:i}}}}},mM=e=>({name:"numFmts",properties:{rawMap:{count:e.length}},children:e.map(e=>fM.getTemplate(e))}),vM={getTemplate(e){const{size:t,colorTheme:i,color:n="FF000000",fontName:s="Calibri",family:r,scheme:o,italic:a,bold:l,strikeThrough:c,outline:h,shadow:d,underline:u,verticalAlign:p}=e,g=[{name:"sz",properties:{rawMap:{val:t}}},{name:"color",properties:{rawMap:{theme:i,rgb:n}}},{name:"name",properties:{rawMap:{val:s}}}];return r&&g.push({name:"family",properties:{rawMap:{val:r}}}),o&&g.push({name:"scheme",properties:{rawMap:{val:o}}}),a&&g.push({name:"i"}),l&&g.push({name:"b"}),c&&g.push({name:"strike"}),h&&g.push({name:"outline"}),d&&g.push({name:"shadow"}),u&&g.push({name:"u",properties:{rawMap:{val:u}}}),p&&g.push({name:"vertAlign",properties:{rawMap:{val:p}}}),{name:"font",children:g}}},yM=e=>({name:"fonts",properties:{rawMap:{count:e.length}},children:e.map(e=>vM.getTemplate(e))}),CM={getTemplate(e){const{patternType:t,fgTheme:i,fgTint:n,fgRgb:s,bgRgb:r,bgIndexed:o}=e,a={name:"patternFill",properties:{rawMap:{patternType:t}}};return(i||n||s)&&(a.children=[{name:"fgColor",properties:{rawMap:{theme:i,tint:n,rgb:s}}}]),(o||r)&&(a.children||(a.children=[]),a.children.push({name:"bgColor",properties:{rawMap:{indexed:o,rgb:r}}})),{name:"fill",children:[a]}}},bM=e=>({name:"fills",properties:{rawMap:{count:e.length}},children:e.map(e=>CM.getTemplate(e))}),SM={None:"None",Dot:"Dotted",Dash:"Dashed",Double:"Double",DashDot:"DashDot",DashDotDot:"DashDotDot",SlantDashDot:"SlantDashDot"},wM=["Dashed","DashDot","DashDotDot"],xM={None:"none",Solid:"solid",Gray50:"mediumGray",Gray75:"darkGray",Gray25:"lightGray",HorzStripe:"darkHorizontal",VertStripe:"darkVertical",ReverseDiagStripe:"darkDown",DiagStripe:"darkUp",DiagCross:"darkGrid",ThickDiagCross:"darkTrellis",ThinHorzStripe:"lightHorizontal",ThinVertStripe:"lightVertical",ThinReverseDiagStripe:"lightDown",ThinDiagStripe:"lightUp",ThinHorzCross:"lightGrid",ThinDiagCross:"lightTrellis",Gray125:"gray125",Gray0625:"gray0625"},EM={Automatic:"general",Left:"left",Center:"center",Right:"right",Fill:"fill",Justify:"justify",CenterAcrossSelection:"centerContinuous",Distributed:"distributed",JustifyDistributed:"justify"},MM={Automatic:void 0,Top:"top",Bottom:"bottom",Center:"center",Justify:"justify",Distributed:"distributed",JustifyDistributed:"justify"},AM=e=>null==e?e:("#"===e.charAt(0)&&(e=e.substring(1)),6===e.length?"FF"+e:e),TM=(e,t)=>{if(!e)return"thin";const i=(e=>{switch(e){case 1:return"thin";case 2:return"medium";case 3:return"thick";default:return"hair"}})(t),n=SM[e];return"Continuous"===e?i:"medium"===i&&-1!==wM.indexOf(n)?`medium${n}`:n.charAt(0).toLowerCase()+n.substring(1)},DM=e=>EM[e]||"general",IM=e=>MM[e]||void 0,RM=e=>({name:"color",properties:{rawMap:{rgb:AM(e||"#000000")}}}),LM={getTemplate(e){const{left:t,right:i,top:n,bottom:s,diagonal:r}=e,o=t?[RM(t.color)]:void 0,a=i?[RM(i.color)]:void 0,l=n?[RM(n.color)]:void 0,c=s?[RM(s.color)]:void 0,h=r?[RM(r.color)]:void 0;return{name:"border",children:[{name:"left",properties:{rawMap:{style:t&&t.style}},children:o},{name:"right",properties:{rawMap:{style:i&&i.style}},children:a},{name:"top",properties:{rawMap:{style:n&&n.style}},children:l},{name:"bottom",properties:{rawMap:{style:s&&s.style}},children:c},{name:"diagonal",properties:{rawMap:{style:r&&r.style}},children:h}]}}},kM=e=>({name:"borders",properties:{rawMap:{count:e.length}},children:e.map(e=>LM.getTemplate(e))}),PM=e=>{const t=["Context","LeftToRight","RightToLeft"].indexOf(e);return Math.max(t,0)},NM={getTemplate(e){const{horizontal:t,indent:i,readingOrder:n,rotate:s,shrinkToFit:r,vertical:o,wrapText:a}=e;return{name:"alignment",properties:{rawMap:{horizontal:t&&DM(t),indent:i,readingOrder:n&&PM(n),textRotation:s,shrinkToFit:r,vertical:o&&IM(o),wrapText:a}}}}},OM={getTemplate(e){const t=!1===e.protected?0:1;return{name:"protection",properties:{rawMap:{hidden:!0===e.hideFormula?1:0,locked:t}}}}},_M={getTemplate(e){const{alignment:t,borderId:i,fillId:n,fontId:s,numFmtId:r,protection:o,quotePrefix:a,xfId:l}=e,c=[];return t&&c.push(NM.getTemplate(t)),o&&c.push(OM.getTemplate(o)),{name:"xf",properties:{rawMap:{applyAlignment:t?1:void 0,applyProtection:o?1:void 0,applyBorder:i?1:void 0,applyFill:n?1:void 0,borderId:i,fillId:n,applyFont:s?1:void 0,fontId:s,applyNumberFormat:r?1:void 0,numFmtId:r,quotePrefix:a?1:void 0,xfId:l}},children:c.length?c:void 0}}},FM=e=>({name:"cellStyleXfs",properties:{rawMap:{count:e.length}},children:e.map(e=>_M.getTemplate(e))}),GM=e=>({name:"cellXfs",properties:{rawMap:{count:e.length}},children:e.map(e=>_M.getTemplate(e))}),VM={getTemplate(e){const{builtinId:t,name:i,xfId:n}=e;return{name:"cellStyle",properties:{rawMap:{builtinId:t,name:i,xfId:n}}}}},BM=e=>({name:"cellStyles",properties:{rawMap:{count:e.length}},children:e.map(e=>VM.getTemplate(e))}),HM=(e,t)=>(-1!==e.indexOf("mixedStyle")&&t>1&&(e+=`_${t}`),e),zM=()=>{fE={base:0},mE=[],vE=[{fontName:"Calibri",colorTheme:"1",family:"2",scheme:"minor"}],yE=[{patternType:"none"},{patternType:"gray125"}],CE=[{left:void 0,right:void 0,top:void 0,bottom:void 0,diagonal:void 0}],bE=[{borderId:0,fillId:0,fontId:0,numFmtId:0}],SE=[{borderId:0,fillId:0,fontId:0,numFmtId:0,xfId:0}],wE=[{builtinId:0,name:"Normal",xfId:0}]},UM=e=>{const{alignment:t,borders:i,font:n,interior:s,numberFormat:r,protection:o,quotePrefix:a}=e;let{id:l}=e,c=0,h=0,d=0,u=0;l&&(l=HM(l,xE),null==fE[l]&&(s&&(c=(e=>{const t=(i=e.pattern)?xM[i]||i:"none";var i;const n=AM(e.color),s=AM(e.patternColor);let r=yE.findIndex(e=>{const{patternType:i,fgRgb:r,bgRgb:o}=e;return i==t&&r==n&&o==s});return-1===r&&(r=yE.length,yE.push({patternType:t,fgRgb:n,bgRgb:s})),r})(s)),i&&(h=(e=>{const{borderBottom:t,borderTop:i,borderLeft:n,borderRight:s}=e;let r,o,a,l,c,h,d,u;n&&(a=TM(n.lineStyle,n.weight),d=AM(n.color)),s&&(l=TM(s.lineStyle,s.weight),u=AM(s.color)),t&&(r=TM(t.lineStyle,t.weight),c=AM(t.color)),i&&(o=TM(i.lineStyle,i.weight),h=AM(i.color));let p=CE.findIndex(e=>{const{left:t,right:i,top:n,bottom:s}=e;if(!t&&(a||d))return!1;if(!i&&(l||u))return!1;if(!n&&(o||h))return!1;if(!s&&(r||c))return!1;const{style:p,color:g}=t||{},{style:f,color:m}=i||{},{style:v,color:y}=n||{},{style:C,color:b}=s||{};return p==a&&g==d&&f==l&&m==u&&v==o&&y==h&&C==r&&b==c});return-1===p&&(p=CE.length,CE.push({left:{style:a,color:d},right:{style:l,color:u},top:{style:o,color:h},bottom:{style:r,color:c},diagonal:{style:void 0,color:void 0}})),p})(i)),n&&(d=(e=>{const{fontName:t="Calibri",color:i,size:n,bold:s,italic:r,outline:o,shadow:a,strikeThrough:l,underline:c,family:h,verticalAlign:d}=e,u=AM(i),p=(e=>{if(void 0===e)return;const t=["Automatic","Roman","Swiss","Modern","Script","Decorative"].indexOf(e||"Automatic");return Math.max(t,0)})(h),g=c?c.toLocaleLowerCase():void 0,f=d?d.toLocaleLowerCase():void 0;let m=vE.findIndex(e=>e.fontName==t&&e.color==u&&e.size==n&&e.bold==s&&e.italic==r&&e.outline==o&&e.shadow==a&&e.strikeThrough==l&&e.underline==g&&e.verticalAlign==f&&e.family==p);return-1===m&&(m=vE.length,vE.push({fontName:t,color:u,size:n,bold:s,italic:r,outline:o,shadow:a,strikeThrough:l,underline:g,verticalAlign:f,family:null!=p?p.toString():void 0})),m})(n)),r&&(u=(e=>{if(VE[e])return VE[e];let t=mE.findIndex(t=>t.formatCode===e);return-1===t?(t=mE.length+164,mE.push({formatCode:e,numFmtId:t})):t=mE[t].numFmtId,t})(r.format)),fE[l]=SE.length,SE.push({alignment:t,borderId:h||0,fillId:c||0,fontId:d||0,numFmtId:u||0,protection:o,quotePrefix:a,xfId:0})))},WM=(e,t)=>fE[HM(e,t)]||0,jM={getTemplate(e){const t=mM(mE),i=yM(vE.map(t=>NE(PE({},t),{size:null!=t.size?t.size:e}))),n=bM(yE),s=kM(CE),r=FM(bE),o=GM(SE),a=BM(wE);return zM(),{name:"styleSheet",properties:{rawMap:{"mc:Ignorable":"x14ac x16r2 xr",xmlns:"http://schemas.openxmlformats.org/spreadsheetml/2006/main","xmlns:mc":"http://schemas.openxmlformats.org/markup-compatibility/2006","xmlns:x14ac":"http://schemas.microsoft.com/office/spreadsheetml/2009/9/ac","xmlns:x16r2":"http://schemas.microsoft.com/office/spreadsheetml/2015/02/main","xmlns:xr":"http://schemas.microsoft.com/office/spreadsheetml/2014/revision"}},children:[t,i,n,s,r,o,a,{name:"tableStyles",properties:{rawMap:{count:0,defaultPivotStyle:"PivotStyleLight16",defaultTableStyle:"TableStyleMedium2"}}}]}}},KM={getTemplate(e,t){const i=(t+1).toString();return{name:"sheet",properties:{rawMap:{name:e,sheetId:i,"r:id":`rId${i}`}}}}},$M=e=>({name:"sheets",children:e.map((e,t)=>KM.getTemplate(e,t))}),YM=e=>({name:"workbook",properties:{prefixedAttributes:[{prefix:"xmlns:",map:{r:"http://schemas.openxmlformats.org/officeDocument/2006/relationships"}}],rawMap:{xmlns:"http://schemas.openxmlformats.org/spreadsheetml/2006/main"}},children:[$M(e)]}),qM={getTemplate(e){const{min:t,max:i,outlineLevel:n,s,width:r,hidden:o,bestFit:a}=e;let l=1,c="0";return r>1&&(l=(e=>Math.ceil((e-12)/7+1))(r),c="1"),{name:"col",properties:{rawMap:{min:t,max:i,outlineLevel:null!=n?n:void 0,width:l,style:s,hidden:o?"1":"0",bestFit:a?"1":"0",customWidth:c}}}}},XM={getTemplate(e,t,i){const{ref:n,data:r,styleId:o}=e,{type:a,value:l}=r||{type:"empty",value:null};let c=a;"f"===a?c="str":a.charAt(0)===a.charAt(0).toUpperCase()&&(c=(e=>{const t=e.charAt(0).toLowerCase();return"s"===t?"inlineStr":t})(a));const h={name:"c",properties:{rawMap:{r:n,t:"empty"===c?void 0:c,s:o?WM(o,i):void 0}}};if("empty"===c)return h;let d;return d="str"===c&&"f"===a?[{name:"f",textNode:s._.escapeString(l)}]:"inlineStr"===c?[{name:"is",children:[{name:"t",textNode:s._.escapeString(l)}]}]:[{name:"v",textNode:l}],Object.assign({},h,{children:d})}},ZM=e=>{var t;return""!==(null==(t=e.data)?void 0:t.value)||void 0!==e.styleId},QM={getTemplate(e,t,i){const{collapsed:n,hidden:s,height:r,outlineLevel:o,cells:a=[]}=e;return((e,t)=>{const i=[];let n=0;for(let t=0;t<e.length;t++){const s=e[t];s.mergeAcross&&(i.push({pos:t,excelPos:n}),n+=s.mergeAcross),n++}if(i.length)for(let n=i.length-1;n>=0;n--){const s=[],r=e[i[n].pos];for(let e=1;e<=r.mergeAcross;e++)s.push({ref:`${WE(i[n].excelPos+1+e)}${t+1}`,styleId:r.styleId,data:{type:"empty",value:null}});s.length&&e.splice(i[n].pos+1,0,...s)}})(a,t),{name:"row",properties:{rawMap:{r:t+1,collapsed:n?"1":"0",hidden:s?"1":"0",ht:r,customHeight:null!=r?"1":"0",spans:"1:1",outlineLevel:o||void 0}},children:a.filter(ZM).map((e,t)=>XM.getTemplate(e,t,i))}}},JM=e=>({name:"mergeCell",properties:{rawMap:{ref:e}}}),eA=e=>{if(null==e)return 1;const t=["Letter","Letter Small","Tabloid","Ledger","Legal","Statement","Executive","A3","A4","A4 Small","A5","A6","B4","B5","Folio","Envelope","Envelope DL","Envelope C5","Envelope B5","Envelope C3","Envelope C4","Envelope C6","Envelope Monarch","Japanese Postcard","Japanese Double Postcard"].indexOf(e);return-1===t?1:t+1},tA=(e,t,i)=>e.reduce((e,n,r)=>{const o="Center"===(a=n.position)?"C":"Right"===a?"R":"L";var a;const l=(c=`${e}&amp;${o}`,(h=n.font)?(c+="&amp;&quot;",c+=h.fontName||"Calibri",h.bold!==h.italic?c+=h.bold?",Bold":",Italic":h.bold?c+=",Bold Italic":c+=",Regular",c+="&quot;",h.size&&(c+=`&amp;${h.size}`),h.strikeThrough&&(c+="&amp;S"),h.underline&&(c+="&amp;"+("Double"===h.underline?"E":"U")),h.color&&(c+=`&amp;K${h.color.replace("#","").toUpperCase()}`),c):c);var c,h;n.position||(n.position=["Left","Center","Right"][r]);const{image:d}=n;if("&[Picture]"===n.value&&d){const e=`${o}${t}${i}`;pA.addHeaderFooterImageToMap(d,e)}return`${l}${s._.escapeString((u=n.value,s._.iterateObject({"&[Page]":"&P","&[Pages]":"&N","&[Date]":"&D","&[Time]":"&T","&[Tab]":"&A","&[Path]":"&Z","&[File]":"&F","&[Picture]":"&G"},(e,t)=>{u=u.replace(e,t)}),u))}`;var u},""),iA=e=>{const t=[];return["all","first","even"].forEach(i=>{const n=e[i],s="all"===i?"odd":i;if(n)for(const[e,r]of Object.entries(n)){const n=`${e.charAt(0).toUpperCase()}${e.slice(1)}`,o=e[0].toUpperCase();if(r){const e="all"===i?"":i.toUpperCase();t.push({name:`${s}${n}`,properties:{rawMap:{"xml:space":"preserve"}},textNode:tA(r,o,e)})}}}),t},nA={getTemplate(e){const{worksheet:t,currentSheet:i,config:n}=e,{margins:r={},pageSetup:o,headerFooterConfig:a,suppressColumnOutline:l}=n,{table:c}=t,{rows:h,columns:d}=c,u=d&&d.length?((e,t,i)=>{const n=[],s=[];e.forEach((e,i)=>{const r=e.cells;let o,a=0;r.forEach((e,r)=>{const l=r+a+1,c=WE(l),h=i+1;if(e.mergeAcross){a+=e.mergeAcross;const t=WE(r+a+1);n.push(`${c}${h}:${t}${h}`)}t[l-1]||(t[l-1]={});const{collapsibleRanges:d}=e;d&&d.forEach(e=>{s.push([l+e[0],l+e[1]])}),o=t[l-1],o.min=l,o.max=l,e.ref=`${c}${h}`})}),s.sort((e,t)=>e[0]!==t[0]?e[0]-t[0]:t[1]-e[1]);const r=new Map,o=new Map;return s.filter(e=>{const t=e.toString();return!r.get(t)&&(r.set(t,!0),!0)}).forEach(e=>{const n=t.find(t=>t.min==e[0]&&t.max==e[1]),s=o.get(e[0]);t.push({min:e[0],max:e[1],outlineLevel:i?void 0:s||1,width:(n||{width:100}).width}),o.set(e[0],(s||0)+1)}),n})(h,d,!!l):[],{worksheetDataTables:p}=pA,g=p.get(i),f=s._.compose(e=>(e.children.push({name:"sheetPr",children:[{name:"outlinePr",properties:{rawMap:{summaryBelow:0}}}]}),e),(e=>t=>{const i=e.reduce((e,t)=>t.outlineLevel&&t.outlineLevel>e?t.outlineLevel:e,0);return t.children.push({name:"sheetFormatPr",properties:{rawMap:{baseColWidth:10,defaultRowHeight:16,outlineLevelRow:i||void 0}}}),t})(h),(e=>t=>(e.length&&t.children.push({name:"cols",children:e.map(e=>qM.getTemplate(e))}),t))(d),((e,t)=>i=>(e.length&&i.children.push({name:"sheetData",children:e.map((e,i)=>QM.getTemplate(e,i,t))}),i))(h,i+1),(v=u,e=>(v.length&&e.children.push({name:"mergeCells",properties:{rawMap:{count:v.length}},children:v.map(e=>JM(e))}),e)),(e=>t=>{const{top:i=.75,right:n=.7,bottom:s=.75,left:r=.7,header:o=.3,footer:a=.3}=e;return t.children.push({name:"pageMargins",properties:{rawMap:{bottom:s,footer:a,header:o,left:r,right:n,top:i}}}),t})(r),(e=>t=>{var i;return e&&t.children.push({name:"pageSetup",properties:{rawMap:{horizontalDpi:0,verticalDpi:0,orientation:(i=e.orientation,!i||"Portrait"!==i&&"Landscape"!==i?"portrait":i.toLocaleLowerCase()),paperSize:eA(e.pageSize)}}}),t})(o),(e=>t=>{if(!e)return t;const i=null!=e.first?1:0,n=null!=e.even?1:0;return t.children.push({name:"headerFooter",properties:{rawMap:{differentFirst:i,differentOddEven:n}},children:iA(e)}),t})(a),(e=>t=>{const i=pA.worksheetImages.get(e);return(null==i?void 0:i.length)&&t.children.push({name:"drawing",properties:{rawMap:{"r:id":"rId"+ ++t.rIdCounter}}}),t})(i),(e=>t=>(pA.worksheetHeaderFooterImages.get(e)&&t.children.push({name:"legacyDrawingHF",properties:{rawMap:{"r:id":"rId"+ ++t.rIdCounter}}}),t))(i),(m=g,e=>(m&&e.children.push({name:"tableParts",properties:{rawMap:{count:"1"}},children:[{name:"tablePart",properties:{rawMap:{"r:id":"rId"+ ++e.rIdCounter}}}]}),e)));var m,v;const{children:y}=f({children:[],rIdCounter:0});return{name:"worksheet",properties:{prefixedAttributes:[{prefix:"xmlns:",map:{r:"http://schemas.openxmlformats.org/officeDocument/2006/relationships"}}],rawMap:{xmlns:"http://schemas.openxmlformats.org/spreadsheetml/2006/main"}},children:y}}},sA=nA,rA={getTemplate(e){const{Id:t,Type:i,Target:n}=e;return{name:"Relationship",properties:{rawMap:{Id:t,Type:i,Target:n}}}}},oA=e=>({name:"Relationships",properties:{rawMap:{xmlns:"http://schemas.openxmlformats.org/package/2006/relationships"}},children:e.map(e=>rA.getTemplate(e))}),aA=e=>{const{aspectratio:t,rotation:i}=e||{},n={};return t&&(n.aspectratio="t"),i&&(n.rotation="t"),{name:"o:lock",properties:{prefixedAttributes:[{prefix:"v:",map:{ext:"edit"}}],rawMap:n}}},lA={0:"0",5:"6554f",10:"13107f",15:"19661f",20:"26214f",25:".5",30:"39322f",35:"45875f",40:"52429f",45:"58982f",50:"1",55:"72818f",60:"1.25",65:"93623f",70:"109227f",75:"2",80:"2.5",85:"3.4",90:"5",95:"10",96:"12.5",97:"1092267f",98:"25",99:"50",100:"2147483647f"},cA=(e,t)=>{var i;let n;const{recolor:s,brightness:r,contrast:o,id:a}=e;var l;return s&&(n={},"Washout"!==s&&"Grayscale"!==s||(n.gain="19661f",n.blacklevel="22938f"),"Black & White"!==s&&"Grayscale"!==s||(n.grayscale="t","Black & White"===s&&(n.bilevel="t"))),s&&"Grayscale"!==s||(n||(n={}),null!=o&&50!==o&&(n.gain=null!=(i=lA[o])?i:"1"),null!=r&&50!==r&&(n.blacklevel=(l=r,(l-0)/100*1-.5).toString())),{name:"v:imagedata",properties:{prefixedAttributes:[{prefix:"o:",map:{relid:`rId${t}`,title:a}}],rawMap:n}}},hA=e=>Math.floor(.74999943307122*(null!=e?e:0)),dA={getTemplate(e){const t=pA.worksheetHeaderFooterImages.get(e.sheetIndex)||[];var i;return{name:"xml",properties:{prefixedAttributes:[{prefix:"xmlns:",map:{v:"urn:schemas-microsoft-com:vml",o:"urn:schemas-microsoft-com:office:office",x:"urn:schemas-microsoft-com:office:excel"}}]},children:[{name:"o:shapelayout",properties:{prefixedAttributes:[{prefix:"v:",map:{ext:"edit"}}]},children:[{name:"o:idmap",properties:{prefixedAttributes:[{prefix:"v:",map:{ext:"edit"}}],rawMap:{data:"1"}}}]},{name:"v:shapetype",properties:{prefixedAttributes:[{prefix:"o:",map:{spt:"75",preferrelative:"t"}}],rawMap:{coordsize:"21600,21600",filled:"f",id:"_x0000_t75",path:"m@4@5l@4@11@9@11@9@5xe",stroked:"f"}},children:[{name:"v:stroke",properties:{rawMap:{joinstyle:"miter"}}},(i=["if lineDrawn pixelLineWidth 0","sum @0 1 0","sum 0 0 @1","prod @2 1 2","prod @3 21600 pixelWidth","prod @3 21600 pixelHeight","sum @0 0 1","prod @6 1 2","prod @7 21600 pixelWidth","sum @8 21600 0","prod @7 21600 pixelHeight","sum @10 21600 0"],{name:"v:formulas",children:i.map(e=>({name:"v:f",properties:{rawMap:{eqn:e}}}))}),{name:"v:path",properties:{prefixedAttributes:[{prefix:"o:",map:{connecttype:"rect",extrusionok:"f"}}],rawMap:{gradientshapeok:"t"}}},aA({aspectratio:!0})]},...t.map((e,t)=>((e,t)=>{const{width:i=0,height:n=0,altText:s}=e,r=hA(i),o=hA(n);return{name:"v:shape",properties:{rawMap:{id:e.headerFooterPosition,"o:spid":"_x0000_s1025",style:`position: absolute; margin-left: 0; margin-top: 10in; margin-bottom: 0; margin-right: 0; width: ${r}pt; height: ${o}pt; z-index: ${t+1}`,type:"#_x0000_t75",alt:s}},children:[cA(e,t+1),aA({rotation:!0})]}})(e,t))]}}},uA=class e{static createExcel(e,t,i){this.addSheetName(t),((e,t)=>{1===(xE=t)&&zM(),e.forEach(UM)})(e,this.sheetNames.length);let n=Object.assign({},i);return i.exportAsExcelTable&&(i.columnModel.isPivotActive()&&(this.showExcelTableNonCompatibleFeaturesWarning("pivot mode"),n.exportAsExcelTable=!1),i.gos.get("masterDetail")&&(this.showExcelTableNonCompatibleFeaturesWarning("master/detail"),n.exportAsExcelTable=!1)),this.processTableConfig(t,n),this.createWorksheet(t,n)}static showExcelTableNonCompatibleFeaturesWarning(e){console.warn(`AG Grid: Excel table export does not work with ${e}. The exported Excel file will not contain any Excel tables.\nPlease turn off ${e} to enable Excel table exports.`)}static getTableNameFromIndex(e){return`table${e+1}`}static getSanitizedTableName(e){return e.replace(/^[^a-zA-Z_]+/,"_").replace(/\s/g,"_").replace(/[^a-zA-Z0-9_]/g,"_")}static addTableToSheet(e,t){this.worksheetDataTables.has(e)?console.warn("Unable to add data table to Excel sheet: A table already exists."):this.worksheetDataTables.set(e,t)}static processTableConfig(t,i){var n;if(!i.exportAsExcelTable)return;const s="boolean"==typeof i.exportAsExcelTable?{}:i.exportAsExcelTable,{name:r,showColumnStripes:o,showRowStripes:a,showFilterButton:l,highlightFirstColumn:c,highlightLastColumn:h}=s,d=this.getSanitizedTableName(r||e.defaultTableDisplayName),u=this.sheetNames.length-1,{table:p}=t,{rows:g,columns:f}=p,m=i.columnModel.getHeaderRowCount(),v=m-1,y=g.length,C=f.length,b=[],S=[];for(let e=0;e<C;e++){const t=f[e];b.push(t.displayName||""),S.push("match"===l||void 0===l?null!=(n=t.filterAllowed)&&n:l)}b&&b.length&&y&&d?this.addTableToSheet(u,{name:this.getTableNameFromIndex(u),displayName:d,columns:b,showFilterButtons:S,headerRowIndex:v,rowCount:y-m,showRowStripes:null==a||a,showColumnStripes:null!=o&&o,highlightFirstColumn:null!=c&&c,highlightLastColumn:null!=h&&h}):console.warn("Unable to add data table to Excel sheet: Missing required parameters.")}static addHeaderFooterImageToMap(e,t){const i=this.sheetNames.length-1,n=e;n.headerFooterPosition=t,this.buildImageMap({imageToAdd:n,idx:i});let s=this.worksheetHeaderFooterImages.get(i);s||(s=[],this.worksheetHeaderFooterImages.set(i,s)),s.find(t=>t.id===e.id)||s.push(e)}static addBodyImageToMap(e,t,i,n,s){let r=this.sheetNames.length;const{row:o,column:a}=e.position||{},l=e;n&&(null==t||null==i||o&&a||(e.position||(e.position={}),e.position=Object.assign({},e.position,{row:t,column:n.indexOf(i)+1})),((e,t)=>{const{colSpan:i,column:n}=e.position;if(e.width)if(i){const s=t.slice(n-1,n+i-1);let r=0;for(let t=0;t<s.length;t++){const i=s[t].getActualWidth();if(e.width<r+i){e.position.colSpan=t+1,e.totalWidth=e.width,e.width=e.totalWidth-r;break}r+=i}}else e.totalWidth=e.width})(l,n),((e,t)=>{const{rowSpan:i,row:n}=e.position;if(e.height)if(i){let s=0,r=0;for(let o=n;o<n+i;o++){const i=BE(zE(o,t)||20);if(e.height<s+i){e.position.rowSpan=r+1,e.totalHeight=e.height,e.height=e.totalHeight-s;break}s+=i,r++}}else e.totalHeight=e.height})(l,s)),this.buildImageMap({imageToAdd:l,idx:r});let c=this.worksheetImageIds.get(r);c||(c=new Map,this.worksheetImageIds.set(r,c));const h=this.worksheetImages.get(r);h?h.push(l):this.worksheetImages.set(r,[l]),c.get(e.id)||c.set(e.id,{index:c.size,type:e.imageType})}static buildImageMap(e){const{imageToAdd:t,idx:i}=e,n=this.images.get(t.id);if(n){const e=n.find(e=>e.sheetId===i);e?e.image.push(t):n.push({sheetId:i,image:[t]})}else this.images.set(t.id,[{sheetId:i,image:[t]}]),this.workbookImageIds.set(t.id,{type:t.imageType,index:this.workbookImageIds.size})}static addSheetName(e){const t=s._.escapeString(e.name)||"";let i="";for(;-1!==this.sheetNames.indexOf(`${t}${i}`);)if(""===i)i="_1";else{const e=parseInt(i.slice(1),10);i=`_${e+1}`}e.name=`${t}${i}`,this.sheetNames.push(e.name)}static getStringPosition(e){return this.sharedStrings.has(e)?this.sharedStrings.get(e):(this.sharedStrings.set(e,this.sharedStrings.size),this.sharedStrings.size-1)}static resetFactory(){this.sharedStrings=new Map,this.images=new Map,this.worksheetImages=new Map,this.worksheetHeaderFooterImages=new Map,this.workbookImageIds=new Map,this.worksheetImageIds=new Map,this.worksheetDataTables=new Map,this.sheetNames=[],this.factoryMode=s.FiP.SINGLE_SHEET}static createWorkbook(){return UE(YM(this.sheetNames))}static createStylesheet(e){return UE(jM.getTemplate(e))}static createSharedStrings(){return UE(gM(this.sharedStrings))}static createCore(e){return UE(_E.getTemplate(e))}static createContentTypes(e){return UE(GE.getTemplate(e))}static createRels(){const e=oA([{Id:"rId1",Type:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/officeDocument",Target:"xl/workbook.xml"},{Id:"rId2",Type:"http://schemas.openxmlformats.org/package/2006/relationships/metadata/core-properties",Target:"docProps/core.xml"}]);return UE(e)}static createTheme(){return UE(uM())}static createTable(e,t){return UE(JE.getTemplate(e,t))}static createWorkbookRels(e){const t=new Array(e).fill(void 0).map((e,t)=>({Id:`rId${t+1}`,Type:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/worksheet",Target:`worksheets/sheet${t+1}.xml`})),i=oA([...t,{Id:`rId${e+1}`,Type:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/theme",Target:"theme/theme1.xml"},{Id:`rId${e+2}`,Type:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/styles",Target:"styles.xml"},{Id:`rId${e+3}`,Type:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/sharedStrings",Target:"sharedStrings.xml"}]);return UE(i)}static createDrawing(e){return UE(QE.getTemplate({sheetIndex:e}))}static createDrawingRel(e){const t=this.worksheetImageIds.get(e)||[],i=[];for(const[e,n]of t)i.push({Id:`rId${n.index+1}`,Type:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/image",Target:`../media/image${this.workbookImageIds.get(e).index+1}.${n.type}`});return UE(oA(i))}static createVmlDrawing(e){return UE(dA.getTemplate({sheetIndex:e}),!0)}static createVmlDrawingRel(e){const t=this.worksheetHeaderFooterImages.get(e)||[],i=[];for(let e=0;e<t.length;e++){const n=t[e],s=this.workbookImageIds.get(n.id);if(!s)continue;const{index:r,type:o}=s,a="jpg"===o?"jpeg":o;i.push({Id:`rId${e+1}`,Type:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/image",Target:`../media/image${r+1}.${a}`})}return UE(oA(i))}static createRelationships({drawingIndex:e,vmlDrawingIndex:t,tableIndex:i}={}){if(void 0===e&&void 0===t&&void 0===i)return"";const n=[];null!=e&&n.push({Id:`rId${n.length+1}`,Type:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/drawing",Target:`../drawings/drawing${e+1}.xml`}),null!=t&&n.push({Id:`rId${n.length+1}`,Type:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/vmlDrawing",Target:`../drawings/vmlDrawing${t+1}.vml`}),null!=i&&n.push({Id:`rId${n.length+1}`,Type:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/table",Target:`../tables/${this.getTableNameFromIndex(i)}.xml`});const s=oA(n);return UE(s)}static createWorksheet(e,t){return UE(sA.getTemplate({worksheet:e,currentSheet:this.sheetNames.length-1,config:t}))}};uA.sharedStrings=new Map,uA.sheetNames=[],uA.images=new Map,uA.worksheetImages=new Map,uA.worksheetHeaderFooterImages=new Map,uA.workbookImageIds=new Map,uA.worksheetImageIds=new Map,uA.worksheetDataTables=new Map,uA.defaultTableDisplayName="AG-GRID-TABLE",uA.factoryMode=s.FiP.SINGLE_SHEET;var pA=uA,gA=class extends s.NF5{constructor(e){super(e),this.mixedStyles={},this.mixedStyleCounter=0,this.rows=[],this.config=Object.assign({},e),this.stylesByIds={},this.config.baseExcelStyles.forEach(e=>{this.stylesByIds[e.id]=e}),this.excelStyles=[...this.config.baseExcelStyles,{id:"_quotePrefix",quotePrefix:1}]}addCustomContent(e){e.forEach(e=>{const t=this.rows.length+1;let i;this.config.suppressRowOutline||null==e.outlineLevel||(i=e.outlineLevel);const n={height:zE(t,e.height||this.config.rowHeight),cells:(e.cells||[]).map((e,i)=>{var n,s,r;const o=this.addImage(t,this.columnsToExport[i],null==(n=e.data)?void 0:n.value);let a=null;e.styleId&&(a="string"==typeof e.styleId?[e.styleId]:e.styleId);const l=this.getStyleId(a);if(o)return this.createCell(l,this.getDataTypeForValue(o.value),null==o.value?"":o.value);const c=null!=(r=null==(s=e.data)?void 0:s.value)?r:"",h=this.getDataTypeForValue(c);return e.mergeAcross?this.createMergedCell(l,h,c,e.mergeAcross):this.createCell(l,h,c)}),outlineLevel:i};null!=e.collapsed&&(n.collapsed=e.collapsed),null!=e.hidden&&(n.hidden=e.hidden),this.rows.push(n)})}onNewHeaderGroupingRow(){const e=[];return this.rows.push({cells:e,height:zE(this.rows.length+1,this.config.headerRowHeight)}),{onColumn:(t,i,n,r,o)=>{const a=this.config.styleLinker({rowType:s.T6X.HEADER_GROUPING,rowIndex:1,value:`grouping-${i}`,columnGroup:t});e.push(NE(PE({},this.createMergedCell(this.getStyleId(a),this.getDataTypeForValue("string"),i,r)),{collapsibleRanges:o}))}}}onNewHeaderRow(){return this.onNewRow(this.onNewHeaderColumn,this.config.headerRowHeight)}onNewBodyRow(e){const t=this.onNewRow(this.onNewBodyColumn,this.config.rowHeight);return e&&this.addRowOutlineIfNecessary(e),t}prepare(e){super.prepare(e),this.columnsToExport=[...e],this.cols=e.map((e,t)=>this.convertColumnToExcel(e,t))}parse(){const e=this.rows.reduce((e,t)=>Math.max(e,t.cells.length),0);for(;this.cols.length<e;)this.cols.push(this.convertColumnToExcel(null,this.cols.length+1));const t={name:this.config.sheetName,table:{columns:this.cols,rows:this.rows}};return this.createExcel(t)}addRowOutlineIfNecessary(e){const{gos:t,suppressRowOutline:i,rowGroupExpandState:n="expanded"}=this.config;if(t.get("groupHideOpenParents")||i||null==e.level)return;const r=e.footer?1:0,o=s._.last(this.rows);if(o.outlineLevel=e.level+r,"expanded"===n)return;const a="collapsed"===n;if(e.isExpandable()){const t=!a&&e.expanded;o.collapsed=!t}o.hidden=!!e.parent&&-1!==e.parent.level&&(a||this.isAnyParentCollapsed(e.parent))}isAnyParentCollapsed(e){for(;e&&-1!==e.level;){if(!e.expanded)return!0;e=e.parent}return!1}convertColumnToExcel(e,t){const i=this.config.columnWidth,n=e?this.extractHeaderValue(e):void 0,s=null!=n?n:"",r=!!e&&e.isFilterAllowed();if(i)return"number"==typeof i?{width:i,displayName:s,filterAllowed:r}:{width:i({column:e,index:t}),displayName:s,filterAllowed:r};if(e){const t=75;return{width:Math.max(e.getActualWidth(),t),displayName:s,filterAllowed:r}}return{displayName:s,filterAllowed:r}}onNewHeaderColumn(e,t){return i=>{const n=this.extractHeaderValue(i),r=this.config.styleLinker({rowType:s.T6X.HEADER,rowIndex:e,value:n,column:i});t.push(this.createCell(this.getStyleId(r),this.getDataTypeForValue("string"),n))}}onNewBodyColumn(e,t){let i=0;return(n,r,o)=>{if(i>0)return void(i-=1);const{value:a,valueFormatted:l}=this.extractRowCellValue(n,r,e,"excel",o),c=this.config.styleLinker({rowType:s.T6X.BODY,rowIndex:e,value:a,column:n,node:o}),h=this.getStyleId(c),d=n.getColSpan(o),u=this.addImage(e,n,a);u?t.push(this.createCell(h,this.getDataTypeForValue(u.value),null==u.value?"":u.value)):d>1?(i=d-1,t.push(this.createMergedCell(h,this.getDataTypeForValue(a),a,d-1))):t.push(this.createCell(h,this.getDataTypeForValue(a),a,l))}}onNewRow(e,t){const i=[];return this.rows.push({cells:i,height:zE(this.rows.length+1,t)}),{onColumn:e.bind(this,this.rows.length,i)()}}createExcel(e){const{excelStyles:t,config:i}=this;return pA.createExcel(t,e,i)}getDataTypeForValue(e){return void 0===e?"empty":this.isNumerical(e)?"n":"s"}getTypeFromStyle(e,t){if(this.isFormula(t))return"f";if(e&&e.dataType)switch(e.dataType.toLocaleLowerCase()){case"formula":return"f";case"string":return"s";case"number":return"n";case"datetime":return"d";case"error":return"e";case"boolean":return"b";default:console.warn(`AG Grid: Unrecognized data type for excel export [${e.id}.dataType=${e.dataType}]`)}return null}addImage(e,t,i){if(!this.config.addImageToCell)return;const n=this.config.addImageToCell(e,t,i);return n?(pA.addBodyImageToMap(n.image,e,t,this.columnsToExport,this.config.rowHeight),n):void 0}createCell(e,t,i,n){const s=this.getStyleById(e);!(null==s?void 0:s.dataType)&&"s"===t&&n&&(i=n);const r=this.getTypeFromStyle(s,i)||t,{value:o,escaped:a}=this.getCellValue(r,i),l=[];return s&&l.push(e),a&&l.push("_quotePrefix"),{styleId:e=this.getStyleId(l)||void 0,data:{type:r,value:o}}}createMergedCell(e,t,i,n){const s=null==i?"":i;return{styleId:this.getStyleById(e)?e:void 0,data:{type:t,value:"s"===t?pA.getStringPosition(s).toString():i},mergeAcross:n}}getCellValue(e,t){let i=!1;if(null==t&&(e="s",t=""),"s"===e)t&&"'"===t[0]&&(i=!0,t=t.slice(1)),t=pA.getStringPosition(t).toString();else if("f"===e)t=t.slice(1);else if("n"===e){const e=Number(t);isNaN(e)?t="":""!==t&&(t=e.toString())}return{value:t,escaped:i}}getStyleId(e){if(!e||!e.length)return null;if(1===e.length)return e[0];const t=e.join("-");return this.mixedStyles[t]||this.addNewMixedStyle(e),this.mixedStyles[t].excelID}deepCloneObject(e){return JSON.parse(JSON.stringify(e))}addNewMixedStyle(e){this.mixedStyleCounter+=1;const t=`mixedStyle${this.mixedStyleCounter}`,i={};for(const t of e)for(const e of this.excelStyles)e.id===t&&s._.mergeDeep(i,this.deepCloneObject(e));i.id=t,i.name=t;const n=e.join("-");this.mixedStyles[n]={excelID:t,key:n,result:i},this.excelStyles.push(i),this.stylesByIds[t]=i}isFormula(e){return null!=e&&this.config.autoConvertFormulas&&e.toString().startsWith("=")}isNumerical(e){return"bigint"==typeof e||isFinite(e)&&""!==e&&!isNaN(parseFloat(e))}getStyleById(e){return null==e?null:this.stylesByIds[e]||null}},fA=(e,t)=>{const i="xl/drawings",n=`${i}/drawing${t+1}.xml`,r=`${i}/_rels/drawing${t+1}.xml.rels`;s.J1w.addFile(r,pA.createDrawingRel(e)),s.J1w.addFile(n,pA.createDrawing(e))},mA=(e,t)=>{const i="xl/drawings",n=`${i}/vmlDrawing${t+1}.vml`,r=`${i}/_rels/vmlDrawing${t+1}.vml.rels`;s.J1w.addFile(n,pA.createVmlDrawing(e)),s.J1w.addFile(r,pA.createVmlDrawingRel(e))},vA=(e,t={})=>{if(!e||0===e.length)return console.warn("AG Grid: Invalid params supplied to createExcelFileForExcel() - `ExcelExportParams.data` is empty."),pA.resetFactory(),!1;const{fontSize:i=11,author:n="AG Grid"}=t;return(()=>{s.J1w.addFolders(["_rels/","docProps/","xl/","xl/theme/","xl/_rels/","xl/worksheets/"]);const{images:e}=pA;if(!e.size)return;s.J1w.addFolders(["xl/worksheets/_rels","xl/drawings/","xl/drawings/_rels","xl/media/"]);let t=0;e.forEach(e=>{const i=e[0].image[0],{base64:n,imageType:r}=i,o="jpg"===r?"jpeg":r;s.J1w.addFile(`xl/media/image${++t}.${o}`,n,!0)})})(),(()=>{const{worksheetDataTables:e}=pA,t=e,i=Array.from(t.keys());for(let e=0;e<i.length;e++){const n=i[e],r=t.get(n);r&&s.J1w.addFile(`xl/tables/${r.name}.xml`,pA.createTable(r,e))}})(),(e=>{let t=0,i=0,n=0;const{images:r,worksheetDataTables:o,worksheetImages:a,worksheetHeaderFooterImages:l}=pA;for(let c=0;c<e.length;c++){const h=e[c];s.J1w.addFile(`xl/worksheets/sheet${c+1}.xml`,h,!1);const d=r.size>0&&a.has(c),u=o.size>0&&o.has(c),p=r.size&&l.has(c);if(!d&&!u&&!p)continue;let g,f,m;d&&(fA(c,t),f=t,t++),p&&(mA(c,i),m=i,i++),u&&(g=n++);const v=`xl/worksheets/_rels/sheet${c+1}.xml.rels`;s.J1w.addFile(v,pA.createRelationships({tableIndex:g,drawingIndex:f,vmlDrawingIndex:m}))}})(e),((e,t,i)=>{s.J1w.addFile("xl/workbook.xml",pA.createWorkbook()),s.J1w.addFile("xl/styles.xml",pA.createStylesheet(e)),s.J1w.addFile("xl/sharedStrings.xml",pA.createSharedStrings()),s.J1w.addFile("xl/theme/theme1.xml",pA.createTheme()),s.J1w.addFile("xl/_rels/workbook.xml.rels",pA.createWorkbookRels(i)),s.J1w.addFile("docProps/core.xml",pA.createCore(t)),s.J1w.addFile("[Content_Types].xml",pA.createContentTypes(i)),s.J1w.addFile("_rels/.rels",pA.createRels())})(i,n,e.length),pA.resetFactory(),!0},yA=e=>{const{data:t,fontSize:i,author:n}=e,r=e.mimeType||"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet";return vA(t,{author:n,fontSize:i})?s.J1w.getZipFile(r):Promise.resolve(void 0)},CA=e=>{const{data:t,fontSize:i,author:n}=e,r=e.mimeType||"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet";if(vA(t,{author:n,fontSize:i}))return s.J1w.getUncompressedZipFile(r)},bA=e=>{const{fileName:t="export.xlsx"}=e;yA(e).then(e=>{if(e){const i="function"==typeof t?t():t;s._7R.download(i,e)}})},SA=class extends s.YzF{postConstruct(){this.setBeans({gridSerializer:this.gridSerializer,gos:this.gos})}getMergedParams(e){const t=this.gos.get("defaultExcelExportParams");return Object.assign({},t,e)}export(e){if(this.isExportSuppressed())return void console.warn("AG Grid: Export cancelled. Export is not allowed as per your configuration.");const t=this.getMergedParams(e),i={data:[this.getData(t)],fontSize:t.fontSize,author:t.author,mimeType:t.mimeType};this.packageCompressedFile(i).then(e=>{if(e){const{fileName:i}=t,n="function"==typeof i?i(this.gos.getGridCommonParams()):i;s._7R.download(this.getFileName(n),e)}})}exportDataAsExcel(e){this.export(e)}getDataAsExcel(e){const t=this.getMergedParams(e),i={data:[this.getData(t)],fontSize:t.fontSize,author:t.author,mimeType:t.mimeType};return this.packageFile(i)}setFactoryMode(e){pA.factoryMode=e}getFactoryMode(){return pA.factoryMode}getSheetDataForExcel(e){const t=this.getMergedParams(e);return this.getData(t)}getMultipleSheetsAsExcel(e){return CA(e)}exportMultipleSheetsAsExcel(e){bA(e)}getDefaultFileExtension(){return"xlsx"}createSerializingSession(e){const{columnModel:t,valueService:i,gos:n}=this;let s;if(null!=e.sheetName){const{sheetName:t}=e,i="function"==typeof t?t(this.gos.getGridCommonParams()):t;s=String(i).substring(0,31)}else s="ag-grid";const r=NE(PE({},e),{sheetName:s,columnModel:t,valueService:i,gos:n,suppressRowOutline:e.suppressRowOutline||e.skipRowGroups,headerRowHeight:e.headerRowHeight||e.rowHeight,baseExcelStyles:this.gos.get("excelStyles")||[],styleLinker:this.styleLinker.bind(this)});return new gA(r)}styleLinker(e){const{rowType:t,rowIndex:i,value:n,column:r,columnGroup:o,node:a}=e,l=t===s.T6X.HEADER,c=t===s.T6X.HEADER_GROUPING,h=l?r:o;let d=[];if(l||c)return d.push("header"),c&&d.push("headerGroup"),h&&(d=d.concat(s.PC7.getHeaderClassesFromColDef(h.getDefinition(),this.gos,r||null,o||null))),d;const u=this.gos.get("excelStyles"),p=["cell"];if(!u||!u.length)return p;const g=u.map(e=>e.id);return this.stylingService.processAllCellClasses(r.getDefinition(),this.gos.addGridCommonParams({value:n,data:a.data,node:a,colDef:r.getDefinition(),column:r,rowIndex:i}),e=>{g.indexOf(e)>-1&&p.push(e)}),p.sort((e,t)=>g.indexOf(e)<g.indexOf(t)?-1:1)}isExportSuppressed(){return this.gos.get("suppressExcelExport")}packageCompressedFile(e){return yA(e)}packageFile(e){return CA(e)}};OE([(0,s.dsm)("columnModel")],SA.prototype,"columnModel",2),OE([(0,s.dsm)("valueService")],SA.prototype,"valueService",2),OE([(0,s.dsm)("stylingService")],SA.prototype,"stylingService",2),OE([(0,s.dsm)("gridSerializer")],SA.prototype,"gridSerializer",2),OE([(0,s.dsm)("gridOptionsService")],SA.prototype,"gos",2),OE([s.o7C],SA.prototype,"postConstruct",1),SA=OE([(0,s.dR4)("excelCreator")],SA);var wA={version:"31.3.4",moduleName:s.zsj.ExcelExportModule,beans:[SA,s.pK6,s.HvL],dependantModules:[s.n76,fm]},xA=Object.defineProperty,EA=Object.getOwnPropertyDescriptor,MA=Object.getOwnPropertySymbols,AA=Object.prototype.hasOwnProperty,TA=Object.prototype.propertyIsEnumerable,DA=(e,t,i)=>t in e?xA(e,t,{enumerable:!0,configurable:!0,writable:!0,value:i}):e[t]=i,IA=(e,t)=>{for(var i in t||(t={}))AA.call(t,i)&&DA(e,i,t[i]);if(MA)for(var i of MA(t))TA.call(t,i)&&DA(e,i,t[i]);return e},RA=(e,t,i,n)=>{for(var s,r=n>1?void 0:n?EA(t,i):t,o=e.length-1;o>=0;o--)(s=e[o])&&(r=(n?s(t,i,r):s(r))||r);return n&&r&&xA(t,i,r),r},LA=class extends s.uAl{preConstruct(){this.setTemplate('<div class="ag-filter-toolpanel-search" role="presentation">\n                <div ref="eExpand" class="ag-filter-toolpanel-expand"></div>\n                <ag-input-text-field ref="eFilterTextField" class="ag-filter-toolpanel-search-input"></ag-input-text-field>\n            </div>')}postConstruct(){const e=this.localeService.getLocaleTextFunc();this.eFilterTextField.setAutoComplete(!1).setInputAriaLabel(e("ariaFilterColumnsInput","Filter Columns Input")).onValueChange(this.onSearchTextChanged.bind(this)),this.createExpandIcons(),this.setExpandState(0),this.addManagedListener(this.eExpand,"click",this.onExpandClicked.bind(this)),this.addManagedListener(this.eventService,s.sVA.EVENT_NEW_COLUMNS_LOADED,this.showOrHideOptions.bind(this))}init(e){this.params=e,this.columnModel.isReady()&&this.showOrHideOptions()}createExpandIcons(){this.eExpand.appendChild(this.eExpandChecked=s._.createIconNoSpan("columnSelectOpen",this.gos)),this.eExpand.appendChild(this.eExpandUnchecked=s._.createIconNoSpan("columnSelectClosed",this.gos)),this.eExpand.appendChild(this.eExpandIndeterminate=s._.createIconNoSpan("columnSelectIndeterminate",this.gos))}showOrHideOptions(){const e=!this.params.suppressFilterSearch,t=!this.params.suppressExpandAll,i=this.localeService.getLocaleTextFunc();this.eFilterTextField.setInputPlaceholder(i("searchOoo","Search..."));const n=this.columnModel.getAllGridColumns().some(e=>e.getOriginalParent()&&e.isFilterAllowed());s._.setDisplayed(this.eFilterTextField.getGui(),e),s._.setDisplayed(this.eExpand,t&&n)}onSearchTextChanged(){this.onSearchTextChangedDebounced||(this.onSearchTextChangedDebounced=s._.debounce(()=>{this.dispatchEvent({type:"searchChanged",searchText:this.eFilterTextField.getValue()})},300)),this.onSearchTextChangedDebounced()}onExpandClicked(){const e=0===this.currentExpandState?{type:"collapseAll"}:{type:"expandAll"};this.dispatchEvent(e)}setExpandState(e){this.currentExpandState=e,s._.setDisplayed(this.eExpandChecked,0===this.currentExpandState),s._.setDisplayed(this.eExpandUnchecked,1===this.currentExpandState),s._.setDisplayed(this.eExpandIndeterminate,2===this.currentExpandState)}};RA([(0,s.dsm)("columnModel")],LA.prototype,"columnModel",2),RA([(0,s.PIB)("eExpand")],LA.prototype,"eExpand",2),RA([(0,s.PIB)("eFilterTextField")],LA.prototype,"eFilterTextField",2),RA([s.fK3],LA.prototype,"preConstruct",1),RA([s.o7C],LA.prototype,"postConstruct",1);var kA=class e extends s.uAl{constructor(t,i){super(e.TEMPLATE),this.expandedCallback=i,this.expanded=!1,this.hideHeader=t}postConstruct(){this.eExpandChecked=s._.createIconNoSpan("columnSelectOpen",this.gos),this.eExpandUnchecked=s._.createIconNoSpan("columnSelectClosed",this.gos),this.eExpand.appendChild(this.eExpandChecked),this.eExpand.appendChild(this.eExpandUnchecked)}setColumn(e){this.column=e,this.eFilterName.innerText=this.columnModel.getDisplayNameForColumn(this.column,"filterToolPanel",!1)||"",this.addManagedListener(this.eFilterToolPanelHeader,"click",this.toggleExpanded.bind(this)),this.addManagedListener(this.eFilterToolPanelHeader,"keydown",this.onKeyDown.bind(this)),this.addManagedListener(this.eventService,s.sVA.EVENT_FILTER_OPENED,this.onFilterOpened.bind(this)),this.addInIcon("filter",this.eFilterIcon,this.column),s._.setDisplayed(this.eFilterIcon,this.isFilterActive(),{skipAriaHidden:!0}),s._.setDisplayed(this.eExpandChecked,!1),this.hideHeader?(s._.setDisplayed(this.eFilterToolPanelHeader,!1),this.eFilterToolPanelHeader.removeAttribute("tabindex")):this.eFilterToolPanelHeader.setAttribute("tabindex","0"),this.addManagedListener(this.column,s.VPZ.EVENT_FILTER_CHANGED,this.onFilterChanged.bind(this))}onKeyDown(e){const{key:t}=e,{ENTER:i,SPACE:n,LEFT:r,RIGHT:o}=s.DDm;t!==i&&t!==n&&t!==r&&t!==o||(e.preventDefault(),t===i||t===n?this.toggleExpanded():t===s.DDm.LEFT?this.collapse():this.expand())}getColumn(){return this.column}getColumnFilterName(){return this.columnModel.getDisplayNameForColumn(this.column,"filterToolPanel",!1)}addCssClassToTitleBar(e){this.eFilterToolPanelHeader.classList.add(e)}addInIcon(e,t,i){if(null==t)return;const n=s._.createIconNoSpan(e,this.gos,i);t.appendChild(n)}isFilterActive(){return this.filterManager.isFilterActive(this.column)}onFilterChanged(){s._.setDisplayed(this.eFilterIcon,this.isFilterActive(),{skipAriaHidden:!0}),this.dispatchEvent({type:s.VPZ.EVENT_FILTER_CHANGED})}toggleExpanded(){this.expanded?this.collapse():this.expand()}expand(){this.expanded||(this.expanded=!0,s._.setAriaExpanded(this.eFilterToolPanelHeader,!0),s._.setDisplayed(this.eExpandChecked,!0),s._.setDisplayed(this.eExpandUnchecked,!1),this.addFilterElement(),this.expandedCallback())}addFilterElement(e){var t;const i=s._.loadTemplate('<div class="ag-filter-toolpanel-instance-filter"></div>'),n=this.createManagedBean(new s.jfj(this.column,"TOOLBAR"));this.filterWrapperComp=n,n.hasFilter()&&(null==(t=n.getFilter())||t.then(t=>{this.underlyingFilter=t,t&&(i.appendChild(n.getGui()),this.agFilterToolPanelBody.appendChild(i),n.afterGuiAttached({container:"toolPanel",suppressFocus:e}))}))}collapse(){var e;this.expanded&&(this.expanded=!1,s._.setAriaExpanded(this.eFilterToolPanelHeader,!1),this.removeFilterElement(),s._.setDisplayed(this.eExpandChecked,!1),s._.setDisplayed(this.eExpandUnchecked,!0),null==(e=this.filterWrapperComp)||e.afterGuiDetached(),this.destroyBean(this.filterWrapperComp),this.expandedCallback())}removeFilterElement(){s._.clearElement(this.agFilterToolPanelBody)}isExpanded(){return this.expanded}refreshFilter(e){var t;if(!this.expanded)return;const i=this.underlyingFilter;i&&(e?"function"==typeof i.refreshVirtualList&&i.refreshVirtualList():null==(t=i.afterGuiDetached)||t.call(i))}onFilterOpened(e){"COLUMN_MENU"===e.source&&e.column===this.column&&this.expanded&&this.collapse()}};kA.TEMPLATE='\n        <div class="ag-filter-toolpanel-instance">\n            <div class="ag-filter-toolpanel-header ag-filter-toolpanel-instance-header" ref="eFilterToolPanelHeader" role="button" aria-expanded="false">\n                <div ref="eExpand" class="ag-filter-toolpanel-expand"></div>\n                <span ref="eFilterName" class="ag-header-cell-text"></span>\n                <span ref="eFilterIcon" class="ag-header-icon ag-filter-icon ag-filter-toolpanel-instance-header-icon" aria-hidden="true"></span>\n            </div>\n            <div class="ag-filter-toolpanel-instance-body ag-filter" ref="agFilterToolPanelBody"></div>\n        </div>',RA([(0,s.PIB)("eFilterToolPanelHeader")],kA.prototype,"eFilterToolPanelHeader",2),RA([(0,s.PIB)("eFilterName")],kA.prototype,"eFilterName",2),RA([(0,s.PIB)("agFilterToolPanelBody")],kA.prototype,"agFilterToolPanelBody",2),RA([(0,s.PIB)("eFilterIcon")],kA.prototype,"eFilterIcon",2),RA([(0,s.PIB)("eExpand")],kA.prototype,"eExpand",2),RA([(0,s.dsm)("filterManager")],kA.prototype,"filterManager",2),RA([(0,s.dsm)("columnModel")],kA.prototype,"columnModel",2),RA([s.o7C],kA.prototype,"postConstruct",1);var PA=kA,NA=class e extends s.uAl{constructor(e,t,i,n,s){super(),this.columnGroup=e,this.childFilterComps=t,this.depth=n,this.expandedCallback=i,this.showingColumn=s}preConstruct(){this.setTemplate(e.TEMPLATE,{filterGroupComp:{cssIdentifier:"filter-toolpanel",direction:"vertical"}})}init(){this.setGroupTitle(),this.filterGroupComp.setAlignItems("stretch"),this.filterGroupComp.addCssClass(`ag-filter-toolpanel-group-level-${this.depth}`),this.filterGroupComp.addCssClassToTitleBar(`ag-filter-toolpanel-group-level-${this.depth}-header`),this.childFilterComps.forEach(e=>{this.filterGroupComp.addItem(e),e.addCssClassToTitleBar(`ag-filter-toolpanel-group-level-${this.depth+1}-header`)}),this.refreshFilterClass(),this.addExpandCollapseListeners(),this.addFilterChangedListeners(),this.setupTooltip(),this.addInIcon("filter")}setupTooltip(){if(!this.showingColumn)return;let e;"whenTruncated"===this.gos.get("tooltipShowMode")&&(e=()=>{const e=this.filterGroupComp.getGui().querySelector(".ag-group-title");return!e||e.scrollWidth>e.clientWidth});const t=()=>{const t=this.columnGroup.getColDef().headerTooltip;this.setTooltip({newTooltipText:t,location:"filterToolPanelColumnGroup",shouldDisplayTooltip:e})};t(),this.addManagedListener(this.eventService,s.sVA.EVENT_NEW_COLUMNS_LOADED,t)}getTooltipParams(){const e=super.getTooltipParams();return e.location="filterToolPanelColumnGroup",e}addCssClassToTitleBar(e){this.filterGroupComp.addCssClassToTitleBar(e)}refreshFilters(t){this.childFilterComps.forEach(i=>{i instanceof e?i.refreshFilters(t):i.refreshFilter(t)})}isColumnGroup(){return this.columnGroup instanceof s.D45}isExpanded(){return this.filterGroupComp.isExpanded()}getChildren(){return this.childFilterComps}getFilterGroupName(){return this.filterGroupName?this.filterGroupName:""}getFilterGroupId(){return this.columnGroup.getId()}hideGroupItem(e,t){this.filterGroupComp.hideItem(e,t)}hideGroup(e){this.setDisplayed(!e)}addInIcon(e){const t=s._.createIconNoSpan(e,this.gos);t&&t.classList.add("ag-filter-toolpanel-group-instance-header-icon"),this.filterGroupComp.addTitleBarWidget(t)}forEachToolPanelFilterChild(e){this.childFilterComps.forEach(t=>{t instanceof PA&&e(t)})}addExpandCollapseListeners(){const e=this.isColumnGroup()?()=>this.expandedCallback():()=>this.forEachToolPanelFilterChild(e=>e.expand()),t=this.isColumnGroup()?()=>this.expandedCallback():()=>this.forEachToolPanelFilterChild(e=>e.collapse());this.addManagedListener(this.filterGroupComp,s.Pk_.EVENT_EXPANDED,e),this.addManagedListener(this.filterGroupComp,s.Pk_.EVENT_COLLAPSED,t)}getColumns(){return this.columnGroup instanceof s.D45?this.columnGroup.getLeafColumns():[this.columnGroup]}addFilterChangedListeners(){this.getColumns().forEach(e=>{this.addManagedListener(e,s.VPZ.EVENT_FILTER_CHANGED,()=>this.refreshFilterClass())}),this.columnGroup instanceof s.D45||this.addManagedListener(this.eventService,s.sVA.EVENT_FILTER_OPENED,this.onFilterOpened.bind(this))}refreshFilterClass(){const e=this.getColumns();this.filterGroupComp.addOrRemoveCssClass("ag-has-filter",e.some(e=>e.isFilterActive()))}onFilterOpened(e){"COLUMN_MENU"===e.source&&e.column===this.columnGroup&&this.isExpanded()&&this.collapse()}expand(){this.filterGroupComp.toggleGroupExpand(!0)}collapse(){this.filterGroupComp.toggleGroupExpand(!1)}setGroupTitle(){this.filterGroupName=this.columnGroup instanceof s.D45?this.getColumnGroupName(this.columnGroup):this.getColumnName(this.columnGroup),this.filterGroupComp.setTitle(this.filterGroupName||"")}getColumnGroupName(e){return this.columnModel.getDisplayNameForProvidedColumnGroup(null,e,"filterToolPanel")}getColumnName(e){return this.columnModel.getDisplayNameForColumn(e,"filterToolPanel",!1)}destroyFilters(){this.childFilterComps=this.destroyBeans(this.childFilterComps),s._.clearElement(this.getGui())}destroy(){this.destroyFilters(),super.destroy()}};NA.TEMPLATE='<div class="ag-filter-toolpanel-group-wrapper">\n            <ag-group-component ref="filterGroupComp"></ag-group-component>\n        </div>',RA([(0,s.PIB)("filterGroupComp")],NA.prototype,"filterGroupComp",2),RA([(0,s.dsm)("columnModel")],NA.prototype,"columnModel",2),RA([s.fK3],NA.prototype,"preConstruct",1),RA([s.o7C],NA.prototype,"init",1);var OA=NA,_A=class e extends s.uAl{constructor(){super(e.TEMPLATE),this.initialised=!1,this.hasLoadedInitialState=!1,this.isInitialState=!1,this.filterGroupComps=[],this.suppressOnColumnsChanged=!1,this.onColumnsChangedPending=!1}init(e){this.initialised=!0;const t=this.gos.addGridCommonParams({suppressExpandAll:!1,suppressFilterSearch:!1,suppressSyncLayoutWithGrid:!1});s._.mergeDeep(t,e),this.params=t,this.params.suppressSyncLayoutWithGrid||this.addManagedListener(this.eventService,s.sVA.EVENT_COLUMN_MOVED,()=>this.onColumnsChanged()),this.addManagedListener(this.eventService,s.sVA.EVENT_NEW_COLUMNS_LOADED,()=>this.onColumnsChanged()),this.addManagedListener(this.eventService,s.sVA.EVENT_TOOL_PANEL_VISIBLE_CHANGED,e=>{"filters"===e.key&&this.refreshFilters(e.visible)}),this.addManagedListener(this.eventService,s.sVA.EVENT_DRAG_STARTED,()=>{this.suppressOnColumnsChanged=!0}),this.addManagedListener(this.eventService,s.sVA.EVENT_DRAG_STOPPED,()=>{this.suppressOnColumnsChanged=!1,this.onColumnsChangedPending&&(this.onColumnsChangedPending=!1,this.onColumnsChanged())}),this.columnModel.isReady()&&this.onColumnsChanged()}onColumnsChanged(){if(this.suppressOnColumnsChanged)return void(this.onColumnsChangedPending=!0);const e=this.columnModel.isPivotMode();this.params.suppressSyncLayoutWithGrid||e?this.buildTreeFromProvidedColumnDefs():this.syncFilterLayout(),this.refreshAriaLabel()}syncFilterLayout(){this.toolPanelColDefService.syncLayoutWithGrid(this.setFiltersLayout.bind(this)),this.refreshAriaLabel()}buildTreeFromProvidedColumnDefs(){const e=this.columnModel.getPrimaryColumnTree();this.recreateFilters(e)}setFiltersLayout(e){const t=this.toolPanelColDefService.createColumnTree(e);this.recreateFilters(t)}recreateFilters(e){const t=this.gos.getActiveDomElement();this.hasLoadedInitialState||(this.hasLoadedInitialState=!0,this.isInitialState=!!this.params.initialState);const i=this.getExpansionState();this.destroyFilters(),this.filterGroupComps=this.recursivelyAddComps(e,0,i);const n=this.filterGroupComps.length;n&&(this.filterGroupComps.forEach(e=>this.appendChild(e)),this.setFirstAndLastVisible(0,n-1)),s._.exists(this.searchFilterText)&&this.searchFilters(this.searchFilterText),this.fireExpandedEvent(),this.getGui().contains(t)&&t.focus(),this.isInitialState=!1,this.refreshAriaLabel()}recursivelyAddComps(e,t,i){return s._.flatten(e.map(e=>{if(e instanceof s.D45)return s._.flatten(this.recursivelyAddFilterGroupComps(e,t,i));const n=e;if(!this.shouldDisplayFilter(n))return[];const r=new PA(0===t,()=>this.onFilterExpanded());if(this.createBean(r),r.setColumn(n),i.get(n.getId())&&r.expand(),t>0)return r;const o=this.createBean(new OA(n,[r],this.onGroupExpanded.bind(this),t,!0));return o.addCssClassToTitleBar("ag-filter-toolpanel-header"),i.get(o.getFilterGroupId())||o.collapse(),o}))}refreshAriaLabel(){const e=this.localeService.getLocaleTextFunc(),t=e("ariaFilterPanelList","Filter List"),i=e("filters","Filters"),n=this.getGui().querySelectorAll(".ag-filter-toolpanel-group-item:not(.ag-filter-toolpanel-group-wrapper, .ag-hidden)").length;s._.setAriaLabel(this.getAriaElement(),`${t} ${n} ${i}`)}recursivelyAddFilterGroupComps(e,t,i){if(!this.filtersExistInChildren(e.getChildren()))return;const n=e.getColGroupDef();if(n&&n.suppressFiltersToolPanel)return[];const r=e.isPadding()?t:t+1,o=s._.flatten(this.recursivelyAddComps(e.getChildren(),r,i));if(e.isPadding())return o;const a=new OA(e,o,this.onGroupExpanded.bind(this),t,!1);this.createBean(a),a.addCssClassToTitleBar("ag-filter-toolpanel-header");const l=i.get(a.getFilterGroupId());return(this.isInitialState&&!l||!1===l)&&a.collapse(),[a]}filtersExistInChildren(e){return e.some(e=>e instanceof s.D45?this.filtersExistInChildren(e.getChildren()):this.shouldDisplayFilter(e))}shouldDisplayFilter(e){const t=e.getColDef()&&e.getColDef().suppressFiltersToolPanel;return e.isFilterAllowed()&&!t}getExpansionState(){const e=new Map;if(this.isInitialState){const{expandedColIds:t,expandedGroupIds:i}=this.params.initialState;return t.forEach(t=>e.set(t,!0)),i.forEach(t=>e.set(t,!0)),e}const t=i=>{e.set(i.getFilterGroupId(),i.isExpanded()),i.getChildren().forEach(i=>{i instanceof OA?t(i):e.set(i.getColumn().getId(),i.isExpanded())})};return this.filterGroupComps.forEach(t),e}refresh(){}setVisible(e){super.setDisplayed(e),e&&!this.initialised&&this.init(this.params)}expandFilterGroups(e,t){const i=[],n=r=>{const o=r.getFilterGroupId();(!t||s._.includes(t,o))&&(e&&r.isColumnGroup()?r.expand():r.collapse(),i.push(o)),r.getChildren().forEach(e=>{e instanceof OA&&n(e)})};if(this.filterGroupComps.forEach(n),this.onGroupExpanded(),t){const e=t.filter(e=>i.indexOf(e)<0);e.length>0&&console.warn("AG Grid: unable to find groups for these supplied groupIds:",e)}}expandFilters(e,t){const i=[],n=r=>{if(r instanceof OA){let t=!1;return r.getChildren().forEach(i=>{n(i)&&(e?(r.expand(),t=!0):r.isColumnGroup()||r.collapse())}),t}const o=r.getColumn().getColId(),a=!t||s._.includes(t,o);return a&&(e?r.expand():r.collapse(),i.push(o)),a};if(this.filterGroupComps.forEach(n),this.onGroupExpanded(),t){const e=t.filter(e=>i.indexOf(e)<0);e.length>0&&console.warn("AG Grid: unable to find columns for these supplied colIds:",e)}}onGroupExpanded(){this.fireExpandedEvent()}onFilterExpanded(){this.dispatchEvent({type:"filterExpanded"})}fireExpandedEvent(){let e=0,t=0;const i=n=>{n.isColumnGroup()&&(n.isExpanded()?e++:t++,n.getChildren().forEach(e=>{e instanceof OA&&i(e)}))};let n;this.filterGroupComps.forEach(i),n=e>0&&t>0?2:t>0?1:0,this.dispatchEvent({type:"groupExpanded",state:n})}performFilterSearch(e){this.searchFilterText=s._.exists(e)?e.toLowerCase():null,this.searchFilters(this.searchFilterText)}searchFilters(e){const t=t=>!s._.exists(e)||-1!==t.toLowerCase().indexOf(e),i=(e,n)=>{if(!(e instanceof OA))return t(e.getColumnFilterName()||"");const s=e.getChildren(),r=t(e.getFilterGroupName()),o=n||r;if(o){e.hideGroup(!1);for(let t=0;t<s.length;t++)i(s[t],o),e.hideGroupItem(!1,t);return!0}let a=!1;return s.forEach((t,s)=>{const r=i(t,n);e.hideGroupItem(!r,s),r&&(a=!0)}),e.hideGroup(!a),a};let n,r;this.filterGroupComps.forEach((e,t)=>{i(e,!1),void 0===n?e.containsCssClass("ag-hidden")||(n=t,r=t):e.containsCssClass("ag-hidden")||r===t||(r=t)}),this.setFirstAndLastVisible(n,r),this.refreshAriaLabel()}setFirstAndLastVisible(e,t){this.filterGroupComps.forEach((i,n)=>{i.removeCssClass("ag-first-group-visible"),i.removeCssClass("ag-last-group-visible"),n===e&&i.addCssClass("ag-first-group-visible"),n===t&&i.addCssClass("ag-last-group-visible")})}refreshFilters(e){this.filterGroupComps.forEach(t=>t.refreshFilters(e))}getExpandedFiltersAndGroups(){const e=[],t=new Set,i=n=>{if(n instanceof OA){n.getChildren().forEach(e=>i(e));const s=n.getFilterGroupId();n.isExpanded()&&!t.has(s)&&e.push(s)}else n.isExpanded()&&t.add(n.getColumn().getColId())};return this.filterGroupComps.forEach(i),{expandedGroupIds:e,expandedColIds:Array.from(t)}}destroyFilters(){this.filterGroupComps=this.destroyBeans(this.filterGroupComps),s._.clearElement(this.getGui())}destroy(){this.destroyFilters(),super.destroy()}};_A.TEMPLATE='<div class="ag-filter-list-panel"></div>',RA([(0,s.dsm)("toolPanelColDefService")],_A.prototype,"toolPanelColDefService",2),RA([(0,s.dsm)("columnModel")],_A.prototype,"columnModel",2);var FA=_A,GA=class e extends s.uAl{constructor(){super(e.TEMPLATE),this.initialised=!1,this.listenerDestroyFuncs=[]}init(e){this.initialised&&(this.listenerDestroyFuncs.forEach(e=>e()),this.listenerDestroyFuncs=[]),this.initialised=!0;const t=this.gos.addGridCommonParams({suppressExpandAll:!1,suppressFilterSearch:!1,suppressSyncLayoutWithGrid:!1});this.params=IA(IA({},t),e),this.filtersToolPanelHeaderPanel.init(this.params),this.filtersToolPanelListPanel.init(this.params);const i=this.params.suppressExpandAll,n=this.params.suppressFilterSearch;i&&n&&this.filtersToolPanelHeaderPanel.setDisplayed(!1),this.listenerDestroyFuncs.push(this.addManagedListener(this.filtersToolPanelHeaderPanel,"expandAll",this.onExpandAll.bind(this)),this.addManagedListener(this.filtersToolPanelHeaderPanel,"collapseAll",this.onCollapseAll.bind(this)),this.addManagedListener(this.filtersToolPanelHeaderPanel,"searchChanged",this.onSearchChanged.bind(this)),this.addManagedListener(this.filtersToolPanelListPanel,"filterExpanded",this.onFilterExpanded.bind(this)),this.addManagedListener(this.filtersToolPanelListPanel,"groupExpanded",this.onGroupExpanded.bind(this)))}setVisible(e){super.setDisplayed(e),e&&!this.initialised&&this.init(this.params)}onExpandAll(){this.filtersToolPanelListPanel.expandFilterGroups(!0)}onCollapseAll(){this.filtersToolPanelListPanel.expandFilterGroups(!1)}onSearchChanged(e){this.filtersToolPanelListPanel.performFilterSearch(e.searchText)}setFilterLayout(e){this.filtersToolPanelListPanel.setFiltersLayout(e)}onFilterExpanded(){this.params.onStateUpdated()}onGroupExpanded(e){this.filtersToolPanelHeaderPanel.setExpandState(e.state),this.params.onStateUpdated()}expandFilterGroups(e){this.filtersToolPanelListPanel.expandFilterGroups(!0,e)}collapseFilterGroups(e){this.filtersToolPanelListPanel.expandFilterGroups(!1,e)}expandFilters(e){this.filtersToolPanelListPanel.expandFilters(!0,e)}collapseFilters(e){this.filtersToolPanelListPanel.expandFilters(!1,e)}syncLayoutWithGrid(){this.filtersToolPanelListPanel.syncFilterLayout()}refresh(e){return this.init(e),!0}getState(){return this.filtersToolPanelListPanel.getExpandedFiltersAndGroups()}destroy(){super.destroy()}};GA.TEMPLATE='<div class="ag-filter-toolpanel">\n            <ag-filters-tool-panel-header ref="filtersToolPanelHeaderPanel"></ag-filters-tool-panel-header>\n            <ag-filters-tool-panel-list ref="filtersToolPanelListPanel"></ag-filters-tool-panel-list>\n         </div>',RA([(0,s.PIB)("filtersToolPanelHeaderPanel")],GA.prototype,"filtersToolPanelHeaderPanel",2),RA([(0,s.PIB)("filtersToolPanelListPanel")],GA.prototype,"filtersToolPanelListPanel",2);var VA=GA,BA={version:"31.3.4",moduleName:s.zsj.FiltersToolPanelModule,beans:[],agStackComponents:[{componentName:"AgFiltersToolPanelHeader",componentClass:LA},{componentName:"AgFiltersToolPanelList",componentClass:FA}],userComponents:[{componentName:"agFiltersToolPanel",componentClass:VA}],dependantModules:[Hx,fm]},HA=Object.defineProperty,zA=Object.getOwnPropertyDescriptor,UA=Object.getOwnPropertySymbols,WA=Object.prototype.hasOwnProperty,jA=Object.prototype.propertyIsEnumerable,KA=(e,t,i)=>t in e?HA(e,t,{enumerable:!0,configurable:!0,writable:!0,value:i}):e[t]=i,$A=(e,t,i,n)=>{for(var s,r=n>1?void 0:n?zA(t,i):t,o=e.length-1;o>=0;o--)(s=e[o])&&(r=(n?s(t,i,r):s(r))||r);return n&&r&&HA(t,i,r),r},YA=class extends s.XQb{constructor(){super(...arguments),this.loadRowDataVersion=0}init(e,t){this.params=t,this.comp=e,null!=t.pinned||(this.setAutoHeightClasses(),this.setupRefreshStrategy(),this.addThemeToDetailGrid(),this.createDetailGrid(),this.loadRowData(),this.addManagedListener(this.eventService,s.sVA.EVENT_FULL_WIDTH_ROW_FOCUSED,this.onFullWidthRowFocused.bind(this)))}onFullWidthRowFocused(e){const t=this.params,i={rowIndex:t.node.rowIndex,rowPinned:t.node.rowPinned},n={rowIndex:e.rowIndex,rowPinned:e.rowPinned};this.rowPositionUtils.sameRow(i,n)&&this.focusService.focusInto(this.comp.getGui(),e.fromBelow)}setAutoHeightClasses(){const e=this.gos.get("detailRowAutoHeight"),t=e?"ag-details-row-auto-height":"ag-details-row-fixed-height",i=e?"ag-details-grid-auto-height":"ag-details-grid-fixed-height";this.comp.addOrRemoveCssClass(t,!0),this.comp.addOrRemoveDetailGridCssClass(i,!0)}setupRefreshStrategy(){const e=this.params.refreshStrategy;"everything"==e||"nothing"==e||"rows"==e?this.refreshStrategy=e:(null!=e&&console.warn("AG Grid: invalid cellRendererParams.refreshStrategy = '"+e+"' supplied, defaulting to refreshStrategy = 'rows'."),this.refreshStrategy="rows")}addThemeToDetailGrid(){const{theme:e}=this.environment.getTheme();e&&this.comp.addOrRemoveDetailGridCssClass(e,!0)}createDetailGrid(){if(s._.missing(this.params.detailGridOptions))return void console.warn("AG Grid: could not find detail grid options for master detail, please set gridOptions.detailCellRendererParams.detailGridOptions");const e=this.gos.get("detailRowAutoHeight"),t=((e,t)=>{for(var i in t||(t={}))WA.call(t,i)&&KA(e,i,t[i]);if(UA)for(var i of UA(t))jA.call(t,i)&&KA(e,i,t[i]);return e})({},this.params.detailGridOptions);e&&(t.domLayout="autoHeight"),this.comp.setDetailGrid(t)}registerDetailWithMaster(e,t){const i=this.params.node.id,n=this.params.api,s={id:i,api:e,columnApi:t},r=this.params.node;n.isDestroyed()||(n.addDetailGridInfo(i,s),r.detailGridInfo=s,this.addDestroyFunc(()=>{r.detailGridInfo===s&&(n.isDestroyed()||n.removeDetailGridInfo(i),r.detailGridInfo=null)}))}loadRowData(){var e,t,i;this.loadRowDataVersion++;const n=this.loadRowDataVersion;if("serverSide"===(null==(e=this.params.detailGridOptions)?void 0:e.rowModelType))return void(null==(i=null==(t=this.params.node.detailGridInfo)?void 0:t.api)||i.refreshServerSide({purge:!0}));const s=this.params.getDetailRowData;s?s({node:this.params.node,data:this.params.node.data,successCallback:e=>{this.loadRowDataVersion===n&&this.comp.setRowData(e)},context:this.gos.getGridCommonParams().context}):console.warn("AG Grid: could not find getDetailRowData for master / detail, please set gridOptions.detailCellRendererParams.getDetailRowData")}refresh(){const e=!0;switch(this.refreshStrategy){case"nothing":return e;case"everything":return!1}return this.loadRowData(),e}};$A([(0,s.dsm)("rowPositionUtils")],YA.prototype,"rowPositionUtils",2),$A([(0,s.dsm)("focusService")],YA.prototype,"focusService",2);var qA=class e extends s.uAl{init(e){this.params=e,this.selectAndSetTemplate();const t={addOrRemoveCssClass:(e,t)=>this.addOrRemoveCssClass(e,t),addOrRemoveDetailGridCssClass:(e,t)=>this.eDetailGrid.classList.toggle(e,t),setDetailGrid:e=>this.setDetailGrid(e),setRowData:e=>this.setRowData(e),getGui:()=>this.eDetailGrid};this.ctrl=this.createManagedBean(new YA),this.ctrl.init(t,e)}refresh(){return this.ctrl&&this.ctrl.refresh()}destroy(){super.destroy()}selectAndSetTemplate(){if(this.params.pinned)return void this.setTemplate('<div class="ag-details-row"></div>');const t=()=>{this.setTemplate(e.TEMPLATE)};if(s._.missing(this.params.template))t();else if("string"==typeof this.params.template)this.setTemplate(this.params.template);else if("function"==typeof this.params.template){const e=(0,this.params.template)(this.params);this.setTemplate(e)}else console.warn("AG Grid: detailCellRendererParams.template should be function or string"),t();null==this.eDetailGrid&&console.warn('AG Grid: reference to eDetailGrid was missing from the details template. Please add ref="eDetailGrid" to the template.')}setDetailGrid(e){if(!this.eDetailGrid)return;const t=this.context.getBean("agGridReact"),i=t?s._.cloneObject(t):void 0,n=this.context.getBean("frameworkComponentWrapper"),r=this.getFrameworkOverrides(),o=(0,s.Dvw)(this.eDetailGrid,e,{frameworkOverrides:r,providedBeanInstances:{agGridReact:i,frameworkComponentWrapper:n},modules:s.syG.__getGridRegisteredModules(this.params.api.getGridId())});this.detailApi=o,this.ctrl.registerDetailWithMaster(o,new s.jf3(o)),this.addDestroyFunc(()=>{null==o||o.destroy()})}setRowData(e){this.detailApi&&this.detailApi.setGridOption("rowData",e)}};qA.TEMPLATE='<div class="ag-details-row" role="gridcell">\n            <div ref="eDetailGrid" class="ag-details-grid" role="presentation"></div>\n        </div>',$A([(0,s.PIB)("eDetailGrid")],qA.prototype,"eDetailGrid",2);var XA=qA,ZA={version:"31.3.4",moduleName:s.zsj.MasterDetailModule,beans:[],userComponents:[{componentName:"agDetailCellRenderer",componentClass:XA}],controllers:[{controllerName:"detailCellRenderer",controllerClass:YA}],dependantModules:[fm]},QA=Object.defineProperty,JA=Object.defineProperties,eT=Object.getOwnPropertyDescriptor,tT=Object.getOwnPropertyDescriptors,iT=Object.getOwnPropertySymbols,nT=Object.prototype.hasOwnProperty,sT=Object.prototype.propertyIsEnumerable,rT=(e,t,i)=>t in e?QA(e,t,{enumerable:!0,configurable:!0,writable:!0,value:i}):e[t]=i,oT=(e,t)=>{for(var i in t||(t={}))nT.call(t,i)&&rT(e,i,t[i]);if(iT)for(var i of iT(t))sT.call(t,i)&&rT(e,i,t[i]);return e},aT=(e,t)=>JA(e,tT(t)),lT=(e,t,i,n)=>{for(var s,r=n>1?void 0:n?eT(t,i):t,o=e.length-1;o>=0;o--)(s=e[o])&&(r=(n?s(t,i,r):s(r))||r);return n&&r&&QA(t,i,r),r},cT=class extends s.XQb{hideActiveMenu(){this.destroyBean(this.activeMenu)}showMenuAfterMouseEvent(e,t,i,n){const s=n?"filterMenuTab":void 0;this.showMenu(e,n=>{var r;const o=n.getGui();this.popupService.positionPopupUnderMouseEvent({type:i,column:e,mouseEvent:t,ePopup:o}),s&&(null==(r=n.showTab)||r.call(n,s)),this.dispatchVisibleChangedEvent(!0,!1,e,s)},i,s,void 0,t.target)}showMenuAfterButtonClick(e,t,i,n){let s=-1,r="left";this.gos.get("enableRtl")&&(s=1,r="right");const o=n?"filterMenuTab":void 0,a=o?[o]:void 0,l=this.menuService.isLegacyMenuEnabled();let c=(l?9:4)*s,h=l?-23:4;this.showMenu(e,n=>{var s;const a=n.getGui();this.popupService.positionPopupByComponent({type:i,column:e,eventSource:t,ePopup:a,alignSide:r,nudgeX:c,nudgeY:h,position:"under",keepWithinBounds:!0}),o&&(null==(s=n.showTab)||s.call(n,o)),this.dispatchVisibleChangedEvent(!0,!1,e,o)},i,o,a,t)}showMenu(e,t,i,n,r,o){var a;const{menu:l,eMenuGui:c,anchorToElement:h,restoreFocusParams:d}=this.getMenuParams(e,r,o),u=[];u.push(t=>{const i=l.getGui();this.destroyBean(l),e&&(e.setMenuVisible(!1,"contextMenu"),this.menuUtils.restoreFocusOnClose(d,i,t))});const p=this.localeService.getLocaleTextFunc();if(this.popupService.addPopup({modal:!0,eChild:c,closeOnEsc:!0,closedCallback:t=>{u.forEach(e=>e(t)),this.dispatchVisibleChangedEvent(!1,!1,e,n)},afterGuiAttached:e=>l.afterGuiAttached(Object.assign({},{container:i},e)),positionCallback:n?()=>t(l):void 0,ariaLabel:p("ariaLabelColumnMenu","Column Menu")}),n||(null==(a=l.showTabBasedOnPreviousSelection)||a.call(l),t(l)),this.menuService.isColumnMenuAnchoringEnabled()){const t=this.popupService.setPopupPositionRelatedToElement(c,h);t&&e&&this.addStopAnchoring(t,e,u)}l.addEventListener(dT.EVENT_TAB_SELECTED,t=>{this.dispatchVisibleChangedEvent(!1,!0,e),this.lastSelectedTab=t.key,this.dispatchVisibleChangedEvent(!0,!0,e)}),null==e||e.setMenuVisible(!0,"contextMenu"),this.activeMenu=l,l.addEventListener(s.XQb.EVENT_DESTROYED,()=>{this.activeMenu===l&&(this.activeMenu=null)})}addStopAnchoring(e,t,i){e.then(e=>{t.addEventListener("leftChanged",e),t.addEventListener("visibleChanged",e),i.push(()=>{t.removeEventListener("leftChanged",e),t.removeEventListener("visibleChanged",e)})})}getMenuParams(e,t,i){const n={column:e,headerPosition:this.focusService.getFocusedHeader(),columnIndex:this.columnModel.getAllDisplayedColumns().indexOf(e),eventSource:i},s=this.createMenu(e,n,t,i);return{menu:s,eMenuGui:s.getGui(),anchorToElement:i||this.ctrlsService.getGridBodyCtrl().getGui(),restoreFocusParams:n}}createMenu(e,t,i,n){return this.menuService.isLegacyMenuEnabled()?this.createBean(new dT(e,t,this.lastSelectedTab,i,n)):this.createBean(new uT(e,t,n))}dispatchVisibleChangedEvent(e,t,i,n){var r,o;const a={type:s.sVA.EVENT_COLUMN_MENU_VISIBLE_CHANGED,visible:e,switchingTab:t,key:null!=(o=null!=(r=this.lastSelectedTab)?r:n)?o:this.menuService.isLegacyMenuEnabled()?dT.TAB_GENERAL:"columnMenu",column:null!=i?i:null};this.eventService.dispatchEvent(a)}isMenuEnabled(e){var t;if(!this.menuService.isLegacyMenuEnabled())return!0;const i=!this.filterManager.isFilterAllowed(e),n=null!=(t=e.getColDef().menuTabs)?t:dT.TABS_DEFAULT;return(i&&n.includes(dT.TAB_FILTER)?n.length-1:n.length)>0}showMenuAfterContextMenuEvent(e,t,i){this.menuUtils.onContextMenu(t,i,t=>(this.showMenuAfterMouseEvent(e,t,"columnMenu"),!0))}};lT([(0,s.dsm)("popupService")],cT.prototype,"popupService",2),lT([(0,s.dsm)("focusService")],cT.prototype,"focusService",2),lT([(0,s.dsm)("ctrlsService")],cT.prototype,"ctrlsService",2),lT([(0,s.dsm)("columnModel")],cT.prototype,"columnModel",2),lT([(0,s.dsm)("filterManager")],cT.prototype,"filterManager",2),lT([(0,s.dsm)("menuUtils")],cT.prototype,"menuUtils",2),lT([(0,s.dsm)("menuService")],cT.prototype,"menuService",2),cT=lT([(0,s.dR4)("enterpriseMenuFactory")],cT);var hT=class e extends s.XQb{constructor(t,i,n,s,r){super(),this.column=t,this.restoreFocusParams=i,this.initialSelection=n,this.restrictTo=s,this.sourceElement=r,this.tabFactories={},this.includeChecks={},this.tabFactories[e.TAB_GENERAL]=this.createMainPanel.bind(this),this.tabFactories[e.TAB_FILTER]=this.createFilterPanel.bind(this),this.tabFactories[e.TAB_COLUMNS]=this.createColumnsPanel.bind(this),this.includeChecks[e.TAB_GENERAL]=()=>!0,this.includeChecks[e.TAB_FILTER]=()=>!!t&&this.filterManager.isFilterAllowed(t),this.includeChecks[e.TAB_COLUMNS]=()=>!0}init(){const e=this.getTabsToCreate().map(e=>this.createTab(e));this.tabbedLayout=new s.LfH({items:e,cssClass:"ag-menu",onActiveItemClicked:this.onHidePopup.bind(this),onItemClicked:this.onTabItemClicked.bind(this)}),this.createBean(this.tabbedLayout),this.mainMenuList&&this.mainMenuList.setParentComponent(this.tabbedLayout),this.addDestroyFunc(()=>this.destroyBean(this.tabbedLayout))}getTabsToCreate(){var t,i;return this.restrictTo?this.restrictTo:(null!=(i=null==(t=this.column)?void 0:t.getColDef().menuTabs)?i:e.TABS_DEFAULT).filter(e=>this.isValidMenuTabItem(e)).filter(e=>this.isNotSuppressed(e)).filter(e=>this.isModuleLoaded(e))}isModuleLoaded(t){return t!==e.TAB_COLUMNS||s.syG.__isRegistered(s.zsj.ColumnsToolPanelModule,this.context.getGridId())}isValidMenuTabItem(t){let i=!0,n=e.TABS_DEFAULT;return null!=this.restrictTo&&(i=this.restrictTo.indexOf(t)>-1,n=this.restrictTo),i=i&&e.TABS_DEFAULT.indexOf(t)>-1,i||console.warn(`AG Grid: Trying to render an invalid menu item '${t}'. Check that your 'menuTabs' contains one of [${n}]`),i}isNotSuppressed(e){return this.includeChecks[e]()}createTab(e){return this.tabFactories[e]()}showTabBasedOnPreviousSelection(){this.showTab(this.initialSelection)}showTab(t){this.tabItemColumns&&t===e.TAB_COLUMNS?this.tabbedLayout.showItem(this.tabItemColumns):this.tabItemFilter&&t===e.TAB_FILTER?this.tabbedLayout.showItem(this.tabItemFilter):this.tabItemGeneral&&t===e.TAB_GENERAL?this.tabbedLayout.showItem(this.tabItemGeneral):this.tabbedLayout.showFirstItem()}onTabItemClicked(t){let i=null;switch(t.item){case this.tabItemColumns:i=e.TAB_COLUMNS;break;case this.tabItemFilter:i=e.TAB_FILTER;break;case this.tabItemGeneral:i=e.TAB_GENERAL}i&&this.activateTab(i)}activateTab(t){const i={type:e.EVENT_TAB_SELECTED,key:t};this.dispatchEvent(i)}createMainPanel(){return this.mainMenuList=this.columnMenuFactory.createMenu(this,this.column,()=>{var e;return null!=(e=this.sourceElement)?e:this.getGui()}),this.mainMenuList.addEventListener(s.yuY.EVENT_CLOSE_MENU,this.onHidePopup.bind(this)),this.tabItemGeneral={title:s._.createIconNoSpan("menu",this.gos,this.column),titleLabel:e.TAB_GENERAL.replace("MenuTab",""),bodyPromise:s.oY$.resolve(this.mainMenuList.getGui()),name:e.TAB_GENERAL},this.tabItemGeneral}onHidePopup(e){this.menuUtils.closePopupAndRestoreFocusOnSelect(this.hidePopupFunc,this.restoreFocusParams,e)}createFilterPanel(){const t=this.column?this.createManagedBean(new s.jfj(this.column,"COLUMN_MENU")):null;if(!(null==t?void 0:t.hasFilter()))throw new Error("AG Grid - Unable to instantiate filter");return this.tabItemFilter={title:s._.createIconNoSpan("filter",this.gos,this.column),titleLabel:e.TAB_FILTER.replace("MenuTab",""),bodyPromise:s.oY$.resolve(null==t?void 0:t.getGui()),afterAttachedCallback:e=>t.afterGuiAttached(e),afterDetachedCallback:()=>t.afterGuiDetached(),name:e.TAB_FILTER},this.tabItemFilter}createColumnsPanel(){const t=document.createElement("div");t.classList.add("ag-menu-column-select-wrapper");const i=this.columnChooserFactory.createColumnSelectPanel(this,this.column).getGui();return i.classList.add("ag-menu-column-select"),t.appendChild(i),this.tabItemColumns={title:s._.createIconNoSpan("columns",this.gos,this.column),titleLabel:e.TAB_COLUMNS.replace("MenuTab",""),bodyPromise:s.oY$.resolve(t),name:e.TAB_COLUMNS},this.tabItemColumns}afterGuiAttached(e){const{container:t,hidePopup:i}=e;this.tabbedLayout.setAfterAttachedParams({container:t,hidePopup:i}),i&&(this.hidePopupFunc=i,this.addDestroyFunc(i))}getGui(){return this.tabbedLayout.getGui()}};hT.EVENT_TAB_SELECTED="tabSelected",hT.TAB_FILTER="filterMenuTab",hT.TAB_GENERAL="generalMenuTab",hT.TAB_COLUMNS="columnsMenuTab",hT.TABS_DEFAULT=[hT.TAB_GENERAL,hT.TAB_FILTER,hT.TAB_COLUMNS],lT([(0,s.dsm)("filterManager")],hT.prototype,"filterManager",2),lT([(0,s.dsm)("columnChooserFactory")],hT.prototype,"columnChooserFactory",2),lT([(0,s.dsm)("columnMenuFactory")],hT.prototype,"columnMenuFactory",2),lT([(0,s.dsm)("menuUtils")],hT.prototype,"menuUtils",2),lT([s.o7C],hT.prototype,"init",1);var dT=hT,uT=class extends s.uAl{constructor(e,t,i){super('\n            <div ref="eColumnMenu" role="presentation" class="ag-menu ag-column-menu"></div>\n        '),this.column=e,this.restoreFocusParams=t,this.sourceElement=i}init(){this.mainMenuList=this.columnMenuFactory.createMenu(this,this.column,()=>{var e;return null!=(e=this.sourceElement)?e:this.getGui()}),this.mainMenuList.addEventListener(s.yuY.EVENT_CLOSE_MENU,this.onHidePopup.bind(this)),this.eColumnMenu.appendChild(this.mainMenuList.getGui())}onHidePopup(e){this.menuUtils.closePopupAndRestoreFocusOnSelect(this.hidePopupFunc,this.restoreFocusParams,e)}afterGuiAttached({hidePopup:e}){e&&(this.hidePopupFunc=e,this.addDestroyFunc(e)),this.focusService.focusInto(this.mainMenuList.getGui())}};lT([(0,s.dsm)("columnMenuFactory")],uT.prototype,"columnMenuFactory",2),lT([(0,s.dsm)("menuUtils")],uT.prototype,"menuUtils",2),lT([(0,s.dsm)("focusService")],uT.prototype,"focusService",2),lT([(0,s.PIB)("eColumnMenu")],uT.prototype,"eColumnMenu",2),lT([s.o7C],uT.prototype,"init",1);var pT="ag-context-menu-open",gT=class extends s.XQb{hideActiveMenu(){this.destroyBean(this.activeMenu)}getMenuItems(e,t,i){const n=[];if(s._.exists(e)&&s.syG.__isRegistered(s.zsj.ClipboardModule,this.context.getGridId())&&t&&(this.gos.get("suppressCutToClipboard")||n.push("cut"),n.push("copy","copyWithHeaders","copyWithGroupHeaders","paste","separator")),this.gos.get("enableCharts")&&s.syG.__isRegistered(s.zsj.GridChartsModule,this.context.getGridId())&&(this.columnModel.isPivotMode()&&n.push("pivotChart"),this.rangeService&&!this.rangeService.isEmpty()&&n.push("chartRange")),s._.exists(e)){const e=!s.syG.__isRegistered(s.zsj.CsvExportModule,this.context.getGridId()),t=!s.syG.__isRegistered(s.zsj.ExcelExportModule,this.context.getGridId()),i=this.gos.get("suppressExcelExport")||t,r=this.gos.get("suppressCsvExport")||e;!(s._.isIOSUserAgent()||i&&r)&&n.push("export")}const r=n.length?n:void 0,o=null==t?void 0:t.getColDef().contextMenuItems;if(Array.isArray(o))return o;if("function"==typeof o)return o(this.gos.addGridCommonParams({column:t,node:e,value:i,defaultItems:r}));const a=this.gos.getCallback("getContextMenuItems");return a?a({column:t,node:e,value:i,defaultItems:r}):n}onContextMenu(e,t,i,n,s,r){this.menuUtils.onContextMenu(e,t,e=>this.showMenu(i,n,s,e,r))}showMenu(e,t,i,n,r){const o=this.getMenuItems(e,t,i),a=this.ctrlsService.getGridBodyCtrl().getGui();if(void 0===o||s._.missingOrEmpty(o))return!1;const l=new fT(o,t,e,i);this.createBean(l);const c=l.getGui(),h={column:t,rowNode:e,type:"contextMenu",mouseEvent:n,ePopup:c,nudgeY:1},d=this.localeService.getLocaleTextFunc(),u=this.popupService.addPopup({modal:!0,eChild:c,closeOnEsc:!0,closedCallback:e=>{a.classList.remove(pT),this.destroyBean(l),this.dispatchVisibleChangedEvent(!1,void 0===e?"api":"ui")},click:n,positionCallback:()=>{const e=this.gos.get("enableRtl");this.popupService.positionPopupUnderMouseEvent(aT(oT({},h),{nudgeX:e?-1*(c.offsetWidth+1):1}))},anchorToElement:r,ariaLabel:d("ariaLabelContextMenu","Context Menu")});u&&(a.classList.add(pT),l.afterGuiAttached({container:"contextMenu",hidePopup:u.hideFunc})),this.activeMenu&&this.hideActiveMenu(),this.activeMenu=l,l.addEventListener(s.XQb.EVENT_DESTROYED,()=>{this.activeMenu===l&&(this.activeMenu=null)}),u&&l.addEventListener(s.yuY.EVENT_CLOSE_MENU,e=>{var t,i;return u.hideFunc({mouseEvent:null!=(t=e.mouseEvent)?t:void 0,keyboardEvent:null!=(i=e.keyboardEvent)?i:void 0,forceHide:!0})});const p=n&&n instanceof MouseEvent&&"mousedown"===n.type;return this.dispatchVisibleChangedEvent(!0,p?"api":"ui"),!0}dispatchVisibleChangedEvent(e,t="ui"){const i={type:s.sVA.EVENT_CONTEXT_MENU_VISIBLE_CHANGED,visible:e,source:t};this.eventService.dispatchEvent(i)}};lT([(0,s.dsm)("popupService")],gT.prototype,"popupService",2),lT([(0,s.dsm)("ctrlsService")],gT.prototype,"ctrlsService",2),lT([(0,s.dsm)("columnModel")],gT.prototype,"columnModel",2),lT([(0,s.dsm)("menuUtils")],gT.prototype,"menuUtils",2),lT([(0,s.Xx1)("rangeService")],gT.prototype,"rangeService",2),gT=lT([(0,s.dR4)("contextMenuFactory")],gT);var fT=class extends s.uAl{constructor(e,t,i,n){super('<div class="ag-menu" role="presentation"></div>'),this.menuItems=e,this.column=t,this.node=i,this.value=n,this.menuList=null,this.focusedCell=null}addMenuItems(){const e=this.createManagedBean(new s.i9O(0,{column:this.column,node:this.node,value:this.value})),t=this.menuItemMapper.mapWithStockItems(this.menuItems,null,()=>this.getGui());e.addMenuItems(t),this.appendChild(e),this.menuList=e,e.addEventListener(s.yuY.EVENT_CLOSE_MENU,e=>this.dispatchEvent(e))}afterGuiAttached(e){e.hidePopup&&this.addDestroyFunc(e.hidePopup),this.focusedCell=this.focusService.getFocusedCell(),this.menuList&&this.focusService.focusInto(this.menuList.getGui())}restoreFocusedCell(){const e=this.focusService.getFocusedCell();if(e&&this.focusedCell&&this.cellPositionUtils.equals(e,this.focusedCell)){const{rowIndex:e,rowPinned:t,column:i}=this.focusedCell,n=this.gos.getDocument(),s=this.gos.getActiveDomElement();s&&s!==n.body||this.focusService.setFocusedCell({rowIndex:e,column:i,rowPinned:t,forceBrowserFocus:!0,preventScrollOnBrowserFocus:!this.focusService.isKeyboardMode()})}}destroy(){this.restoreFocusedCell(),super.destroy()}};lT([(0,s.dsm)("menuItemMapper")],fT.prototype,"menuItemMapper",2),lT([(0,s.dsm)("focusService")],fT.prototype,"focusService",2),lT([(0,s.dsm)("cellPositionUtils")],fT.prototype,"cellPositionUtils",2),lT([s.o7C],fT.prototype,"addMenuItems",1);var mT=class extends s.XQb{mapWithStockItems(e,t,i){if(!e)return[];const n=[];return e.forEach(e=>{let s;if(s="string"==typeof e?this.getStockMenuItem(e,t,i):oT({},e),!s)return;const r=s,{subMenu:o}=r;o&&o instanceof Array&&(r.subMenu=this.mapWithStockItems(o,t,i)),null!=s&&n.push(s)}),n}getStockMenuItem(e,t,i){var n;const r=this.localeService.getLocaleTextFunc(),o=this.gos.get("skipHeaderOnAutoSize");switch(e){case"pinSubMenu":return{name:r("pinColumn","Pin Column"),icon:s._.createIconNoSpan("menuPin",this.gos,null),subMenu:["clearPinned","pinLeft","pinRight"]};case"pinLeft":return{name:r("pinLeft","Pin Left"),action:()=>this.columnModel.setColumnsPinned([t],"left","contextMenu"),checked:!!t&&t.isPinnedLeft()};case"pinRight":return{name:r("pinRight","Pin Right"),action:()=>this.columnModel.setColumnsPinned([t],"right","contextMenu"),checked:!!t&&t.isPinnedRight()};case"clearPinned":return{name:r("noPin","No Pin"),action:()=>this.columnModel.setColumnsPinned([t],null,"contextMenu"),checked:!!t&&!t.isPinned()};case"valueAggSubMenu":return s.syG.__assertRegistered(s.zsj.RowGroupingModule,"Aggregation from Menu",this.context.getGridId())&&((null==t?void 0:t.isPrimary())||(null==t?void 0:t.getColDef().pivotValueColumn))?{name:r("valueAggregation","Value Aggregation"),icon:s._.createIconNoSpan("menuValue",this.gos,null),subMenu:this.createAggregationSubMenu(t,this.aggFuncService)}:null;case"autoSizeThis":return{name:r("autosizeThiscolumn","Autosize This Column"),action:()=>this.columnModel.autoSizeColumn(t,"contextMenu",o)};case"autoSizeAll":return{name:r("autosizeAllColumns","Autosize All Columns"),action:()=>this.columnModel.autoSizeAllColumns("contextMenu",o)};case"rowGroup":return{name:r("groupBy","Group by")+" "+s._.escapeString(this.columnModel.getDisplayNameForColumn(t,"header")),disabled:(null==t?void 0:t.isRowGroupActive())||!(null==t?void 0:t.getColDef().enableRowGroup),action:()=>this.columnModel.addRowGroupColumns([t],"contextMenu"),icon:s._.createIconNoSpan("menuAddRowGroup",this.gos,null)};case"rowUnGroup":const a=s._.createIconNoSpan("menuRemoveRowGroup",this.gos,null),l=null==t?void 0:t.getColDef().showRowGroup,c=this.gos.get("groupLockGroupColumns");if(!0===l)return{name:r("ungroupAll","Un-Group All"),disabled:-1===c||c>=this.columnModel.getRowGroupColumns().length,action:()=>this.columnModel.setRowGroupColumns(this.columnModel.getRowGroupColumns().slice(0,c),"contextMenu"),icon:a};if("string"==typeof l){const e=this.columnModel.getPrimaryColumn(l),t=null!=e?s._.escapeString(this.columnModel.getDisplayNameForColumn(e,"header")):l;return{name:r("ungroupBy","Un-Group by")+" "+t,disabled:null!=e&&this.columnModel.isColumnGroupingLocked(e),action:()=>this.columnModel.removeRowGroupColumns([l],"contextMenu"),icon:a}}return{name:r("ungroupBy","Un-Group by")+" "+s._.escapeString(this.columnModel.getDisplayNameForColumn(t,"header")),disabled:!(null==t?void 0:t.isRowGroupActive())||!(null==t?void 0:t.getColDef().enableRowGroup)||this.columnModel.isColumnGroupingLocked(t),action:()=>this.columnModel.removeRowGroupColumns([t],"contextMenu"),icon:a};case"resetColumns":return{name:r("resetColumns","Reset Columns"),action:()=>this.columnModel.resetColumnState("contextMenu")};case"expandAll":return{name:r("expandAll","Expand All Row Groups"),action:()=>this.gridApi.expandAll()};case"contractAll":return{name:r("collapseAll","Collapse All Row Groups"),action:()=>this.gridApi.collapseAll()};case"copy":return s.syG.__assertRegistered(s.zsj.ClipboardModule,"Copy from Menu",this.context.getGridId())?{name:r("copy","Copy"),shortcut:r("ctrlC","Ctrl+C"),icon:s._.createIconNoSpan("clipboardCopy",this.gos,null),action:()=>this.clipboardService.copyToClipboard()}:null;case"copyWithHeaders":return s.syG.__assertRegistered(s.zsj.ClipboardModule,"Copy with Headers from Menu",this.context.getGridId())?{name:r("copyWithHeaders","Copy with Headers"),icon:s._.createIconNoSpan("clipboardCopy",this.gos,null),action:()=>this.clipboardService.copyToClipboard({includeHeaders:!0})}:null;case"copyWithGroupHeaders":return s.syG.__assertRegistered(s.zsj.ClipboardModule,"Copy with Group Headers from Menu",this.context.getGridId())?{name:r("copyWithGroupHeaders","Copy with Group Headers"),icon:s._.createIconNoSpan("clipboardCopy",this.gos,null),action:()=>this.clipboardService.copyToClipboard({includeHeaders:!0,includeGroupHeaders:!0})}:null;case"cut":if(s.syG.__assertRegistered(s.zsj.ClipboardModule,"Cut from Menu",this.context.getGridId())){const e=this.focusService.getFocusedCell(),t=e?this.rowPositionUtils.getRowNode(e):null,i=!!t&&(null==e?void 0:e.column.isCellEditable(t));return{name:r("cut","Cut"),shortcut:r("ctrlX","Ctrl+X"),icon:s._.createIconNoSpan("clipboardCut",this.gos,null),disabled:!i||this.gos.get("suppressCutToClipboard"),action:()=>this.clipboardService.cutToClipboard(void 0,"contextMenu")}}return null;case"paste":return s.syG.__assertRegistered(s.zsj.ClipboardModule,"Paste from Clipboard",this.context.getGridId())?{name:r("paste","Paste"),shortcut:r("ctrlV","Ctrl+V"),disabled:!0,icon:s._.createIconNoSpan("clipboardPaste",this.gos,null),action:()=>this.clipboardService.pasteFromClipboard()}:null;case"export":const h=[],d=s.syG.__isRegistered(s.zsj.CsvExportModule,this.context.getGridId()),u=s.syG.__isRegistered(s.zsj.ExcelExportModule,this.context.getGridId());return!this.gos.get("suppressCsvExport")&&d&&h.push("csvExport"),!this.gos.get("suppressExcelExport")&&u&&h.push("excelExport"),{name:r("export","Export"),subMenu:h,icon:s._.createIconNoSpan("save",this.gos,null)};case"csvExport":return{name:r("csvExport","CSV Export"),icon:s._.createIconNoSpan("csvExport",this.gos,null),action:()=>this.gridApi.exportDataAsCsv({})};case"excelExport":return{name:r("excelExport","Excel Export"),icon:s._.createIconNoSpan("excelExport",this.gos,null),action:()=>this.gridApi.exportDataAsExcel()};case"separator":return"separator";case"pivotChart":case"chartRange":return null!=(n=this.chartMenuItemMapper.getChartItems(e))?n:null;case"columnFilter":return t?{name:r("columnFilter","Column Filter"),icon:s._.createIconNoSpan("filter",this.gos,null),action:()=>this.menuService.showFilterMenu({column:t,buttonElement:i(),containerType:"columnFilter",positionBy:"button"})}:null;case"columnChooser":return s.syG.__isRegistered(s.zsj.ColumnsToolPanelModule,this.context.getGridId())?{name:r("columnChooser","Choose Columns"),icon:s._.createIconNoSpan("columns",this.gos,null),action:()=>this.menuService.showColumnChooser({column:t,eventSource:i()})}:null;case"sortAscending":return{name:r("sortAscending","Sort Ascending"),icon:s._.createIconNoSpan("sortAscending",this.gos,null),action:()=>this.sortController.setSortForColumn(t,"asc",!1,"columnMenu")};case"sortDescending":return{name:r("sortDescending","Sort Descending"),icon:s._.createIconNoSpan("sortDescending",this.gos,null),action:()=>this.sortController.setSortForColumn(t,"desc",!1,"columnMenu")};case"sortUnSort":return{name:r("sortUnSort","Clear Sort"),icon:s._.createIconNoSpan("sortUnSort",this.gos,null),action:()=>this.sortController.setSortForColumn(t,null,!1,"columnMenu")};default:return console.warn(`AG Grid: unknown menu item type ${e}`),null}}createAggregationSubMenu(e,t){const i=this.localeService.getLocaleTextFunc();let n;if(e.isPrimary())n=e;else{const t=e.getColDef().pivotValueColumn;n=s._.exists(t)?t:void 0}const r=[];if(n){const e=n.isValueActive(),s=t.getFuncNames(n);r.push({name:i("noAggregation","None"),action:()=>{this.columnModel.removeValueColumns([n],"contextMenu"),this.columnModel.setColumnAggFunc(n,void 0,"contextMenu")},checked:!e}),s.forEach(s=>{r.push({name:i(s,t.getDefaultFuncLabel(s)),action:()=>{this.columnModel.setColumnAggFunc(n,s,"contextMenu"),this.columnModel.addValueColumns([n],"contextMenu")},checked:e&&n.getAggFunc()===s})})}return r}};lT([(0,s.dsm)("columnModel")],mT.prototype,"columnModel",2),lT([(0,s.dsm)("gridApi")],mT.prototype,"gridApi",2),lT([(0,s.dsm)("focusService")],mT.prototype,"focusService",2),lT([(0,s.dsm)("rowPositionUtils")],mT.prototype,"rowPositionUtils",2),lT([(0,s.dsm)("chartMenuItemMapper")],mT.prototype,"chartMenuItemMapper",2),lT([(0,s.dsm)("menuService")],mT.prototype,"menuService",2),lT([(0,s.dsm)("sortController")],mT.prototype,"sortController",2),lT([(0,s.Xx1)("clipboardService")],mT.prototype,"clipboardService",2),lT([(0,s.Xx1)("aggFuncService")],mT.prototype,"aggFuncService",2),mT=lT([(0,s.dR4)("menuItemMapper")],mT);var vT=class extends s.XQb{getChartItems(e){var t,i;if(!this.chartService)return void s.syG.__assertRegistered(s.zsj.GridChartsModule,`the Context Menu key "${e}"`,this.context.getGridId());const n="pivotChart"===e?new yT(this.gos,this.chartService,this.localeService):new CT(this.gos,this.chartService,this.localeService),r=this.chartService.isEnterprise();let o=n.getMenuItem();if(o&&o.subMenu&&!r){const e=t=>{var i;return aT(oT({},t),{subMenu:null==(i=t.subMenu)?void 0:i.filter(e=>!e._enterprise).map(t=>e(t))})};o=e(o)}const a=null==(i=null==(t=this.gos.get("chartToolPanelsDef"))?void 0:t.settingsPanel)?void 0:i.chartGroupsDef;return a&&(o=vT.filterAndOrderChartMenu(o,a,n.getConfigLookup())),this.cleanInternals(o)}cleanInternals(e){if(!e)return e;const t=e=>{var i;return null==e||delete e._key,null==e||delete e._enterprise,null==(i=null==e?void 0:e.subMenu)||i.forEach(e=>t(e)),e};return t(e)}static buildLookup(e){let t={};const i=e=>{t[e._key]=e,e.subMenu&&e.subMenu.forEach(e=>i(e))};return i(e),t}static filterAndOrderChartMenu(e,t,i){var n;const r=this.buildLookup(e);let o=aT(oT({},e),{subMenu:[]});if(Object.entries(t).forEach(([e,t])=>{var n,a;const l=i[e];if(null===l)return;if(null==l)return void s._.warnOnce(`invalid chartGroupsDef config '${e}'`);const c=r[l._key];if(c)if(c.subMenu){const i=t.map(t=>{const i=l[t];if(null!=i)return r[i];s._.warnOnce(`invalid chartGroupsDef config '${e}.${t}'`)}).filter(e=>void 0!==e);i.length>0&&(c.subMenu=i,null==(n=o.subMenu)||n.push(c))}else null==(a=o.subMenu)||a.push(c)}),0!=(null==(n=o.subMenu)?void 0:n.length))return o}};lT([(0,s.Xx1)("chartService")],vT.prototype,"chartService",2),vT=lT([(0,s.dR4)("chartMenuItemMapper")],vT);var yT=class{constructor(e,t,i){this.gos=e,this.chartService=t,this.localeService=i}getMenuItem(){const e=this.localeService.getLocaleTextFunc(),t=(t,i,n,s,r=!1)=>({name:e(t,i),action:()=>this.chartService.createPivotChart({chartType:n}),_key:s,_enterprise:r});return{name:e("pivotChart","Pivot Chart"),_key:"pivotChart",subMenu:[{_key:"pivotColumnChart",name:e("columnChart","Column"),subMenu:[t("groupedColumn","Grouped&lrm;","groupedColumn","pivotGroupedColumn"),t("stackedColumn","Stacked&lrm;","stackedColumn","pivotStackedColumn"),t("normalizedColumn","100% Stacked&lrm;","normalizedColumn","pivotNormalizedColumn")]},{_key:"pivotBarChart",name:e("barChart","Bar"),subMenu:[t("groupedBar","Grouped&lrm;","groupedBar","pivotGroupedBar"),t("stackedBar","Stacked&lrm;","stackedBar","pivotStackedBar"),t("normalizedBar","100% Stacked&lrm;","normalizedBar","pivotNormalizedBar")]},{_key:"pivotPieChart",name:e("pieChart","Pie"),subMenu:[t("pie","Pie&lrm;","pie","pivotPie"),t("donut","Donut&lrm;","donut","pivotDonut")]},t("line","Line&lrm;","line","pivotLineChart"),{_key:"pivotXYChart",name:e("xyChart","X Y (Scatter)"),subMenu:[t("scatter","Scatter&lrm;","scatter","pivotScatter"),t("bubble","Bubble&lrm;","bubble","pivotBubble")]},{_key:"pivotAreaChart",name:e("areaChart","Area"),subMenu:[t("area","Area&lrm;","area","pivotArea"),t("stackedArea","Stacked&lrm;","stackedArea","pivotStackedArea"),t("normalizedArea","100% Stacked&lrm;","normalizedArea","pivotNormalizedArea")]},{_key:"pivotStatisticalChart",_enterprise:!1,name:e("statisticalChart","Statistical"),subMenu:[t("histogramChart","Histogram&lrm;","histogram","pivotHistogram",!1)]},{_key:"pivotHierarchicalChart",_enterprise:!0,name:e("hierarchicalChart","Hierarchical"),subMenu:[t("treemapChart","Treemap&lrm;","treemap","pivotTreemap",!0),t("sunburstChart","Sunburst&lrm;","sunburst","pivotSunburst",!0)]},{_key:"pivotCombinationChart",name:e("combinationChart","Combination"),subMenu:[t("columnLineCombo","Column & Line&lrm;","columnLineCombo","pivotColumnLineCombo"),t("AreaColumnCombo","Area & Column&lrm;","areaColumnCombo","pivotAreaColumnCombo")]}],icon:s._.createIconNoSpan("chart",this.gos,void 0)}}getConfigLookup(){return{columnGroup:{_key:"pivotColumnChart",column:"pivotGroupedColumn",stackedColumn:"pivotStackedColumn",normalizedColumn:"pivotNormalizedColumn"},barGroup:{_key:"pivotBarChart",bar:"pivotGroupedBar",stackedBar:"pivotStackedBar",normalizedBar:"pivotNormalizedBar"},pieGroup:{_key:"pivotPieChart",pie:"pivotPie",donut:"pivotDonut",doughnut:"pivotDonut"},lineGroup:{_key:"pivotLineChart",line:"pivotLineChart"},scatterGroup:{_key:"pivotXYChart",bubble:"pivotBubble",scatter:"pivotScatter"},areaGroup:{_key:"pivotAreaChart",area:"pivotArea",stackedArea:"pivotStackedArea",normalizedArea:"pivotNormalizedArea"},combinationGroup:{_key:"pivotCombinationChart",columnLineCombo:"pivotColumnLineCombo",areaColumnCombo:"pivotAreaColumnCombo",customCombo:null},hierarchicalGroup:{_key:"pivotHierarchicalChart",treemap:"pivotTreemap",sunburst:"pivotSunburst"},statisticalGroup:{_key:"pivotStatisticalChart",histogram:"pivotHistogram",rangeBar:null,rangeArea:null,boxPlot:null},polarGroup:null,specializedGroup:null}}},CT=class{constructor(e,t,i){this.gos=e,this.chartService=t,this.localeService=i}getMenuItem(){const e=this.localeService.getLocaleTextFunc(),t=(t,i,n,s,r=!1)=>({name:e(t,i),action:()=>this.chartService.createChartFromCurrentRange(n),_key:s,_enterprise:r});return{name:e("chartRange","Chart Range"),_key:"chartRange",subMenu:[{name:e("columnChart","Column"),subMenu:[t("groupedColumn","Grouped&lrm;","groupedColumn","rangeGroupedColumn"),t("stackedColumn","Stacked&lrm;","stackedColumn","rangeStackedColumn"),t("normalizedColumn","100% Stacked&lrm;","normalizedColumn","rangeNormalizedColumn")],_key:"rangeColumnChart"},{name:e("barChart","Bar"),subMenu:[t("groupedBar","Grouped&lrm;","groupedBar","rangeGroupedBar"),t("stackedBar","Stacked&lrm;","stackedBar","rangeStackedBar"),t("normalizedBar","100% Stacked&lrm;","normalizedBar","rangeNormalizedBar")],_key:"rangeBarChart"},{name:e("pieChart","Pie"),subMenu:[t("pie","Pie&lrm;","pie","rangePie"),t("donut","Donut&lrm;","donut","rangeDonut")],_key:"rangePieChart"},t("line","Line&lrm;","line","rangeLineChart"),{name:e("xyChart","X Y (Scatter)"),subMenu:[t("scatter","Scatter&lrm;","scatter","rangeScatter"),t("bubble","Bubble&lrm;","bubble","rangeBubble")],_key:"rangeXYChart"},{name:e("areaChart","Area"),subMenu:[t("area","Area&lrm;","area","rangeArea"),t("stackedArea","Stacked&lrm;","stackedArea","rangeStackedArea"),t("normalizedArea","100% Stacked&lrm;","normalizedArea","rangeNormalizedArea")],_key:"rangeAreaChart"},{name:e("polarChart","Polar"),subMenu:[t("radarLine","Radar Line&lrm;","radarLine","rangeRadarLine"),t("radarArea","Radar Area&lrm;","radarArea","rangeRadarArea"),t("nightingale","Nightingale&lrm;","nightingale","rangeNightingale"),t("radialColumn","Radial Column&lrm;","radialColumn","rangeRadialColumn"),t("radialBar","Radial Bar&lrm;","radialBar","rangeRadialBar")],_key:"rangePolarChart",_enterprise:!0},{name:e("statisticalChart","Statistical"),subMenu:[t("boxPlot","Box Plot&lrm;","boxPlot","rangeBoxPlot",!0),t("histogramChart","Histogram&lrm;","histogram","rangeHistogram",!1),t("rangeBar","Range Bar&lrm;","rangeBar","rangeRangeBar",!0),t("rangeArea","Range Area&lrm;","rangeArea","rangeRangeArea",!0)],_key:"rangeStatisticalChart",_enterprise:!1},{name:e("hierarchicalChart","Hierarchical"),subMenu:[t("treemap","Treemap&lrm;","treemap","rangeTreemap"),t("sunburst","Sunburst&lrm;","sunburst","rangeSunburst")],_key:"rangeHierarchicalChart",_enterprise:!0},{name:e("specializedChart","Specialized"),subMenu:[t("heatmap","Heatmap&lrm;","heatmap","rangeHeatmap"),t("waterfall","Waterfall&lrm;","waterfall","rangeWaterfall")],_key:"rangeSpecializedChart",_enterprise:!0},{name:e("combinationChart","Combination"),subMenu:[t("columnLineCombo","Column & Line&lrm;","columnLineCombo","rangeColumnLineCombo"),t("AreaColumnCombo","Area & Column&lrm;","areaColumnCombo","rangeAreaColumnCombo")],_key:"rangeCombinationChart"}],icon:s._.createIconNoSpan("chart",this.gos,void 0)}}getConfigLookup(){return{columnGroup:{_key:"rangeColumnChart",column:"rangeGroupedColumn",stackedColumn:"rangeStackedColumn",normalizedColumn:"rangeNormalizedColumn"},barGroup:{_key:"rangeBarChart",bar:"rangeGroupedBar",stackedBar:"rangeStackedBar",normalizedBar:"rangeNormalizedBar"},pieGroup:{_key:"rangePieChart",pie:"rangePie",donut:"rangeDonut",doughnut:"rangeDonut"},lineGroup:{_key:"rangeLineChart",line:"rangeLineChart"},scatterGroup:{_key:"rangeXYChart",bubble:"rangeBubble",scatter:"rangeScatter"},areaGroup:{_key:"rangeAreaChart",area:"rangeArea",stackedArea:"rangeStackedArea",normalizedArea:"rangeNormalizedArea"},polarGroup:{_key:"rangePolarChart",radarLine:"rangeRadarLine",radarArea:"rangeRadarArea",nightingale:"rangeNightingale",radialColumn:"rangeRadialColumn",radialBar:"rangeRadialBar"},statisticalGroup:{_key:"rangeStatisticalChart",boxPlot:"rangeBoxPlot",histogram:"rangeHistogram",rangeBar:"rangeRangeBar",rangeArea:"rangeRangeArea"},hierarchicalGroup:{_key:"rangeHierarchicalChart",treemap:"rangeTreemap",sunburst:"rangeSunburst"},specializedGroup:{_key:"rangeSpecializedChart",heatmap:"rangeHeatmap",waterfall:"rangeWaterfall"},combinationGroup:{_key:"rangeCombinationChart",columnLineCombo:"rangeColumnLineCombo",areaColumnCombo:"rangeAreaColumnCombo",customCombo:null}}}},bT=class extends s.XQb{createColumnSelectPanel(e,t,i,n){var s,r;const o=e.createManagedBean(new dE),a=null!=(r=null!=(s=null!=n?n:null==t?void 0:t.getColDef().columnChooserParams)?s:null==t?void 0:t.getColDef().columnsMenuParams)?r:{},{contractColumnSelection:l,suppressColumnExpandAll:c,suppressColumnFilter:h,suppressColumnSelectAll:d,suppressSyncLayoutWithGrid:u,columnLayout:p}=a;return o.init(!!i,this.gos.addGridCommonParams({suppressColumnMove:!1,suppressValues:!1,suppressPivots:!1,suppressRowGroups:!1,suppressPivotMode:!1,contractColumnSelection:!!l,suppressColumnExpandAll:!!c,suppressColumnFilter:!!h,suppressColumnSelectAll:!!d,suppressSyncLayoutWithGrid:!!p||!!u,onStateUpdated:()=>{}}),"columnMenu"),p&&o.setColumnLayout(p),o}showColumnChooser({column:e,chooserParams:t,eventSource:i}){this.hideActiveColumnChooser();const n=this.createColumnSelectPanel(this,e,!0,t),r=this.localeService.getLocaleTextFunc(),o=this.columnModel.getAllDisplayedColumns().indexOf(e),a=e?this.focusService.getFocusedHeader():null;this.activeColumnChooserDialog=this.createBean(new s.fNJ({title:r("chooseColumns","Choose Columns"),component:n,width:300,height:300,resizable:!0,movable:!0,centered:!0,closable:!0,afterGuiAttached:()=>{var t;null==(t=this.focusService.findNextFocusableElement(n.getGui()))||t.focus(),this.dispatchVisibleChangedEvent(!0,e)},closedCallback:t=>{const n=this.activeColumnChooser.getGui();this.destroyBean(this.activeColumnChooser),this.activeColumnChooser=void 0,this.activeColumnChooserDialog=void 0,this.dispatchVisibleChangedEvent(!1,e),e&&this.menuUtils.restoreFocusOnClose({column:e,headerPosition:a,columnIndex:o,eventSource:i},n,t,!0)}})),this.activeColumnChooser=n}hideActiveColumnChooser(){this.activeColumnChooserDialog&&this.destroyBean(this.activeColumnChooserDialog)}dispatchVisibleChangedEvent(e,t){const i={type:s.sVA.EVENT_COLUMN_MENU_VISIBLE_CHANGED,visible:e,switchingTab:!1,key:"columnChooser",column:null!=t?t:null};this.eventService.dispatchEvent(i)}};lT([(0,s.dsm)("focusService")],bT.prototype,"focusService",2),lT([(0,s.dsm)("menuUtils")],bT.prototype,"menuUtils",2),lT([(0,s.dsm)("columnModel")],bT.prototype,"columnModel",2),bT=lT([(0,s.dR4)("columnChooserFactory")],bT);var ST=class extends s.XQb{createMenu(e,t,i){const n=e.createManagedBean(new s.i9O(0,{column:null!=t?t:null,node:null,value:null})),r=this.getMenuItems(t),o=this.menuItemMapper.mapWithStockItems(r,null!=t?t:null,i);return n.addMenuItems(o),n}getMenuItems(e){const t=this.getDefaultMenuOptions(e);let i;const n=null==e?void 0:e.getColDef().mainMenuItems;if(Array.isArray(n))i=n;else if("function"==typeof n)i=n(this.gos.addGridCommonParams({column:e,defaultItems:t}));else{const n=this.gos.getCallback("getMainMenuItems");i=n&&e?n({column:e,defaultItems:t}):t}return s._.removeRepeatsFromArray(i,ST.MENU_ITEM_SEPARATOR),i}getDefaultMenuOptions(e){const t=[],i=this.menuService.isLegacyMenuEnabled();if(!e)return i||t.push("columnChooser"),t.push("resetColumns"),t;const n=!e.getColDef().lockPinned,s=this.columnModel.getRowGroupColumns().length,r=s>0,o=e.isAllowValue(),a=e.isAllowRowGroup(),l=e.isPrimary(),c=this.columnModel.isPivotMode(),h="clientSide"===this.rowModel.getType(),d=this.gos.get("treeData"),u=l&&r&&o||!l;if(!i&&e.isSortable()){const i=e.getSort();"asc"!==i&&t.push("sortAscending"),"desc"!==i&&t.push("sortDescending"),i&&t.push("sortUnSort"),t.push(ST.MENU_ITEM_SEPARATOR)}return this.menuService.isFilterMenuItemEnabled(e)&&(t.push("columnFilter"),t.push(ST.MENU_ITEM_SEPARATOR)),n&&t.push("pinSubMenu"),u&&t.push("valueAggSubMenu"),(n||u)&&t.push(ST.MENU_ITEM_SEPARATOR),t.push("autoSizeThis"),t.push("autoSizeAll"),t.push(ST.MENU_ITEM_SEPARATOR),e.getColDef().showRowGroup?t.push("rowUnGroup"):a&&e.isPrimary()&&(e.isRowGroupActive()?this.columnModel.isColumnGroupingLocked(e)||t.push("rowUnGroup"):t.push("rowGroup")),t.push(ST.MENU_ITEM_SEPARATOR),i||t.push("columnChooser"),t.push("resetColumns"),h&&(d||s>(c?1:0))&&(t.push("expandAll"),t.push("contractAll")),t}};ST.MENU_ITEM_SEPARATOR="separator",lT([(0,s.dsm)("menuItemMapper")],ST.prototype,"menuItemMapper",2),lT([(0,s.dsm)("columnModel")],ST.prototype,"columnModel",2),lT([(0,s.dsm)("rowModel")],ST.prototype,"rowModel",2),lT([(0,s.dsm)("filterManager")],ST.prototype,"filterManager",2),lT([(0,s.dsm)("menuService")],ST.prototype,"menuService",2),ST=lT([(0,s.dR4)("columnMenuFactory")],ST);var wT=class extends s.XQb{restoreFocusOnClose(e,t,i,n){const{eventSource:s}=e,r=i instanceof KeyboardEvent;if(!n&&!r||!s)return;const o=this.gos.getDocument(),a=this.gos.getActiveDomElement();(t.contains(a)||a===o.body)&&this.focusHeaderCell(e)}closePopupAndRestoreFocusOnSelect(e,t,i){let n;i&&i.keyboardEvent&&(n=i.keyboardEvent),e(n&&{keyboardEvent:n});const s=this.focusService.getFocusedCell(),r=this.gos.getDocument(),o=this.gos.getActiveDomElement();if(!o||o===r.body)if(s){const{rowIndex:e,rowPinned:t,column:i}=s;this.focusService.setFocusedCell({rowIndex:e,column:i,rowPinned:t,forceBrowserFocus:!0,preventScrollOnBrowserFocus:!0})}else this.focusHeaderCell(t)}onContextMenu(e,t,i){if((this.gos.get("allowContextMenuWithControlKey")||!e||!e.ctrlKey&&!e.metaKey)&&(e&&this.blockMiddleClickScrollsIfNeeded(e),!this.gos.get("suppressContextMenu")&&i(null!=e?e:t.touches[0]))){const i=null!=e?e:t;i&&i.cancelable&&i.preventDefault()}}focusHeaderCell(e){const{column:t,columnIndex:i,headerPosition:n,eventSource:r}=e;if(this.columnModel.getAllDisplayedColumns().some(e=>e===t)&&r&&s._.isVisible(r)){const e=this.focusService.findTabbableParent(r);e&&(t&&this.headerNavigationService.scrollToColumn(t),e.focus())}else if(n&&-1!==i){const e=this.columnModel.getAllDisplayedColumns(),t=e[i]||s._.last(e);t&&this.focusService.focusHeaderPosition({headerPosition:{headerRowIndex:n.headerRowIndex,column:t}})}}blockMiddleClickScrollsIfNeeded(e){this.gos.get("suppressMiddleClickScrolls")&&2===e.which&&e.preventDefault()}};lT([(0,s.dsm)("focusService")],wT.prototype,"focusService",2),lT([(0,s.dsm)("headerNavigationService")],wT.prototype,"headerNavigationService",2),lT([(0,s.dsm)("columnModel")],wT.prototype,"columnModel",2),wT=lT([(0,s.dR4)("menuUtils")],wT);var xT={version:"31.3.4",moduleName:s.zsj.MenuModule,beans:[cT,gT,mT,vT,bT,ST,wT],dependantModules:[fm]},ET=Object.defineProperty,MT=Object.defineProperties,AT=Object.getOwnPropertyDescriptor,TT=Object.getOwnPropertyDescriptors,DT=Object.getOwnPropertySymbols,IT=Object.prototype.hasOwnProperty,RT=Object.prototype.propertyIsEnumerable,LT=(e,t,i)=>t in e?ET(e,t,{enumerable:!0,configurable:!0,writable:!0,value:i}):e[t]=i,kT=(e,t)=>{for(var i in t||(t={}))IT.call(t,i)&&LT(e,i,t[i]);if(DT)for(var i of DT(t))RT.call(t,i)&&LT(e,i,t[i]);return e},PT=(e,t)=>MT(e,TT(t)),NT=(e,t,i,n)=>{for(var s,r=n>1?void 0:n?AT(t,i):t,o=e.length-1;o>=0;o--)(s=e[o])&&(r=(n?s(t,i,r):s(r))||r);return n&&r&&ET(t,i,r),r},OT=class e extends s.aJZ{constructor(){super('<div class="ag-multi-filter ag-menu-list-compact"></div>'),this.filterDefs=[],this.filters=[],this.guiDestroyFuncs=[],this.filterGuis=[],this.activeFilterIndices=[],this.lastActivatedMenuItem=null,this.afterFiltersReadyFuncs=[]}postConstruct(){this.initialiseTabGuard({onFocusIn:e=>this.onFocusIn(e)})}static getFilterDefs(e){const{filters:t}=e;return t&&t.length>0?t:[{filter:"agTextColumnFilter"},{filter:"agSetColumnFilter"}]}init(t){this.params=t,this.filterDefs=e.getFilterDefs(t);const{column:i,filterChangedCallback:n}=t;this.column=i,this.filterChangedCallback=n;const r=[];return this.filterDefs.forEach((e,t)=>{const i=this.createFilter(e,t);null!=i&&r.push(i)}),new s.oY$(e=>{s.oY$.all(r).then(t=>{this.filters=t,this.refreshGui("columnMenu").then(()=>{e()})})}).then(()=>{this.afterFiltersReadyFuncs.forEach(e=>e()),this.afterFiltersReadyFuncs.length=0})}refreshGui(e){return e===this.lastOpenedInContainer?s.oY$.resolve():(this.removeAllChildrenExceptTabGuards(),this.destroyChildren(),s.oY$.all(this.filters.map((t,i)=>{const n=this.filterDefs[i],r=this.getFilterTitle(t,n);let o;if("subMenu"===n.display&&"toolPanel"!==e)o=this.insertFilterMenu(t,r).then(e=>e.getGui());else if("subMenu"===n.display||"accordion"===n.display){const e=this.insertFilterGroup(t,r);o=s.oY$.resolve(e.getGui())}else o=s.oY$.resolve(t.getGui());return o})).then(t=>{t.forEach((e,t)=>{t>0&&this.appendChild(s._.loadTemplate('<div class="ag-filter-separator"></div>')),this.appendChild(e)}),this.filterGuis=t,this.lastOpenedInContainer=e}))}getFilterTitle(e,t){return null!=t.title?t.title:e instanceof s.Q5x?e.getFilterTitle():"Filter"}destroyChildren(){this.guiDestroyFuncs.forEach(e=>e()),this.guiDestroyFuncs.length=0,this.filterGuis.length=0}insertFilterMenu(e,t){const i=this.createBean(new s.yuY);return i.init({menuItemDef:{name:t,subMenu:[],cssClasses:["ag-multi-filter-menu-item"],menuItem:s.Y0b,menuItemParams:{cssClassPrefix:"ag-compact-menu-option",isCompact:!0}},level:0,isAnotherSubMenuOpen:()=>!1,childComponent:e,contextParams:{column:null,node:null,value:null}}).then(()=>{i.setParentComponent(this),this.guiDestroyFuncs.push(()=>this.destroyBean(i)),this.addManagedListener(i,s.yuY.EVENT_MENU_ITEM_ACTIVATED,e=>{this.lastActivatedMenuItem&&this.lastActivatedMenuItem!==e.menuItem&&this.lastActivatedMenuItem.deactivate(),this.lastActivatedMenuItem=e.menuItem});const e=i.getGui();return i.addManagedListener(e,"keydown",e=>{const{key:t}=e;switch(t){case s.DDm.UP:case s.DDm.RIGHT:case s.DDm.DOWN:case s.DDm.LEFT:e.preventDefault(),t===s.DDm.RIGHT&&i.openSubMenu(!0)}}),i.addManagedListener(e,"focusin",()=>i.activate()),i.addManagedListener(e,"focusout",()=>{i.isSubMenuOpen()||i.isSubMenuOpening()||i.deactivate()}),i})}insertFilterGroup(e,t){const i=this.createBean(new s.Pk_({title:t,cssIdentifier:"multi-filter"}));return this.guiDestroyFuncs.push(()=>this.destroyBean(i)),i.addItem(e.getGui()),i.toggleGroupExpand(!1),e.afterGuiAttached&&i.addManagedListener(i,s.Pk_.EVENT_EXPANDED,()=>e.afterGuiAttached({container:this.lastOpenedInContainer,suppressFocus:!0,hidePopup:this.hidePopup})),i}isFilterActive(){return this.filters.some(e=>e.isFilterActive())}getLastActiveFilterIndex(){return this.activeFilterIndices.length>0?this.activeFilterIndices[this.activeFilterIndices.length-1]:null}doesFilterPass(e,t){let i=!0;return this.filters.forEach(n=>{i&&n!==t&&n.isFilterActive()&&(i=n.doesFilterPass(e))}),i}getFilterType(){return"multi"}getModelFromUi(){return{filterType:this.getFilterType(),filterModels:this.filters.map(e=>{const t=e;return"function"==typeof t.getModelFromUi?t.getModelFromUi():null})}}getModel(){return this.isFilterActive()?{filterType:this.getFilterType(),filterModels:this.filters.map(e=>e.isFilterActive()?e.getModel():null)}:null}setModel(e){const t=(e,t)=>new s.oY$(i=>{const n=e.setModel(t);n?n.then(()=>i()):i()});let i=[];return null==e?i=this.filters.map((e,i)=>t(e,null).then(()=>{this.updateActiveList(i)})):this.filters.forEach((n,s)=>{const r=e.filterModels.length>s?e.filterModels[s]:null,o=t(n,r).then(()=>{this.updateActiveList(s)});i.push(o)}),s.oY$.all(i).then(()=>{})}applyModel(e="api"){let t=!1;return this.filters.forEach(i=>{i instanceof s.Q5x&&(t=i.applyModel(e)||t)}),t}getChildFilterInstance(e){return this.filters[e]}afterGuiAttached(e){let t;e?(this.hidePopup=e.hidePopup,t=this.refreshGui(e.container)):(this.hidePopup=void 0,t=s.oY$.resolve()),t.then(()=>{const{filterDefs:t}=this;let i=!1;t&&s._.forEachReverse(t,(t,n)=>{var s;const r=0===n,o=!r||"inline"!==t.display,a=PT(kT({},null!=e?e:{}),{suppressFocus:o}),l=null==(s=this.filters)?void 0:s[n];if(l&&(this.executeFunctionIfExistsOnFilter(l,"afterGuiAttached",a),r&&(i=!0)),r&&o){const e=this.filterGuis[n];e&&(e.focus(),i=!0)}});const n=this.gos.getDocument(),r=this.gos.getActiveDomElement();i||r&&r!==n.body&&!this.getGui().contains(r)||this.forceFocusOutOfContainer(!0)})}afterGuiDetached(){this.executeFunctionIfExists("afterGuiDetached")}onAnyFilterChanged(){this.executeFunctionIfExists("onAnyFilterChanged")}onNewRowsLoaded(){this.executeFunctionIfExists("onNewRowsLoaded")}destroy(){this.filters.forEach(e=>this.destroyBean(e)),this.filters.length=0,this.destroyChildren(),this.hidePopup=void 0,super.destroy()}executeFunctionIfExists(e,...t){s._.forEachReverse(this.filters,i=>{this.executeFunctionIfExistsOnFilter(i,e,t)})}executeFunctionIfExistsOnFilter(e,t,...i){const n=e[t];"function"==typeof n&&n.apply(e,i)}createFilter(e,t){const{filterModifiedCallback:i,doesRowPassOtherFilter:n}=this.params;let s;const r=PT(kT({},this.filterManager.createFilterParams(this.column,this.column.getColDef())),{filterModifiedCallback:i,filterChangedCallback:e=>{this.executeWhenAllFiltersReady(()=>this.filterChanged(t,e))},doesRowPassOtherFilter:e=>n(e)&&this.doesFilterPass({node:e,data:e.data},s)}),o=this.userComponentFactory.getFilterDetails(e,r,"agTextColumnFilter");if(!o)return null;const a=o.newAgStackInstance();return a&&a.then(e=>s=e),a}executeWhenAllFiltersReady(e){this.filters&&this.filters.length>0?e():this.afterFiltersReadyFuncs.push(e)}updateActiveList(e){const t=this.filters[e];s._.removeFromArray(this.activeFilterIndices,e),t.isFilterActive()&&this.activeFilterIndices.push(e)}filterChanged(e,t){this.updateActiveList(e),this.filterChangedCallback(t);const i=this.filters[e];this.filters.forEach(e=>{e!==i&&"function"==typeof e.onAnyFilterChanged&&e.onAnyFilterChanged()})}onFocusIn(e){null==this.lastActivatedMenuItem||this.lastActivatedMenuItem.getGui().contains(e.target)||(this.lastActivatedMenuItem.deactivate(),this.lastActivatedMenuItem=null)}getModelAsString(e){var t,i,n,s;if(!this.filters||!(null==(t=null==e?void 0:e.filterModels)?void 0:t.length))return"";const r=null!=(i=this.getLastActiveFilterIndex())?i:0,o=this.filters[r];return null!=(s=null==(n=o.getModelAsString)?void 0:n.call(o,e.filterModels[r]))?s:""}};NT([(0,s.dsm)("filterManager")],OT.prototype,"filterManager",2),NT([(0,s.dsm)("userComponentFactory")],OT.prototype,"userComponentFactory",2),NT([s.o7C],OT.prototype,"postConstruct",1);var _T=OT,FT=class extends s.uAl{constructor(){super('<div class="ag-multi-floating-filter ag-floating-filter-input"></div>'),this.floatingFilters=[],this.compDetailsList=[]}init(e){this.params=e;const{compDetailsList:t}=this.getCompDetailsList(e);return this.setParams(t)}setParams(e){const t=[];return e.forEach(e=>{const i=null==e?void 0:e.newAgStackInstance();null!=i&&(this.compDetailsList.push(e),t.push(i))}),s.oY$.all(t).then(e=>{e.forEach((e,t)=>{this.floatingFilters.push(e);const i=e.getGui();this.appendChild(i),t>0&&s._.setDisplayed(i,!1)})})}onParamsUpdated(e){this.refresh(e)}refresh(e){this.params=e;const{compDetailsList:t,floatingFilterParamsList:i}=this.getCompDetailsList(e);t.length===this.compDetailsList.length&&t.every((e,t)=>!this.filterManager.areFilterCompsDifferent(this.compDetailsList[t],e))?i.forEach((e,t)=>{var i;const n=this.floatingFilters[t];let s=!1;n.refresh&&null!==n.refresh(e)&&(s=!0),s||null==(i=n.onParamsUpdated)||i.call(n,e)}):(s._.clearElement(this.getGui()),this.destroyBeans(this.floatingFilters),this.floatingFilters=[],this.compDetailsList=[],this.setParams(t))}getCompDetailsList(e){const t=[],i=[],n=e.filterParams;return _T.getFilterDefs(n).forEach((n,r)=>{const o=PT(kT({},e),{parentFilterInstance:e=>{this.parentMultiFilterInstance(t=>{const i=t.getChildFilterInstance(r);null!=i&&e(i)})}});s._.mergeDeep(o.filterParams,n.filterParams);const a=this.getCompDetails(n,o);a&&(t.push(a),i.push(o))}),{compDetailsList:t,floatingFilterParamsList:i}}onParentModelChanged(e,t){t&&t.afterFloatingFilter||this.parentMultiFilterInstance(i=>{if(null==e)this.floatingFilters.forEach((e,i)=>{e.onParentModelChanged(null,t),s._.setDisplayed(e.getGui(),0===i)});else{const n=i.getLastActiveFilterIndex();this.floatingFilters.forEach((i,r)=>{const o=e.filterModels.length>r?e.filterModels[r]:null;i.onParentModelChanged(o,t);const a=null==n?0===r:r===n;s._.setDisplayed(i.getGui(),a)})}})}destroy(){this.destroyBeans(this.floatingFilters),this.floatingFilters.length=0,super.destroy()}getCompDetails(e,t){var i;let n=null!=(i=this.userComponentFactory.getDefaultFloatingFilterType(e,()=>this.filterManager.getDefaultFloatingFilter(this.params.column)))?i:"agReadOnlyFloatingFilter";return this.userComponentFactory.getFloatingFilterCompDetails(e,t,n)}parentMultiFilterInstance(e){this.params.parentFilterInstance(t=>{if(!(t instanceof _T))throw new Error("AG Grid - MultiFloatingFilterComp expects MultiFilter as its parent");e(t)})}};NT([(0,s.dsm)("userComponentFactory")],FT.prototype,"userComponentFactory",2),NT([(0,s.dsm)("filterManager")],FT.prototype,"filterManager",2);var GT={version:"31.3.4",moduleName:s.zsj.MultiFilterModule,beans:[],userComponents:[{componentName:"agMultiColumnFilter",componentClass:_T},{componentName:"agMultiColumnFloatingFilter",componentClass:FT}],dependantModules:[fm]},VT=class extends s.yGC{constructor(){super('<div class="ag-cell-edit-wrapper"></div>')}init(e){this.params=e;const{cellStartedEdit:t,cellHeight:i,values:n}=e;s._.missing(n)&&console.warn("AG Grid: agRichSelectCellEditor requires cellEditorParams.values to be set");const{params:r,valuesPromise:o}=this.buildRichSelectParams();this.richSelect=this.createManagedBean(new s.pNP(r)),this.richSelect.addCssClass("ag-cell-editor"),this.appendChild(this.richSelect),o&&o.then(e=>{this.richSelect.setValueList({valueList:e,refresh:!0});const t=this.getSearchStringCallback(e);t&&this.richSelect.setSearchStringCreator(t)}),this.addManagedListener(this.richSelect,s.sVA.EVENT_FIELD_PICKER_VALUE_SELECTED,this.onEditorPickerValueSelected.bind(this)),this.addManagedListener(this.richSelect.getGui(),"focusout",this.onEditorFocusOut.bind(this)),this.focusAfterAttached=t,s._.exists(i)&&this.richSelect.setRowHeight(i)}onEditorPickerValueSelected(e){this.params.stopEditing(!e.fromEnterKey)}onEditorFocusOut(e){this.richSelect.getGui().contains(e.relatedTarget)||this.params.stopEditing(!0)}buildRichSelectParams(){const{cellRenderer:e,value:t,values:i,formatValue:n,searchDebounceDelay:s,valueListGap:r,valueListMaxHeight:o,valueListMaxWidth:a,allowTyping:l,filterList:c,searchType:h,highlightMatch:d,valuePlaceholder:u,eventKey:p}=this.params,g={value:t,cellRenderer:e,searchDebounceDelay:s,valueFormatter:n,pickerAriaLabelKey:"ariaLabelRichSelectField",pickerAriaLabelValue:"Rich Select Field",pickerType:"virtual-list",pickerGap:r,allowTyping:l,filterList:c,searchType:h,highlightMatch:d,maxPickerHeight:o,maxPickerWidth:a,placeholder:u,initialInputValue:1===(null==p?void 0:p.length)?p:void 0};let f,m;return f="function"==typeof i?i(this.params):null!=i?i:[],Array.isArray(f)?(g.valueList=f,g.searchStringCreator=this.getSearchStringCallback(f)):m=f,{params:g,valuesPromise:m}}getSearchStringCallback(e){const{colDef:t}=this.params;if("object"==typeof e[0]&&t.keyCreator)return e=>e.map(e=>{const i=this.gos.addGridCommonParams({value:e,colDef:this.params.colDef,column:this.params.column,node:this.params.node,data:this.params.data});return t.keyCreator(i)})}afterGuiAttached(){const{focusAfterAttached:e,params:t}=this;setTimeout(()=>{if(!this.isAlive())return;if(e){const e=this.richSelect.getFocusableElement();e.focus();const{allowTyping:t,eventKey:i}=this.params;!t||i&&1===i.length||e.select()}this.richSelect.showPicker();const{eventKey:i}=t;i&&1===(null==i?void 0:i.length)&&this.richSelect.searchTextFromString(i)})}getValue(){return this.richSelect.getValue()}isPopup(){return!1}},BT={version:"31.3.4",moduleName:s.zsj.RichSelectModule,beans:[],userComponents:[{componentName:"agRichSelect",componentClass:VT},{componentName:"agRichSelectCellEditor",componentClass:VT}],dependantModules:[fm]},HT=Object.defineProperty,zT=Object.defineProperties,UT=Object.getOwnPropertyDescriptor,WT=Object.getOwnPropertyDescriptors,jT=Object.getOwnPropertySymbols,KT=Object.prototype.hasOwnProperty,$T=Object.prototype.propertyIsEnumerable,YT=(e,t,i)=>t in e?HT(e,t,{enumerable:!0,configurable:!0,writable:!0,value:i}):e[t]=i,qT=(e,t)=>{for(var i in t||(t={}))KT.call(t,i)&&YT(e,i,t[i]);if(jT)for(var i of jT(t))$T.call(t,i)&&YT(e,i,t[i]);return e},XT=(e,t)=>{var i={};for(var n in e)KT.call(e,n)&&t.indexOf(n)<0&&(i[n]=e[n]);if(null!=e&&jT)for(var n of jT(e))t.indexOf(n)<0&&$T.call(e,n)&&(i[n]=e[n]);return i},ZT=(e,t,i,n)=>{for(var s,r=n>1?void 0:n?UT(t,i):t,o=e.length-1;o>=0;o--)(s=e[o])&&(r=(n?s(t,i,r):s(r))||r);return n&&r&&HT(t,i,r),r},QT=class extends s.iEP{constructor(e,t,i){super(0),this.nodeIdSequence=new s.RI_,this.info={},this.ssrmParams=e,this.parentRowNode=i,this.level=i.level+1,this.groupLevel=e.rowGroupCols?this.level<e.rowGroupCols.length:void 0,this.leafGroup=!!e.rowGroupCols&&this.level===e.rowGroupCols.length-1}postConstruct(){if(this.usingTreeData=this.gos.get("treeData"),this.nodeIdPrefix=this.blockUtils.createNodeIdPrefix(this.parentRowNode),!this.usingTreeData&&this.groupLevel){const e=this.ssrmParams.rowGroupCols[this.level];this.groupField=e.field,this.rowGroupColumn=this.columnModel.getRowGroupColumns()[this.level]}let e=1;const t=-1===this.parentRowNode.level,i=this.storeUtils.getServerSideInitialRowCount();t&&null!=i&&(e=i),this.initialiseRowNodes(e),this.rowNodeBlockLoader.addBlock(this),this.addDestroyFunc(()=>this.rowNodeBlockLoader.removeBlock(this)),this.postSortFunc=this.gos.getCallback("postSortRows"),null!=i&&this.eventService.dispatchEventOnce({type:s.sVA.EVENT_ROW_COUNT_READY})}destroyRowNodes(){this.blockUtils.destroyRowNodes(this.allRowNodes),this.allRowNodes=[],this.nodesAfterSort=[],this.nodesAfterFilter=[],this.allNodesMap={}}initialiseRowNodes(e,t=!1){this.destroyRowNodes();for(let i=0;i<e;i++){const e=this.blockUtils.createRowNode({field:this.groupField,group:this.groupLevel,leafGroup:this.leafGroup,level:this.level,parent:this.parentRowNode,rowGroupColumn:this.rowGroupColumn});t&&(e.failedLoad=!0),this.allRowNodes.push(e),this.nodesAfterFilter.push(e),this.nodesAfterSort.push(e)}}getBlockStateJson(){return{id:this.nodeIdPrefix?this.nodeIdPrefix:"",state:this.getState()}}loadFromDatasource(){this.storeUtils.loadFromDatasource({startRow:void 0,endRow:void 0,parentBlock:this,parentNode:this.parentRowNode,storeParams:this.ssrmParams,success:this.success.bind(this,this.getVersion()),fail:this.pageLoadFailed.bind(this,this.getVersion())})}getStartRow(){return 0}getEndRow(){return this.nodesAfterSort.length}createDataNode(e,t){const i=this.blockUtils.createRowNode({field:this.groupField,group:this.groupLevel,leafGroup:this.leafGroup,level:this.level,parent:this.parentRowNode,rowGroupColumn:this.rowGroupColumn});null!=t?s._.insertIntoArray(this.allRowNodes,i,t):this.allRowNodes.push(i);const n=this.prefixId(this.nodeIdSequence.next());return this.blockUtils.setDataIntoRowNode(i,e,n,void 0),this.nodeManager.addRowNode(i),this.blockUtils.checkOpenByDefault(i),this.allNodesMap[i.id]=i,i}prefixId(e){return this.nodeIdPrefix?this.nodeIdPrefix+"-"+e:e.toString()}processServerFail(){this.initialiseRowNodes(1,!0),this.fireStoreUpdatedEvent(),this.flushAsyncTransactions()}processServerResult(e){if(!this.isAlive())return;const t=e.groupLevelInfo;t&&Object.assign(this.info,t),e.pivotResultFields&&this.serverSideRowModel.generateSecondaryColumns(e.pivotResultFields);const i=this.allRowNodes.length>0?this.allNodesMap:void 0;this.allRowNodes=[],this.nodesAfterSort=[],this.nodesAfterFilter=[],this.allNodesMap={},e.rowData||s._.warnOnce('"params.data" is missing from Server-Side Row Model success() callback. Please use the "data" attribute. If no data is returned, set an empty list.'),this.createOrRecycleNodes(i,e.rowData),i&&this.blockUtils.destroyRowNodes(s._.getAllValuesInObject(i)),0===this.level&&this.eventService.dispatchEventOnce({type:s.sVA.EVENT_ROW_COUNT_READY}),this.filterAndSortNodes(),this.fireStoreUpdatedEvent(),this.flushAsyncTransactions()}createOrRecycleNodes(e,t){if(!t)return;const i=t=>{if(!e)return;const i=this.gos.getCallback("getRowId");if(!i)return;const n=this.parentRowNode.getGroupKeys(),s=this.level,r=i({data:t,parentKeys:n.length>0?n:void 0,level:s}),o=e[r];return o?(delete e[r],o):void 0},n=(e,t)=>{this.allNodesMap[e.id]=e,this.blockUtils.updateDataIntoRowNode(e,t),this.allRowNodes.push(e)};t.forEach(e=>{const t=i(e);t?n(t,e):this.createDataNode(e)})}flushAsyncTransactions(){window.setTimeout(()=>this.transactionManager.flushAsyncTransactions(),0)}filterAndSortNodes(){this.filterRowNodes(),this.sortRowNodes()}sortRowNodes(){const e=this.storeUtils.isServerSideSortAllLevels()||this.storeUtils.isServerSideSortOnServer(),t=this.sortController.getSortOptions(),i=!t||0==t.length;if(e||i)this.nodesAfterSort=this.nodesAfterFilter;else if(this.nodesAfterSort=this.rowNodeSorter.doFullSort(this.nodesAfterFilter,t),this.postSortFunc){const e={nodes:this.nodesAfterSort};this.postSortFunc(e)}}filterRowNodes(){const e=!this.storeUtils.isServerSideOnlyRefreshFilteredGroups()||this.storeUtils.isServerSideFilterOnServer(),t=this.groupLevel;this.nodesAfterFilter=e||t?this.allRowNodes:this.allRowNodes.filter(e=>this.filterManager.doesRowPassFilter({rowNode:e}))}clearDisplayIndexes(){this.displayIndexStart=void 0,this.displayIndexEnd=void 0,this.allRowNodes.forEach(e=>this.blockUtils.clearDisplayIndex(e))}getDisplayIndexEnd(){return this.displayIndexEnd}isDisplayIndexInStore(e){return 0!==this.getRowCount()&&e>=this.displayIndexStart&&e<this.displayIndexEnd}setDisplayIndexes(e,t){this.displayIndexStart=e.peek(),this.topPx=t.value;const i={};this.nodesAfterSort.forEach(n=>{this.blockUtils.setDisplayIndex(n,e,t),i[n.id]=!0}),this.allRowNodes.forEach(e=>{i[e.id]||this.blockUtils.clearDisplayIndex(e)}),this.displayIndexEnd=e.peek(),this.heightPx=t.value-this.topPx}forEachStoreDeep(e,t=new s.RI_){e(this,t.next()),this.allRowNodes.forEach(i=>{const n=i.childStore;n&&n.forEachStoreDeep(e,t)})}forEachNodeDeep(e,t=new s.RI_){this.allRowNodes.forEach(i=>{e(i,t.next());const n=i.childStore;n&&n.forEachNodeDeep(e,t)})}forEachNodeDeepAfterFilterAndSort(e,t=new s.RI_,i=!1){this.nodesAfterSort.forEach(n=>{e(n,t.next());const s=n.childStore;s&&s.forEachNodeDeepAfterFilterAndSort(e,t,i)}),i&&this.parentRowNode.sibling&&e(this.parentRowNode.sibling,t.next())}getRowUsingDisplayIndex(e){if(this.isDisplayIndexInStore(e))return this.blockUtils.binarySearchForDisplayIndex(e,this.nodesAfterSort)}getRowBounds(e){for(let t=0;t<this.nodesAfterSort.length;t++){const i=this.nodesAfterSort[t],n=this.blockUtils.extractRowBounds(i,e);if(n)return n}return null}isPixelInRange(e){return e>=this.topPx&&e<this.topPx+this.heightPx}getRowIndexAtPixel(e){if(e<=this.topPx)return this.nodesAfterSort[0].rowIndex;if(e>=this.topPx+this.heightPx){const t=this.nodesAfterSort[this.nodesAfterSort.length-1],i=t.rowTop+t.rowHeight;if(e>=i&&t.expanded){if(t.childStore&&t.childStore.getRowCount()>0)return t.childStore.getRowIndexAtPixel(e);if(t.detailNode)return t.detailNode.rowIndex}return t.rowIndex}let t=null;return this.nodesAfterSort.forEach(i=>{const n=this.blockUtils.getIndexAtPixel(i,e);null!=n&&(t=n)}),null==t?this.displayIndexEnd-1:t}getChildStore(e){return this.storeUtils.getChildStore(e,this,e=>this.allRowNodes.find(t=>t.key==e))}forEachChildStoreShallow(e){this.allRowNodes.forEach(t=>{const i=t.childStore;i&&e(i)})}refreshAfterFilter(e){const t=this.storeUtils.isServerSideFilterOnServer(),i=this.storeUtils.isServerRefreshNeeded(this.parentRowNode,this.ssrmParams.rowGroupCols,e);if(!this.storeUtils.isServerSideOnlyRefreshFilteredGroups()||t&&i)return this.refreshStore(!0),void this.sortRowNodes();this.filterRowNodes(),this.sortRowNodes(),this.forEachChildStoreShallow(t=>t.refreshAfterFilter(e))}refreshAfterSort(e){const t=this.storeUtils.isServerSideSortOnServer(),i=this.storeUtils.isServerRefreshNeeded(this.parentRowNode,this.ssrmParams.rowGroupCols,e);if(this.storeUtils.isServerSideSortAllLevels()||t&&i)return this.refreshStore(!0),void this.filterRowNodes();this.filterRowNodes(),this.sortRowNodes(),this.forEachChildStoreShallow(t=>t.refreshAfterSort(e))}applyTransaction(e){switch(this.getState()){case s.iEP.STATE_FAILED:return{status:s.a8A.StoreLoadingFailed};case s.iEP.STATE_LOADING:return{status:s.a8A.StoreLoading};case s.iEP.STATE_WAITING_TO_LOAD:return{status:s.a8A.StoreWaitingToLoad}}const t=this.gos.getCallback("isApplyServerSideTransaction");if(t&&!t({transaction:e,parentNode:this.parentRowNode,groupLevelInfo:this.info}))return{status:s.a8A.Cancelled};const i={status:s.a8A.Applied,remove:[],update:[],add:[]},n=[];return this.executeAdd(e,i),this.executeRemove(e,i,n),this.executeUpdate(e,i,n),this.filterAndSortNodes(),this.updateSelection(n),i}updateSelection(e){if(e.length>0){this.selectionService.setNodesSelected({newValue:!1,nodes:e,suppressFinishActions:!0,clearSelection:!1,source:"rowDataChanged"});const t={type:s.sVA.EVENT_SELECTION_CHANGED,source:"rowDataChanged"};this.eventService.dispatchEvent(t)}}executeAdd(e,t){const{add:i,addIndex:n}=e;s._.missingOrEmpty(i)||("number"==typeof n&&n>=0?i.reverse().forEach(e=>{const i=this.createDataNode(e,n);t.add.push(i)}):i.forEach(e=>{const i=this.createDataNode(e);t.add.push(i)}))}executeRemove(e,t,i){const{remove:n}=e;if(null==n)return;const s={};n.forEach(e=>{const n=this.lookupRowNode(e);n&&(n.isSelected()&&i.push(n),n.clearRowTopAndRowIndex(),s[n.id]=!0,delete this.allNodesMap[n.id],t.remove.push(n),this.nodeManager.removeNode(n))}),this.allRowNodes=this.allRowNodes.filter(e=>!s[e.id])}executeUpdate(e,t,i){const{update:n}=e;null!=n&&n.forEach(e=>{const n=this.lookupRowNode(e);n&&(this.blockUtils.updateDataIntoRowNode(n,e),!n.selectable&&n.isSelected()&&i.push(n),t.update.push(n))})}lookupRowNode(e){const t=this.gos.getCallback("getRowId");let i;if(null!=t){const n=this.level,s=this.parentRowNode.getGroupKeys(),r=t({data:e,parentKeys:s.length>0?s:void 0,level:n});if(i=this.allNodesMap[r],!i)return console.error(`AG Grid: could not find row id=${r}, data item was not found for this id`),null}else if(i=this.allRowNodes.find(t=>t.data===e),!i)return console.error("AG Grid: could not find data item as object was not found",e),null;return i}addStoreStates(e){e.push({suppressInfiniteScroll:!0,route:this.parentRowNode.getGroupKeys(),rowCount:this.allRowNodes.length,info:this.info}),this.forEachChildStoreShallow(t=>t.addStoreStates(e))}refreshStore(e){if(e){const e=this.nodesAfterSort?this.nodesAfterSort.length:1;this.initialiseRowNodes(e)}this.scheduleLoad(),this.fireStoreUpdatedEvent()}retryLoads(){this.getState()===s.iEP.STATE_FAILED&&(this.initialiseRowNodes(1),this.scheduleLoad()),this.forEachChildStoreShallow(e=>e.retryLoads())}scheduleLoad(){this.setStateWaitingToLoad(),this.rowNodeBlockLoader.checkBlockToLoad()}fireStoreUpdatedEvent(){const e={type:s.sVA.EVENT_STORE_UPDATED};this.eventService.dispatchEvent(e)}getRowCount(){return this.nodesAfterSort.length}getTopLevelRowDisplayedIndex(e){return this.nodesAfterSort[e].rowIndex}isLastRowIndexKnown(){return this.getState()==s.iEP.STATE_LOADED}getRowNodesInRange(e,t){const i=[];let n=!1;return s._.missing(e)&&(n=!0),this.nodesAfterSort.forEach(s=>{const r=s===e||s===t;(n||r)&&i.push(s),r&&(n=!n)}),n?[]:i}getStoreBounds(){return{topPx:this.topPx,heightPx:this.heightPx}}};ZT([(0,s.dsm)("ssrmStoreUtils")],QT.prototype,"storeUtils",2),ZT([(0,s.dsm)("ssrmBlockUtils")],QT.prototype,"blockUtils",2),ZT([(0,s.dsm)("columnModel")],QT.prototype,"columnModel",2),ZT([(0,s.dsm)("rowNodeBlockLoader")],QT.prototype,"rowNodeBlockLoader",2),ZT([(0,s.dsm)("rowNodeSorter")],QT.prototype,"rowNodeSorter",2),ZT([(0,s.dsm)("sortController")],QT.prototype,"sortController",2),ZT([(0,s.dsm)("selectionService")],QT.prototype,"selectionService",2),ZT([(0,s.dsm)("ssrmNodeManager")],QT.prototype,"nodeManager",2),ZT([(0,s.dsm)("filterManager")],QT.prototype,"filterManager",2),ZT([(0,s.dsm)("ssrmTransactionManager")],QT.prototype,"transactionManager",2),ZT([(0,s.dsm)("rowModel")],QT.prototype,"serverSideRowModel",2),ZT([s.o7C],QT.prototype,"postConstruct",1),ZT([s.yah],QT.prototype,"destroyRowNodes",1);var JT=class{constructor(...e){if(e.length<1)throw new Error("AG Grid: At least one index must be provided.");this.indexes=e,this.maps=new Map(this.indexes.map(e=>[e,new Map]))}getSize(){return this.maps.get(this.indexes[0]).size}getBy(e,t){const i=this.maps.get(e);if(!i)throw new Error(`AG Grid: ${String(e)} not found`);return i.get(t)}set(e){this.indexes.forEach(t=>{const i=this.maps.get(t);if(!i)throw new Error(`AG Grid: ${String(t)} not found`);i.set(e[t],e)})}delete(e){this.indexes.forEach(t=>{const i=this.maps.get(t);if(!i)throw new Error(`AG Grid: ${String(t)} not found`);i.delete(e[t])})}clear(){this.maps.forEach(e=>e.clear())}getIterator(e){const t=this.maps.get(e);if(!t)throw new Error(`AG Grid: ${String(e)} not found`);return t.values()}forEach(e){const t=this.getIterator(this.indexes[0]);let i;for(;(i=t.next())&&!i.done;)e(i.value)}find(e){const t=this.getIterator(this.indexes[0]);let i;for(;(i=t.next())&&!i.done;)if(e(i.value))return i.value}filter(e){const t=this.getIterator(this.indexes[0]);let i;const n=[];for(;(i=t.next())&&!i.done;)e(i.value)&&n.push(i.value);return n}},eD=class extends s.XQb{constructor(){super(...arguments),this.cacheLoadingNodesMap=new Map,this.isCheckQueued=!1,this.nextBlockToLoad=void 0}init(){this.addManagedListener(this.rowNodeBlockLoader,s.RRV.BLOCK_LOADED_EVENT,()=>this.queueLoadCheck())}subscribe(e){this.cacheLoadingNodesMap.set(e,new Set)}unsubscribe(e){this.cacheLoadingNodesMap.delete(e)}queueLoadCheck(){this.isCheckQueued||(this.isCheckQueued=!0,window.queueMicrotask(()=>{this.queueLoadAction(),this.isCheckQueued=!1}))}queueLoadAction(){const e=this.getBlockToLoad();if(!e)return;const t=this.nextBlockToLoad&&this.nextBlockToLoad.cache===e.cache&&this.nextBlockToLoad.index===e.index;if(!(t||this.nextBlockToLoad&&t)){this.nextBlockToLoad=e,window.clearTimeout(this.loaderTimeout);const t=Number(this.nextBlockToLoad.index),i=this.nextBlockToLoad.cache,n=e.index+e.cache.getBlockSize();this.loaderTimeout=window.setTimeout(()=>{i.isAlive()&&(this.loaderTimeout=void 0,this.attemptLoad(i,t,n),this.nextBlockToLoad=void 0)},this.gos.get("blockLoadDebounceMillis"))}}attemptLoad(e,t,i){const n=this.rowNodeBlockLoader.getAvailableLoadingCount();null!=n&&0===n||(this.rowNodeBlockLoader.registerLoads(1),this.executeLoad(e,t,i),this.queueLoadCheck())}executeLoad(e,t,i){var n;const s=e.getSsrmParams(),r={startRow:t,endRow:i,rowGroupCols:s.rowGroupCols,valueCols:s.valueCols,pivotCols:s.pivotCols,pivotMode:s.pivotMode,groupKeys:e.store.getParentNode().getGroupKeys(),filterModel:s.filterModel,sortModel:s.sortModel},o=this.cacheLoadingNodesMap.get(e),a=()=>{for(let e=0;e<i-t;e++)o.delete(t+e)},l=this.gos.addGridCommonParams({request:r,success:n=>{this.rowNodeBlockLoader.loadComplete(),e.onLoadSuccess(t,i-t,n),a()},fail:()=>{this.rowNodeBlockLoader.loadComplete(),e.onLoadFailed(t,i-t),a()},parentNode:e.store.getParentNode()});(()=>{for(let e=0;e<i-t;e++)o.add(t+e)})(),null==(n=e.getSsrmParams().datasource)||n.getRows(l)}getBlockToLoad(){var e;const t=this.rowRenderer.getFirstVirtualRenderedRow(),i=this.rowRenderer.getLastVirtualRenderedRow();for(let e=t;e<=i;e++){const t=this.rowModel.getRow(e);if(!t)continue;const i=t.parent&&t.parent.childStore;if(!(i&&i instanceof iD))continue;const n=i.getCache(),s=n.getNodes().getBy("node",t);if(!s)continue;const r=this.cacheLoadingNodesMap.get(n);if(!(null==r?void 0:r.has(s.index))&&(t.__needsRefreshWhenVisible||t.stub&&!t.failedLoad))return{cache:n,index:n.getBlockStartIndex(s.index)}}let n=null,s=null,r=Number.MAX_SAFE_INTEGER;for(const e of this.cacheLoadingNodesMap.keys())e.getNodesToRefresh().forEach(o=>{if(null==o.rowIndex)return s=o,void(n=e);const a=e.getNodes().getBy("node",o);if(!a)return;const l=this.cacheLoadingNodesMap.get(e);if(null==l?void 0:l.has(a.index))return;const c=Math.abs(t-o.rowIndex),h=Math.abs(o.rowIndex-i);c<r&&(s=o,r=c,n=e),h<r&&(s=o,r=h,n=e)});if(!n)return;const o=n,a=null==(e=o.getNodes().getBy("node",s))?void 0:e.index;return null==a?void 0:{cache:o,index:o.getBlockStartIndex(a)}}isRowLoading(e,t){var i,n;return null!=(n=null==(i=this.cacheLoadingNodesMap.get(e))?void 0:i.has(t))&&n}};eD.DEFAULT_BLOCK_SIZE=100,ZT([(0,s.dsm)("rowNodeBlockLoader")],eD.prototype,"rowNodeBlockLoader",2),ZT([(0,s.dsm)("rowRenderer")],eD.prototype,"rowRenderer",2),ZT([(0,s.dsm)("rowModel")],eD.prototype,"rowModel",2),ZT([s.o7C],eD.prototype,"init",1),eD=ZT([(0,s.dR4)("lazyBlockLoadingService")],eD);var tD=class extends s.XQb{constructor(e,t,i){super(),this.live=!0,this.removedNodeCache=new Map,this.store=e,this.numberOfRows=t,this.isLastRowKnown=!1,this.storeParams=i}init(){this.lazyBlockLoadingService.subscribe(this),this.nodeMap=new JT("index","id","node"),this.nodeDisplayIndexMap=new Map,this.nodesToRefresh=new Set,this.defaultNodeIdPrefix=this.blockUtils.createNodeIdPrefix(this.store.getParentNode()),this.getRowIdFunc=this.gos.getCallback("getRowId"),this.isMasterDetail=this.gos.get("masterDetail")}destroyRowNodes(){this.lazyBlockLoadingService.unsubscribe(this),this.numberOfRows=0,this.nodeMap.forEach(e=>this.blockUtils.destroyRowNode(e.node)),this.nodeMap.clear(),this.nodeDisplayIndexMap.clear(),this.nodesToRefresh.clear(),this.live=!1}getRowByDisplayIndex(e){var t,i,n,s;if(!this.store.isDisplayIndexInStore(e))return;const r=this.nodeDisplayIndexMap.get(e);if(r)return(r.stub||r.__needsRefreshWhenVisible)&&this.lazyBlockLoadingService.queueLoadCheck(),r;if(e===this.store.getDisplayIndexStart())return this.createStubNode(0,e);const o=this.nodeDisplayIndexMap.get(e-1);if(o){if(this.isMasterDetail&&o.master&&o.expanded)return o.detailNode;if(o.expanded&&(null==(t=o.childStore)?void 0:t.isDisplayIndexInStore(e)))return null==(i=o.childStore)?void 0:i.getRowUsingDisplayIndex(e);const n=this.nodeMap.getBy("node",o);return this.createStubNode(n.index+1,e)}const a=this.getSurroundingNodesByDisplayIndex(e);if(null==a){const t=this.store.getRowCount()-(this.store.getDisplayIndexEnd()-e);return this.createStubNode(t,e)}const{previousNode:l,nextNode:c}=a;if(l&&l.node.expanded&&(null==(n=l.node.childStore)?void 0:n.isDisplayIndexInStore(e)))return null==(s=l.node.childStore)?void 0:s.getRowUsingDisplayIndex(e);if(c){const t=c.node.rowIndex-e,i=c.index-t;return this.createStubNode(i,e)}const h=this.store.getRowCount()-(this.store.getDisplayIndexEnd()-e);return this.createStubNode(h,e)}createStubNode(e,t){const i=this.store.getRowBounds(t),n=this.createRowAtIndex(e,null,e=>{e.setRowIndex(t),e.setRowTop(i.rowTop),this.nodeDisplayIndexMap.set(t,e)});return this.lazyBlockLoadingService.queueLoadCheck(),n}getRowByStoreIndex(e){var t;return null==(t=this.nodeMap.getBy("index",e))?void 0:t.node}skipDisplayIndexes(e,t,i){if(0===e)return;const n=this.gos.getRowHeightAsNumber();t.skip(e),i.value+=e*n}setDisplayIndexes(e,t){this.nodeDisplayIndexMap.clear();const i={};this.nodeMap.forEach(e=>{i[e.index]=e.node});let n=-1;for(const s in i){const r=i[s],o=Number(s),a=o-1-n;this.skipDisplayIndexes(a,e,t),this.blockUtils.setDisplayIndex(r,e,t),this.nodeDisplayIndexMap.set(r.rowIndex,r),n=o}const s=this.numberOfRows-1-n;this.skipDisplayIndexes(s,e,t),this.purgeExcessRows()}getRowCount(){return this.numberOfRows}setRowCount(e,t){if(e<0)throw new Error("AG Grid: setRowCount can only accept a positive row count.");this.numberOfRows=e,null!=t&&(this.isLastRowKnown=t,!1===t&&(this.numberOfRows+=1)),this.fireStoreUpdatedEvent()}getNodes(){return this.nodeMap}getNodeCachedByDisplayIndex(e){var t;return null!=(t=this.nodeDisplayIndexMap.get(e))?t:null}getNodesToRefresh(){return this.nodesToRefresh}getSurroundingNodesByDisplayIndex(e){let t,i;return this.nodeMap.forEach(n=>{e>n.node.rowIndex?(null==i||i.node.rowIndex<n.node.rowIndex)&&(i=n):(null==t||t.node.rowIndex>n.node.rowIndex)&&(t=n)}),i||t?{previousNode:i,nextNode:t}:null}getDisplayIndexFromStoreIndex(e){var t,i;const n=this.nodeMap.getBy("index",e);if(n)return n.node.rowIndex;let s,r;if(this.nodeMap.forEach(t=>{e>t.index?(null==r||r.index<t.index)&&(r=t):(null==s||s.index>t.index)&&(s=t)}),!s)return this.store.getDisplayIndexEnd()-(this.numberOfRows-e);if(!r)return this.store.getDisplayIndexStart()+e;const o=e-r.index;return(null!=(i=null==(t=r.node.childStore)?void 0:t.getDisplayIndexEnd())?i:r.node.rowIndex)+o}createRowAtIndex(e,t,i){var n,s;const r=this.nodeMap.getBy("index",e);if(r){const{node:i}=r;if(i.__needsRefreshWhenVisible=!1,this.doesNodeMatch(t,i))return this.blockUtils.updateDataIntoRowNode(i,t),this.nodesToRefresh.delete(i),i;if(null==this.getRowIdFunc&&i.hasChildren()&&i.expanded)return this.nodesToRefresh.delete(i),i;this.destroyRowAtIndex(e)}if(t&&null!=this.getRowIdFunc){const i=this.getRowId(t),r=i&&(null==(n=this.removedNodeCache)?void 0:n.get(i));if(r)return null==(s=this.removedNodeCache)||s.delete(i),this.blockUtils.updateDataIntoRowNode(r,t),this.nodeMap.set({id:r.id,node:r,index:e}),r;const o=this.nodeMap.getBy("id",i);if(o){this.nodeMap.delete(o);const{node:i,index:n}=o;return this.blockUtils.updateDataIntoRowNode(i,t),this.nodeMap.set({id:i.id,node:i,index:e}),this.nodesToRefresh.delete(i),this.getBlockStartIndex(n)===this.getBlockStartIndex(e)||this.markBlockForVerify(n),i}}const o=this.blockUtils.createRowNode(this.store.getRowDetails());if(null!=t){const e=this.getPrefixedId(this.store.getIdSequence().next());this.blockUtils.setDataIntoRowNode(o,t,e,void 0),this.serverSideRowModel.setPaused(!0),this.blockUtils.checkOpenByDefault(o),this.serverSideRowModel.setPaused(!1),this.nodeManager.addRowNode(o)}return this.nodeMap.set({id:o.id,node:o,index:e}),i&&i(o),o}getBlockStates(){const e={},t={};this.nodeMap.forEach(({node:i,index:n})=>{var s;const r=this.getBlockStartIndex(n);i.stub||i.failedLoad||(e[r]=(null!=(s=e[r])?s:0)+1);let o="loaded";i.failedLoad?o="failed":this.lazyBlockLoadingService.isRowLoading(this,r)?o="loading":(this.nodesToRefresh.has(i)||i.stub)&&(o="needsLoading"),t[r]||(t[r]=new Set),t[r].add(o)});const i={loading:4,failed:3,needsLoading:2,loaded:1},n=this.blockUtils.createNodeIdPrefix(this.store.getParentNode()),s={};return Object.entries(t).forEach(([t,r])=>{var o;const a=[...r].sort((e,t)=>{var n,s;return(null!=(n=i[e])?n:0)-(null!=(s=i[t])?s:0)})[0],l=Number(t)/this.getBlockSize(),c=n?`${n}-${l}`:String(l);s[c]={blockNumber:l,startRow:Number(t),endRow:Number(t)+this.getBlockSize(),pageStatus:a,loadedRowCount:null!=(o=e[t])?o:0}}),s}destroyRowAtIndex(e){const t=this.nodeMap.getBy("index",e);t&&(this.nodeMap.delete(t),this.nodeDisplayIndexMap.delete(t.node.rowIndex),this.nodesToRefresh.size>0?this.removedNodeCache.set(t.node.id,t.node):this.blockUtils.destroyRowNode(t.node),this.nodesToRefresh.delete(t.node))}getSsrmParams(){return this.store.getSsrmParams()}getPrefixedId(e){return this.defaultNodeIdPrefix?this.defaultNodeIdPrefix+"-"+e:e.toString()}markBlockForVerify(e){const[t,i]=this.getBlockBounds(e);this.nodeMap.filter(e=>e.index>=t&&e.index<i).forEach(({node:e})=>{e.__needsRefreshWhenVisible=!0})}doesNodeMatch(e,t){if(t.stub)return!1;if(null!=this.getRowIdFunc){const i=this.getRowId(e);return t.id===i}return t.data===e}purgeStubsOutsideOfViewport(){const e=this.api.getFirstDisplayedRowIndex(),t=this.api.getLastDisplayedRowIndex(),i=this.getBlockStartIndex(e),[n,s]=this.getBlockBounds(t);this.nodeMap.forEach(e=>{this.lazyBlockLoadingService.isRowLoading(this,e.index)||e.node.failedLoad||e.node.stub&&(e.index<i||e.index>s)&&this.destroyRowAtIndex(e.index)})}getBlocksDistanceFromRow(e,t){const i={};return e.forEach(({node:e,index:n})=>{const[s,r]=this.getBlockBounds(n);if(s in i)return;const o=Math.abs(e.rowIndex-t);let a;const l=this.nodeMap.getBy("index",[r-1]);l&&(a=Math.abs(l.node.rowIndex-t));const c=null==a||o<a?o:a;i[s]=c}),Object.entries(i)}purgeExcessRows(){var e;if(this.purgeStubsOutsideOfViewport(),null==this.store.getDisplayIndexEnd()||null==this.storeParams.maxBlocksInCache)return;const t=this.api.getFirstDisplayedRowIndex(),i=this.api.getLastDisplayedRowIndex(),n=new Set,s=new Set;this.nodeMap.forEach(({index:e,node:r})=>{const o=this.getBlockStartIndex(e);n.add(o),r.rowIndex>=t&&r.rowIndex<=i&&s.add(o)});const r=Math.max(s.size,null!=(e=this.storeParams.maxBlocksInCache)?e:0),o=n.size-r;if(o<=0)return;let a=Number.MAX_SAFE_INTEGER,l=Number.MIN_SAFE_INTEGER;s.forEach(e=>{a>e&&(a=e),l<e&&(l=e)});const c=this.nodeMap.filter(({node:e,index:t})=>{const i=this.getBlockStartIndex(t);return!(i>=a&&i<=l||this.isNodeCached(e))});if(0===c.length)return;const h=t+(i-t)/2,d=this.getBlocksDistanceFromRow(c,h),u=this.getBlockSize();d.sort((e,t)=>Math.sign(t[1]-e[1]));for(let e=0;e<Math.min(o,d.length);e++){const t=Number(d[e][0]);for(let e=t;e<t+u;e++){const t=this.nodeMap.getBy("index",e);t&&!this.isNodeCached(t.node)&&this.destroyRowAtIndex(e)}}}isNodeFocused(e){const t=this.focusService.getFocusCellToUseAfterRefresh();return!!t&&(null==t.rowPinned&&t.rowIndex===e.rowIndex)}isNodeCached(e){return e.isExpandable()&&e.expanded||this.isNodeFocused(e)}extractDuplicateIds(e){if(null==this.getRowIdFunc)return[];const t=new Set,i=new Set;return e.forEach(e=>{const n=this.getRowId(e);t.has(n)?i.add(n):t.add(n)}),[...i]}onLoadSuccess(e,t,i){if(!this.live)return;const n=i.groupLevelInfo;if(this.store.setStoreInfo(n),null!=this.getRowIdFunc){const n=this.extractDuplicateIds(i.rowData);if(n.length>0){const i=n.join(", ");return console.warn(`AG Grid: Unable to display rows as duplicate row ids (${i}) were returned by the getRowId callback. Please modify the getRowId callback to provide unique ids.`),void this.onLoadFailed(e,t)}}i.pivotResultFields&&this.serverSideRowModel.generateSecondaryColumns(i.pivotResultFields);const s=this.nodesToRefresh.size>0;if(i.rowData.forEach((t,i)=>{var n;const s=e+i,r=this.nodeMap.getBy("index",s);if(!(null==(n=null==r?void 0:r.node)?void 0:n.stub))return r&&this.doesNodeMatch(t,r.node)?(this.blockUtils.updateDataIntoRowNode(r.node,t),this.nodesToRefresh.delete(r.node),void(r.node.__needsRefreshWhenVisible=!1)):void this.createRowAtIndex(s,t);this.createRowAtIndex(s,t)}),null!=i.rowCount&&-1!==i.rowCount)this.numberOfRows=i.rowCount,this.isLastRowKnown=!0;else if(t>i.rowData.length)this.numberOfRows=e+i.rowData.length,this.isLastRowKnown=!0;else if(!this.isLastRowKnown){const t=e+i.rowData.length+1;t>this.numberOfRows&&(this.numberOfRows=t)}this.isLastRowKnown&&this.nodeMap.filter(e=>e.index>=this.numberOfRows).forEach(e=>this.destroyRowAtIndex(e.index)),this.fireStoreUpdatedEvent();const r=0===this.nodesToRefresh.size;s&&r&&this.fireRefreshFinishedEvent()}fireRefreshFinishedEvent(){0===this.nodesToRefresh.size&&(this.removedNodeCache.forEach(e=>{this.blockUtils.destroyRowNode(e)}),this.removedNodeCache=new Map,this.store.fireRefreshFinishedEvent())}isStoreFullyLoaded(){const e=this.isLastRowKnown,t=this.nodeMap.getSize()===this.numberOfRows;if(!e||!t)return;if(this.nodesToRefresh.size>0)return;let i=-1;return null==this.nodeMap.find(e=>(i+=1,e.index!==i||!!e.node.__needsRefreshWhenVisible||!!e.node.stub))}isLastRowIndexKnown(){return this.isLastRowKnown}onLoadFailed(e,t){var i;if(!this.live)return;const n=this.nodesToRefresh.size>0;for(let n=e;n<e+t&&n<this.getRowCount();n++){let{node:e}=null!=(i=this.nodeMap.getBy("index",n))?i:{};e&&this.nodesToRefresh.delete(e),e&&e.stub||(e&&!e.stub&&this.destroyRowAtIndex(n),e=this.createRowAtIndex(n)),e.__needsRefreshWhenVisible=!1,e.failedLoad=!0}const s=0===this.nodesToRefresh.size;n&&s&&this.fireRefreshFinishedEvent(),this.fireStoreUpdatedEvent()}markNodesForRefresh(){this.nodeMap.forEach(e=>{e.node.stub&&!e.node.failedLoad||this.nodesToRefresh.add(e.node)}),this.lazyBlockLoadingService.queueLoadCheck(),this.isLastRowKnown&&0===this.numberOfRows&&(this.numberOfRows=1,this.isLastRowKnown=!1,this.fireStoreUpdatedEvent())}isNodeInCache(e){return!!this.nodeMap.getBy("id",e)}fireStoreUpdatedEvent(){this.live&&this.store.fireStoreUpdatedEvent()}getRowId(e){if(null==this.getRowIdFunc)return null;const{level:t}=this.store.getRowDetails(),i=this.store.getParentNode().getGroupKeys(),n=this.getRowIdFunc({data:e,parentKeys:i.length>0?i:void 0,level:t});return String(n)}getOrderedNodeMap(){const e={};return this.nodeMap.forEach(t=>e[t.index]=t),e}clearDisplayIndexes(){this.nodeDisplayIndexMap.clear()}clientSideSortRows(){const e=this.sortController.getSortOptions();if(!e.some(e=>null!=e.sort))return;const t=new Array(this.nodeMap.getSize());this.nodeMap.forEach(e=>t[e.index]=e.node),this.nodeMap.clear(),this.rowNodeSorter.doFullSort(t,e).forEach((e,t)=>{this.nodeMap.set({id:e.id,node:e,index:t})})}updateRowNodes(e){if(null==this.getRowIdFunc)throw new Error("AG Grid: Transactions can only be applied when row ids are supplied.");const t=[];return e.forEach(e=>{const i=this.getRowId(e),n=this.nodeMap.getBy("id",i);n&&(this.blockUtils.updateDataIntoRowNode(n.node,e),t.push(n.node))}),t}insertRowNodes(e,t){const i=this.store.getRowCount()-(this.store.getParentNode().sibling?1:0),n=null==t&&this.isLastRowKnown?i:t;if(null==n||i<n)return[];if(null==this.getRowIdFunc)throw new Error("AG Grid: Transactions can only be applied when row ids are supplied.");const s={};e.forEach(e=>{const t=this.getRowId(e);t&&this.isNodeInCache(t)||(s[t]=e)});const r=Object.values(s);let o=r.length;if(0===o)return[];const a=this.nodeMap.filter(e=>e.index>=n);return a.forEach(e=>this.nodeMap.delete(e)),a.forEach(e=>{this.nodeMap.set({node:e.node,index:e.index+o,id:e.id})}),this.numberOfRows+=o,r.map((e,t)=>this.createRowAtIndex(n+t,e))}removeRowNodes(e){if(null==this.getRowIdFunc)throw new Error("AG Grid: Transactions can only be applied when row ids are supplied.");const t=[],i=[];let n=0;const s=[...e],r=this.getOrderedNodeMap();let o=-1;for(let e in r){o+=1;const a=r[e],l=s.findIndex(e=>e===a.id);if(-1!==l){s.splice(l,1),this.destroyRowAtIndex(Number(e)),t.push(a.node),n+=1;continue}if(0===n)continue;const c=Number(e);o!==c&&i.push(a.node),this.nodeMap.delete(r[e]),this.nodeMap.set({id:a.id,node:a.node,index:c-n})}return this.numberOfRows-=this.isLastRowIndexKnown()?e.length:n,s.length>0&&i.length>0&&(i.forEach(e=>e.__needsRefreshWhenVisible=!0),this.lazyBlockLoadingService.queueLoadCheck()),t}getBlockSize(){return this.storeParams.cacheBlockSize||eD.DEFAULT_BLOCK_SIZE}getBlockStartIndex(e){return e-e%this.getBlockSize()}getBlockBounds(e){const t=this.getBlockStartIndex(e);return[t,t+this.getBlockSize()]}};ZT([(0,s.dsm)("gridApi")],tD.prototype,"api",2),ZT([(0,s.dsm)("ssrmBlockUtils")],tD.prototype,"blockUtils",2),ZT([(0,s.dsm)("focusService")],tD.prototype,"focusService",2),ZT([(0,s.dsm)("ssrmNodeManager")],tD.prototype,"nodeManager",2),ZT([(0,s.dsm)("rowModel")],tD.prototype,"serverSideRowModel",2),ZT([(0,s.dsm)("rowNodeSorter")],tD.prototype,"rowNodeSorter",2),ZT([(0,s.dsm)("sortController")],tD.prototype,"sortController",2),ZT([(0,s.dsm)("lazyBlockLoadingService")],tD.prototype,"lazyBlockLoadingService",2),ZT([s.o7C],tD.prototype,"init",1),ZT([s.yah],tD.prototype,"destroyRowNodes",1);var iD=class extends s.XQb{constructor(e,t,i){super(),this.idSequence=new s.RI_,this.ssrmParams=e,this.parentRowNode=i,this.storeParams=t,this.level=i.level+1,this.group=!!e.rowGroupCols&&this.level<e.rowGroupCols.length,this.leafGroup=!!e.rowGroupCols&&this.level===e.rowGroupCols.length-1,this.info={}}init(){var e;let t=1;if(0===this.level&&(t=null!=(e=this.storeUtils.getServerSideInitialRowCount())?e:1,this.eventService.dispatchEventOnce({type:s.sVA.EVENT_ROW_COUNT_READY})),this.cache=this.createManagedBean(new tD(this,t,this.storeParams)),!this.gos.get("treeData")&&this.group){const e=this.ssrmParams.rowGroupCols[this.level];this.groupField=e.field,this.rowGroupColumn=this.columnModel.getRowGroupColumns()[this.level]}}destroyRowNodes(){this.displayIndexStart=void 0,this.displayIndexEnd=void 0,this.destroyBean(this.cache)}applyRowData(e,t,i){this.cache.onLoadSuccess(t,i,e)}applyTransaction(e){var t,i,n;const r=this.gos.getCallback("getRowId");if(!r)return console.warn("AG Grid: getRowId callback must be implemented for transactions to work. Transaction was ignored."),{status:s.a8A.Cancelled};const o=this.gos.getCallback("isApplyServerSideTransaction");if(o&&!o({transaction:e,parentNode:this.parentRowNode,groupLevelInfo:this.info}))return{status:s.a8A.Cancelled};const a=this.cache.isStoreFullyLoaded();let l,c,h;if((null==(t=e.update)?void 0:t.length)&&(l=this.cache.updateRowNodes(e.update)),null==(i=e.add)?void 0:i.length){let t=e.addIndex;null!=t&&t<0&&(t=void 0),c=this.cache.insertRowNodes(e.add,t)}if(null==(n=e.remove)?void 0:n.length){const t=e.remove.map(e=>r({level:this.level,parentKeys:this.parentRowNode.getGroupKeys(),data:e})),i=[...new Set(t)];h=this.cache.removeRowNodes(i)}const d=this.gos.get("serverSideEnableClientSideSort"),u=(null==l?void 0:l.length)||(null==c?void 0:c.length);return a&&d&&u&&this.cache.clientSideSortRows(),this.updateSelectionAfterTransaction(l,h),{status:s.a8A.Applied,update:l,add:c,remove:h}}updateSelectionAfterTransaction(e,t){const i=[];null==e||e.forEach(e=>{e.isSelected()&&!e.selectable&&i.push(e)}),null==t||t.forEach(e=>{e.isSelected()&&i.push(e)}),i.length&&this.selectionService.setNodesSelected({newValue:!1,clearSelection:!1,nodes:i,source:"rowDataChanged"})}clearDisplayIndexes(){this.displayIndexStart=void 0,this.displayIndexEnd=void 0,this.cache.getNodes().forEach(e=>this.blockUtils.clearDisplayIndex(e.node)),this.parentRowNode.sibling&&this.blockUtils.clearDisplayIndex(this.parentRowNode.sibling),this.cache.clearDisplayIndexes()}getDisplayIndexStart(){return this.displayIndexStart}getDisplayIndexEnd(){return this.displayIndexEnd}getRowCount(){return this.parentRowNode.sibling?this.cache.getRowCount()+1:this.cache.getRowCount()}setRowCount(e,t){this.cache.setRowCount(e,t)}isDisplayIndexInStore(e){return 0!==this.cache.getRowCount()&&this.displayIndexStart<=e&&e<this.getDisplayIndexEnd()}setDisplayIndexes(e,t){this.displayIndexStart=e.peek(),this.topPx=t.value;const i=this.parentRowNode.level>-1&&this.gos.getGroupTotalRowCallback()({node:this.parentRowNode});i||this.parentRowNode.destroyFooter(),"top"===i&&(this.parentRowNode.createFooter(),this.blockUtils.setDisplayIndex(this.parentRowNode.sibling,e,t)),this.cache.setDisplayIndexes(e,t),"bottom"===i&&(this.parentRowNode.createFooter(),this.blockUtils.setDisplayIndex(this.parentRowNode.sibling,e,t)),this.displayIndexEnd=e.peek(),this.heightPx=t.value-this.topPx}forEachStoreDeep(e,t=new s.RI_){e(this,t.next()),this.cache.getNodes().forEach(i=>{const n=i.node.childStore;n&&n.forEachStoreDeep(e,t)})}forEachNodeDeep(e,t=new s.RI_){this.cache.getNodes().forEach(i=>{e(i.node,t.next());const n=i.node.childStore;n&&n.forEachNodeDeep(e,t)})}forEachNodeDeepAfterFilterAndSort(e,t=new s.RI_,i=!1){const n=this.parentRowNode.level>-1&&this.gos.getGroupTotalRowCallback()({node:this.parentRowNode});"top"===n&&e(this.parentRowNode.sibling,t.next());const r=this.cache.getOrderedNodeMap();for(let n in r){const s=r[n];e(s.node,t.next());const o=s.node.childStore;o&&o.forEachNodeDeepAfterFilterAndSort(e,t,i)}"bottom"===n&&e(this.parentRowNode.sibling,t.next())}retryLoads(){this.cache.getNodes().forEach(({node:e})=>{e.failedLoad&&(e.failedLoad=!1,e.__needsRefreshWhenVisible=!0,e.stub=!0)}),this.forEachChildStoreShallow(e=>e.retryLoads()),this.fireStoreUpdatedEvent()}getRowUsingDisplayIndex(e){return this.parentRowNode.sibling&&e===this.parentRowNode.sibling.rowIndex?this.parentRowNode.sibling:this.cache.getRowByDisplayIndex(e)}getRowBounds(e){var t;if(!this.isDisplayIndexInStore(e))return null;const i=this.cache.getNodeCachedByDisplayIndex(e);if(i){const t=this.blockUtils.extractRowBounds(i,e);if(t)return t}const{previousNode:n,nextNode:s}=null!=(t=this.cache.getSurroundingNodesByDisplayIndex(e))?t:{};if(n){const t=this.blockUtils.extractRowBounds(n.node,e);if(null!=t)return t}const r=this.gos.getRowHeightAsNumber();if(s){const t=(s.node.rowIndex-e)*r;return{rowTop:s.node.rowTop-t,rowHeight:r}}return{rowTop:this.topPx+this.heightPx-(this.getDisplayIndexEnd()-e)*r,rowHeight:r}}isPixelInRange(e){return e>=this.topPx&&e<this.topPx+this.heightPx}getRowIndexAtPixel(e){if(e<this.topPx)return this.getDisplayIndexStart();if(e>=this.topPx+this.heightPx)return this.getDisplayIndexEnd()-1;if(this.parentRowNode.sibling&&e>this.parentRowNode.sibling.rowTop&&e<this.parentRowNode.sibling.rowTop+this.parentRowNode.sibling.rowHeight)return this.parentRowNode.sibling.rowIndex;let t=Number.MAX_SAFE_INTEGER,i=null,n=Number.MAX_SAFE_INTEGER,s=null;if(this.cache.getNodes().forEach(({node:r})=>{const o=Math.abs(e-r.rowTop);r.rowTop<e?o<t&&(t=o,i=r):o<n&&(n=o,s=r)}),i){const t=this.blockUtils.getIndexAtPixel(i,e);if(null!=t)return t}const r=this.gos.getRowHeightAsNumber();if(s){const t=s.rowTop,i=Math.ceil((t-e)/r);return s.rowIndex-i}const o=this.topPx+this.heightPx,a=Math.floor((o-e)/r);return this.getDisplayIndexEnd()-a}getChildStore(e){return this.storeUtils.getChildStore(e,this,e=>{const t=this.cache.getNodes().find(t=>t.node.key==e);return t?t.node:null})}forEachChildStoreShallow(e){this.cache.getNodes().forEach(({node:t})=>{t.childStore&&e(t.childStore)})}refreshAfterSort(e){if(this.storeUtils.isServerSideSortAllLevels()||this.storeUtils.isServerRefreshNeeded(this.parentRowNode,this.ssrmParams.rowGroupCols,e)){const e=this.cache.isStoreFullyLoaded(),t=this.gos.get("serverSideEnableClientSideSort");if(!e||!t){const e=this.cache.getRowCount();return this.destroyBean(this.cache),void(this.cache=this.createManagedBean(new tD(this,e,this.storeParams)))}this.cache.clientSideSortRows()}this.forEachChildStoreShallow(t=>t.refreshAfterSort(e))}refreshAfterFilter(e){!this.storeUtils.isServerSideOnlyRefreshFilteredGroups()||this.storeUtils.isServerRefreshNeeded(this.parentRowNode,this.ssrmParams.rowGroupCols,e)?this.refreshStore(!0):this.forEachChildStoreShallow(t=>t.refreshAfterFilter(e))}refreshStore(e){if(e)return this.destroyBean(this.cache),this.cache=this.createManagedBean(new tD(this,1,this.storeParams)),void this.fireStoreUpdatedEvent();this.cache.markNodesForRefresh()}getTopLevelRowDisplayedIndex(e){const t=this.cache.getDisplayIndexFromStoreIndex(e);return null!=t?t:e}isLastRowIndexKnown(){return this.cache.isLastRowIndexKnown()}getRowNodesInRange(e,t){let i=!1;return s._.missing(e)&&!0,this.cache.getNodes().filter(({node:i})=>i.rowIndex>=e.rowIndex&&i.rowIndex<=t.rowIndex).map(({node:e})=>e)}addStoreStates(e){e.push({suppressInfiniteScroll:!1,route:this.parentRowNode.getGroupKeys(),rowCount:this.getRowCount(),lastRowIndexKnown:this.isLastRowIndexKnown(),info:this.info,maxBlocksInCache:this.storeParams.maxBlocksInCache,cacheBlockSize:this.storeParams.cacheBlockSize}),this.forEachChildStoreShallow(t=>t.addStoreStates(e))}getIdSequence(){return this.idSequence}getParentNode(){return this.parentRowNode}getRowDetails(){return{field:this.groupField,group:this.group,leafGroup:this.leafGroup,level:this.level,parent:this.parentRowNode,rowGroupColumn:this.rowGroupColumn}}getSsrmParams(){return this.ssrmParams}setStoreInfo(e){e&&Object.assign(this.info,e)}fireStoreUpdatedEvent(){const e={type:s.sVA.EVENT_STORE_UPDATED};this.eventService.dispatchEvent(e)}fireRefreshFinishedEvent(){const e={type:s.sVA.EVENT_STORE_REFRESHED,route:this.parentRowNode.getRoute()};this.eventService.dispatchEvent(e)}getBlockStates(){return this.cache.getBlockStates()}getStoreBounds(){return{topPx:this.topPx,heightPx:this.heightPx}}getCache(){return this.cache}};ZT([(0,s.dsm)("ssrmBlockUtils")],iD.prototype,"blockUtils",2),ZT([(0,s.dsm)("ssrmStoreUtils")],iD.prototype,"storeUtils",2),ZT([(0,s.dsm)("columnModel")],iD.prototype,"columnModel",2),ZT([(0,s.dsm)("selectionService")],iD.prototype,"selectionService",2),ZT([s.o7C],iD.prototype,"init",1),ZT([s.yah],iD.prototype,"destroyRowNodes",1);var nD=class extends s.XQb{constructor(){super(...arguments),this.onRowHeightChanged_debounced=s._.debounce(this.onRowHeightChanged.bind(this),100),this.pauseStoreUpdateListening=!1,this.started=!1,this.managingPivotResultColumns=!1}ensureRowHeightsValid(){return!1}start(){this.started=!0,this.updateDatasource()}destroyDatasource(){this.datasource&&(this.datasource.destroy&&this.datasource.destroy(),this.rowRenderer.datasourceChanged(),this.datasource=void 0)}addEventListeners(){this.addManagedListener(this.eventService,s.sVA.EVENT_NEW_COLUMNS_LOADED,this.onColumnEverything.bind(this)),this.addManagedListener(this.eventService,s.sVA.EVENT_STORE_UPDATED,this.onStoreUpdated.bind(this));const e=this.resetRootStore.bind(this);this.addManagedListener(this.eventService,s.sVA.EVENT_COLUMN_VALUE_CHANGED,e),this.addManagedListener(this.eventService,s.sVA.EVENT_COLUMN_PIVOT_CHANGED,e),this.addManagedListener(this.eventService,s.sVA.EVENT_COLUMN_ROW_GROUP_CHANGED,e),this.addManagedListener(this.eventService,s.sVA.EVENT_COLUMN_PIVOT_MODE_CHANGED,e),this.addManagedPropertyListeners(["masterDetail","treeData","removePivotHeaderRowWhenSingleValueColumn","suppressServerSideInfiniteScroll","cacheBlockSize"],e),this.addManagedPropertyListener("rowHeight",()=>this.resetRowHeights()),this.verifyProps(),this.addManagedPropertyListener("serverSideDatasource",()=>this.updateDatasource())}updateDatasource(){const e=this.gos.get("serverSideDatasource");e&&this.setDatasource(e)}verifyProps(){this.gos.exists("initialGroupOrderComparator")&&s._.warnOnce("initialGroupOrderComparator cannot be used with Server Side Row Model."),this.gos.isRowSelection()&&!this.gos.exists("getRowId")&&s._.warnOnce("getRowId callback must be provided for Server Side Row Model selection to work correctly.")}setDatasource(e){this.started&&(this.destroyDatasource(),this.datasource=e,this.resetRootStore())}applyRowData(e,t,i){const n=this.getRootStore();if(!n)return;const s=n.getChildStore(i);s&&(s instanceof iD?s.applyRowData(e,t,e.rowData.length):s instanceof QT&&s.processServerResult(e))}isLastRowIndexKnown(){const e=this.getRootStore();return!!e&&e.isLastRowIndexKnown()}onColumnEverything(){if(!this.storeParams)return void this.resetRootStore();const e=this.columnsToValueObjects(this.columnModel.getRowGroupColumns()),t=this.columnsToValueObjects(this.columnModel.getValueColumns()),i=this.columnsToValueObjects(this.columnModel.getPivotColumns()),n=e=>{const t={};e.oldCols.forEach(e=>t[e.id]=e);const i=e.newCols.every(e=>{const i=t[e.id];return i&&delete t[e.id],i&&i.field===e.field&&i.aggFunc===e.aggFunc}),n=!e.allowRemovedColumns&&!!Object.values(t).length;return i&&!n},r=!s._.jsonEquals(this.storeParams.sortModel,this.sortController.getSortModel()),o=!n({oldCols:this.storeParams.rowGroupCols,newCols:e}),a=!n({oldCols:this.storeParams.pivotCols,newCols:i}),l=!!(null==e?void 0:e.length)&&!n({oldCols:this.storeParams.valueCols,newCols:t,allowRemovedColumns:!0});if(r||o||a||l)this.resetRootStore();else{const e=this.createStoreParams();this.storeParams.rowGroupCols=e.rowGroupCols,this.storeParams.pivotCols=e.pivotCols,this.storeParams.valueCols=e.valueCols}}destroyRootStore(){this.rootNode&&this.rootNode.childStore&&(this.rootNode.childStore=this.destroyBean(this.rootNode.childStore),this.nodeManager.clear())}refreshAfterSort(e,t){this.storeParams&&(this.storeParams.sortModel=e);const i=this.getRootStore();i&&(i.refreshAfterSort(t),this.onStoreUpdated())}generateSecondaryColumns(e){if(!this.pivotColDefService)return void s.syG.__assertRegistered(s.zsj.RowGroupingModule,"pivotResultFields",this.context.getGridId());const t=this.pivotColDefService.createColDefsFromFields(e);this.managingPivotResultColumns=!0,this.columnModel.setSecondaryColumns(t,"rowModelUpdated")}resetRowHeights(){const e=this.resetRowHeightsForAllRowNodes(),t=this.gos.getRowHeightForNode(this.rootNode);if(this.rootNode.setRowHeight(t.height,t.estimated),this.rootNode.sibling){const e=this.gos.getRowHeightForNode(this.rootNode.sibling);this.rootNode.sibling.setRowHeight(e.height,e.estimated)}e&&this.onRowHeightChanged()}resetRowHeightsForAllRowNodes(){let e=!1;return this.forEachNode(t=>{const i=this.gos.getRowHeightForNode(t);t.setRowHeight(i.height,i.estimated);const n=t.detailNode;if(n){const e=this.gos.getRowHeightForNode(n);n.setRowHeight(e.height,e.estimated)}if(t.sibling){const e=this.gos.getRowHeightForNode(t.sibling);n.setRowHeight(e.height,e.estimated)}e=!0}),e}resetRootStore(){this.destroyRootStore(),this.rootNode=new s.TUE(this.beans),this.rootNode.group=!0,this.rootNode.level=-1,this.datasource&&(this.storeParams=this.createStoreParams(),this.rootNode.childStore=this.createBean(this.storeFactory.createStore(this.storeParams,this.rootNode)),this.updateRowIndexesAndBounds()),this.managingPivotResultColumns&&(this.columnModel.setSecondaryColumns(null,"api"),this.managingPivotResultColumns=!1),this.dispatchModelUpdated(!0)}columnsToValueObjects(e){return e.map(e=>({id:e.getId(),aggFunc:e.getAggFunc(),displayName:this.columnModel.getDisplayNameForColumn(e,"model"),field:e.getColDef().field}))}createStoreParams(){const e=this.columnsToValueObjects(this.columnModel.getRowGroupColumns()),t=this.columnsToValueObjects(this.columnModel.getValueColumns()),i=this.columnsToValueObjects(this.columnModel.getPivotColumns()),n=this.gos.isGetRowHeightFunction();return{valueCols:t,rowGroupCols:e,pivotCols:i,pivotMode:this.columnModel.isPivotMode(),filterModel:this.filterManager.isAdvancedFilterEnabled()?this.filterManager.getAdvancedFilterModel():this.filterManager.getFilterModel(),sortModel:this.sortController.getSortModel(),datasource:this.datasource,lastAccessedSequence:new s.RI_,dynamicRowHeight:n}}getParams(){return this.storeParams}dispatchModelUpdated(e=!1){const t={type:s.sVA.EVENT_MODEL_UPDATED,animate:!e,keepRenderedRows:!e,newPage:!1,newData:!1};this.eventService.dispatchEvent(t)}onStoreUpdated(){this.pauseStoreUpdateListening||(this.updateRowIndexesAndBounds(),this.dispatchModelUpdated())}onRowHeightChangedDebounced(){this.onRowHeightChanged_debounced()}onRowHeightChanged(){this.updateRowIndexesAndBounds(),this.dispatchModelUpdated()}updateRowIndexesAndBounds(){const e=this.getRootStore();e&&e.setDisplayIndexes(new s.RI_,{value:0})}retryLoads(){const e=this.getRootStore();e&&(e.retryLoads(),this.onStoreUpdated())}getRow(e){const t=this.getRootStore();if(t)return t.getRowUsingDisplayIndex(e)}setPaused(e){this.pauseStoreUpdateListening=e}expandAll(e){this.pauseStoreUpdateListening=!0,this.forEachNode(t=>{t.stub||t.hasChildren()&&t.setExpanded(e)}),this.pauseStoreUpdateListening=!1,this.onStoreUpdated()}refreshAfterFilter(e,t){this.storeParams&&(this.storeParams.filterModel=e);const i=this.getRootStore();i&&(i.refreshAfterFilter(t),this.onStoreUpdated())}getRootStore(){if(this.rootNode&&this.rootNode.childStore)return this.rootNode.childStore}getRowCount(){const e=this.getRootStore();return e?e.getDisplayIndexEnd():0}getTopLevelRowCount(){const e=this.getRootStore();return e?e.getRowCount():1}getTopLevelRowDisplayedIndex(e){const t=this.getRootStore();return t?t.getTopLevelRowDisplayedIndex(e):e}getRowBounds(e){const t=this.getRootStore();return t?t.getRowBounds(e):{rowTop:0,rowHeight:this.gos.getRowHeightAsNumber()}}getBlockStates(){const e=this.getRootStore();if(!e)return;const t={};return e.forEachStoreDeep(e=>{if(e instanceof QT){const{id:i,state:n}=e.getBlockStateJson();t[i]=n}else{if(!(e instanceof iD))throw new Error("AG Grid: Unsupported store type");Object.entries(e.getBlockStates()).forEach(([e,i])=>{t[e]=i})}}),t}getRowIndexAtPixel(e){const t=this.getRootStore();return e<=0||!t?0:t.getRowIndexAtPixel(e)}isEmpty(){return!1}isRowsToRender(){return null!=this.getRootStore()&&this.getRowCount()>0}getType(){return"serverSide"}forEachNode(e){const t=this.getRootStore();t&&t.forEachNodeDeep(e)}forEachNodeAfterFilterAndSort(e,t=!1){const i=this.getRootStore();i&&i.forEachNodeDeepAfterFilterAndSort(e,void 0,t)}executeOnStore(e,t){if(!this.started)return!1;const i=this.getRootStore();if(!i)return!0;const n=i.getChildStore(e);return n&&t(n),!0}refreshStore(e={}){const t=e.route?e.route:[];this.executeOnStore(t,t=>t.refreshStore(1==e.purge))}getStoreState(){const e=[],t=this.getRootStore();return t&&t.addStoreStates(e),e}getNodesInRangeForSelection(e,t){if(!s._.exists(e))return[];if(!t)return[e];const i=e.rowIndex,n=t.rowIndex;if(null===i||null===n)return[e];const r=[],[o,a]=[i,n].sort((e,t)=>e-t);return this.forEachNode(e=>{const t=e.rowIndex;null==t||e.stub||t>=o&&t<=a&&r.push(e)}),r.length!==a-o+1?[e]:r}getRowNode(e){let t;return this.forEachNode(i=>{i.id===e&&(t=i),i.detailNode&&i.detailNode.id===e&&(t=i.detailNode)}),t}isRowPresent(e){return!!this.getRowNode(e.id)}setRowCount(e,t){const i=this.getRootStore();if(i){if(i instanceof iD)return void i.setRowCount(e,t);console.error("AG Grid: Infinite scrolling must be enabled in order to set the row count.")}}};ZT([(0,s.dsm)("columnModel")],nD.prototype,"columnModel",2),ZT([(0,s.dsm)("filterManager")],nD.prototype,"filterManager",2),ZT([(0,s.dsm)("sortController")],nD.prototype,"sortController",2),ZT([(0,s.dsm)("rowRenderer")],nD.prototype,"rowRenderer",2),ZT([(0,s.dsm)("ssrmNodeManager")],nD.prototype,"nodeManager",2),ZT([(0,s.dsm)("ssrmStoreFactory")],nD.prototype,"storeFactory",2),ZT([(0,s.dsm)("beans")],nD.prototype,"beans",2),ZT([(0,s.Xx1)("pivotColDefService")],nD.prototype,"pivotColDefService",2),ZT([s.yah],nD.prototype,"destroyDatasource",1),ZT([s.o7C],nD.prototype,"addEventListeners",1),ZT([s.yah],nD.prototype,"destroyRootStore",1),nD=ZT([(0,s.dR4)("rowModel")],nD);var sD=class extends s.XQb{loadFromDatasource(e){const{storeParams:t,parentBlock:i,parentNode:n}=e,s=n.getGroupKeys();if(!t.datasource)return;const r={startRow:e.startRow,endRow:e.endRow,rowGroupCols:t.rowGroupCols,valueCols:t.valueCols,pivotCols:t.pivotCols,pivotMode:t.pivotMode,groupKeys:s,filterModel:t.filterModel,sortModel:t.sortModel},o=this.gos.addGridCommonParams({success:e.success,fail:e.fail,request:r,parentNode:e.parentNode});window.setTimeout(()=>{t.datasource&&i.isAlive()?t.datasource.getRows(o):e.fail()},0)}getChildStore(e,t,i){if(s._.missingOrEmpty(e))return t;const n=i(e[0]);if(n){if(1===e.length&&!n.childStore){const e=this.serverSideRowModel.getParams();n.childStore=this.createBean(this.storeFactory.createStore(e,n))}const t=e.slice(1,e.length),i=n.childStore;return i?i.getChildStore(t):null}return null}isServerRefreshNeeded(e,t,i){if(i.valueColChanged||i.secondaryColChanged)return!0;const n=e.level+1;if(!(n<t.length))return!0;const s=t[n].id;if(i.changedColumns.indexOf(s)>-1)return!0;const r=this.columnModel.getAllGridColumns().filter(e=>e.getColDef().showRowGroup&&i.changedColumns.includes(e.getId())).map(e=>e.getColDef().showRowGroup).some(e=>!0===e||e===s);return r}getServerSideInitialRowCount(){return this.gos.get("serverSideInitialRowCount")}assertRowModelIsServerSide(e){return!!this.gos.isRowModelType("serverSide")||(s._.warnOnce(`The '${e}' property can only be used with the Server Side Row Model.`),!1)}assertNotTreeData(e){return!this.gos.get("treeData")||(s._.warnOnce(`The '${e}' property cannot be used while using tree data.`),!1)}isServerSideSortAllLevels(){return this.gos.get("serverSideSortAllLevels")&&this.assertRowModelIsServerSide("serverSideSortAllLevels")}isServerSideOnlyRefreshFilteredGroups(){return this.gos.get("serverSideOnlyRefreshFilteredGroups")&&this.assertRowModelIsServerSide("serverSideOnlyRefreshFilteredGroups")}isServerSideSortOnServer(){return this.gos.get("serverSideSortOnServer")&&this.assertRowModelIsServerSide("serverSideSortOnServer")&&this.assertNotTreeData("serverSideSortOnServer")}isServerSideFilterOnServer(){return this.gos.get("serverSideFilterOnServer")&&this.assertRowModelIsServerSide("serverSideFilterOnServer")&&this.assertNotTreeData("serverSideFilterOnServer")}};ZT([(0,s.dsm)("columnModel")],sD.prototype,"columnModel",2),ZT([(0,s.dsm)("rowModel")],sD.prototype,"serverSideRowModel",2),ZT([(0,s.dsm)("ssrmStoreFactory")],sD.prototype,"storeFactory",2),sD=ZT([(0,s.dR4)("ssrmStoreUtils")],sD);var rD=class extends s.XQb{createRowNode(e){const t=new s.TUE(this.beans),i=null!=e.rowHeight?e.rowHeight:this.gos.getRowHeightAsNumber();return t.setRowHeight(i),t.group=e.group,t.leafGroup=e.leafGroup,t.level=e.level,t.uiLevel=e.level,t.parent=e.parent,t.stub=!0,t.__needsRefreshWhenVisible=!1,t.group&&(t.expanded=!1,t.field=e.field,t.rowGroupColumn=e.rowGroupColumn),t}destroyRowNodes(e){e&&e.forEach(e=>this.destroyRowNode(e))}destroyRowNode(e,t=!1){e.childStore&&!t&&(this.destroyBean(e.childStore),e.childStore=null),e.sibling&&!e.footer&&this.destroyRowNode(e.sibling,!1),e.clearRowTopAndRowIndex(),null!=e.id&&this.nodeManager.removeNode(e)}setTreeGroupInfo(e){e.updateHasChildren();const t=this.gos.get("getServerSideGroupKey");e.hasChildren()&&null!=t&&(e.key=t(e.data)),e.hasChildren()||null==e.childStore||(this.destroyBean(e.childStore),e.childStore=null,e.expanded=!1)}setRowGroupInfo(e){e.key=this.valueService.getValue(e.rowGroupColumn,e),null!==e.key&&void 0!==e.key||s._.doOnce(()=>{console.warn("AG Grid: null and undefined values are not allowed for server side row model keys"),e.rowGroupColumn&&console.warn(`column = ${e.rowGroupColumn.getId()}`),console.warn("data is ",e.data)},"ServerSideBlock-CannotHaveNullOrUndefinedForKey"),this.beans.gos.getGroupTotalRowCallback()({node:e})&&(e.createFooter(),e.sibling&&(e.sibling.uiLevel=e.uiLevel+1))}setMasterDetailInfo(e){const t=this.gos.get("isRowMaster");e.master=null==t||t(e.data)}updateDataIntoRowNode(e,t){e.updateData(t),this.gos.get("treeData")?(this.setTreeGroupInfo(e),this.setChildCountIntoRowNode(e)):e.group?(this.setChildCountIntoRowNode(e),e.footer||(this.beans.gos.getGroupTotalRowCallback()({node:e})?e.sibling?e.sibling.updateData(t):e.createFooter():e.sibling&&e.destroyFooter())):this.gos.get("masterDetail")}setDataIntoRowNode(e,t,i,n){var r;e.stub=!1;const o=this.gos.get("treeData");s._.exists(t)?(e.setDataAndId(t,i),o?this.setTreeGroupInfo(e):e.group?this.setRowGroupInfo(e):this.gos.get("masterDetail")&&this.setMasterDetailInfo(e)):(e.setDataAndId(void 0,void 0),e.key=null),(o||e.group)&&(this.setGroupDataIntoRowNode(e),this.setChildCountIntoRowNode(e)),s._.exists(t)&&(e.setRowHeight(this.gos.getRowHeightForNode(e,!1,n).height),null==(r=e.sibling)||r.setRowHeight(this.gos.getRowHeightForNode(e.sibling,!1,n).height))}setChildCountIntoRowNode(e){const t=this.gos.get("getChildCount");t&&e.setAllChildrenCount(t(e.data))}setGroupDataIntoRowNode(e){const t=this.columnModel.getGroupDisplayColumns(),i=this.gos.get("treeData");t.forEach(t=>{if(null==e.groupData&&(e.groupData={}),i)e.groupData[t.getColId()]=e.key;else if(t.isRowGroupDisplayed(e.rowGroupColumn.getId())){const i=this.valueService.getValue(e.rowGroupColumn,e);e.groupData[t.getColId()]=i}})}clearDisplayIndex(e){e.clearRowTopAndRowIndex(),e.hasChildren()&&s._.exists(e.childStore)&&e.childStore.clearDisplayIndexes(),e.master&&e.detailNode&&e.detailNode.clearRowTopAndRowIndex()}setDisplayIndex(e,t,i){if(e.setRowIndex(t.next()),e.setRowTop(i.value),i.value+=e.rowHeight,!e.footer&&(e.master&&(e.expanded&&e.detailNode?(e.detailNode.setRowIndex(t.next()),e.detailNode.setRowTop(i.value),i.value+=e.detailNode.rowHeight):e.detailNode&&e.detailNode.clearRowTopAndRowIndex()),e.hasChildren()&&s._.exists(e.childStore))){const n=e.childStore;e.expanded?n.setDisplayIndexes(t,i):n.clearDisplayIndexes()}}binarySearchForDisplayIndex(e,t){let i=0,n=t.length-1;if(s._.missing(n)||s._.missing(i))console.warn(`AG Grid: error: topPointer = ${n}, bottomPointer = ${i}`);else for(;;){const s=Math.floor((i+n)/2),r=t[s];if(r.rowIndex===e)return r;const o=r.master&&r.expanded,a=r.detailNode;if(o&&a&&a.rowIndex===e)return r.detailNode;const l=r.childStore;if(r.expanded&&l&&l.isDisplayIndexInStore(e))return l.getRowUsingDisplayIndex(e);if(r.rowIndex<e)i=s+1;else{if(!(r.rowIndex>e))return void console.warn(`AG Grid: error: unable to locate rowIndex = ${e} in cache`);n=s-1}}}extractRowBounds(e,t){const i=e=>({rowHeight:e.rowHeight,rowTop:e.rowTop});if(e.rowIndex===t)return i(e);if(e.hasChildren()&&e.expanded&&s._.exists(e.childStore)){const i=e.childStore;if(i.isDisplayIndexInStore(t))return i.getRowBounds(t)}else if(e.master&&e.expanded&&s._.exists(e.detailNode)&&e.detailNode.rowIndex===t)return i(e.detailNode)}getIndexAtPixel(e,t){if(e.isPixelInRange(t))return e.rowIndex;const i=e.master&&e.expanded,n=e.detailNode;if(i&&n&&n.isPixelInRange(t))return e.detailNode.rowIndex;if(e.hasChildren()&&e.expanded&&s._.exists(e.childStore)){const i=e.childStore;if(i.isPixelInRange(t))return i.getRowIndexAtPixel(t)}return null}createNodeIdPrefix(e){const t=[];let i=e;for(;i&&i.level>=0;)""===i.key?t.push("ag-Grid-MissingKey"):t.push(i.key),i=i.parent;if(t.length>0)return t.reverse().join("-")}checkOpenByDefault(e){return this.expansionService.checkOpenByDefault(e)}};ZT([(0,s.dsm)("valueService")],rD.prototype,"valueService",2),ZT([(0,s.dsm)("columnModel")],rD.prototype,"columnModel",2),ZT([(0,s.dsm)("ssrmNodeManager")],rD.prototype,"nodeManager",2),ZT([(0,s.dsm)("beans")],rD.prototype,"beans",2),ZT([(0,s.dsm)("expansionService")],rD.prototype,"expansionService",2),rD=ZT([(0,s.dR4)("ssrmBlockUtils")],rD);var oD=class{constructor(){this.rowNodes={}}addRowNode(e){const t=e.id;this.rowNodes[t]&&(console.warn(`AG Grid: Duplicate node id ${e.id}. Row ID's are provided via the getRowId() callback. Please modify the getRowId() callback code to provide unique row id values.`),console.warn("first instance",this.rowNodes[t].data),console.warn("second instance",e.data)),this.rowNodes[t]=e}removeNode(e){const t=e.id;this.rowNodes[t]&&(this.rowNodes[t]=void 0)}clear(){this.rowNodes={}}};ZT([s.yah],oD.prototype,"clear",1),oD=ZT([(0,s.dR4)("ssrmNodeManager")],oD);var aD=class extends s.XQb{constructor(){super(...arguments),this.asyncTransactions=[]}postConstruct(){this.gos.isRowModelType("serverSide")}applyTransactionAsync(e,t){null==this.asyncTransactionsTimeout&&this.scheduleExecuteAsync(),this.asyncTransactions.push({transaction:e,callback:t})}scheduleExecuteAsync(){const e=this.gos.getAsyncTransactionWaitMillis();this.asyncTransactionsTimeout=window.setTimeout(()=>{this.executeAsyncTransactions()},e)}executeAsyncTransactions(){if(!this.asyncTransactions)return;const e=[],t=[],i=[];let n=!1;if(this.asyncTransactions.forEach(r=>{let o;this.serverSideRowModel.executeOnStore(r.transaction.route,e=>{o=e.applyTransaction(r.transaction)})?null==o&&(o={status:s.a8A.StoreNotFound}):o={status:s.a8A.StoreNotStarted},t.push(o),o.status==s.a8A.StoreLoading?i.push(r):(r.callback&&e.push(()=>r.callback(o)),o.status===s.a8A.Applied&&(n=!0))}),e.length>0&&window.setTimeout(()=>{e.forEach(e=>e())},0),this.asyncTransactionsTimeout=void 0,this.asyncTransactions=i,n&&(this.valueCache.onDataChanged(),this.eventService.dispatchEvent({type:s.sVA.EVENT_STORE_UPDATED})),t.length>0){const e={type:s.sVA.EVENT_ASYNC_TRANSACTIONS_FLUSHED,results:t};this.eventService.dispatchEvent(e)}}flushAsyncTransactions(){null!=this.asyncTransactionsTimeout&&clearTimeout(this.asyncTransactionsTimeout),this.executeAsyncTransactions()}applyTransaction(e){let t;if(this.serverSideRowModel.executeOnStore(e.route,i=>{t=i.applyTransaction(e)})){if(t){if(this.valueCache.onDataChanged(),t.remove){const i=t.remove.map(e=>e.id);this.selectionService.deleteSelectionStateFromParent(e.route||[],i)}return this.eventService.dispatchEvent({type:s.sVA.EVENT_STORE_UPDATED}),t}return{status:s.a8A.StoreNotFound}}return{status:s.a8A.StoreNotStarted}}};ZT([(0,s.dsm)("rowNodeBlockLoader")],aD.prototype,"rowNodeBlockLoader",2),ZT([(0,s.dsm)("valueCache")],aD.prototype,"valueCache",2),ZT([(0,s.dsm)("rowModel")],aD.prototype,"serverSideRowModel",2),ZT([(0,s.dsm)("rowRenderer")],aD.prototype,"rowRenderer",2),ZT([(0,s.dsm)("selectionService")],aD.prototype,"selectionService",2),ZT([s.o7C],aD.prototype,"postConstruct",1),aD=ZT([(0,s.dR4)("ssrmTransactionManager")],aD);var lD=class extends s.XQb{postConstruct(){this.gos.isRowModelType("serverSide")&&this.addManagedListener(this.eventService,s.sVA.EVENT_ROW_GROUP_OPENED,this.onRowGroupOpened.bind(this))}onRowGroupOpened(e){const t=e.node;if(t.expanded){if(t.master)this.createDetailNode(t);else if(s._.missing(t.childStore)){const e=this.serverSideRowModel.getParams();t.childStore=this.createBean(this.storeFactory.createStore(e,t))}}else this.gos.get("purgeClosedRowNodes")&&s._.exists(t.childStore)&&(t.childStore=this.destroyBean(t.childStore));const i={type:s.sVA.EVENT_STORE_UPDATED};this.eventService.dispatchEvent(i)}createDetailNode(e){if(s._.exists(e.detailNode))return e.detailNode;const t=new s.TUE(this.beans);t.detail=!0,t.selectable=!1,t.parent=e,s._.exists(e.id)&&(t.id="detail_"+e.id),t.data=e.data,t.level=e.level+1;const i=this.gos.getRowHeightForNode(t).height;return t.rowHeight=i||200,e.detailNode=t,t}};ZT([(0,s.dsm)("rowModel")],lD.prototype,"serverSideRowModel",2),ZT([(0,s.dsm)("ssrmStoreFactory")],lD.prototype,"storeFactory",2),ZT([(0,s.dsm)("beans")],lD.prototype,"beans",2),ZT([s.o7C],lD.prototype,"postConstruct",1),lD=ZT([(0,s.dR4)("ssrmExpandListener")],lD);var cD=class extends s.XQb{postConstruct(){this.gos.isRowModelType("serverSide")&&this.addManagedListener(this.eventService,s.sVA.EVENT_SORT_CHANGED,this.onSortChanged.bind(this))}onSortChanged(){const e=this.serverSideRowModel.getParams();if(!e)return;const t=this.sortController.getSortModel(),i=e.sortModel,n=this.findChangedColumnsInSort(t,i),s={valueColChanged:this.listenerUtils.isSortingWithValueColumn(n),secondaryColChanged:this.listenerUtils.isSortingWithSecondaryColumn(n),changedColumns:n};this.serverSideRowModel.refreshAfterSort(t,s)}findChangedColumnsInSort(e,t){let i=[];return[e,t].forEach(e=>{if(e){const t=e.map(e=>e.colId);i=i.concat(t)}}),i.filter(i=>{const n=t.find(e=>e.colId===i),s=e.find(e=>e.colId===i);return((e,t)=>(e?e.sort:null)!==(t?t.sort:null))(n,s)||((i,n)=>(i?t.indexOf(i):-1)!==(n?e.indexOf(n):-1))(n,s)})}};ZT([(0,s.dsm)("sortController")],cD.prototype,"sortController",2),ZT([(0,s.dsm)("rowModel")],cD.prototype,"serverSideRowModel",2),ZT([(0,s.dsm)("ssrmListenerUtils")],cD.prototype,"listenerUtils",2),ZT([s.o7C],cD.prototype,"postConstruct",1),cD=ZT([(0,s.dR4)("ssrmSortService")],cD);var hD=class extends s.XQb{postConstruct(){this.gos.isRowModelType("serverSide")&&(this.addManagedListener(this.eventService,s.sVA.EVENT_ADVANCED_FILTER_ENABLED_CHANGED,()=>this.onFilterChanged(!0)),this.addManagedListener(this.eventService,s.sVA.EVENT_FILTER_CHANGED,()=>this.onFilterChanged()))}onFilterChanged(e){const t=this.serverSideRowModel.getParams();if(!t)return;const i=t.filterModel;let n,s;if(this.filterManager.isAdvancedFilterEnabled()){n=this.filterManager.getAdvancedFilterModel();const t=e?Object.keys(null!=i?i:{}):this.getAdvancedFilterColumns(i),r=this.getAdvancedFilterColumns(n);t.forEach(e=>r.add(e)),s=Array.from(r)}else if(n=this.filterManager.getFilterModel(),e){const e=this.getAdvancedFilterColumns(i);Object.keys(n).forEach(t=>e.add(t)),s=Array.from(e)}else s=this.findChangedColumns(i,n);const r={valueColChanged:this.listenerUtils.isSortingWithValueColumn(s),secondaryColChanged:this.listenerUtils.isSortingWithSecondaryColumn(s),changedColumns:s};this.serverSideRowModel.refreshAfterFilter(n,r)}findChangedColumns(e,t){const i={};Object.keys(e).forEach(e=>i[e]=!0),Object.keys(t).forEach(e=>i[e]=!0);const n=[];return Object.keys(i).forEach(i=>{JSON.stringify(e[i])!=JSON.stringify(t[i])&&n.push(i)}),n}getAdvancedFilterColumns(e){const t=new Set;if(!e)return t;const i=e=>{"join"===e.filterType?e.conditions.forEach(e=>i(e)):t.add(e.colId)};return i(e),t}};ZT([(0,s.dsm)("rowModel")],hD.prototype,"serverSideRowModel",2),ZT([(0,s.dsm)("filterManager")],hD.prototype,"filterManager",2),ZT([(0,s.dsm)("ssrmListenerUtils")],hD.prototype,"listenerUtils",2),ZT([s.o7C],hD.prototype,"postConstruct",1),hD=ZT([(0,s.dR4)("ssrmFilterListener")],hD);var dD=class{createStore(e,t){const i=this.getStoreParams(e,t);return new(i.suppressInfiniteScroll?QT:iD)(e,i,t)}getStoreParams(e,t){const i=this.getLevelSpecificParams(t),n=this.isInfiniteScroll(i);return{suppressInfiniteScroll:!n,cacheBlockSize:this.getBlockSize(n,i),maxBlocksInCache:this.getMaxBlocksInCache(n,e,i)}}getMaxBlocksInCache(e,t,i){if(!e)return;const n=i&&null!=i.maxBlocksInCache?i.maxBlocksInCache:this.gos.get("maxBlocksInCache");if(null!=n&&n>=0){if(t.dynamicRowHeight){const e="Server Side Row Model does not support Dynamic Row Height and Cache Purging. Either a) remove getRowHeight() callback or b) remove maxBlocksInCache property. Purging has been disabled.";return void s._.warnOnce(e)}if(this.columnModel.isAutoRowHeightActive()){const e="Server Side Row Model does not support Auto Row Height and Cache Purging. Either a) remove colDef.autoHeight or b) remove maxBlocksInCache property. Purging has been disabled.";return void s._.warnOnce(e)}return n}}getBlockSize(e,t){if(!e)return;const i=t&&null!=t.cacheBlockSize?t.cacheBlockSize:this.gos.get("cacheBlockSize");return null!=i&&i>0?i:100}getLevelSpecificParams(e){const t=this.gos.getCallback("getServerSideGroupLevelParams");if(t)return t({level:e.level+1,parentRowNode:e.level>=0?e:void 0,rowGroupColumns:this.columnModel.getRowGroupColumns(),pivotColumns:this.columnModel.getPivotColumns(),pivotMode:this.columnModel.isPivotMode()})}isInfiniteScroll(e){return!(e&&null!=e.suppressInfiniteScroll?e.suppressInfiniteScroll:this.isSuppressServerSideInfiniteScroll())}isSuppressServerSideInfiniteScroll(){return this.gos.get("suppressServerSideInfiniteScroll")}};ZT([(0,s.dsm)("gridOptionsService")],dD.prototype,"gos",2),ZT([(0,s.dsm)("columnModel")],dD.prototype,"columnModel",2),dD=ZT([(0,s.dR4)("ssrmStoreFactory")],dD);var uD=class{isSortingWithValueColumn(e){const t=this.columnModel.getValueColumns().map(e=>e.getColId());for(let i=0;i<e.length;i++)if(t.indexOf(e[i])>-1)return!0;return!1}isSortingWithSecondaryColumn(e){if(!this.columnModel.getSecondaryColumns())return!1;const t=this.columnModel.getSecondaryColumns().map(e=>e.getColId());for(let i=0;i<e.length;i++)if(t.indexOf(e[i])>-1)return!0;return!1}};ZT([(0,s.dsm)("columnModel")],uD.prototype,"columnModel",2),uD=ZT([(0,s.dR4)("ssrmListenerUtils")],uD);var pD=class extends s.XQb{constructor(){super(...arguments),this.selectedState={selectAll:!1,toggledNodes:new Set},this.lastSelected=null,this.selectAllUsed=!1,this.selectedNodes={}}init(){this.rowSelection=this.gos.get("rowSelection"),this.addManagedPropertyListener("rowSelection",e=>{this.rowSelection=e.currentValue})}getSelectedState(){return{selectAll:this.selectedState.selectAll,toggledNodes:[...this.selectedState.toggledNodes]}}setSelectedState(e){const t={selectAll:!1,toggledNodes:new Set};"object"==typeof e?"selectAll"in e&&"boolean"==typeof e.selectAll?(t.selectAll=e.selectAll,"toggledNodes"in e&&Array.isArray(e.toggledNodes)?(e.toggledNodes.forEach(e=>{"string"==typeof e?t.toggledNodes.add(e):console.warn(`AG Grid: Provided ids must be of string type. Invalid id provided: ${e}`)}),this.selectedState=t):console.error("AG Grid: `toggledNodes` must be an array of string ids.")):console.error("AG Grid: Select all status should be of boolean type."):console.error("AG Grid: The provided selection state should be an object.")}deleteSelectionStateFromParent(e,t){if(0===this.selectedState.toggledNodes.size)return!1;let i=!1;return t.forEach(e=>{this.selectedState.toggledNodes.delete(e)&&(i=!0)}),i}setNodesSelected(e){if(0===e.nodes.length)return 0;const t=e.clearSelection&&e.newValue&&!e.rangeSelect;if("multiple"!==this.rowSelection||t){if(e.nodes.length>1)throw new Error("AG Grid: cannot select multiple rows when rowSelection is set to 'single'");const t=e.nodes[0];return e.newValue?(this.selectedNodes={[t.id]:t},this.selectedState={selectAll:!1,toggledNodes:new Set([t.id])}):(this.selectedNodes={},this.selectedState={selectAll:!1,toggledNodes:new Set}),this.lastSelected=t.id,1}const i=t=>{e.newValue?this.selectedNodes[t.id]=t:delete this.selectedNodes[t.id];const i=t.selectable;e.newValue!==this.selectedState.selectAll&&i?this.selectedState.toggledNodes.add(t.id):this.selectedState.toggledNodes.delete(t.id)};if(e.rangeSelect&&this.lastSelected){if(e.nodes.length>1)throw new Error("AG Grid: cannot select multiple rows when using rangeSelect");const t=e.nodes[0],n=this.rowModel.getRowNode(this.lastSelected);return this.rowModel.getNodesInRangeForSelection(t,null!=n?n:null).forEach(i),this.lastSelected=t.id,1}return e.nodes.forEach(i),this.lastSelected=e.nodes[e.nodes.length-1].id,1}processNewRow(e){this.selectedNodes[e.id]&&(this.selectedNodes[e.id]=e)}isNodeSelected(e){const t=this.selectedState.toggledNodes.has(e.id);return this.selectedState.selectAll?!t:t}getSelectedNodes(){return this.selectAllUsed&&console.warn("AG Grid: getSelectedNodes and getSelectedRows functions cannot be used with select all functionality with the server-side row model.\n                Use `api.getServerSideSelectionState()` instead."),Object.values(this.selectedNodes)}getSelectedRows(){return this.getSelectedNodes().map(e=>e.data)}getSelectionCount(){return this.selectedState.selectAll?-1:this.selectedState.toggledNodes.size}clearOtherNodes(e,t){const i=this.selectedState.selectAll?1:this.selectedState.toggledNodes.size-1;this.selectedState={selectAll:!1,toggledNodes:new Set([e.id])},this.rowModel.forEachNode(i=>{i!==e&&i.selectThisNode(!1,void 0,t)});const n={type:s.sVA.EVENT_SELECTION_CHANGED,source:t};return this.eventService.dispatchEvent(n),i}isEmpty(){var e;return!this.selectedState.selectAll&&!(null==(e=this.selectedState.toggledNodes)?void 0:e.size)}selectAllRowNodes(e){this.selectedState={selectAll:!0,toggledNodes:new Set},this.selectedNodes={},this.selectAllUsed=!0}deselectAllRowNodes(e){this.selectedState={selectAll:!1,toggledNodes:new Set},this.selectedNodes={}}getSelectAllState(e,t){return this.selectedState.selectAll?!(this.selectedState.toggledNodes.size>0)||null:this.selectedState.toggledNodes.size>0&&null}};ZT([(0,s.dsm)("rowModel")],pD.prototype,"rowModel",2),ZT([s.o7C],pD.prototype,"init",1);var gD=class extends s.XQb{constructor(){super(...arguments),this.selectedState={selectAllChildren:!1,toggledNodes:new Map},this.lastSelected=null}init(){this.addManagedListener(this.eventService,s.sVA.EVENT_MODEL_UPDATED,()=>this.removeRedundantState()),this.addManagedListener(this.eventService,s.sVA.EVENT_COLUMN_ROW_GROUP_CHANGED,()=>this.selectionService.reset("rowGroupChanged"))}getSelectedState(){const e=this.gos.get("treeData"),t=(i,n,s)=>{const r={nodeId:s};if((e||n<=this.columnModel.getRowGroupColumns().length)&&(r.selectAllChildren=i.selectAllChildren),i.toggledNodes.size){const e=[];i.toggledNodes.forEach((i,s)=>{const r=t(i,n+1,s);e.push(r)}),r.toggledNodes=e}return r};return t(this.selectedState,0)}setSelectedState(e){const t=(e,i)=>{var n,s;if("object"!=typeof e)throw new Error("AG Grid: Each provided state object must be an object.");if("selectAllChildren"in e&&"boolean"!=typeof e.selectAllChildren)throw new Error("AG Grid: `selectAllChildren` must be a boolean value or undefined.");if("toggledNodes"in e){if(!Array.isArray(e.toggledNodes))throw new Error("AG Grid: `toggledNodes` must be an array.");if(!e.toggledNodes.every(e=>"object"==typeof e&&"nodeId"in e&&"string"==typeof e.nodeId))throw new Error("AG Grid: Every `toggledNode` requires an associated string id.")}const r=null!=(n=e.selectAllChildren)?n:!i,o=null==(s=e.toggledNodes)?void 0:s.map(e=>[e.nodeId,t(e,r)]);if(null==o?void 0:o.some(([e,t])=>r===t.selectAllChildren&&0===t.toggledNodes.size))throw new Error("\n                    AG Grid: AG Grid: Row selection state could not be parsed due to invalid data. Ensure all child state has toggledNodes or does not conform with the parent rule.\n                    Please rebuild the selection state and reapply it.\n                ");return{selectAllChildren:r,toggledNodes:new Map(o)}};try{this.selectedState=t(e,!!e.selectAllChildren)}catch(e){console.error(e.message)}}deleteSelectionStateFromParent(e,t){let i=this.selectedState;const n=[...e];for(;i&&n.length;)i=i.toggledNodes.get(n.pop());if(!i)return!1;let s=!1;return t.forEach(e=>{(null==i?void 0:i.toggledNodes.delete(e))&&(s=!0)}),s&&this.removeRedundantState(),s}setNodesSelected(e){const t=e,{nodes:i}=t,n=XT(t,["nodes"]);if(0===i.length)return 0;if(e.rangeSelect){if(i.length>1)throw new Error("AG Grid: cannot select multiple rows when using rangeSelect");const e=i[0],t=this.rowModel.getNodesInRangeForSelection(e,this.lastSelected).map(this.getRouteToNode).sort((e,t)=>t.length-e.length),s=new Set;return t.forEach(t=>{s.has(t[t.length-1])||(t.forEach(e=>s.add(e)),this.recursivelySelectNode(t,this.selectedState,qT({node:e},n)))}),this.removeRedundantState(),this.lastSelected=e,1}return e.nodes.forEach(e=>{const t=this.getRouteToNode(e);var i;this.recursivelySelectNode(t,this.selectedState,(i=qT({},n),zT(i,WT({node:e}))))}),this.removeRedundantState(),this.lastSelected=e.nodes[e.nodes.length-1],1}isNodeSelected(e){const t=this.getRouteToNode(e);return this.isNodePathSelected(t,this.selectedState)}isNodePathSelected([e,...t],i){if(0===t.length){const t=i.toggledNodes.has(e.id);if(e.hasChildren()){const t=i.toggledNodes.get(e.id);if(t&&t.toggledNodes.size)return}return i.selectAllChildren?!t:t}if(i.toggledNodes.has(e.id)){const n=i.toggledNodes.get(e.id);if(n)return this.isNodePathSelected(t,n)}return!!i.selectAllChildren}getRouteToNode(e){const t=[];let i=e;for(;i.parent;)t.push(i),i=i.parent;return t.reverse()}removeRedundantState(){if(this.filterManager.isAnyFilterPresent())return;const e=(t=this.selectedState,i,n)=>{if(t.toggledNodes.forEach((i,n)=>{e(i,n,t)}),i){const e=this.rowModel.getRowNode(i),n=null==e?void 0:e.childStore;if((null==n?void 0:n.isLastRowIndexKnown())&&t.toggledNodes.size>=n.getRowCount()){for(const e of t.toggledNodes.entries()){const[t,i]=e;if(i.toggledNodes.size>0)return;if(!this.rowModel.getRowNode(t))return}t.selectAllChildren=!t.selectAllChildren,t.toggledNodes.clear()}}const s=0===t.toggledNodes.size,r=(null==n?void 0:n.selectAllChildren)===t.selectAllChildren;s&&r&&(null==n||n.toggledNodes.delete(i))};e()}recursivelySelectNode([e,...t],i,n){if(!e)return;if(!t.length){const t=e.selectable;if(i.selectAllChildren===n.newValue||!t)return void i.toggledNodes.delete(e.id);const s={selectAllChildren:n.newValue,toggledNodes:new Map};return void i.toggledNodes.set(e.id,s)}const s=i.toggledNodes.has(e.id),r=s?i.toggledNodes.get(e.id):{selectAllChildren:i.selectAllChildren,toggledNodes:new Map};s||i.toggledNodes.set(e.id,r),this.recursivelySelectNode(t,r,n),i.selectAllChildren===r.selectAllChildren&&0===r.toggledNodes.size&&i.toggledNodes.delete(e.id)}getSelectedNodes(){console.warn("AG Grid: `getSelectedNodes` and `getSelectedRows` functions cannot be used with `groupSelectsChildren` and the server-side row model.\n            Use `api.getServerSideSelectionState()` instead.");const e=[];return this.rowModel.forEachNode(t=>{t.isSelected()&&e.push(t)}),e}processNewRow(e){}getSelectedRows(){return this.getSelectedNodes().map(e=>e.data)}getSelectionCount(){return-1}isEmpty(){var e;return!this.selectedState.selectAllChildren&&!(null==(e=this.selectedState.toggledNodes)?void 0:e.size)}selectAllRowNodes(e){this.selectedState={selectAllChildren:!0,toggledNodes:new Map}}deselectAllRowNodes(e){this.selectedState={selectAllChildren:!1,toggledNodes:new Map}}getSelectAllState(e,t){return this.selectedState.selectAllChildren?!(this.selectedState.toggledNodes.size>0)||null:this.selectedState.toggledNodes.size>0&&null}};ZT([(0,s.dsm)("rowModel")],gD.prototype,"rowModel",2),ZT([(0,s.dsm)("columnModel")],gD.prototype,"columnModel",2),ZT([(0,s.dsm)("filterManager")],gD.prototype,"filterManager",2),ZT([(0,s.dsm)("rowModel")],gD.prototype,"serverSideRowModel",2),ZT([(0,s.dsm)("selectionService")],gD.prototype,"selectionService",2),ZT([s.o7C],gD.prototype,"init",1);var fD=class extends s.XQb{init(){const e=this.gos.get("groupSelectsChildren");this.addManagedPropertyListener("groupSelectsChildren",e=>{this.destroyBean(this.selectionStrategy);const t=e.currentValue?gD:pD;this.selectionStrategy=this.createManagedBean(new t),this.shotgunResetNodeSelectionState();const i={type:s.sVA.EVENT_SELECTION_CHANGED,source:"api"};this.eventService.dispatchEvent(i)}),this.addManagedPropertyListener("rowSelection",()=>this.deselectAllRowNodes({source:"api"}));const t=e?gD:pD;this.selectionStrategy=this.createManagedBean(new t)}getSelectionState(){return this.selectionStrategy.getSelectedState()}setSelectionState(e,t){if(Array.isArray(e))return;this.selectionStrategy.setSelectedState(e),this.shotgunResetNodeSelectionState();const i={type:s.sVA.EVENT_SELECTION_CHANGED,source:t};this.eventService.dispatchEvent(i)}setNodesSelected(e){const t=e,{nodes:i}=t,n=XT(t,["nodes"]),r=this.gos.get("rowSelection");if(i.length>1&&"multiple"!==r)return console.warn("AG Grid: cannot multi select while rowSelection='single'"),0;if(i.length>1&&e.rangeSelect)return console.warn("AG Grid: cannot use range selection when multi selecting rows"),0;const o=qT({nodes:i.filter(e=>e.selectable)},n);if(!o.nodes.length)return 0;const a=this.selectionStrategy.setNodesSelected(o);this.shotgunResetNodeSelectionState(o.source);const l={type:s.sVA.EVENT_SELECTION_CHANGED,source:o.source};return this.eventService.dispatchEvent(l),a}deleteSelectionStateFromParent(e,t){if(!this.selectionStrategy.deleteSelectionStateFromParent(e,t))return;this.shotgunResetNodeSelectionState();const i={type:s.sVA.EVENT_SELECTION_CHANGED,source:"api"};this.eventService.dispatchEvent(i)}shotgunResetNodeSelectionState(e){this.rowModel.forEachNode(t=>{if(t.stub)return;const i=this.selectionStrategy.isNodeSelected(t);i!==t.isSelected()&&t.selectThisNode(i,void 0,e)})}getSelectedNodes(){return this.selectionStrategy.getSelectedNodes()}getSelectedRows(){return this.selectionStrategy.getSelectedRows()}getSelectionCount(){return this.selectionStrategy.getSelectionCount()}syncInRowNode(e,t){this.selectionStrategy.processNewRow(e);const i=this.selectionStrategy.isNodeSelected(e);if(0!=i&&!e.selectable){this.selectionStrategy.setNodesSelected({nodes:[e],newValue:!1,source:"api"}),this.shotgunResetNodeSelectionState();const t={type:s.sVA.EVENT_SELECTION_CHANGED,source:"api"};return void this.eventService.dispatchEvent(t)}e.setSelectedInitialValue(i)}reset(){this.selectionStrategy.deselectAllRowNodes({source:"api"})}isEmpty(){return this.selectionStrategy.isEmpty()}hasNodesToSelect(e=!1,t=!1){return!0}selectAllRowNodes(e){(e.justCurrentPage||e.justFiltered)&&console.warn("AG Grid: selecting just filtered only works when gridOptions.rowModelType='clientSide'"),this.selectionStrategy.selectAllRowNodes(e),this.rowModel.forEachNode(t=>{t.stub||t.selectThisNode(!0,void 0,e.source)});const t={type:s.sVA.EVENT_SELECTION_CHANGED,source:e.source};this.eventService.dispatchEvent(t)}deselectAllRowNodes(e){(e.justCurrentPage||e.justFiltered)&&console.warn("AG Grid: selecting just filtered only works when gridOptions.rowModelType='clientSide'"),this.selectionStrategy.deselectAllRowNodes(e),this.rowModel.forEachNode(t=>{t.stub||t.selectThisNode(!1,void 0,e.source)});const t={type:s.sVA.EVENT_SELECTION_CHANGED,source:e.source};this.eventService.dispatchEvent(t)}getSelectAllState(e,t){return this.selectionStrategy.getSelectAllState(e,t)}updateGroupsFromChildrenSelections(e,t){return!1}getBestCostNodeSelection(){console.warn("AG Grid: calling gridApi.getBestCostNodeSelection() is only possible when using rowModelType=`clientSide`.")}filterFromSelection(){}};ZT([(0,s.dsm)("rowModel")],fD.prototype,"rowModel",2),ZT([s.o7C],fD.prototype,"init",1),fD=ZT([(0,s.dR4)("selectionService")],fD);var mD=class extends s.pkb{constructor(){super(...arguments),this.queuedRowIds=new Set}postConstruct(){super.postConstruct(),this.addManagedListener(this.eventService,s.sVA.EVENT_COLUMN_ROW_GROUP_CHANGED,()=>{this.queuedRowIds.clear()})}checkOpenByDefault(e){if(!e.isExpandable())return;if(this.queuedRowIds.has(e.id))return this.queuedRowIds.delete(e.id),void e.setExpanded(!0);const t=this.gos.getCallback("isServerSideGroupOpenByDefault");t&&t({data:e.data,rowNode:e})&&e.setExpanded(!0)}expandRows(e){e.forEach(e=>{const t=this.serverSideRowModel.getRowNode(e);t?t.setExpanded(!0):this.queuedRowIds.add(e)})}expandAll(e){this.serverSideRowModel.expandAll(e)}onGroupExpandedOrCollapsed(){}};ZT([(0,s.dsm)("rowModel")],mD.prototype,"serverSideRowModel",2),mD=ZT([(0,s.dR4)("expansionService")],mD);var vD={version:"31.3.4",moduleName:s.zsj.ServerSideRowModelModule,rowModel:"serverSide",beans:[nD,lD,cD,sD,rD,oD,aD,hD,dD,uD,fD,mD,eD],dependantModules:[fm]},yD=Object.defineProperty,CD=Object.getOwnPropertyDescriptor,bD=(e,t,i,n)=>{for(var s,r=n>1?void 0:n?CD(t,i):t,o=e.length-1;o>=0;o--)(s=e[o])&&(r=(n?s(t,i,r):s(r))||r);return n&&r&&yD(t,i,r),r},SD=class{constructor(e,t,i,n,s,r,o,a,l,c,h){this.rowModel=e,this.filterParams=t,this.createKey=i,this.caseFormat=n,this.columnModel=s,this.valueService=r,this.treeDataOrGrouping=o,this.treeData=a,this.getDataPath=l,this.groupAllowUnbalanced=c,this.addManagedListener=h}extractUniqueValuesAsync(e,t){return new s.oY$(i=>{if(this.rowModel.isRowDataLoaded())i(this.extractUniqueValues(e,t));else{const n=this.addManagedListener(s.sVA.EVENT_ROW_COUNT_READY,()=>{null==n||n(),i(this.extractUniqueValues(e,t))})}})}extractUniqueValues(e,t){const i=new Map,n=this.extractExistingFormattedKeys(t),r=new Set,o=this.treeData&&!!this.getDataPath,a=this.columnModel.getRowGroupColumns(),l=(e,o)=>{const a=this.caseFormat(e);if(!r.has(a)){r.add(a);let l=e,c=s._.makeNull(o);const h=null==n?void 0:n.get(a);null!=h&&(l=h,c=t.get(h)),i.set(l,c)}};return this.rowModel.forEachLeafNode(t=>{if(!t.data||!e(t))return;if(this.treeDataOrGrouping)return void this.addValueForTreeDataOrGrouping(t,o,a,l);let i=this.getValue(t);this.filterParams.convertValuesToStrings?this.addValueForConvertValuesToString(t,i,l):null!=i&&Array.isArray(i)?(i.forEach(e=>{l(this.createKey(e,t),e)}),0===i.length&&l(null,null)):l(this.createKey(i,t),i)}),i}addValueForConvertValuesToString(e,t,i){const n=this.createKey(t,e);null!=n&&Array.isArray(n)?(n.forEach(e=>{const t=s._.toStringOrNull(s._.makeNull(e));i(t,t)}),0===n.length&&i(null,null)):i(n,n)}addValueForTreeDataOrGrouping(e,t,i,n){var r;let o;if(t){if(null==(r=e.childrenAfterGroup)?void 0:r.length)return;o=this.getDataPath(e.data)}else o=i.map(t=>this.valueService.getKeyForNode(t,e)),o.push(this.getValue(e));o&&(o=o.map(e=>s._.toStringOrNull(s._.makeNull(e)))),!t&&this.groupAllowUnbalanced&&(null==o?void 0:o.some(e=>null==e))&&(o=o.filter(e=>null!=e)),n(this.createKey(o),o)}getValue(e){return this.filterParams.getValue(e)}extractExistingFormattedKeys(e){if(!e)return null;const t=new Map;return e.forEach((e,i)=>{t.set(this.caseFormat(i),i)}),t}},wD=class{};wD.SELECT_ALL="__AG_SELECT_ALL__",wD.ADD_SELECTION_TO_FILTER="__AG_ADD_SELECTION_TO_FILTER__";var xD=class{constructor(e,t,i,n){this.valueService=e,this.valueFormatter=t,this.formatter=i,this.column=n,this.displayedKeys=[]}updateDisplayedValuesToAllAvailable(e,t,i){this.displayedKeys=Array.from(i)}updateDisplayedValuesToMatchMiniFilter(e,t,i,n,s){this.displayedKeys=[];for(let t of i)if(null==t)s&&this.displayedKeys.push(t);else{const i=e(t),s=this.valueService.formatValue(this.column,null,i,this.valueFormatter,!1);n(this.formatter(s))&&this.displayedKeys.push(t)}}getDisplayedValueCount(){return this.displayedKeys.length}getDisplayedItem(e){return this.displayedKeys[e]}getSelectAllItem(){return wD.SELECT_ALL}getAddSelectionToFilterItem(){return wD.ADD_SELECTION_TO_FILTER}getDisplayedKeys(){return this.displayedKeys}forEachDisplayedKey(e){this.displayedKeys.forEach(e)}someDisplayedKey(e){return this.displayedKeys.some(e)}hasGroups(){return!1}refresh(){}},ED=class e{constructor(e,t,i,n){this.formatter=e,this.treeListPathGetter=t,this.treeListFormatter=i,this.treeDataOrGrouping=n,this.allDisplayedItemsTree=[],this.activeDisplayedItemsFlat=[],this.selectAllItem={depth:0,filterPasses:!0,available:!0,treeKey:wD.SELECT_ALL,children:this.allDisplayedItemsTree,expanded:!0,key:wD.SELECT_ALL,parentTreeKeys:[]},this.addSelectionToFilterItem={depth:0,filterPasses:!0,available:!0,treeKey:wD.ADD_SELECTION_TO_FILTER,expanded:!0,key:wD.ADD_SELECTION_TO_FILTER,parentTreeKeys:[]}}updateDisplayedValuesToAllAvailable(e,t,i,n){"reload"===n?this.generateItemTree(e,t,i):"otherFilter"===n?(this.updateAvailable(i),this.updateExpandAll()):"miniFilter"===n&&(this.resetFilter(),this.updateExpandAll()),this.flattenItems()}updateDisplayedValuesToMatchMiniFilter(e,t,i,n,s,r){"reload"===r?this.generateItemTree(e,t,i):"otherFilter"===r&&this.updateAvailable(i),this.updateFilter(n,s),this.updateExpandAll(),this.flattenItems()}generateItemTree(e,t,i){var n;this.allDisplayedItemsTree=[],this.groupsExist=!1;const s=this.getTreeListPathGetter(e,i);for(let r of t){const t=null!=(n=s(e(r)))?n:[null];t.length>1&&(this.groupsExist=!0);const o=i.has(r);let a,l=this.allDisplayedItemsTree,c=[];t.forEach((e,i)=>{l||(l=[],a.children=l),a=l.find(t=>{var i;return(null==(i=t.treeKey)?void 0:i.toUpperCase())===(null==e?void 0:e.toUpperCase())}),a||(a={treeKey:e,depth:i,filterPasses:!0,expanded:!1,available:o,parentTreeKeys:c},i===t.length-1&&(a.key=r),l.push(a)),l=a.children,c=[...c,e]})}this.updateAvailable(i),this.selectAllItem.children=this.allDisplayedItemsTree,this.selectAllItem.expanded=!1}getTreeListPathGetter(t,i){if(this.treeListPathGetter)return this.treeListPathGetter;if(this.treeDataOrGrouping)return e=>e;let n=!1;for(const e of i){const i=t(e);if(i instanceof Date){n=!0;break}if(null!=i)break}return n?e.DATE_TREE_LIST_PATH_GETTER:(s._.warnOnce("property treeList=true for Set Filter params, but you did not provide a treeListPathGetter or values of type Date."),e=>[String(e)])}flattenItems(){this.activeDisplayedItemsFlat=[];const e=t=>{t.forEach(t=>{t.filterPasses&&t.available&&(this.activeDisplayedItemsFlat.push(t),t.children&&t.expanded&&e(t.children))})};e(this.allDisplayedItemsTree)}resetFilter(){const e=t=>{t.children&&t.children.forEach(t=>{e(t)}),t.filterPasses=!0};this.allDisplayedItemsTree.forEach(t=>e(t))}updateFilter(e,t){const i=i=>!!i.available&&(null==i.treeKey?t:e(this.formatter(this.treeListFormatter?this.treeListFormatter(i.treeKey,i.depth,i.parentTreeKeys):i.treeKey)));this.allDisplayedItemsTree.forEach(e=>this.recursiveItemCheck(e,!1,i,"filterPasses"))}getDisplayedValueCount(){return this.activeDisplayedItemsFlat.length}getDisplayedItem(e){return this.activeDisplayedItemsFlat[e]}getSelectAllItem(){return this.selectAllItem}getAddSelectionToFilterItem(){return this.addSelectionToFilterItem}getDisplayedKeys(){const e=[];return this.forEachDisplayedKey(t=>e.push(t)),e}forEachDisplayedKey(e){const t=(i,n)=>{i.children?i.expanded&&n||i.children.forEach(e=>{e.filterPasses&&t(e,!1)}):e(i.key)};this.activeDisplayedItemsFlat.forEach(e=>t(e,!0))}someDisplayedKey(e){const t=(i,n)=>i.children?(!i.expanded||!n)&&i.children.some(e=>!!e.filterPasses&&t(e,!1)):e(i.key);return this.activeDisplayedItemsFlat.some(e=>t(e,!0))}hasGroups(){return this.groupsExist}refresh(){this.updateExpandAll(),this.flattenItems()}updateExpandAll(){const e=(t,i,n)=>{for(const s of t){if(!s.filterPasses||!s.available||!s.children)continue;if(i=i||!!s.expanded,n=n||!s.expanded,i&&n)return;const t=e(s.children,i,n);if(void 0===t)return;t?i=!0:n=!0}return i&&n?void 0:i},t=this.getSelectAllItem();t.expanded=e(t.children,!1,!1)}recursiveItemCheck(e,t,i,n){let s=!1;e.children&&e.children.forEach(r=>{const o=this.recursiveItemCheck(r,t||i(e),i,n);s=s||o});const r=t||s||i(e);return e[n]=r,r}updateAvailable(e){const t=t=>e.has(t.key);this.allDisplayedItemsTree.forEach(e=>this.recursiveItemCheck(e,!1,t,"available"))}};ED.DATE_TREE_LIST_PATH_GETTER=e=>e?[String(e.getFullYear()),String(e.getMonth()+1),String(e.getDate())]:null;var MD=ED,AD=class{constructor({caseFormat:e}){this.filteringKeys=null,this.filteringKeysCaseFormatted=null,this.hasNoAppliedFilteringKeys=!1,this.caseFormat=e}allFilteringKeys(){return this.filteringKeys}allFilteringKeysCaseFormatted(){return this.filteringKeysCaseFormatted}noAppliedFilteringKeys(){return this.hasNoAppliedFilteringKeys}setFilteringKeys(e){this.filteringKeys=new Set(e),this.hasNoAppliedFilteringKeys=!this.filteringKeys||0===this.filteringKeys.size,this.filteringKeysCaseFormatted=new Set,this.filteringKeys.forEach(e=>this.filteringKeysCaseFormatted.add(this.caseFormat(e)))}addFilteringKey(e){null==this.filteringKeys&&(this.filteringKeys=new Set,this.filteringKeysCaseFormatted=new Set),this.filteringKeys.add(e),this.filteringKeysCaseFormatted.add(this.caseFormat(e)),this.hasNoAppliedFilteringKeys&&(this.hasNoAppliedFilteringKeys=!1)}hasCaseFormattedFilteringKey(e){return this.filteringKeysCaseFormatted.has(this.caseFormat(e))}hasFilteringKey(e){return this.filteringKeys.has(e)}reset(){this.filteringKeys=null,this.filteringKeysCaseFormatted=null,this.hasNoAppliedFilteringKeys=!1}},TD=class e{constructor(e){this.localEventService=new s.USV,this.miniFilterText=null,this.addCurrentSelectionToFilter=!1,this.providedValues=null,this.allValues=new Map,this.availableKeys=new Set,this.selectedKeys=new Set,this.initialised=!1;const{usingComplexObjects:t,columnModel:i,valueService:n,treeDataTreeList:r,groupingTreeList:o,filterParams:a,gos:l,valueFormatter:c,addManagedListener:h}=e,{column:d,colDef:u,textFormatter:p,doesRowPassOtherFilter:g,suppressSorting:f,comparator:m,rowModel:v,values:y,caseSensitive:C,convertValuesToStrings:b,treeList:S,treeListPathGetter:w,treeListFormatter:x}=a;this.filterParams=a,this.gos=l,this.setIsLoading=e.setIsLoading,this.translate=e.translate,this.caseFormat=e.caseFormat,this.createKey=e.createKey,this.usingComplexObjects=!!e.usingComplexObjects,this.formatter=p||s.U$F.DEFAULT_FORMATTER,this.doesRowPassOtherFilters=g,this.suppressSorting=f||!1,this.convertValuesToStrings=!!b,this.filteringKeys=new AD({caseFormat:this.caseFormat});const E=null!=m?m:u.comparator,M=!!r||!!o;this.compareByValue=!!(t&&E||M||S&&!w),this.entryComparator=M&&!E?this.createTreeDataOrGroupingComparator():!S||w||E?([e,t],[i,n])=>E(t,n):([e,t],[i,n])=>s._.defaultComparator(t,n),this.keyComparator=null!=E?E:s._.defaultComparator,this.caseSensitive=!!C;const A=l.get("getDataPath"),T=l.get("groupAllowUnbalanced");"clientSide"===v.getType()&&(this.clientSideValuesExtractor=new SD(v,this.filterParams,this.createKey,this.caseFormat,i,n,M,!!r,A,T,h)),null==y?this.valuesType=2:(this.valuesType=Array.isArray(y)?0:1,this.providedValues=y),this.displayValueModel=S?new MD(this.formatter,w,x,r||o):new xD(n,c,this.formatter,d),this.updateAllValues().then(e=>this.resetSelectionState(e||[]))}addEventListener(e,t,i){this.localEventService.addEventListener(e,t,i)}removeEventListener(e,t,i){this.localEventService.removeEventListener(e,t,i)}updateOnParamsChange(e){return new s.oY$(t=>{const{values:i,textFormatter:n,suppressSorting:r}=e,o=this.providedValues,a=this.suppressSorting;if(this.filterParams=e,this.formatter=n||s.U$F.DEFAULT_FORMATTER,this.suppressSorting=r||!1,this.providedValues=null!=i?i:null,this.providedValues!==o||this.suppressSorting!==a){i&&0!==i.length?this.valuesType=Array.isArray(i)?0:1:(this.valuesType=2,this.providedValues=null);const e=this.getModel();this.updateAllValues().then(i=>{this.setModel(e).then(()=>t())})}else t()})}refreshValues(){return new s.oY$(e=>{this.allValuesPromise.then(()=>{const t=this.getModel();this.updateAllValues(),this.setModel(t).then(()=>e())})})}overrideValues(e){return new s.oY$(t=>{this.allValuesPromise.then(()=>{this.valuesType=0,this.providedValues=e,this.refreshValues().then(()=>t())})})}refreshAfterAnyFilterChanged(){return this.showAvailableOnly()?this.allValuesPromise.then(e=>(this.updateAvailableKeys(null!=e?e:[],"otherFilter"),!0)):s.oY$.resolve(!1)}isInitialised(){return this.initialised}updateAllValues(){return this.allValuesPromise=new s.oY$(e=>{switch(this.valuesType){case 2:this.getValuesFromRowsAsync(!1).then(t=>e(this.processAllValues(t)));break;case 0:e(this.processAllValues(this.uniqueValues(this.validateProvidedValues(this.providedValues))));break;case 1:{this.setIsLoading(!0);const t=this.providedValues,{column:i,colDef:n}=this.filterParams,s=this.gos.addGridCommonParams({success:t=>{this.setIsLoading(!1),e(this.processAllValues(this.uniqueValues(this.validateProvidedValues(t))))},colDef:n,column:i});window.setTimeout(()=>t(s),0);break}default:throw new Error("Unrecognised valuesType")}}),this.allValuesPromise.then(e=>this.updateAvailableKeys(e||[],"reload")).then(()=>this.initialised=!0),this.allValuesPromise}processAllValues(e){const t=this.sortKeys(e);return this.allValues=null!=e?e:new Map,t}validateProvidedValues(e){if(this.usingComplexObjects&&(null==e?void 0:e.length)){const t=e[0];t&&"object"!=typeof t&&"function"!=typeof t&&(null==this.createKey(t)?s._.warnOnce("Set Filter Key Creator is returning null for provided values and provided values are primitives. Please provide complex objects or set convertValuesToStrings=true in the filterParams. See https://www.ag-grid.com/javascript-data-grid/filter-set-filter-list/#filter-value-types"):s._.warnOnce("Set Filter has a Key Creator, but provided values are primitives. Did you mean to provide complex objects or enable convertValuesToStrings?"))}return e}setValuesType(e){this.valuesType=e}getValuesType(){return this.valuesType}isKeyAvailable(e){return this.availableKeys.has(e)}showAvailableOnly(){return 2===this.valuesType}updateAvailableKeys(t,i){const n=this.showAvailableOnly()?this.sortKeys(this.getValuesFromRows(!0)):t;this.availableKeys=new Set(n),this.localEventService.dispatchEvent({type:e.EVENT_AVAILABLE_VALUES_CHANGED}),this.updateDisplayedValues(i,t)}sortKeys(e){const t=null!=e?e:new Map;if(this.suppressSorting)return Array.from(t.keys());let i;return i=this.compareByValue?Array.from(t.entries()).sort(this.entryComparator).map(([e])=>e):Array.from(t.keys()).sort(this.keyComparator),this.filterParams.excelMode&&t.has(null)&&(i=i.filter(e=>null!=e),i.push(null)),i}getParamsForValuesFromRows(e=!1){return this.clientSideValuesExtractor?{predicate:t=>!e||this.doesRowPassOtherFilters(t),existingValues:e&&!this.caseSensitive?this.allValues:void 0}:(s._.doOnce(()=>{console.error("AG Grid: Set Filter cannot initialise because you are using a row model that does not contain all rows in the browser. Either use a different filter type, or configure Set Filter such that you provide it with values")},"setFilterValueNotCSRM"),null)}getValuesFromRows(e=!1){const t=this.getParamsForValuesFromRows(e);return t?this.clientSideValuesExtractor.extractUniqueValues(t.predicate,t.existingValues):null}getValuesFromRowsAsync(e=!1){const t=this.getParamsForValuesFromRows(e);return t?this.clientSideValuesExtractor.extractUniqueValuesAsync(t.predicate,t.existingValues):s.oY$.resolve(null)}setMiniFilter(e){return e=s._.makeNull(e),this.miniFilterText!==e&&(null===e&&this.setAddCurrentSelectionToFilter(!1),this.miniFilterText=e,this.updateDisplayedValues("miniFilter"),!0)}getMiniFilter(){return this.miniFilterText}updateDisplayedValues(e,t){if("expansion"===e)return void this.displayValueModel.refresh();if(null==this.miniFilterText)return void this.displayValueModel.updateDisplayedValuesToAllAvailable(e=>this.getValue(e),t,this.availableKeys,e);const i=this.caseFormat(this.formatter(this.miniFilterText)||""),n=e=>null!=e&&this.caseFormat(e).indexOf(i)>=0,s=!!this.filterParams.excelMode&&n(this.translate("blanks"));this.displayValueModel.updateDisplayedValuesToMatchMiniFilter(e=>this.getValue(e),t,this.availableKeys,n,s,e)}getDisplayedValueCount(){return this.displayValueModel.getDisplayedValueCount()}getDisplayedItem(e){return this.displayValueModel.getDisplayedItem(e)}getSelectAllItem(){return this.displayValueModel.getSelectAllItem()}getAddSelectionToFilterItem(){return this.displayValueModel.getAddSelectionToFilterItem()}hasSelections(){return this.filterParams.defaultToNothingSelected?this.selectedKeys.size>0:this.allValues.size!==this.selectedKeys.size}getKeys(){return Array.from(this.allValues.keys())}getValues(){return Array.from(this.allValues.values())}getValue(e){return this.allValues.get(e)}setAddCurrentSelectionToFilter(e){this.addCurrentSelectionToFilter=e}isInWindowsExcelMode(){return"windows"===this.filterParams.excelMode}isAddCurrentSelectionToFilterChecked(){return this.isInWindowsExcelMode()&&this.addCurrentSelectionToFilter}showAddCurrentSelectionToFilter(){return this.isInWindowsExcelMode()&&s._.exists(this.miniFilterText)&&this.miniFilterText.length>0}selectAllMatchingMiniFilter(e=!1){null==this.miniFilterText?this.selectedKeys=new Set(this.allValues.keys()):(e&&this.selectedKeys.clear(),this.displayValueModel.forEachDisplayedKey(e=>this.selectedKeys.add(e)))}deselectAllMatchingMiniFilter(){null==this.miniFilterText?this.selectedKeys.clear():this.displayValueModel.forEachDisplayedKey(e=>this.selectedKeys.delete(e))}selectKey(e){this.selectedKeys.add(e)}deselectKey(e){this.filterParams.excelMode&&this.isEverythingVisibleSelected()&&this.resetSelectionState(this.displayValueModel.getDisplayedKeys()),this.selectedKeys.delete(e)}isKeySelected(e){return this.selectedKeys.has(e)}isEverythingVisibleSelected(){return!this.displayValueModel.someDisplayedKey(e=>!this.isKeySelected(e))}isNothingVisibleSelected(){return!this.displayValueModel.someDisplayedKey(e=>this.isKeySelected(e))}getModel(){if(!this.hasSelections())return null;const e=this.isAddCurrentSelectionToFilterChecked()?this.filteringKeys.allFilteringKeys():null;if(e&&e.size>0){if(this.selectedKeys){const t=new Set([...Array.from(e),...Array.from(this.selectedKeys).filter(t=>!e.has(t))]);return Array.from(t)}return Array.from(e)}return Array.from(this.selectedKeys)}setModel(e){return this.allValuesPromise.then(t=>{if(null==e)this.resetSelectionState(null!=t?t:[]);else{this.selectedKeys.clear();const t=new Map;this.allValues.forEach((e,i)=>{t.set(this.caseFormat(i),i)}),e.forEach(e=>{const i=this.caseFormat(s._.makeNull(e)),n=t.get(i);void 0!==n&&this.selectKey(n)})}})}uniqueValues(e){const t=new Map,i=new Set;return(null!=e?e:[]).forEach(e=>{const n=s._.makeNull(e),r=this.convertAndGetKey(n),o=this.caseFormat(r);i.has(o)||(i.add(o),t.set(r,n))}),t}convertAndGetKey(e){return this.convertValuesToStrings?e:this.createKey(e)}resetSelectionState(e){this.filterParams.defaultToNothingSelected?this.selectedKeys.clear():this.selectedKeys=new Set(e)}hasGroups(){return this.displayValueModel.hasGroups()}createTreeDataOrGroupingComparator(){return([e,t],[i,n])=>{if(null==t)return null==n?0:-1;if(null==n)return 1;for(let e=0;e<t.length;e++){if(e>=n.length)return 1;const i=s._.defaultComparator(t[e],n[e]);if(0!==i)return i}return 0}}setAppliedModelKeys(e){this.filteringKeys.setFilteringKeys(e)}addToAppliedModelKeys(e){this.filteringKeys.addFilteringKey(e)}getAppliedModelKeys(){return this.filteringKeys.allFilteringKeys()}getCaseFormattedAppliedModelKeys(){return this.filteringKeys.allFilteringKeysCaseFormatted()}hasAppliedModelKey(e){return this.filteringKeys.hasCaseFormattedFilteringKey(e)}hasAnyAppliedModelKey(){return!this.filteringKeys.noAppliedFilteringKeys()}};TD.EVENT_AVAILABLE_VALUES_CHANGED="availableValuesChanged";var DD=TD,ID=class e extends s.uAl{constructor(t){var i;super(t.isGroup?e.GROUP_TEMPLATE:e.TEMPLATE),this.focusWrapper=t.focusWrapper,this.value=t.value,this.params=t.params,this.translate=t.translate,this.valueFormatter=t.valueFormatter,this.item=t.item,this.isSelected=t.isSelected,this.isTree=t.isTree,this.depth=null!=(i=t.depth)?i:0,this.isGroup=t.isGroup,this.groupsExist=t.groupsExist,this.isExpanded=t.isExpanded,this.hasIndeterminateExpandState=t.hasIndeterminateExpandState}init(){this.addDestroyFunc(()=>{var e;return null==(e=this.destroyCellRendererComponent)?void 0:e.call(this)}),this.render(),this.eCheckbox.setLabelEllipsis(!0).setValue(this.isSelected,!0).setDisabled(!!this.params.readOnly).getInputElement().setAttribute("tabindex","-1"),this.refreshVariableAriaLabels(),this.isTree&&(this.depth>0&&this.addCssClass("ag-set-filter-indent-"+this.depth),this.isGroup?this.setupExpansion():this.groupsExist&&this.addCssClass("ag-set-filter-add-group-indent"),s._.setAriaLevel(this.getAriaElement(),this.depth+1)),this.refreshAriaChecked(),this.params.readOnly||this.eCheckbox.onValueChange(e=>this.onCheckboxChanged(!!e))}getFocusableElement(){return this.focusWrapper}setupExpansion(){this.eGroupClosedIcon.appendChild(s._.createIcon("setFilterGroupClosed",this.gos,null)),this.eGroupOpenedIcon.appendChild(s._.createIcon("setFilterGroupOpen",this.gos,null)),this.addManagedListener(this.eGroupClosedIcon,"click",this.onExpandOrContractClicked.bind(this)),this.addManagedListener(this.eGroupOpenedIcon,"click",this.onExpandOrContractClicked.bind(this)),this.hasIndeterminateExpandState&&(this.eGroupIndeterminateIcon.appendChild(s._.createIcon("setFilterGroupIndeterminate",this.gos,null)),this.addManagedListener(this.eGroupIndeterminateIcon,"click",this.onExpandOrContractClicked.bind(this))),this.setExpandedIcons(),this.refreshAriaExpanded()}onExpandOrContractClicked(){this.setExpanded(!this.isExpanded)}setExpanded(t,i){if(this.isGroup&&t!==this.isExpanded){this.isExpanded=t;const n={type:e.EVENT_EXPANDED_CHANGED,isExpanded:!!t,item:this.item};i||this.dispatchEvent(n),this.setExpandedIcons(),this.refreshAriaExpanded()}}setExpandedIcons(){s._.setDisplayed(this.eGroupClosedIcon,this.hasIndeterminateExpandState?!1===this.isExpanded:!this.isExpanded),s._.setDisplayed(this.eGroupOpenedIcon,!0===this.isExpanded),this.hasIndeterminateExpandState&&s._.setDisplayed(this.eGroupIndeterminateIcon,void 0===this.isExpanded)}onCheckboxChanged(t){this.isSelected=t;const i={type:e.EVENT_SELECTION_CHANGED,isSelected:t,item:this.item};this.dispatchEvent(i),this.refreshVariableAriaLabels(),this.refreshAriaChecked()}toggleSelected(){this.params.readOnly||this.setSelected(!this.isSelected)}setSelected(e,t){this.isSelected=e,this.eCheckbox.setValue(e,t),this.refreshAriaChecked()}refreshVariableAriaLabels(){if(!this.isTree)return;const e=this.localeService.getLocaleTextFunc(),t=this.eCheckbox.getValue(),i=void 0===t?e("ariaIndeterminate","indeterminate"):t?e("ariaVisible","visible"):e("ariaHidden","hidden"),n=e("ariaToggleVisibility","Press SPACE to toggle visibility");s._.setAriaLabelledBy(this.eCheckbox.getInputElement(),void 0),this.eCheckbox.setInputAriaLabel(`${n} (${i})`)}setupFixedAriaLabels(e){if(!this.isTree)return;const t=this.localeService.getLocaleTextFunc()("ariaFilterValue","Filter Value"),i=this.getAriaElement();s._.setAriaLabel(i,`${e} ${t}`),s._.setAriaDescribedBy(i,this.eCheckbox.getInputElement().id)}refreshAriaChecked(){const e=this.getAriaElement();s._.setAriaChecked(e,this.eCheckbox.getValue())}refreshAriaExpanded(){s._.setAriaExpanded(this.getAriaElement(),!!this.isExpanded)}refresh(e,t,i){var n,s;if(this.item=e,t!==this.isSelected&&this.setSelected(t,!0),this.setExpanded(i,!0),this.valueFunction){const e=this.valueFunction();this.setTooltipAndCellRendererParams(e,e),this.cellRendererComponent||this.renderCellWithoutCellRenderer()}if(this.cellRendererComponent&&!(null==(s=(n=this.cellRendererComponent).refresh)?void 0:s.call(n,this.cellRendererParams))){const e=this.cellRendererComponent;this.renderCell(),this.destroyBean(e)}}render(){const{params:{column:e}}=this;let{value:t}=this,i=null;"function"==typeof t?(this.valueFunction=t,i=this.valueFunction(),t=i):i=this.isTree?s._.toStringOrNull(t):this.getFormattedValue(e,t),this.setTooltipAndCellRendererParams(t,i),this.renderCell()}setTooltipAndCellRendererParams(e,t){const i="whenTruncated"===this.gos.get("tooltipShowMode");if(this.params.showTooltips&&(!i||!this.params.cellRenderer)){const n=null!=t?t:s._.toStringOrNull(e);let r;i&&(r=()=>{const e=this.eCheckbox.getGui().querySelector(".ag-label");return!e||e.scrollWidth>e.clientWidth}),this.setTooltip({newTooltipText:n,location:"setFilterValue",getColDef:()=>this.params.colDef,getColumn:()=>this.params.column,shouldDisplayTooltip:r})}this.cellRendererParams=this.gos.addGridCommonParams({value:e,valueFormatted:t,colDef:this.params.colDef,column:this.params.column,setTooltip:(e,t)=>{this.setTooltip({newTooltipText:e,getColDef:()=>this.params.colDef,getColumn:()=>this.params.column,location:"setFilterValue",shouldDisplayTooltip:t})}})}getTooltipParams(){const e=super.getTooltipParams();return e.location="setFilterValue",e.colDef=this.getComponentHolder(),this.isTree&&(e.level=this.depth),e}getFormattedValue(e,t){return this.valueService.formatValue(e,null,t,this.valueFormatter,!1)}renderCell(){const e=this.userComponentFactory.getSetFilterCellRendererDetails(this.params,this.cellRendererParams),t=e?e.newAgStackInstance():void 0;null!=t?t.then(e=>{e&&(this.cellRendererComponent=e,this.eCheckbox.setLabel(e.getGui()),this.destroyCellRendererComponent=()=>this.destroyBean(e))}):this.renderCellWithoutCellRenderer()}renderCellWithoutCellRenderer(){var e;let t=null!=(e=null==this.cellRendererParams.valueFormatted?this.cellRendererParams.value:this.cellRendererParams.valueFormatted)?e:this.translate("blanks");"string"!=typeof t&&(s._.warnOnce(`Set Filter Value Formatter must return string values. Please ensure the Set Filter Value Formatter returns string values for complex objects, or set convertValuesToStrings=true in the filterParams. See ${this.getFrameworkOverrides().getDocLink("filter-set-filter-list/#filter-value-types")}`),t=""),this.eCheckbox.setLabel(t),this.setupFixedAriaLabels(t)}getComponentHolder(){return this.params.column.getColDef()}};ID.EVENT_SELECTION_CHANGED="selectionChanged",ID.EVENT_EXPANDED_CHANGED="expandedChanged",ID.GROUP_TEMPLATE='\n        <div class="ag-set-filter-item" aria-hidden="true">\n            <span class="ag-set-filter-group-icons">\n                <span class="ag-set-filter-group-closed-icon" ref="eGroupClosedIcon"></span>\n                <span class="ag-set-filter-group-opened-icon" ref="eGroupOpenedIcon"></span>\n                <span class="ag-set-filter-group-indeterminate-icon" ref="eGroupIndeterminateIcon"></span>\n            </span>\n            <ag-checkbox ref="eCheckbox" class="ag-set-filter-item-checkbox"></ag-checkbox>\n        </div>',ID.TEMPLATE='\n        <div class="ag-set-filter-item">\n            <ag-checkbox ref="eCheckbox" class="ag-set-filter-item-checkbox"></ag-checkbox>\n        </div>',bD([(0,s.dsm)("valueService")],ID.prototype,"valueService",2),bD([(0,s.dsm)("userComponentFactory")],ID.prototype,"userComponentFactory",2),bD([(0,s.PIB)("eCheckbox")],ID.prototype,"eCheckbox",2),bD([(0,s.PIB)("eGroupOpenedIcon")],ID.prototype,"eGroupOpenedIcon",2),bD([(0,s.PIB)("eGroupClosedIcon")],ID.prototype,"eGroupClosedIcon",2),bD([(0,s.PIB)("eGroupIndeterminateIcon")],ID.prototype,"eGroupIndeterminateIcon",2),bD([s.o7C],ID.prototype,"init",1);var RD=ID,LD={loadingOoo:"Loading...",blanks:"(Blanks)",searchOoo:"Search...",selectAll:"(Select All)",selectAllSearchResults:"(Select All Search Results)",addCurrentSelectionToFilter:"Add current selection to filter",noMatches:"No matches."},kD=class{getModelAsString(e,t){const{values:i}=e||t.getModel()||{},n=t.getValueModel();if(null==i||null==n)return"";const s=i.filter(e=>n.isKeyAvailable(e)),r=s.length;return`(${r}) ${s.slice(0,10).map(e=>t.getFormattedValue(e)).join(",")}${r>10?",...":""}`}},PD=class extends s.Q5x{constructor(){super("setFilter"),this.valueModel=null,this.setFilterParams=null,this.virtualList=null,this.caseSensitive=!1,this.convertValuesToStrings=!1,this.treeDataTreeList=!1,this.groupingTreeList=!1,this.hardRefreshVirtualList=!1,this.noValueFormatterSupplied=!1,this.filterModelFormatter=new kD,this.updateSetFilterOnParamsChange=e=>{var t;this.setFilterParams=e,this.convertValuesToStrings=!!e.convertValuesToStrings,this.caseSensitive=!!e.caseSensitive;const i=null!=(t=e.keyCreator)?t:e.colDef.keyCreator;this.setValueFormatter(e.valueFormatter,i,this.convertValuesToStrings,!!e.treeList,!!e.colDef.refData);const n=e.column.getId().startsWith(s.JPk);this.treeDataTreeList=this.gos.get("treeData")&&!!e.treeList&&n,this.getDataPath=this.gos.get("getDataPath"),this.groupingTreeList=!!this.columnModel.getRowGroupColumns().length&&!!e.treeList&&n,this.createKey=this.generateCreateKey(i,this.convertValuesToStrings,this.treeDataTreeList||this.groupingTreeList)}}postConstruct(){super.postConstruct()}updateUiVisibility(){}createBodyTemplate(){return`\n            <div class="ag-set-filter">\n                <div ref="eFilterLoading" class="ag-filter-loading ag-hidden">${this.translateForSetFilter("loadingOoo")}</div>\n                <ag-input-text-field class="ag-mini-filter" ref="eMiniFilter"></ag-input-text-field>\n                <div ref="eFilterNoMatches" class="ag-filter-no-matches ag-hidden">${this.translateForSetFilter("noMatches")}</div>\n                <div ref="eSetFilterList" class="ag-set-filter-list" role="presentation"></div>\n            </div>`}handleKeyDown(e){if(super.handleKeyDown(e),!e.defaultPrevented)switch(e.key){case s.DDm.SPACE:this.handleKeySpace(e);break;case s.DDm.ENTER:this.handleKeyEnter(e);break;case s.DDm.LEFT:this.handleKeyLeft(e);break;case s.DDm.RIGHT:this.handleKeyRight(e)}}handleKeySpace(e){var t;null==(t=this.getComponentForKeyEvent(e))||t.toggleSelected()}handleKeyEnter(e){if(!this.setFilterParams)return;const{excelMode:t,readOnly:i}=this.setFilterParams||{};t&&!i&&(e.preventDefault(),this.onBtApply(!1,!1,e),"mac"===this.setFilterParams.excelMode&&this.eMiniFilter.getInputElement().select())}handleKeyLeft(e){var t;null==(t=this.getComponentForKeyEvent(e))||t.setExpanded(!1)}handleKeyRight(e){var t;null==(t=this.getComponentForKeyEvent(e))||t.setExpanded(!0)}getComponentForKeyEvent(e){var t;if(!this.eSetFilterList.contains(this.gos.getActiveDomElement())||!this.virtualList)return;const i=this.virtualList.getLastFocusedRow();if(null==i)return;const n=this.virtualList.getComponentAt(i);if(null==n)return;e.preventDefault();const{readOnly:s}=null!=(t=this.setFilterParams)?t:{};return s?void 0:n}getCssIdentifier(){return"set-filter"}setModel(e){var t;return null==e&&null==(null==(t=this.valueModel)?void 0:t.getModel())?(this.setMiniFilter(null),s.oY$.resolve()):super.setModel(e)}refresh(e){var t,i,n;return!!super.refresh(e)&&(!["treeList","treeListFormatter","treeListPathGetter","keyCreator","convertValuesToStrings","caseSensitive","comparator","suppressSelectAll","excelMode"].some(t=>{var i;return e[t]!==(null==(i=this.setFilterParams)?void 0:i[t])})&&!this.haveColDefParamsChanged(e.colDef)&&(super.updateParams(e),this.updateSetFilterOnParamsChange(e),this.updateMiniFilter(),e.cellRenderer===(null==(t=this.setFilterParams)?void 0:t.cellRenderer)&&e.valueFormatter===(null==(i=this.setFilterParams)?void 0:i.valueFormatter)||this.checkAndRefreshVirtualList(),null==(n=this.valueModel)||n.updateOnParamsChange(e).then(()=>{var e;(null==(e=this.valueModel)?void 0:e.hasSelections())&&this.refreshFilterValues()}),!0))}haveColDefParamsChanged(e){var t;const i=null==(t=this.setFilterParams)?void 0:t.colDef;return["keyCreator","filterValueGetter"].some(t=>e[t]!==(null==i?void 0:i[t]))}setModelAndRefresh(e){return this.valueModel?this.valueModel.setModel(e).then(()=>this.checkAndRefreshVirtualList()):s.oY$.resolve()}resetUiToDefaults(){return this.setMiniFilter(null),this.setModelAndRefresh(null)}setModelIntoUi(e){this.setMiniFilter(null);const t=null==e?null:e.values;return this.setModelAndRefresh(t)}getModelFromUi(){if(!this.valueModel)throw new Error("Value model has not been created.");const e=this.valueModel.getModel();return e?{values:e,filterType:this.getFilterType()}:null}getFilterType(){return"set"}getValueModel(){return this.valueModel}areModelsEqual(e,t){return null==e&&null==t||null!=e&&null!=t&&s._.areEqual(e.values,t.values)}setParams(e){var t;this.applyExcelModeOptions(e),super.setParams(e),this.updateSetFilterOnParamsChange(e);const i=null!=(t=e.keyCreator)?t:e.colDef.keyCreator;this.valueModel=new DD({filterParams:e,setIsLoading:e=>this.setIsLoading(e),translate:e=>this.translateForSetFilter(e),caseFormat:e=>this.caseFormat(e),createKey:this.createKey,valueFormatter:this.valueFormatter,usingComplexObjects:!!i,gos:this.gos,columnModel:this.columnModel,valueService:this.valueService,treeDataTreeList:this.treeDataTreeList,groupingTreeList:this.groupingTreeList,addManagedListener:(e,t)=>this.addManagedListener(this.eventService,e,t)}),this.initialiseFilterBodyUi(),this.addEventListenersForDataChanges()}onAddCurrentSelectionToFilterChange(e){if(!this.valueModel)throw new Error("Value model has not been created.");this.valueModel.setAddCurrentSelectionToFilter(e)}setValueFormatter(e,t,i,n,r){let o=e;if(!o){if(t&&!i&&!n)throw new Error("AG Grid: Must supply a Value Formatter in Set Filter params when using a Key Creator unless convertValuesToStrings is enabled");this.noValueFormatterSupplied=!0,r||(o=e=>s._.toStringOrNull(e.value))}this.valueFormatter=o}generateCreateKey(e,t,i){if(i&&!e)throw new Error("AG Grid: Must supply a Key Creator in Set Filter params when `treeList = true` on a group column, and Tree Data or Row Grouping is enabled.");return e?(t,i=null)=>{const n=this.getKeyCreatorParams(t,i);return s._.makeNull(e(n))}:t?e=>Array.isArray(e)?e:s._.makeNull(s._.toStringOrNull(e)):e=>s._.makeNull(s._.toStringOrNull(e))}getFormattedValue(e){var t;let i=this.valueModel.getValue(e);this.noValueFormatterSupplied&&(this.treeDataTreeList||this.groupingTreeList)&&Array.isArray(i)&&(i=s._.last(i));const n=this.valueService.formatValue(this.setFilterParams.column,null,i,this.valueFormatter,!1);return null!=(t=null==n?s._.toStringOrNull(i):n)?t:this.translateForSetFilter("blanks")}applyExcelModeOptions(e){"windows"===e.excelMode?(e.buttons||(e.buttons=["apply","cancel"]),null==e.closeOnApply&&(e.closeOnApply=!0)):"mac"===e.excelMode&&(e.buttons||(e.buttons=["reset"]),null==e.applyMiniFilterWhileTyping&&(e.applyMiniFilterWhileTyping=!0),null==e.debounceMs&&(e.debounceMs=500)),e.excelMode&&e.defaultToNothingSelected&&(e.defaultToNothingSelected=!1,s._.warnOnce('The Set Filter Parameter "defaultToNothingSelected" value was ignored because it does not work when "excelMode" is used.'))}addEventListenersForDataChanges(){this.isValuesTakenFromGrid()&&(this.addManagedListener(this.eventService,s.sVA.EVENT_CELL_VALUE_CHANGED,e=>{this.setFilterParams&&e.column===this.setFilterParams.column&&this.syncAfterDataChange()}),this.addManagedPropertyListeners(["treeData","getDataPath","groupAllowUnbalanced"],()=>{this.syncAfterDataChange()}))}syncAfterDataChange(){if(!this.valueModel)throw new Error("Value model has not been created.");return this.valueModel.refreshValues().then(()=>{this.checkAndRefreshVirtualList(),this.onBtApply(!1,!0)})}setIsLoading(e){s._.setDisplayed(this.eFilterLoading,e),e||(this.hardRefreshVirtualList=!0)}initialiseFilterBodyUi(){this.initVirtualList(),this.initMiniFilter()}initVirtualList(){if(!this.setFilterParams)throw new Error("Set filter params have not been provided.");if(!this.valueModel)throw new Error("Value model has not been created.");const e=this.localeService.getLocaleTextFunc()("ariaFilterList","Filter List"),t=!!this.setFilterParams.treeList,i=this.virtualList=this.createBean(new s.wjn({cssIdentifier:"filter",ariaRole:t?"tree":"listbox",listName:e})),n=this.getRefElement("eSetFilterList");t&&n.classList.add("ag-set-filter-tree-list"),n&&n.appendChild(i.getGui());const{cellHeight:r}=this.setFilterParams;let o;null!=r&&i.setRowHeight(r),i.setComponentCreator((e,i)=>this.createSetListItem(e,t,i)),i.setComponentUpdater((e,t)=>this.updateSetListItem(e,t)),o=this.setFilterParams.suppressSelectAll?new ND(this.valueModel):new OD(this.valueModel,()=>this.isSelectAllSelected()),t&&(o=new _D(o)),i.setModel(o)}getSelectAllLabel(){if(!this.setFilterParams)throw new Error("Set filter params have not been provided.");if(!this.valueModel)throw new Error("Value model has not been created.");const e=null!=this.valueModel.getMiniFilter()&&this.setFilterParams.excelMode?"selectAllSearchResults":"selectAll";return this.translateForSetFilter(e)}getAddSelectionToFilterLabel(){if(!this.setFilterParams)throw new Error("Set filter params have not been provided.");if(!this.valueModel)throw new Error("Value model has not been created.");return this.translateForSetFilter("addCurrentSelectionToFilter")}createSetListItem(e,t,i){if(!this.setFilterParams)throw new Error("Set filter params have not been provided.");if(!this.valueModel)throw new Error("Value model has not been created.");const n=this.valueModel.hasGroups(),{isSelected:s,isExpanded:r}=this.isSelectedExpanded(e),{value:o,depth:a,isGroup:l,hasIndeterminateExpandState:c,selectedListener:h,expandedListener:d}=this.newSetListItemAttributes(e,t),u={focusWrapper:i,value:o,params:this.setFilterParams,translate:e=>this.translateForSetFilter(e),valueFormatter:this.valueFormatter,item:e,isSelected:s,isTree:t,depth:a,groupsExist:n,isGroup:l,isExpanded:r,hasIndeterminateExpandState:c},p=this.createBean(new RD(u));return p.addEventListener(RD.EVENT_SELECTION_CHANGED,h),d&&p.addEventListener(RD.EVENT_EXPANDED_CHANGED,d),p}newSetTreeItemAttributes(e,t){var i,n,s,r,o,a;if(!this.setFilterParams)throw new Error("Set filter params have not been provided.");if(!this.valueModel)throw new Error("Value model has not been created.");const l=this.valueModel.hasGroups();return e.key===wD.SELECT_ALL?{value:()=>this.getSelectAllLabel(),isGroup:l,depth:e.depth,hasIndeterminateExpandState:!0,selectedListener:e=>this.onSelectAll(e.isSelected),expandedListener:e=>this.onExpandAll(e.item,e.isExpanded)}:e.key===wD.ADD_SELECTION_TO_FILTER?{value:()=>this.getAddSelectionToFilterLabel(),depth:e.depth,isGroup:!1,hasIndeterminateExpandState:!1,selectedListener:e=>{this.onAddCurrentSelectionToFilterChange(e.isSelected)}}:e.children?{value:null!=(s=null==(n=(i=this.setFilterParams).treeListFormatter)?void 0:n.call(i,e.treeKey,e.depth,e.parentTreeKeys))?s:e.treeKey,depth:e.depth,isGroup:!0,selectedListener:e=>this.onGroupItemSelected(e.item,e.isSelected),expandedListener:e=>this.onExpandedChanged(e.item,e.isExpanded)}:{value:null!=(a=null==(o=(r=this.setFilterParams).treeListFormatter)?void 0:o.call(r,e.treeKey,e.depth,e.parentTreeKeys))?a:e.treeKey,depth:e.depth,selectedListener:e=>this.onItemSelected(e.item.key,e.isSelected)}}newSetListItemAttributes(e,t){if(!this.setFilterParams)throw new Error("Set filter params have not been provided.");if(!this.valueModel)throw new Error("Value model has not been created.");return this.isSetFilterModelTreeItem(e)?this.newSetTreeItemAttributes(e,t):e===wD.SELECT_ALL?{value:()=>this.getSelectAllLabel(),selectedListener:e=>this.onSelectAll(e.isSelected)}:e===wD.ADD_SELECTION_TO_FILTER?{value:()=>this.getAddSelectionToFilterLabel(),selectedListener:e=>{this.onAddCurrentSelectionToFilterChange(e.isSelected)}}:{value:this.valueModel.getValue(e),selectedListener:e=>this.onItemSelected(e.item,e.isSelected)}}updateSetListItem(e,t){const{isSelected:i,isExpanded:n}=this.isSelectedExpanded(e);t.refresh(e,i,n)}isSelectedExpanded(e){let t,i;return this.isSetFilterModelTreeItem(e)?(i=e.expanded,t=e.key===wD.SELECT_ALL?this.isSelectAllSelected():e.key===wD.ADD_SELECTION_TO_FILTER?this.valueModel.isAddCurrentSelectionToFilterChecked():e.children?this.areAllChildrenSelected(e):this.valueModel.isKeySelected(e.key)):t=e===wD.SELECT_ALL?this.isSelectAllSelected():e===wD.ADD_SELECTION_TO_FILTER?this.valueModel.isAddCurrentSelectionToFilterChecked():this.valueModel.isKeySelected(e),{isSelected:t,isExpanded:i}}isSetFilterModelTreeItem(e){return void 0!==(null==e?void 0:e.treeKey)}initMiniFilter(){if(!this.setFilterParams)throw new Error("Set filter params have not been provided.");if(!this.valueModel)throw new Error("Value model has not been created.");const{eMiniFilter:e,localeService:t}=this,i=t.getLocaleTextFunc();e.setDisplayed(!this.setFilterParams.suppressMiniFilter),e.setValue(this.valueModel.getMiniFilter()),e.onValueChange(()=>this.onMiniFilterInput()),e.setInputAriaLabel(i("ariaSearchFilterValues","Search filter values")),this.addManagedListener(e.getInputElement(),"keydown",e=>this.onMiniFilterKeyDown(e))}updateMiniFilter(){if(!this.setFilterParams)throw new Error("Set filter params have not been provided.");if(!this.valueModel)throw new Error("Value model has not been created.");const{eMiniFilter:e}=this;e.isDisplayed()!==!this.setFilterParams.suppressMiniFilter&&e.setDisplayed(!this.setFilterParams.suppressMiniFilter);const t=this.valueModel.getMiniFilter();e.getValue()!==t&&e.setValue(t)}afterGuiAttached(e){if(!this.setFilterParams)throw new Error("Set filter params have not been provided.");super.afterGuiAttached(e),this.resetExpansion(),this.refreshVirtualList();const{eMiniFilter:t}=this;t.setInputPlaceholder(this.translateForSetFilter("searchOoo")),e&&e.suppressFocus||t.getFocusableElement().focus()}afterGuiDetached(){var e,t;super.afterGuiDetached(),(null==(e=this.setFilterParams)?void 0:e.excelMode)&&this.resetMiniFilter();const i=this.getModel();!(null==(t=this.setFilterParams)?void 0:t.excelMode)&&this.areModelsEqual(i,this.getModelFromUi())||(this.resetUiToActiveModel(i),this.showOrHideResults())}applyModel(e="api"){if(!this.setFilterParams)throw new Error("Set filter params have not been provided.");if(!this.valueModel)throw new Error("Value model has not been created.");this.setFilterParams.excelMode&&"rowDataUpdated"!==e&&this.valueModel.isEverythingVisibleSelected()&&this.valueModel.selectAllMatchingMiniFilter();const t=this.valueModel.showAddCurrentSelectionToFilter()&&this.valueModel.isAddCurrentSelectionToFilterChecked();if(t&&!this.getModel())return!1;const i=super.applyModel(e),n=this.getModel();return n?(t||this.valueModel.setAppliedModelKeys(new Set),n.values.forEach(e=>{this.valueModel.addToAppliedModelKeys(e)})):t||this.valueModel.setAppliedModelKeys(null),i}isModelValid(e){return!this.setFilterParams||!this.setFilterParams.excelMode||null==e||e.values.length>0}doesFilterPass(e){if(!this.setFilterParams||!this.valueModel||!this.valueModel.getCaseFormattedAppliedModelKeys())return!0;if(!this.valueModel.hasAnyAppliedModelKey())return!1;const{node:t,data:i}=e;if(this.treeDataTreeList)return this.doesFilterPassForTreeData(t,i);if(this.groupingTreeList)return this.doesFilterPassForGrouping(t);let n=this.getValueFromNode(t);return this.convertValuesToStrings?this.doesFilterPassForConvertValuesToString(t,n):null!=n&&Array.isArray(n)?0===n.length?this.valueModel.hasAppliedModelKey(null):n.some(e=>this.isInAppliedModel(this.createKey(e,t))):this.isInAppliedModel(this.createKey(n,t))}doesFilterPassForConvertValuesToString(e,t){const i=this.createKey(t,e);return null!=i&&Array.isArray(i)?0===i.length?this.valueModel.hasAppliedModelKey(null):i.some(e=>this.isInAppliedModel(e)):this.isInAppliedModel(i)}doesFilterPassForTreeData(e,t){var i;return!(null==(i=e.childrenAfterGroup)?void 0:i.length)&&this.isInAppliedModel(this.createKey(this.checkMakeNullDataPath(this.getDataPath(t))))}doesFilterPassForGrouping(e){const t=this.columnModel.getRowGroupColumns().map(t=>this.valueService.getKeyForNode(t,e));return t.push(this.getValueFromNode(e)),this.isInAppliedModel(this.createKey(this.checkMakeNullDataPath(t)))}checkMakeNullDataPath(e){return e&&(e=e.map(e=>s._.toStringOrNull(s._.makeNull(e)))),(null==e?void 0:e.some(e=>null==e))?null:e}isInAppliedModel(e){return this.valueModel.hasAppliedModelKey(e)}getValueFromNode(e){return this.setFilterParams.getValue(e)}getKeyCreatorParams(e,t=null){return{value:e,colDef:this.setFilterParams.colDef,column:this.setFilterParams.column,node:t,data:null==t?void 0:t.data,api:this.setFilterParams.api,columnApi:this.setFilterParams.columnApi,context:this.setFilterParams.context}}onNewRowsLoaded(){this.isValuesTakenFromGrid()&&this.syncAfterDataChange()}isValuesTakenFromGrid(){return!!this.valueModel&&2===this.valueModel.getValuesType()}setFilterValues(e){if(!this.valueModel)throw new Error("Value model has not been created.");this.valueModel.overrideValues(e).then(()=>{this.checkAndRefreshVirtualList(),this.onUiChanged()})}resetFilterValues(){if(!this.valueModel)throw new Error("Value model has not been created.");this.valueModel.setValuesType(2),this.syncAfterDataChange()}refreshFilterValues(){if(!this.valueModel)throw new Error("Value model has not been created.");this.valueModel.isInitialised()&&this.valueModel.refreshValues().then(()=>{this.checkAndRefreshVirtualList(),this.onUiChanged()})}onAnyFilterChanged(){setTimeout(()=>{if(this.isAlive()){if(!this.valueModel)throw new Error("Value model has not been created.");this.valueModel.refreshAfterAnyFilterChanged().then(e=>{e&&(this.checkAndRefreshVirtualList(),this.showOrHideResults())})}},0)}onMiniFilterInput(){if(!this.setFilterParams)throw new Error("Set filter params have not been provided.");if(!this.valueModel)throw new Error("Value model has not been created.");if(!this.valueModel.setMiniFilter(this.eMiniFilter.getValue()))return;const{applyMiniFilterWhileTyping:e,readOnly:t}=this.setFilterParams||{};!t&&e?this.filterOnAllVisibleValues(!1):this.updateUiAfterMiniFilterChange()}updateUiAfterMiniFilterChange(){if(!this.setFilterParams)throw new Error("Set filter params have not been provided.");if(!this.valueModel)throw new Error("Value model has not been created.");const{excelMode:e,readOnly:t}=this.setFilterParams||{};null==e||t?this.checkAndRefreshVirtualList():null==this.valueModel.getMiniFilter()?this.resetUiToActiveModel(this.getModel()):(this.valueModel.selectAllMatchingMiniFilter(!0),this.checkAndRefreshVirtualList(),this.onUiChanged()),this.showOrHideResults()}showOrHideResults(){if(!this.valueModel)throw new Error("Value model has not been created.");const e=null!=this.valueModel.getMiniFilter()&&this.valueModel.getDisplayedValueCount()<1;s._.setDisplayed(this.eNoMatches,e),s._.setDisplayed(this.eSetFilterList,!e)}resetMiniFilter(){var e;this.eMiniFilter.setValue(null,!0),null==(e=this.valueModel)||e.setMiniFilter(null)}resetUiToActiveModel(e,t){this.setModelAndRefresh(null==e?null:e.values).then(()=>{this.onUiChanged(!1,"prevent"),null==t||t()})}handleCancelEnd(e){this.setMiniFilter(null),super.handleCancelEnd(e)}onMiniFilterKeyDown(e){const{excelMode:t,readOnly:i}=this.setFilterParams||{};e.key!==s.DDm.ENTER||t||i||this.filterOnAllVisibleValues()}filterOnAllVisibleValues(e=!0){const{readOnly:t}=this.setFilterParams||{};if(!this.valueModel)throw new Error("Value model has not been created.");if(t)throw new Error("Unable to filter in readOnly mode.");this.valueModel.selectAllMatchingMiniFilter(!0),this.checkAndRefreshVirtualList(),this.onUiChanged(!1,e?"immediately":"debounce"),this.showOrHideResults()}focusRowIfAlive(e){null!=e&&window.setTimeout(()=>{if(!this.virtualList)throw new Error("Virtual list has not been created.");this.isAlive()&&this.virtualList.focusRow(e)},0)}onSelectAll(e){if(!this.valueModel)throw new Error("Value model has not been created.");if(!this.virtualList)throw new Error("Virtual list has not been created.");e?this.valueModel.selectAllMatchingMiniFilter():this.valueModel.deselectAllMatchingMiniFilter(),this.refreshAfterSelection()}onGroupItemSelected(e,t){const i=e=>{e.children?e.children.forEach(e=>i(e)):this.selectItem(e.key,t)};i(e),this.refreshAfterSelection()}onItemSelected(e,t){if(!this.valueModel)throw new Error("Value model has not been created.");if(!this.virtualList)throw new Error("Virtual list has not been created.");this.selectItem(e,t),this.refreshAfterSelection()}selectItem(e,t){t?this.valueModel.selectKey(e):this.valueModel.deselectKey(e)}onExpandAll(e,t){const i=e=>{e.filterPasses&&e.available&&e.children&&(e.children.forEach(e=>i(e)),e.expanded=t)};i(e),this.refreshAfterExpansion()}onExpandedChanged(e,t){e.expanded=t,this.refreshAfterExpansion()}refreshAfterExpansion(){const e=this.virtualList.getLastFocusedRow();this.valueModel.updateDisplayedValues("expansion"),this.checkAndRefreshVirtualList(),this.focusRowIfAlive(e)}refreshAfterSelection(){const e=this.virtualList.getLastFocusedRow();this.checkAndRefreshVirtualList(),this.onUiChanged(),this.focusRowIfAlive(e)}setMiniFilter(e){this.eMiniFilter.setValue(e),this.onMiniFilterInput()}getMiniFilter(){return this.valueModel?this.valueModel.getMiniFilter():null}checkAndRefreshVirtualList(){if(!this.virtualList)throw new Error("Virtual list has not been created.");this.virtualList.refresh(!this.hardRefreshVirtualList),this.hardRefreshVirtualList&&(this.hardRefreshVirtualList=!1)}getFilterKeys(){return this.valueModel?this.valueModel.getKeys():[]}getFilterValues(){return this.valueModel?this.valueModel.getValues():[]}getValues(){return this.getFilterKeys()}refreshVirtualList(){this.setFilterParams&&this.setFilterParams.refreshValuesOnOpen?this.refreshFilterValues():this.checkAndRefreshVirtualList()}translateForSetFilter(e){return this.localeService.getLocaleTextFunc()(e,LD[e])}isSelectAllSelected(){if(!this.setFilterParams||!this.valueModel)return!1;if(this.setFilterParams.defaultToNothingSelected){if(this.valueModel.hasSelections()&&this.valueModel.isEverythingVisibleSelected())return!0;if(this.valueModel.isNothingVisibleSelected())return!1}else{if(this.valueModel.hasSelections()&&this.valueModel.isNothingVisibleSelected())return!1;if(this.valueModel.isEverythingVisibleSelected())return!0}}areAllChildrenSelected(e){const t=e=>{if(e.children){let i=!1,n=!1;return e.children.some(e=>{if(!e.filterPasses||!e.available)return!1;const s=t(e);return void 0===s||(s?i=!0:n=!0,i&&n)})?void 0:i}return this.valueModel.isKeySelected(e.key)};return this.setFilterParams.defaultToNothingSelected?this.valueModel.hasSelections()&&t(e):t(e)}destroy(){null!=this.virtualList&&(this.virtualList.destroy(),this.virtualList=null),super.destroy()}caseFormat(e){return null==e||"string"!=typeof e||this.caseSensitive?e:e.toUpperCase()}resetExpansion(){var e,t;if(!(null==(e=this.setFilterParams)?void 0:e.treeList))return;const i=null==(t=this.valueModel)?void 0:t.getSelectAllItem();if(this.isSetFilterModelTreeItem(i)){const e=t=>{t.children&&(t.children.forEach(t=>e(t)),t.expanded=!1)};e(i),this.valueModel.updateDisplayedValues("expansion")}}getModelAsString(e){return this.filterModelFormatter.getModelAsString(e,this)}getPositionableElement(){return this.eSetFilterList}};bD([(0,s.PIB)("eMiniFilter")],PD.prototype,"eMiniFilter",2),bD([(0,s.PIB)("eFilterLoading")],PD.prototype,"eFilterLoading",2),bD([(0,s.PIB)("eSetFilterList")],PD.prototype,"eSetFilterList",2),bD([(0,s.PIB)("eFilterNoMatches")],PD.prototype,"eNoMatches",2),bD([(0,s.dsm)("columnModel")],PD.prototype,"columnModel",2),bD([(0,s.dsm)("valueService")],PD.prototype,"valueService",2);var ND=class{constructor(e){this.model=e}getRowCount(){return this.model.getDisplayedValueCount()}getRow(e){return this.model.getDisplayedItem(e)}areRowsEqual(e,t){return e===t}},OD=class{constructor(e,t){this.model=e,this.isSelectAllSelected=t}getRowCount(){const e=this.model.showAddCurrentSelectionToFilter()?2:1;return this.model.getDisplayedValueCount()+e}getRow(e){if(0===e)return this.model.getSelectAllItem();const t=this.model.showAddCurrentSelectionToFilter(),i=t?2:1;return 1===e&&t?this.model.getAddSelectionToFilterItem():this.model.getDisplayedItem(e-i)}areRowsEqual(e,t){return e===t}},_D=class{constructor(e){this.model=e}getRowCount(){return this.model.getRowCount()}getRow(e){return this.model.getRow(e)}areRowsEqual(e,t){return null==e&&null==t||null!=e&&null!=t&&e.treeKey===t.treeKey&&e.depth===t.depth}},FD=class extends s.uAl{constructor(){super('\n            <div class="ag-floating-filter-input ag-set-floating-filter-input" role="presentation">\n                <ag-input-text-field ref="eFloatingFilterText"></ag-input-text-field>\n            </div>'),this.availableValuesListenerAdded=!1,this.filterModelFormatter=new kD}destroy(){super.destroy()}init(e){this.params=e,this.eFloatingFilterText.setDisabled(!0).addGuiEventListener("click",()=>this.params.showParentFilter()),this.setParams(e)}setParams(e){const t=this.columnModel.getDisplayNameForColumn(e.column,"header",!0),i=this.localeService.getLocaleTextFunc();this.eFloatingFilterText.setInputAriaLabel(`${t} ${i("ariaFilterInput","Filter Input")}`)}onParamsUpdated(e){this.refresh(e)}refresh(e){this.params=e,this.setParams(e)}onParentModelChanged(e){this.updateFloatingFilterText(e)}parentSetFilterInstance(e){this.params.parentFilterInstance(t=>{if(!(t instanceof PD))throw new Error("AG Grid - SetFloatingFilter expects SetFilter as its parent");e(t)})}addAvailableValuesListener(){this.parentSetFilterInstance(e=>{const t=e.getValueModel();t&&this.addManagedListener(t,DD.EVENT_AVAILABLE_VALUES_CHANGED,()=>this.updateFloatingFilterText())}),this.availableValuesListenerAdded=!0}updateFloatingFilterText(e){this.availableValuesListenerAdded||this.addAvailableValuesListener(),this.parentSetFilterInstance(t=>{this.eFloatingFilterText.setValue(this.filterModelFormatter.getModelAsString(e,t))})}};bD([(0,s.PIB)("eFloatingFilterText")],FD.prototype,"eFloatingFilterText",2),bD([(0,s.dsm)("columnModel")],FD.prototype,"columnModel",2);var GD={version:"31.3.4",moduleName:s.zsj.SetFilterModule,beans:[],userComponents:[{componentName:"agSetColumnFilter",componentClass:PD},{componentName:"agSetColumnFloatingFilter",componentClass:FD}],dependantModules:[fm]},VD=Object.defineProperty,BD=Object.getOwnPropertyDescriptor,HD=Object.getOwnPropertySymbols,zD=Object.prototype.hasOwnProperty,UD=Object.prototype.propertyIsEnumerable,WD=(e,t,i)=>t in e?VD(e,t,{enumerable:!0,configurable:!0,writable:!0,value:i}):e[t]=i,jD=(e,t,i,n)=>{for(var s,r=n>1?void 0:n?BD(t,i):t,o=e.length-1;o>=0;o--)(s=e[o])&&(r=(n?s(t,i,r):s(r))||r);return n&&r&&VD(t,i,r),r},{extent:KD,isNumber:$D,isString:YD,isStringObject:qD,isDate:XD,createId:ZD,Padding:QD}=Uf,{LinearScale:JD,BandScale:eI,TimeScale:tI}=zf,iI=class{constructor(){this.type="category",this.stroke="rgb(204, 214, 235)",this.strokeWidth=1}},nI=class e{constructor(){this.id=ZD(this),this.seriesRect={x:0,y:0,width:0,height:0},this._context=void 0,this._container=void 0,this._data=void 0,this.padding=new QD(3),this.xKey="x",this.yKey="y",this.dataType=void 0,this.xData=[],this.yData=[],this.min=void 0,this.max=void 0,this.yScale=new JD,this.axis=new iI,this.highlightStyle={size:6,fill:"yellow",stroke:"silver",strokeWidth:1},this._width=100,this._height=100,this.smallestInterval=void 0,this.layoutId=0,this.defaultDateFormatter=new Intl.DateTimeFormat("en-US",{year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",hour12:!1}),this._onMouseMove=this.onMouseMove.bind(this),this._onMouseOut=this.onMouseOut.bind(this);const t=new kf.Group;this.rootGroup=t;const i=document.createElement("div");i.setAttribute("class","ag-sparkline-wrapper");const n=new kf.Scene({});this.scene=n,this.canvasElement=n.canvas.element,n.setRoot(t),n.setContainer(i),this.resizeAndSetDimensions(this.width,this.height),e.tooltipDocuments.includes(document)||this.initialiseTooltipStyles(),this.setupDomEventListeners(this.canvasElement)}set context(e){this._context!==e&&(this._context=e)}get context(){return this._context}set container(e){if(this._container!==e){const{parentNode:t}=this.canvasElement;null!=t&&t.removeChild(this.canvasElement),e&&e.appendChild(this.canvasElement),this._container=e}}get container(){return this._container}set data(e){this._data!==e&&(this._data=e,this.processData(),this.mouseMoveEvent&&this.highlightedDatum&&this.updateHitPoint(this.mouseMoveEvent))}get data(){return this._data}resizeAndSetDimensions(e,t){this.scene.resize(e,t),this.seriesRect.width=e,this.seriesRect.height=t}initialiseTooltipStyles(){const t=document.createElement("style");t.innerHTML="\n.ag-sparkline-tooltip-wrapper {\n    position: absolute;\n    user-select: none;\n    pointer-events: none;\n}\n\n.ag-sparkline-tooltip {\n    position: relative;\n    font: 12px arial,sans-serif;\n    border-radius: 2px;\n    box-shadow: 0 1px 3px rgb(0 0 0 / 20%), 0 1px 1px rgb(0 0 0 / 14%);\n    line-height: 1.7em;\n    overflow: hidden;\n    white-space: nowrap;\n    z-index: 99999;\n    background-color: rgb(255, 255, 255);\n    color: rgba(0,0,0, 0.67);\n}\n\n.ag-sparkline-tooltip-content {\n    padding: 0 7px;\n    opacity: 1;\n}\n\n.ag-sparkline-tooltip-title {\n    padding-left: 7px;\n    opacity: 1;\n}\n\n.ag-sparkline-tooltip-wrapper-hidden {\n    top: -10000px !important;\n}\n\n.ag-sparkline-wrapper {\n    box-sizing: border-box;\n    overflow: hidden;\n}\n",document.head.insertBefore(t,document.head.querySelector("style")),e.tooltipDocuments.push(document)}set width(e){this._width!==e&&(this._width=e,this.scene.resize(e,this.height),this.scheduleLayout())}get width(){return this._width}set height(e){this._height!==e&&(this._height=e,this.scene.resize(this.width,e),this.scheduleLayout())}get height(){return this._height}update(){}updateYScale(){this.updateYScaleRange(),this.updateYScaleDomain()}updateYScaleDomain(){}updateYScaleRange(){const{yScale:e,seriesRect:t}=this;e.range=[t.height,0]}updateXScale(){const{type:e}=this.axis;this.xScale=this.getXScale(e),this.updateXScaleRange(),this.updateXScaleDomain()}updateXScaleRange(){this.xScale.range=[0,this.seriesRect.width]}updateXScaleDomain(){const{xData:e,xScale:t}=this;let i;(t instanceof JD||t instanceof tI)&&(i=KD(e)),this.xScale.domain=i?i.slice():e}getXScale(e="category"){switch(e){case"number":return new JD;case"time":return new tI;default:return new eI}}updateAxisLine(){}updateAxes(){this.updateYScale(),this.updateXScale(),this.updateAxisLine()}updateCrosshairs(){this.updateXCrosshairLine(),this.updateYCrosshairLine()}generateNodeData(){return[]}getNodeData(){return[]}updateNodes(){}updateXCrosshairLine(){}updateYCrosshairLine(){}highlightDatum(e){this.updateNodes()}dehighlightDatum(){this.highlightedDatum=void 0,this.updateNodes(),this.updateCrosshairs()}onMouseMove(e){this.mouseMoveEvent=e,this.updateHitPoint(e)}updateHitPoint(e){var t,i,n;const s=this.pickClosestSeriesNodeDatum(e.offsetX,e.offsetY);if(!s)return;const r=this.highlightedDatum;this.highlightedDatum=s,(this.highlightedDatum&&!r||this.highlightedDatum&&r&&this.highlightedDatum!==r)&&(this.highlightDatum(s),this.updateCrosshairs(),this.scene.render().catch(e=>console.error("AG Grid - chart rendering failed",e))),(null==(n=null==(i=null==(t=this.processedOptions)?void 0:t.tooltip)?void 0:i.enabled)||n)&&this.handleTooltip(e,s)}onMouseOut(e){this.dehighlightDatum(),this.tooltip.toggle(!1),this.scene.render().catch(e=>console.error("AG Grid - chart rendering failed",e))}processData(){const{data:e,yData:t,xData:i}=this;if(!e||this.invalidData(this.data))return;t.length=0,i.length=0;const n=e.length,s=this.getDataType(e);this.dataType=s;const{type:r}=this.axis,o="number"!==r&&"time"!==r?"category":r,a="number"===o||"time"===o,l=(e,t)=>{null==this.smallestInterval&&(this.smallestInterval={x:1/0,y:1/0});const{x:i}=this.smallestInterval,n=Math.abs(e-t);n>0&&n<i&&(this.smallestInterval.x=n)};let c;if("number"===s)for(let s=0;s<n;s++){const n=s,r=e[s],h=this.getDatum(n,o),d=this.getDatum(r,"number");a&&l(h,c),i.push(h),t.push(d),c=h}else if("array"===s)for(let s=0;s<n;s++){const n=e[s];if(Array.isArray(n)){const e=n[0],s=n[1],r=this.getDatum(e,o),h=this.getDatum(s,"number");if(null==r)continue;a&&l(r,c),i.push(r),t.push(h),c=r}}else if("object"===s){const{yKey:s,xKey:r}=this;for(let h=0;h<n;h++){const n=e[h];if("object"==typeof n&&!Array.isArray(n)){const e=n[r],h=n[s],d=this.getDatum(e,o),u=this.getDatum(h,"number");if(null==d)continue;a&&l(d,c),i.push(d),t.push(u),c=d}}}this.updateAxes(),this.immediateLayout()}getDataType(e){for(const t of e)if(null!=t){if($D(t))return"number";if(Array.isArray(t))return"array";if("object"==typeof t)return"object"}}getDatum(e,t){if("number"===t&&$D(e)||"time"===t&&($D(e)||XD(e)))return e;if("category"===t){if(YD(e)||XD(e)||$D(e))return{toString:()=>String(e)};if(qD(e))return e}}get layoutScheduled(){return!!this.layoutId}scheduleLayout(){this.layoutId&&cancelAnimationFrame(this.layoutId),this.layoutId=requestAnimationFrame(()=>{this.immediateLayout(),this.layoutId=0})}immediateLayout(){this.setSparklineDimensions(),this.invalidData(this.data)||(this.updateXScaleRange(),this.updateYScaleRange(),this.updateAxisLine(),this.update(),this.scene.render().catch(e=>console.error("AG Grid - chart rendering failed",e)))}setSparklineDimensions(){const{width:e,height:t,padding:i,seriesRect:n,rootGroup:s}=this,r=e-i.left-i.right,o=t-i.top-i.bottom;n.width=r,n.height=o,n.x=i.left,n.y=i.top,s.translationX=n.x,s.translationY=n.y}pickClosestSeriesNodeDatum(e,t){let i,n=1/0;const s=this.rootGroup.transformPoint(e,t),r=this.getNodeData();for(let e=0;e<r.length;e++){const t=r[e];if(!t.point)return;const o=this.getDistance(s,t.point);o<=n&&(n=o,i=t)}return i}getDistance(e,t){return Math.abs(e.x-t.x)}handleTooltip(e,t){var i,n;const{seriesDatum:s}=t,{canvasElement:r}=this,{clientX:o,clientY:a}=e,l=null==(i=this.processedOptions)?void 0:i.tooltip,c={pageX:o,pageY:a,position:{xOffset:null==l?void 0:l.xOffset,yOffset:null==l?void 0:l.yOffset},container:null==l?void 0:l.container};null==c.container&&(c.container=r);const h=s.y,d=s.x;let u=null==(n=null==l?void 0:l.enabled)||n;const p=null==l?void 0:l.renderer;if(p){const e=p({context:this.context,datum:s,yValue:h,xValue:d});u="string"!=typeof e&&void 0!==e.enabled?e.enabled:u}const g=u&&void 0!==s.y&&this.getTooltipHtml(t);g&&this.tooltip.show(c,g)}formatNumericDatum(e){return String(Math.round(10*e)/10)}formatDatum(e){const t=this.axis.type||"category";return"number"===t&&"number"==typeof e?this.formatNumericDatum(e):"time"===t&&(e instanceof Date||$D(e))?this.defaultDateFormatter.format(e):String(e)}setupDomEventListeners(e){e.addEventListener("mousemove",this._onMouseMove),e.addEventListener("mouseout",this._onMouseOut)}cleanupDomEventListeners(e){e.removeEventListener("mousemove",this._onMouseMove),e.removeEventListener("mouseout",this._onMouseOut)}invalidData(e){return!e||!Array.isArray(e)}destroy(){this.cleanupDomEventListeners(this.canvasElement),this.scene.destroy(),this.container=void 0}};nI.tooltipDocuments=[];var sI=nI;function rI(e,t){var i,n,s;if("string"==typeof e)return e;t=null!=t?t:{};const{content:r=(null!=(i=t.content)?i:""),title:o=(null!=(n=t.title)?n:void 0),color:a=t.color,backgroundColor:l=t.backgroundColor,opacity:c=(null!=(s=t.opacity)?s:1)}=e;let h,d;a?(h=o?`<span class="${aI.class}-title"; style="color: ${a}">${o}</span>`:"",d=`<span class="${aI.class}-content" style="color: ${a}">${r}</span>`):(h=o?`<span class="${aI.class}-title">${o}</span>`:"",d=`<span class="${aI.class}-content">${r}</span>`);let u=`opacity: ${c}`;return l&&(u+=`; background-color: ${l.toLowerCase()}`),`<div class="${aI.class}" style="${u}">\n                ${h}\n                ${d}\n            </div>`}var oI=class e{constructor(){this.element=document.createElement("div"),document.body.appendChild(this.element)}isVisible(){const{element:t}=this;if(t.classList)return!t.classList.contains(`${e.class}-wrapper-hidden`);const i=t.getAttribute("class");return!!i&&i.split(" ").indexOf(`${e.class}-wrapper-hidden`)<0}updateClass(t){const i=[`${e.class}-wrapper`];!0!==t&&i.push(`${e.class}-wrapper-hidden`),this.element.setAttribute("class",i.join(" "))}show(e,t){var i,n,s,r;this.toggle(!1);const{element:o}=this;if(void 0!==t)o.innerHTML=t;else if(!o.innerHTML)return;const a=null!=(n=null==(i=e.position)?void 0:i.xOffset)?n:10,l=null!=(r=null==(s=e.position)?void 0:s.yOffset)?r:0;let c=e.pageX+a,h=e.pageY+l;const d=o.getBoundingClientRect();let u=window.innerWidth-d.width;if(e.container){const t=e.container.getBoundingClientRect();u=t.left+(t.width-d.width)}c>u&&(c=e.pageX-o.clientWidth-a),"undefined"!=typeof scrollX&&(c+=scrollX),"undefined"!=typeof scrollY&&(h+=scrollY),o.style.left=`${Math.round(c)}px`,o.style.top=`${Math.round(h)}px`,this.toggle(!0)}toggle(e){this.updateClass(e)}destroy(){const{parentNode:e}=this.element;e&&e.removeChild(this.element)}};oI.class="ag-sparkline-tooltip";var aI=oI;function lI(e){switch(e){case"circle":default:return kf.Circle;case"square":return kf.Square;case"diamond":return kf.Diamond}}function cI(e,t="solid"){const i={solid:[],dash:[4,3],dot:[1,3],dashDot:[4,3,1,3],dashDotDot:[4,3,1,3,1,3],shortDot:[1,1],shortDash:[3,1],shortDashDot:[3,1,1,1],shortDashDotDot:[3,1,1,1,1,1],longDash:[8,3],longDashDot:[8,3,1,3],longDashDotDot:[8,3,1,3,1,3]},n={solid:[],dash:[3,3],dot:[0,3],dashDot:[3,3,0,3],dashDotDot:[3,3,0,3,0,3],shortDot:[0,2],shortDash:[2,2],shortDashDot:[2,2,0,2],shortDashDotDot:[2,2,0,2,0,2],longDash:[7,3],longDashDot:[7,3,0,3],longDashDotDot:[7,3,0,3,0,3]};return"round"===e||"square"===e?null==n[t]?(console.warn(`'${t}' is not a valid 'lineDash' option.`),n.solid):n[t]:null==i[t]?(console.warn(`'${t}' is not a valid 'lineDash' option.`),i.solid):i[t]}var{extent:hI}=Uf,{BandScale:dI}=zf,uI=class{constructor(){this.enabled=!0,this.shape="circle",this.size=0,this.fill="rgb(124, 181, 236)",this.stroke="rgb(124, 181, 236)",this.strokeWidth=1,this.formatter=void 0}},pI=class{constructor(){this.stroke="rgb(124, 181, 236)",this.strokeWidth=1}},gI=class{constructor(){this.xLine={enabled:!0,stroke:"rgba(0,0,0, 0.54)",strokeWidth:1,lineDash:"solid",lineCap:void 0},this.yLine={enabled:!1,stroke:"rgba(0,0,0, 0.54)",strokeWidth:1,lineDash:"solid",lineCap:void 0}}},fI=class extends sI{constructor(){super(),this.fill="rgba(124, 181, 236, 0.25)",this.strokePath=new kf.Path,this.fillPath=new kf.Path,this.xCrosshairLine=new kf.Line,this.yCrosshairLine=new kf.Line,this.areaSparklineGroup=new kf.Group,this.xAxisLine=new kf.Line,this.markers=new kf.Group,this.markerSelection=kf.Selection.select(this.markers,()=>this.markerFactory()),this.markerSelectionData=[],this.marker=new uI,this.line=new pI,this.crosshairs=new gI,this.rootGroup.append(this.areaSparklineGroup),this.xAxisLine.zIndex=500,this.fillPath.zIndex=50,this.strokePath.zIndex=1e3,this.xCrosshairLine.zIndex=2e3,this.yCrosshairLine.zIndex=2e3,this.markers.zIndex=2500,this.areaSparklineGroup.append([this.fillPath,this.xAxisLine,this.strokePath,this.xCrosshairLine,this.yCrosshairLine,this.markers])}markerFactory(){const{shape:e}=this.marker;return new(lI(e))}getNodeData(){return this.markerSelectionData}update(){const e=this.generateNodeData();if(!e)return;const{nodeData:t,fillData:i,strokeData:n}=e;this.markerSelectionData=t,this.updateSelection(t),this.updateNodes(),this.updateStroke(n),this.updateFill(i)}updateYScaleDomain(){const{yData:e,yScale:t}=this,i=hI(e);let n=0,s=1;void 0!==i&&(n=this.min=i[0],s=this.max=i[1]),n=n<0?n:0,s=s<0?0:s,t.domain=[n,s]}generateNodeData(){const{data:e,yData:t,xData:i,xScale:n,yScale:s}=this;if(!e)return;const r=!(n instanceof dI),o=r?0:n.bandwidth/2,a=t.length,l=[],c=[],h=[];let d,u,p,g;const f=s.convert(0);for(let e=0;e<a;e++){const m=t[e],v=i[e],y=n.convert(r?n.toDomain(v):v)+o,C=void 0===m?NaN:s.convert(m);e+1<a&&(g=n.convert(r?n.toDomain(i[e+1]):i[e+1])+o),h.push({seriesDatum:{x:v,y:m},point:{x:y,y:C}}),void 0===m&&void 0!==p?(c.push({seriesDatum:void 0,point:{x:p,y:f}}),void 0!==g&&c.push({seriesDatum:void 0,point:{x:g,y:f}})):void 0!==m&&(c.push({seriesDatum:{x:v,y:m},point:{x:y,y:C}}),l.push({seriesDatum:{x:v,y:m},point:{x:y,y:C}}),d=void 0!==d?d:y,u=y),p=y}return c.push({seriesDatum:void 0,point:{x:u,y:f}},{seriesDatum:void 0,point:{x:d,y:f}}),{nodeData:l,fillData:c,strokeData:h}}updateAxisLine(){const{xScale:e,yScale:t,axis:i,xAxisLine:n}=this;n.x1=e.range[0],n.x2=e.range[1],n.y1=n.y2=0,n.stroke=i.stroke,n.strokeWidth=i.strokeWidth;const s=t.convert(0);n.translationY=s}updateSelection(e){this.markerSelection.update(e)}updateNodes(){const{highlightedDatum:e,highlightStyle:t,marker:i}=this,{size:n,fill:s,stroke:r,strokeWidth:o}=t,a=i.formatter;this.markerSelection.each((t,l,c)=>{const{point:h,seriesDatum:d}=l;if(!h)return;const u=l===e,p=u&&void 0!==s?s:i.fill,g=u&&void 0!==r?r:i.stroke,f=u&&void 0!==o?o:i.strokeWidth,m=u&&void 0!==n?n:i.size;let v;if(a){const e=0===c,t=c===this.markerSelectionData.length-1,i=d.y===this.min,n=d.y===this.max;v=a({datum:l,xValue:d.x,yValue:d.y,min:i,max:n,first:e,last:t,fill:p,stroke:g,strokeWidth:f,size:m,highlighted:u})}t.size=v&&null!=v.size?v.size:m,t.fill=v&&null!=v.fill?v.fill:p,t.stroke=v&&null!=v.stroke?v.stroke:g,t.strokeWidth=v&&null!=v.strokeWidth?v.strokeWidth:f,t.translationX=h.x,t.translationY=h.y,t.visible=v&&null!=v.enabled?v.enabled:i.enabled&&t.size>0})}updateStroke(e){const{strokePath:t,yData:i,line:n}=this,s=t.path;if(s.clear(),i.length<2)return;const r=e.length;let o=!0;for(let t=0;t<r;t++){const{point:i,seriesDatum:n}=e[t],r=i.x,a=i.y;null==n.y?o=!0:o?(s.moveTo(r,a),o=!1):s.lineTo(r,a)}t.lineJoin=t.lineCap="round",t.fill=void 0,t.stroke=n.stroke,t.strokeWidth=n.strokeWidth}updateFill(e){const{fillPath:t,yData:i,fill:n}=this,s=t.path,r=e.length;if(s.clear(),!(i.length<2)){for(let t=0;t<r;t++){const{point:i}=e[t],n=i.x,r=i.y;t>0?s.lineTo(n,r):s.moveTo(n,r)}s.closePath(),t.lineJoin="round",t.stroke=void 0,t.fill=n}}updateXCrosshairLine(){var e;const{yScale:t,xCrosshairLine:i,highlightedDatum:n,crosshairs:{xLine:s}}=this;if(!s.enabled||null==n)return void(i.strokeWidth=0);i.y1=t.range[0],i.y2=t.range[1],i.x1=i.x2=0,i.stroke=s.stroke,i.strokeWidth=null!=(e=s.strokeWidth)?e:1,i.lineCap="round"===s.lineCap||"square"===s.lineCap?s.lineCap:void 0;const{lineDash:r}=s;i.lineDash=Array.isArray(r)?r:cI(i.lineCap,s.lineDash),i.translationX=n.point.x}updateYCrosshairLine(){var e;const{xScale:t,yCrosshairLine:i,highlightedDatum:n,crosshairs:{yLine:s}}=this;if(!s.enabled||null==n)return void(i.strokeWidth=0);i.x1=t.range[0],i.x2=t.range[1],i.y1=i.y2=0,i.stroke=s.stroke,i.strokeWidth=null!=(e=s.strokeWidth)?e:1,i.lineCap="round"===s.lineCap||"square"===s.lineCap?s.lineCap:void 0;const{lineDash:r}=s;i.lineDash=Array.isArray(r)?r:cI(i.lineCap,s.lineDash),i.translationY=n.point.y}getTooltipHtml(e){var t,i;const{dataType:n}=this,{seriesDatum:s}=e,r=s.y,o=s.x,a={content:this.formatNumericDatum(r),title:"array"===n||"object"===n?this.formatDatum(o):void 0},l=null==(i=null==(t=this.processedOptions)?void 0:t.tooltip)?void 0:i.renderer;return l?rI(l({context:this.context,datum:s,yValue:r,xValue:o}),a):rI(a)}};fI.className="AreaSparkline";var{extent:mI}=Uf,{BandScale:vI}=zf,yI=class{constructor(){this.enabled=!0,this.shape="circle",this.size=0,this.fill="rgb(124, 181, 236)",this.stroke="rgb(124, 181, 236)",this.strokeWidth=1,this.formatter=void 0}},CI=class{constructor(){this.stroke="rgb(124, 181, 236)",this.strokeWidth=1}},bI=class{constructor(){this.xLine={enabled:!0,stroke:"rgba(0,0,0, 0.54)",strokeWidth:1,lineDash:"solid",lineCap:void 0},this.yLine={enabled:!1,stroke:"rgba(0,0,0, 0.54)",strokeWidth:1,lineDash:"solid",lineCap:void 0}}},SI=class extends sI{constructor(){super(),this.linePath=new kf.Path,this.xCrosshairLine=new kf.Line,this.yCrosshairLine=new kf.Line,this.lineSparklineGroup=new kf.Group,this.markers=new kf.Group,this.markerSelection=kf.Selection.select(this.markers,()=>this.markerFactory()),this.markerSelectionData=[],this.marker=new yI,this.line=new CI,this.crosshairs=new bI,this.rootGroup.append(this.lineSparklineGroup),this.linePath.zIndex=1e3,this.xCrosshairLine.zIndex=2e3,this.yCrosshairLine.zIndex=2e3,this.markers.zIndex=2500,this.lineSparklineGroup.append([this.linePath,this.xCrosshairLine,this.yCrosshairLine,this.markers])}getNodeData(){return this.markerSelectionData}markerFactory(){const{shape:e}=this.marker;return new(lI(e))}onMarkerShapeChange(){this.markerSelection=this.markerSelection.clear(),this.scheduleLayout()}update(){const e=this.generateNodeData();e&&(this.markerSelectionData=e,this.updateSelection(e),this.updateNodes(),this.updateLine())}updateYScaleDomain(){const{yData:e,yScale:t}=this,i=mI(e);let n=0,s=1;if(void 0!==i&&(n=this.min=i[0],s=this.max=i[1]),n===s){const e=Math.abs(.01*n);n-=e,s+=e}t.domain=[n,s]}generateNodeData(){const{data:e,yData:t,xData:i,xScale:n,yScale:s}=this;if(!e)return;const r=!(n instanceof vI),o=r?0:n.bandwidth/2,a=[];for(let e=0;e<t.length;e++){const l=t[e],c=i[e];if(null==l)continue;const h=n.convert(r?n.toDomain(c):c)+o,d=void 0===l?NaN:s.convert(l);a.push({seriesDatum:{x:c,y:l},point:{x:h,y:d}})}return a}updateSelection(e){this.markerSelection.update(e)}updateNodes(){const{highlightedDatum:e,highlightStyle:t,marker:i}=this,{size:n,fill:s,stroke:r,strokeWidth:o}=t,a=i.formatter;this.markerSelection.each((t,l,c)=>{const h=l===e,d=h&&void 0!==s?s:i.fill,u=h&&void 0!==r?r:i.stroke,p=h&&void 0!==o?o:i.strokeWidth,g=h&&void 0!==n?n:i.size;let f;const{seriesDatum:m,point:v}=l;if(a){const e=0===c,t=c===this.markerSelectionData.length-1,i=m.y===this.min,n=m.y===this.max;f=a({datum:l,xValue:m.x,yValue:m.y,min:i,max:n,first:e,last:t,fill:d,stroke:u,strokeWidth:p,size:g,highlighted:h})}t.size=f&&null!=f.size?f.size:g,t.fill=f&&null!=f.fill?f.fill:d,t.stroke=f&&null!=f.stroke?f.stroke:u,t.strokeWidth=f&&null!=f.strokeWidth?f.strokeWidth:p,t.translationX=v.x,t.translationY=v.y,t.visible=f&&null!=f.enabled?f.enabled:i.enabled&&t.size>0})}updateLine(){const{linePath:e,yData:t,xData:i,xScale:n,yScale:s,line:r}=this,o=e.path;if(o.clear(),t.length<2)return;const a=!(n instanceof vI),l=t.length,c=a?0:n.bandwidth/2;let h=!0;for(let e=0;e<l;e++){const r=i[e],l=t[e],d=n.convert(a?n.toDomain(r):r)+c,u=void 0===l?NaN:s.convert(l);null==l?h=!0:h?(o.moveTo(d,u),h=!1):o.lineTo(d,u)}e.fill=void 0,e.stroke=r.stroke,e.strokeWidth=r.strokeWidth}updateXCrosshairLine(){var e;const{yScale:t,xCrosshairLine:i,highlightedDatum:n,crosshairs:{xLine:s}}=this;if(!s.enabled||null==n)return void(i.strokeWidth=0);i.y1=t.range[0],i.y2=t.range[1],i.x1=i.x2=0,i.stroke=s.stroke,i.strokeWidth=null!=(e=s.strokeWidth)?e:1,i.lineCap="round"===s.lineCap||"square"===s.lineCap?s.lineCap:void 0;const{lineDash:r}=s;i.lineDash=Array.isArray(r)?r:cI(i.lineCap,s.lineDash),i.translationX=n.point.x}updateYCrosshairLine(){var e;const{xScale:t,yCrosshairLine:i,highlightedDatum:n,crosshairs:{yLine:s}}=this;if(!s.enabled||null==n)return void(i.strokeWidth=0);i.x1=t.range[0],i.x2=t.range[1],i.y1=i.y2=0,i.stroke=s.stroke,i.strokeWidth=null!=(e=s.strokeWidth)?e:1,i.lineCap="round"===s.lineCap||"square"===s.lineCap?s.lineCap:void 0;const{lineDash:r}=s;i.lineDash=Array.isArray(r)?r:cI(i.lineCap,s.lineDash),i.translationY=n.point.y}getTooltipHtml(e){var t,i;const{dataType:n}=this,{seriesDatum:s}=e,r=s.y,o=s.x,a={content:this.formatNumericDatum(r),title:"array"===n||"object"===n?this.formatDatum(o):void 0},l=null==(i=null==(t=this.processedOptions)?void 0:t.tooltip)?void 0:i.renderer;return l?rI(l({context:this.context,datum:s,yValue:r,xValue:o}),a):rI(a)}};SI.className="LineSparkline";var wI=class{constructor(){this.enabled=!0,this.fontSize=8,this.fontFamily="Verdana, sans-serif",this.fontStyle=void 0,this.fontWeight=void 0,this.color="rgba(70, 70, 70, 1)"}},{extent:xI}=Uf,EI=class extends wI{constructor(){super(...arguments),this.formatter=void 0,this.placement="insideEnd"}},MI=class extends sI{constructor(){super(),this.fill="rgb(124, 181, 236)",this.stroke="silver",this.strokeWidth=0,this.paddingInner=.1,this.paddingOuter=.2,this.valueAxisDomain=void 0,this.formatter=void 0,this.axisLine=new kf.Line,this.bandWidth=0,this.sparklineGroup=new kf.Group,this.rectGroup=new kf.Group,this.labelGroup=new kf.Group,this.rectSelection=kf.Selection.select(this.rectGroup,kf.Rect),this.labelSelection=kf.Selection.select(this.labelGroup,kf.Text),this.nodeSelectionData=[],this.label=new EI,this.rootGroup.append(this.sparklineGroup),this.rectGroup.zIndex=50,this.axisLine.zIndex=500,this.labelGroup.zIndex=1500,this.sparklineGroup.append([this.rectGroup,this.axisLine,this.labelGroup]),this.axisLine.lineCap="round",this.label.enabled=!1}getNodeData(){return this.nodeSelectionData}update(){this.updateSelections(),this.updateNodes()}updateSelections(){const e=this.generateNodeData();e&&(this.nodeSelectionData=e,this.updateRectSelection(e),this.updateLabelSelection(e))}updateNodes(){this.updateRectNodes(),this.updateLabelNodes()}calculateStep(e){var t;const{xScale:i,paddingInner:n,paddingOuter:s,smallestInterval:r}=this;let o=(i.domain[1]-i.domain[0])/(null!=(t=null==r?void 0:r.x)?t:1)+1;const a=Math.min(o,50),l=a-1;return e/Math.max(1,2*s+l*n+a)}updateYScaleDomain(){const{yScale:e,yData:t,valueAxisDomain:i}=this,n=xI(t);let s=0,r=1;void 0!==n&&(s=this.min=n[0],r=this.max=n[1]),s=s<0?s:0,r=r<0?0:r,i&&(i[1]<r&&(i[1]=r),i[0]>s&&(i[0]=s)),e.domain=i||[s,r]}updateRectSelection(e){this.rectSelection.update(e)}updateRectNodes(){const{highlightedDatum:e,formatter:t,fill:i,stroke:n,strokeWidth:s}=this,{fill:r,stroke:o,strokeWidth:a}=this.highlightStyle;this.rectSelection.each((l,c,h)=>{const d=c===e,u=d&&void 0!==r?r:i,p=d&&void 0!==o?o:n,g=d&&void 0!==a?a:s;let f;const{x:m,y:v,width:y,height:C,seriesDatum:b}=c;if(t){const e=0===h,i=h===this.nodeSelectionData.length-1,n=b.y===this.min,s=b.y===this.max;f=t({datum:c,xValue:b.x,yValue:b.y,width:y,height:C,min:n,max:s,first:e,last:i,fill:u,stroke:p,strokeWidth:g,highlighted:d})}l.fill=f&&f.fill||u,l.stroke=f&&f.stroke||p,l.strokeWidth=f&&f.strokeWidth||g,l.x=l.y=0,l.width=y,l.height=C,l.visible=l.height>0,l.translationX=m,l.translationY=v})}updateLabelSelection(e){this.labelSelection.update(e,e=>{e.tag=1,e.pointerEvents=kf.PointerEvents.None})}updateLabelNodes(){const{label:{enabled:e,fontStyle:t,fontWeight:i,fontSize:n,fontFamily:s,color:r}}=this;this.labelSelection.each((o,a)=>{const l=a.label;l&&e?(o.fontStyle=t,o.fontWeight=i,o.fontSize=n,o.fontFamily=s,o.textAlign=l.textAlign,o.textBaseline=l.textBaseline,o.text=l.text,o.x=l.x,o.y=l.y,o.fill=r,o.visible=!0):o.visible=!1})}getTooltipHtml(e){var t,i;const{dataType:n}=this,{seriesDatum:s}=e,r=s.y,o=s.x,a={content:this.formatNumericDatum(r),title:"array"===n||"object"===n?this.formatDatum(o):void 0},l=null==(i=null==(t=this.processedOptions)?void 0:t.tooltip)?void 0:i.renderer;return l?rI(l({context:this.context,datum:s,yValue:r,xValue:o}),a):rI(a)}formatLabelValue(e){return e%1!=0?e.toFixed(1):e.toFixed(0)}},{isNumber:AI}=Uf,{BandScale:TI}=zf,DI=class extends MI{updateYScaleRange(){const{seriesRect:e,yScale:t}=this;t.range=[0,e.width]}updateXScaleRange(){const{xScale:e,seriesRect:t,paddingOuter:i,paddingInner:n}=this;if(e instanceof TI)e.range=[0,t.height],e.paddingInner=n,e.paddingOuter=i;else{const s=this.calculateStep(t.height),r=s*i;this.bandWidth=s*(1-n),e.range=[r,t.height-r-this.bandWidth]}}updateAxisLine(){const{yScale:e,axis:t,axisLine:i,seriesRect:n}=this,{strokeWidth:s}=t;i.x1=0,i.x2=0,i.y1=0,i.y2=n.height,i.stroke=t.stroke,i.strokeWidth=s+(s%2==1?1:0);const r=e.convert(0);i.translationX=r}generateNodeData(){const{data:e,yData:t,xData:i,xScale:n,yScale:s,fill:r,stroke:o,strokeWidth:a,label:l}=this;if(!e)return;const{fontStyle:c,fontWeight:h,fontSize:d,fontFamily:u,color:p,formatter:g,placement:f}=l,m=[],v=s.convert(0),y=!(n instanceof TI);for(let e=0,l=t.length;e<l;e++){let l=t[e];const C=i[e],b=void 0===l;b&&(l=0);const S=n.convert(y?n.toDomain(C):C),w=Math.min(void 0===l?NaN:s.convert(l),v),x=Math.max(void 0===l?NaN:s.convert(l),v),E=y?this.bandWidth:n.bandwidth,M=x-w,A={x:v,y:S};let T;T=g?g({value:l}):void 0!==l&&AI(l)?this.formatLabelValue(l):"";const D=S+E/2;let I;const R="middle";let L;const k=void 0!==l&&l>=0,P=4;if("center"===f)I=w+M/2,L="center";else if("outsideEnd"===f)I=w+(k?M+P:-P),L=k?"start":"end";else if("insideEnd"===f){I=w+(k?M-P:P),L=k?"end":"start";const e=kf.Text.getTextSize(T,u).width||20;(k&&I<v+e||!k&&I>v-e)&&(I=v+P*(k?1:-1),L=k?"start":"end")}else I=v+P*(k?1:-1),L=k?"start":"end";m.push({x:w,y:S,width:M,height:E,fill:r,stroke:o,strokeWidth:a,seriesDatum:{x:C,y:b?void 0:l},point:A,label:{x:I,y:D,text:T,fontStyle:c,fontWeight:h,fontSize:d,fontFamily:u,textAlign:L,textBaseline:R,fill:p}})}return m}getDistance(e,t){return Math.abs(e.y-t.y)}};DI.className="BarSparkline";var{isNumber:II}=Uf,{BandScale:RI}=zf,LI=class extends MI{updateYScaleRange(){const{seriesRect:e,yScale:t}=this;t.range=[e.height,0]}updateXScaleRange(){const{xScale:e,seriesRect:t,paddingOuter:i,paddingInner:n}=this;if(e instanceof RI)e.range=[0,t.width],e.paddingInner=n,e.paddingOuter=i;else{const s=this.calculateStep(t.width),r=s*i;this.bandWidth=s*(1-n),e.range=[r,t.width-r-this.bandWidth]}}updateAxisLine(){const{yScale:e,axis:t,axisLine:i,seriesRect:n}=this,{strokeWidth:s}=t;i.x1=0,i.x2=n.width,i.y1=0,i.y2=0,i.stroke=t.stroke,i.strokeWidth=s+(s%2==1?1:0);const r=e.convert(0);i.translationY=r}generateNodeData(){const{data:e,yData:t,xData:i,xScale:n,yScale:s,fill:r,stroke:o,strokeWidth:a,label:l}=this;if(!e)return;const{fontStyle:c,fontWeight:h,fontSize:d,fontFamily:u,color:p,formatter:g,placement:f}=l,m=[],v=s.convert(0),y=!(n instanceof RI);for(let e=0,l=t.length;e<l;e++){let l=t[e];const C=i[e],b=void 0===l;b&&(l=0);const S=Math.min(void 0===l?NaN:s.convert(l),v),w=n.convert(y?n.toDomain(C):C),x=Math.max(void 0===l?NaN:s.convert(l),v),E=y?this.bandWidth:n.bandwidth,M=x-S,A={x:w+E/2,y:v};let T;T=g?g({value:l}):void 0!==l&&II(l)?this.formatLabelValue(l):"";const D=w+E/2;let I;const R="center";let L;const k=void 0!==l&&l>=0,P=2;if("center"===f)I=S+M/2,L="middle";else if("outsideEnd"===f)I=S+(k?-P:M+P),L=k?"bottom":"top";else if("insideEnd"===f){I=S+(k?P:M-P),L=k?"top":"bottom";const e=kf.Text.getTextSize(T,u).height||10;(k&&I>v-e||!k&&I<v+e)&&(I=v+P*(k?-1:1),L=k?"bottom":"top")}else I=v+P*(k?-1:1),L=k?"bottom":"top";m.push({x:w,y:S,width:E,height:M,fill:r,stroke:o,strokeWidth:a,seriesDatum:{x:C,y:b?void 0:l},point:A,label:{x:D,y:I,text:T,fontStyle:c,fontWeight:h,fontSize:d,fontFamily:u,textAlign:R,textBaseline:L,fill:p}})}return m}};LI.className="ColumnSparkline";var{isNumber:kI}=Uf,PI=class{static create(e,t){const i=function(e="line"){switch(e){case"column":return new LI;case"bar":return new DI;case"area":return new fI;default:return new SI}}((e=Uf.deepClone(e)).type);return t&&(i.tooltip=t),function(e,t){HI(e,"context",t.context,t),HI(e,"width",t.width,t),HI(e,"height",t.height,t),HI(e,"container",t.container,t),HI(e,"xKey",t.xKey,t),HI(e,"yKey",t.yKey,t),t.padding&&function(e,t){HI(e,"top",t.top,t),HI(e,"right",t.right,t),HI(e,"bottom",t.bottom,t),HI(e,"left",t.left,t)}(e.padding,t.padding),t.axis&&function(e,t){HI(e,"type",t.type,t),HI(e,"stroke",t.stroke,t),HI(e,"strokeWidth",t.strokeWidth,t)}(e.axis,t.axis),t.highlightStyle&&function(e,t){HI(e,"fill",t.fill,t),HI(e,"size",t.size,t),HI(e,"stroke",t.stroke,t),HI(e,"strokeWidth",t.strokeWidth,t)}(e.highlightStyle,t.highlightStyle)}(i,e),function(e,t){switch(t.type){case"bar":case"column":!function(e,t){HI(e,"valueAxisDomain",t.valueAxisDomain,t),HI(e,"fill",t.fill,t),HI(e,"stroke",t.stroke,t),HI(e,"strokeWidth",t.strokeWidth,t),HI(e,"paddingInner",t.paddingInner,t),HI(e,"paddingOuter",t.paddingOuter,t),HI(e,"formatter",t.formatter,t),t.label&&function(e,t){HI(e,"enabled",t.enabled,t),HI(e,"fontStyle",t.fontStyle,t),HI(e,"fontWeight",t.fontWeight,t),HI(e,"fontSize",t.fontSize,t),HI(e,"fontFamily",t.fontFamily,t),HI(e,"textAlign",t.textAlign,t),HI(e,"textBaseline",t.textBaseline,t),HI(e,"color",t.color,t),HI(e,"formatter",t.formatter,t),HI(e,"placement",t.placement,t)}(e.label,t.label)}(e,t);break;case"area":!function(e,t){HI(e,"fill",t.fill,t),t.marker&&NI(e.marker,t.marker),t.line&&OI(e.line,t.line),t.crosshairs&&_I(e.crosshairs,t.crosshairs)}(e,t);break;default:!function(e,t){t.marker&&NI(e.marker,t.marker),t.line&&OI(e.line,t.line),t.crosshairs&&_I(e.crosshairs,t.crosshairs)}(e,t)}}(i,e),e.data&&(i.data=e.data),i.processedOptions=e,i}};function NI(e,t){HI(e,"enabled",t.enabled,t),HI(e,"size",t.size,t),HI(e,"shape",t.shape,t),HI(e,"fill",t.fill,t),HI(e,"stroke",t.stroke,t),HI(e,"strokeWidth",t.strokeWidth,t),HI(e,"formatter",t.formatter,t)}function OI(e,t){HI(e,"stroke",t.stroke,t),HI(e,"strokeWidth",t.strokeWidth,t)}function _I(e,t){e.xLine&&t.xLine&&FI(e.xLine,t.xLine),e.yLine&&t.yLine&&FI(e.yLine,t.yLine)}function FI(e,t){HI(e,"enabled",t.enabled,t),HI(e,"stroke",t.stroke,t),HI(e,"strokeWidth",t.strokeWidth,t),HI(e,"lineDash",t.lineDash,t),HI(e,"lineCap",t.lineCap,t)}var GI={},VI=(e,t,i)=>{if(kI(t))return!0;const n=`AG Charts: ${e} must be a number, the value you provided is not a valid number. Using the default of ${i}px.`;var s,r;return s=()=>console.warn(n),GI[r=`${e} not a number`]||(s(),GI[r]=!0),!1},BI={xOffset:VI,yOffset:VI};function HI(e,t,i,n){if(t in n)if(t in e){const n=BI[t];(!n||n(t,i,e[t]))&&e[t]!==i&&(e[t]=i)}else console.warn(`Property ${t} does not exist on the target object.`)}var zI=class e extends s.uAl{constructor(){super(e.TEMPLATE)}init(e){let t=!0;const i=this.resizeObserverService.observeResize(this.getGui(),()=>{const{clientWidth:i,clientHeight:n}=this.getGui();if(0!==i&&0!==n)if(t){const s=((e,t)=>{for(var i in t||(t={}))zD.call(t,i)&&WD(e,i,t[i]);if(HD)for(var i of HD(t))UD.call(t,i)&&WD(e,i,t[i]);return e})({data:e.value,width:i,height:n,context:{data:e.data}},e.sparklineOptions);this.sparkline=PI.create(s,this.sparklineTooltipSingleton.getSparklineTooltip()),this.eSparkline.appendChild(this.sparkline.canvasElement),t=!1}else this.sparkline.width=i,this.sparkline.height=n});this.addDestroyFunc(()=>i())}refresh(e){return!!this.sparkline&&(this.sparkline.data=e.value,!0)}destroy(){this.sparkline&&this.sparkline.destroy(),super.destroy()}};zI.TEMPLATE='<div class="ag-sparkline-wrapper">\n            <span ref="eSparkline"></span>\n        </div>',jD([(0,s.PIB)("eSparkline")],zI.prototype,"eSparkline",2),jD([(0,s.dsm)("resizeObserverService")],zI.prototype,"resizeObserverService",2),jD([(0,s.dsm)("sparklineTooltipSingleton")],zI.prototype,"sparklineTooltipSingleton",2);var UI=zI,WI=class extends s.XQb{postConstruct(){this.tooltip=new aI}getSparklineTooltip(){return this.tooltip}destroyTooltip(){this.tooltip&&this.tooltip.destroy()}};jD([s.o7C],WI.prototype,"postConstruct",1),jD([s.yah],WI.prototype,"destroyTooltip",1),WI=jD([(0,s.dR4)("sparklineTooltipSingleton")],WI);var jI={version:"31.3.4",moduleName:s.zsj.SparklinesModule,beans:[WI],userComponents:[{componentName:"agSparklineCellRenderer",componentClass:UI}],dependantModules:[fm]},KI=class extends s.XQb{constructor(){super(),this.allComponents=new Map}registerStatusPanel(e,t){this.allComponents.set(e,t)}unregisterStatusPanel(e){this.allComponents.delete(e)}unregisterAllComponents(){this.allComponents.clear()}getStatusPanel(e){return this.allComponents.get(e)}destroy(){this.unregisterAllComponents(),super.destroy()}};KI=om([(0,s.dR4)("statusBarService")],KI);var $I=class e extends s.uAl{constructor(){super(e.TEMPLATE),this.compDestroyFunctions={}}postConstruct(){this.processStatusPanels(new Map),this.addManagedPropertyListeners(["statusBar"],this.handleStatusBarChanged.bind(this))}processStatusPanels(e){var t;const i=null==(t=this.gos.get("statusBar"))?void 0:t.statusPanels;if(i){const t=i.filter(e=>"left"===e.align);this.createAndRenderComponents(t,this.eStatusBarLeft,e);const n=i.filter(e=>"center"===e.align);this.createAndRenderComponents(n,this.eStatusBarCenter,e);const s=i.filter(e=>!e.align||"right"===e.align);this.createAndRenderComponents(s,this.eStatusBarRight,e)}else this.setDisplayed(!1)}handleStatusBarChanged(){var e;const t=null==(e=this.gos.get("statusBar"))?void 0:e.statusPanels,i=Array.isArray(t)&&t.length>0;this.setDisplayed(i);const n=new Map;i&&t.forEach(e=>{var t,i;const r=null!=(t=e.key)?t:e.statusPanel,o=this.statusBarService.getStatusPanel(r);if(null==o?void 0:o.refresh){const t=this.gos.addGridCommonParams(null!=(i=e.statusPanelParams)?i:{});o.refresh(t)&&(n.set(r,o),delete this.compDestroyFunctions[r],s._.removeFromParent(o.getGui()))}}),this.resetStatusBar(),i&&this.processStatusPanels(n)}resetStatusBar(){this.eStatusBarLeft.innerHTML="",this.eStatusBarCenter.innerHTML="",this.eStatusBarRight.innerHTML="",this.destroyComponents(),this.statusBarService.unregisterAllComponents()}destroyComponents(){Object.values(this.compDestroyFunctions).forEach(e=>e()),this.compDestroyFunctions={}}createAndRenderComponents(e,t,i){const n=[];e.forEach(e=>{const t=e.key||e.statusPanel,r=i.get(t);let o;if(r)o=s.oY$.resolve(r);else{const t={};if(o=this.userComponentFactory.getStatusPanelCompDetails(e,t).newAgStackInstance(),!o)return}n.push({key:t,promise:o})}),s.oY$.all(n.map(e=>e.promise)).then(()=>{n.forEach(e=>{e.promise.then(i=>{const n=()=>{this.getContext().destroyBean(i)};this.isAlive()?(this.statusBarService.registerStatusPanel(e.key,i),t.appendChild(i.getGui()),this.compDestroyFunctions[e.key]=n):n()})})})}};$I.TEMPLATE='<div class="ag-status-bar">\n            <div ref="eStatusBarLeft" class="ag-status-bar-left" role="status"></div>\n            <div ref="eStatusBarCenter" class="ag-status-bar-center" role="status"></div>\n            <div ref="eStatusBarRight" class="ag-status-bar-right" role="status"></div>\n        </div>',om([(0,s.dsm)("userComponentFactory")],$I.prototype,"userComponentFactory",2),om([(0,s.dsm)("statusBarService")],$I.prototype,"statusBarService",2),om([(0,s.PIB)("eStatusBarLeft")],$I.prototype,"eStatusBarLeft",2),om([(0,s.PIB)("eStatusBarCenter")],$I.prototype,"eStatusBarCenter",2),om([(0,s.PIB)("eStatusBarRight")],$I.prototype,"eStatusBarRight",2),om([s.o7C],$I.prototype,"postConstruct",1),om([s.yah],$I.prototype,"destroyComponents",1);var YI=$I,qI=class e extends s.uAl{constructor(){super(e.TEMPLATE)}setLabel(e,t){this.setDisplayed(!1);const i=this.localeService.getLocaleTextFunc();this.eLabel.innerHTML=i(e,t)}setValue(e){this.eValue.innerHTML=e}};qI.TEMPLATE='<div class="ag-status-name-value">\n            <span ref="eLabel"></span>:&nbsp;\n            <span ref="eValue" class="ag-status-name-value-value"></span>\n        </div>',om([(0,s.PIB)("eLabel")],qI.prototype,"eLabel",2),om([(0,s.PIB)("eValue")],qI.prototype,"eValue",2);var XI=qI,ZI=class extends XI{postConstruct(){"clientSide"===this.rowModel.getType()?(this.setLabel("totalAndFilteredRows","Rows"),this.addCssClass("ag-status-panel"),this.addCssClass("ag-status-panel-total-and-filtered-row-count"),this.setDisplayed(!0),this.addManagedListener(this.eventService,s.sVA.EVENT_MODEL_UPDATED,this.onDataChanged.bind(this)),this.onDataChanged()):s._.warnOnce("agTotalAndFilteredRowCountComponent should only be used with the client side row model.")}onDataChanged(){const e=this.localeService.getLocaleTextFunc(),t=e("thousandSeparator",","),i=e("decimalSeparator","."),n=s._.formatNumberCommas(this.getFilteredRowCountValue(),t,i),r=s._.formatNumberCommas(this.getTotalRowCount(),t,i);if(n===r)this.setValue(n);else{const e=this.localeService.getLocaleTextFunc();this.setValue(`${n} ${e("of","of")} ${r}`)}}getFilteredRowCountValue(){let e=0;return this.rowModel.forEachNodeAfterFilter(t=>{t.group||e++}),e}getTotalRowCount(){let e=0;return this.rowModel.forEachNode(t=>{t.group||e++}),e}init(){}refresh(){return!0}destroy(){super.destroy()}};om([(0,s.dsm)("rowModel")],ZI.prototype,"rowModel",2),om([s.o7C],ZI.prototype,"postConstruct",1);var QI=class extends XI{postConstruct(){if(this.setLabel("filteredRows","Filtered"),"clientSide"!==this.rowModel.getType())return void s._.warnOnce("agFilteredRowCountComponent should only be used with the client side row model.");this.addCssClass("ag-status-panel"),this.addCssClass("ag-status-panel-filtered-row-count"),this.setDisplayed(!0);const e=this.onDataChanged.bind(this);this.addManagedListener(this.eventService,s.sVA.EVENT_MODEL_UPDATED,e),e()}onDataChanged(){const e=this.getTotalRowCountValue(),t=this.getFilteredRowCountValue(),i=this.localeService.getLocaleTextFunc(),n=i("thousandSeparator",","),r=i("decimalSeparator",".");this.setValue(s._.formatNumberCommas(t,n,r)),this.setDisplayed(e!==t)}getTotalRowCountValue(){let e=0;return this.rowModel.forEachNode(t=>e+=1),e}getFilteredRowCountValue(){let e=0;return this.rowModel.forEachNodeAfterFilter(t=>{t.group||(e+=1)}),e}init(){}refresh(){return!0}destroy(){super.destroy()}};om([(0,s.dsm)("rowModel")],QI.prototype,"rowModel",2),om([s.o7C],QI.prototype,"postConstruct",1);var JI=class extends XI{postConstruct(){this.setLabel("totalRows","Total Rows"),"clientSide"===this.rowModel.getType()?(this.addCssClass("ag-status-panel"),this.addCssClass("ag-status-panel-total-row-count"),this.setDisplayed(!0),this.addManagedListener(this.eventService,s.sVA.EVENT_MODEL_UPDATED,this.onDataChanged.bind(this)),this.onDataChanged()):s._.warnOnce("agTotalRowCountComponent should only be used with the client side row model.")}onDataChanged(){const e=this.localeService.getLocaleTextFunc(),t=e("thousandSeparator",","),i=e("decimalSeparator",".");this.setValue(s._.formatNumberCommas(this.getRowCountValue(),t,i))}getRowCountValue(){let e=0;return this.rowModel.forEachLeafNode(t=>e+=1),e}init(){}refresh(){return!0}destroy(){super.destroy()}};om([(0,s.dsm)("rowModel")],JI.prototype,"rowModel",2),om([s.o7C],JI.prototype,"postConstruct",1);var eR=class extends XI{postConstruct(){if(!this.isValidRowModel())return void console.warn("AG Grid: agSelectedRowCountComponent should only be used with the client and server side row model.");this.setLabel("selectedRows","Selected"),this.addCssClass("ag-status-panel"),this.addCssClass("ag-status-panel-selected-row-count"),this.onRowSelectionChanged();const e=this.onRowSelectionChanged.bind(this);this.addManagedListener(this.eventService,s.sVA.EVENT_MODEL_UPDATED,e),this.addManagedListener(this.eventService,s.sVA.EVENT_SELECTION_CHANGED,e)}isValidRowModel(){const e=this.rowModel.getType();return"clientSide"===e||"serverSide"===e}onRowSelectionChanged(){const e=this.selectionService.getSelectionCount();if(e<0)return this.setValue("?"),void this.setDisplayed(!0);const t=this.localeService.getLocaleTextFunc(),i=t("thousandSeparator",","),n=t("decimalSeparator",".");this.setValue(s._.formatNumberCommas(e,i,n)),this.setDisplayed(e>0)}init(){}refresh(){return!0}destroy(){super.destroy()}};om([(0,s.dsm)("rowModel")],eR.prototype,"rowModel",2),om([(0,s.dsm)("selectionService")],eR.prototype,"selectionService",2),om([s.o7C],eR.prototype,"postConstruct",1);var tR=class e extends s.uAl{constructor(){super(e.TEMPLATE)}destroy(){super.destroy()}postConstruct(){this.isValidRowModel()?(this.avgAggregationComp.setLabel("avg","Average"),this.countAggregationComp.setLabel("count","Count"),this.minAggregationComp.setLabel("min","Min"),this.maxAggregationComp.setLabel("max","Max"),this.sumAggregationComp.setLabel("sum","Sum"),this.addManagedListener(this.eventService,s.sVA.EVENT_RANGE_SELECTION_CHANGED,this.onRangeSelectionChanged.bind(this)),this.addManagedListener(this.eventService,s.sVA.EVENT_MODEL_UPDATED,this.onRangeSelectionChanged.bind(this))):console.warn("AG Grid: agAggregationComponent should only be used with the client and server side row model.")}isValidRowModel(){const e=this.rowModel.getType();return"clientSide"===e||"serverSide"===e}init(e){this.params=e}refresh(e){return this.params=e,this.onRangeSelectionChanged(),!0}setAggregationComponentValue(e,t,i){var n;const r=this.getAllowedAggregationValueComponent(e);if(s._.exists(r)&&r){const e=this.localeService.getLocaleTextFunc(),n=e("thousandSeparator",","),o=e("decimalSeparator",".");r.setValue(s._.formatNumberTwoDecimalPlacesAndCommas(t,n,o)),r.setDisplayed(i)}else null==(n=this.getAggregationValueComponent(e))||n.setDisplayed(!1)}getAllowedAggregationValueComponent(e){const{aggFuncs:t}=this.params;return!t||t.includes(e)?this.getAggregationValueComponent(e):null}getAggregationValueComponent(e){return this[`${e}AggregationComp`]}onRangeSelectionChanged(){var e;const t=null==(e=this.rangeService)?void 0:e.getCellRanges();let i=0,n=0,r=0,o=null,a=null;const l={};if(t&&!s._.missingOrEmpty(t)&&this.rangeService)for(let e=0;e<t.length;e++){const c=t[e];let h=this.rangeService.getRangeStartRow(c);const d=this.rangeService.getRangeEndRow(c);for(;!s._.missing(h)&&h&&!this.rowPositionUtils.before(d,h)&&h&&c.columns;)c.columns.forEach(e=>{if(null===h)return;const t=this.cellPositionUtils.createId({rowPinned:h.rowPinned,column:e,rowIndex:h.rowIndex});if(l[t])return;l[t]=!0;const c=this.rowPositionUtils.getRowNode(h);if(s._.missing(c))return;let d=this.valueService.getValue(e,c);s._.missing(d)||""===d||(n++,"object"==typeof d&&"value"in d&&(d=d.value,""===d)||("string"==typeof d&&(d=Number(d)),"number"!=typeof d||isNaN(d)||(i+=d,(null===a||d>a)&&(a=d),(null===o||d<o)&&(o=d),r++)))}),h=this.cellNavigationService.getRowBelow(h)}const c=n>1,h=r>1;this.setAggregationComponentValue("count",n,c),this.setAggregationComponentValue("sum",i,h),this.setAggregationComponentValue("min",o,h),this.setAggregationComponentValue("max",a,h),this.setAggregationComponentValue("avg",i/r,h)}};tR.TEMPLATE='<div class="ag-status-panel ag-status-panel-aggregations">\n            <ag-name-value ref="avgAggregationComp"></ag-name-value>\n            <ag-name-value ref="countAggregationComp"></ag-name-value>\n            <ag-name-value ref="minAggregationComp"></ag-name-value>\n            <ag-name-value ref="maxAggregationComp"></ag-name-value>\n            <ag-name-value ref="sumAggregationComp"></ag-name-value>\n        </div>',om([(0,s.Xx1)("rangeService")],tR.prototype,"rangeService",2),om([(0,s.dsm)("valueService")],tR.prototype,"valueService",2),om([(0,s.dsm)("cellNavigationService")],tR.prototype,"cellNavigationService",2),om([(0,s.dsm)("rowModel")],tR.prototype,"rowModel",2),om([(0,s.dsm)("cellPositionUtils")],tR.prototype,"cellPositionUtils",2),om([(0,s.dsm)("rowPositionUtils")],tR.prototype,"rowPositionUtils",2),om([(0,s.PIB)("sumAggregationComp")],tR.prototype,"sumAggregationComp",2),om([(0,s.PIB)("countAggregationComp")],tR.prototype,"countAggregationComp",2),om([(0,s.PIB)("minAggregationComp")],tR.prototype,"minAggregationComp",2),om([(0,s.PIB)("maxAggregationComp")],tR.prototype,"maxAggregationComp",2),om([(0,s.PIB)("avgAggregationComp")],tR.prototype,"avgAggregationComp",2),om([s.o7C],tR.prototype,"postConstruct",1);var iR=tR,nR={version:"31.3.4",moduleName:s.zsj.StatusBarModule,beans:[KI],agStackComponents:[{componentName:"AgStatusBar",componentClass:YI},{componentName:"AgNameValue",componentClass:XI}],userComponents:[{componentName:"agAggregationComponent",componentClass:iR},{componentName:"agSelectedRowCountComponent",componentClass:eR},{componentName:"agTotalRowCountComponent",componentClass:JI},{componentName:"agFilteredRowCountComponent",componentClass:QI},{componentName:"agTotalAndFilteredRowCountComponent",componentClass:ZI}],dependantModules:[fm]},sR=Object.defineProperty,rR=Object.getOwnPropertyDescriptor,oR=(e,t,i,n)=>{for(var s,r=n>1?void 0:n?rR(t,i):t,o=e.length-1;o>=0;o--)(s=e[o])&&(r=(n?s(t,i,r):s(r))||r);return n&&r&&sR(t,i,r),r},aR=class extends s.XQb{constructor(){super(...arguments),this.firstRow=-1,this.lastRow=-1,this.rowCount=-1,this.rowNodesByIndex={}}ensureRowHeightsValid(e,t,i,n){return!1}init(){this.rowHeight=this.gos.getRowHeightAsNumber(),this.addManagedListener(this.eventService,s.sVA.EVENT_VIEWPORT_CHANGED,this.onViewportChanged.bind(this)),this.addManagedPropertyListener("viewportDatasource",()=>this.updateDatasource()),this.addManagedPropertyListener("rowHeight",()=>{this.rowHeight=this.gos.getRowHeightAsNumber(),this.updateRowHeights()})}start(){this.updateDatasource()}isLastRowIndexKnown(){return!0}destroyDatasource(){this.viewportDatasource&&(this.viewportDatasource.destroy&&this.viewportDatasource.destroy(),this.rowRenderer.datasourceChanged(),this.firstRow=-1,this.lastRow=-1)}updateDatasource(){const e=this.gos.get("viewportDatasource");e&&this.setViewportDatasource(e)}getViewportRowModelPageSize(){return this.gos.get("viewportRowModelPageSize")}getViewportRowModelBufferSize(){return this.gos.get("viewportRowModelBufferSize")}calculateFirstRow(e){const t=this.getViewportRowModelBufferSize(),i=this.getViewportRowModelPageSize(),n=e-t;return n<0?0:Math.floor(n/i)*i}calculateLastRow(e){if(-1===e)return e;const t=this.getViewportRowModelBufferSize(),i=this.getViewportRowModelPageSize(),n=e+t,s=Math.ceil(n/i)*i,r=this.rowCount-1;return Math.min(s,r)}onViewportChanged(e){const t=this.calculateFirstRow(e.firstRow),i=this.calculateLastRow(e.lastRow);this.firstRow===t&&this.lastRow===i||(this.firstRow=t,this.lastRow=i,this.purgeRowsNotInViewport(),this.viewportDatasource&&this.viewportDatasource.setViewportRange(this.firstRow,this.lastRow))}purgeRowsNotInViewport(){Object.keys(this.rowNodesByIndex).forEach(e=>{const t=parseInt(e,10);if(t<this.firstRow||t>this.lastRow){if(this.isRowFocused(t))return;delete this.rowNodesByIndex[t]}})}isRowFocused(e){const t=this.focusService.getFocusCellToUseAfterRefresh();return!!t&&(null==t.rowPinned&&t.rowIndex===e)}setViewportDatasource(e){this.destroyDatasource(),this.viewportDatasource=e,this.rowCount=-1,e.init?e.init({setRowCount:this.setRowCount.bind(this),setRowData:this.setRowData.bind(this),getRow:this.getRow.bind(this)}):console.warn("AG Grid: viewport is missing init method.")}getType(){return"viewport"}getRow(e){return this.rowNodesByIndex[e]||(this.rowNodesByIndex[e]=this.createBlankRowNode(e)),this.rowNodesByIndex[e]}getRowNode(e){let t;return this.forEachNode(i=>{i.id===e&&(t=i)}),t}getRowCount(){return-1===this.rowCount?0:this.rowCount}getRowIndexAtPixel(e){return 0!==this.rowHeight?Math.floor(e/this.rowHeight):0}getRowBounds(e){return{rowHeight:this.rowHeight,rowTop:this.rowHeight*e}}updateRowHeights(){this.forEachNode(e=>{e.setRowHeight(this.rowHeight),e.setRowTop(this.rowHeight*e.rowIndex)});const e={type:s.sVA.EVENT_MODEL_UPDATED,newData:!1,newPage:!1,keepRenderedRows:!0,animate:!1};this.eventService.dispatchEvent(e)}getTopLevelRowCount(){return this.getRowCount()}getTopLevelRowDisplayedIndex(e){return e}isEmpty(){return this.rowCount>0}isRowsToRender(){return this.rowCount>0}getNodesInRangeForSelection(e,t){const i=s._.missing(e)?0:e.rowIndex,n=t.rowIndex,r=i<this.firstRow||i>this.lastRow,o=n<this.firstRow||n>this.lastRow;if(r||o)return[];const a=[],l=i<=n?n:i;for(let e=i<=n?i:n;e<=l;e++)a.push(this.rowNodesByIndex[e]);return a}forEachNode(e){let t=0;Object.keys(this.rowNodesByIndex).forEach(i=>{const n=parseInt(i,10),s=this.rowNodesByIndex[n];e(s,t),t++})}setRowData(e){s._.iterateObject(e,(e,t)=>{const i=parseInt(e,10);if(i>=this.firstRow&&i<=this.lastRow){let e=this.rowNodesByIndex[i];s._.missing(e)&&(e=this.createBlankRowNode(i),this.rowNodesByIndex[i]=e),e.setDataAndId(t,i.toString())}})}createBlankRowNode(e){const t=new s.TUE(this.beans);return t.setRowHeight(this.rowHeight),t.setRowTop(this.rowHeight*e),t.setRowIndex(e),t}setRowCount(e,t=!1){if(e===this.rowCount)return;this.rowCount=e,this.eventService.dispatchEventOnce({type:s.sVA.EVENT_ROW_COUNT_READY});const i={type:s.sVA.EVENT_MODEL_UPDATED,newData:!1,newPage:!1,keepRenderedRows:t,animate:!1};this.eventService.dispatchEvent(i)}isRowPresent(e){return!!this.getRowNode(e.id)}};oR([(0,s.dsm)("rowRenderer")],aR.prototype,"rowRenderer",2),oR([(0,s.dsm)("focusService")],aR.prototype,"focusService",2),oR([(0,s.dsm)("beans")],aR.prototype,"beans",2),oR([s.o7C],aR.prototype,"init",1),oR([s.yah],aR.prototype,"destroyDatasource",1),aR=oR([(0,s.dR4)("rowModel")],aR);var lR={version:"31.3.4",moduleName:s.zsj.ViewportRowModelModule,rowModel:"viewport",beans:[aR],dependantModules:[fm]};rm(am,hv),s.syG.__registerModules([s.Q90,s.Sko,s.n76,cv,Aw,Fw,EE,wA,BA,ZA,xT,GT,Rv,BT,vx,vD,GD,Hx,jI,nR,lR],!1,void 0)},56137(e,t,i){"use strict";i.d(t,{W6:()=>fe});var n=i(22155),s=i(54989),r=i(70316),o=i(32431),a=Object.defineProperty,l=Object.defineProperties,c=Object.getOwnPropertyDescriptors,h=Object.getOwnPropertySymbols,d=Object.prototype.hasOwnProperty,u=Object.prototype.propertyIsEnumerable,p=(e,t,i)=>t in e?a(e,t,{enumerable:!0,configurable:!0,writable:!0,value:i}):e[t]=i,g=(e,t)=>{for(var i in t||(t={}))d.call(t,i)&&p(e,i,t[i]);if(h)for(var i of h(t))u.call(t,i)&&p(e,i,t[i]);return e},f=(e,t)=>l(e,c(t)),m=(0,n.createContext)({setMethods:()=>{}}),v=(0,n.memo)(e=>{const{initialProps:t,addUpdateCallback:i,CustomComponentClass:s,setMethods:r}=e,[o,a]=(0,n.useState)(t);return(0,n.useEffect)(()=>{i(e=>a(e))},[]),n.createElement(m.Provider,{value:{setMethods:r}},n.createElement(s,g({},o)))}),y=0;function C(){return"agPortalKey_"+ ++y}var b=class{constructor(e,t,i,n){this.portal=null,this.oldPortal=null,this.reactComponent=e,this.portalManager=t,this.componentType=i,this.suppressFallbackMethods=!!n,this.statelessComponent=this.isStateless(this.reactComponent),this.key=C(),this.portalKey=C(),this.instanceCreated=this.isStatelessComponent()?s.oY$.resolve(!1):new s.oY$(e=>{this.resolveInstanceCreated=e})}getGui(){return this.eParentElement}getRootElement(){return this.eParentElement.firstChild}destroy(){return this.componentInstance&&"function"==typeof this.componentInstance.destroy&&this.componentInstance.destroy(),this.portalManager.destroyPortal(this.portal)}createParentElement(e){const t=this.portalManager.getComponentWrappingElement(),i=document.createElement(t||"div");return i.classList.add("ag-react-container"),e.reactContainer=i,i}addParentContainerStyleAndClasses(){this.componentInstance&&(this.componentInstance.getReactContainerStyle&&this.componentInstance.getReactContainerStyle()&&(s._.warnOnce('Since v31.1 "getReactContainerStyle" is deprecated. Apply styling directly to ".ag-react-container" if needed.'),Object.assign(this.eParentElement.style,this.componentInstance.getReactContainerStyle())),this.componentInstance.getReactContainerClasses&&this.componentInstance.getReactContainerClasses())&&(s._.warnOnce('Since v31.1 "getReactContainerClasses" is deprecated. Apply styling directly to ".ag-react-container" if needed.'),this.componentInstance.getReactContainerClasses().forEach(e=>this.eParentElement.classList.add(e)))}statelessComponentRendered(){return this.eParentElement.childElementCount>0||this.eParentElement.childNodes.length>0}getFrameworkComponentInstance(){return this.componentInstance}isStatelessComponent(){return this.statelessComponent}getReactComponentName(){return this.reactComponent.name}getMemoType(){return this.hasSymbol()?Symbol.for("react.memo"):60115}hasSymbol(){return"function"==typeof Symbol&&Symbol.for}isStateless(e){return"function"==typeof e&&!(e.prototype&&e.prototype.isReactComponent)||"object"==typeof e&&e.$$typeof===this.getMemoType()}hasMethod(e){const t=this.getFrameworkComponentInstance();return!!t&&null!=t[e]||this.fallbackMethodAvailable(e)}callMethod(e,t){const i=this.getFrameworkComponentInstance();if(this.isStatelessComponent())return this.fallbackMethod(e,t&&t[0]?t[0]:{});if(!i)return void setTimeout(()=>this.callMethod(e,t));const n=i[e];return n?n.apply(i,t):this.fallbackMethodAvailable(e)?this.fallbackMethod(e,t&&t[0]?t[0]:{}):void 0}addMethod(e,t){this[e]=t}init(e){return this.eParentElement=this.createParentElement(e),this.params=e,this.createOrUpdatePortal(e),new s.oY$(e=>this.createReactComponent(e))}createOrUpdatePortal(e){this.isStatelessComponent()||(this.ref=e=>{var t;this.componentInstance=e,this.addParentContainerStyleAndClasses(),null==(t=this.resolveInstanceCreated)||t.call(this,!0),this.resolveInstanceCreated=void 0},e.ref=this.ref),this.reactElement=this.createElement(this.reactComponent,f(g({},e),{key:this.key})),this.portal=(0,r.createPortal)(this.reactElement,this.eParentElement,this.portalKey)}createElement(e,t){return(0,n.createElement)(e,t)}createReactComponent(e){this.portalManager.mountReactPortal(this.portal,this,t=>{e(t)})}isNullValue(){return this.valueRenderedIsNull(this.params)}rendered(){return this.isStatelessComponent()&&this.statelessComponentRendered()||!(this.isStatelessComponent()||!this.getFrameworkComponentInstance())}valueRenderedIsNull(e){if(!this.componentType.cellRenderer)return!1;const t=console.error;try{return console.error=()=>{},""===(0,o.renderToStaticMarkup)((0,n.createElement)(this.reactComponent,e))}catch(e){}finally{console.error=t}return!1}refreshComponent(e){this.oldPortal=this.portal,this.createOrUpdatePortal(e),this.portalManager.updateReactPortal(this.oldPortal,this.portal)}fallbackMethod(e,t){const i=this[`${e}Component`];if(!this.suppressFallbackMethods&&i)return i.bind(this)(t)}fallbackMethodAvailable(e){return!this.suppressFallbackMethods&&!!this[`${e}Component`]}};function S(e,t,i){e.forEach(e=>{const n=t[e];n&&(i[e]=n)})}var w=class extends b{constructor(){super(...arguments),this.awaitUpdateCallback=new s.oY$(e=>{this.resolveUpdateCallback=e}),this.wrapperComponent=v}init(e){return this.sourceParams=e,super.init(this.getProps())}addMethod(){}getInstance(){return this.instanceCreated.then(()=>this.componentInstance)}getFrameworkComponentInstance(){return this}createElement(e,t){return super.createElement(this.wrapperComponent,{initialProps:t,CustomComponentClass:e,setMethods:e=>this.setMethods(e),addUpdateCallback:e=>{this.updateCallback=()=>(e(this.getProps()),new s.oY$(e=>{setTimeout(()=>{e()})})),this.resolveUpdateCallback()}})}setMethods(e){this.providedMethods=e,S(this.getOptionalMethods(),this.providedMethods,this)}getOptionalMethods(){return[]}getProps(){return f(g({},this.sourceParams),{key:this.key,ref:this.ref})}refreshProps(){return this.updateCallback?this.updateCallback():new s.oY$(e=>this.awaitUpdateCallback.then(()=>{this.updateCallback().then(()=>e())}))}},x=class extends w{constructor(){super(...arguments),this.date=null,this.onDateChange=e=>this.updateDate(e)}getDate(){return this.date}setDate(e){this.date=e,this.refreshProps()}refresh(e){this.sourceParams=e,this.refreshProps()}getOptionalMethods(){return["afterGuiAttached","setInputPlaceholder","setInputAriaLabel","setDisabled"]}updateDate(e){this.setDate(e),this.sourceParams.onDateChanged()}getProps(){const e=super.getProps();return e.date=this.date,e.onDateChange=this.onDateChange,delete e.onDateChanged,e}},E=class extends w{constructor(){super(...arguments),this.model=null,this.onModelChange=e=>this.updateModel(e),this.onUiChange=()=>this.sourceParams.filterChangedCallback()}isFilterActive(){return null!=this.model}doesFilterPass(e){return this.providedMethods.doesFilterPass(e)}getModel(){return this.model}setModel(e){return this.model=e,this.refreshProps()}refresh(e){return this.sourceParams=e,this.refreshProps(),!0}getOptionalMethods(){return["afterGuiAttached","afterGuiDetached","onNewRowsLoaded","getModelAsString","onAnyFilterChanged"]}updateModel(e){this.setModel(e).then(()=>this.sourceParams.filterChangedCallback())}getProps(){const e=super.getProps();return e.model=this.model,e.onModelChange=this.onModelChange,e.onUiChange=this.onUiChange,delete e.filterChangedCallback,delete e.filterModifiedCallback,delete e.valueGetter,e}};function M(e,t){e.parentFilterInstance(i=>{(i.setModel(t)||s.oY$.resolve()).then(()=>{e.filterParams.filterChangedCallback()})})}var A=class{constructor(e,t){this.floatingFilterParams=e,this.refreshProps=t,this.model=null,this.onModelChange=e=>this.updateModel(e)}getProps(){return f(g({},this.floatingFilterParams),{model:this.model,onModelChange:this.onModelChange})}onParentModelChanged(e){this.model=e,this.refreshProps()}refresh(e){this.floatingFilterParams=e,this.refreshProps()}setMethods(e){S(this.getOptionalMethods(),e,this)}getOptionalMethods(){return["afterGuiAttached"]}updateModel(e){this.model=e,this.refreshProps(),M(this.floatingFilterParams,e)}},T=class extends w{constructor(){super(...arguments),this.model=null,this.onModelChange=e=>this.updateModel(e)}onParentModelChanged(e){this.model=e,this.refreshProps()}refresh(e){this.sourceParams=e,this.refreshProps()}getOptionalMethods(){return["afterGuiAttached"]}updateModel(e){this.model=e,this.refreshProps(),M(this.sourceParams,e)}getProps(){const e=super.getProps();return e.model=this.model,e.onModelChange=this.onModelChange,e}},D=class extends w{refresh(e){this.sourceParams=e,this.refreshProps()}},I=class extends w{constructor(){super(...arguments),this.active=!1,this.expanded=!1,this.onActiveChange=e=>this.updateActive(e)}setActive(e){this.awaitSetActive(e)}setExpanded(e){this.expanded=e,this.refreshProps()}getOptionalMethods(){return["select","configureDefaults"]}awaitSetActive(e){return this.active=e,this.refreshProps()}updateActive(e){const t=this.awaitSetActive(e);e&&t.then(()=>this.sourceParams.onItemActivated())}getProps(){const e=super.getProps();return e.active=this.active,e.expanded=this.expanded,e.onActiveChange=this.onActiveChange,delete e.onItemActivated,e}},R=class extends w{refresh(e){this.sourceParams=e,this.refreshProps()}},L=class extends w{refresh(e){return this.sourceParams=e,this.refreshProps(),!0}},k=class extends w{constructor(){super(...arguments),this.onStateChange=e=>this.updateState(e)}refresh(e){return this.sourceParams=e,this.refreshProps(),!0}getState(){return this.state}updateState(e){this.state=e,this.refreshProps(),this.sourceParams.onStateUpdated()}getProps(){const e=super.getProps();return e.state=this.state,e.onStateChange=this.onStateChange,e}},P=class e{constructor(t,i,n){this.destroyed=!1,this.portals=[],this.hasPendingPortalUpdate=!1,this.wrappingElement=i||"div",this.refresher=t,this.maxComponentCreationTimeMs=n||e.MAX_COMPONENT_CREATION_TIME_IN_MS}getPortals(){return this.portals}destroy(){this.destroyed=!0}destroyPortal(e){this.portals=this.portals.filter(t=>t!==e),this.batchUpdate()}getComponentWrappingElement(){return this.wrappingElement}mountReactPortal(e,t,i){this.portals=[...this.portals,e],this.waitForInstance(t,i),this.batchUpdate()}updateReactPortal(e,t){this.portals[this.portals.indexOf(e)]=t,this.batchUpdate()}batchUpdate(){this.hasPendingPortalUpdate||(setTimeout(()=>{this.destroyed||(this.refresher(),this.hasPendingPortalUpdate=!1)}),this.hasPendingPortalUpdate=!0)}waitForInstance(e,t,i=Date.now()){if(this.destroyed)t(null);else if(e.rendered())t(e);else{if(Date.now()-i>=this.maxComponentCreationTimeMs&&!this.hasPendingPortalUpdate)return e.isNullValue()?void t(e):(console.error(`AG Grid: React Component '${e.getReactComponentName()}' not created within ${this.maxComponentCreationTimeMs}ms.`),void console.error("    If the component is using `forwardRef` but not `useImperativeHandle`, add the following: `useImperativeHandle(ref, () => ({}));`"));window.setTimeout(()=>{this.waitForInstance(e,t,i)})}}};P.MAX_COMPONENT_CREATION_TIME_IN_MS=1e3;var N=P,O=n.createContext({}),_=(...e)=>e.filter(e=>null!=e&&""!==e).join(" "),F=class e{constructor(...e){this.classesMap={},e.forEach(e=>{this.classesMap[e]=!0})}setClass(t,i){if(!!this.classesMap[t]==i)return this;const n=new e;return n.classesMap=g({},this.classesMap),n.classesMap[t]=i,n}toString(){return Object.keys(this.classesMap).filter(e=>this.classesMap[e]).join(" ")}},G=e=>"function"==typeof e&&!(e.prototype&&e.prototype.isReactComponent)||"object"==typeof e&&e.$$typeof===("function"==typeof Symbol&&Symbol.for?Symbol.for("react.memo"):60115),V=null!=r.createRoot&&null!=r.flushSync,B=!1,H=(e,t)=>{V&&e&&!B?r.flushSync(t):t()};function z(e,t,i){if(null==t||null==e)return t;if(e===t||0===t.length&&0===e.length)return e;if(i||0===e.length&&t.length>0||e.length>0&&0===t.length)return t;const n=[],s=[],r=new Map,o=new Map;for(let e=0;e<t.length;e++){const i=t[e];o.set(i.getInstanceId(),i)}for(let t=0;t<e.length;t++){const i=e[t];r.set(i.getInstanceId(),i),o.has(i.getInstanceId())&&n.push(i)}for(let e=0;e<t.length;e++){const i=t[e],n=i.getInstanceId();r.has(n)||s.push(i)}return n.length===e.length&&0===s.length?e:0===n.length&&s.length===t.length?t:0===n.length?s:0===s.length?n:[...n,...s]}var U=(e,t,i,n)=>{if(!e||e.componentFromFramework||t.isDestroyed())return;const s=e.newAgStackInstance();if(!s)return;let r,o,a=!1;return s.then(e=>{a?t.destroyBean(e):(r=e,o=r.getGui(),i.appendChild(o),W(n,r))}),()=>{a=!0,r&&(o&&o.parentElement&&o.parentElement.removeChild(o),t.destroyBean(r),n&&W(n,void 0))}},W=(e,t)=>{e&&(e instanceof Function?e(t):e.current=t)},j=(0,n.forwardRef)((e,t)=>{var i;const r=(0,n.useContext)(O).context,o=(0,n.useRef)(null),a=(0,n.useRef)(null),l=(0,n.useRef)(null),c=(0,n.useRef)(null),h=(0,n.useRef)(null),d=(0,n.useRef)(),[u,p]=(0,n.useState)(),[f,m]=(0,n.useState)(),[v,y]=(0,n.useState)(),[C,b]=(0,n.useState)(()=>new F),[S,w]=(0,n.useState)(()=>new F("ag-hidden")),[x,E]=(0,n.useState)(()=>new F("ag-hidden")),[M,A]=(0,n.useState)(()=>new F("ag-invisible"));(0,n.useImperativeHandle)(t,()=>({refresh:()=>!1})),(0,n.useLayoutEffect)(()=>U(u,r,a.current),[u]);const T=(0,n.useCallback)(t=>{if(o.current=t,!o.current)return r.destroyBean(d.current),void(d.current=null);const i={setInnerRenderer:(e,t)=>{p(e),y(t)},setChildCount:e=>m(e),addOrRemoveCssClass:(e,t)=>b(i=>i.setClass(e,t)),setContractedDisplayed:e=>E(t=>t.setClass("ag-hidden",!e)),setExpandedDisplayed:e=>w(t=>t.setClass("ag-hidden",!e)),setCheckboxVisible:e=>A(t=>t.setClass("ag-invisible",!e))};d.current=r.createBean(new s.ihO),d.current.init(i,o.current,l.current,c.current,h.current,j,e)},[]),D=(0,n.useMemo)(()=>`ag-cell-wrapper ${C.toString()}`,[C]),I=(0,n.useMemo)(()=>`ag-group-expanded ${S.toString()}`,[S]),R=(0,n.useMemo)(()=>`ag-group-contracted ${x.toString()}`,[x]),L=(0,n.useMemo)(()=>`ag-group-checkbox ${M.toString()}`,[M]),k=u&&u.componentFromFramework,P=k?u.componentClass:void 0,N=null==u&&null!=v,_=s._.escapeString(v,!0);return n.createElement("span",g({className:D,ref:T},e.colDef?{}:{role:null==(i=d.current)?void 0:i.getCellAriaRole()}),n.createElement("span",{className:I,ref:c}),n.createElement("span",{className:R,ref:h}),n.createElement("span",{className:L,ref:l}),n.createElement("span",{className:"ag-group-value",ref:a},N&&n.createElement(n.Fragment,null,_),k&&n.createElement(P,g({},u.params))),n.createElement("span",{className:"ag-group-child-count"},f))}),K=j,$=(0,n.memo)(e=>{const{ctrl:t}=e,i=t.isAlive(),{context:r}=(0,n.useContext)(O),o=i?t.getColId():void 0,[a,l]=(0,n.useState)(),c=(0,n.useRef)(null),h=(0,n.useRef)(null),d=(0,n.useRef)(null),u=(0,n.useRef)();let p=(0,n.useRef)();i&&!p.current&&(p.current=new s.hv8(()=>c.current));const m=(0,n.useCallback)(e=>{var n;if(c.current=e,!c.current||!i)return;const r={setWidth:e=>{c.current&&(c.current.style.width=e)},addOrRemoveCssClass:(e,t)=>p.current.addOrRemoveCssClass(e,t),setAriaSort:e=>{c.current&&(e?s._.setAriaSort(c.current,e):s._.removeAriaSort(c.current))},setUserCompDetails:e=>l(e),getUserCompInstance:()=>u.current||void 0};t.setComp(r,c.current,h.current,d.current);const o=t.getSelectAllGui();null==(n=h.current)||n.insertAdjacentElement("afterend",o)},[]);(0,n.useLayoutEffect)(()=>U(a,r,d.current,u),[a]),(0,n.useEffect)(()=>{t.setDragSource(c.current)},[a]);const v=(0,n.useMemo)(()=>!(!(null==a?void 0:a.componentFromFramework)||!G(a.componentClass)),[a]),y=a&&a.componentFromFramework,C=a&&a.componentClass;return n.createElement("div",{ref:m,className:"ag-header-cell","col-id":o,role:"columnheader"},n.createElement("div",{ref:h,className:"ag-header-cell-resize",role:"presentation"}),n.createElement("div",{ref:d,className:"ag-header-cell-comp-wrapper",role:"presentation"},y&&v&&n.createElement(C,g({},a.params)),y&&!v&&n.createElement(C,f(g({},a.params),{ref:u}))))}),Y=(0,n.memo)(e=>{const{context:t}=(0,n.useContext)(O),{ctrl:i}=e,[s,r]=(0,n.useState)(()=>new F),[o,a]=(0,n.useState)(()=>new F),[l,c]=(0,n.useState)("false"),[h,d]=(0,n.useState)(),[u,p]=(0,n.useState)(),m=(0,n.useMemo)(()=>i.getColId(),[]),v=(0,n.useRef)(null),y=(0,n.useRef)(null),C=(0,n.useRef)(),b=(0,n.useCallback)(e=>{if(v.current=e,!v.current)return;const t={setWidth:e=>{v.current&&(v.current.style.width=e)},addOrRemoveCssClass:(e,t)=>r(i=>i.setClass(e,t)),setUserCompDetails:e=>p(e),setResizableDisplayed:e=>{a(t=>t.setClass("ag-hidden",!e)),c(e?"false":"true")},setAriaExpanded:e=>d(e),getUserCompInstance:()=>C.current||void 0};i.setComp(t,v.current,y.current)},[]);(0,n.useLayoutEffect)(()=>U(u,t,v.current),[u]),(0,n.useEffect)(()=>{v.current&&i.setDragSource(v.current)},[u]);const S=(0,n.useMemo)(()=>!(!(null==u?void 0:u.componentFromFramework)||!G(u.componentClass)),[u]),w=(0,n.useMemo)(()=>"ag-header-group-cell "+s.toString(),[s]),x=(0,n.useMemo)(()=>"ag-header-cell-resize "+o.toString(),[o]),E=u&&u.componentFromFramework,M=u&&u.componentClass;return n.createElement("div",{ref:b,className:w,"col-id":m,role:"columnheader","aria-expanded":h},E&&S&&n.createElement(M,g({},u.params)),E&&!S&&n.createElement(M,f(g({},u.params),{ref:C})),n.createElement("div",{ref:y,"aria-hidden":l,className:x}))});function q(){s._.warnOnce("Using custom components without `reactiveCustomComponents = true` is deprecated.")}var X=(0,n.memo)(e=>{const{context:t,gos:i}=(0,n.useContext)(O),[r,o]=(0,n.useState)(()=>new F("ag-header-cell","ag-floating-filter")),[a,l]=(0,n.useState)(()=>new F),[c,h]=(0,n.useState)(()=>new F("ag-floating-filter-button","ag-hidden")),[d,u]=(0,n.useState)("false"),[p,v]=(0,n.useState)(),[y,C]=(0,n.useState)(1),b=(0,n.useRef)(null),S=(0,n.useRef)(null),w=(0,n.useRef)(null),x=(0,n.useRef)(null),E=(0,n.useRef)(),M=(0,n.useRef)(),T=e=>{null!=e&&E.current&&E.current(e)},{ctrl:D}=e,I=(0,n.useCallback)(e=>{if(b.current=e,!b.current)return;M.current=new s.oY$(e=>{E.current=e});const t={addOrRemoveCssClass:(e,t)=>o(i=>i.setClass(e,t)),addOrRemoveBodyCssClass:(e,t)=>l(i=>i.setClass(e,t)),setButtonWrapperDisplayed:e=>{h(t=>t.setClass("ag-hidden",!e)),u(e?"false":"true")},setWidth:e=>{b.current&&(b.current.style.width=e)},setCompDetails:e=>v(e),getFloatingFilterComp:()=>M.current?M.current:null,setMenuIcon:e=>{var t;return null==(t=x.current)?void 0:t.appendChild(e)}};D.setComp(t,b.current,x.current,S.current)},[]);(0,n.useLayoutEffect)(()=>U(p,t,S.current,T),[p]);const R=(0,n.useMemo)(()=>r.toString(),[r]),L=(0,n.useMemo)(()=>a.toString(),[a]),k=(0,n.useMemo)(()=>c.toString(),[c]),P=(0,n.useMemo)(()=>!!(p&&p.componentFromFramework&&G(p.componentClass)),[p]),N=(0,n.useMemo)(()=>i.get("reactiveCustomComponents"),[]),_=(0,n.useMemo)(()=>{if(p){if(N){const e=new A(p.params,()=>C(e=>e+1));return T(e),e}p.componentFromFramework&&q()}},[p]),V=null==_?void 0:_.getProps(),B=p&&p.componentFromFramework,H=p&&p.componentClass;return n.createElement("div",{ref:I,className:R,role:"gridcell"},n.createElement("div",{ref:S,className:L,role:"presentation"},B&&!N&&n.createElement(H,f(g({},p.params),{ref:P?()=>{}:T})),B&&N&&n.createElement(m.Provider,{value:{setMethods:e=>_.setMethods(e)}},n.createElement(H,g({},V)))),n.createElement("div",{ref:w,"aria-hidden":d,className:k,role:"presentation"},n.createElement("button",{ref:x,type:"button",className:"ag-button ag-floating-filter-button-button",tabIndex:-1})))}),Z=(0,n.memo)(e=>{const{ctrl:t}=e,{topOffset:i,rowHeight:r}=(0,n.useMemo)(()=>t.getTopAndHeight(),[]),o=t.getAriaRowIndex(),a=t.getHeaderRowClass(),[l,c]=(0,n.useState)(()=>r+"px"),[h,d]=(0,n.useState)(()=>i+"px"),u=(0,n.useRef)(null),p=(0,n.useRef)(null),[g,f]=(0,n.useState)(()=>t.getHeaderCtrls()),m=(0,n.useRef)(null),v=(0,n.useCallback)(e=>{if(m.current=e,!e)return;const i={setHeight:e=>c(e),setTop:e=>d(e),setHeaderCtrls:(e,t,i)=>{p.current=u.current,u.current=e;const n=z(p.current,e,t);n!==p.current&&H(i,()=>f(n))},setWidth:e=>{m.current&&(m.current.style.width=e)}};t.setComp(i,!1)},[]),y=(0,n.useMemo)(()=>({height:l,top:h}),[l,h]),C=(0,n.useCallback)(e=>{switch(t.getType()){case s.YtK.COLUMN_GROUP:return n.createElement(Y,{ctrl:e,key:e.getInstanceId()});case s.YtK.FLOATING_FILTER:return n.createElement(X,{ctrl:e,key:e.getInstanceId()});default:return n.createElement($,{ctrl:e,key:e.getInstanceId()})}},[]);return n.createElement("div",{ref:v,className:a,role:"row",style:y,"aria-rowindex":o},g.map(C))}),Q=(0,n.memo)(e=>{const[t,i]=(0,n.useState)(!0),[r,o]=(0,n.useState)([]),{context:a}=(0,n.useContext)(O),l=(0,n.useRef)(null),c=(0,n.useRef)(null),h=(0,n.useRef)(null),d="left"===e.pinned,u="right"===e.pinned,p=!d&&!u,g=(0,n.useCallback)(t=>{if(l.current=t,!l.current)return a.destroyBean(h.current),void(h.current=null);const n={setDisplayed:i,setCtrls:e=>o(e),setCenterWidth:e=>{c.current&&(c.current.style.width=e)},setViewportScrollLeft:e=>{l.current&&(l.current.scrollLeft=e)},setPinnedContainerWidth:e=>{l.current&&(l.current.style.width=e,l.current.style.minWidth=e,l.current.style.maxWidth=e)}};h.current=a.createBean(new s.OPU(e.pinned)),h.current.setComp(n,l.current)},[]),f=t?"":"ag-hidden",m=()=>r.map(e=>n.createElement(Z,{ctrl:e,key:e.getInstanceId()}));return n.createElement(n.Fragment,null,d&&n.createElement("div",{ref:g,className:"ag-pinned-left-header "+f,"aria-hidden":!t,role:"rowgroup"},m()),u&&n.createElement("div",{ref:g,className:"ag-pinned-right-header "+f,"aria-hidden":!t,role:"rowgroup"},m()),p&&n.createElement("div",{ref:g,className:"ag-header-viewport "+f,role:"presentation"},n.createElement("div",{ref:c,className:"ag-header-container",role:"rowgroup"},m())))}),J=(0,n.memo)(()=>{const[e,t]=(0,n.useState)(()=>new F),[i,r]=(0,n.useState)(),{context:o}=(0,n.useContext)(O),a=(0,n.useRef)(null),l=(0,n.useRef)(null),c=(0,n.useCallback)(e=>{if(a.current=e,!e)return o.destroyBean(l.current),void(l.current=null);const i={addOrRemoveCssClass:(e,i)=>t(t=>t.setClass(e,i)),setHeightAndMinHeight:e=>r(e)};l.current=o.createBean(new s.vBt),l.current.setComp(i,a.current,a.current)},[]),h=(0,n.useMemo)(()=>"ag-header "+e.toString(),[e]),d=(0,n.useMemo)(()=>({height:i,minHeight:i}),[i]);return n.createElement("div",{ref:c,className:h,style:d,role:"presentation"},n.createElement(Q,{pinned:"left"}),n.createElement(Q,{pinned:null}),n.createElement(Q,{pinned:"right"}))}),ee=(e,t)=>{(0,n.useEffect)(()=>{const i=t.current;if(i){const t=i.parentElement;if(t){const n=document.createComment(e);return t.insertBefore(n,i),()=>{t.removeChild(n)}}}},[e])},te=(0,n.memo)(e=>{const[t,i]=(0,n.useState)(),{context:o,popupService:a,localeService:l,gos:c}=(0,n.useContext)(O);return(()=>{const t=(0,n.useRef)(()=>{const{editDetails:t,cellCtrl:n,eParentCell:r}=e,{compDetails:h}=t,d=c.get("stopEditingWhenCellsLoseFocus"),u=o.createBean(new s.zmE(h.params)),p=u.getGui();if(e.jsChildComp){const t=e.jsChildComp.getGui();t&&p.appendChild(t)}const g={column:n.getColumn(),rowNode:n.getRowNode(),type:"popupCellEditor",eventSource:r,ePopup:p,position:t.popupPosition,keepWithinBounds:!0},f=a.positionPopupByComponent.bind(a,g),m=l.getLocaleTextFunc(),v=a.addPopup({modal:d,eChild:p,closeOnEsc:!0,closedCallback:()=>{n.onPopupEditorClosed()},anchorToElement:r,positionCallback:f,ariaLabel:m("ariaLabelCellEditor","Cell Editor")}),y=v?v.hideFunc:void 0;return i(u),e.jsChildComp&&e.jsChildComp.afterGuiAttached&&e.jsChildComp.afterGuiAttached(),()=>{null!=y&&y(),o.destroyBean(u)}}),r=(0,n.useRef)(),h=(0,n.useRef)(!1),d=(0,n.useRef)(!1),[,u]=(0,n.useState)(0);h.current&&(d.current=!0),(0,n.useEffect)(()=>(h.current||(r.current=t.current(),h.current=!0),u(e=>e+1),()=>{d.current&&r.current&&r.current()}),[])})(),n.createElement(n.Fragment,null,t&&e.wrappedContent&&(0,r.createPortal)(e.wrappedContent,t.getGui()))}),ie=class{constructor(e,t){this.cellEditorParams=e,this.refreshProps=t,this.instanceCreated=new s.oY$(e=>{this.resolveInstanceCreated=e}),this.onValueChange=e=>this.updateValue(e),this.value=e.value}getProps(){return f(g({},this.cellEditorParams),{initialValue:this.cellEditorParams.value,value:this.value,onValueChange:this.onValueChange})}getValue(){return this.value}refresh(e){this.cellEditorParams=e,this.refreshProps()}setMethods(e){S(this.getOptionalMethods(),e,this)}getInstance(){return this.instanceCreated.then(()=>this.componentInstance)}setRef(e){var t;this.componentInstance=e,null==(t=this.resolveInstanceCreated)||t.call(this),this.resolveInstanceCreated=void 0}getOptionalMethods(){return["isPopup","isCancelBeforeStart","isCancelAfterEnd","getPopupPosition","focusIn","focusOut","afterGuiAttached"]}updateValue(e){this.value=e,this.refreshProps()}},ne=(e,t,i)=>{const s=e.compProxy;return n.createElement(n.Fragment,null,!s&&n.createElement(t,f(g({},e.compDetails.params),{ref:i})),s&&((e,t,i)=>{const{compProxy:s}=e;i(s);const r=s.getProps(),o=G(t);return n.createElement(m.Provider,{value:{setMethods:e=>s.setMethods(e)}},o&&n.createElement(t,g({},r)),!o&&n.createElement(t,f(g({},r),{ref:e=>s.setRef(e)})))})(e,t,i))},se=(0,n.memo)(e=>{const{context:t}=(0,n.useContext)(O),{cellCtrl:i,printLayout:r,editingRow:o}=e,a=i.getTabIndex(),l=i.getColumnIdSanitised(),c=i.getInstanceId(),[h,d]=(0,n.useState)(()=>i.isCellRenderer()?void 0:{compDetails:void 0,value:i.getValueToDisplay(),force:!1}),[u,p]=(0,n.useState)(),[m,v]=(0,n.useState)(1),[y,C]=(0,n.useState)(),[b,S]=(0,n.useState)(!1),[w,x]=(0,n.useState)(!1),[E,M]=(0,n.useState)(!1),[A,T]=(0,n.useState)(),D=(0,n.useMemo)(()=>i.isForceWrapper(),[i]),I=(0,n.useMemo)(()=>i.getCellAriaRole(),[i]),R=(0,n.useRef)(null),L=(0,n.useRef)(null),k=(0,n.useRef)(),P=(0,n.useRef)(),N=(0,n.useRef)(),_=(0,n.useRef)([]),F=(0,n.useRef)(),[V,B]=(0,n.useState)(0),H=(0,n.useCallback)(e=>{F.current=e,B(e=>e+1)},[]),z=D||null!=h&&(b||E||w),U=(0,n.useCallback)((e,t)=>{P.current=t,t&&(((e,t,i)=>{const n=i.getColumn();if(!e&&t.isPopup&&t.isPopup()){const e=`AG Grid: Found an issue in column ${n.getColId()}. If using React, specify an editor is a popup using colDef.cellEditorPopup=true. AG Grid React cannot depend on the editor component specifying if it's in a popup (via the isPopup() method on the editor), as React needs to know this information BEFORE the component is created.`;s._.doOnce(()=>console.warn(e),"jsEditorComp-isPopup-"+i.getColumn().getColId())}if(e&&t.getPopupPosition&&null!=t.getPopupPosition()){const e=`AG Grid: Found an issue in column ${n.getColId()}. If using React, specify an editor popup position using colDef.cellEditorPopupPosition=true. AG Grid React cannot depend on the editor component specifying it's position (via the getPopupPosition() method on the editor), as React needs to know this information BEFORE the component is created.`;s._.doOnce(()=>console.warn(e),"jsEditorComp-getPopupPosition-"+i.getColumn().getColId())}})(e,t,i),t.isCancelBeforeStart&&t.isCancelBeforeStart()&&setTimeout(()=>{i.stopEditing(!0),i.focusCell(!0)}))},[i]),W=(0,n.useCallback)(e=>U(!0,e),[U]),j=(0,n.useCallback)(e=>U(!1,e),[U]);let K=(0,n.useRef)();K.current||(K.current=new s.hv8(()=>R.current)),((e,t,i,s,r,o)=>{const{context:a}=(0,n.useContext)(O),l=(0,n.useCallback)(()=>{const e=r.current;if(!e)return;const t=e.getGui();t&&t.parentElement&&t.parentElement.removeChild(t),a.destroyBean(e),r.current=void 0},[]);(0,n.useEffect)(()=>{const n=null!=e,s=e&&e.compDetails&&!e.compDetails.componentFromFramework;if(!n||!s||t&&null==i)return void l();const a=e.compDetails;if(r.current){const t=r.current,i=!(null==t.refresh||0!=e.force)&&t.refresh(a.params);if(!0===i||void 0===i)return;l()}const c=a.newAgStackInstance();if(!c)return;const h=c.resolveNow(null,e=>e);if(!h)return;const d=h.getGui();d&&((t?i:o.current).appendChild(d),r.current=h)},[e,t,s]),(0,n.useEffect)(()=>l,[])})(h,z,F.current,V,k,R);const $=(0,n.useRef)();(0,n.useLayoutEffect)(()=>{const e=$.current,t=h;if($.current=h,null==e||null==e.compDetails||null==t||null==t.compDetails)return;const i=e.compDetails,n=t.compDetails;i.componentClass==n.componentClass&&null!=L.current&&null!=L.current.refresh&&1!=L.current.refresh(n.params)&&v(e=>e+1)},[h]),(0,n.useLayoutEffect)(()=>{if(!u||u.compDetails.componentFromFramework)return;const e=u.compDetails,i=!0===u.popup,n=(e=>{const t=e.newAgStackInstance();if(t)return t.resolveNow(null,e=>e)})(e);if(!n)return;const s=n.getGui();if(U(i,n),!i){const e=(D?N:R).current;null==e||e.appendChild(s),n.afterGuiAttached&&n.afterGuiAttached()}return T(n),()=>{t.destroyBean(n),U(i,void 0),T(void 0),s&&s.parentElement&&s.parentElement.removeChild(s)}},[u]);const Y=(0,n.useCallback)(e=>{if(N.current=e,!N.current)return _.current.forEach(e=>e()),void(_.current=[]);const n=e=>{var i;if(e){const n=e.getGui();null==(i=N.current)||i.insertAdjacentElement("afterbegin",n),_.current.push(()=>{t.destroyBean(e),s._.removeFromParent(n)})}return e};b&&n(i.createSelectionCheckbox()),E&&n(i.createDndSource()),w&&n(i.createRowDragComp())},[i,t,E,w,b]),X=(0,n.useCallback)(e=>{if(R.current=e,!R.current)return;if(!i)return;const t={addOrRemoveCssClass:(e,t)=>K.current.addOrRemoveCssClass(e,t),setUserStyles:e=>C(e),getFocusableElement:()=>R.current,setIncludeSelection:e=>S(e),setIncludeRowDrag:e=>x(e),setIncludeDndSource:e=>M(e),getCellEditor:()=>P.current||null,getCellRenderer:()=>L.current?L.current:k.current,getParentOfValue:()=>F.current?F.current:N.current?N.current:R.current,setRenderDetails:(e,t,i)=>{d(n=>(null==n?void 0:n.compDetails)!==e||(null==n?void 0:n.value)!==t||(null==n?void 0:n.force)!==i?{value:t,compDetails:e,force:i}:n)},setEditDetails:(e,t,i,n)=>{if(e){let s;n?s=new ie(e.params,()=>v(e=>e+1)):e.componentFromFramework&&q(),p({compDetails:e,popup:t,popupPosition:i,compProxy:s}),t||d(void 0)}else p(e=>{(null==e?void 0:e.compProxy)&&(P.current=void 0)})}},n=N.current||void 0;i.setComp(t,R.current,n,r,o)},[]),Z=(0,n.useMemo)(()=>!!(h&&h.compDetails&&h.compDetails.componentFromFramework&&G(h.compDetails.componentClass)),[h]);(0,n.useLayoutEffect)(()=>{var e;R.current&&(K.current.addOrRemoveCssClass("ag-cell-value",!z),K.current.addOrRemoveCssClass("ag-cell-inline-editing",!!u&&!u.popup),K.current.addOrRemoveCssClass("ag-cell-popup-editing",!!u&&!!u.popup),K.current.addOrRemoveCssClass("ag-cell-not-inline-editing",!u||!!u.popup),null==(e=i.getRowCtrl())||e.setInlineEditingCss(!!u),i.shouldRestoreFocus()&&!i.isEditing()&&R.current.focus({preventScroll:!0}))});const Q=()=>n.createElement(n.Fragment,null,null!=h&&((e,t,i,s,r,o,a)=>{const{compDetails:l,value:c}=e,h=!l,d=l&&l.componentFromFramework,u=l&&l.componentClass,p=(null==c?void 0:c.toString)?c.toString():c,m=()=>n.createElement(n.Fragment,null,h&&n.createElement(n.Fragment,null,p),d&&!o&&n.createElement(u,f(g({},l.params),{key:t,ref:s})),d&&o&&n.createElement(u,f(g({},l.params),{key:t})));return n.createElement(n.Fragment,null,r?n.createElement("span",{role:"presentation",id:`cell-${i}`,className:"ag-cell-value",ref:a},m()):m())})(h,m,c,L,z,Z,H),null!=u&&((e,t,i,s,r,o)=>{const a=e.compDetails,l=a.componentClass,c=a.componentFromFramework&&!e.popup,h=a.componentFromFramework&&e.popup,d=!a.componentFromFramework&&e.popup;return n.createElement(n.Fragment,null,c&&ne(e,l,t),h&&n.createElement(te,{editDetails:e,cellCtrl:r,eParentCell:s,wrappedContent:ne(e,l,i)}),d&&o&&n.createElement(te,{editDetails:e,cellCtrl:r,eParentCell:s,jsChildComp:o}))})(u,j,W,R.current,i,A));return n.createElement("div",{ref:X,style:y,tabIndex:a,role:I,"col-id":l},z?n.createElement("div",{className:"ag-cell-wrapper",role:"presentation",ref:Y},Q()):Q())}),re=(0,n.memo)(e=>{const{context:t,gos:i}=(0,n.useContext)(O),{rowCtrl:r,containerType:o}=e,a=r.getTabIndex(),l=(0,n.useRef)(r.getDomOrder()),c=r.isFullWidth(),h=r.getRowNode().displayed,[d,u]=(0,n.useState)(()=>h?r.getRowIndex():null),[p,m]=(0,n.useState)(()=>r.getRowId()),[v,y]=(0,n.useState)(()=>r.getBusinessKey()),[C,b]=(0,n.useState)(()=>r.getRowStyles()),S=(0,n.useRef)(null),w=(0,n.useRef)(null),[x,E]=(0,n.useState)(()=>null),[M,A]=(0,n.useState)(),[T,D]=(0,n.useState)(()=>h?r.getInitialRowTop(o):void 0),[I,R]=(0,n.useState)(()=>h?r.getInitialTransform(o):void 0),L=(0,n.useRef)(null),k=(0,n.useRef)(),P=(0,n.useRef)(!1),[N,_]=(0,n.useState)(0);(0,n.useEffect)(()=>{var e;if(P.current)return;if(!M)return;if(N>10)return;const t=null==(e=L.current)?void 0:e.firstChild;t?(r.setupDetailRowAutoHeight(t),P.current=!0):_(e=>e+1)},[M,N]);let F=(0,n.useRef)();F.current||(F.current=new s.hv8(()=>L.current));const V=(0,n.useCallback)(e=>{if(L.current=e,!L.current)return void r.unsetComp(o);if(!r.isAlive())return;const t={setTop:D,setTransform:R,addOrRemoveCssClass:(e,t)=>F.current.addOrRemoveCssClass(e,t),setDomOrder:e=>l.current=e,setRowIndex:u,setRowId:m,setRowBusinessKey:y,setUserStyles:b,setCellCtrls:(e,t)=>{w.current=S.current,S.current=e;const i=z(w.current,e,l.current);i!==w.current&&H(t,()=>E(i))},showFullWidth:e=>A(e),getFullWidthCellRenderer:()=>k.current,refreshFullWidth:e=>$.current?(A(t=>f(g({},t),{params:e()})),!0):!(!k.current||!k.current.refresh)&&k.current.refresh(e())};r.setComp(t,L.current,o)},[]);(0,n.useLayoutEffect)(()=>U(M,t,L.current,k),[M]);const B=(0,n.useMemo)(()=>{const e={top:T,transform:I};return Object.assign(e,C),e},[T,I,C]),W=c&&M&&M.componentFromFramework,j=!c&&null!=x,K=(0,n.useMemo)(()=>!(!(null==M?void 0:M.componentFromFramework)||!G(M.componentClass)),[M]),$=(0,n.useRef)(!1);return(0,n.useEffect)(()=>{$.current=K&&!!M&&!!i.get("reactiveCustomComponents")},[K,M]),n.createElement("div",{ref:V,role:"row",style:B,"row-index":d,"row-id":p,"row-business-key":v,tabIndex:a},j&&(null==x?void 0:x.map(e=>n.createElement(se,{cellCtrl:e,editingRow:r.isEditing(),printLayout:r.isPrintLayout(),key:e.getInstanceId()}))),W&&(()=>{const e=M.componentClass;return n.createElement(n.Fragment,null,K&&n.createElement(e,g({},M.params)),!K&&n.createElement(e,f(g({},M.params),{ref:k})))})())}),oe=(0,n.memo)(e=>{const{context:t}=(0,n.useContext)(O),{name:i}=e,r=(0,n.useMemo)(()=>(0,s.CSq)(i),[i]),o=(0,n.useRef)(null),a=(0,n.useRef)(null),l=(0,n.useRef)([]),c=(0,n.useRef)([]),[h,d]=(0,n.useState)(()=>[]),u=(0,n.useRef)(!1),p=(0,n.useRef)(),g=(0,n.useMemo)(()=>s.Rlq.getRowContainerCssClasses(i),[i]),f=(0,n.useMemo)(()=>_(g.viewport),[g]),m=(0,n.useMemo)(()=>_(g.container),[g]),v=i===s.lon.CENTER||i===s.lon.TOP_CENTER||i===s.lon.BOTTOM_CENTER||i===s.lon.STICKY_TOP_CENTER||i===s.lon.STICKY_BOTTOM_CENTER;ee(" AG Row Container "+i+" ",v?o:a);const y=(0,n.useCallback)(()=>v?null!=o.current&&null!=a.current:null!=a.current,[]),C=(0,n.useCallback)(()=>v?null==o.current&&null==a.current:null==a.current,[]),b=(0,n.useCallback)(()=>{if(C()&&(t.destroyBean(p.current),p.current=null),y()){const e=e=>{const t=z(c.current,l.current,u.current);t!==c.current&&(c.current=t,H(e,()=>d(t)))},n={setViewportHeight:e=>{o.current&&(o.current.style.height=e)},setRowCtrls:({rowCtrls:t,useFlushSync:i})=>{const n=!!i&&l.current.length>0&&t.length>0;l.current=t,e(n)},setDomOrder:t=>{u.current!=t&&(u.current=t,e(!1))},setContainerWidth:e=>{a.current&&(a.current.style.width=e)}};p.current=t.createBean(new s.Rlq(i)),p.current.setComp(n,a.current,o.current)}},[y,C]),S=(0,n.useCallback)(e=>{a.current=e,b()},[b]),w=(0,n.useCallback)(e=>{o.current=e,b()},[b]),x=()=>n.createElement("div",{className:m,ref:S,role:"rowgroup"},h.map(e=>n.createElement(re,{rowCtrl:e,containerType:r,key:e.getInstanceId()})));return n.createElement(n.Fragment,null,v?n.createElement("div",{className:f,ref:w,role:"presentation"},x()):x())}),ae=(0,n.memo)(()=>{const{context:e,agStackComponentsRegistry:t,resizeObserverService:i}=(0,n.useContext)(O),[r,o]=(0,n.useState)(""),[a,l]=(0,n.useState)(0),[c,h]=(0,n.useState)(0),[d,u]=(0,n.useState)("0px"),[p,g]=(0,n.useState)("0px"),[f,m]=(0,n.useState)("100%"),[v,y]=(0,n.useState)("0px"),[C,b]=(0,n.useState)("0px"),[S,w]=(0,n.useState)("100%"),[x,E]=(0,n.useState)(""),[M,A]=(0,n.useState)(""),[T,D]=(0,n.useState)(null),[I,R]=(0,n.useState)(""),[L,k]=(0,n.useState)(null),[P,N]=(0,n.useState)("ag-layout-normal");let F=(0,n.useRef)();F.current||(F.current=new s.hv8(()=>G.current));const G=(0,n.useRef)(null),V=(0,n.useRef)(null),B=(0,n.useRef)(null),H=(0,n.useRef)(null),z=(0,n.useRef)(null),U=(0,n.useRef)(null),W=(0,n.useRef)(null),j=(0,n.useRef)([]),K=(0,n.useRef)([]);ee(" AG Grid Body ",G),ee(" AG Pinned Top ",V),ee(" AG Sticky Top ",B),ee(" AG Middle ",U),ee(" AG Pinned Bottom ",W);const $=(0,n.useCallback)(n=>{if(G.current=n,!G.current)return e.destroyBeans(j.current),K.current.forEach(e=>e()),j.current=[],void(K.current=[]);if(!e)return;const r=i=>{const n=t.getComponentClass(i),s=e.createBean(new n);return j.current.push(s),s},a=(e,t)=>{e.appendChild(t),K.current.push(()=>e.removeChild(t))};a(G.current,document.createComment(" AG Fake Horizontal Scroll ")),a(G.current,r("AG-FAKE-HORIZONTAL-SCROLL").getGui()),a(G.current,document.createComment(" AG Overlay Wrapper ")),a(G.current,r("AG-OVERLAY-WRAPPER").getGui()),z.current&&(a(z.current,document.createComment(" AG Fake Vertical Scroll ")),a(z.current,r("AG-FAKE-VERTICAL-SCROLL").getGui()));const c={setRowAnimationCssOnBodyViewport:o,setColumnCount:e=>{G.current&&s._.setAriaColCount(G.current,e)},setRowCount:e=>{G.current&&s._.setAriaRowCount(G.current,e)},setTopHeight:l,setBottomHeight:h,setStickyTopHeight:u,setStickyTopTop:g,setStickyTopWidth:m,setTopDisplay:E,setBottomDisplay:A,setColumnMovingCss:(e,t)=>F.current.addOrRemoveCssClass(e,t),updateLayoutClasses:N,setAlwaysVerticalScrollClass:D,setPinnedTopBottomOverflowY:R,setCellSelectableCss:(e,t)=>k(t?e:null),setBodyViewportWidth:e=>{U.current&&(U.current.style.width=e)},registerBodyViewportResizeListener:e=>{if(U.current){const t=i.observeResize(U.current,e);K.current.push(()=>t())}},setStickyBottomHeight:y,setStickyBottomBottom:b,setStickyBottomWidth:w},d=e.createBean(new s.m20);j.current.push(d),d.setComp(c,G.current,U.current,V.current,W.current,B.current,H.current)},[]),Y=(0,n.useMemo)(()=>_("ag-root","ag-unselectable",P),[P]),q=(0,n.useMemo)(()=>_("ag-body-viewport",r,P,T,L),[r,P,T,L]),X=(0,n.useMemo)(()=>_("ag-body",P),[P]),Z=(0,n.useMemo)(()=>_("ag-floating-top",L),[L]),Q=(0,n.useMemo)(()=>_("ag-sticky-top",L),[L]),te=(0,n.useMemo)(()=>_("ag-sticky-bottom",L),[L]),ie=(0,n.useMemo)(()=>_("ag-floating-bottom",L),[L]),ne=(0,n.useMemo)(()=>({height:a,minHeight:a,display:x,overflowY:I}),[a,x,I]),se=(0,n.useMemo)(()=>({height:d,top:p,width:f}),[d,p,f]),re=(0,n.useMemo)(()=>({height:v,bottom:C,width:S}),[v,C,S]),ae=(0,n.useMemo)(()=>({height:c,minHeight:c,display:M,overflowY:I}),[c,M,I]),le=e=>n.createElement(oe,{name:e,key:`${e}-container`}),ce=({section:e,children:t,className:i,style:s})=>n.createElement("div",{ref:e,className:i,role:"presentation",style:s},t.map(le));return n.createElement("div",{ref:$,className:Y,role:"treegrid"},n.createElement(J,null),ce({section:V,className:Z,style:ne,children:[s.lon.TOP_LEFT,s.lon.TOP_CENTER,s.lon.TOP_RIGHT,s.lon.TOP_FULL_WIDTH]}),n.createElement("div",{className:X,ref:z,role:"presentation"},ce({section:U,className:q,children:[s.lon.LEFT,s.lon.CENTER,s.lon.RIGHT,s.lon.FULL_WIDTH]})),ce({section:B,className:Q,style:se,children:[s.lon.STICKY_TOP_LEFT,s.lon.STICKY_TOP_CENTER,s.lon.STICKY_TOP_RIGHT,s.lon.STICKY_TOP_FULL_WIDTH]}),ce({section:H,className:te,style:re,children:[s.lon.STICKY_BOTTOM_LEFT,s.lon.STICKY_BOTTOM_CENTER,s.lon.STICKY_BOTTOM_RIGHT,s.lon.STICKY_BOTTOM_FULL_WIDTH]}),ce({section:W,className:ie,style:ae,children:[s.lon.BOTTOM_LEFT,s.lon.BOTTOM_CENTER,s.lon.BOTTOM_RIGHT,s.lon.BOTTOM_FULL_WIDTH]}))}),le=(0,n.forwardRef)((e,t)=>{const{children:i,eFocusableElement:r,onTabKeyDown:o,gridCtrl:a,forceFocusOutWhenTabGuardsAreEmpty:l}=e,{context:c}=(0,n.useContext)(O),h=(0,n.useRef)(null),d=(0,n.useRef)(null),u=(0,n.useRef)(),p=e=>{const t=null==e?void 0:parseInt(e,10).toString();[h,d].forEach(e=>{var i,n;void 0===t?null==(i=e.current)||i.removeAttribute("tabindex"):null==(n=e.current)||n.setAttribute("tabindex",t)})};(0,n.useImperativeHandle)(t,()=>({forceFocusOutOfContainer(e){var t;null==(t=u.current)||t.forceFocusOutOfContainer(e)}}));const g=(0,n.useCallback)(()=>{if(!h.current&&!d.current)return c.destroyBean(u.current),void(u.current=null);if(h.current&&d.current){const e={setTabIndex:p};u.current=c.createBean(new s.Udn({comp:e,eTopGuard:h.current,eBottomGuard:d.current,eFocusableElement:r,onTabKeyDown:o,forceFocusOutWhenTabGuardsAreEmpty:l,focusInnerElement:e=>a.focusInnerElement(e)}))}},[]),f=(0,n.useCallback)(e=>{h.current=e,g()},[g]),m=(0,n.useCallback)(e=>{d.current=e,g()},[g]),v=e=>{const t="top"===e?s.pA9.TAB_GUARD_TOP:s.pA9.TAB_GUARD_BOTTOM;return n.createElement("div",{className:`${s.pA9.TAB_GUARD} ${t}`,role:"presentation",ref:"top"===e?f:m})};return n.createElement(n.Fragment,null,v("top"),i,v("bottom"))}),ce=(0,n.memo)(le),he=(0,n.memo)(({context:e})=>{const[t,i]=(0,n.useState)(""),[r,o]=(0,n.useState)(""),[a,l]=(0,n.useState)(""),[c,h]=(0,n.useState)(null),[d,u]=(0,n.useState)(null),[p,g]=(0,n.useState)(!1),[f,m]=(0,n.useState)(),v=(0,n.useRef)(null),y=(0,n.useRef)(null),C=(0,n.useRef)(),[b,S]=(0,n.useState)(null),w=(0,n.useRef)(()=>{}),x=(0,n.useCallback)(()=>{},[]),E=(0,n.useMemo)(()=>e.isDestroyed()?null:e.getBean("beans"),[e]);ee(" AG Grid ",y);const M=(0,n.useCallback)(t=>{if(y.current=t,!y.current)return e.destroyBean(v.current),void(v.current=null);if(e.isDestroyed())return;v.current=e.createBean(new s.s1r);const n=v.current;w.current=n.focusInnerElement.bind(n);const r={destroyGridUi:()=>{},setRtlClass:i,forceFocusOutOfContainer:e=>{var t;null==(t=C.current)||t.forceFocusOutOfContainer(e)},updateLayoutClasses:l,getFocusableContainers:()=>{var e,t;const i=[],n=null==(e=y.current)?void 0:e.querySelector(".ag-root"),s=null==(t=y.current)?void 0:t.querySelector(".ag-side-bar:not(.ag-hidden)");return n&&i.push(n),s&&i.push(s),i},setCursor:h,setUserSelect:u};n.setComp(r,y.current,y.current),g(!0)},[]);(0,n.useEffect)(()=>{if(!(f&&E&&v.current&&b&&y.current))return;const t=v.current,i=[],{agStackComponentsRegistry:n}=E,s=n.getComponentClass("AG-GRID-HEADER-DROP-ZONES"),r=n.getComponentClass("AG-SIDE-BAR"),o=n.getComponentClass("AG-STATUS-BAR"),a=n.getComponentClass("AG-WATERMARK"),l=n.getComponentClass("AG-PAGINATION"),c=[],h=y.current;if(t.showDropZones()&&s){const t=e.createBean(new s),n=t.getGui();h.insertAdjacentElement("afterbegin",n),c.push(n),i.push(t)}if(t.showSideBar()&&r){const t=e.createBean(new r),n=t.getGui(),s=b.querySelector(".ag-tab-guard-bottom");s&&(s.insertAdjacentElement("beforebegin",n),c.push(n)),i.push(t)}if(t.showStatusBar()&&o){const t=e.createBean(new o),n=t.getGui();h.insertAdjacentElement("beforeend",n),c.push(n),i.push(t)}if(l){const t=e.createBean(new l),n=t.getGui();h.insertAdjacentElement("beforeend",n),c.push(n),i.push(t)}if(t.showWatermark()&&a){const t=e.createBean(new a),n=t.getGui();h.insertAdjacentElement("beforeend",n),c.push(n),i.push(t)}return()=>{e.destroyBeans(i),c.forEach(e=>{e.parentElement&&e.parentElement.removeChild(e)})}},[f,b,E]);const A=(0,n.useMemo)(()=>_("ag-root-wrapper",t,r,a),[t,r,a]),T=(0,n.useMemo)(()=>_("ag-root-wrapper-body","ag-focus-managed",a),[a]),D=(0,n.useMemo)(()=>({userSelect:null!=d?d:"",WebkitUserSelect:null!=d?d:"",cursor:null!=c?c:""}),[d,c]),I=(0,n.useCallback)(e=>{C.current=e,m(null!==e)},[]);return n.createElement("div",{ref:M,className:A,style:D,role:"presentation"},n.createElement("div",{className:T,ref:S,role:"presentation"},p&&b&&E&&n.createElement(O.Provider,{value:E},n.createElement(ce,{ref:I,eFocusableElement:b,onTabKeyDown:x,gridCtrl:v.current,forceFocusOutWhenTabGuardsAreEmpty:!0},n.createElement(ae,null)))))}),de=e=>{var t,i;const r=(0,n.useRef)(),o=(0,n.useRef)(null),a=(0,n.useRef)(null),l=(0,n.useRef)([]),c=(0,n.useRef)([]),h=(0,n.useRef)(e),d=(0,n.useRef)(!1),[u,p]=(0,n.useState)(void 0),[,f]=(0,n.useState)(0),m=(0,n.useCallback)(t=>{if(o.current=t,!o.current)return l.current.forEach(e=>e()),void(l.current.length=0);const i=e.modules||[];a.current||(a.current=new N(()=>f(e=>e+1),e.componentWrappingElement,e.maxComponentCreationTimeMs),l.current.push(()=>{var e;null==(e=a.current)||e.destroy(),a.current=null}));const n=s.kNx.combineAttributesAndGridOptions(e.gridOptions,e),h={providedBeanInstances:{frameworkComponentWrapper:new ue(a.current,!!n.reactiveCustomComponents)},modules:i,frameworkOverrides:new ge},u=new s.Ug$;r.current=u.create(o.current,n,t=>{p(t),l.current.push(()=>{t.destroy()}),t.getBean(s.GsR.NAME).whenReady(()=>{if(t.isDestroyed())return;const i=r.current;i&&e.setGridApi&&e.setGridApi(i,new s.jf3(i))})},e=>{e.getBean(s.GsR.NAME).whenReady(()=>{c.current.forEach(e=>e()),c.current.length=0,d.current=!0})},h)},[]),v=(0,n.useMemo)(()=>g({height:"100%"},e.containerStyle||{}),[e.containerStyle]),y=(0,n.useCallback)(e=>{d.current?e():c.current.push(e)},[]);return(0,n.useEffect)(()=>{const t=function(e,t){const i={};return Object.keys(t).forEach(n=>{const s=t[n];e[n]!==s&&(i[n]=s)}),i}(h.current,e);h.current=e,y(()=>{r.current&&s.kNx.processOnChange(t,r.current)})},[e]),n.createElement("div",{style:v,className:e.className,ref:m},u&&!u.isDestroyed()?n.createElement(he,{context:u}):null,null!=(i=null==(t=a.current)?void 0:t.getPortals())?i:null)},ue=class extends s.Cf3{constructor(e,t){super(),this.parent=e,this.reactiveCustomComponents=t}createWrapper(e,t){if(this.reactiveCustomComponents){const i=(e=>{switch(e){case"filter":return E;case"floatingFilterComponent":return T;case"dateComponent":return x;case"loadingOverlayComponent":return D;case"noRowsOverlayComponent":return R;case"statusPanel":return L;case"toolPanel":return k;case"menuItem":return I}})(t.propertyName);if(i)return new i(e,this.parent,t)}else switch(t.propertyName){case"filter":case"floatingFilterComponent":case"dateComponent":case"loadingOverlayComponent":case"noRowsOverlayComponent":case"statusPanel":case"toolPanel":case"menuItem":q()}const i=!t.cellRenderer&&"toolPanel"!==t.propertyName;return new b(e,this.parent,t,i)}},pe=(0,n.forwardRef)((e,t)=>{const{ctrlsFactory:i,context:r,gos:o,resizeObserverService:a,clientSideRowModel:l,serverSideRowModel:c}=(0,n.useContext)(O),[h,d]=(0,n.useState)(()=>new F),[u,p]=(0,n.useState)(()=>new F),[m,v]=(0,n.useState)(),[y,C]=(0,n.useState)(),b=(0,n.useRef)(),S=(0,n.useRef)(null),w=(0,n.useRef)(),x=(0,n.useMemo)(()=>s.syG.__getGridRegisteredModules(e.api.getGridId()),[e]),E=(0,n.useMemo)(()=>h.toString()+" ag-details-row",[h]),M=(0,n.useMemo)(()=>u.toString()+" ag-details-grid",[u]);t&&(0,n.useImperativeHandle)(t,()=>({refresh(){var e,t;return null!=(t=null==(e=b.current)?void 0:e.refresh())&&t}})),e.template&&s._.warnOnce("detailCellRendererParams.template is not supported by AG Grid React. To change the template, provide a Custom Detail Cell Renderer. See https://ag-grid.com/react-data-grid/master-detail-custom-detail/");const A=(0,n.useCallback)(t=>{if(S.current=t,!S.current)return r.destroyBean(b.current),void(w.current&&w.current());const n={addOrRemoveCssClass:(e,t)=>d(i=>i.setClass(e,t)),addOrRemoveDetailGridCssClass:(e,t)=>p(i=>i.setClass(e,t)),setDetailGrid:e=>v(e),setRowData:e=>C(e),getGui:()=>S.current},s=i.getInstance("detailCellRenderer");if(s&&(r.createBean(s),s.init(n,e),b.current=s,o.get("detailRowAutoHeight"))){const t=()=>{if(null==S.current)return;const t=S.current.clientHeight;null!=t&&t>0&&setTimeout(()=>{e.node.setRowHeight(t),l?l.onRowHeightChanged():c&&c.onRowHeightChanged()},0)};w.current=a.observeResize(S.current,t),t()}},[]),T=(0,n.useCallback)((e,t)=>{var i;null==(i=b.current)||i.registerDetailWithMaster(e,t)},[]);return n.createElement("div",{className:E,ref:A},m&&n.createElement(de,f(g({className:M},m),{modules:x,rowData:y,setGridApi:T})))}),ge=class extends s.pow{constructor(){super("react"),this.frameworkComponents={agGroupCellRenderer:K,agGroupRowRenderer:K,agDetailCellRenderer:pe},this.wrapIncoming=(e,t)=>{return"ensureVisible"===t?(i=e,B||setTimeout(()=>B=!1,0),B=!0,i()):e();var i},this.renderingEngine="react"}frameworkComponent(e){return this.frameworkComponents[e]}isFrameworkComponent(e){if(!e)return!1;const t=e.prototype;return!(t&&"getGui"in t)}},fe=class extends n.Component{constructor(){super(...arguments),this.apiListeners=[],this.setGridApi=(e,t)=>{this.api=e,this.columnApi=t,this.apiListeners.forEach(t=>t(e))}}registerApiListener(e){this.apiListeners.push(e)}componentWillUnmount(){this.apiListeners.length=0}render(){return n.createElement(de,f(g({},this.props),{setGridApi:this.setGridApi}))}}},5779(e,t,i){"use strict";function n(e){if("string"==typeof e||"number"==typeof e)return""+e;let t="";if(Array.isArray(e))for(let i,s=0;s<e.length;s++)""!==(i=n(e[s]))&&(t+=(t&&" ")+i);else for(let i in e)e[i]&&(t+=(t&&" ")+i);return t}i.d(t,{A:()=>n})},70851(e,t,i){"use strict";function n(e){var t,i,s="";if("string"==typeof e||"number"==typeof e)s+=e;else if("object"==typeof e)if(Array.isArray(e)){var r=e.length;for(t=0;t<r;t++)e[t]&&(i=n(e[t]))&&(s&&(s+=" "),s+=i)}else for(i in e)e[i]&&(s&&(s+=" "),s+=i);return s}i.d(t,{A:()=>s});const s=function(){for(var e,t,i=0,s="",r=arguments.length;i<r;i++)(e=arguments[i])&&(t=n(e))&&(s&&(s+=" "),s+=t);return s}},18600(e,t,i){"use strict";var n;function s(){}function r(){r.init.call(this)}function o(e){return void 0===e._maxListeners?r.defaultMaxListeners:e._maxListeners}function a(e,t,i,n){var r,a,l,c;if("function"!=typeof i)throw new TypeError('"listener" argument must be a function');if((a=e._events)?(a.newListener&&(e.emit("newListener",t,i.listener?i.listener:i),a=e._events),l=a[t]):(a=e._events=new s,e._eventsCount=0),l){if("function"==typeof l?l=a[t]=n?[i,l]:[l,i]:n?l.unshift(i):l.push(i),!l.warned&&(r=o(e))&&r>0&&l.length>r){l.warned=!0;var h=new Error("Possible EventEmitter memory leak detected. "+l.length+" "+t+" listeners added. Use emitter.setMaxListeners() to increase limit");h.name="MaxListenersExceededWarning",h.emitter=e,h.type=t,h.count=l.length,c=h,"function"==typeof console.warn?console.warn(c):console.log(c)}}else l=a[t]=i,++e._eventsCount;return e}function l(e,t,i){var n=!1;function s(){e.removeListener(t,s),n||(n=!0,i.apply(e,arguments))}return s.listener=i,s}function c(e){var t=this._events;if(t){var i=t[e];if("function"==typeof i)return 1;if(i)return i.length}return 0}function h(e,t){for(var i=new Array(t);t--;)i[t]=e[t];return i}i.d(t,{As:()=>ti}),s.prototype=Object.create(null),r.EventEmitter=r,r.usingDomains=!1,r.prototype.domain=void 0,r.prototype._events=void 0,r.prototype._maxListeners=void 0,r.defaultMaxListeners=10,r.init=function(){this.domain=null,r.usingDomains&&(!n.active||this instanceof n.Domain||(this.domain=n.active)),this._events&&this._events!==Object.getPrototypeOf(this)._events||(this._events=new s,this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},r.prototype.setMaxListeners=function(e){if("number"!=typeof e||e<0||isNaN(e))throw new TypeError('"n" argument must be a positive number');return this._maxListeners=e,this},r.prototype.getMaxListeners=function(){return o(this)},r.prototype.emit=function(e){var t,i,n,s,r,o,a,l="error"===e;if(o=this._events)l=l&&null==o.error;else if(!l)return!1;if(a=this.domain,l){if(t=arguments[1],!a){if(t instanceof Error)throw t;var c=new Error('Uncaught, unspecified "error" event. ('+t+")");throw c.context=t,c}return t||(t=new Error('Uncaught, unspecified "error" event')),t.domainEmitter=this,t.domain=a,t.domainThrown=!1,a.emit("error",t),!1}if(!(i=o[e]))return!1;var d="function"==typeof i;switch(n=arguments.length){case 1:!function(e,t,i){if(t)e.call(i);else for(var n=e.length,s=h(e,n),r=0;r<n;++r)s[r].call(i)}(i,d,this);break;case 2:!function(e,t,i,n){if(t)e.call(i,n);else for(var s=e.length,r=h(e,s),o=0;o<s;++o)r[o].call(i,n)}(i,d,this,arguments[1]);break;case 3:!function(e,t,i,n,s){if(t)e.call(i,n,s);else for(var r=e.length,o=h(e,r),a=0;a<r;++a)o[a].call(i,n,s)}(i,d,this,arguments[1],arguments[2]);break;case 4:!function(e,t,i,n,s,r){if(t)e.call(i,n,s,r);else for(var o=e.length,a=h(e,o),l=0;l<o;++l)a[l].call(i,n,s,r)}(i,d,this,arguments[1],arguments[2],arguments[3]);break;default:for(s=new Array(n-1),r=1;r<n;r++)s[r-1]=arguments[r];!function(e,t,i,n){if(t)e.apply(i,n);else for(var s=e.length,r=h(e,s),o=0;o<s;++o)r[o].apply(i,n)}(i,d,this,s)}return!0},r.prototype.addListener=function(e,t){return a(this,e,t,!1)},r.prototype.on=r.prototype.addListener,r.prototype.prependListener=function(e,t){return a(this,e,t,!0)},r.prototype.once=function(e,t){if("function"!=typeof t)throw new TypeError('"listener" argument must be a function');return this.on(e,l(this,e,t)),this},r.prototype.prependOnceListener=function(e,t){if("function"!=typeof t)throw new TypeError('"listener" argument must be a function');return this.prependListener(e,l(this,e,t)),this},r.prototype.removeListener=function(e,t){var i,n,r,o,a;if("function"!=typeof t)throw new TypeError('"listener" argument must be a function');if(!(n=this._events))return this;if(!(i=n[e]))return this;if(i===t||i.listener&&i.listener===t)0===--this._eventsCount?this._events=new s:(delete n[e],n.removeListener&&this.emit("removeListener",e,i.listener||t));else if("function"!=typeof i){for(r=-1,o=i.length;o-- >0;)if(i[o]===t||i[o].listener&&i[o].listener===t){a=i[o].listener,r=o;break}if(r<0)return this;if(1===i.length){if(i[0]=void 0,0===--this._eventsCount)return this._events=new s,this;delete n[e]}else!function(e,t){for(var i=t,n=i+1,s=e.length;n<s;i+=1,n+=1)e[i]=e[n];e.pop()}(i,r);n.removeListener&&this.emit("removeListener",e,a||t)}return this},r.prototype.removeAllListeners=function(e){var t,i;if(!(i=this._events))return this;if(!i.removeListener)return 0===arguments.length?(this._events=new s,this._eventsCount=0):i[e]&&(0===--this._eventsCount?this._events=new s:delete i[e]),this;if(0===arguments.length){for(var n,r=Object.keys(i),o=0;o<r.length;++o)"removeListener"!==(n=r[o])&&this.removeAllListeners(n);return this.removeAllListeners("removeListener"),this._events=new s,this._eventsCount=0,this}if("function"==typeof(t=i[e]))this.removeListener(e,t);else if(t)do{this.removeListener(e,t[t.length-1])}while(t[0]);return this},r.prototype.listeners=function(e){var t,i=this._events;return i&&(t=i[e])?"function"==typeof t?[t.listener||t]:function(e){for(var t=new Array(e.length),i=0;i<t.length;++i)t[i]=e[i].listener||e[i];return t}(t):[]},r.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):c.call(e,t)},r.prototype.listenerCount=c,r.prototype.eventNames=function(){return this._eventsCount>0?Reflect.ownKeys(this._events):[]};var d=void 0!==i.g?i.g:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},u=[],p=[],g="undefined"!=typeof Uint8Array?Uint8Array:Array,f=!1;function m(){f=!0;for(var e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",t=0;t<64;++t)u[t]=e[t],p[e.charCodeAt(t)]=t;p["-".charCodeAt(0)]=62,p["_".charCodeAt(0)]=63}function v(e){return u[e>>18&63]+u[e>>12&63]+u[e>>6&63]+u[63&e]}function y(e,t,i){for(var n,s=[],r=t;r<i;r+=3)n=(e[r]<<16)+(e[r+1]<<8)+e[r+2],s.push(v(n));return s.join("")}function C(e){var t;f||m();for(var i=e.length,n=i%3,s="",r=[],o=16383,a=0,l=i-n;a<l;a+=o)r.push(y(e,a,a+o>l?l:a+o));return 1===n?(t=e[i-1],s+=u[t>>2],s+=u[t<<4&63],s+="=="):2===n&&(t=(e[i-2]<<8)+e[i-1],s+=u[t>>10],s+=u[t>>4&63],s+=u[t<<2&63],s+="="),r.push(s),r.join("")}function b(e,t,i,n,s){var r,o,a=8*s-n-1,l=(1<<a)-1,c=l>>1,h=-7,d=i?s-1:0,u=i?-1:1,p=e[t+d];for(d+=u,r=p&(1<<-h)-1,p>>=-h,h+=a;h>0;r=256*r+e[t+d],d+=u,h-=8);for(o=r&(1<<-h)-1,r>>=-h,h+=n;h>0;o=256*o+e[t+d],d+=u,h-=8);if(0===r)r=1-c;else{if(r===l)return o?NaN:1/0*(p?-1:1);o+=Math.pow(2,n),r-=c}return(p?-1:1)*o*Math.pow(2,r-n)}function S(e,t,i,n,s,r){var o,a,l,c=8*r-s-1,h=(1<<c)-1,d=h>>1,u=23===s?Math.pow(2,-24)-Math.pow(2,-77):0,p=n?0:r-1,g=n?1:-1,f=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(a=isNaN(t)?1:0,o=h):(o=Math.floor(Math.log(t)/Math.LN2),t*(l=Math.pow(2,-o))<1&&(o--,l*=2),(t+=o+d>=1?u/l:u*Math.pow(2,1-d))*l>=2&&(o++,l/=2),o+d>=h?(a=0,o=h):o+d>=1?(a=(t*l-1)*Math.pow(2,s),o+=d):(a=t*Math.pow(2,d-1)*Math.pow(2,s),o=0));s>=8;e[i+p]=255&a,p+=g,a/=256,s-=8);for(o=o<<s|a,c+=s;c>0;e[i+p]=255&o,p+=g,o/=256,c-=8);e[i+p-g]|=128*f}var w={}.toString,x=Array.isArray||function(e){return"[object Array]"==w.call(e)};function E(){return A.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function M(e,t){if(E()<t)throw new RangeError("Invalid typed array length");return A.TYPED_ARRAY_SUPPORT?(e=new Uint8Array(t)).__proto__=A.prototype:(null===e&&(e=new A(t)),e.length=t),e}function A(e,t,i){if(!(A.TYPED_ARRAY_SUPPORT||this instanceof A))return new A(e,t,i);if("number"==typeof e){if("string"==typeof t)throw new Error("If encoding is specified then the first argument must be a string");return I(this,e)}return T(this,e,t,i)}function T(e,t,i,n){if("number"==typeof t)throw new TypeError('"value" argument must not be a number');return"undefined"!=typeof ArrayBuffer&&t instanceof ArrayBuffer?function(e,t,i,n){if(t.byteLength,i<0||t.byteLength<i)throw new RangeError("'offset' is out of bounds");if(t.byteLength<i+(n||0))throw new RangeError("'length' is out of bounds");return t=void 0===i&&void 0===n?new Uint8Array(t):void 0===n?new Uint8Array(t,i):new Uint8Array(t,i,n),A.TYPED_ARRAY_SUPPORT?(e=t).__proto__=A.prototype:e=R(e,t),e}(e,t,i,n):"string"==typeof t?function(e,t,i){if("string"==typeof i&&""!==i||(i="utf8"),!A.isEncoding(i))throw new TypeError('"encoding" must be a valid string encoding');var n=0|P(t,i),s=(e=M(e,n)).write(t,i);return s!==n&&(e=e.slice(0,s)),e}(e,t,i):function(e,t){if(k(t)){var i=0|L(t.length);return 0===(e=M(e,i)).length||t.copy(e,0,0,i),e}if(t){if("undefined"!=typeof ArrayBuffer&&t.buffer instanceof ArrayBuffer||"length"in t)return"number"!=typeof t.length||(n=t.length)!=n?M(e,0):R(e,t);if("Buffer"===t.type&&x(t.data))return R(e,t.data)}var n;throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}(e,t)}function D(e){if("number"!=typeof e)throw new TypeError('"size" argument must be a number');if(e<0)throw new RangeError('"size" argument must not be negative')}function I(e,t){if(D(t),e=M(e,t<0?0:0|L(t)),!A.TYPED_ARRAY_SUPPORT)for(var i=0;i<t;++i)e[i]=0;return e}function R(e,t){var i=t.length<0?0:0|L(t.length);e=M(e,i);for(var n=0;n<i;n+=1)e[n]=255&t[n];return e}function L(e){if(e>=E())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+E().toString(16)+" bytes");return 0|e}function k(e){return!(null==e||!e._isBuffer)}function P(e,t){if(k(e))return e.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(e)||e instanceof ArrayBuffer))return e.byteLength;"string"!=typeof e&&(e=""+e);var i=e.length;if(0===i)return 0;for(var n=!1;;)switch(t){case"ascii":case"latin1":case"binary":return i;case"utf8":case"utf-8":case void 0:return oe(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*i;case"hex":return i>>>1;case"base64":return ae(e).length;default:if(n)return oe(e).length;t=(""+t).toLowerCase(),n=!0}}function N(e,t,i){var n=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===i||i>this.length)&&(i=this.length),i<=0)return"";if((i>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return q(this,t,i);case"utf8":case"utf-8":return j(this,t,i);case"ascii":return $(this,t,i);case"latin1":case"binary":return Y(this,t,i);case"base64":return W(this,t,i);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return X(this,t,i);default:if(n)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),n=!0}}function O(e,t,i){var n=e[t];e[t]=e[i],e[i]=n}function _(e,t,i,n,s){if(0===e.length)return-1;if("string"==typeof i?(n=i,i=0):i>2147483647?i=2147483647:i<-2147483648&&(i=-2147483648),i=+i,isNaN(i)&&(i=s?0:e.length-1),i<0&&(i=e.length+i),i>=e.length){if(s)return-1;i=e.length-1}else if(i<0){if(!s)return-1;i=0}if("string"==typeof t&&(t=A.from(t,n)),k(t))return 0===t.length?-1:F(e,t,i,n,s);if("number"==typeof t)return t&=255,A.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?s?Uint8Array.prototype.indexOf.call(e,t,i):Uint8Array.prototype.lastIndexOf.call(e,t,i):F(e,[t],i,n,s);throw new TypeError("val must be string, number or Buffer")}function F(e,t,i,n,s){var r,o=1,a=e.length,l=t.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(e.length<2||t.length<2)return-1;o=2,a/=2,l/=2,i/=2}function c(e,t){return 1===o?e[t]:e.readUInt16BE(t*o)}if(s){var h=-1;for(r=i;r<a;r++)if(c(e,r)===c(t,-1===h?0:r-h)){if(-1===h&&(h=r),r-h+1===l)return h*o}else-1!==h&&(r-=r-h),h=-1}else for(i+l>a&&(i=a-l),r=i;r>=0;r--){for(var d=!0,u=0;u<l;u++)if(c(e,r+u)!==c(t,u)){d=!1;break}if(d)return r}return-1}function G(e,t,i,n){i=Number(i)||0;var s=e.length-i;n?(n=Number(n))>s&&(n=s):n=s;var r=t.length;if(r%2!=0)throw new TypeError("Invalid hex string");n>r/2&&(n=r/2);for(var o=0;o<n;++o){var a=parseInt(t.substr(2*o,2),16);if(isNaN(a))return o;e[i+o]=a}return o}function V(e,t,i,n){return le(oe(t,e.length-i),e,i,n)}function B(e,t,i,n){return le(function(e){for(var t=[],i=0;i<e.length;++i)t.push(255&e.charCodeAt(i));return t}(t),e,i,n)}function H(e,t,i,n){return B(e,t,i,n)}function z(e,t,i,n){return le(ae(t),e,i,n)}function U(e,t,i,n){return le(function(e,t){for(var i,n,s,r=[],o=0;o<e.length&&!((t-=2)<0);++o)n=(i=e.charCodeAt(o))>>8,s=i%256,r.push(s),r.push(n);return r}(t,e.length-i),e,i,n)}function W(e,t,i){return 0===t&&i===e.length?C(e):C(e.slice(t,i))}function j(e,t,i){i=Math.min(e.length,i);for(var n=[],s=t;s<i;){var r,o,a,l,c=e[s],h=null,d=c>239?4:c>223?3:c>191?2:1;if(s+d<=i)switch(d){case 1:c<128&&(h=c);break;case 2:128==(192&(r=e[s+1]))&&(l=(31&c)<<6|63&r)>127&&(h=l);break;case 3:r=e[s+1],o=e[s+2],128==(192&r)&&128==(192&o)&&(l=(15&c)<<12|(63&r)<<6|63&o)>2047&&(l<55296||l>57343)&&(h=l);break;case 4:r=e[s+1],o=e[s+2],a=e[s+3],128==(192&r)&&128==(192&o)&&128==(192&a)&&(l=(15&c)<<18|(63&r)<<12|(63&o)<<6|63&a)>65535&&l<1114112&&(h=l)}null===h?(h=65533,d=1):h>65535&&(h-=65536,n.push(h>>>10&1023|55296),h=56320|1023&h),n.push(h),s+=d}return function(e){var t=e.length;if(t<=K)return String.fromCharCode.apply(String,e);for(var i="",n=0;n<t;)i+=String.fromCharCode.apply(String,e.slice(n,n+=K));return i}(n)}A.TYPED_ARRAY_SUPPORT=void 0===d.TYPED_ARRAY_SUPPORT||d.TYPED_ARRAY_SUPPORT,E(),A.poolSize=8192,A._augment=function(e){return e.__proto__=A.prototype,e},A.from=function(e,t,i){return T(null,e,t,i)},A.TYPED_ARRAY_SUPPORT&&(A.prototype.__proto__=Uint8Array.prototype,A.__proto__=Uint8Array,"undefined"!=typeof Symbol&&Symbol.species&&A[Symbol.species]),A.alloc=function(e,t,i){return function(e,t,i,n){return D(t),t<=0?M(e,t):void 0!==i?"string"==typeof n?M(e,t).fill(i,n):M(e,t).fill(i):M(e,t)}(null,e,t,i)},A.allocUnsafe=function(e){return I(null,e)},A.allocUnsafeSlow=function(e){return I(null,e)},A.isBuffer=ce,A.compare=function(e,t){if(!k(e)||!k(t))throw new TypeError("Arguments must be Buffers");if(e===t)return 0;for(var i=e.length,n=t.length,s=0,r=Math.min(i,n);s<r;++s)if(e[s]!==t[s]){i=e[s],n=t[s];break}return i<n?-1:n<i?1:0},A.isEncoding=function(e){switch(String(e).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},A.concat=function(e,t){if(!x(e))throw new TypeError('"list" argument must be an Array of Buffers');if(0===e.length)return A.alloc(0);var i;if(void 0===t)for(t=0,i=0;i<e.length;++i)t+=e[i].length;var n=A.allocUnsafe(t),s=0;for(i=0;i<e.length;++i){var r=e[i];if(!k(r))throw new TypeError('"list" argument must be an Array of Buffers');r.copy(n,s),s+=r.length}return n},A.byteLength=P,A.prototype._isBuffer=!0,A.prototype.swap16=function(){var e=this.length;if(e%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var t=0;t<e;t+=2)O(this,t,t+1);return this},A.prototype.swap32=function(){var e=this.length;if(e%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var t=0;t<e;t+=4)O(this,t,t+3),O(this,t+1,t+2);return this},A.prototype.swap64=function(){var e=this.length;if(e%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var t=0;t<e;t+=8)O(this,t,t+7),O(this,t+1,t+6),O(this,t+2,t+5),O(this,t+3,t+4);return this},A.prototype.toString=function(){var e=0|this.length;return 0===e?"":0===arguments.length?j(this,0,e):N.apply(this,arguments)},A.prototype.equals=function(e){if(!k(e))throw new TypeError("Argument must be a Buffer");return this===e||0===A.compare(this,e)},A.prototype.inspect=function(){var e="";return this.length>0&&(e=this.toString("hex",0,50).match(/.{2}/g).join(" "),this.length>50&&(e+=" ... ")),"<Buffer "+e+">"},A.prototype.compare=function(e,t,i,n,s){if(!k(e))throw new TypeError("Argument must be a Buffer");if(void 0===t&&(t=0),void 0===i&&(i=e?e.length:0),void 0===n&&(n=0),void 0===s&&(s=this.length),t<0||i>e.length||n<0||s>this.length)throw new RangeError("out of range index");if(n>=s&&t>=i)return 0;if(n>=s)return-1;if(t>=i)return 1;if(this===e)return 0;for(var r=(s>>>=0)-(n>>>=0),o=(i>>>=0)-(t>>>=0),a=Math.min(r,o),l=this.slice(n,s),c=e.slice(t,i),h=0;h<a;++h)if(l[h]!==c[h]){r=l[h],o=c[h];break}return r<o?-1:o<r?1:0},A.prototype.includes=function(e,t,i){return-1!==this.indexOf(e,t,i)},A.prototype.indexOf=function(e,t,i){return _(this,e,t,i,!0)},A.prototype.lastIndexOf=function(e,t,i){return _(this,e,t,i,!1)},A.prototype.write=function(e,t,i,n){if(void 0===t)n="utf8",i=this.length,t=0;else if(void 0===i&&"string"==typeof t)n=t,i=this.length,t=0;else{if(!isFinite(t))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");t|=0,isFinite(i)?(i|=0,void 0===n&&(n="utf8")):(n=i,i=void 0)}var s=this.length-t;if((void 0===i||i>s)&&(i=s),e.length>0&&(i<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");for(var r=!1;;)switch(n){case"hex":return G(this,e,t,i);case"utf8":case"utf-8":return V(this,e,t,i);case"ascii":return B(this,e,t,i);case"latin1":case"binary":return H(this,e,t,i);case"base64":return z(this,e,t,i);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return U(this,e,t,i);default:if(r)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),r=!0}},A.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var K=4096;function $(e,t,i){var n="";i=Math.min(e.length,i);for(var s=t;s<i;++s)n+=String.fromCharCode(127&e[s]);return n}function Y(e,t,i){var n="";i=Math.min(e.length,i);for(var s=t;s<i;++s)n+=String.fromCharCode(e[s]);return n}function q(e,t,i){var n=e.length;(!t||t<0)&&(t=0),(!i||i<0||i>n)&&(i=n);for(var s="",r=t;r<i;++r)s+=re(e[r]);return s}function X(e,t,i){for(var n=e.slice(t,i),s="",r=0;r<n.length;r+=2)s+=String.fromCharCode(n[r]+256*n[r+1]);return s}function Z(e,t,i){if(e%1!=0||e<0)throw new RangeError("offset is not uint");if(e+t>i)throw new RangeError("Trying to access beyond buffer length")}function Q(e,t,i,n,s,r){if(!k(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>s||t<r)throw new RangeError('"value" argument is out of bounds');if(i+n>e.length)throw new RangeError("Index out of range")}function J(e,t,i,n){t<0&&(t=65535+t+1);for(var s=0,r=Math.min(e.length-i,2);s<r;++s)e[i+s]=(t&255<<8*(n?s:1-s))>>>8*(n?s:1-s)}function ee(e,t,i,n){t<0&&(t=4294967295+t+1);for(var s=0,r=Math.min(e.length-i,4);s<r;++s)e[i+s]=t>>>8*(n?s:3-s)&255}function te(e,t,i,n,s,r){if(i+n>e.length)throw new RangeError("Index out of range");if(i<0)throw new RangeError("Index out of range")}function ie(e,t,i,n,s){return s||te(e,0,i,4),S(e,t,i,n,23,4),i+4}function ne(e,t,i,n,s){return s||te(e,0,i,8),S(e,t,i,n,52,8),i+8}A.prototype.slice=function(e,t){var i,n=this.length;if((e=~~e)<0?(e+=n)<0&&(e=0):e>n&&(e=n),(t=void 0===t?n:~~t)<0?(t+=n)<0&&(t=0):t>n&&(t=n),t<e&&(t=e),A.TYPED_ARRAY_SUPPORT)(i=this.subarray(e,t)).__proto__=A.prototype;else{var s=t-e;i=new A(s,void 0);for(var r=0;r<s;++r)i[r]=this[r+e]}return i},A.prototype.readUIntLE=function(e,t,i){e|=0,t|=0,i||Z(e,t,this.length);for(var n=this[e],s=1,r=0;++r<t&&(s*=256);)n+=this[e+r]*s;return n},A.prototype.readUIntBE=function(e,t,i){e|=0,t|=0,i||Z(e,t,this.length);for(var n=this[e+--t],s=1;t>0&&(s*=256);)n+=this[e+--t]*s;return n},A.prototype.readUInt8=function(e,t){return t||Z(e,1,this.length),this[e]},A.prototype.readUInt16LE=function(e,t){return t||Z(e,2,this.length),this[e]|this[e+1]<<8},A.prototype.readUInt16BE=function(e,t){return t||Z(e,2,this.length),this[e]<<8|this[e+1]},A.prototype.readUInt32LE=function(e,t){return t||Z(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},A.prototype.readUInt32BE=function(e,t){return t||Z(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},A.prototype.readIntLE=function(e,t,i){e|=0,t|=0,i||Z(e,t,this.length);for(var n=this[e],s=1,r=0;++r<t&&(s*=256);)n+=this[e+r]*s;return n>=(s*=128)&&(n-=Math.pow(2,8*t)),n},A.prototype.readIntBE=function(e,t,i){e|=0,t|=0,i||Z(e,t,this.length);for(var n=t,s=1,r=this[e+--n];n>0&&(s*=256);)r+=this[e+--n]*s;return r>=(s*=128)&&(r-=Math.pow(2,8*t)),r},A.prototype.readInt8=function(e,t){return t||Z(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},A.prototype.readInt16LE=function(e,t){t||Z(e,2,this.length);var i=this[e]|this[e+1]<<8;return 32768&i?4294901760|i:i},A.prototype.readInt16BE=function(e,t){t||Z(e,2,this.length);var i=this[e+1]|this[e]<<8;return 32768&i?4294901760|i:i},A.prototype.readInt32LE=function(e,t){return t||Z(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},A.prototype.readInt32BE=function(e,t){return t||Z(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},A.prototype.readFloatLE=function(e,t){return t||Z(e,4,this.length),b(this,e,!0,23,4)},A.prototype.readFloatBE=function(e,t){return t||Z(e,4,this.length),b(this,e,!1,23,4)},A.prototype.readDoubleLE=function(e,t){return t||Z(e,8,this.length),b(this,e,!0,52,8)},A.prototype.readDoubleBE=function(e,t){return t||Z(e,8,this.length),b(this,e,!1,52,8)},A.prototype.writeUIntLE=function(e,t,i,n){e=+e,t|=0,i|=0,n||Q(this,e,t,i,Math.pow(2,8*i)-1,0);var s=1,r=0;for(this[t]=255&e;++r<i&&(s*=256);)this[t+r]=e/s&255;return t+i},A.prototype.writeUIntBE=function(e,t,i,n){e=+e,t|=0,i|=0,n||Q(this,e,t,i,Math.pow(2,8*i)-1,0);var s=i-1,r=1;for(this[t+s]=255&e;--s>=0&&(r*=256);)this[t+s]=e/r&255;return t+i},A.prototype.writeUInt8=function(e,t,i){return e=+e,t|=0,i||Q(this,e,t,1,255,0),A.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[t]=255&e,t+1},A.prototype.writeUInt16LE=function(e,t,i){return e=+e,t|=0,i||Q(this,e,t,2,65535,0),A.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):J(this,e,t,!0),t+2},A.prototype.writeUInt16BE=function(e,t,i){return e=+e,t|=0,i||Q(this,e,t,2,65535,0),A.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):J(this,e,t,!1),t+2},A.prototype.writeUInt32LE=function(e,t,i){return e=+e,t|=0,i||Q(this,e,t,4,4294967295,0),A.TYPED_ARRAY_SUPPORT?(this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e):ee(this,e,t,!0),t+4},A.prototype.writeUInt32BE=function(e,t,i){return e=+e,t|=0,i||Q(this,e,t,4,4294967295,0),A.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):ee(this,e,t,!1),t+4},A.prototype.writeIntLE=function(e,t,i,n){if(e=+e,t|=0,!n){var s=Math.pow(2,8*i-1);Q(this,e,t,i,s-1,-s)}var r=0,o=1,a=0;for(this[t]=255&e;++r<i&&(o*=256);)e<0&&0===a&&0!==this[t+r-1]&&(a=1),this[t+r]=(e/o|0)-a&255;return t+i},A.prototype.writeIntBE=function(e,t,i,n){if(e=+e,t|=0,!n){var s=Math.pow(2,8*i-1);Q(this,e,t,i,s-1,-s)}var r=i-1,o=1,a=0;for(this[t+r]=255&e;--r>=0&&(o*=256);)e<0&&0===a&&0!==this[t+r+1]&&(a=1),this[t+r]=(e/o|0)-a&255;return t+i},A.prototype.writeInt8=function(e,t,i){return e=+e,t|=0,i||Q(this,e,t,1,127,-128),A.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),e<0&&(e=255+e+1),this[t]=255&e,t+1},A.prototype.writeInt16LE=function(e,t,i){return e=+e,t|=0,i||Q(this,e,t,2,32767,-32768),A.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):J(this,e,t,!0),t+2},A.prototype.writeInt16BE=function(e,t,i){return e=+e,t|=0,i||Q(this,e,t,2,32767,-32768),A.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):J(this,e,t,!1),t+2},A.prototype.writeInt32LE=function(e,t,i){return e=+e,t|=0,i||Q(this,e,t,4,2147483647,-2147483648),A.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24):ee(this,e,t,!0),t+4},A.prototype.writeInt32BE=function(e,t,i){return e=+e,t|=0,i||Q(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),A.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):ee(this,e,t,!1),t+4},A.prototype.writeFloatLE=function(e,t,i){return ie(this,e,t,!0,i)},A.prototype.writeFloatBE=function(e,t,i){return ie(this,e,t,!1,i)},A.prototype.writeDoubleLE=function(e,t,i){return ne(this,e,t,!0,i)},A.prototype.writeDoubleBE=function(e,t,i){return ne(this,e,t,!1,i)},A.prototype.copy=function(e,t,i,n){if(i||(i=0),n||0===n||(n=this.length),t>=e.length&&(t=e.length),t||(t=0),n>0&&n<i&&(n=i),n===i)return 0;if(0===e.length||0===this.length)return 0;if(t<0)throw new RangeError("targetStart out of bounds");if(i<0||i>=this.length)throw new RangeError("sourceStart out of bounds");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),e.length-t<n-i&&(n=e.length-t+i);var s,r=n-i;if(this===e&&i<t&&t<n)for(s=r-1;s>=0;--s)e[s+t]=this[s+i];else if(r<1e3||!A.TYPED_ARRAY_SUPPORT)for(s=0;s<r;++s)e[s+t]=this[s+i];else Uint8Array.prototype.set.call(e,this.subarray(i,i+r),t);return r},A.prototype.fill=function(e,t,i,n){if("string"==typeof e){if("string"==typeof t?(n=t,t=0,i=this.length):"string"==typeof i&&(n=i,i=this.length),1===e.length){var s=e.charCodeAt(0);s<256&&(e=s)}if(void 0!==n&&"string"!=typeof n)throw new TypeError("encoding must be a string");if("string"==typeof n&&!A.isEncoding(n))throw new TypeError("Unknown encoding: "+n)}else"number"==typeof e&&(e&=255);if(t<0||this.length<t||this.length<i)throw new RangeError("Out of range index");if(i<=t)return this;var r;if(t>>>=0,i=void 0===i?this.length:i>>>0,e||(e=0),"number"==typeof e)for(r=t;r<i;++r)this[r]=e;else{var o=k(e)?e:oe(new A(e,n).toString()),a=o.length;for(r=0;r<i-t;++r)this[r+t]=o[r%a]}return this};var se=/[^+\/0-9A-Za-z-_]/g;function re(e){return e<16?"0"+e.toString(16):e.toString(16)}function oe(e,t){var i;t=t||1/0;for(var n=e.length,s=null,r=[],o=0;o<n;++o){if((i=e.charCodeAt(o))>55295&&i<57344){if(!s){if(i>56319){(t-=3)>-1&&r.push(239,191,189);continue}if(o+1===n){(t-=3)>-1&&r.push(239,191,189);continue}s=i;continue}if(i<56320){(t-=3)>-1&&r.push(239,191,189),s=i;continue}i=65536+(s-55296<<10|i-56320)}else s&&(t-=3)>-1&&r.push(239,191,189);if(s=null,i<128){if((t-=1)<0)break;r.push(i)}else if(i<2048){if((t-=2)<0)break;r.push(i>>6|192,63&i|128)}else if(i<65536){if((t-=3)<0)break;r.push(i>>12|224,i>>6&63|128,63&i|128)}else{if(!(i<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;r.push(i>>18|240,i>>12&63|128,i>>6&63|128,63&i|128)}}return r}function ae(e){return function(e){var t,i,n,s,r,o;f||m();var a=e.length;if(a%4>0)throw new Error("Invalid string. Length must be a multiple of 4");r="="===e[a-2]?2:"="===e[a-1]?1:0,o=new g(3*a/4-r),n=r>0?a-4:a;var l=0;for(t=0,i=0;t<n;t+=4,i+=3)s=p[e.charCodeAt(t)]<<18|p[e.charCodeAt(t+1)]<<12|p[e.charCodeAt(t+2)]<<6|p[e.charCodeAt(t+3)],o[l++]=s>>16&255,o[l++]=s>>8&255,o[l++]=255&s;return 2===r?(s=p[e.charCodeAt(t)]<<2|p[e.charCodeAt(t+1)]>>4,o[l++]=255&s):1===r&&(s=p[e.charCodeAt(t)]<<10|p[e.charCodeAt(t+1)]<<4|p[e.charCodeAt(t+2)]>>2,o[l++]=s>>8&255,o[l++]=255&s),o}(function(e){if((e=function(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}(e).replace(se,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function le(e,t,i,n){for(var s=0;s<n&&!(s+i>=t.length||s>=e.length);++s)t[s+i]=e[s];return s}function ce(e){return null!=e&&(!!e._isBuffer||he(e)||function(e){return"function"==typeof e.readFloatLE&&"function"==typeof e.slice&&he(e.slice(0,0))}(e))}function he(e){return!!e.constructor&&"function"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)}function de(){throw new Error("setTimeout has not been defined")}function ue(){throw new Error("clearTimeout has not been defined")}var pe=de,ge=ue;function fe(e){if(pe===setTimeout)return setTimeout(e,0);if((pe===de||!pe)&&setTimeout)return pe=setTimeout,setTimeout(e,0);try{return pe(e,0)}catch(t){try{return pe.call(null,e,0)}catch(t){return pe.call(this,e,0)}}}"function"==typeof d.setTimeout&&(pe=setTimeout),"function"==typeof d.clearTimeout&&(ge=clearTimeout);var me,ve=[],ye=!1,Ce=-1;function be(){ye&&me&&(ye=!1,me.length?ve=me.concat(ve):Ce=-1,ve.length&&Se())}function Se(){if(!ye){var e=fe(be);ye=!0;for(var t=ve.length;t;){for(me=ve,ve=[];++Ce<t;)me&&me[Ce].run();Ce=-1,t=ve.length}me=null,ye=!1,function(e){if(ge===clearTimeout)return clearTimeout(e);if((ge===ue||!ge)&&clearTimeout)return ge=clearTimeout,clearTimeout(e);try{return ge(e)}catch(t){try{return ge.call(null,e)}catch(t){return ge.call(this,e)}}}(e)}}function we(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var i=1;i<arguments.length;i++)t[i-1]=arguments[i];ve.push(new xe(e,t)),1!==ve.length||ye||fe(Se)}function xe(e,t){this.fun=e,this.array=t}xe.prototype.run=function(){this.fun.apply(null,this.array)};var Ee=d.performance||{};Ee.now||Ee.mozNow||Ee.msNow||Ee.oNow||Ee.webkitNow;var Me={env:{}},Ae="function"==typeof Object.create?function(e,t){e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})}:function(e,t){e.super_=t;var i=function(){};i.prototype=t.prototype,e.prototype=new i,e.prototype.constructor=e},Te=/%[sdj%]/g;function De(e){if(!Be(e)){for(var t=[],i=0;i<arguments.length;i++)t.push(ke(arguments[i]));return t.join(" ")}i=1;for(var n=arguments,s=n.length,r=String(e).replace(Te,function(e){if("%%"===e)return"%";if(i>=s)return e;switch(e){case"%s":return String(n[i++]);case"%d":return Number(n[i++]);case"%j":try{return JSON.stringify(n[i++])}catch(e){return"[Circular]"}default:return e}}),o=n[i];i<s;o=n[++i])Ve(o)||!Ue(o)?r+=" "+o:r+=" "+ke(o);return r}function Ie(e,t){if(He(d.process))return function(){return Ie(e,t).apply(this,arguments)};if(!0===Me.noDeprecation)return e;var i=!1;return function(){if(!i){if(Me.throwDeprecation)throw new Error(t);Me.traceDeprecation?console.trace(t):console.error(t),i=!0}return e.apply(this,arguments)}}var Re,Le={};function ke(e,t){var i={seen:[],stylize:Ne};return arguments.length>=3&&(i.depth=arguments[2]),arguments.length>=4&&(i.colors=arguments[3]),Ge(t)?i.showHidden=t:t&&function(e,t){if(!t||!Ue(t))return e;for(var i=Object.keys(t),n=i.length;n--;)e[i[n]]=t[i[n]]}(i,t),He(i.showHidden)&&(i.showHidden=!1),He(i.depth)&&(i.depth=2),He(i.colors)&&(i.colors=!1),He(i.customInspect)&&(i.customInspect=!0),i.colors&&(i.stylize=Pe),Oe(i,e,i.depth)}function Pe(e,t){var i=ke.styles[t];return i?"["+ke.colors[i][0]+"m"+e+"["+ke.colors[i][1]+"m":e}function Ne(e,t){return e}function Oe(e,t,i){if(e.customInspect&&t&&Ke(t.inspect)&&t.inspect!==ke&&(!t.constructor||t.constructor.prototype!==t)){var n=t.inspect(i,e);return Be(n)||(n=Oe(e,n,i)),n}var s=function(e,t){if(He(t))return e.stylize("undefined","undefined");if(Be(t)){var i="'"+JSON.stringify(t).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return e.stylize(i,"string")}return"number"==typeof t?e.stylize(""+t,"number"):Ge(t)?e.stylize(""+t,"boolean"):Ve(t)?e.stylize("null","null"):void 0}(e,t);if(s)return s;var r=Object.keys(t),o=function(e){var t={};return e.forEach(function(e,i){t[e]=!0}),t}(r);if(e.showHidden&&(r=Object.getOwnPropertyNames(t)),je(t)&&(r.indexOf("message")>=0||r.indexOf("description")>=0))return _e(t);if(0===r.length){if(Ke(t)){var a=t.name?": "+t.name:"";return e.stylize("[Function"+a+"]","special")}if(ze(t))return e.stylize(RegExp.prototype.toString.call(t),"regexp");if(We(t))return e.stylize(Date.prototype.toString.call(t),"date");if(je(t))return _e(t)}var l,c,h="",d=!1,u=["{","}"];return l=t,Array.isArray(l)&&(d=!0,u=["[","]"]),Ke(t)&&(h=" [Function"+(t.name?": "+t.name:"")+"]"),ze(t)&&(h=" "+RegExp.prototype.toString.call(t)),We(t)&&(h=" "+Date.prototype.toUTCString.call(t)),je(t)&&(h=" "+_e(t)),0!==r.length||d&&0!=t.length?i<0?ze(t)?e.stylize(RegExp.prototype.toString.call(t),"regexp"):e.stylize("[Object]","special"):(e.seen.push(t),c=d?function(e,t,i,n,s){for(var r=[],o=0,a=t.length;o<a;++o)Ye(t,String(o))?r.push(Fe(e,t,i,n,String(o),!0)):r.push("");return s.forEach(function(s){s.match(/^\d+$/)||r.push(Fe(e,t,i,n,s,!0))}),r}(e,t,i,o,r):r.map(function(n){return Fe(e,t,i,o,n,d)}),e.seen.pop(),function(e,t,i){return e.reduce(function(e,t){return t.indexOf("\n"),e+t.replace(/\u001b\[\d\d?m/g,"").length+1},0)>60?i[0]+(""===t?"":t+"\n ")+" "+e.join(",\n  ")+" "+i[1]:i[0]+t+" "+e.join(", ")+" "+i[1]}(c,h,u)):u[0]+h+u[1]}function _e(e){return"["+Error.prototype.toString.call(e)+"]"}function Fe(e,t,i,n,s,r){var o,a,l;if((l=Object.getOwnPropertyDescriptor(t,s)||{value:t[s]}).get?a=l.set?e.stylize("[Getter/Setter]","special"):e.stylize("[Getter]","special"):l.set&&(a=e.stylize("[Setter]","special")),Ye(n,s)||(o="["+s+"]"),a||(e.seen.indexOf(l.value)<0?(a=Ve(i)?Oe(e,l.value,null):Oe(e,l.value,i-1)).indexOf("\n")>-1&&(a=r?a.split("\n").map(function(e){return"  "+e}).join("\n").substr(2):"\n"+a.split("\n").map(function(e){return"   "+e}).join("\n")):a=e.stylize("[Circular]","special")),He(o)){if(r&&s.match(/^\d+$/))return a;(o=JSON.stringify(""+s)).match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(o=o.substr(1,o.length-2),o=e.stylize(o,"name")):(o=o.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),o=e.stylize(o,"string"))}return o+": "+a}function Ge(e){return"boolean"==typeof e}function Ve(e){return null===e}function Be(e){return"string"==typeof e}function He(e){return void 0===e}function ze(e){return Ue(e)&&"[object RegExp]"===$e(e)}function Ue(e){return"object"==typeof e&&null!==e}function We(e){return Ue(e)&&"[object Date]"===$e(e)}function je(e){return Ue(e)&&("[object Error]"===$e(e)||e instanceof Error)}function Ke(e){return"function"==typeof e}function $e(e){return Object.prototype.toString.call(e)}function Ye(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function qe(){this.head=null,this.tail=null,this.length=0}ke.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},ke.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"},qe.prototype.push=function(e){var t={data:e,next:null};this.length>0?this.tail.next=t:this.head=t,this.tail=t,++this.length},qe.prototype.unshift=function(e){var t={data:e,next:this.head};0===this.length&&(this.tail=t),this.head=t,++this.length},qe.prototype.shift=function(){if(0!==this.length){var e=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,e}},qe.prototype.clear=function(){this.head=this.tail=null,this.length=0},qe.prototype.join=function(e){if(0===this.length)return"";for(var t=this.head,i=""+t.data;t=t.next;)i+=e+t.data;return i},qe.prototype.concat=function(e){if(0===this.length)return A.alloc(0);if(1===this.length)return this.head.data;for(var t=A.allocUnsafe(e>>>0),i=this.head,n=0;i;)i.data.copy(t,n),n+=i.data.length,i=i.next;return t};var Xe=A.isEncoding||function(e){switch(e&&e.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function Ze(e){switch(this.encoding=(e||"utf8").toLowerCase().replace(/[-_]/,""),function(e){if(e&&!Xe(e))throw new Error("Unknown encoding: "+e)}(e),this.encoding){case"utf8":this.surrogateSize=3;break;case"ucs2":case"utf16le":this.surrogateSize=2,this.detectIncompleteChar=Je;break;case"base64":this.surrogateSize=3,this.detectIncompleteChar=et;break;default:return void(this.write=Qe)}this.charBuffer=new A(6),this.charReceived=0,this.charLength=0}function Qe(e){return e.toString(this.encoding)}function Je(e){this.charReceived=e.length%2,this.charLength=this.charReceived?2:0}function et(e){this.charReceived=e.length%3,this.charLength=this.charReceived?3:0}Ze.prototype.write=function(e){for(var t="";this.charLength;){var i=e.length>=this.charLength-this.charReceived?this.charLength-this.charReceived:e.length;if(e.copy(this.charBuffer,this.charReceived,0,i),this.charReceived+=i,this.charReceived<this.charLength)return"";if(e=e.slice(i,e.length),!((n=(t=this.charBuffer.slice(0,this.charLength).toString(this.encoding)).charCodeAt(t.length-1))>=55296&&n<=56319)){if(this.charReceived=this.charLength=0,0===e.length)return t;break}this.charLength+=this.surrogateSize,t=""}this.detectIncompleteChar(e);var n,s=e.length;if(this.charLength&&(e.copy(this.charBuffer,0,e.length-this.charReceived,s),s-=this.charReceived),s=(t+=e.toString(this.encoding,0,s)).length-1,(n=t.charCodeAt(s))>=55296&&n<=56319){var r=this.surrogateSize;return this.charLength+=r,this.charReceived+=r,this.charBuffer.copy(this.charBuffer,r,0,r),e.copy(this.charBuffer,0,0,r),t.substring(0,s)}return t},Ze.prototype.detectIncompleteChar=function(e){for(var t=e.length>=3?3:e.length;t>0;t--){var i=e[e.length-t];if(1==t&&i>>5==6){this.charLength=2;break}if(t<=2&&i>>4==14){this.charLength=3;break}if(t<=3&&i>>3==30){this.charLength=4;break}}this.charReceived=t},Ze.prototype.end=function(e){var t="";if(e&&e.length&&(t=this.write(e)),this.charReceived){var i=this.charReceived,n=this.charBuffer,s=this.encoding;t+=n.slice(0,i).toString(s)}return t},st.ReadableState=nt;var tt,it=(tt="stream",He(Re)&&(Re=Me.env.NODE_DEBUG||""),tt=tt.toUpperCase(),Le[tt]||(new RegExp("\\b"+tt+"\\b","i").test(Re)?Le[tt]=function(){var e=De.apply(null,arguments);console.error("%s %d: %s",tt,0,e)}:Le[tt]=function(){}),Le[tt]);function nt(e,t){e=e||{},this.objectMode=!!e.objectMode,t instanceof kt&&(this.objectMode=this.objectMode||!!e.readableObjectMode);var i=e.highWaterMark,n=this.objectMode?16:16384;this.highWaterMark=i||0===i?i:n,this.highWaterMark=~~this.highWaterMark,this.buffer=new qe,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.defaultEncoding=e.defaultEncoding||"utf8",this.ranOut=!1,this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,e.encoding&&(this.decoder=new Ze(e.encoding),this.encoding=e.encoding)}function st(e){if(!(this instanceof st))return new st(e);this._readableState=new nt(e,this),this.readable=!0,e&&"function"==typeof e.read&&(this._read=e.read),r.call(this)}function rt(e,t,i,n,s){var r=function(e,t){var i=null;return ce(t)||"string"==typeof t||null==t||e.objectMode||(i=new TypeError("Invalid non-string/buffer chunk")),i}(t,i);if(r)e.emit("error",r);else if(null===i)t.reading=!1,function(e,t){if(!t.ended){if(t.decoder){var i=t.decoder.end();i&&i.length&&(t.buffer.push(i),t.length+=t.objectMode?1:i.length)}t.ended=!0,lt(e)}}(e,t);else if(t.objectMode||i&&i.length>0)if(t.ended&&!s){var o=new Error("stream.push() after EOF");e.emit("error",o)}else if(t.endEmitted&&s){var a=new Error("stream.unshift() after end event");e.emit("error",a)}else{var l;!t.decoder||s||n||(i=t.decoder.write(i),l=!t.objectMode&&0===i.length),s||(t.reading=!1),l||(t.flowing&&0===t.length&&!t.sync?(e.emit("data",i),e.read(0)):(t.length+=t.objectMode?1:i.length,s?t.buffer.unshift(i):t.buffer.push(i),t.needReadable&&lt(e))),function(e,t){t.readingMore||(t.readingMore=!0,we(ht,e,t))}(e,t)}else s||(t.reading=!1);return function(e){return!e.ended&&(e.needReadable||e.length<e.highWaterMark||0===e.length)}(t)}Ae(st,r),st.prototype.push=function(e,t){var i=this._readableState;return i.objectMode||"string"!=typeof e||(t=t||i.defaultEncoding)!==i.encoding&&(e=A.from(e,t),t=""),rt(this,i,e,t,!1)},st.prototype.unshift=function(e){return rt(this,this._readableState,e,"",!0)},st.prototype.isPaused=function(){return!1===this._readableState.flowing},st.prototype.setEncoding=function(e){return this._readableState.decoder=new Ze(e),this._readableState.encoding=e,this};var ot=8388608;function at(e,t){return e<=0||0===t.length&&t.ended?0:t.objectMode?1:e!=e?t.flowing&&t.length?t.buffer.head.data.length:t.length:(e>t.highWaterMark&&(t.highWaterMark=function(e){return e>=ot?e=ot:(e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++),e}(e)),e<=t.length?e:t.ended?t.length:(t.needReadable=!0,0))}function lt(e){var t=e._readableState;t.needReadable=!1,t.emittedReadable||(it("emitReadable",t.flowing),t.emittedReadable=!0,t.sync?we(ct,e):ct(e))}function ct(e){it("emit readable"),e.emit("readable"),pt(e)}function ht(e,t){for(var i=t.length;!t.reading&&!t.flowing&&!t.ended&&t.length<t.highWaterMark&&(it("maybeReadMore read 0"),e.read(0),i!==t.length);)i=t.length;t.readingMore=!1}function dt(e){it("readable nexttick read 0"),e.read(0)}function ut(e,t){t.reading||(it("resume read 0"),e.read(0)),t.resumeScheduled=!1,t.awaitDrain=0,e.emit("resume"),pt(e),t.flowing&&!t.reading&&e.read(0)}function pt(e){var t=e._readableState;for(it("flow",t.flowing);t.flowing&&null!==e.read(););}function gt(e,t){return 0===t.length?null:(t.objectMode?i=t.buffer.shift():!e||e>=t.length?(i=t.decoder?t.buffer.join(""):1===t.buffer.length?t.buffer.head.data:t.buffer.concat(t.length),t.buffer.clear()):i=function(e,t,i){var n;return e<t.head.data.length?(n=t.head.data.slice(0,e),t.head.data=t.head.data.slice(e)):n=e===t.head.data.length?t.shift():i?function(e,t){var i=t.head,n=1,s=i.data;for(e-=s.length;i=i.next;){var r=i.data,o=e>r.length?r.length:e;if(o===r.length?s+=r:s+=r.slice(0,e),0===(e-=o)){o===r.length?(++n,i.next?t.head=i.next:t.head=t.tail=null):(t.head=i,i.data=r.slice(o));break}++n}return t.length-=n,s}(e,t):function(e,t){var i=A.allocUnsafe(e),n=t.head,s=1;for(n.data.copy(i),e-=n.data.length;n=n.next;){var r=n.data,o=e>r.length?r.length:e;if(r.copy(i,i.length-e,0,o),0===(e-=o)){o===r.length?(++s,n.next?t.head=n.next:t.head=t.tail=null):(t.head=n,n.data=r.slice(o));break}++s}return t.length-=s,i}(e,t),n}(e,t.buffer,t.decoder),i);var i}function ft(e){var t=e._readableState;if(t.length>0)throw new Error('"endReadable()" called on non-empty stream');t.endEmitted||(t.ended=!0,we(mt,t,e))}function mt(e,t){e.endEmitted||0!==e.length||(e.endEmitted=!0,t.readable=!1,t.emit("end"))}function vt(e,t){for(var i=0,n=e.length;i<n;i++)if(e[i]===t)return i;return-1}function yt(){}function Ct(e,t,i){this.chunk=e,this.encoding=t,this.callback=i,this.next=null}function bt(e,t){Object.defineProperty(this,"buffer",{get:Ie(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.")}),e=e||{},this.objectMode=!!e.objectMode,t instanceof kt&&(this.objectMode=this.objectMode||!!e.writableObjectMode);var i=e.highWaterMark,n=this.objectMode?16:16384;this.highWaterMark=i||0===i?i:n,this.highWaterMark=~~this.highWaterMark,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1;var s=!1===e.decodeStrings;this.decodeStrings=!s,this.defaultEncoding=e.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(e){!function(e,t){var i=e._writableState,n=i.sync,s=i.writecb;if(function(e){e.writing=!1,e.writecb=null,e.length-=e.writelen,e.writelen=0}(i),t)!function(e,t,i,n,s){--t.pendingcb,i?we(s,n):s(n),e._writableState.errorEmitted=!0,e.emit("error",n)}(e,i,n,t,s);else{var r=Mt(i);r||i.corked||i.bufferProcessing||!i.bufferedRequest||Et(e,i),n?we(xt,e,i,r,s):xt(e,i,r,s)}}(t,e)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.bufferedRequestCount=0,this.corkedRequestsFree=new Dt(this)}function St(e){if(!(this instanceof St||this instanceof kt))return new St(e);this._writableState=new bt(e,this),this.writable=!0,e&&("function"==typeof e.write&&(this._write=e.write),"function"==typeof e.writev&&(this._writev=e.writev)),r.call(this)}function wt(e,t,i,n,s,r,o){t.writelen=n,t.writecb=o,t.writing=!0,t.sync=!0,i?e._writev(s,t.onwrite):e._write(s,r,t.onwrite),t.sync=!1}function xt(e,t,i,n){i||function(e,t){0===t.length&&t.needDrain&&(t.needDrain=!1,e.emit("drain"))}(e,t),t.pendingcb--,n(),Tt(e,t)}function Et(e,t){t.bufferProcessing=!0;var i=t.bufferedRequest;if(e._writev&&i&&i.next){var n=t.bufferedRequestCount,s=new Array(n),r=t.corkedRequestsFree;r.entry=i;for(var o=0;i;)s[o]=i,i=i.next,o+=1;wt(e,t,!0,t.length,s,"",r.finish),t.pendingcb++,t.lastBufferedRequest=null,r.next?(t.corkedRequestsFree=r.next,r.next=null):t.corkedRequestsFree=new Dt(t)}else{for(;i;){var a=i.chunk,l=i.encoding,c=i.callback;if(wt(e,t,!1,t.objectMode?1:a.length,a,l,c),i=i.next,t.writing)break}null===i&&(t.lastBufferedRequest=null)}t.bufferedRequestCount=0,t.bufferedRequest=i,t.bufferProcessing=!1}function Mt(e){return e.ending&&0===e.length&&null===e.bufferedRequest&&!e.finished&&!e.writing}function At(e,t){t.prefinished||(t.prefinished=!0,e.emit("prefinish"))}function Tt(e,t){var i=Mt(t);return i&&(0===t.pendingcb?(At(e,t),t.finished=!0,e.emit("finish")):At(e,t)),i}function Dt(e){var t=this;this.next=null,this.entry=null,this.finish=function(i){var n=t.entry;for(t.entry=null;n;){var s=n.callback;e.pendingcb--,s(i),n=n.next}e.corkedRequestsFree?e.corkedRequestsFree.next=t:e.corkedRequestsFree=t}}st.prototype.read=function(e){it("read",e),e=parseInt(e,10);var t=this._readableState,i=e;if(0!==e&&(t.emittedReadable=!1),0===e&&t.needReadable&&(t.length>=t.highWaterMark||t.ended))return it("read: emitReadable",t.length,t.ended),0===t.length&&t.ended?ft(this):lt(this),null;if(0===(e=at(e,t))&&t.ended)return 0===t.length&&ft(this),null;var n,s=t.needReadable;return it("need readable",s),(0===t.length||t.length-e<t.highWaterMark)&&it("length less than watermark",s=!0),t.ended||t.reading?it("reading or ended",s=!1):s&&(it("do read"),t.reading=!0,t.sync=!0,0===t.length&&(t.needReadable=!0),this._read(t.highWaterMark),t.sync=!1,t.reading||(e=at(i,t))),null===(n=e>0?gt(e,t):null)?(t.needReadable=!0,e=0):t.length-=e,0===t.length&&(t.ended||(t.needReadable=!0),i!==e&&t.ended&&ft(this)),null!==n&&this.emit("data",n),n},st.prototype._read=function(e){this.emit("error",new Error("not implemented"))},st.prototype.pipe=function(e,t){var i=this,n=this._readableState;switch(n.pipesCount){case 0:n.pipes=e;break;case 1:n.pipes=[n.pipes,e];break;default:n.pipes.push(e)}n.pipesCount+=1,it("pipe count=%d opts=%j",n.pipesCount,t);var s=t&&!1===t.end?c:o;function r(e){it("onunpipe"),e===i&&c()}function o(){it("onend"),e.end()}n.endEmitted?we(s):i.once("end",s),e.on("unpipe",r);var a=function(e){return function(){var t=e._readableState;it("pipeOnDrain",t.awaitDrain),t.awaitDrain&&t.awaitDrain--,0===t.awaitDrain&&e.listeners("data").length&&(t.flowing=!0,pt(e))}}(i);e.on("drain",a);var l=!1;function c(){it("cleanup"),e.removeListener("close",p),e.removeListener("finish",g),e.removeListener("drain",a),e.removeListener("error",u),e.removeListener("unpipe",r),i.removeListener("end",o),i.removeListener("end",c),i.removeListener("data",d),l=!0,!n.awaitDrain||e._writableState&&!e._writableState.needDrain||a()}var h=!1;function d(t){it("ondata"),h=!1,!1!==e.write(t)||h||((1===n.pipesCount&&n.pipes===e||n.pipesCount>1&&-1!==vt(n.pipes,e))&&!l&&(it("false write response, pause",i._readableState.awaitDrain),i._readableState.awaitDrain++,h=!0),i.pause())}function u(t){it("onerror",t),f(),e.removeListener("error",u),0===e.listeners("error").length&&e.emit("error",t)}function p(){e.removeListener("finish",g),f()}function g(){it("onfinish"),e.removeListener("close",p),f()}function f(){it("unpipe"),i.unpipe(e)}return i.on("data",d),function(e,t,i){if("function"==typeof e.prependListener)return e.prependListener(t,i);e._events&&e._events[t]?Array.isArray(e._events[t])?e._events[t].unshift(i):e._events[t]=[i,e._events[t]]:e.on(t,i)}(e,"error",u),e.once("close",p),e.once("finish",g),e.emit("pipe",i),n.flowing||(it("pipe resume"),i.resume()),e},st.prototype.unpipe=function(e){var t=this._readableState;if(0===t.pipesCount)return this;if(1===t.pipesCount)return e&&e!==t.pipes||(e||(e=t.pipes),t.pipes=null,t.pipesCount=0,t.flowing=!1,e&&e.emit("unpipe",this)),this;if(!e){var i=t.pipes,n=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var s=0;s<n;s++)i[s].emit("unpipe",this);return this}var r=vt(t.pipes,e);return-1===r||(t.pipes.splice(r,1),t.pipesCount-=1,1===t.pipesCount&&(t.pipes=t.pipes[0]),e.emit("unpipe",this)),this},st.prototype.on=function(e,t){var i=r.prototype.on.call(this,e,t);if("data"===e)!1!==this._readableState.flowing&&this.resume();else if("readable"===e){var n=this._readableState;n.endEmitted||n.readableListening||(n.readableListening=n.needReadable=!0,n.emittedReadable=!1,n.reading?n.length&&lt(this):we(dt,this))}return i},st.prototype.addListener=st.prototype.on,st.prototype.resume=function(){var e=this._readableState;return e.flowing||(it("resume"),e.flowing=!0,function(e,t){t.resumeScheduled||(t.resumeScheduled=!0,we(ut,e,t))}(this,e)),this},st.prototype.pause=function(){return it("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(it("pause"),this._readableState.flowing=!1,this.emit("pause")),this},st.prototype.wrap=function(e){var t=this._readableState,i=!1,n=this;for(var s in e.on("end",function(){if(it("wrapped end"),t.decoder&&!t.ended){var e=t.decoder.end();e&&e.length&&n.push(e)}n.push(null)}),e.on("data",function(s){it("wrapped data"),t.decoder&&(s=t.decoder.write(s)),t.objectMode&&null==s||(t.objectMode||s&&s.length)&&(n.push(s)||(i=!0,e.pause()))}),e)void 0===this[s]&&"function"==typeof e[s]&&(this[s]=function(t){return function(){return e[t].apply(e,arguments)}}(s));return function(e,t){for(var i=0,n=e.length;i<n;i++)t(e[i])}(["error","close","destroy","pause","resume"],function(t){e.on(t,n.emit.bind(n,t))}),n._read=function(t){it("wrapped _read",t),i&&(i=!1,e.resume())},n},st._fromList=gt,St.WritableState=bt,Ae(St,r),bt.prototype.getBuffer=function(){for(var e=this.bufferedRequest,t=[];e;)t.push(e),e=e.next;return t},St.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))},St.prototype.write=function(e,t,i){var n=this._writableState,s=!1;return"function"==typeof t&&(i=t,t=null),A.isBuffer(e)?t="buffer":t||(t=n.defaultEncoding),"function"!=typeof i&&(i=yt),n.ended?function(e,t){var i=new Error("write after end");e.emit("error",i),we(t,i)}(this,i):function(e,t,i,n){var s=!0,r=!1;return null===i?r=new TypeError("May not write null values to stream"):A.isBuffer(i)||"string"==typeof i||void 0===i||t.objectMode||(r=new TypeError("Invalid non-string/buffer chunk")),r&&(e.emit("error",r),we(n,r),s=!1),s}(this,n,e,i)&&(n.pendingcb++,s=function(e,t,i,n,s){i=function(e,t,i){return e.objectMode||!1===e.decodeStrings||"string"!=typeof t||(t=A.from(t,i)),t}(t,i,n),A.isBuffer(i)&&(n="buffer");var r=t.objectMode?1:i.length;t.length+=r;var o=t.length<t.highWaterMark;if(o||(t.needDrain=!0),t.writing||t.corked){var a=t.lastBufferedRequest;t.lastBufferedRequest=new Ct(i,n,s),a?a.next=t.lastBufferedRequest:t.bufferedRequest=t.lastBufferedRequest,t.bufferedRequestCount+=1}else wt(e,t,!1,r,i,n,s);return o}(this,n,e,t,i)),s},St.prototype.cork=function(){this._writableState.corked++},St.prototype.uncork=function(){var e=this._writableState;e.corked&&(e.corked--,e.writing||e.corked||e.finished||e.bufferProcessing||!e.bufferedRequest||Et(this,e))},St.prototype.setDefaultEncoding=function(e){if("string"==typeof e&&(e=e.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((e+"").toLowerCase())>-1))throw new TypeError("Unknown encoding: "+e);return this._writableState.defaultEncoding=e,this},St.prototype._write=function(e,t,i){i(new Error("not implemented"))},St.prototype._writev=null,St.prototype.end=function(e,t,i){var n=this._writableState;"function"==typeof e?(i=e,e=null,t=null):"function"==typeof t&&(i=t,t=null),null!=e&&this.write(e,t),n.corked&&(n.corked=1,this.uncork()),n.ending||n.finished||function(e,t,i){t.ending=!0,Tt(e,t),i&&(t.finished?we(i):e.once("finish",i)),t.ended=!0,e.writable=!1}(this,n,i)},Ae(kt,st);for(var It=Object.keys(St.prototype),Rt=0;Rt<It.length;Rt++){var Lt=It[Rt];kt.prototype[Lt]||(kt.prototype[Lt]=St.prototype[Lt])}function kt(e){if(!(this instanceof kt))return new kt(e);st.call(this,e),St.call(this,e),e&&!1===e.readable&&(this.readable=!1),e&&!1===e.writable&&(this.writable=!1),this.allowHalfOpen=!0,e&&!1===e.allowHalfOpen&&(this.allowHalfOpen=!1),this.once("end",Pt)}function Pt(){this.allowHalfOpen||this._writableState.ended||we(Nt,this)}function Nt(e){e.end()}function Ot(e){this.afterTransform=function(t,i){return function(e,t,i){var n=e._transformState;n.transforming=!1;var s=n.writecb;if(!s)return e.emit("error",new Error("no writecb in Transform class"));n.writechunk=null,n.writecb=null,null!=i&&e.push(i),s(t);var r=e._readableState;r.reading=!1,(r.needReadable||r.length<r.highWaterMark)&&e._read(r.highWaterMark)}(e,t,i)},this.needTransform=!1,this.transforming=!1,this.writecb=null,this.writechunk=null,this.writeencoding=null}function _t(e){if(!(this instanceof _t))return new _t(e);kt.call(this,e),this._transformState=new Ot(this);var t=this;this._readableState.needReadable=!0,this._readableState.sync=!1,e&&("function"==typeof e.transform&&(this._transform=e.transform),"function"==typeof e.flush&&(this._flush=e.flush)),this.once("prefinish",function(){"function"==typeof this._flush?this._flush(function(e){Ft(t,e)}):Ft(t)})}function Ft(e,t){if(t)return e.emit("error",t);var i=e._writableState,n=e._transformState;if(i.length)throw new Error("Calling transform done when ws.length != 0");if(n.transforming)throw new Error("Calling transform done when still transforming");return e.push(null)}function Gt(e){if(!(this instanceof Gt))return new Gt(e);_t.call(this,e)}function Vt(){r.call(this)}Ae(_t,kt),_t.prototype.push=function(e,t){return this._transformState.needTransform=!1,kt.prototype.push.call(this,e,t)},_t.prototype._transform=function(e,t,i){throw new Error("Not implemented")},_t.prototype._write=function(e,t,i){var n=this._transformState;if(n.writecb=i,n.writechunk=e,n.writeencoding=t,!n.transforming){var s=this._readableState;(n.needTransform||s.needReadable||s.length<s.highWaterMark)&&this._read(s.highWaterMark)}},_t.prototype._read=function(e){var t=this._transformState;null!==t.writechunk&&t.writecb&&!t.transforming?(t.transforming=!0,this._transform(t.writechunk,t.writeencoding,t.afterTransform)):t.needTransform=!0},Ae(Gt,_t),Gt.prototype._transform=function(e,t,i){i(null,e)},Ae(Vt,r),Vt.Readable=st,Vt.Writable=St,Vt.Duplex=kt,Vt.Transform=_t,Vt.PassThrough=Gt,Vt.Stream=Vt,Vt.prototype.pipe=function(e,t){var i=this;function n(t){e.writable&&!1===e.write(t)&&i.pause&&i.pause()}function s(){i.readable&&i.resume&&i.resume()}i.on("data",n),e.on("drain",s),e._isStdio||t&&!1===t.end||(i.on("end",a),i.on("close",l));var o=!1;function a(){o||(o=!0,e.end())}function l(){o||(o=!0,"function"==typeof e.destroy&&e.destroy())}function c(e){if(h(),0===r.listenerCount(this,"error"))throw e}function h(){i.removeListener("data",n),e.removeListener("drain",s),i.removeListener("end",a),i.removeListener("close",l),i.removeListener("error",c),e.removeListener("error",c),i.removeListener("end",h),i.removeListener("close",h),e.removeListener("close",h)}return i.on("error",c),e.on("error",c),i.on("end",h),i.on("close",h),e.on("close",h),e.emit("pipe",i),e};class Bt extends Error{constructor(e,t,...i){Array.isArray(t)&&(t=t.join(" ")),super(t),void 0!==Error.captureStackTrace&&Error.captureStackTrace(this,Bt),this.code=e;for(const e of i)for(const t in e){const i=e[t];this[t]=ce(i)?i.toString():null==i?i:JSON.parse(JSON.stringify(i))}}}const Ht=function(e){return"object"==typeof e&&null!==e&&!Array.isArray(e)},zt=".".charCodeAt(0),Ut=/\\(\\)?/g,Wt=RegExp("[^.[\\]]+|\\[(?:([^\"'][^[]*)|([\"'])((?:(?!\\2)[^\\\\]|\\\\.)*?)\\2)\\]|(?=(?:\\.|\\[\\])(?:\\.|\\[\\]|$))","g"),jt=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Kt=/^\w*$/,$t=function(e){const t=typeof e;return"symbol"===t||"object"===t&&e&&"[object Symbol]"===function(e){return Object.prototype.toString.call(e)}(e)},Yt=function(e){if("string"==typeof e||$t(e))return e;const t=`${e}`;return"0"==t&&1/e==-INFINITY?"-0":t},qt=function(e,t){let i=0;const n=(t=function(e,t){return Array.isArray(e)?e:function(e,t){if(Array.isArray(e))return!1;const i=typeof e;return!("number"!==i&&"symbol"!==i&&"boolean"!==i&&e&&!$t(e))||Kt.test(e)||!jt.test(e)||null!=t&&e in Object(t)}(e,t)?[e]:function(e){const t=[];return e.charCodeAt(0)===zt&&t.push(""),e.replace(Wt,function(e,i,n,s){let r=e;n?r=s.replace(Ut,"$1"):i&&(r=i.trim()),t.push(r)}),t}(e)}(t,e)).length;for(;null!=e&&i<n;)e=e[Yt(t[i++])];return i&&i===n?e:void 0},Xt=function(e){if(null==e)return[void 0,void 0];if("object"!=typeof e)return[Error('Invalid option "columns": expect an array or an object')];if(Array.isArray(e)){const t=[];for(const i of e)if("string"==typeof i)t.push({key:i,header:i});else{if("object"!=typeof i||null===i||Array.isArray(i))return[Error("Invalid column definition: expect a string or an object")];if(!i.key)return[Error('Invalid column definition: property "key" is required')];void 0===i.header&&(i.header=i.key),t.push(i)}e=t}else{const t=[];for(const i in e)t.push({key:i,header:e[i]});e=t}return[void 0,e]},Zt=function(e){return e.replace(/([A-Z])/g,function(e,t){return"_"+t.toLowerCase()})},Qt=function(e){const t={};for(const i in e)t[Zt(i)]=e[i];if(void 0===t.bom||null===t.bom||!1===t.bom)t.bom=!1;else if(!0!==t.bom)return[new Bt("CSV_OPTION_BOOLEAN_INVALID_TYPE",["option `bom` is optional and must be a boolean value,",`got ${JSON.stringify(t.bom)}`])];if(void 0===t.delimiter||null===t.delimiter)t.delimiter=",";else if(ce(t.delimiter))t.delimiter=t.delimiter.toString();else if("string"!=typeof t.delimiter)return[new Bt("CSV_OPTION_DELIMITER_INVALID_TYPE",["option `delimiter` must be a buffer or a string,",`got ${JSON.stringify(t.delimiter)}`])];if(void 0===t.quote||null===t.quote)t.quote='"';else if(!0===t.quote)t.quote='"';else if(!1===t.quote)t.quote="";else if(ce(t.quote))t.quote=t.quote.toString();else if("string"!=typeof t.quote)return[new Bt("CSV_OPTION_QUOTE_INVALID_TYPE",["option `quote` must be a boolean, a buffer or a string,",`got ${JSON.stringify(t.quote)}`])];if(void 0!==t.quoted&&null!==t.quoted||(t.quoted=!1),void 0===t.escape_formulas||null===t.escape_formulas)t.escape_formulas=!1;else if("boolean"!=typeof t.escape_formulas)return[new Bt("CSV_OPTION_ESCAPE_FORMULAS_INVALID_TYPE",["option `escape_formulas` must be a boolean,",`got ${JSON.stringify(t.escape_formulas)}`])];if(void 0!==t.quoted_empty&&null!==t.quoted_empty||(t.quoted_empty=void 0),void 0===t.quoted_match||null===t.quoted_match||!1===t.quoted_match?t.quoted_match=null:Array.isArray(t.quoted_match)||(t.quoted_match=[t.quoted_match]),t.quoted_match)for(const e of t.quoted_match){const t=e instanceof RegExp;if("string"!=typeof e&&!t)return[Error(`Invalid Option: quoted_match must be a string or a regex, got ${JSON.stringify(e)}`)]}if(void 0!==t.quoted_string&&null!==t.quoted_string||(t.quoted_string=!1),void 0!==t.eof&&null!==t.eof||(t.eof=!0),void 0===t.escape||null===t.escape)t.escape='"';else if(ce(t.escape))t.escape=t.escape.toString();else if("string"!=typeof t.escape)return[Error(`Invalid Option: escape must be a buffer or a string, got ${JSON.stringify(t.escape)}`)];if(t.escape.length>1)return[Error(`Invalid Option: escape must be one character, got ${t.escape.length} characters`)];void 0!==t.header&&null!==t.header||(t.header=!1);const[i,n]=Xt(t.columns);if(void 0!==i)return[i];if(t.columns=n,void 0!==t.quoted&&null!==t.quoted||(t.quoted=!1),void 0!==t.cast&&null!==t.cast||(t.cast={}),void 0!==t.cast.bigint&&null!==t.cast.bigint||(t.cast.bigint=e=>""+e),void 0!==t.cast.boolean&&null!==t.cast.boolean||(t.cast.boolean=e=>e?"1":""),void 0!==t.cast.date&&null!==t.cast.date||(t.cast.date=e=>""+e.getTime()),void 0!==t.cast.number&&null!==t.cast.number||(t.cast.number=e=>""+e),void 0!==t.cast.object&&null!==t.cast.object||(t.cast.object=e=>JSON.stringify(e)),void 0!==t.cast.string&&null!==t.cast.string||(t.cast.string=function(e){return e}),void 0!==t.on_record&&"function"!=typeof t.on_record)return[Error('Invalid Option: "on_record" must be a function.')];if(void 0===t.record_delimiter||null===t.record_delimiter)t.record_delimiter="\n";else if(ce(t.record_delimiter))t.record_delimiter=t.record_delimiter.toString();else if("string"!=typeof t.record_delimiter)return[Error(`Invalid Option: record_delimiter must be a buffer or a string, got ${JSON.stringify(t.record_delimiter)}`)];switch(t.record_delimiter){case"unix":t.record_delimiter="\n";break;case"mac":t.record_delimiter="\r";break;case"windows":t.record_delimiter="\r\n";break;case"ascii":t.record_delimiter="";break;case"unicode":t.record_delimiter="\u2028"}return[void 0,t]},Jt=A.from([239,187,191]);class ei extends _t{constructor(e={}){super({writableObjectMode:!0,...e});const[t,i]=Qt(e);if(void 0!==t)throw t;this.options=i,this.state={stop:!1},this.info={records:0},this.api=function(e,t,i){return{options:e,state:t,info:i,__transform:function(e,t){if(!Array.isArray(e)&&"object"!=typeof e)return Error(`Invalid Record: expect an array or an object, got ${JSON.stringify(e)}`);if(0===this.info.records)if(Array.isArray(e)){if(!0===this.options.header&&void 0===this.options.columns)return Error("Undiscoverable Columns: header option requires column option or object records")}else if(void 0===this.options.columns){const[t,i]=Xt(Object.keys(e));if(t)return;this.options.columns=i}if(0===this.info.records){this.bom(t);const e=this.headers(t);if(e)return e}try{this.options.on_record&&this.options.on_record(e,this.info.records)}catch(i){return i}let i,n;if(this.options.eof){if([i,n]=this.stringify(e),i)return i;if(void 0===n)return;n+=this.options.record_delimiter}else{if([i,n]=this.stringify(e),i)return i;if(void 0===n)return;(this.options.header||this.info.records)&&(n=this.options.record_delimiter+n)}this.info.records++,t(n)},stringify:function(e,t=!1){if("object"!=typeof e)return[void 0,e];const{columns:i}=this.options,n=[];if(Array.isArray(e)){i&&e.splice(i.length);for(let i=0;i<e.length;i++){const s=e[i],[r,o]=this.__cast(s,{index:i,column:i,records:this.info.records,header:t});if(r)return[r];n[i]=[o,s]}}else for(let s=0;s<i.length;s++){const r=qt(e,i[s].key),[o,a]=this.__cast(r,{index:s,column:i[s].key,records:this.info.records,header:t});if(o)return[o];n[s]=[a,r]}let s="";for(let e=0;e<n.length;e++){let t,i,[r,o]=n[e];if("string"==typeof r)t=this.options;else if(Ht(r)){if(t=r,r=t.value,delete t.value,"string"!=typeof r&&null!=r&&i)return[Error(`Invalid Casting Value: returned value must return a string, null or undefined, got ${JSON.stringify(r)}`)];if(t={...this.options,...t},[i,t]=Qt(t),void 0!==i)return[i]}else{if(null!=r)return[Error(`Invalid Casting Value: returned value must return a string, an object, null or undefined, got ${JSON.stringify(r)}`)];t=this.options}const{delimiter:a,escape:l,quote:c,quoted:h,quoted_empty:d,quoted_string:u,quoted_match:p,record_delimiter:g,escape_formulas:f}=t;if(""===r&&""===o){let e=p&&p.filter(e=>"string"==typeof e?-1!==r.indexOf(e):e.test(r));e=e&&e.length>0,!0===(e||!0===d||!0===u&&!1!==d)&&(r=c+r+c),s+=r}else if(r){if("string"!=typeof r)return[Error(`Formatter must return a string, null or undefined, got ${JSON.stringify(r)}`)];const e=a.length&&r.indexOf(a)>=0,t=""!==c&&r.indexOf(c)>=0,i=r.indexOf(l)>=0&&l!==c,n=r.indexOf(g)>=0,d=u&&"string"==typeof o;let m=p&&p.filter(e=>"string"==typeof e?-1!==r.indexOf(e):e.test(r));if(m=m&&m.length>0,f)switch(r[0]){case"=":case"+":case"-":case"@":case"\t":case"\r":case"＝":case"＋":case"－":case"＠":r=`'${r}`}const v=!0===t||e||n||h||d||m;if(!0===v&&!0===i){const e="\\"===l?new RegExp(l+l,"g"):new RegExp(l,"g");r=r.replace(e,l+l)}if(!0===t){const e=new RegExp(c,"g");r=r.replace(e,l+c)}!0===v&&(r=c+r+c),s+=r}else(!0===d||""===o&&!0===u&&!1!==d)&&(s+=c+c);e!==n.length-1&&(s+=a)}return[void 0,s]},bom:function(e){!0===this.options.bom&&e(Jt)},headers:function(e){if(!1===this.options.header)return;if(void 0===this.options.columns)return;let t,i=this.options.columns.map(e=>e.header);if(this.options.eof?([t,i]=this.stringify(i,!0),i+=this.options.record_delimiter):[t,i]=this.stringify(i),t)return t;e(i)},__cast:function(e,t){const i=typeof e;try{return"string"===i?[void 0,this.options.cast.string(e,t)]:"bigint"===i?[void 0,this.options.cast.bigint(e,t)]:"number"===i?[void 0,this.options.cast.number(e,t)]:"boolean"===i?[void 0,this.options.cast.boolean(e,t)]:e instanceof Date?[void 0,this.options.cast.date(e,t)]:"object"===i&&null!==e?[void 0,this.options.cast.object(e,t)]:[void 0,e,e]}catch(e){return[e]}}}}(this.options,this.state,this.info),this.api.options.on_record=(...e)=>{this.emit("record",...e)}}_transform(e,t,i){if(!0===this.state.stop)return;const n=this.api.__transform(e,this.push.bind(this));void 0!==n&&(this.state.stop=!0),i(n)}_flush(e){if(!0!==this.state.stop){if(0===this.info.records){this.api.bom(this.push.bind(this));const t=this.api.headers(this.push.bind(this));t&&e(t)}e()}}}const ti=function(){let e,t,i;for(const n in arguments){const s=arguments[n],r=typeof s;if(void 0===e&&Array.isArray(s))e=s;else if(void 0===t&&Ht(s))t=s;else{if(void 0!==i||"function"!==r)throw new Bt("CSV_INVALID_ARGUMENT",["Invalid argument:",`got ${JSON.stringify(s)} at index ${n}`]);i=s}}const n=new ei(t);if(i){const e=[];n.on("readable",function(){let t;for(;null!==(t=this.read());)e.push(t)}),n.on("error",function(e){i(e)}),n.on("end",function(){try{i(void 0,e.join(""))}catch(e){return void i(e)}})}if(void 0!==e){const t=function(){for(const t of e)n.write(t);n.end()};"function"==typeof setImmediate?setImmediate(t):setTimeout(t,0)}return n}},52413(e,t,i){"use strict";function n(e,t,i){e.prototype=t.prototype=i,i.constructor=e}function s(e,t){var i=Object.create(e.prototype);for(var n in t)i[n]=t[n];return i}function r(){}i.d(t,{Ay:()=>S,Qh:()=>E});var o=.7,a=1/o,l="\\s*([+-]?\\d+)\\s*",c="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",h="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",d=/^#([0-9a-f]{3,8})$/,u=new RegExp(`^rgb\\(${l},${l},${l}\\)$`),p=new RegExp(`^rgb\\(${h},${h},${h}\\)$`),g=new RegExp(`^rgba\\(${l},${l},${l},${c}\\)$`),f=new RegExp(`^rgba\\(${h},${h},${h},${c}\\)$`),m=new RegExp(`^hsl\\(${c},${h},${h}\\)$`),v=new RegExp(`^hsla\\(${c},${h},${h},${c}\\)$`),y={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};function C(){return this.rgb().formatHex()}function b(){return this.rgb().formatRgb()}function S(e){var t,i;return e=(e+"").trim().toLowerCase(),(t=d.exec(e))?(i=t[1].length,t=parseInt(t[1],16),6===i?w(t):3===i?new M(t>>8&15|t>>4&240,t>>4&15|240&t,(15&t)<<4|15&t,1):8===i?x(t>>24&255,t>>16&255,t>>8&255,(255&t)/255):4===i?x(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|240&t,((15&t)<<4|15&t)/255):null):(t=u.exec(e))?new M(t[1],t[2],t[3],1):(t=p.exec(e))?new M(255*t[1]/100,255*t[2]/100,255*t[3]/100,1):(t=g.exec(e))?x(t[1],t[2],t[3],t[4]):(t=f.exec(e))?x(255*t[1]/100,255*t[2]/100,255*t[3]/100,t[4]):(t=m.exec(e))?L(t[1],t[2]/100,t[3]/100,1):(t=v.exec(e))?L(t[1],t[2]/100,t[3]/100,t[4]):y.hasOwnProperty(e)?w(y[e]):"transparent"===e?new M(NaN,NaN,NaN,0):null}function w(e){return new M(e>>16&255,e>>8&255,255&e,1)}function x(e,t,i,n){return n<=0&&(e=t=i=NaN),new M(e,t,i,n)}function E(e,t,i,n){return 1===arguments.length?((s=e)instanceof r||(s=S(s)),s?new M((s=s.rgb()).r,s.g,s.b,s.opacity):new M):new M(e,t,i,null==n?1:n);var s}function M(e,t,i,n){this.r=+e,this.g=+t,this.b=+i,this.opacity=+n}function A(){return`#${R(this.r)}${R(this.g)}${R(this.b)}`}function T(){const e=D(this.opacity);return`${1===e?"rgb(":"rgba("}${I(this.r)}, ${I(this.g)}, ${I(this.b)}${1===e?")":`, ${e})`}`}function D(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function I(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function R(e){return((e=I(e))<16?"0":"")+e.toString(16)}function L(e,t,i,n){return n<=0?e=t=i=NaN:i<=0||i>=1?e=t=NaN:t<=0&&(e=NaN),new P(e,t,i,n)}function k(e){if(e instanceof P)return new P(e.h,e.s,e.l,e.opacity);if(e instanceof r||(e=S(e)),!e)return new P;if(e instanceof P)return e;var t=(e=e.rgb()).r/255,i=e.g/255,n=e.b/255,s=Math.min(t,i,n),o=Math.max(t,i,n),a=NaN,l=o-s,c=(o+s)/2;return l?(a=t===o?(i-n)/l+6*(i<n):i===o?(n-t)/l+2:(t-i)/l+4,l/=c<.5?o+s:2-o-s,a*=60):l=c>0&&c<1?0:a,new P(a,l,c,e.opacity)}function P(e,t,i,n){this.h=+e,this.s=+t,this.l=+i,this.opacity=+n}function N(e){return(e=(e||0)%360)<0?e+360:e}function O(e){return Math.max(0,Math.min(1,e||0))}function _(e,t,i){return 255*(e<60?t+(i-t)*e/60:e<180?i:e<240?t+(i-t)*(240-e)/60:t)}n(r,S,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:C,formatHex:C,formatHex8:function(){return this.rgb().formatHex8()},formatHsl:function(){return k(this).formatHsl()},formatRgb:b,toString:b}),n(M,E,s(r,{brighter(e){return e=null==e?a:Math.pow(a,e),new M(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=null==e?o:Math.pow(o,e),new M(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new M(I(this.r),I(this.g),I(this.b),D(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:A,formatHex:A,formatHex8:function(){return`#${R(this.r)}${R(this.g)}${R(this.b)}${R(255*(isNaN(this.opacity)?1:this.opacity))}`},formatRgb:T,toString:T})),n(P,function(e,t,i,n){return 1===arguments.length?k(e):new P(e,t,i,null==n?1:n)},s(r,{brighter(e){return e=null==e?a:Math.pow(a,e),new P(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=null==e?o:Math.pow(o,e),new P(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+360*(this.h<0),t=isNaN(e)||isNaN(this.s)?0:this.s,i=this.l,n=i+(i<.5?i:1-i)*t,s=2*i-n;return new M(_(e>=240?e-240:e+120,s,n),_(e,s,n),_(e<120?e+240:e-120,s,n),this.opacity)},clamp(){return new P(N(this.h),O(this.s),O(this.l),D(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const e=D(this.opacity);return`${1===e?"hsl(":"hsla("}${N(this.h)}, ${100*O(this.s)}%, ${100*O(this.l)}%${1===e?")":`, ${e})`}`}}))},54560(e,t,i){"use strict";i.d(t,{A:()=>l});var n={value:()=>{}};function s(){for(var e,t=0,i=arguments.length,n={};t<i;++t){if(!(e=arguments[t]+"")||e in n||/[\s.]/.test(e))throw new Error("illegal type: "+e);n[e]=[]}return new r(n)}function r(e){this._=e}function o(e,t){for(var i,n=0,s=e.length;n<s;++n)if((i=e[n]).name===t)return i.value}function a(e,t,i){for(var s=0,r=e.length;s<r;++s)if(e[s].name===t){e[s]=n,e=e.slice(0,s).concat(e.slice(s+1));break}return null!=i&&e.push({name:t,value:i}),e}r.prototype=s.prototype={constructor:r,on:function(e,t){var i,n,s=this._,r=(n=s,(e+"").trim().split(/^|\s+/).map(function(e){var t="",i=e.indexOf(".");if(i>=0&&(t=e.slice(i+1),e=e.slice(0,i)),e&&!n.hasOwnProperty(e))throw new Error("unknown type: "+e);return{type:e,name:t}})),l=-1,c=r.length;if(!(arguments.length<2)){if(null!=t&&"function"!=typeof t)throw new Error("invalid callback: "+t);for(;++l<c;)if(i=(e=r[l]).type)s[i]=a(s[i],e.name,t);else if(null==t)for(i in s)s[i]=a(s[i],e.name,null);return this}for(;++l<c;)if((i=(e=r[l]).type)&&(i=o(s[i],e.name)))return i},copy:function(){var e={},t=this._;for(var i in t)e[i]=t[i].slice();return new r(e)},call:function(e,t){if((i=arguments.length-2)>0)for(var i,n,s=new Array(i),r=0;r<i;++r)s[r]=arguments[r+2];if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(r=0,i=(n=this._[e]).length;r<i;++r)n[r].value.apply(t,s)},apply:function(e,t,i){if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(var n=this._[e],s=0,r=n.length;s<r;++s)n[s].value.apply(t,i)}};const l=s},83971(e,t,i){"use strict";i.d(t,{A:()=>g});var n=i(54560),s=i(6063),r=i(60616),o=i(37572),a=i(7240);const l=e=>()=>e;function c(e,{sourceEvent:t,subject:i,target:n,identifier:s,active:r,x:o,y:a,dx:l,dy:c,dispatch:h}){Object.defineProperties(this,{type:{value:e,enumerable:!0,configurable:!0},sourceEvent:{value:t,enumerable:!0,configurable:!0},subject:{value:i,enumerable:!0,configurable:!0},target:{value:n,enumerable:!0,configurable:!0},identifier:{value:s,enumerable:!0,configurable:!0},active:{value:r,enumerable:!0,configurable:!0},x:{value:o,enumerable:!0,configurable:!0},y:{value:a,enumerable:!0,configurable:!0},dx:{value:l,enumerable:!0,configurable:!0},dy:{value:c,enumerable:!0,configurable:!0},_:{value:h}})}function h(e){return!e.ctrlKey&&!e.button}function d(){return this.parentNode}function u(e,t){return null==t?{x:e.x,y:e.y}:t}function p(){return navigator.maxTouchPoints||"ontouchstart"in this}function g(){var e,t,i,g,f=h,m=d,v=u,y=p,C={},b=(0,n.A)("start","drag","end"),S=0,w=0;function x(e){e.on("mousedown.drag",E).filter(y).on("touchstart.drag",T).on("touchmove.drag",D,a.vr).on("touchend.drag touchcancel.drag",I).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function E(n,r){if(!g&&f.call(this,n,r)){var l=R(this,m.call(this,n,r),n,r,"mouse");l&&((0,s.A)(n.view).on("mousemove.drag",M,a.Rw).on("mouseup.drag",A,a.Rw),(0,o.A)(n.view),(0,a.GK)(n),i=!1,e=n.clientX,t=n.clientY,l("start",n))}}function M(n){if((0,a.Ay)(n),!i){var s=n.clientX-e,r=n.clientY-t;i=s*s+r*r>w}C.mouse("drag",n)}function A(e){(0,s.A)(e.view).on("mousemove.drag mouseup.drag",null),(0,o.y)(e.view,i),(0,a.Ay)(e),C.mouse("end",e)}function T(e,t){if(f.call(this,e,t)){var i,n,s=e.changedTouches,r=m.call(this,e,t),o=s.length;for(i=0;i<o;++i)(n=R(this,r,e,t,s[i].identifier,s[i]))&&((0,a.GK)(e),n("start",e,s[i]))}}function D(e){var t,i,n=e.changedTouches,s=n.length;for(t=0;t<s;++t)(i=C[n[t].identifier])&&((0,a.Ay)(e),i("drag",e,n[t]))}function I(e){var t,i,n=e.changedTouches,s=n.length;for(g&&clearTimeout(g),g=setTimeout(function(){g=null},500),t=0;t<s;++t)(i=C[n[t].identifier])&&((0,a.GK)(e),i("end",e,n[t]))}function R(e,t,i,n,s,o){var a,l,h,d=b.copy(),u=(0,r.A)(o||i,t);if(null!=(h=v.call(e,new c("beforestart",{sourceEvent:i,target:x,identifier:s,active:S,x:u[0],y:u[1],dx:0,dy:0,dispatch:d}),n)))return a=h.x-u[0]||0,l=h.y-u[1]||0,function i(o,p,g){var f,m=u;switch(o){case"start":C[s]=i,f=S++;break;case"end":delete C[s],--S;case"drag":u=(0,r.A)(g||p,t),f=S}d.call(o,e,new c(o,{sourceEvent:p,subject:h,target:x,identifier:s,active:f,x:u[0]+a,y:u[1]+l,dx:u[0]-m[0],dy:u[1]-m[1],dispatch:d}),n)}}return x.filter=function(e){return arguments.length?(f="function"==typeof e?e:l(!!e),x):f},x.container=function(e){return arguments.length?(m="function"==typeof e?e:l(e),x):m},x.subject=function(e){return arguments.length?(v="function"==typeof e?e:l(e),x):v},x.touchable=function(e){return arguments.length?(y="function"==typeof e?e:l(!!e),x):y},x.on=function(){var e=b.on.apply(b,arguments);return e===b?x:e},x.clickDistance=function(e){return arguments.length?(w=(e=+e)*e,x):Math.sqrt(w)},x}c.prototype.on=function(){var e=this._.on.apply(this._,arguments);return e===this._?this:e}},37572(e,t,i){"use strict";i.d(t,{A:()=>r,y:()=>o});var n=i(6063),s=i(7240);function r(e){var t=e.document.documentElement,i=(0,n.A)(e).on("dragstart.drag",s.Ay,s.Rw);"onselectstart"in t?i.on("selectstart.drag",s.Ay,s.Rw):(t.__noselect=t.style.MozUserSelect,t.style.MozUserSelect="none")}function o(e,t){var i=e.document.documentElement,r=(0,n.A)(e).on("dragstart.drag",null);t&&(r.on("click.drag",s.Ay,s.Rw),setTimeout(function(){r.on("click.drag",null)},0)),"onselectstart"in i?r.on("selectstart.drag",null):(i.style.MozUserSelect=i.__noselect,delete i.__noselect)}},7240(e,t,i){"use strict";i.d(t,{Ay:()=>o,GK:()=>r,Rw:()=>s,vr:()=>n});const n={passive:!1},s={capture:!0,passive:!1};function r(e){e.stopImmediatePropagation()}function o(e){e.preventDefault(),e.stopImmediatePropagation()}},59394(e,t,i){"use strict";i.d(t,{A:()=>n});const n=e=>()=>e},77419(e,t,i){"use strict";function n(e,t){return e=+e,t=+t,function(i){return e*(1-i)+t*i}}i.d(t,{A:()=>n})},92795(e,t,i){"use strict";i.d(t,{Ay:()=>a});var n=i(52413);function s(e,t,i,n,s){var r=e*e,o=r*e;return((1-3*e+3*r-o)*t+(4-6*r+3*o)*i+(1+3*e+3*r-3*o)*n+o*s)/6}var r=i(59394);function o(e,t){var i=t-e;return i?function(e,t){return function(i){return e+i*t}}(e,i):(0,r.A)(isNaN(e)?t:e)}const a=function e(t){var i=function(e){return 1===(e=+e)?o:function(t,i){return i-t?function(e,t,i){return e=Math.pow(e,i),t=Math.pow(t,i)-e,i=1/i,function(n){return Math.pow(e+n*t,i)}}(t,i,e):(0,r.A)(isNaN(t)?i:t)}}(t);function s(e,t){var s=i((e=(0,n.Qh)(e)).r,(t=(0,n.Qh)(t)).r),r=i(e.g,t.g),a=i(e.b,t.b),l=o(e.opacity,t.opacity);return function(t){return e.r=s(t),e.g=r(t),e.b=a(t),e.opacity=l(t),e+""}}return s.gamma=e,s}(1);function l(e){return function(t){var i,s,r=t.length,o=new Array(r),a=new Array(r),l=new Array(r);for(i=0;i<r;++i)s=(0,n.Qh)(t[i]),o[i]=s.r||0,a[i]=s.g||0,l[i]=s.b||0;return o=e(o),a=e(a),l=e(l),s.opacity=1,function(e){return s.r=o(e),s.g=a(e),s.b=l(e),s+""}}}l(function(e){var t=e.length-1;return function(i){var n=i<=0?i=0:i>=1?(i=1,t-1):Math.floor(i*t),r=e[n],o=e[n+1],a=n>0?e[n-1]:2*r-o,l=n<t-1?e[n+2]:2*o-r;return s((i-n/t)*t,a,r,o,l)}}),l(function(e){var t=e.length;return function(i){var n=Math.floor(((i%=1)<0?++i:i)*t),r=e[(n+t-1)%t],o=e[n%t],a=e[(n+1)%t],l=e[(n+2)%t];return s((i-n/t)*t,r,o,a,l)}})},20835(e,t,i){"use strict";i.d(t,{A:()=>o});var n=i(77419),s=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,r=new RegExp(s.source,"g");function o(e,t){var i,o,a,l=s.lastIndex=r.lastIndex=0,c=-1,h=[],d=[];for(e+="",t+="";(i=s.exec(e))&&(o=r.exec(t));)(a=o.index)>l&&(a=t.slice(l,a),h[c]?h[c]+=a:h[++c]=a),(i=i[0])===(o=o[0])?h[c]?h[c]+=o:h[++c]=o:(h[++c]=null,d.push({i:c,x:(0,n.A)(i,o)})),l=r.lastIndex;return l<t.length&&(a=t.slice(l),h[c]?h[c]+=a:h[++c]=a),h.length<2?d[0]?function(e){return function(t){return e(t)+""}}(d[0].x):function(e){return function(){return e}}(t):(t=d.length,function(e){for(var i,n=0;n<t;++n)h[(i=d[n]).i]=i.x(e);return h.join("")})}},32262(e,t,i){"use strict";i.d(t,{A:()=>u});var n=i(52413),s=i(92795);function r(e,t){var i,n=t?t.length:0,s=e?Math.min(n,e.length):0,r=new Array(s),o=new Array(n);for(i=0;i<s;++i)r[i]=u(e[i],t[i]);for(;i<n;++i)o[i]=t[i];return function(e){for(i=0;i<s;++i)o[i]=r[i](e);return o}}function o(e,t){var i=new Date;return e=+e,t=+t,function(n){return i.setTime(e*(1-n)+t*n),i}}var a=i(77419);function l(e,t){var i,n={},s={};for(i in null!==e&&"object"==typeof e||(e={}),null!==t&&"object"==typeof t||(t={}),t)i in e?n[i]=u(e[i],t[i]):s[i]=t[i];return function(e){for(i in n)s[i]=n[i](e);return s}}var c=i(20835),h=i(59394);function d(e,t){t||(t=[]);var i,n=e?Math.min(t.length,e.length):0,s=t.slice();return function(r){for(i=0;i<n;++i)s[i]=e[i]*(1-r)+t[i]*r;return s}}function u(e,t){var i,u,p=typeof t;return null==t||"boolean"===p?(0,h.A)(t):("number"===p?a.A:"string"===p?(i=(0,n.Ay)(t))?(t=i,s.Ay):c.A:t instanceof n.Ay?s.Ay:t instanceof Date?o:(u=t,!ArrayBuffer.isView(u)||u instanceof DataView?Array.isArray(t)?r:"function"!=typeof t.valueOf&&"function"!=typeof t.toString||isNaN(t)?l:a.A:d))(e,t)}},96785(e,t,i){"use strict";function n(e){return((e=Math.exp(e))+1/e)/2}i.d(t,{A:()=>s});const s=function e(t,i,s){function r(e,r){var o,a,l=e[0],c=e[1],h=e[2],d=r[0],u=r[1],p=r[2],g=d-l,f=u-c,m=g*g+f*f;if(m<1e-12)a=Math.log(p/h)/t,o=function(e){return[l+e*g,c+e*f,h*Math.exp(t*e*a)]};else{var v=Math.sqrt(m),y=(p*p-h*h+s*m)/(2*h*i*v),C=(p*p-h*h-s*m)/(2*p*i*v),b=Math.log(Math.sqrt(y*y+1)-y),S=Math.log(Math.sqrt(C*C+1)-C);a=(S-b)/t,o=function(e){var s,r=e*a,o=n(b),d=h/(i*v)*(o*(s=t*r+b,((s=Math.exp(2*s))-1)/(s+1))-function(e){return((e=Math.exp(e))-1/e)/2}(b));return[l+d*g,c+d*f,h*o/n(t*r+b)]}}return o.duration=1e3*a*t/Math.SQRT2,o}return r.rho=function(t){var i=Math.max(.001,+t),n=i*i;return e(i,n,n*n)},r}(Math.SQRT2,2,4)},99269(e,t,i){"use strict";function n(e){return function(){return this.matches(e)}}function s(e){return function(t){return t.matches(e)}}i.d(t,{A:()=>n,j:()=>s})},39276(e,t,i){"use strict";i.d(t,{A:()=>s});var n=i(27683);function s(e){var t=e+="",i=t.indexOf(":");return i>=0&&"xmlns"!==(t=e.slice(0,i))&&(e=e.slice(i+1)),n.A.hasOwnProperty(t)?{space:n.A[t],local:e}:e}},27683(e,t,i){"use strict";i.d(t,{A:()=>s,g:()=>n});var n="http://www.w3.org/1999/xhtml";const s={svg:"http://www.w3.org/2000/svg",xhtml:n,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"}},60616(e,t,i){"use strict";function n(e,t){if(e=function(e){let t;for(;t=e.sourceEvent;)e=t;return e}(e),void 0===t&&(t=e.currentTarget),t){var i=t.ownerSVGElement||t;if(i.createSVGPoint){var n=i.createSVGPoint();return n.x=e.clientX,n.y=e.clientY,[(n=n.matrixTransform(t.getScreenCTM().inverse())).x,n.y]}if(t.getBoundingClientRect){var s=t.getBoundingClientRect();return[e.clientX-s.left-t.clientLeft,e.clientY-s.top-t.clientTop]}}return[e.pageX,e.pageY]}i.d(t,{A:()=>n})},6063(e,t,i){"use strict";i.d(t,{A:()=>s});var n=i(64155);function s(e){return"string"==typeof e?new n.LN([[document.querySelector(e)]],[document.documentElement]):new n.LN([[e]],n.zr)}},64155(e,t,i){"use strict";i.d(t,{LN:()=>re,Ay:()=>ae,zr:()=>se});var n=i(68166),s=i(54355);var r=i(99269),o=Array.prototype.find;function a(){return this.firstElementChild}var l=Array.prototype.filter;function c(){return Array.from(this.children)}function h(e){return new Array(e.length)}function d(e,t){this.ownerDocument=e.ownerDocument,this.namespaceURI=e.namespaceURI,this._next=null,this._parent=e,this.__data__=t}function u(e,t,i,n,s,r){for(var o,a=0,l=t.length,c=r.length;a<c;++a)(o=t[a])?(o.__data__=r[a],n[a]=o):i[a]=new d(e,r[a]);for(;a<l;++a)(o=t[a])&&(s[a]=o)}function p(e,t,i,n,s,r,o){var a,l,c,h=new Map,u=t.length,p=r.length,g=new Array(u);for(a=0;a<u;++a)(l=t[a])&&(g[a]=c=o.call(l,l.__data__,a,t)+"",h.has(c)?s[a]=l:h.set(c,l));for(a=0;a<p;++a)c=o.call(e,r[a],a,r)+"",(l=h.get(c))?(n[a]=l,l.__data__=r[a],h.delete(c)):i[a]=new d(e,r[a]);for(a=0;a<u;++a)(l=t[a])&&h.get(g[a])===l&&(s[a]=l)}function g(e){return e.__data__}function f(e){return"object"==typeof e&&"length"in e?e:Array.from(e)}function m(e,t){return e<t?-1:e>t?1:e>=t?0:NaN}d.prototype={constructor:d,appendChild:function(e){return this._parent.insertBefore(e,this._next)},insertBefore:function(e,t){return this._parent.insertBefore(e,t)},querySelector:function(e){return this._parent.querySelector(e)},querySelectorAll:function(e){return this._parent.querySelectorAll(e)}};var v=i(39276);function y(e){return function(){this.removeAttribute(e)}}function C(e){return function(){this.removeAttributeNS(e.space,e.local)}}function b(e,t){return function(){this.setAttribute(e,t)}}function S(e,t){return function(){this.setAttributeNS(e.space,e.local,t)}}function w(e,t){return function(){var i=t.apply(this,arguments);null==i?this.removeAttribute(e):this.setAttribute(e,i)}}function x(e,t){return function(){var i=t.apply(this,arguments);null==i?this.removeAttributeNS(e.space,e.local):this.setAttributeNS(e.space,e.local,i)}}var E=i(37915);function M(e){return function(){delete this[e]}}function A(e,t){return function(){this[e]=t}}function T(e,t){return function(){var i=t.apply(this,arguments);null==i?delete this[e]:this[e]=i}}function D(e){return e.trim().split(/^|\s+/)}function I(e){return e.classList||new R(e)}function R(e){this._node=e,this._names=D(e.getAttribute("class")||"")}function L(e,t){for(var i=I(e),n=-1,s=t.length;++n<s;)i.add(t[n])}function k(e,t){for(var i=I(e),n=-1,s=t.length;++n<s;)i.remove(t[n])}function P(e){return function(){L(this,e)}}function N(e){return function(){k(this,e)}}function O(e,t){return function(){(t.apply(this,arguments)?L:k)(this,e)}}function _(){this.textContent=""}function F(e){return function(){this.textContent=e}}function G(e){return function(){var t=e.apply(this,arguments);this.textContent=null==t?"":t}}function V(){this.innerHTML=""}function B(e){return function(){this.innerHTML=e}}function H(e){return function(){var t=e.apply(this,arguments);this.innerHTML=null==t?"":t}}function z(){this.nextSibling&&this.parentNode.appendChild(this)}function U(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}R.prototype={add:function(e){this._names.indexOf(e)<0&&(this._names.push(e),this._node.setAttribute("class",this._names.join(" ")))},remove:function(e){var t=this._names.indexOf(e);t>=0&&(this._names.splice(t,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(e){return this._names.indexOf(e)>=0}};var W=i(27683);function j(e){return function(){var t=this.ownerDocument,i=this.namespaceURI;return i===W.g&&t.documentElement.namespaceURI===W.g?t.createElement(e):t.createElementNS(i,e)}}function K(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function $(e){var t=(0,v.A)(e);return(t.local?K:j)(t)}function Y(){return null}function q(){var e=this.parentNode;e&&e.removeChild(this)}function X(){var e=this.cloneNode(!1),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function Z(){var e=this.cloneNode(!0),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function Q(e){return function(){var t=this.__on;if(t){for(var i,n=0,s=-1,r=t.length;n<r;++n)i=t[n],e.type&&i.type!==e.type||i.name!==e.name?t[++s]=i:this.removeEventListener(i.type,i.listener,i.options);++s?t.length=s:delete this.__on}}}function J(e,t,i){return function(){var n,s=this.__on,r=function(e){return function(t){e.call(this,t,this.__data__)}}(t);if(s)for(var o=0,a=s.length;o<a;++o)if((n=s[o]).type===e.type&&n.name===e.name)return this.removeEventListener(n.type,n.listener,n.options),this.addEventListener(n.type,n.listener=r,n.options=i),void(n.value=t);this.addEventListener(e.type,r,i),n={type:e.type,name:e.name,value:t,listener:r,options:i},s?s.push(n):this.__on=[n]}}var ee=i(46515);function te(e,t,i){var n=(0,ee.A)(e),s=n.CustomEvent;"function"==typeof s?s=new s(t,i):(s=n.document.createEvent("Event"),i?(s.initEvent(t,i.bubbles,i.cancelable),s.detail=i.detail):s.initEvent(t,!1,!1)),e.dispatchEvent(s)}function ie(e,t){return function(){return te(this,e,t)}}function ne(e,t){return function(){return te(this,e,t.apply(this,arguments))}}var se=[null];function re(e,t){this._groups=e,this._parents=t}function oe(){return new re([[document.documentElement]],se)}re.prototype=oe.prototype={constructor:re,select:function(e){"function"!=typeof e&&(e=(0,n.A)(e));for(var t=this._groups,i=t.length,s=new Array(i),r=0;r<i;++r)for(var o,a,l=t[r],c=l.length,h=s[r]=new Array(c),d=0;d<c;++d)(o=l[d])&&(a=e.call(o,o.__data__,d,l))&&("__data__"in o&&(a.__data__=o.__data__),h[d]=a);return new re(s,this._parents)},selectAll:function(e){e="function"==typeof e?function(e){return function(){return null==(t=e.apply(this,arguments))?[]:Array.isArray(t)?t:Array.from(t);var t}}(e):(0,s.A)(e);for(var t=this._groups,i=t.length,n=[],r=[],o=0;o<i;++o)for(var a,l=t[o],c=l.length,h=0;h<c;++h)(a=l[h])&&(n.push(e.call(a,a.__data__,h,l)),r.push(a));return new re(n,r)},selectChild:function(e){return this.select(null==e?a:function(e){return function(){return o.call(this.children,e)}}("function"==typeof e?e:(0,r.j)(e)))},selectChildren:function(e){return this.selectAll(null==e?c:function(e){return function(){return l.call(this.children,e)}}("function"==typeof e?e:(0,r.j)(e)))},filter:function(e){"function"!=typeof e&&(e=(0,r.A)(e));for(var t=this._groups,i=t.length,n=new Array(i),s=0;s<i;++s)for(var o,a=t[s],l=a.length,c=n[s]=[],h=0;h<l;++h)(o=a[h])&&e.call(o,o.__data__,h,a)&&c.push(o);return new re(n,this._parents)},data:function(e,t){if(!arguments.length)return Array.from(this,g);var i,n=t?p:u,s=this._parents,r=this._groups;"function"!=typeof e&&(i=e,e=function(){return i});for(var o=r.length,a=new Array(o),l=new Array(o),c=new Array(o),h=0;h<o;++h){var d=s[h],m=r[h],v=m.length,y=f(e.call(d,d&&d.__data__,h,s)),C=y.length,b=l[h]=new Array(C),S=a[h]=new Array(C);n(d,m,b,S,c[h]=new Array(v),y,t);for(var w,x,E=0,M=0;E<C;++E)if(w=b[E]){for(E>=M&&(M=E+1);!(x=S[M])&&++M<C;);w._next=x||null}}return(a=new re(a,s))._enter=l,a._exit=c,a},enter:function(){return new re(this._enter||this._groups.map(h),this._parents)},exit:function(){return new re(this._exit||this._groups.map(h),this._parents)},join:function(e,t,i){var n=this.enter(),s=this,r=this.exit();return"function"==typeof e?(n=e(n))&&(n=n.selection()):n=n.append(e+""),null!=t&&(s=t(s))&&(s=s.selection()),null==i?r.remove():i(r),n&&s?n.merge(s).order():s},merge:function(e){for(var t=e.selection?e.selection():e,i=this._groups,n=t._groups,s=i.length,r=n.length,o=Math.min(s,r),a=new Array(s),l=0;l<o;++l)for(var c,h=i[l],d=n[l],u=h.length,p=a[l]=new Array(u),g=0;g<u;++g)(c=h[g]||d[g])&&(p[g]=c);for(;l<s;++l)a[l]=i[l];return new re(a,this._parents)},selection:function(){return this},order:function(){for(var e=this._groups,t=-1,i=e.length;++t<i;)for(var n,s=e[t],r=s.length-1,o=s[r];--r>=0;)(n=s[r])&&(o&&4^n.compareDocumentPosition(o)&&o.parentNode.insertBefore(n,o),o=n);return this},sort:function(e){function t(t,i){return t&&i?e(t.__data__,i.__data__):!t-!i}e||(e=m);for(var i=this._groups,n=i.length,s=new Array(n),r=0;r<n;++r){for(var o,a=i[r],l=a.length,c=s[r]=new Array(l),h=0;h<l;++h)(o=a[h])&&(c[h]=o);c.sort(t)}return new re(s,this._parents).order()},call:function(){var e=arguments[0];return arguments[0]=this,e.apply(null,arguments),this},nodes:function(){return Array.from(this)},node:function(){for(var e=this._groups,t=0,i=e.length;t<i;++t)for(var n=e[t],s=0,r=n.length;s<r;++s){var o=n[s];if(o)return o}return null},size:function(){let e=0;for(const t of this)++e;return e},empty:function(){return!this.node()},each:function(e){for(var t=this._groups,i=0,n=t.length;i<n;++i)for(var s,r=t[i],o=0,a=r.length;o<a;++o)(s=r[o])&&e.call(s,s.__data__,o,r);return this},attr:function(e,t){var i=(0,v.A)(e);if(arguments.length<2){var n=this.node();return i.local?n.getAttributeNS(i.space,i.local):n.getAttribute(i)}return this.each((null==t?i.local?C:y:"function"==typeof t?i.local?x:w:i.local?S:b)(i,t))},style:E.A,property:function(e,t){return arguments.length>1?this.each((null==t?M:"function"==typeof t?T:A)(e,t)):this.node()[e]},classed:function(e,t){var i=D(e+"");if(arguments.length<2){for(var n=I(this.node()),s=-1,r=i.length;++s<r;)if(!n.contains(i[s]))return!1;return!0}return this.each(("function"==typeof t?O:t?P:N)(i,t))},text:function(e){return arguments.length?this.each(null==e?_:("function"==typeof e?G:F)(e)):this.node().textContent},html:function(e){return arguments.length?this.each(null==e?V:("function"==typeof e?H:B)(e)):this.node().innerHTML},raise:function(){return this.each(z)},lower:function(){return this.each(U)},append:function(e){var t="function"==typeof e?e:$(e);return this.select(function(){return this.appendChild(t.apply(this,arguments))})},insert:function(e,t){var i="function"==typeof e?e:$(e),s=null==t?Y:"function"==typeof t?t:(0,n.A)(t);return this.select(function(){return this.insertBefore(i.apply(this,arguments),s.apply(this,arguments)||null)})},remove:function(){return this.each(q)},clone:function(e){return this.select(e?Z:X)},datum:function(e){return arguments.length?this.property("__data__",e):this.node().__data__},on:function(e,t,i){var n,s,r=function(e){return e.trim().split(/^|\s+/).map(function(e){var t="",i=e.indexOf(".");return i>=0&&(t=e.slice(i+1),e=e.slice(0,i)),{type:e,name:t}})}(e+""),o=r.length;if(!(arguments.length<2)){for(a=t?J:Q,n=0;n<o;++n)this.each(a(r[n],t,i));return this}var a=this.node().__on;if(a)for(var l,c=0,h=a.length;c<h;++c)for(n=0,l=a[c];n<o;++n)if((s=r[n]).type===l.type&&s.name===l.name)return l.value},dispatch:function(e,t){return this.each(("function"==typeof t?ne:ie)(e,t))},[Symbol.iterator]:function*(){for(var e=this._groups,t=0,i=e.length;t<i;++t)for(var n,s=e[t],r=0,o=s.length;r<o;++r)(n=s[r])&&(yield n)}};const ae=oe},37915(e,t,i){"use strict";i.d(t,{A:()=>a,j:()=>l});var n=i(46515);function s(e){return function(){this.style.removeProperty(e)}}function r(e,t,i){return function(){this.style.setProperty(e,t,i)}}function o(e,t,i){return function(){var n=t.apply(this,arguments);null==n?this.style.removeProperty(e):this.style.setProperty(e,n,i)}}function a(e,t,i){return arguments.length>1?this.each((null==t?s:"function"==typeof t?o:r)(e,t,null==i?"":i)):l(this.node(),e)}function l(e,t){return e.style.getPropertyValue(t)||(0,n.A)(e).getComputedStyle(e,null).getPropertyValue(t)}},68166(e,t,i){"use strict";function n(){}function s(e){return null==e?n:function(){return this.querySelector(e)}}i.d(t,{A:()=>s})},54355(e,t,i){"use strict";function n(){return[]}function s(e){return null==e?n:function(){return this.querySelectorAll(e)}}i.d(t,{A:()=>s})},46515(e,t,i){"use strict";function n(e){return e.ownerDocument&&e.ownerDocument.defaultView||e.document&&e||e.defaultView}i.d(t,{A:()=>n})},17076(e,t,i){"use strict";i.d(t,{s_:()=>Pe,GS:()=>xe,_V:()=>Ee});var n,s,r=i(54560),o=i(37572),a=i(96785),l=i(6063),c=i(60616),h=i(64155),d=0,u=0,p=0,g=0,f=0,m=0,v="object"==typeof performance&&performance.now?performance:Date,y="object"==typeof window&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(e){setTimeout(e,17)};function C(){return f||(y(b),f=v.now()+m)}function b(){f=0}function S(){this._call=this._time=this._next=null}function w(e,t,i){var n=new S;return n.restart(e,t,i),n}function x(){f=(g=v.now())+m,d=u=0;try{!function(){C(),++d;for(var e,t=n;t;)(e=f-t._time)>=0&&t._call.call(void 0,e),t=t._next;--d}()}finally{d=0,function(){for(var e,t,i=n,r=1/0;i;)i._call?(r>i._time&&(r=i._time),e=i,i=i._next):(t=i._next,i._next=null,i=e?e._next=t:n=t);s=e,M(r)}(),f=0}}function E(){var e=v.now(),t=e-g;t>1e3&&(m-=t,g=e)}function M(e){d||(u&&(u=clearTimeout(u)),e-f>24?(e<1/0&&(u=setTimeout(x,e-v.now()-m)),p&&(p=clearInterval(p))):(p||(g=v.now(),p=setInterval(E,1e3)),d=1,y(x)))}function A(e,t,i){var n=new S;return t=null==t?0:+t,n.restart(i=>{n.stop(),e(i+t)},t,i),n}S.prototype=w.prototype={constructor:S,restart:function(e,t,i){if("function"!=typeof e)throw new TypeError("callback is not a function");i=(null==i?C():+i)+(null==t?0:+t),this._next||s===this||(s?s._next=this:n=this,s=this),this._call=e,this._time=i,M()},stop:function(){this._call&&(this._call=null,this._time=1/0,M())}};var T=(0,r.A)("start","end","cancel","interrupt"),D=[];function I(e,t,i,n,s,r){var o=e.__transition;if(o){if(i in o)return}else e.__transition={};!function(e,t,i){var n,s=e.__transition;function r(l){var c,h,d,u;if(1!==i.state)return a();for(c in s)if((u=s[c]).name===i.name){if(3===u.state)return A(r);4===u.state?(u.state=6,u.timer.stop(),u.on.call("interrupt",e,e.__data__,u.index,u.group),delete s[c]):+c<t&&(u.state=6,u.timer.stop(),u.on.call("cancel",e,e.__data__,u.index,u.group),delete s[c])}if(A(function(){3===i.state&&(i.state=4,i.timer.restart(o,i.delay,i.time),o(l))}),i.state=2,i.on.call("start",e,e.__data__,i.index,i.group),2===i.state){for(i.state=3,n=new Array(d=i.tween.length),c=0,h=-1;c<d;++c)(u=i.tween[c].value.call(e,e.__data__,i.index,i.group))&&(n[++h]=u);n.length=h+1}}function o(t){for(var s=t<i.duration?i.ease.call(null,t/i.duration):(i.timer.restart(a),i.state=5,1),r=-1,o=n.length;++r<o;)n[r].call(e,s);5===i.state&&(i.on.call("end",e,e.__data__,i.index,i.group),a())}function a(){for(var n in i.state=6,i.timer.stop(),delete s[t],s)return;delete e.__transition}s[t]=i,i.timer=w(function(e){i.state=1,i.timer.restart(r,i.delay,i.time),i.delay<=e&&r(e-i.delay)},0,i.time)}(e,i,{name:t,index:n,group:s,on:T,tween:D,time:r.time,delay:r.delay,duration:r.duration,ease:r.ease,timer:null,state:0})}function R(e,t){var i=k(e,t);if(i.state>0)throw new Error("too late; already scheduled");return i}function L(e,t){var i=k(e,t);if(i.state>3)throw new Error("too late; already running");return i}function k(e,t){var i=e.__transition;if(!i||!(i=i[t]))throw new Error("transition not found");return i}function P(e,t){var i,n,s,r=e.__transition,o=!0;if(r){for(s in t=null==t?null:t+"",r)(i=r[s]).name===t?(n=i.state>2&&i.state<5,i.state=6,i.timer.stop(),i.on.call(n?"interrupt":"cancel",e,e.__data__,i.index,i.group),delete r[s]):o=!1;o&&delete e.__transition}}var N,O=i(77419),_=180/Math.PI,F={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function G(e,t,i,n,s,r){var o,a,l;return(o=Math.sqrt(e*e+t*t))&&(e/=o,t/=o),(l=e*i+t*n)&&(i-=e*l,n-=t*l),(a=Math.sqrt(i*i+n*n))&&(i/=a,n/=a,l/=a),e*n<t*i&&(e=-e,t=-t,l=-l,o=-o),{translateX:s,translateY:r,rotate:Math.atan2(t,e)*_,skewX:Math.atan(l)*_,scaleX:o,scaleY:a}}function V(e,t,i,n){function s(e){return e.length?e.pop()+" ":""}return function(r,o){var a=[],l=[];return r=e(r),o=e(o),function(e,n,s,r,o,a){if(e!==s||n!==r){var l=o.push("translate(",null,t,null,i);a.push({i:l-4,x:(0,O.A)(e,s)},{i:l-2,x:(0,O.A)(n,r)})}else(s||r)&&o.push("translate("+s+t+r+i)}(r.translateX,r.translateY,o.translateX,o.translateY,a,l),function(e,t,i,r){e!==t?(e-t>180?t+=360:t-e>180&&(e+=360),r.push({i:i.push(s(i)+"rotate(",null,n)-2,x:(0,O.A)(e,t)})):t&&i.push(s(i)+"rotate("+t+n)}(r.rotate,o.rotate,a,l),function(e,t,i,r){e!==t?r.push({i:i.push(s(i)+"skewX(",null,n)-2,x:(0,O.A)(e,t)}):t&&i.push(s(i)+"skewX("+t+n)}(r.skewX,o.skewX,a,l),function(e,t,i,n,r,o){if(e!==i||t!==n){var a=r.push(s(r)+"scale(",null,",",null,")");o.push({i:a-4,x:(0,O.A)(e,i)},{i:a-2,x:(0,O.A)(t,n)})}else 1===i&&1===n||r.push(s(r)+"scale("+i+","+n+")")}(r.scaleX,r.scaleY,o.scaleX,o.scaleY,a,l),r=o=null,function(e){for(var t,i=-1,n=l.length;++i<n;)a[(t=l[i]).i]=t.x(e);return a.join("")}}}var B=V(function(e){const t=new("function"==typeof DOMMatrix?DOMMatrix:WebKitCSSMatrix)(e+"");return t.isIdentity?F:G(t.a,t.b,t.c,t.d,t.e,t.f)},"px, ","px)","deg)"),H=V(function(e){return null==e?F:(N||(N=document.createElementNS("http://www.w3.org/2000/svg","g")),N.setAttribute("transform",e),(e=N.transform.baseVal.consolidate())?G((e=e.matrix).a,e.b,e.c,e.d,e.e,e.f):F)},", ",")",")"),z=i(39276);function U(e,t){var i,n;return function(){var s=L(this,e),r=s.tween;if(r!==i)for(var o=0,a=(n=i=r).length;o<a;++o)if(n[o].name===t){(n=n.slice()).splice(o,1);break}s.tween=n}}function W(e,t,i){var n,s;if("function"!=typeof i)throw new Error;return function(){var r=L(this,e),o=r.tween;if(o!==n){s=(n=o).slice();for(var a={name:t,value:i},l=0,c=s.length;l<c;++l)if(s[l].name===t){s[l]=a;break}l===c&&s.push(a)}r.tween=s}}function j(e,t,i){var n=e._id;return e.each(function(){var e=L(this,n);(e.value||(e.value={}))[t]=i.apply(this,arguments)}),function(e){return k(e,n).value[t]}}var K=i(52413),$=i(92795),Y=i(20835);function q(e,t){var i;return("number"==typeof t?O.A:t instanceof K.Ay?$.Ay:(i=(0,K.Ay)(t))?(t=i,$.Ay):Y.A)(e,t)}function X(e){return function(){this.removeAttribute(e)}}function Z(e){return function(){this.removeAttributeNS(e.space,e.local)}}function Q(e,t,i){var n,s,r=i+"";return function(){var o=this.getAttribute(e);return o===r?null:o===n?s:s=t(n=o,i)}}function J(e,t,i){var n,s,r=i+"";return function(){var o=this.getAttributeNS(e.space,e.local);return o===r?null:o===n?s:s=t(n=o,i)}}function ee(e,t,i){var n,s,r;return function(){var o,a,l=i(this);if(null!=l)return(o=this.getAttribute(e))===(a=l+"")?null:o===n&&a===s?r:(s=a,r=t(n=o,l));this.removeAttribute(e)}}function te(e,t,i){var n,s,r;return function(){var o,a,l=i(this);if(null!=l)return(o=this.getAttributeNS(e.space,e.local))===(a=l+"")?null:o===n&&a===s?r:(s=a,r=t(n=o,l));this.removeAttributeNS(e.space,e.local)}}function ie(e,t){var i,n;function s(){var s=t.apply(this,arguments);return s!==n&&(i=(n=s)&&function(e,t){return function(i){this.setAttributeNS(e.space,e.local,t.call(this,i))}}(e,s)),i}return s._value=t,s}function ne(e,t){var i,n;function s(){var s=t.apply(this,arguments);return s!==n&&(i=(n=s)&&function(e,t){return function(i){this.setAttribute(e,t.call(this,i))}}(e,s)),i}return s._value=t,s}function se(e,t){return function(){R(this,e).delay=+t.apply(this,arguments)}}function re(e,t){return t=+t,function(){R(this,e).delay=t}}function oe(e,t){return function(){L(this,e).duration=+t.apply(this,arguments)}}function ae(e,t){return t=+t,function(){L(this,e).duration=t}}var le=i(99269),ce=i(68166),he=i(54355),de=h.Ay.prototype.constructor,ue=i(37915);function pe(e){return function(){this.style.removeProperty(e)}}var ge=0;function fe(e,t,i,n){this._groups=e,this._parents=t,this._name=i,this._id=n}function me(){return++ge}var ve=h.Ay.prototype;fe.prototype=function(e){return(0,h.Ay)().transition(e)}.prototype={constructor:fe,select:function(e){var t=this._name,i=this._id;"function"!=typeof e&&(e=(0,ce.A)(e));for(var n=this._groups,s=n.length,r=new Array(s),o=0;o<s;++o)for(var a,l,c=n[o],h=c.length,d=r[o]=new Array(h),u=0;u<h;++u)(a=c[u])&&(l=e.call(a,a.__data__,u,c))&&("__data__"in a&&(l.__data__=a.__data__),d[u]=l,I(d[u],t,i,u,d,k(a,i)));return new fe(r,this._parents,t,i)},selectAll:function(e){var t=this._name,i=this._id;"function"!=typeof e&&(e=(0,he.A)(e));for(var n=this._groups,s=n.length,r=[],o=[],a=0;a<s;++a)for(var l,c=n[a],h=c.length,d=0;d<h;++d)if(l=c[d]){for(var u,p=e.call(l,l.__data__,d,c),g=k(l,i),f=0,m=p.length;f<m;++f)(u=p[f])&&I(u,t,i,f,p,g);r.push(p),o.push(l)}return new fe(r,o,t,i)},selectChild:ve.selectChild,selectChildren:ve.selectChildren,filter:function(e){"function"!=typeof e&&(e=(0,le.A)(e));for(var t=this._groups,i=t.length,n=new Array(i),s=0;s<i;++s)for(var r,o=t[s],a=o.length,l=n[s]=[],c=0;c<a;++c)(r=o[c])&&e.call(r,r.__data__,c,o)&&l.push(r);return new fe(n,this._parents,this._name,this._id)},merge:function(e){if(e._id!==this._id)throw new Error;for(var t=this._groups,i=e._groups,n=t.length,s=i.length,r=Math.min(n,s),o=new Array(n),a=0;a<r;++a)for(var l,c=t[a],h=i[a],d=c.length,u=o[a]=new Array(d),p=0;p<d;++p)(l=c[p]||h[p])&&(u[p]=l);for(;a<n;++a)o[a]=t[a];return new fe(o,this._parents,this._name,this._id)},selection:function(){return new de(this._groups,this._parents)},transition:function(){for(var e=this._name,t=this._id,i=me(),n=this._groups,s=n.length,r=0;r<s;++r)for(var o,a=n[r],l=a.length,c=0;c<l;++c)if(o=a[c]){var h=k(o,t);I(o,e,i,c,a,{time:h.time+h.delay+h.duration,delay:0,duration:h.duration,ease:h.ease})}return new fe(n,this._parents,e,i)},call:ve.call,nodes:ve.nodes,node:ve.node,size:ve.size,empty:ve.empty,each:ve.each,on:function(e,t){var i=this._id;return arguments.length<2?k(this.node(),i).on.on(e):this.each(function(e,t,i){var n,s,r=function(e){return(e+"").trim().split(/^|\s+/).every(function(e){var t=e.indexOf(".");return t>=0&&(e=e.slice(0,t)),!e||"start"===e})}(t)?R:L;return function(){var o=r(this,e),a=o.on;a!==n&&(s=(n=a).copy()).on(t,i),o.on=s}}(i,e,t))},attr:function(e,t){var i=(0,z.A)(e),n="transform"===i?H:q;return this.attrTween(e,"function"==typeof t?(i.local?te:ee)(i,n,j(this,"attr."+e,t)):null==t?(i.local?Z:X)(i):(i.local?J:Q)(i,n,t))},attrTween:function(e,t){var i="attr."+e;if(arguments.length<2)return(i=this.tween(i))&&i._value;if(null==t)return this.tween(i,null);if("function"!=typeof t)throw new Error;var n=(0,z.A)(e);return this.tween(i,(n.local?ie:ne)(n,t))},style:function(e,t,i){var n="transform"==(e+="")?B:q;return null==t?this.styleTween(e,function(e,t){var i,n,s;return function(){var r=(0,ue.j)(this,e),o=(this.style.removeProperty(e),(0,ue.j)(this,e));return r===o?null:r===i&&o===n?s:s=t(i=r,n=o)}}(e,n)).on("end.style."+e,pe(e)):"function"==typeof t?this.styleTween(e,function(e,t,i){var n,s,r;return function(){var o=(0,ue.j)(this,e),a=i(this),l=a+"";return null==a&&(this.style.removeProperty(e),l=a=(0,ue.j)(this,e)),o===l?null:o===n&&l===s?r:(s=l,r=t(n=o,a))}}(e,n,j(this,"style."+e,t))).each(function(e,t){var i,n,s,r,o="style."+t,a="end."+o;return function(){var l=L(this,e),c=l.on,h=null==l.value[o]?r||(r=pe(t)):void 0;c===i&&s===h||(n=(i=c).copy()).on(a,s=h),l.on=n}}(this._id,e)):this.styleTween(e,function(e,t,i){var n,s,r=i+"";return function(){var o=(0,ue.j)(this,e);return o===r?null:o===n?s:s=t(n=o,i)}}(e,n,t),i).on("end.style."+e,null)},styleTween:function(e,t,i){var n="style."+(e+="");if(arguments.length<2)return(n=this.tween(n))&&n._value;if(null==t)return this.tween(n,null);if("function"!=typeof t)throw new Error;return this.tween(n,function(e,t,i){var n,s;function r(){var r=t.apply(this,arguments);return r!==s&&(n=(s=r)&&function(e,t,i){return function(n){this.style.setProperty(e,t.call(this,n),i)}}(e,r,i)),n}return r._value=t,r}(e,t,null==i?"":i))},text:function(e){return this.tween("text","function"==typeof e?function(e){return function(){var t=e(this);this.textContent=null==t?"":t}}(j(this,"text",e)):function(e){return function(){this.textContent=e}}(null==e?"":e+""))},textTween:function(e){var t="text";if(arguments.length<1)return(t=this.tween(t))&&t._value;if(null==e)return this.tween(t,null);if("function"!=typeof e)throw new Error;return this.tween(t,function(e){var t,i;function n(){var n=e.apply(this,arguments);return n!==i&&(t=(i=n)&&function(e){return function(t){this.textContent=e.call(this,t)}}(n)),t}return n._value=e,n}(e))},remove:function(){return this.on("end.remove",function(e){return function(){var t=this.parentNode;for(var i in this.__transition)if(+i!==e)return;t&&t.removeChild(this)}}(this._id))},tween:function(e,t){var i=this._id;if(e+="",arguments.length<2){for(var n,s=k(this.node(),i).tween,r=0,o=s.length;r<o;++r)if((n=s[r]).name===e)return n.value;return null}return this.each((null==t?U:W)(i,e,t))},delay:function(e){var t=this._id;return arguments.length?this.each(("function"==typeof e?se:re)(t,e)):k(this.node(),t).delay},duration:function(e){var t=this._id;return arguments.length?this.each(("function"==typeof e?oe:ae)(t,e)):k(this.node(),t).duration},ease:function(e){var t=this._id;return arguments.length?this.each(function(e,t){if("function"!=typeof t)throw new Error;return function(){L(this,e).ease=t}}(t,e)):k(this.node(),t).ease},easeVarying:function(e){if("function"!=typeof e)throw new Error;return this.each(function(e,t){return function(){var i=t.apply(this,arguments);if("function"!=typeof i)throw new Error;L(this,e).ease=i}}(this._id,e))},end:function(){var e,t,i=this,n=i._id,s=i.size();return new Promise(function(r,o){var a={value:o},l={value:function(){0===--s&&r()}};i.each(function(){var i=L(this,n),s=i.on;s!==e&&((t=(e=s).copy())._.cancel.push(a),t._.interrupt.push(a),t._.end.push(l)),i.on=t}),0===s&&r()})},[Symbol.iterator]:ve[Symbol.iterator]};var ye={time:null,delay:0,duration:250,ease:function(e){return((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2}};function Ce(e,t){for(var i;!(i=e.__transition)||!(i=i[t]);)if(!(e=e.parentNode))throw new Error(`transition ${t} not found`);return i}h.Ay.prototype.interrupt=function(e){return this.each(function(){P(this,e)})},h.Ay.prototype.transition=function(e){var t,i;e instanceof fe?(t=e._id,e=e._name):(t=me(),(i=ye).time=C(),e=null==e?null:e+"");for(var n=this._groups,s=n.length,r=0;r<s;++r)for(var o,a=n[r],l=a.length,c=0;c<l;++c)(o=a[c])&&I(o,e,t,c,a,i||Ce(o,t));return new fe(n,this._parents,e,t)};const be=e=>()=>e;function Se(e,{sourceEvent:t,target:i,transform:n,dispatch:s}){Object.defineProperties(this,{type:{value:e,enumerable:!0,configurable:!0},sourceEvent:{value:t,enumerable:!0,configurable:!0},target:{value:i,enumerable:!0,configurable:!0},transform:{value:n,enumerable:!0,configurable:!0},_:{value:s}})}function we(e,t,i){this.k=e,this.x=t,this.y=i}we.prototype={constructor:we,scale:function(e){return 1===e?this:new we(this.k*e,this.x,this.y)},translate:function(e,t){return 0===e&0===t?this:new we(this.k,this.x+this.k*e,this.y+this.k*t)},apply:function(e){return[e[0]*this.k+this.x,e[1]*this.k+this.y]},applyX:function(e){return e*this.k+this.x},applyY:function(e){return e*this.k+this.y},invert:function(e){return[(e[0]-this.x)/this.k,(e[1]-this.y)/this.k]},invertX:function(e){return(e-this.x)/this.k},invertY:function(e){return(e-this.y)/this.k},rescaleX:function(e){return e.copy().domain(e.range().map(this.invertX,this).map(e.invert,e))},rescaleY:function(e){return e.copy().domain(e.range().map(this.invertY,this).map(e.invert,e))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}};var xe=new we(1,0,0);function Ee(e){for(;!e.__zoom;)if(!(e=e.parentNode))return xe;return e.__zoom}function Me(e){e.stopImmediatePropagation()}function Ae(e){e.preventDefault(),e.stopImmediatePropagation()}function Te(e){return!(e.ctrlKey&&"wheel"!==e.type||e.button)}function De(){var e=this;return e instanceof SVGElement?(e=e.ownerSVGElement||e).hasAttribute("viewBox")?[[(e=e.viewBox.baseVal).x,e.y],[e.x+e.width,e.y+e.height]]:[[0,0],[e.width.baseVal.value,e.height.baseVal.value]]:[[0,0],[e.clientWidth,e.clientHeight]]}function Ie(){return this.__zoom||xe}function Re(e){return-e.deltaY*(1===e.deltaMode?.05:e.deltaMode?1:.002)*(e.ctrlKey?10:1)}function Le(){return navigator.maxTouchPoints||"ontouchstart"in this}function ke(e,t,i){var n=e.invertX(t[0][0])-i[0][0],s=e.invertX(t[1][0])-i[1][0],r=e.invertY(t[0][1])-i[0][1],o=e.invertY(t[1][1])-i[1][1];return e.translate(s>n?(n+s)/2:Math.min(0,n)||Math.max(0,s),o>r?(r+o)/2:Math.min(0,r)||Math.max(0,o))}function Pe(){var e,t,i,n=Te,s=De,h=ke,d=Re,u=Le,p=[0,1/0],g=[[-1/0,-1/0],[1/0,1/0]],f=250,m=a.A,v=(0,r.A)("start","zoom","end"),y=0,C=10;function b(e){e.property("__zoom",Ie).on("wheel.zoom",T,{passive:!1}).on("mousedown.zoom",D).on("dblclick.zoom",I).filter(u).on("touchstart.zoom",R).on("touchmove.zoom",L).on("touchend.zoom touchcancel.zoom",k).style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function S(e,t){return(t=Math.max(p[0],Math.min(p[1],t)))===e.k?e:new we(t,e.x,e.y)}function w(e,t,i){var n=t[0]-i[0]*e.k,s=t[1]-i[1]*e.k;return n===e.x&&s===e.y?e:new we(e.k,n,s)}function x(e){return[(+e[0][0]+ +e[1][0])/2,(+e[0][1]+ +e[1][1])/2]}function E(e,t,i,n){e.on("start.zoom",function(){M(this,arguments).event(n).start()}).on("interrupt.zoom end.zoom",function(){M(this,arguments).event(n).end()}).tween("zoom",function(){var e=this,r=arguments,o=M(e,r).event(n),a=s.apply(e,r),l=null==i?x(a):"function"==typeof i?i.apply(e,r):i,c=Math.max(a[1][0]-a[0][0],a[1][1]-a[0][1]),h=e.__zoom,d="function"==typeof t?t.apply(e,r):t,u=m(h.invert(l).concat(c/h.k),d.invert(l).concat(c/d.k));return function(e){if(1===e)e=d;else{var t=u(e),i=c/t[2];e=new we(i,l[0]-t[0]*i,l[1]-t[1]*i)}o.zoom(null,e)}})}function M(e,t,i){return!i&&e.__zooming||new A(e,t)}function A(e,t){this.that=e,this.args=t,this.active=0,this.sourceEvent=null,this.extent=s.apply(e,t),this.taps=0}function T(e,...t){if(n.apply(this,arguments)){var i=M(this,t).event(e),s=this.__zoom,r=Math.max(p[0],Math.min(p[1],s.k*Math.pow(2,d.apply(this,arguments)))),o=(0,c.A)(e);if(i.wheel)i.mouse[0][0]===o[0]&&i.mouse[0][1]===o[1]||(i.mouse[1]=s.invert(i.mouse[0]=o)),clearTimeout(i.wheel);else{if(s.k===r)return;i.mouse=[o,s.invert(o)],P(this),i.start()}Ae(e),i.wheel=setTimeout(function(){i.wheel=null,i.end()},150),i.zoom("mouse",h(w(S(s,r),i.mouse[0],i.mouse[1]),i.extent,g))}}function D(e,...t){if(!i&&n.apply(this,arguments)){var s=e.currentTarget,r=M(this,t,!0).event(e),a=(0,l.A)(e.view).on("mousemove.zoom",function(e){if(Ae(e),!r.moved){var t=e.clientX-u,i=e.clientY-p;r.moved=t*t+i*i>y}r.event(e).zoom("mouse",h(w(r.that.__zoom,r.mouse[0]=(0,c.A)(e,s),r.mouse[1]),r.extent,g))},!0).on("mouseup.zoom",function(e){a.on("mousemove.zoom mouseup.zoom",null),(0,o.y)(e.view,r.moved),Ae(e),r.event(e).end()},!0),d=(0,c.A)(e,s),u=e.clientX,p=e.clientY;(0,o.A)(e.view),Me(e),r.mouse=[d,this.__zoom.invert(d)],P(this),r.start()}}function I(e,...t){if(n.apply(this,arguments)){var i=this.__zoom,r=(0,c.A)(e.changedTouches?e.changedTouches[0]:e,this),o=i.invert(r),a=i.k*(e.shiftKey?.5:2),d=h(w(S(i,a),r,o),s.apply(this,t),g);Ae(e),f>0?(0,l.A)(this).transition().duration(f).call(E,d,r,e):(0,l.A)(this).call(b.transform,d,r,e)}}function R(i,...s){if(n.apply(this,arguments)){var r,o,a,l,h=i.touches,d=h.length,u=M(this,s,i.changedTouches.length===d).event(i);for(Me(i),o=0;o<d;++o)a=h[o],l=[l=(0,c.A)(a,this),this.__zoom.invert(l),a.identifier],u.touch0?u.touch1||u.touch0[2]===l[2]||(u.touch1=l,u.taps=0):(u.touch0=l,r=!0,u.taps=1+!!e);e&&(e=clearTimeout(e)),r&&(u.taps<2&&(t=l[0],e=setTimeout(function(){e=null},500)),P(this),u.start())}}function L(e,...t){if(this.__zooming){var i,n,s,r,o=M(this,t).event(e),a=e.changedTouches,l=a.length;for(Ae(e),i=0;i<l;++i)n=a[i],s=(0,c.A)(n,this),o.touch0&&o.touch0[2]===n.identifier?o.touch0[0]=s:o.touch1&&o.touch1[2]===n.identifier&&(o.touch1[0]=s);if(n=o.that.__zoom,o.touch1){var d=o.touch0[0],u=o.touch0[1],p=o.touch1[0],f=o.touch1[1],m=(m=p[0]-d[0])*m+(m=p[1]-d[1])*m,v=(v=f[0]-u[0])*v+(v=f[1]-u[1])*v;n=S(n,Math.sqrt(m/v)),s=[(d[0]+p[0])/2,(d[1]+p[1])/2],r=[(u[0]+f[0])/2,(u[1]+f[1])/2]}else{if(!o.touch0)return;s=o.touch0[0],r=o.touch0[1]}o.zoom("touch",h(w(n,s,r),o.extent,g))}}function k(e,...n){if(this.__zooming){var s,r,o=M(this,n).event(e),a=e.changedTouches,h=a.length;for(Me(e),i&&clearTimeout(i),i=setTimeout(function(){i=null},500),s=0;s<h;++s)r=a[s],o.touch0&&o.touch0[2]===r.identifier?delete o.touch0:o.touch1&&o.touch1[2]===r.identifier&&delete o.touch1;if(o.touch1&&!o.touch0&&(o.touch0=o.touch1,delete o.touch1),o.touch0)o.touch0[1]=this.__zoom.invert(o.touch0[0]);else if(o.end(),2===o.taps&&(r=(0,c.A)(r,this),Math.hypot(t[0]-r[0],t[1]-r[1])<C)){var d=(0,l.A)(this).on("dblclick.zoom");d&&d.apply(this,arguments)}}}return b.transform=function(e,t,i,n){var s=e.selection?e.selection():e;s.property("__zoom",Ie),e!==s?E(e,t,i,n):s.interrupt().each(function(){M(this,arguments).event(n).start().zoom(null,"function"==typeof t?t.apply(this,arguments):t).end()})},b.scaleBy=function(e,t,i,n){b.scaleTo(e,function(){return this.__zoom.k*("function"==typeof t?t.apply(this,arguments):t)},i,n)},b.scaleTo=function(e,t,i,n){b.transform(e,function(){var e=s.apply(this,arguments),n=this.__zoom,r=null==i?x(e):"function"==typeof i?i.apply(this,arguments):i,o=n.invert(r),a="function"==typeof t?t.apply(this,arguments):t;return h(w(S(n,a),r,o),e,g)},i,n)},b.translateBy=function(e,t,i,n){b.transform(e,function(){return h(this.__zoom.translate("function"==typeof t?t.apply(this,arguments):t,"function"==typeof i?i.apply(this,arguments):i),s.apply(this,arguments),g)},null,n)},b.translateTo=function(e,t,i,n,r){b.transform(e,function(){var e=s.apply(this,arguments),r=this.__zoom,o=null==n?x(e):"function"==typeof n?n.apply(this,arguments):n;return h(xe.translate(o[0],o[1]).scale(r.k).translate("function"==typeof t?-t.apply(this,arguments):-t,"function"==typeof i?-i.apply(this,arguments):-i),e,g)},n,r)},A.prototype={event:function(e){return e&&(this.sourceEvent=e),this},start:function(){return 1===++this.active&&(this.that.__zooming=this,this.emit("start")),this},zoom:function(e,t){return this.mouse&&"mouse"!==e&&(this.mouse[1]=t.invert(this.mouse[0])),this.touch0&&"touch"!==e&&(this.touch0[1]=t.invert(this.touch0[0])),this.touch1&&"touch"!==e&&(this.touch1[1]=t.invert(this.touch1[0])),this.that.__zoom=t,this.emit("zoom"),this},end:function(){return 0===--this.active&&(delete this.that.__zooming,this.emit("end")),this},emit:function(e){var t=(0,l.A)(this.that).datum();v.call(e,this.that,new Se(e,{sourceEvent:this.sourceEvent,target:b,type:e,transform:this.that.__zoom,dispatch:v}),t)}},b.wheelDelta=function(e){return arguments.length?(d="function"==typeof e?e:be(+e),b):d},b.filter=function(e){return arguments.length?(n="function"==typeof e?e:be(!!e),b):n},b.touchable=function(e){return arguments.length?(u="function"==typeof e?e:be(!!e),b):u},b.extent=function(e){return arguments.length?(s="function"==typeof e?e:be([[+e[0][0],+e[0][1]],[+e[1][0],+e[1][1]]]),b):s},b.scaleExtent=function(e){return arguments.length?(p[0]=+e[0],p[1]=+e[1],b):[p[0],p[1]]},b.translateExtent=function(e){return arguments.length?(g[0][0]=+e[0][0],g[1][0]=+e[1][0],g[0][1]=+e[0][1],g[1][1]=+e[1][1],b):[[g[0][0],g[0][1]],[g[1][0],g[1][1]]]},b.constrain=function(e){return arguments.length?(h=e,b):h},b.duration=function(e){return arguments.length?(f=+e,b):f},b.interpolate=function(e){return arguments.length?(m=e,b):m},b.on=function(){var e=v.on.apply(v,arguments);return e===v?b:e},b.clickDistance=function(e){return arguments.length?(y=(e=+e)*e,b):Math.sqrt(y)},b.tapDistance=function(e){return arguments.length?(C=+e,b):C},b}Ee.prototype=we.prototype},94531(e,t,i){"use strict";i.d(t,{AH:()=>u});let n={data:""},s=e=>{if("object"==typeof window){let t=(e?e.querySelector("#_goober"):window._goober)||Object.assign(document.createElement("style"),{innerHTML:" ",id:"_goober"});return t.nonce=window.__nonce__,t.parentNode||(e||document.head).appendChild(t),t.firstChild}return e||n},r=/(?:([\u0080-\uFFFF\w-%@]+) *:? *([^{;]+?);|([^;}{]*?) *{)|(}\s*)/g,o=/\/\*[^]*?\*\/|  +/g,a=/\n+/g,l=(e,t)=>{let i="",n="",s="";for(let r in e){let o=e[r];"@"==r[0]?"i"==r[1]?i=r+" "+o+";":n+="f"==r[1]?l(o,r):r+"{"+l(o,"k"==r[1]?"":t)+"}":"object"==typeof o?n+=l(o,t?t.replace(/([^,])+/g,e=>r.replace(/([^,]*:\S+\([^)]*\))|([^,])+/g,t=>/&/.test(t)?t.replace(/&/g,e):e?e+" "+t:t)):r):null!=o&&(r=/^--/.test(r)?r:r.replace(/[A-Z]/g,"-$&").toLowerCase(),s+=l.p?l.p(r,o):r+":"+o+";")}return i+(t&&s?t+"{"+s+"}":s)+n},c={},h=e=>{if("object"==typeof e){let t="";for(let i in e)t+=i+h(e[i]);return t}return e},d=(e,t,i,n,s)=>{let d=h(e),u=c[d]||(c[d]=(e=>{let t=0,i=11;for(;t<e.length;)i=101*i+e.charCodeAt(t++)>>>0;return"go"+i})(d));if(!c[u]){let t=d!==e?e:(e=>{let t,i,n=[{}];for(;t=r.exec(e.replace(o,""));)t[4]?n.shift():t[3]?(i=t[3].replace(a," ").trim(),n.unshift(n[0][i]=n[0][i]||{})):n[0][t[1]]=t[2].replace(a," ").trim();return n[0]})(e);c[u]=l(s?{["@keyframes "+u]:t}:t,i?"":"."+u)}let p=i&&c.g?c.g:null;return i&&(c.g=c[u]),((e,t,i,n)=>{n?t.data=t.data.replace(n,e):-1===t.data.indexOf(e)&&(t.data=i?e+t.data:t.data+e)})(c[u],t,n,p),u};function u(e){let t=this||{},i=e.call?e(t.p):e;return d(i.unshift?i.raw?((e,t,i)=>e.reduce((e,n,s)=>{let r=t[s];if(r&&r.call){let e=r(i),t=e&&e.props&&e.props.className||/^go/.test(e)&&e;r=t?"."+t:e&&"object"==typeof e?e.props?"":l(e,""):!1===e?"":e}return e+n+(null==r?"":r)},""))(i,[].slice.call(arguments,1),t.p):i.reduce((e,i)=>Object.assign(e,i&&i.call?i(t.p):i),{}):i,s(t.target),t.g,t.o,t.k)}u.bind({g:1}),u.bind({k:1})},40501(e){"use strict";e.exports=JSON.parse('{"name":"aws-appsync-auth-link","version":"3.0.7","main":"lib/index.js","license":"Apache-2.0","description":"AWS Mobile AppSync Auth Link for JavaScript","author":{"name":"Amazon Web Services","url":"https://aws.amazon.com/"},"homepage":"https://github.com/awslabs/aws-mobile-appsync-sdk-js.git","repository":{"type":"git","url":"https://github.com/awslabs/aws-mobile-appsync-sdk-js.git"},"scripts":{"prepare":"tsc","test":"jest --coverage --coverageReporters=text --passWithNoTests","test-watch":"jest --watch"},"dependencies":{"@aws-crypto/sha256-js":"^1.2.0","@aws-sdk/types":"^3.25.0","@aws-sdk/util-hex-encoding":"^3.29.0","debug":"2.6.9"},"devDependencies":{"@apollo/client":"^3.2.0"},"peerDependencies":{"@apollo/client":"3.x"}}')},3349(e){"use strict";e.exports=JSON.parse('{"aes-128-ecb":{"cipher":"AES","key":128,"iv":0,"mode":"ECB","type":"block"},"aes-192-ecb":{"cipher":"AES","key":192,"iv":0,"mode":"ECB","type":"block"},"aes-256-ecb":{"cipher":"AES","key":256,"iv":0,"mode":"ECB","type":"block"},"aes-128-cbc":{"cipher":"AES","key":128,"iv":16,"mode":"CBC","type":"block"},"aes-192-cbc":{"cipher":"AES","key":192,"iv":16,"mode":"CBC","type":"block"},"aes-256-cbc":{"cipher":"AES","key":256,"iv":16,"mode":"CBC","type":"block"},"aes128":{"cipher":"AES","key":128,"iv":16,"mode":"CBC","type":"block"},"aes192":{"cipher":"AES","key":192,"iv":16,"mode":"CBC","type":"block"},"aes256":{"cipher":"AES","key":256,"iv":16,"mode":"CBC","type":"block"},"aes-128-cfb":{"cipher":"AES","key":128,"iv":16,"mode":"CFB","type":"stream"},"aes-192-cfb":{"cipher":"AES","key":192,"iv":16,"mode":"CFB","type":"stream"},"aes-256-cfb":{"cipher":"AES","key":256,"iv":16,"mode":"CFB","type":"stream"},"aes-128-cfb8":{"cipher":"AES","key":128,"iv":16,"mode":"CFB8","type":"stream"},"aes-192-cfb8":{"cipher":"AES","key":192,"iv":16,"mode":"CFB8","type":"stream"},"aes-256-cfb8":{"cipher":"AES","key":256,"iv":16,"mode":"CFB8","type":"stream"},"aes-128-cfb1":{"cipher":"AES","key":128,"iv":16,"mode":"CFB1","type":"stream"},"aes-192-cfb1":{"cipher":"AES","key":192,"iv":16,"mode":"CFB1","type":"stream"},"aes-256-cfb1":{"cipher":"AES","key":256,"iv":16,"mode":"CFB1","type":"stream"},"aes-128-ofb":{"cipher":"AES","key":128,"iv":16,"mode":"OFB","type":"stream"},"aes-192-ofb":{"cipher":"AES","key":192,"iv":16,"mode":"OFB","type":"stream"},"aes-256-ofb":{"cipher":"AES","key":256,"iv":16,"mode":"OFB","type":"stream"},"aes-128-ctr":{"cipher":"AES","key":128,"iv":16,"mode":"CTR","type":"stream"},"aes-192-ctr":{"cipher":"AES","key":192,"iv":16,"mode":"CTR","type":"stream"},"aes-256-ctr":{"cipher":"AES","key":256,"iv":16,"mode":"CTR","type":"stream"},"aes-128-gcm":{"cipher":"AES","key":128,"iv":12,"mode":"GCM","type":"auth"},"aes-192-gcm":{"cipher":"AES","key":192,"iv":12,"mode":"GCM","type":"auth"},"aes-256-gcm":{"cipher":"AES","key":256,"iv":12,"mode":"GCM","type":"auth"}}')},8049(e){"use strict";e.exports=JSON.parse('{"sha224WithRSAEncryption":{"sign":"rsa","hash":"sha224","id":"302d300d06096086480165030402040500041c"},"RSA-SHA224":{"sign":"ecdsa/rsa","hash":"sha224","id":"302d300d06096086480165030402040500041c"},"sha256WithRSAEncryption":{"sign":"rsa","hash":"sha256","id":"3031300d060960864801650304020105000420"},"RSA-SHA256":{"sign":"ecdsa/rsa","hash":"sha256","id":"3031300d060960864801650304020105000420"},"sha384WithRSAEncryption":{"sign":"rsa","hash":"sha384","id":"3041300d060960864801650304020205000430"},"RSA-SHA384":{"sign":"ecdsa/rsa","hash":"sha384","id":"3041300d060960864801650304020205000430"},"sha512WithRSAEncryption":{"sign":"rsa","hash":"sha512","id":"3051300d060960864801650304020305000440"},"RSA-SHA512":{"sign":"ecdsa/rsa","hash":"sha512","id":"3051300d060960864801650304020305000440"},"RSA-SHA1":{"sign":"rsa","hash":"sha1","id":"3021300906052b0e03021a05000414"},"ecdsa-with-SHA1":{"sign":"ecdsa","hash":"sha1","id":""},"sha256":{"sign":"ecdsa","hash":"sha256","id":""},"sha224":{"sign":"ecdsa","hash":"sha224","id":""},"sha384":{"sign":"ecdsa","hash":"sha384","id":""},"sha512":{"sign":"ecdsa","hash":"sha512","id":""},"DSA-SHA":{"sign":"dsa","hash":"sha1","id":""},"DSA-SHA1":{"sign":"dsa","hash":"sha1","id":""},"DSA":{"sign":"dsa","hash":"sha1","id":""},"DSA-WITH-SHA224":{"sign":"dsa","hash":"sha224","id":""},"DSA-SHA224":{"sign":"dsa","hash":"sha224","id":""},"DSA-WITH-SHA256":{"sign":"dsa","hash":"sha256","id":""},"DSA-SHA256":{"sign":"dsa","hash":"sha256","id":""},"DSA-WITH-SHA384":{"sign":"dsa","hash":"sha384","id":""},"DSA-SHA384":{"sign":"dsa","hash":"sha384","id":""},"DSA-WITH-SHA512":{"sign":"dsa","hash":"sha512","id":""},"DSA-SHA512":{"sign":"dsa","hash":"sha512","id":""},"DSA-RIPEMD160":{"sign":"dsa","hash":"rmd160","id":""},"ripemd160WithRSA":{"sign":"rsa","hash":"rmd160","id":"3021300906052b2403020105000414"},"RSA-RIPEMD160":{"sign":"rsa","hash":"rmd160","id":"3021300906052b2403020105000414"},"md5WithRSAEncryption":{"sign":"rsa","hash":"md5","id":"3020300c06082a864886f70d020505000410"},"RSA-MD5":{"sign":"rsa","hash":"md5","id":"3020300c06082a864886f70d020505000410"}}')},32279(e){"use strict";e.exports=JSON.parse('{"1.3.132.0.10":"secp256k1","1.3.132.0.33":"p224","1.2.840.10045.3.1.1":"p192","1.2.840.10045.3.1.7":"p256","1.3.132.0.34":"p384","1.3.132.0.35":"p521"}')},14923(e){"use strict";e.exports=JSON.parse('{"AElig":"Æ","AMP":"&","Aacute":"Á","Acirc":"Â","Agrave":"À","Aring":"Å","Atilde":"Ã","Auml":"Ä","COPY":"©","Ccedil":"Ç","ETH":"Ð","Eacute":"É","Ecirc":"Ê","Egrave":"È","Euml":"Ë","GT":">","Iacute":"Í","Icirc":"Î","Igrave":"Ì","Iuml":"Ï","LT":"<","Ntilde":"Ñ","Oacute":"Ó","Ocirc":"Ô","Ograve":"Ò","Oslash":"Ø","Otilde":"Õ","Ouml":"Ö","QUOT":"\\"","REG":"®","THORN":"Þ","Uacute":"Ú","Ucirc":"Û","Ugrave":"Ù","Uuml":"Ü","Yacute":"Ý","aacute":"á","acirc":"â","acute":"´","aelig":"æ","agrave":"à","amp":"&","aring":"å","atilde":"ã","auml":"ä","brvbar":"¦","ccedil":"ç","cedil":"¸","cent":"¢","copy":"©","curren":"¤","deg":"°","divide":"÷","eacute":"é","ecirc":"ê","egrave":"è","eth":"ð","euml":"ë","frac12":"½","frac14":"¼","frac34":"¾","gt":">","iacute":"í","icirc":"î","iexcl":"¡","igrave":"ì","iquest":"¿","iuml":"ï","laquo":"«","lt":"<","macr":"¯","micro":"µ","middot":"·","nbsp":" ","not":"¬","ntilde":"ñ","oacute":"ó","ocirc":"ô","ograve":"ò","ordf":"ª","ordm":"º","oslash":"ø","otilde":"õ","ouml":"ö","para":"¶","plusmn":"±","pound":"£","quot":"\\"","raquo":"»","reg":"®","sect":"§","shy":"­","sup1":"¹","sup2":"²","sup3":"³","szlig":"ß","thorn":"þ","times":"×","uacute":"ú","ucirc":"û","ugrave":"ù","uml":"¨","uuml":"ü","yacute":"ý","yen":"¥","yuml":"ÿ"}')},61711(e){"use strict";e.exports=JSON.parse('{"0":"�","128":"€","130":"‚","131":"ƒ","132":"„","133":"…","134":"†","135":"‡","136":"ˆ","137":"‰","138":"Š","139":"‹","140":"Œ","142":"Ž","145":"‘","146":"’","147":"“","148":"”","149":"•","150":"–","151":"—","152":"˜","153":"™","154":"š","155":"›","156":"œ","158":"ž","159":"Ÿ"}')},37821(e){"use strict";e.exports=JSON.parse('{"modp1":{"gen":"02","prime":"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a63a3620ffffffffffffffff"},"modp2":{"gen":"02","prime":"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece65381ffffffffffffffff"},"modp5":{"gen":"02","prime":"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca237327ffffffffffffffff"},"modp14":{"gen":"02","prime":"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aacaa68ffffffffffffffff"},"modp15":{"gen":"02","prime":"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a93ad2caffffffffffffffff"},"modp16":{"gen":"02","prime":"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a92108011a723c12a787e6d788719a10bdba5b2699c327186af4e23c1a946834b6150bda2583e9ca2ad44ce8dbbbc2db04de8ef92e8efc141fbecaa6287c59474e6bc05d99b2964fa090c3a2233ba186515be7ed1f612970cee2d7afb81bdd762170481cd0069127d5b05aa993b4ea988d8fddc186ffb7dc90a6c08f4df435c934063199ffffffffffffffff"},"modp17":{"gen":"02","prime":"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a92108011a723c12a787e6d788719a10bdba5b2699c327186af4e23c1a946834b6150bda2583e9ca2ad44ce8dbbbc2db04de8ef92e8efc141fbecaa6287c59474e6bc05d99b2964fa090c3a2233ba186515be7ed1f612970cee2d7afb81bdd762170481cd0069127d5b05aa993b4ea988d8fddc186ffb7dc90a6c08f4df435c93402849236c3fab4d27c7026c1d4dcb2602646dec9751e763dba37bdf8ff9406ad9e530ee5db382f413001aeb06a53ed9027d831179727b0865a8918da3edbebcf9b14ed44ce6cbaced4bb1bdb7f1447e6cc254b332051512bd7af426fb8f401378cd2bf5983ca01c64b92ecf032ea15d1721d03f482d7ce6e74fef6d55e702f46980c82b5a84031900b1c9e59e7c97fbec7e8f323a97a7e36cc88be0f1d45b7ff585ac54bd407b22b4154aacc8f6d7ebf48e1d814cc5ed20f8037e0a79715eef29be32806a1d58bb7c5da76f550aa3d8a1fbff0eb19ccb1a313d55cda56c9ec2ef29632387fe8d76e3c0468043e8f663f4860ee12bf2d5b0b7474d6e694f91e6dcc4024ffffffffffffffff"},"modp18":{"gen":"02","prime":"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a92108011a723c12a787e6d788719a10bdba5b2699c327186af4e23c1a946834b6150bda2583e9ca2ad44ce8dbbbc2db04de8ef92e8efc141fbecaa6287c59474e6bc05d99b2964fa090c3a2233ba186515be7ed1f612970cee2d7afb81bdd762170481cd0069127d5b05aa993b4ea988d8fddc186ffb7dc90a6c08f4df435c93402849236c3fab4d27c7026c1d4dcb2602646dec9751e763dba37bdf8ff9406ad9e530ee5db382f413001aeb06a53ed9027d831179727b0865a8918da3edbebcf9b14ed44ce6cbaced4bb1bdb7f1447e6cc254b332051512bd7af426fb8f401378cd2bf5983ca01c64b92ecf032ea15d1721d03f482d7ce6e74fef6d55e702f46980c82b5a84031900b1c9e59e7c97fbec7e8f323a97a7e36cc88be0f1d45b7ff585ac54bd407b22b4154aacc8f6d7ebf48e1d814cc5ed20f8037e0a79715eef29be32806a1d58bb7c5da76f550aa3d8a1fbff0eb19ccb1a313d55cda56c9ec2ef29632387fe8d76e3c0468043e8f663f4860ee12bf2d5b0b7474d6e694f91e6dbe115974a3926f12fee5e438777cb6a932df8cd8bec4d073b931ba3bc832b68d9dd300741fa7bf8afc47ed2576f6936ba424663aab639c5ae4f5683423b4742bf1c978238f16cbe39d652de3fdb8befc848ad922222e04a4037c0713eb57a81a23f0c73473fc646cea306b4bcbc8862f8385ddfa9d4b7fa2c087e879683303ed5bdd3a062b3cf5b3a278a66d2a13f83f44f82ddf310ee074ab6a364597e899a0255dc164f31cc50846851df9ab48195ded7ea1b1d510bd7ee74d73faf36bc31ecfa268359046f4eb879f924009438b481c6cd7889a002ed5ee382bc9190da6fc026e479558e4475677e9aa9e3050e2765694dfc81f56e880b96e7160c980dd98edd3dfffffffffffffffff"}}')},23718(e){"use strict";e.exports={rE:"6.6.1"}}}]);
//# sourceMappingURL=126.0a9c0179f78505a2a5ca.js.map